From 170c76015b063e92857a797695cd044fc7e3f2ff Mon Sep 17 00:00:00 2001 From: William Hua Date: Tue, 21 Jan 2025 12:21:30 +0100 Subject: [PATCH 001/439] LICENSE --- LICENSE | 202 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 202 insertions(+) create mode 100644 LICENSE diff --git a/LICENSE b/LICENSE new file mode 100644 index 000000000..d64569567 --- /dev/null +++ b/LICENSE @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. From 8d9b82fd1064035b3f0f20b05bbeb81e95d53bfe Mon Sep 17 00:00:00 2001 From: Turbobot Date: Tue, 21 Jan 2025 09:34:16 +0100 Subject: [PATCH 002/439] feat(create-turbo): create basic --- .gitignore | 38 + .npmrc | 0 README.md | 84 + apps/docs/.gitignore | 36 + apps/docs/README.md | 36 + apps/docs/app/favicon.ico | Bin 0 -> 25931 bytes apps/docs/app/fonts/GeistMonoVF.woff | Bin 0 -> 67864 bytes apps/docs/app/fonts/GeistVF.woff | Bin 0 -> 66268 bytes apps/docs/app/globals.css | 50 + apps/docs/app/layout.tsx | 31 + apps/docs/app/page.module.css | 188 + apps/docs/app/page.tsx | 102 + apps/docs/eslint.config.js | 4 + apps/docs/next.config.js | 4 + apps/docs/package.json | 27 + apps/docs/public/file-text.svg | 3 + apps/docs/public/globe.svg | 10 + apps/docs/public/next.svg | 1 + apps/docs/public/turborepo-dark.svg | 19 + apps/docs/public/turborepo-light.svg | 19 + apps/docs/public/vercel.svg | 10 + apps/docs/public/window.svg | 3 + apps/docs/tsconfig.json | 20 + apps/web/.gitignore | 36 + apps/web/README.md | 36 + apps/web/app/favicon.ico | Bin 0 -> 25931 bytes apps/web/app/fonts/GeistMonoVF.woff | Bin 0 -> 67864 bytes apps/web/app/fonts/GeistVF.woff | Bin 0 -> 66268 bytes apps/web/app/globals.css | 50 + apps/web/app/layout.tsx | 31 + apps/web/app/page.module.css | 188 + apps/web/app/page.tsx | 102 + apps/web/eslint.config.js | 4 + apps/web/next.config.js | 4 + apps/web/package.json | 27 + apps/web/public/file-text.svg | 3 + apps/web/public/globe.svg | 10 + apps/web/public/next.svg | 1 + apps/web/public/turborepo-dark.svg | 19 + apps/web/public/turborepo-light.svg | 19 + apps/web/public/vercel.svg | 10 + apps/web/public/window.svg | 3 + apps/web/tsconfig.json | 20 + meta.json | 3 + package.json | 19 + packages/eslint-config/README.md | 3 + packages/eslint-config/base.js | 32 + packages/eslint-config/next.js | 49 + packages/eslint-config/package.json | 24 + packages/eslint-config/react-internal.js | 39 + packages/typescript-config/base.json | 19 + packages/typescript-config/nextjs.json | 12 + packages/typescript-config/package.json | 9 + packages/typescript-config/react-library.json | 7 + packages/ui/eslint.config.mjs | 4 + packages/ui/package.json | 28 + packages/ui/src/button.tsx | 20 + packages/ui/src/card.tsx | 27 + packages/ui/src/code.tsx | 11 + packages/ui/tsconfig.json | 8 + packages/ui/turbo/generators/config.ts | 30 + .../turbo/generators/templates/component.hbs | 8 + pnpm-lock.yaml | 4247 +++++++++++++++++ pnpm-workspace.yaml | 3 + turbo.json | 21 + 65 files changed, 5871 insertions(+) create mode 100644 .gitignore create mode 100644 .npmrc create mode 100644 README.md create mode 100644 apps/docs/.gitignore create mode 100644 apps/docs/README.md create mode 100644 apps/docs/app/favicon.ico create mode 100644 apps/docs/app/fonts/GeistMonoVF.woff create mode 100644 apps/docs/app/fonts/GeistVF.woff create mode 100644 apps/docs/app/globals.css create mode 100644 apps/docs/app/layout.tsx create mode 100644 apps/docs/app/page.module.css create mode 100644 apps/docs/app/page.tsx create mode 100644 apps/docs/eslint.config.js create mode 100644 apps/docs/next.config.js create mode 100644 apps/docs/package.json create mode 100644 apps/docs/public/file-text.svg create mode 100644 apps/docs/public/globe.svg create mode 100644 apps/docs/public/next.svg create mode 100644 apps/docs/public/turborepo-dark.svg create mode 100644 apps/docs/public/turborepo-light.svg create mode 100644 apps/docs/public/vercel.svg create mode 100644 apps/docs/public/window.svg create mode 100644 apps/docs/tsconfig.json create mode 100644 apps/web/.gitignore create mode 100644 apps/web/README.md create mode 100644 apps/web/app/favicon.ico create mode 100644 apps/web/app/fonts/GeistMonoVF.woff create mode 100644 apps/web/app/fonts/GeistVF.woff create mode 100644 apps/web/app/globals.css create mode 100644 apps/web/app/layout.tsx create mode 100644 apps/web/app/page.module.css create mode 100644 apps/web/app/page.tsx create mode 100644 apps/web/eslint.config.js create mode 100644 apps/web/next.config.js create mode 100644 apps/web/package.json create mode 100644 apps/web/public/file-text.svg create mode 100644 apps/web/public/globe.svg create mode 100644 apps/web/public/next.svg create mode 100644 apps/web/public/turborepo-dark.svg create mode 100644 apps/web/public/turborepo-light.svg create mode 100644 apps/web/public/vercel.svg create mode 100644 apps/web/public/window.svg create mode 100644 apps/web/tsconfig.json create mode 100644 meta.json create mode 100644 package.json create mode 100644 packages/eslint-config/README.md create mode 100644 packages/eslint-config/base.js create mode 100644 packages/eslint-config/next.js create mode 100644 packages/eslint-config/package.json create mode 100644 packages/eslint-config/react-internal.js create mode 100644 packages/typescript-config/base.json create mode 100644 packages/typescript-config/nextjs.json create mode 100644 packages/typescript-config/package.json create mode 100644 packages/typescript-config/react-library.json create mode 100644 packages/ui/eslint.config.mjs create mode 100644 packages/ui/package.json create mode 100644 packages/ui/src/button.tsx create mode 100644 packages/ui/src/card.tsx create mode 100644 packages/ui/src/code.tsx create mode 100644 packages/ui/tsconfig.json create mode 100644 packages/ui/turbo/generators/config.ts create mode 100644 packages/ui/turbo/generators/templates/component.hbs create mode 100644 pnpm-lock.yaml create mode 100644 pnpm-workspace.yaml create mode 100644 turbo.json diff --git a/.gitignore b/.gitignore new file mode 100644 index 000000000..96fab4fed --- /dev/null +++ b/.gitignore @@ -0,0 +1,38 @@ +# See https://help.github.com/articles/ignoring-files/ for more about ignoring files. + +# Dependencies +node_modules +.pnp +.pnp.js + +# Local env files +.env +.env.local +.env.development.local +.env.test.local +.env.production.local + +# Testing +coverage + +# Turbo +.turbo + +# Vercel +.vercel + +# Build Outputs +.next/ +out/ +build +dist + + +# Debug +npm-debug.log* +yarn-debug.log* +yarn-error.log* + +# Misc +.DS_Store +*.pem diff --git a/.npmrc b/.npmrc new file mode 100644 index 000000000..e69de29bb diff --git a/README.md b/README.md new file mode 100644 index 000000000..4b760734c --- /dev/null +++ b/README.md @@ -0,0 +1,84 @@ +# Turborepo starter + +This Turborepo starter is maintained by the Turborepo core team. + +## Using this example + +Run the following command: + +```sh +npx create-turbo@latest +``` + +## What's inside? + +This Turborepo includes the following packages/apps: + +### Apps and Packages + +- `docs`: a [Next.js](https://nextjs.org/) app +- `web`: another [Next.js](https://nextjs.org/) app +- `@repo/ui`: a stub React component library shared by both `web` and `docs` applications +- `@repo/eslint-config`: `eslint` configurations (includes `eslint-config-next` and `eslint-config-prettier`) +- `@repo/typescript-config`: `tsconfig.json`s used throughout the monorepo + +Each package/app is 100% [TypeScript](https://www.typescriptlang.org/). + +### Utilities + +This Turborepo has some additional tools already setup for you: + +- [TypeScript](https://www.typescriptlang.org/) for static type checking +- [ESLint](https://eslint.org/) for code linting +- [Prettier](https://prettier.io) for code formatting + +### Build + +To build all apps and packages, run the following command: + +``` +cd my-turborepo +pnpm build +``` + +### Develop + +To develop all apps and packages, run the following command: + +``` +cd my-turborepo +pnpm dev +``` + +### Remote Caching + +> [!TIP] +> Vercel Remote Cache is free for all plans. Get started today at [vercel.com](https://vercel.com/signup?/signup?utm_source=remote-cache-sdk&utm_campaign=free_remote_cache). + +Turborepo can use a technique known as [Remote Caching](https://turbo.build/repo/docs/core-concepts/remote-caching) to share cache artifacts across machines, enabling you to share build caches with your team and CI/CD pipelines. + +By default, Turborepo will cache locally. To enable Remote Caching you will need an account with Vercel. If you don't have an account you can [create one](https://vercel.com/signup?utm_source=turborepo-examples), then enter the following commands: + +``` +cd my-turborepo +npx turbo login +``` + +This will authenticate the Turborepo CLI with your [Vercel account](https://vercel.com/docs/concepts/personal-accounts/overview). + +Next, you can link your Turborepo to your Remote Cache by running the following command from the root of your Turborepo: + +``` +npx turbo link +``` + +## Useful Links + +Learn more about the power of Turborepo: + +- [Tasks](https://turbo.build/repo/docs/core-concepts/monorepos/running-tasks) +- [Caching](https://turbo.build/repo/docs/core-concepts/caching) +- [Remote Caching](https://turbo.build/repo/docs/core-concepts/remote-caching) +- [Filtering](https://turbo.build/repo/docs/core-concepts/monorepos/filtering) +- [Configuration Options](https://turbo.build/repo/docs/reference/configuration) +- [CLI Usage](https://turbo.build/repo/docs/reference/command-line-reference) diff --git a/apps/docs/.gitignore b/apps/docs/.gitignore new file mode 100644 index 000000000..f886745c5 --- /dev/null +++ b/apps/docs/.gitignore @@ -0,0 +1,36 @@ +# See https://help.github.com/articles/ignoring-files/ for more about ignoring files. + +# dependencies +/node_modules +/.pnp +.pnp.js +.yarn/install-state.gz + +# testing +/coverage + +# next.js +/.next/ +/out/ + +# production +/build + +# misc +.DS_Store +*.pem + +# debug +npm-debug.log* +yarn-debug.log* +yarn-error.log* + +# env files (can opt-in for commiting if needed) +.env* + +# vercel +.vercel + +# typescript +*.tsbuildinfo +next-env.d.ts diff --git a/apps/docs/README.md b/apps/docs/README.md new file mode 100644 index 000000000..a98bfa814 --- /dev/null +++ b/apps/docs/README.md @@ -0,0 +1,36 @@ +This is a [Next.js](https://nextjs.org) project bootstrapped with [`create-next-app`](https://nextjs.org/docs/app/api-reference/create-next-app). + +## Getting Started + +First, run the development server: + +```bash +npm run dev +# or +yarn dev +# or +pnpm dev +# or +bun dev +``` + +Open [http://localhost:3000](http://localhost:3000) with your browser to see the result. + +You can start editing the page by modifying `app/page.tsx`. The page auto-updates as you edit the file. + +This project uses [`next/font`](https://nextjs.org/docs/app/building-your-application/optimizing/fonts) to automatically optimize and load Inter, a custom Google Font. + +## Learn More + +To learn more about Next.js, take a look at the following resources: + +- [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API. +- [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial. + +You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js) - your feedback and contributions are welcome! + +## Deploy on Vercel + +The easiest way to deploy your Next.js app is to use the [Vercel Platform](https://vercel.com/new?utm_medium=default-template&filter=next.js&utm_source=create-next-app&utm_campaign=create-next-app-readme) from the creators of Next.js. + +Check out our [Next.js deployment documentation](https://nextjs.org/docs/app/building-your-application/deploying) for more details. diff --git a/apps/docs/app/favicon.ico b/apps/docs/app/favicon.ico new file mode 100644 index 0000000000000000000000000000000000000000..718d6fea4835ec2d246af9800eddb7ffb276240c GIT binary patch literal 25931 zcmeHv30#a{`}aL_*G&7qml|y<+KVaDM2m#dVr!KsA!#An?kSQM(q<_dDNCpjEux83 zLb9Z^XxbDl(w>%i@8hT6>)&Gu{h#Oeyszu?xtw#Zb1mO{pgX9699l+Qppw7jXaYf~-84xW z)w4x8?=youko|}Vr~(D$UXIbiXABHh`p1?nn8Po~fxRJv}|0e(BPs|G`(TT%kKVJAdg5*Z|x0leQq0 zkdUBvb#>9F()jo|T~kx@OM8$9wzs~t2l;K=woNssA3l6|sx2r3+kdfVW@e^8e*E}v zA1y5{bRi+3Z`uD3{F7LgFJDdvm;nJilkzDku>BwXH(8ItVCXk*-lSJnR?-2UN%hJ){&rlvg`CDTj z)Bzo!3v7Ou#83zEDEFcKt(f1E0~=rqeEbTnMvWR#{+9pg%7G8y>u1OVRUSoox-ovF z2Ydma(;=YuBY(eI|04{hXzZD6_f(v~H;C~y5=DhAC{MMS>2fm~1H_t2$56pc$NH8( z5bH|<)71dV-_oCHIrzrT`2s-5w_+2CM0$95I6X8p^r!gHp+j_gd;9O<1~CEQQGS8) zS9Qh3#p&JM-G8rHekNmKVewU;pJRcTAog68KYo^dRo}(M>36U4Us zfgYWSiHZL3;lpWT=zNAW>Dh#mB!_@Lg%$ms8N-;aPqMn+C2HqZgz&9~Eu z4|Kp<`$q)Uw1R?y(~S>ePdonHxpV1#eSP1B;Ogo+-Pk}6#0GsZZ5!||ev2MGdh}_m z{DeR7?0-1^zVs&`AV6Vt;r3`I`OI_wgs*w=eO%_#7Kepl{B@xiyCANc(l zzIyd4y|c6PXWq9-|KM8(zIk8LPk(>a)zyFWjhT!$HJ$qX1vo@d25W<fvZQ2zUz5WRc(UnFMKHwe1| zWmlB1qdbiA(C0jmnV<}GfbKtmcu^2*P^O?MBLZKt|As~ge8&AAO~2K@zbXelK|4T<{|y4`raF{=72kC2Kn(L4YyenWgrPiv z@^mr$t{#X5VuIMeL!7Ab6_kG$&#&5p*Z{+?5U|TZ`B!7llpVmp@skYz&n^8QfPJzL z0G6K_OJM9x+Wu2gfN45phANGt{7=C>i34CV{Xqlx(fWpeAoj^N0Biu`w+MVcCUyU* zDZuzO0>4Z6fbu^T_arWW5n!E45vX8N=bxTVeFoep_G#VmNlQzAI_KTIc{6>c+04vr zx@W}zE5JNSU>!THJ{J=cqjz+4{L4A{Ob9$ZJ*S1?Ggg3klFp!+Y1@K+pK1DqI|_gq z5ZDXVpge8-cs!o|;K73#YXZ3AShj50wBvuq3NTOZ`M&qtjj#GOFfgExjg8Gn8>Vq5 z`85n+9|!iLCZF5$HJ$Iu($dm?8~-ofu}tEc+-pyke=3!im#6pk_Wo8IA|fJwD&~~F zc16osQ)EBo58U7XDuMexaPRjU@h8tXe%S{fA0NH3vGJFhuyyO!Uyl2^&EOpX{9As0 zWj+P>{@}jxH)8|r;2HdupP!vie{sJ28b&bo!8`D^x}TE$%zXNb^X1p@0PJ86`dZyj z%ce7*{^oo+6%&~I!8hQy-vQ7E)0t0ybH4l%KltWOo~8cO`T=157JqL(oq_rC%ea&4 z2NcTJe-HgFjNg-gZ$6!Y`SMHrlj}Etf7?r!zQTPPSv}{so2e>Fjs1{gzk~LGeesX%r(Lh6rbhSo_n)@@G-FTQy93;l#E)hgP@d_SGvyCp0~o(Y;Ee8{ zdVUDbHm5`2taPUOY^MAGOw*>=s7=Gst=D+p+2yON!0%Hk` zz5mAhyT4lS*T3LS^WSxUy86q&GnoHxzQ6vm8)VS}_zuqG?+3td68_x;etQAdu@sc6 zQJ&5|4(I?~3d-QOAODHpZ=hlSg(lBZ!JZWCtHHSj`0Wh93-Uk)_S%zsJ~aD>{`A0~ z9{AG(e|q3g5B%wYKRxiL2Y$8(4w6bzchKuloQW#e&S3n+P- z8!ds-%f;TJ1>)v)##>gd{PdS2Oc3VaR`fr=`O8QIO(6(N!A?pr5C#6fc~Ge@N%Vvu zaoAX2&(a6eWy_q&UwOhU)|P3J0Qc%OdhzW=F4D|pt0E4osw;%<%Dn58hAWD^XnZD= z>9~H(3bmLtxpF?a7su6J7M*x1By7YSUbxGi)Ot0P77`}P3{)&5Un{KD?`-e?r21!4vTTnN(4Y6Lin?UkSM z`MXCTC1@4A4~mvz%Rh2&EwY))LeoT=*`tMoqcEXI>TZU9WTP#l?uFv+@Dn~b(>xh2 z;>B?;Tz2SR&KVb>vGiBSB`@U7VIWFSo=LDSb9F{GF^DbmWAfpms8Sx9OX4CnBJca3 zlj9(x!dIjN?OG1X4l*imJNvRCk}F%!?SOfiOq5y^mZW)jFL@a|r-@d#f7 z2gmU8L3IZq0ynIws=}~m^#@&C%J6QFo~Mo4V`>v7MI-_!EBMMtb%_M&kvAaN)@ZVw z+`toz&WG#HkWDjnZE!6nk{e-oFdL^$YnbOCN}JC&{$#$O27@|Tn-skXr)2ml2~O!5 zX+gYoxhoc7qoU?C^3~&!U?kRFtnSEecWuH0B0OvLodgUAi}8p1 zrO6RSXHH}DMc$&|?D004DiOVMHV8kXCP@7NKB zgaZq^^O<7PoKEp72kby@W0Z!Y*Ay{&vfg#C&gG@YVR9g?FEocMUi1gSN$+V+ayF45{a zuDZDTN}mS|;BO%gEf}pjBfN2-gIrU#G5~cucA;dokXW89%>AyXJJI z9X4UlIWA|ZYHgbI z5?oFk@A=Ik7lrEQPDH!H+b`7_Y~aDb_qa=B2^Y&Ow41cU=4WDd40dp5(QS-WMN-=Y z9g;6_-JdNU;|6cPwf$ak*aJIcwL@1n$#l~zi{c{EW?T;DaW*E8DYq?Umtz{nJ&w-M zEMyTDrC&9K$d|kZe2#ws6)L=7K+{ zQw{XnV6UC$6-rW0emqm8wJoeZK)wJIcV?dST}Z;G0Arq{dVDu0&4kd%N!3F1*;*pW zR&qUiFzK=@44#QGw7k1`3t_d8&*kBV->O##t|tonFc2YWrL7_eqg+=+k;!F-`^b8> z#KWCE8%u4k@EprxqiV$VmmtiWxDLgnGu$Vs<8rppV5EajBXL4nyyZM$SWVm!wnCj-B!Wjqj5-5dNXukI2$$|Bu3Lrw}z65Lc=1G z^-#WuQOj$hwNGG?*CM_TO8Bg-1+qc>J7k5c51U8g?ZU5n?HYor;~JIjoWH-G>AoUP ztrWWLbRNqIjW#RT*WqZgPJXU7C)VaW5}MiijYbABmzoru6EmQ*N8cVK7a3|aOB#O& zBl8JY2WKfmj;h#Q!pN%9o@VNLv{OUL?rixHwOZuvX7{IJ{(EdPpuVFoQqIOa7giLVkBOKL@^smUA!tZ1CKRK}#SSM)iQHk)*R~?M!qkCruaS!#oIL1c z?J;U~&FfH#*98^G?i}pA{ z9Jg36t4=%6mhY(quYq*vSxptes9qy|7xSlH?G=S@>u>Ebe;|LVhs~@+06N<4CViBk zUiY$thvX;>Tby6z9Y1edAMQaiH zm^r3v#$Q#2T=X>bsY#D%s!bhs^M9PMAcHbCc0FMHV{u-dwlL;a1eJ63v5U*?Q_8JO zT#50!RD619#j_Uf))0ooADz~*9&lN!bBDRUgE>Vud-i5ck%vT=r^yD*^?Mp@Q^v+V zG#-?gKlr}Eeqifb{|So?HM&g91P8|av8hQoCmQXkd?7wIJwb z_^v8bbg`SAn{I*4bH$u(RZ6*xUhuA~hc=8czK8SHEKTzSxgbwi~9(OqJB&gwb^l4+m`k*Q;_?>Y-APi1{k zAHQ)P)G)f|AyjSgcCFps)Fh6Bca*Xznq36!pV6Az&m{O8$wGFD? zY&O*3*J0;_EqM#jh6^gMQKpXV?#1?>$ml1xvh8nSN>-?H=V;nJIwB07YX$e6vLxH( zqYwQ>qxwR(i4f)DLd)-$P>T-no_c!LsN@)8`e;W@)-Hj0>nJ-}Kla4-ZdPJzI&Mce zv)V_j;(3ERN3_@I$N<^|4Lf`B;8n+bX@bHbcZTopEmDI*Jfl)-pFDvo6svPRoo@(x z);_{lY<;);XzT`dBFpRmGrr}z5u1=pC^S-{ce6iXQlLGcItwJ^mZx{m$&DA_oEZ)B{_bYPq-HA zcH8WGoBG(aBU_j)vEy+_71T34@4dmSg!|M8Vf92Zj6WH7Q7t#OHQqWgFE3ARt+%!T z?oLovLVlnf?2c7pTc)~cc^($_8nyKwsN`RA-23ed3sdj(ys%pjjM+9JrctL;dy8a( z@en&CQmnV(()bu|Y%G1-4a(6x{aLytn$T-;(&{QIJB9vMox11U-1HpD@d(QkaJdEb zG{)+6Dos_L+O3NpWo^=gR?evp|CqEG?L&Ut#D*KLaRFOgOEK(Kq1@!EGcTfo+%A&I z=dLbB+d$u{sh?u)xP{PF8L%;YPPW53+@{>5W=Jt#wQpN;0_HYdw1{ksf_XhO4#2F= zyPx6Lx2<92L-;L5PD`zn6zwIH`Jk($?Qw({erA$^bC;q33hv!d!>%wRhj# zal^hk+WGNg;rJtb-EB(?czvOM=H7dl=vblBwAv>}%1@{}mnpUznfq1cE^sgsL0*4I zJ##!*B?=vI_OEVis5o+_IwMIRrpQyT_Sq~ZU%oY7c5JMIADzpD!Upz9h@iWg_>>~j zOLS;wp^i$-E?4<_cp?RiS%Rd?i;f*mOz=~(&3lo<=@(nR!_Rqiprh@weZlL!t#NCc zO!QTcInq|%#>OVgobj{~ixEUec`E25zJ~*DofsQdzIa@5^nOXj2T;8O`l--(QyU^$t?TGY^7#&FQ+2SS3B#qK*k3`ye?8jUYSajE5iBbJls75CCc(m3dk{t?- zopcER9{Z?TC)mk~gpi^kbbu>b-+a{m#8-y2^p$ka4n60w;Sc2}HMf<8JUvhCL0B&Btk)T`ctE$*qNW8L$`7!r^9T+>=<=2qaq-;ll2{`{Rg zc5a0ZUI$oG&j-qVOuKa=*v4aY#IsoM+1|c4Z)<}lEDvy;5huB@1RJPquU2U*U-;gu z=En2m+qjBzR#DEJDO`WU)hdd{Vj%^0V*KoyZ|5lzV87&g_j~NCjwv0uQVqXOb*QrQ zy|Qn`hxx(58c70$E;L(X0uZZ72M1!6oeg)(cdKO ze0gDaTz+ohR-#d)NbAH4x{I(21yjwvBQfmpLu$)|m{XolbgF!pmsqJ#D}(ylp6uC> z{bqtcI#hT#HW=wl7>p!38sKsJ`r8}lt-q%Keqy%u(xk=yiIJiUw6|5IvkS+#?JTBl z8H5(Q?l#wzazujH!8o>1xtn8#_w+397*_cy8!pQGP%K(Ga3pAjsaTbbXJlQF_+m+-UpUUent@xM zg%jqLUExj~o^vQ3Gl*>wh=_gOr2*|U64_iXb+-111aH}$TjeajM+I20xw(((>fej-@CIz4S1pi$(#}P7`4({6QS2CaQS4NPENDp>sAqD z$bH4KGzXGffkJ7R>V>)>tC)uax{UsN*dbeNC*v}#8Y#OWYwL4t$ePR?VTyIs!wea+ z5Urmc)X|^`MG~*dS6pGSbU+gPJoq*^a=_>$n4|P^w$sMBBy@f*Z^Jg6?n5?oId6f{ z$LW4M|4m502z0t7g<#Bx%X;9<=)smFolV&(V^(7Cv2-sxbxopQ!)*#ZRhTBpx1)Fc zNm1T%bONzv6@#|dz(w02AH8OXe>kQ#1FMCzO}2J_mST)+ExmBr9cva-@?;wnmWMOk z{3_~EX_xadgJGv&H@zK_8{(x84`}+c?oSBX*Ge3VdfTt&F}yCpFP?CpW+BE^cWY0^ zb&uBN!Ja3UzYHK-CTyA5=L zEMW{l3Usky#ly=7px648W31UNV@K)&Ub&zP1c7%)`{);I4b0Q<)B}3;NMG2JH=X$U zfIW4)4n9ZM`-yRj67I)YSLDK)qfUJ_ij}a#aZN~9EXrh8eZY2&=uY%2N0UFF7<~%M zsB8=erOWZ>Ct_#^tHZ|*q`H;A)5;ycw*IcmVxi8_0Xk}aJA^ath+E;xg!x+As(M#0=)3!NJR6H&9+zd#iP(m0PIW8$ z1Y^VX`>jm`W!=WpF*{ioM?C9`yOR>@0q=u7o>BP-eSHqCgMDj!2anwH?s%i2p+Q7D zzszIf5XJpE)IG4;d_(La-xenmF(tgAxK`Y4sQ}BSJEPs6N_U2vI{8=0C_F?@7<(G; zo$~G=8p+076G;`}>{MQ>t>7cm=zGtfbdDXm6||jUU|?X?CaE?(<6bKDYKeHlz}DA8 zXT={X=yp_R;HfJ9h%?eWvQ!dRgz&Su*JfNt!Wu>|XfU&68iRikRrHRW|ZxzRR^`eIGt zIeiDgVS>IeExKVRWW8-=A=yA`}`)ZkWBrZD`hpWIxBGkh&f#ijr449~m`j6{4jiJ*C!oVA8ZC?$1RM#K(_b zL9TW)kN*Y4%^-qPpMP7d4)o?Nk#>aoYHT(*g)qmRUb?**F@pnNiy6Fv9rEiUqD(^O zzyS?nBrX63BTRYduaG(0VVG2yJRe%o&rVrLjbxTaAFTd8s;<<@Qs>u(<193R8>}2_ zuwp{7;H2a*X7_jryzriZXMg?bTuegABb^87@SsKkr2)0Gyiax8KQWstw^v#ix45EVrcEhr>!NMhprl$InQMzjSFH54x5k9qHc`@9uKQzvL4ihcq{^B zPrVR=o_ic%Y>6&rMN)hTZsI7I<3&`#(nl+3y3ys9A~&^=4?PL&nd8)`OfG#n zwAMN$1&>K++c{^|7<4P=2y(B{jJsQ0a#U;HTo4ZmWZYvI{+s;Td{Yzem%0*k#)vjpB zia;J&>}ICate44SFYY3vEelqStQWFihx%^vQ@Do(sOy7yR2@WNv7Y9I^yL=nZr3mb zXKV5t@=?-Sk|b{XMhA7ZGB@2hqsx}4xwCW!in#C zI@}scZlr3-NFJ@NFaJlhyfcw{k^vvtGl`N9xSo**rDW4S}i zM9{fMPWo%4wYDG~BZ18BD+}h|GQKc-g^{++3MY>}W_uq7jGHx{mwE9fZiPCoxN$+7 zrODGGJrOkcPQUB(FD5aoS4g~7#6NR^ma7-!>mHuJfY5kTe6PpNNKC9GGRiu^L31uG z$7v`*JknQHsYB!Tm_W{a32TM099djW%5e+j0Ve_ct}IM>XLF1Ap+YvcrLV=|CKo6S zb+9Nl3_YdKP6%Cxy@6TxZ>;4&nTneadr z_ES90ydCev)LV!dN=#(*f}|ZORFdvkYBni^aLbUk>BajeWIOcmHP#8S)*2U~QKI%S zyrLmtPqb&TphJ;>yAxri#;{uyk`JJqODDw%(Z=2`1uc}br^V%>j!gS)D*q*f_-qf8&D;W1dJgQMlaH5er zN2U<%Smb7==vE}dDI8K7cKz!vs^73o9f>2sgiTzWcwY|BMYHH5%Vn7#kiw&eItCqa zIkR2~Q}>X=Ar8W|^Ms41Fm8o6IB2_j60eOeBB1Br!boW7JnoeX6Gs)?7rW0^5psc- zjS16yb>dFn>KPOF;imD}e!enuIniFzv}n$m2#gCCv4jM#ArwlzZ$7@9&XkFxZ4n!V zj3dyiwW4Ki2QG{@i>yuZXQizw_OkZI^-3otXC{!(lUpJF33gI60ak;Uqitp74|B6I zgg{b=Iz}WkhCGj1M=hu4#Aw173YxIVbISaoc z-nLZC*6Tgivd5V`K%GxhBsp@SUU60-rfc$=wb>zdJzXS&-5(NRRodFk;Kxk!S(O(a0e7oY=E( zAyS;Ow?6Q&XA+cnkCb{28_1N8H#?J!*$MmIwLq^*T_9-z^&UE@A(z9oGYtFy6EZef LrJugUA?W`A8`#=m literal 0 HcmV?d00001 diff --git a/apps/docs/app/fonts/GeistMonoVF.woff b/apps/docs/app/fonts/GeistMonoVF.woff new file mode 100644 index 0000000000000000000000000000000000000000..f2ae185cbfd16946a534d819e9eb03924abbcc49 GIT binary patch literal 67864 zcmZsCV{|6X^LDby#!fc2?QCp28{4*X$D569+qP}vj&0lKKhN*HAKy9W>N!=Xdb(?> zQB^(TCNCxi0tx~G0t$@@g8bk8lJvX$|6bxEqGBK*H_sp-KYBnwz$0Q}BT2;-%I=)X2ub{=04r2*}TK5D+LXt~5{t z)Bof^+#0@Rw7=mKi|m$bX6?Bh~_rVfN!~Z5D+lYZ~eMdYd=)1 z?To(VG`{%|MBi{mhZ2~!F#vq`Pec9x)g^>91o^TxurUDvvGDqSS9st3-kw(m@3Xga z`qtIzyIr_nARq+I@sH7;0MG(2NPTSa#jh!1f4cEF5Xll)bpZ(>cyI|Q1wleT1wA5Y zq9^hv^x;~(?2G$>(CTL2)#Ou-rP=XDW$spn8<%0TH%F=^X^(F62Vd@bY`Wi$j$33w zf!U^8o_B|x>{pW$eFZG}b7#|uFueKt$`e9j!wHNBGQX67&nfgl(Ae`3qE-E+yBSfA zEnJSA6p%}|+P9ZIYR{w}nfaKIlV@b3YYzcH!?WNXRvg|J( z((lq^WAE%Q7;oE?zDk~Nvg1Dr_0)KH8m&HF%^&8bI!=#YAGqIx$Yf2lH9S*;=c=b6 zUHi?R*$?Q;>HU4-#?hGJ&dj2jq>d3;_NN_TeipMG!(E+ou)RL-kMQv(W$b9+k# z*%bh8;4)9Je-Giu+XwdbyoaSGei^KG*(1D)5+h{Kfg<`v)nU>dj}RiD_+VvZgb7>9 z-Qb^cdc0k1VSIW!onbm2*_uY*_+r1qe${8^DzXxMnX@F#u>I3_n0j_0ih#p?wd+gPI5niQVbIIsk zkxy%JZZqLeb?p_DXdh1*9Z(O`Nm%TZ(zL`RA!dd+$VNO>qwecEt;dy5w%UK1@1exK zD~__{?4}pb@sGL5CjI=xAR7Jym_*l%fS~I(m>6873y~E7k;IfdA_0)|1$o9?h92Js zt4eu6$WMaSodkz#g|LB%Iw?^B?6x^A=arKjpBhhH6ZCbk2{;io5x)B3eh9R{KEOQX z9|&Q1T3-YGeF+9$doOBzU`TntM~LF~ON3aEZ|p9Y7+wF9qBi`6(hl}&)@-uZ`4zJl z>R`Cps(&x90dBZ~SLeCp?oa*PgM%P!bZaG*OS96bkBT*gF)q0a zxEd&4ZXnQHBuCrYm@m@ffPQTObP*2j+P z_?=gLxmGc32nceW5l5oy=+SB$=N%F^{g}lKR9(TljKIPHw)zVyZ?3ODUL^k;0CuW% z!;ErXcl6|m8OB+{5iYNEq}!Y@o<%r_^{5a($V)INcxkIcMA}Gd8LUShZK5U!u)=PR z6ZALS*{0F1Oxl?y$xE;JA+eyc6mW}LqFTZ3ZvVl#h*UFfj`$%JE0l8D!JRBYUlH!L zJ!uZs@&)nqNg9x8t`fZ?k4Ihgdv(Ogzr)|%{JQ|-g@#=7rCIq(Oo={zr!i7F_F!6; zqpKdMO={?6)e1SETQW+U?L?WPzQx9x#RrVu%xa5u$bDgLQrF-K4Iwd}9a=yS3(f1J z=&B1p=UwPU_#kfxrJ(YnDYZkc%{pp&sn{<~MdR_9^8y%u``RUJaJtY*yi=~R9ryu@ z9kzsKGwMLhZ1egl=e5m~k^Ft9pSfxI5B!$g1WaeqpO`4?C-3aj(gSm%1+@BdqpyAV z@X|;G-&|(jA;zG>T=$%}2gC%)gu@pTPQ)SpSw*2DuSrX((%PM=kQ&E@b=Ygy)l&#k zn6Q419734+(;{THjU2Uy9No0H4_jV1#6O)c>u@tbG6oWD;-8yHLnM^;;b@dWvle!?{40o`dO)$$EZ zM^@JN7b3@-+?UUO*P#gtLsy$!7gZcziDwAj59PsCAJm>m6r+l^X1z|%wu-jJhnQ&_ znPJwq9_*qBLoo*W`sPdYk10kPgf$aH@4qU~%&pFl2rZ0AHR*E-AvBR{F9QCehDa@z z95xXU{QZg|=zb2Pq36>@3je4inO+>S(`ht?)Z#zrHM(i>qE+>iU#!8v4QnWDruR08 zihT~ec3TRJh#llhgk(NqF04=VE8}61FWwvTi_}KWRnkIGbxQ)CAyBfBoVsTvRsR!v zeeHuptQ&5sDmg3vV_f9UtqYjdrR(_D^waATK``ZJjfZD5Kduvl1+l2-u6Qf=6Ombx z7Sq ztJ92oU^LD6n$?=8G?#FGx#fF$d!2WBTf$UGVa}#`S@X&5dFIq%K!1Ikjs!+ybc~8&;<*f2$gyb>j{=&y@=kHsC%Xl#WTojY!)xQxm z+xUe-8Of9gTp&DDOh{Yy9#6leUk5m&-h{G7M@bsLtAJZq1|X(5;ulY z-D2nY-`lAFFZza${swOYsV>&wyw;MiiXw9Ze4so}{Flt`IeJQ5b1l1!d)yG4v?WEO zO3yg9oy--%g}hya8*T);IAWhS&T>>KL9Je(WS#9P#!$_f6!1`7cfKj*+i>@*tP8Mjj|un5Z`YGD>MiCU!adPX zx#5sU8_)@)5fHgRLdp7k;l9Mr_8H3SOvpCBbBRGBQ`Wih*Xpj<)C6}E4SH?GeM1wt)HAM~N<~ejyt^Wpq0tmp z6X&e+wbKjOt@{1ng^s>(semrGFCQLXu|@O1tvtmYwuZ`$BSe{a-011Sk2a~(>MVE0 zpIQ7LpuG+o?lOHuw%e_kJ6yAoXCpu*QQeY%8SNh6?$89*3`>%=;EOJb+gtz&Kp|yv zfPV+nw`uTKbxE3vpT)v3C@L}V3(f*@_3N$Flc(8e<6F?hmPF|Dt%$W})5dMX(nql2 zOMy&yEWPokJ^l?odvVv&l(un4B`x0UHu6T8LraPoL*NltIUElZ5m!YVjcyZe{0Gtx zK{scl85IYuMO$EBG$tHHu0zc0wi&8rW3`d{VJC$oYNJ?m2MBStoGQ!4xQLHS_tBeI z4=tL^Lv>Bj^g79fzfCc?aTHu%Uvn6&+a@&*N~Rba)gbaLl?WBo%1^Pjx=t&|S^9nh zu(^m2A5XEp+ZN2L2#w^7IpLW%BW#F@6{50p0liwKYe!&NWu2F@oIV-5r<}*;+3|bP ze>zfTOAXqW760vNex|NG!Xz~@Wcd5UhOk&n5clNgylEGuS)lF7K$c{a+Hl#rx-2Ic zD(HhN(=Sa(v|zonLt6q9;>ZBVh6n__yB8Pn7WCY*KX8V+u(@n9e zOTe7&?}Fvh8wHRCgku@eEVodSv4NBH%wJEO4wEp#-}%%$wR$2D5JR|@$vRkRb7}iIhxv; zshP$6ckt<2KCd5K9#gwy%I*Ey>Fe20M_29Y=)g1AcBH#@^pXEtP30j`IbaZgR2{t^ z`r?E$A9Zdf@wct0$aRwJ=i9-^yxU77e+%zOG9j-MXBP)nekEiIFHfS>Ba|3w;D?|dL35fhFX>Fi zQcepJaiZvXu&=IsDUMoZIo?5N1`h|7?WDfbJmXcY~w_lg&|t|BlK!`YFCDcu*n(Sa{%c z4$vg-+drB`)#x8&q6x0pG5p+BKvfIu#O32<*&LF;z8q?zL`41|Yicx^Yq4jz6>WcO z4=~f8fF;F-A=fL28*f$mLyZ)0X>6z$biG4VuDpiV4z zY~_evrt9XZfAzEyT`LtOtA^qKGM{Tq8NMHGIOL>T;4vaiE@lH-C<@aOeh_^m?<&&h zdXSPA^^n-i>Uj{Z%Lb+6v5B_zD^V_GWE1OBNlHndI9YW5kD^Kk@cZ&Ia z6oRdBan^1xma-m6+`d|wRJR`V~A;L2zw&Yu_yoTtgzTrhi-xxFYK659imn;^%TR%3!4mYTU`we=`K-=!r$)M^U|fng0gd4 zY&D|@id)hQ6lZ6$q#}%snpqqb>@aUApp7;*W>0UoVkg(l}MYC6COXI29 zGc~J-gZ4vC{yy!bjlkXM?rF2de*R#dL=(PI9-L-quUxck&u`DmTQjI#p*2mPjNqc? z$X9XK{UtI;@pJUK?cwIxV;%;lTG0!%y5 zJpWhb11vK@d2I=!;)F5vM`ML)^6b)LCj<7zlFm7!F$_T_`hyDZ>MEBe@A%a+9RG#y z_*KevIxJ(rEBNzd_KBWC<+$;IWH5}W4eTN}TM#4*`n;PelIth54aC}8|KHL1Kd9hY zdg6C1@KJ_+m6OHmY-}EB_QYaDnd8)^Y#fTGC1QB3E&Rq&s{PIUL5DzjJG<4E+;x=! zz3?hDSALlK#YF2II?cmMlq^D)riLWp(`LjFJNTY&BkIxb04C*yZ)Vjb*8{OJ&U(p# z3cxi}BFmgL+V%Ew9*g|D_V>-jj>E&_kXF}@LX&k)UuVIb+!>`~SGXZrZd9yBFoeR5 zNrxA*){}5*BIRJ3GSAb5CW!RX5}9`W*v3|J4v;znteT1Jn6BmRxF0|>v+o2A%ix3E z_}aH+5hk}2B`>5kW}hg%W`rkIVN-e8*j3!A(mQ&IFKdo(2cn%(!rGGG-la2y4dz)d z;cU;$Z5l<(tUS+pPC9~e+Sl_5OnGT=${=;{P%TayUQ^o1bm#Qel@0Ea2wDFsgpR8p z%{42-o*aWIGVFESm@;QGB)am8yb0`j>EazkuEVoKMd!r}nWzO!rg#7+BuCQ?4|TZ^ z`|;e56wJl>(SLl!DEUo1dvlUaqZZ{;%CQg!oaJ?FFxAmVK6uv$_;SHB!^)t!xv-f_$Bs$C)MjJg|HA#qe9b`BSwl8 z2McXH6Uvn|ClJyKV8|OT-V{LIG1v~h>gQprzhfK(DrmFQ4M!VgO!ZS8o6D1p%RSmV z+Xf5C09vC7w0t%eXb8L=U(~wlP)tZ3TaN#j4{NWJFL7# zMeiEPfaIS?IHAdP9aH+sm5udxfk^i!o76N(KewVyMk&0@OpX6rwAKG}3?0IvE?(cPM;r3Az!_xLiYFY&)}Sl<19#fU0x zj-uZ}`Ey9BnVxqbj#D{R24|$jM(dNl2KH#FvbDSz*@x<{sy48Gz=(yRiYW`ofYMu+ zzdPsn^PhpxWX2v}!sahrD*o$$3k;XDHq|HQU^rDKHq%xw$IafF=^BmtY8T@#Z%YDW zAdx@ahu2vaLq%D&-me?D(}&)mEb|5m{{oc6#p!vRnXxnizHWv)adXiBb>q0*jdBJ~Zv<2B}4vZ{P z>E)ayXwPyT&!MqX{ao=#mpGCX5|61&)PEQKmppcZigqM*Xe+;DOlb?AQ8hZ8S0~w3)(nNAK)Iuc7rg zfIT}yB^fVpt`B3Pkl;fBY6u~2&%W5O{d;oadPW=tcE^D^C>VI_JPYukh@TfhQoWZeCJ5B$7I19W@q_TM0($TkNK3wl)QIl3|@|1RCuW$X^KSG)YgdJf$ zD&q2EfNK5$`W1XPc!pW_jn16RK(}y~T4kUY!;u`93tAJiu%lz7ol{&ur{Q zrA4yCFcU|gV0|>p_`D&ByZc`)DL+`Qqx8bmSv%J+qdQd*Y<;Klb{>?OW@XKPzqewj ztIkvI-K;Hlf@9cCVRdISFG4&ME?xbBnin*J=9sxZ+*CAN{PGnwwyeqzbU^u}JEz&U zujyQvjy%LMauULwp0$59k|Lxd4Icntq<^uQ3!iJ0*EJT#GqBhF5^zk{hkBT< zKNwtg4Y`s4lJ-1VzUy%1!)~>kypou8iu}HY$;B}2qhX>w`(0ya>5ndBmNHvwz@<@d z)_T3Arr!pCuZ?)(&jZ=LnXHsU&B)ifpJd12LpQF3x4*zCIMUlbov*YMkDIX`ZQ}#B zDEm7;2>6H|!x9eQMZTTQ#83yK07tV{aiGreb{XKo=?{!()DRH+$I-(B{q;fyyO2n) z-rGbBGoMjZLapRim!$3W&f}tbELYcO^N@9^$@oA{Fw|v>Jo^sP%|m`>OsVrmyd1`r z*_-ScUuU|lzR~%OHT$uyWNQuw)pj`yF@eLl^+;zNjqf~|6huSAAIGYnALff2fZP5> zz7ARH{>mIa^RkT@w4ZV!CXF(cDn9w9CcPN-d;=6xcKKM>?vd2tUshA!XM9hA9JplyPAlKHA3W}2f4;=EdS9$VRk zJd#7BDuS+qpm{NTo#0B*Oj{$Z2l2)5j>joob07T0UCp(y#jl_ioRJq7;CrcFZ;7+D ziT+n)gme?&`MZ8Q3URYd1 zUXO6*c;TeIhsi*l(c2?lau-s#yIh8Vm$bBPLkB24pwd6-v8=f_57U7s_X=;?ZMPX$=V+KD?D%h69Plxj z6s25MR;B`_3y$P%?|Wl%v9)a+)Xt1ovYG0-8ZEx;{wk%oGLr8D(F1mGIiIYKO7qIT zkyAXybQE{@&#($=@kZpE5&n7R;k?&LuC|WbUG$$?mLATHDk-iOwVbXY!1z4~OSn zL9Iql5xuH}kpF|{#T-2i$=3HA7g2YTKZSXE!U$;^53~)*>eS`jehs0aZ z?~}w>o$4HP*axMt=ZuDj#B+$8z;s<~`^+`;?9euOJhNPximpeOXZLVk`?)op?#1LI zsEJ(3NA-`GoL{a>z!{Z>a*D$!ZnSUCRhF+h1{YrQx-{HFin8WzZefO{l z8cNaM;e7wxPv4B1qdM6*FoUE$-f@ij7)Qn+%qi1X#m$C)|q*>heV z_F1E1;>jFo_X_SxU4z7K=dzD=a^~oL!C9SEV-!KD$#mnz60qM-#pJFWBjB{A91?@LxNGc9%0{4?@cU#Y7z;WB&(t+Ux8ij z{ywC~@RW4y=k@~>Rr8pTmb$u=7qLo2Vpes~6>g_ENtTY7^pVeIg!wVc`DUmbY|`3M z-R+tCPAunS>R|zng`6f_20?)pLm}bSq%ja@pW1*wXr=T!IW0oYP6_8+GG^?eKvEc| z0FC0qr5|LsL5JWpacSeAuHLx1qO#F6G*`!D4x6a;L#0WM=HD&Vnsp=Ye)1&&^=NgK z$R=p#49`^kf{*a{V%70)-|osKU4qK8u*Ee`n^}AVgiVqOGq`)`$~)h-UbZ_TpWn5) z4AU%KuIEO^Hr5rLcT?KcOFj<^6-E5p*F`RXe_*jNQ-<*{pcs{>ypy$kvv5&h_=hdL<+0wfo7i8Zr zN2QPM2zwaYFfOrCFU7(G*GymiiuOMUH#o1w-P5{_<`RmBx9=5gvCW1?z*U9M+@ATPF1Psy-Tq}n0&H9|(XuzmZW30{I#a|z_}fb*J@}$Os9qoBgJ+y# zL#8>}`N|}X{(N$J8f*=>O{m7)%z$pbzMS2$yb0xce}L`230Nn-UPkBNZy?Asat0>M==4pw7^P*~|GtzfgB9oEz zSk=B0wEed=|Ip)4I}(ZDBYlprm6N!l&1a{)JCR@4>nZ9els~Gu+`<5ezJ3A;{B3`Ck6-7#p ziFkA{?4$2BcHuw~sGfB+sGG>sgP(eW)M^H@39}u3uf^6HSPdw&q^1jxpusc>E1p9-Su?Z)!3+F+@GwHP~|a`e`o(nklU0c z$M)W3BB{3Wn$(JgntlTNAP(iL>=b;wqp`!xMfLpa7@%+oG3L2vFv0Yd{WYP^a(Nq8 z;2jw%*$3xNJbL7%aTo}j30ZXHpm9k0sVi_dl8xNyUxDA006-~CjL%1|Og^BvD;u`5 z8eUsPX>1Jry+fY`?0PYEo<6g2_UycjSnM=1^3)pT)`AiKgWBpcxjSg3%AirFd5eP* zjvhK=PEj=}3VEoUv38N5?p1FxcdB>$Mz7(sJzqFUM>lEr#N`oGvZQdU_A z`K|dEXc~4j2p{1d#j?jW&BI$yC00u2CH5F#XOFeDJdb_wrIAZDw(D<$uoFNSLNQjK zmiC)`+pCCs75<1NJK7S?oxlh4Tt%Ivo^LVH@gw3D4)|DOKg<>hv+aNnO=o?qd) zBGw!;7ZuIzay6nnEQm`!NKyMPw{nUUXT~md>GPvp*Ji(};@O*%38?IVxSFTwda8h& z9P2K-lj+LZ<%5qMIw`qxMMTPc z%1Ih+=0rkm9R@ptoN^AtL$sNVqokbv6{Nq1?bg%!*-vI88&j7m`-g2-c|Su|XmJBx z42Uub_~d!tp@Fbl(y`29x`NFGQrL6X@8ZCx;)-D4k4cR9IoeQM*@nMU9Mcy3(NVPh zf_5O8k#(#Tw=kX}S;sXT-GpXIvnQowOrmasb{$NgKNzM^`;cBQ=W!Z=VMcOmH1-K5 z^bm4kEA0rOiCv@0Apn-2k&-3;*9MhJ?#( z5?H^2k%5!&3qybCk7+d3658c9fRy__w>T(QRzEr z6APC_Hl-})SqZ!%4*dsbIVE1#BJPv13iV6|Xed34s`O*jDYmyxsWFar_w}g$gsP-F@R z<>#H5`3B+f=oWr9JZTL7Z{APZfW5v-+aMO7e%ivNM-W#S?|Fvcyr?2@iI$Su+QJ(8 zq)JjtA!jdwfSsSQtWg8*n1W0cSx?;@IDH_LVuf6GBSq35qz-=rbdpafaqtpmaJkD6 z)FU4N`0$>ky=urSXvZ>Z5+CCcp%Qe6L{{t03OeZ+ zRCbk>BIWW0M0}3H@E=v2SKJ_R*ZIq!pRh-^0N+(eDiOZF+6xCZvte(X-r1bgx@pkv zyuQ{9&YI}0FuXVNd!Ap~T&FwUkgPRr@D4#DMnvJm1tLU6;X~EEviiyPcadF~p;X(( zPfbc8;^*!TCu>?d3D>G!=ToM}c5s~~nAt0=*7w(iu|XXp80WJwG}1joDxbSx$aAHK z_4SS%_W_33*4oH7igJ$!EPp1HV0E_tW<^(9NXO>(=o@os$07H+%tEmGFeU>MmLY06 zM#|ETy5I{ZDk;tjza2(WL4xUo)ATh)MsAvybn+I26<_Ht)DH2oGS;c^iFp z4=e6_4}OiZpR&2uo*f!1=h32V;?$GJj0|3JHsw|;xTovqX6j}6C`D5HN!C5e+*J7P zKF^L%n<_W(?l+=cLx(%qs`;Bp2y!0pTKzjaegZo4s`ypoU3=-CzI7%Qc0MjP+hvIs zvb;zY9!)RL06PHqC)}A{LHB%6N+xzQphj`@&{1BeOL{q2x78AOd_f7I+j_IvX+|Vn z;q+Ntq*~#0;rD1E65XF4;rnv1(&|XIxp1t$ep72{*Id~ItSweukLcT7ZA-LpPVd|} zI|J&@lEL%J**H(TRG(7%nGS6)l#a|*#lfUcUj($QIM!Fu1yHlZf|t(B?*%dvjr||y zmQG$R(Djjf#x&R_;KPYt+psuo(YjfvRY^YCepUr0KHi`K5E}HpQ}UVqa+|mpE`Q|< zdhU+Q^%%w9`tGj9BKCBPd)P{E&^~Nr7WBf7rUWVMq8{5g_b0ORy#>P_8@k~pp8sm` zAK8t57^DN6D~ln!mx3!7?RnjSQCppf;A@p`!|uysB)zWt0wEJ~NP^3@9h=eFIzj}u zLin3oX0!Gg7N*gAUQ-kEVRUF2Fm*1dw5V-Uda}wp?rS*;JB*a%d<;*zOP(|x(?XuX zT@q#!3@qgxWi@Lnx@t<=W4YNd1RE{H-DO3K!}#f@QS$BNWln5GJmy1GJa}{u+9e|K zO1UT>v>KSj}% z1ang#sQMe>iK-&XnHp09x5iB-ZOc{map*+J5@myMGiwFnRd*g&rOsi|J!C!Hu((A; zk{)gS&m|={yS~CZCVsNh)&>Us*frV$UMqb^bB81yA;$E^JwPt9k4NS5IK(?4EDb^A?E^z_xMj%`kfHxeCO9B#{Q6c ztL=4VCp>ts_-;MHzD@d;1d8)z^Lxwb+b;Za^}>>?(vDJ)dJ=Iw`O6{ zuC-%5D~vgwyL>QxiSK1c-}xkG{zTaJqlTx)N2nHZ+MvhzFKM(L`;XO2D1AhuiWvQ`?uM(s(Phi{U1pa_;IqwzwsmyrO{H3KvRCl7LMSLGWoUjP z$oo{WpJ<}lz@>{WL$!+Q<{hhlP|KdeGe`AZPv;w?o=@B?_3SHT1GjI4PEScrQyH8r zPDPoV{+#wyfE@$V?tuKORJ!R*uK4H84tF{_%-is=TMLf8!&|N1cAt|vc$_3U9X+bX z21!M&@Pr@ry9YoEg2S&IWRFo~(+%E2_Xr~IJZC(CXIR#Lx_2+XtScM&FJ>bgXf0FA zPfTyb_3(SA*w5%HLA_6fMi3xkGmXe{AahG1?v7F4Ylte+sgNx8yGLE6p?5b;zPAG&fcXYZRYmHY~O|d)^ay%!^0=f^?4r>4fNSZd(zC^9ro6d;5Lq& zqu+6;__+p}fb*>b26D^6eI>l%CJ;+T`zM>Jr#}sMG7K%OC?p?w)hi5GGJ05ziOq|! z=x=f4L>vZjEx~HXe#at~R17>w2uJ$!_`)8{^Tc-jR#Hi?jt-prwCrGgGn#3hl24dm zldosg>kw^8#goKcCK=*+s7-U4()3lMoxjW=HnQ_wb_FGqw*!nN`=Q7pBfaSk?msx9 z4w(l2)N4*{gEFy=qg~fFvk7l)fU6LpQTCK@WSvf&0LmzTGANW1@7+QJ3`M+dc2Y8y zt^o_&Lq1iu@x#K_YX3BI(R#bD!1=5b(kTB~ViL`hpz<*}?a~GD5=9I1B{L1C4+Y!A zA*Ore{`=ZUFVl<2uCxSy(0t{=6&oGBQqKe^J}Y>^UK%$EpwlXMh~1Xy6&;h}VGTdcm4+@ESi z$Xo1_84wSsl~^tnvi^v)!MfQFLhjh3Ay~l%t5k;|Spz?SolNM9aJ`XJ+rE?UGs%Ydbo$nb(!mkD|0>$yf2HhWp#)nthTOk*s)IOEU_qIB_MT}8Gv7w z)1iert?Vlq6I<_FNO628gDnvW)ha~1@FnX@JdNItDGO=wkA{|iNP-4H!meaW;A3nZ z*tb~SNjVUMvsZWpGORQw2MXO#j{Y%0y?P5g{}7J&J*BzZp3L|uwdx2Ppq%3F1EY>m zSL{U_Z_W>0&M^inR~kA<-my?xX;qSE7eM-kG>l%7BZ5mn^}%`$CBimAz{c$w(a%;?K4-_vd|h6H=}23A>@E z$ziyCWpieAcE+IVDsiV5^Dr}g5^v|%)Zh~w;uiM{jvo@DzuB7vpcATzIOvzJMkSIt zf26$!EdeSgg|6AiJ*vvTq+1hol{BA7%CN4P83r2@Gmb4!U~TS%DJqALJ@oDxrw{KV zzl@mD$SYoAB;sNOy?`=l4vMHD0iO4wDUDY4$EN2L3ng@)bsU^EZv5b$e3}Ewmj0W$ zGwaO3)M%7dm31}_8(ODTfo&ke!rs{EF#%p+z)O;GFw6Md@=BFP<78(Gb92!|#_5rx zIUId2V7&}LdjT8rMnpf(pkPWuO)k0vo5X+!E55DR^6&6q%s$++q;!;_q-vC3F_M4b z=gR_=C%tuW@`w`aK_{OFYZ`E$WhRj}ezCN(+F`Cp%uP7I-D0kY+|3B={b0ULsgi_5 z^_7K3#>9=Tpy%USwd7)uDGU`1jt;-9T9Z{7(GHK-BjMzSDdaEJrJ|(e19O7=axuiqvckscp64zgVR@{C^ck&^ER#d^@CMPOP)^kX( zvBciKadokDb*w>}3Yf$hgPs?wM^iGo{D8!nZOmF2Geaz!Z#H=kbC?2R(AY92O@8hC zZ9aXT7k0mUsL4-RG!BAO_;t3iI`KBfbxhjQ7 zE;Ou=mhw^wP%bG5sCx1Od@mvWIIS9S82b`Uff+*eb1*tC3mbqwfsNDC!?`lWaoCHb zEK)M5$ysY9F~81=s$x)3YKNzS$}(n_LQY@mSHh2G@bP?taR4NfT+$7Ykzuh+ogQl4 z^q$$^2ZB&A;qB(Ki2`9a2%e%j&<3O{K<;2o>N&ClpX;R=mq;M2xa%OMq^EhT`Er{N zWso(m2D#g%AIvd5;EJt}y#Ue{Y1YEqk*mK`GzGvuApSw#%V1SO?o>+OpM3~a*G|(k zT1ek`jRH@W8PboCmKYhoNq&VNN*NI8s81-U1K1&KfAe2MYhbbY~k zNxeYxvAEWJ#@xYUxwn)%p2xJdw~Zd3)l^xq?ERE+_hq@5VtqNoo+hA`2E4xl4VA9j z<58n##BL}in6!*gpoQ+4W|_icS=XlN=T6gG`&D;0PE!9}oizRS9!o&0e?Q#uw54#z zi4Tl3c}EV2UkyJ11Ruk}HT5Q6lJO$AV58k?a322~4l@s*CRw9nS z>j%EC#ja3R5pUnuw#p0;V4zy%nR6WJo~H)`uAx;!0w7z5CeY{A2(anBn-I6syH*Qe z+%%=3LRx8zE+io$W`pUMC?~j4&VzK>*an#;@^^E>zeK3=XCK6;u9pp6rY22maPvLl z`z&ftU*4?Xpf%&s?A@LcY|-La|I2`^6(e%NX@~FT%g*;q+2P%?JK1yNOM=_W`azLU zv?5hzA00oO6k_rApf~mM&@J+%w_k<3yoLuQS9sH%GISt?oobE9yfUd;ke<2SPrHRU z)9$v_dU#qc?D&aG@9n(%3;oI@{x+*p0=M!i5?XU)S@t4yv&~}?oBj=#>FAI9K2yY- z)%@LA4Nx#dT-f~umG28ayK;YCt0Y1$5%6`7-2#SB3K=uJFp|GV1QAZRyEU>`Qmsm2 z&fx!s*q7P2Ek_1M)KZOXi|5bnf>I@&BAmD55@EIx$eQKCTM?btfx&8BHK1Y2tgkfg zyS>9(&d_G=g5Lh`^Y{U8iJ%Z8iCsK^^ZU<2R8>x1^Cr`Ow%}{^W(Z(Lj7!85c32TY zSX})fwa<3`c=nJ@deoQEe}^t}7q#v%Qp&EhbNX8QF73Kbicrl!e)MJSuLn*#9YzFu z8IBvPn#-rv%m_c2r5L1&?V**H_OCY3){>UhI{?5o6Luq^eaNy`VzVH=tgX*SB;p;u zXpnS9vfL>FBveRvCG8K(t|m@e#y7$8AMb7TcWJ2zpJ;ff+@j-f!M?Md{C%|N?EL=j zq7)69qnr9+(`pngdgxFb|JX~<$JFaqlwAK|H)JX!&f<+A_1usw1UbJSBjBiwDFS1_ zUkZhZB01EPAeBj6Q&t2-d1GpIg z@vmFNf-Rlrte~+O!ehclveAU*))^3)xrKm2m@J&(F;67BpYFIdOKWuVGqY{Y;MLAm zYKcgz?DQ2szyOTX8-XDED*~~Y{5Pqje)Et)n2h(MK=^TB?SfVW>iBMA8Gs|eflsc% zy5s4YhYtd8h6iG6H}m(qj67mc+Vu^I*V;qr{mlJKjJgS*2v)1uM35IpQL%v|{(kH< zrs}>E6Uz)#b}aH2qXRbloOwx15YCG^)Xa3Igeb4KE4j(JH#%3Mn*yF(Bh~$1wEiQ_ zWpkxeyVL?*Q=yBJ$P5>EPaglkjsEBeI0F12nCY>t(OUy4uOkDL4@POv{b!wJw7laU z4}L1ASUHdyqOUnWBZ?_3n;&Cgh%BWL^SK4*$SmGDhw(DQWT8WQJzlR2{i%4r?bz7# znv`Puo^{6X3QCWnH-1xDO^e6`LW3*!x(#}UQYb^$mg z`TrJUaUt75yl^1#r-{J4e^3cAl=I_Dr=>xwm7Lg7C%(`TwY*BG#QR26>le0+ zSjA8Kpk{_9Y|)SEY2B|2Lv-Cl3gV+L#6O}c!&g65jJ@HknlYmzUS$?;sa(dF{aIy7 z=>r`$X{U0m5?@2P!cXZRoH>HH8_3W`dWy13 zce1IF^&L7{DkW(g+eI$1shczxU?#d?dON16jK6flt~Chm`~GAYEV57P{@Oe;9+#Oq zkxXR@C13kLs=fg@v!H1=+1R!=wr$(CZQFJ>w!N`!jUP6r#mw2MMX{-)F_Sgh&vcW zKE{vkxb2N=1XV@_rK%6?*bjC>#k`8`QL88_Dn?4u*vZML5knoj56%U-t0O0_fTM<# z@yL|l)s7tseqKE@4)zPbaLr5&?X}E4Ot8k>PY-VRIH%*kl_$W7(DFrMJqW(|$e|aj z<}Z}X&QMT1GGoQQxSiMf=_!b*(=4>4l#EcTp$czycI(KP4|gOnGO6L0eDozy$`iq7 z+jF{tG>&vUUYR{Kr%9Lla1L*V;2bn1ARfY9ekHvww86i!>4)o}QIaNG6vxwoJBfN& zTG^klmW8FkoO~!yLKNX`W0QJT@pnWPD={ zkDz;wyAkm}F^IwL#dxW_h}LWVc2CV}$_(NXmvU=bO)ZX+l$cV81cR}n0(X4LGVJf3 z?*69|d6rTpKAe^X@(o*wwl|!et)4$unl%-wC0oil(%97D^_P6jz`wT8$Y8Eex`Ri$ zLXK0kqAI<$(RB^aT&In;aa{9*fb^QA#6{ZM3kUoC4I9VH@~zddNKFi2!)|z0EboNE z{ia6Q1z_Y(3Y3Ly7U?{jIitwcPB?I2KkD#~_R13bhc1oA>E=UoNp-Rm^(^Z$3)D+M zBP+9fE^}*E+e~z!_m$WpyYO%_fki#~;DgZnT)#X|4zIP3;zCXlDq<`sXKAaI$LZQ} zyyr@+j|I!~63a@fS&NEj95t-RdUCfMVvVfzMYuT2H}=XOX8I`FmUKz^F>cjo!0k5Q zF?s$VdCpZVq9&~-PfUFk=~ekfUT!72%3sepTk&V6s?>ZsA#WXBWxBkf%zOn9l{e+T zyM|jKz1s1FBgTbu558xvCcama)nrIOB8fOXl%v)5WK^JSqX?#fTc~k5;-d zh(_Pd@tFK?0~+T@Iz9|(X3b6@M??0LlC407cVDzsbbl6>4~eXM1-5VW>Ztk*qTzZ<=h~(g;x?UD>*TPzg327N_qACmOb5l z^@;AHAh=}YglwU6tAbT6ApgiV*B~yXi)m!wUxg2!t8E~ zmiQ;$RIsLL$|H!HI~>8zo}XYOF3N>af&yprcg!_FIHf<+vv$RD{(%0TM>ZN<9x@MX z2+xwNd+uQ|Y`tn8I*GHUX+xEXotm(v{vvG1!!eN7`0KCReg1}Gii3Coe_4@=a;|NC znt+p)%$|a-rLke|+O;%oij#`fw}RyKW|eu;J9Ht{%7%L9JTpnrS2LjFSNIGp#)`I0 zXh`y^GS%fTg$q!#{) zC3`wacCX0}bd!Jo(AKHbye4qa+h8gyvE}Kr|1G1cA8Jg2Nk+DBUvzl|ZyVEFx*kru zTI-lfYI+HKIaSrrZ6v0hvuMLKrJGX$8nje|F&>?Dary8wZ+8jGzV&@ zE-~nInmW6Ep9@1VT3YQjx0*UO=Ps1~wI5IAFxM6<(mK4WENak8@3mY5GSKD66sm2*H*yma)O0?)7Br`1`KeHi86a#yotkjM!s%JhTraYdP+lfcCj4mpTL=a>KSHmtd)aGkvevTSKC{ud zobS+D7KMna$Q}BYHAA6dU@!Rr7)jPv=4DQ`XJXcb#cPuWh78?MNtQ73`71@!K(xT&k9 zMuP)~u=%IFwfGP$jrR`N|4C|9B;RpmzZ1AJYJfm=ly&Tp;D9d` zy*NdJYGnPL4-YR)-|D`r4~Hs5yT^a#x69-*Ix^236v77`Zro|dn&`rsO>J*}k1mP# z;tG1o*fw^5fy}5-p{{6wZE^jWBv*Kbr~+`8Ah>6*${yA%l`d9v`15!BIw9BVfYaC9 z<~*1=*RymuE#tINYfUvTv2dlN_=Eup{6)VHL4SfV(M7W7&`sLY^C6ReR9Rv7=@7%i zgP(+ZRY1XeZqZhR+7uz|f=*)v?ZxTy&A-mIS}jp#8r>)z4ulp9oV;^==msMFeh9?u zUe`TC8bqEaKErcGH^cO11Nr{wFX`Wvq{3OaWr(X$!p-So4Aa9tO`<#mS}lg5go-}G z7qL_={ySe4y)Q@36h~%XPegs65PFSnrTVATTK8e5b4)yPlCx|=sfx<-P|9pNg3T7% zSK{mNqa%XXT~v+Xv2puxdwC?4`ln9%?ClYeXt~8m2~?qnLW3Pub;*sxU4>FJy48F-(=`E7>< zN~(g}>iSE|%k#1=;(wNx?MCj1CAHyk1B4v@j9CX0i%-9WKLkGfY5bk$gd)Ixi+r4d zb3YO1Sz_u0w`4&;oM++e9mWLCTiLZk`)Ol|#i{KF9(DA-NlJS6UX|Ut`=-Oi8NDV^ zkA3{f*A2gx)11?2#&w*QjYe^mxmT`#oF#FSD3jRV9oK-?R(R@_AoU@#6;UgLd2+2D z-KBSQ9etULXa8!;*1M!7`Q77ieY5#*?P|Mzu=^9$9@F3feϣ%UY8`RWp~V-U_7 zDSM&-@cv_g11tXxtR8hhSsvhbm}^TIbEA^ zez~Ise9A5xP83c_%z83NHI&u7X>Mt9`pnf9TVC8vDso9r$$%-f#fu6f@a*df)uo-Q_5os=ED| zcEe;FMSWSJ&ct}ag!R8s`bGUZ`f~{uR>BX_16UIZu3|HQ{An_9v zHp7)lLClDc62YY@VO}JkS_2kF)MYGEO;oHS%W;YuDSf29meyQ*kC&Q@D5Y()UirbQ zeT^&uH7^72nS2!YD|zY#+SZO~YV!l{p=s^XHa8fe1Wr{Ir~lt? z&T9&mFQ)1Obn6G9RBhN4O5^az)h8(>R7Z`?G=z2B6om`t%6fF1Lre{m0c~K~0 zXZ`%Asz;D)&nPl8w^z!q(xW3qYNIS&^j=w1)?4pd)hsHQJu%L&>=IUNSr-?V@a<#y zTe$XUE|?}yQS@G4Hzyq}NAYok$^v;@M3G?#N~=Lk0A7LKEyo$`IGn`T`3c+&xhE&g zGUdOb(GqsDl}c<$s___$V9iP|P`$KE66Ka)!2y>Q0W!(Z1+^C&IwAD7-&RKDm zn@lTqPUJ4whnly4U#AuBOX0`y@9}=T_iKqGj)SrPBvyHgUX8{~cQ&n$YZMhEYGih$;=(NLFnCA; zJ<{P6EViq3GdR@A0F*j71H;Z7rbk7w@|D5)fHG%I7z!A3i&zoOG}HN^4@2Y@zZPW8k#z-2^|-~Kx5rTa2PJ#IoVGbx9( zms$_6iSdGT;U0f^Fi(^HUqEObfHCxveHQQmm5N68!ya{NsbpQ!J&T!=K7H*BqwI3( z<(8F_S1t|R9X3GYtkqCkY%MCbUS*P0tD$w9$x6L;NSmOB={inXdS_%wItd~9g6P?q zbe5ls)xwWyqa@6o*JRjjFm*JXA3Z_f7BV2Q zr|8x;r2WS3q$)JNtkgct{V{eZW>(nSUAP3`gSGb@Ta068{O(62Mo>By3C4Fb0xq|f zF($svLG@T|?ZAQUbnm64rqnxjz@vnk*h&!BzyCpfWGxn*q%`b!2z>QlqgEDaj{z0qttc?)(Dp;3e z(yy(@YjF6%)!PGZ32TFI_{e0?Tr)><@Nh}%lMmyo%EZs_SFe3u*|%^JhjHJ1XGXjI z``I;gHSp+U(PI(CA?ZoqXG6&?-|KFNIGgKWj|g#lmAvsh#qaePKkb)vfkVD7B!sBr ztwrDIu9PhVp@t9Ota(3qIW!E{Stq+;x1M+(GR!qB3mdmJ6EZTkf_M>gnYyV*G~{HY z916Bf_&5)i%wxFAr?Wy1r!~*FqLp^99NyPZ-4ZHUy`0AUEz%0+bKT6;SlXPy5^Tn9 zit~>w<74c@=Of=s&C`mfeNxu7BhA8zZ8aUPGKDEyrHnjrw?v_#{)nzNg>MHveY_6& zIahSkcjLb>)xyrl4^6X;NEoPI)mVS-Scfz&*j>UtsLUHUf3vOFe{VM$n}31R)1_Fa z4wRr_VWG*Hdy0v*FC?d$Ny$k{ruxs|=UgZ|Sy?quvZB$JfE;70t4l^6I!Tg}>eg_Y zhK81qii(yP9MQjwa+ZXOmOLc=wpjZZ^%-&YDc@d%&LQkEUp2PM-s@%<^j>Wd*zN{m z`uIvD`cpvhgNaqh?8!Rgu94tEplL>Qwr-K^bDvl+D{FmgJ(tCsl2)sp@ zO8+Z6RqvHilF0dRCY(_2%LY>mq<5f&S<@pZhp;K@gL)OlJ+wIoR9s4riQb7G*E(lM zT`eb%v_6o2fW3}!gLQdyB7{*2rErWtZ}2<$YTTn(CQ5@*lC)YA5dw-p!l1x?Fy_?9 z3leg;vQHW-#<5G;K_a7kIS|F5x2qAw4Sjry?}hr}BzXo5(-a}1Nc2lv-Ux=7dw_`8 zr#XGH9?Vo})J2ws+jH0iX=yh&74q$+tx?E~Dm3uC#iso#%yxrgdwQ4sCaS#1Ba6qP@BDTTlWER; z_Nr?)h}&+X`Ml*kd?vj9KHR?7)+4QIjnxNdB$-4<7JHBLV%V%f75QVvg=?DA@P6oP z6|+Cm*j}NeBB0y|MVZI3d#*aVv3lH!Q7ug;bw0VX0C1mpTVDuBU-JlZ&L*CrEx~@g zvWYf!%l@HoTQc76+$Rpybh9IpMMRVsTga6ck4{C19$W_b-Af|r-k^#2-F(MyP}23< zJMWV1g}YafX{Z_Rw!3?-w2Q@oq1XAOMa^scf-SjkdSwG>qy_`I@4l?3=ytXtN6RU2 zRZ?CjbKpA1i}Nb`pyH@hS5vF0`s&TH$8A47t|iq@+0wI3nn-*7ob=)T!M(+ruye(< zEom9SCd#4heQ9Q{%npGh?2m^nPetWYjy9zv4ia)CrBY?wNlG2o zo#y=B+)MHX17`SlMY?qZw;;hMoH1JbxC*NXfq=*3fcaLt)%B_ci+Z)ctA0~lZj7Ga z6vPCw82$QeeH~s2j~}m&FVF^B5Z#nSEA;WOmT~aU%`JChOSD#3x0<`7!@a5b^5klL zE{Z37&-828$DM=l8@bj!a;JCkT=(qSYNG~mYkT=r@32~Pp9^&Xo0jSK~pHT?6)f?A*>9E846baRamXh?Tkxg^BjK7qxaHX5Y=?%)&BTXb5Z*`A0_YR#@MG~i$G&mDiVqBUEQmb~ zT-b4iN)tcawMQpfkx7NKEy1{U4Vn; zOn`N`SltDeICuwP!4I|f=KE&G=pA?A`qlH(c;DggP=Hm>jkJD-jK*C)#5xi`pESX`hO z)^AT71c;{_!-jQ+x%G$xqtk23#8vBfe!c#pI5j)(Ml$E{L-uq#7#P3Dj=X_A4S*3H znBlL^`de1}*(c$r2C$6jPAg-6!zeYxwbp@XvS>GY%obNhzgT{!V7`!tha) z-OVAEZ3n1vj2wN3s5_q~K0zKsWlI+qA)%XFSW#i>btv)AF5|UYK=>9Y<6WAGKhDm9 z>~TM~Vs#Y8lnF4USHyMiR4{8lyM^>Z)dfszO%?SH*J5wT-p#cJ8(>q7#3GzJM3d!F z)-Za@re5UMqQu?&n9LL_mJ&?!G}p(vhkYsK$*YuiBRNhjbc7<@KedR3oRvOw-kVSZ zvNJxHu<3gx+=T^c628Kyo3L^%6*UVHBMCbNS2_Jlr-!(Ngw;HidJPwcpmr&Bl;U59 zAB?_`@FD&}7<>qFe0pDef`=aa3O_%Rh`BLksk z1{srtza=8k86*=_O@dPgt9HG}|0hh)8OxMT0bAv-7S4Fb0 zkDTdD6%FGH%Ue}4h>u*^j8xB_GrG5#lle?4ZT|>P~W#{+!GHsZ*!l_U6YuunTFV9Vtqf-CEsVDxn`5_ zegWYFLHw{L|BwU&fdGMe0K@i!pl&e$0rj!O=1jNPZnS(7m~FJ!;{0j+xwhQ_1~U3a z05a}_tpl|I+UO&6fZzNz(^vM}Pl59UBL=z@EIP=wKXq5@hQb5vVDO@jfd;{P@VE}| z0xY~=(gD8rGvaO%D4&jJXmxC?gP==rw>UIMnZNf={z4-^_zT*Ix}^-jB!2k zsR-f(%PW|#fZ&86H7muGRa1F6?9pIhm8d1o)(~P9%PpAKkYJU7&co?v^T_d|XN>#) z!3%Ovp#4Gk3#VVSKe7Ntf`SREr>Nwd-~$rz5UQg@HcIOd^R48sza~N%YRAc*PdML#BJHU% zJ4#DV4c^j`%%U_6meXa;{077Xkq-yUny?@_RH-3I0cN|8tC7J-Yl^_$Rx=_&M=_pvWW=AIentRL+haM^^M| z!TJ`luzS(QKo?tikn2H_8}V;H#ebuMG_;kI2~LHZbhVRt6=mpZSrx`hmuKFx z3p~}OY^Pl#R_&`Tvz(4^{RvRshVqw-X{)yH9 zEB6-L=j}?Bvia1BBkGmEU6oSnRJ0X5#9WAJ5!^$}`yjW`GO}i*_erGV6U72-gx>Mg zW9BMOQH5LzgXPRFBi|ThsvX!{k@({FMf7vMm_e4Kum+_J(dn)Lx?}A7A200KY_cH& zZ?wkfPkq{|_yzY9Mp{DUScVS29VmOGc7M+9)y?>8m5*ZX!DrXh%3k;_&I`f^Jz;aa zG6fxC5KR*@I8v{~$+WUL|Ow zdm)QEgfm<=jDTes8x>}^Dn@G@!Z^BWn9Ycf*$dbtGkju9OVo@ zN9JtXndsN)ukmMZ%1Mg5TXE=SLrr7d` zicE-1gCh69WSS7B=|11x~CP`}>r@j8`xaL>{FyB{^fQ6J{djI=f^&&_Ni6`plZ3X^D3zfCZpN`I&8SBNX_9q)=j-Lf8 zYj3Tk$k~Cdm-m&_^Hkc^D`A`*;amMNkFK47Q+u?<4Y#Q_%qirCD5S5q7wGWybg1UW z$zq7iLKXIoVfZFiSM=*s=+hIaizoRvD#CpOAc7%+GWDghfOQ{tkn;%--4Rdsk7xQ1 zgN;yU_w@wG?XGduS}l@sWdStsu_z{6;wpta-!bKJ1NAzhaD3S(Z8t)%dEs)kE+ZJX zn8YzdzDArt7?Kv}*9<8pI<*d*u?4C%O?XObZYL18(V7*eHk@GU(b-JnjL1;83=vDO zb;;T{Zg#laRQT$Wg#f8g5vXrExuj*tA6dXNu?im;@qC!!En^%oGk<^`Y5@}S?vGnV zm-(nUVZCeBf=!wptO)3Hfz9gv<&t@Q067A9>=;Xr601f*wx}hVjrJs18=Pv$yWBLbvBXw>nybvCzqLC zIvrQL3rJLYh8-HK9rX@x*;aZ$M_Xqe$PWEobiHM zan!Ew`Cb1ABg@_`z-Ti_x(?)N#Fhiceb94=| zCK|AfQTYM6Amb+3f%HP z^V4u0z!4aj5*Yk9nldObupdW=d4v&@(TVAIU?{B2Hx}l~SJ>@fP_{27JOjnY%M8y! zFSIc9J%$(=7`=%Z6NZr7BHnsLv&+2%b>kD-&{MgM;U5Wu%_=ludGG0P;EwJW zw(-;ih3{K>ko83AOA0DgEede`#!H=+2LCmb%YhpN|7{bPt;+fcyrUuMIsZgGWq{iXfqPthbyUu9!)+ zJU47kLMuMCbn6s|E6}bu>(tIG0N>CJ@Q1Pr-g*MPj?{*DqyMSS{34WyvLz~O|1T(2 zL!vZgEsOg4iI8i%i@K`0YFUfAzVi_26`4t4@Yc>Z|G;(e@^zj z$RazYfEor}cw|BSH0p1sR9{H z5rKppn$OY{68FPYH>jflNo`1d5gH7I{M`SGey=+||IUHXQR9o|yI5~A4_rC(H ziNr(c;DY1}bfi`lQWhNvTivA%hIb~>UV>O*vs~WqJra`4%34)gQ6uu5Nrd}@kHYv9 zYLbh=uF#=k5vVROQ>1en6Dca%))vuV#c!4zxpn!=w5MsUA#AfLGdLllZ>os0SP!nK zGUf>;|Jv{1!@HI8m)2JoqbVhd({sx;Gc2P>wrloU#1#(d{Nas#BgdxI^s9)uBt)ia zj2)`u`D3HwLNo5h=+lDJ($hi5Jsnrb*)+;tiWerf?GSdd)}TI|C^nUe1fMU zzfJl#(}0yS{m1j&l~1x4VgC#H{ygyC0zhBjy>E89|ET$zUp;$Yo_wD9rnt914vO=h z8n1c%Fg^%@8mg8@?$*t??Ha4AQyTA5H{7(vs4cN*@=O~5Pf3@p1hkz~1CXK?M93+i zBqXGkV^Z)=$^k*BWke}|h2YK>LY`dmskcsyQ)qfsTllME$jy-N(`S^_8bYftjv&7F z8Ads#u;?7ay*K~W7YjgFIz&}bM46)5{8eq*q3tkjjBQz9Tcgu9bLK6WQr5IK^k4On zw~f9~hp|WEiNtH`~g%s2WN=~vDAXev}Q)o5k(7`1|7#$y#ymJcr$Sy=QryTHvc8)XBDW+kk z7<8p_$g1GU=lWAVB5ZXR!o^d@Hd8*Vj7zic{OJUL zu*i!8;e3v#P+SpiNyT4P&D~X5{!z)^RZ;y>(YILzB1IicRfSYl*>y?Dc1clpNtwD? zO}kl#_f7G8LH@1RZ&~28Q1DGP z_%SQ&3;}K-54)z9MF>J-+OC5F84oRYI!c0vZBCl;q&j^Wkf}{e+uYhFxOy23Vecw%=fq6_;Z3X&;HZgK zY1LfSvQ(F;Hgl%UT50E6Rl`~r2CLAOW?%M7?g1<_MXExofEv2@z5Tuk=I$PiN@D0s zTfCdy!%fImrCanX!RW^jE3Df(1~OM1xT6oZVBbYRj>#wnO{ zo|+`GnVs#`F*RnXWG6Z8b!I=lCcmBJoZChJkMC7wns_p2^7XI{r#*n@IYX~B!#ogR zOlT6gAq5M*#~BrBdd$~P&FmZsKbSZ$9_t8WL_@A>Qcm7P$w6x)?9-(MdAPLd(0*S zkhr0RX15y8;h<;k5lrB8dc^NR2846F>eFVcY9@g1?Jm-l7o+-I%+nqdHoCs0&}=s> z?DXGMD8-uGUnTkbO@FbvT41f|(#}Dn%xFV@>_!_`*p-PNbJ^_Xbw3qD_K;Re=fS)R z_e4U~4iu!8cSHqGU%!EHfL|Ah)B%6n&xq7MGiakN!FG0??PMfDzD^s^sOFsEtIMRE zV4H;eA_%N{(s|;J;^}xkIn1gRm0tQ`$=y&bOnhe^l(^;DZ7OeOtq@yoX#4$;G^O)LQ=g=q(@lq)b>A*=H@mxy1J=1&$=^A?lTO_)l#39YQ>8=k^ zm~&c`E@4bOQGyNNKrF$Sh~dLLVPP!6y3BDP`#UzA>@I>0Kg*Lx_+7KT=$om;f_*0EcZg?l*n zX>l~XdwUjs2d6Y6=?ALU)`6ast-`jVSY9kFg9XYb+lEo4ZL)Gd#>Qpc0$t~2!Mxsk z`973z41*Q_AUwwj;u1XfJ_T!B`yZ`m@4jH3vN$gU&sE|W&*UA@enDVCMIfO5ttcQw z&|P3YpnxpMnl}zXU;{F-NNCjwaP91JN3!W8P{|Fqi^PV}lvZB|k>XffE+?6=4wOt# zY`Gjx_q{|KPW76tHd6V(PHws@UWJFTyx$&u6~BKZ*yj9=WAYzBXuaq1j1{F~C0{Yg zj8?1Ja-~2y&5qaW@s!yPPg6dU^&Md0iW0NX@4opoq*35$~QV9DpFcPN^){+Vw{?Sin6l2 z;`R3Y`llrVF`z%-BU{$GM$u10*rtbz-d6PzU(k^$lxu`asFti2E0k*mi^!(5nxy{k z_m&Ga!ew+@UJqvr_I>$;gJLn*%yt9ClnZ8nOlJH3LefdKDy>Gl!BX0vo>_0a?kgZ3 zmCNRGz8WZ@Ub#IYOH7DzF(JZf9}_2xQgk|>?uPi2%j11}7M|z#dikgK%k%zfu(N6Jwh{(y%8})eFDrzrt0CJ69iK=NHI;V{+r*cDa#0yxXyC{;s zFG9~p?Vdi!(Ed|s<}7A&NPp|sTKDv6ulf{>4cEK3Nea!4X#6K&^4C>tYAW5>>j|6vzAEsWdBL!Irzul32428BP6n;xBh z-j5>ZCV&jv%pUen`nCs)oih!Iea(RjX-G;F~W5+~{MJX+Mq8nHs{#5OWyQbLN!9dgwk7DS!-P&l$( zq@ZmKP;a=}sQjW?tVMRtAe_q)pRVBZN#jX%IA5@$KkkyBUc^C85(;0Rzm7!q*n_PNR$*tPzlZz;(il~CDJR%oms*gR}8Ky_i&nk8k@OHEOulB zF$!Zc2i>M%cUvJmYW2NHG4xn7^qe!u?FJisln=BiFwjvkz{6mQ`bo#pLW(8AtY+i6 z>Xf^LNaije4=*VZ!HY(oVW$XD7tJHSZc_oLiD!TtuK$+72{{d}JNpg54Y3Sn@I@>| z7?==DXM+s>{rzCWMV)xs@}nmZDsUx#C&Eq88WLS(Lbev4rj~YIW^lbEAK_?L|H4=K z{-HZNu@wPE4dqrnZAchZ;H&C_6wY)&+3v!7#}76D{dNyi^cqbnBIUD8y&jeR;F;bT zeSP*Q`@*{(dOtY#Hq7?^nEy7e1E=MBm^WZODTc!=VYDcbO|Lf?CY#FVhR<$ukT#z! z6sDgl1Q7$I*BPXkEr4*dSyHjZU>0Y&48(wSy1=xu$d#IB0pNqHpt5Y>(=NdA$ZVW2 zIiq#pVdzfbv|LV1hpZBwfQw?ls~@14(W{u`I_83}I2`r|XoCf#;k#p^;V~JF2ZB^b zWDzb_O{!KIjN%RFf8M-cqS<8P%HVO!;1$zkc3b1ITch;?tRAg8skQT{ZH8B7)wUAY z<<7Tyz1$^EXMUKhzK>_4n9*p|8;%B|tRxw-X2AaZp3z_^M3ZmPP;avOfB|#ckB!%H z>d7xlkv=VT66ONLL&d{pDuI+h>aTn+^}hNqE~j)|f62w=t4V#&)YE+M!8NOqLt$R;ed=V(&BdkE+%zUu*e2|WOh&KbEFp<3FTBOjQ zCpX;rFkblx;J@$8M-1M(cA}hQ+oFdr2vvvvjOq^JUy|!C_^jNZ z71pFMm#kwXB&{YK?nzgO96d9 znhQcPoU>(ZsU(eentx@bDCGuT&~ncF&15hH;w#sAbmyXRO-5db`(!MXOwUn++L-sL zxa_%NS~TC4T(y=t}1I*7Xv9 z7HY}b#P->8Q3sw@DLwUXot%8iEJC+bHB)e$ueT{=RBxgsh!Ob1p-)8jX68vxZHk!y zLf041kwvK$7B2k5Ns!v$)wQ!QDg3RnX4M;vnoaR{tG^(mxG9fQfk!E^VlCI8uPRy( zF%A9%*_@DrSPa}Ei0wqDv_9Fh3rUIPxnYRmi&JmWFXZJPg+7+Lz4Pw009IOU<6aLU zA3%EYo{PW?5@n&-P(|^|=TX-iO$jpn9zj-{qvKo*e@zpr7kCTY*8#X!lI8gKzAQuw zn73cW^i7z18lQjuDA0ra;*qr0Wn$73v?y;sMh?S~tTH&U11gX|SPE6!~{hmrgr)BMD-fX)gy|Gn%k>5a_ z*t3=Y^$SP=^}vFLKp=bc{6EoT%sv6HdZr~*B`b7BKmo`@CKr-2MUDwnSk{mSmw7*<{BVX1;{23V3J@E)J+B; zfrGG>;+&tTR(09`qC~bEPfx(Vf&9gQ>iRjzUqEo+zfcg0!7~Kp6kt_;u?jNJLOnnX z_JKzjDr!J22Td86a{$$Zdw;!PX`&L82zx4Gslc&{>dpeO;BO6Ms*f}~!fc`;3?1Cq zd}Is}b4n;G1+$RmNboad%8*Nsfj8vvkX%#bLs@8LCZ(1wSsJhB#uaUxh^Z89M*$YGX3rW5heNEJ#Q4xS9Jru^T zhao>?eJc!&rAn53YC@-}lbQr~2+65Rmw0|i=c(+cqM?ZZmHJsvN6I&ngqE zTDHjgsL{O=>f))Z%f5`~qR%TMza0G_)-6x4g7F~xDbc&E56jeZYV($5XjYYBiJpFB z*0^RbmnEH`l^~ixo`Asj5KFKif7W`_`66zsv@zh;I(T8yIabs9eqrf7+0#U?3%jxa z=ZdnW^HYx06(X2M@Y6u7j%5`y8_o_~KKKtIv?wO43~DKibExZJ>Yjb-F7Sli@1G*d zw&dR9R4*}#|M4)`2!4W*{|Q2Bd#9gHP93H?X0>T=I$tqAN3*~7e{lI>_{a1P?SK%@ zA~u2X_5(5C#{637LvtW4bpm{(y9*H(v@+;m(gV=HqAZ61L};#aC}oilL-Gtz03ak9 z80!J>I=Bnq@IFQdaGhW5eU~?|A3)#vixeox3U-U2t^&TZkSxGcg4(mdF1Wg8_66o` zh;-rBduDAYSCQfS^&Vt;0V})LBv|7jkaH4liGPxbmL!Ph<7CKS#;~90JSBVP50lHF zn=S0LvegRUES%Tl+)6-BA-Mvl6A~po*RC!gEeo4;)~S8t`Nkp-V;X4Xlh`NdQ$(b^ zNVNx$p}46&lff=jkBTzInwONU^j&k_h~k-NQ?>{IeMBv44sJJM5>QKU)lk-ZQG0ZI zb9=TI%{O@xxgn&)3q;Yx(M1_Wu7x>;pM^<8&)oWL8a!)x4%M7tvV&cZRj>7$DdG6P2@M$3P z(#9RnWAOd6ntyJt5FIF6X}MQR_wa9Bd7}jT{14xssGw* z>)y%#3i3ym=ixe&HP2QaRy2PdC4_y>UP|=wmL)Q^&cZU$GoSLVW^otPR;K5XI&$9@ z-#Xsj!x%^EZs+qd8?vY}&eGX3r!%56HZsLCb~H3xWu?U@K_|H;v8=VMEve0OfJuXy zghLCQ;_-v>85TjX3-LiNLzD+g3}K%Jn)i+!$lEZwe$q8mRI?H==MgdjY((RJtIr-< zm^J;@f|t!-n040xr(st^u8bp0$H57s?Q=T_y*>7z_krbu&=0;Ik>6{*6&Il*B36tF zfTZt7k&W;>Qyfw;0Tg|Ezw*AGCo|77xX z-nUzOM|o>`ZhL3FV&;i|j_oY+Qz(!z5Z+`yHrTF#U4XkGct>>)_CT8j5!vsX-_r{>3oi&E3=R+a4onVk4~!0^5rYw{5=~1~ORS8&j7^MvQJ`NU z<00puOky^U5Y?B~8`gu}syOQU)bFC7LD7aH4VV}fIp}$i9%Crhx3tOdQ1K;9NDG{i z#46DzJ&j`>?mL-gq<%W-wrBC^=@Am7o^u zYgKPb1%x1`o4|6^yYu{HnK`XzJ8%2$+;k9Bi#<;-9Cy8U(Pu4e`X5|N_P}EX$1)lq zYX15OC23VJo^2~5uLhH@xqn=z`Gl5u4>bIoY zLzfH=cnChWD9kcg5I)bL=|ZU@c`bn4eq}p!DCrZ5y|e|2YXmOiT#ck7Ii^Xmqu;JJI6baux0aV7kP#z8%m3JV z{6#mQfD{F_WYw;tCf~T$RcZ-K{U9SJ=XG<(bd;N!>6Dt9#z{)Y09&CdL78@N6|QY6 zl~^2(kVJ)%n~@<&ma-}a2NSgGh8YIK_c}lFG#HN1x@4drJCJ6=h)FZRz%!~v8!>Oq z%KAh6$^D>0#makW-V{7MEZX~xo75Z1&=HIXy@AV+Iw-a$P#E+V^IxwOu>WA z&N->3J?mU=3 zPv(kPphJ%>;;7R$(C0I!0vS|>>eGorms0mg0Zgq=zwRT@?E0j$OwohG7ph(FYnQ7j zX~X`qrhS=JdTnc6t!i=ESG(BozUw~leopvqltk)E#>Yk0Hl$q(oIgW72Mt@Jl-b3- zS6O(k(Q)CaRcKMAxJ;jQKJ`D$7sY0(IvS|Clq`6mYLJ|vrib92!^IGkUGCNKe!kQr z7s;R;e7`rMr6k$;$=0%AP7fHwa8j4m_`mx1e$JTyo$Lr|Zt2l)YinsqRmNBjVPy&~ zbpYf=r#^j|xmcID7Vtv~h)AF_)pYf0*ml4~TL1tLMK+vhUoxwpzOA-?)*V(0O&u0R zd3myXO>1}l5TqXQCwwDNitITG)RD06uojT24o!wO0U9#xsNn)b{{S+hfFlLnKhnR3 zhYbFJpsUCQVXlTSK0llO9{^-Po4+bH97qfqgpjKy<(9n9HqI!|I8g0)K&-r6SkQGr zQ1g{Wl>?!`unDP}+TDbiHuA_Z2xRXqq*9_NQ-`_Ao3f$aRW@{Q(Mb#6E;Y`1kpl|o z-s2rDe-L4)2n{nL2xyU^OR01;WTh+Vjg5_Th334G2u&Xx9Gui>T2*PlU8RI<)_8z6 zaWCL*st2VP0e4$;D73d%t~KN)yDP(lLa@<50%yIykfWplJOtaZ6tI$F$CM2BM(b1caS63xzb@lPh(a|h4J0!`W(8c}zVgkLAB~FBR3(=A^ zRQ3bPxX;yOg+Ay#=(Q}n@)LA}t10w@f2sbmyUy+`nR*57Koi)9Gic@^Vs|wmB53UN zB3hhAU9FGzw=lZ*cz@eNf)>&Zb+9l7;i(~jxM*GwR#yuR*TlpGFifMN$UH?E$3PM} zmyBI(!li2^?Sq*xeYCK!AV2{Iv~vETp>bf9UWbew)SF!5BQu}2W8{2IC$C#V2t!54 z2K4Z?(u#J+Xwm}uZ5dT$9Ay$VpoE3sH-x)VlL}B&MnxIlTWI4M7a6(H2@h7%qF->C zvqd$C6PB0Dng();%07IU;ItbzP6R=NpLlw@ZS(>e!{2H2ENPj9(cggU1a4lygBNzL z{}=z>Y<&4;=IE%Q(8oVl`&!crwIBU4hX2;L%)UMzh&*7f|LQs-=cnb|0PILVQ^k)6 z-wb8^3jW476ui4jJ`>IupeWmCQ2T^!l6*z^)cle8hm=pzXXrEd{)fyTosZ{*@q7p& zt8kZ``X^0sjsBB@{y@U2N#vBXO*#Du`k!EQf2R!_LW|-%+q>sf+M+q!db;aV1U?4v zs{r>&j^Nd+S5;L-4(V4`#)EaUmAQBCs5IAFqtCUy1>!9j4ElqvUs*5jcDqH+?Z(vH z<&}Q}VWTm1bF&P?63xQsb;L5VbAF?Q#35p7icL#X zi5R47)j*Vm3`C*)Dy(ibk6fdmUq)Rp0?k~Ez|gXDdeDx}Ho*egJVW+DFoWJ-dc2Q+ z(t>MWQFefp0TrQGAhT(E7p~^sg{xT7F{Hi=UvuxqSG)AO(0U`gC5&-tcWv?i{Fndo zU;fYHTJrGlFuAr2mgw@@iD`cEMWgY>7p8ea)Lt1``8dN{QMn@9=66s(EVUnP&(9M> zC6(&w0X7_Av1yu!6`WEa5RjZgVQp=#APhn@V^Gj3>iYFo)nUL!1JQJxp(tcDWZM*M z8nj;t2~$(DWqH}}&txVh&gpMFiqRx$I&_#Os*1RC6c!~z(~P7976+4LWPx*p&_OwJ z>(;@6FH0d7FvcPZn0ga%wpkk;ttoL!IeVPhUR_<4d7*Ja5G4rb=Q@EfRNy0gN{x(+ zP^TE5W=~I{VuA3HdvkLWbpPPs;K|7eeDQj{pZiM8J`8@qlu9-$%xATg4u^&g6*ru9 z&`7~a6Dzssmf zB@n`)W-vB?q}S`Rv5AiI&-OYJa)Fypa;(zwzY`thn6B@6x0*9Oyp0`$^}i2JAoiqG9`O3)RO`txe<|3SQ$9c z{R0Dk`A36r2o|FpiVE)6E+Omkw_udCG=n86@ z%b0;l7;NFBWZo6a)@Hdnnx98??AMLL5lhhx5R0%-;csZ`!-|a8*FU#tcPQhY;K?cSr|9pazyJAb&t|ac z*{tiRCxw{d?9*Ycwmu2Hl1Wk(eCG~$Hp3pjL1l955^q#^szOFdp;YT#!TJb*u4Q+qFM~S1mKL$xUgB}Wz$gTo5Jh}sxeBw8@O z^9}}H6bt!l*9trL?%mtL*REmcRXZz|t5uoah9dJ$DxUevBnT8$K1v^C3|vmGtgLV` z7%vP)UX-%BYz|Qa9$bk?f7I{X&z30BxueW_c$Ol8X1#2hK8So>>Gk^L zF#}UBsYhxZsYw&}i+i+ZpmAUIq@dD{zH1W&Xe&4z=coBG!suHFp=cJs5`?g}j?1MY z*p$Um*#!omvsOw&OIibh#IYF#-``V^IcHxuLO$5cfPmDEg#{%V9UU9bW`~DIqhW~$ z+l-gO$zS~97n^yiXLxwHhb}_*hM`z3PGXaBEQ4kHq{Nnp?5wgbh*`Jza~TY^Dm#$Z#C0)#C03ve+W95I@Sm861EQmgp2x}5R^LD?yd0CPLI^%WHm>mE#fvAi;-@$XR47hGA5)d)uq)>yotcVs(43ky>A0PZ_Sk4?p}c2E1>@49gK5I4ue& zAvlXc7h5Hoti*yd|E7l6y%Zt*9>9MD@S)RG>h#@fZAIhXvf!bGk3U{0VT;9rOWC8H zy}fXFYkTJ?%bo7+?VVae6W{*!x32~i2Td1?=p74ht?&;ZjQ#{dXv`z%%wWvN)EeL+ z4zhL#ui05sS97^sv1U4fG+pK?1V~OnWQ*qDP~94xM8GJh@?%D2vh!7cdJ*HJc!$Gb!I(8crmsB9Vej}gkPi4(7#}aK zTqo3TA=EEc>b%ca1;XD`tGdh)@xp<4iD-F{FZoJcXF&ywO?b=cWRU=mH4vL1sHcx}H`$C~~ zI$fxizje0SeZVi;GWyYsf8xUa+KWrhynYaBhDvUy9q! zMuQcgI7LC2_Q>{#k87w0Kpv+JTO^`%)VYuj?hfxDDIM)_jlezce!esOuOkc<;M1Ch zeog!aiI_sa7LI49Ef#bJdVKP#ueSXF%KFMi8se3ym#a%Z{pAB1O6~N;g9rDY=M3Mq zYu6-0an)*>40;b-kDlikh?3sl$dpKc3?e>$^OR_AMW*(5PvXE+tP`vO7fwhjkmvQW zZ~$Zp7%qoZ574Ws$QDPh7v{3_GKUGfAF7F0w2Pdl6;aOQ2#!yaBg`_@r8fO7+9VF~=~-d-u21)?NL z+&Fd(%hb@*rwQlgema{yp&|LPxtW!utU|8=PU1MbB2ycalWi;Tca33ZNz2&fGmZf4 zJmUuyA@A+mgM;7w=5KxS$?q8eQE5ek3>8kn0E&u!&%f6F!*WQq7Ku%UJfzZEU)=;^fi>*ghYy?*Hz=(h6^v5Q*YbpKf1ir$f@8dziqd3@80d-gt`AVLg)j=ZnyI^GW2R?btO%E#&0x? z8m(dC{A-2dEjZ4t|`}0*tgm} z{UPx5^tAUO#v)+jb6~3siJpAvU-@6+WR#w*5QpLl4uzn7X)RW|k zH4q#kOeWNd+hm(19oY53{hc^t;Zda;r+qg+`Z~C4$4wU~0^8e#qljtKH?Q9s84fx~ ziZM7mcH`E>^t49&?+kKYfz!C+ngi*f7EK2JB@=QCyn*Ggd#VxVM(%7Y1Q-gQ8fU0aF_okFHI>bWt zHd$zPi6=EWNLlW@_n(Vm^p}Xl3?odD7pxHq#o%UP;3okvVFzC;ot$jGI6OW+&Z{^u zFfb6LRo}ost+>19z`8Dn3{)@35 zgETb24}x==fAFP@?w(Um?BX66>+|^_O`SRfB}-@(;)7~ZX4co9o>Qpv@a4;w@KCTv zk}6GydX{$&H5${?lW$Puc(i4K*u^F$Xs85DV%`svTui}d{76lb;p1r1Tl9L1ZR6W@ zJ)1@Cb6k!SfJ8=Fr~=dv+IXT!PBPWS4?enp4`0|!0u+#J$GQUyuUu|uAT$uLDRZ25 z1ke*xp&ULjA*F!yL2UI>+2&=LmBp8P+iMW8s#KwSFDx|(7Mo0sOawYd7%lJeQ*amC z%Iw17^)7I&BfR_gB7xVt%u9D(wH>wclU!sMMRt=hMMn2N=dz<{RT|t>fL*^Q2#Hr- zN(`P9g#|ORi*INfF_atxZ{!}s+*8mWNr>7+pu!(53qlb&N(vT)PtZTd3`5=lq3GWv z{(o9Ymu{Nd`a|pHaB6FR5O4G;sMhphbr}sNY&*LX=5k+u-&6DIzCtANM<9@8G=Jd< zo%?<+HgDRc;FaJ8J)GGEDrXfEZc3^Ox+i1W_{_C_0*=t(W@gx2_Yd~5<#okQLROQJ zh#>qKK^U;Nd7suU=f`)krMWJWp6UX(T);c#w)q=;Wud}8oJ2EE5u5vOIoA(7?Bs^9 zG1+l^<}!WY&Qwix^544q10-_%hX6jz*}#Sm+J;AZD7ZoA7HI=P7A6ww6*((OX)ra= zk0+q=9TX;Mx-+7=duY=j{~5tUPT2;zA}t*BbCpBL&kff}-n*7rc#_dw!&lWaonpY; z%%qM_>*^{<$!1!v*8%#CbGUeiXgyEMS(+BDjMXY+M*x1G~m|Pm`0hD*5W=KMIjN!PyI-Khg^JH4j zU&0yu{EEHp1g>`()%C8`#m;4?)7n%_xk5RcElb6s1bX^#O=i}fz0%XfX^BD!OOiJm z4rk#B>6XllPE0~8*qd*^FWjDI>c3dSIKog7@`BG?wgJxp1D;iLxvF1P{R&57Ea>uD zypKP)dH-y8cef8p$mMb#hC+u5M}jPIDgf`2EvUaWBT^x)onz&;E+;^B zfwNtoZ;LLn&FCTp(Z!CGrnbw?OPu~znQG}EQ_aqN%yn4tC0d2M5l|7jMkJw?@9VQS z@|zpH1vkohC}-tLrEFUKey@Y2ptVoW0J9%MCZxY!Etk}?6Yc?fC=&tKW0cziHf>(1 zp=nwcHjAd;WjD*2%}wQ69iGsu#bOnKY}IuG(JU0sLem&Gs+Drh)N9}wPy&P_1Wth+ z$rgrTbnwvXvWJ2JDdcuRA?`Z#gz=rM0qy}}g;zI?Zj$(X6rlhM(FGPa&d$yn*a=3s z6BohIEs}JUVd6N2O+&V=Fc59@*VS({F?R3%@*yqkw#6h|Sa z1*8|{bhhTY9>wT3;Z6rUe|{euW2g?@_OgCi2d#503@PkQ%t(j&NSy);^5bclpeUeq-iN!hSrL{M1=Fm+Kq`Jt>;u%== zWN{WRp^hAGyykEbVW@~@Fa?FFPLcl2`=JbTpNv5-AsD68vuAF2mO1Dp&yHbumI)rg zvv1rN=ZaMbf7hX0zrMK0UBAAvv~>3ig(3gDNXwY~JLcicOnURnhlean}r~I>4-@gcb{~8(DA$nXZ zt681z1tHjPtH{xcH~`cWwwdbAh7@qKW}^flw4KBB{t6YPApVgiv7xF4nE(@`jN=Uj6dRFJBZ)_teee zSy314HptJ{YPALppMoeTazya?qJXq3UQ0a(J}3B64*g_*74E5R9UrTZ{WJ}|UX@u3 zM_X8&xctAJiHW%xLW=rJq&zvkWou#F_^6R&EPTFjD}o!CJq znGEbCJ39*>GyIR4nQ_lj+cUez%*@R9@y^cd4u-*T5;I%2n57o<|5pM#@?_xnDk-bg z>MpKVuipE;SJ+y?@( zuX8<3o<5yicKy23+F$4z^&RSJZgzgRrJy-cfvk>6?jJvR@OabQ9G7cljlXh*)ZegI zV<}J{tM&fn>qB9B|HRIq zwpUU;fm6X1aWuNMv9?xgWr#8PUYIJv8;-5rSTeQ0wliit4W2#iZft4NIfM%^#V5Za zOnab2yZm%3odvYr1W?O_k1hjm6ejO#yxL>sBV08T3(J#JpkmV#6K#aEvxSGo z62rBEymz+TTb!P}N^V5>8{`I&?YB)2#gA53$hioAj+`S$droW1PP0Y-Ec!PUNb{=(elBS%tYKF zesuFAmOwMtW*d9Z#_qvmd(PdSmC>Y&OQEbs8qn>5p>>o3rEQgT>c~!qKD#bh)|j1+ zXH9UQJ?jzpt~J3sIeBEM6Njy$-m=xvX65HC2Hiboe)#axG+<)Wm&{-JwZHb)e&rIr zpDh-F7#AUgj1}t<<;HeVgv|8DjW_-Ai3x#%nWRGe$-nz||L%!^@613JPlL-G@d^>; z+%V)vg~GXWZ+_NFmvEE=4oBc@x&O@9zIL|%V=G-|d^~gN6i+2pRVB(N5~og8*D!Y0 zs-Lyeb!;qVhuORZgv@5!d~knplh~d-&X%yol(IG-#+gZI0DCRn$@I zoubgJwKh`UjV9vj)6?m+cVx^+)YH>bLjg&W0z>Hb_5%7^AyYYci7 zw8o%UZnj3dWS84G>K-@rcKg^+?kC*LFbX2SsQSVSFQ`RqRkW~xQXCZDwB&N9PTklm za;<{&80XIqIT;Fd$S6)u7O!TrS92&p4idm%s|$L)mNzVZe>9425L+2{VV{R&6Jyn6 zl27N(OxPe$gFtF6k40rVm&y}e$4;wbfasFk?xB{QRDKzqvKEV#!_6g78|s)#K?Z;O zexhR~MH2UJnoT_6`CP7LAz#rWE-+!cSW;jpWf=yI3d*t)=A$U2M!L&paatFavUm#J zIcy=>rw^?T3#pWt2apPxk)#>uQp&Lyv$J2$w~V-k+-|93+Qp-2C|kW$ynNn$WWnV= zH&e{ljtsl3^|}?wD6$+xVUSI36@}YHAtQob!CVdVto=R%ef~nHAAz%o#xlint=dxT z_HtzgxAZVWat7(3RO4i)J1o0TW0QK?En#zeMKfVV>*?!p*~~)33aYoBS4JT{D3bH% z=fZqpH(QTzqTL&opFBqYEIfXy(fjw0d-C!iAtOa_*u`81*=BOhA@t5WQDG2GHz?#b z-}`U>?Z3UZnZqjzsYJL6QRdyOb#ASdh%$n98#a+L+EH^k8DXa!VoT_XKVYFnx%xu< zN3%}q!<_@)aLWCq0?)s9dviW9E`-Ojj;K~jqQpTl|R+h z4ZXp>fH~q)y#4)|x8Htyy{wEp+ZQ?TL4qs^To`7RKEf=}@87@M?2uy$cjdVh?k2ql zwP9MiR}=>arJ}gz>85bv#Dq9DX4E-wWL(`iI2ao%ErDxWDrpw0Ro9LY7-*diHNu8G~6{QU@DbNRaBpkL=X4lU^n-+*4IDFc(XqqJJ{db z+1glN-%pQvy}n>i@4z5JlzfI&=L_EcfX#8Z6J1@|*-h;xOIwOMbaujH6F$q-v!8dk zJ+8sA@$rclUsv+^bZTRLb#>|8pDB~iWdl0c;Tokoaq05;fW2BRHi+~jq=osVr7MFG z0r|Z4%jV_UOK!{K)r=`D2sXEW0Hf{eUth{b1dR4an=Nj;2Wj=Qb@~NLU-+q^yZl%# zH&%Mb`#s;|d8Z`Y9r`Kl@AwzMZ2kLE*}2#nD$rfA7K|Y_|wYWox#DK`^rxbvbX-y5q5GMZ@Ddtix$}H zI;nHj^Gek36Qk(lv#gshZf#xstRZhw z)s+?U-|00#If4B84fy4^G_jk73Sd!YtIOu``PSDr*S0^p{b2LSmM(C0(2fQtcqTw$ zCq0V33-)EZ0!v%7&Fhj$2D_TP5H{I7-q8Nd$B$OC^B|~U`<>-1v5n!KF&oK3C8=Gg z9!3+`D3_|agY9jf&(4PiFP;xLO}wEv-3TgQ+JddjX0C36to_WO1&!RVx_maNCi~m~ zyxR&pTbb>&1a1fc>lR1D_UR#;phsb&eoz%`gGVy@R|Z=girYnaDssHQ2z@JX)a6Ma zkckPhM%>ubyXhL8tp=V}l-z?vC)@kC-s+%JI1P#~bf$KDO`$vf}7^LX#oSNGO% zv6_DM)wE`5!s1Ofg{yIVE#ka560*R``{G46$wkppZujx-)-gzk)Y7BHN4sV=*BH`qx>%Ufcx)51bISBIsUI91 zEH8)Q1CGV{9yJC8{I04#c;GoT<#(&qS1(noK40~gDBjW}4DeT=RSSbOed(&t=X>d; zdi~O+Fn{S%z5ZEf^Uubx``c0}_m2c_3T!ov{)gJ-3+4Y1Rqh6U1TvrZ5@*XheSJIb zmz4*1gqPj5i;4F%DvDu>BC$_QGf`ym*jL0)GHV7~U*GP2wrXOyzaoNy3v(m8v(?wH zHqszFyW87)_((x24Zt5^2&Mg+6^Oq?JXYkHdfrbOhDLcKf}Vc!RC#xIWXLJxAu&Hp zQ<^@+MV6|;UZ7bdCy+NjyWI!Lt3%di$MJm>Eb36eT&>k@c86GJ7{s*R^rEL)BwmyN zr;(54JU)yulY4b_gu&<*FwDq5)5ve0XM0yR1H|~)zGpcont#2S{PR!Noa)-Kt!^)q z$?W{Yr-Olwjlkg2Kiq*##`S~F#Z`}IbLs*qO}4 zL?V$YNdqlm$-c%~v>$XJ^B1UtDwsf({eaB$yLTo@SXWF7i@aQW9*JZdU!7 z>h)6T%$dgnx0)_#en}&LDop;^yyehW-LP05KCJ0uXYx!>{Th-We?3h8@_c8ve~fL$ z4DqaO_YKFx^w1YRk^l^@7xP0KqDuN>X3~7iKFH>BM=s=v55rD-x^0Bd4y0-ROn`<86t&kmCdD_T>aOE4cMYWQU%_nKk z-d@kKV-cPw^?F#nu}^|nD1u}kLV$rRBfJSL3T`O%+*ZP@gff)bXgTOkPtT6lqnE0p z-3?j1+b&j1x<2d>bxdzvbPNx_c_jB`9{+rh7%4SfYGFx|y5W9SU_^^-$z8`JSWfG2 z`W91(I2bzclF$nFxa!*=@aR^};}~+w45^<3m|_?x{mH?Qxr0=8ASc(e5+iYKIPUpw zB}^6~`~q1ZGXKbSL%RL``|>3-F<&Axt$y*NUwQ|hl^A)~*z4U3 z9QJO@W=J^A_}6-W6z@+Co|GVU(%1?N46t-q3GfW%jsw7}rPan_>3#CS+i$C#L@(86 zj-~51@~ljW)rTvhI%40B|6q7cq=ePvNCP*;C>eH2iB|An%P}S<@Esxp#un5d<9QUT zS<&*39%=6MsZ$d{^lWeEb9%Nk%VL8`xepU^mmNsb-)SpI5nOBuQ+yE%x+JO-(X72-lRvE<&Zcp9bHT z*&nsQ8;NBf-@E9}+;Q6;)afCT|V%$&^BlYOf zxasuiiPL5RA|-}RC?b!RRif}+U9;YW5>5}TDYGv`_MxU#k~y;QBKEMsdcGc%b^vJ9Io@#0|1w$bGj1ln$P z7VtLbbXAfQqa?kw#Jm?yBrDZ;*e+Z80GW(2jBPD~S>zdu3R7ri&I;%+LuW!Q5#|quhYz$C;`^v1#)45q#q5sDCM!SNuIOv7r?bCEHA32?g}H|3lEID~d(Icgdj z84CG4zTR`i>ts&(<&Bk<#*4q~m%ZrbB*m-<95IuD__PP8;(~X&S*i)N+yI+CgwmFj zqBV=G7Tgfq-v!Phn@n4Q8#hc+pm4iD%lf>aPff)ZY`UU&$p@ixx#S1Rm%gNg1>H=N z$*`zDeym#ukNs#eyNA(!NIrJcgf>-r7Y58_0I2)>?V}eEa8DNdF-7MfpLui`A+?Ak zHLWzIu!(Jd_ld(n3XzuO>6rB^U%CFmg)5`zAdvi|Y4j^!`HFRKdFcth;U2B-F$*Tm zWwqAt?lCKP>C0c!Z#4rG-ey`Ix`T{*+;BfI;zu)Grr!xmn-+z>7C=HMO)a5UH`3J9knkm4T z6OiWqQ|D)1xOR<`jA9!6+sc!>_g&=EOazYo6k_5Ln|Ha~AL5Jg_(AkAx(MM5_dzdg zKBp1J=56|mmIqHVswhf|%|4*Bt=DgPl0nLl&E0#@p2a;KY&H}>m!7v5fb@m!N8Z_< zEHB$^%i=`(?QbO}#Ol=cI~t`l{3&|^cLzsnfBMwE`;V4}f}5Mcq2+(H3z^JrfB&xg zhg^@>yxz6Pt{-wY)9U7o2}>hz%%e2PKPOk;YjK?#<2s*VQY;UBkK%{^MVXQo@7XMa zx8o7g{gg~3AWUdVV#s$jy0*Y-V$(BOu2)V%ARJa+qS*N~7c6lTLQ|OVBSAB9yX8tO z0Zz1BWMek|fNkz{h`Sh%5g~k7Xv86nh+wGoU@yM4w6(ppy`9NGO93w|PM5>$CEJ4| z+pxWtRi#(l*hBz`D&>V%SAcT3ZcVnYNy*nQH6dT_25A^m7 z;uFR&g@b)X^1*&P1!ApF-EY9~;vVD_GvtS{#f<=hg zQw#O<5@_+G4I4jyzEl7TO6NpT$RQLfRB$I#hU8_+tZ|1_DoJj33581IAPLk|1)z2+ z$|jjqD%onSVMO}s>F?ga6kFIhsHou3u_z^p#XpG^;?fr!^869kfQa?7HGD2e{d8lGUbUjl)Fh5PKFnG~CO6^R*nrw<*zTsSd@C9 z<#99;3-=VW+$d*3d!jqhh4@$`;zl;zv z?XsHhJ;*jK5{9itK5zJ-BlViN-Hkx6*F@Q&4ba@A*nW-&P9{_>IvL2^7qH>Z+HU!S7)j4i{+9(xgE`+2MgCcMRWc+MJ1}=3 z;AMuDRtZVVUO%(+8nV$8%*pU;{cxS>st?eTW^`=@gNq|v+wZfhv&$!~tq_$b&1d0$ zbMlt#-6ZQ?@$+s zc<^w)Tw`XtRUR@lM?){>wwqo!-I(+J4o6tIa%E>FY9NGZ4Q|0IIMrf$%Ee_sOb&>t zZ#Wto8}s#g0#5jIh2X`la!7}P8hTN`kizyCyQy5*^5B6<;#uJ(nWx7+gGk7f%Y$Gl zMb|chK2pl>FM~WK3xy0UV{(S*f$HB`E$p=%nL&SAZd8qkn-fg|=6}DixX842RYqaM z)?2#`H&(Av7##HALo`V9oQ?SA<^dau4Z@tz zIZ2A?oQV_HK5~fb?WS(flxLY)-1Hb4%LzqA6V`AIVFm;G++aGnUi_i)r^AwZ(DG2QZ`gp>Q6nLIM z{=-Nu+TDJR(b#o{GGsLN2pc04ibx1Qm|3%GZ}OXTprN%jX8&K?AJ94LR$-9E6oimf z>>NmH_u>6iJ7iO-t@l5~h27;V=k=L;*fRf#0~+F?M<2UKo0|fdsyu4 zW6Jk8&qYoC;-2iy8>K=a1sYr>s>f#-)Ziox8LQRl^GcGDN+x5;T+U)iX>ZyjWFcUs z!qbqh)Zvr2S_efEZJ-KbEXHImEotZPMd^PBA>^e_>CsT}WZfKu9Mf;cs_)0_@|j60 zVMZ_^a#U!_~JZ6Q_fV38i#8It= zI<=yd`h6CWVVY|^rF<2lm>LI*b_`5T!~lTY1%D-;K2yVQ1S!ueShLL%1?9)@VERzm zLZwoVNR$|qP=2nfrhkJ_^4FPnwoXk2Ns1m;Brg*&gXT$Y2p?TiEp{Lwh=`3kVGXQE z2BwM%?;{SQu)S&6jaC3}m|c8=3+=z7{-4y_^Vd4VyX%bx z;ZY!-vcd_}D5VmKeTXh{W!_>d*-Mp@4h*>=iYA-2(I|b+M*6g|(wdL25=vfV^Rd%% zQYKS{mz&J~J_>U8FQ^7pXW1GU`S!f&W&kkE~*WNHM z1CEXj;*R`m@BPWPef_oPmjP>ZDnqQjY=N}8T-Feik6HO_+KOO76a^W7ZFZ~n@j?nH zb5PKgPr=zsyTL$<5dV{tb8SQD9d5<;nr%d$q0m{kNt5T2ciNZ2By77A|w)>mu*&6G~N zR2hNixg&DZs>h!ol>9M5h|;MCnnp33&`5-faHV275}?G!EE`CMSvEAUZ6wRCKVBz= zBXvsZk}O6PQI_h2Hc*jR>nY^wRxfU$;|qC^4|6`gUzdak=B!!!)RqZ;QpuYYR$kA8Cdn|!@soLMk^ zdi(Z#V*7?*WI!F>H~xp)u$)a+5E`7#R(^gn^?Xt@m9c<^xwtOOAKR5o3=-1AjsoCF zqsENGRLm}wFb`7&A_pr6+Mls+{2B|SgVs(E}piRag*EUQ*Bl&oX2P#YHq66YLyzLp-^4xro!ji2pI6(VTE}?agyTB z)|-S6bGgS)-}odRWmW|{oo4(QwRrtuD@S-_q}XgQpq1s%!Abl8^8F!#&RyH6py zv!6jcXFnG`{85zU#|R-*6oDc(V=@^%K9T5&t(~1BWMC01C06u-MPN>53LJB!TW8kE z<|^SVtoJh;@d)3jBR6%sNX)pU5{8kcke-eRA`whNDpwa&Ur$fKrYOzAH46zKb~+$9MZ2L2>%@%#oX-kDUAP@$^6 zL_+?Iys_bMu&DhRIS|<0Wl=lE=vkk^hBP<>|HKUk`$yC;DTGD;4*S=ABG@db3%T}6 zozz~@Oj}zHM+G#k!2Gq`yh+~rjzH*lG*ck3v(o^2lhPBGkxJ`LVzbSeS}(FBG^O<- zxp{NW)OwGl@W0^Q(~RabYTSPJ$A28c)HxF2zVwyXu9JvnKT4=m4^un2xjAy(_!GkH zciwt?RR=+_9vMaO$g+oh4!aYH!8oLdNYvCjWtFpA z@I-AbXCLj9BF@{lZ@%|osnQTYK$NR5UY?oxX1CovS0u2z=Rmu(ZktWQVKvsM&o{?m zW2Vu=!@1V)0-=b6%#*;}Ji*;AITnQyg4pJ$$)pj}+_9983h=Vi#aHk{$-Us8p_uq` zG#Uu7sPT!x(B7W`Um1o}VtpNOsnRp@)EV|xe{9?L7uZ{Btu{T4WA}QOmn|0UOSL)f zTl}A_e@Xii|C{Q+ruMhFfB5DX8-KL%N9okmSIK|FzrToo6;d%ghKHY=6a?+#NMUNz zJ3a!MZDU-x-D#Dv_WW~y!R!6P`02B!U-kK3WuL)EkAj-UGq(CQIV&%n|9CO@+hwOHcN;wotCKV-@YuD^*=L}|E(EV^R z6k60ctb}0>M0Ni8`LmV{F}1cB7DUfZy!TD=9BcGY5X9ByiUa&mdujV z8$w}Eq|Qp7O2iIYE>Qg*7Zy2Xa*_y~A%r|((GwI5PSBjJ%DzCb7ilAhoxSJ*o_q3y zY{KhKr3lugoQmyjwp0Id$NN4jdymf^7+^dIJW{L&ePUftLydHJxV?`on^m#VLXn3> z0JDbk^9Fb)-sU8Cdict%&f9uKrQzF=?fUbCLI{-Iu< zMIt#c2yw!3nu!vy4T8zx@n~J`K1TqVKxV&WZH{zsW5L0e6^tx3F>C^r+%q$7ayu>! zb5DQq7x`gxmLa)`4VxDGocdrZU4@lGEsev7PqZbq2f|XoULfXlG%Q5ZW>V0c4X-zs zGnd!P=3LI}Z8%OlG-okcuP2KZk~6t@-et;RcsMKZnAubn-D1^bj>RkKt+YnExDDBS zbJKA)EnNn)A&!qoPxaEW_Ggauq0AD;=Efwfp^~iK@j2Hf0X&bu)RGiZaseQy~jy&0bO4pDlB`{Ikjf;^aHEh?=jVCC+7^+n@)EYwG))QUTjiw z1C#9W+=*4gXc%nOXdJB?m)cfE0k_xJnm>oJMB2ePeG4nrc79GcNXB;)VIi>_PaZ^+ zB+7|`ZYAdfj~?BD@`Ro52Ds^yXA3Tbq+p;o?CK2!C8)}}s?o8yXyuzu#130C%jb1F z^3BapGxxb5MWK2JJEf8Z%HV{nQhHhyd(&nwZCKG5bX2&LZAdHiEr-oh8&_;Wjx3xn2`PbpcTW} zN{i5{6{u!68G4m7nR}VujWa|c;^AepYVQkr>~1$XZj@7NPoCa}y69ev`p=$ArSmmW zbue^!@2SDQzO^ip%hnZGfhcv&KGhe1{HU~t=MN1k@S3+)sx@S{Yv_4xCbefL0Sjkn zWD-;K#HDlz8J+egKK5JDOxJAGT*Pl(na%!ANs(;#aP(65{j$9g1A84GF9W7QOremGFpS{x`@C5o(JIgyM zZJw(Van4j&y|r36>lgjZNvnyJAQ2(fxz4T(k&v+#7ini)q`l2WZf+iKAnY9;?y%3p z%}uH~IAU-nhd#ER2hR@m7LBJ}!v zJ?zsrFksXRX@pF^Sj=bGRiSQZD)(R^&vAlGDa?^M>zVTrC&yz~8;kDug!~Q@XAo9a z!$_nM42#8Jp9$!|q@i;N!&XJH46~~tDT}hYUBO_bl!+BmhtUt;zkNI6EbTnnK4{o% z3lF!;4NDzOq&?4e8NFlqwYH^uy#d(yq8eUo(mj!}fsh~E=W62q3^&hN@#>-Q!a&YTE~*(|kKsP@f| z|LVpXUnm$ho56lP>BA`h)I3Yizr@LXU}m-q(njJ@GRNj}w;z~RSzCW$bM)xjc~kz| z&g%IupRa0v;Thh1V7tSccTQde50Ok~5*7`-qcG&zTd8SsK3_1oTuMQU@UgtbJ9qSk zgT3LlJ6w=_|0+70pEzHZfPOOa%gh%?1#JUm?Vwm-B8V3Ko)^Va?S{+XHn{oA+UtwXqtAEJRd#BM7`B25PZFv3iL zeefN=DXo3<(Hhdiw?OpG6HmI`3(@F;yP3s2eAEF*H5|jYqcq(ex>ow&gN4G?tBUEg z7AEE}Q6UV*(%0DDrgTRO^Ln9B4O8qJj&pFd<_)0n4vk1*BF%T5%6RnbOvhi6qUglQ z#6@}{L5tg)n_Dr?o=Dg=nZh_H%adwE!LHm*coU^fpt#RuDnkSqi`A*BjzjN`6Y>K@ zRp(}zi=a!Fv)PDrAK`(`8s?+X|NNh|E(G4Vy0M{}D-7zD2a+ib*`OerL(tc_V3)}` zk%qmnupnt~m<568Wfn>xk~h{%9GGJmz~rSqun}u(+Bh4GD^2S{r>)U&;8Q8AY=FVo z$Oi)XHC(J^1A#1(QY6tN6RxJ~`G^xpnHnH-=g<3u;x0faKHtZzHn9&N6~qC=#!2}D zyaKxh5Q1)ZkbSzm%gb$goMrSl+os34+&k|8&~)$KgG^ZEMZ>668^m_@{P~ET;~^9| z+}jNXJQf)o{Wp8v?!?*(LcCImv(MFp+r3e+_aQiqu*Gn)D|=yMX^C{m>BIMKf;QVho3mvrwlZ5;**ev0`sT6CB(u{yG4l>>mpli|#uH;8#bmbc-W>?XKG$ripyQ$+}P?_MM zBSZjs92%-2JbrAqg9GTcyYEQsMn=MPWMt0T60tEPEQ?2yJBDq&e}B#jA)7%dnrfr3 z@8IBnLt5wBGo_Q(ulY4$?$`Vp2;aiO*RQ?y>en?l3=m7X{QA1x&SJIEsFun{Y5)Dd zALjo4-zQ%*{+RJ~?(JV{O5fZNJl754a;>fP^hBeiRwEp*wXC2BMLd=c9_9Ae=}*1J zWPM@!+E3w|=B?Ih)k2}2Dzg;xrmS%XQpa{~qa7QCR@>GpzwoV}uVk)V$#i6_ z&xma8tp?TW*IxcYeROegRI@XYH@KbV-~Rrik<`?NV z0%x%f{8{yTt~BDIb7E-3zMen!mXCPU+p&N9cG&#Rzm08-jBK!|c{@X>P^{IQ&XYsQ z`D53^=GT7I;kb}ov|?p`$*RrG4xx%@EW@4>&73Kf1%li zx;&pGJc!pEi?y{y*-!;7)*8yrcT%Ws$UhREPnYXzX<%*9Q}zef04XF{)XnIgbk%N z45cWB5{49wVkl|dqe2!4|L!~QX0z>4QEZM1*&wx7UwifP-c9x#lPW2GUYDb=o5fSQPrQS+8lL0H2L`q@=ha|g(K@w7wx+C$h2T|U zwH|wvXY`O7Mi@+87@za%!1A)K)<_KW#twTmjdI*KRq_L6UhA?*XwSse z)i7OMowv67xkLOqGxA)^HL8_1m(dL@qX$?9ENb3XYoT&Q=QB%&=56Ki_P8D^*!RQgnlMYZ&CPlH7AK6RH^+Qqo9R)3+wx(F zljX3WCSuv#RvT6_{tw)-j&0C{6Z(B3?8Sd%)aq8_Ai2u%8??kQ}e~LsjcaE`7 z`Oex?V(e47lgY39bzzFgz4rR`*GPoC!Jao5^F%s}4#$|MHt!T66p@fulV?s(Cu4UX zZyg-&uid|S_tE-JG@UDE4_6i*FYg|fnT_g$<-=U11ZC##@}v8YcjD>9;nv#I+c(~S z|EBh8i-yNy$xMtL*Pcm1znMrLUqja!Hw3t1_p_TJH^k(mwG4tCA7q}8$kxy?RPldkM!n%AqiUfPM3J96hcgd!4h?acX1 zN?+SfWb*N~#Rrd`Z0sE5D)kb8EE~J=bioi5T1Xtk;qHi-9WJNpc(8Ea;a)Oo#cV29 zRcs?>K`&$u_Rx+s&d^hbduz*2kZUQI*j`&%xPR-`?aT%38f&#KwQ%=!@|o*=&7fR! zp2Pjnh0`PbOm{reRv!EC#nZm_9x0Wv`wRAfE?iq%>ivQ5pMXEm@u2{Oi5>_qO;(## zfTSGFRw|V%rF85NB1gEo+1h-1XJ=w~bmzgs%Erd##^zo!GXhJrH1@)|g3dALgv_qM zWU~1Kez!N!+uz^YHvl!lHLTIh?(X!kAF2`W;3-_68umT+`s}G8zrV>ZFfYq+I?VHY zVdQWNt{!&cWqc{MuS>Wt9&WSiM3K2iIN4K9o8!Tg2lp11cMcMTaP=P0S=o*CK6=Jn?r@gqk=9$!4T_O-9s{r-{Du)YJWxVF2$ zJ$C)&7hZnll@~8xnz?l8+{D=UTug-Jzs7pR`8@ltQU@3K8Regd3Z~!5a%dNS%T$lp{FMnJKTC2IHMV=`CL|#WMVWSUX&8aEY=S;clWlo_Y*~GVnAW1T5kwau~62_DNquqk~a_h zv3M+=f{9B8Xu}dTSJ|q>+$lh^!cY!WSL07Iffm41p>irMX!|0qoY=knushZ zSg$3K$-(`24SO8qjYmU*P=dUu1gtfRktihW&9&qvL>Kfde zZ$krha0ovcP*fTE;mV55CiA3GuN4!~DD+a>8|yH}e!770@b1s-pBkIk-_l+!$99(5 z7^Ds!X{C8xuC}JfXs@FUTk1fVtRY-aH4#;vHTZY5ZL?-Wm&EvQV84wLF4k?HxBq zv|K*9eqAW{1)Vn4?jJopKIn5=MGos#pufkbN*wsSGO@auUbX~uMn*TeY__GPI2y$2 zQ1omvldsJVi*|1i=H8VWRV>b)!O=daNmNv~A5{GO*~zo%Z0amH4J_?$y# z^;+YlcNJZZwFO*q=m9&+ghlUesiYKzjugv<vlkLcG0hB#eZ63kYBa^}o zJI0Z$Zs({CB)i9})xNP;baCKSJGG%bRLV%3R_>nmd+Ih=jas3IKXAcK*yjkHunXBx74o){@oimc!LM znvBLXd!tTMqb!eIF*9Z&Qz?5;phkM<>60f30CoGgMzLf_oJ(@}or1wDp|dlmLiUBl z@BI8P-N}~1G-wO^9_-|&LbMoPe(=DM?L#lVaQSr5-q_P#&Zc40luE3uF$Ka#qNEeE zD=<8|aO?dK>a|8gy7A=kZvOE*Z&mE4&zu{qZ^dA{yp`op0*8RSMVNtFETjf{P^;;c zie9f*i`k#}zF~`O@p{5EQw{qro*r9?72%iR(u}!q2><^dt-v3orz5dzOJuCq;F#^& z>mPlT%LRk4zm6uV5#i5S7t$pv^sTov>ahH2()LpG7xCs_W^|)2!*S=Mcu@iq z;Va6_PJeJ_5P!J}Kv+B5eh;Z-)^Hrxdb*fmPRW-(TEX8^rD(+)eY|*x`N1H?0S239 z#~^N343ooZ)QP0jbNe3lQmOG)g8e3KIw3r$N@ieEOy%U(fp$#? ziJUp_rb*UTIp~6u(MPwI(RcA;L$Rrr4{k&aB{V)UIXTjAQ7|xjr-B$X7@kq&oundj zX5`ehYhEvq6I0i(Uq93D7HVK9O4$ll=xWvAnbmT&n!vcO5GU z@e!wyK_(f)IXZ3_yrKOC&(pm!kwYkANFtTJr%#DN7=@r=vl};UBnyuoi7+wdU#{1Y zQqx^y(>V+>fQlO#2zIF7?E(>+ldT5F64{m2Y|Rdwti6_9TghhYHRk9MPclc3C}}dF*;Zx0eufgBlKp?x-hs6@@e{ z%3EG}`g%{6zLR>h2EE;7=LHJASe-jSL+}UuiIQt(RMnyGqS>3hX^DupkQt zmEcKB_v)JSsIWD?UCxddZbU--<>jQ|%Qs1P(;GglU zAxA!1;z*3rSfNxZ6fKq_i+F_6Z{o2(LrBMu;^bhBj91 z9%lW`B53@fT|ESD?*zsm0j*@tt<9hC1Hgo}0825UEZ*tHCHfBz{44^O2>>^cwT=oA+JLB^J`!67V9rp2|M$+e-!Vg9&92L>*QZBUOwE@ zC`F&%_(dGb@QXK|MoW#xJ#fCj<*hwkymwDKWsr>xT?b7zAb$YKEEJel$)KP>)Tosq zvMARKSW+1^ElhqyBY!hY`}@N^9+H34Z1qd_w%6vCu1OWbHjTNoc))kZ7^f-JZH zYFM3FoC{OPHF-e*So7%Wjcz|WnmRG@^rO#rOSkkGZF`ui`87B!(TB zR0W0*Uw!y4%b0$WR6C*T0S+K+9hjKl7P+2jbGf%{n%3qlNRAw*$IgVa8i$7#pK8QP zDpgByJcC4u&son(*_u;6A;S&ZH_7Jd#?z;b;=-;{Qg#-!`DT%O%KPU1Qje;I?Uc~N zyw6uKd1=8^Fg$pI6+2sZO3qqVZui1#XxZz7#Oon#;?fQ+lHhT`;W7fJ6ns~Z9;4W@EQ+?({gmaR!9ye)uyX*??MkdpTWhN%X>ak3$z9%FE!5!1@ z#FUl8N_IuxUWt(ySs`29RzG|q>2gPiS>u?ip*Jb4^bzN0c||FgBc!Hr=r!C&{~@06 zB0Sii%k^_AgnlYVtC@Ime9%ra%ub5hhDPIu6{^h%l0mp9hRqnfVa5mE(^V9B!ek%>_G0COi6aBr;`6Dlz zzhMygg#kzMPDbr#K5A4_*v2jZkXL*9cH*2pZNKQqxU|18khz<3u-j@M9_wp8W>32= zrthWg&Wz)NHaI}Ic4%(2g|=hS<1kQ#)uZTeh&q*^X)%RHMnWcbts9cT;y~-?YMR|M z7gzU6cn0^6o@uq=ZzdFxkW0Z-D#-DY<>9SG2yT6o;8y%jhYeN6vw9_aI6OJ1=uz-E zk2iLcd2nf|Tuqzva->|yt-}q`(`1cz_yazt!)4|oo>~JtF?K#&pM@(VlZhli2aWkl zHASgqa(eaR#bHzV-~oKv-P+;A26Jje1x`}c`w!Q10`o3@woho19j;zx*~qFbbP7#= zs?TL6>7CWhWWLgfc#LYX5L-s6qQwTR68n4H4pp2#mW8kr493iL-fXV%W|dXPhC!0a zPEYx{>JHx9sdBE#scfdoX;wC0SR|Aq4I|ga&rK&{xyGDre?KK! zeUq$}DMn00F$55n{e6h(TrfROrFwe6pe?bo*BF+4ruOLed+&YtBwjG!Q#lsRfS4ml z7R)Ztc{oaAR>xD9E?yWmSF@`NlHDbiH3*Hw+};NB61NH2s~#BuW0n;y7F{R2#cL7- zpHC31-u}}N8%+-M1)uSe{6fb^GDb0fuy+aH2otBLd!G*)Yht-3wfS5 zBzA~r*)~fZjyL#hHcgJtLH)Iakh2bU3fk!Kkg86NjUx=WKxb0%vooV|Et5omA5~R7 z%;pa_DOFX?e!oH_N%625fFVl^Ed-fR)7jgEgBf2}+05|f?tbt=o!r*WuCFsQnC)HY zM<7FHm6F-%QcpI^yeV{Q`pm_dS1tqs;{&~umzn8|X6d(*S~-*4-^Wm>g;Ae~zr3@s za1X7voG4Y$&Xn%&7o7kJhDrN;$g->7~;)l`enm*`XzzP%*-8e@7CipL^KQpF&bF2 z6^mkhp}ugJ<3oFa-4@FHcjMXLgY^6DCX3P_<>;O#U?$9_zrhnZ5Q;~O#Hrd%VR!o{ zy)F>i`DyO5-)nb(f+LF9aYG_|m|(LeQT6+SUMrJ5!n#am$55^99)iQh^sK=dn^Lb6 z(H0m5S|T7hBuV6re024}14?UIqru7c=1+FXfpv}6vz?!`%VIgfjAG)3L7_K*8mJd+ z28LNf6s2-}3zR2e7+kel2@2IStnyxrHE%-UQ#S`(vh9ATG#8J_=Dt&tHy z3^O~CFfrx^K&2~0!~pFH^mqu9+$4#EdG4zpY(=*Z>hJ|pNaiDizQI{t*0BFUjKE3! zITw5MeuB6!oIB$o@rMtzH<=jFXndou-e`7tDwC2Oy{KWYV+&Q=PL%9+M-dWp=CxX2 zUaX-9!(WTg@@1Vk#38#wR+3*|Tg?#WoS(U_U1N;G@Nl~pQ*G>@+h!w@KZxMYW{G~V zzaQNPjGTW6w}>F9LYN1Nz!j#A+MN68S{#NqK>imdh9DyC86LKRT1ZzAE@#sb3G3<2 zn>NP@T&7a&+XkO8!NBnUAdLUqy>s_8r55vJhCilL8aab*33Jom?wm(t?LGq{%q%7{)t6%-^%E=c$=_)q=PU*WQeRjGb{psas3xz9jI~Jq(6+a$Os&Xs+l{PjKy-< zd)Z>iXxt@oD~w~v2=GGPxKq`#v}Ca^FIz3;vPJtQTdh^=7r*8yo*qdJo6Wl|6 zlt0||uQ0B%V6~~%(HAaVIptUNs)^n4ow|JGm6?!Q+j+F`aI?y`Xf(`RW0;N1!gn(h zXGyiv(CiN$t!!p}=Pz8uidf!Wc&LrnYs`C$D3?}m-T3z798@Hp{(z}gS-*Yz?s{4F zOuhKh%jW{JHqPYF4TBQuoce~MMNTMJ?ogfJ!^K4>>7LXE)SksxTtOh|d zQh>lY-}G`s(OI;ry`gmWoy>NRqeN$rBFw~?({z_X!L$fzc&%of%r zR`FUDjiBV>JD|7g@p9PvbU&U!=IJ;b9g}i=9rt(Qx$wx-z2p0*dOb{3Vew%5$JsqW z#`k;d90wJKYHBc*gwqa{9H?gV5EEB`F_mEwtkU#Z4EVyHCNo@|@SU4CPuS^@v^Gb)h+R8>(0nT>vqHR_PY`%yj#6b>%x9CnYi}Xy0U1(1ePgo(DSWZ*;CYp?7vvZ~zVWmVF z_dwE`s4;T+^2v9hXWZP}ZREZET38kyKU{D~dnwJ7DV4^?22JP8JGiZ%I(shRzUtCW z)J5i{58nNNc?;B@#UYz&4gHntuUxz+idq*Ex%+L0!?VA=Gw3TC8mWb$-8kh4RnnR% z7Tfg%Lr)qbb!Mj{VFRB0FyTHv;Smx2VmX`s*FWjN(f9VB{MVUtnw6eCdw6*69DVR0 z5P+q&)kvxr?iJj`UATKegU~su?EBGwv5j(Ai^W8u2`O~B%w|Kgn#RxFeq1mLkMEuxR~jcU!2=$L&1x|VGA(2V zCIWh97bc95>6%O%dz@<9da4bKpPo8>dVGBB)Oq-0S4(xlWRZA*RC4f4Je6LxYj#@K zL4Rt3ZD71XL`4Z(IgzX852Fq%SB+At4RDo0D!O|6!|y)W+)TjiC@;AO&R)23=9J6I zOMO%JXWBc6N}3bzzwg=E@!X8ZZ)zO3GO6**EKidq(h})QaQ*c!5 zH#R-yvu)cRJrGUO17|{Z1$N`a&E``x!}<|7j!1}t1s-nPRZLo*S%yUD(zvE9T)(a; z3*@DjG=2}{B0?|R)joczAF>o7ZR{=df+;6UWLzx2J^em;UkvS$3*>HhKI1l9p)fuZ zwK0cUi3GL)OLNKx1_;;(?--k!eET+~7cY*E%{@P#gt>1=-4O#(GESC6<@&-)O?c8;z?pz>YOuDe?0oiT;a~br5wV@XosWlc* z?eg?=`8v@A$9Jz>{E&fK4>V`qn(@wjwWTgo0jZb6x(;h%{0gsrUESHEE4M6^~;jmTm|)s_(p0 z)uid#O|N%r>m-d$Aq_KPw+|3HzTBKHvjP^nwY9lf@$LmS6ma9Em&ljCbTVI;V}%}q zE0c^HhQ0harAfuwYsys^bWwm?cHe(h8UMb)I*l`Ge-i6Snh zZ*HNeC*LqFn1bA91u1e@oRdmglk~69eg7*K+|mDQ@~v&RcGBC_Qzn{cl61|)t;Aw0 z+(a-q0gBC}2tv~>zsWlRL9ZA4CGMohsByo4oIumNJZF0HWMH5?F!1Dwp(#u~$L585 z&gAt*qm5|P>owZ)cVFjZJ|~X}Es7)Ot*iHlxN1E&V!bbk4opzo&MjDmriaAo+`_tb zsF~*n$n!(SyGVStM1aVnrEJ}1tyZ#}V3i7mvc+61=aqUnZ!nQo!i$Re765$qy8Cs|sznVo@yRe9>H1l}1jNZS_)4wVd8il}bL#n^+-;Y~%Ae3CWlWEz9LRD2=KV zkg3$jRzxc(R-V{2e@*8J;1m!8m_=g9R#lLy1}{tDYi5%Q>MJsrSiHpq08qmazzjmV z%S&}$0=HKyl_*!w*CmOsS4#zhl42bYB@x#1HA1CIg~^g@+BFqP*90P{%+H%>YH+m% zry@mcc7=M?tWtxR>mtRwirFI64H+5bi&c)6i-j5|OPpLa!aYUgP~#cr*UFX{f>ES__dceMs1Kv;k2PdRm%u`3xCj_%;{G=3UPbUR>a3TeEBtJ`lDMX477rK-i`b)>UZBHA43SZU5`S9o5BKuPC$#ctOuKv!5)p41C@n@yRs7V6mA z$<0_V6xvj1vUOsgMP<$kJBPTbkZ2IJ4_^naK-KqjTd`DcH0q_I%}QufJKuiNT7xCF z+1#|=k!5PFa~7wCQ)N_MmesBk`DX=Dv6-Z>In?XGwBs1kB#foM$Y}v6jJ-e>`FsrC zisnJUUPOY?asU7$YGCt`FO&%<2&7TdL4d4sLkrZZwGy7J*Cm$=sBj-r@H!kavm1M! z_mh1$^M0bnPFVa~v7jYSt{F%QNPWVgCM_-H^MH7^-?-E{ zjf+$5H9*igMsqovRnMf@zOmNO{8q_GW`IURM_Ft}gA}U<0j;!ZLOr@C@L@+8KbHAQ z$rWVhd^;sx^Y3T!4ktV7LJ_JJi6_vNRr0a@{gd`XRv&`jx|K-6sYNQA&w&lDaGKX8 zp?$duF)6iT3O^kjs8+0CUZ%Fk#@>$h_Ie?GVjE0>YF@no9-5A)JQi~ zXlg z#=^oz-i&COni{m=E5jaP%twT#>)tR(UBtw&VJ&3T++VO$bRgG08;XGfwf`R&XuC!L z004La49P=a9#9Yj;F3JM z6;K#LUsp*GWl-NXLKEA}k7$7&wiia&F_>m&V7Xn1wRSyr*j>11AK-<3g?IJ?3hgia z107{;c~-VnS}Za&6FA9E=Qnow|#k}$Dp3+ zndet}1?i36gZiqkHd2u`N>ToeQLIf;lFd*Cf&m5y2FeEh*Gv{idjmlbZLyh|nXf(@ zLU43nI1b}yHZzH(_8Y^hdTNK>Qt1{im>}sGx`rMoRhk{oPD|O@?6L}_R9?xhOUyEQ z{%6YUCjE!$SG+j(5|%BzRE(#5S_BOz@q`$Xzeg=9ysD$#)y;@93Pc7kc6HCobmsVj zTW{0dlRw~D6|6G2{uME1bb2OwAP8|D52~;`Itn58PdBKBdc>{7OvEetN9q#1eKxa` z{zwf~u#Qs6X<`L;Ds618BYNo0CYtIXnMS3~6F=uZXcB&?@DCMyu}TB!HqpaWd`Gnh z)QWr5ekHJHTZuRQUT6FTzm9YIC$YgFbt?WSo3*px#@V6|Rh&3MnR2)-^dYi*r5=0F zqxR_-XW8!&?n$h@qub1nlM%|?(>GC*DM8#gO8o*2P>%Xn><@aU!<_mEUJW<6G@*ZE} zeszlc9oIUAF5@3%orF913jaB=g5HGe>)#f!N9A|{Op^t0Tt^ayzki;!Cq1op*H0@5 znNeImGt11(%uXT*Gcz+YGc$8yI%ej}F*ECCTJo#xRQGhhrmt#x5fIbKt%}U5S*&C`i`mKh zY~n-q`uhERk$3qr-)0}*<>!2fUrKyWk(Tf`eNR8r4E@`mMQ)@!PK(_M?gU-s9(GUY zYWI|TS~t4q+)KLIz2&~4JKVS2clEOSzWb$KcYlqX_C&p-{`zV(F#5DU#(jcO#wcTy zG0GTaj507J%F3+9gM6DFziG#0zg0_NWfjqN!SXNLpobm3=>|ZQWZjnJQ>HPlJf7qE*YaN~^U-Yqee*v{75MRok>(yR=(J zt4;0d(CIouXX-4St#fp~F4kqbTvzByU90PLgKpGKx>dL7cHN=7bhqx&{dzzT>LER> z$Muw+(X)C>@9I6huMhN*_Up6yvc96P>TCMCzCmm5cu)b9vD+m6M|rMnP`m0&NPl<&)K^Q|+7Yd$33D%G{lL z8T2IBy$5o8a^EfgRqngtb~7M|z7F~!=vPp6qo4C+?&bU}2vX5ru`S!_?JQ)^_A(Om zFBgYAcc}MgVC=5Wjr6^&KGYFuR&;gz&5B*Ya(m*>+qWU%e}h@k)x;HZfI;@gqb*`q z`r36CIXvBl`tDs#{RZ>v-JZ%nVHRXBHLD@b8E~%oY0rV?x41nO-CMrceVbzOQnM1` z;xM4aa=QImV1)UN?%QP}iet@6C|3Rt`{r}z0b?y^NvNs(DbQ;E*mUl+ZVroo2uwGB zpi6ScR=()1A-J+{Tkhm;A& zWxj)!K;OVOjMK<6$d29{Dj}>bNo)~=o|bl^O;N!gnpqvSQddt5Mc*XU&ng5HMppf6=t590n(@~=A1c_;D+sC z2boWHkkm0RlGlk;_ac8}IE&{=1?Q8(G&_e&*g4^r1I$ITb{LT+qP|co^6}gw(a|_ZQHiGYwGkWzgpDS^{;j(-EnuY@E5_L zvRkd!G2BlSv;?NcIQHM2(}lZ(@(ke_K0Z@;o{!HG9u)pENJ+_T;ep`+OL<_9Wtdx~ zGEa%BMV#C_i$N-Ps`V;ef6VWIg%Y_p`~`K(3eNK_w@YpYKuerg&qo#|k*|wHxp}~1 z$NbXPack-^8yRXNcjbl<@;9HeOmZfH@^ax0Hs`|B$R>1hvOb+Yo7PmfwkFZS!2t&0Js#T;{QuP)pl zlv^ch8r-5;%_S?HlzLT#upc|~687==+IynEaO_T86AOFgTD=)Q7Iup6P_Je5H|w1i zh zGHi-f6}%*>URC$G)W0CPWt=r>EeoohM!6tGpeGN>IK$X@8zxB?g)^<&1w@+v3G1D^J(s^GOP2=?S)|(zY zMj`9!t**VYWm3<{z=0SSalK0a4rr_U&*o&FaGuZUBstrFzKKS1mH_>P7XbxyuEUm@ zF|JHB1As%KX=VHOtIQ(xevsKGd*U(3Z1LU@H!d69lUbnNrc8(A1z-+ItsUIFX9A$( zai?-;!Vp}jd#g5e(^oqWRI@)u>m8E*Oub&|+pSk&y$R`;)Ekz*I9VUfEW}`>Ejd}i z25=q(%Sg^hZ9CR!KqqOTfp4+1o(k8OZqDs&bHpMciM=@;dXoadFd67X%|dOrRgU8$dH$@ddx7})xbe)rVIFo8K3Ojsl!%V35B%UMks-?tWV9v6_~ zNuH&KF{X?<_I>g#8k+uQFpb6){fuuJ1Y4Df20F{w$_P% za2lQE71*CUc#u)1+~k>JTA6;#w__N>Rx`{DXPX&m#<0VTH{;o3CYvej#mG19em*H> zCR4&1o?yjNrrAk+PD$%#)|9Ye=1>XyMM?WdNjtlw&5_!DeNIOh^zb`;Y>eglp2rDi zoQL(yPkiKuvE!#b|H!iZ5}+$S*)sfC@>_e=c*(k$hN_w%s)?fN;#HGG^@-=7NId2F zr^3}d|IG67yJ-lsWH;3(Ag!nG`_{_j+?C6@%gVW{A?L1+oV&Vu;zFKrp8~-c;Eyph zVuV@``*()575qhQ2j4@@(&=iK>!(#D{r-iFsG(!?0r2x=UWH!(et8r>0Q^ey{}a9u z_>J(qV2#e(Z!N>`r1V#!`Umi9;lBv~0{Fe~pM?(rf3RFm9z%qYnW~SWDKiK#VZoj} zFwP?d)YiWZfwmaa0lA<1S#K(}FZ0~YvLTh+0e_5fW|S(FiyWmB8C7)BF%-n08L_iyaI@PX0k^0EkiBYn-Ps|&Jg|H$1)7iem$o8 z2BPmRrGb>XS{n+dysD9?y2gA1y=Y^8004LajM4*a1qmF);hFzF)#jmWjHd#D@07ChilML(X8CnsMvy+?6BNi) zCucXqQPb0Ni#TEZrO9cWHoMUVlQ?H~VR{yq{AaKFLvL_<+rrY!Jnq?aqxtpm$flc? zmE$S30cdr=0gZk)A5g#(Hh#*~6Rao$~JHy&!Nw;JUzLf%if@AtfO_p`Os>(6Z10 zIKNy=+Yi&Y4-ernJcZ}*5?;ewcn=@p3w(ngX!J3ZcQBH%Ok^sTX9javz!Fxlh7D|C z4~ICxRk=3T=PZ}F6?fon+>871ARfkJcmhx189a{{@iJb;8+eQEb`KxmBYc9-@CClY zH~0=e;1~SP%mNl^@s?_7mSaU$W>r>aP1a^z)@MUDW-HpNwx+FXGq$14+M;b{TiJHD zlkH}EfgA^MupA?ixn0Wchh!?g~QBjiYFklkeuIZF1Fy<~6MMLd|2Pn$IdYEMPU;U@T;fTEtqln00Ci>(x>=fNYlz>69)Q z9%i>zkMv3(3{SCNt5KSy8OBVuXthd~OvnI;A3=I$P=;h!Mr2gR;F#ZH_$~B3TdW#l zacZc=t6`R)hFhWCsD@cV@f|!QEk9aJH<&ljX&AuVGtu&6{}%&tbui~K4!5c zw#TkG5GUY7oP?8c3QomoI2~u;Oq_*_a5b*M9qvE;r?$!g# znBzWTHiZ&*E^X+}YPNeuC;GcHy&24CCfi?RTIt>WJFr>=)<}W1$^siO3ic0SgJ?@v zS+XqbvQV4cyKU*+Ce5$b>fMv5ZZsLj=n3ZD9j418gejp>6$V}$5R6{95T}2He3moBCbQf{vdG&1MQbb4S>ry%X6Gmy*9#3M(H{tRb4(<8$#o#W9z)m`>}OC;VWH38!gb5psOjQ_w_{8PB&ACoQt|AswnD;^nY_@ z%IT`Wa$QFj9yg@E+?1-lCFOi;V7YFOYPaZ)z%t$C_^Ipf#?k5WsO4JZQErTm+!ph? zGbR;%VK5^Z&s05>eD4jP`;Z>h{o(UK_&ive?!!ox7+qsuF3=*a&`S5&GiF)zOg;_$ zu5anGRy)o!alDtup_TmLkXKOiANjP9@5=!>x#;PdtGJqLxR&dukMku#L9KHrp24YTInP zR%?ycYMs_=gEnfDHfN)<(b>$naFa^+ZDL%tt+@;K(EnVkAM>|q_d66f$1hH+s)k~i zRbX_-=m;S-Cwb&AO15&HSjbnQS&-Ajb+H|`)BJ}~h&^~OE&l>0;q(`H0Zodv6#_v3 zME~sKZaErW0hBHOz6o*a=wfh8txO1xk3- zY0zT8h7&#lkeI+XTdpn#jM^nasUV(f%*)S z000000RR91000313BUlr0M%91RqCtis{jB101V9x%^8{*nkHr@W-~K0Ge7`90002Q CLkb=M literal 0 HcmV?d00001 diff --git a/apps/docs/app/fonts/GeistVF.woff b/apps/docs/app/fonts/GeistVF.woff new file mode 100644 index 0000000000000000000000000000000000000000..1b62daacff96dad6584e71cd962051b82957c313 GIT binary patch literal 66268 zcmZsCWl$YW*X1l87)X>$?@vE);t4{YH1mFe0jBE_;zih3)d=3HtKOj};a$8LQ z;{mKizBoEx@QFoo%Q3U|F#Q_99{@n6699-amrKppH2XhZHUQxC)koh9Z`96Da}z^j z06>M|%Z~L6Y&1qSu;yQl0D#8RSN+!)NZ{U~8_aE--M@I|0KoT10055byf;V0+Ro^U zCui_=E#qI~`=w~)LS|#={?)gfz?a>x{{Y1Z*tIpZF#!PdSpa}6(AxtIw;VAx60fHIlil?>9x#H)4lkwAf#?OoR zq}|UH1-_GP?ro-XFe6E6ogAsB_lMb{eMTseU$Q#8C1b*`2YJE2UbHtB7q=F#8c?(} z7MH~UQP;KATrXR0jxH^-9xhh?btgLZV8`yP{4?~5t>#`dU`oKckttiKqS}=0h)-TL zm0*m)Fqi`0;=bZIlJL!*^OrHroA}Fuoxd5CU8V%At$}@aT%_Z<7=JytQ)D?oC4fu; zC9haKy!Hbi0eF1ipxzXiPt=aQ5wop-RG^?s>L>gO@@+lUXG(XGZgCD!0D&Zs4~^e% z(4?{(WBL;9gTH%!vIjaaOL4-?5F%AuAhqP$}Z5*a}4%FHO z__`OOSOe6f$5}vgbHKxcU-p9ue+OOu{ZSHabi?^-WyLLrt+h>i_s0J8MO%1(?6KJ{ z63srC7MKwg5YmV8R^udkjP>c;o0jS%3s1#VZSd_ZMMe}<_%<&|(8tdaVsob9SlD{! zxA!4>pO-DKVwcU1_Qs8{!D!x(rP>~w#&w_8M_z*m4KGu9`d7DfIq*xDA@Pot6Re`h`d%{lBo3am-vR=-J-SO9A>&egV84q&m&9c$A=5 z%sfs3V4GByk@8gn49E{h<(XwIcWcps58AEdX7(zpG>h`7(%)_eh+vz{k!pm%BiGC` z_=5Uzd3aO%4=d~2*uWjw8`-E&TB2z!BU(IgE;XDXw1NdI?B6(MBrV0BsbKgOQ)gVq zTiiW$Yclle$O3+`9mkU9lI}kdXSxZCVc3#pUpLeJh8n71U(M+H_oIWzXjf>?Ub;nl zgr}Vj|2|%YuvXf+F+N$AD`H8>BgpF)5=3ZV&6AF!QO#3~-9`j5fsyJ#B#%vv4OtoE zoN*Lf4;gCHrm9!=;fkWSwnDPm>OzFyN{<}u3vWw{2o9!32OW3*>roJVbmjZQzlG(e zE4}U2iH!Q@$Q{J!?*)q_&o{ma{Zw*#>>xizG(K?ovKtF`xdX~MyHu+y&V2B#8?UA} z3)GS+=ALKVHi<)w-QE08#-CNleh`G&y`sLDidTfmrv{gWy`!r=i}Q2v#-<1h==FuW zo4*3ygV;zyKBgxN{?HQ@hj_U+#I$gm{DHH5VFhB{&2 z43OeSH?8bW8=avoZjrZrTVFiF@fH_w@Xx3vrm3WK)B*ir9HxIFotJ&j?Ql0|_MlDW zFAFtz22CtP@SyIE`u?GZ)=dVaum({0Bk5$QOjPFeR;d)dg^tAMWb#XR zx1N+SC{!SJ|LgCF#-Y>9V0n)&ec+ON<`=rB^tflD@PO&5dd1P!f>fx9N5?Gz0tYaF*sLZO0G1fGI zJBmO(<#@h+D1mjw+HK82Tc@$VtNxi% zE|8*n7FS*<*b%&+mElheV^vn-j|^j#B3O7EpDyIt*oZgUdgrVD+nieQ%oCn z=tvim?Kk=%r6-5a5KYn{cSN(c#);ls)$rs z$>2WG89OeQn+$u%7X^jeuG!?UPZfU>)k2TT`WR;^in+~$27hvw5jonPA>KXZH+n=U z-HdTmV=8Uz@-l4RwROKIHX;)pYhnQ{-gA8{I9_E$1U2#W?a|Z=G1jId8eMbFB2X74 z`tO++;x+F#xG;{RF=LA2>8C&>LFr85=i$Wb6{aFrO{Wxnxot^AOP6_d{#zLQ$rDOh zmx8VSzye=SUQ$IMq75xI4HXEA59Fnh)i7cO!uVPQIAC%WY#)85)HZ%qC7?%_55Ys0-MmZ(mFLWpk4!|Q@tKYGc|M5aQKvdmMnP?P5ZYRPA@UcNk!m! zYM=N4>}|X9#ViD-@-{OA)mQFn9XsaS7Y9(?%-TyN$#35%!F`M`?q#}XOl%HVhbwjt zCD9hq%W@?Vb7iv9#SQ!^zs1Ahj*)z0u^gwJ$gQZK>LPl(dju$D&tWsLLmc6KaS3pr1Z2W;DVO|v_@95?1- zMM>VRwrEw^(?(cgn2z03cSM3w9re}A9@&J-iar~ThaWK;6qbgl9R+_nN+$C===>ifAHw@+mVJro54y_ie`FBKhGpGJfp{7P=$nYHDU85j@aE6xcjU`6`n+UdYu z;k~!=E%i><*SAqRV{@mB5+D#ad!{z`YfsejCwwfQ^S{HX?u$eA4ev+DnZ3iM@r`m+ zLRU?0^iI5+CYyk-JQeAW21GoJm#CuR4}=^0OawIPmLf^Bj+NP;px>mQ@ju91?hU?A z@^6NFDk5sm}DxK#dVoV-L%Npvrr+ooO@;l>4Y7QQ- zdW3cE{K)ywgL|nTIL7??f&XRGbC`}V$#eCsHr>w^yd7NU`;^EDQzm7ei3K5D%lm`+ z_NbNiy=Tm2b-)>1W5&6%wKhpFs?&aw_c-nSe6$OHn}oFM`AT6SSBsV1dD$@{#%ECO zaiNNq2pee!IeZP@I^E+v@_!MPqwA4mCt$2(@-z0LcW4k^>Eo>KuM~B@sNL97E6TFl z1)4A2mU)d_2f0GJOww_Oc7q4(mz@Oz)qi8`E+3Ka*{~&X^P|?>khUM&hA! za-0+zz-fA;NCpK8V8&lEAj~kov2%5g?yoc=(AvRjAGX}w(W#TavcyO)!zy( zBwy-z_~z`5c)^_D?7n6Bk6s#PY%1IH^>8*9DYTP!!0{`s;pmNC!t)DD8_4WWoHDid z?f}^jLEV%i`>#l)r6O{$EICF?lGtwyEIZdkw3-n3GcpRG_G3g24WI%{ z$9%gN{?t7?aUhEagsS=Crvcft)p%O>j4XBnA15^iRW@>yZTAu@VcFtzH z7Pjzcy@{m*?pI;}+Li)cVqSjK+o9$8<#htd>v|Z!spzHUXXhL2&VAWwmO>TOz#2F* zLKBCt%h1UO`bcZm61+W2uiv-$*AWdy4%*JD#Q%mVN~LX?P?L)W5)_vf~Eysd%ifN06o<4DrIb zo`rgBZ)aY-Er1H(R(loTgeRKc`aiNY*ov~%7tdG23sIk0S|&| zI`ym(F~+g~Z@5Ak*#hsXsk%wMma1o}98R11$`-WqDhE~YQA+mXDy(Q>%<^37G)?hj z+kV3owb?Lm^=xvbUF5qgnn3}%i9dP8l?^m`M069e_$gUu1G~Si$r#Db>RW?Xxr1i3 zU}3e66CnC_N(ryScVhF%p7!Zs;o9%K&6EYZ3oRWH+nY=r>ML5RV}UVM5LU3?&R^3c z*yGY}>NGt9GBX1LpI6=voIS=^Xvm|6n<>r?b&=nFv_-Z%Mm7gp! zSI@=w{S$c{z45YBG@x~lPoG6l=DOXaZPZVlw2+33otl)CnYysT!Y~2K-zCtw?30-Z z+j4f4G}f{>C*}kX%RUJeNc7CBpe@lm@?8X1D0HyuJA7fg9{pXg(i_i5pHz&enAz99 zWY3;MKvcgk8C$XtDv6Yv9nuV?irv9MVk&VuUm#O*IQgealiPX?FMl0-hGD?jlbT|; zME&f##=f<={Z30HDUKa?&A?`}^JL%n$By&#!^_LLX#Hw!dL^x^o6ADIYq{oZ_wI$f zBPDV!nu9vX(9U=M4q63-<+v6a=_auzKjbnp>~RgNBkd^lU158+SLy@%Fg|_0De54h z^rK{5>e-9~goCutBe7pS^s-`ZU@;qFoc`@|Uwyz__~mA3V5aaYCZ<4e6g-K3SmT;h z@it4I5vQD*>)Q*Fk+6`Eb4vzkclOo0&Bf~(wh1Wr-GBRg!}h;jXKPr10(}{2!1D1% zZnFF}mr~=Vjw0b47Mu_oQ`l$EqB>V3NVJyRF^Qh4r|cIXJIkCIu|e32zE3D{>g4&%2EEepV0ihrnN0lI*h$OJUUNEJ+f5_s5*kt zmQfjSrXy0*UszZofNBGqi063mn#*;wW}5WUXL;JVcPLTyPpbj}@IfE`+)C3>1iy6( zj@xZ`!%VYN^QX6s+4^nia$?ubBc1sgz=wkk0rC;u!2s(j`^WgqwSUq;DL&UAG&u(% ztx2nnfUn_>ZkfgUW8E9g}L@NcOjYNW~s;MKbcH~h0cpk{_HWNdfijblYz+h2z03P3!{w_^F+Z{6(m;mYyc?e=$R~S7W6r)rmnhc^ zWDY8UgC=qhHXPr6E&p}OFapx)Yqfq0c|%ScJfo!5%;`l<0^eYMGZSctYCudt4D;QS zllZXAwPzujN)eGld?PN9>@xFHYu!q3RYPgwD4^+{ZX+R4pqMO?|LJJ$&|pqT%}z(2 zws%$GBS~6_4OO$4U!NF5sidchXC;p!pWSoPq9I=D?mxL{Zt)>jI<~1LE1+Oz;S?N` zsjnlQu+gxjSKXW_*MzO^o#-wU70)7mu(uLfuB-0YqK5E?-e-<1nICGBYERzbSu?t- z1J9I?E{8Qu_&Px*?|>1;GK>itJ}M{~z2zc|c`DfS=_rwR>wbvoH*rc9Ca=CCq-4Jh z+IxAat$A_beud7*u*t20_~6e9o9BJn_Ho1ME|LyR2HWhz8j>^3+Tpo;1 z#OP$C#H+-wZB1(eXsCdjH8Y>Be8*l^l2z0+y_nU@-|33tBxzRwJX*%MM2dIi{#=IoY<7?7I@41JDTMl z|9r8UIP#bjPm~nR+<#Sib?~q)WS#taf5E>&WYVfkl0n+1X*26v+XO>&f<8pb)x%vS;$rMu{Rcy+BTIL?an0i7iczQl+`d} zYwfz$K@_rR)TcHqJ%uE`{3$4djVoPQ;Hn?ilq^IOYxj-eWN$8weIZ>f`k+fXTv4XV zxXVid5tejj=$k{SJ|9C8d_7#uwA^RYU!2J#ik0bpw9U$J7X!0I3Cu;srmBFnZmXU! zu!~xOmIrL+e;d4Fy_Yn8BTM_b>7-kEqBb{bS3=bJ-^ zArybG{xTk8B}Ff%l0yRj=@m6PP)-nCvyy%R%;|U!{>YrP!}BK`AZ-hu>ElmSHK=&> zEupkk&(|o!b>Z|PcSs`6=3@`isI1|I>wG~8HCk8BNXvslF zb2qb{NmN5#uR-97^5i7Y3#R5QJ74sp0$r%yKu?ed&+ivClsUAJZB~9o<~Q6;L}dp| zgxwnq#X_ME*@s7~+yMyT#C>E|gD=JjzeA}2|Gfez+Cs^Y@3HvO`zi4Y z2oH@RhUH`=t1aWXIifih7aEhgjrV*`ZHH6adZ_+ar&ZyfD2E$B z6i?p|;Ppl5a{2F&Nn$CdcSjfBzTQctXYmW#oGbBx!zpUKne^JrV-1O*A zte39UNS;l(F=?FNaY}cPnV{;IWxW<}kbX@ieFQx@krv%HfvG%4XlKg9O7V3+8>hFt zsZ_-g>;fy72bHS{qLMf>2diP8r87W*IH+%^i_F?^Vcf&!KcIFoE=h>1+K_QCN5_s_ z4q#&aN9h^Ld$%bf!>GnfOUhgzxE|*hE-EA?ojuK5A@-75Y%0`lR@w?JsH>*y%6tpk?I`Tui&N%cfoY1R<> ziTCSG=en`fKl@2rmFUkA)=$oTW&^T_;Wp@KWjYX;@4#NB@x@!36O)_Th#4Bu=8*MK zKC=NwyP~_@yce6Gz$)Y@)bwMU2i2q)9rf>$?y76AlgTZUdG4W6;#_}FOmo!8WcV9? z=tw8waqML#6=2IOVbtwANc83v@=3>m-{G0{Ny)8;7W=g^yEtkE^>yoYbICa)d+sE5R5 ziLK%3zGNws91-!M=Gf<__>gK>e=N=WaVosXzjacH1QSgiHH~f)O#=+XaX|Rsy<^PZ z+N0swA*aXW@XXfN_}RltlFet{@n-5?bzS1KAire&KbctG3g4A!B3yFxfvaUB0=oHU>7e+qgGXcrRVL zaJBKZ_7?3UZ~OFGJ@XP}4U>$LdyBF54(1j_{1m|hWwpUDgwKj})AR%%l7uYevu|w~ zkBOe1zQNCkzkSc_-nZ%ZL1wYmEb(6jIMU>7Yg+K%!3ogU`%s>|sEID}D>#`ArT1Xg zY3DbPR2EFVq|exiDiMyL{;h7zv1OiG^7pKqV>Nm=z2UX6`q@g1l92J6cc+a@kZm*I z1)8d3#;T!<7VjIabqo@eyQoJ)37|fr}Z$3c;pZLeiyn9}` zOV#On7kX{lo-U2XtHNsMgs1tS-$8(nM4yol$L~+TU_|hSo}B(aT+{L@Qqtw>&LoFVZ&5)JcX<|jF-?{%dp72IDUzD0V*CKhi2*j^8=68STUt&br&iVp zT&BuNStFLR+Z&i$V42R4;X^c+lSmq13oJAc!GbaOKI=Lp0;>JnzgjCjp67xP4qg9a zdR?9CTpwbT3D8_T3Xu@c7&a8<3RUEg#=nkbg0w+8cqc?u^a08zbMm@Aj|2z%eC+0^ zql|__mJH(p_&ZY9I9)`pcdL0P#sxFdeI2ZfGdQl2{heylGP}w_1jKaz3a+xS@%id) zUXNpAXIJ~d{kp)a&3uJ>KeBkF0>+^h%Q=^5J_{f0O-z>PK22*&cP1cXs-$D9ble+= z=~ByXN64k!9VyHHrr*1R(d9x1ns%vcOG)`V zQ)GPJ#*rwA?dc^MkkKtXkNRsa6q5~dJ6-YNo3j!4o!ms;ejpQ=^?m|rTJiRsg{K^5 zM7|8=3C>L;f(3o71q@ZNtzz4^=Fuj+G^&VWgU!g5T&)PxJb%5;=Q=oV5ZTVL+>-dx zhhj@57~9XMJMd%ThH!JwXU+%2)FLU@1Uk_VOT~m8v)Dkv{-tP3(1{W3lsxylL+)Ams{`mFkBBHjmQA(dV4hlVkETa_SZqb@%q znl$-FD&x1SE-}P^LFZj6804F6E=n>Fjh=Og^ix@pmsBrc;SD;KvAb}^#tTq|XnPVJ zpT2sEeG7j1wQD4@_IZCbtQ+%9$cJfH+nzm7ZuJ_=8dWlMMAS=kbX_atKBec%d{?j6 zMT6`Wiljm1dZ+vZ>{ozBVSFPAiexw&_`jBDO04g7sG4t^{7&T_s(;7^OJkPNAk7EeNPJB+3 zvnI>9baeSf@IPpZWe^9Ev^W9*!{4{x=I31$Z|j8kg4qYeZnj)K>zaEC-uPo>RSdLE zc5^nm$Is!d8}Ln;f6P3~vKgXj)_-B2uSEdl}Se4P3<09 z^@w?vWg%xH_Jh8+7{G4dT9PLFNw#Cn%B3(2XpP%XOtP_Pkbs9kV z$Q-3kxGQq+N6qKq^axgH)t_hF!-n7lva+Iw5CB1Z-2D814juglNK5g0+ch`iw<~fn zBWiwk;dB}#ap%1RpZax*IFkCNe69y@xvGr^2Afgy<;hRjPZ&4)J9UVSLbPd*Li8;& zj#t5gx0#(>uO7y{KHFrUSnY5iQ0@N6dsnw_XV|c+=cU4sBcs8D_UkF3q_a)o2PEyF zbx!;+GWe_i*JgQHGt(zo)>&;KdH-r4|K=fgzy_@zMbL|azNlnsLrvmF=z&Dr_F>=o zOyF^3ZU?9&s$M>Umkl(GgqVraCNJfNUCn%G@b_nHt!Eto8>uzL_&DQ#UKq=` zEOCp8rf~adZdQ?Loa}6dzb~63LkY2ne7g0#S%1Qt>FW9*{J};0(eM>Uzxxx+Jc=Sw zNbr5M_&QPzoZD-!SVIZ2uWzT1bQFtWLBLeutjw; z$)QUUFgL}$slTMW_j9~~-^lx*3A=|OsaHGxyolndAN+|6ft0Ht44TqVo7R95)TnNp zQPr`<3|W_hYJ{+oFnY|oclbRNqpM?1ZI3)7DWPW?MC-KgzoKB4o$cuW)CsOirDD1w zYu)U^(;c3@$p6$5*I$McZuo=gLiFH--|M}MGVvfh^UWW1Xk z488s>afB{8n19#I#%Qg?lGX-cA!ZQ4>3`_FPJvUKpF0!VF%u(QnO~)ezL2D@n4T!J z^TLk=W9ioU>M>iMaW}C(=-VESzwQY4UB6i(J)vX3hlOv*D;9`p!YA;Jo09ZALCS0x z``9xT+*}tmjgwkb^Ht;=)Ha!3m$Ej3da-!tbc8;59KaUhVqo*5YWio)fbPmVPBcs1 z+E63@FJJHMU>@vmiQydDtYDEDw-;?c`FlUhl)EW~JP2Mw#)x;w4hND9y52uN1_s_U zbd_D{vg>WVjMxf{SyxjYYv!SG;qijw`Avz%TbMSMhM?mvIZsNd^g$c$N zjY3h7e`WP_q^S_Dy4f4fx-AJ5imltL_1J#=C9HNs((E^m&@8SiY?#ONNoMOI@>V{| zzt8Ato5|}rgG6+Vlv&z@Jl89_!mE$lDYbygNM$O9HcfPZ8)J&)hQ5)GD`$Pp07xQF zz?AEtd23`xy<1Ka)JF^Wrs@gF){X)*UPwPU%$$DHY3tQ6>{Qy( zI+f9}N*VO;dNX^!aO=whm+vK|KxofHRE+nIq|`WcH)SPb3^IW+jjZ=GtMEFhD9ZBe*g4qo_y3(B`47t?#J9n|fsREt^6+oZnYE|O>VMg+UqNs?XySy+NRDe)ZhJ21Dg9^xuAx;~ADlE4?&9K+FY zLY4OquJPQc%9&G=agFz$sVapHEv;W~Z~-$7(71afdx?2z$CZQEcPm+W`E#ptJe_EF zNs=>4HZsJh-4Qn(h6^Ly;cS>|l~Oy?Vb**xPSqlKMvd+md;Jbp5$L(AjPu#&qk;SC zAt$%M%wCWtQ^L+WOVlob&+GL-GaUCk#gJ^FLpSQBfr6E<#a#buo+bMG8I6`=zw;r!Zr#``Y6%cj7(T>{_-N(%43famwv!j2H*;aMnE} z3GVb9&|gq~f{@+%UQ0=%)KWoB_Ja5(-oZW5k!XrVeL$#1)yf?DPP>*7gtBIkO=2|+ zk~!gxywqm20328+c`k!6&&}#+`iC12b(fR~H@v`kgQjgjkhYliLxiiTJFyoT;X5wY zcxSuxt=;A-b_ohLABKbb?a(Jhv(SoLXjJ*6#VgC^Io-IMR~6zl(u$kjz>u4tzd>T> z`OWiT@O8#+O-b3Dj>Cs(NV8K4hT@nw0v)>J!1}~dmAfC&V&Zcm*7+tb&a0Z2n8`=t z%UU0!STkH%} z$Gl|&T*vRGX=^F|=5m3yDO-g-DW8gQsZGYyk=GWZYos0>I=7MG=mlij%mv9*cE`-i zOfyQu?`5;Xqoa6A?@IAVZTZ+GKMps-AN9#tA#vufqKlEtZ$svUYH7;UrL&7ymjs2h z|KJgsm=GK=mx9x=_IzQv$QXlsJgVYsJOU@iW2Aue47K{Mnr(% zls~)ux`ll{bGrQkeB|0MiR_WX)dU3Fd+OF-Ge_2T_8?>Be~_-;ZvT)7Zx!wtQpoYp#(5_i;Y-fOez&Vj(Be{*bW0QNL}yF}Evr-^v_z zz`DK8xp-uCA?9=`PCl{K9OF*$Cm#5y5;OM?SL#}a#eLWpBhNG~@!M4?Z$4jfC!=gm zwl??6gY&C;;dY!;dQ0gQq^Oe0;%f}`irfoFJIxYe)A6OkkC#f3**Mwr55;81L&Q#h z4uWd~D;nFML_bM6Oc{`GjE-N8*A4VR6tbVinQavNGX(AZ9ne1yAqUQbT+waTR?Mf- z(1^OPqjl>UaH%1+UOZPb@dmn)9aTIjh$&r~avj7?&MSZ7ScL*zE({Z&cFZKv6Rs=B*a|GANc994A_xCl+Q`(OY-EcW-Fv$LZe zgIZN8U4pg4tAIGcvk0PLjwhoB7aq8huIOyN z`E5b`yf>PB|DN`}Lu}QTO#It#`Hguqc>QFXWJDlzEvMW0boIu_)MOBy(+b7MyFJ?xJ&+m}|daP2c&rshQpR z)GHe(QM5MdovXb$_%7Y(vrNMUtr4Yjn!qiQA=ixG3GH;1o_+P|hR5akMmE-M*Ms|i z1zcxF_VRVeWruX?W?FoDYr)}h6sI*;r_srH#qEkqTOKig7dN0^n|V^>(b-Xe>rT4A zPq`G!qtB#EBi#=wtL+upix1#Ta)5CyiF1vB6@sz*`dEY%4RsHD^&B9-h4mg`dY8x7 z_qZ?9dG$;j%KN(2{QcDTEikCJ_Yp)=duVdShqLMXqUZcR+3_cbp=_-2mp(`Io)J~S zFAl*AZH*t-rHT3z-tb6K2+XM0&3jcV?|oi06Z^?-6K&(f?2Z{PdVr08yrcFtJ=|C( z=PdRx-g375e6xI@43*Vhqn4SE;3Yl~Psq70Wa5WZ^LtC`1H@ip$VdGCBQf)3_^>k4 zr8Me`cr1T*IO|7V`=tNF%G35Z>{6%pImj2~0Q;yab~CH1QLk2})BHu3Nua~R0DD-H z>A@MT%`-#?+5~~3RlX7mc6-3{YnmIpgXfG=rKza{J>QoaRBXcUsfJY*4uWc4>uX>f z;YN5AT$9%>?^qn-sI$j#<{O|-pa1DOuQJgXN#A`IctZ)`h%a1qXvX{lQzj*xYo&<$ zIb$i9ixGfSF3|K1a&;?++Es`CP>1Sx_`Wq^a^Se*?(=izf-dxS^D=3}sYHF&%Wb0k za~X?P_o-`s4p?eSoIb(zv`qwQMo`-^0!B>BB+T+wm3*IbheA#Hfnr))SZBHSAZ z4eS_C>y$B@v{{G>!U8*7kWc{peLy0kp=;NT3SR=uIp1x3KEH90sVP5~g!6&rn@eo8 z)nZ&OldlPLX+U5!^1U@L)6d%grvfNvT7d~YvxXx0yJV+JW z>V$;VyO-ZZvijEI@THu7SJuJ(+inZ3f0%=5tYhab7?M?1VO-R7eYBwUm2FEiVl{W` zZsI228CZIWoMRr6?Gcg7e9e7Bm3{3${S-VrdSRM!kyYZW<<7V>3@JJj6#^W}Q#Oyi zN%4)!(CAN#GA-bbNg-<&troPLENSK6__zm49n`e(>h+4tVQV~{ntLxMDPP2`Nz9UJ zH_j{E7~py=u6`1GlT;;)+-1FmlHe*=2^YZYYFIU}s3x(QEt;e_dp5GsE}GS;Yjfwh z7WJAw0GcYg)F&#+_2+-yZTA@Mp9OM>drJzdj~zNDCUWcYDbb~6$2~;H&5@&3F5uyu zlpzWm>RN&8xG0O4^Ei0%)0XknL?Gpx5$Fvbj zrjP@9?#yj#Xi7eUK;y80gEP;1%|p0ir#CX9vKy}2+TlYwuq!QV4cjgh&3SdJ;^KdA zrd5@meTVihq&d?MrBRe1Lvi)Yf8#DlpkWs*b>Dg(qi}a)aFM=VoUPy8)Vd+T${eM{ zn89PbY{>3iDWyJGZ~XnG9eM0MKSccm4XG;XWQ%qRs+l(S3R&(59I)|IoeUosjNqhM zul>F@wJs_|#T-%vEua08J4^~3u%sFcdd&PM?upyceQ%p7e}XY*D5+1vJLo>+gy`M# zOXV{DQ0gX?5jtyb$ECyt!sTCR6s&`L{8?GvqU`*yxEA@yX5<-_Th;O~_UK4KL-(=U zgY*m8?FK(arYzh(_X*T2IqCB>qWd2pI>l;Cdf9nyNZ6I0^fkMVV=UN4-YDjfAN*9y zuGA&CPxFNRUGl;+pIsOao{pxAW5)x0aySe1>=7zh9G#0S{5Z@B+>?cFp0qknz^GCS z6Bl=f@_agDx+q83L8Vgy6^e|c04=289z#@%)S~3u$sGQ@#O=fR_;%re z{piCv?e+oLQf;nbp!Ya-t1~tpDHqL@F!dX6y%tVVF(E6JmelcdSdJpCHb}2;}aa zkk@zgTc?BFnc!0xqF%uxtrDf|_@ll}db$DzXKtS0nY$x)?oyw_<^k($+OZp!^JV3t zqH5tCLsBDTLEhi8`b=bhnJ60o|M94@fr80rc=m=vRMl{963-HZnm{mC(<||dNX8Lw^k|t^_-o{YXWA-TsoICH6tPD%?-ZfK2mpkDK zHKi;bEQ?_1qCcToxpUrTS(0QyRXrj`DSAkSu&^t51+cny?fdvNZgWPtp5Y=K{br>y z$ueJ`_-D~ANmmIx-c6(N{tjp;N!Vgxu`cM@hv^ve=8GF?zR zK=wg!M(GxY7zq#JgTlCd*rj^aIc%A`z4T~MeoS~-L$7tAqO@8?D`jRg6LZnH{+iH5 zsqdFfY~M#4AN`&5w;;*w=>1y3etqDPDNNQQ&;*UP9xbpL-8+bRstIN`Gjz0UZ(J#` zb5V!yFAQ$C^iF*Ib-~qE{BI>0DIP2a8KgkXn8~2JW=rs(roFg(d+xQ5{G~gRYcLP2 zvpxnoOKx#=3VU~tZyiKjK8;euXsnS*G_BjL2ozE;;ozoD*-Id}SCnyDq>g6J?ac@q zYtQz3*CPn8_C^exl^@oW>{DwX=u~i8@NFfLedDg<$f-MYd#yOQ$?3lZ7x=P}MZ_iG zlJ7>8Xab@bK@qRtYOg5(K;I+!z-N9NsOl+j{(mxiPTW1=EDeEB&S*32c{p8cAq2 zL-QEor6gyn{fpi$?UZdOh8;}^EcDPo46s&;TWsLb**!d-^UK>_-1y-}Jcu(7B{I8x za%>O##Iwe=R|0O=hR*i_5)Ix4L6vT%0M7~P=zec>+bfO`jH5M3@8f!a{m`j4dquPR zH_iLI2iDDHSElfWyDqG48tP>a=%I z?|0#@f`xRF@)L76(_pQ%Z>Qxv6_p$PDKAYWr_i7m@tEFPv_LU_!9@=I=3%z%KRi(a zvdOJ~bDuJ>*^y(lGt6XAHu=?Xk)O;_{6Y>hK9su*UW{^45yDx#At2tg!huQ5gq!;z z=bqLpDqHH1c5Z~|skW)Z2r0{M99}}a3r3G4=*rc`o1JiVEy*8&!Ih^?7cr;?Jipx4 z{0FUX?VG?B)}wPC&QD1c#++01q;9HUv?#Tm-7)jMX=Wt!dmbh zpWusIE@O`jmu8<(HkOy4|CEQLZIkXWYm;jei4t+)W!kBf@ML|H#M>~a`_~=ee(Nt7 z5Lhu5(x`IZgL}P!kOziuX$zKO#1s-a1Cbh;&9=*)O|~Ff4w8+~ZmwOZ^Dz1y@ATWP zV$dx^85>bx^Tde_2v(gX@_Mn3cl{)0J=G5XYOBxqw>_xj1%gLdZBTu_JvfW+f%)lQ zT6o_EhwP?1r+_(RoXlrqNHAfIAkVipcMEJPD13cfBt*f=UozVzQ9$;r(#tyc5g&fB zR6ilW?pNAe=MIEn_5bBVvx}U`Bzego8U0XWPM`I+oCWeI9UB}|Nrep<_p#0X>{z5% zD8~JGTyqiSu5rgWKXX!=-}6uS-5Z-b|AZK}v-F%&S(6 zEPe;|5fF5G|7eKpC2P5Hu@ zxXbm|NgqQx`l7Vy%KtK|P9APXPkOJ%QcpOaCG4i4Xeuyhb$w?AR-fN-UTc)L+T(FQ9VOHyPqPrC? z)grB4n=O;n**2AA=1=Yq=_l0n9+A}L**0X4Vs)YqRQZM)FQPynYW>(j->PDH{cQA7 z;z+-c0;7&W{q09lboEzA?YUd#mE41DMVt~D8t3GsmyBw{%2Er%A${%Hx`|B`HB}X_ zb4WWqF+IsX-IZd>y^L-)bxC!Neb{|%Sk{5uGyj{FKk1Y63yBbEX9|}MiAnBb500$5 zx7VE7F)#S1oo?g71etXDHPL#-%0NfmLs!}NCqH}lU+8C*GAJsH^lDL>Wtj!_RD`?< zaHfiI*blCmi>&wQD4JTq$*Z2GuQTg{;sK5M-B^^eh|UR8=khTgXo>kx50V8|r;inV z!)B0AhurOYjrd+-SGDpEThfjoK7#SYCsMWY= z>P7YkL5+9PBB1LBe=C7)A={TPH?y=;=u%4D>q4$|kgI_0(cn)AM?EKQC1+_ zKtX`)Z&cci!uc8Au;pf$*HS*@=7AL4=I*WYUQyXMoirTQcf1}d?K&q&=6^RNvgi~4 z9t^(us$1rfxe|!T=JH|w3pv*Jp|}^Re$@y;eC*>{b4_#10U`K_`~zK|CXzznaLMSQ zM88*atx|VQ(@>+G8n~djt&3|BZ!4f%4m(OHQjz<96m0ixKXfpY-=2VC!R5^CnxF*( zwKtBn{gb*N-NpN|qeQR=g8@KpQXDmac0nBla4)}2?r)G1c2LXIoX%&_!h&k6Zlxe7%cZ#Cp>b_Z#CMUt7GEg2T2-l1VO(=3oEh!?bzm z&>D)f3*B74eq%kzJ2tBGupu3k;ayq}f_rR?wA!Uivbkqe^h;{{pyZTmMSYNUz2Mam zlPq15NX;Kirpnns63I#}cUF-qq?ssZ6s^~quu%x3Ygls-sb{0Yz-X6y!kiPgQxj;a?=n<*Vp3XayHTD@# z4+Kx|fC>H$%O_?rHA%z&Yz09}1$an>(m!E8bJm-s_=QF?#~{aET=lUZEd(p8bHhpj zbu({YXPZHzKrr?rBoC4T4@#lLdWUL;K;Ark!9`|;78CR+3c{Aad~tXIOpgeA&ZUi+ zmR2VTFF0z@#$LX1+tqA2=K&wrCwY7rOs`~@J&hC>7;KjywBz(^PV7X=KY0fLj!^;d zNU((50g-@?a%j-(qJH@$o6S?V#vV$Rt~eGx3rs4iQ#%^CdhWq<*{n)R76NFhMkzy2 zgK@sU(m#7#K)|0Wm<;q)zB8p{0s5w&D_Wo)z@`@%cpZh~--IGAE`9K=mSUS+>^$Xu zeqW8$3>z9&6tWFNnqJ{Fn?-b}uvg_^%?#7R$a4K>2Gf1aBgbo%X^QLwIP$>pKBkCB zLO%UxlLbl3sjL+HZNntR;+Q;`GOG0Z>jg zmlY&Wc7YiVVHw`nZ>%*#%7Fo)p?~SI=nfO28*T;G_pQZ!sD4_62;v~;%j#8D z*q=JSpA|d$&6QQqBQe9VjC3 zh9o2m;i>M00DtxAVHEMw4=N1Ew(RWiY8FZsEiB`*$`=+<)dQB(=hiOOK44XwAuHy6 zamDmm^V<^NVe~SilUnwr*1p}T=C(|B@1tT~SQ3}{otzI=k~-!pS9H;5pCu~&`THa+ zXa0_`E<-ZbP}YXe~ecQe!#dJ*3NoDRAb<jpsxKx1@jJVeo=*MjpnVj( zEE$NdEEJSe@?tM9E^x};X)+Cdi)Cl_Gr!OJ`%D@q_N}2!8|BRZV}VzIPC8Y)kO!em z{P`^`La-O-bi^C`km6*B?ZZ!WFi%7gX|RYiV}ZrEO-+!B^(3vWxzlZorFZ+20AI16 zsk3?L%H~0FvcJGb8APAmE^m4~a-zvw>U_+;8Ur`Vij3nQ8f~P81WH49EkQaLNWm1t zM7o0H)%p{oIs0dG`uoluD3^0?Iwf0T$HO77n?1>O`-8||n5atn!MnX@D_5(>O2uAz%5r!#A7&QQqQWT37#AdY44R=aACIL%i*Vn zD1kB+ac@8e(U6LP3w*FU27y+5TGSbT6Xg9MdctdOHFnfeh0^6c%2ARj7G}QA9~p!D zIC~01GSW-?fL3JqX^ZaW0#x-9tbHN>hA|#DYRNY)Wv`;MB7<9ZtgUO&xL38?#n?eZ zq9(T;=Yh;D+iyktMfRK~xWASX%nuWkI)~qU38o5S$uN14?kQm(Dnq;Q^F8fg*cg>TA4oJQ%ZRlia zmQib%rxv0jS0I2m9;|A*qlIusT~9EdAgoJq@~=lMuzq?k24_6H&Z7^>VHNKb(zxxh0=$Op<-76-3k7Eq5H35 zhiuHU{rGE*qK5bYJtPvH6!(UZpeL90y+hvpwUK~&!I+-uL&=tfRXk!4fy7<>mg0tM z5gF2*zxlCKh1W~S3>`rYk&WRC+a;pEAN9SXOy{ff`2gWH#@>(9XYxcmc_BIEiJg!E zP6c}dE~s#gXT3(@VPW28<@VkUawKroZ!OpS$FM`CI1r;~oRo$Ph;w5?P;}beNgZMjCx#g4!?? z!&LY_^-$vBc0N2cSQCj6NAI6f>7F|H2m*!)h5|37#U=ZoIu=U-3d-WF%34!MX#A=^ z%z5PI$)x4R;g^Y+YDSs6oPji3g+>0T4J#P_qWe_nY`>vwl9pHQlJRVc zPR1Iy(h^veY%P|fu4G=7Z5WjeSRsYh=RsxWXQwHi@)BLmi+_`^mUI( zU$+l*K4j(~_z?KfLxfLCT@_ytJ?ZMMYwP*yK_XV#d1PFJtFw6I1t>;5UZK!F%l^{B zoxcsbS~yjiQVGh|!N?pHqirr2u0JA1#vzF>YU>%X3OYaK9$z?qB)*g}h(%|(fe9YD z^$pD7c%k>HaPB?O#14wkq{Zp9zD+XCE6<@^w`@k1H=u5Dtc00Q~_-C_jie3UGaF zF7FBlP>@V|{o%B^XZAV+>uOr0)LlGr`=^`Ix6(8T`ycn%zK@%6cAl<1P3K*ujBRi8 z!N)~r8u-{Ah=u5rVTP>-G0~EN*`uRe8YKQ5eSA+7LpC-NM zR!QT<-p-KjZ(F@#BAk=EU80_U`f)b$R91 zh&lcuyf`*4ETc&Jpjx7JH<2{6}dyAD#bMhmt zPI(>Lz@=zngFxv1B>?~l6D4YRAPv{OE>!)`J2ZV~?_1<}%&vLDdbr%N0S-39S+h`~ zf(cRcP^+)rJ!-yW2ejKSi^F63JjdeYhH`?Z+b?c=;Xd+)FWpscIf$x9#ZzwLPxnvy z_CkH|4d36FMx5ObxicOgwbyScPr0L*n;yk+upRv37iF~9@2s15ywam9M@lgmuIfe! zs3Pk`TjHIXez0JR4AVjXc@(8l4M`^$FojP1_1G2fs5i0YmUVaf$sgd8zbAXYaBIJ4 zaPR>700;nj0HD7!AOJi7@L$BVUm!F9U;t2eK$t$@-h6HVfLYCogCVy$$YXoA5Y3@xh)+T_)!ZjoX`QTufJRt&hP{XVFZGdlq$*Rk~GED^ZXW-&Wi7HPzgu`!Dy4PQ3K<( zywFs-+cCOHb!UPhD7lO9((Y{*j!=gcgpO^J>OS7vRtGo$`9d2+9Y7 zHHKGd*OE#6pc}7nLfksM}n%-ekpXs9W2`}q5{ zEbEwW#6gl%E-O^p!L*8bGwJHe8J9zh-kzGZL391=oYs!L)pafLQvMO*Fcl5~V z8P%27S-LGoH!k&H^)dA|?d#{)$hY+~F5J~{>%X@JKrQY*M_fE_)pG$f?6K5069Y9Na~@+#nS z0P-$QE0Apf_%5b9FmC|9JasY(ps+%?<6pynNabOge{IbXu)<9LaVpT3DPEL9U^*=3?(8-QjidsBtc1Z6$#8Uo~1tuf;mQO z%is~(#lMW=AL2{?V^&xv=Sc<}$2v;M)TJqLRb(@dV3DdQd73}Am}nGQN9HMxb=G-# zr1r$_3ghMHEB;|n#2O4|ki^)E_8lfS%5?A_E;uWb<)9I%n4@(D(h+KzHG0J964jf9 ze~iP-T$|K1rE`k)822_FY67YVR2jiCk*SB%(5vKgHRNiFxrA~>_sa2^lDJ@Y0At6_ zrkZABE1uY5v}J3_tQ z3k2`W+69lAQDn;SpoXUE9k0czguLi|uSK+m(&}BVHRGn08((njr+{}S&5c6eFLo!{ z_IKL_eg*0Fx7!7O1^xE-L#Pu`Owj$;kDMWlry#A2&?Jn^AXJIyCWvGTnH3_{ucL5D zzVl-xtWy9vmu)W7NW_Vx6Y-4-0#ENeBoDx!wAO5+I`eAtbCnZg&l>bQ+t6kI<$TtO zH?c-Iag&77e3CQ?)tG~03O7lQ1!rbdYJrP|UV9o|QR$h?d$z9$g*qx)L#Q=3*C=g6 z=_S`pFZ3C3NmUi0<4JEoR%~S^pFEpipu1D z)$y|YMV-#VwdIa8CC9F{^FrIy*3q@dOHJDF#2)HHIJmBqU9sD`*M-@AG2c=TE(*jt zm{QO{-$;CL%s{NcjlFRz4>uMsOphpLfuaHiOWd+3dSTeyiTX&+!QS1byO%d>0?{8N zB@oaCH}>eW!#ZxUy0e%`^UCxa&#X-|k4!r_%w;oQ z(xIgY1P0$%akLD@E+c##$YY1f*wNGWH8&%@9QbmFDqb5!Be5>|&Z2kgepR|Vppm|@ zzP>&)Yp$Y&HsXxkLrOr#8z?XWw_+Mn;B2Je&&{XWp0c4X@L@d@eSk0^w-NMzrobJr zDh0UGS^^=oLT;wP#%fzf`go1iEbo780mSluHlfSw#md;xacA>VDUr_4jYU??O$GNU z^)Z1@Bv454(0gvCz|5HcHhoaZkCGFY1 zBL15WE8sgG9YuNgTVz&AlXQ&$II(fOm!2Y@tRSy=SLju8KjS`UK^)l`*NLo`tT8U% zU|D=1d9z;~n!*8&P5k8HnBb=2O*>FS5o#7C*@QZHb1Xy4BTr5M!liKVCvG=)arM=M z8U?^LX6X+BpA@<{yENYyo1IdlpJ-HpU4>n7RAkW)D(PuIug-iAL%F0`e)}P@ zF0wZj%WDcn6LE{eS8WHGoHR{ha49V_Bot#VlvD1LA{&u_l0-J!Q1QQN4_X1QXS#rr zg2+X9qy3Z)`|n|rtIoca2a%&xz(1V-JiIFc;tJdGwsYL94|b4K3eI^fjJ9XD*}nI+ z=EDv#tBFKY`)FH(xHhSlmhj3iZcjN~xq`?5`GE5<0N!e8{_K7V#(e z=I56iKKyZna&ofkn~JG-0Jc)UrJq*`6mV;IXx#^DHUv7@-V++5sMAstmb*iJda>x6 z(C@R>%bg@3ZO#uREUef2(gtUO6vur(Ou8S4uezfBpby(j=$gTa$6MA$e!!#QE9*|I z#&MsDa|pJ1U$n^}uj>$5h_I%mcmQaId6-j$6N69KAM!-Bh#v?OD&g*FT}Iqg+Az;r;Y+l zV48VoQ)MbOdayno99glE@g2}(W^E2NfqvknaGOAIXTFKq+NH z!Z7V_J?breAgSDl(|F|iVp$zj9@(5~C0b3rYN#PUsy33YgKLS5K^8B{MhH=`Wb%j> z7Gf|--&xy(c;HwXfr)Y*l00V|0KTIcl9chy_il%DC0WlCzm@n9 zcWe)LLL!maQh};T2yI3B@`dG&c&yxQ@vS)l?o5i}2ZF_lLpR1bFVTWou5F(4Z!AW= z?2>bnsezZ4QD~%dW%9E0E-T9CaW=Wkn7b^i-m%Kfx5(*3pV-DtBSS7X%wX)-0X!LF zw9O}}cZ$ASB&ZjmTIIH|&{h|oQs>9D^FE6k*loa-@^tWo3F5ewm&uGbg3nK%GaKn0 zbZ`bd-}1{t;fm8#QUPZRhIZQ@OaD82^48c*!Qi(G@x!&GkiMG?E~rHx7LXbRC(8K1 z;GS^%5w>%3AgucVn9PN)`Tu$>_f9Y5PYBcAPmbSswj@6yO7A2%KtcxS@PB&F0Lmb{ zw|Bg^Z*d5vueWy>_AllEMl=QoW_+(8Sji7uw4C3-tAW5YFAO*aiZ2tx%xg`5e7|=< zf=obw0jGGZMEDs-yrRB7AVA3){4dh5JD~9la4kLq0@&@;QH9Np_5F3+`v3KYHq5qYD-Y#wFh@AZ(B%ghdn7P!NxVO&ElwQJDr& z@A@T;j+)N3KB|P4IWA&@qbUx?2j{827+bW-S0;k)G4=^rfZ|a(60qMC07&LgXyy>R z7?7Rn5UA>qy&Mom>`~cnA?R*teHFCU3a?0>4L*{-f|499n>8BJeiK-})+cRM*Fe!o-Dq1WG4@-tk0yb(LOUO^sTAb~&`N$WG>&uuf99z;YaIO1;F6$h0 zxGN0{4J%HoPMc0+PD@(7Y{XfUspMLb))p(W@7Le;+G*kG^$LKRqFTa^2_lE+Ln5FG zH1d8L+|7!i=QHXnBx9$HuKC;OvU1^Z%=YoHZSfn;YE<0kIoKI9_DzW63 z!1EoK;v6^Q9Pi^CDSsq~s>e%yQB2MKZ)pI+rQesDqqFffFfoyRk-OgyI=HA|oCX^0 z-7rAT5NyMCaUnWFZTgQ58VHbzK;=N;LEQxGjqFA2Wos$Yfy!LbazE|MRbofLih7k4`WE3lp!O7+LU5KeMq#~fmqCeo6J6Q*)nzcOo2v?1pc0S z<_^m4mLcyJcBdiBxqj3PpM*53-aM+MeR*_Ulk37-r!r0TLa}OY0INEpUA5($bE{;+ zxq93s*JggsQ~1QIk#;`lyaup*zJXIriCgr`x*=8pyGdC~h7^u0l-N+B2<^#2$VqcP zvhUFh0N7&O`Is?kjoLW&+87YLAqSWv99hHA#XURBJ-O5)y3{=s-6M|8Bg+j!oHRsP zw=^6|l7fkRMMqi7$;w)$D#L}P<$CY|M1flxNKP^B#G+S<`OxJ24k*SWg|t&tYrB-? zW{Dow^nqAF**n4k1;tS*d6fK>X7(6h7jq&s3}leG+9{0 zAw$TQbYXlM3Vo2_vCnB0o|rl| zTvIBJz6|@Orc-#+F1^(d!*W1UB{rE;`_r-X#RTSZm^t2GGQEY684MY)iz-&Fs=o)v z60|CzXI++58biO5u04{$j=XV% z`L28Dc9<8(TXrv+AV?yaGNzWl2~SbqbvsX0)AiD4rsw@MEc}9Tyxf2FuB~x0$A6|Ji!A(QdhsqoN$Q!l7WfjMHoz>v1~X^8`!V z+_`Kl#dJk;)7+(EDhCdp^K0=a&9+B~c~GdpY_DVFPv62V`=DT=x%l&^pMbrz{(mm# ztR5UeAlffVJU>VhBtq}7HBde%fahmUb8LG_YG}aU;Dp@x+Vr55n4F}B!ltUO;*5~C zvbv6zu(;Biw7jgSilXGsz{>3U$j0b`#B$C25A+{!Y)2^cUp+28O`?PRbgXUxwH+Rp=!&`}1O+oK2-)1yFUimoxl z)uYrVxKWyG)ROLsu%Mwath0K)DXvj4On#XXH?;J_83dE3v=HKq1XoD4=9Hb$Q;KZ1 zdd3+E(Wg`i0y9pQ$VAb(B=x2wC{ygrdMe4e`q+e1?}1c@f7p6X#CVETr`!X4CnO#? z5mx{pw5L#-p_whDsms9uAr5hiy=4^Lg{KGWab_9L?oC{5rtOpmn1g}Ft#wSt_JjK< zWE(83ApUq*_&cPsc%h0sV)&iQv|H&xfNvj&deJjt*`~N@#N4^ZJ+*7%#rCUV+`?0oFxes z#VA7IOHey}rEGLe)G29uQu_9Dq{ti3MQpM5XKgIwJ6DqWgPhAPM^M#~I&xNFMufp? z6<5fE{{-*~w2^7v+~*f&WDg1^+1Q=SGourJOtFSw&g#q;kPED@!yV8%m_?BIx3xf` z&L*0h*_KXs5FfZ_uKyR1TkH4cg;Qg91~G{H+5no!cZ2>ZM=%GYempSRTHTmw>Z(Z) zgu?e-Z#_*jQp1!hFS6MX92`e;5^~37^9TZD;%DOu?+32^>>ouqF2QvLS&oD39c}jG zR%GLB=g7*1>3FAQjuQ`|+(78im|DwZ!Zhu=;TVPk>-rI1l5V9E!~PcZo4YZHuXJmXS&w)mN?gKZXn$81IO$5?I zL0YHu3f15lgTDAqh3)|+QEt*MwuGYYODLO!S5(XAbF-T|$$`#|#}2qL=0`jQ6X_3R zAowK&5IKN8Ukh~{tJ43(AXSHykRy~sBvlk}NXnP~sh}4tpw*lksRs>{ub{wZHkmJ# z=!D7Yv_G9LmG1Zp2!+OAu$XQJODL60rL&lA2Z~6gR;f3cZiUKdHD9eZne7A!iN)p& z8cTD;5G$HZ>$Ex_t;cA&UGum<9bu{@j~C5UplVwGqW=MxsQ<$R?`1?v^3^Z9(0SPkzN7z`Gp_255- z15)WsMw{VEjt4Yq&3fyha+Zt#zNO7bHO~he4yWVgU>Va1t#-TP)o>Np3m&)U{pC;v z+YPVx`~B5OP58g`*5IP##^}myzrfu;I==_?{L?Sn<||FHO|fPhzK!Oo9e2@ZN~|L+ zw`mDEg$s-2+EkZHGhpnsLDS~iC8pe`?31ot5ju}GD&42dm99M*JC6;n?Wf!qpIssR zw^cIUr;HgHh9%|&%)K~F)B7|((+r!~w&M)DfDkkd>xkl14cm|uRSlb%rezJgpcvLQ z>!_;cx=2)OBd)H=;*_mMdKuCQYct+o-4K@Jx@HsC^}KciKn00#7#~D!Kq1CH%nQeU zSPK{w3WLpHIoS%C6w5vi(+~`S{6~_FCz@fJ8*O1P{XmxeEO}v?eF6_HK?JPr@HLQI z(dUdR_C5ur#QO?+=RKBLRAbkR?{!Yjmox_|^&tm;a8=?@$EpB_N%H)d!#cY-q>Jz0 zP|NkQcR2)Y1Yr~aeiZHP{p;B<@7XXQ^xemf?2f%@7?!JY!5lCdO^{&WLE<9gLzLvk zv)N*?JU}7Q=nQ(3;cQST)k=^340N9RaqJuK+cET=&)bQ-BUmG^1+DGpShubdANl7;aGW9Y+k#XhM{sM}`67t6(K$ARdRLi;RJ zl{V~Rips5R)N==_zUo2WyL;BE61q4i-#Txz#z9FbT?y)}PW3ViwxL>~ z0mjKQuF?u(-UY`YFNuwkz8l)vIRl4b#UzbhNyC zuX12_u~fVy7mo``N5y9k(}9OWW*@i_Ghhqa5$W>YvVIv4Gfk*`Bd&ZWSKsFklsi>J zCyf?&By_Jw4t;lN71}E0(^hv!?UFZ3j~9hX-ZG@Lrh8F#=I@8tSMUg)zRnR&ZM5T+ z?tI>3>#m+OylvH11G)DM`qEhicQD|Bg4A5>3rByJ+cfd42nUAhYcday?&T4W6}Omk z_io_(N(0F`QLv)2;I1D-W0Qx~*xn1SVbJ3TkM7X=$J7!AMcAoldZL@ue+cKcBCbWx zjb0Vu^>SPJ7B|uJF7Bmte5+30MQ5J0zO=`lxqNsqG~lDGdqUgtEvrTmP>U829?}&t=p^X zFgqi%udmGVI=RN{^ka_`7E<0sz9Z8bxvz<6UlP>po)Y{mJPLN<tNU_Zh? zq?&Gsil57+9up#eYjyDNgr{cOeJkQX=rXJQmQ83Xgtm z7Bmmc^!eT_A6}~;H|+b!LaiUje#XbhgT+ty9N&J@_ujK+(H1CEDFsRI>#gz><~4dm zg|c7EvB-K_c!Z8ZdN?#>pB5>DM2C-2|6jRu?Qk3vLhz7LgFp9;2xaL1OFF8DbEEx| z;tI~SCEiu^yw1v2p}--9wDX=qMqOY(j9eC^l5Q1A%ZesX{xFQ| zA%Y$hESfd9d(R#v>25wqJk0-0{|u0}$!vYOyXhQWJXXHd{RQlT*kI;IPR<`Vf49XX@pRgZ9ja2h$IK#oz?;;sHmt?@I~6p^`Yov zcwPtma5^yBKVf#i<57d^}DW{}Sy?13A znS6<4f|>W@1v$}!5Dl*71A76{>bnW}rbINgQYz~l?4H_xv(v*|{mfpKUh~0j zm4?yiP+_cWbjrI~lyFY;k07(k$XP$=ymaYQSo^8h?i*k-%ta!fo{G$?l0XvG_i&%W?PSYWux(ykS_}%|KMp@W z<)&~0#-;knw0<3r3(?4 z*Yk~A<-_*ij5(y=8~wFrlVDn7#5uEM7rMVtLaA5r15}AHk^OrfBAKiM6fgh)-lOCD z&H7^W@_XikL;v2u=;OD87$vSjj6^0~oNGP?#zHsCwg`}XbtGWr6y<`bC6wNJSQZHB z=4Hd`3AY}};pb=k*8^dg-aDA80aWB68r=a=f`9=k_yPFoE)Z%ot#3cMHK z)(#DTfk>>EZ?JNg4@n$~F(@#f`yaGsP_90EIuu$^%q~e%(%D3`sVU<`M%ARjG3-N> z$|{aEN%NnLfUB8Uqmz28)vZg3XRx$Hs)4D4W&4g+a^CV(@-rTY5i^t2oI4>gJ_0q4&m$)+_V~s+!Qg% zQj~vGk}}1yi+vn{+S<7_eanl~?kS5?GRF;$0v+W%3O^NDnqt=#u4-ac%qpmsw9cWQ zvPdmrQ~9MzkLHdoE1GiFJ+7Eg@?nvCA8Vnk!9RKx?7_6bT6!ODX}w|n2*FAC&*ZHZ zkzvJ@<~$qGb41zZoE}l5R)_B#yf)F}hMDdhJ5lk6(eHpi@qYeGyYBvp6q^qL9MHL{CrS=~6qy`BE()|<22ZF%{4Gy3BA zw)~0t;Q}IRBBCPf2_zOc&X?u_L`?9Xeh`D$TESJKY=mkE z_`yj+1g%J&A(ef|yM$y_q@vJyn6u1BVbw!^JZinfn=!lJ+;V=js_ehDCChWin1ykx zuEw@?imS|LA@rwXPp+;sUg^97zBxW@iD=hh*@J?+-d6)tHmgjTDY#>Pr>vAM$0|Zq zl8UOO5lzdS#$2tuD;QV2td;{;ijL5(SzRkWheWRWh2FDEYA3w5-leT(Te+9~wCRbX zyWA@VyVjPKnZ2}oGte_&I&=I|1U2$p1pPi6yp&OK}iH$00JPf z0%G+6FyM~^n)Kn>VXK2ic2Qp;z8T9hq@`s`0F<&VMxu>n>qRs&a7TDg5}j;XgEk?r zA@jm#M$!&Y@gAn$Y(E9RE91q;DU{J`=>^k?ve9gzYla#PdF!%A!@Guf6m`oQm6f0* zg)K>*QeCCci_z-|X5v@I!H*{HmEN$WAs>1b^ZoB@cZ4!0mq}E3MIpZ z6c!<4grR2zoR!8(8Wlq+p_6&W7yR+r(b>^2@jfxfu{6=AQLk~kvA(g(@DPbKiv)_K zjD?LAm?ato8+{w~9)&BFtu-%GBA3q27u>(ydtS$1zh6UMeP~)#6_^^I*D-9mTs6E3 zTNYPNKOU_@t({p)FtB5&hSijqz_lnUk(ZS&qH-3e4b|#dI=XoJc=hw#?m4m-dNYo+ z9eDR9TLDaK{5S_O4#G-;X{yyU$wQ{L1_${LX&zIm{6?1D5|nv6%C$XS$XKow;*n z(UxYN`Fdu4A8hjMW{$3h-dJfep2Y;uf&{9YQ&LusL$z1aHV?J8+dAdZ$lY`?M!2W7 zyu5dHz1-M%tz1nU6ci8wK`A0BN)SNC>uy`Ii*Fhq(iQ^0-Q_J*J54W58$VagZftIZ zw#c~+l+KC)!s7ru_7&}(77DUu$asfDA{CU^=`OHiD*b_>=9SCdK z3Hl*~xQ~U4E3J35m(RDf1R3t|YFYWa1kmNFfD*z6TVHs~w#S#Cwe4}tW}L(0_ipA> zABRQexw{|-`rF|QA3FZo)4v~EpXtJl*W=#U`>=16{rmY{W7wLt^ixRa8^?Dv3SVEj zmdZ()7ju9rMREf+D2d8hLt|}sS2?)i?DRA})6v>hlkH}wr>EoOuq^4-t6}-9+v}w| z?EI=2?N&&BXQLvF#!%!py=HAnA$4>WN;Gw3O@P4eIGFep=lyv%f)*9@Sc6P{3go|T z4+WkU31XHjohehcJK0s!^ZmZQ{D)${JDYjx4~+hivK%w=~%&b8TAF;M2z=)q(3=yLeG2(*J0eI_(4NfT{dzIl1YLgNjOL3s2|i+==U-#6lmGNjjorL zk%2|V#fl6Rdu8Qghd0fR?h^u2%rgZ7 zj5=DoP8Oq}1`RdqnH#5VzFm~rnAiqk3BkvTTEgXGMeG9wAzqmBw zJgy81tn5Pn;jsF^a4>-`igxs&hWZ76i5Ckw2-f`D6TV!zkPlL|T6=ly!bu>&a^Wl) zXt`n`8ECp}0cLTxULhRmS17E^t!dk3?Avt+Swxm#D@$GMZ@IagKST3*q{b}C)KX8+ z$A>R_xCmRN1;*QfJuV^s0JmaAvFLMXJa9$RAc0;k|K~vT7(1dw9(oA!4}Rl{F7I z6YVv3c{PWtPBnXf2~V{~1BvG1B?{X8i41yLMZ_#n{$KZZ=-t8jF6i{hNAbkurZ_coZ z3ELc%166D@o*>ab8c`!uRNA!OOOE=9#U2uTv8IINGi)wSyR9fJ_`l2S9RrEDU-u=l zD{E!RXELNL&^ChjDN~PGjJhvAI91rv9STm&BxYu?U;&WBNEzQqReUtl@bEUp9b1y> zl94HhXsL#h{mP2bWYpwC`@s~@m)!Laqs>G2B4#N!|1yDE}j~>b77}PNzdYxbT zL$j``C>9lenC{YmIdL_kG;>5+yjtLz^;6bxb7J2ZPCYF>_Swnm{W@h zffoE%GIRfdL)ifUb1|dbSuqiK(a&lnmBn1GHcRGj{=$M#yzH0ha`PBuQcz|D2JE{Tx99@?!K>3C( z?COjCP(C3hzhfd77@G-vDAz+7LmA^xJzJ~4qMe|4&C+^Tv|iGC6Q|mQy%c$e8YIvN zcu_1^_f`hSNH9d!icp9mmn0e*^fN0`%c)nPNFkNb)zXYM|6v+Z9b!T+o|u?0Gc!98 zRIrEk@g@~I;%+TE#!=?nuq*haJ;`9|sOUWt#(c)xRt-^kqDWp26?I6lR)ucV>`QH| z0B%{eRW6rnBB_MZKxKq={pa90*hUib5Gn_Gy8|)`t*lg{7gPma{k=yb*TJ5YhS){O zubtoR)>HJ2rN|c}mqL$ez+G=w&A+>*QrudOcs9GM&lg8iZp}(|dJC^C7dQBBpU9F= zWn&gvYm`r8;@OWB;+Qf@nNYU&^A;yWmFKr%1)^u*60yke3C`xdruu=S0Dn zHEWizn&MMs0c;=xKDU6<%uH?D_=wSmDOQa06=>#dHK zruB3@d<+Z>Iqa4^?}sTiIa{{hLgaTjG6CDF71wz)nZGk?3ECp_iTSsI#_6`np zeSFbI79N&)XY%x`TRu;eZ9#nq<8DwD-ax6TOs(Y8%v$+2TcS!T9U^hkk0YL*AkJuG zr$7~j(A-?@IsAJx*DH3NG!8 z(4AC&8}}|-wPQU`nwQbxa5@Gyl-T;Z zdfEPoLM&GiX{bEiGG#nV@o%WF)=c$-^G&B8(xKjl6=cX4UwX?X{ z9onZt#eH+P-izWybK*&Yp>YVSM8l(C8`@f%QO)>_vS)U z>NaUdNR}?W;t`Z&)m&W&&n`T>^*KV4C7KSm8{3__!m6sK?*4y@Wyz8>SS2>|{b)H`!gYk1?#iFvvqUh;x8F-j8o6*bcc4`PaZ(5y~Y+R^4 z4;wh238#OaeJ(6I1v_m_2?{)0KsdFl2-!u$H9H#1NJwTrxq@_k8{5dvA?;it0ys1K|vv>J($ zgxstXc?4laMUTr^nEnEytd24@ntmm{JHa20d+HAy1SIsM?)w+}8_ea1a^nrrdyOdh z@-bfhK(&?9fbTy)AJsrR08>JaUsmDeCN9c>YZOG&l#%0bj@;A2Fdb3~s4G}tOfHt3 zEwYR=-i4sTxDe18Rty{;>#Xw>Z+wm?xu!i#==6YIGDMP&K4lO*;vp*>Uh$0CMg;tB zFvSR-k%Rw(K5W>;c1dD0rZ_PwqBy=cdOyS#92bMsR;(-(2g!?t&g6>{QY*pGvfsU* zm}y1!yyh#dNA%0Z6=4d_w3=rwH;QL2$QnK~Hy3Gx3D7S`{6ybE>jAqK!vI;)Ir4M0Chl$znD&n4H0ILVjmM`m11Lrm5HqAtm$cHac=sF#grkL#qq#5GK(--$SUSm z;ufi_V*lo6^NGWSd}8e0XY2VyXfEUu<6?@okV|aIx?HQdM2Q^Aw z8NwLCBx83sG(Xo*cnsF(+6iO9PDp4~8PS}QIhR!XA7nUsT?d=szp0Vp>kaS{H1r%PO)+z+m z$YdZ|Yb|3Fo{}x;!nht;+5IozH{eJ$fZ&#&_YU3?W|!_p70WAYj*A|#BoX@ zucy%j)&)wSfj;$E1|VWpNYnlg=nloy4F0Q zWzW*TgY+LD?TV&x0kBl0%q)vMxpkX?Xk=k>GLcP1BUufeuSY`uQJi>JM5)I`pi?L` zd_JF_nusZ?+V^I%GKJ#BM#a*jsRKX@f+ihX2rdSrMqC-yOy0pV(1H1I)0ig-brn`K zpN_dk$3P~BRLZVSqN1f|p2cuvG0B-4>Vf7s8IP1s#zG+@COqm4T3V1TqTOCl zsn+cEVW8j`0N9@33k4i^_wKz(pGS-WTpk~VegVvT#*vJBLokOifUUzp-E=u1e_b== z2Q!YaUJ1*SLqiVRg)3LC__z|Kjn$qGW{#dOU=5L$<{ zq+aue^(qKWK1*L-o3lQaM)}Y}rKZAco}R`qOb!Vp{!+vjr%+T=i{hM-B&nU6zUiP2 z)CroQ$z|Z{R%I0s=PeY8;9u<89iBN+fA1G9O`+eXk)J`Xa8FLU;V1TeR#1p1ov?BL zxA?DK_5b8Cyd-ETDiVR8W*p~$g4Y3{nawQ3%w_UeaM3$6V~*#s$N6|w;1c@O`G(DDMO_<2mKjKVn^Ef_Z&wWk!TfY#I+_D@Tf$kTQMT)5!c1W zTC1*Xb^BO0?>%|p!i9I=?%u3hUc7i=f8CO9bLZ7}7vPwf)7x0Z5I?D~gT!Wm#y@AV zw74vw=!uH;C*;q0!u%8Ks9S$x_Bl@|)}Kf|=LzNd6XxeUkywAC{2NdF20rnd0MPLh zW?)NeYwNCd>jE!F>m%3e^g50V>CKCe!^^3 z@;onN3>QxJo;!E0_jJ!IM^7Bv+p@tNR~jzf~L);W8$JD78omzy2uvf zh;LsF-I5lFP^~mI6Us_cp3sJ3%9H&fQoD4?1Sz@cS^7&ze_5pME*Jcav)~h~t4jZ8 znu*;f&!0c}GtS0ApaA=#Tlg*jIsRo4NCE+mKiTMR8`YcBZ?fl?@0 z$0MX}Qoe|4H>4GWK9Qo*Ju6U#P=hp$5Ndjs@<>%81zJFSqmNl>B>Z|&=@cn#DXv?w zN=M-TBBc&NH~gPsd6L{7c~iPjwg#z9q{=X@$5c2TuDTWke2^O+9v=6l1S*xgA!9e$ zY;|>YN8oRW|JYwY%3>XguCA^_T}PD4BlS0mT2hmi+SghtqSd9e@ZJv2>(=S70xbb? zeuIJlcLc}^)MjJ91{e482OnNbZWh<{+k(LSfl_G@D5pgt;~OMdjkhIosf1Yxd-i=s zO`PMzgNjG)v9U!M!zdyi6j=8JN}^xG`g~sWp5FZ6;>89yfvon3z@B{>Wgw9o9wRI3 zL}}|T!uCmJI9S5Wg>svbZANC`R$NieWHREW_Aa^IS#Sxm=)9>43OzLVdXBo5#>PgE z9zA;M;?bi<*e}R*s$>p|dwLdYy#xSF+{nnp$e1fIGch_b<`20h@iH2XOm=1V0p{No zigYr(8n3}DO4}2OB<+lEVk%&#(|B4Uk1J6TR6^X&8Sz6kf1}CQa|)F~&#}XuFYfPr zv15;T!Ym#r)5bRZgbI_Y*nVtPC2bLmN~O_KrbG20$A5UKP)*3E@1vUd`mtM(yT`;& z6Yl=?cg@;Xb>YZ^@%v9a?loN)E$G6P;L^8PJ@!O*!{X~X(|z#3(IZ3;CUs3~dJtW5 z_f#4i)1gY5xQ8v=ohaESa;%QLRVKB1s|d{$Q!(^5yli*=yW zQVhj1_=8^k$7pj*4r61CM5tLbpRRs>C}6>0V}1xsMoN5!JV-uKj4_W+VgrUAuQbRp z)WC?i>$njeKwb>TX*gJou{egnP#XKXNQ`=1(zn=<))6`@O_hY2rD-{#ercK@w7fux z-8>@Fx_kFvC5t8~yAlr0O;1nH1;c>noDiPD(~Oxg+!OweYA67f_28_Y*>uSEG-=TO z%0-k?JBkVAw3a$R@AbNx=1^Sg`3u!r{$e$8P~1O?^sjQQekJ z$lbq>3o7KA!aU6M+@kN%@CeR}9Mdt}N@xO`n+(Tc4!719pHJCYIS&a`0Os9?4q|jX zzZ!0C;vntBF8<#TYbE^v3b?I7vnv8VYWv^xvZUvI0enAdd~a9AO3K7i8FVcI^`&mp4qH7sxm9Up{FUM z;*1{c=k)Y4Pm&AM=x07zO=d9%5A8PNaaIC&xt*T+{0qBg$e9Li)B1`a(qo7K$t{Ww z7gf0*&()S!qS5805FUH`UMuq_%C248(p8@0Sqd^awH9*>C`mYInY zx%X(=J32ZwGq$Qk9^q`xxR>l4CWJRBd9)g@zj5j6)weERzIy56s;W34Xp~BiJAOKE)|Wwd9|xS83+U-w1rFH*3-1V`r$96sp?%Pam&4SwEe(oOe?-@gOftvR&nK) zi55*kC8G=Bg=mUHVKC9?JSIgJGxD;U`i9yvE!SUivJoJ;xswuJ2Vn*&W*}^v6f57L z&N9Mm1@;cI_mJ)4^07$Bi&@@>ckhl)qaE?i2k}a3(Vpni;>Va$G%XSTqx<*oa~!w@ zDwDCR^EpVz@mh(e8P0A&=}s;zC&hdj?mu4)thj9I6yMtAi`N{!@SA_}7k}|9mo9zq zhxq%KUps?WcLTohy7l)ZoV*hmZG)i^>PTB~YVLyE+{W_@j%9k>zB1amikO z>eQ*O27P84`%qqPm4~M8{_p?&zyHq=zu8ID3C6&Sx{?lDRe!)>vTM);%J;aBq9!JnBWCZ&Q`2%D_QLxGszN(P0SX9kkZ0 z?zec+|H8>QSjS>OeCABpA5Eo#&>sHT2|xh` z*W}i)_6-taWO6=?5wU9#c~}Nah38$$;uojZ^xXMv{f5Y8=-z_swT8Xnlgmi3RL0^A-b84 z+>9)-gKf|;EHL>WGrisLUFy}->lE}76os1g|dZn!BMBH6^A`UV;Q(0+{6&-|c&q^JHLn5D% zsijy#?Zyc$ zU!%pI1)+^dOLQDXSnV?<3+Lj5RX)p(BRhetK_(X+UKypfh$m_WQ&|}W3$(>tMlCLi z+0{969GFUiTyCdk1|4+A!3K;N9t6-liU-^vMhp$%C7jdcXebz1Jxg=rOP%xTB|J=9 zQr905Cv){cP?gPbD(z|xQ8Z0VHj8IzTQpqOg(fe|RhC9W9L$mUyh}=6IYP^%X$7G& zX=>iE<~l-Wq^WYlb`ykJ)@ZR`KDpojvPlvXH{K9|Une5_)_Oz;BIjmt`8g0pLxU`0tLSg|$(UtwwL zCFq79NO&+L$9e?*V1sN(6pnA;bD?jzfj8iX-5XfN)bniS5|QQU4K!U84sEc5BG4t3 z`JNPoK;GoKRr*HS6#P$-UO@V{OQ{b&5$RQ=|F)FghJPv2-$gq3l)i=ZZKQ3S0x#NZ zmMskrDfrBi=Mi2{FjL`+rv6`N{{h%mk?oJ;bGy1^NtR_x?k#TV)r61)0tqY-Ah48O z>Qc7w-tu~XzETXk|JQqO-}cHbKiI+smR^>GkhsN8;@)l9mMrVaRxkh0NOCuMW$Y_m z&D^PX%9(RM=Zsn{aY;fgad?LTfdtZEMwYdyNN6!^uC1+=1lDC>nYl5r>8Q#wVI@)4 z3o`tltEv+vovpkUZd+YVO{KliXfzp&S|g_7(rwtQRyfFB zSynMD$5Ux=NH$A|ETk=Ya3qyV5rL#+O`e#JB$A8>&BSaA?xXzwGC~UDs0b8TP<&5- z>hS_`fI^Q3=qk;o(u|8`(f|YW_|j%bu`FqCPmf!prsxVmU{HLuMN`xuR_)wbw7*5g zimXOSsI42VQG5zY13mKWM)WX%!W2L3@hPi{WtvckDtO8wcAj&gc-p19I35zfo1&_4 z`}ezxFl|{XvI=HnQ$V9mQRJ|6=#WIJ5DNmV{5-wjg7Jbp1=}F1<#z6zdt-^N(h}96 zL~G|po})G5!fkx41%rTVK0S7G3)D?Et*)`G#?#Hq{lY*PTtq~RP$vww@q?BTng-KM zgcnbby_o(s5<*F`&+7?;YxVglK5!wm$W1yBLns-e`Eu0*%QyZ}9v@cMIcJTzOxH^LT##=ZVMj>`O0w`z7*a znFpNqUbG4{f5lTU;BoTgsg0E37;T+Ww9bFc9>xtUZImLk7NM$Jf^Tubci#=Z3v4C# zS~&a~zQuRBw}Q7|jQ$nhcJjB_%46hD$)7TnFCHV)KusEy9|Up3@u)6uXWgvIsi*Lp|sJrCZJ zBDa)))3G>)PJZ2=Wb#VO%4TQh!VJj=Y`IjY)(EXCE|TO#E=|%e?=dma==0AVDUqfi z8SzNA!a|#B7Dj%e1v~D2U}knv>ufj-!OQUzx1G2R?r?*X97Yx@M}0jtN^_*%sab^a z4uioUE(~6xs(rl!Gf|fg<6cmyBhdu4Wz$O5>rEFFys1`Sxzac~N=G5N%}p-6to`uA zrfEo`#&_%h&E5i?X*YDIUnVPD>3xV%>9Gh zhFSBE2(~l-pY+fYB{0Gd;hsHB9)b6UaTLI_bj_fe^c!tMOa~c`9~`t;Ixl_R(a)37 zOdlVLxVioNN#fOn^&Yf#0e0k$|pQJtdhVmBgV^jWbyd%<413SdM^2SnQ`b}-mt>4NGyk<`|k1^I98U${pVW=!>}v=EX&h> z&N?4qn8>^j<^{%mQL`C}n5ypn7A~3KIa$N;i6pt`&)c8pcU7w*8C}?d>V1Gb?yD{! zLv%5O%4|kceS5*w$&*uPi55PUBpmBP;v|`ZHu6DeBVWKkxd7S8!BeMRS#2pX(^5-l zsiWkt<+Ceu;|}=SV++0+&n$(jV$vU(oeu%@{K+RVazSRD>9m`HN{Qs_$2R4vFZPPP z6Ply5b4yVS?&qIB*<_ssC-RnCI!U?AX&px1#f0W$Y1?j$=tGUQudJnI)mUqDPSsX0 z%D=a`Kt3WDUF=1W398fQ_m4fLP<7o?F7^~TC9hi_sEv{=Zh?cXh(TW0V;LNkNybpb zFN_7B;(r0Cqh)&x1&C9K!KK3sSdPWAy7xlMG2hGNOD>*8#?T4VHY_L7)bLx#o}4;M z^CvVd8{TSu*%}R(YkFGtN!Cv;x+Rg8iu!gRr{za~-lPNG*0!Pq&hz+@U9GW-wn$iw zru?B;+O5J0on5Nk1z4h&mB6X49-mbMCslYJntF{D&U}?yHH!he*U7GEBke_Q)XJ%2 z{CnRU|AHJ}lh1CMBdI$EJ+r^G*L^|GzlL~Uobv&~;6l#)M<0Rx6jFScvwccPrNR$2 zRL<2QDi70O?%67H$5=EvcE=qWYc+(e)mBY!?;Ur<`yfT>ixUT;ojXUi&U>T96MvS% z)-R97n+b!9kWxCkwoOg7jgAUT0zEsyK&KKv?ATY^1yI*+9VH63EL|y`hKpW(wP^qT zC}#zIWaXk%Z*umt*Is)Kn&uir-n(~p_6B9#Fn{e?o~KR{1{WcfIja`_si9$eLE1l& zF=jF0PuuK6gOmP`J{lS#BanzuvkGoA01YM7Dnrif+sNEpROTF$lMZ*KHXaNHY;8uR&~%jcU9*5vcl5>(?#Isg}=`TJ4e8jVJjxk;yU(!HT{agM!k zaWs(7gTB=#0;8W@VAxn-7UcTyI3z%;B zE-KGHvA=-H0En4_{ZBlr1jT~#j46)tf?eCT?II0G2ONtUlxKf_)@a1_rKQ+%Iw%}U zw-q05_hvqvF1w$8m+q&xT(?%@?8{NqPOiV7d-wdsw)V^Kz542_=ndB{fA-0=6lBF815^G@t2V9{?dl6O-E*mZ_f%d&9p z+|pzq;bJuTvUI)eop;_j-`)EP$>@}0UU{&L6xuWMT1Ilo<=_DH13q@X?O)qI`Mmv; zbKigc+-H5TUGUzI{^hU!>R*2Js!YjU#%*8->~zouuc1adNKqluT80(iq7L_P9GgFO z8meVAHQVnz^X!W+K6~cQJ*HG@&r`?9Uy#3G?tDTPs{0uxod!oWjmB1=IzZ;motv|r zA{+J{3^Uk%`Q4Zh1p{$%@bk~{`@-w5zkXqmw4-xjt5GELCaqe-xmDv(Su9b7sn+87 z_?~?Sp7iz2BoYZ-8CVzNJMR7Z*S~)64!R@Gsw?uoV8kDFtBUd3yJp!Ht;ORx+;m0o zUA&#k7eD^sCm4Hg{_OJQUQBUUKK}Rv`i|(!!vrU@ct>ZsR5Xr_8wPQdQl@nl(M@+h z6;o&Mst)hpw{I8TRb5qC+0sWJeKZgkW#9cfui99RA3PuGP#%ufJ za=UwVFLZEa&ZBe7*0b%1tQ#7#TEAe@GZ@Bp>`)SVuy*wc<--qm>=^&(-~R32J{l*S z%&66_EhpSe-uL9Ja8&Em`YTtjbPW_5q{XS|TyNK>oI%^&t>r%akSiG&DB%VMsD7Im z^1+4DvLxkK!sSacn;svhMpBxZ=#|+Sa@UsZPaP+2@-O6nmHbM~HR`i%qgk4{xf#S78yOz*gz7E% zwnB%qw5+1C%Ij|a&#e7ycNRG+7)Hy6d{gt$g5p@Ay?W=N=9~9#HUqS6qY)du-Qg_S z)`S&n_pVvb-1OA7tDv0P+8w$6QI^wCH$j_yN1dJv27Qa6G_=}7=%F9&FL&`68pj`P zHHkleI3+Ya@Wd0(eC5kuLEAoy@Zah4yLjaF&iOSGpWR4J*Y?+c-FAb$;NQuAN4|E9 zbdfIMYyX8kA@I7}w*5_R_msmvT=>&Jy|8Xa@)z=-k!>0BfZ4WjXTqE&l$b;+f3kua zr;@3BTE0yd>OPcP*IKB{4?OWiV3U=)V>C7QT0?ak=I(wvcYkYn?kcJcAXU^DHb>Uw`^S=4!vO4_gzNwMcU5%*gH1e;??zJlU zKcHnlyGA>IPi~fQcKq$%c6hGog2RE;$nk=7DPx7#yl8kJlEQ9GOurXV&UN*lUV?H#4!A{4z4kMio z^x>_SF2H%dVBso&d0q@;jN_GIoNjvRDO-b3HE^R9Yjv*{%kI^h>Anu7--=&za=FIO zS;Kg}HhE5-+Qb_WXkB&#(0iDXnNB+1S>P*{d34XEkQ8eh75-XndY|OjAosiqGR| zYN{z~s6TYLx}>nEr12I^`^R>a>3zs;PF+N|eovp?T}o~Oi$quGFp2`u`PMvxA*J{i zXO~1tQmNroJj=+&n;I>AXaMCJ4D*&o2z;`&yCt_nwORVhg;&~@aY%MFX_rn5rkO9HDQs-?`ADV5wD-h`6AwTA^rQINljl(eFjSdG9$~_` z32PsDM2p=i)g&}YT7!yBFkHfwcd({V1Ct>K51P{pV~|su&1-le<}yN50&>qGXW7Qa zl2(Dw^a8%Z@{q?0e28kJbXO#!S^1H5mA}1_pXg~9JY};jSlXGLL^uM}d*@*RSQFjA z78VR}i2-3e)UBD~7t2Uvi7amSlo;=yF!ADfT7YbvLx^)YYr$YDC98USjmD18FMZxm zxrnj~EoAEJHIhD=!&q0&su~+f5#!QnIYf963U-jWeR3_TM`;a9i+0yCS8rWkeRtCOM9E<%#p_ zo+!=joK$tAKV`?h|NXI7kEWmJ{;<3I5AiL&%Kmh;j{GtBj-z+|YWlzl@_+Gn02uce z8DyS$<~SL|-5>GkU%hJ-0}fRd1d7DSd;_yA2=sEVS`>Sjzy;)O7cTY;dBJp_>xG-c zjc>H){Lct8KY9g5<}Q5t>1X)r8UjDOrI2Td2RN(ggub+-*yo)KaRnGv1tf)eluKhe z=3Z%lCGVS>?Ws}F*qHtxHb0p8VYJnJvQ4Dt@ zg>0khSR`o!98G__b%R~2@vQv2W(!*Z*)VZ6EHAf4>pTD8Q@wEcvY3^Z~6UKuJjCg z1@c~&e>m;t8XM#M%XuDj_0P{&RQ%{i^}BY}R(Oa;7NMJV;2_QJ^Upc{WwPE*kMNT~ zBWZ|wL)P|j8FR$4 z>8vx84|xu=8VJTVrZYj)xn=XpIY<5PhyRwAxCXkl!)zlm;FX*18EIla*KAJtI!)os z=Czm2$_Gmkw#;eF*&{1g5>%5>S;*)ijQbW?I#nzTQk!`Tnw}m_#sqXSNzLW)97liz z&|aJ-g`hqQ$@ImGuc#^+EI&-;@uzMhXUU&s{?3}8I(`$z$4$513FWLiZ?%8(n|6%k zR@o7YCIx+-$z+0%C>f2#b{7f(n1Blig}ZmlOftD?civ8G^x|@jw&&4kziFbTor3#D4^Up`fy|UF*W>IC- z&^4Ov`@pchX?K%GvqpYyS;upv-A4F0Dw7MO+r@T+02UsaJmdKlNhXhr`$&i!Ngk02 z;-a@$~)u@+;T4qvU_Hd)Fq<+MAk=lHb!DNoF&_r@SH) zGm>>YN?O-(HblDJ7#Osghj}K6O6JPdn3Id;qfA3tCxj@@Xb8XQ0!(qC(L~av>X}RE zD=I1=y3EH5sMw2jX>Wzc4{Wht_s~P&bJAHIvJEYla;bLOxp{2n0Tf!{f!;)AE8}3O zY?%{e%vs=MS0Z^JfH?iqorurt#VyAV#%zW z5vX61Nn&}#9xBVOspdSwavRE&C$x7PtV2FHp}Jb|4fz&iW2j<%v5L_Y9traC4$uY8 znwlD?rsLY1Z@zhL@yL-yVwV}MR@QDa1x8^`4=9hY}4kITblS-k;^ndestc>0OS z*38Wg+w%idg(Z--+J|SogJZHu(iKxx7K$WaiV;l1<;%($2k$#GF{8_AWoTz6&YV5~ zrbA&NMT*#$6*S1=;>3zchia=;C3A}1uH?#j^GbQhN=Y*15(She!d+||4=@DD1_c;=aBPHe-rRZJ&i zyoS<(^YgMgRt8zHC#EkebCVU$)_usU7F*Wx=6w$iWx%=qO8Uqxo4V~Ok~NGHO5~{)oo8fWhJX_D-`ad>b4;;j_?b9`?Mjd zl#Ak-_4;Ic5akoZ6DNkjS^W6Qu&h3M^ytk8_s-4jwYWIFK9O)|Y2@4tL*X2fkj1vE zAzjKJY#VGBMqGS;V^7aTxv>4n5w#7Y)uwL02A z`q^lVIyj`Z5MOm{kKE_Ngh4*XLJ)q43Fr7*jd?V(`ebSXUNCfO6`p`$L@OQ@#nsLL+!9TQ**YuHac`y4>*kI`N53)dB-j;gkIt>NfVT&V7oKm5Z_Zn(?( zyIYBiEa1=eU)pZX%K`&JY|Aaz%Fcz-V0n>`K8mc{NqhoMU(qr09r7KfXycB8d4PcY zSV?6{gNpD(l3cw-GHyq8Xi2@y6z3B{r&y^^(kbgf#qaO5)SNI zpOmV!baZqzxmB)UJ#DACH{O_Ahu1$RyVnBtiS-z95trV&4!BQA6b)@HvI^f{;R!ZV zp5W;BzBl?sbnxr4dkaF?srj{E(|i#z{G`k<%oh>FTgf4J-qF) zbwq!-wT$GMn2jr0i*am&R_yv^40!0R7BOp8)fURJ)~#2qjk^CUdna1H^|of|scz$+ za`Z$u($K0BpMIL`eL*BI$ZjyzTi4q>XLi?{(Zq@1{LC;=@}K?S-~0OJ=OfgHKCI$T zbyF$E`20MBDM7k;@%?s%8b*>BhA8dtqaT_scTY!&AtSmlkmz*x<<`1@h91~Og+Qe{ zsEnef;-;Has^}mH&Vi(D=jkV&c;enY)ztwAB&1U(ns+qqEaY91P`I;cNArnOvgy>_ z%{DUiDLuz)irAX(UPeFMl(RosvXImpVXRjbTj03R{74@-iGu_E0|N_O|L0sru9AkN zD^ZBK%Y|l^`S>hWS{Hh?c28q$iV< zU*%EqH|#Hq=;&@)ljhXggyDzpK$_;#LBsIw+mC`~C+P{cb%W;EQr4_-H}u2$rOr-C z=;#p06=4;wB}tNr#tuz=-ro|pg8(YZqyzVJ#Yu}A0 zzMDC@L0^r2R;|ySd!dd}Ntnh~z7t%UUFBe*BMOy-We@^Qu&KXniL90K(~YP0T8Q^^ zbgR$3#Ikq!1S>mXa1o-zCMZSH>2yzz7MY4QH6ggzD>^ZeNJ&K)=-NW zw3Q~EW;w#C*eRei%advUKwl4DhLV5a$>$=AoTZ%Z5pO>6rLX?RZyY(2B!^^UK~t^M zVP+IcbhSYX)1^s+wa%-N(rQy_KnrFdlVcFKEJPLt4 zUZ=v)^XbYgmNEvw38tj^!7uyf)g{fa#rLKA?>_^>11ApDk>f}@ufF~!D)6S z_l8I4Nqy)0hx{&0d@&k|gp?G9MXnB3!r;oRy-ZdHqjG4#iCz(?r4=7+b*GI&*_Jh(Eaz{dFK9y z?mP44haPy~fjjqCk-LzNlwYtNwXQSJ!xDQZCuQBab7qr71xFeKpWb*Dh?d&A;KP2; zY-O1kp6%?o-s@Rf3I+m!P+G{x(SLdIz#!Fq3vwg|L_s)}NW09Opr(hO@mH_T#^4eu zhLQD`rc!2bw<_|)&;UIPM1>Kobvl~vxNTuUEW){?XU^Pm_~>mAY#iB9!QySD3hGWi z_Sj=z+F49)M$)=`v({w}j19Fx&3(>l<)9e65KhDrvi^u8HU#9-Wo&91j~sDtI9;fy z5}KmZ)6t2EA`*}}!-4(#Wp?**38xEP{z)|IaNI;CpjMfSUp{wEX5SuPo&z95$AuTR zUqmz5%gU_y;?t=lMG1Na2Pg3rN~EmlzWS6Ot>8%+aG#f&!~J}U_E;^5Zz3>~1SK!t zrRCLt$xDntK$Xh{mpm~wkiY7f2VFX?D@KzQ>(YL|`#>>|#*r)*6Iyzs*5eNIg5#ry7l?z!jg*+;&C3{#0DsO(gPAw28S zvOHm8sWitVVV=I=&I1k(ATiEy;LbY>l9L@^V{}X=3kq^A_Eo~*!nia$9HUcl(cail zS(%r$4Jf8!0l28BDa9O8BECcYZIZA zwkmsI=F<4JYwjkSlz#N#V~rN?oM$=`3rA4Xl(uje)T?(kT7r1*3&x6l)b{872WrV} zNL*c0w;#Pi+uP-VmOY<{#F2Pxd`dR%sxhP%y0Q9QnNMh|cI|Snw~9+7YD}CkXUPQE z$D4WmyAcX%BeYc*n+@}96~<@7rnd^yWy9vT3e#u9rnU;>ZjhfU8>ZYK-o$@5O(`3e zB>9`eoY}C*`Y>TNP1lV>Hp#HF>G25rqBcq2IK?k$5$#rC+=iOnD8<`y`@w2mU!U&3 zu+rlk)ba5zSnjJsjsuqe!jiA1Vsmn%Wk1WAD$DZ1HR_Cfl%b#Mx4F=)cW&;(@O$D# zLf8M8i-t4Va1MJ#i5D}}z%KzGEgm2lTELa5E1yFrkUaNUHg8q(zT#gD|La@$Yv6C% z!e0x2?H2y|@Q-fcPxBSG@YloNu!X<*3(Bd3e|YP3Xn8hr3AwVskly_YH^P*r+&QX9 zmD^+S|G@xvCBMw46gw%EU)~TJV#dh?Lh}?0DcTs?!p$?pk5Ii)A+}9%eT5yftxMUtWj@Dq)H{<*yPWA{A|AzdJsM9)V9=??<`TL@0A_?1Y$QU(?=nfBC21Kq z#<4}>Xi&z+V4XrsCa>t-j81SB3Oa+S00&kTm<-f3Detr!I72>|qIMJ@2kkwZMavq& z)%ALeHXCTSC1SA$+-vB?GD2L!QY0Mi@24#wlvhZS#J(a5Bx8U`5J?(`QLxhZz5cQ`?)CW=W5fvjqu~`vFz1vU=o3!b{Bqc4ktk8 zsr=#5ATfeW)e}J=2HfaqVcaC`Vk6<0i(y#23fK>}D70-898_;G8KyL5luOqtqzNde zq>ODvE2HM*Z4QT7%TfA9ElFw)xRch6QgF zR6r`Wh(a#_rR-8M1SBxeLG$U0D06mpab$Lc{kUIc36ez%IkiYsgR_0nKy)xYrV8g1 zeVB~s$;yr?Yt1RikddL8C<8qxF1j!>oJ@v7BiFCY!1gvs&-p+Ios}9v)C5uAC1OB- z(6~7;wdPzr!xHR5h)OPX*o|rq=vz*0$SX*Z(o%b|-EK8o(G&C3YEl52oR=gcDrXSW z)S68^E^B9J%{qxXQOF@5?$2?h89{KFRT{#QbV;Fx#C&5D6CvztU3!M-=sV#%yHmw-E9OEo4l^K)ut6lz-l5WN7!Qh|>7B_f$nbCX1t zmfS>gv4T$Jsud0S7~NKr4WG2q45KnwQRjSv3ipyBANN)R9qKA-N1voQj&-S6jt+UA zQt~#7LBxO*4H!A;h~h(2_>@RGy=vq8bOw*Xuw&CH!CdMn(g+~W5kC=kVQdRp`Z`jJ zsK+7%9crGW7SXBrQmYH|0!g_r{LgAf7YTh%lX-0hKFO6jEP8fPSxk!@<0_C0dJ`Qp zTD3q&z1B)gof$uB6*O`&9GRt9E1Hx?k}QjthLl!b+R7~20zBO+=fP42AJw*PC&&(7QkPM{3E$~@Jy@Fo1kwAn6QS9iLkiqzp`HqfQX{lS#D9VWw z`($zeUbo)LClVXbT6Avj!Z5eGxrGHfTEWj=e>MjvG2nF)>)GrB`{ni4GGi2S3h%?vuAJ zqPPl5%avC<9J1sntSGOpzV+7D4fdmZI@^&ZMSjOZ_@=40a0#{uyIgA_n*bzl=h?hl zPu`70k@T#85vkH-`TpUdX=>1NvVXXry!&phE_dYS#7Z`aeZMG*ixbz*f5tK4*@@As z*!XpHTx`2^iDhwtyg)w-vD!RaC8*;9E{(CGWC%x1w}Unj*uRqC}!dGaNBNaFiG9y=KV^tE<%EJj=D-;OO~L_d1Ph zqE5Wq&0YJO*M`X7%fF{y$TKR=BR7?Re*C@cb0s<1lEDHq6$!!OdS4)nO@00(-+LR|?h={R6_VlmhpE4)lyd}F~(dNPhH@AED$cTI6 z88jX3v@Kr|7N7eXHBs@(`f$Nw9vdTL2%npI?5pJDa(F)4x&+}^$`}qUDsbFT`(PJ0 zHE=l~>m`r~Qb7%D9o7_p*3~9VWji20*U0pg75Gb7P}k$83ENMxg=O(q76 zL=Q0nK%VOfs%5DJCGxuH0Nni?!Ejura1Z2ULk>`gxxv`c)e~CeIBs!fh@QkTgJ}HB zymu06>%NJ}$q|<-Fhya${ZoNfM>M2>s{)&R_uYNhsh9;blLgYylaPf1XTWQ&j!woz7w_V|C_R>GGWLg zw0-LNlqB#x7nr_s;d6{`uXn5)qx(Wv_m#FbqM#Vcbf(tRbd;;pF;38FoK)?MO$)rs z3M=7SV{xI?Xt9vh_GuUypPL@MdbKC+IQaOJN-(Z3*>(V<{lwk(!3^Js7NmjJQ4f!L zddRwQ-_H69D;FL@At%xdCJ$RG8VDE|ySJVLAU3qSW%Mx8yC$A$ zdDR%<#@RswVI?KX!id2aJTZhP@)VA(?*AV@(ZcM^Jki3uNmhH`;f%IIM_VW45?#Zy z+zi?~>n^o*{P<^W5PrHqgS$+|(#3&`EAF#TeXUNc9|DmyMw>%fVm0QXa-9YoxNx|_ zt|3;rXsGXc@8A&JSW#(JRaIGGStY(oOQwg0+-q^z1f-7VC!;^{U>0Chk?*J!#e4UY zcY6W%W5n2ZvSl@`oECYV>wNRgPC8>S5!G20>t~<&>Q|q^!)_)f=34*09L-uAV^we> zMldJRJ2n=%etq;h+|b0t5WeV-2zEp!mZVv=$yVf;_IQ;j)v;!GHtA$tGR`m*?y=O} z#j@^Nm3I(sdJ&R^X?o{X6*(LSZim}dQL&4DA8b)5A)ziE{%>kovHv>GZLuz zx88jFLO2{_W2`9czvajga9r1y7lK?4E*Yi=R%CvRkM>@H>$%?7cfE(+^^T6Cyjr%a zdx>QQkc{!9%<7tUy7E|#M5*mhN0H5>X48b0mu07}!Fl6xFa4eZ*_6NQDBS+KhK9QR z^ln!^mnrX&Be(3AL>8qBhcCSS=36MQ1ZibJ<#djXE}<@b80Fmx>&m~{{p#y2%yvvw zV|Rb)?t5F9*H6pqsF~#_2e|KZuQOfSflXy!Wbb88zwRPyQzQ~c5%e7NH@+(=gZF&x zoJzlg zEA~z1uW*4Dc4sr;VtI{34X<3Ij~_sE~fL@P5Ei_B_332GIk zq9SO7(AEU|vI`bxq&L=B_j_HhcL0iE>BpR{f#juqV{m3cw{`4HY}>YHV%xTDCllM|#CGz; zwr$(CZ{B*p@5lXp`*d}k({<3hx_Y1L-M!YL%(Vv@Z?Qk8e~3bOdUkV_m9;CtCPXCT zSn}A~1YGLeXo|=~JZ}|%X%jnV`P~QwZh?#JcYk|5GpoU15Uslh3!+hoLO_V!R#Ebr zINvM~CbBXTR^^;?6AN+E*3}_y%<^0Z+vw5bUF3CF*UShQbHOIb_y0V1rg z+3{+2l|FoaCxfkIS-9TRsu@Pmc|Dy!JRnR+gsND&3D*x0)+yg_V#mih-5=hh)^d!Y z?x>6+)3TMLaR~DI&VEKKQpujM&V@BKJxNKChwnnadRl)z1T=o%tJD0DGQYWKj0`zf zSVUQC4~+kg%oFb2@O{tt^n@SX84=$K-=`vX;YEpW_dFO;=^LSgz-E(BZQcb+c92fV zQRtlP@Oi&9t_)EqDi!)u|6XxC8|&K{m6VEfShqs8p!H!_do3&M7A z2yD02R=ubKha0P0gtOQvS*5W4DlF~O?}<$mm0}Gc(V;-s@cH706!Kw5O_d2Zs04S1 zn8pfV*R&GR5t7jnDauwU^T5BekyX;xSSPeAVCcwqeXrJO&%(UX-C-O$4#X!PQvdCH zbWh3+Ol?Ud<6IAhuj}Fx&VET91&+Rl%~&2`<+>UNWU!))ZQIc~tWr>w$RGr!-L)2 z%XYOgt8CXyVA)mH>Tx|~BRc{5YQht<1zBKZcE!8o{8Ct^8{5Hl=ymrmuFT7`U+M|eDUNq|JpH>sUXVb1aXciU0K+e@BrM$Cz4m#fu2G&|LH3qUkx#+U(>4@j@3rbZ!(E2ny2fDlV@{$EA<~BZ`k2&}lQQV)<>6~70 zrOn%kKdZ<%b=TfV8-|OBe92-a{bw zuu7jk5H_4Ar@j2AXAiuU!V}YOzBAEse)_tM)6|$Vp zOAwbQF!fS0Rp$$5*{k;0meX09&JsY8aq=a~4yH$GE=y}K^t^>|GYhcqcMW0&zkb!= zmMa@^o#3Sf7WNRNwebh&0ozR8LK1ko^Xpr#_#OAh^12?0>s(F(9r4~RitXU@D=_#Y z{U8YOyna|Kf%gXD&mj{mbQ^)0m7<&|`XU&9D^msIo3x>V&IzDDc#1IwRmXaKAgQx9 z{?P|wuj$P{HnFk5KORo8RPcF*!v+)c3`Hk-WP^x;d2@6iRONdXzME zBM{sI=}2LC7yyp1X2!6oCxl^iszYyF(~*kC1S=fLvBaZxbrCv7XV#2C1gc~T(n;Xz z+5ICws2KxrpPE8ayVEg*?&!+Yd>; z%7(UQE}{YHn(}9RKwj9GI2=*m3VLa|yA+&Qb3fM^Lp_>FZvr!*2(8pmpPiKLm$g|fElhq+JDd)@N3zpl0(Gnk1o zca7tey(WnlX&lY7bF#fJzDw#Vx6{{|HTy{qCX^w% z_c7csci8eV4iO)d;G0h{<#EV0#bjYfJqFzh>#uc`L)~9MF8l-pNQ2OFHM|bvl}m)g ztVhGBuCCf~V`kXw@0F$)7Jp7vv|d0-$}D;khVlt_2{D9_ae3m4nCQoyYKDkM#Ya9a z1(Qqmhd^tx3|~0c)iX!V5Zw(QAMa_=QrL7B7Rmde8vBivh5HlMjnyej>#?t0q6vQo zkgfphGS&fhTY`2E%|9oj#6IeEQb(mhXNv$JSS+8#xFO zed`W+v%+a$<>krcWhhg2*Vb0dFE=3%V8#aULpJ#Lo`%h3c^1HDw%ge`1yCN%Mng$0 zrr~5l#-&%;D2X*f^k9(**%UHu#6ttB>ZgACEIe#9vyvjQl~uW91Y%xoVR`XTXW#gc z$YRcnz^VL{Z&RrdCj{xi;%{4u#3FRV`1F=PLl`(5h%%%$jD_`d*JF(J`KOX)F8M^zt$pw5!TXe_&Dx zsL^d2-o%86aSlz@4FF}Tr{~D;Q>SuK|jx_`&FFWdue87v#7C>u~L@` zUT)e`?YiE&U|^$oB%rb@AfAsebuN}McBkDac z=*%xM5u+5SX-b<_Z>YQTn>o1`eqCF#Od90`ym#c;I6dp@hH8U8pOhD`o!^ zeWrKQ!@HO6ot#jzfv1romiiN6okbRabli~v7YEf|8J;9*l}8OOtHOPf`TQyr?_Tec zTU0neOb?zkjNe)?h5n-lG^KVxhK`QD=YiI4*SQ}PA1)#^C=<*7cJdh-ah4H_$K%>E zCCWvr3Sqi0h49yERUhpGR7Z!eU`v0)BshG(tV_=CZ9Z2wGd4UWA;K|qvgi0HpC{Gj zDJ?6K26o+YQkoK!6PD@qas3GNMm9f#DhDLF%g9to8VP1opKJ?%!Gd|R*d+YUr~b{e zO93c%_y|J<{K<_U`w14cNrUVqbc@G~i7`@g3JI9fUpT-LkeU2-j@rDGhuBZAU*eX8 zR$(H6nnyx8V5k9ey=v0loHjmtQ!K3ivUjY>Cov%>E8TN|&&rWN{DkBR(H8zm==<(t zAZ4>SaAJsQvLq+>4>6Lu`cA*RE`#n;S66P|JMx@GErtM}_%PK?hrkv2KZP>|kYN zMOfa-uH$&OsB~)89oIXEC3efNJ3qGIq9MZZ`xAlh^=04fnp!0mVcY3hmx7#&58KYS zoMV1QlJ=519MbgDAw)xyxMK_AU$knbY=7mWOk9OE3wGfWnigpblta)|HY^nh=<+`m z4;%f1Y_}xB1=zqAEFv2XGRo9}u#663X^MJF?rJKCZr~CLo<38jmcUu=KT+IGaI|X9 z`Aj^?Bx0zB#Ymx{I>=DxdA3lB#>sSS4$!;qN;J$G+Cj=U9}m{Zi9U{|*v*|fJI&6I zvfuANj$dSa9@dBj)Wiq zVa})!t^B3rsxrja7dD%DN>N>ryjv{w_RLU0K>@fwiH9;l2%JPF(P;58rjVHrn1hXZ zn2{u>HQp*rIy4BtBKgqxo(Lw<9tp-ji7sDS9}dJ-lxO#Y5%vA@PSAGcp!RR4gyG*M z#ui)L+Hcmw*@d;V3*=uRk>h=ocDgTk-hMuiQjUpXs;c;jSIi+h8k~qziBD;_I_6yY zkoQZ{N}C@eTgCKEaacIkWCf@S75U$DH7}K;tM9wM2gAlgu~nH=^ShL1=vEvxb&*vV z>hH~3Wk=I}Ftw;sMiVm(hkH|kQK4 zCX+g zHIt17W+01jqIK}_8ro@oAVIQ;)8(-s)|TJr?dAzN+EnP%5gCyaO~ClyBTnFZ+BScg zXKtmVgA`OR?6bSI_7swWtCWxs1Zd~Ro16_mPK~?`Ivtpc$Yz@#y6yS%d2>9AOFO6( z>o;e*eHsyx2DZ^_dGM?yPRr{Ib3S=zxLS&>CH9%~QtaENv5)jG{pPMN^CVK^GEe8c z2(w{xX<=9hBPML8#;sMZ1!ok)YJu)BEAyQj{8Xvxt|9yA(|Bs&IGE1*p}dnbGXm!` zd~elj?b$Y}sa5OwdtOM>Gs#aj6_QiYm{#(*n3x8f#MzTvANgbN8x0CBm$M7*_MUOq zOwRZ~n!AXs;j6lK;gUV&woLder$%pT3Y9msz8&HNd1~ZH+P9B+wRSEl7`~lTjqLyd z(z5qz**6JVv^xgKNq43h^Z*)zz`MTz-bOiCA>Goo_Ar^Ux@iu5Nf0XMoKPd)ome9! zycH?|aJWy}!)CwtsqgQhN05He(NapL4eI{G1!QadV-SK({KU)k&ZoRb`P(yRDNmdp z6P%RHsQm4Zcsm&lQo1KoLWL^3keMa#S!XDN2F7%OH%xpjRic5LFnNb91>GoMo<@1J zwXtimYRif#kA9R=!NJYUeyOL_N-XB!kO!YU-moexPp}p2(GtA6%1PV8eca*HyC_Ic zNB_2rUMC(EY9?0qG?9l(nLnltLRRilBwxit<-hM5Zd?)xifR&|!8k%w&#c|(=KG}K z?0NwMIe^F~Uaj&&sKg{KQ6?z48!ub)=j0Q&sH!E)s5IK4ZwK@h@q$I8uk4a7*wPlA zW`OqC+Sb;U*iWY?_-gMfyyXMb;% zqft0L9jNlfdUUge}RIgR4JD0wg^N@h(qC!?mxkV`nC3cQcp+i!n88O6qL zCut3MU3Wg`cqM_SLNP%cU=}aAaQk3SvDeo2B#YF<5e_cxI*GecCQ)4KG#MBQegd_P^D&tA0<6fbpSxb2z2j$?+3 zxl7`e0^lB*lQ?X)*Ufj)A=l~k&R`w6{;>;j*`EG>9^MaWyClVzX^qz511*TKIj-JR zZz9=0VR2aldy`I5b11{)!(~d5gwPJHsf%*yFc1z1kE zN^;8RdKb2fRW%$OmvK58w-fEPI_`c46C4j)-+pxv zf2k5|c{9Bjtg;@P#d}IwQ$EO8QAO>>DQ;fgeJ>Bs;mx*ZY+~0u|GDSX1y}DE-kka8?gO70L$=s<#5OR$?|z6#lQ<+pd#0O zmo(4$(V1+>O9$w(guern8|41!Ml%L&~9hV_5ChmxjIwW{W;$KG2ZRNgZxGRit-j}=O+3D zU#;gUV+8o(SnJfcX}1C+7je18RIgGW{O$u0=v9JaJR5X!8Wbjz(r~WsouP)2HkHVm zOR>3@wMR{(sVPDANkfM^Hl-;wpuhOF6w3TVS$Z&K4v6m=k`Ep-*{n3M+2}iDmPi-O z6K|9*uWU@D9Me!B#BJ9sMMoD@^dPfU<)=r4ShD;`q-Lp)Bl`u(b}X@fZ%enQtfI0O zOPLx+Au0=_{k^r2y?BN8+D5mI{{eaJ3nYtN1w=TOKY~<(qIkPFfq-ABLJk(yIsKF% zGw0FOUeI5eaYN$f0>V?29c^m1AlHDPPuzmqvYIo=@AK-Ybsammc%{N)yQrMm-LvLU z)XyCec)grdsC8ui$M};rLQr+QaM9RC*94|`SJq)kDSd9Ua5RbjzV5WMvaSOD0$~hvNY1J70Yye!*w>O!2zT}a0ysLPSnV;< z6!c<92ECUSC+7tWZFTho+M;#0YrArmbFR9U-WJjM<#5;8$FCDH_qvJJ^X2Jy-EBQ=Ja=PU8m5fYTO$&n=9ZiJdGHza$40<~8AcPls{DyZjb$T$? zz-teug&EOyM(?TV^f(M zE91n#z~Oj?1N;o2$c39O+O|u=_Dc5n+yv~PTAK7R(fT1wj^2)FquE z7?Pe&Re5PP0;IAWL`8n&xveoNhc&46-%RIe^SGyGsO zCQKu2>5sKMVCePa{iKl?0Mnbh6xNuibG3LsevY{Ap8Sp}I8h-a^rNo+vHb;49{YN9 zB<$2c>uSL|$+&i48aX&WTu0afU3t0fb&Xd-z%N7R@truK*Jj-AEP?(U6B{_+wcL4y zD~QHoZ+p5Qn>v!otS4njL#+vJvR#vC=Pfkk5%O_<@aVQ>vB~JWhziRgajY_trJ^;} z7TBucwmvjd!FrXH*_l36H4&_tGS1wSC8S`kq4~0<%gpMWvR(4=#?iG)yd8v4?zC=W zwrpvT_b^cueC`0Nh&GR* z?bWmjy)K48?diIt2p!Z*&*wNBE&Z%`Dk~VHY^{?!-#KnuAi3uRBbNhw1rjhAmo{M`tfnU_>lN$iPZ<`6PRQk^5 zxaGdsq|jv4r5>+6|K;Wv76fZC$bfhzOF%>t`! zo0sQp>px*k2o?j3#F@R2xBac7f#~2r?YhI!+XCQZh_z#BjxBt6j!#5SP{!dH`SnI8Bs$Eb(yrC~yX} z2rYSEEx8#3(U5YIt7c(y>m`(jk^;VTAuIw(TN2m?#ku5b0?dQ2{Zd&l!yx&OWm`FlCIymY-g6DM6N>3Ra;?`&w%z+>*!en-Yn~9H z^Pb}fOmnW@Jqd1iH~@)OtW^&*8{y*{0+058jAlkQ3TBK@pPbGd9$(s41%&qXjxc%e z8~aL!mmNW%hqJqJT}X@yW+$mA5NK?7bWcz1&T|#@x`yZk*j(KEmHO&Cf#$AlZHV03 zwU$Y8xvtKBuhFq6H;MWj{DWw=vB5EA4EH$SI1$%lI2NTjaW-v`Jx)O`A)s@*uvFe) z{B!b1j;wn0m_tTj1{|WIg|oAn{)mS}qP4P9E6%Ken^S >-Aun5A4Gp>4U0IQJ zJSDj%uq;_-j;8!z8*BN3#G5`ojMF>mZtK$CmJZ>LZBP#+{!QxI(n!6=j?D+5s8yl| zCqq%@Li|olF66yc&uRtqxK_{9<1Bz%WM|3)$GtRZvu6gM<72a@tfd#+V6(pWfBD**uQxR;owP8FIttM>^4T=+ zFYN&$EludBGthdY*q;-P4l)cZvz=S2KfBDRiZdk$T!jv@&mB^%V^Q1_xXKs?qV=+O z7JK9WX_6hj5rQ5#_#XZR<>aHdT&e4ifAZwWse0~aHapMWG&cBWv{?RZ`hEHB@_nuF zy}fbqt#tNX)bur{>6ftehFiZkNd>Ryw`lrJv#{N3PTAXz)`CuJPCB~geMIozQlm#$5l!D;X zfUQ1!IFD;IjI^b*Mkgk>MUhTnv4a>qY7RRms)c0?WH-vw-S9;aXwyNe7Ta*5``;;g^I(Vd`+I0u7da=e}#F;{J_6W$C;2b`UBI+E~4_A_HQQ5 zEQ&p-|FvZ}rahkr&RN0U9c#S3P4p`5%G$~Q1Gow$7~C7M`U(n zH^FiFC6R_ryR#`dH%S4ZDE#M*I!7-^?m}M>oyQ08|KKpz^j+15&QmYy$Q`n%QO3zYhIp< zL@=uru9zHQ&p+^Mf`TE$N6+X3DXHLFHM7ULndU-NzDCgbzO@DRYM`}{g9Ucx2d0wT zg|vXtmgY(G{#9P|@KChWPlr8W`g(H1hNk~a>J&0B02gHsTNjj>*_i%Cgna)s>-q)} zxaIxqdlH*u{aqw9fqCww89ikAvHf?Q$#we#8Dn1}a=W$}OpqPy5^-&9Avuoir=($k?pgH2#cR*9FeVS_gLRc7U0k+2y92<1`CP zAP|x#R&QbPF}jnpTfaTSa3cH#v3D)=rS=>G23m#FFV*t7k4bvAKuVE8{3!#`2WN3wo)f6L0KwAkO>ECG`!KDm9U&Aj#-xeF?-Sk^#N4MY2 zU*K+D^9rFIH3hnht<#=H3WI*w_w%358;ibQ@gDcbe2?DO{khi%(YMbMP~(*oqXD#| zcd^%2_HY!2T)|3<7?dgI2@9=B zrQ>K)@X=?cYYwfUkafI;oV=Cl_)4^L)F~LK{e60f@)nUL_9PX7=P} z4(!MF^v4eT3Q6*RSm+w(M0qf7p-4!W{W=i;s*Nsw$amYf+IzTPq>erZZ$br>9Ku&G# zQ>k{y#@X0ocWW8vySn!eNXe`O3Y%_3`aNctsL8LKLf? z?6Zw>jM~rIAuZvY#F}!9x!2wyPHmY$t9Fb&-`GKKZtd5(a>#|`JwQMTK7EN7xJCFH z?SA3--bMO8tizXeA7jb64@jMGRAQ`)dyb1xr!5igNHU={3!alyt;=AmJY-u{FksRd zKX>P|+llT7=eS4T8e4a7uDcqQW855ncNZYo3G@y_xJTk2gJ92)L&;q2Qw7vz<6RhI zw69j=^56RYvX6_shj#K6oiw|&A4v9{sZgJ$*|?6mI630@V9j*%BPhV#=cM2qrIK|D zX~^2=#b_BJqjw6f(B9|fXc@G*vQPEeI0i=Wm_W(7i#qPuA#2z`m8LZXr_mU+T&hip zwl-wZS{Y*pGz4Z}7;?O?OauSAbKuX!kzq>kN!N}2zjcsT{WY;-f&2fqYxuuLt!}); zzFGn$l7;uW0FrtCtIWI(Z~-)N;#jTou6vwTdnnBt`K1nSXBWmDFf<|}SXlju8GT7c zDzz2vK5<9i|zx4aAwo>ml>7lgPd0s?QLl96URHi1yXy{%tO~s zB1rNfQ*OVcj6eJ36ND}6NeSvvnD7AKoH&5?A)dpd(bEr_K-F`5po-tN#zPiNm{fog zdTEAB$lHrs zvw2rdi&jvE*CC3{axexwRt7rIAKxW_`XF@}WU&<5Z!0Wu;|bkB=ic3t$g&s+{2=$K z31U7BBzu;|A(UkB{WVO#wKG;tPY!tm5^&I1j@<`TW zkOVQAZ7Fn3%tLi74>1hKdVCHA_siV;g=!pmqjfY@GpjhDBI`Ay&i(cDCaAr;sNF}{ z_kj!Uu;)iyu9|=&`(2GdpWSTTKSM@R6& z_?=updf73kQ0!e#x@RSg&bHodW%ofewxmL3UKv zTMJ+1vpAkWpANd$2jXtUM&UExm{Z0s*l-=Y=Amon3s0XrKTWp64IaR6*IF*$ZlUF& zIa$HMA-IAs1;!zJvsLuuvRVDy=Ijm$-`+)cj)UC@f1XM8eW_21cZw$=l-n&w$;qW9 zw`=bbZ=$nvGk%9hwTpl&c2mBe(xewGT=s0(E3A&8b1SOyS+$zk1YstbRUOg4qAl?> zwUCFwW8|FHZyoTgmud9>M}*D2IgOi#rM=uE;hQPB(l6b)Wm13d4|wPgP?H;qBq1JD zF-T_-*oR@T#)eJ+)A2>XeCadW_4;=!b4G?0~@LZY}0}fduLs=7p)>B0refS&IQ9HKyv$5Pm zG2O=VfCUAZ~&T8i~ub~MczSu)OH0Fc$8 zf#Fc77^^Tg=?-zqya)SOEr4lvciFmRh*NhwJEDl@WZI6vSQo#5X=lF}2BaMt?@+-P zEZ?dxju%+o4;6=74l={_n9x4T5I8M&UM+WK1uU2NU{7;60+}QrnOR9Ut41MqZpz>p zh46foHsXHtJm>WQTrDzft)Mw3m;$6GosoWZGT41ae13Au)u$Y(VOHATaIkeC(3Q&h z>VcPSZj`Mn;h^HXguh5)NH}XsFdQVdb%#_A_OYu;LNZ&5?Ckc5_S}UrpoM7W9e5G{H zH+LUjKRzIQpdf#+d{>tE85lf@s0+&|psOfF4I-zv&4ue#K$t&4(^&sDu= zpkFh5ae=>o9qEGs20d`c@@}}I`WHt+Y*%OaV)k!@w9a^Ccff>gYVJu5nGLi0%Eaxl z&4@=evMRjrkBM^cx%8ev=mjNp(JM5@4%^i1gWr<1!#UL)ny%Qi14)}Khz>lf)f)cd z#7#$U1fU)wQgLlm_!2yy^Y?&;-4P-XPYLlBela3c2=tLy#@u4wd1MVQ=I%fT@s284 z%HFf)FPIh|;ZB!vP2Y>(f-n$HMRt^yq`E^xYjjtBQP&WEbmPq>zVN&dnc(NpMgL^q zza9tZX=1W}Jsz233Ho}iweZR5Q^J14W3NT*V z&7`Y7z^4H(?Xq-rifx^#A)EE5_)J=zO1N~}z2}3DO}ps{3MJ=d-9>`_W&!#6&Sj7F zamHoZs_&S!*u>A%ER(KDhZ?|G0MFsW4r)OZS*@P^qaRDCoN`Ex;TKsANj{RI|6>|` zri8nBpAJfnX&-F5{c=#rif)dOs}Tq1g{%_YXthK!-KoV z{6mExa$bu*P!#;cn?y@l3HKMdUzfn0>5OpwCm8Flit9&qnU7EHQG42)JnmZ)(zdWQ zn(qC5G;*-r2sZ2VE3R9B3eUidt$(JwOhtd>EaX+O;n*OUqW^3hEz;-V`1~9Zv$3Z%2oX{`zyV*ZFoG#P_kv`siRF*W_g!otEmF)`6%U>cM7b8UK*-Ic(t z`NMNiU0vfG+qKR*&yr!`h07%UrAhyX(&mcoIsJVS^yrV@Ca-mQX0>S)mQ`^YmT7VN zVNGJu5!*d?QR^@Oq7m{9lq9WJQ=dWZ7X1e821ESUNV+1IoAMQED_lLg$z&KGl9z-n zXjxeRkdZVlf{b{?pL03 zQ*!BF198koVI*OzF)zBmeO)epNeN`$ehx6+x~2KsXLort#=Fk_;g+O$FQnKk3Vlf7 zpVNa_dGCm7c(zZcRWiw#sCP3>XMi;hr%gPp7gRm_eyvP|uUB9nRb3@tHwnE+>U8Yc zQaaS|a!X1*F!2!4Oyvcvu*rP1d}kt!5YAta^C7!oG+DQFmP*Ee*QJ zJQ8EpEHes3HOfI4kFJ7q|x*TFy`wax^-(b+5A`^^82E0<*bsX z-j?}yIXsACCY5AP8IotnI~TsiYU5&4emqafJZnP=H#V198~1Z7`w$g}Gp}fC_BcUB z*7?Wim_qy6UW32J82DI$|LWNGdltd94axExv&+@uL`aY0p;UIaU~AUfGVp!Uv?4vw z(U(>B)^E7*ZBhPwJ9Gjg!zQDGIpz?HA=GlhgBKc&<=W~cvU=t^VwXoBLD>#BSu{E| zi}a)h@p0GgMj0!IDnJWLXTk?QSu_9CWYcH*hKY2qJo-M$fnp3TwLQL>!Xg9OtDbE> za8=rqhm?}bo5;fv zU0{?;@sFUQ1PrMZeO!p*P=~=*T;{=1N1ME2@D|MVWTF15zQ`h3uU4g?Ua(ZM@b2X9 zhaZhP9~vZ1fJ%#Zi)O7+OUCDi9SnNFeC1A1p=$6rq#M3kDWf~*i=esSP2fHZU2X2} zcpt}y9*i&Ahsgfqm-l|2c*a<8HH=Q&AGhF)&@*(U;SOkz2Fdapo!v8vQjZoRQM3@T zqVXxE<0h6yewonzhCZn;fmJSiwUc1wiz&agR;S@@0e0Jo(c8jij7?lVZN=bRnC`vg z=W-Lpm&6-4DiOV#@}JfU5a*ph-fW|`4lbXbm_39hP$`0Ud^oSZ#aASh<98CzeYE6r zh;WO-kf0DZmIiJCMn8|VEe3(t`eIJW6e zY}1hXwPkhS7-KH$vwZzo-IO0>^d3zI8biH(%6x5~j)xLs`UK8Rl?$2`F1l7DnxTY} zmXsEJXVc?*_@{bOXl!$#1`b!XOKN>V{3km}0>_rb@Cz7!?ucFLSfMPouHnk?x5wUL zX`VGNw;3^UD{SA=kHc|@6rB|yC3!;OrEcGWv4VtHI4g@4##`+w*xX9GusX_`xyUMt zksR|DcXpM>h)#JBGx7gaPl27M-IB+8>-ipJQ8Z0?kmH}=Jz5_aiB;(g@dt|d)+3R7 zXsez%aLI`=s>N=J^dQ?5RODWZ{LGz_re&(YJTr+`t3T;}2yLTQtRl_m8sJ`pSs>e4 z?mD>7H#qfXGPGQzqiqhdFcx14^chAee!tQ?Mo0f{)M=QS(jHqIS@aU|I)QiOX6LTl zM*yxN$Ni>eo27sfpQt)5_0rP(*Ew_{oloN*obq~cUA`MVi*=I46*cuU>j#=96SX`> z%rPTz(FA3%xHQnen;k(NwKE61i+;bNV7(K25_td-@Lc-7;;B`ztagmRGkU?+4|z)6 zH|14o%^EEz^JNixm7Z+YkfS)V;d;QR75_9H(*q_b6_9+T)35W|n?m3-Az4=Pa*$U{$1hr^Z!Cz$X*WHAbO6o$&C$H${4HGHkB%MEI*-t zu<6pAo8MY4q}RQ{(O22?Or+GML~y5eIHCi+(PhfX|ES!5Zu+7=O*yDOwPWi&4kPMy z!z}TWVBybuKhr?9=Q43d_@EtP40dv=J)&W|+;s99N%$p1kO4QhxxYL28=E;mp|?0aB56{dI!8UAfElgz zXR#B#DY$T*!>Cnc$e41`L}6%7mEDvUk|pJsIi+hY&`QZlK&+>wB8bh?mV;Z@N&|xX zYs8T-Hqod0mv`l>(n0gVrhDRatwsY3YX#8DK)pjZM&-OJMunYK)v_i|V-*>_Re`C` z<%`mx8=hZrRS2$MPS+I(1ELVf^*^;}U51lwR*>)t(Qo4Ts%6=jc1v5SlyQ*hq6j&< z&x8(3X%8>(%xVA~-X+S_)qC28Ib#Z6*m1@TV4;uStfz!4X-0H6ExaSt7}A%w1Zt?t&Idal)10W>YDZK8p)5W*u2 zFes$Bazzdg7ruNoHD97OIZG&orKig0>xRF}$e&c}9|UaQ{f3iY|i?2RPP(-=l2(!Lp#90zHaE87&$4~*c1q4*!1Bu*t4|Y8^{xm(Y z>@D#Kb1qH8w>t;kLhRf88W!K6P2ZcrAD|a*HihoM$w{F0Ca37Z-AxRMqsDU%bM9`u z^8lMdq-Lat6>seS7Zea@p4DI0D_ijKEmPWFJHKl9^>x3!1~t;yHUhgcv1+1XeBEL@ zot-X;y7Rm}3Mm{!$;3_^s(X-dya@tBm7j(zc`8Hj#+(ynF>Y40;wmbl62XElt(CJE z9z1_kY_8MNLR(aYo;)dSVKKNDOogYwRz+RJQ%;Ru_#pD^bn)#WD~?gvsnQYpDvWSH zihsm$VZdJz`g-wmc4EL^5c)dt9e>?yyBXu5bKQhO=Vje|@5%kVVsyfoer|8l8Y7=~E?%T9 zR@QxP9_@@*Fj{TIw(OEc{j^eHi%_*;RHO4OznSC9VFNn?EcB}y2YeDP1BDft6`K{E z^%o{i9C#RfAbBT^=ij@4aqvUPR7h$ldIDukZQxSM7D0Ijdy#($I}v}1dXxP<_XUZ~ zMQ5zvn3*)u_-NjKKO~z=RmxTN#WvMt@1y5p*F=7k`6_<=9Y`2B8~A~fBBzq+N+rlpH+L46(|$A z3=yHT&`7ZgR<-=JMp^HBTi3_2EwJg30i3FuvH{kX)~5i?mu8`>4z3y5CdaEHuIV}^ z%d0Z3nVTlht3pp{d?wSYQcoG3CfBQCPw74;+pBU*hL=xT1H`xDrldRxI8;$d#B9V< zu2T+EE>ljjF0xLtZc{y+iT6lmT*I8h+`|UA)8N$<_C$Na$E3%`$EaojPH9dpPVr7b zPK8cMPK`>(*5}$6+I!k(+DF<~+Pm5k!qM1eRB56X<>%%yPIv{UKfTvK9Xl^gH^i#j zpiN;8I2WFD$S!QHPGm!{2v@pN=1j)Cu7D|9D|4{SF2c;U!kY6o`>PaU(SlA)=P1f~ zo_#0_NW8AJSLLqATAac*qf^*!%3B&|cWf?#Z_pkmGSphNAHQ#Fimvsp`LroSbH~#! zsGK?fy}eId6KEZU=7nc%R5fsph+|eHF2F6oCBP#i+c3ZPvDe6LBg<1SGG%D?-)6`r zD_t&dGH^0*GjK8R)Ns~t*KpPF*m2tZ+}A!IMJz!9T8AJS;Oz~lS zU#ON1Hn^6NHprGZ#Fn2>SW%p-DQA+l87V8YlXhE|Mmjv(`Ko(}s>c!o+gaN7WR=T| z)zD^VUx(6IRTea3*X0U4gZEYJSVX2J*E81y`XiniRE5tH2I2zccwu{;zq@aA4USu2 zjLhxT+_?Hz=;=N=o>#30?Wx1!oO5ejFsI9=9_bd_eFMYFft6%O4iqg>!ZfQ0)K-Lv z^JM!jVDgQTp9X#rl76h@ikCvVl0ElVqI*1X9l9S&COz@R5c)(@7=>B2T;?uyaX)nL zhWec$K!2K4N}uBl8r#DSJ8GvvP&g)RKcm7Kl@c&!IZ)E&N@Xc=MbC2uvT)ICaQQ$K z3Df}zxi<3&zM-6BPON72w`L8$YWD<;3nZFu`;kS$W6&jf1)KUzkz=L G)cz05(PHWV literal 0 HcmV?d00001 diff --git a/apps/docs/app/globals.css b/apps/docs/app/globals.css new file mode 100644 index 000000000..6af7ecbbb --- /dev/null +++ b/apps/docs/app/globals.css @@ -0,0 +1,50 @@ +:root { + --background: #ffffff; + --foreground: #171717; +} + +@media (prefers-color-scheme: dark) { + :root { + --background: #0a0a0a; + --foreground: #ededed; + } +} + +html, +body { + max-width: 100vw; + overflow-x: hidden; +} + +body { + color: var(--foreground); + background: var(--background); +} + +* { + box-sizing: border-box; + padding: 0; + margin: 0; +} + +a { + color: inherit; + text-decoration: none; +} + +.imgDark { + display: none; +} + +@media (prefers-color-scheme: dark) { + html { + color-scheme: dark; + } + + .imgLight { + display: none; + } + .imgDark { + display: unset; + } +} diff --git a/apps/docs/app/layout.tsx b/apps/docs/app/layout.tsx new file mode 100644 index 000000000..846953755 --- /dev/null +++ b/apps/docs/app/layout.tsx @@ -0,0 +1,31 @@ +import type { Metadata } from "next"; +import localFont from "next/font/local"; +import "./globals.css"; + +const geistSans = localFont({ + src: "./fonts/GeistVF.woff", + variable: "--font-geist-sans", +}); +const geistMono = localFont({ + src: "./fonts/GeistMonoVF.woff", + variable: "--font-geist-mono", +}); + +export const metadata: Metadata = { + title: "Create Next App", + description: "Generated by create next app", +}; + +export default function RootLayout({ + children, +}: Readonly<{ + children: React.ReactNode; +}>) { + return ( + + + {children} + + + ); +} diff --git a/apps/docs/app/page.module.css b/apps/docs/app/page.module.css new file mode 100644 index 000000000..3630662c6 --- /dev/null +++ b/apps/docs/app/page.module.css @@ -0,0 +1,188 @@ +.page { + --gray-rgb: 0, 0, 0; + --gray-alpha-200: rgba(var(--gray-rgb), 0.08); + --gray-alpha-100: rgba(var(--gray-rgb), 0.05); + + --button-primary-hover: #383838; + --button-secondary-hover: #f2f2f2; + + display: grid; + grid-template-rows: 20px 1fr 20px; + align-items: center; + justify-items: center; + min-height: 100svh; + padding: 80px; + gap: 64px; + font-synthesis: none; +} + +@media (prefers-color-scheme: dark) { + .page { + --gray-rgb: 255, 255, 255; + --gray-alpha-200: rgba(var(--gray-rgb), 0.145); + --gray-alpha-100: rgba(var(--gray-rgb), 0.06); + + --button-primary-hover: #ccc; + --button-secondary-hover: #1a1a1a; + } +} + +.main { + display: flex; + flex-direction: column; + gap: 32px; + grid-row-start: 2; +} + +.main ol { + font-family: var(--font-geist-mono); + padding-left: 0; + margin: 0; + font-size: 14px; + line-height: 24px; + letter-spacing: -0.01em; + list-style-position: inside; +} + +.main li:not(:last-of-type) { + margin-bottom: 8px; +} + +.main code { + font-family: inherit; + background: var(--gray-alpha-100); + padding: 2px 4px; + border-radius: 4px; + font-weight: 600; +} + +.ctas { + display: flex; + gap: 16px; +} + +.ctas a { + appearance: none; + border-radius: 128px; + height: 48px; + padding: 0 20px; + border: none; + font-family: var(--font-geist-sans); + border: 1px solid transparent; + transition: background 0.2s, color 0.2s, border-color 0.2s; + cursor: pointer; + display: flex; + align-items: center; + justify-content: center; + font-size: 16px; + line-height: 20px; + font-weight: 500; +} + +a.primary { + background: var(--foreground); + color: var(--background); + gap: 8px; +} + +a.secondary { + border-color: var(--gray-alpha-200); + min-width: 180px; +} + +button.secondary { + appearance: none; + border-radius: 128px; + height: 48px; + padding: 0 20px; + border: none; + font-family: var(--font-geist-sans); + border: 1px solid transparent; + transition: background 0.2s, color 0.2s, border-color 0.2s; + cursor: pointer; + display: flex; + align-items: center; + justify-content: center; + font-size: 16px; + line-height: 20px; + font-weight: 500; + background: transparent; + border-color: var(--gray-alpha-200); + min-width: 180px; +} + +.footer { + font-family: var(--font-geist-sans); + grid-row-start: 3; + display: flex; + gap: 24px; +} + +.footer a { + display: flex; + align-items: center; + gap: 8px; +} + +.footer img { + flex-shrink: 0; +} + +/* Enable hover only on non-touch devices */ +@media (hover: hover) and (pointer: fine) { + a.primary:hover { + background: var(--button-primary-hover); + border-color: transparent; + } + + a.secondary:hover { + background: var(--button-secondary-hover); + border-color: transparent; + } + + .footer a:hover { + text-decoration: underline; + text-underline-offset: 4px; + } +} + +@media (max-width: 600px) { + .page { + padding: 32px; + padding-bottom: 80px; + } + + .main { + align-items: center; + } + + .main ol { + text-align: center; + } + + .ctas { + flex-direction: column; + } + + .ctas a { + font-size: 14px; + height: 40px; + padding: 0 16px; + } + + a.secondary { + min-width: auto; + } + + .footer { + flex-wrap: wrap; + align-items: center; + justify-content: center; + } +} + +@media (prefers-color-scheme: dark) { + .logo { + filter: invert(); + } +} diff --git a/apps/docs/app/page.tsx b/apps/docs/app/page.tsx new file mode 100644 index 000000000..828709ac1 --- /dev/null +++ b/apps/docs/app/page.tsx @@ -0,0 +1,102 @@ +import Image, { type ImageProps } from "next/image"; +import { Button } from "@repo/ui/button"; +import styles from "./page.module.css"; + +type Props = Omit & { + srcLight: string; + srcDark: string; +}; + +const ThemeImage = (props: Props) => { + const { srcLight, srcDark, ...rest } = props; + + return ( + <> + + + + ); +}; + +export default function Home() { + return ( + + ); +} diff --git a/apps/docs/eslint.config.js b/apps/docs/eslint.config.js new file mode 100644 index 000000000..e8759ff50 --- /dev/null +++ b/apps/docs/eslint.config.js @@ -0,0 +1,4 @@ +import { nextJsConfig } from "@repo/eslint-config/next-js"; + +/** @type {import("eslint").Linter.Config} */ +export default nextJsConfig; diff --git a/apps/docs/next.config.js b/apps/docs/next.config.js new file mode 100644 index 000000000..4678774e6 --- /dev/null +++ b/apps/docs/next.config.js @@ -0,0 +1,4 @@ +/** @type {import('next').NextConfig} */ +const nextConfig = {}; + +export default nextConfig; diff --git a/apps/docs/package.json b/apps/docs/package.json new file mode 100644 index 000000000..7f9fa3cef --- /dev/null +++ b/apps/docs/package.json @@ -0,0 +1,27 @@ +{ + "name": "docs", + "version": "0.1.0", + "type": "module", + "private": true, + "scripts": { + "dev": "next dev --turbopack --port 3001", + "build": "next build", + "start": "next start", + "lint": "next lint --max-warnings 0", + "check-types": "tsc --noEmit" + }, + "dependencies": { + "@repo/ui": "workspace:*", + "next": "^15.1.0", + "react": "^19.0.0", + "react-dom": "^19.0.0" + }, + "devDependencies": { + "@repo/eslint-config": "workspace:*", + "@repo/typescript-config": "workspace:*", + "@types/node": "^20", + "@types/react": "18.3.1", + "@types/react-dom": "18.3.0", + "typescript": "5.5.4" + } +} diff --git a/apps/docs/public/file-text.svg b/apps/docs/public/file-text.svg new file mode 100644 index 000000000..9cfb3c986 --- /dev/null +++ b/apps/docs/public/file-text.svg @@ -0,0 +1,3 @@ + + + diff --git a/apps/docs/public/globe.svg b/apps/docs/public/globe.svg new file mode 100644 index 000000000..4230a3d20 --- /dev/null +++ b/apps/docs/public/globe.svg @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/apps/docs/public/next.svg b/apps/docs/public/next.svg new file mode 100644 index 000000000..5174b28c5 --- /dev/null +++ b/apps/docs/public/next.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/apps/docs/public/turborepo-dark.svg b/apps/docs/public/turborepo-dark.svg new file mode 100644 index 000000000..dae38fed5 --- /dev/null +++ b/apps/docs/public/turborepo-dark.svg @@ -0,0 +1,19 @@ + + + + + + + + + + + + + + + + + + + diff --git a/apps/docs/public/turborepo-light.svg b/apps/docs/public/turborepo-light.svg new file mode 100644 index 000000000..ddea91581 --- /dev/null +++ b/apps/docs/public/turborepo-light.svg @@ -0,0 +1,19 @@ + + + + + + + + + + + + + + + + + + + diff --git a/apps/docs/public/vercel.svg b/apps/docs/public/vercel.svg new file mode 100644 index 000000000..0164ddc5a --- /dev/null +++ b/apps/docs/public/vercel.svg @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/apps/docs/public/window.svg b/apps/docs/public/window.svg new file mode 100644 index 000000000..bbc780069 --- /dev/null +++ b/apps/docs/public/window.svg @@ -0,0 +1,3 @@ + + + diff --git a/apps/docs/tsconfig.json b/apps/docs/tsconfig.json new file mode 100644 index 000000000..7aef05698 --- /dev/null +++ b/apps/docs/tsconfig.json @@ -0,0 +1,20 @@ +{ + "extends": "@repo/typescript-config/nextjs.json", + "compilerOptions": { + "plugins": [ + { + "name": "next" + } + ] + }, + "include": [ + "**/*.ts", + "**/*.tsx", + "next-env.d.ts", + "next.config.js", + ".next/types/**/*.ts" + ], + "exclude": [ + "node_modules" + ] +} diff --git a/apps/web/.gitignore b/apps/web/.gitignore new file mode 100644 index 000000000..f886745c5 --- /dev/null +++ b/apps/web/.gitignore @@ -0,0 +1,36 @@ +# See https://help.github.com/articles/ignoring-files/ for more about ignoring files. + +# dependencies +/node_modules +/.pnp +.pnp.js +.yarn/install-state.gz + +# testing +/coverage + +# next.js +/.next/ +/out/ + +# production +/build + +# misc +.DS_Store +*.pem + +# debug +npm-debug.log* +yarn-debug.log* +yarn-error.log* + +# env files (can opt-in for commiting if needed) +.env* + +# vercel +.vercel + +# typescript +*.tsbuildinfo +next-env.d.ts diff --git a/apps/web/README.md b/apps/web/README.md new file mode 100644 index 000000000..a98bfa814 --- /dev/null +++ b/apps/web/README.md @@ -0,0 +1,36 @@ +This is a [Next.js](https://nextjs.org) project bootstrapped with [`create-next-app`](https://nextjs.org/docs/app/api-reference/create-next-app). + +## Getting Started + +First, run the development server: + +```bash +npm run dev +# or +yarn dev +# or +pnpm dev +# or +bun dev +``` + +Open [http://localhost:3000](http://localhost:3000) with your browser to see the result. + +You can start editing the page by modifying `app/page.tsx`. The page auto-updates as you edit the file. + +This project uses [`next/font`](https://nextjs.org/docs/app/building-your-application/optimizing/fonts) to automatically optimize and load Inter, a custom Google Font. + +## Learn More + +To learn more about Next.js, take a look at the following resources: + +- [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API. +- [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial. + +You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js) - your feedback and contributions are welcome! + +## Deploy on Vercel + +The easiest way to deploy your Next.js app is to use the [Vercel Platform](https://vercel.com/new?utm_medium=default-template&filter=next.js&utm_source=create-next-app&utm_campaign=create-next-app-readme) from the creators of Next.js. + +Check out our [Next.js deployment documentation](https://nextjs.org/docs/app/building-your-application/deploying) for more details. diff --git a/apps/web/app/favicon.ico b/apps/web/app/favicon.ico new file mode 100644 index 0000000000000000000000000000000000000000..718d6fea4835ec2d246af9800eddb7ffb276240c GIT binary patch literal 25931 zcmeHv30#a{`}aL_*G&7qml|y<+KVaDM2m#dVr!KsA!#An?kSQM(q<_dDNCpjEux83 zLb9Z^XxbDl(w>%i@8hT6>)&Gu{h#Oeyszu?xtw#Zb1mO{pgX9699l+Qppw7jXaYf~-84xW z)w4x8?=youko|}Vr~(D$UXIbiXABHh`p1?nn8Po~fxRJv}|0e(BPs|G`(TT%kKVJAdg5*Z|x0leQq0 zkdUBvb#>9F()jo|T~kx@OM8$9wzs~t2l;K=woNssA3l6|sx2r3+kdfVW@e^8e*E}v zA1y5{bRi+3Z`uD3{F7LgFJDdvm;nJilkzDku>BwXH(8ItVCXk*-lSJnR?-2UN%hJ){&rlvg`CDTj z)Bzo!3v7Ou#83zEDEFcKt(f1E0~=rqeEbTnMvWR#{+9pg%7G8y>u1OVRUSoox-ovF z2Ydma(;=YuBY(eI|04{hXzZD6_f(v~H;C~y5=DhAC{MMS>2fm~1H_t2$56pc$NH8( z5bH|<)71dV-_oCHIrzrT`2s-5w_+2CM0$95I6X8p^r!gHp+j_gd;9O<1~CEQQGS8) zS9Qh3#p&JM-G8rHekNmKVewU;pJRcTAog68KYo^dRo}(M>36U4Us zfgYWSiHZL3;lpWT=zNAW>Dh#mB!_@Lg%$ms8N-;aPqMn+C2HqZgz&9~Eu z4|Kp<`$q)Uw1R?y(~S>ePdonHxpV1#eSP1B;Ogo+-Pk}6#0GsZZ5!||ev2MGdh}_m z{DeR7?0-1^zVs&`AV6Vt;r3`I`OI_wgs*w=eO%_#7Kepl{B@xiyCANc(l zzIyd4y|c6PXWq9-|KM8(zIk8LPk(>a)zyFWjhT!$HJ$qX1vo@d25W<fvZQ2zUz5WRc(UnFMKHwe1| zWmlB1qdbiA(C0jmnV<}GfbKtmcu^2*P^O?MBLZKt|As~ge8&AAO~2K@zbXelK|4T<{|y4`raF{=72kC2Kn(L4YyenWgrPiv z@^mr$t{#X5VuIMeL!7Ab6_kG$&#&5p*Z{+?5U|TZ`B!7llpVmp@skYz&n^8QfPJzL z0G6K_OJM9x+Wu2gfN45phANGt{7=C>i34CV{Xqlx(fWpeAoj^N0Biu`w+MVcCUyU* zDZuzO0>4Z6fbu^T_arWW5n!E45vX8N=bxTVeFoep_G#VmNlQzAI_KTIc{6>c+04vr zx@W}zE5JNSU>!THJ{J=cqjz+4{L4A{Ob9$ZJ*S1?Ggg3klFp!+Y1@K+pK1DqI|_gq z5ZDXVpge8-cs!o|;K73#YXZ3AShj50wBvuq3NTOZ`M&qtjj#GOFfgExjg8Gn8>Vq5 z`85n+9|!iLCZF5$HJ$Iu($dm?8~-ofu}tEc+-pyke=3!im#6pk_Wo8IA|fJwD&~~F zc16osQ)EBo58U7XDuMexaPRjU@h8tXe%S{fA0NH3vGJFhuyyO!Uyl2^&EOpX{9As0 zWj+P>{@}jxH)8|r;2HdupP!vie{sJ28b&bo!8`D^x}TE$%zXNb^X1p@0PJ86`dZyj z%ce7*{^oo+6%&~I!8hQy-vQ7E)0t0ybH4l%KltWOo~8cO`T=157JqL(oq_rC%ea&4 z2NcTJe-HgFjNg-gZ$6!Y`SMHrlj}Etf7?r!zQTPPSv}{so2e>Fjs1{gzk~LGeesX%r(Lh6rbhSo_n)@@G-FTQy93;l#E)hgP@d_SGvyCp0~o(Y;Ee8{ zdVUDbHm5`2taPUOY^MAGOw*>=s7=Gst=D+p+2yON!0%Hk` zz5mAhyT4lS*T3LS^WSxUy86q&GnoHxzQ6vm8)VS}_zuqG?+3td68_x;etQAdu@sc6 zQJ&5|4(I?~3d-QOAODHpZ=hlSg(lBZ!JZWCtHHSj`0Wh93-Uk)_S%zsJ~aD>{`A0~ z9{AG(e|q3g5B%wYKRxiL2Y$8(4w6bzchKuloQW#e&S3n+P- z8!ds-%f;TJ1>)v)##>gd{PdS2Oc3VaR`fr=`O8QIO(6(N!A?pr5C#6fc~Ge@N%Vvu zaoAX2&(a6eWy_q&UwOhU)|P3J0Qc%OdhzW=F4D|pt0E4osw;%<%Dn58hAWD^XnZD= z>9~H(3bmLtxpF?a7su6J7M*x1By7YSUbxGi)Ot0P77`}P3{)&5Un{KD?`-e?r21!4vTTnN(4Y6Lin?UkSM z`MXCTC1@4A4~mvz%Rh2&EwY))LeoT=*`tMoqcEXI>TZU9WTP#l?uFv+@Dn~b(>xh2 z;>B?;Tz2SR&KVb>vGiBSB`@U7VIWFSo=LDSb9F{GF^DbmWAfpms8Sx9OX4CnBJca3 zlj9(x!dIjN?OG1X4l*imJNvRCk}F%!?SOfiOq5y^mZW)jFL@a|r-@d#f7 z2gmU8L3IZq0ynIws=}~m^#@&C%J6QFo~Mo4V`>v7MI-_!EBMMtb%_M&kvAaN)@ZVw z+`toz&WG#HkWDjnZE!6nk{e-oFdL^$YnbOCN}JC&{$#$O27@|Tn-skXr)2ml2~O!5 zX+gYoxhoc7qoU?C^3~&!U?kRFtnSEecWuH0B0OvLodgUAi}8p1 zrO6RSXHH}DMc$&|?D004DiOVMHV8kXCP@7NKB zgaZq^^O<7PoKEp72kby@W0Z!Y*Ay{&vfg#C&gG@YVR9g?FEocMUi1gSN$+V+ayF45{a zuDZDTN}mS|;BO%gEf}pjBfN2-gIrU#G5~cucA;dokXW89%>AyXJJI z9X4UlIWA|ZYHgbI z5?oFk@A=Ik7lrEQPDH!H+b`7_Y~aDb_qa=B2^Y&Ow41cU=4WDd40dp5(QS-WMN-=Y z9g;6_-JdNU;|6cPwf$ak*aJIcwL@1n$#l~zi{c{EW?T;DaW*E8DYq?Umtz{nJ&w-M zEMyTDrC&9K$d|kZe2#ws6)L=7K+{ zQw{XnV6UC$6-rW0emqm8wJoeZK)wJIcV?dST}Z;G0Arq{dVDu0&4kd%N!3F1*;*pW zR&qUiFzK=@44#QGw7k1`3t_d8&*kBV->O##t|tonFc2YWrL7_eqg+=+k;!F-`^b8> z#KWCE8%u4k@EprxqiV$VmmtiWxDLgnGu$Vs<8rppV5EajBXL4nyyZM$SWVm!wnCj-B!Wjqj5-5dNXukI2$$|Bu3Lrw}z65Lc=1G z^-#WuQOj$hwNGG?*CM_TO8Bg-1+qc>J7k5c51U8g?ZU5n?HYor;~JIjoWH-G>AoUP ztrWWLbRNqIjW#RT*WqZgPJXU7C)VaW5}MiijYbABmzoru6EmQ*N8cVK7a3|aOB#O& zBl8JY2WKfmj;h#Q!pN%9o@VNLv{OUL?rixHwOZuvX7{IJ{(EdPpuVFoQqIOa7giLVkBOKL@^smUA!tZ1CKRK}#SSM)iQHk)*R~?M!qkCruaS!#oIL1c z?J;U~&FfH#*98^G?i}pA{ z9Jg36t4=%6mhY(quYq*vSxptes9qy|7xSlH?G=S@>u>Ebe;|LVhs~@+06N<4CViBk zUiY$thvX;>Tby6z9Y1edAMQaiH zm^r3v#$Q#2T=X>bsY#D%s!bhs^M9PMAcHbCc0FMHV{u-dwlL;a1eJ63v5U*?Q_8JO zT#50!RD619#j_Uf))0ooADz~*9&lN!bBDRUgE>Vud-i5ck%vT=r^yD*^?Mp@Q^v+V zG#-?gKlr}Eeqifb{|So?HM&g91P8|av8hQoCmQXkd?7wIJwb z_^v8bbg`SAn{I*4bH$u(RZ6*xUhuA~hc=8czK8SHEKTzSxgbwi~9(OqJB&gwb^l4+m`k*Q;_?>Y-APi1{k zAHQ)P)G)f|AyjSgcCFps)Fh6Bca*Xznq36!pV6Az&m{O8$wGFD? zY&O*3*J0;_EqM#jh6^gMQKpXV?#1?>$ml1xvh8nSN>-?H=V;nJIwB07YX$e6vLxH( zqYwQ>qxwR(i4f)DLd)-$P>T-no_c!LsN@)8`e;W@)-Hj0>nJ-}Kla4-ZdPJzI&Mce zv)V_j;(3ERN3_@I$N<^|4Lf`B;8n+bX@bHbcZTopEmDI*Jfl)-pFDvo6svPRoo@(x z);_{lY<;);XzT`dBFpRmGrr}z5u1=pC^S-{ce6iXQlLGcItwJ^mZx{m$&DA_oEZ)B{_bYPq-HA zcH8WGoBG(aBU_j)vEy+_71T34@4dmSg!|M8Vf92Zj6WH7Q7t#OHQqWgFE3ARt+%!T z?oLovLVlnf?2c7pTc)~cc^($_8nyKwsN`RA-23ed3sdj(ys%pjjM+9JrctL;dy8a( z@en&CQmnV(()bu|Y%G1-4a(6x{aLytn$T-;(&{QIJB9vMox11U-1HpD@d(QkaJdEb zG{)+6Dos_L+O3NpWo^=gR?evp|CqEG?L&Ut#D*KLaRFOgOEK(Kq1@!EGcTfo+%A&I z=dLbB+d$u{sh?u)xP{PF8L%;YPPW53+@{>5W=Jt#wQpN;0_HYdw1{ksf_XhO4#2F= zyPx6Lx2<92L-;L5PD`zn6zwIH`Jk($?Qw({erA$^bC;q33hv!d!>%wRhj# zal^hk+WGNg;rJtb-EB(?czvOM=H7dl=vblBwAv>}%1@{}mnpUznfq1cE^sgsL0*4I zJ##!*B?=vI_OEVis5o+_IwMIRrpQyT_Sq~ZU%oY7c5JMIADzpD!Upz9h@iWg_>>~j zOLS;wp^i$-E?4<_cp?RiS%Rd?i;f*mOz=~(&3lo<=@(nR!_Rqiprh@weZlL!t#NCc zO!QTcInq|%#>OVgobj{~ixEUec`E25zJ~*DofsQdzIa@5^nOXj2T;8O`l--(QyU^$t?TGY^7#&FQ+2SS3B#qK*k3`ye?8jUYSajE5iBbJls75CCc(m3dk{t?- zopcER9{Z?TC)mk~gpi^kbbu>b-+a{m#8-y2^p$ka4n60w;Sc2}HMf<8JUvhCL0B&Btk)T`ctE$*qNW8L$`7!r^9T+>=<=2qaq-;ll2{`{Rg zc5a0ZUI$oG&j-qVOuKa=*v4aY#IsoM+1|c4Z)<}lEDvy;5huB@1RJPquU2U*U-;gu z=En2m+qjBzR#DEJDO`WU)hdd{Vj%^0V*KoyZ|5lzV87&g_j~NCjwv0uQVqXOb*QrQ zy|Qn`hxx(58c70$E;L(X0uZZ72M1!6oeg)(cdKO ze0gDaTz+ohR-#d)NbAH4x{I(21yjwvBQfmpLu$)|m{XolbgF!pmsqJ#D}(ylp6uC> z{bqtcI#hT#HW=wl7>p!38sKsJ`r8}lt-q%Keqy%u(xk=yiIJiUw6|5IvkS+#?JTBl z8H5(Q?l#wzazujH!8o>1xtn8#_w+397*_cy8!pQGP%K(Ga3pAjsaTbbXJlQF_+m+-UpUUent@xM zg%jqLUExj~o^vQ3Gl*>wh=_gOr2*|U64_iXb+-111aH}$TjeajM+I20xw(((>fej-@CIz4S1pi$(#}P7`4({6QS2CaQS4NPENDp>sAqD z$bH4KGzXGffkJ7R>V>)>tC)uax{UsN*dbeNC*v}#8Y#OWYwL4t$ePR?VTyIs!wea+ z5Urmc)X|^`MG~*dS6pGSbU+gPJoq*^a=_>$n4|P^w$sMBBy@f*Z^Jg6?n5?oId6f{ z$LW4M|4m502z0t7g<#Bx%X;9<=)smFolV&(V^(7Cv2-sxbxopQ!)*#ZRhTBpx1)Fc zNm1T%bONzv6@#|dz(w02AH8OXe>kQ#1FMCzO}2J_mST)+ExmBr9cva-@?;wnmWMOk z{3_~EX_xadgJGv&H@zK_8{(x84`}+c?oSBX*Ge3VdfTt&F}yCpFP?CpW+BE^cWY0^ zb&uBN!Ja3UzYHK-CTyA5=L zEMW{l3Usky#ly=7px648W31UNV@K)&Ub&zP1c7%)`{);I4b0Q<)B}3;NMG2JH=X$U zfIW4)4n9ZM`-yRj67I)YSLDK)qfUJ_ij}a#aZN~9EXrh8eZY2&=uY%2N0UFF7<~%M zsB8=erOWZ>Ct_#^tHZ|*q`H;A)5;ycw*IcmVxi8_0Xk}aJA^ath+E;xg!x+As(M#0=)3!NJR6H&9+zd#iP(m0PIW8$ z1Y^VX`>jm`W!=WpF*{ioM?C9`yOR>@0q=u7o>BP-eSHqCgMDj!2anwH?s%i2p+Q7D zzszIf5XJpE)IG4;d_(La-xenmF(tgAxK`Y4sQ}BSJEPs6N_U2vI{8=0C_F?@7<(G; zo$~G=8p+076G;`}>{MQ>t>7cm=zGtfbdDXm6||jUU|?X?CaE?(<6bKDYKeHlz}DA8 zXT={X=yp_R;HfJ9h%?eWvQ!dRgz&Su*JfNt!Wu>|XfU&68iRikRrHRW|ZxzRR^`eIGt zIeiDgVS>IeExKVRWW8-=A=yA`}`)ZkWBrZD`hpWIxBGkh&f#ijr449~m`j6{4jiJ*C!oVA8ZC?$1RM#K(_b zL9TW)kN*Y4%^-qPpMP7d4)o?Nk#>aoYHT(*g)qmRUb?**F@pnNiy6Fv9rEiUqD(^O zzyS?nBrX63BTRYduaG(0VVG2yJRe%o&rVrLjbxTaAFTd8s;<<@Qs>u(<193R8>}2_ zuwp{7;H2a*X7_jryzriZXMg?bTuegABb^87@SsKkr2)0Gyiax8KQWstw^v#ix45EVrcEhr>!NMhprl$InQMzjSFH54x5k9qHc`@9uKQzvL4ihcq{^B zPrVR=o_ic%Y>6&rMN)hTZsI7I<3&`#(nl+3y3ys9A~&^=4?PL&nd8)`OfG#n zwAMN$1&>K++c{^|7<4P=2y(B{jJsQ0a#U;HTo4ZmWZYvI{+s;Td{Yzem%0*k#)vjpB zia;J&>}ICate44SFYY3vEelqStQWFihx%^vQ@Do(sOy7yR2@WNv7Y9I^yL=nZr3mb zXKV5t@=?-Sk|b{XMhA7ZGB@2hqsx}4xwCW!in#C zI@}scZlr3-NFJ@NFaJlhyfcw{k^vvtGl`N9xSo**rDW4S}i zM9{fMPWo%4wYDG~BZ18BD+}h|GQKc-g^{++3MY>}W_uq7jGHx{mwE9fZiPCoxN$+7 zrODGGJrOkcPQUB(FD5aoS4g~7#6NR^ma7-!>mHuJfY5kTe6PpNNKC9GGRiu^L31uG z$7v`*JknQHsYB!Tm_W{a32TM099djW%5e+j0Ve_ct}IM>XLF1Ap+YvcrLV=|CKo6S zb+9Nl3_YdKP6%Cxy@6TxZ>;4&nTneadr z_ES90ydCev)LV!dN=#(*f}|ZORFdvkYBni^aLbUk>BajeWIOcmHP#8S)*2U~QKI%S zyrLmtPqb&TphJ;>yAxri#;{uyk`JJqODDw%(Z=2`1uc}br^V%>j!gS)D*q*f_-qf8&D;W1dJgQMlaH5er zN2U<%Smb7==vE}dDI8K7cKz!vs^73o9f>2sgiTzWcwY|BMYHH5%Vn7#kiw&eItCqa zIkR2~Q}>X=Ar8W|^Ms41Fm8o6IB2_j60eOeBB1Br!boW7JnoeX6Gs)?7rW0^5psc- zjS16yb>dFn>KPOF;imD}e!enuIniFzv}n$m2#gCCv4jM#ArwlzZ$7@9&XkFxZ4n!V zj3dyiwW4Ki2QG{@i>yuZXQizw_OkZI^-3otXC{!(lUpJF33gI60ak;Uqitp74|B6I zgg{b=Iz}WkhCGj1M=hu4#Aw173YxIVbISaoc z-nLZC*6Tgivd5V`K%GxhBsp@SUU60-rfc$=wb>zdJzXS&-5(NRRodFk;Kxk!S(O(a0e7oY=E( zAyS;Ow?6Q&XA+cnkCb{28_1N8H#?J!*$MmIwLq^*T_9-z^&UE@A(z9oGYtFy6EZef LrJugUA?W`A8`#=m literal 0 HcmV?d00001 diff --git a/apps/web/app/fonts/GeistMonoVF.woff b/apps/web/app/fonts/GeistMonoVF.woff new file mode 100644 index 0000000000000000000000000000000000000000..f2ae185cbfd16946a534d819e9eb03924abbcc49 GIT binary patch literal 67864 zcmZsCV{|6X^LDby#!fc2?QCp28{4*X$D569+qP}vj&0lKKhN*HAKy9W>N!=Xdb(?> zQB^(TCNCxi0tx~G0t$@@g8bk8lJvX$|6bxEqGBK*H_sp-KYBnwz$0Q}BT2;-%I=)X2ub{=04r2*}TK5D+LXt~5{t z)Bof^+#0@Rw7=mKi|m$bX6?Bh~_rVfN!~Z5D+lYZ~eMdYd=)1 z?To(VG`{%|MBi{mhZ2~!F#vq`Pec9x)g^>91o^TxurUDvvGDqSS9st3-kw(m@3Xga z`qtIzyIr_nARq+I@sH7;0MG(2NPTSa#jh!1f4cEF5Xll)bpZ(>cyI|Q1wleT1wA5Y zq9^hv^x;~(?2G$>(CTL2)#Ou-rP=XDW$spn8<%0TH%F=^X^(F62Vd@bY`Wi$j$33w zf!U^8o_B|x>{pW$eFZG}b7#|uFueKt$`e9j!wHNBGQX67&nfgl(Ae`3qE-E+yBSfA zEnJSA6p%}|+P9ZIYR{w}nfaKIlV@b3YYzcH!?WNXRvg|J( z((lq^WAE%Q7;oE?zDk~Nvg1Dr_0)KH8m&HF%^&8bI!=#YAGqIx$Yf2lH9S*;=c=b6 zUHi?R*$?Q;>HU4-#?hGJ&dj2jq>d3;_NN_TeipMG!(E+ou)RL-kMQv(W$b9+k# z*%bh8;4)9Je-Giu+XwdbyoaSGei^KG*(1D)5+h{Kfg<`v)nU>dj}RiD_+VvZgb7>9 z-Qb^cdc0k1VSIW!onbm2*_uY*_+r1qe${8^DzXxMnX@F#u>I3_n0j_0ih#p?wd+gPI5niQVbIIsk zkxy%JZZqLeb?p_DXdh1*9Z(O`Nm%TZ(zL`RA!dd+$VNO>qwecEt;dy5w%UK1@1exK zD~__{?4}pb@sGL5CjI=xAR7Jym_*l%fS~I(m>6873y~E7k;IfdA_0)|1$o9?h92Js zt4eu6$WMaSodkz#g|LB%Iw?^B?6x^A=arKjpBhhH6ZCbk2{;io5x)B3eh9R{KEOQX z9|&Q1T3-YGeF+9$doOBzU`TntM~LF~ON3aEZ|p9Y7+wF9qBi`6(hl}&)@-uZ`4zJl z>R`Cps(&x90dBZ~SLeCp?oa*PgM%P!bZaG*OS96bkBT*gF)q0a zxEd&4ZXnQHBuCrYm@m@ffPQTObP*2j+P z_?=gLxmGc32nceW5l5oy=+SB$=N%F^{g}lKR9(TljKIPHw)zVyZ?3ODUL^k;0CuW% z!;ErXcl6|m8OB+{5iYNEq}!Y@o<%r_^{5a($V)INcxkIcMA}Gd8LUShZK5U!u)=PR z6ZALS*{0F1Oxl?y$xE;JA+eyc6mW}LqFTZ3ZvVl#h*UFfj`$%JE0l8D!JRBYUlH!L zJ!uZs@&)nqNg9x8t`fZ?k4Ihgdv(Ogzr)|%{JQ|-g@#=7rCIq(Oo={zr!i7F_F!6; zqpKdMO={?6)e1SETQW+U?L?WPzQx9x#RrVu%xa5u$bDgLQrF-K4Iwd}9a=yS3(f1J z=&B1p=UwPU_#kfxrJ(YnDYZkc%{pp&sn{<~MdR_9^8y%u``RUJaJtY*yi=~R9ryu@ z9kzsKGwMLhZ1egl=e5m~k^Ft9pSfxI5B!$g1WaeqpO`4?C-3aj(gSm%1+@BdqpyAV z@X|;G-&|(jA;zG>T=$%}2gC%)gu@pTPQ)SpSw*2DuSrX((%PM=kQ&E@b=Ygy)l&#k zn6Q419734+(;{THjU2Uy9No0H4_jV1#6O)c>u@tbG6oWD;-8yHLnM^;;b@dWvle!?{40o`dO)$$EZ zM^@JN7b3@-+?UUO*P#gtLsy$!7gZcziDwAj59PsCAJm>m6r+l^X1z|%wu-jJhnQ&_ znPJwq9_*qBLoo*W`sPdYk10kPgf$aH@4qU~%&pFl2rZ0AHR*E-AvBR{F9QCehDa@z z95xXU{QZg|=zb2Pq36>@3je4inO+>S(`ht?)Z#zrHM(i>qE+>iU#!8v4QnWDruR08 zihT~ec3TRJh#llhgk(NqF04=VE8}61FWwvTi_}KWRnkIGbxQ)CAyBfBoVsTvRsR!v zeeHuptQ&5sDmg3vV_f9UtqYjdrR(_D^waATK``ZJjfZD5Kduvl1+l2-u6Qf=6Ombx z7Sq ztJ92oU^LD6n$?=8G?#FGx#fF$d!2WBTf$UGVa}#`S@X&5dFIq%K!1Ikjs!+ybc~8&;<*f2$gyb>j{=&y@=kHsC%Xl#WTojY!)xQxm z+xUe-8Of9gTp&DDOh{Yy9#6leUk5m&-h{G7M@bsLtAJZq1|X(5;ulY z-D2nY-`lAFFZza${swOYsV>&wyw;MiiXw9Ze4so}{Flt`IeJQ5b1l1!d)yG4v?WEO zO3yg9oy--%g}hya8*T);IAWhS&T>>KL9Je(WS#9P#!$_f6!1`7cfKj*+i>@*tP8Mjj|un5Z`YGD>MiCU!adPX zx#5sU8_)@)5fHgRLdp7k;l9Mr_8H3SOvpCBbBRGBQ`Wih*Xpj<)C6}E4SH?GeM1wt)HAM~N<~ejyt^Wpq0tmp z6X&e+wbKjOt@{1ng^s>(semrGFCQLXu|@O1tvtmYwuZ`$BSe{a-011Sk2a~(>MVE0 zpIQ7LpuG+o?lOHuw%e_kJ6yAoXCpu*QQeY%8SNh6?$89*3`>%=;EOJb+gtz&Kp|yv zfPV+nw`uTKbxE3vpT)v3C@L}V3(f*@_3N$Flc(8e<6F?hmPF|Dt%$W})5dMX(nql2 zOMy&yEWPokJ^l?odvVv&l(un4B`x0UHu6T8LraPoL*NltIUElZ5m!YVjcyZe{0Gtx zK{scl85IYuMO$EBG$tHHu0zc0wi&8rW3`d{VJC$oYNJ?m2MBStoGQ!4xQLHS_tBeI z4=tL^Lv>Bj^g79fzfCc?aTHu%Uvn6&+a@&*N~Rba)gbaLl?WBo%1^Pjx=t&|S^9nh zu(^m2A5XEp+ZN2L2#w^7IpLW%BW#F@6{50p0liwKYe!&NWu2F@oIV-5r<}*;+3|bP ze>zfTOAXqW760vNex|NG!Xz~@Wcd5UhOk&n5clNgylEGuS)lF7K$c{a+Hl#rx-2Ic zD(HhN(=Sa(v|zonLt6q9;>ZBVh6n__yB8Pn7WCY*KX8V+u(@n9e zOTe7&?}Fvh8wHRCgku@eEVodSv4NBH%wJEO4wEp#-}%%$wR$2D5JR|@$vRkRb7}iIhxv; zshP$6ckt<2KCd5K9#gwy%I*Ey>Fe20M_29Y=)g1AcBH#@^pXEtP30j`IbaZgR2{t^ z`r?E$A9Zdf@wct0$aRwJ=i9-^yxU77e+%zOG9j-MXBP)nekEiIFHfS>Ba|3w;D?|dL35fhFX>Fi zQcepJaiZvXu&=IsDUMoZIo?5N1`h|7?WDfbJmXcY~w_lg&|t|BlK!`YFCDcu*n(Sa{%c z4$vg-+drB`)#x8&q6x0pG5p+BKvfIu#O32<*&LF;z8q?zL`41|Yicx^Yq4jz6>WcO z4=~f8fF;F-A=fL28*f$mLyZ)0X>6z$biG4VuDpiV4z zY~_evrt9XZfAzEyT`LtOtA^qKGM{Tq8NMHGIOL>T;4vaiE@lH-C<@aOeh_^m?<&&h zdXSPA^^n-i>Uj{Z%Lb+6v5B_zD^V_GWE1OBNlHndI9YW5kD^Kk@cZ&Ia z6oRdBan^1xma-m6+`d|wRJR`V~A;L2zw&Yu_yoTtgzTrhi-xxFYK659imn;^%TR%3!4mYTU`we=`K-=!r$)M^U|fng0gd4 zY&D|@id)hQ6lZ6$q#}%snpqqb>@aUApp7;*W>0UoVkg(l}MYC6COXI29 zGc~J-gZ4vC{yy!bjlkXM?rF2de*R#dL=(PI9-L-quUxck&u`DmTQjI#p*2mPjNqc? z$X9XK{UtI;@pJUK?cwIxV;%;lTG0!%y5 zJpWhb11vK@d2I=!;)F5vM`ML)^6b)LCj<7zlFm7!F$_T_`hyDZ>MEBe@A%a+9RG#y z_*KevIxJ(rEBNzd_KBWC<+$;IWH5}W4eTN}TM#4*`n;PelIth54aC}8|KHL1Kd9hY zdg6C1@KJ_+m6OHmY-}EB_QYaDnd8)^Y#fTGC1QB3E&Rq&s{PIUL5DzjJG<4E+;x=! zz3?hDSALlK#YF2II?cmMlq^D)riLWp(`LjFJNTY&BkIxb04C*yZ)Vjb*8{OJ&U(p# z3cxi}BFmgL+V%Ew9*g|D_V>-jj>E&_kXF}@LX&k)UuVIb+!>`~SGXZrZd9yBFoeR5 zNrxA*){}5*BIRJ3GSAb5CW!RX5}9`W*v3|J4v;znteT1Jn6BmRxF0|>v+o2A%ix3E z_}aH+5hk}2B`>5kW}hg%W`rkIVN-e8*j3!A(mQ&IFKdo(2cn%(!rGGG-la2y4dz)d z;cU;$Z5l<(tUS+pPC9~e+Sl_5OnGT=${=;{P%TayUQ^o1bm#Qel@0Ea2wDFsgpR8p z%{42-o*aWIGVFESm@;QGB)am8yb0`j>EazkuEVoKMd!r}nWzO!rg#7+BuCQ?4|TZ^ z`|;e56wJl>(SLl!DEUo1dvlUaqZZ{;%CQg!oaJ?FFxAmVK6uv$_;SHB!^)t!xv-f_$Bs$C)MjJg|HA#qe9b`BSwl8 z2McXH6Uvn|ClJyKV8|OT-V{LIG1v~h>gQprzhfK(DrmFQ4M!VgO!ZS8o6D1p%RSmV z+Xf5C09vC7w0t%eXb8L=U(~wlP)tZ3TaN#j4{NWJFL7# zMeiEPfaIS?IHAdP9aH+sm5udxfk^i!o76N(KewVyMk&0@OpX6rwAKG}3?0IvE?(cPM;r3Az!_xLiYFY&)}Sl<19#fU0x zj-uZ}`Ey9BnVxqbj#D{R24|$jM(dNl2KH#FvbDSz*@x<{sy48Gz=(yRiYW`ofYMu+ zzdPsn^PhpxWX2v}!sahrD*o$$3k;XDHq|HQU^rDKHq%xw$IafF=^BmtY8T@#Z%YDW zAdx@ahu2vaLq%D&-me?D(}&)mEb|5m{{oc6#p!vRnXxnizHWv)adXiBb>q0*jdBJ~Zv<2B}4vZ{P z>E)ayXwPyT&!MqX{ao=#mpGCX5|61&)PEQKmppcZigqM*Xe+;DOlb?AQ8hZ8S0~w3)(nNAK)Iuc7rg zfIT}yB^fVpt`B3Pkl;fBY6u~2&%W5O{d;oadPW=tcE^D^C>VI_JPYukh@TfhQoWZeCJ5B$7I19W@q_TM0($TkNK3wl)QIl3|@|1RCuW$X^KSG)YgdJf$ zD&q2EfNK5$`W1XPc!pW_jn16RK(}y~T4kUY!;u`93tAJiu%lz7ol{&ur{Q zrA4yCFcU|gV0|>p_`D&ByZc`)DL+`Qqx8bmSv%J+qdQd*Y<;Klb{>?OW@XKPzqewj ztIkvI-K;Hlf@9cCVRdISFG4&ME?xbBnin*J=9sxZ+*CAN{PGnwwyeqzbU^u}JEz&U zujyQvjy%LMauULwp0$59k|Lxd4Icntq<^uQ3!iJ0*EJT#GqBhF5^zk{hkBT< zKNwtg4Y`s4lJ-1VzUy%1!)~>kypou8iu}HY$;B}2qhX>w`(0ya>5ndBmNHvwz@<@d z)_T3Arr!pCuZ?)(&jZ=LnXHsU&B)ifpJd12LpQF3x4*zCIMUlbov*YMkDIX`ZQ}#B zDEm7;2>6H|!x9eQMZTTQ#83yK07tV{aiGreb{XKo=?{!()DRH+$I-(B{q;fyyO2n) z-rGbBGoMjZLapRim!$3W&f}tbELYcO^N@9^$@oA{Fw|v>Jo^sP%|m`>OsVrmyd1`r z*_-ScUuU|lzR~%OHT$uyWNQuw)pj`yF@eLl^+;zNjqf~|6huSAAIGYnALff2fZP5> zz7ARH{>mIa^RkT@w4ZV!CXF(cDn9w9CcPN-d;=6xcKKM>?vd2tUshA!XM9hA9JplyPAlKHA3W}2f4;=EdS9$VRk zJd#7BDuS+qpm{NTo#0B*Oj{$Z2l2)5j>joob07T0UCp(y#jl_ioRJq7;CrcFZ;7+D ziT+n)gme?&`MZ8Q3URYd1 zUXO6*c;TeIhsi*l(c2?lau-s#yIh8Vm$bBPLkB24pwd6-v8=f_57U7s_X=;?ZMPX$=V+KD?D%h69Plxj z6s25MR;B`_3y$P%?|Wl%v9)a+)Xt1ovYG0-8ZEx;{wk%oGLr8D(F1mGIiIYKO7qIT zkyAXybQE{@&#($=@kZpE5&n7R;k?&LuC|WbUG$$?mLATHDk-iOwVbXY!1z4~OSn zL9Iql5xuH}kpF|{#T-2i$=3HA7g2YTKZSXE!U$;^53~)*>eS`jehs0aZ z?~}w>o$4HP*axMt=ZuDj#B+$8z;s<~`^+`;?9euOJhNPximpeOXZLVk`?)op?#1LI zsEJ(3NA-`GoL{a>z!{Z>a*D$!ZnSUCRhF+h1{YrQx-{HFin8WzZefO{l z8cNaM;e7wxPv4B1qdM6*FoUE$-f@ij7)Qn+%qi1X#m$C)|q*>heV z_F1E1;>jFo_X_SxU4z7K=dzD=a^~oL!C9SEV-!KD$#mnz60qM-#pJFWBjB{A91?@LxNGc9%0{4?@cU#Y7z;WB&(t+Ux8ij z{ywC~@RW4y=k@~>Rr8pTmb$u=7qLo2Vpes~6>g_ENtTY7^pVeIg!wVc`DUmbY|`3M z-R+tCPAunS>R|zng`6f_20?)pLm}bSq%ja@pW1*wXr=T!IW0oYP6_8+GG^?eKvEc| z0FC0qr5|LsL5JWpacSeAuHLx1qO#F6G*`!D4x6a;L#0WM=HD&Vnsp=Ye)1&&^=NgK z$R=p#49`^kf{*a{V%70)-|osKU4qK8u*Ee`n^}AVgiVqOGq`)`$~)h-UbZ_TpWn5) z4AU%KuIEO^Hr5rLcT?KcOFj<^6-E5p*F`RXe_*jNQ-<*{pcs{>ypy$kvv5&h_=hdL<+0wfo7i8Zr zN2QPM2zwaYFfOrCFU7(G*GymiiuOMUH#o1w-P5{_<`RmBx9=5gvCW1?z*U9M+@ATPF1Psy-Tq}n0&H9|(XuzmZW30{I#a|z_}fb*J@}$Os9qoBgJ+y# zL#8>}`N|}X{(N$J8f*=>O{m7)%z$pbzMS2$yb0xce}L`230Nn-UPkBNZy?Asat0>M==4pw7^P*~|GtzfgB9oEz zSk=B0wEed=|Ip)4I}(ZDBYlprm6N!l&1a{)JCR@4>nZ9els~Gu+`<5ezJ3A;{B3`Ck6-7#p ziFkA{?4$2BcHuw~sGfB+sGG>sgP(eW)M^H@39}u3uf^6HSPdw&q^1jxpusc>E1p9-Su?Z)!3+F+@GwHP~|a`e`o(nklU0c z$M)W3BB{3Wn$(JgntlTNAP(iL>=b;wqp`!xMfLpa7@%+oG3L2vFv0Yd{WYP^a(Nq8 z;2jw%*$3xNJbL7%aTo}j30ZXHpm9k0sVi_dl8xNyUxDA006-~CjL%1|Og^BvD;u`5 z8eUsPX>1Jry+fY`?0PYEo<6g2_UycjSnM=1^3)pT)`AiKgWBpcxjSg3%AirFd5eP* zjvhK=PEj=}3VEoUv38N5?p1FxcdB>$Mz7(sJzqFUM>lEr#N`oGvZQdU_A z`K|dEXc~4j2p{1d#j?jW&BI$yC00u2CH5F#XOFeDJdb_wrIAZDw(D<$uoFNSLNQjK zmiC)`+pCCs75<1NJK7S?oxlh4Tt%Ivo^LVH@gw3D4)|DOKg<>hv+aNnO=o?qd) zBGw!;7ZuIzay6nnEQm`!NKyMPw{nUUXT~md>GPvp*Ji(};@O*%38?IVxSFTwda8h& z9P2K-lj+LZ<%5qMIw`qxMMTPc z%1Ih+=0rkm9R@ptoN^AtL$sNVqokbv6{Nq1?bg%!*-vI88&j7m`-g2-c|Su|XmJBx z42Uub_~d!tp@Fbl(y`29x`NFGQrL6X@8ZCx;)-D4k4cR9IoeQM*@nMU9Mcy3(NVPh zf_5O8k#(#Tw=kX}S;sXT-GpXIvnQowOrmasb{$NgKNzM^`;cBQ=W!Z=VMcOmH1-K5 z^bm4kEA0rOiCv@0Apn-2k&-3;*9MhJ?#( z5?H^2k%5!&3qybCk7+d3658c9fRy__w>T(QRzEr z6APC_Hl-})SqZ!%4*dsbIVE1#BJPv13iV6|Xed34s`O*jDYmyxsWFar_w}g$gsP-F@R z<>#H5`3B+f=oWr9JZTL7Z{APZfW5v-+aMO7e%ivNM-W#S?|Fvcyr?2@iI$Su+QJ(8 zq)JjtA!jdwfSsSQtWg8*n1W0cSx?;@IDH_LVuf6GBSq35qz-=rbdpafaqtpmaJkD6 z)FU4N`0$>ky=urSXvZ>Z5+CCcp%Qe6L{{t03OeZ+ zRCbk>BIWW0M0}3H@E=v2SKJ_R*ZIq!pRh-^0N+(eDiOZF+6xCZvte(X-r1bgx@pkv zyuQ{9&YI}0FuXVNd!Ap~T&FwUkgPRr@D4#DMnvJm1tLU6;X~EEviiyPcadF~p;X(( zPfbc8;^*!TCu>?d3D>G!=ToM}c5s~~nAt0=*7w(iu|XXp80WJwG}1joDxbSx$aAHK z_4SS%_W_33*4oH7igJ$!EPp1HV0E_tW<^(9NXO>(=o@os$07H+%tEmGFeU>MmLY06 zM#|ETy5I{ZDk;tjza2(WL4xUo)ATh)MsAvybn+I26<_Ht)DH2oGS;c^iFp z4=e6_4}OiZpR&2uo*f!1=h32V;?$GJj0|3JHsw|;xTovqX6j}6C`D5HN!C5e+*J7P zKF^L%n<_W(?l+=cLx(%qs`;Bp2y!0pTKzjaegZo4s`ypoU3=-CzI7%Qc0MjP+hvIs zvb;zY9!)RL06PHqC)}A{LHB%6N+xzQphj`@&{1BeOL{q2x78AOd_f7I+j_IvX+|Vn z;q+Ntq*~#0;rD1E65XF4;rnv1(&|XIxp1t$ep72{*Id~ItSweukLcT7ZA-LpPVd|} zI|J&@lEL%J**H(TRG(7%nGS6)l#a|*#lfUcUj($QIM!Fu1yHlZf|t(B?*%dvjr||y zmQG$R(Djjf#x&R_;KPYt+psuo(YjfvRY^YCepUr0KHi`K5E}HpQ}UVqa+|mpE`Q|< zdhU+Q^%%w9`tGj9BKCBPd)P{E&^~Nr7WBf7rUWVMq8{5g_b0ORy#>P_8@k~pp8sm` zAK8t57^DN6D~ln!mx3!7?RnjSQCppf;A@p`!|uysB)zWt0wEJ~NP^3@9h=eFIzj}u zLin3oX0!Gg7N*gAUQ-kEVRUF2Fm*1dw5V-Uda}wp?rS*;JB*a%d<;*zOP(|x(?XuX zT@q#!3@qgxWi@Lnx@t<=W4YNd1RE{H-DO3K!}#f@QS$BNWln5GJmy1GJa}{u+9e|K zO1UT>v>KSj}% z1ang#sQMe>iK-&XnHp09x5iB-ZOc{map*+J5@myMGiwFnRd*g&rOsi|J!C!Hu((A; zk{)gS&m|={yS~CZCVsNh)&>Us*frV$UMqb^bB81yA;$E^JwPt9k4NS5IK(?4EDb^A?E^z_xMj%`kfHxeCO9B#{Q6c ztL=4VCp>ts_-;MHzD@d;1d8)z^Lxwb+b;Za^}>>?(vDJ)dJ=Iw`O6{ zuC-%5D~vgwyL>QxiSK1c-}xkG{zTaJqlTx)N2nHZ+MvhzFKM(L`;XO2D1AhuiWvQ`?uM(s(Phi{U1pa_;IqwzwsmyrO{H3KvRCl7LMSLGWoUjP z$oo{WpJ<}lz@>{WL$!+Q<{hhlP|KdeGe`AZPv;w?o=@B?_3SHT1GjI4PEScrQyH8r zPDPoV{+#wyfE@$V?tuKORJ!R*uK4H84tF{_%-is=TMLf8!&|N1cAt|vc$_3U9X+bX z21!M&@Pr@ry9YoEg2S&IWRFo~(+%E2_Xr~IJZC(CXIR#Lx_2+XtScM&FJ>bgXf0FA zPfTyb_3(SA*w5%HLA_6fMi3xkGmXe{AahG1?v7F4Ylte+sgNx8yGLE6p?5b;zPAG&fcXYZRYmHY~O|d)^ay%!^0=f^?4r>4fNSZd(zC^9ro6d;5Lq& zqu+6;__+p}fb*>b26D^6eI>l%CJ;+T`zM>Jr#}sMG7K%OC?p?w)hi5GGJ05ziOq|! z=x=f4L>vZjEx~HXe#at~R17>w2uJ$!_`)8{^Tc-jR#Hi?jt-prwCrGgGn#3hl24dm zldosg>kw^8#goKcCK=*+s7-U4()3lMoxjW=HnQ_wb_FGqw*!nN`=Q7pBfaSk?msx9 z4w(l2)N4*{gEFy=qg~fFvk7l)fU6LpQTCK@WSvf&0LmzTGANW1@7+QJ3`M+dc2Y8y zt^o_&Lq1iu@x#K_YX3BI(R#bD!1=5b(kTB~ViL`hpz<*}?a~GD5=9I1B{L1C4+Y!A zA*Ore{`=ZUFVl<2uCxSy(0t{=6&oGBQqKe^J}Y>^UK%$EpwlXMh~1Xy6&;h}VGTdcm4+@ESi z$Xo1_84wSsl~^tnvi^v)!MfQFLhjh3Ay~l%t5k;|Spz?SolNM9aJ`XJ+rE?UGs%Ydbo$nb(!mkD|0>$yf2HhWp#)nthTOk*s)IOEU_qIB_MT}8Gv7w z)1iert?Vlq6I<_FNO628gDnvW)ha~1@FnX@JdNItDGO=wkA{|iNP-4H!meaW;A3nZ z*tb~SNjVUMvsZWpGORQw2MXO#j{Y%0y?P5g{}7J&J*BzZp3L|uwdx2Ppq%3F1EY>m zSL{U_Z_W>0&M^inR~kA<-my?xX;qSE7eM-kG>l%7BZ5mn^}%`$CBimAz{c$w(a%;?K4-_vd|h6H=}23A>@E z$ziyCWpieAcE+IVDsiV5^Dr}g5^v|%)Zh~w;uiM{jvo@DzuB7vpcATzIOvzJMkSIt zf26$!EdeSgg|6AiJ*vvTq+1hol{BA7%CN4P83r2@Gmb4!U~TS%DJqALJ@oDxrw{KV zzl@mD$SYoAB;sNOy?`=l4vMHD0iO4wDUDY4$EN2L3ng@)bsU^EZv5b$e3}Ewmj0W$ zGwaO3)M%7dm31}_8(ODTfo&ke!rs{EF#%p+z)O;GFw6Md@=BFP<78(Gb92!|#_5rx zIUId2V7&}LdjT8rMnpf(pkPWuO)k0vo5X+!E55DR^6&6q%s$++q;!;_q-vC3F_M4b z=gR_=C%tuW@`w`aK_{OFYZ`E$WhRj}ezCN(+F`Cp%uP7I-D0kY+|3B={b0ULsgi_5 z^_7K3#>9=Tpy%USwd7)uDGU`1jt;-9T9Z{7(GHK-BjMzSDdaEJrJ|(e19O7=axuiqvckscp64zgVR@{C^ck&^ER#d^@CMPOP)^kX( zvBciKadokDb*w>}3Yf$hgPs?wM^iGo{D8!nZOmF2Geaz!Z#H=kbC?2R(AY92O@8hC zZ9aXT7k0mUsL4-RG!BAO_;t3iI`KBfbxhjQ7 zE;Ou=mhw^wP%bG5sCx1Od@mvWIIS9S82b`Uff+*eb1*tC3mbqwfsNDC!?`lWaoCHb zEK)M5$ysY9F~81=s$x)3YKNzS$}(n_LQY@mSHh2G@bP?taR4NfT+$7Ykzuh+ogQl4 z^q$$^2ZB&A;qB(Ki2`9a2%e%j&<3O{K<;2o>N&ClpX;R=mq;M2xa%OMq^EhT`Er{N zWso(m2D#g%AIvd5;EJt}y#Ue{Y1YEqk*mK`GzGvuApSw#%V1SO?o>+OpM3~a*G|(k zT1ek`jRH@W8PboCmKYhoNq&VNN*NI8s81-U1K1&KfAe2MYhbbY~k zNxeYxvAEWJ#@xYUxwn)%p2xJdw~Zd3)l^xq?ERE+_hq@5VtqNoo+hA`2E4xl4VA9j z<58n##BL}in6!*gpoQ+4W|_icS=XlN=T6gG`&D;0PE!9}oizRS9!o&0e?Q#uw54#z zi4Tl3c}EV2UkyJ11Ruk}HT5Q6lJO$AV58k?a322~4l@s*CRw9nS z>j%EC#ja3R5pUnuw#p0;V4zy%nR6WJo~H)`uAx;!0w7z5CeY{A2(anBn-I6syH*Qe z+%%=3LRx8zE+io$W`pUMC?~j4&VzK>*an#;@^^E>zeK3=XCK6;u9pp6rY22maPvLl z`z&ftU*4?Xpf%&s?A@LcY|-La|I2`^6(e%NX@~FT%g*;q+2P%?JK1yNOM=_W`azLU zv?5hzA00oO6k_rApf~mM&@J+%w_k<3yoLuQS9sH%GISt?oobE9yfUd;ke<2SPrHRU z)9$v_dU#qc?D&aG@9n(%3;oI@{x+*p0=M!i5?XU)S@t4yv&~}?oBj=#>FAI9K2yY- z)%@LA4Nx#dT-f~umG28ayK;YCt0Y1$5%6`7-2#SB3K=uJFp|GV1QAZRyEU>`Qmsm2 z&fx!s*q7P2Ek_1M)KZOXi|5bnf>I@&BAmD55@EIx$eQKCTM?btfx&8BHK1Y2tgkfg zyS>9(&d_G=g5Lh`^Y{U8iJ%Z8iCsK^^ZU<2R8>x1^Cr`Ow%}{^W(Z(Lj7!85c32TY zSX})fwa<3`c=nJ@deoQEe}^t}7q#v%Qp&EhbNX8QF73Kbicrl!e)MJSuLn*#9YzFu z8IBvPn#-rv%m_c2r5L1&?V**H_OCY3){>UhI{?5o6Luq^eaNy`VzVH=tgX*SB;p;u zXpnS9vfL>FBveRvCG8K(t|m@e#y7$8AMb7TcWJ2zpJ;ff+@j-f!M?Md{C%|N?EL=j zq7)69qnr9+(`pngdgxFb|JX~<$JFaqlwAK|H)JX!&f<+A_1usw1UbJSBjBiwDFS1_ zUkZhZB01EPAeBj6Q&t2-d1GpIg z@vmFNf-Rlrte~+O!ehclveAU*))^3)xrKm2m@J&(F;67BpYFIdOKWuVGqY{Y;MLAm zYKcgz?DQ2szyOTX8-XDED*~~Y{5Pqje)Et)n2h(MK=^TB?SfVW>iBMA8Gs|eflsc% zy5s4YhYtd8h6iG6H}m(qj67mc+Vu^I*V;qr{mlJKjJgS*2v)1uM35IpQL%v|{(kH< zrs}>E6Uz)#b}aH2qXRbloOwx15YCG^)Xa3Igeb4KE4j(JH#%3Mn*yF(Bh~$1wEiQ_ zWpkxeyVL?*Q=yBJ$P5>EPaglkjsEBeI0F12nCY>t(OUy4uOkDL4@POv{b!wJw7laU z4}L1ASUHdyqOUnWBZ?_3n;&Cgh%BWL^SK4*$SmGDhw(DQWT8WQJzlR2{i%4r?bz7# znv`Puo^{6X3QCWnH-1xDO^e6`LW3*!x(#}UQYb^$mg z`TrJUaUt75yl^1#r-{J4e^3cAl=I_Dr=>xwm7Lg7C%(`TwY*BG#QR26>le0+ zSjA8Kpk{_9Y|)SEY2B|2Lv-Cl3gV+L#6O}c!&g65jJ@HknlYmzUS$?;sa(dF{aIy7 z=>r`$X{U0m5?@2P!cXZRoH>HH8_3W`dWy13 zce1IF^&L7{DkW(g+eI$1shczxU?#d?dON16jK6flt~Chm`~GAYEV57P{@Oe;9+#Oq zkxXR@C13kLs=fg@v!H1=+1R!=wr$(CZQFJ>w!N`!jUP6r#mw2MMX{-)F_Sgh&vcW zKE{vkxb2N=1XV@_rK%6?*bjC>#k`8`QL88_Dn?4u*vZML5knoj56%U-t0O0_fTM<# z@yL|l)s7tseqKE@4)zPbaLr5&?X}E4Ot8k>PY-VRIH%*kl_$W7(DFrMJqW(|$e|aj z<}Z}X&QMT1GGoQQxSiMf=_!b*(=4>4l#EcTp$czycI(KP4|gOnGO6L0eDozy$`iq7 z+jF{tG>&vUUYR{Kr%9Lla1L*V;2bn1ARfY9ekHvww86i!>4)o}QIaNG6vxwoJBfN& zTG^klmW8FkoO~!yLKNX`W0QJT@pnWPD={ zkDz;wyAkm}F^IwL#dxW_h}LWVc2CV}$_(NXmvU=bO)ZX+l$cV81cR}n0(X4LGVJf3 z?*69|d6rTpKAe^X@(o*wwl|!et)4$unl%-wC0oil(%97D^_P6jz`wT8$Y8Eex`Ri$ zLXK0kqAI<$(RB^aT&In;aa{9*fb^QA#6{ZM3kUoC4I9VH@~zddNKFi2!)|z0EboNE z{ia6Q1z_Y(3Y3Ly7U?{jIitwcPB?I2KkD#~_R13bhc1oA>E=UoNp-Rm^(^Z$3)D+M zBP+9fE^}*E+e~z!_m$WpyYO%_fki#~;DgZnT)#X|4zIP3;zCXlDq<`sXKAaI$LZQ} zyyr@+j|I!~63a@fS&NEj95t-RdUCfMVvVfzMYuT2H}=XOX8I`FmUKz^F>cjo!0k5Q zF?s$VdCpZVq9&~-PfUFk=~ekfUT!72%3sepTk&V6s?>ZsA#WXBWxBkf%zOn9l{e+T zyM|jKz1s1FBgTbu558xvCcama)nrIOB8fOXl%v)5WK^JSqX?#fTc~k5;-d zh(_Pd@tFK?0~+T@Iz9|(X3b6@M??0LlC407cVDzsbbl6>4~eXM1-5VW>Ztk*qTzZ<=h~(g;x?UD>*TPzg327N_qACmOb5l z^@;AHAh=}YglwU6tAbT6ApgiV*B~yXi)m!wUxg2!t8E~ zmiQ;$RIsLL$|H!HI~>8zo}XYOF3N>af&yprcg!_FIHf<+vv$RD{(%0TM>ZN<9x@MX z2+xwNd+uQ|Y`tn8I*GHUX+xEXotm(v{vvG1!!eN7`0KCReg1}Gii3Coe_4@=a;|NC znt+p)%$|a-rLke|+O;%oij#`fw}RyKW|eu;J9Ht{%7%L9JTpnrS2LjFSNIGp#)`I0 zXh`y^GS%fTg$q!#{) zC3`wacCX0}bd!Jo(AKHbye4qa+h8gyvE}Kr|1G1cA8Jg2Nk+DBUvzl|ZyVEFx*kru zTI-lfYI+HKIaSrrZ6v0hvuMLKrJGX$8nje|F&>?Dary8wZ+8jGzV&@ zE-~nInmW6Ep9@1VT3YQjx0*UO=Ps1~wI5IAFxM6<(mK4WENak8@3mY5GSKD66sm2*H*yma)O0?)7Br`1`KeHi86a#yotkjM!s%JhTraYdP+lfcCj4mpTL=a>KSHmtd)aGkvevTSKC{ud zobS+D7KMna$Q}BYHAA6dU@!Rr7)jPv=4DQ`XJXcb#cPuWh78?MNtQ73`71@!K(xT&k9 zMuP)~u=%IFwfGP$jrR`N|4C|9B;RpmzZ1AJYJfm=ly&Tp;D9d` zy*NdJYGnPL4-YR)-|D`r4~Hs5yT^a#x69-*Ix^236v77`Zro|dn&`rsO>J*}k1mP# z;tG1o*fw^5fy}5-p{{6wZE^jWBv*Kbr~+`8Ah>6*${yA%l`d9v`15!BIw9BVfYaC9 z<~*1=*RymuE#tINYfUvTv2dlN_=Eup{6)VHL4SfV(M7W7&`sLY^C6ReR9Rv7=@7%i zgP(+ZRY1XeZqZhR+7uz|f=*)v?ZxTy&A-mIS}jp#8r>)z4ulp9oV;^==msMFeh9?u zUe`TC8bqEaKErcGH^cO11Nr{wFX`Wvq{3OaWr(X$!p-So4Aa9tO`<#mS}lg5go-}G z7qL_={ySe4y)Q@36h~%XPegs65PFSnrTVATTK8e5b4)yPlCx|=sfx<-P|9pNg3T7% zSK{mNqa%XXT~v+Xv2puxdwC?4`ln9%?ClYeXt~8m2~?qnLW3Pub;*sxU4>FJy48F-(=`E7>< zN~(g}>iSE|%k#1=;(wNx?MCj1CAHyk1B4v@j9CX0i%-9WKLkGfY5bk$gd)Ixi+r4d zb3YO1Sz_u0w`4&;oM++e9mWLCTiLZk`)Ol|#i{KF9(DA-NlJS6UX|Ut`=-Oi8NDV^ zkA3{f*A2gx)11?2#&w*QjYe^mxmT`#oF#FSD3jRV9oK-?R(R@_AoU@#6;UgLd2+2D z-KBSQ9etULXa8!;*1M!7`Q77ieY5#*?P|Mzu=^9$9@F3feϣ%UY8`RWp~V-U_7 zDSM&-@cv_g11tXxtR8hhSsvhbm}^TIbEA^ zez~Ise9A5xP83c_%z83NHI&u7X>Mt9`pnf9TVC8vDso9r$$%-f#fu6f@a*df)uo-Q_5os=ED| zcEe;FMSWSJ&ct}ag!R8s`bGUZ`f~{uR>BX_16UIZu3|HQ{An_9v zHp7)lLClDc62YY@VO}JkS_2kF)MYGEO;oHS%W;YuDSf29meyQ*kC&Q@D5Y()UirbQ zeT^&uH7^72nS2!YD|zY#+SZO~YV!l{p=s^XHa8fe1Wr{Ir~lt? z&T9&mFQ)1Obn6G9RBhN4O5^az)h8(>R7Z`?G=z2B6om`t%6fF1Lre{m0c~K~0 zXZ`%Asz;D)&nPl8w^z!q(xW3qYNIS&^j=w1)?4pd)hsHQJu%L&>=IUNSr-?V@a<#y zTe$XUE|?}yQS@G4Hzyq}NAYok$^v;@M3G?#N~=Lk0A7LKEyo$`IGn`T`3c+&xhE&g zGUdOb(GqsDl}c<$s___$V9iP|P`$KE66Ka)!2y>Q0W!(Z1+^C&IwAD7-&RKDm zn@lTqPUJ4whnly4U#AuBOX0`y@9}=T_iKqGj)SrPBvyHgUX8{~cQ&n$YZMhEYGih$;=(NLFnCA; zJ<{P6EViq3GdR@A0F*j71H;Z7rbk7w@|D5)fHG%I7z!A3i&zoOG}HN^4@2Y@zZPW8k#z-2^|-~Kx5rTa2PJ#IoVGbx9( zms$_6iSdGT;U0f^Fi(^HUqEObfHCxveHQQmm5N68!ya{NsbpQ!J&T!=K7H*BqwI3( z<(8F_S1t|R9X3GYtkqCkY%MCbUS*P0tD$w9$x6L;NSmOB={inXdS_%wItd~9g6P?q zbe5ls)xwWyqa@6o*JRjjFm*JXA3Z_f7BV2Q zr|8x;r2WS3q$)JNtkgct{V{eZW>(nSUAP3`gSGb@Ta068{O(62Mo>By3C4Fb0xq|f zF($svLG@T|?ZAQUbnm64rqnxjz@vnk*h&!BzyCpfWGxn*q%`b!2z>QlqgEDaj{z0qttc?)(Dp;3e z(yy(@YjF6%)!PGZ32TFI_{e0?Tr)><@Nh}%lMmyo%EZs_SFe3u*|%^JhjHJ1XGXjI z``I;gHSp+U(PI(CA?ZoqXG6&?-|KFNIGgKWj|g#lmAvsh#qaePKkb)vfkVD7B!sBr ztwrDIu9PhVp@t9Ota(3qIW!E{Stq+;x1M+(GR!qB3mdmJ6EZTkf_M>gnYyV*G~{HY z916Bf_&5)i%wxFAr?Wy1r!~*FqLp^99NyPZ-4ZHUy`0AUEz%0+bKT6;SlXPy5^Tn9 zit~>w<74c@=Of=s&C`mfeNxu7BhA8zZ8aUPGKDEyrHnjrw?v_#{)nzNg>MHveY_6& zIahSkcjLb>)xyrl4^6X;NEoPI)mVS-Scfz&*j>UtsLUHUf3vOFe{VM$n}31R)1_Fa z4wRr_VWG*Hdy0v*FC?d$Ny$k{ruxs|=UgZ|Sy?quvZB$JfE;70t4l^6I!Tg}>eg_Y zhK81qii(yP9MQjwa+ZXOmOLc=wpjZZ^%-&YDc@d%&LQkEUp2PM-s@%<^j>Wd*zN{m z`uIvD`cpvhgNaqh?8!Rgu94tEplL>Qwr-K^bDvl+D{FmgJ(tCsl2)sp@ zO8+Z6RqvHilF0dRCY(_2%LY>mq<5f&S<@pZhp;K@gL)OlJ+wIoR9s4riQb7G*E(lM zT`eb%v_6o2fW3}!gLQdyB7{*2rErWtZ}2<$YTTn(CQ5@*lC)YA5dw-p!l1x?Fy_?9 z3leg;vQHW-#<5G;K_a7kIS|F5x2qAw4Sjry?}hr}BzXo5(-a}1Nc2lv-Ux=7dw_`8 zr#XGH9?Vo})J2ws+jH0iX=yh&74q$+tx?E~Dm3uC#iso#%yxrgdwQ4sCaS#1Ba6qP@BDTTlWER; z_Nr?)h}&+X`Ml*kd?vj9KHR?7)+4QIjnxNdB$-4<7JHBLV%V%f75QVvg=?DA@P6oP z6|+Cm*j}NeBB0y|MVZI3d#*aVv3lH!Q7ug;bw0VX0C1mpTVDuBU-JlZ&L*CrEx~@g zvWYf!%l@HoTQc76+$Rpybh9IpMMRVsTga6ck4{C19$W_b-Af|r-k^#2-F(MyP}23< zJMWV1g}YafX{Z_Rw!3?-w2Q@oq1XAOMa^scf-SjkdSwG>qy_`I@4l?3=ytXtN6RU2 zRZ?CjbKpA1i}Nb`pyH@hS5vF0`s&TH$8A47t|iq@+0wI3nn-*7ob=)T!M(+ruye(< zEom9SCd#4heQ9Q{%npGh?2m^nPetWYjy9zv4ia)CrBY?wNlG2o zo#y=B+)MHX17`SlMY?qZw;;hMoH1JbxC*NXfq=*3fcaLt)%B_ci+Z)ctA0~lZj7Ga z6vPCw82$QeeH~s2j~}m&FVF^B5Z#nSEA;WOmT~aU%`JChOSD#3x0<`7!@a5b^5klL zE{Z37&-828$DM=l8@bj!a;JCkT=(qSYNG~mYkT=r@32~Pp9^&Xo0jSK~pHT?6)f?A*>9E846baRamXh?Tkxg^BjK7qxaHX5Y=?%)&BTXb5Z*`A0_YR#@MG~i$G&mDiVqBUEQmb~ zT-b4iN)tcawMQpfkx7NKEy1{U4Vn; zOn`N`SltDeICuwP!4I|f=KE&G=pA?A`qlH(c;DggP=Hm>jkJD-jK*C)#5xi`pESX`hO z)^AT71c;{_!-jQ+x%G$xqtk23#8vBfe!c#pI5j)(Ml$E{L-uq#7#P3Dj=X_A4S*3H znBlL^`de1}*(c$r2C$6jPAg-6!zeYxwbp@XvS>GY%obNhzgT{!V7`!tha) z-OVAEZ3n1vj2wN3s5_q~K0zKsWlI+qA)%XFSW#i>btv)AF5|UYK=>9Y<6WAGKhDm9 z>~TM~Vs#Y8lnF4USHyMiR4{8lyM^>Z)dfszO%?SH*J5wT-p#cJ8(>q7#3GzJM3d!F z)-Za@re5UMqQu?&n9LL_mJ&?!G}p(vhkYsK$*YuiBRNhjbc7<@KedR3oRvOw-kVSZ zvNJxHu<3gx+=T^c628Kyo3L^%6*UVHBMCbNS2_Jlr-!(Ngw;HidJPwcpmr&Bl;U59 zAB?_`@FD&}7<>qFe0pDef`=aa3O_%Rh`BLksk z1{srtza=8k86*=_O@dPgt9HG}|0hh)8OxMT0bAv-7S4Fb0 zkDTdD6%FGH%Ue}4h>u*^j8xB_GrG5#lle?4ZT|>P~W#{+!GHsZ*!l_U6YuunTFV9Vtqf-CEsVDxn`5_ zegWYFLHw{L|BwU&fdGMe0K@i!pl&e$0rj!O=1jNPZnS(7m~FJ!;{0j+xwhQ_1~U3a z05a}_tpl|I+UO&6fZzNz(^vM}Pl59UBL=z@EIP=wKXq5@hQb5vVDO@jfd;{P@VE}| z0xY~=(gD8rGvaO%D4&jJXmxC?gP==rw>UIMnZNf={z4-^_zT*Ix}^-jB!2k zsR-f(%PW|#fZ&86H7muGRa1F6?9pIhm8d1o)(~P9%PpAKkYJU7&co?v^T_d|XN>#) z!3%Ovp#4Gk3#VVSKe7Ntf`SREr>Nwd-~$rz5UQg@HcIOd^R48sza~N%YRAc*PdML#BJHU% zJ4#DV4c^j`%%U_6meXa;{077Xkq-yUny?@_RH-3I0cN|8tC7J-Yl^_$Rx=_&M=_pvWW=AIentRL+haM^^M| z!TJ`luzS(QKo?tikn2H_8}V;H#ebuMG_;kI2~LHZbhVRt6=mpZSrx`hmuKFx z3p~}OY^Pl#R_&`Tvz(4^{RvRshVqw-X{)yH9 zEB6-L=j}?Bvia1BBkGmEU6oSnRJ0X5#9WAJ5!^$}`yjW`GO}i*_erGV6U72-gx>Mg zW9BMOQH5LzgXPRFBi|ThsvX!{k@({FMf7vMm_e4Kum+_J(dn)Lx?}A7A200KY_cH& zZ?wkfPkq{|_yzY9Mp{DUScVS29VmOGc7M+9)y?>8m5*ZX!DrXh%3k;_&I`f^Jz;aa zG6fxC5KR*@I8v{~$+WUL|Ow zdm)QEgfm<=jDTes8x>}^Dn@G@!Z^BWn9Ycf*$dbtGkju9OVo@ zN9JtXndsN)ukmMZ%1Mg5TXE=SLrr7d` zicE-1gCh69WSS7B=|11x~CP`}>r@j8`xaL>{FyB{^fQ6J{djI=f^&&_Ni6`plZ3X^D3zfCZpN`I&8SBNX_9q)=j-Lf8 zYj3Tk$k~Cdm-m&_^Hkc^D`A`*;amMNkFK47Q+u?<4Y#Q_%qirCD5S5q7wGWybg1UW z$zq7iLKXIoVfZFiSM=*s=+hIaizoRvD#CpOAc7%+GWDghfOQ{tkn;%--4Rdsk7xQ1 zgN;yU_w@wG?XGduS}l@sWdStsu_z{6;wpta-!bKJ1NAzhaD3S(Z8t)%dEs)kE+ZJX zn8YzdzDArt7?Kv}*9<8pI<*d*u?4C%O?XObZYL18(V7*eHk@GU(b-JnjL1;83=vDO zb;;T{Zg#laRQT$Wg#f8g5vXrExuj*tA6dXNu?im;@qC!!En^%oGk<^`Y5@}S?vGnV zm-(nUVZCeBf=!wptO)3Hfz9gv<&t@Q067A9>=;Xr601f*wx}hVjrJs18=Pv$yWBLbvBXw>nybvCzqLC zIvrQL3rJLYh8-HK9rX@x*;aZ$M_Xqe$PWEobiHM zan!Ew`Cb1ABg@_`z-Ti_x(?)N#Fhiceb94=| zCK|AfQTYM6Amb+3f%HP z^V4u0z!4aj5*Yk9nldObupdW=d4v&@(TVAIU?{B2Hx}l~SJ>@fP_{27JOjnY%M8y! zFSIc9J%$(=7`=%Z6NZr7BHnsLv&+2%b>kD-&{MgM;U5Wu%_=ludGG0P;EwJW zw(-;ih3{K>ko83AOA0DgEede`#!H=+2LCmb%YhpN|7{bPt;+fcyrUuMIsZgGWq{iXfqPthbyUu9!)+ zJU47kLMuMCbn6s|E6}bu>(tIG0N>CJ@Q1Pr-g*MPj?{*DqyMSS{34WyvLz~O|1T(2 zL!vZgEsOg4iI8i%i@K`0YFUfAzVi_26`4t4@Yc>Z|G;(e@^zj z$RazYfEor}cw|BSH0p1sR9{H z5rKppn$OY{68FPYH>jflNo`1d5gH7I{M`SGey=+||IUHXQR9o|yI5~A4_rC(H ziNr(c;DY1}bfi`lQWhNvTivA%hIb~>UV>O*vs~WqJra`4%34)gQ6uu5Nrd}@kHYv9 zYLbh=uF#=k5vVROQ>1en6Dca%))vuV#c!4zxpn!=w5MsUA#AfLGdLllZ>os0SP!nK zGUf>;|Jv{1!@HI8m)2JoqbVhd({sx;Gc2P>wrloU#1#(d{Nas#BgdxI^s9)uBt)ia zj2)`u`D3HwLNo5h=+lDJ($hi5Jsnrb*)+;tiWerf?GSdd)}TI|C^nUe1fMU zzfJl#(}0yS{m1j&l~1x4VgC#H{ygyC0zhBjy>E89|ET$zUp;$Yo_wD9rnt914vO=h z8n1c%Fg^%@8mg8@?$*t??Ha4AQyTA5H{7(vs4cN*@=O~5Pf3@p1hkz~1CXK?M93+i zBqXGkV^Z)=$^k*BWke}|h2YK>LY`dmskcsyQ)qfsTllME$jy-N(`S^_8bYftjv&7F z8Ads#u;?7ay*K~W7YjgFIz&}bM46)5{8eq*q3tkjjBQz9Tcgu9bLK6WQr5IK^k4On zw~f9~hp|WEiNtH`~g%s2WN=~vDAXev}Q)o5k(7`1|7#$y#ymJcr$Sy=QryTHvc8)XBDW+kk z7<8p_$g1GU=lWAVB5ZXR!o^d@Hd8*Vj7zic{OJUL zu*i!8;e3v#P+SpiNyT4P&D~X5{!z)^RZ;y>(YILzB1IicRfSYl*>y?Dc1clpNtwD? zO}kl#_f7G8LH@1RZ&~28Q1DGP z_%SQ&3;}K-54)z9MF>J-+OC5F84oRYI!c0vZBCl;q&j^Wkf}{e+uYhFxOy23Vecw%=fq6_;Z3X&;HZgK zY1LfSvQ(F;Hgl%UT50E6Rl`~r2CLAOW?%M7?g1<_MXExofEv2@z5Tuk=I$PiN@D0s zTfCdy!%fImrCanX!RW^jE3Df(1~OM1xT6oZVBbYRj>#wnO{ zo|+`GnVs#`F*RnXWG6Z8b!I=lCcmBJoZChJkMC7wns_p2^7XI{r#*n@IYX~B!#ogR zOlT6gAq5M*#~BrBdd$~P&FmZsKbSZ$9_t8WL_@A>Qcm7P$w6x)?9-(MdAPLd(0*S zkhr0RX15y8;h<;k5lrB8dc^NR2846F>eFVcY9@g1?Jm-l7o+-I%+nqdHoCs0&}=s> z?DXGMD8-uGUnTkbO@FbvT41f|(#}Dn%xFV@>_!_`*p-PNbJ^_Xbw3qD_K;Re=fS)R z_e4U~4iu!8cSHqGU%!EHfL|Ah)B%6n&xq7MGiakN!FG0??PMfDzD^s^sOFsEtIMRE zV4H;eA_%N{(s|;J;^}xkIn1gRm0tQ`$=y&bOnhe^l(^;DZ7OeOtq@yoX#4$;G^O)LQ=g=q(@lq)b>A*=H@mxy1J=1&$=^A?lTO_)l#39YQ>8=k^ zm~&c`E@4bOQGyNNKrF$Sh~dLLVPP!6y3BDP`#UzA>@I>0Kg*Lx_+7KT=$om;f_*0EcZg?l*n zX>l~XdwUjs2d6Y6=?ALU)`6ast-`jVSY9kFg9XYb+lEo4ZL)Gd#>Qpc0$t~2!Mxsk z`973z41*Q_AUwwj;u1XfJ_T!B`yZ`m@4jH3vN$gU&sE|W&*UA@enDVCMIfO5ttcQw z&|P3YpnxpMnl}zXU;{F-NNCjwaP91JN3!W8P{|Fqi^PV}lvZB|k>XffE+?6=4wOt# zY`Gjx_q{|KPW76tHd6V(PHws@UWJFTyx$&u6~BKZ*yj9=WAYzBXuaq1j1{F~C0{Yg zj8?1Ja-~2y&5qaW@s!yPPg6dU^&Md0iW0NX@4opoq*35$~QV9DpFcPN^){+Vw{?Sin6l2 z;`R3Y`llrVF`z%-BU{$GM$u10*rtbz-d6PzU(k^$lxu`asFti2E0k*mi^!(5nxy{k z_m&Ga!ew+@UJqvr_I>$;gJLn*%yt9ClnZ8nOlJH3LefdKDy>Gl!BX0vo>_0a?kgZ3 zmCNRGz8WZ@Ub#IYOH7DzF(JZf9}_2xQgk|>?uPi2%j11}7M|z#dikgK%k%zfu(N6Jwh{(y%8})eFDrzrt0CJ69iK=NHI;V{+r*cDa#0yxXyC{;s zFG9~p?Vdi!(Ed|s<}7A&NPp|sTKDv6ulf{>4cEK3Nea!4X#6K&^4C>tYAW5>>j|6vzAEsWdBL!Irzul32428BP6n;xBh z-j5>ZCV&jv%pUen`nCs)oih!Iea(RjX-G;F~W5+~{MJX+Mq8nHs{#5OWyQbLN!9dgwk7DS!-P&l$( zq@ZmKP;a=}sQjW?tVMRtAe_q)pRVBZN#jX%IA5@$KkkyBUc^C85(;0Rzm7!q*n_PNR$*tPzlZz;(il~CDJR%oms*gR}8Ky_i&nk8k@OHEOulB zF$!Zc2i>M%cUvJmYW2NHG4xn7^qe!u?FJisln=BiFwjvkz{6mQ`bo#pLW(8AtY+i6 z>Xf^LNaije4=*VZ!HY(oVW$XD7tJHSZc_oLiD!TtuK$+72{{d}JNpg54Y3Sn@I@>| z7?==DXM+s>{rzCWMV)xs@}nmZDsUx#C&Eq88WLS(Lbev4rj~YIW^lbEAK_?L|H4=K z{-HZNu@wPE4dqrnZAchZ;H&C_6wY)&+3v!7#}76D{dNyi^cqbnBIUD8y&jeR;F;bT zeSP*Q`@*{(dOtY#Hq7?^nEy7e1E=MBm^WZODTc!=VYDcbO|Lf?CY#FVhR<$ukT#z! z6sDgl1Q7$I*BPXkEr4*dSyHjZU>0Y&48(wSy1=xu$d#IB0pNqHpt5Y>(=NdA$ZVW2 zIiq#pVdzfbv|LV1hpZBwfQw?ls~@14(W{u`I_83}I2`r|XoCf#;k#p^;V~JF2ZB^b zWDzb_O{!KIjN%RFf8M-cqS<8P%HVO!;1$zkc3b1ITch;?tRAg8skQT{ZH8B7)wUAY z<<7Tyz1$^EXMUKhzK>_4n9*p|8;%B|tRxw-X2AaZp3z_^M3ZmPP;avOfB|#ckB!%H z>d7xlkv=VT66ONLL&d{pDuI+h>aTn+^}hNqE~j)|f62w=t4V#&)YE+M!8NOqLt$R;ed=V(&BdkE+%zUu*e2|WOh&KbEFp<3FTBOjQ zCpX;rFkblx;J@$8M-1M(cA}hQ+oFdr2vvvvjOq^JUy|!C_^jNZ z71pFMm#kwXB&{YK?nzgO96d9 znhQcPoU>(ZsU(eentx@bDCGuT&~ncF&15hH;w#sAbmyXRO-5db`(!MXOwUn++L-sL zxa_%NS~TC4T(y=t}1I*7Xv9 z7HY}b#P->8Q3sw@DLwUXot%8iEJC+bHB)e$ueT{=RBxgsh!Ob1p-)8jX68vxZHk!y zLf041kwvK$7B2k5Ns!v$)wQ!QDg3RnX4M;vnoaR{tG^(mxG9fQfk!E^VlCI8uPRy( zF%A9%*_@DrSPa}Ei0wqDv_9Fh3rUIPxnYRmi&JmWFXZJPg+7+Lz4Pw009IOU<6aLU zA3%EYo{PW?5@n&-P(|^|=TX-iO$jpn9zj-{qvKo*e@zpr7kCTY*8#X!lI8gKzAQuw zn73cW^i7z18lQjuDA0ra;*qr0Wn$73v?y;sMh?S~tTH&U11gX|SPE6!~{hmrgr)BMD-fX)gy|Gn%k>5a_ z*t3=Y^$SP=^}vFLKp=bc{6EoT%sv6HdZr~*B`b7BKmo`@CKr-2MUDwnSk{mSmw7*<{BVX1;{23V3J@E)J+B; zfrGG>;+&tTR(09`qC~bEPfx(Vf&9gQ>iRjzUqEo+zfcg0!7~Kp6kt_;u?jNJLOnnX z_JKzjDr!J22Td86a{$$Zdw;!PX`&L82zx4Gslc&{>dpeO;BO6Ms*f}~!fc`;3?1Cq zd}Is}b4n;G1+$RmNboad%8*Nsfj8vvkX%#bLs@8LCZ(1wSsJhB#uaUxh^Z89M*$YGX3rW5heNEJ#Q4xS9Jru^T zhao>?eJc!&rAn53YC@-}lbQr~2+65Rmw0|i=c(+cqM?ZZmHJsvN6I&ngqE zTDHjgsL{O=>f))Z%f5`~qR%TMza0G_)-6x4g7F~xDbc&E56jeZYV($5XjYYBiJpFB z*0^RbmnEH`l^~ixo`Asj5KFKif7W`_`66zsv@zh;I(T8yIabs9eqrf7+0#U?3%jxa z=ZdnW^HYx06(X2M@Y6u7j%5`y8_o_~KKKtIv?wO43~DKibExZJ>Yjb-F7Sli@1G*d zw&dR9R4*}#|M4)`2!4W*{|Q2Bd#9gHP93H?X0>T=I$tqAN3*~7e{lI>_{a1P?SK%@ zA~u2X_5(5C#{637LvtW4bpm{(y9*H(v@+;m(gV=HqAZ61L};#aC}oilL-Gtz03ak9 z80!J>I=Bnq@IFQdaGhW5eU~?|A3)#vixeox3U-U2t^&TZkSxGcg4(mdF1Wg8_66o` zh;-rBduDAYSCQfS^&Vt;0V})LBv|7jkaH4liGPxbmL!Ph<7CKS#;~90JSBVP50lHF zn=S0LvegRUES%Tl+)6-BA-Mvl6A~po*RC!gEeo4;)~S8t`Nkp-V;X4Xlh`NdQ$(b^ zNVNx$p}46&lff=jkBTzInwONU^j&k_h~k-NQ?>{IeMBv44sJJM5>QKU)lk-ZQG0ZI zb9=TI%{O@xxgn&)3q;Yx(M1_Wu7x>;pM^<8&)oWL8a!)x4%M7tvV&cZRj>7$DdG6P2@M$3P z(#9RnWAOd6ntyJt5FIF6X}MQR_wa9Bd7}jT{14xssGw* z>)y%#3i3ym=ixe&HP2QaRy2PdC4_y>UP|=wmL)Q^&cZU$GoSLVW^otPR;K5XI&$9@ z-#Xsj!x%^EZs+qd8?vY}&eGX3r!%56HZsLCb~H3xWu?U@K_|H;v8=VMEve0OfJuXy zghLCQ;_-v>85TjX3-LiNLzD+g3}K%Jn)i+!$lEZwe$q8mRI?H==MgdjY((RJtIr-< zm^J;@f|t!-n040xr(st^u8bp0$H57s?Q=T_y*>7z_krbu&=0;Ik>6{*6&Il*B36tF zfTZt7k&W;>Qyfw;0Tg|Ezw*AGCo|77xX z-nUzOM|o>`ZhL3FV&;i|j_oY+Qz(!z5Z+`yHrTF#U4XkGct>>)_CT8j5!vsX-_r{>3oi&E3=R+a4onVk4~!0^5rYw{5=~1~ORS8&j7^MvQJ`NU z<00puOky^U5Y?B~8`gu}syOQU)bFC7LD7aH4VV}fIp}$i9%Crhx3tOdQ1K;9NDG{i z#46DzJ&j`>?mL-gq<%W-wrBC^=@Am7o^u zYgKPb1%x1`o4|6^yYu{HnK`XzJ8%2$+;k9Bi#<;-9Cy8U(Pu4e`X5|N_P}EX$1)lq zYX15OC23VJo^2~5uLhH@xqn=z`Gl5u4>bIoY zLzfH=cnChWD9kcg5I)bL=|ZU@c`bn4eq}p!DCrZ5y|e|2YXmOiT#ck7Ii^Xmqu;JJI6baux0aV7kP#z8%m3JV z{6#mQfD{F_WYw;tCf~T$RcZ-K{U9SJ=XG<(bd;N!>6Dt9#z{)Y09&CdL78@N6|QY6 zl~^2(kVJ)%n~@<&ma-}a2NSgGh8YIK_c}lFG#HN1x@4drJCJ6=h)FZRz%!~v8!>Oq z%KAh6$^D>0#makW-V{7MEZX~xo75Z1&=HIXy@AV+Iw-a$P#E+V^IxwOu>WA z&N->3J?mU=3 zPv(kPphJ%>;;7R$(C0I!0vS|>>eGorms0mg0Zgq=zwRT@?E0j$OwohG7ph(FYnQ7j zX~X`qrhS=JdTnc6t!i=ESG(BozUw~leopvqltk)E#>Yk0Hl$q(oIgW72Mt@Jl-b3- zS6O(k(Q)CaRcKMAxJ;jQKJ`D$7sY0(IvS|Clq`6mYLJ|vrib92!^IGkUGCNKe!kQr z7s;R;e7`rMr6k$;$=0%AP7fHwa8j4m_`mx1e$JTyo$Lr|Zt2l)YinsqRmNBjVPy&~ zbpYf=r#^j|xmcID7Vtv~h)AF_)pYf0*ml4~TL1tLMK+vhUoxwpzOA-?)*V(0O&u0R zd3myXO>1}l5TqXQCwwDNitITG)RD06uojT24o!wO0U9#xsNn)b{{S+hfFlLnKhnR3 zhYbFJpsUCQVXlTSK0llO9{^-Po4+bH97qfqgpjKy<(9n9HqI!|I8g0)K&-r6SkQGr zQ1g{Wl>?!`unDP}+TDbiHuA_Z2xRXqq*9_NQ-`_Ao3f$aRW@{Q(Mb#6E;Y`1kpl|o z-s2rDe-L4)2n{nL2xyU^OR01;WTh+Vjg5_Th334G2u&Xx9Gui>T2*PlU8RI<)_8z6 zaWCL*st2VP0e4$;D73d%t~KN)yDP(lLa@<50%yIykfWplJOtaZ6tI$F$CM2BM(b1caS63xzb@lPh(a|h4J0!`W(8c}zVgkLAB~FBR3(=A^ zRQ3bPxX;yOg+Ay#=(Q}n@)LA}t10w@f2sbmyUy+`nR*57Koi)9Gic@^Vs|wmB53UN zB3hhAU9FGzw=lZ*cz@eNf)>&Zb+9l7;i(~jxM*GwR#yuR*TlpGFifMN$UH?E$3PM} zmyBI(!li2^?Sq*xeYCK!AV2{Iv~vETp>bf9UWbew)SF!5BQu}2W8{2IC$C#V2t!54 z2K4Z?(u#J+Xwm}uZ5dT$9Ay$VpoE3sH-x)VlL}B&MnxIlTWI4M7a6(H2@h7%qF->C zvqd$C6PB0Dng();%07IU;ItbzP6R=NpLlw@ZS(>e!{2H2ENPj9(cggU1a4lygBNzL z{}=z>Y<&4;=IE%Q(8oVl`&!crwIBU4hX2;L%)UMzh&*7f|LQs-=cnb|0PILVQ^k)6 z-wb8^3jW476ui4jJ`>IupeWmCQ2T^!l6*z^)cle8hm=pzXXrEd{)fyTosZ{*@q7p& zt8kZ``X^0sjsBB@{y@U2N#vBXO*#Du`k!EQf2R!_LW|-%+q>sf+M+q!db;aV1U?4v zs{r>&j^Nd+S5;L-4(V4`#)EaUmAQBCs5IAFqtCUy1>!9j4ElqvUs*5jcDqH+?Z(vH z<&}Q}VWTm1bF&P?63xQsb;L5VbAF?Q#35p7icL#X zi5R47)j*Vm3`C*)Dy(ibk6fdmUq)Rp0?k~Ez|gXDdeDx}Ho*egJVW+DFoWJ-dc2Q+ z(t>MWQFefp0TrQGAhT(E7p~^sg{xT7F{Hi=UvuxqSG)AO(0U`gC5&-tcWv?i{Fndo zU;fYHTJrGlFuAr2mgw@@iD`cEMWgY>7p8ea)Lt1``8dN{QMn@9=66s(EVUnP&(9M> zC6(&w0X7_Av1yu!6`WEa5RjZgVQp=#APhn@V^Gj3>iYFo)nUL!1JQJxp(tcDWZM*M z8nj;t2~$(DWqH}}&txVh&gpMFiqRx$I&_#Os*1RC6c!~z(~P7976+4LWPx*p&_OwJ z>(;@6FH0d7FvcPZn0ga%wpkk;ttoL!IeVPhUR_<4d7*Ja5G4rb=Q@EfRNy0gN{x(+ zP^TE5W=~I{VuA3HdvkLWbpPPs;K|7eeDQj{pZiM8J`8@qlu9-$%xATg4u^&g6*ru9 z&`7~a6Dzssmf zB@n`)W-vB?q}S`Rv5AiI&-OYJa)Fypa;(zwzY`thn6B@6x0*9Oyp0`$^}i2JAoiqG9`O3)RO`txe<|3SQ$9c z{R0Dk`A36r2o|FpiVE)6E+Omkw_udCG=n86@ z%b0;l7;NFBWZo6a)@Hdnnx98??AMLL5lhhx5R0%-;csZ`!-|a8*FU#tcPQhY;K?cSr|9pazyJAb&t|ac z*{tiRCxw{d?9*Ycwmu2Hl1Wk(eCG~$Hp3pjL1l955^q#^szOFdp;YT#!TJb*u4Q+qFM~S1mKL$xUgB}Wz$gTo5Jh}sxeBw8@O z^9}}H6bt!l*9trL?%mtL*REmcRXZz|t5uoah9dJ$DxUevBnT8$K1v^C3|vmGtgLV` z7%vP)UX-%BYz|Qa9$bk?f7I{X&z30BxueW_c$Ol8X1#2hK8So>>Gk^L zF#}UBsYhxZsYw&}i+i+ZpmAUIq@dD{zH1W&Xe&4z=coBG!suHFp=cJs5`?g}j?1MY z*p$Um*#!omvsOw&OIibh#IYF#-``V^IcHxuLO$5cfPmDEg#{%V9UU9bW`~DIqhW~$ z+l-gO$zS~97n^yiXLxwHhb}_*hM`z3PGXaBEQ4kHq{Nnp?5wgbh*`Jza~TY^Dm#$Z#C0)#C03ve+W95I@Sm861EQmgp2x}5R^LD?yd0CPLI^%WHm>mE#fvAi;-@$XR47hGA5)d)uq)>yotcVs(43ky>A0PZ_Sk4?p}c2E1>@49gK5I4ue& zAvlXc7h5Hoti*yd|E7l6y%Zt*9>9MD@S)RG>h#@fZAIhXvf!bGk3U{0VT;9rOWC8H zy}fXFYkTJ?%bo7+?VVae6W{*!x32~i2Td1?=p74ht?&;ZjQ#{dXv`z%%wWvN)EeL+ z4zhL#ui05sS97^sv1U4fG+pK?1V~OnWQ*qDP~94xM8GJh@?%D2vh!7cdJ*HJc!$Gb!I(8crmsB9Vej}gkPi4(7#}aK zTqo3TA=EEc>b%ca1;XD`tGdh)@xp<4iD-F{FZoJcXF&ywO?b=cWRU=mH4vL1sHcx}H`$C~~ zI$fxizje0SeZVi;GWyYsf8xUa+KWrhynYaBhDvUy9q! zMuQcgI7LC2_Q>{#k87w0Kpv+JTO^`%)VYuj?hfxDDIM)_jlezce!esOuOkc<;M1Ch zeog!aiI_sa7LI49Ef#bJdVKP#ueSXF%KFMi8se3ym#a%Z{pAB1O6~N;g9rDY=M3Mq zYu6-0an)*>40;b-kDlikh?3sl$dpKc3?e>$^OR_AMW*(5PvXE+tP`vO7fwhjkmvQW zZ~$Zp7%qoZ574Ws$QDPh7v{3_GKUGfAF7F0w2Pdl6;aOQ2#!yaBg`_@r8fO7+9VF~=~-d-u21)?NL z+&Fd(%hb@*rwQlgema{yp&|LPxtW!utU|8=PU1MbB2ycalWi;Tca33ZNz2&fGmZf4 zJmUuyA@A+mgM;7w=5KxS$?q8eQE5ek3>8kn0E&u!&%f6F!*WQq7Ku%UJfzZEU)=;^fi>*ghYy?*Hz=(h6^v5Q*YbpKf1ir$f@8dziqd3@80d-gt`AVLg)j=ZnyI^GW2R?btO%E#&0x? z8m(dC{A-2dEjZ4t|`}0*tgm} z{UPx5^tAUO#v)+jb6~3siJpAvU-@6+WR#w*5QpLl4uzn7X)RW|k zH4q#kOeWNd+hm(19oY53{hc^t;Zda;r+qg+`Z~C4$4wU~0^8e#qljtKH?Q9s84fx~ ziZM7mcH`E>^t49&?+kKYfz!C+ngi*f7EK2JB@=QCyn*Ggd#VxVM(%7Y1Q-gQ8fU0aF_okFHI>bWt zHd$zPi6=EWNLlW@_n(Vm^p}Xl3?odD7pxHq#o%UP;3okvVFzC;ot$jGI6OW+&Z{^u zFfb6LRo}ost+>19z`8Dn3{)@35 zgETb24}x==fAFP@?w(Um?BX66>+|^_O`SRfB}-@(;)7~ZX4co9o>Qpv@a4;w@KCTv zk}6GydX{$&H5${?lW$Puc(i4K*u^F$Xs85DV%`svTui}d{76lb;p1r1Tl9L1ZR6W@ zJ)1@Cb6k!SfJ8=Fr~=dv+IXT!PBPWS4?enp4`0|!0u+#J$GQUyuUu|uAT$uLDRZ25 z1ke*xp&ULjA*F!yL2UI>+2&=LmBp8P+iMW8s#KwSFDx|(7Mo0sOawYd7%lJeQ*amC z%Iw17^)7I&BfR_gB7xVt%u9D(wH>wclU!sMMRt=hMMn2N=dz<{RT|t>fL*^Q2#Hr- zN(`P9g#|ORi*INfF_atxZ{!}s+*8mWNr>7+pu!(53qlb&N(vT)PtZTd3`5=lq3GWv z{(o9Ymu{Nd`a|pHaB6FR5O4G;sMhphbr}sNY&*LX=5k+u-&6DIzCtANM<9@8G=Jd< zo%?<+HgDRc;FaJ8J)GGEDrXfEZc3^Ox+i1W_{_C_0*=t(W@gx2_Yd~5<#okQLROQJ zh#>qKK^U;Nd7suU=f`)krMWJWp6UX(T);c#w)q=;Wud}8oJ2EE5u5vOIoA(7?Bs^9 zG1+l^<}!WY&Qwix^544q10-_%hX6jz*}#Sm+J;AZD7ZoA7HI=P7A6ww6*((OX)ra= zk0+q=9TX;Mx-+7=duY=j{~5tUPT2;zA}t*BbCpBL&kff}-n*7rc#_dw!&lWaonpY; z%%qM_>*^{<$!1!v*8%#CbGUeiXgyEMS(+BDjMXY+M*x1G~m|Pm`0hD*5W=KMIjN!PyI-Khg^JH4j zU&0yu{EEHp1g>`()%C8`#m;4?)7n%_xk5RcElb6s1bX^#O=i}fz0%XfX^BD!OOiJm z4rk#B>6XllPE0~8*qd*^FWjDI>c3dSIKog7@`BG?wgJxp1D;iLxvF1P{R&57Ea>uD zypKP)dH-y8cef8p$mMb#hC+u5M}jPIDgf`2EvUaWBT^x)onz&;E+;^B zfwNtoZ;LLn&FCTp(Z!CGrnbw?OPu~znQG}EQ_aqN%yn4tC0d2M5l|7jMkJw?@9VQS z@|zpH1vkohC}-tLrEFUKey@Y2ptVoW0J9%MCZxY!Etk}?6Yc?fC=&tKW0cziHf>(1 zp=nwcHjAd;WjD*2%}wQ69iGsu#bOnKY}IuG(JU0sLem&Gs+Drh)N9}wPy&P_1Wth+ z$rgrTbnwvXvWJ2JDdcuRA?`Z#gz=rM0qy}}g;zI?Zj$(X6rlhM(FGPa&d$yn*a=3s z6BohIEs}JUVd6N2O+&V=Fc59@*VS({F?R3%@*yqkw#6h|Sa z1*8|{bhhTY9>wT3;Z6rUe|{euW2g?@_OgCi2d#503@PkQ%t(j&NSy);^5bclpeUeq-iN!hSrL{M1=Fm+Kq`Jt>;u%== zWN{WRp^hAGyykEbVW@~@Fa?FFPLcl2`=JbTpNv5-AsD68vuAF2mO1Dp&yHbumI)rg zvv1rN=ZaMbf7hX0zrMK0UBAAvv~>3ig(3gDNXwY~JLcicOnURnhlean}r~I>4-@gcb{~8(DA$nXZ zt681z1tHjPtH{xcH~`cWwwdbAh7@qKW}^flw4KBB{t6YPApVgiv7xF4nE(@`jN=Uj6dRFJBZ)_teee zSy314HptJ{YPALppMoeTazya?qJXq3UQ0a(J}3B64*g_*74E5R9UrTZ{WJ}|UX@u3 zM_X8&xctAJiHW%xLW=rJq&zvkWou#F_^6R&EPTFjD}o!CJq znGEbCJ39*>GyIR4nQ_lj+cUez%*@R9@y^cd4u-*T5;I%2n57o<|5pM#@?_xnDk-bg z>MpKVuipE;SJ+y?@( zuX8<3o<5yicKy23+F$4z^&RSJZgzgRrJy-cfvk>6?jJvR@OabQ9G7cljlXh*)ZegI zV<}J{tM&fn>qB9B|HRIq zwpUU;fm6X1aWuNMv9?xgWr#8PUYIJv8;-5rSTeQ0wliit4W2#iZft4NIfM%^#V5Za zOnab2yZm%3odvYr1W?O_k1hjm6ejO#yxL>sBV08T3(J#JpkmV#6K#aEvxSGo z62rBEymz+TTb!P}N^V5>8{`I&?YB)2#gA53$hioAj+`S$droW1PP0Y-Ec!PUNb{=(elBS%tYKF zesuFAmOwMtW*d9Z#_qvmd(PdSmC>Y&OQEbs8qn>5p>>o3rEQgT>c~!qKD#bh)|j1+ zXH9UQJ?jzpt~J3sIeBEM6Njy$-m=xvX65HC2Hiboe)#axG+<)Wm&{-JwZHb)e&rIr zpDh-F7#AUgj1}t<<;HeVgv|8DjW_-Ai3x#%nWRGe$-nz||L%!^@613JPlL-G@d^>; z+%V)vg~GXWZ+_NFmvEE=4oBc@x&O@9zIL|%V=G-|d^~gN6i+2pRVB(N5~og8*D!Y0 zs-Lyeb!;qVhuORZgv@5!d~knplh~d-&X%yol(IG-#+gZI0DCRn$@I zoubgJwKh`UjV9vj)6?m+cVx^+)YH>bLjg&W0z>Hb_5%7^AyYYci7 zw8o%UZnj3dWS84G>K-@rcKg^+?kC*LFbX2SsQSVSFQ`RqRkW~xQXCZDwB&N9PTklm za;<{&80XIqIT;Fd$S6)u7O!TrS92&p4idm%s|$L)mNzVZe>9425L+2{VV{R&6Jyn6 zl27N(OxPe$gFtF6k40rVm&y}e$4;wbfasFk?xB{QRDKzqvKEV#!_6g78|s)#K?Z;O zexhR~MH2UJnoT_6`CP7LAz#rWE-+!cSW;jpWf=yI3d*t)=A$U2M!L&paatFavUm#J zIcy=>rw^?T3#pWt2apPxk)#>uQp&Lyv$J2$w~V-k+-|93+Qp-2C|kW$ynNn$WWnV= zH&e{ljtsl3^|}?wD6$+xVUSI36@}YHAtQob!CVdVto=R%ef~nHAAz%o#xlint=dxT z_HtzgxAZVWat7(3RO4i)J1o0TW0QK?En#zeMKfVV>*?!p*~~)33aYoBS4JT{D3bH% z=fZqpH(QTzqTL&opFBqYEIfXy(fjw0d-C!iAtOa_*u`81*=BOhA@t5WQDG2GHz?#b z-}`U>?Z3UZnZqjzsYJL6QRdyOb#ASdh%$n98#a+L+EH^k8DXa!VoT_XKVYFnx%xu< zN3%}q!<_@)aLWCq0?)s9dviW9E`-Ojj;K~jqQpTl|R+h z4ZXp>fH~q)y#4)|x8Htyy{wEp+ZQ?TL4qs^To`7RKEf=}@87@M?2uy$cjdVh?k2ql zwP9MiR}=>arJ}gz>85bv#Dq9DX4E-wWL(`iI2ao%ErDxWDrpw0Ro9LY7-*diHNu8G~6{QU@DbNRaBpkL=X4lU^n-+*4IDFc(XqqJJ{db z+1glN-%pQvy}n>i@4z5JlzfI&=L_EcfX#8Z6J1@|*-h;xOIwOMbaujH6F$q-v!8dk zJ+8sA@$rclUsv+^bZTRLb#>|8pDB~iWdl0c;Tokoaq05;fW2BRHi+~jq=osVr7MFG z0r|Z4%jV_UOK!{K)r=`D2sXEW0Hf{eUth{b1dR4an=Nj;2Wj=Qb@~NLU-+q^yZl%# zH&%Mb`#s;|d8Z`Y9r`Kl@AwzMZ2kLE*}2#nD$rfA7K|Y_|wYWox#DK`^rxbvbX-y5q5GMZ@Ddtix$}H zI;nHj^Gek36Qk(lv#gshZf#xstRZhw z)s+?U-|00#If4B84fy4^G_jk73Sd!YtIOu``PSDr*S0^p{b2LSmM(C0(2fQtcqTw$ zCq0V33-)EZ0!v%7&Fhj$2D_TP5H{I7-q8Nd$B$OC^B|~U`<>-1v5n!KF&oK3C8=Gg z9!3+`D3_|agY9jf&(4PiFP;xLO}wEv-3TgQ+JddjX0C36to_WO1&!RVx_maNCi~m~ zyxR&pTbb>&1a1fc>lR1D_UR#;phsb&eoz%`gGVy@R|Z=girYnaDssHQ2z@JX)a6Ma zkckPhM%>ubyXhL8tp=V}l-z?vC)@kC-s+%JI1P#~bf$KDO`$vf}7^LX#oSNGO% zv6_DM)wE`5!s1Ofg{yIVE#ka560*R``{G46$wkppZujx-)-gzk)Y7BHN4sV=*BH`qx>%Ufcx)51bISBIsUI91 zEH8)Q1CGV{9yJC8{I04#c;GoT<#(&qS1(noK40~gDBjW}4DeT=RSSbOed(&t=X>d; zdi~O+Fn{S%z5ZEf^Uubx``c0}_m2c_3T!ov{)gJ-3+4Y1Rqh6U1TvrZ5@*XheSJIb zmz4*1gqPj5i;4F%DvDu>BC$_QGf`ym*jL0)GHV7~U*GP2wrXOyzaoNy3v(m8v(?wH zHqszFyW87)_((x24Zt5^2&Mg+6^Oq?JXYkHdfrbOhDLcKf}Vc!RC#xIWXLJxAu&Hp zQ<^@+MV6|;UZ7bdCy+NjyWI!Lt3%di$MJm>Eb36eT&>k@c86GJ7{s*R^rEL)BwmyN zr;(54JU)yulY4b_gu&<*FwDq5)5ve0XM0yR1H|~)zGpcont#2S{PR!Noa)-Kt!^)q z$?W{Yr-Olwjlkg2Kiq*##`S~F#Z`}IbLs*qO}4 zL?V$YNdqlm$-c%~v>$XJ^B1UtDwsf({eaB$yLTo@SXWF7i@aQW9*JZdU!7 z>h)6T%$dgnx0)_#en}&LDop;^yyehW-LP05KCJ0uXYx!>{Th-We?3h8@_c8ve~fL$ z4DqaO_YKFx^w1YRk^l^@7xP0KqDuN>X3~7iKFH>BM=s=v55rD-x^0Bd4y0-ROn`<86t&kmCdD_T>aOE4cMYWQU%_nKk z-d@kKV-cPw^?F#nu}^|nD1u}kLV$rRBfJSL3T`O%+*ZP@gff)bXgTOkPtT6lqnE0p z-3?j1+b&j1x<2d>bxdzvbPNx_c_jB`9{+rh7%4SfYGFx|y5W9SU_^^-$z8`JSWfG2 z`W91(I2bzclF$nFxa!*=@aR^};}~+w45^<3m|_?x{mH?Qxr0=8ASc(e5+iYKIPUpw zB}^6~`~q1ZGXKbSL%RL``|>3-F<&Axt$y*NUwQ|hl^A)~*z4U3 z9QJO@W=J^A_}6-W6z@+Co|GVU(%1?N46t-q3GfW%jsw7}rPan_>3#CS+i$C#L@(86 zj-~51@~ljW)rTvhI%40B|6q7cq=ePvNCP*;C>eH2iB|An%P}S<@Esxp#un5d<9QUT zS<&*39%=6MsZ$d{^lWeEb9%Nk%VL8`xepU^mmNsb-)SpI5nOBuQ+yE%x+JO-(X72-lRvE<&Zcp9bHT z*&nsQ8;NBf-@E9}+;Q6;)afCT|V%$&^BlYOf zxasuiiPL5RA|-}RC?b!RRif}+U9;YW5>5}TDYGv`_MxU#k~y;QBKEMsdcGc%b^vJ9Io@#0|1w$bGj1ln$P z7VtLbbXAfQqa?kw#Jm?yBrDZ;*e+Z80GW(2jBPD~S>zdu3R7ri&I;%+LuW!Q5#|quhYz$C;`^v1#)45q#q5sDCM!SNuIOv7r?bCEHA32?g}H|3lEID~d(Icgdj z84CG4zTR`i>ts&(<&Bk<#*4q~m%ZrbB*m-<95IuD__PP8;(~X&S*i)N+yI+CgwmFj zqBV=G7Tgfq-v!Phn@n4Q8#hc+pm4iD%lf>aPff)ZY`UU&$p@ixx#S1Rm%gNg1>H=N z$*`zDeym#ukNs#eyNA(!NIrJcgf>-r7Y58_0I2)>?V}eEa8DNdF-7MfpLui`A+?Ak zHLWzIu!(Jd_ld(n3XzuO>6rB^U%CFmg)5`zAdvi|Y4j^!`HFRKdFcth;U2B-F$*Tm zWwqAt?lCKP>C0c!Z#4rG-ey`Ix`T{*+;BfI;zu)Grr!xmn-+z>7C=HMO)a5UH`3J9knkm4T z6OiWqQ|D)1xOR<`jA9!6+sc!>_g&=EOazYo6k_5Ln|Ha~AL5Jg_(AkAx(MM5_dzdg zKBp1J=56|mmIqHVswhf|%|4*Bt=DgPl0nLl&E0#@p2a;KY&H}>m!7v5fb@m!N8Z_< zEHB$^%i=`(?QbO}#Ol=cI~t`l{3&|^cLzsnfBMwE`;V4}f}5Mcq2+(H3z^JrfB&xg zhg^@>yxz6Pt{-wY)9U7o2}>hz%%e2PKPOk;YjK?#<2s*VQY;UBkK%{^MVXQo@7XMa zx8o7g{gg~3AWUdVV#s$jy0*Y-V$(BOu2)V%ARJa+qS*N~7c6lTLQ|OVBSAB9yX8tO z0Zz1BWMek|fNkz{h`Sh%5g~k7Xv86nh+wGoU@yM4w6(ppy`9NGO93w|PM5>$CEJ4| z+pxWtRi#(l*hBz`D&>V%SAcT3ZcVnYNy*nQH6dT_25A^m7 z;uFR&g@b)X^1*&P1!ApF-EY9~;vVD_GvtS{#f<=hg zQw#O<5@_+G4I4jyzEl7TO6NpT$RQLfRB$I#hU8_+tZ|1_DoJj33581IAPLk|1)z2+ z$|jjqD%onSVMO}s>F?ga6kFIhsHou3u_z^p#XpG^;?fr!^869kfQa?7HGD2e{d8lGUbUjl)Fh5PKFnG~CO6^R*nrw<*zTsSd@C9 z<#99;3-=VW+$d*3d!jqhh4@$`;zl;zv z?XsHhJ;*jK5{9itK5zJ-BlViN-Hkx6*F@Q&4ba@A*nW-&P9{_>IvL2^7qH>Z+HU!S7)j4i{+9(xgE`+2MgCcMRWc+MJ1}=3 z;AMuDRtZVVUO%(+8nV$8%*pU;{cxS>st?eTW^`=@gNq|v+wZfhv&$!~tq_$b&1d0$ zbMlt#-6ZQ?@$+s zc<^w)Tw`XtRUR@lM?){>wwqo!-I(+J4o6tIa%E>FY9NGZ4Q|0IIMrf$%Ee_sOb&>t zZ#Wto8}s#g0#5jIh2X`la!7}P8hTN`kizyCyQy5*^5B6<;#uJ(nWx7+gGk7f%Y$Gl zMb|chK2pl>FM~WK3xy0UV{(S*f$HB`E$p=%nL&SAZd8qkn-fg|=6}DixX842RYqaM z)?2#`H&(Av7##HALo`V9oQ?SA<^dau4Z@tz zIZ2A?oQV_HK5~fb?WS(flxLY)-1Hb4%LzqA6V`AIVFm;G++aGnUi_i)r^AwZ(DG2QZ`gp>Q6nLIM z{=-Nu+TDJR(b#o{GGsLN2pc04ibx1Qm|3%GZ}OXTprN%jX8&K?AJ94LR$-9E6oimf z>>NmH_u>6iJ7iO-t@l5~h27;V=k=L;*fRf#0~+F?M<2UKo0|fdsyu4 zW6Jk8&qYoC;-2iy8>K=a1sYr>s>f#-)Ziox8LQRl^GcGDN+x5;T+U)iX>ZyjWFcUs z!qbqh)Zvr2S_efEZJ-KbEXHImEotZPMd^PBA>^e_>CsT}WZfKu9Mf;cs_)0_@|j60 zVMZ_^a#U!_~JZ6Q_fV38i#8It= zI<=yd`h6CWVVY|^rF<2lm>LI*b_`5T!~lTY1%D-;K2yVQ1S!ueShLL%1?9)@VERzm zLZwoVNR$|qP=2nfrhkJ_^4FPnwoXk2Ns1m;Brg*&gXT$Y2p?TiEp{Lwh=`3kVGXQE z2BwM%?;{SQu)S&6jaC3}m|c8=3+=z7{-4y_^Vd4VyX%bx z;ZY!-vcd_}D5VmKeTXh{W!_>d*-Mp@4h*>=iYA-2(I|b+M*6g|(wdL25=vfV^Rd%% zQYKS{mz&J~J_>U8FQ^7pXW1GU`S!f&W&kkE~*WNHM z1CEXj;*R`m@BPWPef_oPmjP>ZDnqQjY=N}8T-Feik6HO_+KOO76a^W7ZFZ~n@j?nH zb5PKgPr=zsyTL$<5dV{tb8SQD9d5<;nr%d$q0m{kNt5T2ciNZ2By77A|w)>mu*&6G~N zR2hNixg&DZs>h!ol>9M5h|;MCnnp33&`5-faHV275}?G!EE`CMSvEAUZ6wRCKVBz= zBXvsZk}O6PQI_h2Hc*jR>nY^wRxfU$;|qC^4|6`gUzdak=B!!!)RqZ;QpuYYR$kA8Cdn|!@soLMk^ zdi(Z#V*7?*WI!F>H~xp)u$)a+5E`7#R(^gn^?Xt@m9c<^xwtOOAKR5o3=-1AjsoCF zqsENGRLm}wFb`7&A_pr6+Mls+{2B|SgVs(E}piRag*EUQ*Bl&oX2P#YHq66YLyzLp-^4xro!ji2pI6(VTE}?agyTB z)|-S6bGgS)-}odRWmW|{oo4(QwRrtuD@S-_q}XgQpq1s%!Abl8^8F!#&RyH6py zv!6jcXFnG`{85zU#|R-*6oDc(V=@^%K9T5&t(~1BWMC01C06u-MPN>53LJB!TW8kE z<|^SVtoJh;@d)3jBR6%sNX)pU5{8kcke-eRA`whNDpwa&Ur$fKrYOzAH46zKb~+$9MZ2L2>%@%#oX-kDUAP@$^6 zL_+?Iys_bMu&DhRIS|<0Wl=lE=vkk^hBP<>|HKUk`$yC;DTGD;4*S=ABG@db3%T}6 zozz~@Oj}zHM+G#k!2Gq`yh+~rjzH*lG*ck3v(o^2lhPBGkxJ`LVzbSeS}(FBG^O<- zxp{NW)OwGl@W0^Q(~RabYTSPJ$A28c)HxF2zVwyXu9JvnKT4=m4^un2xjAy(_!GkH zciwt?RR=+_9vMaO$g+oh4!aYH!8oLdNYvCjWtFpA z@I-AbXCLj9BF@{lZ@%|osnQTYK$NR5UY?oxX1CovS0u2z=Rmu(ZktWQVKvsM&o{?m zW2Vu=!@1V)0-=b6%#*;}Ji*;AITnQyg4pJ$$)pj}+_9983h=Vi#aHk{$-Us8p_uq` zG#Uu7sPT!x(B7W`Um1o}VtpNOsnRp@)EV|xe{9?L7uZ{Btu{T4WA}QOmn|0UOSL)f zTl}A_e@Xii|C{Q+ruMhFfB5DX8-KL%N9okmSIK|FzrToo6;d%ghKHY=6a?+#NMUNz zJ3a!MZDU-x-D#Dv_WW~y!R!6P`02B!U-kK3WuL)EkAj-UGq(CQIV&%n|9CO@+hwOHcN;wotCKV-@YuD^*=L}|E(EV^R z6k60ctb}0>M0Ni8`LmV{F}1cB7DUfZy!TD=9BcGY5X9ByiUa&mdujV z8$w}Eq|Qp7O2iIYE>Qg*7Zy2Xa*_y~A%r|((GwI5PSBjJ%DzCb7ilAhoxSJ*o_q3y zY{KhKr3lugoQmyjwp0Id$NN4jdymf^7+^dIJW{L&ePUftLydHJxV?`on^m#VLXn3> z0JDbk^9Fb)-sU8Cdict%&f9uKrQzF=?fUbCLI{-Iu< zMIt#c2yw!3nu!vy4T8zx@n~J`K1TqVKxV&WZH{zsW5L0e6^tx3F>C^r+%q$7ayu>! zb5DQq7x`gxmLa)`4VxDGocdrZU4@lGEsev7PqZbq2f|XoULfXlG%Q5ZW>V0c4X-zs zGnd!P=3LI}Z8%OlG-okcuP2KZk~6t@-et;RcsMKZnAubn-D1^bj>RkKt+YnExDDBS zbJKA)EnNn)A&!qoPxaEW_Ggauq0AD;=Efwfp^~iK@j2Hf0X&bu)RGiZaseQy~jy&0bO4pDlB`{Ikjf;^aHEh?=jVCC+7^+n@)EYwG))QUTjiw z1C#9W+=*4gXc%nOXdJB?m)cfE0k_xJnm>oJMB2ePeG4nrc79GcNXB;)VIi>_PaZ^+ zB+7|`ZYAdfj~?BD@`Ro52Ds^yXA3Tbq+p;o?CK2!C8)}}s?o8yXyuzu#130C%jb1F z^3BapGxxb5MWK2JJEf8Z%HV{nQhHhyd(&nwZCKG5bX2&LZAdHiEr-oh8&_;Wjx3xn2`PbpcTW} zN{i5{6{u!68G4m7nR}VujWa|c;^AepYVQkr>~1$XZj@7NPoCa}y69ev`p=$ArSmmW zbue^!@2SDQzO^ip%hnZGfhcv&KGhe1{HU~t=MN1k@S3+)sx@S{Yv_4xCbefL0Sjkn zWD-;K#HDlz8J+egKK5JDOxJAGT*Pl(na%!ANs(;#aP(65{j$9g1A84GF9W7QOremGFpS{x`@C5o(JIgyM zZJw(Van4j&y|r36>lgjZNvnyJAQ2(fxz4T(k&v+#7ini)q`l2WZf+iKAnY9;?y%3p z%}uH~IAU-nhd#ER2hR@m7LBJ}!v zJ?zsrFksXRX@pF^Sj=bGRiSQZD)(R^&vAlGDa?^M>zVTrC&yz~8;kDug!~Q@XAo9a z!$_nM42#8Jp9$!|q@i;N!&XJH46~~tDT}hYUBO_bl!+BmhtUt;zkNI6EbTnnK4{o% z3lF!;4NDzOq&?4e8NFlqwYH^uy#d(yq8eUo(mj!}fsh~E=W62q3^&hN@#>-Q!a&YTE~*(|kKsP@f| z|LVpXUnm$ho56lP>BA`h)I3Yizr@LXU}m-q(njJ@GRNj}w;z~RSzCW$bM)xjc~kz| z&g%IupRa0v;Thh1V7tSccTQde50Ok~5*7`-qcG&zTd8SsK3_1oTuMQU@UgtbJ9qSk zgT3LlJ6w=_|0+70pEzHZfPOOa%gh%?1#JUm?Vwm-B8V3Ko)^Va?S{+XHn{oA+UtwXqtAEJRd#BM7`B25PZFv3iL zeefN=DXo3<(Hhdiw?OpG6HmI`3(@F;yP3s2eAEF*H5|jYqcq(ex>ow&gN4G?tBUEg z7AEE}Q6UV*(%0DDrgTRO^Ln9B4O8qJj&pFd<_)0n4vk1*BF%T5%6RnbOvhi6qUglQ z#6@}{L5tg)n_Dr?o=Dg=nZh_H%adwE!LHm*coU^fpt#RuDnkSqi`A*BjzjN`6Y>K@ zRp(}zi=a!Fv)PDrAK`(`8s?+X|NNh|E(G4Vy0M{}D-7zD2a+ib*`OerL(tc_V3)}` zk%qmnupnt~m<568Wfn>xk~h{%9GGJmz~rSqun}u(+Bh4GD^2S{r>)U&;8Q8AY=FVo z$Oi)XHC(J^1A#1(QY6tN6RxJ~`G^xpnHnH-=g<3u;x0faKHtZzHn9&N6~qC=#!2}D zyaKxh5Q1)ZkbSzm%gb$goMrSl+os34+&k|8&~)$KgG^ZEMZ>668^m_@{P~ET;~^9| z+}jNXJQf)o{Wp8v?!?*(LcCImv(MFp+r3e+_aQiqu*Gn)D|=yMX^C{m>BIMKf;QVho3mvrwlZ5;**ev0`sT6CB(u{yG4l>>mpli|#uH;8#bmbc-W>?XKG$ripyQ$+}P?_MM zBSZjs92%-2JbrAqg9GTcyYEQsMn=MPWMt0T60tEPEQ?2yJBDq&e}B#jA)7%dnrfr3 z@8IBnLt5wBGo_Q(ulY4$?$`Vp2;aiO*RQ?y>en?l3=m7X{QA1x&SJIEsFun{Y5)Dd zALjo4-zQ%*{+RJ~?(JV{O5fZNJl754a;>fP^hBeiRwEp*wXC2BMLd=c9_9Ae=}*1J zWPM@!+E3w|=B?Ih)k2}2Dzg;xrmS%XQpa{~qa7QCR@>GpzwoV}uVk)V$#i6_ z&xma8tp?TW*IxcYeROegRI@XYH@KbV-~Rrik<`?NV z0%x%f{8{yTt~BDIb7E-3zMen!mXCPU+p&N9cG&#Rzm08-jBK!|c{@X>P^{IQ&XYsQ z`D53^=GT7I;kb}ov|?p`$*RrG4xx%@EW@4>&73Kf1%li zx;&pGJc!pEi?y{y*-!;7)*8yrcT%Ws$UhREPnYXzX<%*9Q}zef04XF{)XnIgbk%N z45cWB5{49wVkl|dqe2!4|L!~QX0z>4QEZM1*&wx7UwifP-c9x#lPW2GUYDb=o5fSQPrQS+8lL0H2L`q@=ha|g(K@w7wx+C$h2T|U zwH|wvXY`O7Mi@+87@za%!1A)K)<_KW#twTmjdI*KRq_L6UhA?*XwSse z)i7OMowv67xkLOqGxA)^HL8_1m(dL@qX$?9ENb3XYoT&Q=QB%&=56Ki_P8D^*!RQgnlMYZ&CPlH7AK6RH^+Qqo9R)3+wx(F zljX3WCSuv#RvT6_{tw)-j&0C{6Z(B3?8Sd%)aq8_Ai2u%8??kQ}e~LsjcaE`7 z`Oex?V(e47lgY39bzzFgz4rR`*GPoC!Jao5^F%s}4#$|MHt!T66p@fulV?s(Cu4UX zZyg-&uid|S_tE-JG@UDE4_6i*FYg|fnT_g$<-=U11ZC##@}v8YcjD>9;nv#I+c(~S z|EBh8i-yNy$xMtL*Pcm1znMrLUqja!Hw3t1_p_TJH^k(mwG4tCA7q}8$kxy?RPldkM!n%AqiUfPM3J96hcgd!4h?acX1 zN?+SfWb*N~#Rrd`Z0sE5D)kb8EE~J=bioi5T1Xtk;qHi-9WJNpc(8Ea;a)Oo#cV29 zRcs?>K`&$u_Rx+s&d^hbduz*2kZUQI*j`&%xPR-`?aT%38f&#KwQ%=!@|o*=&7fR! zp2Pjnh0`PbOm{reRv!EC#nZm_9x0Wv`wRAfE?iq%>ivQ5pMXEm@u2{Oi5>_qO;(## zfTSGFRw|V%rF85NB1gEo+1h-1XJ=w~bmzgs%Erd##^zo!GXhJrH1@)|g3dALgv_qM zWU~1Kez!N!+uz^YHvl!lHLTIh?(X!kAF2`W;3-_68umT+`s}G8zrV>ZFfYq+I?VHY zVdQWNt{!&cWqc{MuS>Wt9&WSiM3K2iIN4K9o8!Tg2lp11cMcMTaP=P0S=o*CK6=Jn?r@gqk=9$!4T_O-9s{r-{Du)YJWxVF2$ zJ$C)&7hZnll@~8xnz?l8+{D=UTug-Jzs7pR`8@ltQU@3K8Regd3Z~!5a%dNS%T$lp{FMnJKTC2IHMV=`CL|#WMVWSUX&8aEY=S;clWlo_Y*~GVnAW1T5kwau~62_DNquqk~a_h zv3M+=f{9B8Xu}dTSJ|q>+$lh^!cY!WSL07Iffm41p>irMX!|0qoY=knushZ zSg$3K$-(`24SO8qjYmU*P=dUu1gtfRktihW&9&qvL>Kfde zZ$krha0ovcP*fTE;mV55CiA3GuN4!~DD+a>8|yH}e!770@b1s-pBkIk-_l+!$99(5 z7^Ds!X{C8xuC}JfXs@FUTk1fVtRY-aH4#;vHTZY5ZL?-Wm&EvQV84wLF4k?HxBq zv|K*9eqAW{1)Vn4?jJopKIn5=MGos#pufkbN*wsSGO@auUbX~uMn*TeY__GPI2y$2 zQ1omvldsJVi*|1i=H8VWRV>b)!O=daNmNv~A5{GO*~zo%Z0amH4J_?$y# z^;+YlcNJZZwFO*q=m9&+ghlUesiYKzjugv<vlkLcG0hB#eZ63kYBa^}o zJI0Z$Zs({CB)i9})xNP;baCKSJGG%bRLV%3R_>nmd+Ih=jas3IKXAcK*yjkHunXBx74o){@oimc!LM znvBLXd!tTMqb!eIF*9Z&Qz?5;phkM<>60f30CoGgMzLf_oJ(@}or1wDp|dlmLiUBl z@BI8P-N}~1G-wO^9_-|&LbMoPe(=DM?L#lVaQSr5-q_P#&Zc40luE3uF$Ka#qNEeE zD=<8|aO?dK>a|8gy7A=kZvOE*Z&mE4&zu{qZ^dA{yp`op0*8RSMVNtFETjf{P^;;c zie9f*i`k#}zF~`O@p{5EQw{qro*r9?72%iR(u}!q2><^dt-v3orz5dzOJuCq;F#^& z>mPlT%LRk4zm6uV5#i5S7t$pv^sTov>ahH2()LpG7xCs_W^|)2!*S=Mcu@iq z;Va6_PJeJ_5P!J}Kv+B5eh;Z-)^Hrxdb*fmPRW-(TEX8^rD(+)eY|*x`N1H?0S239 z#~^N343ooZ)QP0jbNe3lQmOG)g8e3KIw3r$N@ieEOy%U(fp$#? ziJUp_rb*UTIp~6u(MPwI(RcA;L$Rrr4{k&aB{V)UIXTjAQ7|xjr-B$X7@kq&oundj zX5`ehYhEvq6I0i(Uq93D7HVK9O4$ll=xWvAnbmT&n!vcO5GU z@e!wyK_(f)IXZ3_yrKOC&(pm!kwYkANFtTJr%#DN7=@r=vl};UBnyuoi7+wdU#{1Y zQqx^y(>V+>fQlO#2zIF7?E(>+ldT5F64{m2Y|Rdwti6_9TghhYHRk9MPclc3C}}dF*;Zx0eufgBlKp?x-hs6@@e{ z%3EG}`g%{6zLR>h2EE;7=LHJASe-jSL+}UuiIQt(RMnyGqS>3hX^DupkQt zmEcKB_v)JSsIWD?UCxddZbU--<>jQ|%Qs1P(;GglU zAxA!1;z*3rSfNxZ6fKq_i+F_6Z{o2(LrBMu;^bhBj91 z9%lW`B53@fT|ESD?*zsm0j*@tt<9hC1Hgo}0825UEZ*tHCHfBz{44^O2>>^cwT=oA+JLB^J`!67V9rp2|M$+e-!Vg9&92L>*QZBUOwE@ zC`F&%_(dGb@QXK|MoW#xJ#fCj<*hwkymwDKWsr>xT?b7zAb$YKEEJel$)KP>)Tosq zvMARKSW+1^ElhqyBY!hY`}@N^9+H34Z1qd_w%6vCu1OWbHjTNoc))kZ7^f-JZH zYFM3FoC{OPHF-e*So7%Wjcz|WnmRG@^rO#rOSkkGZF`ui`87B!(TB zR0W0*Uw!y4%b0$WR6C*T0S+K+9hjKl7P+2jbGf%{n%3qlNRAw*$IgVa8i$7#pK8QP zDpgByJcC4u&son(*_u;6A;S&ZH_7Jd#?z;b;=-;{Qg#-!`DT%O%KPU1Qje;I?Uc~N zyw6uKd1=8^Fg$pI6+2sZO3qqVZui1#XxZz7#Oon#;?fQ+lHhT`;W7fJ6ns~Z9;4W@EQ+?({gmaR!9ye)uyX*??MkdpTWhN%X>ak3$z9%FE!5!1@ z#FUl8N_IuxUWt(ySs`29RzG|q>2gPiS>u?ip*Jb4^bzN0c||FgBc!Hr=r!C&{~@06 zB0Sii%k^_AgnlYVtC@Ime9%ra%ub5hhDPIu6{^h%l0mp9hRqnfVa5mE(^V9B!ek%>_G0COi6aBr;`6Dlz zzhMygg#kzMPDbr#K5A4_*v2jZkXL*9cH*2pZNKQqxU|18khz<3u-j@M9_wp8W>32= zrthWg&Wz)NHaI}Ic4%(2g|=hS<1kQ#)uZTeh&q*^X)%RHMnWcbts9cT;y~-?YMR|M z7gzU6cn0^6o@uq=ZzdFxkW0Z-D#-DY<>9SG2yT6o;8y%jhYeN6vw9_aI6OJ1=uz-E zk2iLcd2nf|Tuqzva->|yt-}q`(`1cz_yazt!)4|oo>~JtF?K#&pM@(VlZhli2aWkl zHASgqa(eaR#bHzV-~oKv-P+;A26Jje1x`}c`w!Q10`o3@woho19j;zx*~qFbbP7#= zs?TL6>7CWhWWLgfc#LYX5L-s6qQwTR68n4H4pp2#mW8kr493iL-fXV%W|dXPhC!0a zPEYx{>JHx9sdBE#scfdoX;wC0SR|Aq4I|ga&rK&{xyGDre?KK! zeUq$}DMn00F$55n{e6h(TrfROrFwe6pe?bo*BF+4ruOLed+&YtBwjG!Q#lsRfS4ml z7R)Ztc{oaAR>xD9E?yWmSF@`NlHDbiH3*Hw+};NB61NH2s~#BuW0n;y7F{R2#cL7- zpHC31-u}}N8%+-M1)uSe{6fb^GDb0fuy+aH2otBLd!G*)Yht-3wfS5 zBzA~r*)~fZjyL#hHcgJtLH)Iakh2bU3fk!Kkg86NjUx=WKxb0%vooV|Et5omA5~R7 z%;pa_DOFX?e!oH_N%625fFVl^Ed-fR)7jgEgBf2}+05|f?tbt=o!r*WuCFsQnC)HY zM<7FHm6F-%QcpI^yeV{Q`pm_dS1tqs;{&~umzn8|X6d(*S~-*4-^Wm>g;Ae~zr3@s za1X7voG4Y$&Xn%&7o7kJhDrN;$g->7~;)l`enm*`XzzP%*-8e@7CipL^KQpF&bF2 z6^mkhp}ugJ<3oFa-4@FHcjMXLgY^6DCX3P_<>;O#U?$9_zrhnZ5Q;~O#Hrd%VR!o{ zy)F>i`DyO5-)nb(f+LF9aYG_|m|(LeQT6+SUMrJ5!n#am$55^99)iQh^sK=dn^Lb6 z(H0m5S|T7hBuV6re024}14?UIqru7c=1+FXfpv}6vz?!`%VIgfjAG)3L7_K*8mJd+ z28LNf6s2-}3zR2e7+kel2@2IStnyxrHE%-UQ#S`(vh9ATG#8J_=Dt&tHy z3^O~CFfrx^K&2~0!~pFH^mqu9+$4#EdG4zpY(=*Z>hJ|pNaiDizQI{t*0BFUjKE3! zITw5MeuB6!oIB$o@rMtzH<=jFXndou-e`7tDwC2Oy{KWYV+&Q=PL%9+M-dWp=CxX2 zUaX-9!(WTg@@1Vk#38#wR+3*|Tg?#WoS(U_U1N;G@Nl~pQ*G>@+h!w@KZxMYW{G~V zzaQNPjGTW6w}>F9LYN1Nz!j#A+MN68S{#NqK>imdh9DyC86LKRT1ZzAE@#sb3G3<2 zn>NP@T&7a&+XkO8!NBnUAdLUqy>s_8r55vJhCilL8aab*33Jom?wm(t?LGq{%q%7{)t6%-^%E=c$=_)q=PU*WQeRjGb{psas3xz9jI~Jq(6+a$Os&Xs+l{PjKy-< zd)Z>iXxt@oD~w~v2=GGPxKq`#v}Ca^FIz3;vPJtQTdh^=7r*8yo*qdJo6Wl|6 zlt0||uQ0B%V6~~%(HAaVIptUNs)^n4ow|JGm6?!Q+j+F`aI?y`Xf(`RW0;N1!gn(h zXGyiv(CiN$t!!p}=Pz8uidf!Wc&LrnYs`C$D3?}m-T3z798@Hp{(z}gS-*Yz?s{4F zOuhKh%jW{JHqPYF4TBQuoce~MMNTMJ?ogfJ!^K4>>7LXE)SksxTtOh|d zQh>lY-}G`s(OI;ry`gmWoy>NRqeN$rBFw~?({z_X!L$fzc&%of%r zR`FUDjiBV>JD|7g@p9PvbU&U!=IJ;b9g}i=9rt(Qx$wx-z2p0*dOb{3Vew%5$JsqW z#`k;d90wJKYHBc*gwqa{9H?gV5EEB`F_mEwtkU#Z4EVyHCNo@|@SU4CPuS^@v^Gb)h+R8>(0nT>vqHR_PY`%yj#6b>%x9CnYi}Xy0U1(1ePgo(DSWZ*;CYp?7vvZ~zVWmVF z_dwE`s4;T+^2v9hXWZP}ZREZET38kyKU{D~dnwJ7DV4^?22JP8JGiZ%I(shRzUtCW z)J5i{58nNNc?;B@#UYz&4gHntuUxz+idq*Ex%+L0!?VA=Gw3TC8mWb$-8kh4RnnR% z7Tfg%Lr)qbb!Mj{VFRB0FyTHv;Smx2VmX`s*FWjN(f9VB{MVUtnw6eCdw6*69DVR0 z5P+q&)kvxr?iJj`UATKegU~su?EBGwv5j(Ai^W8u2`O~B%w|Kgn#RxFeq1mLkMEuxR~jcU!2=$L&1x|VGA(2V zCIWh97bc95>6%O%dz@<9da4bKpPo8>dVGBB)Oq-0S4(xlWRZA*RC4f4Je6LxYj#@K zL4Rt3ZD71XL`4Z(IgzX852Fq%SB+At4RDo0D!O|6!|y)W+)TjiC@;AO&R)23=9J6I zOMO%JXWBc6N}3bzzwg=E@!X8ZZ)zO3GO6**EKidq(h})QaQ*c!5 zH#R-yvu)cRJrGUO17|{Z1$N`a&E``x!}<|7j!1}t1s-nPRZLo*S%yUD(zvE9T)(a; z3*@DjG=2}{B0?|R)joczAF>o7ZR{=df+;6UWLzx2J^em;UkvS$3*>HhKI1l9p)fuZ zwK0cUi3GL)OLNKx1_;;(?--k!eET+~7cY*E%{@P#gt>1=-4O#(GESC6<@&-)O?c8;z?pz>YOuDe?0oiT;a~br5wV@XosWlc* z?eg?=`8v@A$9Jz>{E&fK4>V`qn(@wjwWTgo0jZb6x(;h%{0gsrUESHEE4M6^~;jmTm|)s_(p0 z)uid#O|N%r>m-d$Aq_KPw+|3HzTBKHvjP^nwY9lf@$LmS6ma9Em&ljCbTVI;V}%}q zE0c^HhQ0harAfuwYsys^bWwm?cHe(h8UMb)I*l`Ge-i6Snh zZ*HNeC*LqFn1bA91u1e@oRdmglk~69eg7*K+|mDQ@~v&RcGBC_Qzn{cl61|)t;Aw0 z+(a-q0gBC}2tv~>zsWlRL9ZA4CGMohsByo4oIumNJZF0HWMH5?F!1Dwp(#u~$L585 z&gAt*qm5|P>owZ)cVFjZJ|~X}Es7)Ot*iHlxN1E&V!bbk4opzo&MjDmriaAo+`_tb zsF~*n$n!(SyGVStM1aVnrEJ}1tyZ#}V3i7mvc+61=aqUnZ!nQo!i$Re765$qy8Cs|sznVo@yRe9>H1l}1jNZS_)4wVd8il}bL#n^+-;Y~%Ae3CWlWEz9LRD2=KV zkg3$jRzxc(R-V{2e@*8J;1m!8m_=g9R#lLy1}{tDYi5%Q>MJsrSiHpq08qmazzjmV z%S&}$0=HKyl_*!w*CmOsS4#zhl42bYB@x#1HA1CIg~^g@+BFqP*90P{%+H%>YH+m% zry@mcc7=M?tWtxR>mtRwirFI64H+5bi&c)6i-j5|OPpLa!aYUgP~#cr*UFX{f>ES__dceMs1Kv;k2PdRm%u`3xCj_%;{G=3UPbUR>a3TeEBtJ`lDMX477rK-i`b)>UZBHA43SZU5`S9o5BKuPC$#ctOuKv!5)p41C@n@yRs7V6mA z$<0_V6xvj1vUOsgMP<$kJBPTbkZ2IJ4_^naK-KqjTd`DcH0q_I%}QufJKuiNT7xCF z+1#|=k!5PFa~7wCQ)N_MmesBk`DX=Dv6-Z>In?XGwBs1kB#foM$Y}v6jJ-e>`FsrC zisnJUUPOY?asU7$YGCt`FO&%<2&7TdL4d4sLkrZZwGy7J*Cm$=sBj-r@H!kavm1M! z_mh1$^M0bnPFVa~v7jYSt{F%QNPWVgCM_-H^MH7^-?-E{ zjf+$5H9*igMsqovRnMf@zOmNO{8q_GW`IURM_Ft}gA}U<0j;!ZLOr@C@L@+8KbHAQ z$rWVhd^;sx^Y3T!4ktV7LJ_JJi6_vNRr0a@{gd`XRv&`jx|K-6sYNQA&w&lDaGKX8 zp?$duF)6iT3O^kjs8+0CUZ%Fk#@>$h_Ie?GVjE0>YF@no9-5A)JQi~ zXlg z#=^oz-i&COni{m=E5jaP%twT#>)tR(UBtw&VJ&3T++VO$bRgG08;XGfwf`R&XuC!L z004La49P=a9#9Yj;F3JM z6;K#LUsp*GWl-NXLKEA}k7$7&wiia&F_>m&V7Xn1wRSyr*j>11AK-<3g?IJ?3hgia z107{;c~-VnS}Za&6FA9E=Qnow|#k}$Dp3+ zndet}1?i36gZiqkHd2u`N>ToeQLIf;lFd*Cf&m5y2FeEh*Gv{idjmlbZLyh|nXf(@ zLU43nI1b}yHZzH(_8Y^hdTNK>Qt1{im>}sGx`rMoRhk{oPD|O@?6L}_R9?xhOUyEQ z{%6YUCjE!$SG+j(5|%BzRE(#5S_BOz@q`$Xzeg=9ysD$#)y;@93Pc7kc6HCobmsVj zTW{0dlRw~D6|6G2{uME1bb2OwAP8|D52~;`Itn58PdBKBdc>{7OvEetN9q#1eKxa` z{zwf~u#Qs6X<`L;Ds618BYNo0CYtIXnMS3~6F=uZXcB&?@DCMyu}TB!HqpaWd`Gnh z)QWr5ekHJHTZuRQUT6FTzm9YIC$YgFbt?WSo3*px#@V6|Rh&3MnR2)-^dYi*r5=0F zqxR_-XW8!&?n$h@qub1nlM%|?(>GC*DM8#gO8o*2P>%Xn><@aU!<_mEUJW<6G@*ZE} zeszlc9oIUAF5@3%orF913jaB=g5HGe>)#f!N9A|{Op^t0Tt^ayzki;!Cq1op*H0@5 znNeImGt11(%uXT*Gcz+YGc$8yI%ej}F*ECCTJo#xRQGhhrmt#x5fIbKt%}U5S*&C`i`mKh zY~n-q`uhERk$3qr-)0}*<>!2fUrKyWk(Tf`eNR8r4E@`mMQ)@!PK(_M?gU-s9(GUY zYWI|TS~t4q+)KLIz2&~4JKVS2clEOSzWb$KcYlqX_C&p-{`zV(F#5DU#(jcO#wcTy zG0GTaj507J%F3+9gM6DFziG#0zg0_NWfjqN!SXNLpobm3=>|ZQWZjnJQ>HPlJf7qE*YaN~^U-Yqee*v{75MRok>(yR=(J zt4;0d(CIouXX-4St#fp~F4kqbTvzByU90PLgKpGKx>dL7cHN=7bhqx&{dzzT>LER> z$Muw+(X)C>@9I6huMhN*_Up6yvc96P>TCMCzCmm5cu)b9vD+m6M|rMnP`m0&NPl<&)K^Q|+7Yd$33D%G{lL z8T2IBy$5o8a^EfgRqngtb~7M|z7F~!=vPp6qo4C+?&bU}2vX5ru`S!_?JQ)^_A(Om zFBgYAcc}MgVC=5Wjr6^&KGYFuR&;gz&5B*Ya(m*>+qWU%e}h@k)x;HZfI;@gqb*`q z`r36CIXvBl`tDs#{RZ>v-JZ%nVHRXBHLD@b8E~%oY0rV?x41nO-CMrceVbzOQnM1` z;xM4aa=QImV1)UN?%QP}iet@6C|3Rt`{r}z0b?y^NvNs(DbQ;E*mUl+ZVroo2uwGB zpi6ScR=()1A-J+{Tkhm;A& zWxj)!K;OVOjMK<6$d29{Dj}>bNo)~=o|bl^O;N!gnpqvSQddt5Mc*XU&ng5HMppf6=t590n(@~=A1c_;D+sC z2boWHkkm0RlGlk;_ac8}IE&{=1?Q8(G&_e&*g4^r1I$ITb{LT+qP|co^6}gw(a|_ZQHiGYwGkWzgpDS^{;j(-EnuY@E5_L zvRkd!G2BlSv;?NcIQHM2(}lZ(@(ke_K0Z@;o{!HG9u)pENJ+_T;ep`+OL<_9Wtdx~ zGEa%BMV#C_i$N-Ps`V;ef6VWIg%Y_p`~`K(3eNK_w@YpYKuerg&qo#|k*|wHxp}~1 z$NbXPack-^8yRXNcjbl<@;9HeOmZfH@^ax0Hs`|B$R>1hvOb+Yo7PmfwkFZS!2t&0Js#T;{QuP)pl zlv^ch8r-5;%_S?HlzLT#upc|~687==+IynEaO_T86AOFgTD=)Q7Iup6P_Je5H|w1i zh zGHi-f6}%*>URC$G)W0CPWt=r>EeoohM!6tGpeGN>IK$X@8zxB?g)^<&1w@+v3G1D^J(s^GOP2=?S)|(zY zMj`9!t**VYWm3<{z=0SSalK0a4rr_U&*o&FaGuZUBstrFzKKS1mH_>P7XbxyuEUm@ zF|JHB1As%KX=VHOtIQ(xevsKGd*U(3Z1LU@H!d69lUbnNrc8(A1z-+ItsUIFX9A$( zai?-;!Vp}jd#g5e(^oqWRI@)u>m8E*Oub&|+pSk&y$R`;)Ekz*I9VUfEW}`>Ejd}i z25=q(%Sg^hZ9CR!KqqOTfp4+1o(k8OZqDs&bHpMciM=@;dXoadFd67X%|dOrRgU8$dH$@ddx7})xbe)rVIFo8K3Ojsl!%V35B%UMks-?tWV9v6_~ zNuH&KF{X?<_I>g#8k+uQFpb6){fuuJ1Y4Df20F{w$_P% za2lQE71*CUc#u)1+~k>JTA6;#w__N>Rx`{DXPX&m#<0VTH{;o3CYvej#mG19em*H> zCR4&1o?yjNrrAk+PD$%#)|9Ye=1>XyMM?WdNjtlw&5_!DeNIOh^zb`;Y>eglp2rDi zoQL(yPkiKuvE!#b|H!iZ5}+$S*)sfC@>_e=c*(k$hN_w%s)?fN;#HGG^@-=7NId2F zr^3}d|IG67yJ-lsWH;3(Ag!nG`_{_j+?C6@%gVW{A?L1+oV&Vu;zFKrp8~-c;Eyph zVuV@``*()575qhQ2j4@@(&=iK>!(#D{r-iFsG(!?0r2x=UWH!(et8r>0Q^ey{}a9u z_>J(qV2#e(Z!N>`r1V#!`Umi9;lBv~0{Fe~pM?(rf3RFm9z%qYnW~SWDKiK#VZoj} zFwP?d)YiWZfwmaa0lA<1S#K(}FZ0~YvLTh+0e_5fW|S(FiyWmB8C7)BF%-n08L_iyaI@PX0k^0EkiBYn-Ps|&Jg|H$1)7iem$o8 z2BPmRrGb>XS{n+dysD9?y2gA1y=Y^8004LajM4*a1qmF);hFzF)#jmWjHd#D@07ChilML(X8CnsMvy+?6BNi) zCucXqQPb0Ni#TEZrO9cWHoMUVlQ?H~VR{yq{AaKFLvL_<+rrY!Jnq?aqxtpm$flc? zmE$S30cdr=0gZk)A5g#(Hh#*~6Rao$~JHy&!Nw;JUzLf%if@AtfO_p`Os>(6Z10 zIKNy=+Yi&Y4-ernJcZ}*5?;ewcn=@p3w(ngX!J3ZcQBH%Ok^sTX9javz!Fxlh7D|C z4~ICxRk=3T=PZ}F6?fon+>871ARfkJcmhx189a{{@iJb;8+eQEb`KxmBYc9-@CClY zH~0=e;1~SP%mNl^@s?_7mSaU$W>r>aP1a^z)@MUDW-HpNwx+FXGq$14+M;b{TiJHD zlkH}EfgA^MupA?ixn0Wchh!?g~QBjiYFklkeuIZF1Fy<~6MMLd|2Pn$IdYEMPU;U@T;fTEtqln00Ci>(x>=fNYlz>69)Q z9%i>zkMv3(3{SCNt5KSy8OBVuXthd~OvnI;A3=I$P=;h!Mr2gR;F#ZH_$~B3TdW#l zacZc=t6`R)hFhWCsD@cV@f|!QEk9aJH<&ljX&AuVGtu&6{}%&tbui~K4!5c zw#TkG5GUY7oP?8c3QomoI2~u;Oq_*_a5b*M9qvE;r?$!g# znBzWTHiZ&*E^X+}YPNeuC;GcHy&24CCfi?RTIt>WJFr>=)<}W1$^siO3ic0SgJ?@v zS+XqbvQV4cyKU*+Ce5$b>fMv5ZZsLj=n3ZD9j418gejp>6$V}$5R6{95T}2He3moBCbQf{vdG&1MQbb4S>ry%X6Gmy*9#3M(H{tRb4(<8$#o#W9z)m`>}OC;VWH38!gb5psOjQ_w_{8PB&ACoQt|AswnD;^nY_@ z%IT`Wa$QFj9yg@E+?1-lCFOi;V7YFOYPaZ)z%t$C_^Ipf#?k5WsO4JZQErTm+!ph? zGbR;%VK5^Z&s05>eD4jP`;Z>h{o(UK_&ive?!!ox7+qsuF3=*a&`S5&GiF)zOg;_$ zu5anGRy)o!alDtup_TmLkXKOiANjP9@5=!>x#;PdtGJqLxR&dukMku#L9KHrp24YTInP zR%?ycYMs_=gEnfDHfN)<(b>$naFa^+ZDL%tt+@;K(EnVkAM>|q_d66f$1hH+s)k~i zRbX_-=m;S-Cwb&AO15&HSjbnQS&-Ajb+H|`)BJ}~h&^~OE&l>0;q(`H0Zodv6#_v3 zME~sKZaErW0hBHOz6o*a=wfh8txO1xk3- zY0zT8h7&#lkeI+XTdpn#jM^nasUV(f%*)S z000000RR91000313BUlr0M%91RqCtis{jB101V9x%^8{*nkHr@W-~K0Ge7`90002Q CLkb=M literal 0 HcmV?d00001 diff --git a/apps/web/app/fonts/GeistVF.woff b/apps/web/app/fonts/GeistVF.woff new file mode 100644 index 0000000000000000000000000000000000000000..1b62daacff96dad6584e71cd962051b82957c313 GIT binary patch literal 66268 zcmZsCWl$YW*X1l87)X>$?@vE);t4{YH1mFe0jBE_;zih3)d=3HtKOj};a$8LQ z;{mKizBoEx@QFoo%Q3U|F#Q_99{@n6699-amrKppH2XhZHUQxC)koh9Z`96Da}z^j z06>M|%Z~L6Y&1qSu;yQl0D#8RSN+!)NZ{U~8_aE--M@I|0KoT10055byf;V0+Ro^U zCui_=E#qI~`=w~)LS|#={?)gfz?a>x{{Y1Z*tIpZF#!PdSpa}6(AxtIw;VAx60fHIlil?>9x#H)4lkwAf#?OoR zq}|UH1-_GP?ro-XFe6E6ogAsB_lMb{eMTseU$Q#8C1b*`2YJE2UbHtB7q=F#8c?(} z7MH~UQP;KATrXR0jxH^-9xhh?btgLZV8`yP{4?~5t>#`dU`oKckttiKqS}=0h)-TL zm0*m)Fqi`0;=bZIlJL!*^OrHroA}Fuoxd5CU8V%At$}@aT%_Z<7=JytQ)D?oC4fu; zC9haKy!Hbi0eF1ipxzXiPt=aQ5wop-RG^?s>L>gO@@+lUXG(XGZgCD!0D&Zs4~^e% z(4?{(WBL;9gTH%!vIjaaOL4-?5F%AuAhqP$}Z5*a}4%FHO z__`OOSOe6f$5}vgbHKxcU-p9ue+OOu{ZSHabi?^-WyLLrt+h>i_s0J8MO%1(?6KJ{ z63srC7MKwg5YmV8R^udkjP>c;o0jS%3s1#VZSd_ZMMe}<_%<&|(8tdaVsob9SlD{! zxA!4>pO-DKVwcU1_Qs8{!D!x(rP>~w#&w_8M_z*m4KGu9`d7DfIq*xDA@Pot6Re`h`d%{lBo3am-vR=-J-SO9A>&egV84q&m&9c$A=5 z%sfs3V4GByk@8gn49E{h<(XwIcWcps58AEdX7(zpG>h`7(%)_eh+vz{k!pm%BiGC` z_=5Uzd3aO%4=d~2*uWjw8`-E&TB2z!BU(IgE;XDXw1NdI?B6(MBrV0BsbKgOQ)gVq zTiiW$Yclle$O3+`9mkU9lI}kdXSxZCVc3#pUpLeJh8n71U(M+H_oIWzXjf>?Ub;nl zgr}Vj|2|%YuvXf+F+N$AD`H8>BgpF)5=3ZV&6AF!QO#3~-9`j5fsyJ#B#%vv4OtoE zoN*Lf4;gCHrm9!=;fkWSwnDPm>OzFyN{<}u3vWw{2o9!32OW3*>roJVbmjZQzlG(e zE4}U2iH!Q@$Q{J!?*)q_&o{ma{Zw*#>>xizG(K?ovKtF`xdX~MyHu+y&V2B#8?UA} z3)GS+=ALKVHi<)w-QE08#-CNleh`G&y`sLDidTfmrv{gWy`!r=i}Q2v#-<1h==FuW zo4*3ygV;zyKBgxN{?HQ@hj_U+#I$gm{DHH5VFhB{&2 z43OeSH?8bW8=avoZjrZrTVFiF@fH_w@Xx3vrm3WK)B*ir9HxIFotJ&j?Ql0|_MlDW zFAFtz22CtP@SyIE`u?GZ)=dVaum({0Bk5$QOjPFeR;d)dg^tAMWb#XR zx1N+SC{!SJ|LgCF#-Y>9V0n)&ec+ON<`=rB^tflD@PO&5dd1P!f>fx9N5?Gz0tYaF*sLZO0G1fGI zJBmO(<#@h+D1mjw+HK82Tc@$VtNxi% zE|8*n7FS*<*b%&+mElheV^vn-j|^j#B3O7EpDyIt*oZgUdgrVD+nieQ%oCn z=tvim?Kk=%r6-5a5KYn{cSN(c#);ls)$rs z$>2WG89OeQn+$u%7X^jeuG!?UPZfU>)k2TT`WR;^in+~$27hvw5jonPA>KXZH+n=U z-HdTmV=8Uz@-l4RwROKIHX;)pYhnQ{-gA8{I9_E$1U2#W?a|Z=G1jId8eMbFB2X74 z`tO++;x+F#xG;{RF=LA2>8C&>LFr85=i$Wb6{aFrO{Wxnxot^AOP6_d{#zLQ$rDOh zmx8VSzye=SUQ$IMq75xI4HXEA59Fnh)i7cO!uVPQIAC%WY#)85)HZ%qC7?%_55Ys0-MmZ(mFLWpk4!|Q@tKYGc|M5aQKvdmMnP?P5ZYRPA@UcNk!m! zYM=N4>}|X9#ViD-@-{OA)mQFn9XsaS7Y9(?%-TyN$#35%!F`M`?q#}XOl%HVhbwjt zCD9hq%W@?Vb7iv9#SQ!^zs1Ahj*)z0u^gwJ$gQZK>LPl(dju$D&tWsLLmc6KaS3pr1Z2W;DVO|v_@95?1- zMM>VRwrEw^(?(cgn2z03cSM3w9re}A9@&J-iar~ThaWK;6qbgl9R+_nN+$C===>ifAHw@+mVJro54y_ie`FBKhGpGJfp{7P=$nYHDU85j@aE6xcjU`6`n+UdYu z;k~!=E%i><*SAqRV{@mB5+D#ad!{z`YfsejCwwfQ^S{HX?u$eA4ev+DnZ3iM@r`m+ zLRU?0^iI5+CYyk-JQeAW21GoJm#CuR4}=^0OawIPmLf^Bj+NP;px>mQ@ju91?hU?A z@^6NFDk5sm}DxK#dVoV-L%Npvrr+ooO@;l>4Y7QQ- zdW3cE{K)ywgL|nTIL7??f&XRGbC`}V$#eCsHr>w^yd7NU`;^EDQzm7ei3K5D%lm`+ z_NbNiy=Tm2b-)>1W5&6%wKhpFs?&aw_c-nSe6$OHn}oFM`AT6SSBsV1dD$@{#%ECO zaiNNq2pee!IeZP@I^E+v@_!MPqwA4mCt$2(@-z0LcW4k^>Eo>KuM~B@sNL97E6TFl z1)4A2mU)d_2f0GJOww_Oc7q4(mz@Oz)qi8`E+3Ka*{~&X^P|?>khUM&hA! za-0+zz-fA;NCpK8V8&lEAj~kov2%5g?yoc=(AvRjAGX}w(W#TavcyO)!zy( zBwy-z_~z`5c)^_D?7n6Bk6s#PY%1IH^>8*9DYTP!!0{`s;pmNC!t)DD8_4WWoHDid z?f}^jLEV%i`>#l)r6O{$EICF?lGtwyEIZdkw3-n3GcpRG_G3g24WI%{ z$9%gN{?t7?aUhEagsS=Crvcft)p%O>j4XBnA15^iRW@>yZTAu@VcFtzH z7Pjzcy@{m*?pI;}+Li)cVqSjK+o9$8<#htd>v|Z!spzHUXXhL2&VAWwmO>TOz#2F* zLKBCt%h1UO`bcZm61+W2uiv-$*AWdy4%*JD#Q%mVN~LX?P?L)W5)_vf~Eysd%ifN06o<4DrIb zo`rgBZ)aY-Er1H(R(loTgeRKc`aiNY*ov~%7tdG23sIk0S|&| zI`ym(F~+g~Z@5Ak*#hsXsk%wMma1o}98R11$`-WqDhE~YQA+mXDy(Q>%<^37G)?hj z+kV3owb?Lm^=xvbUF5qgnn3}%i9dP8l?^m`M069e_$gUu1G~Si$r#Db>RW?Xxr1i3 zU}3e66CnC_N(ryScVhF%p7!Zs;o9%K&6EYZ3oRWH+nY=r>ML5RV}UVM5LU3?&R^3c z*yGY}>NGt9GBX1LpI6=voIS=^Xvm|6n<>r?b&=nFv_-Z%Mm7gp! zSI@=w{S$c{z45YBG@x~lPoG6l=DOXaZPZVlw2+33otl)CnYysT!Y~2K-zCtw?30-Z z+j4f4G}f{>C*}kX%RUJeNc7CBpe@lm@?8X1D0HyuJA7fg9{pXg(i_i5pHz&enAz99 zWY3;MKvcgk8C$XtDv6Yv9nuV?irv9MVk&VuUm#O*IQgealiPX?FMl0-hGD?jlbT|; zME&f##=f<={Z30HDUKa?&A?`}^JL%n$By&#!^_LLX#Hw!dL^x^o6ADIYq{oZ_wI$f zBPDV!nu9vX(9U=M4q63-<+v6a=_auzKjbnp>~RgNBkd^lU158+SLy@%Fg|_0De54h z^rK{5>e-9~goCutBe7pS^s-`ZU@;qFoc`@|Uwyz__~mA3V5aaYCZ<4e6g-K3SmT;h z@it4I5vQD*>)Q*Fk+6`Eb4vzkclOo0&Bf~(wh1Wr-GBRg!}h;jXKPr10(}{2!1D1% zZnFF}mr~=Vjw0b47Mu_oQ`l$EqB>V3NVJyRF^Qh4r|cIXJIkCIu|e32zE3D{>g4&%2EEepV0ihrnN0lI*h$OJUUNEJ+f5_s5*kt zmQfjSrXy0*UszZofNBGqi063mn#*;wW}5WUXL;JVcPLTyPpbj}@IfE`+)C3>1iy6( zj@xZ`!%VYN^QX6s+4^nia$?ubBc1sgz=wkk0rC;u!2s(j`^WgqwSUq;DL&UAG&u(% ztx2nnfUn_>ZkfgUW8E9g}L@NcOjYNW~s;MKbcH~h0cpk{_HWNdfijblYz+h2z03P3!{w_^F+Z{6(m;mYyc?e=$R~S7W6r)rmnhc^ zWDY8UgC=qhHXPr6E&p}OFapx)Yqfq0c|%ScJfo!5%;`l<0^eYMGZSctYCudt4D;QS zllZXAwPzujN)eGld?PN9>@xFHYu!q3RYPgwD4^+{ZX+R4pqMO?|LJJ$&|pqT%}z(2 zws%$GBS~6_4OO$4U!NF5sidchXC;p!pWSoPq9I=D?mxL{Zt)>jI<~1LE1+Oz;S?N` zsjnlQu+gxjSKXW_*MzO^o#-wU70)7mu(uLfuB-0YqK5E?-e-<1nICGBYERzbSu?t- z1J9I?E{8Qu_&Px*?|>1;GK>itJ}M{~z2zc|c`DfS=_rwR>wbvoH*rc9Ca=CCq-4Jh z+IxAat$A_beud7*u*t20_~6e9o9BJn_Ho1ME|LyR2HWhz8j>^3+Tpo;1 z#OP$C#H+-wZB1(eXsCdjH8Y>Be8*l^l2z0+y_nU@-|33tBxzRwJX*%MM2dIi{#=IoY<7?7I@41JDTMl z|9r8UIP#bjPm~nR+<#Sib?~q)WS#taf5E>&WYVfkl0n+1X*26v+XO>&f<8pb)x%vS;$rMu{Rcy+BTIL?an0i7iczQl+`d} zYwfz$K@_rR)TcHqJ%uE`{3$4djVoPQ;Hn?ilq^IOYxj-eWN$8weIZ>f`k+fXTv4XV zxXVid5tejj=$k{SJ|9C8d_7#uwA^RYU!2J#ik0bpw9U$J7X!0I3Cu;srmBFnZmXU! zu!~xOmIrL+e;d4Fy_Yn8BTM_b>7-kEqBb{bS3=bJ-^ zArybG{xTk8B}Ff%l0yRj=@m6PP)-nCvyy%R%;|U!{>YrP!}BK`AZ-hu>ElmSHK=&> zEupkk&(|o!b>Z|PcSs`6=3@`isI1|I>wG~8HCk8BNXvslF zb2qb{NmN5#uR-97^5i7Y3#R5QJ74sp0$r%yKu?ed&+ivClsUAJZB~9o<~Q6;L}dp| zgxwnq#X_ME*@s7~+yMyT#C>E|gD=JjzeA}2|Gfez+Cs^Y@3HvO`zi4Y z2oH@RhUH`=t1aWXIifih7aEhgjrV*`ZHH6adZ_+ar&ZyfD2E$B z6i?p|;Ppl5a{2F&Nn$CdcSjfBzTQctXYmW#oGbBx!zpUKne^JrV-1O*A zte39UNS;l(F=?FNaY}cPnV{;IWxW<}kbX@ieFQx@krv%HfvG%4XlKg9O7V3+8>hFt zsZ_-g>;fy72bHS{qLMf>2diP8r87W*IH+%^i_F?^Vcf&!KcIFoE=h>1+K_QCN5_s_ z4q#&aN9h^Ld$%bf!>GnfOUhgzxE|*hE-EA?ojuK5A@-75Y%0`lR@w?JsH>*y%6tpk?I`Tui&N%cfoY1R<> ziTCSG=en`fKl@2rmFUkA)=$oTW&^T_;Wp@KWjYX;@4#NB@x@!36O)_Th#4Bu=8*MK zKC=NwyP~_@yce6Gz$)Y@)bwMU2i2q)9rf>$?y76AlgTZUdG4W6;#_}FOmo!8WcV9? z=tw8waqML#6=2IOVbtwANc83v@=3>m-{G0{Ny)8;7W=g^yEtkE^>yoYbICa)d+sE5R5 ziLK%3zGNws91-!M=Gf<__>gK>e=N=WaVosXzjacH1QSgiHH~f)O#=+XaX|Rsy<^PZ z+N0swA*aXW@XXfN_}RltlFet{@n-5?bzS1KAire&KbctG3g4A!B3yFxfvaUB0=oHU>7e+qgGXcrRVL zaJBKZ_7?3UZ~OFGJ@XP}4U>$LdyBF54(1j_{1m|hWwpUDgwKj})AR%%l7uYevu|w~ zkBOe1zQNCkzkSc_-nZ%ZL1wYmEb(6jIMU>7Yg+K%!3ogU`%s>|sEID}D>#`ArT1Xg zY3DbPR2EFVq|exiDiMyL{;h7zv1OiG^7pKqV>Nm=z2UX6`q@g1l92J6cc+a@kZm*I z1)8d3#;T!<7VjIabqo@eyQoJ)37|fr}Z$3c;pZLeiyn9}` zOV#On7kX{lo-U2XtHNsMgs1tS-$8(nM4yol$L~+TU_|hSo}B(aT+{L@Qqtw>&LoFVZ&5)JcX<|jF-?{%dp72IDUzD0V*CKhi2*j^8=68STUt&br&iVp zT&BuNStFLR+Z&i$V42R4;X^c+lSmq13oJAc!GbaOKI=Lp0;>JnzgjCjp67xP4qg9a zdR?9CTpwbT3D8_T3Xu@c7&a8<3RUEg#=nkbg0w+8cqc?u^a08zbMm@Aj|2z%eC+0^ zql|__mJH(p_&ZY9I9)`pcdL0P#sxFdeI2ZfGdQl2{heylGP}w_1jKaz3a+xS@%id) zUXNpAXIJ~d{kp)a&3uJ>KeBkF0>+^h%Q=^5J_{f0O-z>PK22*&cP1cXs-$D9ble+= z=~ByXN64k!9VyHHrr*1R(d9x1ns%vcOG)`V zQ)GPJ#*rwA?dc^MkkKtXkNRsa6q5~dJ6-YNo3j!4o!ms;ejpQ=^?m|rTJiRsg{K^5 zM7|8=3C>L;f(3o71q@ZNtzz4^=Fuj+G^&VWgU!g5T&)PxJb%5;=Q=oV5ZTVL+>-dx zhhj@57~9XMJMd%ThH!JwXU+%2)FLU@1Uk_VOT~m8v)Dkv{-tP3(1{W3lsxylL+)Ams{`mFkBBHjmQA(dV4hlVkETa_SZqb@%q znl$-FD&x1SE-}P^LFZj6804F6E=n>Fjh=Og^ix@pmsBrc;SD;KvAb}^#tTq|XnPVJ zpT2sEeG7j1wQD4@_IZCbtQ+%9$cJfH+nzm7ZuJ_=8dWlMMAS=kbX_atKBec%d{?j6 zMT6`Wiljm1dZ+vZ>{ozBVSFPAiexw&_`jBDO04g7sG4t^{7&T_s(;7^OJkPNAk7EeNPJB+3 zvnI>9baeSf@IPpZWe^9Ev^W9*!{4{x=I31$Z|j8kg4qYeZnj)K>zaEC-uPo>RSdLE zc5^nm$Is!d8}Ln;f6P3~vKgXj)_-B2uSEdl}Se4P3<09 z^@w?vWg%xH_Jh8+7{G4dT9PLFNw#Cn%B3(2XpP%XOtP_Pkbs9kV z$Q-3kxGQq+N6qKq^axgH)t_hF!-n7lva+Iw5CB1Z-2D814juglNK5g0+ch`iw<~fn zBWiwk;dB}#ap%1RpZax*IFkCNe69y@xvGr^2Afgy<;hRjPZ&4)J9UVSLbPd*Li8;& zj#t5gx0#(>uO7y{KHFrUSnY5iQ0@N6dsnw_XV|c+=cU4sBcs8D_UkF3q_a)o2PEyF zbx!;+GWe_i*JgQHGt(zo)>&;KdH-r4|K=fgzy_@zMbL|azNlnsLrvmF=z&Dr_F>=o zOyF^3ZU?9&s$M>Umkl(GgqVraCNJfNUCn%G@b_nHt!Eto8>uzL_&DQ#UKq=` zEOCp8rf~adZdQ?Loa}6dzb~63LkY2ne7g0#S%1Qt>FW9*{J};0(eM>Uzxxx+Jc=Sw zNbr5M_&QPzoZD-!SVIZ2uWzT1bQFtWLBLeutjw; z$)QUUFgL}$slTMW_j9~~-^lx*3A=|OsaHGxyolndAN+|6ft0Ht44TqVo7R95)TnNp zQPr`<3|W_hYJ{+oFnY|oclbRNqpM?1ZI3)7DWPW?MC-KgzoKB4o$cuW)CsOirDD1w zYu)U^(;c3@$p6$5*I$McZuo=gLiFH--|M}MGVvfh^UWW1Xk z488s>afB{8n19#I#%Qg?lGX-cA!ZQ4>3`_FPJvUKpF0!VF%u(QnO~)ezL2D@n4T!J z^TLk=W9ioU>M>iMaW}C(=-VESzwQY4UB6i(J)vX3hlOv*D;9`p!YA;Jo09ZALCS0x z``9xT+*}tmjgwkb^Ht;=)Ha!3m$Ej3da-!tbc8;59KaUhVqo*5YWio)fbPmVPBcs1 z+E63@FJJHMU>@vmiQydDtYDEDw-;?c`FlUhl)EW~JP2Mw#)x;w4hND9y52uN1_s_U zbd_D{vg>WVjMxf{SyxjYYv!SG;qijw`Avz%TbMSMhM?mvIZsNd^g$c$N zjY3h7e`WP_q^S_Dy4f4fx-AJ5imltL_1J#=C9HNs((E^m&@8SiY?#ONNoMOI@>V{| zzt8Ato5|}rgG6+Vlv&z@Jl89_!mE$lDYbygNM$O9HcfPZ8)J&)hQ5)GD`$Pp07xQF zz?AEtd23`xy<1Ka)JF^Wrs@gF){X)*UPwPU%$$DHY3tQ6>{Qy( zI+f9}N*VO;dNX^!aO=whm+vK|KxofHRE+nIq|`WcH)SPb3^IW+jjZ=GtMEFhD9ZBe*g4qo_y3(B`47t?#J9n|fsREt^6+oZnYE|O>VMg+UqNs?XySy+NRDe)ZhJ21Dg9^xuAx;~ADlE4?&9K+FY zLY4OquJPQc%9&G=agFz$sVapHEv;W~Z~-$7(71afdx?2z$CZQEcPm+W`E#ptJe_EF zNs=>4HZsJh-4Qn(h6^Ly;cS>|l~Oy?Vb**xPSqlKMvd+md;Jbp5$L(AjPu#&qk;SC zAt$%M%wCWtQ^L+WOVlob&+GL-GaUCk#gJ^FLpSQBfr6E<#a#buo+bMG8I6`=zw;r!Zr#``Y6%cj7(T>{_-N(%43famwv!j2H*;aMnE} z3GVb9&|gq~f{@+%UQ0=%)KWoB_Ja5(-oZW5k!XrVeL$#1)yf?DPP>*7gtBIkO=2|+ zk~!gxywqm20328+c`k!6&&}#+`iC12b(fR~H@v`kgQjgjkhYliLxiiTJFyoT;X5wY zcxSuxt=;A-b_ohLABKbb?a(Jhv(SoLXjJ*6#VgC^Io-IMR~6zl(u$kjz>u4tzd>T> z`OWiT@O8#+O-b3Dj>Cs(NV8K4hT@nw0v)>J!1}~dmAfC&V&Zcm*7+tb&a0Z2n8`=t z%UU0!STkH%} z$Gl|&T*vRGX=^F|=5m3yDO-g-DW8gQsZGYyk=GWZYos0>I=7MG=mlij%mv9*cE`-i zOfyQu?`5;Xqoa6A?@IAVZTZ+GKMps-AN9#tA#vufqKlEtZ$svUYH7;UrL&7ymjs2h z|KJgsm=GK=mx9x=_IzQv$QXlsJgVYsJOU@iW2Aue47K{Mnr(% zls~)ux`ll{bGrQkeB|0MiR_WX)dU3Fd+OF-Ge_2T_8?>Be~_-;ZvT)7Zx!wtQpoYp#(5_i;Y-fOez&Vj(Be{*bW0QNL}yF}Evr-^v_z zz`DK8xp-uCA?9=`PCl{K9OF*$Cm#5y5;OM?SL#}a#eLWpBhNG~@!M4?Z$4jfC!=gm zwl??6gY&C;;dY!;dQ0gQq^Oe0;%f}`irfoFJIxYe)A6OkkC#f3**Mwr55;81L&Q#h z4uWd~D;nFML_bM6Oc{`GjE-N8*A4VR6tbVinQavNGX(AZ9ne1yAqUQbT+waTR?Mf- z(1^OPqjl>UaH%1+UOZPb@dmn)9aTIjh$&r~avj7?&MSZ7ScL*zE({Z&cFZKv6Rs=B*a|GANc994A_xCl+Q`(OY-EcW-Fv$LZe zgIZN8U4pg4tAIGcvk0PLjwhoB7aq8huIOyN z`E5b`yf>PB|DN`}Lu}QTO#It#`Hguqc>QFXWJDlzEvMW0boIu_)MOBy(+b7MyFJ?xJ&+m}|daP2c&rshQpR z)GHe(QM5MdovXb$_%7Y(vrNMUtr4Yjn!qiQA=ixG3GH;1o_+P|hR5akMmE-M*Ms|i z1zcxF_VRVeWruX?W?FoDYr)}h6sI*;r_srH#qEkqTOKig7dN0^n|V^>(b-Xe>rT4A zPq`G!qtB#EBi#=wtL+upix1#Ta)5CyiF1vB6@sz*`dEY%4RsHD^&B9-h4mg`dY8x7 z_qZ?9dG$;j%KN(2{QcDTEikCJ_Yp)=duVdShqLMXqUZcR+3_cbp=_-2mp(`Io)J~S zFAl*AZH*t-rHT3z-tb6K2+XM0&3jcV?|oi06Z^?-6K&(f?2Z{PdVr08yrcFtJ=|C( z=PdRx-g375e6xI@43*Vhqn4SE;3Yl~Psq70Wa5WZ^LtC`1H@ip$VdGCBQf)3_^>k4 zr8Me`cr1T*IO|7V`=tNF%G35Z>{6%pImj2~0Q;yab~CH1QLk2})BHu3Nua~R0DD-H z>A@MT%`-#?+5~~3RlX7mc6-3{YnmIpgXfG=rKza{J>QoaRBXcUsfJY*4uWc4>uX>f z;YN5AT$9%>?^qn-sI$j#<{O|-pa1DOuQJgXN#A`IctZ)`h%a1qXvX{lQzj*xYo&<$ zIb$i9ixGfSF3|K1a&;?++Es`CP>1Sx_`Wq^a^Se*?(=izf-dxS^D=3}sYHF&%Wb0k za~X?P_o-`s4p?eSoIb(zv`qwQMo`-^0!B>BB+T+wm3*IbheA#Hfnr))SZBHSAZ z4eS_C>y$B@v{{G>!U8*7kWc{peLy0kp=;NT3SR=uIp1x3KEH90sVP5~g!6&rn@eo8 z)nZ&OldlPLX+U5!^1U@L)6d%grvfNvT7d~YvxXx0yJV+JW z>V$;VyO-ZZvijEI@THu7SJuJ(+inZ3f0%=5tYhab7?M?1VO-R7eYBwUm2FEiVl{W` zZsI228CZIWoMRr6?Gcg7e9e7Bm3{3${S-VrdSRM!kyYZW<<7V>3@JJj6#^W}Q#Oyi zN%4)!(CAN#GA-bbNg-<&troPLENSK6__zm49n`e(>h+4tVQV~{ntLxMDPP2`Nz9UJ zH_j{E7~py=u6`1GlT;;)+-1FmlHe*=2^YZYYFIU}s3x(QEt;e_dp5GsE}GS;Yjfwh z7WJAw0GcYg)F&#+_2+-yZTA@Mp9OM>drJzdj~zNDCUWcYDbb~6$2~;H&5@&3F5uyu zlpzWm>RN&8xG0O4^Ei0%)0XknL?Gpx5$Fvbj zrjP@9?#yj#Xi7eUK;y80gEP;1%|p0ir#CX9vKy}2+TlYwuq!QV4cjgh&3SdJ;^KdA zrd5@meTVihq&d?MrBRe1Lvi)Yf8#DlpkWs*b>Dg(qi}a)aFM=VoUPy8)Vd+T${eM{ zn89PbY{>3iDWyJGZ~XnG9eM0MKSccm4XG;XWQ%qRs+l(S3R&(59I)|IoeUosjNqhM zul>F@wJs_|#T-%vEua08J4^~3u%sFcdd&PM?upyceQ%p7e}XY*D5+1vJLo>+gy`M# zOXV{DQ0gX?5jtyb$ECyt!sTCR6s&`L{8?GvqU`*yxEA@yX5<-_Th;O~_UK4KL-(=U zgY*m8?FK(arYzh(_X*T2IqCB>qWd2pI>l;Cdf9nyNZ6I0^fkMVV=UN4-YDjfAN*9y zuGA&CPxFNRUGl;+pIsOao{pxAW5)x0aySe1>=7zh9G#0S{5Z@B+>?cFp0qknz^GCS z6Bl=f@_agDx+q83L8Vgy6^e|c04=289z#@%)S~3u$sGQ@#O=fR_;%re z{piCv?e+oLQf;nbp!Ya-t1~tpDHqL@F!dX6y%tVVF(E6JmelcdSdJpCHb}2;}aa zkk@zgTc?BFnc!0xqF%uxtrDf|_@ll}db$DzXKtS0nY$x)?oyw_<^k($+OZp!^JV3t zqH5tCLsBDTLEhi8`b=bhnJ60o|M94@fr80rc=m=vRMl{963-HZnm{mC(<||dNX8Lw^k|t^_-o{YXWA-TsoICH6tPD%?-ZfK2mpkDK zHKi;bEQ?_1qCcToxpUrTS(0QyRXrj`DSAkSu&^t51+cny?fdvNZgWPtp5Y=K{br>y z$ueJ`_-D~ANmmIx-c6(N{tjp;N!Vgxu`cM@hv^ve=8GF?zR zK=wg!M(GxY7zq#JgTlCd*rj^aIc%A`z4T~MeoS~-L$7tAqO@8?D`jRg6LZnH{+iH5 zsqdFfY~M#4AN`&5w;;*w=>1y3etqDPDNNQQ&;*UP9xbpL-8+bRstIN`Gjz0UZ(J#` zb5V!yFAQ$C^iF*Ib-~qE{BI>0DIP2a8KgkXn8~2JW=rs(roFg(d+xQ5{G~gRYcLP2 zvpxnoOKx#=3VU~tZyiKjK8;euXsnS*G_BjL2ozE;;ozoD*-Id}SCnyDq>g6J?ac@q zYtQz3*CPn8_C^exl^@oW>{DwX=u~i8@NFfLedDg<$f-MYd#yOQ$?3lZ7x=P}MZ_iG zlJ7>8Xab@bK@qRtYOg5(K;I+!z-N9NsOl+j{(mxiPTW1=EDeEB&S*32c{p8cAq2 zL-QEor6gyn{fpi$?UZdOh8;}^EcDPo46s&;TWsLb**!d-^UK>_-1y-}Jcu(7B{I8x za%>O##Iwe=R|0O=hR*i_5)Ix4L6vT%0M7~P=zec>+bfO`jH5M3@8f!a{m`j4dquPR zH_iLI2iDDHSElfWyDqG48tP>a=%I z?|0#@f`xRF@)L76(_pQ%Z>Qxv6_p$PDKAYWr_i7m@tEFPv_LU_!9@=I=3%z%KRi(a zvdOJ~bDuJ>*^y(lGt6XAHu=?Xk)O;_{6Y>hK9su*UW{^45yDx#At2tg!huQ5gq!;z z=bqLpDqHH1c5Z~|skW)Z2r0{M99}}a3r3G4=*rc`o1JiVEy*8&!Ih^?7cr;?Jipx4 z{0FUX?VG?B)}wPC&QD1c#++01q;9HUv?#Tm-7)jMX=Wt!dmbh zpWusIE@O`jmu8<(HkOy4|CEQLZIkXWYm;jei4t+)W!kBf@ML|H#M>~a`_~=ee(Nt7 z5Lhu5(x`IZgL}P!kOziuX$zKO#1s-a1Cbh;&9=*)O|~Ff4w8+~ZmwOZ^Dz1y@ATWP zV$dx^85>bx^Tde_2v(gX@_Mn3cl{)0J=G5XYOBxqw>_xj1%gLdZBTu_JvfW+f%)lQ zT6o_EhwP?1r+_(RoXlrqNHAfIAkVipcMEJPD13cfBt*f=UozVzQ9$;r(#tyc5g&fB zR6ilW?pNAe=MIEn_5bBVvx}U`Bzego8U0XWPM`I+oCWeI9UB}|Nrep<_p#0X>{z5% zD8~JGTyqiSu5rgWKXX!=-}6uS-5Z-b|AZK}v-F%&S(6 zEPe;|5fF5G|7eKpC2P5Hu@ zxXbm|NgqQx`l7Vy%KtK|P9APXPkOJ%QcpOaCG4i4Xeuyhb$w?AR-fN-UTc)L+T(FQ9VOHyPqPrC? z)grB4n=O;n**2AA=1=Yq=_l0n9+A}L**0X4Vs)YqRQZM)FQPynYW>(j->PDH{cQA7 z;z+-c0;7&W{q09lboEzA?YUd#mE41DMVt~D8t3GsmyBw{%2Er%A${%Hx`|B`HB}X_ zb4WWqF+IsX-IZd>y^L-)bxC!Neb{|%Sk{5uGyj{FKk1Y63yBbEX9|}MiAnBb500$5 zx7VE7F)#S1oo?g71etXDHPL#-%0NfmLs!}NCqH}lU+8C*GAJsH^lDL>Wtj!_RD`?< zaHfiI*blCmi>&wQD4JTq$*Z2GuQTg{;sK5M-B^^eh|UR8=khTgXo>kx50V8|r;inV z!)B0AhurOYjrd+-SGDpEThfjoK7#SYCsMWY= z>P7YkL5+9PBB1LBe=C7)A={TPH?y=;=u%4D>q4$|kgI_0(cn)AM?EKQC1+_ zKtX`)Z&cci!uc8Au;pf$*HS*@=7AL4=I*WYUQyXMoirTQcf1}d?K&q&=6^RNvgi~4 z9t^(us$1rfxe|!T=JH|w3pv*Jp|}^Re$@y;eC*>{b4_#10U`K_`~zK|CXzznaLMSQ zM88*atx|VQ(@>+G8n~djt&3|BZ!4f%4m(OHQjz<96m0ixKXfpY-=2VC!R5^CnxF*( zwKtBn{gb*N-NpN|qeQR=g8@KpQXDmac0nBla4)}2?r)G1c2LXIoX%&_!h&k6Zlxe7%cZ#Cp>b_Z#CMUt7GEg2T2-l1VO(=3oEh!?bzm z&>D)f3*B74eq%kzJ2tBGupu3k;ayq}f_rR?wA!Uivbkqe^h;{{pyZTmMSYNUz2Mam zlPq15NX;Kirpnns63I#}cUF-qq?ssZ6s^~quu%x3Ygls-sb{0Yz-X6y!kiPgQxj;a?=n<*Vp3XayHTD@# z4+Kx|fC>H$%O_?rHA%z&Yz09}1$an>(m!E8bJm-s_=QF?#~{aET=lUZEd(p8bHhpj zbu({YXPZHzKrr?rBoC4T4@#lLdWUL;K;Ark!9`|;78CR+3c{Aad~tXIOpgeA&ZUi+ zmR2VTFF0z@#$LX1+tqA2=K&wrCwY7rOs`~@J&hC>7;KjywBz(^PV7X=KY0fLj!^;d zNU((50g-@?a%j-(qJH@$o6S?V#vV$Rt~eGx3rs4iQ#%^CdhWq<*{n)R76NFhMkzy2 zgK@sU(m#7#K)|0Wm<;q)zB8p{0s5w&D_Wo)z@`@%cpZh~--IGAE`9K=mSUS+>^$Xu zeqW8$3>z9&6tWFNnqJ{Fn?-b}uvg_^%?#7R$a4K>2Gf1aBgbo%X^QLwIP$>pKBkCB zLO%UxlLbl3sjL+HZNntR;+Q;`GOG0Z>jg zmlY&Wc7YiVVHw`nZ>%*#%7Fo)p?~SI=nfO28*T;G_pQZ!sD4_62;v~;%j#8D z*q=JSpA|d$&6QQqBQe9VjC3 zh9o2m;i>M00DtxAVHEMw4=N1Ew(RWiY8FZsEiB`*$`=+<)dQB(=hiOOK44XwAuHy6 zamDmm^V<^NVe~SilUnwr*1p}T=C(|B@1tT~SQ3}{otzI=k~-!pS9H;5pCu~&`THa+ zXa0_`E<-ZbP}YXe~ecQe!#dJ*3NoDRAb<jpsxKx1@jJVeo=*MjpnVj( zEE$NdEEJSe@?tM9E^x};X)+Cdi)Cl_Gr!OJ`%D@q_N}2!8|BRZV}VzIPC8Y)kO!em z{P`^`La-O-bi^C`km6*B?ZZ!WFi%7gX|RYiV}ZrEO-+!B^(3vWxzlZorFZ+20AI16 zsk3?L%H~0FvcJGb8APAmE^m4~a-zvw>U_+;8Ur`Vij3nQ8f~P81WH49EkQaLNWm1t zM7o0H)%p{oIs0dG`uoluD3^0?Iwf0T$HO77n?1>O`-8||n5atn!MnX@D_5(>O2uAz%5r!#A7&QQqQWT37#AdY44R=aACIL%i*Vn zD1kB+ac@8e(U6LP3w*FU27y+5TGSbT6Xg9MdctdOHFnfeh0^6c%2ARj7G}QA9~p!D zIC~01GSW-?fL3JqX^ZaW0#x-9tbHN>hA|#DYRNY)Wv`;MB7<9ZtgUO&xL38?#n?eZ zq9(T;=Yh;D+iyktMfRK~xWASX%nuWkI)~qU38o5S$uN14?kQm(Dnq;Q^F8fg*cg>TA4oJQ%ZRlia zmQib%rxv0jS0I2m9;|A*qlIusT~9EdAgoJq@~=lMuzq?k24_6H&Z7^>VHNKb(zxxh0=$Op<-76-3k7Eq5H35 zhiuHU{rGE*qK5bYJtPvH6!(UZpeL90y+hvpwUK~&!I+-uL&=tfRXk!4fy7<>mg0tM z5gF2*zxlCKh1W~S3>`rYk&WRC+a;pEAN9SXOy{ff`2gWH#@>(9XYxcmc_BIEiJg!E zP6c}dE~s#gXT3(@VPW28<@VkUawKroZ!OpS$FM`CI1r;~oRo$Ph;w5?P;}beNgZMjCx#g4!?? z!&LY_^-$vBc0N2cSQCj6NAI6f>7F|H2m*!)h5|37#U=ZoIu=U-3d-WF%34!MX#A=^ z%z5PI$)x4R;g^Y+YDSs6oPji3g+>0T4J#P_qWe_nY`>vwl9pHQlJRVc zPR1Iy(h^veY%P|fu4G=7Z5WjeSRsYh=RsxWXQwHi@)BLmi+_`^mUI( zU$+l*K4j(~_z?KfLxfLCT@_ytJ?ZMMYwP*yK_XV#d1PFJtFw6I1t>;5UZK!F%l^{B zoxcsbS~yjiQVGh|!N?pHqirr2u0JA1#vzF>YU>%X3OYaK9$z?qB)*g}h(%|(fe9YD z^$pD7c%k>HaPB?O#14wkq{Zp9zD+XCE6<@^w`@k1H=u5Dtc00Q~_-C_jie3UGaF zF7FBlP>@V|{o%B^XZAV+>uOr0)LlGr`=^`Ix6(8T`ycn%zK@%6cAl<1P3K*ujBRi8 z!N)~r8u-{Ah=u5rVTP>-G0~EN*`uRe8YKQ5eSA+7LpC-NM zR!QT<-p-KjZ(F@#BAk=EU80_U`f)b$R91 zh&lcuyf`*4ETc&Jpjx7JH<2{6}dyAD#bMhmt zPI(>Lz@=zngFxv1B>?~l6D4YRAPv{OE>!)`J2ZV~?_1<}%&vLDdbr%N0S-39S+h`~ zf(cRcP^+)rJ!-yW2ejKSi^F63JjdeYhH`?Z+b?c=;Xd+)FWpscIf$x9#ZzwLPxnvy z_CkH|4d36FMx5ObxicOgwbyScPr0L*n;yk+upRv37iF~9@2s15ywam9M@lgmuIfe! zs3Pk`TjHIXez0JR4AVjXc@(8l4M`^$FojP1_1G2fs5i0YmUVaf$sgd8zbAXYaBIJ4 zaPR>700;nj0HD7!AOJi7@L$BVUm!F9U;t2eK$t$@-h6HVfLYCogCVy$$YXoA5Y3@xh)+T_)!ZjoX`QTufJRt&hP{XVFZGdlq$*Rk~GED^ZXW-&Wi7HPzgu`!Dy4PQ3K<( zywFs-+cCOHb!UPhD7lO9((Y{*j!=gcgpO^J>OS7vRtGo$`9d2+9Y7 zHHKGd*OE#6pc}7nLfksM}n%-ekpXs9W2`}q5{ zEbEwW#6gl%E-O^p!L*8bGwJHe8J9zh-kzGZL391=oYs!L)pafLQvMO*Fcl5~V z8P%27S-LGoH!k&H^)dA|?d#{)$hY+~F5J~{>%X@JKrQY*M_fE_)pG$f?6K5069Y9Na~@+#nS z0P-$QE0Apf_%5b9FmC|9JasY(ps+%?<6pynNabOge{IbXu)<9LaVpT3DPEL9U^*=3?(8-QjidsBtc1Z6$#8Uo~1tuf;mQO z%is~(#lMW=AL2{?V^&xv=Sc<}$2v;M)TJqLRb(@dV3DdQd73}Am}nGQN9HMxb=G-# zr1r$_3ghMHEB;|n#2O4|ki^)E_8lfS%5?A_E;uWb<)9I%n4@(D(h+KzHG0J964jf9 ze~iP-T$|K1rE`k)822_FY67YVR2jiCk*SB%(5vKgHRNiFxrA~>_sa2^lDJ@Y0At6_ zrkZABE1uY5v}J3_tQ z3k2`W+69lAQDn;SpoXUE9k0czguLi|uSK+m(&}BVHRGn08((njr+{}S&5c6eFLo!{ z_IKL_eg*0Fx7!7O1^xE-L#Pu`Owj$;kDMWlry#A2&?Jn^AXJIyCWvGTnH3_{ucL5D zzVl-xtWy9vmu)W7NW_Vx6Y-4-0#ENeBoDx!wAO5+I`eAtbCnZg&l>bQ+t6kI<$TtO zH?c-Iag&77e3CQ?)tG~03O7lQ1!rbdYJrP|UV9o|QR$h?d$z9$g*qx)L#Q=3*C=g6 z=_S`pFZ3C3NmUi0<4JEoR%~S^pFEpipu1D z)$y|YMV-#VwdIa8CC9F{^FrIy*3q@dOHJDF#2)HHIJmBqU9sD`*M-@AG2c=TE(*jt zm{QO{-$;CL%s{NcjlFRz4>uMsOphpLfuaHiOWd+3dSTeyiTX&+!QS1byO%d>0?{8N zB@oaCH}>eW!#ZxUy0e%`^UCxa&#X-|k4!r_%w;oQ z(xIgY1P0$%akLD@E+c##$YY1f*wNGWH8&%@9QbmFDqb5!Be5>|&Z2kgepR|Vppm|@ zzP>&)Yp$Y&HsXxkLrOr#8z?XWw_+Mn;B2Je&&{XWp0c4X@L@d@eSk0^w-NMzrobJr zDh0UGS^^=oLT;wP#%fzf`go1iEbo780mSluHlfSw#md;xacA>VDUr_4jYU??O$GNU z^)Z1@Bv454(0gvCz|5HcHhoaZkCGFY1 zBL15WE8sgG9YuNgTVz&AlXQ&$II(fOm!2Y@tRSy=SLju8KjS`UK^)l`*NLo`tT8U% zU|D=1d9z;~n!*8&P5k8HnBb=2O*>FS5o#7C*@QZHb1Xy4BTr5M!liKVCvG=)arM=M z8U?^LX6X+BpA@<{yENYyo1IdlpJ-HpU4>n7RAkW)D(PuIug-iAL%F0`e)}P@ zF0wZj%WDcn6LE{eS8WHGoHR{ha49V_Bot#VlvD1LA{&u_l0-J!Q1QQN4_X1QXS#rr zg2+X9qy3Z)`|n|rtIoca2a%&xz(1V-JiIFc;tJdGwsYL94|b4K3eI^fjJ9XD*}nI+ z=EDv#tBFKY`)FH(xHhSlmhj3iZcjN~xq`?5`GE5<0N!e8{_K7V#(e z=I56iKKyZna&ofkn~JG-0Jc)UrJq*`6mV;IXx#^DHUv7@-V++5sMAstmb*iJda>x6 z(C@R>%bg@3ZO#uREUef2(gtUO6vur(Ou8S4uezfBpby(j=$gTa$6MA$e!!#QE9*|I z#&MsDa|pJ1U$n^}uj>$5h_I%mcmQaId6-j$6N69KAM!-Bh#v?OD&g*FT}Iqg+Az;r;Y+l zV48VoQ)MbOdayno99glE@g2}(W^E2NfqvknaGOAIXTFKq+NH z!Z7V_J?breAgSDl(|F|iVp$zj9@(5~C0b3rYN#PUsy33YgKLS5K^8B{MhH=`Wb%j> z7Gf|--&xy(c;HwXfr)Y*l00V|0KTIcl9chy_il%DC0WlCzm@n9 zcWe)LLL!maQh};T2yI3B@`dG&c&yxQ@vS)l?o5i}2ZF_lLpR1bFVTWou5F(4Z!AW= z?2>bnsezZ4QD~%dW%9E0E-T9CaW=Wkn7b^i-m%Kfx5(*3pV-DtBSS7X%wX)-0X!LF zw9O}}cZ$ASB&ZjmTIIH|&{h|oQs>9D^FE6k*loa-@^tWo3F5ewm&uGbg3nK%GaKn0 zbZ`bd-}1{t;fm8#QUPZRhIZQ@OaD82^48c*!Qi(G@x!&GkiMG?E~rHx7LXbRC(8K1 z;GS^%5w>%3AgucVn9PN)`Tu$>_f9Y5PYBcAPmbSswj@6yO7A2%KtcxS@PB&F0Lmb{ zw|Bg^Z*d5vueWy>_AllEMl=QoW_+(8Sji7uw4C3-tAW5YFAO*aiZ2tx%xg`5e7|=< zf=obw0jGGZMEDs-yrRB7AVA3){4dh5JD~9la4kLq0@&@;QH9Np_5F3+`v3KYHq5qYD-Y#wFh@AZ(B%ghdn7P!NxVO&ElwQJDr& z@A@T;j+)N3KB|P4IWA&@qbUx?2j{827+bW-S0;k)G4=^rfZ|a(60qMC07&LgXyy>R z7?7Rn5UA>qy&Mom>`~cnA?R*teHFCU3a?0>4L*{-f|499n>8BJeiK-})+cRM*Fe!o-Dq1WG4@-tk0yb(LOUO^sTAb~&`N$WG>&uuf99z;YaIO1;F6$h0 zxGN0{4J%HoPMc0+PD@(7Y{XfUspMLb))p(W@7Le;+G*kG^$LKRqFTa^2_lE+Ln5FG zH1d8L+|7!i=QHXnBx9$HuKC;OvU1^Z%=YoHZSfn;YE<0kIoKI9_DzW63 z!1EoK;v6^Q9Pi^CDSsq~s>e%yQB2MKZ)pI+rQesDqqFffFfoyRk-OgyI=HA|oCX^0 z-7rAT5NyMCaUnWFZTgQ58VHbzK;=N;LEQxGjqFA2Wos$Yfy!LbazE|MRbofLih7k4`WE3lp!O7+LU5KeMq#~fmqCeo6J6Q*)nzcOo2v?1pc0S z<_^m4mLcyJcBdiBxqj3PpM*53-aM+MeR*_Ulk37-r!r0TLa}OY0INEpUA5($bE{;+ zxq93s*JggsQ~1QIk#;`lyaup*zJXIriCgr`x*=8pyGdC~h7^u0l-N+B2<^#2$VqcP zvhUFh0N7&O`Is?kjoLW&+87YLAqSWv99hHA#XURBJ-O5)y3{=s-6M|8Bg+j!oHRsP zw=^6|l7fkRMMqi7$;w)$D#L}P<$CY|M1flxNKP^B#G+S<`OxJ24k*SWg|t&tYrB-? zW{Dow^nqAF**n4k1;tS*d6fK>X7(6h7jq&s3}leG+9{0 zAw$TQbYXlM3Vo2_vCnB0o|rl| zTvIBJz6|@Orc-#+F1^(d!*W1UB{rE;`_r-X#RTSZm^t2GGQEY684MY)iz-&Fs=o)v z60|CzXI++58biO5u04{$j=XV% z`L28Dc9<8(TXrv+AV?yaGNzWl2~SbqbvsX0)AiD4rsw@MEc}9Tyxf2FuB~x0$A6|Ji!A(QdhsqoN$Q!l7WfjMHoz>v1~X^8`!V z+_`Kl#dJk;)7+(EDhCdp^K0=a&9+B~c~GdpY_DVFPv62V`=DT=x%l&^pMbrz{(mm# ztR5UeAlffVJU>VhBtq}7HBde%fahmUb8LG_YG}aU;Dp@x+Vr55n4F}B!ltUO;*5~C zvbv6zu(;Biw7jgSilXGsz{>3U$j0b`#B$C25A+{!Y)2^cUp+28O`?PRbgXUxwH+Rp=!&`}1O+oK2-)1yFUimoxl z)uYrVxKWyG)ROLsu%Mwath0K)DXvj4On#XXH?;J_83dE3v=HKq1XoD4=9Hb$Q;KZ1 zdd3+E(Wg`i0y9pQ$VAb(B=x2wC{ygrdMe4e`q+e1?}1c@f7p6X#CVETr`!X4CnO#? z5mx{pw5L#-p_whDsms9uAr5hiy=4^Lg{KGWab_9L?oC{5rtOpmn1g}Ft#wSt_JjK< zWE(83ApUq*_&cPsc%h0sV)&iQv|H&xfNvj&deJjt*`~N@#N4^ZJ+*7%#rCUV+`?0oFxes z#VA7IOHey}rEGLe)G29uQu_9Dq{ti3MQpM5XKgIwJ6DqWgPhAPM^M#~I&xNFMufp? z6<5fE{{-*~w2^7v+~*f&WDg1^+1Q=SGourJOtFSw&g#q;kPED@!yV8%m_?BIx3xf` z&L*0h*_KXs5FfZ_uKyR1TkH4cg;Qg91~G{H+5no!cZ2>ZM=%GYempSRTHTmw>Z(Z) zgu?e-Z#_*jQp1!hFS6MX92`e;5^~37^9TZD;%DOu?+32^>>ouqF2QvLS&oD39c}jG zR%GLB=g7*1>3FAQjuQ`|+(78im|DwZ!Zhu=;TVPk>-rI1l5V9E!~PcZo4YZHuXJmXS&w)mN?gKZXn$81IO$5?I zL0YHu3f15lgTDAqh3)|+QEt*MwuGYYODLO!S5(XAbF-T|$$`#|#}2qL=0`jQ6X_3R zAowK&5IKN8Ukh~{tJ43(AXSHykRy~sBvlk}NXnP~sh}4tpw*lksRs>{ub{wZHkmJ# z=!D7Yv_G9LmG1Zp2!+OAu$XQJODL60rL&lA2Z~6gR;f3cZiUKdHD9eZne7A!iN)p& z8cTD;5G$HZ>$Ex_t;cA&UGum<9bu{@j~C5UplVwGqW=MxsQ<$R?`1?v^3^Z9(0SPkzN7z`Gp_255- z15)WsMw{VEjt4Yq&3fyha+Zt#zNO7bHO~he4yWVgU>Va1t#-TP)o>Np3m&)U{pC;v z+YPVx`~B5OP58g`*5IP##^}myzrfu;I==_?{L?Sn<||FHO|fPhzK!Oo9e2@ZN~|L+ zw`mDEg$s-2+EkZHGhpnsLDS~iC8pe`?31ot5ju}GD&42dm99M*JC6;n?Wf!qpIssR zw^cIUr;HgHh9%|&%)K~F)B7|((+r!~w&M)DfDkkd>xkl14cm|uRSlb%rezJgpcvLQ z>!_;cx=2)OBd)H=;*_mMdKuCQYct+o-4K@Jx@HsC^}KciKn00#7#~D!Kq1CH%nQeU zSPK{w3WLpHIoS%C6w5vi(+~`S{6~_FCz@fJ8*O1P{XmxeEO}v?eF6_HK?JPr@HLQI z(dUdR_C5ur#QO?+=RKBLRAbkR?{!Yjmox_|^&tm;a8=?@$EpB_N%H)d!#cY-q>Jz0 zP|NkQcR2)Y1Yr~aeiZHP{p;B<@7XXQ^xemf?2f%@7?!JY!5lCdO^{&WLE<9gLzLvk zv)N*?JU}7Q=nQ(3;cQST)k=^340N9RaqJuK+cET=&)bQ-BUmG^1+DGpShubdANl7;aGW9Y+k#XhM{sM}`67t6(K$ARdRLi;RJ zl{V~Rips5R)N==_zUo2WyL;BE61q4i-#Txz#z9FbT?y)}PW3ViwxL>~ z0mjKQuF?u(-UY`YFNuwkz8l)vIRl4b#UzbhNyC zuX12_u~fVy7mo``N5y9k(}9OWW*@i_Ghhqa5$W>YvVIv4Gfk*`Bd&ZWSKsFklsi>J zCyf?&By_Jw4t;lN71}E0(^hv!?UFZ3j~9hX-ZG@Lrh8F#=I@8tSMUg)zRnR&ZM5T+ z?tI>3>#m+OylvH11G)DM`qEhicQD|Bg4A5>3rByJ+cfd42nUAhYcday?&T4W6}Omk z_io_(N(0F`QLv)2;I1D-W0Qx~*xn1SVbJ3TkM7X=$J7!AMcAoldZL@ue+cKcBCbWx zjb0Vu^>SPJ7B|uJF7Bmte5+30MQ5J0zO=`lxqNsqG~lDGdqUgtEvrTmP>U829?}&t=p^X zFgqi%udmGVI=RN{^ka_`7E<0sz9Z8bxvz<6UlP>po)Y{mJPLN<tNU_Zh? zq?&Gsil57+9up#eYjyDNgr{cOeJkQX=rXJQmQ83Xgtm z7Bmmc^!eT_A6}~;H|+b!LaiUje#XbhgT+ty9N&J@_ujK+(H1CEDFsRI>#gz><~4dm zg|c7EvB-K_c!Z8ZdN?#>pB5>DM2C-2|6jRu?Qk3vLhz7LgFp9;2xaL1OFF8DbEEx| z;tI~SCEiu^yw1v2p}--9wDX=qMqOY(j9eC^l5Q1A%ZesX{xFQ| zA%Y$hESfd9d(R#v>25wqJk0-0{|u0}$!vYOyXhQWJXXHd{RQlT*kI;IPR<`Vf49XX@pRgZ9ja2h$IK#oz?;;sHmt?@I~6p^`Yov zcwPtma5^yBKVf#i<57d^}DW{}Sy?13A znS6<4f|>W@1v$}!5Dl*71A76{>bnW}rbINgQYz~l?4H_xv(v*|{mfpKUh~0j zm4?yiP+_cWbjrI~lyFY;k07(k$XP$=ymaYQSo^8h?i*k-%ta!fo{G$?l0XvG_i&%W?PSYWux(ykS_}%|KMp@W z<)&~0#-;knw0<3r3(?4 z*Yk~A<-_*ij5(y=8~wFrlVDn7#5uEM7rMVtLaA5r15}AHk^OrfBAKiM6fgh)-lOCD z&H7^W@_XikL;v2u=;OD87$vSjj6^0~oNGP?#zHsCwg`}XbtGWr6y<`bC6wNJSQZHB z=4Hd`3AY}};pb=k*8^dg-aDA80aWB68r=a=f`9=k_yPFoE)Z%ot#3cMHK z)(#DTfk>>EZ?JNg4@n$~F(@#f`yaGsP_90EIuu$^%q~e%(%D3`sVU<`M%ARjG3-N> z$|{aEN%NnLfUB8Uqmz28)vZg3XRx$Hs)4D4W&4g+a^CV(@-rTY5i^t2oI4>gJ_0q4&m$)+_V~s+!Qg% zQj~vGk}}1yi+vn{+S<7_eanl~?kS5?GRF;$0v+W%3O^NDnqt=#u4-ac%qpmsw9cWQ zvPdmrQ~9MzkLHdoE1GiFJ+7Eg@?nvCA8Vnk!9RKx?7_6bT6!ODX}w|n2*FAC&*ZHZ zkzvJ@<~$qGb41zZoE}l5R)_B#yf)F}hMDdhJ5lk6(eHpi@qYeGyYBvp6q^qL9MHL{CrS=~6qy`BE()|<22ZF%{4Gy3BA zw)~0t;Q}IRBBCPf2_zOc&X?u_L`?9Xeh`D$TESJKY=mkE z_`yj+1g%J&A(ef|yM$y_q@vJyn6u1BVbw!^JZinfn=!lJ+;V=js_ehDCChWin1ykx zuEw@?imS|LA@rwXPp+;sUg^97zBxW@iD=hh*@J?+-d6)tHmgjTDY#>Pr>vAM$0|Zq zl8UOO5lzdS#$2tuD;QV2td;{;ijL5(SzRkWheWRWh2FDEYA3w5-leT(Te+9~wCRbX zyWA@VyVjPKnZ2}oGte_&I&=I|1U2$p1pPi6yp&OK}iH$00JPf z0%G+6FyM~^n)Kn>VXK2ic2Qp;z8T9hq@`s`0F<&VMxu>n>qRs&a7TDg5}j;XgEk?r zA@jm#M$!&Y@gAn$Y(E9RE91q;DU{J`=>^k?ve9gzYla#PdF!%A!@Guf6m`oQm6f0* zg)K>*QeCCci_z-|X5v@I!H*{HmEN$WAs>1b^ZoB@cZ4!0mq}E3MIpZ z6c!<4grR2zoR!8(8Wlq+p_6&W7yR+r(b>^2@jfxfu{6=AQLk~kvA(g(@DPbKiv)_K zjD?LAm?ato8+{w~9)&BFtu-%GBA3q27u>(ydtS$1zh6UMeP~)#6_^^I*D-9mTs6E3 zTNYPNKOU_@t({p)FtB5&hSijqz_lnUk(ZS&qH-3e4b|#dI=XoJc=hw#?m4m-dNYo+ z9eDR9TLDaK{5S_O4#G-;X{yyU$wQ{L1_${LX&zIm{6?1D5|nv6%C$XS$XKow;*n z(UxYN`Fdu4A8hjMW{$3h-dJfep2Y;uf&{9YQ&LusL$z1aHV?J8+dAdZ$lY`?M!2W7 zyu5dHz1-M%tz1nU6ci8wK`A0BN)SNC>uy`Ii*Fhq(iQ^0-Q_J*J54W58$VagZftIZ zw#c~+l+KC)!s7ru_7&}(77DUu$asfDA{CU^=`OHiD*b_>=9SCdK z3Hl*~xQ~U4E3J35m(RDf1R3t|YFYWa1kmNFfD*z6TVHs~w#S#Cwe4}tW}L(0_ipA> zABRQexw{|-`rF|QA3FZo)4v~EpXtJl*W=#U`>=16{rmY{W7wLt^ixRa8^?Dv3SVEj zmdZ()7ju9rMREf+D2d8hLt|}sS2?)i?DRA})6v>hlkH}wr>EoOuq^4-t6}-9+v}w| z?EI=2?N&&BXQLvF#!%!py=HAnA$4>WN;Gw3O@P4eIGFep=lyv%f)*9@Sc6P{3go|T z4+WkU31XHjohehcJK0s!^ZmZQ{D)${JDYjx4~+hivK%w=~%&b8TAF;M2z=)q(3=yLeG2(*J0eI_(4NfT{dzIl1YLgNjOL3s2|i+==U-#6lmGNjjorL zk%2|V#fl6Rdu8Qghd0fR?h^u2%rgZ7 zj5=DoP8Oq}1`RdqnH#5VzFm~rnAiqk3BkvTTEgXGMeG9wAzqmBw zJgy81tn5Pn;jsF^a4>-`igxs&hWZ76i5Ckw2-f`D6TV!zkPlL|T6=ly!bu>&a^Wl) zXt`n`8ECp}0cLTxULhRmS17E^t!dk3?Avt+Swxm#D@$GMZ@IagKST3*q{b}C)KX8+ z$A>R_xCmRN1;*QfJuV^s0JmaAvFLMXJa9$RAc0;k|K~vT7(1dw9(oA!4}Rl{F7I z6YVv3c{PWtPBnXf2~V{~1BvG1B?{X8i41yLMZ_#n{$KZZ=-t8jF6i{hNAbkurZ_coZ z3ELc%166D@o*>ab8c`!uRNA!OOOE=9#U2uTv8IINGi)wSyR9fJ_`l2S9RrEDU-u=l zD{E!RXELNL&^ChjDN~PGjJhvAI91rv9STm&BxYu?U;&WBNEzQqReUtl@bEUp9b1y> zl94HhXsL#h{mP2bWYpwC`@s~@m)!Laqs>G2B4#N!|1yDE}j~>b77}PNzdYxbT zL$j``C>9lenC{YmIdL_kG;>5+yjtLz^;6bxb7J2ZPCYF>_Swnm{W@h zffoE%GIRfdL)ifUb1|dbSuqiK(a&lnmBn1GHcRGj{=$M#yzH0ha`PBuQcz|D2JE{Tx99@?!K>3C( z?COjCP(C3hzhfd77@G-vDAz+7LmA^xJzJ~4qMe|4&C+^Tv|iGC6Q|mQy%c$e8YIvN zcu_1^_f`hSNH9d!icp9mmn0e*^fN0`%c)nPNFkNb)zXYM|6v+Z9b!T+o|u?0Gc!98 zRIrEk@g@~I;%+TE#!=?nuq*haJ;`9|sOUWt#(c)xRt-^kqDWp26?I6lR)ucV>`QH| z0B%{eRW6rnBB_MZKxKq={pa90*hUib5Gn_Gy8|)`t*lg{7gPma{k=yb*TJ5YhS){O zubtoR)>HJ2rN|c}mqL$ez+G=w&A+>*QrudOcs9GM&lg8iZp}(|dJC^C7dQBBpU9F= zWn&gvYm`r8;@OWB;+Qf@nNYU&^A;yWmFKr%1)^u*60yke3C`xdruu=S0Dn zHEWizn&MMs0c;=xKDU6<%uH?D_=wSmDOQa06=>#dHK zruB3@d<+Z>Iqa4^?}sTiIa{{hLgaTjG6CDF71wz)nZGk?3ECp_iTSsI#_6`np zeSFbI79N&)XY%x`TRu;eZ9#nq<8DwD-ax6TOs(Y8%v$+2TcS!T9U^hkk0YL*AkJuG zr$7~j(A-?@IsAJx*DH3NG!8 z(4AC&8}}|-wPQU`nwQbxa5@Gyl-T;Z zdfEPoLM&GiX{bEiGG#nV@o%WF)=c$-^G&B8(xKjl6=cX4UwX?X{ z9onZt#eH+P-izWybK*&Yp>YVSM8l(C8`@f%QO)>_vS)U z>NaUdNR}?W;t`Z&)m&W&&n`T>^*KV4C7KSm8{3__!m6sK?*4y@Wyz8>SS2>|{b)H`!gYk1?#iFvvqUh;x8F-j8o6*bcc4`PaZ(5y~Y+R^4 z4;wh238#OaeJ(6I1v_m_2?{)0KsdFl2-!u$H9H#1NJwTrxq@_k8{5dvA?;it0ys1K|vv>J($ zgxstXc?4laMUTr^nEnEytd24@ntmm{JHa20d+HAy1SIsM?)w+}8_ea1a^nrrdyOdh z@-bfhK(&?9fbTy)AJsrR08>JaUsmDeCN9c>YZOG&l#%0bj@;A2Fdb3~s4G}tOfHt3 zEwYR=-i4sTxDe18Rty{;>#Xw>Z+wm?xu!i#==6YIGDMP&K4lO*;vp*>Uh$0CMg;tB zFvSR-k%Rw(K5W>;c1dD0rZ_PwqBy=cdOyS#92bMsR;(-(2g!?t&g6>{QY*pGvfsU* zm}y1!yyh#dNA%0Z6=4d_w3=rwH;QL2$QnK~Hy3Gx3D7S`{6ybE>jAqK!vI;)Ir4M0Chl$znD&n4H0ILVjmM`m11Lrm5HqAtm$cHac=sF#grkL#qq#5GK(--$SUSm z;ufi_V*lo6^NGWSd}8e0XY2VyXfEUu<6?@okV|aIx?HQdM2Q^Aw z8NwLCBx83sG(Xo*cnsF(+6iO9PDp4~8PS}QIhR!XA7nUsT?d=szp0Vp>kaS{H1r%PO)+z+m z$YdZ|Yb|3Fo{}x;!nht;+5IozH{eJ$fZ&#&_YU3?W|!_p70WAYj*A|#BoX@ zucy%j)&)wSfj;$E1|VWpNYnlg=nloy4F0Q zWzW*TgY+LD?TV&x0kBl0%q)vMxpkX?Xk=k>GLcP1BUufeuSY`uQJi>JM5)I`pi?L` zd_JF_nusZ?+V^I%GKJ#BM#a*jsRKX@f+ihX2rdSrMqC-yOy0pV(1H1I)0ig-brn`K zpN_dk$3P~BRLZVSqN1f|p2cuvG0B-4>Vf7s8IP1s#zG+@COqm4T3V1TqTOCl zsn+cEVW8j`0N9@33k4i^_wKz(pGS-WTpk~VegVvT#*vJBLokOifUUzp-E=u1e_b== z2Q!YaUJ1*SLqiVRg)3LC__z|Kjn$qGW{#dOU=5L$<{ zq+aue^(qKWK1*L-o3lQaM)}Y}rKZAco}R`qOb!Vp{!+vjr%+T=i{hM-B&nU6zUiP2 z)CroQ$z|Z{R%I0s=PeY8;9u<89iBN+fA1G9O`+eXk)J`Xa8FLU;V1TeR#1p1ov?BL zxA?DK_5b8Cyd-ETDiVR8W*p~$g4Y3{nawQ3%w_UeaM3$6V~*#s$N6|w;1c@O`G(DDMO_<2mKjKVn^Ef_Z&wWk!TfY#I+_D@Tf$kTQMT)5!c1W zTC1*Xb^BO0?>%|p!i9I=?%u3hUc7i=f8CO9bLZ7}7vPwf)7x0Z5I?D~gT!Wm#y@AV zw74vw=!uH;C*;q0!u%8Ks9S$x_Bl@|)}Kf|=LzNd6XxeUkywAC{2NdF20rnd0MPLh zW?)NeYwNCd>jE!F>m%3e^g50V>CKCe!^^3 z@;onN3>QxJo;!E0_jJ!IM^7Bv+p@tNR~jzf~L);W8$JD78omzy2uvf zh;LsF-I5lFP^~mI6Us_cp3sJ3%9H&fQoD4?1Sz@cS^7&ze_5pME*Jcav)~h~t4jZ8 znu*;f&!0c}GtS0ApaA=#Tlg*jIsRo4NCE+mKiTMR8`YcBZ?fl?@0 z$0MX}Qoe|4H>4GWK9Qo*Ju6U#P=hp$5Ndjs@<>%81zJFSqmNl>B>Z|&=@cn#DXv?w zN=M-TBBc&NH~gPsd6L{7c~iPjwg#z9q{=X@$5c2TuDTWke2^O+9v=6l1S*xgA!9e$ zY;|>YN8oRW|JYwY%3>XguCA^_T}PD4BlS0mT2hmi+SghtqSd9e@ZJv2>(=S70xbb? zeuIJlcLc}^)MjJ91{e482OnNbZWh<{+k(LSfl_G@D5pgt;~OMdjkhIosf1Yxd-i=s zO`PMzgNjG)v9U!M!zdyi6j=8JN}^xG`g~sWp5FZ6;>89yfvon3z@B{>Wgw9o9wRI3 zL}}|T!uCmJI9S5Wg>svbZANC`R$NieWHREW_Aa^IS#Sxm=)9>43OzLVdXBo5#>PgE z9zA;M;?bi<*e}R*s$>p|dwLdYy#xSF+{nnp$e1fIGch_b<`20h@iH2XOm=1V0p{No zigYr(8n3}DO4}2OB<+lEVk%&#(|B4Uk1J6TR6^X&8Sz6kf1}CQa|)F~&#}XuFYfPr zv15;T!Ym#r)5bRZgbI_Y*nVtPC2bLmN~O_KrbG20$A5UKP)*3E@1vUd`mtM(yT`;& z6Yl=?cg@;Xb>YZ^@%v9a?loN)E$G6P;L^8PJ@!O*!{X~X(|z#3(IZ3;CUs3~dJtW5 z_f#4i)1gY5xQ8v=ohaESa;%QLRVKB1s|d{$Q!(^5yli*=yW zQVhj1_=8^k$7pj*4r61CM5tLbpRRs>C}6>0V}1xsMoN5!JV-uKj4_W+VgrUAuQbRp z)WC?i>$njeKwb>TX*gJou{egnP#XKXNQ`=1(zn=<))6`@O_hY2rD-{#ercK@w7fux z-8>@Fx_kFvC5t8~yAlr0O;1nH1;c>noDiPD(~Oxg+!OweYA67f_28_Y*>uSEG-=TO z%0-k?JBkVAw3a$R@AbNx=1^Sg`3u!r{$e$8P~1O?^sjQQekJ z$lbq>3o7KA!aU6M+@kN%@CeR}9Mdt}N@xO`n+(Tc4!719pHJCYIS&a`0Os9?4q|jX zzZ!0C;vntBF8<#TYbE^v3b?I7vnv8VYWv^xvZUvI0enAdd~a9AO3K7i8FVcI^`&mp4qH7sxm9Up{FUM z;*1{c=k)Y4Pm&AM=x07zO=d9%5A8PNaaIC&xt*T+{0qBg$e9Li)B1`a(qo7K$t{Ww z7gf0*&()S!qS5805FUH`UMuq_%C248(p8@0Sqd^awH9*>C`mYInY zx%X(=J32ZwGq$Qk9^q`xxR>l4CWJRBd9)g@zj5j6)weERzIy56s;W34Xp~BiJAOKE)|Wwd9|xS83+U-w1rFH*3-1V`r$96sp?%Pam&4SwEe(oOe?-@gOftvR&nK) zi55*kC8G=Bg=mUHVKC9?JSIgJGxD;U`i9yvE!SUivJoJ;xswuJ2Vn*&W*}^v6f57L z&N9Mm1@;cI_mJ)4^07$Bi&@@>ckhl)qaE?i2k}a3(Vpni;>Va$G%XSTqx<*oa~!w@ zDwDCR^EpVz@mh(e8P0A&=}s;zC&hdj?mu4)thj9I6yMtAi`N{!@SA_}7k}|9mo9zq zhxq%KUps?WcLTohy7l)ZoV*hmZG)i^>PTB~YVLyE+{W_@j%9k>zB1amikO z>eQ*O27P84`%qqPm4~M8{_p?&zyHq=zu8ID3C6&Sx{?lDRe!)>vTM);%J;aBq9!JnBWCZ&Q`2%D_QLxGszN(P0SX9kkZ0 z?zec+|H8>QSjS>OeCABpA5Eo#&>sHT2|xh` z*W}i)_6-taWO6=?5wU9#c~}Nah38$$;uojZ^xXMv{f5Y8=-z_swT8Xnlgmi3RL0^A-b84 z+>9)-gKf|;EHL>WGrisLUFy}->lE}76os1g|dZn!BMBH6^A`UV;Q(0+{6&-|c&q^JHLn5D% zsijy#?Zyc$ zU!%pI1)+^dOLQDXSnV?<3+Lj5RX)p(BRhetK_(X+UKypfh$m_WQ&|}W3$(>tMlCLi z+0{969GFUiTyCdk1|4+A!3K;N9t6-liU-^vMhp$%C7jdcXebz1Jxg=rOP%xTB|J=9 zQr905Cv){cP?gPbD(z|xQ8Z0VHj8IzTQpqOg(fe|RhC9W9L$mUyh}=6IYP^%X$7G& zX=>iE<~l-Wq^WYlb`ykJ)@ZR`KDpojvPlvXH{K9|Une5_)_Oz;BIjmt`8g0pLxU`0tLSg|$(UtwwL zCFq79NO&+L$9e?*V1sN(6pnA;bD?jzfj8iX-5XfN)bniS5|QQU4K!U84sEc5BG4t3 z`JNPoK;GoKRr*HS6#P$-UO@V{OQ{b&5$RQ=|F)FghJPv2-$gq3l)i=ZZKQ3S0x#NZ zmMskrDfrBi=Mi2{FjL`+rv6`N{{h%mk?oJ;bGy1^NtR_x?k#TV)r61)0tqY-Ah48O z>Qc7w-tu~XzETXk|JQqO-}cHbKiI+smR^>GkhsN8;@)l9mMrVaRxkh0NOCuMW$Y_m z&D^PX%9(RM=Zsn{aY;fgad?LTfdtZEMwYdyNN6!^uC1+=1lDC>nYl5r>8Q#wVI@)4 z3o`tltEv+vovpkUZd+YVO{KliXfzp&S|g_7(rwtQRyfFB zSynMD$5Ux=NH$A|ETk=Ya3qyV5rL#+O`e#JB$A8>&BSaA?xXzwGC~UDs0b8TP<&5- z>hS_`fI^Q3=qk;o(u|8`(f|YW_|j%bu`FqCPmf!prsxVmU{HLuMN`xuR_)wbw7*5g zimXOSsI42VQG5zY13mKWM)WX%!W2L3@hPi{WtvckDtO8wcAj&gc-p19I35zfo1&_4 z`}ezxFl|{XvI=HnQ$V9mQRJ|6=#WIJ5DNmV{5-wjg7Jbp1=}F1<#z6zdt-^N(h}96 zL~G|po})G5!fkx41%rTVK0S7G3)D?Et*)`G#?#Hq{lY*PTtq~RP$vww@q?BTng-KM zgcnbby_o(s5<*F`&+7?;YxVglK5!wm$W1yBLns-e`Eu0*%QyZ}9v@cMIcJTzOxH^LT##=ZVMj>`O0w`z7*a znFpNqUbG4{f5lTU;BoTgsg0E37;T+Ww9bFc9>xtUZImLk7NM$Jf^Tubci#=Z3v4C# zS~&a~zQuRBw}Q7|jQ$nhcJjB_%46hD$)7TnFCHV)KusEy9|Up3@u)6uXWgvIsi*Lp|sJrCZJ zBDa)))3G>)PJZ2=Wb#VO%4TQh!VJj=Y`IjY)(EXCE|TO#E=|%e?=dma==0AVDUqfi z8SzNA!a|#B7Dj%e1v~D2U}knv>ufj-!OQUzx1G2R?r?*X97Yx@M}0jtN^_*%sab^a z4uioUE(~6xs(rl!Gf|fg<6cmyBhdu4Wz$O5>rEFFys1`Sxzac~N=G5N%}p-6to`uA zrfEo`#&_%h&E5i?X*YDIUnVPD>3xV%>9Gh zhFSBE2(~l-pY+fYB{0Gd;hsHB9)b6UaTLI_bj_fe^c!tMOa~c`9~`t;Ixl_R(a)37 zOdlVLxVioNN#fOn^&Yf#0e0k$|pQJtdhVmBgV^jWbyd%<413SdM^2SnQ`b}-mt>4NGyk<`|k1^I98U${pVW=!>}v=EX&h> z&N?4qn8>^j<^{%mQL`C}n5ypn7A~3KIa$N;i6pt`&)c8pcU7w*8C}?d>V1Gb?yD{! zLv%5O%4|kceS5*w$&*uPi55PUBpmBP;v|`ZHu6DeBVWKkxd7S8!BeMRS#2pX(^5-l zsiWkt<+Ceu;|}=SV++0+&n$(jV$vU(oeu%@{K+RVazSRD>9m`HN{Qs_$2R4vFZPPP z6Ply5b4yVS?&qIB*<_ssC-RnCI!U?AX&px1#f0W$Y1?j$=tGUQudJnI)mUqDPSsX0 z%D=a`Kt3WDUF=1W398fQ_m4fLP<7o?F7^~TC9hi_sEv{=Zh?cXh(TW0V;LNkNybpb zFN_7B;(r0Cqh)&x1&C9K!KK3sSdPWAy7xlMG2hGNOD>*8#?T4VHY_L7)bLx#o}4;M z^CvVd8{TSu*%}R(YkFGtN!Cv;x+Rg8iu!gRr{za~-lPNG*0!Pq&hz+@U9GW-wn$iw zru?B;+O5J0on5Nk1z4h&mB6X49-mbMCslYJntF{D&U}?yHH!he*U7GEBke_Q)XJ%2 z{CnRU|AHJ}lh1CMBdI$EJ+r^G*L^|GzlL~Uobv&~;6l#)M<0Rx6jFScvwccPrNR$2 zRL<2QDi70O?%67H$5=EvcE=qWYc+(e)mBY!?;Ur<`yfT>ixUT;ojXUi&U>T96MvS% z)-R97n+b!9kWxCkwoOg7jgAUT0zEsyK&KKv?ATY^1yI*+9VH63EL|y`hKpW(wP^qT zC}#zIWaXk%Z*umt*Is)Kn&uir-n(~p_6B9#Fn{e?o~KR{1{WcfIja`_si9$eLE1l& zF=jF0PuuK6gOmP`J{lS#BanzuvkGoA01YM7Dnrif+sNEpROTF$lMZ*KHXaNHY;8uR&~%jcU9*5vcl5>(?#Isg}=`TJ4e8jVJjxk;yU(!HT{agM!k zaWs(7gTB=#0;8W@VAxn-7UcTyI3z%;B zE-KGHvA=-H0En4_{ZBlr1jT~#j46)tf?eCT?II0G2ONtUlxKf_)@a1_rKQ+%Iw%}U zw-q05_hvqvF1w$8m+q&xT(?%@?8{NqPOiV7d-wdsw)V^Kz542_=ndB{fA-0=6lBF815^G@t2V9{?dl6O-E*mZ_f%d&9p z+|pzq;bJuTvUI)eop;_j-`)EP$>@}0UU{&L6xuWMT1Ilo<=_DH13q@X?O)qI`Mmv; zbKigc+-H5TUGUzI{^hU!>R*2Js!YjU#%*8->~zouuc1adNKqluT80(iq7L_P9GgFO z8meVAHQVnz^X!W+K6~cQJ*HG@&r`?9Uy#3G?tDTPs{0uxod!oWjmB1=IzZ;motv|r zA{+J{3^Uk%`Q4Zh1p{$%@bk~{`@-w5zkXqmw4-xjt5GELCaqe-xmDv(Su9b7sn+87 z_?~?Sp7iz2BoYZ-8CVzNJMR7Z*S~)64!R@Gsw?uoV8kDFtBUd3yJp!Ht;ORx+;m0o zUA&#k7eD^sCm4Hg{_OJQUQBUUKK}Rv`i|(!!vrU@ct>ZsR5Xr_8wPQdQl@nl(M@+h z6;o&Mst)hpw{I8TRb5qC+0sWJeKZgkW#9cfui99RA3PuGP#%ufJ za=UwVFLZEa&ZBe7*0b%1tQ#7#TEAe@GZ@Bp>`)SVuy*wc<--qm>=^&(-~R32J{l*S z%&66_EhpSe-uL9Ja8&Em`YTtjbPW_5q{XS|TyNK>oI%^&t>r%akSiG&DB%VMsD7Im z^1+4DvLxkK!sSacn;svhMpBxZ=#|+Sa@UsZPaP+2@-O6nmHbM~HR`i%qgk4{xf#S78yOz*gz7E% zwnB%qw5+1C%Ij|a&#e7ycNRG+7)Hy6d{gt$g5p@Ay?W=N=9~9#HUqS6qY)du-Qg_S z)`S&n_pVvb-1OA7tDv0P+8w$6QI^wCH$j_yN1dJv27Qa6G_=}7=%F9&FL&`68pj`P zHHkleI3+Ya@Wd0(eC5kuLEAoy@Zah4yLjaF&iOSGpWR4J*Y?+c-FAb$;NQuAN4|E9 zbdfIMYyX8kA@I7}w*5_R_msmvT=>&Jy|8Xa@)z=-k!>0BfZ4WjXTqE&l$b;+f3kua zr;@3BTE0yd>OPcP*IKB{4?OWiV3U=)V>C7QT0?ak=I(wvcYkYn?kcJcAXU^DHb>Uw`^S=4!vO4_gzNwMcU5%*gH1e;??zJlU zKcHnlyGA>IPi~fQcKq$%c6hGog2RE;$nk=7DPx7#yl8kJlEQ9GOurXV&UN*lUV?H#4!A{4z4kMio z^x>_SF2H%dVBso&d0q@;jN_GIoNjvRDO-b3HE^R9Yjv*{%kI^h>Anu7--=&za=FIO zS;Kg}HhE5-+Qb_WXkB&#(0iDXnNB+1S>P*{d34XEkQ8eh75-XndY|OjAosiqGR| zYN{z~s6TYLx}>nEr12I^`^R>a>3zs;PF+N|eovp?T}o~Oi$quGFp2`u`PMvxA*J{i zXO~1tQmNroJj=+&n;I>AXaMCJ4D*&o2z;`&yCt_nwORVhg;&~@aY%MFX_rn5rkO9HDQs-?`ADV5wD-h`6AwTA^rQINljl(eFjSdG9$~_` z32PsDM2p=i)g&}YT7!yBFkHfwcd({V1Ct>K51P{pV~|su&1-le<}yN50&>qGXW7Qa zl2(Dw^a8%Z@{q?0e28kJbXO#!S^1H5mA}1_pXg~9JY};jSlXGLL^uM}d*@*RSQFjA z78VR}i2-3e)UBD~7t2Uvi7amSlo;=yF!ADfT7YbvLx^)YYr$YDC98USjmD18FMZxm zxrnj~EoAEJHIhD=!&q0&su~+f5#!QnIYf963U-jWeR3_TM`;a9i+0yCS8rWkeRtCOM9E<%#p_ zo+!=joK$tAKV`?h|NXI7kEWmJ{;<3I5AiL&%Kmh;j{GtBj-z+|YWlzl@_+Gn02uce z8DyS$<~SL|-5>GkU%hJ-0}fRd1d7DSd;_yA2=sEVS`>Sjzy;)O7cTY;dBJp_>xG-c zjc>H){Lct8KY9g5<}Q5t>1X)r8UjDOrI2Td2RN(ggub+-*yo)KaRnGv1tf)eluKhe z=3Z%lCGVS>?Ws}F*qHtxHb0p8VYJnJvQ4Dt@ zg>0khSR`o!98G__b%R~2@vQv2W(!*Z*)VZ6EHAf4>pTD8Q@wEcvY3^Z~6UKuJjCg z1@c~&e>m;t8XM#M%XuDj_0P{&RQ%{i^}BY}R(Oa;7NMJV;2_QJ^Upc{WwPE*kMNT~ zBWZ|wL)P|j8FR$4 z>8vx84|xu=8VJTVrZYj)xn=XpIY<5PhyRwAxCXkl!)zlm;FX*18EIla*KAJtI!)os z=Czm2$_Gmkw#;eF*&{1g5>%5>S;*)ijQbW?I#nzTQk!`Tnw}m_#sqXSNzLW)97liz z&|aJ-g`hqQ$@ImGuc#^+EI&-;@uzMhXUU&s{?3}8I(`$z$4$513FWLiZ?%8(n|6%k zR@o7YCIx+-$z+0%C>f2#b{7f(n1Blig}ZmlOftD?civ8G^x|@jw&&4kziFbTor3#D4^Up`fy|UF*W>IC- z&^4Ov`@pchX?K%GvqpYyS;upv-A4F0Dw7MO+r@T+02UsaJmdKlNhXhr`$&i!Ngk02 z;-a@$~)u@+;T4qvU_Hd)Fq<+MAk=lHb!DNoF&_r@SH) zGm>>YN?O-(HblDJ7#Osghj}K6O6JPdn3Id;qfA3tCxj@@Xb8XQ0!(qC(L~av>X}RE zD=I1=y3EH5sMw2jX>Wzc4{Wht_s~P&bJAHIvJEYla;bLOxp{2n0Tf!{f!;)AE8}3O zY?%{e%vs=MS0Z^JfH?iqorurt#VyAV#%zW z5vX61Nn&}#9xBVOspdSwavRE&C$x7PtV2FHp}Jb|4fz&iW2j<%v5L_Y9traC4$uY8 znwlD?rsLY1Z@zhL@yL-yVwV}MR@QDa1x8^`4=9hY}4kITblS-k;^ndestc>0OS z*38Wg+w%idg(Z--+J|SogJZHu(iKxx7K$WaiV;l1<;%($2k$#GF{8_AWoTz6&YV5~ zrbA&NMT*#$6*S1=;>3zchia=;C3A}1uH?#j^GbQhN=Y*15(She!d+||4=@DD1_c;=aBPHe-rRZJ&i zyoS<(^YgMgRt8zHC#EkebCVU$)_usU7F*Wx=6w$iWx%=qO8Uqxo4V~Ok~NGHO5~{)oo8fWhJX_D-`ad>b4;;j_?b9`?Mjd zl#Ak-_4;Ic5akoZ6DNkjS^W6Qu&h3M^ytk8_s-4jwYWIFK9O)|Y2@4tL*X2fkj1vE zAzjKJY#VGBMqGS;V^7aTxv>4n5w#7Y)uwL02A z`q^lVIyj`Z5MOm{kKE_Ngh4*XLJ)q43Fr7*jd?V(`ebSXUNCfO6`p`$L@OQ@#nsLL+!9TQ**YuHac`y4>*kI`N53)dB-j;gkIt>NfVT&V7oKm5Z_Zn(?( zyIYBiEa1=eU)pZX%K`&JY|Aaz%Fcz-V0n>`K8mc{NqhoMU(qr09r7KfXycB8d4PcY zSV?6{gNpD(l3cw-GHyq8Xi2@y6z3B{r&y^^(kbgf#qaO5)SNI zpOmV!baZqzxmB)UJ#DACH{O_Ahu1$RyVnBtiS-z95trV&4!BQA6b)@HvI^f{;R!ZV zp5W;BzBl?sbnxr4dkaF?srj{E(|i#z{G`k<%oh>FTgf4J-qF) zbwq!-wT$GMn2jr0i*am&R_yv^40!0R7BOp8)fURJ)~#2qjk^CUdna1H^|of|scz$+ za`Z$u($K0BpMIL`eL*BI$ZjyzTi4q>XLi?{(Zq@1{LC;=@}K?S-~0OJ=OfgHKCI$T zbyF$E`20MBDM7k;@%?s%8b*>BhA8dtqaT_scTY!&AtSmlkmz*x<<`1@h91~Og+Qe{ zsEnef;-;Has^}mH&Vi(D=jkV&c;enY)ztwAB&1U(ns+qqEaY91P`I;cNArnOvgy>_ z%{DUiDLuz)irAX(UPeFMl(RosvXImpVXRjbTj03R{74@-iGu_E0|N_O|L0sru9AkN zD^ZBK%Y|l^`S>hWS{Hh?c28q$iV< zU*%EqH|#Hq=;&@)ljhXggyDzpK$_;#LBsIw+mC`~C+P{cb%W;EQr4_-H}u2$rOr-C z=;#p06=4;wB}tNr#tuz=-ro|pg8(YZqyzVJ#Yu}A0 zzMDC@L0^r2R;|ySd!dd}Ntnh~z7t%UUFBe*BMOy-We@^Qu&KXniL90K(~YP0T8Q^^ zbgR$3#Ikq!1S>mXa1o-zCMZSH>2yzz7MY4QH6ggzD>^ZeNJ&K)=-NW zw3Q~EW;w#C*eRei%advUKwl4DhLV5a$>$=AoTZ%Z5pO>6rLX?RZyY(2B!^^UK~t^M zVP+IcbhSYX)1^s+wa%-N(rQy_KnrFdlVcFKEJPLt4 zUZ=v)^XbYgmNEvw38tj^!7uyf)g{fa#rLKA?>_^>11ApDk>f}@ufF~!D)6S z_l8I4Nqy)0hx{&0d@&k|gp?G9MXnB3!r;oRy-ZdHqjG4#iCz(?r4=7+b*GI&*_Jh(Eaz{dFK9y z?mP44haPy~fjjqCk-LzNlwYtNwXQSJ!xDQZCuQBab7qr71xFeKpWb*Dh?d&A;KP2; zY-O1kp6%?o-s@Rf3I+m!P+G{x(SLdIz#!Fq3vwg|L_s)}NW09Opr(hO@mH_T#^4eu zhLQD`rc!2bw<_|)&;UIPM1>Kobvl~vxNTuUEW){?XU^Pm_~>mAY#iB9!QySD3hGWi z_Sj=z+F49)M$)=`v({w}j19Fx&3(>l<)9e65KhDrvi^u8HU#9-Wo&91j~sDtI9;fy z5}KmZ)6t2EA`*}}!-4(#Wp?**38xEP{z)|IaNI;CpjMfSUp{wEX5SuPo&z95$AuTR zUqmz5%gU_y;?t=lMG1Na2Pg3rN~EmlzWS6Ot>8%+aG#f&!~J}U_E;^5Zz3>~1SK!t zrRCLt$xDntK$Xh{mpm~wkiY7f2VFX?D@KzQ>(YL|`#>>|#*r)*6Iyzs*5eNIg5#ry7l?z!jg*+;&C3{#0DsO(gPAw28S zvOHm8sWitVVV=I=&I1k(ATiEy;LbY>l9L@^V{}X=3kq^A_Eo~*!nia$9HUcl(cail zS(%r$4Jf8!0l28BDa9O8BECcYZIZA zwkmsI=F<4JYwjkSlz#N#V~rN?oM$=`3rA4Xl(uje)T?(kT7r1*3&x6l)b{872WrV} zNL*c0w;#Pi+uP-VmOY<{#F2Pxd`dR%sxhP%y0Q9QnNMh|cI|Snw~9+7YD}CkXUPQE z$D4WmyAcX%BeYc*n+@}96~<@7rnd^yWy9vT3e#u9rnU;>ZjhfU8>ZYK-o$@5O(`3e zB>9`eoY}C*`Y>TNP1lV>Hp#HF>G25rqBcq2IK?k$5$#rC+=iOnD8<`y`@w2mU!U&3 zu+rlk)ba5zSnjJsjsuqe!jiA1Vsmn%Wk1WAD$DZ1HR_Cfl%b#Mx4F=)cW&;(@O$D# zLf8M8i-t4Va1MJ#i5D}}z%KzGEgm2lTELa5E1yFrkUaNUHg8q(zT#gD|La@$Yv6C% z!e0x2?H2y|@Q-fcPxBSG@YloNu!X<*3(Bd3e|YP3Xn8hr3AwVskly_YH^P*r+&QX9 zmD^+S|G@xvCBMw46gw%EU)~TJV#dh?Lh}?0DcTs?!p$?pk5Ii)A+}9%eT5yftxMUtWj@Dq)H{<*yPWA{A|AzdJsM9)V9=??<`TL@0A_?1Y$QU(?=nfBC21Kq z#<4}>Xi&z+V4XrsCa>t-j81SB3Oa+S00&kTm<-f3Detr!I72>|qIMJ@2kkwZMavq& z)%ALeHXCTSC1SA$+-vB?GD2L!QY0Mi@24#wlvhZS#J(a5Bx8U`5J?(`QLxhZz5cQ`?)CW=W5fvjqu~`vFz1vU=o3!b{Bqc4ktk8 zsr=#5ATfeW)e}J=2HfaqVcaC`Vk6<0i(y#23fK>}D70-898_;G8KyL5luOqtqzNde zq>ODvE2HM*Z4QT7%TfA9ElFw)xRch6QgF zR6r`Wh(a#_rR-8M1SBxeLG$U0D06mpab$Lc{kUIc36ez%IkiYsgR_0nKy)xYrV8g1 zeVB~s$;yr?Yt1RikddL8C<8qxF1j!>oJ@v7BiFCY!1gvs&-p+Ios}9v)C5uAC1OB- z(6~7;wdPzr!xHR5h)OPX*o|rq=vz*0$SX*Z(o%b|-EK8o(G&C3YEl52oR=gcDrXSW z)S68^E^B9J%{qxXQOF@5?$2?h89{KFRT{#QbV;Fx#C&5D6CvztU3!M-=sV#%yHmw-E9OEo4l^K)ut6lz-l5WN7!Qh|>7B_f$nbCX1t zmfS>gv4T$Jsud0S7~NKr4WG2q45KnwQRjSv3ipyBANN)R9qKA-N1voQj&-S6jt+UA zQt~#7LBxO*4H!A;h~h(2_>@RGy=vq8bOw*Xuw&CH!CdMn(g+~W5kC=kVQdRp`Z`jJ zsK+7%9crGW7SXBrQmYH|0!g_r{LgAf7YTh%lX-0hKFO6jEP8fPSxk!@<0_C0dJ`Qp zTD3q&z1B)gof$uB6*O`&9GRt9E1Hx?k}QjthLl!b+R7~20zBO+=fP42AJw*PC&&(7QkPM{3E$~@Jy@Fo1kwAn6QS9iLkiqzp`HqfQX{lS#D9VWw z`($zeUbo)LClVXbT6Avj!Z5eGxrGHfTEWj=e>MjvG2nF)>)GrB`{ni4GGi2S3h%?vuAJ zqPPl5%avC<9J1sntSGOpzV+7D4fdmZI@^&ZMSjOZ_@=40a0#{uyIgA_n*bzl=h?hl zPu`70k@T#85vkH-`TpUdX=>1NvVXXry!&phE_dYS#7Z`aeZMG*ixbz*f5tK4*@@As z*!XpHTx`2^iDhwtyg)w-vD!RaC8*;9E{(CGWC%x1w}Unj*uRqC}!dGaNBNaFiG9y=KV^tE<%EJj=D-;OO~L_d1Ph zqE5Wq&0YJO*M`X7%fF{y$TKR=BR7?Re*C@cb0s<1lEDHq6$!!OdS4)nO@00(-+LR|?h={R6_VlmhpE4)lyd}F~(dNPhH@AED$cTI6 z88jX3v@Kr|7N7eXHBs@(`f$Nw9vdTL2%npI?5pJDa(F)4x&+}^$`}qUDsbFT`(PJ0 zHE=l~>m`r~Qb7%D9o7_p*3~9VWji20*U0pg75Gb7P}k$83ENMxg=O(q76 zL=Q0nK%VOfs%5DJCGxuH0Nni?!Ejura1Z2ULk>`gxxv`c)e~CeIBs!fh@QkTgJ}HB zymu06>%NJ}$q|<-Fhya${ZoNfM>M2>s{)&R_uYNhsh9;blLgYylaPf1XTWQ&j!woz7w_V|C_R>GGWLg zw0-LNlqB#x7nr_s;d6{`uXn5)qx(Wv_m#FbqM#Vcbf(tRbd;;pF;38FoK)?MO$)rs z3M=7SV{xI?Xt9vh_GuUypPL@MdbKC+IQaOJN-(Z3*>(V<{lwk(!3^Js7NmjJQ4f!L zddRwQ-_H69D;FL@At%xdCJ$RG8VDE|ySJVLAU3qSW%Mx8yC$A$ zdDR%<#@RswVI?KX!id2aJTZhP@)VA(?*AV@(ZcM^Jki3uNmhH`;f%IIM_VW45?#Zy z+zi?~>n^o*{P<^W5PrHqgS$+|(#3&`EAF#TeXUNc9|DmyMw>%fVm0QXa-9YoxNx|_ zt|3;rXsGXc@8A&JSW#(JRaIGGStY(oOQwg0+-q^z1f-7VC!;^{U>0Chk?*J!#e4UY zcY6W%W5n2ZvSl@`oECYV>wNRgPC8>S5!G20>t~<&>Q|q^!)_)f=34*09L-uAV^we> zMldJRJ2n=%etq;h+|b0t5WeV-2zEp!mZVv=$yVf;_IQ;j)v;!GHtA$tGR`m*?y=O} z#j@^Nm3I(sdJ&R^X?o{X6*(LSZim}dQL&4DA8b)5A)ziE{%>kovHv>GZLuz zx88jFLO2{_W2`9czvajga9r1y7lK?4E*Yi=R%CvRkM>@H>$%?7cfE(+^^T6Cyjr%a zdx>QQkc{!9%<7tUy7E|#M5*mhN0H5>X48b0mu07}!Fl6xFa4eZ*_6NQDBS+KhK9QR z^ln!^mnrX&Be(3AL>8qBhcCSS=36MQ1ZibJ<#djXE}<@b80Fmx>&m~{{p#y2%yvvw zV|Rb)?t5F9*H6pqsF~#_2e|KZuQOfSflXy!Wbb88zwRPyQzQ~c5%e7NH@+(=gZF&x zoJzlg zEA~z1uW*4Dc4sr;VtI{34X<3Ij~_sE~fL@P5Ei_B_332GIk zq9SO7(AEU|vI`bxq&L=B_j_HhcL0iE>BpR{f#juqV{m3cw{`4HY}>YHV%xTDCllM|#CGz; zwr$(CZ{B*p@5lXp`*d}k({<3hx_Y1L-M!YL%(Vv@Z?Qk8e~3bOdUkV_m9;CtCPXCT zSn}A~1YGLeXo|=~JZ}|%X%jnV`P~QwZh?#JcYk|5GpoU15Uslh3!+hoLO_V!R#Ebr zINvM~CbBXTR^^;?6AN+E*3}_y%<^0Z+vw5bUF3CF*UShQbHOIb_y0V1rg z+3{+2l|FoaCxfkIS-9TRsu@Pmc|Dy!JRnR+gsND&3D*x0)+yg_V#mih-5=hh)^d!Y z?x>6+)3TMLaR~DI&VEKKQpujM&V@BKJxNKChwnnadRl)z1T=o%tJD0DGQYWKj0`zf zSVUQC4~+kg%oFb2@O{tt^n@SX84=$K-=`vX;YEpW_dFO;=^LSgz-E(BZQcb+c92fV zQRtlP@Oi&9t_)EqDi!)u|6XxC8|&K{m6VEfShqs8p!H!_do3&M7A z2yD02R=ubKha0P0gtOQvS*5W4DlF~O?}<$mm0}Gc(V;-s@cH706!Kw5O_d2Zs04S1 zn8pfV*R&GR5t7jnDauwU^T5BekyX;xSSPeAVCcwqeXrJO&%(UX-C-O$4#X!PQvdCH zbWh3+Ol?Ud<6IAhuj}Fx&VET91&+Rl%~&2`<+>UNWU!))ZQIc~tWr>w$RGr!-L)2 z%XYOgt8CXyVA)mH>Tx|~BRc{5YQht<1zBKZcE!8o{8Ct^8{5Hl=ymrmuFT7`U+M|eDUNq|JpH>sUXVb1aXciU0K+e@BrM$Cz4m#fu2G&|LH3qUkx#+U(>4@j@3rbZ!(E2ny2fDlV@{$EA<~BZ`k2&}lQQV)<>6~70 zrOn%kKdZ<%b=TfV8-|OBe92-a{bw zuu7jk5H_4Ar@j2AXAiuU!V}YOzBAEse)_tM)6|$Vp zOAwbQF!fS0Rp$$5*{k;0meX09&JsY8aq=a~4yH$GE=y}K^t^>|GYhcqcMW0&zkb!= zmMa@^o#3Sf7WNRNwebh&0ozR8LK1ko^Xpr#_#OAh^12?0>s(F(9r4~RitXU@D=_#Y z{U8YOyna|Kf%gXD&mj{mbQ^)0m7<&|`XU&9D^msIo3x>V&IzDDc#1IwRmXaKAgQx9 z{?P|wuj$P{HnFk5KORo8RPcF*!v+)c3`Hk-WP^x;d2@6iRONdXzME zBM{sI=}2LC7yyp1X2!6oCxl^iszYyF(~*kC1S=fLvBaZxbrCv7XV#2C1gc~T(n;Xz z+5ICws2KxrpPE8ayVEg*?&!+Yd>; z%7(UQE}{YHn(}9RKwj9GI2=*m3VLa|yA+&Qb3fM^Lp_>FZvr!*2(8pmpPiKLm$g|fElhq+JDd)@N3zpl0(Gnk1o zca7tey(WnlX&lY7bF#fJzDw#Vx6{{|HTy{qCX^w% z_c7csci8eV4iO)d;G0h{<#EV0#bjYfJqFzh>#uc`L)~9MF8l-pNQ2OFHM|bvl}m)g ztVhGBuCCf~V`kXw@0F$)7Jp7vv|d0-$}D;khVlt_2{D9_ae3m4nCQoyYKDkM#Ya9a z1(Qqmhd^tx3|~0c)iX!V5Zw(QAMa_=QrL7B7Rmde8vBivh5HlMjnyej>#?t0q6vQo zkgfphGS&fhTY`2E%|9oj#6IeEQb(mhXNv$JSS+8#xFO zed`W+v%+a$<>krcWhhg2*Vb0dFE=3%V8#aULpJ#Lo`%h3c^1HDw%ge`1yCN%Mng$0 zrr~5l#-&%;D2X*f^k9(**%UHu#6ttB>ZgACEIe#9vyvjQl~uW91Y%xoVR`XTXW#gc z$YRcnz^VL{Z&RrdCj{xi;%{4u#3FRV`1F=PLl`(5h%%%$jD_`d*JF(J`KOX)F8M^zt$pw5!TXe_&Dx zsL^d2-o%86aSlz@4FF}Tr{~D;Q>SuK|jx_`&FFWdue87v#7C>u~L@` zUT)e`?YiE&U|^$oB%rb@AfAsebuN}McBkDac z=*%xM5u+5SX-b<_Z>YQTn>o1`eqCF#Od90`ym#c;I6dp@hH8U8pOhD`o!^ zeWrKQ!@HO6ot#jzfv1romiiN6okbRabli~v7YEf|8J;9*l}8OOtHOPf`TQyr?_Tec zTU0neOb?zkjNe)?h5n-lG^KVxhK`QD=YiI4*SQ}PA1)#^C=<*7cJdh-ah4H_$K%>E zCCWvr3Sqi0h49yERUhpGR7Z!eU`v0)BshG(tV_=CZ9Z2wGd4UWA;K|qvgi0HpC{Gj zDJ?6K26o+YQkoK!6PD@qas3GNMm9f#DhDLF%g9to8VP1opKJ?%!Gd|R*d+YUr~b{e zO93c%_y|J<{K<_U`w14cNrUVqbc@G~i7`@g3JI9fUpT-LkeU2-j@rDGhuBZAU*eX8 zR$(H6nnyx8V5k9ey=v0loHjmtQ!K3ivUjY>Cov%>E8TN|&&rWN{DkBR(H8zm==<(t zAZ4>SaAJsQvLq+>4>6Lu`cA*RE`#n;S66P|JMx@GErtM}_%PK?hrkv2KZP>|kYN zMOfa-uH$&OsB~)89oIXEC3efNJ3qGIq9MZZ`xAlh^=04fnp!0mVcY3hmx7#&58KYS zoMV1QlJ=519MbgDAw)xyxMK_AU$knbY=7mWOk9OE3wGfWnigpblta)|HY^nh=<+`m z4;%f1Y_}xB1=zqAEFv2XGRo9}u#663X^MJF?rJKCZr~CLo<38jmcUu=KT+IGaI|X9 z`Aj^?Bx0zB#Ymx{I>=DxdA3lB#>sSS4$!;qN;J$G+Cj=U9}m{Zi9U{|*v*|fJI&6I zvfuANj$dSa9@dBj)Wiq zVa})!t^B3rsxrja7dD%DN>N>ryjv{w_RLU0K>@fwiH9;l2%JPF(P;58rjVHrn1hXZ zn2{u>HQp*rIy4BtBKgqxo(Lw<9tp-ji7sDS9}dJ-lxO#Y5%vA@PSAGcp!RR4gyG*M z#ui)L+Hcmw*@d;V3*=uRk>h=ocDgTk-hMuiQjUpXs;c;jSIi+h8k~qziBD;_I_6yY zkoQZ{N}C@eTgCKEaacIkWCf@S75U$DH7}K;tM9wM2gAlgu~nH=^ShL1=vEvxb&*vV z>hH~3Wk=I}Ftw;sMiVm(hkH|kQK4 zCX+g zHIt17W+01jqIK}_8ro@oAVIQ;)8(-s)|TJr?dAzN+EnP%5gCyaO~ClyBTnFZ+BScg zXKtmVgA`OR?6bSI_7swWtCWxs1Zd~Ro16_mPK~?`Ivtpc$Yz@#y6yS%d2>9AOFO6( z>o;e*eHsyx2DZ^_dGM?yPRr{Ib3S=zxLS&>CH9%~QtaENv5)jG{pPMN^CVK^GEe8c z2(w{xX<=9hBPML8#;sMZ1!ok)YJu)BEAyQj{8Xvxt|9yA(|Bs&IGE1*p}dnbGXm!` zd~elj?b$Y}sa5OwdtOM>Gs#aj6_QiYm{#(*n3x8f#MzTvANgbN8x0CBm$M7*_MUOq zOwRZ~n!AXs;j6lK;gUV&woLder$%pT3Y9msz8&HNd1~ZH+P9B+wRSEl7`~lTjqLyd z(z5qz**6JVv^xgKNq43h^Z*)zz`MTz-bOiCA>Goo_Ar^Ux@iu5Nf0XMoKPd)ome9! zycH?|aJWy}!)CwtsqgQhN05He(NapL4eI{G1!QadV-SK({KU)k&ZoRb`P(yRDNmdp z6P%RHsQm4Zcsm&lQo1KoLWL^3keMa#S!XDN2F7%OH%xpjRic5LFnNb91>GoMo<@1J zwXtimYRif#kA9R=!NJYUeyOL_N-XB!kO!YU-moexPp}p2(GtA6%1PV8eca*HyC_Ic zNB_2rUMC(EY9?0qG?9l(nLnltLRRilBwxit<-hM5Zd?)xifR&|!8k%w&#c|(=KG}K z?0NwMIe^F~Uaj&&sKg{KQ6?z48!ub)=j0Q&sH!E)s5IK4ZwK@h@q$I8uk4a7*wPlA zW`OqC+Sb;U*iWY?_-gMfyyXMb;% zqft0L9jNlfdUUge}RIgR4JD0wg^N@h(qC!?mxkV`nC3cQcp+i!n88O6qL zCut3MU3Wg`cqM_SLNP%cU=}aAaQk3SvDeo2B#YF<5e_cxI*GecCQ)4KG#MBQegd_P^D&tA0<6fbpSxb2z2j$?+3 zxl7`e0^lB*lQ?X)*Ufj)A=l~k&R`w6{;>;j*`EG>9^MaWyClVzX^qz511*TKIj-JR zZz9=0VR2aldy`I5b11{)!(~d5gwPJHsf%*yFc1z1kE zN^;8RdKb2fRW%$OmvK58w-fEPI_`c46C4j)-+pxv zf2k5|c{9Bjtg;@P#d}IwQ$EO8QAO>>DQ;fgeJ>Bs;mx*ZY+~0u|GDSX1y}DE-kka8?gO70L$=s<#5OR$?|z6#lQ<+pd#0O zmo(4$(V1+>O9$w(guern8|41!Ml%L&~9hV_5ChmxjIwW{W;$KG2ZRNgZxGRit-j}=O+3D zU#;gUV+8o(SnJfcX}1C+7je18RIgGW{O$u0=v9JaJR5X!8Wbjz(r~WsouP)2HkHVm zOR>3@wMR{(sVPDANkfM^Hl-;wpuhOF6w3TVS$Z&K4v6m=k`Ep-*{n3M+2}iDmPi-O z6K|9*uWU@D9Me!B#BJ9sMMoD@^dPfU<)=r4ShD;`q-Lp)Bl`u(b}X@fZ%enQtfI0O zOPLx+Au0=_{k^r2y?BN8+D5mI{{eaJ3nYtN1w=TOKY~<(qIkPFfq-ABLJk(yIsKF% zGw0FOUeI5eaYN$f0>V?29c^m1AlHDPPuzmqvYIo=@AK-Ybsammc%{N)yQrMm-LvLU z)XyCec)grdsC8ui$M};rLQr+QaM9RC*94|`SJq)kDSd9Ua5RbjzV5WMvaSOD0$~hvNY1J70Yye!*w>O!2zT}a0ysLPSnV;< z6!c<92ECUSC+7tWZFTho+M;#0YrArmbFR9U-WJjM<#5;8$FCDH_qvJJ^X2Jy-EBQ=Ja=PU8m5fYTO$&n=9ZiJdGHza$40<~8AcPls{DyZjb$T$? zz-teug&EOyM(?TV^f(M zE91n#z~Oj?1N;o2$c39O+O|u=_Dc5n+yv~PTAK7R(fT1wj^2)FquE z7?Pe&Re5PP0;IAWL`8n&xveoNhc&46-%RIe^SGyGsO zCQKu2>5sKMVCePa{iKl?0Mnbh6xNuibG3LsevY{Ap8Sp}I8h-a^rNo+vHb;49{YN9 zB<$2c>uSL|$+&i48aX&WTu0afU3t0fb&Xd-z%N7R@truK*Jj-AEP?(U6B{_+wcL4y zD~QHoZ+p5Qn>v!otS4njL#+vJvR#vC=Pfkk5%O_<@aVQ>vB~JWhziRgajY_trJ^;} z7TBucwmvjd!FrXH*_l36H4&_tGS1wSC8S`kq4~0<%gpMWvR(4=#?iG)yd8v4?zC=W zwrpvT_b^cueC`0Nh&GR* z?bWmjy)K48?diIt2p!Z*&*wNBE&Z%`Dk~VHY^{?!-#KnuAi3uRBbNhw1rjhAmo{M`tfnU_>lN$iPZ<`6PRQk^5 zxaGdsq|jv4r5>+6|K;Wv76fZC$bfhzOF%>t`! zo0sQp>px*k2o?j3#F@R2xBac7f#~2r?YhI!+XCQZh_z#BjxBt6j!#5SP{!dH`SnI8Bs$Eb(yrC~yX} z2rYSEEx8#3(U5YIt7c(y>m`(jk^;VTAuIw(TN2m?#ku5b0?dQ2{Zd&l!yx&OWm`FlCIymY-g6DM6N>3Ra;?`&w%z+>*!en-Yn~9H z^Pb}fOmnW@Jqd1iH~@)OtW^&*8{y*{0+058jAlkQ3TBK@pPbGd9$(s41%&qXjxc%e z8~aL!mmNW%hqJqJT}X@yW+$mA5NK?7bWcz1&T|#@x`yZk*j(KEmHO&Cf#$AlZHV03 zwU$Y8xvtKBuhFq6H;MWj{DWw=vB5EA4EH$SI1$%lI2NTjaW-v`Jx)O`A)s@*uvFe) z{B!b1j;wn0m_tTj1{|WIg|oAn{)mS}qP4P9E6%Ken^S >-Aun5A4Gp>4U0IQJ zJSDj%uq;_-j;8!z8*BN3#G5`ojMF>mZtK$CmJZ>LZBP#+{!QxI(n!6=j?D+5s8yl| zCqq%@Li|olF66yc&uRtqxK_{9<1Bz%WM|3)$GtRZvu6gM<72a@tfd#+V6(pWfBD**uQxR;owP8FIttM>^4T=+ zFYN&$EludBGthdY*q;-P4l)cZvz=S2KfBDRiZdk$T!jv@&mB^%V^Q1_xXKs?qV=+O z7JK9WX_6hj5rQ5#_#XZR<>aHdT&e4ifAZwWse0~aHapMWG&cBWv{?RZ`hEHB@_nuF zy}fbqt#tNX)bur{>6ftehFiZkNd>Ryw`lrJv#{N3PTAXz)`CuJPCB~geMIozQlm#$5l!D;X zfUQ1!IFD;IjI^b*Mkgk>MUhTnv4a>qY7RRms)c0?WH-vw-S9;aXwyNe7Ta*5``;;g^I(Vd`+I0u7da=e}#F;{J_6W$C;2b`UBI+E~4_A_HQQ5 zEQ&p-|FvZ}rahkr&RN0U9c#S3P4p`5%G$~Q1Gow$7~C7M`U(n zH^FiFC6R_ryR#`dH%S4ZDE#M*I!7-^?m}M>oyQ08|KKpz^j+15&QmYy$Q`n%QO3zYhIp< zL@=uru9zHQ&p+^Mf`TE$N6+X3DXHLFHM7ULndU-NzDCgbzO@DRYM`}{g9Ucx2d0wT zg|vXtmgY(G{#9P|@KChWPlr8W`g(H1hNk~a>J&0B02gHsTNjj>*_i%Cgna)s>-q)} zxaIxqdlH*u{aqw9fqCww89ikAvHf?Q$#we#8Dn1}a=W$}OpqPy5^-&9Avuoir=($k?pgH2#cR*9FeVS_gLRc7U0k+2y92<1`CP zAP|x#R&QbPF}jnpTfaTSa3cH#v3D)=rS=>G23m#FFV*t7k4bvAKuVE8{3!#`2WN3wo)f6L0KwAkO>ECG`!KDm9U&Aj#-xeF?-Sk^#N4MY2 zU*K+D^9rFIH3hnht<#=H3WI*w_w%358;ibQ@gDcbe2?DO{khi%(YMbMP~(*oqXD#| zcd^%2_HY!2T)|3<7?dgI2@9=B zrQ>K)@X=?cYYwfUkafI;oV=Cl_)4^L)F~LK{e60f@)nUL_9PX7=P} z4(!MF^v4eT3Q6*RSm+w(M0qf7p-4!W{W=i;s*Nsw$amYf+IzTPq>erZZ$br>9Ku&G# zQ>k{y#@X0ocWW8vySn!eNXe`O3Y%_3`aNctsL8LKLf? z?6Zw>jM~rIAuZvY#F}!9x!2wyPHmY$t9Fb&-`GKKZtd5(a>#|`JwQMTK7EN7xJCFH z?SA3--bMO8tizXeA7jb64@jMGRAQ`)dyb1xr!5igNHU={3!alyt;=AmJY-u{FksRd zKX>P|+llT7=eS4T8e4a7uDcqQW855ncNZYo3G@y_xJTk2gJ92)L&;q2Qw7vz<6RhI zw69j=^56RYvX6_shj#K6oiw|&A4v9{sZgJ$*|?6mI630@V9j*%BPhV#=cM2qrIK|D zX~^2=#b_BJqjw6f(B9|fXc@G*vQPEeI0i=Wm_W(7i#qPuA#2z`m8LZXr_mU+T&hip zwl-wZS{Y*pGz4Z}7;?O?OauSAbKuX!kzq>kN!N}2zjcsT{WY;-f&2fqYxuuLt!}); zzFGn$l7;uW0FrtCtIWI(Z~-)N;#jTou6vwTdnnBt`K1nSXBWmDFf<|}SXlju8GT7c zDzz2vK5<9i|zx4aAwo>ml>7lgPd0s?QLl96URHi1yXy{%tO~s zB1rNfQ*OVcj6eJ36ND}6NeSvvnD7AKoH&5?A)dpd(bEr_K-F`5po-tN#zPiNm{fog zdTEAB$lHrs zvw2rdi&jvE*CC3{axexwRt7rIAKxW_`XF@}WU&<5Z!0Wu;|bkB=ic3t$g&s+{2=$K z31U7BBzu;|A(UkB{WVO#wKG;tPY!tm5^&I1j@<`TW zkOVQAZ7Fn3%tLi74>1hKdVCHA_siV;g=!pmqjfY@GpjhDBI`Ay&i(cDCaAr;sNF}{ z_kj!Uu;)iyu9|=&`(2GdpWSTTKSM@R6& z_?=updf73kQ0!e#x@RSg&bHodW%ofewxmL3UKv zTMJ+1vpAkWpANd$2jXtUM&UExm{Z0s*l-=Y=Amon3s0XrKTWp64IaR6*IF*$ZlUF& zIa$HMA-IAs1;!zJvsLuuvRVDy=Ijm$-`+)cj)UC@f1XM8eW_21cZw$=l-n&w$;qW9 zw`=bbZ=$nvGk%9hwTpl&c2mBe(xewGT=s0(E3A&8b1SOyS+$zk1YstbRUOg4qAl?> zwUCFwW8|FHZyoTgmud9>M}*D2IgOi#rM=uE;hQPB(l6b)Wm13d4|wPgP?H;qBq1JD zF-T_-*oR@T#)eJ+)A2>XeCadW_4;=!b4G?0~@LZY}0}fduLs=7p)>B0refS&IQ9HKyv$5Pm zG2O=VfCUAZ~&T8i~ub~MczSu)OH0Fc$8 zf#Fc77^^Tg=?-zqya)SOEr4lvciFmRh*NhwJEDl@WZI6vSQo#5X=lF}2BaMt?@+-P zEZ?dxju%+o4;6=74l={_n9x4T5I8M&UM+WK1uU2NU{7;60+}QrnOR9Ut41MqZpz>p zh46foHsXHtJm>WQTrDzft)Mw3m;$6GosoWZGT41ae13Au)u$Y(VOHATaIkeC(3Q&h z>VcPSZj`Mn;h^HXguh5)NH}XsFdQVdb%#_A_OYu;LNZ&5?Ckc5_S}UrpoM7W9e5G{H zH+LUjKRzIQpdf#+d{>tE85lf@s0+&|psOfF4I-zv&4ue#K$t&4(^&sDu= zpkFh5ae=>o9qEGs20d`c@@}}I`WHt+Y*%OaV)k!@w9a^Ccff>gYVJu5nGLi0%Eaxl z&4@=evMRjrkBM^cx%8ev=mjNp(JM5@4%^i1gWr<1!#UL)ny%Qi14)}Khz>lf)f)cd z#7#$U1fU)wQgLlm_!2yy^Y?&;-4P-XPYLlBela3c2=tLy#@u4wd1MVQ=I%fT@s284 z%HFf)FPIh|;ZB!vP2Y>(f-n$HMRt^yq`E^xYjjtBQP&WEbmPq>zVN&dnc(NpMgL^q zza9tZX=1W}Jsz233Ho}iweZR5Q^J14W3NT*V z&7`Y7z^4H(?Xq-rifx^#A)EE5_)J=zO1N~}z2}3DO}ps{3MJ=d-9>`_W&!#6&Sj7F zamHoZs_&S!*u>A%ER(KDhZ?|G0MFsW4r)OZS*@P^qaRDCoN`Ex;TKsANj{RI|6>|` zri8nBpAJfnX&-F5{c=#rif)dOs}Tq1g{%_YXthK!-KoV z{6mExa$bu*P!#;cn?y@l3HKMdUzfn0>5OpwCm8Flit9&qnU7EHQG42)JnmZ)(zdWQ zn(qC5G;*-r2sZ2VE3R9B3eUidt$(JwOhtd>EaX+O;n*OUqW^3hEz;-V`1~9Zv$3Z%2oX{`zyV*ZFoG#P_kv`siRF*W_g!otEmF)`6%U>cM7b8UK*-Ic(t z`NMNiU0vfG+qKR*&yr!`h07%UrAhyX(&mcoIsJVS^yrV@Ca-mQX0>S)mQ`^YmT7VN zVNGJu5!*d?QR^@Oq7m{9lq9WJQ=dWZ7X1e821ESUNV+1IoAMQED_lLg$z&KGl9z-n zXjxeRkdZVlf{b{?pL03 zQ*!BF198koVI*OzF)zBmeO)epNeN`$ehx6+x~2KsXLort#=Fk_;g+O$FQnKk3Vlf7 zpVNa_dGCm7c(zZcRWiw#sCP3>XMi;hr%gPp7gRm_eyvP|uUB9nRb3@tHwnE+>U8Yc zQaaS|a!X1*F!2!4Oyvcvu*rP1d}kt!5YAta^C7!oG+DQFmP*Ee*QJ zJQ8EpEHes3HOfI4kFJ7q|x*TFy`wax^-(b+5A`^^82E0<*bsX z-j?}yIXsACCY5AP8IotnI~TsiYU5&4emqafJZnP=H#V198~1Z7`w$g}Gp}fC_BcUB z*7?Wim_qy6UW32J82DI$|LWNGdltd94axExv&+@uL`aY0p;UIaU~AUfGVp!Uv?4vw z(U(>B)^E7*ZBhPwJ9Gjg!zQDGIpz?HA=GlhgBKc&<=W~cvU=t^VwXoBLD>#BSu{E| zi}a)h@p0GgMj0!IDnJWLXTk?QSu_9CWYcH*hKY2qJo-M$fnp3TwLQL>!Xg9OtDbE> za8=rqhm?}bo5;fv zU0{?;@sFUQ1PrMZeO!p*P=~=*T;{=1N1ME2@D|MVWTF15zQ`h3uU4g?Ua(ZM@b2X9 zhaZhP9~vZ1fJ%#Zi)O7+OUCDi9SnNFeC1A1p=$6rq#M3kDWf~*i=esSP2fHZU2X2} zcpt}y9*i&Ahsgfqm-l|2c*a<8HH=Q&AGhF)&@*(U;SOkz2Fdapo!v8vQjZoRQM3@T zqVXxE<0h6yewonzhCZn;fmJSiwUc1wiz&agR;S@@0e0Jo(c8jij7?lVZN=bRnC`vg z=W-Lpm&6-4DiOV#@}JfU5a*ph-fW|`4lbXbm_39hP$`0Ud^oSZ#aASh<98CzeYE6r zh;WO-kf0DZmIiJCMn8|VEe3(t`eIJW6e zY}1hXwPkhS7-KH$vwZzo-IO0>^d3zI8biH(%6x5~j)xLs`UK8Rl?$2`F1l7DnxTY} zmXsEJXVc?*_@{bOXl!$#1`b!XOKN>V{3km}0>_rb@Cz7!?ucFLSfMPouHnk?x5wUL zX`VGNw;3^UD{SA=kHc|@6rB|yC3!;OrEcGWv4VtHI4g@4##`+w*xX9GusX_`xyUMt zksR|DcXpM>h)#JBGx7gaPl27M-IB+8>-ipJQ8Z0?kmH}=Jz5_aiB;(g@dt|d)+3R7 zXsez%aLI`=s>N=J^dQ?5RODWZ{LGz_re&(YJTr+`t3T;}2yLTQtRl_m8sJ`pSs>e4 z?mD>7H#qfXGPGQzqiqhdFcx14^chAee!tQ?Mo0f{)M=QS(jHqIS@aU|I)QiOX6LTl zM*yxN$Ni>eo27sfpQt)5_0rP(*Ew_{oloN*obq~cUA`MVi*=I46*cuU>j#=96SX`> z%rPTz(FA3%xHQnen;k(NwKE61i+;bNV7(K25_td-@Lc-7;;B`ztagmRGkU?+4|z)6 zH|14o%^EEz^JNixm7Z+YkfS)V;d;QR75_9H(*q_b6_9+T)35W|n?m3-Az4=Pa*$U{$1hr^Z!Cz$X*WHAbO6o$&C$H${4HGHkB%MEI*-t zu<6pAo8MY4q}RQ{(O22?Or+GML~y5eIHCi+(PhfX|ES!5Zu+7=O*yDOwPWi&4kPMy z!z}TWVBybuKhr?9=Q43d_@EtP40dv=J)&W|+;s99N%$p1kO4QhxxYL28=E;mp|?0aB56{dI!8UAfElgz zXR#B#DY$T*!>Cnc$e41`L}6%7mEDvUk|pJsIi+hY&`QZlK&+>wB8bh?mV;Z@N&|xX zYs8T-Hqod0mv`l>(n0gVrhDRatwsY3YX#8DK)pjZM&-OJMunYK)v_i|V-*>_Re`C` z<%`mx8=hZrRS2$MPS+I(1ELVf^*^;}U51lwR*>)t(Qo4Ts%6=jc1v5SlyQ*hq6j&< z&x8(3X%8>(%xVA~-X+S_)qC28Ib#Z6*m1@TV4;uStfz!4X-0H6ExaSt7}A%w1Zt?t&Idal)10W>YDZK8p)5W*u2 zFes$Bazzdg7ruNoHD97OIZG&orKig0>xRF}$e&c}9|UaQ{f3iY|i?2RPP(-=l2(!Lp#90zHaE87&$4~*c1q4*!1Bu*t4|Y8^{xm(Y z>@D#Kb1qH8w>t;kLhRf88W!K6P2ZcrAD|a*HihoM$w{F0Ca37Z-AxRMqsDU%bM9`u z^8lMdq-Lat6>seS7Zea@p4DI0D_ijKEmPWFJHKl9^>x3!1~t;yHUhgcv1+1XeBEL@ zot-X;y7Rm}3Mm{!$;3_^s(X-dya@tBm7j(zc`8Hj#+(ynF>Y40;wmbl62XElt(CJE z9z1_kY_8MNLR(aYo;)dSVKKNDOogYwRz+RJQ%;Ru_#pD^bn)#WD~?gvsnQYpDvWSH zihsm$VZdJz`g-wmc4EL^5c)dt9e>?yyBXu5bKQhO=Vje|@5%kVVsyfoer|8l8Y7=~E?%T9 zR@QxP9_@@*Fj{TIw(OEc{j^eHi%_*;RHO4OznSC9VFNn?EcB}y2YeDP1BDft6`K{E z^%o{i9C#RfAbBT^=ij@4aqvUPR7h$ldIDukZQxSM7D0Ijdy#($I}v}1dXxP<_XUZ~ zMQ5zvn3*)u_-NjKKO~z=RmxTN#WvMt@1y5p*F=7k`6_<=9Y`2B8~A~fBBzq+N+rlpH+L46(|$A z3=yHT&`7ZgR<-=JMp^HBTi3_2EwJg30i3FuvH{kX)~5i?mu8`>4z3y5CdaEHuIV}^ z%d0Z3nVTlht3pp{d?wSYQcoG3CfBQCPw74;+pBU*hL=xT1H`xDrldRxI8;$d#B9V< zu2T+EE>ljjF0xLtZc{y+iT6lmT*I8h+`|UA)8N$<_C$Na$E3%`$EaojPH9dpPVr7b zPK8cMPK`>(*5}$6+I!k(+DF<~+Pm5k!qM1eRB56X<>%%yPIv{UKfTvK9Xl^gH^i#j zpiN;8I2WFD$S!QHPGm!{2v@pN=1j)Cu7D|9D|4{SF2c;U!kY6o`>PaU(SlA)=P1f~ zo_#0_NW8AJSLLqATAac*qf^*!%3B&|cWf?#Z_pkmGSphNAHQ#Fimvsp`LroSbH~#! zsGK?fy}eId6KEZU=7nc%R5fsph+|eHF2F6oCBP#i+c3ZPvDe6LBg<1SGG%D?-)6`r zD_t&dGH^0*GjK8R)Ns~t*KpPF*m2tZ+}A!IMJz!9T8AJS;Oz~lS zU#ON1Hn^6NHprGZ#Fn2>SW%p-DQA+l87V8YlXhE|Mmjv(`Ko(}s>c!o+gaN7WR=T| z)zD^VUx(6IRTea3*X0U4gZEYJSVX2J*E81y`XiniRE5tH2I2zccwu{;zq@aA4USu2 zjLhxT+_?Hz=;=N=o>#30?Wx1!oO5ejFsI9=9_bd_eFMYFft6%O4iqg>!ZfQ0)K-Lv z^JM!jVDgQTp9X#rl76h@ikCvVl0ElVqI*1X9l9S&COz@R5c)(@7=>B2T;?uyaX)nL zhWec$K!2K4N}uBl8r#DSJ8GvvP&g)RKcm7Kl@c&!IZ)E&N@Xc=MbC2uvT)ICaQQ$K z3Df}zxi<3&zM-6BPON72w`L8$YWD<;3nZFu`;kS$W6&jf1)KUzkz=L G)cz05(PHWV literal 0 HcmV?d00001 diff --git a/apps/web/app/globals.css b/apps/web/app/globals.css new file mode 100644 index 000000000..6af7ecbbb --- /dev/null +++ b/apps/web/app/globals.css @@ -0,0 +1,50 @@ +:root { + --background: #ffffff; + --foreground: #171717; +} + +@media (prefers-color-scheme: dark) { + :root { + --background: #0a0a0a; + --foreground: #ededed; + } +} + +html, +body { + max-width: 100vw; + overflow-x: hidden; +} + +body { + color: var(--foreground); + background: var(--background); +} + +* { + box-sizing: border-box; + padding: 0; + margin: 0; +} + +a { + color: inherit; + text-decoration: none; +} + +.imgDark { + display: none; +} + +@media (prefers-color-scheme: dark) { + html { + color-scheme: dark; + } + + .imgLight { + display: none; + } + .imgDark { + display: unset; + } +} diff --git a/apps/web/app/layout.tsx b/apps/web/app/layout.tsx new file mode 100644 index 000000000..846953755 --- /dev/null +++ b/apps/web/app/layout.tsx @@ -0,0 +1,31 @@ +import type { Metadata } from "next"; +import localFont from "next/font/local"; +import "./globals.css"; + +const geistSans = localFont({ + src: "./fonts/GeistVF.woff", + variable: "--font-geist-sans", +}); +const geistMono = localFont({ + src: "./fonts/GeistMonoVF.woff", + variable: "--font-geist-mono", +}); + +export const metadata: Metadata = { + title: "Create Next App", + description: "Generated by create next app", +}; + +export default function RootLayout({ + children, +}: Readonly<{ + children: React.ReactNode; +}>) { + return ( + + + {children} + + + ); +} diff --git a/apps/web/app/page.module.css b/apps/web/app/page.module.css new file mode 100644 index 000000000..3630662c6 --- /dev/null +++ b/apps/web/app/page.module.css @@ -0,0 +1,188 @@ +.page { + --gray-rgb: 0, 0, 0; + --gray-alpha-200: rgba(var(--gray-rgb), 0.08); + --gray-alpha-100: rgba(var(--gray-rgb), 0.05); + + --button-primary-hover: #383838; + --button-secondary-hover: #f2f2f2; + + display: grid; + grid-template-rows: 20px 1fr 20px; + align-items: center; + justify-items: center; + min-height: 100svh; + padding: 80px; + gap: 64px; + font-synthesis: none; +} + +@media (prefers-color-scheme: dark) { + .page { + --gray-rgb: 255, 255, 255; + --gray-alpha-200: rgba(var(--gray-rgb), 0.145); + --gray-alpha-100: rgba(var(--gray-rgb), 0.06); + + --button-primary-hover: #ccc; + --button-secondary-hover: #1a1a1a; + } +} + +.main { + display: flex; + flex-direction: column; + gap: 32px; + grid-row-start: 2; +} + +.main ol { + font-family: var(--font-geist-mono); + padding-left: 0; + margin: 0; + font-size: 14px; + line-height: 24px; + letter-spacing: -0.01em; + list-style-position: inside; +} + +.main li:not(:last-of-type) { + margin-bottom: 8px; +} + +.main code { + font-family: inherit; + background: var(--gray-alpha-100); + padding: 2px 4px; + border-radius: 4px; + font-weight: 600; +} + +.ctas { + display: flex; + gap: 16px; +} + +.ctas a { + appearance: none; + border-radius: 128px; + height: 48px; + padding: 0 20px; + border: none; + font-family: var(--font-geist-sans); + border: 1px solid transparent; + transition: background 0.2s, color 0.2s, border-color 0.2s; + cursor: pointer; + display: flex; + align-items: center; + justify-content: center; + font-size: 16px; + line-height: 20px; + font-weight: 500; +} + +a.primary { + background: var(--foreground); + color: var(--background); + gap: 8px; +} + +a.secondary { + border-color: var(--gray-alpha-200); + min-width: 180px; +} + +button.secondary { + appearance: none; + border-radius: 128px; + height: 48px; + padding: 0 20px; + border: none; + font-family: var(--font-geist-sans); + border: 1px solid transparent; + transition: background 0.2s, color 0.2s, border-color 0.2s; + cursor: pointer; + display: flex; + align-items: center; + justify-content: center; + font-size: 16px; + line-height: 20px; + font-weight: 500; + background: transparent; + border-color: var(--gray-alpha-200); + min-width: 180px; +} + +.footer { + font-family: var(--font-geist-sans); + grid-row-start: 3; + display: flex; + gap: 24px; +} + +.footer a { + display: flex; + align-items: center; + gap: 8px; +} + +.footer img { + flex-shrink: 0; +} + +/* Enable hover only on non-touch devices */ +@media (hover: hover) and (pointer: fine) { + a.primary:hover { + background: var(--button-primary-hover); + border-color: transparent; + } + + a.secondary:hover { + background: var(--button-secondary-hover); + border-color: transparent; + } + + .footer a:hover { + text-decoration: underline; + text-underline-offset: 4px; + } +} + +@media (max-width: 600px) { + .page { + padding: 32px; + padding-bottom: 80px; + } + + .main { + align-items: center; + } + + .main ol { + text-align: center; + } + + .ctas { + flex-direction: column; + } + + .ctas a { + font-size: 14px; + height: 40px; + padding: 0 16px; + } + + a.secondary { + min-width: auto; + } + + .footer { + flex-wrap: wrap; + align-items: center; + justify-content: center; + } +} + +@media (prefers-color-scheme: dark) { + .logo { + filter: invert(); + } +} diff --git a/apps/web/app/page.tsx b/apps/web/app/page.tsx new file mode 100644 index 000000000..b509205e4 --- /dev/null +++ b/apps/web/app/page.tsx @@ -0,0 +1,102 @@ +import Image, { type ImageProps } from "next/image"; +import { Button } from "@repo/ui/button"; +import styles from "./page.module.css"; + +type Props = Omit & { + srcLight: string; + srcDark: string; +}; + +const ThemeImage = (props: Props) => { + const { srcLight, srcDark, ...rest } = props; + + return ( + <> + + + + ); +}; + +export default function Home() { + return ( + + ); +} diff --git a/apps/web/eslint.config.js b/apps/web/eslint.config.js new file mode 100644 index 000000000..e8759ff50 --- /dev/null +++ b/apps/web/eslint.config.js @@ -0,0 +1,4 @@ +import { nextJsConfig } from "@repo/eslint-config/next-js"; + +/** @type {import("eslint").Linter.Config} */ +export default nextJsConfig; diff --git a/apps/web/next.config.js b/apps/web/next.config.js new file mode 100644 index 000000000..4678774e6 --- /dev/null +++ b/apps/web/next.config.js @@ -0,0 +1,4 @@ +/** @type {import('next').NextConfig} */ +const nextConfig = {}; + +export default nextConfig; diff --git a/apps/web/package.json b/apps/web/package.json new file mode 100644 index 000000000..e44a2638f --- /dev/null +++ b/apps/web/package.json @@ -0,0 +1,27 @@ +{ + "name": "web", + "version": "0.1.0", + "type": "module", + "private": true, + "scripts": { + "dev": "next dev --turbopack --port 3000", + "build": "next build", + "start": "next start", + "lint": "next lint --max-warnings 0", + "check-types": "tsc --noEmit" + }, + "dependencies": { + "@repo/ui": "workspace:*", + "next": "^15.1.0", + "react": "^19.0.0", + "react-dom": "^19.0.0" + }, + "devDependencies": { + "@repo/eslint-config": "workspace:*", + "@repo/typescript-config": "workspace:*", + "@types/node": "^20", + "@types/react": "18.3.1", + "@types/react-dom": "18.3.0", + "typescript": "5.5.4" + } +} diff --git a/apps/web/public/file-text.svg b/apps/web/public/file-text.svg new file mode 100644 index 000000000..9cfb3c986 --- /dev/null +++ b/apps/web/public/file-text.svg @@ -0,0 +1,3 @@ + + + diff --git a/apps/web/public/globe.svg b/apps/web/public/globe.svg new file mode 100644 index 000000000..4230a3d20 --- /dev/null +++ b/apps/web/public/globe.svg @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/apps/web/public/next.svg b/apps/web/public/next.svg new file mode 100644 index 000000000..5174b28c5 --- /dev/null +++ b/apps/web/public/next.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/apps/web/public/turborepo-dark.svg b/apps/web/public/turborepo-dark.svg new file mode 100644 index 000000000..dae38fed5 --- /dev/null +++ b/apps/web/public/turborepo-dark.svg @@ -0,0 +1,19 @@ + + + + + + + + + + + + + + + + + + + diff --git a/apps/web/public/turborepo-light.svg b/apps/web/public/turborepo-light.svg new file mode 100644 index 000000000..ddea91581 --- /dev/null +++ b/apps/web/public/turborepo-light.svg @@ -0,0 +1,19 @@ + + + + + + + + + + + + + + + + + + + diff --git a/apps/web/public/vercel.svg b/apps/web/public/vercel.svg new file mode 100644 index 000000000..0164ddc5a --- /dev/null +++ b/apps/web/public/vercel.svg @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/apps/web/public/window.svg b/apps/web/public/window.svg new file mode 100644 index 000000000..bbc780069 --- /dev/null +++ b/apps/web/public/window.svg @@ -0,0 +1,3 @@ + + + diff --git a/apps/web/tsconfig.json b/apps/web/tsconfig.json new file mode 100644 index 000000000..7aef05698 --- /dev/null +++ b/apps/web/tsconfig.json @@ -0,0 +1,20 @@ +{ + "extends": "@repo/typescript-config/nextjs.json", + "compilerOptions": { + "plugins": [ + { + "name": "next" + } + ] + }, + "include": [ + "**/*.ts", + "**/*.tsx", + "next-env.d.ts", + "next.config.js", + ".next/types/**/*.ts" + ], + "exclude": [ + "node_modules" + ] +} diff --git a/meta.json b/meta.json new file mode 100644 index 000000000..6fe74c615 --- /dev/null +++ b/meta.json @@ -0,0 +1,3 @@ +{ + "maintainedByCoreTeam": true +} diff --git a/package.json b/package.json new file mode 100644 index 000000000..c1657eb69 --- /dev/null +++ b/package.json @@ -0,0 +1,19 @@ +{ + "name": "my-turborepo", + "private": true, + "scripts": { + "build": "turbo build", + "dev": "turbo dev", + "lint": "turbo lint", + "format": "prettier --write \"**/*.{ts,tsx,md}\"" + }, + "devDependencies": { + "prettier": "^3.2.5", + "turbo": "^2.3.0", + "typescript": "5.5.4" + }, + "packageManager": "pnpm@9.0.0", + "engines": { + "node": ">=18" + } +} diff --git a/packages/eslint-config/README.md b/packages/eslint-config/README.md new file mode 100644 index 000000000..8b42d901b --- /dev/null +++ b/packages/eslint-config/README.md @@ -0,0 +1,3 @@ +# `@turbo/eslint-config` + +Collection of internal eslint configurations. diff --git a/packages/eslint-config/base.js b/packages/eslint-config/base.js new file mode 100644 index 000000000..31f5f43d5 --- /dev/null +++ b/packages/eslint-config/base.js @@ -0,0 +1,32 @@ +import js from "@eslint/js"; +import eslintConfigPrettier from "eslint-config-prettier"; +import turboPlugin from "eslint-plugin-turbo"; +import tseslint from "typescript-eslint"; +import onlyWarn from "eslint-plugin-only-warn"; + +/** + * A shared ESLint configuration for the repository. + * + * @type {import("eslint").Linter.Config} + * */ +export const config = [ + js.configs.recommended, + eslintConfigPrettier, + ...tseslint.configs.recommended, + { + plugins: { + turbo: turboPlugin, + }, + rules: { + "turbo/no-undeclared-env-vars": "warn", + }, + }, + { + plugins: { + onlyWarn, + }, + }, + { + ignores: ["dist/**"], + }, +]; diff --git a/packages/eslint-config/next.js b/packages/eslint-config/next.js new file mode 100644 index 000000000..1997af7b6 --- /dev/null +++ b/packages/eslint-config/next.js @@ -0,0 +1,49 @@ +import js from "@eslint/js"; +import eslintConfigPrettier from "eslint-config-prettier"; +import tseslint from "typescript-eslint"; +import pluginReactHooks from "eslint-plugin-react-hooks"; +import pluginReact from "eslint-plugin-react"; +import globals from "globals"; +import pluginNext from "@next/eslint-plugin-next"; +import { config as baseConfig } from "./base.js"; + +/** + * A custom ESLint configuration for libraries that use Next.js. + * + * @type {import("eslint").Linter.Config} + * */ +export const nextJsConfig = [ + ...baseConfig, + js.configs.recommended, + eslintConfigPrettier, + ...tseslint.configs.recommended, + { + ...pluginReact.configs.flat.recommended, + languageOptions: { + ...pluginReact.configs.flat.recommended.languageOptions, + globals: { + ...globals.serviceworker, + }, + }, + }, + { + plugins: { + "@next/next": pluginNext, + }, + rules: { + ...pluginNext.configs.recommended.rules, + ...pluginNext.configs["core-web-vitals"].rules, + }, + }, + { + plugins: { + "react-hooks": pluginReactHooks, + }, + settings: { react: { version: "detect" } }, + rules: { + ...pluginReactHooks.configs.recommended.rules, + // React scope no longer necessary with new JSX transform. + "react/react-in-jsx-scope": "off", + }, + }, +]; diff --git a/packages/eslint-config/package.json b/packages/eslint-config/package.json new file mode 100644 index 000000000..9aa054aec --- /dev/null +++ b/packages/eslint-config/package.json @@ -0,0 +1,24 @@ +{ + "name": "@repo/eslint-config", + "version": "0.0.0", + "type": "module", + "private": true, + "exports": { + "./base": "./base.js", + "./next-js": "./next.js", + "./react-internal": "./react-internal.js" + }, + "devDependencies": { + "@eslint/js": "^9.17.0", + "@next/eslint-plugin-next": "^15.1.0", + "eslint": "^9.15.0", + "eslint-config-prettier": "^9.1.0", + "eslint-plugin-only-warn": "^1.1.0", + "eslint-plugin-react": "^7.37.2", + "eslint-plugin-react-hooks": "^5.0.0", + "eslint-plugin-turbo": "^2.3.0", + "globals": "^15.12.0", + "typescript": "^5.3.3", + "typescript-eslint": "^8.15.0" + } +} diff --git a/packages/eslint-config/react-internal.js b/packages/eslint-config/react-internal.js new file mode 100644 index 000000000..0cc8b1d39 --- /dev/null +++ b/packages/eslint-config/react-internal.js @@ -0,0 +1,39 @@ +import js from "@eslint/js"; +import eslintConfigPrettier from "eslint-config-prettier"; +import tseslint from "typescript-eslint"; +import pluginReactHooks from "eslint-plugin-react-hooks"; +import pluginReact from "eslint-plugin-react"; +import globals from "globals"; +import { config as baseConfig } from "./base.js"; + +/** + * A custom ESLint configuration for libraries that use React. + * + * @type {import("eslint").Linter.Config} */ +export const config = [ + ...baseConfig, + js.configs.recommended, + eslintConfigPrettier, + ...tseslint.configs.recommended, + pluginReact.configs.flat.recommended, + { + languageOptions: { + ...pluginReact.configs.flat.recommended.languageOptions, + globals: { + ...globals.serviceworker, + ...globals.browser, + }, + }, + }, + { + plugins: { + "react-hooks": pluginReactHooks, + }, + settings: { react: { version: "detect" } }, + rules: { + ...pluginReactHooks.configs.recommended.rules, + // React scope no longer necessary with new JSX transform. + "react/react-in-jsx-scope": "off", + }, + }, +]; diff --git a/packages/typescript-config/base.json b/packages/typescript-config/base.json new file mode 100644 index 000000000..5117f2a3d --- /dev/null +++ b/packages/typescript-config/base.json @@ -0,0 +1,19 @@ +{ + "$schema": "https://json.schemastore.org/tsconfig", + "compilerOptions": { + "declaration": true, + "declarationMap": true, + "esModuleInterop": true, + "incremental": false, + "isolatedModules": true, + "lib": ["es2022", "DOM", "DOM.Iterable"], + "module": "NodeNext", + "moduleDetection": "force", + "moduleResolution": "NodeNext", + "noUncheckedIndexedAccess": true, + "resolveJsonModule": true, + "skipLibCheck": true, + "strict": true, + "target": "ES2022" + } +} diff --git a/packages/typescript-config/nextjs.json b/packages/typescript-config/nextjs.json new file mode 100644 index 000000000..e6defa48f --- /dev/null +++ b/packages/typescript-config/nextjs.json @@ -0,0 +1,12 @@ +{ + "$schema": "https://json.schemastore.org/tsconfig", + "extends": "./base.json", + "compilerOptions": { + "plugins": [{ "name": "next" }], + "module": "ESNext", + "moduleResolution": "Bundler", + "allowJs": true, + "jsx": "preserve", + "noEmit": true + } +} diff --git a/packages/typescript-config/package.json b/packages/typescript-config/package.json new file mode 100644 index 000000000..27c0e6043 --- /dev/null +++ b/packages/typescript-config/package.json @@ -0,0 +1,9 @@ +{ + "name": "@repo/typescript-config", + "version": "0.0.0", + "private": true, + "license": "MIT", + "publishConfig": { + "access": "public" + } +} diff --git a/packages/typescript-config/react-library.json b/packages/typescript-config/react-library.json new file mode 100644 index 000000000..c3a1b26fb --- /dev/null +++ b/packages/typescript-config/react-library.json @@ -0,0 +1,7 @@ +{ + "$schema": "https://json.schemastore.org/tsconfig", + "extends": "./base.json", + "compilerOptions": { + "jsx": "react-jsx" + } +} diff --git a/packages/ui/eslint.config.mjs b/packages/ui/eslint.config.mjs new file mode 100644 index 000000000..19170f88e --- /dev/null +++ b/packages/ui/eslint.config.mjs @@ -0,0 +1,4 @@ +import { config } from "@repo/eslint-config/react-internal"; + +/** @type {import("eslint").Linter.Config} */ +export default config; diff --git a/packages/ui/package.json b/packages/ui/package.json new file mode 100644 index 000000000..747e66f1c --- /dev/null +++ b/packages/ui/package.json @@ -0,0 +1,28 @@ +{ + "name": "@repo/ui", + "version": "0.0.0", + "private": true, + "exports": { + "./button": "./src/button.tsx", + "./card": "./src/card.tsx", + "./code": "./src/code.tsx" + }, + "scripts": { + "lint": "eslint . --max-warnings 0", + "generate:component": "turbo gen react-component", + "check-types": "tsc --noEmit" + }, + "devDependencies": { + "@repo/eslint-config": "workspace:*", + "@repo/typescript-config": "workspace:*", + "@turbo/gen": "^1.12.4", + "@types/node": "^20.11.24", + "@types/react": "18.3.0", + "@types/react-dom": "18.3.1", + "typescript": "5.5.4" + }, + "dependencies": { + "react": "^19.0.0", + "react-dom": "^19.0.0" + } +} diff --git a/packages/ui/src/button.tsx b/packages/ui/src/button.tsx new file mode 100644 index 000000000..78e5420c3 --- /dev/null +++ b/packages/ui/src/button.tsx @@ -0,0 +1,20 @@ +"use client"; + +import { ReactNode } from "react"; + +interface ButtonProps { + children: ReactNode; + className?: string; + appName: string; +} + +export const Button = ({ children, className, appName }: ButtonProps) => { + return ( + + ); +}; diff --git a/packages/ui/src/card.tsx b/packages/ui/src/card.tsx new file mode 100644 index 000000000..7b988937b --- /dev/null +++ b/packages/ui/src/card.tsx @@ -0,0 +1,27 @@ +import { type JSX } from "react"; + +export function Card({ + className, + title, + children, + href, +}: { + className?: string; + title: string; + children: React.ReactNode; + href: string; +}): JSX.Element { + return ( + +

+ {title} -> +

+

{children}

+
+ ); +} diff --git a/packages/ui/src/code.tsx b/packages/ui/src/code.tsx new file mode 100644 index 000000000..f7cbd22a8 --- /dev/null +++ b/packages/ui/src/code.tsx @@ -0,0 +1,11 @@ +import { type JSX } from "react"; + +export function Code({ + children, + className, +}: { + children: React.ReactNode; + className?: string; +}): JSX.Element { + return {children}; +} diff --git a/packages/ui/tsconfig.json b/packages/ui/tsconfig.json new file mode 100644 index 000000000..ca86687c4 --- /dev/null +++ b/packages/ui/tsconfig.json @@ -0,0 +1,8 @@ +{ + "extends": "@repo/typescript-config/react-library.json", + "compilerOptions": { + "outDir": "dist" + }, + "include": ["src"], + "exclude": ["node_modules", "dist"] +} diff --git a/packages/ui/turbo/generators/config.ts b/packages/ui/turbo/generators/config.ts new file mode 100644 index 000000000..40100baa6 --- /dev/null +++ b/packages/ui/turbo/generators/config.ts @@ -0,0 +1,30 @@ +import type { PlopTypes } from "@turbo/gen"; + +// Learn more about Turborepo Generators at https://turbo.build/repo/docs/core-concepts/monorepos/code-generation + +export default function generator(plop: PlopTypes.NodePlopAPI): void { + // A simple generator to add a new React component to the internal UI library + plop.setGenerator("react-component", { + description: "Adds a new react component", + prompts: [ + { + type: "input", + name: "name", + message: "What is the name of the component?", + }, + ], + actions: [ + { + type: "add", + path: "src/{{kebabCase name}}.tsx", + templateFile: "templates/component.hbs", + }, + { + type: "append", + path: "package.json", + pattern: /"exports": {(?)/g, + template: ' "./{{kebabCase name}}": "./src/{{kebabCase name}}.tsx",', + }, + ], + }); +} diff --git a/packages/ui/turbo/generators/templates/component.hbs b/packages/ui/turbo/generators/templates/component.hbs new file mode 100644 index 000000000..d968b9e3a --- /dev/null +++ b/packages/ui/turbo/generators/templates/component.hbs @@ -0,0 +1,8 @@ +export const {{ pascalCase name }} = ({ children }: { children: React.ReactNode }) => { + return ( +
+

{{ pascalCase name }} Component

+ {children} +
+ ); +}; diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml new file mode 100644 index 000000000..e69c509ae --- /dev/null +++ b/pnpm-lock.yaml @@ -0,0 +1,4247 @@ +lockfileVersion: '9.0' + +settings: + autoInstallPeers: true + excludeLinksFromLockfile: false + +importers: + + .: + devDependencies: + prettier: + specifier: ^3.2.5 + version: 3.3.3 + turbo: + specifier: ^2.3.0 + version: 2.3.1 + typescript: + specifier: 5.5.4 + version: 5.5.4 + + apps/docs: + dependencies: + '@repo/ui': + specifier: workspace:* + version: link:../../packages/ui + next: + specifier: ^15.1.0 + version: 15.1.0(react-dom@19.0.0(react@19.0.0))(react@19.0.0) + react: + specifier: ^19.0.0 + version: 19.0.0 + react-dom: + specifier: ^19.0.0 + version: 19.0.0(react@19.0.0) + devDependencies: + '@repo/eslint-config': + specifier: workspace:* + version: link:../../packages/eslint-config + '@repo/typescript-config': + specifier: workspace:* + version: link:../../packages/typescript-config + '@types/node': + specifier: ^20 + version: 20.17.6 + '@types/react': + specifier: 18.3.1 + version: 18.3.1 + '@types/react-dom': + specifier: 18.3.0 + version: 18.3.0 + typescript: + specifier: 5.5.4 + version: 5.5.4 + + apps/web: + dependencies: + '@repo/ui': + specifier: workspace:* + version: link:../../packages/ui + next: + specifier: ^15.1.0 + version: 15.1.0(react-dom@19.0.0(react@19.0.0))(react@19.0.0) + react: + specifier: ^19.0.0 + version: 19.0.0 + react-dom: + specifier: ^19.0.0 + version: 19.0.0(react@19.0.0) + devDependencies: + '@repo/eslint-config': + specifier: workspace:* + version: link:../../packages/eslint-config + '@repo/typescript-config': + specifier: workspace:* + version: link:../../packages/typescript-config + '@types/node': + specifier: ^20 + version: 20.17.6 + '@types/react': + specifier: 18.3.1 + version: 18.3.1 + '@types/react-dom': + specifier: 18.3.0 + version: 18.3.0 + typescript: + specifier: 5.5.4 + version: 5.5.4 + + packages/eslint-config: + devDependencies: + '@eslint/js': + specifier: ^9.17.0 + version: 9.17.0 + '@next/eslint-plugin-next': + specifier: ^15.1.0 + version: 15.1.0 + eslint: + specifier: ^9.15.0 + version: 9.15.0 + eslint-config-prettier: + specifier: ^9.1.0 + version: 9.1.0(eslint@9.15.0) + eslint-plugin-only-warn: + specifier: ^1.1.0 + version: 1.1.0 + eslint-plugin-react: + specifier: ^7.37.2 + version: 7.37.2(eslint@9.15.0) + eslint-plugin-react-hooks: + specifier: ^5.0.0 + version: 5.0.0(eslint@9.15.0) + eslint-plugin-turbo: + specifier: ^2.3.0 + version: 2.3.1(eslint@9.15.0) + globals: + specifier: ^15.12.0 + version: 15.12.0 + typescript: + specifier: ^5.3.3 + version: 5.5.4 + typescript-eslint: + specifier: ^8.15.0 + version: 8.15.0(eslint@9.15.0)(typescript@5.5.4) + + packages/typescript-config: {} + + packages/ui: + dependencies: + react: + specifier: ^19.0.0 + version: 19.0.0 + react-dom: + specifier: ^19.0.0 + version: 19.0.0(react@19.0.0) + devDependencies: + '@repo/eslint-config': + specifier: workspace:* + version: link:../eslint-config + '@repo/typescript-config': + specifier: workspace:* + version: link:../typescript-config + '@turbo/gen': + specifier: ^1.12.4 + version: 1.13.4(@types/node@20.17.6)(typescript@5.5.4) + '@types/node': + specifier: ^20.11.24 + version: 20.17.6 + '@types/react': + specifier: 18.3.0 + version: 18.3.0 + '@types/react-dom': + specifier: 18.3.1 + version: 18.3.1 + typescript: + specifier: 5.5.4 + version: 5.5.4 + +packages: + + '@babel/runtime-corejs3@7.26.0': + resolution: {integrity: sha512-YXHu5lN8kJCb1LOb9PgV6pvak43X2h4HvRApcN5SdWeaItQOzfn1hgP6jasD6KWQyJDBxrVmA9o9OivlnNJK/w==} + engines: {node: '>=6.9.0'} + + '@cspotcode/source-map-support@0.8.1': + resolution: {integrity: sha512-IchNf6dN4tHoMFIn/7OE8LWZ19Y6q/67Bmf6vnGREv8RSbBVb9LPJxEcnwrcwX6ixSvaiGoomAUvu4YSxXrVgw==} + engines: {node: '>=12'} + + '@emnapi/runtime@1.3.1': + resolution: {integrity: sha512-kEBmG8KyqtxJZv+ygbEim+KCGtIq1fC22Ms3S4ziXmYKm8uyoLX0MHONVKwp+9opg390VaKRNt4a7A9NwmpNhw==} + + '@eslint-community/eslint-utils@4.4.1': + resolution: {integrity: sha512-s3O3waFUrMV8P/XaF/+ZTp1X9XBZW1a4B97ZnjQF2KYWaFD2A8KyFBsrsfSjEmjn3RGWAIuvlneuZm3CUK3jbA==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + peerDependencies: + eslint: ^6.0.0 || ^7.0.0 || >=8.0.0 + + '@eslint-community/regexpp@4.12.1': + resolution: {integrity: sha512-CCZCDJuduB9OUkFkY2IgppNZMi2lBQgD2qzwXkEia16cge2pijY/aXi96CJMquDMn3nJdlPV1A5KrJEXwfLNzQ==} + engines: {node: ^12.0.0 || ^14.0.0 || >=16.0.0} + + '@eslint/config-array@0.19.0': + resolution: {integrity: sha512-zdHg2FPIFNKPdcHWtiNT+jEFCHYVplAXRDlQDyqy0zGx/q2parwh7brGJSiTxRk/TSMkbM//zt/f5CHgyTyaSQ==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + + '@eslint/core@0.9.0': + resolution: {integrity: sha512-7ATR9F0e4W85D/0w7cU0SNj7qkAexMG+bAHEZOjo9akvGuhHE2m7umzWzfnpa0XAg5Kxc1BWmtPMV67jJ+9VUg==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + + '@eslint/eslintrc@3.2.0': + resolution: {integrity: sha512-grOjVNN8P3hjJn/eIETF1wwd12DdnwFDoyceUJLYYdkpbwq3nLi+4fqrTAONx7XDALqlL220wC/RHSC/QTI/0w==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + + '@eslint/js@9.15.0': + resolution: {integrity: sha512-tMTqrY+EzbXmKJR5ToI8lxu7jaN5EdmrBFJpQk5JmSlyLsx6o4t27r883K5xsLuCYCpfKBCGswMSWXsM+jB7lg==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + + '@eslint/js@9.17.0': + resolution: {integrity: sha512-Sxc4hqcs1kTu0iID3kcZDW3JHq2a77HO9P8CP6YEA/FpH3Ll8UXE2r/86Rz9YJLKme39S9vU5OWNjC6Xl0Cr3w==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + + '@eslint/object-schema@2.1.4': + resolution: {integrity: sha512-BsWiH1yFGjXXS2yvrf5LyuoSIIbPrGUWob917o+BTKuZ7qJdxX8aJLRxs1fS9n6r7vESrq1OUqb68dANcFXuQQ==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + + '@eslint/plugin-kit@0.2.3': + resolution: {integrity: sha512-2b/g5hRmpbb1o4GnTZax9N9m0FXzz9OV42ZzI4rDDMDuHUqigAiQCEWChBWCY4ztAGVRjoWT19v0yMmc5/L5kA==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + + '@humanfs/core@0.19.1': + resolution: {integrity: sha512-5DyQ4+1JEUzejeK1JGICcideyfUbGixgS9jNgex5nqkW+cY7WZhxBigmieN5Qnw9ZosSNVC9KQKyb+GUaGyKUA==} + engines: {node: '>=18.18.0'} + + '@humanfs/node@0.16.6': + resolution: {integrity: sha512-YuI2ZHQL78Q5HbhDiBA1X4LmYdXCKCMQIfw0pw7piHJwyREFebJUvrQN4cMssyES6x+vfUbx1CIpaQUKYdQZOw==} + engines: {node: '>=18.18.0'} + + '@humanwhocodes/module-importer@1.0.1': + resolution: {integrity: sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==} + engines: {node: '>=12.22'} + + '@humanwhocodes/retry@0.3.1': + resolution: {integrity: sha512-JBxkERygn7Bv/GbN5Rv8Ul6LVknS+5Bp6RgDC/O8gEBU/yeH5Ui5C/OlWrTb6qct7LjjfT6Re2NxB0ln0yYybA==} + engines: {node: '>=18.18'} + + '@humanwhocodes/retry@0.4.1': + resolution: {integrity: sha512-c7hNEllBlenFTHBky65mhq8WD2kbN9Q6gk0bTk8lSBvc554jpXSkST1iePudpt7+A/AQvuHs9EMqjHDXMY1lrA==} + engines: {node: '>=18.18'} + + '@img/sharp-darwin-arm64@0.33.5': + resolution: {integrity: sha512-UT4p+iz/2H4twwAoLCqfA9UH5pI6DggwKEGuaPy7nCVQ8ZsiY5PIcrRvD1DzuY3qYL07NtIQcWnBSY/heikIFQ==} + engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0} + cpu: [arm64] + os: [darwin] + + '@img/sharp-darwin-x64@0.33.5': + resolution: {integrity: sha512-fyHac4jIc1ANYGRDxtiqelIbdWkIuQaI84Mv45KvGRRxSAa7o7d1ZKAOBaYbnepLC1WqxfpimdeWfvqqSGwR2Q==} + engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0} + cpu: [x64] + os: [darwin] + + '@img/sharp-libvips-darwin-arm64@1.0.4': + resolution: {integrity: sha512-XblONe153h0O2zuFfTAbQYAX2JhYmDHeWikp1LM9Hul9gVPjFY427k6dFEcOL72O01QxQsWi761svJ/ev9xEDg==} + cpu: [arm64] + os: [darwin] + + '@img/sharp-libvips-darwin-x64@1.0.4': + resolution: {integrity: sha512-xnGR8YuZYfJGmWPvmlunFaWJsb9T/AO2ykoP3Fz/0X5XV2aoYBPkX6xqCQvUTKKiLddarLaxpzNe+b1hjeWHAQ==} + cpu: [x64] + os: [darwin] + + '@img/sharp-libvips-linux-arm64@1.0.4': + resolution: {integrity: sha512-9B+taZ8DlyyqzZQnoeIvDVR/2F4EbMepXMc/NdVbkzsJbzkUjhXv/70GQJ7tdLA4YJgNP25zukcxpX2/SueNrA==} + cpu: [arm64] + os: [linux] + + '@img/sharp-libvips-linux-arm@1.0.5': + resolution: {integrity: sha512-gvcC4ACAOPRNATg/ov8/MnbxFDJqf/pDePbBnuBDcjsI8PssmjoKMAz4LtLaVi+OnSb5FK/yIOamqDwGmXW32g==} + cpu: [arm] + os: [linux] + + '@img/sharp-libvips-linux-s390x@1.0.4': + resolution: {integrity: sha512-u7Wz6ntiSSgGSGcjZ55im6uvTrOxSIS8/dgoVMoiGE9I6JAfU50yH5BoDlYA1tcuGS7g/QNtetJnxA6QEsCVTA==} + cpu: [s390x] + os: [linux] + + '@img/sharp-libvips-linux-x64@1.0.4': + resolution: {integrity: sha512-MmWmQ3iPFZr0Iev+BAgVMb3ZyC4KeFc3jFxnNbEPas60e1cIfevbtuyf9nDGIzOaW9PdnDciJm+wFFaTlj5xYw==} + cpu: [x64] + os: [linux] + + '@img/sharp-libvips-linuxmusl-arm64@1.0.4': + resolution: {integrity: sha512-9Ti+BbTYDcsbp4wfYib8Ctm1ilkugkA/uscUn6UXK1ldpC1JjiXbLfFZtRlBhjPZ5o1NCLiDbg8fhUPKStHoTA==} + cpu: [arm64] + os: [linux] + + '@img/sharp-libvips-linuxmusl-x64@1.0.4': + resolution: {integrity: sha512-viYN1KX9m+/hGkJtvYYp+CCLgnJXwiQB39damAO7WMdKWlIhmYTfHjwSbQeUK/20vY154mwezd9HflVFM1wVSw==} + cpu: [x64] + os: [linux] + + '@img/sharp-linux-arm64@0.33.5': + resolution: {integrity: sha512-JMVv+AMRyGOHtO1RFBiJy/MBsgz0x4AWrT6QoEVVTyh1E39TrCUpTRI7mx9VksGX4awWASxqCYLCV4wBZHAYxA==} + engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0} + cpu: [arm64] + os: [linux] + + '@img/sharp-linux-arm@0.33.5': + resolution: {integrity: sha512-JTS1eldqZbJxjvKaAkxhZmBqPRGmxgu+qFKSInv8moZ2AmT5Yib3EQ1c6gp493HvrvV8QgdOXdyaIBrhvFhBMQ==} + engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0} + cpu: [arm] + os: [linux] + + '@img/sharp-linux-s390x@0.33.5': + resolution: {integrity: sha512-y/5PCd+mP4CA/sPDKl2961b+C9d+vPAveS33s6Z3zfASk2j5upL6fXVPZi7ztePZ5CuH+1kW8JtvxgbuXHRa4Q==} + engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0} + cpu: [s390x] + os: [linux] + + '@img/sharp-linux-x64@0.33.5': + resolution: {integrity: sha512-opC+Ok5pRNAzuvq1AG0ar+1owsu842/Ab+4qvU879ippJBHvyY5n2mxF1izXqkPYlGuP/M556uh53jRLJmzTWA==} + engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0} + cpu: [x64] + os: [linux] + + '@img/sharp-linuxmusl-arm64@0.33.5': + resolution: {integrity: sha512-XrHMZwGQGvJg2V/oRSUfSAfjfPxO+4DkiRh6p2AFjLQztWUuY/o8Mq0eMQVIY7HJ1CDQUJlxGGZRw1a5bqmd1g==} + engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0} + cpu: [arm64] + os: [linux] + + '@img/sharp-linuxmusl-x64@0.33.5': + resolution: {integrity: sha512-WT+d/cgqKkkKySYmqoZ8y3pxx7lx9vVejxW/W4DOFMYVSkErR+w7mf2u8m/y4+xHe7yY9DAXQMWQhpnMuFfScw==} + engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0} + cpu: [x64] + os: [linux] + + '@img/sharp-wasm32@0.33.5': + resolution: {integrity: sha512-ykUW4LVGaMcU9lu9thv85CbRMAwfeadCJHRsg2GmeRa/cJxsVY9Rbd57JcMxBkKHag5U/x7TSBpScF4U8ElVzg==} + engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0} + cpu: [wasm32] + + '@img/sharp-win32-ia32@0.33.5': + resolution: {integrity: sha512-T36PblLaTwuVJ/zw/LaH0PdZkRz5rd3SmMHX8GSmR7vtNSP5Z6bQkExdSK7xGWyxLw4sUknBuugTelgw2faBbQ==} + engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0} + cpu: [ia32] + os: [win32] + + '@img/sharp-win32-x64@0.33.5': + resolution: {integrity: sha512-MpY/o8/8kj+EcnxwvrP4aTJSWw/aZ7JIGR4aBeZkZw5B7/Jn+tY9/VNwtcoGmdT7GfggGIU4kygOMSbYnOrAbg==} + engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0} + cpu: [x64] + os: [win32] + + '@jridgewell/resolve-uri@3.1.2': + resolution: {integrity: sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==} + engines: {node: '>=6.0.0'} + + '@jridgewell/sourcemap-codec@1.5.0': + resolution: {integrity: sha512-gv3ZRaISU3fjPAgNsriBRqGWQL6quFx04YMPW/zD8XMLsU32mhCCbfbO6KZFLjvYpCZ8zyDEgqsgf+PwPaM7GQ==} + + '@jridgewell/trace-mapping@0.3.9': + resolution: {integrity: sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ==} + + '@next/env@15.1.0': + resolution: {integrity: sha512-UcCO481cROsqJuszPPXJnb7GGuLq617ve4xuAyyNG4VSSocJNtMU5Fsx+Lp6mlN8c7W58aZLc5y6D/2xNmaK+w==} + + '@next/eslint-plugin-next@15.1.0': + resolution: {integrity: sha512-+jPT0h+nelBT6HC9ZCHGc7DgGVy04cv4shYdAe6tKlEbjQUtwU3LzQhzbDHQyY2m6g39m6B0kOFVuLGBrxxbGg==} + + '@next/swc-darwin-arm64@15.1.0': + resolution: {integrity: sha512-ZU8d7xxpX14uIaFC3nsr4L++5ZS/AkWDm1PzPO6gD9xWhFkOj2hzSbSIxoncsnlJXB1CbLOfGVN4Zk9tg83PUw==} + engines: {node: '>= 10'} + cpu: [arm64] + os: [darwin] + + '@next/swc-darwin-x64@15.1.0': + resolution: {integrity: sha512-DQ3RiUoW2XC9FcSM4ffpfndq1EsLV0fj0/UY33i7eklW5akPUCo6OX2qkcLXZ3jyPdo4sf2flwAED3AAq3Om2Q==} + engines: {node: '>= 10'} + cpu: [x64] + os: [darwin] + + '@next/swc-linux-arm64-gnu@15.1.0': + resolution: {integrity: sha512-M+vhTovRS2F//LMx9KtxbkWk627l5Q7AqXWWWrfIzNIaUFiz2/NkOFkxCFyNyGACi5YbA8aekzCLtbDyfF/v5Q==} + engines: {node: '>= 10'} + cpu: [arm64] + os: [linux] + + '@next/swc-linux-arm64-musl@15.1.0': + resolution: {integrity: sha512-Qn6vOuwaTCx3pNwygpSGtdIu0TfS1KiaYLYXLH5zq1scoTXdwYfdZtwvJTpB1WrLgiQE2Ne2kt8MZok3HlFqmg==} + engines: {node: '>= 10'} + cpu: [arm64] + os: [linux] + + '@next/swc-linux-x64-gnu@15.1.0': + resolution: {integrity: sha512-yeNh9ofMqzOZ5yTOk+2rwncBzucc6a1lyqtg8xZv0rH5znyjxHOWsoUtSq4cUTeeBIiXXX51QOOe+VoCjdXJRw==} + engines: {node: '>= 10'} + cpu: [x64] + os: [linux] + + '@next/swc-linux-x64-musl@15.1.0': + resolution: {integrity: sha512-t9IfNkHQs/uKgPoyEtU912MG6a1j7Had37cSUyLTKx9MnUpjj+ZDKw9OyqTI9OwIIv0wmkr1pkZy+3T5pxhJPg==} + engines: {node: '>= 10'} + cpu: [x64] + os: [linux] + + '@next/swc-win32-arm64-msvc@15.1.0': + resolution: {integrity: sha512-WEAoHyG14t5sTavZa1c6BnOIEukll9iqFRTavqRVPfYmfegOAd5MaZfXgOGG6kGo1RduyGdTHD4+YZQSdsNZXg==} + engines: {node: '>= 10'} + cpu: [arm64] + os: [win32] + + '@next/swc-win32-x64-msvc@15.1.0': + resolution: {integrity: sha512-J1YdKuJv9xcixzXR24Dv+4SaDKc2jj31IVUEMdO5xJivMTXuE6MAdIi4qPjSymHuFG8O5wbfWKnhJUcHHpj5CA==} + engines: {node: '>= 10'} + cpu: [x64] + os: [win32] + + '@nodelib/fs.scandir@2.1.5': + resolution: {integrity: sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==} + engines: {node: '>= 8'} + + '@nodelib/fs.stat@2.0.5': + resolution: {integrity: sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==} + engines: {node: '>= 8'} + + '@nodelib/fs.walk@1.2.8': + resolution: {integrity: sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==} + engines: {node: '>= 8'} + + '@swc/counter@0.1.3': + resolution: {integrity: sha512-e2BR4lsJkkRlKZ/qCHPw9ZaSxc0MVUd7gtbtaB7aMvHeJVYe8sOB8DBZkP2DtISHGSku9sCK6T6cnY0CtXrOCQ==} + + '@swc/helpers@0.5.15': + resolution: {integrity: sha512-JQ5TuMi45Owi4/BIMAJBoSQoOJu12oOk/gADqlcUL9JEdHB8vyjUSsxqeNXnmXHjYKMi2WcYtezGEEhqUI/E2g==} + + '@tootallnate/quickjs-emscripten@0.23.0': + resolution: {integrity: sha512-C5Mc6rdnsaJDjO3UpGW/CQTHtCKaYlScZTly4JIu97Jxo/odCiH0ITnDXSJPTOrEKk/ycSZ0AOgTmkDtkOsvIA==} + + '@tsconfig/node10@1.0.11': + resolution: {integrity: sha512-DcRjDCujK/kCk/cUe8Xz8ZSpm8mS3mNNpta+jGCA6USEDfktlNvm1+IuZ9eTcDbNk41BHwpHHeW+N1lKCz4zOw==} + + '@tsconfig/node12@1.0.11': + resolution: {integrity: sha512-cqefuRsh12pWyGsIoBKJA9luFu3mRxCA+ORZvA4ktLSzIuCUtWVxGIuXigEwO5/ywWFMZ2QEGKWvkZG1zDMTag==} + + '@tsconfig/node14@1.0.3': + resolution: {integrity: sha512-ysT8mhdixWK6Hw3i1V2AeRqZ5WfXg1G43mqoYlM2nc6388Fq5jcXyr5mRsqViLx/GJYdoL0bfXD8nmF+Zn/Iow==} + + '@tsconfig/node16@1.0.4': + resolution: {integrity: sha512-vxhUy4J8lyeyinH7Azl1pdd43GJhZH/tP2weN8TntQblOY+A0XbT8DJk1/oCPuOOyg/Ja757rG0CgHcWC8OfMA==} + + '@turbo/gen@1.13.4': + resolution: {integrity: sha512-PK38N1fHhDUyjLi0mUjv0RbX0xXGwDLQeRSGsIlLcVpP1B5fwodSIwIYXc9vJok26Yne94BX5AGjueYsUT3uUw==} + hasBin: true + + '@turbo/workspaces@1.13.4': + resolution: {integrity: sha512-3uYg2b5TWCiupetbDFMbBFMHl33xQTvp5DNg0fZSYal73Z9AlFH9yWabHWMYw6ywmwM1evkYRpTVA2n7GgqT5A==} + hasBin: true + + '@types/estree@1.0.6': + resolution: {integrity: sha512-AYnb1nQyY49te+VRAVgmzfcgjYS91mY5P0TKUDCLEM+gNnA+3T6rWITXRLYCpahpqSQbN5cE+gHpnPyXjHWxcw==} + + '@types/glob@7.2.0': + resolution: {integrity: sha512-ZUxbzKl0IfJILTS6t7ip5fQQM/J3TJYubDm3nMbgubNNYS62eXeUpoLUC8/7fJNiFYHTrGPQn7hspDUzIHX3UA==} + + '@types/inquirer@6.5.0': + resolution: {integrity: sha512-rjaYQ9b9y/VFGOpqBEXRavc3jh0a+e6evAbI31tMda8VlPaSy0AZJfXsvmIe3wklc7W6C3zCSfleuMXR7NOyXw==} + + '@types/json-schema@7.0.15': + resolution: {integrity: sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==} + + '@types/minimatch@5.1.2': + resolution: {integrity: sha512-K0VQKziLUWkVKiRVrx4a40iPaxTUefQmjtkQofBkYRcoaaL/8rhwDWww9qWbrgicNOgnpIsMxyNIUM4+n6dUIA==} + + '@types/node@20.17.6': + resolution: {integrity: sha512-VEI7OdvK2wP7XHnsuXbAJnEpEkF6NjSN45QJlL4VGqZSXsnicpesdTWsg9RISeSdYd3yeRj/y3k5KGjUXYnFwQ==} + + '@types/prop-types@15.7.13': + resolution: {integrity: sha512-hCZTSvwbzWGvhqxp/RqVqwU999pBf2vp7hzIjiYOsl8wqOmUxkQ6ddw1cV3l8811+kdUFus/q4d1Y3E3SyEifA==} + + '@types/react-dom@18.3.0': + resolution: {integrity: sha512-EhwApuTmMBmXuFOikhQLIBUn6uFg81SwLMOAUgodJF14SOBOCMdU04gDoYi0WOJJHD144TL32z4yDqCW3dnkQg==} + + '@types/react-dom@18.3.1': + resolution: {integrity: sha512-qW1Mfv8taImTthu4KoXgDfLuk4bydU6Q/TkADnDWWHwi4NX4BR+LWfTp2sVmTqRrsHvyDDTelgelxJ+SsejKKQ==} + + '@types/react@18.3.0': + resolution: {integrity: sha512-DiUcKjzE6soLyln8NNZmyhcQjVv+WsUIFSqetMN0p8927OztKT4VTfFTqsbAi5oAGIcgOmOajlfBqyptDDjZRw==} + + '@types/react@18.3.1': + resolution: {integrity: sha512-V0kuGBX3+prX+DQ/7r2qsv1NsdfnCLnTgnRJ1pYnxykBhGMz+qj+box5lq7XsO5mtZsBqpjwwTu/7wszPfMBcw==} + + '@types/through@0.0.33': + resolution: {integrity: sha512-HsJ+z3QuETzP3cswwtzt2vEIiHBk/dCcHGhbmG5X3ecnwFD/lPrMpliGXxSCg03L9AhrdwA4Oz/qfspkDW+xGQ==} + + '@types/tinycolor2@1.4.6': + resolution: {integrity: sha512-iEN8J0BoMnsWBqjVbWH/c0G0Hh7O21lpR2/+PrvAVgWdzL7eexIFm4JN/Wn10PTcmNdtS6U67r499mlWMXOxNw==} + + '@typescript-eslint/eslint-plugin@8.15.0': + resolution: {integrity: sha512-+zkm9AR1Ds9uLWN3fkoeXgFppaQ+uEVtfOV62dDmsy9QCNqlRHWNEck4yarvRNrvRcHQLGfqBNui3cimoz8XAg==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + peerDependencies: + '@typescript-eslint/parser': ^8.0.0 || ^8.0.0-alpha.0 + eslint: ^8.57.0 || ^9.0.0 + typescript: '*' + peerDependenciesMeta: + typescript: + optional: true + + '@typescript-eslint/parser@8.15.0': + resolution: {integrity: sha512-7n59qFpghG4uazrF9qtGKBZXn7Oz4sOMm8dwNWDQY96Xlm2oX67eipqcblDj+oY1lLCbf1oltMZFpUso66Kl1A==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + peerDependencies: + eslint: ^8.57.0 || ^9.0.0 + typescript: '*' + peerDependenciesMeta: + typescript: + optional: true + + '@typescript-eslint/scope-manager@8.15.0': + resolution: {integrity: sha512-QRGy8ADi4J7ii95xz4UoiymmmMd/zuy9azCaamnZ3FM8T5fZcex8UfJcjkiEZjJSztKfEBe3dZ5T/5RHAmw2mA==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + + '@typescript-eslint/type-utils@8.15.0': + resolution: {integrity: sha512-UU6uwXDoI3JGSXmcdnP5d8Fffa2KayOhUUqr/AiBnG1Gl7+7ut/oyagVeSkh7bxQ0zSXV9ptRh/4N15nkCqnpw==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + peerDependencies: + eslint: ^8.57.0 || ^9.0.0 + typescript: '*' + peerDependenciesMeta: + typescript: + optional: true + + '@typescript-eslint/types@8.15.0': + resolution: {integrity: sha512-n3Gt8Y/KyJNe0S3yDCD2RVKrHBC4gTUcLTebVBXacPy091E6tNspFLKRXlk3hwT4G55nfr1n2AdFqi/XMxzmPQ==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + + '@typescript-eslint/typescript-estree@8.15.0': + resolution: {integrity: sha512-1eMp2JgNec/niZsR7ioFBlsh/Fk0oJbhaqO0jRyQBMgkz7RrFfkqF9lYYmBoGBaSiLnu8TAPQTwoTUiSTUW9dg==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + peerDependencies: + typescript: '*' + peerDependenciesMeta: + typescript: + optional: true + + '@typescript-eslint/utils@8.15.0': + resolution: {integrity: sha512-k82RI9yGhr0QM3Dnq+egEpz9qB6Un+WLYhmoNcvl8ltMEededhh7otBVVIDDsEEttauwdY/hQoSsOv13lxrFzQ==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + peerDependencies: + eslint: ^8.57.0 || ^9.0.0 + typescript: '*' + peerDependenciesMeta: + typescript: + optional: true + + '@typescript-eslint/visitor-keys@8.15.0': + resolution: {integrity: sha512-h8vYOulWec9LhpwfAdZf2bjr8xIp0KNKnpgqSz0qqYYKAW/QZKw3ktRndbiAtUz4acH4QLQavwZBYCc0wulA/Q==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + + acorn-jsx@5.3.2: + resolution: {integrity: sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==} + peerDependencies: + acorn: ^6.0.0 || ^7.0.0 || ^8.0.0 + + acorn-walk@8.3.4: + resolution: {integrity: sha512-ueEepnujpqee2o5aIYnvHU6C0A42MNdsIDeqy5BydrkuC5R1ZuUFnm27EeFJGoEHJQgn3uleRvmTXaJgfXbt4g==} + engines: {node: '>=0.4.0'} + + acorn@8.14.0: + resolution: {integrity: sha512-cl669nCJTZBsL97OF4kUQm5g5hC2uihk0NxY3WENAC0TYdILVkAyHymAntgxGkl7K+t0cXIrH5siy5S4XkFycA==} + engines: {node: '>=0.4.0'} + hasBin: true + + agent-base@7.1.1: + resolution: {integrity: sha512-H0TSyFNDMomMNJQBn8wFV5YC/2eJ+VXECwOadZJT554xP6cODZHPX3H9QMQECxvrgiSOP1pHjy1sMWQVYJOUOA==} + engines: {node: '>= 14'} + + aggregate-error@3.1.0: + resolution: {integrity: sha512-4I7Td01quW/RpocfNayFdFVk1qSuoh0E7JrbRJ16nH01HhKFQ88INq9Sd+nd72zqRySlr9BmDA8xlEJ6vJMrYA==} + engines: {node: '>=8'} + + ajv@6.12.6: + resolution: {integrity: sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==} + + ansi-escapes@4.3.2: + resolution: {integrity: sha512-gKXj5ALrKWQLsYG9jlTRmR/xKluxHV+Z9QEwNIgCfM1/uwPMCuzVVnh5mwTd+OuBZcwSIMbqssNWRm1lE51QaQ==} + engines: {node: '>=8'} + + ansi-regex@5.0.1: + resolution: {integrity: sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==} + engines: {node: '>=8'} + + ansi-styles@3.2.1: + resolution: {integrity: sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==} + engines: {node: '>=4'} + + ansi-styles@4.3.0: + resolution: {integrity: sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==} + engines: {node: '>=8'} + + arg@4.1.3: + resolution: {integrity: sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA==} + + argparse@2.0.1: + resolution: {integrity: sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==} + + array-buffer-byte-length@1.0.1: + resolution: {integrity: sha512-ahC5W1xgou+KTXix4sAO8Ki12Q+jf4i0+tmk3sC+zgcynshkHxzpXdImBehiUYKKKDwvfFiJl1tZt6ewscS1Mg==} + engines: {node: '>= 0.4'} + + array-includes@3.1.8: + resolution: {integrity: sha512-itaWrbYbqpGXkGhZPGUulwnhVf5Hpy1xiCFsGqyIGglbBxmG5vSjxQen3/WGOjPpNEv1RtBLKxbmVXm8HpJStQ==} + engines: {node: '>= 0.4'} + + array-union@2.1.0: + resolution: {integrity: sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==} + engines: {node: '>=8'} + + array.prototype.findlast@1.2.5: + resolution: {integrity: sha512-CVvd6FHg1Z3POpBLxO6E6zr+rSKEQ9L6rZHAaY7lLfhKsWYUBBOuMs0e9o24oopj6H+geRCX0YJ+TJLBK2eHyQ==} + engines: {node: '>= 0.4'} + + array.prototype.flat@1.3.2: + resolution: {integrity: sha512-djYB+Zx2vLewY8RWlNCUdHjDXs2XOgm602S9E7P/UpHgfeHL00cRiIF+IN/G/aUJ7kGPb6yO/ErDI5V2s8iycA==} + engines: {node: '>= 0.4'} + + array.prototype.flatmap@1.3.2: + resolution: {integrity: sha512-Ewyx0c9PmpcsByhSW4r+9zDU7sGjFc86qf/kKtuSCRdhfbk0SNLLkaT5qvcHnRGgc5NP/ly/y+qkXkqONX54CQ==} + engines: {node: '>= 0.4'} + + array.prototype.tosorted@1.1.4: + resolution: {integrity: sha512-p6Fx8B7b7ZhL/gmUsAy0D15WhvDccw3mnGNbZpi3pmeJdxtWsj2jEaI4Y6oo3XiHfzuSgPwKc04MYt6KgvC/wA==} + engines: {node: '>= 0.4'} + + arraybuffer.prototype.slice@1.0.3: + resolution: {integrity: sha512-bMxMKAjg13EBSVscxTaYA4mRc5t1UAXa2kXiGTNfZ079HIWXEkKmkgFrh/nJqamaLSrXO5H4WFFkPEaLJWbs3A==} + engines: {node: '>= 0.4'} + + ast-types@0.13.4: + resolution: {integrity: sha512-x1FCFnFifvYDDzTaLII71vG5uvDwgtmDTEVWAxrgeiR8VjMONcCXJx7E+USjDtHlwFmt9MysbqgF9b9Vjr6w+w==} + engines: {node: '>=4'} + + available-typed-arrays@1.0.7: + resolution: {integrity: sha512-wvUjBtSGN7+7SjNpq/9M2Tg350UZD3q62IFZLbRAR1bSMlCo1ZaeW+BJ+D090e4hIIZLBcTDWe4Mh4jvUDajzQ==} + engines: {node: '>= 0.4'} + + balanced-match@1.0.2: + resolution: {integrity: sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==} + + base64-js@1.5.1: + resolution: {integrity: sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==} + + basic-ftp@5.0.5: + resolution: {integrity: sha512-4Bcg1P8xhUuqcii/S0Z9wiHIrQVPMermM1any+MX5GeGD7faD3/msQUDGLol9wOcz4/jbg/WJnGqoJF6LiBdtg==} + engines: {node: '>=10.0.0'} + + bl@4.1.0: + resolution: {integrity: sha512-1W07cM9gS6DcLperZfFSj+bWLtaPGSOHWhPiGzXmvVJbRLdG82sH/Kn8EtW1VqWVA54AKf2h5k5BbnIbwF3h6w==} + + brace-expansion@1.1.11: + resolution: {integrity: sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==} + + brace-expansion@2.0.1: + resolution: {integrity: sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==} + + braces@3.0.3: + resolution: {integrity: sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==} + engines: {node: '>=8'} + + buffer@5.7.1: + resolution: {integrity: sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==} + + busboy@1.6.0: + resolution: {integrity: sha512-8SFQbg/0hQ9xy3UNTB0YEnsNBbWfhf7RtnzpL7TkBiTBRfrQ9Fxcnz7VJsleJpyp6rVLvXiuORqjlHi5q+PYuA==} + engines: {node: '>=10.16.0'} + + call-bind@1.0.7: + resolution: {integrity: sha512-GHTSNSYICQ7scH7sZ+M2rFopRoLh8t2bLSW6BbgrtLsahOIB5iyAVJf9GjWK3cYTDaMj4XdBpM1cA6pIS0Kv2w==} + engines: {node: '>= 0.4'} + + callsites@3.1.0: + resolution: {integrity: sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==} + engines: {node: '>=6'} + + camel-case@3.0.0: + resolution: {integrity: sha512-+MbKztAYHXPr1jNTSKQF52VpcFjwY5RkR7fxksV8Doo4KAYc5Fl4UJRgthBbTmEx8C54DqahhbLJkDwjI3PI/w==} + + caniuse-lite@1.0.30001683: + resolution: {integrity: sha512-iqmNnThZ0n70mNwvxpEC2nBJ037ZHZUoBI5Gorh1Mw6IlEAZujEoU1tXA628iZfzm7R9FvFzxbfdgml82a3k8Q==} + + chalk@2.4.2: + resolution: {integrity: sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==} + engines: {node: '>=4'} + + chalk@3.0.0: + resolution: {integrity: sha512-4D3B6Wf41KOYRFdszmDqMCGq5VV/uMAB273JILmO+3jAlh8X4qDtdtgCR3fxtbLEMzSx22QdhnDcJvu2u1fVwg==} + engines: {node: '>=8'} + + chalk@4.1.2: + resolution: {integrity: sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==} + engines: {node: '>=10'} + + change-case@3.1.0: + resolution: {integrity: sha512-2AZp7uJZbYEzRPsFoa+ijKdvp9zsrnnt6+yFokfwEpeJm0xuJDVoxiRCAaTzyJND8GJkofo2IcKWaUZ/OECVzw==} + + chardet@0.7.0: + resolution: {integrity: sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA==} + + clean-stack@2.2.0: + resolution: {integrity: sha512-4diC9HaTE+KRAMWhDhrGOECgWZxoevMc5TlkObMqNSsVU62PYzXZ/SMTjzyGAFF1YusgxGcSWTEXBhp0CPwQ1A==} + engines: {node: '>=6'} + + cli-cursor@3.1.0: + resolution: {integrity: sha512-I/zHAwsKf9FqGoXM4WWRACob9+SNukZTd94DWF57E4toouRulbCxcUh6RKUEOQlYTHJnzkPMySvPNaaSLNfLZw==} + engines: {node: '>=8'} + + cli-spinners@2.9.2: + resolution: {integrity: sha512-ywqV+5MmyL4E7ybXgKys4DugZbX0FC6LnwrhjuykIjnK9k8OQacQ7axGKnjDXWNhns0xot3bZI5h55H8yo9cJg==} + engines: {node: '>=6'} + + cli-width@3.0.0: + resolution: {integrity: sha512-FxqpkPPwu1HjuN93Omfm4h8uIanXofW0RxVEW3k5RKx+mJJYSthzNhp32Kzxxy3YAEZ/Dc/EWN1vZRY0+kOhbw==} + engines: {node: '>= 10'} + + client-only@0.0.1: + resolution: {integrity: sha512-IV3Ou0jSMzZrd3pZ48nLkT9DA7Ag1pnPzaiQhpW7c3RbcqqzvzzVu+L8gfqMp/8IM2MQtSiqaCxrrcfu8I8rMA==} + + clone@1.0.4: + resolution: {integrity: sha512-JQHZ2QMW6l3aH/j6xCqQThY/9OH4D/9ls34cgkUBiEeocRTU04tHfKPBsUK1PqZCUQM7GiA0IIXJSuXHI64Kbg==} + engines: {node: '>=0.8'} + + color-convert@1.9.3: + resolution: {integrity: sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==} + + color-convert@2.0.1: + resolution: {integrity: sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==} + engines: {node: '>=7.0.0'} + + color-name@1.1.3: + resolution: {integrity: sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==} + + color-name@1.1.4: + resolution: {integrity: sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==} + + color-string@1.9.1: + resolution: {integrity: sha512-shrVawQFojnZv6xM40anx4CkoDP+fZsw/ZerEMsW/pyzsRbElpsL/DBVW7q3ExxwusdNXI3lXpuhEZkzs8p5Eg==} + + color@4.2.3: + resolution: {integrity: sha512-1rXeuUUiGGrykh+CeBdu5Ie7OJwinCgQY0bc7GCRxy5xVHy+moaqkpL/jqQq0MtQOeYcrqEz4abc5f0KtU7W4A==} + engines: {node: '>=12.5.0'} + + commander@10.0.1: + resolution: {integrity: sha512-y4Mg2tXshplEbSGzx7amzPwKKOCGuoSRP/CjEdwwk0FOGlUbq6lKuoyDZTNZkmxHdJtp54hdfY/JUrdL7Xfdug==} + engines: {node: '>=14'} + + concat-map@0.0.1: + resolution: {integrity: sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==} + + constant-case@2.0.0: + resolution: {integrity: sha512-eS0N9WwmjTqrOmR3o83F5vW8Z+9R1HnVz3xmzT2PMFug9ly+Au/fxRWlEBSb6LcZwspSsEn9Xs1uw9YgzAg1EQ==} + + core-js-pure@3.39.0: + resolution: {integrity: sha512-7fEcWwKI4rJinnK+wLTezeg2smbFFdSBP6E2kQZNbnzM2s1rpKQ6aaRteZSSg7FLU3P0HGGVo/gbpfanU36urg==} + + create-require@1.1.1: + resolution: {integrity: sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ==} + + cross-spawn@7.0.6: + resolution: {integrity: sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==} + engines: {node: '>= 8'} + + csstype@3.1.3: + resolution: {integrity: sha512-M1uQkMl8rQK/szD0LNhtqxIPLpimGm8sOBwU7lLnCpSbTyY3yeU1Vc7l4KT5zT4s/yOxHH5O7tIuuLOCnLADRw==} + + data-uri-to-buffer@6.0.2: + resolution: {integrity: sha512-7hvf7/GW8e86rW0ptuwS3OcBGDjIi6SZva7hCyWC0yYry2cOPmLIjXAUHI6DK2HsnwJd9ifmt57i8eV2n4YNpw==} + engines: {node: '>= 14'} + + data-view-buffer@1.0.1: + resolution: {integrity: sha512-0lht7OugA5x3iJLOWFhWK/5ehONdprk0ISXqVFn/NFrDu+cuc8iADFrGQz5BnRK7LLU3JmkbXSxaqX+/mXYtUA==} + engines: {node: '>= 0.4'} + + data-view-byte-length@1.0.1: + resolution: {integrity: sha512-4J7wRJD3ABAzr8wP+OcIcqq2dlUKp4DVflx++hs5h5ZKydWMI6/D/fAot+yh6g2tHh8fLFTvNOaVN357NvSrOQ==} + engines: {node: '>= 0.4'} + + data-view-byte-offset@1.0.0: + resolution: {integrity: sha512-t/Ygsytq+R995EJ5PZlD4Cu56sWa8InXySaViRzw9apusqsOO2bQP+SbYzAhR0pFKoB+43lYy8rWban9JSuXnA==} + engines: {node: '>= 0.4'} + + debug@4.3.7: + resolution: {integrity: sha512-Er2nc/H7RrMXZBFCEim6TCmMk02Z8vLC2Rbi1KEBggpo0fS6l0S1nnapwmIi3yW/+GOJap1Krg4w0Hg80oCqgQ==} + engines: {node: '>=6.0'} + peerDependencies: + supports-color: '*' + peerDependenciesMeta: + supports-color: + optional: true + + deep-extend@0.6.0: + resolution: {integrity: sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==} + engines: {node: '>=4.0.0'} + + deep-is@0.1.4: + resolution: {integrity: sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==} + + defaults@1.0.4: + resolution: {integrity: sha512-eFuaLoy/Rxalv2kr+lqMlUnrDWV+3j4pljOIJgLIhI058IQfWJ7vXhyEIHu+HtC738klGALYxOKDO0bQP3tg8A==} + + define-data-property@1.1.4: + resolution: {integrity: sha512-rBMvIzlpA8v6E+SJZoo++HAYqsLrkg7MSfIinMPFhmkorw7X+dOXVJQs+QT69zGkzMyfDnIMN2Wid1+NbL3T+A==} + engines: {node: '>= 0.4'} + + define-properties@1.2.1: + resolution: {integrity: sha512-8QmQKqEASLd5nx0U1B1okLElbUuuttJ/AnYmRXbbbGDWh6uS208EjD4Xqq/I9wK7u0v6O08XhTWnt5XtEbR6Dg==} + engines: {node: '>= 0.4'} + + degenerator@5.0.1: + resolution: {integrity: sha512-TllpMR/t0M5sqCXfj85i4XaAzxmS5tVA16dqvdkMwGmzI+dXLXnw3J+3Vdv7VKw+ThlTMboK6i9rnZ6Nntj5CQ==} + engines: {node: '>= 14'} + + del@5.1.0: + resolution: {integrity: sha512-wH9xOVHnczo9jN2IW68BabcecVPxacIA3g/7z6vhSU/4stOKQzeCRK0yD0A24WiAAUJmmVpWqrERcTxnLo3AnA==} + engines: {node: '>=8'} + + detect-libc@2.0.3: + resolution: {integrity: sha512-bwy0MGW55bG41VqxxypOsdSdGqLwXPI/focwgTYCFMbdUiBAxLg9CFzG08sz2aqzknwiX7Hkl0bQENjg8iLByw==} + engines: {node: '>=8'} + + diff@4.0.2: + resolution: {integrity: sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==} + engines: {node: '>=0.3.1'} + + dir-glob@3.0.1: + resolution: {integrity: sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==} + engines: {node: '>=8'} + + doctrine@2.1.0: + resolution: {integrity: sha512-35mSku4ZXK0vfCuHEDAwt55dg2jNajHZ1odvF+8SSr82EsZY4QmXfuWso8oEd8zRhVObSN18aM0CjSdoBX7zIw==} + engines: {node: '>=0.10.0'} + + dot-case@2.1.1: + resolution: {integrity: sha512-HnM6ZlFqcajLsyudHq7LeeLDr2rFAVYtDv/hV5qchQEidSck8j9OPUsXY9KwJv/lHMtYlX4DjRQqwFYa+0r8Ug==} + + dotenv@16.0.3: + resolution: {integrity: sha512-7GO6HghkA5fYG9TYnNxi14/7K9f5occMlp3zXAuSxn7CKCxt9xbNWG7yF8hTCSUchlfWSe3uLmlPfigevRItzQ==} + engines: {node: '>=12'} + + emoji-regex@8.0.0: + resolution: {integrity: sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==} + + es-abstract@1.23.5: + resolution: {integrity: sha512-vlmniQ0WNPwXqA0BnmwV3Ng7HxiGlh6r5U6JcTMNx8OilcAGqVJBHJcPjqOMaczU9fRuRK5Px2BdVyPRnKMMVQ==} + engines: {node: '>= 0.4'} + + es-define-property@1.0.0: + resolution: {integrity: sha512-jxayLKShrEqqzJ0eumQbVhTYQM27CfT1T35+gCgDFoL82JLsXqTJ76zv6A0YLOgEnLUMvLzsDsGIrl8NFpT2gQ==} + engines: {node: '>= 0.4'} + + es-errors@1.3.0: + resolution: {integrity: sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==} + engines: {node: '>= 0.4'} + + es-iterator-helpers@1.2.0: + resolution: {integrity: sha512-tpxqxncxnpw3c93u8n3VOzACmRFoVmWJqbWXvX/JfKbkhBw1oslgPrUfeSt2psuqyEJFD6N/9lg5i7bsKpoq+Q==} + engines: {node: '>= 0.4'} + + es-object-atoms@1.0.0: + resolution: {integrity: sha512-MZ4iQ6JwHOBQjahnjwaC1ZtIBH+2ohjamzAO3oaHcXYup7qxjF2fixyH+Q71voWHeOkI2q/TnJao/KfXYIZWbw==} + engines: {node: '>= 0.4'} + + es-set-tostringtag@2.0.3: + resolution: {integrity: sha512-3T8uNMC3OQTHkFUsFq8r/BwAXLHvU/9O9mE0fBc/MY5iq/8H7ncvO947LmYA6ldWw9Uh8Yhf25zu6n7nML5QWQ==} + engines: {node: '>= 0.4'} + + es-shim-unscopables@1.0.2: + resolution: {integrity: sha512-J3yBRXCzDu4ULnQwxyToo/OjdMx6akgVC7K6few0a7F/0wLtmKKN7I73AH5T2836UuXRqN7Qg+IIUw/+YJksRw==} + + es-to-primitive@1.2.1: + resolution: {integrity: sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA==} + engines: {node: '>= 0.4'} + + escape-string-regexp@1.0.5: + resolution: {integrity: sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==} + engines: {node: '>=0.8.0'} + + escape-string-regexp@4.0.0: + resolution: {integrity: sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==} + engines: {node: '>=10'} + + escodegen@2.1.0: + resolution: {integrity: sha512-2NlIDTwUWJN0mRPQOdtQBzbUHvdGY2P1VXSyU83Q3xKxM7WHX2Ql8dKq782Q9TgQUNOLEzEYu9bzLNj1q88I5w==} + engines: {node: '>=6.0'} + hasBin: true + + eslint-config-prettier@9.1.0: + resolution: {integrity: sha512-NSWl5BFQWEPi1j4TjVNItzYV7dZXZ+wP6I6ZhrBGpChQhZRUaElihE9uRRkcbRnNb76UMKDF3r+WTmNcGPKsqw==} + hasBin: true + peerDependencies: + eslint: '>=7.0.0' + + eslint-plugin-only-warn@1.1.0: + resolution: {integrity: sha512-2tktqUAT+Q3hCAU0iSf4xAN1k9zOpjK5WO8104mB0rT/dGhOa09582HN5HlbxNbPRZ0THV7nLGvzugcNOSjzfA==} + engines: {node: '>=6'} + + eslint-plugin-react-hooks@5.0.0: + resolution: {integrity: sha512-hIOwI+5hYGpJEc4uPRmz2ulCjAGD/N13Lukkh8cLV0i2IRk/bdZDYjgLVHj+U9Z704kLIdIO6iueGvxNur0sgw==} + engines: {node: '>=10'} + peerDependencies: + eslint: ^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0-0 || ^9.0.0 + + eslint-plugin-react@7.37.2: + resolution: {integrity: sha512-EsTAnj9fLVr/GZleBLFbj/sSuXeWmp1eXIN60ceYnZveqEaUCyW4X+Vh4WTdUhCkW4xutXYqTXCUSyqD4rB75w==} + engines: {node: '>=4'} + peerDependencies: + eslint: ^3 || ^4 || ^5 || ^6 || ^7 || ^8 || ^9.7 + + eslint-plugin-turbo@2.3.1: + resolution: {integrity: sha512-M5MBYBkcQsv11MFHJ+6WpzLpiTBx0OApeUMAHlO4L0eHqQxY03GrmHXjXfozqB+9HwGrW9fqihBzVRllyixJDA==} + peerDependencies: + eslint: '>6.6.0' + + eslint-scope@8.2.0: + resolution: {integrity: sha512-PHlWUfG6lvPc3yvP5A4PNyBL1W8fkDUccmI21JUu/+GKZBoH/W5u6usENXUrWFRsyoW5ACUjFGgAFQp5gUlb/A==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + + eslint-visitor-keys@3.4.3: + resolution: {integrity: sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + + eslint-visitor-keys@4.2.0: + resolution: {integrity: sha512-UyLnSehNt62FFhSwjZlHmeokpRK59rcz29j+F1/aDgbkbRTk7wIc9XzdoasMUbRNKDM0qQt/+BJ4BrpFeABemw==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + + eslint@9.15.0: + resolution: {integrity: sha512-7CrWySmIibCgT1Os28lUU6upBshZ+GxybLOrmRzi08kS8MBuO8QA7pXEgYgY5W8vK3e74xv0lpjo9DbaGU9Rkw==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + hasBin: true + peerDependencies: + jiti: '*' + peerDependenciesMeta: + jiti: + optional: true + + espree@10.3.0: + resolution: {integrity: sha512-0QYC8b24HWY8zjRnDTL6RiHfDbAWn63qb4LMj1Z4b076A4une81+z03Kg7l7mn/48PUTqoLptSXez8oknU8Clg==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + + esprima@4.0.1: + resolution: {integrity: sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==} + engines: {node: '>=4'} + hasBin: true + + esquery@1.6.0: + resolution: {integrity: sha512-ca9pw9fomFcKPvFLXhBKUK90ZvGibiGOvRJNbjljY7s7uq/5YO4BOzcYtJqExdx99rF6aAcnRxHmcUHcz6sQsg==} + engines: {node: '>=0.10'} + + esrecurse@4.3.0: + resolution: {integrity: sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==} + engines: {node: '>=4.0'} + + estraverse@5.3.0: + resolution: {integrity: sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==} + engines: {node: '>=4.0'} + + esutils@2.0.3: + resolution: {integrity: sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==} + engines: {node: '>=0.10.0'} + + execa@5.1.1: + resolution: {integrity: sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg==} + engines: {node: '>=10'} + + external-editor@3.1.0: + resolution: {integrity: sha512-hMQ4CX1p1izmuLYyZqLMO/qGNw10wSv9QDCPfzXfyFrOaCSSoRfqE1Kf1s5an66J5JZC62NewG+mK49jOCtQew==} + engines: {node: '>=4'} + + fast-deep-equal@3.1.3: + resolution: {integrity: sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==} + + fast-glob@3.3.1: + resolution: {integrity: sha512-kNFPyjhh5cKjrUltxs+wFx+ZkbRaxxmZ+X0ZU31SOsxCEtP9VPgtq2teZw1DebupL5GmDaNQ6yKMMVcM41iqDg==} + engines: {node: '>=8.6.0'} + + fast-glob@3.3.2: + resolution: {integrity: sha512-oX2ruAFQwf/Orj8m737Y5adxDQO0LAB7/S5MnxCdTNDd4p6BsyIVsv9JQsATbTSq8KHRpLwIHbVlUNatxd+1Ow==} + engines: {node: '>=8.6.0'} + + fast-json-stable-stringify@2.1.0: + resolution: {integrity: sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==} + + fast-levenshtein@2.0.6: + resolution: {integrity: sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==} + + fastq@1.17.1: + resolution: {integrity: sha512-sRVD3lWVIXWg6By68ZN7vho9a1pQcN/WBFaAAsDDFzlJjvoGx0P8z7V1t72grFJfJhu3YPZBuu25f7Kaw2jN1w==} + + figures@3.2.0: + resolution: {integrity: sha512-yaduQFRKLXYOGgEn6AZau90j3ggSOyiqXU0F9JZfeXYhNa+Jk4X+s45A2zg5jns87GAFa34BBm2kXw4XpNcbdg==} + engines: {node: '>=8'} + + file-entry-cache@8.0.0: + resolution: {integrity: sha512-XXTUwCvisa5oacNGRP9SfNtYBNAMi+RPwBFmblZEF7N7swHYQS6/Zfk7SRwx4D5j3CH211YNRco1DEMNVfZCnQ==} + engines: {node: '>=16.0.0'} + + fill-range@7.1.1: + resolution: {integrity: sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==} + engines: {node: '>=8'} + + find-up@5.0.0: + resolution: {integrity: sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==} + engines: {node: '>=10'} + + flat-cache@4.0.1: + resolution: {integrity: sha512-f7ccFPK3SXFHpx15UIGyRJ/FJQctuKZ0zVuN3frBo4HnK3cay9VEW0R6yPYFHC0AgqhukPzKjq22t5DmAyqGyw==} + engines: {node: '>=16'} + + flatted@3.3.2: + resolution: {integrity: sha512-AiwGJM8YcNOaobumgtng+6NHuOqC3A7MixFeDafM3X9cIUM+xUXoS5Vfgf+OihAYe20fxqNM9yPBXJzRtZ/4eA==} + + for-each@0.3.3: + resolution: {integrity: sha512-jqYfLp7mo9vIyQf8ykW2v7A+2N4QjeCeI5+Dz9XraiO1ign81wjiH7Fb9vSOWvQfNtmSa4H2RoQTrrXivdUZmw==} + + fs-extra@10.1.0: + resolution: {integrity: sha512-oRXApq54ETRj4eMiFzGnHWGy+zo5raudjuxN0b8H7s/RU2oW0Wvsx9O0ACRN/kRq9E8Vu/ReskGB5o3ji+FzHQ==} + engines: {node: '>=12'} + + fs-extra@11.2.0: + resolution: {integrity: sha512-PmDi3uwK5nFuXh7XDTlVnS17xJS7vW36is2+w3xcv8SVxiB4NyATf4ctkVY5bkSjX0Y4nbvZCq1/EjtEyr9ktw==} + engines: {node: '>=14.14'} + + fs.realpath@1.0.0: + resolution: {integrity: sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==} + + function-bind@1.1.2: + resolution: {integrity: sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==} + + function.prototype.name@1.1.6: + resolution: {integrity: sha512-Z5kx79swU5P27WEayXM1tBi5Ze/lbIyiNgU3qyXUOf9b2rgXYyF9Dy9Cx+IQv/Lc8WCG6L82zwUPpSS9hGehIg==} + engines: {node: '>= 0.4'} + + functions-have-names@1.2.3: + resolution: {integrity: sha512-xckBUXyTIqT97tq2x2AMb+g163b5JFysYk0x4qxNFwbfQkmNZoiRHb6sPzI9/QV33WeuvVYBUIiD4NzNIyqaRQ==} + + get-intrinsic@1.2.4: + resolution: {integrity: sha512-5uYhsJH8VJBTv7oslg4BznJYhDoRI6waYCxMmCdnTrcCrHA/fCFKoTFz2JKKE0HdDFUF7/oQuhzumXJK7paBRQ==} + engines: {node: '>= 0.4'} + + get-stream@6.0.1: + resolution: {integrity: sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==} + engines: {node: '>=10'} + + get-symbol-description@1.0.2: + resolution: {integrity: sha512-g0QYk1dZBxGwk+Ngc+ltRH2IBp2f7zBkBMBJZCDerh6EhlhSR6+9irMCuT/09zD6qkarHUSn529sK/yL4S27mg==} + engines: {node: '>= 0.4'} + + get-uri@6.0.3: + resolution: {integrity: sha512-BzUrJBS9EcUb4cFol8r4W3v1cPsSyajLSthNkz5BxbpDcHN5tIrM10E2eNvfnvBn3DaT3DUgx0OpsBKkaOpanw==} + engines: {node: '>= 14'} + + glob-parent@5.1.2: + resolution: {integrity: sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==} + engines: {node: '>= 6'} + + glob-parent@6.0.2: + resolution: {integrity: sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==} + engines: {node: '>=10.13.0'} + + glob@7.2.3: + resolution: {integrity: sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==} + deprecated: Glob versions prior to v9 are no longer supported + + globals@14.0.0: + resolution: {integrity: sha512-oahGvuMGQlPw/ivIYBjVSrWAfWLBeku5tpPE2fOPLi+WHffIWbuh2tCjhyQhTBPMf5E9jDEH4FOmTYgYwbKwtQ==} + engines: {node: '>=18'} + + globals@15.12.0: + resolution: {integrity: sha512-1+gLErljJFhbOVyaetcwJiJ4+eLe45S2E7P5UiZ9xGfeq3ATQf5DOv9G7MH3gGbKQLkzmNh2DxfZwLdw+j6oTQ==} + engines: {node: '>=18'} + + globalthis@1.0.4: + resolution: {integrity: sha512-DpLKbNU4WylpxJykQujfCcwYWiV/Jhm50Goo0wrVILAv5jOr9d+H+UR3PhSCD2rCCEIg0uc+G+muBTwD54JhDQ==} + engines: {node: '>= 0.4'} + + globby@10.0.2: + resolution: {integrity: sha512-7dUi7RvCoT/xast/o/dLN53oqND4yk0nsHkhRgn9w65C4PofCLOoJ39iSOg+qVDdWQPIEj+eszMHQ+aLVwwQSg==} + engines: {node: '>=8'} + + gopd@1.0.1: + resolution: {integrity: sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==} + + graceful-fs@4.2.11: + resolution: {integrity: sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==} + + gradient-string@2.0.2: + resolution: {integrity: sha512-rEDCuqUQ4tbD78TpzsMtt5OIf0cBCSDWSJtUDaF6JsAh+k0v9r++NzxNEG87oDZx9ZwGhD8DaezR2L/yrw0Jdw==} + engines: {node: '>=10'} + + graphemer@1.4.0: + resolution: {integrity: sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==} + + handlebars@4.7.8: + resolution: {integrity: sha512-vafaFqs8MZkRrSX7sFVUdo3ap/eNiLnb4IakshzvP56X5Nr1iGKAIqdX6tMlm6HcNRIkr6AxO5jFEoJzzpT8aQ==} + engines: {node: '>=0.4.7'} + hasBin: true + + has-bigints@1.0.2: + resolution: {integrity: sha512-tSvCKtBr9lkF0Ex0aQiP9N+OpV4zi2r/Nee5VkRDbaqv35RLYMzbwQfFSZZH0kR+Rd6302UJZ2p/bJCEoR3VoQ==} + + has-flag@3.0.0: + resolution: {integrity: sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==} + engines: {node: '>=4'} + + has-flag@4.0.0: + resolution: {integrity: sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==} + engines: {node: '>=8'} + + has-property-descriptors@1.0.2: + resolution: {integrity: sha512-55JNKuIW+vq4Ke1BjOTjM2YctQIvCT7GFzHwmfZPGo5wnrgkid0YQtnAleFSqumZm4az3n2BS+erby5ipJdgrg==} + + has-proto@1.0.3: + resolution: {integrity: sha512-SJ1amZAJUiZS+PhsVLf5tGydlaVB8EdFpaSO4gmiUKUOxk8qzn5AIy4ZeJUmh22znIdk/uMAUT2pl3FxzVUH+Q==} + engines: {node: '>= 0.4'} + + has-symbols@1.0.3: + resolution: {integrity: sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==} + engines: {node: '>= 0.4'} + + has-tostringtag@1.0.2: + resolution: {integrity: sha512-NqADB8VjPFLM2V0VvHUewwwsw0ZWBaIdgo+ieHtK3hasLz4qeCRjYcqfB6AQrBggRKppKF8L52/VqdVsO47Dlw==} + engines: {node: '>= 0.4'} + + hasown@2.0.2: + resolution: {integrity: sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==} + engines: {node: '>= 0.4'} + + header-case@1.0.1: + resolution: {integrity: sha512-i0q9mkOeSuhXw6bGgiQCCBgY/jlZuV/7dZXyZ9c6LcBrqwvT8eT719E9uxE5LiZftdl+z81Ugbg/VvXV4OJOeQ==} + + http-proxy-agent@7.0.2: + resolution: {integrity: sha512-T1gkAiYYDWYx3V5Bmyu7HcfcvL7mUrTWiM6yOfa3PIphViJ/gFPbvidQ+veqSOHci/PxBcDabeUNCzpOODJZig==} + engines: {node: '>= 14'} + + https-proxy-agent@7.0.5: + resolution: {integrity: sha512-1e4Wqeblerz+tMKPIq2EMGiiWW1dIjZOksyHWSUm1rmuvw/how9hBHZ38lAGj5ID4Ik6EdkOw7NmWPy6LAwalw==} + engines: {node: '>= 14'} + + human-signals@2.1.0: + resolution: {integrity: sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw==} + engines: {node: '>=10.17.0'} + + iconv-lite@0.4.24: + resolution: {integrity: sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==} + engines: {node: '>=0.10.0'} + + ieee754@1.2.1: + resolution: {integrity: sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==} + + ignore@5.3.2: + resolution: {integrity: sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g==} + engines: {node: '>= 4'} + + import-fresh@3.3.0: + resolution: {integrity: sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==} + engines: {node: '>=6'} + + imurmurhash@0.1.4: + resolution: {integrity: sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==} + engines: {node: '>=0.8.19'} + + indent-string@4.0.0: + resolution: {integrity: sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg==} + engines: {node: '>=8'} + + inflight@1.0.6: + resolution: {integrity: sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==} + deprecated: This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful. + + inherits@2.0.4: + resolution: {integrity: sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==} + + ini@1.3.8: + resolution: {integrity: sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==} + + inquirer@7.3.3: + resolution: {integrity: sha512-JG3eIAj5V9CwcGvuOmoo6LB9kbAYT8HXffUl6memuszlwDC/qvFAJw49XJ5NROSFNPxp3iQg1GqkFhaY/CR0IA==} + engines: {node: '>=8.0.0'} + + inquirer@8.2.6: + resolution: {integrity: sha512-M1WuAmb7pn9zdFRtQYk26ZBoY043Sse0wVDdk4Bppr+JOXyQYybdtvK+l9wUibhtjdjvtoiNy8tk+EgsYIUqKg==} + engines: {node: '>=12.0.0'} + + internal-slot@1.0.7: + resolution: {integrity: sha512-NGnrKwXzSms2qUUih/ILZ5JBqNTSa1+ZmP6flaIp6KmSElgE9qdndzS3cqjrDovwFdmwsGsLdeFgB6suw+1e9g==} + engines: {node: '>= 0.4'} + + ip-address@9.0.5: + resolution: {integrity: sha512-zHtQzGojZXTwZTHQqra+ETKd4Sn3vgi7uBmlPoXVWZqYvuKmtI0l/VZTjqGmJY9x88GGOaZ9+G9ES8hC4T4X8g==} + engines: {node: '>= 12'} + + is-array-buffer@3.0.4: + resolution: {integrity: sha512-wcjaerHw0ydZwfhiKbXJWLDY8A7yV7KhjQOpb83hGgGfId/aQa4TOvwyzn2PuswW2gPCYEL/nEAiSVpdOj1lXw==} + engines: {node: '>= 0.4'} + + is-arrayish@0.3.2: + resolution: {integrity: sha512-eVRqCvVlZbuw3GrM63ovNSNAeA1K16kaR/LRY/92w0zxQ5/1YzwblUX652i4Xs9RwAGjW9d9y6X88t8OaAJfWQ==} + + is-async-function@2.0.0: + resolution: {integrity: sha512-Y1JXKrfykRJGdlDwdKlLpLyMIiWqWvuSd17TvZk68PLAOGOoF4Xyav1z0Xhoi+gCYjZVeC5SI+hYFOfvXmGRCA==} + engines: {node: '>= 0.4'} + + is-bigint@1.0.4: + resolution: {integrity: sha512-zB9CruMamjym81i2JZ3UMn54PKGsQzsJeo6xvN3HJJ4CAsQNB6iRutp2To77OfCNuoxspsIhzaPoO1zyCEhFOg==} + + is-boolean-object@1.1.2: + resolution: {integrity: sha512-gDYaKHJmnj4aWxyj6YHyXVpdQawtVLHU5cb+eztPGczf6cjuTdwve5ZIEfgXqH4e57An1D1AKf8CZ3kYrQRqYA==} + engines: {node: '>= 0.4'} + + is-callable@1.2.7: + resolution: {integrity: sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA==} + engines: {node: '>= 0.4'} + + is-core-module@2.15.1: + resolution: {integrity: sha512-z0vtXSwucUJtANQWldhbtbt7BnL0vxiFjIdDLAatwhDYty2bad6s+rijD6Ri4YuYJubLzIJLUidCh09e1djEVQ==} + engines: {node: '>= 0.4'} + + is-data-view@1.0.1: + resolution: {integrity: sha512-AHkaJrsUVW6wq6JS8y3JnM/GJF/9cf+k20+iDzlSaJrinEo5+7vRiteOSwBhHRiAyQATN1AmY4hwzxJKPmYf+w==} + engines: {node: '>= 0.4'} + + is-date-object@1.0.5: + resolution: {integrity: sha512-9YQaSxsAiSwcvS33MBk3wTCVnWK+HhF8VZR2jRxehM16QcVOdHqPn4VPHmRK4lSr38n9JriurInLcP90xsYNfQ==} + engines: {node: '>= 0.4'} + + is-extglob@2.1.1: + resolution: {integrity: sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==} + engines: {node: '>=0.10.0'} + + is-finalizationregistry@1.0.2: + resolution: {integrity: sha512-0by5vtUJs8iFQb5TYUHHPudOR+qXYIMKtiUzvLIZITZUjknFmziyBJuLhVRc+Ds0dREFlskDNJKYIdIzu/9pfw==} + + is-fullwidth-code-point@3.0.0: + resolution: {integrity: sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==} + engines: {node: '>=8'} + + is-generator-function@1.0.10: + resolution: {integrity: sha512-jsEjy9l3yiXEQ+PsXdmBwEPcOxaXWLspKdplFUVI9vq1iZgIekeC0L167qeu86czQaxed3q/Uzuw0swL0irL8A==} + engines: {node: '>= 0.4'} + + is-glob@4.0.3: + resolution: {integrity: sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==} + engines: {node: '>=0.10.0'} + + is-interactive@1.0.0: + resolution: {integrity: sha512-2HvIEKRoqS62guEC+qBjpvRubdX910WCMuJTZ+I9yvqKU2/12eSL549HMwtabb4oupdj2sMP50k+XJfB/8JE6w==} + engines: {node: '>=8'} + + is-lower-case@1.1.3: + resolution: {integrity: sha512-+5A1e/WJpLLXZEDlgz4G//WYSHyQBD32qa4Jd3Lw06qQlv3fJHnp3YIHjTQSGzHMgzmVKz2ZP3rBxTHkPw/lxA==} + + is-map@2.0.3: + resolution: {integrity: sha512-1Qed0/Hr2m+YqxnM09CjA2d/i6YZNfF6R2oRAOj36eUdS6qIV/huPJNSEpKbupewFs+ZsJlxsjjPbc0/afW6Lw==} + engines: {node: '>= 0.4'} + + is-negative-zero@2.0.3: + resolution: {integrity: sha512-5KoIu2Ngpyek75jXodFvnafB6DJgr3u8uuK0LEZJjrU19DrMD3EVERaR8sjz8CCGgpZvxPl9SuE1GMVPFHx1mw==} + engines: {node: '>= 0.4'} + + is-number-object@1.0.7: + resolution: {integrity: sha512-k1U0IRzLMo7ZlYIfzRu23Oh6MiIFasgpb9X76eqfFZAqwH44UI4KTBvBYIZ1dSL9ZzChTB9ShHfLkR4pdW5krQ==} + engines: {node: '>= 0.4'} + + is-number@7.0.0: + resolution: {integrity: sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==} + engines: {node: '>=0.12.0'} + + is-path-cwd@2.2.0: + resolution: {integrity: sha512-w942bTcih8fdJPJmQHFzkS76NEP8Kzzvmw92cXsazb8intwLqPibPPdXf4ANdKV3rYMuuQYGIWtvz9JilB3NFQ==} + engines: {node: '>=6'} + + is-path-inside@3.0.3: + resolution: {integrity: sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ==} + engines: {node: '>=8'} + + is-regex@1.1.4: + resolution: {integrity: sha512-kvRdxDsxZjhzUX07ZnLydzS1TU/TJlTUHHY4YLL87e37oUA49DfkLqgy+VjFocowy29cKvcSiu+kIv728jTTVg==} + engines: {node: '>= 0.4'} + + is-set@2.0.3: + resolution: {integrity: sha512-iPAjerrse27/ygGLxw+EBR9agv9Y6uLeYVJMu+QNCoouJ1/1ri0mGrcWpfCqFZuzzx3WjtwxG098X+n4OuRkPg==} + engines: {node: '>= 0.4'} + + is-shared-array-buffer@1.0.3: + resolution: {integrity: sha512-nA2hv5XIhLR3uVzDDfCIknerhx8XUKnstuOERPNNIinXG7v9u+ohXF67vxm4TPTEPU6lm61ZkwP3c9PCB97rhg==} + engines: {node: '>= 0.4'} + + is-stream@2.0.1: + resolution: {integrity: sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==} + engines: {node: '>=8'} + + is-string@1.0.7: + resolution: {integrity: sha512-tE2UXzivje6ofPW7l23cjDOMa09gb7xlAqG6jG5ej6uPV32TlWP3NKPigtaGeHNu9fohccRYvIiZMfOOnOYUtg==} + engines: {node: '>= 0.4'} + + is-symbol@1.0.4: + resolution: {integrity: sha512-C/CPBqKWnvdcxqIARxyOh4v1UUEOCHpgDa0WYgpKDFMszcrPcffg5uhwSgPCLD2WWxmq6isisz87tzT01tuGhg==} + engines: {node: '>= 0.4'} + + is-typed-array@1.1.13: + resolution: {integrity: sha512-uZ25/bUAlUY5fR4OKT4rZQEBrzQWYV9ZJYGGsUmEJ6thodVJ1HX64ePQ6Z0qPWP+m+Uq6e9UugrE38jeYsDSMw==} + engines: {node: '>= 0.4'} + + is-unicode-supported@0.1.0: + resolution: {integrity: sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw==} + engines: {node: '>=10'} + + is-upper-case@1.1.2: + resolution: {integrity: sha512-GQYSJMgfeAmVwh9ixyk888l7OIhNAGKtY6QA+IrWlu9MDTCaXmeozOZ2S9Knj7bQwBO/H6J2kb+pbyTUiMNbsw==} + + is-weakmap@2.0.2: + resolution: {integrity: sha512-K5pXYOm9wqY1RgjpL3YTkF39tni1XajUIkawTLUo9EZEVUFga5gSQJF8nNS7ZwJQ02y+1YCNYcMh+HIf1ZqE+w==} + engines: {node: '>= 0.4'} + + is-weakref@1.0.2: + resolution: {integrity: sha512-qctsuLZmIQ0+vSSMfoVvyFe2+GSEvnmZ2ezTup1SBse9+twCCeial6EEi3Nc2KFcf6+qz2FBPnjXsk8xhKSaPQ==} + + is-weakset@2.0.3: + resolution: {integrity: sha512-LvIm3/KWzS9oRFHugab7d+M/GcBXuXX5xZkzPmN+NxihdQlZUQ4dWuSV1xR/sq6upL1TJEDrfBgRepHFdBtSNQ==} + engines: {node: '>= 0.4'} + + isarray@2.0.5: + resolution: {integrity: sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==} + + isbinaryfile@4.0.10: + resolution: {integrity: sha512-iHrqe5shvBUcFbmZq9zOQHBoeOhZJu6RQGrDpBgenUm/Am+F3JM2MgQj+rK3Z601fzrL5gLZWtAPH2OBaSVcyw==} + engines: {node: '>= 8.0.0'} + + isexe@2.0.0: + resolution: {integrity: sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==} + + iterator.prototype@1.1.3: + resolution: {integrity: sha512-FW5iMbeQ6rBGm/oKgzq2aW4KvAGpxPzYES8N4g4xNXUKpL1mclMvOe+76AcLDTvD+Ze+sOpVhgdAQEKF4L9iGQ==} + engines: {node: '>= 0.4'} + + js-tokens@4.0.0: + resolution: {integrity: sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==} + + js-yaml@4.1.0: + resolution: {integrity: sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==} + hasBin: true + + jsbn@1.1.0: + resolution: {integrity: sha512-4bYVV3aAMtDTTu4+xsDYa6sy9GyJ69/amsu9sYF2zqjiEoZA5xJi3BrfX3uY+/IekIu7MwdObdbDWpoZdBv3/A==} + + json-buffer@3.0.1: + resolution: {integrity: sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==} + + json-schema-traverse@0.4.1: + resolution: {integrity: sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==} + + json-stable-stringify-without-jsonify@1.0.1: + resolution: {integrity: sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==} + + jsonfile@6.1.0: + resolution: {integrity: sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==} + + jsx-ast-utils@3.3.5: + resolution: {integrity: sha512-ZZow9HBI5O6EPgSJLUb8n2NKgmVWTwCvHGwFuJlMjvLFqlGG6pjirPhtdsseaLZjSibD8eegzmYpUZwoIlj2cQ==} + engines: {node: '>=4.0'} + + keyv@4.5.4: + resolution: {integrity: sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw==} + + levn@0.4.1: + resolution: {integrity: sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==} + engines: {node: '>= 0.8.0'} + + locate-path@6.0.0: + resolution: {integrity: sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==} + engines: {node: '>=10'} + + lodash.get@4.4.2: + resolution: {integrity: sha512-z+Uw/vLuy6gQe8cfaFWD7p0wVv8fJl3mbzXh33RS+0oW2wvUqiRXiQ69gLWSLpgB5/6sU+r6BlQR0MBILadqTQ==} + + lodash.merge@4.6.2: + resolution: {integrity: sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==} + + lodash@4.17.21: + resolution: {integrity: sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==} + + log-symbols@3.0.0: + resolution: {integrity: sha512-dSkNGuI7iG3mfvDzUuYZyvk5dD9ocYCYzNU6CYDE6+Xqd+gwme6Z00NS3dUh8mq/73HaEtT7m6W+yUPtU6BZnQ==} + engines: {node: '>=8'} + + log-symbols@4.1.0: + resolution: {integrity: sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg==} + engines: {node: '>=10'} + + loose-envify@1.4.0: + resolution: {integrity: sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==} + hasBin: true + + lower-case-first@1.0.2: + resolution: {integrity: sha512-UuxaYakO7XeONbKrZf5FEgkantPf5DUqDayzP5VXZrtRPdH86s4kN47I8B3TW10S4QKiE3ziHNf3kRN//okHjA==} + + lower-case@1.1.4: + resolution: {integrity: sha512-2Fgx1Ycm599x+WGpIYwJOvsjmXFzTSc34IwDWALRA/8AopUKAVPwfJ+h5+f85BCp0PWmmJcWzEpxOpoXycMpdA==} + + lru-cache@7.18.3: + resolution: {integrity: sha512-jumlc0BIUrS3qJGgIkWZsyfAM7NCWiBcCDhnd+3NNM5KbBmLTgHVfWBcg6W+rLUsIpzpERPsvwUP7CckAQSOoA==} + engines: {node: '>=12'} + + make-error@1.3.6: + resolution: {integrity: sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==} + + merge-stream@2.0.0: + resolution: {integrity: sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==} + + merge2@1.4.1: + resolution: {integrity: sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==} + engines: {node: '>= 8'} + + micromatch@4.0.8: + resolution: {integrity: sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==} + engines: {node: '>=8.6'} + + mimic-fn@2.1.0: + resolution: {integrity: sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==} + engines: {node: '>=6'} + + minimatch@3.1.2: + resolution: {integrity: sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==} + + minimatch@9.0.5: + resolution: {integrity: sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==} + engines: {node: '>=16 || 14 >=14.17'} + + minimist@1.2.8: + resolution: {integrity: sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==} + + mkdirp@0.5.6: + resolution: {integrity: sha512-FP+p8RB8OWpF3YZBCrP5gtADmtXApB5AMLn+vdyA+PyxCjrCs00mjyUozssO33cwDeT3wNGdLxJ5M//YqtHAJw==} + hasBin: true + + ms@2.1.3: + resolution: {integrity: sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==} + + mute-stream@0.0.8: + resolution: {integrity: sha512-nnbWWOkoWyUsTjKrhgD0dcz22mdkSnpYqbEjIm2nhwhuxlSkpywJmBo8h0ZqJdkp73mb90SssHkN4rsRaBAfAA==} + + nanoid@3.3.7: + resolution: {integrity: sha512-eSRppjcPIatRIMC1U6UngP8XFcz8MQWGQdt1MTBQ7NaAmvXDfvNxbvWV3x2y6CdEUciCSsDHDQZbhYaB8QEo2g==} + engines: {node: ^10 || ^12 || ^13.7 || ^14 || >=15.0.1} + hasBin: true + + natural-compare@1.4.0: + resolution: {integrity: sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==} + + neo-async@2.6.2: + resolution: {integrity: sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==} + + netmask@2.0.2: + resolution: {integrity: sha512-dBpDMdxv9Irdq66304OLfEmQ9tbNRFnFTuZiLo+bD+r332bBmMJ8GBLXklIXXgxd3+v9+KUnZaUR5PJMa75Gsg==} + engines: {node: '>= 0.4.0'} + + next@15.1.0: + resolution: {integrity: sha512-QKhzt6Y8rgLNlj30izdMbxAwjHMFANnLwDwZ+WQh5sMhyt4lEBqDK9QpvWHtIM4rINKPoJ8aiRZKg5ULSybVHw==} + engines: {node: ^18.18.0 || ^19.8.0 || >= 20.0.0} + hasBin: true + peerDependencies: + '@opentelemetry/api': ^1.1.0 + '@playwright/test': ^1.41.2 + babel-plugin-react-compiler: '*' + react: ^18.2.0 || 19.0.0-rc-de68d2f4-20241204 || ^19.0.0 + react-dom: ^18.2.0 || 19.0.0-rc-de68d2f4-20241204 || ^19.0.0 + sass: ^1.3.0 + peerDependenciesMeta: + '@opentelemetry/api': + optional: true + '@playwright/test': + optional: true + babel-plugin-react-compiler: + optional: true + sass: + optional: true + + no-case@2.3.2: + resolution: {integrity: sha512-rmTZ9kz+f3rCvK2TD1Ue/oZlns7OGoIWP4fc3llxxRXlOkHKoWPPWJOfFYpITabSow43QJbRIoHQXtt10VldyQ==} + + node-plop@0.26.3: + resolution: {integrity: sha512-Cov028YhBZ5aB7MdMWJEmwyBig43aGL5WT4vdoB28Oitau1zZAcHUn8Sgfk9HM33TqhtLJ9PlM/O0Mv+QpV/4Q==} + engines: {node: '>=8.9.4'} + + npm-run-path@4.0.1: + resolution: {integrity: sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw==} + engines: {node: '>=8'} + + object-assign@4.1.1: + resolution: {integrity: sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==} + engines: {node: '>=0.10.0'} + + object-inspect@1.13.3: + resolution: {integrity: sha512-kDCGIbxkDSXE3euJZZXzc6to7fCrKHNI/hSRQnRuQ+BWjFNzZwiFF8fj/6o2t2G9/jTj8PSIYTfCLelLZEeRpA==} + engines: {node: '>= 0.4'} + + object-keys@1.1.1: + resolution: {integrity: sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==} + engines: {node: '>= 0.4'} + + object.assign@4.1.5: + resolution: {integrity: sha512-byy+U7gp+FVwmyzKPYhW2h5l3crpmGsxl7X2s8y43IgxvG4g3QZ6CffDtsNQy1WsmZpQbO+ybo0AlW7TY6DcBQ==} + engines: {node: '>= 0.4'} + + object.entries@1.1.8: + resolution: {integrity: sha512-cmopxi8VwRIAw/fkijJohSfpef5PdN0pMQJN6VC/ZKvn0LIknWD8KtgY6KlQdEc4tIjcQ3HxSMmnvtzIscdaYQ==} + engines: {node: '>= 0.4'} + + object.fromentries@2.0.8: + resolution: {integrity: sha512-k6E21FzySsSK5a21KRADBd/NGneRegFO5pLHfdQLpRDETUNJueLXs3WCzyQ3tFRDYgbq3KHGXfTbi2bs8WQ6rQ==} + engines: {node: '>= 0.4'} + + object.values@1.2.0: + resolution: {integrity: sha512-yBYjY9QX2hnRmZHAjG/f13MzmBzxzYgQhFrke06TTyKY5zSTEqkOeukBzIdVA3j3ulu8Qa3MbVFShV7T2RmGtQ==} + engines: {node: '>= 0.4'} + + once@1.4.0: + resolution: {integrity: sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==} + + onetime@5.1.2: + resolution: {integrity: sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==} + engines: {node: '>=6'} + + optionator@0.9.4: + resolution: {integrity: sha512-6IpQ7mKUxRcZNLIObR0hz7lxsapSSIYNZJwXPGeF0mTVqGKFIXj1DQcMoT22S3ROcLyY/rz0PWaWZ9ayWmad9g==} + engines: {node: '>= 0.8.0'} + + ora@4.1.1: + resolution: {integrity: sha512-sjYP8QyVWBpBZWD6Vr1M/KwknSw6kJOz41tvGMlwWeClHBtYKTbHMki1PsLZnxKpXMPbTKv9b3pjQu3REib96A==} + engines: {node: '>=8'} + + ora@5.4.1: + resolution: {integrity: sha512-5b6Y85tPxZZ7QytO+BQzysW31HJku27cRIlkbAXaNx+BdcVi+LlRFmVXzeF6a7JCwJpyw5c4b+YSVImQIrBpuQ==} + engines: {node: '>=10'} + + os-tmpdir@1.0.2: + resolution: {integrity: sha512-D2FR03Vir7FIu45XBY20mTb+/ZSWB00sjU9jdQXt83gDrI4Ztz5Fs7/yy74g2N5SVQY4xY1qDr4rNddwYRVX0g==} + engines: {node: '>=0.10.0'} + + p-limit@3.1.0: + resolution: {integrity: sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==} + engines: {node: '>=10'} + + p-locate@5.0.0: + resolution: {integrity: sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==} + engines: {node: '>=10'} + + p-map@3.0.0: + resolution: {integrity: sha512-d3qXVTF/s+W+CdJ5A29wywV2n8CQQYahlgz2bFiA+4eVNJbHJodPZ+/gXwPGh0bOqA+j8S+6+ckmvLGPk1QpxQ==} + engines: {node: '>=8'} + + pac-proxy-agent@7.0.2: + resolution: {integrity: sha512-BFi3vZnO9X5Qt6NRz7ZOaPja3ic0PhlsmCRYLOpN11+mWBCR6XJDqW5RF3j8jm4WGGQZtBA+bTfxYzeKW73eHg==} + engines: {node: '>= 14'} + + pac-resolver@7.0.1: + resolution: {integrity: sha512-5NPgf87AT2STgwa2ntRMr45jTKrYBGkVU36yT0ig/n/GMAa3oPqhZfIQ2kMEimReg0+t9kZViDVZ83qfVUlckg==} + engines: {node: '>= 14'} + + param-case@2.1.1: + resolution: {integrity: sha512-eQE845L6ot89sk2N8liD8HAuH4ca6Vvr7VWAWwt7+kvvG5aBcPmmphQ68JsEG2qa9n1TykS2DLeMt363AAH8/w==} + + parent-module@1.0.1: + resolution: {integrity: sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==} + engines: {node: '>=6'} + + pascal-case@2.0.1: + resolution: {integrity: sha512-qjS4s8rBOJa2Xm0jmxXiyh1+OFf6ekCWOvUaRgAQSktzlTbMotS0nmG9gyYAybCWBcuP4fsBeRCKNwGBnMe2OQ==} + + path-case@2.1.1: + resolution: {integrity: sha512-Ou0N05MioItesaLr9q8TtHVWmJ6fxWdqKB2RohFmNWVyJ+2zeKIeDNWAN6B/Pe7wpzWChhZX6nONYmOnMeJQ/Q==} + + path-exists@4.0.0: + resolution: {integrity: sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==} + engines: {node: '>=8'} + + path-is-absolute@1.0.1: + resolution: {integrity: sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==} + engines: {node: '>=0.10.0'} + + path-key@3.1.1: + resolution: {integrity: sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==} + engines: {node: '>=8'} + + path-parse@1.0.7: + resolution: {integrity: sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==} + + path-type@4.0.0: + resolution: {integrity: sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==} + engines: {node: '>=8'} + + picocolors@1.1.1: + resolution: {integrity: sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==} + + picomatch@2.3.1: + resolution: {integrity: sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==} + engines: {node: '>=8.6'} + + possible-typed-array-names@1.0.0: + resolution: {integrity: sha512-d7Uw+eZoloe0EHDIYoe+bQ5WXnGMOpmiZFTuMWCwpjzzkL2nTjcKiAk4hh8TjnGye2TwWOk3UXucZ+3rbmBa8Q==} + engines: {node: '>= 0.4'} + + postcss@8.4.31: + resolution: {integrity: sha512-PS08Iboia9mts/2ygV3eLpY5ghnUcfLV/EXTOW1E2qYxJKGGBUtNjN76FYHnMs36RmARn41bC0AZmn+rR0OVpQ==} + engines: {node: ^10 || ^12 || >=14} + + prelude-ls@1.2.1: + resolution: {integrity: sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==} + engines: {node: '>= 0.8.0'} + + prettier@3.3.3: + resolution: {integrity: sha512-i2tDNA0O5IrMO757lfrdQZCc2jPNDVntV0m/+4whiDfWaTKfMNgR7Qz0NAeGz/nRqF4m5/6CLzbP4/liHt12Ew==} + engines: {node: '>=14'} + hasBin: true + + prop-types@15.8.1: + resolution: {integrity: sha512-oj87CgZICdulUohogVAR7AjlC0327U4el4L6eAvOqCeudMDVU0NThNaV+b9Df4dXgSP1gXMTnPdhfe/2qDH5cg==} + + proxy-agent@6.4.0: + resolution: {integrity: sha512-u0piLU+nCOHMgGjRbimiXmA9kM/L9EHh3zL81xCdp7m+Y2pHIsnmbdDoEDoAz5geaonNR6q6+yOPQs6n4T6sBQ==} + engines: {node: '>= 14'} + + proxy-from-env@1.1.0: + resolution: {integrity: sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==} + + punycode@2.3.1: + resolution: {integrity: sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==} + engines: {node: '>=6'} + + queue-microtask@1.2.3: + resolution: {integrity: sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==} + + rc@1.2.8: + resolution: {integrity: sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw==} + hasBin: true + + react-dom@19.0.0: + resolution: {integrity: sha512-4GV5sHFG0e/0AD4X+ySy6UJd3jVl1iNsNHdpad0qhABJ11twS3TTBnseqsKurKcsNqCEFeGL3uLpVChpIO3QfQ==} + peerDependencies: + react: ^19.0.0 + + react-is@16.13.1: + resolution: {integrity: sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==} + + react@19.0.0: + resolution: {integrity: sha512-V8AVnmPIICiWpGfm6GLzCR/W5FXLchHop40W4nXBmdlEceh16rCN8O8LNWm5bh5XUX91fh7KpA+W0TgMKmgTpQ==} + engines: {node: '>=0.10.0'} + + readable-stream@3.6.2: + resolution: {integrity: sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==} + engines: {node: '>= 6'} + + reflect.getprototypeof@1.0.6: + resolution: {integrity: sha512-fmfw4XgoDke3kdI6h4xcUz1dG8uaiv5q9gcEwLS4Pnth2kxT+GZ7YehS1JTMGBQmtV7Y4GFGbs2re2NqhdozUg==} + engines: {node: '>= 0.4'} + + regenerator-runtime@0.14.1: + resolution: {integrity: sha512-dYnhHh0nJoMfnkZs6GmmhFknAGRrLznOu5nc9ML+EJxGvrx6H7teuevqVqCuPcPK//3eDrrjQhehXVx9cnkGdw==} + + regexp.prototype.flags@1.5.3: + resolution: {integrity: sha512-vqlC04+RQoFalODCbCumG2xIOvapzVMHwsyIGM/SIE8fRhFFsXeH8/QQ+s0T0kDAhKc4k30s73/0ydkHQz6HlQ==} + engines: {node: '>= 0.4'} + + registry-auth-token@3.3.2: + resolution: {integrity: sha512-JL39c60XlzCVgNrO+qq68FoNb56w/m7JYvGR2jT5iR1xBrUA3Mfx5Twk5rqTThPmQKMWydGmq8oFtDlxfrmxnQ==} + + registry-url@3.1.0: + resolution: {integrity: sha512-ZbgR5aZEdf4UKZVBPYIgaglBmSF2Hi94s2PcIHhRGFjKYu+chjJdYfHn4rt3hB6eCKLJ8giVIIfgMa1ehDfZKA==} + engines: {node: '>=0.10.0'} + + resolve-from@4.0.0: + resolution: {integrity: sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==} + engines: {node: '>=4'} + + resolve@1.22.8: + resolution: {integrity: sha512-oKWePCxqpd6FlLvGV1VU0x7bkPmmCNolxzjMf4NczoDnQcIWrAF+cPtZn5i6n+RfD2d9i0tzpKnG6Yk168yIyw==} + hasBin: true + + resolve@2.0.0-next.5: + resolution: {integrity: sha512-U7WjGVG9sH8tvjW5SmGbQuui75FiyjAX72HX15DwBBwF9dNiQZRQAg9nnPhYy+TUnE0+VcrttuvNI8oSxZcocA==} + hasBin: true + + restore-cursor@3.1.0: + resolution: {integrity: sha512-l+sSefzHpj5qimhFSE5a8nufZYAM3sBSVMAPtYkmC+4EH2anSGaEMXSD0izRQbu9nfyQ9y5JrVmp7E8oZrUjvA==} + engines: {node: '>=8'} + + reusify@1.0.4: + resolution: {integrity: sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==} + engines: {iojs: '>=1.0.0', node: '>=0.10.0'} + + rimraf@3.0.2: + resolution: {integrity: sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==} + deprecated: Rimraf versions prior to v4 are no longer supported + hasBin: true + + run-async@2.4.1: + resolution: {integrity: sha512-tvVnVv01b8c1RrA6Ep7JkStj85Guv/YrMcwqYQnwjsAS2cTmmPGBBjAjpCW7RrSodNSoE2/qg9O4bceNvUuDgQ==} + engines: {node: '>=0.12.0'} + + run-parallel@1.2.0: + resolution: {integrity: sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==} + + rxjs@6.6.7: + resolution: {integrity: sha512-hTdwr+7yYNIT5n4AMYp85KA6yw2Va0FLa3Rguvbpa4W3I5xynaBZo41cM3XM+4Q6fRMj3sBYIR1VAmZMXYJvRQ==} + engines: {npm: '>=2.0.0'} + + rxjs@7.8.1: + resolution: {integrity: sha512-AA3TVj+0A2iuIoQkWEK/tqFjBq2j+6PO6Y0zJcvzLAFhEFIO3HL0vls9hWLncZbAAbK0mar7oZ4V079I/qPMxg==} + + safe-array-concat@1.1.2: + resolution: {integrity: sha512-vj6RsCsWBCf19jIeHEfkRMw8DPiBb+DMXklQ/1SGDHOMlHdPUkZXFQ2YdplS23zESTijAcurb1aSgJA3AgMu1Q==} + engines: {node: '>=0.4'} + + safe-buffer@5.2.1: + resolution: {integrity: sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==} + + safe-regex-test@1.0.3: + resolution: {integrity: sha512-CdASjNJPvRa7roO6Ra/gLYBTzYzzPyyBXxIMdGW3USQLyjWEls2RgW5UBTXaQVp+OrpeCK3bLem8smtmheoRuw==} + engines: {node: '>= 0.4'} + + safer-buffer@2.1.2: + resolution: {integrity: sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==} + + scheduler@0.25.0: + resolution: {integrity: sha512-xFVuu11jh+xcO7JOAGJNOXld8/TcEHK/4CituBUeUb5hqxJLj9YuemAEuvm9gQ/+pgXYfbQuqAkiYu+u7YEsNA==} + + semver@6.3.1: + resolution: {integrity: sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==} + hasBin: true + + semver@7.6.3: + resolution: {integrity: sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==} + engines: {node: '>=10'} + hasBin: true + + sentence-case@2.1.1: + resolution: {integrity: sha512-ENl7cYHaK/Ktwk5OTD+aDbQ3uC8IByu/6Bkg+HDv8Mm+XnBnppVNalcfJTNsp1ibstKh030/JKQQWglDvtKwEQ==} + + set-function-length@1.2.2: + resolution: {integrity: sha512-pgRc4hJ4/sNjWCSS9AmnS40x3bNMDTknHgL5UaMBTMyJnU90EgWh1Rz+MC9eFu4BuN/UwZjKQuY/1v3rM7HMfg==} + engines: {node: '>= 0.4'} + + set-function-name@2.0.2: + resolution: {integrity: sha512-7PGFlmtwsEADb0WYyvCMa1t+yke6daIG4Wirafur5kcf+MhUnPms1UeR0CKQdTZD81yESwMHbtn+TR+dMviakQ==} + engines: {node: '>= 0.4'} + + sharp@0.33.5: + resolution: {integrity: sha512-haPVm1EkS9pgvHrQ/F3Xy+hgcuMV0Wm9vfIBSiwZ05k+xgb0PkBQpGsAA/oWdDobNaZTH5ppvHtzCFbnSEwHVw==} + engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0} + + shebang-command@2.0.0: + resolution: {integrity: sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==} + engines: {node: '>=8'} + + shebang-regex@3.0.0: + resolution: {integrity: sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==} + engines: {node: '>=8'} + + side-channel@1.0.6: + resolution: {integrity: sha512-fDW/EZ6Q9RiO8eFG8Hj+7u/oW+XrPTIChwCOM2+th2A6OblDtYYIpve9m+KvI9Z4C9qSEXlaGR6bTEYHReuglA==} + engines: {node: '>= 0.4'} + + signal-exit@3.0.7: + resolution: {integrity: sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==} + + simple-swizzle@0.2.2: + resolution: {integrity: sha512-JA//kQgZtbuY83m+xT+tXJkmJncGMTFT+C+g2h2R9uxkYIrE2yy9sgmcLhCnw57/WSD+Eh3J97FPEDFnbXnDUg==} + + slash@3.0.0: + resolution: {integrity: sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==} + engines: {node: '>=8'} + + smart-buffer@4.2.0: + resolution: {integrity: sha512-94hK0Hh8rPqQl2xXc3HsaBoOXKV20MToPkcXvwbISWLEs+64sBq5kFgn2kJDHb1Pry9yrP0dxrCI9RRci7RXKg==} + engines: {node: '>= 6.0.0', npm: '>= 3.0.0'} + + snake-case@2.1.0: + resolution: {integrity: sha512-FMR5YoPFwOLuh4rRz92dywJjyKYZNLpMn1R5ujVpIYkbA9p01fq8RMg0FkO4M+Yobt4MjHeLTJVm5xFFBHSV2Q==} + + socks-proxy-agent@8.0.4: + resolution: {integrity: sha512-GNAq/eg8Udq2x0eNiFkr9gRg5bA7PXEWagQdeRX4cPSG+X/8V38v637gim9bjFptMk1QWsCTr0ttrJEiXbNnRw==} + engines: {node: '>= 14'} + + socks@2.8.3: + resolution: {integrity: sha512-l5x7VUUWbjVFbafGLxPWkYsHIhEvmF85tbIeFZWc8ZPtoMyybuEhL7Jye/ooC4/d48FgOjSJXgsF/AJPYCW8Zw==} + engines: {node: '>= 10.0.0', npm: '>= 3.0.0'} + + source-map-js@1.2.1: + resolution: {integrity: sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA==} + engines: {node: '>=0.10.0'} + + source-map@0.6.1: + resolution: {integrity: sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==} + engines: {node: '>=0.10.0'} + + sprintf-js@1.1.3: + resolution: {integrity: sha512-Oo+0REFV59/rz3gfJNKQiBlwfHaSESl1pcGyABQsnnIfWOFt6JNj5gCog2U6MLZ//IGYD+nA8nI+mTShREReaA==} + + streamsearch@1.1.0: + resolution: {integrity: sha512-Mcc5wHehp9aXz1ax6bZUyY5afg9u2rv5cqQI3mRrYkGC8rW2hM02jWuwjtL++LS5qinSyhj2QfLyNsuc+VsExg==} + engines: {node: '>=10.0.0'} + + string-width@4.2.3: + resolution: {integrity: sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==} + engines: {node: '>=8'} + + string.prototype.matchall@4.0.11: + resolution: {integrity: sha512-NUdh0aDavY2og7IbBPenWqR9exH+E26Sv8e0/eTe1tltDGZL+GtBkDAnnyBtmekfK6/Dq3MkcGtzXFEd1LQrtg==} + engines: {node: '>= 0.4'} + + string.prototype.repeat@1.0.0: + resolution: {integrity: sha512-0u/TldDbKD8bFCQ/4f5+mNRrXwZ8hg2w7ZR8wa16e8z9XpePWl3eGEcUD0OXpEH/VJH/2G3gjUtR3ZOiBe2S/w==} + + string.prototype.trim@1.2.9: + resolution: {integrity: sha512-klHuCNxiMZ8MlsOihJhJEBJAiMVqU3Z2nEXWfWnIqjN0gEFS9J9+IxKozWWtQGcgoa1WUZzLjKPTr4ZHNFTFxw==} + engines: {node: '>= 0.4'} + + string.prototype.trimend@1.0.8: + resolution: {integrity: sha512-p73uL5VCHCO2BZZ6krwwQE3kCzM7NKmis8S//xEC6fQonchbum4eP6kR4DLEjQFO3Wnj3Fuo8NM0kOSjVdHjZQ==} + + string.prototype.trimstart@1.0.8: + resolution: {integrity: sha512-UXSH262CSZY1tfu3G3Secr6uGLCFVPMhIqHjlgCUtCCcgihYc/xKs9djMTMUOb2j1mVSeU8EU6NWc/iQKU6Gfg==} + engines: {node: '>= 0.4'} + + string_decoder@1.3.0: + resolution: {integrity: sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==} + + strip-ansi@6.0.1: + resolution: {integrity: sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==} + engines: {node: '>=8'} + + strip-final-newline@2.0.0: + resolution: {integrity: sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA==} + engines: {node: '>=6'} + + strip-json-comments@2.0.1: + resolution: {integrity: sha512-4gB8na07fecVVkOI6Rs4e7T6NOTki5EmL7TUduTs6bu3EdnSycntVJ4re8kgZA+wx9IueI2Y11bfbgwtzuE0KQ==} + engines: {node: '>=0.10.0'} + + strip-json-comments@3.1.1: + resolution: {integrity: sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==} + engines: {node: '>=8'} + + styled-jsx@5.1.6: + resolution: {integrity: sha512-qSVyDTeMotdvQYoHWLNGwRFJHC+i+ZvdBRYosOFgC+Wg1vx4frN2/RG/NA7SYqqvKNLf39P2LSRA2pu6n0XYZA==} + engines: {node: '>= 12.0.0'} + peerDependencies: + '@babel/core': '*' + babel-plugin-macros: '*' + react: '>= 16.8.0 || 17.x.x || ^18.0.0-0 || ^19.0.0-0' + peerDependenciesMeta: + '@babel/core': + optional: true + babel-plugin-macros: + optional: true + + supports-color@5.5.0: + resolution: {integrity: sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==} + engines: {node: '>=4'} + + supports-color@7.2.0: + resolution: {integrity: sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==} + engines: {node: '>=8'} + + supports-preserve-symlinks-flag@1.0.0: + resolution: {integrity: sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==} + engines: {node: '>= 0.4'} + + swap-case@1.1.2: + resolution: {integrity: sha512-BAmWG6/bx8syfc6qXPprof3Mn5vQgf5dwdUNJhsNqU9WdPt5P+ES/wQ5bxfijy8zwZgZZHslC3iAsxsuQMCzJQ==} + + through@2.3.8: + resolution: {integrity: sha512-w89qg7PI8wAdvX60bMDP+bFoD5Dvhm9oLheFp5O4a2QF0cSBGsBX4qZmadPMvVqlLJBBci+WqGGOAPvcDeNSVg==} + + tinycolor2@1.6.0: + resolution: {integrity: sha512-XPaBkWQJdsf3pLKJV9p4qN/S+fm2Oj8AIPo1BTUhg5oxkvm9+SVEGFdhyOz7tTdUTfvxMiAs4sp6/eZO2Ew+pw==} + + tinygradient@1.1.5: + resolution: {integrity: sha512-8nIfc2vgQ4TeLnk2lFj4tRLvvJwEfQuabdsmvDdQPT0xlk9TaNtpGd6nNRxXoK6vQhN6RSzj+Cnp5tTQmpxmbw==} + + title-case@2.1.1: + resolution: {integrity: sha512-EkJoZ2O3zdCz3zJsYCsxyq2OC5hrxR9mfdd5I+w8h/tmFfeOxJ+vvkxsKxdmN0WtS9zLdHEgfgVOiMVgv+Po4Q==} + + tmp@0.0.33: + resolution: {integrity: sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw==} + engines: {node: '>=0.6.0'} + + to-regex-range@5.0.1: + resolution: {integrity: sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==} + engines: {node: '>=8.0'} + + ts-api-utils@1.4.0: + resolution: {integrity: sha512-032cPxaEKwM+GT3vA5JXNzIaizx388rhsSW79vGRNGXfRRAdEAn2mvk36PvK5HnOchyWZ7afLEXqYCvPCrzuzQ==} + engines: {node: '>=16'} + peerDependencies: + typescript: '>=4.2.0' + + ts-node@10.9.2: + resolution: {integrity: sha512-f0FFpIdcHgn8zcPSbf1dRevwt047YMnaiJM3u2w2RewrB+fob/zePZcrOyQoLMMO7aBIddLcQIEK5dYjkLnGrQ==} + hasBin: true + peerDependencies: + '@swc/core': '>=1.2.50' + '@swc/wasm': '>=1.2.50' + '@types/node': '*' + typescript: '>=2.7' + peerDependenciesMeta: + '@swc/core': + optional: true + '@swc/wasm': + optional: true + + tslib@1.14.1: + resolution: {integrity: sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==} + + tslib@2.8.1: + resolution: {integrity: sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==} + + turbo-darwin-64@2.3.1: + resolution: {integrity: sha512-tjHfjW/Gs8Q9IO+9gPdIsSStZ8I09QYDRT/SyhFTPLnc7O2ZlxHPBVFfjUkHUjanHNYO8CpRGt+zdp1PaMCruw==} + cpu: [x64] + os: [darwin] + + turbo-darwin-arm64@2.3.1: + resolution: {integrity: sha512-At1WStnxCfrBQ4M2g6ynre8WsusGwA11okhVolBxyFUemYozDTtbZwelr+IqNggjT251vviokxOkcFzzogbiFw==} + cpu: [arm64] + os: [darwin] + + turbo-linux-64@2.3.1: + resolution: {integrity: sha512-COwEev7s9fsxLM2eoRCyRLPj+BXvZjFIS+GxzdAubYhoSoZit8B8QGKczyDl6448xhuFEWKrpHhcR9aBuwB4ag==} + cpu: [x64] + os: [linux] + + turbo-linux-arm64@2.3.1: + resolution: {integrity: sha512-AP0uE15Rhxza2Jl+Q3gxdXRA92IIeFAYaufz6CMcZuGy9yZsBlLt9w6T47H6g7XQPzWuw8pzfjM1omcTKkkDpQ==} + cpu: [arm64] + os: [linux] + + turbo-windows-64@2.3.1: + resolution: {integrity: sha512-HDSneq0dNZYZch74c2eygq+OiJE/JYDs7OsGM0yRYVj336383xkUnxz6W2I7qiyMCQXzp4UVUDZXvZhUYcX3BA==} + cpu: [x64] + os: [win32] + + turbo-windows-arm64@2.3.1: + resolution: {integrity: sha512-7/2/sJZiquwoT/jWBCfV0qKq4NarsJPmDRjMcR9dDMIwCYsGM8ljomkDRTCtkNeFcUvYw54MiRWHehWgbcRPsw==} + cpu: [arm64] + os: [win32] + + turbo@2.3.1: + resolution: {integrity: sha512-vHZe/e6k1HZVKiMQPQ1BWFn53vjVQDFKdkjUq/pBKlRWi1gw9LQO6ntH4qZCcHY1rH6TXgsRmexXdgWl96YvVQ==} + hasBin: true + + type-check@0.4.0: + resolution: {integrity: sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==} + engines: {node: '>= 0.8.0'} + + type-fest@0.21.3: + resolution: {integrity: sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w==} + engines: {node: '>=10'} + + typed-array-buffer@1.0.2: + resolution: {integrity: sha512-gEymJYKZtKXzzBzM4jqa9w6Q1Jjm7x2d+sh19AdsD4wqnMPDYyvwpsIc2Q/835kHuo3BEQ7CjelGhfTsoBb2MQ==} + engines: {node: '>= 0.4'} + + typed-array-byte-length@1.0.1: + resolution: {integrity: sha512-3iMJ9q0ao7WE9tWcaYKIptkNBuOIcZCCT0d4MRvuuH88fEoEH62IuQe0OtraD3ebQEoTRk8XCBoknUNc1Y67pw==} + engines: {node: '>= 0.4'} + + typed-array-byte-offset@1.0.3: + resolution: {integrity: sha512-GsvTyUHTriq6o/bHcTd0vM7OQ9JEdlvluu9YISaA7+KzDzPaIzEeDFNkTfhdE3MYcNhNi0vq/LlegYgIs5yPAw==} + engines: {node: '>= 0.4'} + + typed-array-length@1.0.7: + resolution: {integrity: sha512-3KS2b+kL7fsuk/eJZ7EQdnEmQoaho/r6KUef7hxvltNA5DR8NAUM+8wJMbJyZ4G9/7i3v5zPBIMN5aybAh2/Jg==} + engines: {node: '>= 0.4'} + + typescript-eslint@8.15.0: + resolution: {integrity: sha512-wY4FRGl0ZI+ZU4Jo/yjdBu0lVTSML58pu6PgGtJmCufvzfV565pUF6iACQt092uFOd49iLOTX/sEVmHtbSrS+w==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + peerDependencies: + eslint: ^8.57.0 || ^9.0.0 + typescript: '*' + peerDependenciesMeta: + typescript: + optional: true + + typescript@5.5.4: + resolution: {integrity: sha512-Mtq29sKDAEYP7aljRgtPOpTvOfbwRWlS6dPRzwjdE+C0R4brX/GUyhHSecbHMFLNBLcJIPt9nl9yG5TZ1weH+Q==} + engines: {node: '>=14.17'} + hasBin: true + + uglify-js@3.19.3: + resolution: {integrity: sha512-v3Xu+yuwBXisp6QYTcH4UbH+xYJXqnq2m/LtQVWKWzYc1iehYnLixoQDN9FH6/j9/oybfd6W9Ghwkl8+UMKTKQ==} + engines: {node: '>=0.8.0'} + hasBin: true + + unbox-primitive@1.0.2: + resolution: {integrity: sha512-61pPlCD9h51VoreyJ0BReideM3MDKMKnh6+V9L08331ipq6Q8OFXZYiqP6n/tbHx4s5I9uRhcye6BrbkizkBDw==} + + undici-types@6.19.8: + resolution: {integrity: sha512-ve2KP6f/JnbPBFyobGHuerC9g1FYGn/F8n1LWTwNxCEzd6IfqTwUQcNXgEtmmQ6DlRrC1hrSrBnCZPokRrDHjw==} + + universalify@2.0.1: + resolution: {integrity: sha512-gptHNQghINnc/vTGIk0SOFGFNXw7JVrlRUtConJRlvaw6DuX0wO5Jeko9sWrMBhh+PsYAZ7oXAiOnf/UKogyiw==} + engines: {node: '>= 10.0.0'} + + update-check@1.5.4: + resolution: {integrity: sha512-5YHsflzHP4t1G+8WGPlvKbJEbAJGCgw+Em+dGR1KmBUbr1J36SJBqlHLjR7oob7sco5hWHGQVcr9B2poIVDDTQ==} + + upper-case-first@1.1.2: + resolution: {integrity: sha512-wINKYvI3Db8dtjikdAqoBbZoP6Q+PZUyfMR7pmwHzjC2quzSkUq5DmPrTtPEqHaz8AGtmsB4TqwapMTM1QAQOQ==} + + upper-case@1.1.3: + resolution: {integrity: sha512-WRbjgmYzgXkCV7zNVpy5YgrHgbBv126rMALQQMrmzOVC4GM2waQ9x7xtm8VU+1yF2kWyPzI9zbZ48n4vSxwfSA==} + + uri-js@4.4.1: + resolution: {integrity: sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==} + + util-deprecate@1.0.2: + resolution: {integrity: sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==} + + v8-compile-cache-lib@3.0.1: + resolution: {integrity: sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg==} + + validate-npm-package-name@5.0.1: + resolution: {integrity: sha512-OljLrQ9SQdOUqTaQxqL5dEfZWrXExyyWsozYlAWFawPVNuD83igl7uJD2RTkNMbniIYgt8l81eCJGIdQF7avLQ==} + engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0} + + wcwidth@1.0.1: + resolution: {integrity: sha512-XHPEwS0q6TaxcvG85+8EYkbiCux2XtWG2mkc47Ng2A77BQu9+DqIOJldST4HgPkuea7dvKSj5VgX3P1d4rW8Tg==} + + which-boxed-primitive@1.0.2: + resolution: {integrity: sha512-bwZdv0AKLpplFY2KZRX6TvyuN7ojjr7lwkg6ml0roIy9YeuSr7JS372qlNW18UQYzgYK9ziGcerWqZOmEn9VNg==} + + which-builtin-type@1.1.4: + resolution: {integrity: sha512-bppkmBSsHFmIMSl8BO9TbsyzsvGjVoppt8xUiGzwiu/bhDCGxnpOKCxgqj6GuyHE0mINMDecBFPlOm2hzY084w==} + engines: {node: '>= 0.4'} + + which-collection@1.0.2: + resolution: {integrity: sha512-K4jVyjnBdgvc86Y6BkaLZEN933SwYOuBFkdmBu9ZfkcAbdVbpITnDmjvZ/aQjRXQrv5EPkTnD1s39GiiqbngCw==} + engines: {node: '>= 0.4'} + + which-typed-array@1.1.15: + resolution: {integrity: sha512-oV0jmFtUky6CXfkqehVvBP/LSWJ2sy4vWMioiENyJLePrBO/yKyV9OyJySfAKosh+RYkIl5zJCNZ8/4JncrpdA==} + engines: {node: '>= 0.4'} + + which@2.0.2: + resolution: {integrity: sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==} + engines: {node: '>= 8'} + hasBin: true + + word-wrap@1.2.5: + resolution: {integrity: sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA==} + engines: {node: '>=0.10.0'} + + wordwrap@1.0.0: + resolution: {integrity: sha512-gvVzJFlPycKc5dZN4yPkP8w7Dc37BtP1yczEneOb4uq34pXZcvrtRTmWV8W+Ume+XCxKgbjM+nevkyFPMybd4Q==} + + wrap-ansi@6.2.0: + resolution: {integrity: sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA==} + engines: {node: '>=8'} + + wrappy@1.0.2: + resolution: {integrity: sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==} + + yn@3.1.1: + resolution: {integrity: sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q==} + engines: {node: '>=6'} + + yocto-queue@0.1.0: + resolution: {integrity: sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==} + engines: {node: '>=10'} + +snapshots: + + '@babel/runtime-corejs3@7.26.0': + dependencies: + core-js-pure: 3.39.0 + regenerator-runtime: 0.14.1 + + '@cspotcode/source-map-support@0.8.1': + dependencies: + '@jridgewell/trace-mapping': 0.3.9 + + '@emnapi/runtime@1.3.1': + dependencies: + tslib: 2.8.1 + optional: true + + '@eslint-community/eslint-utils@4.4.1(eslint@9.15.0)': + dependencies: + eslint: 9.15.0 + eslint-visitor-keys: 3.4.3 + + '@eslint-community/regexpp@4.12.1': {} + + '@eslint/config-array@0.19.0': + dependencies: + '@eslint/object-schema': 2.1.4 + debug: 4.3.7 + minimatch: 3.1.2 + transitivePeerDependencies: + - supports-color + + '@eslint/core@0.9.0': {} + + '@eslint/eslintrc@3.2.0': + dependencies: + ajv: 6.12.6 + debug: 4.3.7 + espree: 10.3.0 + globals: 14.0.0 + ignore: 5.3.2 + import-fresh: 3.3.0 + js-yaml: 4.1.0 + minimatch: 3.1.2 + strip-json-comments: 3.1.1 + transitivePeerDependencies: + - supports-color + + '@eslint/js@9.15.0': {} + + '@eslint/js@9.17.0': {} + + '@eslint/object-schema@2.1.4': {} + + '@eslint/plugin-kit@0.2.3': + dependencies: + levn: 0.4.1 + + '@humanfs/core@0.19.1': {} + + '@humanfs/node@0.16.6': + dependencies: + '@humanfs/core': 0.19.1 + '@humanwhocodes/retry': 0.3.1 + + '@humanwhocodes/module-importer@1.0.1': {} + + '@humanwhocodes/retry@0.3.1': {} + + '@humanwhocodes/retry@0.4.1': {} + + '@img/sharp-darwin-arm64@0.33.5': + optionalDependencies: + '@img/sharp-libvips-darwin-arm64': 1.0.4 + optional: true + + '@img/sharp-darwin-x64@0.33.5': + optionalDependencies: + '@img/sharp-libvips-darwin-x64': 1.0.4 + optional: true + + '@img/sharp-libvips-darwin-arm64@1.0.4': + optional: true + + '@img/sharp-libvips-darwin-x64@1.0.4': + optional: true + + '@img/sharp-libvips-linux-arm64@1.0.4': + optional: true + + '@img/sharp-libvips-linux-arm@1.0.5': + optional: true + + '@img/sharp-libvips-linux-s390x@1.0.4': + optional: true + + '@img/sharp-libvips-linux-x64@1.0.4': + optional: true + + '@img/sharp-libvips-linuxmusl-arm64@1.0.4': + optional: true + + '@img/sharp-libvips-linuxmusl-x64@1.0.4': + optional: true + + '@img/sharp-linux-arm64@0.33.5': + optionalDependencies: + '@img/sharp-libvips-linux-arm64': 1.0.4 + optional: true + + '@img/sharp-linux-arm@0.33.5': + optionalDependencies: + '@img/sharp-libvips-linux-arm': 1.0.5 + optional: true + + '@img/sharp-linux-s390x@0.33.5': + optionalDependencies: + '@img/sharp-libvips-linux-s390x': 1.0.4 + optional: true + + '@img/sharp-linux-x64@0.33.5': + optionalDependencies: + '@img/sharp-libvips-linux-x64': 1.0.4 + optional: true + + '@img/sharp-linuxmusl-arm64@0.33.5': + optionalDependencies: + '@img/sharp-libvips-linuxmusl-arm64': 1.0.4 + optional: true + + '@img/sharp-linuxmusl-x64@0.33.5': + optionalDependencies: + '@img/sharp-libvips-linuxmusl-x64': 1.0.4 + optional: true + + '@img/sharp-wasm32@0.33.5': + dependencies: + '@emnapi/runtime': 1.3.1 + optional: true + + '@img/sharp-win32-ia32@0.33.5': + optional: true + + '@img/sharp-win32-x64@0.33.5': + optional: true + + '@jridgewell/resolve-uri@3.1.2': {} + + '@jridgewell/sourcemap-codec@1.5.0': {} + + '@jridgewell/trace-mapping@0.3.9': + dependencies: + '@jridgewell/resolve-uri': 3.1.2 + '@jridgewell/sourcemap-codec': 1.5.0 + + '@next/env@15.1.0': {} + + '@next/eslint-plugin-next@15.1.0': + dependencies: + fast-glob: 3.3.1 + + '@next/swc-darwin-arm64@15.1.0': + optional: true + + '@next/swc-darwin-x64@15.1.0': + optional: true + + '@next/swc-linux-arm64-gnu@15.1.0': + optional: true + + '@next/swc-linux-arm64-musl@15.1.0': + optional: true + + '@next/swc-linux-x64-gnu@15.1.0': + optional: true + + '@next/swc-linux-x64-musl@15.1.0': + optional: true + + '@next/swc-win32-arm64-msvc@15.1.0': + optional: true + + '@next/swc-win32-x64-msvc@15.1.0': + optional: true + + '@nodelib/fs.scandir@2.1.5': + dependencies: + '@nodelib/fs.stat': 2.0.5 + run-parallel: 1.2.0 + + '@nodelib/fs.stat@2.0.5': {} + + '@nodelib/fs.walk@1.2.8': + dependencies: + '@nodelib/fs.scandir': 2.1.5 + fastq: 1.17.1 + + '@swc/counter@0.1.3': {} + + '@swc/helpers@0.5.15': + dependencies: + tslib: 2.8.1 + + '@tootallnate/quickjs-emscripten@0.23.0': {} + + '@tsconfig/node10@1.0.11': {} + + '@tsconfig/node12@1.0.11': {} + + '@tsconfig/node14@1.0.3': {} + + '@tsconfig/node16@1.0.4': {} + + '@turbo/gen@1.13.4(@types/node@20.17.6)(typescript@5.5.4)': + dependencies: + '@turbo/workspaces': 1.13.4 + chalk: 2.4.2 + commander: 10.0.1 + fs-extra: 10.1.0 + inquirer: 8.2.6 + minimatch: 9.0.5 + node-plop: 0.26.3 + proxy-agent: 6.4.0 + ts-node: 10.9.2(@types/node@20.17.6)(typescript@5.5.4) + update-check: 1.5.4 + validate-npm-package-name: 5.0.1 + transitivePeerDependencies: + - '@swc/core' + - '@swc/wasm' + - '@types/node' + - supports-color + - typescript + + '@turbo/workspaces@1.13.4': + dependencies: + chalk: 2.4.2 + commander: 10.0.1 + execa: 5.1.1 + fast-glob: 3.3.2 + fs-extra: 10.1.0 + gradient-string: 2.0.2 + inquirer: 8.2.6 + js-yaml: 4.1.0 + ora: 4.1.1 + rimraf: 3.0.2 + semver: 7.6.3 + update-check: 1.5.4 + + '@types/estree@1.0.6': {} + + '@types/glob@7.2.0': + dependencies: + '@types/minimatch': 5.1.2 + '@types/node': 20.17.6 + + '@types/inquirer@6.5.0': + dependencies: + '@types/through': 0.0.33 + rxjs: 6.6.7 + + '@types/json-schema@7.0.15': {} + + '@types/minimatch@5.1.2': {} + + '@types/node@20.17.6': + dependencies: + undici-types: 6.19.8 + + '@types/prop-types@15.7.13': {} + + '@types/react-dom@18.3.0': + dependencies: + '@types/react': 18.3.1 + + '@types/react-dom@18.3.1': + dependencies: + '@types/react': 18.3.1 + + '@types/react@18.3.0': + dependencies: + '@types/prop-types': 15.7.13 + csstype: 3.1.3 + + '@types/react@18.3.1': + dependencies: + '@types/prop-types': 15.7.13 + csstype: 3.1.3 + + '@types/through@0.0.33': + dependencies: + '@types/node': 20.17.6 + + '@types/tinycolor2@1.4.6': {} + + '@typescript-eslint/eslint-plugin@8.15.0(@typescript-eslint/parser@8.15.0(eslint@9.15.0)(typescript@5.5.4))(eslint@9.15.0)(typescript@5.5.4)': + dependencies: + '@eslint-community/regexpp': 4.12.1 + '@typescript-eslint/parser': 8.15.0(eslint@9.15.0)(typescript@5.5.4) + '@typescript-eslint/scope-manager': 8.15.0 + '@typescript-eslint/type-utils': 8.15.0(eslint@9.15.0)(typescript@5.5.4) + '@typescript-eslint/utils': 8.15.0(eslint@9.15.0)(typescript@5.5.4) + '@typescript-eslint/visitor-keys': 8.15.0 + eslint: 9.15.0 + graphemer: 1.4.0 + ignore: 5.3.2 + natural-compare: 1.4.0 + ts-api-utils: 1.4.0(typescript@5.5.4) + optionalDependencies: + typescript: 5.5.4 + transitivePeerDependencies: + - supports-color + + '@typescript-eslint/parser@8.15.0(eslint@9.15.0)(typescript@5.5.4)': + dependencies: + '@typescript-eslint/scope-manager': 8.15.0 + '@typescript-eslint/types': 8.15.0 + '@typescript-eslint/typescript-estree': 8.15.0(typescript@5.5.4) + '@typescript-eslint/visitor-keys': 8.15.0 + debug: 4.3.7 + eslint: 9.15.0 + optionalDependencies: + typescript: 5.5.4 + transitivePeerDependencies: + - supports-color + + '@typescript-eslint/scope-manager@8.15.0': + dependencies: + '@typescript-eslint/types': 8.15.0 + '@typescript-eslint/visitor-keys': 8.15.0 + + '@typescript-eslint/type-utils@8.15.0(eslint@9.15.0)(typescript@5.5.4)': + dependencies: + '@typescript-eslint/typescript-estree': 8.15.0(typescript@5.5.4) + '@typescript-eslint/utils': 8.15.0(eslint@9.15.0)(typescript@5.5.4) + debug: 4.3.7 + eslint: 9.15.0 + ts-api-utils: 1.4.0(typescript@5.5.4) + optionalDependencies: + typescript: 5.5.4 + transitivePeerDependencies: + - supports-color + + '@typescript-eslint/types@8.15.0': {} + + '@typescript-eslint/typescript-estree@8.15.0(typescript@5.5.4)': + dependencies: + '@typescript-eslint/types': 8.15.0 + '@typescript-eslint/visitor-keys': 8.15.0 + debug: 4.3.7 + fast-glob: 3.3.2 + is-glob: 4.0.3 + minimatch: 9.0.5 + semver: 7.6.3 + ts-api-utils: 1.4.0(typescript@5.5.4) + optionalDependencies: + typescript: 5.5.4 + transitivePeerDependencies: + - supports-color + + '@typescript-eslint/utils@8.15.0(eslint@9.15.0)(typescript@5.5.4)': + dependencies: + '@eslint-community/eslint-utils': 4.4.1(eslint@9.15.0) + '@typescript-eslint/scope-manager': 8.15.0 + '@typescript-eslint/types': 8.15.0 + '@typescript-eslint/typescript-estree': 8.15.0(typescript@5.5.4) + eslint: 9.15.0 + optionalDependencies: + typescript: 5.5.4 + transitivePeerDependencies: + - supports-color + + '@typescript-eslint/visitor-keys@8.15.0': + dependencies: + '@typescript-eslint/types': 8.15.0 + eslint-visitor-keys: 4.2.0 + + acorn-jsx@5.3.2(acorn@8.14.0): + dependencies: + acorn: 8.14.0 + + acorn-walk@8.3.4: + dependencies: + acorn: 8.14.0 + + acorn@8.14.0: {} + + agent-base@7.1.1: + dependencies: + debug: 4.3.7 + transitivePeerDependencies: + - supports-color + + aggregate-error@3.1.0: + dependencies: + clean-stack: 2.2.0 + indent-string: 4.0.0 + + ajv@6.12.6: + dependencies: + fast-deep-equal: 3.1.3 + fast-json-stable-stringify: 2.1.0 + json-schema-traverse: 0.4.1 + uri-js: 4.4.1 + + ansi-escapes@4.3.2: + dependencies: + type-fest: 0.21.3 + + ansi-regex@5.0.1: {} + + ansi-styles@3.2.1: + dependencies: + color-convert: 1.9.3 + + ansi-styles@4.3.0: + dependencies: + color-convert: 2.0.1 + + arg@4.1.3: {} + + argparse@2.0.1: {} + + array-buffer-byte-length@1.0.1: + dependencies: + call-bind: 1.0.7 + is-array-buffer: 3.0.4 + + array-includes@3.1.8: + dependencies: + call-bind: 1.0.7 + define-properties: 1.2.1 + es-abstract: 1.23.5 + es-object-atoms: 1.0.0 + get-intrinsic: 1.2.4 + is-string: 1.0.7 + + array-union@2.1.0: {} + + array.prototype.findlast@1.2.5: + dependencies: + call-bind: 1.0.7 + define-properties: 1.2.1 + es-abstract: 1.23.5 + es-errors: 1.3.0 + es-object-atoms: 1.0.0 + es-shim-unscopables: 1.0.2 + + array.prototype.flat@1.3.2: + dependencies: + call-bind: 1.0.7 + define-properties: 1.2.1 + es-abstract: 1.23.5 + es-shim-unscopables: 1.0.2 + + array.prototype.flatmap@1.3.2: + dependencies: + call-bind: 1.0.7 + define-properties: 1.2.1 + es-abstract: 1.23.5 + es-shim-unscopables: 1.0.2 + + array.prototype.tosorted@1.1.4: + dependencies: + call-bind: 1.0.7 + define-properties: 1.2.1 + es-abstract: 1.23.5 + es-errors: 1.3.0 + es-shim-unscopables: 1.0.2 + + arraybuffer.prototype.slice@1.0.3: + dependencies: + array-buffer-byte-length: 1.0.1 + call-bind: 1.0.7 + define-properties: 1.2.1 + es-abstract: 1.23.5 + es-errors: 1.3.0 + get-intrinsic: 1.2.4 + is-array-buffer: 3.0.4 + is-shared-array-buffer: 1.0.3 + + ast-types@0.13.4: + dependencies: + tslib: 2.8.1 + + available-typed-arrays@1.0.7: + dependencies: + possible-typed-array-names: 1.0.0 + + balanced-match@1.0.2: {} + + base64-js@1.5.1: {} + + basic-ftp@5.0.5: {} + + bl@4.1.0: + dependencies: + buffer: 5.7.1 + inherits: 2.0.4 + readable-stream: 3.6.2 + + brace-expansion@1.1.11: + dependencies: + balanced-match: 1.0.2 + concat-map: 0.0.1 + + brace-expansion@2.0.1: + dependencies: + balanced-match: 1.0.2 + + braces@3.0.3: + dependencies: + fill-range: 7.1.1 + + buffer@5.7.1: + dependencies: + base64-js: 1.5.1 + ieee754: 1.2.1 + + busboy@1.6.0: + dependencies: + streamsearch: 1.1.0 + + call-bind@1.0.7: + dependencies: + es-define-property: 1.0.0 + es-errors: 1.3.0 + function-bind: 1.1.2 + get-intrinsic: 1.2.4 + set-function-length: 1.2.2 + + callsites@3.1.0: {} + + camel-case@3.0.0: + dependencies: + no-case: 2.3.2 + upper-case: 1.1.3 + + caniuse-lite@1.0.30001683: {} + + chalk@2.4.2: + dependencies: + ansi-styles: 3.2.1 + escape-string-regexp: 1.0.5 + supports-color: 5.5.0 + + chalk@3.0.0: + dependencies: + ansi-styles: 4.3.0 + supports-color: 7.2.0 + + chalk@4.1.2: + dependencies: + ansi-styles: 4.3.0 + supports-color: 7.2.0 + + change-case@3.1.0: + dependencies: + camel-case: 3.0.0 + constant-case: 2.0.0 + dot-case: 2.1.1 + header-case: 1.0.1 + is-lower-case: 1.1.3 + is-upper-case: 1.1.2 + lower-case: 1.1.4 + lower-case-first: 1.0.2 + no-case: 2.3.2 + param-case: 2.1.1 + pascal-case: 2.0.1 + path-case: 2.1.1 + sentence-case: 2.1.1 + snake-case: 2.1.0 + swap-case: 1.1.2 + title-case: 2.1.1 + upper-case: 1.1.3 + upper-case-first: 1.1.2 + + chardet@0.7.0: {} + + clean-stack@2.2.0: {} + + cli-cursor@3.1.0: + dependencies: + restore-cursor: 3.1.0 + + cli-spinners@2.9.2: {} + + cli-width@3.0.0: {} + + client-only@0.0.1: {} + + clone@1.0.4: {} + + color-convert@1.9.3: + dependencies: + color-name: 1.1.3 + + color-convert@2.0.1: + dependencies: + color-name: 1.1.4 + + color-name@1.1.3: {} + + color-name@1.1.4: {} + + color-string@1.9.1: + dependencies: + color-name: 1.1.4 + simple-swizzle: 0.2.2 + optional: true + + color@4.2.3: + dependencies: + color-convert: 2.0.1 + color-string: 1.9.1 + optional: true + + commander@10.0.1: {} + + concat-map@0.0.1: {} + + constant-case@2.0.0: + dependencies: + snake-case: 2.1.0 + upper-case: 1.1.3 + + core-js-pure@3.39.0: {} + + create-require@1.1.1: {} + + cross-spawn@7.0.6: + dependencies: + path-key: 3.1.1 + shebang-command: 2.0.0 + which: 2.0.2 + + csstype@3.1.3: {} + + data-uri-to-buffer@6.0.2: {} + + data-view-buffer@1.0.1: + dependencies: + call-bind: 1.0.7 + es-errors: 1.3.0 + is-data-view: 1.0.1 + + data-view-byte-length@1.0.1: + dependencies: + call-bind: 1.0.7 + es-errors: 1.3.0 + is-data-view: 1.0.1 + + data-view-byte-offset@1.0.0: + dependencies: + call-bind: 1.0.7 + es-errors: 1.3.0 + is-data-view: 1.0.1 + + debug@4.3.7: + dependencies: + ms: 2.1.3 + + deep-extend@0.6.0: {} + + deep-is@0.1.4: {} + + defaults@1.0.4: + dependencies: + clone: 1.0.4 + + define-data-property@1.1.4: + dependencies: + es-define-property: 1.0.0 + es-errors: 1.3.0 + gopd: 1.0.1 + + define-properties@1.2.1: + dependencies: + define-data-property: 1.1.4 + has-property-descriptors: 1.0.2 + object-keys: 1.1.1 + + degenerator@5.0.1: + dependencies: + ast-types: 0.13.4 + escodegen: 2.1.0 + esprima: 4.0.1 + + del@5.1.0: + dependencies: + globby: 10.0.2 + graceful-fs: 4.2.11 + is-glob: 4.0.3 + is-path-cwd: 2.2.0 + is-path-inside: 3.0.3 + p-map: 3.0.0 + rimraf: 3.0.2 + slash: 3.0.0 + + detect-libc@2.0.3: + optional: true + + diff@4.0.2: {} + + dir-glob@3.0.1: + dependencies: + path-type: 4.0.0 + + doctrine@2.1.0: + dependencies: + esutils: 2.0.3 + + dot-case@2.1.1: + dependencies: + no-case: 2.3.2 + + dotenv@16.0.3: {} + + emoji-regex@8.0.0: {} + + es-abstract@1.23.5: + dependencies: + array-buffer-byte-length: 1.0.1 + arraybuffer.prototype.slice: 1.0.3 + available-typed-arrays: 1.0.7 + call-bind: 1.0.7 + data-view-buffer: 1.0.1 + data-view-byte-length: 1.0.1 + data-view-byte-offset: 1.0.0 + es-define-property: 1.0.0 + es-errors: 1.3.0 + es-object-atoms: 1.0.0 + es-set-tostringtag: 2.0.3 + es-to-primitive: 1.2.1 + function.prototype.name: 1.1.6 + get-intrinsic: 1.2.4 + get-symbol-description: 1.0.2 + globalthis: 1.0.4 + gopd: 1.0.1 + has-property-descriptors: 1.0.2 + has-proto: 1.0.3 + has-symbols: 1.0.3 + hasown: 2.0.2 + internal-slot: 1.0.7 + is-array-buffer: 3.0.4 + is-callable: 1.2.7 + is-data-view: 1.0.1 + is-negative-zero: 2.0.3 + is-regex: 1.1.4 + is-shared-array-buffer: 1.0.3 + is-string: 1.0.7 + is-typed-array: 1.1.13 + is-weakref: 1.0.2 + object-inspect: 1.13.3 + object-keys: 1.1.1 + object.assign: 4.1.5 + regexp.prototype.flags: 1.5.3 + safe-array-concat: 1.1.2 + safe-regex-test: 1.0.3 + string.prototype.trim: 1.2.9 + string.prototype.trimend: 1.0.8 + string.prototype.trimstart: 1.0.8 + typed-array-buffer: 1.0.2 + typed-array-byte-length: 1.0.1 + typed-array-byte-offset: 1.0.3 + typed-array-length: 1.0.7 + unbox-primitive: 1.0.2 + which-typed-array: 1.1.15 + + es-define-property@1.0.0: + dependencies: + get-intrinsic: 1.2.4 + + es-errors@1.3.0: {} + + es-iterator-helpers@1.2.0: + dependencies: + call-bind: 1.0.7 + define-properties: 1.2.1 + es-abstract: 1.23.5 + es-errors: 1.3.0 + es-set-tostringtag: 2.0.3 + function-bind: 1.1.2 + get-intrinsic: 1.2.4 + globalthis: 1.0.4 + gopd: 1.0.1 + has-property-descriptors: 1.0.2 + has-proto: 1.0.3 + has-symbols: 1.0.3 + internal-slot: 1.0.7 + iterator.prototype: 1.1.3 + safe-array-concat: 1.1.2 + + es-object-atoms@1.0.0: + dependencies: + es-errors: 1.3.0 + + es-set-tostringtag@2.0.3: + dependencies: + get-intrinsic: 1.2.4 + has-tostringtag: 1.0.2 + hasown: 2.0.2 + + es-shim-unscopables@1.0.2: + dependencies: + hasown: 2.0.2 + + es-to-primitive@1.2.1: + dependencies: + is-callable: 1.2.7 + is-date-object: 1.0.5 + is-symbol: 1.0.4 + + escape-string-regexp@1.0.5: {} + + escape-string-regexp@4.0.0: {} + + escodegen@2.1.0: + dependencies: + esprima: 4.0.1 + estraverse: 5.3.0 + esutils: 2.0.3 + optionalDependencies: + source-map: 0.6.1 + + eslint-config-prettier@9.1.0(eslint@9.15.0): + dependencies: + eslint: 9.15.0 + + eslint-plugin-only-warn@1.1.0: {} + + eslint-plugin-react-hooks@5.0.0(eslint@9.15.0): + dependencies: + eslint: 9.15.0 + + eslint-plugin-react@7.37.2(eslint@9.15.0): + dependencies: + array-includes: 3.1.8 + array.prototype.findlast: 1.2.5 + array.prototype.flatmap: 1.3.2 + array.prototype.tosorted: 1.1.4 + doctrine: 2.1.0 + es-iterator-helpers: 1.2.0 + eslint: 9.15.0 + estraverse: 5.3.0 + hasown: 2.0.2 + jsx-ast-utils: 3.3.5 + minimatch: 3.1.2 + object.entries: 1.1.8 + object.fromentries: 2.0.8 + object.values: 1.2.0 + prop-types: 15.8.1 + resolve: 2.0.0-next.5 + semver: 6.3.1 + string.prototype.matchall: 4.0.11 + string.prototype.repeat: 1.0.0 + + eslint-plugin-turbo@2.3.1(eslint@9.15.0): + dependencies: + dotenv: 16.0.3 + eslint: 9.15.0 + + eslint-scope@8.2.0: + dependencies: + esrecurse: 4.3.0 + estraverse: 5.3.0 + + eslint-visitor-keys@3.4.3: {} + + eslint-visitor-keys@4.2.0: {} + + eslint@9.15.0: + dependencies: + '@eslint-community/eslint-utils': 4.4.1(eslint@9.15.0) + '@eslint-community/regexpp': 4.12.1 + '@eslint/config-array': 0.19.0 + '@eslint/core': 0.9.0 + '@eslint/eslintrc': 3.2.0 + '@eslint/js': 9.15.0 + '@eslint/plugin-kit': 0.2.3 + '@humanfs/node': 0.16.6 + '@humanwhocodes/module-importer': 1.0.1 + '@humanwhocodes/retry': 0.4.1 + '@types/estree': 1.0.6 + '@types/json-schema': 7.0.15 + ajv: 6.12.6 + chalk: 4.1.2 + cross-spawn: 7.0.6 + debug: 4.3.7 + escape-string-regexp: 4.0.0 + eslint-scope: 8.2.0 + eslint-visitor-keys: 4.2.0 + espree: 10.3.0 + esquery: 1.6.0 + esutils: 2.0.3 + fast-deep-equal: 3.1.3 + file-entry-cache: 8.0.0 + find-up: 5.0.0 + glob-parent: 6.0.2 + ignore: 5.3.2 + imurmurhash: 0.1.4 + is-glob: 4.0.3 + json-stable-stringify-without-jsonify: 1.0.1 + lodash.merge: 4.6.2 + minimatch: 3.1.2 + natural-compare: 1.4.0 + optionator: 0.9.4 + transitivePeerDependencies: + - supports-color + + espree@10.3.0: + dependencies: + acorn: 8.14.0 + acorn-jsx: 5.3.2(acorn@8.14.0) + eslint-visitor-keys: 4.2.0 + + esprima@4.0.1: {} + + esquery@1.6.0: + dependencies: + estraverse: 5.3.0 + + esrecurse@4.3.0: + dependencies: + estraverse: 5.3.0 + + estraverse@5.3.0: {} + + esutils@2.0.3: {} + + execa@5.1.1: + dependencies: + cross-spawn: 7.0.6 + get-stream: 6.0.1 + human-signals: 2.1.0 + is-stream: 2.0.1 + merge-stream: 2.0.0 + npm-run-path: 4.0.1 + onetime: 5.1.2 + signal-exit: 3.0.7 + strip-final-newline: 2.0.0 + + external-editor@3.1.0: + dependencies: + chardet: 0.7.0 + iconv-lite: 0.4.24 + tmp: 0.0.33 + + fast-deep-equal@3.1.3: {} + + fast-glob@3.3.1: + dependencies: + '@nodelib/fs.stat': 2.0.5 + '@nodelib/fs.walk': 1.2.8 + glob-parent: 5.1.2 + merge2: 1.4.1 + micromatch: 4.0.8 + + fast-glob@3.3.2: + dependencies: + '@nodelib/fs.stat': 2.0.5 + '@nodelib/fs.walk': 1.2.8 + glob-parent: 5.1.2 + merge2: 1.4.1 + micromatch: 4.0.8 + + fast-json-stable-stringify@2.1.0: {} + + fast-levenshtein@2.0.6: {} + + fastq@1.17.1: + dependencies: + reusify: 1.0.4 + + figures@3.2.0: + dependencies: + escape-string-regexp: 1.0.5 + + file-entry-cache@8.0.0: + dependencies: + flat-cache: 4.0.1 + + fill-range@7.1.1: + dependencies: + to-regex-range: 5.0.1 + + find-up@5.0.0: + dependencies: + locate-path: 6.0.0 + path-exists: 4.0.0 + + flat-cache@4.0.1: + dependencies: + flatted: 3.3.2 + keyv: 4.5.4 + + flatted@3.3.2: {} + + for-each@0.3.3: + dependencies: + is-callable: 1.2.7 + + fs-extra@10.1.0: + dependencies: + graceful-fs: 4.2.11 + jsonfile: 6.1.0 + universalify: 2.0.1 + + fs-extra@11.2.0: + dependencies: + graceful-fs: 4.2.11 + jsonfile: 6.1.0 + universalify: 2.0.1 + + fs.realpath@1.0.0: {} + + function-bind@1.1.2: {} + + function.prototype.name@1.1.6: + dependencies: + call-bind: 1.0.7 + define-properties: 1.2.1 + es-abstract: 1.23.5 + functions-have-names: 1.2.3 + + functions-have-names@1.2.3: {} + + get-intrinsic@1.2.4: + dependencies: + es-errors: 1.3.0 + function-bind: 1.1.2 + has-proto: 1.0.3 + has-symbols: 1.0.3 + hasown: 2.0.2 + + get-stream@6.0.1: {} + + get-symbol-description@1.0.2: + dependencies: + call-bind: 1.0.7 + es-errors: 1.3.0 + get-intrinsic: 1.2.4 + + get-uri@6.0.3: + dependencies: + basic-ftp: 5.0.5 + data-uri-to-buffer: 6.0.2 + debug: 4.3.7 + fs-extra: 11.2.0 + transitivePeerDependencies: + - supports-color + + glob-parent@5.1.2: + dependencies: + is-glob: 4.0.3 + + glob-parent@6.0.2: + dependencies: + is-glob: 4.0.3 + + glob@7.2.3: + dependencies: + fs.realpath: 1.0.0 + inflight: 1.0.6 + inherits: 2.0.4 + minimatch: 3.1.2 + once: 1.4.0 + path-is-absolute: 1.0.1 + + globals@14.0.0: {} + + globals@15.12.0: {} + + globalthis@1.0.4: + dependencies: + define-properties: 1.2.1 + gopd: 1.0.1 + + globby@10.0.2: + dependencies: + '@types/glob': 7.2.0 + array-union: 2.1.0 + dir-glob: 3.0.1 + fast-glob: 3.3.2 + glob: 7.2.3 + ignore: 5.3.2 + merge2: 1.4.1 + slash: 3.0.0 + + gopd@1.0.1: + dependencies: + get-intrinsic: 1.2.4 + + graceful-fs@4.2.11: {} + + gradient-string@2.0.2: + dependencies: + chalk: 4.1.2 + tinygradient: 1.1.5 + + graphemer@1.4.0: {} + + handlebars@4.7.8: + dependencies: + minimist: 1.2.8 + neo-async: 2.6.2 + source-map: 0.6.1 + wordwrap: 1.0.0 + optionalDependencies: + uglify-js: 3.19.3 + + has-bigints@1.0.2: {} + + has-flag@3.0.0: {} + + has-flag@4.0.0: {} + + has-property-descriptors@1.0.2: + dependencies: + es-define-property: 1.0.0 + + has-proto@1.0.3: {} + + has-symbols@1.0.3: {} + + has-tostringtag@1.0.2: + dependencies: + has-symbols: 1.0.3 + + hasown@2.0.2: + dependencies: + function-bind: 1.1.2 + + header-case@1.0.1: + dependencies: + no-case: 2.3.2 + upper-case: 1.1.3 + + http-proxy-agent@7.0.2: + dependencies: + agent-base: 7.1.1 + debug: 4.3.7 + transitivePeerDependencies: + - supports-color + + https-proxy-agent@7.0.5: + dependencies: + agent-base: 7.1.1 + debug: 4.3.7 + transitivePeerDependencies: + - supports-color + + human-signals@2.1.0: {} + + iconv-lite@0.4.24: + dependencies: + safer-buffer: 2.1.2 + + ieee754@1.2.1: {} + + ignore@5.3.2: {} + + import-fresh@3.3.0: + dependencies: + parent-module: 1.0.1 + resolve-from: 4.0.0 + + imurmurhash@0.1.4: {} + + indent-string@4.0.0: {} + + inflight@1.0.6: + dependencies: + once: 1.4.0 + wrappy: 1.0.2 + + inherits@2.0.4: {} + + ini@1.3.8: {} + + inquirer@7.3.3: + dependencies: + ansi-escapes: 4.3.2 + chalk: 4.1.2 + cli-cursor: 3.1.0 + cli-width: 3.0.0 + external-editor: 3.1.0 + figures: 3.2.0 + lodash: 4.17.21 + mute-stream: 0.0.8 + run-async: 2.4.1 + rxjs: 6.6.7 + string-width: 4.2.3 + strip-ansi: 6.0.1 + through: 2.3.8 + + inquirer@8.2.6: + dependencies: + ansi-escapes: 4.3.2 + chalk: 4.1.2 + cli-cursor: 3.1.0 + cli-width: 3.0.0 + external-editor: 3.1.0 + figures: 3.2.0 + lodash: 4.17.21 + mute-stream: 0.0.8 + ora: 5.4.1 + run-async: 2.4.1 + rxjs: 7.8.1 + string-width: 4.2.3 + strip-ansi: 6.0.1 + through: 2.3.8 + wrap-ansi: 6.2.0 + + internal-slot@1.0.7: + dependencies: + es-errors: 1.3.0 + hasown: 2.0.2 + side-channel: 1.0.6 + + ip-address@9.0.5: + dependencies: + jsbn: 1.1.0 + sprintf-js: 1.1.3 + + is-array-buffer@3.0.4: + dependencies: + call-bind: 1.0.7 + get-intrinsic: 1.2.4 + + is-arrayish@0.3.2: + optional: true + + is-async-function@2.0.0: + dependencies: + has-tostringtag: 1.0.2 + + is-bigint@1.0.4: + dependencies: + has-bigints: 1.0.2 + + is-boolean-object@1.1.2: + dependencies: + call-bind: 1.0.7 + has-tostringtag: 1.0.2 + + is-callable@1.2.7: {} + + is-core-module@2.15.1: + dependencies: + hasown: 2.0.2 + + is-data-view@1.0.1: + dependencies: + is-typed-array: 1.1.13 + + is-date-object@1.0.5: + dependencies: + has-tostringtag: 1.0.2 + + is-extglob@2.1.1: {} + + is-finalizationregistry@1.0.2: + dependencies: + call-bind: 1.0.7 + + is-fullwidth-code-point@3.0.0: {} + + is-generator-function@1.0.10: + dependencies: + has-tostringtag: 1.0.2 + + is-glob@4.0.3: + dependencies: + is-extglob: 2.1.1 + + is-interactive@1.0.0: {} + + is-lower-case@1.1.3: + dependencies: + lower-case: 1.1.4 + + is-map@2.0.3: {} + + is-negative-zero@2.0.3: {} + + is-number-object@1.0.7: + dependencies: + has-tostringtag: 1.0.2 + + is-number@7.0.0: {} + + is-path-cwd@2.2.0: {} + + is-path-inside@3.0.3: {} + + is-regex@1.1.4: + dependencies: + call-bind: 1.0.7 + has-tostringtag: 1.0.2 + + is-set@2.0.3: {} + + is-shared-array-buffer@1.0.3: + dependencies: + call-bind: 1.0.7 + + is-stream@2.0.1: {} + + is-string@1.0.7: + dependencies: + has-tostringtag: 1.0.2 + + is-symbol@1.0.4: + dependencies: + has-symbols: 1.0.3 + + is-typed-array@1.1.13: + dependencies: + which-typed-array: 1.1.15 + + is-unicode-supported@0.1.0: {} + + is-upper-case@1.1.2: + dependencies: + upper-case: 1.1.3 + + is-weakmap@2.0.2: {} + + is-weakref@1.0.2: + dependencies: + call-bind: 1.0.7 + + is-weakset@2.0.3: + dependencies: + call-bind: 1.0.7 + get-intrinsic: 1.2.4 + + isarray@2.0.5: {} + + isbinaryfile@4.0.10: {} + + isexe@2.0.0: {} + + iterator.prototype@1.1.3: + dependencies: + define-properties: 1.2.1 + get-intrinsic: 1.2.4 + has-symbols: 1.0.3 + reflect.getprototypeof: 1.0.6 + set-function-name: 2.0.2 + + js-tokens@4.0.0: {} + + js-yaml@4.1.0: + dependencies: + argparse: 2.0.1 + + jsbn@1.1.0: {} + + json-buffer@3.0.1: {} + + json-schema-traverse@0.4.1: {} + + json-stable-stringify-without-jsonify@1.0.1: {} + + jsonfile@6.1.0: + dependencies: + universalify: 2.0.1 + optionalDependencies: + graceful-fs: 4.2.11 + + jsx-ast-utils@3.3.5: + dependencies: + array-includes: 3.1.8 + array.prototype.flat: 1.3.2 + object.assign: 4.1.5 + object.values: 1.2.0 + + keyv@4.5.4: + dependencies: + json-buffer: 3.0.1 + + levn@0.4.1: + dependencies: + prelude-ls: 1.2.1 + type-check: 0.4.0 + + locate-path@6.0.0: + dependencies: + p-locate: 5.0.0 + + lodash.get@4.4.2: {} + + lodash.merge@4.6.2: {} + + lodash@4.17.21: {} + + log-symbols@3.0.0: + dependencies: + chalk: 2.4.2 + + log-symbols@4.1.0: + dependencies: + chalk: 4.1.2 + is-unicode-supported: 0.1.0 + + loose-envify@1.4.0: + dependencies: + js-tokens: 4.0.0 + + lower-case-first@1.0.2: + dependencies: + lower-case: 1.1.4 + + lower-case@1.1.4: {} + + lru-cache@7.18.3: {} + + make-error@1.3.6: {} + + merge-stream@2.0.0: {} + + merge2@1.4.1: {} + + micromatch@4.0.8: + dependencies: + braces: 3.0.3 + picomatch: 2.3.1 + + mimic-fn@2.1.0: {} + + minimatch@3.1.2: + dependencies: + brace-expansion: 1.1.11 + + minimatch@9.0.5: + dependencies: + brace-expansion: 2.0.1 + + minimist@1.2.8: {} + + mkdirp@0.5.6: + dependencies: + minimist: 1.2.8 + + ms@2.1.3: {} + + mute-stream@0.0.8: {} + + nanoid@3.3.7: {} + + natural-compare@1.4.0: {} + + neo-async@2.6.2: {} + + netmask@2.0.2: {} + + next@15.1.0(react-dom@19.0.0(react@19.0.0))(react@19.0.0): + dependencies: + '@next/env': 15.1.0 + '@swc/counter': 0.1.3 + '@swc/helpers': 0.5.15 + busboy: 1.6.0 + caniuse-lite: 1.0.30001683 + postcss: 8.4.31 + react: 19.0.0 + react-dom: 19.0.0(react@19.0.0) + styled-jsx: 5.1.6(react@19.0.0) + optionalDependencies: + '@next/swc-darwin-arm64': 15.1.0 + '@next/swc-darwin-x64': 15.1.0 + '@next/swc-linux-arm64-gnu': 15.1.0 + '@next/swc-linux-arm64-musl': 15.1.0 + '@next/swc-linux-x64-gnu': 15.1.0 + '@next/swc-linux-x64-musl': 15.1.0 + '@next/swc-win32-arm64-msvc': 15.1.0 + '@next/swc-win32-x64-msvc': 15.1.0 + sharp: 0.33.5 + transitivePeerDependencies: + - '@babel/core' + - babel-plugin-macros + + no-case@2.3.2: + dependencies: + lower-case: 1.1.4 + + node-plop@0.26.3: + dependencies: + '@babel/runtime-corejs3': 7.26.0 + '@types/inquirer': 6.5.0 + change-case: 3.1.0 + del: 5.1.0 + globby: 10.0.2 + handlebars: 4.7.8 + inquirer: 7.3.3 + isbinaryfile: 4.0.10 + lodash.get: 4.4.2 + mkdirp: 0.5.6 + resolve: 1.22.8 + + npm-run-path@4.0.1: + dependencies: + path-key: 3.1.1 + + object-assign@4.1.1: {} + + object-inspect@1.13.3: {} + + object-keys@1.1.1: {} + + object.assign@4.1.5: + dependencies: + call-bind: 1.0.7 + define-properties: 1.2.1 + has-symbols: 1.0.3 + object-keys: 1.1.1 + + object.entries@1.1.8: + dependencies: + call-bind: 1.0.7 + define-properties: 1.2.1 + es-object-atoms: 1.0.0 + + object.fromentries@2.0.8: + dependencies: + call-bind: 1.0.7 + define-properties: 1.2.1 + es-abstract: 1.23.5 + es-object-atoms: 1.0.0 + + object.values@1.2.0: + dependencies: + call-bind: 1.0.7 + define-properties: 1.2.1 + es-object-atoms: 1.0.0 + + once@1.4.0: + dependencies: + wrappy: 1.0.2 + + onetime@5.1.2: + dependencies: + mimic-fn: 2.1.0 + + optionator@0.9.4: + dependencies: + deep-is: 0.1.4 + fast-levenshtein: 2.0.6 + levn: 0.4.1 + prelude-ls: 1.2.1 + type-check: 0.4.0 + word-wrap: 1.2.5 + + ora@4.1.1: + dependencies: + chalk: 3.0.0 + cli-cursor: 3.1.0 + cli-spinners: 2.9.2 + is-interactive: 1.0.0 + log-symbols: 3.0.0 + mute-stream: 0.0.8 + strip-ansi: 6.0.1 + wcwidth: 1.0.1 + + ora@5.4.1: + dependencies: + bl: 4.1.0 + chalk: 4.1.2 + cli-cursor: 3.1.0 + cli-spinners: 2.9.2 + is-interactive: 1.0.0 + is-unicode-supported: 0.1.0 + log-symbols: 4.1.0 + strip-ansi: 6.0.1 + wcwidth: 1.0.1 + + os-tmpdir@1.0.2: {} + + p-limit@3.1.0: + dependencies: + yocto-queue: 0.1.0 + + p-locate@5.0.0: + dependencies: + p-limit: 3.1.0 + + p-map@3.0.0: + dependencies: + aggregate-error: 3.1.0 + + pac-proxy-agent@7.0.2: + dependencies: + '@tootallnate/quickjs-emscripten': 0.23.0 + agent-base: 7.1.1 + debug: 4.3.7 + get-uri: 6.0.3 + http-proxy-agent: 7.0.2 + https-proxy-agent: 7.0.5 + pac-resolver: 7.0.1 + socks-proxy-agent: 8.0.4 + transitivePeerDependencies: + - supports-color + + pac-resolver@7.0.1: + dependencies: + degenerator: 5.0.1 + netmask: 2.0.2 + + param-case@2.1.1: + dependencies: + no-case: 2.3.2 + + parent-module@1.0.1: + dependencies: + callsites: 3.1.0 + + pascal-case@2.0.1: + dependencies: + camel-case: 3.0.0 + upper-case-first: 1.1.2 + + path-case@2.1.1: + dependencies: + no-case: 2.3.2 + + path-exists@4.0.0: {} + + path-is-absolute@1.0.1: {} + + path-key@3.1.1: {} + + path-parse@1.0.7: {} + + path-type@4.0.0: {} + + picocolors@1.1.1: {} + + picomatch@2.3.1: {} + + possible-typed-array-names@1.0.0: {} + + postcss@8.4.31: + dependencies: + nanoid: 3.3.7 + picocolors: 1.1.1 + source-map-js: 1.2.1 + + prelude-ls@1.2.1: {} + + prettier@3.3.3: {} + + prop-types@15.8.1: + dependencies: + loose-envify: 1.4.0 + object-assign: 4.1.1 + react-is: 16.13.1 + + proxy-agent@6.4.0: + dependencies: + agent-base: 7.1.1 + debug: 4.3.7 + http-proxy-agent: 7.0.2 + https-proxy-agent: 7.0.5 + lru-cache: 7.18.3 + pac-proxy-agent: 7.0.2 + proxy-from-env: 1.1.0 + socks-proxy-agent: 8.0.4 + transitivePeerDependencies: + - supports-color + + proxy-from-env@1.1.0: {} + + punycode@2.3.1: {} + + queue-microtask@1.2.3: {} + + rc@1.2.8: + dependencies: + deep-extend: 0.6.0 + ini: 1.3.8 + minimist: 1.2.8 + strip-json-comments: 2.0.1 + + react-dom@19.0.0(react@19.0.0): + dependencies: + react: 19.0.0 + scheduler: 0.25.0 + + react-is@16.13.1: {} + + react@19.0.0: {} + + readable-stream@3.6.2: + dependencies: + inherits: 2.0.4 + string_decoder: 1.3.0 + util-deprecate: 1.0.2 + + reflect.getprototypeof@1.0.6: + dependencies: + call-bind: 1.0.7 + define-properties: 1.2.1 + es-abstract: 1.23.5 + es-errors: 1.3.0 + get-intrinsic: 1.2.4 + globalthis: 1.0.4 + which-builtin-type: 1.1.4 + + regenerator-runtime@0.14.1: {} + + regexp.prototype.flags@1.5.3: + dependencies: + call-bind: 1.0.7 + define-properties: 1.2.1 + es-errors: 1.3.0 + set-function-name: 2.0.2 + + registry-auth-token@3.3.2: + dependencies: + rc: 1.2.8 + safe-buffer: 5.2.1 + + registry-url@3.1.0: + dependencies: + rc: 1.2.8 + + resolve-from@4.0.0: {} + + resolve@1.22.8: + dependencies: + is-core-module: 2.15.1 + path-parse: 1.0.7 + supports-preserve-symlinks-flag: 1.0.0 + + resolve@2.0.0-next.5: + dependencies: + is-core-module: 2.15.1 + path-parse: 1.0.7 + supports-preserve-symlinks-flag: 1.0.0 + + restore-cursor@3.1.0: + dependencies: + onetime: 5.1.2 + signal-exit: 3.0.7 + + reusify@1.0.4: {} + + rimraf@3.0.2: + dependencies: + glob: 7.2.3 + + run-async@2.4.1: {} + + run-parallel@1.2.0: + dependencies: + queue-microtask: 1.2.3 + + rxjs@6.6.7: + dependencies: + tslib: 1.14.1 + + rxjs@7.8.1: + dependencies: + tslib: 2.8.1 + + safe-array-concat@1.1.2: + dependencies: + call-bind: 1.0.7 + get-intrinsic: 1.2.4 + has-symbols: 1.0.3 + isarray: 2.0.5 + + safe-buffer@5.2.1: {} + + safe-regex-test@1.0.3: + dependencies: + call-bind: 1.0.7 + es-errors: 1.3.0 + is-regex: 1.1.4 + + safer-buffer@2.1.2: {} + + scheduler@0.25.0: {} + + semver@6.3.1: {} + + semver@7.6.3: {} + + sentence-case@2.1.1: + dependencies: + no-case: 2.3.2 + upper-case-first: 1.1.2 + + set-function-length@1.2.2: + dependencies: + define-data-property: 1.1.4 + es-errors: 1.3.0 + function-bind: 1.1.2 + get-intrinsic: 1.2.4 + gopd: 1.0.1 + has-property-descriptors: 1.0.2 + + set-function-name@2.0.2: + dependencies: + define-data-property: 1.1.4 + es-errors: 1.3.0 + functions-have-names: 1.2.3 + has-property-descriptors: 1.0.2 + + sharp@0.33.5: + dependencies: + color: 4.2.3 + detect-libc: 2.0.3 + semver: 7.6.3 + optionalDependencies: + '@img/sharp-darwin-arm64': 0.33.5 + '@img/sharp-darwin-x64': 0.33.5 + '@img/sharp-libvips-darwin-arm64': 1.0.4 + '@img/sharp-libvips-darwin-x64': 1.0.4 + '@img/sharp-libvips-linux-arm': 1.0.5 + '@img/sharp-libvips-linux-arm64': 1.0.4 + '@img/sharp-libvips-linux-s390x': 1.0.4 + '@img/sharp-libvips-linux-x64': 1.0.4 + '@img/sharp-libvips-linuxmusl-arm64': 1.0.4 + '@img/sharp-libvips-linuxmusl-x64': 1.0.4 + '@img/sharp-linux-arm': 0.33.5 + '@img/sharp-linux-arm64': 0.33.5 + '@img/sharp-linux-s390x': 0.33.5 + '@img/sharp-linux-x64': 0.33.5 + '@img/sharp-linuxmusl-arm64': 0.33.5 + '@img/sharp-linuxmusl-x64': 0.33.5 + '@img/sharp-wasm32': 0.33.5 + '@img/sharp-win32-ia32': 0.33.5 + '@img/sharp-win32-x64': 0.33.5 + optional: true + + shebang-command@2.0.0: + dependencies: + shebang-regex: 3.0.0 + + shebang-regex@3.0.0: {} + + side-channel@1.0.6: + dependencies: + call-bind: 1.0.7 + es-errors: 1.3.0 + get-intrinsic: 1.2.4 + object-inspect: 1.13.3 + + signal-exit@3.0.7: {} + + simple-swizzle@0.2.2: + dependencies: + is-arrayish: 0.3.2 + optional: true + + slash@3.0.0: {} + + smart-buffer@4.2.0: {} + + snake-case@2.1.0: + dependencies: + no-case: 2.3.2 + + socks-proxy-agent@8.0.4: + dependencies: + agent-base: 7.1.1 + debug: 4.3.7 + socks: 2.8.3 + transitivePeerDependencies: + - supports-color + + socks@2.8.3: + dependencies: + ip-address: 9.0.5 + smart-buffer: 4.2.0 + + source-map-js@1.2.1: {} + + source-map@0.6.1: {} + + sprintf-js@1.1.3: {} + + streamsearch@1.1.0: {} + + string-width@4.2.3: + dependencies: + emoji-regex: 8.0.0 + is-fullwidth-code-point: 3.0.0 + strip-ansi: 6.0.1 + + string.prototype.matchall@4.0.11: + dependencies: + call-bind: 1.0.7 + define-properties: 1.2.1 + es-abstract: 1.23.5 + es-errors: 1.3.0 + es-object-atoms: 1.0.0 + get-intrinsic: 1.2.4 + gopd: 1.0.1 + has-symbols: 1.0.3 + internal-slot: 1.0.7 + regexp.prototype.flags: 1.5.3 + set-function-name: 2.0.2 + side-channel: 1.0.6 + + string.prototype.repeat@1.0.0: + dependencies: + define-properties: 1.2.1 + es-abstract: 1.23.5 + + string.prototype.trim@1.2.9: + dependencies: + call-bind: 1.0.7 + define-properties: 1.2.1 + es-abstract: 1.23.5 + es-object-atoms: 1.0.0 + + string.prototype.trimend@1.0.8: + dependencies: + call-bind: 1.0.7 + define-properties: 1.2.1 + es-object-atoms: 1.0.0 + + string.prototype.trimstart@1.0.8: + dependencies: + call-bind: 1.0.7 + define-properties: 1.2.1 + es-object-atoms: 1.0.0 + + string_decoder@1.3.0: + dependencies: + safe-buffer: 5.2.1 + + strip-ansi@6.0.1: + dependencies: + ansi-regex: 5.0.1 + + strip-final-newline@2.0.0: {} + + strip-json-comments@2.0.1: {} + + strip-json-comments@3.1.1: {} + + styled-jsx@5.1.6(react@19.0.0): + dependencies: + client-only: 0.0.1 + react: 19.0.0 + + supports-color@5.5.0: + dependencies: + has-flag: 3.0.0 + + supports-color@7.2.0: + dependencies: + has-flag: 4.0.0 + + supports-preserve-symlinks-flag@1.0.0: {} + + swap-case@1.1.2: + dependencies: + lower-case: 1.1.4 + upper-case: 1.1.3 + + through@2.3.8: {} + + tinycolor2@1.6.0: {} + + tinygradient@1.1.5: + dependencies: + '@types/tinycolor2': 1.4.6 + tinycolor2: 1.6.0 + + title-case@2.1.1: + dependencies: + no-case: 2.3.2 + upper-case: 1.1.3 + + tmp@0.0.33: + dependencies: + os-tmpdir: 1.0.2 + + to-regex-range@5.0.1: + dependencies: + is-number: 7.0.0 + + ts-api-utils@1.4.0(typescript@5.5.4): + dependencies: + typescript: 5.5.4 + + ts-node@10.9.2(@types/node@20.17.6)(typescript@5.5.4): + dependencies: + '@cspotcode/source-map-support': 0.8.1 + '@tsconfig/node10': 1.0.11 + '@tsconfig/node12': 1.0.11 + '@tsconfig/node14': 1.0.3 + '@tsconfig/node16': 1.0.4 + '@types/node': 20.17.6 + acorn: 8.14.0 + acorn-walk: 8.3.4 + arg: 4.1.3 + create-require: 1.1.1 + diff: 4.0.2 + make-error: 1.3.6 + typescript: 5.5.4 + v8-compile-cache-lib: 3.0.1 + yn: 3.1.1 + + tslib@1.14.1: {} + + tslib@2.8.1: {} + + turbo-darwin-64@2.3.1: + optional: true + + turbo-darwin-arm64@2.3.1: + optional: true + + turbo-linux-64@2.3.1: + optional: true + + turbo-linux-arm64@2.3.1: + optional: true + + turbo-windows-64@2.3.1: + optional: true + + turbo-windows-arm64@2.3.1: + optional: true + + turbo@2.3.1: + optionalDependencies: + turbo-darwin-64: 2.3.1 + turbo-darwin-arm64: 2.3.1 + turbo-linux-64: 2.3.1 + turbo-linux-arm64: 2.3.1 + turbo-windows-64: 2.3.1 + turbo-windows-arm64: 2.3.1 + + type-check@0.4.0: + dependencies: + prelude-ls: 1.2.1 + + type-fest@0.21.3: {} + + typed-array-buffer@1.0.2: + dependencies: + call-bind: 1.0.7 + es-errors: 1.3.0 + is-typed-array: 1.1.13 + + typed-array-byte-length@1.0.1: + dependencies: + call-bind: 1.0.7 + for-each: 0.3.3 + gopd: 1.0.1 + has-proto: 1.0.3 + is-typed-array: 1.1.13 + + typed-array-byte-offset@1.0.3: + dependencies: + available-typed-arrays: 1.0.7 + call-bind: 1.0.7 + for-each: 0.3.3 + gopd: 1.0.1 + has-proto: 1.0.3 + is-typed-array: 1.1.13 + reflect.getprototypeof: 1.0.6 + + typed-array-length@1.0.7: + dependencies: + call-bind: 1.0.7 + for-each: 0.3.3 + gopd: 1.0.1 + is-typed-array: 1.1.13 + possible-typed-array-names: 1.0.0 + reflect.getprototypeof: 1.0.6 + + typescript-eslint@8.15.0(eslint@9.15.0)(typescript@5.5.4): + dependencies: + '@typescript-eslint/eslint-plugin': 8.15.0(@typescript-eslint/parser@8.15.0(eslint@9.15.0)(typescript@5.5.4))(eslint@9.15.0)(typescript@5.5.4) + '@typescript-eslint/parser': 8.15.0(eslint@9.15.0)(typescript@5.5.4) + '@typescript-eslint/utils': 8.15.0(eslint@9.15.0)(typescript@5.5.4) + eslint: 9.15.0 + optionalDependencies: + typescript: 5.5.4 + transitivePeerDependencies: + - supports-color + + typescript@5.5.4: {} + + uglify-js@3.19.3: + optional: true + + unbox-primitive@1.0.2: + dependencies: + call-bind: 1.0.7 + has-bigints: 1.0.2 + has-symbols: 1.0.3 + which-boxed-primitive: 1.0.2 + + undici-types@6.19.8: {} + + universalify@2.0.1: {} + + update-check@1.5.4: + dependencies: + registry-auth-token: 3.3.2 + registry-url: 3.1.0 + + upper-case-first@1.1.2: + dependencies: + upper-case: 1.1.3 + + upper-case@1.1.3: {} + + uri-js@4.4.1: + dependencies: + punycode: 2.3.1 + + util-deprecate@1.0.2: {} + + v8-compile-cache-lib@3.0.1: {} + + validate-npm-package-name@5.0.1: {} + + wcwidth@1.0.1: + dependencies: + defaults: 1.0.4 + + which-boxed-primitive@1.0.2: + dependencies: + is-bigint: 1.0.4 + is-boolean-object: 1.1.2 + is-number-object: 1.0.7 + is-string: 1.0.7 + is-symbol: 1.0.4 + + which-builtin-type@1.1.4: + dependencies: + function.prototype.name: 1.1.6 + has-tostringtag: 1.0.2 + is-async-function: 2.0.0 + is-date-object: 1.0.5 + is-finalizationregistry: 1.0.2 + is-generator-function: 1.0.10 + is-regex: 1.1.4 + is-weakref: 1.0.2 + isarray: 2.0.5 + which-boxed-primitive: 1.0.2 + which-collection: 1.0.2 + which-typed-array: 1.1.15 + + which-collection@1.0.2: + dependencies: + is-map: 2.0.3 + is-set: 2.0.3 + is-weakmap: 2.0.2 + is-weakset: 2.0.3 + + which-typed-array@1.1.15: + dependencies: + available-typed-arrays: 1.0.7 + call-bind: 1.0.7 + for-each: 0.3.3 + gopd: 1.0.1 + has-tostringtag: 1.0.2 + + which@2.0.2: + dependencies: + isexe: 2.0.0 + + word-wrap@1.2.5: {} + + wordwrap@1.0.0: {} + + wrap-ansi@6.2.0: + dependencies: + ansi-styles: 4.3.0 + string-width: 4.2.3 + strip-ansi: 6.0.1 + + wrappy@1.0.2: {} + + yn@3.1.1: {} + + yocto-queue@0.1.0: {} diff --git a/pnpm-workspace.yaml b/pnpm-workspace.yaml new file mode 100644 index 000000000..3ff5faaaf --- /dev/null +++ b/pnpm-workspace.yaml @@ -0,0 +1,3 @@ +packages: + - "apps/*" + - "packages/*" diff --git a/turbo.json b/turbo.json new file mode 100644 index 000000000..d6a7fe055 --- /dev/null +++ b/turbo.json @@ -0,0 +1,21 @@ +{ + "$schema": "https://turbo.build/schema.json", + "ui": "tui", + "tasks": { + "build": { + "dependsOn": ["^build"], + "inputs": ["$TURBO_DEFAULT$", ".env*"], + "outputs": [".next/**", "!.next/cache/**"] + }, + "lint": { + "dependsOn": ["^lint"] + }, + "check-types": { + "dependsOn": ["^check-types"] + }, + "dev": { + "cache": false, + "persistent": true + } + } +} From d421c848943b0c38ca8b29be1dde44a4a6490a4b Mon Sep 17 00:00:00 2001 From: Turbobot Date: Tue, 21 Jan 2025 09:34:16 +0100 Subject: [PATCH 003/439] feat(create-turbo): apply official-starter transform --- meta.json | 3 --- package.json | 4 ++-- 2 files changed, 2 insertions(+), 5 deletions(-) delete mode 100644 meta.json diff --git a/meta.json b/meta.json deleted file mode 100644 index 6fe74c615..000000000 --- a/meta.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "maintainedByCoreTeam": true -} diff --git a/package.json b/package.json index c1657eb69..219c00c1b 100644 --- a/package.json +++ b/package.json @@ -1,5 +1,5 @@ { - "name": "my-turborepo", + "name": "sequence-core", "private": true, "scripts": { "build": "turbo build", @@ -9,7 +9,7 @@ }, "devDependencies": { "prettier": "^3.2.5", - "turbo": "^2.3.0", + "turbo": "^2.3.3", "typescript": "5.5.4" }, "packageManager": "pnpm@9.0.0", From dd73f9273779334f1a5369cd6a41f1efb1ae6879 Mon Sep 17 00:00:00 2001 From: Turbobot Date: Tue, 21 Jan 2025 09:34:16 +0100 Subject: [PATCH 004/439] feat(create-turbo): apply pnpm-eslint transform --- .vscode/settings.json | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 .vscode/settings.json diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 000000000..44a73ec3a --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,7 @@ +{ + "eslint.workingDirectories": [ + { + "mode": "auto" + } + ] +} From 23663132e6a7ec0633f6b86f0370b313cef2d64a Mon Sep 17 00:00:00 2001 From: Turbobot Date: Tue, 21 Jan 2025 09:34:27 +0100 Subject: [PATCH 005/439] feat(create-turbo): install dependencies --- pnpm-lock.yaml | 85 +++++++++++++++++--------------------------------- 1 file changed, 29 insertions(+), 56 deletions(-) diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index e69c509ae..076d55aa1 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -12,8 +12,8 @@ importers: specifier: ^3.2.5 version: 3.3.3 turbo: - specifier: ^2.3.0 - version: 2.3.1 + specifier: ^2.3.3 + version: 2.3.3 typescript: specifier: 5.5.4 version: 5.5.4 @@ -430,11 +430,9 @@ packages: '@turbo/gen@1.13.4': resolution: {integrity: sha512-PK38N1fHhDUyjLi0mUjv0RbX0xXGwDLQeRSGsIlLcVpP1B5fwodSIwIYXc9vJok26Yne94BX5AGjueYsUT3uUw==} - hasBin: true '@turbo/workspaces@1.13.4': resolution: {integrity: sha512-3uYg2b5TWCiupetbDFMbBFMHl33xQTvp5DNg0fZSYal73Z9AlFH9yWabHWMYw6ywmwM1evkYRpTVA2n7GgqT5A==} - hasBin: true '@types/estree@1.0.6': resolution: {integrity: sha512-AYnb1nQyY49te+VRAVgmzfcgjYS91mY5P0TKUDCLEM+gNnA+3T6rWITXRLYCpahpqSQbN5cE+gHpnPyXjHWxcw==} @@ -549,7 +547,6 @@ packages: acorn@8.14.0: resolution: {integrity: sha512-cl669nCJTZBsL97OF4kUQm5g5hC2uihk0NxY3WENAC0TYdILVkAyHymAntgxGkl7K+t0cXIrH5siy5S4XkFycA==} engines: {node: '>=0.4.0'} - hasBin: true agent-base@7.1.1: resolution: {integrity: sha512-H0TSyFNDMomMNJQBn8wFV5YC/2eJ+VXECwOadZJT554xP6cODZHPX3H9QMQECxvrgiSOP1pHjy1sMWQVYJOUOA==} @@ -871,11 +868,9 @@ packages: escodegen@2.1.0: resolution: {integrity: sha512-2NlIDTwUWJN0mRPQOdtQBzbUHvdGY2P1VXSyU83Q3xKxM7WHX2Ql8dKq782Q9TgQUNOLEzEYu9bzLNj1q88I5w==} engines: {node: '>=6.0'} - hasBin: true eslint-config-prettier@9.1.0: resolution: {integrity: sha512-NSWl5BFQWEPi1j4TjVNItzYV7dZXZ+wP6I6ZhrBGpChQhZRUaElihE9uRRkcbRnNb76UMKDF3r+WTmNcGPKsqw==} - hasBin: true peerDependencies: eslint: '>=7.0.0' @@ -915,7 +910,6 @@ packages: eslint@9.15.0: resolution: {integrity: sha512-7CrWySmIibCgT1Os28lUU6upBshZ+GxybLOrmRzi08kS8MBuO8QA7pXEgYgY5W8vK3e74xv0lpjo9DbaGU9Rkw==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - hasBin: true peerDependencies: jiti: '*' peerDependenciesMeta: @@ -929,7 +923,6 @@ packages: esprima@4.0.1: resolution: {integrity: sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==} engines: {node: '>=4'} - hasBin: true esquery@1.6.0: resolution: {integrity: sha512-ca9pw9fomFcKPvFLXhBKUK90ZvGibiGOvRJNbjljY7s7uq/5YO4BOzcYtJqExdx99rF6aAcnRxHmcUHcz6sQsg==} @@ -1048,7 +1041,6 @@ packages: glob@7.2.3: resolution: {integrity: sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==} - deprecated: Glob versions prior to v9 are no longer supported globals@14.0.0: resolution: {integrity: sha512-oahGvuMGQlPw/ivIYBjVSrWAfWLBeku5tpPE2fOPLi+WHffIWbuh2tCjhyQhTBPMf5E9jDEH4FOmTYgYwbKwtQ==} @@ -1082,7 +1074,6 @@ packages: handlebars@4.7.8: resolution: {integrity: sha512-vafaFqs8MZkRrSX7sFVUdo3ap/eNiLnb4IakshzvP56X5Nr1iGKAIqdX6tMlm6HcNRIkr6AxO5jFEoJzzpT8aQ==} engines: {node: '>=0.4.7'} - hasBin: true has-bigints@1.0.2: resolution: {integrity: sha512-tSvCKtBr9lkF0Ex0aQiP9N+OpV4zi2r/Nee5VkRDbaqv35RLYMzbwQfFSZZH0kR+Rd6302UJZ2p/bJCEoR3VoQ==} @@ -1154,7 +1145,6 @@ packages: inflight@1.0.6: resolution: {integrity: sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==} - deprecated: This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful. inherits@2.0.4: resolution: {integrity: sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==} @@ -1327,7 +1317,6 @@ packages: js-yaml@4.1.0: resolution: {integrity: sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==} - hasBin: true jsbn@1.1.0: resolution: {integrity: sha512-4bYVV3aAMtDTTu4+xsDYa6sy9GyJ69/amsu9sYF2zqjiEoZA5xJi3BrfX3uY+/IekIu7MwdObdbDWpoZdBv3/A==} @@ -1378,7 +1367,6 @@ packages: loose-envify@1.4.0: resolution: {integrity: sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==} - hasBin: true lower-case-first@1.0.2: resolution: {integrity: sha512-UuxaYakO7XeONbKrZf5FEgkantPf5DUqDayzP5VXZrtRPdH86s4kN47I8B3TW10S4QKiE3ziHNf3kRN//okHjA==} @@ -1420,7 +1408,6 @@ packages: mkdirp@0.5.6: resolution: {integrity: sha512-FP+p8RB8OWpF3YZBCrP5gtADmtXApB5AMLn+vdyA+PyxCjrCs00mjyUozssO33cwDeT3wNGdLxJ5M//YqtHAJw==} - hasBin: true ms@2.1.3: resolution: {integrity: sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==} @@ -1431,7 +1418,6 @@ packages: nanoid@3.3.7: resolution: {integrity: sha512-eSRppjcPIatRIMC1U6UngP8XFcz8MQWGQdt1MTBQ7NaAmvXDfvNxbvWV3x2y6CdEUciCSsDHDQZbhYaB8QEo2g==} engines: {node: ^10 || ^12 || ^13.7 || ^14 || >=15.0.1} - hasBin: true natural-compare@1.4.0: resolution: {integrity: sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==} @@ -1446,7 +1432,6 @@ packages: next@15.1.0: resolution: {integrity: sha512-QKhzt6Y8rgLNlj30izdMbxAwjHMFANnLwDwZ+WQh5sMhyt4lEBqDK9QpvWHtIM4rINKPoJ8aiRZKg5ULSybVHw==} engines: {node: ^18.18.0 || ^19.8.0 || >= 20.0.0} - hasBin: true peerDependencies: '@opentelemetry/api': ^1.1.0 '@playwright/test': ^1.41.2 @@ -1600,7 +1585,6 @@ packages: prettier@3.3.3: resolution: {integrity: sha512-i2tDNA0O5IrMO757lfrdQZCc2jPNDVntV0m/+4whiDfWaTKfMNgR7Qz0NAeGz/nRqF4m5/6CLzbP4/liHt12Ew==} engines: {node: '>=14'} - hasBin: true prop-types@15.8.1: resolution: {integrity: sha512-oj87CgZICdulUohogVAR7AjlC0327U4el4L6eAvOqCeudMDVU0NThNaV+b9Df4dXgSP1gXMTnPdhfe/2qDH5cg==} @@ -1621,7 +1605,6 @@ packages: rc@1.2.8: resolution: {integrity: sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw==} - hasBin: true react-dom@19.0.0: resolution: {integrity: sha512-4GV5sHFG0e/0AD4X+ySy6UJd3jVl1iNsNHdpad0qhABJ11twS3TTBnseqsKurKcsNqCEFeGL3uLpVChpIO3QfQ==} @@ -1663,11 +1646,9 @@ packages: resolve@1.22.8: resolution: {integrity: sha512-oKWePCxqpd6FlLvGV1VU0x7bkPmmCNolxzjMf4NczoDnQcIWrAF+cPtZn5i6n+RfD2d9i0tzpKnG6Yk168yIyw==} - hasBin: true resolve@2.0.0-next.5: resolution: {integrity: sha512-U7WjGVG9sH8tvjW5SmGbQuui75FiyjAX72HX15DwBBwF9dNiQZRQAg9nnPhYy+TUnE0+VcrttuvNI8oSxZcocA==} - hasBin: true restore-cursor@3.1.0: resolution: {integrity: sha512-l+sSefzHpj5qimhFSE5a8nufZYAM3sBSVMAPtYkmC+4EH2anSGaEMXSD0izRQbu9nfyQ9y5JrVmp7E8oZrUjvA==} @@ -1679,8 +1660,6 @@ packages: rimraf@3.0.2: resolution: {integrity: sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==} - deprecated: Rimraf versions prior to v4 are no longer supported - hasBin: true run-async@2.4.1: resolution: {integrity: sha512-tvVnVv01b8c1RrA6Ep7JkStj85Guv/YrMcwqYQnwjsAS2cTmmPGBBjAjpCW7RrSodNSoE2/qg9O4bceNvUuDgQ==} @@ -1715,12 +1694,10 @@ packages: semver@6.3.1: resolution: {integrity: sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==} - hasBin: true semver@7.6.3: resolution: {integrity: sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==} engines: {node: '>=10'} - hasBin: true sentence-case@2.1.1: resolution: {integrity: sha512-ENl7cYHaK/Ktwk5OTD+aDbQ3uC8IByu/6Bkg+HDv8Mm+XnBnppVNalcfJTNsp1ibstKh030/JKQQWglDvtKwEQ==} @@ -1886,7 +1863,6 @@ packages: ts-node@10.9.2: resolution: {integrity: sha512-f0FFpIdcHgn8zcPSbf1dRevwt047YMnaiJM3u2w2RewrB+fob/zePZcrOyQoLMMO7aBIddLcQIEK5dYjkLnGrQ==} - hasBin: true peerDependencies: '@swc/core': '>=1.2.50' '@swc/wasm': '>=1.2.50' @@ -1904,38 +1880,38 @@ packages: tslib@2.8.1: resolution: {integrity: sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==} - turbo-darwin-64@2.3.1: - resolution: {integrity: sha512-tjHfjW/Gs8Q9IO+9gPdIsSStZ8I09QYDRT/SyhFTPLnc7O2ZlxHPBVFfjUkHUjanHNYO8CpRGt+zdp1PaMCruw==} + turbo-darwin-64@2.3.3: + resolution: {integrity: sha512-bxX82xe6du/3rPmm4aCC5RdEilIN99VUld4HkFQuw+mvFg6darNBuQxyWSHZTtc25XgYjQrjsV05888w1grpaA==} cpu: [x64] os: [darwin] - turbo-darwin-arm64@2.3.1: - resolution: {integrity: sha512-At1WStnxCfrBQ4M2g6ynre8WsusGwA11okhVolBxyFUemYozDTtbZwelr+IqNggjT251vviokxOkcFzzogbiFw==} + turbo-darwin-arm64@2.3.3: + resolution: {integrity: sha512-DYbQwa3NsAuWkCUYVzfOUBbSUBVQzH5HWUFy2Kgi3fGjIWVZOFk86ss+xsWu//rlEAfYwEmopigsPYSmW4X15A==} cpu: [arm64] os: [darwin] - turbo-linux-64@2.3.1: - resolution: {integrity: sha512-COwEev7s9fsxLM2eoRCyRLPj+BXvZjFIS+GxzdAubYhoSoZit8B8QGKczyDl6448xhuFEWKrpHhcR9aBuwB4ag==} + turbo-linux-64@2.3.3: + resolution: {integrity: sha512-eHj9OIB0dFaP6BxB88jSuaCLsOQSYWBgmhy2ErCu6D2GG6xW3b6e2UWHl/1Ho9FsTg4uVgo4DB9wGsKa5erjUA==} cpu: [x64] os: [linux] - turbo-linux-arm64@2.3.1: - resolution: {integrity: sha512-AP0uE15Rhxza2Jl+Q3gxdXRA92IIeFAYaufz6CMcZuGy9yZsBlLt9w6T47H6g7XQPzWuw8pzfjM1omcTKkkDpQ==} + turbo-linux-arm64@2.3.3: + resolution: {integrity: sha512-NmDE/NjZoDj1UWBhMtOPmqFLEBKhzGS61KObfrDEbXvU3lekwHeoPvAMfcovzswzch+kN2DrtbNIlz+/rp8OCg==} cpu: [arm64] os: [linux] - turbo-windows-64@2.3.1: - resolution: {integrity: sha512-HDSneq0dNZYZch74c2eygq+OiJE/JYDs7OsGM0yRYVj336383xkUnxz6W2I7qiyMCQXzp4UVUDZXvZhUYcX3BA==} + turbo-windows-64@2.3.3: + resolution: {integrity: sha512-O2+BS4QqjK3dOERscXqv7N2GXNcqHr9hXumkMxDj/oGx9oCatIwnnwx34UmzodloSnJpgSqjl8iRWiY65SmYoQ==} cpu: [x64] os: [win32] - turbo-windows-arm64@2.3.1: - resolution: {integrity: sha512-7/2/sJZiquwoT/jWBCfV0qKq4NarsJPmDRjMcR9dDMIwCYsGM8ljomkDRTCtkNeFcUvYw54MiRWHehWgbcRPsw==} + turbo-windows-arm64@2.3.3: + resolution: {integrity: sha512-dW4ZK1r6XLPNYLIKjC4o87HxYidtRRcBeo/hZ9Wng2XM/MqqYkAyzJXJGgRMsc0MMEN9z4+ZIfnSNBrA0b08ag==} cpu: [arm64] os: [win32] - turbo@2.3.1: - resolution: {integrity: sha512-vHZe/e6k1HZVKiMQPQ1BWFn53vjVQDFKdkjUq/pBKlRWi1gw9LQO6ntH4qZCcHY1rH6TXgsRmexXdgWl96YvVQ==} + turbo@2.3.3: + resolution: {integrity: sha512-DUHWQAcC8BTiUZDRzAYGvpSpGLiaOQPfYXlCieQbwUvmml/LRGIe3raKdrOPOoiX0DYlzxs2nH6BoWJoZrj8hA==} hasBin: true type-check@0.4.0: @@ -1975,12 +1951,10 @@ packages: typescript@5.5.4: resolution: {integrity: sha512-Mtq29sKDAEYP7aljRgtPOpTvOfbwRWlS6dPRzwjdE+C0R4brX/GUyhHSecbHMFLNBLcJIPt9nl9yG5TZ1weH+Q==} engines: {node: '>=14.17'} - hasBin: true uglify-js@3.19.3: resolution: {integrity: sha512-v3Xu+yuwBXisp6QYTcH4UbH+xYJXqnq2m/LtQVWKWzYc1iehYnLixoQDN9FH6/j9/oybfd6W9Ghwkl8+UMKTKQ==} engines: {node: '>=0.8.0'} - hasBin: true unbox-primitive@1.0.2: resolution: {integrity: sha512-61pPlCD9h51VoreyJ0BReideM3MDKMKnh6+V9L08331ipq6Q8OFXZYiqP6n/tbHx4s5I9uRhcye6BrbkizkBDw==} @@ -2035,7 +2009,6 @@ packages: which@2.0.2: resolution: {integrity: sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==} engines: {node: '>= 8'} - hasBin: true word-wrap@1.2.5: resolution: {integrity: sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA==} @@ -4070,32 +4043,32 @@ snapshots: tslib@2.8.1: {} - turbo-darwin-64@2.3.1: + turbo-darwin-64@2.3.3: optional: true - turbo-darwin-arm64@2.3.1: + turbo-darwin-arm64@2.3.3: optional: true - turbo-linux-64@2.3.1: + turbo-linux-64@2.3.3: optional: true - turbo-linux-arm64@2.3.1: + turbo-linux-arm64@2.3.3: optional: true - turbo-windows-64@2.3.1: + turbo-windows-64@2.3.3: optional: true - turbo-windows-arm64@2.3.1: + turbo-windows-arm64@2.3.3: optional: true - turbo@2.3.1: + turbo@2.3.3: optionalDependencies: - turbo-darwin-64: 2.3.1 - turbo-darwin-arm64: 2.3.1 - turbo-linux-64: 2.3.1 - turbo-linux-arm64: 2.3.1 - turbo-windows-64: 2.3.1 - turbo-windows-arm64: 2.3.1 + turbo-darwin-64: 2.3.3 + turbo-darwin-arm64: 2.3.3 + turbo-linux-64: 2.3.3 + turbo-linux-arm64: 2.3.3 + turbo-windows-64: 2.3.3 + turbo-windows-arm64: 2.3.3 type-check@0.4.0: dependencies: From 86a2cb92d316f002245c8729acce6dfbd03cf347 Mon Sep 17 00:00:00 2001 From: William Hua Date: Tue, 21 Jan 2025 09:42:28 +0100 Subject: [PATCH 006/439] core: pnpm add -D typescript --- packages/core/package.json | 6 ++++++ pnpm-lock.yaml | 17 +++++++++++++++++ 2 files changed, 23 insertions(+) create mode 100644 packages/core/package.json diff --git a/packages/core/package.json b/packages/core/package.json new file mode 100644 index 000000000..8624a617f --- /dev/null +++ b/packages/core/package.json @@ -0,0 +1,6 @@ +{ + "name": "@0xsequence/sequence-core", + "devDependencies": { + "typescript": "^5.7.3" + } +} diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 076d55aa1..694e77e2a 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -86,6 +86,12 @@ importers: specifier: 5.5.4 version: 5.5.4 + packages/core: + devDependencies: + typescript: + specifier: ^5.7.3 + version: 5.7.3 + packages/eslint-config: devDependencies: '@eslint/js': @@ -871,6 +877,7 @@ packages: eslint-config-prettier@9.1.0: resolution: {integrity: sha512-NSWl5BFQWEPi1j4TjVNItzYV7dZXZ+wP6I6ZhrBGpChQhZRUaElihE9uRRkcbRnNb76UMKDF3r+WTmNcGPKsqw==} + hasBin: true peerDependencies: eslint: '>=7.0.0' @@ -910,6 +917,7 @@ packages: eslint@9.15.0: resolution: {integrity: sha512-7CrWySmIibCgT1Os28lUU6upBshZ+GxybLOrmRzi08kS8MBuO8QA7pXEgYgY5W8vK3e74xv0lpjo9DbaGU9Rkw==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + hasBin: true peerDependencies: jiti: '*' peerDependenciesMeta: @@ -1432,6 +1440,7 @@ packages: next@15.1.0: resolution: {integrity: sha512-QKhzt6Y8rgLNlj30izdMbxAwjHMFANnLwDwZ+WQh5sMhyt4lEBqDK9QpvWHtIM4rINKPoJ8aiRZKg5ULSybVHw==} engines: {node: ^18.18.0 || ^19.8.0 || >= 20.0.0} + hasBin: true peerDependencies: '@opentelemetry/api': ^1.1.0 '@playwright/test': ^1.41.2 @@ -1863,6 +1872,7 @@ packages: ts-node@10.9.2: resolution: {integrity: sha512-f0FFpIdcHgn8zcPSbf1dRevwt047YMnaiJM3u2w2RewrB+fob/zePZcrOyQoLMMO7aBIddLcQIEK5dYjkLnGrQ==} + hasBin: true peerDependencies: '@swc/core': '>=1.2.50' '@swc/wasm': '>=1.2.50' @@ -1952,6 +1962,11 @@ packages: resolution: {integrity: sha512-Mtq29sKDAEYP7aljRgtPOpTvOfbwRWlS6dPRzwjdE+C0R4brX/GUyhHSecbHMFLNBLcJIPt9nl9yG5TZ1weH+Q==} engines: {node: '>=14.17'} + typescript@5.7.3: + resolution: {integrity: sha512-84MVSjMEHP+FQRPy3pX9sTVV/INIex71s9TL2Gm5FG/WG1SqXeKyZ0k7/blY/4FdOzI12CBy1vGc4og/eus0fw==} + engines: {node: '>=14.17'} + hasBin: true + uglify-js@3.19.3: resolution: {integrity: sha512-v3Xu+yuwBXisp6QYTcH4UbH+xYJXqnq2m/LtQVWKWzYc1iehYnLixoQDN9FH6/j9/oybfd6W9Ghwkl8+UMKTKQ==} engines: {node: '>=0.8.0'} @@ -4122,6 +4137,8 @@ snapshots: typescript@5.5.4: {} + typescript@5.7.3: {} + uglify-js@3.19.3: optional: true From df9e2cde3c228ee323a6a4f47a7b066e84676c92 Mon Sep 17 00:00:00 2001 From: William Hua Date: Tue, 21 Jan 2025 09:44:10 +0100 Subject: [PATCH 007/439] core: pnpm add -D --workspace @repo/typescript-config --- packages/core/package.json | 1 + pnpm-lock.yaml | 3 +++ 2 files changed, 4 insertions(+) diff --git a/packages/core/package.json b/packages/core/package.json index 8624a617f..edef3d8ff 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -1,6 +1,7 @@ { "name": "@0xsequence/sequence-core", "devDependencies": { + "@repo/typescript-config": "workspace:^", "typescript": "^5.7.3" } } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 694e77e2a..970b70aa7 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -88,6 +88,9 @@ importers: packages/core: devDependencies: + '@repo/typescript-config': + specifier: workspace:^ + version: link:../typescript-config typescript: specifier: ^5.7.3 version: 5.7.3 From 59ad776d40507b46c8255436aeac7ac4ff4f459f Mon Sep 17 00:00:00 2001 From: William Hua Date: Tue, 21 Jan 2025 09:46:42 +0100 Subject: [PATCH 008/439] core: tsconfig.json --- packages/core/tsconfig.json | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 packages/core/tsconfig.json diff --git a/packages/core/tsconfig.json b/packages/core/tsconfig.json new file mode 100644 index 000000000..e502f58f4 --- /dev/null +++ b/packages/core/tsconfig.json @@ -0,0 +1,9 @@ +{ + "extends": "@repo/typescript-config/base.json", + "compilerOptions": { + "rootDir": "src", + "outDir": "dist" + }, + "include": ["src"], + "exclude": ["node_modules", "dist"] +} From 16f27488a436cf55309ab5f36ce65152cc50e571 Mon Sep 17 00:00:00 2001 From: William Hua Date: Tue, 21 Jan 2025 09:55:34 +0100 Subject: [PATCH 009/439] core: wallet --- packages/core/package.json | 6 ++++++ packages/core/src/index.ts | 0 2 files changed, 6 insertions(+) create mode 100644 packages/core/src/index.ts diff --git a/packages/core/package.json b/packages/core/package.json index edef3d8ff..c6d2c26a2 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -1,5 +1,11 @@ { "name": "@0xsequence/sequence-core", + "exports": { + ".": { + "types": "./src/index.ts", + "default": "./dist/index.js" + } + }, "devDependencies": { "@repo/typescript-config": "workspace:^", "typescript": "^5.7.3" diff --git a/packages/core/src/index.ts b/packages/core/src/index.ts new file mode 100644 index 000000000..e69de29bb From ac879a89d2ff475dbbe59875fd717e3d1bda52c4 Mon Sep 17 00:00:00 2001 From: William Hua Date: Tue, 21 Jan 2025 09:56:21 +0100 Subject: [PATCH 010/439] core: pnpm build and pnpm dev --- packages/core/package.json | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/packages/core/package.json b/packages/core/package.json index c6d2c26a2..a35d656ba 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -1,5 +1,9 @@ { "name": "@0xsequence/sequence-core", + "scripts": { + "build": "tsc", + "dev": "tsc --watch" + }, "exports": { ".": { "types": "./src/index.ts", From 8ba4da828e689f5b54960d2d80b36f88f97aaa7f Mon Sep 17 00:00:00 2001 From: William Hua Date: Tue, 21 Jan 2025 09:58:05 +0100 Subject: [PATCH 011/439] turbo: cache dist --- turbo.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/turbo.json b/turbo.json index d6a7fe055..8a879904e 100644 --- a/turbo.json +++ b/turbo.json @@ -5,7 +5,7 @@ "build": { "dependsOn": ["^build"], "inputs": ["$TURBO_DEFAULT$", ".env*"], - "outputs": [".next/**", "!.next/cache/**"] + "outputs": [".next/**", "!.next/cache/**", "dist/**"] }, "lint": { "dependsOn": ["^lint"] From 1deb301bb85ac90caf4f36531610410a5584c0f0 Mon Sep 17 00:00:00 2001 From: William Hua Date: Tue, 21 Jan 2025 11:27:13 +0100 Subject: [PATCH 012/439] primitives: package.json --- packages/primitives/package.json | 13 +++++++++++++ packages/primitives/src/index.ts | 0 2 files changed, 13 insertions(+) create mode 100644 packages/primitives/package.json create mode 100644 packages/primitives/src/index.ts diff --git a/packages/primitives/package.json b/packages/primitives/package.json new file mode 100644 index 000000000..f0acc82e3 --- /dev/null +++ b/packages/primitives/package.json @@ -0,0 +1,13 @@ +{ + "name": "@0xsequence/sequence-primitives", + "scripts": { + "build": "tsc", + "dev": "tsc --watch" + }, + "exports": { + ".": { + "types": "./src/index.ts", + "default": "./dist/index.js" + } + } +} diff --git a/packages/primitives/src/index.ts b/packages/primitives/src/index.ts new file mode 100644 index 000000000..e69de29bb From 2aa0eb7fdeb3a2989e280868e06c3bc6507d5013 Mon Sep 17 00:00:00 2001 From: William Hua Date: Tue, 21 Jan 2025 11:27:42 +0100 Subject: [PATCH 013/439] primitives: pnpm add -D typescript --- packages/primitives/package.json | 3 +++ pnpm-lock.yaml | 6 ++++++ 2 files changed, 9 insertions(+) diff --git a/packages/primitives/package.json b/packages/primitives/package.json index f0acc82e3..3d4590d98 100644 --- a/packages/primitives/package.json +++ b/packages/primitives/package.json @@ -9,5 +9,8 @@ "types": "./src/index.ts", "default": "./dist/index.js" } + }, + "devDependencies": { + "typescript": "^5.7.3" } } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 970b70aa7..606f70f16 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -131,6 +131,12 @@ importers: specifier: ^8.15.0 version: 8.15.0(eslint@9.15.0)(typescript@5.5.4) + packages/primitives: + devDependencies: + typescript: + specifier: ^5.7.3 + version: 5.7.3 + packages/typescript-config: {} packages/ui: From c5d8f223a0da21ec0ff3a177034c9ae2e7fb659a Mon Sep 17 00:00:00 2001 From: William Hua Date: Tue, 21 Jan 2025 11:27:59 +0100 Subject: [PATCH 014/439] primitives: pnpm add -D --workspace @repo/typescript-config --- packages/primitives/package.json | 1 + pnpm-lock.yaml | 3 +++ 2 files changed, 4 insertions(+) diff --git a/packages/primitives/package.json b/packages/primitives/package.json index 3d4590d98..1231fa02e 100644 --- a/packages/primitives/package.json +++ b/packages/primitives/package.json @@ -11,6 +11,7 @@ } }, "devDependencies": { + "@repo/typescript-config": "workspace:^", "typescript": "^5.7.3" } } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 606f70f16..0e1ee305c 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -133,6 +133,9 @@ importers: packages/primitives: devDependencies: + '@repo/typescript-config': + specifier: workspace:^ + version: link:../typescript-config typescript: specifier: ^5.7.3 version: 5.7.3 From b36001e94445786bf7a08999ad9ef9bcc719cc59 Mon Sep 17 00:00:00 2001 From: William Hua Date: Tue, 21 Jan 2025 11:29:51 +0100 Subject: [PATCH 015/439] primitives: tsconfig.json --- packages/primitives/tsconfig.json | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 packages/primitives/tsconfig.json diff --git a/packages/primitives/tsconfig.json b/packages/primitives/tsconfig.json new file mode 100644 index 000000000..e502f58f4 --- /dev/null +++ b/packages/primitives/tsconfig.json @@ -0,0 +1,9 @@ +{ + "extends": "@repo/typescript-config/base.json", + "compilerOptions": { + "rootDir": "src", + "outDir": "dist" + }, + "include": ["src"], + "exclude": ["node_modules", "dist"] +} From 72679d10bea43ab44a915e257a7ced11772782ba Mon Sep 17 00:00:00 2001 From: William Hua Date: Tue, 21 Jan 2025 11:46:28 +0100 Subject: [PATCH 016/439] core: pnpm add --workspace @0xsequence/sequence-primitives --- packages/core/package.json | 3 +++ pnpm-lock.yaml | 4 ++++ 2 files changed, 7 insertions(+) diff --git a/packages/core/package.json b/packages/core/package.json index a35d656ba..59ee5d947 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -13,5 +13,8 @@ "devDependencies": { "@repo/typescript-config": "workspace:^", "typescript": "^5.7.3" + }, + "dependencies": { + "@0xsequence/sequence-primitives": "workspace:^" } } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 0e1ee305c..95f1e3488 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -87,6 +87,10 @@ importers: version: 5.5.4 packages/core: + dependencies: + '@0xsequence/sequence-primitives': + specifier: workspace:^ + version: link:../primitives devDependencies: '@repo/typescript-config': specifier: workspace:^ From 6871cfbb6045405820bcd095ab3894ef9cd1c76a Mon Sep 17 00:00:00 2001 From: William Hua Date: Tue, 21 Jan 2025 11:49:39 +0100 Subject: [PATCH 017/439] primitives: copy from sequence-v3@a12ad18be88d594df00ff0fa1d23974c6c719e01 --- packages/primitives/package.json | 3 + packages/primitives/src/config.ts | 146 ++++++++++ packages/primitives/src/index.ts | 4 + packages/primitives/src/payload.ts | 238 +++++++++++++++++ packages/primitives/src/signature.ts | 381 +++++++++++++++++++++++++++ packages/primitives/src/utils.ts | 3 + pnpm-lock.yaml | 87 ++++++ 7 files changed, 862 insertions(+) create mode 100644 packages/primitives/src/config.ts create mode 100644 packages/primitives/src/payload.ts create mode 100644 packages/primitives/src/signature.ts create mode 100644 packages/primitives/src/utils.ts diff --git a/packages/primitives/package.json b/packages/primitives/package.json index 1231fa02e..8b2131d5b 100644 --- a/packages/primitives/package.json +++ b/packages/primitives/package.json @@ -13,5 +13,8 @@ "devDependencies": { "@repo/typescript-config": "workspace:^", "typescript": "^5.7.3" + }, + "dependencies": { + "ox": "^0.6.7" } } diff --git a/packages/primitives/src/config.ts b/packages/primitives/src/config.ts new file mode 100644 index 000000000..a9b9c7446 --- /dev/null +++ b/packages/primitives/src/config.ts @@ -0,0 +1,146 @@ +import { Bytes, Hash, Hex } from 'ox' + +/** + * Types for the topology of the tree + */ +export type SignerLeaf = { + address: `0x${string}` + weight: bigint +} + +export type SapientSigner = { + address: `0x${string}` + weight: bigint + imageHash: Uint8Array +} + +export type SubdigestLeaf = { + digest: Uint8Array +} + +export type NestedLeaf = { + tree: Topology + weight: bigint + threshold: bigint +} + +export type NodeLeaf = { + nodeHash: Uint8Array +} + +export type Leaf = SignerLeaf | SubdigestLeaf | NodeLeaf | NestedLeaf | SapientSigner + +export type Node = { + left: Topology + right: Topology +} + +export type Topology = Node | Leaf + +export type Configuration = { + threshold: bigint + checkpoint: bigint + topology: Topology + checkpointer?: `0x${string}` +} + +export function isSignerLeaf(cand: Topology): cand is SignerLeaf { + return typeof cand === 'object' && 'address' in cand && 'weight' in cand +} + +export function isSapientSigner(cand: Topology): cand is SapientSigner { + return typeof cand === 'object' && 'address' in cand && 'weight' in cand && 'imageHash' in cand +} + +export function isSubdigestLeaf(cand: Topology): cand is SubdigestLeaf { + return typeof cand === 'object' && 'digest' in cand +} + +export function isNodeLeaf(cand: Topology): cand is NodeLeaf { + return typeof cand === 'object' && 'nodeHash' in cand +} + +export function isNestedLeaf(cand: Topology): cand is NestedLeaf { + return typeof cand === 'object' && 'tree' in cand && 'weight' in cand && 'threshold' in cand +} + +export function isNode(cand: Topology): cand is Node { + return typeof cand === 'object' && 'left' in cand && 'right' in cand +} + +export function isConfiguration(cand: any): cand is Configuration { + return ( + typeof cand === 'object' && 'threshold' in cand && 'checkpoint' in cand && 'topology' in cand + ) +} + +export function isLeaf(cand: Topology): cand is Leaf { + return ( + isSignerLeaf(cand) || + isSapientSigner(cand) || + isSubdigestLeaf(cand) || + isNodeLeaf(cand) || + isNestedLeaf(cand) + ) +} + +function hashConfiguration(topology: Topology | Configuration): Uint8Array { + if (isConfiguration(topology)) { + let root = hashConfiguration(topology.topology) + root = Hash.keccak256(Bytes.concat(root, Bytes.fromNumber(topology.threshold))) + root = Hash.keccak256(Bytes.concat(root, Bytes.fromNumber(topology.checkpoint))) + root = Hash.keccak256( + Bytes.concat( + root, + Bytes.fromHex(topology.checkpointer ?? '0x0000000000000000000000000000000000000000') + ) + ) + return root + } + + if (isSignerLeaf(topology)) { + const addrBigInt = Hex.toBigInt(topology.address) + const combined = (topology.weight << 160n) | addrBigInt + return Bytes.padLeft(Bytes.fromNumber(combined), 32) + } + + if (isSapientSigner(topology)) { + return Hash.keccak256( + Bytes.concat( + Bytes.fromString('Sequence sapient config:\n'), + Bytes.fromHex(topology.address), + Bytes.padLeft(Bytes.fromNumber(topology.weight), 32), + topology.imageHash + ) + ) + } + + if (isSubdigestLeaf(topology)) { + return Hash.keccak256( + Bytes.concat(Bytes.fromString('Sequence static digest:\n'), topology.digest) + ) + } + + if (isNodeLeaf(topology)) { + return topology.nodeHash + } + + if (isNestedLeaf(topology)) { + return Hash.keccak256( + Bytes.concat( + Bytes.fromString('Sequence nested config:\n'), + hashConfiguration(topology.tree), + Bytes.padLeft(Bytes.fromNumber(topology.threshold), 32), + Bytes.padLeft(Bytes.fromNumber(topology.weight), 32) + ) + ) + } + + if (isNode(topology)) { + return Hash.keccak256( + Bytes.concat(hashConfiguration(topology.left), hashConfiguration(topology.right)) + ) + } + + throw new Error('Invalid topology') +} diff --git a/packages/primitives/src/index.ts b/packages/primitives/src/index.ts index e69de29bb..b9e05f75c 100644 --- a/packages/primitives/src/index.ts +++ b/packages/primitives/src/index.ts @@ -0,0 +1,4 @@ +export * from './config' +export * from './payload' +export * from './signature' +export * from './utils' diff --git a/packages/primitives/src/payload.ts b/packages/primitives/src/payload.ts new file mode 100644 index 000000000..d827228e4 --- /dev/null +++ b/packages/primitives/src/payload.ts @@ -0,0 +1,238 @@ +import { minBytesFor } from './utils' + +export type Call = { + to: `0x${string}` + value: bigint + data: Uint8Array + gasLimit: bigint + delegateCall: boolean + onlyFallback: boolean + behaviorOnError: 'ignore' | 'revert' | 'abort' +} + +export type CallPayload = { + type: 'call' + space: bigint + nonce: bigint + calls: Call[] +} + +export type MessagePayload = { + type: 'message' + message: Uint8Array +} + +export type ConfigUpdatePayload = { + type: 'config-update' + imageHash: `0x${string}` +} + +export type DigestPayload = { + type: 'digest' + digest: `0x${string}` +} + +export type ParentPayload = { + parentWallets?: `0x${string}`[] +} + +export type Payload = CallPayload | MessagePayload | ConfigUpdatePayload | DigestPayload + +export type ParentedPayload = Payload & ParentPayload + +export function fromMessage(message: Uint8Array): Payload { + return { + type: 'message', + message, + } +} + +export function fromConfigUpdate(imageHash: `0x${string}`): Payload { + return { + type: 'config-update', + imageHash, + } +} + +export function fromDigest(digest: `0x${string}`): Payload { + return { + type: 'digest', + digest, + } +} + +export function fromCall(nonce: bigint, space: bigint, calls: Call[]): Payload { + return { + type: 'call', + nonce, + space, + calls, + } +} + +export function encode(payload: CallPayload, self?: `0x${string}`): Uint8Array { + const callsLen = payload.calls.length + const minBytes = minBytesFor(payload.nonce) + if (minBytes > 15) { + throw new Error('Nonce is too large') + } + + /* + globalFlag layout: + + bit 0: spaceZeroFlag => 1 if space == 0, else 0 + bits [1..4]: nonceBytes => how many bytes we use to encode nonce + bit 5: singleCallFlag => 1 if there's exactly one call, else 0 + bit 6: callsCountSizeFlag => 1 if #calls stored in 1 byte, else 0 if stored in 2 bytes + + (bits 7..7 are unused, or free) + */ + let globalFlag = 0 + if (payload.space === 0n) { + globalFlag |= 0x01 + } + globalFlag |= minBytes << 1 + if (callsLen === 1) { + globalFlag |= 0x10 + } + + // If more than one call, figure out if we store the calls count in 1 or 2 bytes + let callsCountSize = 0 + if (callsLen !== 1) { + if (callsLen < 256) { + callsCountSize = 1 + } else { + globalFlag |= 0x20 + callsCountSize = 2 + } + } + + const out: number[] = [] + out.push(globalFlag) + + // If space isn't zero, we store it in 20 bytes (uint160) + if (payload.space !== 0n) { + const spaceHex = payload.space.toString(16).padStart(40, '0') + for (let i = 0; i < 20; i++) { + out.push(parseInt(spaceHex.substring(i * 2, i * 2 + 2), 16)) + } + } + + // Encode nonce in minBytes + if (minBytes > 0) { + let nonceHex = payload.nonce.toString(16) + nonceHex = nonceHex.padStart(minBytes * 2, '0') + for (let i = 0; i < minBytes; i++) { + out.push(parseInt(nonceHex.substring(i * 2, i * 2 + 2), 16)) + } + } + + // Store the calls length if not single-call + if (callsLen !== 1) { + if (callsCountSize === 1) { + out.push(callsLen & 0xff) + } else { + out.push((callsLen >> 8) & 0xff, callsLen & 0xff) + } + } + + /* + Each call has a flags byte: + + bit 0: toSelf => 1 if call.to == address(this) in solidity, else 0 + bit 1: hasValue => 1 if call.value != 0 + bit 2: hasData => 1 if call.data.length > 0 + bit 3: hasGasLimit => 1 if call.gasLimit != 0 + bit 4: delegateCall + bit 5: onlyFallback + bits [6..7]: behaviorOnError => 0=ignore, 1=revert, 2=abort + */ + + for (const call of payload.calls) { + let flags = 0 + + if (self && call.to === self) { + flags |= 0x01 + } + + if (call.value !== 0n) { + flags |= 0x02 + } + + if (call.data && call.data.length > 0) { + flags |= 0x04 + } + + if (call.gasLimit !== 0n) { + flags |= 0x08 + } + + if (call.delegateCall) { + flags |= 0x10 + } + + if (call.onlyFallback) { + flags |= 0x20 + } + + // bits [6..7] => behaviorOnError + let behaviorBits = 0 + switch (call.behaviorOnError) { + case 'ignore': + behaviorBits = 0 + break + case 'revert': + behaviorBits = 1 + break + case 'abort': + behaviorBits = 2 + break + default: + throw new Error(`Unknown behavior: ${call.behaviorOnError}`) + } + flags |= behaviorBits << 6 + + out.push(flags) + + // If bit0 is 0, we store the address in 20 bytes + if ((flags & 0x01) === 0) { + const addr = call.to.startsWith('0x') ? call.to.substring(2) : call.to + if (addr.length !== 40) { + throw new Error(`Invalid 'to' address: ${call.to}`) + } + for (let i = 0; i < 20; i++) { + out.push(parseInt(addr.substring(i * 2, i * 2 + 2), 16)) + } + } + + // If bit1 is set, store 32 bytes of value + if ((flags & 0x02) !== 0) { + const valHex = call.value.toString(16).padStart(64, '0') + for (let i = 0; i < 32; i++) { + out.push(parseInt(valHex.substring(i * 2, i * 2 + 2), 16)) + } + } + + // If bit2 is set, store 3 bytes of data length + data + if ((flags & 0x04) !== 0) { + const dataLen = call.data.length + if (dataLen > 0xffffff) { + throw new Error('Data too large') + } + out.push((dataLen >> 16) & 0xff, (dataLen >> 8) & 0xff, dataLen & 0xff) + for (let i = 0; i < dataLen; i++) { + out.push(call.data[i]) + } + } + + // If bit3 is set, store 32 bytes of gasLimit + if ((flags & 0x08) !== 0) { + const gasHex = call.gasLimit.toString(16).padStart(64, '0') + for (let i = 0; i < 32; i++) { + out.push(parseInt(gasHex.substring(i * 2, i * 2 + 2), 16)) + } + } + } + + return new Uint8Array(out) +} diff --git a/packages/primitives/src/signature.ts b/packages/primitives/src/signature.ts new file mode 100644 index 000000000..a60c84b2d --- /dev/null +++ b/packages/primitives/src/signature.ts @@ -0,0 +1,381 @@ +import { + SignerLeaf, + SapientSigner, + isSignerLeaf, + isSapientSigner, + Topology, + Leaf, + NodeLeaf, + SubdigestLeaf, +} from './config' +import { Bytes } from 'ox' + +export type SignedSignerLeaf = SignerLeaf & { + signature: + | { + r: Uint8Array + s: Uint8Array + v: number + type: 'eth_sign' | 'hash' + } + | { + data: Uint8Array + type: 'erc1271' + } +} + +export type SignedSapientLeaf = SapientSigner & { + signature: { + data: Uint8Array + type: 'sapient' | 'sapient_compact' + } +} + +export type RawSignerLeaf = { + weight: bigint + signature: + | { + r: Uint8Array + s: Uint8Array + v: number + type: 'eth_sign' | 'hash' + } + | { + address: string + data: Uint8Array + type: 'erc1271' + } + | { + address: string + data: Uint8Array + type: 'sapient' | 'sapient_compact' + } +} + +export type RawNestedLeaf = { + tree: RawTopology + weight: bigint + threshold: bigint +} + +export type RawLeaf = Leaf | RawSignerLeaf | RawNestedLeaf + +export type RawNode = { + left: RawTopology + right: RawTopology +} + +export type RawTopology = RawNode | RawLeaf + +export type RawConfiguration = { + threshold: bigint + checkpoint: bigint + topology: RawTopology + checkpointer?: `0x${string}` +} + +export type RawSignature = { + noChainId: boolean + checkpointerData?: Uint8Array + configuration: RawConfiguration + suffix?: Omit[] +} + +export type Signature = { + noChainId: boolean + checkpointerData?: Uint8Array + topology: Topology + suffix?: Omit[] +} + +export function isSignedSignerLeaf(cand: any): cand is SignedSignerLeaf { + return isSignerLeaf(cand) && 'signature' in cand +} + +export function isSignedSapientLeaf(cand: any): cand is SignedSapientLeaf { + return isSapientSigner(cand) && 'signature' in cand +} + +export function decodeSignature(signature: Uint8Array): RawSignature { + const flag = signature[0] + + // Chained signature + if ((flag & 0x01) === 0x01) { + throw new Error('TODO') + } + + let index = 1 + + // Normal signature + let noChainId = (flag & 0x02) === 0x02 + + // Checkpoint size + let checkpointSize = (flag & 0x1c) >> 2 + + // Read the next `checkpointSize` bytes as the checkpoint + const checkpoint = Bytes.toBigInt(signature.slice(index, index + checkpointSize)) + index += checkpointSize + + // Read the next `thresholdSize` bytes as the threshold + const thresholdSize = ((flag & 0x20) >> 5) + 1 + const threshold = Bytes.toBigInt(signature.slice(index, index + thresholdSize)) + index += thresholdSize + + let checkpointerAddress: `0x${string}` | undefined + let checkpointerData: Uint8Array | undefined + + // Read the checkpointer + if ((flag & 0x40) === 0x40) { + // Read the checkpointer address + checkpointerAddress = Bytes.toHex(signature.slice(index, index + 20)) + index += 20 + + // Read the checkpointer data size + const checkpointerDataSize = (flag & 0x1c) >> 2 + checkpointerData = signature.slice(index, index + checkpointerDataSize) + index += checkpointerDataSize + } + + // Parse rest of the signature + const { nodes, leftover } = parseBranch(signature.slice(index)) + if (leftover.length !== 0) { + throw new Error('Leftover bytes in signature') + } + + const topology = foldNodes(nodes) + + return { + noChainId, + checkpointerData, + configuration: { + threshold, + checkpoint, + topology, + checkpointer: checkpointerAddress, + }, + } +} + +export function parseBranch(signature: Uint8Array): { nodes: RawTopology[]; leftover: Uint8Array } { + const nodes: RawTopology[] = [] + let index = 0 + let weightSum = 0n + + while (index < signature.length) { + const firstByte = signature[index] + index++ + + const flag = (firstByte & 0xf0) >> 4 + + // Signature hash (0x00) + if (flag === 0x00 || flag === 0x07) { + const v = (firstByte & 0x10) >> (4 + 27) + let weight = firstByte & 0x07 + if (weight === 0) { + weight = signature[index] + index++ + } + + const r = signature.slice(index, index + 32) + const s = signature.slice(index + 32, index + 64) + index += 64 + + weightSum += BigInt(weight) + + nodes.push({ + weight: BigInt(weight), + signature: { + r, + s, + v, + type: flag === 0x00 ? 'hash' : 'eth_sign', + }, + } as RawSignerLeaf) + continue + } + + // Address (0x01) + if (flag === 0x01) { + let weight = firstByte & 0x0f + if (weight === 0) { + weight = signature[index] + index++ + } + + const address = signature.slice(index, index + 20) + index += 20 + + nodes.push({ + weight: BigInt(weight), + address: Bytes.toHex(address), + } as SignerLeaf) + continue + } + + // Signature ERC1271 (0x02) + if (flag === 0x02) { + let weight = firstByte & 0x03 + if (weight === 0) { + weight = signature[index] + index++ + } + + // Read signer + const signer = signature.slice(index, index + 20) + index += 20 + + // Read signature size + const sizeSize = (firstByte & 0x0c) >> 2 + const size = Bytes.toNumber(signature.slice(index, index + sizeSize)) + index += sizeSize + + const subSignature = signature.slice(index, index + size) + index += size + + nodes.push({ + weight: BigInt(weight), + signature: { + address: Bytes.toHex(signer), + data: subSignature, + type: 'erc1271', + }, + } as RawSignerLeaf) + continue + } + + // Node (0x03) + if (flag === 0x03) { + // Read only the node hash + const node = signature.slice(index, index + 32) + index += 32 + + nodes.push({ + nodeHash: node, + } as NodeLeaf) + continue + } + + // Branch (0x04) + if (flag === 0x04) { + // Read size of the branch + const sizeSize = firstByte & 0x0f + const size = Bytes.toNumber(signature.slice(index, index + sizeSize)) + index += sizeSize + + // Enter a branch of the signature merkle tree + const branchBytes = signature.slice(index, index + size) + index += size + + const { nodes, leftover } = parseBranch(branchBytes) + if (leftover.length > 0) { + throw new Error('Leftover bytes in branch') + } + + const subTree = foldNodes(nodes) + nodes.push(subTree) + continue + } + + // Nested (0x05) + if (flag === 0x05) { + // Read external weight + let weight = firstByte & 0x03 + if (weight === 0) { + weight = signature[index] + index++ + } + + // Read internal threshold + let threshold = (firstByte & 0x0c) >> 2 + if (threshold === 0) { + // Read 2 bytes + threshold = Bytes.toNumber(signature.slice(index, index + 2)) + index += 2 + } + + // Read size (3 bytes) + const size = Bytes.toNumber(signature.slice(index, index + 3)) + index += 3 + + // Read the nested tree + const nestedTree = signature.slice(index, index + size) + index += size + + const { nodes, leftover } = parseBranch(nestedTree) + if (leftover.length > 0) { + throw new Error('Leftover bytes in nested tree') + } + + const subTree = foldNodes(nodes) + nodes.push({ + tree: subTree, + weight: BigInt(weight), + threshold: BigInt(threshold), + } as RawNestedLeaf) + continue + } + + // Subdigest 0x06 + if (flag === 0x06) { + const hardcoded = signature.slice(index, index + 32) + index += 32 + + nodes.push({ + digest: hardcoded, + } as SubdigestLeaf) + continue + } + + // Signature Sapient signer (0x09) or Sapient compact (0x0a) + if (flag === 0x09 || flag === 0x0a) { + let addrWeight = firstByte & 0x03 + if (addrWeight === 0) { + addrWeight = signature[index] + index++ + } + + const address = signature.slice(index, index + 20) + index += 20 + + // Read signature size + const sizeSize = (firstByte & 0x0c) >> 2 + const size = Bytes.toNumber(signature.slice(index, index + sizeSize)) + index += sizeSize + + const subSignature = signature.slice(index, index + size) + index += size + + nodes.push({ + weight: BigInt(addrWeight), + signature: { + address: Bytes.toHex(address), + data: subSignature, + type: flag === 0x09 ? 'sapient' : 'sapient_compact', + }, + } as RawSignerLeaf) + continue + } + + throw new Error(`Invalid signature flag: ${flag}`) + } + + return { nodes, leftover: signature.slice(index) } +} + +function foldNodes(nodes: RawTopology[]): RawTopology { + if (nodes.length === 0) { + throw new Error('Empty signature tree') + } + + if (nodes.length === 1) { + return nodes[0] + } + + let tree = nodes[0] + + for (let i = 1; i < nodes.length; i++) { + tree = { left: tree, right: nodes[i] } + } + + return tree +} diff --git a/packages/primitives/src/utils.ts b/packages/primitives/src/utils.ts new file mode 100644 index 000000000..71a342931 --- /dev/null +++ b/packages/primitives/src/utils.ts @@ -0,0 +1,3 @@ +export function minBytesFor(val: bigint): number { + return Math.ceil(val.toString(16).length / 2) +} diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 95f1e3488..f60df16d7 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -136,6 +136,10 @@ importers: version: 8.15.0(eslint@9.15.0)(typescript@5.5.4) packages/primitives: + dependencies: + ox: + specifier: ^0.6.7 + version: 0.6.7(typescript@5.7.3) devDependencies: '@repo/typescript-config': specifier: workspace:^ @@ -179,6 +183,9 @@ importers: packages: + '@adraffy/ens-normalize@1.11.0': + resolution: {integrity: sha512-/3DDPKHqqIqxUULp8yP4zODUY1i+2xvVWsv8A79xGWdCAG+8sb0hRh0Rk2QyOJUnnbyPUAZYcpBuRe3nS2OIUg==} + '@babel/runtime-corejs3@7.26.0': resolution: {integrity: sha512-YXHu5lN8kJCb1LOb9PgV6pvak43X2h4HvRApcN5SdWeaItQOzfn1hgP6jasD6KWQyJDBxrVmA9o9OivlnNJK/w==} engines: {node: '>=6.9.0'} @@ -417,6 +424,14 @@ packages: cpu: [x64] os: [win32] + '@noble/curves@1.8.1': + resolution: {integrity: sha512-warwspo+UYUPep0Q+vtdVB4Ugn8GGQj8iyB3gnRWsztmUHTI3S1nhdiWNsPUGL0vud7JlRRk1XEu7Lq1KGTnMQ==} + engines: {node: ^14.21.3 || >=16} + + '@noble/hashes@1.7.1': + resolution: {integrity: sha512-B8XBPsn4vT/KJAGqDzbwztd+6Yte3P4V7iafm24bxgDe/mlRuK6xmWPuCNrKt2vDafZ8MfJLlchDG/vYafQEjQ==} + engines: {node: ^14.21.3 || >=16} + '@nodelib/fs.scandir@2.1.5': resolution: {integrity: sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==} engines: {node: '>= 8'} @@ -429,6 +444,15 @@ packages: resolution: {integrity: sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==} engines: {node: '>= 8'} + '@scure/base@1.2.4': + resolution: {integrity: sha512-5Yy9czTO47mqz+/J8GM6GIId4umdCk1wc1q8rKERQulIoc8VP9pzDcghv10Tl2E7R96ZUx/PhND3ESYUQX8NuQ==} + + '@scure/bip32@1.6.2': + resolution: {integrity: sha512-t96EPDMbtGgtb7onKKqxRLfE5g05k7uHnHRM2xdE6BP/ZmxaLtPek4J4KfVn/90IQNrU1IOAqMgiDtUdtbe3nw==} + + '@scure/bip39@1.5.4': + resolution: {integrity: sha512-TFM4ni0vKvCfBpohoh+/lY05i9gRbSwXWngAsF4CABQxoaOHijxuaZ2R6cStDQ5CHtHO9aGJTr4ksVJASRRyMA==} + '@swc/counter@0.1.3': resolution: {integrity: sha512-e2BR4lsJkkRlKZ/qCHPw9ZaSxc0MVUd7gtbtaB7aMvHeJVYe8sOB8DBZkP2DtISHGSku9sCK6T6cnY0CtXrOCQ==} @@ -557,6 +581,17 @@ packages: resolution: {integrity: sha512-h8vYOulWec9LhpwfAdZf2bjr8xIp0KNKnpgqSz0qqYYKAW/QZKw3ktRndbiAtUz4acH4QLQavwZBYCc0wulA/Q==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + abitype@1.0.8: + resolution: {integrity: sha512-ZeiI6h3GnW06uYDLx0etQtX/p8E24UaHHBj57RSjK7YBFe7iuVn07EDpOeP451D06sF27VOz9JJPlIKJmXgkEg==} + peerDependencies: + typescript: '>=5.0.4' + zod: ^3 >=3.22.0 + peerDependenciesMeta: + typescript: + optional: true + zod: + optional: true + acorn-jsx@5.3.2: resolution: {integrity: sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==} peerDependencies: @@ -964,6 +999,9 @@ packages: resolution: {integrity: sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==} engines: {node: '>=0.10.0'} + eventemitter3@5.0.1: + resolution: {integrity: sha512-GWkBvjiSZK87ELrYOSESUYeVIc9mvLLf/nXalMOS5dYrgZq9o5OVkbZAVM06CVxYsCwH9BDZFPlQTlPA1j4ahA==} + execa@5.1.1: resolution: {integrity: sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg==} engines: {node: '>=10'} @@ -1536,6 +1574,14 @@ packages: resolution: {integrity: sha512-D2FR03Vir7FIu45XBY20mTb+/ZSWB00sjU9jdQXt83gDrI4Ztz5Fs7/yy74g2N5SVQY4xY1qDr4rNddwYRVX0g==} engines: {node: '>=0.10.0'} + ox@0.6.7: + resolution: {integrity: sha512-17Gk/eFsFRAZ80p5eKqv89a57uXjd3NgIf1CaXojATPBuujVc/fQSVhBeAU9JCRB+k7J50WQAyWTxK19T9GgbA==} + peerDependencies: + typescript: '>=5.4.0' + peerDependenciesMeta: + typescript: + optional: true + p-limit@3.1.0: resolution: {integrity: sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==} engines: {node: '>=10'} @@ -2065,6 +2111,8 @@ packages: snapshots: + '@adraffy/ens-normalize@1.11.0': {} + '@babel/runtime-corejs3@7.26.0': dependencies: core-js-pure: 3.39.0 @@ -2247,6 +2295,12 @@ snapshots: '@next/swc-win32-x64-msvc@15.1.0': optional: true + '@noble/curves@1.8.1': + dependencies: + '@noble/hashes': 1.7.1 + + '@noble/hashes@1.7.1': {} + '@nodelib/fs.scandir@2.1.5': dependencies: '@nodelib/fs.stat': 2.0.5 @@ -2259,6 +2313,19 @@ snapshots: '@nodelib/fs.scandir': 2.1.5 fastq: 1.17.1 + '@scure/base@1.2.4': {} + + '@scure/bip32@1.6.2': + dependencies: + '@noble/curves': 1.8.1 + '@noble/hashes': 1.7.1 + '@scure/base': 1.2.4 + + '@scure/bip39@1.5.4': + dependencies: + '@noble/hashes': 1.7.1 + '@scure/base': 1.2.4 + '@swc/counter@0.1.3': {} '@swc/helpers@0.5.15': @@ -2438,6 +2505,10 @@ snapshots: '@typescript-eslint/types': 8.15.0 eslint-visitor-keys: 4.2.0 + abitype@1.0.8(typescript@5.7.3): + optionalDependencies: + typescript: 5.7.3 + acorn-jsx@5.3.2(acorn@8.14.0): dependencies: acorn: 8.14.0 @@ -2991,6 +3062,8 @@ snapshots: esutils@2.0.3: {} + eventemitter3@5.0.1: {} + execa@5.1.1: dependencies: cross-spawn: 7.0.6 @@ -3640,6 +3713,20 @@ snapshots: os-tmpdir@1.0.2: {} + ox@0.6.7(typescript@5.7.3): + dependencies: + '@adraffy/ens-normalize': 1.11.0 + '@noble/curves': 1.8.1 + '@noble/hashes': 1.7.1 + '@scure/bip32': 1.6.2 + '@scure/bip39': 1.5.4 + abitype: 1.0.8(typescript@5.7.3) + eventemitter3: 5.0.1 + optionalDependencies: + typescript: 5.7.3 + transitivePeerDependencies: + - zod + p-limit@3.1.0: dependencies: yocto-queue: 0.1.0 From d8f8415a4c08125b3e452c748afb5fd25aeafc26 Mon Sep 17 00:00:00 2001 From: William Hua Date: Tue, 21 Jan 2025 12:32:08 +0100 Subject: [PATCH 018/439] README.md --- README.md | 86 +++---------------------------------------------------- 1 file changed, 4 insertions(+), 82 deletions(-) diff --git a/README.md b/README.md index 4b760734c..6288b99ee 100644 --- a/README.md +++ b/README.md @@ -1,84 +1,6 @@ -# Turborepo starter +# sequence-core -This Turborepo starter is maintained by the Turborepo core team. +## packages -## Using this example - -Run the following command: - -```sh -npx create-turbo@latest -``` - -## What's inside? - -This Turborepo includes the following packages/apps: - -### Apps and Packages - -- `docs`: a [Next.js](https://nextjs.org/) app -- `web`: another [Next.js](https://nextjs.org/) app -- `@repo/ui`: a stub React component library shared by both `web` and `docs` applications -- `@repo/eslint-config`: `eslint` configurations (includes `eslint-config-next` and `eslint-config-prettier`) -- `@repo/typescript-config`: `tsconfig.json`s used throughout the monorepo - -Each package/app is 100% [TypeScript](https://www.typescriptlang.org/). - -### Utilities - -This Turborepo has some additional tools already setup for you: - -- [TypeScript](https://www.typescriptlang.org/) for static type checking -- [ESLint](https://eslint.org/) for code linting -- [Prettier](https://prettier.io) for code formatting - -### Build - -To build all apps and packages, run the following command: - -``` -cd my-turborepo -pnpm build -``` - -### Develop - -To develop all apps and packages, run the following command: - -``` -cd my-turborepo -pnpm dev -``` - -### Remote Caching - -> [!TIP] -> Vercel Remote Cache is free for all plans. Get started today at [vercel.com](https://vercel.com/signup?/signup?utm_source=remote-cache-sdk&utm_campaign=free_remote_cache). - -Turborepo can use a technique known as [Remote Caching](https://turbo.build/repo/docs/core-concepts/remote-caching) to share cache artifacts across machines, enabling you to share build caches with your team and CI/CD pipelines. - -By default, Turborepo will cache locally. To enable Remote Caching you will need an account with Vercel. If you don't have an account you can [create one](https://vercel.com/signup?utm_source=turborepo-examples), then enter the following commands: - -``` -cd my-turborepo -npx turbo login -``` - -This will authenticate the Turborepo CLI with your [Vercel account](https://vercel.com/docs/concepts/personal-accounts/overview). - -Next, you can link your Turborepo to your Remote Cache by running the following command from the root of your Turborepo: - -``` -npx turbo link -``` - -## Useful Links - -Learn more about the power of Turborepo: - -- [Tasks](https://turbo.build/repo/docs/core-concepts/monorepos/running-tasks) -- [Caching](https://turbo.build/repo/docs/core-concepts/caching) -- [Remote Caching](https://turbo.build/repo/docs/core-concepts/remote-caching) -- [Filtering](https://turbo.build/repo/docs/core-concepts/monorepos/filtering) -- [Configuration Options](https://turbo.build/repo/docs/reference/configuration) -- [CLI Usage](https://turbo.build/repo/docs/reference/command-line-reference) +- @0xsequence/primitives: stateless low-level utilities specifically for interacting directly with sequence wallet's smart contracts +- @0xsequence/core: higher level utilities for creating and using sequence wallets From 64e76129c677130ec6a825babdcb76f69f2e4379 Mon Sep 17 00:00:00 2001 From: William Hua Date: Tue, 21 Jan 2025 12:32:56 +0100 Subject: [PATCH 019/439] README.md: package names --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 6288b99ee..d2b1a270b 100644 --- a/README.md +++ b/README.md @@ -2,5 +2,5 @@ ## packages -- @0xsequence/primitives: stateless low-level utilities specifically for interacting directly with sequence wallet's smart contracts -- @0xsequence/core: higher level utilities for creating and using sequence wallets +- @0xsequence/sequence-primitives: stateless low-level utilities specifically for interacting directly with sequence wallet's smart contracts +- @0xsequence/sequence-core: higher level utilities for creating and using sequence wallets From ebaec22bbd93428b8e372728687fd1d400a3d554 Mon Sep 17 00:00:00 2001 From: Agusx1211 Date: Tue, 21 Jan 2025 11:33:49 +0000 Subject: [PATCH 020/439] Check bounds on signature --- packages/primitives/src/signature.ts | 200 +++++++++++++++++---------- 1 file changed, 130 insertions(+), 70 deletions(-) diff --git a/packages/primitives/src/signature.ts b/packages/primitives/src/signature.ts index a60c84b2d..f36df3505 100644 --- a/packages/primitives/src/signature.ts +++ b/packages/primitives/src/signature.ts @@ -97,46 +97,57 @@ export function isSignedSapientLeaf(cand: any): cand is SignedSapientLeaf { } export function decodeSignature(signature: Uint8Array): RawSignature { - const flag = signature[0] + if (signature.length < 1) { + throw new Error('Signature is empty') + } + + // First byte is the "flag" + const flag = signature[0]! + let index = 1 // Chained signature if ((flag & 0x01) === 0x01) { throw new Error('TODO') } - let index = 1 + const noChainId = (flag & 0x02) === 0x02 - // Normal signature - let noChainId = (flag & 0x02) === 0x02 - - // Checkpoint size - let checkpointSize = (flag & 0x1c) >> 2 - - // Read the next `checkpointSize` bytes as the checkpoint + // Checkpoint size is bits [2..4] of flag -> (flag & 0x1c) >> 2 + const checkpointSize = (flag & 0x1c) >> 2 + if (index + checkpointSize > signature.length) { + throw new Error('Not enough bytes for checkpoint') + } const checkpoint = Bytes.toBigInt(signature.slice(index, index + checkpointSize)) index += checkpointSize - // Read the next `thresholdSize` bytes as the threshold + // Threshold size is bits [5..5] of flag -> ((flag & 0x20) >> 5) + 1 const thresholdSize = ((flag & 0x20) >> 5) + 1 + if (index + thresholdSize > signature.length) { + throw new Error('Not enough bytes for threshold') + } const threshold = Bytes.toBigInt(signature.slice(index, index + thresholdSize)) index += thresholdSize let checkpointerAddress: `0x${string}` | undefined let checkpointerData: Uint8Array | undefined - // Read the checkpointer + // Checkpointer is bit [6] of flag -> if set, read address + data if ((flag & 0x40) === 0x40) { - // Read the checkpointer address - checkpointerAddress = Bytes.toHex(signature.slice(index, index + 20)) + if (index + 20 > signature.length) { + throw new Error('Not enough bytes for checkpointer address') + } + checkpointerAddress = Bytes.toHex(signature.slice(index, index + 20)) as `0x${string}` index += 20 - // Read the checkpointer data size + // We reuse the bits [2..4] again for data size, or any scheme you use const checkpointerDataSize = (flag & 0x1c) >> 2 + if (index + checkpointerDataSize > signature.length) { + throw new Error('Not enough bytes for checkpointer data') + } checkpointerData = signature.slice(index, index + checkpointerDataSize) index += checkpointerDataSize } - // Parse rest of the signature const { nodes, leftover } = parseBranch(signature.slice(index)) if (leftover.length !== 0) { throw new Error('Leftover bytes in signature') @@ -159,31 +170,39 @@ export function decodeSignature(signature: Uint8Array): RawSignature { export function parseBranch(signature: Uint8Array): { nodes: RawTopology[]; leftover: Uint8Array } { const nodes: RawTopology[] = [] let index = 0 - let weightSum = 0n while (index < signature.length) { - const firstByte = signature[index] + if (index >= signature.length) { + throw new Error('Unexpected end of signature while parsing branch') + } + const firstByte = signature[index]! index++ const flag = (firstByte & 0xf0) >> 4 - // Signature hash (0x00) + // Signature hash or eth_sign (0x00 or 0x07) if (flag === 0x00 || flag === 0x07) { - const v = (firstByte & 0x10) >> (4 + 27) - let weight = firstByte & 0x07 - if (weight === 0) { - weight = signature[index] + // v is typically 27 or 28, but in your code you do shifts. Adjust accordingly + const v = ((firstByte & 0x10) >> 4) + 27 + + let weight = BigInt(firstByte & 0x07) + if (weight === 0n) { + if (index >= signature.length) { + throw new Error('Not enough bytes for weight') + } + weight = BigInt(signature[index]!) index++ } + if (index + 64 > signature.length) { + throw new Error('Not enough bytes for r,s') + } const r = signature.slice(index, index + 32) const s = signature.slice(index + 32, index + 64) index += 64 - weightSum += BigInt(weight) - nodes.push({ - weight: BigInt(weight), + weight, signature: { r, s, @@ -196,17 +215,23 @@ export function parseBranch(signature: Uint8Array): { nodes: RawTopology[]; left // Address (0x01) if (flag === 0x01) { - let weight = firstByte & 0x0f - if (weight === 0) { - weight = signature[index] + let weight = BigInt(firstByte & 0x0f) + if (weight === 0n) { + if (index >= signature.length) { + throw new Error('Not enough bytes for address weight') + } + weight = BigInt(signature[index]!) index++ } + if (index + 20 > signature.length) { + throw new Error('Not enough bytes for address') + } const address = signature.slice(index, index + 20) index += 20 nodes.push({ - weight: BigInt(weight), + weight, address: Bytes.toHex(address), } as SignerLeaf) continue @@ -214,26 +239,36 @@ export function parseBranch(signature: Uint8Array): { nodes: RawTopology[]; left // Signature ERC1271 (0x02) if (flag === 0x02) { - let weight = firstByte & 0x03 - if (weight === 0) { - weight = signature[index] + let weight = BigInt(firstByte & 0x03) + if (weight === 0n) { + if (index >= signature.length) { + throw new Error('Not enough bytes for ERC1271 weight') + } + weight = BigInt(signature[index]!) index++ } - // Read signer + if (index + 20 > signature.length) { + throw new Error('Not enough bytes for ERC1271 signer') + } const signer = signature.slice(index, index + 20) index += 20 - // Read signature size const sizeSize = (firstByte & 0x0c) >> 2 + if (index + sizeSize > signature.length) { + throw new Error('Not enough bytes for ERC1271 signature size') + } const size = Bytes.toNumber(signature.slice(index, index + sizeSize)) index += sizeSize + if (index + size > signature.length) { + throw new Error('Not enough bytes for ERC1271 sub-signature') + } const subSignature = signature.slice(index, index + size) index += size nodes.push({ - weight: BigInt(weight), + weight, signature: { address: Bytes.toHex(signer), data: subSignature, @@ -245,7 +280,9 @@ export function parseBranch(signature: Uint8Array): { nodes: RawTopology[]; left // Node (0x03) if (flag === 0x03) { - // Read only the node hash + if (index + 32 > signature.length) { + throw new Error('Not enough bytes for node hash') + } const node = signature.slice(index, index + 32) index += 32 @@ -257,66 +294,80 @@ export function parseBranch(signature: Uint8Array): { nodes: RawTopology[]; left // Branch (0x04) if (flag === 0x04) { - // Read size of the branch const sizeSize = firstByte & 0x0f + if (index + sizeSize > signature.length) { + throw new Error('Not enough bytes for branch size') + } const size = Bytes.toNumber(signature.slice(index, index + sizeSize)) index += sizeSize - // Enter a branch of the signature merkle tree + if (index + size > signature.length) { + throw new Error('Not enough bytes for branch data') + } const branchBytes = signature.slice(index, index + size) index += size - const { nodes, leftover } = parseBranch(branchBytes) + const { nodes: subNodes, leftover } = parseBranch(branchBytes) if (leftover.length > 0) { - throw new Error('Leftover bytes in branch') + throw new Error('Leftover bytes in sub-branch') } - const subTree = foldNodes(nodes) + const subTree = foldNodes(subNodes) nodes.push(subTree) continue } // Nested (0x05) if (flag === 0x05) { - // Read external weight - let weight = firstByte & 0x03 - if (weight === 0) { - weight = signature[index] + let weight = BigInt(firstByte & 0x03) + if (weight === 0n) { + if (index >= signature.length) { + throw new Error('Not enough bytes for nested weight') + } + weight = BigInt(signature[index]!) index++ } - // Read internal threshold - let threshold = (firstByte & 0x0c) >> 2 - if (threshold === 0) { - // Read 2 bytes - threshold = Bytes.toNumber(signature.slice(index, index + 2)) + let threshold = BigInt((firstByte & 0x0c) >> 2) + if (threshold === 0n) { + if (index + 2 > signature.length) { + throw new Error('Not enough bytes for nested threshold') + } + threshold = BigInt(Bytes.toNumber(signature.slice(index, index + 2))) index += 2 } - // Read size (3 bytes) + if (index + 3 > signature.length) { + throw new Error('Not enough bytes for nested size') + } const size = Bytes.toNumber(signature.slice(index, index + 3)) index += 3 - // Read the nested tree + if (index + size > signature.length) { + throw new Error('Not enough bytes for nested sub-tree') + } const nestedTree = signature.slice(index, index + size) index += size - const { nodes, leftover } = parseBranch(nestedTree) + const { nodes: subNodes, leftover } = parseBranch(nestedTree) if (leftover.length > 0) { - throw new Error('Leftover bytes in nested tree') + throw new Error('Leftover bytes in nested sub-tree') } - const subTree = foldNodes(nodes) + const subTree = foldNodes(subNodes) nodes.push({ tree: subTree, - weight: BigInt(weight), - threshold: BigInt(threshold), + weight, + threshold, } as RawNestedLeaf) continue } - // Subdigest 0x06 + // Subdigest (0x06) if (flag === 0x06) { + if (index + 32 > signature.length) { + throw new Error('Not enough bytes for subdigest') + } const hardcoded = signature.slice(index, index + 32) index += 32 @@ -326,27 +377,38 @@ export function parseBranch(signature: Uint8Array): { nodes: RawTopology[]; left continue } - // Signature Sapient signer (0x09) or Sapient compact (0x0a) + // Sapient or Sapient compact (0x09 or 0x0a) if (flag === 0x09 || flag === 0x0a) { - let addrWeight = firstByte & 0x03 - if (addrWeight === 0) { - addrWeight = signature[index] + let addrWeight = BigInt(firstByte & 0x03) + if (addrWeight === 0n) { + if (index >= signature.length) { + throw new Error('Not enough bytes for sapient weight') + } + addrWeight = BigInt(signature[index]!) index++ } + if (index + 20 > signature.length) { + throw new Error('Not enough bytes for sapient address') + } const address = signature.slice(index, index + 20) index += 20 - // Read signature size const sizeSize = (firstByte & 0x0c) >> 2 + if (index + sizeSize > signature.length) { + throw new Error('Not enough bytes for sapient signature size') + } const size = Bytes.toNumber(signature.slice(index, index + sizeSize)) index += sizeSize + if (index + size > signature.length) { + throw new Error('Not enough bytes for sapient sub-signature') + } const subSignature = signature.slice(index, index + size) index += size nodes.push({ - weight: BigInt(addrWeight), + weight: addrWeight, signature: { address: Bytes.toHex(address), data: subSignature, @@ -356,7 +418,7 @@ export function parseBranch(signature: Uint8Array): { nodes: RawTopology[]; left continue } - throw new Error(`Invalid signature flag: ${flag}`) + throw new Error(`Invalid signature flag: 0x${flag.toString(16)}`) } return { nodes, leftover: signature.slice(index) } @@ -368,14 +430,12 @@ function foldNodes(nodes: RawTopology[]): RawTopology { } if (nodes.length === 1) { - return nodes[0] + return nodes[0]! } - let tree = nodes[0] - + let tree: RawTopology = nodes[0]! for (let i = 1; i < nodes.length; i++) { - tree = { left: tree, right: nodes[i] } + tree = { left: tree, right: nodes[i]! } } - return tree } From 17c1e84a03d7419c9db7feaf337692fd3dbc5737 Mon Sep 17 00:00:00 2001 From: William Hua Date: Tue, 21 Jan 2025 12:34:02 +0100 Subject: [PATCH 021/439] README.md: package name backticks --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index d2b1a270b..5b5bd12d3 100644 --- a/README.md +++ b/README.md @@ -2,5 +2,5 @@ ## packages -- @0xsequence/sequence-primitives: stateless low-level utilities specifically for interacting directly with sequence wallet's smart contracts -- @0xsequence/sequence-core: higher level utilities for creating and using sequence wallets +- `@0xsequence/sequence-primitives`: stateless low-level utilities specifically for interacting directly with sequence wallet's smart contracts +- `@0xsequence/sequence-core`: higher level utilities for creating and using sequence wallets From 2dfd497943d8735fb457a88a8f56e172d64a2efa Mon Sep 17 00:00:00 2001 From: William Hua Date: Tue, 21 Jan 2025 12:57:08 +0100 Subject: [PATCH 022/439] wdk: wallet development kit --- README.md | 1 + packages/wdk/package.json | 20 ++++++++++++++++++++ packages/wdk/src/index.ts | 0 packages/wdk/tsconfig.json | 9 +++++++++ pnpm-lock.yaml | 13 +++++++++++++ 5 files changed, 43 insertions(+) create mode 100644 packages/wdk/package.json create mode 100644 packages/wdk/src/index.ts create mode 100644 packages/wdk/tsconfig.json diff --git a/README.md b/README.md index 5b5bd12d3..866a510f6 100644 --- a/README.md +++ b/README.md @@ -4,3 +4,4 @@ - `@0xsequence/sequence-primitives`: stateless low-level utilities specifically for interacting directly with sequence wallet's smart contracts - `@0xsequence/sequence-core`: higher level utilities for creating and using sequence wallets +- `@0xsequence/sequence-wdk`: all-in-one wallet development kit for building a wallet product diff --git a/packages/wdk/package.json b/packages/wdk/package.json new file mode 100644 index 000000000..303a90347 --- /dev/null +++ b/packages/wdk/package.json @@ -0,0 +1,20 @@ +{ + "name": "@0xsequence/sequence-wdk", + "scripts": { + "build": "tsc", + "dev": "tsc --watch" + }, + "exports": { + ".": { + "types": "./src/index.ts", + "default": "./dist/index.js" + } + }, + "devDependencies": { + "@repo/typescript-config": "workspace:^", + "typescript": "^5.7.3" + }, + "dependencies": { + "@0xsequence/sequence-core": "workspace:^" + } +} diff --git a/packages/wdk/src/index.ts b/packages/wdk/src/index.ts new file mode 100644 index 000000000..e69de29bb diff --git a/packages/wdk/tsconfig.json b/packages/wdk/tsconfig.json new file mode 100644 index 000000000..e502f58f4 --- /dev/null +++ b/packages/wdk/tsconfig.json @@ -0,0 +1,9 @@ +{ + "extends": "@repo/typescript-config/base.json", + "compilerOptions": { + "rootDir": "src", + "outDir": "dist" + }, + "include": ["src"], + "exclude": ["node_modules", "dist"] +} diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index f60df16d7..c47967f5b 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -181,6 +181,19 @@ importers: specifier: 5.5.4 version: 5.5.4 + packages/wdk: + dependencies: + '@0xsequence/sequence-core': + specifier: workspace:^ + version: link:../core + devDependencies: + '@repo/typescript-config': + specifier: workspace:^ + version: link:../typescript-config + typescript: + specifier: ^5.7.3 + version: 5.7.3 + packages: '@adraffy/ens-normalize@1.11.0': From 954ab74c6f0565b1c647b0e1e5705a3b7ccf4eb8 Mon Sep 17 00:00:00 2001 From: Agusx1211 Date: Tue, 21 Jan 2025 11:58:28 +0000 Subject: [PATCH 023/439] Payload encode fix --- packages/primitives/src/payload.ts | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/packages/primitives/src/payload.ts b/packages/primitives/src/payload.ts index d827228e4..0720fe462 100644 --- a/packages/primitives/src/payload.ts +++ b/packages/primitives/src/payload.ts @@ -220,9 +220,7 @@ export function encode(payload: CallPayload, self?: `0x${string}`): Uint8Array { throw new Error('Data too large') } out.push((dataLen >> 16) & 0xff, (dataLen >> 8) & 0xff, dataLen & 0xff) - for (let i = 0; i < dataLen; i++) { - out.push(call.data[i]) - } + out.push(...call.data) } // If bit3 is set, store 32 bytes of gasLimit From a93dd5ffb97e9a2205f0dca69cec2a864ff011db Mon Sep 17 00:00:00 2001 From: William Hua Date: Tue, 21 Jan 2025 13:01:15 +0100 Subject: [PATCH 024/439] README.md: sequence-wdk description --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 866a510f6..cbf76ae53 100644 --- a/README.md +++ b/README.md @@ -4,4 +4,4 @@ - `@0xsequence/sequence-primitives`: stateless low-level utilities specifically for interacting directly with sequence wallet's smart contracts - `@0xsequence/sequence-core`: higher level utilities for creating and using sequence wallets -- `@0xsequence/sequence-wdk`: all-in-one wallet development kit for building a wallet product +- `@0xsequence/sequence-wdk`: all-in-one wallet development kit for building a sequence wallet product From 05048574b63d42bd659b87ba17b329eef6408bb1 Mon Sep 17 00:00:00 2001 From: Agusx1211 Date: Tue, 21 Jan 2025 14:05:02 +0000 Subject: [PATCH 025/439] Use touples for node and nodeHash --- packages/primitives/src/config.ts | 39 +++++++++++++++------------- packages/primitives/src/signature.ts | 31 ++++++++-------------- 2 files changed, 32 insertions(+), 38 deletions(-) diff --git a/packages/primitives/src/config.ts b/packages/primitives/src/config.ts index a9b9c7446..ab3612c56 100644 --- a/packages/primitives/src/config.ts +++ b/packages/primitives/src/config.ts @@ -1,8 +1,5 @@ import { Bytes, Hash, Hex } from 'ox' -/** - * Types for the topology of the tree - */ export type SignerLeaf = { address: `0x${string}` weight: bigint @@ -24,16 +21,11 @@ export type NestedLeaf = { threshold: bigint } -export type NodeLeaf = { - nodeHash: Uint8Array -} +export type NodeLeaf = Uint8Array -export type Leaf = SignerLeaf | SubdigestLeaf | NodeLeaf | NestedLeaf | SapientSigner +export type Node = [Topology, Topology] -export type Node = { - left: Topology - right: Topology -} +export type Leaf = SignerLeaf | SubdigestLeaf | NodeLeaf | NestedLeaf | SapientSigner export type Topology = Node | Leaf @@ -45,7 +37,7 @@ export type Configuration = { } export function isSignerLeaf(cand: Topology): cand is SignerLeaf { - return typeof cand === 'object' && 'address' in cand && 'weight' in cand + return typeof cand === 'object' && 'address' in cand && 'weight' in cand && !('imageHash' in cand) } export function isSapientSigner(cand: Topology): cand is SapientSigner { @@ -57,15 +49,26 @@ export function isSubdigestLeaf(cand: Topology): cand is SubdigestLeaf { } export function isNodeLeaf(cand: Topology): cand is NodeLeaf { - return typeof cand === 'object' && 'nodeHash' in cand + return cand instanceof Uint8Array && cand.length === 32 } export function isNestedLeaf(cand: Topology): cand is NestedLeaf { - return typeof cand === 'object' && 'tree' in cand && 'weight' in cand && 'threshold' in cand + return ( + typeof cand === 'object' && + !Array.isArray(cand) && + 'tree' in cand && + 'weight' in cand && + 'threshold' in cand + ) } export function isNode(cand: Topology): cand is Node { - return typeof cand === 'object' && 'left' in cand && 'right' in cand + return ( + Array.isArray(cand) && + cand.length === 2 && + isLeaf(cand[0]) && + isLeaf(cand[1]) + ) } export function isConfiguration(cand: any): cand is Configuration { @@ -84,7 +87,7 @@ export function isLeaf(cand: Topology): cand is Leaf { ) } -function hashConfiguration(topology: Topology | Configuration): Uint8Array { +export function hashConfiguration(topology: Topology | Configuration): Uint8Array { if (isConfiguration(topology)) { let root = hashConfiguration(topology.topology) root = Hash.keccak256(Bytes.concat(root, Bytes.fromNumber(topology.threshold))) @@ -122,7 +125,7 @@ function hashConfiguration(topology: Topology | Configuration): Uint8Array { } if (isNodeLeaf(topology)) { - return topology.nodeHash + return topology } if (isNestedLeaf(topology)) { @@ -138,7 +141,7 @@ function hashConfiguration(topology: Topology | Configuration): Uint8Array { if (isNode(topology)) { return Hash.keccak256( - Bytes.concat(hashConfiguration(topology.left), hashConfiguration(topology.right)) + Bytes.concat(hashConfiguration(topology[0]), hashConfiguration(topology[1])) ) } diff --git a/packages/primitives/src/signature.ts b/packages/primitives/src/signature.ts index f36df3505..1d0296e04 100644 --- a/packages/primitives/src/signature.ts +++ b/packages/primitives/src/signature.ts @@ -60,10 +60,7 @@ export type RawNestedLeaf = { export type RawLeaf = Leaf | RawSignerLeaf | RawNestedLeaf -export type RawNode = { - left: RawTopology - right: RawTopology -} +export type RawNode = [RawTopology, RawTopology] export type RawTopology = RawNode | RawLeaf @@ -101,18 +98,17 @@ export function decodeSignature(signature: Uint8Array): RawSignature { throw new Error('Signature is empty') } - // First byte is the "flag" const flag = signature[0]! let index = 1 - // Chained signature + // If bit 0 is set => chained signature (not implemented here) if ((flag & 0x01) === 0x01) { throw new Error('TODO') } const noChainId = (flag & 0x02) === 0x02 - // Checkpoint size is bits [2..4] of flag -> (flag & 0x1c) >> 2 + // bits [2..4] => checkpoint size const checkpointSize = (flag & 0x1c) >> 2 if (index + checkpointSize > signature.length) { throw new Error('Not enough bytes for checkpoint') @@ -120,7 +116,7 @@ export function decodeSignature(signature: Uint8Array): RawSignature { const checkpoint = Bytes.toBigInt(signature.slice(index, index + checkpointSize)) index += checkpointSize - // Threshold size is bits [5..5] of flag -> ((flag & 0x20) >> 5) + 1 + // bit [5] => threshold size offset const thresholdSize = ((flag & 0x20) >> 5) + 1 if (index + thresholdSize > signature.length) { throw new Error('Not enough bytes for threshold') @@ -131,7 +127,7 @@ export function decodeSignature(signature: Uint8Array): RawSignature { let checkpointerAddress: `0x${string}` | undefined let checkpointerData: Uint8Array | undefined - // Checkpointer is bit [6] of flag -> if set, read address + data + // bit [6] => checkpointer address + data if ((flag & 0x40) === 0x40) { if (index + 20 > signature.length) { throw new Error('Not enough bytes for checkpointer address') @@ -139,7 +135,6 @@ export function decodeSignature(signature: Uint8Array): RawSignature { checkpointerAddress = Bytes.toHex(signature.slice(index, index + 20)) as `0x${string}` index += 20 - // We reuse the bits [2..4] again for data size, or any scheme you use const checkpointerDataSize = (flag & 0x1c) >> 2 if (index + checkpointerDataSize > signature.length) { throw new Error('Not enough bytes for checkpointer data') @@ -180,11 +175,9 @@ export function parseBranch(signature: Uint8Array): { nodes: RawTopology[]; left const flag = (firstByte & 0xf0) >> 4 - // Signature hash or eth_sign (0x00 or 0x07) + // 'hash' or 'eth_sign' (0x00 or 0x07) if (flag === 0x00 || flag === 0x07) { - // v is typically 27 or 28, but in your code you do shifts. Adjust accordingly const v = ((firstByte & 0x10) >> 4) + 27 - let weight = BigInt(firstByte & 0x07) if (weight === 0n) { if (index >= signature.length) { @@ -237,7 +230,7 @@ export function parseBranch(signature: Uint8Array): { nodes: RawTopology[]; left continue } - // Signature ERC1271 (0x02) + // ERC1271 (0x02) if (flag === 0x02) { let weight = BigInt(firstByte & 0x03) if (weight === 0n) { @@ -256,7 +249,7 @@ export function parseBranch(signature: Uint8Array): { nodes: RawTopology[]; left const sizeSize = (firstByte & 0x0c) >> 2 if (index + sizeSize > signature.length) { - throw new Error('Not enough bytes for ERC1271 signature size') + throw new Error('Not enough bytes for ERC1271 size') } const size = Bytes.toNumber(signature.slice(index, index + sizeSize)) index += sizeSize @@ -278,7 +271,7 @@ export function parseBranch(signature: Uint8Array): { nodes: RawTopology[]; left continue } - // Node (0x03) + // Node leaf (0x03) => nodeHash if (flag === 0x03) { if (index + 32 > signature.length) { throw new Error('Not enough bytes for node hash') @@ -286,9 +279,7 @@ export function parseBranch(signature: Uint8Array): { nodes: RawTopology[]; left const node = signature.slice(index, index + 32) index += 32 - nodes.push({ - nodeHash: node, - } as NodeLeaf) + nodes.push(node) continue } @@ -435,7 +426,7 @@ function foldNodes(nodes: RawTopology[]): RawTopology { let tree: RawTopology = nodes[0]! for (let i = 1; i < nodes.length; i++) { - tree = { left: tree, right: nodes[i]! } + tree = [tree, nodes[i]!] as RawNode } return tree } From bb14c8ae0f14fbe2d25fc8317d38d682d103bdf0 Mon Sep 17 00:00:00 2001 From: William Hua Date: Tue, 21 Jan 2025 14:49:22 +0100 Subject: [PATCH 026/439] pnpm add -Dw @changesets/cli --- package.json | 1 + pnpm-lock.yaml | 491 +++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 492 insertions(+) diff --git a/package.json b/package.json index 219c00c1b..7eff35a40 100644 --- a/package.json +++ b/package.json @@ -8,6 +8,7 @@ "format": "prettier --write \"**/*.{ts,tsx,md}\"" }, "devDependencies": { + "@changesets/cli": "^2.27.11", "prettier": "^3.2.5", "turbo": "^2.3.3", "typescript": "5.5.4" diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index c47967f5b..fd9dbc46e 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -8,6 +8,9 @@ importers: .: devDependencies: + '@changesets/cli': + specifier: ^2.27.11 + version: 2.27.11 prettier: specifier: ^3.2.5 version: 3.3.3 @@ -203,6 +206,65 @@ packages: resolution: {integrity: sha512-YXHu5lN8kJCb1LOb9PgV6pvak43X2h4HvRApcN5SdWeaItQOzfn1hgP6jasD6KWQyJDBxrVmA9o9OivlnNJK/w==} engines: {node: '>=6.9.0'} + '@babel/runtime@7.26.0': + resolution: {integrity: sha512-FDSOghenHTiToteC/QRlv2q3DhPZ/oOXTBoirfWNx1Cx3TMVcGWQtMMmQcSvb/JjpNeGzx8Pq/b4fKEJuWm1sw==} + engines: {node: '>=6.9.0'} + + '@changesets/apply-release-plan@7.0.7': + resolution: {integrity: sha512-qnPOcmmmnD0MfMg9DjU1/onORFyRpDXkMMl2IJg9mECY6RnxL3wN0TCCc92b2sXt1jt8DgjAUUsZYGUGTdYIXA==} + + '@changesets/assemble-release-plan@6.0.5': + resolution: {integrity: sha512-IgvBWLNKZd6k4t72MBTBK3nkygi0j3t3zdC1zrfusYo0KpdsvnDjrMM9vPnTCLCMlfNs55jRL4gIMybxa64FCQ==} + + '@changesets/changelog-git@0.2.0': + resolution: {integrity: sha512-bHOx97iFI4OClIT35Lok3sJAwM31VbUM++gnMBV16fdbtBhgYu4dxsphBF/0AZZsyAHMrnM0yFcj5gZM1py6uQ==} + + '@changesets/cli@2.27.11': + resolution: {integrity: sha512-1QislpE+nvJgSZZo9+Lj3Lno5pKBgN46dAV8IVxKJy9wX8AOrs9nn5pYVZuDpoxWJJCALmbfOsHkyxujgetQSg==} + hasBin: true + + '@changesets/config@3.0.5': + resolution: {integrity: sha512-QyXLSSd10GquX7hY0Mt4yQFMEeqnO5z/XLpbIr4PAkNNoQNKwDyiSrx4yd749WddusH1v3OSiA0NRAYmH/APpQ==} + + '@changesets/errors@0.2.0': + resolution: {integrity: sha512-6BLOQUscTpZeGljvyQXlWOItQyU71kCdGz7Pi8H8zdw6BI0g3m43iL4xKUVPWtG+qrrL9DTjpdn8eYuCQSRpow==} + + '@changesets/get-dependents-graph@2.1.2': + resolution: {integrity: sha512-sgcHRkiBY9i4zWYBwlVyAjEM9sAzs4wYVwJUdnbDLnVG3QwAaia1Mk5P8M7kraTOZN+vBET7n8KyB0YXCbFRLQ==} + + '@changesets/get-release-plan@4.0.6': + resolution: {integrity: sha512-FHRwBkY7Eili04Y5YMOZb0ezQzKikTka4wL753vfUA5COSebt7KThqiuCN9BewE4/qFGgF/5t3AuzXx1/UAY4w==} + + '@changesets/get-version-range-type@0.4.0': + resolution: {integrity: sha512-hwawtob9DryoGTpixy1D3ZXbGgJu1Rhr+ySH2PvTLHvkZuQ7sRT4oQwMh0hbqZH1weAooedEjRsbrWcGLCeyVQ==} + + '@changesets/git@3.0.2': + resolution: {integrity: sha512-r1/Kju9Y8OxRRdvna+nxpQIsMsRQn9dhhAZt94FLDeu0Hij2hnOozW8iqnHBgvu+KdnJppCveQwK4odwfw/aWQ==} + + '@changesets/logger@0.1.1': + resolution: {integrity: sha512-OQtR36ZlnuTxKqoW4Sv6x5YIhOmClRd5pWsjZsddYxpWs517R0HkyiefQPIytCVh4ZcC5x9XaG8KTdd5iRQUfg==} + + '@changesets/parse@0.4.0': + resolution: {integrity: sha512-TS/9KG2CdGXS27S+QxbZXgr8uPsP4yNJYb4BC2/NeFUj80Rni3TeD2qwWmabymxmrLo7JEsytXH1FbpKTbvivw==} + + '@changesets/pre@2.0.1': + resolution: {integrity: sha512-vvBJ/If4jKM4tPz9JdY2kGOgWmCowUYOi5Ycv8dyLnEE8FgpYYUo1mgJZxcdtGGP3aG8rAQulGLyyXGSLkIMTQ==} + + '@changesets/read@0.6.2': + resolution: {integrity: sha512-wjfQpJvryY3zD61p8jR87mJdyx2FIhEcdXhKUqkja87toMrP/3jtg/Yg29upN+N4Ckf525/uvV7a4tzBlpk6gg==} + + '@changesets/should-skip-package@0.1.1': + resolution: {integrity: sha512-H9LjLbF6mMHLtJIc/eHR9Na+MifJ3VxtgP/Y+XLn4BF7tDTEN1HNYtH6QMcjP1uxp9sjaFYmW8xqloaCi/ckTg==} + + '@changesets/types@4.1.0': + resolution: {integrity: sha512-LDQvVDv5Kb50ny2s25Fhm3d9QSZimsoUGBsUioj6MC3qbMUCuC8GPIvk/M6IvXx3lYhAs0lwWUQLb+VIEUCECw==} + + '@changesets/types@6.0.0': + resolution: {integrity: sha512-b1UkfNulgKoWfqyHtzKS5fOZYSJO+77adgL7DLRDr+/7jhChN+QcHnbjiQVOz/U+Ts3PGNySq7diAItzDgugfQ==} + + '@changesets/write@0.3.2': + resolution: {integrity: sha512-kDxDrPNpUgsjDbWBvUo27PzKX4gqeKOlhibaOXDJA6kuBisGqNHv/HwGJrAu8U/dSf8ZEFIeHIPtvSlZI1kULw==} + '@cspotcode/source-map-support@0.8.1': resolution: {integrity: sha512-IchNf6dN4tHoMFIn/7OE8LWZ19Y6q/67Bmf6vnGREv8RSbBVb9LPJxEcnwrcwX6ixSvaiGoomAUvu4YSxXrVgw==} engines: {node: '>=12'} @@ -383,6 +445,12 @@ packages: '@jridgewell/trace-mapping@0.3.9': resolution: {integrity: sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ==} + '@manypkg/find-root@1.1.0': + resolution: {integrity: sha512-mki5uBvhHzO8kYYix/WRy2WX8S3B5wdVSc9D6KcU5lQNglP2yt58/VfLuAK49glRXChosY8ap2oJ1qgma3GUVA==} + + '@manypkg/get-packages@1.1.3': + resolution: {integrity: sha512-fo+QhuU3qE/2TQMQmbVMqaQ6EWbMhi4ABWP+O4AM1NqPBuy0OrApV5LO6BrrgnhtAHS2NH6RrVk9OL181tTi8A==} + '@next/env@15.1.0': resolution: {integrity: sha512-UcCO481cROsqJuszPPXJnb7GGuLq617ve4xuAyyNG4VSSocJNtMU5Fsx+Lp6mlN8c7W58aZLc5y6D/2xNmaK+w==} @@ -508,6 +576,9 @@ packages: '@types/minimatch@5.1.2': resolution: {integrity: sha512-K0VQKziLUWkVKiRVrx4a40iPaxTUefQmjtkQofBkYRcoaaL/8rhwDWww9qWbrgicNOgnpIsMxyNIUM4+n6dUIA==} + '@types/node@12.20.55': + resolution: {integrity: sha512-J8xLz7q2OFulZ2cyGTLE1TbbZcjpno7FaN6zdJNrgAdrJ+DZzh/uFR6YrTb4C+nXakvud8Q4+rbhoIWlYQbUFQ==} + '@types/node@20.17.6': resolution: {integrity: sha512-VEI7OdvK2wP7XHnsuXbAJnEpEkF6NjSN45QJlL4VGqZSXsnicpesdTWsg9RISeSdYd3yeRj/y3k5KGjUXYnFwQ==} @@ -629,6 +700,10 @@ packages: ajv@6.12.6: resolution: {integrity: sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==} + ansi-colors@4.1.3: + resolution: {integrity: sha512-/6w/C21Pm1A7aZitlI5Ni/2J6FFQN8i1Cvz3kHABAAbw93v/NlvKdVOqz7CCWz/3iv/JplRSEEZ83XION15ovw==} + engines: {node: '>=6'} + ansi-escapes@4.3.2: resolution: {integrity: sha512-gKXj5ALrKWQLsYG9jlTRmR/xKluxHV+Z9QEwNIgCfM1/uwPMCuzVVnh5mwTd+OuBZcwSIMbqssNWRm1lE51QaQ==} engines: {node: '>=8'} @@ -648,6 +723,9 @@ packages: arg@4.1.3: resolution: {integrity: sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA==} + argparse@1.0.10: + resolution: {integrity: sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==} + argparse@2.0.1: resolution: {integrity: sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==} @@ -701,6 +779,10 @@ packages: resolution: {integrity: sha512-4Bcg1P8xhUuqcii/S0Z9wiHIrQVPMermM1any+MX5GeGD7faD3/msQUDGLol9wOcz4/jbg/WJnGqoJF6LiBdtg==} engines: {node: '>=10.0.0'} + better-path-resolve@1.0.0: + resolution: {integrity: sha512-pbnl5XzGBdrFU/wT4jqmJVPn2B6UHPBOhzMQkY/SPUPB6QtUXtmBHBIwCbXJol93mOpGMnQyP/+BB19q04xj7g==} + engines: {node: '>=4'} + bl@4.1.0: resolution: {integrity: sha512-1W07cM9gS6DcLperZfFSj+bWLtaPGSOHWhPiGzXmvVJbRLdG82sH/Kn8EtW1VqWVA54AKf2h5k5BbnIbwF3h6w==} @@ -753,6 +835,10 @@ packages: chardet@0.7.0: resolution: {integrity: sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA==} + ci-info@3.9.0: + resolution: {integrity: sha512-NIxF55hv4nSqQswkAeiOi1r83xy8JldOFDTWiug55KBu9Jnblncd2U6ViHmYgHf01TPZS77NJBhBMKdWj9HQMQ==} + engines: {node: '>=8'} + clean-stack@2.2.0: resolution: {integrity: sha512-4diC9HaTE+KRAMWhDhrGOECgWZxoevMc5TlkObMqNSsVU62PYzXZ/SMTjzyGAFF1YusgxGcSWTEXBhp0CPwQ1A==} engines: {node: '>=6'} @@ -870,6 +956,10 @@ packages: resolution: {integrity: sha512-wH9xOVHnczo9jN2IW68BabcecVPxacIA3g/7z6vhSU/4stOKQzeCRK0yD0A24WiAAUJmmVpWqrERcTxnLo3AnA==} engines: {node: '>=8'} + detect-indent@6.1.0: + resolution: {integrity: sha512-reYkTUJAZb9gUuZ2RvVCNhVHdg62RHnJ7WJl8ftMi4diZ6NWlciOzQN88pUhSELEwflJht4oQDv0F0BMlwaYtA==} + engines: {node: '>=8'} + detect-libc@2.0.3: resolution: {integrity: sha512-bwy0MGW55bG41VqxxypOsdSdGqLwXPI/focwgTYCFMbdUiBAxLg9CFzG08sz2aqzknwiX7Hkl0bQENjg8iLByw==} engines: {node: '>=8'} @@ -896,6 +986,10 @@ packages: emoji-regex@8.0.0: resolution: {integrity: sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==} + enquirer@2.4.1: + resolution: {integrity: sha512-rRqJg/6gd538VHvR3PSrdRBb/1Vy2YfzHqzvbhGIQpDRKIa4FgV/54b5Q1xYSxOOwKvjXweS26E0Q+nAMwp2pQ==} + engines: {node: '>=8.6'} + es-abstract@1.23.5: resolution: {integrity: sha512-vlmniQ0WNPwXqA0BnmwV3Ng7HxiGlh6r5U6JcTMNx8OilcAGqVJBHJcPjqOMaczU9fRuRK5Px2BdVyPRnKMMVQ==} engines: {node: '>= 0.4'} @@ -1019,6 +1113,9 @@ packages: resolution: {integrity: sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg==} engines: {node: '>=10'} + extendable-error@0.1.7: + resolution: {integrity: sha512-UOiS2in6/Q0FK0R0q6UY9vYpQ21mr/Qn1KOnte7vsACuNJf514WvCCUHSRCPcgjPT2bAhNIJdlE6bVap1GKmeg==} + external-editor@3.1.0: resolution: {integrity: sha512-hMQ4CX1p1izmuLYyZqLMO/qGNw10wSv9QDCPfzXfyFrOaCSSoRfqE1Kf1s5an66J5JZC62NewG+mK49jOCtQew==} engines: {node: '>=4'} @@ -1055,6 +1152,10 @@ packages: resolution: {integrity: sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==} engines: {node: '>=8'} + find-up@4.1.0: + resolution: {integrity: sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==} + engines: {node: '>=8'} + find-up@5.0.0: resolution: {integrity: sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==} engines: {node: '>=10'} @@ -1077,6 +1178,14 @@ packages: resolution: {integrity: sha512-PmDi3uwK5nFuXh7XDTlVnS17xJS7vW36is2+w3xcv8SVxiB4NyATf4ctkVY5bkSjX0Y4nbvZCq1/EjtEyr9ktw==} engines: {node: '>=14.14'} + fs-extra@7.0.1: + resolution: {integrity: sha512-YJDaCJZEnBmcbw13fvdAM9AwNOJwOzrE4pqMqBq5nFiEqXUqHwlK4B+3pUw6JNvfSPtX05xFHtYy/1ni01eGCw==} + engines: {node: '>=6 <7 || >=8'} + + fs-extra@8.1.0: + resolution: {integrity: sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g==} + engines: {node: '>=6 <7 || >=8'} + fs.realpath@1.0.0: resolution: {integrity: sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==} @@ -1133,6 +1242,10 @@ packages: resolution: {integrity: sha512-7dUi7RvCoT/xast/o/dLN53oqND4yk0nsHkhRgn9w65C4PofCLOoJ39iSOg+qVDdWQPIEj+eszMHQ+aLVwwQSg==} engines: {node: '>=8'} + globby@11.1.0: + resolution: {integrity: sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==} + engines: {node: '>=10'} + gopd@1.0.1: resolution: {integrity: sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==} @@ -1191,6 +1304,9 @@ packages: resolution: {integrity: sha512-1e4Wqeblerz+tMKPIq2EMGiiWW1dIjZOksyHWSUm1rmuvw/how9hBHZ38lAGj5ID4Ik6EdkOw7NmWPy6LAwalw==} engines: {node: '>= 14'} + human-id@1.0.2: + resolution: {integrity: sha512-UNopramDEhHJD+VR+ehk8rOslwSfByxPIZyJRfV739NDhN5LF1fa1MqnzKm2lGTQRjNrjK19Q5fhkgIfjlVUKw==} + human-signals@2.1.0: resolution: {integrity: sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw==} engines: {node: '>=10.17.0'} @@ -1347,6 +1463,10 @@ packages: resolution: {integrity: sha512-tE2UXzivje6ofPW7l23cjDOMa09gb7xlAqG6jG5ej6uPV32TlWP3NKPigtaGeHNu9fohccRYvIiZMfOOnOYUtg==} engines: {node: '>= 0.4'} + is-subdir@1.2.0: + resolution: {integrity: sha512-2AT6j+gXe/1ueqbW6fLZJiIw3F8iXGJtt0yDrZaBhAZEG1raiTxKWU+IPqMCzQAXOUCKdA4UDMgacKH25XG2Cw==} + engines: {node: '>=4'} + is-symbol@1.0.4: resolution: {integrity: sha512-C/CPBqKWnvdcxqIARxyOh4v1UUEOCHpgDa0WYgpKDFMszcrPcffg5uhwSgPCLD2WWxmq6isisz87tzT01tuGhg==} engines: {node: '>= 0.4'} @@ -1373,6 +1493,10 @@ packages: resolution: {integrity: sha512-LvIm3/KWzS9oRFHugab7d+M/GcBXuXX5xZkzPmN+NxihdQlZUQ4dWuSV1xR/sq6upL1TJEDrfBgRepHFdBtSNQ==} engines: {node: '>= 0.4'} + is-windows@1.0.2: + resolution: {integrity: sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA==} + engines: {node: '>=0.10.0'} + isarray@2.0.5: resolution: {integrity: sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==} @@ -1390,6 +1514,10 @@ packages: js-tokens@4.0.0: resolution: {integrity: sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==} + js-yaml@3.14.1: + resolution: {integrity: sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==} + hasBin: true + js-yaml@4.1.0: resolution: {integrity: sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==} @@ -1405,6 +1533,9 @@ packages: json-stable-stringify-without-jsonify@1.0.1: resolution: {integrity: sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==} + jsonfile@4.0.0: + resolution: {integrity: sha512-m6F1R3z8jjlf2imQHS2Qez5sjKWQzbuuhuJ/FKYFRZvPE3PuHcSMVZzfsLhGVOkfd20obL5SWEBew5ShlquNxg==} + jsonfile@6.1.0: resolution: {integrity: sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==} @@ -1419,6 +1550,10 @@ packages: resolution: {integrity: sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==} engines: {node: '>= 0.8.0'} + locate-path@5.0.0: + resolution: {integrity: sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==} + engines: {node: '>=8'} + locate-path@6.0.0: resolution: {integrity: sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==} engines: {node: '>=10'} @@ -1429,6 +1564,9 @@ packages: lodash.merge@4.6.2: resolution: {integrity: sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==} + lodash.startcase@4.4.0: + resolution: {integrity: sha512-+WKqsK294HMSc2jEbNgpHpd0JfIBhp7rEV4aqXWqFr6AlXov+SlcgB1Fv01y2kGe3Gc8nMW7VA0SrGuSkRfIEg==} + lodash@4.17.21: resolution: {integrity: sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==} @@ -1484,6 +1622,10 @@ packages: mkdirp@0.5.6: resolution: {integrity: sha512-FP+p8RB8OWpF3YZBCrP5gtADmtXApB5AMLn+vdyA+PyxCjrCs00mjyUozssO33cwDeT3wNGdLxJ5M//YqtHAJw==} + mri@1.2.0: + resolution: {integrity: sha512-tzzskb3bG8LvYGFF/mDTpq3jpI6Q9wc3LEmBaghu+DdCssd1FakN7Bc0hVNmEyGq1bq3RgfkCb3cmQLpNPOroA==} + engines: {node: '>=4'} + ms@2.1.3: resolution: {integrity: sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==} @@ -1587,6 +1729,9 @@ packages: resolution: {integrity: sha512-D2FR03Vir7FIu45XBY20mTb+/ZSWB00sjU9jdQXt83gDrI4Ztz5Fs7/yy74g2N5SVQY4xY1qDr4rNddwYRVX0g==} engines: {node: '>=0.10.0'} + outdent@0.5.0: + resolution: {integrity: sha512-/jHxFIzoMXdqPzTaCpFzAAWhpkSjZPF4Vsn6jAfNpmbH/ymsmd7Qc6VE9BGn0L6YMj6uwpQLxCECpus4ukKS9Q==} + ox@0.6.7: resolution: {integrity: sha512-17Gk/eFsFRAZ80p5eKqv89a57uXjd3NgIf1CaXojATPBuujVc/fQSVhBeAU9JCRB+k7J50WQAyWTxK19T9GgbA==} peerDependencies: @@ -1595,18 +1740,38 @@ packages: typescript: optional: true + p-filter@2.1.0: + resolution: {integrity: sha512-ZBxxZ5sL2HghephhpGAQdoskxplTwr7ICaehZwLIlfL6acuVgZPm8yBNuRAFBGEqtD/hmUeq9eqLg2ys9Xr/yw==} + engines: {node: '>=8'} + + p-limit@2.3.0: + resolution: {integrity: sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==} + engines: {node: '>=6'} + p-limit@3.1.0: resolution: {integrity: sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==} engines: {node: '>=10'} + p-locate@4.1.0: + resolution: {integrity: sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==} + engines: {node: '>=8'} + p-locate@5.0.0: resolution: {integrity: sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==} engines: {node: '>=10'} + p-map@2.1.0: + resolution: {integrity: sha512-y3b8Kpd8OAN444hxfBbFfj1FY/RjtTd8tzYwhUqNYXx0fXx2iX4maP4Qr6qhIKbQXI02wTLAda4fYUbDagTUFw==} + engines: {node: '>=6'} + p-map@3.0.0: resolution: {integrity: sha512-d3qXVTF/s+W+CdJ5A29wywV2n8CQQYahlgz2bFiA+4eVNJbHJodPZ+/gXwPGh0bOqA+j8S+6+ckmvLGPk1QpxQ==} engines: {node: '>=8'} + p-try@2.2.0: + resolution: {integrity: sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==} + engines: {node: '>=6'} + pac-proxy-agent@7.0.2: resolution: {integrity: sha512-BFi3vZnO9X5Qt6NRz7ZOaPja3ic0PhlsmCRYLOpN11+mWBCR6XJDqW5RF3j8jm4WGGQZtBA+bTfxYzeKW73eHg==} engines: {node: '>= 14'} @@ -1615,6 +1780,9 @@ packages: resolution: {integrity: sha512-5NPgf87AT2STgwa2ntRMr45jTKrYBGkVU36yT0ig/n/GMAa3oPqhZfIQ2kMEimReg0+t9kZViDVZ83qfVUlckg==} engines: {node: '>= 14'} + package-manager-detector@0.2.8: + resolution: {integrity: sha512-ts9KSdroZisdvKMWVAVCXiKqnqNfXz4+IbrBG8/BWx/TR5le+jfenvoBuIZ6UWM9nz47W7AbD9qYfAwfWMIwzA==} + param-case@2.1.1: resolution: {integrity: sha512-eQE845L6ot89sk2N8liD8HAuH4ca6Vvr7VWAWwt7+kvvG5aBcPmmphQ68JsEG2qa9n1TykS2DLeMt363AAH8/w==} @@ -1654,6 +1822,10 @@ packages: resolution: {integrity: sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==} engines: {node: '>=8.6'} + pify@4.0.1: + resolution: {integrity: sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==} + engines: {node: '>=6'} + possible-typed-array-names@1.0.0: resolution: {integrity: sha512-d7Uw+eZoloe0EHDIYoe+bQ5WXnGMOpmiZFTuMWCwpjzzkL2nTjcKiAk4hh8TjnGye2TwWOk3UXucZ+3rbmBa8Q==} engines: {node: '>= 0.4'} @@ -1666,6 +1838,11 @@ packages: resolution: {integrity: sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==} engines: {node: '>= 0.8.0'} + prettier@2.8.8: + resolution: {integrity: sha512-tdN8qQGvNjw4CHbY+XXk0JgCXn9QiF21a55rBe5LJAU+kDyC4WQn4+awm2Xfk2lQMk5fKup9XgzTZtGkjBdP9Q==} + engines: {node: '>=10.13.0'} + hasBin: true + prettier@3.3.3: resolution: {integrity: sha512-i2tDNA0O5IrMO757lfrdQZCc2jPNDVntV0m/+4whiDfWaTKfMNgR7Qz0NAeGz/nRqF4m5/6CLzbP4/liHt12Ew==} engines: {node: '>=14'} @@ -1702,6 +1879,10 @@ packages: resolution: {integrity: sha512-V8AVnmPIICiWpGfm6GLzCR/W5FXLchHop40W4nXBmdlEceh16rCN8O8LNWm5bh5XUX91fh7KpA+W0TgMKmgTpQ==} engines: {node: '>=0.10.0'} + read-yaml-file@1.1.0: + resolution: {integrity: sha512-VIMnQi/Z4HT2Fxuwg5KrY174U1VdUIASQVWXXyqtNRtxSr9IYkn1rsI6Tb6HsrHCmB7gVpNwX6JxPTHcH6IoTA==} + engines: {node: '>=6'} + readable-stream@3.6.2: resolution: {integrity: sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==} engines: {node: '>= 6'} @@ -1728,6 +1909,10 @@ packages: resolution: {integrity: sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==} engines: {node: '>=4'} + resolve-from@5.0.0: + resolution: {integrity: sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==} + engines: {node: '>=8'} + resolve@1.22.8: resolution: {integrity: sha512-oKWePCxqpd6FlLvGV1VU0x7bkPmmCNolxzjMf4NczoDnQcIWrAF+cPtZn5i6n+RfD2d9i0tzpKnG6Yk168yIyw==} @@ -1813,6 +1998,10 @@ packages: signal-exit@3.0.7: resolution: {integrity: sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==} + signal-exit@4.1.0: + resolution: {integrity: sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==} + engines: {node: '>=14'} + simple-swizzle@0.2.2: resolution: {integrity: sha512-JA//kQgZtbuY83m+xT+tXJkmJncGMTFT+C+g2h2R9uxkYIrE2yy9sgmcLhCnw57/WSD+Eh3J97FPEDFnbXnDUg==} @@ -1843,6 +2032,12 @@ packages: resolution: {integrity: sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==} engines: {node: '>=0.10.0'} + spawndamnit@3.0.1: + resolution: {integrity: sha512-MmnduQUuHCoFckZoWnXsTg7JaiLBJrKFj9UI2MbRPGaJeVpsLcVBu6P/IGZovziM/YBsellCmsprgNA+w0CzVg==} + + sprintf-js@1.0.3: + resolution: {integrity: sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==} + sprintf-js@1.1.3: resolution: {integrity: sha512-Oo+0REFV59/rz3gfJNKQiBlwfHaSESl1pcGyABQsnnIfWOFt6JNj5gCog2U6MLZ//IGYD+nA8nI+mTShREReaA==} @@ -1879,6 +2074,10 @@ packages: resolution: {integrity: sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==} engines: {node: '>=8'} + strip-bom@3.0.0: + resolution: {integrity: sha512-vavAMRXOgBVNF6nyEEmL3DBK19iRpDcoIwW+swQ+CbGiu7lju6t+JklA1MHweoWtadgt4ISVUsXLyDq34ddcwA==} + engines: {node: '>=4'} + strip-final-newline@2.0.0: resolution: {integrity: sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA==} engines: {node: '>=6'} @@ -1919,6 +2118,10 @@ packages: swap-case@1.1.2: resolution: {integrity: sha512-BAmWG6/bx8syfc6qXPprof3Mn5vQgf5dwdUNJhsNqU9WdPt5P+ES/wQ5bxfijy8zwZgZZHslC3iAsxsuQMCzJQ==} + term-size@2.2.1: + resolution: {integrity: sha512-wK0Ri4fOGjv/XPy8SBHZChl8CM7uMc5VML7SqiQ0zG7+J5Vr+RMQDoHa2CNT6KHUnTGIXH34UDMkPzAUyapBZg==} + engines: {node: '>=8'} + through@2.3.8: resolution: {integrity: sha512-w89qg7PI8wAdvX60bMDP+bFoD5Dvhm9oLheFp5O4a2QF0cSBGsBX4qZmadPMvVqlLJBBci+WqGGOAPvcDeNSVg==} @@ -2052,6 +2255,10 @@ packages: undici-types@6.19.8: resolution: {integrity: sha512-ve2KP6f/JnbPBFyobGHuerC9g1FYGn/F8n1LWTwNxCEzd6IfqTwUQcNXgEtmmQ6DlRrC1hrSrBnCZPokRrDHjw==} + universalify@0.1.2: + resolution: {integrity: sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==} + engines: {node: '>= 4.0.0'} + universalify@2.0.1: resolution: {integrity: sha512-gptHNQghINnc/vTGIk0SOFGFNXw7JVrlRUtConJRlvaw6DuX0wO5Jeko9sWrMBhh+PsYAZ7oXAiOnf/UKogyiw==} engines: {node: '>= 10.0.0'} @@ -2131,6 +2338,152 @@ snapshots: core-js-pure: 3.39.0 regenerator-runtime: 0.14.1 + '@babel/runtime@7.26.0': + dependencies: + regenerator-runtime: 0.14.1 + + '@changesets/apply-release-plan@7.0.7': + dependencies: + '@changesets/config': 3.0.5 + '@changesets/get-version-range-type': 0.4.0 + '@changesets/git': 3.0.2 + '@changesets/should-skip-package': 0.1.1 + '@changesets/types': 6.0.0 + '@manypkg/get-packages': 1.1.3 + detect-indent: 6.1.0 + fs-extra: 7.0.1 + lodash.startcase: 4.4.0 + outdent: 0.5.0 + prettier: 2.8.8 + resolve-from: 5.0.0 + semver: 7.6.3 + + '@changesets/assemble-release-plan@6.0.5': + dependencies: + '@changesets/errors': 0.2.0 + '@changesets/get-dependents-graph': 2.1.2 + '@changesets/should-skip-package': 0.1.1 + '@changesets/types': 6.0.0 + '@manypkg/get-packages': 1.1.3 + semver: 7.6.3 + + '@changesets/changelog-git@0.2.0': + dependencies: + '@changesets/types': 6.0.0 + + '@changesets/cli@2.27.11': + dependencies: + '@changesets/apply-release-plan': 7.0.7 + '@changesets/assemble-release-plan': 6.0.5 + '@changesets/changelog-git': 0.2.0 + '@changesets/config': 3.0.5 + '@changesets/errors': 0.2.0 + '@changesets/get-dependents-graph': 2.1.2 + '@changesets/get-release-plan': 4.0.6 + '@changesets/git': 3.0.2 + '@changesets/logger': 0.1.1 + '@changesets/pre': 2.0.1 + '@changesets/read': 0.6.2 + '@changesets/should-skip-package': 0.1.1 + '@changesets/types': 6.0.0 + '@changesets/write': 0.3.2 + '@manypkg/get-packages': 1.1.3 + ansi-colors: 4.1.3 + ci-info: 3.9.0 + enquirer: 2.4.1 + external-editor: 3.1.0 + fs-extra: 7.0.1 + mri: 1.2.0 + p-limit: 2.3.0 + package-manager-detector: 0.2.8 + picocolors: 1.1.1 + resolve-from: 5.0.0 + semver: 7.6.3 + spawndamnit: 3.0.1 + term-size: 2.2.1 + + '@changesets/config@3.0.5': + dependencies: + '@changesets/errors': 0.2.0 + '@changesets/get-dependents-graph': 2.1.2 + '@changesets/logger': 0.1.1 + '@changesets/types': 6.0.0 + '@manypkg/get-packages': 1.1.3 + fs-extra: 7.0.1 + micromatch: 4.0.8 + + '@changesets/errors@0.2.0': + dependencies: + extendable-error: 0.1.7 + + '@changesets/get-dependents-graph@2.1.2': + dependencies: + '@changesets/types': 6.0.0 + '@manypkg/get-packages': 1.1.3 + picocolors: 1.1.1 + semver: 7.6.3 + + '@changesets/get-release-plan@4.0.6': + dependencies: + '@changesets/assemble-release-plan': 6.0.5 + '@changesets/config': 3.0.5 + '@changesets/pre': 2.0.1 + '@changesets/read': 0.6.2 + '@changesets/types': 6.0.0 + '@manypkg/get-packages': 1.1.3 + + '@changesets/get-version-range-type@0.4.0': {} + + '@changesets/git@3.0.2': + dependencies: + '@changesets/errors': 0.2.0 + '@manypkg/get-packages': 1.1.3 + is-subdir: 1.2.0 + micromatch: 4.0.8 + spawndamnit: 3.0.1 + + '@changesets/logger@0.1.1': + dependencies: + picocolors: 1.1.1 + + '@changesets/parse@0.4.0': + dependencies: + '@changesets/types': 6.0.0 + js-yaml: 3.14.1 + + '@changesets/pre@2.0.1': + dependencies: + '@changesets/errors': 0.2.0 + '@changesets/types': 6.0.0 + '@manypkg/get-packages': 1.1.3 + fs-extra: 7.0.1 + + '@changesets/read@0.6.2': + dependencies: + '@changesets/git': 3.0.2 + '@changesets/logger': 0.1.1 + '@changesets/parse': 0.4.0 + '@changesets/types': 6.0.0 + fs-extra: 7.0.1 + p-filter: 2.1.0 + picocolors: 1.1.1 + + '@changesets/should-skip-package@0.1.1': + dependencies: + '@changesets/types': 6.0.0 + '@manypkg/get-packages': 1.1.3 + + '@changesets/types@4.1.0': {} + + '@changesets/types@6.0.0': {} + + '@changesets/write@0.3.2': + dependencies: + '@changesets/types': 6.0.0 + fs-extra: 7.0.1 + human-id: 1.0.2 + prettier: 2.8.8 + '@cspotcode/source-map-support@0.8.1': dependencies: '@jridgewell/trace-mapping': 0.3.9 @@ -2278,6 +2631,22 @@ snapshots: '@jridgewell/resolve-uri': 3.1.2 '@jridgewell/sourcemap-codec': 1.5.0 + '@manypkg/find-root@1.1.0': + dependencies: + '@babel/runtime': 7.26.0 + '@types/node': 12.20.55 + find-up: 4.1.0 + fs-extra: 8.1.0 + + '@manypkg/get-packages@1.1.3': + dependencies: + '@babel/runtime': 7.26.0 + '@changesets/types': 4.1.0 + '@manypkg/find-root': 1.1.0 + fs-extra: 8.1.0 + globby: 11.1.0 + read-yaml-file: 1.1.0 + '@next/env@15.1.0': {} '@next/eslint-plugin-next@15.1.0': @@ -2406,6 +2775,8 @@ snapshots: '@types/minimatch@5.1.2': {} + '@types/node@12.20.55': {} + '@types/node@20.17.6': dependencies: undici-types: 6.19.8 @@ -2550,6 +2921,8 @@ snapshots: json-schema-traverse: 0.4.1 uri-js: 4.4.1 + ansi-colors@4.1.3: {} + ansi-escapes@4.3.2: dependencies: type-fest: 0.21.3 @@ -2566,6 +2939,10 @@ snapshots: arg@4.1.3: {} + argparse@1.0.10: + dependencies: + sprintf-js: 1.0.3 + argparse@2.0.1: {} array-buffer-byte-length@1.0.1: @@ -2640,6 +3017,10 @@ snapshots: basic-ftp@5.0.5: {} + better-path-resolve@1.0.0: + dependencies: + is-windows: 1.0.2 + bl@4.1.0: dependencies: buffer: 5.7.1 @@ -2724,6 +3105,8 @@ snapshots: chardet@0.7.0: {} + ci-info@3.9.0: {} + clean-stack@2.2.0: {} cli-cursor@3.1.0: @@ -2844,6 +3227,8 @@ snapshots: rimraf: 3.0.2 slash: 3.0.0 + detect-indent@6.1.0: {} + detect-libc@2.0.3: optional: true @@ -2865,6 +3250,11 @@ snapshots: emoji-regex@8.0.0: {} + enquirer@2.4.1: + dependencies: + ansi-colors: 4.1.3 + strip-ansi: 6.0.1 + es-abstract@1.23.5: dependencies: array-buffer-byte-length: 1.0.1 @@ -3089,6 +3479,8 @@ snapshots: signal-exit: 3.0.7 strip-final-newline: 2.0.0 + extendable-error@0.1.7: {} + external-editor@3.1.0: dependencies: chardet: 0.7.0 @@ -3133,6 +3525,11 @@ snapshots: dependencies: to-regex-range: 5.0.1 + find-up@4.1.0: + dependencies: + locate-path: 5.0.0 + path-exists: 4.0.0 + find-up@5.0.0: dependencies: locate-path: 6.0.0 @@ -3161,6 +3558,18 @@ snapshots: jsonfile: 6.1.0 universalify: 2.0.1 + fs-extra@7.0.1: + dependencies: + graceful-fs: 4.2.11 + jsonfile: 4.0.0 + universalify: 0.1.2 + + fs-extra@8.1.0: + dependencies: + graceful-fs: 4.2.11 + jsonfile: 4.0.0 + universalify: 0.1.2 + fs.realpath@1.0.0: {} function-bind@1.1.2: {} @@ -3236,6 +3645,15 @@ snapshots: merge2: 1.4.1 slash: 3.0.0 + globby@11.1.0: + dependencies: + array-union: 2.1.0 + dir-glob: 3.0.1 + fast-glob: 3.3.2 + ignore: 5.3.2 + merge2: 1.4.1 + slash: 3.0.0 + gopd@1.0.1: dependencies: get-intrinsic: 1.2.4 @@ -3299,6 +3717,8 @@ snapshots: transitivePeerDependencies: - supports-color + human-id@1.0.2: {} + human-signals@2.1.0: {} iconv-lite@0.4.24: @@ -3460,6 +3880,10 @@ snapshots: dependencies: has-tostringtag: 1.0.2 + is-subdir@1.2.0: + dependencies: + better-path-resolve: 1.0.0 + is-symbol@1.0.4: dependencies: has-symbols: 1.0.3 @@ -3485,6 +3909,8 @@ snapshots: call-bind: 1.0.7 get-intrinsic: 1.2.4 + is-windows@1.0.2: {} + isarray@2.0.5: {} isbinaryfile@4.0.10: {} @@ -3501,6 +3927,11 @@ snapshots: js-tokens@4.0.0: {} + js-yaml@3.14.1: + dependencies: + argparse: 1.0.10 + esprima: 4.0.1 + js-yaml@4.1.0: dependencies: argparse: 2.0.1 @@ -3513,6 +3944,10 @@ snapshots: json-stable-stringify-without-jsonify@1.0.1: {} + jsonfile@4.0.0: + optionalDependencies: + graceful-fs: 4.2.11 + jsonfile@6.1.0: dependencies: universalify: 2.0.1 @@ -3535,6 +3970,10 @@ snapshots: prelude-ls: 1.2.1 type-check: 0.4.0 + locate-path@5.0.0: + dependencies: + p-locate: 4.1.0 + locate-path@6.0.0: dependencies: p-locate: 5.0.0 @@ -3543,6 +3982,8 @@ snapshots: lodash.merge@4.6.2: {} + lodash.startcase@4.4.0: {} + lodash@4.17.21: {} log-symbols@3.0.0: @@ -3593,6 +4034,8 @@ snapshots: dependencies: minimist: 1.2.8 + mri@1.2.0: {} + ms@2.1.3: {} mute-stream@0.0.8: {} @@ -3726,6 +4169,8 @@ snapshots: os-tmpdir@1.0.2: {} + outdent@0.5.0: {} + ox@0.6.7(typescript@5.7.3): dependencies: '@adraffy/ens-normalize': 1.11.0 @@ -3740,18 +4185,34 @@ snapshots: transitivePeerDependencies: - zod + p-filter@2.1.0: + dependencies: + p-map: 2.1.0 + + p-limit@2.3.0: + dependencies: + p-try: 2.2.0 + p-limit@3.1.0: dependencies: yocto-queue: 0.1.0 + p-locate@4.1.0: + dependencies: + p-limit: 2.3.0 + p-locate@5.0.0: dependencies: p-limit: 3.1.0 + p-map@2.1.0: {} + p-map@3.0.0: dependencies: aggregate-error: 3.1.0 + p-try@2.2.0: {} + pac-proxy-agent@7.0.2: dependencies: '@tootallnate/quickjs-emscripten': 0.23.0 @@ -3770,6 +4231,8 @@ snapshots: degenerator: 5.0.1 netmask: 2.0.2 + package-manager-detector@0.2.8: {} + param-case@2.1.1: dependencies: no-case: 2.3.2 @@ -3801,6 +4264,8 @@ snapshots: picomatch@2.3.1: {} + pify@4.0.1: {} + possible-typed-array-names@1.0.0: {} postcss@8.4.31: @@ -3811,6 +4276,8 @@ snapshots: prelude-ls@1.2.1: {} + prettier@2.8.8: {} + prettier@3.3.3: {} prop-types@15.8.1: @@ -3854,6 +4321,13 @@ snapshots: react@19.0.0: {} + read-yaml-file@1.1.0: + dependencies: + graceful-fs: 4.2.11 + js-yaml: 3.14.1 + pify: 4.0.1 + strip-bom: 3.0.0 + readable-stream@3.6.2: dependencies: inherits: 2.0.4 @@ -3890,6 +4364,8 @@ snapshots: resolve-from@4.0.0: {} + resolve-from@5.0.0: {} + resolve@1.22.8: dependencies: is-core-module: 2.15.1 @@ -4013,6 +4489,8 @@ snapshots: signal-exit@3.0.7: {} + signal-exit@4.1.0: {} + simple-swizzle@0.2.2: dependencies: is-arrayish: 0.3.2 @@ -4043,6 +4521,13 @@ snapshots: source-map@0.6.1: {} + spawndamnit@3.0.1: + dependencies: + cross-spawn: 7.0.6 + signal-exit: 4.1.0 + + sprintf-js@1.0.3: {} + sprintf-js@1.1.3: {} streamsearch@1.1.0: {} @@ -4100,6 +4585,8 @@ snapshots: dependencies: ansi-regex: 5.0.1 + strip-bom@3.0.0: {} + strip-final-newline@2.0.0: {} strip-json-comments@2.0.1: {} @@ -4126,6 +4613,8 @@ snapshots: lower-case: 1.1.4 upper-case: 1.1.3 + term-size@2.2.1: {} + through@2.3.8: {} tinycolor2@1.6.0: {} @@ -4267,6 +4756,8 @@ snapshots: undici-types@6.19.8: {} + universalify@0.1.2: {} + universalify@2.0.1: {} update-check@1.5.4: From 3d27e21913d024156c52fc787e3ec43e7f8e1fc5 Mon Sep 17 00:00:00 2001 From: William Hua Date: Tue, 21 Jan 2025 14:50:27 +0100 Subject: [PATCH 027/439] pnpm changeset init --- .changeset/README.md | 8 ++++++++ .changeset/config.json | 11 +++++++++++ 2 files changed, 19 insertions(+) create mode 100644 .changeset/README.md create mode 100644 .changeset/config.json diff --git a/.changeset/README.md b/.changeset/README.md new file mode 100644 index 000000000..e5b6d8d6a --- /dev/null +++ b/.changeset/README.md @@ -0,0 +1,8 @@ +# Changesets + +Hello and welcome! This folder has been automatically generated by `@changesets/cli`, a build tool that works +with multi-package repos, or single-package repos to help you version and publish your code. You can +find the full documentation for it [in our repository](https://github.com/changesets/changesets) + +We have a quick list of common questions to get you started engaging with this project in +[our documentation](https://github.com/changesets/changesets/blob/main/docs/common-questions.md) diff --git a/.changeset/config.json b/.changeset/config.json new file mode 100644 index 000000000..6b372552c --- /dev/null +++ b/.changeset/config.json @@ -0,0 +1,11 @@ +{ + "$schema": "https://unpkg.com/@changesets/config@3.0.5/schema.json", + "changelog": "@changesets/cli/changelog", + "commit": false, + "fixed": [], + "linked": [], + "access": "restricted", + "baseBranch": "main", + "updateInternalDependencies": "patch", + "ignore": [] +} From aa1a86cf527051bd575ae867e5e5f6b48ac384cc Mon Sep 17 00:00:00 2001 From: William Hua Date: Tue, 21 Jan 2025 15:07:23 +0100 Subject: [PATCH 028/439] primitives, core, wdk: version 0.0.0 --- packages/core/package.json | 1 + packages/primitives/package.json | 1 + packages/wdk/package.json | 1 + 3 files changed, 3 insertions(+) diff --git a/packages/core/package.json b/packages/core/package.json index 59ee5d947..467b91b36 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -1,5 +1,6 @@ { "name": "@0xsequence/sequence-core", + "version": "0.0.0", "scripts": { "build": "tsc", "dev": "tsc --watch" diff --git a/packages/primitives/package.json b/packages/primitives/package.json index 8b2131d5b..2ad725e9b 100644 --- a/packages/primitives/package.json +++ b/packages/primitives/package.json @@ -1,5 +1,6 @@ { "name": "@0xsequence/sequence-primitives", + "version": "0.0.0", "scripts": { "build": "tsc", "dev": "tsc --watch" diff --git a/packages/wdk/package.json b/packages/wdk/package.json index 303a90347..337e01e54 100644 --- a/packages/wdk/package.json +++ b/packages/wdk/package.json @@ -1,5 +1,6 @@ { "name": "@0xsequence/sequence-wdk", + "version": "0.0.0", "scripts": { "build": "tsc", "dev": "tsc --watch" From 8a470679a7e5828f9bfd369a427f745d54f8d980 Mon Sep 17 00:00:00 2001 From: William Hua Date: Tue, 21 Jan 2025 15:09:53 +0100 Subject: [PATCH 029/439] primitives, core, wdk: license apache 2.0 --- package.json | 1 + packages/core/package.json | 1 + packages/primitives/package.json | 1 + packages/wdk/package.json | 1 + 4 files changed, 4 insertions(+) diff --git a/package.json b/package.json index 7eff35a40..111d1d240 100644 --- a/package.json +++ b/package.json @@ -1,5 +1,6 @@ { "name": "sequence-core", + "license": "Apache-2.0", "private": true, "scripts": { "build": "turbo build", diff --git a/packages/core/package.json b/packages/core/package.json index 467b91b36..d7518b40b 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -1,6 +1,7 @@ { "name": "@0xsequence/sequence-core", "version": "0.0.0", + "license": "Apache-2.0", "scripts": { "build": "tsc", "dev": "tsc --watch" diff --git a/packages/primitives/package.json b/packages/primitives/package.json index 2ad725e9b..3ab4a23a2 100644 --- a/packages/primitives/package.json +++ b/packages/primitives/package.json @@ -1,6 +1,7 @@ { "name": "@0xsequence/sequence-primitives", "version": "0.0.0", + "license": "Apache-2.0", "scripts": { "build": "tsc", "dev": "tsc --watch" diff --git a/packages/wdk/package.json b/packages/wdk/package.json index 337e01e54..94f8d16f0 100644 --- a/packages/wdk/package.json +++ b/packages/wdk/package.json @@ -1,6 +1,7 @@ { "name": "@0xsequence/sequence-wdk", "version": "0.0.0", + "license": "Apache-2.0", "scripts": { "build": "tsc", "dev": "tsc --watch" From 970f489e9385207067ffde29eac1828c4c79ad0c Mon Sep 17 00:00:00 2001 From: Agusx1211 Date: Tue, 21 Jan 2025 17:49:22 +0000 Subject: [PATCH 030/439] Add skeleton for cli and more eslint --- packages/eslint-config/base.js | 20 ++++++++++ packages/primitives-cli/eslint.config.mjs | 4 ++ packages/primitives-cli/package.json | 26 +++++++++++++ packages/primitives-cli/src/index.ts | 12 ++++++ .../primitives-cli/src/subcommands/payload.ts | 39 +++++++++++++++++++ packages/primitives-cli/tsconfig.json | 9 +++++ packages/primitives/eslint.config.mjs | 4 ++ 7 files changed, 114 insertions(+) create mode 100644 packages/primitives-cli/eslint.config.mjs create mode 100644 packages/primitives-cli/package.json create mode 100644 packages/primitives-cli/src/index.ts create mode 100644 packages/primitives-cli/src/subcommands/payload.ts create mode 100644 packages/primitives-cli/tsconfig.json create mode 100644 packages/primitives/eslint.config.mjs diff --git a/packages/eslint-config/base.js b/packages/eslint-config/base.js index 31f5f43d5..0f2262a4d 100644 --- a/packages/eslint-config/base.js +++ b/packages/eslint-config/base.js @@ -26,6 +26,26 @@ export const config = [ onlyWarn, }, }, + { + rules: { + // Disallow semicolons + "semi": ["error", "never"], + + // Turn off the base ESLint version of no-unused-vars + "no-unused-vars": "off", + + // Use @typescript-eslint/no-unused-vars + // Allow unused vars prefixed with _ + "@typescript-eslint/no-unused-vars": [ + "error", + { + "argsIgnorePattern": "^_", + "varsIgnorePattern": "^_", + "destructuredArrayIgnorePattern": "^_" + } + ] + } + }, { ignores: ["dist/**"], }, diff --git a/packages/primitives-cli/eslint.config.mjs b/packages/primitives-cli/eslint.config.mjs new file mode 100644 index 000000000..19170f88e --- /dev/null +++ b/packages/primitives-cli/eslint.config.mjs @@ -0,0 +1,4 @@ +import { config } from "@repo/eslint-config/react-internal"; + +/** @type {import("eslint").Linter.Config} */ +export default config; diff --git a/packages/primitives-cli/package.json b/packages/primitives-cli/package.json new file mode 100644 index 000000000..93be0a984 --- /dev/null +++ b/packages/primitives-cli/package.json @@ -0,0 +1,26 @@ +{ + "name": "@0xsequence/sequence-primitives-cli", + "scripts": { + "build": "tsc", + "dev": "tsc --watch", + "start": "tsc && node dist/index.js", + "lint": "eslint . --max-warnings 0" + }, + "exports": { + ".": { + "types": "./src/index.ts", + "default": "./dist/index.js" + } + }, + "devDependencies": { + "@repo/eslint-config": "workspace:*", + "@repo/typescript-config": "workspace:^", + "@types/yargs": "^17.0.33", + "typescript": "^5.7.3" + }, + "dependencies": { + "@0xsequence/sequence-primitives": "workspace:^", + "ox": "^0.6.7", + "yargs": "^17.7.2" + } +} \ No newline at end of file diff --git a/packages/primitives-cli/src/index.ts b/packages/primitives-cli/src/index.ts new file mode 100644 index 000000000..fcd1c78cb --- /dev/null +++ b/packages/primitives-cli/src/index.ts @@ -0,0 +1,12 @@ +#!/usr/bin/env node + +import yargs from 'yargs'; +import { hideBin } from 'yargs/helpers'; +import payloadCommand from './subcommands/payload'; + +void yargs(hideBin(process.argv)) + .command(payloadCommand) + .demandCommand(1) + .strict() + .help() + .argv diff --git a/packages/primitives-cli/src/subcommands/payload.ts b/packages/primitives-cli/src/subcommands/payload.ts new file mode 100644 index 000000000..55b7c36b6 --- /dev/null +++ b/packages/primitives-cli/src/subcommands/payload.ts @@ -0,0 +1,39 @@ +import type { CommandModule } from 'yargs' + +async function convertToAbi(_payload: string): Promise { + throw new Error('Not implemented') +} + +async function convertToPacked(_payload: string): Promise { + throw new Error('Not implemented') +} + +const payloadCommand: CommandModule = { + command: 'payload', + describe: 'Payload conversion utilities', + builder: (yargs) => { + return yargs + .command('to-abi ', 'Convert payload to ABI format', (yargs) => { + return yargs.positional('payload', { + type: 'string', + description: 'Input payload to convert', + demandOption: true, + }) + }, async (argv) => { + await convertToAbi(argv.payload) + }) + .command('to-packed ', 'Convert payload to packed format', (yargs) => { + return yargs.positional('payload', { + type: 'string', + description: 'Input payload to convert', + demandOption: true, + }) + }, async (argv) => { + await convertToPacked(argv.payload) + }) + .demandCommand(1, 'You must specify a subcommand for payload') + }, + handler: () => { } +} + +export default payloadCommand diff --git a/packages/primitives-cli/tsconfig.json b/packages/primitives-cli/tsconfig.json new file mode 100644 index 000000000..e502f58f4 --- /dev/null +++ b/packages/primitives-cli/tsconfig.json @@ -0,0 +1,9 @@ +{ + "extends": "@repo/typescript-config/base.json", + "compilerOptions": { + "rootDir": "src", + "outDir": "dist" + }, + "include": ["src"], + "exclude": ["node_modules", "dist"] +} diff --git a/packages/primitives/eslint.config.mjs b/packages/primitives/eslint.config.mjs new file mode 100644 index 000000000..19170f88e --- /dev/null +++ b/packages/primitives/eslint.config.mjs @@ -0,0 +1,4 @@ +import { config } from "@repo/eslint-config/react-internal"; + +/** @type {import("eslint").Linter.Config} */ +export default config; From 9d5a1485e2426d02818a190411cfbc690fbad075 Mon Sep 17 00:00:00 2001 From: William Hua Date: Tue, 21 Jan 2025 17:18:24 +0100 Subject: [PATCH 031/439] .prettierrc --- .prettierrc | 4 ++ apps/docs/app/layout.tsx | 28 +++++------ apps/docs/app/page.tsx | 22 ++++---- apps/web/app/layout.tsx | 28 +++++------ apps/web/app/page.tsx | 22 ++++---- packages/primitives/src/config.ts | 70 +++++++++++++++++++------- packages/primitives/src/payload.ts | 24 ++++++--- packages/primitives/src/signature.ts | 32 +++++++----- packages/ui/src/button.tsx | 14 +++--- packages/ui/src/card.tsx | 12 ++--- packages/ui/src/code.tsx | 8 +-- packages/ui/turbo/generators/config.ts | 24 ++++----- 12 files changed, 169 insertions(+), 119 deletions(-) create mode 100644 .prettierrc diff --git a/.prettierrc b/.prettierrc new file mode 100644 index 000000000..b2095be81 --- /dev/null +++ b/.prettierrc @@ -0,0 +1,4 @@ +{ + "semi": false, + "singleQuote": true +} diff --git a/apps/docs/app/layout.tsx b/apps/docs/app/layout.tsx index 846953755..b929b3f3c 100644 --- a/apps/docs/app/layout.tsx +++ b/apps/docs/app/layout.tsx @@ -1,25 +1,25 @@ -import type { Metadata } from "next"; -import localFont from "next/font/local"; -import "./globals.css"; +import type { Metadata } from 'next' +import localFont from 'next/font/local' +import './globals.css' const geistSans = localFont({ - src: "./fonts/GeistVF.woff", - variable: "--font-geist-sans", -}); + src: './fonts/GeistVF.woff', + variable: '--font-geist-sans', +}) const geistMono = localFont({ - src: "./fonts/GeistMonoVF.woff", - variable: "--font-geist-mono", -}); + src: './fonts/GeistMonoVF.woff', + variable: '--font-geist-mono', +}) export const metadata: Metadata = { - title: "Create Next App", - description: "Generated by create next app", -}; + title: 'Create Next App', + description: 'Generated by create next app', +} export default function RootLayout({ children, }: Readonly<{ - children: React.ReactNode; + children: React.ReactNode }>) { return ( @@ -27,5 +27,5 @@ export default function RootLayout({ {children} - ); + ) } diff --git a/apps/docs/app/page.tsx b/apps/docs/app/page.tsx index 828709ac1..723c06043 100644 --- a/apps/docs/app/page.tsx +++ b/apps/docs/app/page.tsx @@ -1,22 +1,22 @@ -import Image, { type ImageProps } from "next/image"; -import { Button } from "@repo/ui/button"; -import styles from "./page.module.css"; +import Image, { type ImageProps } from 'next/image' +import { Button } from '@repo/ui/button' +import styles from './page.module.css' -type Props = Omit & { - srcLight: string; - srcDark: string; -}; +type Props = Omit & { + srcLight: string + srcDark: string +} const ThemeImage = (props: Props) => { - const { srcLight, srcDark, ...rest } = props; + const { srcLight, srcDark, ...rest } = props return ( <> - ); -}; + ) +} export default function Home() { return ( @@ -98,5 +98,5 @@ export default function Home() { - ); + ) } diff --git a/apps/web/app/layout.tsx b/apps/web/app/layout.tsx index 846953755..b929b3f3c 100644 --- a/apps/web/app/layout.tsx +++ b/apps/web/app/layout.tsx @@ -1,25 +1,25 @@ -import type { Metadata } from "next"; -import localFont from "next/font/local"; -import "./globals.css"; +import type { Metadata } from 'next' +import localFont from 'next/font/local' +import './globals.css' const geistSans = localFont({ - src: "./fonts/GeistVF.woff", - variable: "--font-geist-sans", -}); + src: './fonts/GeistVF.woff', + variable: '--font-geist-sans', +}) const geistMono = localFont({ - src: "./fonts/GeistMonoVF.woff", - variable: "--font-geist-mono", -}); + src: './fonts/GeistMonoVF.woff', + variable: '--font-geist-mono', +}) export const metadata: Metadata = { - title: "Create Next App", - description: "Generated by create next app", -}; + title: 'Create Next App', + description: 'Generated by create next app', +} export default function RootLayout({ children, }: Readonly<{ - children: React.ReactNode; + children: React.ReactNode }>) { return ( @@ -27,5 +27,5 @@ export default function RootLayout({ {children} - ); + ) } diff --git a/apps/web/app/page.tsx b/apps/web/app/page.tsx index b509205e4..579b34bca 100644 --- a/apps/web/app/page.tsx +++ b/apps/web/app/page.tsx @@ -1,22 +1,22 @@ -import Image, { type ImageProps } from "next/image"; -import { Button } from "@repo/ui/button"; -import styles from "./page.module.css"; +import Image, { type ImageProps } from 'next/image' +import { Button } from '@repo/ui/button' +import styles from './page.module.css' -type Props = Omit & { - srcLight: string; - srcDark: string; -}; +type Props = Omit & { + srcLight: string + srcDark: string +} const ThemeImage = (props: Props) => { - const { srcLight, srcDark, ...rest } = props; + const { srcLight, srcDark, ...rest } = props return ( <> - ); -}; + ) +} export default function Home() { return ( @@ -98,5 +98,5 @@ export default function Home() { - ); + ) } diff --git a/packages/primitives/src/config.ts b/packages/primitives/src/config.ts index ab3612c56..199c7c95a 100644 --- a/packages/primitives/src/config.ts +++ b/packages/primitives/src/config.ts @@ -1,12 +1,12 @@ -import { Bytes, Hash, Hex } from 'ox' +import { Address, Bytes, Hash, Hex } from 'ox' export type SignerLeaf = { - address: `0x${string}` + address: Address.Address weight: bigint } export type SapientSigner = { - address: `0x${string}` + address: Address.Address weight: bigint imageHash: Uint8Array } @@ -25,7 +25,12 @@ export type NodeLeaf = Uint8Array export type Node = [Topology, Topology] -export type Leaf = SignerLeaf | SubdigestLeaf | NodeLeaf | NestedLeaf | SapientSigner +export type Leaf = + | SignerLeaf + | SubdigestLeaf + | NodeLeaf + | NestedLeaf + | SapientSigner export type Topology = Node | Leaf @@ -33,15 +38,25 @@ export type Configuration = { threshold: bigint checkpoint: bigint topology: Topology - checkpointer?: `0x${string}` + checkpointer?: Address.Address } export function isSignerLeaf(cand: Topology): cand is SignerLeaf { - return typeof cand === 'object' && 'address' in cand && 'weight' in cand && !('imageHash' in cand) + return ( + typeof cand === 'object' && + 'address' in cand && + 'weight' in cand && + !('imageHash' in cand) + ) } export function isSapientSigner(cand: Topology): cand is SapientSigner { - return typeof cand === 'object' && 'address' in cand && 'weight' in cand && 'imageHash' in cand + return ( + typeof cand === 'object' && + 'address' in cand && + 'weight' in cand && + 'imageHash' in cand + ) } export function isSubdigestLeaf(cand: Topology): cand is SubdigestLeaf { @@ -73,7 +88,10 @@ export function isNode(cand: Topology): cand is Node { export function isConfiguration(cand: any): cand is Configuration { return ( - typeof cand === 'object' && 'threshold' in cand && 'checkpoint' in cand && 'topology' in cand + typeof cand === 'object' && + 'threshold' in cand && + 'checkpoint' in cand && + 'topology' in cand ) } @@ -87,16 +105,24 @@ export function isLeaf(cand: Topology): cand is Leaf { ) } -export function hashConfiguration(topology: Topology | Configuration): Uint8Array { +export function hashConfiguration( + topology: Topology | Configuration, +): Uint8Array { if (isConfiguration(topology)) { let root = hashConfiguration(topology.topology) - root = Hash.keccak256(Bytes.concat(root, Bytes.fromNumber(topology.threshold))) - root = Hash.keccak256(Bytes.concat(root, Bytes.fromNumber(topology.checkpoint))) + root = Hash.keccak256( + Bytes.concat(root, Bytes.fromNumber(topology.threshold)), + ) + root = Hash.keccak256( + Bytes.concat(root, Bytes.fromNumber(topology.checkpoint)), + ) root = Hash.keccak256( Bytes.concat( root, - Bytes.fromHex(topology.checkpointer ?? '0x0000000000000000000000000000000000000000') - ) + Bytes.fromHex( + topology.checkpointer ?? '0x0000000000000000000000000000000000000000', + ), + ), ) return root } @@ -113,14 +139,17 @@ export function hashConfiguration(topology: Topology | Configuration): Uint8Arra Bytes.fromString('Sequence sapient config:\n'), Bytes.fromHex(topology.address), Bytes.padLeft(Bytes.fromNumber(topology.weight), 32), - topology.imageHash - ) + topology.imageHash, + ), ) } if (isSubdigestLeaf(topology)) { return Hash.keccak256( - Bytes.concat(Bytes.fromString('Sequence static digest:\n'), topology.digest) + Bytes.concat( + Bytes.fromString('Sequence static digest:\n'), + topology.digest, + ), ) } @@ -134,14 +163,17 @@ export function hashConfiguration(topology: Topology | Configuration): Uint8Arra Bytes.fromString('Sequence nested config:\n'), hashConfiguration(topology.tree), Bytes.padLeft(Bytes.fromNumber(topology.threshold), 32), - Bytes.padLeft(Bytes.fromNumber(topology.weight), 32) - ) + Bytes.padLeft(Bytes.fromNumber(topology.weight), 32), + ), ) } if (isNode(topology)) { return Hash.keccak256( - Bytes.concat(hashConfiguration(topology[0]), hashConfiguration(topology[1])) + Bytes.concat( + hashConfiguration(topology[0]), + hashConfiguration(topology[1]), + ), ) } diff --git a/packages/primitives/src/payload.ts b/packages/primitives/src/payload.ts index 0720fe462..57bdf5810 100644 --- a/packages/primitives/src/payload.ts +++ b/packages/primitives/src/payload.ts @@ -1,7 +1,8 @@ +import { Address, Hex } from 'ox' import { minBytesFor } from './utils' export type Call = { - to: `0x${string}` + to: Address.Address value: bigint data: Uint8Array gasLimit: bigint @@ -24,19 +25,23 @@ export type MessagePayload = { export type ConfigUpdatePayload = { type: 'config-update' - imageHash: `0x${string}` + imageHash: Hex.Hex } export type DigestPayload = { type: 'digest' - digest: `0x${string}` + digest: Hex.Hex } export type ParentPayload = { - parentWallets?: `0x${string}`[] + parentWallets?: Address.Address[] } -export type Payload = CallPayload | MessagePayload | ConfigUpdatePayload | DigestPayload +export type Payload = + | CallPayload + | MessagePayload + | ConfigUpdatePayload + | DigestPayload export type ParentedPayload = Payload & ParentPayload @@ -47,14 +52,14 @@ export function fromMessage(message: Uint8Array): Payload { } } -export function fromConfigUpdate(imageHash: `0x${string}`): Payload { +export function fromConfigUpdate(imageHash: Hex.Hex): Payload { return { type: 'config-update', imageHash, } } -export function fromDigest(digest: `0x${string}`): Payload { +export function fromDigest(digest: Hex.Hex): Payload { return { type: 'digest', digest, @@ -70,7 +75,10 @@ export function fromCall(nonce: bigint, space: bigint, calls: Call[]): Payload { } } -export function encode(payload: CallPayload, self?: `0x${string}`): Uint8Array { +export function encode( + payload: CallPayload, + self?: Address.Address, +): Uint8Array { const callsLen = payload.calls.length const minBytes = minBytesFor(payload.nonce) if (minBytes > 15) { diff --git a/packages/primitives/src/signature.ts b/packages/primitives/src/signature.ts index 1d0296e04..1e5e4af49 100644 --- a/packages/primitives/src/signature.ts +++ b/packages/primitives/src/signature.ts @@ -1,14 +1,13 @@ +import { Address, Bytes } from 'ox' import { - SignerLeaf, - SapientSigner, - isSignerLeaf, - isSapientSigner, - Topology, Leaf, - NodeLeaf, + SapientSigner, + SignerLeaf, SubdigestLeaf, + Topology, + isSapientSigner, + isSignerLeaf, } from './config' -import { Bytes } from 'ox' export type SignedSignerLeaf = SignerLeaf & { signature: @@ -68,7 +67,7 @@ export type RawConfiguration = { threshold: bigint checkpoint: bigint topology: RawTopology - checkpointer?: `0x${string}` + checkpointer?: Address.Address } export type RawSignature = { @@ -113,7 +112,9 @@ export function decodeSignature(signature: Uint8Array): RawSignature { if (index + checkpointSize > signature.length) { throw new Error('Not enough bytes for checkpoint') } - const checkpoint = Bytes.toBigInt(signature.slice(index, index + checkpointSize)) + const checkpoint = Bytes.toBigInt( + signature.slice(index, index + checkpointSize), + ) index += checkpointSize // bit [5] => threshold size offset @@ -121,10 +122,12 @@ export function decodeSignature(signature: Uint8Array): RawSignature { if (index + thresholdSize > signature.length) { throw new Error('Not enough bytes for threshold') } - const threshold = Bytes.toBigInt(signature.slice(index, index + thresholdSize)) + const threshold = Bytes.toBigInt( + signature.slice(index, index + thresholdSize), + ) index += thresholdSize - let checkpointerAddress: `0x${string}` | undefined + let checkpointerAddress: Address.Address | undefined let checkpointerData: Uint8Array | undefined // bit [6] => checkpointer address + data @@ -132,7 +135,7 @@ export function decodeSignature(signature: Uint8Array): RawSignature { if (index + 20 > signature.length) { throw new Error('Not enough bytes for checkpointer address') } - checkpointerAddress = Bytes.toHex(signature.slice(index, index + 20)) as `0x${string}` + checkpointerAddress = Bytes.toHex(signature.slice(index, index + 20)) index += 20 const checkpointerDataSize = (flag & 0x1c) >> 2 @@ -162,7 +165,10 @@ export function decodeSignature(signature: Uint8Array): RawSignature { } } -export function parseBranch(signature: Uint8Array): { nodes: RawTopology[]; leftover: Uint8Array } { +export function parseBranch(signature: Uint8Array): { + nodes: RawTopology[] + leftover: Uint8Array +} { const nodes: RawTopology[] = [] let index = 0 diff --git a/packages/ui/src/button.tsx b/packages/ui/src/button.tsx index 78e5420c3..37c249c2a 100644 --- a/packages/ui/src/button.tsx +++ b/packages/ui/src/button.tsx @@ -1,11 +1,11 @@ -"use client"; +'use client' -import { ReactNode } from "react"; +import { ReactNode } from 'react' interface ButtonProps { - children: ReactNode; - className?: string; - appName: string; + children: ReactNode + className?: string + appName: string } export const Button = ({ children, className, appName }: ButtonProps) => { @@ -16,5 +16,5 @@ export const Button = ({ children, className, appName }: ButtonProps) => { > {children} - ); -}; + ) +} diff --git a/packages/ui/src/card.tsx b/packages/ui/src/card.tsx index 7b988937b..a38d566e0 100644 --- a/packages/ui/src/card.tsx +++ b/packages/ui/src/card.tsx @@ -1,4 +1,4 @@ -import { type JSX } from "react"; +import { type JSX } from 'react' export function Card({ className, @@ -6,10 +6,10 @@ export function Card({ children, href, }: { - className?: string; - title: string; - children: React.ReactNode; - href: string; + className?: string + title: string + children: React.ReactNode + href: string }): JSX.Element { return (

{children}

- ); + ) } diff --git a/packages/ui/src/code.tsx b/packages/ui/src/code.tsx index f7cbd22a8..61fb211f1 100644 --- a/packages/ui/src/code.tsx +++ b/packages/ui/src/code.tsx @@ -1,11 +1,11 @@ -import { type JSX } from "react"; +import { type JSX } from 'react' export function Code({ children, className, }: { - children: React.ReactNode; - className?: string; + children: React.ReactNode + className?: string }): JSX.Element { - return {children}; + return {children} } diff --git a/packages/ui/turbo/generators/config.ts b/packages/ui/turbo/generators/config.ts index 40100baa6..08bff62ad 100644 --- a/packages/ui/turbo/generators/config.ts +++ b/packages/ui/turbo/generators/config.ts @@ -1,30 +1,30 @@ -import type { PlopTypes } from "@turbo/gen"; +import type { PlopTypes } from '@turbo/gen' // Learn more about Turborepo Generators at https://turbo.build/repo/docs/core-concepts/monorepos/code-generation export default function generator(plop: PlopTypes.NodePlopAPI): void { // A simple generator to add a new React component to the internal UI library - plop.setGenerator("react-component", { - description: "Adds a new react component", + plop.setGenerator('react-component', { + description: 'Adds a new react component', prompts: [ { - type: "input", - name: "name", - message: "What is the name of the component?", + type: 'input', + name: 'name', + message: 'What is the name of the component?', }, ], actions: [ { - type: "add", - path: "src/{{kebabCase name}}.tsx", - templateFile: "templates/component.hbs", + type: 'add', + path: 'src/{{kebabCase name}}.tsx', + templateFile: 'templates/component.hbs', }, { - type: "append", - path: "package.json", + type: 'append', + path: 'package.json', pattern: /"exports": {(?)/g, template: ' "./{{kebabCase name}}": "./src/{{kebabCase name}}.tsx",', }, ], - }); + }) } From abdfe1546c7ed9280f156d6dd0a3347681fb3020 Mon Sep 17 00:00:00 2001 From: William Hua Date: Tue, 21 Jan 2025 19:31:41 +0100 Subject: [PATCH 032/439] primitives: getCounterfactualAddress --- packages/primitives/src/address.ts | 29 +++++++++++++++++++++++++++++ packages/primitives/src/index.ts | 1 + 2 files changed, 30 insertions(+) create mode 100644 packages/primitives/src/address.ts diff --git a/packages/primitives/src/address.ts b/packages/primitives/src/address.ts new file mode 100644 index 000000000..cd7102a36 --- /dev/null +++ b/packages/primitives/src/address.ts @@ -0,0 +1,29 @@ +import { Address, Bytes, Hash, Hex } from 'ox' +import { Configuration, hashConfiguration } from './config' + +const FACTORY: Address.Address = '0x' +const MAIN_MODULE: Address.Address = '0x' +const CREATION_CODE: Hex.Hex = '0x' + +export function getCounterfactualAddress( + configuration: Bytes.Bytes | Configuration, +): Address.Address { + const imageHash = + configuration instanceof Uint8Array + ? configuration + : hashConfiguration(configuration) + + return Bytes.toHex( + Hash.keccak256( + Bytes.concat( + Bytes.from('0xff'), + Bytes.from(FACTORY), + imageHash, + Hash.keccak256( + Bytes.concat(Bytes.from(CREATION_CODE), Bytes.from(MAIN_MODULE)), + ), + ), + { as: 'Bytes' }, + ).subarray(12), + ) +} diff --git a/packages/primitives/src/index.ts b/packages/primitives/src/index.ts index b9e05f75c..d66b3f5f0 100644 --- a/packages/primitives/src/index.ts +++ b/packages/primitives/src/index.ts @@ -1,3 +1,4 @@ +export * from './address' export * from './config' export * from './payload' export * from './signature' From b54afa96d7ba5b814569a9ee0d536f76149e5e11 Mon Sep 17 00:00:00 2001 From: William Hua Date: Tue, 21 Jan 2025 18:10:40 +0100 Subject: [PATCH 033/439] core: pnpm add ox --- packages/core/package.json | 3 ++- pnpm-lock.yaml | 3 +++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/packages/core/package.json b/packages/core/package.json index d7518b40b..264cc691e 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -17,6 +17,7 @@ "typescript": "^5.7.3" }, "dependencies": { - "@0xsequence/sequence-primitives": "workspace:^" + "@0xsequence/sequence-primitives": "workspace:^", + "ox": "^0.6.7" } } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index fd9dbc46e..ee978ae7c 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -94,6 +94,9 @@ importers: '@0xsequence/sequence-primitives': specifier: workspace:^ version: link:../primitives + ox: + specifier: ^0.6.7 + version: 0.6.7(typescript@5.7.3) devDependencies: '@repo/typescript-config': specifier: workspace:^ From 2d142a042b963fa9595e4f6da8dc50e950b9d320 Mon Sep 17 00:00:00 2001 From: William Hua Date: Wed, 22 Jan 2025 10:25:44 +0100 Subject: [PATCH 034/439] pnpm format --- packages/primitives-cli/src/index.ts | 9 ++-- .../primitives-cli/src/subcommands/payload.ts | 48 +++++++++++-------- 2 files changed, 33 insertions(+), 24 deletions(-) diff --git a/packages/primitives-cli/src/index.ts b/packages/primitives-cli/src/index.ts index fcd1c78cb..f0f26a24f 100644 --- a/packages/primitives-cli/src/index.ts +++ b/packages/primitives-cli/src/index.ts @@ -1,12 +1,11 @@ #!/usr/bin/env node -import yargs from 'yargs'; -import { hideBin } from 'yargs/helpers'; -import payloadCommand from './subcommands/payload'; +import yargs from 'yargs' +import { hideBin } from 'yargs/helpers' +import payloadCommand from './subcommands/payload' void yargs(hideBin(process.argv)) .command(payloadCommand) .demandCommand(1) .strict() - .help() - .argv + .help().argv diff --git a/packages/primitives-cli/src/subcommands/payload.ts b/packages/primitives-cli/src/subcommands/payload.ts index 55b7c36b6..3d66b0fe9 100644 --- a/packages/primitives-cli/src/subcommands/payload.ts +++ b/packages/primitives-cli/src/subcommands/payload.ts @@ -13,27 +13,37 @@ const payloadCommand: CommandModule = { describe: 'Payload conversion utilities', builder: (yargs) => { return yargs - .command('to-abi ', 'Convert payload to ABI format', (yargs) => { - return yargs.positional('payload', { - type: 'string', - description: 'Input payload to convert', - demandOption: true, - }) - }, async (argv) => { - await convertToAbi(argv.payload) - }) - .command('to-packed ', 'Convert payload to packed format', (yargs) => { - return yargs.positional('payload', { - type: 'string', - description: 'Input payload to convert', - demandOption: true, - }) - }, async (argv) => { - await convertToPacked(argv.payload) - }) + .command( + 'to-abi ', + 'Convert payload to ABI format', + (yargs) => { + return yargs.positional('payload', { + type: 'string', + description: 'Input payload to convert', + demandOption: true, + }) + }, + async (argv) => { + await convertToAbi(argv.payload) + }, + ) + .command( + 'to-packed ', + 'Convert payload to packed format', + (yargs) => { + return yargs.positional('payload', { + type: 'string', + description: 'Input payload to convert', + demandOption: true, + }) + }, + async (argv) => { + await convertToPacked(argv.payload) + }, + ) .demandCommand(1, 'You must specify a subcommand for payload') }, - handler: () => { } + handler: () => {}, } export default payloadCommand From 8550c0af8bd122d4b353504f6e3b8779f7d8ddc3 Mon Sep 17 00:00:00 2001 From: Agusx1211 Date: Wed, 22 Jan 2025 10:29:54 +0000 Subject: [PATCH 035/439] Implement conver to packed calls --- .../primitives-cli/src/subcommands/payload.ts | 98 +++++++++++++- pnpm-lock.yaml | 121 ++++++++++++++++++ 2 files changed, 218 insertions(+), 1 deletion(-) diff --git a/packages/primitives-cli/src/subcommands/payload.ts b/packages/primitives-cli/src/subcommands/payload.ts index 3d66b0fe9..2f69053c8 100644 --- a/packages/primitives-cli/src/subcommands/payload.ts +++ b/packages/primitives-cli/src/subcommands/payload.ts @@ -1,10 +1,106 @@ +import { AbiParameters, Address, Hex } from 'ox' import type { CommandModule } from 'yargs' +import { encode } from '@0xsequence/sequence-primitives' + +const KIND_TRANSACTIONS = 0x00 +const KIND_MESSAGE = 0x01 +const KIND_CONFIG_UPDATE = 0x02 +const KIND_DIGEST = 0x03 + +const BEHAVIOR_IGNORE_ERROR = 0x00 +const BEHAVIOR_REVERT_ON_ERROR = 0x01 +const BEHAVIOR_ABORT_ON_ERROR = 0x02 + +const CallAbi = [ + { type: 'address', name: 'to' }, + { type: 'uint256', name: 'value' }, + { type: 'bytes', name: 'data' }, + { type: 'uint256', name: 'gasLimit' }, + { type: 'bool', name: 'delegateCall' }, + { type: 'bool', name: 'onlyFallback' }, + { type: 'uint256', name: 'behaviorOnError' }, +] + +const DecodedAbi = [ + { type: 'uint8', name: 'kind' }, + { type: 'bool', name: 'noChainId' }, + { + type: 'tuple[]', + name: 'calls', + components: CallAbi + }, + { type: 'uint256', name: 'space' }, + { type: 'uint256', name: 'nonce' }, + { type: 'bytes', name: 'message' }, + { type: 'bytes32', name: 'imageHash' }, + { type: 'bytes32', name: 'digest' }, + { type: 'address[]', name: 'parentWallets' }, +] + +interface SolidityDecoded { + kind: number; + noChainId: boolean; + calls: SolidityCall[]; + space: bigint; + nonce: bigint; + message: Uint8Array; + imageHash: string; + digest: string; + parentWallets: string[]; +} + +interface SolidityCall { + to: string; + value: bigint; + data: Uint8Array; + gasLimit: bigint; + delegateCall: boolean; + onlyFallback: boolean; + behaviorOnError: bigint; +} + +function behaviorOnError(behavior: number): 'ignore' | 'revert' | 'abort' { + switch (behavior) { + case BEHAVIOR_IGNORE_ERROR: + return 'ignore' + case BEHAVIOR_REVERT_ON_ERROR: + return 'revert' + case BEHAVIOR_ABORT_ON_ERROR: + return 'abort' + default: + throw new Error(`Unknown behavior: ${behavior}`) + } +} async function convertToAbi(_payload: string): Promise { throw new Error('Not implemented') } -async function convertToPacked(_payload: string): Promise { +async function convertToPacked(payload: string): Promise { + const decoded = AbiParameters.decode( + [{ type: 'tuple', name: 'payload', components: DecodedAbi }], + payload as Hex.Hex + )[0] as unknown as SolidityDecoded + + if (decoded.kind === KIND_TRANSACTIONS) { + const packed = encode({ + type: 'call', + nonce: decoded.nonce, + space: decoded.space, + calls: decoded.calls.map((call) => ({ + to: Address.from(call.to), + value: call.value, + data: call.data, + gasLimit: call.gasLimit, + delegateCall: call.delegateCall, + onlyFallback: call.onlyFallback, + behaviorOnError: behaviorOnError(Number(call.behaviorOnError)), + })), + }) + console.log(Hex.from(packed)) + return + } + throw new Error('Not implemented') } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index ee978ae7c..2a0901e3b 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -154,6 +154,31 @@ importers: specifier: ^5.7.3 version: 5.7.3 + packages/primitives-cli: + dependencies: + '@0xsequence/sequence-primitives': + specifier: workspace:^ + version: link:../primitives + ox: + specifier: ^0.6.7 + version: 0.6.7(typescript@5.7.3) + yargs: + specifier: ^17.7.2 + version: 17.7.2 + devDependencies: + '@repo/eslint-config': + specifier: workspace:* + version: link:../eslint-config + '@repo/typescript-config': + specifier: workspace:^ + version: link:../typescript-config + '@types/yargs': + specifier: ^17.0.33 + version: 17.0.33 + typescript: + specifier: ^5.7.3 + version: 5.7.3 + packages/typescript-config: {} packages/ui: @@ -560,9 +585,11 @@ packages: '@turbo/gen@1.13.4': resolution: {integrity: sha512-PK38N1fHhDUyjLi0mUjv0RbX0xXGwDLQeRSGsIlLcVpP1B5fwodSIwIYXc9vJok26Yne94BX5AGjueYsUT3uUw==} + hasBin: true '@turbo/workspaces@1.13.4': resolution: {integrity: sha512-3uYg2b5TWCiupetbDFMbBFMHl33xQTvp5DNg0fZSYal73Z9AlFH9yWabHWMYw6ywmwM1evkYRpTVA2n7GgqT5A==} + hasBin: true '@types/estree@1.0.6': resolution: {integrity: sha512-AYnb1nQyY49te+VRAVgmzfcgjYS91mY5P0TKUDCLEM+gNnA+3T6rWITXRLYCpahpqSQbN5cE+gHpnPyXjHWxcw==} @@ -606,6 +633,12 @@ packages: '@types/tinycolor2@1.4.6': resolution: {integrity: sha512-iEN8J0BoMnsWBqjVbWH/c0G0Hh7O21lpR2/+PrvAVgWdzL7eexIFm4JN/Wn10PTcmNdtS6U67r499mlWMXOxNw==} + '@types/yargs-parser@21.0.3': + resolution: {integrity: sha512-I4q9QU9MQv4oEOz4tAHJtNz1cwuLxn2F3xcc2iV5WdqLPpUnj30aUuxt1mAxYTG+oe8CZMV/+6rU4S4gRDzqtQ==} + + '@types/yargs@17.0.33': + resolution: {integrity: sha512-WpxBCKWPLr4xSsHgz511rFJAM+wS28w2zEO1QDNY5zM/S8ok70NNfztH0xwhqKyaK0OHCbN98LDAZuy1ctxDkA==} + '@typescript-eslint/eslint-plugin@8.15.0': resolution: {integrity: sha512-+zkm9AR1Ds9uLWN3fkoeXgFppaQ+uEVtfOV62dDmsy9QCNqlRHWNEck4yarvRNrvRcHQLGfqBNui3cimoz8XAg==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} @@ -691,6 +724,7 @@ packages: acorn@8.14.0: resolution: {integrity: sha512-cl669nCJTZBsL97OF4kUQm5g5hC2uihk0NxY3WENAC0TYdILVkAyHymAntgxGkl7K+t0cXIrH5siy5S4XkFycA==} engines: {node: '>=0.4.0'} + hasBin: true agent-base@7.1.1: resolution: {integrity: sha512-H0TSyFNDMomMNJQBn8wFV5YC/2eJ+VXECwOadZJT554xP6cODZHPX3H9QMQECxvrgiSOP1pHjy1sMWQVYJOUOA==} @@ -861,6 +895,10 @@ packages: client-only@0.0.1: resolution: {integrity: sha512-IV3Ou0jSMzZrd3pZ48nLkT9DA7Ag1pnPzaiQhpW7c3RbcqqzvzzVu+L8gfqMp/8IM2MQtSiqaCxrrcfu8I8rMA==} + cliui@8.0.1: + resolution: {integrity: sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==} + engines: {node: '>=12'} + clone@1.0.4: resolution: {integrity: sha512-JQHZ2QMW6l3aH/j6xCqQThY/9OH4D/9ls34cgkUBiEeocRTU04tHfKPBsUK1PqZCUQM7GiA0IIXJSuXHI64Kbg==} engines: {node: '>=0.8'} @@ -1024,6 +1062,10 @@ packages: resolution: {integrity: sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA==} engines: {node: '>= 0.4'} + escalade@3.2.0: + resolution: {integrity: sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==} + engines: {node: '>=6'} + escape-string-regexp@1.0.5: resolution: {integrity: sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==} engines: {node: '>=0.8.0'} @@ -1035,6 +1077,7 @@ packages: escodegen@2.1.0: resolution: {integrity: sha512-2NlIDTwUWJN0mRPQOdtQBzbUHvdGY2P1VXSyU83Q3xKxM7WHX2Ql8dKq782Q9TgQUNOLEzEYu9bzLNj1q88I5w==} engines: {node: '>=6.0'} + hasBin: true eslint-config-prettier@9.1.0: resolution: {integrity: sha512-NSWl5BFQWEPi1j4TjVNItzYV7dZXZ+wP6I6ZhrBGpChQhZRUaElihE9uRRkcbRnNb76UMKDF3r+WTmNcGPKsqw==} @@ -1092,6 +1135,7 @@ packages: esprima@4.0.1: resolution: {integrity: sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==} engines: {node: '>=4'} + hasBin: true esquery@1.6.0: resolution: {integrity: sha512-ca9pw9fomFcKPvFLXhBKUK90ZvGibiGOvRJNbjljY7s7uq/5YO4BOzcYtJqExdx99rF6aAcnRxHmcUHcz6sQsg==} @@ -1202,6 +1246,10 @@ packages: functions-have-names@1.2.3: resolution: {integrity: sha512-xckBUXyTIqT97tq2x2AMb+g163b5JFysYk0x4qxNFwbfQkmNZoiRHb6sPzI9/QV33WeuvVYBUIiD4NzNIyqaRQ==} + get-caller-file@2.0.5: + resolution: {integrity: sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==} + engines: {node: 6.* || 8.* || >= 10.*} + get-intrinsic@1.2.4: resolution: {integrity: sha512-5uYhsJH8VJBTv7oslg4BznJYhDoRI6waYCxMmCdnTrcCrHA/fCFKoTFz2JKKE0HdDFUF7/oQuhzumXJK7paBRQ==} engines: {node: '>= 0.4'} @@ -1265,6 +1313,7 @@ packages: handlebars@4.7.8: resolution: {integrity: sha512-vafaFqs8MZkRrSX7sFVUdo3ap/eNiLnb4IakshzvP56X5Nr1iGKAIqdX6tMlm6HcNRIkr6AxO5jFEoJzzpT8aQ==} engines: {node: '>=0.4.7'} + hasBin: true has-bigints@1.0.2: resolution: {integrity: sha512-tSvCKtBr9lkF0Ex0aQiP9N+OpV4zi2r/Nee5VkRDbaqv35RLYMzbwQfFSZZH0kR+Rd6302UJZ2p/bJCEoR3VoQ==} @@ -1523,6 +1572,7 @@ packages: js-yaml@4.1.0: resolution: {integrity: sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==} + hasBin: true jsbn@1.1.0: resolution: {integrity: sha512-4bYVV3aAMtDTTu4+xsDYa6sy9GyJ69/amsu9sYF2zqjiEoZA5xJi3BrfX3uY+/IekIu7MwdObdbDWpoZdBv3/A==} @@ -1583,6 +1633,7 @@ packages: loose-envify@1.4.0: resolution: {integrity: sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==} + hasBin: true lower-case-first@1.0.2: resolution: {integrity: sha512-UuxaYakO7XeONbKrZf5FEgkantPf5DUqDayzP5VXZrtRPdH86s4kN47I8B3TW10S4QKiE3ziHNf3kRN//okHjA==} @@ -1624,6 +1675,7 @@ packages: mkdirp@0.5.6: resolution: {integrity: sha512-FP+p8RB8OWpF3YZBCrP5gtADmtXApB5AMLn+vdyA+PyxCjrCs00mjyUozssO33cwDeT3wNGdLxJ5M//YqtHAJw==} + hasBin: true mri@1.2.0: resolution: {integrity: sha512-tzzskb3bG8LvYGFF/mDTpq3jpI6Q9wc3LEmBaghu+DdCssd1FakN7Bc0hVNmEyGq1bq3RgfkCb3cmQLpNPOroA==} @@ -1638,6 +1690,7 @@ packages: nanoid@3.3.7: resolution: {integrity: sha512-eSRppjcPIatRIMC1U6UngP8XFcz8MQWGQdt1MTBQ7NaAmvXDfvNxbvWV3x2y6CdEUciCSsDHDQZbhYaB8QEo2g==} engines: {node: ^10 || ^12 || ^13.7 || ^14 || >=15.0.1} + hasBin: true natural-compare@1.4.0: resolution: {integrity: sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==} @@ -1849,6 +1902,7 @@ packages: prettier@3.3.3: resolution: {integrity: sha512-i2tDNA0O5IrMO757lfrdQZCc2jPNDVntV0m/+4whiDfWaTKfMNgR7Qz0NAeGz/nRqF4m5/6CLzbP4/liHt12Ew==} engines: {node: '>=14'} + hasBin: true prop-types@15.8.1: resolution: {integrity: sha512-oj87CgZICdulUohogVAR7AjlC0327U4el4L6eAvOqCeudMDVU0NThNaV+b9Df4dXgSP1gXMTnPdhfe/2qDH5cg==} @@ -1869,6 +1923,7 @@ packages: rc@1.2.8: resolution: {integrity: sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw==} + hasBin: true react-dom@19.0.0: resolution: {integrity: sha512-4GV5sHFG0e/0AD4X+ySy6UJd3jVl1iNsNHdpad0qhABJ11twS3TTBnseqsKurKcsNqCEFeGL3uLpVChpIO3QfQ==} @@ -1908,6 +1963,10 @@ packages: resolution: {integrity: sha512-ZbgR5aZEdf4UKZVBPYIgaglBmSF2Hi94s2PcIHhRGFjKYu+chjJdYfHn4rt3hB6eCKLJ8giVIIfgMa1ehDfZKA==} engines: {node: '>=0.10.0'} + require-directory@2.1.1: + resolution: {integrity: sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==} + engines: {node: '>=0.10.0'} + resolve-from@4.0.0: resolution: {integrity: sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==} engines: {node: '>=4'} @@ -1918,9 +1977,11 @@ packages: resolve@1.22.8: resolution: {integrity: sha512-oKWePCxqpd6FlLvGV1VU0x7bkPmmCNolxzjMf4NczoDnQcIWrAF+cPtZn5i6n+RfD2d9i0tzpKnG6Yk168yIyw==} + hasBin: true resolve@2.0.0-next.5: resolution: {integrity: sha512-U7WjGVG9sH8tvjW5SmGbQuui75FiyjAX72HX15DwBBwF9dNiQZRQAg9nnPhYy+TUnE0+VcrttuvNI8oSxZcocA==} + hasBin: true restore-cursor@3.1.0: resolution: {integrity: sha512-l+sSefzHpj5qimhFSE5a8nufZYAM3sBSVMAPtYkmC+4EH2anSGaEMXSD0izRQbu9nfyQ9y5JrVmp7E8oZrUjvA==} @@ -1932,6 +1993,7 @@ packages: rimraf@3.0.2: resolution: {integrity: sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==} + hasBin: true run-async@2.4.1: resolution: {integrity: sha512-tvVnVv01b8c1RrA6Ep7JkStj85Guv/YrMcwqYQnwjsAS2cTmmPGBBjAjpCW7RrSodNSoE2/qg9O4bceNvUuDgQ==} @@ -1966,10 +2028,12 @@ packages: semver@6.3.1: resolution: {integrity: sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==} + hasBin: true semver@7.6.3: resolution: {integrity: sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==} engines: {node: '>=10'} + hasBin: true sentence-case@2.1.1: resolution: {integrity: sha512-ENl7cYHaK/Ktwk5OTD+aDbQ3uC8IByu/6Bkg+HDv8Mm+XnBnppVNalcfJTNsp1ibstKh030/JKQQWglDvtKwEQ==} @@ -2242,6 +2306,7 @@ packages: typescript@5.5.4: resolution: {integrity: sha512-Mtq29sKDAEYP7aljRgtPOpTvOfbwRWlS6dPRzwjdE+C0R4brX/GUyhHSecbHMFLNBLcJIPt9nl9yG5TZ1weH+Q==} engines: {node: '>=14.17'} + hasBin: true typescript@5.7.3: resolution: {integrity: sha512-84MVSjMEHP+FQRPy3pX9sTVV/INIex71s9TL2Gm5FG/WG1SqXeKyZ0k7/blY/4FdOzI12CBy1vGc4og/eus0fw==} @@ -2251,6 +2316,7 @@ packages: uglify-js@3.19.3: resolution: {integrity: sha512-v3Xu+yuwBXisp6QYTcH4UbH+xYJXqnq2m/LtQVWKWzYc1iehYnLixoQDN9FH6/j9/oybfd6W9Ghwkl8+UMKTKQ==} engines: {node: '>=0.8.0'} + hasBin: true unbox-primitive@1.0.2: resolution: {integrity: sha512-61pPlCD9h51VoreyJ0BReideM3MDKMKnh6+V9L08331ipq6Q8OFXZYiqP6n/tbHx4s5I9uRhcye6BrbkizkBDw==} @@ -2309,6 +2375,7 @@ packages: which@2.0.2: resolution: {integrity: sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==} engines: {node: '>= 8'} + hasBin: true word-wrap@1.2.5: resolution: {integrity: sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA==} @@ -2321,9 +2388,25 @@ packages: resolution: {integrity: sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA==} engines: {node: '>=8'} + wrap-ansi@7.0.0: + resolution: {integrity: sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==} + engines: {node: '>=10'} + wrappy@1.0.2: resolution: {integrity: sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==} + y18n@5.0.8: + resolution: {integrity: sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==} + engines: {node: '>=10'} + + yargs-parser@21.1.1: + resolution: {integrity: sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==} + engines: {node: '>=12'} + + yargs@17.7.2: + resolution: {integrity: sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==} + engines: {node: '>=12'} + yn@3.1.1: resolution: {integrity: sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q==} engines: {node: '>=6'} @@ -2810,6 +2893,12 @@ snapshots: '@types/tinycolor2@1.4.6': {} + '@types/yargs-parser@21.0.3': {} + + '@types/yargs@17.0.33': + dependencies: + '@types/yargs-parser': 21.0.3 + '@typescript-eslint/eslint-plugin@8.15.0(@typescript-eslint/parser@8.15.0(eslint@9.15.0)(typescript@5.5.4))(eslint@9.15.0)(typescript@5.5.4)': dependencies: '@eslint-community/regexpp': 4.12.1 @@ -3122,6 +3211,12 @@ snapshots: client-only@0.0.1: {} + cliui@8.0.1: + dependencies: + string-width: 4.2.3 + strip-ansi: 6.0.1 + wrap-ansi: 7.0.0 + clone@1.0.4: {} color-convert@1.9.3: @@ -3351,6 +3446,8 @@ snapshots: is-date-object: 1.0.5 is-symbol: 1.0.4 + escalade@3.2.0: {} + escape-string-regexp@1.0.5: {} escape-string-regexp@4.0.0: {} @@ -3586,6 +3683,8 @@ snapshots: functions-have-names@1.2.3: {} + get-caller-file@2.0.5: {} + get-intrinsic@1.2.4: dependencies: es-errors: 1.3.0 @@ -4365,6 +4464,8 @@ snapshots: dependencies: rc: 1.2.8 + require-directory@2.1.1: {} + resolve-from@4.0.0: {} resolve-from@5.0.0: {} @@ -4840,8 +4941,28 @@ snapshots: string-width: 4.2.3 strip-ansi: 6.0.1 + wrap-ansi@7.0.0: + dependencies: + ansi-styles: 4.3.0 + string-width: 4.2.3 + strip-ansi: 6.0.1 + wrappy@1.0.2: {} + y18n@5.0.8: {} + + yargs-parser@21.1.1: {} + + yargs@17.7.2: + dependencies: + cliui: 8.0.1 + escalade: 3.2.0 + get-caller-file: 2.0.5 + require-directory: 2.1.1 + string-width: 4.2.3 + y18n: 5.0.8 + yargs-parser: 21.1.1 + yn@3.1.1: {} yocto-queue@0.1.0: {} From 4caed4aa0a28f2b8566a0457e1b8ad8dea4b8665 Mon Sep 17 00:00:00 2001 From: Agusx1211 Date: Wed, 22 Jan 2025 12:16:01 +0000 Subject: [PATCH 036/439] Payload packing fixes --- .../primitives-cli/src/subcommands/payload.ts | 31 ++++++++++++++++--- packages/primitives/src/payload.ts | 4 +-- 2 files changed, 29 insertions(+), 6 deletions(-) diff --git a/packages/primitives-cli/src/subcommands/payload.ts b/packages/primitives-cli/src/subcommands/payload.ts index 2f69053c8..c81f96a5f 100644 --- a/packages/primitives-cli/src/subcommands/payload.ts +++ b/packages/primitives-cli/src/subcommands/payload.ts @@ -1,4 +1,4 @@ -import { AbiParameters, Address, Hex } from 'ox' +import { AbiParameters, Address, Bytes, Hex } from 'ox' import type { CommandModule } from 'yargs' import { encode } from '@0xsequence/sequence-primitives' @@ -43,7 +43,7 @@ interface SolidityDecoded { calls: SolidityCall[]; space: bigint; nonce: bigint; - message: Uint8Array; + message: string; imageHash: string; digest: string; parentWallets: string[]; @@ -52,7 +52,7 @@ interface SolidityDecoded { interface SolidityCall { to: string; value: bigint; - data: Uint8Array; + data: string; gasLimit: bigint; delegateCall: boolean; onlyFallback: boolean; @@ -90,7 +90,7 @@ async function convertToPacked(payload: string): Promise { calls: decoded.calls.map((call) => ({ to: Address.from(call.to), value: call.value, - data: call.data, + data: Bytes.from(call.data as Hex.Hex), gasLimit: call.gasLimit, delegateCall: call.delegateCall, onlyFallback: call.onlyFallback, @@ -104,6 +104,15 @@ async function convertToPacked(payload: string): Promise { throw new Error('Not implemented') } +async function convertToHuman(payload: string): Promise { + const decoded = AbiParameters.decode( + [{ type: 'tuple', name: 'payload', components: DecodedAbi }], + payload as Hex.Hex + )[0] as unknown as SolidityDecoded + + console.log(decoded) +} + const payloadCommand: CommandModule = { command: 'payload', describe: 'Payload conversion utilities', @@ -137,6 +146,20 @@ const payloadCommand: CommandModule = { await convertToPacked(argv.payload) }, ) + .command( + 'to-human ', + 'Convert payload to human readable format', + (yargs) => { + return yargs.positional('payload', { + type: 'string', + description: 'Input payload to convert', + demandOption: true, + }) + }, + async (argv) => { + await convertToHuman(argv.payload) + }, + ) .demandCommand(1, 'You must specify a subcommand for payload') }, handler: () => {}, diff --git a/packages/primitives/src/payload.ts b/packages/primitives/src/payload.ts index 57bdf5810..eb6c30cfc 100644 --- a/packages/primitives/src/payload.ts +++ b/packages/primitives/src/payload.ts @@ -88,8 +88,8 @@ export function encode( /* globalFlag layout: - bit 0: spaceZeroFlag => 1 if space == 0, else 0 - bits [1..4]: nonceBytes => how many bytes we use to encode nonce + bit 1: spaceZeroFlag => 1 if space == 0, else 0 + bits [2..4]: nonceBytes => how many bytes we use to encode nonce bit 5: singleCallFlag => 1 if there's exactly one call, else 0 bit 6: callsCountSizeFlag => 1 if #calls stored in 1 byte, else 0 if stored in 2 bytes From 7a8cf6cc0524516f0764fd2d9c6a8948c1eed814 Mon Sep 17 00:00:00 2001 From: William Hua Date: Wed, 22 Jan 2025 19:05:27 +0100 Subject: [PATCH 037/439] primitives: make SignerLeaf.imageHash undefined to differentiate it from SapientSigner --- packages/primitives/src/config.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/primitives/src/config.ts b/packages/primitives/src/config.ts index 199c7c95a..5d03bb669 100644 --- a/packages/primitives/src/config.ts +++ b/packages/primitives/src/config.ts @@ -3,6 +3,7 @@ import { Address, Bytes, Hash, Hex } from 'ox' export type SignerLeaf = { address: Address.Address weight: bigint + imageHash: undefined } export type SapientSigner = { From e80bb785ad66a68c7246f9d9a0228bc94251f8fe Mon Sep 17 00:00:00 2001 From: William Hua Date: Wed, 22 Jan 2025 19:05:40 +0100 Subject: [PATCH 038/439] primitives: getSigners --- packages/primitives/src/config.ts | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/packages/primitives/src/config.ts b/packages/primitives/src/config.ts index 5d03bb669..f83f1643f 100644 --- a/packages/primitives/src/config.ts +++ b/packages/primitives/src/config.ts @@ -106,6 +106,35 @@ export function isLeaf(cand: Topology): cand is Leaf { ) } +export function getSigners(configuration: Configuration | Topology): { + signers: Address.Address[] + isComplete: boolean +} { + const signers = new Set() + let isComplete = true + + const scan = (topology: Topology) => { + if (isNode(topology)) { + scan(topology[0]) + scan(topology[1]) + } else if (isSignerLeaf(topology)) { + if (topology.weight) { + signers.add(topology.address) + } + } else if (isNodeLeaf(topology)) { + isComplete = false + } else if (isNestedLeaf(topology)) { + if (topology.weight) { + scan(topology.tree) + } + } + } + + scan(isConfiguration(configuration) ? configuration.topology : configuration) + + return { signers: Array.from(signers), isComplete } +} + export function hashConfiguration( topology: Topology | Configuration, ): Uint8Array { From 2266aac1e7aa2497ed31a2b38ed0acf27ce1e23e Mon Sep 17 00:00:00 2001 From: William Hua Date: Wed, 22 Jan 2025 19:58:32 +0100 Subject: [PATCH 039/439] primitives: getPotentialWeight --- packages/primitives/src/config.ts | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/packages/primitives/src/config.ts b/packages/primitives/src/config.ts index f83f1643f..3c00ed0eb 100644 --- a/packages/primitives/src/config.ts +++ b/packages/primitives/src/config.ts @@ -135,6 +135,29 @@ export function getSigners(configuration: Configuration | Topology): { return { signers: Array.from(signers), isComplete } } +export function getPotentialWeight( + configuration: Configuration, + signers: Address.Address[], +): bigint { + const set = new Set(signers) + + const scan = (topology: Topology): bigint => { + if (isNode(topology)) { + return scan(topology[0]) + scan(topology[1]) + } else if (isSignerLeaf(topology)) { + return set.has(topology.address) ? topology.weight : 0n + } else if (isNestedLeaf(topology)) { + return scan(topology.tree) >= topology.threshold ? topology.weight : 0n + } else { + return 0n + } + } + + return scan( + isConfiguration(configuration) ? configuration.topology : configuration, + ) +} + export function hashConfiguration( topology: Topology | Configuration, ): Uint8Array { From d85159c3917f74306d63d4cedf0aff325b0ab951 Mon Sep 17 00:00:00 2001 From: William Hua Date: Thu, 23 Jan 2025 07:40:51 +0100 Subject: [PATCH 040/439] prettier: printWidth = 120 --- .prettierrc | 1 + apps/docs/app/layout.tsx | 4 +- apps/docs/app/page.tsx | 30 +----- apps/web/app/layout.tsx | 4 +- apps/web/app/page.tsx | 30 +----- packages/primitives-cli/src/index.ts | 6 +- .../primitives-cli/src/subcommands/payload.ts | 38 ++++---- packages/primitives/src/address.ts | 13 +-- packages/primitives/src/config.ts | 93 +++---------------- packages/primitives/src/payload.ts | 11 +-- packages/primitives/src/signature.ts | 18 +--- packages/ui/src/button.tsx | 5 +- packages/ui/src/code.tsx | 8 +- 13 files changed, 56 insertions(+), 205 deletions(-) diff --git a/.prettierrc b/.prettierrc index b2095be81..cbe842acd 100644 --- a/.prettierrc +++ b/.prettierrc @@ -1,4 +1,5 @@ { + "printWidth": 120, "semi": false, "singleQuote": true } diff --git a/apps/docs/app/layout.tsx b/apps/docs/app/layout.tsx index b929b3f3c..2e5719345 100644 --- a/apps/docs/app/layout.tsx +++ b/apps/docs/app/layout.tsx @@ -23,9 +23,7 @@ export default function RootLayout({ }>) { return ( - - {children} - + {children} ) } diff --git a/apps/docs/app/page.tsx b/apps/docs/app/page.tsx index 723c06043..980bd5ff3 100644 --- a/apps/docs/app/page.tsx +++ b/apps/docs/app/page.tsx @@ -45,13 +45,7 @@ export default function Home() { target="_blank" rel="noopener noreferrer" > - Vercel logomark + Vercel logomark Deploy now - Window icon + Window icon Examples - - Globe icon + + Globe icon Go to turbo.build → diff --git a/apps/web/app/layout.tsx b/apps/web/app/layout.tsx index b929b3f3c..2e5719345 100644 --- a/apps/web/app/layout.tsx +++ b/apps/web/app/layout.tsx @@ -23,9 +23,7 @@ export default function RootLayout({ }>) { return ( - - {children} - + {children} ) } diff --git a/apps/web/app/page.tsx b/apps/web/app/page.tsx index 579b34bca..4db724567 100644 --- a/apps/web/app/page.tsx +++ b/apps/web/app/page.tsx @@ -45,13 +45,7 @@ export default function Home() { target="_blank" rel="noopener noreferrer" > - Vercel logomark + Vercel logomark Deploy now - Window icon + Window icon Examples - - Globe icon + + Globe icon Go to turbo.build → diff --git a/packages/primitives-cli/src/index.ts b/packages/primitives-cli/src/index.ts index f0f26a24f..c394e1524 100644 --- a/packages/primitives-cli/src/index.ts +++ b/packages/primitives-cli/src/index.ts @@ -4,8 +4,4 @@ import yargs from 'yargs' import { hideBin } from 'yargs/helpers' import payloadCommand from './subcommands/payload' -void yargs(hideBin(process.argv)) - .command(payloadCommand) - .demandCommand(1) - .strict() - .help().argv +void yargs(hideBin(process.argv)).command(payloadCommand).demandCommand(1).strict().help().argv diff --git a/packages/primitives-cli/src/subcommands/payload.ts b/packages/primitives-cli/src/subcommands/payload.ts index c81f96a5f..790ee860a 100644 --- a/packages/primitives-cli/src/subcommands/payload.ts +++ b/packages/primitives-cli/src/subcommands/payload.ts @@ -27,7 +27,7 @@ const DecodedAbi = [ { type: 'tuple[]', name: 'calls', - components: CallAbi + components: CallAbi, }, { type: 'uint256', name: 'space' }, { type: 'uint256', name: 'nonce' }, @@ -38,25 +38,25 @@ const DecodedAbi = [ ] interface SolidityDecoded { - kind: number; - noChainId: boolean; - calls: SolidityCall[]; - space: bigint; - nonce: bigint; - message: string; - imageHash: string; - digest: string; - parentWallets: string[]; + kind: number + noChainId: boolean + calls: SolidityCall[] + space: bigint + nonce: bigint + message: string + imageHash: string + digest: string + parentWallets: string[] } interface SolidityCall { - to: string; - value: bigint; - data: string; - gasLimit: bigint; - delegateCall: boolean; - onlyFallback: boolean; - behaviorOnError: bigint; + to: string + value: bigint + data: string + gasLimit: bigint + delegateCall: boolean + onlyFallback: boolean + behaviorOnError: bigint } function behaviorOnError(behavior: number): 'ignore' | 'revert' | 'abort' { @@ -79,7 +79,7 @@ async function convertToAbi(_payload: string): Promise { async function convertToPacked(payload: string): Promise { const decoded = AbiParameters.decode( [{ type: 'tuple', name: 'payload', components: DecodedAbi }], - payload as Hex.Hex + payload as Hex.Hex, )[0] as unknown as SolidityDecoded if (decoded.kind === KIND_TRANSACTIONS) { @@ -107,7 +107,7 @@ async function convertToPacked(payload: string): Promise { async function convertToHuman(payload: string): Promise { const decoded = AbiParameters.decode( [{ type: 'tuple', name: 'payload', components: DecodedAbi }], - payload as Hex.Hex + payload as Hex.Hex, )[0] as unknown as SolidityDecoded console.log(decoded) diff --git a/packages/primitives/src/address.ts b/packages/primitives/src/address.ts index cd7102a36..86d172309 100644 --- a/packages/primitives/src/address.ts +++ b/packages/primitives/src/address.ts @@ -5,13 +5,8 @@ const FACTORY: Address.Address = '0x' const MAIN_MODULE: Address.Address = '0x' const CREATION_CODE: Hex.Hex = '0x' -export function getCounterfactualAddress( - configuration: Bytes.Bytes | Configuration, -): Address.Address { - const imageHash = - configuration instanceof Uint8Array - ? configuration - : hashConfiguration(configuration) +export function getCounterfactualAddress(configuration: Bytes.Bytes | Configuration): Address.Address { + const imageHash = configuration instanceof Uint8Array ? configuration : hashConfiguration(configuration) return Bytes.toHex( Hash.keccak256( @@ -19,9 +14,7 @@ export function getCounterfactualAddress( Bytes.from('0xff'), Bytes.from(FACTORY), imageHash, - Hash.keccak256( - Bytes.concat(Bytes.from(CREATION_CODE), Bytes.from(MAIN_MODULE)), - ), + Hash.keccak256(Bytes.concat(Bytes.from(CREATION_CODE), Bytes.from(MAIN_MODULE))), ), { as: 'Bytes' }, ).subarray(12), diff --git a/packages/primitives/src/config.ts b/packages/primitives/src/config.ts index 3c00ed0eb..d596a8abd 100644 --- a/packages/primitives/src/config.ts +++ b/packages/primitives/src/config.ts @@ -26,12 +26,7 @@ export type NodeLeaf = Uint8Array export type Node = [Topology, Topology] -export type Leaf = - | SignerLeaf - | SubdigestLeaf - | NodeLeaf - | NestedLeaf - | SapientSigner +export type Leaf = SignerLeaf | SubdigestLeaf | NodeLeaf | NestedLeaf | SapientSigner export type Topology = Node | Leaf @@ -43,21 +38,11 @@ export type Configuration = { } export function isSignerLeaf(cand: Topology): cand is SignerLeaf { - return ( - typeof cand === 'object' && - 'address' in cand && - 'weight' in cand && - !('imageHash' in cand) - ) + return typeof cand === 'object' && 'address' in cand && 'weight' in cand && !('imageHash' in cand) } export function isSapientSigner(cand: Topology): cand is SapientSigner { - return ( - typeof cand === 'object' && - 'address' in cand && - 'weight' in cand && - 'imageHash' in cand - ) + return typeof cand === 'object' && 'address' in cand && 'weight' in cand && 'imageHash' in cand } export function isSubdigestLeaf(cand: Topology): cand is SubdigestLeaf { @@ -69,41 +54,19 @@ export function isNodeLeaf(cand: Topology): cand is NodeLeaf { } export function isNestedLeaf(cand: Topology): cand is NestedLeaf { - return ( - typeof cand === 'object' && - !Array.isArray(cand) && - 'tree' in cand && - 'weight' in cand && - 'threshold' in cand - ) + return typeof cand === 'object' && !Array.isArray(cand) && 'tree' in cand && 'weight' in cand && 'threshold' in cand } export function isNode(cand: Topology): cand is Node { - return ( - Array.isArray(cand) && - cand.length === 2 && - isLeaf(cand[0]) && - isLeaf(cand[1]) - ) + return Array.isArray(cand) && cand.length === 2 && isLeaf(cand[0]) && isLeaf(cand[1]) } export function isConfiguration(cand: any): cand is Configuration { - return ( - typeof cand === 'object' && - 'threshold' in cand && - 'checkpoint' in cand && - 'topology' in cand - ) + return typeof cand === 'object' && 'threshold' in cand && 'checkpoint' in cand && 'topology' in cand } export function isLeaf(cand: Topology): cand is Leaf { - return ( - isSignerLeaf(cand) || - isSapientSigner(cand) || - isSubdigestLeaf(cand) || - isNodeLeaf(cand) || - isNestedLeaf(cand) - ) + return isSignerLeaf(cand) || isSapientSigner(cand) || isSubdigestLeaf(cand) || isNodeLeaf(cand) || isNestedLeaf(cand) } export function getSigners(configuration: Configuration | Topology): { @@ -135,10 +98,7 @@ export function getSigners(configuration: Configuration | Topology): { return { signers: Array.from(signers), isComplete } } -export function getPotentialWeight( - configuration: Configuration, - signers: Address.Address[], -): bigint { +export function getPotentialWeight(configuration: Configuration, signers: Address.Address[]): bigint { const set = new Set(signers) const scan = (topology: Topology): bigint => { @@ -153,29 +113,16 @@ export function getPotentialWeight( } } - return scan( - isConfiguration(configuration) ? configuration.topology : configuration, - ) + return scan(isConfiguration(configuration) ? configuration.topology : configuration) } -export function hashConfiguration( - topology: Topology | Configuration, -): Uint8Array { +export function hashConfiguration(topology: Topology | Configuration): Uint8Array { if (isConfiguration(topology)) { let root = hashConfiguration(topology.topology) + root = Hash.keccak256(Bytes.concat(root, Bytes.fromNumber(topology.threshold))) + root = Hash.keccak256(Bytes.concat(root, Bytes.fromNumber(topology.checkpoint))) root = Hash.keccak256( - Bytes.concat(root, Bytes.fromNumber(topology.threshold)), - ) - root = Hash.keccak256( - Bytes.concat(root, Bytes.fromNumber(topology.checkpoint)), - ) - root = Hash.keccak256( - Bytes.concat( - root, - Bytes.fromHex( - topology.checkpointer ?? '0x0000000000000000000000000000000000000000', - ), - ), + Bytes.concat(root, Bytes.fromHex(topology.checkpointer ?? '0x0000000000000000000000000000000000000000')), ) return root } @@ -198,12 +145,7 @@ export function hashConfiguration( } if (isSubdigestLeaf(topology)) { - return Hash.keccak256( - Bytes.concat( - Bytes.fromString('Sequence static digest:\n'), - topology.digest, - ), - ) + return Hash.keccak256(Bytes.concat(Bytes.fromString('Sequence static digest:\n'), topology.digest)) } if (isNodeLeaf(topology)) { @@ -222,12 +164,7 @@ export function hashConfiguration( } if (isNode(topology)) { - return Hash.keccak256( - Bytes.concat( - hashConfiguration(topology[0]), - hashConfiguration(topology[1]), - ), - ) + return Hash.keccak256(Bytes.concat(hashConfiguration(topology[0]), hashConfiguration(topology[1]))) } throw new Error('Invalid topology') diff --git a/packages/primitives/src/payload.ts b/packages/primitives/src/payload.ts index eb6c30cfc..3539ea987 100644 --- a/packages/primitives/src/payload.ts +++ b/packages/primitives/src/payload.ts @@ -37,11 +37,7 @@ export type ParentPayload = { parentWallets?: Address.Address[] } -export type Payload = - | CallPayload - | MessagePayload - | ConfigUpdatePayload - | DigestPayload +export type Payload = CallPayload | MessagePayload | ConfigUpdatePayload | DigestPayload export type ParentedPayload = Payload & ParentPayload @@ -75,10 +71,7 @@ export function fromCall(nonce: bigint, space: bigint, calls: Call[]): Payload { } } -export function encode( - payload: CallPayload, - self?: Address.Address, -): Uint8Array { +export function encode(payload: CallPayload, self?: Address.Address): Uint8Array { const callsLen = payload.calls.length const minBytes = minBytesFor(payload.nonce) if (minBytes > 15) { diff --git a/packages/primitives/src/signature.ts b/packages/primitives/src/signature.ts index 1e5e4af49..7cd20a604 100644 --- a/packages/primitives/src/signature.ts +++ b/packages/primitives/src/signature.ts @@ -1,13 +1,5 @@ import { Address, Bytes } from 'ox' -import { - Leaf, - SapientSigner, - SignerLeaf, - SubdigestLeaf, - Topology, - isSapientSigner, - isSignerLeaf, -} from './config' +import { Leaf, SapientSigner, SignerLeaf, SubdigestLeaf, Topology, isSapientSigner, isSignerLeaf } from './config' export type SignedSignerLeaf = SignerLeaf & { signature: @@ -112,9 +104,7 @@ export function decodeSignature(signature: Uint8Array): RawSignature { if (index + checkpointSize > signature.length) { throw new Error('Not enough bytes for checkpoint') } - const checkpoint = Bytes.toBigInt( - signature.slice(index, index + checkpointSize), - ) + const checkpoint = Bytes.toBigInt(signature.slice(index, index + checkpointSize)) index += checkpointSize // bit [5] => threshold size offset @@ -122,9 +112,7 @@ export function decodeSignature(signature: Uint8Array): RawSignature { if (index + thresholdSize > signature.length) { throw new Error('Not enough bytes for threshold') } - const threshold = Bytes.toBigInt( - signature.slice(index, index + thresholdSize), - ) + const threshold = Bytes.toBigInt(signature.slice(index, index + thresholdSize)) index += thresholdSize let checkpointerAddress: Address.Address | undefined diff --git a/packages/ui/src/button.tsx b/packages/ui/src/button.tsx index 37c249c2a..2cb47bb9c 100644 --- a/packages/ui/src/button.tsx +++ b/packages/ui/src/button.tsx @@ -10,10 +10,7 @@ interface ButtonProps { export const Button = ({ children, className, appName }: ButtonProps) => { return ( - ) diff --git a/packages/ui/src/code.tsx b/packages/ui/src/code.tsx index 61fb211f1..af16618ae 100644 --- a/packages/ui/src/code.tsx +++ b/packages/ui/src/code.tsx @@ -1,11 +1,5 @@ import { type JSX } from 'react' -export function Code({ - children, - className, -}: { - children: React.ReactNode - className?: string -}): JSX.Element { +export function Code({ children, className }: { children: React.ReactNode; className?: string }): JSX.Element { return {children} } From fb5a2cb120ddc57a254fb9f2f0c6757ffa1b7716 Mon Sep 17 00:00:00 2001 From: William Hua Date: Thu, 23 Jan 2025 09:13:39 +0100 Subject: [PATCH 041/439] primitives: getPotentialWeight -> getWeight --- packages/primitives/src/config.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/primitives/src/config.ts b/packages/primitives/src/config.ts index d596a8abd..fb92461e6 100644 --- a/packages/primitives/src/config.ts +++ b/packages/primitives/src/config.ts @@ -98,7 +98,7 @@ export function getSigners(configuration: Configuration | Topology): { return { signers: Array.from(signers), isComplete } } -export function getPotentialWeight(configuration: Configuration, signers: Address.Address[]): bigint { +export function getWeight(configuration: Configuration, signers: Address.Address[]): bigint { const set = new Set(signers) const scan = (topology: Topology): bigint => { From 8eb76a1102bac8c25e91bfea7f298c0ad58bc903 Mon Sep 17 00:00:00 2001 From: William Hua Date: Thu, 23 Jan 2025 16:07:06 +0100 Subject: [PATCH 042/439] primitives: Uint8Array -> Bytes.Bytes --- packages/primitives/src/config.ts | 8 ++++---- packages/primitives/src/payload.ts | 12 ++++++------ packages/primitives/src/signature.ts | 28 ++++++++++++++-------------- 3 files changed, 24 insertions(+), 24 deletions(-) diff --git a/packages/primitives/src/config.ts b/packages/primitives/src/config.ts index fb92461e6..3178a58ed 100644 --- a/packages/primitives/src/config.ts +++ b/packages/primitives/src/config.ts @@ -9,11 +9,11 @@ export type SignerLeaf = { export type SapientSigner = { address: Address.Address weight: bigint - imageHash: Uint8Array + imageHash: Bytes.Bytes } export type SubdigestLeaf = { - digest: Uint8Array + digest: Bytes.Bytes } export type NestedLeaf = { @@ -22,7 +22,7 @@ export type NestedLeaf = { threshold: bigint } -export type NodeLeaf = Uint8Array +export type NodeLeaf = Bytes.Bytes export type Node = [Topology, Topology] @@ -116,7 +116,7 @@ export function getWeight(configuration: Configuration, signers: Address.Address return scan(isConfiguration(configuration) ? configuration.topology : configuration) } -export function hashConfiguration(topology: Topology | Configuration): Uint8Array { +export function hashConfiguration(topology: Topology | Configuration): Bytes.Bytes { if (isConfiguration(topology)) { let root = hashConfiguration(topology.topology) root = Hash.keccak256(Bytes.concat(root, Bytes.fromNumber(topology.threshold))) diff --git a/packages/primitives/src/payload.ts b/packages/primitives/src/payload.ts index 3539ea987..d7259d7b4 100644 --- a/packages/primitives/src/payload.ts +++ b/packages/primitives/src/payload.ts @@ -1,10 +1,10 @@ -import { Address, Hex } from 'ox' +import { Address, Bytes, Hex } from 'ox' import { minBytesFor } from './utils' export type Call = { to: Address.Address value: bigint - data: Uint8Array + data: Bytes.Bytes gasLimit: bigint delegateCall: boolean onlyFallback: boolean @@ -20,7 +20,7 @@ export type CallPayload = { export type MessagePayload = { type: 'message' - message: Uint8Array + message: Bytes.Bytes } export type ConfigUpdatePayload = { @@ -41,7 +41,7 @@ export type Payload = CallPayload | MessagePayload | ConfigUpdatePayload | Diges export type ParentedPayload = Payload & ParentPayload -export function fromMessage(message: Uint8Array): Payload { +export function fromMessage(message: Bytes.Bytes): Payload { return { type: 'message', message, @@ -71,7 +71,7 @@ export function fromCall(nonce: bigint, space: bigint, calls: Call[]): Payload { } } -export function encode(payload: CallPayload, self?: Address.Address): Uint8Array { +export function encode(payload: CallPayload, self?: Address.Address): Bytes.Bytes { const callsLen = payload.calls.length const minBytes = minBytesFor(payload.nonce) if (minBytes > 15) { @@ -233,5 +233,5 @@ export function encode(payload: CallPayload, self?: Address.Address): Uint8Array } } - return new Uint8Array(out) + return Bytes.from(out) } diff --git a/packages/primitives/src/signature.ts b/packages/primitives/src/signature.ts index 7cd20a604..1051c7f02 100644 --- a/packages/primitives/src/signature.ts +++ b/packages/primitives/src/signature.ts @@ -4,20 +4,20 @@ import { Leaf, SapientSigner, SignerLeaf, SubdigestLeaf, Topology, isSapientSign export type SignedSignerLeaf = SignerLeaf & { signature: | { - r: Uint8Array - s: Uint8Array + r: Bytes.Bytes + s: Bytes.Bytes v: number type: 'eth_sign' | 'hash' } | { - data: Uint8Array + data: Bytes.Bytes type: 'erc1271' } } export type SignedSapientLeaf = SapientSigner & { signature: { - data: Uint8Array + data: Bytes.Bytes type: 'sapient' | 'sapient_compact' } } @@ -26,19 +26,19 @@ export type RawSignerLeaf = { weight: bigint signature: | { - r: Uint8Array - s: Uint8Array + r: Bytes.Bytes + s: Bytes.Bytes v: number type: 'eth_sign' | 'hash' } | { address: string - data: Uint8Array + data: Bytes.Bytes type: 'erc1271' } | { address: string - data: Uint8Array + data: Bytes.Bytes type: 'sapient' | 'sapient_compact' } } @@ -64,14 +64,14 @@ export type RawConfiguration = { export type RawSignature = { noChainId: boolean - checkpointerData?: Uint8Array + checkpointerData?: Bytes.Bytes configuration: RawConfiguration suffix?: Omit[] } export type Signature = { noChainId: boolean - checkpointerData?: Uint8Array + checkpointerData?: Bytes.Bytes topology: Topology suffix?: Omit[] } @@ -84,7 +84,7 @@ export function isSignedSapientLeaf(cand: any): cand is SignedSapientLeaf { return isSapientSigner(cand) && 'signature' in cand } -export function decodeSignature(signature: Uint8Array): RawSignature { +export function decodeSignature(signature: Bytes.Bytes): RawSignature { if (signature.length < 1) { throw new Error('Signature is empty') } @@ -116,7 +116,7 @@ export function decodeSignature(signature: Uint8Array): RawSignature { index += thresholdSize let checkpointerAddress: Address.Address | undefined - let checkpointerData: Uint8Array | undefined + let checkpointerData: Bytes.Bytes | undefined // bit [6] => checkpointer address + data if ((flag & 0x40) === 0x40) { @@ -153,9 +153,9 @@ export function decodeSignature(signature: Uint8Array): RawSignature { } } -export function parseBranch(signature: Uint8Array): { +export function parseBranch(signature: Bytes.Bytes): { nodes: RawTopology[] - leftover: Uint8Array + leftover: Bytes.Bytes } { const nodes: RawTopology[] = [] let index = 0 From 30d79048a8f1b42c1e0e5837b468713628dc28ff Mon Sep 17 00:00:00 2001 From: William Hua Date: Thu, 23 Jan 2025 16:10:03 +0100 Subject: [PATCH 043/439] primitives-cli: pnpm add -D @types/node --- packages/primitives-cli/package.json | 1 + pnpm-lock.yaml | 15 +++++++++++++++ 2 files changed, 16 insertions(+) diff --git a/packages/primitives-cli/package.json b/packages/primitives-cli/package.json index 93be0a984..f5f4243de 100644 --- a/packages/primitives-cli/package.json +++ b/packages/primitives-cli/package.json @@ -15,6 +15,7 @@ "devDependencies": { "@repo/eslint-config": "workspace:*", "@repo/typescript-config": "workspace:^", + "@types/node": "^22.10.9", "@types/yargs": "^17.0.33", "typescript": "^5.7.3" }, diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 2a0901e3b..6042055d2 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -172,6 +172,9 @@ importers: '@repo/typescript-config': specifier: workspace:^ version: link:../typescript-config + '@types/node': + specifier: ^22.10.9 + version: 22.10.9 '@types/yargs': specifier: ^17.0.33 version: 17.0.33 @@ -612,6 +615,9 @@ packages: '@types/node@20.17.6': resolution: {integrity: sha512-VEI7OdvK2wP7XHnsuXbAJnEpEkF6NjSN45QJlL4VGqZSXsnicpesdTWsg9RISeSdYd3yeRj/y3k5KGjUXYnFwQ==} + '@types/node@22.10.9': + resolution: {integrity: sha512-Ir6hwgsKyNESl/gLOcEz3krR4CBGgliDqBQ2ma4wIhEx0w+xnoeTq3tdrNw15kU3SxogDjOgv9sqdtLW8mIHaw==} + '@types/prop-types@15.7.13': resolution: {integrity: sha512-hCZTSvwbzWGvhqxp/RqVqwU999pBf2vp7hzIjiYOsl8wqOmUxkQ6ddw1cV3l8811+kdUFus/q4d1Y3E3SyEifA==} @@ -2324,6 +2330,9 @@ packages: undici-types@6.19.8: resolution: {integrity: sha512-ve2KP6f/JnbPBFyobGHuerC9g1FYGn/F8n1LWTwNxCEzd6IfqTwUQcNXgEtmmQ6DlRrC1hrSrBnCZPokRrDHjw==} + undici-types@6.20.0: + resolution: {integrity: sha512-Ny6QZ2Nju20vw1SRHe3d9jVu6gJ+4e3+MMpqu7pqE5HT6WsTSlce++GQmK5UXS8mzV8DSYHrQH+Xrf2jVcuKNg==} + universalify@0.1.2: resolution: {integrity: sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==} engines: {node: '>= 4.0.0'} @@ -2867,6 +2876,10 @@ snapshots: dependencies: undici-types: 6.19.8 + '@types/node@22.10.9': + dependencies: + undici-types: 6.20.0 + '@types/prop-types@15.7.13': {} '@types/react-dom@18.3.0': @@ -4860,6 +4873,8 @@ snapshots: undici-types@6.19.8: {} + undici-types@6.20.0: {} + universalify@0.1.2: {} universalify@2.0.1: {} From cfa5e322384f68609b5545fad75f54c1a18ecb59 Mon Sep 17 00:00:00 2001 From: Agusx1211 Date: Fri, 24 Jan 2025 10:11:36 +0000 Subject: [PATCH 044/439] Add config and signature methods --- packages/primitives-cli/src/index.ts | 2 + .../primitives-cli/src/subcommands/config.ts | 129 +++++++ .../primitives-cli/src/subcommands/payload.ts | 54 ++- packages/primitives/src/config.ts | 217 ++++++++++- packages/primitives/src/index.ts | 1 + packages/primitives/src/payload.ts | 4 +- packages/primitives/src/signature.ts | 352 ++++++++++++++++-- 7 files changed, 716 insertions(+), 43 deletions(-) create mode 100644 packages/primitives-cli/src/subcommands/config.ts diff --git a/packages/primitives-cli/src/index.ts b/packages/primitives-cli/src/index.ts index f0f26a24f..059374514 100644 --- a/packages/primitives-cli/src/index.ts +++ b/packages/primitives-cli/src/index.ts @@ -3,9 +3,11 @@ import yargs from 'yargs' import { hideBin } from 'yargs/helpers' import payloadCommand from './subcommands/payload' +import configCommand from './subcommands/config' void yargs(hideBin(process.argv)) .command(payloadCommand) + .command(configCommand) .demandCommand(1) .strict() .help().argv diff --git a/packages/primitives-cli/src/subcommands/config.ts b/packages/primitives-cli/src/subcommands/config.ts new file mode 100644 index 000000000..2e50472f7 --- /dev/null +++ b/packages/primitives-cli/src/subcommands/config.ts @@ -0,0 +1,129 @@ +import crypto from 'crypto' +import type { CommandModule } from 'yargs' +import { Configuration, Topology, configToJson, encodeSignature } from '@0xsequence/sequence-primitives' +import { Bytes, Hex } from 'ox' + +function randomBytes(length: number): Uint8Array { + return crypto.getRandomValues(new Uint8Array(length)) +} + +function randomBigInt(max: bigint): bigint { + return BigInt(Math.floor(Math.random() * Number(max))) +} + +function randomAddress(): `0x${string}` { + return `0x${Buffer.from(randomBytes(20)).toString('hex')}` +} + +function generateRandomTopology(depth: number): Topology { + if (depth <= 0) { + // Generate a random leaf + const leafType = Math.floor(Math.random() * 5) + + switch (leafType) { + case 0: // SignerLeaf + return { + address: randomAddress(), + weight: randomBigInt(100n) + } + + case 1: // SapientSigner + return { + address: randomAddress(), + weight: randomBigInt(100n), + imageHash: randomBytes(32) + } + + case 2: // SubdigestLeaf + return { + digest: randomBytes(32) + } + + case 3: // NodeLeaf + return randomBytes(32) + + case 4: // NestedLeaf + return { + tree: generateRandomTopology(0), + weight: randomBigInt(100n), + threshold: randomBigInt(50n) + } + } + } + + // Generate a node with two random subtrees + return [ + generateRandomTopology(depth - 1), + generateRandomTopology(depth - 1) + ] +} + +async function generateRandom(maxDepth: number): Promise { + const config: Configuration = { + threshold: randomBigInt(100n), + checkpoint: randomBigInt(1000n), + topology: generateRandomTopology(maxDepth), + checkpointer: Math.random() > 0.5 ? randomAddress() : undefined + } + + const encoded = encodeSignature(config) + console.log(Hex.fromBytes(encoded)) +} + +async function createConfig(options: { threshold: number, checkpoint: number }): Promise { + const config: Configuration = { + threshold: BigInt(options.threshold), + checkpoint: BigInt(options.checkpoint), + // Starts with empty topology + topology: Bytes.padLeft(Bytes.fromNumber(1), 32), + checkpointer: undefined + } + + console.log(configToJson(config)) +} + +const configCommand: CommandModule = { + command: 'config', + describe: 'Configuration utilities', + builder: (yargs) => { + return yargs + .command( + 'random', + 'Generate a random configuration', + (yargs) => { + return yargs.option('max-depth', { + type: 'number', + description: 'Maximum depth of the configuration tree', + default: 3 + }) + }, + async (argv) => { + await generateRandom(argv.maxDepth as number) + } + ) + .command( + 'new', + 'Create a new configuration', + (yargs) => { + return yargs + .option('threshold', { + type: 'number', + description: 'Threshold value for the configuration', + demandOption: true + }) + .option('checkpoint', { + type: 'number', + description: 'Checkpoint value for the configuration', + demandOption: true + }) + }, + async (argv) => { + await createConfig(argv) + } + ) + .demandCommand(1, 'You must specify a subcommand for config') + }, + handler: () => {}, +} + +export default configCommand diff --git a/packages/primitives-cli/src/subcommands/payload.ts b/packages/primitives-cli/src/subcommands/payload.ts index c81f96a5f..3bc461606 100644 --- a/packages/primitives-cli/src/subcommands/payload.ts +++ b/packages/primitives-cli/src/subcommands/payload.ts @@ -72,6 +72,21 @@ function behaviorOnError(behavior: number): 'ignore' | 'revert' | 'abort' { } } +async function readStdin(): Promise { + return new Promise((resolve, reject) => { + let data = '' + process.stdin.on('data', (chunk) => { + data += chunk + }) + process.stdin.on('end', () => { + resolve(data.trim()) + }) + process.stdin.on('error', (err) => { + reject(err) + }) + }) +} + async function convertToAbi(_payload: string): Promise { throw new Error('Not implemented') } @@ -119,45 +134,66 @@ const payloadCommand: CommandModule = { builder: (yargs) => { return yargs .command( - 'to-abi ', + 'to-abi [payload]', 'Convert payload to ABI format', (yargs) => { return yargs.positional('payload', { type: 'string', description: 'Input payload to convert', - demandOption: true, }) }, async (argv) => { - await convertToAbi(argv.payload) + const hasArg = typeof argv.payload === 'string' && argv.payload.length > 0 + const hasStdin = !process.stdin.isTTY + if (hasArg && hasStdin) { + throw new Error('Payload can only come from arg or stdin, not both') + } else if (!hasArg && !hasStdin) { + throw new Error('No payload provided and no stdin data') + } + const finalPayload = hasArg ? argv.payload! : await readStdin() + await convertToAbi(finalPayload) }, ) .command( - 'to-packed ', + 'to-packed [payload]', 'Convert payload to packed format', (yargs) => { return yargs.positional('payload', { type: 'string', description: 'Input payload to convert', - demandOption: true, }) }, async (argv) => { - await convertToPacked(argv.payload) + const hasArg = typeof argv.payload === 'string' && argv.payload.length > 0 + const hasStdin = !process.stdin.isTTY + if (hasArg && hasStdin) { + throw new Error('Payload can only come from arg or stdin, not both') + } else if (!hasArg && !hasStdin) { + throw new Error('No payload provided and no stdin data') + } + const finalPayload = hasArg ? argv.payload! : await readStdin() + await convertToPacked(finalPayload) }, ) .command( - 'to-human ', + 'to-human [payload]', 'Convert payload to human readable format', (yargs) => { return yargs.positional('payload', { type: 'string', description: 'Input payload to convert', - demandOption: true, }) }, async (argv) => { - await convertToHuman(argv.payload) + const hasArg = typeof argv.payload === 'string' && argv.payload.length > 0 + const hasStdin = !process.stdin.isTTY + if (hasArg && hasStdin) { + throw new Error('Payload can only come from arg or stdin, not both') + } else if (!hasArg && !hasStdin) { + throw new Error('No payload provided and no stdin data') + } + const finalPayload = hasArg ? argv.payload! : await readStdin() + await convertToHuman(finalPayload) }, ) .demandCommand(1, 'You must specify a subcommand for payload') diff --git a/packages/primitives/src/config.ts b/packages/primitives/src/config.ts index 199c7c95a..b333724d7 100644 --- a/packages/primitives/src/config.ts +++ b/packages/primitives/src/config.ts @@ -41,7 +41,7 @@ export type Configuration = { checkpointer?: Address.Address } -export function isSignerLeaf(cand: Topology): cand is SignerLeaf { +export function isSignerLeaf(cand: any): cand is SignerLeaf { return ( typeof cand === 'object' && 'address' in cand && @@ -50,7 +50,7 @@ export function isSignerLeaf(cand: Topology): cand is SignerLeaf { ) } -export function isSapientSigner(cand: Topology): cand is SapientSigner { +export function isSapientSignerLeaf(cand: any): cand is SapientSigner { return ( typeof cand === 'object' && 'address' in cand && @@ -59,15 +59,15 @@ export function isSapientSigner(cand: Topology): cand is SapientSigner { ) } -export function isSubdigestLeaf(cand: Topology): cand is SubdigestLeaf { +export function isSubdigestLeaf(cand: any): cand is SubdigestLeaf { return typeof cand === 'object' && 'digest' in cand } -export function isNodeLeaf(cand: Topology): cand is NodeLeaf { +export function isNodeLeaf(cand: any): cand is NodeLeaf { return cand instanceof Uint8Array && cand.length === 32 } -export function isNestedLeaf(cand: Topology): cand is NestedLeaf { +export function isNestedLeaf(cand: any): cand is NestedLeaf { return ( typeof cand === 'object' && !Array.isArray(cand) && @@ -77,12 +77,12 @@ export function isNestedLeaf(cand: Topology): cand is NestedLeaf { ) } -export function isNode(cand: Topology): cand is Node { +export function isNode(cand: any): cand is Node { return ( Array.isArray(cand) && cand.length === 2 && - isLeaf(cand[0]) && - isLeaf(cand[1]) + isTopology(cand[0]) && + isTopology(cand[1]) ) } @@ -98,13 +98,17 @@ export function isConfiguration(cand: any): cand is Configuration { export function isLeaf(cand: Topology): cand is Leaf { return ( isSignerLeaf(cand) || - isSapientSigner(cand) || + isSapientSignerLeaf(cand) || isSubdigestLeaf(cand) || isNodeLeaf(cand) || isNestedLeaf(cand) ) } +export function isTopology(cand: any): cand is Topology { + return isNode(cand) || isLeaf(cand) +} + export function hashConfiguration( topology: Topology | Configuration, ): Uint8Array { @@ -133,7 +137,7 @@ export function hashConfiguration( return Bytes.padLeft(Bytes.fromNumber(combined), 32) } - if (isSapientSigner(topology)) { + if (isSapientSignerLeaf(topology)) { return Hash.keccak256( Bytes.concat( Bytes.fromString('Sequence sapient config:\n'), @@ -179,3 +183,196 @@ export function hashConfiguration( throw new Error('Invalid topology') } + +export function configToJson(item: Topology | Configuration): string { + function encodeTopology(topology: Topology): any { + if (isNode(topology)) { + return { + type: 'Node', + left: encodeTopology(topology[0]), + right: encodeTopology(topology[1]), + } + } else if (isSignerLeaf(topology)) { + return { + type: 'SignerLeaf', + address: topology.address, + weight: topology.weight.toString(), + } + } else if (isSapientSignerLeaf(topology)) { + return { + type: 'SapientSignerLeaf', + address: topology.address, + weight: topology.weight.toString(), + imageHash: Bytes.toHex(topology.imageHash), + } + } else if (isSubdigestLeaf(topology)) { + return { + type: 'SubdigestLeaf', + digest: Bytes.toHex(topology.digest), + } + } else if (isNodeLeaf(topology)) { + return { + type: 'NodeLeaf', + data: Bytes.toHex(topology), + } + } else if (isNestedLeaf(topology)) { + return { + type: 'NestedLeaf', + tree: encodeTopology(topology.tree), + weight: topology.weight.toString(), + threshold: topology.threshold.toString(), + } + } + throw new Error('encodeTopology: Unrecognized Topology') + } + + if (isConfiguration(item)) { + return JSON.stringify({ + type: 'Configuration', + threshold: item.threshold.toString(), + checkpoint: item.checkpoint.toString(), + checkpointer: item.checkpointer ?? '0x0000000000000000000000000000000000000000', + topology: encodeTopology(item.topology), + }) + } else { + // It's just a Topology + return JSON.stringify(encodeTopology(item)) + } +} + +export function configFromJson(json: string): Topology | Configuration { + const parsed = JSON.parse(json) + + function decodeTopology(obj: any): Topology { + if (!obj || typeof obj !== 'object') { + throw new Error('decodeTopology: Invalid object') + } + switch (obj.type) { + case 'Node': + return [decodeTopology(obj.left), decodeTopology(obj.right)] + case 'SignerLeaf': + return { + address: obj.address, + weight: BigInt(obj.weight), + } + case 'SapientSignerLeaf': + return { + address: obj.address, + weight: BigInt(obj.weight), + imageHash: Bytes.fromHex(obj.imageHash), + } + case 'SubdigestLeaf': + return { + digest: Bytes.fromHex(obj.digest), + } + case 'NodeLeaf': + return Bytes.fromHex(obj.data) + case 'NestedLeaf': + return { + tree: decodeTopology(obj.tree), + weight: BigInt(obj.weight), + threshold: BigInt(obj.threshold), + } + default: + throw new Error('decodeTopology: Unrecognized type ' + obj.type) + } + } + + if (parsed.type === 'Configuration') { + return { + threshold: BigInt(parsed.threshold), + checkpoint: BigInt(parsed.checkpoint), + checkpointer: parsed.checkpointer ?? '0x0000000000000000000000000000000000000000', + topology: decodeTopology(parsed.topology), + } + } else { + return decodeTopology(parsed) + } +} + +export function topologyToJson(topology: Topology): string { + function encodeTopology(top: Topology): any { + if (isNode(top)) { + return { + type: 'Node', + left: encodeTopology(top[0]), + right: encodeTopology(top[1]), + } + } else if (isSignerLeaf(top)) { + return { + type: 'SignerLeaf', + address: top.address, + weight: top.weight.toString(), + } + } else if (isSapientSignerLeaf(top)) { + return { + type: 'SapientSignerLeaf', + address: top.address, + weight: top.weight.toString(), + imageHash: Bytes.toHex(top.imageHash), + } + } else if (isSubdigestLeaf(top)) { + return { + type: 'SubdigestLeaf', + digest: Bytes.toHex(top.digest), + } + } else if (isNodeLeaf(top)) { + return { + type: 'NodeLeaf', + data: Bytes.toHex(top), + } + } else if (isNestedLeaf(top)) { + return { + type: 'NestedLeaf', + tree: encodeTopology(top.tree), + weight: top.weight.toString(), + threshold: top.threshold.toString(), + } + } + throw new Error('topologyToJson: Unrecognized Topology') + } + + return JSON.stringify(encodeTopology(topology)) +} + +export function topologyFromJson(json: string): Topology { + // We'll parse just a Topology here + const parsed = JSON.parse(json) + + function decodeTopology(obj: any): Topology { + if (!obj || typeof obj !== 'object') { + throw new Error('topologyFromJson: Invalid object') + } + switch (obj.type) { + case 'Node': + return [decodeTopology(obj.left), decodeTopology(obj.right)] + case 'SignerLeaf': + return { + address: obj.address, + weight: BigInt(obj.weight), + } + case 'SapientSignerLeaf': + return { + address: obj.address, + weight: BigInt(obj.weight), + imageHash: Bytes.padLeft(Bytes.fromHex(obj.imageHash), 32), + } + case 'SubdigestLeaf': + return { + digest: Bytes.padLeft(Bytes.fromHex(obj.digest), 32), + } + case 'NodeLeaf': + return Bytes.padLeft(Bytes.fromHex(obj.data), 32) + case 'NestedLeaf': + return { + tree: decodeTopology(obj.tree), + weight: BigInt(obj.weight), + threshold: BigInt(obj.threshold), + } + default: + throw new Error('topologyFromJson: Unrecognized type ' + obj.type) + } + } + + return decodeTopology(parsed) +} diff --git a/packages/primitives/src/index.ts b/packages/primitives/src/index.ts index d66b3f5f0..e8021b533 100644 --- a/packages/primitives/src/index.ts +++ b/packages/primitives/src/index.ts @@ -3,3 +3,4 @@ export * from './config' export * from './payload' export * from './signature' export * from './utils' +export * from './signature' diff --git a/packages/primitives/src/payload.ts b/packages/primitives/src/payload.ts index eb6c30cfc..6f52af9cb 100644 --- a/packages/primitives/src/payload.ts +++ b/packages/primitives/src/payload.ts @@ -109,9 +109,11 @@ export function encode( if (callsLen !== 1) { if (callsLen < 256) { callsCountSize = 1 - } else { + } else if (callsLen < 65536) { globalFlag |= 0x20 callsCountSize = 2 + } else { + throw new Error('Too many calls') } } diff --git a/packages/primitives/src/signature.ts b/packages/primitives/src/signature.ts index 1e5e4af49..c2d06404f 100644 --- a/packages/primitives/src/signature.ts +++ b/packages/primitives/src/signature.ts @@ -1,13 +1,32 @@ import { Address, Bytes } from 'ox' import { + Configuration, Leaf, SapientSigner, SignerLeaf, SubdigestLeaf, Topology, - isSapientSigner, + hashConfiguration, + isNestedLeaf, + isNode, + isNodeLeaf, + isSapientSignerLeaf, isSignerLeaf, + isSubdigestLeaf, } from './config' +import { minBytesFor } from './utils' + +export const FLAG_SIGNATURE_HASH = 0 +export const FLAG_ADDRESS = 1 +export const FLAG_SIGNATURE_ERC1271 = 2 +export const FLAG_NODE = 3 +export const FLAG_BRANCH = 4 +export const FLAG_SUBDIGEST = 5 +export const FLAG_NESTED = 6 +export const FLAG_SIGNATURE_ETH_SIGN = 7 +export const FLAG_SIGNATURE_EIP712 = 8 +export const FLAG_SIGNATURE_SAPIENT = 9 +export const FLAG_SIGNATURE_SAPIENT_COMPACT = 10 export type SignedSignerLeaf = SignerLeaf & { signature: @@ -18,12 +37,13 @@ export type SignedSignerLeaf = SignerLeaf & { type: 'eth_sign' | 'hash' } | { + address: `0x${string}` data: Uint8Array type: 'erc1271' } } -export type SignedSapientLeaf = SapientSigner & { +export type SignedSapientSignerLeaf = SapientSigner & { signature: { data: Uint8Array type: 'sapient' | 'sapient_compact' @@ -40,12 +60,12 @@ export type RawSignerLeaf = { type: 'eth_sign' | 'hash' } | { - address: string + address: `0x${string}` data: Uint8Array type: 'erc1271' } | { - address: string + address: `0x${string}` data: Uint8Array type: 'sapient' | 'sapient_compact' } @@ -84,12 +104,37 @@ export type Signature = { suffix?: Omit[] } +export function isRawSignerLeaf(cand: any): cand is RawSignerLeaf { + return typeof cand === 'object' && 'weight' in cand && 'signature' in cand +} + export function isSignedSignerLeaf(cand: any): cand is SignedSignerLeaf { return isSignerLeaf(cand) && 'signature' in cand } -export function isSignedSapientLeaf(cand: any): cand is SignedSapientLeaf { - return isSapientSigner(cand) && 'signature' in cand +export function isSignedSapientSignerLeaf(cand: any): cand is SignedSapientSignerLeaf { + return isSapientSignerLeaf(cand) && 'signature' in cand +} + +export function isRawNode(cand: any): cand is RawNode { + return Array.isArray(cand) && cand.length === 2 && isRawTopology(cand[0]) && isRawTopology(cand[1]) +} + +export function isRawTopology(cand: any): cand is RawTopology { + return isRawNode(cand) || isRawLeaf(cand) +} + +export function isRawLeaf(cand: any): cand is RawLeaf { + return ( + typeof cand === 'object' && + 'weight' in cand && + 'signature' in cand && + !('tree' in cand) + ) +} + +export function isRawNestedLeaf(cand: any): cand is RawNestedLeaf { + return typeof cand === 'object' && 'tree' in cand && 'weight' in cand && 'threshold' in cand } export function decodeSignature(signature: Uint8Array): RawSignature { @@ -100,7 +145,7 @@ export function decodeSignature(signature: Uint8Array): RawSignature { const flag = signature[0]! let index = 1 - // If bit 0 is set => chained signature (not implemented here) + // If bit 1 is set => chained signature (not implemented here) if ((flag & 0x01) === 0x01) { throw new Error('TODO') } @@ -181,8 +226,7 @@ export function parseBranch(signature: Uint8Array): { const flag = (firstByte & 0xf0) >> 4 - // 'hash' or 'eth_sign' (0x00 or 0x07) - if (flag === 0x00 || flag === 0x07) { + if (flag === FLAG_SIGNATURE_HASH || flag === FLAG_SIGNATURE_ETH_SIGN) { const v = ((firstByte & 0x10) >> 4) + 27 let weight = BigInt(firstByte & 0x07) if (weight === 0n) { @@ -212,8 +256,7 @@ export function parseBranch(signature: Uint8Array): { continue } - // Address (0x01) - if (flag === 0x01) { + if (flag === FLAG_ADDRESS) { let weight = BigInt(firstByte & 0x0f) if (weight === 0n) { if (index >= signature.length) { @@ -236,8 +279,7 @@ export function parseBranch(signature: Uint8Array): { continue } - // ERC1271 (0x02) - if (flag === 0x02) { + if (flag === FLAG_SIGNATURE_ERC1271) { let weight = BigInt(firstByte & 0x03) if (weight === 0n) { if (index >= signature.length) { @@ -277,8 +319,7 @@ export function parseBranch(signature: Uint8Array): { continue } - // Node leaf (0x03) => nodeHash - if (flag === 0x03) { + if (flag === FLAG_NODE) { if (index + 32 > signature.length) { throw new Error('Not enough bytes for node hash') } @@ -289,8 +330,7 @@ export function parseBranch(signature: Uint8Array): { continue } - // Branch (0x04) - if (flag === 0x04) { + if (flag === FLAG_BRANCH) { const sizeSize = firstByte & 0x0f if (index + sizeSize > signature.length) { throw new Error('Not enough bytes for branch size') @@ -314,8 +354,7 @@ export function parseBranch(signature: Uint8Array): { continue } - // Nested (0x05) - if (flag === 0x05) { + if (flag === FLAG_NESTED) { let weight = BigInt(firstByte & 0x03) if (weight === 0n) { if (index >= signature.length) { @@ -360,8 +399,7 @@ export function parseBranch(signature: Uint8Array): { continue } - // Subdigest (0x06) - if (flag === 0x06) { + if (flag === FLAG_SUBDIGEST) { if (index + 32 > signature.length) { throw new Error('Not enough bytes for subdigest') } @@ -374,8 +412,7 @@ export function parseBranch(signature: Uint8Array): { continue } - // Sapient or Sapient compact (0x09 or 0x0a) - if (flag === 0x09 || flag === 0x0a) { + if (flag === FLAG_SIGNATURE_SAPIENT || flag === FLAG_SIGNATURE_SAPIENT_COMPACT) { let addrWeight = BigInt(firstByte & 0x03) if (addrWeight === 0n) { if (index >= signature.length) { @@ -421,6 +458,275 @@ export function parseBranch(signature: Uint8Array): { return { nodes, leftover: signature.slice(index) } } +export function encodeSignature( + config: Configuration | RawConfiguration, + options: { + noChainId?: boolean + checkpointerData?: Uint8Array + } = {}, +): Uint8Array { + const { noChainId, checkpointerData } = options + + let flag = 0 + + if (noChainId) { + flag |= 0x02 + } + + const bytesForCheckpoint = minBytesFor(config.checkpoint) + if (bytesForCheckpoint > 7) { + throw new Error('Checkpoint too large') + } + flag |= bytesForCheckpoint << 2 + + let bytesForThreshold = minBytesFor(config.threshold) + bytesForThreshold = bytesForThreshold === 0 ? 1 : bytesForThreshold + if (bytesForThreshold > 2) { + throw new Error('Threshold too large') + } + flag |= bytesForThreshold == 2 ? 0x20 : 0x00 + + if (config.checkpointer) { + flag |= 0x40 + } + + let output = Bytes.fromNumber(flag) + + if (config.checkpointer) { + output = Bytes.concat( + output, + Bytes.padLeft(Bytes.fromHex(config.checkpointer), 20) + ) + } + + if (checkpointerData) { + const checkpointerDataSize = checkpointerData.length + if (checkpointerDataSize > 16777215) { + throw new Error('Checkpointer data too large') + } + + const checkpointerDataSizeBytes = Bytes.padLeft( + Bytes.fromNumber(checkpointerDataSize), + 3, + ) + + output = Bytes.concat(output, checkpointerDataSizeBytes, checkpointerData) + } + + const checkpointBytes = Bytes.padLeft( + Bytes.fromNumber(config.checkpoint), + bytesForCheckpoint, + ) + output = Bytes.concat(output, checkpointBytes) + + const thresholdBytes = Bytes.padLeft( + Bytes.fromNumber(config.threshold), + bytesForThreshold, + ) + output = Bytes.concat(output, thresholdBytes) + + const topologyBytes = encodeTopology(config.topology, options) + output = Bytes.concat(output, topologyBytes) + + return output +} + +export function encodeTopology( + topology: Topology | RawTopology, + options: { + noChainId?: boolean + checkpointerData?: Uint8Array + } = {}, +): Uint8Array { + if (isNode(topology) || isRawNode(topology)) { + const encoded0 = encodeTopology(topology[0]!, options) + const encoded1 = encodeTopology(topology[1]!, options) + const isBranching = isNode(topology[1]!) || isRawNode(topology[1]!) + + if (isBranching) { + let encoded1Size = minBytesFor(BigInt(encoded1.length)) + if (encoded1Size > 15) { + throw new Error('Branch too large') + } + + const flag = (FLAG_BRANCH << 4) | encoded1Size + return Bytes.concat( + encoded0, + Bytes.fromNumber(flag), + Bytes.padLeft(Bytes.fromNumber(encoded1.length), encoded1Size), + encoded1 + ) + } else { + return Bytes.concat(encoded0, encoded1) + } + } + + if (isNestedLeaf(topology) || isRawNestedLeaf(topology)) { + const nested = encodeTopology(topology.tree, options) + + // - XX00 : Weight (00 = dynamic, 01 = 1, 10 = 2, 11 = 3) + // - 00XX : Threshold (00 = dynamic, 01 = 1, 10 = 2, 11 = 3) + let flag = FLAG_NESTED << 4 + + let weightBytes = Bytes.fromArray([]) + if (topology.weight <= 3n) { + flag |= Number(topology.weight) << 2 + } else if (topology.weight <= 255n) { + weightBytes = Bytes.fromNumber(Number(topology.weight)) + } else { + throw new Error('Weight too large') + } + + let thresholdBytes = Bytes.fromArray([]) + if (topology.threshold <= 3n) { + flag |= Number(topology.threshold) + } else if (topology.threshold <= 65535n) { + thresholdBytes = Bytes.padLeft(Bytes.fromNumber(Number(topology.threshold)), 2) + } else { + throw new Error('Threshold too large') + } + + const nestedSize = minBytesFor(BigInt(nested.length)) + if (nestedSize > 3) { + throw new Error('Nested tree too large') + } + + return Bytes.concat( + Bytes.fromNumber(flag), + weightBytes, + thresholdBytes, + Bytes.padLeft(Bytes.fromNumber(nestedSize), 3), + nested + ) + } + + if (isNodeLeaf(topology)) { + return Bytes.concat( + Bytes.fromNumber(FLAG_NODE), + topology, + ) + } + + if (isSignedSignerLeaf(topology) || isRawSignerLeaf(topology)) { + if (topology.signature.type === 'hash' || topology.signature.type === 'eth_sign') { + let flag = (topology.signature.type === 'hash' ? FLAG_SIGNATURE_HASH : FLAG_SIGNATURE_ETH_SIGN) << 4 + let weightBytes = Bytes.fromArray([]) + if (topology.weight <= 15n) { + flag |= Number(topology.weight) + } else if (topology.weight <= 255n) { + weightBytes = Bytes.fromNumber(Number(topology.weight)) + } else { + throw new Error('Weight too large') + } + + const r = Bytes.padLeft(topology.signature.r, 32) + const s = Bytes.padLeft(topology.signature.s, 32) + if (topology.signature.v % 2 !== 0) { + s[0]! |= 0x80 + } + + return Bytes.concat( + Bytes.fromNumber(flag), + weightBytes, + r, + s, + ) + } else if (topology.signature.type === 'erc1271') { + let flag = FLAG_SIGNATURE_ERC1271 << 4 + + let signatureSize = minBytesFor(BigInt(topology.signature.data.length)) + if (signatureSize > 3) { + throw new Error('Signature too large') + } + + flag |= signatureSize << 2 + + let weightBytes = Bytes.fromArray([]) + if (topology.weight <= 3n) { + flag |= Number(topology.weight) + } else if (topology.weight <= 255n) { + weightBytes = Bytes.fromNumber(Number(topology.weight)) + } else { + throw new Error('Weight too large') + } + + return Bytes.concat( + Bytes.fromNumber(flag), + weightBytes, + Bytes.padLeft(Bytes.fromHex(topology.signature.address), 20), + Bytes.padLeft(Bytes.fromNumber(signatureSize), 3), + topology.signature.data, + ) + } else if (topology.signature.type === 'sapient' || topology.signature.type === 'sapient_compact') { + let flag = (topology.signature.type === 'sapient' ? FLAG_SIGNATURE_SAPIENT : FLAG_SIGNATURE_SAPIENT_COMPACT) << 4 + + let signatureSize = minBytesFor(BigInt(topology.signature.data.length)) + if (signatureSize > 3) { + throw new Error('Signature too large') + } + + flag |= signatureSize << 2 + + let weightBytes = Bytes.fromArray([]) + if (topology.weight <= 3n) { + flag |= Number(topology.weight) + } else if (topology.weight <= 255n) { + weightBytes = Bytes.fromNumber(Number(topology.weight)) + } else { + throw new Error('Weight too large') + } + + return Bytes.concat( + Bytes.fromNumber(flag), + weightBytes, + Bytes.padLeft(Bytes.fromHex(topology.signature.address), 20), + Bytes.padLeft(Bytes.fromNumber(signatureSize), 3), + topology.signature.data, + ) + } else { + throw new Error(`Invalid signature type: ${topology.signature.type}`) + } + } + + if (isSubdigestLeaf(topology)) { + return Bytes.concat( + Bytes.fromNumber(FLAG_SUBDIGEST), + topology.digest, + ) + } + + if (isSignerLeaf(topology)) { + let flag = FLAG_ADDRESS << 4 + let weightBytes = Bytes.fromArray([]) + if (topology.weight <= 15n) { + flag |= Number(topology.weight) + } else if (topology.weight <= 255n) { + weightBytes = Bytes.fromNumber(Number(topology.weight)) + } else { + throw new Error('Weight too large') + } + + return Bytes.concat( + Bytes.fromNumber(flag), + weightBytes, + Bytes.padLeft(Bytes.fromHex(topology.address), 20), + ) + } + + if (isSapientSignerLeaf(topology)) { + // Encode as node directly + const hash = hashConfiguration(topology) + return Bytes.concat( + Bytes.fromNumber(FLAG_NODE), + hash, + ) + } + + console.log(topology) + + throw new Error('Invalid topology') +} + function foldNodes(nodes: RawTopology[]): RawTopology { if (nodes.length === 0) { throw new Error('Empty signature tree') From 8800638b18df2ffbcbbdb7998ce3854b7c9097c8 Mon Sep 17 00:00:00 2001 From: Agusx1211 Date: Fri, 24 Jan 2025 10:34:26 +0000 Subject: [PATCH 045/439] Format --- packages/primitives-cli/src/index.ts | 7 +- .../primitives-cli/src/subcommands/config.ts | 42 ++++--- packages/primitives/src/config.ts | 35 +----- packages/primitives/src/signature.ts | 113 ++++++------------ 4 files changed, 65 insertions(+), 132 deletions(-) diff --git a/packages/primitives-cli/src/index.ts b/packages/primitives-cli/src/index.ts index 059374514..4e3ce4e44 100644 --- a/packages/primitives-cli/src/index.ts +++ b/packages/primitives-cli/src/index.ts @@ -5,9 +5,4 @@ import { hideBin } from 'yargs/helpers' import payloadCommand from './subcommands/payload' import configCommand from './subcommands/config' -void yargs(hideBin(process.argv)) - .command(payloadCommand) - .command(configCommand) - .demandCommand(1) - .strict() - .help().argv +void yargs(hideBin(process.argv)).command(payloadCommand).command(configCommand).demandCommand(1).strict().help().argv diff --git a/packages/primitives-cli/src/subcommands/config.ts b/packages/primitives-cli/src/subcommands/config.ts index 2e50472f7..232727b62 100644 --- a/packages/primitives-cli/src/subcommands/config.ts +++ b/packages/primitives-cli/src/subcommands/config.ts @@ -19,43 +19,41 @@ function generateRandomTopology(depth: number): Topology { if (depth <= 0) { // Generate a random leaf const leafType = Math.floor(Math.random() * 5) - + switch (leafType) { case 0: // SignerLeaf return { address: randomAddress(), - weight: randomBigInt(100n) + weight: randomBigInt(100n), + imageHash: undefined, } - + case 1: // SapientSigner return { address: randomAddress(), weight: randomBigInt(100n), - imageHash: randomBytes(32) + imageHash: randomBytes(32), } - + case 2: // SubdigestLeaf return { - digest: randomBytes(32) + digest: randomBytes(32), } - + case 3: // NodeLeaf return randomBytes(32) - + case 4: // NestedLeaf return { tree: generateRandomTopology(0), weight: randomBigInt(100n), - threshold: randomBigInt(50n) + threshold: randomBigInt(50n), } } } // Generate a node with two random subtrees - return [ - generateRandomTopology(depth - 1), - generateRandomTopology(depth - 1) - ] + return [generateRandomTopology(depth - 1), generateRandomTopology(depth - 1)] } async function generateRandom(maxDepth: number): Promise { @@ -63,20 +61,20 @@ async function generateRandom(maxDepth: number): Promise { threshold: randomBigInt(100n), checkpoint: randomBigInt(1000n), topology: generateRandomTopology(maxDepth), - checkpointer: Math.random() > 0.5 ? randomAddress() : undefined + checkpointer: Math.random() > 0.5 ? randomAddress() : undefined, } const encoded = encodeSignature(config) console.log(Hex.fromBytes(encoded)) } -async function createConfig(options: { threshold: number, checkpoint: number }): Promise { +async function createConfig(options: { threshold: number; checkpoint: number }): Promise { const config: Configuration = { threshold: BigInt(options.threshold), checkpoint: BigInt(options.checkpoint), // Starts with empty topology topology: Bytes.padLeft(Bytes.fromNumber(1), 32), - checkpointer: undefined + checkpointer: undefined, } console.log(configToJson(config)) @@ -94,12 +92,12 @@ const configCommand: CommandModule = { return yargs.option('max-depth', { type: 'number', description: 'Maximum depth of the configuration tree', - default: 3 + default: 3, }) }, async (argv) => { await generateRandom(argv.maxDepth as number) - } + }, ) .command( 'new', @@ -109,17 +107,17 @@ const configCommand: CommandModule = { .option('threshold', { type: 'number', description: 'Threshold value for the configuration', - demandOption: true + demandOption: true, }) .option('checkpoint', { - type: 'number', + type: 'number', description: 'Checkpoint value for the configuration', - demandOption: true + demandOption: true, }) }, async (argv) => { await createConfig(argv) - } + }, ) .demandCommand(1, 'You must specify a subcommand for config') }, diff --git a/packages/primitives/src/config.ts b/packages/primitives/src/config.ts index 2f49316c9..d75830c93 100644 --- a/packages/primitives/src/config.ts +++ b/packages/primitives/src/config.ts @@ -38,21 +38,11 @@ export type Configuration = { } export function isSignerLeaf(cand: any): cand is SignerLeaf { - return ( - typeof cand === 'object' && - 'address' in cand && - 'weight' in cand && - !('imageHash' in cand) - ) + return typeof cand === 'object' && 'address' in cand && 'weight' in cand && !('imageHash' in cand) } export function isSapientSignerLeaf(cand: any): cand is SapientSigner { - return ( - typeof cand === 'object' && - 'address' in cand && - 'weight' in cand && - 'imageHash' in cand - ) + return typeof cand === 'object' && 'address' in cand && 'weight' in cand && 'imageHash' in cand } export function isSubdigestLeaf(cand: any): cand is SubdigestLeaf { @@ -64,22 +54,11 @@ export function isNodeLeaf(cand: any): cand is NodeLeaf { } export function isNestedLeaf(cand: any): cand is NestedLeaf { - return ( - typeof cand === 'object' && - !Array.isArray(cand) && - 'tree' in cand && - 'weight' in cand && - 'threshold' in cand - ) + return typeof cand === 'object' && !Array.isArray(cand) && 'tree' in cand && 'weight' in cand && 'threshold' in cand } export function isNode(cand: any): cand is Node { - return ( - Array.isArray(cand) && - cand.length === 2 && - isTopology(cand[0]) && - isTopology(cand[1]) - ) + return Array.isArray(cand) && cand.length === 2 && isTopology(cand[0]) && isTopology(cand[1]) } export function isConfiguration(cand: any): cand is Configuration { @@ -88,11 +67,7 @@ export function isConfiguration(cand: any): cand is Configuration { export function isLeaf(cand: Topology): cand is Leaf { return ( - isSignerLeaf(cand) || - isSapientSignerLeaf(cand) || - isSubdigestLeaf(cand) || - isNodeLeaf(cand) || - isNestedLeaf(cand) + isSignerLeaf(cand) || isSapientSignerLeaf(cand) || isSubdigestLeaf(cand) || isNodeLeaf(cand) || isNestedLeaf(cand) ) } diff --git a/packages/primitives/src/signature.ts b/packages/primitives/src/signature.ts index e06178102..692a939d2 100644 --- a/packages/primitives/src/signature.ts +++ b/packages/primitives/src/signature.ts @@ -30,17 +30,17 @@ export const FLAG_SIGNATURE_SAPIENT_COMPACT = 10 export type SignedSignerLeaf = SignerLeaf & { signature: - | { - r: Bytes.Bytes - s: Bytes.Bytes - v: number - type: 'eth_sign' | 'hash' - } - | { - address: `0x${string}` - data: Bytes.Bytes - type: 'erc1271' - } + | { + r: Bytes.Bytes + s: Bytes.Bytes + v: number + type: 'eth_sign' | 'hash' + } + | { + address: `0x${string}` + data: Bytes.Bytes + type: 'erc1271' + } } export type SignedSapientSignerLeaf = SapientSigner & { @@ -53,22 +53,22 @@ export type SignedSapientSignerLeaf = SapientSigner & { export type RawSignerLeaf = { weight: bigint signature: - | { - r: Bytes.Bytes - s: Bytes.Bytes - v: number - type: 'eth_sign' | 'hash' - } - | { - address: `0x${string}` - data: Bytes.Bytes - type: 'erc1271' - } - | { - address: `0x${string}` - data: Bytes.Bytes - type: 'sapient' | 'sapient_compact' - } + | { + r: Bytes.Bytes + s: Bytes.Bytes + v: number + type: 'eth_sign' | 'hash' + } + | { + address: `0x${string}` + data: Bytes.Bytes + type: 'erc1271' + } + | { + address: `0x${string}` + data: Bytes.Bytes + type: 'sapient' | 'sapient_compact' + } } export type RawNestedLeaf = { @@ -125,12 +125,7 @@ export function isRawTopology(cand: any): cand is RawTopology { } export function isRawLeaf(cand: any): cand is RawLeaf { - return ( - typeof cand === 'object' && - 'weight' in cand && - 'signature' in cand && - !('tree' in cand) - ) + return typeof cand === 'object' && 'weight' in cand && 'signature' in cand && !('tree' in cand) } export function isRawNestedLeaf(cand: any): cand is RawNestedLeaf { @@ -489,10 +484,7 @@ export function encodeSignature( let output = Bytes.fromNumber(flag) if (config.checkpointer) { - output = Bytes.concat( - output, - Bytes.padLeft(Bytes.fromHex(config.checkpointer), 20) - ) + output = Bytes.concat(output, Bytes.padLeft(Bytes.fromHex(config.checkpointer), 20)) } if (checkpointerData) { @@ -501,24 +493,15 @@ export function encodeSignature( throw new Error('Checkpointer data too large') } - const checkpointerDataSizeBytes = Bytes.padLeft( - Bytes.fromNumber(checkpointerDataSize), - 3, - ) + const checkpointerDataSizeBytes = Bytes.padLeft(Bytes.fromNumber(checkpointerDataSize), 3) output = Bytes.concat(output, checkpointerDataSizeBytes, checkpointerData) } - const checkpointBytes = Bytes.padLeft( - Bytes.fromNumber(config.checkpoint), - bytesForCheckpoint, - ) + const checkpointBytes = Bytes.padLeft(Bytes.fromNumber(config.checkpoint), bytesForCheckpoint) output = Bytes.concat(output, checkpointBytes) - const thresholdBytes = Bytes.padLeft( - Bytes.fromNumber(config.threshold), - bytesForThreshold, - ) + const thresholdBytes = Bytes.padLeft(Bytes.fromNumber(config.threshold), bytesForThreshold) output = Bytes.concat(output, thresholdBytes) const topologyBytes = encodeTopology(config.topology, options) @@ -550,7 +533,7 @@ export function encodeTopology( encoded0, Bytes.fromNumber(flag), Bytes.padLeft(Bytes.fromNumber(encoded1.length), encoded1Size), - encoded1 + encoded1, ) } else { return Bytes.concat(encoded0, encoded1) @@ -592,15 +575,12 @@ export function encodeTopology( weightBytes, thresholdBytes, Bytes.padLeft(Bytes.fromNumber(nestedSize), 3), - nested + nested, ) } if (isNodeLeaf(topology)) { - return Bytes.concat( - Bytes.fromNumber(FLAG_NODE), - topology, - ) + return Bytes.concat(Bytes.fromNumber(FLAG_NODE), topology) } if (isSignedSignerLeaf(topology) || isRawSignerLeaf(topology)) { @@ -621,12 +601,7 @@ export function encodeTopology( s[0]! |= 0x80 } - return Bytes.concat( - Bytes.fromNumber(flag), - weightBytes, - r, - s, - ) + return Bytes.concat(Bytes.fromNumber(flag), weightBytes, r, s) } else if (topology.signature.type === 'erc1271') { let flag = FLAG_SIGNATURE_ERC1271 << 4 @@ -685,10 +660,7 @@ export function encodeTopology( } if (isSubdigestLeaf(topology)) { - return Bytes.concat( - Bytes.fromNumber(FLAG_SUBDIGEST), - topology.digest, - ) + return Bytes.concat(Bytes.fromNumber(FLAG_SUBDIGEST), topology.digest) } if (isSignerLeaf(topology)) { @@ -702,20 +674,13 @@ export function encodeTopology( throw new Error('Weight too large') } - return Bytes.concat( - Bytes.fromNumber(flag), - weightBytes, - Bytes.padLeft(Bytes.fromHex(topology.address), 20), - ) + return Bytes.concat(Bytes.fromNumber(flag), weightBytes, Bytes.padLeft(Bytes.fromHex(topology.address), 20)) } if (isSapientSignerLeaf(topology)) { // Encode as node directly const hash = hashConfiguration(topology) - return Bytes.concat( - Bytes.fromNumber(FLAG_NODE), - hash, - ) + return Bytes.concat(Bytes.fromNumber(FLAG_NODE), hash) } console.log(topology) From 9d9e01586c8b5f80a51b82507939fe2783290ee4 Mon Sep 17 00:00:00 2001 From: Agusx1211 Date: Fri, 24 Jan 2025 11:30:19 +0000 Subject: [PATCH 046/439] Simplify config leaf types --- .../primitives-cli/src/subcommands/config.ts | 64 +++++- packages/primitives/src/config.ts | 187 +++++------------- packages/primitives/src/signature.ts | 9 +- 3 files changed, 122 insertions(+), 138 deletions(-) diff --git a/packages/primitives-cli/src/subcommands/config.ts b/packages/primitives-cli/src/subcommands/config.ts index 232727b62..f58278c8d 100644 --- a/packages/primitives-cli/src/subcommands/config.ts +++ b/packages/primitives-cli/src/subcommands/config.ts @@ -1,6 +1,13 @@ import crypto from 'crypto' import type { CommandModule } from 'yargs' -import { Configuration, Topology, configToJson, encodeSignature } from '@0xsequence/sequence-primitives' +import { + Configuration, + Topology, + configToJson, + configFromJson, + encodeSignature, + hashConfiguration, +} from '@0xsequence/sequence-primitives' import { Bytes, Hex } from 'ox' function randomBytes(length: number): Uint8Array { @@ -23,13 +30,14 @@ function generateRandomTopology(depth: number): Topology { switch (leafType) { case 0: // SignerLeaf return { + type: 'signer', address: randomAddress(), weight: randomBigInt(100n), - imageHash: undefined, } case 1: // SapientSigner return { + type: 'sapient-signer', address: randomAddress(), weight: randomBigInt(100n), imageHash: randomBytes(32), @@ -37,6 +45,7 @@ function generateRandomTopology(depth: number): Topology { case 2: // SubdigestLeaf return { + type: 'subdigest', digest: randomBytes(32), } @@ -45,6 +54,7 @@ function generateRandomTopology(depth: number): Topology { case 4: // NestedLeaf return { + type: 'nested', tree: generateRandomTopology(0), weight: randomBigInt(100n), threshold: randomBigInt(50n), @@ -80,6 +90,28 @@ async function createConfig(options: { threshold: number; checkpoint: number }): console.log(configToJson(config)) } +async function getInput(input?: string): Promise { + if (input) { + return input + } + let stdin = '' + process.stdin.setEncoding('utf8') + for await (const chunk of process.stdin) { + stdin += chunk + } + return stdin +} + +async function calculateImageHash(input: string): Promise { + const config = configFromJson(input) + console.log(Hex.fromBytes(hashConfiguration(config))) +} + +async function doEncode(input: string): Promise { + const config = configFromJson(input) + console.log(Hex.fromBytes(encodeSignature(config as Configuration))) +} + const configCommand: CommandModule = { command: 'config', describe: 'Configuration utilities', @@ -119,6 +151,34 @@ const configCommand: CommandModule = { await createConfig(argv) }, ) + .command( + 'image-hash', + 'Calculate image hash from hex input', + (yargs) => { + return yargs.option('input', { + type: 'string', + description: 'Hex input to hash (if not using pipe)', + }) + }, + async (argv) => { + const input = await getInput(argv.input as string) + await calculateImageHash(input) + }, + ) + .command( + 'encode', + 'Encode configuration from hex input', + (yargs) => { + return yargs.option('input', { + type: 'string', + description: 'Hex input to encode (if not using pipe)', + }) + }, + async (argv) => { + const input = await getInput(argv.input as string) + await doEncode(input) + }, + ) .demandCommand(1, 'You must specify a subcommand for config') }, handler: () => {}, diff --git a/packages/primitives/src/config.ts b/packages/primitives/src/config.ts index d75830c93..e6c2898be 100644 --- a/packages/primitives/src/config.ts +++ b/packages/primitives/src/config.ts @@ -1,22 +1,25 @@ import { Address, Bytes, Hash, Hex } from 'ox' export type SignerLeaf = { + type: 'signer' address: Address.Address weight: bigint - imageHash: undefined } export type SapientSigner = { + type: 'sapient-signer' address: Address.Address weight: bigint imageHash: Bytes.Bytes } export type SubdigestLeaf = { + type: 'subdigest' digest: Bytes.Bytes } export type NestedLeaf = { + type: 'nested' tree: Topology weight: bigint threshold: bigint @@ -26,7 +29,7 @@ export type NodeLeaf = Bytes.Bytes export type Node = [Topology, Topology] -export type Leaf = SignerLeaf | SubdigestLeaf | NodeLeaf | NestedLeaf | SapientSigner +export type Leaf = SignerLeaf | SapientSigner | SubdigestLeaf | NestedLeaf | NodeLeaf export type Topology = Node | Leaf @@ -38,15 +41,15 @@ export type Configuration = { } export function isSignerLeaf(cand: any): cand is SignerLeaf { - return typeof cand === 'object' && 'address' in cand && 'weight' in cand && !('imageHash' in cand) + return typeof cand === 'object' && cand !== null && cand.type === 'signer' } export function isSapientSignerLeaf(cand: any): cand is SapientSigner { - return typeof cand === 'object' && 'address' in cand && 'weight' in cand && 'imageHash' in cand + return typeof cand === 'object' && cand !== null && cand.type === 'sapient-signer' } export function isSubdigestLeaf(cand: any): cand is SubdigestLeaf { - return typeof cand === 'object' && 'digest' in cand + return typeof cand === 'object' && cand !== null && cand.type === 'subdigest' } export function isNodeLeaf(cand: any): cand is NodeLeaf { @@ -54,7 +57,7 @@ export function isNodeLeaf(cand: any): cand is NodeLeaf { } export function isNestedLeaf(cand: any): cand is NestedLeaf { - return typeof cand === 'object' && !Array.isArray(cand) && 'tree' in cand && 'weight' in cand && 'threshold' in cand + return typeof cand === 'object' && cand !== null && cand.type === 'nested' } export function isNode(cand: any): cand is Node { @@ -112,6 +115,8 @@ export function getWeight(configuration: Configuration, signers: Address.Address return scan(topology[0]) + scan(topology[1]) } else if (isSignerLeaf(topology)) { return set.has(topology.address) ? topology.weight : 0n + } else if (isSapientSignerLeaf(topology)) { + return set.has(topology.address) ? topology.weight : 0n } else if (isNestedLeaf(topology)) { return scan(topology.tree) >= topology.threshold ? topology.weight : 0n } else { @@ -176,195 +181,107 @@ export function hashConfiguration(topology: Topology | Configuration): Bytes.Byt throw new Error('Invalid topology') } -export function configToJson(item: Topology | Configuration): string { - function encodeTopology(topology: Topology): any { - if (isNode(topology)) { - return { - type: 'Node', - left: encodeTopology(topology[0]), - right: encodeTopology(topology[1]), - } - } else if (isSignerLeaf(topology)) { - return { - type: 'SignerLeaf', - address: topology.address, - weight: topology.weight.toString(), - } - } else if (isSapientSignerLeaf(topology)) { - return { - type: 'SapientSignerLeaf', - address: topology.address, - weight: topology.weight.toString(), - imageHash: Bytes.toHex(topology.imageHash), - } - } else if (isSubdigestLeaf(topology)) { - return { - type: 'SubdigestLeaf', - digest: Bytes.toHex(topology.digest), - } - } else if (isNodeLeaf(topology)) { - return { - type: 'NodeLeaf', - data: Bytes.toHex(topology), - } - } else if (isNestedLeaf(topology)) { - return { - type: 'NestedLeaf', - tree: encodeTopology(topology.tree), - weight: topology.weight.toString(), - threshold: topology.threshold.toString(), - } - } - throw new Error('encodeTopology: Unrecognized Topology') - } - - if (isConfiguration(item)) { - return JSON.stringify({ - type: 'Configuration', - threshold: item.threshold.toString(), - checkpoint: item.checkpoint.toString(), - checkpointer: item.checkpointer ?? '0x0000000000000000000000000000000000000000', - topology: encodeTopology(item.topology), - }) - } else { - // It's just a Topology - return JSON.stringify(encodeTopology(item)) - } +export function configToJson(config: Configuration): string { + return JSON.stringify({ + threshold: config.threshold.toString(), + checkpoint: config.checkpoint.toString(), + topology: topologyToJson(config.topology), + checkpointer: config.checkpointer, + }) } -export function configFromJson(json: string): Topology | Configuration { +export function configFromJson(json: string): Configuration { const parsed = JSON.parse(json) - function decodeTopology(obj: any): Topology { - if (!obj || typeof obj !== 'object') { - throw new Error('decodeTopology: Invalid object') - } - switch (obj.type) { - case 'Node': - return [decodeTopology(obj.left), decodeTopology(obj.right)] - case 'SignerLeaf': - return { - address: obj.address as Address.Address, - weight: BigInt(obj.weight), - imageHash: undefined, - } - case 'SapientSignerLeaf': - return { - address: obj.address, - weight: BigInt(obj.weight), - imageHash: Bytes.fromHex(obj.imageHash), - } - case 'SubdigestLeaf': - return { - digest: Bytes.fromHex(obj.digest), - } - case 'NodeLeaf': - return Bytes.fromHex(obj.data) - case 'NestedLeaf': - return { - tree: decodeTopology(obj.tree), - weight: BigInt(obj.weight), - threshold: BigInt(obj.threshold), - } - default: - throw new Error('decodeTopology: Unrecognized type ' + obj.type) - } - } - - if (parsed.type === 'Configuration') { - return { - threshold: BigInt(parsed.threshold), - checkpoint: BigInt(parsed.checkpoint), - checkpointer: parsed.checkpointer ?? '0x0000000000000000000000000000000000000000', - topology: decodeTopology(parsed.topology), - } - } else { - return decodeTopology(parsed) + return { + threshold: BigInt(parsed.threshold), + checkpoint: BigInt(parsed.checkpoint), + checkpointer: parsed.checkpointer, + topology: topologyFromJson(parsed.topology), } } export function topologyToJson(topology: Topology): string { function encodeTopology(top: Topology): any { if (isNode(top)) { - return { - type: 'Node', - left: encodeTopology(top[0]), - right: encodeTopology(top[1]), - } + return [encodeTopology(top[0]), encodeTopology(top[1])] } else if (isSignerLeaf(top)) { return { - type: 'SignerLeaf', + type: 'signer', address: top.address, weight: top.weight.toString(), } } else if (isSapientSignerLeaf(top)) { return { - type: 'SapientSignerLeaf', + type: 'sapient-signer', address: top.address, weight: top.weight.toString(), - imageHash: Bytes.toHex(top.imageHash), + imageHash: Bytes.toHex(Bytes.padLeft(top.imageHash, 32)), } } else if (isSubdigestLeaf(top)) { return { - type: 'SubdigestLeaf', + type: 'subdigest', digest: Bytes.toHex(top.digest), } } else if (isNodeLeaf(top)) { - return { - type: 'NodeLeaf', - data: Bytes.toHex(top), - } + return Bytes.toHex(top) } else if (isNestedLeaf(top)) { return { - type: 'NestedLeaf', + type: 'nested', tree: encodeTopology(top.tree), weight: top.weight.toString(), threshold: top.threshold.toString(), } } - throw new Error('topologyToJson: Unrecognized Topology') + throw new Error('Invalid topology') } return JSON.stringify(encodeTopology(topology)) } export function topologyFromJson(json: string): Topology { - // We'll parse just a Topology here const parsed = JSON.parse(json) function decodeTopology(obj: any): Topology { - if (!obj || typeof obj !== 'object') { - throw new Error('topologyFromJson: Invalid object') + if (Array.isArray(obj)) { + if (obj.length !== 2) { + throw new Error('Invalid node structure in JSON') + } + return [decodeTopology(obj[0]), decodeTopology(obj[1])] + } + + if (typeof obj === 'string') { + return Bytes.padLeft(Bytes.fromHex(obj as `0x${string}`), 32) } + switch (obj.type) { - case 'Node': - return [decodeTopology(obj.left), decodeTopology(obj.right)] - case 'SignerLeaf': + case 'signer': return { + type: 'signer', address: obj.address, weight: BigInt(obj.weight), - imageHash: undefined, } - case 'SapientSignerLeaf': + case 'sapient-signer': return { + type: 'sapient-signer', address: obj.address, weight: BigInt(obj.weight), imageHash: Bytes.padLeft(Bytes.fromHex(obj.imageHash), 32), } - case 'SubdigestLeaf': + case 'subdigest': return { - digest: Bytes.padLeft(Bytes.fromHex(obj.digest), 32), + type: 'subdigest', + digest: Bytes.fromHex(obj.digest), } - case 'NodeLeaf': - return Bytes.padLeft(Bytes.fromHex(obj.data), 32) - case 'NestedLeaf': + case 'nested': return { + type: 'nested', tree: decodeTopology(obj.tree), weight: BigInt(obj.weight), threshold: BigInt(obj.threshold), } default: - throw new Error('topologyFromJson: Unrecognized type ' + obj.type) + throw new Error('Invalid type in topology JSON') } } diff --git a/packages/primitives/src/signature.ts b/packages/primitives/src/signature.ts index 692a939d2..9088b9147 100644 --- a/packages/primitives/src/signature.ts +++ b/packages/primitives/src/signature.ts @@ -29,6 +29,7 @@ export const FLAG_SIGNATURE_SAPIENT = 9 export const FLAG_SIGNATURE_SAPIENT_COMPACT = 10 export type SignedSignerLeaf = SignerLeaf & { + signed: true signature: | { r: Bytes.Bytes @@ -44,6 +45,7 @@ export type SignedSignerLeaf = SignerLeaf & { } export type SignedSapientSignerLeaf = SapientSigner & { + signed: true signature: { data: Bytes.Bytes type: 'sapient' | 'sapient_compact' @@ -51,6 +53,7 @@ export type SignedSapientSignerLeaf = SapientSigner & { } export type RawSignerLeaf = { + type: 'unrecovered-signer' weight: bigint signature: | { @@ -72,6 +75,7 @@ export type RawSignerLeaf = { } export type RawNestedLeaf = { + type: 'nested' tree: RawTopology weight: bigint threshold: bigint @@ -264,8 +268,9 @@ export function parseBranch(signature: Bytes.Bytes): { index += 20 nodes.push({ - weight, + type: 'signer', address: Bytes.toHex(address), + weight, } as SignerLeaf) continue } @@ -383,6 +388,7 @@ export function parseBranch(signature: Bytes.Bytes): { const subTree = foldNodes(subNodes) nodes.push({ + type: 'nested', tree: subTree, weight, threshold, @@ -398,6 +404,7 @@ export function parseBranch(signature: Bytes.Bytes): { index += 32 nodes.push({ + type: 'subdigest', digest: hardcoded, } as SubdigestLeaf) continue From 6b3471d42fdf2d1738ffa3098af84018704eb37a Mon Sep 17 00:00:00 2001 From: Agusx1211 Date: Fri, 24 Jan 2025 20:11:35 +0000 Subject: [PATCH 047/439] Payload and signature fixes --- .../primitives-cli/src/subcommands/config.ts | 31 +++------ .../primitives-cli/src/subcommands/payload.ts | 64 +++++-------------- packages/primitives-cli/src/utils.ts | 31 +++++++++ packages/primitives/src/config.ts | 9 ++- packages/primitives/src/signature.ts | 2 +- 5 files changed, 63 insertions(+), 74 deletions(-) create mode 100644 packages/primitives-cli/src/utils.ts diff --git a/packages/primitives-cli/src/subcommands/config.ts b/packages/primitives-cli/src/subcommands/config.ts index f58278c8d..c8a776c4f 100644 --- a/packages/primitives-cli/src/subcommands/config.ts +++ b/packages/primitives-cli/src/subcommands/config.ts @@ -9,6 +9,7 @@ import { hashConfiguration, } from '@0xsequence/sequence-primitives' import { Bytes, Hex } from 'ox' +import { fromPosOrStdin } from '../utils' function randomBytes(length: number): Uint8Array { return crypto.getRandomValues(new Uint8Array(length)) @@ -78,7 +79,7 @@ async function generateRandom(maxDepth: number): Promise { console.log(Hex.fromBytes(encoded)) } -async function createConfig(options: { threshold: number; checkpoint: number }): Promise { +async function createConfig(options: { threshold: string; checkpoint: string }): Promise { const config: Configuration = { threshold: BigInt(options.threshold), checkpoint: BigInt(options.checkpoint), @@ -90,18 +91,6 @@ async function createConfig(options: { threshold: number; checkpoint: number }): console.log(configToJson(config)) } -async function getInput(input?: string): Promise { - if (input) { - return input - } - let stdin = '' - process.stdin.setEncoding('utf8') - for await (const chunk of process.stdin) { - stdin += chunk - } - return stdin -} - async function calculateImageHash(input: string): Promise { const config = configFromJson(input) console.log(Hex.fromBytes(hashConfiguration(config))) @@ -137,12 +126,12 @@ const configCommand: CommandModule = { (yargs) => { return yargs .option('threshold', { - type: 'number', + type: 'string', description: 'Threshold value for the configuration', demandOption: true, }) .option('checkpoint', { - type: 'number', + type: 'string', description: 'Checkpoint value for the configuration', demandOption: true, }) @@ -152,30 +141,30 @@ const configCommand: CommandModule = { }, ) .command( - 'image-hash', + 'image-hash [input]', 'Calculate image hash from hex input', (yargs) => { - return yargs.option('input', { + return yargs.positional('input', { type: 'string', description: 'Hex input to hash (if not using pipe)', }) }, async (argv) => { - const input = await getInput(argv.input as string) + const input = await fromPosOrStdin(argv, 'input') await calculateImageHash(input) }, ) .command( - 'encode', + 'encode [input]', 'Encode configuration from hex input', (yargs) => { - return yargs.option('input', { + return yargs.positional('input', { type: 'string', description: 'Hex input to encode (if not using pipe)', }) }, async (argv) => { - const input = await getInput(argv.input as string) + const input = await fromPosOrStdin(argv, 'input') await doEncode(input) }, ) diff --git a/packages/primitives-cli/src/subcommands/payload.ts b/packages/primitives-cli/src/subcommands/payload.ts index 435fc1152..b259c4e05 100644 --- a/packages/primitives-cli/src/subcommands/payload.ts +++ b/packages/primitives-cli/src/subcommands/payload.ts @@ -1,8 +1,9 @@ import { AbiParameters, Address, Bytes, Hex } from 'ox' import type { CommandModule } from 'yargs' import { encode } from '@0xsequence/sequence-primitives' +import { fromPosOrStdin, readStdin } from '../utils' -const KIND_TRANSACTIONS = 0x00 +export const KIND_TRANSACTIONS = 0x00 const KIND_MESSAGE = 0x01 const KIND_CONFIG_UPDATE = 0x02 const KIND_DIGEST = 0x03 @@ -21,7 +22,7 @@ const CallAbi = [ { type: 'uint256', name: 'behaviorOnError' }, ] -const DecodedAbi = [ +export const DecodedAbi = [ { type: 'uint8', name: 'kind' }, { type: 'bool', name: 'noChainId' }, { @@ -37,7 +38,7 @@ const DecodedAbi = [ { type: 'address[]', name: 'parentWallets' }, ] -interface SolidityDecoded { +export interface SolidityDecoded { kind: number noChainId: boolean calls: SolidityCall[] @@ -72,21 +73,6 @@ function behaviorOnError(behavior: number): 'ignore' | 'revert' | 'abort' { } } -async function readStdin(): Promise { - return new Promise((resolve, reject) => { - let data = '' - process.stdin.on('data', (chunk) => { - data += chunk - }) - process.stdin.on('end', () => { - resolve(data.trim()) - }) - process.stdin.on('error', (err) => { - reject(err) - }) - }) -} - async function convertToAbi(_payload: string): Promise { throw new Error('Not implemented') } @@ -119,13 +105,14 @@ async function convertToPacked(payload: string): Promise { throw new Error('Not implemented') } -async function convertToHuman(payload: string): Promise { +async function convertToJson(payload: string): Promise { const decoded = AbiParameters.decode( [{ type: 'tuple', name: 'payload', components: DecodedAbi }], payload as Hex.Hex, )[0] as unknown as SolidityDecoded - console.log(decoded) + const json = JSON.stringify(decoded) + console.log(json) } const payloadCommand: CommandModule = { @@ -143,15 +130,8 @@ const payloadCommand: CommandModule = { }) }, async (argv) => { - const hasArg = typeof argv.payload === 'string' && argv.payload.length > 0 - const hasStdin = !process.stdin.isTTY - if (hasArg && hasStdin) { - throw new Error('Payload can only come from arg or stdin, not both') - } else if (!hasArg && !hasStdin) { - throw new Error('No payload provided and no stdin data') - } - const finalPayload = hasArg ? argv.payload! : await readStdin() - await convertToAbi(finalPayload) + const payload = await fromPosOrStdin(argv, 'payload') + await convertToAbi(payload) }, ) .command( @@ -164,20 +144,13 @@ const payloadCommand: CommandModule = { }) }, async (argv) => { - const hasArg = typeof argv.payload === 'string' && argv.payload.length > 0 - const hasStdin = !process.stdin.isTTY - if (hasArg && hasStdin) { - throw new Error('Payload can only come from arg or stdin, not both') - } else if (!hasArg && !hasStdin) { - throw new Error('No payload provided and no stdin data') - } - const finalPayload = hasArg ? argv.payload! : await readStdin() - await convertToPacked(finalPayload) + const payload = await fromPosOrStdin(argv, 'payload') + await convertToPacked(payload) }, ) .command( - 'to-human [payload]', - 'Convert payload to human readable format', + 'to-json [payload]', + 'Convert payload to JSON format', (yargs) => { return yargs.positional('payload', { type: 'string', @@ -185,15 +158,8 @@ const payloadCommand: CommandModule = { }) }, async (argv) => { - const hasArg = typeof argv.payload === 'string' && argv.payload.length > 0 - const hasStdin = !process.stdin.isTTY - if (hasArg && hasStdin) { - throw new Error('Payload can only come from arg or stdin, not both') - } else if (!hasArg && !hasStdin) { - throw new Error('No payload provided and no stdin data') - } - const finalPayload = hasArg ? argv.payload! : await readStdin() - await convertToHuman(finalPayload) + const payload = await fromPosOrStdin(argv, 'payload') + await convertToJson(payload) }, ) .demandCommand(1, 'You must specify a subcommand for payload') diff --git a/packages/primitives-cli/src/utils.ts b/packages/primitives-cli/src/utils.ts new file mode 100644 index 000000000..8899d8527 --- /dev/null +++ b/packages/primitives-cli/src/utils.ts @@ -0,0 +1,31 @@ +import { Arguments } from 'yargs' + +export async function readStdin(): Promise { + return new Promise((resolve, reject) => { + let data = '' + process.stdin.on('data', (chunk) => { + data += chunk + }) + process.stdin.on('end', () => { + resolve(data.trim()) + }) + process.stdin.on('error', (err) => { + reject(err) + }) + }) +} +export async function fromPosOrStdin(argv: Arguments, arg: keyof T): Promise { + const argValue = String(argv[arg]) + const hasArg = typeof argv[arg] === 'string' && argValue.length > 0 + + if (hasArg) { + return argValue + } + + const hasStdin = !process.stdin.isTTY + if (!hasStdin) { + throw new Error(`No ${String(arg)} provided and no stdin data`) + } + + return await readStdin() +} diff --git a/packages/primitives/src/config.ts b/packages/primitives/src/config.ts index e6c2898be..167164fd8 100644 --- a/packages/primitives/src/config.ts +++ b/packages/primitives/src/config.ts @@ -130,10 +130,13 @@ export function getWeight(configuration: Configuration, signers: Address.Address export function hashConfiguration(topology: Topology | Configuration): Bytes.Bytes { if (isConfiguration(topology)) { let root = hashConfiguration(topology.topology) - root = Hash.keccak256(Bytes.concat(root, Bytes.fromNumber(topology.threshold))) - root = Hash.keccak256(Bytes.concat(root, Bytes.fromNumber(topology.checkpoint))) + root = Hash.keccak256(Bytes.concat(root, Bytes.padLeft(Bytes.fromNumber(topology.threshold), 32))) + root = Hash.keccak256(Bytes.concat(root, Bytes.padLeft(Bytes.fromNumber(topology.checkpoint), 32))) root = Hash.keccak256( - Bytes.concat(root, Bytes.fromHex(topology.checkpointer ?? '0x0000000000000000000000000000000000000000')), + Bytes.concat( + root, + Bytes.padLeft(Bytes.fromHex(topology.checkpointer ?? '0x0000000000000000000000000000000000000000'), 32), + ), ) return root } diff --git a/packages/primitives/src/signature.ts b/packages/primitives/src/signature.ts index 9088b9147..931e25a0e 100644 --- a/packages/primitives/src/signature.ts +++ b/packages/primitives/src/signature.ts @@ -587,7 +587,7 @@ export function encodeTopology( } if (isNodeLeaf(topology)) { - return Bytes.concat(Bytes.fromNumber(FLAG_NODE), topology) + return Bytes.concat(Bytes.fromNumber(FLAG_NODE << 4), topology) } if (isSignedSignerLeaf(topology) || isRawSignerLeaf(topology)) { From b2860e54c73bf605140d85b01cd9f0a1f2c39c17 Mon Sep 17 00:00:00 2001 From: William Hua Date: Tue, 21 Jan 2025 17:18:43 +0100 Subject: [PATCH 048/439] core: wallet implementation TODO: payload hashing TODO: signature building from signer signatures --- packages/core/src/signer.ts | 16 + packages/core/src/state/index.ts | 41 ++ packages/core/src/state/sessions.gen.ts | 774 ++++++++++++++++++++++++ packages/core/src/state/sessions.ts | 111 ++++ packages/core/src/wallet.ts | 158 +++++ 5 files changed, 1100 insertions(+) create mode 100644 packages/core/src/signer.ts create mode 100644 packages/core/src/state/index.ts create mode 100644 packages/core/src/state/sessions.gen.ts create mode 100644 packages/core/src/state/sessions.ts create mode 100644 packages/core/src/wallet.ts diff --git a/packages/core/src/signer.ts b/packages/core/src/signer.ts new file mode 100644 index 000000000..bc2e3d78f --- /dev/null +++ b/packages/core/src/signer.ts @@ -0,0 +1,16 @@ +import { Configuration, Payload } from '@0xsequence/sequence-primitives' +import { Address, Hex } from 'ox' + +export interface Signer { + readonly address: Address.Address | Promise + + sign( + payload: Payload, + ): + | Promise + | { signature: Promise; onSignerSignature?: SignerSignatureCallback; onCancel?: CancelCallback } +} + +export type SignerSignatureCallback = (configuration: Configuration, signatures: Map) => void + +export type CancelCallback = (success: boolean) => void diff --git a/packages/core/src/state/index.ts b/packages/core/src/state/index.ts new file mode 100644 index 000000000..71b494ef8 --- /dev/null +++ b/packages/core/src/state/index.ts @@ -0,0 +1,41 @@ +import { Configuration, Payload } from '@0xsequence/sequence-primitives' +import { Address, Hex } from 'ox' + +type MaybePromise = T | Promise + +export type Signature = + | { type: 'eip-712'; signature: Hex.Hex } + | { type: 'eth_sign'; signature: Hex.Hex } + | { type: 'erc-1271'; signature: Hex.Hex; validAt: { chainId: bigint; block: Block } } + +export interface StateReader { + getConfiguration(imageHash: Hex.Hex): MaybePromise + + getDeployHash(wallet: Address.Address): MaybePromise + + getWallets( + signer: Address.Address, + ): MaybePromise> + + getConfigurationPath( + wallet: Address.Address, + fromImageHash: Hex.Hex, + options?: { allUpdates?: boolean }, + ): MaybePromise> +} + +export interface StateWriter { + saveWallet(deployConfiguration: Configuration): MaybePromise + + saveWitness( + signer: Address.Address, + wallet: Address.Address, + chainId: bigint, + payload: Payload, + signature: Signature, + ): MaybePromise + + setConfiguration(wallet: Address.Address, configuration: Configuration, signature: Hex.Hex): MaybePromise +} + +export * from './sessions' diff --git a/packages/core/src/state/sessions.gen.ts b/packages/core/src/state/sessions.gen.ts new file mode 100644 index 000000000..dc0986462 --- /dev/null +++ b/packages/core/src/state/sessions.gen.ts @@ -0,0 +1,774 @@ +/* eslint-disable */ +// sessions v0.0.1 e8a95eea9b72a50abe2c3b10d8a51c5c3fd8c631 +// -- +// Code generated by webrpc-gen@v0.20.3 with typescript generator. DO NOT EDIT. +// +// webrpc-gen -schema=sessions.ridl -target=typescript -client -out=./clients/sessions.gen.ts + +// WebRPC description and code-gen version +export const WebRPCVersion = 'v1' + +// Schema version of your RIDL schema +export const WebRPCSchemaVersion = 'v0.0.1' + +// Schema hash generated from your RIDL schema +export const WebRPCSchemaHash = 'e8a95eea9b72a50abe2c3b10d8a51c5c3fd8c631' + +// +// Types +// + +export enum SignatureType { + EIP712 = 'EIP712', + EthSign = 'EthSign', + EIP1271 = 'EIP1271', +} + +export interface RuntimeStatus { + healthy: boolean + started: string + uptime: number + version: string + branch: string + commit: string + arweave: ArweaveStatus +} + +export interface ArweaveStatus { + nodeURL: string + namespace: string + sender: string + signer: string + flushInterval: string + bundleDelay: string + bundleLimit: number + confirmations: number + lockTTL: string + healthy: boolean + lastFlush?: string + lastFlushSeconds?: number +} + +export interface Info { + wallets: { [key: string]: number } + configs: { [key: string]: number } + configTrees: number + migrations: { [key: string]: number } + signatures: number + digests: number + recorder: RecorderInfo + arweave: ArweaveInfo +} + +export interface RecorderInfo { + requests: number + buffer: number + lastFlush?: string + lastFlushSeconds?: number + endpoints: { [key: string]: number } +} + +export interface ArweaveInfo { + nodeURL: string + namespace: string + sender: ArweaveSenderInfo + signer: string + flushInterval: string + bundleDelay: string + bundleLimit: number + confirmations: number + lockTTL: string + healthy: boolean + lastFlush?: string + lastFlushSeconds?: number + bundles: number + pending: ArweavePendingInfo +} + +export interface ArweaveSenderInfo { + address: string + balance: string +} + +export interface ArweavePendingInfo { + wallets: number + configs: number + migrations: number + signatures: number + bundles: Array +} + +export interface ArweaveBundleInfo { + transaction: string + block: number + items: number + sentAt: string + confirmations: number +} + +export interface Context { + version: number + factory: string + mainModule: string + mainModuleUpgradable: string + guestModule: string + walletCreationCode: string +} + +export interface Signature { + digest: string + toImageHash?: string + chainID: string + type: SignatureType + signature: string + validOnChain?: string + validOnBlock?: string + validOnBlockHash?: string +} + +export interface SignerSignature { + signer?: string + signature: string + referenceChainID?: string +} + +export interface ConfigUpdate { + toImageHash: string + signature: string +} + +export interface Transaction { + to: string + value?: string + data?: string + gasLimit?: string + delegateCall?: boolean + revertOnError?: boolean +} + +export interface TransactionBundle { + executor: string + transactions: Array + nonce: string + signature: string +} + +export interface Sessions { + ping(headers?: object, signal?: AbortSignal): Promise + config(args: ConfigArgs, headers?: object, signal?: AbortSignal): Promise + wallets(args: WalletsArgs, headers?: object, signal?: AbortSignal): Promise + deployHash(args: DeployHashArgs, headers?: object, signal?: AbortSignal): Promise + configUpdates(args: ConfigUpdatesArgs, headers?: object, signal?: AbortSignal): Promise + migrations(args: MigrationsArgs, headers?: object, signal?: AbortSignal): Promise + saveConfig(args: SaveConfigArgs, headers?: object, signal?: AbortSignal): Promise + saveWallet(args: SaveWalletArgs, headers?: object, signal?: AbortSignal): Promise + saveSignature(args: SaveSignatureArgs, headers?: object, signal?: AbortSignal): Promise + saveSignerSignatures( + args: SaveSignerSignaturesArgs, + headers?: object, + signal?: AbortSignal, + ): Promise + saveSignerSignatures2( + args: SaveSignerSignatures2Args, + headers?: object, + signal?: AbortSignal, + ): Promise + saveMigration(args: SaveMigrationArgs, headers?: object, signal?: AbortSignal): Promise +} + +export interface PingArgs {} + +export interface PingReturn {} +export interface ConfigArgs { + imageHash: string +} + +export interface ConfigReturn { + version: number + config: any +} +export interface WalletsArgs { + signer: string + cursor?: number + limit?: number +} + +export interface WalletsReturn { + wallets: { [key: string]: Signature } + cursor: number +} +export interface DeployHashArgs { + wallet: string +} + +export interface DeployHashReturn { + deployHash: string + context: Context +} +export interface ConfigUpdatesArgs { + wallet: string + fromImageHash: string + allUpdates?: boolean +} + +export interface ConfigUpdatesReturn { + updates: Array +} +export interface MigrationsArgs { + wallet: string + fromVersion: number + fromImageHash: string + chainID?: string +} + +export interface MigrationsReturn { + migrations: { + [key: string]: { [key: number]: { [key: string]: TransactionBundle } } + } +} +export interface SaveConfigArgs { + version: number + config: any +} + +export interface SaveConfigReturn {} +export interface SaveWalletArgs { + version: number + deployConfig: any +} + +export interface SaveWalletReturn {} +export interface SaveSignatureArgs { + wallet: string + digest: string + chainID: string + signature: string + toConfig?: any +} + +export interface SaveSignatureReturn {} +export interface SaveSignerSignaturesArgs { + wallet: string + digest: string + chainID: string + signatures: Array + toConfig?: any +} + +export interface SaveSignerSignaturesReturn {} +export interface SaveSignerSignatures2Args { + wallet: string + digest: string + chainID: string + signatures: Array + toConfig?: any +} + +export interface SaveSignerSignatures2Return {} +export interface SaveMigrationArgs { + wallet: string + fromVersion: number + toVersion: number + toConfig: any + executor: string + transactions: Array + nonce: string + signature: string + chainID?: string +} + +export interface SaveMigrationReturn {} + +// +// Client +// +export class Sessions implements Sessions { + protected hostname: string + protected fetch: Fetch + protected path = '/rpc/Sessions/' + + constructor(hostname: string, fetch: Fetch) { + this.hostname = hostname.replace(/\/*$/, '') + this.fetch = (input: RequestInfo, init?: RequestInit) => fetch(input, init) + } + + private url(name: string): string { + return this.hostname + this.path + name + } + + ping = (headers?: object, signal?: AbortSignal): Promise => { + return this.fetch(this.url('Ping'), createHTTPRequest({}, headers, signal)).then( + (res) => { + return buildResponse(res).then((_data) => { + return {} + }) + }, + (error) => { + throw WebrpcRequestFailedError.new({ + cause: `fetch(): ${error.message || ''}`, + }) + }, + ) + } + + config = (args: ConfigArgs, headers?: object, signal?: AbortSignal): Promise => { + return this.fetch(this.url('Config'), createHTTPRequest(args, headers, signal)).then( + (res) => { + return buildResponse(res).then((_data) => { + return { + version: _data.version, + config: _data.config, + } + }) + }, + (error) => { + throw WebrpcRequestFailedError.new({ + cause: `fetch(): ${error.message || ''}`, + }) + }, + ) + } + + wallets = (args: WalletsArgs, headers?: object, signal?: AbortSignal): Promise => { + return this.fetch(this.url('Wallets'), createHTTPRequest(args, headers, signal)).then( + (res) => { + return buildResponse(res).then((_data) => { + return { + wallets: <{ [key: string]: Signature }>_data.wallets, + cursor: _data.cursor, + } + }) + }, + (error) => { + throw WebrpcRequestFailedError.new({ + cause: `fetch(): ${error.message || ''}`, + }) + }, + ) + } + + deployHash = (args: DeployHashArgs, headers?: object, signal?: AbortSignal): Promise => { + return this.fetch(this.url('DeployHash'), createHTTPRequest(args, headers, signal)).then( + (res) => { + return buildResponse(res).then((_data) => { + return { + deployHash: _data.deployHash, + context: _data.context, + } + }) + }, + (error) => { + throw WebrpcRequestFailedError.new({ + cause: `fetch(): ${error.message || ''}`, + }) + }, + ) + } + + configUpdates = (args: ConfigUpdatesArgs, headers?: object, signal?: AbortSignal): Promise => { + return this.fetch(this.url('ConfigUpdates'), createHTTPRequest(args, headers, signal)).then( + (res) => { + return buildResponse(res).then((_data) => { + return { + updates: >_data.updates, + } + }) + }, + (error) => { + throw WebrpcRequestFailedError.new({ + cause: `fetch(): ${error.message || ''}`, + }) + }, + ) + } + + migrations = (args: MigrationsArgs, headers?: object, signal?: AbortSignal): Promise => { + return this.fetch(this.url('Migrations'), createHTTPRequest(args, headers, signal)).then( + (res) => { + return buildResponse(res).then((_data) => { + return { + migrations: < + { + [key: string]: { + [key: number]: { [key: string]: TransactionBundle } + } + } + >_data.migrations, + } + }) + }, + (error) => { + throw WebrpcRequestFailedError.new({ + cause: `fetch(): ${error.message || ''}`, + }) + }, + ) + } + + saveConfig = (args: SaveConfigArgs, headers?: object, signal?: AbortSignal): Promise => { + return this.fetch(this.url('SaveConfig'), createHTTPRequest(args, headers, signal)).then( + (res) => { + return buildResponse(res).then((_data) => { + return {} + }) + }, + (error) => { + throw WebrpcRequestFailedError.new({ + cause: `fetch(): ${error.message || ''}`, + }) + }, + ) + } + + saveWallet = (args: SaveWalletArgs, headers?: object, signal?: AbortSignal): Promise => { + return this.fetch(this.url('SaveWallet'), createHTTPRequest(args, headers, signal)).then( + (res) => { + return buildResponse(res).then((_data) => { + return {} + }) + }, + (error) => { + throw WebrpcRequestFailedError.new({ + cause: `fetch(): ${error.message || ''}`, + }) + }, + ) + } + + saveSignature = (args: SaveSignatureArgs, headers?: object, signal?: AbortSignal): Promise => { + return this.fetch(this.url('SaveSignature'), createHTTPRequest(args, headers, signal)).then( + (res) => { + return buildResponse(res).then((_data) => { + return {} + }) + }, + (error) => { + throw WebrpcRequestFailedError.new({ + cause: `fetch(): ${error.message || ''}`, + }) + }, + ) + } + + saveSignerSignatures = ( + args: SaveSignerSignaturesArgs, + headers?: object, + signal?: AbortSignal, + ): Promise => { + return this.fetch(this.url('SaveSignerSignatures'), createHTTPRequest(args, headers, signal)).then( + (res) => { + return buildResponse(res).then((_data) => { + return {} + }) + }, + (error) => { + throw WebrpcRequestFailedError.new({ + cause: `fetch(): ${error.message || ''}`, + }) + }, + ) + } + + saveSignerSignatures2 = ( + args: SaveSignerSignatures2Args, + headers?: object, + signal?: AbortSignal, + ): Promise => { + return this.fetch(this.url('SaveSignerSignatures2'), createHTTPRequest(args, headers, signal)).then( + (res) => { + return buildResponse(res).then((_data) => { + return {} + }) + }, + (error) => { + throw WebrpcRequestFailedError.new({ + cause: `fetch(): ${error.message || ''}`, + }) + }, + ) + } + + saveMigration = (args: SaveMigrationArgs, headers?: object, signal?: AbortSignal): Promise => { + return this.fetch(this.url('SaveMigration'), createHTTPRequest(args, headers, signal)).then( + (res) => { + return buildResponse(res).then((_data) => { + return {} + }) + }, + (error) => { + throw WebrpcRequestFailedError.new({ + cause: `fetch(): ${error.message || ''}`, + }) + }, + ) + } +} + +const createHTTPRequest = (body: object = {}, headers: object = {}, signal: AbortSignal | null = null): object => { + return { + method: 'POST', + headers: { ...headers, 'Content-Type': 'application/json' }, + body: JSON.stringify(body || {}), + signal, + } +} + +const buildResponse = (res: Response): Promise => { + return res.text().then((text) => { + let data + try { + data = JSON.parse(text) + } catch (error) { + let message = '' + if (error instanceof Error) { + message = error.message + } + throw WebrpcBadResponseError.new({ + status: res.status, + cause: `JSON.parse(): ${message}: response text: ${text}`, + }) + } + if (!res.ok) { + const code: number = typeof data.code === 'number' ? data.code : 0 + throw (webrpcErrorByCode[code] || WebrpcError).new(data) + } + return data + }) +} + +// +// Errors +// + +export class WebrpcError extends Error { + name: string + code: number + message: string + status: number + cause?: string + + /** @deprecated Use message instead of msg. Deprecated in webrpc v0.11.0. */ + msg: string + + constructor(name: string, code: number, message: string, status: number, cause?: string) { + super(message) + this.name = name || 'WebrpcError' + this.code = typeof code === 'number' ? code : 0 + this.message = message || `endpoint error ${this.code}` + this.msg = this.message + this.status = typeof status === 'number' ? status : 0 + this.cause = cause + Object.setPrototypeOf(this, WebrpcError.prototype) + } + + static new(payload: any): WebrpcError { + return new this(payload.error, payload.code, payload.message || payload.msg, payload.status, payload.cause) + } +} + +// Webrpc errors + +export class WebrpcEndpointError extends WebrpcError { + constructor( + name: string = 'WebrpcEndpoint', + code: number = 0, + message: string = 'endpoint error', + status: number = 0, + cause?: string, + ) { + super(name, code, message, status, cause) + Object.setPrototypeOf(this, WebrpcEndpointError.prototype) + } +} + +export class WebrpcRequestFailedError extends WebrpcError { + constructor( + name: string = 'WebrpcRequestFailed', + code: number = -1, + message: string = 'request failed', + status: number = 0, + cause?: string, + ) { + super(name, code, message, status, cause) + Object.setPrototypeOf(this, WebrpcRequestFailedError.prototype) + } +} + +export class WebrpcBadRouteError extends WebrpcError { + constructor( + name: string = 'WebrpcBadRoute', + code: number = -2, + message: string = 'bad route', + status: number = 0, + cause?: string, + ) { + super(name, code, message, status, cause) + Object.setPrototypeOf(this, WebrpcBadRouteError.prototype) + } +} + +export class WebrpcBadMethodError extends WebrpcError { + constructor( + name: string = 'WebrpcBadMethod', + code: number = -3, + message: string = 'bad method', + status: number = 0, + cause?: string, + ) { + super(name, code, message, status, cause) + Object.setPrototypeOf(this, WebrpcBadMethodError.prototype) + } +} + +export class WebrpcBadRequestError extends WebrpcError { + constructor( + name: string = 'WebrpcBadRequest', + code: number = -4, + message: string = 'bad request', + status: number = 0, + cause?: string, + ) { + super(name, code, message, status, cause) + Object.setPrototypeOf(this, WebrpcBadRequestError.prototype) + } +} + +export class WebrpcBadResponseError extends WebrpcError { + constructor( + name: string = 'WebrpcBadResponse', + code: number = -5, + message: string = 'bad response', + status: number = 0, + cause?: string, + ) { + super(name, code, message, status, cause) + Object.setPrototypeOf(this, WebrpcBadResponseError.prototype) + } +} + +export class WebrpcServerPanicError extends WebrpcError { + constructor( + name: string = 'WebrpcServerPanic', + code: number = -6, + message: string = 'server panic', + status: number = 0, + cause?: string, + ) { + super(name, code, message, status, cause) + Object.setPrototypeOf(this, WebrpcServerPanicError.prototype) + } +} + +export class WebrpcInternalErrorError extends WebrpcError { + constructor( + name: string = 'WebrpcInternalError', + code: number = -7, + message: string = 'internal error', + status: number = 0, + cause?: string, + ) { + super(name, code, message, status, cause) + Object.setPrototypeOf(this, WebrpcInternalErrorError.prototype) + } +} + +export class WebrpcClientDisconnectedError extends WebrpcError { + constructor( + name: string = 'WebrpcClientDisconnected', + code: number = -8, + message: string = 'client disconnected', + status: number = 0, + cause?: string, + ) { + super(name, code, message, status, cause) + Object.setPrototypeOf(this, WebrpcClientDisconnectedError.prototype) + } +} + +export class WebrpcStreamLostError extends WebrpcError { + constructor( + name: string = 'WebrpcStreamLost', + code: number = -9, + message: string = 'stream lost', + status: number = 0, + cause?: string, + ) { + super(name, code, message, status, cause) + Object.setPrototypeOf(this, WebrpcStreamLostError.prototype) + } +} + +export class WebrpcStreamFinishedError extends WebrpcError { + constructor( + name: string = 'WebrpcStreamFinished', + code: number = -10, + message: string = 'stream finished', + status: number = 0, + cause?: string, + ) { + super(name, code, message, status, cause) + Object.setPrototypeOf(this, WebrpcStreamFinishedError.prototype) + } +} + +// Schema errors + +export class InvalidArgumentError extends WebrpcError { + constructor( + name: string = 'InvalidArgument', + code: number = 1, + message: string = 'invalid argument', + status: number = 0, + cause?: string, + ) { + super(name, code, message, status, cause) + Object.setPrototypeOf(this, InvalidArgumentError.prototype) + } +} + +export class NotFoundError extends WebrpcError { + constructor( + name: string = 'NotFound', + code: number = 2, + message: string = 'not found', + status: number = 0, + cause?: string, + ) { + super(name, code, message, status, cause) + Object.setPrototypeOf(this, NotFoundError.prototype) + } +} + +export enum errors { + WebrpcEndpoint = 'WebrpcEndpoint', + WebrpcRequestFailed = 'WebrpcRequestFailed', + WebrpcBadRoute = 'WebrpcBadRoute', + WebrpcBadMethod = 'WebrpcBadMethod', + WebrpcBadRequest = 'WebrpcBadRequest', + WebrpcBadResponse = 'WebrpcBadResponse', + WebrpcServerPanic = 'WebrpcServerPanic', + WebrpcInternalError = 'WebrpcInternalError', + WebrpcClientDisconnected = 'WebrpcClientDisconnected', + WebrpcStreamLost = 'WebrpcStreamLost', + WebrpcStreamFinished = 'WebrpcStreamFinished', + InvalidArgument = 'InvalidArgument', + NotFound = 'NotFound', +} + +const webrpcErrorByCode: { [code: number]: any } = { + [0]: WebrpcEndpointError, + [-1]: WebrpcRequestFailedError, + [-2]: WebrpcBadRouteError, + [-3]: WebrpcBadMethodError, + [-4]: WebrpcBadRequestError, + [-5]: WebrpcBadResponseError, + [-6]: WebrpcServerPanicError, + [-7]: WebrpcInternalErrorError, + [-8]: WebrpcClientDisconnectedError, + [-9]: WebrpcStreamLostError, + [-10]: WebrpcStreamFinishedError, + [1]: InvalidArgumentError, + [2]: NotFoundError, +} + +export type Fetch = (input: RequestInfo, init?: RequestInit) => Promise diff --git a/packages/core/src/state/sessions.ts b/packages/core/src/state/sessions.ts new file mode 100644 index 000000000..501c25da1 --- /dev/null +++ b/packages/core/src/state/sessions.ts @@ -0,0 +1,111 @@ +import { Configuration, Payload } from '@0xsequence/sequence-primitives' +import { Address, Hex } from 'ox' +import { Signature, StateReader, StateWriter } from '.' +import * as service from './sessions.gen' + +export class Sessions implements StateReader, StateWriter { + private sessions: service.Sessions + + constructor(readonly host = 'https://sessions.sequence.app') { + this.sessions = new service.Sessions(host, fetch) + } + + async getConfiguration(imageHash: Hex.Hex): Promise { + const { version, config } = await this.sessions.config({ imageHash }) + + if (version !== 3) { + throw new Error(`v${version} configuration ${imageHash}, only v3 is supported`) + } + + return config + } + + async getDeployHash(wallet: Address.Address): Promise { + const { deployHash } = await this.sessions.deployHash({ wallet }) + + Hex.assert(deployHash) + + return deployHash + } + + async getWallets( + signer: Address.Address, + ): Promise> { + const { wallets } = await this.sessions.wallets({ signer }) + + return Object.entries(wallets).map( + ([wallet, { chainID: chainId, digest, signature, type, validOnChain, validOnBlock }]) => { + Address.assert(wallet) + Hex.assert(digest) + Hex.assert(signature) + + switch (type) { + case service.SignatureType.EIP712: + return { wallet, chainId: BigInt(chainId), digest, signature: { type: 'eip-712', signature } } + + case service.SignatureType.EthSign: + return { wallet, chainId: BigInt(chainId), digest, signature: { type: 'eth_sign', signature } } + + case service.SignatureType.EIP1271: + return { + wallet, + chainId: BigInt(chainId), + digest, + signature: { + type: 'erc-1271', + signature, + validAt: { + chainId: validOnChain ? BigInt(validOnChain) : (undefined as any), + block: validOnBlock ? Number(validOnBlock) : (undefined as any), + }, + }, + } + } + }, + ) + } + + async getConfigurationPath( + wallet: Address.Address, + fromImageHash: Hex.Hex, + options?: { allUpdates?: boolean }, + ): Promise> { + const { updates } = await this.sessions.configUpdates({ wallet, fromImageHash, allUpdates: options?.allUpdates }) + + return updates.map(({ toImageHash: imageHash, signature }) => { + Hex.assert(imageHash) + Hex.assert(signature) + + return { imageHash, signature } + }) + } + + async saveWallet(deployConfiguration: Configuration): Promise { + await this.sessions.saveWallet({ version: 3, deployConfig: deployConfiguration }) + } + + async saveWitness( + signer: Address.Address, + wallet: Address.Address, + chainId: bigint, + payload: Payload, + signature: Signature, + ): Promise { + await this.sessions.saveSignerSignatures2({ + wallet, + chainID: `${chainId}`, + digest, + signatures: [ + { + signer, + signature: signature.signature, + referenceChainID: signature.type === 'erc-1271' ? `${signature.validAt.chainId}` : undefined, + }, + ], + }) + } + + async setConfiguration(wallet: Address.Address, configuration: Configuration, signature: Hex.Hex): Promise { + await this.sessions.saveSignature({ wallet, chainID: '0', digest, signature, toConfig: configuration }) + } +} diff --git a/packages/core/src/wallet.ts b/packages/core/src/wallet.ts new file mode 100644 index 000000000..f6715bcd2 --- /dev/null +++ b/packages/core/src/wallet.ts @@ -0,0 +1,158 @@ +import { + Configuration, + fromConfigUpdate, + getCounterfactualAddress, + getSigners, + getWeight, + hashConfiguration, + Payload, +} from '@0xsequence/sequence-primitives' +import { Address, Bytes, Hex, Provider } from 'ox' +import { CancelCallback, Signer, SignerSignatureCallback } from './signer' +import { Sessions, StateReader, StateWriter } from './state' + +export class Wallet { + private readonly signers = new Map() + private readonly stateProvider: StateReader & StateWriter + + constructor(readonly address: Address.Address) { + this.stateProvider = new Sessions() + } + + static fromConfiguration(configuration: Configuration): Wallet { + return new Wallet(getCounterfactualAddress(configuration)) + } + + async setSigner(signer: Signer) { + this.signers.set(await signer.address, signer) + } + + async setConfiguration(configuration: Configuration, options?: { force: boolean }) { + if (!options?.force) { + } + + const imageHash = Bytes.toHex(hashConfiguration(configuration)) + const signature = Bytes.toHex(await this.sign(fromConfigUpdate(imageHash))) + return this.stateProvider.setConfiguration(this.address, configuration, signature) + } + + async sign( + payload: Payload, + provider?: Provider.Provider, + options?: { trustSigners?: boolean; onSignerError?: (signer: Address.Address, error: any) => void }, + ): Promise { + const signatures: Hex.Hex[] = [] + + let chainId: bigint + let isDeployed: boolean + let imageHash: Hex.Hex + if (provider) { + const responses = await Promise.all([ + provider.request({ method: 'eth_chainId' }), + provider.request({ method: 'eth_getCode', params: [this.address, 'latest'] }), + ]) + + chainId = BigInt(responses[0]) + + const code = responses[1] + if (code === '0x') { + isDeployed = false + imageHash = await this.stateProvider.getDeployHash(this.address) + } else { + isDeployed = true + imageHash = await provider.request({ method: 'eth_call', params: [{ data: '0x51605d80' /* imageHash() */ }] }) + } + + const path = await this.stateProvider.getConfigurationPath(this.address, imageHash) + signatures.push(...path.map(({ signature }) => signature)) + } else { + chainId = 0n + isDeployed = true + + imageHash = await this.stateProvider.getDeployHash(this.address) + const path = await this.stateProvider.getConfigurationPath(this.address, imageHash) + if (path.length) { + imageHash = path[path.length - 1]!.imageHash + } + } + + const configuration = await this.stateProvider.getConfiguration(imageHash) + + const signers = new Map< + Address.Address, + { signer: Signer; signature?: Hex.Hex; onSignerSignature?: SignerSignatureCallback; onCancel?: CancelCallback } + >( + getSigners(configuration).signers.flatMap((address) => { + const signer = this.signers.get(address) + return signer ? [[address, { signer }]] : [] + }), + ) + + if (getWeight(configuration, Array.from(signers.keys())) < configuration.threshold) { + throw new Error('insufficient potential weight') + } + + const signerSignatures = await new Promise>((resolve, reject) => { + const onError = (address: Hex.Hex) => (error: any) => { + signers.delete(address) + + options?.onSignerError?.(address, error) + + if (getWeight(configuration, Array.from(signers.keys())) < configuration.threshold) { + const onCancels = Array.from(signers.values()).flatMap(({ onCancel }) => (onCancel ? [onCancel] : [])) + signers.clear() + onCancels.forEach((onCancel) => onCancel(false)) + reject(new Error('insufficient potential weight')) + } + } + + const onSignerSignature = (address: Hex.Hex) => (signature: Hex.Hex) => { + if (!options?.trustSigners) { + } + + const signer = signers.get(address)! + signer.signature = signature + delete signer.onSignerSignature + delete signer.onCancel + + const signerSignatures = new Map( + Array.from(signers.entries()).flatMap(([address, { signature }]) => + signature ? [[address, signature]] : [], + ), + ) + + const weight = getWeight( + configuration, + Array.from(signers.entries()).flatMap(([address, { signature }]) => (signature ? [address] : [])), + ) + + if (weight < configuration.threshold) { + Array.from(signers.values()).forEach(({ onSignerSignature }) => + onSignerSignature?.(configuration, signerSignatures), + ) + } else { + const onCancels = Array.from(signers.values()).flatMap(({ onCancel }) => (onCancel ? [onCancel] : [])) + signers.clear() + onCancels.forEach((onCancel) => onCancel(true)) + resolve(signerSignatures) + } + } + + for (const [address, signer] of signers.entries()) { + try { + const result = signer.signer.sign(payload) + + if (result instanceof Promise) { + result.then(onSignerSignature(address)).catch(onError(address)) + } else { + result.signature.then(onSignerSignature(address)).catch(onError(address)) + signer.onSignerSignature = result.onSignerSignature + signer.onCancel = result.onCancel + } + } catch (error) { + Promise.resolve(error).then(onError(address)) + } + } + }) + } +} From bec3291fb77b4e3fe68b3611c8288b4118832920 Mon Sep 17 00:00:00 2001 From: Agusx1211 Date: Mon, 27 Jan 2025 22:04:37 +0000 Subject: [PATCH 049/439] Improve payload encode --- packages/primitives/src/payload.ts | 125 ++++++++++++++--------------- 1 file changed, 61 insertions(+), 64 deletions(-) diff --git a/packages/primitives/src/payload.ts b/packages/primitives/src/payload.ts index 39c233349..57396e878 100644 --- a/packages/primitives/src/payload.ts +++ b/packages/primitives/src/payload.ts @@ -73,85 +73,88 @@ export function fromCall(nonce: bigint, space: bigint, calls: Call[]): Payload { export function encode(payload: CallPayload, self?: Address.Address): Bytes.Bytes { const callsLen = payload.calls.length - const minBytes = minBytesFor(payload.nonce) - if (minBytes > 15) { + const nonceBytesNeeded = minBytesFor(payload.nonce) + if (nonceBytesNeeded > 15) { throw new Error('Nonce is too large') } /* globalFlag layout: - - bit 1: spaceZeroFlag => 1 if space == 0, else 0 - bits [2..4]: nonceBytes => how many bytes we use to encode nonce - bit 5: singleCallFlag => 1 if there's exactly one call, else 0 - bit 6: callsCountSizeFlag => 1 if #calls stored in 1 byte, else 0 if stored in 2 bytes - - (bits 7..7 are unused, or free) + bit 0: spaceZeroFlag => 1 if space == 0, else 0 + bits [1..3]: how many bytes we use to encode nonce + bit 4: singleCallFlag => 1 if there's exactly one call + bit 5: callsCountSizeFlag => 1 if #calls stored in 2 bytes, 0 if in 1 byte + (bits [6..7] are unused/free) */ let globalFlag = 0 + if (payload.space === 0n) { globalFlag |= 0x01 } - globalFlag |= minBytes << 1 + + // bits [1..3] => how many bytes for the nonce + globalFlag |= nonceBytesNeeded << 1 + + // bit [4] => singleCallFlag if (callsLen === 1) { globalFlag |= 0x10 } - // If more than one call, figure out if we store the calls count in 1 or 2 bytes + /* + If there's more than one call, we decide if we store the #calls in 1 or 2 bytes. + bit [5] => callsCountSizeFlag: 1 => 2 bytes, 0 => 1 byte + */ let callsCountSize = 0 if (callsLen !== 1) { if (callsLen < 256) { callsCountSize = 1 } else if (callsLen < 65536) { - globalFlag |= 0x20 callsCountSize = 2 + globalFlag |= 0x20 } else { throw new Error('Too many calls') } } - const out: number[] = [] - out.push(globalFlag) + // Start building the output + // We'll accumulate in a Bytes object as we go + let out = Bytes.fromNumber(globalFlag, { size: 1 }) - // If space isn't zero, we store it in 20 bytes (uint160) + // If space isn't 0, store it as exactly 20 bytes (like uint160) if (payload.space !== 0n) { - const spaceHex = payload.space.toString(16).padStart(40, '0') - for (let i = 0; i < 20; i++) { - out.push(parseInt(spaceHex.substring(i * 2, i * 2 + 2), 16)) - } + const spaceBytes = Bytes.padLeft(Bytes.fromNumber(payload.space), 20) + out = Bytes.concat(out, spaceBytes) } - // Encode nonce in minBytes - if (minBytes > 0) { - let nonceHex = payload.nonce.toString(16) - nonceHex = nonceHex.padStart(minBytes * 2, '0') - for (let i = 0; i < minBytes; i++) { - out.push(parseInt(nonceHex.substring(i * 2, i * 2 + 2), 16)) - } + // Encode nonce in nonceBytesNeeded + if (nonceBytesNeeded > 0) { + // We'll store nonce in exactly nonceBytesNeeded bytes + const nonceBytes = Bytes.padLeft(Bytes.fromNumber(payload.nonce), nonceBytesNeeded) + out = Bytes.concat(out, nonceBytes) } - // Store the calls length if not single-call + // Store callsLen if not single-call if (callsLen !== 1) { if (callsCountSize === 1) { - out.push(callsLen & 0xff) + out = Bytes.concat(out, Bytes.fromNumber(callsLen, { size: 1 })) } else { - out.push((callsLen >> 8) & 0xff, callsLen & 0xff) + // callsCountSize === 2 + out = Bytes.concat(out, Bytes.fromNumber(callsLen, { size: 2 })) } } - /* - Each call has a flags byte: - - bit 0: toSelf => 1 if call.to == address(this) in solidity, else 0 - bit 1: hasValue => 1 if call.value != 0 - bit 2: hasData => 1 if call.data.length > 0 - bit 3: hasGasLimit => 1 if call.gasLimit != 0 - bit 4: delegateCall - bit 5: onlyFallback - bits [6..7]: behaviorOnError => 0=ignore, 1=revert, 2=abort - */ - + // Now encode each call for (const call of payload.calls) { + /* + call flags layout (1 byte): + bit 0 => toSelf (call.to == this) + bit 1 => hasValue (call.value != 0) + bit 2 => hasData (call.data.length > 0) + bit 3 => hasGasLimit (call.gasLimit != 0) + bit 4 => delegateCall + bit 5 => onlyFallback + bits [6..7] => behaviorOnError => 0=ignore, 1=revert, 2=abort + */ let flags = 0 if (self && call.to === self) { @@ -178,7 +181,6 @@ export function encode(payload: CallPayload, self?: Address.Address): Bytes.Byte flags |= 0x20 } - // bits [6..7] => behaviorOnError let behaviorBits = 0 switch (call.behaviorOnError) { case 'ignore': @@ -191,49 +193,44 @@ export function encode(payload: CallPayload, self?: Address.Address): Bytes.Byte behaviorBits = 2 break default: - throw new Error(`Unknown behavior: ${call.behaviorOnError}`) + throw new Error(`Unknown behaviorOnError: ${call.behaviorOnError}`) } flags |= behaviorBits << 6 - out.push(flags) + out = Bytes.concat(out, Bytes.fromNumber(flags, { size: 1 })) - // If bit0 is 0, we store the address in 20 bytes + // If toSelf bit not set, store 20-byte address if ((flags & 0x01) === 0) { - const addr = call.to.startsWith('0x') ? call.to.substring(2) : call.to - if (addr.length !== 40) { + const addrBytes = Bytes.fromHex(call.to) + if (addrBytes.length !== 20) { throw new Error(`Invalid 'to' address: ${call.to}`) } - for (let i = 0; i < 20; i++) { - out.push(parseInt(addr.substring(i * 2, i * 2 + 2), 16)) - } + out = Bytes.concat(out, addrBytes) } - // If bit1 is set, store 32 bytes of value + // If hasValue, store 32 bytes of value if ((flags & 0x02) !== 0) { - const valHex = call.value.toString(16).padStart(64, '0') - for (let i = 0; i < 32; i++) { - out.push(parseInt(valHex.substring(i * 2, i * 2 + 2), 16)) - } + const valueBytes = Bytes.padLeft(Bytes.fromNumber(call.value), 32) + out = Bytes.concat(out, valueBytes) } - // If bit2 is set, store 3 bytes of data length + data + // If hasData, store 3 bytes of data length + data if ((flags & 0x04) !== 0) { const dataLen = call.data.length if (dataLen > 0xffffff) { throw new Error('Data too large') } - out.push((dataLen >> 16) & 0xff, (dataLen >> 8) & 0xff, dataLen & 0xff) - out.push(...call.data) + // 3 bytes => up to 16,777,215 + const dataLenBytes = Bytes.fromNumber(dataLen, { size: 3 }) + out = Bytes.concat(out, dataLenBytes, call.data) } - // If bit3 is set, store 32 bytes of gasLimit + // If hasGasLimit, store 32 bytes of gasLimit if ((flags & 0x08) !== 0) { - const gasHex = call.gasLimit.toString(16).padStart(64, '0') - for (let i = 0; i < 32; i++) { - out.push(parseInt(gasHex.substring(i * 2, i * 2 + 2), 16)) - } + const gasBytes = Bytes.padLeft(Bytes.fromNumber(call.gasLimit), 32) + out = Bytes.concat(out, gasBytes) } } - return Bytes.from(out) + return out } From 0372489e9c22a45cd16b9e78f47acc380b90d9e3 Mon Sep 17 00:00:00 2001 From: Agusx1211 Date: Mon, 27 Jan 2025 22:58:10 +0000 Subject: [PATCH 050/439] Fix config json --- packages/primitives/src/config.ts | 154 ++++++++++++++---------------- 1 file changed, 74 insertions(+), 80 deletions(-) diff --git a/packages/primitives/src/config.ts b/packages/primitives/src/config.ts index 167164fd8..f5707527d 100644 --- a/packages/primitives/src/config.ts +++ b/packages/primitives/src/config.ts @@ -6,7 +6,7 @@ export type SignerLeaf = { weight: bigint } -export type SapientSigner = { +export type SapientSignerLeaf = { type: 'sapient-signer' address: Address.Address weight: bigint @@ -29,7 +29,7 @@ export type NodeLeaf = Bytes.Bytes export type Node = [Topology, Topology] -export type Leaf = SignerLeaf | SapientSigner | SubdigestLeaf | NestedLeaf | NodeLeaf +export type Leaf = SignerLeaf | SapientSignerLeaf | SubdigestLeaf | NestedLeaf | NodeLeaf export type Topology = Node | Leaf @@ -44,7 +44,7 @@ export function isSignerLeaf(cand: any): cand is SignerLeaf { return typeof cand === 'object' && cand !== null && cand.type === 'signer' } -export function isSapientSignerLeaf(cand: any): cand is SapientSigner { +export function isSapientSignerLeaf(cand: any): cand is SapientSignerLeaf { return typeof cand === 'object' && cand !== null && cand.type === 'sapient-signer' } @@ -70,7 +70,11 @@ export function isConfiguration(cand: any): cand is Configuration { export function isLeaf(cand: Topology): cand is Leaf { return ( - isSignerLeaf(cand) || isSapientSignerLeaf(cand) || isSubdigestLeaf(cand) || isNodeLeaf(cand) || isNestedLeaf(cand) + isSignerLeaf(cand) || + isSapientSignerLeaf(cand) || + isSubdigestLeaf(cand) || + isNodeLeaf(cand) || + isNestedLeaf(cand) ) } @@ -103,7 +107,6 @@ export function getSigners(configuration: Configuration | Topology): { } scan(isConfiguration(configuration) ? configuration.topology : configuration) - return { signers: Array.from(signers), isComplete } } @@ -188,105 +191,96 @@ export function configToJson(config: Configuration): string { return JSON.stringify({ threshold: config.threshold.toString(), checkpoint: config.checkpoint.toString(), - topology: topologyToJson(config.topology), + topology: encodeTopology(config.topology), checkpointer: config.checkpointer, }) } export function configFromJson(json: string): Configuration { const parsed = JSON.parse(json) - return { threshold: BigInt(parsed.threshold), checkpoint: BigInt(parsed.checkpoint), checkpointer: parsed.checkpointer, - topology: topologyFromJson(parsed.topology), + topology: decodeTopology(parsed.topology), + } +} + +function encodeTopology(top: Topology): any { + if (isNode(top)) { + return [encodeTopology(top[0]), encodeTopology(top[1])] + } else if (isSignerLeaf(top)) { + return { + type: 'signer', + address: top.address, + weight: top.weight.toString(), + } + } else if (isSapientSignerLeaf(top)) { + return { + type: 'sapient-signer', + address: top.address, + weight: top.weight.toString(), + imageHash: Bytes.toHex(Bytes.padLeft(top.imageHash, 32)), + } + } else if (isSubdigestLeaf(top)) { + return { + type: 'subdigest', + digest: Bytes.toHex(top.digest), + } + } else if (isNodeLeaf(top)) { + return Bytes.toHex(top) + } else if (isNestedLeaf(top)) { + return { + type: 'nested', + tree: encodeTopology(top.tree), + weight: top.weight.toString(), + threshold: top.threshold.toString(), + } } + + throw new Error('Invalid topology') } -export function topologyToJson(topology: Topology): string { - function encodeTopology(top: Topology): any { - if (isNode(top)) { - return [encodeTopology(top[0]), encodeTopology(top[1])] - } else if (isSignerLeaf(top)) { + +function decodeTopology(obj: any): Topology { + if (Array.isArray(obj)) { + if (obj.length !== 2) { + throw new Error('Invalid node structure in JSON') + } + return [decodeTopology(obj[0]), decodeTopology(obj[1])] + } + + if (typeof obj === 'string') { + return Bytes.padLeft(Bytes.fromHex(obj as `0x${string}`), 32) + } + + switch (obj.type) { + case 'signer': return { type: 'signer', - address: top.address, - weight: top.weight.toString(), + address: obj.address, + weight: BigInt(obj.weight), } - } else if (isSapientSignerLeaf(top)) { + case 'sapient-signer': return { type: 'sapient-signer', - address: top.address, - weight: top.weight.toString(), - imageHash: Bytes.toHex(Bytes.padLeft(top.imageHash, 32)), + address: obj.address, + weight: BigInt(obj.weight), + imageHash: Bytes.padLeft(Bytes.fromHex(obj.imageHash), 32), } - } else if (isSubdigestLeaf(top)) { + case 'subdigest': return { type: 'subdigest', - digest: Bytes.toHex(top.digest), + digest: Bytes.fromHex(obj.digest), } - } else if (isNodeLeaf(top)) { - return Bytes.toHex(top) - } else if (isNestedLeaf(top)) { + case 'nested': return { type: 'nested', - tree: encodeTopology(top.tree), - weight: top.weight.toString(), - threshold: top.threshold.toString(), + tree: decodeTopology(obj.tree), + weight: BigInt(obj.weight), + threshold: BigInt(obj.threshold), } - } - throw new Error('Invalid topology') + default: + throw new Error('Invalid type in topology JSON') } - - return JSON.stringify(encodeTopology(topology)) -} - -export function topologyFromJson(json: string): Topology { - const parsed = JSON.parse(json) - - function decodeTopology(obj: any): Topology { - if (Array.isArray(obj)) { - if (obj.length !== 2) { - throw new Error('Invalid node structure in JSON') - } - return [decodeTopology(obj[0]), decodeTopology(obj[1])] - } - - if (typeof obj === 'string') { - return Bytes.padLeft(Bytes.fromHex(obj as `0x${string}`), 32) - } - - switch (obj.type) { - case 'signer': - return { - type: 'signer', - address: obj.address, - weight: BigInt(obj.weight), - } - case 'sapient-signer': - return { - type: 'sapient-signer', - address: obj.address, - weight: BigInt(obj.weight), - imageHash: Bytes.padLeft(Bytes.fromHex(obj.imageHash), 32), - } - case 'subdigest': - return { - type: 'subdigest', - digest: Bytes.fromHex(obj.digest), - } - case 'nested': - return { - type: 'nested', - tree: decodeTopology(obj.tree), - weight: BigInt(obj.weight), - threshold: BigInt(obj.threshold), - } - default: - throw new Error('Invalid type in topology JSON') - } - } - - return decodeTopology(parsed) } From aeb965a29a7fe641b1539869620b939b103319ea Mon Sep 17 00:00:00 2001 From: Agusx1211 Date: Mon, 27 Jan 2025 22:58:24 +0000 Subject: [PATCH 051/439] Fill leaves --- packages/primitives/src/signature.ts | 102 ++++++++++++++++++--------- 1 file changed, 67 insertions(+), 35 deletions(-) diff --git a/packages/primitives/src/signature.ts b/packages/primitives/src/signature.ts index 931e25a0e..d0dcb0358 100644 --- a/packages/primitives/src/signature.ts +++ b/packages/primitives/src/signature.ts @@ -2,7 +2,8 @@ import { Address, Bytes } from 'ox' import { Configuration, Leaf, - SapientSigner, + NestedLeaf, + SapientSignerLeaf, SignerLeaf, SubdigestLeaf, Topology, @@ -28,50 +29,37 @@ export const FLAG_SIGNATURE_EIP712 = 8 export const FLAG_SIGNATURE_SAPIENT = 9 export const FLAG_SIGNATURE_SAPIENT_COMPACT = 10 +export type SignatureOfSignerLeaf = { + r: Bytes.Bytes + s: Bytes.Bytes + v: number + type: 'eth_sign' | 'hash' +} | { + address: `0x${string}` + data: Bytes.Bytes + type: 'erc1271' +} + +export type SignatureOfSapientSignerLeaf = { + address: `0x${string}` + data: Bytes.Bytes + type: 'sapient' | 'sapient_compact' +} + export type SignedSignerLeaf = SignerLeaf & { signed: true - signature: - | { - r: Bytes.Bytes - s: Bytes.Bytes - v: number - type: 'eth_sign' | 'hash' - } - | { - address: `0x${string}` - data: Bytes.Bytes - type: 'erc1271' - } + signature: SignatureOfSignerLeaf } -export type SignedSapientSignerLeaf = SapientSigner & { +export type SignedSapientSignerLeaf = SapientSignerLeaf & { signed: true - signature: { - data: Bytes.Bytes - type: 'sapient' | 'sapient_compact' - } + signature: SignatureOfSapientSignerLeaf } export type RawSignerLeaf = { type: 'unrecovered-signer' weight: bigint - signature: - | { - r: Bytes.Bytes - s: Bytes.Bytes - v: number - type: 'eth_sign' | 'hash' - } - | { - address: `0x${string}` - data: Bytes.Bytes - type: 'erc1271' - } - | { - address: `0x${string}` - data: Bytes.Bytes - type: 'sapient' | 'sapient_compact' - } + signature: SignatureOfSignerLeaf | SignatureOfSapientSignerLeaf } export type RawNestedLeaf = { @@ -456,6 +444,50 @@ export function parseBranch(signature: Bytes.Bytes): { return { nodes, leftover: signature.slice(index) } } +export function fillLeaves( + topology: Topology, + signatureFor: ( + leaf: SignerLeaf | SapientSignerLeaf + ) => SignatureOfSignerLeaf | SignatureOfSapientSignerLeaf | undefined, +): Topology { + if (isNode(topology)) { + return [ + fillLeaves(topology[0]!, signatureFor), + fillLeaves(topology[1]!, signatureFor), + ] as Topology + } + + if (isSignerLeaf(topology)) { + const signature = signatureFor(topology) + if (!signature) { + return topology + } + return { ...topology, signature } as SignedSignerLeaf + } + + if (isSapientSignerLeaf(topology)) { + const signature = signatureFor(topology) + if (!signature) { + return topology + } + return { ...topology, signature } as SignedSapientSignerLeaf + } + + if (isSubdigestLeaf(topology)) { + return topology + } + + if (isNestedLeaf(topology)) { + return { ...topology, tree: fillLeaves(topology.tree, signatureFor) } as NestedLeaf + } + + if (isNodeLeaf(topology)) { + return topology + } + + throw new Error('Invalid topology') +} + export function encodeSignature( config: Configuration | RawConfiguration, options: { From f82567897b7b4a36dce34fc84893e1f468d56cd3 Mon Sep 17 00:00:00 2001 From: Agusx1211 Date: Mon, 27 Jan 2025 22:58:31 +0000 Subject: [PATCH 052/439] Add dev tools and encode config --- packages/primitives-cli/src/index.ts | 12 +- .../primitives-cli/src/subcommands/config.ts | 85 +---------- .../src/subcommands/devTools.ts | 143 ++++++++++++++++++ .../src/subcommands/signature.ts | 33 ++++ 4 files changed, 188 insertions(+), 85 deletions(-) create mode 100644 packages/primitives-cli/src/subcommands/devTools.ts create mode 100644 packages/primitives-cli/src/subcommands/signature.ts diff --git a/packages/primitives-cli/src/index.ts b/packages/primitives-cli/src/index.ts index 4e3ce4e44..2269bb43e 100644 --- a/packages/primitives-cli/src/index.ts +++ b/packages/primitives-cli/src/index.ts @@ -4,5 +4,15 @@ import yargs from 'yargs' import { hideBin } from 'yargs/helpers' import payloadCommand from './subcommands/payload' import configCommand from './subcommands/config' +import devToolsCommand from './subcommands/devTools' +import signatureCommand from './subcommands/signature' -void yargs(hideBin(process.argv)).command(payloadCommand).command(configCommand).demandCommand(1).strict().help().argv +void yargs(hideBin(process.argv)) + .command(payloadCommand) + .command(configCommand) + .command(devToolsCommand) + .command(signatureCommand) + .demandCommand(1) + .strict() + .help() + .argv diff --git a/packages/primitives-cli/src/subcommands/config.ts b/packages/primitives-cli/src/subcommands/config.ts index c8a776c4f..cbddb9e98 100644 --- a/packages/primitives-cli/src/subcommands/config.ts +++ b/packages/primitives-cli/src/subcommands/config.ts @@ -1,8 +1,7 @@ -import crypto from 'crypto' + import type { CommandModule } from 'yargs' import { Configuration, - Topology, configToJson, configFromJson, encodeSignature, @@ -11,74 +10,6 @@ import { import { Bytes, Hex } from 'ox' import { fromPosOrStdin } from '../utils' -function randomBytes(length: number): Uint8Array { - return crypto.getRandomValues(new Uint8Array(length)) -} - -function randomBigInt(max: bigint): bigint { - return BigInt(Math.floor(Math.random() * Number(max))) -} - -function randomAddress(): `0x${string}` { - return `0x${Buffer.from(randomBytes(20)).toString('hex')}` -} - -function generateRandomTopology(depth: number): Topology { - if (depth <= 0) { - // Generate a random leaf - const leafType = Math.floor(Math.random() * 5) - - switch (leafType) { - case 0: // SignerLeaf - return { - type: 'signer', - address: randomAddress(), - weight: randomBigInt(100n), - } - - case 1: // SapientSigner - return { - type: 'sapient-signer', - address: randomAddress(), - weight: randomBigInt(100n), - imageHash: randomBytes(32), - } - - case 2: // SubdigestLeaf - return { - type: 'subdigest', - digest: randomBytes(32), - } - - case 3: // NodeLeaf - return randomBytes(32) - - case 4: // NestedLeaf - return { - type: 'nested', - tree: generateRandomTopology(0), - weight: randomBigInt(100n), - threshold: randomBigInt(50n), - } - } - } - - // Generate a node with two random subtrees - return [generateRandomTopology(depth - 1), generateRandomTopology(depth - 1)] -} - -async function generateRandom(maxDepth: number): Promise { - const config: Configuration = { - threshold: randomBigInt(100n), - checkpoint: randomBigInt(1000n), - topology: generateRandomTopology(maxDepth), - checkpointer: Math.random() > 0.5 ? randomAddress() : undefined, - } - - const encoded = encodeSignature(config) - console.log(Hex.fromBytes(encoded)) -} - async function createConfig(options: { threshold: string; checkpoint: string }): Promise { const config: Configuration = { threshold: BigInt(options.threshold), @@ -106,20 +37,6 @@ const configCommand: CommandModule = { describe: 'Configuration utilities', builder: (yargs) => { return yargs - .command( - 'random', - 'Generate a random configuration', - (yargs) => { - return yargs.option('max-depth', { - type: 'number', - description: 'Maximum depth of the configuration tree', - default: 3, - }) - }, - async (argv) => { - await generateRandom(argv.maxDepth as number) - }, - ) .command( 'new', 'Create a new configuration', diff --git a/packages/primitives-cli/src/subcommands/devTools.ts b/packages/primitives-cli/src/subcommands/devTools.ts new file mode 100644 index 000000000..2a1cadabc --- /dev/null +++ b/packages/primitives-cli/src/subcommands/devTools.ts @@ -0,0 +1,143 @@ +import crypto from 'crypto' +import type { CommandModule } from 'yargs' +import { + Configuration, + Topology, + configToJson, +} from '@0xsequence/sequence-primitives' +import { Hex } from 'ox' + +function createSeededRandom(seed: string) { + let currentSeed = seed + let hash = crypto.createHash('sha256').update(currentSeed).digest() + let index = 0 + + return () => { + if (index >= hash.length - 4) { + currentSeed = currentSeed + '1' + hash = crypto.createHash('sha256').update(currentSeed).digest() + index = 0 + } + + const value = hash.readUInt32LE(index) / 0x100000000 + index += 4 + return value + } +} + +function randomBytes(length: number, seededRandom?: () => number): Uint8Array { + const bytes = new Uint8Array(length) + if (seededRandom) { + for (let i = 0; i < length; i++) { + bytes[i] = Math.floor(seededRandom() * 256) + } + return bytes + } + return crypto.getRandomValues(bytes) +} + +function randomBigInt(max: bigint, seededRandom?: () => number): bigint { + if (seededRandom) { + return BigInt(Math.floor(seededRandom() * Number(max))) + } + return BigInt(Math.floor(Math.random() * Number(max))) +} + +function randomAddress(seededRandom?: () => number): `0x${string}` { + return `0x${Buffer.from(randomBytes(20, seededRandom)).toString('hex')}` +} + +function generateRandomTopology(depth: number, seededRandom?: () => number): Topology { + if (depth <= 0) { + const leafType = seededRandom + ? Math.floor(seededRandom() * 5) + : Math.floor(Math.random() * 5) + + switch (leafType) { + case 0: // SignerLeaf + return { + type: 'signer', + address: randomAddress(seededRandom), + weight: randomBigInt(100n, seededRandom), + } + + case 1: // SapientSigner + return { + type: 'sapient-signer', + address: randomAddress(seededRandom), + weight: randomBigInt(100n, seededRandom), + imageHash: randomBytes(32, seededRandom), + } + + case 2: // SubdigestLeaf + return { + type: 'subdigest', + digest: randomBytes(32, seededRandom), + } + + case 3: // NodeLeaf + return randomBytes(32, seededRandom) + + case 4: // NestedLeaf + return { + type: 'nested', + tree: generateRandomTopology(0, seededRandom), + weight: randomBigInt(100n, seededRandom), + threshold: randomBigInt(50n, seededRandom), + } + } + } + + // Generate a node with two random subtrees + return [ + generateRandomTopology(depth - 1, seededRandom), + generateRandomTopology(depth - 1, seededRandom) + ] +} + +async function generateRandomConfig(maxDepth: number, seed?: string): Promise { + const seededRandom = seed ? createSeededRandom(seed) : undefined + + const config: Configuration = { + threshold: randomBigInt(100n, seededRandom), + checkpoint: randomBigInt(1000n, seededRandom), + topology: generateRandomTopology(maxDepth, seededRandom), + checkpointer: (seededRandom ? seededRandom() : Math.random()) > 0.5 + ? randomAddress(seededRandom) + : undefined, + } + + console.log(configToJson(config)) +} + +const command: CommandModule = { + command: 'dev-tools', + describe: 'Development tools and utilities', + builder: (yargs) => + yargs + .command( + 'random-config', + 'Generate a random configuration', + (yargs) => { + return yargs + .option('max-depth', { + type: 'number', + description: 'Maximum depth of the configuration tree', + default: 3, + }) + .option('seed', { + type: 'string', + description: 'Seed for deterministic generation', + required: false, + }) + }, + async (argv) => { + await generateRandomConfig(argv.maxDepth as number, argv.seed) + }, + ) + .demandCommand(1, 'You must specify a subcommand for dev-tools') + .strict(), + handler: () => {}, +} + +export default command diff --git a/packages/primitives-cli/src/subcommands/signature.ts b/packages/primitives-cli/src/subcommands/signature.ts new file mode 100644 index 000000000..5f650c218 --- /dev/null +++ b/packages/primitives-cli/src/subcommands/signature.ts @@ -0,0 +1,33 @@ +import type { CommandModule } from 'yargs' +import { fromPosOrStdin } from '../utils' + +async function doEncode(input: string): Promise { + // TODO: Implement signature encoding + throw new Error('Not implemented') +} + +const signatureCommand: CommandModule = { + command: 'signature', + describe: 'Signature utilities', + builder: (yargs) => { + return yargs + .command( + 'encode [input]', + 'Encode signature from hex input', + (yargs) => { + return yargs.positional('input', { + type: 'string', + description: 'Hex input to encode (if not using pipe)', + }) + }, + async (argv) => { + const input = await fromPosOrStdin(argv, 'input') + await doEncode(input) + }, + ) + .demandCommand(1, 'You must specify a subcommand for signature') + }, + handler: () => {}, +} + +export default signatureCommand \ No newline at end of file From 7df76e830d4d7c164ca7cd11f96a515e6d6cc6fa Mon Sep 17 00:00:00 2001 From: William Hua Date: Tue, 28 Jan 2025 09:46:06 -0500 Subject: [PATCH 053/439] pnpm format --- packages/primitives-cli/src/index.ts | 3 +- .../primitives-cli/src/subcommands/config.ts | 1 - .../src/subcommands/devTools.ts | 23 ++++----------- .../src/subcommands/signature.ts | 2 +- packages/primitives/src/config.ts | 7 +---- packages/primitives/src/signature.ts | 29 +++++++++---------- 6 files changed, 23 insertions(+), 42 deletions(-) diff --git a/packages/primitives-cli/src/index.ts b/packages/primitives-cli/src/index.ts index 2269bb43e..f9a86c8b0 100644 --- a/packages/primitives-cli/src/index.ts +++ b/packages/primitives-cli/src/index.ts @@ -14,5 +14,4 @@ void yargs(hideBin(process.argv)) .command(signatureCommand) .demandCommand(1) .strict() - .help() - .argv + .help().argv diff --git a/packages/primitives-cli/src/subcommands/config.ts b/packages/primitives-cli/src/subcommands/config.ts index cbddb9e98..101b03b99 100644 --- a/packages/primitives-cli/src/subcommands/config.ts +++ b/packages/primitives-cli/src/subcommands/config.ts @@ -1,4 +1,3 @@ - import type { CommandModule } from 'yargs' import { Configuration, diff --git a/packages/primitives-cli/src/subcommands/devTools.ts b/packages/primitives-cli/src/subcommands/devTools.ts index 2a1cadabc..1a6f80572 100644 --- a/packages/primitives-cli/src/subcommands/devTools.ts +++ b/packages/primitives-cli/src/subcommands/devTools.ts @@ -1,10 +1,6 @@ import crypto from 'crypto' import type { CommandModule } from 'yargs' -import { - Configuration, - Topology, - configToJson, -} from '@0xsequence/sequence-primitives' +import { Configuration, Topology, configToJson } from '@0xsequence/sequence-primitives' import { Hex } from 'ox' function createSeededRandom(seed: string) { @@ -49,9 +45,7 @@ function randomAddress(seededRandom?: () => number): `0x${string}` { function generateRandomTopology(depth: number, seededRandom?: () => number): Topology { if (depth <= 0) { - const leafType = seededRandom - ? Math.floor(seededRandom() * 5) - : Math.floor(Math.random() * 5) + const leafType = seededRandom ? Math.floor(seededRandom() * 5) : Math.floor(Math.random() * 5) switch (leafType) { case 0: // SignerLeaf @@ -89,22 +83,17 @@ function generateRandomTopology(depth: number, seededRandom?: () => number): Top } // Generate a node with two random subtrees - return [ - generateRandomTopology(depth - 1, seededRandom), - generateRandomTopology(depth - 1, seededRandom) - ] + return [generateRandomTopology(depth - 1, seededRandom), generateRandomTopology(depth - 1, seededRandom)] } async function generateRandomConfig(maxDepth: number, seed?: string): Promise { const seededRandom = seed ? createSeededRandom(seed) : undefined - + const config: Configuration = { threshold: randomBigInt(100n, seededRandom), checkpoint: randomBigInt(1000n, seededRandom), topology: generateRandomTopology(maxDepth, seededRandom), - checkpointer: (seededRandom ? seededRandom() : Math.random()) > 0.5 - ? randomAddress(seededRandom) - : undefined, + checkpointer: (seededRandom ? seededRandom() : Math.random()) > 0.5 ? randomAddress(seededRandom) : undefined, } console.log(configToJson(config)) @@ -140,4 +129,4 @@ const command: CommandModule = { handler: () => {}, } -export default command +export default command diff --git a/packages/primitives-cli/src/subcommands/signature.ts b/packages/primitives-cli/src/subcommands/signature.ts index 5f650c218..8a568e370 100644 --- a/packages/primitives-cli/src/subcommands/signature.ts +++ b/packages/primitives-cli/src/subcommands/signature.ts @@ -30,4 +30,4 @@ const signatureCommand: CommandModule = { handler: () => {}, } -export default signatureCommand \ No newline at end of file +export default signatureCommand diff --git a/packages/primitives/src/config.ts b/packages/primitives/src/config.ts index f5707527d..31e9d4a28 100644 --- a/packages/primitives/src/config.ts +++ b/packages/primitives/src/config.ts @@ -70,11 +70,7 @@ export function isConfiguration(cand: any): cand is Configuration { export function isLeaf(cand: Topology): cand is Leaf { return ( - isSignerLeaf(cand) || - isSapientSignerLeaf(cand) || - isSubdigestLeaf(cand) || - isNodeLeaf(cand) || - isNestedLeaf(cand) + isSignerLeaf(cand) || isSapientSignerLeaf(cand) || isSubdigestLeaf(cand) || isNodeLeaf(cand) || isNestedLeaf(cand) ) } @@ -241,7 +237,6 @@ function encodeTopology(top: Topology): any { throw new Error('Invalid topology') } - function decodeTopology(obj: any): Topology { if (Array.isArray(obj)) { if (obj.length !== 2) { diff --git a/packages/primitives/src/signature.ts b/packages/primitives/src/signature.ts index d0dcb0358..e8deda3ed 100644 --- a/packages/primitives/src/signature.ts +++ b/packages/primitives/src/signature.ts @@ -29,16 +29,18 @@ export const FLAG_SIGNATURE_EIP712 = 8 export const FLAG_SIGNATURE_SAPIENT = 9 export const FLAG_SIGNATURE_SAPIENT_COMPACT = 10 -export type SignatureOfSignerLeaf = { - r: Bytes.Bytes - s: Bytes.Bytes - v: number - type: 'eth_sign' | 'hash' -} | { - address: `0x${string}` - data: Bytes.Bytes - type: 'erc1271' -} +export type SignatureOfSignerLeaf = + | { + r: Bytes.Bytes + s: Bytes.Bytes + v: number + type: 'eth_sign' | 'hash' + } + | { + address: `0x${string}` + data: Bytes.Bytes + type: 'erc1271' + } export type SignatureOfSapientSignerLeaf = { address: `0x${string}` @@ -447,14 +449,11 @@ export function parseBranch(signature: Bytes.Bytes): { export function fillLeaves( topology: Topology, signatureFor: ( - leaf: SignerLeaf | SapientSignerLeaf + leaf: SignerLeaf | SapientSignerLeaf, ) => SignatureOfSignerLeaf | SignatureOfSapientSignerLeaf | undefined, ): Topology { if (isNode(topology)) { - return [ - fillLeaves(topology[0]!, signatureFor), - fillLeaves(topology[1]!, signatureFor), - ] as Topology + return [fillLeaves(topology[0]!, signatureFor), fillLeaves(topology[1]!, signatureFor)] as Topology } if (isSignerLeaf(topology)) { From c16110432389ab4b43b129fa18f7cd59b7fc2b1f Mon Sep 17 00:00:00 2001 From: William Hua Date: Tue, 28 Jan 2025 09:46:56 -0500 Subject: [PATCH 054/439] primitives: payload hashing --- packages/core/src/state/sessions.ts | 16 +++- packages/primitives/src/payload.ts | 114 ++++++++++++++++++++++++---- 2 files changed, 110 insertions(+), 20 deletions(-) diff --git a/packages/core/src/state/sessions.ts b/packages/core/src/state/sessions.ts index 501c25da1..4dbd34bbf 100644 --- a/packages/core/src/state/sessions.ts +++ b/packages/core/src/state/sessions.ts @@ -1,5 +1,5 @@ -import { Configuration, Payload } from '@0xsequence/sequence-primitives' -import { Address, Hex } from 'ox' +import { Configuration, hash, hashConfiguration, Payload } from '@0xsequence/sequence-primitives' +import { Address, Bytes, Hex } from 'ox' import { Signature, StateReader, StateWriter } from '.' import * as service from './sessions.gen' @@ -94,7 +94,7 @@ export class Sessions implements StateReader, StateWriter { await this.sessions.saveSignerSignatures2({ wallet, chainID: `${chainId}`, - digest, + digest: Bytes.toHex(hash(wallet, chainId, payload)), signatures: [ { signer, @@ -106,6 +106,14 @@ export class Sessions implements StateReader, StateWriter { } async setConfiguration(wallet: Address.Address, configuration: Configuration, signature: Hex.Hex): Promise { - await this.sessions.saveSignature({ wallet, chainID: '0', digest, signature, toConfig: configuration }) + await this.sessions.saveSignature({ + wallet, + chainID: '0', + digest: Bytes.toHex( + hash(wallet, 0n, { type: 'config-update', imageHash: Bytes.toHex(hashConfiguration(configuration)) }), + ), + signature, + toConfig: configuration, + }) } } diff --git a/packages/primitives/src/payload.ts b/packages/primitives/src/payload.ts index 57396e878..89c86388a 100644 --- a/packages/primitives/src/payload.ts +++ b/packages/primitives/src/payload.ts @@ -1,4 +1,4 @@ -import { Address, Bytes, Hex } from 'ox' +import { Address, Bytes, Hash, Hex, TypedData } from 'ox' import { minBytesFor } from './utils' export type Call = { @@ -181,21 +181,7 @@ export function encode(payload: CallPayload, self?: Address.Address): Bytes.Byte flags |= 0x20 } - let behaviorBits = 0 - switch (call.behaviorOnError) { - case 'ignore': - behaviorBits = 0 - break - case 'revert': - behaviorBits = 1 - break - case 'abort': - behaviorBits = 2 - break - default: - throw new Error(`Unknown behaviorOnError: ${call.behaviorOnError}`) - } - flags |= behaviorBits << 6 + flags |= encodeBehaviorOnError(call.behaviorOnError) << 6 out = Bytes.concat(out, Bytes.fromNumber(flags, { size: 1 })) @@ -234,3 +220,99 @@ export function encode(payload: CallPayload, self?: Address.Address): Bytes.Byte return out } + +export function hash(wallet: Address.Address, chainId: bigint, payload: ParentedPayload): Bytes.Bytes { + const domain = { name: 'Sequence Wallet', version: '3', chainId, verifyingContract: wallet } + + let data: Hex.Hex + switch (payload.type) { + case 'call': + data = TypedData.encode({ + domain, + types: { + Calls: [ + { name: 'calls', type: 'Call[]' }, + { name: 'space', type: 'uint256' }, + { name: 'nonce', type: 'uint256' }, + { name: 'wallets', type: 'address[]' }, + ], + Call: [ + { name: 'to', type: 'address' }, + { name: 'value', type: 'uint256' }, + { name: 'data', type: 'bytes' }, + { name: 'gasLimit', type: 'uint256' }, + { name: 'delegateCall', type: 'bool' }, + { name: 'onlyFallback', type: 'bool' }, + { name: 'behaviorOnError', type: 'uint256' }, + ], + }, + primaryType: 'Calls', + message: { + calls: payload.calls.map((call) => ({ + ...call, + data: Bytes.toHex(call.data), + behaviorOnError: BigInt(encodeBehaviorOnError(call.behaviorOnError)), + })), + space: payload.space, + nonce: payload.nonce, + wallets: payload.parentWallets ?? [], + }, + }) + break + + case 'message': + data = TypedData.encode({ + domain, + types: { + Message: [ + { name: 'message', type: 'bytes' }, + { name: 'wallets', type: 'address[]' }, + ], + }, + primaryType: 'Message', + message: { message: Bytes.toHex(payload.message), wallets: payload.parentWallets ?? [] }, + }) + break + + case 'config-update': + data = TypedData.encode({ + domain, + types: { + ConfigUpdate: [ + { name: 'imageHash', type: 'bytes32' }, + { name: 'wallets', type: 'address[]' }, + ], + }, + primaryType: 'ConfigUpdate', + message: { imageHash: payload.imageHash, wallets: payload.parentWallets ?? [] }, + }) + break + + case 'digest': + data = TypedData.encode({ + domain, + types: { + Digest: [ + { name: 'digest', type: 'bytes32' }, + { name: 'wallets', type: 'address[]' }, + ], + }, + primaryType: 'Digest', + message: { digest: payload.digest, wallets: payload.parentWallets ?? [] }, + }) + break + } + + return Hash.keccak256(data, { as: 'Bytes' }) +} + +function encodeBehaviorOnError(behaviorOnError: Call['behaviorOnError']): number { + switch (behaviorOnError) { + case 'ignore': + return 0 + case 'revert': + return 1 + case 'abort': + return 2 + } +} From 1661f68b80f1da0baec65deac2c459b1a0e094f2 Mon Sep 17 00:00:00 2001 From: William Hua Date: Tue, 28 Jan 2025 11:39:31 -0500 Subject: [PATCH 055/439] core: forward signer signature validation info --- packages/core/src/signer.ts | 6 +++++- packages/core/src/wallet.ts | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/packages/core/src/signer.ts b/packages/core/src/signer.ts index bc2e3d78f..0f315aef8 100644 --- a/packages/core/src/signer.ts +++ b/packages/core/src/signer.ts @@ -11,6 +11,10 @@ export interface Signer { | { signature: Promise; onSignerSignature?: SignerSignatureCallback; onCancel?: CancelCallback } } -export type SignerSignatureCallback = (configuration: Configuration, signatures: Map) => void +export type SignerSignatureCallback = ( + configuration: Configuration, + signatures: Map, + validated: boolean, +) => void export type CancelCallback = (success: boolean) => void diff --git a/packages/core/src/wallet.ts b/packages/core/src/wallet.ts index f6715bcd2..09a430e06 100644 --- a/packages/core/src/wallet.ts +++ b/packages/core/src/wallet.ts @@ -128,7 +128,7 @@ export class Wallet { if (weight < configuration.threshold) { Array.from(signers.values()).forEach(({ onSignerSignature }) => - onSignerSignature?.(configuration, signerSignatures), + onSignerSignature?.(configuration, signerSignatures, !options?.trustSigners), ) } else { const onCancels = Array.from(signers.values()).flatMap(({ onCancel }) => (onCancel ? [onCancel] : [])) From 56b614117edc032dceaf72119f8f4ce600d191d1 Mon Sep 17 00:00:00 2001 From: William Hua Date: Tue, 28 Jan 2025 12:01:34 -0500 Subject: [PATCH 056/439] core: differentiate signer signature types --- packages/core/src/signer.ts | 13 ++++++++++--- packages/core/src/wallet.ts | 8 ++++---- 2 files changed, 14 insertions(+), 7 deletions(-) diff --git a/packages/core/src/signer.ts b/packages/core/src/signer.ts index 0f315aef8..db9fef87b 100644 --- a/packages/core/src/signer.ts +++ b/packages/core/src/signer.ts @@ -7,13 +7,20 @@ export interface Signer { sign( payload: Payload, ): - | Promise - | { signature: Promise; onSignerSignature?: SignerSignatureCallback; onCancel?: CancelCallback } + | Promise + | { signature: Promise; onSignerSignature?: SignerSignatureCallback; onCancel?: CancelCallback } } +export type Signature = + | { type: 'digest'; signature: Hex.Hex } + | { type: 'eth_sign'; signature: Hex.Hex } + | { type: 'erc-1271'; address: Address.Address; signature: Hex.Hex } + | { type: 'sapient'; address: Address.Address; signature: Hex.Hex } + | { type: 'sapient-compact'; address: Address.Address; signature: Hex.Hex } + export type SignerSignatureCallback = ( configuration: Configuration, - signatures: Map, + signatures: Map, validated: boolean, ) => void diff --git a/packages/core/src/wallet.ts b/packages/core/src/wallet.ts index 09a430e06..08b26de22 100644 --- a/packages/core/src/wallet.ts +++ b/packages/core/src/wallet.ts @@ -8,7 +8,7 @@ import { Payload, } from '@0xsequence/sequence-primitives' import { Address, Bytes, Hex, Provider } from 'ox' -import { CancelCallback, Signer, SignerSignatureCallback } from './signer' +import { CancelCallback, Signature, Signer, SignerSignatureCallback } from './signer' import { Sessions, StateReader, StateWriter } from './state' export class Wallet { @@ -80,7 +80,7 @@ export class Wallet { const signers = new Map< Address.Address, - { signer: Signer; signature?: Hex.Hex; onSignerSignature?: SignerSignatureCallback; onCancel?: CancelCallback } + { signer: Signer; signature?: Signature; onSignerSignature?: SignerSignatureCallback; onCancel?: CancelCallback } >( getSigners(configuration).signers.flatMap((address) => { const signer = this.signers.get(address) @@ -92,7 +92,7 @@ export class Wallet { throw new Error('insufficient potential weight') } - const signerSignatures = await new Promise>((resolve, reject) => { + const signerSignatures = await new Promise>((resolve, reject) => { const onError = (address: Hex.Hex) => (error: any) => { signers.delete(address) @@ -106,7 +106,7 @@ export class Wallet { } } - const onSignerSignature = (address: Hex.Hex) => (signature: Hex.Hex) => { + const onSignerSignature = (address: Hex.Hex) => (signature: Signature) => { if (!options?.trustSigners) { } From 9b802d46a4aa349c8153187718a9a83665cc52da Mon Sep 17 00:00:00 2001 From: William Hua Date: Tue, 28 Jan 2025 12:30:59 -0500 Subject: [PATCH 057/439] core: digest -> hash --- packages/core/src/signer.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/core/src/signer.ts b/packages/core/src/signer.ts index db9fef87b..e02b80afb 100644 --- a/packages/core/src/signer.ts +++ b/packages/core/src/signer.ts @@ -12,7 +12,7 @@ export interface Signer { } export type Signature = - | { type: 'digest'; signature: Hex.Hex } + | { type: 'hash'; signature: Hex.Hex } | { type: 'eth_sign'; signature: Hex.Hex } | { type: 'erc-1271'; address: Address.Address; signature: Hex.Hex } | { type: 'sapient'; address: Address.Address; signature: Hex.Hex } From c4bfcb5ce6af8ce63c426dcc562d97ca40d8910f Mon Sep 17 00:00:00 2001 From: Agusx1211 Date: Tue, 28 Jan 2025 18:55:43 +0000 Subject: [PATCH 058/439] Improve config new --- .../primitives-cli/src/subcommands/config.ts | 107 +++++++++++++++++- packages/primitives/src/config.ts | 19 ++++ 2 files changed, 121 insertions(+), 5 deletions(-) diff --git a/packages/primitives-cli/src/subcommands/config.ts b/packages/primitives-cli/src/subcommands/config.ts index 101b03b99..928e970c8 100644 --- a/packages/primitives-cli/src/subcommands/config.ts +++ b/packages/primitives-cli/src/subcommands/config.ts @@ -5,16 +5,100 @@ import { configFromJson, encodeSignature, hashConfiguration, + Leaf, + flatLeavesToTopology, } from '@0xsequence/sequence-primitives' -import { Bytes, Hex } from 'ox' +import { Address, Bytes, Hex } from 'ox' import { fromPosOrStdin } from '../utils' -async function createConfig(options: { threshold: string; checkpoint: string }): Promise { +export const PossibleElements = [{ + type: 'signer', + format: 'signer:
:', + description: 'A signer leaf', +}, { + type: 'subdigest', + format: 'subdigest:', + description: 'A subdigest leaf', +}, { + type: 'sapient', + format: 'sapient::
:', + description: 'A sapient leaf', +}, { + type: 'nested', + format: 'nested:::[]', + description: 'A nested leaf', +}, { + type: 'node', + format: 'node:', + description: 'A node leaf', +}] + +function parseElements(elements: string): Leaf[] { + const leaves: Leaf[] = [] + let remainingElements = elements + + // Split by space and get first element + while (remainingElements.length > 0) { + const firstElement = remainingElements.split(' ')[0] + const firstElementType = firstElement!.split(':')[0] + if (firstElementType === 'signer') { + const [_, address, weight] = firstElement!.split(':') + leaves.push({ + type: 'signer', + address: Address.from(address!), + weight: BigInt(weight!), + }) + remainingElements = remainingElements.slice(firstElement!.length + 1) + } else if (firstElementType === 'subdigest') { + const [_, digest] = firstElement!.split(':') + leaves.push({ + type: 'subdigest', + digest: Bytes.fromHex(digest as `0x${string}`), + }) + remainingElements = remainingElements.slice(firstElement!.length + 1) + } else if (firstElementType === 'sapient') { + const [_, imageHash, address, weight] = firstElement!.split(':') + leaves.push({ + type: 'sapient-signer', + imageHash: Bytes.fromHex(imageHash as `0x${string}`), + address: Address.from(address!), + weight: BigInt(weight!), + }) + remainingElements = remainingElements.slice(firstElement!.length + 1) + } else if (firstElementType === 'nested') { + // This is a bit spacial + // as we need to grab all nested elements within [ ] + const [_, threshold, weight] = firstElement!.split(':') + const startSubElements = remainingElements.indexOf('[') + const endSubElements = remainingElements.indexOf(']') + const subElements = remainingElements.slice(startSubElements, endSubElements) + leaves.push({ + type: 'nested', + threshold: BigInt(threshold!), + weight: BigInt(weight!), + // TODO: Maybe not always from flatten? + tree: flatLeavesToTopology(parseElements(subElements)), + }) + remainingElements = remainingElements.slice(endSubElements + 1) + } else if (firstElementType === 'node') { + const [_, hash] = firstElement!.split(':') + leaves.push(Bytes.fromHex(hash as `0x${string}`)) + remainingElements = remainingElements.slice(firstElement!.length + 1) + } else { + throw new Error(`Invalid element: ${firstElement}`) + } + } + + return leaves +} + +async function createConfig(options: { threshold: string; checkpoint: string, from: string, content: string[] }): Promise { + const leaves = parseElements(options.content.join(' ')) const config: Configuration = { threshold: BigInt(options.threshold), checkpoint: BigInt(options.checkpoint), // Starts with empty topology - topology: Bytes.padLeft(Bytes.fromNumber(1), 32), + topology: flatLeavesToTopology(leaves), checkpointer: undefined, } @@ -37,7 +121,7 @@ const configCommand: CommandModule = { builder: (yargs) => { return yargs .command( - 'new', + 'new [content...]', 'Create a new configuration', (yargs) => { return yargs @@ -51,6 +135,19 @@ const configCommand: CommandModule = { description: 'Checkpoint value for the configuration', demandOption: true, }) + .option('from', { + type: 'string', + description: 'The process to use to create the configuration', + demandOption: false, + default: 'flat', + choices: ['flat'], + }) + .positional('content', { + type: 'string', + array: true, + description: 'The elements to use to create the configuration:\n' + PossibleElements.map(e => `- ${e.format}`).join('\n'), + demandOption: true, + }) }, async (argv) => { await createConfig(argv) @@ -86,7 +183,7 @@ const configCommand: CommandModule = { ) .demandCommand(1, 'You must specify a subcommand for config') }, - handler: () => {}, + handler: () => { }, } export default configCommand diff --git a/packages/primitives/src/config.ts b/packages/primitives/src/config.ts index 31e9d4a28..ee134f523 100644 --- a/packages/primitives/src/config.ts +++ b/packages/primitives/src/config.ts @@ -183,6 +183,25 @@ export function hashConfiguration(topology: Topology | Configuration): Bytes.Byt throw new Error('Invalid topology') } +export function flatLeavesToTopology(leaves: Leaf[]): Topology { + if (leaves.length === 0) { + throw new Error('Cannot create topology from empty leaves') + } + + if (leaves.length === 1) { + return leaves[0]! + } + + if (leaves.length === 2) { + return [leaves[0]!, leaves[1]!] + } + + return [ + flatLeavesToTopology(leaves.slice(0, leaves.length / 2)), + flatLeavesToTopology(leaves.slice(leaves.length / 2)), + ] +} + export function configToJson(config: Configuration): string { return JSON.stringify({ threshold: config.threshold.toString(), From f0dbd7c448626e4f8626540903416dceef8e2ec1 Mon Sep 17 00:00:00 2001 From: Agusx1211 Date: Tue, 28 Jan 2025 19:21:24 +0000 Subject: [PATCH 059/439] Add encode signatures cli --- .../primitives-cli/src/subcommands/config.ts | 3 + .../src/subcommands/signature.ts | 132 ++++++++++++++++-- 2 files changed, 126 insertions(+), 9 deletions(-) diff --git a/packages/primitives-cli/src/subcommands/config.ts b/packages/primitives-cli/src/subcommands/config.ts index 928e970c8..a654af1fa 100644 --- a/packages/primitives-cli/src/subcommands/config.ts +++ b/packages/primitives-cli/src/subcommands/config.ts @@ -129,11 +129,13 @@ const configCommand: CommandModule = { type: 'string', description: 'Threshold value for the configuration', demandOption: true, + alias: 't', }) .option('checkpoint', { type: 'string', description: 'Checkpoint value for the configuration', demandOption: true, + alias: 'c', }) .option('from', { type: 'string', @@ -141,6 +143,7 @@ const configCommand: CommandModule = { demandOption: false, default: 'flat', choices: ['flat'], + alias: 'f', }) .positional('content', { type: 'string', diff --git a/packages/primitives-cli/src/subcommands/signature.ts b/packages/primitives-cli/src/subcommands/signature.ts index 8a568e370..459011d8d 100644 --- a/packages/primitives-cli/src/subcommands/signature.ts +++ b/packages/primitives-cli/src/subcommands/signature.ts @@ -1,9 +1,115 @@ import type { CommandModule } from 'yargs' import { fromPosOrStdin } from '../utils' +import { configFromJson, encodeSignature, fillLeaves, isSapientSignerLeaf, isSignerLeaf } from '@0xsequence/sequence-primitives' +import { PossibleElements } from './config' +import { Bytes, Hex } from 'ox' -async function doEncode(input: string): Promise { - // TODO: Implement signature encoding - throw new Error('Not implemented') +const SignatureElements = [{ + type: 'eth_sign', + format: '
:eth_sign:::', + description: 'An eth_sign signature', +}, { + type: 'hash', + format: '
:hash:::', + description: 'A hash signature', +}, { + type: 'erc1271', + format: '
:erc1271:', + description: 'An erc1271 signature', +}, { + type: 'sapient', + format: '
:sapient:', + description: 'A sapient signature', +}, { + type: 'sapient_compact', + format: '
:sapient_compact:', + description: 'A sapient compact signature', +}] + +async function doEncode(input: string, signatures: string[] = []): Promise { + const config = configFromJson(input) + + const allSignatures = signatures.map((s) => { + const values = s.split(':') + return { + address: values[0], + type: values[1], + values: values.slice(2), + } + }) + + const fullTopology = fillLeaves(config.topology, (leaf) => { + if (isSignerLeaf(leaf)) { + // Type must be 1271, eth_sign, or hash + const candidate = allSignatures.find((s) => s.address === leaf.address) + + if (!candidate) { + return undefined + } + + if (candidate.type === 'erc1271') { + return { + address: candidate.address as `0x${string}`, + data: Bytes.fromHex(candidate.values[0] as `0x${string}`), + type: 'erc1271', + } + } + + if (candidate.type === 'eth_sign') { + return { + r: Bytes.padLeft(Bytes.fromHex(candidate.values[0] as `0x${string}`), 32), + s: Bytes.padLeft(Bytes.fromHex(candidate.values[1] as `0x${string}`), 32), + v: Number(candidate.values[2]), + type: 'eth_sign', + } + } + + if (candidate.type === 'hash') { + return { + r: Bytes.padLeft(Bytes.fromHex(candidate.values[0] as `0x${string}`), 32), + s: Bytes.padLeft(Bytes.fromHex(candidate.values[1] as `0x${string}`), 32), + v: Number(candidate.values[2]), + type: 'hash', + } + } + + if (candidate.type === 'sapient' || candidate.type === 'sapient_compact') { + throw new Error(`Incorrect type for leaf: ${leaf.type}`) + } + + throw new Error(`Unsupported signature type: ${candidate.type}`) + } + + if (isSapientSignerLeaf(leaf)) { + const candidate = allSignatures.find((s) => s.address === leaf.address) + if (!candidate) { + return undefined + } + + if (candidate.type === 'sapient' || candidate.type === 'sapient_compact') { + return { + address: candidate.address as `0x${string}`, + data: Bytes.fromHex(candidate.values[0] as `0x${string}`), + type: candidate.type, + } + } + + if (candidate.type === 'eth_sign' || candidate.type === 'hash' || candidate.type === 'erc1271') { + throw new Error(`Incorrect type for leaf: ${leaf.type}`) + } + + throw new Error(`Unsupported signature type: ${candidate.type}`) + } + + return undefined + }) + + const encoded = encodeSignature({ + ...config, + topology: fullTopology, + }) + + console.log(Hex.fromBytes(encoded)) } const signatureCommand: CommandModule = { @@ -15,19 +121,27 @@ const signatureCommand: CommandModule = { 'encode [input]', 'Encode signature from hex input', (yargs) => { - return yargs.positional('input', { - type: 'string', - description: 'Hex input to encode (if not using pipe)', - }) + return yargs + .option('signature', { + type: 'string', + array: true, + description: 'A signature to include in the encoded signature, one of:\n' + PossibleElements.map(e => `- ${e.format}`).join('\n'), + demandOption: false, + alias: 's', + }) + .positional('input', { + type: 'string', + description: 'Hex input to encode (if not using pipe)', + }) }, async (argv) => { const input = await fromPosOrStdin(argv, 'input') - await doEncode(input) + await doEncode(input, argv.signature) }, ) .demandCommand(1, 'You must specify a subcommand for signature') }, - handler: () => {}, + handler: () => { }, } export default signatureCommand From 2d31fa2cbefe759e3da866c0284eadc7e50cdcad Mon Sep 17 00:00:00 2001 From: Agusx1211 Date: Tue, 28 Jan 2025 23:17:51 +0000 Subject: [PATCH 060/439] Leaf encode fix --- packages/primitives/src/signature.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/primitives/src/signature.ts b/packages/primitives/src/signature.ts index e8deda3ed..40c050b42 100644 --- a/packages/primitives/src/signature.ts +++ b/packages/primitives/src/signature.ts @@ -625,7 +625,7 @@ export function encodeTopology( if (topology.signature.type === 'hash' || topology.signature.type === 'eth_sign') { let flag = (topology.signature.type === 'hash' ? FLAG_SIGNATURE_HASH : FLAG_SIGNATURE_ETH_SIGN) << 4 let weightBytes = Bytes.fromArray([]) - if (topology.weight <= 15n) { + if (topology.weight <= 15n && topology.weight > 0n) { flag |= Number(topology.weight) } else if (topology.weight <= 255n) { weightBytes = Bytes.fromNumber(Number(topology.weight)) @@ -635,7 +635,7 @@ export function encodeTopology( const r = Bytes.padLeft(topology.signature.r, 32) const s = Bytes.padLeft(topology.signature.s, 32) - if (topology.signature.v % 2 !== 0) { + if (topology.signature.v % 2 === 0) { s[0]! |= 0x80 } From b14b6beaab56502bb127a837b199f29a6a5f50f1 Mon Sep 17 00:00:00 2001 From: Agusx1211 Date: Tue, 28 Jan 2025 23:18:54 +0000 Subject: [PATCH 061/439] Fix empty signer leaf --- packages/primitives/src/signature.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/primitives/src/signature.ts b/packages/primitives/src/signature.ts index 40c050b42..9698e252c 100644 --- a/packages/primitives/src/signature.ts +++ b/packages/primitives/src/signature.ts @@ -704,7 +704,7 @@ export function encodeTopology( if (isSignerLeaf(topology)) { let flag = FLAG_ADDRESS << 4 let weightBytes = Bytes.fromArray([]) - if (topology.weight <= 15n) { + if (topology.weight <= 15n && topology.weight > 0n) { flag |= Number(topology.weight) } else if (topology.weight <= 255n) { weightBytes = Bytes.fromNumber(Number(topology.weight)) From b0fe989b1e4750707b59a1c54fb41a9bcb540751 Mon Sep 17 00:00:00 2001 From: Michael Standen Date: Wed, 29 Jan 2025 14:37:22 +1300 Subject: [PATCH 062/439] Add lefthook --- lefthook.yml | 5 +++ package.json | 4 +- pnpm-lock.yaml | 100 +++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 108 insertions(+), 1 deletion(-) create mode 100644 lefthook.yml diff --git a/lefthook.yml b/lefthook.yml new file mode 100644 index 000000000..0e0a9a427 --- /dev/null +++ b/lefthook.yml @@ -0,0 +1,5 @@ +pre-commit: + commands: + prettier: + glob: '**/*.{js,jsx,ts,tsx,json,md,yml,yaml}' + run: pnpm prettier --write {staged_files} && git add {staged_files} diff --git a/package.json b/package.json index 111d1d240..33b274cdb 100644 --- a/package.json +++ b/package.json @@ -6,10 +6,12 @@ "build": "turbo build", "dev": "turbo dev", "lint": "turbo lint", - "format": "prettier --write \"**/*.{ts,tsx,md}\"" + "format": "prettier --write \"**/*.{ts,tsx,md}\"", + "postinstall": "lefthook install" }, "devDependencies": { "@changesets/cli": "^2.27.11", + "lefthook": "^1.6.1", "prettier": "^3.2.5", "turbo": "^2.3.3", "typescript": "5.5.4" diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 6042055d2..638eecba9 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -11,6 +11,9 @@ importers: '@changesets/cli': specifier: ^2.27.11 version: 2.27.11 + lefthook: + specifier: ^1.6.1 + version: 1.10.10 prettier: specifier: ^3.2.5 version: 3.3.3 @@ -1605,6 +1608,60 @@ packages: keyv@4.5.4: resolution: {integrity: sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw==} + lefthook-darwin-arm64@1.10.10: + resolution: {integrity: sha512-hEypKdwWpmNSl4Q8eJxgmlGb2ybJj1+W5/v13Mxc+ApEmjbpNiJzPcdjC9zyaMEpPK4EybiHy8g5ZC0dLOwkpA==} + cpu: [arm64] + os: [darwin] + + lefthook-darwin-x64@1.10.10: + resolution: {integrity: sha512-9xNbeE78i4Amz+uOheg9dcy7X/6X12h98SUMrYWk7fONvjW/Bp9h6nPGIGxI5krHp9iRB8rhmo33ljVDVtTlyg==} + cpu: [x64] + os: [darwin] + + lefthook-freebsd-arm64@1.10.10: + resolution: {integrity: sha512-GT9wYxPxkvO1rtIAmctayT9xQIVII5xUIG3Pv6gZo+r6yEyle0EFTLFDbmVje7p7rQNCsvJ8XzCNdnyDrva90g==} + cpu: [arm64] + os: [freebsd] + + lefthook-freebsd-x64@1.10.10: + resolution: {integrity: sha512-2BB/HRhEb9wGpk5K38iNkHtMPnn+TjXDtFG6C/AmUPLXLNhGnNiYp+v2uhUE8quWzxJx7QzfnU7Ga+/gzJcIcw==} + cpu: [x64] + os: [freebsd] + + lefthook-linux-arm64@1.10.10: + resolution: {integrity: sha512-GJ7GALKJ1NcMnNZG9uY+zJR3yS8q7/MgcHFWSJhBl+w4KTiiD/RAdSl5ALwEK2+UX36Eo+7iQA7AXzaRdAii4w==} + cpu: [arm64] + os: [linux] + + lefthook-linux-x64@1.10.10: + resolution: {integrity: sha512-dWUvPM9YTIJ3+X9dB+8iOnzoVHbnNmpscmUqEOKSeizgBrvuuIYKZJGDyjEtw65Qnmn1SJ7ouSaKK93p5c7SkQ==} + cpu: [x64] + os: [linux] + + lefthook-openbsd-arm64@1.10.10: + resolution: {integrity: sha512-KnwDyxOvbvGSBTbEF/OxkynZRPLowd3mIXUKHtkg3ABcQ4UREalX+Sh0nWU2dNjQbINx7Eh6B42TxNC7h+qXEg==} + cpu: [arm64] + os: [openbsd] + + lefthook-openbsd-x64@1.10.10: + resolution: {integrity: sha512-49nnG886CI3WkrzVJ71D1M2KWpUYN1BP9LMKNzN11cmZ0j6dUK4hj3nbW+NcrKXxgYzzyLU3FFwrc51OVy2eKA==} + cpu: [x64] + os: [openbsd] + + lefthook-windows-arm64@1.10.10: + resolution: {integrity: sha512-9ni0Tsnk+O5oL7EBfKj9C5ZctD1mrTyHCtiu1zQJBbREReJtPjIM9DwWzecfbuVfrIlpbviVQvx5mjZ44bqlWw==} + cpu: [arm64] + os: [win32] + + lefthook-windows-x64@1.10.10: + resolution: {integrity: sha512-gkKWYrlay4iecFfY1Ris5VcRYa0BaNJKMk0qE/wZmIpMgu4GvNg+f9BEwTMflkQIanABduT9lrECaL1lX5ClKw==} + cpu: [x64] + os: [win32] + + lefthook@1.10.10: + resolution: {integrity: sha512-YW0fTONgOXsephvXq2gIFbegCW19MHCyKYX7JDWmzVF1ZiVMnDBYUL/SP3i0RtFvlCmqENl4SgKwYYQGUMnvig==} + hasBin: true + levn@0.4.1: resolution: {integrity: sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==} engines: {node: '>= 0.8.0'} @@ -4080,6 +4137,49 @@ snapshots: dependencies: json-buffer: 3.0.1 + lefthook-darwin-arm64@1.10.10: + optional: true + + lefthook-darwin-x64@1.10.10: + optional: true + + lefthook-freebsd-arm64@1.10.10: + optional: true + + lefthook-freebsd-x64@1.10.10: + optional: true + + lefthook-linux-arm64@1.10.10: + optional: true + + lefthook-linux-x64@1.10.10: + optional: true + + lefthook-openbsd-arm64@1.10.10: + optional: true + + lefthook-openbsd-x64@1.10.10: + optional: true + + lefthook-windows-arm64@1.10.10: + optional: true + + lefthook-windows-x64@1.10.10: + optional: true + + lefthook@1.10.10: + optionalDependencies: + lefthook-darwin-arm64: 1.10.10 + lefthook-darwin-x64: 1.10.10 + lefthook-freebsd-arm64: 1.10.10 + lefthook-freebsd-x64: 1.10.10 + lefthook-linux-arm64: 1.10.10 + lefthook-linux-x64: 1.10.10 + lefthook-openbsd-arm64: 1.10.10 + lefthook-openbsd-x64: 1.10.10 + lefthook-windows-arm64: 1.10.10 + lefthook-windows-x64: 1.10.10 + levn@0.4.1: dependencies: prelude-ls: 1.2.1 From fa1eb0a08c0c155c7240be6ac7b6f8b4b95c2fb6 Mon Sep 17 00:00:00 2001 From: Michael Standen Date: Wed, 29 Jan 2025 14:37:42 +1300 Subject: [PATCH 063/439] Format --- .../primitives-cli/src/subcommands/config.ts | 61 +++++++++++------- .../src/subcommands/signature.ts | 62 ++++++++++++------- 2 files changed, 75 insertions(+), 48 deletions(-) diff --git a/packages/primitives-cli/src/subcommands/config.ts b/packages/primitives-cli/src/subcommands/config.ts index a654af1fa..fdeea87ee 100644 --- a/packages/primitives-cli/src/subcommands/config.ts +++ b/packages/primitives-cli/src/subcommands/config.ts @@ -11,27 +11,33 @@ import { import { Address, Bytes, Hex } from 'ox' import { fromPosOrStdin } from '../utils' -export const PossibleElements = [{ - type: 'signer', - format: 'signer:
:', - description: 'A signer leaf', -}, { - type: 'subdigest', - format: 'subdigest:', - description: 'A subdigest leaf', -}, { - type: 'sapient', - format: 'sapient::
:', - description: 'A sapient leaf', -}, { - type: 'nested', - format: 'nested:::[]', - description: 'A nested leaf', -}, { - type: 'node', - format: 'node:', - description: 'A node leaf', -}] +export const PossibleElements = [ + { + type: 'signer', + format: 'signer:
:', + description: 'A signer leaf', + }, + { + type: 'subdigest', + format: 'subdigest:', + description: 'A subdigest leaf', + }, + { + type: 'sapient', + format: 'sapient::
:', + description: 'A sapient leaf', + }, + { + type: 'nested', + format: 'nested:::[]', + description: 'A nested leaf', + }, + { + type: 'node', + format: 'node:', + description: 'A node leaf', + }, +] function parseElements(elements: string): Leaf[] { const leaves: Leaf[] = [] @@ -92,7 +98,12 @@ function parseElements(elements: string): Leaf[] { return leaves } -async function createConfig(options: { threshold: string; checkpoint: string, from: string, content: string[] }): Promise { +async function createConfig(options: { + threshold: string + checkpoint: string + from: string + content: string[] +}): Promise { const leaves = parseElements(options.content.join(' ')) const config: Configuration = { threshold: BigInt(options.threshold), @@ -148,7 +159,9 @@ const configCommand: CommandModule = { .positional('content', { type: 'string', array: true, - description: 'The elements to use to create the configuration:\n' + PossibleElements.map(e => `- ${e.format}`).join('\n'), + description: + 'The elements to use to create the configuration:\n' + + PossibleElements.map((e) => `- ${e.format}`).join('\n'), demandOption: true, }) }, @@ -186,7 +199,7 @@ const configCommand: CommandModule = { ) .demandCommand(1, 'You must specify a subcommand for config') }, - handler: () => { }, + handler: () => {}, } export default configCommand diff --git a/packages/primitives-cli/src/subcommands/signature.ts b/packages/primitives-cli/src/subcommands/signature.ts index 459011d8d..c9d25ad84 100644 --- a/packages/primitives-cli/src/subcommands/signature.ts +++ b/packages/primitives-cli/src/subcommands/signature.ts @@ -1,30 +1,42 @@ import type { CommandModule } from 'yargs' import { fromPosOrStdin } from '../utils' -import { configFromJson, encodeSignature, fillLeaves, isSapientSignerLeaf, isSignerLeaf } from '@0xsequence/sequence-primitives' +import { + configFromJson, + encodeSignature, + fillLeaves, + isSapientSignerLeaf, + isSignerLeaf, +} from '@0xsequence/sequence-primitives' import { PossibleElements } from './config' import { Bytes, Hex } from 'ox' -const SignatureElements = [{ - type: 'eth_sign', - format: '
:eth_sign:::', - description: 'An eth_sign signature', -}, { - type: 'hash', - format: '
:hash:::', - description: 'A hash signature', -}, { - type: 'erc1271', - format: '
:erc1271:', - description: 'An erc1271 signature', -}, { - type: 'sapient', - format: '
:sapient:', - description: 'A sapient signature', -}, { - type: 'sapient_compact', - format: '
:sapient_compact:', - description: 'A sapient compact signature', -}] +const SignatureElements = [ + { + type: 'eth_sign', + format: '
:eth_sign:::', + description: 'An eth_sign signature', + }, + { + type: 'hash', + format: '
:hash:::', + description: 'A hash signature', + }, + { + type: 'erc1271', + format: '
:erc1271:', + description: 'An erc1271 signature', + }, + { + type: 'sapient', + format: '
:sapient:', + description: 'A sapient signature', + }, + { + type: 'sapient_compact', + format: '
:sapient_compact:', + description: 'A sapient compact signature', + }, +] async function doEncode(input: string, signatures: string[] = []): Promise { const config = configFromJson(input) @@ -125,7 +137,9 @@ const signatureCommand: CommandModule = { .option('signature', { type: 'string', array: true, - description: 'A signature to include in the encoded signature, one of:\n' + PossibleElements.map(e => `- ${e.format}`).join('\n'), + description: + 'A signature to include in the encoded signature, one of:\n' + + PossibleElements.map((e) => `- ${e.format}`).join('\n'), demandOption: false, alias: 's', }) @@ -141,7 +155,7 @@ const signatureCommand: CommandModule = { ) .demandCommand(1, 'You must specify a subcommand for signature') }, - handler: () => { }, + handler: () => {}, } export default signatureCommand From c610fcc6c9054d521d7893024798e7cd79224478 Mon Sep 17 00:00:00 2001 From: Agusx1211 Date: Wed, 29 Jan 2025 11:34:05 +0000 Subject: [PATCH 064/439] Add no-chain-id to cli --- .../primitives-cli/src/subcommands/signature.ts | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/packages/primitives-cli/src/subcommands/signature.ts b/packages/primitives-cli/src/subcommands/signature.ts index c9d25ad84..38f8b4360 100644 --- a/packages/primitives-cli/src/subcommands/signature.ts +++ b/packages/primitives-cli/src/subcommands/signature.ts @@ -1,4 +1,4 @@ -import type { CommandModule } from 'yargs' +import { boolean, type CommandModule } from 'yargs' import { fromPosOrStdin } from '../utils' import { configFromJson, @@ -38,7 +38,7 @@ const SignatureElements = [ }, ] -async function doEncode(input: string, signatures: string[] = []): Promise { +async function doEncode(input: string, signatures: string[] = [], noChainId: boolean): Promise { const config = configFromJson(input) const allSignatures = signatures.map((s) => { @@ -119,6 +119,8 @@ async function doEncode(input: string, signatures: string[] = []): Promise const encoded = encodeSignature({ ...config, topology: fullTopology, + }, { + noChainId }) console.log(Hex.fromBytes(encoded)) @@ -143,6 +145,12 @@ const signatureCommand: CommandModule = { demandOption: false, alias: 's', }) + .option('chain-id', { + type: 'boolean', + description: 'Use chainId of recovered chain on signature', + demandOption: false, + default: true + }) .positional('input', { type: 'string', description: 'Hex input to encode (if not using pipe)', @@ -150,12 +158,12 @@ const signatureCommand: CommandModule = { }, async (argv) => { const input = await fromPosOrStdin(argv, 'input') - await doEncode(input, argv.signature) + await doEncode(input, argv.signature, !argv.chainId) }, ) .demandCommand(1, 'You must specify a subcommand for signature') }, - handler: () => {}, + handler: () => { }, } export default signatureCommand From 0b56c47bb4d6cd234a2b2ba7d5c64ba60dc92a50 Mon Sep 17 00:00:00 2001 From: William Hua Date: Wed, 29 Jan 2025 11:11:34 -0500 Subject: [PATCH 065/439] primitives: erc-6492 --- packages/primitives/src/erc-6492.ts | 58 +++++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) create mode 100644 packages/primitives/src/erc-6492.ts diff --git a/packages/primitives/src/erc-6492.ts b/packages/primitives/src/erc-6492.ts new file mode 100644 index 000000000..0c5d5e923 --- /dev/null +++ b/packages/primitives/src/erc-6492.ts @@ -0,0 +1,58 @@ +import { AbiParameters, Address, Bytes, Hex } from 'ox' +import { WrappedSignature } from 'ox/erc6492' + +export function erc6492( + signature: T, + to: Address.Address, + data: Bytes.Bytes | Hex.Hex, +): T { + const encoded = Hex.concat( + AbiParameters.encode( + [{ type: 'address' }, { type: 'bytes' }, { type: 'bytes' }], + [to, Hex.from(data), Hex.from(signature)], + ), + WrappedSignature.magicBytes, + ) + + switch (typeof signature) { + case 'object': + return Hex.toBytes(encoded) as T + case 'string': + return encoded as T + } +} + +export function erc6492Decode( + signature: T, +): { signature: T; to?: Address.Address; data?: T } { + switch (typeof signature) { + case 'object': + if ( + Bytes.toHex(signature.subarray(-WrappedSignature.magicBytes.slice(2).length / 2)) === + WrappedSignature.magicBytes + ) { + const [to, data, decoded] = AbiParameters.decode( + [{ type: 'address' }, { type: 'bytes' }, { type: 'bytes' }], + signature.subarray(0, -WrappedSignature.magicBytes.slice(2).length / 2), + ) + return { signature: Hex.toBytes(decoded) as T, to, data: Hex.toBytes(data) as T } + } else { + return { signature } + } + + case 'string': + if (signature.endsWith(WrappedSignature.magicBytes.slice(2))) { + try { + const [to, data, decoded] = AbiParameters.decode( + [{ type: 'address' }, { type: 'bytes' }, { type: 'bytes' }], + signature.slice(0, -WrappedSignature.magicBytes.slice(2).length) as Hex.Hex, + ) + return { signature: decoded as T, to, data: data as T } + } catch { + return { signature } + } + } else { + return { signature } + } + } +} From c5b7f60e6fa40a889fe5770a4b0601e0b7c6b7e0 Mon Sep 17 00:00:00 2001 From: Agusx1211 Date: Wed, 29 Jan 2025 16:42:06 +0000 Subject: [PATCH 066/439] Encode 1271 fixes --- .../src/subcommands/signature.ts | 19 ++++++++++-------- packages/primitives/src/signature.ts | 20 +++++++++---------- 2 files changed, 21 insertions(+), 18 deletions(-) diff --git a/packages/primitives-cli/src/subcommands/signature.ts b/packages/primitives-cli/src/subcommands/signature.ts index 38f8b4360..7fcae7b99 100644 --- a/packages/primitives-cli/src/subcommands/signature.ts +++ b/packages/primitives-cli/src/subcommands/signature.ts @@ -116,12 +116,15 @@ async function doEncode(input: string, signatures: string[] = [], noChainId: boo return undefined }) - const encoded = encodeSignature({ - ...config, - topology: fullTopology, - }, { - noChainId - }) + const encoded = encodeSignature( + { + ...config, + topology: fullTopology, + }, + { + noChainId, + }, + ) console.log(Hex.fromBytes(encoded)) } @@ -149,7 +152,7 @@ const signatureCommand: CommandModule = { type: 'boolean', description: 'Use chainId of recovered chain on signature', demandOption: false, - default: true + default: true, }) .positional('input', { type: 'string', @@ -163,7 +166,7 @@ const signatureCommand: CommandModule = { ) .demandCommand(1, 'You must specify a subcommand for signature') }, - handler: () => { }, + handler: () => {}, } export default signatureCommand diff --git a/packages/primitives/src/signature.ts b/packages/primitives/src/signature.ts index 9698e252c..50174cab9 100644 --- a/packages/primitives/src/signature.ts +++ b/packages/primitives/src/signature.ts @@ -643,15 +643,15 @@ export function encodeTopology( } else if (topology.signature.type === 'erc1271') { let flag = FLAG_SIGNATURE_ERC1271 << 4 - let signatureSize = minBytesFor(BigInt(topology.signature.data.length)) - if (signatureSize > 3) { + let bytesForSignatureSize = minBytesFor(BigInt(topology.signature.data.length)) + if (bytesForSignatureSize > 3) { throw new Error('Signature too large') } - flag |= signatureSize << 2 + flag |= bytesForSignatureSize << 2 let weightBytes = Bytes.fromArray([]) - if (topology.weight <= 3n) { + if (topology.weight <= 3n && topology.weight > 0n) { flag |= Number(topology.weight) } else if (topology.weight <= 255n) { weightBytes = Bytes.fromNumber(Number(topology.weight)) @@ -663,21 +663,21 @@ export function encodeTopology( Bytes.fromNumber(flag), weightBytes, Bytes.padLeft(Bytes.fromHex(topology.signature.address), 20), - Bytes.padLeft(Bytes.fromNumber(signatureSize), 3), + Bytes.padLeft(Bytes.fromNumber(topology.signature.data.length), bytesForSignatureSize), topology.signature.data, ) } else if (topology.signature.type === 'sapient' || topology.signature.type === 'sapient_compact') { let flag = (topology.signature.type === 'sapient' ? FLAG_SIGNATURE_SAPIENT : FLAG_SIGNATURE_SAPIENT_COMPACT) << 4 - let signatureSize = minBytesFor(BigInt(topology.signature.data.length)) - if (signatureSize > 3) { + let bytesForSignatureSize = minBytesFor(BigInt(topology.signature.data.length)) + if (bytesForSignatureSize > 3) { throw new Error('Signature too large') } - flag |= signatureSize << 2 + flag |= bytesForSignatureSize << 2 let weightBytes = Bytes.fromArray([]) - if (topology.weight <= 3n) { + if (topology.weight <= 3n && topology.weight > 0n) { flag |= Number(topology.weight) } else if (topology.weight <= 255n) { weightBytes = Bytes.fromNumber(Number(topology.weight)) @@ -689,7 +689,7 @@ export function encodeTopology( Bytes.fromNumber(flag), weightBytes, Bytes.padLeft(Bytes.fromHex(topology.signature.address), 20), - Bytes.padLeft(Bytes.fromNumber(signatureSize), 3), + Bytes.padLeft(Bytes.fromNumber(topology.signature.data.length), bytesForSignatureSize), topology.signature.data, ) } else { From a3d7247d795a3ce63a4ad56b18c734378db0d23e Mon Sep 17 00:00:00 2001 From: Agusx1211 Date: Wed, 29 Jan 2025 18:34:14 +0000 Subject: [PATCH 067/439] Fix nested parser --- .../primitives-cli/src/subcommands/config.ts | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/packages/primitives-cli/src/subcommands/config.ts b/packages/primitives-cli/src/subcommands/config.ts index fdeea87ee..0ef49670f 100644 --- a/packages/primitives-cli/src/subcommands/config.ts +++ b/packages/primitives-cli/src/subcommands/config.ts @@ -29,7 +29,7 @@ export const PossibleElements = [ }, { type: 'nested', - format: 'nested:::[]', + format: 'nested:::()', description: 'A nested leaf', }, { @@ -73,19 +73,21 @@ function parseElements(elements: string): Leaf[] { remainingElements = remainingElements.slice(firstElement!.length + 1) } else if (firstElementType === 'nested') { // This is a bit spacial - // as we need to grab all nested elements within [ ] + // as we need to grab all nested elements within ( ) const [_, threshold, weight] = firstElement!.split(':') - const startSubElements = remainingElements.indexOf('[') - const endSubElements = remainingElements.indexOf(']') - const subElements = remainingElements.slice(startSubElements, endSubElements) + const startSubElements = remainingElements.indexOf('(') + const endSubElements = remainingElements.indexOf(')') + if (startSubElements === -1 || endSubElements === -1) { + throw new Error(`Missing ( ) for nested element: ${remainingElements}`) + } + const innerSubElements = remainingElements.slice(startSubElements + 1, endSubElements) leaves.push({ type: 'nested', threshold: BigInt(threshold!), weight: BigInt(weight!), - // TODO: Maybe not always from flatten? - tree: flatLeavesToTopology(parseElements(subElements)), + tree: flatLeavesToTopology(parseElements(innerSubElements)) }) - remainingElements = remainingElements.slice(endSubElements + 1) + remainingElements = remainingElements.slice(endSubElements + 1).trim() } else if (firstElementType === 'node') { const [_, hash] = firstElement!.split(':') leaves.push(Bytes.fromHex(hash as `0x${string}`)) From bb4f5dc8787752a760375661d9bb2df47a752b33 Mon Sep 17 00:00:00 2001 From: William Hua Date: Wed, 29 Jan 2025 14:00:56 -0500 Subject: [PATCH 068/439] primitives: chained signature decoding --- packages/primitives/src/signature.ts | 32 +++++++++++++++++++++++----- 1 file changed, 27 insertions(+), 5 deletions(-) diff --git a/packages/primitives/src/signature.ts b/packages/primitives/src/signature.ts index 50174cab9..08a086ba1 100644 --- a/packages/primitives/src/signature.ts +++ b/packages/primitives/src/signature.ts @@ -134,11 +134,6 @@ export function decodeSignature(signature: Bytes.Bytes): RawSignature { const flag = signature[0]! let index = 1 - // If bit 1 is set => chained signature (not implemented here) - if ((flag & 0x01) === 0x01) { - throw new Error('TODO') - } - const noChainId = (flag & 0x02) === 0x02 // bits [2..4] => checkpoint size @@ -176,6 +171,33 @@ export function decodeSignature(signature: Bytes.Bytes): RawSignature { index += checkpointerDataSize } + // If bit 1 is set => chained signature + if ((flag & 0x01) === 0x01) { + const subsignatures: RawSignature[] = [] + + while (index < signature.length) { + if (index + 3 > signature.length) { + throw new Error('Not enough bytes for chained signature subsignature size') + } + const subsignatureSize = Bytes.toNumber(signature.subarray(index, index + 3)) + index += 3 + + if (index + subsignatureSize > signature.length) { + throw new Error('Not enough bytes for chained signature subsignature') + } + const subsignature = decodeSignature(signature.subarray(index, index + subsignatureSize)) + index += subsignatureSize + + subsignatures.push(subsignature) + } + + if (subsignatures.length === 0) { + throw new Error('Chained signature has no subsignatures') + } + + return { ...subsignatures[0]!, suffix: subsignatures.slice(1) } + } + const { nodes, leftover } = parseBranch(signature.slice(index)) if (leftover.length !== 0) { throw new Error('Leftover bytes in signature') From a3f412edda26eaa6e757f64fece5f98068592abd Mon Sep 17 00:00:00 2001 From: Michael Standen Date: Thu, 30 Jan 2025 10:02:46 +1300 Subject: [PATCH 069/439] Add commands to README --- README.md | 25 +++++++++++++++++++++++-- 1 file changed, 23 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index cbf76ae53..f397f0364 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,28 @@ -# sequence-core +# Sequence Core SDK -## packages +## Packages - `@0xsequence/sequence-primitives`: stateless low-level utilities specifically for interacting directly with sequence wallet's smart contracts - `@0xsequence/sequence-core`: higher level utilities for creating and using sequence wallets - `@0xsequence/sequence-wdk`: all-in-one wallet development kit for building a sequence wallet product + +## Development + +### Getting Started + +1. Install dependencies: + `pnpm install` + +2. Build all packages: + `pnpm build` + +### Development Workflow + +- Run development mode across all packages: + `pnpm dev` + +- Linting and formatting is enforced via git hooks + +## License + +Apache-2.0 From 336f46a8c060ef0f57e1ff29f4d1b8adf7660462 Mon Sep 17 00:00:00 2001 From: Michael Standen Date: Thu, 30 Jan 2025 14:57:28 +1300 Subject: [PATCH 070/439] Add session management primitives --- packages/primitives/src/attestation.ts | 27 +++++ packages/primitives/src/permission.ts | 62 +++++++++++ packages/primitives/src/session-config.ts | 20 ++++ packages/primitives/src/session-signature.ts | 104 +++++++++++++++++++ packages/primitives/src/utils.ts | 13 +++ 5 files changed, 226 insertions(+) create mode 100644 packages/primitives/src/attestation.ts create mode 100644 packages/primitives/src/permission.ts create mode 100644 packages/primitives/src/session-config.ts create mode 100644 packages/primitives/src/session-signature.ts diff --git a/packages/primitives/src/attestation.ts b/packages/primitives/src/attestation.ts new file mode 100644 index 000000000..ac6b041d4 --- /dev/null +++ b/packages/primitives/src/attestation.ts @@ -0,0 +1,27 @@ +import { Address, Bytes, Hash } from 'ox' + +export type Attestation = { + approvedSigner: Address.Address + identityType: Bytes.Bytes // bytes4 + issuerHash: Bytes.Bytes // bytes32 + audienceHash: Bytes.Bytes // bytes32 + authData: Bytes.Bytes // bytes + applicationData: Bytes.Bytes // bytes +} + +export function encodeAttestation(attestation: Attestation): Bytes.Bytes { + return Bytes.concat( + Bytes.padLeft(Bytes.fromHex(attestation.approvedSigner), 20), + Bytes.padLeft(attestation.identityType, 4), + Bytes.padLeft(attestation.issuerHash, 32), + Bytes.padLeft(attestation.audienceHash, 32), + Bytes.padLeft(Bytes.fromNumber(attestation.authData.length), 3), + attestation.authData, + Bytes.padLeft(Bytes.fromNumber(attestation.applicationData.length), 3), + attestation.applicationData, + ) +} + +export function hashAttestation(attestation: Attestation): Bytes.Bytes { + return Hash.keccak256(encodeAttestation(attestation)) +} diff --git a/packages/primitives/src/permission.ts b/packages/primitives/src/permission.ts new file mode 100644 index 000000000..330bb9460 --- /dev/null +++ b/packages/primitives/src/permission.ts @@ -0,0 +1,62 @@ +import { Address, Bytes } from 'ox' + +export enum ParameterOperation { + EQUAL = 0, + NOT_EQUAL = 1, + GREATER_THAN_OR_EQUAL = 2, + LESS_THAN_OR_EQUAL = 3, +} + +export type ParameterRule = { + cumulative: boolean + operation: ParameterOperation + value: bigint + offset: bigint + mask: Bytes.Bytes +} + +export type Permission = { + target: Address.Address + rules: ParameterRule[] +} + +export type SessionPermissions = { + signer: Address.Address + valueLimit: bigint + deadline: bigint + permissions: Permission[] +} + +export function encodeSessionPermissions(sessionPermissions: SessionPermissions): Bytes.Bytes { + const encodedPermissions = sessionPermissions.permissions.map(encodePermission) + + return Bytes.concat( + Bytes.padLeft(Bytes.fromHex(sessionPermissions.signer), 20), + Bytes.padLeft(Bytes.fromNumber(sessionPermissions.valueLimit), 32), + Bytes.padLeft(Bytes.fromNumber(sessionPermissions.deadline), 32), + Bytes.padLeft(Bytes.fromNumber(encodedPermissions.length), 3), + Bytes.concat(...encodedPermissions), + ) +} + +export function encodePermission(permission: Permission): Bytes.Bytes { + const encodedRules = permission.rules.map(encodeParameterRule) + return Bytes.concat( + Bytes.padLeft(Bytes.fromHex(permission.target), 20), + Bytes.padLeft(Bytes.fromNumber(permission.rules.length), 3), + Bytes.concat(...encodedRules), + ) +} + +function encodeParameterRule(rule: ParameterRule): Bytes.Bytes { + // Combine operation and cumulative flag into a single byte + // 0x[operationx3][cumulative] + const operationCumulative = (Number(rule.operation) << 1) | (rule.cumulative ? 1 : 0) + + return Bytes.concat( + Bytes.fromNumber(operationCumulative), + Bytes.padLeft(Bytes.fromNumber(rule.value), 32), + Bytes.padLeft(Bytes.fromNumber(rule.offset), 32), + Bytes.padLeft(rule.mask, 32), + ) +} diff --git a/packages/primitives/src/session-config.ts b/packages/primitives/src/session-config.ts new file mode 100644 index 000000000..fc93ca9ba --- /dev/null +++ b/packages/primitives/src/session-config.ts @@ -0,0 +1,20 @@ +import { Address, Bytes } from 'ox' +import { Permission, encodePermission } from './permission' + +export type SessionConfig = { + signer: Address.Address + valueLimit: bigint + deadline: bigint + permissions: Permission[] +} + +export function encodeSessionConfig(sessionConfig: SessionConfig): Bytes.Bytes { + const encodedPermissions = sessionConfig.permissions.map(encodePermission) + return Bytes.concat( + Bytes.padLeft(Bytes.fromHex(sessionConfig.signer), 20), + Bytes.fromNumber(sessionConfig.valueLimit), + Bytes.fromNumber(sessionConfig.deadline), + Bytes.padLeft(Bytes.fromNumber(encodedPermissions.length), 3), + Bytes.concat(...encodedPermissions), + ) +} diff --git a/packages/primitives/src/session-signature.ts b/packages/primitives/src/session-signature.ts new file mode 100644 index 000000000..50d3e122a --- /dev/null +++ b/packages/primitives/src/session-signature.ts @@ -0,0 +1,104 @@ +import { Address, Bytes } from 'ox' +import { Attestation, encodeAttestation } from './attestation' +import { Permission, SessionPermissions } from './permission' +import { minBytesFor, packRSV } from './utils' + +import { encodePermission } from './permission' +import { encodeSessionConfig } from './session-config' +export const FLAG_PERMISSIONS = 0 +export const FLAG_NODE = 1 +export const FLAG_BRANCH = 2 + +export type SessionManagerSignature = { + attestation: Attestation + globalSigner: Address.Address + permissionsRoot: Bytes.Bytes + sessionPermissions: SessionsTopology + isImplicit: boolean + implicitBlacklist: Address.Address[] + permissionIdxPerCall: number[] +} + +export type SessionLeaf = SessionPermissions +export type SessionNode = [SessionsTopology, SessionsTopology] +export type SessionsTopology = SessionNode | SessionLeaf + +function isLeaf(topology: SessionsTopology): topology is SessionLeaf { + return typeof topology === 'object' && 'signer' in topology +} + +function isNode(topology: SessionsTopology): topology is SessionNode { + return Array.isArray(topology) && topology.length === 2 && isTopology(topology[0]!) && isTopology(topology[1]!) +} + +function isTopology(topology: SessionsTopology): topology is SessionsTopology { + return isNode(topology) || isLeaf(topology) +} + +export function encodeSessionSignature( + signature: SessionManagerSignature, + sessionSignature: { v: number; r: Bytes.Bytes; s: Bytes.Bytes }, + globalSignature: { v: number; r: Bytes.Bytes; s: Bytes.Bytes }, +): Bytes.Bytes { + const parts: Bytes.Bytes[] = [] + + // Add session signature (r,sv) + parts.push(packRSV(sessionSignature)) + + // Add attestation components + parts.push(encodeAttestation(signature.attestation)) + + // Add global signature (r,s,v) + parts.push(globalSignature.r) + parts.push(globalSignature.s) + parts.push(new Uint8Array([globalSignature.v])) + + // Encode permissions tree + const encodedPermissions = encodePermissionsTree(signature.sessionPermissions) + parts.push(Bytes.padLeft(Bytes.fromNumber(encodedPermissions.length), 3)) + parts.push(encodedPermissions) + + // Add blacklist with size prefix + parts.push(Bytes.padLeft(Bytes.fromNumber(signature.implicitBlacklist.length), 3)) + for (const addr of signature.implicitBlacklist) { + parts.push(Bytes.fromHex(addr)) + } + + // Add permission indices with size prefix + parts.push(Bytes.padLeft(Bytes.fromNumber(signature.permissionIdxPerCall.length), 3)) + parts.push(new Uint8Array(signature.permissionIdxPerCall)) + + return Bytes.concat(...parts) +} + +function encodePermissionsTree(topolgy: SessionsTopology): Bytes.Bytes { + if (isNode(topolgy)) { + const encoded0 = encodePermissionsTree(topolgy[0]!) + const encoded1 = encodePermissionsTree(topolgy[1]!) + const isBranching = isNode(topolgy[1]!) + + if (isBranching) { + const encoded1Size = minBytesFor(BigInt(encoded1.length)) + if (encoded1Size > 15) { + throw new Error('Branch too large') + } + + const flag = (FLAG_BRANCH << 4) | encoded1Size + return Bytes.concat( + encoded0, + Bytes.fromNumber(flag), + Bytes.padLeft(Bytes.fromNumber(encoded1.length), encoded1Size), + encoded1, + ) + } + + return Bytes.concat(Bytes.fromNumber(FLAG_NODE), encoded0, encoded1) + } + + if (isLeaf(topolgy)) { + const encodedLeaf = encodeSessionConfig(topolgy) + return Bytes.concat(Bytes.fromNumber(FLAG_PERMISSIONS), encodedLeaf) + } + + throw new Error('Invalid topology') +} diff --git a/packages/primitives/src/utils.ts b/packages/primitives/src/utils.ts index 71a342931..ea4a8a11e 100644 --- a/packages/primitives/src/utils.ts +++ b/packages/primitives/src/utils.ts @@ -1,3 +1,16 @@ +import { Bytes } from 'ox' + export function minBytesFor(val: bigint): number { return Math.ceil(val.toString(16).length / 2) } + +// ERC-2098 +export function packRSV({ r, s, v }: { r: Bytes.Bytes; s: Bytes.Bytes; v: number }): Bytes.Bytes { + r = Bytes.padLeft(r, 32) + s = Bytes.padLeft(s, 32) + if (v % 2 === 0) { + s[0]! |= 0x80 + } + + return Bytes.concat(r, s) +} From 129b8ef0fc24ea153eb7b131b1ed30d231a99d4a Mon Sep 17 00:00:00 2001 From: Agusx1211 Date: Thu, 30 Jan 2025 14:35:15 +0000 Subject: [PATCH 071/439] Nested encode fixes --- README.md | 2 +- .../primitives-cli/src/subcommands/config.ts | 2 +- .../src/subcommands/devTools.ts | 72 +++++++++++-------- packages/primitives/src/signature.ts | 19 +++-- 4 files changed, 53 insertions(+), 42 deletions(-) diff --git a/README.md b/README.md index f397f0364..0876c8c6c 100644 --- a/README.md +++ b/README.md @@ -19,7 +19,7 @@ ### Development Workflow - Run development mode across all packages: - `pnpm dev` + `pnpm dev` - Linting and formatting is enforced via git hooks diff --git a/packages/primitives-cli/src/subcommands/config.ts b/packages/primitives-cli/src/subcommands/config.ts index 0ef49670f..d8b9bd4e6 100644 --- a/packages/primitives-cli/src/subcommands/config.ts +++ b/packages/primitives-cli/src/subcommands/config.ts @@ -85,7 +85,7 @@ function parseElements(elements: string): Leaf[] { type: 'nested', threshold: BigInt(threshold!), weight: BigInt(weight!), - tree: flatLeavesToTopology(parseElements(innerSubElements)) + tree: flatLeavesToTopology(parseElements(innerSubElements)), }) remainingElements = remainingElements.slice(endSubElements + 1).trim() } else if (firstElementType === 'node') { diff --git a/packages/primitives-cli/src/subcommands/devTools.ts b/packages/primitives-cli/src/subcommands/devTools.ts index 1a6f80572..cc052a701 100644 --- a/packages/primitives-cli/src/subcommands/devTools.ts +++ b/packages/primitives-cli/src/subcommands/devTools.ts @@ -3,6 +3,11 @@ import type { CommandModule } from 'yargs' import { Configuration, Topology, configToJson } from '@0xsequence/sequence-primitives' import { Hex } from 'ox' +interface RandomOptions { + seededRandom?: () => number + minThresholdOnNested?: number +} + function createSeededRandom(seed: string) { let currentSeed = seed let hash = crypto.createHash('sha256').update(currentSeed).digest() @@ -21,79 +26,79 @@ function createSeededRandom(seed: string) { } } -function randomBytes(length: number, seededRandom?: () => number): Uint8Array { +function randomBytes(length: number, options?: RandomOptions): Uint8Array { const bytes = new Uint8Array(length) - if (seededRandom) { + if (options?.seededRandom) { for (let i = 0; i < length; i++) { - bytes[i] = Math.floor(seededRandom() * 256) + bytes[i] = Math.floor(options.seededRandom() * 256) } return bytes } return crypto.getRandomValues(bytes) } -function randomBigInt(max: bigint, seededRandom?: () => number): bigint { - if (seededRandom) { - return BigInt(Math.floor(seededRandom() * Number(max))) +function randomBigInt(max: bigint, options?: RandomOptions): bigint { + if (options?.seededRandom) { + return BigInt(Math.floor(options.seededRandom() * Number(max))) } return BigInt(Math.floor(Math.random() * Number(max))) } -function randomAddress(seededRandom?: () => number): `0x${string}` { - return `0x${Buffer.from(randomBytes(20, seededRandom)).toString('hex')}` +function randomAddress(options?: RandomOptions): `0x${string}` { + return `0x${Buffer.from(randomBytes(20, options)).toString('hex')}` } -function generateRandomTopology(depth: number, seededRandom?: () => number): Topology { +function generateRandomTopology(depth: number, options?: RandomOptions): Topology { if (depth <= 0) { - const leafType = seededRandom ? Math.floor(seededRandom() * 5) : Math.floor(Math.random() * 5) + const leafType = options?.seededRandom ? Math.floor(options.seededRandom() * 5) : Math.floor(Math.random() * 5) switch (leafType) { case 0: // SignerLeaf return { type: 'signer', - address: randomAddress(seededRandom), - weight: randomBigInt(100n, seededRandom), + address: randomAddress(options), + weight: randomBigInt(256n, options), } case 1: // SapientSigner return { type: 'sapient-signer', - address: randomAddress(seededRandom), - weight: randomBigInt(100n, seededRandom), - imageHash: randomBytes(32, seededRandom), + address: randomAddress(options), + weight: randomBigInt(256n, options), + imageHash: randomBytes(32, options), } case 2: // SubdigestLeaf return { type: 'subdigest', - digest: randomBytes(32, seededRandom), + digest: randomBytes(32, options), } case 3: // NodeLeaf - return randomBytes(32, seededRandom) + return randomBytes(32, options) case 4: // NestedLeaf + const minThreshold = BigInt(options?.minThresholdOnNested ?? 0) return { type: 'nested', - tree: generateRandomTopology(0, seededRandom), - weight: randomBigInt(100n, seededRandom), - threshold: randomBigInt(50n, seededRandom), + tree: generateRandomTopology(0, options), + weight: randomBigInt(256n, options), + threshold: minThreshold + randomBigInt(65535n - minThreshold, options), } } } // Generate a node with two random subtrees - return [generateRandomTopology(depth - 1, seededRandom), generateRandomTopology(depth - 1, seededRandom)] + return [generateRandomTopology(depth - 1, options), generateRandomTopology(depth - 1, options)] } -async function generateRandomConfig(maxDepth: number, seed?: string): Promise { - const seededRandom = seed ? createSeededRandom(seed) : undefined - +async function generateRandomConfig(maxDepth: number, options?: RandomOptions): Promise { const config: Configuration = { - threshold: randomBigInt(100n, seededRandom), - checkpoint: randomBigInt(1000n, seededRandom), - topology: generateRandomTopology(maxDepth, seededRandom), - checkpointer: (seededRandom ? seededRandom() : Math.random()) > 0.5 ? randomAddress(seededRandom) : undefined, + threshold: randomBigInt(100n, options), + checkpoint: randomBigInt(1000n, options), + topology: generateRandomTopology(maxDepth, options), + checkpointer: + (options?.seededRandom ? options.seededRandom() : Math.random()) > 0.5 ? randomAddress(options) : undefined, } console.log(configToJson(config)) @@ -119,9 +124,18 @@ const command: CommandModule = { description: 'Seed for deterministic generation', required: false, }) + .option('min-threshold-on-nested', { + type: 'number', + description: 'Minimum threshold value for nested leaves', + default: 0, + }) }, async (argv) => { - await generateRandomConfig(argv.maxDepth as number, argv.seed) + const options: RandomOptions = { + seededRandom: argv.seed ? createSeededRandom(argv.seed) : undefined, + minThresholdOnNested: argv.minThresholdOnNested as number, + } + await generateRandomConfig(argv.maxDepth as number, options) }, ) .demandCommand(1, 'You must specify a subcommand for dev-tools') diff --git a/packages/primitives/src/signature.ts b/packages/primitives/src/signature.ts index 08a086ba1..df4eb5ed4 100644 --- a/packages/primitives/src/signature.ts +++ b/packages/primitives/src/signature.ts @@ -545,17 +545,15 @@ export function encodeSignature( if (config.checkpointer) { output = Bytes.concat(output, Bytes.padLeft(Bytes.fromHex(config.checkpointer), 20)) - } - if (checkpointerData) { - const checkpointerDataSize = checkpointerData.length + const checkpointerDataSize = checkpointerData?.length ?? 0 if (checkpointerDataSize > 16777215) { throw new Error('Checkpointer data too large') } const checkpointerDataSizeBytes = Bytes.padLeft(Bytes.fromNumber(checkpointerDataSize), 3) - output = Bytes.concat(output, checkpointerDataSizeBytes, checkpointerData) + output = Bytes.concat(output, checkpointerDataSizeBytes, checkpointerData ?? Bytes.fromArray([])) } const checkpointBytes = Bytes.padLeft(Bytes.fromNumber(config.checkpoint), bytesForCheckpoint) @@ -608,7 +606,7 @@ export function encodeTopology( let flag = FLAG_NESTED << 4 let weightBytes = Bytes.fromArray([]) - if (topology.weight <= 3n) { + if (topology.weight <= 3n && topology.weight > 0n) { flag |= Number(topology.weight) << 2 } else if (topology.weight <= 255n) { weightBytes = Bytes.fromNumber(Number(topology.weight)) @@ -617,7 +615,7 @@ export function encodeTopology( } let thresholdBytes = Bytes.fromArray([]) - if (topology.threshold <= 3n) { + if (topology.threshold <= 3n && topology.threshold > 0n) { flag |= Number(topology.threshold) } else if (topology.threshold <= 65535n) { thresholdBytes = Bytes.padLeft(Bytes.fromNumber(Number(topology.threshold)), 2) @@ -625,8 +623,7 @@ export function encodeTopology( throw new Error('Threshold too large') } - const nestedSize = minBytesFor(BigInt(nested.length)) - if (nestedSize > 3) { + if (nested.length > 16777215) { throw new Error('Nested tree too large') } @@ -634,7 +631,7 @@ export function encodeTopology( Bytes.fromNumber(flag), weightBytes, thresholdBytes, - Bytes.padLeft(Bytes.fromNumber(nestedSize), 3), + Bytes.padLeft(Bytes.fromNumber(nested.length), 3), nested, ) } @@ -720,7 +717,7 @@ export function encodeTopology( } if (isSubdigestLeaf(topology)) { - return Bytes.concat(Bytes.fromNumber(FLAG_SUBDIGEST), topology.digest) + return Bytes.concat(Bytes.fromNumber(FLAG_SUBDIGEST << 4), topology.digest) } if (isSignerLeaf(topology)) { @@ -740,7 +737,7 @@ export function encodeTopology( if (isSapientSignerLeaf(topology)) { // Encode as node directly const hash = hashConfiguration(topology) - return Bytes.concat(Bytes.fromNumber(FLAG_NODE), hash) + return Bytes.concat(Bytes.fromNumber(FLAG_NODE << 4), hash) } console.log(topology) From c9749741303423fcb2abcbb8dc6dc0a02f652820 Mon Sep 17 00:00:00 2001 From: William Hua Date: Thu, 30 Jan 2025 12:01:31 -0500 Subject: [PATCH 072/439] primitives: chained signature encoding --- packages/primitives/src/signature.ts | 47 +++++++++++++++++----------- 1 file changed, 28 insertions(+), 19 deletions(-) diff --git a/packages/primitives/src/signature.ts b/packages/primitives/src/signature.ts index df4eb5ed4..36c7b92ec 100644 --- a/packages/primitives/src/signature.ts +++ b/packages/primitives/src/signature.ts @@ -88,14 +88,7 @@ export type RawSignature = { noChainId: boolean checkpointerData?: Bytes.Bytes configuration: RawConfiguration - suffix?: Omit[] -} - -export type Signature = { - noChainId: boolean - checkpointerData?: Bytes.Bytes - topology: Topology - suffix?: Omit[] + suffix?: Array } export function isRawSignerLeaf(cand: any): cand is RawSignerLeaf { @@ -173,7 +166,7 @@ export function decodeSignature(signature: Bytes.Bytes): RawSignature { // If bit 1 is set => chained signature if ((flag & 0x01) === 0x01) { - const subsignatures: RawSignature[] = [] + const subsignatures: Array = [] while (index < signature.length) { if (index + 3 > signature.length) { @@ -188,7 +181,11 @@ export function decodeSignature(signature: Bytes.Bytes): RawSignature { const subsignature = decodeSignature(signature.subarray(index, index + subsignatureSize)) index += subsignatureSize - subsignatures.push(subsignature) + if (subsignature.checkpointerData) { + throw new Error('Chained signature subsignature has checkpointer data') + } + + subsignatures.push({ ...subsignature, checkpointerData: undefined }) } if (subsignatures.length === 0) { @@ -509,17 +506,15 @@ export function fillLeaves( throw new Error('Invalid topology') } -export function encodeSignature( - config: Configuration | RawConfiguration, - options: { - noChainId?: boolean - checkpointerData?: Uint8Array - } = {}, -): Uint8Array { - const { noChainId, checkpointerData } = options +export function encodeSignature(signature: RawSignature): Uint8Array { + const { noChainId, checkpointerData, configuration: config, suffix } = signature let flag = 0 + if (suffix?.length) { + flag |= 0x01 + } + if (noChainId) { flag |= 0x02 } @@ -556,13 +551,27 @@ export function encodeSignature( output = Bytes.concat(output, checkpointerDataSizeBytes, checkpointerData ?? Bytes.fromArray([])) } + if (suffix?.length) { + const encoded = encodeSignature({ ...signature, checkpointerData: undefined, suffix: undefined }) + const encodedSize = Bytes.padLeft(Bytes.fromNumber(encoded.length), 3) + output = Bytes.concat(output, encodedSize) + + for (const subsignature of suffix) { + const encoded = encodeSignature(subsignature) + const encodedSize = Bytes.padLeft(Bytes.fromNumber(encoded.length), 3) + output = Bytes.concat(output, encodedSize) + } + + return output + } + const checkpointBytes = Bytes.padLeft(Bytes.fromNumber(config.checkpoint), bytesForCheckpoint) output = Bytes.concat(output, checkpointBytes) const thresholdBytes = Bytes.padLeft(Bytes.fromNumber(config.threshold), bytesForThreshold) output = Bytes.concat(output, thresholdBytes) - const topologyBytes = encodeTopology(config.topology, options) + const topologyBytes = encodeTopology(config.topology, signature) output = Bytes.concat(output, topologyBytes) return output From 6e5450fb2aad93463564691e67ad8494226b2dc9 Mon Sep 17 00:00:00 2001 From: William Hua Date: Thu, 30 Jan 2025 13:29:36 -0500 Subject: [PATCH 073/439] primitives-cli: fix compile errors --- packages/primitives-cli/src/subcommands/config.ts | 4 ++-- packages/primitives-cli/src/subcommands/signature.ts | 10 +--------- 2 files changed, 3 insertions(+), 11 deletions(-) diff --git a/packages/primitives-cli/src/subcommands/config.ts b/packages/primitives-cli/src/subcommands/config.ts index d8b9bd4e6..d38e866e5 100644 --- a/packages/primitives-cli/src/subcommands/config.ts +++ b/packages/primitives-cli/src/subcommands/config.ts @@ -124,8 +124,8 @@ async function calculateImageHash(input: string): Promise { } async function doEncode(input: string): Promise { - const config = configFromJson(input) - console.log(Hex.fromBytes(encodeSignature(config as Configuration))) + const configuration = configFromJson(input) + console.log(Hex.fromBytes(encodeSignature({ noChainId: true, configuration }))) } const configCommand: CommandModule = { diff --git a/packages/primitives-cli/src/subcommands/signature.ts b/packages/primitives-cli/src/subcommands/signature.ts index 7fcae7b99..fc424a825 100644 --- a/packages/primitives-cli/src/subcommands/signature.ts +++ b/packages/primitives-cli/src/subcommands/signature.ts @@ -116,15 +116,7 @@ async function doEncode(input: string, signatures: string[] = [], noChainId: boo return undefined }) - const encoded = encodeSignature( - { - ...config, - topology: fullTopology, - }, - { - noChainId, - }, - ) + const encoded = encodeSignature({ noChainId, configuration: { ...config, topology: fullTopology } }) console.log(Hex.fromBytes(encoded)) } From 309bc656d128a7f9b34e5c092f956ada6c4ea9d3 Mon Sep 17 00:00:00 2001 From: William Hua Date: Thu, 30 Jan 2025 14:43:43 -0500 Subject: [PATCH 074/439] core: remove Signature.address --- packages/core/src/signer.ts | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/packages/core/src/signer.ts b/packages/core/src/signer.ts index e02b80afb..efdda56d1 100644 --- a/packages/core/src/signer.ts +++ b/packages/core/src/signer.ts @@ -11,12 +11,7 @@ export interface Signer { | { signature: Promise; onSignerSignature?: SignerSignatureCallback; onCancel?: CancelCallback } } -export type Signature = - | { type: 'hash'; signature: Hex.Hex } - | { type: 'eth_sign'; signature: Hex.Hex } - | { type: 'erc-1271'; address: Address.Address; signature: Hex.Hex } - | { type: 'sapient'; address: Address.Address; signature: Hex.Hex } - | { type: 'sapient-compact'; address: Address.Address; signature: Hex.Hex } +export type Signature = { type: 'hash' | 'eth_sign' | 'erc-1271' | 'sapient' | 'sapient-compact'; signature: Hex.Hex } export type SignerSignatureCallback = ( configuration: Configuration, From eb4ad7c11b38dc63c08cc1fa572b22f3f9352e6b Mon Sep 17 00:00:00 2001 From: Agusx1211 Date: Thu, 30 Jan 2025 23:34:48 +0000 Subject: [PATCH 075/439] Use hash for address leaf --- packages/primitives/src/config.ts | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/packages/primitives/src/config.ts b/packages/primitives/src/config.ts index ee134f523..e32a4e0f0 100644 --- a/packages/primitives/src/config.ts +++ b/packages/primitives/src/config.ts @@ -141,9 +141,13 @@ export function hashConfiguration(topology: Topology | Configuration): Bytes.Byt } if (isSignerLeaf(topology)) { - const addrBigInt = Hex.toBigInt(topology.address) - const combined = (topology.weight << 160n) | addrBigInt - return Bytes.padLeft(Bytes.fromNumber(combined), 32) + return Hash.keccak256( + Bytes.concat( + Bytes.fromString('Sequence signer:\n'), + Bytes.fromHex(topology.address), + Bytes.padLeft(Bytes.fromNumber(topology.weight), 32), + ), + ) } if (isSapientSignerLeaf(topology)) { From 03043cac64ee7bdca6e682ee012004b7a8c1c539 Mon Sep 17 00:00:00 2001 From: Michael Standen Date: Fri, 31 Jan 2025 14:53:12 +1300 Subject: [PATCH 076/439] Add permission encoding to CLI --- packages/primitives-cli/src/index.ts | 2 + .../src/subcommands/permission.ts | 54 +++++++++++++++++++ packages/primitives/src/index.ts | 2 +- packages/primitives/src/permission.ts | 40 +++++++++++++- 4 files changed, 95 insertions(+), 3 deletions(-) create mode 100644 packages/primitives-cli/src/subcommands/permission.ts diff --git a/packages/primitives-cli/src/index.ts b/packages/primitives-cli/src/index.ts index f9a86c8b0..462707edb 100644 --- a/packages/primitives-cli/src/index.ts +++ b/packages/primitives-cli/src/index.ts @@ -6,12 +6,14 @@ import payloadCommand from './subcommands/payload' import configCommand from './subcommands/config' import devToolsCommand from './subcommands/devTools' import signatureCommand from './subcommands/signature' +import permissionCommand from './subcommands/permission' void yargs(hideBin(process.argv)) .command(payloadCommand) .command(configCommand) .command(devToolsCommand) .command(signatureCommand) + .command(permissionCommand) //FIXME Not sure we need to expose this .demandCommand(1) .strict() .help().argv diff --git a/packages/primitives-cli/src/subcommands/permission.ts b/packages/primitives-cli/src/subcommands/permission.ts new file mode 100644 index 000000000..fadc6cf9b --- /dev/null +++ b/packages/primitives-cli/src/subcommands/permission.ts @@ -0,0 +1,54 @@ +import { encodePermission, permissionFromJson } from '@0xsequence/sequence-primitives' +import { Hex } from 'ox' +import type { CommandModule } from 'yargs' +import { fromPosOrStdin } from '../utils' + +async function doEncode(input: string): Promise { + const permission = permissionFromJson(input) + const packed = encodePermission(permission) + console.log(Hex.from(packed)) +} + +async function convertToJson(permission: string): Promise { + throw new Error('Not implemented') +} + +const permissionCommand: CommandModule = { + command: 'permission', + describe: 'Permission conversion utilities', + builder: (yargs) => { + return yargs + .command( + 'to-packed [permission]', + 'Convert permission to packed format', + (yargs) => { + return yargs.positional('permission', { + type: 'string', + description: 'Input permission to convert', + }) + }, + async (argv) => { + const permission = await fromPosOrStdin(argv, 'permission') + await doEncode(permission) + }, + ) + .command( + 'to-json [permission]', + 'Convert permission to JSON format', + (yargs) => { + return yargs.positional('permission', { + type: 'string', + description: 'Input permission to convert', + }) + }, + async (argv) => { + const permission = await fromPosOrStdin(argv, 'permission') + await convertToJson(permission) + }, + ) + .demandCommand(1, 'You must specify a subcommand for permission') + }, + handler: () => {}, +} + +export default permissionCommand diff --git a/packages/primitives/src/index.ts b/packages/primitives/src/index.ts index e8021b533..8d4ae9cf5 100644 --- a/packages/primitives/src/index.ts +++ b/packages/primitives/src/index.ts @@ -1,6 +1,6 @@ export * from './address' export * from './config' export * from './payload' +export * from './permission' export * from './signature' export * from './utils' -export * from './signature' diff --git a/packages/primitives/src/permission.ts b/packages/primitives/src/permission.ts index 330bb9460..71febea9b 100644 --- a/packages/primitives/src/permission.ts +++ b/packages/primitives/src/permission.ts @@ -10,7 +10,7 @@ export enum ParameterOperation { export type ParameterRule = { cumulative: boolean operation: ParameterOperation - value: bigint + value: Bytes.Bytes offset: bigint mask: Bytes.Bytes } @@ -27,6 +27,8 @@ export type SessionPermissions = { permissions: Permission[] } +// Encoding + export function encodeSessionPermissions(sessionPermissions: SessionPermissions): Bytes.Bytes { const encodedPermissions = sessionPermissions.permissions.map(encodePermission) @@ -55,8 +57,42 @@ function encodeParameterRule(rule: ParameterRule): Bytes.Bytes { return Bytes.concat( Bytes.fromNumber(operationCumulative), - Bytes.padLeft(Bytes.fromNumber(rule.value), 32), + Bytes.padLeft(rule.value, 32), Bytes.padLeft(Bytes.fromNumber(rule.offset), 32), Bytes.padLeft(rule.mask, 32), ) } + +// JSON + +export function permissionToJson(permission: Permission): string { + return JSON.stringify({ + target: permission.target.toString(), + rules: permission.rules.map(permissionRuleToJson), + }) +} + +export function permissionRuleToJson(rule: ParameterRule): string { + return JSON.stringify({ + cumulative: rule.cumulative, + operation: rule.operation, + value: rule.value.toString(), + offset: rule.offset.toString(), + mask: rule.mask.toString(), + }) +} + +export function permissionFromJson(json: string): Permission { + const parsed = JSON.parse(json) + const res = { + target: Address.from(parsed.target), + rules: parsed.rules.map((decoded: any) => ({ + cumulative: decoded.cumulative, + operation: decoded.operation, + value: Bytes.fromHex(decoded.value), + offset: BigInt(decoded.offset), + mask: Bytes.fromHex(decoded.mask), + })), + } + return res +} From bb3509c601f0d0b0e6506b0d93aa41fb3ac71559 Mon Sep 17 00:00:00 2001 From: Michael Standen Date: Mon, 3 Feb 2025 09:55:12 +1300 Subject: [PATCH 077/439] Add session permission encoding to cli --- .../src/subcommands/permission.ts | 35 +++++++++------ packages/primitives/src/permission.ts | 44 ++++++++++++++----- packages/primitives/src/session-signature.ts | 5 +-- 3 files changed, 57 insertions(+), 27 deletions(-) diff --git a/packages/primitives-cli/src/subcommands/permission.ts b/packages/primitives-cli/src/subcommands/permission.ts index fadc6cf9b..1a580bf1d 100644 --- a/packages/primitives-cli/src/subcommands/permission.ts +++ b/packages/primitives-cli/src/subcommands/permission.ts @@ -1,16 +1,23 @@ -import { encodePermission, permissionFromJson } from '@0xsequence/sequence-primitives' +import { + encodePermission, + encodeSessionPermission, + permissionFromJson, + sessionPermissionFromJson, +} from '@0xsequence/sequence-primitives' import { Hex } from 'ox' import type { CommandModule } from 'yargs' import { fromPosOrStdin } from '../utils' -async function doEncode(input: string): Promise { - const permission = permissionFromJson(input) - const packed = encodePermission(permission) +async function doEncodeSessionPermission(input: string): Promise { + const permission = sessionPermissionFromJson(input) + const packed = encodeSessionPermission(permission) console.log(Hex.from(packed)) } -async function convertToJson(permission: string): Promise { - throw new Error('Not implemented') +async function doEncodePermission(input: string): Promise { + const permission = permissionFromJson(input) + const packed = encodePermission(permission) + console.log(Hex.from(packed)) } const permissionCommand: CommandModule = { @@ -19,22 +26,22 @@ const permissionCommand: CommandModule = { builder: (yargs) => { return yargs .command( - 'to-packed [permission]', - 'Convert permission to packed format', + 'to-packed-session [session-permission]', + 'Convert session permission to packed format', (yargs) => { - return yargs.positional('permission', { + return yargs.positional('session-permission', { type: 'string', description: 'Input permission to convert', }) }, async (argv) => { - const permission = await fromPosOrStdin(argv, 'permission') - await doEncode(permission) + const permission = await fromPosOrStdin(argv, 'session-permission') + await doEncodeSessionPermission(permission) }, ) .command( - 'to-json [permission]', - 'Convert permission to JSON format', + 'to-packed [permission]', + 'Convert permission to packed format', (yargs) => { return yargs.positional('permission', { type: 'string', @@ -43,7 +50,7 @@ const permissionCommand: CommandModule = { }, async (argv) => { const permission = await fromPosOrStdin(argv, 'permission') - await convertToJson(permission) + await doEncodePermission(permission) }, ) .demandCommand(1, 'You must specify a subcommand for permission') diff --git a/packages/primitives/src/permission.ts b/packages/primitives/src/permission.ts index 71febea9b..e2a7d7ec5 100644 --- a/packages/primitives/src/permission.ts +++ b/packages/primitives/src/permission.ts @@ -20,7 +20,7 @@ export type Permission = { rules: ParameterRule[] } -export type SessionPermissions = { +export type SessionPermission = { signer: Address.Address valueLimit: bigint deadline: bigint @@ -29,14 +29,14 @@ export type SessionPermissions = { // Encoding -export function encodeSessionPermissions(sessionPermissions: SessionPermissions): Bytes.Bytes { - const encodedPermissions = sessionPermissions.permissions.map(encodePermission) +export function encodeSessionPermission(sessionPermission: SessionPermission): Bytes.Bytes { + const encodedPermissions = sessionPermission.permissions.map(encodePermission) return Bytes.concat( - Bytes.padLeft(Bytes.fromHex(sessionPermissions.signer), 20), - Bytes.padLeft(Bytes.fromNumber(sessionPermissions.valueLimit), 32), - Bytes.padLeft(Bytes.fromNumber(sessionPermissions.deadline), 32), - Bytes.padLeft(Bytes.fromNumber(encodedPermissions.length), 3), + Bytes.padLeft(Bytes.fromHex(sessionPermission.signer), 20), + Bytes.padLeft(Bytes.fromNumber(sessionPermission.valueLimit), 32), + Bytes.padLeft(Bytes.fromNumber(sessionPermission.deadline), 32), + Bytes.padLeft(Bytes.fromNumber(sessionPermission.permissions.length), 3), Bytes.concat(...encodedPermissions), ) } @@ -65,6 +65,15 @@ function encodeParameterRule(rule: ParameterRule): Bytes.Bytes { // JSON +export function sessionPermissionToJson(sessionPermission: SessionPermission): string { + return JSON.stringify({ + signer: sessionPermission.signer.toString(), + valueLimit: sessionPermission.valueLimit.toString(), + deadline: sessionPermission.deadline.toString(), + permissions: sessionPermission.permissions.map(permissionToJson), + }) +} + export function permissionToJson(permission: Permission): string { return JSON.stringify({ target: permission.target.toString(), @@ -82,9 +91,25 @@ export function permissionRuleToJson(rule: ParameterRule): string { }) } +export function sessionPermissionFromJson(json: string): SessionPermission { + return sessionPermissionFromParsed(JSON.parse(json)) +} + +function sessionPermissionFromParsed(parsed: any): SessionPermission { + return { + signer: Address.from(parsed.signer), + valueLimit: BigInt(parsed.valueLimit), + deadline: BigInt(parsed.deadline), + permissions: parsed.permissions.map(permissionFromParsed), + } +} + export function permissionFromJson(json: string): Permission { - const parsed = JSON.parse(json) - const res = { + return permissionFromParsed(JSON.parse(json)) +} + +function permissionFromParsed(parsed: any): Permission { + return { target: Address.from(parsed.target), rules: parsed.rules.map((decoded: any) => ({ cumulative: decoded.cumulative, @@ -94,5 +119,4 @@ export function permissionFromJson(json: string): Permission { mask: Bytes.fromHex(decoded.mask), })), } - return res } diff --git a/packages/primitives/src/session-signature.ts b/packages/primitives/src/session-signature.ts index 50d3e122a..ea27274c2 100644 --- a/packages/primitives/src/session-signature.ts +++ b/packages/primitives/src/session-signature.ts @@ -1,9 +1,8 @@ import { Address, Bytes } from 'ox' import { Attestation, encodeAttestation } from './attestation' -import { Permission, SessionPermissions } from './permission' +import { SessionPermission } from './permission' import { minBytesFor, packRSV } from './utils' -import { encodePermission } from './permission' import { encodeSessionConfig } from './session-config' export const FLAG_PERMISSIONS = 0 export const FLAG_NODE = 1 @@ -19,7 +18,7 @@ export type SessionManagerSignature = { permissionIdxPerCall: number[] } -export type SessionLeaf = SessionPermissions +export type SessionLeaf = SessionPermission export type SessionNode = [SessionsTopology, SessionsTopology] export type SessionsTopology = SessionNode | SessionLeaf From 92c4ee778f8349d09011dd487d3ad0fa610e84f2 Mon Sep 17 00:00:00 2001 From: Michael Standen Date: Mon, 3 Feb 2025 12:03:49 +1300 Subject: [PATCH 078/439] Session naming --- .../src/subcommands/permission.ts | 12 ++-- packages/primitives/src/permission.ts | 30 ++++---- packages/primitives/src/session-config.ts | 69 ++++++++++++++----- packages/primitives/src/session-signature.ts | 66 ++---------------- 4 files changed, 80 insertions(+), 97 deletions(-) diff --git a/packages/primitives-cli/src/subcommands/permission.ts b/packages/primitives-cli/src/subcommands/permission.ts index 1a580bf1d..b3e7d6ab0 100644 --- a/packages/primitives-cli/src/subcommands/permission.ts +++ b/packages/primitives-cli/src/subcommands/permission.ts @@ -1,16 +1,16 @@ import { encodePermission, - encodeSessionPermission, + encodeSessionPermissions, permissionFromJson, - sessionPermissionFromJson, + sessionPermissionsFromJson, } from '@0xsequence/sequence-primitives' import { Hex } from 'ox' import type { CommandModule } from 'yargs' import { fromPosOrStdin } from '../utils' -async function doEncodeSessionPermission(input: string): Promise { - const permission = sessionPermissionFromJson(input) - const packed = encodeSessionPermission(permission) +async function doEncodeSessionPermissions(input: string): Promise { + const permission = sessionPermissionsFromJson(input) + const packed = encodeSessionPermissions(permission) console.log(Hex.from(packed)) } @@ -36,7 +36,7 @@ const permissionCommand: CommandModule = { }, async (argv) => { const permission = await fromPosOrStdin(argv, 'session-permission') - await doEncodeSessionPermission(permission) + await doEncodeSessionPermissions(permission) }, ) .command( diff --git a/packages/primitives/src/permission.ts b/packages/primitives/src/permission.ts index e2a7d7ec5..0a687ecfc 100644 --- a/packages/primitives/src/permission.ts +++ b/packages/primitives/src/permission.ts @@ -20,7 +20,7 @@ export type Permission = { rules: ParameterRule[] } -export type SessionPermission = { +export type SessionPermissions = { signer: Address.Address valueLimit: bigint deadline: bigint @@ -29,14 +29,14 @@ export type SessionPermission = { // Encoding -export function encodeSessionPermission(sessionPermission: SessionPermission): Bytes.Bytes { - const encodedPermissions = sessionPermission.permissions.map(encodePermission) +export function encodeSessionPermissions(sessionPermissions: SessionPermissions): Bytes.Bytes { + const encodedPermissions = sessionPermissions.permissions.map(encodePermission) return Bytes.concat( - Bytes.padLeft(Bytes.fromHex(sessionPermission.signer), 20), - Bytes.padLeft(Bytes.fromNumber(sessionPermission.valueLimit), 32), - Bytes.padLeft(Bytes.fromNumber(sessionPermission.deadline), 32), - Bytes.padLeft(Bytes.fromNumber(sessionPermission.permissions.length), 3), + Bytes.padLeft(Bytes.fromHex(sessionPermissions.signer), 20), + Bytes.padLeft(Bytes.fromNumber(sessionPermissions.valueLimit), 32), + Bytes.padLeft(Bytes.fromNumber(sessionPermissions.deadline), 32), + Bytes.padLeft(Bytes.fromNumber(sessionPermissions.permissions.length), 3), Bytes.concat(...encodedPermissions), ) } @@ -65,12 +65,12 @@ function encodeParameterRule(rule: ParameterRule): Bytes.Bytes { // JSON -export function sessionPermissionToJson(sessionPermission: SessionPermission): string { +export function sessionPermissionsToJson(sessionPermissions: SessionPermissions): string { return JSON.stringify({ - signer: sessionPermission.signer.toString(), - valueLimit: sessionPermission.valueLimit.toString(), - deadline: sessionPermission.deadline.toString(), - permissions: sessionPermission.permissions.map(permissionToJson), + signer: sessionPermissions.signer.toString(), + valueLimit: sessionPermissions.valueLimit.toString(), + deadline: sessionPermissions.deadline.toString(), + permissions: sessionPermissions.permissions.map(permissionToJson), }) } @@ -91,11 +91,11 @@ export function permissionRuleToJson(rule: ParameterRule): string { }) } -export function sessionPermissionFromJson(json: string): SessionPermission { - return sessionPermissionFromParsed(JSON.parse(json)) +export function sessionPermissionsFromJson(json: string): SessionPermissions { + return sessionPermissionsFromParsed(JSON.parse(json)) } -function sessionPermissionFromParsed(parsed: any): SessionPermission { +function sessionPermissionsFromParsed(parsed: any): SessionPermissions { return { signer: Address.from(parsed.signer), valueLimit: BigInt(parsed.valueLimit), diff --git a/packages/primitives/src/session-config.ts b/packages/primitives/src/session-config.ts index fc93ca9ba..8397bf1d3 100644 --- a/packages/primitives/src/session-config.ts +++ b/packages/primitives/src/session-config.ts @@ -1,20 +1,55 @@ -import { Address, Bytes } from 'ox' -import { Permission, encodePermission } from './permission' - -export type SessionConfig = { - signer: Address.Address - valueLimit: bigint - deadline: bigint - permissions: Permission[] +import { Bytes } from 'ox' +import { encodeSessionPermissions, SessionPermissions } from './permission' +import { minBytesFor } from './utils' + +export const FLAG_PERMISSIONS = 0 +export const FLAG_NODE = 1 +export const FLAG_BRANCH = 2 + +export type SessionLeaf = SessionPermissions +export type SessionNode = [SessionsTopology, SessionsTopology] +export type SessionsTopology = SessionNode | SessionLeaf + +function isLeaf(topology: SessionsTopology): topology is SessionLeaf { + return typeof topology === 'object' && 'signer' in topology +} + +function isNode(topology: SessionsTopology): topology is SessionNode { + return Array.isArray(topology) && topology.length === 2 && isTopology(topology[0]!) && isTopology(topology[1]!) +} + +function isTopology(topology: SessionsTopology): topology is SessionsTopology { + return isNode(topology) || isLeaf(topology) } -export function encodeSessionConfig(sessionConfig: SessionConfig): Bytes.Bytes { - const encodedPermissions = sessionConfig.permissions.map(encodePermission) - return Bytes.concat( - Bytes.padLeft(Bytes.fromHex(sessionConfig.signer), 20), - Bytes.fromNumber(sessionConfig.valueLimit), - Bytes.fromNumber(sessionConfig.deadline), - Bytes.padLeft(Bytes.fromNumber(encodedPermissions.length), 3), - Bytes.concat(...encodedPermissions), - ) +export function encodeSessionsTopology(topolgy: SessionsTopology): Bytes.Bytes { + if (isNode(topolgy)) { + const encoded0 = encodeSessionsTopology(topolgy[0]!) + const encoded1 = encodeSessionsTopology(topolgy[1]!) + const isBranching = isNode(topolgy[1]!) + + if (isBranching) { + const encoded1Size = minBytesFor(BigInt(encoded1.length)) + if (encoded1Size > 15) { + throw new Error('Branch too large') + } + + const flag = (FLAG_BRANCH << 4) | encoded1Size + return Bytes.concat( + encoded0, + Bytes.fromNumber(flag), + Bytes.padLeft(Bytes.fromNumber(encoded1.length), encoded1Size), + encoded1, + ) + } + + return Bytes.concat(Bytes.fromNumber(FLAG_NODE), encoded0, encoded1) + } + + if (isLeaf(topolgy)) { + const encodedLeaf = encodeSessionPermissions(topolgy) + return Bytes.concat(Bytes.fromNumber(FLAG_PERMISSIONS), encodedLeaf) + } + + throw new Error('Invalid topology') } diff --git a/packages/primitives/src/session-signature.ts b/packages/primitives/src/session-signature.ts index ea27274c2..2b6b635a6 100644 --- a/packages/primitives/src/session-signature.ts +++ b/packages/primitives/src/session-signature.ts @@ -1,39 +1,19 @@ import { Address, Bytes } from 'ox' import { Attestation, encodeAttestation } from './attestation' -import { SessionPermission } from './permission' -import { minBytesFor, packRSV } from './utils' +import { encodeSessionsTopology, SessionsTopology } from './session-config' +import { packRSV } from './utils' -import { encodeSessionConfig } from './session-config' export const FLAG_PERMISSIONS = 0 export const FLAG_NODE = 1 export const FLAG_BRANCH = 2 export type SessionManagerSignature = { attestation: Attestation - globalSigner: Address.Address - permissionsRoot: Bytes.Bytes - sessionPermissions: SessionsTopology - isImplicit: boolean + sessionsTopology: SessionsTopology implicitBlacklist: Address.Address[] permissionIdxPerCall: number[] } -export type SessionLeaf = SessionPermission -export type SessionNode = [SessionsTopology, SessionsTopology] -export type SessionsTopology = SessionNode | SessionLeaf - -function isLeaf(topology: SessionsTopology): topology is SessionLeaf { - return typeof topology === 'object' && 'signer' in topology -} - -function isNode(topology: SessionsTopology): topology is SessionNode { - return Array.isArray(topology) && topology.length === 2 && isTopology(topology[0]!) && isTopology(topology[1]!) -} - -function isTopology(topology: SessionsTopology): topology is SessionsTopology { - return isNode(topology) || isLeaf(topology) -} - export function encodeSessionSignature( signature: SessionManagerSignature, sessionSignature: { v: number; r: Bytes.Bytes; s: Bytes.Bytes }, @@ -52,10 +32,10 @@ export function encodeSessionSignature( parts.push(globalSignature.s) parts.push(new Uint8Array([globalSignature.v])) - // Encode permissions tree - const encodedPermissions = encodePermissionsTree(signature.sessionPermissions) - parts.push(Bytes.padLeft(Bytes.fromNumber(encodedPermissions.length), 3)) - parts.push(encodedPermissions) + // Encode sessions topology + const encodedSessionsTopology = encodeSessionsTopology(signature.sessionsTopology) + parts.push(Bytes.padLeft(Bytes.fromNumber(encodedSessionsTopology.length), 3)) + parts.push(encodedSessionsTopology) // Add blacklist with size prefix parts.push(Bytes.padLeft(Bytes.fromNumber(signature.implicitBlacklist.length), 3)) @@ -69,35 +49,3 @@ export function encodeSessionSignature( return Bytes.concat(...parts) } - -function encodePermissionsTree(topolgy: SessionsTopology): Bytes.Bytes { - if (isNode(topolgy)) { - const encoded0 = encodePermissionsTree(topolgy[0]!) - const encoded1 = encodePermissionsTree(topolgy[1]!) - const isBranching = isNode(topolgy[1]!) - - if (isBranching) { - const encoded1Size = minBytesFor(BigInt(encoded1.length)) - if (encoded1Size > 15) { - throw new Error('Branch too large') - } - - const flag = (FLAG_BRANCH << 4) | encoded1Size - return Bytes.concat( - encoded0, - Bytes.fromNumber(flag), - Bytes.padLeft(Bytes.fromNumber(encoded1.length), encoded1Size), - encoded1, - ) - } - - return Bytes.concat(Bytes.fromNumber(FLAG_NODE), encoded0, encoded1) - } - - if (isLeaf(topolgy)) { - const encodedLeaf = encodeSessionConfig(topolgy) - return Bytes.concat(Bytes.fromNumber(FLAG_PERMISSIONS), encodedLeaf) - } - - throw new Error('Invalid topology') -} From 45fac30d4972678e91d83af2321d482a718ececa Mon Sep 17 00:00:00 2001 From: Michael Standen Date: Mon, 3 Feb 2025 14:02:55 +1300 Subject: [PATCH 079/439] Add session topology encoding and decoding --- packages/primitives-cli/src/index.ts | 2 + .../src/subcommands/devTools.ts | 85 +++++++++++++- .../primitives-cli/src/subcommands/session.ts | 36 ++++++ packages/primitives/src/index.ts | 2 + packages/primitives/src/permission.ts | 36 ++++-- packages/primitives/src/session-config.ts | 107 +++++++++++++----- packages/primitives/src/session-signature.ts | 4 - 7 files changed, 223 insertions(+), 49 deletions(-) create mode 100644 packages/primitives-cli/src/subcommands/session.ts diff --git a/packages/primitives-cli/src/index.ts b/packages/primitives-cli/src/index.ts index 462707edb..aab1e5bdb 100644 --- a/packages/primitives-cli/src/index.ts +++ b/packages/primitives-cli/src/index.ts @@ -7,6 +7,7 @@ import configCommand from './subcommands/config' import devToolsCommand from './subcommands/devTools' import signatureCommand from './subcommands/signature' import permissionCommand from './subcommands/permission' +import sessionCommand from './subcommands/session' void yargs(hideBin(process.argv)) .command(payloadCommand) @@ -14,6 +15,7 @@ void yargs(hideBin(process.argv)) .command(devToolsCommand) .command(signatureCommand) .command(permissionCommand) //FIXME Not sure we need to expose this + .command(sessionCommand) .demandCommand(1) .strict() .help().argv diff --git a/packages/primitives-cli/src/subcommands/devTools.ts b/packages/primitives-cli/src/subcommands/devTools.ts index cc052a701..1d0c05917 100644 --- a/packages/primitives-cli/src/subcommands/devTools.ts +++ b/packages/primitives-cli/src/subcommands/devTools.ts @@ -1,11 +1,20 @@ +import { + Configuration, + ParameterRule, + Permission, + SessionsTopology, + Topology, + configToJson, + sessionsTopologyToJson, +} from '@0xsequence/sequence-primitives' import crypto from 'crypto' import type { CommandModule } from 'yargs' -import { Configuration, Topology, configToJson } from '@0xsequence/sequence-primitives' -import { Hex } from 'ox' interface RandomOptions { seededRandom?: () => number minThresholdOnNested?: number + maxPermissions?: number + maxRules?: number } function createSeededRandom(seed: string) { @@ -50,7 +59,7 @@ function randomAddress(options?: RandomOptions): `0x${string}` { function generateRandomTopology(depth: number, options?: RandomOptions): Topology { if (depth <= 0) { - const leafType = options?.seededRandom ? Math.floor(options.seededRandom() * 5) : Math.floor(Math.random() * 5) + const leafType = Math.floor((options?.seededRandom ?? Math.random)() * 5) switch (leafType) { case 0: // SignerLeaf @@ -104,6 +113,40 @@ async function generateRandomConfig(maxDepth: number, options?: RandomOptions): console.log(configToJson(config)) } +async function generateSessionsTopology(depth: number, options?: RandomOptions): Promise { + const isLeaf = (options?.seededRandom ?? Math.random)() * 2 > 1 + + if (isLeaf || depth <= 1) { + const permissionsCount = Math.floor((options?.seededRandom ?? Math.random)() * (options?.maxPermissions ?? 5)) + 1 + return { + signer: randomAddress(options), + valueLimit: randomBigInt(100n, options), + deadline: randomBigInt(1000n, options), + permissions: await Promise.all(Array.from({ length: permissionsCount }, () => generateRandomPermission(options))), + } + } + + return [await generateSessionsTopology(depth - 1, options), await generateSessionsTopology(depth - 1, options)] +} + +async function generateRandomPermission(options?: RandomOptions): Promise { + const rulesCount = Math.floor((options?.seededRandom ?? Math.random)() * (options?.maxRules ?? 5)) + 1 + return { + target: randomAddress(options), + rules: await Promise.all(Array.from({ length: rulesCount }, () => generateRandomRule(options))), + } +} + +async function generateRandomRule(options?: RandomOptions): Promise { + return { + cumulative: (options?.seededRandom ?? Math.random)() * 2 > 1, + operation: Math.floor((options?.seededRandom ?? Math.random)() * 4), + value: randomBytes(32, options), + offset: randomBigInt(100n, options), + mask: randomBytes(32, options), + } +} + const command: CommandModule = { command: 'dev-tools', describe: 'Development tools and utilities', @@ -138,6 +181,42 @@ const command: CommandModule = { await generateRandomConfig(argv.maxDepth as number, options) }, ) + .command( + 'random-session-topology', + 'Generate a random session topology', + (yargs) => { + return yargs + .option('max-depth', { + type: 'number', + description: 'Maximum depth of the session topology', + default: 1, + }) + .option('max-permissions', { + type: 'number', + description: 'Maximum number of permissions in each session', + default: 1, + }) + .option('max-rules', { + type: 'number', + description: 'Maximum number of rules in each permission', + default: 1, + }) + .option('seed', { + type: 'string', + description: 'Seed for deterministic generation', + required: false, + }) + }, + async (argv) => { + const options: RandomOptions = { + seededRandom: argv.seed ? createSeededRandom(argv.seed) : undefined, + maxPermissions: argv.maxPermissions as number, + maxRules: argv.maxRules as number, + } + const topology = await generateSessionsTopology(argv.maxDepth as number, options) + console.log(sessionsTopologyToJson(topology)) + }, + ) .demandCommand(1, 'You must specify a subcommand for dev-tools') .strict(), handler: () => {}, diff --git a/packages/primitives-cli/src/subcommands/session.ts b/packages/primitives-cli/src/subcommands/session.ts new file mode 100644 index 000000000..acfe5974f --- /dev/null +++ b/packages/primitives-cli/src/subcommands/session.ts @@ -0,0 +1,36 @@ +import { encodeSessionsTopology, sessionsTopologyFromJson } from '@0xsequence/sequence-primitives' +import { Hex } from 'ox' +import type { CommandModule } from 'yargs' +import { fromPosOrStdin } from '../utils' + +async function doEncodeSessionsTopology(input: string): Promise { + const topology = sessionsTopologyFromJson(input) + const packed = encodeSessionsTopology(topology) + console.log(Hex.from(packed)) +} + +const sessionCommand: CommandModule = { + command: 'session', + describe: 'Session conversion utilities', + builder: (yargs) => { + return yargs + .command( + 'to-packed [session-topology]', + 'Convert session topology to packed format', + (yargs) => { + return yargs.positional('session-topology', { + type: 'string', + description: 'Input session topology to convert', + }) + }, + async (argv) => { + const permission = await fromPosOrStdin(argv, 'session-topology') + await doEncodeSessionsTopology(permission) + }, + ) + .demandCommand(1, 'You must specify a subcommand for session') + }, + handler: () => {}, +} + +export default sessionCommand diff --git a/packages/primitives/src/index.ts b/packages/primitives/src/index.ts index 8d4ae9cf5..4ed41a9eb 100644 --- a/packages/primitives/src/index.ts +++ b/packages/primitives/src/index.ts @@ -2,5 +2,7 @@ export * from './address' export * from './config' export * from './payload' export * from './permission' +export * from './session-config' +export * from './session-signature' export * from './signature' export * from './utils' diff --git a/packages/primitives/src/permission.ts b/packages/primitives/src/permission.ts index 0a687ecfc..8ddea3395 100644 --- a/packages/primitives/src/permission.ts +++ b/packages/primitives/src/permission.ts @@ -66,36 +66,48 @@ function encodeParameterRule(rule: ParameterRule): Bytes.Bytes { // JSON export function sessionPermissionsToJson(sessionPermissions: SessionPermissions): string { - return JSON.stringify({ + return JSON.stringify(encodeSessionPermissionsForJson(sessionPermissions)) +} + +function encodeSessionPermissionsForJson(sessionPermissions: SessionPermissions): any { + return { signer: sessionPermissions.signer.toString(), valueLimit: sessionPermissions.valueLimit.toString(), deadline: sessionPermissions.deadline.toString(), - permissions: sessionPermissions.permissions.map(permissionToJson), - }) + permissions: sessionPermissions.permissions.map(encodePermissionForJson), + } } export function permissionToJson(permission: Permission): string { - return JSON.stringify({ + return JSON.stringify(encodePermissionForJson(permission)) +} + +function encodePermissionForJson(permission: Permission): any { + return { target: permission.target.toString(), - rules: permission.rules.map(permissionRuleToJson), - }) + rules: permission.rules.map(encodeParameterRuleForJson), + } +} + +export function parameterRuleToJson(rule: ParameterRule): string { + return JSON.stringify(encodeParameterRuleForJson(rule)) } -export function permissionRuleToJson(rule: ParameterRule): string { - return JSON.stringify({ +function encodeParameterRuleForJson(rule: ParameterRule): any { + return { cumulative: rule.cumulative, operation: rule.operation, - value: rule.value.toString(), + value: Bytes.toHex(rule.value), offset: rule.offset.toString(), - mask: rule.mask.toString(), - }) + mask: Bytes.toHex(rule.mask), + } } export function sessionPermissionsFromJson(json: string): SessionPermissions { return sessionPermissionsFromParsed(JSON.parse(json)) } -function sessionPermissionsFromParsed(parsed: any): SessionPermissions { +export function sessionPermissionsFromParsed(parsed: any): SessionPermissions { return { signer: Address.from(parsed.signer), valueLimit: BigInt(parsed.valueLimit), diff --git a/packages/primitives/src/session-config.ts b/packages/primitives/src/session-config.ts index 8397bf1d3..950db1587 100644 --- a/packages/primitives/src/session-config.ts +++ b/packages/primitives/src/session-config.ts @@ -1,54 +1,101 @@ -import { Bytes } from 'ox' -import { encodeSessionPermissions, SessionPermissions } from './permission' +import { Address, Bytes } from 'ox' +import { + encodeSessionPermissions, + SessionPermissions, + sessionPermissionsFromParsed, + sessionPermissionsToJson, +} from './permission' import { minBytesFor } from './utils' -export const FLAG_PERMISSIONS = 0 -export const FLAG_NODE = 1 -export const FLAG_BRANCH = 2 +export const SESSIONS_FLAG_PERMISSIONS = 0 +export const SESSIONS_FLAG_NODE = 1 +export const SESSIONS_FLAG_BRANCH = 2 +export type SessionNode = Bytes.Bytes // Hashed export type SessionLeaf = SessionPermissions -export type SessionNode = [SessionsTopology, SessionsTopology] -export type SessionsTopology = SessionNode | SessionLeaf +export type SessionBranch = [SessionsTopology, SessionsTopology, ...SessionsTopology[]] +export type SessionsTopology = SessionBranch | SessionLeaf | SessionNode + +function isNode(topology: SessionsTopology): topology is SessionNode { + return Bytes.validate(topology) +} function isLeaf(topology: SessionsTopology): topology is SessionLeaf { return typeof topology === 'object' && 'signer' in topology } -function isNode(topology: SessionsTopology): topology is SessionNode { +function isBranch(topology: SessionsTopology): topology is SessionBranch { return Array.isArray(topology) && topology.length === 2 && isTopology(topology[0]!) && isTopology(topology[1]!) } function isTopology(topology: SessionsTopology): topology is SessionsTopology { - return isNode(topology) || isLeaf(topology) + return isBranch(topology) || isLeaf(topology) || isNode(topology) } export function encodeSessionsTopology(topolgy: SessionsTopology): Bytes.Bytes { - if (isNode(topolgy)) { - const encoded0 = encodeSessionsTopology(topolgy[0]!) - const encoded1 = encodeSessionsTopology(topolgy[1]!) - const isBranching = isNode(topolgy[1]!) - - if (isBranching) { - const encoded1Size = minBytesFor(BigInt(encoded1.length)) - if (encoded1Size > 15) { - throw new Error('Branch too large') - } - - const flag = (FLAG_BRANCH << 4) | encoded1Size - return Bytes.concat( - encoded0, - Bytes.fromNumber(flag), - Bytes.padLeft(Bytes.fromNumber(encoded1.length), encoded1Size), - encoded1, - ) + if (isBranch(topolgy)) { + const branch = topolgy as SessionBranch + const encodedBranches = [] + for (const node of branch) { + encodedBranches.push(encodeSessionsTopology(node)) } - - return Bytes.concat(Bytes.fromNumber(FLAG_NODE), encoded0, encoded1) + const encoded = Bytes.concat(...encodedBranches) + let encodedSize = minBytesFor(BigInt(encoded.length)) + if (encodedSize > 15) throw new Error('Branch too large') + const flagByte = (SESSIONS_FLAG_BRANCH << 4) | encodedSize + return Bytes.concat( + Bytes.fromNumber(flagByte), + Bytes.padLeft(Bytes.fromNumber(encoded.length), encodedSize), + encoded, + ) } if (isLeaf(topolgy)) { const encodedLeaf = encodeSessionPermissions(topolgy) - return Bytes.concat(Bytes.fromNumber(FLAG_PERMISSIONS), encodedLeaf) + return Bytes.concat(Bytes.fromNumber(SESSIONS_FLAG_PERMISSIONS), encodedLeaf) + } + + if (isNode(topolgy)) { + return Bytes.concat(Bytes.fromNumber(SESSIONS_FLAG_NODE), topolgy) + } + + throw new Error('Invalid topology') +} + +export function sessionsTopologyToJson(topology: SessionsTopology): string { + if (isNode(topology)) { + return Bytes.toHex(topology) + } + + if (isLeaf(topology)) { + return sessionPermissionsToJson(topology) + } + + if (isBranch(topology)) { + const branch = topology as SessionBranch + return `[${branch.map((node) => sessionsTopologyToJson(node)).join(',')}]` + } + + throw new Error('Invalid topology') +} + +export function sessionsTopologyFromJson(json: string): SessionsTopology { + const parsed = JSON.parse(json) + return sessionsTopologyFromParsed(parsed) +} + +function sessionsTopologyFromParsed(parsed: any): SessionsTopology { + if (isNode(parsed)) { + return parsed + } + + if (isLeaf(parsed)) { + return sessionPermissionsFromParsed(parsed) + } + + if (isBranch(parsed)) { + const branches = parsed.map((node: SessionsTopology) => sessionsTopologyFromParsed(node)) + return branches as SessionBranch } throw new Error('Invalid topology') diff --git a/packages/primitives/src/session-signature.ts b/packages/primitives/src/session-signature.ts index 2b6b635a6..e290b4f9d 100644 --- a/packages/primitives/src/session-signature.ts +++ b/packages/primitives/src/session-signature.ts @@ -3,10 +3,6 @@ import { Attestation, encodeAttestation } from './attestation' import { encodeSessionsTopology, SessionsTopology } from './session-config' import { packRSV } from './utils' -export const FLAG_PERMISSIONS = 0 -export const FLAG_NODE = 1 -export const FLAG_BRANCH = 2 - export type SessionManagerSignature = { attestation: Attestation sessionsTopology: SessionsTopology From db2a21b932a462eb92bfc082cfcfb61a7563b963 Mon Sep 17 00:00:00 2001 From: William Hua Date: Mon, 3 Feb 2025 07:59:09 -0500 Subject: [PATCH 080/439] primitives: unused import --- packages/primitives/src/signature.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/packages/primitives/src/signature.ts b/packages/primitives/src/signature.ts index 36c7b92ec..71b8f0cf0 100644 --- a/packages/primitives/src/signature.ts +++ b/packages/primitives/src/signature.ts @@ -1,6 +1,5 @@ import { Address, Bytes } from 'ox' import { - Configuration, Leaf, NestedLeaf, SapientSignerLeaf, From ed2ab6a1b01ef9b753af70d61121efbff1b27373 Mon Sep 17 00:00:00 2001 From: William Hua Date: Mon, 3 Feb 2025 07:59:44 -0500 Subject: [PATCH 081/439] primitives: chained signature subsignature -> chained subsignature --- packages/primitives/src/signature.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/primitives/src/signature.ts b/packages/primitives/src/signature.ts index 71b8f0cf0..2c4d81d14 100644 --- a/packages/primitives/src/signature.ts +++ b/packages/primitives/src/signature.ts @@ -169,19 +169,19 @@ export function decodeSignature(signature: Bytes.Bytes): RawSignature { while (index < signature.length) { if (index + 3 > signature.length) { - throw new Error('Not enough bytes for chained signature subsignature size') + throw new Error('Not enough bytes for chained subsignature size') } const subsignatureSize = Bytes.toNumber(signature.subarray(index, index + 3)) index += 3 if (index + subsignatureSize > signature.length) { - throw new Error('Not enough bytes for chained signature subsignature') + throw new Error('Not enough bytes for chained subsignature') } const subsignature = decodeSignature(signature.subarray(index, index + subsignatureSize)) index += subsignatureSize if (subsignature.checkpointerData) { - throw new Error('Chained signature subsignature has checkpointer data') + throw new Error('Chained subsignature has checkpointer data') } subsignatures.push({ ...subsignature, checkpointerData: undefined }) From ad0d4d8a5074b28cf84342c3c868f39207511472 Mon Sep 17 00:00:00 2001 From: William Hua Date: Mon, 3 Feb 2025 08:00:38 -0500 Subject: [PATCH 082/439] primitives: export erc6492 --- packages/primitives/src/index.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/primitives/src/index.ts b/packages/primitives/src/index.ts index 4ed41a9eb..79bbe42e6 100644 --- a/packages/primitives/src/index.ts +++ b/packages/primitives/src/index.ts @@ -1,5 +1,6 @@ export * from './address' export * from './config' +export * from './erc-6492' export * from './payload' export * from './permission' export * from './session-config' From 0629bd7defb8f52c6785070dc486b0d0e01f0430 Mon Sep 17 00:00:00 2001 From: William Hua Date: Mon, 3 Feb 2025 08:05:26 -0500 Subject: [PATCH 083/439] primitives: constants --- packages/primitives/src/address.ts | 7 ++----- packages/primitives/src/constants.ts | 6 ++++++ packages/primitives/src/index.ts | 1 + 3 files changed, 9 insertions(+), 5 deletions(-) create mode 100644 packages/primitives/src/constants.ts diff --git a/packages/primitives/src/address.ts b/packages/primitives/src/address.ts index 86d172309..a63e2aebd 100644 --- a/packages/primitives/src/address.ts +++ b/packages/primitives/src/address.ts @@ -1,9 +1,6 @@ -import { Address, Bytes, Hash, Hex } from 'ox' +import { Address, Bytes, Hash } from 'ox' import { Configuration, hashConfiguration } from './config' - -const FACTORY: Address.Address = '0x' -const MAIN_MODULE: Address.Address = '0x' -const CREATION_CODE: Hex.Hex = '0x' +import { CREATION_CODE, FACTORY, MAIN_MODULE } from './constants' export function getCounterfactualAddress(configuration: Bytes.Bytes | Configuration): Address.Address { const imageHash = configuration instanceof Uint8Array ? configuration : hashConfiguration(configuration) diff --git a/packages/primitives/src/constants.ts b/packages/primitives/src/constants.ts new file mode 100644 index 000000000..d7ff90050 --- /dev/null +++ b/packages/primitives/src/constants.ts @@ -0,0 +1,6 @@ +import { Address, Hex } from 'ox' + +export const FACTORY: Address.Address = '0xTODO' +export const MAIN_MODULE: Address.Address = '0xTODO' + +export const CREATION_CODE: Hex.Hex = '0xTODO' diff --git a/packages/primitives/src/index.ts b/packages/primitives/src/index.ts index 79bbe42e6..466eee6b7 100644 --- a/packages/primitives/src/index.ts +++ b/packages/primitives/src/index.ts @@ -1,5 +1,6 @@ export * from './address' export * from './config' +export * from './constants' export * from './erc-6492' export * from './payload' export * from './permission' From 45922276ee39e864c1036ae020db398885b3de53 Mon Sep 17 00:00:00 2001 From: William Hua Date: Mon, 3 Feb 2025 08:08:23 -0500 Subject: [PATCH 084/439] primitives: erc6492Deploy --- packages/primitives/src/constants.ts | 2 ++ packages/primitives/src/erc-6492.ts | 17 ++++++++++++++--- 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/packages/primitives/src/constants.ts b/packages/primitives/src/constants.ts index d7ff90050..59b30dc41 100644 --- a/packages/primitives/src/constants.ts +++ b/packages/primitives/src/constants.ts @@ -3,4 +3,6 @@ import { Address, Hex } from 'ox' export const FACTORY: Address.Address = '0xTODO' export const MAIN_MODULE: Address.Address = '0xTODO' +export const DEPLOY = 'function deploy(address _mainModule, bytes32 _salt) public payable returns (address _contract)' + export const CREATION_CODE: Hex.Hex = '0xTODO' diff --git a/packages/primitives/src/erc-6492.ts b/packages/primitives/src/erc-6492.ts index 0c5d5e923..522d37996 100644 --- a/packages/primitives/src/erc-6492.ts +++ b/packages/primitives/src/erc-6492.ts @@ -1,10 +1,21 @@ -import { AbiParameters, Address, Bytes, Hex } from 'ox' +import { AbiFunction, AbiParameters, Address, Bytes, Hex } from 'ox' import { WrappedSignature } from 'ox/erc6492' +import { DEPLOY, MAIN_MODULE } from './constants' + +export function erc6492Deploy(deployHash: T): { to: Address.Address; data: T } { + const encoded = AbiFunction.encodeData(AbiFunction.from(DEPLOY), [MAIN_MODULE, Hex.from(deployHash)]) + + switch (typeof deployHash) { + case 'object': + return { to: MAIN_MODULE, data: Hex.toBytes(encoded) as T } + case 'string': + return { to: MAIN_MODULE, data: encoded as T } + } +} export function erc6492( signature: T, - to: Address.Address, - data: Bytes.Bytes | Hex.Hex, + { to, data }: { to: Address.Address; data: Bytes.Bytes | Hex.Hex }, ): T { const encoded = Hex.concat( AbiParameters.encode( From 1356ee478184d230dc67938037b5d045e5646acf Mon Sep 17 00:00:00 2001 From: William Hua Date: Mon, 3 Feb 2025 08:09:49 -0500 Subject: [PATCH 085/439] core: encode signature from signer signatures --- packages/core/src/wallet.ts | 89 +++++++++++++++++++++++++++++++++++-- 1 file changed, 86 insertions(+), 3 deletions(-) diff --git a/packages/core/src/wallet.ts b/packages/core/src/wallet.ts index 08b26de22..71e3477a3 100644 --- a/packages/core/src/wallet.ts +++ b/packages/core/src/wallet.ts @@ -1,13 +1,20 @@ import { Configuration, + decodeSignature, + encodeSignature, + erc6492, + erc6492Deploy, + fillLeaves, fromConfigUpdate, getCounterfactualAddress, getSigners, getWeight, hashConfiguration, + isSignerLeaf, Payload, + RawSignature, } from '@0xsequence/sequence-primitives' -import { Address, Bytes, Hex, Provider } from 'ox' +import { Address, Bytes, Hex, Provider, Signature as oxSignature } from 'ox' import { CancelCallback, Signature, Signer, SignerSignatureCallback } from './signer' import { Sessions, StateReader, StateWriter } from './state' @@ -41,7 +48,7 @@ export class Wallet { provider?: Provider.Provider, options?: { trustSigners?: boolean; onSignerError?: (signer: Address.Address, error: any) => void }, ): Promise { - const signatures: Hex.Hex[] = [] + const signatures: Array = [] let chainId: bigint let isDeployed: boolean @@ -64,7 +71,16 @@ export class Wallet { } const path = await this.stateProvider.getConfigurationPath(this.address, imageHash) - signatures.push(...path.map(({ signature }) => signature)) + + signatures.push( + ...path.map(({ signature }) => { + const decoded = decodeSignature(Hex.toBytes(signature)) + if (decoded.checkpointerData) { + throw new Error('chained subsignature has checkpointer data') + } + return { ...decoded, checkpointerData: undefined } + }), + ) } else { chainId = 0n isDeployed = true @@ -154,5 +170,72 @@ export class Wallet { } } }) + + const signature = encodeSignature({ + noChainId: !chainId, + configuration: { + ...configuration, + topology: fillLeaves(configuration.topology, (leaf) => { + const signerSignature = signerSignatures.get(leaf.address) + if (!signerSignature) { + return + } + + if (isSignerLeaf(leaf)) { + switch (signerSignature.type) { + case 'hash': { + const { r, s, yParity } = oxSignature.fromHex(signerSignature.signature) + return { + type: 'hash', + r: Bytes.fromNumber(r), + s: Bytes.fromNumber(s), + v: oxSignature.yParityToV(yParity), + } + } + + case 'eth_sign': { + const { r, s, yParity } = oxSignature.fromHex(signerSignature.signature) + return { + type: 'eth_sign', + r: Bytes.fromNumber(r), + s: Bytes.fromNumber(s), + v: oxSignature.yParityToV(yParity), + } + } + + case 'erc-1271': { + return { type: 'erc1271', address: leaf.address, data: Hex.toBytes(signerSignature.signature) } + } + + case 'sapient': + case 'sapient-compact': { + throw new Error(`signature is ${signerSignature.type}, but ${leaf.address} is not a sapient signer`) + } + } + } else { + switch (signerSignature.type) { + case 'hash': + case 'eth_sign': + case 'erc-1271': { + throw new Error( + `expected ${leaf.address} to be a sapient signer, but signature is ${signerSignature.type}`, + ) + } + + case 'sapient': { + return { type: 'sapient', address: leaf.address, data: Hex.toBytes(signerSignature.signature) } + } + + case 'sapient-compact': { + return { type: 'sapient_compact', address: leaf.address, data: Hex.toBytes(signerSignature.signature) } + } + } + } + }), + }, + suffix: signatures.reverse(), + }) + + return isDeployed ? signature : erc6492(signature, erc6492Deploy(imageHash)) } } From f8e1af64bdee283044065aac6f53416109f91406 Mon Sep 17 00:00:00 2001 From: William Hua Date: Mon, 3 Feb 2025 15:42:19 -0500 Subject: [PATCH 086/439] core: memory store --- packages/core/src/state/memory.ts | 90 +++++++++++++++++++++++++++++++ 1 file changed, 90 insertions(+) create mode 100644 packages/core/src/state/memory.ts diff --git a/packages/core/src/state/memory.ts b/packages/core/src/state/memory.ts new file mode 100644 index 000000000..d403daab6 --- /dev/null +++ b/packages/core/src/state/memory.ts @@ -0,0 +1,90 @@ +import { + Configuration, + getCounterfactualAddress, + hash, + hashConfiguration, + Payload, +} from '@0xsequence/sequence-primitives' +import { Address, Bytes, Hex } from 'ox' +import { Signature, StateReader, StateWriter } from '.' + +export class MemoryStore implements StateReader, StateWriter { + private readonly objects: { + configurations: { [imageHash: Hex.Hex]: Configuration } + deployHashes: { [wallet: Address.Address]: Hex.Hex } + wallets: { + [signer: Address.Address]: { + [wallet: Address.Address]: { chainId: bigint; digest: Hex.Hex; signature: Signature } + } + } + } = { configurations: {}, deployHashes: {}, wallets: {} } + + getConfiguration(imageHash: Hex.Hex): Configuration { + const configuration = this.objects.configurations[imageHash] + if (!configuration) { + throw new Error(`no configuration ${imageHash}`) + } + return configuration + } + + getDeployHash(wallet: Address.Address): Hex.Hex { + const deployHash = this.objects.deployHashes[wallet] + if (!deployHash) { + throw new Error(`no deploy hash for wallet ${wallet}`) + } + return deployHash + } + + getWallets( + signer: Address.Address, + ): Array<{ wallet: Address.Address; chainId: bigint; digest: Hex.Hex; signature: Signature }> { + const wallets = this.objects.wallets[signer] + if (!wallets) { + throw new Error(`no wallets for signer ${signer}`) + } + return Object.entries(wallets).map(([wallet, signature]) => { + Address.assert(wallet) + return { wallet, ...signature } + }) + } + + getConfigurationPath( + wallet: Address.Address, + fromImageHash: Hex.Hex, + options?: { allUpdates?: boolean }, + ): Array<{ imageHash: Hex.Hex; signature: Hex.Hex }> {} + + saveWallet(deployConfiguration: Configuration): void { + const deployHash = hashConfiguration(deployConfiguration) + const wallet = getCounterfactualAddress(deployHash) + this.objects.configurations[Bytes.toHex(deployHash)] = deployConfiguration + this.objects.deployHashes[wallet] = Bytes.toHex(deployHash) + } + + saveWitness( + signer: Address.Address, + wallet: Address.Address, + chainId: bigint, + payload: Payload, + signature: Signature, + ): void { + if (signature.type === 'erc-1271' && signature.validAt.block === undefined) { + throw new Error('memory store requires block number where erc-1271 signature is valid') + } + let wallets = this.objects.wallets[signer] + if (!wallets) { + wallets = {} + this.objects.wallets[signer] = wallets + } + if (wallets[wallet]) { + return + } + wallets[wallet] = { + chainId, + digest: Bytes.toHex(hash(wallet, chainId, payload)), + signature: signature as Signature, + } + } + + setConfiguration(wallet: Address.Address, configuration: Configuration, signature: Hex.Hex): void {} +} From b721993402a6b8a725e70b0dff26d0f1a32b134f Mon Sep 17 00:00:00 2001 From: William Hua Date: Tue, 4 Feb 2025 10:57:17 -0500 Subject: [PATCH 087/439] core: memory store configuration paths --- packages/core/src/state/memory.ts | 74 +++++++++++++++++++++++++++++-- 1 file changed, 71 insertions(+), 3 deletions(-) diff --git a/packages/core/src/state/memory.ts b/packages/core/src/state/memory.ts index d403daab6..8552b1db4 100644 --- a/packages/core/src/state/memory.ts +++ b/packages/core/src/state/memory.ts @@ -17,7 +17,13 @@ export class MemoryStore implements StateReader, StateWriter { [wallet: Address.Address]: { chainId: bigint; digest: Hex.Hex; signature: Signature } } } - } = { configurations: {}, deployHashes: {}, wallets: {} } + configurationPaths: { + [wallet: Address.Address]: { + updates: Array<{ imageHash: Hex.Hex; signature: Hex.Hex }> + index: { [imageHash: Hex.Hex]: number } + } + } + } = { configurations: {}, deployHashes: {}, wallets: {}, configurationPaths: {} } getConfiguration(imageHash: Hex.Hex): Configuration { const configuration = this.objects.configurations[imageHash] @@ -52,13 +58,46 @@ export class MemoryStore implements StateReader, StateWriter { wallet: Address.Address, fromImageHash: Hex.Hex, options?: { allUpdates?: boolean }, - ): Array<{ imageHash: Hex.Hex; signature: Hex.Hex }> {} + ): Array<{ imageHash: Hex.Hex; signature: Hex.Hex }> { + const configurationPath = this.objects.configurationPaths[wallet] + if (!configurationPath) { + throw new Error(`no configuration path for wallet ${wallet}`) + } + + let index = configurationPath.index[fromImageHash] + if (index === undefined) { + throw new Error(`no configuration path for wallet ${wallet} from ${fromImageHash}`) + } + + if (options?.allUpdates) { + return configurationPath.updates.slice(index + 1) + } + + const updates: Array<{ imageHash: Hex.Hex; signature: Hex.Hex }> = [] + while (index + 1 < configurationPath.updates.length) { + for (let next = configurationPath.updates.length - 1; next > index; next--) { + if (true) { + updates.push(configurationPath.updates[next]!) + index = next + break + } + } + } + return updates + } saveWallet(deployConfiguration: Configuration): void { const deployHash = hashConfiguration(deployConfiguration) const wallet = getCounterfactualAddress(deployHash) this.objects.configurations[Bytes.toHex(deployHash)] = deployConfiguration this.objects.deployHashes[wallet] = Bytes.toHex(deployHash) + + let configurationPath = this.objects.configurationPaths[wallet] + if (!configurationPath) { + configurationPath = { updates: [], index: {} } + this.objects.configurationPaths[wallet] = configurationPath + } + configurationPath.index[Bytes.toHex(deployHash)] = -1 } saveWitness( @@ -86,5 +125,34 @@ export class MemoryStore implements StateReader, StateWriter { } } - setConfiguration(wallet: Address.Address, configuration: Configuration, signature: Hex.Hex): void {} + setConfiguration(wallet: Address.Address, configuration: Configuration, signature: Hex.Hex): void { + const configurationPath = this.objects.configurationPaths[wallet] + if (!configurationPath) { + throw new Error(`no configuration path for wallet ${wallet}`) + } + + let latestImageHash: Hex.Hex + if (configurationPath.updates.length) { + latestImageHash = configurationPath.updates[configurationPath.updates.length - 1]!.imageHash + } else { + const deployHash = this.objects.deployHashes[wallet] + if (!deployHash) { + throw new Error(`no deploy hash for wallet ${wallet}`) + } + latestImageHash = deployHash + } + + const latestConfiguration = this.objects.configurations[latestImageHash] + if (!latestConfiguration) { + throw new Error(`no configuration ${latestImageHash}`) + } + + if (configuration.checkpoint <= latestConfiguration.checkpoint) { + throw new Error( + `configuration checkpoint ${configuration.checkpoint} <= latest checkpoint ${latestConfiguration.checkpoint}`, + ) + } + + configurationPath.updates.push({ imageHash: Bytes.toHex(hashConfiguration(configuration)), signature }) + } } From 47863b7e6dbf63d25f45c8d02ca404daa1b1d562 Mon Sep 17 00:00:00 2001 From: William Hua Date: Tue, 4 Feb 2025 13:39:55 -0500 Subject: [PATCH 088/439] primitives: isRawSignature, isRawConfiguration --- packages/primitives/src/signature.ts | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/packages/primitives/src/signature.ts b/packages/primitives/src/signature.ts index 2c4d81d14..31ebf3630 100644 --- a/packages/primitives/src/signature.ts +++ b/packages/primitives/src/signature.ts @@ -90,6 +90,32 @@ export type RawSignature = { suffix?: Array } +export function isRawSignature(signature: any): signature is RawSignature { + return ( + typeof signature === 'object' && + signature && + typeof signature.noChainId === 'boolean' && + (signature.checkpointerData === undefined || Bytes.validate(signature.checkpointerData)) && + isRawConfiguration(signature.configuration) && + (signature.suffix === undefined || + (Array.isArray(signature.suffix) && + signature.suffix.every( + (signature: any) => isRawSignature(signature) && signature.checkpointerData === undefined, + ))) + ) +} + +export function isRawConfiguration(configuration: any): configuration is RawConfiguration { + return ( + typeof configuration === 'object' && + configuration && + typeof configuration.threshold === 'bigint' && + typeof configuration.checkpoint === 'bigint' && + isRawTopology(configuration.topology) && + (configuration.checkpointer === undefined || Address.validate(configuration.checkpointer)) + ) +} + export function isRawSignerLeaf(cand: any): cand is RawSignerLeaf { return typeof cand === 'object' && 'weight' in cand && 'signature' in cand } From c7786a7c1bbc876916f8cb1326ff472a23891205 Mon Sep 17 00:00:00 2001 From: Agusx1211 Date: Wed, 5 Feb 2025 00:55:34 +0000 Subject: [PATCH 089/439] Add checkpointer option rand config --- .../src/subcommands/devTools.ts | 21 +++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/packages/primitives-cli/src/subcommands/devTools.ts b/packages/primitives-cli/src/subcommands/devTools.ts index 1d0c05917..5f3dd5c0d 100644 --- a/packages/primitives-cli/src/subcommands/devTools.ts +++ b/packages/primitives-cli/src/subcommands/devTools.ts @@ -15,6 +15,7 @@ interface RandomOptions { minThresholdOnNested?: number maxPermissions?: number maxRules?: number + checkpointerMode?: 'no' | 'random' | 'yes' } function createSeededRandom(seed: string) { @@ -106,8 +107,17 @@ async function generateRandomConfig(maxDepth: number, options?: RandomOptions): threshold: randomBigInt(100n, options), checkpoint: randomBigInt(1000n, options), topology: generateRandomTopology(maxDepth, options), - checkpointer: - (options?.seededRandom ? options.seededRandom() : Math.random()) > 0.5 ? randomAddress(options) : undefined, + checkpointer: (() => { + switch (options?.checkpointerMode) { + case 'yes': + return randomAddress(options) + case 'random': + return (options?.seededRandom?.() ?? Math.random()) > 0.5 ? randomAddress(options) : undefined + case 'no': + default: + return undefined + } + })(), } console.log(configToJson(config)) @@ -172,11 +182,18 @@ const command: CommandModule = { description: 'Minimum threshold value for nested leaves', default: 0, }) + .option('checkpointer', { + type: 'string', + choices: ['no', 'random', 'yes'], + description: 'Checkpointer mode: no (never add), random (50% chance), yes (always add)', + default: 'no', + }) }, async (argv) => { const options: RandomOptions = { seededRandom: argv.seed ? createSeededRandom(argv.seed) : undefined, minThresholdOnNested: argv.minThresholdOnNested as number, + checkpointerMode: argv.checkpointer as 'no' | 'random' | 'yes', } await generateRandomConfig(argv.maxDepth as number, options) }, From 6d17fefa3b8d604cbe9515572cd9ba702a88e03d Mon Sep 17 00:00:00 2001 From: Agusx1211 Date: Wed, 5 Feb 2025 00:55:46 +0000 Subject: [PATCH 090/439] Signature json decode and encode --- .../src/subcommands/signature.ts | 48 ++++ packages/primitives/src/signature.ts | 209 +++++++++++++++++- 2 files changed, 256 insertions(+), 1 deletion(-) diff --git a/packages/primitives-cli/src/subcommands/signature.ts b/packages/primitives-cli/src/subcommands/signature.ts index fc424a825..0fe7f14a0 100644 --- a/packages/primitives-cli/src/subcommands/signature.ts +++ b/packages/primitives-cli/src/subcommands/signature.ts @@ -2,10 +2,13 @@ import { boolean, type CommandModule } from 'yargs' import { fromPosOrStdin } from '../utils' import { configFromJson, + configToJson, + decodeSignature, encodeSignature, fillLeaves, isSapientSignerLeaf, isSignerLeaf, + rawSignatureToJson, } from '@0xsequence/sequence-primitives' import { PossibleElements } from './config' import { Bytes, Hex } from 'ox' @@ -121,6 +124,19 @@ async function doEncode(input: string, signatures: string[] = [], noChainId: boo console.log(Hex.fromBytes(encoded)) } +async function doConcat(signatures: string[]): Promise { + throw new Error('Not implemented') + // const encoded = signatures.map((s) => Hex.fromHex(s)).map((s) => s.toBytes()) + // const concatenated = Bytes.concat(...encoded) + // console.log(Hex.fromBytes(concatenated)) +} + +async function doDecode(signature: string): Promise { + const bytes = Bytes.fromHex(signature as `0x${string}`) + const decoded = decodeSignature(bytes) + console.log(rawSignatureToJson(decoded)) +} + const signatureCommand: CommandModule = { command: 'signature', describe: 'Signature utilities', @@ -156,6 +172,38 @@ const signatureCommand: CommandModule = { await doEncode(input, argv.signature, !argv.chainId) }, ) + .command( + 'concat [signatures...]', + 'Concatenate multiple signatures', + (yargs) => { + return yargs + .positional('signatures', { + type: 'string', + array: true, + description: 'Hex signatures to concatenate', + demandOption: true + }) + }, + async (argv) => { + await doConcat(argv.signatures) + } + ) + .command( + 'decode [signature]', + 'Decode a signature from bytes', + (yargs) => { + return yargs + .positional('signature', { + type: 'string', + description: 'Hex signature to decode', + demandOption: true + }) + }, + async (argv) => { + const input = await fromPosOrStdin(argv, 'signature') + await doDecode(input) + } + ) .demandCommand(1, 'You must specify a subcommand for signature') }, handler: () => {}, diff --git a/packages/primitives/src/signature.ts b/packages/primitives/src/signature.ts index 31ebf3630..b64ee8eba 100644 --- a/packages/primitives/src/signature.ts +++ b/packages/primitives/src/signature.ts @@ -572,7 +572,6 @@ export function encodeSignature(signature: RawSignature): Uint8Array { } const checkpointerDataSizeBytes = Bytes.padLeft(Bytes.fromNumber(checkpointerDataSize), 3) - output = Bytes.concat(output, checkpointerDataSizeBytes, checkpointerData ?? Bytes.fromArray([])) } @@ -794,3 +793,211 @@ function foldNodes(nodes: RawTopology[]): RawTopology { } return tree } + +export function rawSignatureToJson(signature: RawSignature): string { + return JSON.stringify(rawSignatureToJsonParsed(signature)) +} + +function rawSignatureToJsonParsed(signature: RawSignature): any { + return { + noChainId: signature.noChainId, + checkpointerData: signature.checkpointerData + ? Bytes.toHex(signature.checkpointerData) + : undefined, + configuration: { + threshold: signature.configuration.threshold.toString(), + checkpoint: signature.configuration.checkpoint.toString(), + topology: rawTopologyToJson(signature.configuration.topology), + checkpointer: signature.configuration.checkpointer, + }, + suffix: signature.suffix + ? signature.suffix.map((sig) => rawSignatureToJsonParsed(sig)) + : undefined, + } +} + +function rawTopologyToJson(top: RawTopology): any { + if (Array.isArray(top)) { + return [rawTopologyToJson(top[0]), rawTopologyToJson(top[1])] + } + if (typeof top === 'object' && top !== null) { + if ('type' in top) { + switch (top.type) { + case 'signer': + return { + type: 'signer', + address: top.address, + weight: top.weight.toString(), + } + case 'sapient-signer': + return { + type: 'sapient-signer', + address: top.address, + weight: top.weight.toString(), + imageHash: Bytes.toHex(Bytes.padLeft(top.imageHash, 32)), + } + case 'subdigest': + return { + type: 'subdigest', + digest: Bytes.toHex(top.digest), + } + case 'nested': + return { + type: 'nested', + tree: rawTopologyToJson(top.tree), + weight: top.weight.toString(), + threshold: top.threshold.toString(), + } + case 'unrecovered-signer': + return { + type: 'unrecovered-signer', + weight: top.weight.toString(), + signature: rawSignatureOfLeafToJson(top.signature), + } + default: + throw new Error('Invalid raw topology type') + } + } + } + if (top instanceof Uint8Array) { + return Bytes.toHex(top) + } + if (typeof top === 'string') { + return top + } + throw new Error('Invalid raw topology format') +} + +function rawSignatureOfLeafToJson( + sig: SignatureOfSignerLeaf | SignatureOfSapientSignerLeaf +): any { + if (sig.type === 'eth_sign' || sig.type === 'hash') { + return { + type: sig.type, + r: Bytes.toHex(sig.r), + s: Bytes.toHex(sig.s), + v: sig.v, + } + } + if (sig.type === 'erc1271') { + return { + type: sig.type, + address: sig.address, + data: Bytes.toHex(sig.data), + } + } + if (sig.type === 'sapient' || sig.type === 'sapient_compact') { + return { + type: sig.type, + address: sig.address, + data: Bytes.toHex(sig.data), + } + } + throw new Error('Unknown signature type in raw signature') +} + +// Re-create a RawSignature from its JSON string representation. +export function rawSignatureFromJson(json: string): RawSignature { + const parsed = JSON.parse(json) + return rawSignatureFromParsed(parsed) +} + +function rawSignatureFromParsed(parsed: any): RawSignature { + return { + noChainId: parsed.noChainId, + checkpointerData: parsed.checkpointerData + ? Bytes.fromHex(parsed.checkpointerData) + : undefined, + configuration: { + threshold: BigInt(parsed.configuration.threshold), + checkpoint: BigInt(parsed.configuration.checkpoint), + topology: rawTopologyFromJson(parsed.configuration.topology), + checkpointer: parsed.configuration.checkpointer, + }, + suffix: parsed.suffix + ? parsed.suffix.map((sig: any) => rawSignatureFromParsed(sig)) + : undefined, + } +} + +function rawTopologyFromJson(obj: any): RawTopology { + if (Array.isArray(obj)) { + if (obj.length !== 2) { + throw new Error('Invalid raw topology node') + } + return [rawTopologyFromJson(obj[0]), rawTopologyFromJson(obj[1])] + } + if (typeof obj === 'object' && obj !== null) { + if ('type' in obj) { + switch (obj.type) { + case 'signer': + return { + type: 'signer', + address: obj.address, + weight: BigInt(obj.weight), + } + case 'sapient-signer': + return { + type: 'sapient-signer', + address: obj.address, + weight: BigInt(obj.weight), + imageHash: Bytes.fromHex(obj.imageHash), + } + case 'subdigest': + return { + type: 'subdigest', + digest: Bytes.fromHex(obj.digest), + } + case 'nested': + return { + type: 'nested', + tree: rawTopologyFromJson(obj.tree), + weight: BigInt(obj.weight), + threshold: BigInt(obj.threshold), + } + case 'unrecovered-signer': + return { + type: 'unrecovered-signer', + weight: BigInt(obj.weight), + signature: rawSignatureOfLeafFromJson(obj.signature), + } + default: + throw new Error('Invalid raw topology type') + } + } + } + if (typeof obj === 'string') { + return Bytes.fromHex(obj as `0x${string}`) + } + throw new Error('Invalid raw topology format') +} + +function rawSignatureOfLeafFromJson( + obj: any +): SignatureOfSignerLeaf | SignatureOfSapientSignerLeaf { + switch (obj.type) { + case 'eth_sign': + case 'hash': + return { + type: obj.type, + r: Bytes.fromHex(obj.r), + s: Bytes.fromHex(obj.s), + v: obj.v, + } + case 'erc1271': + return { + type: 'erc1271', + address: obj.address, + data: Bytes.fromHex(obj.data), + } + case 'sapient': + case 'sapient_compact': + return { + type: obj.type, + address: obj.address, + data: Bytes.fromHex(obj.data), + } + default: + throw new Error('Invalid signature type in raw signature') + } +} From 2a8e810cd9564c60ef31e358cb20f7b05317e357 Mon Sep 17 00:00:00 2001 From: Michael Standen Date: Wed, 5 Feb 2025 14:45:32 +1300 Subject: [PATCH 091/439] Updating name --- packages/primitives-cli/src/subcommands/session.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/primitives-cli/src/subcommands/session.ts b/packages/primitives-cli/src/subcommands/session.ts index acfe5974f..e2f6d4dd1 100644 --- a/packages/primitives-cli/src/subcommands/session.ts +++ b/packages/primitives-cli/src/subcommands/session.ts @@ -15,7 +15,7 @@ const sessionCommand: CommandModule = { builder: (yargs) => { return yargs .command( - 'to-packed [session-topology]', + 'to-packed-topology [session-topology]', 'Convert session topology to packed format', (yargs) => { return yargs.positional('session-topology', { From 13689ea087cd9b40f4cd3f148984a4565f38a5cb Mon Sep 17 00:00:00 2001 From: Shun Kakinoki Date: Wed, 5 Feb 2025 22:00:19 +0900 Subject: [PATCH 092/439] feat: ini alternative esbuild npm script for faster builds --- packages/primitives-cli/package.json | 7 +- pnpm-lock.yaml | 455 ++++++++++++++++++++++++++- 2 files changed, 447 insertions(+), 15 deletions(-) diff --git a/packages/primitives-cli/package.json b/packages/primitives-cli/package.json index f5f4243de..7eddc2cdd 100644 --- a/packages/primitives-cli/package.json +++ b/packages/primitives-cli/package.json @@ -2,7 +2,9 @@ "name": "@0xsequence/sequence-primitives-cli", "scripts": { "build": "tsc", + "build:esbuild": "esbuild src/index.ts --bundle --platform=node --target=node16 --outfile=dist/index.js", "dev": "tsc --watch", + "dev:esbuild": "esbuild src/index.ts --bundle --platform=node --target=node16 --outfile=dist/index.js --watch --sourcemap", "start": "tsc && node dist/index.js", "lint": "eslint . --max-warnings 0" }, @@ -17,6 +19,9 @@ "@repo/typescript-config": "workspace:^", "@types/node": "^22.10.9", "@types/yargs": "^17.0.33", + "concurrently": "^8.2.2", + "esbuild": "^0.24.2", + "nodemon": "^3.1.0", "typescript": "^5.7.3" }, "dependencies": { @@ -24,4 +29,4 @@ "ox": "^0.6.7", "yargs": "^17.7.2" } -} \ No newline at end of file +} diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 638eecba9..21a5e3b56 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -181,6 +181,15 @@ importers: '@types/yargs': specifier: ^17.0.33 version: 17.0.33 + concurrently: + specifier: ^8.2.2 + version: 8.2.2 + esbuild: + specifier: ^0.24.2 + version: 0.24.2 + nodemon: + specifier: ^3.1.0 + version: 3.1.9 typescript: specifier: ^5.7.3 version: 5.7.3 @@ -306,6 +315,156 @@ packages: '@emnapi/runtime@1.3.1': resolution: {integrity: sha512-kEBmG8KyqtxJZv+ygbEim+KCGtIq1fC22Ms3S4ziXmYKm8uyoLX0MHONVKwp+9opg390VaKRNt4a7A9NwmpNhw==} + '@esbuild/aix-ppc64@0.24.2': + resolution: {integrity: sha512-thpVCb/rhxE/BnMLQ7GReQLLN8q9qbHmI55F4489/ByVg2aQaQ6kbcLb6FHkocZzQhxc4gx0sCk0tJkKBFzDhA==} + engines: {node: '>=18'} + cpu: [ppc64] + os: [aix] + + '@esbuild/android-arm64@0.24.2': + resolution: {integrity: sha512-cNLgeqCqV8WxfcTIOeL4OAtSmL8JjcN6m09XIgro1Wi7cF4t/THaWEa7eL5CMoMBdjoHOTh/vwTO/o2TRXIyzg==} + engines: {node: '>=18'} + cpu: [arm64] + os: [android] + + '@esbuild/android-arm@0.24.2': + resolution: {integrity: sha512-tmwl4hJkCfNHwFB3nBa8z1Uy3ypZpxqxfTQOcHX+xRByyYgunVbZ9MzUUfb0RxaHIMnbHagwAxuTL+tnNM+1/Q==} + engines: {node: '>=18'} + cpu: [arm] + os: [android] + + '@esbuild/android-x64@0.24.2': + resolution: {integrity: sha512-B6Q0YQDqMx9D7rvIcsXfmJfvUYLoP722bgfBlO5cGvNVb5V/+Y7nhBE3mHV9OpxBf4eAS2S68KZztiPaWq4XYw==} + engines: {node: '>=18'} + cpu: [x64] + os: [android] + + '@esbuild/darwin-arm64@0.24.2': + resolution: {integrity: sha512-kj3AnYWc+CekmZnS5IPu9D+HWtUI49hbnyqk0FLEJDbzCIQt7hg7ucF1SQAilhtYpIujfaHr6O0UHlzzSPdOeA==} + engines: {node: '>=18'} + cpu: [arm64] + os: [darwin] + + '@esbuild/darwin-x64@0.24.2': + resolution: {integrity: sha512-WeSrmwwHaPkNR5H3yYfowhZcbriGqooyu3zI/3GGpF8AyUdsrrP0X6KumITGA9WOyiJavnGZUwPGvxvwfWPHIA==} + engines: {node: '>=18'} + cpu: [x64] + os: [darwin] + + '@esbuild/freebsd-arm64@0.24.2': + resolution: {integrity: sha512-UN8HXjtJ0k/Mj6a9+5u6+2eZ2ERD7Edt1Q9IZiB5UZAIdPnVKDoG7mdTVGhHJIeEml60JteamR3qhsr1r8gXvg==} + engines: {node: '>=18'} + cpu: [arm64] + os: [freebsd] + + '@esbuild/freebsd-x64@0.24.2': + resolution: {integrity: sha512-TvW7wE/89PYW+IevEJXZ5sF6gJRDY/14hyIGFXdIucxCsbRmLUcjseQu1SyTko+2idmCw94TgyaEZi9HUSOe3Q==} + engines: {node: '>=18'} + cpu: [x64] + os: [freebsd] + + '@esbuild/linux-arm64@0.24.2': + resolution: {integrity: sha512-7HnAD6074BW43YvvUmE/35Id9/NB7BeX5EoNkK9obndmZBUk8xmJJeU7DwmUeN7tkysslb2eSl6CTrYz6oEMQg==} + engines: {node: '>=18'} + cpu: [arm64] + os: [linux] + + '@esbuild/linux-arm@0.24.2': + resolution: {integrity: sha512-n0WRM/gWIdU29J57hJyUdIsk0WarGd6To0s+Y+LwvlC55wt+GT/OgkwoXCXvIue1i1sSNWblHEig00GBWiJgfA==} + engines: {node: '>=18'} + cpu: [arm] + os: [linux] + + '@esbuild/linux-ia32@0.24.2': + resolution: {integrity: sha512-sfv0tGPQhcZOgTKO3oBE9xpHuUqguHvSo4jl+wjnKwFpapx+vUDcawbwPNuBIAYdRAvIDBfZVvXprIj3HA+Ugw==} + engines: {node: '>=18'} + cpu: [ia32] + os: [linux] + + '@esbuild/linux-loong64@0.24.2': + resolution: {integrity: sha512-CN9AZr8kEndGooS35ntToZLTQLHEjtVB5n7dl8ZcTZMonJ7CCfStrYhrzF97eAecqVbVJ7APOEe18RPI4KLhwQ==} + engines: {node: '>=18'} + cpu: [loong64] + os: [linux] + + '@esbuild/linux-mips64el@0.24.2': + resolution: {integrity: sha512-iMkk7qr/wl3exJATwkISxI7kTcmHKE+BlymIAbHO8xanq/TjHaaVThFF6ipWzPHryoFsesNQJPE/3wFJw4+huw==} + engines: {node: '>=18'} + cpu: [mips64el] + os: [linux] + + '@esbuild/linux-ppc64@0.24.2': + resolution: {integrity: sha512-shsVrgCZ57Vr2L8mm39kO5PPIb+843FStGt7sGGoqiiWYconSxwTiuswC1VJZLCjNiMLAMh34jg4VSEQb+iEbw==} + engines: {node: '>=18'} + cpu: [ppc64] + os: [linux] + + '@esbuild/linux-riscv64@0.24.2': + resolution: {integrity: sha512-4eSFWnU9Hhd68fW16GD0TINewo1L6dRrB+oLNNbYyMUAeOD2yCK5KXGK1GH4qD/kT+bTEXjsyTCiJGHPZ3eM9Q==} + engines: {node: '>=18'} + cpu: [riscv64] + os: [linux] + + '@esbuild/linux-s390x@0.24.2': + resolution: {integrity: sha512-S0Bh0A53b0YHL2XEXC20bHLuGMOhFDO6GN4b3YjRLK//Ep3ql3erpNcPlEFed93hsQAjAQDNsvcK+hV90FubSw==} + engines: {node: '>=18'} + cpu: [s390x] + os: [linux] + + '@esbuild/linux-x64@0.24.2': + resolution: {integrity: sha512-8Qi4nQcCTbLnK9WoMjdC9NiTG6/E38RNICU6sUNqK0QFxCYgoARqVqxdFmWkdonVsvGqWhmm7MO0jyTqLqwj0Q==} + engines: {node: '>=18'} + cpu: [x64] + os: [linux] + + '@esbuild/netbsd-arm64@0.24.2': + resolution: {integrity: sha512-wuLK/VztRRpMt9zyHSazyCVdCXlpHkKm34WUyinD2lzK07FAHTq0KQvZZlXikNWkDGoT6x3TD51jKQ7gMVpopw==} + engines: {node: '>=18'} + cpu: [arm64] + os: [netbsd] + + '@esbuild/netbsd-x64@0.24.2': + resolution: {integrity: sha512-VefFaQUc4FMmJuAxmIHgUmfNiLXY438XrL4GDNV1Y1H/RW3qow68xTwjZKfj/+Plp9NANmzbH5R40Meudu8mmw==} + engines: {node: '>=18'} + cpu: [x64] + os: [netbsd] + + '@esbuild/openbsd-arm64@0.24.2': + resolution: {integrity: sha512-YQbi46SBct6iKnszhSvdluqDmxCJA+Pu280Av9WICNwQmMxV7nLRHZfjQzwbPs3jeWnuAhE9Jy0NrnJ12Oz+0A==} + engines: {node: '>=18'} + cpu: [arm64] + os: [openbsd] + + '@esbuild/openbsd-x64@0.24.2': + resolution: {integrity: sha512-+iDS6zpNM6EnJyWv0bMGLWSWeXGN/HTaF/LXHXHwejGsVi+ooqDfMCCTerNFxEkM3wYVcExkeGXNqshc9iMaOA==} + engines: {node: '>=18'} + cpu: [x64] + os: [openbsd] + + '@esbuild/sunos-x64@0.24.2': + resolution: {integrity: sha512-hTdsW27jcktEvpwNHJU4ZwWFGkz2zRJUz8pvddmXPtXDzVKTTINmlmga3ZzwcuMpUvLw7JkLy9QLKyGpD2Yxig==} + engines: {node: '>=18'} + cpu: [x64] + os: [sunos] + + '@esbuild/win32-arm64@0.24.2': + resolution: {integrity: sha512-LihEQ2BBKVFLOC9ZItT9iFprsE9tqjDjnbulhHoFxYQtQfai7qfluVODIYxt1PgdoyQkz23+01rzwNwYfutxUQ==} + engines: {node: '>=18'} + cpu: [arm64] + os: [win32] + + '@esbuild/win32-ia32@0.24.2': + resolution: {integrity: sha512-q+iGUwfs8tncmFC9pcnD5IvRHAzmbwQ3GPS5/ceCyHdjXubwQWI12MKWSNSMYLJMq23/IUCvJMS76PDqXe1fxA==} + engines: {node: '>=18'} + cpu: [ia32] + os: [win32] + + '@esbuild/win32-x64@0.24.2': + resolution: {integrity: sha512-7VTgWzgMGvup6aSqDPLiW5zHaxYJGTO4OokMjIlrCtf+VpEL+cXKtCvg723iguPYI5oaUNdS+/V7OU2gvXVWEg==} + engines: {node: '>=18'} + cpu: [x64] + os: [win32] + '@eslint-community/eslint-utils@4.4.1': resolution: {integrity: sha512-s3O3waFUrMV8P/XaF/+ZTp1X9XBZW1a4B97ZnjQF2KYWaFD2A8KyFBsrsfSjEmjn3RGWAIuvlneuZm3CUK3jbA==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} @@ -766,6 +925,10 @@ packages: resolution: {integrity: sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==} engines: {node: '>=8'} + anymatch@3.1.3: + resolution: {integrity: sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==} + engines: {node: '>= 8'} + arg@4.1.3: resolution: {integrity: sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA==} @@ -829,6 +992,10 @@ packages: resolution: {integrity: sha512-pbnl5XzGBdrFU/wT4jqmJVPn2B6UHPBOhzMQkY/SPUPB6QtUXtmBHBIwCbXJol93mOpGMnQyP/+BB19q04xj7g==} engines: {node: '>=4'} + binary-extensions@2.3.0: + resolution: {integrity: sha512-Ceh+7ox5qe7LJuLHoY0feh3pHuUDHAcRUeyL2VYghZwfpkNIy/+8Ocg0a3UuSoYzavmylwuLWQOf3hl0jjMMIw==} + engines: {node: '>=8'} + bl@4.1.0: resolution: {integrity: sha512-1W07cM9gS6DcLperZfFSj+bWLtaPGSOHWhPiGzXmvVJbRLdG82sH/Kn8EtW1VqWVA54AKf2h5k5BbnIbwF3h6w==} @@ -881,6 +1048,10 @@ packages: chardet@0.7.0: resolution: {integrity: sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA==} + chokidar@3.6.0: + resolution: {integrity: sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw==} + engines: {node: '>= 8.10.0'} + ci-info@3.9.0: resolution: {integrity: sha512-NIxF55hv4nSqQswkAeiOi1r83xy8JldOFDTWiug55KBu9Jnblncd2U6ViHmYgHf01TPZS77NJBhBMKdWj9HQMQ==} engines: {node: '>=8'} @@ -939,6 +1110,11 @@ packages: concat-map@0.0.1: resolution: {integrity: sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==} + concurrently@8.2.2: + resolution: {integrity: sha512-1dP4gpXFhei8IOtlXRE/T/4H88ElHgTiUzh71YUmtjTEHMSRS2Z/fgOxHSxxusGHogsRfxNq1vyAwxSC+EVyDg==} + engines: {node: ^14.13.0 || >=16.0.0} + hasBin: true + constant-case@2.0.0: resolution: {integrity: sha512-eS0N9WwmjTqrOmR3o83F5vW8Z+9R1HnVz3xmzT2PMFug9ly+Au/fxRWlEBSb6LcZwspSsEn9Xs1uw9YgzAg1EQ==} @@ -971,6 +1147,10 @@ packages: resolution: {integrity: sha512-t/Ygsytq+R995EJ5PZlD4Cu56sWa8InXySaViRzw9apusqsOO2bQP+SbYzAhR0pFKoB+43lYy8rWban9JSuXnA==} engines: {node: '>= 0.4'} + date-fns@2.30.0: + resolution: {integrity: sha512-fnULvOpxnC5/Vg3NCiWelDsLiUc9bRwAPs/+LfTLNvetFCtCTN+yQz15C/fs4AwX1R9K5GLtLfn8QW+dWisaAw==} + engines: {node: '>=0.11'} + debug@4.3.7: resolution: {integrity: sha512-Er2nc/H7RrMXZBFCEim6TCmMk02Z8vLC2Rbi1KEBggpo0fS6l0S1nnapwmIi3yW/+GOJap1Krg4w0Hg80oCqgQ==} engines: {node: '>=6.0'} @@ -1071,6 +1251,11 @@ packages: resolution: {integrity: sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA==} engines: {node: '>= 0.4'} + esbuild@0.24.2: + resolution: {integrity: sha512-+9egpBW8I3CD5XPe0n6BfT5fxLzxrlDzqydF3aviG+9ni1lDC/OvMHcxqEFV0+LANZG5R1bFMWfUrjVsdwxJvA==} + engines: {node: '>=18'} + hasBin: true + escalade@3.2.0: resolution: {integrity: sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==} engines: {node: '>=6'} @@ -1245,6 +1430,11 @@ packages: fs.realpath@1.0.0: resolution: {integrity: sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==} + fsevents@2.3.3: + resolution: {integrity: sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==} + engines: {node: ^8.16.0 || ^10.6.0 || >=11.0.0} + os: [darwin] + function-bind@1.1.2: resolution: {integrity: sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==} @@ -1379,6 +1569,9 @@ packages: ieee754@1.2.1: resolution: {integrity: sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==} + ignore-by-default@1.0.1: + resolution: {integrity: sha512-Ius2VYcGNk7T90CppJqcIkS5ooHUZyIQK+ClZfMfMNFEF9VSE73Fq+906u/CWu92x4gzZMWOwfFYckPObzdEbA==} + ignore@5.3.2: resolution: {integrity: sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g==} engines: {node: '>= 4'} @@ -1434,6 +1627,10 @@ packages: is-bigint@1.0.4: resolution: {integrity: sha512-zB9CruMamjym81i2JZ3UMn54PKGsQzsJeo6xvN3HJJ4CAsQNB6iRutp2To77OfCNuoxspsIhzaPoO1zyCEhFOg==} + is-binary-path@2.1.0: + resolution: {integrity: sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==} + engines: {node: '>=8'} + is-boolean-object@1.1.2: resolution: {integrity: sha512-gDYaKHJmnj4aWxyj6YHyXVpdQawtVLHU5cb+eztPGczf6cjuTdwve5ZIEfgXqH4e57An1D1AKf8CZ3kYrQRqYA==} engines: {node: '>= 0.4'} @@ -1793,6 +1990,15 @@ packages: resolution: {integrity: sha512-Cov028YhBZ5aB7MdMWJEmwyBig43aGL5WT4vdoB28Oitau1zZAcHUn8Sgfk9HM33TqhtLJ9PlM/O0Mv+QpV/4Q==} engines: {node: '>=8.9.4'} + nodemon@3.1.9: + resolution: {integrity: sha512-hdr1oIb2p6ZSxu3PB2JWWYS7ZQ0qvaZsc3hK8DR8f02kRzc8rjYmxAIvdz+aYC+8F2IjNaB7HMcSDg8nQpJxyg==} + engines: {node: '>=10'} + hasBin: true + + normalize-path@3.0.0: + resolution: {integrity: sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==} + engines: {node: '>=0.10.0'} + npm-run-path@4.0.1: resolution: {integrity: sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw==} engines: {node: '>=8'} @@ -1977,6 +2183,9 @@ packages: proxy-from-env@1.1.0: resolution: {integrity: sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==} + pstree.remy@1.1.8: + resolution: {integrity: sha512-77DZwxQmxKnu3aR542U+X8FypNzbfJ+C5XQDk3uWjWxn6151aIMGthWYRXTqT1E5oJvg+ljaa2OJi+VfvCOQ8w==} + punycode@2.3.1: resolution: {integrity: sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==} engines: {node: '>=6'} @@ -2008,6 +2217,10 @@ packages: resolution: {integrity: sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==} engines: {node: '>= 6'} + readdirp@3.6.0: + resolution: {integrity: sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==} + engines: {node: '>=8.10.0'} + reflect.getprototypeof@1.0.6: resolution: {integrity: sha512-fmfw4XgoDke3kdI6h4xcUz1dG8uaiv5q9gcEwLS4Pnth2kxT+GZ7YehS1JTMGBQmtV7Y4GFGbs2re2NqhdozUg==} engines: {node: '>= 0.4'} @@ -2121,6 +2334,10 @@ packages: resolution: {integrity: sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==} engines: {node: '>=8'} + shell-quote@1.8.2: + resolution: {integrity: sha512-AzqKpGKjrj7EM6rKVQEPpB288oCfnrEIuyoT9cyF4nmGa7V8Zk6f7RRqYisX8X9m+Q7bd632aZW4ky7EhbQztA==} + engines: {node: '>= 0.4'} + side-channel@1.0.6: resolution: {integrity: sha512-fDW/EZ6Q9RiO8eFG8Hj+7u/oW+XrPTIChwCOM2+th2A6OblDtYYIpve9m+KvI9Z4C9qSEXlaGR6bTEYHReuglA==} engines: {node: '>= 0.4'} @@ -2135,6 +2352,10 @@ packages: simple-swizzle@0.2.2: resolution: {integrity: sha512-JA//kQgZtbuY83m+xT+tXJkmJncGMTFT+C+g2h2R9uxkYIrE2yy9sgmcLhCnw57/WSD+Eh3J97FPEDFnbXnDUg==} + simple-update-notifier@2.0.0: + resolution: {integrity: sha512-a2B9Y0KlNXl9u/vsW6sTIu9vGEpfKu2wRV6l1H3XEas/0gUIzGzBoP/IouTcUQbm9JWZLH3COxyn03TYlFax6w==} + engines: {node: '>=10'} + slash@3.0.0: resolution: {integrity: sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==} engines: {node: '>=8'} @@ -2162,6 +2383,9 @@ packages: resolution: {integrity: sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==} engines: {node: '>=0.10.0'} + spawn-command@0.0.2: + resolution: {integrity: sha512-zC8zGoGkmc8J9ndvml8Xksr1Amk9qBujgbF0JAIWO7kXr43w0h/0GJNM/Vustixu+YE8N/MTrQ7N31FvHUACxQ==} + spawndamnit@3.0.1: resolution: {integrity: sha512-MmnduQUuHCoFckZoWnXsTg7JaiLBJrKFj9UI2MbRPGaJeVpsLcVBu6P/IGZovziM/YBsellCmsprgNA+w0CzVg==} @@ -2241,6 +2465,10 @@ packages: resolution: {integrity: sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==} engines: {node: '>=8'} + supports-color@8.1.1: + resolution: {integrity: sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==} + engines: {node: '>=10'} + supports-preserve-symlinks-flag@1.0.0: resolution: {integrity: sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==} engines: {node: '>= 0.4'} @@ -2272,6 +2500,14 @@ packages: resolution: {integrity: sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==} engines: {node: '>=8.0'} + touch@3.1.1: + resolution: {integrity: sha512-r0eojU4bI8MnHr8c5bNo7lJDdI2qXlWWJk6a9EAFG7vbhTjElYhBVS3/miuE0uOuoLdb8Mc/rVfsmm6eo5o9GA==} + hasBin: true + + tree-kill@1.2.2: + resolution: {integrity: sha512-L0Orpi8qGpRG//Nd+H90vFB+3iHnue1zSSGmNOOCh1GLJ7rUKVwV2HvijphGQS2UmhUZewS9VgvxYIdgr+fG1A==} + hasBin: true + ts-api-utils@1.4.0: resolution: {integrity: sha512-032cPxaEKwM+GT3vA5JXNzIaizx388rhsSW79vGRNGXfRRAdEAn2mvk36PvK5HnOchyWZ7afLEXqYCvPCrzuzQ==} engines: {node: '>=16'} @@ -2384,6 +2620,9 @@ packages: unbox-primitive@1.0.2: resolution: {integrity: sha512-61pPlCD9h51VoreyJ0BReideM3MDKMKnh6+V9L08331ipq6Q8OFXZYiqP6n/tbHx4s5I9uRhcye6BrbkizkBDw==} + undefsafe@2.0.5: + resolution: {integrity: sha512-WxONCrssBM8TSPRqN5EmsjVrsv4A8X12J4ArBiiayv3DyyG3ZlIg6yysuuSYdZsVz3TKcTg2fd//Ujd4CHV1iA==} + undici-types@6.19.8: resolution: {integrity: sha512-ve2KP6f/JnbPBFyobGHuerC9g1FYGn/F8n1LWTwNxCEzd6IfqTwUQcNXgEtmmQ6DlRrC1hrSrBnCZPokRrDHjw==} @@ -2645,6 +2884,81 @@ snapshots: tslib: 2.8.1 optional: true + '@esbuild/aix-ppc64@0.24.2': + optional: true + + '@esbuild/android-arm64@0.24.2': + optional: true + + '@esbuild/android-arm@0.24.2': + optional: true + + '@esbuild/android-x64@0.24.2': + optional: true + + '@esbuild/darwin-arm64@0.24.2': + optional: true + + '@esbuild/darwin-x64@0.24.2': + optional: true + + '@esbuild/freebsd-arm64@0.24.2': + optional: true + + '@esbuild/freebsd-x64@0.24.2': + optional: true + + '@esbuild/linux-arm64@0.24.2': + optional: true + + '@esbuild/linux-arm@0.24.2': + optional: true + + '@esbuild/linux-ia32@0.24.2': + optional: true + + '@esbuild/linux-loong64@0.24.2': + optional: true + + '@esbuild/linux-mips64el@0.24.2': + optional: true + + '@esbuild/linux-ppc64@0.24.2': + optional: true + + '@esbuild/linux-riscv64@0.24.2': + optional: true + + '@esbuild/linux-s390x@0.24.2': + optional: true + + '@esbuild/linux-x64@0.24.2': + optional: true + + '@esbuild/netbsd-arm64@0.24.2': + optional: true + + '@esbuild/netbsd-x64@0.24.2': + optional: true + + '@esbuild/openbsd-arm64@0.24.2': + optional: true + + '@esbuild/openbsd-x64@0.24.2': + optional: true + + '@esbuild/sunos-x64@0.24.2': + optional: true + + '@esbuild/win32-arm64@0.24.2': + optional: true + + '@esbuild/win32-ia32@0.24.2': + optional: true + + '@esbuild/win32-x64@0.24.2': + optional: true + '@eslint-community/eslint-utils@4.4.1(eslint@9.15.0)': dependencies: eslint: 9.15.0 @@ -2655,7 +2969,7 @@ snapshots: '@eslint/config-array@0.19.0': dependencies: '@eslint/object-schema': 2.1.4 - debug: 4.3.7 + debug: 4.3.7(supports-color@5.5.0) minimatch: 3.1.2 transitivePeerDependencies: - supports-color @@ -2665,7 +2979,7 @@ snapshots: '@eslint/eslintrc@3.2.0': dependencies: ajv: 6.12.6 - debug: 4.3.7 + debug: 4.3.7(supports-color@5.5.0) espree: 10.3.0 globals: 14.0.0 ignore: 5.3.2 @@ -2993,7 +3307,7 @@ snapshots: '@typescript-eslint/types': 8.15.0 '@typescript-eslint/typescript-estree': 8.15.0(typescript@5.5.4) '@typescript-eslint/visitor-keys': 8.15.0 - debug: 4.3.7 + debug: 4.3.7(supports-color@5.5.0) eslint: 9.15.0 optionalDependencies: typescript: 5.5.4 @@ -3009,7 +3323,7 @@ snapshots: dependencies: '@typescript-eslint/typescript-estree': 8.15.0(typescript@5.5.4) '@typescript-eslint/utils': 8.15.0(eslint@9.15.0)(typescript@5.5.4) - debug: 4.3.7 + debug: 4.3.7(supports-color@5.5.0) eslint: 9.15.0 ts-api-utils: 1.4.0(typescript@5.5.4) optionalDependencies: @@ -3023,7 +3337,7 @@ snapshots: dependencies: '@typescript-eslint/types': 8.15.0 '@typescript-eslint/visitor-keys': 8.15.0 - debug: 4.3.7 + debug: 4.3.7(supports-color@5.5.0) fast-glob: 3.3.2 is-glob: 4.0.3 minimatch: 9.0.5 @@ -3067,7 +3381,7 @@ snapshots: agent-base@7.1.1: dependencies: - debug: 4.3.7 + debug: 4.3.7(supports-color@5.5.0) transitivePeerDependencies: - supports-color @@ -3099,6 +3413,11 @@ snapshots: dependencies: color-convert: 2.0.1 + anymatch@3.1.3: + dependencies: + normalize-path: 3.0.0 + picomatch: 2.3.1 + arg@4.1.3: {} argparse@1.0.10: @@ -3183,6 +3502,8 @@ snapshots: dependencies: is-windows: 1.0.2 + binary-extensions@2.3.0: {} + bl@4.1.0: dependencies: buffer: 5.7.1 @@ -3267,6 +3588,18 @@ snapshots: chardet@0.7.0: {} + chokidar@3.6.0: + dependencies: + anymatch: 3.1.3 + braces: 3.0.3 + glob-parent: 5.1.2 + is-binary-path: 2.1.0 + is-glob: 4.0.3 + normalize-path: 3.0.0 + readdirp: 3.6.0 + optionalDependencies: + fsevents: 2.3.3 + ci-info@3.9.0: {} clean-stack@2.2.0: {} @@ -3317,6 +3650,18 @@ snapshots: concat-map@0.0.1: {} + concurrently@8.2.2: + dependencies: + chalk: 4.1.2 + date-fns: 2.30.0 + lodash: 4.17.21 + rxjs: 7.8.1 + shell-quote: 1.8.2 + spawn-command: 0.0.2 + supports-color: 8.1.1 + tree-kill: 1.2.2 + yargs: 17.7.2 + constant-case@2.0.0: dependencies: snake-case: 2.1.0 @@ -3354,9 +3699,15 @@ snapshots: es-errors: 1.3.0 is-data-view: 1.0.1 - debug@4.3.7: + date-fns@2.30.0: + dependencies: + '@babel/runtime': 7.26.0 + + debug@4.3.7(supports-color@5.5.0): dependencies: ms: 2.1.3 + optionalDependencies: + supports-color: 5.5.0 deep-extend@0.6.0: {} @@ -3516,6 +3867,34 @@ snapshots: is-date-object: 1.0.5 is-symbol: 1.0.4 + esbuild@0.24.2: + optionalDependencies: + '@esbuild/aix-ppc64': 0.24.2 + '@esbuild/android-arm': 0.24.2 + '@esbuild/android-arm64': 0.24.2 + '@esbuild/android-x64': 0.24.2 + '@esbuild/darwin-arm64': 0.24.2 + '@esbuild/darwin-x64': 0.24.2 + '@esbuild/freebsd-arm64': 0.24.2 + '@esbuild/freebsd-x64': 0.24.2 + '@esbuild/linux-arm': 0.24.2 + '@esbuild/linux-arm64': 0.24.2 + '@esbuild/linux-ia32': 0.24.2 + '@esbuild/linux-loong64': 0.24.2 + '@esbuild/linux-mips64el': 0.24.2 + '@esbuild/linux-ppc64': 0.24.2 + '@esbuild/linux-riscv64': 0.24.2 + '@esbuild/linux-s390x': 0.24.2 + '@esbuild/linux-x64': 0.24.2 + '@esbuild/netbsd-arm64': 0.24.2 + '@esbuild/netbsd-x64': 0.24.2 + '@esbuild/openbsd-arm64': 0.24.2 + '@esbuild/openbsd-x64': 0.24.2 + '@esbuild/sunos-x64': 0.24.2 + '@esbuild/win32-arm64': 0.24.2 + '@esbuild/win32-ia32': 0.24.2 + '@esbuild/win32-x64': 0.24.2 + escalade@3.2.0: {} escape-string-regexp@1.0.5: {} @@ -3593,7 +3972,7 @@ snapshots: ajv: 6.12.6 chalk: 4.1.2 cross-spawn: 7.0.6 - debug: 4.3.7 + debug: 4.3.7(supports-color@5.5.0) escape-string-regexp: 4.0.0 eslint-scope: 8.2.0 eslint-visitor-keys: 4.2.0 @@ -3742,6 +4121,9 @@ snapshots: fs.realpath@1.0.0: {} + fsevents@2.3.3: + optional: true + function-bind@1.1.2: {} function.prototype.name@1.1.6: @@ -3775,7 +4157,7 @@ snapshots: dependencies: basic-ftp: 5.0.5 data-uri-to-buffer: 6.0.2 - debug: 4.3.7 + debug: 4.3.7(supports-color@5.5.0) fs-extra: 11.2.0 transitivePeerDependencies: - supports-color @@ -3878,14 +4260,14 @@ snapshots: http-proxy-agent@7.0.2: dependencies: agent-base: 7.1.1 - debug: 4.3.7 + debug: 4.3.7(supports-color@5.5.0) transitivePeerDependencies: - supports-color https-proxy-agent@7.0.5: dependencies: agent-base: 7.1.1 - debug: 4.3.7 + debug: 4.3.7(supports-color@5.5.0) transitivePeerDependencies: - supports-color @@ -3899,6 +4281,8 @@ snapshots: ieee754@1.2.1: {} + ignore-by-default@1.0.1: {} + ignore@5.3.2: {} import-fresh@3.3.0: @@ -3980,6 +4364,10 @@ snapshots: dependencies: has-bigints: 1.0.2 + is-binary-path@2.1.0: + dependencies: + binary-extensions: 2.3.0 + is-boolean-object@1.1.2: dependencies: call-bind: 1.0.7 @@ -4306,6 +4694,21 @@ snapshots: mkdirp: 0.5.6 resolve: 1.22.8 + nodemon@3.1.9: + dependencies: + chokidar: 3.6.0 + debug: 4.3.7(supports-color@5.5.0) + ignore-by-default: 1.0.1 + minimatch: 3.1.2 + pstree.remy: 1.1.8 + semver: 7.6.3 + simple-update-notifier: 2.0.0 + supports-color: 5.5.0 + touch: 3.1.1 + undefsafe: 2.0.5 + + normalize-path@3.0.0: {} + npm-run-path@4.0.1: dependencies: path-key: 3.1.1 @@ -4432,7 +4835,7 @@ snapshots: dependencies: '@tootallnate/quickjs-emscripten': 0.23.0 agent-base: 7.1.1 - debug: 4.3.7 + debug: 4.3.7(supports-color@5.5.0) get-uri: 6.0.3 http-proxy-agent: 7.0.2 https-proxy-agent: 7.0.5 @@ -4504,7 +4907,7 @@ snapshots: proxy-agent@6.4.0: dependencies: agent-base: 7.1.1 - debug: 4.3.7 + debug: 4.3.7(supports-color@5.5.0) http-proxy-agent: 7.0.2 https-proxy-agent: 7.0.5 lru-cache: 7.18.3 @@ -4516,6 +4919,8 @@ snapshots: proxy-from-env@1.1.0: {} + pstree.remy@1.1.8: {} + punycode@2.3.1: {} queue-microtask@1.2.3: {} @@ -4549,6 +4954,10 @@ snapshots: string_decoder: 1.3.0 util-deprecate: 1.0.2 + readdirp@3.6.0: + dependencies: + picomatch: 2.3.1 + reflect.getprototypeof@1.0.6: dependencies: call-bind: 1.0.7 @@ -4697,6 +5106,8 @@ snapshots: shebang-regex@3.0.0: {} + shell-quote@1.8.2: {} + side-channel@1.0.6: dependencies: call-bind: 1.0.7 @@ -4713,6 +5124,10 @@ snapshots: is-arrayish: 0.3.2 optional: true + simple-update-notifier@2.0.0: + dependencies: + semver: 7.6.3 + slash@3.0.0: {} smart-buffer@4.2.0: {} @@ -4724,7 +5139,7 @@ snapshots: socks-proxy-agent@8.0.4: dependencies: agent-base: 7.1.1 - debug: 4.3.7 + debug: 4.3.7(supports-color@5.5.0) socks: 2.8.3 transitivePeerDependencies: - supports-color @@ -4738,6 +5153,8 @@ snapshots: source-map@0.6.1: {} + spawn-command@0.0.2: {} + spawndamnit@3.0.1: dependencies: cross-spawn: 7.0.6 @@ -4823,6 +5240,10 @@ snapshots: dependencies: has-flag: 4.0.0 + supports-color@8.1.1: + dependencies: + has-flag: 4.0.0 + supports-preserve-symlinks-flag@1.0.0: {} swap-case@1.1.2: @@ -4854,6 +5275,10 @@ snapshots: dependencies: is-number: 7.0.0 + touch@3.1.1: {} + + tree-kill@1.2.2: {} + ts-api-utils@1.4.0(typescript@5.5.4): dependencies: typescript: 5.5.4 @@ -4971,6 +5396,8 @@ snapshots: has-symbols: 1.0.3 which-boxed-primitive: 1.0.2 + undefsafe@2.0.5: {} + undici-types@6.19.8: {} undici-types@6.20.0: {} From bb186eafa833418848632c455165659b722d8fff Mon Sep 17 00:00:00 2001 From: Agusx1211 Date: Wed, 5 Feb 2025 18:53:34 +0000 Subject: [PATCH 093/439] Encode chained signatures --- .../src/subcommands/signature.ts | 16 +++-- packages/primitives/src/signature.ts | 64 ++++++++++++------- 2 files changed, 53 insertions(+), 27 deletions(-) diff --git a/packages/primitives-cli/src/subcommands/signature.ts b/packages/primitives-cli/src/subcommands/signature.ts index 0fe7f14a0..fa7795a11 100644 --- a/packages/primitives-cli/src/subcommands/signature.ts +++ b/packages/primitives-cli/src/subcommands/signature.ts @@ -125,10 +125,18 @@ async function doEncode(input: string, signatures: string[] = [], noChainId: boo } async function doConcat(signatures: string[]): Promise { - throw new Error('Not implemented') - // const encoded = signatures.map((s) => Hex.fromHex(s)).map((s) => s.toBytes()) - // const concatenated = Bytes.concat(...encoded) - // console.log(Hex.fromBytes(concatenated)) + if (signatures.length === 0) { + throw new Error('No signatures provided') + } + + const decoded = signatures.map((s) => decodeSignature(Bytes.fromHex(s as `0x${string}`))) + + const reEncoded = encodeSignature({ + ...decoded[0]!, + suffix: decoded.slice(1), + }) + + console.log(Hex.fromBytes(reEncoded)) } async function doDecode(signature: string): Promise { diff --git a/packages/primitives/src/signature.ts b/packages/primitives/src/signature.ts index b64ee8eba..a79ad3b12 100644 --- a/packages/primitives/src/signature.ts +++ b/packages/primitives/src/signature.ts @@ -13,6 +13,7 @@ import { isSapientSignerLeaf, isSignerLeaf, isSubdigestLeaf, + isTopology, } from './config' import { minBytesFor } from './utils' @@ -87,7 +88,7 @@ export type RawSignature = { noChainId: boolean checkpointerData?: Bytes.Bytes configuration: RawConfiguration - suffix?: Array + suffix?: Array } export function isRawSignature(signature: any): signature is RawSignature { @@ -129,7 +130,7 @@ export function isSignedSapientSignerLeaf(cand: any): cand is SignedSapientSigne } export function isRawNode(cand: any): cand is RawNode { - return Array.isArray(cand) && cand.length === 2 && isRawTopology(cand[0]) && isRawTopology(cand[1]) + return Array.isArray(cand) && cand.length === 2 && (isRawTopology(cand[0]) || isTopology(cand[0])) && (isRawTopology(cand[1]) || isTopology(cand[1])) } export function isRawTopology(cand: any): cand is RawTopology { @@ -531,15 +532,48 @@ export function fillLeaves( throw new Error('Invalid topology') } -export function encodeSignature(signature: RawSignature): Uint8Array { - const { noChainId, checkpointerData, configuration: config, suffix } = signature +export function encodeChainedSignature(signatures: RawSignature[]): Uint8Array { + let flag = 0x01 - let flag = 0 + let sigForCheckpointer = signatures[signatures.length - 1] + + if (sigForCheckpointer?.configuration.checkpointer) { + flag |= 0x40 + } + + let output = Bytes.fromNumber(flag) + if (sigForCheckpointer?.configuration.checkpointer) { + output = Bytes.concat(output, Bytes.padLeft(Bytes.fromHex(sigForCheckpointer.configuration.checkpointer), 20)) + const checkpointerDataSize = sigForCheckpointer.checkpointerData?.length ?? 0 + if (checkpointerDataSize > 16777215) { + throw new Error('Checkpointer data too large') + } + const checkpointerDataSizeBytes = Bytes.padLeft(Bytes.fromNumber(checkpointerDataSize), 3) + output = Bytes.concat(output, checkpointerDataSizeBytes, sigForCheckpointer.checkpointerData ?? Bytes.fromArray([])) + } + + for (let i = 0; i < signatures.length; i++) { + const signature = signatures[i]! + const encoded = encodeSignature(signature, true) + if (encoded.length > 16777215) { + throw new Error('Chained signature too large') + } + const encodedSize = Bytes.padLeft(Bytes.fromNumber(encoded.length), 3) + output = Bytes.concat(output, encodedSize, encoded) + } + + return output +} + +export function encodeSignature(signature: RawSignature, skipCheckpointerData?: boolean): Uint8Array { + const { noChainId, checkpointerData, configuration: config, suffix } = signature if (suffix?.length) { - flag |= 0x01 + return encodeChainedSignature([{ ...signature, suffix: undefined }, ...suffix]) } + let flag = 0 + if (noChainId) { flag |= 0x02 } @@ -563,7 +597,7 @@ export function encodeSignature(signature: RawSignature): Uint8Array { let output = Bytes.fromNumber(flag) - if (config.checkpointer) { + if (config.checkpointer && !skipCheckpointerData) { output = Bytes.concat(output, Bytes.padLeft(Bytes.fromHex(config.checkpointer), 20)) const checkpointerDataSize = checkpointerData?.length ?? 0 @@ -575,20 +609,6 @@ export function encodeSignature(signature: RawSignature): Uint8Array { output = Bytes.concat(output, checkpointerDataSizeBytes, checkpointerData ?? Bytes.fromArray([])) } - if (suffix?.length) { - const encoded = encodeSignature({ ...signature, checkpointerData: undefined, suffix: undefined }) - const encodedSize = Bytes.padLeft(Bytes.fromNumber(encoded.length), 3) - output = Bytes.concat(output, encodedSize) - - for (const subsignature of suffix) { - const encoded = encodeSignature(subsignature) - const encodedSize = Bytes.padLeft(Bytes.fromNumber(encoded.length), 3) - output = Bytes.concat(output, encodedSize) - } - - return output - } - const checkpointBytes = Bytes.padLeft(Bytes.fromNumber(config.checkpoint), bytesForCheckpoint) output = Bytes.concat(output, checkpointBytes) @@ -773,8 +793,6 @@ export function encodeTopology( return Bytes.concat(Bytes.fromNumber(FLAG_NODE << 4), hash) } - console.log(topology) - throw new Error('Invalid topology') } From 3a1063e15005fca4ae999cbdd8ff5258feb249a1 Mon Sep 17 00:00:00 2001 From: William Hua Date: Wed, 5 Feb 2025 17:05:40 -0500 Subject: [PATCH 094/439] pnpm format --- .../src/subcommands/signature.ts | 30 +++++++++--------- packages/primitives/src/signature.ts | 31 +++++++------------ 2 files changed, 26 insertions(+), 35 deletions(-) diff --git a/packages/primitives-cli/src/subcommands/signature.ts b/packages/primitives-cli/src/subcommands/signature.ts index fa7795a11..7e121dd4c 100644 --- a/packages/primitives-cli/src/subcommands/signature.ts +++ b/packages/primitives-cli/src/subcommands/signature.ts @@ -130,7 +130,7 @@ async function doConcat(signatures: string[]): Promise { } const decoded = signatures.map((s) => decodeSignature(Bytes.fromHex(s as `0x${string}`))) - + const reEncoded = encodeSignature({ ...decoded[0]!, suffix: decoded.slice(1), @@ -184,33 +184,31 @@ const signatureCommand: CommandModule = { 'concat [signatures...]', 'Concatenate multiple signatures', (yargs) => { - return yargs - .positional('signatures', { - type: 'string', - array: true, - description: 'Hex signatures to concatenate', - demandOption: true - }) + return yargs.positional('signatures', { + type: 'string', + array: true, + description: 'Hex signatures to concatenate', + demandOption: true, + }) }, async (argv) => { await doConcat(argv.signatures) - } + }, ) .command( 'decode [signature]', 'Decode a signature from bytes', (yargs) => { - return yargs - .positional('signature', { - type: 'string', - description: 'Hex signature to decode', - demandOption: true - }) + return yargs.positional('signature', { + type: 'string', + description: 'Hex signature to decode', + demandOption: true, + }) }, async (argv) => { const input = await fromPosOrStdin(argv, 'signature') await doDecode(input) - } + }, ) .demandCommand(1, 'You must specify a subcommand for signature') }, diff --git a/packages/primitives/src/signature.ts b/packages/primitives/src/signature.ts index a79ad3b12..378bd75da 100644 --- a/packages/primitives/src/signature.ts +++ b/packages/primitives/src/signature.ts @@ -130,7 +130,12 @@ export function isSignedSapientSignerLeaf(cand: any): cand is SignedSapientSigne } export function isRawNode(cand: any): cand is RawNode { - return Array.isArray(cand) && cand.length === 2 && (isRawTopology(cand[0]) || isTopology(cand[0])) && (isRawTopology(cand[1]) || isTopology(cand[1])) + return ( + Array.isArray(cand) && + cand.length === 2 && + (isRawTopology(cand[0]) || isTopology(cand[0])) && + (isRawTopology(cand[1]) || isTopology(cand[1])) + ) } export function isRawTopology(cand: any): cand is RawTopology { @@ -819,18 +824,14 @@ export function rawSignatureToJson(signature: RawSignature): string { function rawSignatureToJsonParsed(signature: RawSignature): any { return { noChainId: signature.noChainId, - checkpointerData: signature.checkpointerData - ? Bytes.toHex(signature.checkpointerData) - : undefined, + checkpointerData: signature.checkpointerData ? Bytes.toHex(signature.checkpointerData) : undefined, configuration: { threshold: signature.configuration.threshold.toString(), checkpoint: signature.configuration.checkpoint.toString(), topology: rawTopologyToJson(signature.configuration.topology), checkpointer: signature.configuration.checkpointer, }, - suffix: signature.suffix - ? signature.suffix.map((sig) => rawSignatureToJsonParsed(sig)) - : undefined, + suffix: signature.suffix ? signature.suffix.map((sig) => rawSignatureToJsonParsed(sig)) : undefined, } } @@ -886,9 +887,7 @@ function rawTopologyToJson(top: RawTopology): any { throw new Error('Invalid raw topology format') } -function rawSignatureOfLeafToJson( - sig: SignatureOfSignerLeaf | SignatureOfSapientSignerLeaf -): any { +function rawSignatureOfLeafToJson(sig: SignatureOfSignerLeaf | SignatureOfSapientSignerLeaf): any { if (sig.type === 'eth_sign' || sig.type === 'hash') { return { type: sig.type, @@ -923,18 +922,14 @@ export function rawSignatureFromJson(json: string): RawSignature { function rawSignatureFromParsed(parsed: any): RawSignature { return { noChainId: parsed.noChainId, - checkpointerData: parsed.checkpointerData - ? Bytes.fromHex(parsed.checkpointerData) - : undefined, + checkpointerData: parsed.checkpointerData ? Bytes.fromHex(parsed.checkpointerData) : undefined, configuration: { threshold: BigInt(parsed.configuration.threshold), checkpoint: BigInt(parsed.configuration.checkpoint), topology: rawTopologyFromJson(parsed.configuration.topology), checkpointer: parsed.configuration.checkpointer, }, - suffix: parsed.suffix - ? parsed.suffix.map((sig: any) => rawSignatureFromParsed(sig)) - : undefined, + suffix: parsed.suffix ? parsed.suffix.map((sig: any) => rawSignatureFromParsed(sig)) : undefined, } } @@ -990,9 +985,7 @@ function rawTopologyFromJson(obj: any): RawTopology { throw new Error('Invalid raw topology format') } -function rawSignatureOfLeafFromJson( - obj: any -): SignatureOfSignerLeaf | SignatureOfSapientSignerLeaf { +function rawSignatureOfLeafFromJson(obj: any): SignatureOfSignerLeaf | SignatureOfSapientSignerLeaf { switch (obj.type) { case 'eth_sign': case 'hash': From 848a9a2006792e31dda69fa2cb7bc91a673fb42b Mon Sep 17 00:00:00 2001 From: William Hua Date: Wed, 5 Feb 2025 17:05:07 -0500 Subject: [PATCH 095/439] primitives: signature recovery --- packages/core/src/wallet.ts | 8 +- packages/primitives/src/config.ts | 5 + packages/primitives/src/constants.ts | 29 ++- packages/primitives/src/erc-6492.ts | 2 +- packages/primitives/src/signature.ts | 297 ++++++++++++++++++++++++++- 5 files changed, 333 insertions(+), 8 deletions(-) diff --git a/packages/core/src/wallet.ts b/packages/core/src/wallet.ts index 71e3477a3..340bd25ca 100644 --- a/packages/core/src/wallet.ts +++ b/packages/core/src/wallet.ts @@ -10,11 +10,12 @@ import { getSigners, getWeight, hashConfiguration, + IMAGE_HASH, isSignerLeaf, Payload, RawSignature, } from '@0xsequence/sequence-primitives' -import { Address, Bytes, Hex, Provider, Signature as oxSignature } from 'ox' +import { AbiFunction, Address, Bytes, Hex, Provider, Signature as oxSignature } from 'ox' import { CancelCallback, Signature, Signer, SignerSignatureCallback } from './signer' import { Sessions, StateReader, StateWriter } from './state' @@ -67,7 +68,10 @@ export class Wallet { imageHash = await this.stateProvider.getDeployHash(this.address) } else { isDeployed = true - imageHash = await provider.request({ method: 'eth_call', params: [{ data: '0x51605d80' /* imageHash() */ }] }) + imageHash = await provider.request({ + method: 'eth_call', + params: [{ data: AbiFunction.encodeData(IMAGE_HASH) }], + }) } const path = await this.stateProvider.getConfigurationPath(this.address, imageHash) diff --git a/packages/primitives/src/config.ts b/packages/primitives/src/config.ts index e32a4e0f0..fde979a66 100644 --- a/packages/primitives/src/config.ts +++ b/packages/primitives/src/config.ts @@ -1,9 +1,12 @@ import { Address, Bytes, Hash, Hex } from 'ox' +import { SignatureOfSapientSignerLeaf, SignatureOfSignerLeaf } from './signature' export type SignerLeaf = { type: 'signer' address: Address.Address weight: bigint + signed?: boolean + signature?: SignatureOfSignerLeaf } export type SapientSignerLeaf = { @@ -11,6 +14,8 @@ export type SapientSignerLeaf = { address: Address.Address weight: bigint imageHash: Bytes.Bytes + signed?: boolean + signature?: SignatureOfSapientSignerLeaf } export type SubdigestLeaf = { diff --git a/packages/primitives/src/constants.ts b/packages/primitives/src/constants.ts index 59b30dc41..c08e3b0e4 100644 --- a/packages/primitives/src/constants.ts +++ b/packages/primitives/src/constants.ts @@ -1,8 +1,31 @@ -import { Address, Hex } from 'ox' +import { Abi, Address, Hex } from 'ox' export const FACTORY: Address.Address = '0xTODO' export const MAIN_MODULE: Address.Address = '0xTODO' -export const DEPLOY = 'function deploy(address _mainModule, bytes32 _salt) public payable returns (address _contract)' - export const CREATION_CODE: Hex.Hex = '0xTODO' + +// ERC1271 +export const IS_VALID_SIGNATURE = Abi.from([ + 'function isValidSignature(bytes32 _hash, bytes memory _signature) public view returns (bytes4 magicValue)', +])[0] + +// Factory +export const DEPLOY = Abi.from([ + 'function deploy(address _mainModule, bytes32 _salt) public payable returns (address _contract)', +])[0] + +// MainModule +export const IMAGE_HASH = Abi.from(['function imageHash() external view returns (bytes32)'])[0] + +// Sapient +export const IS_VALID_SAPIENT_SIGNATURE = Abi.from([ + 'function isValidSapientSignature(Payload.Decoded calldata _payload, bytes calldata _signature) external view returns (bytes32)', + 'struct Payload.Decoded { uint8 kind; bool noChainId; Call[] calls; uint256 space; uint256 nonce; bytes message; bytes32 imageHash; bytes32 digest; address[] parentWallets; }', + 'struct Call { address to; uint256 value; bytes data; uint256 gasLimit; bool delegateCall; bool onlyFallback; uint256 behaviorOnError; }', +])[0] + +// SapientCompact +export const IS_VALID_SAPIENT_SIGNATURE_COMPACT = Abi.from([ + 'function isValidSapientSignatureCompact(bytes32 _digest, bytes calldata _signature) external view returns (bytes32)', +])[0] diff --git a/packages/primitives/src/erc-6492.ts b/packages/primitives/src/erc-6492.ts index 522d37996..1cab84ac9 100644 --- a/packages/primitives/src/erc-6492.ts +++ b/packages/primitives/src/erc-6492.ts @@ -3,7 +3,7 @@ import { WrappedSignature } from 'ox/erc6492' import { DEPLOY, MAIN_MODULE } from './constants' export function erc6492Deploy(deployHash: T): { to: Address.Address; data: T } { - const encoded = AbiFunction.encodeData(AbiFunction.from(DEPLOY), [MAIN_MODULE, Hex.from(deployHash)]) + const encoded = AbiFunction.encodeData(DEPLOY, [MAIN_MODULE, Hex.from(deployHash)]) switch (typeof deployHash) { case 'object': diff --git a/packages/primitives/src/signature.ts b/packages/primitives/src/signature.ts index 378bd75da..3fc2361b4 100644 --- a/packages/primitives/src/signature.ts +++ b/packages/primitives/src/signature.ts @@ -1,5 +1,6 @@ -import { Address, Bytes } from 'ox' +import { AbiFunction, AbiParameters, Address, Bytes, Hash, Hex, Provider, Secp256k1, Signature } from 'ox' import { + Configuration, Leaf, NestedLeaf, SapientSignerLeaf, @@ -15,6 +16,8 @@ import { isSubdigestLeaf, isTopology, } from './config' +import { IS_VALID_SAPIENT_SIGNATURE, IS_VALID_SAPIENT_SIGNATURE_COMPACT, IS_VALID_SIGNATURE } from './constants' +import { fromConfigUpdate, hash, ParentedPayload } from './payload' import { minBytesFor } from './utils' export const FLAG_SIGNATURE_HASH = 0 @@ -88,7 +91,7 @@ export type RawSignature = { noChainId: boolean checkpointerData?: Bytes.Bytes configuration: RawConfiguration - suffix?: Array + suffix?: RawSignature[] } export function isRawSignature(signature: any): signature is RawSignature { @@ -1012,3 +1015,293 @@ function rawSignatureOfLeafFromJson(obj: any): SignatureOfSignerLeaf | Signature throw new Error('Invalid signature type in raw signature') } } + +export async function recover( + signature: RawSignature, + wallet: Address.Address, + chainId: bigint, + payload: ParentedPayload, + options?: { + provider?: Provider.Provider | { provider: Provider.Provider; block: number } | 'assume-valid' | 'assume-invalid' + }, +): Promise<{ configuration: Configuration; weight: bigint }> { + if (signature.suffix?.length) { + let invalid = false + + let { configuration, weight } = await recover( + { ...signature, suffix: undefined }, + wallet, + chainId, + payload, + options, + ) + + invalid ||= weight < configuration.threshold + + for (const subsignature of signature.suffix) { + const recovered = await recover( + subsignature, + wallet, + subsignature.noChainId ? 0n : chainId, + fromConfigUpdate(Bytes.toHex(hashConfiguration(configuration))), + options, + ) + + invalid ||= recovered.weight < recovered.configuration.threshold + invalid ||= recovered.configuration.checkpoint >= configuration.checkpoint + + configuration = recovered.configuration + weight = recovered.weight + } + + return { configuration, weight: invalid ? 0n : weight } + } + + const { topology, weight } = await recoverTopology( + signature.configuration.topology, + wallet, + chainId, + payload, + options, + ) + + return { configuration: { ...signature.configuration, topology }, weight } +} + +async function recoverTopology( + topology: RawTopology, + wallet: Address.Address, + chainId: bigint, + payload: ParentedPayload, + options?: { + provider?: Provider.Provider | { provider: Provider.Provider; block: number } | 'assume-valid' | 'assume-invalid' + throw?: boolean + }, +): Promise<{ topology: Topology; weight: bigint }> { + const digest = hash(wallet, chainId, payload) + + if (isRawSignerLeaf(topology)) { + switch (topology.signature.type) { + case 'eth_sign': + case 'hash': + return { + topology: { + type: 'signer', + address: Secp256k1.recoverAddress({ + payload: + topology.signature.type === 'eth_sign' + ? Hash.keccak256( + AbiParameters.encodePacked( + ['string', 'bytes32'], + ['\x19Ethereum Signed Message:\n32', Bytes.toHex(digest)], + ), + ) + : digest, + signature: { + r: Bytes.toBigInt(topology.signature.r), + s: Bytes.toBigInt(topology.signature.s), + yParity: Signature.vToYParity(topology.signature.v), + }, + }), + weight: topology.weight, + signed: true, + signature: topology.signature, + }, + weight: topology.weight, + } + + case 'erc1271': + switch (options?.provider) { + case undefined: + case 'assume-invalid': + if (options?.throw !== false) { + throw new Error(`unable to validate signer ${topology.signature.address} erc-1271 signature`) + } else { + return { + topology: { type: 'signer', address: topology.signature.address, weight: topology.weight }, + weight: 0n, + } + } + + case 'assume-valid': + return { + topology: { + type: 'signer', + address: topology.signature.address, + weight: topology.weight, + signed: true, + signature: topology.signature, + }, + weight: topology.weight, + } + + default: + const { provider, block } = + 'block' in options!.provider ? options!.provider : { provider: options!.provider } + + const call = { + to: topology.signature.address, + data: AbiFunction.encodeData(IS_VALID_SIGNATURE, [ + Bytes.toHex(digest), + Bytes.toHex(topology.signature.data), + ]), + } + + const response = await provider.request({ + method: 'eth_call', + params: block === undefined ? [call] : [call, Hex.fromNumber(block)], + }) + + if (response === AbiFunction.getSelector(IS_VALID_SIGNATURE)) { + return { + topology: { + type: 'signer', + address: topology.signature.address, + weight: topology.weight, + signed: true, + signature: topology.signature, + }, + weight: topology.weight, + } + } else { + if (options?.throw !== false) { + throw new Error(`invalid signer ${topology.signature.address} erc-1271 signature`) + } else { + return { + topology: { type: 'signer', address: topology.signature.address, weight: topology.weight }, + weight: 0n, + } + } + } + } + + case 'sapient': + case 'sapient_compact': + switch (options?.provider) { + case undefined: + case 'assume-invalid': + case 'assume-valid': + throw new Error(`unable to validate sapient signer ${topology.signature.address} signature`) + + default: + const { provider, block } = + 'block' in options!.provider ? options!.provider : { provider: options!.provider } + + const call = { + to: topology.signature.address, + data: + topology.signature.type === 'sapient' + ? AbiFunction.encodeData(IS_VALID_SAPIENT_SIGNATURE, [ + encode(chainId, payload), + Bytes.toHex(topology.signature.data), + ]) + : AbiFunction.encodeData(IS_VALID_SAPIENT_SIGNATURE_COMPACT, [ + Bytes.toHex(digest), + Bytes.toHex(topology.signature.data), + ]), + } + + const response = await provider.request({ + method: 'eth_call', + params: block === undefined ? [call] : [call, Hex.fromNumber(block)], + }) + + return { + topology: { + type: 'sapient-signer', + address: topology.signature.address, + weight: topology.weight, + imageHash: Hex.toBytes(response), + signed: true, + signature: topology.signature, + }, + weight: topology.weight, + } + } + } + } else if (isRawNestedLeaf(topology)) { + const { topology: tree, weight } = await recoverTopology(topology.tree, wallet, chainId, payload, options) + return { topology: { ...topology, tree }, weight: weight >= topology.threshold ? topology.weight : 0n } + } else if (isSignerLeaf(topology)) { + return { topology, weight: 0n } + } else if (isSapientSignerLeaf(topology)) { + return { topology, weight: 0n } + } else if (isSubdigestLeaf(topology)) { + return { + topology, + weight: Bytes.isEqual(topology.digest, digest) + ? 0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffn + : 0n, + } + } else if (isNodeLeaf(topology)) { + return { topology, weight: 0n } + } else { + const [left, right] = await Promise.all( + topology.map((topology) => recoverTopology(topology, wallet, chainId, payload, options)), + ) + return { topology: [left!.topology, right!.topology], weight: left!.weight + right!.weight } + } +} + +function encode( + chainId: bigint, + payload: ParentedPayload, +): Exclude, []>[0][0] { + switch (payload.type) { + case 'call': + return { + kind: 0, + noChainId: !chainId, + calls: payload.calls.map((call) => ({ + ...call, + data: Bytes.toHex(call.data), + behaviorOnError: call.behaviorOnError === 'ignore' ? 0n : call.behaviorOnError === 'revert' ? 1n : 2n, + })), + space: payload.space, + nonce: payload.nonce, + message: '0x', + imageHash: '0x', + digest: '0x', + parentWallets: payload.parentWallets ?? [], + } + + case 'message': + return { + kind: 1, + noChainId: !chainId, + calls: [], + space: 0n, + nonce: 0n, + message: Bytes.toHex(payload.message), + imageHash: '0x', + digest: '0x', + parentWallets: payload.parentWallets ?? [], + } + + case 'config-update': + return { + kind: 2, + noChainId: !chainId, + calls: [], + space: 0n, + nonce: 0n, + message: '0x', + imageHash: payload.imageHash, + digest: '0x', + parentWallets: payload.parentWallets ?? [], + } + + case 'digest': + return { + kind: 3, + noChainId: !chainId, + calls: [], + space: 0n, + nonce: 0n, + message: '0x', + imageHash: '0x', + digest: payload.digest, + parentWallets: payload.parentWallets ?? [], + } + } +} From b855bd4e16671a5d708ebe5af39579d237383f2d Mon Sep 17 00:00:00 2001 From: William Hua Date: Thu, 6 Feb 2025 11:48:41 -0500 Subject: [PATCH 096/439] core: validate configuration update signature --- packages/core/src/state/memory.ts | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/packages/core/src/state/memory.ts b/packages/core/src/state/memory.ts index 8552b1db4..10fda2eed 100644 --- a/packages/core/src/state/memory.ts +++ b/packages/core/src/state/memory.ts @@ -1,9 +1,12 @@ import { Configuration, + decodeSignature, + fromConfigUpdate, getCounterfactualAddress, hash, hashConfiguration, Payload, + recover, } from '@0xsequence/sequence-primitives' import { Address, Bytes, Hex } from 'ox' import { Signature, StateReader, StateWriter } from '.' @@ -125,7 +128,7 @@ export class MemoryStore implements StateReader, StateWriter { } } - setConfiguration(wallet: Address.Address, configuration: Configuration, signature: Hex.Hex): void { + async setConfiguration(wallet: Address.Address, configuration: Configuration, signature: Hex.Hex): Promise { const configurationPath = this.objects.configurationPaths[wallet] if (!configurationPath) { throw new Error(`no configuration path for wallet ${wallet}`) @@ -153,6 +156,20 @@ export class MemoryStore implements StateReader, StateWriter { ) } + const { configuration: recovered, weight } = await recover( + decodeSignature(Hex.toBytes(signature)), + wallet, + 0n, + fromConfigUpdate(Bytes.toHex(hashConfiguration(configuration))), + ) + if (weight < recovered.threshold) { + throw new Error(`invalid signature: weight ${weight} < threshold ${recovered.threshold}`) + } + const recoveredImageHash = Bytes.toHex(hashConfiguration(recovered)) + if (recoveredImageHash !== latestImageHash) { + throw new Error(`invalid signature: recovered ${recoveredImageHash} != latest ${latestImageHash}`) + } + configurationPath.updates.push({ imageHash: Bytes.toHex(hashConfiguration(configuration)), signature }) } } From f7f0d8dfeb12beb66a736fdde1614a2332846b0c Mon Sep 17 00:00:00 2001 From: William Hua Date: Thu, 6 Feb 2025 11:54:54 -0500 Subject: [PATCH 097/439] core: temporarily return all updates --- packages/core/src/state/memory.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/core/src/state/memory.ts b/packages/core/src/state/memory.ts index 10fda2eed..4ceadc344 100644 --- a/packages/core/src/state/memory.ts +++ b/packages/core/src/state/memory.ts @@ -79,7 +79,7 @@ export class MemoryStore implements StateReader, StateWriter { const updates: Array<{ imageHash: Hex.Hex; signature: Hex.Hex }> = [] while (index + 1 < configurationPath.updates.length) { for (let next = configurationPath.updates.length - 1; next > index; next--) { - if (true) { + if (next === index + 1) { updates.push(configurationPath.updates[next]!) index = next break From 616726100811ff911371057cb3df0ebc531ee1fa Mon Sep 17 00:00:00 2001 From: William Hua Date: Thu, 6 Feb 2025 12:00:38 -0500 Subject: [PATCH 098/439] primitives: getWeight(Topology) --- packages/primitives/src/config.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/primitives/src/config.ts b/packages/primitives/src/config.ts index fde979a66..77ebd8c3c 100644 --- a/packages/primitives/src/config.ts +++ b/packages/primitives/src/config.ts @@ -111,7 +111,7 @@ export function getSigners(configuration: Configuration | Topology): { return { signers: Array.from(signers), isComplete } } -export function getWeight(configuration: Configuration, signers: Address.Address[]): bigint { +export function getWeight(configuration: Configuration | Topology, signers: Address.Address[]): bigint { const set = new Set(signers) const scan = (topology: Topology): bigint => { From c9166354a620bd29b4634c41c14bd5f4c2322d15 Mon Sep 17 00:00:00 2001 From: Agusx1211 Date: Thu, 6 Feb 2025 18:57:58 +0000 Subject: [PATCH 099/439] Inline sapient struct --- packages/primitives/src/constants.ts | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/packages/primitives/src/constants.ts b/packages/primitives/src/constants.ts index c08e3b0e4..e3f15322a 100644 --- a/packages/primitives/src/constants.ts +++ b/packages/primitives/src/constants.ts @@ -2,7 +2,6 @@ import { Abi, Address, Hex } from 'ox' export const FACTORY: Address.Address = '0xTODO' export const MAIN_MODULE: Address.Address = '0xTODO' - export const CREATION_CODE: Hex.Hex = '0xTODO' // ERC1271 @@ -20,9 +19,7 @@ export const IMAGE_HASH = Abi.from(['function imageHash() external view returns // Sapient export const IS_VALID_SAPIENT_SIGNATURE = Abi.from([ - 'function isValidSapientSignature(Payload.Decoded calldata _payload, bytes calldata _signature) external view returns (bytes32)', - 'struct Payload.Decoded { uint8 kind; bool noChainId; Call[] calls; uint256 space; uint256 nonce; bytes message; bytes32 imageHash; bytes32 digest; address[] parentWallets; }', - 'struct Call { address to; uint256 value; bytes data; uint256 gasLimit; bool delegateCall; bool onlyFallback; uint256 behaviorOnError; }', + 'function isValidSapientSignature((uint8 kind,bool noChainId,(address to,uint256 value,bytes data,uint256 gasLimit,bool delegateCall,bool onlyFallback,uint256 behaviorOnError)[] calls,uint256 space,uint256 nonce,bytes message,bytes32 imageHash,bytes32 digest,address[] parentWallets) calldata _payload, bytes calldata _signature) external view returns (bytes32)', ])[0] // SapientCompact From 2066c5f0820780861414a1a2ec59136769004487 Mon Sep 17 00:00:00 2001 From: Michael Standen Date: Fri, 7 Feb 2025 10:15:47 +1300 Subject: [PATCH 100/439] Explicit session functions --- .../primitives-cli/src/subcommands/session.ts | 29 +-------- .../src/subcommands/sessionExplicit.ts | 63 +++++++++++++++++++ ...n-config.ts => session-explicit-config.ts} | 2 +- ...ature.ts => session-explicit-signature.ts} | 20 ++---- 4 files changed, 73 insertions(+), 41 deletions(-) create mode 100644 packages/primitives-cli/src/subcommands/sessionExplicit.ts rename packages/primitives/src/{session-config.ts => session-explicit-config.ts} (98%) rename packages/primitives/src/{session-signature.ts => session-explicit-signature.ts} (66%) diff --git a/packages/primitives-cli/src/subcommands/session.ts b/packages/primitives-cli/src/subcommands/session.ts index e2f6d4dd1..4342d3ef3 100644 --- a/packages/primitives-cli/src/subcommands/session.ts +++ b/packages/primitives-cli/src/subcommands/session.ts @@ -1,34 +1,11 @@ -import { encodeSessionsTopology, sessionsTopologyFromJson } from '@0xsequence/sequence-primitives' -import { Hex } from 'ox' import type { CommandModule } from 'yargs' -import { fromPosOrStdin } from '../utils' - -async function doEncodeSessionsTopology(input: string): Promise { - const topology = sessionsTopologyFromJson(input) - const packed = encodeSessionsTopology(topology) - console.log(Hex.from(packed)) -} +import sessionExplicitCommand from './sessionExplicit' const sessionCommand: CommandModule = { command: 'session', - describe: 'Session conversion utilities', + describe: 'Session utilities', builder: (yargs) => { - return yargs - .command( - 'to-packed-topology [session-topology]', - 'Convert session topology to packed format', - (yargs) => { - return yargs.positional('session-topology', { - type: 'string', - description: 'Input session topology to convert', - }) - }, - async (argv) => { - const permission = await fromPosOrStdin(argv, 'session-topology') - await doEncodeSessionsTopology(permission) - }, - ) - .demandCommand(1, 'You must specify a subcommand for session') + return yargs.command(sessionExplicitCommand).demandCommand(1, 'You must specify a subcommand for session') }, handler: () => {}, } diff --git a/packages/primitives-cli/src/subcommands/sessionExplicit.ts b/packages/primitives-cli/src/subcommands/sessionExplicit.ts new file mode 100644 index 000000000..73ba66915 --- /dev/null +++ b/packages/primitives-cli/src/subcommands/sessionExplicit.ts @@ -0,0 +1,63 @@ +import { encodeSessionsTopology, sessionsTopologyFromJson } from '@0xsequence/sequence-primitives' +import { Hex } from 'ox' +import type { CommandModule } from 'yargs' +import { fromPosOrStdin } from '../utils' + +async function doEncodeSessionsTopology(input: string): Promise { + const topology = sessionsTopologyFromJson(input) + const packed = encodeSessionsTopology(topology) + console.log(Hex.from(packed)) +} + +const sessionExplicitCommand: CommandModule = { + command: 'explicit', + describe: 'Explicit session utilities', + builder: (yargs) => { + return yargs + .command( + 'empty', + 'Create an empty session topology', + () => {}, + async () => { + console.log([]) + }, + ) + .command( + 'add [explicit-session] [session-topology]', + 'Add a session to the session topology', + (yargs) => { + return yargs + .positional('explicit-session', { + type: 'string', + description: 'Explicit session to add', + }) + .positional('session-topology', { + type: 'string', + description: 'Session topology to add to', + }) + }, + async (argv) => { + const explicitSession = await fromPosOrStdin(argv, 'explicit-session') + const sessionTopology = await fromPosOrStdin(argv, 'session-topology') + }, + ) + .command( + 'to-packed-topology [session-topology]', + 'Convert session topology to packed format', + (yargs) => { + return yargs.positional('session-topology', { + type: 'string', + description: 'Input session topology to convert', + }) + }, + async (argv) => { + const permission = await fromPosOrStdin(argv, 'session-topology') + await doEncodeSessionsTopology(permission) + }, + ) + .demandCommand(1, 'You must specify a subcommand for session') + }, + handler: () => {}, +} + +export default sessionExplicitCommand diff --git a/packages/primitives/src/session-config.ts b/packages/primitives/src/session-explicit-config.ts similarity index 98% rename from packages/primitives/src/session-config.ts rename to packages/primitives/src/session-explicit-config.ts index 950db1587..9782c8ffe 100644 --- a/packages/primitives/src/session-config.ts +++ b/packages/primitives/src/session-explicit-config.ts @@ -1,4 +1,4 @@ -import { Address, Bytes } from 'ox' +import { Bytes } from 'ox' import { encodeSessionPermissions, SessionPermissions, diff --git a/packages/primitives/src/session-signature.ts b/packages/primitives/src/session-explicit-signature.ts similarity index 66% rename from packages/primitives/src/session-signature.ts rename to packages/primitives/src/session-explicit-signature.ts index e290b4f9d..a37d780a6 100644 --- a/packages/primitives/src/session-signature.ts +++ b/packages/primitives/src/session-explicit-signature.ts @@ -1,17 +1,16 @@ -import { Address, Bytes } from 'ox' +import { Bytes } from 'ox' import { Attestation, encodeAttestation } from './attestation' -import { encodeSessionsTopology, SessionsTopology } from './session-config' +import { encodeSessionsTopology, SessionsTopology } from './session-explicit-config' import { packRSV } from './utils' -export type SessionManagerSignature = { +export type ExplicitSessionSignature = { attestation: Attestation sessionsTopology: SessionsTopology - implicitBlacklist: Address.Address[] permissionIdxPerCall: number[] } -export function encodeSessionSignature( - signature: SessionManagerSignature, +export function encodeExplicitSessionSignature( + signature: ExplicitSessionSignature, sessionSignature: { v: number; r: Bytes.Bytes; s: Bytes.Bytes }, globalSignature: { v: number; r: Bytes.Bytes; s: Bytes.Bytes }, ): Bytes.Bytes { @@ -33,14 +32,7 @@ export function encodeSessionSignature( parts.push(Bytes.padLeft(Bytes.fromNumber(encodedSessionsTopology.length), 3)) parts.push(encodedSessionsTopology) - // Add blacklist with size prefix - parts.push(Bytes.padLeft(Bytes.fromNumber(signature.implicitBlacklist.length), 3)) - for (const addr of signature.implicitBlacklist) { - parts.push(Bytes.fromHex(addr)) - } - - // Add permission indices with size prefix - parts.push(Bytes.padLeft(Bytes.fromNumber(signature.permissionIdxPerCall.length), 3)) + // Add permission indices. No size prefix. All remaining bytes are assumed to be included. parts.push(new Uint8Array(signature.permissionIdxPerCall)) return Bytes.concat(...parts) From 3b1446625f5811d7c512d4ee4475d2047dee2837 Mon Sep 17 00:00:00 2001 From: Michael Standen Date: Fri, 7 Feb 2025 12:22:51 +1300 Subject: [PATCH 101/439] Explicit sessions CLI --- .../src/subcommands/sessionExplicit.ts | 67 ++++- packages/primitives/src/index.ts | 4 +- packages/primitives/src/permission.ts | 2 +- .../primitives/src/session-explicit-config.ts | 260 ++++++++++++++++-- 4 files changed, 298 insertions(+), 35 deletions(-) diff --git a/packages/primitives-cli/src/subcommands/sessionExplicit.ts b/packages/primitives-cli/src/subcommands/sessionExplicit.ts index 73ba66915..3f4983431 100644 --- a/packages/primitives-cli/src/subcommands/sessionExplicit.ts +++ b/packages/primitives-cli/src/subcommands/sessionExplicit.ts @@ -1,10 +1,22 @@ -import { encodeSessionsTopology, sessionsTopologyFromJson } from '@0xsequence/sequence-primitives' -import { Hex } from 'ox' +import { + encodeSessionsTopology, + isEmptySessionsTopology, + isSessionsTopology, + mergeSessionsTopologies, + removeSessionPermission, + sessionsTopologyFromJson, + sessionsTopologyToJson, +} from '@0xsequence/sequence-primitives' +import { Bytes, Hex } from 'ox' import type { CommandModule } from 'yargs' import { fromPosOrStdin } from '../utils' async function doEncodeSessionsTopology(input: string): Promise { - const topology = sessionsTopologyFromJson(input) + let topology = sessionsTopologyFromJson(input) + if (isEmptySessionsTopology(topology)) { + // Encode a node of bytes32(0) + topology = Bytes.fromHex('0x0000000000000000000000000000000000000000000000000000000000000000') + } const packed = encodeSessionsTopology(topology) console.log(Hex.from(packed)) } @@ -34,11 +46,56 @@ const sessionExplicitCommand: CommandModule = { .positional('session-topology', { type: 'string', description: 'Session topology to add to', + required: true, }) }, async (argv) => { - const explicitSession = await fromPosOrStdin(argv, 'explicit-session') - const sessionTopology = await fromPosOrStdin(argv, 'session-topology') + // This function can also merge two topologies + const sessionInput = argv.explicitSession + if (!sessionInput) { + throw new Error('Explicit session is required') + } + const session = sessionsTopologyFromJson(sessionInput) + const topologyInput = await fromPosOrStdin(argv, 'session-topology') + const topology = sessionsTopologyFromJson(topologyInput) + if (!isSessionsTopology(session)) { + throw new Error('Explicit session must be a valid session topology') + } + if (!isSessionsTopology(topology) && !isEmptySessionsTopology(topology)) { + throw new Error('Session topology must be a valid session topology') + } + const json = sessionsTopologyToJson(mergeSessionsTopologies(topology, session)) + console.log(json) + }, + ) + .command( + 'remove [explicit-session-address] [session-topology]', + 'Remove a session from the session topology', + (yargs) => { + return yargs + .positional('explicit-session-address', { + type: 'string', + description: 'Explicit session address to remove', + }) + .positional('session-topology', { + type: 'string', + description: 'Session topology to remove from', + }) + }, + async (argv) => { + const explicitSessionAddress = argv.explicitSessionAddress + const topologyInput = await fromPosOrStdin(argv, 'session-topology') + const topology = sessionsTopologyFromJson(topologyInput) + if (!isSessionsTopology(topology) && !isEmptySessionsTopology(topology)) { + throw new Error('Session topology must be a valid session topology') + } + if (!explicitSessionAddress || !explicitSessionAddress.startsWith('0x')) { + throw new Error('Explicit session address must be a valid address') + } + const json = sessionsTopologyToJson( + removeSessionPermission(topology, explicitSessionAddress as `0x${string}`), + ) + console.log(json) }, ) .command( diff --git a/packages/primitives/src/index.ts b/packages/primitives/src/index.ts index 466eee6b7..df8b4eb63 100644 --- a/packages/primitives/src/index.ts +++ b/packages/primitives/src/index.ts @@ -4,7 +4,7 @@ export * from './constants' export * from './erc-6492' export * from './payload' export * from './permission' -export * from './session-config' -export * from './session-signature' +export * from './session-explicit-config' +export * from './session-explicit-signature' export * from './signature' export * from './utils' diff --git a/packages/primitives/src/permission.ts b/packages/primitives/src/permission.ts index 8ddea3395..fd9527644 100644 --- a/packages/primitives/src/permission.ts +++ b/packages/primitives/src/permission.ts @@ -69,7 +69,7 @@ export function sessionPermissionsToJson(sessionPermissions: SessionPermissions) return JSON.stringify(encodeSessionPermissionsForJson(sessionPermissions)) } -function encodeSessionPermissionsForJson(sessionPermissions: SessionPermissions): any { +export function encodeSessionPermissionsForJson(sessionPermissions: SessionPermissions): any { return { signer: sessionPermissions.signer.toString(), valueLimit: sessionPermissions.valueLimit.toString(), diff --git a/packages/primitives/src/session-explicit-config.ts b/packages/primitives/src/session-explicit-config.ts index 9782c8ffe..ca17f9b96 100644 --- a/packages/primitives/src/session-explicit-config.ts +++ b/packages/primitives/src/session-explicit-config.ts @@ -1,9 +1,9 @@ import { Bytes } from 'ox' import { encodeSessionPermissions, + encodeSessionPermissionsForJson, SessionPermissions, sessionPermissionsFromParsed, - sessionPermissionsToJson, } from './permission' import { minBytesFor } from './utils' @@ -15,33 +15,42 @@ export type SessionNode = Bytes.Bytes // Hashed export type SessionLeaf = SessionPermissions export type SessionBranch = [SessionsTopology, SessionsTopology, ...SessionsTopology[]] export type SessionsTopology = SessionBranch | SessionLeaf | SessionNode +export type EmptySessionsTopology = [] -function isNode(topology: SessionsTopology): topology is SessionNode { +function isSessionsNode(topology: any): topology is SessionNode { return Bytes.validate(topology) } -function isLeaf(topology: SessionsTopology): topology is SessionLeaf { - return typeof topology === 'object' && 'signer' in topology +function isSessionsLeaf(topology: any): topology is SessionLeaf { + return typeof topology === 'object' && topology !== null && 'signer' in topology } -function isBranch(topology: SessionsTopology): topology is SessionBranch { - return Array.isArray(topology) && topology.length === 2 && isTopology(topology[0]!) && isTopology(topology[1]!) +function isSessionsBranch(topology: any): topology is SessionBranch { + return Array.isArray(topology) && topology.length >= 2 && topology.every((child) => isSessionsTopology(child)) } -function isTopology(topology: SessionsTopology): topology is SessionsTopology { - return isBranch(topology) || isLeaf(topology) || isNode(topology) +export function isSessionsTopology(topology: any): topology is SessionsTopology { + return isSessionsBranch(topology) || isSessionsLeaf(topology) || isSessionsNode(topology) } +export function isEmptySessionsTopology(topology: any): topology is EmptySessionsTopology { + return Array.isArray(topology) && topology.length === 0 +} + +// Encoding + export function encodeSessionsTopology(topolgy: SessionsTopology): Bytes.Bytes { - if (isBranch(topolgy)) { + if (isSessionsBranch(topolgy)) { const branch = topolgy as SessionBranch const encodedBranches = [] for (const node of branch) { encodedBranches.push(encodeSessionsTopology(node)) } const encoded = Bytes.concat(...encodedBranches) - let encodedSize = minBytesFor(BigInt(encoded.length)) - if (encodedSize > 15) throw new Error('Branch too large') + const encodedSize = minBytesFor(BigInt(encoded.length)) + if (encodedSize > 15) { + throw new Error('Branch too large') + } const flagByte = (SESSIONS_FLAG_BRANCH << 4) | encodedSize return Bytes.concat( Bytes.fromNumber(flagByte), @@ -50,30 +59,41 @@ export function encodeSessionsTopology(topolgy: SessionsTopology): Bytes.Bytes { ) } - if (isLeaf(topolgy)) { + if (isSessionsLeaf(topolgy)) { + const flagByte = SESSIONS_FLAG_PERMISSIONS << 4 const encodedLeaf = encodeSessionPermissions(topolgy) - return Bytes.concat(Bytes.fromNumber(SESSIONS_FLAG_PERMISSIONS), encodedLeaf) + return Bytes.concat(Bytes.fromNumber(flagByte), encodedLeaf) } - if (isNode(topolgy)) { - return Bytes.concat(Bytes.fromNumber(SESSIONS_FLAG_NODE), topolgy) + if (isSessionsNode(topolgy)) { + const flagByte = SESSIONS_FLAG_NODE << 4 + return Bytes.concat(Bytes.fromNumber(flagByte), topolgy) } throw new Error('Invalid topology') } -export function sessionsTopologyToJson(topology: SessionsTopology): string { - if (isNode(topology)) { +// JSON + +export function sessionsTopologyToJson(topology: SessionsTopology | EmptySessionsTopology): string { + return JSON.stringify(encodeSessionsTopologyForJson(topology)) +} + +function encodeSessionsTopologyForJson(topology: SessionsTopology | EmptySessionsTopology): any { + if (isEmptySessionsTopology(topology)) { + return [] + } + + if (isSessionsNode(topology)) { return Bytes.toHex(topology) } - if (isLeaf(topology)) { - return sessionPermissionsToJson(topology) + if (isSessionsLeaf(topology)) { + return encodeSessionPermissionsForJson(topology) } - if (isBranch(topology)) { - const branch = topology as SessionBranch - return `[${branch.map((node) => sessionsTopologyToJson(node)).join(',')}]` + if (isSessionsBranch(topology)) { + return topology.map((node) => encodeSessionsTopologyForJson(node)) } throw new Error('Invalid topology') @@ -85,18 +105,204 @@ export function sessionsTopologyFromJson(json: string): SessionsTopology { } function sessionsTopologyFromParsed(parsed: any): SessionsTopology { - if (isNode(parsed)) { - return parsed + // If it's a valid hex string, attempt to parse as node + if (typeof parsed === 'string' && parsed.startsWith('0x')) { + const maybeBytes = Bytes.fromHex(parsed as `0x${string}`) + if (Bytes.validate(maybeBytes)) { + return maybeBytes + } } - if (isLeaf(parsed)) { + // If it looks like session permissions + if ( + typeof parsed === 'object' && + parsed !== null && + 'signer' in parsed && + 'valueLimit' in parsed && + 'deadline' in parsed && + 'permissions' in parsed + ) { return sessionPermissionsFromParsed(parsed) } - if (isBranch(parsed)) { - const branches = parsed.map((node: SessionsTopology) => sessionsTopologyFromParsed(node)) + // If it's an array, try to interpret as a branch + if (Array.isArray(parsed)) { + const branches = parsed.map((node: any) => sessionsTopologyFromParsed(node)) return branches as SessionBranch } throw new Error('Invalid topology') } + +// Operations + +/** + * Removes all session permissions (leaf nodes) that match the given signer from the topology. + * Returns the updated topology or EmptySessionsTopology if it becomes empty. + * If the signer is not found, the topology is returned unchanged. + */ +export function removeSessionPermission( + topology: SessionsTopology | EmptySessionsTopology, + signerAddress: `0x${string}`, +): SessionsTopology | EmptySessionsTopology { + if (isEmptySessionsTopology(topology)) { + return topology + } + + // If it's a node (hashed bytes), we leave it as is: + if (isSessionsNode(topology)) { + return topology + } + + // If it's a leaf, remove it if the signer matches: + if (isSessionsLeaf(topology)) { + if (topology.signer === signerAddress) { + return [] + } + // Otherwise, keep it as is + return topology + } + + // If it's a branch, recurse on each child: + if (isSessionsBranch(topology)) { + const newChildren: SessionsTopology[] = [] + for (const child of topology) { + const updatedChild = removeSessionPermission(child, signerAddress) + if (!isEmptySessionsTopology(updatedChild)) { + newChildren.push(updatedChild) + } + } + + // If no children remain, return null to remove entire branch + if (newChildren.length === 0) { + return [] + } + + // If exactly one child remains, collapse upward + if (newChildren.length === 1) { + return newChildren[0]! + } + + // Otherwise, return the updated branch + return newChildren as SessionBranch + } + + // Unreachable + throw new Error('Invalid topology') +} + +/** + * Merges two topologies into a new branch of [a, b]. + */ +export function mergeSessionsTopologies( + a: SessionsTopology | EmptySessionsTopology, + b: SessionsTopology | EmptySessionsTopology, +): SessionsTopology { + const isEmptyA = isEmptySessionsTopology(a) + const isEmptyB = isEmptySessionsTopology(b) + if (isEmptyA && isEmptyB) { + throw new Error('Cannot merge two empty topologies') + } + if (isEmptyA) { + return b as SessionsTopology + } + if (isEmptyB) { + return a as SessionsTopology + } + return [a, b] +} + +/** + * Helper to flatten a topology into an array of leaves and nodes only. + * We ignore branches by recursing into them. + */ +function flattenSessionsTopology(topology: SessionsTopology): (SessionLeaf | SessionNode)[] { + if (isSessionsLeaf(topology) || isSessionsNode(topology)) { + return [topology] + } + // If it's a branch, flatten all children + const result: (SessionLeaf | SessionNode)[] = [] + for (const child of topology) { + result.push(...flattenSessionsTopology(child)) + } + return result +} + +/** + * Helper to build a balanced binary tree from an array of leaves/nodes. + * This function returns: + * - A single leaf/node if there's only 1 item + * - A branch of two subtrees otherwise + */ +function buildBalancedSessionsTopology(items: (SessionLeaf | SessionNode)[]): SessionsTopology { + if (items.length === 1) { + return items[0]! + } + if (items.length === 0) { + throw new Error('Cannot build a topology from an empty list') + } + const mid = Math.floor(items.length / 2) + const left = items.slice(0, mid) + const right = items.slice(mid) + // Recursively build subtrees + const leftTopo = buildBalancedSessionsTopology(left) + const rightTopo = buildBalancedSessionsTopology(right) + return [leftTopo, rightTopo] +} + +/** + * Balances the topology by flattening and rebuilding as a balanced binary tree. + */ +export function balanceSessionsTopology(topology: SessionsTopology): SessionsTopology { + const flattened = flattenSessionsTopology(topology) + return buildBalancedSessionsTopology(flattened) +} + +/** + * Cleans a topology by removing leaves (SessionPermissions) whose deadline has expired. + * - currentTime is compared against `session.deadline`. + * - If a branch ends up with zero valid leaves, return `null`. + * - If it has one child, collapse that child upward. + */ +export function cleanSessionsTopology( + topology: SessionsTopology, + currentTime: bigint = BigInt(Math.floor(Date.now() / 1000)), +): SessionsTopology | null { + // If it's a node, just return it as is. + if (isSessionsNode(topology)) { + return topology + } + + // If it's a leaf, check the deadline + if (isSessionsLeaf(topology)) { + const leaf = topology + if (leaf.deadline < currentTime) { + // Expired => remove + return null + } + // Valid => keep + return leaf + } + + // If it's a branch, clean all children + const newChildren: SessionsTopology[] = [] + for (const child of topology) { + const cleanedChild = cleanSessionsTopology(child, currentTime) + if (cleanedChild !== null) { + newChildren.push(cleanedChild) + } + } + + // If no children remain, return null + if (newChildren.length === 0) { + return null + } + + // If exactly one child remains, collapse upward: + if (newChildren.length === 1) { + return newChildren[0]! + } + + // Otherwise, return a new branch with the cleaned children + return newChildren as SessionBranch +} From 265a8387b5939d3d5ed02ed5fcaaa27dd6ec625a Mon Sep 17 00:00:00 2001 From: Michael Standen Date: Fri, 7 Feb 2025 13:52:10 +1300 Subject: [PATCH 102/439] sessions explicit use --- .../src/subcommands/sessionExplicit.ts | 47 +++++++++++++++++++ .../src/session-explicit-signature.ts | 18 ++----- 2 files changed, 51 insertions(+), 14 deletions(-) diff --git a/packages/primitives-cli/src/subcommands/sessionExplicit.ts b/packages/primitives-cli/src/subcommands/sessionExplicit.ts index 3f4983431..d409f6832 100644 --- a/packages/primitives-cli/src/subcommands/sessionExplicit.ts +++ b/packages/primitives-cli/src/subcommands/sessionExplicit.ts @@ -1,5 +1,6 @@ import { encodeSessionsTopology, + encodeExplicitSessionSignature, isEmptySessionsTopology, isSessionsTopology, mergeSessionsTopologies, @@ -98,6 +99,52 @@ const sessionExplicitCommand: CommandModule = { console.log(json) }, ) + .command( + 'use [signature] [permission-indexes] [session-topology]', + 'Encode a signature with the given session topology', + (yargs) => { + return yargs + .positional('signature', { + type: 'string', + description: 'Signature to encode (r:s:v)', + }) + .positional('permission-indexes', { + type: 'string', + description: 'Indexes of the permissions to use (comma separated)', + }) + .positional('session-topology', { + type: 'string', + description: 'Session topology to use', + }) + }, + async (argv) => { + const signatureInput = argv.signature + if (!signatureInput) { + throw new Error('Signature is required') + } + // Decode signature from "r:s:v" + const signatureParts = signatureInput.split(':') + if (signatureParts.length !== 3) { + throw new Error('Signature must be in r:s:v format') + } + const signature = { + r: Bytes.fromHex(signatureParts[0] as `0x${string}`), + s: Bytes.fromHex(signatureParts[1] as `0x${string}`), + v: parseInt(signatureParts[2] ?? ''), + } + + const permissionIndexesInput = argv.permissionIndexes + if (!permissionIndexesInput) { + throw new Error('Permission indexes are required') + } + const permissionIndexes = permissionIndexesInput.split(',').map((index) => parseInt(index)) + //TODO Validate that the permission index is valid + const topologyInput = await fromPosOrStdin(argv, 'session-topology') + const topology = sessionsTopologyFromJson(topologyInput) + const encoded = encodeExplicitSessionSignature(topology, permissionIndexes, signature) + console.log(Hex.from(encoded)) + }, + ) .command( 'to-packed-topology [session-topology]', 'Convert session topology to packed format', diff --git a/packages/primitives/src/session-explicit-signature.ts b/packages/primitives/src/session-explicit-signature.ts index a37d780a6..f63b85ce2 100644 --- a/packages/primitives/src/session-explicit-signature.ts +++ b/packages/primitives/src/session-explicit-signature.ts @@ -1,39 +1,29 @@ import { Bytes } from 'ox' -import { Attestation, encodeAttestation } from './attestation' import { encodeSessionsTopology, SessionsTopology } from './session-explicit-config' import { packRSV } from './utils' export type ExplicitSessionSignature = { - attestation: Attestation sessionsTopology: SessionsTopology permissionIdxPerCall: number[] } export function encodeExplicitSessionSignature( - signature: ExplicitSessionSignature, + topology: SessionsTopology, + permissionIndexes: number[], sessionSignature: { v: number; r: Bytes.Bytes; s: Bytes.Bytes }, - globalSignature: { v: number; r: Bytes.Bytes; s: Bytes.Bytes }, ): Bytes.Bytes { const parts: Bytes.Bytes[] = [] // Add session signature (r,sv) parts.push(packRSV(sessionSignature)) - // Add attestation components - parts.push(encodeAttestation(signature.attestation)) - - // Add global signature (r,s,v) - parts.push(globalSignature.r) - parts.push(globalSignature.s) - parts.push(new Uint8Array([globalSignature.v])) - // Encode sessions topology - const encodedSessionsTopology = encodeSessionsTopology(signature.sessionsTopology) + const encodedSessionsTopology = encodeSessionsTopology(topology) parts.push(Bytes.padLeft(Bytes.fromNumber(encodedSessionsTopology.length), 3)) parts.push(encodedSessionsTopology) // Add permission indices. No size prefix. All remaining bytes are assumed to be included. - parts.push(new Uint8Array(signature.permissionIdxPerCall)) + parts.push(new Uint8Array(permissionIndexes)) return Bytes.concat(...parts) } From 6af23a96d251c125b578393d6693d7ac3e99edac Mon Sep 17 00:00:00 2001 From: Agusx1211 Date: Fri, 7 Feb 2025 10:22:07 +0000 Subject: [PATCH 103/439] Fix signature decoding --- packages/primitives/src/signature.ts | 196 +++++++++++++++++---------- 1 file changed, 121 insertions(+), 75 deletions(-) diff --git a/packages/primitives/src/signature.ts b/packages/primitives/src/signature.ts index 3fc2361b4..1e89a0f04 100644 --- a/packages/primitives/src/signature.ts +++ b/packages/primitives/src/signature.ts @@ -256,111 +256,117 @@ export function parseBranch(signature: Bytes.Bytes): { let index = 0 while (index < signature.length) { - if (index >= signature.length) { - throw new Error('Unexpected end of signature while parsing branch') - } const firstByte = signature[index]! index++ const flag = (firstByte & 0xf0) >> 4 - if (flag === FLAG_SIGNATURE_HASH || flag === FLAG_SIGNATURE_ETH_SIGN) { - const v = ((firstByte & 0x10) >> 4) + 27 - let weight = BigInt(firstByte & 0x07) - if (weight === 0n) { + // FLAG_SIGNATURE_HASH = 0 => bottom nibble is weight + // Then read 64 bytes => r, yParityAndS => top bit => yParity => s is the rest => v=27+yParity + if (flag === FLAG_SIGNATURE_HASH) { + let weight = firstByte & 0x0f + if (weight === 0) { if (index >= signature.length) { - throw new Error('Not enough bytes for weight') + throw new Error('Not enough bytes for dynamic weight') } - weight = BigInt(signature[index]!) + weight = signature[index]! index++ } - if (index + 64 > signature.length) { - throw new Error('Not enough bytes for r,s') + throw new Error('Not enough bytes for hash signature (r + yParityAndS)') } const r = signature.slice(index, index + 32) - const s = signature.slice(index + 32, index + 64) + const yParityAndS = signature.slice(index + 32, index + 64) index += 64 + const yParity = (yParityAndS[0]! & 0x80) !== 0 ? 1 : 0 + const s = new Uint8Array(32) + s.set(yParityAndS) + s[0] = s[0]! & 0x7f // clear the top bit + + const v = 27 + yParity nodes.push({ - weight, + type: 'unrecovered-signer', + weight: BigInt(weight), signature: { + type: 'hash', r, s, v, - type: flag === 0x00 ? 'hash' : 'eth_sign', }, } as RawSignerLeaf) continue } + // FLAG_ADDRESS = 1 => bottom nibble is weight => read 20 bytes => no signature if (flag === FLAG_ADDRESS) { - let weight = BigInt(firstByte & 0x0f) - if (weight === 0n) { + let weight = firstByte & 0x0f + if (weight === 0) { if (index >= signature.length) { throw new Error('Not enough bytes for address weight') } - weight = BigInt(signature[index]!) + weight = signature[index]! index++ } - if (index + 20 > signature.length) { - throw new Error('Not enough bytes for address') + throw new Error('Not enough bytes for address leaf') } - const address = signature.slice(index, index + 20) + const addr = Bytes.toHex(signature.slice(index, index + 20)) index += 20 nodes.push({ type: 'signer', - address: Bytes.toHex(address), - weight, + address: addr, + weight: BigInt(weight), } as SignerLeaf) continue } + // FLAG_SIGNATURE_ERC1271 = 2 => bottom 2 bits => weight, next 2 bits => sizeSize if (flag === FLAG_SIGNATURE_ERC1271) { - let weight = BigInt(firstByte & 0x03) - if (weight === 0n) { + let weight = firstByte & 0x03 + if (weight === 0) { if (index >= signature.length) { throw new Error('Not enough bytes for ERC1271 weight') } - weight = BigInt(signature[index]!) + weight = signature[index]! index++ } - if (index + 20 > signature.length) { - throw new Error('Not enough bytes for ERC1271 signer') + throw new Error('Not enough bytes for ERC1271 signer address') } - const signer = signature.slice(index, index + 20) + const signer = Bytes.toHex(signature.slice(index, index + 20)) index += 20 const sizeSize = (firstByte & 0x0c) >> 2 if (index + sizeSize > signature.length) { - throw new Error('Not enough bytes for ERC1271 size') + throw new Error('Not enough bytes for ERC1271 sizeSize') } - const size = Bytes.toNumber(signature.slice(index, index + sizeSize)) + const dataSize = Bytes.toNumber(signature.slice(index, index + sizeSize)) index += sizeSize - if (index + size > signature.length) { - throw new Error('Not enough bytes for ERC1271 sub-signature') + if (index + dataSize > signature.length) { + throw new Error('Not enough bytes for ERC1271 data') } - const subSignature = signature.slice(index, index + size) - index += size + const subSignature = signature.slice(index, index + dataSize) + index += dataSize nodes.push({ - weight, + type: 'unrecovered-signer', + weight: BigInt(weight), signature: { - address: Bytes.toHex(signer), - data: subSignature, type: 'erc1271', + address: signer, + data: subSignature, }, } as RawSignerLeaf) continue } + // FLAG_NODE = 3 => read 32 bytes as a node hash if (flag === FLAG_NODE) { if (index + 32 > signature.length) { - throw new Error('Not enough bytes for node hash') + throw new Error('Not enough bytes for node leaf') } const node = signature.slice(index, index + 32) index += 32 @@ -369,16 +375,17 @@ export function parseBranch(signature: Bytes.Bytes): { continue } + // FLAG_BRANCH = 4 => next nibble => sizeSize => read size => parse sub-branch if (flag === FLAG_BRANCH) { const sizeSize = firstByte & 0x0f if (index + sizeSize > signature.length) { - throw new Error('Not enough bytes for branch size') + throw new Error('Not enough bytes for branch sizeSize') } const size = Bytes.toNumber(signature.slice(index, index + sizeSize)) index += sizeSize if (index + size > signature.length) { - throw new Error('Not enough bytes for branch data') + throw new Error('Not enough bytes in sub-branch') } const branchBytes = signature.slice(index, index + size) index += size @@ -387,33 +394,49 @@ export function parseBranch(signature: Bytes.Bytes): { if (leftover.length > 0) { throw new Error('Leftover bytes in sub-branch') } - const subTree = foldNodes(subNodes) nodes.push(subTree) continue } + // FLAG_SUBDIGEST = 5 => read 32 bytes => push subdigest leaf + if (flag === FLAG_SUBDIGEST) { + if (index + 32 > signature.length) { + throw new Error('Not enough bytes for subdigest') + } + const hardcoded = signature.slice(index, index + 32) + index += 32 + nodes.push({ + type: 'subdigest', + digest: hardcoded, + } as SubdigestLeaf) + continue + } + + // FLAG_NESTED = 6 => read externalWeight + internalThreshold, then read 3 bytes => parse subtree if (flag === FLAG_NESTED) { - let weight = BigInt(firstByte & 0x03) - if (weight === 0n) { + // bits [3..2] => external weight + let externalWeight = (firstByte & 0x0c) >> 2 + if (externalWeight === 0) { if (index >= signature.length) { throw new Error('Not enough bytes for nested weight') } - weight = BigInt(signature[index]!) + externalWeight = signature[index]! index++ } - let threshold = BigInt((firstByte & 0x0c) >> 2) - if (threshold === 0n) { + // bits [1..0] => internal threshold + let internalThreshold = firstByte & 0x03 + if (internalThreshold === 0) { if (index + 2 > signature.length) { throw new Error('Not enough bytes for nested threshold') } - threshold = BigInt(Bytes.toNumber(signature.slice(index, index + 2))) + internalThreshold = Bytes.toNumber(signature.slice(index, index + 2)) index += 2 } if (index + 3 > signature.length) { - throw new Error('Not enough bytes for nested size') + throw new Error('Not enough bytes for nested sub-tree size') } const size = Bytes.toNumber(signature.slice(index, index + 3)) index += 3 @@ -421,73 +444,96 @@ export function parseBranch(signature: Bytes.Bytes): { if (index + size > signature.length) { throw new Error('Not enough bytes for nested sub-tree') } - const nestedTree = signature.slice(index, index + size) + const nestedTreeBytes = signature.slice(index, index + size) index += size - const { nodes: subNodes, leftover } = parseBranch(nestedTree) + const { nodes: subNodes, leftover } = parseBranch(nestedTreeBytes) if (leftover.length > 0) { throw new Error('Leftover bytes in nested sub-tree') } - const subTree = foldNodes(subNodes) + nodes.push({ type: 'nested', tree: subTree, - weight, - threshold, + weight: BigInt(externalWeight), + threshold: BigInt(internalThreshold), } as RawNestedLeaf) continue } - if (flag === FLAG_SUBDIGEST) { - if (index + 32 > signature.length) { - throw new Error('Not enough bytes for subdigest') + // FLAG_SIGNATURE_ETH_SIGN = 7 => parse it same as hash, but interpret the subdigest as an Ethereum Signed Message + if (flag === FLAG_SIGNATURE_ETH_SIGN) { + let weight = firstByte & 0x0f + if (weight === 0) { + if (index >= signature.length) { + throw new Error('Not enough bytes for dynamic weight in eth_sign') + } + weight = signature[index]! + index++ } - const hardcoded = signature.slice(index, index + 32) - index += 32 + if (index + 64 > signature.length) { + throw new Error('Not enough bytes for eth_sign signature') + } + const r = signature.slice(index, index + 32) + const yParityAndS = signature.slice(index + 32, index + 64) + index += 64 + + const yParity = (yParityAndS[0]! & 0x80) !== 0 ? 1 : 0 + const s = new Uint8Array(32) + s.set(yParityAndS) + s[0] = s[0]! & 0x7f + const v = 27 + yParity nodes.push({ - type: 'subdigest', - digest: hardcoded, - } as SubdigestLeaf) + type: 'unrecovered-signer', + weight: BigInt(weight), + signature: { + type: 'eth_sign', + r, + s, + v, + }, + } as RawSignerLeaf) continue } + // FLAG_SIGNATURE_SAPIENT = 9 or FLAG_SIGNATURE_SAPIENT_COMPACT = 10 => bottom 2 bits => weight, next 2 bits => sizeSize if (flag === FLAG_SIGNATURE_SAPIENT || flag === FLAG_SIGNATURE_SAPIENT_COMPACT) { - let addrWeight = BigInt(firstByte & 0x03) - if (addrWeight === 0n) { + let addrWeight = firstByte & 0x03 + if (addrWeight === 0) { if (index >= signature.length) { throw new Error('Not enough bytes for sapient weight') } - addrWeight = BigInt(signature[index]!) + addrWeight = signature[index]! index++ } - if (index + 20 > signature.length) { - throw new Error('Not enough bytes for sapient address') + throw new Error('Not enough bytes for sapient signer address') } - const address = signature.slice(index, index + 20) + const address = Bytes.toHex(signature.slice(index, index + 20)) index += 20 const sizeSize = (firstByte & 0x0c) >> 2 if (index + sizeSize > signature.length) { throw new Error('Not enough bytes for sapient signature size') } - const size = Bytes.toNumber(signature.slice(index, index + sizeSize)) + const dataSize = Bytes.toNumber(signature.slice(index, index + sizeSize)) index += sizeSize - if (index + size > signature.length) { - throw new Error('Not enough bytes for sapient sub-signature') + if (index + dataSize > signature.length) { + throw new Error('Not enough bytes for sapient signature data') } - const subSignature = signature.slice(index, index + size) - index += size + const subSignature = signature.slice(index, index + dataSize) + index += dataSize nodes.push({ - weight: addrWeight, + type: 'unrecovered-signer', + weight: BigInt(addrWeight), signature: { - address: Bytes.toHex(address), + address, data: subSignature, - type: flag === 0x09 ? 'sapient' : 'sapient_compact', + type: flag === FLAG_SIGNATURE_SAPIENT ? 'sapient' : 'sapient_compact', }, } as RawSignerLeaf) continue From 4a9eb72589342df37863eed4d2d970a28f5dfe20 Mon Sep 17 00:00:00 2001 From: William Hua Date: Sat, 8 Feb 2025 17:39:49 -0500 Subject: [PATCH 104/439] core: allow synchronous signers --- packages/core/src/signer.ts | 1 + packages/core/src/wallet.ts | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/packages/core/src/signer.ts b/packages/core/src/signer.ts index efdda56d1..ad6d792b5 100644 --- a/packages/core/src/signer.ts +++ b/packages/core/src/signer.ts @@ -7,6 +7,7 @@ export interface Signer { sign( payload: Payload, ): + | Signature | Promise | { signature: Promise; onSignerSignature?: SignerSignatureCallback; onCancel?: CancelCallback } } diff --git a/packages/core/src/wallet.ts b/packages/core/src/wallet.ts index 340bd25ca..a34b141a0 100644 --- a/packages/core/src/wallet.ts +++ b/packages/core/src/wallet.ts @@ -162,7 +162,9 @@ export class Wallet { try { const result = signer.signer.sign(payload) - if (result instanceof Promise) { + if ('type' in result) { + onSignerSignature(address)(result) + } else if (result instanceof Promise) { result.then(onSignerSignature(address)).catch(onError(address)) } else { result.signature.then(onSignerSignature(address)).catch(onError(address)) From 91b6718047795f8de3fd92429580604cd3b178b4 Mon Sep 17 00:00:00 2001 From: William Hua Date: Sat, 8 Feb 2025 18:17:59 -0500 Subject: [PATCH 105/439] core: defer callback --- packages/core/src/wallet.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/core/src/wallet.ts b/packages/core/src/wallet.ts index a34b141a0..a2963c9d7 100644 --- a/packages/core/src/wallet.ts +++ b/packages/core/src/wallet.ts @@ -163,7 +163,7 @@ export class Wallet { const result = signer.signer.sign(payload) if ('type' in result) { - onSignerSignature(address)(result) + Promise.resolve(result).then(onSignerSignature(address)).catch(onError(address)) } else if (result instanceof Promise) { result.then(onSignerSignature(address)).catch(onError(address)) } else { From c9f2debf5a926b690a49847519e44bc01251e905 Mon Sep 17 00:00:00 2001 From: Agusx1211 Date: Mon, 10 Feb 2025 12:12:15 +0000 Subject: [PATCH 106/439] Add RPC server to CLI --- packages/primitives-cli/src/index.ts | 2 + .../primitives-cli/src/subcommands/config.ts | 20 +- .../src/subcommands/devTools.ts | 63 +++-- .../primitives-cli/src/subcommands/payload.ts | 21 +- .../src/subcommands/permission.ts | 14 +- .../primitives-cli/src/subcommands/server.ts | 266 ++++++++++++++++++ .../src/subcommands/sessionExplicit.ts | 105 ++++--- .../src/subcommands/signature.ts | 18 +- 8 files changed, 404 insertions(+), 105 deletions(-) create mode 100644 packages/primitives-cli/src/subcommands/server.ts diff --git a/packages/primitives-cli/src/index.ts b/packages/primitives-cli/src/index.ts index aab1e5bdb..4a05cd212 100644 --- a/packages/primitives-cli/src/index.ts +++ b/packages/primitives-cli/src/index.ts @@ -8,6 +8,7 @@ import devToolsCommand from './subcommands/devTools' import signatureCommand from './subcommands/signature' import permissionCommand from './subcommands/permission' import sessionCommand from './subcommands/session' +import serverCommand from './subcommands/server' void yargs(hideBin(process.argv)) .command(payloadCommand) @@ -16,6 +17,7 @@ void yargs(hideBin(process.argv)) .command(signatureCommand) .command(permissionCommand) //FIXME Not sure we need to expose this .command(sessionCommand) + .command(serverCommand) .demandCommand(1) .strict() .help().argv diff --git a/packages/primitives-cli/src/subcommands/config.ts b/packages/primitives-cli/src/subcommands/config.ts index d38e866e5..ab7a6ff3f 100644 --- a/packages/primitives-cli/src/subcommands/config.ts +++ b/packages/primitives-cli/src/subcommands/config.ts @@ -100,12 +100,12 @@ function parseElements(elements: string): Leaf[] { return leaves } -async function createConfig(options: { +export async function createConfig(options: { threshold: string checkpoint: string from: string content: string[] -}): Promise { +}): Promise { const leaves = parseElements(options.content.join(' ')) const config: Configuration = { threshold: BigInt(options.threshold), @@ -115,17 +115,17 @@ async function createConfig(options: { checkpointer: undefined, } - console.log(configToJson(config)) + return configToJson(config) } -async function calculateImageHash(input: string): Promise { +export async function calculateImageHash(input: string): Promise { const config = configFromJson(input) - console.log(Hex.fromBytes(hashConfiguration(config))) + return Hex.fromBytes(hashConfiguration(config)) } -async function doEncode(input: string): Promise { +export async function doEncode(input: string): Promise { const configuration = configFromJson(input) - console.log(Hex.fromBytes(encodeSignature({ noChainId: true, configuration }))) + return Hex.fromBytes(encodeSignature({ noChainId: true, configuration })) } const configCommand: CommandModule = { @@ -168,7 +168,7 @@ const configCommand: CommandModule = { }) }, async (argv) => { - await createConfig(argv) + console.log(await createConfig(argv)) }, ) .command( @@ -182,7 +182,7 @@ const configCommand: CommandModule = { }, async (argv) => { const input = await fromPosOrStdin(argv, 'input') - await calculateImageHash(input) + console.log(await calculateImageHash(input)) }, ) .command( @@ -196,7 +196,7 @@ const configCommand: CommandModule = { }, async (argv) => { const input = await fromPosOrStdin(argv, 'input') - await doEncode(input) + console.log(await doEncode(input)) }, ) .demandCommand(1, 'You must specify a subcommand for config') diff --git a/packages/primitives-cli/src/subcommands/devTools.ts b/packages/primitives-cli/src/subcommands/devTools.ts index 5f3dd5c0d..afa139d23 100644 --- a/packages/primitives-cli/src/subcommands/devTools.ts +++ b/packages/primitives-cli/src/subcommands/devTools.ts @@ -10,7 +10,7 @@ import { import crypto from 'crypto' import type { CommandModule } from 'yargs' -interface RandomOptions { +export interface RandomOptions { seededRandom?: () => number minThresholdOnNested?: number maxPermissions?: number @@ -18,7 +18,7 @@ interface RandomOptions { checkpointerMode?: 'no' | 'random' | 'yes' } -function createSeededRandom(seed: string) { +export function createSeededRandom(seed: string) { let currentSeed = seed let hash = crypto.createHash('sha256').update(currentSeed).digest() let index = 0 @@ -102,27 +102,6 @@ function generateRandomTopology(depth: number, options?: RandomOptions): Topolog return [generateRandomTopology(depth - 1, options), generateRandomTopology(depth - 1, options)] } -async function generateRandomConfig(maxDepth: number, options?: RandomOptions): Promise { - const config: Configuration = { - threshold: randomBigInt(100n, options), - checkpoint: randomBigInt(1000n, options), - topology: generateRandomTopology(maxDepth, options), - checkpointer: (() => { - switch (options?.checkpointerMode) { - case 'yes': - return randomAddress(options) - case 'random': - return (options?.seededRandom?.() ?? Math.random()) > 0.5 ? randomAddress(options) : undefined - case 'no': - default: - return undefined - } - })(), - } - - console.log(configToJson(config)) -} - async function generateSessionsTopology(depth: number, options?: RandomOptions): Promise { const isLeaf = (options?.seededRandom ?? Math.random)() * 2 > 1 @@ -157,6 +136,31 @@ async function generateRandomRule(options?: RandomOptions): Promise { + const config: Configuration = { + threshold: randomBigInt(100n, options), + checkpoint: randomBigInt(1000n, options), + topology: generateRandomTopology(maxDepth, options), + checkpointer: (() => { + switch (options?.checkpointerMode) { + case 'yes': + return randomAddress(options) + case 'random': + return (options?.seededRandom?.() ?? Math.random()) > 0.5 ? randomAddress(options) : undefined + case 'no': + default: + return undefined + } + })(), + } + return configToJson(config) +} + +export async function doRandomSessionTopology(maxDepth: number, options?: RandomOptions): Promise { + const topology = await generateSessionsTopology(maxDepth, options) + return sessionsTopologyToJson(topology) +} + const command: CommandModule = { command: 'dev-tools', describe: 'Development tools and utilities', @@ -192,10 +196,11 @@ const command: CommandModule = { async (argv) => { const options: RandomOptions = { seededRandom: argv.seed ? createSeededRandom(argv.seed) : undefined, - minThresholdOnNested: argv.minThresholdOnNested as number, + minThresholdOnNested: argv.minThresholdOnNested, checkpointerMode: argv.checkpointer as 'no' | 'random' | 'yes', } - await generateRandomConfig(argv.maxDepth as number, options) + const result = await doRandomConfig(argv.maxDepth as number, options) + console.log(result) }, ) .command( @@ -227,11 +232,11 @@ const command: CommandModule = { async (argv) => { const options: RandomOptions = { seededRandom: argv.seed ? createSeededRandom(argv.seed) : undefined, - maxPermissions: argv.maxPermissions as number, - maxRules: argv.maxRules as number, + maxPermissions: argv.maxPermissions, + maxRules: argv.maxRules, } - const topology = await generateSessionsTopology(argv.maxDepth as number, options) - console.log(sessionsTopologyToJson(topology)) + const result = await doRandomSessionTopology(argv.maxDepth as number, options) + console.log(result) }, ) .demandCommand(1, 'You must specify a subcommand for dev-tools') diff --git a/packages/primitives-cli/src/subcommands/payload.ts b/packages/primitives-cli/src/subcommands/payload.ts index b259c4e05..48ec2d0ab 100644 --- a/packages/primitives-cli/src/subcommands/payload.ts +++ b/packages/primitives-cli/src/subcommands/payload.ts @@ -73,11 +73,12 @@ function behaviorOnError(behavior: number): 'ignore' | 'revert' | 'abort' { } } -async function convertToAbi(_payload: string): Promise { +export async function doConvertToAbi(payload: string): Promise { + // Not implemented yet, but following the pattern throw new Error('Not implemented') } -async function convertToPacked(payload: string): Promise { +export async function doConvertToPacked(payload: string): Promise { const decoded = AbiParameters.decode( [{ type: 'tuple', name: 'payload', components: DecodedAbi }], payload as Hex.Hex, @@ -98,21 +99,20 @@ async function convertToPacked(payload: string): Promise { behaviorOnError: behaviorOnError(Number(call.behaviorOnError)), })), }) - console.log(Hex.from(packed)) - return + return Hex.from(packed) } throw new Error('Not implemented') } -async function convertToJson(payload: string): Promise { +export async function doConvertToJson(payload: string): Promise { const decoded = AbiParameters.decode( [{ type: 'tuple', name: 'payload', components: DecodedAbi }], payload as Hex.Hex, )[0] as unknown as SolidityDecoded const json = JSON.stringify(decoded) - console.log(json) + return json } const payloadCommand: CommandModule = { @@ -131,7 +131,8 @@ const payloadCommand: CommandModule = { }, async (argv) => { const payload = await fromPosOrStdin(argv, 'payload') - await convertToAbi(payload) + const result = await doConvertToAbi(payload) + console.log(result) }, ) .command( @@ -145,7 +146,8 @@ const payloadCommand: CommandModule = { }, async (argv) => { const payload = await fromPosOrStdin(argv, 'payload') - await convertToPacked(payload) + const result = await doConvertToPacked(payload) + console.log(result) }, ) .command( @@ -159,7 +161,8 @@ const payloadCommand: CommandModule = { }, async (argv) => { const payload = await fromPosOrStdin(argv, 'payload') - await convertToJson(payload) + const result = await doConvertToJson(payload) + console.log(result) }, ) .demandCommand(1, 'You must specify a subcommand for payload') diff --git a/packages/primitives-cli/src/subcommands/permission.ts b/packages/primitives-cli/src/subcommands/permission.ts index b3e7d6ab0..48ec4c51a 100644 --- a/packages/primitives-cli/src/subcommands/permission.ts +++ b/packages/primitives-cli/src/subcommands/permission.ts @@ -8,16 +8,16 @@ import { Hex } from 'ox' import type { CommandModule } from 'yargs' import { fromPosOrStdin } from '../utils' -async function doEncodeSessionPermissions(input: string): Promise { +export async function doEncodeSessionPermissions(input: string): Promise { const permission = sessionPermissionsFromJson(input) const packed = encodeSessionPermissions(permission) - console.log(Hex.from(packed)) + return Hex.from(packed) } -async function doEncodePermission(input: string): Promise { +export async function doEncodePermission(input: string): Promise { const permission = permissionFromJson(input) const packed = encodePermission(permission) - console.log(Hex.from(packed)) + return Hex.from(packed) } const permissionCommand: CommandModule = { @@ -36,7 +36,8 @@ const permissionCommand: CommandModule = { }, async (argv) => { const permission = await fromPosOrStdin(argv, 'session-permission') - await doEncodeSessionPermissions(permission) + const result = await doEncodeSessionPermissions(permission) + console.log(result) }, ) .command( @@ -50,7 +51,8 @@ const permissionCommand: CommandModule = { }, async (argv) => { const permission = await fromPosOrStdin(argv, 'permission') - await doEncodePermission(permission) + const result = await doEncodePermission(permission) + console.log(result) }, ) .demandCommand(1, 'You must specify a subcommand for permission') diff --git a/packages/primitives-cli/src/subcommands/server.ts b/packages/primitives-cli/src/subcommands/server.ts new file mode 100644 index 000000000..64af0a98e --- /dev/null +++ b/packages/primitives-cli/src/subcommands/server.ts @@ -0,0 +1,266 @@ +// src/subcommands/server.ts + +import type { CommandModule } from 'yargs' +import { createServer, IncomingMessage, ServerResponse } from 'http' +import * as config from './config' +import * as devTools from './devTools' +import * as payload from './payload' +import * as permission from './permission' +import * as sessionExplicit from './sessionExplicit' +import * as signatureUtils from './signature' + +// Basic JSON-RPC types +interface JsonRpcRequest { + jsonrpc: string + method: string + params?: any + id?: number | string +} + +interface JsonRpcSuccessResponse { + jsonrpc: '2.0' + result: any + id?: number | string +} + +interface JsonRpcErrorResponse { + jsonrpc: '2.0' + error: { + code: number + message: string + data?: any + } + id?: number | string +} + +function successResponse(id: number | string | undefined, result: any): JsonRpcSuccessResponse { + return { + jsonrpc: '2.0', + id, + result, + } +} + +function errorResponse( + id: number | string | undefined, + code: number, + message: string, + data?: any, +): JsonRpcErrorResponse { + return { + jsonrpc: '2.0', + id, + error: { + code, + message, + data, + }, + } +} + +// We collect all of the CLI methods into a single map that can be invoked by name. +const rpcMethods: Record Promise> = { + // CONFIG + async config_new(params) { + const { threshold, checkpoint, from = 'flat', content } = params + const result = await config.createConfig({ threshold, checkpoint, from, content }) + return result + }, + async config_imageHash(params) { + const { input } = params + const result = await config.calculateImageHash(input) + return result + }, + async config_encode(params) { + const { input } = params + const result = await config.doEncode(input) + return result + }, + + // DEV TOOLS + async devTools_randomConfig(params) { + const { maxDepth = 3, seed, minThresholdOnNested = 0, checkpointer = 'no' } = params + const options: devTools.RandomOptions = { + seededRandom: seed ? devTools.createSeededRandom(seed) : undefined, + minThresholdOnNested, + checkpointerMode: checkpointer as 'no' | 'random' | 'yes', + } + const result = await devTools.doRandomConfig(maxDepth, options) + return result + }, + async devTools_randomSessionTopology(params) { + const { maxDepth = 1, maxPermissions = 1, maxRules = 1, seed } = params + const options: devTools.RandomOptions = { + seededRandom: seed ? devTools.createSeededRandom(seed) : undefined, + maxPermissions, + maxRules, + } + const result = await devTools.doRandomSessionTopology(maxDepth, options) + return result + }, + + // PAYLOAD + async payload_toAbi(params) { + const { payload: inputPayload } = params + const result = await payload.doConvertToAbi(inputPayload) + return result + }, + async payload_toPacked(params) { + const { payload: inputPayload } = params + const result = await payload.doConvertToPacked(inputPayload) + return result + }, + async payload_toJson(params) { + const { payload: inputPayload } = params + const result = await payload.doConvertToJson(inputPayload) + return result + }, + + // PERMISSION + async permission_toPackedSession(params) { + const { sessionPermission } = params + const result = await permission.doEncodeSessionPermissions(sessionPermission) + return result + }, + async permission_toPacked(params) { + const { permission: perm } = params + const result = await permission.doEncodePermission(perm) + return result + }, + + // SESSION EXPLICIT + async session_empty(_params) { + return await sessionExplicit.doEmptySession() + }, + async session_add(params) { + const { explicitSession, sessionTopology } = params + const result = await sessionExplicit.doAddSession(explicitSession, sessionTopology) + return result + }, + async session_remove(params) { + const { explicitSessionAddress, sessionTopology } = params + const result = await sessionExplicit.doRemoveSession(explicitSessionAddress, sessionTopology) + return result + }, + async session_use(params) { + const { signature, permissionIndexes, sessionTopology } = params + const result = await sessionExplicit.doUseSession(signature, permissionIndexes, sessionTopology) + return result + }, + async session_toPackedTopology(params) { + const { sessionTopology } = params + const result = await sessionExplicit.doEncodeSessionsTopology(sessionTopology) + return result + }, + + // SIGNATURE + async signature_encode(params) { + const { input, signature: sigArr = [], chainId = true } = params + const result = await signatureUtils.doEncode(input, sigArr, !chainId) + return result + }, + async signature_concat(params) { + const { signatures } = params + const result = await signatureUtils.doConcat(signatures) + return result + }, + async signature_decode(params) { + const { signature: sig } = params + const result = await signatureUtils.doDecode(sig) + return result + }, +} + +async function handleSingleRequest(rpcRequest: JsonRpcRequest): Promise { + const { id, jsonrpc, method, params } = rpcRequest + if (jsonrpc !== '2.0') { + return errorResponse(id, -32600, 'Invalid JSON-RPC version') + } + const fn = rpcMethods[method] + if (!fn) { + return errorResponse(id, -32601, `Method not found: ${method}`) + } + try { + const result = await fn(params ?? {}) + return successResponse(id, result) + } catch (err: any) { + return errorResponse(id, -32000, err?.message ?? 'Unknown error') + } +} + +async function handleHttpRequest(req: IncomingMessage, res: ServerResponse) { + // Only handle POST /rpc + if (req.method !== 'POST' || req.url !== '/rpc') { + res.statusCode = 404 + res.end('Not Found') + return + } + + // Read the request body + let body = '' + for await (const chunk of req) { + body += chunk + } + + // Try to parse JSON. If invalid, return an error + let rpcRequests: JsonRpcRequest[] | JsonRpcRequest + try { + rpcRequests = JSON.parse(body) + } catch (error) { + res.statusCode = 400 + res.end(JSON.stringify(errorResponse(undefined, -32700, 'Parse error', String(error)))) + return + } + + // Might be a batch request (array of requests) or a single request + if (Array.isArray(rpcRequests)) { + const results = await Promise.all(rpcRequests.map(handleSingleRequest)) + res.statusCode = 200 + res.setHeader('Content-Type', 'application/json') + res.end(JSON.stringify(results)) + } else { + const result = await handleSingleRequest(rpcRequests) + res.statusCode = 200 + res.setHeader('Content-Type', 'application/json') + res.end(JSON.stringify(result)) + } +} + +async function startServer(host: string, port: number) { + const server = createServer((req, res) => { + handleHttpRequest(req, res).catch((err) => { + // If something truly unexpected happens, respond with 500 + res.statusCode = 500 + res.end(JSON.stringify(errorResponse(undefined, -32000, 'Internal server error', String(err)))) + }) + }) + + server.listen(port, host, () => { + console.log(`RPC server running at http://${host}:${port}/rpc`) + }) +} + +const serverCommand: CommandModule = { + command: 'server', + describe: 'Run a JSON-RPC server exposing all CLI functionality, without using Express', + builder: (yargs) => { + return yargs + .option('host', { + type: 'string', + description: 'Hostname to listen on', + default: '127.0.0.1', + }) + .option('port', { + type: 'number', + description: 'Port to listen on', + default: 3000, + }) + }, + handler: async (argv) => { + const host = argv.host as string + const port = argv.port as number + await startServer(host, port) + }, +} + +export default serverCommand diff --git a/packages/primitives-cli/src/subcommands/sessionExplicit.ts b/packages/primitives-cli/src/subcommands/sessionExplicit.ts index d409f6832..cd9754a41 100644 --- a/packages/primitives-cli/src/subcommands/sessionExplicit.ts +++ b/packages/primitives-cli/src/subcommands/sessionExplicit.ts @@ -12,14 +12,70 @@ import { Bytes, Hex } from 'ox' import type { CommandModule } from 'yargs' import { fromPosOrStdin } from '../utils' -async function doEncodeSessionsTopology(input: string): Promise { +export async function doEncodeSessionsTopology(input: string): Promise { let topology = sessionsTopologyFromJson(input) if (isEmptySessionsTopology(topology)) { // Encode a node of bytes32(0) topology = Bytes.fromHex('0x0000000000000000000000000000000000000000000000000000000000000000') } const packed = encodeSessionsTopology(topology) - console.log(Hex.from(packed)) + return Hex.from(packed) +} + +export async function doEmptySession(): Promise { + return JSON.stringify([]) +} + +export async function doAddSession(sessionInput: string, topologyInput: string): Promise { + const session = sessionsTopologyFromJson(sessionInput) + const topology = sessionsTopologyFromJson(topologyInput) + if (!isSessionsTopology(session)) { + throw new Error('Explicit session must be a valid session topology') + } + if (!isSessionsTopology(topology) && !isEmptySessionsTopology(topology)) { + throw new Error('Session topology must be a valid session topology') + } + return sessionsTopologyToJson(mergeSessionsTopologies(topology, session)) +} + +export async function doRemoveSession(explicitSessionAddress: string, topologyInput: string): Promise { + const topology = sessionsTopologyFromJson(topologyInput) + if (!isSessionsTopology(topology) && !isEmptySessionsTopology(topology)) { + throw new Error('Session topology must be a valid session topology') + } + if (!explicitSessionAddress || !explicitSessionAddress.startsWith('0x')) { + throw new Error('Explicit session address must be a valid address') + } + return sessionsTopologyToJson(removeSessionPermission(topology, explicitSessionAddress as `0x${string}`)) +} + +export async function doUseSession( + signatureInput: string, + permissionIndexesInput: string, + topologyInput: string, +): Promise { + if (!signatureInput) { + throw new Error('Signature is required') + } + // Decode signature from "r:s:v" + const signatureParts = signatureInput.split(':') + if (signatureParts.length !== 3) { + throw new Error('Signature must be in r:s:v format') + } + const signature = { + r: Bytes.fromHex(signatureParts[0] as `0x${string}`), + s: Bytes.fromHex(signatureParts[1] as `0x${string}`), + v: parseInt(signatureParts[2] ?? ''), + } + + if (!permissionIndexesInput) { + throw new Error('Permission indexes are required') + } + const permissionIndexes = permissionIndexesInput.split(',').map((index) => parseInt(index)) + //TODO Validate that the permission index is valid + const topology = sessionsTopologyFromJson(topologyInput) + const encoded = encodeExplicitSessionSignature(topology, permissionIndexes, signature) + return Hex.from(encoded) } const sessionExplicitCommand: CommandModule = { @@ -32,7 +88,7 @@ const sessionExplicitCommand: CommandModule = { 'Create an empty session topology', () => {}, async () => { - console.log([]) + console.log(await doEmptySession()) }, ) .command( @@ -51,22 +107,12 @@ const sessionExplicitCommand: CommandModule = { }) }, async (argv) => { - // This function can also merge two topologies const sessionInput = argv.explicitSession if (!sessionInput) { throw new Error('Explicit session is required') } - const session = sessionsTopologyFromJson(sessionInput) const topologyInput = await fromPosOrStdin(argv, 'session-topology') - const topology = sessionsTopologyFromJson(topologyInput) - if (!isSessionsTopology(session)) { - throw new Error('Explicit session must be a valid session topology') - } - if (!isSessionsTopology(topology) && !isEmptySessionsTopology(topology)) { - throw new Error('Session topology must be a valid session topology') - } - const json = sessionsTopologyToJson(mergeSessionsTopologies(topology, session)) - console.log(json) + console.log(await doAddSession(sessionInput, topologyInput)) }, ) .command( @@ -86,17 +132,7 @@ const sessionExplicitCommand: CommandModule = { async (argv) => { const explicitSessionAddress = argv.explicitSessionAddress const topologyInput = await fromPosOrStdin(argv, 'session-topology') - const topology = sessionsTopologyFromJson(topologyInput) - if (!isSessionsTopology(topology) && !isEmptySessionsTopology(topology)) { - throw new Error('Session topology must be a valid session topology') - } - if (!explicitSessionAddress || !explicitSessionAddress.startsWith('0x')) { - throw new Error('Explicit session address must be a valid address') - } - const json = sessionsTopologyToJson( - removeSessionPermission(topology, explicitSessionAddress as `0x${string}`), - ) - console.log(json) + console.log(await doRemoveSession(explicitSessionAddress!, topologyInput)) }, ) .command( @@ -122,27 +158,12 @@ const sessionExplicitCommand: CommandModule = { if (!signatureInput) { throw new Error('Signature is required') } - // Decode signature from "r:s:v" - const signatureParts = signatureInput.split(':') - if (signatureParts.length !== 3) { - throw new Error('Signature must be in r:s:v format') - } - const signature = { - r: Bytes.fromHex(signatureParts[0] as `0x${string}`), - s: Bytes.fromHex(signatureParts[1] as `0x${string}`), - v: parseInt(signatureParts[2] ?? ''), - } - const permissionIndexesInput = argv.permissionIndexes if (!permissionIndexesInput) { throw new Error('Permission indexes are required') } - const permissionIndexes = permissionIndexesInput.split(',').map((index) => parseInt(index)) - //TODO Validate that the permission index is valid const topologyInput = await fromPosOrStdin(argv, 'session-topology') - const topology = sessionsTopologyFromJson(topologyInput) - const encoded = encodeExplicitSessionSignature(topology, permissionIndexes, signature) - console.log(Hex.from(encoded)) + console.log(await doUseSession(signatureInput, permissionIndexesInput, topologyInput)) }, ) .command( @@ -156,7 +177,7 @@ const sessionExplicitCommand: CommandModule = { }, async (argv) => { const permission = await fromPosOrStdin(argv, 'session-topology') - await doEncodeSessionsTopology(permission) + console.log(await doEncodeSessionsTopology(permission)) }, ) .demandCommand(1, 'You must specify a subcommand for session') diff --git a/packages/primitives-cli/src/subcommands/signature.ts b/packages/primitives-cli/src/subcommands/signature.ts index 7e121dd4c..738507250 100644 --- a/packages/primitives-cli/src/subcommands/signature.ts +++ b/packages/primitives-cli/src/subcommands/signature.ts @@ -41,7 +41,7 @@ const SignatureElements = [ }, ] -async function doEncode(input: string, signatures: string[] = [], noChainId: boolean): Promise { +export async function doEncode(input: string, signatures: string[] = [], noChainId: boolean): Promise { const config = configFromJson(input) const allSignatures = signatures.map((s) => { @@ -121,10 +121,10 @@ async function doEncode(input: string, signatures: string[] = [], noChainId: boo const encoded = encodeSignature({ noChainId, configuration: { ...config, topology: fullTopology } }) - console.log(Hex.fromBytes(encoded)) + return Hex.fromBytes(encoded) } -async function doConcat(signatures: string[]): Promise { +export async function doConcat(signatures: string[]): Promise { if (signatures.length === 0) { throw new Error('No signatures provided') } @@ -136,13 +136,13 @@ async function doConcat(signatures: string[]): Promise { suffix: decoded.slice(1), }) - console.log(Hex.fromBytes(reEncoded)) + return Hex.fromBytes(reEncoded) } -async function doDecode(signature: string): Promise { +export async function doDecode(signature: string): Promise { const bytes = Bytes.fromHex(signature as `0x${string}`) const decoded = decodeSignature(bytes) - console.log(rawSignatureToJson(decoded)) + return rawSignatureToJson(decoded) } const signatureCommand: CommandModule = { @@ -177,7 +177,7 @@ const signatureCommand: CommandModule = { }, async (argv) => { const input = await fromPosOrStdin(argv, 'input') - await doEncode(input, argv.signature, !argv.chainId) + console.log(await doEncode(input, argv.signature, !argv.chainId)) }, ) .command( @@ -192,7 +192,7 @@ const signatureCommand: CommandModule = { }) }, async (argv) => { - await doConcat(argv.signatures) + console.log(await doConcat(argv.signatures)) }, ) .command( @@ -207,7 +207,7 @@ const signatureCommand: CommandModule = { }, async (argv) => { const input = await fromPosOrStdin(argv, 'signature') - await doDecode(input) + console.log(await doDecode(input)) }, ) .demandCommand(1, 'You must specify a subcommand for signature') From 63968c87cf6c91441c198e9f2dc40f4aa580e9a0 Mon Sep 17 00:00:00 2001 From: William Hua Date: Mon, 10 Feb 2025 10:13:05 -0500 Subject: [PATCH 107/439] primitives: getWeight() --- packages/core/src/wallet.ts | 14 ++++---- packages/primitives/src/config.ts | 59 +++++++++++++++++++++---------- 2 files changed, 47 insertions(+), 26 deletions(-) diff --git a/packages/core/src/wallet.ts b/packages/core/src/wallet.ts index a2963c9d7..9e5e89fff 100644 --- a/packages/core/src/wallet.ts +++ b/packages/core/src/wallet.ts @@ -108,7 +108,7 @@ export class Wallet { }), ) - if (getWeight(configuration, Array.from(signers.keys())) < configuration.threshold) { + if (getWeight(configuration, (signer) => signers.has(signer.address)).potential < configuration.threshold) { throw new Error('insufficient potential weight') } @@ -118,7 +118,7 @@ export class Wallet { options?.onSignerError?.(address, error) - if (getWeight(configuration, Array.from(signers.keys())) < configuration.threshold) { + if (getWeight(configuration, (signer) => signers.has(signer.address)).potential < configuration.threshold) { const onCancels = Array.from(signers.values()).flatMap(({ onCancel }) => (onCancel ? [onCancel] : [])) signers.clear() onCancels.forEach((onCancel) => onCancel(false)) @@ -141,12 +141,10 @@ export class Wallet { ), ) - const weight = getWeight( - configuration, - Array.from(signers.entries()).flatMap(([address, { signature }]) => (signature ? [address] : [])), - ) - - if (weight < configuration.threshold) { + if ( + getWeight(configuration, (signer) => signers.get(signer.address)?.signature !== undefined).weight < + configuration.threshold + ) { Array.from(signers.values()).forEach(({ onSignerSignature }) => onSignerSignature?.(configuration, signerSignatures, !options?.trustSigners), ) diff --git a/packages/primitives/src/config.ts b/packages/primitives/src/config.ts index 77ebd8c3c..b199d3fa9 100644 --- a/packages/primitives/src/config.ts +++ b/packages/primitives/src/config.ts @@ -1,5 +1,15 @@ -import { Address, Bytes, Hash, Hex } from 'ox' -import { SignatureOfSapientSignerLeaf, SignatureOfSignerLeaf } from './signature' +import { Address, Bytes, Hash } from 'ox' +import { + isRawConfiguration, + isRawNestedLeaf, + isRawSignerLeaf, + isSignedSapientSignerLeaf, + isSignedSignerLeaf, + RawConfiguration, + RawTopology, + SignatureOfSapientSignerLeaf, + SignatureOfSignerLeaf, +} from './signature' export type SignerLeaf = { type: 'signer' @@ -111,24 +121,37 @@ export function getSigners(configuration: Configuration | Topology): { return { signers: Array.from(signers), isComplete } } -export function getWeight(configuration: Configuration | Topology, signers: Address.Address[]): bigint { - const set = new Set(signers) - - const scan = (topology: Topology): bigint => { - if (isNode(topology)) { - return scan(topology[0]) + scan(topology[1]) - } else if (isSignerLeaf(topology)) { - return set.has(topology.address) ? topology.weight : 0n - } else if (isSapientSignerLeaf(topology)) { - return set.has(topology.address) ? topology.weight : 0n - } else if (isNestedLeaf(topology)) { - return scan(topology.tree) >= topology.threshold ? topology.weight : 0n - } else { - return 0n +export function getWeight( + topology: RawTopology | RawConfiguration, + canSign?: (signer: SignerLeaf | SapientSignerLeaf) => boolean, +): { weight: bigint; potential: bigint } { + topology = isRawConfiguration(topology) ? topology.topology : topology + canSign = canSign || ((_signer: SignerLeaf | SapientSignerLeaf) => true) + + if (isSignedSignerLeaf(topology)) { + return { weight: topology.weight, potential: topology.weight } + } else if (isSignerLeaf(topology)) { + return { weight: 0n, potential: canSign(topology) ? topology.weight : 0n } + } else if (isRawSignerLeaf(topology)) { + return { weight: topology.weight, potential: topology.weight } + } else if (isSignedSapientSignerLeaf(topology)) { + return { weight: topology.weight, potential: topology.weight } + } else if (isSapientSignerLeaf(topology)) { + return { weight: topology.weight, potential: canSign(topology) ? topology.weight : 0n } + } else if (isSubdigestLeaf(topology)) { + return { weight: 0n, potential: 0n } + } else if (isRawNestedLeaf(topology)) { + const { weight, potential } = getWeight(topology.tree) + return { + weight: weight >= topology.threshold ? topology.weight : 0n, + potential: potential >= topology.threshold ? topology.weight : 0n, } + } else if (isNodeLeaf(topology)) { + return { weight: 0n, potential: 0n } + } else { + const [left, right] = [getWeight(topology[0], canSign), getWeight(topology[1], canSign)] + return { weight: left.weight + right.weight, potential: left.potential + right.potential } } - - return scan(isConfiguration(configuration) ? configuration.topology : configuration) } export function hashConfiguration(topology: Topology | Configuration): Bytes.Bytes { From 17436326725c80a119d85af9cfeb062dc58a5bca Mon Sep 17 00:00:00 2001 From: Agusx1211 Date: Mon, 10 Feb 2025 19:17:16 +0000 Subject: [PATCH 108/439] primitives rpc fixes --- .../primitives-cli/src/subcommands/server.ts | 112 ++++++++++++++---- 1 file changed, 86 insertions(+), 26 deletions(-) diff --git a/packages/primitives-cli/src/subcommands/server.ts b/packages/primitives-cli/src/subcommands/server.ts index 64af0a98e..dd86e1a1b 100644 --- a/packages/primitives-cli/src/subcommands/server.ts +++ b/packages/primitives-cli/src/subcommands/server.ts @@ -1,5 +1,3 @@ -// src/subcommands/server.ts - import type { CommandModule } from 'yargs' import { createServer, IncomingMessage, ServerResponse } from 'http' import * as config from './config' @@ -63,17 +61,17 @@ const rpcMethods: Record Promise> = { // CONFIG async config_new(params) { const { threshold, checkpoint, from = 'flat', content } = params - const result = await config.createConfig({ threshold, checkpoint, from, content }) + const result = await config.createConfig({ threshold, checkpoint, from, content: content.split(' ') }) return result }, async config_imageHash(params) { const { input } = params - const result = await config.calculateImageHash(input) + const result = await config.calculateImageHash(JSON.stringify(input)) return result }, async config_encode(params) { const { input } = params - const result = await config.doEncode(input) + const result = await config.doEncode(JSON.stringify(input)) return result }, @@ -119,12 +117,12 @@ const rpcMethods: Record Promise> = { // PERMISSION async permission_toPackedSession(params) { const { sessionPermission } = params - const result = await permission.doEncodeSessionPermissions(sessionPermission) + const result = await permission.doEncodeSessionPermissions(JSON.stringify(sessionPermission)) return result }, async permission_toPacked(params) { const { permission: perm } = params - const result = await permission.doEncodePermission(perm) + const result = await permission.doEncodePermission(JSON.stringify(perm)) return result }, @@ -134,29 +132,29 @@ const rpcMethods: Record Promise> = { }, async session_add(params) { const { explicitSession, sessionTopology } = params - const result = await sessionExplicit.doAddSession(explicitSession, sessionTopology) + const result = await sessionExplicit.doAddSession(JSON.stringify(explicitSession), JSON.stringify(sessionTopology)) return result }, async session_remove(params) { const { explicitSessionAddress, sessionTopology } = params - const result = await sessionExplicit.doRemoveSession(explicitSessionAddress, sessionTopology) + const result = await sessionExplicit.doRemoveSession(explicitSessionAddress, JSON.stringify(sessionTopology)) return result }, async session_use(params) { const { signature, permissionIndexes, sessionTopology } = params - const result = await sessionExplicit.doUseSession(signature, permissionIndexes, sessionTopology) + const result = await sessionExplicit.doUseSession(signature, permissionIndexes, JSON.stringify(sessionTopology)) return result }, async session_toPackedTopology(params) { const { sessionTopology } = params - const result = await sessionExplicit.doEncodeSessionsTopology(sessionTopology) + const result = await sessionExplicit.doEncodeSessionsTopology(JSON.stringify(sessionTopology)) return result }, // SIGNATURE async signature_encode(params) { - const { input, signature: sigArr = [], chainId = true } = params - const result = await signatureUtils.doEncode(input, sigArr, !chainId) + const { input, signatures, chainId = true } = params + const result = await signatureUtils.doEncode(JSON.stringify(input), signatures.split(' '), !chainId) return result }, async signature_concat(params) { @@ -171,26 +169,64 @@ const rpcMethods: Record Promise> = { }, } -async function handleSingleRequest(rpcRequest: JsonRpcRequest): Promise { +async function handleSingleRequest( + rpcRequest: JsonRpcRequest, + debug: boolean, + silent: boolean, +): Promise { const { id, jsonrpc, method, params } = rpcRequest + + if (!silent) console.log(`[${new Date().toISOString()}] Processing request: method=${method} id=${id}`) + if (debug && !silent) { + console.log('Request details:', JSON.stringify(rpcRequest, null, 2)) + } + if (jsonrpc !== '2.0') { - return errorResponse(id, -32600, 'Invalid JSON-RPC version') + const error = errorResponse(id, -32600, 'Invalid JSON-RPC version') + if (!silent) + console.log( + `[${new Date().toISOString()}] Error response:`, + debug ? JSON.stringify(error, null, 2) : error.error.message, + ) + return error } + const fn = rpcMethods[method] if (!fn) { - return errorResponse(id, -32601, `Method not found: ${method}`) + const error = errorResponse(id, -32601, `Method not found: ${method}`) + if (!silent) + console.log( + `[${new Date().toISOString()}] Error response:`, + debug ? JSON.stringify(error, null, 2) : error.error.message, + ) + return error } + try { const result = await fn(params ?? {}) - return successResponse(id, result) + const response = successResponse(id, result) + if (!silent) console.log(`[${new Date().toISOString()}] Success response for method=${method} id=${id}`) + if (debug && !silent) { + console.log('Response details:', JSON.stringify(response, null, 2)) + } + return response } catch (err: any) { - return errorResponse(id, -32000, err?.message ?? 'Unknown error') + const error = errorResponse(id, -32000, err?.message ?? 'Unknown error') + if (!silent) + console.log( + `[${new Date().toISOString()}] Error response:`, + debug ? JSON.stringify(error, null, 2) : error.error.message, + ) + return error } } -async function handleHttpRequest(req: IncomingMessage, res: ServerResponse) { +async function handleHttpRequest(req: IncomingMessage, res: ServerResponse, debug: boolean, silent: boolean) { + if (!silent) console.log(`[${new Date().toISOString()}] ${req.method} ${req.url} from ${req.socket.remoteAddress}`) + // Only handle POST /rpc if (req.method !== 'POST' || req.url !== '/rpc') { + if (!silent) console.log(`[${new Date().toISOString()}] 404 Not Found`) res.statusCode = 404 res.end('Not Found') return @@ -202,11 +238,16 @@ async function handleHttpRequest(req: IncomingMessage, res: ServerResponse) { body += chunk } + if (debug && !silent) { + console.log('Raw request body:', body) + } + // Try to parse JSON. If invalid, return an error let rpcRequests: JsonRpcRequest[] | JsonRpcRequest try { rpcRequests = JSON.parse(body) } catch (error) { + if (!silent) console.log(`[${new Date().toISOString()}] JSON parse error:`, error) res.statusCode = 400 res.end(JSON.stringify(errorResponse(undefined, -32700, 'Parse error', String(error)))) return @@ -214,29 +255,36 @@ async function handleHttpRequest(req: IncomingMessage, res: ServerResponse) { // Might be a batch request (array of requests) or a single request if (Array.isArray(rpcRequests)) { - const results = await Promise.all(rpcRequests.map(handleSingleRequest)) + if (!silent) console.log(`[${new Date().toISOString()}] Processing batch request with ${rpcRequests.length} items`) + const results = await Promise.all(rpcRequests.map((req) => handleSingleRequest(req, debug, silent))) res.statusCode = 200 res.setHeader('Content-Type', 'application/json') res.end(JSON.stringify(results)) } else { - const result = await handleSingleRequest(rpcRequests) + const result = await handleSingleRequest(rpcRequests, debug, silent) res.statusCode = 200 res.setHeader('Content-Type', 'application/json') res.end(JSON.stringify(result)) } } -async function startServer(host: string, port: number) { +async function startServer(host: string, port: number, debug: boolean, silent: boolean) { const server = createServer((req, res) => { - handleHttpRequest(req, res).catch((err) => { + handleHttpRequest(req, res, debug, silent).catch((err) => { // If something truly unexpected happens, respond with 500 + if (!silent) console.error(`[${new Date().toISOString()}] Internal server error:`, err) res.statusCode = 500 res.end(JSON.stringify(errorResponse(undefined, -32000, 'Internal server error', String(err)))) }) }) server.listen(port, host, () => { - console.log(`RPC server running at http://${host}:${port}/rpc`) + if (!silent) { + console.log(`[${new Date().toISOString()}] RPC server running at http://${host}:${port}/rpc`) + if (debug) { + console.log('Debug mode enabled - detailed logging active') + } + } }) } @@ -253,13 +301,25 @@ const serverCommand: CommandModule = { .option('port', { type: 'number', description: 'Port to listen on', - default: 3000, + default: 9999, + }) + .option('debug', { + type: 'boolean', + description: 'Enable debug logging', + default: false, + }) + .option('silent', { + type: 'boolean', + description: 'Disable all logging output', + default: false, }) }, handler: async (argv) => { const host = argv.host as string const port = argv.port as number - await startServer(host, port) + const debug = argv.debug as boolean + const silent = argv.silent as boolean + await startServer(host, port, debug, silent) }, } From 67af92dd7230fd2cfbfdbce8884b9c4228ab21c0 Mon Sep 17 00:00:00 2001 From: Michael Standen Date: Tue, 11 Feb 2025 09:42:21 +1300 Subject: [PATCH 109/439] Add dev:server command --- package.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index 33b274cdb..2b9589170 100644 --- a/package.json +++ b/package.json @@ -7,7 +7,8 @@ "dev": "turbo dev", "lint": "turbo lint", "format": "prettier --write \"**/*.{ts,tsx,md}\"", - "postinstall": "lefthook install" + "postinstall": "lefthook install", + "dev:server": "node packages/primitives-cli/dist/index.js server" }, "devDependencies": { "@changesets/cli": "^2.27.11", From 9de0faacedbe5e9fd7aeb43c8de9b9ecfd92a6e9 Mon Sep 17 00:00:00 2001 From: William Hua Date: Mon, 10 Feb 2025 08:20:46 -0500 Subject: [PATCH 110/439] primitives: sign --- packages/primitives/src/config.ts | 191 +++++++++++++++++++++++++++++- 1 file changed, 190 insertions(+), 1 deletion(-) diff --git a/packages/primitives/src/config.ts b/packages/primitives/src/config.ts index b199d3fa9..c5b36a0e5 100644 --- a/packages/primitives/src/config.ts +++ b/packages/primitives/src/config.ts @@ -1,4 +1,4 @@ -import { Address, Bytes, Hash } from 'ox' +import { Address, Bytes, Hash, Hex } from 'ox' import { isRawConfiguration, isRawNestedLeaf, @@ -330,3 +330,192 @@ function decodeTopology(obj: any): Topology { throw new Error('Invalid type in topology JSON') } } + +export function sign( + topology: RawTopology, + sign_: ( + signer: T, + ) => SignerSignature, + options?: { + threshold?: bigint + isValid?: ( + signer: T, + signature: T extends SignerLeaf ? SignatureOfSignerLeaf : SignatureOfSapientSignerLeaf, + ) => boolean | Promise + onError?: (signer: SignerLeaf | SapientSignerLeaf, error: any) => void + _signatures?: Map> + }, +): Promise { + return new Promise((resolve, reject) => { + const signatures = + options?._signatures ?? new Map>() + + const signerSignatureCallbacks: SignerSignatureCallback[] = [] + const cancelCallbacks: CancelCallback[] = [] + + let done = false + const check = () => { + const { weight, potential } = getWeight(topology) + if (options?.threshold !== undefined) { + if (weight >= options.threshold) { + cancelCallbacks.forEach((callback) => callback(true)) + cancelCallbacks.length = 0 + signerSignatureCallbacks.length = 0 + done = true + resolve(topology) + } else if (potential < options.threshold) { + cancelCallbacks.forEach((callback) => callback(false)) + cancelCallbacks.length = 0 + signerSignatureCallbacks.length = 0 + done = true + reject(new Error(`potential weight ${potential} < threshold ${options.threshold}`)) + } + } + if (weight === potential) { + cancelCallbacks.forEach((callback) => callback(true)) + cancelCallbacks.length = 0 + signerSignatureCallbacks.length = 0 + done = true + resolve(topology) + } + } + + check() + if (done) { + return + } + + const onSignerSignature = + (signer: T) => + (signature: T extends SignerLeaf ? SignatureOfSignerLeaf : SignatureOfSapientSignerLeaf) => { + if (!done) { + signer.signed = true + signer.signature = signature + + check() + + if (!done) { + signerSignatureCallbacks.forEach((callback) => callback(topology, options?.isValid !== undefined)) + } + } + } + + const onError = (signer: SignerLeaf | SapientSignerLeaf) => (error: any) => { + if (!done) { + options?.onError?.(signer, error) + + check() + } + } + + const search = (topology: RawTopology) => { + if (isSignedSignerLeaf(topology)) { + return + } else if (isSignerLeaf(topology)) { + const imageHash = Bytes.toHex(hashConfiguration(topology)) + + if (!signatures.has(imageHash)) { + let signature = sign_(topology) + if (!('signature' in signature)) { + if (signature instanceof Promise) { + signature = { signature } + } else { + signature = { signature: Promise.resolve(signature) } + } + } + + if (signature.onSignerSignature) { + signerSignatureCallbacks.push(signature.onSignerSignature) + } + if (signature.onCancel) { + cancelCallbacks.push(signature.onCancel) + } + + const isValid = options?.isValid + signature.signature = signature.signature.then(async (signature) => { + if (signature.type === 'erc1271' && signature.address !== topology.address) { + throw new Error( + `incorrect erc-1271 signature address ${signature.address} for ${JSON.stringify(topology)}`, + ) + } + if (isValid && !(await isValid(topology, signature))) { + throw new Error(`invalid signer signature for ${JSON.stringify(topology)}`) + } + return signature + }) + + signatures.set(imageHash, signature.signature) + signature.signature.catch(onError(topology)) + } + + const signature = signatures.get(imageHash) as Promise + signature.then(onSignerSignature(topology)).catch(() => {}) + } else if (isSignedSapientSignerLeaf(topology)) { + return + } else if (isSapientSignerLeaf(topology)) { + const imageHash = Bytes.toHex(hashConfiguration(topology)) + + if (!signatures.has(imageHash)) { + let signature = sign_(topology) + if (!('signature' in signature)) { + if (signature instanceof Promise) { + signature = { signature } + } else { + signature = { signature: Promise.resolve(signature) } + } + } + + if (signature.onSignerSignature) { + signerSignatureCallbacks.push(signature.onSignerSignature) + } + if (signature.onCancel) { + cancelCallbacks.push(signature.onCancel) + } + + const isValid = options?.isValid + signature.signature = signature.signature.then(async (signature) => { + if (signature.address !== topology.address) { + throw new Error( + `incorrect sapient signature address ${signature.address} for ${JSON.stringify(topology)}`, + ) + } + if (isValid && !(await isValid(topology, signature))) { + throw new Error(`invalid signer signature for ${JSON.stringify(topology)}`) + } + return signature + }) + + signatures.set(imageHash, signature.signature) + signature.signature.catch(onError(topology)) + } + + const signature = signatures.get(imageHash) as Promise + signature.then(onSignerSignature(topology)).catch(() => {}) + } else if (isSubdigestLeaf(topology)) { + return + } else if (isNodeLeaf(topology)) { + return + } else if (isRawSignerLeaf(topology)) { + return + } else if (isRawNestedLeaf(topology)) { + try { + sign(topology.tree, sign_, { ...options, threshold: topology.threshold, _signatures: signatures }).catch( + () => {}, + ) + } catch {} + } else { + topology.forEach(search) + } + } + + search(topology) + }) +} + +type SignerSignature = + | T + | Promise + | { signature: Promise; onSignerSignature?: SignerSignatureCallback; onCancel?: CancelCallback } + +type SignerSignatureCallback = (topology: RawTopology, validated: boolean) => void +type CancelCallback = (success: boolean) => void From 394ffa62e7778419f9d4d4d4ad4567b71cee12dc Mon Sep 17 00:00:00 2001 From: William Hua Date: Mon, 10 Feb 2025 21:05:23 -0500 Subject: [PATCH 111/439] primitives: sign_ -> signLeaf --- packages/primitives/src/config.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/primitives/src/config.ts b/packages/primitives/src/config.ts index c5b36a0e5..e2d6e06a4 100644 --- a/packages/primitives/src/config.ts +++ b/packages/primitives/src/config.ts @@ -333,7 +333,7 @@ function decodeTopology(obj: any): Topology { export function sign( topology: RawTopology, - sign_: ( + signLeaf: ( signer: T, ) => SignerSignature, options?: { @@ -415,7 +415,7 @@ export function sign( const imageHash = Bytes.toHex(hashConfiguration(topology)) if (!signatures.has(imageHash)) { - let signature = sign_(topology) + let signature = signLeaf(topology) if (!('signature' in signature)) { if (signature instanceof Promise) { signature = { signature } @@ -456,7 +456,7 @@ export function sign( const imageHash = Bytes.toHex(hashConfiguration(topology)) if (!signatures.has(imageHash)) { - let signature = sign_(topology) + let signature = signLeaf(topology) if (!('signature' in signature)) { if (signature instanceof Promise) { signature = { signature } @@ -499,7 +499,7 @@ export function sign( return } else if (isRawNestedLeaf(topology)) { try { - sign(topology.tree, sign_, { ...options, threshold: topology.threshold, _signatures: signatures }).catch( + sign(topology.tree, signLeaf, { ...options, threshold: topology.threshold, _signatures: signatures }).catch( () => {}, ) } catch {} From f3cde0056355c5d29518d22bf379ee1e0d522d58 Mon Sep 17 00:00:00 2001 From: William Hua Date: Mon, 10 Feb 2025 21:11:09 -0500 Subject: [PATCH 112/439] primitives: potential weight -> max weight --- packages/core/src/wallet.ts | 8 ++++---- packages/primitives/src/config.ts | 30 +++++++++++++++--------------- 2 files changed, 19 insertions(+), 19 deletions(-) diff --git a/packages/core/src/wallet.ts b/packages/core/src/wallet.ts index 9e5e89fff..9fb98527a 100644 --- a/packages/core/src/wallet.ts +++ b/packages/core/src/wallet.ts @@ -108,8 +108,8 @@ export class Wallet { }), ) - if (getWeight(configuration, (signer) => signers.has(signer.address)).potential < configuration.threshold) { - throw new Error('insufficient potential weight') + if (getWeight(configuration, (signer) => signers.has(signer.address)).maxWeight < configuration.threshold) { + throw new Error('insufficient max weight') } const signerSignatures = await new Promise>((resolve, reject) => { @@ -118,11 +118,11 @@ export class Wallet { options?.onSignerError?.(address, error) - if (getWeight(configuration, (signer) => signers.has(signer.address)).potential < configuration.threshold) { + if (getWeight(configuration, (signer) => signers.has(signer.address)).maxWeight < configuration.threshold) { const onCancels = Array.from(signers.values()).flatMap(({ onCancel }) => (onCancel ? [onCancel] : [])) signers.clear() onCancels.forEach((onCancel) => onCancel(false)) - reject(new Error('insufficient potential weight')) + reject(new Error('insufficient max weight')) } } diff --git a/packages/primitives/src/config.ts b/packages/primitives/src/config.ts index e2d6e06a4..3b3c8046c 100644 --- a/packages/primitives/src/config.ts +++ b/packages/primitives/src/config.ts @@ -124,33 +124,33 @@ export function getSigners(configuration: Configuration | Topology): { export function getWeight( topology: RawTopology | RawConfiguration, canSign?: (signer: SignerLeaf | SapientSignerLeaf) => boolean, -): { weight: bigint; potential: bigint } { +): { weight: bigint; maxWeight: bigint } { topology = isRawConfiguration(topology) ? topology.topology : topology canSign = canSign || ((_signer: SignerLeaf | SapientSignerLeaf) => true) if (isSignedSignerLeaf(topology)) { - return { weight: topology.weight, potential: topology.weight } + return { weight: topology.weight, maxWeight: topology.weight } } else if (isSignerLeaf(topology)) { - return { weight: 0n, potential: canSign(topology) ? topology.weight : 0n } + return { weight: 0n, maxWeight: canSign(topology) ? topology.weight : 0n } } else if (isRawSignerLeaf(topology)) { - return { weight: topology.weight, potential: topology.weight } + return { weight: topology.weight, maxWeight: topology.weight } } else if (isSignedSapientSignerLeaf(topology)) { - return { weight: topology.weight, potential: topology.weight } + return { weight: topology.weight, maxWeight: topology.weight } } else if (isSapientSignerLeaf(topology)) { - return { weight: topology.weight, potential: canSign(topology) ? topology.weight : 0n } + return { weight: topology.weight, maxWeight: canSign(topology) ? topology.weight : 0n } } else if (isSubdigestLeaf(topology)) { - return { weight: 0n, potential: 0n } + return { weight: 0n, maxWeight: 0n } } else if (isRawNestedLeaf(topology)) { - const { weight, potential } = getWeight(topology.tree) + const { weight, maxWeight } = getWeight(topology.tree) return { weight: weight >= topology.threshold ? topology.weight : 0n, - potential: potential >= topology.threshold ? topology.weight : 0n, + maxWeight: maxWeight >= topology.threshold ? topology.weight : 0n, } } else if (isNodeLeaf(topology)) { - return { weight: 0n, potential: 0n } + return { weight: 0n, maxWeight: 0n } } else { const [left, right] = [getWeight(topology[0], canSign), getWeight(topology[1], canSign)] - return { weight: left.weight + right.weight, potential: left.potential + right.potential } + return { weight: left.weight + right.weight, maxWeight: left.maxWeight + right.maxWeight } } } @@ -355,7 +355,7 @@ export function sign( let done = false const check = () => { - const { weight, potential } = getWeight(topology) + const { weight, maxWeight } = getWeight(topology) if (options?.threshold !== undefined) { if (weight >= options.threshold) { cancelCallbacks.forEach((callback) => callback(true)) @@ -363,15 +363,15 @@ export function sign( signerSignatureCallbacks.length = 0 done = true resolve(topology) - } else if (potential < options.threshold) { + } else if (maxWeight < options.threshold) { cancelCallbacks.forEach((callback) => callback(false)) cancelCallbacks.length = 0 signerSignatureCallbacks.length = 0 done = true - reject(new Error(`potential weight ${potential} < threshold ${options.threshold}`)) + reject(new Error(`max weight ${maxWeight} < threshold ${options.threshold}`)) } } - if (weight === potential) { + if (weight === maxWeight) { cancelCallbacks.forEach((callback) => callback(true)) cancelCallbacks.length = 0 signerSignatureCallbacks.length = 0 From 80c01a8c739c8f2f1af1d74449956871a2d8e9ac Mon Sep 17 00:00:00 2001 From: Michael Standen Date: Tue, 11 Feb 2025 15:25:15 +1300 Subject: [PATCH 113/439] Add implicit sesison CLI --- .../primitives-cli/src/subcommands/server.ts | 33 +++- .../primitives-cli/src/subcommands/session.ts | 8 +- .../src/subcommands/sessionExplicit.ts | 14 +- .../src/subcommands/sessionImplicit.ts | 155 ++++++++++++++++++ packages/primitives-cli/src/utils.ts | 27 +++ packages/primitives/src/attestation.ts | 55 ++++++- packages/primitives/src/index.ts | 2 + packages/primitives/src/session-implicit.ts | 83 ++++++++++ 8 files changed, 351 insertions(+), 26 deletions(-) create mode 100644 packages/primitives-cli/src/subcommands/sessionImplicit.ts create mode 100644 packages/primitives/src/session-implicit.ts diff --git a/packages/primitives-cli/src/subcommands/server.ts b/packages/primitives-cli/src/subcommands/server.ts index dd86e1a1b..6e8040845 100644 --- a/packages/primitives-cli/src/subcommands/server.ts +++ b/packages/primitives-cli/src/subcommands/server.ts @@ -5,6 +5,7 @@ import * as devTools from './devTools' import * as payload from './payload' import * as permission from './permission' import * as sessionExplicit from './sessionExplicit' +import * as sessionImplicit from './sessionImplicit' import * as signatureUtils from './signature' // Basic JSON-RPC types @@ -127,30 +128,52 @@ const rpcMethods: Record Promise> = { }, // SESSION EXPLICIT - async session_empty(_params) { + async session_explicit_empty(_params) { return await sessionExplicit.doEmptySession() }, - async session_add(params) { + async session_explicit_add(params) { const { explicitSession, sessionTopology } = params const result = await sessionExplicit.doAddSession(JSON.stringify(explicitSession), JSON.stringify(sessionTopology)) return result }, - async session_remove(params) { + async session_explicit_remove(params) { const { explicitSessionAddress, sessionTopology } = params const result = await sessionExplicit.doRemoveSession(explicitSessionAddress, JSON.stringify(sessionTopology)) return result }, - async session_use(params) { + async session_explicit_use(params) { const { signature, permissionIndexes, sessionTopology } = params const result = await sessionExplicit.doUseSession(signature, permissionIndexes, JSON.stringify(sessionTopology)) return result }, - async session_toPackedTopology(params) { + async session_explicit_toPackedTopology(params) { const { sessionTopology } = params const result = await sessionExplicit.doEncodeSessionsTopology(JSON.stringify(sessionTopology)) return result }, + // SESSION IMPLICIT + async session_implicit_empty(_params) { + return await sessionImplicit.doEmptySession() + }, + async session_implicit_addBlacklistAddress(params) { + const { blacklistAddress, sessionConfiguration } = params + return await sessionImplicit.doAddBlacklistAddress(blacklistAddress, JSON.stringify(sessionConfiguration)) + }, + async session_implicit_removeBlacklistAddress(params) { + const { blacklistAddress, sessionConfiguration } = params + return await sessionImplicit.doRemoveBlacklistAddress(blacklistAddress, JSON.stringify(sessionConfiguration)) + }, + async session_implicit_use(params) { + const { sessionSignature, globalSignature, attestation, sessionConfiguration } = params + return await sessionImplicit.doUseImplicitSession( + sessionSignature, + globalSignature, + JSON.stringify(attestation), + JSON.stringify(sessionConfiguration), + ) + }, + // SIGNATURE async signature_encode(params) { const { input, signatures, chainId = true } = params diff --git a/packages/primitives-cli/src/subcommands/session.ts b/packages/primitives-cli/src/subcommands/session.ts index 4342d3ef3..43c73470f 100644 --- a/packages/primitives-cli/src/subcommands/session.ts +++ b/packages/primitives-cli/src/subcommands/session.ts @@ -1,11 +1,15 @@ -import type { CommandModule } from 'yargs' +import { CommandModule } from 'yargs' import sessionExplicitCommand from './sessionExplicit' +import sessionImplicitCommand from './sessionImplicit' const sessionCommand: CommandModule = { command: 'session', describe: 'Session utilities', builder: (yargs) => { - return yargs.command(sessionExplicitCommand).demandCommand(1, 'You must specify a subcommand for session') + return yargs + .command(sessionExplicitCommand) + .command(sessionImplicitCommand) + .demandCommand(1, 'You must specify a subcommand for session') }, handler: () => {}, } diff --git a/packages/primitives-cli/src/subcommands/sessionExplicit.ts b/packages/primitives-cli/src/subcommands/sessionExplicit.ts index cd9754a41..d327a1a47 100644 --- a/packages/primitives-cli/src/subcommands/sessionExplicit.ts +++ b/packages/primitives-cli/src/subcommands/sessionExplicit.ts @@ -10,7 +10,7 @@ import { } from '@0xsequence/sequence-primitives' import { Bytes, Hex } from 'ox' import type { CommandModule } from 'yargs' -import { fromPosOrStdin } from '../utils' +import { fromPosOrStdin, parseRSV } from '../utils' export async function doEncodeSessionsTopology(input: string): Promise { let topology = sessionsTopologyFromJson(input) @@ -57,16 +57,7 @@ export async function doUseSession( if (!signatureInput) { throw new Error('Signature is required') } - // Decode signature from "r:s:v" - const signatureParts = signatureInput.split(':') - if (signatureParts.length !== 3) { - throw new Error('Signature must be in r:s:v format') - } - const signature = { - r: Bytes.fromHex(signatureParts[0] as `0x${string}`), - s: Bytes.fromHex(signatureParts[1] as `0x${string}`), - v: parseInt(signatureParts[2] ?? ''), - } + const signature = parseRSV(signatureInput) if (!permissionIndexesInput) { throw new Error('Permission indexes are required') @@ -99,6 +90,7 @@ const sessionExplicitCommand: CommandModule = { .positional('explicit-session', { type: 'string', description: 'Explicit session to add', + required: true, }) .positional('session-topology', { type: 'string', diff --git a/packages/primitives-cli/src/subcommands/sessionImplicit.ts b/packages/primitives-cli/src/subcommands/sessionImplicit.ts new file mode 100644 index 000000000..bed7b859b --- /dev/null +++ b/packages/primitives-cli/src/subcommands/sessionImplicit.ts @@ -0,0 +1,155 @@ +// packages/primitives-cli/src/subcommands/sessionImplicit.ts + +import { + ImplicitSessionConfiguration, + addToImplicitSessionBlacklist, + attestationFromJson, + emptyImplicitSessionConfiguration, + encodeImplicitSessionSignature, + removeFromImplicitSessionBlacklist, +} from '@0xsequence/sequence-primitives' +import { Hex } from 'ox' +import type { CommandModule } from 'yargs' +import { fromPosOrStdin, parseRSV, requireString } from '../utils' + +export async function doEmptySession(): Promise { + return JSON.stringify(emptyImplicitSessionConfiguration()) +} + +export async function doAddBlacklistAddress( + blacklistAddress: string, + sessionConfigurationInput: string, +): Promise { + const sessionConfiguration = JSON.parse(sessionConfigurationInput) as ImplicitSessionConfiguration + const updated = addToImplicitSessionBlacklist(sessionConfiguration, blacklistAddress) + return JSON.stringify(updated) +} + +export async function doRemoveBlacklistAddress( + blacklistAddress: string, + sessionConfigurationInput: string, +): Promise { + const sessionConfiguration = JSON.parse(sessionConfigurationInput) as ImplicitSessionConfiguration + const updated = removeFromImplicitSessionBlacklist(sessionConfiguration, blacklistAddress) + return JSON.stringify(updated) +} + +export async function doUseImplicitSession( + sessionSigInput: string, + globalSigInput: string, + attestationInput: string, + sessionConfigurationInput: string, +): Promise { + const sessionSig = parseRSV(sessionSigInput) + const globalSig = parseRSV(globalSigInput) + const attestation = attestationFromJson(attestationInput) + const sessionConfiguration = JSON.parse(sessionConfigurationInput) as ImplicitSessionConfiguration + const encoded = encodeImplicitSessionSignature(sessionSig, attestation, globalSig, sessionConfiguration) + return Hex.from(encoded) +} +const sessionImplicitCommand: CommandModule = { + command: 'implicit', + describe: 'Implicit session utilities', + builder: (yargs) => { + return yargs + .command( + 'empty', + 'Create an empty implicit session topology', + () => {}, + async () => { + console.log(await doEmptySession()) + }, + ) + .command( + 'blacklist-add [blacklist-address] [session-configuration]', + 'Add an address to the implicit session blacklist', + (yargs) => { + return yargs + .positional('blacklist-address', { + type: 'string', + description: 'Blacklist address', + required: true, + }) + .positional('session-configuration', { + type: 'string', + description: 'Session configuration', + required: true, + }) + }, + async (argv) => { + const blacklistAddress = argv.blacklistAddress + requireString(blacklistAddress, 'Blacklist address') + const sessionConfigurationInput = await fromPosOrStdin(argv, 'session-configuration') + console.log(await doAddBlacklistAddress(blacklistAddress, sessionConfigurationInput)) + }, + ) + .command( + 'blacklist-remove [blacklist-address] [session-configuration]', + 'Remove an address from the implicit session blacklist', + (yargs) => { + return yargs + .positional('blacklist-address', { + type: 'string', + description: 'Blacklist address', + required: true, + }) + .positional('session-configuration', { + type: 'string', + description: 'Session configuration', + required: true, + }) + }, + async (argv) => { + const blacklistAddress = argv.blacklistAddress as string + if (!blacklistAddress) { + throw new Error('Blacklist address is required') + } + const sessionConfigurationInput = await fromPosOrStdin(argv, 'session-configuration') + console.log(await doRemoveBlacklistAddress(blacklistAddress, sessionConfigurationInput)) + }, + ) + .command( + 'use [session-signature] [global-signature] [attestation] [session-configuration]', + 'Encode an implicit session signature', + (yargs) => { + return yargs + .positional('session-signature', { + type: 'string', + description: 'Session signature in r:s:v format', + required: true, + }) + .positional('global-signature', { + type: 'string', + description: 'Global signature in r:s:v format', + required: true, + }) + .positional('attestation', { + type: 'string', + description: 'Attestation in r:s:v format', + required: true, + }) + .positional('session-configuration', { + type: 'string', + description: 'Session configuration', + required: true, + }) + }, + async (argv) => { + const sessionSigStr = argv.sessionSignature + requireString(sessionSigStr, 'Session signature') + const globalSigStr = argv.globalSignature + requireString(globalSigStr, 'Global signature') + const attestationInput = argv.attestation + requireString(attestationInput, 'Attestation') + const sessionConfigurationInput = await fromPosOrStdin(argv, 'session-configuration') + console.log( + await doUseImplicitSession(sessionSigStr, globalSigStr, attestationInput, sessionConfigurationInput), + ) + }, + ) + .demandCommand(1, 'You must specify a subcommand for implicit session') + }, + handler: () => {}, +} + +export default sessionImplicitCommand diff --git a/packages/primitives-cli/src/utils.ts b/packages/primitives-cli/src/utils.ts index 8899d8527..90c042e20 100644 --- a/packages/primitives-cli/src/utils.ts +++ b/packages/primitives-cli/src/utils.ts @@ -1,4 +1,5 @@ import { Arguments } from 'yargs' +import { Bytes } from 'ox' export async function readStdin(): Promise { return new Promise((resolve, reject) => { @@ -29,3 +30,29 @@ export async function fromPosOrStdin(argv: Arguments, arg: keyof T): Promi return await readStdin() } + +/** + * Helper to parse a signature from a string in "r:s:v" format. + * Returns an object with { v, r, s } where r and s are Uint8Array. + */ +export function parseRSV(sigStr: string): { v: number; r: Bytes.Bytes; s: Bytes.Bytes } { + const parts = sigStr.split(':') + if (parts.length !== 3) { + throw new Error('Signature must be in r:s:v format') + } + const [rStr, sStr, vStr] = parts + if (!rStr || !sStr || !vStr) { + throw new Error('Invalid signature format') + } + return { + v: parseInt(vStr, 10), + r: Bytes.fromHex(rStr as `0x${string}`), + s: Bytes.fromHex(sStr as `0x${string}`), + } +} + +export function requireString(arg: string | undefined, name: string): asserts arg is string { + if (!arg) { + throw new Error(`${name} is required`) + } +} diff --git a/packages/primitives/src/attestation.ts b/packages/primitives/src/attestation.ts index ac6b041d4..afa8d0ca9 100644 --- a/packages/primitives/src/attestation.ts +++ b/packages/primitives/src/attestation.ts @@ -10,18 +10,57 @@ export type Attestation = { } export function encodeAttestation(attestation: Attestation): Bytes.Bytes { + const approvedSignerBytes = Bytes.padLeft(Bytes.fromHex(attestation.approvedSigner), 20) + const identityTypeBytes = Bytes.padLeft(attestation.identityType, 4) + const issuerHashBytes = Bytes.padLeft(attestation.issuerHash, 32) + const audienceHashBytes = Bytes.padLeft(attestation.audienceHash, 32) + const authDataLengthBytes = Bytes.padLeft(Bytes.fromNumber(attestation.authData.length), 3) + const authDataBytes = attestation.authData + const applicationDataLengthBytes = Bytes.padLeft(Bytes.fromNumber(attestation.applicationData.length), 3) + const applicationDataBytes = attestation.applicationData + return Bytes.concat( - Bytes.padLeft(Bytes.fromHex(attestation.approvedSigner), 20), - Bytes.padLeft(attestation.identityType, 4), - Bytes.padLeft(attestation.issuerHash, 32), - Bytes.padLeft(attestation.audienceHash, 32), - Bytes.padLeft(Bytes.fromNumber(attestation.authData.length), 3), - attestation.authData, - Bytes.padLeft(Bytes.fromNumber(attestation.applicationData.length), 3), - attestation.applicationData, + approvedSignerBytes, + identityTypeBytes, + issuerHashBytes, + audienceHashBytes, + authDataLengthBytes, + authDataBytes, + applicationDataLengthBytes, + applicationDataBytes, ) } export function hashAttestation(attestation: Attestation): Bytes.Bytes { return Hash.keccak256(encodeAttestation(attestation)) } + +export function attestationToJson(attestation: Attestation): string { + return JSON.stringify(encodeAttestationForJson(attestation)) +} + +export function encodeAttestationForJson(attestation: Attestation): any { + return { + approvedSigner: attestation.approvedSigner.toString(), + identityType: Bytes.toHex(attestation.identityType), + issuerHash: Bytes.toHex(attestation.issuerHash), + audienceHash: Bytes.toHex(attestation.audienceHash), + authData: Bytes.toHex(attestation.authData), + applicationData: Bytes.toHex(attestation.applicationData), + } +} + +export function attestationFromJson(json: string): Attestation { + return attestationFromParsed(JSON.parse(json)) +} + +export function attestationFromParsed(parsed: any): Attestation { + return { + approvedSigner: Address.from(parsed.approvedSigner), + identityType: Bytes.fromHex(parsed.identityType), + issuerHash: Bytes.fromHex(parsed.issuerHash), + audienceHash: Bytes.fromHex(parsed.audienceHash), + authData: Bytes.fromHex(parsed.authData), + applicationData: Bytes.fromHex(parsed.applicationData), + } +} diff --git a/packages/primitives/src/index.ts b/packages/primitives/src/index.ts index df8b4eb63..9fe76e8d9 100644 --- a/packages/primitives/src/index.ts +++ b/packages/primitives/src/index.ts @@ -1,4 +1,5 @@ export * from './address' +export * from './attestation' export * from './config' export * from './constants' export * from './erc-6492' @@ -6,5 +7,6 @@ export * from './payload' export * from './permission' export * from './session-explicit-config' export * from './session-explicit-signature' +export * from './session-implicit' export * from './signature' export * from './utils' diff --git a/packages/primitives/src/session-implicit.ts b/packages/primitives/src/session-implicit.ts new file mode 100644 index 000000000..d073fb937 --- /dev/null +++ b/packages/primitives/src/session-implicit.ts @@ -0,0 +1,83 @@ +import { Bytes } from 'ox' +import { Attestation, encodeAttestation } from './attestation' +import { packRSV } from './utils' + +/** + * An implicit session configuration consists of a blacklist of addresses. + */ +export interface ImplicitSessionConfiguration { + blacklist: string[] +} + +export function emptyImplicitSessionConfiguration(): ImplicitSessionConfiguration { + return { blacklist: [] } +} + +/** + * Adds an address to the implicit session's blacklist. + * If the address is not already in the blacklist, it is added and the list is sorted. + */ +export function addToImplicitSessionBlacklist( + sessionConfiguration: ImplicitSessionConfiguration, + address: string, +): ImplicitSessionConfiguration { + const { blacklist } = sessionConfiguration + if (!blacklist.some((addr) => addr === address)) { + blacklist.push(address) + blacklist.sort() // keep sorted so on-chain binary search works as expected + } + return { ...sessionConfiguration, blacklist } +} + +/** + * Removes an address from the implicit session's blacklist. + */ +export function removeFromImplicitSessionBlacklist( + sessionConfiguration: ImplicitSessionConfiguration, + address: string, +): ImplicitSessionConfiguration { + const blacklist = sessionConfiguration.blacklist.filter((a) => a !== address) + return { ...sessionConfiguration, blacklist } +} + +/** + * Encodes the implicit session signature. + * + * The on‐chain encoding layout is: + * [sessionSignature (64 bytes)] ++ [attestation] ++ [globalSignature (64 bytes)] + * ++ [uint24(blacklist.length)] ++ [blacklist addresses (each 20 bytes)] + * + * The provided session and global signatures (as {r, s, v} objects) are first + * packed into a compact 64-byte representation via packRSV. + * + * @param sessionSig - The session signature (r, s, v) object. + * @param attestation - The packed attestation bytes. + * @param globalSig - The global signature (r, s, v) object. + * @param blacklist - The array of blacklisted addresses (as hex strings). + * @returns The fully encoded implicit session signature as a Uint8Array. + */ +export function encodeImplicitSessionSignature( + sessionSig: { v: number; r: Bytes.Bytes; s: Bytes.Bytes }, + attestation: Attestation, + globalSig: { v: number; r: Bytes.Bytes; s: Bytes.Bytes }, + sessionConfiguration: ImplicitSessionConfiguration, +): Uint8Array { + // Pack the session and global signatures into their compact 64-byte representations. + const sessionSigPacked = packRSV(sessionSig) + const globalSigPacked = packRSV(globalSig) + + // Blacklist encoding + const { blacklist } = sessionConfiguration + const blacklistBytes = blacklist.map((addr) => Bytes.fromHex(addr as `0x${string}`)) + const concatenatedBlacklist = blacklistBytes.length > 0 ? Bytes.concat(...blacklistBytes) : new Uint8Array(0) + const blacklistLengthBytes = Bytes.fromNumber(blacklist.length, { size: 3 }) + + // Concatenate all parts in order. + return Bytes.concat( + sessionSigPacked, + encodeAttestation(attestation), + globalSigPacked, + blacklistLengthBytes, + concatenatedBlacklist, + ) +} From 147f0eb9a5837d5d6479a8f4bfcfb48bc8197aea Mon Sep 17 00:00:00 2001 From: Michael Standen Date: Tue, 11 Feb 2025 15:26:38 +1300 Subject: [PATCH 114/439] Add vscode launch command for debugging RPC --- .vscode/launch.json | 28 +++++++++++++++++++++++++++ packages/primitives-cli/tsconfig.json | 3 ++- packages/primitives/tsconfig.json | 3 ++- 3 files changed, 32 insertions(+), 2 deletions(-) create mode 100644 .vscode/launch.json diff --git a/.vscode/launch.json b/.vscode/launch.json new file mode 100644 index 000000000..00f09c3ad --- /dev/null +++ b/.vscode/launch.json @@ -0,0 +1,28 @@ +{ + "version": "0.2.0", + "configurations": [ + { + "name": "Launch primitives-cli server", + "type": "node", + "request": "launch", + "program": "${workspaceFolder}/packages/primitives-cli/dist/index.js", + "args": ["server"], + "runtimeArgs": ["--enable-source-maps"], + "cwd": "${workspaceFolder}", + "console": "integratedTerminal", + "sourceMaps": true, + "outFiles": [ + "${workspaceFolder}/packages/primitives-cli/dist/**/*.js", + "${workspaceFolder}/packages/core/dist/**/*.js", + "${workspaceFolder}/packages/primitives/dist/**/*.js", + "${workspaceFolder}/packages/wdk/dist/**/*.js" + ], + "sourceMapPathOverrides": { + "../packages/primitives-cli/src/*": "${workspaceFolder}/packages/primitives-cli/src/*", + "../packages/core/src/*": "${workspaceFolder}/packages/core/src/*", + "../packages/primitives/src/*": "${workspaceFolder}/packages/primitives/src/*", + "../packages/wdk/src/*": "${workspaceFolder}/packages/wdk/src/*" + } + } + ] +} diff --git a/packages/primitives-cli/tsconfig.json b/packages/primitives-cli/tsconfig.json index e502f58f4..1e325a596 100644 --- a/packages/primitives-cli/tsconfig.json +++ b/packages/primitives-cli/tsconfig.json @@ -2,7 +2,8 @@ "extends": "@repo/typescript-config/base.json", "compilerOptions": { "rootDir": "src", - "outDir": "dist" + "outDir": "dist", + "sourceMap": true }, "include": ["src"], "exclude": ["node_modules", "dist"] diff --git a/packages/primitives/tsconfig.json b/packages/primitives/tsconfig.json index e502f58f4..1e325a596 100644 --- a/packages/primitives/tsconfig.json +++ b/packages/primitives/tsconfig.json @@ -2,7 +2,8 @@ "extends": "@repo/typescript-config/base.json", "compilerOptions": { "rootDir": "src", - "outDir": "dist" + "outDir": "dist", + "sourceMap": true }, "include": ["src"], "exclude": ["node_modules", "dist"] From ac6696e88bdd13182d852ee58a34f83e3da9dba1 Mon Sep 17 00:00:00 2001 From: William Hua Date: Thu, 13 Feb 2025 11:48:53 -0500 Subject: [PATCH 115/439] primitives: erc-6492 fixes --- packages/primitives/src/erc-6492.ts | 12 ++++++------ packages/primitives/src/signature.ts | 18 +++++++++--------- 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/packages/primitives/src/erc-6492.ts b/packages/primitives/src/erc-6492.ts index 1cab84ac9..850fb12b2 100644 --- a/packages/primitives/src/erc-6492.ts +++ b/packages/primitives/src/erc-6492.ts @@ -1,15 +1,15 @@ import { AbiFunction, AbiParameters, Address, Bytes, Hex } from 'ox' import { WrappedSignature } from 'ox/erc6492' -import { DEPLOY, MAIN_MODULE } from './constants' +import { DEPLOY, FACTORY, MAIN_MODULE } from './constants' export function erc6492Deploy(deployHash: T): { to: Address.Address; data: T } { const encoded = AbiFunction.encodeData(DEPLOY, [MAIN_MODULE, Hex.from(deployHash)]) switch (typeof deployHash) { case 'object': - return { to: MAIN_MODULE, data: Hex.toBytes(encoded) as T } + return { to: FACTORY, data: Hex.toBytes(encoded) as T } case 'string': - return { to: MAIN_MODULE, data: encoded as T } + return { to: FACTORY, data: encoded as T } } } @@ -35,7 +35,7 @@ export function erc6492( export function erc6492Decode( signature: T, -): { signature: T; to?: Address.Address; data?: T } { +): { signature: T; erc6492?: { to: Address.Address; data: T } } { switch (typeof signature) { case 'object': if ( @@ -46,7 +46,7 @@ export function erc6492Decode( [{ type: 'address' }, { type: 'bytes' }, { type: 'bytes' }], signature.subarray(0, -WrappedSignature.magicBytes.slice(2).length / 2), ) - return { signature: Hex.toBytes(decoded) as T, to, data: Hex.toBytes(data) as T } + return { signature: Hex.toBytes(decoded) as T, erc6492: { to, data: Hex.toBytes(data) as T } } } else { return { signature } } @@ -58,7 +58,7 @@ export function erc6492Decode( [{ type: 'address' }, { type: 'bytes' }, { type: 'bytes' }], signature.slice(0, -WrappedSignature.magicBytes.slice(2).length) as Hex.Hex, ) - return { signature: decoded as T, to, data: data as T } + return { signature: decoded as T, erc6492: { to, data: data as T } } } catch { return { signature } } diff --git a/packages/primitives/src/signature.ts b/packages/primitives/src/signature.ts index 1e89a0f04..d8c2303b0 100644 --- a/packages/primitives/src/signature.ts +++ b/packages/primitives/src/signature.ts @@ -17,6 +17,7 @@ import { isTopology, } from './config' import { IS_VALID_SAPIENT_SIGNATURE, IS_VALID_SAPIENT_SIGNATURE_COMPACT, IS_VALID_SIGNATURE } from './constants' +import { erc6492, erc6492Decode } from './erc-6492' import { fromConfigUpdate, hash, ParentedPayload } from './payload' import { minBytesFor } from './utils' @@ -92,6 +93,7 @@ export type RawSignature = { checkpointerData?: Bytes.Bytes configuration: RawConfiguration suffix?: RawSignature[] + erc6492?: { to: Address.Address; data: Bytes.Bytes } } export function isRawSignature(signature: any): signature is RawSignature { @@ -153,7 +155,9 @@ export function isRawNestedLeaf(cand: any): cand is RawNestedLeaf { return typeof cand === 'object' && 'tree' in cand && 'weight' in cand && 'threshold' in cand } -export function decodeSignature(signature: Bytes.Bytes): RawSignature { +export function decodeSignature(erc6492Signature: Bytes.Bytes): RawSignature { + const { signature, erc6492 } = erc6492Decode(erc6492Signature) + if (signature.length < 1) { throw new Error('Signature is empty') } @@ -226,7 +230,7 @@ export function decodeSignature(signature: Bytes.Bytes): RawSignature { throw new Error('Chained signature has no subsignatures') } - return { ...subsignatures[0]!, suffix: subsignatures.slice(1) } + return { ...subsignatures[0]!, suffix: subsignatures.slice(1), erc6492 } } const { nodes, leftover } = parseBranch(signature.slice(index)) @@ -239,12 +243,8 @@ export function decodeSignature(signature: Bytes.Bytes): RawSignature { return { noChainId, checkpointerData, - configuration: { - threshold, - checkpoint, - topology, - checkpointer: checkpointerAddress, - }, + configuration: { threshold, checkpoint, topology, checkpointer: checkpointerAddress }, + erc6492, } } @@ -672,7 +672,7 @@ export function encodeSignature(signature: RawSignature, skipCheckpointerData?: const topologyBytes = encodeTopology(config.topology, signature) output = Bytes.concat(output, topologyBytes) - return output + return signature.erc6492 ? erc6492(output, signature.erc6492) : output } export function encodeTopology( From f891fad5d15c00f263b02df9697b0fb9ed0c5034 Mon Sep 17 00:00:00 2001 From: Agusx1211 Date: Thu, 13 Feb 2025 19:14:46 +0000 Subject: [PATCH 116/439] Add context types --- packages/core/src/wallet.ts | 19 ++++++++++++++++--- packages/primitives/src/address.ts | 11 +++++++---- packages/primitives/src/constants.ts | 14 +++++++++++--- packages/primitives/src/erc-6492.ts | 13 ++++++++----- 4 files changed, 42 insertions(+), 15 deletions(-) diff --git a/packages/core/src/wallet.ts b/packages/core/src/wallet.ts index 9fb98527a..f3ce7cbfc 100644 --- a/packages/core/src/wallet.ts +++ b/packages/core/src/wallet.ts @@ -1,6 +1,8 @@ import { Configuration, + Context, decodeSignature, + DevContext1, encodeSignature, erc6492, erc6492Deploy, @@ -19,16 +21,27 @@ import { AbiFunction, Address, Bytes, Hex, Provider, Signature as oxSignature } import { CancelCallback, Signature, Signer, SignerSignatureCallback } from './signer' import { Sessions, StateReader, StateWriter } from './state' +export type WalletOptions = { + context: Context +} + +export const DefaultWalletOptions: WalletOptions = { + context: DevContext1, +} + export class Wallet { private readonly signers = new Map() private readonly stateProvider: StateReader & StateWriter - constructor(readonly address: Address.Address) { + constructor( + readonly address: Address.Address, + options: WalletOptions = DefaultWalletOptions, + ) { this.stateProvider = new Sessions() } - static fromConfiguration(configuration: Configuration): Wallet { - return new Wallet(getCounterfactualAddress(configuration)) + static fromConfiguration(configuration: Configuration, options: WalletOptions = DefaultWalletOptions): Wallet { + return new Wallet(getCounterfactualAddress(configuration, options.context)) } async setSigner(signer: Signer) { diff --git a/packages/primitives/src/address.ts b/packages/primitives/src/address.ts index a63e2aebd..3a9a3a9c8 100644 --- a/packages/primitives/src/address.ts +++ b/packages/primitives/src/address.ts @@ -1,17 +1,20 @@ import { Address, Bytes, Hash } from 'ox' import { Configuration, hashConfiguration } from './config' -import { CREATION_CODE, FACTORY, MAIN_MODULE } from './constants' +import { Context } from './constants' -export function getCounterfactualAddress(configuration: Bytes.Bytes | Configuration): Address.Address { +export function getCounterfactualAddress( + configuration: Bytes.Bytes | Configuration, + context: Context, +): Address.Address { const imageHash = configuration instanceof Uint8Array ? configuration : hashConfiguration(configuration) return Bytes.toHex( Hash.keccak256( Bytes.concat( Bytes.from('0xff'), - Bytes.from(FACTORY), + Bytes.from(context.factory), imageHash, - Hash.keccak256(Bytes.concat(Bytes.from(CREATION_CODE), Bytes.from(MAIN_MODULE))), + Hash.keccak256(Bytes.concat(Bytes.from(context.creationCode), Bytes.from(context.stage1))), ), { as: 'Bytes' }, ).subarray(12), diff --git a/packages/primitives/src/constants.ts b/packages/primitives/src/constants.ts index e3f15322a..8c2adc847 100644 --- a/packages/primitives/src/constants.ts +++ b/packages/primitives/src/constants.ts @@ -1,8 +1,16 @@ import { Abi, Address, Hex } from 'ox' -export const FACTORY: Address.Address = '0xTODO' -export const MAIN_MODULE: Address.Address = '0xTODO' -export const CREATION_CODE: Hex.Hex = '0xTODO' +export type Context = { + factory: Address.Address + stage1: Address.Address + creationCode: Hex.Hex +} + +export const DevContext1: Context = { + factory: '0xFaA5c0b14d1bED5C888Ca655B9a8A5911F78eF4A', + stage1: '0x66155b899d93e255d42a85eb921ead9f2e964ef1', + creationCode: '0xe893cfb06ade2c5b81d209aaf650041816c1ac9d6fd6f328dc874b25db149637', +} // ERC1271 export const IS_VALID_SIGNATURE = Abi.from([ diff --git a/packages/primitives/src/erc-6492.ts b/packages/primitives/src/erc-6492.ts index 850fb12b2..c8656abce 100644 --- a/packages/primitives/src/erc-6492.ts +++ b/packages/primitives/src/erc-6492.ts @@ -1,15 +1,18 @@ import { AbiFunction, AbiParameters, Address, Bytes, Hex } from 'ox' import { WrappedSignature } from 'ox/erc6492' -import { DEPLOY, FACTORY, MAIN_MODULE } from './constants' +import { DEPLOY, Context } from './constants' -export function erc6492Deploy(deployHash: T): { to: Address.Address; data: T } { - const encoded = AbiFunction.encodeData(DEPLOY, [MAIN_MODULE, Hex.from(deployHash)]) +export function erc6492Deploy( + deployHash: T, + context: Context, +): { to: Address.Address; data: T } { + const encoded = AbiFunction.encodeData(DEPLOY, [context.stage1, Hex.from(deployHash)]) switch (typeof deployHash) { case 'object': - return { to: FACTORY, data: Hex.toBytes(encoded) as T } + return { to: context.factory, data: Hex.toBytes(encoded) as T } case 'string': - return { to: FACTORY, data: encoded as T } + return { to: context.factory, data: encoded as T } } } From 7a840140d3d3d1de193b83b9bdb203d7d258b053 Mon Sep 17 00:00:00 2001 From: Agusx1211 Date: Thu, 13 Feb 2025 19:57:40 +0000 Subject: [PATCH 117/439] Fix compute address --- packages/primitives-cli/src/index.ts | 2 + .../primitives-cli/src/subcommands/address.ts | 69 +++++++++++++++++++ .../primitives-cli/src/subcommands/server.ts | 7 ++ packages/primitives/src/address.ts | 2 +- packages/primitives/src/constants.ts | 5 +- 5 files changed, 83 insertions(+), 2 deletions(-) create mode 100644 packages/primitives-cli/src/subcommands/address.ts diff --git a/packages/primitives-cli/src/index.ts b/packages/primitives-cli/src/index.ts index 4a05cd212..3aedc0080 100644 --- a/packages/primitives-cli/src/index.ts +++ b/packages/primitives-cli/src/index.ts @@ -9,6 +9,7 @@ import signatureCommand from './subcommands/signature' import permissionCommand from './subcommands/permission' import sessionCommand from './subcommands/session' import serverCommand from './subcommands/server' +import addressCommand from './subcommands/address' void yargs(hideBin(process.argv)) .command(payloadCommand) @@ -18,6 +19,7 @@ void yargs(hideBin(process.argv)) .command(permissionCommand) //FIXME Not sure we need to expose this .command(sessionCommand) .command(serverCommand) + .command(addressCommand) .demandCommand(1) .strict() .help().argv diff --git a/packages/primitives-cli/src/subcommands/address.ts b/packages/primitives-cli/src/subcommands/address.ts new file mode 100644 index 000000000..e6e520db1 --- /dev/null +++ b/packages/primitives-cli/src/subcommands/address.ts @@ -0,0 +1,69 @@ +import { Address, Bytes } from 'ox' +import type { CommandModule } from 'yargs' +import { getCounterfactualAddress } from '@0xsequence/sequence-primitives' +import { DEFAULT_CREATION_CODE } from '@0xsequence/sequence-primitives' + +export async function doCalculateAddress(options: { + imageHash: string + factory: string + module: string + creationCode?: string +}): Promise { + const context = { + factory: Address.from(options.factory), + stage1: Address.from(options.module), + creationCode: (options.creationCode || DEFAULT_CREATION_CODE) as `0x${string}`, + } + + return getCounterfactualAddress(Bytes.fromHex(options.imageHash as `0x${string}`), context) +} + +const addressCommand: CommandModule = { + command: 'address', + describe: 'Address utilities', + builder: (yargs) => { + return yargs + .command( + 'calculate ', + 'Calculate counterfactual wallet address', + (yargs) => { + return yargs + .positional('imageHash', { + type: 'string', + description: 'Image hash of the wallet', + demandOption: true, + }) + .positional('factory', { + type: 'string', + description: 'Factory address', + demandOption: true, + }) + .positional('module', { + type: 'string', + description: 'Stage1 address', + demandOption: true, + }) + .option('creationCode', { + type: 'string', + description: 'Creation code (optional)', + default: DEFAULT_CREATION_CODE, + }) + }, + async (argv) => { + const { imageHash, factory, module, creationCode } = argv + console.log( + await doCalculateAddress({ + imageHash: imageHash!, + factory: factory!, + module: module!, + creationCode, + }), + ) + }, + ) + .demandCommand(1, 'You must specify a subcommand for address') + }, + handler: () => {}, +} + +export default addressCommand diff --git a/packages/primitives-cli/src/subcommands/server.ts b/packages/primitives-cli/src/subcommands/server.ts index 6e8040845..73a68f8ca 100644 --- a/packages/primitives-cli/src/subcommands/server.ts +++ b/packages/primitives-cli/src/subcommands/server.ts @@ -7,6 +7,7 @@ import * as permission from './permission' import * as sessionExplicit from './sessionExplicit' import * as sessionImplicit from './sessionImplicit' import * as signatureUtils from './signature' +import * as address from './address' // Basic JSON-RPC types interface JsonRpcRequest { @@ -190,6 +191,12 @@ const rpcMethods: Record Promise> = { const result = await signatureUtils.doDecode(sig) return result }, + + // ADDRESS + async address_calculate(params) { + const { imageHash, factory, module, creationCode } = params + return await address.doCalculateAddress({ imageHash, factory, module, creationCode }) + }, } async function handleSingleRequest( diff --git a/packages/primitives/src/address.ts b/packages/primitives/src/address.ts index 3a9a3a9c8..64850a265 100644 --- a/packages/primitives/src/address.ts +++ b/packages/primitives/src/address.ts @@ -14,7 +14,7 @@ export function getCounterfactualAddress( Bytes.from('0xff'), Bytes.from(context.factory), imageHash, - Hash.keccak256(Bytes.concat(Bytes.from(context.creationCode), Bytes.from(context.stage1))), + Hash.keccak256(Bytes.concat(Bytes.from(context.creationCode), Bytes.padLeft(Bytes.from(context.stage1), 32))), ), { as: 'Bytes' }, ).subarray(12), diff --git a/packages/primitives/src/constants.ts b/packages/primitives/src/constants.ts index 8c2adc847..84d431a49 100644 --- a/packages/primitives/src/constants.ts +++ b/packages/primitives/src/constants.ts @@ -1,5 +1,8 @@ import { Abi, Address, Hex } from 'ox' +export const DEFAULT_CREATION_CODE = + '0x603a600e3d39601a805130553df3363d3d373d3d3d363d30545af43d82803e903d91601857fd5bf3' + export type Context = { factory: Address.Address stage1: Address.Address @@ -9,7 +12,7 @@ export type Context = { export const DevContext1: Context = { factory: '0xFaA5c0b14d1bED5C888Ca655B9a8A5911F78eF4A', stage1: '0x66155b899d93e255d42a85eb921ead9f2e964ef1', - creationCode: '0xe893cfb06ade2c5b81d209aaf650041816c1ac9d6fd6f328dc874b25db149637', + creationCode: DEFAULT_CREATION_CODE, } // ERC1271 From a74efd94c0d28e1b8494804930248eafad98915b Mon Sep 17 00:00:00 2001 From: Agusx1211 Date: Fri, 14 Feb 2025 11:15:16 +0000 Subject: [PATCH 118/439] Pass context to sessions --- packages/core/src/index.ts | 3 +++ packages/core/src/state/index.ts | 6 +++--- packages/core/src/state/memory.ts | 13 +++++++------ packages/core/src/state/sessions.ts | 9 +++++---- packages/core/src/wallet.ts | 15 +++++++++++---- 5 files changed, 29 insertions(+), 17 deletions(-) diff --git a/packages/core/src/index.ts b/packages/core/src/index.ts index e69de29bb..0abf23e76 100644 --- a/packages/core/src/index.ts +++ b/packages/core/src/index.ts @@ -0,0 +1,3 @@ +export * from './signer' +export * from './wallet' +export * as state from './state' diff --git a/packages/core/src/state/index.ts b/packages/core/src/state/index.ts index 71b494ef8..e9f88b9a8 100644 --- a/packages/core/src/state/index.ts +++ b/packages/core/src/state/index.ts @@ -1,4 +1,4 @@ -import { Configuration, Payload } from '@0xsequence/sequence-primitives' +import { Configuration, Context, Payload } from '@0xsequence/sequence-primitives' import { Address, Hex } from 'ox' type MaybePromise = T | Promise @@ -11,7 +11,7 @@ export type Signature = export interface StateReader { getConfiguration(imageHash: Hex.Hex): MaybePromise - getDeployHash(wallet: Address.Address): MaybePromise + getDeployHash(wallet: Address.Address): MaybePromise<{ hash: Hex.Hex; context: Context }> getWallets( signer: Address.Address, @@ -25,7 +25,7 @@ export interface StateReader { } export interface StateWriter { - saveWallet(deployConfiguration: Configuration): MaybePromise + saveWallet(deployConfiguration: Configuration, context: Context): MaybePromise saveWitness( signer: Address.Address, diff --git a/packages/core/src/state/memory.ts b/packages/core/src/state/memory.ts index 4ceadc344..51d76c06e 100644 --- a/packages/core/src/state/memory.ts +++ b/packages/core/src/state/memory.ts @@ -1,5 +1,6 @@ import { Configuration, + Context, decodeSignature, fromConfigUpdate, getCounterfactualAddress, @@ -14,7 +15,7 @@ import { Signature, StateReader, StateWriter } from '.' export class MemoryStore implements StateReader, StateWriter { private readonly objects: { configurations: { [imageHash: Hex.Hex]: Configuration } - deployHashes: { [wallet: Address.Address]: Hex.Hex } + deployHashes: { [wallet: Address.Address]: { hash: Hex.Hex; context: Context } } wallets: { [signer: Address.Address]: { [wallet: Address.Address]: { chainId: bigint; digest: Hex.Hex; signature: Signature } @@ -36,7 +37,7 @@ export class MemoryStore implements StateReader, StateWriter { return configuration } - getDeployHash(wallet: Address.Address): Hex.Hex { + getDeployHash(wallet: Address.Address): { hash: Hex.Hex; context: Context } { const deployHash = this.objects.deployHashes[wallet] if (!deployHash) { throw new Error(`no deploy hash for wallet ${wallet}`) @@ -89,11 +90,11 @@ export class MemoryStore implements StateReader, StateWriter { return updates } - saveWallet(deployConfiguration: Configuration): void { + saveWallet(deployConfiguration: Configuration, context: Context): void { const deployHash = hashConfiguration(deployConfiguration) - const wallet = getCounterfactualAddress(deployHash) + const wallet = getCounterfactualAddress(deployHash, context) this.objects.configurations[Bytes.toHex(deployHash)] = deployConfiguration - this.objects.deployHashes[wallet] = Bytes.toHex(deployHash) + this.objects.deployHashes[wallet] = { hash: Bytes.toHex(deployHash), context } let configurationPath = this.objects.configurationPaths[wallet] if (!configurationPath) { @@ -142,7 +143,7 @@ export class MemoryStore implements StateReader, StateWriter { if (!deployHash) { throw new Error(`no deploy hash for wallet ${wallet}`) } - latestImageHash = deployHash + latestImageHash = deployHash.hash } const latestConfiguration = this.objects.configurations[latestImageHash] diff --git a/packages/core/src/state/sessions.ts b/packages/core/src/state/sessions.ts index 4dbd34bbf..f3c22900b 100644 --- a/packages/core/src/state/sessions.ts +++ b/packages/core/src/state/sessions.ts @@ -1,4 +1,4 @@ -import { Configuration, hash, hashConfiguration, Payload } from '@0xsequence/sequence-primitives' +import { Configuration, Context, hash, hashConfiguration, Payload } from '@0xsequence/sequence-primitives' import { Address, Bytes, Hex } from 'ox' import { Signature, StateReader, StateWriter } from '.' import * as service from './sessions.gen' @@ -20,12 +20,13 @@ export class Sessions implements StateReader, StateWriter { return config } - async getDeployHash(wallet: Address.Address): Promise { - const { deployHash } = await this.sessions.deployHash({ wallet }) + async getDeployHash(wallet: Address.Address): Promise<{ hash: Hex.Hex; context: Context }> { + const { deployHash, context } = await this.sessions.deployHash({ wallet }) Hex.assert(deployHash) - return deployHash + // TODO: Enforce context type + return { hash: deployHash, context: context as any } } async getWallets( diff --git a/packages/core/src/wallet.ts b/packages/core/src/wallet.ts index f3ce7cbfc..66270e87b 100644 --- a/packages/core/src/wallet.ts +++ b/packages/core/src/wallet.ts @@ -35,7 +35,7 @@ export class Wallet { constructor( readonly address: Address.Address, - options: WalletOptions = DefaultWalletOptions, + readonly options: WalletOptions = DefaultWalletOptions, ) { this.stateProvider = new Sessions() } @@ -67,6 +67,8 @@ export class Wallet { let chainId: bigint let isDeployed: boolean let imageHash: Hex.Hex + let deployContext: Context + if (provider) { const responses = await Promise.all([ provider.request({ method: 'eth_chainId' }), @@ -78,7 +80,9 @@ export class Wallet { const code = responses[1] if (code === '0x') { isDeployed = false - imageHash = await this.stateProvider.getDeployHash(this.address) + const { hash, context } = await this.stateProvider.getDeployHash(this.address) + imageHash = hash + deployContext = context } else { isDeployed = true imageHash = await provider.request({ @@ -102,7 +106,10 @@ export class Wallet { chainId = 0n isDeployed = true - imageHash = await this.stateProvider.getDeployHash(this.address) + const { hash, context } = await this.stateProvider.getDeployHash(this.address) + imageHash = hash + deployContext = context + const path = await this.stateProvider.getConfigurationPath(this.address, imageHash) if (path.length) { imageHash = path[path.length - 1]!.imageHash @@ -253,6 +260,6 @@ export class Wallet { suffix: signatures.reverse(), }) - return isDeployed ? signature : erc6492(signature, erc6492Deploy(imageHash)) + return isDeployed ? signature : erc6492(signature, erc6492Deploy(imageHash, deployContext!)) } } From e1297866ec6aece2f834c99970683b2739ba3873 Mon Sep 17 00:00:00 2001 From: Agusx1211 Date: Fri, 14 Feb 2025 18:19:09 +0000 Subject: [PATCH 119/439] Add deploy and isDeployed --- packages/core/src/wallet.ts | 54 ++++++++++++++++++++++++++++--------- 1 file changed, 41 insertions(+), 13 deletions(-) diff --git a/packages/core/src/wallet.ts b/packages/core/src/wallet.ts index 66270e87b..2b0dd7328 100644 --- a/packages/core/src/wallet.ts +++ b/packages/core/src/wallet.ts @@ -19,14 +19,17 @@ import { } from '@0xsequence/sequence-primitives' import { AbiFunction, Address, Bytes, Hex, Provider, Signature as oxSignature } from 'ox' import { CancelCallback, Signature, Signer, SignerSignatureCallback } from './signer' -import { Sessions, StateReader, StateWriter } from './state' +import { StateReader, StateWriter } from './state' +import { MemoryStore } from './state/memory' export type WalletOptions = { context: Context + stateProvider: StateReader & StateWriter } export const DefaultWalletOptions: WalletOptions = { context: DevContext1, + stateProvider: new MemoryStore(), } export class Wallet { @@ -35,19 +38,49 @@ export class Wallet { constructor( readonly address: Address.Address, - readonly options: WalletOptions = DefaultWalletOptions, + readonly options: Partial = {}, ) { - this.stateProvider = new Sessions() + const mergedOptions = { ...DefaultWalletOptions, ...options } + this.stateProvider = mergedOptions.stateProvider! } - static fromConfiguration(configuration: Configuration, options: WalletOptions = DefaultWalletOptions): Wallet { - return new Wallet(getCounterfactualAddress(configuration, options.context)) + static async fromConfiguration(configuration: Configuration, options: Partial = {}): Promise { + const mergedOptions = { ...DefaultWalletOptions, ...options } + + await mergedOptions.stateProvider.saveWallet(configuration, mergedOptions.context) + return new Wallet(getCounterfactualAddress(configuration, mergedOptions.context), mergedOptions) } async setSigner(signer: Signer) { this.signers.set(await signer.address, signer) } + async isDeployed(provider: Provider.Provider): Promise { + const code = await provider.request({ method: 'eth_getCode', params: [this.address, 'latest'] }) + return code !== '0x' + } + + async deploy(provider: Provider.Provider): Promise { + console.log('called deploy') + if (await this.isDeployed(provider)) { + throw new Error('Wallet is already deployed') + } + + const { hash: imageHash, context } = await this.stateProvider.getDeployHash(this.address) + const deployData = erc6492Deploy(imageHash, context) + + await provider.request({ + method: 'eth_sendTransaction', + params: [ + { + to: deployData.to, + data: deployData.data, + gas: '0x27100', + }, + ], + }) + } + async setConfiguration(configuration: Configuration, options?: { force: boolean }) { if (!options?.force) { } @@ -70,21 +103,16 @@ export class Wallet { let deployContext: Context if (provider) { - const responses = await Promise.all([ - provider.request({ method: 'eth_chainId' }), - provider.request({ method: 'eth_getCode', params: [this.address, 'latest'] }), - ]) + const responses = await Promise.all([provider.request({ method: 'eth_chainId' }), this.isDeployed(provider)]) chainId = BigInt(responses[0]) + isDeployed = responses[1] - const code = responses[1] - if (code === '0x') { - isDeployed = false + if (!isDeployed) { const { hash, context } = await this.stateProvider.getDeployHash(this.address) imageHash = hash deployContext = context } else { - isDeployed = true imageHash = await provider.request({ method: 'eth_call', params: [{ data: AbiFunction.encodeData(IMAGE_HASH) }], From cf44da00c91ff66e950dc1810b618ed4e6f35678 Mon Sep 17 00:00:00 2001 From: William Hua Date: Fri, 14 Feb 2025 23:45:12 -0500 Subject: [PATCH 120/439] signing refactor --- packages/core/src/index.ts | 3 +- packages/core/src/signer.ts | 23 - packages/core/src/state/index.ts | 40 +- packages/core/src/state/memory.ts | 314 ++++++---- packages/core/src/state/sessions.gen.ts | 774 ------------------------ packages/core/src/state/sessions.ts | 120 ---- packages/core/src/wallet.ts | 456 +++++++------- packages/primitives/src/config.ts | 250 ++++---- packages/primitives/src/payload.ts | 50 +- 9 files changed, 654 insertions(+), 1376 deletions(-) delete mode 100644 packages/core/src/signer.ts delete mode 100644 packages/core/src/state/sessions.gen.ts delete mode 100644 packages/core/src/state/sessions.ts diff --git a/packages/core/src/index.ts b/packages/core/src/index.ts index 0abf23e76..3f5770366 100644 --- a/packages/core/src/index.ts +++ b/packages/core/src/index.ts @@ -1,3 +1,2 @@ -export * from './signer' +export * from './state' export * from './wallet' -export * as state from './state' diff --git a/packages/core/src/signer.ts b/packages/core/src/signer.ts deleted file mode 100644 index ad6d792b5..000000000 --- a/packages/core/src/signer.ts +++ /dev/null @@ -1,23 +0,0 @@ -import { Configuration, Payload } from '@0xsequence/sequence-primitives' -import { Address, Hex } from 'ox' - -export interface Signer { - readonly address: Address.Address | Promise - - sign( - payload: Payload, - ): - | Signature - | Promise - | { signature: Promise; onSignerSignature?: SignerSignatureCallback; onCancel?: CancelCallback } -} - -export type Signature = { type: 'hash' | 'eth_sign' | 'erc-1271' | 'sapient' | 'sapient-compact'; signature: Hex.Hex } - -export type SignerSignatureCallback = ( - configuration: Configuration, - signatures: Map, - validated: boolean, -) => void - -export type CancelCallback = (success: boolean) => void diff --git a/packages/core/src/state/index.ts b/packages/core/src/state/index.ts index e9f88b9a8..82ede3dee 100644 --- a/packages/core/src/state/index.ts +++ b/packages/core/src/state/index.ts @@ -1,41 +1,43 @@ -import { Configuration, Context, Payload } from '@0xsequence/sequence-primitives' +import { + Configuration, + Context, + ParentedPayload, + RawSignature, + SignatureOfSignerLeaf, +} from '@0xsequence/sequence-primitives' import { Address, Hex } from 'ox' -type MaybePromise = T | Promise - -export type Signature = - | { type: 'eip-712'; signature: Hex.Hex } - | { type: 'eth_sign'; signature: Hex.Hex } - | { type: 'erc-1271'; signature: Hex.Hex; validAt: { chainId: bigint; block: Block } } +export type StateProvider = StateReader & StateWriter export interface StateReader { getConfiguration(imageHash: Hex.Hex): MaybePromise - getDeployHash(wallet: Address.Address): MaybePromise<{ hash: Hex.Hex; context: Context }> + getDeployHash(wallet: Address.Address): MaybePromise<{ deployHash: Hex.Hex; context: Context }> - getWallets( - signer: Address.Address, - ): MaybePromise> + getWallets(signer: Address.Address): MaybePromise<{ + [wallet: Address.Address]: { chainId: bigint; payload: ParentedPayload; signature: SignatureOfSignerLeaf } + }> - getConfigurationPath( + getConfigurationUpdates( wallet: Address.Address, fromImageHash: Hex.Hex, options?: { allUpdates?: boolean }, - ): MaybePromise> + ): MaybePromise> } export interface StateWriter { saveWallet(deployConfiguration: Configuration, context: Context): MaybePromise - saveWitness( - signer: Address.Address, + saveWitnesses( wallet: Address.Address, chainId: bigint, - payload: Payload, - signature: Signature, + payload: ParentedPayload, + signatures: SignatureOfSignerLeaf[], ): MaybePromise - setConfiguration(wallet: Address.Address, configuration: Configuration, signature: Hex.Hex): MaybePromise + setConfiguration(wallet: Address.Address, configuration: Configuration, signature: RawSignature): MaybePromise } -export * from './sessions' +type MaybePromise = T | Promise + +export * from './memory' diff --git a/packages/core/src/state/memory.ts b/packages/core/src/state/memory.ts index 51d76c06e..e4c4132e8 100644 --- a/packages/core/src/state/memory.ts +++ b/packages/core/src/state/memory.ts @@ -1,176 +1,264 @@ import { Configuration, Context, - decodeSignature, fromConfigUpdate, getCounterfactualAddress, hash, hashConfiguration, - Payload, - recover, + isNodeLeaf, + isRawNestedLeaf, + isRawSignerLeaf, + isSapientSignerLeaf, + isSignedSignerLeaf, + isSignerLeaf, + isSubdigestLeaf, + ParentedPayload, + RawSignature, + RawTopology, + sign, + SignatureOfSignerLeaf, } from '@0xsequence/sequence-primitives' -import { Address, Bytes, Hex } from 'ox' -import { Signature, StateReader, StateWriter } from '.' +import { Address, Bytes, Hex, PersonalMessage, Secp256k1, Signature } from 'ox' +import { StateProvider } from '.' -export class MemoryStore implements StateReader, StateWriter { +export class MemoryStateProvider implements StateProvider { private readonly objects: { configurations: { [imageHash: Hex.Hex]: Configuration } - deployHashes: { [wallet: Address.Address]: { hash: Hex.Hex; context: Context } } + deployHashes: { [wallet: Address.Address]: { deployHash: Hex.Hex; context: Context } } wallets: { [signer: Address.Address]: { - [wallet: Address.Address]: { chainId: bigint; digest: Hex.Hex; signature: Signature } + [wallet: Address.Address]: { chainId: bigint; payload: ParentedPayload; signature: SignatureOfSignerLeaf } } } - configurationPaths: { + configurationUpdates: { [wallet: Address.Address]: { - updates: Array<{ imageHash: Hex.Hex; signature: Hex.Hex }> - index: { [imageHash: Hex.Hex]: number } + configurations: Hex.Hex[] + signerSignatures: { [imageHash: Hex.Hex]: { [signer: Address.Address]: SignatureOfSignerLeaf } } } } - } = { configurations: {}, deployHashes: {}, wallets: {}, configurationPaths: {} } + } = { configurations: {}, deployHashes: {}, wallets: {}, configurationUpdates: {} } getConfiguration(imageHash: Hex.Hex): Configuration { const configuration = this.objects.configurations[imageHash] if (!configuration) { - throw new Error(`no configuration ${imageHash}`) + throw new Error(`unknown configuration ${imageHash}`) } return configuration } - getDeployHash(wallet: Address.Address): { hash: Hex.Hex; context: Context } { + getDeployHash(wallet: Address.Address): { deployHash: Hex.Hex; context: Context } { const deployHash = this.objects.deployHashes[wallet] if (!deployHash) { - throw new Error(`no deploy hash for wallet ${wallet}`) + throw new Error(`no known deploy hash for ${wallet}`) } return deployHash } - getWallets( - signer: Address.Address, - ): Array<{ wallet: Address.Address; chainId: bigint; digest: Hex.Hex; signature: Signature }> { - const wallets = this.objects.wallets[signer] - if (!wallets) { - throw new Error(`no wallets for signer ${signer}`) - } - return Object.entries(wallets).map(([wallet, signature]) => { - Address.assert(wallet) - return { wallet, ...signature } - }) + getWallets(signer: Address.Address): { + [wallet: Address.Address]: { chainId: bigint; payload: ParentedPayload; signature: SignatureOfSignerLeaf } + } { + return this.objects.wallets[signer] ?? {} } - getConfigurationPath( + async getConfigurationUpdates( wallet: Address.Address, fromImageHash: Hex.Hex, options?: { allUpdates?: boolean }, - ): Array<{ imageHash: Hex.Hex; signature: Hex.Hex }> { - const configurationPath = this.objects.configurationPaths[wallet] - if (!configurationPath) { - throw new Error(`no configuration path for wallet ${wallet}`) + ): Promise> { + const objects = this.objects.configurationUpdates[wallet] + if (!objects) { + throw new Error(`unknown wallet ${wallet}`) } - let index = configurationPath.index[fromImageHash] - if (index === undefined) { - throw new Error(`no configuration path for wallet ${wallet} from ${fromImageHash}`) + let imageHash = fromImageHash + let index = objects.configurations.lastIndexOf(imageHash) + if (index === -1) { + throw new Error(`no configuration update to ${imageHash} by ${wallet}`) } + let configuration = this.getConfiguration(imageHash) - if (options?.allUpdates) { - return configurationPath.updates.slice(index + 1) - } + const updates: Unpromise> = [] + while (index + 1 < objects.configurations.length) { + const append = async (i: number): Promise => { + const toImageHash = objects.configurations[i] + if (!toImageHash) { + throw new Error(`no configuration at index ${i}`) + } - const updates: Array<{ imageHash: Hex.Hex; signature: Hex.Hex }> = [] - while (index + 1 < configurationPath.updates.length) { - for (let next = configurationPath.updates.length - 1; next > index; next--) { - if (next === index + 1) { - updates.push(configurationPath.updates[next]!) - index = next - break + updates.push({ + imageHash: toImageHash, + signature: { + noChainId: true, + configuration: { + ...configuration, + topology: await sign( + configuration.topology, + { + sign: (leaf) => { + const signature = objects.signerSignatures[toImageHash]?.[leaf.address] + if (!signature) { + throw new Error(`no signature for signer ${leaf.address}`) + } + return signature + }, + }, + { threshold: configuration.threshold }, + ), + }, + }, + }) + + imageHash = toImageHash + configuration = this.getConfiguration(imageHash) + } + + if (options?.allUpdates) { + for (let i = index + 1; i < objects.configurations.length; i++) { + try { + await append(i) + index = i + break + } catch {} + } + } else { + for (let i = objects.configurations.length - 1; i > index; i--) { + try { + await append(i) + index = i + break + } catch {} } } } + return updates } - saveWallet(deployConfiguration: Configuration, context: Context): void { - const deployHash = hashConfiguration(deployConfiguration) - const wallet = getCounterfactualAddress(deployHash, context) - this.objects.configurations[Bytes.toHex(deployHash)] = deployConfiguration - this.objects.deployHashes[wallet] = { hash: Bytes.toHex(deployHash), context } - - let configurationPath = this.objects.configurationPaths[wallet] - if (!configurationPath) { - configurationPath = { updates: [], index: {} } - this.objects.configurationPaths[wallet] = configurationPath - } - configurationPath.index[Bytes.toHex(deployHash)] = -1 + saveWallet(deployConfiguration: Configuration, context: Context) { + const deployHashBytes = hashConfiguration(deployConfiguration) + const deployHash = Bytes.toHex(deployHashBytes) + const wallet = getCounterfactualAddress(deployHashBytes, context) + this.objects.configurations[deployHash] = deployConfiguration + this.objects.deployHashes[wallet] = { deployHash, context } + this.objects.configurationUpdates[wallet] = { configurations: [deployHash], signerSignatures: {} } } - saveWitness( - signer: Address.Address, + saveWitnesses( wallet: Address.Address, chainId: bigint, - payload: Payload, - signature: Signature, - ): void { - if (signature.type === 'erc-1271' && signature.validAt.block === undefined) { - throw new Error('memory store requires block number where erc-1271 signature is valid') - } - let wallets = this.objects.wallets[signer] - if (!wallets) { - wallets = {} - this.objects.wallets[signer] = wallets - } - if (wallets[wallet]) { - return - } - wallets[wallet] = { - chainId, - digest: Bytes.toHex(hash(wallet, chainId, payload)), - signature: signature as Signature, - } - } + payload: ParentedPayload, + signatures: SignatureOfSignerLeaf[], + ) { + const digest = hash(wallet, chainId, payload) - async setConfiguration(wallet: Address.Address, configuration: Configuration, signature: Hex.Hex): Promise { - const configurationPath = this.objects.configurationPaths[wallet] - if (!configurationPath) { - throw new Error(`no configuration path for wallet ${wallet}`) - } + signatures.forEach((signature) => { + let signer: Address.Address + switch (signature.type) { + case 'eth_sign': + case 'hash': + signer = Secp256k1.recoverAddress({ + payload: signature.type === 'eth_sign' ? PersonalMessage.getSignPayload(digest) : digest, + signature: { + r: Bytes.toBigInt(signature.r), + s: Bytes.toBigInt(signature.s), + yParity: Signature.vToYParity(signature.v), + }, + }) + break - let latestImageHash: Hex.Hex - if (configurationPath.updates.length) { - latestImageHash = configurationPath.updates[configurationPath.updates.length - 1]!.imageHash - } else { - const deployHash = this.objects.deployHashes[wallet] - if (!deployHash) { - throw new Error(`no deploy hash for wallet ${wallet}`) + case 'erc1271': + signer = signature.address + break } - latestImageHash = deployHash.hash - } - const latestConfiguration = this.objects.configurations[latestImageHash] - if (!latestConfiguration) { - throw new Error(`no configuration ${latestImageHash}`) - } + let wallets = this.objects.wallets[signer] + if (!wallets) { + wallets = {} + this.objects.wallets[signer] = wallets + } + wallets[wallet] = { chainId, payload, signature } + }) + } - if (configuration.checkpoint <= latestConfiguration.checkpoint) { - throw new Error( - `configuration checkpoint ${configuration.checkpoint} <= latest checkpoint ${latestConfiguration.checkpoint}`, - ) + setConfiguration(wallet: Address.Address, configuration: Configuration, signature: RawSignature) { + const configurations = this.objects.configurationUpdates[wallet]?.configurations + if (configurations?.length) { + const latestImageHash = configurations[configurations.length - 1]! + const latestConfiguration = this.getConfiguration(latestImageHash) + if (configuration.checkpoint <= latestConfiguration.checkpoint) { + throw new Error(`checkpoint ${configuration.checkpoint} <= latest checkpoint ${latestConfiguration.checkpoint}`) + } } - const { configuration: recovered, weight } = await recover( - decodeSignature(Hex.toBytes(signature)), - wallet, - 0n, - fromConfigUpdate(Bytes.toHex(hashConfiguration(configuration))), - ) - if (weight < recovered.threshold) { - throw new Error(`invalid signature: weight ${weight} < threshold ${recovered.threshold}`) - } - const recoveredImageHash = Bytes.toHex(hashConfiguration(recovered)) - if (recoveredImageHash !== latestImageHash) { - throw new Error(`invalid signature: recovered ${recoveredImageHash} != latest ${latestImageHash}`) + const imageHash = Bytes.toHex(hashConfiguration(configuration)) + const digest = hash(wallet, 0n, fromConfigUpdate(imageHash)) + + const search = (topology: RawTopology) => { + if (isSignedSignerLeaf(topology)) { + switch (topology.signature.type) { + case 'eth_sign': + case 'hash': + let updates = this.objects.configurationUpdates[wallet] + if (!updates) { + updates = { configurations: [], signerSignatures: {} } + this.objects.configurationUpdates[wallet] = updates + } + updates.configurations.push(imageHash) + + let signatures = updates.signerSignatures[imageHash] + if (!signatures) { + signatures = {} + updates.signerSignatures[imageHash] = signatures + } + signatures[topology.address] = topology.signature + break + } + } else if (isSignerLeaf(topology)) { + return + } else if (isSapientSignerLeaf(topology)) { + return + } else if (isSubdigestLeaf(topology)) { + return + } else if (isNodeLeaf(topology)) { + return + } else if (isRawSignerLeaf(topology)) { + let updates = this.objects.configurationUpdates[wallet] + if (!updates) { + updates = { configurations: [], signerSignatures: {} } + this.objects.configurationUpdates[wallet] = updates + } + updates.configurations.push(imageHash) + + let signatures = updates.signerSignatures[imageHash] + if (!signatures) { + signatures = {} + updates.signerSignatures[imageHash] = signatures + } + switch (topology.signature.type) { + case 'eth_sign': + case 'hash': + signatures[ + Secp256k1.recoverAddress({ + payload: topology.signature.type === 'eth_sign' ? PersonalMessage.getSignPayload(digest) : digest, + signature: { + r: Bytes.toBigInt(topology.signature.r), + s: Bytes.toBigInt(topology.signature.s), + yParity: Signature.vToYParity(topology.signature.v), + }, + }) + ] = topology.signature + break + } + } else if (isRawNestedLeaf(topology)) { + search(topology.tree) + } else { + search(topology[0]) + search(topology[1]) + } } - configurationPath.updates.push({ imageHash: Bytes.toHex(hashConfiguration(configuration)), signature }) + search(signature.configuration.topology) } } + +type Unpromise = T extends Promise ? S : T diff --git a/packages/core/src/state/sessions.gen.ts b/packages/core/src/state/sessions.gen.ts deleted file mode 100644 index dc0986462..000000000 --- a/packages/core/src/state/sessions.gen.ts +++ /dev/null @@ -1,774 +0,0 @@ -/* eslint-disable */ -// sessions v0.0.1 e8a95eea9b72a50abe2c3b10d8a51c5c3fd8c631 -// -- -// Code generated by webrpc-gen@v0.20.3 with typescript generator. DO NOT EDIT. -// -// webrpc-gen -schema=sessions.ridl -target=typescript -client -out=./clients/sessions.gen.ts - -// WebRPC description and code-gen version -export const WebRPCVersion = 'v1' - -// Schema version of your RIDL schema -export const WebRPCSchemaVersion = 'v0.0.1' - -// Schema hash generated from your RIDL schema -export const WebRPCSchemaHash = 'e8a95eea9b72a50abe2c3b10d8a51c5c3fd8c631' - -// -// Types -// - -export enum SignatureType { - EIP712 = 'EIP712', - EthSign = 'EthSign', - EIP1271 = 'EIP1271', -} - -export interface RuntimeStatus { - healthy: boolean - started: string - uptime: number - version: string - branch: string - commit: string - arweave: ArweaveStatus -} - -export interface ArweaveStatus { - nodeURL: string - namespace: string - sender: string - signer: string - flushInterval: string - bundleDelay: string - bundleLimit: number - confirmations: number - lockTTL: string - healthy: boolean - lastFlush?: string - lastFlushSeconds?: number -} - -export interface Info { - wallets: { [key: string]: number } - configs: { [key: string]: number } - configTrees: number - migrations: { [key: string]: number } - signatures: number - digests: number - recorder: RecorderInfo - arweave: ArweaveInfo -} - -export interface RecorderInfo { - requests: number - buffer: number - lastFlush?: string - lastFlushSeconds?: number - endpoints: { [key: string]: number } -} - -export interface ArweaveInfo { - nodeURL: string - namespace: string - sender: ArweaveSenderInfo - signer: string - flushInterval: string - bundleDelay: string - bundleLimit: number - confirmations: number - lockTTL: string - healthy: boolean - lastFlush?: string - lastFlushSeconds?: number - bundles: number - pending: ArweavePendingInfo -} - -export interface ArweaveSenderInfo { - address: string - balance: string -} - -export interface ArweavePendingInfo { - wallets: number - configs: number - migrations: number - signatures: number - bundles: Array -} - -export interface ArweaveBundleInfo { - transaction: string - block: number - items: number - sentAt: string - confirmations: number -} - -export interface Context { - version: number - factory: string - mainModule: string - mainModuleUpgradable: string - guestModule: string - walletCreationCode: string -} - -export interface Signature { - digest: string - toImageHash?: string - chainID: string - type: SignatureType - signature: string - validOnChain?: string - validOnBlock?: string - validOnBlockHash?: string -} - -export interface SignerSignature { - signer?: string - signature: string - referenceChainID?: string -} - -export interface ConfigUpdate { - toImageHash: string - signature: string -} - -export interface Transaction { - to: string - value?: string - data?: string - gasLimit?: string - delegateCall?: boolean - revertOnError?: boolean -} - -export interface TransactionBundle { - executor: string - transactions: Array - nonce: string - signature: string -} - -export interface Sessions { - ping(headers?: object, signal?: AbortSignal): Promise - config(args: ConfigArgs, headers?: object, signal?: AbortSignal): Promise - wallets(args: WalletsArgs, headers?: object, signal?: AbortSignal): Promise - deployHash(args: DeployHashArgs, headers?: object, signal?: AbortSignal): Promise - configUpdates(args: ConfigUpdatesArgs, headers?: object, signal?: AbortSignal): Promise - migrations(args: MigrationsArgs, headers?: object, signal?: AbortSignal): Promise - saveConfig(args: SaveConfigArgs, headers?: object, signal?: AbortSignal): Promise - saveWallet(args: SaveWalletArgs, headers?: object, signal?: AbortSignal): Promise - saveSignature(args: SaveSignatureArgs, headers?: object, signal?: AbortSignal): Promise - saveSignerSignatures( - args: SaveSignerSignaturesArgs, - headers?: object, - signal?: AbortSignal, - ): Promise - saveSignerSignatures2( - args: SaveSignerSignatures2Args, - headers?: object, - signal?: AbortSignal, - ): Promise - saveMigration(args: SaveMigrationArgs, headers?: object, signal?: AbortSignal): Promise -} - -export interface PingArgs {} - -export interface PingReturn {} -export interface ConfigArgs { - imageHash: string -} - -export interface ConfigReturn { - version: number - config: any -} -export interface WalletsArgs { - signer: string - cursor?: number - limit?: number -} - -export interface WalletsReturn { - wallets: { [key: string]: Signature } - cursor: number -} -export interface DeployHashArgs { - wallet: string -} - -export interface DeployHashReturn { - deployHash: string - context: Context -} -export interface ConfigUpdatesArgs { - wallet: string - fromImageHash: string - allUpdates?: boolean -} - -export interface ConfigUpdatesReturn { - updates: Array -} -export interface MigrationsArgs { - wallet: string - fromVersion: number - fromImageHash: string - chainID?: string -} - -export interface MigrationsReturn { - migrations: { - [key: string]: { [key: number]: { [key: string]: TransactionBundle } } - } -} -export interface SaveConfigArgs { - version: number - config: any -} - -export interface SaveConfigReturn {} -export interface SaveWalletArgs { - version: number - deployConfig: any -} - -export interface SaveWalletReturn {} -export interface SaveSignatureArgs { - wallet: string - digest: string - chainID: string - signature: string - toConfig?: any -} - -export interface SaveSignatureReturn {} -export interface SaveSignerSignaturesArgs { - wallet: string - digest: string - chainID: string - signatures: Array - toConfig?: any -} - -export interface SaveSignerSignaturesReturn {} -export interface SaveSignerSignatures2Args { - wallet: string - digest: string - chainID: string - signatures: Array - toConfig?: any -} - -export interface SaveSignerSignatures2Return {} -export interface SaveMigrationArgs { - wallet: string - fromVersion: number - toVersion: number - toConfig: any - executor: string - transactions: Array - nonce: string - signature: string - chainID?: string -} - -export interface SaveMigrationReturn {} - -// -// Client -// -export class Sessions implements Sessions { - protected hostname: string - protected fetch: Fetch - protected path = '/rpc/Sessions/' - - constructor(hostname: string, fetch: Fetch) { - this.hostname = hostname.replace(/\/*$/, '') - this.fetch = (input: RequestInfo, init?: RequestInit) => fetch(input, init) - } - - private url(name: string): string { - return this.hostname + this.path + name - } - - ping = (headers?: object, signal?: AbortSignal): Promise => { - return this.fetch(this.url('Ping'), createHTTPRequest({}, headers, signal)).then( - (res) => { - return buildResponse(res).then((_data) => { - return {} - }) - }, - (error) => { - throw WebrpcRequestFailedError.new({ - cause: `fetch(): ${error.message || ''}`, - }) - }, - ) - } - - config = (args: ConfigArgs, headers?: object, signal?: AbortSignal): Promise => { - return this.fetch(this.url('Config'), createHTTPRequest(args, headers, signal)).then( - (res) => { - return buildResponse(res).then((_data) => { - return { - version: _data.version, - config: _data.config, - } - }) - }, - (error) => { - throw WebrpcRequestFailedError.new({ - cause: `fetch(): ${error.message || ''}`, - }) - }, - ) - } - - wallets = (args: WalletsArgs, headers?: object, signal?: AbortSignal): Promise => { - return this.fetch(this.url('Wallets'), createHTTPRequest(args, headers, signal)).then( - (res) => { - return buildResponse(res).then((_data) => { - return { - wallets: <{ [key: string]: Signature }>_data.wallets, - cursor: _data.cursor, - } - }) - }, - (error) => { - throw WebrpcRequestFailedError.new({ - cause: `fetch(): ${error.message || ''}`, - }) - }, - ) - } - - deployHash = (args: DeployHashArgs, headers?: object, signal?: AbortSignal): Promise => { - return this.fetch(this.url('DeployHash'), createHTTPRequest(args, headers, signal)).then( - (res) => { - return buildResponse(res).then((_data) => { - return { - deployHash: _data.deployHash, - context: _data.context, - } - }) - }, - (error) => { - throw WebrpcRequestFailedError.new({ - cause: `fetch(): ${error.message || ''}`, - }) - }, - ) - } - - configUpdates = (args: ConfigUpdatesArgs, headers?: object, signal?: AbortSignal): Promise => { - return this.fetch(this.url('ConfigUpdates'), createHTTPRequest(args, headers, signal)).then( - (res) => { - return buildResponse(res).then((_data) => { - return { - updates: >_data.updates, - } - }) - }, - (error) => { - throw WebrpcRequestFailedError.new({ - cause: `fetch(): ${error.message || ''}`, - }) - }, - ) - } - - migrations = (args: MigrationsArgs, headers?: object, signal?: AbortSignal): Promise => { - return this.fetch(this.url('Migrations'), createHTTPRequest(args, headers, signal)).then( - (res) => { - return buildResponse(res).then((_data) => { - return { - migrations: < - { - [key: string]: { - [key: number]: { [key: string]: TransactionBundle } - } - } - >_data.migrations, - } - }) - }, - (error) => { - throw WebrpcRequestFailedError.new({ - cause: `fetch(): ${error.message || ''}`, - }) - }, - ) - } - - saveConfig = (args: SaveConfigArgs, headers?: object, signal?: AbortSignal): Promise => { - return this.fetch(this.url('SaveConfig'), createHTTPRequest(args, headers, signal)).then( - (res) => { - return buildResponse(res).then((_data) => { - return {} - }) - }, - (error) => { - throw WebrpcRequestFailedError.new({ - cause: `fetch(): ${error.message || ''}`, - }) - }, - ) - } - - saveWallet = (args: SaveWalletArgs, headers?: object, signal?: AbortSignal): Promise => { - return this.fetch(this.url('SaveWallet'), createHTTPRequest(args, headers, signal)).then( - (res) => { - return buildResponse(res).then((_data) => { - return {} - }) - }, - (error) => { - throw WebrpcRequestFailedError.new({ - cause: `fetch(): ${error.message || ''}`, - }) - }, - ) - } - - saveSignature = (args: SaveSignatureArgs, headers?: object, signal?: AbortSignal): Promise => { - return this.fetch(this.url('SaveSignature'), createHTTPRequest(args, headers, signal)).then( - (res) => { - return buildResponse(res).then((_data) => { - return {} - }) - }, - (error) => { - throw WebrpcRequestFailedError.new({ - cause: `fetch(): ${error.message || ''}`, - }) - }, - ) - } - - saveSignerSignatures = ( - args: SaveSignerSignaturesArgs, - headers?: object, - signal?: AbortSignal, - ): Promise => { - return this.fetch(this.url('SaveSignerSignatures'), createHTTPRequest(args, headers, signal)).then( - (res) => { - return buildResponse(res).then((_data) => { - return {} - }) - }, - (error) => { - throw WebrpcRequestFailedError.new({ - cause: `fetch(): ${error.message || ''}`, - }) - }, - ) - } - - saveSignerSignatures2 = ( - args: SaveSignerSignatures2Args, - headers?: object, - signal?: AbortSignal, - ): Promise => { - return this.fetch(this.url('SaveSignerSignatures2'), createHTTPRequest(args, headers, signal)).then( - (res) => { - return buildResponse(res).then((_data) => { - return {} - }) - }, - (error) => { - throw WebrpcRequestFailedError.new({ - cause: `fetch(): ${error.message || ''}`, - }) - }, - ) - } - - saveMigration = (args: SaveMigrationArgs, headers?: object, signal?: AbortSignal): Promise => { - return this.fetch(this.url('SaveMigration'), createHTTPRequest(args, headers, signal)).then( - (res) => { - return buildResponse(res).then((_data) => { - return {} - }) - }, - (error) => { - throw WebrpcRequestFailedError.new({ - cause: `fetch(): ${error.message || ''}`, - }) - }, - ) - } -} - -const createHTTPRequest = (body: object = {}, headers: object = {}, signal: AbortSignal | null = null): object => { - return { - method: 'POST', - headers: { ...headers, 'Content-Type': 'application/json' }, - body: JSON.stringify(body || {}), - signal, - } -} - -const buildResponse = (res: Response): Promise => { - return res.text().then((text) => { - let data - try { - data = JSON.parse(text) - } catch (error) { - let message = '' - if (error instanceof Error) { - message = error.message - } - throw WebrpcBadResponseError.new({ - status: res.status, - cause: `JSON.parse(): ${message}: response text: ${text}`, - }) - } - if (!res.ok) { - const code: number = typeof data.code === 'number' ? data.code : 0 - throw (webrpcErrorByCode[code] || WebrpcError).new(data) - } - return data - }) -} - -// -// Errors -// - -export class WebrpcError extends Error { - name: string - code: number - message: string - status: number - cause?: string - - /** @deprecated Use message instead of msg. Deprecated in webrpc v0.11.0. */ - msg: string - - constructor(name: string, code: number, message: string, status: number, cause?: string) { - super(message) - this.name = name || 'WebrpcError' - this.code = typeof code === 'number' ? code : 0 - this.message = message || `endpoint error ${this.code}` - this.msg = this.message - this.status = typeof status === 'number' ? status : 0 - this.cause = cause - Object.setPrototypeOf(this, WebrpcError.prototype) - } - - static new(payload: any): WebrpcError { - return new this(payload.error, payload.code, payload.message || payload.msg, payload.status, payload.cause) - } -} - -// Webrpc errors - -export class WebrpcEndpointError extends WebrpcError { - constructor( - name: string = 'WebrpcEndpoint', - code: number = 0, - message: string = 'endpoint error', - status: number = 0, - cause?: string, - ) { - super(name, code, message, status, cause) - Object.setPrototypeOf(this, WebrpcEndpointError.prototype) - } -} - -export class WebrpcRequestFailedError extends WebrpcError { - constructor( - name: string = 'WebrpcRequestFailed', - code: number = -1, - message: string = 'request failed', - status: number = 0, - cause?: string, - ) { - super(name, code, message, status, cause) - Object.setPrototypeOf(this, WebrpcRequestFailedError.prototype) - } -} - -export class WebrpcBadRouteError extends WebrpcError { - constructor( - name: string = 'WebrpcBadRoute', - code: number = -2, - message: string = 'bad route', - status: number = 0, - cause?: string, - ) { - super(name, code, message, status, cause) - Object.setPrototypeOf(this, WebrpcBadRouteError.prototype) - } -} - -export class WebrpcBadMethodError extends WebrpcError { - constructor( - name: string = 'WebrpcBadMethod', - code: number = -3, - message: string = 'bad method', - status: number = 0, - cause?: string, - ) { - super(name, code, message, status, cause) - Object.setPrototypeOf(this, WebrpcBadMethodError.prototype) - } -} - -export class WebrpcBadRequestError extends WebrpcError { - constructor( - name: string = 'WebrpcBadRequest', - code: number = -4, - message: string = 'bad request', - status: number = 0, - cause?: string, - ) { - super(name, code, message, status, cause) - Object.setPrototypeOf(this, WebrpcBadRequestError.prototype) - } -} - -export class WebrpcBadResponseError extends WebrpcError { - constructor( - name: string = 'WebrpcBadResponse', - code: number = -5, - message: string = 'bad response', - status: number = 0, - cause?: string, - ) { - super(name, code, message, status, cause) - Object.setPrototypeOf(this, WebrpcBadResponseError.prototype) - } -} - -export class WebrpcServerPanicError extends WebrpcError { - constructor( - name: string = 'WebrpcServerPanic', - code: number = -6, - message: string = 'server panic', - status: number = 0, - cause?: string, - ) { - super(name, code, message, status, cause) - Object.setPrototypeOf(this, WebrpcServerPanicError.prototype) - } -} - -export class WebrpcInternalErrorError extends WebrpcError { - constructor( - name: string = 'WebrpcInternalError', - code: number = -7, - message: string = 'internal error', - status: number = 0, - cause?: string, - ) { - super(name, code, message, status, cause) - Object.setPrototypeOf(this, WebrpcInternalErrorError.prototype) - } -} - -export class WebrpcClientDisconnectedError extends WebrpcError { - constructor( - name: string = 'WebrpcClientDisconnected', - code: number = -8, - message: string = 'client disconnected', - status: number = 0, - cause?: string, - ) { - super(name, code, message, status, cause) - Object.setPrototypeOf(this, WebrpcClientDisconnectedError.prototype) - } -} - -export class WebrpcStreamLostError extends WebrpcError { - constructor( - name: string = 'WebrpcStreamLost', - code: number = -9, - message: string = 'stream lost', - status: number = 0, - cause?: string, - ) { - super(name, code, message, status, cause) - Object.setPrototypeOf(this, WebrpcStreamLostError.prototype) - } -} - -export class WebrpcStreamFinishedError extends WebrpcError { - constructor( - name: string = 'WebrpcStreamFinished', - code: number = -10, - message: string = 'stream finished', - status: number = 0, - cause?: string, - ) { - super(name, code, message, status, cause) - Object.setPrototypeOf(this, WebrpcStreamFinishedError.prototype) - } -} - -// Schema errors - -export class InvalidArgumentError extends WebrpcError { - constructor( - name: string = 'InvalidArgument', - code: number = 1, - message: string = 'invalid argument', - status: number = 0, - cause?: string, - ) { - super(name, code, message, status, cause) - Object.setPrototypeOf(this, InvalidArgumentError.prototype) - } -} - -export class NotFoundError extends WebrpcError { - constructor( - name: string = 'NotFound', - code: number = 2, - message: string = 'not found', - status: number = 0, - cause?: string, - ) { - super(name, code, message, status, cause) - Object.setPrototypeOf(this, NotFoundError.prototype) - } -} - -export enum errors { - WebrpcEndpoint = 'WebrpcEndpoint', - WebrpcRequestFailed = 'WebrpcRequestFailed', - WebrpcBadRoute = 'WebrpcBadRoute', - WebrpcBadMethod = 'WebrpcBadMethod', - WebrpcBadRequest = 'WebrpcBadRequest', - WebrpcBadResponse = 'WebrpcBadResponse', - WebrpcServerPanic = 'WebrpcServerPanic', - WebrpcInternalError = 'WebrpcInternalError', - WebrpcClientDisconnected = 'WebrpcClientDisconnected', - WebrpcStreamLost = 'WebrpcStreamLost', - WebrpcStreamFinished = 'WebrpcStreamFinished', - InvalidArgument = 'InvalidArgument', - NotFound = 'NotFound', -} - -const webrpcErrorByCode: { [code: number]: any } = { - [0]: WebrpcEndpointError, - [-1]: WebrpcRequestFailedError, - [-2]: WebrpcBadRouteError, - [-3]: WebrpcBadMethodError, - [-4]: WebrpcBadRequestError, - [-5]: WebrpcBadResponseError, - [-6]: WebrpcServerPanicError, - [-7]: WebrpcInternalErrorError, - [-8]: WebrpcClientDisconnectedError, - [-9]: WebrpcStreamLostError, - [-10]: WebrpcStreamFinishedError, - [1]: InvalidArgumentError, - [2]: NotFoundError, -} - -export type Fetch = (input: RequestInfo, init?: RequestInit) => Promise diff --git a/packages/core/src/state/sessions.ts b/packages/core/src/state/sessions.ts deleted file mode 100644 index f3c22900b..000000000 --- a/packages/core/src/state/sessions.ts +++ /dev/null @@ -1,120 +0,0 @@ -import { Configuration, Context, hash, hashConfiguration, Payload } from '@0xsequence/sequence-primitives' -import { Address, Bytes, Hex } from 'ox' -import { Signature, StateReader, StateWriter } from '.' -import * as service from './sessions.gen' - -export class Sessions implements StateReader, StateWriter { - private sessions: service.Sessions - - constructor(readonly host = 'https://sessions.sequence.app') { - this.sessions = new service.Sessions(host, fetch) - } - - async getConfiguration(imageHash: Hex.Hex): Promise { - const { version, config } = await this.sessions.config({ imageHash }) - - if (version !== 3) { - throw new Error(`v${version} configuration ${imageHash}, only v3 is supported`) - } - - return config - } - - async getDeployHash(wallet: Address.Address): Promise<{ hash: Hex.Hex; context: Context }> { - const { deployHash, context } = await this.sessions.deployHash({ wallet }) - - Hex.assert(deployHash) - - // TODO: Enforce context type - return { hash: deployHash, context: context as any } - } - - async getWallets( - signer: Address.Address, - ): Promise> { - const { wallets } = await this.sessions.wallets({ signer }) - - return Object.entries(wallets).map( - ([wallet, { chainID: chainId, digest, signature, type, validOnChain, validOnBlock }]) => { - Address.assert(wallet) - Hex.assert(digest) - Hex.assert(signature) - - switch (type) { - case service.SignatureType.EIP712: - return { wallet, chainId: BigInt(chainId), digest, signature: { type: 'eip-712', signature } } - - case service.SignatureType.EthSign: - return { wallet, chainId: BigInt(chainId), digest, signature: { type: 'eth_sign', signature } } - - case service.SignatureType.EIP1271: - return { - wallet, - chainId: BigInt(chainId), - digest, - signature: { - type: 'erc-1271', - signature, - validAt: { - chainId: validOnChain ? BigInt(validOnChain) : (undefined as any), - block: validOnBlock ? Number(validOnBlock) : (undefined as any), - }, - }, - } - } - }, - ) - } - - async getConfigurationPath( - wallet: Address.Address, - fromImageHash: Hex.Hex, - options?: { allUpdates?: boolean }, - ): Promise> { - const { updates } = await this.sessions.configUpdates({ wallet, fromImageHash, allUpdates: options?.allUpdates }) - - return updates.map(({ toImageHash: imageHash, signature }) => { - Hex.assert(imageHash) - Hex.assert(signature) - - return { imageHash, signature } - }) - } - - async saveWallet(deployConfiguration: Configuration): Promise { - await this.sessions.saveWallet({ version: 3, deployConfig: deployConfiguration }) - } - - async saveWitness( - signer: Address.Address, - wallet: Address.Address, - chainId: bigint, - payload: Payload, - signature: Signature, - ): Promise { - await this.sessions.saveSignerSignatures2({ - wallet, - chainID: `${chainId}`, - digest: Bytes.toHex(hash(wallet, chainId, payload)), - signatures: [ - { - signer, - signature: signature.signature, - referenceChainID: signature.type === 'erc-1271' ? `${signature.validAt.chainId}` : undefined, - }, - ], - }) - } - - async setConfiguration(wallet: Address.Address, configuration: Configuration, signature: Hex.Hex): Promise { - await this.sessions.saveSignature({ - wallet, - chainID: '0', - digest: Bytes.toHex( - hash(wallet, 0n, { type: 'config-update', imageHash: Bytes.toHex(hashConfiguration(configuration)) }), - ), - signature, - toConfig: configuration, - }) - } -} diff --git a/packages/core/src/wallet.ts b/packages/core/src/wallet.ts index 2b0dd7328..c299f8405 100644 --- a/packages/core/src/wallet.ts +++ b/packages/core/src/wallet.ts @@ -1,293 +1,321 @@ import { Configuration, Context, - decodeSignature, DevContext1, - encodeSignature, - erc6492, + encodeSapient, erc6492Deploy, - fillLeaves, fromConfigUpdate, getCounterfactualAddress, - getSigners, - getWeight, + hash, hashConfiguration, IMAGE_HASH, - isSignerLeaf, - Payload, + IS_VALID_SAPIENT_SIGNATURE, + IS_VALID_SAPIENT_SIGNATURE_COMPACT, + IS_VALID_SIGNATURE, + normalizeSignerSignature, + ParentedPayload, RawSignature, + sign, + SignatureOfSapientSignerLeaf, + SignatureOfSignerLeaf, + SignerErrorCallback, + SignerSignature, } from '@0xsequence/sequence-primitives' -import { AbiFunction, Address, Bytes, Hex, Provider, Signature as oxSignature } from 'ox' -import { CancelCallback, Signature, Signer, SignerSignatureCallback } from './signer' -import { StateReader, StateWriter } from './state' -import { MemoryStore } from './state/memory' +import { AbiFunction, Address, Bytes, Hex, PersonalMessage, Provider, Secp256k1, Signature } from 'ox' +import { MemoryStateProvider, StateProvider } from '.' export type WalletOptions = { context: Context - stateProvider: StateReader & StateWriter + stateProvider: StateProvider + onSignerError?: SignerErrorCallback } export const DefaultWalletOptions: WalletOptions = { context: DevContext1, - stateProvider: new MemoryStore(), + stateProvider: new MemoryStateProvider(), } export class Wallet { - private readonly signers = new Map() - private readonly stateProvider: StateReader & StateWriter + private readonly signers = new Map() + private readonly options: WalletOptions & { stateProvider: StateProvider } constructor( readonly address: Address.Address, - readonly options: Partial = {}, + options?: Partial, ) { - const mergedOptions = { ...DefaultWalletOptions, ...options } - this.stateProvider = mergedOptions.stateProvider! + this.options = { ...DefaultWalletOptions, ...options } } - static async fromConfiguration(configuration: Configuration, options: Partial = {}): Promise { - const mergedOptions = { ...DefaultWalletOptions, ...options } - - await mergedOptions.stateProvider.saveWallet(configuration, mergedOptions.context) - return new Wallet(getCounterfactualAddress(configuration, mergedOptions.context), mergedOptions) + static async fromConfiguration(configuration: Configuration, options?: Partial): Promise { + const merged = { ...DefaultWalletOptions, ...options } + await merged.stateProvider.saveWallet(configuration, merged.context) + return new Wallet(getCounterfactualAddress(configuration, merged.context), merged) } - async setSigner(signer: Signer) { - this.signers.set(await signer.address, signer) + async setSigner(signer: Signer, isTrusted = false) { + this.signers.set(await signer.address, { signer, isTrusted }) } async isDeployed(provider: Provider.Provider): Promise { - const code = await provider.request({ method: 'eth_getCode', params: [this.address, 'latest'] }) - return code !== '0x' + return (await provider.request({ method: 'eth_getCode', params: [this.address, 'pending'] })) !== '0x' } - async deploy(provider: Provider.Provider): Promise { - console.log('called deploy') - if (await this.isDeployed(provider)) { - throw new Error('Wallet is already deployed') + async deploy(provider: Provider.Provider) { + if (!(await this.isDeployed(provider))) { + return provider.request({ method: 'eth_sendTransaction', params: [await this.getDeployTransaction()] }) } - - const { hash: imageHash, context } = await this.stateProvider.getDeployHash(this.address) - const deployData = erc6492Deploy(imageHash, context) - - await provider.request({ - method: 'eth_sendTransaction', - params: [ - { - to: deployData.to, - data: deployData.data, - gas: '0x27100', - }, - ], - }) } - async setConfiguration(configuration: Configuration, options?: { force: boolean }) { - if (!options?.force) { - } + async getDeployTransaction(): Promise<{ to: Address.Address; data: Hex.Hex }> { + const { deployHash, context } = await this.options.stateProvider.getDeployHash(this.address) + return erc6492Deploy(deployHash, context) + } - const imageHash = Bytes.toHex(hashConfiguration(configuration)) - const signature = Bytes.toHex(await this.sign(fromConfigUpdate(imageHash))) - return this.stateProvider.setConfiguration(this.address, configuration, signature) + async setConfiguration( + configuration: Configuration, + options?: { trustSigners?: boolean; onSignerError?: SignerErrorCallback }, + ) { + const imageHash = hashConfiguration(configuration) + const signature = await this.sign(fromConfigUpdate(Bytes.toHex(imageHash)), options) + await this.options.stateProvider.setConfiguration(this.address, configuration, signature) } async sign( - payload: Payload, - provider?: Provider.Provider, - options?: { trustSigners?: boolean; onSignerError?: (signer: Address.Address, error: any) => void }, - ): Promise { - const signatures: Array = [] + payload: ParentedPayload, + options?: { provider?: Provider.Provider; trustSigners?: boolean; onSignerError?: SignerErrorCallback }, + ): Promise { + const provider = options?.provider + + let updates: Unpromise> = [] let chainId: bigint let isDeployed: boolean + let deployHash: { deployHash: Hex.Hex; context: Context } | undefined let imageHash: Hex.Hex - let deployContext: Context - if (provider) { - const responses = await Promise.all([provider.request({ method: 'eth_chainId' }), this.isDeployed(provider)]) + const requests = await Promise.all([provider.request({ method: 'eth_chainId' }), this.isDeployed(provider)]) + chainId = BigInt(requests[0]) + isDeployed = requests[1] - chainId = BigInt(responses[0]) - isDeployed = responses[1] - - if (!isDeployed) { - const { hash, context } = await this.stateProvider.getDeployHash(this.address) - imageHash = hash - deployContext = context - } else { - imageHash = await provider.request({ + let fromImageHash: Hex.Hex + if (isDeployed) { + fromImageHash = await provider.request({ method: 'eth_call', - params: [{ data: AbiFunction.encodeData(IMAGE_HASH) }], + params: [{ to: this.address, data: AbiFunction.encodeData(IMAGE_HASH) }], }) + } else { + deployHash = await this.options.stateProvider.getDeployHash(this.address) + fromImageHash = deployHash.deployHash } - const path = await this.stateProvider.getConfigurationPath(this.address, imageHash) + updates = await this.options.stateProvider.getConfigurationUpdates(this.address, fromImageHash) - signatures.push( - ...path.map(({ signature }) => { - const decoded = decodeSignature(Hex.toBytes(signature)) - if (decoded.checkpointerData) { - throw new Error('chained subsignature has checkpointer data') - } - return { ...decoded, checkpointerData: undefined } - }), - ) + imageHash = updates[updates.length - 1]?.imageHash ?? fromImageHash } else { chainId = 0n isDeployed = true - const { hash, context } = await this.stateProvider.getDeployHash(this.address) - imageHash = hash - deployContext = context - - const path = await this.stateProvider.getConfigurationPath(this.address, imageHash) - if (path.length) { - imageHash = path[path.length - 1]!.imageHash - } - } + const { deployHash } = await this.options.stateProvider.getDeployHash(this.address) - const configuration = await this.stateProvider.getConfiguration(imageHash) - - const signers = new Map< - Address.Address, - { signer: Signer; signature?: Signature; onSignerSignature?: SignerSignatureCallback; onCancel?: CancelCallback } - >( - getSigners(configuration).signers.flatMap((address) => { - const signer = this.signers.get(address) - return signer ? [[address, { signer }]] : [] - }), - ) + const updates = await this.options.stateProvider.getConfigurationUpdates(this.address, deployHash) - if (getWeight(configuration, (signer) => signers.has(signer.address)).maxWeight < configuration.threshold) { - throw new Error('insufficient max weight') + imageHash = updates[updates.length - 1]?.imageHash ?? deployHash } - const signerSignatures = await new Promise>((resolve, reject) => { - const onError = (address: Hex.Hex) => (error: any) => { - signers.delete(address) - - options?.onSignerError?.(address, error) - - if (getWeight(configuration, (signer) => signers.has(signer.address)).maxWeight < configuration.threshold) { - const onCancels = Array.from(signers.values()).flatMap(({ onCancel }) => (onCancel ? [onCancel] : [])) - signers.clear() - onCancels.forEach((onCancel) => onCancel(false)) - reject(new Error('insufficient max weight')) - } - } - - const onSignerSignature = (address: Hex.Hex) => (signature: Signature) => { - if (!options?.trustSigners) { - } - - const signer = signers.get(address)! - signer.signature = signature - delete signer.onSignerSignature - delete signer.onCancel - - const signerSignatures = new Map( - Array.from(signers.entries()).flatMap(([address, { signature }]) => - signature ? [[address, signature]] : [], - ), - ) - - if ( - getWeight(configuration, (signer) => signers.get(signer.address)?.signature !== undefined).weight < - configuration.threshold - ) { - Array.from(signers.values()).forEach(({ onSignerSignature }) => - onSignerSignature?.(configuration, signerSignatures, !options?.trustSigners), - ) - } else { - const onCancels = Array.from(signers.values()).flatMap(({ onCancel }) => (onCancel ? [onCancel] : [])) - signers.clear() - onCancels.forEach((onCancel) => onCancel(true)) - resolve(signerSignatures) - } - } + const configuration = await this.options.stateProvider.getConfiguration(imageHash) - for (const [address, signer] of signers.entries()) { - try { - const result = signer.signer.sign(payload) - - if ('type' in result) { - Promise.resolve(result).then(onSignerSignature(address)).catch(onError(address)) - } else if (result instanceof Promise) { - result.then(onSignerSignature(address)).catch(onError(address)) - } else { - result.signature.then(onSignerSignature(address)).catch(onError(address)) - signer.onSignerSignature = result.onSignerSignature - signer.onCancel = result.onCancel + const topology = await sign( + configuration.topology, + { + sign: (leaf) => { + const signer = this.signers.get(leaf.address) + if (!signer) { + throw new Error(`no signer ${leaf.address}`) } - } catch (error) { - Promise.resolve(error).then(onError(address)) - } - } - }) - - const signature = encodeSignature({ - noChainId: !chainId, - configuration: { - ...configuration, - topology: fillLeaves(configuration.topology, (leaf) => { - const signerSignature = signerSignatures.get(leaf.address) - if (!signerSignature) { - return + if (typeof signer.signer.sign !== 'function') { + throw new Error(`${leaf.address} does not implement Signer.sign()`) } - if (isSignerLeaf(leaf)) { - switch (signerSignature.type) { - case 'hash': { - const { r, s, yParity } = oxSignature.fromHex(signerSignature.signature) - return { - type: 'hash', - r: Bytes.fromNumber(r), - s: Bytes.fromNumber(s), - v: oxSignature.yParityToV(yParity), - } - } + const signature = normalizeSignerSignature(signer.signer.sign(this.address, chainId, payload)) - case 'eth_sign': { - const { r, s, yParity } = oxSignature.fromHex(signerSignature.signature) - return { - type: 'eth_sign', - r: Bytes.fromNumber(r), - s: Bytes.fromNumber(s), - v: oxSignature.yParityToV(yParity), - } + signature.signature = signature.signature.then((signature) => { + if (signature.type === 'erc1271') { + if (signature.address !== leaf.address) { + throw new Error( + `expected erc-1271 signature by ${leaf.address}, but received signature from ${signature.address}`, + ) + } + if (!provider) { + throw new Error(`erc-1271 signer ${leaf.address} cannot sign for a no-chain-id signature`) } + } - case 'erc-1271': { - return { type: 'erc1271', address: leaf.address, data: Hex.toBytes(signerSignature.signature) } + return signature + }) + + if (options?.trustSigners === false || !signer.isTrusted) { + signature.signature = signature.signature.then(async (signature) => { + const digest = hash(this.address, chainId, payload) + + switch (signature.type) { + case 'eth_sign': + case 'hash': + if ( + !Secp256k1.verify({ + payload: signature.type === 'eth_sign' ? PersonalMessage.getSignPayload(digest) : digest, + address: this.address, + signature: { + r: Bytes.toBigInt(signature.r), + s: Bytes.toBigInt(signature.s), + yParity: Signature.vToYParity(signature.v), + }, + }) + ) { + throw new Error(`invalid signature for ${leaf.type} signer ${leaf.address}`) + } + break + + case 'erc1271': + if (!provider) { + throw new Error(`erc-1271 signatures are not valid for no-chain-id signatures`) + } + if ( + (await provider.request({ + method: 'eth_call', + params: [ + { + to: leaf.address, + data: AbiFunction.encodeData(IS_VALID_SIGNATURE, [ + Bytes.toHex(digest), + Bytes.toHex(signature.data), + ]), + }, + ], + })) !== AbiFunction.getSelector(IS_VALID_SIGNATURE) + ) { + throw new Error(`invalid signature for erc-1271 signer ${leaf.address}`) + } + break } - case 'sapient': - case 'sapient-compact': { - throw new Error(`signature is ${signerSignature.type}, but ${leaf.address} is not a sapient signer`) + return signature + }) + } + + return signature + }, + signSapient: provider + ? (leaf) => { + const signer = this.signers.get(leaf.address) + if (!signer) { + throw new Error(`no signer ${leaf.address}`) } - } - } else { - switch (signerSignature.type) { - case 'hash': - case 'eth_sign': - case 'erc-1271': { - throw new Error( - `expected ${leaf.address} to be a sapient signer, but signature is ${signerSignature.type}`, - ) + if (typeof signer.signer.signSapient !== 'function') { + throw new Error(`${leaf.address} does not implement Signer.signSapient()`) } - case 'sapient': { - return { type: 'sapient', address: leaf.address, data: Hex.toBytes(signerSignature.signature) } - } + const signature = normalizeSignerSignature( + signer.signer.signSapient(this.address, chainId, payload, Bytes.toHex(leaf.imageHash)), + ) + + signature.signature = signature.signature.then((signature) => { + if (signature.address !== leaf.address) { + throw new Error( + `expected sapient signature by ${leaf.address}, but received signature from ${signature.address}`, + ) + } - case 'sapient-compact': { - return { type: 'sapient_compact', address: leaf.address, data: Hex.toBytes(signerSignature.signature) } + return signature + }) + + if (options?.trustSigners === false || !signer.isTrusted) { + signature.signature = signature.signature.then(async (signature) => { + const digest = hash(this.address, chainId, payload) + + switch (signature.type) { + case 'sapient': { + const imageHash = await provider.request({ + method: 'eth_call', + params: [ + { + to: leaf.address, + data: AbiFunction.encodeData(IS_VALID_SAPIENT_SIGNATURE, [ + encodeSapient(chainId, payload), + Bytes.toHex(signature.data), + ]), + }, + ], + }) + if (imageHash !== Bytes.toHex(leaf.imageHash)) { + throw new Error( + `invalid sapient signature for ${leaf.type} signer ${leaf.address}: expected ${leaf.imageHash}, derived ${imageHash}`, + ) + } + break + } + + case 'sapient_compact': { + const imageHash = await provider.request({ + method: 'eth_call', + params: [ + { + to: leaf.address, + data: AbiFunction.encodeData(IS_VALID_SAPIENT_SIGNATURE_COMPACT, [ + Bytes.toHex(digest), + Bytes.toHex(signature.data), + ]), + }, + ], + }) + if (imageHash !== Bytes.toHex(leaf.imageHash)) { + throw new Error( + `invalid sapient signature for ${leaf.type} signer ${leaf.address}: expected ${leaf.imageHash}, derived ${imageHash}`, + ) + } + break + } + } + + return signature + }) } + + return signature } - } - }), + : undefined, + }, + { + threshold: configuration.threshold, + onSignerError: (leaf, error) => { + options?.onSignerError?.(leaf, error) + this.options.onSignerError?.(leaf, error) + }, }, - suffix: signatures.reverse(), - }) + ) + + const erc6492 = deployHash && erc6492Deploy(deployHash.deployHash, deployHash.context) - return isDeployed ? signature : erc6492(signature, erc6492Deploy(imageHash, deployContext!)) + return { + noChainId: !chainId, + configuration: { ...configuration, topology }, + suffix: updates.reverse().map(({ signature }) => signature), + erc6492: erc6492 && { ...erc6492, data: Hex.toBytes(erc6492.data) }, + } } } + +export interface Signer { + readonly address: MaybePromise + + sign?: (wallet: Address.Address, chainId: bigint, payload: ParentedPayload) => SignerSignature + + signSapient?: ( + wallet: Address.Address, + chainId: bigint, + payload: ParentedPayload, + imageHash: Hex.Hex, + ) => SignerSignature +} + +type MaybePromise = T | Promise +type Unpromise = T extends Promise ? S : T diff --git a/packages/primitives/src/config.ts b/packages/primitives/src/config.ts index 3b3c8046c..91e6e9460 100644 --- a/packages/primitives/src/config.ts +++ b/packages/primitives/src/config.ts @@ -333,29 +333,69 @@ function decodeTopology(obj: any): Topology { export function sign( topology: RawTopology, - signLeaf: ( - signer: T, - ) => SignerSignature, - options?: { - threshold?: bigint - isValid?: ( - signer: T, - signature: T extends SignerLeaf ? SignatureOfSignerLeaf : SignatureOfSapientSignerLeaf, - ) => boolean | Promise - onError?: (signer: SignerLeaf | SapientSignerLeaf, error: any) => void - _signatures?: Map> + signers: { + sign?: (signer: SignerLeaf) => SignerSignature + signSapient?: (signer: SapientSignerLeaf) => SignerSignature + }, + options?: { threshold?: bigint; onSignerError?: SignerErrorCallback }, + internal?: { + signatures?: Map> + cancelled?: Set }, ): Promise { + const copy = (topology: T): T => { + if (isSignerLeaf(topology)) { + return { ...topology } + } else if (isSapientSignerLeaf(topology)) { + return { ...topology } + } else if (isSubdigestLeaf(topology)) { + return topology + } else if (isNodeLeaf(topology)) { + return topology + } else if (isRawSignerLeaf(topology)) { + return topology + } else if (isRawNestedLeaf(topology)) { + return { ...topology, tree: copy(topology.tree) } + } else { + return [copy(topology[0]), copy(topology[1])] as T + } + } + topology = copy(topology) + return new Promise((resolve, reject) => { - const signatures = - options?._signatures ?? new Map>() + const signatures: Map< + Hex.Hex, + Promise + > = internal?.signatures ?? new Map() + const cancelled: Set = internal?.cancelled ?? new Set() const signerSignatureCallbacks: SignerSignatureCallback[] = [] const cancelCallbacks: CancelCallback[] = [] let done = false const check = () => { - const { weight, maxWeight } = getWeight(topology) + if (done) { + return + } + + const { weight, maxWeight } = getWeight(topology, (leaf) => { + if (isSignerLeaf(leaf)) { + if (signers.sign === undefined) { + return false + } + } else { + if (signers.signSapient === undefined) { + return false + } + } + + if (cancelled.has(Bytes.toHex(hashConfiguration(leaf)))) { + return false + } + + return true + }) + if (options?.threshold !== undefined) { if (weight >= options.threshold) { cancelCallbacks.forEach((callback) => callback(true)) @@ -368,10 +408,9 @@ export function sign( cancelCallbacks.length = 0 signerSignatureCallbacks.length = 0 done = true - reject(new Error(`max weight ${maxWeight} < threshold ${options.threshold}`)) + reject(new Error(`unable to meet threshold ${options.threshold}`)) } - } - if (weight === maxWeight) { + } else if (weight === maxWeight) { cancelCallbacks.forEach((callback) => callback(true)) cancelCallbacks.length = 0 signerSignatureCallbacks.length = 0 @@ -380,117 +419,83 @@ export function sign( } } - check() - if (done) { - return - } - const onSignerSignature = - (signer: T) => - (signature: T extends SignerLeaf ? SignatureOfSignerLeaf : SignatureOfSapientSignerLeaf) => { - if (!done) { - signer.signed = true - signer.signature = signature - - check() - - if (!done) { - signerSignatureCallbacks.forEach((callback) => callback(topology, options?.isValid !== undefined)) - } + (signer: SignerLeaf | SapientSignerLeaf) => (signature: SignatureOfSignerLeaf | SignatureOfSapientSignerLeaf) => { + if (done) { + return } - } - const onError = (signer: SignerLeaf | SapientSignerLeaf) => (error: any) => { - if (!done) { - options?.onError?.(signer, error) + signer.signed = true + signer.signature = signature + + signerSignatureCallbacks.forEach((callback) => callback(topology)) check() } - } - const search = (topology: RawTopology) => { - if (isSignedSignerLeaf(topology)) { + const onSignerError = (signer: SignerLeaf | SapientSignerLeaf) => (error: any) => { + if (done) { return - } else if (isSignerLeaf(topology)) { + } + + options?.onSignerError?.(signer, error) + + cancelled.add(Bytes.toHex(hashConfiguration(signer))) + + check() + } + + const search = async (topology: RawTopology) => { + if (isSignerLeaf(topology)) { const imageHash = Bytes.toHex(hashConfiguration(topology)) - if (!signatures.has(imageHash)) { - let signature = signLeaf(topology) - if (!('signature' in signature)) { - if (signature instanceof Promise) { - signature = { signature } - } else { - signature = { signature: Promise.resolve(signature) } + const signature = + signatures.get(imageHash) ?? + (() => { + const signature = signers.sign?.(topology) + if (!signature) { + return Promise.reject(new Error(`no signer for ${topology.address}`)) } - } + const normalized = normalizeSignerSignature(signature) - if (signature.onSignerSignature) { - signerSignatureCallbacks.push(signature.onSignerSignature) - } - if (signature.onCancel) { - cancelCallbacks.push(signature.onCancel) - } + signatures.set(imageHash, normalized.signature) - const isValid = options?.isValid - signature.signature = signature.signature.then(async (signature) => { - if (signature.type === 'erc1271' && signature.address !== topology.address) { - throw new Error( - `incorrect erc-1271 signature address ${signature.address} for ${JSON.stringify(topology)}`, - ) + if (normalized.onSignerSignature) { + signerSignatureCallbacks.push(normalized.onSignerSignature) } - if (isValid && !(await isValid(topology, signature))) { - throw new Error(`invalid signer signature for ${JSON.stringify(topology)}`) + if (normalized.onCancel) { + cancelCallbacks.push(normalized.onCancel) } - return signature - }) - signatures.set(imageHash, signature.signature) - signature.signature.catch(onError(topology)) - } + return normalized.signature + })() - const signature = signatures.get(imageHash) as Promise - signature.then(onSignerSignature(topology)).catch(() => {}) - } else if (isSignedSapientSignerLeaf(topology)) { - return + signature.then(onSignerSignature(topology)).catch(onSignerError(topology)) } else if (isSapientSignerLeaf(topology)) { const imageHash = Bytes.toHex(hashConfiguration(topology)) - if (!signatures.has(imageHash)) { - let signature = signLeaf(topology) - if (!('signature' in signature)) { - if (signature instanceof Promise) { - signature = { signature } - } else { - signature = { signature: Promise.resolve(signature) } + const signature = + signatures.get(imageHash) ?? + (() => { + const signature = signers.signSapient?.(topology) + if (!signature) { + return Promise.reject(new Error(`no sapient signer for ${topology.address}`)) } - } + const normalized = normalizeSignerSignature(signature) - if (signature.onSignerSignature) { - signerSignatureCallbacks.push(signature.onSignerSignature) - } - if (signature.onCancel) { - cancelCallbacks.push(signature.onCancel) - } + signatures.set(imageHash, normalized.signature) - const isValid = options?.isValid - signature.signature = signature.signature.then(async (signature) => { - if (signature.address !== topology.address) { - throw new Error( - `incorrect sapient signature address ${signature.address} for ${JSON.stringify(topology)}`, - ) + if (normalized.onSignerSignature) { + signerSignatureCallbacks.push(normalized.onSignerSignature) } - if (isValid && !(await isValid(topology, signature))) { - throw new Error(`invalid signer signature for ${JSON.stringify(topology)}`) + if (normalized.onCancel) { + cancelCallbacks.push(normalized.onCancel) } - return signature - }) - signatures.set(imageHash, signature.signature) - signature.signature.catch(onError(topology)) - } + return normalized.signature + })() - const signature = signatures.get(imageHash) as Promise - signature.then(onSignerSignature(topology)).catch(() => {}) + signature.then(onSignerSignature(topology)).catch(onSignerError(topology)) } else if (isSubdigestLeaf(topology)) { return } else if (isNodeLeaf(topology)) { @@ -499,23 +504,48 @@ export function sign( return } else if (isRawNestedLeaf(topology)) { try { - sign(topology.tree, signLeaf, { ...options, threshold: topology.threshold, _signatures: signatures }).catch( - () => {}, + topology.tree = await sign( + topology.tree, + signers, + { ...options, threshold: topology.threshold }, + { signatures: signatures, cancelled: cancelled }, ) } catch {} + check() } else { - topology.forEach(search) + search(topology[0]) + search(topology[1]) } } - search(topology) }) } -type SignerSignature = - | T - | Promise - | { signature: Promise; onSignerSignature?: SignerSignatureCallback; onCancel?: CancelCallback } +export type SignerSignature = [T] extends [Promise] + ? never + : MaybePromise | { signature: Promise; onSignerSignature?: SignerSignatureCallback; onCancel?: CancelCallback } + +export function normalizeSignerSignature(signature: SignerSignature): { + signature: Promise + onSignerSignature?: SignerSignatureCallback + onCancel?: CancelCallback +} { + if (signature instanceof Promise) { + return { signature } + } else if ( + typeof signature === 'object' && + signature && + 'signature' in signature && + signature.signature instanceof Promise + ) { + return signature as ReturnType + } else { + return { signature: Promise.resolve(signature) as Promise } + } +} + +export type SignerErrorCallback = (signer: SignerLeaf | SapientSignerLeaf, error: unknown) => void -type SignerSignatureCallback = (topology: RawTopology, validated: boolean) => void +type SignerSignatureCallback = (topology: RawTopology) => void type CancelCallback = (success: boolean) => void +type MaybePromise = T | Promise diff --git a/packages/primitives/src/payload.ts b/packages/primitives/src/payload.ts index 89c86388a..c3b24c91f 100644 --- a/packages/primitives/src/payload.ts +++ b/packages/primitives/src/payload.ts @@ -1,4 +1,5 @@ -import { Address, Bytes, Hash, Hex, TypedData } from 'ox' +import { AbiFunction, Address, Bytes, Hash, Hex, TypedData } from 'ox' +import { IS_VALID_SAPIENT_SIGNATURE } from './constants' import { minBytesFor } from './utils' export type Call = { @@ -221,6 +222,53 @@ export function encode(payload: CallPayload, self?: Address.Address): Bytes.Byte return out } +export function encodeSapient( + chainId: bigint, + payload: ParentedPayload, +): Exclude[0], undefined>[0] { + const encoded: ReturnType = { + kind: 0, + noChainId: !chainId, + calls: [], + space: 0n, + nonce: 0n, + message: '0x', + imageHash: '0x', + digest: '0x', + parentWallets: payload.parentWallets ?? [], + } + + switch (payload.type) { + case 'call': + encoded.kind = 0 + encoded.calls = payload.calls.map((call) => ({ + ...call, + data: Bytes.toHex(call.data), + behaviorOnError: BigInt(encodeBehaviorOnError(call.behaviorOnError)), + })) + encoded.space = payload.space + encoded.nonce = payload.nonce + break + + case 'message': + encoded.kind = 1 + encoded.message = Bytes.toHex(payload.message) + break + + case 'config-update': + encoded.kind = 2 + encoded.imageHash = payload.imageHash + break + + case 'digest': + encoded.kind = 3 + encoded.digest = payload.digest + break + } + + return encoded +} + export function hash(wallet: Address.Address, chainId: bigint, payload: ParentedPayload): Bytes.Bytes { const domain = { name: 'Sequence Wallet', version: '3', chainId, verifyingContract: wallet } From 8bf5d7e51bbcc3f5d0f9955004d69eebd7c8d6ff Mon Sep 17 00:00:00 2001 From: William Hua Date: Sat, 15 Feb 2025 09:38:28 -0500 Subject: [PATCH 121/439] core: trustSigners fix --- packages/core/src/wallet.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/core/src/wallet.ts b/packages/core/src/wallet.ts index c299f8405..019dcd99a 100644 --- a/packages/core/src/wallet.ts +++ b/packages/core/src/wallet.ts @@ -153,7 +153,7 @@ export class Wallet { return signature }) - if (options?.trustSigners === false || !signer.isTrusted) { + if (options?.trustSigners === false || (!options?.trustSigners && !signer.isTrusted)) { signature.signature = signature.signature.then(async (signature) => { const digest = hash(this.address, chainId, payload) @@ -228,7 +228,7 @@ export class Wallet { return signature }) - if (options?.trustSigners === false || !signer.isTrusted) { + if (options?.trustSigners === false || (!options?.trustSigners && !signer.isTrusted)) { signature.signature = signature.signature.then(async (signature) => { const digest = hash(this.address, chainId, payload) From cbaeab67b4a32c6fc18d05388a604d23595b55b8 Mon Sep 17 00:00:00 2001 From: Michael Standen Date: Mon, 17 Feb 2025 13:29:29 +1300 Subject: [PATCH 122/439] Session signatures combined --- .../primitives-cli/src/subcommands/server.ts | 55 ++-- .../primitives-cli/src/subcommands/session.ts | 72 +++++ .../src/subcommands/sessionExplicit.ts | 100 ++----- .../src/subcommands/sessionImplicit.ts | 81 ++---- packages/primitives/src/address.ts | 2 +- packages/primitives/src/attestation.ts | 30 +- packages/primitives/src/index.ts | 7 +- packages/primitives/src/permission.ts | 15 +- ...n-explicit-config.ts => session-config.ts} | 261 +++++++++++++----- .../src/session-explicit-signature.ts | 29 -- packages/primitives/src/session-implicit.ts | 83 ------ packages/primitives/src/session-signature.ts | 84 ++++++ packages/primitives/src/signature.ts | 2 +- .../src/{config.ts => wallet-config.ts} | 0 pnpm-lock.yaml | 4 + 15 files changed, 474 insertions(+), 351 deletions(-) rename packages/primitives/src/{session-explicit-config.ts => session-config.ts} (54%) delete mode 100644 packages/primitives/src/session-explicit-signature.ts delete mode 100644 packages/primitives/src/session-implicit.ts create mode 100644 packages/primitives/src/session-signature.ts rename packages/primitives/src/{config.ts => wallet-config.ts} (100%) diff --git a/packages/primitives-cli/src/subcommands/server.ts b/packages/primitives-cli/src/subcommands/server.ts index 73a68f8ca..5f4277fd9 100644 --- a/packages/primitives-cli/src/subcommands/server.ts +++ b/packages/primitives-cli/src/subcommands/server.ts @@ -4,6 +4,7 @@ import * as config from './config' import * as devTools from './devTools' import * as payload from './payload' import * as permission from './permission' +import * as session from './session' import * as sessionExplicit from './sessionExplicit' import * as sessionImplicit from './sessionImplicit' import * as signatureUtils from './signature' @@ -128,10 +129,23 @@ const rpcMethods: Record Promise> = { return result }, - // SESSION EXPLICIT - async session_explicit_empty(_params) { - return await sessionExplicit.doEmptySession() + // SESSION + async session_empty(params) { + const { globalSigner } = params + const result = await session.doEmptyTopology(globalSigner) + return result + }, + async session_encodeCallSignatures(params) { + const { sessionTopology, callSignatures, includesImplicitSignature } = params + const result = await session.doEncodeSessionCallSignatures( + JSON.stringify(sessionTopology), + callSignatures, + includesImplicitSignature, + ) + return result }, + + // SESSION EXPLICIT async session_explicit_add(params) { const { explicitSession, sessionTopology } = params const result = await sessionExplicit.doAddSession(JSON.stringify(explicitSession), JSON.stringify(sessionTopology)) @@ -142,37 +156,34 @@ const rpcMethods: Record Promise> = { const result = await sessionExplicit.doRemoveSession(explicitSessionAddress, JSON.stringify(sessionTopology)) return result }, - async session_explicit_use(params) { - const { signature, permissionIndexes, sessionTopology } = params - const result = await sessionExplicit.doUseSession(signature, permissionIndexes, JSON.stringify(sessionTopology)) - return result - }, - async session_explicit_toPackedTopology(params) { - const { sessionTopology } = params - const result = await sessionExplicit.doEncodeSessionsTopology(JSON.stringify(sessionTopology)) + async session_explicit_encodeCallSignature(params) { + const { permissionIndex, signature } = params + const result = await sessionExplicit.doEncodeExplicitSessionCallSignature(permissionIndex, signature) return result }, // SESSION IMPLICIT - async session_implicit_empty(_params) { - return await sessionImplicit.doEmptySession() - }, async session_implicit_addBlacklistAddress(params) { const { blacklistAddress, sessionConfiguration } = params - return await sessionImplicit.doAddBlacklistAddress(blacklistAddress, JSON.stringify(sessionConfiguration)) + const result = await sessionImplicit.doAddBlacklistAddress(blacklistAddress, JSON.stringify(sessionConfiguration)) + return result }, async session_implicit_removeBlacklistAddress(params) { const { blacklistAddress, sessionConfiguration } = params - return await sessionImplicit.doRemoveBlacklistAddress(blacklistAddress, JSON.stringify(sessionConfiguration)) + const result = await sessionImplicit.doRemoveBlacklistAddress( + blacklistAddress, + JSON.stringify(sessionConfiguration), + ) + return result }, - async session_implicit_use(params) { - const { sessionSignature, globalSignature, attestation, sessionConfiguration } = params - return await sessionImplicit.doUseImplicitSession( - sessionSignature, - globalSignature, + async session_implicit_encodeCallSignature(params) { + const { attestation, globalSignature, sessionSignature } = params + const result = await sessionImplicit.doEncodeImplicitSessionCallSignature( JSON.stringify(attestation), - JSON.stringify(sessionConfiguration), + globalSignature, + sessionSignature, ) + return result }, // SIGNATURE diff --git a/packages/primitives-cli/src/subcommands/session.ts b/packages/primitives-cli/src/subcommands/session.ts index 43c73470f..67d4a1da0 100644 --- a/packages/primitives-cli/src/subcommands/session.ts +++ b/packages/primitives-cli/src/subcommands/session.ts @@ -1,12 +1,84 @@ import { CommandModule } from 'yargs' import sessionExplicitCommand from './sessionExplicit' import sessionImplicitCommand from './sessionImplicit' +import { + emptySessionsTopology, + sessionsTopologyFromJson, + sessionsTopologyToJson, +} from '@0xsequence/sequence-primitives' +import { encodeSessionCallSignatures } from '@0xsequence/sequence-primitives' +import { Bytes, Hex } from 'ox' + +export async function doEmptyTopology(globalSigner: `0x${string}`): Promise { + const topology = emptySessionsTopology(globalSigner) + return sessionsTopologyToJson(topology) +} + +export async function doEncodeSessionCallSignatures( + sessionConfigurationInput: string, + callSignaturesInput: string[], + includesImplicitSignature: boolean, +): Promise { + const sessionConfiguration = sessionsTopologyFromJson(sessionConfigurationInput) + const callSignatures = callSignaturesInput.map((s) => Bytes.fromHex(s as `0x${string}`)) + const encoded = encodeSessionCallSignatures(callSignatures, sessionConfiguration, includesImplicitSignature) + return Hex.from(encoded) +} const sessionCommand: CommandModule = { command: 'session', describe: 'Session utilities', builder: (yargs) => { return yargs + .command( + 'empty [global-signer]', + 'Create an empty session topology with the given global signer', + (yargs) => { + return yargs.positional('global-signer', { + type: 'string', + description: 'The global signer for the session topology', + demandOption: true, + alias: 'g', + }) + }, + async (args) => { + console.log(await doEmptyTopology(args.globalSigner as `0x${string}`)) + }, + ) + .command( + 'encode-calls [session-configuration] [call-signatures] [includes-implicit-signature]', + 'Encode a call signature for an implicit session', + (yargs) => { + return yargs + .positional('session-configuration', { + type: 'string', + description: 'The session configuration', + demandOption: true, + }) + .positional('call-signatures', { + type: 'string', + array: true, + description: 'The call signatures', + demandOption: true, + }) + .option('includes-implicit-signature', { + type: 'boolean', + description: 'Whether an implicit signature is included', + demandOption: false, + default: false, + alias: 'i', + }) + }, + async (args) => { + console.log( + await doEncodeSessionCallSignatures( + args.sessionConfiguration, + args.callSignatures, + args.includesImplicitSignature, + ), + ) + }, + ) .command(sessionExplicitCommand) .command(sessionImplicitCommand) .demandCommand(1, 'You must specify a subcommand for session') diff --git a/packages/primitives-cli/src/subcommands/sessionExplicit.ts b/packages/primitives-cli/src/subcommands/sessionExplicit.ts index d327a1a47..35493ffbf 100644 --- a/packages/primitives-cli/src/subcommands/sessionExplicit.ts +++ b/packages/primitives-cli/src/subcommands/sessionExplicit.ts @@ -1,71 +1,52 @@ import { - encodeSessionsTopology, - encodeExplicitSessionSignature, - isEmptySessionsTopology, + encodeExplicitSessionCallSignature, isSessionsTopology, mergeSessionsTopologies, - removeSessionPermission, + removeExplicitSession, sessionsTopologyFromJson, sessionsTopologyToJson, } from '@0xsequence/sequence-primitives' -import { Bytes, Hex } from 'ox' +import { Hex } from 'ox' import type { CommandModule } from 'yargs' import { fromPosOrStdin, parseRSV } from '../utils' -export async function doEncodeSessionsTopology(input: string): Promise { - let topology = sessionsTopologyFromJson(input) - if (isEmptySessionsTopology(topology)) { - // Encode a node of bytes32(0) - topology = Bytes.fromHex('0x0000000000000000000000000000000000000000000000000000000000000000') - } - const packed = encodeSessionsTopology(topology) - return Hex.from(packed) -} - -export async function doEmptySession(): Promise { - return JSON.stringify([]) -} - export async function doAddSession(sessionInput: string, topologyInput: string): Promise { const session = sessionsTopologyFromJson(sessionInput) const topology = sessionsTopologyFromJson(topologyInput) if (!isSessionsTopology(session)) { throw new Error('Explicit session must be a valid session topology') } - if (!isSessionsTopology(topology) && !isEmptySessionsTopology(topology)) { + if (!isSessionsTopology(topology)) { throw new Error('Session topology must be a valid session topology') } - return sessionsTopologyToJson(mergeSessionsTopologies(topology, session)) + return sessionsTopologyToJson(mergeSessionsTopologies(session, topology)) } export async function doRemoveSession(explicitSessionAddress: string, topologyInput: string): Promise { const topology = sessionsTopologyFromJson(topologyInput) - if (!isSessionsTopology(topology) && !isEmptySessionsTopology(topology)) { + if (!isSessionsTopology(topology)) { throw new Error('Session topology must be a valid session topology') } if (!explicitSessionAddress || !explicitSessionAddress.startsWith('0x')) { throw new Error('Explicit session address must be a valid address') } - return sessionsTopologyToJson(removeSessionPermission(topology, explicitSessionAddress as `0x${string}`)) + const updated = removeExplicitSession(topology, explicitSessionAddress as `0x${string}`) + if (!updated) { + throw new Error('Session topology is empty') + } + return sessionsTopologyToJson(updated) } -export async function doUseSession( +export async function doEncodeExplicitSessionCallSignature( + permissionIndex: number, signatureInput: string, - permissionIndexesInput: string, - topologyInput: string, ): Promise { if (!signatureInput) { throw new Error('Signature is required') } const signature = parseRSV(signatureInput) - if (!permissionIndexesInput) { - throw new Error('Permission indexes are required') - } - const permissionIndexes = permissionIndexesInput.split(',').map((index) => parseInt(index)) - //TODO Validate that the permission index is valid - const topology = sessionsTopologyFromJson(topologyInput) - const encoded = encodeExplicitSessionSignature(topology, permissionIndexes, signature) + const encoded = encodeExplicitSessionCallSignature(BigInt(permissionIndex), signature) return Hex.from(encoded) } @@ -74,14 +55,6 @@ const sessionExplicitCommand: CommandModule = { describe: 'Explicit session utilities', builder: (yargs) => { return yargs - .command( - 'empty', - 'Create an empty session topology', - () => {}, - async () => { - console.log(await doEmptySession()) - }, - ) .command( 'add [explicit-session] [session-topology]', 'Add a session to the session topology', @@ -90,12 +63,12 @@ const sessionExplicitCommand: CommandModule = { .positional('explicit-session', { type: 'string', description: 'Explicit session to add', - required: true, + demandOption: true, }) .positional('session-topology', { type: 'string', description: 'Session topology to add to', - required: true, + demandOption: true, }) }, async (argv) => { @@ -115,10 +88,12 @@ const sessionExplicitCommand: CommandModule = { .positional('explicit-session-address', { type: 'string', description: 'Explicit session address to remove', + demandOption: true, }) .positional('session-topology', { type: 'string', description: 'Session topology to remove from', + demandOption: true, }) }, async (argv) => { @@ -128,21 +103,19 @@ const sessionExplicitCommand: CommandModule = { }, ) .command( - 'use [signature] [permission-indexes] [session-topology]', - 'Encode a signature with the given session topology', + 'encode-call-signature [permission-index] [signature]', + 'Encode a signature with the given permission index', (yargs) => { return yargs .positional('signature', { type: 'string', description: 'Signature to encode (r:s:v)', + demandOption: true, }) - .positional('permission-indexes', { - type: 'string', - description: 'Indexes of the permissions to use (comma separated)', - }) - .positional('session-topology', { - type: 'string', - description: 'Session topology to use', + .positional('permission-index', { + type: 'number', + description: 'Index of the permission to use', + demandOption: true, }) }, async (argv) => { @@ -150,26 +123,11 @@ const sessionExplicitCommand: CommandModule = { if (!signatureInput) { throw new Error('Signature is required') } - const permissionIndexesInput = argv.permissionIndexes - if (!permissionIndexesInput) { - throw new Error('Permission indexes are required') + const permissionIndex = argv.permissionIndex + if (!permissionIndex) { + throw new Error('Permission index is required') } - const topologyInput = await fromPosOrStdin(argv, 'session-topology') - console.log(await doUseSession(signatureInput, permissionIndexesInput, topologyInput)) - }, - ) - .command( - 'to-packed-topology [session-topology]', - 'Convert session topology to packed format', - (yargs) => { - return yargs.positional('session-topology', { - type: 'string', - description: 'Input session topology to convert', - }) - }, - async (argv) => { - const permission = await fromPosOrStdin(argv, 'session-topology') - console.log(await doEncodeSessionsTopology(permission)) + console.log(await doEncodeExplicitSessionCallSignature(permissionIndex, signatureInput)) }, ) .demandCommand(1, 'You must specify a subcommand for session') diff --git a/packages/primitives-cli/src/subcommands/sessionImplicit.ts b/packages/primitives-cli/src/subcommands/sessionImplicit.ts index bed7b859b..02c7a714f 100644 --- a/packages/primitives-cli/src/subcommands/sessionImplicit.ts +++ b/packages/primitives-cli/src/subcommands/sessionImplicit.ts @@ -1,27 +1,20 @@ -// packages/primitives-cli/src/subcommands/sessionImplicit.ts - import { - ImplicitSessionConfiguration, - addToImplicitSessionBlacklist, + addToImplicitBlacklist, attestationFromJson, - emptyImplicitSessionConfiguration, - encodeImplicitSessionSignature, - removeFromImplicitSessionBlacklist, + encodeImplicitSessionCallSignature, + removeFromImplicitBlacklist, + SessionsTopology, } from '@0xsequence/sequence-primitives' -import { Hex } from 'ox' +import { Address, Hex } from 'ox' import type { CommandModule } from 'yargs' import { fromPosOrStdin, parseRSV, requireString } from '../utils' -export async function doEmptySession(): Promise { - return JSON.stringify(emptyImplicitSessionConfiguration()) -} - export async function doAddBlacklistAddress( blacklistAddress: string, sessionConfigurationInput: string, ): Promise { - const sessionConfiguration = JSON.parse(sessionConfigurationInput) as ImplicitSessionConfiguration - const updated = addToImplicitSessionBlacklist(sessionConfiguration, blacklistAddress) + const sessionConfiguration = JSON.parse(sessionConfigurationInput) as SessionsTopology + const updated = addToImplicitBlacklist(sessionConfiguration, blacklistAddress as Address.Address) return JSON.stringify(updated) } @@ -29,22 +22,20 @@ export async function doRemoveBlacklistAddress( blacklistAddress: string, sessionConfigurationInput: string, ): Promise { - const sessionConfiguration = JSON.parse(sessionConfigurationInput) as ImplicitSessionConfiguration - const updated = removeFromImplicitSessionBlacklist(sessionConfiguration, blacklistAddress) + const sessionConfiguration = JSON.parse(sessionConfigurationInput) as SessionsTopology + const updated = removeFromImplicitBlacklist(sessionConfiguration, blacklistAddress as Address.Address) return JSON.stringify(updated) } -export async function doUseImplicitSession( - sessionSigInput: string, - globalSigInput: string, +export async function doEncodeImplicitSessionCallSignature( attestationInput: string, - sessionConfigurationInput: string, + globalSigInput: string, + sessionSigInput: string, ): Promise { - const sessionSig = parseRSV(sessionSigInput) - const globalSig = parseRSV(globalSigInput) const attestation = attestationFromJson(attestationInput) - const sessionConfiguration = JSON.parse(sessionConfigurationInput) as ImplicitSessionConfiguration - const encoded = encodeImplicitSessionSignature(sessionSig, attestation, globalSig, sessionConfiguration) + const globalSig = parseRSV(globalSigInput) + const sessionSig = parseRSV(sessionSigInput) + const encoded = encodeImplicitSessionCallSignature(attestation, globalSig, sessionSig) return Hex.from(encoded) } const sessionImplicitCommand: CommandModule = { @@ -52,14 +43,6 @@ const sessionImplicitCommand: CommandModule = { describe: 'Implicit session utilities', builder: (yargs) => { return yargs - .command( - 'empty', - 'Create an empty implicit session topology', - () => {}, - async () => { - console.log(await doEmptySession()) - }, - ) .command( 'blacklist-add [blacklist-address] [session-configuration]', 'Add an address to the implicit session blacklist', @@ -68,12 +51,12 @@ const sessionImplicitCommand: CommandModule = { .positional('blacklist-address', { type: 'string', description: 'Blacklist address', - required: true, + demandOption: true, }) .positional('session-configuration', { type: 'string', description: 'Session configuration', - required: true, + demandOption: true, }) }, async (argv) => { @@ -91,12 +74,12 @@ const sessionImplicitCommand: CommandModule = { .positional('blacklist-address', { type: 'string', description: 'Blacklist address', - required: true, + demandOption: true, }) .positional('session-configuration', { type: 'string', description: 'Session configuration', - required: true, + demandOption: true, }) }, async (argv) => { @@ -109,29 +92,24 @@ const sessionImplicitCommand: CommandModule = { }, ) .command( - 'use [session-signature] [global-signature] [attestation] [session-configuration]', + 'encode-call-signature [attestation] [global-signature] [session-signature]', 'Encode an implicit session signature', (yargs) => { return yargs - .positional('session-signature', { + .positional('attestation', { type: 'string', - description: 'Session signature in r:s:v format', - required: true, + description: 'Attestation for the implicit session', + demandOption: true, }) .positional('global-signature', { type: 'string', description: 'Global signature in r:s:v format', - required: true, + demandOption: true, }) - .positional('attestation', { - type: 'string', - description: 'Attestation in r:s:v format', - required: true, - }) - .positional('session-configuration', { + .positional('session-signature', { type: 'string', - description: 'Session configuration', - required: true, + description: 'Session signature in r:s:v format', + demandOption: true, }) }, async (argv) => { @@ -141,10 +119,7 @@ const sessionImplicitCommand: CommandModule = { requireString(globalSigStr, 'Global signature') const attestationInput = argv.attestation requireString(attestationInput, 'Attestation') - const sessionConfigurationInput = await fromPosOrStdin(argv, 'session-configuration') - console.log( - await doUseImplicitSession(sessionSigStr, globalSigStr, attestationInput, sessionConfigurationInput), - ) + console.log(await doEncodeImplicitSessionCallSignature(attestationInput, globalSigStr, sessionSigStr)) }, ) .demandCommand(1, 'You must specify a subcommand for implicit session') diff --git a/packages/primitives/src/address.ts b/packages/primitives/src/address.ts index 64850a265..ab09d902e 100644 --- a/packages/primitives/src/address.ts +++ b/packages/primitives/src/address.ts @@ -1,6 +1,6 @@ import { Address, Bytes, Hash } from 'ox' -import { Configuration, hashConfiguration } from './config' import { Context } from './constants' +import { Configuration, hashConfiguration } from './wallet-config' export function getCounterfactualAddress( configuration: Bytes.Bytes | Configuration, diff --git a/packages/primitives/src/attestation.ts b/packages/primitives/src/attestation.ts index afa8d0ca9..506c77cab 100644 --- a/packages/primitives/src/attestation.ts +++ b/packages/primitives/src/attestation.ts @@ -10,25 +10,17 @@ export type Attestation = { } export function encodeAttestation(attestation: Attestation): Bytes.Bytes { - const approvedSignerBytes = Bytes.padLeft(Bytes.fromHex(attestation.approvedSigner), 20) - const identityTypeBytes = Bytes.padLeft(attestation.identityType, 4) - const issuerHashBytes = Bytes.padLeft(attestation.issuerHash, 32) - const audienceHashBytes = Bytes.padLeft(attestation.audienceHash, 32) - const authDataLengthBytes = Bytes.padLeft(Bytes.fromNumber(attestation.authData.length), 3) - const authDataBytes = attestation.authData - const applicationDataLengthBytes = Bytes.padLeft(Bytes.fromNumber(attestation.applicationData.length), 3) - const applicationDataBytes = attestation.applicationData - - return Bytes.concat( - approvedSignerBytes, - identityTypeBytes, - issuerHashBytes, - audienceHashBytes, - authDataLengthBytes, - authDataBytes, - applicationDataLengthBytes, - applicationDataBytes, - ) + const parts: Bytes.Bytes[] = [ + Bytes.fromHex(attestation.approvedSigner, { size: 20 }), + Bytes.padLeft(attestation.identityType.slice(0, 4), 4), // Truncate identity type to 4 bytes + Bytes.padLeft(attestation.issuerHash, 32), + Bytes.padLeft(attestation.audienceHash, 32), + Bytes.fromNumber(attestation.authData.length, { size: 3 }), + attestation.authData, + Bytes.fromNumber(attestation.applicationData.length, { size: 3 }), + attestation.applicationData, + ] + return Bytes.concat(...parts) } export function hashAttestation(attestation: Attestation): Bytes.Bytes { diff --git a/packages/primitives/src/index.ts b/packages/primitives/src/index.ts index 9fe76e8d9..893e004a9 100644 --- a/packages/primitives/src/index.ts +++ b/packages/primitives/src/index.ts @@ -1,12 +1,11 @@ export * from './address' export * from './attestation' -export * from './config' +export * from './wallet-config' export * from './constants' export * from './erc-6492' export * from './payload' export * from './permission' -export * from './session-explicit-config' -export * from './session-explicit-signature' -export * from './session-implicit' +export * from './session-config' +export * from './session-signature' export * from './signature' export * from './utils' diff --git a/packages/primitives/src/permission.ts b/packages/primitives/src/permission.ts index fd9527644..1c327e7e2 100644 --- a/packages/primitives/src/permission.ts +++ b/packages/primitives/src/permission.ts @@ -27,25 +27,36 @@ export type SessionPermissions = { permissions: Permission[] } +export const MAX_PERMISSIONS_COUNT = 2 ** 7 - 1 +export const MAX_RULES_COUNT = 2 ** 8 - 1 + // Encoding export function encodeSessionPermissions(sessionPermissions: SessionPermissions): Bytes.Bytes { + if (sessionPermissions.permissions.length > MAX_PERMISSIONS_COUNT) { + throw new Error('Too many permissions') + } + const encodedPermissions = sessionPermissions.permissions.map(encodePermission) return Bytes.concat( Bytes.padLeft(Bytes.fromHex(sessionPermissions.signer), 20), Bytes.padLeft(Bytes.fromNumber(sessionPermissions.valueLimit), 32), Bytes.padLeft(Bytes.fromNumber(sessionPermissions.deadline), 32), - Bytes.padLeft(Bytes.fromNumber(sessionPermissions.permissions.length), 3), + Bytes.fromNumber(sessionPermissions.permissions.length, { size: 1 }), Bytes.concat(...encodedPermissions), ) } export function encodePermission(permission: Permission): Bytes.Bytes { + if (permission.rules.length > MAX_RULES_COUNT) { + throw new Error('Too many rules') + } + const encodedRules = permission.rules.map(encodeParameterRule) return Bytes.concat( Bytes.padLeft(Bytes.fromHex(permission.target), 20), - Bytes.padLeft(Bytes.fromNumber(permission.rules.length), 3), + Bytes.fromNumber(permission.rules.length, { size: 1 }), Bytes.concat(...encodedRules), ) } diff --git a/packages/primitives/src/session-explicit-config.ts b/packages/primitives/src/session-config.ts similarity index 54% rename from packages/primitives/src/session-explicit-config.ts rename to packages/primitives/src/session-config.ts index ca17f9b96..2a0c7d497 100644 --- a/packages/primitives/src/session-explicit-config.ts +++ b/packages/primitives/src/session-config.ts @@ -1,4 +1,4 @@ -import { Bytes } from 'ox' +import { Bytes, Address } from 'ox' import { encodeSessionPermissions, encodeSessionPermissionsForJson, @@ -11,20 +11,39 @@ export const SESSIONS_FLAG_PERMISSIONS = 0 export const SESSIONS_FLAG_NODE = 1 export const SESSIONS_FLAG_BRANCH = 2 +export type ImplicitBlacklist = { + blacklist: Address.Address[] +} + +export type GlobalSignerLeaf = { + globalSigner: Address.Address +} + export type SessionNode = Bytes.Bytes // Hashed -export type SessionLeaf = SessionPermissions +export type SessionLeaf = SessionPermissions | ImplicitBlacklist | GlobalSignerLeaf export type SessionBranch = [SessionsTopology, SessionsTopology, ...SessionsTopology[]] export type SessionsTopology = SessionBranch | SessionLeaf | SessionNode -export type EmptySessionsTopology = [] function isSessionsNode(topology: any): topology is SessionNode { return Bytes.validate(topology) } -function isSessionsLeaf(topology: any): topology is SessionLeaf { +function isImplicitBlacklist(topology: any): topology is ImplicitBlacklist { + return typeof topology === 'object' && topology !== null && 'blacklist' in topology +} + +function isGlobalSignerLeaf(topology: any): topology is GlobalSignerLeaf { + return typeof topology === 'object' && topology !== null && 'globalSigner' in topology +} + +function isSessionPermissions(topology: any): topology is SessionPermissions { return typeof topology === 'object' && topology !== null && 'signer' in topology } +function isSessionsLeaf(topology: any): topology is SessionLeaf { + return isImplicitBlacklist(topology) || isGlobalSignerLeaf(topology) || isSessionPermissions(topology) +} + function isSessionsBranch(topology: any): topology is SessionBranch { return Array.isArray(topology) && topology.length >= 2 && topology.every((child) => isSessionsTopology(child)) } @@ -33,18 +52,86 @@ export function isSessionsTopology(topology: any): topology is SessionsTopology return isSessionsBranch(topology) || isSessionsLeaf(topology) || isSessionsNode(topology) } -export function isEmptySessionsTopology(topology: any): topology is EmptySessionsTopology { - return Array.isArray(topology) && topology.length === 0 +export function isValidSessionsTopology(topology: any): topology is SessionsTopology { + // A valid topology has exactly one global signer leaf and blacklist leaf + let hasGlobal + let hasBlacklist + //FIXME This no work + if (isSessionsBranch(topology)) { + return false + } + if (isSessionsLeaf(topology)) { + return false + } + return isSessionsNode(topology) +} + +export function getGlobalSigner(topolgy: SessionsTopology): Address.Address | null { + if (isGlobalSignerLeaf(topolgy)) { + // Got it + return topolgy.globalSigner + } + + if (isSessionsBranch(topolgy)) { + // Check branches + const results = topolgy.map(getGlobalSigner).filter((t) => t !== null) + if (results.length > 1) { + throw new Error('Multiple global signers') + } + if (results.length === 1) { + return results[0]! + } + } + + return null +} + +export function getImplicitBlacklist(topolgy: SessionsTopology): Address.Address[] | null { + const blacklistNode = getImplicitBlacklistNode(topolgy) + if (!blacklistNode) { + return null + } + return blacklistNode.blacklist +} + +export function getImplicitBlacklistNode(topolgy: SessionsTopology): ImplicitBlacklist | null { + if (isImplicitBlacklist(topolgy)) { + // Got it + return topolgy + } + + if (isSessionsBranch(topolgy)) { + // Check branches + const results = topolgy.map(getImplicitBlacklistNode).filter((t) => t !== null) + if (results.length > 1) { + throw new Error('Multiple blacklists') + } + if (results.length === 1) { + return results[0]! + } + } + + return null } // Encoding -export function encodeSessionsTopology(topolgy: SessionsTopology): Bytes.Bytes { +export function countSessionsPermissions(topolgy: SessionsTopology): number { + if (isSessionsBranch(topolgy)) { + return topolgy.reduce((acc, node) => acc + countSessionsPermissions(node), 0) + } + if (isSessionPermissions(topolgy)) { + return 1 + } + return 0 +} + +// Encodes only the permissions within a topology +export function encodeSessionsPermissionsTopology(topolgy: SessionsTopology): Bytes.Bytes { if (isSessionsBranch(topolgy)) { - const branch = topolgy as SessionBranch const encodedBranches = [] - for (const node of branch) { - encodedBranches.push(encodeSessionsTopology(node)) + for (const node of topolgy) { + encodedBranches.push(encodeSessionsPermissionsTopology(node)) } const encoded = Bytes.concat(...encodedBranches) const encodedSize = minBytesFor(BigInt(encoded.length)) @@ -59,7 +146,7 @@ export function encodeSessionsTopology(topolgy: SessionsTopology): Bytes.Bytes { ) } - if (isSessionsLeaf(topolgy)) { + if (isSessionPermissions(topolgy)) { const flagByte = SESSIONS_FLAG_PERMISSIONS << 4 const encodedLeaf = encodeSessionPermissions(topolgy) return Bytes.concat(Bytes.fromNumber(flagByte), encodedLeaf) @@ -70,28 +157,33 @@ export function encodeSessionsTopology(topolgy: SessionsTopology): Bytes.Bytes { return Bytes.concat(Bytes.fromNumber(flagByte), topolgy) } + if (isImplicitBlacklist(topolgy) || isGlobalSignerLeaf(topolgy)) { + // Return empty bytes + return new Uint8Array() + } + throw new Error('Invalid topology') } // JSON -export function sessionsTopologyToJson(topology: SessionsTopology | EmptySessionsTopology): string { +export function sessionsTopologyToJson(topology: SessionsTopology): string { return JSON.stringify(encodeSessionsTopologyForJson(topology)) } -function encodeSessionsTopologyForJson(topology: SessionsTopology | EmptySessionsTopology): any { - if (isEmptySessionsTopology(topology)) { - return [] - } - +function encodeSessionsTopologyForJson(topology: SessionsTopology): any { if (isSessionsNode(topology)) { return Bytes.toHex(topology) } - if (isSessionsLeaf(topology)) { + if (isSessionPermissions(topology)) { return encodeSessionPermissionsForJson(topology) } + if (isImplicitBlacklist(topology) || isGlobalSignerLeaf(topology)) { + return topology // No encoding necessary + } + if (isSessionsBranch(topology)) { return topology.map((node) => encodeSessionsTopologyForJson(node)) } @@ -105,7 +197,13 @@ export function sessionsTopologyFromJson(json: string): SessionsTopology { } function sessionsTopologyFromParsed(parsed: any): SessionsTopology { - // If it's a valid hex string, attempt to parse as node + // Parse branch + if (Array.isArray(parsed)) { + const branches = parsed.map((node: any) => sessionsTopologyFromParsed(node)) + return branches as SessionBranch + } + + // Parse node if (typeof parsed === 'string' && parsed.startsWith('0x')) { const maybeBytes = Bytes.fromHex(parsed as `0x${string}`) if (Bytes.validate(maybeBytes)) { @@ -113,7 +211,7 @@ function sessionsTopologyFromParsed(parsed: any): SessionsTopology { } } - // If it looks like session permissions + // Parse permissions if ( typeof parsed === 'object' && parsed !== null && @@ -125,10 +223,16 @@ function sessionsTopologyFromParsed(parsed: any): SessionsTopology { return sessionPermissionsFromParsed(parsed) } - // If it's an array, try to interpret as a branch - if (Array.isArray(parsed)) { - const branches = parsed.map((node: any) => sessionsTopologyFromParsed(node)) - return branches as SessionBranch + // Parse global signer + if (typeof parsed === 'object' && parsed !== null && 'globalSigner' in parsed) { + const globalSigner = parsed.globalSigner as `0x${string}` + return { globalSigner } + } + + // Parse blacklist + if (typeof parsed === 'object' && parsed !== null && 'blacklist' in parsed) { + const blacklist = parsed.blacklist.map((address: any) => Address.from(address)) + return { blacklist } } throw new Error('Invalid topology') @@ -137,29 +241,19 @@ function sessionsTopologyFromParsed(parsed: any): SessionsTopology { // Operations /** - * Removes all session permissions (leaf nodes) that match the given signer from the topology. - * Returns the updated topology or EmptySessionsTopology if it becomes empty. + * Removes all explicit sessions (permissions leaf nodes) that match the given signer from the topology. + * Returns the updated topology or null if it becomes empty (for nesting). * If the signer is not found, the topology is returned unchanged. */ -export function removeSessionPermission( - topology: SessionsTopology | EmptySessionsTopology, +export function removeExplicitSession( + topology: SessionsTopology, signerAddress: `0x${string}`, -): SessionsTopology | EmptySessionsTopology { - if (isEmptySessionsTopology(topology)) { - return topology - } - - // If it's a node (hashed bytes), we leave it as is: - if (isSessionsNode(topology)) { - return topology - } - - // If it's a leaf, remove it if the signer matches: - if (isSessionsLeaf(topology)) { +): SessionsTopology | null { + if (isSessionPermissions(topology)) { if (topology.signer === signerAddress) { - return [] + return null } - // Otherwise, keep it as is + // Return the leaf unchanged return topology } @@ -167,15 +261,15 @@ export function removeSessionPermission( if (isSessionsBranch(topology)) { const newChildren: SessionsTopology[] = [] for (const child of topology) { - const updatedChild = removeSessionPermission(child, signerAddress) - if (!isEmptySessionsTopology(updatedChild)) { + const updatedChild = removeExplicitSession(child, signerAddress) + if (updatedChild != null) { newChildren.push(updatedChild) } } // If no children remain, return null to remove entire branch if (newChildren.length === 0) { - return [] + return null } // If exactly one child remains, collapse upward @@ -187,28 +281,14 @@ export function removeSessionPermission( return newChildren as SessionBranch } - // Unreachable - throw new Error('Invalid topology') + // Other leaf, return unchanged + return topology } /** * Merges two topologies into a new branch of [a, b]. */ -export function mergeSessionsTopologies( - a: SessionsTopology | EmptySessionsTopology, - b: SessionsTopology | EmptySessionsTopology, -): SessionsTopology { - const isEmptyA = isEmptySessionsTopology(a) - const isEmptyB = isEmptySessionsTopology(b) - if (isEmptyA && isEmptyB) { - throw new Error('Cannot merge two empty topologies') - } - if (isEmptyA) { - return b as SessionsTopology - } - if (isEmptyB) { - return a as SessionsTopology - } +export function mergeSessionsTopologies(a: SessionsTopology, b: SessionsTopology): SessionsTopology { return [a, b] } @@ -274,14 +354,17 @@ export function cleanSessionsTopology( } // If it's a leaf, check the deadline - if (isSessionsLeaf(topology)) { - const leaf = topology - if (leaf.deadline < currentTime) { + if (isSessionPermissions(topology)) { + if (topology.deadline < currentTime) { // Expired => remove return null } // Valid => keep - return leaf + return topology + } + + if (isGlobalSignerLeaf(topology) || isImplicitBlacklist(topology)) { + return topology } // If it's a branch, clean all children @@ -306,3 +389,49 @@ export function cleanSessionsTopology( // Otherwise, return a new branch with the cleaned children return newChildren as SessionBranch } + +/** + * Adds an address to the implicit session's blacklist. + * If the address is not already in the blacklist, it is added and the list is sorted. + */ +export function addToImplicitBlacklist(topology: SessionsTopology, address: Address.Address): SessionsTopology { + const blacklistNode = getImplicitBlacklistNode(topology) + if (!blacklistNode) { + throw new Error('No blacklist found') + } + const { blacklist } = blacklistNode + if (blacklist.some((addr) => addr === address)) { + return topology + } + blacklist.push(address) + blacklist.sort() // keep sorted so on-chain binary search works as expected + return topology +} + +/** + * Removes an address from the implicit session's blacklist. + */ +export function removeFromImplicitBlacklist(topology: SessionsTopology, address: Address.Address): SessionsTopology { + const blacklistNode = getImplicitBlacklistNode(topology) + if (!blacklistNode) { + throw new Error('No blacklist found') + } + const { blacklist } = blacklistNode + const newBlacklist = blacklist.filter((a) => a !== address) + blacklistNode.blacklist = newBlacklist + return topology +} + +/** + * Generate an empty sessions topology with the given global signer. No session permission and an empty blacklist + */ +export function emptySessionsTopology(globalSigner: Address.Address): SessionsTopology { + return [ + { + blacklist: [], + }, + { + globalSigner, + }, + ] +} diff --git a/packages/primitives/src/session-explicit-signature.ts b/packages/primitives/src/session-explicit-signature.ts deleted file mode 100644 index f63b85ce2..000000000 --- a/packages/primitives/src/session-explicit-signature.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { Bytes } from 'ox' -import { encodeSessionsTopology, SessionsTopology } from './session-explicit-config' -import { packRSV } from './utils' - -export type ExplicitSessionSignature = { - sessionsTopology: SessionsTopology - permissionIdxPerCall: number[] -} - -export function encodeExplicitSessionSignature( - topology: SessionsTopology, - permissionIndexes: number[], - sessionSignature: { v: number; r: Bytes.Bytes; s: Bytes.Bytes }, -): Bytes.Bytes { - const parts: Bytes.Bytes[] = [] - - // Add session signature (r,sv) - parts.push(packRSV(sessionSignature)) - - // Encode sessions topology - const encodedSessionsTopology = encodeSessionsTopology(topology) - parts.push(Bytes.padLeft(Bytes.fromNumber(encodedSessionsTopology.length), 3)) - parts.push(encodedSessionsTopology) - - // Add permission indices. No size prefix. All remaining bytes are assumed to be included. - parts.push(new Uint8Array(permissionIndexes)) - - return Bytes.concat(...parts) -} diff --git a/packages/primitives/src/session-implicit.ts b/packages/primitives/src/session-implicit.ts deleted file mode 100644 index d073fb937..000000000 --- a/packages/primitives/src/session-implicit.ts +++ /dev/null @@ -1,83 +0,0 @@ -import { Bytes } from 'ox' -import { Attestation, encodeAttestation } from './attestation' -import { packRSV } from './utils' - -/** - * An implicit session configuration consists of a blacklist of addresses. - */ -export interface ImplicitSessionConfiguration { - blacklist: string[] -} - -export function emptyImplicitSessionConfiguration(): ImplicitSessionConfiguration { - return { blacklist: [] } -} - -/** - * Adds an address to the implicit session's blacklist. - * If the address is not already in the blacklist, it is added and the list is sorted. - */ -export function addToImplicitSessionBlacklist( - sessionConfiguration: ImplicitSessionConfiguration, - address: string, -): ImplicitSessionConfiguration { - const { blacklist } = sessionConfiguration - if (!blacklist.some((addr) => addr === address)) { - blacklist.push(address) - blacklist.sort() // keep sorted so on-chain binary search works as expected - } - return { ...sessionConfiguration, blacklist } -} - -/** - * Removes an address from the implicit session's blacklist. - */ -export function removeFromImplicitSessionBlacklist( - sessionConfiguration: ImplicitSessionConfiguration, - address: string, -): ImplicitSessionConfiguration { - const blacklist = sessionConfiguration.blacklist.filter((a) => a !== address) - return { ...sessionConfiguration, blacklist } -} - -/** - * Encodes the implicit session signature. - * - * The on‐chain encoding layout is: - * [sessionSignature (64 bytes)] ++ [attestation] ++ [globalSignature (64 bytes)] - * ++ [uint24(blacklist.length)] ++ [blacklist addresses (each 20 bytes)] - * - * The provided session and global signatures (as {r, s, v} objects) are first - * packed into a compact 64-byte representation via packRSV. - * - * @param sessionSig - The session signature (r, s, v) object. - * @param attestation - The packed attestation bytes. - * @param globalSig - The global signature (r, s, v) object. - * @param blacklist - The array of blacklisted addresses (as hex strings). - * @returns The fully encoded implicit session signature as a Uint8Array. - */ -export function encodeImplicitSessionSignature( - sessionSig: { v: number; r: Bytes.Bytes; s: Bytes.Bytes }, - attestation: Attestation, - globalSig: { v: number; r: Bytes.Bytes; s: Bytes.Bytes }, - sessionConfiguration: ImplicitSessionConfiguration, -): Uint8Array { - // Pack the session and global signatures into their compact 64-byte representations. - const sessionSigPacked = packRSV(sessionSig) - const globalSigPacked = packRSV(globalSig) - - // Blacklist encoding - const { blacklist } = sessionConfiguration - const blacklistBytes = blacklist.map((addr) => Bytes.fromHex(addr as `0x${string}`)) - const concatenatedBlacklist = blacklistBytes.length > 0 ? Bytes.concat(...blacklistBytes) : new Uint8Array(0) - const blacklistLengthBytes = Bytes.fromNumber(blacklist.length, { size: 3 }) - - // Concatenate all parts in order. - return Bytes.concat( - sessionSigPacked, - encodeAttestation(attestation), - globalSigPacked, - blacklistLengthBytes, - concatenatedBlacklist, - ) -} diff --git a/packages/primitives/src/session-signature.ts b/packages/primitives/src/session-signature.ts new file mode 100644 index 000000000..37ca63a4f --- /dev/null +++ b/packages/primitives/src/session-signature.ts @@ -0,0 +1,84 @@ +import { Bytes } from 'ox' +import { Attestation, encodeAttestation } from './attestation' +import { MAX_PERMISSIONS_COUNT } from './permission' +import { + encodeSessionsPermissionsTopology, + getGlobalSigner, + getImplicitBlacklist, + SessionsTopology, +} from './session-config' +import { minBytesFor, packRSV } from './utils' + +export type ExplicitSessionSignature = { + sessionsTopology: SessionsTopology + permissionIdxPerCall: number[] +} + +export function encodeImplicitSessionCallSignature( + attestation: Attestation, + globalSignature: { v: number; r: Bytes.Bytes; s: Bytes.Bytes }, + sessionSignature: { v: number; r: Bytes.Bytes; s: Bytes.Bytes }, +): Bytes.Bytes { + const parts: Bytes.Bytes[] = [ + Bytes.fromNumber(0x80, { size: 1 }), // Implicit flag (MSB) + encodeAttestation(attestation), // Attestation + packRSV(globalSignature), // Global signature + packRSV(sessionSignature), // Session signature + ] + + return Bytes.concat(...parts) +} + +export function encodeExplicitSessionCallSignature( + permissionIndex: bigint, + sessionSignature: { v: number; r: Bytes.Bytes; s: Bytes.Bytes }, +): Bytes.Bytes { + if (permissionIndex > MAX_PERMISSIONS_COUNT) { + throw new Error('Permission index is too large') + } + + const parts: Bytes.Bytes[] = [ + Bytes.fromNumber(permissionIndex, { size: 1 }), // Implicit flag (MSB false) & permission index + packRSV(sessionSignature), // Session signature + ] + + return Bytes.concat(...parts) +} + +export function encodeSessionCallSignatures( + callSignatures: Bytes.Bytes[], + topolgy: SessionsTopology, + includesImplicitSignature = false, // Implicit can optimise away including global signer +): Bytes.Bytes { + const parts: Bytes.Bytes[] = [Bytes.fromBoolean(includesImplicitSignature)] + + if (!includesImplicitSignature) { + // Add the global signer + const globalSigner = getGlobalSigner(topolgy) + if (!globalSigner) { + throw new Error('No global signer') + } + parts.push(Bytes.fromHex(globalSigner)) + } + + // Explicit session topology + let encodedExplicitSessionTopology = encodeSessionsPermissionsTopology(topolgy) + if (minBytesFor(BigInt(encodedExplicitSessionTopology.length)) > 3) { + throw new Error('Explicit session topology is too large') + } + parts.push(Bytes.fromNumber(encodedExplicitSessionTopology.length, { size: 3 }), encodedExplicitSessionTopology) + + // Add the blacklist + const blacklist = getImplicitBlacklist(topolgy) + if (!blacklist) { + throw new Error('No blacklist') + } + parts.push(Bytes.fromNumber(blacklist.length, { size: 1 }), Bytes.concat(...blacklist.map((b) => Bytes.fromHex(b)))) + + // Call signature parts + for (const callSignature of callSignatures) { + parts.push(callSignature) + } + + return Bytes.concat(...parts) +} diff --git a/packages/primitives/src/signature.ts b/packages/primitives/src/signature.ts index d8c2303b0..ec45ac5c3 100644 --- a/packages/primitives/src/signature.ts +++ b/packages/primitives/src/signature.ts @@ -15,7 +15,7 @@ import { isSignerLeaf, isSubdigestLeaf, isTopology, -} from './config' +} from './wallet-config' import { IS_VALID_SAPIENT_SIGNATURE, IS_VALID_SAPIENT_SIGNATURE_COMPACT, IS_VALID_SIGNATURE } from './constants' import { erc6492, erc6492Decode } from './erc-6492' import { fromConfigUpdate, hash, ParentedPayload } from './payload' diff --git a/packages/primitives/src/config.ts b/packages/primitives/src/wallet-config.ts similarity index 100% rename from packages/primitives/src/config.ts rename to packages/primitives/src/wallet-config.ts diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 21a5e3b56..e7b7c7c2d 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -1475,6 +1475,7 @@ packages: glob@7.2.3: resolution: {integrity: sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==} + deprecated: Glob versions prior to v9 are no longer supported globals@14.0.0: resolution: {integrity: sha512-oahGvuMGQlPw/ivIYBjVSrWAfWLBeku5tpPE2fOPLi+WHffIWbuh2tCjhyQhTBPMf5E9jDEH4FOmTYgYwbKwtQ==} @@ -1590,6 +1591,7 @@ packages: inflight@1.0.6: resolution: {integrity: sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==} + deprecated: This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful. inherits@2.0.4: resolution: {integrity: sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==} @@ -1873,6 +1875,7 @@ packages: lodash.get@4.4.2: resolution: {integrity: sha512-z+Uw/vLuy6gQe8cfaFWD7p0wVv8fJl3mbzXh33RS+0oW2wvUqiRXiQ69gLWSLpgB5/6sU+r6BlQR0MBILadqTQ==} + deprecated: This package is deprecated. Use the optional chaining (?.) operator instead. lodash.merge@4.6.2: resolution: {integrity: sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==} @@ -2269,6 +2272,7 @@ packages: rimraf@3.0.2: resolution: {integrity: sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==} + deprecated: Rimraf versions prior to v4 are no longer supported hasBin: true run-async@2.4.1: From 0b1477dea039777e062c3a61752b0f9529bdbc83 Mon Sep 17 00:00:00 2001 From: William Hua Date: Tue, 18 Feb 2025 11:14:59 -0500 Subject: [PATCH 123/439] core: Wallet.send() --- packages/core/src/wallet.ts | 90 ++++++++++++++++++++++++++++ packages/primitives/src/constants.ts | 6 +- 2 files changed, 95 insertions(+), 1 deletion(-) diff --git a/packages/core/src/wallet.ts b/packages/core/src/wallet.ts index 019dcd99a..6561bf7ae 100644 --- a/packages/core/src/wallet.ts +++ b/packages/core/src/wallet.ts @@ -1,9 +1,14 @@ import { + Call, + CallPayload, Configuration, Context, DevContext1, + encode, encodeSapient, + encodeSignature, erc6492Deploy, + EXECUTE, fromConfigUpdate, getCounterfactualAddress, hash, @@ -15,6 +20,7 @@ import { normalizeSignerSignature, ParentedPayload, RawSignature, + READ_NONCE, sign, SignatureOfSapientSignerLeaf, SignatureOfSignerLeaf, @@ -80,6 +86,90 @@ export class Wallet { await this.options.stateProvider.setConfiguration(this.address, configuration, signature) } + async send( + provider: Provider.Provider, + calls: Call[], + options?: { space?: bigint; trustSigners?: boolean; onSignerError?: SignerErrorCallback }, + ) { + return provider.request({ + method: 'eth_sendTransaction', + params: [await this.getTransaction(provider, calls, options)], + }) + } + + async getTransaction( + provider: Provider.Provider, + calls: Call[], + options?: { space?: bigint; trustSigners?: boolean; onSignerError?: SignerErrorCallback }, + ): Promise<{ to: Address.Address; data: Hex.Hex }> { + const space = options?.space ?? 0n + + if (await this.isDeployed(provider)) { + const nonce = BigInt( + await provider.request({ + method: 'eth_call', + params: [{ to: this.address, data: AbiFunction.encodeData(READ_NONCE, [space]) }], + }), + ) + + const payload: CallPayload = { type: 'call', space, nonce, calls } + const signature = await this.sign(payload, { ...options, provider }) + + return { + to: this.address, + data: AbiFunction.encodeData(EXECUTE, [Bytes.toHex(encode(payload)), Bytes.toHex(encodeSignature(signature))]), + } + } else { + const nonce = 0n + + const payload: CallPayload = { type: 'call', space, nonce, calls } + const [signature, { deployHash, context }] = await Promise.all([ + this.sign(payload, { ...options, provider }), + this.options.stateProvider.getDeployHash(this.address), + ]) + const deploy = erc6492Deploy(deployHash, context) + + return { + to: context.guest, + data: AbiFunction.encodeData(EXECUTE, [ + Bytes.toHex( + encode({ + type: 'call', + space: 0n, + nonce: 0n, + calls: [ + { + to: deploy.to, + value: 0n, + data: Hex.toBytes(deploy.data), + gasLimit: 0n, + delegateCall: false, + onlyFallback: false, + behaviorOnError: 'revert', + }, + { + to: this.address, + value: 0n, + data: Hex.toBytes( + AbiFunction.encodeData(EXECUTE, [ + Bytes.toHex(encode(payload)), + Bytes.toHex(encodeSignature(signature)), + ]), + ), + gasLimit: 0n, + delegateCall: false, + onlyFallback: false, + behaviorOnError: 'ignore', + }, + ], + }), + ), + '0x', + ]), + } + } + } + async sign( payload: ParentedPayload, options?: { provider?: Provider.Provider; trustSigners?: boolean; onSignerError?: SignerErrorCallback }, diff --git a/packages/primitives/src/constants.ts b/packages/primitives/src/constants.ts index 84d431a49..63e493cbc 100644 --- a/packages/primitives/src/constants.ts +++ b/packages/primitives/src/constants.ts @@ -5,12 +5,14 @@ export const DEFAULT_CREATION_CODE = export type Context = { factory: Address.Address + guest: Address.Address stage1: Address.Address creationCode: Hex.Hex } export const DevContext1: Context = { factory: '0xFaA5c0b14d1bED5C888Ca655B9a8A5911F78eF4A', + guest: '0xTODO', stage1: '0x66155b899d93e255d42a85eb921ead9f2e964ef1', creationCode: DEFAULT_CREATION_CODE, } @@ -25,8 +27,10 @@ export const DEPLOY = Abi.from([ 'function deploy(address _mainModule, bytes32 _salt) public payable returns (address _contract)', ])[0] -// MainModule +// Stage2Module export const IMAGE_HASH = Abi.from(['function imageHash() external view returns (bytes32)'])[0] +export const READ_NONCE = Abi.from(['function readNonce(uint256 _space) public view returns (uint256)'])[0] +export const EXECUTE = Abi.from(['function execute(bytes calldata _payload, bytes calldata _signature) external'])[0] // Sapient export const IS_VALID_SAPIENT_SIGNATURE = Abi.from([ From ae9c884fecd81c3a4a0c269e5873b5fc9288cd7a Mon Sep 17 00:00:00 2001 From: William Hua Date: Tue, 18 Feb 2025 11:24:25 -0500 Subject: [PATCH 124/439] primitives: pluck Guest out of Context --- packages/core/src/wallet.ts | 8 ++++---- packages/primitives/src/constants.ts | 6 +++--- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/packages/core/src/wallet.ts b/packages/core/src/wallet.ts index 6561bf7ae..2e1e3a8e7 100644 --- a/packages/core/src/wallet.ts +++ b/packages/core/src/wallet.ts @@ -11,6 +11,7 @@ import { EXECUTE, fromConfigUpdate, getCounterfactualAddress, + Guest, hash, hashConfiguration, IMAGE_HASH, @@ -123,14 +124,13 @@ export class Wallet { const nonce = 0n const payload: CallPayload = { type: 'call', space, nonce, calls } - const [signature, { deployHash, context }] = await Promise.all([ + const [signature, deploy] = await Promise.all([ this.sign(payload, { ...options, provider }), - this.options.stateProvider.getDeployHash(this.address), + this.getDeployTransaction(), ]) - const deploy = erc6492Deploy(deployHash, context) return { - to: context.guest, + to: Guest, data: AbiFunction.encodeData(EXECUTE, [ Bytes.toHex( encode({ diff --git a/packages/primitives/src/constants.ts b/packages/primitives/src/constants.ts index 63e493cbc..56843024d 100644 --- a/packages/primitives/src/constants.ts +++ b/packages/primitives/src/constants.ts @@ -1,22 +1,22 @@ import { Abi, Address, Hex } from 'ox' -export const DEFAULT_CREATION_CODE = +export const DEFAULT_CREATION_CODE: Hex.Hex = '0x603a600e3d39601a805130553df3363d3d373d3d3d363d30545af43d82803e903d91601857fd5bf3' export type Context = { factory: Address.Address - guest: Address.Address stage1: Address.Address creationCode: Hex.Hex } export const DevContext1: Context = { factory: '0xFaA5c0b14d1bED5C888Ca655B9a8A5911F78eF4A', - guest: '0xTODO', stage1: '0x66155b899d93e255d42a85eb921ead9f2e964ef1', creationCode: DEFAULT_CREATION_CODE, } +export const Guest: Address.Address = '0xTODO' + // ERC1271 export const IS_VALID_SIGNATURE = Abi.from([ 'function isValidSignature(bytes32 _hash, bytes memory _signature) public view returns (bytes4 magicValue)', From e6fff8f775b3e9c812cf762a78bf6051edba957d Mon Sep 17 00:00:00 2001 From: Michael Standen Date: Tue, 18 Feb 2025 11:22:12 +1300 Subject: [PATCH 125/439] Remove unused function --- packages/primitives/src/session-config.ts | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/packages/primitives/src/session-config.ts b/packages/primitives/src/session-config.ts index 2a0c7d497..c092503d4 100644 --- a/packages/primitives/src/session-config.ts +++ b/packages/primitives/src/session-config.ts @@ -116,16 +116,6 @@ export function getImplicitBlacklistNode(topolgy: SessionsTopology): ImplicitBla // Encoding -export function countSessionsPermissions(topolgy: SessionsTopology): number { - if (isSessionsBranch(topolgy)) { - return topolgy.reduce((acc, node) => acc + countSessionsPermissions(node), 0) - } - if (isSessionPermissions(topolgy)) { - return 1 - } - return 0 -} - // Encodes only the permissions within a topology export function encodeSessionsPermissionsTopology(topolgy: SessionsTopology): Bytes.Bytes { if (isSessionsBranch(topolgy)) { From 9ba5dc6fc7e166a3d078bc29d1b38be675a1ddda Mon Sep 17 00:00:00 2001 From: Michael Standen Date: Wed, 19 Feb 2025 12:50:41 +1300 Subject: [PATCH 126/439] Use tree for entire session configuration --- .../primitives-cli/src/subcommands/server.ts | 10 +- .../primitives-cli/src/subcommands/session.ts | 55 +++- .../src/subcommands/sessionExplicit.ts | 7 +- packages/primitives/src/config.ts | 43 ++++ packages/primitives/src/index.ts | 3 +- packages/primitives/src/session-config.ts | 236 ++++++++++++++++-- packages/primitives/src/session-signature.ts | 50 ++-- 7 files changed, 339 insertions(+), 65 deletions(-) create mode 100644 packages/primitives/src/config.ts diff --git a/packages/primitives-cli/src/subcommands/server.ts b/packages/primitives-cli/src/subcommands/server.ts index 5f4277fd9..e9494072b 100644 --- a/packages/primitives-cli/src/subcommands/server.ts +++ b/packages/primitives-cli/src/subcommands/server.ts @@ -136,14 +136,20 @@ const rpcMethods: Record Promise> = { return result }, async session_encodeCallSignatures(params) { - const { sessionTopology, callSignatures, includesImplicitSignature } = params + const { sessionTopology, callSignatures, explicitSigners, implicitSigners } = params const result = await session.doEncodeSessionCallSignatures( JSON.stringify(sessionTopology), callSignatures, - includesImplicitSignature, + explicitSigners, + implicitSigners, ) return result }, + async session_imageHash(params) { + const { sessionTopology } = params + const result = await session.doImageHash(JSON.stringify(sessionTopology)) + return result + }, // SESSION EXPLICIT async session_explicit_add(params) { diff --git a/packages/primitives-cli/src/subcommands/session.ts b/packages/primitives-cli/src/subcommands/session.ts index 67d4a1da0..9f1128f8b 100644 --- a/packages/primitives-cli/src/subcommands/session.ts +++ b/packages/primitives-cli/src/subcommands/session.ts @@ -3,7 +3,9 @@ import sessionExplicitCommand from './sessionExplicit' import sessionImplicitCommand from './sessionImplicit' import { emptySessionsTopology, + hashConfigurationTree, sessionsTopologyFromJson, + sessionsTopologyToConfigurationTree, sessionsTopologyToJson, } from '@0xsequence/sequence-primitives' import { encodeSessionCallSignatures } from '@0xsequence/sequence-primitives' @@ -17,14 +19,27 @@ export async function doEmptyTopology(globalSigner: `0x${string}`): Promise { const sessionConfiguration = sessionsTopologyFromJson(sessionConfigurationInput) const callSignatures = callSignaturesInput.map((s) => Bytes.fromHex(s as `0x${string}`)) - const encoded = encodeSessionCallSignatures(callSignatures, sessionConfiguration, includesImplicitSignature) + const encoded = encodeSessionCallSignatures( + callSignatures, + sessionConfiguration, + explicitSigners as `0x${string}`[], + implicitSigners as `0x${string}`[], + ) return Hex.from(encoded) } +export async function doImageHash(sessionConfigurationInput: string): Promise { + const sessionConfiguration = sessionsTopologyFromJson(sessionConfigurationInput) + const configurationTree = sessionsTopologyToConfigurationTree(sessionConfiguration) + const hash = hashConfigurationTree(configurationTree) + return Hex.from(hash) +} + const sessionCommand: CommandModule = { command: 'session', describe: 'Session utilities', @@ -46,7 +61,7 @@ const sessionCommand: CommandModule = { }, ) .command( - 'encode-calls [session-configuration] [call-signatures] [includes-implicit-signature]', + 'encode-calls [session-configuration] [call-signatures] [explicit-signers] [implicit-signers]', 'Encode a call signature for an implicit session', (yargs) => { return yargs @@ -61,11 +76,20 @@ const sessionCommand: CommandModule = { description: 'The call signatures', demandOption: true, }) - .option('includes-implicit-signature', { - type: 'boolean', - description: 'Whether an implicit signature is included', + .option('explicit-signers', { + type: 'string', + array: true, + description: 'The explicit signers', + demandOption: false, + default: [], + alias: 'e', + }) + .option('implicit-signers', { + type: 'string', + array: true, + description: 'The implicit signers', demandOption: false, - default: false, + default: [], alias: 'i', }) }, @@ -74,11 +98,26 @@ const sessionCommand: CommandModule = { await doEncodeSessionCallSignatures( args.sessionConfiguration, args.callSignatures, - args.includesImplicitSignature, + args.explicitSigners, + args.implicitSigners, ), ) }, ) + .command( + 'image-hash [session-configuration]', + 'Hash a session configuration', + (yargs) => { + return yargs.positional('session-configuration', { + type: 'string', + description: 'The session configuration', + demandOption: true, + }) + }, + async (args) => { + console.log(await doImageHash(args.sessionConfiguration)) + }, + ) .command(sessionExplicitCommand) .command(sessionImplicitCommand) .demandCommand(1, 'You must specify a subcommand for session') diff --git a/packages/primitives-cli/src/subcommands/sessionExplicit.ts b/packages/primitives-cli/src/subcommands/sessionExplicit.ts index 35493ffbf..a44011d77 100644 --- a/packages/primitives-cli/src/subcommands/sessionExplicit.ts +++ b/packages/primitives-cli/src/subcommands/sessionExplicit.ts @@ -1,4 +1,5 @@ import { + balanceSessionsTopology, encodeExplicitSessionCallSignature, isSessionsTopology, mergeSessionsTopologies, @@ -12,14 +13,16 @@ import { fromPosOrStdin, parseRSV } from '../utils' export async function doAddSession(sessionInput: string, topologyInput: string): Promise { const session = sessionsTopologyFromJson(sessionInput) - const topology = sessionsTopologyFromJson(topologyInput) + let topology = sessionsTopologyFromJson(topologyInput) if (!isSessionsTopology(session)) { throw new Error('Explicit session must be a valid session topology') } if (!isSessionsTopology(topology)) { throw new Error('Session topology must be a valid session topology') } - return sessionsTopologyToJson(mergeSessionsTopologies(session, topology)) + topology = mergeSessionsTopologies(session, topology) + topology = balanceSessionsTopology(topology) + return sessionsTopologyToJson(topology) } export async function doRemoveSession(explicitSessionAddress: string, topologyInput: string): Promise { diff --git a/packages/primitives/src/config.ts b/packages/primitives/src/config.ts new file mode 100644 index 000000000..575f90153 --- /dev/null +++ b/packages/primitives/src/config.ts @@ -0,0 +1,43 @@ +import { Bytes, Hash, Hex } from 'ox' + +// An encoded configuration tree is a generic configuration tree that has been encoded into a bytes sequence. +// It can be used to represent a configuration tree in a compact form. +// Implementations are free to use any encoding they want, as long as the encoding is consistent and can be decoded. + +export type EncodedConfigurationLeaf = Bytes.Bytes +export type EncodedConfigurationBranch = [ + EncodedConfigurationTree, + EncodedConfigurationTree, + ...EncodedConfigurationTree[], +] +export type EncodedConfigurationTree = EncodedConfigurationBranch | EncodedConfigurationLeaf + +export function isEncodedConfigurationBranch(tree: EncodedConfigurationTree): tree is EncodedConfigurationBranch { + return Array.isArray(tree) && tree.length >= 2 && tree.every((child) => isEncodedConfigurationTree(child)) +} + +export function isEncodedConfigurationLeaf(tree: EncodedConfigurationTree): tree is EncodedConfigurationLeaf { + return Bytes.validate(tree) +} + +export function isEncodedConfigurationTree(tree: EncodedConfigurationTree): tree is EncodedConfigurationTree { + return isEncodedConfigurationBranch(tree) || isEncodedConfigurationLeaf(tree) +} + +export function hashConfigurationTree(tree: EncodedConfigurationTree): Bytes.Bytes { + if (isEncodedConfigurationBranch(tree)) { + // Sequentially hash the children + const hashedChildren = tree.map(hashConfigurationTree) + if (hashedChildren.length === 0) { + throw new Error('Empty branch') + } + let hash = hashedChildren[0]! + for (let i = 1; i < hashedChildren.length; i++) { + hash = Hash.keccak256(Bytes.concat(hash, hashedChildren[i]!)) + } + return hash + } + + // Hash the leaf + return Hash.keccak256(tree) +} diff --git a/packages/primitives/src/index.ts b/packages/primitives/src/index.ts index 893e004a9..f23065045 100644 --- a/packages/primitives/src/index.ts +++ b/packages/primitives/src/index.ts @@ -1,6 +1,6 @@ export * from './address' export * from './attestation' -export * from './wallet-config' +export * from './config' export * from './constants' export * from './erc-6492' export * from './payload' @@ -9,3 +9,4 @@ export * from './session-config' export * from './session-signature' export * from './signature' export * from './utils' +export * from './wallet-config' diff --git a/packages/primitives/src/session-config.ts b/packages/primitives/src/session-config.ts index c092503d4..62de45855 100644 --- a/packages/primitives/src/session-config.ts +++ b/packages/primitives/src/session-config.ts @@ -1,4 +1,5 @@ -import { Bytes, Address } from 'ox' +import { Address, Bytes, Hash } from 'ox' +import { EncodedConfigurationBranch, EncodedConfigurationTree, isEncodedConfigurationBranch } from './config' import { encodeSessionPermissions, encodeSessionPermissionsForJson, @@ -7,9 +8,12 @@ import { } from './permission' import { minBytesFor } from './utils' +//FIXME Reorder by expected usage export const SESSIONS_FLAG_PERMISSIONS = 0 export const SESSIONS_FLAG_NODE = 1 export const SESSIONS_FLAG_BRANCH = 2 +export const SESSIONS_FLAG_BLACKLIST = 3 +export const SESSIONS_FLAG_GLOBAL_SIGNER = 4 export type ImplicitBlacklist = { blacklist: Address.Address[] @@ -52,20 +56,49 @@ export function isSessionsTopology(topology: any): topology is SessionsTopology return isSessionsBranch(topology) || isSessionsLeaf(topology) || isSessionsNode(topology) } -export function isValidSessionsTopology(topology: any): topology is SessionsTopology { - // A valid topology has exactly one global signer leaf and blacklist leaf - let hasGlobal - let hasBlacklist - //FIXME This no work - if (isSessionsBranch(topology)) { +/** + * Checks if the topology is complete. + * A complete topology has exactly one global signer and one blacklist. + * @param topology The topology to check + * @returns True if the topology is complete + */ +export function isCompleteSessionsTopology(topology: any): topology is SessionsTopology { + // Ensure the object is a sessions topology + if (!isSessionsTopology(topology)) { return false } - if (isSessionsLeaf(topology)) { - return false + // Check the topology contains exactly one global signer and one blacklist + const { globalSignerCount, blacklistCount } = checkIsCompleteSessionsBranch(topology) + return globalSignerCount === 1 && blacklistCount === 1 +} + +function checkIsCompleteSessionsBranch(topology: SessionsTopology): { + globalSignerCount: number + blacklistCount: number +} { + let thisHasGlobalSigner = 0 + let thisHasBlacklist = 0 + if (isSessionsBranch(topology)) { + for (const child of topology) { + const { globalSignerCount, blacklistCount } = checkIsCompleteSessionsBranch(child) + thisHasGlobalSigner += globalSignerCount + thisHasBlacklist += blacklistCount + } + } + if (isGlobalSignerLeaf(topology)) { + thisHasGlobalSigner++ } - return isSessionsNode(topology) + if (isImplicitBlacklist(topology)) { + thisHasBlacklist++ + } + return { globalSignerCount: thisHasGlobalSigner, blacklistCount: thisHasBlacklist } } +/** + * Gets the global signer from the topology. + * @param topolgy The topology to get the global signer from + * @returns The global signer or null if it's not present + */ export function getGlobalSigner(topolgy: SessionsTopology): Address.Address | null { if (isGlobalSignerLeaf(topolgy)) { // Got it @@ -86,15 +119,25 @@ export function getGlobalSigner(topolgy: SessionsTopology): Address.Address | nu return null } +/** + * Gets the implicit blacklist from the topology. + * @param topolgy The topology to get the implicit blacklist from + * @returns The implicit blacklist or null if it's not present + */ export function getImplicitBlacklist(topolgy: SessionsTopology): Address.Address[] | null { - const blacklistNode = getImplicitBlacklistNode(topolgy) + const blacklistNode = getImplicitBlacklistLeaf(topolgy) if (!blacklistNode) { return null } return blacklistNode.blacklist } -export function getImplicitBlacklistNode(topolgy: SessionsTopology): ImplicitBlacklist | null { +/** + * Gets the implicit blacklist leaf from the topology. + * @param topolgy The topology to get the implicit blacklist leaf from + * @returns The implicit blacklist leaf or null if it's not present + */ +export function getImplicitBlacklistLeaf(topolgy: SessionsTopology): ImplicitBlacklist | null { if (isImplicitBlacklist(topolgy)) { // Got it return topolgy @@ -102,7 +145,7 @@ export function getImplicitBlacklistNode(topolgy: SessionsTopology): ImplicitBla if (isSessionsBranch(topolgy)) { // Check branches - const results = topolgy.map(getImplicitBlacklistNode).filter((t) => t !== null) + const results = topolgy.map(getImplicitBlacklistLeaf).filter((t) => t !== null) if (results.length > 1) { throw new Error('Multiple blacklists') } @@ -114,14 +157,92 @@ export function getImplicitBlacklistNode(topolgy: SessionsTopology): ImplicitBla return null } -// Encoding +// Encode / decode to configuration tree + +/** + * Encodes a leaf to bytes. + * This can be Hash.keccak256'd to convert to a node.. + * @param leaf The leaf to encode + * @returns The encoded leaf + */ +export function encodeLeafToBytes(leaf: SessionLeaf): Bytes.Bytes { + if (isSessionPermissions(leaf)) { + return Bytes.concat(Bytes.fromNumber(SESSIONS_FLAG_PERMISSIONS), encodeSessionPermissions(leaf)) + } + if (isImplicitBlacklist(leaf)) { + return Bytes.concat( + Bytes.fromNumber(SESSIONS_FLAG_BLACKLIST), + Bytes.concat(...leaf.blacklist.map((b) => Bytes.padLeft(Bytes.fromHex(b), 20))), + ) + } + if (isGlobalSignerLeaf(leaf)) { + return Bytes.concat( + Bytes.fromNumber(SESSIONS_FLAG_GLOBAL_SIGNER), + Bytes.padLeft(Bytes.fromHex(leaf.globalSigner), 20), + ) + } + // Unreachable + throw new Error('Invalid leaf') +} + +export function decodeLeafFromBytes(bytes: Bytes.Bytes): SessionLeaf { + const flag = bytes[0]! + if (flag === SESSIONS_FLAG_BLACKLIST) { + const blacklist: `0x${string}`[] = [] + for (let i = 1; i < bytes.length; i += 20) { + blacklist.push(Bytes.toHex(bytes.slice(i, i + 20))) + } + return { blacklist } + } + if (flag === SESSIONS_FLAG_GLOBAL_SIGNER) { + return { globalSigner: Bytes.toHex(bytes.slice(1, 21)) } + } + if (flag === SESSIONS_FLAG_PERMISSIONS) { + return sessionPermissionsFromParsed(bytes.slice(1)) + } + throw new Error('Invalid leaf') +} -// Encodes only the permissions within a topology -export function encodeSessionsPermissionsTopology(topolgy: SessionsTopology): Bytes.Bytes { +export function sessionsTopologyToConfigurationTree(topology: SessionsTopology): EncodedConfigurationTree { + if (isSessionsBranch(topology)) { + return topology.map(sessionsTopologyToConfigurationTree) as EncodedConfigurationBranch + } + if (isImplicitBlacklist(topology) || isGlobalSignerLeaf(topology) || isSessionPermissions(topology)) { + return encodeLeafToBytes(topology) + } + if (isSessionsNode(topology)) { + // A node is already encoded and hashed + return topology + } + throw new Error('Invalid topology') +} + +export function configurationTreeToSessionsTopology(tree: EncodedConfigurationTree): SessionsTopology { + if (isEncodedConfigurationBranch(tree)) { + return tree.map(configurationTreeToSessionsTopology) as SessionBranch + } + + try { + return decodeLeafFromBytes(tree) + } catch (error) { + // If we can't decode it, it's a node. + // This is _probably_ a bug as decoding a node in a configuration tree leads to incomplete topologies. + return tree as SessionNode + } +} + +// Encoding for contract validation + +/** + * Encodes a topology into bytes for contract validation. + * @param topolgy The topology to encode + * @returns The encoded topology + */ +export function encodeSessionsTopology(topolgy: SessionsTopology): Bytes.Bytes { if (isSessionsBranch(topolgy)) { const encodedBranches = [] for (const node of topolgy) { - encodedBranches.push(encodeSessionsPermissionsTopology(node)) + encodedBranches.push(encodeSessionsTopology(node)) } const encoded = Bytes.concat(...encodedBranches) const encodedSize = minBytesFor(BigInt(encoded.length)) @@ -147,9 +268,25 @@ export function encodeSessionsPermissionsTopology(topolgy: SessionsTopology): By return Bytes.concat(Bytes.fromNumber(flagByte), topolgy) } - if (isImplicitBlacklist(topolgy) || isGlobalSignerLeaf(topolgy)) { - // Return empty bytes - return new Uint8Array() + if (isImplicitBlacklist(topolgy)) { + const encoded = Bytes.concat(...topolgy.blacklist.map((b) => Bytes.fromHex(b))) + if (topolgy.blacklist.length > 14) { + // If the blacklist is too large, we can't encode the length into the flag byte. + // Instead we encode 0xff and the length in the next byte. + return Bytes.concat( + Bytes.fromNumber((SESSIONS_FLAG_BLACKLIST << 4) | 0xff), + Bytes.fromNumber(topolgy.blacklist.length), + encoded, + ) + } + // Encode the size into the flag byte + const flagByte = (SESSIONS_FLAG_BLACKLIST << 4) | topolgy.blacklist.length + return Bytes.concat(Bytes.fromNumber(flagByte), encoded) + } + + if (isGlobalSignerLeaf(topolgy)) { + const flagByte = SESSIONS_FLAG_GLOBAL_SIGNER << 4 + return Bytes.concat(Bytes.fromNumber(flagByte), Bytes.padLeft(Bytes.fromHex(topolgy.globalSigner), 20)) } throw new Error('Invalid topology') @@ -322,10 +459,17 @@ function buildBalancedSessionsTopology(items: (SessionLeaf | SessionNode)[]): Se /** * Balances the topology by flattening and rebuilding as a balanced binary tree. + * This does not make a binary tree as the blacklist and global signer are included at the top level. */ export function balanceSessionsTopology(topology: SessionsTopology): SessionsTopology { const flattened = flattenSessionsTopology(topology) - return buildBalancedSessionsTopology(flattened) + const blacklist = flattened.find((l) => isImplicitBlacklist(l)) + const globalSigner = flattened.find((l) => isGlobalSignerLeaf(l)) + const leaves = flattened.filter((l) => isSessionPermissions(l)) + if (!blacklist || !globalSigner) { + throw new Error('No blacklist or global signer') + } + return buildBalancedSessionsTopology([blacklist, globalSigner, ...leaves]) } /** @@ -380,12 +524,58 @@ export function cleanSessionsTopology( return newChildren as SessionBranch } +/** + * Minimise the topology by rolling unused signers into nodes. + * @param topology The topology to minimise + * @param signers The list of signers to consider + * @returns The minimised topology + */ +export function minimiseSessionsTopology( + topology: SessionsTopology, + explicitSigners: Address.Address[] = [], + implicitSigners: Address.Address[] = [], +): SessionsTopology { + if (isSessionsBranch(topology)) { + const branches = topology.map((b) => minimiseSessionsTopology(b, explicitSigners, implicitSigners)) + // If all branches are nodes, the branch can be a node too + if (branches.every((b) => isSessionsNode(b))) { + return Hash.keccak256(Bytes.concat(...branches)) + } + return branches as SessionBranch + } + if (isSessionPermissions(topology)) { + if (explicitSigners.includes(topology.signer)) { + // Don't role it up as signer permissions must be visible + return topology + } + return Hash.keccak256(encodeLeafToBytes(topology)) + } + if (isImplicitBlacklist(topology)) { + if (implicitSigners.length === 0) { + // No implicit signers, so we can roll up the blacklist + return Hash.keccak256(encodeLeafToBytes(topology)) + } + // If there are implicit signers, we can't roll up the blacklist + return topology + } + if (isGlobalSignerLeaf(topology)) { + // Never roll up the global signer + return topology + } + if (isSessionsNode(topology)) { + // Node is already encoded and hashed + return topology + } + // Unreachable + throw new Error('Invalid topology') +} + /** * Adds an address to the implicit session's blacklist. * If the address is not already in the blacklist, it is added and the list is sorted. */ export function addToImplicitBlacklist(topology: SessionsTopology, address: Address.Address): SessionsTopology { - const blacklistNode = getImplicitBlacklistNode(topology) + const blacklistNode = getImplicitBlacklistLeaf(topology) if (!blacklistNode) { throw new Error('No blacklist found') } @@ -402,7 +592,7 @@ export function addToImplicitBlacklist(topology: SessionsTopology, address: Addr * Removes an address from the implicit session's blacklist. */ export function removeFromImplicitBlacklist(topology: SessionsTopology, address: Address.Address): SessionsTopology { - const blacklistNode = getImplicitBlacklistNode(topology) + const blacklistNode = getImplicitBlacklistLeaf(topology) if (!blacklistNode) { throw new Error('No blacklist found') } diff --git a/packages/primitives/src/session-signature.ts b/packages/primitives/src/session-signature.ts index 37ca63a4f..21de6a85b 100644 --- a/packages/primitives/src/session-signature.ts +++ b/packages/primitives/src/session-signature.ts @@ -1,18 +1,16 @@ -import { Bytes } from 'ox' +import { Address, Bytes } from 'ox' import { Attestation, encodeAttestation } from './attestation' import { MAX_PERMISSIONS_COUNT } from './permission' import { - encodeSessionsPermissionsTopology, - getGlobalSigner, - getImplicitBlacklist, + encodeSessionsTopology, + minimiseSessionsTopology, SessionsTopology, + isCompleteSessionsTopology, } from './session-config' import { minBytesFor, packRSV } from './utils' -export type ExplicitSessionSignature = { - sessionsTopology: SessionsTopology - permissionIdxPerCall: number[] -} +//FIXME Combine the attestation and global signature across multiple calls within a payload. +// This requires passing around the un-encoded call signatures and encoding them all at once. export function encodeImplicitSessionCallSignature( attestation: Attestation, @@ -47,33 +45,27 @@ export function encodeExplicitSessionCallSignature( export function encodeSessionCallSignatures( callSignatures: Bytes.Bytes[], - topolgy: SessionsTopology, - includesImplicitSignature = false, // Implicit can optimise away including global signer + topology: SessionsTopology, + explicitSigners: Address.Address[] = [], + implicitSigners: Address.Address[] = [], ): Bytes.Bytes { - const parts: Bytes.Bytes[] = [Bytes.fromBoolean(includesImplicitSignature)] + const parts: Bytes.Bytes[] = [] - if (!includesImplicitSignature) { - // Add the global signer - const globalSigner = getGlobalSigner(topolgy) - if (!globalSigner) { - throw new Error('No global signer') - } - parts.push(Bytes.fromHex(globalSigner)) + // Validate the topology + if (!isCompleteSessionsTopology(topology)) { + // Refuse to encode incomplete topologies + throw new Error('Incomplete topology') } - // Explicit session topology - let encodedExplicitSessionTopology = encodeSessionsPermissionsTopology(topolgy) - if (minBytesFor(BigInt(encodedExplicitSessionTopology.length)) > 3) { - throw new Error('Explicit session topology is too large') - } - parts.push(Bytes.fromNumber(encodedExplicitSessionTopology.length, { size: 3 }), encodedExplicitSessionTopology) + // Optimise the configuration tree by rolling unused signers into nodes. + topology = minimiseSessionsTopology(topology, explicitSigners, implicitSigners) - // Add the blacklist - const blacklist = getImplicitBlacklist(topolgy) - if (!blacklist) { - throw new Error('No blacklist') + // Session topology + const encodedTopology = encodeSessionsTopology(topology) + if (minBytesFor(BigInt(encodedTopology.length)) > 3) { + throw new Error('Session topology is too large') } - parts.push(Bytes.fromNumber(blacklist.length, { size: 1 }), Bytes.concat(...blacklist.map((b) => Bytes.fromHex(b)))) + parts.push(Bytes.fromNumber(encodedTopology.length, { size: 3 }), encodedTopology) // Call signature parts for (const callSignature of callSignatures) { From b4d2c4c34969ae8a75f5da423496b1f90929c9df Mon Sep 17 00:00:00 2001 From: Michael Standen Date: Wed, 19 Feb 2025 13:19:45 +1300 Subject: [PATCH 127/439] Prevent duplicate explicit sessions --- .../src/subcommands/sessionExplicit.ts | 10 +++++++++- packages/primitives/src/session-config.ts | 17 +++++++++++++++++ 2 files changed, 26 insertions(+), 1 deletion(-) diff --git a/packages/primitives-cli/src/subcommands/sessionExplicit.ts b/packages/primitives-cli/src/subcommands/sessionExplicit.ts index a44011d77..8d2b02ded 100644 --- a/packages/primitives-cli/src/subcommands/sessionExplicit.ts +++ b/packages/primitives-cli/src/subcommands/sessionExplicit.ts @@ -1,9 +1,11 @@ import { balanceSessionsTopology, encodeExplicitSessionCallSignature, + getSessionPermissions, isSessionsTopology, mergeSessionsTopologies, removeExplicitSession, + sessionPermissionsFromJson, sessionsTopologyFromJson, sessionsTopologyToJson, } from '@0xsequence/sequence-primitives' @@ -12,7 +14,7 @@ import type { CommandModule } from 'yargs' import { fromPosOrStdin, parseRSV } from '../utils' export async function doAddSession(sessionInput: string, topologyInput: string): Promise { - const session = sessionsTopologyFromJson(sessionInput) + const session = sessionPermissionsFromJson(sessionInput) let topology = sessionsTopologyFromJson(topologyInput) if (!isSessionsTopology(session)) { throw new Error('Explicit session must be a valid session topology') @@ -20,6 +22,12 @@ export async function doAddSession(sessionInput: string, topologyInput: string): if (!isSessionsTopology(topology)) { throw new Error('Session topology must be a valid session topology') } + // Find the session in the topology + const sessionPermissions = getSessionPermissions(topology, session.signer) + if (sessionPermissions) { + throw new Error('Session already exists') + } + // Merge the session into the topology topology = mergeSessionsTopologies(session, topology) topology = balanceSessionsTopology(topology) return sessionsTopologyToJson(topology) diff --git a/packages/primitives/src/session-config.ts b/packages/primitives/src/session-config.ts index 62de45855..990b1a34a 100644 --- a/packages/primitives/src/session-config.ts +++ b/packages/primitives/src/session-config.ts @@ -157,6 +157,23 @@ export function getImplicitBlacklistLeaf(topolgy: SessionsTopology): ImplicitBla return null } +export function getSessionPermissions(topology: SessionsTopology, address: Address.Address): SessionPermissions | null { + if (isSessionPermissions(topology)) { + if (topology.signer === address) { + return topology + } + } + if (isSessionsBranch(topology)) { + for (const child of topology) { + const result = getSessionPermissions(child, address) + if (result) { + return result + } + } + } + return null +} + // Encode / decode to configuration tree /** From 405b18c4fd34d0f67ecea01942ff9fcc0414ae4a Mon Sep 17 00:00:00 2001 From: Michael Standen Date: Wed, 19 Feb 2025 13:35:09 +1300 Subject: [PATCH 128/439] More session endpoints in CLI --- .../primitives-cli/src/subcommands/server.ts | 5 +++++ .../primitives-cli/src/subcommands/session.ts | 20 +++++++++++++++++++ .../src/subcommands/sessionExplicit.ts | 2 +- .../src/subcommands/sessionImplicit.ts | 2 +- 4 files changed, 27 insertions(+), 2 deletions(-) diff --git a/packages/primitives-cli/src/subcommands/server.ts b/packages/primitives-cli/src/subcommands/server.ts index e9494072b..55896d4cd 100644 --- a/packages/primitives-cli/src/subcommands/server.ts +++ b/packages/primitives-cli/src/subcommands/server.ts @@ -135,6 +135,11 @@ const rpcMethods: Record Promise> = { const result = await session.doEmptyTopology(globalSigner) return result }, + async session_encodeConfiguration(params) { + const { sessionTopology } = params + const result = await session.doEncodeConfiguration(JSON.stringify(sessionTopology)) + return result + }, async session_encodeCallSignatures(params) { const { sessionTopology, callSignatures, explicitSigners, implicitSigners } = params const result = await session.doEncodeSessionCallSignatures( diff --git a/packages/primitives-cli/src/subcommands/session.ts b/packages/primitives-cli/src/subcommands/session.ts index 9f1128f8b..b2ee7f045 100644 --- a/packages/primitives-cli/src/subcommands/session.ts +++ b/packages/primitives-cli/src/subcommands/session.ts @@ -16,6 +16,12 @@ export async function doEmptyTopology(globalSigner: `0x${string}`): Promise { + const sessionConfiguration = sessionsTopologyFromJson(sessionConfigurationInput) + const configurationTree = sessionsTopologyToConfigurationTree(sessionConfiguration) + return JSON.stringify(configurationTree) +} + export async function doEncodeSessionCallSignatures( sessionConfigurationInput: string, callSignaturesInput: string[], @@ -60,6 +66,20 @@ const sessionCommand: CommandModule = { console.log(await doEmptyTopology(args.globalSigner as `0x${string}`)) }, ) + .command( + 'encode-configuration [session-configuration]', + 'Encode a session configuration', + (yargs) => { + return yargs.positional('session-configuration', { + type: 'string', + description: 'The session configuration', + demandOption: true, + }) + }, + async (args) => { + console.log(await doEncodeConfiguration(args.sessionConfiguration)) + }, + ) .command( 'encode-calls [session-configuration] [call-signatures] [explicit-signers] [implicit-signers]', 'Encode a call signature for an implicit session', diff --git a/packages/primitives-cli/src/subcommands/sessionExplicit.ts b/packages/primitives-cli/src/subcommands/sessionExplicit.ts index 8d2b02ded..57851a0f9 100644 --- a/packages/primitives-cli/src/subcommands/sessionExplicit.ts +++ b/packages/primitives-cli/src/subcommands/sessionExplicit.ts @@ -114,7 +114,7 @@ const sessionExplicitCommand: CommandModule = { }, ) .command( - 'encode-call-signature [permission-index] [signature]', + 'encode-call [permission-index] [signature]', 'Encode a signature with the given permission index', (yargs) => { return yargs diff --git a/packages/primitives-cli/src/subcommands/sessionImplicit.ts b/packages/primitives-cli/src/subcommands/sessionImplicit.ts index 02c7a714f..5ba2cd7bc 100644 --- a/packages/primitives-cli/src/subcommands/sessionImplicit.ts +++ b/packages/primitives-cli/src/subcommands/sessionImplicit.ts @@ -92,7 +92,7 @@ const sessionImplicitCommand: CommandModule = { }, ) .command( - 'encode-call-signature [attestation] [global-signature] [session-signature]', + 'encode-call [attestation] [global-signature] [session-signature]', 'Encode an implicit session signature', (yargs) => { return yargs From 5414320888af457106da77559ee94c2ec8e7dbef Mon Sep 17 00:00:00 2001 From: Agusx1211 Date: Wed, 19 Feb 2025 19:23:43 +0000 Subject: [PATCH 129/439] Add support for any-address-subdigest --- packages/core/src/state/memory.ts | 3 ++ packages/primitives/src/signature.ts | 54 +++++++++++++++++++++--- packages/primitives/src/wallet-config.ts | 38 ++++++++++++++++- 3 files changed, 86 insertions(+), 9 deletions(-) diff --git a/packages/core/src/state/memory.ts b/packages/core/src/state/memory.ts index e4c4132e8..1574badf5 100644 --- a/packages/core/src/state/memory.ts +++ b/packages/core/src/state/memory.ts @@ -5,6 +5,7 @@ import { getCounterfactualAddress, hash, hashConfiguration, + isAnyAddressSubdigestLeaf, isNodeLeaf, isRawNestedLeaf, isRawSignerLeaf, @@ -219,6 +220,8 @@ export class MemoryStateProvider implements StateProvider { return } else if (isSubdigestLeaf(topology)) { return + } else if (isAnyAddressSubdigestLeaf(topology)) { + return } else if (isNodeLeaf(topology)) { return } else if (isRawSignerLeaf(topology)) { diff --git a/packages/primitives/src/signature.ts b/packages/primitives/src/signature.ts index ec45ac5c3..b9fb312e9 100644 --- a/packages/primitives/src/signature.ts +++ b/packages/primitives/src/signature.ts @@ -6,6 +6,7 @@ import { SapientSignerLeaf, SignerLeaf, SubdigestLeaf, + AnyAddressSubdigestLeaf, Topology, hashConfiguration, isNestedLeaf, @@ -14,6 +15,7 @@ import { isSapientSignerLeaf, isSignerLeaf, isSubdigestLeaf, + isAnyAddressSubdigestLeaf, isTopology, } from './wallet-config' import { IS_VALID_SAPIENT_SIGNATURE, IS_VALID_SAPIENT_SIGNATURE_COMPACT, IS_VALID_SIGNATURE } from './constants' @@ -29,7 +31,7 @@ export const FLAG_BRANCH = 4 export const FLAG_SUBDIGEST = 5 export const FLAG_NESTED = 6 export const FLAG_SIGNATURE_ETH_SIGN = 7 -export const FLAG_SIGNATURE_EIP712 = 8 +export const FLAG_SIGNATURE_ANY_ADDRESS_SUBDIGEST = 8 export const FLAG_SIGNATURE_SAPIENT = 9 export const FLAG_SIGNATURE_SAPIENT_COMPACT = 10 @@ -498,7 +500,20 @@ export function parseBranch(signature: Bytes.Bytes): { continue } - // FLAG_SIGNATURE_SAPIENT = 9 or FLAG_SIGNATURE_SAPIENT_COMPACT = 10 => bottom 2 bits => weight, next 2 bits => sizeSize + // FLAG_SIGNATURE_ANY_ADDRESS_SUBDIGEST = 8 => read 32 bytes => push any address subdigest leaf + if (flag === FLAG_SIGNATURE_ANY_ADDRESS_SUBDIGEST) { + if (index + 32 > signature.length) { + throw new Error('Not enough bytes for any address subdigest') + } + const anyAddressSubdigest = signature.slice(index, index + 32) + index += 32 + nodes.push({ + type: 'any-address-subdigest', + digest: anyAddressSubdigest, + } as AnyAddressSubdigestLeaf) + continue + } + if (flag === FLAG_SIGNATURE_SAPIENT || flag === FLAG_SIGNATURE_SAPIENT_COMPACT) { let addrWeight = firstByte & 0x03 if (addrWeight === 0) { @@ -575,6 +590,10 @@ export function fillLeaves( return topology } + if (isAnyAddressSubdigestLeaf(topology)) { + return topology + } + if (isNestedLeaf(topology)) { return { ...topology, tree: fillLeaves(topology.tree, signatureFor) } as NestedLeaf } @@ -823,10 +842,6 @@ export function encodeTopology( } } - if (isSubdigestLeaf(topology)) { - return Bytes.concat(Bytes.fromNumber(FLAG_SUBDIGEST << 4), topology.digest) - } - if (isSignerLeaf(topology)) { let flag = FLAG_ADDRESS << 4 let weightBytes = Bytes.fromArray([]) @@ -847,6 +862,14 @@ export function encodeTopology( return Bytes.concat(Bytes.fromNumber(FLAG_NODE << 4), hash) } + if (isSubdigestLeaf(topology)) { + return Bytes.concat(Bytes.fromNumber(FLAG_SUBDIGEST << 4), topology.digest) + } + + if (isAnyAddressSubdigestLeaf(topology)) { + return Bytes.concat(Bytes.fromNumber(FLAG_SIGNATURE_ANY_ADDRESS_SUBDIGEST << 4), topology.digest) + } + throw new Error('Invalid topology') } @@ -909,6 +932,11 @@ function rawTopologyToJson(top: RawTopology): any { type: 'subdigest', digest: Bytes.toHex(top.digest), } + case 'any-address-subdigest': + return { + type: 'any-address-subdigest', + digest: Bytes.toHex(top.digest), + } case 'nested': return { type: 'nested', @@ -962,7 +990,6 @@ function rawSignatureOfLeafToJson(sig: SignatureOfSignerLeaf | SignatureOfSapien throw new Error('Unknown signature type in raw signature') } -// Re-create a RawSignature from its JSON string representation. export function rawSignatureFromJson(json: string): RawSignature { const parsed = JSON.parse(json) return rawSignatureFromParsed(parsed) @@ -1010,6 +1037,11 @@ function rawTopologyFromJson(obj: any): RawTopology { type: 'subdigest', digest: Bytes.fromHex(obj.digest), } + case 'any-address-subdigest': + return { + type: 'any-address-subdigest', + digest: Bytes.fromHex(obj.digest), + } case 'nested': return { type: 'nested', @@ -1279,6 +1311,14 @@ async function recoverTopology( ? 0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffn : 0n, } + } else if (isAnyAddressSubdigestLeaf(topology)) { + const anyAddressOpHash = hash('0x0000000000000000000000000000000000000000', chainId, payload) + return { + topology, + weight: Bytes.isEqual(topology.digest, anyAddressOpHash) + ? 0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffn + : 0n, + } } else if (isNodeLeaf(topology)) { return { topology, weight: 0n } } else { diff --git a/packages/primitives/src/wallet-config.ts b/packages/primitives/src/wallet-config.ts index 91e6e9460..fc579f8cb 100644 --- a/packages/primitives/src/wallet-config.ts +++ b/packages/primitives/src/wallet-config.ts @@ -33,6 +33,11 @@ export type SubdigestLeaf = { digest: Bytes.Bytes } +export type AnyAddressSubdigestLeaf = { + type: 'any-address-subdigest' + digest: Bytes.Bytes +} + export type NestedLeaf = { type: 'nested' tree: Topology @@ -44,7 +49,7 @@ export type NodeLeaf = Bytes.Bytes export type Node = [Topology, Topology] -export type Leaf = SignerLeaf | SapientSignerLeaf | SubdigestLeaf | NestedLeaf | NodeLeaf +export type Leaf = SignerLeaf | SapientSignerLeaf | SubdigestLeaf | AnyAddressSubdigestLeaf | NestedLeaf | NodeLeaf export type Topology = Node | Leaf @@ -67,6 +72,10 @@ export function isSubdigestLeaf(cand: any): cand is SubdigestLeaf { return typeof cand === 'object' && cand !== null && cand.type === 'subdigest' } +export function isAnyAddressSubdigestLeaf(cand: any): cand is AnyAddressSubdigestLeaf { + return typeof cand === 'object' && cand !== null && cand.type === 'any-address-subdigest' +} + export function isNodeLeaf(cand: any): cand is NodeLeaf { return cand instanceof Uint8Array && cand.length === 32 } @@ -85,7 +94,12 @@ export function isConfiguration(cand: any): cand is Configuration { export function isLeaf(cand: Topology): cand is Leaf { return ( - isSignerLeaf(cand) || isSapientSignerLeaf(cand) || isSubdigestLeaf(cand) || isNodeLeaf(cand) || isNestedLeaf(cand) + isSignerLeaf(cand) || + isSapientSignerLeaf(cand) || + isSubdigestLeaf(cand) || + isAnyAddressSubdigestLeaf(cand) || + isNodeLeaf(cand) || + isNestedLeaf(cand) ) } @@ -140,6 +154,8 @@ export function getWeight( return { weight: topology.weight, maxWeight: canSign(topology) ? topology.weight : 0n } } else if (isSubdigestLeaf(topology)) { return { weight: 0n, maxWeight: 0n } + } else if (isAnyAddressSubdigestLeaf(topology)) { + return { weight: 0n, maxWeight: 0n } } else if (isRawNestedLeaf(topology)) { const { weight, maxWeight } = getWeight(topology.tree) return { @@ -193,6 +209,10 @@ export function hashConfiguration(topology: Topology | Configuration): Bytes.Byt return Hash.keccak256(Bytes.concat(Bytes.fromString('Sequence static digest:\n'), topology.digest)) } + if (isAnyAddressSubdigestLeaf(topology)) { + return Hash.keccak256(Bytes.concat(Bytes.fromString('Sequence any address subdigest:\n'), topology.digest)) + } + if (isNodeLeaf(topology)) { return topology } @@ -274,6 +294,11 @@ function encodeTopology(top: Topology): any { type: 'subdigest', digest: Bytes.toHex(top.digest), } + } else if (isAnyAddressSubdigestLeaf(top)) { + return { + type: 'any-address-subdigest', + digest: Bytes.toHex(top.digest), + } } else if (isNodeLeaf(top)) { return Bytes.toHex(top) } else if (isNestedLeaf(top)) { @@ -319,6 +344,11 @@ function decodeTopology(obj: any): Topology { type: 'subdigest', digest: Bytes.fromHex(obj.digest), } + case 'any-address-subdigest': + return { + type: 'any-address-subdigest', + digest: Bytes.fromHex(obj.digest), + } case 'nested': return { type: 'nested', @@ -350,6 +380,8 @@ export function sign( return { ...topology } } else if (isSubdigestLeaf(topology)) { return topology + } else if (isAnyAddressSubdigestLeaf(topology)) { + return topology } else if (isNodeLeaf(topology)) { return topology } else if (isRawSignerLeaf(topology)) { @@ -498,6 +530,8 @@ export function sign( signature.then(onSignerSignature(topology)).catch(onSignerError(topology)) } else if (isSubdigestLeaf(topology)) { return + } else if (isAnyAddressSubdigestLeaf(topology)) { + return } else if (isNodeLeaf(topology)) { return } else if (isRawSignerLeaf(topology)) { From f24e3082d2ddbe04bd456bd59ab6af515469010f Mon Sep 17 00:00:00 2001 From: Agusx1211 Date: Thu, 20 Feb 2025 17:48:18 +0000 Subject: [PATCH 130/439] Add any-address-subdigest to CLI --- packages/primitives-cli/src/subcommands/config.ts | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/packages/primitives-cli/src/subcommands/config.ts b/packages/primitives-cli/src/subcommands/config.ts index ab7a6ff3f..ecda97f09 100644 --- a/packages/primitives-cli/src/subcommands/config.ts +++ b/packages/primitives-cli/src/subcommands/config.ts @@ -37,6 +37,11 @@ export const PossibleElements = [ format: 'node:', description: 'A node leaf', }, + { + type: 'any-address-subdigest', + format: 'any-address-subdigest:', + description: 'An any address subdigest leaf', + }, ] function parseElements(elements: string): Leaf[] { @@ -62,6 +67,13 @@ function parseElements(elements: string): Leaf[] { digest: Bytes.fromHex(digest as `0x${string}`), }) remainingElements = remainingElements.slice(firstElement!.length + 1) + } else if (firstElementType === 'any-address-subdigest') { + const [_, digest] = firstElement!.split(':') + leaves.push({ + type: 'any-address-subdigest', + digest: Bytes.fromHex(digest as `0x${string}`), + }) + remainingElements = remainingElements.slice(firstElement!.length + 1) } else if (firstElementType === 'sapient') { const [_, imageHash, address, weight] = firstElement!.split(':') leaves.push({ From 3b79feb9c52837075f051a9a253bbdce28a9ea48 Mon Sep 17 00:00:00 2001 From: Michael Standen Date: Fri, 21 Feb 2025 12:51:10 +1300 Subject: [PATCH 131/439] Optimise session signature encoding for repeated attestations --- .../primitives-cli/src/subcommands/server.ts | 16 +- .../primitives-cli/src/subcommands/session.ts | 3 +- .../src/subcommands/sessionExplicit.ts | 45 +---- .../src/subcommands/sessionImplicit.ts | 54 +----- packages/primitives-cli/src/utils.ts | 20 --- packages/primitives/src/session-signature.ts | 158 ++++++++++++++---- 6 files changed, 135 insertions(+), 161 deletions(-) diff --git a/packages/primitives-cli/src/subcommands/server.ts b/packages/primitives-cli/src/subcommands/server.ts index 55896d4cd..8e709936d 100644 --- a/packages/primitives-cli/src/subcommands/server.ts +++ b/packages/primitives-cli/src/subcommands/server.ts @@ -144,7 +144,7 @@ const rpcMethods: Record Promise> = { const { sessionTopology, callSignatures, explicitSigners, implicitSigners } = params const result = await session.doEncodeSessionCallSignatures( JSON.stringify(sessionTopology), - callSignatures, + callSignatures.map(JSON.stringify), explicitSigners, implicitSigners, ) @@ -167,11 +167,6 @@ const rpcMethods: Record Promise> = { const result = await sessionExplicit.doRemoveSession(explicitSessionAddress, JSON.stringify(sessionTopology)) return result }, - async session_explicit_encodeCallSignature(params) { - const { permissionIndex, signature } = params - const result = await sessionExplicit.doEncodeExplicitSessionCallSignature(permissionIndex, signature) - return result - }, // SESSION IMPLICIT async session_implicit_addBlacklistAddress(params) { @@ -187,15 +182,6 @@ const rpcMethods: Record Promise> = { ) return result }, - async session_implicit_encodeCallSignature(params) { - const { attestation, globalSignature, sessionSignature } = params - const result = await sessionImplicit.doEncodeImplicitSessionCallSignature( - JSON.stringify(attestation), - globalSignature, - sessionSignature, - ) - return result - }, // SIGNATURE async signature_encode(params) { diff --git a/packages/primitives-cli/src/subcommands/session.ts b/packages/primitives-cli/src/subcommands/session.ts index b2ee7f045..608f12fa1 100644 --- a/packages/primitives-cli/src/subcommands/session.ts +++ b/packages/primitives-cli/src/subcommands/session.ts @@ -4,6 +4,7 @@ import sessionImplicitCommand from './sessionImplicit' import { emptySessionsTopology, hashConfigurationTree, + sessionCallSignatureFromJson, sessionsTopologyFromJson, sessionsTopologyToConfigurationTree, sessionsTopologyToJson, @@ -29,7 +30,7 @@ export async function doEncodeSessionCallSignatures( implicitSigners: string[] = [], ): Promise { const sessionConfiguration = sessionsTopologyFromJson(sessionConfigurationInput) - const callSignatures = callSignaturesInput.map((s) => Bytes.fromHex(s as `0x${string}`)) + const callSignatures = callSignaturesInput.map((s) => sessionCallSignatureFromJson(s)) const encoded = encodeSessionCallSignatures( callSignatures, sessionConfiguration, diff --git a/packages/primitives-cli/src/subcommands/sessionExplicit.ts b/packages/primitives-cli/src/subcommands/sessionExplicit.ts index 57851a0f9..75ddb6ffc 100644 --- a/packages/primitives-cli/src/subcommands/sessionExplicit.ts +++ b/packages/primitives-cli/src/subcommands/sessionExplicit.ts @@ -1,6 +1,5 @@ import { balanceSessionsTopology, - encodeExplicitSessionCallSignature, getSessionPermissions, isSessionsTopology, mergeSessionsTopologies, @@ -9,9 +8,8 @@ import { sessionsTopologyFromJson, sessionsTopologyToJson, } from '@0xsequence/sequence-primitives' -import { Hex } from 'ox' import type { CommandModule } from 'yargs' -import { fromPosOrStdin, parseRSV } from '../utils' +import { fromPosOrStdin } from '../utils' export async function doAddSession(sessionInput: string, topologyInput: string): Promise { const session = sessionPermissionsFromJson(sessionInput) @@ -48,19 +46,6 @@ export async function doRemoveSession(explicitSessionAddress: string, topologyIn return sessionsTopologyToJson(updated) } -export async function doEncodeExplicitSessionCallSignature( - permissionIndex: number, - signatureInput: string, -): Promise { - if (!signatureInput) { - throw new Error('Signature is required') - } - const signature = parseRSV(signatureInput) - - const encoded = encodeExplicitSessionCallSignature(BigInt(permissionIndex), signature) - return Hex.from(encoded) -} - const sessionExplicitCommand: CommandModule = { command: 'explicit', describe: 'Explicit session utilities', @@ -113,34 +98,6 @@ const sessionExplicitCommand: CommandModule = { console.log(await doRemoveSession(explicitSessionAddress!, topologyInput)) }, ) - .command( - 'encode-call [permission-index] [signature]', - 'Encode a signature with the given permission index', - (yargs) => { - return yargs - .positional('signature', { - type: 'string', - description: 'Signature to encode (r:s:v)', - demandOption: true, - }) - .positional('permission-index', { - type: 'number', - description: 'Index of the permission to use', - demandOption: true, - }) - }, - async (argv) => { - const signatureInput = argv.signature - if (!signatureInput) { - throw new Error('Signature is required') - } - const permissionIndex = argv.permissionIndex - if (!permissionIndex) { - throw new Error('Permission index is required') - } - console.log(await doEncodeExplicitSessionCallSignature(permissionIndex, signatureInput)) - }, - ) .demandCommand(1, 'You must specify a subcommand for session') }, handler: () => {}, diff --git a/packages/primitives-cli/src/subcommands/sessionImplicit.ts b/packages/primitives-cli/src/subcommands/sessionImplicit.ts index 5ba2cd7bc..e188f5f52 100644 --- a/packages/primitives-cli/src/subcommands/sessionImplicit.ts +++ b/packages/primitives-cli/src/subcommands/sessionImplicit.ts @@ -1,13 +1,7 @@ -import { - addToImplicitBlacklist, - attestationFromJson, - encodeImplicitSessionCallSignature, - removeFromImplicitBlacklist, - SessionsTopology, -} from '@0xsequence/sequence-primitives' -import { Address, Hex } from 'ox' +import { addToImplicitBlacklist, removeFromImplicitBlacklist, SessionsTopology } from '@0xsequence/sequence-primitives' +import { Address } from 'ox' import type { CommandModule } from 'yargs' -import { fromPosOrStdin, parseRSV, requireString } from '../utils' +import { fromPosOrStdin, requireString } from '../utils' export async function doAddBlacklistAddress( blacklistAddress: string, @@ -27,17 +21,6 @@ export async function doRemoveBlacklistAddress( return JSON.stringify(updated) } -export async function doEncodeImplicitSessionCallSignature( - attestationInput: string, - globalSigInput: string, - sessionSigInput: string, -): Promise { - const attestation = attestationFromJson(attestationInput) - const globalSig = parseRSV(globalSigInput) - const sessionSig = parseRSV(sessionSigInput) - const encoded = encodeImplicitSessionCallSignature(attestation, globalSig, sessionSig) - return Hex.from(encoded) -} const sessionImplicitCommand: CommandModule = { command: 'implicit', describe: 'Implicit session utilities', @@ -91,37 +74,6 @@ const sessionImplicitCommand: CommandModule = { console.log(await doRemoveBlacklistAddress(blacklistAddress, sessionConfigurationInput)) }, ) - .command( - 'encode-call [attestation] [global-signature] [session-signature]', - 'Encode an implicit session signature', - (yargs) => { - return yargs - .positional('attestation', { - type: 'string', - description: 'Attestation for the implicit session', - demandOption: true, - }) - .positional('global-signature', { - type: 'string', - description: 'Global signature in r:s:v format', - demandOption: true, - }) - .positional('session-signature', { - type: 'string', - description: 'Session signature in r:s:v format', - demandOption: true, - }) - }, - async (argv) => { - const sessionSigStr = argv.sessionSignature - requireString(sessionSigStr, 'Session signature') - const globalSigStr = argv.globalSignature - requireString(globalSigStr, 'Global signature') - const attestationInput = argv.attestation - requireString(attestationInput, 'Attestation') - console.log(await doEncodeImplicitSessionCallSignature(attestationInput, globalSigStr, sessionSigStr)) - }, - ) .demandCommand(1, 'You must specify a subcommand for implicit session') }, handler: () => {}, diff --git a/packages/primitives-cli/src/utils.ts b/packages/primitives-cli/src/utils.ts index 90c042e20..fe4b2a9b5 100644 --- a/packages/primitives-cli/src/utils.ts +++ b/packages/primitives-cli/src/utils.ts @@ -31,26 +31,6 @@ export async function fromPosOrStdin(argv: Arguments, arg: keyof T): Promi return await readStdin() } -/** - * Helper to parse a signature from a string in "r:s:v" format. - * Returns an object with { v, r, s } where r and s are Uint8Array. - */ -export function parseRSV(sigStr: string): { v: number; r: Bytes.Bytes; s: Bytes.Bytes } { - const parts = sigStr.split(':') - if (parts.length !== 3) { - throw new Error('Signature must be in r:s:v format') - } - const [rStr, sStr, vStr] = parts - if (!rStr || !sStr || !vStr) { - throw new Error('Invalid signature format') - } - return { - v: parseInt(vStr, 10), - r: Bytes.fromHex(rStr as `0x${string}`), - s: Bytes.fromHex(sStr as `0x${string}`), - } -} - export function requireString(arg: string | undefined, name: string): asserts arg is string { if (!arg) { throw new Error(`${name} is required`) diff --git a/packages/primitives/src/session-signature.ts b/packages/primitives/src/session-signature.ts index 21de6a85b..a3a892a76 100644 --- a/packages/primitives/src/session-signature.ts +++ b/packages/primitives/src/session-signature.ts @@ -1,50 +1,108 @@ -import { Address, Bytes } from 'ox' -import { Attestation, encodeAttestation } from './attestation' +import { Address, Bytes, Hex } from 'ox' +import { Attestation, attestationFromParsed, encodeAttestation, encodeAttestationForJson } from './attestation' import { MAX_PERMISSIONS_COUNT } from './permission' import { encodeSessionsTopology, + isCompleteSessionsTopology, minimiseSessionsTopology, SessionsTopology, - isCompleteSessionsTopology, } from './session-config' import { minBytesFor, packRSV } from './utils' -//FIXME Combine the attestation and global signature across multiple calls within a payload. -// This requires passing around the un-encoded call signatures and encoding them all at once. +export type ImplicitSessionCallSignature = { + attestation: Attestation + globalSignature: { v: number; r: Bytes.Bytes; s: Bytes.Bytes } + sessionSignature: { v: number; r: Bytes.Bytes; s: Bytes.Bytes } +} -export function encodeImplicitSessionCallSignature( - attestation: Attestation, - globalSignature: { v: number; r: Bytes.Bytes; s: Bytes.Bytes }, - sessionSignature: { v: number; r: Bytes.Bytes; s: Bytes.Bytes }, -): Bytes.Bytes { - const parts: Bytes.Bytes[] = [ - Bytes.fromNumber(0x80, { size: 1 }), // Implicit flag (MSB) - encodeAttestation(attestation), // Attestation - packRSV(globalSignature), // Global signature - packRSV(sessionSignature), // Session signature - ] +export type ExplicitSessionCallSignature = { + permissionIndex: bigint + sessionSignature: { v: number; r: Bytes.Bytes; s: Bytes.Bytes } +} - return Bytes.concat(...parts) +export type SessionCallSignature = ImplicitSessionCallSignature | ExplicitSessionCallSignature + +export function isImplicitSessionCallSignature( + callSignature: SessionCallSignature, +): callSignature is ImplicitSessionCallSignature { + return 'attestation' in callSignature && 'globalSignature' in callSignature && 'sessionSignature' in callSignature } -export function encodeExplicitSessionCallSignature( - permissionIndex: bigint, - sessionSignature: { v: number; r: Bytes.Bytes; s: Bytes.Bytes }, -): Bytes.Bytes { - if (permissionIndex > MAX_PERMISSIONS_COUNT) { - throw new Error('Permission index is too large') +export function isExplicitSessionCallSignature( + callSignature: SessionCallSignature, +): callSignature is ExplicitSessionCallSignature { + return 'permissionIndex' in callSignature && 'sessionSignature' in callSignature +} + +// JSON + +export function sessionCallSignatureToJson(callSignature: SessionCallSignature): string { + return JSON.stringify(encodeSessionCallSignatureForJson(callSignature)) +} + +export function encodeSessionCallSignatureForJson(callSignature: SessionCallSignature): any { + if (isImplicitSessionCallSignature(callSignature)) { + return { + attestation: encodeAttestationForJson(callSignature.attestation), + globalSignature: rsvToStr(callSignature.globalSignature), + sessionSignature: rsvToStr(callSignature.sessionSignature), + } + } else if (isExplicitSessionCallSignature(callSignature)) { + return { + permissionIndex: callSignature.permissionIndex, + sessionSignature: rsvToStr(callSignature.sessionSignature), + } + } else { + throw new Error('Invalid call signature') } +} - const parts: Bytes.Bytes[] = [ - Bytes.fromNumber(permissionIndex, { size: 1 }), // Implicit flag (MSB false) & permission index - packRSV(sessionSignature), // Session signature - ] +export function sessionCallSignatureFromJson(json: string): SessionCallSignature { + const decoded = JSON.parse(json) + return sessionCallSignatureFromParsed(decoded) +} - return Bytes.concat(...parts) +export function sessionCallSignatureFromParsed(decoded: any): SessionCallSignature { + if (decoded.attestation) { + return { + attestation: attestationFromParsed(decoded.attestation), + globalSignature: rsvFromStr(decoded.globalSignature), + sessionSignature: rsvFromStr(decoded.sessionSignature), + } + } else if (decoded.permissionIndex) { + return { + permissionIndex: decoded.permissionIndex, + sessionSignature: rsvFromStr(decoded.sessionSignature), + } + } else { + throw new Error('Invalid call signature') + } +} + +function rsvToStr(rsv: { v: number; r: Bytes.Bytes; s: Bytes.Bytes }): string { + return `${rsv.r.toString()}:${rsv.s.toString()}:${rsv.v}` +} + +function rsvFromStr(sigStr: string): { v: number; r: Bytes.Bytes; s: Bytes.Bytes } { + const parts = sigStr.split(':') + if (parts.length !== 3) { + throw new Error('Signature must be in r:s:v format') + } + const [rStr, sStr, vStr] = parts + if (!rStr || !sStr || !vStr) { + throw new Error('Invalid signature format') + } + return { + v: parseInt(vStr, 10), + r: Bytes.fromHex(rStr as `0x${string}`), + s: Bytes.fromHex(sStr as `0x${string}`), + } } +// Usage + export function encodeSessionCallSignatures( - callSignatures: Bytes.Bytes[], + callSignatures: SessionCallSignature[], topology: SessionsTopology, explicitSigners: Address.Address[] = [], implicitSigners: Address.Address[] = [], @@ -67,9 +125,49 @@ export function encodeSessionCallSignatures( } parts.push(Bytes.fromNumber(encodedTopology.length, { size: 3 }), encodedTopology) + // Create unique attestation list and maintain index mapping + const attestationMap = new Map() + const encodedAttestations: Bytes.Bytes[] = [] + + // Map each call signature to its attestation index + callSignatures.filter(isImplicitSessionCallSignature).forEach((callSig) => { + if (callSig.attestation) { + const attestationStr = JSON.stringify(callSig.attestation) + if (!attestationMap.has(attestationStr)) { + attestationMap.set(attestationStr, encodedAttestations.length) + encodedAttestations.push(Bytes.concat(encodeAttestation(callSig.attestation), packRSV(callSig.globalSignature))) + } + } + }) + + // Add the attestations to the parts + if (encodedAttestations.length >= 128) { + throw new Error('Too many attestations') + } + parts.push(Bytes.fromNumber(encodedAttestations.length, { size: 1 }), Bytes.concat(...encodedAttestations)) + // Call signature parts for (const callSignature of callSignatures) { - parts.push(callSignature) + if (isImplicitSessionCallSignature(callSignature)) { + // Implicit + const attestationIndex = attestationMap.get(JSON.stringify(callSignature.attestation)) + if (attestationIndex === undefined) { + // Unreachable + throw new Error('Failed to find attestation index') + } + const packedFlag = 0x80 | attestationIndex // Implicit flag (MSB) true + attestation index + parts.push(Bytes.fromNumber(packedFlag, { size: 1 }), packRSV(callSignature.sessionSignature)) + } else if (isExplicitSessionCallSignature(callSignature)) { + // Explicit + if (callSignature.permissionIndex > MAX_PERMISSIONS_COUNT) { + throw new Error('Permission index is too large') + } + const packedFlag = callSignature.permissionIndex // Implicit flag (MSB) false + permission index + parts.push(Bytes.fromNumber(packedFlag, { size: 1 }), packRSV(callSignature.sessionSignature)) + } else { + // Invalid call signature + throw new Error('Invalid call signature') + } } return Bytes.concat(...parts) From 133932cb1b008557ca2f1d6a7788e01062905b1c Mon Sep 17 00:00:00 2001 From: Agusx1211 Date: Sun, 23 Feb 2025 23:33:27 +0000 Subject: [PATCH 132/439] Fix get imageHash and add guest to options --- packages/core/src/wallet.ts | 26 +++++++++++++++++++++----- packages/primitives/src/constants.ts | 5 ++++- 2 files changed, 25 insertions(+), 6 deletions(-) diff --git a/packages/core/src/wallet.ts b/packages/core/src/wallet.ts index 2e1e3a8e7..af08140d4 100644 --- a/packages/core/src/wallet.ts +++ b/packages/core/src/wallet.ts @@ -11,7 +11,7 @@ import { EXECUTE, fromConfigUpdate, getCounterfactualAddress, - Guest, + DefautlGuest, hash, hashConfiguration, IMAGE_HASH, @@ -27,6 +27,7 @@ import { SignatureOfSignerLeaf, SignerErrorCallback, SignerSignature, + IMPLEMENTATION_HASH, } from '@0xsequence/sequence-primitives' import { AbiFunction, Address, Bytes, Hex, PersonalMessage, Provider, Secp256k1, Signature } from 'ox' import { MemoryStateProvider, StateProvider } from '.' @@ -35,11 +36,13 @@ export type WalletOptions = { context: Context stateProvider: StateProvider onSignerError?: SignerErrorCallback + guest: Address.Address } export const DefaultWalletOptions: WalletOptions = { context: DevContext1, stateProvider: new MemoryStateProvider(), + guest: DefautlGuest, } export class Wallet { @@ -69,7 +72,8 @@ export class Wallet { async deploy(provider: Provider.Provider) { if (!(await this.isDeployed(provider))) { - return provider.request({ method: 'eth_sendTransaction', params: [await this.getDeployTransaction()] }) + const deployTx = await this.getDeployTransaction() + return provider.request({ method: 'eth_sendTransaction', params: [deployTx] }) } } @@ -130,7 +134,7 @@ export class Wallet { ]) return { - to: Guest, + to: this.options.guest, data: AbiFunction.encodeData(EXECUTE, [ Bytes.toHex( encode({ @@ -183,12 +187,24 @@ export class Wallet { let deployHash: { deployHash: Hex.Hex; context: Context } | undefined let imageHash: Hex.Hex if (provider) { - const requests = await Promise.all([provider.request({ method: 'eth_chainId' }), this.isDeployed(provider)]) + const requests = await Promise.all([ + provider.request({ method: 'eth_chainId' }), + this.isDeployed(provider), + provider + .request({ + method: 'eth_call', + params: [{ to: this.address, data: AbiFunction.encodeData(IMPLEMENTATION_HASH) }], + }) + .then((res) => `0x${res.slice(26)}`) + .catch(() => undefined), + ]) + chainId = BigInt(requests[0]) isDeployed = requests[1] + const implementation = requests[2] let fromImageHash: Hex.Hex - if (isDeployed) { + if (isDeployed && implementation !== this.options.context.stage1) { fromImageHash = await provider.request({ method: 'eth_call', params: [{ to: this.address, data: AbiFunction.encodeData(IMAGE_HASH) }], diff --git a/packages/primitives/src/constants.ts b/packages/primitives/src/constants.ts index 56843024d..52998db69 100644 --- a/packages/primitives/src/constants.ts +++ b/packages/primitives/src/constants.ts @@ -15,7 +15,7 @@ export const DevContext1: Context = { creationCode: DEFAULT_CREATION_CODE, } -export const Guest: Address.Address = '0xTODO' +export const DefautlGuest: Address.Address = '0x294e900a45018d71ffc6ee1f18a205e199f551a1' // ERC1271 export const IS_VALID_SIGNATURE = Abi.from([ @@ -27,6 +27,9 @@ export const DEPLOY = Abi.from([ 'function deploy(address _mainModule, bytes32 _salt) public payable returns (address _contract)', ])[0] +// Stage1Module +export const IMPLEMENTATION_HASH = Abi.from(['function getImplementation() external view returns (address)'])[0] + // Stage2Module export const IMAGE_HASH = Abi.from(['function imageHash() external view returns (bytes32)'])[0] export const READ_NONCE = Abi.from(['function readNonce(uint256 _space) public view returns (uint256)'])[0] From 873437b7090a01775296dd3c82ff69bf99650d53 Mon Sep 17 00:00:00 2001 From: Agusx1211 Date: Sun, 23 Feb 2025 23:34:03 +0000 Subject: [PATCH 133/439] Fix payload hash and add rpc method --- .../primitives-cli/src/subcommands/payload.ts | 88 +++++++- .../primitives-cli/src/subcommands/server.ts | 4 + packages/primitives/src/payload.ts | 199 ++++++++++++------ 3 files changed, 214 insertions(+), 77 deletions(-) diff --git a/packages/primitives-cli/src/subcommands/payload.ts b/packages/primitives-cli/src/subcommands/payload.ts index 48ec2d0ab..bc7299cda 100644 --- a/packages/primitives-cli/src/subcommands/payload.ts +++ b/packages/primitives-cli/src/subcommands/payload.ts @@ -1,6 +1,6 @@ import { AbiParameters, Address, Bytes, Hex } from 'ox' import type { CommandModule } from 'yargs' -import { encode } from '@0xsequence/sequence-primitives' +import { encode, hash, isCallsPayload, ParentedPayload } from '@0xsequence/sequence-primitives' import { fromPosOrStdin, readStdin } from '../utils' export const KIND_TRANSACTIONS = 0x00 @@ -78,14 +78,9 @@ export async function doConvertToAbi(payload: string): Promise { throw new Error('Not implemented') } -export async function doConvertToPacked(payload: string): Promise { - const decoded = AbiParameters.decode( - [{ type: 'tuple', name: 'payload', components: DecodedAbi }], - payload as Hex.Hex, - )[0] as unknown as SolidityDecoded - +export function solidityEncodedToParentedPayload(decoded: SolidityDecoded): ParentedPayload { if (decoded.kind === KIND_TRANSACTIONS) { - const packed = encode({ + return { type: 'call', nonce: decoded.nonce, space: decoded.space, @@ -98,7 +93,47 @@ export async function doConvertToPacked(payload: string): Promise { onlyFallback: call.onlyFallback, behaviorOnError: behaviorOnError(Number(call.behaviorOnError)), })), - }) + parentWallets: decoded.parentWallets.map((wallet) => Address.from(wallet)), + } + } + + if (decoded.kind === KIND_MESSAGE) { + return { + type: 'message', + message: Bytes.fromHex(decoded.message as `0x${string}`), + parentWallets: decoded.parentWallets.map((wallet) => Address.from(wallet)), + } + } + + if (decoded.kind === KIND_CONFIG_UPDATE) { + return { + type: 'config-update', + imageHash: decoded.imageHash as `0x${string}`, + parentWallets: decoded.parentWallets.map((wallet) => Address.from(wallet)), + } + } + + if (decoded.kind === KIND_DIGEST) { + return { + type: 'digest', + digest: decoded.digest as `0x${string}`, + parentWallets: decoded.parentWallets.map((wallet) => Address.from(wallet)), + } + } + + throw new Error('Not implemented') +} + +export async function doConvertToPacked(payload: string): Promise { + const decodedPayload = solidityEncodedToParentedPayload( + AbiParameters.decode( + [{ type: 'tuple', name: 'payload', components: DecodedAbi }], + payload as Hex.Hex, + )[0] as unknown as SolidityDecoded, + ) + + if (isCallsPayload(decodedPayload)) { + const packed = encode(decodedPayload) return Hex.from(packed) } @@ -115,6 +150,15 @@ export async function doConvertToJson(payload: string): Promise { return json } +export async function doHash(wallet: string, chainId: bigint, payload: string): Promise { + const decoded = AbiParameters.decode( + [{ type: 'tuple', name: 'payload', components: DecodedAbi }], + payload as Hex.Hex, + )[0] as unknown as SolidityDecoded + + return Hex.from(hash(Address.from(wallet), chainId, solidityEncodedToParentedPayload(decoded))) +} + const payloadCommand: CommandModule = { command: 'payload', describe: 'Payload conversion utilities', @@ -165,6 +209,32 @@ const payloadCommand: CommandModule = { console.log(result) }, ) + .command( + 'hash [payload]', + 'Hash the payload', + (yargs) => { + return yargs + .option('wallet', { + type: 'string', + description: 'Wallet of the wallet to hash the payload', + demandOption: true, + }) + .option('chainId', { + type: 'string', + description: 'Chain ID of the payload', + demandOption: true, + }) + .positional('payload', { + type: 'string', + description: 'Input payload to hash', + }) + }, + async (argv) => { + const payload = await fromPosOrStdin(argv, 'payload') + const result = await doHash(argv.wallet, BigInt(argv.chainId), payload) + console.log(result) + }, + ) .demandCommand(1, 'You must specify a subcommand for payload') }, handler: () => {}, diff --git a/packages/primitives-cli/src/subcommands/server.ts b/packages/primitives-cli/src/subcommands/server.ts index 8e709936d..8d207ed8b 100644 --- a/packages/primitives-cli/src/subcommands/server.ts +++ b/packages/primitives-cli/src/subcommands/server.ts @@ -116,6 +116,10 @@ const rpcMethods: Record Promise> = { const result = await payload.doConvertToJson(inputPayload) return result }, + async payload_hashFor(params) { + const result = await payload.doHash(params.wallet, params.chainId, params.payload) + return result + }, // PERMISSION async permission_toPackedSession(params) { diff --git a/packages/primitives/src/payload.ts b/packages/primitives/src/payload.ts index c3b24c91f..d6e1f5a49 100644 --- a/packages/primitives/src/payload.ts +++ b/packages/primitives/src/payload.ts @@ -1,6 +1,7 @@ import { AbiFunction, Address, Bytes, Hash, Hex, TypedData } from 'ox' import { IS_VALID_SAPIENT_SIGNATURE } from './constants' import { minBytesFor } from './utils' +import { getSignPayload } from 'ox/TypedData' export type Call = { to: Address.Address @@ -42,6 +43,18 @@ export type Payload = CallPayload | MessagePayload | ConfigUpdatePayload | Diges export type ParentedPayload = Payload & ParentPayload +export type TypedDataToSign = { + domain: { + name: string + version: string + chainId: number + verifyingContract: Address.Address + } + types: Record> + primaryType: string + message: Record +} + export function fromMessage(message: Bytes.Bytes): Payload { return { type: 'message', @@ -72,6 +85,18 @@ export function fromCall(nonce: bigint, space: bigint, calls: Call[]): Payload { } } +export function isCallsPayload(payload: Payload): payload is CallPayload { + return payload.type === 'call' +} + +export function isMessagePayload(payload: Payload): payload is MessagePayload { + return payload.type === 'message' +} + +export function isConfigUpdatePayload(payload: Payload): payload is ConfigUpdatePayload { + return payload.type === 'config-update' +} + export function encode(payload: CallPayload, self?: Address.Address): Bytes.Bytes { const callsLen = payload.calls.length const nonceBytesNeeded = minBytesFor(payload.nonce) @@ -270,88 +295,126 @@ export function encodeSapient( } export function hash(wallet: Address.Address, chainId: bigint, payload: ParentedPayload): Bytes.Bytes { - const domain = { name: 'Sequence Wallet', version: '3', chainId, verifyingContract: wallet } + const typedData = toTypedPayload(wallet, chainId, payload) + return Bytes.fromHex(getSignPayload(typedData)) +} + +export function toTypedPayload(wallet: Address.Address, chainId: bigint, payload: ParentedPayload): TypedDataToSign { + const domain = { + name: 'Sequence Wallet', + version: '3', + chainId: Number(chainId), + verifyingContract: wallet, + } - let data: Hex.Hex switch (payload.type) { - case 'call': - data = TypedData.encode({ + case 'call': { + // This matches the EIP712 structure used in our hash() function + const types = { + Calls: [ + { name: 'calls', type: 'Call[]' }, + { name: 'space', type: 'uint256' }, + { name: 'nonce', type: 'uint256' }, + { name: 'wallets', type: 'address[]' }, + ], + Call: [ + { name: 'to', type: 'address' }, + { name: 'value', type: 'uint256' }, + { name: 'data', type: 'bytes' }, + { name: 'gasLimit', type: 'uint256' }, + { name: 'delegateCall', type: 'bool' }, + { name: 'onlyFallback', type: 'bool' }, + { name: 'behaviorOnError', type: 'uint256' }, + ], + } + + // We ensure 'behaviorOnError' is turned into a numeric value + const message = { + calls: payload.calls.map((call) => ({ + to: call.to, + value: call.value.toString(), + data: Bytes.toHex(call.data), + gasLimit: call.gasLimit.toString(), + delegateCall: call.delegateCall, + onlyFallback: call.onlyFallback, + behaviorOnError: BigInt(encodeBehaviorOnError(call.behaviorOnError)).toString(), + })), + space: payload.space.toString(), + nonce: payload.nonce.toString(), + wallets: payload.parentWallets ?? [], + } + + return { domain, - types: { - Calls: [ - { name: 'calls', type: 'Call[]' }, - { name: 'space', type: 'uint256' }, - { name: 'nonce', type: 'uint256' }, - { name: 'wallets', type: 'address[]' }, - ], - Call: [ - { name: 'to', type: 'address' }, - { name: 'value', type: 'uint256' }, - { name: 'data', type: 'bytes' }, - { name: 'gasLimit', type: 'uint256' }, - { name: 'delegateCall', type: 'bool' }, - { name: 'onlyFallback', type: 'bool' }, - { name: 'behaviorOnError', type: 'uint256' }, - ], - }, + types, primaryType: 'Calls', - message: { - calls: payload.calls.map((call) => ({ - ...call, - data: Bytes.toHex(call.data), - behaviorOnError: BigInt(encodeBehaviorOnError(call.behaviorOnError)), - })), - space: payload.space, - nonce: payload.nonce, - wallets: payload.parentWallets ?? [], - }, - }) - break + message, + } + } - case 'message': - data = TypedData.encode({ + case 'message': { + const types = { + Message: [ + { name: 'message', type: 'bytes' }, + { name: 'wallets', type: 'address[]' }, + ], + } + + const message = { + message: Bytes.toHex(payload.message), + wallets: payload.parentWallets ?? [], + } + + return { domain, - types: { - Message: [ - { name: 'message', type: 'bytes' }, - { name: 'wallets', type: 'address[]' }, - ], - }, + types, primaryType: 'Message', - message: { message: Bytes.toHex(payload.message), wallets: payload.parentWallets ?? [] }, - }) - break + message, + } + } - case 'config-update': - data = TypedData.encode({ + case 'config-update': { + const types = { + ConfigUpdate: [ + { name: 'imageHash', type: 'bytes32' }, + { name: 'wallets', type: 'address[]' }, + ], + } + + const message = { + imageHash: payload.imageHash, + wallets: payload.parentWallets ?? [], + } + + return { domain, - types: { - ConfigUpdate: [ - { name: 'imageHash', type: 'bytes32' }, - { name: 'wallets', type: 'address[]' }, - ], - }, + types, primaryType: 'ConfigUpdate', - message: { imageHash: payload.imageHash, wallets: payload.parentWallets ?? [] }, - }) - break + message, + } + } - case 'digest': - data = TypedData.encode({ + case 'digest': { + const types = { + Digest: [ + { name: 'digest', type: 'bytes32' }, + { name: 'wallets', type: 'address[]' }, + ], + } + + const message = { + digest: payload.digest, + wallets: payload.parentWallets ?? [], + } + + return { domain, - types: { - Digest: [ - { name: 'digest', type: 'bytes32' }, - { name: 'wallets', type: 'address[]' }, - ], - }, + types, primaryType: 'Digest', - message: { digest: payload.digest, wallets: payload.parentWallets ?? [] }, - }) - break + message, + } + } } - - return Hash.keccak256(data, { as: 'Bytes' }) } function encodeBehaviorOnError(behaviorOnError: Call['behaviorOnError']): number { From e1ef23c1ff4a51eb90d41345885054a148273a7e Mon Sep 17 00:00:00 2001 From: William Hua Date: Mon, 24 Feb 2025 07:16:39 -0500 Subject: [PATCH 134/439] spelling --- packages/core/src/wallet.ts | 12 ++--- packages/primitives/src/constants.ts | 4 +- packages/primitives/src/session-config.ts | 60 +++++++++++------------ 3 files changed, 38 insertions(+), 38 deletions(-) diff --git a/packages/core/src/wallet.ts b/packages/core/src/wallet.ts index af08140d4..a9278f441 100644 --- a/packages/core/src/wallet.ts +++ b/packages/core/src/wallet.ts @@ -3,6 +3,7 @@ import { CallPayload, Configuration, Context, + DefaultGuest, DevContext1, encode, encodeSapient, @@ -10,8 +11,8 @@ import { erc6492Deploy, EXECUTE, fromConfigUpdate, + GET_IMPLEMENTATION, getCounterfactualAddress, - DefautlGuest, hash, hashConfiguration, IMAGE_HASH, @@ -27,7 +28,6 @@ import { SignatureOfSignerLeaf, SignerErrorCallback, SignerSignature, - IMPLEMENTATION_HASH, } from '@0xsequence/sequence-primitives' import { AbiFunction, Address, Bytes, Hex, PersonalMessage, Provider, Secp256k1, Signature } from 'ox' import { MemoryStateProvider, StateProvider } from '.' @@ -42,7 +42,7 @@ export type WalletOptions = { export const DefaultWalletOptions: WalletOptions = { context: DevContext1, stateProvider: new MemoryStateProvider(), - guest: DefautlGuest, + guest: DefaultGuest, } export class Wallet { @@ -72,8 +72,8 @@ export class Wallet { async deploy(provider: Provider.Provider) { if (!(await this.isDeployed(provider))) { - const deployTx = await this.getDeployTransaction() - return provider.request({ method: 'eth_sendTransaction', params: [deployTx] }) + const transaction = await this.getDeployTransaction() + return provider.request({ method: 'eth_sendTransaction', params: [transaction] }) } } @@ -193,7 +193,7 @@ export class Wallet { provider .request({ method: 'eth_call', - params: [{ to: this.address, data: AbiFunction.encodeData(IMPLEMENTATION_HASH) }], + params: [{ to: this.address, data: AbiFunction.encodeData(GET_IMPLEMENTATION) }], }) .then((res) => `0x${res.slice(26)}`) .catch(() => undefined), diff --git a/packages/primitives/src/constants.ts b/packages/primitives/src/constants.ts index 52998db69..8047f0e3c 100644 --- a/packages/primitives/src/constants.ts +++ b/packages/primitives/src/constants.ts @@ -15,7 +15,7 @@ export const DevContext1: Context = { creationCode: DEFAULT_CREATION_CODE, } -export const DefautlGuest: Address.Address = '0x294e900a45018d71ffc6ee1f18a205e199f551a1' +export const DefaultGuest: Address.Address = '0x294e900a45018d71ffc6ee1f18a205e199f551a1' // ERC1271 export const IS_VALID_SIGNATURE = Abi.from([ @@ -28,7 +28,7 @@ export const DEPLOY = Abi.from([ ])[0] // Stage1Module -export const IMPLEMENTATION_HASH = Abi.from(['function getImplementation() external view returns (address)'])[0] +export const GET_IMPLEMENTATION = Abi.from(['function getImplementation() external view returns (address)'])[0] // Stage2Module export const IMAGE_HASH = Abi.from(['function imageHash() external view returns (bytes32)'])[0] diff --git a/packages/primitives/src/session-config.ts b/packages/primitives/src/session-config.ts index 990b1a34a..ced0c6018 100644 --- a/packages/primitives/src/session-config.ts +++ b/packages/primitives/src/session-config.ts @@ -96,18 +96,18 @@ function checkIsCompleteSessionsBranch(topology: SessionsTopology): { /** * Gets the global signer from the topology. - * @param topolgy The topology to get the global signer from + * @param topology The topology to get the global signer from * @returns The global signer or null if it's not present */ -export function getGlobalSigner(topolgy: SessionsTopology): Address.Address | null { - if (isGlobalSignerLeaf(topolgy)) { +export function getGlobalSigner(topology: SessionsTopology): Address.Address | null { + if (isGlobalSignerLeaf(topology)) { // Got it - return topolgy.globalSigner + return topology.globalSigner } - if (isSessionsBranch(topolgy)) { + if (isSessionsBranch(topology)) { // Check branches - const results = topolgy.map(getGlobalSigner).filter((t) => t !== null) + const results = topology.map(getGlobalSigner).filter((t) => t !== null) if (results.length > 1) { throw new Error('Multiple global signers') } @@ -121,11 +121,11 @@ export function getGlobalSigner(topolgy: SessionsTopology): Address.Address | nu /** * Gets the implicit blacklist from the topology. - * @param topolgy The topology to get the implicit blacklist from + * @param topology The topology to get the implicit blacklist from * @returns The implicit blacklist or null if it's not present */ -export function getImplicitBlacklist(topolgy: SessionsTopology): Address.Address[] | null { - const blacklistNode = getImplicitBlacklistLeaf(topolgy) +export function getImplicitBlacklist(topology: SessionsTopology): Address.Address[] | null { + const blacklistNode = getImplicitBlacklistLeaf(topology) if (!blacklistNode) { return null } @@ -134,18 +134,18 @@ export function getImplicitBlacklist(topolgy: SessionsTopology): Address.Address /** * Gets the implicit blacklist leaf from the topology. - * @param topolgy The topology to get the implicit blacklist leaf from + * @param topology The topology to get the implicit blacklist leaf from * @returns The implicit blacklist leaf or null if it's not present */ -export function getImplicitBlacklistLeaf(topolgy: SessionsTopology): ImplicitBlacklist | null { - if (isImplicitBlacklist(topolgy)) { +export function getImplicitBlacklistLeaf(topology: SessionsTopology): ImplicitBlacklist | null { + if (isImplicitBlacklist(topology)) { // Got it - return topolgy + return topology } - if (isSessionsBranch(topolgy)) { + if (isSessionsBranch(topology)) { // Check branches - const results = topolgy.map(getImplicitBlacklistLeaf).filter((t) => t !== null) + const results = topology.map(getImplicitBlacklistLeaf).filter((t) => t !== null) if (results.length > 1) { throw new Error('Multiple blacklists') } @@ -252,13 +252,13 @@ export function configurationTreeToSessionsTopology(tree: EncodedConfigurationTr /** * Encodes a topology into bytes for contract validation. - * @param topolgy The topology to encode + * @param topology The topology to encode * @returns The encoded topology */ -export function encodeSessionsTopology(topolgy: SessionsTopology): Bytes.Bytes { - if (isSessionsBranch(topolgy)) { +export function encodeSessionsTopology(topology: SessionsTopology): Bytes.Bytes { + if (isSessionsBranch(topology)) { const encodedBranches = [] - for (const node of topolgy) { + for (const node of topology) { encodedBranches.push(encodeSessionsTopology(node)) } const encoded = Bytes.concat(...encodedBranches) @@ -274,36 +274,36 @@ export function encodeSessionsTopology(topolgy: SessionsTopology): Bytes.Bytes { ) } - if (isSessionPermissions(topolgy)) { + if (isSessionPermissions(topology)) { const flagByte = SESSIONS_FLAG_PERMISSIONS << 4 - const encodedLeaf = encodeSessionPermissions(topolgy) + const encodedLeaf = encodeSessionPermissions(topology) return Bytes.concat(Bytes.fromNumber(flagByte), encodedLeaf) } - if (isSessionsNode(topolgy)) { + if (isSessionsNode(topology)) { const flagByte = SESSIONS_FLAG_NODE << 4 - return Bytes.concat(Bytes.fromNumber(flagByte), topolgy) + return Bytes.concat(Bytes.fromNumber(flagByte), topology) } - if (isImplicitBlacklist(topolgy)) { - const encoded = Bytes.concat(...topolgy.blacklist.map((b) => Bytes.fromHex(b))) - if (topolgy.blacklist.length > 14) { + if (isImplicitBlacklist(topology)) { + const encoded = Bytes.concat(...topology.blacklist.map((b) => Bytes.fromHex(b))) + if (topology.blacklist.length > 14) { // If the blacklist is too large, we can't encode the length into the flag byte. // Instead we encode 0xff and the length in the next byte. return Bytes.concat( Bytes.fromNumber((SESSIONS_FLAG_BLACKLIST << 4) | 0xff), - Bytes.fromNumber(topolgy.blacklist.length), + Bytes.fromNumber(topology.blacklist.length), encoded, ) } // Encode the size into the flag byte - const flagByte = (SESSIONS_FLAG_BLACKLIST << 4) | topolgy.blacklist.length + const flagByte = (SESSIONS_FLAG_BLACKLIST << 4) | topology.blacklist.length return Bytes.concat(Bytes.fromNumber(flagByte), encoded) } - if (isGlobalSignerLeaf(topolgy)) { + if (isGlobalSignerLeaf(topology)) { const flagByte = SESSIONS_FLAG_GLOBAL_SIGNER << 4 - return Bytes.concat(Bytes.fromNumber(flagByte), Bytes.padLeft(Bytes.fromHex(topolgy.globalSigner), 20)) + return Bytes.concat(Bytes.fromNumber(flagByte), Bytes.padLeft(Bytes.fromHex(topology.globalSigner), 20)) } throw new Error('Invalid topology') From 23163a06078c9fb864826b5b09306f0859c96fbb Mon Sep 17 00:00:00 2001 From: Agusx1211 Date: Tue, 25 Feb 2025 12:03:45 +0000 Subject: [PATCH 135/439] Update default creation code --- packages/primitives/src/constants.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/primitives/src/constants.ts b/packages/primitives/src/constants.ts index 52998db69..78e72a428 100644 --- a/packages/primitives/src/constants.ts +++ b/packages/primitives/src/constants.ts @@ -1,7 +1,7 @@ import { Abi, Address, Hex } from 'ox' export const DEFAULT_CREATION_CODE: Hex.Hex = - '0x603a600e3d39601a805130553df3363d3d373d3d3d363d30545af43d82803e903d91601857fd5bf3' + '0x603e600e3d39601e805130553df33d3d34601c57363d3d373d363d30545af43d82803e903d91601c57fd5bf3' export type Context = { factory: Address.Address From 24a7ee48f13f8500a67fabe99416c7667635648d Mon Sep 17 00:00:00 2001 From: Agusx1211 Date: Tue, 25 Feb 2025 12:03:53 +0000 Subject: [PATCH 136/439] Fix verify signature --- packages/core/src/wallet.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/core/src/wallet.ts b/packages/core/src/wallet.ts index af08140d4..e8c545bba 100644 --- a/packages/core/src/wallet.ts +++ b/packages/core/src/wallet.ts @@ -269,7 +269,7 @@ export class Wallet { if ( !Secp256k1.verify({ payload: signature.type === 'eth_sign' ? PersonalMessage.getSignPayload(digest) : digest, - address: this.address, + address: leaf.address, signature: { r: Bytes.toBigInt(signature.r), s: Bytes.toBigInt(signature.s), From f08f6d7e87c88a94cd272c5bd78880acb132a424 Mon Sep 17 00:00:00 2001 From: Agusx1211 Date: Tue, 25 Feb 2025 17:31:38 +0000 Subject: [PATCH 137/439] Update default context --- packages/primitives/src/constants.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/primitives/src/constants.ts b/packages/primitives/src/constants.ts index f1592f664..ed9f676e1 100644 --- a/packages/primitives/src/constants.ts +++ b/packages/primitives/src/constants.ts @@ -10,8 +10,8 @@ export type Context = { } export const DevContext1: Context = { - factory: '0xFaA5c0b14d1bED5C888Ca655B9a8A5911F78eF4A', - stage1: '0x66155b899d93e255d42a85eb921ead9f2e964ef1', + factory: '0xBd0F8abD58B4449B39C57Ac9D5C67433239aC447', + stage1: '0x9C4953F499f7e63434d76E0735D4707473d92311', creationCode: DEFAULT_CREATION_CODE, } From 91f673f3900d1861bde766b6b685e7c4f1e1ece6 Mon Sep 17 00:00:00 2001 From: Agusx1211 Date: Tue, 25 Feb 2025 17:31:51 +0000 Subject: [PATCH 138/439] Fix stage1 deployed sign --- packages/core/src/wallet.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/core/src/wallet.ts b/packages/core/src/wallet.ts index d840a5ea7..bc6ab11a1 100644 --- a/packages/core/src/wallet.ts +++ b/packages/core/src/wallet.ts @@ -204,18 +204,18 @@ export class Wallet { const implementation = requests[2] let fromImageHash: Hex.Hex - if (isDeployed && implementation !== this.options.context.stage1) { + + if (isDeployed && implementation?.toLowerCase() !== this.options.context.stage1.toLowerCase()) { fromImageHash = await provider.request({ method: 'eth_call', params: [{ to: this.address, data: AbiFunction.encodeData(IMAGE_HASH) }], }) } else { - deployHash = await this.options.stateProvider.getDeployHash(this.address) - fromImageHash = deployHash.deployHash + // Avoid setting deployHash as it later determines if we use 6492 or not + fromImageHash = (await this.options.stateProvider.getDeployHash(this.address)).deployHash } updates = await this.options.stateProvider.getConfigurationUpdates(this.address, fromImageHash) - imageHash = updates[updates.length - 1]?.imageHash ?? fromImageHash } else { chainId = 0n From 546f37e5997c17a0203c8af7825348b12b9e00ed Mon Sep 17 00:00:00 2001 From: Patryk Kalinowski Date: Mon, 24 Feb 2025 12:55:22 +0100 Subject: [PATCH 139/439] wdk: identity instrument interface --- packages/wdk/package.json | 6 +- packages/wdk/src/authkey.ts | 95 ++++++ packages/wdk/src/challenge.ts | 38 +++ packages/wdk/src/index.ts | 9 + packages/wdk/src/nitro/index.ts | 1 + packages/wdk/src/nitro/nitro.gen.ts | 497 ++++++++++++++++++++++++++++ packages/wdk/src/secure-store.ts | 104 ++++++ packages/wdk/src/signer.ts | 36 ++ packages/wdk/src/subtle-crypto.ts | 128 +++++++ packages/wdk/src/wdk.ts | 65 ++++ pnpm-lock.yaml | 41 +++ 11 files changed, 1019 insertions(+), 1 deletion(-) create mode 100644 packages/wdk/src/authkey.ts create mode 100644 packages/wdk/src/challenge.ts create mode 100644 packages/wdk/src/nitro/index.ts create mode 100644 packages/wdk/src/nitro/nitro.gen.ts create mode 100644 packages/wdk/src/secure-store.ts create mode 100644 packages/wdk/src/signer.ts create mode 100644 packages/wdk/src/subtle-crypto.ts create mode 100644 packages/wdk/src/wdk.ts diff --git a/packages/wdk/package.json b/packages/wdk/package.json index 94f8d16f0..b53259948 100644 --- a/packages/wdk/package.json +++ b/packages/wdk/package.json @@ -17,6 +17,10 @@ "typescript": "^5.7.3" }, "dependencies": { - "@0xsequence/sequence-core": "workspace:^" + "@0xsequence/sequence-core": "workspace:^", + "@0xsequence/sequence-primitives": "workspace:^", + "idb": "^7.1.1", + "jwt-decode": "^4.0.0", + "ox": "^0.6.7" } } diff --git a/packages/wdk/src/authkey.ts b/packages/wdk/src/authkey.ts new file mode 100644 index 000000000..e688cc622 --- /dev/null +++ b/packages/wdk/src/authkey.ts @@ -0,0 +1,95 @@ +import { Secp256k1, Address, Signature, PersonalMessage, Hash, Hex } from 'ox' +import { AuthKey as ProtoAuthKey, KeyType } from './nitro' +import { SecureStoreBackend } from './secure-store' +import { SubtleCryptoBackend } from './subtle-crypto' + +const idbName = 'sequence-authkeys' +const idbStoreName = 'authkeys' + +export abstract class AuthKey { + protected _identitySigner?: `0x${string}` + + public abstract toProto(): ProtoAuthKey + public abstract signMessage(payload: string): Promise<`0x${string}`> + protected abstract store(): Promise + + public get identitySigner(): `0x${string}` | undefined { + return this._identitySigner + } + + public async setIdentitySigner(signer: `0x${string}`) { + this._identitySigner = signer + await this.store() + } + + public static async getOrCreate(storage: SecureStoreBackend, crypto?: SubtleCryptoBackend): Promise { + const authKey = await AuthKey.fromStorage(storage, crypto) + if (authKey) { + return authKey + } + return AuthKey.createRandom(storage, crypto) + } + + public static async createRandom(storage: SecureStoreBackend, crypto?: SubtleCryptoBackend): Promise { + // TODO: if crypto is available, use secp256r1 instead. + return AuthKeyP256K1.createRandom(storage, crypto) + } + + public static async fromStorage(storage: SecureStoreBackend, crypto?: SubtleCryptoBackend): Promise { + // TODO: if crypto is available, use secp256r1 instead. + return AuthKeyP256K1.fromStorage(storage, crypto) + } +} + +export class AuthKeyP256K1 extends AuthKey { + private constructor( + readonly storage: SecureStoreBackend, + readonly privateKey: `0x${string}`, + ) { + super() + } + + public static async createRandom(storage: SecureStoreBackend, _crypto?: SubtleCryptoBackend): Promise { + const privateKey = Secp256k1.randomPrivateKey() + const authKey = new AuthKeyP256K1(storage, privateKey) + await authKey.store() + return authKey + } + + public static async fromStorage( + storage: SecureStoreBackend, + _crypto?: SubtleCryptoBackend, + ): Promise { + const [signer, privateKey] = await storage.get(idbName, idbStoreName, 'p256k1') + if (!privateKey) { + return null + } + if (!privateKey.startsWith('0x')) { + return null + } + const authKey = new AuthKeyP256K1(storage, privateKey as `0x${string}`) + authKey._identitySigner = signer as `0x${string}` + return authKey + } + + public toProto(): ProtoAuthKey { + const pubKey = Secp256k1.getPublicKey({ privateKey: this.privateKey }) + const address = Address.fromPublicKey(pubKey) + return { + keyType: KeyType.P256K1, + publicKey: address, + } + } + + public async signMessage(payload: string): Promise<`0x${string}`> { + const personalMessage = PersonalMessage.getSignPayload(Hex.fromString(payload)) + const signature = Secp256k1.sign({ payload: personalMessage, privateKey: this.privateKey }) + console.log({ payload, personalMessage, signature: Signature.toHex(signature) }) + return Signature.toHex(signature) + } + + protected async store() { + const validUntil = new Date(Date.now() + 1000 * 60 * 60 * 12) // 12 hours + await this.storage.set(idbName, idbStoreName, 'p256k1', [this._identitySigner, this.privateKey], validUntil) + } +} diff --git a/packages/wdk/src/challenge.ts b/packages/wdk/src/challenge.ts new file mode 100644 index 000000000..1bc9009f0 --- /dev/null +++ b/packages/wdk/src/challenge.ts @@ -0,0 +1,38 @@ +import { Hash, Hex } from 'ox' +import { jwtDecode } from 'jwt-decode' +import { IdentityType } from './nitro' + +export interface ChallengeParams { + identityType: IdentityType + verifier: string + answer?: string +} + +export abstract class Challenge { + public abstract getParams(): ChallengeParams + public abstract withAnswer(answer: string): Challenge +} + +export class IdTokenChallenge extends Challenge { + constructor( + readonly issuer: string, + readonly audience: string, + readonly idToken: string, + ) { + super() + } + + public getParams(): ChallengeParams { + const decoded = jwtDecode(this.idToken) + const idTokenHash = Hash.keccak256(new TextEncoder().encode(this.idToken)) + return { + identityType: IdentityType.OIDC, + verifier: [this.issuer, this.audience, Hex.fromBytes(idTokenHash), decoded.exp].join('|'), + answer: this.idToken, + } + } + + public withAnswer(_answer: string): IdTokenChallenge { + return this + } +} diff --git a/packages/wdk/src/index.ts b/packages/wdk/src/index.ts index e69de29bb..fe7777cb2 100644 --- a/packages/wdk/src/index.ts +++ b/packages/wdk/src/index.ts @@ -0,0 +1,9 @@ +import { IdentityInstrument } from './nitro' +export { IdentityInstrument } + +export * from './wdk' +export * from './authkey' +export * from './challenge' +export * from './signer' +export * from './subtle-crypto' +export * from './secure-store' diff --git a/packages/wdk/src/nitro/index.ts b/packages/wdk/src/nitro/index.ts new file mode 100644 index 000000000..cc0460745 --- /dev/null +++ b/packages/wdk/src/nitro/index.ts @@ -0,0 +1 @@ +export * from './nitro.gen' diff --git a/packages/wdk/src/nitro/nitro.gen.ts b/packages/wdk/src/nitro/nitro.gen.ts new file mode 100644 index 000000000..545ce33e6 --- /dev/null +++ b/packages/wdk/src/nitro/nitro.gen.ts @@ -0,0 +1,497 @@ +/* eslint-disable */ +// identity-instrument v0.1.0 4e9ac0518691855f457e1cc5ac4e15421325c8a0 +// -- +// Code generated by webrpc-gen@v0.22.1 with typescript generator. DO NOT EDIT. +// +// webrpc-gen -schema=nitro.ridl -target=typescript -client -out=./clients/nitro.gen.ts + +export const WebrpcHeader = 'Webrpc' + +export const WebrpcHeaderValue = 'webrpc@v0.22.1;gen-typescript@v0.16.2;identity-instrument@v0.1.0' + +// WebRPC description and code-gen version +export const WebRPCVersion = 'v1' + +// Schema version of your RIDL schema +export const WebRPCSchemaVersion = 'v0.1.0' + +// Schema hash generated from your RIDL schema +export const WebRPCSchemaHash = '4e9ac0518691855f457e1cc5ac4e15421325c8a0' + +type WebrpcGenVersions = { + webrpcGenVersion: string + codeGenName: string + codeGenVersion: string + schemaName: string + schemaVersion: string +} + +export function VersionFromHeader(headers: Headers): WebrpcGenVersions { + const headerValue = headers.get(WebrpcHeader) + if (!headerValue) { + return { + webrpcGenVersion: '', + codeGenName: '', + codeGenVersion: '', + schemaName: '', + schemaVersion: '', + } + } + + return parseWebrpcGenVersions(headerValue) +} + +function parseWebrpcGenVersions(header: string): WebrpcGenVersions { + const versions = header.split(';') + if (versions.length < 3) { + return { + webrpcGenVersion: '', + codeGenName: '', + codeGenVersion: '', + schemaName: '', + schemaVersion: '', + } + } + + const [_, webrpcGenVersion] = versions[0]!.split('@') + const [codeGenName, codeGenVersion] = versions[1]!.split('@') + const [schemaName, schemaVersion] = versions[2]!.split('@') + + return { + webrpcGenVersion: webrpcGenVersion!, + codeGenName: codeGenName!, + codeGenVersion: codeGenVersion!, + schemaName: schemaName!, + schemaVersion: schemaVersion!, + } +} + +// +// Types +// + +export enum KeyType { + P256K1 = 'P256K1', + P256R1 = 'P256R1', +} + +export enum IdentityType { + None = 'None', + Guest = 'Guest', + Email = 'Email', + OIDC = 'OIDC', +} + +export interface Attestation { + identityType: IdentityType + issuerHash: string + audienceHash: string + authData: Array + extraData: Array +} + +export interface InitiateAuthParams { + ecosystemId: string + authKey: AuthKey + identityType: IdentityType + verifier: string +} + +export interface RegisterAuthParams { + ecosystemId: string + authKey: AuthKey + identityType: IdentityType + verifier: string + answer: string +} + +export interface SignParams { + ecosystemId: string + signer: string + digest: string + authKey: AuthKey + signature: string +} + +export interface Identity { + type: IdentityType + issuer: string + subject: string + email: string +} + +export interface AuthKey { + publicKey: string + keyType: KeyType +} + +export interface AuthKeyData { + ecoId: string + signerAddress: string + publicKey: string + keyType: KeyType + expiry: string +} + +export interface SignerData { + ecoId: string + identity: Identity + privateKey: string +} + +export interface AuthCommitmentData { + ecoId: string + authKey: AuthKey + identityType: IdentityType + verifier: string + challenge: string + answer: string + expiry: string +} + +export interface IdentityInstrument { + initiateAuth(args: InitiateAuthArgs, headers?: object, signal?: AbortSignal): Promise + registerAuth(args: RegisterAuthArgs, headers?: object, signal?: AbortSignal): Promise + sign(args: SignArgs, headers?: object, signal?: AbortSignal): Promise +} + +export interface InitiateAuthArgs { + params: InitiateAuthParams +} + +export interface InitiateAuthReturn { + challenge: string +} +export interface RegisterAuthArgs { + params: RegisterAuthParams +} + +export interface RegisterAuthReturn { + signer: string +} +export interface SignArgs { + params: SignParams +} + +export interface SignReturn { + signature: string +} + +// +// Client +// +export class IdentityInstrument implements IdentityInstrument { + protected hostname: string + protected fetch: Fetch + protected path = '/rpc/IdentityInstrument/' + + constructor(hostname: string, fetch: Fetch) { + this.hostname = hostname.replace(/\/*$/, '') + this.fetch = (input: RequestInfo, init?: RequestInit) => fetch(input, init) + } + + private url(name: string): string { + return this.hostname + this.path + name + } + + initiateAuth = (args: InitiateAuthArgs, headers?: object, signal?: AbortSignal): Promise => { + return this.fetch(this.url('InitiateAuth'), createHTTPRequest(args, headers, signal)).then( + (res) => { + return buildResponse(res).then((_data) => { + return { + challenge: _data.challenge, + } + }) + }, + (error) => { + throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) + }, + ) + } + + registerAuth = (args: RegisterAuthArgs, headers?: object, signal?: AbortSignal): Promise => { + return this.fetch(this.url('RegisterAuth'), createHTTPRequest(args, headers, signal)).then( + (res) => { + return buildResponse(res).then((_data) => { + return { + signer: _data.signer, + } + }) + }, + (error) => { + throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) + }, + ) + } + + sign = (args: SignArgs, headers?: object, signal?: AbortSignal): Promise => { + return this.fetch(this.url('Sign'), createHTTPRequest(args, headers, signal)).then( + (res) => { + return buildResponse(res).then((_data) => { + return { + signature: _data.signature, + } + }) + }, + (error) => { + throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) + }, + ) + } +} + +const createHTTPRequest = (body: object = {}, headers: object = {}, signal: AbortSignal | null = null): object => { + const reqHeaders: { [key: string]: string } = { ...headers, 'Content-Type': 'application/json' } + reqHeaders[WebrpcHeader] = WebrpcHeaderValue + + return { + method: 'POST', + headers: reqHeaders, + body: JSON.stringify(body || {}), + signal, + } +} + +const buildResponse = (res: Response): Promise => { + return res.text().then((text) => { + let data + try { + data = JSON.parse(text) + } catch (error) { + let message = '' + if (error instanceof Error) { + message = error.message + } + throw WebrpcBadResponseError.new({ + status: res.status, + cause: `JSON.parse(): ${message}: response text: ${text}`, + }) + } + if (!res.ok) { + const code: number = typeof data.code === 'number' ? data.code : 0 + throw (webrpcErrorByCode[code] || WebrpcError).new(data) + } + return data + }) +} + +// +// Errors +// + +export class WebrpcError extends Error { + name: string + code: number + message: string + status: number + cause?: string + + /** @deprecated Use message instead of msg. Deprecated in webrpc v0.11.0. */ + msg: string + + constructor(name: string, code: number, message: string, status: number, cause?: string) { + super(message) + this.name = name || 'WebrpcError' + this.code = typeof code === 'number' ? code : 0 + this.message = message || `endpoint error ${this.code}` + this.msg = this.message + this.status = typeof status === 'number' ? status : 0 + this.cause = cause + Object.setPrototypeOf(this, WebrpcError.prototype) + } + + static new(payload: any): WebrpcError { + return new this(payload.error, payload.code, payload.message || payload.msg, payload.status, payload.cause) + } +} + +// Webrpc errors + +export class WebrpcEndpointError extends WebrpcError { + constructor( + name: string = 'WebrpcEndpoint', + code: number = 0, + message: string = `endpoint error`, + status: number = 0, + cause?: string, + ) { + super(name, code, message, status, cause) + Object.setPrototypeOf(this, WebrpcEndpointError.prototype) + } +} + +export class WebrpcRequestFailedError extends WebrpcError { + constructor( + name: string = 'WebrpcRequestFailed', + code: number = -1, + message: string = `request failed`, + status: number = 0, + cause?: string, + ) { + super(name, code, message, status, cause) + Object.setPrototypeOf(this, WebrpcRequestFailedError.prototype) + } +} + +export class WebrpcBadRouteError extends WebrpcError { + constructor( + name: string = 'WebrpcBadRoute', + code: number = -2, + message: string = `bad route`, + status: number = 0, + cause?: string, + ) { + super(name, code, message, status, cause) + Object.setPrototypeOf(this, WebrpcBadRouteError.prototype) + } +} + +export class WebrpcBadMethodError extends WebrpcError { + constructor( + name: string = 'WebrpcBadMethod', + code: number = -3, + message: string = `bad method`, + status: number = 0, + cause?: string, + ) { + super(name, code, message, status, cause) + Object.setPrototypeOf(this, WebrpcBadMethodError.prototype) + } +} + +export class WebrpcBadRequestError extends WebrpcError { + constructor( + name: string = 'WebrpcBadRequest', + code: number = -4, + message: string = `bad request`, + status: number = 0, + cause?: string, + ) { + super(name, code, message, status, cause) + Object.setPrototypeOf(this, WebrpcBadRequestError.prototype) + } +} + +export class WebrpcBadResponseError extends WebrpcError { + constructor( + name: string = 'WebrpcBadResponse', + code: number = -5, + message: string = `bad response`, + status: number = 0, + cause?: string, + ) { + super(name, code, message, status, cause) + Object.setPrototypeOf(this, WebrpcBadResponseError.prototype) + } +} + +export class WebrpcServerPanicError extends WebrpcError { + constructor( + name: string = 'WebrpcServerPanic', + code: number = -6, + message: string = `server panic`, + status: number = 0, + cause?: string, + ) { + super(name, code, message, status, cause) + Object.setPrototypeOf(this, WebrpcServerPanicError.prototype) + } +} + +export class WebrpcInternalErrorError extends WebrpcError { + constructor( + name: string = 'WebrpcInternalError', + code: number = -7, + message: string = `internal error`, + status: number = 0, + cause?: string, + ) { + super(name, code, message, status, cause) + Object.setPrototypeOf(this, WebrpcInternalErrorError.prototype) + } +} + +export class WebrpcClientDisconnectedError extends WebrpcError { + constructor( + name: string = 'WebrpcClientDisconnected', + code: number = -8, + message: string = `client disconnected`, + status: number = 0, + cause?: string, + ) { + super(name, code, message, status, cause) + Object.setPrototypeOf(this, WebrpcClientDisconnectedError.prototype) + } +} + +export class WebrpcStreamLostError extends WebrpcError { + constructor( + name: string = 'WebrpcStreamLost', + code: number = -9, + message: string = `stream lost`, + status: number = 0, + cause?: string, + ) { + super(name, code, message, status, cause) + Object.setPrototypeOf(this, WebrpcStreamLostError.prototype) + } +} + +export class WebrpcStreamFinishedError extends WebrpcError { + constructor( + name: string = 'WebrpcStreamFinished', + code: number = -10, + message: string = `stream finished`, + status: number = 0, + cause?: string, + ) { + super(name, code, message, status, cause) + Object.setPrototypeOf(this, WebrpcStreamFinishedError.prototype) + } +} + +// Schema errors + +export enum errors { + WebrpcEndpoint = 'WebrpcEndpoint', + WebrpcRequestFailed = 'WebrpcRequestFailed', + WebrpcBadRoute = 'WebrpcBadRoute', + WebrpcBadMethod = 'WebrpcBadMethod', + WebrpcBadRequest = 'WebrpcBadRequest', + WebrpcBadResponse = 'WebrpcBadResponse', + WebrpcServerPanic = 'WebrpcServerPanic', + WebrpcInternalError = 'WebrpcInternalError', + WebrpcClientDisconnected = 'WebrpcClientDisconnected', + WebrpcStreamLost = 'WebrpcStreamLost', + WebrpcStreamFinished = 'WebrpcStreamFinished', +} + +export enum WebrpcErrorCodes { + WebrpcEndpoint = 0, + WebrpcRequestFailed = -1, + WebrpcBadRoute = -2, + WebrpcBadMethod = -3, + WebrpcBadRequest = -4, + WebrpcBadResponse = -5, + WebrpcServerPanic = -6, + WebrpcInternalError = -7, + WebrpcClientDisconnected = -8, + WebrpcStreamLost = -9, + WebrpcStreamFinished = -10, +} + +export const webrpcErrorByCode: { [code: number]: any } = { + [0]: WebrpcEndpointError, + [-1]: WebrpcRequestFailedError, + [-2]: WebrpcBadRouteError, + [-3]: WebrpcBadMethodError, + [-4]: WebrpcBadRequestError, + [-5]: WebrpcBadResponseError, + [-6]: WebrpcServerPanicError, + [-7]: WebrpcInternalErrorError, + [-8]: WebrpcClientDisconnectedError, + [-9]: WebrpcStreamLostError, + [-10]: WebrpcStreamFinishedError, +} + +export type Fetch = (input: RequestInfo, init?: RequestInit) => Promise diff --git a/packages/wdk/src/secure-store.ts b/packages/wdk/src/secure-store.ts new file mode 100644 index 000000000..4cb2e9a2d --- /dev/null +++ b/packages/wdk/src/secure-store.ts @@ -0,0 +1,104 @@ +export interface SecureStoreBackend { + get(dbName: string, dbStoreName: string, key: string): Promise + set(dbName: string, dbStoreName: string, key: string, value: any, validUntil: Date): Promise + delete(dbName: string, dbStoreName: string, key: string): Promise +} + +export const getDefaultSecureStoreBackend = (): SecureStoreBackend | null => { + return new LocalStorageSecureStoreBackend() +} + +export function isIndexedDbAvailable(): boolean { + return typeof indexedDB === 'object' +} + +export class LocalStorageSecureStoreBackend implements SecureStoreBackend { + private storage: Storage + + constructor() { + this.storage = localStorage + } + + async get(dbName: string, dbStoreName: string, key: string): Promise { + const value = this.storage.getItem(`${dbName}-${dbStoreName}-${key}`) + if (!value) { + return null + } + const { value: storedValue, validUntil } = JSON.parse(value) + if (validUntil && validUntil < new Date()) { + await this.delete(dbName, dbStoreName, key) + return null + } + return storedValue + } + + async set(dbName: string, dbStoreName: string, key: string, value: any, validUntil: Date): Promise { + this.storage.setItem(`${dbName}-${dbStoreName}-${key}`, JSON.stringify({ value, validUntil })) + return true + } + + async delete(dbName: string, dbStoreName: string, key: string): Promise { + this.storage.removeItem(`${dbName}-${dbStoreName}-${key}`) + return true + } +} + +/* +export class IndexedDbSecureStoreBackend implements SecureStoreBackend { + private db: IDBPDatabase | null + private idb: typeof import('idb') | null = null + + constructor() { + if (!isIndexedDbAvailable()) { + throw new Error('IndexedDB is not available') + } + this.db = null + } + + private async openDB(dbName: string, dbStoreName: string, version: number): Promise { + if (this.db) { + return this.db + } + + if (!this.idb) { + this.idb = await import('idb') + } + + this.db = await this.idb.openDB(dbName, 1, { + upgrade(db) { + db.createObjectStore(dbStoreName) + } + }) + + return this.db + } + + async get(dbName: string, dbStoreName: string, key: string): Promise { + const db = await this.openDB(dbName, dbStoreName, 1) + const tx = db.transaction(dbStoreName, 'readonly') + const { value, validUntil } = await db.get(dbStoreName, key) + await tx.done + if (validUntil && validUntil < new Date()) { + await this.delete(dbName, dbStoreName, key) + return null + } + return value + } + + async set(dbName: string, dbStoreName: string, key: string, value: any, validUntil: Date): Promise { + const db = await this.openDB(dbName, dbStoreName, 1) + const tx = db.transaction(dbStoreName, 'readwrite') + await db.put(dbStoreName, { value, validUntil }, key) + await tx.done + return true + } + + async delete(dbName: string, dbStoreName: string, key: string): Promise { + const db = await this.openDB(dbName, dbStoreName, 1) + const tx = db.transaction(dbStoreName, 'readwrite') + await db.delete(dbStoreName, key) + await tx.done + return true + } +} +*/ diff --git a/packages/wdk/src/signer.ts b/packages/wdk/src/signer.ts new file mode 100644 index 000000000..a733addd0 --- /dev/null +++ b/packages/wdk/src/signer.ts @@ -0,0 +1,36 @@ +import { Payload } from '@0xsequence/sequence-primitives' +import { Signer, Signature } from '@0xsequence/sequence-core' +import { AuthKey } from './authkey' +import { IdentityInstrument } from './nitro' + +export class IdentitySigner implements Signer { + constructor( + readonly ecosystemId: string, + readonly nitro: IdentityInstrument, + readonly authKey: AuthKey, + ) {} + + get address(): `0x${string}` { + if (!this.authKey.identitySigner) { + throw new Error('No signer address found') + } + return this.authKey.identitySigner + } + + async sign(payload: Payload): Promise { + if (payload.type !== 'digest') { + throw new Error(`IdentitySigner cannot sign ${payload.type} payloads`) + } + + const authKeySignature = await this.authKey.signMessage(payload.digest.toString()) + const params = { + ecosystemId: this.ecosystemId, + signer: this.address, + digest: payload.digest, + authKey: this.authKey.toProto(), + signature: authKeySignature, + } + const res = await this.nitro.sign({ params }) + return { type: 'hash', signature: res.signature as `0x${string}` } + } +} diff --git a/packages/wdk/src/subtle-crypto.ts b/packages/wdk/src/subtle-crypto.ts new file mode 100644 index 000000000..686d8c4bf --- /dev/null +++ b/packages/wdk/src/subtle-crypto.ts @@ -0,0 +1,128 @@ +export interface SubtleCryptoBackend { + // generateKey is used to generate a new key pair. NOTE: its important to pass + // `false` to the extractable argument to ensure that the private key contents + // cannot be revealed. Note, that you can still use `extractable:false` and the + // `exportKey(..)` method, because the Browser is smart enough to keep the key + // opaque and only allow it to be exported in a wrapped format without revealing + // the private key contents. + generateKey( + algorithm: RsaHashedKeyGenParams | EcKeyGenParams, + extractable: boolean, + keyUsages: KeyUsage[], + ): Promise + + importKey( + format: 'jwk', + keyData: JsonWebKey, + algorithm: AlgorithmIdentifier | RsaHashedImportParams | EcKeyImportParams | HmacImportParams | AesKeyAlgorithm, + extractable: boolean, + keyUsages: ReadonlyArray, + ): Promise + + // exportKey is used to export a key pair. The `format` argument is used to + // specify the format of the exported key. The `key` argument is the key pair + // to export. In general we'll use `format: 'raw'` and `key: `. + // Contents will be opaque when `extractable: false` was passed to `generateKey(..)`. + exportKey(format: Exclude, key: CryptoKey): Promise + + // digest is used to hash a message. The `algorithm` argument is used to specify + // the hash algorithm to use. The `data` argument is the message to hash. + digest(algorithm: AlgorithmIdentifier, data: Uint8Array): Promise + + // sign is used to sign a message. The `algorithm` argument is used to specify + // the signing algorithm to use. The `key` argument is the private key to use + // for signing. The `data` argument is the message to sign. + // + // For our purposes we just care about ECDSA / P-256. + sign( + algorithm: AlgorithmIdentifier | RsaPssParams | EcdsaParams, + key: CryptoKey, + data: Uint8Array, + ): Promise + + // verify is used to verify a signature. The `algorithm` argument is used to + // specify the verification algorithm to use. The `key` argument is the public + // key to use for verification. The `signature` argument is the signature to + // verify. The `data` argument is the message to verify. + verify( + algorithm: AlgorithmIdentifier | RsaPssParams | EcdsaParams, + key: CryptoKey, + signature: Uint8Array, + data: Uint8Array, + ): Promise + + // getRandomValues is used to generate random bytes. The `len` argument is the + // number of random bytes to generate. + getRandomValues(len: number): Uint8Array +} + +export const getDefaultSubtleCryptoBackend = (): SubtleCryptoBackend | undefined => { + if (isWindowSubtleCryptoAvailable()) { + return new WindowSubtleCryptoBackend() + } else { + return undefined + } +} + +export function isWindowSubtleCryptoAvailable(): boolean { + return typeof window === 'object' && typeof window.crypto === 'object' && typeof window.crypto.subtle === 'object' +} + +export class WindowSubtleCryptoBackend implements SubtleCryptoBackend { + constructor() { + if (!isWindowSubtleCryptoAvailable()) { + throw new Error('window.crypto.subtle is not available') + } + } + + generateKey( + algorithm: RsaHashedKeyGenParams | EcKeyGenParams, + extractable: boolean, + keyUsages: KeyUsage[], + ): Promise { + return window.crypto.subtle.generateKey(algorithm, extractable, keyUsages) + } + + importKey( + format: 'jwk', + keyData: JsonWebKey, + algorithm: AlgorithmIdentifier | RsaHashedImportParams | EcKeyImportParams | HmacImportParams | AesKeyAlgorithm, + extractable: boolean, + keyUsages: ReadonlyArray, + ): Promise { + return window.crypto.subtle.importKey(format, keyData, algorithm, extractable, keyUsages) + } + + async exportKey(format: Exclude, key: CryptoKey): Promise { + const keyData = await window.crypto.subtle.exportKey(format, key) + return new Uint8Array(keyData) + } + + async digest(algorithm: AlgorithmIdentifier, data: Uint8Array): Promise { + const digest = await window.crypto.subtle.digest(algorithm, data) + return new Uint8Array(digest) + } + + async sign( + algorithm: AlgorithmIdentifier | RsaPssParams | EcdsaParams, + key: CryptoKey, + data: Uint8Array, + ): Promise { + const signature = await window.crypto.subtle.sign(algorithm, key, data) + return new Uint8Array(signature) + } + + verify( + algorithm: AlgorithmIdentifier | RsaPssParams | EcdsaParams, + key: CryptoKey, + signature: Uint8Array, + data: Uint8Array, + ): Promise { + return window.crypto.subtle.verify(algorithm, key, signature, data) + } + + getRandomValues(len: number) { + const randomValues = new Uint8Array(len) + return window.crypto.getRandomValues(randomValues) + } +} diff --git a/packages/wdk/src/wdk.ts b/packages/wdk/src/wdk.ts new file mode 100644 index 000000000..7a7bbc676 --- /dev/null +++ b/packages/wdk/src/wdk.ts @@ -0,0 +1,65 @@ +import { Challenge, IdTokenChallenge } from './challenge' +import { IdentityInstrument } from './nitro' +import { AuthKey } from './authkey' +import { IdentitySigner } from './signer' +import { getDefaultSecureStoreBackend } from './secure-store' + +export class Wdk { + constructor( + readonly ecosystemId: string, + readonly nitro: IdentityInstrument, + ) {} + + public async loginWithIdToken(issuer: string, audience: string, idToken: string) { + const challenge = new IdTokenChallenge(issuer, audience, idToken) + await this.initiateAuth(challenge) + return await this.completeAuth(challenge) + } + + public async getSigner() { + const authKey = await this.getAuthKey() + if (!authKey.identitySigner) { + throw new Error('No signer address found') + } + return new IdentitySigner(this.ecosystemId, this.nitro, authKey) + } + + private async initiateAuth(challenge: Challenge) { + const authKey = await this.getAuthKey() + const challengeParams = challenge.getParams() + const params = { + ecosystemId: this.ecosystemId, + authKey: authKey.toProto(), + ...challengeParams, + answer: undefined, + } + const res = await this.nitro.initiateAuth({ params }) + return res.challenge + } + + private async completeAuth(challenge: Challenge) { + const authKey = await this.getAuthKey() + const challengeParams = challenge.getParams() + const params = { + answer: '', + ...challengeParams, + ecosystemId: this.ecosystemId, + authKey: authKey.toProto(), + } + const res = await this.nitro.registerAuth({ params }) + await authKey.setIdentitySigner(res.signer as `0x${string}`) + return new IdentitySigner(this.ecosystemId, this.nitro, authKey) + } + + private async getAuthKey() { + const backend = getDefaultSecureStoreBackend() + if (!backend) { + throw new Error('No secure store backend available') + } + const authKey = await AuthKey.fromStorage(backend) + if (!authKey) { + return await AuthKey.createRandom(backend) + } + return authKey + } +} diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index e7b7c7c2d..01fba35dc 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -232,6 +232,18 @@ importers: '@0xsequence/sequence-core': specifier: workspace:^ version: link:../core + '@0xsequence/sequence-primitives': + specifier: workspace:^ + version: link:../primitives + idb: + specifier: ^7.1.1 + version: 7.1.1 + jwt-decode: + specifier: ^4.0.0 + version: 4.0.0 + ox: + specifier: ^0.6.7 + version: 0.6.7(typescript@5.7.3) devDependencies: '@repo/typescript-config': specifier: workspace:^ @@ -1567,6 +1579,9 @@ packages: resolution: {integrity: sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==} engines: {node: '>=0.10.0'} + idb@7.1.1: + resolution: {integrity: sha512-gchesWBzyvGHRO9W8tzUWFDycow5gwjvFKfyV9FF32Y7F50yZMp7mP+T2mJIWFx49zicqyC4uefHM17o6xKIVQ==} + ieee754@1.2.1: resolution: {integrity: sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==} @@ -1804,6 +1819,10 @@ packages: resolution: {integrity: sha512-ZZow9HBI5O6EPgSJLUb8n2NKgmVWTwCvHGwFuJlMjvLFqlGG6pjirPhtdsseaLZjSibD8eegzmYpUZwoIlj2cQ==} engines: {node: '>=4.0'} + jwt-decode@4.0.0: + resolution: {integrity: sha512-+KJGIyHgkGuIq3IEBNftfhW/LfWhXUIY6OmyVWjliu5KH1y0fw7VQ8YndE2O4qZdMSd9SqbnC8GOcZEy0Om7sA==} + engines: {node: '>=18'} + keyv@4.5.4: resolution: {integrity: sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw==} @@ -3369,6 +3388,10 @@ snapshots: '@typescript-eslint/types': 8.15.0 eslint-visitor-keys: 4.2.0 + abitype@1.0.8(typescript@5.5.4): + optionalDependencies: + typescript: 5.5.4 + abitype@1.0.8(typescript@5.7.3): optionalDependencies: typescript: 5.7.3 @@ -4283,6 +4306,8 @@ snapshots: dependencies: safer-buffer: 2.1.2 + idb@7.1.1: {} + ieee754@1.2.1: {} ignore-by-default@1.0.1: {} @@ -4525,6 +4550,8 @@ snapshots: object.assign: 4.1.5 object.values: 1.2.0 + jwt-decode@4.0.0: {} + keyv@4.5.4: dependencies: json-buffer: 3.0.1 @@ -4793,6 +4820,20 @@ snapshots: outdent@0.5.0: {} + ox@0.6.7(typescript@5.5.4): + dependencies: + '@adraffy/ens-normalize': 1.11.0 + '@noble/curves': 1.8.1 + '@noble/hashes': 1.7.1 + '@scure/bip32': 1.6.2 + '@scure/bip39': 1.5.4 + abitype: 1.0.8(typescript@5.5.4) + eventemitter3: 5.0.1 + optionalDependencies: + typescript: 5.5.4 + transitivePeerDependencies: + - zod + ox@0.6.7(typescript@5.7.3): dependencies: '@adraffy/ens-normalize': 1.11.0 From 3c3440c13e44c19065b72676faf0dcd5ce0706e4 Mon Sep 17 00:00:00 2001 From: Patryk Kalinowski Date: Mon, 24 Feb 2025 13:16:47 +0100 Subject: [PATCH 140/439] wdk: update IdentitySigner --- packages/wdk/src/signer.ts | 25 +++++++++++++++---------- 1 file changed, 15 insertions(+), 10 deletions(-) diff --git a/packages/wdk/src/signer.ts b/packages/wdk/src/signer.ts index a733addd0..fc77aa44d 100644 --- a/packages/wdk/src/signer.ts +++ b/packages/wdk/src/signer.ts @@ -1,5 +1,6 @@ -import { Payload } from '@0xsequence/sequence-primitives' -import { Signer, Signature } from '@0xsequence/sequence-core' +import { Address, Signature, Hex, Bytes } from 'ox' +import { ParentedPayload, SignatureOfSignerLeaf, hash } from '@0xsequence/sequence-primitives' +import { Signer } from '@0xsequence/sequence-core' import { AuthKey } from './authkey' import { IdentityInstrument } from './nitro' @@ -17,20 +18,24 @@ export class IdentitySigner implements Signer { return this.authKey.identitySigner } - async sign(payload: Payload): Promise { - if (payload.type !== 'digest') { - throw new Error(`IdentitySigner cannot sign ${payload.type} payloads`) - } - - const authKeySignature = await this.authKey.signMessage(payload.digest.toString()) + async sign(wallet: Address.Address, chainId: bigint, payload: ParentedPayload) { + const payloadHash = hash(wallet, chainId, payload) + const authKeySignature = await this.authKey.signMessage(payloadHash.toString()) const params = { ecosystemId: this.ecosystemId, signer: this.address, - digest: payload.digest, + digest: payloadHash.toString(), authKey: this.authKey.toProto(), signature: authKeySignature, } const res = await this.nitro.sign({ params }) - return { type: 'hash', signature: res.signature as `0x${string}` } + Hex.assert(res.signature) + const sig = Signature.fromHex(res.signature) + return { + type: 'hash', + r: Bytes.fromNumber(sig.r), + s: Bytes.fromNumber(sig.s), + v: sig.yParity, + } as SignatureOfSignerLeaf } } From 1ecf142a768818152ac71ea22f72aad24c434847 Mon Sep 17 00:00:00 2001 From: William Hua Date: Mon, 24 Feb 2025 14:54:24 -0500 Subject: [PATCH 141/439] wdk: identity signer y parity to v --- packages/wdk/src/signer.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/wdk/src/signer.ts b/packages/wdk/src/signer.ts index fc77aa44d..1ca8a1d84 100644 --- a/packages/wdk/src/signer.ts +++ b/packages/wdk/src/signer.ts @@ -18,7 +18,7 @@ export class IdentitySigner implements Signer { return this.authKey.identitySigner } - async sign(wallet: Address.Address, chainId: bigint, payload: ParentedPayload) { + async sign(wallet: Address.Address, chainId: bigint, payload: ParentedPayload): Promise { const payloadHash = hash(wallet, chainId, payload) const authKeySignature = await this.authKey.signMessage(payloadHash.toString()) const params = { @@ -35,7 +35,7 @@ export class IdentitySigner implements Signer { type: 'hash', r: Bytes.fromNumber(sig.r), s: Bytes.fromNumber(sig.s), - v: sig.yParity, - } as SignatureOfSignerLeaf + v: Signature.yParityToV(sig.yParity), + } } } From 878d18b500f27bcda5b1a812b67dae37bce4f0af Mon Sep 17 00:00:00 2001 From: Patryk Kalinowski Date: Tue, 25 Feb 2025 19:52:18 +0100 Subject: [PATCH 142/439] wdk: add authMode and metadata to challenge params --- packages/wdk/src/challenge.ts | 45 ++++++++++++++++++++++--- packages/wdk/src/nitro/nitro.gen.ts | 51 +++++++++++++++++++---------- packages/wdk/src/wdk.ts | 6 ++-- 3 files changed, 76 insertions(+), 26 deletions(-) diff --git a/packages/wdk/src/challenge.ts b/packages/wdk/src/challenge.ts index 1bc9009f0..652399157 100644 --- a/packages/wdk/src/challenge.ts +++ b/packages/wdk/src/challenge.ts @@ -1,16 +1,17 @@ import { Hash, Hex } from 'ox' import { jwtDecode } from 'jwt-decode' -import { IdentityType } from './nitro' +import { IdentityType, AuthMode } from './nitro' export interface ChallengeParams { + authMode: AuthMode identityType: IdentityType verifier: string answer?: string + metadata: { [key: string]: string } } export abstract class Challenge { public abstract getParams(): ChallengeParams - public abstract withAnswer(answer: string): Challenge } export class IdTokenChallenge extends Challenge { @@ -26,13 +27,47 @@ export class IdTokenChallenge extends Challenge { const decoded = jwtDecode(this.idToken) const idTokenHash = Hash.keccak256(new TextEncoder().encode(this.idToken)) return { + authMode: AuthMode.IDToken, identityType: IdentityType.OIDC, - verifier: [this.issuer, this.audience, Hex.fromBytes(idTokenHash), decoded.exp].join('|'), + verifier: Hex.fromBytes(idTokenHash), answer: this.idToken, + metadata: { + iss: this.issuer, + aud: this.audience, + exp: decoded.exp?.toString() ?? '', + }, + } + } +} + +export class AuthCodePkceChallenge extends Challenge { + private verifier?: string + private authCode?: string + + constructor( + readonly issuer: string, + readonly audience: string, + ) { + super() + } + + public getParams(): ChallengeParams { + return { + authMode: AuthMode.AuthCodePKCE, + identityType: IdentityType.OIDC, + verifier: this.verifier ?? '', + answer: this.authCode ?? '', + metadata: { + iss: this.issuer, + aud: this.audience, + }, } } - public withAnswer(_answer: string): IdTokenChallenge { - return this + public withAnswer(verifier: string, authCode: string): AuthCodePkceChallenge { + const challenge = new AuthCodePkceChallenge(this.issuer, this.audience) + challenge.verifier = verifier + challenge.authCode = authCode + return challenge } } diff --git a/packages/wdk/src/nitro/nitro.gen.ts b/packages/wdk/src/nitro/nitro.gen.ts index 545ce33e6..341093e19 100644 --- a/packages/wdk/src/nitro/nitro.gen.ts +++ b/packages/wdk/src/nitro/nitro.gen.ts @@ -1,5 +1,5 @@ /* eslint-disable */ -// identity-instrument v0.1.0 4e9ac0518691855f457e1cc5ac4e15421325c8a0 +// identity-instrument v0.1.0 971b635a03efb658010d40cfdade0f698c3f3c56 // -- // Code generated by webrpc-gen@v0.22.1 with typescript generator. DO NOT EDIT. // @@ -16,7 +16,7 @@ export const WebRPCVersion = 'v1' export const WebRPCSchemaVersion = 'v0.1.0' // Schema hash generated from your RIDL schema -export const WebRPCSchemaHash = '4e9ac0518691855f457e1cc5ac4e15421325c8a0' +export const WebRPCSchemaHash = '971b635a03efb658010d40cfdade0f698c3f3c56' type WebrpcGenVersions = { webrpcGenVersion: string @@ -53,16 +53,16 @@ function parseWebrpcGenVersions(header: string): WebrpcGenVersions { } } - const [_, webrpcGenVersion] = versions[0]!.split('@') - const [codeGenName, codeGenVersion] = versions[1]!.split('@') - const [schemaName, schemaVersion] = versions[2]!.split('@') + const [_, webrpcGenVersion] = versions[0].split('@') + const [codeGenName, codeGenVersion] = versions[1].split('@') + const [schemaName, schemaVersion] = versions[2].split('@') return { - webrpcGenVersion: webrpcGenVersion!, - codeGenName: codeGenName!, - codeGenVersion: codeGenVersion!, - schemaName: schemaName!, - schemaVersion: schemaVersion!, + webrpcGenVersion, + codeGenName, + codeGenVersion, + schemaName, + schemaVersion, } } @@ -76,31 +76,34 @@ export enum KeyType { } export enum IdentityType { - None = 'None', Guest = 'Guest', Email = 'Email', OIDC = 'OIDC', } -export interface Attestation { - identityType: IdentityType - issuerHash: string - audienceHash: string - authData: Array - extraData: Array +export enum AuthMode { + Guest = 'Guest', + OTP = 'OTP', + IDToken = 'IDToken', + AccessToken = 'AccessToken', + AuthCode = 'AuthCode', + AuthCodePKCE = 'AuthCodePKCE', } export interface InitiateAuthParams { ecosystemId: string authKey: AuthKey identityType: IdentityType - verifier: string + authMode: AuthMode + metadata: { [key: string]: string } + verifier?: string } export interface RegisterAuthParams { ecosystemId: string authKey: AuthKey identityType: IdentityType + authMode: AuthMode verifier: string answer: string } @@ -120,6 +123,13 @@ export interface Identity { email: string } +export interface AuthID { + ecosystemId: string + authMode: AuthMode + identityType: IdentityType + verifier: string +} + export interface AuthKey { publicKey: string keyType: KeyType @@ -136,16 +146,19 @@ export interface AuthKeyData { export interface SignerData { ecoId: string identity: Identity + keyType: KeyType privateKey: string } export interface AuthCommitmentData { ecoId: string authKey: AuthKey + authMode: AuthMode identityType: IdentityType verifier: string challenge: string answer: string + metadata: { [key: string]: string } expiry: string } @@ -160,6 +173,7 @@ export interface InitiateAuthArgs { } export interface InitiateAuthReturn { + verifier: string challenge: string } export interface RegisterAuthArgs { @@ -199,6 +213,7 @@ export class IdentityInstrument implements IdentityInstrument { (res) => { return buildResponse(res).then((_data) => { return { + verifier: _data.verifier, challenge: _data.challenge, } }) diff --git a/packages/wdk/src/wdk.ts b/packages/wdk/src/wdk.ts index 7a7bbc676..84e18d9b8 100644 --- a/packages/wdk/src/wdk.ts +++ b/packages/wdk/src/wdk.ts @@ -24,7 +24,7 @@ export class Wdk { return new IdentitySigner(this.ecosystemId, this.nitro, authKey) } - private async initiateAuth(challenge: Challenge) { + public async initiateAuth(challenge: Challenge) { const authKey = await this.getAuthKey() const challengeParams = challenge.getParams() const params = { @@ -34,10 +34,10 @@ export class Wdk { answer: undefined, } const res = await this.nitro.initiateAuth({ params }) - return res.challenge + return [res.verifier, res.challenge] } - private async completeAuth(challenge: Challenge) { + public async completeAuth(challenge: Challenge) { const authKey = await this.getAuthKey() const challengeParams = challenge.getParams() const params = { From 7dd73519f875164479c16ba0cbb87ab8bd22e8f1 Mon Sep 17 00:00:00 2001 From: Michael Standen Date: Wed, 26 Feb 2025 09:28:31 +1300 Subject: [PATCH 143/439] Add build to ci --- .github/workflows/build.yml | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 .github/workflows/build.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 000000000..8f01516f8 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,30 @@ +name: Build + +on: + push: + branches: [main] + pull_request: + branches: [main] + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + + - name: Setup Node.js + uses: actions/setup-node@v4 + with: + node-version: '20' + + - name: Install pnpm + uses: pnpm/action-setup@v2 + with: + version: 8 + + - name: Install dependencies + run: pnpm install + + - name: Build + run: pnpm build From 7790c8b7e4fca85a61bc77fd5b54d4b1826e06b6 Mon Sep 17 00:00:00 2001 From: Michael Standen Date: Wed, 26 Feb 2025 09:32:40 +1300 Subject: [PATCH 144/439] Force fix nitro gen file --- packages/wdk/src/nitro/nitro.gen.ts | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/packages/wdk/src/nitro/nitro.gen.ts b/packages/wdk/src/nitro/nitro.gen.ts index 341093e19..e83067190 100644 --- a/packages/wdk/src/nitro/nitro.gen.ts +++ b/packages/wdk/src/nitro/nitro.gen.ts @@ -53,16 +53,16 @@ function parseWebrpcGenVersions(header: string): WebrpcGenVersions { } } - const [_, webrpcGenVersion] = versions[0].split('@') - const [codeGenName, codeGenVersion] = versions[1].split('@') - const [schemaName, schemaVersion] = versions[2].split('@') + const [_, webrpcGenVersion] = versions[0]!.split('@') + const [codeGenName, codeGenVersion] = versions[1]!.split('@') + const [schemaName, schemaVersion] = versions[2]!.split('@') return { - webrpcGenVersion, - codeGenName, - codeGenVersion, - schemaName, - schemaVersion, + webrpcGenVersion: webrpcGenVersion!, + codeGenName: codeGenName!, + codeGenVersion: codeGenVersion!, + schemaName: schemaName!, + schemaVersion: schemaVersion!, } } From 6dd76f8978d58319e48d32fb218f761943aa36c7 Mon Sep 17 00:00:00 2001 From: Michael Standen Date: Wed, 26 Feb 2025 12:00:17 +1300 Subject: [PATCH 145/439] Use ox Signature.Signature --- packages/core/src/state/memory.ts | 14 +---- packages/core/src/wallet.ts | 6 +- .../src/subcommands/signature.ts | 19 +++---- packages/primitives/src/session-signature.ts | 30 ++-------- packages/primitives/src/signature.ts | 56 ++++++------------- packages/primitives/src/utils.ts | 52 ++++++++++++++--- packages/wdk/src/signer.ts | 4 +- 7 files changed, 80 insertions(+), 101 deletions(-) diff --git a/packages/core/src/state/memory.ts b/packages/core/src/state/memory.ts index 1574badf5..b1e4fd159 100644 --- a/packages/core/src/state/memory.ts +++ b/packages/core/src/state/memory.ts @@ -19,7 +19,7 @@ import { sign, SignatureOfSignerLeaf, } from '@0xsequence/sequence-primitives' -import { Address, Bytes, Hex, PersonalMessage, Secp256k1, Signature } from 'ox' +import { Address, Bytes, Hex, PersonalMessage, Secp256k1 } from 'ox' import { StateProvider } from '.' export class MemoryStateProvider implements StateProvider { @@ -159,11 +159,7 @@ export class MemoryStateProvider implements StateProvider { case 'hash': signer = Secp256k1.recoverAddress({ payload: signature.type === 'eth_sign' ? PersonalMessage.getSignPayload(digest) : digest, - signature: { - r: Bytes.toBigInt(signature.r), - s: Bytes.toBigInt(signature.s), - yParity: Signature.vToYParity(signature.v), - }, + signature, }) break @@ -243,11 +239,7 @@ export class MemoryStateProvider implements StateProvider { signatures[ Secp256k1.recoverAddress({ payload: topology.signature.type === 'eth_sign' ? PersonalMessage.getSignPayload(digest) : digest, - signature: { - r: Bytes.toBigInt(topology.signature.r), - s: Bytes.toBigInt(topology.signature.s), - yParity: Signature.vToYParity(topology.signature.v), - }, + signature: topology.signature, }) ] = topology.signature break diff --git a/packages/core/src/wallet.ts b/packages/core/src/wallet.ts index bc6ab11a1..b542596b9 100644 --- a/packages/core/src/wallet.ts +++ b/packages/core/src/wallet.ts @@ -270,11 +270,7 @@ export class Wallet { !Secp256k1.verify({ payload: signature.type === 'eth_sign' ? PersonalMessage.getSignPayload(digest) : digest, address: leaf.address, - signature: { - r: Bytes.toBigInt(signature.r), - s: Bytes.toBigInt(signature.s), - yParity: Signature.vToYParity(signature.v), - }, + signature, }) ) { throw new Error(`invalid signature for ${leaf.type} signer ${leaf.address}`) diff --git a/packages/primitives-cli/src/subcommands/signature.ts b/packages/primitives-cli/src/subcommands/signature.ts index 738507250..82a61c1c2 100644 --- a/packages/primitives-cli/src/subcommands/signature.ts +++ b/packages/primitives-cli/src/subcommands/signature.ts @@ -1,18 +1,17 @@ -import { boolean, type CommandModule } from 'yargs' -import { fromPosOrStdin } from '../utils' import { configFromJson, - configToJson, decodeSignature, encodeSignature, fillLeaves, isSapientSignerLeaf, isSignerLeaf, rawSignatureToJson, + rsvFromStr, } from '@0xsequence/sequence-primitives' +import { Bytes, Hex, Signature } from 'ox' +import { type CommandModule } from 'yargs' +import { fromPosOrStdin } from '../utils' import { PossibleElements } from './config' -import { Bytes, Hex } from 'ox' - const SignatureElements = [ { type: 'eth_sign', @@ -71,19 +70,17 @@ export async function doEncode(input: string, signatures: string[] = [], noChain } if (candidate.type === 'eth_sign') { + const sig = rsvFromStr(candidate.values.join(':')) return { - r: Bytes.padLeft(Bytes.fromHex(candidate.values[0] as `0x${string}`), 32), - s: Bytes.padLeft(Bytes.fromHex(candidate.values[1] as `0x${string}`), 32), - v: Number(candidate.values[2]), + ...sig, type: 'eth_sign', } } if (candidate.type === 'hash') { + const sig = rsvFromStr(candidate.values.join(':')) return { - r: Bytes.padLeft(Bytes.fromHex(candidate.values[0] as `0x${string}`), 32), - s: Bytes.padLeft(Bytes.fromHex(candidate.values[1] as `0x${string}`), 32), - v: Number(candidate.values[2]), + ...sig, type: 'hash', } } diff --git a/packages/primitives/src/session-signature.ts b/packages/primitives/src/session-signature.ts index a3a892a76..d50e69db5 100644 --- a/packages/primitives/src/session-signature.ts +++ b/packages/primitives/src/session-signature.ts @@ -1,4 +1,4 @@ -import { Address, Bytes, Hex } from 'ox' +import { Address, Bytes, Signature } from 'ox' import { Attestation, attestationFromParsed, encodeAttestation, encodeAttestationForJson } from './attestation' import { MAX_PERMISSIONS_COUNT } from './permission' import { @@ -7,17 +7,17 @@ import { minimiseSessionsTopology, SessionsTopology, } from './session-config' -import { minBytesFor, packRSV } from './utils' +import { minBytesFor, packRSV, rsvFromStr, rsvToStr } from './utils' export type ImplicitSessionCallSignature = { attestation: Attestation - globalSignature: { v: number; r: Bytes.Bytes; s: Bytes.Bytes } - sessionSignature: { v: number; r: Bytes.Bytes; s: Bytes.Bytes } + globalSignature: Signature.Signature + sessionSignature: Signature.Signature } export type ExplicitSessionCallSignature = { permissionIndex: bigint - sessionSignature: { v: number; r: Bytes.Bytes; s: Bytes.Bytes } + sessionSignature: Signature.Signature } export type SessionCallSignature = ImplicitSessionCallSignature | ExplicitSessionCallSignature @@ -79,26 +79,6 @@ export function sessionCallSignatureFromParsed(decoded: any): SessionCallSignatu } } -function rsvToStr(rsv: { v: number; r: Bytes.Bytes; s: Bytes.Bytes }): string { - return `${rsv.r.toString()}:${rsv.s.toString()}:${rsv.v}` -} - -function rsvFromStr(sigStr: string): { v: number; r: Bytes.Bytes; s: Bytes.Bytes } { - const parts = sigStr.split(':') - if (parts.length !== 3) { - throw new Error('Signature must be in r:s:v format') - } - const [rStr, sStr, vStr] = parts - if (!rStr || !sStr || !vStr) { - throw new Error('Invalid signature format') - } - return { - v: parseInt(vStr, 10), - r: Bytes.fromHex(rStr as `0x${string}`), - s: Bytes.fromHex(sStr as `0x${string}`), - } -} - // Usage export function encodeSessionCallSignatures( diff --git a/packages/primitives/src/signature.ts b/packages/primitives/src/signature.ts index b9fb312e9..df5f79925 100644 --- a/packages/primitives/src/signature.ts +++ b/packages/primitives/src/signature.ts @@ -21,7 +21,7 @@ import { import { IS_VALID_SAPIENT_SIGNATURE, IS_VALID_SAPIENT_SIGNATURE_COMPACT, IS_VALID_SIGNATURE } from './constants' import { erc6492, erc6492Decode } from './erc-6492' import { fromConfigUpdate, hash, ParentedPayload } from './payload' -import { minBytesFor } from './utils' +import { minBytesFor, packRSV, unpackRSV } from './utils' export const FLAG_SIGNATURE_HASH = 0 export const FLAG_ADDRESS = 1 @@ -36,12 +36,9 @@ export const FLAG_SIGNATURE_SAPIENT = 9 export const FLAG_SIGNATURE_SAPIENT_COMPACT = 10 export type SignatureOfSignerLeaf = - | { - r: Bytes.Bytes - s: Bytes.Bytes - v: number + | (Signature.Signature & { type: 'eth_sign' | 'hash' - } + }) | { address: `0x${string}` data: Bytes.Bytes @@ -277,24 +274,15 @@ export function parseBranch(signature: Bytes.Bytes): { if (index + 64 > signature.length) { throw new Error('Not enough bytes for hash signature (r + yParityAndS)') } - const r = signature.slice(index, index + 32) - const yParityAndS = signature.slice(index + 32, index + 64) + const unpackedRSV = unpackRSV(signature.slice(index, index + 64)) index += 64 - const yParity = (yParityAndS[0]! & 0x80) !== 0 ? 1 : 0 - const s = new Uint8Array(32) - s.set(yParityAndS) - s[0] = s[0]! & 0x7f // clear the top bit - - const v = 27 + yParity nodes.push({ type: 'unrecovered-signer', weight: BigInt(weight), signature: { type: 'hash', - r, - s, - v, + ...unpackedRSV, }, } as RawSignerLeaf) continue @@ -486,15 +474,14 @@ export function parseBranch(signature: Bytes.Bytes): { s.set(yParityAndS) s[0] = s[0]! & 0x7f - const v = 27 + yParity nodes.push({ type: 'unrecovered-signer', weight: BigInt(weight), signature: { type: 'eth_sign', - r, - s, - v, + r: Bytes.toBigInt(r), + s: Bytes.toBigInt(s), + yParity, }, } as RawSignerLeaf) continue @@ -778,13 +765,8 @@ export function encodeTopology( throw new Error('Weight too large') } - const r = Bytes.padLeft(topology.signature.r, 32) - const s = Bytes.padLeft(topology.signature.s, 32) - if (topology.signature.v % 2 === 0) { - s[0]! |= 0x80 - } - - return Bytes.concat(Bytes.fromNumber(flag), weightBytes, r, s) + const packedRSV = packRSV(topology.signature) + return Bytes.concat(Bytes.fromNumber(flag), weightBytes, packedRSV) } else if (topology.signature.type === 'erc1271') { let flag = FLAG_SIGNATURE_ERC1271 << 4 @@ -968,9 +950,9 @@ function rawSignatureOfLeafToJson(sig: SignatureOfSignerLeaf | SignatureOfSapien if (sig.type === 'eth_sign' || sig.type === 'hash') { return { type: sig.type, - r: Bytes.toHex(sig.r), - s: Bytes.toHex(sig.s), - v: sig.v, + r: sig.r, + s: sig.s, + yParity: sig.yParity, } } if (sig.type === 'erc1271') { @@ -1072,9 +1054,9 @@ function rawSignatureOfLeafFromJson(obj: any): SignatureOfSignerLeaf | Signature case 'hash': return { type: obj.type, - r: Bytes.fromHex(obj.r), - s: Bytes.fromHex(obj.s), - v: obj.v, + r: obj.r, + s: obj.s, + yParity: obj.yParity, } case 'erc1271': return { @@ -1175,11 +1157,7 @@ async function recoverTopology( ), ) : digest, - signature: { - r: Bytes.toBigInt(topology.signature.r), - s: Bytes.toBigInt(topology.signature.s), - yParity: Signature.vToYParity(topology.signature.v), - }, + signature: topology.signature, }), weight: topology.weight, signed: true, diff --git a/packages/primitives/src/utils.ts b/packages/primitives/src/utils.ts index ea4a8a11e..739968bc2 100644 --- a/packages/primitives/src/utils.ts +++ b/packages/primitives/src/utils.ts @@ -1,16 +1,54 @@ -import { Bytes } from 'ox' +import { Bytes, Signature } from 'ox' export function minBytesFor(val: bigint): number { return Math.ceil(val.toString(16).length / 2) } // ERC-2098 -export function packRSV({ r, s, v }: { r: Bytes.Bytes; s: Bytes.Bytes; v: number }): Bytes.Bytes { - r = Bytes.padLeft(r, 32) - s = Bytes.padLeft(s, 32) - if (v % 2 === 0) { - s[0]! |= 0x80 +export function packRSV(signature: Signature.Signature): Bytes.Bytes { + const { r, s, yParity } = signature + const rBytes = Bytes.fromNumber(r, { size: 32 }) + const sBytes = Bytes.fromNumber(s, { size: 32 }) + if (yParity % 2 === 1) { + sBytes[0]! |= 0x80 } - return Bytes.concat(r, s) + return Bytes.concat(rBytes, sBytes) +} + +export function unpackRSV(packed: Bytes.Bytes): Signature.Signature { + if (packed.length !== 64) { + throw new Error('Invalid packed signature length') + } + const r = Bytes.toBigInt(packed.slice(0, 32)) + const yParityAndS = packed.slice(32, 64) + const yParity = (yParityAndS[0]! & 0x80) !== 0 ? 1 : 0 + const sArray = new Uint8Array(32) + sArray.set(yParityAndS) + sArray[0] = sArray[0]! & 0x7f + const s = Bytes.toBigInt(sArray) + return { r, s, yParity } +} + +// RSV string encoding + +export function rsvToStr(rsv: Signature.Signature): string { + return `${rsv.r.toString()}:${rsv.s.toString()}:${Signature.yParityToV(rsv.yParity)}` +} + +export function rsvFromStr(sigStr: string): Signature.Signature { + const parts = sigStr.split(':') + if (parts.length !== 3) { + throw new Error('Signature must be in r:s:v format') + } + const [rStr, sStr, vStr] = parts + if (!rStr || !sStr || !vStr) { + throw new Error('Invalid signature format') + } + + return { + r: Bytes.toBigInt(Bytes.fromHex(rStr as `0x${string}`, { size: 32 })), + s: Bytes.toBigInt(Bytes.fromHex(sStr as `0x${string}`, { size: 32 })), + yParity: Signature.vToYParity(parseInt(vStr, 10)), + } } diff --git a/packages/wdk/src/signer.ts b/packages/wdk/src/signer.ts index 1ca8a1d84..d030b3660 100644 --- a/packages/wdk/src/signer.ts +++ b/packages/wdk/src/signer.ts @@ -33,9 +33,7 @@ export class IdentitySigner implements Signer { const sig = Signature.fromHex(res.signature) return { type: 'hash', - r: Bytes.fromNumber(sig.r), - s: Bytes.fromNumber(sig.s), - v: Signature.yParityToV(sig.yParity), + ...sig, } } } From 53242d0ffb15655a9bcdc0febe5c625600fe0632 Mon Sep 17 00:00:00 2001 From: Michael Standen Date: Wed, 26 Feb 2025 12:16:21 +1300 Subject: [PATCH 146/439] Rename global signer to identity signer --- .../primitives-cli/src/subcommands/server.ts | 4 +- .../primitives-cli/src/subcommands/session.ts | 26 ++--- packages/primitives/src/session-config.ts | 102 +++++++++--------- packages/primitives/src/session-signature.ts | 12 ++- 4 files changed, 73 insertions(+), 71 deletions(-) diff --git a/packages/primitives-cli/src/subcommands/server.ts b/packages/primitives-cli/src/subcommands/server.ts index 8d207ed8b..0a4b3c8a2 100644 --- a/packages/primitives-cli/src/subcommands/server.ts +++ b/packages/primitives-cli/src/subcommands/server.ts @@ -135,8 +135,8 @@ const rpcMethods: Record Promise> = { // SESSION async session_empty(params) { - const { globalSigner } = params - const result = await session.doEmptyTopology(globalSigner) + const { identitySigner } = params + const result = await session.doEmptyTopology(identitySigner) return result }, async session_encodeConfiguration(params) { diff --git a/packages/primitives-cli/src/subcommands/session.ts b/packages/primitives-cli/src/subcommands/session.ts index 608f12fa1..7f3022bc7 100644 --- a/packages/primitives-cli/src/subcommands/session.ts +++ b/packages/primitives-cli/src/subcommands/session.ts @@ -1,19 +1,19 @@ -import { CommandModule } from 'yargs' -import sessionExplicitCommand from './sessionExplicit' -import sessionImplicitCommand from './sessionImplicit' import { emptySessionsTopology, + encodeSessionCallSignatures, hashConfigurationTree, sessionCallSignatureFromJson, sessionsTopologyFromJson, sessionsTopologyToConfigurationTree, sessionsTopologyToJson, } from '@0xsequence/sequence-primitives' -import { encodeSessionCallSignatures } from '@0xsequence/sequence-primitives' -import { Bytes, Hex } from 'ox' +import { Hex } from 'ox' +import { CommandModule } from 'yargs' +import sessionExplicitCommand from './sessionExplicit' +import sessionImplicitCommand from './sessionImplicit' -export async function doEmptyTopology(globalSigner: `0x${string}`): Promise { - const topology = emptySessionsTopology(globalSigner) +export async function doEmptyTopology(identitySigner: `0x${string}`): Promise { + const topology = emptySessionsTopology(identitySigner) return sessionsTopologyToJson(topology) } @@ -53,18 +53,18 @@ const sessionCommand: CommandModule = { builder: (yargs) => { return yargs .command( - 'empty [global-signer]', - 'Create an empty session topology with the given global signer', + 'empty [identity-signer]', + 'Create an empty session topology with the given identity signer', (yargs) => { - return yargs.positional('global-signer', { + return yargs.positional('identity-signer', { type: 'string', - description: 'The global signer for the session topology', + description: 'The identity signer for the session topology', demandOption: true, - alias: 'g', + alias: 'i', }) }, async (args) => { - console.log(await doEmptyTopology(args.globalSigner as `0x${string}`)) + console.log(await doEmptyTopology(args.identitySigner as `0x${string}`)) }, ) .command( diff --git a/packages/primitives/src/session-config.ts b/packages/primitives/src/session-config.ts index ced0c6018..ddb180923 100644 --- a/packages/primitives/src/session-config.ts +++ b/packages/primitives/src/session-config.ts @@ -13,18 +13,18 @@ export const SESSIONS_FLAG_PERMISSIONS = 0 export const SESSIONS_FLAG_NODE = 1 export const SESSIONS_FLAG_BRANCH = 2 export const SESSIONS_FLAG_BLACKLIST = 3 -export const SESSIONS_FLAG_GLOBAL_SIGNER = 4 +export const SESSIONS_FLAG_IDENTITY_SIGNER = 4 export type ImplicitBlacklist = { blacklist: Address.Address[] } -export type GlobalSignerLeaf = { - globalSigner: Address.Address +export type IdentitySignerLeaf = { + identitySigner: Address.Address } export type SessionNode = Bytes.Bytes // Hashed -export type SessionLeaf = SessionPermissions | ImplicitBlacklist | GlobalSignerLeaf +export type SessionLeaf = SessionPermissions | ImplicitBlacklist | IdentitySignerLeaf export type SessionBranch = [SessionsTopology, SessionsTopology, ...SessionsTopology[]] export type SessionsTopology = SessionBranch | SessionLeaf | SessionNode @@ -36,8 +36,8 @@ function isImplicitBlacklist(topology: any): topology is ImplicitBlacklist { return typeof topology === 'object' && topology !== null && 'blacklist' in topology } -function isGlobalSignerLeaf(topology: any): topology is GlobalSignerLeaf { - return typeof topology === 'object' && topology !== null && 'globalSigner' in topology +function isIdentitySignerLeaf(topology: any): topology is IdentitySignerLeaf { + return typeof topology === 'object' && topology !== null && 'identitySigner' in topology } function isSessionPermissions(topology: any): topology is SessionPermissions { @@ -45,7 +45,7 @@ function isSessionPermissions(topology: any): topology is SessionPermissions { } function isSessionsLeaf(topology: any): topology is SessionLeaf { - return isImplicitBlacklist(topology) || isGlobalSignerLeaf(topology) || isSessionPermissions(topology) + return isImplicitBlacklist(topology) || isIdentitySignerLeaf(topology) || isSessionPermissions(topology) } function isSessionsBranch(topology: any): topology is SessionBranch { @@ -58,7 +58,7 @@ export function isSessionsTopology(topology: any): topology is SessionsTopology /** * Checks if the topology is complete. - * A complete topology has exactly one global signer and one blacklist. + * A complete topology has exactly one identity signer and one blacklist. * @param topology The topology to check * @returns True if the topology is complete */ @@ -67,49 +67,49 @@ export function isCompleteSessionsTopology(topology: any): topology is SessionsT if (!isSessionsTopology(topology)) { return false } - // Check the topology contains exactly one global signer and one blacklist - const { globalSignerCount, blacklistCount } = checkIsCompleteSessionsBranch(topology) - return globalSignerCount === 1 && blacklistCount === 1 + // Check the topology contains exactly one identity signer and one blacklist + const { identitySignerCount, blacklistCount } = checkIsCompleteSessionsBranch(topology) + return identitySignerCount === 1 && blacklistCount === 1 } function checkIsCompleteSessionsBranch(topology: SessionsTopology): { - globalSignerCount: number + identitySignerCount: number blacklistCount: number } { - let thisHasGlobalSigner = 0 + let thisHasIdentitySigner = 0 let thisHasBlacklist = 0 if (isSessionsBranch(topology)) { for (const child of topology) { - const { globalSignerCount, blacklistCount } = checkIsCompleteSessionsBranch(child) - thisHasGlobalSigner += globalSignerCount + const { identitySignerCount, blacklistCount } = checkIsCompleteSessionsBranch(child) + thisHasIdentitySigner += identitySignerCount thisHasBlacklist += blacklistCount } } - if (isGlobalSignerLeaf(topology)) { - thisHasGlobalSigner++ + if (isIdentitySignerLeaf(topology)) { + thisHasIdentitySigner++ } if (isImplicitBlacklist(topology)) { thisHasBlacklist++ } - return { globalSignerCount: thisHasGlobalSigner, blacklistCount: thisHasBlacklist } + return { identitySignerCount: thisHasIdentitySigner, blacklistCount: thisHasBlacklist } } /** - * Gets the global signer from the topology. - * @param topology The topology to get the global signer from - * @returns The global signer or null if it's not present + * Gets the identity signer from the topology. + * @param topology The topology to get the identity signer from + * @returns The identity signer or null if it's not present */ -export function getGlobalSigner(topology: SessionsTopology): Address.Address | null { - if (isGlobalSignerLeaf(topology)) { +export function getIdentitySigner(topology: SessionsTopology): Address.Address | null { + if (isIdentitySignerLeaf(topology)) { // Got it - return topology.globalSigner + return topology.identitySigner } if (isSessionsBranch(topology)) { // Check branches - const results = topology.map(getGlobalSigner).filter((t) => t !== null) + const results = topology.map(getIdentitySigner).filter((t) => t !== null) if (results.length > 1) { - throw new Error('Multiple global signers') + throw new Error('Multiple identity signers') } if (results.length === 1) { return results[0]! @@ -192,10 +192,10 @@ export function encodeLeafToBytes(leaf: SessionLeaf): Bytes.Bytes { Bytes.concat(...leaf.blacklist.map((b) => Bytes.padLeft(Bytes.fromHex(b), 20))), ) } - if (isGlobalSignerLeaf(leaf)) { + if (isIdentitySignerLeaf(leaf)) { return Bytes.concat( - Bytes.fromNumber(SESSIONS_FLAG_GLOBAL_SIGNER), - Bytes.padLeft(Bytes.fromHex(leaf.globalSigner), 20), + Bytes.fromNumber(SESSIONS_FLAG_IDENTITY_SIGNER), + Bytes.padLeft(Bytes.fromHex(leaf.identitySigner), 20), ) } // Unreachable @@ -211,8 +211,8 @@ export function decodeLeafFromBytes(bytes: Bytes.Bytes): SessionLeaf { } return { blacklist } } - if (flag === SESSIONS_FLAG_GLOBAL_SIGNER) { - return { globalSigner: Bytes.toHex(bytes.slice(1, 21)) } + if (flag === SESSIONS_FLAG_IDENTITY_SIGNER) { + return { identitySigner: Bytes.toHex(bytes.slice(1, 21)) } } if (flag === SESSIONS_FLAG_PERMISSIONS) { return sessionPermissionsFromParsed(bytes.slice(1)) @@ -224,7 +224,7 @@ export function sessionsTopologyToConfigurationTree(topology: SessionsTopology): if (isSessionsBranch(topology)) { return topology.map(sessionsTopologyToConfigurationTree) as EncodedConfigurationBranch } - if (isImplicitBlacklist(topology) || isGlobalSignerLeaf(topology) || isSessionPermissions(topology)) { + if (isImplicitBlacklist(topology) || isIdentitySignerLeaf(topology) || isSessionPermissions(topology)) { return encodeLeafToBytes(topology) } if (isSessionsNode(topology)) { @@ -301,9 +301,9 @@ export function encodeSessionsTopology(topology: SessionsTopology): Bytes.Bytes return Bytes.concat(Bytes.fromNumber(flagByte), encoded) } - if (isGlobalSignerLeaf(topology)) { - const flagByte = SESSIONS_FLAG_GLOBAL_SIGNER << 4 - return Bytes.concat(Bytes.fromNumber(flagByte), Bytes.padLeft(Bytes.fromHex(topology.globalSigner), 20)) + if (isIdentitySignerLeaf(topology)) { + const flagByte = SESSIONS_FLAG_IDENTITY_SIGNER << 4 + return Bytes.concat(Bytes.fromNumber(flagByte), Bytes.padLeft(Bytes.fromHex(topology.identitySigner), 20)) } throw new Error('Invalid topology') @@ -324,7 +324,7 @@ function encodeSessionsTopologyForJson(topology: SessionsTopology): any { return encodeSessionPermissionsForJson(topology) } - if (isImplicitBlacklist(topology) || isGlobalSignerLeaf(topology)) { + if (isImplicitBlacklist(topology) || isIdentitySignerLeaf(topology)) { return topology // No encoding necessary } @@ -367,10 +367,10 @@ function sessionsTopologyFromParsed(parsed: any): SessionsTopology { return sessionPermissionsFromParsed(parsed) } - // Parse global signer - if (typeof parsed === 'object' && parsed !== null && 'globalSigner' in parsed) { - const globalSigner = parsed.globalSigner as `0x${string}` - return { globalSigner } + // Parse identity signer + if (typeof parsed === 'object' && parsed !== null && 'identitySigner' in parsed) { + const identitySigner = parsed.identitySigner as `0x${string}` + return { identitySigner } } // Parse blacklist @@ -476,17 +476,17 @@ function buildBalancedSessionsTopology(items: (SessionLeaf | SessionNode)[]): Se /** * Balances the topology by flattening and rebuilding as a balanced binary tree. - * This does not make a binary tree as the blacklist and global signer are included at the top level. + * This does not make a binary tree as the blacklist and identity signer are included at the top level. */ export function balanceSessionsTopology(topology: SessionsTopology): SessionsTopology { const flattened = flattenSessionsTopology(topology) const blacklist = flattened.find((l) => isImplicitBlacklist(l)) - const globalSigner = flattened.find((l) => isGlobalSignerLeaf(l)) + const identitySigner = flattened.find((l) => isIdentitySignerLeaf(l)) const leaves = flattened.filter((l) => isSessionPermissions(l)) - if (!blacklist || !globalSigner) { - throw new Error('No blacklist or global signer') + if (!blacklist || !identitySigner) { + throw new Error('No blacklist or identity signer') } - return buildBalancedSessionsTopology([blacklist, globalSigner, ...leaves]) + return buildBalancedSessionsTopology([blacklist, identitySigner, ...leaves]) } /** @@ -514,7 +514,7 @@ export function cleanSessionsTopology( return topology } - if (isGlobalSignerLeaf(topology) || isImplicitBlacklist(topology)) { + if (isIdentitySignerLeaf(topology) || isImplicitBlacklist(topology)) { return topology } @@ -575,8 +575,8 @@ export function minimiseSessionsTopology( // If there are implicit signers, we can't roll up the blacklist return topology } - if (isGlobalSignerLeaf(topology)) { - // Never roll up the global signer + if (isIdentitySignerLeaf(topology)) { + // Never roll up the identity signer return topology } if (isSessionsNode(topology)) { @@ -620,15 +620,15 @@ export function removeFromImplicitBlacklist(topology: SessionsTopology, address: } /** - * Generate an empty sessions topology with the given global signer. No session permission and an empty blacklist + * Generate an empty sessions topology with the given identity signer. No session permission and an empty blacklist */ -export function emptySessionsTopology(globalSigner: Address.Address): SessionsTopology { +export function emptySessionsTopology(identitySigner: Address.Address): SessionsTopology { return [ { blacklist: [], }, { - globalSigner, + identitySigner, }, ] } diff --git a/packages/primitives/src/session-signature.ts b/packages/primitives/src/session-signature.ts index d50e69db5..27289cdbe 100644 --- a/packages/primitives/src/session-signature.ts +++ b/packages/primitives/src/session-signature.ts @@ -11,7 +11,7 @@ import { minBytesFor, packRSV, rsvFromStr, rsvToStr } from './utils' export type ImplicitSessionCallSignature = { attestation: Attestation - globalSignature: Signature.Signature + identitySignature: Signature.Signature sessionSignature: Signature.Signature } @@ -25,7 +25,7 @@ export type SessionCallSignature = ImplicitSessionCallSignature | ExplicitSessio export function isImplicitSessionCallSignature( callSignature: SessionCallSignature, ): callSignature is ImplicitSessionCallSignature { - return 'attestation' in callSignature && 'globalSignature' in callSignature && 'sessionSignature' in callSignature + return 'attestation' in callSignature && 'identitySignature' in callSignature && 'sessionSignature' in callSignature } export function isExplicitSessionCallSignature( @@ -44,7 +44,7 @@ export function encodeSessionCallSignatureForJson(callSignature: SessionCallSign if (isImplicitSessionCallSignature(callSignature)) { return { attestation: encodeAttestationForJson(callSignature.attestation), - globalSignature: rsvToStr(callSignature.globalSignature), + identitySignature: rsvToStr(callSignature.identitySignature), sessionSignature: rsvToStr(callSignature.sessionSignature), } } else if (isExplicitSessionCallSignature(callSignature)) { @@ -66,7 +66,7 @@ export function sessionCallSignatureFromParsed(decoded: any): SessionCallSignatu if (decoded.attestation) { return { attestation: attestationFromParsed(decoded.attestation), - globalSignature: rsvFromStr(decoded.globalSignature), + identitySignature: rsvFromStr(decoded.identitySignature), sessionSignature: rsvFromStr(decoded.sessionSignature), } } else if (decoded.permissionIndex) { @@ -115,7 +115,9 @@ export function encodeSessionCallSignatures( const attestationStr = JSON.stringify(callSig.attestation) if (!attestationMap.has(attestationStr)) { attestationMap.set(attestationStr, encodedAttestations.length) - encodedAttestations.push(Bytes.concat(encodeAttestation(callSig.attestation), packRSV(callSig.globalSignature))) + encodedAttestations.push( + Bytes.concat(encodeAttestation(callSig.attestation), packRSV(callSig.identitySignature)), + ) } } }) From ebfa23efacffedf283b0db033cb41c71dc387b3a Mon Sep 17 00:00:00 2001 From: William Hua Date: Wed, 26 Feb 2025 09:07:15 -0500 Subject: [PATCH 147/439] Revert "Use ox Signature.Signature" This reverts commit 6dd76f8978d58319e48d32fb218f761943aa36c7. --- packages/core/src/state/memory.ts | 14 ++++- packages/core/src/wallet.ts | 6 +- .../src/subcommands/signature.ts | 19 ++++--- packages/primitives/src/session-signature.ts | 30 ++++++++-- packages/primitives/src/signature.ts | 56 +++++++++++++------ packages/primitives/src/utils.ts | 52 +++-------------- packages/wdk/src/signer.ts | 4 +- 7 files changed, 101 insertions(+), 80 deletions(-) diff --git a/packages/core/src/state/memory.ts b/packages/core/src/state/memory.ts index b1e4fd159..1574badf5 100644 --- a/packages/core/src/state/memory.ts +++ b/packages/core/src/state/memory.ts @@ -19,7 +19,7 @@ import { sign, SignatureOfSignerLeaf, } from '@0xsequence/sequence-primitives' -import { Address, Bytes, Hex, PersonalMessage, Secp256k1 } from 'ox' +import { Address, Bytes, Hex, PersonalMessage, Secp256k1, Signature } from 'ox' import { StateProvider } from '.' export class MemoryStateProvider implements StateProvider { @@ -159,7 +159,11 @@ export class MemoryStateProvider implements StateProvider { case 'hash': signer = Secp256k1.recoverAddress({ payload: signature.type === 'eth_sign' ? PersonalMessage.getSignPayload(digest) : digest, - signature, + signature: { + r: Bytes.toBigInt(signature.r), + s: Bytes.toBigInt(signature.s), + yParity: Signature.vToYParity(signature.v), + }, }) break @@ -239,7 +243,11 @@ export class MemoryStateProvider implements StateProvider { signatures[ Secp256k1.recoverAddress({ payload: topology.signature.type === 'eth_sign' ? PersonalMessage.getSignPayload(digest) : digest, - signature: topology.signature, + signature: { + r: Bytes.toBigInt(topology.signature.r), + s: Bytes.toBigInt(topology.signature.s), + yParity: Signature.vToYParity(topology.signature.v), + }, }) ] = topology.signature break diff --git a/packages/core/src/wallet.ts b/packages/core/src/wallet.ts index b542596b9..bc6ab11a1 100644 --- a/packages/core/src/wallet.ts +++ b/packages/core/src/wallet.ts @@ -270,7 +270,11 @@ export class Wallet { !Secp256k1.verify({ payload: signature.type === 'eth_sign' ? PersonalMessage.getSignPayload(digest) : digest, address: leaf.address, - signature, + signature: { + r: Bytes.toBigInt(signature.r), + s: Bytes.toBigInt(signature.s), + yParity: Signature.vToYParity(signature.v), + }, }) ) { throw new Error(`invalid signature for ${leaf.type} signer ${leaf.address}`) diff --git a/packages/primitives-cli/src/subcommands/signature.ts b/packages/primitives-cli/src/subcommands/signature.ts index 82a61c1c2..738507250 100644 --- a/packages/primitives-cli/src/subcommands/signature.ts +++ b/packages/primitives-cli/src/subcommands/signature.ts @@ -1,17 +1,18 @@ +import { boolean, type CommandModule } from 'yargs' +import { fromPosOrStdin } from '../utils' import { configFromJson, + configToJson, decodeSignature, encodeSignature, fillLeaves, isSapientSignerLeaf, isSignerLeaf, rawSignatureToJson, - rsvFromStr, } from '@0xsequence/sequence-primitives' -import { Bytes, Hex, Signature } from 'ox' -import { type CommandModule } from 'yargs' -import { fromPosOrStdin } from '../utils' import { PossibleElements } from './config' +import { Bytes, Hex } from 'ox' + const SignatureElements = [ { type: 'eth_sign', @@ -70,17 +71,19 @@ export async function doEncode(input: string, signatures: string[] = [], noChain } if (candidate.type === 'eth_sign') { - const sig = rsvFromStr(candidate.values.join(':')) return { - ...sig, + r: Bytes.padLeft(Bytes.fromHex(candidate.values[0] as `0x${string}`), 32), + s: Bytes.padLeft(Bytes.fromHex(candidate.values[1] as `0x${string}`), 32), + v: Number(candidate.values[2]), type: 'eth_sign', } } if (candidate.type === 'hash') { - const sig = rsvFromStr(candidate.values.join(':')) return { - ...sig, + r: Bytes.padLeft(Bytes.fromHex(candidate.values[0] as `0x${string}`), 32), + s: Bytes.padLeft(Bytes.fromHex(candidate.values[1] as `0x${string}`), 32), + v: Number(candidate.values[2]), type: 'hash', } } diff --git a/packages/primitives/src/session-signature.ts b/packages/primitives/src/session-signature.ts index 27289cdbe..d5b502489 100644 --- a/packages/primitives/src/session-signature.ts +++ b/packages/primitives/src/session-signature.ts @@ -1,4 +1,4 @@ -import { Address, Bytes, Signature } from 'ox' +import { Address, Bytes, Hex } from 'ox' import { Attestation, attestationFromParsed, encodeAttestation, encodeAttestationForJson } from './attestation' import { MAX_PERMISSIONS_COUNT } from './permission' import { @@ -7,17 +7,17 @@ import { minimiseSessionsTopology, SessionsTopology, } from './session-config' -import { minBytesFor, packRSV, rsvFromStr, rsvToStr } from './utils' +import { minBytesFor, packRSV } from './utils' export type ImplicitSessionCallSignature = { attestation: Attestation - identitySignature: Signature.Signature - sessionSignature: Signature.Signature + identitySignature: { v: number; r: Bytes.Bytes; s: Bytes.Bytes } + sessionSignature: { v: number; r: Bytes.Bytes; s: Bytes.Bytes } } export type ExplicitSessionCallSignature = { permissionIndex: bigint - sessionSignature: Signature.Signature + sessionSignature: { v: number; r: Bytes.Bytes; s: Bytes.Bytes } } export type SessionCallSignature = ImplicitSessionCallSignature | ExplicitSessionCallSignature @@ -79,6 +79,26 @@ export function sessionCallSignatureFromParsed(decoded: any): SessionCallSignatu } } +function rsvToStr(rsv: { v: number; r: Bytes.Bytes; s: Bytes.Bytes }): string { + return `${rsv.r.toString()}:${rsv.s.toString()}:${rsv.v}` +} + +function rsvFromStr(sigStr: string): { v: number; r: Bytes.Bytes; s: Bytes.Bytes } { + const parts = sigStr.split(':') + if (parts.length !== 3) { + throw new Error('Signature must be in r:s:v format') + } + const [rStr, sStr, vStr] = parts + if (!rStr || !sStr || !vStr) { + throw new Error('Invalid signature format') + } + return { + v: parseInt(vStr, 10), + r: Bytes.fromHex(rStr as `0x${string}`), + s: Bytes.fromHex(sStr as `0x${string}`), + } +} + // Usage export function encodeSessionCallSignatures( diff --git a/packages/primitives/src/signature.ts b/packages/primitives/src/signature.ts index df5f79925..b9fb312e9 100644 --- a/packages/primitives/src/signature.ts +++ b/packages/primitives/src/signature.ts @@ -21,7 +21,7 @@ import { import { IS_VALID_SAPIENT_SIGNATURE, IS_VALID_SAPIENT_SIGNATURE_COMPACT, IS_VALID_SIGNATURE } from './constants' import { erc6492, erc6492Decode } from './erc-6492' import { fromConfigUpdate, hash, ParentedPayload } from './payload' -import { minBytesFor, packRSV, unpackRSV } from './utils' +import { minBytesFor } from './utils' export const FLAG_SIGNATURE_HASH = 0 export const FLAG_ADDRESS = 1 @@ -36,9 +36,12 @@ export const FLAG_SIGNATURE_SAPIENT = 9 export const FLAG_SIGNATURE_SAPIENT_COMPACT = 10 export type SignatureOfSignerLeaf = - | (Signature.Signature & { + | { + r: Bytes.Bytes + s: Bytes.Bytes + v: number type: 'eth_sign' | 'hash' - }) + } | { address: `0x${string}` data: Bytes.Bytes @@ -274,15 +277,24 @@ export function parseBranch(signature: Bytes.Bytes): { if (index + 64 > signature.length) { throw new Error('Not enough bytes for hash signature (r + yParityAndS)') } - const unpackedRSV = unpackRSV(signature.slice(index, index + 64)) + const r = signature.slice(index, index + 32) + const yParityAndS = signature.slice(index + 32, index + 64) index += 64 + const yParity = (yParityAndS[0]! & 0x80) !== 0 ? 1 : 0 + const s = new Uint8Array(32) + s.set(yParityAndS) + s[0] = s[0]! & 0x7f // clear the top bit + + const v = 27 + yParity nodes.push({ type: 'unrecovered-signer', weight: BigInt(weight), signature: { type: 'hash', - ...unpackedRSV, + r, + s, + v, }, } as RawSignerLeaf) continue @@ -474,14 +486,15 @@ export function parseBranch(signature: Bytes.Bytes): { s.set(yParityAndS) s[0] = s[0]! & 0x7f + const v = 27 + yParity nodes.push({ type: 'unrecovered-signer', weight: BigInt(weight), signature: { type: 'eth_sign', - r: Bytes.toBigInt(r), - s: Bytes.toBigInt(s), - yParity, + r, + s, + v, }, } as RawSignerLeaf) continue @@ -765,8 +778,13 @@ export function encodeTopology( throw new Error('Weight too large') } - const packedRSV = packRSV(topology.signature) - return Bytes.concat(Bytes.fromNumber(flag), weightBytes, packedRSV) + const r = Bytes.padLeft(topology.signature.r, 32) + const s = Bytes.padLeft(topology.signature.s, 32) + if (topology.signature.v % 2 === 0) { + s[0]! |= 0x80 + } + + return Bytes.concat(Bytes.fromNumber(flag), weightBytes, r, s) } else if (topology.signature.type === 'erc1271') { let flag = FLAG_SIGNATURE_ERC1271 << 4 @@ -950,9 +968,9 @@ function rawSignatureOfLeafToJson(sig: SignatureOfSignerLeaf | SignatureOfSapien if (sig.type === 'eth_sign' || sig.type === 'hash') { return { type: sig.type, - r: sig.r, - s: sig.s, - yParity: sig.yParity, + r: Bytes.toHex(sig.r), + s: Bytes.toHex(sig.s), + v: sig.v, } } if (sig.type === 'erc1271') { @@ -1054,9 +1072,9 @@ function rawSignatureOfLeafFromJson(obj: any): SignatureOfSignerLeaf | Signature case 'hash': return { type: obj.type, - r: obj.r, - s: obj.s, - yParity: obj.yParity, + r: Bytes.fromHex(obj.r), + s: Bytes.fromHex(obj.s), + v: obj.v, } case 'erc1271': return { @@ -1157,7 +1175,11 @@ async function recoverTopology( ), ) : digest, - signature: topology.signature, + signature: { + r: Bytes.toBigInt(topology.signature.r), + s: Bytes.toBigInt(topology.signature.s), + yParity: Signature.vToYParity(topology.signature.v), + }, }), weight: topology.weight, signed: true, diff --git a/packages/primitives/src/utils.ts b/packages/primitives/src/utils.ts index 739968bc2..ea4a8a11e 100644 --- a/packages/primitives/src/utils.ts +++ b/packages/primitives/src/utils.ts @@ -1,54 +1,16 @@ -import { Bytes, Signature } from 'ox' +import { Bytes } from 'ox' export function minBytesFor(val: bigint): number { return Math.ceil(val.toString(16).length / 2) } // ERC-2098 -export function packRSV(signature: Signature.Signature): Bytes.Bytes { - const { r, s, yParity } = signature - const rBytes = Bytes.fromNumber(r, { size: 32 }) - const sBytes = Bytes.fromNumber(s, { size: 32 }) - if (yParity % 2 === 1) { - sBytes[0]! |= 0x80 +export function packRSV({ r, s, v }: { r: Bytes.Bytes; s: Bytes.Bytes; v: number }): Bytes.Bytes { + r = Bytes.padLeft(r, 32) + s = Bytes.padLeft(s, 32) + if (v % 2 === 0) { + s[0]! |= 0x80 } - return Bytes.concat(rBytes, sBytes) -} - -export function unpackRSV(packed: Bytes.Bytes): Signature.Signature { - if (packed.length !== 64) { - throw new Error('Invalid packed signature length') - } - const r = Bytes.toBigInt(packed.slice(0, 32)) - const yParityAndS = packed.slice(32, 64) - const yParity = (yParityAndS[0]! & 0x80) !== 0 ? 1 : 0 - const sArray = new Uint8Array(32) - sArray.set(yParityAndS) - sArray[0] = sArray[0]! & 0x7f - const s = Bytes.toBigInt(sArray) - return { r, s, yParity } -} - -// RSV string encoding - -export function rsvToStr(rsv: Signature.Signature): string { - return `${rsv.r.toString()}:${rsv.s.toString()}:${Signature.yParityToV(rsv.yParity)}` -} - -export function rsvFromStr(sigStr: string): Signature.Signature { - const parts = sigStr.split(':') - if (parts.length !== 3) { - throw new Error('Signature must be in r:s:v format') - } - const [rStr, sStr, vStr] = parts - if (!rStr || !sStr || !vStr) { - throw new Error('Invalid signature format') - } - - return { - r: Bytes.toBigInt(Bytes.fromHex(rStr as `0x${string}`, { size: 32 })), - s: Bytes.toBigInt(Bytes.fromHex(sStr as `0x${string}`, { size: 32 })), - yParity: Signature.vToYParity(parseInt(vStr, 10)), - } + return Bytes.concat(r, s) } diff --git a/packages/wdk/src/signer.ts b/packages/wdk/src/signer.ts index d030b3660..1ca8a1d84 100644 --- a/packages/wdk/src/signer.ts +++ b/packages/wdk/src/signer.ts @@ -33,7 +33,9 @@ export class IdentitySigner implements Signer { const sig = Signature.fromHex(res.signature) return { type: 'hash', - ...sig, + r: Bytes.fromNumber(sig.r), + s: Bytes.fromNumber(sig.s), + v: Signature.yParityToV(sig.yParity), } } } From e37dea6923e5a16c8ccc036a02b3d2702dcffc3c Mon Sep 17 00:00:00 2001 From: Agusx1211 Date: Wed, 26 Feb 2025 14:52:07 +0000 Subject: [PATCH 148/439] Fix wdk build --- packages/wdk/src/subtle-crypto.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/packages/wdk/src/subtle-crypto.ts b/packages/wdk/src/subtle-crypto.ts index 686d8c4bf..ffe3e5581 100644 --- a/packages/wdk/src/subtle-crypto.ts +++ b/packages/wdk/src/subtle-crypto.ts @@ -65,7 +65,12 @@ export const getDefaultSubtleCryptoBackend = (): SubtleCryptoBackend | undefined } export function isWindowSubtleCryptoAvailable(): boolean { - return typeof window === 'object' && typeof window.crypto === 'object' && typeof window.crypto.subtle === 'object' + return ( + typeof window === 'object' && + typeof window.crypto === 'object' && + window.crypto !== null && + typeof (window.crypto as any).subtle === 'object' + ) } export class WindowSubtleCryptoBackend implements SubtleCryptoBackend { From c62890a220a08d5735b161e61724d1fa07562587 Mon Sep 17 00:00:00 2001 From: Agusx1211 Date: Wed, 26 Feb 2025 17:12:55 +0000 Subject: [PATCH 149/439] Add namespaces to primitives --- packages/core/src/index.ts | 2 + packages/core/src/signers/index.ts | 1 + packages/core/src/signers/pk.ts | 22 +++ packages/core/src/state/index.ts | 32 ++-- packages/core/src/state/memory.ts | 94 ++++++------ packages/core/src/wallet.ts | 140 +++++++++--------- .../primitives-cli/src/subcommands/address.ts | 9 +- .../primitives-cli/src/subcommands/config.ts | 30 ++-- .../src/subcommands/devTools.ts | 27 ++-- .../primitives-cli/src/subcommands/payload.ts | 10 +- .../src/subcommands/permission.ts | 15 +- .../primitives-cli/src/subcommands/session.ts | 31 ++-- .../src/subcommands/sessionExplicit.ts | 35 ++--- .../src/subcommands/sessionImplicit.ts | 10 +- .../src/subcommands/signature.ts | 39 ++--- packages/primitives/src/address.ts | 2 +- packages/primitives/src/constants.ts | 12 -- packages/primitives/src/context.ts | 14 ++ packages/primitives/src/erc-6492.ts | 3 +- packages/primitives/src/index.ts | 25 ++-- packages/wdk/src/signer.ts | 10 +- 21 files changed, 278 insertions(+), 285 deletions(-) create mode 100644 packages/core/src/signers/index.ts create mode 100644 packages/core/src/signers/pk.ts create mode 100644 packages/primitives/src/context.ts diff --git a/packages/core/src/index.ts b/packages/core/src/index.ts index 3f5770366..00f61fd3e 100644 --- a/packages/core/src/index.ts +++ b/packages/core/src/index.ts @@ -1,2 +1,4 @@ export * from './state' export * from './wallet' + +export * as Signers from './signers' diff --git a/packages/core/src/signers/index.ts b/packages/core/src/signers/index.ts new file mode 100644 index 000000000..ea493c46e --- /dev/null +++ b/packages/core/src/signers/index.ts @@ -0,0 +1 @@ +export * from './pk' diff --git a/packages/core/src/signers/pk.ts b/packages/core/src/signers/pk.ts new file mode 100644 index 000000000..67361dbe9 --- /dev/null +++ b/packages/core/src/signers/pk.ts @@ -0,0 +1,22 @@ +import { Hex, Bytes, PublicKey, Address, Secp256k1 } from 'ox' +import { Signer } from '../wallet' +import { Payload, Signature } from '@0xsequence/sequence-primitives' +import type { Payload as PayloadTypes, Signature as SignatureTypes } from '@0xsequence/sequence-primitives' + +export class Pk implements Signer { + public readonly address: Address.Address + public readonly pubKey: PublicKey.PublicKey + + constructor(private readonly privateKey: Hex.Hex | Bytes.Bytes) { + this.pubKey = Secp256k1.getPublicKey({ privateKey }) + this.address = Address.fromPublicKey(this.pubKey) + } + + async sign( + wallet: Address.Address, + chainId: bigint, + payload: PayloadTypes.ParentedPayload, + ): Promise { + throw new Error('Not implemented') + } +} diff --git a/packages/core/src/state/index.ts b/packages/core/src/state/index.ts index 82ede3dee..3d1f7096e 100644 --- a/packages/core/src/state/index.ts +++ b/packages/core/src/state/index.ts @@ -1,41 +1,43 @@ -import { - Configuration, - Context, - ParentedPayload, - RawSignature, - SignatureOfSignerLeaf, -} from '@0xsequence/sequence-primitives' import { Address, Hex } from 'ox' +import { Context, WalletConfig, Payload, Signature } from '@0xsequence/sequence-primitives' export type StateProvider = StateReader & StateWriter export interface StateReader { - getConfiguration(imageHash: Hex.Hex): MaybePromise + getConfiguration(imageHash: Hex.Hex): MaybePromise - getDeployHash(wallet: Address.Address): MaybePromise<{ deployHash: Hex.Hex; context: Context }> + getDeployHash(wallet: Address.Address): MaybePromise<{ deployHash: Hex.Hex; context: Context.Context }> getWallets(signer: Address.Address): MaybePromise<{ - [wallet: Address.Address]: { chainId: bigint; payload: ParentedPayload; signature: SignatureOfSignerLeaf } + [wallet: Address.Address]: { + chainId: bigint + payload: Payload.ParentedPayload + signature: Signature.SignatureOfSignerLeaf + } }> getConfigurationUpdates( wallet: Address.Address, fromImageHash: Hex.Hex, options?: { allUpdates?: boolean }, - ): MaybePromise> + ): MaybePromise> } export interface StateWriter { - saveWallet(deployConfiguration: Configuration, context: Context): MaybePromise + saveWallet(deployConfiguration: WalletConfig.Configuration, context: Context.Context): MaybePromise saveWitnesses( wallet: Address.Address, chainId: bigint, - payload: ParentedPayload, - signatures: SignatureOfSignerLeaf[], + payload: Payload.ParentedPayload, + signatures: Signature.SignatureOfSignerLeaf[], ): MaybePromise - setConfiguration(wallet: Address.Address, configuration: Configuration, signature: RawSignature): MaybePromise + setConfiguration( + wallet: Address.Address, + configuration: WalletConfig.Configuration, + signature: Signature.RawSignature, + ): MaybePromise } type MaybePromise = T | Promise diff --git a/packages/core/src/state/memory.ts b/packages/core/src/state/memory.ts index 1574badf5..32431cf4c 100644 --- a/packages/core/src/state/memory.ts +++ b/packages/core/src/state/memory.ts @@ -1,45 +1,37 @@ +import { Address, Bytes, Hex, PersonalMessage, Secp256k1, Signature } from 'ox' +import { StateProvider } from '.' import { - Configuration, Context, - fromConfigUpdate, - getCounterfactualAddress, - hash, - hashConfiguration, - isAnyAddressSubdigestLeaf, - isNodeLeaf, - isRawNestedLeaf, - isRawSignerLeaf, - isSapientSignerLeaf, - isSignedSignerLeaf, - isSignerLeaf, - isSubdigestLeaf, - ParentedPayload, - RawSignature, - RawTopology, - sign, - SignatureOfSignerLeaf, + WalletConfig, + Payload, + Signature as SignaturePrimitives, + Address as AddressPrimitives, } from '@0xsequence/sequence-primitives' -import { Address, Bytes, Hex, PersonalMessage, Secp256k1, Signature } from 'ox' -import { StateProvider } from '.' export class MemoryStateProvider implements StateProvider { private readonly objects: { - configurations: { [imageHash: Hex.Hex]: Configuration } - deployHashes: { [wallet: Address.Address]: { deployHash: Hex.Hex; context: Context } } + configurations: { [imageHash: Hex.Hex]: WalletConfig.Configuration } + deployHashes: { [wallet: Address.Address]: { deployHash: Hex.Hex; context: Context.Context } } wallets: { [signer: Address.Address]: { - [wallet: Address.Address]: { chainId: bigint; payload: ParentedPayload; signature: SignatureOfSignerLeaf } + [wallet: Address.Address]: { + chainId: bigint + payload: Payload.ParentedPayload + signature: SignaturePrimitives.SignatureOfSignerLeaf + } } } configurationUpdates: { [wallet: Address.Address]: { configurations: Hex.Hex[] - signerSignatures: { [imageHash: Hex.Hex]: { [signer: Address.Address]: SignatureOfSignerLeaf } } + signerSignatures: { + [imageHash: Hex.Hex]: { [signer: Address.Address]: SignaturePrimitives.SignatureOfSignerLeaf } + } } } } = { configurations: {}, deployHashes: {}, wallets: {}, configurationUpdates: {} } - getConfiguration(imageHash: Hex.Hex): Configuration { + getConfiguration(imageHash: Hex.Hex): WalletConfig.Configuration { const configuration = this.objects.configurations[imageHash] if (!configuration) { throw new Error(`unknown configuration ${imageHash}`) @@ -47,7 +39,7 @@ export class MemoryStateProvider implements StateProvider { return configuration } - getDeployHash(wallet: Address.Address): { deployHash: Hex.Hex; context: Context } { + getDeployHash(wallet: Address.Address): { deployHash: Hex.Hex; context: Context.Context } { const deployHash = this.objects.deployHashes[wallet] if (!deployHash) { throw new Error(`no known deploy hash for ${wallet}`) @@ -56,7 +48,11 @@ export class MemoryStateProvider implements StateProvider { } getWallets(signer: Address.Address): { - [wallet: Address.Address]: { chainId: bigint; payload: ParentedPayload; signature: SignatureOfSignerLeaf } + [wallet: Address.Address]: { + chainId: bigint + payload: Payload.ParentedPayload + signature: SignaturePrimitives.SignatureOfSignerLeaf + } } { return this.objects.wallets[signer] ?? {} } @@ -65,7 +61,7 @@ export class MemoryStateProvider implements StateProvider { wallet: Address.Address, fromImageHash: Hex.Hex, options?: { allUpdates?: boolean }, - ): Promise> { + ): Promise> { const objects = this.objects.configurationUpdates[wallet] if (!objects) { throw new Error(`unknown wallet ${wallet}`) @@ -92,7 +88,7 @@ export class MemoryStateProvider implements StateProvider { noChainId: true, configuration: { ...configuration, - topology: await sign( + topology: await WalletConfig.sign( configuration.topology, { sign: (leaf) => { @@ -135,10 +131,10 @@ export class MemoryStateProvider implements StateProvider { return updates } - saveWallet(deployConfiguration: Configuration, context: Context) { - const deployHashBytes = hashConfiguration(deployConfiguration) + saveWallet(deployConfiguration: WalletConfig.Configuration, context: Context.Context) { + const deployHashBytes = WalletConfig.hashConfiguration(deployConfiguration) const deployHash = Bytes.toHex(deployHashBytes) - const wallet = getCounterfactualAddress(deployHashBytes, context) + const wallet = AddressPrimitives.getCounterfactualAddress(deployHashBytes, context) this.objects.configurations[deployHash] = deployConfiguration this.objects.deployHashes[wallet] = { deployHash, context } this.objects.configurationUpdates[wallet] = { configurations: [deployHash], signerSignatures: {} } @@ -147,10 +143,10 @@ export class MemoryStateProvider implements StateProvider { saveWitnesses( wallet: Address.Address, chainId: bigint, - payload: ParentedPayload, - signatures: SignatureOfSignerLeaf[], + payload: Payload.ParentedPayload, + signatures: SignaturePrimitives.SignatureOfSignerLeaf[], ) { - const digest = hash(wallet, chainId, payload) + const digest = Payload.hash(wallet, chainId, payload) signatures.forEach((signature) => { let signer: Address.Address @@ -181,7 +177,11 @@ export class MemoryStateProvider implements StateProvider { }) } - setConfiguration(wallet: Address.Address, configuration: Configuration, signature: RawSignature) { + setConfiguration( + wallet: Address.Address, + configuration: WalletConfig.Configuration, + signature: SignaturePrimitives.RawSignature, + ) { const configurations = this.objects.configurationUpdates[wallet]?.configurations if (configurations?.length) { const latestImageHash = configurations[configurations.length - 1]! @@ -191,11 +191,11 @@ export class MemoryStateProvider implements StateProvider { } } - const imageHash = Bytes.toHex(hashConfiguration(configuration)) - const digest = hash(wallet, 0n, fromConfigUpdate(imageHash)) + const imageHash = Bytes.toHex(WalletConfig.hashConfiguration(configuration)) + const digest = Payload.hash(wallet, 0n, Payload.fromConfigUpdate(imageHash)) - const search = (topology: RawTopology) => { - if (isSignedSignerLeaf(topology)) { + const search = (topology: SignaturePrimitives.RawTopology) => { + if (SignaturePrimitives.isSignedSignerLeaf(topology)) { switch (topology.signature.type) { case 'eth_sign': case 'hash': @@ -214,17 +214,17 @@ export class MemoryStateProvider implements StateProvider { signatures[topology.address] = topology.signature break } - } else if (isSignerLeaf(topology)) { + } else if (WalletConfig.isSignerLeaf(topology)) { return - } else if (isSapientSignerLeaf(topology)) { + } else if (WalletConfig.isSapientSignerLeaf(topology)) { return - } else if (isSubdigestLeaf(topology)) { + } else if (WalletConfig.isSubdigestLeaf(topology)) { return - } else if (isAnyAddressSubdigestLeaf(topology)) { + } else if (WalletConfig.isAnyAddressSubdigestLeaf(topology)) { return - } else if (isNodeLeaf(topology)) { + } else if (WalletConfig.isNodeLeaf(topology)) { return - } else if (isRawSignerLeaf(topology)) { + } else if (SignaturePrimitives.isRawSignerLeaf(topology)) { let updates = this.objects.configurationUpdates[wallet] if (!updates) { updates = { configurations: [], signerSignatures: {} } @@ -252,7 +252,7 @@ export class MemoryStateProvider implements StateProvider { ] = topology.signature break } - } else if (isRawNestedLeaf(topology)) { + } else if (SignaturePrimitives.isRawNestedLeaf(topology)) { search(topology.tree) } else { search(topology[0]) diff --git a/packages/core/src/wallet.ts b/packages/core/src/wallet.ts index bc6ab11a1..bbdadc142 100644 --- a/packages/core/src/wallet.ts +++ b/packages/core/src/wallet.ts @@ -1,48 +1,26 @@ +import { AbiFunction, Address, Bytes, Hex, PersonalMessage, Provider, Secp256k1, Signature } from 'ox' +import { MemoryStateProvider, StateProvider } from '.' import { - Call, - CallPayload, - Configuration, + Constants, Context, - DefaultGuest, - DevContext1, - encode, - encodeSapient, - encodeSignature, - erc6492Deploy, - EXECUTE, - fromConfigUpdate, - GET_IMPLEMENTATION, - getCounterfactualAddress, - hash, - hashConfiguration, - IMAGE_HASH, - IS_VALID_SAPIENT_SIGNATURE, - IS_VALID_SAPIENT_SIGNATURE_COMPACT, - IS_VALID_SIGNATURE, - normalizeSignerSignature, - ParentedPayload, - RawSignature, - READ_NONCE, - sign, - SignatureOfSapientSignerLeaf, - SignatureOfSignerLeaf, - SignerErrorCallback, - SignerSignature, + WalletConfig, + Address as AddressPrimitives, + Erc6492, + Payload, + Signature as SignaturePrimitives, } from '@0xsequence/sequence-primitives' -import { AbiFunction, Address, Bytes, Hex, PersonalMessage, Provider, Secp256k1, Signature } from 'ox' -import { MemoryStateProvider, StateProvider } from '.' export type WalletOptions = { - context: Context + context: Context.Context stateProvider: StateProvider - onSignerError?: SignerErrorCallback + onSignerError?: WalletConfig.SignerErrorCallback guest: Address.Address } export const DefaultWalletOptions: WalletOptions = { - context: DevContext1, + context: Context.Dev1, stateProvider: new MemoryStateProvider(), - guest: DefaultGuest, + guest: Constants.DefaultGuest, } export class Wallet { @@ -56,10 +34,13 @@ export class Wallet { this.options = { ...DefaultWalletOptions, ...options } } - static async fromConfiguration(configuration: Configuration, options?: Partial): Promise { + static async fromConfiguration( + configuration: WalletConfig.Configuration, + options?: Partial, + ): Promise { const merged = { ...DefaultWalletOptions, ...options } await merged.stateProvider.saveWallet(configuration, merged.context) - return new Wallet(getCounterfactualAddress(configuration, merged.context), merged) + return new Wallet(AddressPrimitives.getCounterfactualAddress(configuration, merged.context), merged) } async setSigner(signer: Signer, isTrusted = false) { @@ -79,22 +60,22 @@ export class Wallet { async getDeployTransaction(): Promise<{ to: Address.Address; data: Hex.Hex }> { const { deployHash, context } = await this.options.stateProvider.getDeployHash(this.address) - return erc6492Deploy(deployHash, context) + return Erc6492.erc6492Deploy(deployHash, context) } async setConfiguration( - configuration: Configuration, - options?: { trustSigners?: boolean; onSignerError?: SignerErrorCallback }, + configuration: WalletConfig.Configuration, + options?: { trustSigners?: boolean; onSignerError?: WalletConfig.SignerErrorCallback }, ) { - const imageHash = hashConfiguration(configuration) - const signature = await this.sign(fromConfigUpdate(Bytes.toHex(imageHash)), options) + const imageHash = WalletConfig.hashConfiguration(configuration) + const signature = await this.sign(Payload.fromConfigUpdate(Bytes.toHex(imageHash)), options) await this.options.stateProvider.setConfiguration(this.address, configuration, signature) } async send( provider: Provider.Provider, - calls: Call[], - options?: { space?: bigint; trustSigners?: boolean; onSignerError?: SignerErrorCallback }, + calls: Payload.Call[], + options?: { space?: bigint; trustSigners?: boolean; onSignerError?: WalletConfig.SignerErrorCallback }, ) { return provider.request({ method: 'eth_sendTransaction', @@ -104,8 +85,8 @@ export class Wallet { async getTransaction( provider: Provider.Provider, - calls: Call[], - options?: { space?: bigint; trustSigners?: boolean; onSignerError?: SignerErrorCallback }, + calls: Payload.Call[], + options?: { space?: bigint; trustSigners?: boolean; onSignerError?: WalletConfig.SignerErrorCallback }, ): Promise<{ to: Address.Address; data: Hex.Hex }> { const space = options?.space ?? 0n @@ -113,21 +94,24 @@ export class Wallet { const nonce = BigInt( await provider.request({ method: 'eth_call', - params: [{ to: this.address, data: AbiFunction.encodeData(READ_NONCE, [space]) }], + params: [{ to: this.address, data: AbiFunction.encodeData(Constants.READ_NONCE, [space]) }], }), ) - const payload: CallPayload = { type: 'call', space, nonce, calls } + const payload: Payload.CallPayload = { type: 'call', space, nonce, calls } const signature = await this.sign(payload, { ...options, provider }) return { to: this.address, - data: AbiFunction.encodeData(EXECUTE, [Bytes.toHex(encode(payload)), Bytes.toHex(encodeSignature(signature))]), + data: AbiFunction.encodeData(Constants.EXECUTE, [ + Bytes.toHex(Payload.encode(payload)), + Bytes.toHex(SignaturePrimitives.encodeSignature(signature)), + ]), } } else { const nonce = 0n - const payload: CallPayload = { type: 'call', space, nonce, calls } + const payload: Payload.CallPayload = { type: 'call', space, nonce, calls } const [signature, deploy] = await Promise.all([ this.sign(payload, { ...options, provider }), this.getDeployTransaction(), @@ -135,9 +119,9 @@ export class Wallet { return { to: this.options.guest, - data: AbiFunction.encodeData(EXECUTE, [ + data: AbiFunction.encodeData(Constants.EXECUTE, [ Bytes.toHex( - encode({ + Payload.encode({ type: 'call', space: 0n, nonce: 0n, @@ -155,9 +139,9 @@ export class Wallet { to: this.address, value: 0n, data: Hex.toBytes( - AbiFunction.encodeData(EXECUTE, [ - Bytes.toHex(encode(payload)), - Bytes.toHex(encodeSignature(signature)), + AbiFunction.encodeData(Constants.EXECUTE, [ + Bytes.toHex(Payload.encode(payload)), + Bytes.toHex(SignaturePrimitives.encodeSignature(signature)), ]), ), gasLimit: 0n, @@ -175,16 +159,20 @@ export class Wallet { } async sign( - payload: ParentedPayload, - options?: { provider?: Provider.Provider; trustSigners?: boolean; onSignerError?: SignerErrorCallback }, - ): Promise { + payload: Payload.ParentedPayload, + options?: { + provider?: Provider.Provider + trustSigners?: boolean + onSignerError?: WalletConfig.SignerErrorCallback + }, + ): Promise { const provider = options?.provider let updates: Unpromise> = [] let chainId: bigint let isDeployed: boolean - let deployHash: { deployHash: Hex.Hex; context: Context } | undefined + let deployHash: { deployHash: Hex.Hex; context: Context.Context } | undefined let imageHash: Hex.Hex if (provider) { const requests = await Promise.all([ @@ -193,7 +181,7 @@ export class Wallet { provider .request({ method: 'eth_call', - params: [{ to: this.address, data: AbiFunction.encodeData(GET_IMPLEMENTATION) }], + params: [{ to: this.address, data: AbiFunction.encodeData(Constants.GET_IMPLEMENTATION) }], }) .then((res) => `0x${res.slice(26)}`) .catch(() => undefined), @@ -208,7 +196,7 @@ export class Wallet { if (isDeployed && implementation?.toLowerCase() !== this.options.context.stage1.toLowerCase()) { fromImageHash = await provider.request({ method: 'eth_call', - params: [{ to: this.address, data: AbiFunction.encodeData(IMAGE_HASH) }], + params: [{ to: this.address, data: AbiFunction.encodeData(Constants.IMAGE_HASH) }], }) } else { // Avoid setting deployHash as it later determines if we use 6492 or not @@ -230,7 +218,7 @@ export class Wallet { const configuration = await this.options.stateProvider.getConfiguration(imageHash) - const topology = await sign( + const topology = await WalletConfig.sign( configuration.topology, { sign: (leaf) => { @@ -242,7 +230,7 @@ export class Wallet { throw new Error(`${leaf.address} does not implement Signer.sign()`) } - const signature = normalizeSignerSignature(signer.signer.sign(this.address, chainId, payload)) + const signature = WalletConfig.normalizeSignerSignature(signer.signer.sign(this.address, chainId, payload)) signature.signature = signature.signature.then((signature) => { if (signature.type === 'erc1271') { @@ -261,7 +249,7 @@ export class Wallet { if (options?.trustSigners === false || (!options?.trustSigners && !signer.isTrusted)) { signature.signature = signature.signature.then(async (signature) => { - const digest = hash(this.address, chainId, payload) + const digest = Payload.hash(this.address, chainId, payload) switch (signature.type) { case 'eth_sign': @@ -291,13 +279,13 @@ export class Wallet { params: [ { to: leaf.address, - data: AbiFunction.encodeData(IS_VALID_SIGNATURE, [ + data: AbiFunction.encodeData(Constants.IS_VALID_SIGNATURE, [ Bytes.toHex(digest), Bytes.toHex(signature.data), ]), }, ], - })) !== AbiFunction.getSelector(IS_VALID_SIGNATURE) + })) !== AbiFunction.getSelector(Constants.IS_VALID_SIGNATURE) ) { throw new Error(`invalid signature for erc-1271 signer ${leaf.address}`) } @@ -320,7 +308,7 @@ export class Wallet { throw new Error(`${leaf.address} does not implement Signer.signSapient()`) } - const signature = normalizeSignerSignature( + const signature = WalletConfig.normalizeSignerSignature( signer.signer.signSapient(this.address, chainId, payload, Bytes.toHex(leaf.imageHash)), ) @@ -336,7 +324,7 @@ export class Wallet { if (options?.trustSigners === false || (!options?.trustSigners && !signer.isTrusted)) { signature.signature = signature.signature.then(async (signature) => { - const digest = hash(this.address, chainId, payload) + const digest = Payload.hash(this.address, chainId, payload) switch (signature.type) { case 'sapient': { @@ -345,8 +333,8 @@ export class Wallet { params: [ { to: leaf.address, - data: AbiFunction.encodeData(IS_VALID_SAPIENT_SIGNATURE, [ - encodeSapient(chainId, payload), + data: AbiFunction.encodeData(Constants.IS_VALID_SAPIENT_SIGNATURE, [ + Payload.encodeSapient(chainId, payload), Bytes.toHex(signature.data), ]), }, @@ -366,7 +354,7 @@ export class Wallet { params: [ { to: leaf.address, - data: AbiFunction.encodeData(IS_VALID_SAPIENT_SIGNATURE_COMPACT, [ + data: AbiFunction.encodeData(Constants.IS_VALID_SAPIENT_SIGNATURE_COMPACT, [ Bytes.toHex(digest), Bytes.toHex(signature.data), ]), @@ -399,7 +387,7 @@ export class Wallet { }, ) - const erc6492 = deployHash && erc6492Deploy(deployHash.deployHash, deployHash.context) + const erc6492 = deployHash && Erc6492.erc6492Deploy(deployHash.deployHash, deployHash.context) return { noChainId: !chainId, @@ -413,14 +401,18 @@ export class Wallet { export interface Signer { readonly address: MaybePromise - sign?: (wallet: Address.Address, chainId: bigint, payload: ParentedPayload) => SignerSignature + sign?: ( + wallet: Address.Address, + chainId: bigint, + payload: Payload.ParentedPayload, + ) => WalletConfig.SignerSignature signSapient?: ( wallet: Address.Address, chainId: bigint, - payload: ParentedPayload, + payload: Payload.ParentedPayload, imageHash: Hex.Hex, - ) => SignerSignature + ) => WalletConfig.SignerSignature } type MaybePromise = T | Promise diff --git a/packages/primitives-cli/src/subcommands/address.ts b/packages/primitives-cli/src/subcommands/address.ts index e6e520db1..7c81e1e4f 100644 --- a/packages/primitives-cli/src/subcommands/address.ts +++ b/packages/primitives-cli/src/subcommands/address.ts @@ -1,7 +1,6 @@ import { Address, Bytes } from 'ox' import type { CommandModule } from 'yargs' -import { getCounterfactualAddress } from '@0xsequence/sequence-primitives' -import { DEFAULT_CREATION_CODE } from '@0xsequence/sequence-primitives' +import { Constants, Address as SequenceAddress } from '@0xsequence/sequence-primitives' export async function doCalculateAddress(options: { imageHash: string @@ -12,10 +11,10 @@ export async function doCalculateAddress(options: { const context = { factory: Address.from(options.factory), stage1: Address.from(options.module), - creationCode: (options.creationCode || DEFAULT_CREATION_CODE) as `0x${string}`, + creationCode: (options.creationCode || Constants.DEFAULT_CREATION_CODE) as `0x${string}`, } - return getCounterfactualAddress(Bytes.fromHex(options.imageHash as `0x${string}`), context) + return SequenceAddress.getCounterfactualAddress(Bytes.fromHex(options.imageHash as `0x${string}`), context) } const addressCommand: CommandModule = { @@ -46,7 +45,7 @@ const addressCommand: CommandModule = { .option('creationCode', { type: 'string', description: 'Creation code (optional)', - default: DEFAULT_CREATION_CODE, + default: Constants.DEFAULT_CREATION_CODE, }) }, async (argv) => { diff --git a/packages/primitives-cli/src/subcommands/config.ts b/packages/primitives-cli/src/subcommands/config.ts index ecda97f09..ffd4b3ff3 100644 --- a/packages/primitives-cli/src/subcommands/config.ts +++ b/packages/primitives-cli/src/subcommands/config.ts @@ -1,15 +1,7 @@ import type { CommandModule } from 'yargs' -import { - Configuration, - configToJson, - configFromJson, - encodeSignature, - hashConfiguration, - Leaf, - flatLeavesToTopology, -} from '@0xsequence/sequence-primitives' import { Address, Bytes, Hex } from 'ox' import { fromPosOrStdin } from '../utils' +import { Signature, WalletConfig } from '@0xsequence/sequence-primitives' export const PossibleElements = [ { @@ -44,8 +36,8 @@ export const PossibleElements = [ }, ] -function parseElements(elements: string): Leaf[] { - const leaves: Leaf[] = [] +function parseElements(elements: string): WalletConfig.Leaf[] { + const leaves: WalletConfig.Leaf[] = [] let remainingElements = elements // Split by space and get first element @@ -97,7 +89,7 @@ function parseElements(elements: string): Leaf[] { type: 'nested', threshold: BigInt(threshold!), weight: BigInt(weight!), - tree: flatLeavesToTopology(parseElements(innerSubElements)), + tree: WalletConfig.flatLeavesToTopology(parseElements(innerSubElements)), }) remainingElements = remainingElements.slice(endSubElements + 1).trim() } else if (firstElementType === 'node') { @@ -119,25 +111,25 @@ export async function createConfig(options: { content: string[] }): Promise { const leaves = parseElements(options.content.join(' ')) - const config: Configuration = { + const config: WalletConfig.Configuration = { threshold: BigInt(options.threshold), checkpoint: BigInt(options.checkpoint), // Starts with empty topology - topology: flatLeavesToTopology(leaves), + topology: WalletConfig.flatLeavesToTopology(leaves), checkpointer: undefined, } - return configToJson(config) + return WalletConfig.configToJson(config) } export async function calculateImageHash(input: string): Promise { - const config = configFromJson(input) - return Hex.fromBytes(hashConfiguration(config)) + const config = WalletConfig.configFromJson(input) + return Hex.fromBytes(WalletConfig.hashConfiguration(config)) } export async function doEncode(input: string): Promise { - const configuration = configFromJson(input) - return Hex.fromBytes(encodeSignature({ noChainId: true, configuration })) + const configuration = WalletConfig.configFromJson(input) + return Hex.fromBytes(Signature.encodeSignature({ noChainId: true, configuration })) } const configCommand: CommandModule = { diff --git a/packages/primitives-cli/src/subcommands/devTools.ts b/packages/primitives-cli/src/subcommands/devTools.ts index afa139d23..bd1694822 100644 --- a/packages/primitives-cli/src/subcommands/devTools.ts +++ b/packages/primitives-cli/src/subcommands/devTools.ts @@ -1,12 +1,4 @@ -import { - Configuration, - ParameterRule, - Permission, - SessionsTopology, - Topology, - configToJson, - sessionsTopologyToJson, -} from '@0xsequence/sequence-primitives' +import { Permission, SessionConfig, WalletConfig } from '@0xsequence/sequence-primitives' import crypto from 'crypto' import type { CommandModule } from 'yargs' @@ -58,7 +50,7 @@ function randomAddress(options?: RandomOptions): `0x${string}` { return `0x${Buffer.from(randomBytes(20, options)).toString('hex')}` } -function generateRandomTopology(depth: number, options?: RandomOptions): Topology { +function generateRandomTopology(depth: number, options?: RandomOptions): WalletConfig.Topology { if (depth <= 0) { const leafType = Math.floor((options?.seededRandom ?? Math.random)() * 5) @@ -102,7 +94,10 @@ function generateRandomTopology(depth: number, options?: RandomOptions): Topolog return [generateRandomTopology(depth - 1, options), generateRandomTopology(depth - 1, options)] } -async function generateSessionsTopology(depth: number, options?: RandomOptions): Promise { +async function generateSessionsTopology( + depth: number, + options?: RandomOptions, +): Promise { const isLeaf = (options?.seededRandom ?? Math.random)() * 2 > 1 if (isLeaf || depth <= 1) { @@ -118,7 +113,7 @@ async function generateSessionsTopology(depth: number, options?: RandomOptions): return [await generateSessionsTopology(depth - 1, options), await generateSessionsTopology(depth - 1, options)] } -async function generateRandomPermission(options?: RandomOptions): Promise { +async function generateRandomPermission(options?: RandomOptions): Promise { const rulesCount = Math.floor((options?.seededRandom ?? Math.random)() * (options?.maxRules ?? 5)) + 1 return { target: randomAddress(options), @@ -126,7 +121,7 @@ async function generateRandomPermission(options?: RandomOptions): Promise { +async function generateRandomRule(options?: RandomOptions): Promise { return { cumulative: (options?.seededRandom ?? Math.random)() * 2 > 1, operation: Math.floor((options?.seededRandom ?? Math.random)() * 4), @@ -137,7 +132,7 @@ async function generateRandomRule(options?: RandomOptions): Promise { - const config: Configuration = { + const config: WalletConfig.Configuration = { threshold: randomBigInt(100n, options), checkpoint: randomBigInt(1000n, options), topology: generateRandomTopology(maxDepth, options), @@ -153,12 +148,12 @@ export async function doRandomConfig(maxDepth: number, options?: RandomOptions): } })(), } - return configToJson(config) + return WalletConfig.configToJson(config) } export async function doRandomSessionTopology(maxDepth: number, options?: RandomOptions): Promise { const topology = await generateSessionsTopology(maxDepth, options) - return sessionsTopologyToJson(topology) + return SessionConfig.sessionsTopologyToJson(topology) } const command: CommandModule = { diff --git a/packages/primitives-cli/src/subcommands/payload.ts b/packages/primitives-cli/src/subcommands/payload.ts index bc7299cda..637a66918 100644 --- a/packages/primitives-cli/src/subcommands/payload.ts +++ b/packages/primitives-cli/src/subcommands/payload.ts @@ -1,6 +1,6 @@ import { AbiParameters, Address, Bytes, Hex } from 'ox' import type { CommandModule } from 'yargs' -import { encode, hash, isCallsPayload, ParentedPayload } from '@0xsequence/sequence-primitives' +import { Payload } from '@0xsequence/sequence-primitives' import { fromPosOrStdin, readStdin } from '../utils' export const KIND_TRANSACTIONS = 0x00 @@ -78,7 +78,7 @@ export async function doConvertToAbi(payload: string): Promise { throw new Error('Not implemented') } -export function solidityEncodedToParentedPayload(decoded: SolidityDecoded): ParentedPayload { +export function solidityEncodedToParentedPayload(decoded: SolidityDecoded): Payload.ParentedPayload { if (decoded.kind === KIND_TRANSACTIONS) { return { type: 'call', @@ -132,8 +132,8 @@ export async function doConvertToPacked(payload: string): Promise { )[0] as unknown as SolidityDecoded, ) - if (isCallsPayload(decodedPayload)) { - const packed = encode(decodedPayload) + if (Payload.isCallsPayload(decodedPayload)) { + const packed = Payload.encode(decodedPayload) return Hex.from(packed) } @@ -156,7 +156,7 @@ export async function doHash(wallet: string, chainId: bigint, payload: string): payload as Hex.Hex, )[0] as unknown as SolidityDecoded - return Hex.from(hash(Address.from(wallet), chainId, solidityEncodedToParentedPayload(decoded))) + return Hex.from(Payload.hash(Address.from(wallet), chainId, solidityEncodedToParentedPayload(decoded))) } const payloadCommand: CommandModule = { diff --git a/packages/primitives-cli/src/subcommands/permission.ts b/packages/primitives-cli/src/subcommands/permission.ts index 48ec4c51a..6144e1960 100644 --- a/packages/primitives-cli/src/subcommands/permission.ts +++ b/packages/primitives-cli/src/subcommands/permission.ts @@ -1,22 +1,17 @@ -import { - encodePermission, - encodeSessionPermissions, - permissionFromJson, - sessionPermissionsFromJson, -} from '@0xsequence/sequence-primitives' import { Hex } from 'ox' import type { CommandModule } from 'yargs' import { fromPosOrStdin } from '../utils' +import { Permission } from '@0xsequence/sequence-primitives' export async function doEncodeSessionPermissions(input: string): Promise { - const permission = sessionPermissionsFromJson(input) - const packed = encodeSessionPermissions(permission) + const permission = Permission.sessionPermissionsFromJson(input) + const packed = Permission.encodeSessionPermissions(permission) return Hex.from(packed) } export async function doEncodePermission(input: string): Promise { - const permission = permissionFromJson(input) - const packed = encodePermission(permission) + const permission = Permission.permissionFromJson(input) + const packed = Permission.encodePermission(permission) return Hex.from(packed) } diff --git a/packages/primitives-cli/src/subcommands/session.ts b/packages/primitives-cli/src/subcommands/session.ts index 7f3022bc7..9c12142c3 100644 --- a/packages/primitives-cli/src/subcommands/session.ts +++ b/packages/primitives-cli/src/subcommands/session.ts @@ -1,25 +1,18 @@ -import { - emptySessionsTopology, - encodeSessionCallSignatures, - hashConfigurationTree, - sessionCallSignatureFromJson, - sessionsTopologyFromJson, - sessionsTopologyToConfigurationTree, - sessionsTopologyToJson, -} from '@0xsequence/sequence-primitives' import { Hex } from 'ox' import { CommandModule } from 'yargs' import sessionExplicitCommand from './sessionExplicit' import sessionImplicitCommand from './sessionImplicit' +import { Config, SessionConfig, SessionSignature, WalletConfig } from '@0xsequence/sequence-primitives' + export async function doEmptyTopology(identitySigner: `0x${string}`): Promise { - const topology = emptySessionsTopology(identitySigner) - return sessionsTopologyToJson(topology) + const topology = SessionConfig.emptySessionsTopology(identitySigner) + return SessionConfig.sessionsTopologyToJson(topology) } export async function doEncodeConfiguration(sessionConfigurationInput: string): Promise { - const sessionConfiguration = sessionsTopologyFromJson(sessionConfigurationInput) - const configurationTree = sessionsTopologyToConfigurationTree(sessionConfiguration) + const sessionConfiguration = SessionConfig.sessionsTopologyFromJson(sessionConfigurationInput) + const configurationTree = SessionConfig.sessionsTopologyToConfigurationTree(sessionConfiguration) return JSON.stringify(configurationTree) } @@ -29,9 +22,9 @@ export async function doEncodeSessionCallSignatures( explicitSigners: string[] = [], implicitSigners: string[] = [], ): Promise { - const sessionConfiguration = sessionsTopologyFromJson(sessionConfigurationInput) - const callSignatures = callSignaturesInput.map((s) => sessionCallSignatureFromJson(s)) - const encoded = encodeSessionCallSignatures( + const sessionConfiguration = SessionConfig.sessionsTopologyFromJson(sessionConfigurationInput) + const callSignatures = callSignaturesInput.map((s) => SessionSignature.sessionCallSignatureFromJson(s)) + const encoded = SessionSignature.encodeSessionCallSignatures( callSignatures, sessionConfiguration, explicitSigners as `0x${string}`[], @@ -41,9 +34,9 @@ export async function doEncodeSessionCallSignatures( } export async function doImageHash(sessionConfigurationInput: string): Promise { - const sessionConfiguration = sessionsTopologyFromJson(sessionConfigurationInput) - const configurationTree = sessionsTopologyToConfigurationTree(sessionConfiguration) - const hash = hashConfigurationTree(configurationTree) + const sessionConfiguration = SessionConfig.sessionsTopologyFromJson(sessionConfigurationInput) + const configurationTree = SessionConfig.sessionsTopologyToConfigurationTree(sessionConfiguration) + const hash = Config.hashConfigurationTree(configurationTree) return Hex.from(hash) } diff --git a/packages/primitives-cli/src/subcommands/sessionExplicit.ts b/packages/primitives-cli/src/subcommands/sessionExplicit.ts index 75ddb6ffc..30de9fe38 100644 --- a/packages/primitives-cli/src/subcommands/sessionExplicit.ts +++ b/packages/primitives-cli/src/subcommands/sessionExplicit.ts @@ -1,49 +1,40 @@ -import { - balanceSessionsTopology, - getSessionPermissions, - isSessionsTopology, - mergeSessionsTopologies, - removeExplicitSession, - sessionPermissionsFromJson, - sessionsTopologyFromJson, - sessionsTopologyToJson, -} from '@0xsequence/sequence-primitives' import type { CommandModule } from 'yargs' import { fromPosOrStdin } from '../utils' +import { Permission, SessionConfig } from '@0xsequence/sequence-primitives' export async function doAddSession(sessionInput: string, topologyInput: string): Promise { - const session = sessionPermissionsFromJson(sessionInput) - let topology = sessionsTopologyFromJson(topologyInput) - if (!isSessionsTopology(session)) { + const session = Permission.sessionPermissionsFromJson(sessionInput) + let topology = SessionConfig.sessionsTopologyFromJson(topologyInput) + if (!SessionConfig.isSessionsTopology(session)) { throw new Error('Explicit session must be a valid session topology') } - if (!isSessionsTopology(topology)) { + if (!SessionConfig.isSessionsTopology(topology)) { throw new Error('Session topology must be a valid session topology') } // Find the session in the topology - const sessionPermissions = getSessionPermissions(topology, session.signer) + const sessionPermissions = SessionConfig.getSessionPermissions(topology, session.signer) if (sessionPermissions) { throw new Error('Session already exists') } // Merge the session into the topology - topology = mergeSessionsTopologies(session, topology) - topology = balanceSessionsTopology(topology) - return sessionsTopologyToJson(topology) + topology = SessionConfig.mergeSessionsTopologies(session, topology) + topology = SessionConfig.balanceSessionsTopology(topology) + return SessionConfig.sessionsTopologyToJson(topology) } export async function doRemoveSession(explicitSessionAddress: string, topologyInput: string): Promise { - const topology = sessionsTopologyFromJson(topologyInput) - if (!isSessionsTopology(topology)) { + const topology = SessionConfig.sessionsTopologyFromJson(topologyInput) + if (!SessionConfig.isSessionsTopology(topology)) { throw new Error('Session topology must be a valid session topology') } if (!explicitSessionAddress || !explicitSessionAddress.startsWith('0x')) { throw new Error('Explicit session address must be a valid address') } - const updated = removeExplicitSession(topology, explicitSessionAddress as `0x${string}`) + const updated = SessionConfig.removeExplicitSession(topology, explicitSessionAddress as `0x${string}`) if (!updated) { throw new Error('Session topology is empty') } - return sessionsTopologyToJson(updated) + return SessionConfig.sessionsTopologyToJson(updated) } const sessionExplicitCommand: CommandModule = { diff --git a/packages/primitives-cli/src/subcommands/sessionImplicit.ts b/packages/primitives-cli/src/subcommands/sessionImplicit.ts index e188f5f52..9310cc715 100644 --- a/packages/primitives-cli/src/subcommands/sessionImplicit.ts +++ b/packages/primitives-cli/src/subcommands/sessionImplicit.ts @@ -1,4 +1,4 @@ -import { addToImplicitBlacklist, removeFromImplicitBlacklist, SessionsTopology } from '@0xsequence/sequence-primitives' +import { SessionConfig } from '@0xsequence/sequence-primitives' import { Address } from 'ox' import type { CommandModule } from 'yargs' import { fromPosOrStdin, requireString } from '../utils' @@ -7,8 +7,8 @@ export async function doAddBlacklistAddress( blacklistAddress: string, sessionConfigurationInput: string, ): Promise { - const sessionConfiguration = JSON.parse(sessionConfigurationInput) as SessionsTopology - const updated = addToImplicitBlacklist(sessionConfiguration, blacklistAddress as Address.Address) + const sessionConfiguration = JSON.parse(sessionConfigurationInput) as SessionConfig.SessionsTopology + const updated = SessionConfig.addToImplicitBlacklist(sessionConfiguration, blacklistAddress as Address.Address) return JSON.stringify(updated) } @@ -16,8 +16,8 @@ export async function doRemoveBlacklistAddress( blacklistAddress: string, sessionConfigurationInput: string, ): Promise { - const sessionConfiguration = JSON.parse(sessionConfigurationInput) as SessionsTopology - const updated = removeFromImplicitBlacklist(sessionConfiguration, blacklistAddress as Address.Address) + const sessionConfiguration = JSON.parse(sessionConfigurationInput) as SessionConfig.SessionsTopology + const updated = SessionConfig.removeFromImplicitBlacklist(sessionConfiguration, blacklistAddress as Address.Address) return JSON.stringify(updated) } diff --git a/packages/primitives-cli/src/subcommands/signature.ts b/packages/primitives-cli/src/subcommands/signature.ts index 738507250..b57468a11 100644 --- a/packages/primitives-cli/src/subcommands/signature.ts +++ b/packages/primitives-cli/src/subcommands/signature.ts @@ -1,17 +1,18 @@ import { boolean, type CommandModule } from 'yargs' import { fromPosOrStdin } from '../utils' -import { - configFromJson, - configToJson, - decodeSignature, - encodeSignature, - fillLeaves, - isSapientSignerLeaf, - isSignerLeaf, - rawSignatureToJson, -} from '@0xsequence/sequence-primitives' +// import { +// configFromJson, +// configToJson, +// decodeSignature, +// encodeSignature, +// fillLeaves, +// isSapientSignerLeaf, +// isSignerLeaf, +// rawSignatureToJson, +// } from '@0xsequence/sequence-primitives' import { PossibleElements } from './config' import { Bytes, Hex } from 'ox' +import { Signature, WalletConfig } from '@0xsequence/sequence-primitives' const SignatureElements = [ { @@ -42,7 +43,7 @@ const SignatureElements = [ ] export async function doEncode(input: string, signatures: string[] = [], noChainId: boolean): Promise { - const config = configFromJson(input) + const config = WalletConfig.configFromJson(input) const allSignatures = signatures.map((s) => { const values = s.split(':') @@ -53,8 +54,8 @@ export async function doEncode(input: string, signatures: string[] = [], noChain } }) - const fullTopology = fillLeaves(config.topology, (leaf) => { - if (isSignerLeaf(leaf)) { + const fullTopology = Signature.fillLeaves(config.topology, (leaf) => { + if (WalletConfig.isSignerLeaf(leaf)) { // Type must be 1271, eth_sign, or hash const candidate = allSignatures.find((s) => s.address === leaf.address) @@ -95,7 +96,7 @@ export async function doEncode(input: string, signatures: string[] = [], noChain throw new Error(`Unsupported signature type: ${candidate.type}`) } - if (isSapientSignerLeaf(leaf)) { + if (WalletConfig.isSapientSignerLeaf(leaf)) { const candidate = allSignatures.find((s) => s.address === leaf.address) if (!candidate) { return undefined @@ -119,7 +120,7 @@ export async function doEncode(input: string, signatures: string[] = [], noChain return undefined }) - const encoded = encodeSignature({ noChainId, configuration: { ...config, topology: fullTopology } }) + const encoded = Signature.encodeSignature({ noChainId, configuration: { ...config, topology: fullTopology } }) return Hex.fromBytes(encoded) } @@ -129,9 +130,9 @@ export async function doConcat(signatures: string[]): Promise { throw new Error('No signatures provided') } - const decoded = signatures.map((s) => decodeSignature(Bytes.fromHex(s as `0x${string}`))) + const decoded = signatures.map((s) => Signature.decodeSignature(Bytes.fromHex(s as `0x${string}`))) - const reEncoded = encodeSignature({ + const reEncoded = Signature.encodeSignature({ ...decoded[0]!, suffix: decoded.slice(1), }) @@ -141,8 +142,8 @@ export async function doConcat(signatures: string[]): Promise { export async function doDecode(signature: string): Promise { const bytes = Bytes.fromHex(signature as `0x${string}`) - const decoded = decodeSignature(bytes) - return rawSignatureToJson(decoded) + const decoded = Signature.decodeSignature(bytes) + return Signature.rawSignatureToJson(decoded) } const signatureCommand: CommandModule = { diff --git a/packages/primitives/src/address.ts b/packages/primitives/src/address.ts index ab09d902e..34dbeaa04 100644 --- a/packages/primitives/src/address.ts +++ b/packages/primitives/src/address.ts @@ -1,5 +1,5 @@ import { Address, Bytes, Hash } from 'ox' -import { Context } from './constants' +import { Context } from './context' import { Configuration, hashConfiguration } from './wallet-config' export function getCounterfactualAddress( diff --git a/packages/primitives/src/constants.ts b/packages/primitives/src/constants.ts index ed9f676e1..4c2fc6972 100644 --- a/packages/primitives/src/constants.ts +++ b/packages/primitives/src/constants.ts @@ -3,18 +3,6 @@ import { Abi, Address, Hex } from 'ox' export const DEFAULT_CREATION_CODE: Hex.Hex = '0x603e600e3d39601e805130553df33d3d34601c57363d3d373d363d30545af43d82803e903d91601c57fd5bf3' -export type Context = { - factory: Address.Address - stage1: Address.Address - creationCode: Hex.Hex -} - -export const DevContext1: Context = { - factory: '0xBd0F8abD58B4449B39C57Ac9D5C67433239aC447', - stage1: '0x9C4953F499f7e63434d76E0735D4707473d92311', - creationCode: DEFAULT_CREATION_CODE, -} - export const DefaultGuest: Address.Address = '0x294e900a45018d71ffc6ee1f18a205e199f551a1' // ERC1271 diff --git a/packages/primitives/src/context.ts b/packages/primitives/src/context.ts new file mode 100644 index 000000000..3397468e0 --- /dev/null +++ b/packages/primitives/src/context.ts @@ -0,0 +1,14 @@ +import { Address, Hex } from 'ox' +import { DEFAULT_CREATION_CODE } from './constants' + +export type Context = { + factory: Address.Address + stage1: Address.Address + creationCode: Hex.Hex +} + +export const Dev1: Context = { + factory: '0xBd0F8abD58B4449B39C57Ac9D5C67433239aC447', + stage1: '0x9C4953F499f7e63434d76E0735D4707473d92311', + creationCode: DEFAULT_CREATION_CODE, +} diff --git a/packages/primitives/src/erc-6492.ts b/packages/primitives/src/erc-6492.ts index c8656abce..b4478cbba 100644 --- a/packages/primitives/src/erc-6492.ts +++ b/packages/primitives/src/erc-6492.ts @@ -1,6 +1,7 @@ import { AbiFunction, AbiParameters, Address, Bytes, Hex } from 'ox' import { WrappedSignature } from 'ox/erc6492' -import { DEPLOY, Context } from './constants' +import { DEPLOY } from './constants' +import { Context } from './context' export function erc6492Deploy( deployHash: T, diff --git a/packages/primitives/src/index.ts b/packages/primitives/src/index.ts index f23065045..3abe2b8f3 100644 --- a/packages/primitives/src/index.ts +++ b/packages/primitives/src/index.ts @@ -1,12 +1,13 @@ -export * from './address' -export * from './attestation' -export * from './config' -export * from './constants' -export * from './erc-6492' -export * from './payload' -export * from './permission' -export * from './session-config' -export * from './session-signature' -export * from './signature' -export * from './utils' -export * from './wallet-config' +export * as Address from './address' +export * as Attestation from './attestation' +export * as Config from './config' +export * as Constants from './constants' +export * as Erc6492 from './erc-6492' +export * as Payload from './payload' +export * as Permission from './permission' +export * as SessionConfig from './session-config' +export * as SessionSignature from './session-signature' +export * as Signature from './signature' +export * as Utils from './utils' +export * as WalletConfig from './wallet-config' +export * as Context from './context' diff --git a/packages/wdk/src/signer.ts b/packages/wdk/src/signer.ts index 1ca8a1d84..a63e8a2c9 100644 --- a/packages/wdk/src/signer.ts +++ b/packages/wdk/src/signer.ts @@ -1,8 +1,8 @@ import { Address, Signature, Hex, Bytes } from 'ox' -import { ParentedPayload, SignatureOfSignerLeaf, hash } from '@0xsequence/sequence-primitives' import { Signer } from '@0xsequence/sequence-core' import { AuthKey } from './authkey' import { IdentityInstrument } from './nitro' +import { Payload, Signature as SignaturePrimitives } from '@0xsequence/sequence-primitives' export class IdentitySigner implements Signer { constructor( @@ -18,8 +18,12 @@ export class IdentitySigner implements Signer { return this.authKey.identitySigner } - async sign(wallet: Address.Address, chainId: bigint, payload: ParentedPayload): Promise { - const payloadHash = hash(wallet, chainId, payload) + async sign( + wallet: Address.Address, + chainId: bigint, + payload: Payload.ParentedPayload, + ): Promise { + const payloadHash = Payload.hash(wallet, chainId, payload) const authKeySignature = await this.authKey.signMessage(payloadHash.toString()) const params = { ecosystemId: this.ecosystemId, From ed38b3a938fb4d3bd61a795ac089d681106b747c Mon Sep 17 00:00:00 2001 From: Agusx1211 Date: Wed, 26 Feb 2025 17:35:18 +0000 Subject: [PATCH 150/439] Simplify names --- packages/core/src/signers/pk.ts | 2 +- packages/core/src/state/index.ts | 4 +-- packages/core/src/state/memory.ts | 32 +++++++++---------- packages/core/src/wallet.ts | 30 ++++++++--------- .../primitives-cli/src/subcommands/address.ts | 2 +- .../primitives-cli/src/subcommands/payload.ts | 4 +-- packages/primitives/src/address.ts | 5 +-- packages/primitives/src/attestation.ts | 18 +++++------ packages/primitives/src/erc-6492.ts | 6 ++-- packages/primitives/src/payload.ts | 30 ++++++++--------- packages/primitives/src/session-signature.ts | 10 +++--- packages/primitives/src/signature.ts | 14 ++++---- packages/wdk/src/signer.ts | 6 ++-- 13 files changed, 79 insertions(+), 84 deletions(-) diff --git a/packages/core/src/signers/pk.ts b/packages/core/src/signers/pk.ts index 67361dbe9..2c5c3e8f8 100644 --- a/packages/core/src/signers/pk.ts +++ b/packages/core/src/signers/pk.ts @@ -15,7 +15,7 @@ export class Pk implements Signer { async sign( wallet: Address.Address, chainId: bigint, - payload: PayloadTypes.ParentedPayload, + payload: PayloadTypes.Parented, ): Promise { throw new Error('Not implemented') } diff --git a/packages/core/src/state/index.ts b/packages/core/src/state/index.ts index 3d1f7096e..92d80e86c 100644 --- a/packages/core/src/state/index.ts +++ b/packages/core/src/state/index.ts @@ -11,7 +11,7 @@ export interface StateReader { getWallets(signer: Address.Address): MaybePromise<{ [wallet: Address.Address]: { chainId: bigint - payload: Payload.ParentedPayload + payload: Payload.Parented signature: Signature.SignatureOfSignerLeaf } }> @@ -29,7 +29,7 @@ export interface StateWriter { saveWitnesses( wallet: Address.Address, chainId: bigint, - payload: Payload.ParentedPayload, + payload: Payload.Parented, signatures: Signature.SignatureOfSignerLeaf[], ): MaybePromise diff --git a/packages/core/src/state/memory.ts b/packages/core/src/state/memory.ts index 32431cf4c..71a3807a8 100644 --- a/packages/core/src/state/memory.ts +++ b/packages/core/src/state/memory.ts @@ -4,8 +4,8 @@ import { Context, WalletConfig, Payload, - Signature as SignaturePrimitives, - Address as AddressPrimitives, + Signature as SequenceSignature, + Address as SequenceAddress, } from '@0xsequence/sequence-primitives' export class MemoryStateProvider implements StateProvider { @@ -16,8 +16,8 @@ export class MemoryStateProvider implements StateProvider { [signer: Address.Address]: { [wallet: Address.Address]: { chainId: bigint - payload: Payload.ParentedPayload - signature: SignaturePrimitives.SignatureOfSignerLeaf + payload: Payload.Parented + signature: SequenceSignature.SignatureOfSignerLeaf } } } @@ -25,7 +25,7 @@ export class MemoryStateProvider implements StateProvider { [wallet: Address.Address]: { configurations: Hex.Hex[] signerSignatures: { - [imageHash: Hex.Hex]: { [signer: Address.Address]: SignaturePrimitives.SignatureOfSignerLeaf } + [imageHash: Hex.Hex]: { [signer: Address.Address]: SequenceSignature.SignatureOfSignerLeaf } } } } @@ -50,8 +50,8 @@ export class MemoryStateProvider implements StateProvider { getWallets(signer: Address.Address): { [wallet: Address.Address]: { chainId: bigint - payload: Payload.ParentedPayload - signature: SignaturePrimitives.SignatureOfSignerLeaf + payload: Payload.Parented + signature: SequenceSignature.SignatureOfSignerLeaf } } { return this.objects.wallets[signer] ?? {} @@ -61,7 +61,7 @@ export class MemoryStateProvider implements StateProvider { wallet: Address.Address, fromImageHash: Hex.Hex, options?: { allUpdates?: boolean }, - ): Promise> { + ): Promise> { const objects = this.objects.configurationUpdates[wallet] if (!objects) { throw new Error(`unknown wallet ${wallet}`) @@ -134,7 +134,7 @@ export class MemoryStateProvider implements StateProvider { saveWallet(deployConfiguration: WalletConfig.Configuration, context: Context.Context) { const deployHashBytes = WalletConfig.hashConfiguration(deployConfiguration) const deployHash = Bytes.toHex(deployHashBytes) - const wallet = AddressPrimitives.getCounterfactualAddress(deployHashBytes, context) + const wallet = SequenceAddress.from(deployHashBytes, context) this.objects.configurations[deployHash] = deployConfiguration this.objects.deployHashes[wallet] = { deployHash, context } this.objects.configurationUpdates[wallet] = { configurations: [deployHash], signerSignatures: {} } @@ -143,8 +143,8 @@ export class MemoryStateProvider implements StateProvider { saveWitnesses( wallet: Address.Address, chainId: bigint, - payload: Payload.ParentedPayload, - signatures: SignaturePrimitives.SignatureOfSignerLeaf[], + payload: Payload.Parented, + signatures: SequenceSignature.SignatureOfSignerLeaf[], ) { const digest = Payload.hash(wallet, chainId, payload) @@ -180,7 +180,7 @@ export class MemoryStateProvider implements StateProvider { setConfiguration( wallet: Address.Address, configuration: WalletConfig.Configuration, - signature: SignaturePrimitives.RawSignature, + signature: SequenceSignature.RawSignature, ) { const configurations = this.objects.configurationUpdates[wallet]?.configurations if (configurations?.length) { @@ -194,8 +194,8 @@ export class MemoryStateProvider implements StateProvider { const imageHash = Bytes.toHex(WalletConfig.hashConfiguration(configuration)) const digest = Payload.hash(wallet, 0n, Payload.fromConfigUpdate(imageHash)) - const search = (topology: SignaturePrimitives.RawTopology) => { - if (SignaturePrimitives.isSignedSignerLeaf(topology)) { + const search = (topology: SequenceSignature.RawTopology) => { + if (SequenceSignature.isSignedSignerLeaf(topology)) { switch (topology.signature.type) { case 'eth_sign': case 'hash': @@ -224,7 +224,7 @@ export class MemoryStateProvider implements StateProvider { return } else if (WalletConfig.isNodeLeaf(topology)) { return - } else if (SignaturePrimitives.isRawSignerLeaf(topology)) { + } else if (SequenceSignature.isRawSignerLeaf(topology)) { let updates = this.objects.configurationUpdates[wallet] if (!updates) { updates = { configurations: [], signerSignatures: {} } @@ -252,7 +252,7 @@ export class MemoryStateProvider implements StateProvider { ] = topology.signature break } - } else if (SignaturePrimitives.isRawNestedLeaf(topology)) { + } else if (SequenceSignature.isRawNestedLeaf(topology)) { search(topology.tree) } else { search(topology[0]) diff --git a/packages/core/src/wallet.ts b/packages/core/src/wallet.ts index bbdadc142..71e8b321d 100644 --- a/packages/core/src/wallet.ts +++ b/packages/core/src/wallet.ts @@ -4,10 +4,10 @@ import { Constants, Context, WalletConfig, - Address as AddressPrimitives, + Address as SequenceAddress, Erc6492, Payload, - Signature as SignaturePrimitives, + Signature as SequenceSignature, } from '@0xsequence/sequence-primitives' export type WalletOptions = { @@ -40,7 +40,7 @@ export class Wallet { ): Promise { const merged = { ...DefaultWalletOptions, ...options } await merged.stateProvider.saveWallet(configuration, merged.context) - return new Wallet(AddressPrimitives.getCounterfactualAddress(configuration, merged.context), merged) + return new Wallet(SequenceAddress.from(configuration, merged.context), merged) } async setSigner(signer: Signer, isTrusted = false) { @@ -60,7 +60,7 @@ export class Wallet { async getDeployTransaction(): Promise<{ to: Address.Address; data: Hex.Hex }> { const { deployHash, context } = await this.options.stateProvider.getDeployHash(this.address) - return Erc6492.erc6492Deploy(deployHash, context) + return Erc6492.deploy(deployHash, context) } async setConfiguration( @@ -98,20 +98,20 @@ export class Wallet { }), ) - const payload: Payload.CallPayload = { type: 'call', space, nonce, calls } + const payload: Payload.Calls = { type: 'call', space, nonce, calls } const signature = await this.sign(payload, { ...options, provider }) return { to: this.address, data: AbiFunction.encodeData(Constants.EXECUTE, [ Bytes.toHex(Payload.encode(payload)), - Bytes.toHex(SignaturePrimitives.encodeSignature(signature)), + Bytes.toHex(SequenceSignature.encodeSignature(signature)), ]), } } else { const nonce = 0n - const payload: Payload.CallPayload = { type: 'call', space, nonce, calls } + const payload: Payload.Calls = { type: 'call', space, nonce, calls } const [signature, deploy] = await Promise.all([ this.sign(payload, { ...options, provider }), this.getDeployTransaction(), @@ -141,7 +141,7 @@ export class Wallet { data: Hex.toBytes( AbiFunction.encodeData(Constants.EXECUTE, [ Bytes.toHex(Payload.encode(payload)), - Bytes.toHex(SignaturePrimitives.encodeSignature(signature)), + Bytes.toHex(SequenceSignature.encodeSignature(signature)), ]), ), gasLimit: 0n, @@ -159,13 +159,13 @@ export class Wallet { } async sign( - payload: Payload.ParentedPayload, + payload: Payload.Parented, options?: { provider?: Provider.Provider trustSigners?: boolean onSignerError?: WalletConfig.SignerErrorCallback }, - ): Promise { + ): Promise { const provider = options?.provider let updates: Unpromise> = [] @@ -387,7 +387,7 @@ export class Wallet { }, ) - const erc6492 = deployHash && Erc6492.erc6492Deploy(deployHash.deployHash, deployHash.context) + const erc6492 = deployHash && Erc6492.deploy(deployHash.deployHash, deployHash.context) return { noChainId: !chainId, @@ -404,15 +404,15 @@ export interface Signer { sign?: ( wallet: Address.Address, chainId: bigint, - payload: Payload.ParentedPayload, - ) => WalletConfig.SignerSignature + payload: Payload.Parented, + ) => WalletConfig.SignerSignature signSapient?: ( wallet: Address.Address, chainId: bigint, - payload: Payload.ParentedPayload, + payload: Payload.Parented, imageHash: Hex.Hex, - ) => WalletConfig.SignerSignature + ) => WalletConfig.SignerSignature } type MaybePromise = T | Promise diff --git a/packages/primitives-cli/src/subcommands/address.ts b/packages/primitives-cli/src/subcommands/address.ts index 7c81e1e4f..a489ab0dc 100644 --- a/packages/primitives-cli/src/subcommands/address.ts +++ b/packages/primitives-cli/src/subcommands/address.ts @@ -14,7 +14,7 @@ export async function doCalculateAddress(options: { creationCode: (options.creationCode || Constants.DEFAULT_CREATION_CODE) as `0x${string}`, } - return SequenceAddress.getCounterfactualAddress(Bytes.fromHex(options.imageHash as `0x${string}`), context) + return SequenceAddress.from(Bytes.fromHex(options.imageHash as `0x${string}`), context) } const addressCommand: CommandModule = { diff --git a/packages/primitives-cli/src/subcommands/payload.ts b/packages/primitives-cli/src/subcommands/payload.ts index 637a66918..d39236c06 100644 --- a/packages/primitives-cli/src/subcommands/payload.ts +++ b/packages/primitives-cli/src/subcommands/payload.ts @@ -78,7 +78,7 @@ export async function doConvertToAbi(payload: string): Promise { throw new Error('Not implemented') } -export function solidityEncodedToParentedPayload(decoded: SolidityDecoded): Payload.ParentedPayload { +export function solidityEncodedToParentedPayload(decoded: SolidityDecoded): Payload.Parented { if (decoded.kind === KIND_TRANSACTIONS) { return { type: 'call', @@ -132,7 +132,7 @@ export async function doConvertToPacked(payload: string): Promise { )[0] as unknown as SolidityDecoded, ) - if (Payload.isCallsPayload(decodedPayload)) { + if (Payload.isCalls(decodedPayload)) { const packed = Payload.encode(decodedPayload) return Hex.from(packed) } diff --git a/packages/primitives/src/address.ts b/packages/primitives/src/address.ts index 34dbeaa04..80f43553d 100644 --- a/packages/primitives/src/address.ts +++ b/packages/primitives/src/address.ts @@ -2,10 +2,7 @@ import { Address, Bytes, Hash } from 'ox' import { Context } from './context' import { Configuration, hashConfiguration } from './wallet-config' -export function getCounterfactualAddress( - configuration: Bytes.Bytes | Configuration, - context: Context, -): Address.Address { +export function from(configuration: Bytes.Bytes | Configuration, context: Context): Address.Address { const imageHash = configuration instanceof Uint8Array ? configuration : hashConfiguration(configuration) return Bytes.toHex( diff --git a/packages/primitives/src/attestation.ts b/packages/primitives/src/attestation.ts index 506c77cab..b3e5bec65 100644 --- a/packages/primitives/src/attestation.ts +++ b/packages/primitives/src/attestation.ts @@ -9,7 +9,7 @@ export type Attestation = { applicationData: Bytes.Bytes // bytes } -export function encodeAttestation(attestation: Attestation): Bytes.Bytes { +export function encode(attestation: Attestation): Bytes.Bytes { const parts: Bytes.Bytes[] = [ Bytes.fromHex(attestation.approvedSigner, { size: 20 }), Bytes.padLeft(attestation.identityType.slice(0, 4), 4), // Truncate identity type to 4 bytes @@ -23,15 +23,15 @@ export function encodeAttestation(attestation: Attestation): Bytes.Bytes { return Bytes.concat(...parts) } -export function hashAttestation(attestation: Attestation): Bytes.Bytes { - return Hash.keccak256(encodeAttestation(attestation)) +export function hash(attestation: Attestation): Bytes.Bytes { + return Hash.keccak256(encode(attestation)) } -export function attestationToJson(attestation: Attestation): string { - return JSON.stringify(encodeAttestationForJson(attestation)) +export function toJson(attestation: Attestation): string { + return JSON.stringify(encodeForJson(attestation)) } -export function encodeAttestationForJson(attestation: Attestation): any { +export function encodeForJson(attestation: Attestation): any { return { approvedSigner: attestation.approvedSigner.toString(), identityType: Bytes.toHex(attestation.identityType), @@ -42,11 +42,11 @@ export function encodeAttestationForJson(attestation: Attestation): any { } } -export function attestationFromJson(json: string): Attestation { - return attestationFromParsed(JSON.parse(json)) +export function fromJson(json: string): Attestation { + return fromParsed(JSON.parse(json)) } -export function attestationFromParsed(parsed: any): Attestation { +export function fromParsed(parsed: any): Attestation { return { approvedSigner: Address.from(parsed.approvedSigner), identityType: Bytes.fromHex(parsed.identityType), diff --git a/packages/primitives/src/erc-6492.ts b/packages/primitives/src/erc-6492.ts index b4478cbba..5f50d597a 100644 --- a/packages/primitives/src/erc-6492.ts +++ b/packages/primitives/src/erc-6492.ts @@ -3,7 +3,7 @@ import { WrappedSignature } from 'ox/erc6492' import { DEPLOY } from './constants' import { Context } from './context' -export function erc6492Deploy( +export function deploy( deployHash: T, context: Context, ): { to: Address.Address; data: T } { @@ -17,7 +17,7 @@ export function erc6492Deploy( } } -export function erc6492( +export function wrap( signature: T, { to, data }: { to: Address.Address; data: Bytes.Bytes | Hex.Hex }, ): T { @@ -37,7 +37,7 @@ export function erc6492( } } -export function erc6492Decode( +export function decode( signature: T, ): { signature: T; erc6492?: { to: Address.Address; data: T } } { switch (typeof signature) { diff --git a/packages/primitives/src/payload.ts b/packages/primitives/src/payload.ts index d6e1f5a49..c314c1fbf 100644 --- a/packages/primitives/src/payload.ts +++ b/packages/primitives/src/payload.ts @@ -13,35 +13,35 @@ export type Call = { behaviorOnError: 'ignore' | 'revert' | 'abort' } -export type CallPayload = { +export type Calls = { type: 'call' space: bigint nonce: bigint calls: Call[] } -export type MessagePayload = { +export type Message = { type: 'message' message: Bytes.Bytes } -export type ConfigUpdatePayload = { +export type ConfigUpdate = { type: 'config-update' imageHash: Hex.Hex } -export type DigestPayload = { +export type Digest = { type: 'digest' digest: Hex.Hex } -export type ParentPayload = { +export type Parent = { parentWallets?: Address.Address[] } -export type Payload = CallPayload | MessagePayload | ConfigUpdatePayload | DigestPayload +export type Payload = Calls | Message | ConfigUpdate | Digest -export type ParentedPayload = Payload & ParentPayload +export type Parented = Payload & Parent export type TypedDataToSign = { domain: { @@ -85,19 +85,19 @@ export function fromCall(nonce: bigint, space: bigint, calls: Call[]): Payload { } } -export function isCallsPayload(payload: Payload): payload is CallPayload { +export function isCalls(payload: Payload): payload is Calls { return payload.type === 'call' } -export function isMessagePayload(payload: Payload): payload is MessagePayload { +export function isMessage(payload: Payload): payload is Message { return payload.type === 'message' } -export function isConfigUpdatePayload(payload: Payload): payload is ConfigUpdatePayload { +export function isConfigUpdate(payload: Payload): payload is ConfigUpdate { return payload.type === 'config-update' } -export function encode(payload: CallPayload, self?: Address.Address): Bytes.Bytes { +export function encode(payload: Calls, self?: Address.Address): Bytes.Bytes { const callsLen = payload.calls.length const nonceBytesNeeded = minBytesFor(payload.nonce) if (nonceBytesNeeded > 15) { @@ -249,7 +249,7 @@ export function encode(payload: CallPayload, self?: Address.Address): Bytes.Byte export function encodeSapient( chainId: bigint, - payload: ParentedPayload, + payload: Parented, ): Exclude[0], undefined>[0] { const encoded: ReturnType = { kind: 0, @@ -294,12 +294,12 @@ export function encodeSapient( return encoded } -export function hash(wallet: Address.Address, chainId: bigint, payload: ParentedPayload): Bytes.Bytes { - const typedData = toTypedPayload(wallet, chainId, payload) +export function hash(wallet: Address.Address, chainId: bigint, payload: Parented): Bytes.Bytes { + const typedData = toTyped(wallet, chainId, payload) return Bytes.fromHex(getSignPayload(typedData)) } -export function toTypedPayload(wallet: Address.Address, chainId: bigint, payload: ParentedPayload): TypedDataToSign { +export function toTyped(wallet: Address.Address, chainId: bigint, payload: Parented): TypedDataToSign { const domain = { name: 'Sequence Wallet', version: '3', diff --git a/packages/primitives/src/session-signature.ts b/packages/primitives/src/session-signature.ts index d5b502489..df719c55e 100644 --- a/packages/primitives/src/session-signature.ts +++ b/packages/primitives/src/session-signature.ts @@ -1,5 +1,5 @@ import { Address, Bytes, Hex } from 'ox' -import { Attestation, attestationFromParsed, encodeAttestation, encodeAttestationForJson } from './attestation' +import { Attestation, fromParsed, encode, encodeForJson } from './attestation' import { MAX_PERMISSIONS_COUNT } from './permission' import { encodeSessionsTopology, @@ -43,7 +43,7 @@ export function sessionCallSignatureToJson(callSignature: SessionCallSignature): export function encodeSessionCallSignatureForJson(callSignature: SessionCallSignature): any { if (isImplicitSessionCallSignature(callSignature)) { return { - attestation: encodeAttestationForJson(callSignature.attestation), + attestation: encodeForJson(callSignature.attestation), identitySignature: rsvToStr(callSignature.identitySignature), sessionSignature: rsvToStr(callSignature.sessionSignature), } @@ -65,7 +65,7 @@ export function sessionCallSignatureFromJson(json: string): SessionCallSignature export function sessionCallSignatureFromParsed(decoded: any): SessionCallSignature { if (decoded.attestation) { return { - attestation: attestationFromParsed(decoded.attestation), + attestation: fromParsed(decoded.attestation), identitySignature: rsvFromStr(decoded.identitySignature), sessionSignature: rsvFromStr(decoded.sessionSignature), } @@ -135,9 +135,7 @@ export function encodeSessionCallSignatures( const attestationStr = JSON.stringify(callSig.attestation) if (!attestationMap.has(attestationStr)) { attestationMap.set(attestationStr, encodedAttestations.length) - encodedAttestations.push( - Bytes.concat(encodeAttestation(callSig.attestation), packRSV(callSig.identitySignature)), - ) + encodedAttestations.push(Bytes.concat(encode(callSig.attestation), packRSV(callSig.identitySignature))) } } }) diff --git a/packages/primitives/src/signature.ts b/packages/primitives/src/signature.ts index b9fb312e9..2c3f4e300 100644 --- a/packages/primitives/src/signature.ts +++ b/packages/primitives/src/signature.ts @@ -19,8 +19,8 @@ import { isTopology, } from './wallet-config' import { IS_VALID_SAPIENT_SIGNATURE, IS_VALID_SAPIENT_SIGNATURE_COMPACT, IS_VALID_SIGNATURE } from './constants' -import { erc6492, erc6492Decode } from './erc-6492' -import { fromConfigUpdate, hash, ParentedPayload } from './payload' +import { wrap, decode } from './erc-6492' +import { fromConfigUpdate, hash, Parented } from './payload' import { minBytesFor } from './utils' export const FLAG_SIGNATURE_HASH = 0 @@ -158,7 +158,7 @@ export function isRawNestedLeaf(cand: any): cand is RawNestedLeaf { } export function decodeSignature(erc6492Signature: Bytes.Bytes): RawSignature { - const { signature, erc6492 } = erc6492Decode(erc6492Signature) + const { signature, erc6492 } = decode(erc6492Signature) if (signature.length < 1) { throw new Error('Signature is empty') @@ -691,7 +691,7 @@ export function encodeSignature(signature: RawSignature, skipCheckpointerData?: const topologyBytes = encodeTopology(config.topology, signature) output = Bytes.concat(output, topologyBytes) - return signature.erc6492 ? erc6492(output, signature.erc6492) : output + return signature.erc6492 ? wrap(output, signature.erc6492) : output } export function encodeTopology( @@ -1098,7 +1098,7 @@ export async function recover( signature: RawSignature, wallet: Address.Address, chainId: bigint, - payload: ParentedPayload, + payload: Parented, options?: { provider?: Provider.Provider | { provider: Provider.Provider; block: number } | 'assume-valid' | 'assume-invalid' }, @@ -1150,7 +1150,7 @@ async function recoverTopology( topology: RawTopology, wallet: Address.Address, chainId: bigint, - payload: ParentedPayload, + payload: Parented, options?: { provider?: Provider.Provider | { provider: Provider.Provider; block: number } | 'assume-valid' | 'assume-invalid' throw?: boolean @@ -1331,7 +1331,7 @@ async function recoverTopology( function encode( chainId: bigint, - payload: ParentedPayload, + payload: Parented, ): Exclude, []>[0][0] { switch (payload.type) { case 'call': diff --git a/packages/wdk/src/signer.ts b/packages/wdk/src/signer.ts index a63e8a2c9..05ff0d71e 100644 --- a/packages/wdk/src/signer.ts +++ b/packages/wdk/src/signer.ts @@ -2,7 +2,7 @@ import { Address, Signature, Hex, Bytes } from 'ox' import { Signer } from '@0xsequence/sequence-core' import { AuthKey } from './authkey' import { IdentityInstrument } from './nitro' -import { Payload, Signature as SignaturePrimitives } from '@0xsequence/sequence-primitives' +import { Payload, Signature as SequenceSignature } from '@0xsequence/sequence-primitives' export class IdentitySigner implements Signer { constructor( @@ -21,8 +21,8 @@ export class IdentitySigner implements Signer { async sign( wallet: Address.Address, chainId: bigint, - payload: Payload.ParentedPayload, - ): Promise { + payload: Payload.Parented, + ): Promise { const payloadHash = Payload.hash(wallet, chainId, payload) const authKeySignature = await this.authKey.signMessage(payloadHash.toString()) const params = { From 0a441ca6ffe6fc6620d71dedf27708d846acef70 Mon Sep 17 00:00:00 2001 From: Michael Standen Date: Thu, 27 Feb 2025 13:31:58 +1300 Subject: [PATCH 151/439] Use ox Signature compatible types --- packages/core/src/state/memory.ts | 12 +--- packages/core/src/wallet.ts | 6 +- .../src/subcommands/signature.ts | 14 ++--- packages/primitives/src/index.ts | 2 +- packages/primitives/src/session-signature.ts | 27 ++++++-- packages/primitives/src/signature.ts | 61 ++++++------------- packages/primitives/src/utils.ts | 23 +++++-- packages/wdk/src/signer.ts | 4 +- 8 files changed, 67 insertions(+), 82 deletions(-) diff --git a/packages/core/src/state/memory.ts b/packages/core/src/state/memory.ts index 71a3807a8..aed973f7b 100644 --- a/packages/core/src/state/memory.ts +++ b/packages/core/src/state/memory.ts @@ -155,11 +155,7 @@ export class MemoryStateProvider implements StateProvider { case 'hash': signer = Secp256k1.recoverAddress({ payload: signature.type === 'eth_sign' ? PersonalMessage.getSignPayload(digest) : digest, - signature: { - r: Bytes.toBigInt(signature.r), - s: Bytes.toBigInt(signature.s), - yParity: Signature.vToYParity(signature.v), - }, + signature, }) break @@ -243,11 +239,7 @@ export class MemoryStateProvider implements StateProvider { signatures[ Secp256k1.recoverAddress({ payload: topology.signature.type === 'eth_sign' ? PersonalMessage.getSignPayload(digest) : digest, - signature: { - r: Bytes.toBigInt(topology.signature.r), - s: Bytes.toBigInt(topology.signature.s), - yParity: Signature.vToYParity(topology.signature.v), - }, + signature: topology.signature, }) ] = topology.signature break diff --git a/packages/core/src/wallet.ts b/packages/core/src/wallet.ts index 71e8b321d..932951a6a 100644 --- a/packages/core/src/wallet.ts +++ b/packages/core/src/wallet.ts @@ -258,11 +258,7 @@ export class Wallet { !Secp256k1.verify({ payload: signature.type === 'eth_sign' ? PersonalMessage.getSignPayload(digest) : digest, address: leaf.address, - signature: { - r: Bytes.toBigInt(signature.r), - s: Bytes.toBigInt(signature.s), - yParity: Signature.vToYParity(signature.v), - }, + signature, }) ) { throw new Error(`invalid signature for ${leaf.type} signer ${leaf.address}`) diff --git a/packages/primitives-cli/src/subcommands/signature.ts b/packages/primitives-cli/src/subcommands/signature.ts index b57468a11..7c02c7c62 100644 --- a/packages/primitives-cli/src/subcommands/signature.ts +++ b/packages/primitives-cli/src/subcommands/signature.ts @@ -11,7 +11,7 @@ import { fromPosOrStdin } from '../utils' // rawSignatureToJson, // } from '@0xsequence/sequence-primitives' import { PossibleElements } from './config' -import { Bytes, Hex } from 'ox' +import { Bytes, Hex, Signature as OxSignature } from 'ox' import { Signature, WalletConfig } from '@0xsequence/sequence-primitives' const SignatureElements = [ @@ -73,18 +73,18 @@ export async function doEncode(input: string, signatures: string[] = [], noChain if (candidate.type === 'eth_sign') { return { - r: Bytes.padLeft(Bytes.fromHex(candidate.values[0] as `0x${string}`), 32), - s: Bytes.padLeft(Bytes.fromHex(candidate.values[1] as `0x${string}`), 32), - v: Number(candidate.values[2]), + r: Bytes.toBigInt(Bytes.fromHex(candidate.values[0] as `0x${string}`, { size: 32 })), + s: Bytes.toBigInt(Bytes.fromHex(candidate.values[1] as `0x${string}`, { size: 32 })), + yParity: OxSignature.vToYParity(Number(candidate.values[2])), type: 'eth_sign', } } if (candidate.type === 'hash') { return { - r: Bytes.padLeft(Bytes.fromHex(candidate.values[0] as `0x${string}`), 32), - s: Bytes.padLeft(Bytes.fromHex(candidate.values[1] as `0x${string}`), 32), - v: Number(candidate.values[2]), + r: Bytes.toBigInt(Bytes.fromHex(candidate.values[0] as `0x${string}`, { size: 32 })), + s: Bytes.toBigInt(Bytes.fromHex(candidate.values[1] as `0x${string}`, { size: 32 })), + yParity: OxSignature.vToYParity(Number(candidate.values[2])), type: 'hash', } } diff --git a/packages/primitives/src/index.ts b/packages/primitives/src/index.ts index 3abe2b8f3..d374c9ba1 100644 --- a/packages/primitives/src/index.ts +++ b/packages/primitives/src/index.ts @@ -7,7 +7,7 @@ export * as Payload from './payload' export * as Permission from './permission' export * as SessionConfig from './session-config' export * as SessionSignature from './session-signature' -export * as Signature from './signature' +export * as Signature from './signature' //FIXME This name conflicts with oxlib export * as Utils from './utils' export * as WalletConfig from './wallet-config' export * as Context from './context' diff --git a/packages/primitives/src/session-signature.ts b/packages/primitives/src/session-signature.ts index df719c55e..7f3879238 100644 --- a/packages/primitives/src/session-signature.ts +++ b/packages/primitives/src/session-signature.ts @@ -1,5 +1,5 @@ -import { Address, Bytes, Hex } from 'ox' -import { Attestation, fromParsed, encode, encodeForJson } from './attestation' +import { Address, Bytes, Signature } from 'ox' +import { Attestation, encode, encodeForJson, fromParsed } from './attestation' import { MAX_PERMISSIONS_COUNT } from './permission' import { encodeSessionsTopology, @@ -7,7 +7,7 @@ import { minimiseSessionsTopology, SessionsTopology, } from './session-config' -import { minBytesFor, packRSV } from './utils' +import { minBytesFor, packRSY } from './utils' export type ImplicitSessionCallSignature = { attestation: Attestation @@ -135,7 +135,12 @@ export function encodeSessionCallSignatures( const attestationStr = JSON.stringify(callSig.attestation) if (!attestationMap.has(attestationStr)) { attestationMap.set(attestationStr, encodedAttestations.length) - encodedAttestations.push(Bytes.concat(encode(callSig.attestation), packRSV(callSig.identitySignature))) + const packedRSY = packRSY({ + r: Bytes.toBigInt(callSig.identitySignature.r), + s: Bytes.toBigInt(callSig.identitySignature.s), + yParity: Signature.vToYParity(callSig.identitySignature.v), + }) + encodedAttestations.push(Bytes.concat(encode(callSig.attestation), packedRSY)) } } }) @@ -156,14 +161,24 @@ export function encodeSessionCallSignatures( throw new Error('Failed to find attestation index') } const packedFlag = 0x80 | attestationIndex // Implicit flag (MSB) true + attestation index - parts.push(Bytes.fromNumber(packedFlag, { size: 1 }), packRSV(callSignature.sessionSignature)) + const packedRSY = packRSY({ + r: Bytes.toBigInt(callSignature.sessionSignature.r), + s: Bytes.toBigInt(callSignature.sessionSignature.s), + yParity: Signature.vToYParity(callSignature.sessionSignature.v), + }) + parts.push(Bytes.fromNumber(packedFlag, { size: 1 }), packedRSY) } else if (isExplicitSessionCallSignature(callSignature)) { // Explicit if (callSignature.permissionIndex > MAX_PERMISSIONS_COUNT) { throw new Error('Permission index is too large') } const packedFlag = callSignature.permissionIndex // Implicit flag (MSB) false + permission index - parts.push(Bytes.fromNumber(packedFlag, { size: 1 }), packRSV(callSignature.sessionSignature)) + const packedRSY = packRSY({ + r: Bytes.toBigInt(callSignature.sessionSignature.r), + s: Bytes.toBigInt(callSignature.sessionSignature.s), + yParity: Signature.vToYParity(callSignature.sessionSignature.v), + }) + parts.push(Bytes.fromNumber(packedFlag, { size: 1 }), packedRSY) } else { // Invalid call signature throw new Error('Invalid call signature') diff --git a/packages/primitives/src/signature.ts b/packages/primitives/src/signature.ts index 2c3f4e300..3351af5d5 100644 --- a/packages/primitives/src/signature.ts +++ b/packages/primitives/src/signature.ts @@ -21,7 +21,7 @@ import { import { IS_VALID_SAPIENT_SIGNATURE, IS_VALID_SAPIENT_SIGNATURE_COMPACT, IS_VALID_SIGNATURE } from './constants' import { wrap, decode } from './erc-6492' import { fromConfigUpdate, hash, Parented } from './payload' -import { minBytesFor } from './utils' +import { minBytesFor, packRSY, unpackRSY } from './utils' export const FLAG_SIGNATURE_HASH = 0 export const FLAG_ADDRESS = 1 @@ -37,9 +37,9 @@ export const FLAG_SIGNATURE_SAPIENT_COMPACT = 10 export type SignatureOfSignerLeaf = | { - r: Bytes.Bytes - s: Bytes.Bytes - v: number + r: bigint + s: bigint + yParity: number type: 'eth_sign' | 'hash' } | { @@ -277,24 +277,15 @@ export function parseBranch(signature: Bytes.Bytes): { if (index + 64 > signature.length) { throw new Error('Not enough bytes for hash signature (r + yParityAndS)') } - const r = signature.slice(index, index + 32) - const yParityAndS = signature.slice(index + 32, index + 64) + const unpackedRSY = unpackRSY(signature.slice(index, index + 64)) index += 64 - const yParity = (yParityAndS[0]! & 0x80) !== 0 ? 1 : 0 - const s = new Uint8Array(32) - s.set(yParityAndS) - s[0] = s[0]! & 0x7f // clear the top bit - - const v = 27 + yParity nodes.push({ type: 'unrecovered-signer', weight: BigInt(weight), signature: { type: 'hash', - r, - s, - v, + ...unpackedRSY, }, } as RawSignerLeaf) continue @@ -477,24 +468,15 @@ export function parseBranch(signature: Bytes.Bytes): { if (index + 64 > signature.length) { throw new Error('Not enough bytes for eth_sign signature') } - const r = signature.slice(index, index + 32) - const yParityAndS = signature.slice(index + 32, index + 64) + const unpackedRSY = unpackRSY(signature.slice(index, index + 64)) index += 64 - const yParity = (yParityAndS[0]! & 0x80) !== 0 ? 1 : 0 - const s = new Uint8Array(32) - s.set(yParityAndS) - s[0] = s[0]! & 0x7f - - const v = 27 + yParity nodes.push({ type: 'unrecovered-signer', weight: BigInt(weight), signature: { type: 'eth_sign', - r, - s, - v, + ...unpackedRSY, }, } as RawSignerLeaf) continue @@ -778,13 +760,8 @@ export function encodeTopology( throw new Error('Weight too large') } - const r = Bytes.padLeft(topology.signature.r, 32) - const s = Bytes.padLeft(topology.signature.s, 32) - if (topology.signature.v % 2 === 0) { - s[0]! |= 0x80 - } - - return Bytes.concat(Bytes.fromNumber(flag), weightBytes, r, s) + const packedRSY = packRSY(topology.signature) + return Bytes.concat(Bytes.fromNumber(flag), weightBytes, packedRSY) } else if (topology.signature.type === 'erc1271') { let flag = FLAG_SIGNATURE_ERC1271 << 4 @@ -968,9 +945,9 @@ function rawSignatureOfLeafToJson(sig: SignatureOfSignerLeaf | SignatureOfSapien if (sig.type === 'eth_sign' || sig.type === 'hash') { return { type: sig.type, - r: Bytes.toHex(sig.r), - s: Bytes.toHex(sig.s), - v: sig.v, + r: sig.r, + s: sig.s, + yParity: sig.yParity, } } if (sig.type === 'erc1271') { @@ -1072,9 +1049,9 @@ function rawSignatureOfLeafFromJson(obj: any): SignatureOfSignerLeaf | Signature case 'hash': return { type: obj.type, - r: Bytes.fromHex(obj.r), - s: Bytes.fromHex(obj.s), - v: obj.v, + r: obj.r, + s: obj.s, + yParity: obj.yParity, } case 'erc1271': return { @@ -1175,11 +1152,7 @@ async function recoverTopology( ), ) : digest, - signature: { - r: Bytes.toBigInt(topology.signature.r), - s: Bytes.toBigInt(topology.signature.s), - yParity: Signature.vToYParity(topology.signature.v), - }, + signature: topology.signature, }), weight: topology.weight, signed: true, diff --git a/packages/primitives/src/utils.ts b/packages/primitives/src/utils.ts index ea4a8a11e..451133cbf 100644 --- a/packages/primitives/src/utils.ts +++ b/packages/primitives/src/utils.ts @@ -5,12 +5,23 @@ export function minBytesFor(val: bigint): number { } // ERC-2098 -export function packRSV({ r, s, v }: { r: Bytes.Bytes; s: Bytes.Bytes; v: number }): Bytes.Bytes { - r = Bytes.padLeft(r, 32) - s = Bytes.padLeft(s, 32) - if (v % 2 === 0) { - s[0]! |= 0x80 +export function packRSY({ r, s, yParity }: { r: bigint; s: bigint; yParity: number }): Bytes.Bytes { + const rBytes = Bytes.padLeft(Bytes.fromNumber(r), 32) + let sBytes = Bytes.padLeft(Bytes.fromNumber(s), 32) + if (yParity % 2 === 1) { + sBytes[0]! |= 0x80 } - return Bytes.concat(r, s) + return Bytes.concat(rBytes, sBytes) +} + +export function unpackRSY(rsy: Bytes.Bytes): { r: bigint; s: bigint; yParity: number } { + const r = Bytes.toBigInt(rsy.slice(0, 32)) + const yParityAndS = rsy.slice(32, 64) + const yParity = (yParityAndS[0]! & 0x80) !== 0 ? 1 : 0 + const sBytes = new Uint8Array(32) + sBytes.set(yParityAndS) + sBytes[0] = sBytes[0]! & 0x7f + const s = Bytes.toBigInt(sBytes) + return { r, s, yParity } } diff --git a/packages/wdk/src/signer.ts b/packages/wdk/src/signer.ts index 05ff0d71e..0ad41ff29 100644 --- a/packages/wdk/src/signer.ts +++ b/packages/wdk/src/signer.ts @@ -37,9 +37,7 @@ export class IdentitySigner implements Signer { const sig = Signature.fromHex(res.signature) return { type: 'hash', - r: Bytes.fromNumber(sig.r), - s: Bytes.fromNumber(sig.s), - v: Signature.yParityToV(sig.yParity), + ...sig, } } } From 5ab2bd098b732a485cc87073fe1d459d6ba4d1f5 Mon Sep 17 00:00:00 2001 From: Michael Standen Date: Thu, 27 Feb 2025 13:40:52 +1300 Subject: [PATCH 152/439] Add Signature.RSY type --- packages/primitives/src/session-signature.ts | 57 ++++++++------------ packages/primitives/src/signature.ts | 13 +++-- packages/primitives/src/utils.ts | 3 +- 3 files changed, 31 insertions(+), 42 deletions(-) diff --git a/packages/primitives/src/session-signature.ts b/packages/primitives/src/session-signature.ts index 7f3879238..1dec2aca9 100644 --- a/packages/primitives/src/session-signature.ts +++ b/packages/primitives/src/session-signature.ts @@ -1,4 +1,4 @@ -import { Address, Bytes, Signature } from 'ox' +import { Address, Bytes } from 'ox' import { Attestation, encode, encodeForJson, fromParsed } from './attestation' import { MAX_PERMISSIONS_COUNT } from './permission' import { @@ -7,17 +7,18 @@ import { minimiseSessionsTopology, SessionsTopology, } from './session-config' +import { RSY } from './signature' import { minBytesFor, packRSY } from './utils' export type ImplicitSessionCallSignature = { attestation: Attestation - identitySignature: { v: number; r: Bytes.Bytes; s: Bytes.Bytes } - sessionSignature: { v: number; r: Bytes.Bytes; s: Bytes.Bytes } + identitySignature: RSY + sessionSignature: RSY } export type ExplicitSessionCallSignature = { permissionIndex: bigint - sessionSignature: { v: number; r: Bytes.Bytes; s: Bytes.Bytes } + sessionSignature: RSY } export type SessionCallSignature = ImplicitSessionCallSignature | ExplicitSessionCallSignature @@ -44,13 +45,13 @@ export function encodeSessionCallSignatureForJson(callSignature: SessionCallSign if (isImplicitSessionCallSignature(callSignature)) { return { attestation: encodeForJson(callSignature.attestation), - identitySignature: rsvToStr(callSignature.identitySignature), - sessionSignature: rsvToStr(callSignature.sessionSignature), + identitySignature: rsyToRsvStr(callSignature.identitySignature), + sessionSignature: rsyToRsvStr(callSignature.sessionSignature), } } else if (isExplicitSessionCallSignature(callSignature)) { return { permissionIndex: callSignature.permissionIndex, - sessionSignature: rsvToStr(callSignature.sessionSignature), + sessionSignature: rsyToRsvStr(callSignature.sessionSignature), } } else { throw new Error('Invalid call signature') @@ -66,24 +67,24 @@ export function sessionCallSignatureFromParsed(decoded: any): SessionCallSignatu if (decoded.attestation) { return { attestation: fromParsed(decoded.attestation), - identitySignature: rsvFromStr(decoded.identitySignature), - sessionSignature: rsvFromStr(decoded.sessionSignature), + identitySignature: rsyFromRsvStr(decoded.identitySignature), + sessionSignature: rsyFromRsvStr(decoded.sessionSignature), } } else if (decoded.permissionIndex) { return { permissionIndex: decoded.permissionIndex, - sessionSignature: rsvFromStr(decoded.sessionSignature), + sessionSignature: rsyFromRsvStr(decoded.sessionSignature), } } else { throw new Error('Invalid call signature') } } -function rsvToStr(rsv: { v: number; r: Bytes.Bytes; s: Bytes.Bytes }): string { - return `${rsv.r.toString()}:${rsv.s.toString()}:${rsv.v}` +function rsyToRsvStr(sig: RSY): string { + return `${sig.r.toString()}:${sig.s.toString()}:${sig.yParity + 27}` } -function rsvFromStr(sigStr: string): { v: number; r: Bytes.Bytes; s: Bytes.Bytes } { +function rsyFromRsvStr(sigStr: string): RSY { const parts = sigStr.split(':') if (parts.length !== 3) { throw new Error('Signature must be in r:s:v format') @@ -93,9 +94,9 @@ function rsvFromStr(sigStr: string): { v: number; r: Bytes.Bytes; s: Bytes.Bytes throw new Error('Invalid signature format') } return { - v: parseInt(vStr, 10), - r: Bytes.fromHex(rStr as `0x${string}`), - s: Bytes.fromHex(sStr as `0x${string}`), + r: Bytes.toBigInt(Bytes.fromHex(rStr as `0x${string}`, { size: 32 })), + s: Bytes.toBigInt(Bytes.fromHex(sStr as `0x${string}`, { size: 32 })), + yParity: parseInt(vStr, 10) - 27, } } @@ -135,12 +136,7 @@ export function encodeSessionCallSignatures( const attestationStr = JSON.stringify(callSig.attestation) if (!attestationMap.has(attestationStr)) { attestationMap.set(attestationStr, encodedAttestations.length) - const packedRSY = packRSY({ - r: Bytes.toBigInt(callSig.identitySignature.r), - s: Bytes.toBigInt(callSig.identitySignature.s), - yParity: Signature.vToYParity(callSig.identitySignature.v), - }) - encodedAttestations.push(Bytes.concat(encode(callSig.attestation), packedRSY)) + encodedAttestations.push(Bytes.concat(encode(callSig.attestation), packRSY(callSig.identitySignature))) } } }) @@ -155,30 +151,21 @@ export function encodeSessionCallSignatures( for (const callSignature of callSignatures) { if (isImplicitSessionCallSignature(callSignature)) { // Implicit - const attestationIndex = attestationMap.get(JSON.stringify(callSignature.attestation)) + const attestationStr = JSON.stringify(callSignature.attestation) + const attestationIndex = attestationMap.get(attestationStr) if (attestationIndex === undefined) { // Unreachable throw new Error('Failed to find attestation index') } const packedFlag = 0x80 | attestationIndex // Implicit flag (MSB) true + attestation index - const packedRSY = packRSY({ - r: Bytes.toBigInt(callSignature.sessionSignature.r), - s: Bytes.toBigInt(callSignature.sessionSignature.s), - yParity: Signature.vToYParity(callSignature.sessionSignature.v), - }) - parts.push(Bytes.fromNumber(packedFlag, { size: 1 }), packedRSY) + parts.push(Bytes.fromNumber(packedFlag, { size: 1 }), packRSY(callSignature.sessionSignature)) } else if (isExplicitSessionCallSignature(callSignature)) { // Explicit if (callSignature.permissionIndex > MAX_PERMISSIONS_COUNT) { throw new Error('Permission index is too large') } const packedFlag = callSignature.permissionIndex // Implicit flag (MSB) false + permission index - const packedRSY = packRSY({ - r: Bytes.toBigInt(callSignature.sessionSignature.r), - s: Bytes.toBigInt(callSignature.sessionSignature.s), - yParity: Signature.vToYParity(callSignature.sessionSignature.v), - }) - parts.push(Bytes.fromNumber(packedFlag, { size: 1 }), packedRSY) + parts.push(Bytes.fromNumber(packedFlag, { size: 1 }), packRSY(callSignature.sessionSignature)) } else { // Invalid call signature throw new Error('Invalid call signature') diff --git a/packages/primitives/src/signature.ts b/packages/primitives/src/signature.ts index 3351af5d5..201c9028a 100644 --- a/packages/primitives/src/signature.ts +++ b/packages/primitives/src/signature.ts @@ -35,13 +35,16 @@ export const FLAG_SIGNATURE_ANY_ADDRESS_SUBDIGEST = 8 export const FLAG_SIGNATURE_SAPIENT = 9 export const FLAG_SIGNATURE_SAPIENT_COMPACT = 10 +export type RSY = { + r: bigint + s: bigint + yParity: number +} + export type SignatureOfSignerLeaf = - | { - r: bigint - s: bigint - yParity: number + | ({ type: 'eth_sign' | 'hash' - } + } & RSY) | { address: `0x${string}` data: Bytes.Bytes diff --git a/packages/primitives/src/utils.ts b/packages/primitives/src/utils.ts index 451133cbf..bf9cf9d04 100644 --- a/packages/primitives/src/utils.ts +++ b/packages/primitives/src/utils.ts @@ -19,8 +19,7 @@ export function unpackRSY(rsy: Bytes.Bytes): { r: bigint; s: bigint; yParity: nu const r = Bytes.toBigInt(rsy.slice(0, 32)) const yParityAndS = rsy.slice(32, 64) const yParity = (yParityAndS[0]! & 0x80) !== 0 ? 1 : 0 - const sBytes = new Uint8Array(32) - sBytes.set(yParityAndS) + const sBytes = new Uint8Array(yParityAndS) sBytes[0] = sBytes[0]! & 0x7f const s = Bytes.toBigInt(sBytes) return { r, s, yParity } From 3c7f3f53235cae8f37ce6d6ba180331c36120bec Mon Sep 17 00:00:00 2001 From: Agusx1211 Date: Thu, 27 Feb 2025 14:16:15 +0000 Subject: [PATCH 153/439] Fix guest and implement pk signer --- packages/core/src/signers/pk.ts | 4 +- packages/core/src/wallet.ts | 67 +++++++++++++--------------- packages/primitives/src/constants.ts | 2 +- packages/primitives/src/context.ts | 2 +- 4 files changed, 37 insertions(+), 38 deletions(-) diff --git a/packages/core/src/signers/pk.ts b/packages/core/src/signers/pk.ts index 2c5c3e8f8..519f5614e 100644 --- a/packages/core/src/signers/pk.ts +++ b/packages/core/src/signers/pk.ts @@ -17,6 +17,8 @@ export class Pk implements Signer { chainId: bigint, payload: PayloadTypes.Parented, ): Promise { - throw new Error('Not implemented') + const hash = Payload.hash(wallet, chainId, payload) + const signature = Secp256k1.sign({ payload: hash, privateKey: this.privateKey }) + return { ...signature, type: 'hash' } } } diff --git a/packages/core/src/wallet.ts b/packages/core/src/wallet.ts index 932951a6a..386d0937d 100644 --- a/packages/core/src/wallet.ts +++ b/packages/core/src/wallet.ts @@ -119,41 +119,38 @@ export class Wallet { return { to: this.options.guest, - data: AbiFunction.encodeData(Constants.EXECUTE, [ - Bytes.toHex( - Payload.encode({ - type: 'call', - space: 0n, - nonce: 0n, - calls: [ - { - to: deploy.to, - value: 0n, - data: Hex.toBytes(deploy.data), - gasLimit: 0n, - delegateCall: false, - onlyFallback: false, - behaviorOnError: 'revert', - }, - { - to: this.address, - value: 0n, - data: Hex.toBytes( - AbiFunction.encodeData(Constants.EXECUTE, [ - Bytes.toHex(Payload.encode(payload)), - Bytes.toHex(SequenceSignature.encodeSignature(signature)), - ]), - ), - gasLimit: 0n, - delegateCall: false, - onlyFallback: false, - behaviorOnError: 'ignore', - }, - ], - }), - ), - '0x', - ]), + data: Bytes.toHex( + Payload.encode({ + type: 'call', + space: 0n, + nonce: 0n, + calls: [ + { + to: deploy.to, + value: 0n, + data: Hex.toBytes(deploy.data), + gasLimit: 0n, + delegateCall: false, + onlyFallback: false, + behaviorOnError: 'revert', + }, + { + to: this.address, + value: 0n, + data: Hex.toBytes( + AbiFunction.encodeData(Constants.EXECUTE, [ + Bytes.toHex(Payload.encode(payload)), + Bytes.toHex(SequenceSignature.encodeSignature(signature)), + ]), + ), + gasLimit: 0n, + delegateCall: false, + onlyFallback: false, + behaviorOnError: 'revert', + }, + ], + }), + ), } } } diff --git a/packages/primitives/src/constants.ts b/packages/primitives/src/constants.ts index 4c2fc6972..b4c7f2876 100644 --- a/packages/primitives/src/constants.ts +++ b/packages/primitives/src/constants.ts @@ -3,7 +3,7 @@ import { Abi, Address, Hex } from 'ox' export const DEFAULT_CREATION_CODE: Hex.Hex = '0x603e600e3d39601e805130553df33d3d34601c57363d3d373d363d30545af43d82803e903d91601c57fd5bf3' -export const DefaultGuest: Address.Address = '0x294e900a45018d71ffc6ee1f18a205e199f551a1' +export const DefaultGuest: Address.Address = '0x54d766e7C3544E5A1De2552b3A255280b91F4502' // ERC1271 export const IS_VALID_SIGNATURE = Abi.from([ diff --git a/packages/primitives/src/context.ts b/packages/primitives/src/context.ts index 3397468e0..aa79360cd 100644 --- a/packages/primitives/src/context.ts +++ b/packages/primitives/src/context.ts @@ -9,6 +9,6 @@ export type Context = { export const Dev1: Context = { factory: '0xBd0F8abD58B4449B39C57Ac9D5C67433239aC447', - stage1: '0x9C4953F499f7e63434d76E0735D4707473d92311', + stage1: '0x108aEa2e459299F99788cC9069759ce3472aC31B', creationCode: DEFAULT_CREATION_CODE, } From 0be4122b01579092d8ee0e12ce3ffaa3ee525e50 Mon Sep 17 00:00:00 2001 From: Agusx1211 Date: Fri, 28 Feb 2025 16:45:03 +0000 Subject: [PATCH 154/439] Use state tracker from v2 --- packages/core/src/index.ts | 2 +- packages/core/src/state/index.ts | 14 +- packages/core/src/state/local/index.ts | 281 +++++++++++++++++++++++ packages/core/src/state/local/memory.ts | 78 +++++++ packages/core/src/state/memory.ts | 259 --------------------- packages/core/src/wallet.ts | 185 ++++++++++----- packages/primitives/src/wallet-config.ts | 104 +++++++++ 7 files changed, 602 insertions(+), 321 deletions(-) create mode 100644 packages/core/src/state/local/index.ts create mode 100644 packages/core/src/state/local/memory.ts delete mode 100644 packages/core/src/state/memory.ts diff --git a/packages/core/src/index.ts b/packages/core/src/index.ts index 00f61fd3e..37d4f6641 100644 --- a/packages/core/src/index.ts +++ b/packages/core/src/index.ts @@ -1,4 +1,4 @@ -export * from './state' export * from './wallet' export * as Signers from './signers' +export * as State from './state' diff --git a/packages/core/src/state/index.ts b/packages/core/src/state/index.ts index 92d80e86c..b6b5a3b56 100644 --- a/packages/core/src/state/index.ts +++ b/packages/core/src/state/index.ts @@ -1,12 +1,12 @@ import { Address, Hex } from 'ox' import { Context, WalletConfig, Payload, Signature } from '@0xsequence/sequence-primitives' -export type StateProvider = StateReader & StateWriter +export type Provider = Reader & Writer -export interface StateReader { - getConfiguration(imageHash: Hex.Hex): MaybePromise +export interface Reader { + getConfiguration(imageHash: Hex.Hex): MaybePromise - getDeployHash(wallet: Address.Address): MaybePromise<{ deployHash: Hex.Hex; context: Context.Context }> + getDeploy(wallet: Address.Address): MaybePromise<{ imageHash: Hex.Hex; context: Context.Context } | undefined> getWallets(signer: Address.Address): MaybePromise<{ [wallet: Address.Address]: { @@ -23,7 +23,7 @@ export interface StateReader { ): MaybePromise> } -export interface StateWriter { +export interface Writer { saveWallet(deployConfiguration: WalletConfig.Configuration, context: Context.Context): MaybePromise saveWitnesses( @@ -33,7 +33,7 @@ export interface StateWriter { signatures: Signature.SignatureOfSignerLeaf[], ): MaybePromise - setConfiguration( + saveUpdate( wallet: Address.Address, configuration: WalletConfig.Configuration, signature: Signature.RawSignature, @@ -42,4 +42,4 @@ export interface StateWriter { type MaybePromise = T | Promise -export * from './memory' +export * as Local from './local' diff --git a/packages/core/src/state/local/index.ts b/packages/core/src/state/local/index.ts new file mode 100644 index 000000000..cd81576e9 --- /dev/null +++ b/packages/core/src/state/local/index.ts @@ -0,0 +1,281 @@ +import { Context, Payload, Signature, WalletConfig, Address as SequenceAddress } from '@0xsequence/sequence-primitives' +import { Address, Bytes, Hex, PersonalMessage, Secp256k1 } from 'ox' +import { Provider as ProviderInterface } from '..' +import { MemoryStore } from './memory' + +export interface Store { + // top level configurations store + loadConfig: (imageHash: Hex.Hex) => Promise + saveConfig: (imageHash: Hex.Hex, config: WalletConfig.Configuration) => Promise + + // counterfactual wallets + loadCounterfactualWallet: ( + wallet: Address.Address, + ) => Promise<{ imageHash: Hex.Hex; context: Context.Context } | undefined> + saveCounterfactualWallet: (wallet: Address.Address, imageHash: Hex.Hex, context: Context.Context) => Promise + + // payloads + loadPayloadOfSubdigest: ( + subdigest: Hex.Hex, + ) => Promise<{ content: Payload.Parented; chainId: bigint; wallet: Address.Address } | undefined> + savePayloadOfSubdigest: ( + subdigest: Hex.Hex, + payload: { content: Payload.Parented; chainId: bigint; wallet: Address.Address }, + ) => Promise + + // signatures + loadSubdigestsOfSigner: (signer: Address.Address) => Promise + loadSignatureOfSubdigest: ( + signer: Address.Address, + subdigest: Hex.Hex, + ) => Promise + saveSignatureOfSubdigest: ( + signer: Address.Address, + subdigest: Hex.Hex, + signature: Signature.SignatureOfSignerLeaf, + ) => Promise +} + +export class Provider implements ProviderInterface { + constructor(private readonly store: Store = new MemoryStore()) {} + + getConfiguration(imageHash: Hex.Hex): Promise { + return this.store.loadConfig(imageHash) + } + + async saveWallet(deployConfiguration: WalletConfig.Configuration, context: Context.Context): Promise { + // Save both the configuration and the deploy hash + await this.saveConfig(deployConfiguration) + const imageHash = WalletConfig.hashConfiguration(deployConfiguration) + await this.saveCounterfactualWallet(SequenceAddress.from(imageHash, context), Hex.fromBytes(imageHash), context) + } + + async saveConfig(config: WalletConfig.Configuration): Promise { + const imageHash = Bytes.toHex(WalletConfig.hashConfiguration(config)) + const previous = await this.store.loadConfig(imageHash) + if (previous) { + const combined = WalletConfig.mergeTopology(previous.topology, config.topology) + return this.store.saveConfig(imageHash, { ...previous, topology: combined }) + } else { + return this.store.saveConfig(imageHash, config) + } + } + + saveCounterfactualWallet( + wallet: Address.Address, + imageHash: Hex.Hex, + context: Context.Context, + ): void | Promise { + this.store.saveCounterfactualWallet(wallet, imageHash, context) + } + + getDeploy(wallet: Address.Address): Promise<{ imageHash: Hex.Hex; context: Context.Context } | undefined> { + return this.store.loadCounterfactualWallet(wallet) + } + + async getWallets( + signer: Address.Address, + ): Promise<{ + [wallet: `0x${string}`]: { chainId: bigint; payload: Payload.Parented; signature: Signature.SignatureOfSignerLeaf } + }> { + const subdigests = await this.store.loadSubdigestsOfSigner(signer) + const payloads = await Promise.all(subdigests.map((subdigest) => this.store.loadPayloadOfSubdigest(subdigest))) + + let response: { + [wallet: `0x${string}`]: { + chainId: bigint + payload: Payload.Parented + signature: Signature.SignatureOfSignerLeaf + } + } = {} + + for (const payload of payloads) { + if (!payload || response[payload.wallet]) { + continue + } + + const signature = await this.store.loadSignatureOfSubdigest( + signer, + Hex.fromBytes(Payload.hash(payload.wallet, payload.chainId, payload.content)), + ) + if (!signature) { + continue + } + + response[payload.wallet] = { + chainId: payload.chainId, + payload: payload.content, + signature: signature, + } + } + + return response + } + + saveWitnesses( + wallet: Address.Address, + chainId: bigint, + payload: Payload.Parented, + signatures: Signature.SignatureOfSignerLeaf[], + ): void | Promise { + const subdigest = Hex.fromBytes(Payload.hash(wallet, chainId, payload)) + for (const signature of signatures) { + this.store.saveSignatureOfSubdigest(wallet, subdigest, signature) + } + } + + async getConfigurationUpdates( + wallet: Address.Address, + fromImageHash: Hex.Hex, + options?: { allUpdates?: boolean }, + ): Promise<{ imageHash: Hex.Hex; signature: Signature.RawSignature }[]> { + let fromConfig = await this.store.loadConfig(fromImageHash) + if (!fromConfig) { + return [] + } + + const { signers } = WalletConfig.getSigners(fromConfig) + const subdigestsOfSigner = await Promise.all(signers.map((s) => this.store.loadSubdigestsOfSigner(s))) + const subdigests = [...new Set(subdigestsOfSigner.flat())] + + const payloads = await Promise.all(subdigests.map((subdigest) => this.store.loadPayloadOfSubdigest(subdigest))) + + const nextCandidates = await Promise.all( + payloads + .filter((p) => p?.content && Payload.isConfigUpdate(p.content)) + .map(async (p) => ({ + payload: p!, + nextImageHash: (p!.content as Payload.ConfigUpdate).imageHash, + config: await this.store.loadConfig((p!.content as Payload.ConfigUpdate).imageHash), + })), + ) + + let best: + | { + nextImageHash: Hex.Hex + checkpoint: bigint + signature: Hex.Hex + } + | undefined + + const nextCandidatesSorted = nextCandidates + .filter((c) => c!.config && c!.config.checkpoint > fromConfig.checkpoint) + .sort((a, b) => + // If we are looking for the longest path, sort by ascending checkpoint + // because we want to find the smalles jump, and we should start with the + // closest one. If we are not looking for the longest path, sort by + // descending checkpoint, because we want to find the largest jump. + // + // We don't have a guarantee that all "next configs" will be valid + // so worst case scenario we will need to try all of them. + // But we can try to optimize for the most common case. + a.config!.checkpoint > b.config!.checkpoint ? (options?.allUpdates ? 1 : -1) : options?.allUpdates ? -1 : 1, + ) + + for (const candidate of nextCandidatesSorted) { + if (best) { + if (options?.allUpdates) { + // Only consider candidates earlier than our current best + if (candidate.config!.checkpoint <= best.checkpoint) { + continue + } + } else { + // Only consider candidates later than our current best + if (candidate.config!.checkpoint <= best.checkpoint) { + continue + } + } + } + + // Get all signatures (for all signers) for this subdigest + const expectedSubdigest = Hex.fromBytes( + Payload.hash(wallet, candidate.payload.chainId, candidate.payload.content), + ) + const signaturesOfSigners = await Promise.all( + signers.map(async (signer) => { + return { signer, signature: await this.store.loadSignatureOfSubdigest(signer, expectedSubdigest) } + }), + ) + + let totalWeight = 0n + const encoded = Signature.fillLeaves(fromConfig.topology, (leaf) => { + if (WalletConfig.isSapientSignerLeaf(leaf)) { + return undefined + } + + const signature = signaturesOfSigners.find(({ signer }) => signer === leaf.address)?.signature + if (!signature) { + return undefined + } + + totalWeight += leaf.weight + return signature + }) + + if (totalWeight < fromConfig.threshold) { + continue + } + + best = { + nextImageHash: candidate.nextImageHash, + checkpoint: candidate.config!.checkpoint, + signature: Bytes.toHex(Signature.encodeTopology(encoded, { noChainId: true })), + } + } + + if (!best) { + return [] + } + + const nextStep = await this.store.loadConfig(best.nextImageHash) + if (!nextStep) { + return [] + } + + return [{ imageHash: best.nextImageHash, signature: { noChainId: true, configuration: nextStep } }] + } + + async saveUpdate( + wallet: Address.Address, + configuration: WalletConfig.Configuration, + signature: Signature.RawSignature, + ): Promise { + const nextImageHash = Bytes.toHex(WalletConfig.hashConfiguration(configuration)) + const payload: Payload.ConfigUpdate = { + type: 'config-update', + imageHash: nextImageHash, + } + + const subdigest = Payload.hash(wallet, 0n, payload) + + await this.store.savePayloadOfSubdigest(Hex.fromBytes(subdigest), { content: payload, chainId: 0n, wallet }) + await this.saveConfig(configuration) + + const walk = async (topology: Signature.RawTopology): Promise => { + if (Signature.isRawNode(topology)) { + await Promise.all([walk(topology[0]), walk(topology[1])]) + return + } + + if (Signature.isRawNestedLeaf(topology)) { + return walk(topology.tree) + } + + if (Signature.isRawSignerLeaf(topology)) { + const type = topology.signature.type + if (type === 'eth_sign' || type === 'hash') { + const address = Secp256k1.recoverAddress({ + payload: type === 'eth_sign' ? PersonalMessage.getSignPayload(subdigest) : subdigest, + signature: topology.signature, + }) + + return this.store.saveSignatureOfSubdigest(address, Hex.fromBytes(subdigest), topology.signature) + } + } + } + + await walk(signature.configuration.topology) + } +} + +type Unpromise = T extends Promise ? S : T diff --git a/packages/core/src/state/local/memory.ts b/packages/core/src/state/local/memory.ts new file mode 100644 index 000000000..ddbaef908 --- /dev/null +++ b/packages/core/src/state/local/memory.ts @@ -0,0 +1,78 @@ +import { Context, Payload, Signature, WalletConfig } from '@0xsequence/sequence-primitives' +import { Address, Hex } from 'ox' +import { Store } from './index' + +export class MemoryStore implements Store { + private configs = new Map<`0x${string}`, WalletConfig.Configuration>() + private counterfactualWallets = new Map<`0x${string}`, { imageHash: Hex.Hex; context: Context.Context }>() + private payloads = new Map<`0x${string}`, { content: Payload.Parented; chainId: bigint; wallet: Address.Address }>() + private signerSubdigests = new Map>() + private signatures = new Map<`0x${string}`, Signature.SignatureOfSignerLeaf>() + + private getSignatureKey(signer: Address.Address, subdigest: Hex.Hex): string { + return `${signer.toLowerCase()}-${subdigest.toLowerCase()}` + } + + async loadConfig(imageHash: Hex.Hex): Promise { + return this.configs.get(imageHash.toLowerCase() as `0x${string}`) + } + + async saveConfig(imageHash: Hex.Hex, config: WalletConfig.Configuration): Promise { + this.configs.set(imageHash.toLowerCase() as `0x${string}`, config) + } + + async loadCounterfactualWallet( + wallet: Address.Address, + ): Promise<{ imageHash: Hex.Hex; context: Context.Context } | undefined> { + return this.counterfactualWallets.get(wallet.toLowerCase() as `0x${string}`) + } + + async saveCounterfactualWallet(wallet: Address.Address, imageHash: Hex.Hex, context: Context.Context): Promise { + this.counterfactualWallets.set(wallet.toLowerCase() as `0x${string}`, { imageHash, context }) + } + + async loadPayloadOfSubdigest( + subdigest: Hex.Hex, + ): Promise<{ content: Payload.Parented; chainId: bigint; wallet: Address.Address } | undefined> { + return this.payloads.get(subdigest.toLowerCase() as `0x${string}`) + } + + async savePayloadOfSubdigest( + subdigest: Hex.Hex, + payload: { content: Payload.Parented; chainId: bigint; wallet: Address.Address }, + ): Promise { + this.payloads.set(subdigest.toLowerCase() as `0x${string}`, payload) + } + + async loadSubdigestsOfSigner(signer: Address.Address): Promise { + const subdigests = this.signerSubdigests.get(signer.toLowerCase() as `0x${string}`) + return subdigests ? Array.from(subdigests).map((s) => s as Hex.Hex) : [] + } + + async loadSignatureOfSubdigest( + signer: Address.Address, + subdigest: Hex.Hex, + ): Promise { + const key = this.getSignatureKey(signer, subdigest) + return this.signatures.get(key as `0x${string}`) + } + + async saveSignatureOfSubdigest( + signer: Address.Address, + subdigest: Hex.Hex, + signature: Signature.SignatureOfSignerLeaf, + ): Promise { + const key = this.getSignatureKey(signer, subdigest) + this.signatures.set(key as `0x${string}`, signature) + + // Also track this subdigest for the signer + const signerKey = signer.toLowerCase() + const subdigestKey = subdigest.toLowerCase() + + if (!this.signerSubdigests.has(signerKey)) { + this.signerSubdigests.set(signerKey, new Set()) + } + + this.signerSubdigests.get(signerKey)!.add(subdigestKey) + } +} diff --git a/packages/core/src/state/memory.ts b/packages/core/src/state/memory.ts deleted file mode 100644 index aed973f7b..000000000 --- a/packages/core/src/state/memory.ts +++ /dev/null @@ -1,259 +0,0 @@ -import { Address, Bytes, Hex, PersonalMessage, Secp256k1, Signature } from 'ox' -import { StateProvider } from '.' -import { - Context, - WalletConfig, - Payload, - Signature as SequenceSignature, - Address as SequenceAddress, -} from '@0xsequence/sequence-primitives' - -export class MemoryStateProvider implements StateProvider { - private readonly objects: { - configurations: { [imageHash: Hex.Hex]: WalletConfig.Configuration } - deployHashes: { [wallet: Address.Address]: { deployHash: Hex.Hex; context: Context.Context } } - wallets: { - [signer: Address.Address]: { - [wallet: Address.Address]: { - chainId: bigint - payload: Payload.Parented - signature: SequenceSignature.SignatureOfSignerLeaf - } - } - } - configurationUpdates: { - [wallet: Address.Address]: { - configurations: Hex.Hex[] - signerSignatures: { - [imageHash: Hex.Hex]: { [signer: Address.Address]: SequenceSignature.SignatureOfSignerLeaf } - } - } - } - } = { configurations: {}, deployHashes: {}, wallets: {}, configurationUpdates: {} } - - getConfiguration(imageHash: Hex.Hex): WalletConfig.Configuration { - const configuration = this.objects.configurations[imageHash] - if (!configuration) { - throw new Error(`unknown configuration ${imageHash}`) - } - return configuration - } - - getDeployHash(wallet: Address.Address): { deployHash: Hex.Hex; context: Context.Context } { - const deployHash = this.objects.deployHashes[wallet] - if (!deployHash) { - throw new Error(`no known deploy hash for ${wallet}`) - } - return deployHash - } - - getWallets(signer: Address.Address): { - [wallet: Address.Address]: { - chainId: bigint - payload: Payload.Parented - signature: SequenceSignature.SignatureOfSignerLeaf - } - } { - return this.objects.wallets[signer] ?? {} - } - - async getConfigurationUpdates( - wallet: Address.Address, - fromImageHash: Hex.Hex, - options?: { allUpdates?: boolean }, - ): Promise> { - const objects = this.objects.configurationUpdates[wallet] - if (!objects) { - throw new Error(`unknown wallet ${wallet}`) - } - - let imageHash = fromImageHash - let index = objects.configurations.lastIndexOf(imageHash) - if (index === -1) { - throw new Error(`no configuration update to ${imageHash} by ${wallet}`) - } - let configuration = this.getConfiguration(imageHash) - - const updates: Unpromise> = [] - while (index + 1 < objects.configurations.length) { - const append = async (i: number): Promise => { - const toImageHash = objects.configurations[i] - if (!toImageHash) { - throw new Error(`no configuration at index ${i}`) - } - - updates.push({ - imageHash: toImageHash, - signature: { - noChainId: true, - configuration: { - ...configuration, - topology: await WalletConfig.sign( - configuration.topology, - { - sign: (leaf) => { - const signature = objects.signerSignatures[toImageHash]?.[leaf.address] - if (!signature) { - throw new Error(`no signature for signer ${leaf.address}`) - } - return signature - }, - }, - { threshold: configuration.threshold }, - ), - }, - }, - }) - - imageHash = toImageHash - configuration = this.getConfiguration(imageHash) - } - - if (options?.allUpdates) { - for (let i = index + 1; i < objects.configurations.length; i++) { - try { - await append(i) - index = i - break - } catch {} - } - } else { - for (let i = objects.configurations.length - 1; i > index; i--) { - try { - await append(i) - index = i - break - } catch {} - } - } - } - - return updates - } - - saveWallet(deployConfiguration: WalletConfig.Configuration, context: Context.Context) { - const deployHashBytes = WalletConfig.hashConfiguration(deployConfiguration) - const deployHash = Bytes.toHex(deployHashBytes) - const wallet = SequenceAddress.from(deployHashBytes, context) - this.objects.configurations[deployHash] = deployConfiguration - this.objects.deployHashes[wallet] = { deployHash, context } - this.objects.configurationUpdates[wallet] = { configurations: [deployHash], signerSignatures: {} } - } - - saveWitnesses( - wallet: Address.Address, - chainId: bigint, - payload: Payload.Parented, - signatures: SequenceSignature.SignatureOfSignerLeaf[], - ) { - const digest = Payload.hash(wallet, chainId, payload) - - signatures.forEach((signature) => { - let signer: Address.Address - switch (signature.type) { - case 'eth_sign': - case 'hash': - signer = Secp256k1.recoverAddress({ - payload: signature.type === 'eth_sign' ? PersonalMessage.getSignPayload(digest) : digest, - signature, - }) - break - - case 'erc1271': - signer = signature.address - break - } - - let wallets = this.objects.wallets[signer] - if (!wallets) { - wallets = {} - this.objects.wallets[signer] = wallets - } - wallets[wallet] = { chainId, payload, signature } - }) - } - - setConfiguration( - wallet: Address.Address, - configuration: WalletConfig.Configuration, - signature: SequenceSignature.RawSignature, - ) { - const configurations = this.objects.configurationUpdates[wallet]?.configurations - if (configurations?.length) { - const latestImageHash = configurations[configurations.length - 1]! - const latestConfiguration = this.getConfiguration(latestImageHash) - if (configuration.checkpoint <= latestConfiguration.checkpoint) { - throw new Error(`checkpoint ${configuration.checkpoint} <= latest checkpoint ${latestConfiguration.checkpoint}`) - } - } - - const imageHash = Bytes.toHex(WalletConfig.hashConfiguration(configuration)) - const digest = Payload.hash(wallet, 0n, Payload.fromConfigUpdate(imageHash)) - - const search = (topology: SequenceSignature.RawTopology) => { - if (SequenceSignature.isSignedSignerLeaf(topology)) { - switch (topology.signature.type) { - case 'eth_sign': - case 'hash': - let updates = this.objects.configurationUpdates[wallet] - if (!updates) { - updates = { configurations: [], signerSignatures: {} } - this.objects.configurationUpdates[wallet] = updates - } - updates.configurations.push(imageHash) - - let signatures = updates.signerSignatures[imageHash] - if (!signatures) { - signatures = {} - updates.signerSignatures[imageHash] = signatures - } - signatures[topology.address] = topology.signature - break - } - } else if (WalletConfig.isSignerLeaf(topology)) { - return - } else if (WalletConfig.isSapientSignerLeaf(topology)) { - return - } else if (WalletConfig.isSubdigestLeaf(topology)) { - return - } else if (WalletConfig.isAnyAddressSubdigestLeaf(topology)) { - return - } else if (WalletConfig.isNodeLeaf(topology)) { - return - } else if (SequenceSignature.isRawSignerLeaf(topology)) { - let updates = this.objects.configurationUpdates[wallet] - if (!updates) { - updates = { configurations: [], signerSignatures: {} } - this.objects.configurationUpdates[wallet] = updates - } - updates.configurations.push(imageHash) - - let signatures = updates.signerSignatures[imageHash] - if (!signatures) { - signatures = {} - updates.signerSignatures[imageHash] = signatures - } - switch (topology.signature.type) { - case 'eth_sign': - case 'hash': - signatures[ - Secp256k1.recoverAddress({ - payload: topology.signature.type === 'eth_sign' ? PersonalMessage.getSignPayload(digest) : digest, - signature: topology.signature, - }) - ] = topology.signature - break - } - } else if (SequenceSignature.isRawNestedLeaf(topology)) { - search(topology.tree) - } else { - search(topology[0]) - search(topology[1]) - } - } - - search(signature.configuration.topology) - } -} - -type Unpromise = T extends Promise ? S : T diff --git a/packages/core/src/wallet.ts b/packages/core/src/wallet.ts index 386d0937d..f1bca636a 100644 --- a/packages/core/src/wallet.ts +++ b/packages/core/src/wallet.ts @@ -1,5 +1,5 @@ -import { AbiFunction, Address, Bytes, Hex, PersonalMessage, Provider, Secp256k1, Signature } from 'ox' -import { MemoryStateProvider, StateProvider } from '.' +import { AbiFunction, Address, Bytes, Hex, PersonalMessage, Provider, Secp256k1 } from 'ox' +import * as State from './state' import { Constants, Context, @@ -12,20 +12,32 @@ import { export type WalletOptions = { context: Context.Context - stateProvider: StateProvider + stateProvider: State.Provider onSignerError?: WalletConfig.SignerErrorCallback guest: Address.Address } export const DefaultWalletOptions: WalletOptions = { context: Context.Dev1, - stateProvider: new MemoryStateProvider(), + stateProvider: new State.Local.Provider(), guest: Constants.DefaultGuest, } +export type WalletStatus = { + address: Address.Address + isDeployed: boolean + implementation?: Address.Address + stage?: 'stage1' | 'stage2' + configuration: WalletConfig.Configuration + imageHash: Hex.Hex + /** Pending updates in reverse chronological order (newest first) */ + pendingUpdates: Array<{ imageHash: Hex.Hex; signature: SequenceSignature.RawSignature }> + chainId?: bigint +} + export class Wallet { private readonly signers = new Map() - private readonly options: WalletOptions & { stateProvider: StateProvider } + private readonly options: WalletOptions & { stateProvider: State.Provider } constructor( readonly address: Address.Address, @@ -47,6 +59,10 @@ export class Wallet { this.signers.set(await signer.address, { signer, isTrusted }) } + removeSigner(address: Address.Address) { + this.signers.delete(address) + } + async isDeployed(provider: Provider.Provider): Promise { return (await provider.request({ method: 'eth_getCode', params: [this.address, 'pending'] })) !== '0x' } @@ -59,8 +75,11 @@ export class Wallet { } async getDeployTransaction(): Promise<{ to: Address.Address; data: Hex.Hex }> { - const { deployHash, context } = await this.options.stateProvider.getDeployHash(this.address) - return Erc6492.deploy(deployHash, context) + const deployInformation = await this.options.stateProvider.getDeploy(this.address) + if (!deployInformation) { + throw new Error(`cannot find deploy information for ${this.address}`) + } + return Erc6492.deploy(deployInformation.imageHash, deployInformation.context) } async setConfiguration( @@ -69,7 +88,90 @@ export class Wallet { ) { const imageHash = WalletConfig.hashConfiguration(configuration) const signature = await this.sign(Payload.fromConfigUpdate(Bytes.toHex(imageHash)), options) - await this.options.stateProvider.setConfiguration(this.address, configuration, signature) + await this.options.stateProvider.saveUpdate(this.address, configuration, signature) + } + + async getStatus(provider?: Provider.Provider): Promise { + let isDeployed = false + let implementation: Address.Address | undefined + let stage: 'stage1' | 'stage2' | undefined + let chainId: bigint | undefined + let imageHash: Hex.Hex + let updates: Array<{ imageHash: Hex.Hex; signature: SequenceSignature.RawSignature }> = [] + + if (provider) { + // Get chain ID, deployment status, and implementation + const requests = await Promise.all([ + provider.request({ method: 'eth_chainId' }), + this.isDeployed(provider), + provider + .request({ + method: 'eth_call', + params: [{ to: this.address, data: AbiFunction.encodeData(Constants.GET_IMPLEMENTATION) }], + }) + .then((res) => `0x${res.slice(26)}` as Address.Address) + .catch(() => undefined), + ]) + + chainId = BigInt(requests[0]) + isDeployed = requests[1] + implementation = requests[2] + + // Determine stage based on implementation address + if (implementation) { + if (implementation.toLowerCase() === this.options.context.stage1.toLowerCase()) { + stage = 'stage1' + } else { + stage = 'stage2' + } + } + + // Get image hash and updates + let fromImageHash: Hex.Hex + if (isDeployed && stage === 'stage2') { + // For deployed stage2 wallets, get the image hash from the contract + fromImageHash = await provider.request({ + method: 'eth_call', + params: [{ to: this.address, data: AbiFunction.encodeData(Constants.IMAGE_HASH) }], + }) + } else { + // For non-deployed or stage1 wallets, get the deploy hash + const deployInformation = await this.options.stateProvider.getDeploy(this.address) + if (!deployInformation) { + throw new Error(`cannot find deploy information for ${this.address}`) + } + fromImageHash = deployInformation.imageHash + } + + // Get configuration updates + updates = await this.options.stateProvider.getConfigurationUpdates(this.address, fromImageHash) + imageHash = updates[updates.length - 1]?.imageHash ?? fromImageHash + } else { + // Without a provider, we can only get information from the state provider + const deployInformation = await this.options.stateProvider.getDeploy(this.address) + if (!deployInformation) { + throw new Error(`cannot find deploy information for ${this.address}`) + } + updates = await this.options.stateProvider.getConfigurationUpdates(this.address, deployInformation.imageHash) + imageHash = updates[updates.length - 1]?.imageHash ?? deployInformation.imageHash + } + + // Get the current configuration + const configuration = await this.options.stateProvider.getConfiguration(imageHash) + if (!configuration) { + throw new Error(`cannot find configuration details for ${this.address}`) + } + + return { + address: this.address, + isDeployed, + implementation, + stage, + configuration, + imageHash, + pendingUpdates: [...updates].reverse(), + chainId, + } } async send( @@ -90,7 +192,10 @@ export class Wallet { ): Promise<{ to: Address.Address; data: Hex.Hex }> { const space = options?.space ?? 0n - if (await this.isDeployed(provider)) { + // Use getStatus to check if the wallet is deployed + const status = await this.getStatus(provider) + + if (status.isDeployed) { const nonce = BigInt( await provider.request({ method: 'eth_call', @@ -165,55 +270,26 @@ export class Wallet { ): Promise { const provider = options?.provider - let updates: Unpromise> = [] - - let chainId: bigint - let isDeployed: boolean - let deployHash: { deployHash: Hex.Hex; context: Context.Context } | undefined - let imageHash: Hex.Hex - if (provider) { - const requests = await Promise.all([ - provider.request({ method: 'eth_chainId' }), - this.isDeployed(provider), - provider - .request({ - method: 'eth_call', - params: [{ to: this.address, data: AbiFunction.encodeData(Constants.GET_IMPLEMENTATION) }], - }) - .then((res) => `0x${res.slice(26)}`) - .catch(() => undefined), - ]) + // Use getStatus to get the wallet status + const status = await this.getStatus(provider) - chainId = BigInt(requests[0]) - isDeployed = requests[1] - const implementation = requests[2] + console.log('status', status) - let fromImageHash: Hex.Hex + const chainId = status.chainId ?? 0n + const isDeployed = status.isDeployed - if (isDeployed && implementation?.toLowerCase() !== this.options.context.stage1.toLowerCase()) { - fromImageHash = await provider.request({ - method: 'eth_call', - params: [{ to: this.address, data: AbiFunction.encodeData(Constants.IMAGE_HASH) }], - }) - } else { - // Avoid setting deployHash as it later determines if we use 6492 or not - fromImageHash = (await this.options.stateProvider.getDeployHash(this.address)).deployHash + // Get deploy hash if needed for ERC-6492 + let deployHash: { deployHash: Hex.Hex; context: Context.Context } | undefined + if (!isDeployed || status.stage === 'stage1') { + const deployInformation = await this.options.stateProvider.getDeploy(this.address) + if (!deployInformation) { + throw new Error(`cannot find deploy information for ${this.address}`) } - - updates = await this.options.stateProvider.getConfigurationUpdates(this.address, fromImageHash) - imageHash = updates[updates.length - 1]?.imageHash ?? fromImageHash - } else { - chainId = 0n - isDeployed = true - - const { deployHash } = await this.options.stateProvider.getDeployHash(this.address) - - const updates = await this.options.stateProvider.getConfigurationUpdates(this.address, deployHash) - - imageHash = updates[updates.length - 1]?.imageHash ?? deployHash + deployHash = { deployHash: deployInformation.imageHash, context: deployInformation.context } } - const configuration = await this.options.stateProvider.getConfiguration(imageHash) + const configuration = status.configuration + const updates = status.pendingUpdates const topology = await WalletConfig.sign( configuration.topology, @@ -380,12 +456,13 @@ export class Wallet { }, ) - const erc6492 = deployHash && Erc6492.deploy(deployHash.deployHash, deployHash.context) + const erc6492 = + !status.isDeployed && deployHash ? Erc6492.deploy(deployHash.deployHash, deployHash.context) : undefined return { noChainId: !chainId, configuration: { ...configuration, topology }, - suffix: updates.reverse().map(({ signature }) => signature), + suffix: updates.map(({ signature }) => signature), erc6492: erc6492 && { ...erc6492, data: Hex.toBytes(erc6492.data) }, } } diff --git a/packages/primitives/src/wallet-config.ts b/packages/primitives/src/wallet-config.ts index fc579f8cb..8a65b74c5 100644 --- a/packages/primitives/src/wallet-config.ts +++ b/packages/primitives/src/wallet-config.ts @@ -583,3 +583,107 @@ export type SignerErrorCallback = (signer: SignerLeaf | SapientSignerLeaf, error type SignerSignatureCallback = (topology: RawTopology) => void type CancelCallback = (success: boolean) => void type MaybePromise = T | Promise + +export function mergeTopology(a: Topology, b: Topology): Topology { + if (isNode(a) && isNode(b)) { + return [mergeTopology(a[0], b[0]), mergeTopology(a[1], b[1])] + } + + if (isNode(a) && !isNode(b)) { + if (!isNodeLeaf(b)) { + throw new Error('Topology mismatch: cannot merge node with non-node that is not a node leaf') + } + const hb = hashConfiguration(b) + if (!Bytes.isEqual(hb, hashConfiguration(a))) { + throw new Error('Topology mismatch: node hash does not match') + } + return a + } + + if (!isNode(a) && isNode(b)) { + if (!isNodeLeaf(a)) { + throw new Error('Topology mismatch: cannot merge node with non-node that is not a node leaf') + } + const ha = hashConfiguration(a) + if (!Bytes.isEqual(ha, hashConfiguration(b))) { + throw new Error('Topology mismatch: node hash does not match') + } + return b + } + + return mergeLeaf(a as Leaf, b as Leaf) +} + +function mergeLeaf(a: Leaf, b: Leaf): Leaf { + if (isNodeLeaf(a) && isNodeLeaf(b)) { + if (!Bytes.isEqual(a, b)) { + throw new Error('Topology mismatch: different node leaves') + } + return a + } + + if (isNodeLeaf(a) && !isNodeLeaf(b)) { + const hb = hashConfiguration(b) + if (!Bytes.isEqual(hb, a)) { + throw new Error('Topology mismatch: node leaf hash does not match') + } + return b + } + + if (!isNodeLeaf(a) && isNodeLeaf(b)) { + const ha = hashConfiguration(a) + if (!Bytes.isEqual(ha, b)) { + throw new Error('Topology mismatch: node leaf hash does not match') + } + return a + } + + if (isSignerLeaf(a) && isSignerLeaf(b)) { + if (a.address !== b.address || a.weight !== b.weight) { + throw new Error('Topology mismatch: signer fields differ') + } + if (!!a.signed !== !!b.signed || !!a.signature !== !!b.signature) { + throw new Error('Topology mismatch: signer signature fields differ') + } + return a + } + + if (isSapientSignerLeaf(a) && isSapientSignerLeaf(b)) { + if (a.address !== b.address || a.weight !== b.weight || !Bytes.isEqual(a.imageHash, b.imageHash)) { + throw new Error('Topology mismatch: sapient signer fields differ') + } + if (!!a.signed !== !!b.signed || !!a.signature !== !!b.signature) { + throw new Error('Topology mismatch: sapient signature fields differ') + } + return a + } + + if (isSubdigestLeaf(a) && isSubdigestLeaf(b)) { + if (!Bytes.isEqual(a.digest, b.digest)) { + throw new Error('Topology mismatch: subdigest fields differ') + } + return a + } + + if (isAnyAddressSubdigestLeaf(a) && isAnyAddressSubdigestLeaf(b)) { + if (!Bytes.isEqual(a.digest, b.digest)) { + throw new Error('Topology mismatch: any-address-subdigest fields differ') + } + return a + } + + if (isNestedLeaf(a) && isNestedLeaf(b)) { + if (a.weight !== b.weight || a.threshold !== b.threshold) { + throw new Error('Topology mismatch: nested leaf fields differ') + } + const mergedTree = mergeTopology(a.tree, b.tree) + return { + type: 'nested', + weight: a.weight, + threshold: a.threshold, + tree: mergedTree, + } + } + + throw new Error('Topology mismatch: incompatible leaf types') +} From e1840aa77b8c9e714544d1201620cee1a7ed1a78 Mon Sep 17 00:00:00 2001 From: Agusx1211 Date: Fri, 28 Feb 2025 17:41:57 +0000 Subject: [PATCH 155/439] Fix get configuration updates --- packages/core/src/state/local/index.ts | 28 +++++++++++++++++--------- packages/core/src/wallet.ts | 2 -- 2 files changed, 18 insertions(+), 12 deletions(-) diff --git a/packages/core/src/state/local/index.ts b/packages/core/src/state/local/index.ts index cd81576e9..d3f73b120 100644 --- a/packages/core/src/state/local/index.ts +++ b/packages/core/src/state/local/index.ts @@ -73,9 +73,7 @@ export class Provider implements ProviderInterface { return this.store.loadCounterfactualWallet(wallet) } - async getWallets( - signer: Address.Address, - ): Promise<{ + async getWallets(signer: Address.Address): Promise<{ [wallet: `0x${string}`]: { chainId: bigint; payload: Payload.Parented; signature: Signature.SignatureOfSignerLeaf } }> { const subdigests = await this.store.loadSubdigestsOfSigner(signer) @@ -154,7 +152,7 @@ export class Provider implements ProviderInterface { | { nextImageHash: Hex.Hex checkpoint: bigint - signature: Hex.Hex + signature: Signature.RawSignature } | undefined @@ -219,7 +217,14 @@ export class Provider implements ProviderInterface { best = { nextImageHash: candidate.nextImageHash, checkpoint: candidate.config!.checkpoint, - signature: Bytes.toHex(Signature.encodeTopology(encoded, { noChainId: true })), + signature: { + noChainId: true, + configuration: { + threshold: fromConfig.threshold, + checkpoint: fromConfig.checkpoint, + topology: encoded, + }, + }, } } @@ -227,12 +232,15 @@ export class Provider implements ProviderInterface { return [] } - const nextStep = await this.store.loadConfig(best.nextImageHash) - if (!nextStep) { - return [] - } + const nextStep = await this.getConfigurationUpdates(wallet, best.nextImageHash, { allUpdates: true }) - return [{ imageHash: best.nextImageHash, signature: { noChainId: true, configuration: nextStep } }] + return [ + { + imageHash: best.nextImageHash, + signature: best.signature, + }, + ...nextStep, + ] } async saveUpdate( diff --git a/packages/core/src/wallet.ts b/packages/core/src/wallet.ts index f1bca636a..7f6cd7768 100644 --- a/packages/core/src/wallet.ts +++ b/packages/core/src/wallet.ts @@ -273,8 +273,6 @@ export class Wallet { // Use getStatus to get the wallet status const status = await this.getStatus(provider) - console.log('status', status) - const chainId = status.chainId ?? 0n const isDeployed = status.isDeployed From e9eb8a103e531535b7b4af8e2654db196b2d9681 Mon Sep 17 00:00:00 2001 From: Agusx1211 Date: Sat, 1 Mar 2025 19:27:05 +0000 Subject: [PATCH 156/439] Basic passkey signer --- packages/core/src/signers/passkey.ts | 144 ++++++++++++++++++++++++++ packages/primitives/src/extensions.ts | 9 ++ packages/primitives/src/index.ts | 1 + 3 files changed, 154 insertions(+) create mode 100644 packages/core/src/signers/passkey.ts create mode 100644 packages/primitives/src/extensions.ts diff --git a/packages/core/src/signers/passkey.ts b/packages/core/src/signers/passkey.ts new file mode 100644 index 000000000..697425648 --- /dev/null +++ b/packages/core/src/signers/passkey.ts @@ -0,0 +1,144 @@ +import { Hex, Bytes, Address } from 'ox' +import { Signer } from '../wallet' +import { Payload, Extensions } from '@0xsequence/sequence-primitives' +import type { Signature as SignatureTypes } from '@0xsequence/sequence-primitives' +import { keccak256 } from 'ox/Hash' +import { WebAuthnP256 } from 'ox' + +export type PasskeyOptions = { + extensions: Pick + + x: Hex.Hex + y: Hex.Hex + + credentialId: Hex.Hex + requireUserVerification: boolean +} + +export type PasskeySignerConnector = ( + challenge: Bytes.Bytes, + credentialId: Hex.Hex, +) => Promise + +function _rootForPasskey(requireUserVerification: boolean, x: Hex.Hex, y: Hex.Hex): Hex.Hex { + const a = keccak256(Bytes.concat(Bytes.padLeft(Bytes.fromHex(x), 32), Bytes.padLeft(Bytes.fromHex(y), 32))) + const b = Bytes.padLeft(requireUserVerification ? Bytes.from([1]) : Bytes.from([0]), 32) + return Hex.fromBytes(keccak256(Bytes.concat(b, a))) +} + +function _encodeSignature( + requireUserVerification: boolean, + r: Bytes.Bytes, + s: Bytes.Bytes, + authenticatorData: Bytes.Bytes, + clientDataJSON: string, +): Bytes.Bytes { + const challengeIndex = clientDataJSON.indexOf('"challenge"') + const typeIndex = clientDataJSON.indexOf('"type"') + + const authDataSize = authenticatorData.length + const clientDataJSONSize = clientDataJSON.length + + if (authDataSize > 65535) { + throw new Error('Authenticator data size is too large') + } + if (clientDataJSONSize > 65535) { + throw new Error('Client data JSON size is too large') + } + + const bytesAuthDataSize = authDataSize <= 255 ? 1 : 2 + const bytesClientDataJSONSize = clientDataJSONSize <= 255 ? 1 : 2 + const bytesChallengeIndex = challengeIndex <= 255 ? 1 : 2 + const bytesTypeIndex = typeIndex <= 255 ? 1 : 2 + + let flags = 0 + + flags |= requireUserVerification ? 0 : 1 // 0x01 bit + flags |= (bytesAuthDataSize - 1) << 1 // 0x02 bit + flags |= (bytesClientDataJSONSize - 1) << 2 // 0x04 bit + flags |= (bytesChallengeIndex - 1) << 3 // 0x08 bit + flags |= (bytesTypeIndex - 1) << 4 // 0x10 bit + + let result: Bytes.Bytes = Bytes.from([flags]) + + result = Bytes.concat(result, Bytes.padLeft(Bytes.fromNumber(authDataSize), bytesAuthDataSize)) + result = Bytes.concat(result, authenticatorData) + + result = Bytes.concat(result, Bytes.padLeft(Bytes.fromNumber(clientDataJSONSize), bytesClientDataJSONSize)) + result = Bytes.concat(result, Bytes.from(new TextEncoder().encode(clientDataJSON))) + + result = Bytes.concat(result, Bytes.padLeft(Bytes.fromNumber(challengeIndex), bytesChallengeIndex)) + result = Bytes.concat(result, Bytes.padLeft(Bytes.fromNumber(typeIndex), bytesTypeIndex)) + + result = Bytes.concat(result, Bytes.padLeft(r, 32)) + result = Bytes.concat(result, Bytes.padLeft(s, 32)) + + return result +} + +export class Passkey implements Signer { + public readonly address: Address.Address + public readonly rootHash: Hex.Hex + + constructor(public readonly options: PasskeyOptions) { + this.rootHash = _rootForPasskey(options.requireUserVerification, options.x, options.y) + this.address = options.extensions.passkeys + } + + static async create( + extensions: Pick, + options: { requireUserVerification: boolean } = { requireUserVerification: true }, + ) { + const credential = await WebAuthnP256.createCredential({ + name: 'Sequence (WIP DEVELOPMENT)', + }) + + const x = Hex.fromNumber(credential.publicKey.x) + const y = Hex.fromNumber(credential.publicKey.y) + + return new Passkey({ + credentialId: Hex.fromString(credential.id), + requireUserVerification: options.requireUserVerification, + extensions, + x, + y, + }) + } + + async signSapient( + wallet: Address.Address, + chainId: bigint, + payload: Payload.Parented, + imageHash: Hex.Hex, + ): Promise { + if (this.rootHash !== imageHash) { + // TODO: This should never get called, why do we have this? + throw new Error('Unexpected image hash') + } + + const challenge = Hex.fromBytes(Payload.hash(wallet, chainId, payload)) + const response = await WebAuthnP256.sign({ + challenge, + credentialId: this.options.credentialId, + userVerification: this.options.requireUserVerification ? 'required' : 'discouraged', + }) + + const authenticatorData = Bytes.fromHex(response.metadata.authenticatorData) + const rBytes = Bytes.fromNumber(response.signature.r) + const sBytes = Bytes.fromNumber(response.signature.s) + + const signature = _encodeSignature( + this.options.requireUserVerification, + rBytes, + sBytes, + authenticatorData, + response.metadata.clientDataJSON, + ) + + return { + address: this.address, + data: signature, + type: 'sapient_compact', + } + } +} diff --git a/packages/primitives/src/extensions.ts b/packages/primitives/src/extensions.ts new file mode 100644 index 000000000..c5b398101 --- /dev/null +++ b/packages/primitives/src/extensions.ts @@ -0,0 +1,9 @@ +import { Address } from 'ox' + +export type Extensions = { + passkeys: Address.Address +} + +export const Dev1: Extensions = { + passkeys: '0xE0bb692107BEE15719862E9a084447B0a8E4E2e2', +} diff --git a/packages/primitives/src/index.ts b/packages/primitives/src/index.ts index d374c9ba1..555721bd4 100644 --- a/packages/primitives/src/index.ts +++ b/packages/primitives/src/index.ts @@ -11,3 +11,4 @@ export * as Signature from './signature' //FIXME This name conflicts with oxlib export * as Utils from './utils' export * as WalletConfig from './wallet-config' export * as Context from './context' +export * as Extensions from './extensions' From 284e17628ec16e9e118661c3e4b177eb862c0cef Mon Sep 17 00:00:00 2001 From: Agusx1211 Date: Sat, 1 Mar 2025 19:27:22 +0000 Subject: [PATCH 157/439] Move identity instrument --- packages/wdk/src/account.ts | 7 +++++++ packages/wdk/src/{ => identity}/authkey.ts | 0 packages/wdk/src/{ => identity}/challenge.ts | 0 packages/wdk/src/identity/index.ts | 9 +++++++++ packages/wdk/src/{ => identity}/nitro/index.ts | 0 packages/wdk/src/{ => identity}/nitro/nitro.gen.ts | 0 packages/wdk/src/{ => identity}/secure-store.ts | 0 packages/wdk/src/{ => identity}/signer.ts | 0 packages/wdk/src/{ => identity}/subtle-crypto.ts | 0 packages/wdk/src/{ => identity}/wdk.ts | 0 packages/wdk/src/index.ts | 11 ++--------- 11 files changed, 18 insertions(+), 9 deletions(-) create mode 100644 packages/wdk/src/account.ts rename packages/wdk/src/{ => identity}/authkey.ts (100%) rename packages/wdk/src/{ => identity}/challenge.ts (100%) create mode 100644 packages/wdk/src/identity/index.ts rename packages/wdk/src/{ => identity}/nitro/index.ts (100%) rename packages/wdk/src/{ => identity}/nitro/nitro.gen.ts (100%) rename packages/wdk/src/{ => identity}/secure-store.ts (100%) rename packages/wdk/src/{ => identity}/signer.ts (100%) rename packages/wdk/src/{ => identity}/subtle-crypto.ts (100%) rename packages/wdk/src/{ => identity}/wdk.ts (100%) diff --git a/packages/wdk/src/account.ts b/packages/wdk/src/account.ts new file mode 100644 index 000000000..d632d22a9 --- /dev/null +++ b/packages/wdk/src/account.ts @@ -0,0 +1,7 @@ +import { Address } from 'ox' + +export class Account { + constructor(public readonly address: Address.Address) {} + + static async create(address: Address.Address) {} +} diff --git a/packages/wdk/src/authkey.ts b/packages/wdk/src/identity/authkey.ts similarity index 100% rename from packages/wdk/src/authkey.ts rename to packages/wdk/src/identity/authkey.ts diff --git a/packages/wdk/src/challenge.ts b/packages/wdk/src/identity/challenge.ts similarity index 100% rename from packages/wdk/src/challenge.ts rename to packages/wdk/src/identity/challenge.ts diff --git a/packages/wdk/src/identity/index.ts b/packages/wdk/src/identity/index.ts new file mode 100644 index 000000000..fe7777cb2 --- /dev/null +++ b/packages/wdk/src/identity/index.ts @@ -0,0 +1,9 @@ +import { IdentityInstrument } from './nitro' +export { IdentityInstrument } + +export * from './wdk' +export * from './authkey' +export * from './challenge' +export * from './signer' +export * from './subtle-crypto' +export * from './secure-store' diff --git a/packages/wdk/src/nitro/index.ts b/packages/wdk/src/identity/nitro/index.ts similarity index 100% rename from packages/wdk/src/nitro/index.ts rename to packages/wdk/src/identity/nitro/index.ts diff --git a/packages/wdk/src/nitro/nitro.gen.ts b/packages/wdk/src/identity/nitro/nitro.gen.ts similarity index 100% rename from packages/wdk/src/nitro/nitro.gen.ts rename to packages/wdk/src/identity/nitro/nitro.gen.ts diff --git a/packages/wdk/src/secure-store.ts b/packages/wdk/src/identity/secure-store.ts similarity index 100% rename from packages/wdk/src/secure-store.ts rename to packages/wdk/src/identity/secure-store.ts diff --git a/packages/wdk/src/signer.ts b/packages/wdk/src/identity/signer.ts similarity index 100% rename from packages/wdk/src/signer.ts rename to packages/wdk/src/identity/signer.ts diff --git a/packages/wdk/src/subtle-crypto.ts b/packages/wdk/src/identity/subtle-crypto.ts similarity index 100% rename from packages/wdk/src/subtle-crypto.ts rename to packages/wdk/src/identity/subtle-crypto.ts diff --git a/packages/wdk/src/wdk.ts b/packages/wdk/src/identity/wdk.ts similarity index 100% rename from packages/wdk/src/wdk.ts rename to packages/wdk/src/identity/wdk.ts diff --git a/packages/wdk/src/index.ts b/packages/wdk/src/index.ts index fe7777cb2..a3301d330 100644 --- a/packages/wdk/src/index.ts +++ b/packages/wdk/src/index.ts @@ -1,9 +1,2 @@ -import { IdentityInstrument } from './nitro' -export { IdentityInstrument } - -export * from './wdk' -export * from './authkey' -export * from './challenge' -export * from './signer' -export * from './subtle-crypto' -export * from './secure-store' +export * as Identity from './identity' +export * from './account' From b8eff2d995ea0da7b0bdaefcb718e5bb34cba8df Mon Sep 17 00:00:00 2001 From: Michael Standen Date: Fri, 28 Feb 2025 14:45:58 +1300 Subject: [PATCH 158/439] Add session manager --- packages/core/src/signers/index.ts | 1 + packages/core/src/signers/pk.ts | 10 +- packages/core/src/signers/session/explicit.ts | 168 ++++++++++++++++++ packages/core/src/signers/session/implicit.ts | 115 ++++++++++++ packages/core/src/signers/session/index.ts | 3 + packages/core/src/signers/session/session.ts | 19 ++ .../src/subcommands/sessionExplicit.ts | 6 +- packages/primitives/src/attestation.ts | 15 ++ packages/primitives/src/payload.ts | 23 ++- packages/primitives/src/permission.ts | 48 ++++- packages/primitives/src/session-config.ts | 13 ++ packages/primitives/src/utils.ts | 7 +- packages/wdk/src/identity/authkey.ts | 2 +- packages/wdk/src/identity/signer.ts | 8 +- packages/wdk/src/session-manager.ts | 161 +++++++++++++++++ 15 files changed, 584 insertions(+), 15 deletions(-) create mode 100644 packages/core/src/signers/session/explicit.ts create mode 100644 packages/core/src/signers/session/implicit.ts create mode 100644 packages/core/src/signers/session/index.ts create mode 100644 packages/core/src/signers/session/session.ts create mode 100644 packages/wdk/src/session-manager.ts diff --git a/packages/core/src/signers/index.ts b/packages/core/src/signers/index.ts index ea493c46e..968257354 100644 --- a/packages/core/src/signers/index.ts +++ b/packages/core/src/signers/index.ts @@ -1 +1,2 @@ export * from './pk' +export * as Session from './session' diff --git a/packages/core/src/signers/pk.ts b/packages/core/src/signers/pk.ts index 519f5614e..e1e868a3e 100644 --- a/packages/core/src/signers/pk.ts +++ b/packages/core/src/signers/pk.ts @@ -1,14 +1,14 @@ -import { Hex, Bytes, PublicKey, Address, Secp256k1 } from 'ox' -import { Signer } from '../wallet' -import { Payload, Signature } from '@0xsequence/sequence-primitives' import type { Payload as PayloadTypes, Signature as SignatureTypes } from '@0xsequence/sequence-primitives' +import { Payload } from '@0xsequence/sequence-primitives' +import { Address, Bytes, Hex, PublicKey, Secp256k1 } from 'ox' +import { Signer as SignerInterface } from '../wallet' -export class Pk implements Signer { +export class Pk implements SignerInterface { public readonly address: Address.Address public readonly pubKey: PublicKey.PublicKey constructor(private readonly privateKey: Hex.Hex | Bytes.Bytes) { - this.pubKey = Secp256k1.getPublicKey({ privateKey }) + this.pubKey = Secp256k1.getPublicKey({ privateKey: this.privateKey }) this.address = Address.fromPublicKey(this.pubKey) } diff --git a/packages/core/src/signers/session/explicit.ts b/packages/core/src/signers/session/explicit.ts new file mode 100644 index 000000000..b7f00fe73 --- /dev/null +++ b/packages/core/src/signers/session/explicit.ts @@ -0,0 +1,168 @@ +import { Payload, Permission, SessionSignature, Utils } from '@0xsequence/sequence-primitives' +import { AbiParameters, Address, Bytes, Hash, Hex, Provider, Secp256k1 } from 'ox' +import { SignerInterface } from './session' + +export type ExplicitParams = Omit + +export class Explicit implements SignerInterface { + readonly address: Address.Address + readonly sessionPermissions: Permission.SessionPermissions + + constructor( + private readonly _privateKey: `0x${string}`, + sessionPermissions: ExplicitParams, + ) { + this.address = Address.fromPublicKey(Secp256k1.getPublicKey({ privateKey: this._privateKey })) + this.sessionPermissions = { + ...sessionPermissions, + signer: this.address, + } + } + + async findSupportedPermission( + wallet: Address.Address, + _chainId: bigint, + call: Payload.Call, + provider: Provider.Provider, + ): Promise { + // Wallet and signer are encoded as a prefix for the usage hash + const limitHashPrefix = Hash.keccak256( + AbiParameters.encode( + [ + { type: 'address', name: 'wallet' }, + { type: 'address', name: 'signer' }, + ], + [wallet, this.address], + ), + ) + for (const [permissionIndex, permission] of this.sessionPermissions.permissions.entries()) { + // Encode the permission and permission index as a parameter for the usage hash + const encodeParams = [ + { type: 'bytes32', name: 'limitHashPrefix' }, + Permission.permissionStructAbi, + { type: 'uint256', name: 'permissionIndex' }, + ] as const + const usageHash = Hash.keccak256( + AbiParameters.encode(encodeParams, [ + limitHashPrefix, + { + target: permission.target, + rules: permission.rules.map((rule) => ({ + cumulative: rule.cumulative, + operation: rule.operation, + value: Bytes.toHex(rule.value), + offset: rule.offset, + mask: Bytes.toHex(rule.mask), + })), + }, + BigInt(permissionIndex), + ]), + ) + // Validate the permission + if (await validatePermission(permission, call, provider, usageHash)) { + return permission + } + } + return undefined + } + + async supportedCall( + wallet: Address.Address, + chainId: bigint, + call: Payload.Call, + provider: Provider.Provider, + ): Promise { + //FIXME Should this be stateful to support cumulative rules within a payload? + const permission = await this.findSupportedPermission(wallet, chainId, call, provider) + if (!permission) { + return false + } + return true + } + + async signCall( + wallet: Address.Address, + chainId: bigint, + call: Payload.Call, + provider: Provider.Provider, + ): Promise { + // Find the valid permission for this call + const permission = await this.findSupportedPermission(wallet, chainId, call, provider) + if (!permission) { + // This covers the support check + throw new Error('Invalid permission') + } + const permissionIndex = this.sessionPermissions.permissions.indexOf(permission) + if (permissionIndex === -1) { + // Unreachable + throw new Error('Invalid permission') + } + // Sign it + const callHash = Payload.hashCall(call) + const sessionSignature = Secp256k1.sign({ payload: callHash, privateKey: this._privateKey }) + return { + permissionIndex: BigInt(permissionIndex), + sessionSignature, + } + } +} + +async function validatePermission( + permission: Permission.Permission, + call: Payload.Call, + provider?: Provider.Provider, + usageHash?: Hex.Hex, +): Promise { + if (permission.target !== call.to) { + return false + } + + for (const rule of permission.rules) { + // Extract value from calldata at offset + const callValue = call.data.slice(Number(rule.offset), Number(rule.offset) + 32) + // Apply mask + let value = callValue.map((b, i) => b & rule.mask[i]!) + + if (rule.cumulative) { + if (provider && usageHash) { + // Get the cumulative value from the contract storage + const storageSlot = Utils.getStorageSlotForMappingWithKey(Hex.toBigInt(usageHash), Hex.fromBytes(rule.value)) + const storageValue = await provider.request({ + method: 'eth_getStorageAt', + params: [permission.target, storageSlot, 'latest'], + }) + // Increment the value + value = Bytes.fromNumber(Hex.toBigInt(storageValue) + Bytes.toBigInt(value)) + } else { + throw new Error('Cumulative rules require a provider and usage hash') + } + } + + // Compare based on operation + if (rule.operation === Permission.ParameterOperation.EQUAL) { + if (!Bytes.isEqual(value, rule.value)) { + return false + } + } + + if (rule.operation === Permission.ParameterOperation.LESS_THAN_OR_EQUAL) { + if (Bytes.toBigInt(value) > Bytes.toBigInt(rule.value)) { + return false + } + } + + if (rule.operation === Permission.ParameterOperation.NOT_EQUAL) { + if (Bytes.isEqual(value, rule.value)) { + return false + } + } + + if (rule.operation === Permission.ParameterOperation.GREATER_THAN_OR_EQUAL) { + if (Bytes.toBigInt(value) < Bytes.toBigInt(rule.value)) { + return false + } + } + } + + return true +} diff --git a/packages/core/src/signers/session/implicit.ts b/packages/core/src/signers/session/implicit.ts new file mode 100644 index 000000000..53e526dc9 --- /dev/null +++ b/packages/core/src/signers/session/implicit.ts @@ -0,0 +1,115 @@ +import { Attestation, Payload, SessionSignature, Signature } from '@0xsequence/sequence-primitives' +import { AbiFunction, Address, Bytes, Provider, Secp256k1 } from 'ox' +import { SignerInterface } from './session' + +export type AttestationParams = Omit + +export class Implicit implements SignerInterface { + readonly address: Address.Address + + constructor( + private readonly _privateKey: `0x${string}`, + private readonly _attestation: Attestation.Attestation, + private readonly _identitySignature: Signature.RSY, + private readonly _sessionManager: Address.Address, + ) { + this.address = Address.fromPublicKey(Secp256k1.getPublicKey({ privateKey: this._privateKey })) + } + + async supportedCall( + wallet: Address.Address, + _chainId: bigint, + call: Payload.Call, + provider: Provider.Provider, + ): Promise { + // Call the acceptImplicitRequest function on the called contract + const encodedCallData = AbiFunction.encodeData(acceptImplicitRequestFunctionAbi, [ + wallet, + { + approvedSigner: this._attestation.approvedSigner, + identityType: Bytes.toHex(this._attestation.identityType), + issuerHash: Bytes.toHex(this._attestation.issuerHash), + audienceHash: Bytes.toHex(this._attestation.audienceHash), + authData: Bytes.toHex(this._attestation.authData), + applicationData: Bytes.toHex(this._attestation.applicationData), + }, + '0x', + { + to: call.to, + value: call.value, + data: Bytes.toHex(call.data), + gasLimit: call.gasLimit, + delegateCall: call.delegateCall, + onlyFallback: call.onlyFallback, + behaviorOnError: BigInt(Payload.encodeBehaviorOnError(call.behaviorOnError)), + }, + ]) + const acceptImplicitRequestResult = await provider.request({ + method: 'eth_call', + params: [{ from: this._sessionManager, to: call.to, data: encodedCallData }, 'latest'], + }) + const acceptImplicitRequest = AbiFunction.decodeResult( + acceptImplicitRequestFunctionAbi, + acceptImplicitRequestResult, + ) + const expectedResult = Attestation.generateImplicitRequestMagic(this._attestation, this.address) + return acceptImplicitRequest === Bytes.toHex(expectedResult) + } + + async signCall( + wallet: Address.Address, + chainId: bigint, + call: Payload.Call, + provider: Provider.Provider, + ): Promise { + const isSupported = await this.supportedCall(wallet, chainId, call, provider) + if (!isSupported) { + throw new Error('Unsupported call') + } + const callHash = Payload.hashCall(call) + const sessionSignature = Secp256k1.sign({ payload: callHash, privateKey: this._privateKey }) + return { + attestation: this._attestation, + identitySignature: this._identitySignature, + sessionSignature, + } + } +} + +const acceptImplicitRequestFunctionAbi = { + type: 'function', + name: 'acceptImplicitRequest', + inputs: [ + { name: 'wallet', type: 'address', internalType: 'address' }, + { + name: 'attestation', + type: 'tuple', + internalType: 'struct Attestation', + components: [ + { name: 'approvedSigner', type: 'address', internalType: 'address' }, + { name: 'identityType', type: 'bytes4', internalType: 'bytes4' }, + { name: 'issuerHash', type: 'bytes32', internalType: 'bytes32' }, + { name: 'audienceHash', type: 'bytes32', internalType: 'bytes32' }, + { name: 'authData', type: 'bytes', internalType: 'bytes' }, + { name: 'applicationData', type: 'bytes', internalType: 'bytes' }, + ], + }, + { name: 'redirectUrlHash', type: 'bytes32', internalType: 'bytes32' }, + { + name: 'call', + type: 'tuple', + internalType: 'struct Payload.Call', + components: [ + { name: 'to', type: 'address', internalType: 'address' }, + { name: 'value', type: 'uint256', internalType: 'uint256' }, + { name: 'data', type: 'bytes', internalType: 'bytes' }, + { name: 'gasLimit', type: 'uint256', internalType: 'uint256' }, + { name: 'delegateCall', type: 'bool', internalType: 'bool' }, + { name: 'onlyFallback', type: 'bool', internalType: 'bool' }, + { name: 'behaviorOnError', type: 'uint256', internalType: 'uint256' }, + ], + }, + ], + outputs: [{ name: '', type: 'bytes32', internalType: 'bytes32' }], + stateMutability: 'view', +} as const diff --git a/packages/core/src/signers/session/index.ts b/packages/core/src/signers/session/index.ts new file mode 100644 index 000000000..7624f896f --- /dev/null +++ b/packages/core/src/signers/session/index.ts @@ -0,0 +1,3 @@ +export * from './explicit' +export * from './implicit' +export * from './session' diff --git a/packages/core/src/signers/session/session.ts b/packages/core/src/signers/session/session.ts new file mode 100644 index 000000000..dec8e9c44 --- /dev/null +++ b/packages/core/src/signers/session/session.ts @@ -0,0 +1,19 @@ +import { Address, Provider } from 'ox' +import { Payload, SessionSignature } from '@0xsequence/sequence-primitives' + +export interface SignerInterface { + /// Check if the signer supports the call + supportedCall: ( + wallet: Address.Address, + chainId: bigint, + call: Payload.Call, + provider: Provider.Provider, + ) => Promise + /// Sign the call. Will throw if the call is not supported. + signCall: ( + wallet: Address.Address, + chainId: bigint, + call: Payload.Call, + provider: Provider.Provider, + ) => Promise +} diff --git a/packages/primitives-cli/src/subcommands/sessionExplicit.ts b/packages/primitives-cli/src/subcommands/sessionExplicit.ts index 30de9fe38..47e932002 100644 --- a/packages/primitives-cli/src/subcommands/sessionExplicit.ts +++ b/packages/primitives-cli/src/subcommands/sessionExplicit.ts @@ -12,13 +12,11 @@ export async function doAddSession(sessionInput: string, topologyInput: string): throw new Error('Session topology must be a valid session topology') } // Find the session in the topology - const sessionPermissions = SessionConfig.getSessionPermissions(topology, session.signer) - if (sessionPermissions) { + if (SessionConfig.getSessionPermissions(topology, session.signer)) { throw new Error('Session already exists') } // Merge the session into the topology - topology = SessionConfig.mergeSessionsTopologies(session, topology) - topology = SessionConfig.balanceSessionsTopology(topology) + topology = SessionConfig.addExplicitSession(topology, session) return SessionConfig.sessionsTopologyToJson(topology) } diff --git a/packages/primitives/src/attestation.ts b/packages/primitives/src/attestation.ts index b3e5bec65..fbb5e6063 100644 --- a/packages/primitives/src/attestation.ts +++ b/packages/primitives/src/attestation.ts @@ -56,3 +56,18 @@ export function fromParsed(parsed: any): Attestation { applicationData: Bytes.fromHex(parsed.applicationData), } } + +// Library functions + +export const ACCEPT_IMPLICIT_REQUEST_MAGIC_PREFIX = Hash.keccak256(Bytes.fromString('acceptImplicitRequest')) + +export function generateImplicitRequestMagic(attestation: Attestation, wallet: Address.Address): Bytes.Bytes { + return Hash.keccak256( + Bytes.concat( + ACCEPT_IMPLICIT_REQUEST_MAGIC_PREFIX, + Bytes.fromHex(wallet, { size: 20 }), + attestation.audienceHash, + attestation.issuerHash, + ), + ) +} diff --git a/packages/primitives/src/payload.ts b/packages/primitives/src/payload.ts index c314c1fbf..23f001b38 100644 --- a/packages/primitives/src/payload.ts +++ b/packages/primitives/src/payload.ts @@ -417,7 +417,7 @@ export function toTyped(wallet: Address.Address, chainId: bigint, payload: Paren } } -function encodeBehaviorOnError(behaviorOnError: Call['behaviorOnError']): number { +export function encodeBehaviorOnError(behaviorOnError: Call['behaviorOnError']): number { switch (behaviorOnError) { case 'ignore': return 0 @@ -427,3 +427,24 @@ function encodeBehaviorOnError(behaviorOnError: Call['behaviorOnError']): number return 2 } } + +export function hashCall(call: Call): Bytes.Bytes { + const CALL_TYPEHASH = Hash.keccak256( + Bytes.fromString( + 'Call(address to,uint256 value,bytes data,uint256 gasLimit,bool delegateCall,bool onlyFallback,uint256 behaviorOnError)', + ), + ) + + return Hash.keccak256( + Bytes.concat( + CALL_TYPEHASH, + Bytes.fromHex(call.to), + Bytes.fromNumber(call.value, { size: 32 }), + Hash.keccak256(call.data), + Bytes.fromNumber(call.gasLimit, { size: 32 }), + Bytes.fromBoolean(call.delegateCall), + Bytes.fromBoolean(call.onlyFallback), + Bytes.fromNumber(encodeBehaviorOnError(call.behaviorOnError), { size: 32 }), + ), + ) +} diff --git a/packages/primitives/src/permission.ts b/packages/primitives/src/permission.ts index 1c327e7e2..a66002789 100644 --- a/packages/primitives/src/permission.ts +++ b/packages/primitives/src/permission.ts @@ -1,4 +1,5 @@ -import { Address, Bytes } from 'ox' +import { AbiParameters, Address, Bytes } from 'ox' +import { Call } from './payload' export enum ParameterOperation { EQUAL = 0, @@ -74,6 +75,51 @@ function encodeParameterRule(rule: ParameterRule): Bytes.Bytes { ) } +// ABI encode + +export const permissionStructAbi = { + internalType: 'struct Permission', + name: 'permission', + type: 'tuple', + components: [ + { internalType: 'address', name: 'target', type: 'address' }, + { + internalType: 'struct ParameterRule[]', + name: 'rules', + type: 'tuple[]', + components: [ + { internalType: 'bool', name: 'cumulative', type: 'bool' }, + { + internalType: 'enum ParameterOperation', + name: 'operation', + type: 'uint8', + }, + { internalType: 'bytes32', name: 'value', type: 'bytes32' }, + { internalType: 'uint256', name: 'offset', type: 'uint256' }, + { internalType: 'bytes32', name: 'mask', type: 'bytes32' }, + ], + }, + ], +} as const + +export function abiEncodePermission(permission: Permission): string { + return AbiParameters.encode( + [permissionStructAbi], + [ + { + target: permission.target, + rules: permission.rules.map((rule) => ({ + cumulative: rule.cumulative, + operation: rule.operation, + value: Bytes.toHex(rule.value), + offset: rule.offset, + mask: Bytes.toHex(rule.mask), + })), + }, + ], + ) +} + // JSON export function sessionPermissionsToJson(sessionPermissions: SessionPermissions): string { diff --git a/packages/primitives/src/session-config.ts b/packages/primitives/src/session-config.ts index ddb180923..801dd34cf 100644 --- a/packages/primitives/src/session-config.ts +++ b/packages/primitives/src/session-config.ts @@ -429,6 +429,19 @@ export function removeExplicitSession( return topology } +export function addExplicitSession( + topology: SessionsTopology, + sessionPermissions: SessionPermissions, +): SessionsTopology { + // Find the session in the topology + if (getSessionPermissions(topology, sessionPermissions.signer)) { + throw new Error('Session already exists') + } + // Merge and balance + const merged = mergeSessionsTopologies(topology, sessionPermissions) + return balanceSessionsTopology(merged) +} + /** * Merges two topologies into a new branch of [a, b]. */ diff --git a/packages/primitives/src/utils.ts b/packages/primitives/src/utils.ts index bf9cf9d04..5f27872e9 100644 --- a/packages/primitives/src/utils.ts +++ b/packages/primitives/src/utils.ts @@ -1,4 +1,4 @@ -import { Bytes } from 'ox' +import { AbiParameters, Bytes, Hash, Hex } from 'ox' export function minBytesFor(val: bigint): number { return Math.ceil(val.toString(16).length / 2) @@ -24,3 +24,8 @@ export function unpackRSY(rsy: Bytes.Bytes): { r: bigint; s: bigint; yParity: nu const s = Bytes.toBigInt(sBytes) return { r, s, yParity } } + +export function getStorageSlotForMappingWithKey(mappingSlot: bigint, key: Hex.Hex): Hex.Hex { + const paddedKey = Hex.padLeft(key, 32) + return Hash.keccak256(AbiParameters.encode([{ type: 'bytes32' }, { type: 'uint256' }], [paddedKey, mappingSlot])) +} diff --git a/packages/wdk/src/identity/authkey.ts b/packages/wdk/src/identity/authkey.ts index e688cc622..82dcfbeb3 100644 --- a/packages/wdk/src/identity/authkey.ts +++ b/packages/wdk/src/identity/authkey.ts @@ -1,4 +1,4 @@ -import { Secp256k1, Address, Signature, PersonalMessage, Hash, Hex } from 'ox' +import { Secp256k1, Address, Signature, PersonalMessage, Hex } from 'ox' import { AuthKey as ProtoAuthKey, KeyType } from './nitro' import { SecureStoreBackend } from './secure-store' import { SubtleCryptoBackend } from './subtle-crypto' diff --git a/packages/wdk/src/identity/signer.ts b/packages/wdk/src/identity/signer.ts index 0ad41ff29..22cdd700a 100644 --- a/packages/wdk/src/identity/signer.ts +++ b/packages/wdk/src/identity/signer.ts @@ -24,11 +24,15 @@ export class IdentitySigner implements Signer { payload: Payload.Parented, ): Promise { const payloadHash = Payload.hash(wallet, chainId, payload) - const authKeySignature = await this.authKey.signMessage(payloadHash.toString()) + return this.signDigest(payloadHash) + } + + async signDigest(digest: Bytes.Bytes): Promise { + const authKeySignature = await this.authKey.signMessage(digest.toString()) const params = { ecosystemId: this.ecosystemId, signer: this.address, - digest: payloadHash.toString(), + digest: digest.toString(), authKey: this.authKey.toProto(), signature: authKeySignature, } diff --git a/packages/wdk/src/session-manager.ts b/packages/wdk/src/session-manager.ts new file mode 100644 index 000000000..02f42d800 --- /dev/null +++ b/packages/wdk/src/session-manager.ts @@ -0,0 +1,161 @@ +import { Signer as SignerInterface, Signers } from '@0xsequence/sequence-core' +import { + Attestation, + Config, + Payload, + SessionConfig, + SessionSignature, + Signature as SignatureTypes, +} from '@0xsequence/sequence-primitives' +import { Address, Provider, Secp256k1 } from 'ox' +import { IdentitySigner } from './signer' + +type SessionManagerConfiguration = { + topology: SessionConfig.SessionsTopology + provider: Provider.Provider + address?: Address.Address +} + +const DEFAULT_SESSION_MANAGER_ADDRESS: Address.Address = '0x1D23F28a45769693b4C462f7628A204389388E3B' + +export class SessionManager implements SignerInterface { + readonly address: Address.Address + private _topology: SessionConfig.SessionsTopology + private _provider: Provider.Provider + + private _implicitSigners: Signers.Session.Implicit[] = [] + private _explicitSigners: Signers.Session.Explicit[] = [] + constructor(configuration: SessionManagerConfiguration) { + this.address = configuration.address ?? DEFAULT_SESSION_MANAGER_ADDRESS + this._topology = configuration.topology + this._provider = configuration.provider + } + + static createEmpty( + identitySignerAddress: Address.Address, + configuration: Omit, + ): SessionManager { + return new SessionManager({ + ...configuration, + topology: SessionConfig.emptySessionsTopology(identitySignerAddress), + }) + } + + get topology(): SessionConfig.SessionsTopology { + return this._topology + } + + get imageHash() { + const configurationTree = SessionConfig.sessionsTopologyToConfigurationTree(this._topology) + return Config.hashConfigurationTree(configurationTree) + } + + withProvider(provider: Provider.Provider): SessionManager { + return new SessionManager({ + topology: this.topology, + address: this.address, + provider, + }) + } + + withTopology(topology: SessionConfig.SessionsTopology): SessionManager { + return new SessionManager({ + topology, + address: this.address, + provider: this._provider, + }) + } + + async createImplicitSession( + identitySigner: IdentitySigner, + attestationParams: Signers.Session.AttestationParams, + ): Promise { + const attestation: Attestation.Attestation = { + ...attestationParams, + approvedSigner: identitySigner.address, + } + const attestationHash = Attestation.hash(attestation) + const identitySignature = await identitySigner.signDigest(attestationHash) + if (identitySignature.type !== 'hash') { + // Unreachable + throw new Error('Identity signature must be a hash') + } + + const privateKey = Secp256k1.randomPrivateKey() + const signer = new Signers.Session.Implicit(privateKey, attestation, identitySignature, this.address) + this._implicitSigners.push(signer) + return signer + } + + async createExplicitSession(permissions: Signers.Session.ExplicitParams): Promise { + const privateKey = Secp256k1.randomPrivateKey() + const signer = new Signers.Session.Explicit(privateKey, permissions) + this._explicitSigners.push(signer) + + // Update configuration + const topology = SessionConfig.addExplicitSession(this.topology, signer.sessionPermissions) + this._topology = topology + + return signer + } + + async removeExplicitSession(signerAddress: Address.Address): Promise { + const topology = SessionConfig.removeExplicitSession(this.topology, signerAddress) + if (!topology) { + throw new Error('Session not found') + } + this._explicitSigners = this._explicitSigners.filter((signer) => signer.address !== signerAddress) + this._topology = topology + } + + async addBlacklistAddress(address: Address.Address): Promise { + const topology = SessionConfig.addToImplicitBlacklist(this.topology, address) + this._topology = topology + } + + async removeBlacklistAddress(address: Address.Address): Promise { + const topology = SessionConfig.removeFromImplicitBlacklist(this.topology, address) + this._topology = topology + } + + async signSapient( + wallet: Address.Address, + chainId: bigint, + payload: Payload.Parented, + ): Promise { + if (!Payload.isCalls(payload)) { + throw new Error('Only calls are supported') + } + // Try to sign with each signer, prioritizing implicit signers + const signers = [...this._implicitSigners, ...this._explicitSigners] + const signatures = await Promise.all( + //FIXME Run sync to support cumulative rules within a payload + payload.calls.map(async (call) => { + for (const signer of signers) { + if (await signer.supportedCall(wallet, chainId, call, this._provider)) { + const signature = await signer.signCall(wallet, chainId, call, this._provider) + return { + ...signature, + signer: signer.address, + } + } + } + throw new Error('No signer supported') + }), + ) + + const explicitSigners = signatures + .filter((sig) => SessionSignature.isExplicitSessionCallSignature(sig)) + .map((sig) => sig.signer) + + const implicitSigners = signatures + .filter((sig) => SessionSignature.isImplicitSessionCallSignature(sig)) + .map((sig) => sig.signer) + + return { + type: 'sapient', + address: this.address, + data: SessionSignature.encodeSessionCallSignatures(signatures, this.topology, explicitSigners, implicitSigners), + } + } +} From f079f5c38e65b4b5aa514fedefc62b62a4a9d371 Mon Sep 17 00:00:00 2001 From: Michael Standen Date: Mon, 3 Mar 2025 14:55:21 +1300 Subject: [PATCH 159/439] Specify authdata encoding on attestation --- packages/core/src/signers/session/implicit.ts | 9 ++++++-- packages/primitives/src/attestation.ts | 23 +++++++++++++++---- packages/wdk/src/index.ts | 2 +- packages/wdk/src/session/index.ts | 1 + .../wdk/src/{ => session}/session-manager.ts | 2 +- 5 files changed, 28 insertions(+), 9 deletions(-) create mode 100644 packages/wdk/src/session/index.ts rename packages/wdk/src/{ => session}/session-manager.ts (99%) diff --git a/packages/core/src/signers/session/implicit.ts b/packages/core/src/signers/session/implicit.ts index 53e526dc9..21fb5770a 100644 --- a/packages/core/src/signers/session/implicit.ts +++ b/packages/core/src/signers/session/implicit.ts @@ -30,8 +30,8 @@ export class Implicit implements SignerInterface { identityType: Bytes.toHex(this._attestation.identityType), issuerHash: Bytes.toHex(this._attestation.issuerHash), audienceHash: Bytes.toHex(this._attestation.audienceHash), - authData: Bytes.toHex(this._attestation.authData), applicationData: Bytes.toHex(this._attestation.applicationData), + authData: this._attestation.authData, }, '0x', { @@ -90,8 +90,13 @@ const acceptImplicitRequestFunctionAbi = { { name: 'identityType', type: 'bytes4', internalType: 'bytes4' }, { name: 'issuerHash', type: 'bytes32', internalType: 'bytes32' }, { name: 'audienceHash', type: 'bytes32', internalType: 'bytes32' }, - { name: 'authData', type: 'bytes', internalType: 'bytes' }, { name: 'applicationData', type: 'bytes', internalType: 'bytes' }, + { + internalType: 'struct AuthData', + name: 'authData', + type: 'tuple', + components: [{ internalType: 'string', name: 'redirectUrl', type: 'string' }], + }, ], }, { name: 'redirectUrlHash', type: 'bytes32', internalType: 'bytes32' }, diff --git a/packages/primitives/src/attestation.ts b/packages/primitives/src/attestation.ts index fbb5e6063..2b5cf7a58 100644 --- a/packages/primitives/src/attestation.ts +++ b/packages/primitives/src/attestation.ts @@ -5,24 +5,37 @@ export type Attestation = { identityType: Bytes.Bytes // bytes4 issuerHash: Bytes.Bytes // bytes32 audienceHash: Bytes.Bytes // bytes32 - authData: Bytes.Bytes // bytes applicationData: Bytes.Bytes // bytes + authData: AuthData } +export type AuthData = { + redirectUrl: string // bytes +} + +// Encoding and decoding + export function encode(attestation: Attestation): Bytes.Bytes { + const authDataBytes = encodeAuthData(attestation.authData) const parts: Bytes.Bytes[] = [ Bytes.fromHex(attestation.approvedSigner, { size: 20 }), Bytes.padLeft(attestation.identityType.slice(0, 4), 4), // Truncate identity type to 4 bytes Bytes.padLeft(attestation.issuerHash, 32), Bytes.padLeft(attestation.audienceHash, 32), - Bytes.fromNumber(attestation.authData.length, { size: 3 }), - attestation.authData, Bytes.fromNumber(attestation.applicationData.length, { size: 3 }), attestation.applicationData, + authDataBytes, ] return Bytes.concat(...parts) } +export function encodeAuthData(authData: AuthData): Bytes.Bytes { + return Bytes.concat( + Bytes.fromNumber(authData.redirectUrl.length, { size: 3 }), + Bytes.fromString(authData.redirectUrl), + ) +} + export function hash(attestation: Attestation): Bytes.Bytes { return Hash.keccak256(encode(attestation)) } @@ -37,8 +50,8 @@ export function encodeForJson(attestation: Attestation): any { identityType: Bytes.toHex(attestation.identityType), issuerHash: Bytes.toHex(attestation.issuerHash), audienceHash: Bytes.toHex(attestation.audienceHash), - authData: Bytes.toHex(attestation.authData), applicationData: Bytes.toHex(attestation.applicationData), + authData: attestation.authData, } } @@ -52,8 +65,8 @@ export function fromParsed(parsed: any): Attestation { identityType: Bytes.fromHex(parsed.identityType), issuerHash: Bytes.fromHex(parsed.issuerHash), audienceHash: Bytes.fromHex(parsed.audienceHash), - authData: Bytes.fromHex(parsed.authData), applicationData: Bytes.fromHex(parsed.applicationData), + authData: parsed.authData, } } diff --git a/packages/wdk/src/index.ts b/packages/wdk/src/index.ts index a3301d330..4af1bbd5a 100644 --- a/packages/wdk/src/index.ts +++ b/packages/wdk/src/index.ts @@ -1,2 +1,2 @@ export * as Identity from './identity' -export * from './account' +export * as Session from './session' diff --git a/packages/wdk/src/session/index.ts b/packages/wdk/src/session/index.ts new file mode 100644 index 000000000..6eb0af133 --- /dev/null +++ b/packages/wdk/src/session/index.ts @@ -0,0 +1 @@ +export * from './session-manager' diff --git a/packages/wdk/src/session-manager.ts b/packages/wdk/src/session/session-manager.ts similarity index 99% rename from packages/wdk/src/session-manager.ts rename to packages/wdk/src/session/session-manager.ts index 02f42d800..f48b701ea 100644 --- a/packages/wdk/src/session-manager.ts +++ b/packages/wdk/src/session/session-manager.ts @@ -8,7 +8,7 @@ import { Signature as SignatureTypes, } from '@0xsequence/sequence-primitives' import { Address, Provider, Secp256k1 } from 'ox' -import { IdentitySigner } from './signer' +import { IdentitySigner } from '../identity' type SessionManagerConfiguration = { topology: SessionConfig.SessionsTopology From 110effd4d30b12fb4f8265ddab3470e9a866a5a2 Mon Sep 17 00:00:00 2001 From: Agusx1211 Date: Mon, 3 Mar 2025 18:39:40 +0000 Subject: [PATCH 160/439] Basic passkeys signer --- packages/core/src/signers/index.ts | 1 + packages/core/src/signers/passkey.ts | 22 ++++++++++++++++++---- packages/primitives/src/extensions.ts | 2 +- 3 files changed, 20 insertions(+), 5 deletions(-) diff --git a/packages/core/src/signers/index.ts b/packages/core/src/signers/index.ts index ea493c46e..8bc4a8d1b 100644 --- a/packages/core/src/signers/index.ts +++ b/packages/core/src/signers/index.ts @@ -1 +1,2 @@ export * from './pk' +export * from './passkey' diff --git a/packages/core/src/signers/passkey.ts b/packages/core/src/signers/passkey.ts index 697425648..59f72609c 100644 --- a/packages/core/src/signers/passkey.ts +++ b/packages/core/src/signers/passkey.ts @@ -11,7 +11,7 @@ export type PasskeyOptions = { x: Hex.Hex y: Hex.Hex - credentialId: Hex.Hex + credentialId: string requireUserVerification: boolean } @@ -32,6 +32,8 @@ function _encodeSignature( s: Bytes.Bytes, authenticatorData: Bytes.Bytes, clientDataJSON: string, + x: Bytes.Bytes, + y: Bytes.Bytes, ): Bytes.Bytes { const challengeIndex = clientDataJSON.indexOf('"challenge"') const typeIndex = clientDataJSON.indexOf('"type"') @@ -53,7 +55,7 @@ function _encodeSignature( let flags = 0 - flags |= requireUserVerification ? 0 : 1 // 0x01 bit + flags |= requireUserVerification ? 1 : 0 // 0x01 bit flags |= (bytesAuthDataSize - 1) << 1 // 0x02 bit flags |= (bytesClientDataJSONSize - 1) << 2 // 0x04 bit flags |= (bytesChallengeIndex - 1) << 3 // 0x08 bit @@ -73,6 +75,9 @@ function _encodeSignature( result = Bytes.concat(result, Bytes.padLeft(r, 32)) result = Bytes.concat(result, Bytes.padLeft(s, 32)) + result = Bytes.concat(result, x) + result = Bytes.concat(result, y) + return result } @@ -89,15 +94,21 @@ export class Passkey implements Signer { extensions: Pick, options: { requireUserVerification: boolean } = { requireUserVerification: true }, ) { + // Use WebAuthnP256's built-in secure challenge generation + const challengeAndId = Bytes.random(32) const credential = await WebAuthnP256.createCredential({ - name: 'Sequence (WIP DEVELOPMENT)', + challenge: challengeAndId, + user: { + name: 'Sequence (WIP DEVELOPMENT)', + id: challengeAndId, + }, }) const x = Hex.fromNumber(credential.publicKey.x) const y = Hex.fromNumber(credential.publicKey.y) return new Passkey({ - credentialId: Hex.fromString(credential.id), + credentialId: credential.id, requireUserVerification: options.requireUserVerification, extensions, x, @@ -117,6 +128,7 @@ export class Passkey implements Signer { } const challenge = Hex.fromBytes(Payload.hash(wallet, chainId, payload)) + const response = await WebAuthnP256.sign({ challenge, credentialId: this.options.credentialId, @@ -133,6 +145,8 @@ export class Passkey implements Signer { sBytes, authenticatorData, response.metadata.clientDataJSON, + Bytes.fromHex(this.options.x), + Bytes.fromHex(this.options.y), ) return { diff --git a/packages/primitives/src/extensions.ts b/packages/primitives/src/extensions.ts index c5b398101..55038913a 100644 --- a/packages/primitives/src/extensions.ts +++ b/packages/primitives/src/extensions.ts @@ -5,5 +5,5 @@ export type Extensions = { } export const Dev1: Extensions = { - passkeys: '0xE0bb692107BEE15719862E9a084447B0a8E4E2e2', + passkeys: '0x48D39130812Dc0F49C7E10Aa42503B5d76057f1a', } From f11f23750c3ccca6940426827ab44f7d0ac65b7b Mon Sep 17 00:00:00 2001 From: Michael Standen Date: Tue, 4 Mar 2025 09:23:00 +1300 Subject: [PATCH 161/439] Remove redirectUrlHash from acceptImplicitRequest --- packages/core/src/signers/session/implicit.ts | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/packages/core/src/signers/session/implicit.ts b/packages/core/src/signers/session/implicit.ts index 21fb5770a..36aaacb30 100644 --- a/packages/core/src/signers/session/implicit.ts +++ b/packages/core/src/signers/session/implicit.ts @@ -1,5 +1,5 @@ import { Attestation, Payload, SessionSignature, Signature } from '@0xsequence/sequence-primitives' -import { AbiFunction, Address, Bytes, Provider, Secp256k1 } from 'ox' +import { AbiFunction, Address, Bytes, Hex, Provider, Secp256k1 } from 'ox' import { SignerInterface } from './session' export type AttestationParams = Omit @@ -33,7 +33,6 @@ export class Implicit implements SignerInterface { applicationData: Bytes.toHex(this._attestation.applicationData), authData: this._attestation.authData, }, - '0x', { to: call.to, value: call.value, @@ -48,12 +47,11 @@ export class Implicit implements SignerInterface { method: 'eth_call', params: [{ from: this._sessionManager, to: call.to, data: encodedCallData }, 'latest'], }) - const acceptImplicitRequest = AbiFunction.decodeResult( - acceptImplicitRequestFunctionAbi, - acceptImplicitRequestResult, + const acceptImplicitRequest = Hex.from( + AbiFunction.decodeResult(acceptImplicitRequestFunctionAbi, acceptImplicitRequestResult), ) - const expectedResult = Attestation.generateImplicitRequestMagic(this._attestation, this.address) - return acceptImplicitRequest === Bytes.toHex(expectedResult) + const expectedResult = Bytes.toHex(Attestation.generateImplicitRequestMagic(this._attestation, wallet)) + return acceptImplicitRequest === expectedResult } async signCall( @@ -99,7 +97,6 @@ const acceptImplicitRequestFunctionAbi = { }, ], }, - { name: 'redirectUrlHash', type: 'bytes32', internalType: 'bytes32' }, { name: 'call', type: 'tuple', From 2e7dbfabb54feebed2cf244eff6590a93235d8b3 Mon Sep 17 00:00:00 2001 From: Michael Standen Date: Tue, 4 Mar 2025 09:23:11 +1300 Subject: [PATCH 162/439] Add session manager tests --- .github/workflows/{build.yml => ci.yml} | 25 +- package.json | 1 + packages/wdk/jest.config.ts | 14 + packages/wdk/package.json | 6 +- packages/wdk/src/session/session-manager.ts | 3 +- packages/wdk/test/constants.ts | 2 + packages/wdk/test/session-manager.test.ts | 154 ++ packages/wdk/tsconfig.json | 7 +- pnpm-lock.yaml | 1916 ++++++++++++++++++- pnpm-workspace.yaml | 1 + turbo.json | 10 + 11 files changed, 2108 insertions(+), 31 deletions(-) rename .github/workflows/{build.yml => ci.yml} (52%) create mode 100644 packages/wdk/jest.config.ts create mode 100644 packages/wdk/test/constants.ts create mode 100644 packages/wdk/test/session-manager.test.ts diff --git a/.github/workflows/build.yml b/.github/workflows/ci.yml similarity index 52% rename from .github/workflows/build.yml rename to .github/workflows/ci.yml index 8f01516f8..5f7d04eb3 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/ci.yml @@ -1,4 +1,4 @@ -name: Build +name: Build and Test on: push: @@ -28,3 +28,26 @@ jobs: - name: Build run: pnpm build + + test: + needs: build + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + + - name: Setup Node.js + uses: actions/setup-node@v4 + with: + node-version: '20' + + - name: Install pnpm + uses: pnpm/action-setup@v2 + with: + version: 8 + + - name: Install dependencies + run: pnpm install + + - name: Run tests + run: pnpm test diff --git a/package.json b/package.json index 2b9589170..eace68884 100644 --- a/package.json +++ b/package.json @@ -5,6 +5,7 @@ "scripts": { "build": "turbo build", "dev": "turbo dev", + "test": "turbo test", "lint": "turbo lint", "format": "prettier --write \"**/*.{ts,tsx,md}\"", "postinstall": "lefthook install", diff --git a/packages/wdk/jest.config.ts b/packages/wdk/jest.config.ts new file mode 100644 index 000000000..20218945f --- /dev/null +++ b/packages/wdk/jest.config.ts @@ -0,0 +1,14 @@ +import type { Config } from 'jest' + +const config: Config = { + preset: 'ts-jest', + testEnvironment: 'node', + testMatch: ['**/test/**/*.test.ts'], + moduleNameMapper: { + '^@0xsequence/sequence-wdk$': '/src', + '^@0xsequence/sequence-core$': '/../core/src', + '^@0xsequence/sequence-primitives$': '/../primitives/src', + }, +} + +export default config diff --git a/packages/wdk/package.json b/packages/wdk/package.json index b53259948..9ab23ba56 100644 --- a/packages/wdk/package.json +++ b/packages/wdk/package.json @@ -4,7 +4,8 @@ "license": "Apache-2.0", "scripts": { "build": "tsc", - "dev": "tsc --watch" + "dev": "tsc --watch", + "test": "jest" }, "exports": { ".": { @@ -14,6 +15,9 @@ }, "devDependencies": { "@repo/typescript-config": "workspace:^", + "@types/jest": "^29.5.14", + "jest": "^29.7.0", + "ts-jest": "^29.2.6", "typescript": "^5.7.3" }, "dependencies": { diff --git a/packages/wdk/src/session/session-manager.ts b/packages/wdk/src/session/session-manager.ts index f48b701ea..7fe9f124c 100644 --- a/packages/wdk/src/session/session-manager.ts +++ b/packages/wdk/src/session/session-manager.ts @@ -16,7 +16,7 @@ type SessionManagerConfiguration = { address?: Address.Address } -const DEFAULT_SESSION_MANAGER_ADDRESS: Address.Address = '0x1D23F28a45769693b4C462f7628A204389388E3B' +const DEFAULT_SESSION_MANAGER_ADDRESS: Address.Address = '0x3e1b5D56980B339B410B57e5Dd3d3FA93FF14C4F' export class SessionManager implements SignerInterface { readonly address: Address.Address @@ -25,6 +25,7 @@ export class SessionManager implements SignerInterface { private _implicitSigners: Signers.Session.Implicit[] = [] private _explicitSigners: Signers.Session.Explicit[] = [] + constructor(configuration: SessionManagerConfiguration) { this.address = configuration.address ?? DEFAULT_SESSION_MANAGER_ADDRESS this._topology = configuration.topology diff --git a/packages/wdk/test/constants.ts b/packages/wdk/test/constants.ts new file mode 100644 index 000000000..6fd0c9a74 --- /dev/null +++ b/packages/wdk/test/constants.ts @@ -0,0 +1,2 @@ +export const MOCK_IMPLICIT_CONTRACT = '0x9D5E1139e02eB025470308EeF65D2d15bC1f5d9F' +export const MOCK_IMPLICIT_INVALID_CONTRACT = '0x977F7fbCAc606C3B33357ebDff0205B8C4055a3B' diff --git a/packages/wdk/test/session-manager.test.ts b/packages/wdk/test/session-manager.test.ts new file mode 100644 index 000000000..848f7dbc2 --- /dev/null +++ b/packages/wdk/test/session-manager.test.ts @@ -0,0 +1,154 @@ +import { Attestation, Payload } from '@0xsequence/sequence-primitives' +import { Identity, Session } from '@0xsequence/sequence-wdk' +import { Address, Bytes, Provider } from 'ox' +import { MOCK_IMPLICIT_CONTRACT } from './constants' + +describe('SessionManager', () => { + // Mock provider for testing + const mockProvider = jest.mocked({ + request: jest.fn().mockResolvedValue(Bytes.fromHex(MOCK_IMPLICIT_CONTRACT)), + on: jest.fn(), + removeListener: jest.fn(), + }) + + // Create mock class extending IdentityInstrument + class MockIdentityInstrument extends Identity.IdentityInstrument { + constructor() { + super('/nitro', jest.fn()) + } + sign = jest.fn() + initiateAuth = jest.fn() + registerAuth = jest.fn() + fetch = jest.fn() + } + + // Use in mock + const mockIdentitySigner = jest.mocked({ + address: '0x1234567890123456789012345678901234567890', + sign: jest.fn(), + signDigest: jest.fn(), + ecosystemId: 'test', + nitro: new MockIdentityInstrument(), + authKey: {} as Identity.AuthKey, + }) + + // Test wallet address + const testWallet = '0x1234567890123456789012345678901234567890' as Address.Address + + beforeEach(() => { + jest.clearAllMocks() + }) + + it('should create an empty session manager', () => { + const sessionManager = Session.SessionManager.createEmpty(mockIdentitySigner.address, { + provider: mockProvider, + }) + + expect(sessionManager.address).toBeDefined() + expect(sessionManager.topology).toBeDefined() + }) + + it('should create and sign with an implicit session', async () => { + const sessionManager = Session.SessionManager.createEmpty(mockIdentitySigner.address, { + provider: mockProvider, + }) + + // Create attestation + const redirectUrl = 'https://test.com/redirect' + const attestation: Attestation.Attestation = { + approvedSigner: '0x0000000000000000000000000000000000000000', // Placeholder + identityType: new Uint8Array(4), + issuerHash: new Uint8Array(32), + audienceHash: new Uint8Array(32), + authData: { + redirectUrl, + }, + applicationData: new Uint8Array(), + } + + // Configure the signer mock + mockIdentitySigner.signDigest.mockResolvedValue({ + type: 'hash', + r: 0n, + s: 0n, + yParity: 1, + }) + + // Create implicit session + const implicitSession = await sessionManager.createImplicitSession(mockIdentitySigner, attestation) + attestation.approvedSigner = implicitSession.address // Update approvedSigner to the implicit session address + + // Configure the provider mock + const generateImplicitRequestMagicResult = Attestation.generateImplicitRequestMagic(attestation, testWallet) + console.log('in test block', Bytes.toHex(generateImplicitRequestMagicResult)) + mockProvider.request.mockResolvedValue(generateImplicitRequestMagicResult) + + // Create a test transaction + const testCall: Payload.Call = { + to: MOCK_IMPLICIT_CONTRACT, + value: 0n, + data: new Uint8Array(), + gasLimit: 0n, + delegateCall: false, + onlyFallback: false, + behaviorOnError: 'revert', + } + + // Sign the transaction + const signature = await sessionManager.signSapient( + testWallet, + 1n, // chainId + { + type: 'call', + nonce: 0n, + space: 0n, + calls: [testCall], + }, + ) + + expect(signature.type).toBe('sapient') + expect(signature.address).toBe(sessionManager.address) + expect(signature.data).toBeDefined() + }) + + it('should create and sign with an explicit session', async () => { + const sessionManager = Session.SessionManager.createEmpty(mockIdentitySigner.address, { + provider: mockProvider, + }) + + // Create explicit session with permissions + await sessionManager.createExplicitSession({ + valueLimit: 1000000000000000000n, // 1 ETH + deadline: BigInt(Math.floor(Date.now() / 1000) + 3600), // 1 hour from now + permissions: [ + { + target: MOCK_IMPLICIT_CONTRACT, + rules: [], + }, + ], + }) + + // Create a test transaction within permissions + const testCall: Payload.Call = { + to: MOCK_IMPLICIT_CONTRACT, + value: 100000000000000000n, // 0.1 ETH + data: new Uint8Array(), + gasLimit: 0n, + delegateCall: false, + onlyFallback: false, + behaviorOnError: 'revert', + } + + // Sign the transaction + const signature = await sessionManager.signSapient(testWallet, 1n, { + type: 'call', + nonce: 0n, + space: 0n, + calls: [testCall], + }) + + expect(signature.type).toBe('sapient') + expect(signature.address).toBe(sessionManager.address) + expect(signature.data).toBeDefined() + }) +}) diff --git a/packages/wdk/tsconfig.json b/packages/wdk/tsconfig.json index e502f58f4..d69f63d5e 100644 --- a/packages/wdk/tsconfig.json +++ b/packages/wdk/tsconfig.json @@ -1,9 +1,10 @@ { "extends": "@repo/typescript-config/base.json", "compilerOptions": { - "rootDir": "src", - "outDir": "dist" + "rootDir": ".", + "outDir": "dist", + "types": ["jest"] }, - "include": ["src"], + "include": ["src", "test"], "exclude": ["node_modules", "dist"] } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 01fba35dc..12c0f2cf5 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -248,6 +248,15 @@ importers: '@repo/typescript-config': specifier: workspace:^ version: link:../typescript-config + '@types/jest': + specifier: ^29.5.14 + version: 29.5.14 + jest: + specifier: ^29.7.0 + version: 29.7.0(@types/node@20.17.6)(ts-node@10.9.2(@types/node@20.17.6)(typescript@5.7.3)) + ts-jest: + specifier: ^29.2.6 + version: 29.2.6(@babel/core@7.26.9)(@jest/transform@29.7.0)(@jest/types@29.6.3)(babel-jest@29.7.0(@babel/core@7.26.9))(jest@29.7.0(@types/node@20.17.6)(ts-node@10.9.2(@types/node@20.17.6)(typescript@5.7.3)))(typescript@5.7.3) typescript: specifier: ^5.7.3 version: 5.7.3 @@ -257,6 +266,156 @@ packages: '@adraffy/ens-normalize@1.11.0': resolution: {integrity: sha512-/3DDPKHqqIqxUULp8yP4zODUY1i+2xvVWsv8A79xGWdCAG+8sb0hRh0Rk2QyOJUnnbyPUAZYcpBuRe3nS2OIUg==} + '@ampproject/remapping@2.3.0': + resolution: {integrity: sha512-30iZtAPgz+LTIYoeivqYo853f02jBYSd5uGnGpkFV0M3xOt9aN73erkgYAmZU43x4VfqcnLxW9Kpg3R5LC4YYw==} + engines: {node: '>=6.0.0'} + + '@babel/code-frame@7.26.2': + resolution: {integrity: sha512-RJlIHRueQgwWitWgF8OdFYGZX328Ax5BCemNGlqHfplnRT9ESi8JkFlvaVYbS+UubVY6dpv87Fs2u5M29iNFVQ==} + engines: {node: '>=6.9.0'} + + '@babel/compat-data@7.26.8': + resolution: {integrity: sha512-oH5UPLMWR3L2wEFLnFJ1TZXqHufiTKAiLfqw5zkhS4dKXLJ10yVztfil/twG8EDTA4F/tvVNw9nOl4ZMslB8rQ==} + engines: {node: '>=6.9.0'} + + '@babel/core@7.26.9': + resolution: {integrity: sha512-lWBYIrF7qK5+GjY5Uy+/hEgp8OJWOD/rpy74GplYRhEauvbHDeFB8t5hPOZxCZ0Oxf4Cc36tK51/l3ymJysrKw==} + engines: {node: '>=6.9.0'} + + '@babel/generator@7.26.9': + resolution: {integrity: sha512-kEWdzjOAUMW4hAyrzJ0ZaTOu9OmpyDIQicIh0zg0EEcEkYXZb2TjtBhnHi2ViX7PKwZqF4xwqfAm299/QMP3lg==} + engines: {node: '>=6.9.0'} + + '@babel/helper-compilation-targets@7.26.5': + resolution: {integrity: sha512-IXuyn5EkouFJscIDuFF5EsiSolseme1s0CZB+QxVugqJLYmKdxI1VfIBOst0SUu4rnk2Z7kqTwmoO1lp3HIfnA==} + engines: {node: '>=6.9.0'} + + '@babel/helper-module-imports@7.25.9': + resolution: {integrity: sha512-tnUA4RsrmflIM6W6RFTLFSXITtl0wKjgpnLgXyowocVPrbYrLUXSBXDgTs8BlbmIzIdlBySRQjINYs2BAkiLtw==} + engines: {node: '>=6.9.0'} + + '@babel/helper-module-transforms@7.26.0': + resolution: {integrity: sha512-xO+xu6B5K2czEnQye6BHA7DolFFmS3LB7stHZFaOLb1pAwO1HWLS8fXA+eh0A2yIvltPVmx3eNNDBJA2SLHXFw==} + engines: {node: '>=6.9.0'} + peerDependencies: + '@babel/core': ^7.0.0 + + '@babel/helper-plugin-utils@7.26.5': + resolution: {integrity: sha512-RS+jZcRdZdRFzMyr+wcsaqOmld1/EqTghfaBGQQd/WnRdzdlvSZ//kF7U8VQTxf1ynZ4cjUcYgjVGx13ewNPMg==} + engines: {node: '>=6.9.0'} + + '@babel/helper-string-parser@7.25.9': + resolution: {integrity: sha512-4A/SCr/2KLd5jrtOMFzaKjVtAei3+2r/NChoBNoZ3EyP/+GlhoaEGoWOZUmFmoITP7zOJyHIMm+DYRd8o3PvHA==} + engines: {node: '>=6.9.0'} + + '@babel/helper-validator-identifier@7.25.9': + resolution: {integrity: sha512-Ed61U6XJc3CVRfkERJWDz4dJwKe7iLmmJsbOGu9wSloNSFttHV0I8g6UAgb7qnK5ly5bGLPd4oXZlxCdANBOWQ==} + engines: {node: '>=6.9.0'} + + '@babel/helper-validator-option@7.25.9': + resolution: {integrity: sha512-e/zv1co8pp55dNdEcCynfj9X7nyUKUXoUEwfXqaZt0omVOmDe9oOTdKStH4GmAw6zxMFs50ZayuMfHDKlO7Tfw==} + engines: {node: '>=6.9.0'} + + '@babel/helpers@7.26.9': + resolution: {integrity: sha512-Mz/4+y8udxBKdmzt/UjPACs4G3j5SshJJEFFKxlCGPydG4JAHXxjWjAwjd09tf6oINvl1VfMJo+nB7H2YKQ0dA==} + engines: {node: '>=6.9.0'} + + '@babel/parser@7.26.9': + resolution: {integrity: sha512-81NWa1njQblgZbQHxWHpxxCzNsa3ZwvFqpUg7P+NNUU6f3UU2jBEg4OlF/J6rl8+PQGh1q6/zWScd001YwcA5A==} + engines: {node: '>=6.0.0'} + hasBin: true + + '@babel/plugin-syntax-async-generators@7.8.4': + resolution: {integrity: sha512-tycmZxkGfZaxhMRbXlPXuVFpdWlXpir2W4AMhSJgRKzk/eDlIXOhb2LHWoLpDF7TEHylV5zNhykX6KAgHJmTNw==} + peerDependencies: + '@babel/core': ^7.0.0-0 + + '@babel/plugin-syntax-bigint@7.8.3': + resolution: {integrity: sha512-wnTnFlG+YxQm3vDxpGE57Pj0srRU4sHE/mDkt1qv2YJJSeUAec2ma4WLUnUPeKjyrfntVwe/N6dCXpU+zL3Npg==} + peerDependencies: + '@babel/core': ^7.0.0-0 + + '@babel/plugin-syntax-class-properties@7.12.13': + resolution: {integrity: sha512-fm4idjKla0YahUNgFNLCB0qySdsoPiZP3iQE3rky0mBUtMZ23yDJ9SJdg6dXTSDnulOVqiF3Hgr9nbXvXTQZYA==} + peerDependencies: + '@babel/core': ^7.0.0-0 + + '@babel/plugin-syntax-class-static-block@7.14.5': + resolution: {integrity: sha512-b+YyPmr6ldyNnM6sqYeMWE+bgJcJpO6yS4QD7ymxgH34GBPNDM/THBh8iunyvKIZztiwLH4CJZ0RxTk9emgpjw==} + engines: {node: '>=6.9.0'} + peerDependencies: + '@babel/core': ^7.0.0-0 + + '@babel/plugin-syntax-import-attributes@7.26.0': + resolution: {integrity: sha512-e2dttdsJ1ZTpi3B9UYGLw41hifAubg19AtCu/2I/F1QNVclOBr1dYpTdmdyZ84Xiz43BS/tCUkMAZNLv12Pi+A==} + engines: {node: '>=6.9.0'} + peerDependencies: + '@babel/core': ^7.0.0-0 + + '@babel/plugin-syntax-import-meta@7.10.4': + resolution: {integrity: sha512-Yqfm+XDx0+Prh3VSeEQCPU81yC+JWZ2pDPFSS4ZdpfZhp4MkFMaDC1UqseovEKwSUpnIL7+vK+Clp7bfh0iD7g==} + peerDependencies: + '@babel/core': ^7.0.0-0 + + '@babel/plugin-syntax-json-strings@7.8.3': + resolution: {integrity: sha512-lY6kdGpWHvjoe2vk4WrAapEuBR69EMxZl+RoGRhrFGNYVK8mOPAW8VfbT/ZgrFbXlDNiiaxQnAtgVCZ6jv30EA==} + peerDependencies: + '@babel/core': ^7.0.0-0 + + '@babel/plugin-syntax-jsx@7.25.9': + resolution: {integrity: sha512-ld6oezHQMZsZfp6pWtbjaNDF2tiiCYYDqQszHt5VV437lewP9aSi2Of99CK0D0XB21k7FLgnLcmQKyKzynfeAA==} + engines: {node: '>=6.9.0'} + peerDependencies: + '@babel/core': ^7.0.0-0 + + '@babel/plugin-syntax-logical-assignment-operators@7.10.4': + resolution: {integrity: sha512-d8waShlpFDinQ5MtvGU9xDAOzKH47+FFoney2baFIoMr952hKOLp1HR7VszoZvOsV/4+RRszNY7D17ba0te0ig==} + peerDependencies: + '@babel/core': ^7.0.0-0 + + '@babel/plugin-syntax-nullish-coalescing-operator@7.8.3': + resolution: {integrity: sha512-aSff4zPII1u2QD7y+F8oDsz19ew4IGEJg9SVW+bqwpwtfFleiQDMdzA/R+UlWDzfnHFCxxleFT0PMIrR36XLNQ==} + peerDependencies: + '@babel/core': ^7.0.0-0 + + '@babel/plugin-syntax-numeric-separator@7.10.4': + resolution: {integrity: sha512-9H6YdfkcK/uOnY/K7/aA2xpzaAgkQn37yzWUMRK7OaPOqOpGS1+n0H5hxT9AUw9EsSjPW8SVyMJwYRtWs3X3ug==} + peerDependencies: + '@babel/core': ^7.0.0-0 + + '@babel/plugin-syntax-object-rest-spread@7.8.3': + resolution: {integrity: sha512-XoqMijGZb9y3y2XskN+P1wUGiVwWZ5JmoDRwx5+3GmEplNyVM2s2Dg8ILFQm8rWM48orGy5YpI5Bl8U1y7ydlA==} + peerDependencies: + '@babel/core': ^7.0.0-0 + + '@babel/plugin-syntax-optional-catch-binding@7.8.3': + resolution: {integrity: sha512-6VPD0Pc1lpTqw0aKoeRTMiB+kWhAoT24PA+ksWSBrFtl5SIRVpZlwN3NNPQjehA2E/91FV3RjLWoVTglWcSV3Q==} + peerDependencies: + '@babel/core': ^7.0.0-0 + + '@babel/plugin-syntax-optional-chaining@7.8.3': + resolution: {integrity: sha512-KoK9ErH1MBlCPxV0VANkXW2/dw4vlbGDrFgz8bmUsBGYkFRcbRwMh6cIJubdPrkxRwuGdtCk0v/wPTKbQgBjkg==} + peerDependencies: + '@babel/core': ^7.0.0-0 + + '@babel/plugin-syntax-private-property-in-object@7.14.5': + resolution: {integrity: sha512-0wVnp9dxJ72ZUJDV27ZfbSj6iHLoytYZmh3rFcxNnvsJF3ktkzLDZPy/mA17HGsaQT3/DQsWYX1f1QGWkCoVUg==} + engines: {node: '>=6.9.0'} + peerDependencies: + '@babel/core': ^7.0.0-0 + + '@babel/plugin-syntax-top-level-await@7.14.5': + resolution: {integrity: sha512-hx++upLv5U1rgYfwe1xBQUhRmU41NEvpUvrp8jkrSCdvGSnM5/qdRMtylJ6PG5OFkBaHkbTAKTnd3/YyESRHFw==} + engines: {node: '>=6.9.0'} + peerDependencies: + '@babel/core': ^7.0.0-0 + + '@babel/plugin-syntax-typescript@7.25.9': + resolution: {integrity: sha512-hjMgRy5hb8uJJjUcdWunWVcoi9bGpJp8p5Ol1229PoN6aytsLwNMgmdftO23wnCLMfVmTwZDWMPNq/D1SY60JQ==} + engines: {node: '>=6.9.0'} + peerDependencies: + '@babel/core': ^7.0.0-0 + '@babel/runtime-corejs3@7.26.0': resolution: {integrity: sha512-YXHu5lN8kJCb1LOb9PgV6pvak43X2h4HvRApcN5SdWeaItQOzfn1hgP6jasD6KWQyJDBxrVmA9o9OivlnNJK/w==} engines: {node: '>=6.9.0'} @@ -265,6 +424,21 @@ packages: resolution: {integrity: sha512-FDSOghenHTiToteC/QRlv2q3DhPZ/oOXTBoirfWNx1Cx3TMVcGWQtMMmQcSvb/JjpNeGzx8Pq/b4fKEJuWm1sw==} engines: {node: '>=6.9.0'} + '@babel/template@7.26.9': + resolution: {integrity: sha512-qyRplbeIpNZhmzOysF/wFMuP9sctmh2cFzRAZOn1YapxBsE1i9bJIY586R/WBLfLcmcBlM8ROBiQURnnNy+zfA==} + engines: {node: '>=6.9.0'} + + '@babel/traverse@7.26.9': + resolution: {integrity: sha512-ZYW7L+pL8ahU5fXmNbPF+iZFHCv5scFak7MZ9bwaRPLUhHh7QQEMjZUg0HevihoqCM5iSYHN61EyCoZvqC+bxg==} + engines: {node: '>=6.9.0'} + + '@babel/types@7.26.9': + resolution: {integrity: sha512-Y3IR1cRnOxOCDvMmNiym7XpXQ93iGDDPHx+Zj+NM+rg0fBaShfQLkg+hKPaZCEvg5N/LeCo4+Rj/i3FuJsIQaw==} + engines: {node: '>=6.9.0'} + + '@bcoe/v8-coverage@0.2.3': + resolution: {integrity: sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==} + '@changesets/apply-release-plan@7.0.7': resolution: {integrity: sha512-qnPOcmmmnD0MfMg9DjU1/onORFyRpDXkMMl2IJg9mECY6RnxL3wN0TCCc92b2sXt1jt8DgjAUUsZYGUGTdYIXA==} @@ -640,13 +814,98 @@ packages: cpu: [x64] os: [win32] + '@istanbuljs/load-nyc-config@1.1.0': + resolution: {integrity: sha512-VjeHSlIzpv/NyD3N0YuHfXOPDIixcA1q2ZV98wsMqcYlPmv2n3Yb2lYP9XMElnaFVXg5A7YLTeLu6V84uQDjmQ==} + engines: {node: '>=8'} + + '@istanbuljs/schema@0.1.3': + resolution: {integrity: sha512-ZXRY4jNvVgSVQ8DL3LTcakaAtXwTVUxE81hslsyD2AtoXW/wVob10HkOJ1X/pAlcI7D+2YoZKg5do8G/w6RYgA==} + engines: {node: '>=8'} + + '@jest/console@29.7.0': + resolution: {integrity: sha512-5Ni4CU7XHQi32IJ398EEP4RrB8eV09sXP2ROqD4bksHrnTree52PsxvX8tpL8LvTZ3pFzXyPbNQReSN41CAhOg==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + + '@jest/core@29.7.0': + resolution: {integrity: sha512-n7aeXWKMnGtDA48y8TLWJPJmLmmZ642Ceo78cYWEpiD7FzDgmNDV/GCVRorPABdXLJZ/9wzzgZAlHjXjxDHGsg==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + peerDependencies: + node-notifier: ^8.0.1 || ^9.0.0 || ^10.0.0 + peerDependenciesMeta: + node-notifier: + optional: true + + '@jest/environment@29.7.0': + resolution: {integrity: sha512-aQIfHDq33ExsN4jP1NWGXhxgQ/wixs60gDiKO+XVMd8Mn0NWPWgc34ZQDTb2jKaUWQ7MuwoitXAsN2XVXNMpAw==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + + '@jest/expect-utils@29.7.0': + resolution: {integrity: sha512-GlsNBWiFQFCVi9QVSx7f5AgMeLxe9YCCs5PuP2O2LdjDAA8Jh9eX7lA1Jq/xdXw3Wb3hyvlFNfZIfcRetSzYcA==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + + '@jest/expect@29.7.0': + resolution: {integrity: sha512-8uMeAMycttpva3P1lBHB8VciS9V0XAr3GymPpipdyQXbBcuhkLQOSe8E/p92RyAdToS6ZD1tFkX+CkhoECE0dQ==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + + '@jest/fake-timers@29.7.0': + resolution: {integrity: sha512-q4DH1Ha4TTFPdxLsqDXK1d3+ioSL7yL5oCMJZgDYm6i+6CygW5E5xVr/D1HdsGxjt1ZWSfUAs9OxSB/BNelWrQ==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + + '@jest/globals@29.7.0': + resolution: {integrity: sha512-mpiz3dutLbkW2MNFubUGUEVLkTGiqW6yLVTA+JbP6fI6J5iL9Y0Nlg8k95pcF8ctKwCS7WVxteBs29hhfAotzQ==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + + '@jest/reporters@29.7.0': + resolution: {integrity: sha512-DApq0KJbJOEzAFYjHADNNxAE3KbhxQB1y5Kplb5Waqw6zVbuWatSnMjE5gs8FUgEPmNsnZA3NCWl9NG0ia04Pg==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + peerDependencies: + node-notifier: ^8.0.1 || ^9.0.0 || ^10.0.0 + peerDependenciesMeta: + node-notifier: + optional: true + + '@jest/schemas@29.6.3': + resolution: {integrity: sha512-mo5j5X+jIZmJQveBKeS/clAueipV7KgiX1vMgCxam1RNYiqE1w62n0/tJJnHtjW8ZHcQco5gY85jA3mi0L+nSA==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + + '@jest/source-map@29.6.3': + resolution: {integrity: sha512-MHjT95QuipcPrpLM+8JMSzFx6eHp5Bm+4XeFDJlwsvVBjmKNiIAvasGK2fxz2WbGRlnvqehFbh07MMa7n3YJnw==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + + '@jest/test-result@29.7.0': + resolution: {integrity: sha512-Fdx+tv6x1zlkJPcWXmMDAG2HBnaR9XPSd5aDWQVsfrZmLVT3lU1cwyxLgRmXR9yrq4NBoEm9BMsfgFzTQAbJYA==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + + '@jest/test-sequencer@29.7.0': + resolution: {integrity: sha512-GQwJ5WZVrKnOJuiYiAF52UNUJXgTZx1NHjFSEB0qEMmSZKAkdMoIzw/Cj6x6NF4AvV23AUqDpFzQkN/eYCYTxw==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + + '@jest/transform@29.7.0': + resolution: {integrity: sha512-ok/BTPFzFKVMwO5eOHRrvnBVHdRy9IrsrW1GpMaQ9MCnilNLXQKmAX8s1YXDFaai9xJpac2ySzV0YeRRECr2Vw==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + + '@jest/types@29.6.3': + resolution: {integrity: sha512-u3UPsIilWKOM3F9CXtrG8LEJmNxwoCQC/XVj4IKYXvvpx7QIi/Kg1LI5uDmDpKlac62NUtX7eLjRh+jVZcLOzw==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + + '@jridgewell/gen-mapping@0.3.8': + resolution: {integrity: sha512-imAbBGkb+ebQyxKgzv5Hu2nmROxoDOXHh80evxdoXNOrvAnVx7zimzc1Oo5h9RlfV4vPXaE2iM5pOFbvOCClWA==} + engines: {node: '>=6.0.0'} + '@jridgewell/resolve-uri@3.1.2': resolution: {integrity: sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==} engines: {node: '>=6.0.0'} + '@jridgewell/set-array@1.2.1': + resolution: {integrity: sha512-R8gLRTZeyp03ymzP/6Lil/28tGeGEzhx1q2k703KGWRAI1VdvPIXdG70VJc2pAMw3NA6JKL5hhFu1sJX0Mnn/A==} + engines: {node: '>=6.0.0'} + '@jridgewell/sourcemap-codec@1.5.0': resolution: {integrity: sha512-gv3ZRaISU3fjPAgNsriBRqGWQL6quFx04YMPW/zD8XMLsU32mhCCbfbO6KZFLjvYpCZ8zyDEgqsgf+PwPaM7GQ==} + '@jridgewell/trace-mapping@0.3.25': + resolution: {integrity: sha512-vNk6aEwybGtawWmy/PzwnGDOjCkLWSD2wqvjGGAgOAwCGWySYXfYoxt00IJkTF+8Lb57DwOb3Aa0o9CApepiYQ==} + '@jridgewell/trace-mapping@0.3.9': resolution: {integrity: sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ==} @@ -739,6 +998,15 @@ packages: '@scure/bip39@1.5.4': resolution: {integrity: sha512-TFM4ni0vKvCfBpohoh+/lY05i9gRbSwXWngAsF4CABQxoaOHijxuaZ2R6cStDQ5CHtHO9aGJTr4ksVJASRRyMA==} + '@sinclair/typebox@0.27.8': + resolution: {integrity: sha512-+Fj43pSMwJs4KRrH/938Uf+uAELIgVBmQzg/q1YG10djyfA3TnrU8N8XzqCh/okZdszqBQTZf96idMfE5lnwTA==} + + '@sinonjs/commons@3.0.1': + resolution: {integrity: sha512-K3mCHKQ9sVh8o1C9cxkwxaOmXoAMlDxC1mYyHrjqOWEcBjYr76t96zL2zlj5dUGZ3HSw240X1qgH3Mjf1yJWpQ==} + + '@sinonjs/fake-timers@10.3.0': + resolution: {integrity: sha512-V4BG07kuYSUkTCSBHG8G8TNhM+F19jXFWnQtzj+we8DrkpSBCee9Z3Ms8yiGer/dlmhe35/Xdgyo3/0rQKg7YA==} + '@swc/counter@0.1.3': resolution: {integrity: sha512-e2BR4lsJkkRlKZ/qCHPw9ZaSxc0MVUd7gtbtaB7aMvHeJVYe8sOB8DBZkP2DtISHGSku9sCK6T6cnY0CtXrOCQ==} @@ -768,15 +1036,42 @@ packages: resolution: {integrity: sha512-3uYg2b5TWCiupetbDFMbBFMHl33xQTvp5DNg0fZSYal73Z9AlFH9yWabHWMYw6ywmwM1evkYRpTVA2n7GgqT5A==} hasBin: true + '@types/babel__core@7.20.5': + resolution: {integrity: sha512-qoQprZvz5wQFJwMDqeseRXWv3rqMvhgpbXFfVyWhbx9X47POIA6i/+dXefEmZKoAgOaTdaIgNSMqMIU61yRyzA==} + + '@types/babel__generator@7.6.8': + resolution: {integrity: sha512-ASsj+tpEDsEiFr1arWrlN6V3mdfjRMZt6LtK/Vp/kreFLnr5QH5+DhvD5nINYZXzwJvXeGq+05iUXcAzVrqWtw==} + + '@types/babel__template@7.4.4': + resolution: {integrity: sha512-h/NUaSyG5EyxBIp8YRxo4RMe2/qQgvyowRwVMzhYhBCONbW8PUsg4lkFMrhgZhUe5z3L3MiLDuvyJ/CaPa2A8A==} + + '@types/babel__traverse@7.20.6': + resolution: {integrity: sha512-r1bzfrm0tomOI8g1SzvCaQHo6Lcv6zu0EA+W2kHrt8dyrHQxGzBBL4kdkzIS+jBMV+EYcMAEAqXqYaLJq5rOZg==} + '@types/estree@1.0.6': resolution: {integrity: sha512-AYnb1nQyY49te+VRAVgmzfcgjYS91mY5P0TKUDCLEM+gNnA+3T6rWITXRLYCpahpqSQbN5cE+gHpnPyXjHWxcw==} '@types/glob@7.2.0': resolution: {integrity: sha512-ZUxbzKl0IfJILTS6t7ip5fQQM/J3TJYubDm3nMbgubNNYS62eXeUpoLUC8/7fJNiFYHTrGPQn7hspDUzIHX3UA==} + '@types/graceful-fs@4.1.9': + resolution: {integrity: sha512-olP3sd1qOEe5dXTSaFvQG+02VdRXcdytWLAZsAq1PecU8uqQAhkrnbli7DagjtXKW/Bl7YJbUsa8MPcuc8LHEQ==} + '@types/inquirer@6.5.0': resolution: {integrity: sha512-rjaYQ9b9y/VFGOpqBEXRavc3jh0a+e6evAbI31tMda8VlPaSy0AZJfXsvmIe3wklc7W6C3zCSfleuMXR7NOyXw==} + '@types/istanbul-lib-coverage@2.0.6': + resolution: {integrity: sha512-2QF/t/auWm0lsy8XtKVPG19v3sSOQlJe/YHZgfjb/KBBHOGSV+J2q/S671rcq9uTBrLAXmZpqJiaQbMT+zNU1w==} + + '@types/istanbul-lib-report@3.0.3': + resolution: {integrity: sha512-NQn7AHQnk/RSLOxrBbGyJM/aVQ+pjj5HCgasFxc0K/KhoATfQ/47AyUl15I2yBUpihjmas+a+VJBOqecrFH+uA==} + + '@types/istanbul-reports@3.0.4': + resolution: {integrity: sha512-pk2B1NWalF9toCRu6gjBzR69syFjP4Od8WRAX+0mmf9lAjCRicLOWc+ZrxZHx/0XRjotgkF9t6iaMJ+aXcOdZQ==} + + '@types/jest@29.5.14': + resolution: {integrity: sha512-ZN+4sdnLUbo8EVvVc2ao0GFW6oVrQRPn4K2lglySj7APvSrgzxHiNNK99us4WDMi57xxA2yggblIAMNhXOotLQ==} + '@types/json-schema@7.0.15': resolution: {integrity: sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==} @@ -807,6 +1102,9 @@ packages: '@types/react@18.3.1': resolution: {integrity: sha512-V0kuGBX3+prX+DQ/7r2qsv1NsdfnCLnTgnRJ1pYnxykBhGMz+qj+box5lq7XsO5mtZsBqpjwwTu/7wszPfMBcw==} + '@types/stack-utils@2.0.3': + resolution: {integrity: sha512-9aEbYZ3TbYMznPdcdr3SmIrLXwC/AKZXQeCf9Pgao5CKb8CyHuEX5jzWPTkvregvhRJHcpRO6BFoGW9ycaOkYw==} + '@types/through@0.0.33': resolution: {integrity: sha512-HsJ+z3QuETzP3cswwtzt2vEIiHBk/dCcHGhbmG5X3ecnwFD/lPrMpliGXxSCg03L9AhrdwA4Oz/qfspkDW+xGQ==} @@ -937,6 +1235,10 @@ packages: resolution: {integrity: sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==} engines: {node: '>=8'} + ansi-styles@5.2.0: + resolution: {integrity: sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==} + engines: {node: '>=10'} + anymatch@3.1.3: resolution: {integrity: sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==} engines: {node: '>= 8'} @@ -986,10 +1288,38 @@ packages: resolution: {integrity: sha512-x1FCFnFifvYDDzTaLII71vG5uvDwgtmDTEVWAxrgeiR8VjMONcCXJx7E+USjDtHlwFmt9MysbqgF9b9Vjr6w+w==} engines: {node: '>=4'} + async@3.2.6: + resolution: {integrity: sha512-htCUDlxyyCLMgaM3xXg0C0LW2xqfuQ6p05pCEIsXuyQ+a1koYKTuBMzRNwmybfLgvJDMd0r1LTn4+E0Ti6C2AA==} + available-typed-arrays@1.0.7: resolution: {integrity: sha512-wvUjBtSGN7+7SjNpq/9M2Tg350UZD3q62IFZLbRAR1bSMlCo1ZaeW+BJ+D090e4hIIZLBcTDWe4Mh4jvUDajzQ==} engines: {node: '>= 0.4'} + babel-jest@29.7.0: + resolution: {integrity: sha512-BrvGY3xZSwEcCzKvKsCi2GgHqDqsYkOP4/by5xCgIwGXQxIEh+8ew3gmrE1y7XRR6LHZIj6yLYnUi/mm2KXKBg==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + peerDependencies: + '@babel/core': ^7.8.0 + + babel-plugin-istanbul@6.1.1: + resolution: {integrity: sha512-Y1IQok9821cC9onCx5otgFfRm7Lm+I+wwxOx738M/WLPZ9Q42m4IG5W0FNX8WLL2gYMZo3JkuXIH2DOpWM+qwA==} + engines: {node: '>=8'} + + babel-plugin-jest-hoist@29.6.3: + resolution: {integrity: sha512-ESAc/RJvGTFEzRwOTT4+lNDk/GNHMkKbNzsvT0qKRfDyyYTskxB5rnU2njIDYVxXCBHHEI1c0YwHob3WaYujOg==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + + babel-preset-current-node-syntax@1.1.0: + resolution: {integrity: sha512-ldYss8SbBlWva1bs28q78Ju5Zq1F+8BrqBZZ0VFhLBvhh6lCpC2o3gDJi/5DRLs9FgYZCnmPYIVFU4lRXCkyUw==} + peerDependencies: + '@babel/core': ^7.0.0 + + babel-preset-jest@29.6.3: + resolution: {integrity: sha512-0B3bhxR6snWXJZtR/RliHTDPRgn1sNHOR0yVtq/IiQFyuOVjFS+wuio/R4gSNkyYmKmJB4wGZv2NZanmKmTnNA==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + peerDependencies: + '@babel/core': ^7.0.0 + balanced-match@1.0.2: resolution: {integrity: sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==} @@ -1021,6 +1351,21 @@ packages: resolution: {integrity: sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==} engines: {node: '>=8'} + browserslist@4.24.4: + resolution: {integrity: sha512-KDi1Ny1gSePi1vm0q4oxSF8b4DR44GF4BbmS2YdhPLOEqd8pDviZOGH/GsmRwoWJ2+5Lr085X7naowMwKHDG1A==} + engines: {node: ^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7} + hasBin: true + + bs-logger@0.2.6: + resolution: {integrity: sha512-pd8DCoxmbgc7hyPKOvxtqNcjYoOsABPQdcCUjGp3d42VR2CX1ORhk2A87oqqu5R1kk+76nsxZupkmyd+MVtCog==} + engines: {node: '>= 6'} + + bser@2.1.1: + resolution: {integrity: sha512-gQxTNE/GAfIIrmHLUE3oJyp5FO6HRBfhjnw4/wMmA63ZGDJnWBmgY/lyQBpnDUkGmAhbSe39tx2d/iTOAfglwQ==} + + buffer-from@1.1.2: + resolution: {integrity: sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==} + buffer@5.7.1: resolution: {integrity: sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==} @@ -1039,9 +1384,20 @@ packages: camel-case@3.0.0: resolution: {integrity: sha512-+MbKztAYHXPr1jNTSKQF52VpcFjwY5RkR7fxksV8Doo4KAYc5Fl4UJRgthBbTmEx8C54DqahhbLJkDwjI3PI/w==} + camelcase@5.3.1: + resolution: {integrity: sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==} + engines: {node: '>=6'} + + camelcase@6.3.0: + resolution: {integrity: sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==} + engines: {node: '>=10'} + caniuse-lite@1.0.30001683: resolution: {integrity: sha512-iqmNnThZ0n70mNwvxpEC2nBJ037ZHZUoBI5Gorh1Mw6IlEAZujEoU1tXA628iZfzm7R9FvFzxbfdgml82a3k8Q==} + caniuse-lite@1.0.30001701: + resolution: {integrity: sha512-faRs/AW3jA9nTwmJBSO1PQ6L/EOgsB5HMQQq4iCu5zhPgVVgO/pZRHlmatwijZKetFw8/Pr4q6dEN8sJuq8qTw==} + chalk@2.4.2: resolution: {integrity: sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==} engines: {node: '>=4'} @@ -1057,6 +1413,10 @@ packages: change-case@3.1.0: resolution: {integrity: sha512-2AZp7uJZbYEzRPsFoa+ijKdvp9zsrnnt6+yFokfwEpeJm0xuJDVoxiRCAaTzyJND8GJkofo2IcKWaUZ/OECVzw==} + char-regex@1.0.2: + resolution: {integrity: sha512-kWWXztvZ5SBQV+eRgKFeh8q5sLuZY2+8WUIzlxWVTg+oGwY14qylx1KbKzHd8P6ZYkAg0xyIDU9JMHhyJMZ1jw==} + engines: {node: '>=10'} + chardet@0.7.0: resolution: {integrity: sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA==} @@ -1068,6 +1428,9 @@ packages: resolution: {integrity: sha512-NIxF55hv4nSqQswkAeiOi1r83xy8JldOFDTWiug55KBu9Jnblncd2U6ViHmYgHf01TPZS77NJBhBMKdWj9HQMQ==} engines: {node: '>=8'} + cjs-module-lexer@1.4.3: + resolution: {integrity: sha512-9z8TZaGM1pfswYeXrUpzPrkx8UnWYdhJclsiYMm6x/w5+nN+8Tf/LnAgfLGQCm59qAOxU8WwHEq2vNwF6i4j+Q==} + clean-stack@2.2.0: resolution: {integrity: sha512-4diC9HaTE+KRAMWhDhrGOECgWZxoevMc5TlkObMqNSsVU62PYzXZ/SMTjzyGAFF1YusgxGcSWTEXBhp0CPwQ1A==} engines: {node: '>=6'} @@ -1095,6 +1458,13 @@ packages: resolution: {integrity: sha512-JQHZ2QMW6l3aH/j6xCqQThY/9OH4D/9ls34cgkUBiEeocRTU04tHfKPBsUK1PqZCUQM7GiA0IIXJSuXHI64Kbg==} engines: {node: '>=0.8'} + co@4.6.0: + resolution: {integrity: sha512-QVb0dM5HvG+uaxitm8wONl7jltx8dqhfU33DcqtOZcLSVIKSDDLDi7+0LbAKiyI8hD9u42m2YxXSkMGWThaecQ==} + engines: {iojs: '>= 1.0.0', node: '>= 0.12.0'} + + collect-v8-coverage@1.0.2: + resolution: {integrity: sha512-lHl4d5/ONEbLlJvaJNtsF/Lz+WvB07u2ycqTYbdrq7UypDXailES4valYb2eWiJFxZlVmpGekfqoxQhzyFdT4Q==} + color-convert@1.9.3: resolution: {integrity: sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==} @@ -1130,9 +1500,17 @@ packages: constant-case@2.0.0: resolution: {integrity: sha512-eS0N9WwmjTqrOmR3o83F5vW8Z+9R1HnVz3xmzT2PMFug9ly+Au/fxRWlEBSb6LcZwspSsEn9Xs1uw9YgzAg1EQ==} + convert-source-map@2.0.0: + resolution: {integrity: sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==} + core-js-pure@3.39.0: resolution: {integrity: sha512-7fEcWwKI4rJinnK+wLTezeg2smbFFdSBP6E2kQZNbnzM2s1rpKQ6aaRteZSSg7FLU3P0HGGVo/gbpfanU36urg==} + create-jest@29.7.0: + resolution: {integrity: sha512-Adz2bdH0Vq3F53KEMJOoftQFutWCukm6J24wbPWRO4k1kMY7gS7ds/uoJkNuV8wDCtWWnuwGcJwpWcih+zEW1Q==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + hasBin: true + create-require@1.1.1: resolution: {integrity: sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ==} @@ -1172,6 +1550,14 @@ packages: supports-color: optional: true + dedent@1.5.3: + resolution: {integrity: sha512-NHQtfOOW68WD8lgypbLA5oT+Bt0xXJhiYvoR6SmmNXZfpzOGXwdKWmcwG8N7PwVVWV3eF/68nmD9BaJSsTBhyQ==} + peerDependencies: + babel-plugin-macros: ^3.1.0 + peerDependenciesMeta: + babel-plugin-macros: + optional: true + deep-extend@0.6.0: resolution: {integrity: sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==} engines: {node: '>=4.0.0'} @@ -1179,6 +1565,10 @@ packages: deep-is@0.1.4: resolution: {integrity: sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==} + deepmerge@4.3.1: + resolution: {integrity: sha512-3sUqbMEc77XqpdNO7FRyRog+eW3ph+GYCbj+rK+uYyRMuwsVy0rMiVtPn+QJlKFvWP/1PYpapqYn0Me2knFn+A==} + engines: {node: '>=0.10.0'} + defaults@1.0.4: resolution: {integrity: sha512-eFuaLoy/Rxalv2kr+lqMlUnrDWV+3j4pljOIJgLIhI058IQfWJ7vXhyEIHu+HtC738klGALYxOKDO0bQP3tg8A==} @@ -1206,6 +1596,14 @@ packages: resolution: {integrity: sha512-bwy0MGW55bG41VqxxypOsdSdGqLwXPI/focwgTYCFMbdUiBAxLg9CFzG08sz2aqzknwiX7Hkl0bQENjg8iLByw==} engines: {node: '>=8'} + detect-newline@3.1.0: + resolution: {integrity: sha512-TLz+x/vEXm/Y7P7wn1EJFNLxYpUD4TgMosxY6fAVJUnJMbupHBOncxyWUG9OpTaH9EBD7uFI5LfEgmMOc54DsA==} + engines: {node: '>=8'} + + diff-sequences@29.6.3: + resolution: {integrity: sha512-EjePK1srD3P08o2j4f0ExnylqRs5B9tJjcp9t1krH2qRi8CCdsYfwe9JgSLurFBWwq4uOlipzfk5fHNvwFKr8Q==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + diff@4.0.2: resolution: {integrity: sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==} engines: {node: '>=0.3.1'} @@ -1225,6 +1623,18 @@ packages: resolution: {integrity: sha512-7GO6HghkA5fYG9TYnNxi14/7K9f5occMlp3zXAuSxn7CKCxt9xbNWG7yF8hTCSUchlfWSe3uLmlPfigevRItzQ==} engines: {node: '>=12'} + ejs@3.1.10: + resolution: {integrity: sha512-UeJmFfOrAQS8OJWPZ4qtgHyWExa088/MtK5UEyoJGFH67cDEXkZSviOiKRCZ4Xij0zxI3JECgYs3oKx+AizQBA==} + engines: {node: '>=0.10.0'} + hasBin: true + + electron-to-chromium@1.5.108: + resolution: {integrity: sha512-tiGxpQmvXBEzrfU5ertmbCV/nG5yqCkC1G4T1SIKP335Y5rjXzPWmijR6XcoGXZvVoo4dknfdNe4Tl7lcIROLg==} + + emittery@0.13.1: + resolution: {integrity: sha512-DeWwawk6r5yR9jFgnDKYt4sLS0LmHJJi3ZOnb5/JdbYwj3nW+FxQnHIjhBKz8YLC7oRNPVM9NQ47I3CVx34eqQ==} + engines: {node: '>=12'} + emoji-regex@8.0.0: resolution: {integrity: sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==} @@ -1232,6 +1642,9 @@ packages: resolution: {integrity: sha512-rRqJg/6gd538VHvR3PSrdRBb/1Vy2YfzHqzvbhGIQpDRKIa4FgV/54b5Q1xYSxOOwKvjXweS26E0Q+nAMwp2pQ==} engines: {node: '>=8.6'} + error-ex@1.3.2: + resolution: {integrity: sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==} + es-abstract@1.23.5: resolution: {integrity: sha512-vlmniQ0WNPwXqA0BnmwV3Ng7HxiGlh6r5U6JcTMNx8OilcAGqVJBHJcPjqOMaczU9fRuRK5Px2BdVyPRnKMMVQ==} engines: {node: '>= 0.4'} @@ -1276,6 +1689,10 @@ packages: resolution: {integrity: sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==} engines: {node: '>=0.8.0'} + escape-string-regexp@2.0.0: + resolution: {integrity: sha512-UpzcLCXolUWcNu5HtVMHYdXJjArjsF9C0aNnquZYY4uW/Vu0miy5YoWvbV345HauVvcAUnpRuhMMcqTcGOY2+w==} + engines: {node: '>=8'} + escape-string-regexp@4.0.0: resolution: {integrity: sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==} engines: {node: '>=10'} @@ -1366,6 +1783,14 @@ packages: resolution: {integrity: sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg==} engines: {node: '>=10'} + exit@0.1.2: + resolution: {integrity: sha512-Zk/eNKV2zbjpKzrsQ+n1G6poVbErQxJ0LBOJXaKZ1EViLzH+hrLu9cdXI4zw9dBQJslwBEpbQ2P1oS7nDxs6jQ==} + engines: {node: '>= 0.8.0'} + + expect@29.7.0: + resolution: {integrity: sha512-2Zks0hf1VLFYI1kbh0I5jP3KHHyCHpkfyHBzsSXRFgl/Bg9mWYfMW8oD+PdMPlEwy5HNsR9JutYy6pMeOh61nw==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + extendable-error@0.1.7: resolution: {integrity: sha512-UOiS2in6/Q0FK0R0q6UY9vYpQ21mr/Qn1KOnte7vsACuNJf514WvCCUHSRCPcgjPT2bAhNIJdlE6bVap1GKmeg==} @@ -1393,6 +1818,9 @@ packages: fastq@1.17.1: resolution: {integrity: sha512-sRVD3lWVIXWg6By68ZN7vho9a1pQcN/WBFaAAsDDFzlJjvoGx0P8z7V1t72grFJfJhu3YPZBuu25f7Kaw2jN1w==} + fb-watchman@2.0.2: + resolution: {integrity: sha512-p5161BqbuCaSnB8jIbzQHOlpgsPmK5rJVDfDKO91Axs5NC1uu3HRQm6wt9cd9/+GtQQIO53JdGXXoyDpTAsgYA==} + figures@3.2.0: resolution: {integrity: sha512-yaduQFRKLXYOGgEn6AZau90j3ggSOyiqXU0F9JZfeXYhNa+Jk4X+s45A2zg5jns87GAFa34BBm2kXw4XpNcbdg==} engines: {node: '>=8'} @@ -1401,6 +1829,9 @@ packages: resolution: {integrity: sha512-XXTUwCvisa5oacNGRP9SfNtYBNAMi+RPwBFmblZEF7N7swHYQS6/Zfk7SRwx4D5j3CH211YNRco1DEMNVfZCnQ==} engines: {node: '>=16.0.0'} + filelist@1.0.4: + resolution: {integrity: sha512-w1cEuf3S+DrLCQL7ET6kz+gmlJdbq9J7yXCSjK/OZCPA+qEN1WyF4ZAf0YYJa4/shHJra2t/d/r8SV4Ji+x+8Q==} + fill-range@7.1.1: resolution: {integrity: sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==} engines: {node: '>=8'} @@ -1457,6 +1888,10 @@ packages: functions-have-names@1.2.3: resolution: {integrity: sha512-xckBUXyTIqT97tq2x2AMb+g163b5JFysYk0x4qxNFwbfQkmNZoiRHb6sPzI9/QV33WeuvVYBUIiD4NzNIyqaRQ==} + gensync@1.0.0-beta.2: + resolution: {integrity: sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==} + engines: {node: '>=6.9.0'} + get-caller-file@2.0.5: resolution: {integrity: sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==} engines: {node: 6.* || 8.* || >= 10.*} @@ -1465,6 +1900,10 @@ packages: resolution: {integrity: sha512-5uYhsJH8VJBTv7oslg4BznJYhDoRI6waYCxMmCdnTrcCrHA/fCFKoTFz2JKKE0HdDFUF7/oQuhzumXJK7paBRQ==} engines: {node: '>= 0.4'} + get-package-type@0.1.0: + resolution: {integrity: sha512-pjzuKtY64GYfWizNAJ0fr9VqttZkNiK2iS430LtIHzjBEr6bX8Am2zm4sW4Ro5wjWW5cAlRL1qAMTcXbjNAO2Q==} + engines: {node: '>=8.0.0'} + get-stream@6.0.1: resolution: {integrity: sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==} engines: {node: '>=10'} @@ -1489,6 +1928,10 @@ packages: resolution: {integrity: sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==} deprecated: Glob versions prior to v9 are no longer supported + globals@11.12.0: + resolution: {integrity: sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==} + engines: {node: '>=4'} + globals@14.0.0: resolution: {integrity: sha512-oahGvuMGQlPw/ivIYBjVSrWAfWLBeku5tpPE2fOPLi+WHffIWbuh2tCjhyQhTBPMf5E9jDEH4FOmTYgYwbKwtQ==} engines: {node: '>=18'} @@ -1560,6 +2003,9 @@ packages: header-case@1.0.1: resolution: {integrity: sha512-i0q9mkOeSuhXw6bGgiQCCBgY/jlZuV/7dZXyZ9c6LcBrqwvT8eT719E9uxE5LiZftdl+z81Ugbg/VvXV4OJOeQ==} + html-escaper@2.0.2: + resolution: {integrity: sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg==} + http-proxy-agent@7.0.2: resolution: {integrity: sha512-T1gkAiYYDWYx3V5Bmyu7HcfcvL7mUrTWiM6yOfa3PIphViJ/gFPbvidQ+veqSOHci/PxBcDabeUNCzpOODJZig==} engines: {node: '>= 14'} @@ -1596,6 +2042,11 @@ packages: resolution: {integrity: sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==} engines: {node: '>=6'} + import-local@3.2.0: + resolution: {integrity: sha512-2SPlun1JUPWoM6t3F0dw0FkCF/jWY8kttcY4f599GLTSjh2OCuuhdTkJQsEcZzBqbXZGKMK2OqW1oZsjtf/gQA==} + engines: {node: '>=8'} + hasBin: true + imurmurhash@0.1.4: resolution: {integrity: sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==} engines: {node: '>=0.8.19'} @@ -1634,6 +2085,9 @@ packages: resolution: {integrity: sha512-wcjaerHw0ydZwfhiKbXJWLDY8A7yV7KhjQOpb83hGgGfId/aQa4TOvwyzn2PuswW2gPCYEL/nEAiSVpdOj1lXw==} engines: {node: '>= 0.4'} + is-arrayish@0.2.1: + resolution: {integrity: sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg==} + is-arrayish@0.3.2: resolution: {integrity: sha512-eVRqCvVlZbuw3GrM63ovNSNAeA1K16kaR/LRY/92w0zxQ5/1YzwblUX652i4Xs9RwAGjW9d9y6X88t8OaAJfWQ==} @@ -1679,6 +2133,10 @@ packages: resolution: {integrity: sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==} engines: {node: '>=8'} + is-generator-fn@2.1.0: + resolution: {integrity: sha512-cTIB4yPYL/Grw0EaSzASzg6bBy9gqCofvWN8okThAYIxKJZC+udlRAmGbM0XLeniEJSs8uEgHPGuHSe1XsOLSQ==} + engines: {node: '>=6'} + is-generator-function@1.0.10: resolution: {integrity: sha512-jsEjy9l3yiXEQ+PsXdmBwEPcOxaXWLspKdplFUVI9vq1iZgIekeC0L167qeu86czQaxed3q/Uzuw0swL0irL8A==} engines: {node: '>= 0.4'} @@ -1782,10 +2240,168 @@ packages: isexe@2.0.0: resolution: {integrity: sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==} + istanbul-lib-coverage@3.2.2: + resolution: {integrity: sha512-O8dpsF+r0WV/8MNRKfnmrtCWhuKjxrq2w+jpzBL5UZKTi2LeVWnWOmWRxFlesJONmc+wLAGvKQZEOanko0LFTg==} + engines: {node: '>=8'} + + istanbul-lib-instrument@5.2.1: + resolution: {integrity: sha512-pzqtp31nLv/XFOzXGuvhCb8qhjmTVo5vjVk19XE4CRlSWz0KoeJ3bw9XsA7nOp9YBf4qHjwBxkDzKcME/J29Yg==} + engines: {node: '>=8'} + + istanbul-lib-instrument@6.0.3: + resolution: {integrity: sha512-Vtgk7L/R2JHyyGW07spoFlB8/lpjiOLTjMdms6AFMraYt3BaJauod/NGrfnVG/y4Ix1JEuMRPDPEj2ua+zz1/Q==} + engines: {node: '>=10'} + + istanbul-lib-report@3.0.1: + resolution: {integrity: sha512-GCfE1mtsHGOELCU8e/Z7YWzpmybrx/+dSTfLrvY8qRmaY6zXTKWn6WQIjaAFw069icm6GVMNkgu0NzI4iPZUNw==} + engines: {node: '>=10'} + + istanbul-lib-source-maps@4.0.1: + resolution: {integrity: sha512-n3s8EwkdFIJCG3BPKBYvskgXGoy88ARzvegkitk60NxRdwltLOTaH7CUiMRXvwYorl0Q712iEjcWB+fK/MrWVw==} + engines: {node: '>=10'} + + istanbul-reports@3.1.7: + resolution: {integrity: sha512-BewmUXImeuRk2YY0PVbxgKAysvhRPUQE0h5QRM++nVWyubKGV0l8qQ5op8+B2DOmwSe63Jivj0BjkPQVf8fP5g==} + engines: {node: '>=8'} + iterator.prototype@1.1.3: resolution: {integrity: sha512-FW5iMbeQ6rBGm/oKgzq2aW4KvAGpxPzYES8N4g4xNXUKpL1mclMvOe+76AcLDTvD+Ze+sOpVhgdAQEKF4L9iGQ==} engines: {node: '>= 0.4'} + jake@10.9.2: + resolution: {integrity: sha512-2P4SQ0HrLQ+fw6llpLnOaGAvN2Zu6778SJMrCUwns4fOoG9ayrTiZk3VV8sCPkVZF8ab0zksVpS8FDY5pRCNBA==} + engines: {node: '>=10'} + hasBin: true + + jest-changed-files@29.7.0: + resolution: {integrity: sha512-fEArFiwf1BpQ+4bXSprcDc3/x4HSzL4al2tozwVpDFpsxALjLYdyiIK4e5Vz66GQJIbXJ82+35PtysofptNX2w==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + + jest-circus@29.7.0: + resolution: {integrity: sha512-3E1nCMgipcTkCocFwM90XXQab9bS+GMsjdpmPrlelaxwD93Ad8iVEjX/vvHPdLPnFf+L40u+5+iutRdA1N9myw==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + + jest-cli@29.7.0: + resolution: {integrity: sha512-OVVobw2IubN/GSYsxETi+gOe7Ka59EFMR/twOU3Jb2GnKKeMGJB5SGUUrEz3SFVmJASUdZUzy83sLNNQ2gZslg==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + hasBin: true + peerDependencies: + node-notifier: ^8.0.1 || ^9.0.0 || ^10.0.0 + peerDependenciesMeta: + node-notifier: + optional: true + + jest-config@29.7.0: + resolution: {integrity: sha512-uXbpfeQ7R6TZBqI3/TxCU4q4ttk3u0PJeC+E0zbfSoSjq6bJ7buBPxzQPL0ifrkY4DNu4JUdk0ImlBUYi840eQ==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + peerDependencies: + '@types/node': '*' + ts-node: '>=9.0.0' + peerDependenciesMeta: + '@types/node': + optional: true + ts-node: + optional: true + + jest-diff@29.7.0: + resolution: {integrity: sha512-LMIgiIrhigmPrs03JHpxUh2yISK3vLFPkAodPeo0+BuF7wA2FoQbkEg1u8gBYBThncu7e1oEDUfIXVuTqLRUjw==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + + jest-docblock@29.7.0: + resolution: {integrity: sha512-q617Auw3A612guyaFgsbFeYpNP5t2aoUNLwBUbc/0kD1R4t9ixDbyFTHd1nok4epoVFpr7PmeWHrhvuV3XaJ4g==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + + jest-each@29.7.0: + resolution: {integrity: sha512-gns+Er14+ZrEoC5fhOfYCY1LOHHr0TI+rQUHZS8Ttw2l7gl+80eHc/gFf2Ktkw0+SIACDTeWvpFcv3B04VembQ==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + + jest-environment-node@29.7.0: + resolution: {integrity: sha512-DOSwCRqXirTOyheM+4d5YZOrWcdu0LNZ87ewUoywbcb2XR4wKgqiG8vNeYwhjFMbEkfju7wx2GYH0P2gevGvFw==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + + jest-get-type@29.6.3: + resolution: {integrity: sha512-zrteXnqYxfQh7l5FHyL38jL39di8H8rHoecLH3JNxH3BwOrBsNeabdap5e0I23lD4HHI8W5VFBZqG4Eaq5LNcw==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + + jest-haste-map@29.7.0: + resolution: {integrity: sha512-fP8u2pyfqx0K1rGn1R9pyE0/KTn+G7PxktWidOBTqFPLYX0b9ksaMFkhK5vrS3DVun09pckLdlx90QthlW7AmA==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + + jest-leak-detector@29.7.0: + resolution: {integrity: sha512-kYA8IJcSYtST2BY9I+SMC32nDpBT3J2NvWJx8+JCuCdl/CR1I4EKUJROiP8XtCcxqgTTBGJNdbB1A8XRKbTetw==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + + jest-matcher-utils@29.7.0: + resolution: {integrity: sha512-sBkD+Xi9DtcChsI3L3u0+N0opgPYnCRPtGcQYrgXmR+hmt/fYfWAL0xRXYU8eWOdfuLgBe0YCW3AFtnRLagq/g==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + + jest-message-util@29.7.0: + resolution: {integrity: sha512-GBEV4GRADeP+qtB2+6u61stea8mGcOT4mCtrYISZwfu9/ISHFJ/5zOMXYbpBE9RsS5+Gb63DW4FgmnKJ79Kf6w==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + + jest-mock@29.7.0: + resolution: {integrity: sha512-ITOMZn+UkYS4ZFh83xYAOzWStloNzJFO2s8DWrE4lhtGD+AorgnbkiKERe4wQVBydIGPx059g6riW5Btp6Llnw==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + + jest-pnp-resolver@1.2.3: + resolution: {integrity: sha512-+3NpwQEnRoIBtx4fyhblQDPgJI0H1IEIkX7ShLUjPGA7TtUTvI1oiKi3SR4oBR0hQhQR80l4WAe5RrXBwWMA8w==} + engines: {node: '>=6'} + peerDependencies: + jest-resolve: '*' + peerDependenciesMeta: + jest-resolve: + optional: true + + jest-regex-util@29.6.3: + resolution: {integrity: sha512-KJJBsRCyyLNWCNBOvZyRDnAIfUiRJ8v+hOBQYGn8gDyF3UegwiP4gwRR3/SDa42g1YbVycTidUF3rKjyLFDWbg==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + + jest-resolve-dependencies@29.7.0: + resolution: {integrity: sha512-un0zD/6qxJ+S0et7WxeI3H5XSe9lTBBR7bOHCHXkKR6luG5mwDDlIzVQ0V5cZCuoTgEdcdwzTghYkTWfubi+nA==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + + jest-resolve@29.7.0: + resolution: {integrity: sha512-IOVhZSrg+UvVAshDSDtHyFCCBUl/Q3AAJv8iZ6ZjnZ74xzvwuzLXid9IIIPgTnY62SJjfuupMKZsZQRsCvxEgA==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + + jest-runner@29.7.0: + resolution: {integrity: sha512-fsc4N6cPCAahybGBfTRcq5wFR6fpLznMg47sY5aDpsoejOcVYFb07AHuSnR0liMcPTgBsA3ZJL6kFOjPdoNipQ==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + + jest-runtime@29.7.0: + resolution: {integrity: sha512-gUnLjgwdGqW7B4LvOIkbKs9WGbn+QLqRQQ9juC6HndeDiezIwhDP+mhMwHWCEcfQ5RUXa6OPnFF8BJh5xegwwQ==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + + jest-snapshot@29.7.0: + resolution: {integrity: sha512-Rm0BMWtxBcioHr1/OX5YCP8Uov4riHvKPknOGs804Zg9JGZgmIBkbtlxJC/7Z4msKYVbIJtfU+tKb8xlYNfdkw==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + + jest-util@29.7.0: + resolution: {integrity: sha512-z6EbKajIpqGKU56y5KBUgy1dt1ihhQJgWzUlZHArA/+X2ad7Cb5iF+AK1EWVL/Bo7Rz9uurpqw6SiBCefUbCGA==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + + jest-validate@29.7.0: + resolution: {integrity: sha512-ZB7wHqaRGVw/9hST/OuFUReG7M8vKeq0/J2egIGLdvjHCmYqGARhzXmtgi+gVeZ5uXFF219aOc3Ls2yLg27tkw==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + + jest-watcher@29.7.0: + resolution: {integrity: sha512-49Fg7WXkU3Vl2h6LbLtMQ/HyB6rXSIX7SqvBLQmssRBGN9I0PNvPmAmCWSOY6SOvrjhI/F7/bGAv9RtnsPA03g==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + + jest-worker@29.7.0: + resolution: {integrity: sha512-eIz2msL/EzL9UFTFFx7jBTkeZfku0yUAyZZZmJ93H2TYEiroIx2PQjEXcwYtYl8zXCxb+PAmA2hLIt/6ZEkPHw==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + + jest@29.7.0: + resolution: {integrity: sha512-NIy3oAFp9shda19hy4HK0HRTWKtPJmGdnvywu01nOqNC2vZg+Z+fvJDxpMQA88eb2I9EcafcdjYgsDthnYTvGw==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + hasBin: true + peerDependencies: + node-notifier: ^8.0.1 || ^9.0.0 || ^10.0.0 + peerDependenciesMeta: + node-notifier: + optional: true + js-tokens@4.0.0: resolution: {integrity: sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==} @@ -1800,15 +2416,28 @@ packages: jsbn@1.1.0: resolution: {integrity: sha512-4bYVV3aAMtDTTu4+xsDYa6sy9GyJ69/amsu9sYF2zqjiEoZA5xJi3BrfX3uY+/IekIu7MwdObdbDWpoZdBv3/A==} + jsesc@3.1.0: + resolution: {integrity: sha512-/sM3dO2FOzXjKQhJuo0Q173wf2KOo8t4I8vHy6lF9poUp7bKT0/NHE8fPX23PwfhnykfqnC2xRxOnVw5XuGIaA==} + engines: {node: '>=6'} + hasBin: true + json-buffer@3.0.1: resolution: {integrity: sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==} + json-parse-even-better-errors@2.3.1: + resolution: {integrity: sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==} + json-schema-traverse@0.4.1: resolution: {integrity: sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==} json-stable-stringify-without-jsonify@1.0.1: resolution: {integrity: sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==} + json5@2.2.3: + resolution: {integrity: sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==} + engines: {node: '>=6'} + hasBin: true + jsonfile@4.0.0: resolution: {integrity: sha512-m6F1R3z8jjlf2imQHS2Qez5sjKWQzbuuhuJ/FKYFRZvPE3PuHcSMVZzfsLhGVOkfd20obL5SWEBew5ShlquNxg==} @@ -1826,6 +2455,10 @@ packages: keyv@4.5.4: resolution: {integrity: sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw==} + kleur@3.0.3: + resolution: {integrity: sha512-eTIzlVOSUR+JxdDFepEYcBMtZ9Qqdef+rnzWdRZuMbOywu5tO2w2N7rqjoANZ5k9vywhL6Br1VRjUIgTQx4E8w==} + engines: {node: '>=6'} + lefthook-darwin-arm64@1.10.10: resolution: {integrity: sha512-hEypKdwWpmNSl4Q8eJxgmlGb2ybJj1+W5/v13Mxc+ApEmjbpNiJzPcdjC9zyaMEpPK4EybiHy8g5ZC0dLOwkpA==} cpu: [arm64] @@ -1880,10 +2513,17 @@ packages: resolution: {integrity: sha512-YW0fTONgOXsephvXq2gIFbegCW19MHCyKYX7JDWmzVF1ZiVMnDBYUL/SP3i0RtFvlCmqENl4SgKwYYQGUMnvig==} hasBin: true - levn@0.4.1: + leven@3.1.0: + resolution: {integrity: sha512-qsda+H8jTaUaN/x5vzW2rzc+8Rw4TAQ/4KjB46IwK5VH+IlVeeeje/EoZRpiXvIqjFgK84QffqPztGI3VBLG1A==} + engines: {node: '>=6'} + + levn@0.4.1: resolution: {integrity: sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==} engines: {node: '>= 0.8.0'} + lines-and-columns@1.2.4: + resolution: {integrity: sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==} + locate-path@5.0.0: resolution: {integrity: sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==} engines: {node: '>=8'} @@ -1896,6 +2536,9 @@ packages: resolution: {integrity: sha512-z+Uw/vLuy6gQe8cfaFWD7p0wVv8fJl3mbzXh33RS+0oW2wvUqiRXiQ69gLWSLpgB5/6sU+r6BlQR0MBILadqTQ==} deprecated: This package is deprecated. Use the optional chaining (?.) operator instead. + lodash.memoize@4.1.2: + resolution: {integrity: sha512-t7j+NzmgnQzTAYXcsHYLgimltOV1MXHtlOWf6GjL9Kj8GK5FInw5JotxvbOs+IvV1/Dzo04/fCGfLVs7aXb4Ag==} + lodash.merge@4.6.2: resolution: {integrity: sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==} @@ -1923,13 +2566,23 @@ packages: lower-case@1.1.4: resolution: {integrity: sha512-2Fgx1Ycm599x+WGpIYwJOvsjmXFzTSc34IwDWALRA/8AopUKAVPwfJ+h5+f85BCp0PWmmJcWzEpxOpoXycMpdA==} + lru-cache@5.1.1: + resolution: {integrity: sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==} + lru-cache@7.18.3: resolution: {integrity: sha512-jumlc0BIUrS3qJGgIkWZsyfAM7NCWiBcCDhnd+3NNM5KbBmLTgHVfWBcg6W+rLUsIpzpERPsvwUP7CckAQSOoA==} engines: {node: '>=12'} + make-dir@4.0.0: + resolution: {integrity: sha512-hXdUTZYIVOt1Ex//jAQi+wTZZpUpwBj/0QsOzqegb3rGMMeJiSEu5xLHnYfBrRV4RH2+OCSOO95Is/7x1WJ4bw==} + engines: {node: '>=10'} + make-error@1.3.6: resolution: {integrity: sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==} + makeerror@1.0.12: + resolution: {integrity: sha512-JmqCvUhmt43madlpFzG4BQzG2Z3m6tvQDNKdClZnO3VbIudJYmxsT0FNJMeiB2+JTSlTQTSbU8QdesVmwJcmLg==} + merge-stream@2.0.0: resolution: {integrity: sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==} @@ -1948,6 +2601,10 @@ packages: minimatch@3.1.2: resolution: {integrity: sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==} + minimatch@5.1.6: + resolution: {integrity: sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==} + engines: {node: '>=10'} + minimatch@9.0.5: resolution: {integrity: sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==} engines: {node: '>=16 || 14 >=14.17'} @@ -2008,10 +2665,16 @@ packages: no-case@2.3.2: resolution: {integrity: sha512-rmTZ9kz+f3rCvK2TD1Ue/oZlns7OGoIWP4fc3llxxRXlOkHKoWPPWJOfFYpITabSow43QJbRIoHQXtt10VldyQ==} + node-int64@0.4.0: + resolution: {integrity: sha512-O5lz91xSOeoXP6DulyHfllpq+Eg00MWitZIbtPfoSEvqIHdl5gfcY6hYzDWnj0qD5tz52PI08u9qUvSVeUBeHw==} + node-plop@0.26.3: resolution: {integrity: sha512-Cov028YhBZ5aB7MdMWJEmwyBig43aGL5WT4vdoB28Oitau1zZAcHUn8Sgfk9HM33TqhtLJ9PlM/O0Mv+QpV/4Q==} engines: {node: '>=8.9.4'} + node-releases@2.0.19: + resolution: {integrity: sha512-xxOWJsBKtzAq7DY0J+DTzuz58K8e7sJbdgwkbMWQe8UYB6ekmsQ45q0M/tJDsGaZmbC+l7n57UV8Hl5tHxO9uw==} + nodemon@3.1.9: resolution: {integrity: sha512-hdr1oIb2p6ZSxu3PB2JWWYS7ZQ0qvaZsc3hK8DR8f02kRzc8rjYmxAIvdz+aYC+8F2IjNaB7HMcSDg8nQpJxyg==} engines: {node: '>=10'} @@ -2137,6 +2800,10 @@ packages: resolution: {integrity: sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==} engines: {node: '>=6'} + parse-json@5.2.0: + resolution: {integrity: sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg==} + engines: {node: '>=8'} + pascal-case@2.0.1: resolution: {integrity: sha512-qjS4s8rBOJa2Xm0jmxXiyh1+OFf6ekCWOvUaRgAQSktzlTbMotS0nmG9gyYAybCWBcuP4fsBeRCKNwGBnMe2OQ==} @@ -2173,6 +2840,14 @@ packages: resolution: {integrity: sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==} engines: {node: '>=6'} + pirates@4.0.6: + resolution: {integrity: sha512-saLsH7WeYYPiD25LDuLRRY/i+6HaPYr6G1OUlN39otzkSTxKnubR9RTxS3/Kk50s1g2JTgFwWQDQyplC5/SHZg==} + engines: {node: '>= 6'} + + pkg-dir@4.2.0: + resolution: {integrity: sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ==} + engines: {node: '>=8'} + possible-typed-array-names@1.0.0: resolution: {integrity: sha512-d7Uw+eZoloe0EHDIYoe+bQ5WXnGMOpmiZFTuMWCwpjzzkL2nTjcKiAk4hh8TjnGye2TwWOk3UXucZ+3rbmBa8Q==} engines: {node: '>= 0.4'} @@ -2195,6 +2870,14 @@ packages: engines: {node: '>=14'} hasBin: true + pretty-format@29.7.0: + resolution: {integrity: sha512-Pdlw/oPxN+aXdmM9R00JVC9WVFoCLTKJvDVLgmJ+qAffBMxsV85l/Lu7sNx4zSzPyoL2euImuEwHhOXdEgNFZQ==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + + prompts@2.4.2: + resolution: {integrity: sha512-NxNv/kLguCA7p3jE8oL2aEBsrJWgAakBpgmgK6lpPWV+WuOmY6r2/zbAVnP+T8bQlA0nzHXSJSJW0Hq7ylaD2Q==} + engines: {node: '>= 6'} + prop-types@15.8.1: resolution: {integrity: sha512-oj87CgZICdulUohogVAR7AjlC0327U4el4L6eAvOqCeudMDVU0NThNaV+b9Df4dXgSP1gXMTnPdhfe/2qDH5cg==} @@ -2212,6 +2895,9 @@ packages: resolution: {integrity: sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==} engines: {node: '>=6'} + pure-rand@6.1.0: + resolution: {integrity: sha512-bVWawvoZoBYpp6yIoQtQXHZjmz35RSVHnUOTefl8Vcjr8snTPY1wnpSPMWekcFwbxI6gtmT7rSYPFvz71ldiOA==} + queue-microtask@1.2.3: resolution: {integrity: sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==} @@ -2227,6 +2913,9 @@ packages: react-is@16.13.1: resolution: {integrity: sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==} + react-is@18.3.1: + resolution: {integrity: sha512-/LLMVyas0ljjAtoYiPqYiL8VWXzUUdThrmU5+n20DZv+a+ClRoevUzw5JxU+Ieh5/c87ytoTBV9G1FiKfNJdmg==} + react@19.0.0: resolution: {integrity: sha512-V8AVnmPIICiWpGfm6GLzCR/W5FXLchHop40W4nXBmdlEceh16rCN8O8LNWm5bh5XUX91fh7KpA+W0TgMKmgTpQ==} engines: {node: '>=0.10.0'} @@ -2265,6 +2954,10 @@ packages: resolution: {integrity: sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==} engines: {node: '>=0.10.0'} + resolve-cwd@3.0.0: + resolution: {integrity: sha512-OrZaX2Mb+rJCpH/6CpSqt9xFVpN++x01XnN2ie9g6P5/3xelLAkXWVADpdz1IHD/KFfEXyE6V0U01OQ3UO2rEg==} + engines: {node: '>=8'} + resolve-from@4.0.0: resolution: {integrity: sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==} engines: {node: '>=4'} @@ -2273,6 +2966,10 @@ packages: resolution: {integrity: sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==} engines: {node: '>=8'} + resolve.exports@2.0.3: + resolution: {integrity: sha512-OcXjMsGdhL4XnbShKpAcSqPMzQoYkYyhbEaeSko47MjRP9NfEQMhZkXL1DoFlt9LWQn4YttrdnV6X2OiyzBi+A==} + engines: {node: '>=10'} + resolve@1.22.8: resolution: {integrity: sha512-oKWePCxqpd6FlLvGV1VU0x7bkPmmCNolxzjMf4NczoDnQcIWrAF+cPtZn5i6n+RfD2d9i0tzpKnG6Yk168yIyw==} hasBin: true @@ -2334,6 +3031,11 @@ packages: engines: {node: '>=10'} hasBin: true + semver@7.7.1: + resolution: {integrity: sha512-hlq8tAfn0m/61p4BVRcPzIGr6LKiMwo4VM6dGi6pt4qcRkmNzTcWq6eCEjEh+qXjkMDvPlOFFSGwQjoEa6gyMA==} + engines: {node: '>=10'} + hasBin: true + sentence-case@2.1.1: resolution: {integrity: sha512-ENl7cYHaK/Ktwk5OTD+aDbQ3uC8IByu/6Bkg+HDv8Mm+XnBnppVNalcfJTNsp1ibstKh030/JKQQWglDvtKwEQ==} @@ -2379,6 +3081,9 @@ packages: resolution: {integrity: sha512-a2B9Y0KlNXl9u/vsW6sTIu9vGEpfKu2wRV6l1H3XEas/0gUIzGzBoP/IouTcUQbm9JWZLH3COxyn03TYlFax6w==} engines: {node: '>=10'} + sisteransi@1.0.5: + resolution: {integrity: sha512-bLGGlR1QxBcynn2d5YmDX4MGjlZvy2MRBDRNHLJ8VI6l6+9FUiyTFNJ0IveOSP0bcXgVDPRcfGqA0pjaqUpfVg==} + slash@3.0.0: resolution: {integrity: sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==} engines: {node: '>=8'} @@ -2402,6 +3107,9 @@ packages: resolution: {integrity: sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA==} engines: {node: '>=0.10.0'} + source-map-support@0.5.13: + resolution: {integrity: sha512-SHSKFHadjVA5oR4PPqhtAVdcBWwRYVd6g6cAXnIbRiIwc2EhPrTuKUBdSLvlEKyIP3GCf89fltvcZiP9MMFA1w==} + source-map@0.6.1: resolution: {integrity: sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==} engines: {node: '>=0.10.0'} @@ -2418,10 +3126,18 @@ packages: sprintf-js@1.1.3: resolution: {integrity: sha512-Oo+0REFV59/rz3gfJNKQiBlwfHaSESl1pcGyABQsnnIfWOFt6JNj5gCog2U6MLZ//IGYD+nA8nI+mTShREReaA==} + stack-utils@2.0.6: + resolution: {integrity: sha512-XlkWvfIm6RmsWtNJx+uqtKLS8eqFbxUg0ZzLXqY0caEy9l7hruX8IpiDnjsLavoBgqCCR71TqWO8MaXYheJ3RQ==} + engines: {node: '>=10'} + streamsearch@1.1.0: resolution: {integrity: sha512-Mcc5wHehp9aXz1ax6bZUyY5afg9u2rv5cqQI3mRrYkGC8rW2hM02jWuwjtL++LS5qinSyhj2QfLyNsuc+VsExg==} engines: {node: '>=10.0.0'} + string-length@4.0.2: + resolution: {integrity: sha512-+l6rNN5fYHNhZZy41RXsYptCjA2Igmq4EG7kZAYFQI1E1VTXarr6ZPXBg6eq7Y6eK4FEhY6AJlyuFIb/v/S0VQ==} + engines: {node: '>=10'} + string-width@4.2.3: resolution: {integrity: sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==} engines: {node: '>=8'} @@ -2455,6 +3171,10 @@ packages: resolution: {integrity: sha512-vavAMRXOgBVNF6nyEEmL3DBK19iRpDcoIwW+swQ+CbGiu7lju6t+JklA1MHweoWtadgt4ISVUsXLyDq34ddcwA==} engines: {node: '>=4'} + strip-bom@4.0.0: + resolution: {integrity: sha512-3xurFv5tEgii33Zi8Jtp55wEIILR9eh34FAW00PZf+JnSsTmV/ioewSgQl97JHvgjoRGwPShsWm+IdrxB35d0w==} + engines: {node: '>=8'} + strip-final-newline@2.0.0: resolution: {integrity: sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA==} engines: {node: '>=6'} @@ -2503,6 +3223,10 @@ packages: resolution: {integrity: sha512-wK0Ri4fOGjv/XPy8SBHZChl8CM7uMc5VML7SqiQ0zG7+J5Vr+RMQDoHa2CNT6KHUnTGIXH34UDMkPzAUyapBZg==} engines: {node: '>=8'} + test-exclude@6.0.0: + resolution: {integrity: sha512-cAGWPIyOHU6zlmg88jwm7VRyXnMN7iV68OGAbYDk/Mh/xC/pzVPlQtY6ngoIH/5/tciuhGfvESU8GrHrcxD56w==} + engines: {node: '>=8'} + through@2.3.8: resolution: {integrity: sha512-w89qg7PI8wAdvX60bMDP+bFoD5Dvhm9oLheFp5O4a2QF0cSBGsBX4qZmadPMvVqlLJBBci+WqGGOAPvcDeNSVg==} @@ -2519,6 +3243,9 @@ packages: resolution: {integrity: sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw==} engines: {node: '>=0.6.0'} + tmpl@1.0.5: + resolution: {integrity: sha512-3f0uOEAQwIqGuWW2MVzYg8fV/QNnc/IpuJNG837rLuczAaLVHslWHZQj4IGiEl5Hs3kkbhwL9Ab7Hrsmuj+Smw==} + to-regex-range@5.0.1: resolution: {integrity: sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==} engines: {node: '>=8.0'} @@ -2537,6 +3264,30 @@ packages: peerDependencies: typescript: '>=4.2.0' + ts-jest@29.2.6: + resolution: {integrity: sha512-yTNZVZqc8lSixm+QGVFcPe6+yj7+TWZwIesuOWvfcn4B9bz5x4NDzVCQQjOs7Hfouu36aEqfEbo9Qpo+gq8dDg==} + engines: {node: ^14.15.0 || ^16.10.0 || ^18.0.0 || >=20.0.0} + hasBin: true + peerDependencies: + '@babel/core': '>=7.0.0-beta.0 <8' + '@jest/transform': ^29.0.0 + '@jest/types': ^29.0.0 + babel-jest: ^29.0.0 + esbuild: '*' + jest: ^29.0.0 + typescript: '>=4.3 <6' + peerDependenciesMeta: + '@babel/core': + optional: true + '@jest/transform': + optional: true + '@jest/types': + optional: true + babel-jest: + optional: true + esbuild: + optional: true + ts-node@10.9.2: resolution: {integrity: sha512-f0FFpIdcHgn8zcPSbf1dRevwt047YMnaiJM3u2w2RewrB+fob/zePZcrOyQoLMMO7aBIddLcQIEK5dYjkLnGrQ==} hasBin: true @@ -2595,6 +3346,10 @@ packages: resolution: {integrity: sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==} engines: {node: '>= 0.8.0'} + type-detect@4.0.8: + resolution: {integrity: sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==} + engines: {node: '>=4'} + type-fest@0.21.3: resolution: {integrity: sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w==} engines: {node: '>=10'} @@ -2660,6 +3415,12 @@ packages: resolution: {integrity: sha512-gptHNQghINnc/vTGIk0SOFGFNXw7JVrlRUtConJRlvaw6DuX0wO5Jeko9sWrMBhh+PsYAZ7oXAiOnf/UKogyiw==} engines: {node: '>= 10.0.0'} + update-browserslist-db@1.1.3: + resolution: {integrity: sha512-UxhIZQ+QInVdunkDAaiazvvT/+fXL5Osr0JZlJulepYu6Jd7qJtDZjlur0emRlT71EN3ScPoE7gvsuIKKNavKw==} + hasBin: true + peerDependencies: + browserslist: '>= 4.21.0' + update-check@1.5.4: resolution: {integrity: sha512-5YHsflzHP4t1G+8WGPlvKbJEbAJGCgw+Em+dGR1KmBUbr1J36SJBqlHLjR7oob7sco5hWHGQVcr9B2poIVDDTQ==} @@ -2678,10 +3439,17 @@ packages: v8-compile-cache-lib@3.0.1: resolution: {integrity: sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg==} + v8-to-istanbul@9.3.0: + resolution: {integrity: sha512-kiGUalWN+rgBJ/1OHZsBtU4rXZOfj/7rKQxULKlIzwzQSvMJUUNgPwJEEh7gU6xEVxC0ahoOBvN2YI8GH6FNgA==} + engines: {node: '>=10.12.0'} + validate-npm-package-name@5.0.1: resolution: {integrity: sha512-OljLrQ9SQdOUqTaQxqL5dEfZWrXExyyWsozYlAWFawPVNuD83igl7uJD2RTkNMbniIYgt8l81eCJGIdQF7avLQ==} engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0} + walker@1.0.8: + resolution: {integrity: sha512-ts/8E8l5b7kY0vlWLewOkDXMmPdLcVV4GmOQLyxuSswIJsweeFZtAsMF7k1Nszz+TYBQrlYRmzOnr398y1JemQ==} + wcwidth@1.0.1: resolution: {integrity: sha512-XHPEwS0q6TaxcvG85+8EYkbiCux2XtWG2mkc47Ng2A77BQu9+DqIOJldST4HgPkuea7dvKSj5VgX3P1d4rW8Tg==} @@ -2723,10 +3491,17 @@ packages: wrappy@1.0.2: resolution: {integrity: sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==} + write-file-atomic@4.0.2: + resolution: {integrity: sha512-7KxauUdBmSdWnmpaGFg+ppNjKF8uNLry8LyzjauQDOVONfFLNKrKvQOxZ/VuTIcS/gge/YNahf5RIIQWTSarlg==} + engines: {node: ^12.13.0 || ^14.15.0 || >=16.0.0} + y18n@5.0.8: resolution: {integrity: sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==} engines: {node: '>=10'} + yallist@3.1.1: + resolution: {integrity: sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==} + yargs-parser@21.1.1: resolution: {integrity: sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==} engines: {node: '>=12'} @@ -2747,6 +3522,173 @@ snapshots: '@adraffy/ens-normalize@1.11.0': {} + '@ampproject/remapping@2.3.0': + dependencies: + '@jridgewell/gen-mapping': 0.3.8 + '@jridgewell/trace-mapping': 0.3.25 + + '@babel/code-frame@7.26.2': + dependencies: + '@babel/helper-validator-identifier': 7.25.9 + js-tokens: 4.0.0 + picocolors: 1.1.1 + + '@babel/compat-data@7.26.8': {} + + '@babel/core@7.26.9': + dependencies: + '@ampproject/remapping': 2.3.0 + '@babel/code-frame': 7.26.2 + '@babel/generator': 7.26.9 + '@babel/helper-compilation-targets': 7.26.5 + '@babel/helper-module-transforms': 7.26.0(@babel/core@7.26.9) + '@babel/helpers': 7.26.9 + '@babel/parser': 7.26.9 + '@babel/template': 7.26.9 + '@babel/traverse': 7.26.9 + '@babel/types': 7.26.9 + convert-source-map: 2.0.0 + debug: 4.3.7(supports-color@5.5.0) + gensync: 1.0.0-beta.2 + json5: 2.2.3 + semver: 6.3.1 + transitivePeerDependencies: + - supports-color + + '@babel/generator@7.26.9': + dependencies: + '@babel/parser': 7.26.9 + '@babel/types': 7.26.9 + '@jridgewell/gen-mapping': 0.3.8 + '@jridgewell/trace-mapping': 0.3.25 + jsesc: 3.1.0 + + '@babel/helper-compilation-targets@7.26.5': + dependencies: + '@babel/compat-data': 7.26.8 + '@babel/helper-validator-option': 7.25.9 + browserslist: 4.24.4 + lru-cache: 5.1.1 + semver: 6.3.1 + + '@babel/helper-module-imports@7.25.9': + dependencies: + '@babel/traverse': 7.26.9 + '@babel/types': 7.26.9 + transitivePeerDependencies: + - supports-color + + '@babel/helper-module-transforms@7.26.0(@babel/core@7.26.9)': + dependencies: + '@babel/core': 7.26.9 + '@babel/helper-module-imports': 7.25.9 + '@babel/helper-validator-identifier': 7.25.9 + '@babel/traverse': 7.26.9 + transitivePeerDependencies: + - supports-color + + '@babel/helper-plugin-utils@7.26.5': {} + + '@babel/helper-string-parser@7.25.9': {} + + '@babel/helper-validator-identifier@7.25.9': {} + + '@babel/helper-validator-option@7.25.9': {} + + '@babel/helpers@7.26.9': + dependencies: + '@babel/template': 7.26.9 + '@babel/types': 7.26.9 + + '@babel/parser@7.26.9': + dependencies: + '@babel/types': 7.26.9 + + '@babel/plugin-syntax-async-generators@7.8.4(@babel/core@7.26.9)': + dependencies: + '@babel/core': 7.26.9 + '@babel/helper-plugin-utils': 7.26.5 + + '@babel/plugin-syntax-bigint@7.8.3(@babel/core@7.26.9)': + dependencies: + '@babel/core': 7.26.9 + '@babel/helper-plugin-utils': 7.26.5 + + '@babel/plugin-syntax-class-properties@7.12.13(@babel/core@7.26.9)': + dependencies: + '@babel/core': 7.26.9 + '@babel/helper-plugin-utils': 7.26.5 + + '@babel/plugin-syntax-class-static-block@7.14.5(@babel/core@7.26.9)': + dependencies: + '@babel/core': 7.26.9 + '@babel/helper-plugin-utils': 7.26.5 + + '@babel/plugin-syntax-import-attributes@7.26.0(@babel/core@7.26.9)': + dependencies: + '@babel/core': 7.26.9 + '@babel/helper-plugin-utils': 7.26.5 + + '@babel/plugin-syntax-import-meta@7.10.4(@babel/core@7.26.9)': + dependencies: + '@babel/core': 7.26.9 + '@babel/helper-plugin-utils': 7.26.5 + + '@babel/plugin-syntax-json-strings@7.8.3(@babel/core@7.26.9)': + dependencies: + '@babel/core': 7.26.9 + '@babel/helper-plugin-utils': 7.26.5 + + '@babel/plugin-syntax-jsx@7.25.9(@babel/core@7.26.9)': + dependencies: + '@babel/core': 7.26.9 + '@babel/helper-plugin-utils': 7.26.5 + + '@babel/plugin-syntax-logical-assignment-operators@7.10.4(@babel/core@7.26.9)': + dependencies: + '@babel/core': 7.26.9 + '@babel/helper-plugin-utils': 7.26.5 + + '@babel/plugin-syntax-nullish-coalescing-operator@7.8.3(@babel/core@7.26.9)': + dependencies: + '@babel/core': 7.26.9 + '@babel/helper-plugin-utils': 7.26.5 + + '@babel/plugin-syntax-numeric-separator@7.10.4(@babel/core@7.26.9)': + dependencies: + '@babel/core': 7.26.9 + '@babel/helper-plugin-utils': 7.26.5 + + '@babel/plugin-syntax-object-rest-spread@7.8.3(@babel/core@7.26.9)': + dependencies: + '@babel/core': 7.26.9 + '@babel/helper-plugin-utils': 7.26.5 + + '@babel/plugin-syntax-optional-catch-binding@7.8.3(@babel/core@7.26.9)': + dependencies: + '@babel/core': 7.26.9 + '@babel/helper-plugin-utils': 7.26.5 + + '@babel/plugin-syntax-optional-chaining@7.8.3(@babel/core@7.26.9)': + dependencies: + '@babel/core': 7.26.9 + '@babel/helper-plugin-utils': 7.26.5 + + '@babel/plugin-syntax-private-property-in-object@7.14.5(@babel/core@7.26.9)': + dependencies: + '@babel/core': 7.26.9 + '@babel/helper-plugin-utils': 7.26.5 + + '@babel/plugin-syntax-top-level-await@7.14.5(@babel/core@7.26.9)': + dependencies: + '@babel/core': 7.26.9 + '@babel/helper-plugin-utils': 7.26.5 + + '@babel/plugin-syntax-typescript@7.25.9(@babel/core@7.26.9)': + dependencies: + '@babel/core': 7.26.9 + '@babel/helper-plugin-utils': 7.26.5 + '@babel/runtime-corejs3@7.26.0': dependencies: core-js-pure: 3.39.0 @@ -2756,6 +3698,31 @@ snapshots: dependencies: regenerator-runtime: 0.14.1 + '@babel/template@7.26.9': + dependencies: + '@babel/code-frame': 7.26.2 + '@babel/parser': 7.26.9 + '@babel/types': 7.26.9 + + '@babel/traverse@7.26.9': + dependencies: + '@babel/code-frame': 7.26.2 + '@babel/generator': 7.26.9 + '@babel/parser': 7.26.9 + '@babel/template': 7.26.9 + '@babel/types': 7.26.9 + debug: 4.3.7(supports-color@5.5.0) + globals: 11.12.0 + transitivePeerDependencies: + - supports-color + + '@babel/types@7.26.9': + dependencies: + '@babel/helper-string-parser': 7.25.9 + '@babel/helper-validator-identifier': 7.25.9 + + '@bcoe/v8-coverage@0.2.3': {} + '@changesets/apply-release-plan@7.0.7': dependencies: '@changesets/config': 3.0.5 @@ -3111,10 +4078,195 @@ snapshots: '@img/sharp-win32-x64@0.33.5': optional: true + '@istanbuljs/load-nyc-config@1.1.0': + dependencies: + camelcase: 5.3.1 + find-up: 4.1.0 + get-package-type: 0.1.0 + js-yaml: 3.14.1 + resolve-from: 5.0.0 + + '@istanbuljs/schema@0.1.3': {} + + '@jest/console@29.7.0': + dependencies: + '@jest/types': 29.6.3 + '@types/node': 20.17.6 + chalk: 4.1.2 + jest-message-util: 29.7.0 + jest-util: 29.7.0 + slash: 3.0.0 + + '@jest/core@29.7.0(ts-node@10.9.2(@types/node@20.17.6)(typescript@5.7.3))': + dependencies: + '@jest/console': 29.7.0 + '@jest/reporters': 29.7.0 + '@jest/test-result': 29.7.0 + '@jest/transform': 29.7.0 + '@jest/types': 29.6.3 + '@types/node': 20.17.6 + ansi-escapes: 4.3.2 + chalk: 4.1.2 + ci-info: 3.9.0 + exit: 0.1.2 + graceful-fs: 4.2.11 + jest-changed-files: 29.7.0 + jest-config: 29.7.0(@types/node@20.17.6)(ts-node@10.9.2(@types/node@20.17.6)(typescript@5.7.3)) + jest-haste-map: 29.7.0 + jest-message-util: 29.7.0 + jest-regex-util: 29.6.3 + jest-resolve: 29.7.0 + jest-resolve-dependencies: 29.7.0 + jest-runner: 29.7.0 + jest-runtime: 29.7.0 + jest-snapshot: 29.7.0 + jest-util: 29.7.0 + jest-validate: 29.7.0 + jest-watcher: 29.7.0 + micromatch: 4.0.8 + pretty-format: 29.7.0 + slash: 3.0.0 + strip-ansi: 6.0.1 + transitivePeerDependencies: + - babel-plugin-macros + - supports-color + - ts-node + + '@jest/environment@29.7.0': + dependencies: + '@jest/fake-timers': 29.7.0 + '@jest/types': 29.6.3 + '@types/node': 20.17.6 + jest-mock: 29.7.0 + + '@jest/expect-utils@29.7.0': + dependencies: + jest-get-type: 29.6.3 + + '@jest/expect@29.7.0': + dependencies: + expect: 29.7.0 + jest-snapshot: 29.7.0 + transitivePeerDependencies: + - supports-color + + '@jest/fake-timers@29.7.0': + dependencies: + '@jest/types': 29.6.3 + '@sinonjs/fake-timers': 10.3.0 + '@types/node': 20.17.6 + jest-message-util: 29.7.0 + jest-mock: 29.7.0 + jest-util: 29.7.0 + + '@jest/globals@29.7.0': + dependencies: + '@jest/environment': 29.7.0 + '@jest/expect': 29.7.0 + '@jest/types': 29.6.3 + jest-mock: 29.7.0 + transitivePeerDependencies: + - supports-color + + '@jest/reporters@29.7.0': + dependencies: + '@bcoe/v8-coverage': 0.2.3 + '@jest/console': 29.7.0 + '@jest/test-result': 29.7.0 + '@jest/transform': 29.7.0 + '@jest/types': 29.6.3 + '@jridgewell/trace-mapping': 0.3.25 + '@types/node': 20.17.6 + chalk: 4.1.2 + collect-v8-coverage: 1.0.2 + exit: 0.1.2 + glob: 7.2.3 + graceful-fs: 4.2.11 + istanbul-lib-coverage: 3.2.2 + istanbul-lib-instrument: 6.0.3 + istanbul-lib-report: 3.0.1 + istanbul-lib-source-maps: 4.0.1 + istanbul-reports: 3.1.7 + jest-message-util: 29.7.0 + jest-util: 29.7.0 + jest-worker: 29.7.0 + slash: 3.0.0 + string-length: 4.0.2 + strip-ansi: 6.0.1 + v8-to-istanbul: 9.3.0 + transitivePeerDependencies: + - supports-color + + '@jest/schemas@29.6.3': + dependencies: + '@sinclair/typebox': 0.27.8 + + '@jest/source-map@29.6.3': + dependencies: + '@jridgewell/trace-mapping': 0.3.25 + callsites: 3.1.0 + graceful-fs: 4.2.11 + + '@jest/test-result@29.7.0': + dependencies: + '@jest/console': 29.7.0 + '@jest/types': 29.6.3 + '@types/istanbul-lib-coverage': 2.0.6 + collect-v8-coverage: 1.0.2 + + '@jest/test-sequencer@29.7.0': + dependencies: + '@jest/test-result': 29.7.0 + graceful-fs: 4.2.11 + jest-haste-map: 29.7.0 + slash: 3.0.0 + + '@jest/transform@29.7.0': + dependencies: + '@babel/core': 7.26.9 + '@jest/types': 29.6.3 + '@jridgewell/trace-mapping': 0.3.25 + babel-plugin-istanbul: 6.1.1 + chalk: 4.1.2 + convert-source-map: 2.0.0 + fast-json-stable-stringify: 2.1.0 + graceful-fs: 4.2.11 + jest-haste-map: 29.7.0 + jest-regex-util: 29.6.3 + jest-util: 29.7.0 + micromatch: 4.0.8 + pirates: 4.0.6 + slash: 3.0.0 + write-file-atomic: 4.0.2 + transitivePeerDependencies: + - supports-color + + '@jest/types@29.6.3': + dependencies: + '@jest/schemas': 29.6.3 + '@types/istanbul-lib-coverage': 2.0.6 + '@types/istanbul-reports': 3.0.4 + '@types/node': 20.17.6 + '@types/yargs': 17.0.33 + chalk: 4.1.2 + + '@jridgewell/gen-mapping@0.3.8': + dependencies: + '@jridgewell/set-array': 1.2.1 + '@jridgewell/sourcemap-codec': 1.5.0 + '@jridgewell/trace-mapping': 0.3.25 + '@jridgewell/resolve-uri@3.1.2': {} + '@jridgewell/set-array@1.2.1': {} + '@jridgewell/sourcemap-codec@1.5.0': {} + '@jridgewell/trace-mapping@0.3.25': + dependencies: + '@jridgewell/resolve-uri': 3.1.2 + '@jridgewell/sourcemap-codec': 1.5.0 + '@jridgewell/trace-mapping@0.3.9': dependencies: '@jridgewell/resolve-uri': 3.1.2 @@ -3197,6 +4349,16 @@ snapshots: '@noble/hashes': 1.7.1 '@scure/base': 1.2.4 + '@sinclair/typebox@0.27.8': {} + + '@sinonjs/commons@3.0.1': + dependencies: + type-detect: 4.0.8 + + '@sinonjs/fake-timers@10.3.0': + dependencies: + '@sinonjs/commons': 3.0.1 + '@swc/counter@0.1.3': {} '@swc/helpers@0.5.15': @@ -3248,6 +4410,27 @@ snapshots: semver: 7.6.3 update-check: 1.5.4 + '@types/babel__core@7.20.5': + dependencies: + '@babel/parser': 7.26.9 + '@babel/types': 7.26.9 + '@types/babel__generator': 7.6.8 + '@types/babel__template': 7.4.4 + '@types/babel__traverse': 7.20.6 + + '@types/babel__generator@7.6.8': + dependencies: + '@babel/types': 7.26.9 + + '@types/babel__template@7.4.4': + dependencies: + '@babel/parser': 7.26.9 + '@babel/types': 7.26.9 + + '@types/babel__traverse@7.20.6': + dependencies: + '@babel/types': 7.26.9 + '@types/estree@1.0.6': {} '@types/glob@7.2.0': @@ -3255,11 +4438,30 @@ snapshots: '@types/minimatch': 5.1.2 '@types/node': 20.17.6 + '@types/graceful-fs@4.1.9': + dependencies: + '@types/node': 20.17.6 + '@types/inquirer@6.5.0': dependencies: '@types/through': 0.0.33 rxjs: 6.6.7 + '@types/istanbul-lib-coverage@2.0.6': {} + + '@types/istanbul-lib-report@3.0.3': + dependencies: + '@types/istanbul-lib-coverage': 2.0.6 + + '@types/istanbul-reports@3.0.4': + dependencies: + '@types/istanbul-lib-report': 3.0.3 + + '@types/jest@29.5.14': + dependencies: + expect: 29.7.0 + pretty-format: 29.7.0 + '@types/json-schema@7.0.15': {} '@types/minimatch@5.1.2': {} @@ -3294,6 +4496,8 @@ snapshots: '@types/prop-types': 15.7.13 csstype: 3.1.3 + '@types/stack-utils@2.0.3': {} + '@types/through@0.0.33': dependencies: '@types/node': 20.17.6 @@ -3388,10 +4592,6 @@ snapshots: '@typescript-eslint/types': 8.15.0 eslint-visitor-keys: 4.2.0 - abitype@1.0.8(typescript@5.5.4): - optionalDependencies: - typescript: 5.5.4 - abitype@1.0.8(typescript@5.7.3): optionalDependencies: typescript: 5.7.3 @@ -3440,6 +4640,8 @@ snapshots: dependencies: color-convert: 2.0.1 + ansi-styles@5.2.0: {} + anymatch@3.1.3: dependencies: normalize-path: 3.0.0 @@ -3515,16 +4717,73 @@ snapshots: dependencies: tslib: 2.8.1 + async@3.2.6: {} + available-typed-arrays@1.0.7: dependencies: possible-typed-array-names: 1.0.0 - balanced-match@1.0.2: {} - - base64-js@1.5.1: {} - - basic-ftp@5.0.5: {} - + babel-jest@29.7.0(@babel/core@7.26.9): + dependencies: + '@babel/core': 7.26.9 + '@jest/transform': 29.7.0 + '@types/babel__core': 7.20.5 + babel-plugin-istanbul: 6.1.1 + babel-preset-jest: 29.6.3(@babel/core@7.26.9) + chalk: 4.1.2 + graceful-fs: 4.2.11 + slash: 3.0.0 + transitivePeerDependencies: + - supports-color + + babel-plugin-istanbul@6.1.1: + dependencies: + '@babel/helper-plugin-utils': 7.26.5 + '@istanbuljs/load-nyc-config': 1.1.0 + '@istanbuljs/schema': 0.1.3 + istanbul-lib-instrument: 5.2.1 + test-exclude: 6.0.0 + transitivePeerDependencies: + - supports-color + + babel-plugin-jest-hoist@29.6.3: + dependencies: + '@babel/template': 7.26.9 + '@babel/types': 7.26.9 + '@types/babel__core': 7.20.5 + '@types/babel__traverse': 7.20.6 + + babel-preset-current-node-syntax@1.1.0(@babel/core@7.26.9): + dependencies: + '@babel/core': 7.26.9 + '@babel/plugin-syntax-async-generators': 7.8.4(@babel/core@7.26.9) + '@babel/plugin-syntax-bigint': 7.8.3(@babel/core@7.26.9) + '@babel/plugin-syntax-class-properties': 7.12.13(@babel/core@7.26.9) + '@babel/plugin-syntax-class-static-block': 7.14.5(@babel/core@7.26.9) + '@babel/plugin-syntax-import-attributes': 7.26.0(@babel/core@7.26.9) + '@babel/plugin-syntax-import-meta': 7.10.4(@babel/core@7.26.9) + '@babel/plugin-syntax-json-strings': 7.8.3(@babel/core@7.26.9) + '@babel/plugin-syntax-logical-assignment-operators': 7.10.4(@babel/core@7.26.9) + '@babel/plugin-syntax-nullish-coalescing-operator': 7.8.3(@babel/core@7.26.9) + '@babel/plugin-syntax-numeric-separator': 7.10.4(@babel/core@7.26.9) + '@babel/plugin-syntax-object-rest-spread': 7.8.3(@babel/core@7.26.9) + '@babel/plugin-syntax-optional-catch-binding': 7.8.3(@babel/core@7.26.9) + '@babel/plugin-syntax-optional-chaining': 7.8.3(@babel/core@7.26.9) + '@babel/plugin-syntax-private-property-in-object': 7.14.5(@babel/core@7.26.9) + '@babel/plugin-syntax-top-level-await': 7.14.5(@babel/core@7.26.9) + + babel-preset-jest@29.6.3(@babel/core@7.26.9): + dependencies: + '@babel/core': 7.26.9 + babel-plugin-jest-hoist: 29.6.3 + babel-preset-current-node-syntax: 1.1.0(@babel/core@7.26.9) + + balanced-match@1.0.2: {} + + base64-js@1.5.1: {} + + basic-ftp@5.0.5: {} + better-path-resolve@1.0.0: dependencies: is-windows: 1.0.2 @@ -3550,6 +4809,23 @@ snapshots: dependencies: fill-range: 7.1.1 + browserslist@4.24.4: + dependencies: + caniuse-lite: 1.0.30001701 + electron-to-chromium: 1.5.108 + node-releases: 2.0.19 + update-browserslist-db: 1.1.3(browserslist@4.24.4) + + bs-logger@0.2.6: + dependencies: + fast-json-stable-stringify: 2.1.0 + + bser@2.1.1: + dependencies: + node-int64: 0.4.0 + + buffer-from@1.1.2: {} + buffer@5.7.1: dependencies: base64-js: 1.5.1 @@ -3574,8 +4850,14 @@ snapshots: no-case: 2.3.2 upper-case: 1.1.3 + camelcase@5.3.1: {} + + camelcase@6.3.0: {} + caniuse-lite@1.0.30001683: {} + caniuse-lite@1.0.30001701: {} + chalk@2.4.2: dependencies: ansi-styles: 3.2.1 @@ -3613,6 +4895,8 @@ snapshots: upper-case: 1.1.3 upper-case-first: 1.1.2 + char-regex@1.0.2: {} + chardet@0.7.0: {} chokidar@3.6.0: @@ -3629,6 +4913,8 @@ snapshots: ci-info@3.9.0: {} + cjs-module-lexer@1.4.3: {} + clean-stack@2.2.0: {} cli-cursor@3.1.0: @@ -3649,6 +4935,10 @@ snapshots: clone@1.0.4: {} + co@4.6.0: {} + + collect-v8-coverage@1.0.2: {} + color-convert@1.9.3: dependencies: color-name: 1.1.3 @@ -3694,8 +4984,25 @@ snapshots: snake-case: 2.1.0 upper-case: 1.1.3 + convert-source-map@2.0.0: {} + core-js-pure@3.39.0: {} + create-jest@29.7.0(@types/node@20.17.6)(ts-node@10.9.2(@types/node@20.17.6)(typescript@5.7.3)): + dependencies: + '@jest/types': 29.6.3 + chalk: 4.1.2 + exit: 0.1.2 + graceful-fs: 4.2.11 + jest-config: 29.7.0(@types/node@20.17.6)(ts-node@10.9.2(@types/node@20.17.6)(typescript@5.7.3)) + jest-util: 29.7.0 + prompts: 2.4.2 + transitivePeerDependencies: + - '@types/node' + - babel-plugin-macros + - supports-color + - ts-node + create-require@1.1.1: {} cross-spawn@7.0.6: @@ -3736,10 +5043,14 @@ snapshots: optionalDependencies: supports-color: 5.5.0 + dedent@1.5.3: {} + deep-extend@0.6.0: {} deep-is@0.1.4: {} + deepmerge@4.3.1: {} + defaults@1.0.4: dependencies: clone: 1.0.4 @@ -3778,6 +5089,10 @@ snapshots: detect-libc@2.0.3: optional: true + detect-newline@3.1.0: {} + + diff-sequences@29.6.3: {} + diff@4.0.2: {} dir-glob@3.0.1: @@ -3794,6 +5109,14 @@ snapshots: dotenv@16.0.3: {} + ejs@3.1.10: + dependencies: + jake: 10.9.2 + + electron-to-chromium@1.5.108: {} + + emittery@0.13.1: {} + emoji-regex@8.0.0: {} enquirer@2.4.1: @@ -3801,6 +5124,10 @@ snapshots: ansi-colors: 4.1.3 strip-ansi: 6.0.1 + error-ex@1.3.2: + dependencies: + is-arrayish: 0.2.1 + es-abstract@1.23.5: dependencies: array-buffer-byte-length: 1.0.1 @@ -3926,6 +5253,8 @@ snapshots: escape-string-regexp@1.0.5: {} + escape-string-regexp@2.0.0: {} + escape-string-regexp@4.0.0: {} escodegen@2.1.0: @@ -4055,6 +5384,16 @@ snapshots: signal-exit: 3.0.7 strip-final-newline: 2.0.0 + exit@0.1.2: {} + + expect@29.7.0: + dependencies: + '@jest/expect-utils': 29.7.0 + jest-get-type: 29.6.3 + jest-matcher-utils: 29.7.0 + jest-message-util: 29.7.0 + jest-util: 29.7.0 + extendable-error@0.1.7: {} external-editor@3.1.0: @@ -4089,6 +5428,10 @@ snapshots: dependencies: reusify: 1.0.4 + fb-watchman@2.0.2: + dependencies: + bser: 2.1.1 + figures@3.2.0: dependencies: escape-string-regexp: 1.0.5 @@ -4097,6 +5440,10 @@ snapshots: dependencies: flat-cache: 4.0.1 + filelist@1.0.4: + dependencies: + minimatch: 5.1.6 + fill-range@7.1.1: dependencies: to-regex-range: 5.0.1 @@ -4162,6 +5509,8 @@ snapshots: functions-have-names@1.2.3: {} + gensync@1.0.0-beta.2: {} + get-caller-file@2.0.5: {} get-intrinsic@1.2.4: @@ -4172,6 +5521,8 @@ snapshots: has-symbols: 1.0.3 hasown: 2.0.2 + get-package-type@0.1.0: {} + get-stream@6.0.1: {} get-symbol-description@1.0.2: @@ -4206,6 +5557,8 @@ snapshots: once: 1.4.0 path-is-absolute: 1.0.1 + globals@11.12.0: {} + globals@14.0.0: {} globals@15.12.0: {} @@ -4284,6 +5637,8 @@ snapshots: no-case: 2.3.2 upper-case: 1.1.3 + html-escaper@2.0.2: {} + http-proxy-agent@7.0.2: dependencies: agent-base: 7.1.1 @@ -4319,6 +5674,11 @@ snapshots: parent-module: 1.0.1 resolve-from: 4.0.0 + import-local@3.2.0: + dependencies: + pkg-dir: 4.2.0 + resolve-cwd: 3.0.0 + imurmurhash@0.1.4: {} indent-string@4.0.0: {} @@ -4382,6 +5742,8 @@ snapshots: call-bind: 1.0.7 get-intrinsic: 1.2.4 + is-arrayish@0.2.1: {} + is-arrayish@0.3.2: optional: true @@ -4424,6 +5786,8 @@ snapshots: is-fullwidth-code-point@3.0.0: {} + is-generator-fn@2.1.0: {} + is-generator-function@1.0.10: dependencies: has-tostringtag: 1.0.2 @@ -4506,6 +5870,47 @@ snapshots: isexe@2.0.0: {} + istanbul-lib-coverage@3.2.2: {} + + istanbul-lib-instrument@5.2.1: + dependencies: + '@babel/core': 7.26.9 + '@babel/parser': 7.26.9 + '@istanbuljs/schema': 0.1.3 + istanbul-lib-coverage: 3.2.2 + semver: 6.3.1 + transitivePeerDependencies: + - supports-color + + istanbul-lib-instrument@6.0.3: + dependencies: + '@babel/core': 7.26.9 + '@babel/parser': 7.26.9 + '@istanbuljs/schema': 0.1.3 + istanbul-lib-coverage: 3.2.2 + semver: 7.6.3 + transitivePeerDependencies: + - supports-color + + istanbul-lib-report@3.0.1: + dependencies: + istanbul-lib-coverage: 3.2.2 + make-dir: 4.0.0 + supports-color: 7.2.0 + + istanbul-lib-source-maps@4.0.1: + dependencies: + debug: 4.3.7(supports-color@5.5.0) + istanbul-lib-coverage: 3.2.2 + source-map: 0.6.1 + transitivePeerDependencies: + - supports-color + + istanbul-reports@3.1.7: + dependencies: + html-escaper: 2.0.2 + istanbul-lib-report: 3.0.1 + iterator.prototype@1.1.3: dependencies: define-properties: 1.2.1 @@ -4514,6 +5919,322 @@ snapshots: reflect.getprototypeof: 1.0.6 set-function-name: 2.0.2 + jake@10.9.2: + dependencies: + async: 3.2.6 + chalk: 4.1.2 + filelist: 1.0.4 + minimatch: 3.1.2 + + jest-changed-files@29.7.0: + dependencies: + execa: 5.1.1 + jest-util: 29.7.0 + p-limit: 3.1.0 + + jest-circus@29.7.0: + dependencies: + '@jest/environment': 29.7.0 + '@jest/expect': 29.7.0 + '@jest/test-result': 29.7.0 + '@jest/types': 29.6.3 + '@types/node': 20.17.6 + chalk: 4.1.2 + co: 4.6.0 + dedent: 1.5.3 + is-generator-fn: 2.1.0 + jest-each: 29.7.0 + jest-matcher-utils: 29.7.0 + jest-message-util: 29.7.0 + jest-runtime: 29.7.0 + jest-snapshot: 29.7.0 + jest-util: 29.7.0 + p-limit: 3.1.0 + pretty-format: 29.7.0 + pure-rand: 6.1.0 + slash: 3.0.0 + stack-utils: 2.0.6 + transitivePeerDependencies: + - babel-plugin-macros + - supports-color + + jest-cli@29.7.0(@types/node@20.17.6)(ts-node@10.9.2(@types/node@20.17.6)(typescript@5.7.3)): + dependencies: + '@jest/core': 29.7.0(ts-node@10.9.2(@types/node@20.17.6)(typescript@5.7.3)) + '@jest/test-result': 29.7.0 + '@jest/types': 29.6.3 + chalk: 4.1.2 + create-jest: 29.7.0(@types/node@20.17.6)(ts-node@10.9.2(@types/node@20.17.6)(typescript@5.7.3)) + exit: 0.1.2 + import-local: 3.2.0 + jest-config: 29.7.0(@types/node@20.17.6)(ts-node@10.9.2(@types/node@20.17.6)(typescript@5.7.3)) + jest-util: 29.7.0 + jest-validate: 29.7.0 + yargs: 17.7.2 + transitivePeerDependencies: + - '@types/node' + - babel-plugin-macros + - supports-color + - ts-node + + jest-config@29.7.0(@types/node@20.17.6)(ts-node@10.9.2(@types/node@20.17.6)(typescript@5.7.3)): + dependencies: + '@babel/core': 7.26.9 + '@jest/test-sequencer': 29.7.0 + '@jest/types': 29.6.3 + babel-jest: 29.7.0(@babel/core@7.26.9) + chalk: 4.1.2 + ci-info: 3.9.0 + deepmerge: 4.3.1 + glob: 7.2.3 + graceful-fs: 4.2.11 + jest-circus: 29.7.0 + jest-environment-node: 29.7.0 + jest-get-type: 29.6.3 + jest-regex-util: 29.6.3 + jest-resolve: 29.7.0 + jest-runner: 29.7.0 + jest-util: 29.7.0 + jest-validate: 29.7.0 + micromatch: 4.0.8 + parse-json: 5.2.0 + pretty-format: 29.7.0 + slash: 3.0.0 + strip-json-comments: 3.1.1 + optionalDependencies: + '@types/node': 20.17.6 + ts-node: 10.9.2(@types/node@20.17.6)(typescript@5.7.3) + transitivePeerDependencies: + - babel-plugin-macros + - supports-color + + jest-diff@29.7.0: + dependencies: + chalk: 4.1.2 + diff-sequences: 29.6.3 + jest-get-type: 29.6.3 + pretty-format: 29.7.0 + + jest-docblock@29.7.0: + dependencies: + detect-newline: 3.1.0 + + jest-each@29.7.0: + dependencies: + '@jest/types': 29.6.3 + chalk: 4.1.2 + jest-get-type: 29.6.3 + jest-util: 29.7.0 + pretty-format: 29.7.0 + + jest-environment-node@29.7.0: + dependencies: + '@jest/environment': 29.7.0 + '@jest/fake-timers': 29.7.0 + '@jest/types': 29.6.3 + '@types/node': 20.17.6 + jest-mock: 29.7.0 + jest-util: 29.7.0 + + jest-get-type@29.6.3: {} + + jest-haste-map@29.7.0: + dependencies: + '@jest/types': 29.6.3 + '@types/graceful-fs': 4.1.9 + '@types/node': 20.17.6 + anymatch: 3.1.3 + fb-watchman: 2.0.2 + graceful-fs: 4.2.11 + jest-regex-util: 29.6.3 + jest-util: 29.7.0 + jest-worker: 29.7.0 + micromatch: 4.0.8 + walker: 1.0.8 + optionalDependencies: + fsevents: 2.3.3 + + jest-leak-detector@29.7.0: + dependencies: + jest-get-type: 29.6.3 + pretty-format: 29.7.0 + + jest-matcher-utils@29.7.0: + dependencies: + chalk: 4.1.2 + jest-diff: 29.7.0 + jest-get-type: 29.6.3 + pretty-format: 29.7.0 + + jest-message-util@29.7.0: + dependencies: + '@babel/code-frame': 7.26.2 + '@jest/types': 29.6.3 + '@types/stack-utils': 2.0.3 + chalk: 4.1.2 + graceful-fs: 4.2.11 + micromatch: 4.0.8 + pretty-format: 29.7.0 + slash: 3.0.0 + stack-utils: 2.0.6 + + jest-mock@29.7.0: + dependencies: + '@jest/types': 29.6.3 + '@types/node': 20.17.6 + jest-util: 29.7.0 + + jest-pnp-resolver@1.2.3(jest-resolve@29.7.0): + optionalDependencies: + jest-resolve: 29.7.0 + + jest-regex-util@29.6.3: {} + + jest-resolve-dependencies@29.7.0: + dependencies: + jest-regex-util: 29.6.3 + jest-snapshot: 29.7.0 + transitivePeerDependencies: + - supports-color + + jest-resolve@29.7.0: + dependencies: + chalk: 4.1.2 + graceful-fs: 4.2.11 + jest-haste-map: 29.7.0 + jest-pnp-resolver: 1.2.3(jest-resolve@29.7.0) + jest-util: 29.7.0 + jest-validate: 29.7.0 + resolve: 1.22.8 + resolve.exports: 2.0.3 + slash: 3.0.0 + + jest-runner@29.7.0: + dependencies: + '@jest/console': 29.7.0 + '@jest/environment': 29.7.0 + '@jest/test-result': 29.7.0 + '@jest/transform': 29.7.0 + '@jest/types': 29.6.3 + '@types/node': 20.17.6 + chalk: 4.1.2 + emittery: 0.13.1 + graceful-fs: 4.2.11 + jest-docblock: 29.7.0 + jest-environment-node: 29.7.0 + jest-haste-map: 29.7.0 + jest-leak-detector: 29.7.0 + jest-message-util: 29.7.0 + jest-resolve: 29.7.0 + jest-runtime: 29.7.0 + jest-util: 29.7.0 + jest-watcher: 29.7.0 + jest-worker: 29.7.0 + p-limit: 3.1.0 + source-map-support: 0.5.13 + transitivePeerDependencies: + - supports-color + + jest-runtime@29.7.0: + dependencies: + '@jest/environment': 29.7.0 + '@jest/fake-timers': 29.7.0 + '@jest/globals': 29.7.0 + '@jest/source-map': 29.6.3 + '@jest/test-result': 29.7.0 + '@jest/transform': 29.7.0 + '@jest/types': 29.6.3 + '@types/node': 20.17.6 + chalk: 4.1.2 + cjs-module-lexer: 1.4.3 + collect-v8-coverage: 1.0.2 + glob: 7.2.3 + graceful-fs: 4.2.11 + jest-haste-map: 29.7.0 + jest-message-util: 29.7.0 + jest-mock: 29.7.0 + jest-regex-util: 29.6.3 + jest-resolve: 29.7.0 + jest-snapshot: 29.7.0 + jest-util: 29.7.0 + slash: 3.0.0 + strip-bom: 4.0.0 + transitivePeerDependencies: + - supports-color + + jest-snapshot@29.7.0: + dependencies: + '@babel/core': 7.26.9 + '@babel/generator': 7.26.9 + '@babel/plugin-syntax-jsx': 7.25.9(@babel/core@7.26.9) + '@babel/plugin-syntax-typescript': 7.25.9(@babel/core@7.26.9) + '@babel/types': 7.26.9 + '@jest/expect-utils': 29.7.0 + '@jest/transform': 29.7.0 + '@jest/types': 29.6.3 + babel-preset-current-node-syntax: 1.1.0(@babel/core@7.26.9) + chalk: 4.1.2 + expect: 29.7.0 + graceful-fs: 4.2.11 + jest-diff: 29.7.0 + jest-get-type: 29.6.3 + jest-matcher-utils: 29.7.0 + jest-message-util: 29.7.0 + jest-util: 29.7.0 + natural-compare: 1.4.0 + pretty-format: 29.7.0 + semver: 7.6.3 + transitivePeerDependencies: + - supports-color + + jest-util@29.7.0: + dependencies: + '@jest/types': 29.6.3 + '@types/node': 20.17.6 + chalk: 4.1.2 + ci-info: 3.9.0 + graceful-fs: 4.2.11 + picomatch: 2.3.1 + + jest-validate@29.7.0: + dependencies: + '@jest/types': 29.6.3 + camelcase: 6.3.0 + chalk: 4.1.2 + jest-get-type: 29.6.3 + leven: 3.1.0 + pretty-format: 29.7.0 + + jest-watcher@29.7.0: + dependencies: + '@jest/test-result': 29.7.0 + '@jest/types': 29.6.3 + '@types/node': 20.17.6 + ansi-escapes: 4.3.2 + chalk: 4.1.2 + emittery: 0.13.1 + jest-util: 29.7.0 + string-length: 4.0.2 + + jest-worker@29.7.0: + dependencies: + '@types/node': 20.17.6 + jest-util: 29.7.0 + merge-stream: 2.0.0 + supports-color: 8.1.1 + + jest@29.7.0(@types/node@20.17.6)(ts-node@10.9.2(@types/node@20.17.6)(typescript@5.7.3)): + dependencies: + '@jest/core': 29.7.0(ts-node@10.9.2(@types/node@20.17.6)(typescript@5.7.3)) + '@jest/types': 29.6.3 + import-local: 3.2.0 + jest-cli: 29.7.0(@types/node@20.17.6)(ts-node@10.9.2(@types/node@20.17.6)(typescript@5.7.3)) + transitivePeerDependencies: + - '@types/node' + - babel-plugin-macros + - supports-color + - ts-node + js-tokens@4.0.0: {} js-yaml@3.14.1: @@ -4527,12 +6248,18 @@ snapshots: jsbn@1.1.0: {} + jsesc@3.1.0: {} + json-buffer@3.0.1: {} + json-parse-even-better-errors@2.3.1: {} + json-schema-traverse@0.4.1: {} json-stable-stringify-without-jsonify@1.0.1: {} + json5@2.2.3: {} + jsonfile@4.0.0: optionalDependencies: graceful-fs: 4.2.11 @@ -4556,6 +6283,8 @@ snapshots: dependencies: json-buffer: 3.0.1 + kleur@3.0.3: {} + lefthook-darwin-arm64@1.10.10: optional: true @@ -4599,11 +6328,15 @@ snapshots: lefthook-windows-arm64: 1.10.10 lefthook-windows-x64: 1.10.10 + leven@3.1.0: {} + levn@0.4.1: dependencies: prelude-ls: 1.2.1 type-check: 0.4.0 + lines-and-columns@1.2.4: {} + locate-path@5.0.0: dependencies: p-locate: 4.1.0 @@ -4614,6 +6347,8 @@ snapshots: lodash.get@4.4.2: {} + lodash.memoize@4.1.2: {} + lodash.merge@4.6.2: {} lodash.startcase@4.4.0: {} @@ -4639,10 +6374,22 @@ snapshots: lower-case@1.1.4: {} + lru-cache@5.1.1: + dependencies: + yallist: 3.1.1 + lru-cache@7.18.3: {} + make-dir@4.0.0: + dependencies: + semver: 7.6.3 + make-error@1.3.6: {} + makeerror@1.0.12: + dependencies: + tmpl: 1.0.5 + merge-stream@2.0.0: {} merge2@1.4.1: {} @@ -4658,6 +6405,10 @@ snapshots: dependencies: brace-expansion: 1.1.11 + minimatch@5.1.6: + dependencies: + brace-expansion: 2.0.1 + minimatch@9.0.5: dependencies: brace-expansion: 2.0.1 @@ -4711,6 +6462,8 @@ snapshots: dependencies: lower-case: 1.1.4 + node-int64@0.4.0: {} + node-plop@0.26.3: dependencies: '@babel/runtime-corejs3': 7.26.0 @@ -4725,6 +6478,8 @@ snapshots: mkdirp: 0.5.6 resolve: 1.22.8 + node-releases@2.0.19: {} + nodemon@3.1.9: dependencies: chokidar: 3.6.0 @@ -4820,20 +6575,6 @@ snapshots: outdent@0.5.0: {} - ox@0.6.7(typescript@5.5.4): - dependencies: - '@adraffy/ens-normalize': 1.11.0 - '@noble/curves': 1.8.1 - '@noble/hashes': 1.7.1 - '@scure/bip32': 1.6.2 - '@scure/bip39': 1.5.4 - abitype: 1.0.8(typescript@5.5.4) - eventemitter3: 5.0.1 - optionalDependencies: - typescript: 5.5.4 - transitivePeerDependencies: - - zod - ox@0.6.7(typescript@5.7.3): dependencies: '@adraffy/ens-normalize': 1.11.0 @@ -4904,6 +6645,13 @@ snapshots: dependencies: callsites: 3.1.0 + parse-json@5.2.0: + dependencies: + '@babel/code-frame': 7.26.2 + error-ex: 1.3.2 + json-parse-even-better-errors: 2.3.1 + lines-and-columns: 1.2.4 + pascal-case@2.0.1: dependencies: camel-case: 3.0.0 @@ -4929,6 +6677,12 @@ snapshots: pify@4.0.1: {} + pirates@4.0.6: {} + + pkg-dir@4.2.0: + dependencies: + find-up: 4.1.0 + possible-typed-array-names@1.0.0: {} postcss@8.4.31: @@ -4943,6 +6697,17 @@ snapshots: prettier@3.3.3: {} + pretty-format@29.7.0: + dependencies: + '@jest/schemas': 29.6.3 + ansi-styles: 5.2.0 + react-is: 18.3.1 + + prompts@2.4.2: + dependencies: + kleur: 3.0.3 + sisteransi: 1.0.5 + prop-types@15.8.1: dependencies: loose-envify: 1.4.0 @@ -4968,6 +6733,8 @@ snapshots: punycode@2.3.1: {} + pure-rand@6.1.0: {} + queue-microtask@1.2.3: {} rc@1.2.8: @@ -4984,6 +6751,8 @@ snapshots: react-is@16.13.1: {} + react-is@18.3.1: {} + react@19.0.0: {} read-yaml-file@1.1.0: @@ -5033,10 +6802,16 @@ snapshots: require-directory@2.1.1: {} + resolve-cwd@3.0.0: + dependencies: + resolve-from: 5.0.0 + resolve-from@4.0.0: {} resolve-from@5.0.0: {} + resolve.exports@2.0.3: {} + resolve@1.22.8: dependencies: is-core-module: 2.15.1 @@ -5097,6 +6872,8 @@ snapshots: semver@7.6.3: {} + semver@7.7.1: {} + sentence-case@2.1.1: dependencies: no-case: 2.3.2 @@ -5173,6 +6950,8 @@ snapshots: dependencies: semver: 7.6.3 + sisteransi@1.0.5: {} + slash@3.0.0: {} smart-buffer@4.2.0: {} @@ -5196,6 +6975,11 @@ snapshots: source-map-js@1.2.1: {} + source-map-support@0.5.13: + dependencies: + buffer-from: 1.1.2 + source-map: 0.6.1 + source-map@0.6.1: {} spawn-command@0.0.2: {} @@ -5209,8 +6993,17 @@ snapshots: sprintf-js@1.1.3: {} + stack-utils@2.0.6: + dependencies: + escape-string-regexp: 2.0.0 + streamsearch@1.1.0: {} + string-length@4.0.2: + dependencies: + char-regex: 1.0.2 + strip-ansi: 6.0.1 + string-width@4.2.3: dependencies: emoji-regex: 8.0.0 @@ -5266,6 +7059,8 @@ snapshots: strip-bom@3.0.0: {} + strip-bom@4.0.0: {} + strip-final-newline@2.0.0: {} strip-json-comments@2.0.1: {} @@ -5298,6 +7093,12 @@ snapshots: term-size@2.2.1: {} + test-exclude@6.0.0: + dependencies: + '@istanbuljs/schema': 0.1.3 + glob: 7.2.3 + minimatch: 3.1.2 + through@2.3.8: {} tinycolor2@1.6.0: {} @@ -5316,6 +7117,8 @@ snapshots: dependencies: os-tmpdir: 1.0.2 + tmpl@1.0.5: {} + to-regex-range@5.0.1: dependencies: is-number: 7.0.0 @@ -5328,6 +7131,25 @@ snapshots: dependencies: typescript: 5.5.4 + ts-jest@29.2.6(@babel/core@7.26.9)(@jest/transform@29.7.0)(@jest/types@29.6.3)(babel-jest@29.7.0(@babel/core@7.26.9))(jest@29.7.0(@types/node@20.17.6)(ts-node@10.9.2(@types/node@20.17.6)(typescript@5.7.3)))(typescript@5.7.3): + dependencies: + bs-logger: 0.2.6 + ejs: 3.1.10 + fast-json-stable-stringify: 2.1.0 + jest: 29.7.0(@types/node@20.17.6)(ts-node@10.9.2(@types/node@20.17.6)(typescript@5.7.3)) + jest-util: 29.7.0 + json5: 2.2.3 + lodash.memoize: 4.1.2 + make-error: 1.3.6 + semver: 7.7.1 + typescript: 5.7.3 + yargs-parser: 21.1.1 + optionalDependencies: + '@babel/core': 7.26.9 + '@jest/transform': 29.7.0 + '@jest/types': 29.6.3 + babel-jest: 29.7.0(@babel/core@7.26.9) + ts-node@10.9.2(@types/node@20.17.6)(typescript@5.5.4): dependencies: '@cspotcode/source-map-support': 0.8.1 @@ -5346,6 +7168,25 @@ snapshots: v8-compile-cache-lib: 3.0.1 yn: 3.1.1 + ts-node@10.9.2(@types/node@20.17.6)(typescript@5.7.3): + dependencies: + '@cspotcode/source-map-support': 0.8.1 + '@tsconfig/node10': 1.0.11 + '@tsconfig/node12': 1.0.11 + '@tsconfig/node14': 1.0.3 + '@tsconfig/node16': 1.0.4 + '@types/node': 20.17.6 + acorn: 8.14.0 + acorn-walk: 8.3.4 + arg: 4.1.3 + create-require: 1.1.1 + diff: 4.0.2 + make-error: 1.3.6 + typescript: 5.7.3 + v8-compile-cache-lib: 3.0.1 + yn: 3.1.1 + optional: true + tslib@1.14.1: {} tslib@2.8.1: {} @@ -5381,6 +7222,8 @@ snapshots: dependencies: prelude-ls: 1.2.1 + type-detect@4.0.8: {} + type-fest@0.21.3: {} typed-array-buffer@1.0.2: @@ -5451,6 +7294,12 @@ snapshots: universalify@2.0.1: {} + update-browserslist-db@1.1.3(browserslist@4.24.4): + dependencies: + browserslist: 4.24.4 + escalade: 3.2.0 + picocolors: 1.1.1 + update-check@1.5.4: dependencies: registry-auth-token: 3.3.2 @@ -5470,8 +7319,18 @@ snapshots: v8-compile-cache-lib@3.0.1: {} + v8-to-istanbul@9.3.0: + dependencies: + '@jridgewell/trace-mapping': 0.3.25 + '@types/istanbul-lib-coverage': 2.0.6 + convert-source-map: 2.0.0 + validate-npm-package-name@5.0.1: {} + walker@1.0.8: + dependencies: + makeerror: 1.0.12 + wcwidth@1.0.1: dependencies: defaults: 1.0.4 @@ -5536,8 +7395,15 @@ snapshots: wrappy@1.0.2: {} + write-file-atomic@4.0.2: + dependencies: + imurmurhash: 0.1.4 + signal-exit: 3.0.7 + y18n@5.0.8: {} + yallist@3.1.1: {} + yargs-parser@21.1.1: {} yargs@17.7.2: diff --git a/pnpm-workspace.yaml b/pnpm-workspace.yaml index 3ff5faaaf..64a8b98cb 100644 --- a/pnpm-workspace.yaml +++ b/pnpm-workspace.yaml @@ -1,3 +1,4 @@ packages: - "apps/*" - "packages/*" + - "test/*" diff --git a/turbo.json b/turbo.json index 8a879904e..e345eb059 100644 --- a/turbo.json +++ b/turbo.json @@ -16,6 +16,16 @@ "dev": { "cache": false, "persistent": true + }, + "test": { + "dependsOn": ["^build"], + "inputs": [ + "packages/**/*.tsx", + "packages/**/*.ts", + "test/**/*.ts", + "test/**/*.tsx" + ], + "outputs": [] } } } From 72840ce260370ded17a44e10589ecc001cc36f94 Mon Sep 17 00:00:00 2001 From: Michael Standen Date: Tue, 4 Mar 2025 09:24:14 +1300 Subject: [PATCH 163/439] Add test command --- README.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/README.md b/README.md index 0876c8c6c..91739ac48 100644 --- a/README.md +++ b/README.md @@ -21,6 +21,9 @@ - Run development mode across all packages: `pnpm dev` +- Run tests: + `pnpm test` + - Linting and formatting is enforced via git hooks ## License From 5bd9a3d34c471c5b10a52f099783c134af63ee9c Mon Sep 17 00:00:00 2001 From: Michael Standen Date: Tue, 4 Mar 2025 09:25:35 +1300 Subject: [PATCH 164/439] Tests in ci don't wait on build --- .github/workflows/ci.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5f7d04eb3..52e8c798c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -30,7 +30,6 @@ jobs: run: pnpm build test: - needs: build runs-on: ubuntu-latest steps: From 5e32473d026b21141854c7b3f5b06a2caab6338c Mon Sep 17 00:00:00 2001 From: William Hua Date: Tue, 4 Mar 2025 10:34:42 -0500 Subject: [PATCH 165/439] primitives: fix json stringification for r and s --- packages/primitives/src/signature.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/primitives/src/signature.ts b/packages/primitives/src/signature.ts index 201c9028a..6aee2af80 100644 --- a/packages/primitives/src/signature.ts +++ b/packages/primitives/src/signature.ts @@ -948,8 +948,8 @@ function rawSignatureOfLeafToJson(sig: SignatureOfSignerLeaf | SignatureOfSapien if (sig.type === 'eth_sign' || sig.type === 'hash') { return { type: sig.type, - r: sig.r, - s: sig.s, + r: Hex.fromNumber(sig.r, { size: 32 }), + s: Hex.fromNumber(sig.s, { size: 32 }), yParity: sig.yParity, } } @@ -1052,8 +1052,8 @@ function rawSignatureOfLeafFromJson(obj: any): SignatureOfSignerLeaf | Signature case 'hash': return { type: obj.type, - r: obj.r, - s: obj.s, + r: Hex.toBigInt(obj.r), + s: Hex.toBigInt(obj.s), yParity: obj.yParity, } case 'erc1271': From f290c7773eead9ee181f25fe41b3759973b9ea48 Mon Sep 17 00:00:00 2001 From: Agusx1211 Date: Tue, 4 Mar 2025 17:08:36 +0000 Subject: [PATCH 166/439] Move passkey to primitives --- packages/core/src/signers/passkey.ts | 98 ++---------- packages/core/src/state/local/index.ts | 23 ++- .../{extensions.ts => extensions/index.ts} | 2 + .../primitives/src/extensions/passkeys.ts | 149 ++++++++++++++++++ 4 files changed, 186 insertions(+), 86 deletions(-) rename packages/primitives/src/{extensions.ts => extensions/index.ts} (81%) create mode 100644 packages/primitives/src/extensions/passkeys.ts diff --git a/packages/core/src/signers/passkey.ts b/packages/core/src/signers/passkey.ts index 59f72609c..919206170 100644 --- a/packages/core/src/signers/passkey.ts +++ b/packages/core/src/signers/passkey.ts @@ -2,83 +2,13 @@ import { Hex, Bytes, Address } from 'ox' import { Signer } from '../wallet' import { Payload, Extensions } from '@0xsequence/sequence-primitives' import type { Signature as SignatureTypes } from '@0xsequence/sequence-primitives' -import { keccak256 } from 'ox/Hash' import { WebAuthnP256 } from 'ox' export type PasskeyOptions = { extensions: Pick - - x: Hex.Hex - y: Hex.Hex + publicKey: Extensions.Passkeys.PublicKey credentialId: string - requireUserVerification: boolean -} - -export type PasskeySignerConnector = ( - challenge: Bytes.Bytes, - credentialId: Hex.Hex, -) => Promise - -function _rootForPasskey(requireUserVerification: boolean, x: Hex.Hex, y: Hex.Hex): Hex.Hex { - const a = keccak256(Bytes.concat(Bytes.padLeft(Bytes.fromHex(x), 32), Bytes.padLeft(Bytes.fromHex(y), 32))) - const b = Bytes.padLeft(requireUserVerification ? Bytes.from([1]) : Bytes.from([0]), 32) - return Hex.fromBytes(keccak256(Bytes.concat(b, a))) -} - -function _encodeSignature( - requireUserVerification: boolean, - r: Bytes.Bytes, - s: Bytes.Bytes, - authenticatorData: Bytes.Bytes, - clientDataJSON: string, - x: Bytes.Bytes, - y: Bytes.Bytes, -): Bytes.Bytes { - const challengeIndex = clientDataJSON.indexOf('"challenge"') - const typeIndex = clientDataJSON.indexOf('"type"') - - const authDataSize = authenticatorData.length - const clientDataJSONSize = clientDataJSON.length - - if (authDataSize > 65535) { - throw new Error('Authenticator data size is too large') - } - if (clientDataJSONSize > 65535) { - throw new Error('Client data JSON size is too large') - } - - const bytesAuthDataSize = authDataSize <= 255 ? 1 : 2 - const bytesClientDataJSONSize = clientDataJSONSize <= 255 ? 1 : 2 - const bytesChallengeIndex = challengeIndex <= 255 ? 1 : 2 - const bytesTypeIndex = typeIndex <= 255 ? 1 : 2 - - let flags = 0 - - flags |= requireUserVerification ? 1 : 0 // 0x01 bit - flags |= (bytesAuthDataSize - 1) << 1 // 0x02 bit - flags |= (bytesClientDataJSONSize - 1) << 2 // 0x04 bit - flags |= (bytesChallengeIndex - 1) << 3 // 0x08 bit - flags |= (bytesTypeIndex - 1) << 4 // 0x10 bit - - let result: Bytes.Bytes = Bytes.from([flags]) - - result = Bytes.concat(result, Bytes.padLeft(Bytes.fromNumber(authDataSize), bytesAuthDataSize)) - result = Bytes.concat(result, authenticatorData) - - result = Bytes.concat(result, Bytes.padLeft(Bytes.fromNumber(clientDataJSONSize), bytesClientDataJSONSize)) - result = Bytes.concat(result, Bytes.from(new TextEncoder().encode(clientDataJSON))) - - result = Bytes.concat(result, Bytes.padLeft(Bytes.fromNumber(challengeIndex), bytesChallengeIndex)) - result = Bytes.concat(result, Bytes.padLeft(Bytes.fromNumber(typeIndex), bytesTypeIndex)) - - result = Bytes.concat(result, Bytes.padLeft(r, 32)) - result = Bytes.concat(result, Bytes.padLeft(s, 32)) - - result = Bytes.concat(result, x) - result = Bytes.concat(result, y) - - return result } export class Passkey implements Signer { @@ -86,7 +16,7 @@ export class Passkey implements Signer { public readonly rootHash: Hex.Hex constructor(public readonly options: PasskeyOptions) { - this.rootHash = _rootForPasskey(options.requireUserVerification, options.x, options.y) + this.rootHash = Extensions.Passkeys.rootFor(options.publicKey) this.address = options.extensions.passkeys } @@ -109,10 +39,12 @@ export class Passkey implements Signer { return new Passkey({ credentialId: credential.id, - requireUserVerification: options.requireUserVerification, extensions, - x, - y, + publicKey: { + requireUserVerification: options.requireUserVerification, + x, + y, + }, }) } @@ -132,22 +64,20 @@ export class Passkey implements Signer { const response = await WebAuthnP256.sign({ challenge, credentialId: this.options.credentialId, - userVerification: this.options.requireUserVerification ? 'required' : 'discouraged', + userVerification: this.options.publicKey.requireUserVerification ? 'required' : 'discouraged', }) const authenticatorData = Bytes.fromHex(response.metadata.authenticatorData) const rBytes = Bytes.fromNumber(response.signature.r) const sBytes = Bytes.fromNumber(response.signature.s) - const signature = _encodeSignature( - this.options.requireUserVerification, - rBytes, - sBytes, + const signature = Extensions.Passkeys.encode({ + publicKey: this.options.publicKey, + r: rBytes, + s: sBytes, authenticatorData, - response.metadata.clientDataJSON, - Bytes.fromHex(this.options.x), - Bytes.fromHex(this.options.y), - ) + clientDataJSON: response.metadata.clientDataJSON, + }) return { address: this.address, diff --git a/packages/core/src/state/local/index.ts b/packages/core/src/state/local/index.ts index d3f73b120..cd03e9833 100644 --- a/packages/core/src/state/local/index.ts +++ b/packages/core/src/state/local/index.ts @@ -1,4 +1,11 @@ -import { Context, Payload, Signature, WalletConfig, Address as SequenceAddress } from '@0xsequence/sequence-primitives' +import { + Context, + Payload, + Signature, + WalletConfig, + Address as SequenceAddress, + Extensions, +} from '@0xsequence/sequence-primitives' import { Address, Bytes, Hex, PersonalMessage, Secp256k1 } from 'ox' import { Provider as ProviderInterface } from '..' import { MemoryStore } from './memory' @@ -37,7 +44,10 @@ export interface Store { } export class Provider implements ProviderInterface { - constructor(private readonly store: Store = new MemoryStore()) {} + constructor( + private readonly store: Store = new MemoryStore(), + public readonly extensions: Extensions.Extensions = Extensions.Dev1, + ) {} getConfiguration(imageHash: Hex.Hex): Promise { return this.store.loadConfig(imageHash) @@ -280,6 +290,15 @@ export class Provider implements ProviderInterface { return this.store.saveSignatureOfSubdigest(address, Hex.fromBytes(subdigest), topology.signature) } } + + if (Signature.isSignedSapientSignerLeaf(topology)) { + switch (topology.address.toLowerCase()) { + case this.extensions.passkeys.toLowerCase(): + + default: + throw new Error(`Unsupported sapient signer: ${topology.address}`) + } + } } await walk(signature.configuration.topology) diff --git a/packages/primitives/src/extensions.ts b/packages/primitives/src/extensions/index.ts similarity index 81% rename from packages/primitives/src/extensions.ts rename to packages/primitives/src/extensions/index.ts index 55038913a..5ef02dd7c 100644 --- a/packages/primitives/src/extensions.ts +++ b/packages/primitives/src/extensions/index.ts @@ -7,3 +7,5 @@ export type Extensions = { export const Dev1: Extensions = { passkeys: '0x48D39130812Dc0F49C7E10Aa42503B5d76057f1a', } + +export * as Passkeys from './passkeys' diff --git a/packages/primitives/src/extensions/passkeys.ts b/packages/primitives/src/extensions/passkeys.ts new file mode 100644 index 000000000..6ef28351d --- /dev/null +++ b/packages/primitives/src/extensions/passkeys.ts @@ -0,0 +1,149 @@ +import { Bytes, Hex, WebAuthnP256 } from 'ox' +import { keccak256 } from 'ox/Hash' + +export type PublicKey = { + requireUserVerification: boolean + x: Hex.Hex + y: Hex.Hex +} + +export function rootFor(publicKey: PublicKey): Hex.Hex { + const a = keccak256( + Bytes.concat(Bytes.padLeft(Bytes.fromHex(publicKey.x), 32), Bytes.padLeft(Bytes.fromHex(publicKey.y), 32)), + ) + const b = Bytes.padLeft(publicKey.requireUserVerification ? Bytes.from([1]) : Bytes.from([0]), 32) + return Hex.fromBytes(keccak256(Bytes.concat(b, a))) +} + +export type DecodedSignature = { + publicKey: PublicKey + r: Bytes.Bytes + s: Bytes.Bytes + authenticatorData: Bytes.Bytes + clientDataJSON: string +} + +export function encode(decoded: DecodedSignature): Bytes.Bytes { + const challengeIndex = decoded.clientDataJSON.indexOf('"challenge"') + const typeIndex = decoded.clientDataJSON.indexOf('"type"') + + const authDataSize = decoded.authenticatorData.length + const clientDataJSONSize = decoded.clientDataJSON.length + + if (authDataSize > 65535) { + throw new Error('Authenticator data size is too large') + } + if (clientDataJSONSize > 65535) { + throw new Error('Client data JSON size is too large') + } + + const bytesAuthDataSize = authDataSize <= 255 ? 1 : 2 + const bytesClientDataJSONSize = clientDataJSONSize <= 255 ? 1 : 2 + const bytesChallengeIndex = challengeIndex <= 255 ? 1 : 2 + const bytesTypeIndex = typeIndex <= 255 ? 1 : 2 + + let flags = 0 + + flags |= decoded.publicKey.requireUserVerification ? 1 : 0 // 0x01 bit + flags |= (bytesAuthDataSize - 1) << 1 // 0x02 bit + flags |= (bytesClientDataJSONSize - 1) << 2 // 0x04 bit + flags |= (bytesChallengeIndex - 1) << 3 // 0x08 bit + flags |= (bytesTypeIndex - 1) << 4 // 0x10 bit + + let result: Bytes.Bytes = Bytes.from([flags]) + + result = Bytes.concat(result, Bytes.padLeft(Bytes.fromNumber(authDataSize), bytesAuthDataSize)) + result = Bytes.concat(result, decoded.authenticatorData) + + result = Bytes.concat(result, Bytes.padLeft(Bytes.fromNumber(decoded.clientDataJSON.length), bytesClientDataJSONSize)) + result = Bytes.concat(result, Bytes.from(new TextEncoder().encode(decoded.clientDataJSON))) + + result = Bytes.concat(result, Bytes.padLeft(Bytes.fromNumber(challengeIndex), bytesChallengeIndex)) + result = Bytes.concat(result, Bytes.padLeft(Bytes.fromNumber(typeIndex), bytesTypeIndex)) + + result = Bytes.concat(result, Bytes.padLeft(decoded.r, 32)) + result = Bytes.concat(result, Bytes.padLeft(decoded.s, 32)) + + result = Bytes.concat(result, Bytes.fromHex(decoded.publicKey.x)) + result = Bytes.concat(result, Bytes.fromHex(decoded.publicKey.y)) + + return result +} + +export function isValidSignature(challenge: Hex.Hex, decoded: DecodedSignature): boolean { + return WebAuthnP256.verify({ + challenge, + publicKey: { + x: Hex.toBigInt(decoded.publicKey.x), + y: Hex.toBigInt(decoded.publicKey.y), + prefix: 4, + }, + metadata: { + authenticatorData: Hex.fromBytes(decoded.authenticatorData), + challengeIndex: decoded.clientDataJSON.indexOf('"challenge"'), + clientDataJSON: decoded.clientDataJSON, + typeIndex: decoded.clientDataJSON.indexOf('"type"'), + userVerificationRequired: decoded.publicKey.requireUserVerification, + }, + signature: { + r: Bytes.toBigInt(decoded.r), + s: Bytes.toBigInt(decoded.s), + }, + }) +} + +export function decode(data: Bytes.Bytes): DecodedSignature & { challengeIndex: number; typeIndex: number } { + let offset = 0 + + const flags = data[0] + offset += 1 + + if (flags === undefined) { + throw new Error('Invalid flags') + } + + const requireUserVerification = (flags & 0x01) === 0x01 + const bytesAuthDataSize = ((flags >> 1) & 0x01) + 1 + const bytesClientDataJSONSize = ((flags >> 2) & 0x01) + 1 + const bytesChallengeIndex = ((flags >> 3) & 0x01) + 1 + const bytesTypeIndex = ((flags >> 4) & 0x01) + 1 + + const authDataSize = Bytes.toNumber(Bytes.slice(data, offset, offset + bytesAuthDataSize)) + offset += bytesAuthDataSize + const authenticatorData = Bytes.slice(data, offset, offset + authDataSize) + offset += authDataSize + + const clientDataJSONSize = Bytes.toNumber(Bytes.slice(data, offset, offset + bytesClientDataJSONSize)) + offset += bytesClientDataJSONSize + const clientDataJSONBytes = Bytes.slice(data, offset, offset + clientDataJSONSize) + offset += clientDataJSONSize + const clientDataJSON = new TextDecoder().decode(clientDataJSONBytes) + + const challengeIndex = Bytes.toNumber(Bytes.slice(data, offset, offset + bytesChallengeIndex)) + offset += bytesChallengeIndex + const typeIndex = Bytes.toNumber(Bytes.slice(data, offset, offset + bytesTypeIndex)) + offset += bytesTypeIndex + + const r = Bytes.slice(data, offset, offset + 32) + offset += 32 + const s = Bytes.slice(data, offset, offset + 32) + offset += 32 + + const xBytes = Bytes.slice(data, offset, offset + 32) + offset += 32 + const yBytes = Bytes.slice(data, offset, offset + 32) + + return { + publicKey: { + requireUserVerification, + x: Hex.fromBytes(xBytes), + y: Hex.fromBytes(yBytes), + }, + r, + s, + authenticatorData, + clientDataJSON, + challengeIndex, + typeIndex, + } +} From a4774fa36d0b251ed097ff8ccf6907052dcad674 Mon Sep 17 00:00:00 2001 From: Agusx1211 Date: Tue, 4 Mar 2025 18:58:52 +0000 Subject: [PATCH 167/439] Add sapient signer support to local state --- packages/core/src/state/index.ts | 2 +- packages/core/src/state/local/index.ts | 121 ++++++++++++++++------- packages/core/src/state/local/memory.ts | 42 +++++++- packages/primitives/src/signature.ts | 10 ++ packages/primitives/src/wallet-config.ts | 7 +- 5 files changed, 142 insertions(+), 40 deletions(-) diff --git a/packages/core/src/state/index.ts b/packages/core/src/state/index.ts index b6b5a3b56..a7274d648 100644 --- a/packages/core/src/state/index.ts +++ b/packages/core/src/state/index.ts @@ -30,7 +30,7 @@ export interface Writer { wallet: Address.Address, chainId: bigint, payload: Payload.Parented, - signatures: Signature.SignatureOfSignerLeaf[], + signatures: Signature.RawTopology, ): MaybePromise saveUpdate( diff --git a/packages/core/src/state/local/index.ts b/packages/core/src/state/local/index.ts index cd03e9833..648e4878b 100644 --- a/packages/core/src/state/local/index.ts +++ b/packages/core/src/state/local/index.ts @@ -41,6 +41,20 @@ export interface Store { subdigest: Hex.Hex, signature: Signature.SignatureOfSignerLeaf, ) => Promise + + // sapient signatures + loadSubdigestsOfSapientSigner: (signer: Address.Address, imageHash: Hex.Hex) => Promise + loadSapientSignatureOfSubdigest: ( + signer: Address.Address, + subdigest: Hex.Hex, + imageHash: Hex.Hex, + ) => Promise + saveSapientSignatureOfSubdigest: ( + signer: Address.Address, + subdigest: Hex.Hex, + imageHash: Hex.Hex, + signature: Signature.SignatureOfSapientSignerLeaf, + ) => Promise } export class Provider implements ProviderInterface { @@ -124,12 +138,10 @@ export class Provider implements ProviderInterface { wallet: Address.Address, chainId: bigint, payload: Payload.Parented, - signatures: Signature.SignatureOfSignerLeaf[], + signatures: Signature.RawTopology, ): void | Promise { const subdigest = Hex.fromBytes(Payload.hash(wallet, chainId, payload)) - for (const signature of signatures) { - this.store.saveSignatureOfSubdigest(wallet, subdigest, signature) - } + return this.saveSignature(subdigest, signatures) } async getConfigurationUpdates( @@ -142,10 +154,13 @@ export class Provider implements ProviderInterface { return [] } - const { signers } = WalletConfig.getSigners(fromConfig) - const subdigestsOfSigner = await Promise.all(signers.map((s) => this.store.loadSubdigestsOfSigner(s))) - const subdigests = [...new Set(subdigestsOfSigner.flat())] + const { signers, sapientSigners } = WalletConfig.getSigners(fromConfig) + const subdigestsOfSigner = await Promise.all([ + ...signers.map((s) => this.store.loadSubdigestsOfSigner(s)), + ...sapientSigners.map((s) => this.store.loadSubdigestsOfSapientSigner(s.address, Hex.fromBytes(s.imageHash))), + ]) + const subdigests = [...new Set(subdigestsOfSigner.flat())] const payloads = await Promise.all(subdigests.map((subdigest) => this.store.loadPayloadOfSubdigest(subdigest))) const nextCandidates = await Promise.all( @@ -199,16 +214,36 @@ export class Provider implements ProviderInterface { const expectedSubdigest = Hex.fromBytes( Payload.hash(wallet, candidate.payload.chainId, candidate.payload.content), ) - const signaturesOfSigners = await Promise.all( - signers.map(async (signer) => { + const signaturesOfSigners = await Promise.all([ + ...signers.map(async (signer) => { return { signer, signature: await this.store.loadSignatureOfSubdigest(signer, expectedSubdigest) } }), - ) + ...sapientSigners.map(async (signer) => { + return { + signer: signer.address, + imageHash: signer.imageHash, + signature: await this.store.loadSapientSignatureOfSubdigest( + signer.address, + expectedSubdigest, + Hex.fromBytes(signer.imageHash), + ), + } + }), + ]) let totalWeight = 0n const encoded = Signature.fillLeaves(fromConfig.topology, (leaf) => { if (WalletConfig.isSapientSignerLeaf(leaf)) { - return undefined + const sapientSignature = signaturesOfSigners.find( + ({ signer, imageHash }: { signer: Address.Address; imageHash?: Bytes.Bytes }) => { + return imageHash && signer === leaf.address && imageHash === leaf.imageHash + }, + )?.signature + + if (sapientSignature) { + totalWeight += leaf.weight + return sapientSignature + } } const signature = signaturesOfSigners.find(({ signer }) => signer === leaf.address)?.signature @@ -269,39 +304,53 @@ export class Provider implements ProviderInterface { await this.store.savePayloadOfSubdigest(Hex.fromBytes(subdigest), { content: payload, chainId: 0n, wallet }) await this.saveConfig(configuration) - const walk = async (topology: Signature.RawTopology): Promise => { - if (Signature.isRawNode(topology)) { - await Promise.all([walk(topology[0]), walk(topology[1])]) - return - } + await this.saveSignature(Hex.fromBytes(subdigest), signature.configuration.topology) + } - if (Signature.isRawNestedLeaf(topology)) { - return walk(topology.tree) - } + async saveSignature(subdigest: Hex.Hex, topology: Signature.RawTopology): Promise { + if (Signature.isRawNode(topology)) { + await Promise.all([this.saveSignature(subdigest, topology[0]), this.saveSignature(subdigest, topology[1])]) + return + } - if (Signature.isRawSignerLeaf(topology)) { - const type = topology.signature.type - if (type === 'eth_sign' || type === 'hash') { - const address = Secp256k1.recoverAddress({ - payload: type === 'eth_sign' ? PersonalMessage.getSignPayload(subdigest) : subdigest, - signature: topology.signature, - }) + if (Signature.isRawNestedLeaf(topology)) { + return this.saveSignature(subdigest, topology.tree) + } - return this.store.saveSignatureOfSubdigest(address, Hex.fromBytes(subdigest), topology.signature) - } + if (Signature.isRawSignerLeaf(topology)) { + const type = topology.signature.type + if (type === 'eth_sign' || type === 'hash') { + const address = Secp256k1.recoverAddress({ + payload: type === 'eth_sign' ? PersonalMessage.getSignPayload(subdigest) : subdigest, + signature: topology.signature, + }) + + return this.store.saveSignatureOfSubdigest(address, subdigest, topology.signature) } + } - if (Signature.isSignedSapientSignerLeaf(topology)) { - switch (topology.address.toLowerCase()) { - case this.extensions.passkeys.toLowerCase(): + if (Signature.isSignedSapientSignerLeaf(topology)) { + switch (topology.address.toLowerCase()) { + case this.extensions.passkeys.toLowerCase(): + const decoded = Extensions.Passkeys.decode(topology.signature.data) + if (Extensions.Passkeys.rootFor(decoded.publicKey) !== subdigest) { + throw new Error('Incorrect passkey signature') + } - default: - throw new Error(`Unsupported sapient signer: ${topology.address}`) - } + if (!Extensions.Passkeys.isValidSignature(subdigest, decoded)) { + throw new Error('Invalid passkey signature') + } + + return this.store.saveSapientSignatureOfSubdigest( + topology.address, + subdigest, + Hex.fromBytes(topology.imageHash), + topology.signature, + ) + default: + throw new Error(`Unsupported sapient signer: ${topology.address}`) } } - - await walk(signature.configuration.topology) } } diff --git a/packages/core/src/state/local/memory.ts b/packages/core/src/state/local/memory.ts index ddbaef908..f91b708b5 100644 --- a/packages/core/src/state/local/memory.ts +++ b/packages/core/src/state/local/memory.ts @@ -9,10 +9,17 @@ export class MemoryStore implements Store { private signerSubdigests = new Map>() private signatures = new Map<`0x${string}`, Signature.SignatureOfSignerLeaf>() + private sapientSignerSubdigests = new Map>() + private sapientSignatures = new Map<`0x${string}`, Signature.SignatureOfSapientSignerLeaf>() + private getSignatureKey(signer: Address.Address, subdigest: Hex.Hex): string { return `${signer.toLowerCase()}-${subdigest.toLowerCase()}` } + private getSapientSignatureKey(signer: Address.Address, subdigest: Hex.Hex, imageHash: Hex.Hex): string { + return `${signer.toLowerCase()}-${imageHash.toLowerCase()}-${subdigest.toLowerCase()}` + } + async loadConfig(imageHash: Hex.Hex): Promise { return this.configs.get(imageHash.toLowerCase() as `0x${string}`) } @@ -65,14 +72,45 @@ export class MemoryStore implements Store { const key = this.getSignatureKey(signer, subdigest) this.signatures.set(key as `0x${string}`, signature) - // Also track this subdigest for the signer const signerKey = signer.toLowerCase() const subdigestKey = subdigest.toLowerCase() if (!this.signerSubdigests.has(signerKey)) { this.signerSubdigests.set(signerKey, new Set()) } - this.signerSubdigests.get(signerKey)!.add(subdigestKey) } + + async loadSubdigestsOfSapientSigner(signer: Address.Address, imageHash: Hex.Hex): Promise { + const key = `${signer.toLowerCase()}-${imageHash.toLowerCase()}` + const subdigests = this.sapientSignerSubdigests.get(key) + return subdigests ? Array.from(subdigests).map((s) => s as Hex.Hex) : [] + } + + async loadSapientSignatureOfSubdigest( + signer: Address.Address, + subdigest: Hex.Hex, + imageHash: Hex.Hex, + ): Promise { + const key = this.getSapientSignatureKey(signer, subdigest, imageHash) + return this.sapientSignatures.get(key as `0x${string}`) + } + + async saveSapientSignatureOfSubdigest( + signer: Address.Address, + subdigest: Hex.Hex, + imageHash: Hex.Hex, + signature: Signature.SignatureOfSapientSignerLeaf, + ): Promise { + const key = this.getSapientSignatureKey(signer, subdigest, imageHash) + this.sapientSignatures.set(key as `0x${string}`, signature) + + const signerKey = `${signer.toLowerCase()}-${imageHash.toLowerCase()}` + const subdigestKey = subdigest.toLowerCase() + + if (!this.sapientSignerSubdigests.has(signerKey)) { + this.sapientSignerSubdigests.set(signerKey, new Set()) + } + this.sapientSignerSubdigests.get(signerKey)!.add(subdigestKey) + } } diff --git a/packages/primitives/src/signature.ts b/packages/primitives/src/signature.ts index 6aee2af80..8f65f7274 100644 --- a/packages/primitives/src/signature.ts +++ b/packages/primitives/src/signature.ts @@ -101,6 +101,16 @@ export type RawSignature = { erc6492?: { to: Address.Address; data: Bytes.Bytes } } +export function isSignatureOfSapientSignerLeaf(signature: any): signature is SignatureOfSapientSignerLeaf { + return ( + 'type' in signature && + (signature.type === 'sapient_compact' || signature.type === 'sapient') && + typeof signature === 'object' && + 'address' in signature && + 'data' in signature + ) +} + export function isRawSignature(signature: any): signature is RawSignature { return ( typeof signature === 'object' && diff --git a/packages/primitives/src/wallet-config.ts b/packages/primitives/src/wallet-config.ts index 8a65b74c5..bf3ec62b1 100644 --- a/packages/primitives/src/wallet-config.ts +++ b/packages/primitives/src/wallet-config.ts @@ -109,9 +109,12 @@ export function isTopology(cand: any): cand is Topology { export function getSigners(configuration: Configuration | Topology): { signers: Address.Address[] + sapientSigners: { address: Address.Address; imageHash: Bytes.Bytes }[] isComplete: boolean } { const signers = new Set() + const sapientSigners = new Set<{ address: Address.Address; imageHash: Bytes.Bytes }>() + let isComplete = true const scan = (topology: Topology) => { @@ -122,6 +125,8 @@ export function getSigners(configuration: Configuration | Topology): { if (topology.weight) { signers.add(topology.address) } + } else if (isSapientSignerLeaf(topology)) { + sapientSigners.add({ address: topology.address, imageHash: topology.imageHash }) } else if (isNodeLeaf(topology)) { isComplete = false } else if (isNestedLeaf(topology)) { @@ -132,7 +137,7 @@ export function getSigners(configuration: Configuration | Topology): { } scan(isConfiguration(configuration) ? configuration.topology : configuration) - return { signers: Array.from(signers), isComplete } + return { signers: Array.from(signers), sapientSigners: Array.from(sapientSigners), isComplete } } export function getWeight( From 57a48729656c6827132348566a351c89708bebe9 Mon Sep 17 00:00:00 2001 From: Agusx1211 Date: Tue, 4 Mar 2025 19:26:17 +0000 Subject: [PATCH 168/439] Fix build --- packages/core/src/signers/session/explicit.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/core/src/signers/session/explicit.ts b/packages/core/src/signers/session/explicit.ts index b7f00fe73..49e24b0da 100644 --- a/packages/core/src/signers/session/explicit.ts +++ b/packages/core/src/signers/session/explicit.ts @@ -121,7 +121,7 @@ async function validatePermission( // Extract value from calldata at offset const callValue = call.data.slice(Number(rule.offset), Number(rule.offset) + 32) // Apply mask - let value = callValue.map((b, i) => b & rule.mask[i]!) + let value: Uint8Array = callValue.map((b, i) => b & rule.mask[i]!) if (rule.cumulative) { if (provider && usageHash) { From bd894e353bec4c13a874d7749ed8b29d46330bc1 Mon Sep 17 00:00:00 2001 From: Michael Standen Date: Wed, 5 Mar 2025 15:42:45 +1300 Subject: [PATCH 169/439] Fix payload encoding --- packages/primitives/src/payload.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/primitives/src/payload.ts b/packages/primitives/src/payload.ts index 23f001b38..18359fcf8 100644 --- a/packages/primitives/src/payload.ts +++ b/packages/primitives/src/payload.ts @@ -258,8 +258,8 @@ export function encodeSapient( space: 0n, nonce: 0n, message: '0x', - imageHash: '0x', - digest: '0x', + imageHash: '0x0000000000000000000000000000000000000000000000000000000000000000', + digest: '0x0000000000000000000000000000000000000000000000000000000000000000', parentWallets: payload.parentWallets ?? [], } From 883cddb60f1dd2ba4b40cfbfc529e721211b1e77 Mon Sep 17 00:00:00 2001 From: Michael Standen Date: Wed, 5 Mar 2025 15:43:40 +1300 Subject: [PATCH 170/439] Add on chain test for session manager --- packages/core/src/signers/pk.ts | 6 +- packages/core/src/wallet.ts | 3 +- packages/primitives/src/payload.ts | 34 +++++--- packages/wdk/.env.test | 3 + packages/wdk/package.json | 2 + packages/wdk/src/session/session-manager.ts | 35 +++++++- packages/wdk/test/constants.ts | 9 +++ packages/wdk/test/session-manager.test.ts | 64 ++++++++++++++- packages/wdk/tsconfig.json | 2 +- pnpm-lock.yaml | 88 ++++++++++++++++----- 10 files changed, 204 insertions(+), 42 deletions(-) create mode 100644 packages/wdk/.env.test diff --git a/packages/core/src/signers/pk.ts b/packages/core/src/signers/pk.ts index e1e868a3e..3ee2303fa 100644 --- a/packages/core/src/signers/pk.ts +++ b/packages/core/src/signers/pk.ts @@ -18,7 +18,11 @@ export class Pk implements SignerInterface { payload: PayloadTypes.Parented, ): Promise { const hash = Payload.hash(wallet, chainId, payload) - const signature = Secp256k1.sign({ payload: hash, privateKey: this.privateKey }) + return this.signDigest(hash) + } + + async signDigest(digest: Bytes.Bytes): Promise { + const signature = Secp256k1.sign({ payload: digest, privateKey: this.privateKey }) return { ...signature, type: 'hash' } } } diff --git a/packages/core/src/wallet.ts b/packages/core/src/wallet.ts index 7f6cd7768..63c8c0f58 100644 --- a/packages/core/src/wallet.ts +++ b/packages/core/src/wallet.ts @@ -274,11 +274,10 @@ export class Wallet { const status = await this.getStatus(provider) const chainId = status.chainId ?? 0n - const isDeployed = status.isDeployed // Get deploy hash if needed for ERC-6492 let deployHash: { deployHash: Hex.Hex; context: Context.Context } | undefined - if (!isDeployed || status.stage === 'stage1') { + if (!status.isDeployed || status.stage === 'stage1') { const deployInformation = await this.options.stateProvider.getDeploy(this.address) if (!deployInformation) { throw new Error(`cannot find deploy information for ${this.address}`) diff --git a/packages/primitives/src/payload.ts b/packages/primitives/src/payload.ts index 18359fcf8..4007b2769 100644 --- a/packages/primitives/src/payload.ts +++ b/packages/primitives/src/payload.ts @@ -1,4 +1,4 @@ -import { AbiFunction, Address, Bytes, Hash, Hex, TypedData } from 'ox' +import { AbiFunction, AbiParameters, Address, Bytes, Hash, Hex, TypedData } from 'ox' import { IS_VALID_SAPIENT_SIGNATURE } from './constants' import { minBytesFor } from './utils' import { getSignPayload } from 'ox/TypedData' @@ -428,7 +428,7 @@ export function encodeBehaviorOnError(behaviorOnError: Call['behaviorOnError']): } } -export function hashCall(call: Call): Bytes.Bytes { +export function hashCall(call: Call): Hex.Hex { const CALL_TYPEHASH = Hash.keccak256( Bytes.fromString( 'Call(address to,uint256 value,bytes data,uint256 gasLimit,bool delegateCall,bool onlyFallback,uint256 behaviorOnError)', @@ -436,15 +436,27 @@ export function hashCall(call: Call): Bytes.Bytes { ) return Hash.keccak256( - Bytes.concat( - CALL_TYPEHASH, - Bytes.fromHex(call.to), - Bytes.fromNumber(call.value, { size: 32 }), - Hash.keccak256(call.data), - Bytes.fromNumber(call.gasLimit, { size: 32 }), - Bytes.fromBoolean(call.delegateCall), - Bytes.fromBoolean(call.onlyFallback), - Bytes.fromNumber(encodeBehaviorOnError(call.behaviorOnError), { size: 32 }), + AbiParameters.encode( + [ + { type: 'bytes32' }, + { type: 'address' }, + { type: 'uint256' }, + { type: 'bytes32' }, + { type: 'uint256' }, + { type: 'bool' }, + { type: 'bool' }, + { type: 'uint256' }, + ], + [ + Hex.from(CALL_TYPEHASH), + Hex.from(call.to), + call.value, + Hex.from(Hash.keccak256(call.data)), + call.gasLimit, + call.delegateCall, + call.onlyFallback, + BigInt(encodeBehaviorOnError(call.behaviorOnError)), + ], ), ) } diff --git a/packages/wdk/.env.test b/packages/wdk/.env.test new file mode 100644 index 000000000..296d44f99 --- /dev/null +++ b/packages/wdk/.env.test @@ -0,0 +1,3 @@ +# Random private key +PRIVATE_KEY=0x137423264e4622f9884e3078dfdc887fcf418741b090d6e7c11a04d49d55d4cb +RPC_URL= diff --git a/packages/wdk/package.json b/packages/wdk/package.json index 9ab23ba56..e3bc3e09f 100644 --- a/packages/wdk/package.json +++ b/packages/wdk/package.json @@ -16,6 +16,8 @@ "devDependencies": { "@repo/typescript-config": "workspace:^", "@types/jest": "^29.5.14", + "@types/node": "^22.13.9", + "dotenv": "^16.4.7", "jest": "^29.7.0", "ts-jest": "^29.2.6", "typescript": "^5.7.3" diff --git a/packages/wdk/src/session/session-manager.ts b/packages/wdk/src/session/session-manager.ts index 7fe9f124c..95ad222ba 100644 --- a/packages/wdk/src/session/session-manager.ts +++ b/packages/wdk/src/session/session-manager.ts @@ -2,12 +2,13 @@ import { Signer as SignerInterface, Signers } from '@0xsequence/sequence-core' import { Attestation, Config, + Constants, Payload, SessionConfig, SessionSignature, Signature as SignatureTypes, } from '@0xsequence/sequence-primitives' -import { Address, Provider, Secp256k1 } from 'ox' +import { AbiFunction, Address, Bytes, Hex, Provider, Secp256k1 } from 'ox' import { IdentitySigner } from '../identity' type SessionManagerConfiguration = { @@ -71,9 +72,11 @@ export class SessionManager implements SignerInterface { identitySigner: IdentitySigner, attestationParams: Signers.Session.AttestationParams, ): Promise { + const implicitPrivateKey = Secp256k1.randomPrivateKey() + const implicitAddress = Address.fromPublicKey(Secp256k1.getPublicKey({ privateKey: implicitPrivateKey })) const attestation: Attestation.Attestation = { ...attestationParams, - approvedSigner: identitySigner.address, + approvedSigner: implicitAddress, } const attestationHash = Attestation.hash(attestation) const identitySignature = await identitySigner.signDigest(attestationHash) @@ -82,8 +85,7 @@ export class SessionManager implements SignerInterface { throw new Error('Identity signature must be a hash') } - const privateKey = Secp256k1.randomPrivateKey() - const signer = new Signers.Session.Implicit(privateKey, attestation, identitySignature, this.address) + const signer = new Signers.Session.Implicit(implicitPrivateKey, attestation, identitySignature, this.address) this._implicitSigners.push(signer) return signer } @@ -159,4 +161,29 @@ export class SessionManager implements SignerInterface { data: SessionSignature.encodeSessionCallSignatures(signatures, this.topology, explicitSigners, implicitSigners), } } + + async isValidSapientSignature( + wallet: Address.Address, + chainId: bigint, + payload: Payload.Parented, + signature: SignatureTypes.SignatureOfSapientSignerLeaf, + ): Promise { + if (!Payload.isCalls(payload)) { + // Only calls are supported + return false + } + const encodedPayload = Payload.encodeSapient(chainId, payload) + const encodedCallData = AbiFunction.encodeData(Constants.IS_VALID_SAPIENT_SIGNATURE, [ + encodedPayload, + Bytes.toHex(signature.data), + ]) + const isValidSapientSignatureResult = await this._provider.request({ + method: 'eth_call', + params: [{ from: wallet, to: this.address, data: encodedCallData }], + }) + const resultImageHash = Hex.from( + AbiFunction.decodeResult(Constants.IS_VALID_SAPIENT_SIGNATURE, isValidSapientSignatureResult), + ) + return resultImageHash === Hex.from(this.imageHash) + } } diff --git a/packages/wdk/test/constants.ts b/packages/wdk/test/constants.ts index 6fd0c9a74..c79bb5fa9 100644 --- a/packages/wdk/test/constants.ts +++ b/packages/wdk/test/constants.ts @@ -1,2 +1,11 @@ +import { config as dotenvConfig } from 'dotenv' + +const envFile = process.env.CI ? '.env.test' : '.env.test.local' +dotenvConfig({ path: envFile }) + export const MOCK_IMPLICIT_CONTRACT = '0x9D5E1139e02eB025470308EeF65D2d15bC1f5d9F' export const MOCK_IMPLICIT_INVALID_CONTRACT = '0x977F7fbCAc606C3B33357ebDff0205B8C4055a3B' + +// Environment variables +export const { RPC_URL, PRIVATE_KEY } = process.env +export const CAN_RUN_LIVE = !!RPC_URL && !!PRIVATE_KEY diff --git a/packages/wdk/test/session-manager.test.ts b/packages/wdk/test/session-manager.test.ts index 848f7dbc2..52d71d0aa 100644 --- a/packages/wdk/test/session-manager.test.ts +++ b/packages/wdk/test/session-manager.test.ts @@ -1,9 +1,10 @@ import { Attestation, Payload } from '@0xsequence/sequence-primitives' import { Identity, Session } from '@0xsequence/sequence-wdk' -import { Address, Bytes, Provider } from 'ox' -import { MOCK_IMPLICIT_CONTRACT } from './constants' +import { Address, Bytes, Hex, Provider, RpcTransport } from 'ox' +import { MOCK_IMPLICIT_CONTRACT, CAN_RUN_LIVE, RPC_URL, PRIVATE_KEY } from './constants' +import { Signers } from '@0xsequence/sequence-core' -describe('SessionManager', () => { +describe('SessionManager (mocked)', () => { // Mock provider for testing const mockProvider = jest.mocked({ request: jest.fn().mockResolvedValue(Bytes.fromHex(MOCK_IMPLICIT_CONTRACT)), @@ -80,7 +81,6 @@ describe('SessionManager', () => { // Configure the provider mock const generateImplicitRequestMagicResult = Attestation.generateImplicitRequestMagic(attestation, testWallet) - console.log('in test block', Bytes.toHex(generateImplicitRequestMagicResult)) mockProvider.request.mockResolvedValue(generateImplicitRequestMagicResult) // Create a test transaction @@ -152,3 +152,59 @@ describe('SessionManager', () => { expect(signature.data).toBeDefined() }) }) + +// Only run real tests when RPC is provided +if (CAN_RUN_LIVE) { + describe('SessionManager (live)', () => { + const walletAddress: Address.Address = '0x1234567890123456789012345678901234567890' + + const rpcTransport = RpcTransport.fromHttp(RPC_URL!!) + const provider = Provider.from(rpcTransport) + + // Mock the identity signer using a local private key instead of calling nitro + const pkHex = Hex.from(PRIVATE_KEY as `0x${string}`) + const pk = new Signers.Pk(pkHex) + const mockIdentitySigner = pk as unknown as Identity.IdentitySigner + + const sessionManager = Session.SessionManager.createEmpty(mockIdentitySigner.address, { + provider, + }) + + it('should create and sign with an implicit session', async () => { + const chainId = BigInt(await provider.request({ method: 'eth_chainId' })) + + const attestation = { + identityType: new Uint8Array(4), + issuerHash: new Uint8Array(32), + audienceHash: new Uint8Array(32), + applicationData: new Uint8Array(), + authData: { + redirectUrl: 'https://test.com/redirect', + }, + } + + const implicitSession = await sessionManager.createImplicitSession(mockIdentitySigner, attestation) + const payload: Payload.Calls = { + type: 'call', + nonce: 0n, + space: 0n, + calls: [ + { + to: MOCK_IMPLICIT_CONTRACT, + value: 0n, + data: new Uint8Array(), + gasLimit: 0n, + delegateCall: false, + onlyFallback: false, + behaviorOnError: 'revert', + }, + ], + } + const signature = await sessionManager.signSapient(walletAddress, chainId, payload) + + // Check if the signature is valid + const isValid = await sessionManager.isValidSapientSignature(walletAddress, chainId, payload, signature) + expect(isValid).toBe(true) + }) + }) +} diff --git a/packages/wdk/tsconfig.json b/packages/wdk/tsconfig.json index d69f63d5e..de72db6bb 100644 --- a/packages/wdk/tsconfig.json +++ b/packages/wdk/tsconfig.json @@ -3,7 +3,7 @@ "compilerOptions": { "rootDir": ".", "outDir": "dist", - "types": ["jest"] + "types": ["node", "jest"] }, "include": ["src", "test"], "exclude": ["node_modules", "dist"] diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 12c0f2cf5..1973d61d5 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -251,12 +251,18 @@ importers: '@types/jest': specifier: ^29.5.14 version: 29.5.14 + '@types/node': + specifier: ^22.13.9 + version: 22.13.9 + dotenv: + specifier: ^16.4.7 + version: 16.4.7 jest: specifier: ^29.7.0 - version: 29.7.0(@types/node@20.17.6)(ts-node@10.9.2(@types/node@20.17.6)(typescript@5.7.3)) + version: 29.7.0(@types/node@22.13.9)(ts-node@10.9.2(@types/node@22.13.9)(typescript@5.7.3)) ts-jest: specifier: ^29.2.6 - version: 29.2.6(@babel/core@7.26.9)(@jest/transform@29.7.0)(@jest/types@29.6.3)(babel-jest@29.7.0(@babel/core@7.26.9))(jest@29.7.0(@types/node@20.17.6)(ts-node@10.9.2(@types/node@20.17.6)(typescript@5.7.3)))(typescript@5.7.3) + version: 29.2.6(@babel/core@7.26.9)(@jest/transform@29.7.0)(@jest/types@29.6.3)(babel-jest@29.7.0(@babel/core@7.26.9))(jest@29.7.0(@types/node@22.13.9)(ts-node@10.9.2(@types/node@22.13.9)(typescript@5.7.3)))(typescript@5.7.3) typescript: specifier: ^5.7.3 version: 5.7.3 @@ -1087,6 +1093,9 @@ packages: '@types/node@22.10.9': resolution: {integrity: sha512-Ir6hwgsKyNESl/gLOcEz3krR4CBGgliDqBQ2ma4wIhEx0w+xnoeTq3tdrNw15kU3SxogDjOgv9sqdtLW8mIHaw==} + '@types/node@22.13.9': + resolution: {integrity: sha512-acBjXdRJ3A6Pb3tqnw9HZmyR3Fiol3aGxRCK1x3d+6CDAMjl7I649wpSd+yNURCjbOUGu9tqtLKnTGxmK6CyGw==} + '@types/prop-types@15.7.13': resolution: {integrity: sha512-hCZTSvwbzWGvhqxp/RqVqwU999pBf2vp7hzIjiYOsl8wqOmUxkQ6ddw1cV3l8811+kdUFus/q4d1Y3E3SyEifA==} @@ -1623,6 +1632,10 @@ packages: resolution: {integrity: sha512-7GO6HghkA5fYG9TYnNxi14/7K9f5occMlp3zXAuSxn7CKCxt9xbNWG7yF8hTCSUchlfWSe3uLmlPfigevRItzQ==} engines: {node: '>=12'} + dotenv@16.4.7: + resolution: {integrity: sha512-47qPchRCykZC03FhkYAhrvwU4xDBFIj1QPqaarj6mdM/hgUzfPHcpkHJOn3mJAufFeeAxAzeGsr5X0M4k6fLZQ==} + engines: {node: '>=12'} + ejs@3.1.10: resolution: {integrity: sha512-UeJmFfOrAQS8OJWPZ4qtgHyWExa088/MtK5UEyoJGFH67cDEXkZSviOiKRCZ4Xij0zxI3JECgYs3oKx+AizQBA==} engines: {node: '>=0.10.0'} @@ -4097,7 +4110,7 @@ snapshots: jest-util: 29.7.0 slash: 3.0.0 - '@jest/core@29.7.0(ts-node@10.9.2(@types/node@20.17.6)(typescript@5.7.3))': + '@jest/core@29.7.0(ts-node@10.9.2(@types/node@22.13.9)(typescript@5.7.3))': dependencies: '@jest/console': 29.7.0 '@jest/reporters': 29.7.0 @@ -4111,7 +4124,7 @@ snapshots: exit: 0.1.2 graceful-fs: 4.2.11 jest-changed-files: 29.7.0 - jest-config: 29.7.0(@types/node@20.17.6)(ts-node@10.9.2(@types/node@20.17.6)(typescript@5.7.3)) + jest-config: 29.7.0(@types/node@20.17.6)(ts-node@10.9.2(@types/node@22.13.9)(typescript@5.7.3)) jest-haste-map: 29.7.0 jest-message-util: 29.7.0 jest-regex-util: 29.6.3 @@ -4476,6 +4489,10 @@ snapshots: dependencies: undici-types: 6.20.0 + '@types/node@22.13.9': + dependencies: + undici-types: 6.20.0 + '@types/prop-types@15.7.13': {} '@types/react-dom@18.3.0': @@ -4988,13 +5005,13 @@ snapshots: core-js-pure@3.39.0: {} - create-jest@29.7.0(@types/node@20.17.6)(ts-node@10.9.2(@types/node@20.17.6)(typescript@5.7.3)): + create-jest@29.7.0(@types/node@22.13.9)(ts-node@10.9.2(@types/node@22.13.9)(typescript@5.7.3)): dependencies: '@jest/types': 29.6.3 chalk: 4.1.2 exit: 0.1.2 graceful-fs: 4.2.11 - jest-config: 29.7.0(@types/node@20.17.6)(ts-node@10.9.2(@types/node@20.17.6)(typescript@5.7.3)) + jest-config: 29.7.0(@types/node@22.13.9)(ts-node@10.9.2(@types/node@22.13.9)(typescript@5.7.3)) jest-util: 29.7.0 prompts: 2.4.2 transitivePeerDependencies: @@ -5109,6 +5126,8 @@ snapshots: dotenv@16.0.3: {} + dotenv@16.4.7: {} + ejs@3.1.10: dependencies: jake: 10.9.2 @@ -5958,16 +5977,16 @@ snapshots: - babel-plugin-macros - supports-color - jest-cli@29.7.0(@types/node@20.17.6)(ts-node@10.9.2(@types/node@20.17.6)(typescript@5.7.3)): + jest-cli@29.7.0(@types/node@22.13.9)(ts-node@10.9.2(@types/node@22.13.9)(typescript@5.7.3)): dependencies: - '@jest/core': 29.7.0(ts-node@10.9.2(@types/node@20.17.6)(typescript@5.7.3)) + '@jest/core': 29.7.0(ts-node@10.9.2(@types/node@22.13.9)(typescript@5.7.3)) '@jest/test-result': 29.7.0 '@jest/types': 29.6.3 chalk: 4.1.2 - create-jest: 29.7.0(@types/node@20.17.6)(ts-node@10.9.2(@types/node@20.17.6)(typescript@5.7.3)) + create-jest: 29.7.0(@types/node@22.13.9)(ts-node@10.9.2(@types/node@22.13.9)(typescript@5.7.3)) exit: 0.1.2 import-local: 3.2.0 - jest-config: 29.7.0(@types/node@20.17.6)(ts-node@10.9.2(@types/node@20.17.6)(typescript@5.7.3)) + jest-config: 29.7.0(@types/node@22.13.9)(ts-node@10.9.2(@types/node@22.13.9)(typescript@5.7.3)) jest-util: 29.7.0 jest-validate: 29.7.0 yargs: 17.7.2 @@ -5977,7 +5996,7 @@ snapshots: - supports-color - ts-node - jest-config@29.7.0(@types/node@20.17.6)(ts-node@10.9.2(@types/node@20.17.6)(typescript@5.7.3)): + jest-config@29.7.0(@types/node@20.17.6)(ts-node@10.9.2(@types/node@22.13.9)(typescript@5.7.3)): dependencies: '@babel/core': 7.26.9 '@jest/test-sequencer': 29.7.0 @@ -6003,7 +6022,38 @@ snapshots: strip-json-comments: 3.1.1 optionalDependencies: '@types/node': 20.17.6 - ts-node: 10.9.2(@types/node@20.17.6)(typescript@5.7.3) + ts-node: 10.9.2(@types/node@22.13.9)(typescript@5.7.3) + transitivePeerDependencies: + - babel-plugin-macros + - supports-color + + jest-config@29.7.0(@types/node@22.13.9)(ts-node@10.9.2(@types/node@22.13.9)(typescript@5.7.3)): + dependencies: + '@babel/core': 7.26.9 + '@jest/test-sequencer': 29.7.0 + '@jest/types': 29.6.3 + babel-jest: 29.7.0(@babel/core@7.26.9) + chalk: 4.1.2 + ci-info: 3.9.0 + deepmerge: 4.3.1 + glob: 7.2.3 + graceful-fs: 4.2.11 + jest-circus: 29.7.0 + jest-environment-node: 29.7.0 + jest-get-type: 29.6.3 + jest-regex-util: 29.6.3 + jest-resolve: 29.7.0 + jest-runner: 29.7.0 + jest-util: 29.7.0 + jest-validate: 29.7.0 + micromatch: 4.0.8 + parse-json: 5.2.0 + pretty-format: 29.7.0 + slash: 3.0.0 + strip-json-comments: 3.1.1 + optionalDependencies: + '@types/node': 22.13.9 + ts-node: 10.9.2(@types/node@22.13.9)(typescript@5.7.3) transitivePeerDependencies: - babel-plugin-macros - supports-color @@ -6223,12 +6273,12 @@ snapshots: merge-stream: 2.0.0 supports-color: 8.1.1 - jest@29.7.0(@types/node@20.17.6)(ts-node@10.9.2(@types/node@20.17.6)(typescript@5.7.3)): + jest@29.7.0(@types/node@22.13.9)(ts-node@10.9.2(@types/node@22.13.9)(typescript@5.7.3)): dependencies: - '@jest/core': 29.7.0(ts-node@10.9.2(@types/node@20.17.6)(typescript@5.7.3)) + '@jest/core': 29.7.0(ts-node@10.9.2(@types/node@22.13.9)(typescript@5.7.3)) '@jest/types': 29.6.3 import-local: 3.2.0 - jest-cli: 29.7.0(@types/node@20.17.6)(ts-node@10.9.2(@types/node@20.17.6)(typescript@5.7.3)) + jest-cli: 29.7.0(@types/node@22.13.9)(ts-node@10.9.2(@types/node@22.13.9)(typescript@5.7.3)) transitivePeerDependencies: - '@types/node' - babel-plugin-macros @@ -7131,12 +7181,12 @@ snapshots: dependencies: typescript: 5.5.4 - ts-jest@29.2.6(@babel/core@7.26.9)(@jest/transform@29.7.0)(@jest/types@29.6.3)(babel-jest@29.7.0(@babel/core@7.26.9))(jest@29.7.0(@types/node@20.17.6)(ts-node@10.9.2(@types/node@20.17.6)(typescript@5.7.3)))(typescript@5.7.3): + ts-jest@29.2.6(@babel/core@7.26.9)(@jest/transform@29.7.0)(@jest/types@29.6.3)(babel-jest@29.7.0(@babel/core@7.26.9))(jest@29.7.0(@types/node@22.13.9)(ts-node@10.9.2(@types/node@22.13.9)(typescript@5.7.3)))(typescript@5.7.3): dependencies: bs-logger: 0.2.6 ejs: 3.1.10 fast-json-stable-stringify: 2.1.0 - jest: 29.7.0(@types/node@20.17.6)(ts-node@10.9.2(@types/node@20.17.6)(typescript@5.7.3)) + jest: 29.7.0(@types/node@22.13.9)(ts-node@10.9.2(@types/node@22.13.9)(typescript@5.7.3)) jest-util: 29.7.0 json5: 2.2.3 lodash.memoize: 4.1.2 @@ -7168,14 +7218,14 @@ snapshots: v8-compile-cache-lib: 3.0.1 yn: 3.1.1 - ts-node@10.9.2(@types/node@20.17.6)(typescript@5.7.3): + ts-node@10.9.2(@types/node@22.13.9)(typescript@5.7.3): dependencies: '@cspotcode/source-map-support': 0.8.1 '@tsconfig/node10': 1.0.11 '@tsconfig/node12': 1.0.11 '@tsconfig/node14': 1.0.3 '@tsconfig/node16': 1.0.4 - '@types/node': 20.17.6 + '@types/node': 22.13.9 acorn: 8.14.0 acorn-walk: 8.3.4 arg: 4.1.3 From db532f6c34d3925b970b404b4099f217551cf2eb Mon Sep 17 00:00:00 2001 From: Agusx1211 Date: Wed, 5 Mar 2025 15:06:31 +0000 Subject: [PATCH 171/439] Fix primitives build --- packages/primitives/src/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/primitives/src/index.ts b/packages/primitives/src/index.ts index 555721bd4..b5d716ebe 100644 --- a/packages/primitives/src/index.ts +++ b/packages/primitives/src/index.ts @@ -11,4 +11,4 @@ export * as Signature from './signature' //FIXME This name conflicts with oxlib export * as Utils from './utils' export * as WalletConfig from './wallet-config' export * as Context from './context' -export * as Extensions from './extensions' +export * as Extensions from './extensions/index' From ec0094b92246a11ec2643618e0a6ececfc408fe7 Mon Sep 17 00:00:00 2001 From: Agusx1211 Date: Wed, 5 Mar 2025 15:06:43 +0000 Subject: [PATCH 172/439] Decouple sapient signers and fix 6492 --- packages/core/src/signers/passkey.ts | 13 +- packages/core/src/state/local/index.ts | 6 +- packages/core/src/wallet.ts | 178 +++++++++++--------- packages/wdk/src/session/session-manager.ts | 10 +- 4 files changed, 119 insertions(+), 88 deletions(-) diff --git a/packages/core/src/signers/passkey.ts b/packages/core/src/signers/passkey.ts index 919206170..c6724a92d 100644 --- a/packages/core/src/signers/passkey.ts +++ b/packages/core/src/signers/passkey.ts @@ -1,5 +1,5 @@ import { Hex, Bytes, Address } from 'ox' -import { Signer } from '../wallet' +import { SapientSigner, Signer } from '../wallet' import { Payload, Extensions } from '@0xsequence/sequence-primitives' import type { Signature as SignatureTypes } from '@0xsequence/sequence-primitives' import { WebAuthnP256 } from 'ox' @@ -11,16 +11,17 @@ export type PasskeyOptions = { credentialId: string } -export class Passkey implements Signer { +export class Passkey implements SapientSigner { public readonly address: Address.Address - public readonly rootHash: Hex.Hex + public readonly imageHash: Hex.Hex constructor(public readonly options: PasskeyOptions) { - this.rootHash = Extensions.Passkeys.rootFor(options.publicKey) + this.imageHash = Extensions.Passkeys.rootFor(options.publicKey) this.address = options.extensions.passkeys } static async create( + name: string, extensions: Pick, options: { requireUserVerification: boolean } = { requireUserVerification: true }, ) { @@ -29,7 +30,7 @@ export class Passkey implements Signer { const credential = await WebAuthnP256.createCredential({ challenge: challengeAndId, user: { - name: 'Sequence (WIP DEVELOPMENT)', + name: `Sequence (${name})`, id: challengeAndId, }, }) @@ -54,7 +55,7 @@ export class Passkey implements Signer { payload: Payload.Parented, imageHash: Hex.Hex, ): Promise { - if (this.rootHash !== imageHash) { + if (this.imageHash !== imageHash) { // TODO: This should never get called, why do we have this? throw new Error('Unexpected image hash') } diff --git a/packages/core/src/state/local/index.ts b/packages/core/src/state/local/index.ts index 648e4878b..9797872cb 100644 --- a/packages/core/src/state/local/index.ts +++ b/packages/core/src/state/local/index.ts @@ -333,8 +333,10 @@ export class Provider implements ProviderInterface { switch (topology.address.toLowerCase()) { case this.extensions.passkeys.toLowerCase(): const decoded = Extensions.Passkeys.decode(topology.signature.data) - if (Extensions.Passkeys.rootFor(decoded.publicKey) !== subdigest) { - throw new Error('Incorrect passkey signature') + if (Extensions.Passkeys.rootFor(decoded.publicKey) !== Hex.fromBytes(topology.imageHash)) { + throw new Error( + `Incorrect passkey signature: ${Extensions.Passkeys.rootFor(decoded.publicKey)} !== ${Hex.fromBytes(topology.imageHash)}`, + ) } if (!Extensions.Passkeys.isValidSignature(subdigest, decoded)) { diff --git a/packages/core/src/wallet.ts b/packages/core/src/wallet.ts index 7f6cd7768..bd8be1d7e 100644 --- a/packages/core/src/wallet.ts +++ b/packages/core/src/wallet.ts @@ -37,6 +37,7 @@ export type WalletStatus = { export class Wallet { private readonly signers = new Map() + private readonly sapientSigners = new Map() private readonly options: WalletOptions & { stateProvider: State.Provider } constructor( @@ -59,10 +60,22 @@ export class Wallet { this.signers.set(await signer.address, { signer, isTrusted }) } + async setSapientSigner(signer: SapientSigner, isTrusted = false) { + this.sapientSigners.set(this.getSapientKey(await signer.address, await signer.imageHash), { signer, isTrusted }) + } + + private getSapientKey(address: Address.Address, imageHash?: Hex.Hex): string { + return `${address}:${imageHash ?? 'any'}` + } + removeSigner(address: Address.Address) { this.signers.delete(address) } + removeSapientSigner(address: Address.Address, imageHash?: Hex.Hex) { + this.sapientSigners.delete(this.getSapientKey(address, imageHash)) + } + async isDeployed(provider: Provider.Provider): Promise { return (await provider.request({ method: 'eth_getCode', params: [this.address, 'pending'] })) !== '0x' } @@ -204,7 +217,7 @@ export class Wallet { ) const payload: Payload.Calls = { type: 'call', space, nonce, calls } - const signature = await this.sign(payload, { ...options, provider }) + const signature = await this.sign(payload, { ...options, provider, skip6492: true }) return { to: this.address, @@ -218,7 +231,7 @@ export class Wallet { const payload: Payload.Calls = { type: 'call', space, nonce, calls } const [signature, deploy] = await Promise.all([ - this.sign(payload, { ...options, provider }), + this.sign(payload, { ...options, provider, skip6492: true }), this.getDeployTransaction(), ]) @@ -263,6 +276,7 @@ export class Wallet { async sign( payload: Payload.Parented, options?: { + skip6492?: boolean provider?: Provider.Provider trustSigners?: boolean onSignerError?: WalletConfig.SignerErrorCallback @@ -365,85 +379,92 @@ export class Wallet { return signature }, - signSapient: provider - ? (leaf) => { - const signer = this.signers.get(leaf.address) - if (!signer) { - throw new Error(`no signer ${leaf.address}`) - } - if (typeof signer.signer.signSapient !== 'function') { - throw new Error(`${leaf.address} does not implement Signer.signSapient()`) - } + signSapient: (leaf) => { + // If we have a signer for this imageHash, we give it priority + // if not, then we fetch the signer for any imageHash (undefined) + const signer = + this.sapientSigners.get(this.getSapientKey(leaf.address, Hex.fromBytes(leaf.imageHash))) || + this.sapientSigners.get(this.getSapientKey(leaf.address, undefined)) - const signature = WalletConfig.normalizeSignerSignature( - signer.signer.signSapient(this.address, chainId, payload, Bytes.toHex(leaf.imageHash)), + if (!signer) { + throw new Error(`no signer ${leaf.address}`) + } + if (typeof signer.signer.signSapient !== 'function') { + throw new Error(`${leaf.address} does not implement Signer.signSapient()`) + } + + const signature = WalletConfig.normalizeSignerSignature( + signer.signer.signSapient(this.address, chainId, payload, Bytes.toHex(leaf.imageHash)), + ) + + signature.signature = signature.signature.then((signature) => { + if (signature.address !== leaf.address) { + throw new Error( + `expected sapient signature by ${leaf.address}, but received signature from ${signature.address}`, ) + } - signature.signature = signature.signature.then((signature) => { - if (signature.address !== leaf.address) { - throw new Error( - `expected sapient signature by ${leaf.address}, but received signature from ${signature.address}`, - ) - } + return signature + }) - return signature - }) - - if (options?.trustSigners === false || (!options?.trustSigners && !signer.isTrusted)) { - signature.signature = signature.signature.then(async (signature) => { - const digest = Payload.hash(this.address, chainId, payload) - - switch (signature.type) { - case 'sapient': { - const imageHash = await provider.request({ - method: 'eth_call', - params: [ - { - to: leaf.address, - data: AbiFunction.encodeData(Constants.IS_VALID_SAPIENT_SIGNATURE, [ - Payload.encodeSapient(chainId, payload), - Bytes.toHex(signature.data), - ]), - }, - ], - }) - if (imageHash !== Bytes.toHex(leaf.imageHash)) { - throw new Error( - `invalid sapient signature for ${leaf.type} signer ${leaf.address}: expected ${leaf.imageHash}, derived ${imageHash}`, - ) - } - break - } - - case 'sapient_compact': { - const imageHash = await provider.request({ - method: 'eth_call', - params: [ - { - to: leaf.address, - data: AbiFunction.encodeData(Constants.IS_VALID_SAPIENT_SIGNATURE_COMPACT, [ - Bytes.toHex(digest), - Bytes.toHex(signature.data), - ]), - }, - ], - }) - if (imageHash !== Bytes.toHex(leaf.imageHash)) { - throw new Error( - `invalid sapient signature for ${leaf.type} signer ${leaf.address}: expected ${leaf.imageHash}, derived ${imageHash}`, - ) - } - break - } + if (options?.trustSigners === false || (!options?.trustSigners && !signer.isTrusted)) { + signature.signature = signature.signature.then(async (signature) => { + if (!provider) { + throw new Error(`sapient signer ${leaf.address} cannot sign for a no-chain-id signature`) + } + + const digest = Payload.hash(this.address, chainId, payload) + + switch (signature.type) { + case 'sapient': { + const imageHash = await provider.request({ + method: 'eth_call', + params: [ + { + to: leaf.address, + data: AbiFunction.encodeData(Constants.IS_VALID_SAPIENT_SIGNATURE, [ + Payload.encodeSapient(chainId, payload), + Bytes.toHex(signature.data), + ]), + }, + ], + }) + if (imageHash !== Bytes.toHex(leaf.imageHash)) { + throw new Error( + `invalid sapient signature for ${leaf.type} signer ${leaf.address}: expected ${leaf.imageHash}, derived ${imageHash}`, + ) } + break + } - return signature - }) + case 'sapient_compact': { + const imageHash = await provider.request({ + method: 'eth_call', + params: [ + { + to: leaf.address, + data: AbiFunction.encodeData(Constants.IS_VALID_SAPIENT_SIGNATURE_COMPACT, [ + Bytes.toHex(digest), + Bytes.toHex(signature.data), + ]), + }, + ], + }) + if (imageHash !== Bytes.toHex(leaf.imageHash)) { + throw new Error( + `invalid sapient signature for ${leaf.type} signer ${leaf.address}: expected ${leaf.imageHash}, derived ${imageHash}`, + ) + } + break + } } return signature - } - : undefined, + }) + } + + return signature + }, }, { threshold: configuration.threshold, @@ -455,7 +476,9 @@ export class Wallet { ) const erc6492 = - !status.isDeployed && deployHash ? Erc6492.deploy(deployHash.deployHash, deployHash.context) : undefined + !status.isDeployed && deployHash && !options?.skip6492 + ? Erc6492.deploy(deployHash.deployHash, deployHash.context) + : undefined return { noChainId: !chainId, @@ -469,13 +492,18 @@ export class Wallet { export interface Signer { readonly address: MaybePromise - sign?: ( + sign: ( wallet: Address.Address, chainId: bigint, payload: Payload.Parented, ) => WalletConfig.SignerSignature +} + +export interface SapientSigner { + readonly address: MaybePromise + readonly imageHash: MaybePromise - signSapient?: ( + signSapient: ( wallet: Address.Address, chainId: bigint, payload: Payload.Parented, diff --git a/packages/wdk/src/session/session-manager.ts b/packages/wdk/src/session/session-manager.ts index 7fe9f124c..76cc55389 100644 --- a/packages/wdk/src/session/session-manager.ts +++ b/packages/wdk/src/session/session-manager.ts @@ -1,4 +1,4 @@ -import { Signer as SignerInterface, Signers } from '@0xsequence/sequence-core' +import { SapientSigner, Signers } from '@0xsequence/sequence-core' import { Attestation, Config, @@ -7,7 +7,7 @@ import { SessionSignature, Signature as SignatureTypes, } from '@0xsequence/sequence-primitives' -import { Address, Provider, Secp256k1 } from 'ox' +import { Address, Hex, Provider, Secp256k1 } from 'ox' import { IdentitySigner } from '../identity' type SessionManagerConfiguration = { @@ -18,7 +18,7 @@ type SessionManagerConfiguration = { const DEFAULT_SESSION_MANAGER_ADDRESS: Address.Address = '0x3e1b5D56980B339B410B57e5Dd3d3FA93FF14C4F' -export class SessionManager implements SignerInterface { +export class SessionManager implements SapientSigner { readonly address: Address.Address private _topology: SessionConfig.SessionsTopology private _provider: Provider.Provider @@ -46,9 +46,9 @@ export class SessionManager implements SignerInterface { return this._topology } - get imageHash() { + get imageHash(): Hex.Hex { const configurationTree = SessionConfig.sessionsTopologyToConfigurationTree(this._topology) - return Config.hashConfigurationTree(configurationTree) + return Hex.fromBytes(Config.hashConfigurationTree(configurationTree)) } withProvider(provider: Provider.Provider): SessionManager { From 7defdd323688a211b8299029bebcc3b594292698 Mon Sep 17 00:00:00 2001 From: Agusx1211 Date: Wed, 5 Mar 2025 17:59:30 +0000 Subject: [PATCH 173/439] Add metadata to passkeys --- packages/core/src/signers/passkey.ts | 19 +++++----- packages/primitives/src/extensions/index.ts | 2 +- .../primitives/src/extensions/passkeys.ts | 35 +++++++++++++++++-- 3 files changed, 44 insertions(+), 12 deletions(-) diff --git a/packages/core/src/signers/passkey.ts b/packages/core/src/signers/passkey.ts index c6724a92d..f5fc7def9 100644 --- a/packages/core/src/signers/passkey.ts +++ b/packages/core/src/signers/passkey.ts @@ -1,5 +1,5 @@ import { Hex, Bytes, Address } from 'ox' -import { SapientSigner, Signer } from '../wallet' +import { SapientSigner } from '../wallet' import { Payload, Extensions } from '@0xsequence/sequence-primitives' import type { Signature as SignatureTypes } from '@0xsequence/sequence-primitives' import { WebAuthnP256 } from 'ox' @@ -7,17 +7,21 @@ import { WebAuthnP256 } from 'ox' export type PasskeyOptions = { extensions: Pick publicKey: Extensions.Passkeys.PublicKey - credentialId: string } export class Passkey implements SapientSigner { + public readonly credentialId: string + + public readonly publicKey: Extensions.Passkeys.PublicKey public readonly address: Address.Address public readonly imageHash: Hex.Hex - constructor(public readonly options: PasskeyOptions) { + constructor(options: PasskeyOptions) { this.imageHash = Extensions.Passkeys.rootFor(options.publicKey) this.address = options.extensions.passkeys + this.publicKey = options.publicKey + this.credentialId = options.credentialId } static async create( @@ -26,12 +30,9 @@ export class Passkey implements SapientSigner { options: { requireUserVerification: boolean } = { requireUserVerification: true }, ) { // Use WebAuthnP256's built-in secure challenge generation - const challengeAndId = Bytes.random(32) const credential = await WebAuthnP256.createCredential({ - challenge: challengeAndId, user: { name: `Sequence (${name})`, - id: challengeAndId, }, }) @@ -64,8 +65,8 @@ export class Passkey implements SapientSigner { const response = await WebAuthnP256.sign({ challenge, - credentialId: this.options.credentialId, - userVerification: this.options.publicKey.requireUserVerification ? 'required' : 'discouraged', + credentialId: this.credentialId, + userVerification: this.publicKey.requireUserVerification ? 'required' : 'discouraged', }) const authenticatorData = Bytes.fromHex(response.metadata.authenticatorData) @@ -73,7 +74,7 @@ export class Passkey implements SapientSigner { const sBytes = Bytes.fromNumber(response.signature.s) const signature = Extensions.Passkeys.encode({ - publicKey: this.options.publicKey, + publicKey: this.publicKey, r: rBytes, s: sBytes, authenticatorData, diff --git a/packages/primitives/src/extensions/index.ts b/packages/primitives/src/extensions/index.ts index 5ef02dd7c..951996f63 100644 --- a/packages/primitives/src/extensions/index.ts +++ b/packages/primitives/src/extensions/index.ts @@ -5,7 +5,7 @@ export type Extensions = { } export const Dev1: Extensions = { - passkeys: '0x48D39130812Dc0F49C7E10Aa42503B5d76057f1a', + passkeys: '0x38A6E2281C1A010e2F98159f5Fc44787957a6725', } export * as Passkeys from './passkeys' diff --git a/packages/primitives/src/extensions/passkeys.ts b/packages/primitives/src/extensions/passkeys.ts index 6ef28351d..63ee8b82a 100644 --- a/packages/primitives/src/extensions/passkeys.ts +++ b/packages/primitives/src/extensions/passkeys.ts @@ -5,14 +5,19 @@ export type PublicKey = { requireUserVerification: boolean x: Hex.Hex y: Hex.Hex + metadata?: Hex.Hex } export function rootFor(publicKey: PublicKey): Hex.Hex { const a = keccak256( Bytes.concat(Bytes.padLeft(Bytes.fromHex(publicKey.x), 32), Bytes.padLeft(Bytes.fromHex(publicKey.y), 32)), ) - const b = Bytes.padLeft(publicKey.requireUserVerification ? Bytes.from([1]) : Bytes.from([0]), 32) - return Hex.fromBytes(keccak256(Bytes.concat(b, a))) + + const ruv = Bytes.padLeft(publicKey.requireUserVerification ? Bytes.from([1]) : Bytes.from([0]), 32) + const metadata = publicKey.metadata ? Bytes.fromHex(publicKey.metadata) : Bytes.padLeft(Bytes.from([]), 32) + + const b = keccak256(Bytes.concat(ruv, metadata)) + return Hex.fromBytes(keccak256(Bytes.concat(a, b))) } export type DecodedSignature = { @@ -50,8 +55,18 @@ export function encode(decoded: DecodedSignature): Bytes.Bytes { flags |= (bytesChallengeIndex - 1) << 3 // 0x08 bit flags |= (bytesTypeIndex - 1) << 4 // 0x10 bit + // Set metadata flag if metadata exists + if (decoded.publicKey.metadata) { + flags |= 1 << 6 // 0x40 bit + } + let result: Bytes.Bytes = Bytes.from([flags]) + // Add metadata if it exists + if (decoded.publicKey.metadata) { + result = Bytes.concat(result, Bytes.fromHex(decoded.publicKey.metadata)) + } + result = Bytes.concat(result, Bytes.padLeft(Bytes.fromNumber(authDataSize), bytesAuthDataSize)) result = Bytes.concat(result, decoded.authenticatorData) @@ -107,6 +122,21 @@ export function decode(data: Bytes.Bytes): DecodedSignature & { challengeIndex: const bytesClientDataJSONSize = ((flags >> 2) & 0x01) + 1 const bytesChallengeIndex = ((flags >> 3) & 0x01) + 1 const bytesTypeIndex = ((flags >> 4) & 0x01) + 1 + const hasMetadata = ((flags >> 6) & 0x01) === 0x01 + + // Check if fallback to abi decode is needed + if ((flags & 0x20) !== 0) { + throw new Error('Fallback to abi decode is not supported in this implementation') + } + + let metadata: Hex.Hex | undefined + + // Read metadata if present + if (hasMetadata) { + const metadataBytes = Bytes.slice(data, offset, offset + 32) + metadata = Hex.fromBytes(metadataBytes) + offset += 32 + } const authDataSize = Bytes.toNumber(Bytes.slice(data, offset, offset + bytesAuthDataSize)) offset += bytesAuthDataSize @@ -138,6 +168,7 @@ export function decode(data: Bytes.Bytes): DecodedSignature & { challengeIndex: requireUserVerification, x: Hex.fromBytes(xBytes), y: Hex.fromBytes(yBytes), + metadata, }, r, s, From 7a4bd6ce3cf602db061a27e9200b658f52692d54 Mon Sep 17 00:00:00 2001 From: Agusx1211 Date: Wed, 5 Mar 2025 18:59:18 +0000 Subject: [PATCH 174/439] Define metadata on signer --- packages/core/src/signers/passkey.ts | 38 ++++++++++++++++++++++------ 1 file changed, 30 insertions(+), 8 deletions(-) diff --git a/packages/core/src/signers/passkey.ts b/packages/core/src/signers/passkey.ts index f5fc7def9..f47c75c04 100644 --- a/packages/core/src/signers/passkey.ts +++ b/packages/core/src/signers/passkey.ts @@ -3,11 +3,30 @@ import { SapientSigner } from '../wallet' import { Payload, Extensions } from '@0xsequence/sequence-primitives' import type { Signature as SignatureTypes } from '@0xsequence/sequence-primitives' import { WebAuthnP256 } from 'ox' +import { keccak256 } from 'ox/Hash' export type PasskeyOptions = { extensions: Pick publicKey: Extensions.Passkeys.PublicKey credentialId: string + metadata?: PasskeyMetadata +} + +export type CreaetePasskeyOptions = { + requireUserVerification?: boolean + credentialName?: string + noEmbedMetadata?: boolean +} + +export type PasskeyMetadata = { + name: string + createdAt: number +} + +function metadataHash(metadata: PasskeyMetadata): Hex.Hex { + const a = keccak256(Bytes.fromString(metadata.name)) + const b = keccak256(Bytes.fromNumber(metadata.createdAt)) + return Hex.fromBytes(keccak256(Bytes.concat(a, b))) } export class Passkey implements SapientSigner { @@ -24,28 +43,31 @@ export class Passkey implements SapientSigner { this.credentialId = options.credentialId } - static async create( - name: string, - extensions: Pick, - options: { requireUserVerification: boolean } = { requireUserVerification: true }, - ) { - // Use WebAuthnP256's built-in secure challenge generation + static async create(extensions: Pick, options?: CreaetePasskeyOptions) { + const name = options?.credentialName ?? `Sequence (${Date.now()})` + const credential = await WebAuthnP256.createCredential({ user: { - name: `Sequence (${name})`, + name, }, }) const x = Hex.fromNumber(credential.publicKey.x) const y = Hex.fromNumber(credential.publicKey.y) + const metadata = { + name, + createdAt: Date.now(), + } + return new Passkey({ credentialId: credential.id, extensions, publicKey: { - requireUserVerification: options.requireUserVerification, + requireUserVerification: options?.requireUserVerification ?? true, x, y, + metadata: options?.noEmbedMetadata ? undefined : metadataHash(metadata), }, }) } From d6ee3b650f55640e1928ec582d2e065f924bc3f2 Mon Sep 17 00:00:00 2001 From: Michael Standen Date: Thu, 6 Mar 2025 12:25:25 +1300 Subject: [PATCH 175/439] Add replay protection for calls with sessions --- packages/core/src/signers/session/explicit.ts | 6 ++++- packages/core/src/signers/session/implicit.ts | 6 ++++- packages/core/src/signers/session/session.ts | 4 ++++ packages/primitives/src/session-signature.ts | 23 ++++++++++++++++++- packages/wdk/src/session/session-manager.ts | 2 +- 5 files changed, 37 insertions(+), 4 deletions(-) diff --git a/packages/core/src/signers/session/explicit.ts b/packages/core/src/signers/session/explicit.ts index 49e24b0da..622ed80d6 100644 --- a/packages/core/src/signers/session/explicit.ts +++ b/packages/core/src/signers/session/explicit.ts @@ -84,6 +84,10 @@ export class Explicit implements SignerInterface { wallet: Address.Address, chainId: bigint, call: Payload.Call, + nonce: { + space: bigint + nonce: bigint + }, provider: Provider.Provider, ): Promise { // Find the valid permission for this call @@ -98,7 +102,7 @@ export class Explicit implements SignerInterface { throw new Error('Invalid permission') } // Sign it - const callHash = Payload.hashCall(call) + const callHash = SessionSignature.hashCallWithReplayProtection(call, chainId, nonce.space, nonce.nonce) const sessionSignature = Secp256k1.sign({ payload: callHash, privateKey: this._privateKey }) return { permissionIndex: BigInt(permissionIndex), diff --git a/packages/core/src/signers/session/implicit.ts b/packages/core/src/signers/session/implicit.ts index 36aaacb30..9097dd56a 100644 --- a/packages/core/src/signers/session/implicit.ts +++ b/packages/core/src/signers/session/implicit.ts @@ -58,13 +58,17 @@ export class Implicit implements SignerInterface { wallet: Address.Address, chainId: bigint, call: Payload.Call, + nonce: { + space: bigint + nonce: bigint + }, provider: Provider.Provider, ): Promise { const isSupported = await this.supportedCall(wallet, chainId, call, provider) if (!isSupported) { throw new Error('Unsupported call') } - const callHash = Payload.hashCall(call) + const callHash = SessionSignature.hashCallWithReplayProtection(call, chainId, nonce.space, nonce.nonce) const sessionSignature = Secp256k1.sign({ payload: callHash, privateKey: this._privateKey }) return { attestation: this._attestation, diff --git a/packages/core/src/signers/session/session.ts b/packages/core/src/signers/session/session.ts index dec8e9c44..3cdc3b5f9 100644 --- a/packages/core/src/signers/session/session.ts +++ b/packages/core/src/signers/session/session.ts @@ -14,6 +14,10 @@ export interface SignerInterface { wallet: Address.Address, chainId: bigint, call: Payload.Call, + nonce: { + space: bigint + nonce: bigint + }, provider: Provider.Provider, ) => Promise } diff --git a/packages/primitives/src/session-signature.ts b/packages/primitives/src/session-signature.ts index 1dec2aca9..7d774e9e6 100644 --- a/packages/primitives/src/session-signature.ts +++ b/packages/primitives/src/session-signature.ts @@ -1,4 +1,4 @@ -import { Address, Bytes } from 'ox' +import { Address, Bytes, Hash, Hex } from 'ox' import { Attestation, encode, encodeForJson, fromParsed } from './attestation' import { MAX_PERMISSIONS_COUNT } from './permission' import { @@ -9,6 +9,7 @@ import { } from './session-config' import { RSY } from './signature' import { minBytesFor, packRSY } from './utils' +import { Payload } from '.' export type ImplicitSessionCallSignature = { attestation: Attestation @@ -174,3 +175,23 @@ export function encodeSessionCallSignatures( return Bytes.concat(...parts) } + +// Helper + +export function hashCallWithReplayProtection( + call: Payload.Call, + chainId: bigint, + space: bigint, + nonce: bigint, +): Hex.Hex { + return Hex.fromBytes( + Hash.keccak256( + Bytes.concat( + Bytes.fromNumber(Number(chainId), { size: 32 }), + Bytes.fromNumber(Number(space), { size: 32 }), + Bytes.fromNumber(Number(nonce), { size: 32 }), + Bytes.fromHex(Payload.hashCall(call)), + ), + ), + ) +} diff --git a/packages/wdk/src/session/session-manager.ts b/packages/wdk/src/session/session-manager.ts index 0f649a5e9..e90cc71db 100644 --- a/packages/wdk/src/session/session-manager.ts +++ b/packages/wdk/src/session/session-manager.ts @@ -136,7 +136,7 @@ export class SessionManager implements SapientSigner { payload.calls.map(async (call) => { for (const signer of signers) { if (await signer.supportedCall(wallet, chainId, call, this._provider)) { - const signature = await signer.signCall(wallet, chainId, call, this._provider) + const signature = await signer.signCall(wallet, chainId, call, payload, this._provider) return { ...signature, signer: signer.address, From 5730c783a70038c6247ee1729e07970a61d0cf29 Mon Sep 17 00:00:00 2001 From: Michael Standen Date: Thu, 6 Mar 2025 12:27:08 +1300 Subject: [PATCH 176/439] Update session manager deployment address --- packages/wdk/src/session/session-manager.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/wdk/src/session/session-manager.ts b/packages/wdk/src/session/session-manager.ts index e90cc71db..99f7d7505 100644 --- a/packages/wdk/src/session/session-manager.ts +++ b/packages/wdk/src/session/session-manager.ts @@ -17,7 +17,7 @@ type SessionManagerConfiguration = { address?: Address.Address } -const DEFAULT_SESSION_MANAGER_ADDRESS: Address.Address = '0x3e1b5D56980B339B410B57e5Dd3d3FA93FF14C4F' +const DEFAULT_SESSION_MANAGER_ADDRESS: Address.Address = '0x0D3b3497f4B7E99239aE748Fc45216F45431B105' export class SessionManager implements SapientSigner { readonly address: Address.Address From 1c6fcf7cd4af55389c8e56315c52bdde4f89e21e Mon Sep 17 00:00:00 2001 From: Agusx1211 Date: Thu, 6 Mar 2025 11:02:18 +0000 Subject: [PATCH 177/439] Config -> GenericTree --- .../primitives-cli/src/subcommands/session.ts | 4 +- packages/primitives/src/config.ts | 43 ------------------- packages/primitives/src/generic-tree.ts | 39 +++++++++++++++++ packages/primitives/src/index.ts | 2 +- packages/primitives/src/session-config.ts | 10 ++--- packages/wdk/src/session/session-manager.ts | 4 +- 6 files changed, 49 insertions(+), 53 deletions(-) delete mode 100644 packages/primitives/src/config.ts create mode 100644 packages/primitives/src/generic-tree.ts diff --git a/packages/primitives-cli/src/subcommands/session.ts b/packages/primitives-cli/src/subcommands/session.ts index 9c12142c3..d1ff07196 100644 --- a/packages/primitives-cli/src/subcommands/session.ts +++ b/packages/primitives-cli/src/subcommands/session.ts @@ -3,7 +3,7 @@ import { CommandModule } from 'yargs' import sessionExplicitCommand from './sessionExplicit' import sessionImplicitCommand from './sessionImplicit' -import { Config, SessionConfig, SessionSignature, WalletConfig } from '@0xsequence/sequence-primitives' +import { GenericTree, SessionConfig, SessionSignature, WalletConfig } from '@0xsequence/sequence-primitives' export async function doEmptyTopology(identitySigner: `0x${string}`): Promise { const topology = SessionConfig.emptySessionsTopology(identitySigner) @@ -36,7 +36,7 @@ export async function doEncodeSessionCallSignatures( export async function doImageHash(sessionConfigurationInput: string): Promise { const sessionConfiguration = SessionConfig.sessionsTopologyFromJson(sessionConfigurationInput) const configurationTree = SessionConfig.sessionsTopologyToConfigurationTree(sessionConfiguration) - const hash = Config.hashConfigurationTree(configurationTree) + const hash = GenericTree.hash(configurationTree) return Hex.from(hash) } diff --git a/packages/primitives/src/config.ts b/packages/primitives/src/config.ts deleted file mode 100644 index 575f90153..000000000 --- a/packages/primitives/src/config.ts +++ /dev/null @@ -1,43 +0,0 @@ -import { Bytes, Hash, Hex } from 'ox' - -// An encoded configuration tree is a generic configuration tree that has been encoded into a bytes sequence. -// It can be used to represent a configuration tree in a compact form. -// Implementations are free to use any encoding they want, as long as the encoding is consistent and can be decoded. - -export type EncodedConfigurationLeaf = Bytes.Bytes -export type EncodedConfigurationBranch = [ - EncodedConfigurationTree, - EncodedConfigurationTree, - ...EncodedConfigurationTree[], -] -export type EncodedConfigurationTree = EncodedConfigurationBranch | EncodedConfigurationLeaf - -export function isEncodedConfigurationBranch(tree: EncodedConfigurationTree): tree is EncodedConfigurationBranch { - return Array.isArray(tree) && tree.length >= 2 && tree.every((child) => isEncodedConfigurationTree(child)) -} - -export function isEncodedConfigurationLeaf(tree: EncodedConfigurationTree): tree is EncodedConfigurationLeaf { - return Bytes.validate(tree) -} - -export function isEncodedConfigurationTree(tree: EncodedConfigurationTree): tree is EncodedConfigurationTree { - return isEncodedConfigurationBranch(tree) || isEncodedConfigurationLeaf(tree) -} - -export function hashConfigurationTree(tree: EncodedConfigurationTree): Bytes.Bytes { - if (isEncodedConfigurationBranch(tree)) { - // Sequentially hash the children - const hashedChildren = tree.map(hashConfigurationTree) - if (hashedChildren.length === 0) { - throw new Error('Empty branch') - } - let hash = hashedChildren[0]! - for (let i = 1; i < hashedChildren.length; i++) { - hash = Hash.keccak256(Bytes.concat(hash, hashedChildren[i]!)) - } - return hash - } - - // Hash the leaf - return Hash.keccak256(tree) -} diff --git a/packages/primitives/src/generic-tree.ts b/packages/primitives/src/generic-tree.ts new file mode 100644 index 000000000..fcef7e265 --- /dev/null +++ b/packages/primitives/src/generic-tree.ts @@ -0,0 +1,39 @@ +import { Bytes, Hash } from 'ox' + +// An encoded configuration tree is a generic configuration tree that has been encoded into a bytes sequence. +// It can be used to represent a configuration tree in a compact form. +// Implementations are free to use any encoding they want, as long as the encoding is consistent and can be decoded. + +export type Leaf = Bytes.Bytes +export type Branch = [Tree, Tree, ...Tree[]] +export type Tree = Branch | Leaf + +export function isBranch(tree: Tree): tree is Branch { + return Array.isArray(tree) && tree.length >= 2 && tree.every((child) => isTree(child)) +} + +export function isLeaf(tree: any): tree is Leaf { + return Bytes.validate(tree) +} + +export function isTree(tree: any): tree is Tree { + return isBranch(tree) || isLeaf(tree) +} + +export function hash(tree: Tree): Bytes.Bytes { + if (isBranch(tree)) { + // Sequentially hash the children + const hashedChildren = tree.map(hash) + if (hashedChildren.length === 0) { + throw new Error('Empty branch') + } + let chash = hashedChildren[0]! + for (let i = 1; i < hashedChildren.length; i++) { + chash = Hash.keccak256(Bytes.concat(chash, hashedChildren[i]!)) + } + return chash + } + + // Hash the leaf + return Hash.keccak256(tree) +} diff --git a/packages/primitives/src/index.ts b/packages/primitives/src/index.ts index b5d716ebe..5d3c53e66 100644 --- a/packages/primitives/src/index.ts +++ b/packages/primitives/src/index.ts @@ -1,6 +1,5 @@ export * as Address from './address' export * as Attestation from './attestation' -export * as Config from './config' export * as Constants from './constants' export * as Erc6492 from './erc-6492' export * as Payload from './payload' @@ -12,3 +11,4 @@ export * as Utils from './utils' export * as WalletConfig from './wallet-config' export * as Context from './context' export * as Extensions from './extensions/index' +export * as GenericTree from './generic-tree' diff --git a/packages/primitives/src/session-config.ts b/packages/primitives/src/session-config.ts index 801dd34cf..d0731c049 100644 --- a/packages/primitives/src/session-config.ts +++ b/packages/primitives/src/session-config.ts @@ -1,5 +1,5 @@ import { Address, Bytes, Hash } from 'ox' -import { EncodedConfigurationBranch, EncodedConfigurationTree, isEncodedConfigurationBranch } from './config' +import * as GenericTree from './generic-tree' import { encodeSessionPermissions, encodeSessionPermissionsForJson, @@ -220,9 +220,9 @@ export function decodeLeafFromBytes(bytes: Bytes.Bytes): SessionLeaf { throw new Error('Invalid leaf') } -export function sessionsTopologyToConfigurationTree(topology: SessionsTopology): EncodedConfigurationTree { +export function sessionsTopologyToConfigurationTree(topology: SessionsTopology): GenericTree.Tree { if (isSessionsBranch(topology)) { - return topology.map(sessionsTopologyToConfigurationTree) as EncodedConfigurationBranch + return topology.map(sessionsTopologyToConfigurationTree) as GenericTree.Branch } if (isImplicitBlacklist(topology) || isIdentitySignerLeaf(topology) || isSessionPermissions(topology)) { return encodeLeafToBytes(topology) @@ -234,8 +234,8 @@ export function sessionsTopologyToConfigurationTree(topology: SessionsTopology): throw new Error('Invalid topology') } -export function configurationTreeToSessionsTopology(tree: EncodedConfigurationTree): SessionsTopology { - if (isEncodedConfigurationBranch(tree)) { +export function configurationTreeToSessionsTopology(tree: GenericTree.Tree): SessionsTopology { + if (GenericTree.isBranch(tree)) { return tree.map(configurationTreeToSessionsTopology) as SessionBranch } diff --git a/packages/wdk/src/session/session-manager.ts b/packages/wdk/src/session/session-manager.ts index 99f7d7505..8c123d332 100644 --- a/packages/wdk/src/session/session-manager.ts +++ b/packages/wdk/src/session/session-manager.ts @@ -1,12 +1,12 @@ import { SapientSigner, Signers } from '@0xsequence/sequence-core' import { Attestation, - Config, Constants, Payload, SessionConfig, SessionSignature, Signature as SignatureTypes, + GenericTree, } from '@0xsequence/sequence-primitives' import { AbiFunction, Address, Bytes, Hex, Provider, Secp256k1 } from 'ox' import { IdentitySigner } from '../identity' @@ -49,7 +49,7 @@ export class SessionManager implements SapientSigner { get imageHash(): Hex.Hex { const configurationTree = SessionConfig.sessionsTopologyToConfigurationTree(this._topology) - return Hex.fromBytes(Config.hashConfigurationTree(configurationTree)) + return Hex.fromBytes(GenericTree.hash(configurationTree)) } withProvider(provider: Provider.Provider): SessionManager { From 1d5e4933fcced4bab7972d7d140756959d07b519 Mon Sep 17 00:00:00 2001 From: Agusx1211 Date: Thu, 6 Mar 2025 11:05:13 +0000 Subject: [PATCH 178/439] WalletConfig -> Config --- packages/core/src/state/index.ts | 8 ++--- packages/core/src/state/local/index.ts | 26 +++++++-------- packages/core/src/state/local/memory.ts | 8 ++--- packages/core/src/wallet.ts | 33 +++++++++---------- .../primitives-cli/src/subcommands/config.ts | 20 +++++------ .../src/subcommands/devTools.ts | 8 ++--- .../primitives-cli/src/subcommands/session.ts | 2 +- .../src/subcommands/signature.ts | 8 ++--- packages/primitives/src/address.ts | 4 +-- .../src/{wallet-config.ts => config.ts} | 24 +++++++------- packages/primitives/src/index.ts | 2 +- packages/primitives/src/signature.ts | 14 ++++---- 12 files changed, 77 insertions(+), 80 deletions(-) rename packages/primitives/src/{wallet-config.ts => config.ts} (96%) diff --git a/packages/core/src/state/index.ts b/packages/core/src/state/index.ts index a7274d648..1208be114 100644 --- a/packages/core/src/state/index.ts +++ b/packages/core/src/state/index.ts @@ -1,10 +1,10 @@ import { Address, Hex } from 'ox' -import { Context, WalletConfig, Payload, Signature } from '@0xsequence/sequence-primitives' +import { Context, Config, Payload, Signature } from '@0xsequence/sequence-primitives' export type Provider = Reader & Writer export interface Reader { - getConfiguration(imageHash: Hex.Hex): MaybePromise + getConfiguration(imageHash: Hex.Hex): MaybePromise getDeploy(wallet: Address.Address): MaybePromise<{ imageHash: Hex.Hex; context: Context.Context } | undefined> @@ -24,7 +24,7 @@ export interface Reader { } export interface Writer { - saveWallet(deployConfiguration: WalletConfig.Configuration, context: Context.Context): MaybePromise + saveWallet(deployConfiguration: Config.Config, context: Context.Context): MaybePromise saveWitnesses( wallet: Address.Address, @@ -35,7 +35,7 @@ export interface Writer { saveUpdate( wallet: Address.Address, - configuration: WalletConfig.Configuration, + configuration: Config.Config, signature: Signature.RawSignature, ): MaybePromise } diff --git a/packages/core/src/state/local/index.ts b/packages/core/src/state/local/index.ts index 9797872cb..d5683c17c 100644 --- a/packages/core/src/state/local/index.ts +++ b/packages/core/src/state/local/index.ts @@ -2,7 +2,7 @@ import { Context, Payload, Signature, - WalletConfig, + Config, Address as SequenceAddress, Extensions, } from '@0xsequence/sequence-primitives' @@ -12,8 +12,8 @@ import { MemoryStore } from './memory' export interface Store { // top level configurations store - loadConfig: (imageHash: Hex.Hex) => Promise - saveConfig: (imageHash: Hex.Hex, config: WalletConfig.Configuration) => Promise + loadConfig: (imageHash: Hex.Hex) => Promise + saveConfig: (imageHash: Hex.Hex, config: Config.Config) => Promise // counterfactual wallets loadCounterfactualWallet: ( @@ -63,22 +63,22 @@ export class Provider implements ProviderInterface { public readonly extensions: Extensions.Extensions = Extensions.Dev1, ) {} - getConfiguration(imageHash: Hex.Hex): Promise { + getConfiguration(imageHash: Hex.Hex): Promise { return this.store.loadConfig(imageHash) } - async saveWallet(deployConfiguration: WalletConfig.Configuration, context: Context.Context): Promise { + async saveWallet(deployConfiguration: Config.Config, context: Context.Context): Promise { // Save both the configuration and the deploy hash await this.saveConfig(deployConfiguration) - const imageHash = WalletConfig.hashConfiguration(deployConfiguration) + const imageHash = Config.hashConfiguration(deployConfiguration) await this.saveCounterfactualWallet(SequenceAddress.from(imageHash, context), Hex.fromBytes(imageHash), context) } - async saveConfig(config: WalletConfig.Configuration): Promise { - const imageHash = Bytes.toHex(WalletConfig.hashConfiguration(config)) + async saveConfig(config: Config.Config): Promise { + const imageHash = Bytes.toHex(Config.hashConfiguration(config)) const previous = await this.store.loadConfig(imageHash) if (previous) { - const combined = WalletConfig.mergeTopology(previous.topology, config.topology) + const combined = Config.mergeTopology(previous.topology, config.topology) return this.store.saveConfig(imageHash, { ...previous, topology: combined }) } else { return this.store.saveConfig(imageHash, config) @@ -154,7 +154,7 @@ export class Provider implements ProviderInterface { return [] } - const { signers, sapientSigners } = WalletConfig.getSigners(fromConfig) + const { signers, sapientSigners } = Config.getSigners(fromConfig) const subdigestsOfSigner = await Promise.all([ ...signers.map((s) => this.store.loadSubdigestsOfSigner(s)), ...sapientSigners.map((s) => this.store.loadSubdigestsOfSapientSigner(s.address, Hex.fromBytes(s.imageHash))), @@ -233,7 +233,7 @@ export class Provider implements ProviderInterface { let totalWeight = 0n const encoded = Signature.fillLeaves(fromConfig.topology, (leaf) => { - if (WalletConfig.isSapientSignerLeaf(leaf)) { + if (Config.isSapientSignerLeaf(leaf)) { const sapientSignature = signaturesOfSigners.find( ({ signer, imageHash }: { signer: Address.Address; imageHash?: Bytes.Bytes }) => { return imageHash && signer === leaf.address && imageHash === leaf.imageHash @@ -290,10 +290,10 @@ export class Provider implements ProviderInterface { async saveUpdate( wallet: Address.Address, - configuration: WalletConfig.Configuration, + configuration: Config.Config, signature: Signature.RawSignature, ): Promise { - const nextImageHash = Bytes.toHex(WalletConfig.hashConfiguration(configuration)) + const nextImageHash = Bytes.toHex(Config.hashConfiguration(configuration)) const payload: Payload.ConfigUpdate = { type: 'config-update', imageHash: nextImageHash, diff --git a/packages/core/src/state/local/memory.ts b/packages/core/src/state/local/memory.ts index f91b708b5..ed3439819 100644 --- a/packages/core/src/state/local/memory.ts +++ b/packages/core/src/state/local/memory.ts @@ -1,9 +1,9 @@ -import { Context, Payload, Signature, WalletConfig } from '@0xsequence/sequence-primitives' +import { Context, Payload, Signature, Config } from '@0xsequence/sequence-primitives' import { Address, Hex } from 'ox' import { Store } from './index' export class MemoryStore implements Store { - private configs = new Map<`0x${string}`, WalletConfig.Configuration>() + private configs = new Map<`0x${string}`, Config.Config>() private counterfactualWallets = new Map<`0x${string}`, { imageHash: Hex.Hex; context: Context.Context }>() private payloads = new Map<`0x${string}`, { content: Payload.Parented; chainId: bigint; wallet: Address.Address }>() private signerSubdigests = new Map>() @@ -20,11 +20,11 @@ export class MemoryStore implements Store { return `${signer.toLowerCase()}-${imageHash.toLowerCase()}-${subdigest.toLowerCase()}` } - async loadConfig(imageHash: Hex.Hex): Promise { + async loadConfig(imageHash: Hex.Hex): Promise { return this.configs.get(imageHash.toLowerCase() as `0x${string}`) } - async saveConfig(imageHash: Hex.Hex, config: WalletConfig.Configuration): Promise { + async saveConfig(imageHash: Hex.Hex, config: Config.Config): Promise { this.configs.set(imageHash.toLowerCase() as `0x${string}`, config) } diff --git a/packages/core/src/wallet.ts b/packages/core/src/wallet.ts index 218dcccb6..fe885a236 100644 --- a/packages/core/src/wallet.ts +++ b/packages/core/src/wallet.ts @@ -3,7 +3,7 @@ import * as State from './state' import { Constants, Context, - WalletConfig, + Config, Address as SequenceAddress, Erc6492, Payload, @@ -13,7 +13,7 @@ import { export type WalletOptions = { context: Context.Context stateProvider: State.Provider - onSignerError?: WalletConfig.SignerErrorCallback + onSignerError?: Config.SignerErrorCallback guest: Address.Address } @@ -28,7 +28,7 @@ export type WalletStatus = { isDeployed: boolean implementation?: Address.Address stage?: 'stage1' | 'stage2' - configuration: WalletConfig.Configuration + configuration: Config.Config imageHash: Hex.Hex /** Pending updates in reverse chronological order (newest first) */ pendingUpdates: Array<{ imageHash: Hex.Hex; signature: SequenceSignature.RawSignature }> @@ -47,10 +47,7 @@ export class Wallet { this.options = { ...DefaultWalletOptions, ...options } } - static async fromConfiguration( - configuration: WalletConfig.Configuration, - options?: Partial, - ): Promise { + static async fromConfiguration(configuration: Config.Config, options?: Partial): Promise { const merged = { ...DefaultWalletOptions, ...options } await merged.stateProvider.saveWallet(configuration, merged.context) return new Wallet(SequenceAddress.from(configuration, merged.context), merged) @@ -96,10 +93,10 @@ export class Wallet { } async setConfiguration( - configuration: WalletConfig.Configuration, - options?: { trustSigners?: boolean; onSignerError?: WalletConfig.SignerErrorCallback }, + configuration: Config.Config, + options?: { trustSigners?: boolean; onSignerError?: Config.SignerErrorCallback }, ) { - const imageHash = WalletConfig.hashConfiguration(configuration) + const imageHash = Config.hashConfiguration(configuration) const signature = await this.sign(Payload.fromConfigUpdate(Bytes.toHex(imageHash)), options) await this.options.stateProvider.saveUpdate(this.address, configuration, signature) } @@ -190,7 +187,7 @@ export class Wallet { async send( provider: Provider.Provider, calls: Payload.Call[], - options?: { space?: bigint; trustSigners?: boolean; onSignerError?: WalletConfig.SignerErrorCallback }, + options?: { space?: bigint; trustSigners?: boolean; onSignerError?: Config.SignerErrorCallback }, ) { return provider.request({ method: 'eth_sendTransaction', @@ -201,7 +198,7 @@ export class Wallet { async getTransaction( provider: Provider.Provider, calls: Payload.Call[], - options?: { space?: bigint; trustSigners?: boolean; onSignerError?: WalletConfig.SignerErrorCallback }, + options?: { space?: bigint; trustSigners?: boolean; onSignerError?: Config.SignerErrorCallback }, ): Promise<{ to: Address.Address; data: Hex.Hex }> { const space = options?.space ?? 0n @@ -279,7 +276,7 @@ export class Wallet { skip6492?: boolean provider?: Provider.Provider trustSigners?: boolean - onSignerError?: WalletConfig.SignerErrorCallback + onSignerError?: Config.SignerErrorCallback }, ): Promise { const provider = options?.provider @@ -302,7 +299,7 @@ export class Wallet { const configuration = status.configuration const updates = status.pendingUpdates - const topology = await WalletConfig.sign( + const topology = await Config.sign( configuration.topology, { sign: (leaf) => { @@ -314,7 +311,7 @@ export class Wallet { throw new Error(`${leaf.address} does not implement Signer.sign()`) } - const signature = WalletConfig.normalizeSignerSignature(signer.signer.sign(this.address, chainId, payload)) + const signature = Config.normalizeSignerSignature(signer.signer.sign(this.address, chainId, payload)) signature.signature = signature.signature.then((signature) => { if (signature.type === 'erc1271') { @@ -392,7 +389,7 @@ export class Wallet { throw new Error(`${leaf.address} does not implement Signer.signSapient()`) } - const signature = WalletConfig.normalizeSignerSignature( + const signature = Config.normalizeSignerSignature( signer.signer.signSapient(this.address, chainId, payload, Bytes.toHex(leaf.imageHash)), ) @@ -495,7 +492,7 @@ export interface Signer { wallet: Address.Address, chainId: bigint, payload: Payload.Parented, - ) => WalletConfig.SignerSignature + ) => Config.SignerSignature } export interface SapientSigner { @@ -507,7 +504,7 @@ export interface SapientSigner { chainId: bigint, payload: Payload.Parented, imageHash: Hex.Hex, - ) => WalletConfig.SignerSignature + ) => Config.SignerSignature } type MaybePromise = T | Promise diff --git a/packages/primitives-cli/src/subcommands/config.ts b/packages/primitives-cli/src/subcommands/config.ts index ffd4b3ff3..8e41def4b 100644 --- a/packages/primitives-cli/src/subcommands/config.ts +++ b/packages/primitives-cli/src/subcommands/config.ts @@ -1,7 +1,7 @@ import type { CommandModule } from 'yargs' import { Address, Bytes, Hex } from 'ox' import { fromPosOrStdin } from '../utils' -import { Signature, WalletConfig } from '@0xsequence/sequence-primitives' +import { Signature, Config } from '@0xsequence/sequence-primitives' export const PossibleElements = [ { @@ -36,8 +36,8 @@ export const PossibleElements = [ }, ] -function parseElements(elements: string): WalletConfig.Leaf[] { - const leaves: WalletConfig.Leaf[] = [] +function parseElements(elements: string): Config.Leaf[] { + const leaves: Config.Leaf[] = [] let remainingElements = elements // Split by space and get first element @@ -89,7 +89,7 @@ function parseElements(elements: string): WalletConfig.Leaf[] { type: 'nested', threshold: BigInt(threshold!), weight: BigInt(weight!), - tree: WalletConfig.flatLeavesToTopology(parseElements(innerSubElements)), + tree: Config.flatLeavesToTopology(parseElements(innerSubElements)), }) remainingElements = remainingElements.slice(endSubElements + 1).trim() } else if (firstElementType === 'node') { @@ -111,24 +111,24 @@ export async function createConfig(options: { content: string[] }): Promise { const leaves = parseElements(options.content.join(' ')) - const config: WalletConfig.Configuration = { + const config: Config.Config = { threshold: BigInt(options.threshold), checkpoint: BigInt(options.checkpoint), // Starts with empty topology - topology: WalletConfig.flatLeavesToTopology(leaves), + topology: Config.flatLeavesToTopology(leaves), checkpointer: undefined, } - return WalletConfig.configToJson(config) + return Config.configToJson(config) } export async function calculateImageHash(input: string): Promise { - const config = WalletConfig.configFromJson(input) - return Hex.fromBytes(WalletConfig.hashConfiguration(config)) + const config = Config.configFromJson(input) + return Hex.fromBytes(Config.hashConfiguration(config)) } export async function doEncode(input: string): Promise { - const configuration = WalletConfig.configFromJson(input) + const configuration = Config.configFromJson(input) return Hex.fromBytes(Signature.encodeSignature({ noChainId: true, configuration })) } diff --git a/packages/primitives-cli/src/subcommands/devTools.ts b/packages/primitives-cli/src/subcommands/devTools.ts index bd1694822..c53743905 100644 --- a/packages/primitives-cli/src/subcommands/devTools.ts +++ b/packages/primitives-cli/src/subcommands/devTools.ts @@ -1,4 +1,4 @@ -import { Permission, SessionConfig, WalletConfig } from '@0xsequence/sequence-primitives' +import { Permission, SessionConfig, Config } from '@0xsequence/sequence-primitives' import crypto from 'crypto' import type { CommandModule } from 'yargs' @@ -50,7 +50,7 @@ function randomAddress(options?: RandomOptions): `0x${string}` { return `0x${Buffer.from(randomBytes(20, options)).toString('hex')}` } -function generateRandomTopology(depth: number, options?: RandomOptions): WalletConfig.Topology { +function generateRandomTopology(depth: number, options?: RandomOptions): Config.Topology { if (depth <= 0) { const leafType = Math.floor((options?.seededRandom ?? Math.random)() * 5) @@ -132,7 +132,7 @@ async function generateRandomRule(options?: RandomOptions): Promise { - const config: WalletConfig.Configuration = { + const config: Config.Config = { threshold: randomBigInt(100n, options), checkpoint: randomBigInt(1000n, options), topology: generateRandomTopology(maxDepth, options), @@ -148,7 +148,7 @@ export async function doRandomConfig(maxDepth: number, options?: RandomOptions): } })(), } - return WalletConfig.configToJson(config) + return Config.configToJson(config) } export async function doRandomSessionTopology(maxDepth: number, options?: RandomOptions): Promise { diff --git a/packages/primitives-cli/src/subcommands/session.ts b/packages/primitives-cli/src/subcommands/session.ts index d1ff07196..96679e8ed 100644 --- a/packages/primitives-cli/src/subcommands/session.ts +++ b/packages/primitives-cli/src/subcommands/session.ts @@ -3,7 +3,7 @@ import { CommandModule } from 'yargs' import sessionExplicitCommand from './sessionExplicit' import sessionImplicitCommand from './sessionImplicit' -import { GenericTree, SessionConfig, SessionSignature, WalletConfig } from '@0xsequence/sequence-primitives' +import { GenericTree, SessionConfig, SessionSignature, Config } from '@0xsequence/sequence-primitives' export async function doEmptyTopology(identitySigner: `0x${string}`): Promise { const topology = SessionConfig.emptySessionsTopology(identitySigner) diff --git a/packages/primitives-cli/src/subcommands/signature.ts b/packages/primitives-cli/src/subcommands/signature.ts index 7c02c7c62..2782d8744 100644 --- a/packages/primitives-cli/src/subcommands/signature.ts +++ b/packages/primitives-cli/src/subcommands/signature.ts @@ -12,7 +12,7 @@ import { fromPosOrStdin } from '../utils' // } from '@0xsequence/sequence-primitives' import { PossibleElements } from './config' import { Bytes, Hex, Signature as OxSignature } from 'ox' -import { Signature, WalletConfig } from '@0xsequence/sequence-primitives' +import { Signature, Config } from '@0xsequence/sequence-primitives' const SignatureElements = [ { @@ -43,7 +43,7 @@ const SignatureElements = [ ] export async function doEncode(input: string, signatures: string[] = [], noChainId: boolean): Promise { - const config = WalletConfig.configFromJson(input) + const config = Config.configFromJson(input) const allSignatures = signatures.map((s) => { const values = s.split(':') @@ -55,7 +55,7 @@ export async function doEncode(input: string, signatures: string[] = [], noChain }) const fullTopology = Signature.fillLeaves(config.topology, (leaf) => { - if (WalletConfig.isSignerLeaf(leaf)) { + if (Config.isSignerLeaf(leaf)) { // Type must be 1271, eth_sign, or hash const candidate = allSignatures.find((s) => s.address === leaf.address) @@ -96,7 +96,7 @@ export async function doEncode(input: string, signatures: string[] = [], noChain throw new Error(`Unsupported signature type: ${candidate.type}`) } - if (WalletConfig.isSapientSignerLeaf(leaf)) { + if (Config.isSapientSignerLeaf(leaf)) { const candidate = allSignatures.find((s) => s.address === leaf.address) if (!candidate) { return undefined diff --git a/packages/primitives/src/address.ts b/packages/primitives/src/address.ts index 80f43553d..9d7f207a4 100644 --- a/packages/primitives/src/address.ts +++ b/packages/primitives/src/address.ts @@ -1,8 +1,8 @@ import { Address, Bytes, Hash } from 'ox' import { Context } from './context' -import { Configuration, hashConfiguration } from './wallet-config' +import { Config, hashConfiguration } from './config' -export function from(configuration: Bytes.Bytes | Configuration, context: Context): Address.Address { +export function from(configuration: Bytes.Bytes | Config, context: Context): Address.Address { const imageHash = configuration instanceof Uint8Array ? configuration : hashConfiguration(configuration) return Bytes.toHex( diff --git a/packages/primitives/src/wallet-config.ts b/packages/primitives/src/config.ts similarity index 96% rename from packages/primitives/src/wallet-config.ts rename to packages/primitives/src/config.ts index bf3ec62b1..498a7ca58 100644 --- a/packages/primitives/src/wallet-config.ts +++ b/packages/primitives/src/config.ts @@ -1,11 +1,11 @@ import { Address, Bytes, Hash, Hex } from 'ox' import { - isRawConfiguration, + isRawConfig, isRawNestedLeaf, isRawSignerLeaf, isSignedSapientSignerLeaf, isSignedSignerLeaf, - RawConfiguration, + RawConfig, RawTopology, SignatureOfSapientSignerLeaf, SignatureOfSignerLeaf, @@ -53,7 +53,7 @@ export type Leaf = SignerLeaf | SapientSignerLeaf | SubdigestLeaf | AnyAddressSu export type Topology = Node | Leaf -export type Configuration = { +export type Config = { threshold: bigint checkpoint: bigint topology: Topology @@ -88,7 +88,7 @@ export function isNode(cand: any): cand is Node { return Array.isArray(cand) && cand.length === 2 && isTopology(cand[0]) && isTopology(cand[1]) } -export function isConfiguration(cand: any): cand is Configuration { +export function isConfig(cand: any): cand is Config { return typeof cand === 'object' && 'threshold' in cand && 'checkpoint' in cand && 'topology' in cand } @@ -107,7 +107,7 @@ export function isTopology(cand: any): cand is Topology { return isNode(cand) || isLeaf(cand) } -export function getSigners(configuration: Configuration | Topology): { +export function getSigners(configuration: Config | Topology): { signers: Address.Address[] sapientSigners: { address: Address.Address; imageHash: Bytes.Bytes }[] isComplete: boolean @@ -136,15 +136,15 @@ export function getSigners(configuration: Configuration | Topology): { } } - scan(isConfiguration(configuration) ? configuration.topology : configuration) + scan(isConfig(configuration) ? configuration.topology : configuration) return { signers: Array.from(signers), sapientSigners: Array.from(sapientSigners), isComplete } } export function getWeight( - topology: RawTopology | RawConfiguration, + topology: RawTopology | RawConfig, canSign?: (signer: SignerLeaf | SapientSignerLeaf) => boolean, ): { weight: bigint; maxWeight: bigint } { - topology = isRawConfiguration(topology) ? topology.topology : topology + topology = isRawConfig(topology) ? topology.topology : topology canSign = canSign || ((_signer: SignerLeaf | SapientSignerLeaf) => true) if (isSignedSignerLeaf(topology)) { @@ -175,8 +175,8 @@ export function getWeight( } } -export function hashConfiguration(topology: Topology | Configuration): Bytes.Bytes { - if (isConfiguration(topology)) { +export function hashConfiguration(topology: Topology | Config): Bytes.Bytes { + if (isConfig(topology)) { let root = hashConfiguration(topology.topology) root = Hash.keccak256(Bytes.concat(root, Bytes.padLeft(Bytes.fromNumber(topology.threshold), 32))) root = Hash.keccak256(Bytes.concat(root, Bytes.padLeft(Bytes.fromNumber(topology.checkpoint), 32))) @@ -259,7 +259,7 @@ export function flatLeavesToTopology(leaves: Leaf[]): Topology { ] } -export function configToJson(config: Configuration): string { +export function configToJson(config: Config): string { return JSON.stringify({ threshold: config.threshold.toString(), checkpoint: config.checkpoint.toString(), @@ -268,7 +268,7 @@ export function configToJson(config: Configuration): string { }) } -export function configFromJson(json: string): Configuration { +export function configFromJson(json: string): Config { const parsed = JSON.parse(json) return { threshold: BigInt(parsed.threshold), diff --git a/packages/primitives/src/index.ts b/packages/primitives/src/index.ts index 5d3c53e66..31f0fd05b 100644 --- a/packages/primitives/src/index.ts +++ b/packages/primitives/src/index.ts @@ -8,7 +8,7 @@ export * as SessionConfig from './session-config' export * as SessionSignature from './session-signature' export * as Signature from './signature' //FIXME This name conflicts with oxlib export * as Utils from './utils' -export * as WalletConfig from './wallet-config' +export * as Config from './config' export * as Context from './context' export * as Extensions from './extensions/index' export * as GenericTree from './generic-tree' diff --git a/packages/primitives/src/signature.ts b/packages/primitives/src/signature.ts index 8f65f7274..72aeddbb8 100644 --- a/packages/primitives/src/signature.ts +++ b/packages/primitives/src/signature.ts @@ -1,6 +1,6 @@ import { AbiFunction, AbiParameters, Address, Bytes, Hash, Hex, Provider, Secp256k1, Signature } from 'ox' import { - Configuration, + Config, Leaf, NestedLeaf, SapientSignerLeaf, @@ -17,7 +17,7 @@ import { isSubdigestLeaf, isAnyAddressSubdigestLeaf, isTopology, -} from './wallet-config' +} from './config' import { IS_VALID_SAPIENT_SIGNATURE, IS_VALID_SAPIENT_SIGNATURE_COMPACT, IS_VALID_SIGNATURE } from './constants' import { wrap, decode } from './erc-6492' import { fromConfigUpdate, hash, Parented } from './payload' @@ -86,7 +86,7 @@ export type RawNode = [RawTopology, RawTopology] export type RawTopology = RawNode | RawLeaf -export type RawConfiguration = { +export type RawConfig = { threshold: bigint checkpoint: bigint topology: RawTopology @@ -96,7 +96,7 @@ export type RawConfiguration = { export type RawSignature = { noChainId: boolean checkpointerData?: Bytes.Bytes - configuration: RawConfiguration + configuration: RawConfig suffix?: RawSignature[] erc6492?: { to: Address.Address; data: Bytes.Bytes } } @@ -117,7 +117,7 @@ export function isRawSignature(signature: any): signature is RawSignature { signature && typeof signature.noChainId === 'boolean' && (signature.checkpointerData === undefined || Bytes.validate(signature.checkpointerData)) && - isRawConfiguration(signature.configuration) && + isRawConfig(signature.configuration) && (signature.suffix === undefined || (Array.isArray(signature.suffix) && signature.suffix.every( @@ -126,7 +126,7 @@ export function isRawSignature(signature: any): signature is RawSignature { ) } -export function isRawConfiguration(configuration: any): configuration is RawConfiguration { +export function isRawConfig(configuration: any): configuration is RawConfig { return ( typeof configuration === 'object' && configuration && @@ -1092,7 +1092,7 @@ export async function recover( options?: { provider?: Provider.Provider | { provider: Provider.Provider; block: number } | 'assume-valid' | 'assume-invalid' }, -): Promise<{ configuration: Configuration; weight: bigint }> { +): Promise<{ configuration: Config; weight: bigint }> { if (signature.suffix?.length) { let invalid = false From 1fa82575ab4e835566a41bff40ea75b2efd5921f Mon Sep 17 00:00:00 2001 From: Agusx1211 Date: Thu, 6 Mar 2025 11:13:24 +0000 Subject: [PATCH 179/439] Add generic tree to tracker --- packages/core/src/state/index.ts | 6 +++++- packages/core/src/state/local/index.ts | 13 +++++++++++++ packages/core/src/state/local/memory.ts | 12 +++++++++++- 3 files changed, 29 insertions(+), 2 deletions(-) diff --git a/packages/core/src/state/index.ts b/packages/core/src/state/index.ts index 1208be114..de62c5bc2 100644 --- a/packages/core/src/state/index.ts +++ b/packages/core/src/state/index.ts @@ -1,5 +1,5 @@ import { Address, Hex } from 'ox' -import { Context, Config, Payload, Signature } from '@0xsequence/sequence-primitives' +import { Context, Config, Payload, Signature, GenericTree } from '@0xsequence/sequence-primitives' export type Provider = Reader & Writer @@ -21,6 +21,8 @@ export interface Reader { fromImageHash: Hex.Hex, options?: { allUpdates?: boolean }, ): MaybePromise> + + getTree(rootHash: Hex.Hex): MaybePromise } export interface Writer { @@ -38,6 +40,8 @@ export interface Writer { configuration: Config.Config, signature: Signature.RawSignature, ): MaybePromise + + saveTree(tree: GenericTree.Tree): MaybePromise } type MaybePromise = T | Promise diff --git a/packages/core/src/state/local/index.ts b/packages/core/src/state/local/index.ts index d5683c17c..ac5244c43 100644 --- a/packages/core/src/state/local/index.ts +++ b/packages/core/src/state/local/index.ts @@ -5,6 +5,7 @@ import { Config, Address as SequenceAddress, Extensions, + GenericTree, } from '@0xsequence/sequence-primitives' import { Address, Bytes, Hex, PersonalMessage, Secp256k1 } from 'ox' import { Provider as ProviderInterface } from '..' @@ -55,6 +56,10 @@ export interface Store { imageHash: Hex.Hex, signature: Signature.SignatureOfSapientSignerLeaf, ) => Promise + + // generic trees + loadTree: (rootHash: Hex.Hex) => Promise + saveTree: (rootHash: Hex.Hex, tree: GenericTree.Tree) => Promise } export class Provider implements ProviderInterface { @@ -354,6 +359,14 @@ export class Provider implements ProviderInterface { } } } + + getTree(rootHash: Hex.Hex): GenericTree.Tree | Promise | undefined { + return this.store.loadTree(rootHash) + } + + saveTree(tree: GenericTree.Tree): void | Promise { + return this.store.saveTree(Bytes.toHex(GenericTree.hash(tree)), tree) + } } type Unpromise = T extends Promise ? S : T diff --git a/packages/core/src/state/local/memory.ts b/packages/core/src/state/local/memory.ts index ed3439819..fed7de6d2 100644 --- a/packages/core/src/state/local/memory.ts +++ b/packages/core/src/state/local/memory.ts @@ -1,4 +1,4 @@ -import { Context, Payload, Signature, Config } from '@0xsequence/sequence-primitives' +import { Context, Payload, Signature, Config, GenericTree } from '@0xsequence/sequence-primitives' import { Address, Hex } from 'ox' import { Store } from './index' @@ -12,6 +12,8 @@ export class MemoryStore implements Store { private sapientSignerSubdigests = new Map>() private sapientSignatures = new Map<`0x${string}`, Signature.SignatureOfSapientSignerLeaf>() + private trees = new Map<`0x${string}`, GenericTree.Tree>() + private getSignatureKey(signer: Address.Address, subdigest: Hex.Hex): string { return `${signer.toLowerCase()}-${subdigest.toLowerCase()}` } @@ -113,4 +115,12 @@ export class MemoryStore implements Store { } this.sapientSignerSubdigests.get(signerKey)!.add(subdigestKey) } + + async loadTree(rootHash: Hex.Hex): Promise { + return this.trees.get(rootHash.toLowerCase() as `0x${string}`) + } + + async saveTree(rootHash: Hex.Hex, tree: GenericTree.Tree): Promise { + this.trees.set(rootHash.toLowerCase() as `0x${string}`, tree) + } } From 9d4811ce7f759f2575a41ffe4cb76a0b2e3597fe Mon Sep 17 00:00:00 2001 From: Agusx1211 Date: Thu, 6 Mar 2025 11:34:48 +0000 Subject: [PATCH 180/439] add generic leaves and nodes --- packages/primitives/src/generic-tree.ts | 25 ++++++++++--- packages/primitives/src/session-config.ts | 45 +++++++++++++---------- 2 files changed, 46 insertions(+), 24 deletions(-) diff --git a/packages/primitives/src/generic-tree.ts b/packages/primitives/src/generic-tree.ts index fcef7e265..dca9b4617 100644 --- a/packages/primitives/src/generic-tree.ts +++ b/packages/primitives/src/generic-tree.ts @@ -4,20 +4,30 @@ import { Bytes, Hash } from 'ox' // It can be used to represent a configuration tree in a compact form. // Implementations are free to use any encoding they want, as long as the encoding is consistent and can be decoded. -export type Leaf = Bytes.Bytes +export type Leaf = { + type: 'leaf' + value: Bytes.Bytes +} + +export type Node = Bytes.Bytes + export type Branch = [Tree, Tree, ...Tree[]] -export type Tree = Branch | Leaf +export type Tree = Branch | Leaf | Node export function isBranch(tree: Tree): tree is Branch { return Array.isArray(tree) && tree.length >= 2 && tree.every((child) => isTree(child)) } export function isLeaf(tree: any): tree is Leaf { - return Bytes.validate(tree) + return tree.type === 'leaf' && Bytes.validate(tree.value) } export function isTree(tree: any): tree is Tree { - return isBranch(tree) || isLeaf(tree) + return isBranch(tree) || isLeaf(tree) || isNode(tree) +} + +export function isNode(node: any): node is Node { + return Bytes.validate(node) && node.length === 32 } export function hash(tree: Tree): Bytes.Bytes { @@ -34,6 +44,11 @@ export function hash(tree: Tree): Bytes.Bytes { return chash } + // Nodes are already hashed + if (isNode(tree)) { + return tree + } + // Hash the leaf - return Hash.keccak256(tree) + return Hash.keccak256(tree.value) } diff --git a/packages/primitives/src/session-config.ts b/packages/primitives/src/session-config.ts index d0731c049..6247034c0 100644 --- a/packages/primitives/src/session-config.ts +++ b/packages/primitives/src/session-config.ts @@ -182,21 +182,30 @@ export function getSessionPermissions(topology: SessionsTopology, address: Addre * @param leaf The leaf to encode * @returns The encoded leaf */ -export function encodeLeafToBytes(leaf: SessionLeaf): Bytes.Bytes { +export function encodeLeafToGeneric(leaf: SessionLeaf): GenericTree.Leaf { if (isSessionPermissions(leaf)) { - return Bytes.concat(Bytes.fromNumber(SESSIONS_FLAG_PERMISSIONS), encodeSessionPermissions(leaf)) + return { + type: 'leaf', + value: Bytes.concat(Bytes.fromNumber(SESSIONS_FLAG_PERMISSIONS), encodeSessionPermissions(leaf)), + } } if (isImplicitBlacklist(leaf)) { - return Bytes.concat( - Bytes.fromNumber(SESSIONS_FLAG_BLACKLIST), - Bytes.concat(...leaf.blacklist.map((b) => Bytes.padLeft(Bytes.fromHex(b), 20))), - ) + return { + type: 'leaf', + value: Bytes.concat( + Bytes.fromNumber(SESSIONS_FLAG_BLACKLIST), + Bytes.concat(...leaf.blacklist.map((b) => Bytes.padLeft(Bytes.fromHex(b), 20))), + ), + } } if (isIdentitySignerLeaf(leaf)) { - return Bytes.concat( - Bytes.fromNumber(SESSIONS_FLAG_IDENTITY_SIGNER), - Bytes.padLeft(Bytes.fromHex(leaf.identitySigner), 20), - ) + return { + type: 'leaf', + value: Bytes.concat( + Bytes.fromNumber(SESSIONS_FLAG_IDENTITY_SIGNER), + Bytes.padLeft(Bytes.fromHex(leaf.identitySigner), 20), + ), + } } // Unreachable throw new Error('Invalid leaf') @@ -225,7 +234,7 @@ export function sessionsTopologyToConfigurationTree(topology: SessionsTopology): return topology.map(sessionsTopologyToConfigurationTree) as GenericTree.Branch } if (isImplicitBlacklist(topology) || isIdentitySignerLeaf(topology) || isSessionPermissions(topology)) { - return encodeLeafToBytes(topology) + return encodeLeafToGeneric(topology) } if (isSessionsNode(topology)) { // A node is already encoded and hashed @@ -239,13 +248,11 @@ export function configurationTreeToSessionsTopology(tree: GenericTree.Tree): Ses return tree.map(configurationTreeToSessionsTopology) as SessionBranch } - try { - return decodeLeafFromBytes(tree) - } catch (error) { - // If we can't decode it, it's a node. - // This is _probably_ a bug as decoding a node in a configuration tree leads to incomplete topologies. - return tree as SessionNode + if (GenericTree.isNode(tree)) { + throw new Error('Unknown in configuration tree') } + + return decodeLeafFromBytes(tree.value) } // Encoding for contract validation @@ -578,12 +585,12 @@ export function minimiseSessionsTopology( // Don't role it up as signer permissions must be visible return topology } - return Hash.keccak256(encodeLeafToBytes(topology)) + return GenericTree.hash(encodeLeafToGeneric(topology)) } if (isImplicitBlacklist(topology)) { if (implicitSigners.length === 0) { // No implicit signers, so we can roll up the blacklist - return Hash.keccak256(encodeLeafToBytes(topology)) + return GenericTree.hash(encodeLeafToGeneric(topology)) } // If there are implicit signers, we can't roll up the blacklist return topology From 87e11c70e1a08f22915d07775270220e7ae5832b Mon Sep 17 00:00:00 2001 From: Agusx1211 Date: Thu, 6 Mar 2025 15:51:32 +0000 Subject: [PATCH 181/439] Move signer interfaces --- packages/core/src/signers/index.ts | 27 +++++++++++++++++++++++++++ packages/core/src/signers/pk.ts | 2 +- packages/core/src/wallet.ts | 24 +----------------------- 3 files changed, 29 insertions(+), 24 deletions(-) diff --git a/packages/core/src/signers/index.ts b/packages/core/src/signers/index.ts index 299c34286..841cc98da 100644 --- a/packages/core/src/signers/index.ts +++ b/packages/core/src/signers/index.ts @@ -1,3 +1,30 @@ +import { Config, Payload, Signature } from '@0xsequence/sequence-primitives' +import { Address, Hex } from 'ox' + export * from './pk' export * from './passkey' export * as Session from './session' + +export interface Signer { + readonly address: MaybePromise + + sign: ( + wallet: Address.Address, + chainId: bigint, + payload: Payload.Parented, + ) => Config.SignerSignature +} + +export interface SapientSigner { + readonly address: MaybePromise + readonly imageHash: MaybePromise + + signSapient: ( + wallet: Address.Address, + chainId: bigint, + payload: Payload.Parented, + imageHash: Hex.Hex, + ) => Config.SignerSignature +} + +type MaybePromise = T | Promise diff --git a/packages/core/src/signers/pk.ts b/packages/core/src/signers/pk.ts index 3ee2303fa..28298e033 100644 --- a/packages/core/src/signers/pk.ts +++ b/packages/core/src/signers/pk.ts @@ -1,7 +1,7 @@ import type { Payload as PayloadTypes, Signature as SignatureTypes } from '@0xsequence/sequence-primitives' import { Payload } from '@0xsequence/sequence-primitives' import { Address, Bytes, Hex, PublicKey, Secp256k1 } from 'ox' -import { Signer as SignerInterface } from '../wallet' +import { Signer as SignerInterface } from '.' export class Pk implements SignerInterface { public readonly address: Address.Address diff --git a/packages/core/src/wallet.ts b/packages/core/src/wallet.ts index fe885a236..a3f31615b 100644 --- a/packages/core/src/wallet.ts +++ b/packages/core/src/wallet.ts @@ -9,6 +9,7 @@ import { Payload, Signature as SequenceSignature, } from '@0xsequence/sequence-primitives' +import { SapientSigner, Signer } from './signers' export type WalletOptions = { context: Context.Context @@ -485,27 +486,4 @@ export class Wallet { } } -export interface Signer { - readonly address: MaybePromise - - sign: ( - wallet: Address.Address, - chainId: bigint, - payload: Payload.Parented, - ) => Config.SignerSignature -} - -export interface SapientSigner { - readonly address: MaybePromise - readonly imageHash: MaybePromise - - signSapient: ( - wallet: Address.Address, - chainId: bigint, - payload: Payload.Parented, - imageHash: Hex.Hex, - ) => Config.SignerSignature -} - -type MaybePromise = T | Promise type Unpromise = T extends Promise ? S : T From f078cae1b289663b0ef249bd53fe2376c3c90e95 Mon Sep 17 00:00:00 2001 From: Agusx1211 Date: Thu, 6 Mar 2025 15:51:42 +0000 Subject: [PATCH 182/439] Passkeys generic tree --- packages/core/src/signers/passkey.ts | 30 +++--- .../primitives/src/extensions/passkeys.ts | 99 ++++++++++++++++++- 2 files changed, 112 insertions(+), 17 deletions(-) diff --git a/packages/core/src/signers/passkey.ts b/packages/core/src/signers/passkey.ts index f47c75c04..8a2dfa4b0 100644 --- a/packages/core/src/signers/passkey.ts +++ b/packages/core/src/signers/passkey.ts @@ -1,9 +1,10 @@ import { Hex, Bytes, Address } from 'ox' -import { SapientSigner } from '../wallet' import { Payload, Extensions } from '@0xsequence/sequence-primitives' import type { Signature as SignatureTypes } from '@0xsequence/sequence-primitives' import { WebAuthnP256 } from 'ox' import { keccak256 } from 'ox/Hash' +import { State } from '..' +import { SapientSigner } from '.' export type PasskeyOptions = { extensions: Pick @@ -13,6 +14,7 @@ export type PasskeyOptions = { } export type CreaetePasskeyOptions = { + stateProvider?: State.Provider requireUserVerification?: boolean credentialName?: string noEmbedMetadata?: boolean @@ -23,12 +25,6 @@ export type PasskeyMetadata = { createdAt: number } -function metadataHash(metadata: PasskeyMetadata): Hex.Hex { - const a = keccak256(Bytes.fromString(metadata.name)) - const b = keccak256(Bytes.fromNumber(metadata.createdAt)) - return Hex.fromBytes(keccak256(Bytes.concat(a, b))) -} - export class Passkey implements SapientSigner { public readonly credentialId: string @@ -55,21 +51,27 @@ export class Passkey implements SapientSigner { const x = Hex.fromNumber(credential.publicKey.x) const y = Hex.fromNumber(credential.publicKey.y) - const metadata = { - name, - createdAt: Date.now(), - } - - return new Passkey({ + const passkey = new Passkey({ credentialId: credential.id, extensions, publicKey: { requireUserVerification: options?.requireUserVerification ?? true, x, y, - metadata: options?.noEmbedMetadata ? undefined : metadataHash(metadata), + metadata: options?.noEmbedMetadata + ? undefined + : { + name, + createdAt: Date.now(), + }, }, }) + + if (options?.stateProvider) { + await options.stateProvider.saveTree(Extensions.Passkeys.toTree(passkey.publicKey)) + } + + return passkey } async signSapient( diff --git a/packages/primitives/src/extensions/passkeys.ts b/packages/primitives/src/extensions/passkeys.ts index 63ee8b82a..af081f1f0 100644 --- a/packages/primitives/src/extensions/passkeys.ts +++ b/packages/primitives/src/extensions/passkeys.ts @@ -1,11 +1,17 @@ import { Bytes, Hex, WebAuthnP256 } from 'ox' import { keccak256 } from 'ox/Hash' +import { GenericTree } from '..' export type PublicKey = { requireUserVerification: boolean x: Hex.Hex y: Hex.Hex - metadata?: Hex.Hex + metadata?: + | { + name: string + createdAt: number + } + | Hex.Hex } export function rootFor(publicKey: PublicKey): Hex.Hex { @@ -14,12 +20,99 @@ export function rootFor(publicKey: PublicKey): Hex.Hex { ) const ruv = Bytes.padLeft(publicKey.requireUserVerification ? Bytes.from([1]) : Bytes.from([0]), 32) - const metadata = publicKey.metadata ? Bytes.fromHex(publicKey.metadata) : Bytes.padLeft(Bytes.from([]), 32) + const metadata = publicKey.metadata ? metadataNode(publicKey.metadata) : Bytes.padLeft(Bytes.from([]), 32) const b = keccak256(Bytes.concat(ruv, metadata)) return Hex.fromBytes(keccak256(Bytes.concat(a, b))) } +export function metadataTree(metadata: Required['metadata']): GenericTree.Tree { + if (typeof metadata === 'object') { + return [ + { + type: 'leaf', + value: Bytes.fromString(metadata.name), + }, + { + type: 'leaf', + value: Bytes.fromNumber(metadata.createdAt), + }, + ] + } else { + return Bytes.fromHex(metadata) + } +} + +export function metadataNode(metadata: Required['metadata']): GenericTree.Node { + return GenericTree.hash(metadataTree(metadata)) +} + +export function toTree(publicKey: PublicKey): GenericTree.Tree { + const a = Bytes.padLeft(Bytes.fromHex(publicKey.x), 32) + const b = Bytes.padLeft(Bytes.fromHex(publicKey.y), 32) + const c = Bytes.padLeft(publicKey.requireUserVerification ? Bytes.from([1]) : Bytes.from([0]), 32) + + if (publicKey.metadata) { + return [ + [a, b], + [c, metadataTree(publicKey.metadata)], + ] + } + + return [[a, b], c] +} + +export function fromTree(tree: GenericTree.Tree): PublicKey { + if (!GenericTree.isBranch(tree) || tree.length !== 2) { + throw new Error('Invalid tree') + } + const [p1, p2] = tree + if (!GenericTree.isBranch(p1) || p1.length !== 2) { + throw new Error('Invalid tree for x,y') + } + const [xBytes, yBytes] = p1 + if (!GenericTree.isNode(xBytes) || xBytes.length !== 32) { + throw new Error('Invalid x bytes') + } + if (!GenericTree.isNode(yBytes) || yBytes.length !== 32) { + throw new Error('Invalid y bytes') + } + const x = Hex.fromBytes(xBytes) + const y = Hex.fromBytes(yBytes) + let requireUserVerification = false + let metadata: PublicKey['metadata'] = undefined + if (GenericTree.isBranch(p2)) { + if (p2.length !== 2) { + throw new Error('Invalid tree for c,metadata') + } + const [c, meta] = p2 + if (!GenericTree.isNode(c) || c.length !== 32) { + throw new Error('Invalid c bytes') + } + requireUserVerification = c[31] === 1 + if (!GenericTree.isBranch(meta) || meta.length !== 2) { + throw new Error('Invalid metadata tree') + } + const [nameLeaf, createdAtLeaf] = meta + if (!GenericTree.isLeaf(nameLeaf) || !GenericTree.isLeaf(createdAtLeaf)) { + throw new Error('Invalid metadata leaves') + } + const name = new TextDecoder().decode(nameLeaf.value) + const createdAt = Number(Bytes.toBigInt(createdAtLeaf.value)) + metadata = { name, createdAt } + } else { + if (!GenericTree.isNode(p2) || p2.length !== 32) { + throw new Error('Invalid c bytes') + } + requireUserVerification = p2[31] === 1 + } + return { requireUserVerification, x, y, metadata } +} + +export function rootFor2(publicKey: PublicKey): Hex.Hex { + return Hex.fromBytes(GenericTree.hash(toTree(publicKey))) +} + export type DecodedSignature = { publicKey: PublicKey r: Bytes.Bytes @@ -64,7 +157,7 @@ export function encode(decoded: DecodedSignature): Bytes.Bytes { // Add metadata if it exists if (decoded.publicKey.metadata) { - result = Bytes.concat(result, Bytes.fromHex(decoded.publicKey.metadata)) + result = Bytes.concat(result, metadataNode(decoded.publicKey.metadata)) } result = Bytes.concat(result, Bytes.padLeft(Bytes.fromNumber(authDataSize), bytesAuthDataSize)) From 38da23e38a1f7236dac208e02a39771692fea06c Mon Sep 17 00:00:00 2001 From: Agusx1211 Date: Thu, 6 Mar 2025 16:11:55 +0000 Subject: [PATCH 183/439] Add witnesses to signers --- packages/core/src/signers/index.ts | 5 +++ packages/core/src/signers/passkey.ts | 42 ++++++++++++++----- packages/core/src/signers/pk.ts | 25 ++++++++++- packages/core/src/state/local/index.ts | 12 ++++-- .../primitives/src/extensions/passkeys.ts | 6 ++- 5 files changed, 73 insertions(+), 17 deletions(-) diff --git a/packages/core/src/signers/index.ts b/packages/core/src/signers/index.ts index 841cc98da..9bda83ccd 100644 --- a/packages/core/src/signers/index.ts +++ b/packages/core/src/signers/index.ts @@ -1,5 +1,6 @@ import { Config, Payload, Signature } from '@0xsequence/sequence-primitives' import { Address, Hex } from 'ox' +import { State } from '..' export * from './pk' export * from './passkey' @@ -27,4 +28,8 @@ export interface SapientSigner { ) => Config.SignerSignature } +export interface Witnessable { + witness: (stateWriter: State.Writer, wallet: Address.Address) => Promise +} + type MaybePromise = T | Promise diff --git a/packages/core/src/signers/passkey.ts b/packages/core/src/signers/passkey.ts index 8a2dfa4b0..1e868bf20 100644 --- a/packages/core/src/signers/passkey.ts +++ b/packages/core/src/signers/passkey.ts @@ -2,22 +2,21 @@ import { Hex, Bytes, Address } from 'ox' import { Payload, Extensions } from '@0xsequence/sequence-primitives' import type { Signature as SignatureTypes } from '@0xsequence/sequence-primitives' import { WebAuthnP256 } from 'ox' -import { keccak256 } from 'ox/Hash' import { State } from '..' -import { SapientSigner } from '.' +import { SapientSigner, Witnessable } from '.' export type PasskeyOptions = { extensions: Pick publicKey: Extensions.Passkeys.PublicKey credentialId: string - metadata?: PasskeyMetadata + embedMetadata?: boolean } export type CreaetePasskeyOptions = { stateProvider?: State.Provider requireUserVerification?: boolean credentialName?: string - noEmbedMetadata?: boolean + embedMetadata?: boolean } export type PasskeyMetadata = { @@ -25,18 +24,20 @@ export type PasskeyMetadata = { createdAt: number } -export class Passkey implements SapientSigner { +export class Passkey implements SapientSigner, Witnessable { public readonly credentialId: string public readonly publicKey: Extensions.Passkeys.PublicKey public readonly address: Address.Address public readonly imageHash: Hex.Hex + public readonly embedMetadata: boolean constructor(options: PasskeyOptions) { this.imageHash = Extensions.Passkeys.rootFor(options.publicKey) this.address = options.extensions.passkeys this.publicKey = options.publicKey this.credentialId = options.credentialId + this.embedMetadata = options.embedMetadata ?? false } static async create(extensions: Pick, options?: CreaetePasskeyOptions) { @@ -58,12 +59,10 @@ export class Passkey implements SapientSigner { requireUserVerification: options?.requireUserVerification ?? true, x, y, - metadata: options?.noEmbedMetadata - ? undefined - : { - name, - createdAt: Date.now(), - }, + metadata: { + name, + createdAt: Date.now(), + }, }, }) @@ -103,6 +102,7 @@ export class Passkey implements SapientSigner { s: sBytes, authenticatorData, clientDataJSON: response.metadata.clientDataJSON, + embedMetadata: this.embedMetadata, }) return { @@ -111,4 +111,24 @@ export class Passkey implements SapientSigner { type: 'sapient_compact', } } + + async witness(stateWriter: State.Writer, wallet: Address.Address): Promise { + const payload = Payload.fromMessage( + Bytes.fromString( + JSON.stringify({ + action: 'consent-to-be-part-of-wallet', + wallet, + publicKey: this.publicKey, + timestamp: Date.now(), + }), + ), + ) + + const signature = await this.signSapient(wallet, 0n, payload, this.imageHash) + await stateWriter.saveWitnesses(wallet, 0n, payload, { + type: 'unrecovered-signer', + weight: 1n, + signature, + }) + } } diff --git a/packages/core/src/signers/pk.ts b/packages/core/src/signers/pk.ts index 28298e033..80bd9ed34 100644 --- a/packages/core/src/signers/pk.ts +++ b/packages/core/src/signers/pk.ts @@ -1,9 +1,10 @@ import type { Payload as PayloadTypes, Signature as SignatureTypes } from '@0xsequence/sequence-primitives' import { Payload } from '@0xsequence/sequence-primitives' import { Address, Bytes, Hex, PublicKey, Secp256k1 } from 'ox' -import { Signer as SignerInterface } from '.' +import { Signer as SignerInterface, Witnessable } from '.' +import { State } from '..' -export class Pk implements SignerInterface { +export class Pk implements SignerInterface, Witnessable { public readonly address: Address.Address public readonly pubKey: PublicKey.PublicKey @@ -25,4 +26,24 @@ export class Pk implements SignerInterface { const signature = Secp256k1.sign({ payload: digest, privateKey: this.privateKey }) return { ...signature, type: 'hash' } } + + async witness(stateWriter: State.Writer, wallet: Address.Address): Promise { + const payload = Payload.fromMessage( + Bytes.fromString( + JSON.stringify({ + action: 'consent-to-be-part-of-wallet', + wallet, + signer: this.address, + timestamp: Date.now(), + }), + ), + ) + + const signature = await this.sign(wallet, 0n, payload) + await stateWriter.saveWitnesses(wallet, 0n, payload, { + type: 'unrecovered-signer', + weight: 1n, + signature, + }) + } } diff --git a/packages/core/src/state/local/index.ts b/packages/core/src/state/local/index.ts index ac5244c43..593caa3a2 100644 --- a/packages/core/src/state/local/index.ts +++ b/packages/core/src/state/local/index.ts @@ -139,14 +139,20 @@ export class Provider implements ProviderInterface { return response } - saveWitnesses( + async saveWitnesses( wallet: Address.Address, chainId: bigint, payload: Payload.Parented, signatures: Signature.RawTopology, - ): void | Promise { + ): Promise { const subdigest = Hex.fromBytes(Payload.hash(wallet, chainId, payload)) - return this.saveSignature(subdigest, signatures) + + await Promise.all([ + this.saveSignature(subdigest, signatures), + this.store.savePayloadOfSubdigest(subdigest, { content: payload, chainId, wallet }), + ]) + + return } async getConfigurationUpdates( diff --git a/packages/primitives/src/extensions/passkeys.ts b/packages/primitives/src/extensions/passkeys.ts index af081f1f0..998501cfd 100644 --- a/packages/primitives/src/extensions/passkeys.ts +++ b/packages/primitives/src/extensions/passkeys.ts @@ -119,6 +119,7 @@ export type DecodedSignature = { s: Bytes.Bytes authenticatorData: Bytes.Bytes clientDataJSON: string + embedMetadata?: boolean } export function encode(decoded: DecodedSignature): Bytes.Bytes { @@ -156,7 +157,10 @@ export function encode(decoded: DecodedSignature): Bytes.Bytes { let result: Bytes.Bytes = Bytes.from([flags]) // Add metadata if it exists - if (decoded.publicKey.metadata) { + if (decoded.embedMetadata) { + if (!decoded.publicKey.metadata) { + throw new Error('Metadata is not present in the public key') + } result = Bytes.concat(result, metadataNode(decoded.publicKey.metadata)) } From b0a412b0b0688b146b8099e9138950102903e223 Mon Sep 17 00:00:00 2001 From: Agusx1211 Date: Thu, 6 Mar 2025 17:50:32 +0000 Subject: [PATCH 184/439] Load passkey from witness --- packages/core/src/signers/passkey.ts | 59 ++++++++++++++++- packages/core/src/state/index.ts | 11 ++++ packages/core/src/state/local/index.ts | 48 +++++++------- .../primitives/src/extensions/passkeys.ts | 64 ++++++++++++++----- packages/wdk/src/identity/signer.ts | 4 +- packages/wdk/src/session/session-manager.ts | 4 +- 6 files changed, 144 insertions(+), 46 deletions(-) diff --git a/packages/core/src/signers/passkey.ts b/packages/core/src/signers/passkey.ts index 1e868bf20..01640b541 100644 --- a/packages/core/src/signers/passkey.ts +++ b/packages/core/src/signers/passkey.ts @@ -24,6 +24,22 @@ export type PasskeyMetadata = { createdAt: number } +export type WitnessMessage = { + action: 'consent-to-be-part-of-wallet' + wallet: Address.Address + publicKey: Extensions.Passkeys.PublicKey + timestamp: number +} + +export function isWitnessMessage(message: unknown): message is WitnessMessage { + return ( + typeof message === 'object' && + message !== null && + 'action' in message && + message.action === 'consent-to-be-part-of-wallet' + ) +} + export class Passkey implements SapientSigner, Witnessable { public readonly credentialId: string @@ -40,6 +56,46 @@ export class Passkey implements SapientSigner, Witnessable { this.embedMetadata = options.embedMetadata ?? false } + static async loadFromWitness( + stateReader: State.Reader, + extensions: Pick, + wallet: Address.Address, + address: Address.Address, + imageHash: Hex.Hex, + ) { + // In the witness we will find the public key, and may find the credential id + const wallets = await stateReader.getWalletsForSapient(address, imageHash) + const witness = wallets[wallet] + + if (!witness) { + throw new Error('Witness for wallet not found') + } + + const payload = witness.payload + if (!Payload.isMessage(payload)) { + throw new Error('Witness payload is not a message') + } + + const message = JSON.parse(Bytes.toString(payload.message)) + if (!isWitnessMessage(message)) { + throw new Error('Witness payload is not a witness message') + } + + const metadata = message.publicKey.metadata + if (typeof metadata === 'string' || !metadata) { + throw new Error('Metadata does not contain credential id') + } + + const decodedSignature = Extensions.Passkeys.decode(witness.signature.data) + + return new Passkey({ + credentialId: metadata.credentialId, + extensions, + publicKey: message.publicKey, + embedMetadata: decodedSignature.embedMetadata, + }) + } + static async create(extensions: Pick, options?: CreaetePasskeyOptions) { const name = options?.credentialName ?? `Sequence (${Date.now()})` @@ -60,6 +116,7 @@ export class Passkey implements SapientSigner, Witnessable { x, y, metadata: { + credentialId: credential.id, name, createdAt: Date.now(), }, @@ -120,7 +177,7 @@ export class Passkey implements SapientSigner, Witnessable { wallet, publicKey: this.publicKey, timestamp: Date.now(), - }), + } as WitnessMessage), ), ) diff --git a/packages/core/src/state/index.ts b/packages/core/src/state/index.ts index de62c5bc2..e58194778 100644 --- a/packages/core/src/state/index.ts +++ b/packages/core/src/state/index.ts @@ -16,6 +16,17 @@ export interface Reader { } }> + getWalletsForSapient( + signer: Address.Address, + imageHash: Hex.Hex, + ): MaybePromise<{ + [wallet: Address.Address]: { + chainId: bigint + payload: Payload.Parented + signature: Signature.SignatureOfSapientSignerLeaf + } + }> + getConfigurationUpdates( wallet: Address.Address, fromImageHash: Hex.Hex, diff --git a/packages/core/src/state/local/index.ts b/packages/core/src/state/local/index.ts index 593caa3a2..1d3a29a2d 100644 --- a/packages/core/src/state/local/index.ts +++ b/packages/core/src/state/local/index.ts @@ -102,43 +102,41 @@ export class Provider implements ProviderInterface { return this.store.loadCounterfactualWallet(wallet) } - async getWallets(signer: Address.Address): Promise<{ - [wallet: `0x${string}`]: { chainId: bigint; payload: Payload.Parented; signature: Signature.SignatureOfSignerLeaf } - }> { + private async getWalletsGeneric( + signer: Address.Address, + loadSignatureFn: (subdigest: Hex.Hex) => Promise, + ): Promise<{ [wallet: `0x${string}`]: { chainId: bigint; payload: Payload.Parented; signature: T } }> { const subdigests = await this.store.loadSubdigestsOfSigner(signer) - const payloads = await Promise.all(subdigests.map((subdigest) => this.store.loadPayloadOfSubdigest(subdigest))) - - let response: { - [wallet: `0x${string}`]: { - chainId: bigint - payload: Payload.Parented - signature: Signature.SignatureOfSignerLeaf - } - } = {} + const payloads = await Promise.all(subdigests.map((sd) => this.store.loadPayloadOfSubdigest(sd))) + const response: { [wallet: `0x${string}`]: { chainId: bigint; payload: Payload.Parented; signature: T } } = {} for (const payload of payloads) { - if (!payload || response[payload.wallet]) { - continue - } - - const signature = await this.store.loadSignatureOfSubdigest( - signer, - Hex.fromBytes(Payload.hash(payload.wallet, payload.chainId, payload.content)), - ) - if (!signature) { - continue - } - + if (!payload || response[payload.wallet]) continue + const subdigest = Hex.fromBytes(Payload.hash(payload.wallet, payload.chainId, payload.content)) + const signature = await loadSignatureFn(subdigest) + if (!signature) continue response[payload.wallet] = { chainId: payload.chainId, payload: payload.content, - signature: signature, + signature, } } return response } + async getWallets(signer: Address.Address) { + return this.getWalletsGeneric(signer, (subdigest) => + this.store.loadSignatureOfSubdigest(signer, subdigest), + ) + } + + async getWalletsForSapient(signer: Address.Address, imageHash: Hex.Hex) { + return this.getWalletsGeneric(signer, (subdigest) => + this.store.loadSapientSignatureOfSubdigest(signer, subdigest, imageHash), + ) + } + async saveWitnesses( wallet: Address.Address, chainId: bigint, diff --git a/packages/primitives/src/extensions/passkeys.ts b/packages/primitives/src/extensions/passkeys.ts index 998501cfd..56c1eb049 100644 --- a/packages/primitives/src/extensions/passkeys.ts +++ b/packages/primitives/src/extensions/passkeys.ts @@ -9,6 +9,7 @@ export type PublicKey = { metadata?: | { name: string + credentialId: string createdAt: number } | Hex.Hex @@ -31,12 +32,18 @@ export function metadataTree(metadata: Required['metadata']): Generic return [ { type: 'leaf', - value: Bytes.fromString(metadata.name), - }, - { - type: 'leaf', - value: Bytes.fromNumber(metadata.createdAt), + value: Bytes.fromString(metadata.credentialId), }, + [ + { + type: 'leaf', + value: Bytes.fromString(metadata.name), + }, + { + type: 'leaf', + value: Bytes.fromNumber(metadata.createdAt), + }, + ], ] } else { return Bytes.fromHex(metadata) @@ -70,6 +77,7 @@ export function fromTree(tree: GenericTree.Tree): PublicKey { if (!GenericTree.isBranch(p1) || p1.length !== 2) { throw new Error('Invalid tree for x,y') } + const [xBytes, yBytes] = p1 if (!GenericTree.isNode(xBytes) || xBytes.length !== 32) { throw new Error('Invalid x bytes') @@ -77,35 +85,58 @@ export function fromTree(tree: GenericTree.Tree): PublicKey { if (!GenericTree.isNode(yBytes) || yBytes.length !== 32) { throw new Error('Invalid y bytes') } + const x = Hex.fromBytes(xBytes) const y = Hex.fromBytes(yBytes) let requireUserVerification = false - let metadata: PublicKey['metadata'] = undefined + let metadata: PublicKey['metadata'] + if (GenericTree.isBranch(p2)) { if (p2.length !== 2) { throw new Error('Invalid tree for c,metadata') } + const [c, meta] = p2 if (!GenericTree.isNode(c) || c.length !== 32) { throw new Error('Invalid c bytes') } requireUserVerification = c[31] === 1 - if (!GenericTree.isBranch(meta) || meta.length !== 2) { - throw new Error('Invalid metadata tree') - } - const [nameLeaf, createdAtLeaf] = meta - if (!GenericTree.isLeaf(nameLeaf) || !GenericTree.isLeaf(createdAtLeaf)) { - throw new Error('Invalid metadata leaves') + + if (GenericTree.isBranch(meta)) { + if (meta.length !== 2) { + throw new Error('Invalid metadata tree') + } + + const [credLeaf, sub] = meta + if (!GenericTree.isLeaf(credLeaf)) { + throw new Error('Invalid credentialId leaf') + } + const credentialId = new TextDecoder().decode(credLeaf.value) + + if (!GenericTree.isBranch(sub) || sub.length !== 2) { + throw new Error('Invalid sub-branch for name and createdAt') + } + + const [nameLeaf, createdAtLeaf] = sub + if (!GenericTree.isLeaf(nameLeaf) || !GenericTree.isLeaf(createdAtLeaf)) { + throw new Error('Invalid metadata leaves') + } + + const name = new TextDecoder().decode(nameLeaf.value) + const createdAt = Number(Bytes.toBigInt(createdAtLeaf.value)) + metadata = { credentialId, name, createdAt } + } else if (GenericTree.isNode(meta) && meta.length === 32) { + metadata = Hex.fromBytes(meta) + } else { + throw new Error('Invalid metadata node') } - const name = new TextDecoder().decode(nameLeaf.value) - const createdAt = Number(Bytes.toBigInt(createdAtLeaf.value)) - metadata = { name, createdAt } } else { if (!GenericTree.isNode(p2) || p2.length !== 32) { throw new Error('Invalid c bytes') } requireUserVerification = p2[31] === 1 } + return { requireUserVerification, x, y, metadata } } @@ -204,7 +235,7 @@ export function isValidSignature(challenge: Hex.Hex, decoded: DecodedSignature): }) } -export function decode(data: Bytes.Bytes): DecodedSignature & { challengeIndex: number; typeIndex: number } { +export function decode(data: Bytes.Bytes): Required & { challengeIndex: number; typeIndex: number } { let offset = 0 const flags = data[0] @@ -273,5 +304,6 @@ export function decode(data: Bytes.Bytes): DecodedSignature & { challengeIndex: clientDataJSON, challengeIndex, typeIndex, + embedMetadata: hasMetadata, } } diff --git a/packages/wdk/src/identity/signer.ts b/packages/wdk/src/identity/signer.ts index 22cdd700a..b621124bf 100644 --- a/packages/wdk/src/identity/signer.ts +++ b/packages/wdk/src/identity/signer.ts @@ -1,10 +1,10 @@ import { Address, Signature, Hex, Bytes } from 'ox' -import { Signer } from '@0xsequence/sequence-core' +import { Signers } from '@0xsequence/sequence-core' import { AuthKey } from './authkey' import { IdentityInstrument } from './nitro' import { Payload, Signature as SequenceSignature } from '@0xsequence/sequence-primitives' -export class IdentitySigner implements Signer { +export class IdentitySigner implements Signers.Signer { constructor( readonly ecosystemId: string, readonly nitro: IdentityInstrument, diff --git a/packages/wdk/src/session/session-manager.ts b/packages/wdk/src/session/session-manager.ts index 8c123d332..868550316 100644 --- a/packages/wdk/src/session/session-manager.ts +++ b/packages/wdk/src/session/session-manager.ts @@ -1,4 +1,4 @@ -import { SapientSigner, Signers } from '@0xsequence/sequence-core' +import { Signers } from '@0xsequence/sequence-core' import { Attestation, Constants, @@ -19,7 +19,7 @@ type SessionManagerConfiguration = { const DEFAULT_SESSION_MANAGER_ADDRESS: Address.Address = '0x0D3b3497f4B7E99239aE748Fc45216F45431B105' -export class SessionManager implements SapientSigner { +export class SessionManager implements Signers.SapientSigner { readonly address: Address.Address private _topology: SessionConfig.SessionsTopology private _provider: Provider.Provider From 702ada788dc583a79c6305eeae3a85d989bca0c9 Mon Sep 17 00:00:00 2001 From: Michael Standen Date: Thu, 6 Mar 2025 13:29:53 +1300 Subject: [PATCH 185/439] Remove permission from CLI (unused) --- packages/primitives-cli/src/index.ts | 2 - .../src/subcommands/permission.ts | 58 ------------------- .../primitives-cli/src/subcommands/server.ts | 13 ----- 3 files changed, 73 deletions(-) delete mode 100644 packages/primitives-cli/src/subcommands/permission.ts diff --git a/packages/primitives-cli/src/index.ts b/packages/primitives-cli/src/index.ts index 3aedc0080..f3bdcbe1c 100644 --- a/packages/primitives-cli/src/index.ts +++ b/packages/primitives-cli/src/index.ts @@ -6,7 +6,6 @@ import payloadCommand from './subcommands/payload' import configCommand from './subcommands/config' import devToolsCommand from './subcommands/devTools' import signatureCommand from './subcommands/signature' -import permissionCommand from './subcommands/permission' import sessionCommand from './subcommands/session' import serverCommand from './subcommands/server' import addressCommand from './subcommands/address' @@ -16,7 +15,6 @@ void yargs(hideBin(process.argv)) .command(configCommand) .command(devToolsCommand) .command(signatureCommand) - .command(permissionCommand) //FIXME Not sure we need to expose this .command(sessionCommand) .command(serverCommand) .command(addressCommand) diff --git a/packages/primitives-cli/src/subcommands/permission.ts b/packages/primitives-cli/src/subcommands/permission.ts deleted file mode 100644 index 6144e1960..000000000 --- a/packages/primitives-cli/src/subcommands/permission.ts +++ /dev/null @@ -1,58 +0,0 @@ -import { Hex } from 'ox' -import type { CommandModule } from 'yargs' -import { fromPosOrStdin } from '../utils' -import { Permission } from '@0xsequence/sequence-primitives' - -export async function doEncodeSessionPermissions(input: string): Promise { - const permission = Permission.sessionPermissionsFromJson(input) - const packed = Permission.encodeSessionPermissions(permission) - return Hex.from(packed) -} - -export async function doEncodePermission(input: string): Promise { - const permission = Permission.permissionFromJson(input) - const packed = Permission.encodePermission(permission) - return Hex.from(packed) -} - -const permissionCommand: CommandModule = { - command: 'permission', - describe: 'Permission conversion utilities', - builder: (yargs) => { - return yargs - .command( - 'to-packed-session [session-permission]', - 'Convert session permission to packed format', - (yargs) => { - return yargs.positional('session-permission', { - type: 'string', - description: 'Input permission to convert', - }) - }, - async (argv) => { - const permission = await fromPosOrStdin(argv, 'session-permission') - const result = await doEncodeSessionPermissions(permission) - console.log(result) - }, - ) - .command( - 'to-packed [permission]', - 'Convert permission to packed format', - (yargs) => { - return yargs.positional('permission', { - type: 'string', - description: 'Input permission to convert', - }) - }, - async (argv) => { - const permission = await fromPosOrStdin(argv, 'permission') - const result = await doEncodePermission(permission) - console.log(result) - }, - ) - .demandCommand(1, 'You must specify a subcommand for permission') - }, - handler: () => {}, -} - -export default permissionCommand diff --git a/packages/primitives-cli/src/subcommands/server.ts b/packages/primitives-cli/src/subcommands/server.ts index 0a4b3c8a2..4f5969155 100644 --- a/packages/primitives-cli/src/subcommands/server.ts +++ b/packages/primitives-cli/src/subcommands/server.ts @@ -3,7 +3,6 @@ import { createServer, IncomingMessage, ServerResponse } from 'http' import * as config from './config' import * as devTools from './devTools' import * as payload from './payload' -import * as permission from './permission' import * as session from './session' import * as sessionExplicit from './sessionExplicit' import * as sessionImplicit from './sessionImplicit' @@ -121,18 +120,6 @@ const rpcMethods: Record Promise> = { return result }, - // PERMISSION - async permission_toPackedSession(params) { - const { sessionPermission } = params - const result = await permission.doEncodeSessionPermissions(JSON.stringify(sessionPermission)) - return result - }, - async permission_toPacked(params) { - const { permission: perm } = params - const result = await permission.doEncodePermission(JSON.stringify(perm)) - return result - }, - // SESSION async session_empty(params) { const { identitySigner } = params From 32c096861c95c672ed318ed4c69b6b608c0ac75b Mon Sep 17 00:00:00 2001 From: Michael Standen Date: Fri, 7 Mar 2025 14:41:05 +1300 Subject: [PATCH 186/439] Sapient validation must simulate from wallet --- packages/core/src/wallet.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/core/src/wallet.ts b/packages/core/src/wallet.ts index a3f31615b..705a98fea 100644 --- a/packages/core/src/wallet.ts +++ b/packages/core/src/wallet.ts @@ -50,6 +50,7 @@ export class Wallet { static async fromConfiguration(configuration: Config.Config, options?: Partial): Promise { const merged = { ...DefaultWalletOptions, ...options } + //FIXME Validate configuration (weights not too large, total weights above threshold, etc) await merged.stateProvider.saveWallet(configuration, merged.context) return new Wallet(SequenceAddress.from(configuration, merged.context), merged) } @@ -418,6 +419,7 @@ export class Wallet { method: 'eth_call', params: [ { + from: this.address, to: leaf.address, data: AbiFunction.encodeData(Constants.IS_VALID_SAPIENT_SIGNATURE, [ Payload.encodeSapient(chainId, payload), From b27c060c994303786217bb7020617c573b4b4ad1 Mon Sep 17 00:00:00 2001 From: Michael Standen Date: Mon, 10 Mar 2025 10:23:29 +1300 Subject: [PATCH 187/439] Add live test for implicit session --- packages/core/src/signers/session/implicit.ts | 76 ++++++----- packages/core/src/wallet.ts | 12 +- packages/primitives/src/constants.ts | 2 +- packages/primitives/src/context.ts | 2 +- packages/wdk/test/constants.ts | 4 + packages/wdk/test/session-manager.test.ts | 121 +++++++++++++++++- 6 files changed, 175 insertions(+), 42 deletions(-) diff --git a/packages/core/src/signers/session/implicit.ts b/packages/core/src/signers/session/implicit.ts index 9097dd56a..241c2cf65 100644 --- a/packages/core/src/signers/session/implicit.ts +++ b/packages/core/src/signers/session/implicit.ts @@ -22,36 +22,52 @@ export class Implicit implements SignerInterface { call: Payload.Call, provider: Provider.Provider, ): Promise { - // Call the acceptImplicitRequest function on the called contract - const encodedCallData = AbiFunction.encodeData(acceptImplicitRequestFunctionAbi, [ - wallet, - { - approvedSigner: this._attestation.approvedSigner, - identityType: Bytes.toHex(this._attestation.identityType), - issuerHash: Bytes.toHex(this._attestation.issuerHash), - audienceHash: Bytes.toHex(this._attestation.audienceHash), - applicationData: Bytes.toHex(this._attestation.applicationData), - authData: this._attestation.authData, - }, - { - to: call.to, - value: call.value, - data: Bytes.toHex(call.data), - gasLimit: call.gasLimit, - delegateCall: call.delegateCall, - onlyFallback: call.onlyFallback, - behaviorOnError: BigInt(Payload.encodeBehaviorOnError(call.behaviorOnError)), - }, - ]) - const acceptImplicitRequestResult = await provider.request({ - method: 'eth_call', - params: [{ from: this._sessionManager, to: call.to, data: encodedCallData }, 'latest'], - }) - const acceptImplicitRequest = Hex.from( - AbiFunction.decodeResult(acceptImplicitRequestFunctionAbi, acceptImplicitRequestResult), - ) - const expectedResult = Bytes.toHex(Attestation.generateImplicitRequestMagic(this._attestation, wallet)) - return acceptImplicitRequest === expectedResult + try { + console.log('implicit signer supportedCall', call, 'to', call.to, 'sessionManager', this._sessionManager) + // Call the acceptImplicitRequest function on the called contract + const encodedCallData = AbiFunction.encodeData(acceptImplicitRequestFunctionAbi, [ + wallet, + { + approvedSigner: this._attestation.approvedSigner, + identityType: Bytes.toHex(this._attestation.identityType), + issuerHash: Bytes.toHex(this._attestation.issuerHash), + audienceHash: Bytes.toHex(this._attestation.audienceHash), + applicationData: Bytes.toHex(this._attestation.applicationData), + authData: this._attestation.authData, + }, + { + to: call.to, + value: call.value, + data: Bytes.toHex(call.data), + gasLimit: call.gasLimit, + delegateCall: call.delegateCall, + onlyFallback: call.onlyFallback, + behaviorOnError: BigInt(Payload.encodeBehaviorOnError(call.behaviorOnError)), + }, + ]) + console.log( + 'implicit signer supported call', + call, + 'to', + call.to, + 'sessionManager', + this._sessionManager, + 'encodedCallData', + encodedCallData, + ) + const acceptImplicitRequestResult = await provider.request({ + method: 'eth_call', + params: [{ from: this._sessionManager, to: call.to, data: encodedCallData }], + }) + const acceptImplicitRequest = Hex.from( + AbiFunction.decodeResult(acceptImplicitRequestFunctionAbi, acceptImplicitRequestResult), + ) + const expectedResult = Bytes.toHex(Attestation.generateImplicitRequestMagic(this._attestation, wallet)) + return acceptImplicitRequest === expectedResult + } catch (error) { + console.log('implicit signer unsupported call', call, error) + return false + } } async signCall( diff --git a/packages/core/src/wallet.ts b/packages/core/src/wallet.ts index 705a98fea..632a8eee9 100644 --- a/packages/core/src/wallet.ts +++ b/packages/core/src/wallet.ts @@ -191,9 +191,10 @@ export class Wallet { calls: Payload.Call[], options?: { space?: bigint; trustSigners?: boolean; onSignerError?: Config.SignerErrorCallback }, ) { + const transaction = await this.getTransaction(provider, calls, options) return provider.request({ method: 'eth_sendTransaction', - params: [await this.getTransaction(provider, calls, options)], + params: [transaction], }) } @@ -415,16 +416,17 @@ export class Wallet { switch (signature.type) { case 'sapient': { + const callData = AbiFunction.encodeData(Constants.IS_VALID_SAPIENT_SIGNATURE, [ + Payload.encodeSapient(chainId, payload), + Bytes.toHex(signature.data), + ]) const imageHash = await provider.request({ method: 'eth_call', params: [ { from: this.address, to: leaf.address, - data: AbiFunction.encodeData(Constants.IS_VALID_SAPIENT_SIGNATURE, [ - Payload.encodeSapient(chainId, payload), - Bytes.toHex(signature.data), - ]), + data: callData, }, ], }) diff --git a/packages/primitives/src/constants.ts b/packages/primitives/src/constants.ts index b4c7f2876..e67328b5b 100644 --- a/packages/primitives/src/constants.ts +++ b/packages/primitives/src/constants.ts @@ -3,7 +3,7 @@ import { Abi, Address, Hex } from 'ox' export const DEFAULT_CREATION_CODE: Hex.Hex = '0x603e600e3d39601e805130553df33d3d34601c57363d3d373d363d30545af43d82803e903d91601c57fd5bf3' -export const DefaultGuest: Address.Address = '0x54d766e7C3544E5A1De2552b3A255280b91F4502' +export const DefaultGuest: Address.Address = '0xd17b93dEC460956aeCc45fD9614Dbd163623aE30' // ERC1271 export const IS_VALID_SIGNATURE = Abi.from([ diff --git a/packages/primitives/src/context.ts b/packages/primitives/src/context.ts index aa79360cd..0f5aebec6 100644 --- a/packages/primitives/src/context.ts +++ b/packages/primitives/src/context.ts @@ -9,6 +9,6 @@ export type Context = { export const Dev1: Context = { factory: '0xBd0F8abD58B4449B39C57Ac9D5C67433239aC447', - stage1: '0x108aEa2e459299F99788cC9069759ce3472aC31B', + stage1: '0xBFB21e82862Da2303128e636778294240088dd9f', creationCode: DEFAULT_CREATION_CODE, } diff --git a/packages/wdk/test/constants.ts b/packages/wdk/test/constants.ts index c79bb5fa9..c7a1760a0 100644 --- a/packages/wdk/test/constants.ts +++ b/packages/wdk/test/constants.ts @@ -1,11 +1,15 @@ import { config as dotenvConfig } from 'dotenv' +import { Abi } from 'ox' const envFile = process.env.CI ? '.env.test' : '.env.test.local' dotenvConfig({ path: envFile }) +export const ERC20_IMPLICIT_MINT_CONTRACT = '0x7aC9f16587B279998f1522f8F737a28aCb4C9f06' export const MOCK_IMPLICIT_CONTRACT = '0x9D5E1139e02eB025470308EeF65D2d15bC1f5d9F' export const MOCK_IMPLICIT_INVALID_CONTRACT = '0x977F7fbCAc606C3B33357ebDff0205B8C4055a3B' +export const ERC20_MINT_ONCE = Abi.from(['function mintOnce(address to, uint256 amount)'])[0] + // Environment variables export const { RPC_URL, PRIVATE_KEY } = process.env export const CAN_RUN_LIVE = !!RPC_URL && !!PRIVATE_KEY diff --git a/packages/wdk/test/session-manager.test.ts b/packages/wdk/test/session-manager.test.ts index 52d71d0aa..c2714a646 100644 --- a/packages/wdk/test/session-manager.test.ts +++ b/packages/wdk/test/session-manager.test.ts @@ -1,8 +1,15 @@ -import { Attestation, Payload } from '@0xsequence/sequence-primitives' +import { Signers, Wallet } from '@0xsequence/sequence-core' +import { Attestation, Constants, Payload } from '@0xsequence/sequence-primitives' import { Identity, Session } from '@0xsequence/sequence-wdk' -import { Address, Bytes, Hex, Provider, RpcTransport } from 'ox' -import { MOCK_IMPLICIT_CONTRACT, CAN_RUN_LIVE, RPC_URL, PRIVATE_KEY } from './constants' -import { Signers } from '@0xsequence/sequence-core' +import { AbiFunction, Address, Bytes, Hex, Provider, RpcTransport, Secp256k1, TransactionEnvelopeEip1559 } from 'ox' +import { + CAN_RUN_LIVE, + ERC20_IMPLICIT_MINT_CONTRACT, + ERC20_MINT_ONCE, + MOCK_IMPLICIT_CONTRACT, + PRIVATE_KEY, + RPC_URL, +} from './constants' describe('SessionManager (mocked)', () => { // Mock provider for testing @@ -170,6 +177,13 @@ if (CAN_RUN_LIVE) { provider, }) + const requireContractDeployed = async (contract: Address.Address) => { + const code = await provider.request({ method: 'eth_getCode', params: [contract, 'latest'] }) + if (code === '0x') { + throw new Error('Contract not deployed') + } + } + it('should create and sign with an implicit session', async () => { const chainId = BigInt(await provider.request({ method: 'eth_chainId' })) @@ -183,7 +197,7 @@ if (CAN_RUN_LIVE) { }, } - const implicitSession = await sessionManager.createImplicitSession(mockIdentitySigner, attestation) + await sessionManager.createImplicitSession(mockIdentitySigner, attestation) const payload: Payload.Calls = { type: 'call', nonce: 0n, @@ -206,5 +220,102 @@ if (CAN_RUN_LIVE) { const isValid = await sessionManager.isValidSapientSignature(walletAddress, chainId, payload, signature) expect(isValid).toBe(true) }) + + it.only('Submits a real transaction with a wallet that has a SessionManager', async () => { + // Check the contracts have been deployed + await requireContractDeployed(ERC20_IMPLICIT_MINT_CONTRACT) + await requireContractDeployed(Constants.DefaultGuest) + + // Check balance of the private key account + const senderAddress = Address.fromPublicKey(Secp256k1.getPublicKey({ privateKey: pkHex })) + + const wallet = await Wallet.fromConfiguration({ + threshold: 1n, + checkpoint: 0n, + topology: { + type: 'sapient-signer', + address: sessionManager.address, + weight: 100n, + imageHash: Bytes.fromHex(sessionManager.imageHash), + }, + }) + wallet.setSapientSigner(sessionManager) + + const call: Payload.Call = { + to: ERC20_IMPLICIT_MINT_CONTRACT, + value: 0n, + data: Bytes.fromHex(AbiFunction.encodeData(ERC20_MINT_ONCE, [wallet.address, 1000000000000000000n])), + gasLimit: 0n, + delegateCall: false, + onlyFallback: false, + behaviorOnError: 'revert', + } + + // Add an implicit session + const attestation = { + identityType: new Uint8Array(4), + issuerHash: new Uint8Array(32), + audienceHash: new Uint8Array(32), + applicationData: new Uint8Array(), + authData: { + redirectUrl: 'https://example.com', + }, + } + await sessionManager.createImplicitSession(mockIdentitySigner, attestation) + + // Send the transaction + const transaction = await wallet.getTransaction(provider, [call]) + + // Estimate gas with a safety buffer + const estimatedGas = BigInt(await provider.request({ method: 'eth_estimateGas', params: [transaction] })) + const safeGasLimit = estimatedGas > 21000n ? (estimatedGas * 12n) / 10n : 50000n + + // Get base fee and priority fee + const baseFee = BigInt(await provider.request({ method: 'eth_gasPrice' })) + const priorityFee = 100000000n // 0.1 gwei priority fee + const maxFeePerGas = baseFee + priorityFee + + // Check sender have enough balance + const senderBalance = BigInt( + await provider.request({ method: 'eth_getBalance', params: [senderAddress, 'latest'] }), + ) + if (senderBalance < maxFeePerGas * safeGasLimit) { + console.log('Sender balance:', senderBalance.toString(), 'wei') + throw new Error('Sender has insufficient balance to pay for gas') + } + const nonce = BigInt( + await provider.request({ + method: 'eth_getTransactionCount', + params: [senderAddress, 'latest'], + }), + ) + + const chainId = await provider.request({ method: 'eth_chainId' }) + const envelope = TransactionEnvelopeEip1559.from({ + chainId: Number(chainId), + type: 'eip1559', + from: senderAddress, + to: transaction.to, + data: transaction.data, + gas: safeGasLimit, + maxFeePerGas: maxFeePerGas, + maxPriorityFeePerGas: priorityFee, + nonce: nonce, + value: 0n, + }) + const relayerSignature = Secp256k1.sign({ + payload: TransactionEnvelopeEip1559.getSignPayload(envelope), + privateKey: pkHex, + }) + const signedEnvelope = TransactionEnvelopeEip1559.from(envelope, { + signature: relayerSignature, + }) + const tx = await provider.request({ + method: 'eth_sendRawTransaction', + params: [TransactionEnvelopeEip1559.serialize(signedEnvelope)], + }) + console.log('Transaction sent', tx) + await provider.request({ method: 'eth_getTransactionReceipt', params: [tx] }) + }, 60000) }) } From 461002bc0110e651e8763540a6a6091245ae424e Mon Sep 17 00:00:00 2001 From: Michael Standen Date: Mon, 10 Mar 2025 10:31:33 +1300 Subject: [PATCH 188/439] Add explicit live test --- packages/wdk/test/session-manager.test.ts | 98 ++++++++++++++++++++++- 1 file changed, 97 insertions(+), 1 deletion(-) diff --git a/packages/wdk/test/session-manager.test.ts b/packages/wdk/test/session-manager.test.ts index c2714a646..d2eeeaf61 100644 --- a/packages/wdk/test/session-manager.test.ts +++ b/packages/wdk/test/session-manager.test.ts @@ -221,7 +221,7 @@ if (CAN_RUN_LIVE) { expect(isValid).toBe(true) }) - it.only('Submits a real transaction with a wallet that has a SessionManager', async () => { + it('Submits a real transaction with a wallet that has a SessionManager using implicit session', async () => { // Check the contracts have been deployed await requireContractDeployed(ERC20_IMPLICIT_MINT_CONTRACT) await requireContractDeployed(Constants.DefaultGuest) @@ -317,5 +317,101 @@ if (CAN_RUN_LIVE) { console.log('Transaction sent', tx) await provider.request({ method: 'eth_getTransactionReceipt', params: [tx] }) }, 60000) + + it('Submits a real transaction with a wallet that has a SessionManager using explicit session', async () => { + // Check the contracts have been deployed + await requireContractDeployed(ERC20_IMPLICIT_MINT_CONTRACT) + await requireContractDeployed(Constants.DefaultGuest) + + // Check balance of the private key account + const senderAddress = Address.fromPublicKey(Secp256k1.getPublicKey({ privateKey: pkHex })) + + // Add an implicit session + const sessionPermissions: Signers.Session.ExplicitParams = { + valueLimit: 0n, // Can't send ETH + deadline: BigInt(Math.floor(Date.now() / 1000) + 3600), // 1 hour from now + permissions: [ + { target: ERC20_IMPLICIT_MINT_CONTRACT, rules: [] }, // Anything on this contract is allowed + ], + } + await sessionManager.createExplicitSession(sessionPermissions) + + // FIXME This is the wrong order to do this but the wallet doesn't currently support a sapient signer with an image hash that changes + const wallet = await Wallet.fromConfiguration({ + threshold: 1n, + checkpoint: 0n, + topology: { + type: 'sapient-signer', + address: sessionManager.address, + weight: 100n, + imageHash: Bytes.fromHex(sessionManager.imageHash), + }, + }) + wallet.setSapientSigner(sessionManager) + + const call: Payload.Call = { + to: ERC20_IMPLICIT_MINT_CONTRACT, + value: 0n, + data: Bytes.fromHex(AbiFunction.encodeData(ERC20_MINT_ONCE, [wallet.address, 1000000000000000000n])), + gasLimit: 0n, + delegateCall: false, + onlyFallback: false, + behaviorOnError: 'revert', + } + + // Send the transaction + const transaction = await wallet.getTransaction(provider, [call]) + + // Estimate gas with a safety buffer + const estimatedGas = BigInt(await provider.request({ method: 'eth_estimateGas', params: [transaction] })) + const safeGasLimit = estimatedGas > 21000n ? (estimatedGas * 12n) / 10n : 50000n + + // Get base fee and priority fee + const baseFee = BigInt(await provider.request({ method: 'eth_gasPrice' })) + const priorityFee = 100000000n // 0.1 gwei priority fee + const maxFeePerGas = baseFee + priorityFee + + // Check sender have enough balance + const senderBalance = BigInt( + await provider.request({ method: 'eth_getBalance', params: [senderAddress, 'latest'] }), + ) + if (senderBalance < maxFeePerGas * safeGasLimit) { + console.log('Sender balance:', senderBalance.toString(), 'wei') + throw new Error('Sender has insufficient balance to pay for gas') + } + const nonce = BigInt( + await provider.request({ + method: 'eth_getTransactionCount', + params: [senderAddress, 'latest'], + }), + ) + + const chainId = await provider.request({ method: 'eth_chainId' }) + const envelope = TransactionEnvelopeEip1559.from({ + chainId: Number(chainId), + type: 'eip1559', + from: senderAddress, + to: transaction.to, + data: transaction.data, + gas: safeGasLimit, + maxFeePerGas: maxFeePerGas, + maxPriorityFeePerGas: priorityFee, + nonce: nonce, + value: 0n, + }) + const relayerSignature = Secp256k1.sign({ + payload: TransactionEnvelopeEip1559.getSignPayload(envelope), + privateKey: pkHex, + }) + const signedEnvelope = TransactionEnvelopeEip1559.from(envelope, { + signature: relayerSignature, + }) + const tx = await provider.request({ + method: 'eth_sendRawTransaction', + params: [TransactionEnvelopeEip1559.serialize(signedEnvelope)], + }) + console.log('Transaction sent', tx) + await provider.request({ method: 'eth_getTransactionReceipt', params: [tx] }) + }, 60000) }) } From 5a82ed3c56ef0e60f2c6218a7209bf57eea8c70f Mon Sep 17 00:00:00 2001 From: Agusx1211 Date: Mon, 10 Mar 2025 16:41:36 +0000 Subject: [PATCH 189/439] Fix passkey metadata --- packages/core/src/signers/passkey.ts | 30 +++++----- packages/core/src/state/local/index.ts | 56 +++++++++---------- packages/core/src/wallet.ts | 33 ++++++----- .../primitives/src/extensions/passkeys.ts | 31 +++------- 4 files changed, 73 insertions(+), 77 deletions(-) diff --git a/packages/core/src/signers/passkey.ts b/packages/core/src/signers/passkey.ts index 01640b541..2200ae458 100644 --- a/packages/core/src/signers/passkey.ts +++ b/packages/core/src/signers/passkey.ts @@ -19,16 +19,12 @@ export type CreaetePasskeyOptions = { embedMetadata?: boolean } -export type PasskeyMetadata = { - name: string - createdAt: number -} - export type WitnessMessage = { action: 'consent-to-be-part-of-wallet' wallet: Address.Address publicKey: Extensions.Passkeys.PublicKey timestamp: number + metadata?: Extensions.Passkeys.PasskeyMetadata } export function isWitnessMessage(message: unknown): message is WitnessMessage { @@ -47,24 +43,25 @@ export class Passkey implements SapientSigner, Witnessable { public readonly address: Address.Address public readonly imageHash: Hex.Hex public readonly embedMetadata: boolean + public readonly metadata?: Extensions.Passkeys.PasskeyMetadata constructor(options: PasskeyOptions) { - this.imageHash = Extensions.Passkeys.rootFor(options.publicKey) this.address = options.extensions.passkeys this.publicKey = options.publicKey this.credentialId = options.credentialId this.embedMetadata = options.embedMetadata ?? false + this.imageHash = Extensions.Passkeys.rootFor(options.publicKey) } static async loadFromWitness( stateReader: State.Reader, extensions: Pick, wallet: Address.Address, - address: Address.Address, imageHash: Hex.Hex, ) { // In the witness we will find the public key, and may find the credential id - const wallets = await stateReader.getWalletsForSapient(address, imageHash) + const wallets = await stateReader.getWalletsForSapient(extensions.passkeys, imageHash) + console.log('Got wallets', extensions.passkeys, imageHash, wallets) const witness = wallets[wallet] if (!witness) { @@ -81,7 +78,8 @@ export class Passkey implements SapientSigner, Witnessable { throw new Error('Witness payload is not a witness message') } - const metadata = message.publicKey.metadata + const metadata = message.publicKey.metadata || message.metadata + console.log(metadata, message, message.publicKey, message.metadata) if (typeof metadata === 'string' || !metadata) { throw new Error('Metadata does not contain credential id') } @@ -108,6 +106,12 @@ export class Passkey implements SapientSigner, Witnessable { const x = Hex.fromNumber(credential.publicKey.x) const y = Hex.fromNumber(credential.publicKey.y) + const metadata = { + credentialId: credential.id, + name, + createdAt: Date.now(), + } + const passkey = new Passkey({ credentialId: credential.id, extensions, @@ -115,12 +119,9 @@ export class Passkey implements SapientSigner, Witnessable { requireUserVerification: options?.requireUserVerification ?? true, x, y, - metadata: { - credentialId: credential.id, - name, - createdAt: Date.now(), - }, + metadata: options?.embedMetadata ? metadata : undefined, }, + embedMetadata: options?.embedMetadata, }) if (options?.stateProvider) { @@ -176,6 +177,7 @@ export class Passkey implements SapientSigner, Witnessable { action: 'consent-to-be-part-of-wallet', wallet, publicKey: this.publicKey, + metadata: this.metadata, timestamp: Date.now(), } as WitnessMessage), ), diff --git a/packages/core/src/state/local/index.ts b/packages/core/src/state/local/index.ts index 1d3a29a2d..195c8bc63 100644 --- a/packages/core/src/state/local/index.ts +++ b/packages/core/src/state/local/index.ts @@ -103,15 +103,16 @@ export class Provider implements ProviderInterface { } private async getWalletsGeneric( - signer: Address.Address, + subdigests: Hex.Hex[], loadSignatureFn: (subdigest: Hex.Hex) => Promise, ): Promise<{ [wallet: `0x${string}`]: { chainId: bigint; payload: Payload.Parented; signature: T } }> { - const subdigests = await this.store.loadSubdigestsOfSigner(signer) const payloads = await Promise.all(subdigests.map((sd) => this.store.loadPayloadOfSubdigest(sd))) const response: { [wallet: `0x${string}`]: { chainId: bigint; payload: Payload.Parented; signature: T } } = {} for (const payload of payloads) { - if (!payload || response[payload.wallet]) continue + if (!payload || response[payload.wallet]) { + continue + } const subdigest = Hex.fromBytes(Payload.hash(payload.wallet, payload.chainId, payload.content)) const signature = await loadSignatureFn(subdigest) if (!signature) continue @@ -126,14 +127,16 @@ export class Provider implements ProviderInterface { } async getWallets(signer: Address.Address) { - return this.getWalletsGeneric(signer, (subdigest) => - this.store.loadSignatureOfSubdigest(signer, subdigest), + return this.getWalletsGeneric( + await this.store.loadSubdigestsOfSigner(signer), + (subdigest) => this.store.loadSignatureOfSubdigest(signer, subdigest), ) } async getWalletsForSapient(signer: Address.Address, imageHash: Hex.Hex) { - return this.getWalletsGeneric(signer, (subdigest) => - this.store.loadSapientSignatureOfSubdigest(signer, subdigest, imageHash), + return this.getWalletsGeneric( + await this.store.loadSubdigestsOfSapientSigner(signer, imageHash), + (subdigest) => this.store.loadSapientSignatureOfSubdigest(signer, subdigest, imageHash), ) } @@ -336,32 +339,29 @@ export class Provider implements ProviderInterface { return this.store.saveSignatureOfSubdigest(address, subdigest, topology.signature) } - } - if (Signature.isSignedSapientSignerLeaf(topology)) { - switch (topology.address.toLowerCase()) { - case this.extensions.passkeys.toLowerCase(): - const decoded = Extensions.Passkeys.decode(topology.signature.data) - if (Extensions.Passkeys.rootFor(decoded.publicKey) !== Hex.fromBytes(topology.imageHash)) { - throw new Error( - `Incorrect passkey signature: ${Extensions.Passkeys.rootFor(decoded.publicKey)} !== ${Hex.fromBytes(topology.imageHash)}`, - ) - } + if (Signature.isSignatureOfSapientSignerLeaf(topology.signature)) { + switch (topology.signature.address.toLowerCase()) { + case this.extensions.passkeys.toLowerCase(): + const decoded = Extensions.Passkeys.decode(topology.signature.data) - if (!Extensions.Passkeys.isValidSignature(subdigest, decoded)) { - throw new Error('Invalid passkey signature') - } + if (!Extensions.Passkeys.isValidSignature(subdigest, decoded)) { + throw new Error('Invalid passkey signature') + } - return this.store.saveSapientSignatureOfSubdigest( - topology.address, - subdigest, - Hex.fromBytes(topology.imageHash), - topology.signature, - ) - default: - throw new Error(`Unsupported sapient signer: ${topology.address}`) + return this.store.saveSapientSignatureOfSubdigest( + topology.signature.address, + subdigest, + Extensions.Passkeys.rootFor(decoded.publicKey), + topology.signature, + ) + default: + throw new Error(`Unsupported sapient signer: ${topology.signature.address}`) + } } } + + throw new Error('Unsupported signature type') } getTree(rootHash: Hex.Hex): GenericTree.Tree | Promise | undefined { diff --git a/packages/core/src/wallet.ts b/packages/core/src/wallet.ts index a3f31615b..fd33adb5e 100644 --- a/packages/core/src/wallet.ts +++ b/packages/core/src/wallet.ts @@ -39,13 +39,20 @@ export type WalletStatus = { export class Wallet { private readonly signers = new Map() private readonly sapientSigners = new Map() - private readonly options: WalletOptions & { stateProvider: State.Provider } + private readonly onSignerError?: Config.SignerErrorCallback + + public readonly context: Context.Context + public readonly guest: Address.Address + public readonly stateProvider: State.Provider constructor( readonly address: Address.Address, options?: Partial, ) { - this.options = { ...DefaultWalletOptions, ...options } + const combinedOptions = { ...DefaultWalletOptions, ...options } + this.context = combinedOptions.context + this.guest = combinedOptions.guest + this.stateProvider = combinedOptions.stateProvider } static async fromConfiguration(configuration: Config.Config, options?: Partial): Promise { @@ -86,7 +93,7 @@ export class Wallet { } async getDeployTransaction(): Promise<{ to: Address.Address; data: Hex.Hex }> { - const deployInformation = await this.options.stateProvider.getDeploy(this.address) + const deployInformation = await this.stateProvider.getDeploy(this.address) if (!deployInformation) { throw new Error(`cannot find deploy information for ${this.address}`) } @@ -99,7 +106,7 @@ export class Wallet { ) { const imageHash = Config.hashConfiguration(configuration) const signature = await this.sign(Payload.fromConfigUpdate(Bytes.toHex(imageHash)), options) - await this.options.stateProvider.saveUpdate(this.address, configuration, signature) + await this.stateProvider.saveUpdate(this.address, configuration, signature) } async getStatus(provider?: Provider.Provider): Promise { @@ -130,7 +137,7 @@ export class Wallet { // Determine stage based on implementation address if (implementation) { - if (implementation.toLowerCase() === this.options.context.stage1.toLowerCase()) { + if (implementation.toLowerCase() === this.context.stage1.toLowerCase()) { stage = 'stage1' } else { stage = 'stage2' @@ -147,7 +154,7 @@ export class Wallet { }) } else { // For non-deployed or stage1 wallets, get the deploy hash - const deployInformation = await this.options.stateProvider.getDeploy(this.address) + const deployInformation = await this.stateProvider.getDeploy(this.address) if (!deployInformation) { throw new Error(`cannot find deploy information for ${this.address}`) } @@ -155,20 +162,20 @@ export class Wallet { } // Get configuration updates - updates = await this.options.stateProvider.getConfigurationUpdates(this.address, fromImageHash) + updates = await this.stateProvider.getConfigurationUpdates(this.address, fromImageHash) imageHash = updates[updates.length - 1]?.imageHash ?? fromImageHash } else { // Without a provider, we can only get information from the state provider - const deployInformation = await this.options.stateProvider.getDeploy(this.address) + const deployInformation = await this.stateProvider.getDeploy(this.address) if (!deployInformation) { throw new Error(`cannot find deploy information for ${this.address}`) } - updates = await this.options.stateProvider.getConfigurationUpdates(this.address, deployInformation.imageHash) + updates = await this.stateProvider.getConfigurationUpdates(this.address, deployInformation.imageHash) imageHash = updates[updates.length - 1]?.imageHash ?? deployInformation.imageHash } // Get the current configuration - const configuration = await this.options.stateProvider.getConfiguration(imageHash) + const configuration = await this.stateProvider.getConfiguration(imageHash) if (!configuration) { throw new Error(`cannot find configuration details for ${this.address}`) } @@ -234,7 +241,7 @@ export class Wallet { ]) return { - to: this.options.guest, + to: this.guest, data: Bytes.toHex( Payload.encode({ type: 'call', @@ -290,7 +297,7 @@ export class Wallet { // Get deploy hash if needed for ERC-6492 let deployHash: { deployHash: Hex.Hex; context: Context.Context } | undefined if (!status.isDeployed || status.stage === 'stage1') { - const deployInformation = await this.options.stateProvider.getDeploy(this.address) + const deployInformation = await this.stateProvider.getDeploy(this.address) if (!deployInformation) { throw new Error(`cannot find deploy information for ${this.address}`) } @@ -467,7 +474,7 @@ export class Wallet { threshold: configuration.threshold, onSignerError: (leaf, error) => { options?.onSignerError?.(leaf, error) - this.options.onSignerError?.(leaf, error) + this.onSignerError?.(leaf, error) }, }, ) diff --git a/packages/primitives/src/extensions/passkeys.ts b/packages/primitives/src/extensions/passkeys.ts index 56c1eb049..03c0a30fd 100644 --- a/packages/primitives/src/extensions/passkeys.ts +++ b/packages/primitives/src/extensions/passkeys.ts @@ -1,30 +1,17 @@ import { Bytes, Hex, WebAuthnP256 } from 'ox' -import { keccak256 } from 'ox/Hash' import { GenericTree } from '..' +export type PasskeyMetadata = { + name: string + credentialId: string + createdAt: number +} + export type PublicKey = { requireUserVerification: boolean x: Hex.Hex y: Hex.Hex - metadata?: - | { - name: string - credentialId: string - createdAt: number - } - | Hex.Hex -} - -export function rootFor(publicKey: PublicKey): Hex.Hex { - const a = keccak256( - Bytes.concat(Bytes.padLeft(Bytes.fromHex(publicKey.x), 32), Bytes.padLeft(Bytes.fromHex(publicKey.y), 32)), - ) - - const ruv = Bytes.padLeft(publicKey.requireUserVerification ? Bytes.from([1]) : Bytes.from([0]), 32) - const metadata = publicKey.metadata ? metadataNode(publicKey.metadata) : Bytes.padLeft(Bytes.from([]), 32) - - const b = keccak256(Bytes.concat(ruv, metadata)) - return Hex.fromBytes(keccak256(Bytes.concat(a, b))) + metadata?: PasskeyMetadata | Hex.Hex } export function metadataTree(metadata: Required['metadata']): GenericTree.Tree { @@ -140,7 +127,7 @@ export function fromTree(tree: GenericTree.Tree): PublicKey { return { requireUserVerification, x, y, metadata } } -export function rootFor2(publicKey: PublicKey): Hex.Hex { +export function rootFor(publicKey: PublicKey): Hex.Hex { return Hex.fromBytes(GenericTree.hash(toTree(publicKey))) } @@ -181,7 +168,7 @@ export function encode(decoded: DecodedSignature): Bytes.Bytes { flags |= (bytesTypeIndex - 1) << 4 // 0x10 bit // Set metadata flag if metadata exists - if (decoded.publicKey.metadata) { + if (decoded.embedMetadata) { flags |= 1 << 6 // 0x40 bit } From 4d4bfe32e78e0b9871b59445982253a0f41b5a33 Mon Sep 17 00:00:00 2001 From: Patryk Kalinowski Date: Mon, 10 Mar 2025 19:18:16 +0100 Subject: [PATCH 190/439] apps/demo-wallet: basic ecosystem wallet demo app --- apps/demo-wallet/.gitignore | 36 ++++++++++ apps/demo-wallet/README.md | 36 ++++++++++ apps/demo-wallet/app/favicon.ico | Bin 0 -> 25931 bytes apps/demo-wallet/app/google/callback/page.tsx | 53 +++++++++++++++ apps/demo-wallet/app/google/route.tsx | 42 ++++++++++++ apps/demo-wallet/app/handlers/id-token.tsx | 63 ++++++++++++++++++ apps/demo-wallet/app/layout.tsx | 18 +++++ apps/demo-wallet/app/lib/client-params.ts | 13 ++++ apps/demo-wallet/app/lib/cookies.ts | 19 ++++++ apps/demo-wallet/eslint.config.js | 4 ++ apps/demo-wallet/next.config.js | 4 ++ apps/demo-wallet/package.json | 29 ++++++++ apps/demo-wallet/tsconfig.json | 12 ++++ 13 files changed, 329 insertions(+) create mode 100644 apps/demo-wallet/.gitignore create mode 100644 apps/demo-wallet/README.md create mode 100644 apps/demo-wallet/app/favicon.ico create mode 100644 apps/demo-wallet/app/google/callback/page.tsx create mode 100644 apps/demo-wallet/app/google/route.tsx create mode 100644 apps/demo-wallet/app/handlers/id-token.tsx create mode 100644 apps/demo-wallet/app/layout.tsx create mode 100644 apps/demo-wallet/app/lib/client-params.ts create mode 100644 apps/demo-wallet/app/lib/cookies.ts create mode 100644 apps/demo-wallet/eslint.config.js create mode 100644 apps/demo-wallet/next.config.js create mode 100644 apps/demo-wallet/package.json create mode 100644 apps/demo-wallet/tsconfig.json diff --git a/apps/demo-wallet/.gitignore b/apps/demo-wallet/.gitignore new file mode 100644 index 000000000..f886745c5 --- /dev/null +++ b/apps/demo-wallet/.gitignore @@ -0,0 +1,36 @@ +# See https://help.github.com/articles/ignoring-files/ for more about ignoring files. + +# dependencies +/node_modules +/.pnp +.pnp.js +.yarn/install-state.gz + +# testing +/coverage + +# next.js +/.next/ +/out/ + +# production +/build + +# misc +.DS_Store +*.pem + +# debug +npm-debug.log* +yarn-debug.log* +yarn-error.log* + +# env files (can opt-in for commiting if needed) +.env* + +# vercel +.vercel + +# typescript +*.tsbuildinfo +next-env.d.ts diff --git a/apps/demo-wallet/README.md b/apps/demo-wallet/README.md new file mode 100644 index 000000000..a98bfa814 --- /dev/null +++ b/apps/demo-wallet/README.md @@ -0,0 +1,36 @@ +This is a [Next.js](https://nextjs.org) project bootstrapped with [`create-next-app`](https://nextjs.org/docs/app/api-reference/create-next-app). + +## Getting Started + +First, run the development server: + +```bash +npm run dev +# or +yarn dev +# or +pnpm dev +# or +bun dev +``` + +Open [http://localhost:3000](http://localhost:3000) with your browser to see the result. + +You can start editing the page by modifying `app/page.tsx`. The page auto-updates as you edit the file. + +This project uses [`next/font`](https://nextjs.org/docs/app/building-your-application/optimizing/fonts) to automatically optimize and load Inter, a custom Google Font. + +## Learn More + +To learn more about Next.js, take a look at the following resources: + +- [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API. +- [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial. + +You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js) - your feedback and contributions are welcome! + +## Deploy on Vercel + +The easiest way to deploy your Next.js app is to use the [Vercel Platform](https://vercel.com/new?utm_medium=default-template&filter=next.js&utm_source=create-next-app&utm_campaign=create-next-app-readme) from the creators of Next.js. + +Check out our [Next.js deployment documentation](https://nextjs.org/docs/app/building-your-application/deploying) for more details. diff --git a/apps/demo-wallet/app/favicon.ico b/apps/demo-wallet/app/favicon.ico new file mode 100644 index 0000000000000000000000000000000000000000..718d6fea4835ec2d246af9800eddb7ffb276240c GIT binary patch literal 25931 zcmeHv30#a{`}aL_*G&7qml|y<+KVaDM2m#dVr!KsA!#An?kSQM(q<_dDNCpjEux83 zLb9Z^XxbDl(w>%i@8hT6>)&Gu{h#Oeyszu?xtw#Zb1mO{pgX9699l+Qppw7jXaYf~-84xW z)w4x8?=youko|}Vr~(D$UXIbiXABHh`p1?nn8Po~fxRJv}|0e(BPs|G`(TT%kKVJAdg5*Z|x0leQq0 zkdUBvb#>9F()jo|T~kx@OM8$9wzs~t2l;K=woNssA3l6|sx2r3+kdfVW@e^8e*E}v zA1y5{bRi+3Z`uD3{F7LgFJDdvm;nJilkzDku>BwXH(8ItVCXk*-lSJnR?-2UN%hJ){&rlvg`CDTj z)Bzo!3v7Ou#83zEDEFcKt(f1E0~=rqeEbTnMvWR#{+9pg%7G8y>u1OVRUSoox-ovF z2Ydma(;=YuBY(eI|04{hXzZD6_f(v~H;C~y5=DhAC{MMS>2fm~1H_t2$56pc$NH8( z5bH|<)71dV-_oCHIrzrT`2s-5w_+2CM0$95I6X8p^r!gHp+j_gd;9O<1~CEQQGS8) zS9Qh3#p&JM-G8rHekNmKVewU;pJRcTAog68KYo^dRo}(M>36U4Us zfgYWSiHZL3;lpWT=zNAW>Dh#mB!_@Lg%$ms8N-;aPqMn+C2HqZgz&9~Eu z4|Kp<`$q)Uw1R?y(~S>ePdonHxpV1#eSP1B;Ogo+-Pk}6#0GsZZ5!||ev2MGdh}_m z{DeR7?0-1^zVs&`AV6Vt;r3`I`OI_wgs*w=eO%_#7Kepl{B@xiyCANc(l zzIyd4y|c6PXWq9-|KM8(zIk8LPk(>a)zyFWjhT!$HJ$qX1vo@d25W<fvZQ2zUz5WRc(UnFMKHwe1| zWmlB1qdbiA(C0jmnV<}GfbKtmcu^2*P^O?MBLZKt|As~ge8&AAO~2K@zbXelK|4T<{|y4`raF{=72kC2Kn(L4YyenWgrPiv z@^mr$t{#X5VuIMeL!7Ab6_kG$&#&5p*Z{+?5U|TZ`B!7llpVmp@skYz&n^8QfPJzL z0G6K_OJM9x+Wu2gfN45phANGt{7=C>i34CV{Xqlx(fWpeAoj^N0Biu`w+MVcCUyU* zDZuzO0>4Z6fbu^T_arWW5n!E45vX8N=bxTVeFoep_G#VmNlQzAI_KTIc{6>c+04vr zx@W}zE5JNSU>!THJ{J=cqjz+4{L4A{Ob9$ZJ*S1?Ggg3klFp!+Y1@K+pK1DqI|_gq z5ZDXVpge8-cs!o|;K73#YXZ3AShj50wBvuq3NTOZ`M&qtjj#GOFfgExjg8Gn8>Vq5 z`85n+9|!iLCZF5$HJ$Iu($dm?8~-ofu}tEc+-pyke=3!im#6pk_Wo8IA|fJwD&~~F zc16osQ)EBo58U7XDuMexaPRjU@h8tXe%S{fA0NH3vGJFhuyyO!Uyl2^&EOpX{9As0 zWj+P>{@}jxH)8|r;2HdupP!vie{sJ28b&bo!8`D^x}TE$%zXNb^X1p@0PJ86`dZyj z%ce7*{^oo+6%&~I!8hQy-vQ7E)0t0ybH4l%KltWOo~8cO`T=157JqL(oq_rC%ea&4 z2NcTJe-HgFjNg-gZ$6!Y`SMHrlj}Etf7?r!zQTPPSv}{so2e>Fjs1{gzk~LGeesX%r(Lh6rbhSo_n)@@G-FTQy93;l#E)hgP@d_SGvyCp0~o(Y;Ee8{ zdVUDbHm5`2taPUOY^MAGOw*>=s7=Gst=D+p+2yON!0%Hk` zz5mAhyT4lS*T3LS^WSxUy86q&GnoHxzQ6vm8)VS}_zuqG?+3td68_x;etQAdu@sc6 zQJ&5|4(I?~3d-QOAODHpZ=hlSg(lBZ!JZWCtHHSj`0Wh93-Uk)_S%zsJ~aD>{`A0~ z9{AG(e|q3g5B%wYKRxiL2Y$8(4w6bzchKuloQW#e&S3n+P- z8!ds-%f;TJ1>)v)##>gd{PdS2Oc3VaR`fr=`O8QIO(6(N!A?pr5C#6fc~Ge@N%Vvu zaoAX2&(a6eWy_q&UwOhU)|P3J0Qc%OdhzW=F4D|pt0E4osw;%<%Dn58hAWD^XnZD= z>9~H(3bmLtxpF?a7su6J7M*x1By7YSUbxGi)Ot0P77`}P3{)&5Un{KD?`-e?r21!4vTTnN(4Y6Lin?UkSM z`MXCTC1@4A4~mvz%Rh2&EwY))LeoT=*`tMoqcEXI>TZU9WTP#l?uFv+@Dn~b(>xh2 z;>B?;Tz2SR&KVb>vGiBSB`@U7VIWFSo=LDSb9F{GF^DbmWAfpms8Sx9OX4CnBJca3 zlj9(x!dIjN?OG1X4l*imJNvRCk}F%!?SOfiOq5y^mZW)jFL@a|r-@d#f7 z2gmU8L3IZq0ynIws=}~m^#@&C%J6QFo~Mo4V`>v7MI-_!EBMMtb%_M&kvAaN)@ZVw z+`toz&WG#HkWDjnZE!6nk{e-oFdL^$YnbOCN}JC&{$#$O27@|Tn-skXr)2ml2~O!5 zX+gYoxhoc7qoU?C^3~&!U?kRFtnSEecWuH0B0OvLodgUAi}8p1 zrO6RSXHH}DMc$&|?D004DiOVMHV8kXCP@7NKB zgaZq^^O<7PoKEp72kby@W0Z!Y*Ay{&vfg#C&gG@YVR9g?FEocMUi1gSN$+V+ayF45{a zuDZDTN}mS|;BO%gEf}pjBfN2-gIrU#G5~cucA;dokXW89%>AyXJJI z9X4UlIWA|ZYHgbI z5?oFk@A=Ik7lrEQPDH!H+b`7_Y~aDb_qa=B2^Y&Ow41cU=4WDd40dp5(QS-WMN-=Y z9g;6_-JdNU;|6cPwf$ak*aJIcwL@1n$#l~zi{c{EW?T;DaW*E8DYq?Umtz{nJ&w-M zEMyTDrC&9K$d|kZe2#ws6)L=7K+{ zQw{XnV6UC$6-rW0emqm8wJoeZK)wJIcV?dST}Z;G0Arq{dVDu0&4kd%N!3F1*;*pW zR&qUiFzK=@44#QGw7k1`3t_d8&*kBV->O##t|tonFc2YWrL7_eqg+=+k;!F-`^b8> z#KWCE8%u4k@EprxqiV$VmmtiWxDLgnGu$Vs<8rppV5EajBXL4nyyZM$SWVm!wnCj-B!Wjqj5-5dNXukI2$$|Bu3Lrw}z65Lc=1G z^-#WuQOj$hwNGG?*CM_TO8Bg-1+qc>J7k5c51U8g?ZU5n?HYor;~JIjoWH-G>AoUP ztrWWLbRNqIjW#RT*WqZgPJXU7C)VaW5}MiijYbABmzoru6EmQ*N8cVK7a3|aOB#O& zBl8JY2WKfmj;h#Q!pN%9o@VNLv{OUL?rixHwOZuvX7{IJ{(EdPpuVFoQqIOa7giLVkBOKL@^smUA!tZ1CKRK}#SSM)iQHk)*R~?M!qkCruaS!#oIL1c z?J;U~&FfH#*98^G?i}pA{ z9Jg36t4=%6mhY(quYq*vSxptes9qy|7xSlH?G=S@>u>Ebe;|LVhs~@+06N<4CViBk zUiY$thvX;>Tby6z9Y1edAMQaiH zm^r3v#$Q#2T=X>bsY#D%s!bhs^M9PMAcHbCc0FMHV{u-dwlL;a1eJ63v5U*?Q_8JO zT#50!RD619#j_Uf))0ooADz~*9&lN!bBDRUgE>Vud-i5ck%vT=r^yD*^?Mp@Q^v+V zG#-?gKlr}Eeqifb{|So?HM&g91P8|av8hQoCmQXkd?7wIJwb z_^v8bbg`SAn{I*4bH$u(RZ6*xUhuA~hc=8czK8SHEKTzSxgbwi~9(OqJB&gwb^l4+m`k*Q;_?>Y-APi1{k zAHQ)P)G)f|AyjSgcCFps)Fh6Bca*Xznq36!pV6Az&m{O8$wGFD? zY&O*3*J0;_EqM#jh6^gMQKpXV?#1?>$ml1xvh8nSN>-?H=V;nJIwB07YX$e6vLxH( zqYwQ>qxwR(i4f)DLd)-$P>T-no_c!LsN@)8`e;W@)-Hj0>nJ-}Kla4-ZdPJzI&Mce zv)V_j;(3ERN3_@I$N<^|4Lf`B;8n+bX@bHbcZTopEmDI*Jfl)-pFDvo6svPRoo@(x z);_{lY<;);XzT`dBFpRmGrr}z5u1=pC^S-{ce6iXQlLGcItwJ^mZx{m$&DA_oEZ)B{_bYPq-HA zcH8WGoBG(aBU_j)vEy+_71T34@4dmSg!|M8Vf92Zj6WH7Q7t#OHQqWgFE3ARt+%!T z?oLovLVlnf?2c7pTc)~cc^($_8nyKwsN`RA-23ed3sdj(ys%pjjM+9JrctL;dy8a( z@en&CQmnV(()bu|Y%G1-4a(6x{aLytn$T-;(&{QIJB9vMox11U-1HpD@d(QkaJdEb zG{)+6Dos_L+O3NpWo^=gR?evp|CqEG?L&Ut#D*KLaRFOgOEK(Kq1@!EGcTfo+%A&I z=dLbB+d$u{sh?u)xP{PF8L%;YPPW53+@{>5W=Jt#wQpN;0_HYdw1{ksf_XhO4#2F= zyPx6Lx2<92L-;L5PD`zn6zwIH`Jk($?Qw({erA$^bC;q33hv!d!>%wRhj# zal^hk+WGNg;rJtb-EB(?czvOM=H7dl=vblBwAv>}%1@{}mnpUznfq1cE^sgsL0*4I zJ##!*B?=vI_OEVis5o+_IwMIRrpQyT_Sq~ZU%oY7c5JMIADzpD!Upz9h@iWg_>>~j zOLS;wp^i$-E?4<_cp?RiS%Rd?i;f*mOz=~(&3lo<=@(nR!_Rqiprh@weZlL!t#NCc zO!QTcInq|%#>OVgobj{~ixEUec`E25zJ~*DofsQdzIa@5^nOXj2T;8O`l--(QyU^$t?TGY^7#&FQ+2SS3B#qK*k3`ye?8jUYSajE5iBbJls75CCc(m3dk{t?- zopcER9{Z?TC)mk~gpi^kbbu>b-+a{m#8-y2^p$ka4n60w;Sc2}HMf<8JUvhCL0B&Btk)T`ctE$*qNW8L$`7!r^9T+>=<=2qaq-;ll2{`{Rg zc5a0ZUI$oG&j-qVOuKa=*v4aY#IsoM+1|c4Z)<}lEDvy;5huB@1RJPquU2U*U-;gu z=En2m+qjBzR#DEJDO`WU)hdd{Vj%^0V*KoyZ|5lzV87&g_j~NCjwv0uQVqXOb*QrQ zy|Qn`hxx(58c70$E;L(X0uZZ72M1!6oeg)(cdKO ze0gDaTz+ohR-#d)NbAH4x{I(21yjwvBQfmpLu$)|m{XolbgF!pmsqJ#D}(ylp6uC> z{bqtcI#hT#HW=wl7>p!38sKsJ`r8}lt-q%Keqy%u(xk=yiIJiUw6|5IvkS+#?JTBl z8H5(Q?l#wzazujH!8o>1xtn8#_w+397*_cy8!pQGP%K(Ga3pAjsaTbbXJlQF_+m+-UpUUent@xM zg%jqLUExj~o^vQ3Gl*>wh=_gOr2*|U64_iXb+-111aH}$TjeajM+I20xw(((>fej-@CIz4S1pi$(#}P7`4({6QS2CaQS4NPENDp>sAqD z$bH4KGzXGffkJ7R>V>)>tC)uax{UsN*dbeNC*v}#8Y#OWYwL4t$ePR?VTyIs!wea+ z5Urmc)X|^`MG~*dS6pGSbU+gPJoq*^a=_>$n4|P^w$sMBBy@f*Z^Jg6?n5?oId6f{ z$LW4M|4m502z0t7g<#Bx%X;9<=)smFolV&(V^(7Cv2-sxbxopQ!)*#ZRhTBpx1)Fc zNm1T%bONzv6@#|dz(w02AH8OXe>kQ#1FMCzO}2J_mST)+ExmBr9cva-@?;wnmWMOk z{3_~EX_xadgJGv&H@zK_8{(x84`}+c?oSBX*Ge3VdfTt&F}yCpFP?CpW+BE^cWY0^ zb&uBN!Ja3UzYHK-CTyA5=L zEMW{l3Usky#ly=7px648W31UNV@K)&Ub&zP1c7%)`{);I4b0Q<)B}3;NMG2JH=X$U zfIW4)4n9ZM`-yRj67I)YSLDK)qfUJ_ij}a#aZN~9EXrh8eZY2&=uY%2N0UFF7<~%M zsB8=erOWZ>Ct_#^tHZ|*q`H;A)5;ycw*IcmVxi8_0Xk}aJA^ath+E;xg!x+As(M#0=)3!NJR6H&9+zd#iP(m0PIW8$ z1Y^VX`>jm`W!=WpF*{ioM?C9`yOR>@0q=u7o>BP-eSHqCgMDj!2anwH?s%i2p+Q7D zzszIf5XJpE)IG4;d_(La-xenmF(tgAxK`Y4sQ}BSJEPs6N_U2vI{8=0C_F?@7<(G; zo$~G=8p+076G;`}>{MQ>t>7cm=zGtfbdDXm6||jUU|?X?CaE?(<6bKDYKeHlz}DA8 zXT={X=yp_R;HfJ9h%?eWvQ!dRgz&Su*JfNt!Wu>|XfU&68iRikRrHRW|ZxzRR^`eIGt zIeiDgVS>IeExKVRWW8-=A=yA`}`)ZkWBrZD`hpWIxBGkh&f#ijr449~m`j6{4jiJ*C!oVA8ZC?$1RM#K(_b zL9TW)kN*Y4%^-qPpMP7d4)o?Nk#>aoYHT(*g)qmRUb?**F@pnNiy6Fv9rEiUqD(^O zzyS?nBrX63BTRYduaG(0VVG2yJRe%o&rVrLjbxTaAFTd8s;<<@Qs>u(<193R8>}2_ zuwp{7;H2a*X7_jryzriZXMg?bTuegABb^87@SsKkr2)0Gyiax8KQWstw^v#ix45EVrcEhr>!NMhprl$InQMzjSFH54x5k9qHc`@9uKQzvL4ihcq{^B zPrVR=o_ic%Y>6&rMN)hTZsI7I<3&`#(nl+3y3ys9A~&^=4?PL&nd8)`OfG#n zwAMN$1&>K++c{^|7<4P=2y(B{jJsQ0a#U;HTo4ZmWZYvI{+s;Td{Yzem%0*k#)vjpB zia;J&>}ICate44SFYY3vEelqStQWFihx%^vQ@Do(sOy7yR2@WNv7Y9I^yL=nZr3mb zXKV5t@=?-Sk|b{XMhA7ZGB@2hqsx}4xwCW!in#C zI@}scZlr3-NFJ@NFaJlhyfcw{k^vvtGl`N9xSo**rDW4S}i zM9{fMPWo%4wYDG~BZ18BD+}h|GQKc-g^{++3MY>}W_uq7jGHx{mwE9fZiPCoxN$+7 zrODGGJrOkcPQUB(FD5aoS4g~7#6NR^ma7-!>mHuJfY5kTe6PpNNKC9GGRiu^L31uG z$7v`*JknQHsYB!Tm_W{a32TM099djW%5e+j0Ve_ct}IM>XLF1Ap+YvcrLV=|CKo6S zb+9Nl3_YdKP6%Cxy@6TxZ>;4&nTneadr z_ES90ydCev)LV!dN=#(*f}|ZORFdvkYBni^aLbUk>BajeWIOcmHP#8S)*2U~QKI%S zyrLmtPqb&TphJ;>yAxri#;{uyk`JJqODDw%(Z=2`1uc}br^V%>j!gS)D*q*f_-qf8&D;W1dJgQMlaH5er zN2U<%Smb7==vE}dDI8K7cKz!vs^73o9f>2sgiTzWcwY|BMYHH5%Vn7#kiw&eItCqa zIkR2~Q}>X=Ar8W|^Ms41Fm8o6IB2_j60eOeBB1Br!boW7JnoeX6Gs)?7rW0^5psc- zjS16yb>dFn>KPOF;imD}e!enuIniFzv}n$m2#gCCv4jM#ArwlzZ$7@9&XkFxZ4n!V zj3dyiwW4Ki2QG{@i>yuZXQizw_OkZI^-3otXC{!(lUpJF33gI60ak;Uqitp74|B6I zgg{b=Iz}WkhCGj1M=hu4#Aw173YxIVbISaoc z-nLZC*6Tgivd5V`K%GxhBsp@SUU60-rfc$=wb>zdJzXS&-5(NRRodFk;Kxk!S(O(a0e7oY=E( zAyS;Ow?6Q&XA+cnkCb{28_1N8H#?J!*$MmIwLq^*T_9-z^&UE@A(z9oGYtFy6EZef LrJugUA?W`A8`#=m literal 0 HcmV?d00001 diff --git a/apps/demo-wallet/app/google/callback/page.tsx b/apps/demo-wallet/app/google/callback/page.tsx new file mode 100644 index 000000000..52fd38100 --- /dev/null +++ b/apps/demo-wallet/app/google/callback/page.tsx @@ -0,0 +1,53 @@ +'use server' + +import { cookies, headers } from 'next/headers' +import IdTokenHandler from '../../handlers/id-token' +import { getClientParams } from '../../lib/cookies' + +const googleClientId = process.env.GOOGLE_CLIENT_ID! +const googleClientSecret = process.env.GOOGLE_CLIENT_SECRET! + +interface SearchParams { + code: string + state: string +} + +export default async function GoogleCallback({ searchParams }: { searchParams: Promise }) { + const cookieStore = await cookies() + const tokenEndpoint = 'https://oauth2.googleapis.com/token' + const query = await searchParams + + // Get the origin from headers + const headersList = await headers() + const host = headersList.get('host') + const protocol = headersList.get('x-forwarded-proto') || 'http' + const origin = `${protocol}://${host}` + + const params = new URLSearchParams({ + client_id: googleClientId, + client_secret: googleClientSecret, + code: query.code, + redirect_uri: `${origin}/google/callback`, + grant_type: 'authorization_code', + code_verifier: cookieStore.get('google-verifier')?.value!, + }) + + const response = await fetch(tokenEndpoint, { + method: 'POST', + headers: { 'Content-Type': 'application/x-www-form-urlencoded' }, + body: params, + }) + const tokenRes = await response.json() + + const clientParams = await getClientParams(query.state) + return ( + + ) +} diff --git a/apps/demo-wallet/app/google/route.tsx b/apps/demo-wallet/app/google/route.tsx new file mode 100644 index 000000000..f1dce9983 --- /dev/null +++ b/apps/demo-wallet/app/google/route.tsx @@ -0,0 +1,42 @@ +'use server' + +import { randomBytes, createHash } from 'crypto' +import { cookies } from 'next/headers' +import { storeClientParams } from '../lib/cookies' + +const googleClientId = process.env.GOOGLE_CLIENT_ID! + +export async function GET(request: Request) { + const url = new URL(request.url) + const cookieStore = await cookies() + const state = 'google-' + generateRandomString(32) + + // TODO: validate client params + await storeClientParams(state, url.searchParams) + + const verifier = generateRandomString(128) + const codeChallenge = await generateCodeChallenge(verifier) + cookieStore.set(`google-verifier`, verifier) + + const params = new URLSearchParams({ + client_id: googleClientId, + redirect_uri: `${url.origin}/google/callback`, + response_type: 'code', + scope: 'openid profile email', + code_challenge: codeChallenge, + code_challenge_method: 'S256', + nonce: generateRandomString(32), + state, + }) + return Response.redirect(`https://accounts.google.com/o/oauth2/v2/auth?${params.toString()}`) +} + +function generateRandomString(length: number) { + const array = randomBytes(length) + return array.toString('base64url') +} + +async function generateCodeChallenge(verifier: string) { + const hash = createHash('sha256').update(verifier).digest() + return hash.toString('base64url') +} diff --git a/apps/demo-wallet/app/handlers/id-token.tsx b/apps/demo-wallet/app/handlers/id-token.tsx new file mode 100644 index 000000000..55ce4d2a2 --- /dev/null +++ b/apps/demo-wallet/app/handlers/id-token.tsx @@ -0,0 +1,63 @@ +'use client' + +import { useEffect } from 'react' +import { redirect } from 'next/navigation' +import { PersonalMessage, Hex, Bytes } from 'ox' +import { Identity } from '@0xsequence/sequence-wdk' +import type { ClientParams } from '../lib/client-params' + +interface Props { + nitroRpc: string + idToken: string + ecosystemId: string + issuer: string + audience: string + clientParams: ClientParams +} + +export default function IdTokenHandler({ nitroRpc, idToken, ecosystemId, issuer, audience, clientParams }: Props) { + useEffect(() => { + ;(async () => { + const wdk = new Identity.Wdk(ecosystemId, new Identity.IdentityInstrument(nitroRpc, window.fetch)) + const signer = await wdk.loginWithIdToken(issuer, audience, idToken) + + // We have the signer, now we can use it to sign a message + console.log(signer) + + const attestationMessage = [ + `SessionAddress=${clientParams.sessionAddress}`, + `EcosystemID=${ecosystemId}`, + `AppID=${clientParams.appId}`, + `IdentityType=OIDC`, + `Issuer=${issuer}`, + `Audience=${audience}`, + `RedirectURI=${clientParams.redirectUri}`, + ].join('; ') + + const personalMessage = PersonalMessage.getSignPayload(Hex.fromString(attestationMessage)) + const attestationSignature = await signer.signDigest(Bytes.fromHex(personalMessage)) + console.log({ attestationSignature, attestationMessage }) + + const returnParams = new URLSearchParams({ + attestation_signature: JSON.stringify(attestationSignature), + attestation_message: attestationMessage, + state: clientParams.state, + session_address: clientParams.sessionAddress, + }) + + redirect(`${clientParams.redirectUri}?${returnParams.toString()}`) + })() + }, [ + nitroRpc, + idToken, + ecosystemId, + issuer, + audience, + clientParams.sessionAddress, + clientParams.appId, + clientParams.redirectUri, + clientParams.state, + ]) + + return
Signing in...
+} diff --git a/apps/demo-wallet/app/layout.tsx b/apps/demo-wallet/app/layout.tsx new file mode 100644 index 000000000..6b8b45180 --- /dev/null +++ b/apps/demo-wallet/app/layout.tsx @@ -0,0 +1,18 @@ +import type { Metadata } from 'next' + +export const metadata: Metadata = { + title: 'Create Next App', + description: 'Generated by create next app', +} + +export default function RootLayout({ + children, +}: Readonly<{ + children: React.ReactNode +}>) { + return ( + + {children} + + ) +} diff --git a/apps/demo-wallet/app/lib/client-params.ts b/apps/demo-wallet/app/lib/client-params.ts new file mode 100644 index 000000000..c0e23dd3e --- /dev/null +++ b/apps/demo-wallet/app/lib/client-params.ts @@ -0,0 +1,13 @@ +export interface SearchParams { + app_id: string + redirect_uri: string + session_address: string + state: string +} + +export interface ClientParams { + appId: string + redirectUri: string + sessionAddress: string + state: string +} diff --git a/apps/demo-wallet/app/lib/cookies.ts b/apps/demo-wallet/app/lib/cookies.ts new file mode 100644 index 000000000..2f3afd755 --- /dev/null +++ b/apps/demo-wallet/app/lib/cookies.ts @@ -0,0 +1,19 @@ +import { cookies } from 'next/headers' +import { ClientParams } from './client-params' + +export async function getClientParams(state: string) { + const cookieStore = await cookies() + const clientParams = JSON.parse(cookieStore.get(`client-params-${state}`)?.value || '{}') as ClientParams + return clientParams +} + +export async function storeClientParams(state: string, searchParams: URLSearchParams) { + const cookieStore = await cookies() + const clientParams: ClientParams = { + appId: searchParams.get('app_id') || '', + redirectUri: searchParams.get('redirect_uri') || '', + sessionAddress: searchParams.get('session_address') || '', + state: searchParams.get('state') || '', + } + cookieStore.set(`client-params-${state}`, JSON.stringify(clientParams)) +} diff --git a/apps/demo-wallet/eslint.config.js b/apps/demo-wallet/eslint.config.js new file mode 100644 index 000000000..3d2c2e9d4 --- /dev/null +++ b/apps/demo-wallet/eslint.config.js @@ -0,0 +1,4 @@ +import { nextJsConfig } from '@repo/eslint-config/next-js' + +/** @type {import("eslint").Linter.Config} */ +export default nextJsConfig diff --git a/apps/demo-wallet/next.config.js b/apps/demo-wallet/next.config.js new file mode 100644 index 000000000..1d6147825 --- /dev/null +++ b/apps/demo-wallet/next.config.js @@ -0,0 +1,4 @@ +/** @type {import('next').NextConfig} */ +const nextConfig = {} + +export default nextConfig diff --git a/apps/demo-wallet/package.json b/apps/demo-wallet/package.json new file mode 100644 index 000000000..9604b89c8 --- /dev/null +++ b/apps/demo-wallet/package.json @@ -0,0 +1,29 @@ +{ + "name": "demo-wallet", + "version": "0.1.0", + "type": "module", + "private": true, + "scripts": { + "dev": "next dev --turbopack --port 3000", + "build": "next build", + "start": "next start", + "lint": "next lint --max-warnings 0", + "check-types": "tsc --noEmit" + }, + "dependencies": { + "@0xsequence/sequence-wdk": "workspace:../../packages/wdk", + "@repo/ui": "workspace:*", + "next": "^15.1.0", + "ox": "^0.6.7", + "react": "^19.0.0", + "react-dom": "^19.0.0" + }, + "devDependencies": { + "@repo/eslint-config": "workspace:*", + "@repo/typescript-config": "workspace:*", + "@types/node": "^20", + "@types/react": "18.3.1", + "@types/react-dom": "18.3.0", + "typescript": "5.5.4" + } +} diff --git a/apps/demo-wallet/tsconfig.json b/apps/demo-wallet/tsconfig.json new file mode 100644 index 000000000..c2fa4ee5d --- /dev/null +++ b/apps/demo-wallet/tsconfig.json @@ -0,0 +1,12 @@ +{ + "extends": "@repo/typescript-config/nextjs.json", + "compilerOptions": { + "plugins": [ + { + "name": "next" + } + ] + }, + "include": ["**/*.ts", "**/*.tsx", "next-env.d.ts", "next.config.js", ".next/types/**/*.ts"], + "exclude": ["node_modules"] +} From dd0ae0234d68d2ec95cc9cbc83882b40b4197049 Mon Sep 17 00:00:00 2001 From: Patryk Kalinowski Date: Mon, 10 Mar 2025 19:38:24 +0100 Subject: [PATCH 191/439] fix wdk build --- packages/wdk/tsconfig.json | 4 +- pnpm-lock.yaml | 142 +++++++++++++++++++++---------------- 2 files changed, 84 insertions(+), 62 deletions(-) diff --git a/packages/wdk/tsconfig.json b/packages/wdk/tsconfig.json index de72db6bb..ba6dfce5c 100644 --- a/packages/wdk/tsconfig.json +++ b/packages/wdk/tsconfig.json @@ -1,10 +1,10 @@ { "extends": "@repo/typescript-config/base.json", "compilerOptions": { - "rootDir": ".", + "rootDir": "src", "outDir": "dist", "types": ["node", "jest"] }, - "include": ["src", "test"], + "include": ["src"], "exclude": ["node_modules", "dist"] } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 1973d61d5..3c7b0df6c 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -24,6 +24,46 @@ importers: specifier: 5.5.4 version: 5.5.4 + apps/demo-wallet: + dependencies: + '@0xsequence/sequence-wdk': + specifier: workspace:../../packages/wdk + version: link:../../packages/wdk + '@repo/ui': + specifier: workspace:* + version: link:../../packages/ui + next: + specifier: ^15.1.0 + version: 15.1.0(react-dom@19.0.0(react@19.0.0))(react@19.0.0) + ox: + specifier: ^0.6.7 + version: 0.6.7(typescript@5.5.4) + react: + specifier: ^19.0.0 + version: 19.0.0 + react-dom: + specifier: ^19.0.0 + version: 19.0.0(react@19.0.0) + devDependencies: + '@repo/eslint-config': + specifier: workspace:* + version: link:../../packages/eslint-config + '@repo/typescript-config': + specifier: workspace:* + version: link:../../packages/typescript-config + '@types/node': + specifier: ^20 + version: 20.17.6 + '@types/react': + specifier: 18.3.1 + version: 18.3.1 + '@types/react-dom': + specifier: 18.3.0 + version: 18.3.0 + typescript: + specifier: 5.5.4 + version: 5.5.4 + apps/docs: dependencies: '@repo/ui': @@ -1401,9 +1441,6 @@ packages: resolution: {integrity: sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==} engines: {node: '>=10'} - caniuse-lite@1.0.30001683: - resolution: {integrity: sha512-iqmNnThZ0n70mNwvxpEC2nBJ037ZHZUoBI5Gorh1Mw6IlEAZujEoU1tXA628iZfzm7R9FvFzxbfdgml82a3k8Q==} - caniuse-lite@1.0.30001701: resolution: {integrity: sha512-faRs/AW3jA9nTwmJBSO1PQ6L/EOgsB5HMQQq4iCu5zhPgVVgO/pZRHlmatwijZKetFw8/Pr4q6dEN8sJuq8qTw==} @@ -4104,7 +4141,7 @@ snapshots: '@jest/console@29.7.0': dependencies: '@jest/types': 29.6.3 - '@types/node': 20.17.6 + '@types/node': 22.13.9 chalk: 4.1.2 jest-message-util: 29.7.0 jest-util: 29.7.0 @@ -4117,14 +4154,14 @@ snapshots: '@jest/test-result': 29.7.0 '@jest/transform': 29.7.0 '@jest/types': 29.6.3 - '@types/node': 20.17.6 + '@types/node': 22.13.9 ansi-escapes: 4.3.2 chalk: 4.1.2 ci-info: 3.9.0 exit: 0.1.2 graceful-fs: 4.2.11 jest-changed-files: 29.7.0 - jest-config: 29.7.0(@types/node@20.17.6)(ts-node@10.9.2(@types/node@22.13.9)(typescript@5.7.3)) + jest-config: 29.7.0(@types/node@22.13.9)(ts-node@10.9.2(@types/node@22.13.9)(typescript@5.7.3)) jest-haste-map: 29.7.0 jest-message-util: 29.7.0 jest-regex-util: 29.6.3 @@ -4149,7 +4186,7 @@ snapshots: dependencies: '@jest/fake-timers': 29.7.0 '@jest/types': 29.6.3 - '@types/node': 20.17.6 + '@types/node': 22.13.9 jest-mock: 29.7.0 '@jest/expect-utils@29.7.0': @@ -4167,7 +4204,7 @@ snapshots: dependencies: '@jest/types': 29.6.3 '@sinonjs/fake-timers': 10.3.0 - '@types/node': 20.17.6 + '@types/node': 22.13.9 jest-message-util: 29.7.0 jest-mock: 29.7.0 jest-util: 29.7.0 @@ -4189,7 +4226,7 @@ snapshots: '@jest/transform': 29.7.0 '@jest/types': 29.6.3 '@jridgewell/trace-mapping': 0.3.25 - '@types/node': 20.17.6 + '@types/node': 22.13.9 chalk: 4.1.2 collect-v8-coverage: 1.0.2 exit: 0.1.2 @@ -4259,7 +4296,7 @@ snapshots: '@jest/schemas': 29.6.3 '@types/istanbul-lib-coverage': 2.0.6 '@types/istanbul-reports': 3.0.4 - '@types/node': 20.17.6 + '@types/node': 22.13.9 '@types/yargs': 17.0.33 chalk: 4.1.2 @@ -4449,11 +4486,11 @@ snapshots: '@types/glob@7.2.0': dependencies: '@types/minimatch': 5.1.2 - '@types/node': 20.17.6 + '@types/node': 22.13.9 '@types/graceful-fs@4.1.9': dependencies: - '@types/node': 20.17.6 + '@types/node': 22.13.9 '@types/inquirer@6.5.0': dependencies: @@ -4517,7 +4554,7 @@ snapshots: '@types/through@0.0.33': dependencies: - '@types/node': 20.17.6 + '@types/node': 22.13.9 '@types/tinycolor2@1.4.6': {} @@ -4609,6 +4646,10 @@ snapshots: '@typescript-eslint/types': 8.15.0 eslint-visitor-keys: 4.2.0 + abitype@1.0.8(typescript@5.5.4): + optionalDependencies: + typescript: 5.5.4 + abitype@1.0.8(typescript@5.7.3): optionalDependencies: typescript: 5.7.3 @@ -4871,8 +4912,6 @@ snapshots: camelcase@6.3.0: {} - caniuse-lite@1.0.30001683: {} - caniuse-lite@1.0.30001701: {} chalk@2.4.2: @@ -5907,7 +5946,7 @@ snapshots: '@babel/parser': 7.26.9 '@istanbuljs/schema': 0.1.3 istanbul-lib-coverage: 3.2.2 - semver: 7.6.3 + semver: 7.7.1 transitivePeerDependencies: - supports-color @@ -5957,7 +5996,7 @@ snapshots: '@jest/expect': 29.7.0 '@jest/test-result': 29.7.0 '@jest/types': 29.6.3 - '@types/node': 20.17.6 + '@types/node': 22.13.9 chalk: 4.1.2 co: 4.6.0 dedent: 1.5.3 @@ -5996,37 +6035,6 @@ snapshots: - supports-color - ts-node - jest-config@29.7.0(@types/node@20.17.6)(ts-node@10.9.2(@types/node@22.13.9)(typescript@5.7.3)): - dependencies: - '@babel/core': 7.26.9 - '@jest/test-sequencer': 29.7.0 - '@jest/types': 29.6.3 - babel-jest: 29.7.0(@babel/core@7.26.9) - chalk: 4.1.2 - ci-info: 3.9.0 - deepmerge: 4.3.1 - glob: 7.2.3 - graceful-fs: 4.2.11 - jest-circus: 29.7.0 - jest-environment-node: 29.7.0 - jest-get-type: 29.6.3 - jest-regex-util: 29.6.3 - jest-resolve: 29.7.0 - jest-runner: 29.7.0 - jest-util: 29.7.0 - jest-validate: 29.7.0 - micromatch: 4.0.8 - parse-json: 5.2.0 - pretty-format: 29.7.0 - slash: 3.0.0 - strip-json-comments: 3.1.1 - optionalDependencies: - '@types/node': 20.17.6 - ts-node: 10.9.2(@types/node@22.13.9)(typescript@5.7.3) - transitivePeerDependencies: - - babel-plugin-macros - - supports-color - jest-config@29.7.0(@types/node@22.13.9)(ts-node@10.9.2(@types/node@22.13.9)(typescript@5.7.3)): dependencies: '@babel/core': 7.26.9 @@ -6082,7 +6090,7 @@ snapshots: '@jest/environment': 29.7.0 '@jest/fake-timers': 29.7.0 '@jest/types': 29.6.3 - '@types/node': 20.17.6 + '@types/node': 22.13.9 jest-mock: 29.7.0 jest-util: 29.7.0 @@ -6092,7 +6100,7 @@ snapshots: dependencies: '@jest/types': 29.6.3 '@types/graceful-fs': 4.1.9 - '@types/node': 20.17.6 + '@types/node': 22.13.9 anymatch: 3.1.3 fb-watchman: 2.0.2 graceful-fs: 4.2.11 @@ -6131,7 +6139,7 @@ snapshots: jest-mock@29.7.0: dependencies: '@jest/types': 29.6.3 - '@types/node': 20.17.6 + '@types/node': 22.13.9 jest-util: 29.7.0 jest-pnp-resolver@1.2.3(jest-resolve@29.7.0): @@ -6166,7 +6174,7 @@ snapshots: '@jest/test-result': 29.7.0 '@jest/transform': 29.7.0 '@jest/types': 29.6.3 - '@types/node': 20.17.6 + '@types/node': 22.13.9 chalk: 4.1.2 emittery: 0.13.1 graceful-fs: 4.2.11 @@ -6194,7 +6202,7 @@ snapshots: '@jest/test-result': 29.7.0 '@jest/transform': 29.7.0 '@jest/types': 29.6.3 - '@types/node': 20.17.6 + '@types/node': 22.13.9 chalk: 4.1.2 cjs-module-lexer: 1.4.3 collect-v8-coverage: 1.0.2 @@ -6233,14 +6241,14 @@ snapshots: jest-util: 29.7.0 natural-compare: 1.4.0 pretty-format: 29.7.0 - semver: 7.6.3 + semver: 7.7.1 transitivePeerDependencies: - supports-color jest-util@29.7.0: dependencies: '@jest/types': 29.6.3 - '@types/node': 20.17.6 + '@types/node': 22.13.9 chalk: 4.1.2 ci-info: 3.9.0 graceful-fs: 4.2.11 @@ -6259,7 +6267,7 @@ snapshots: dependencies: '@jest/test-result': 29.7.0 '@jest/types': 29.6.3 - '@types/node': 20.17.6 + '@types/node': 22.13.9 ansi-escapes: 4.3.2 chalk: 4.1.2 emittery: 0.13.1 @@ -6268,7 +6276,7 @@ snapshots: jest-worker@29.7.0: dependencies: - '@types/node': 20.17.6 + '@types/node': 22.13.9 jest-util: 29.7.0 merge-stream: 2.0.0 supports-color: 8.1.1 @@ -6432,7 +6440,7 @@ snapshots: make-dir@4.0.0: dependencies: - semver: 7.6.3 + semver: 7.7.1 make-error@1.3.6: {} @@ -6489,7 +6497,7 @@ snapshots: '@swc/counter': 0.1.3 '@swc/helpers': 0.5.15 busboy: 1.6.0 - caniuse-lite: 1.0.30001683 + caniuse-lite: 1.0.30001701 postcss: 8.4.31 react: 19.0.0 react-dom: 19.0.0(react@19.0.0) @@ -6625,6 +6633,20 @@ snapshots: outdent@0.5.0: {} + ox@0.6.7(typescript@5.5.4): + dependencies: + '@adraffy/ens-normalize': 1.11.0 + '@noble/curves': 1.8.1 + '@noble/hashes': 1.7.1 + '@scure/bip32': 1.6.2 + '@scure/bip39': 1.5.4 + abitype: 1.0.8(typescript@5.5.4) + eventemitter3: 5.0.1 + optionalDependencies: + typescript: 5.5.4 + transitivePeerDependencies: + - zod + ox@0.6.7(typescript@5.7.3): dependencies: '@adraffy/ens-normalize': 1.11.0 @@ -6949,7 +6971,7 @@ snapshots: dependencies: color: 4.2.3 detect-libc: 2.0.3 - semver: 7.6.3 + semver: 7.7.1 optionalDependencies: '@img/sharp-darwin-arm64': 0.33.5 '@img/sharp-darwin-x64': 0.33.5 From b3fd62e011768ff14f7a28bdf154d4476ede74d6 Mon Sep 17 00:00:00 2001 From: Patryk Kalinowski Date: Mon, 10 Mar 2025 19:56:32 +0100 Subject: [PATCH 192/439] wdk: update identity-instrument generated client --- ...itro.gen.ts => identity-instrument.gen.ts} | 34 +++++++++---------- packages/wdk/src/identity/nitro/index.ts | 2 +- packages/wdk/src/identity/wdk.ts | 4 +-- 3 files changed, 20 insertions(+), 20 deletions(-) rename packages/wdk/src/identity/nitro/{nitro.gen.ts => identity-instrument.gen.ts} (94%) diff --git a/packages/wdk/src/identity/nitro/nitro.gen.ts b/packages/wdk/src/identity/nitro/identity-instrument.gen.ts similarity index 94% rename from packages/wdk/src/identity/nitro/nitro.gen.ts rename to packages/wdk/src/identity/nitro/identity-instrument.gen.ts index e83067190..ee81b5e95 100644 --- a/packages/wdk/src/identity/nitro/nitro.gen.ts +++ b/packages/wdk/src/identity/nitro/identity-instrument.gen.ts @@ -1,13 +1,13 @@ /* eslint-disable */ -// identity-instrument v0.1.0 971b635a03efb658010d40cfdade0f698c3f3c56 +// identity-instrument v0.1.0 bcc0193c36f307e517fdc26c9e87a0c768320497 // -- -// Code generated by webrpc-gen@v0.22.1 with typescript generator. DO NOT EDIT. +// Code generated by webrpc-gen@v0.23.1 with typescript generator. DO NOT EDIT. // -// webrpc-gen -schema=nitro.ridl -target=typescript -client -out=./clients/nitro.gen.ts +// webrpc-gen -schema=identity-instrument.ridl -target=typescript -client -out=./clients/identity-instrument.gen.ts export const WebrpcHeader = 'Webrpc' -export const WebrpcHeaderValue = 'webrpc@v0.22.1;gen-typescript@v0.16.2;identity-instrument@v0.1.0' +export const WebrpcHeaderValue = 'webrpc@v0.23.1;gen-typescript@v0.16.3;identity-instrument@v0.1.0' // WebRPC description and code-gen version export const WebRPCVersion = 'v1' @@ -16,7 +16,7 @@ export const WebRPCVersion = 'v1' export const WebRPCSchemaVersion = 'v0.1.0' // Schema hash generated from your RIDL schema -export const WebRPCSchemaHash = '971b635a03efb658010d40cfdade0f698c3f3c56' +export const WebRPCSchemaHash = 'bcc0193c36f307e517fdc26c9e87a0c768320497' type WebrpcGenVersions = { webrpcGenVersion: string @@ -58,11 +58,11 @@ function parseWebrpcGenVersions(header: string): WebrpcGenVersions { const [schemaName, schemaVersion] = versions[2]!.split('@') return { - webrpcGenVersion: webrpcGenVersion!, - codeGenName: codeGenName!, - codeGenVersion: codeGenVersion!, - schemaName: schemaName!, - schemaVersion: schemaVersion!, + webrpcGenVersion: webrpcGenVersion ?? '', + codeGenName: codeGenName ?? '', + codeGenVersion: codeGenVersion ?? '', + schemaName: schemaName ?? '', + schemaVersion: schemaVersion ?? '', } } @@ -91,7 +91,7 @@ export enum AuthMode { } export interface InitiateAuthParams { - ecosystemId: string + ecosystem: string authKey: AuthKey identityType: IdentityType authMode: AuthMode @@ -100,7 +100,7 @@ export interface InitiateAuthParams { } export interface RegisterAuthParams { - ecosystemId: string + ecosystem: string authKey: AuthKey identityType: IdentityType authMode: AuthMode @@ -109,7 +109,7 @@ export interface RegisterAuthParams { } export interface SignParams { - ecosystemId: string + ecosystem: string signer: string digest: string authKey: AuthKey @@ -124,7 +124,7 @@ export interface Identity { } export interface AuthID { - ecosystemId: string + ecosystem: string authMode: AuthMode identityType: IdentityType verifier: string @@ -136,7 +136,7 @@ export interface AuthKey { } export interface AuthKeyData { - ecoId: string + ecosystem: string signerAddress: string publicKey: string keyType: KeyType @@ -144,14 +144,14 @@ export interface AuthKeyData { } export interface SignerData { - ecoId: string + ecosystem: string identity: Identity keyType: KeyType privateKey: string } export interface AuthCommitmentData { - ecoId: string + ecosystem: string authKey: AuthKey authMode: AuthMode identityType: IdentityType diff --git a/packages/wdk/src/identity/nitro/index.ts b/packages/wdk/src/identity/nitro/index.ts index cc0460745..47291bc6d 100644 --- a/packages/wdk/src/identity/nitro/index.ts +++ b/packages/wdk/src/identity/nitro/index.ts @@ -1 +1 @@ -export * from './nitro.gen' +export * from './identity-instrument.gen' diff --git a/packages/wdk/src/identity/wdk.ts b/packages/wdk/src/identity/wdk.ts index 84e18d9b8..a2774fb86 100644 --- a/packages/wdk/src/identity/wdk.ts +++ b/packages/wdk/src/identity/wdk.ts @@ -28,7 +28,7 @@ export class Wdk { const authKey = await this.getAuthKey() const challengeParams = challenge.getParams() const params = { - ecosystemId: this.ecosystemId, + ecosystem: this.ecosystemId, authKey: authKey.toProto(), ...challengeParams, answer: undefined, @@ -43,7 +43,7 @@ export class Wdk { const params = { answer: '', ...challengeParams, - ecosystemId: this.ecosystemId, + ecosystem: this.ecosystemId, authKey: authKey.toProto(), } const res = await this.nitro.registerAuth({ params }) From 65c3fa1d200d569fa1f138e424895e29cd2e6f5a Mon Sep 17 00:00:00 2001 From: Patryk Kalinowski Date: Mon, 10 Mar 2025 19:59:50 +0100 Subject: [PATCH 193/439] wdk: fix parameter naming --- packages/wdk/src/identity/signer.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/wdk/src/identity/signer.ts b/packages/wdk/src/identity/signer.ts index b621124bf..1935a8850 100644 --- a/packages/wdk/src/identity/signer.ts +++ b/packages/wdk/src/identity/signer.ts @@ -30,7 +30,7 @@ export class IdentitySigner implements Signers.Signer { async signDigest(digest: Bytes.Bytes): Promise { const authKeySignature = await this.authKey.signMessage(digest.toString()) const params = { - ecosystemId: this.ecosystemId, + ecosystem: this.ecosystemId, signer: this.address, digest: digest.toString(), authKey: this.authKey.toProto(), From 0d0037fd0fe00e28e50f8f8c4af4949f3b18d1e9 Mon Sep 17 00:00:00 2001 From: Patryk Kalinowski Date: Mon, 10 Mar 2025 20:09:35 +0100 Subject: [PATCH 194/439] wdk: fix digest encoding --- packages/wdk/src/identity/signer.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/packages/wdk/src/identity/signer.ts b/packages/wdk/src/identity/signer.ts index 1935a8850..9401ed1c6 100644 --- a/packages/wdk/src/identity/signer.ts +++ b/packages/wdk/src/identity/signer.ts @@ -28,11 +28,12 @@ export class IdentitySigner implements Signers.Signer { } async signDigest(digest: Bytes.Bytes): Promise { - const authKeySignature = await this.authKey.signMessage(digest.toString()) + const digestHex = Hex.fromBytes(digest) + const authKeySignature = await this.authKey.signMessage(digestHex) const params = { ecosystem: this.ecosystemId, signer: this.address, - digest: digest.toString(), + digest: digestHex, authKey: this.authKey.toProto(), signature: authKeySignature, } From e70f4284d958f3c2fe7f9e8fdf9bbcc2bd651723 Mon Sep 17 00:00:00 2001 From: Patryk Kalinowski Date: Mon, 10 Mar 2025 20:16:40 +0100 Subject: [PATCH 195/439] demo-wallet: fix signature encoding --- apps/demo-wallet/app/handlers/id-token.tsx | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/apps/demo-wallet/app/handlers/id-token.tsx b/apps/demo-wallet/app/handlers/id-token.tsx index 55ce4d2a2..373c85911 100644 --- a/apps/demo-wallet/app/handlers/id-token.tsx +++ b/apps/demo-wallet/app/handlers/id-token.tsx @@ -2,7 +2,7 @@ import { useEffect } from 'react' import { redirect } from 'next/navigation' -import { PersonalMessage, Hex, Bytes } from 'ox' +import { PersonalMessage, Hex, Bytes, Signature } from 'ox' import { Identity } from '@0xsequence/sequence-wdk' import type { ClientParams } from '../lib/client-params' @@ -38,8 +38,18 @@ export default function IdTokenHandler({ nitroRpc, idToken, ecosystemId, issuer, const attestationSignature = await signer.signDigest(Bytes.fromHex(personalMessage)) console.log({ attestationSignature, attestationMessage }) + if (attestationSignature.type !== 'hash') { + throw new Error('Invalid signature type') + } + + const sig = Signature.toHex({ + r: attestationSignature.r, + s: attestationSignature.s, + yParity: attestationSignature.yParity, + }) + const returnParams = new URLSearchParams({ - attestation_signature: JSON.stringify(attestationSignature), + attestation_signature: sig, attestation_message: attestationMessage, state: clientParams.state, session_address: clientParams.sessionAddress, From fa098b0e53aaeaf1973fab5bbbeca14da2bbda5d Mon Sep 17 00:00:00 2001 From: Patryk Kalinowski Date: Tue, 11 Mar 2025 18:04:05 +0100 Subject: [PATCH 196/439] demo-wallet: rename 'google' to 'google-legacy' --- apps/demo-wallet/app/{google => google-legacy}/callback/page.tsx | 0 apps/demo-wallet/app/{google => google-legacy}/route.tsx | 0 2 files changed, 0 insertions(+), 0 deletions(-) rename apps/demo-wallet/app/{google => google-legacy}/callback/page.tsx (100%) rename apps/demo-wallet/app/{google => google-legacy}/route.tsx (100%) diff --git a/apps/demo-wallet/app/google/callback/page.tsx b/apps/demo-wallet/app/google-legacy/callback/page.tsx similarity index 100% rename from apps/demo-wallet/app/google/callback/page.tsx rename to apps/demo-wallet/app/google-legacy/callback/page.tsx diff --git a/apps/demo-wallet/app/google/route.tsx b/apps/demo-wallet/app/google-legacy/route.tsx similarity index 100% rename from apps/demo-wallet/app/google/route.tsx rename to apps/demo-wallet/app/google-legacy/route.tsx From c491a6a0ebec1a1d133467ddb419dea50345f4e9 Mon Sep 17 00:00:00 2001 From: Patryk Kalinowski Date: Wed, 12 Mar 2025 17:19:14 +0100 Subject: [PATCH 197/439] wdk: add support for AuthCode auth mode --- packages/wdk/src/identity/challenge.ts | 4 +- packages/wdk/src/identity/wdk.ts | 62 ++++++++++++++++++++++++-- 2 files changed, 62 insertions(+), 4 deletions(-) diff --git a/packages/wdk/src/identity/challenge.ts b/packages/wdk/src/identity/challenge.ts index 652399157..14061fbaa 100644 --- a/packages/wdk/src/identity/challenge.ts +++ b/packages/wdk/src/identity/challenge.ts @@ -47,6 +47,7 @@ export class AuthCodePkceChallenge extends Challenge { constructor( readonly issuer: string, readonly audience: string, + readonly redirectUri: string, ) { super() } @@ -60,12 +61,13 @@ export class AuthCodePkceChallenge extends Challenge { metadata: { iss: this.issuer, aud: this.audience, + redirect_uri: this.redirectUri, }, } } public withAnswer(verifier: string, authCode: string): AuthCodePkceChallenge { - const challenge = new AuthCodePkceChallenge(this.issuer, this.audience) + const challenge = new AuthCodePkceChallenge(this.issuer, this.audience, this.redirectUri) challenge.verifier = verifier challenge.authCode = authCode return challenge diff --git a/packages/wdk/src/identity/wdk.ts b/packages/wdk/src/identity/wdk.ts index a2774fb86..f2fbfb48a 100644 --- a/packages/wdk/src/identity/wdk.ts +++ b/packages/wdk/src/identity/wdk.ts @@ -1,8 +1,24 @@ -import { Challenge, IdTokenChallenge } from './challenge' +import { Challenge, IdTokenChallenge, AuthCodePkceChallenge } from './challenge' import { IdentityInstrument } from './nitro' import { AuthKey } from './authkey' import { IdentitySigner } from './signer' import { getDefaultSecureStoreBackend } from './secure-store' +import { Hex } from 'ox' + +interface OAuthParams { + pkceMethod: 'S256' | 'none' + oauthUrl: string + issuer: string + audience: string + clientId: string + redirectUri: string + state?: string +} + +interface OAuthState { + verifier: string + params: OAuthParams +} export class Wdk { constructor( @@ -16,6 +32,46 @@ export class Wdk { return await this.completeAuth(challenge) } + public async loginWithOAuthRedirect(params: OAuthParams) { + if (params.pkceMethod !== 'S256') { + // TODO: support 'none' + throw new Error('PKCE method not supported') + } + + const challenge = new AuthCodePkceChallenge(params.issuer, params.audience, params.redirectUri) + const [verifier, codeChallenge] = await this.initiateAuth(challenge) + const state = params.state || Hex.random(32) + const stateJson = JSON.stringify({ verifier, params }) + + sessionStorage.setItem(state, stateJson) + + const searchParams = new URLSearchParams({ + code_challenge: codeChallenge, + code_challenge_method: params.pkceMethod, + client_id: params.clientId, + redirect_uri: params.redirectUri, + response_type: 'code', + scope: 'openid profile email', + state, + }) + return `${params.oauthUrl}?${searchParams.toString()}` + } + + public async completeOAuthLogin(state: string, code: string) { + const stateJson = sessionStorage.getItem(state) + if (!stateJson) { + throw new Error('Invalid state') + } + const { + verifier, + params: { issuer, audience, redirectUri }, + } = JSON.parse(stateJson) as OAuthState + const challenge = new AuthCodePkceChallenge(issuer, audience, redirectUri) + const signer = await this.completeAuth(challenge.withAnswer(verifier, code)) + sessionStorage.removeItem(state) + return signer + } + public async getSigner() { const authKey = await this.getAuthKey() if (!authKey.identitySigner) { @@ -24,7 +80,7 @@ export class Wdk { return new IdentitySigner(this.ecosystemId, this.nitro, authKey) } - public async initiateAuth(challenge: Challenge) { + private async initiateAuth(challenge: Challenge): Promise<[string, string]> { const authKey = await this.getAuthKey() const challengeParams = challenge.getParams() const params = { @@ -37,7 +93,7 @@ export class Wdk { return [res.verifier, res.challenge] } - public async completeAuth(challenge: Challenge) { + private async completeAuth(challenge: Challenge) { const authKey = await this.getAuthKey() const challengeParams = challenge.getParams() const params = { From dd8163ef42b93af2d0828909255a0fec86f816d7 Mon Sep 17 00:00:00 2001 From: Patryk Kalinowski Date: Wed, 12 Mar 2025 17:19:41 +0100 Subject: [PATCH 198/439] demo-wallet: implement AuthCode auth mode --- apps/demo-wallet/app/google/callback/page.tsx | 26 +++++ apps/demo-wallet/app/google/page.tsx | 31 ++++++ .../app/handlers/auth-code-pkce.tsx | 98 +++++++++++++++++++ apps/demo-wallet/app/lib/client-params.ts | 9 +- apps/demo-wallet/app/lib/cookies.ts | 6 +- apps/demo-wallet/app/lib/session-storage.ts | 10 ++ 6 files changed, 169 insertions(+), 11 deletions(-) create mode 100644 apps/demo-wallet/app/google/callback/page.tsx create mode 100644 apps/demo-wallet/app/google/page.tsx create mode 100644 apps/demo-wallet/app/handlers/auth-code-pkce.tsx create mode 100644 apps/demo-wallet/app/lib/session-storage.ts diff --git a/apps/demo-wallet/app/google/callback/page.tsx b/apps/demo-wallet/app/google/callback/page.tsx new file mode 100644 index 000000000..61e68c719 --- /dev/null +++ b/apps/demo-wallet/app/google/callback/page.tsx @@ -0,0 +1,26 @@ +'use server' + +import AuthCodePkceHandler from '../../handlers/auth-code-pkce' + +interface SearchParams { + code: string + state: string +} + +export default async function GoogleCallback({ searchParams }: { searchParams: Promise }) { + const query = await searchParams + + return ( + + ) +} diff --git a/apps/demo-wallet/app/google/page.tsx b/apps/demo-wallet/app/google/page.tsx new file mode 100644 index 000000000..1fe659261 --- /dev/null +++ b/apps/demo-wallet/app/google/page.tsx @@ -0,0 +1,31 @@ +'use server' + +import { headers } from 'next/headers' +import AuthCodePkceHandler from '../handlers/auth-code-pkce' +import { Hex } from 'ox' +import { ClientParams } from '../lib/client-params' + +export default async function Google({ searchParams }: { searchParams: Promise }) { + // Get the origin from headers + const headersList = await headers() + const host = headersList.get('host') + const protocol = headersList.get('x-forwarded-proto') || 'http' + const origin = `${protocol}://${host}` + + return ( + + ) +} diff --git a/apps/demo-wallet/app/handlers/auth-code-pkce.tsx b/apps/demo-wallet/app/handlers/auth-code-pkce.tsx new file mode 100644 index 000000000..3559328c4 --- /dev/null +++ b/apps/demo-wallet/app/handlers/auth-code-pkce.tsx @@ -0,0 +1,98 @@ +'use client' + +import { useEffect } from 'react' +import { Identity } from '@0xsequence/sequence-wdk' +import { redirect } from 'next/navigation' +import { Hex } from 'ox' +import { Bytes } from 'ox' +import { PersonalMessage } from 'ox' +import { Signature } from 'ox' +import { ClientParams } from '../lib/client-params' +import { storeClientParams, getClientParams } from '../lib/session-storage' + +interface InitParams { + type: 'init' + clientId: string + redirectUri: string + oauthUrl: string + clientParams: ClientParams + state: string +} + +interface CallbackParams { + type: 'callback' + code: string + state: string +} + +type OAuthParams = InitParams | CallbackParams + +interface Props { + nitroRpc: string + ecosystemId: string + issuer: string + audience: string + oauthParams: OAuthParams +} + +export default function AuthCodePkceHandler({ nitroRpc, ecosystemId, issuer, audience, oauthParams }: Props) { + useEffect(() => { + ;(async () => { + const wdk = new Identity.Wdk(ecosystemId, new Identity.IdentityInstrument(nitroRpc, window.fetch)) + if (oauthParams.type === 'init') { + await storeClientParams(oauthParams.state, oauthParams.clientParams) + const url = await wdk.loginWithOAuthRedirect({ + pkceMethod: 'S256', + oauthUrl: oauthParams.oauthUrl, + issuer, + audience, + clientId: oauthParams.clientId, + redirectUri: oauthParams.redirectUri, + state: oauthParams.state, + }) + redirect(url) + } else { + const clientParams = await getClientParams(oauthParams.state) + const signer = await wdk.completeOAuthLogin(oauthParams.state, oauthParams.code) + + // We have the signer, now we can use it to sign a message + console.log(signer) + + const attestationMessage = [ + `SessionAddress=${clientParams.session_address}`, + `EcosystemID=${ecosystemId}`, + `AppID=${clientParams.app_id}`, + `IdentityType=OIDC`, + `Issuer=${issuer}`, + `Audience=${audience}`, + `RedirectURI=${clientParams.redirect_uri}`, + ].join('; ') + + const personalMessage = PersonalMessage.getSignPayload(Hex.fromString(attestationMessage)) + const attestationSignature = await signer.signDigest(Bytes.fromHex(personalMessage)) + console.log({ attestationSignature, attestationMessage }) + + if (attestationSignature.type !== 'hash') { + throw new Error('Invalid signature type') + } + + const sig = Signature.toHex({ + r: attestationSignature.r, + s: attestationSignature.s, + yParity: attestationSignature.yParity, + }) + + const returnParams = new URLSearchParams({ + attestation_signature: sig, + attestation_message: attestationMessage, + state: clientParams.state, + session_address: clientParams.session_address, + }) + + redirect(`${clientParams.redirect_uri}?${returnParams.toString()}`) + } + })() + }, []) + + return
Signing in...
+} diff --git a/apps/demo-wallet/app/lib/client-params.ts b/apps/demo-wallet/app/lib/client-params.ts index c0e23dd3e..eb3a89507 100644 --- a/apps/demo-wallet/app/lib/client-params.ts +++ b/apps/demo-wallet/app/lib/client-params.ts @@ -1,13 +1,6 @@ -export interface SearchParams { +export interface ClientParams { app_id: string redirect_uri: string session_address: string state: string } - -export interface ClientParams { - appId: string - redirectUri: string - sessionAddress: string - state: string -} diff --git a/apps/demo-wallet/app/lib/cookies.ts b/apps/demo-wallet/app/lib/cookies.ts index 2f3afd755..45042c119 100644 --- a/apps/demo-wallet/app/lib/cookies.ts +++ b/apps/demo-wallet/app/lib/cookies.ts @@ -10,9 +10,9 @@ export async function getClientParams(state: string) { export async function storeClientParams(state: string, searchParams: URLSearchParams) { const cookieStore = await cookies() const clientParams: ClientParams = { - appId: searchParams.get('app_id') || '', - redirectUri: searchParams.get('redirect_uri') || '', - sessionAddress: searchParams.get('session_address') || '', + app_id: searchParams.get('app_id') || '', + redirect_uri: searchParams.get('redirect_uri') || '', + session_address: searchParams.get('session_address') || '', state: searchParams.get('state') || '', } cookieStore.set(`client-params-${state}`, JSON.stringify(clientParams)) diff --git a/apps/demo-wallet/app/lib/session-storage.ts b/apps/demo-wallet/app/lib/session-storage.ts new file mode 100644 index 000000000..abb35f106 --- /dev/null +++ b/apps/demo-wallet/app/lib/session-storage.ts @@ -0,0 +1,10 @@ +import { ClientParams } from './client-params' + +export async function getClientParams(state: string) { + const clientParams = JSON.parse(sessionStorage.getItem(`client-params-${state}`) || '{}') as ClientParams + return clientParams +} + +export async function storeClientParams(state: string, clientParams: ClientParams) { + sessionStorage.setItem(`client-params-${state}`, JSON.stringify(clientParams)) +} From edf4c9cc0ae4475ae6654f69a9a6953da24d9c5f Mon Sep 17 00:00:00 2001 From: Michael Standen Date: Fri, 14 Mar 2025 11:12:22 +1300 Subject: [PATCH 199/439] Fix weight calculation for unsigned sapient signers --- packages/primitives/src/config.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/primitives/src/config.ts b/packages/primitives/src/config.ts index 498a7ca58..9c239d4e0 100644 --- a/packages/primitives/src/config.ts +++ b/packages/primitives/src/config.ts @@ -156,7 +156,7 @@ export function getWeight( } else if (isSignedSapientSignerLeaf(topology)) { return { weight: topology.weight, maxWeight: topology.weight } } else if (isSapientSignerLeaf(topology)) { - return { weight: topology.weight, maxWeight: canSign(topology) ? topology.weight : 0n } + return { weight: 0n, maxWeight: canSign(topology) ? topology.weight : 0n } } else if (isSubdigestLeaf(topology)) { return { weight: 0n, maxWeight: 0n } } else if (isAnyAddressSubdigestLeaf(topology)) { From e46627f18ff504c616a487c75097984aac0956f5 Mon Sep 17 00:00:00 2001 From: Michael Standen Date: Fri, 14 Mar 2025 11:49:14 +1300 Subject: [PATCH 200/439] Fix build --- apps/demo-wallet/app/handlers/id-token.tsx | 16 ++++++++-------- packages/core/src/signers/session/explicit.ts | 2 +- packages/primitives/src/signature.ts | 8 ++++---- 3 files changed, 13 insertions(+), 13 deletions(-) diff --git a/apps/demo-wallet/app/handlers/id-token.tsx b/apps/demo-wallet/app/handlers/id-token.tsx index 373c85911..d3945621e 100644 --- a/apps/demo-wallet/app/handlers/id-token.tsx +++ b/apps/demo-wallet/app/handlers/id-token.tsx @@ -25,13 +25,13 @@ export default function IdTokenHandler({ nitroRpc, idToken, ecosystemId, issuer, console.log(signer) const attestationMessage = [ - `SessionAddress=${clientParams.sessionAddress}`, + `SessionAddress=${clientParams.session_address}`, `EcosystemID=${ecosystemId}`, - `AppID=${clientParams.appId}`, + `AppID=${clientParams.app_id}`, `IdentityType=OIDC`, `Issuer=${issuer}`, `Audience=${audience}`, - `RedirectURI=${clientParams.redirectUri}`, + `RedirectURI=${clientParams.redirect_uri}`, ].join('; ') const personalMessage = PersonalMessage.getSignPayload(Hex.fromString(attestationMessage)) @@ -52,10 +52,10 @@ export default function IdTokenHandler({ nitroRpc, idToken, ecosystemId, issuer, attestation_signature: sig, attestation_message: attestationMessage, state: clientParams.state, - session_address: clientParams.sessionAddress, + session_address: clientParams.session_address, }) - redirect(`${clientParams.redirectUri}?${returnParams.toString()}`) + redirect(`${clientParams.redirect_uri}?${returnParams.toString()}`) })() }, [ nitroRpc, @@ -63,9 +63,9 @@ export default function IdTokenHandler({ nitroRpc, idToken, ecosystemId, issuer, ecosystemId, issuer, audience, - clientParams.sessionAddress, - clientParams.appId, - clientParams.redirectUri, + clientParams.session_address, + clientParams.app_id, + clientParams.redirect_uri, clientParams.state, ]) diff --git a/packages/core/src/signers/session/explicit.ts b/packages/core/src/signers/session/explicit.ts index 622ed80d6..2f9a85789 100644 --- a/packages/core/src/signers/session/explicit.ts +++ b/packages/core/src/signers/session/explicit.ts @@ -125,7 +125,7 @@ async function validatePermission( // Extract value from calldata at offset const callValue = call.data.slice(Number(rule.offset), Number(rule.offset) + 32) // Apply mask - let value: Uint8Array = callValue.map((b, i) => b & rule.mask[i]!) + let value: Bytes.Bytes = callValue.map((b, i) => b & rule.mask[i]!) if (rule.cumulative) { if (provider && usageHash) { diff --git a/packages/primitives/src/signature.ts b/packages/primitives/src/signature.ts index 72aeddbb8..ca23489b1 100644 --- a/packages/primitives/src/signature.ts +++ b/packages/primitives/src/signature.ts @@ -1200,8 +1200,8 @@ async function recoverTopology( } default: - const { provider, block } = - 'block' in options!.provider ? options!.provider : { provider: options!.provider } + const provider = 'provider' in options!.provider ? options!.provider.provider : options!.provider + const block = 'block' in options!.provider ? options!.provider.block : undefined const call = { to: topology.signature.address, @@ -1248,8 +1248,8 @@ async function recoverTopology( throw new Error(`unable to validate sapient signer ${topology.signature.address} signature`) default: - const { provider, block } = - 'block' in options!.provider ? options!.provider : { provider: options!.provider } + const provider = 'provider' in options!.provider ? options!.provider.provider : options!.provider + const block = 'block' in options!.provider ? options!.provider.block : undefined const call = { to: topology.signature.address, From 764363cf676e21e97e13d30c48701b7677f45e55 Mon Sep 17 00:00:00 2001 From: Agusx1211 Date: Fri, 14 Mar 2025 11:24:55 +0000 Subject: [PATCH 201/439] Update stage1 --- packages/primitives/src/context.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/primitives/src/context.ts b/packages/primitives/src/context.ts index 0f5aebec6..cfc095067 100644 --- a/packages/primitives/src/context.ts +++ b/packages/primitives/src/context.ts @@ -9,6 +9,6 @@ export type Context = { export const Dev1: Context = { factory: '0xBd0F8abD58B4449B39C57Ac9D5C67433239aC447', - stage1: '0xBFB21e82862Da2303128e636778294240088dd9f', + stage1: '0x7cc3cd2a7c2611e8be6baffe17d0fa9b15a8858d', creationCode: DEFAULT_CREATION_CODE, } From 541c7371922276f2ac10f36fa39c075167fff6b5 Mon Sep 17 00:00:00 2001 From: Agusx1211 Date: Fri, 14 Mar 2025 15:32:25 +0000 Subject: [PATCH 202/439] Fix metadata on passkeys --- packages/core/src/signers/passkey.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/packages/core/src/signers/passkey.ts b/packages/core/src/signers/passkey.ts index 2200ae458..f5e59ed9b 100644 --- a/packages/core/src/signers/passkey.ts +++ b/packages/core/src/signers/passkey.ts @@ -10,6 +10,7 @@ export type PasskeyOptions = { publicKey: Extensions.Passkeys.PublicKey credentialId: string embedMetadata?: boolean + metadata?: Extensions.Passkeys.PasskeyMetadata } export type CreaetePasskeyOptions = { @@ -51,6 +52,7 @@ export class Passkey implements SapientSigner, Witnessable { this.credentialId = options.credentialId this.embedMetadata = options.embedMetadata ?? false this.imageHash = Extensions.Passkeys.rootFor(options.publicKey) + this.metadata = options.metadata } static async loadFromWitness( @@ -61,7 +63,6 @@ export class Passkey implements SapientSigner, Witnessable { ) { // In the witness we will find the public key, and may find the credential id const wallets = await stateReader.getWalletsForSapient(extensions.passkeys, imageHash) - console.log('Got wallets', extensions.passkeys, imageHash, wallets) const witness = wallets[wallet] if (!witness) { @@ -79,7 +80,6 @@ export class Passkey implements SapientSigner, Witnessable { } const metadata = message.publicKey.metadata || message.metadata - console.log(metadata, message, message.publicKey, message.metadata) if (typeof metadata === 'string' || !metadata) { throw new Error('Metadata does not contain credential id') } @@ -91,6 +91,7 @@ export class Passkey implements SapientSigner, Witnessable { extensions, publicKey: message.publicKey, embedMetadata: decodedSignature.embedMetadata, + metadata, }) } @@ -122,6 +123,7 @@ export class Passkey implements SapientSigner, Witnessable { metadata: options?.embedMetadata ? metadata : undefined, }, embedMetadata: options?.embedMetadata, + metadata, }) if (options?.stateProvider) { From 9b05d892b54ac1c692f968b7126f71f8ce20aaae Mon Sep 17 00:00:00 2001 From: Agusx1211 Date: Fri, 14 Mar 2025 18:32:29 +0000 Subject: [PATCH 203/439] Add indexed-db store --- packages/core/src/state/local/indexed-db.ts | 204 ++++++++++++++++++++ 1 file changed, 204 insertions(+) create mode 100644 packages/core/src/state/local/indexed-db.ts diff --git a/packages/core/src/state/local/indexed-db.ts b/packages/core/src/state/local/indexed-db.ts new file mode 100644 index 000000000..d5a48c09c --- /dev/null +++ b/packages/core/src/state/local/indexed-db.ts @@ -0,0 +1,204 @@ +import { Context, Payload, Signature, Config, GenericTree } from '@0xsequence/sequence-primitives' +import { Address, Hex } from 'ox' +import { Store } from './index' + +const DB_VERSION = 1 +const STORE_CONFIGS = 'configs' +const STORE_WALLETS = 'counterfactualWallets' +const STORE_PAYLOADS = 'payloads' +const STORE_SIGNER_SUBDIGESTS = 'signerSubdigests' +const STORE_SIGNATURES = 'signatures' +const STORE_SAPIENT_SIGNER_SUBDIGESTS = 'sapientSignerSubdigests' +const STORE_SAPIENT_SIGNATURES = 'sapientSignatures' +const STORE_TREES = 'trees' + +export class IndexedDbStore implements Store { + private _db: IDBDatabase | null = null + private dbName: string + + constructor(dbName: string = 'sequence-indexeddb') { + this.dbName = dbName + } + + private async openDB(): Promise { + if (this._db) return this._db + + return new Promise((resolve, reject) => { + const request = indexedDB.open(this.dbName, DB_VERSION) + + request.onupgradeneeded = () => { + const db = request.result + if (!db.objectStoreNames.contains(STORE_CONFIGS)) { + db.createObjectStore(STORE_CONFIGS) + } + if (!db.objectStoreNames.contains(STORE_WALLETS)) { + db.createObjectStore(STORE_WALLETS) + } + if (!db.objectStoreNames.contains(STORE_PAYLOADS)) { + db.createObjectStore(STORE_PAYLOADS) + } + if (!db.objectStoreNames.contains(STORE_SIGNER_SUBDIGESTS)) { + db.createObjectStore(STORE_SIGNER_SUBDIGESTS) + } + if (!db.objectStoreNames.contains(STORE_SIGNATURES)) { + db.createObjectStore(STORE_SIGNATURES) + } + if (!db.objectStoreNames.contains(STORE_SAPIENT_SIGNER_SUBDIGESTS)) { + db.createObjectStore(STORE_SAPIENT_SIGNER_SUBDIGESTS) + } + if (!db.objectStoreNames.contains(STORE_SAPIENT_SIGNATURES)) { + db.createObjectStore(STORE_SAPIENT_SIGNATURES) + } + if (!db.objectStoreNames.contains(STORE_TREES)) { + db.createObjectStore(STORE_TREES) + } + } + + request.onsuccess = () => { + this._db = request.result + resolve(this._db!) + } + + request.onerror = () => { + reject(request.error) + } + }) + } + + private async get(storeName: string, key: string): Promise { + const db = await this.openDB() + return new Promise((resolve, reject) => { + const tx = db.transaction(storeName, 'readonly') + const store = tx.objectStore(storeName) + const req = store.get(key) + req.onsuccess = () => resolve(req.result) + req.onerror = () => reject(req.error) + }) + } + + private async put(storeName: string, key: string, value: T): Promise { + const db = await this.openDB() + return new Promise((resolve, reject) => { + const tx = db.transaction(storeName, 'readwrite') + const store = tx.objectStore(storeName) + const req = store.put(value, key) + req.onsuccess = () => resolve() + req.onerror = () => reject(req.error) + }) + } + + private async getSet(storeName: string, key: string): Promise> { + const data = (await this.get>(storeName, key)) || new Set() + return Array.isArray(data) ? new Set(data) : data + } + + private async putSet(storeName: string, key: string, setData: Set): Promise { + await this.put(storeName, key, Array.from(setData)) + } + + private getSignatureKey(signer: Address.Address, subdigest: Hex.Hex): string { + return `${signer.toLowerCase()}-${subdigest.toLowerCase()}` + } + + private getSapientSignatureKey(signer: Address.Address, subdigest: Hex.Hex, imageHash: Hex.Hex): string { + return `${signer.toLowerCase()}-${imageHash.toLowerCase()}-${subdigest.toLowerCase()}` + } + + async loadConfig(imageHash: Hex.Hex): Promise { + return this.get(STORE_CONFIGS, imageHash.toLowerCase()) + } + + async saveConfig(imageHash: Hex.Hex, config: Config.Config): Promise { + await this.put(STORE_CONFIGS, imageHash.toLowerCase(), config) + } + + async loadCounterfactualWallet( + wallet: Address.Address, + ): Promise<{ imageHash: Hex.Hex; context: Context.Context } | undefined> { + return this.get(STORE_WALLETS, wallet.toLowerCase()) + } + + async saveCounterfactualWallet(wallet: Address.Address, imageHash: Hex.Hex, context: Context.Context): Promise { + await this.put(STORE_WALLETS, wallet.toLowerCase(), { imageHash, context }) + } + + async loadPayloadOfSubdigest( + subdigest: Hex.Hex, + ): Promise<{ content: Payload.Parented; chainId: bigint; wallet: Address.Address } | undefined> { + return this.get(STORE_PAYLOADS, subdigest.toLowerCase()) + } + + async savePayloadOfSubdigest( + subdigest: Hex.Hex, + payload: { content: Payload.Parented; chainId: bigint; wallet: Address.Address }, + ): Promise { + await this.put(STORE_PAYLOADS, subdigest.toLowerCase(), payload) + } + + async loadSubdigestsOfSigner(signer: Address.Address): Promise { + const dataSet = await this.getSet(STORE_SIGNER_SUBDIGESTS, signer.toLowerCase()) + return Array.from(dataSet) as Hex.Hex[] + } + + async loadSignatureOfSubdigest( + signer: Address.Address, + subdigest: Hex.Hex, + ): Promise { + const key = this.getSignatureKey(signer, subdigest) + return this.get(STORE_SIGNATURES, key.toLowerCase()) + } + + async saveSignatureOfSubdigest( + signer: Address.Address, + subdigest: Hex.Hex, + signature: Signature.SignatureOfSignerLeaf, + ): Promise { + const key = this.getSignatureKey(signer, subdigest) + await this.put(STORE_SIGNATURES, key.toLowerCase(), signature) + + const signerKey = signer.toLowerCase() + const subdigestKey = subdigest.toLowerCase() + const dataSet = await this.getSet(STORE_SIGNER_SUBDIGESTS, signerKey) + dataSet.add(subdigestKey) + await this.putSet(STORE_SIGNER_SUBDIGESTS, signerKey, dataSet) + } + + async loadSubdigestsOfSapientSigner(signer: Address.Address, imageHash: Hex.Hex): Promise { + const key = `${signer.toLowerCase()}-${imageHash.toLowerCase()}` + const dataSet = await this.getSet(STORE_SAPIENT_SIGNER_SUBDIGESTS, key) + return Array.from(dataSet) as Hex.Hex[] + } + + async loadSapientSignatureOfSubdigest( + signer: Address.Address, + subdigest: Hex.Hex, + imageHash: Hex.Hex, + ): Promise { + const key = this.getSapientSignatureKey(signer, subdigest, imageHash) + return this.get(STORE_SAPIENT_SIGNATURES, key.toLowerCase()) + } + + async saveSapientSignatureOfSubdigest( + signer: Address.Address, + subdigest: Hex.Hex, + imageHash: Hex.Hex, + signature: Signature.SignatureOfSapientSignerLeaf, + ): Promise { + const fullKey = this.getSapientSignatureKey(signer, subdigest, imageHash).toLowerCase() + await this.put(STORE_SAPIENT_SIGNATURES, fullKey, signature) + + const signerKey = `${signer.toLowerCase()}-${imageHash.toLowerCase()}` + const subdigestKey = subdigest.toLowerCase() + const dataSet = await this.getSet(STORE_SAPIENT_SIGNER_SUBDIGESTS, signerKey) + dataSet.add(subdigestKey) + await this.putSet(STORE_SAPIENT_SIGNER_SUBDIGESTS, signerKey, dataSet) + } + + async loadTree(rootHash: Hex.Hex): Promise { + return this.get(STORE_TREES, rootHash.toLowerCase()) + } + + async saveTree(rootHash: Hex.Hex, tree: GenericTree.Tree): Promise { + await this.put(STORE_TREES, rootHash.toLowerCase(), tree) + } +} From ea7e2550e2920903fc32b39b8d28da5530cf99b6 Mon Sep 17 00:00:00 2001 From: Michael Standen Date: Thu, 13 Mar 2025 11:02:26 +1300 Subject: [PATCH 204/439] Separate session manager in wdk and core --- packages/core/src/signers/index.ts | 1 + .../src/signers}/session-manager.ts | 115 ++++++++-------- packages/primitives/src/config.ts | 20 +++ packages/primitives/src/constants.ts | 1 + packages/primitives/src/signature.ts | 25 ++-- packages/wdk/src/identity/signer.ts | 2 +- packages/wdk/src/session/index.ts | 2 +- .../wdk/src/session/session-controller.ts | 124 ++++++++++++++++++ 8 files changed, 227 insertions(+), 63 deletions(-) rename packages/{wdk/src/session => core/src/signers}/session-manager.ts (61%) create mode 100644 packages/wdk/src/session/session-controller.ts diff --git a/packages/core/src/signers/index.ts b/packages/core/src/signers/index.ts index 9bda83ccd..c11c48a92 100644 --- a/packages/core/src/signers/index.ts +++ b/packages/core/src/signers/index.ts @@ -5,6 +5,7 @@ import { State } from '..' export * from './pk' export * from './passkey' export * as Session from './session' +export * from './session-manager' export interface Signer { readonly address: MaybePromise diff --git a/packages/wdk/src/session/session-manager.ts b/packages/core/src/signers/session-manager.ts similarity index 61% rename from packages/wdk/src/session/session-manager.ts rename to packages/core/src/signers/session-manager.ts index 868550316..f54795fc6 100644 --- a/packages/wdk/src/session/session-manager.ts +++ b/packages/core/src/signers/session-manager.ts @@ -1,4 +1,5 @@ -import { Signers } from '@0xsequence/sequence-core' +import { SapientSigner } from '.' +import { Implicit, Explicit, AttestationParams } from './session' import { Attestation, Constants, @@ -9,28 +10,30 @@ import { GenericTree, } from '@0xsequence/sequence-primitives' import { AbiFunction, Address, Bytes, Hex, Provider, Secp256k1 } from 'ox' -import { IdentitySigner } from '../identity' type SessionManagerConfiguration = { topology: SessionConfig.SessionsTopology provider: Provider.Provider + implicitSigners?: Implicit[] + explicitSigners?: Explicit[] address?: Address.Address } -const DEFAULT_SESSION_MANAGER_ADDRESS: Address.Address = '0x0D3b3497f4B7E99239aE748Fc45216F45431B105' - -export class SessionManager implements Signers.SapientSigner { - readonly address: Address.Address - private _topology: SessionConfig.SessionsTopology - private _provider: Provider.Provider - - private _implicitSigners: Signers.Session.Implicit[] = [] - private _explicitSigners: Signers.Session.Explicit[] = [] +export class SessionManager implements SapientSigner { + private readonly _address: Address.Address + private readonly _topology: SessionConfig.SessionsTopology + private readonly _provider: Provider.Provider + private readonly _implicitSigners: Implicit[] + private readonly _explicitSigners: Explicit[] constructor(configuration: SessionManagerConfiguration) { - this.address = configuration.address ?? DEFAULT_SESSION_MANAGER_ADDRESS + this._address = configuration.address ?? Constants.DefaultSessionManager this._topology = configuration.topology this._provider = configuration.provider + // FIXME: Validate that the implicit signers attestations are signed by the identity signer? + this._implicitSigners = configuration.implicitSigners ?? [] + // FIXME: Validate that the configuration contains the explicit signers? + this._explicitSigners = configuration.explicitSigners ?? [] } static createEmpty( @@ -43,6 +46,10 @@ export class SessionManager implements Signers.SapientSigner { }) } + get address(): Address.Address { + return this._address + } + get topology(): SessionConfig.SessionsTopology { return this._topology } @@ -68,67 +75,69 @@ export class SessionManager implements Signers.SapientSigner { }) } - async createImplicitSession( - identitySigner: IdentitySigner, - attestationParams: Signers.Session.AttestationParams, - ): Promise { - const implicitPrivateKey = Secp256k1.randomPrivateKey() - const implicitAddress = Address.fromPublicKey(Secp256k1.getPublicKey({ privateKey: implicitPrivateKey })) - const attestation: Attestation.Attestation = { - ...attestationParams, - approvedSigner: implicitAddress, - } - const attestationHash = Attestation.hash(attestation) - const identitySignature = await identitySigner.signDigest(attestationHash) - if (identitySignature.type !== 'hash') { - // Unreachable - throw new Error('Identity signature must be a hash') - } - - const signer = new Signers.Session.Implicit(implicitPrivateKey, attestation, identitySignature, this.address) - this._implicitSigners.push(signer) - return signer + withImplicitSigner(signer: Implicit): SessionManager { + const implicitSigners = [...this._implicitSigners, signer] + return new SessionManager({ + topology: this.topology, + address: this.address, + provider: this._provider, + implicitSigners, + explicitSigners: this._explicitSigners, + }) } - async createExplicitSession(permissions: Signers.Session.ExplicitParams): Promise { - const privateKey = Secp256k1.randomPrivateKey() - const signer = new Signers.Session.Explicit(privateKey, permissions) - this._explicitSigners.push(signer) - - // Update configuration - const topology = SessionConfig.addExplicitSession(this.topology, signer.sessionPermissions) - this._topology = topology + withExplicitSigner(signer: Explicit): SessionManager { + const explicitSigners = [...this._explicitSigners, signer] - return signer - } + // FIXME Update the topology? + // const topology = SessionConfig.addExplicitSession(this.topology, signer.sessionPermissions) + const topology = this.topology - async removeExplicitSession(signerAddress: Address.Address): Promise { - const topology = SessionConfig.removeExplicitSession(this.topology, signerAddress) - if (!topology) { - throw new Error('Session not found') - } - this._explicitSigners = this._explicitSigners.filter((signer) => signer.address !== signerAddress) - this._topology = topology + return new SessionManager({ + topology, + address: this.address, + provider: this._provider, + implicitSigners: this._implicitSigners, + explicitSigners, + }) } - async addBlacklistAddress(address: Address.Address): Promise { + withBlacklistAddress(address: Address.Address): SessionManager { const topology = SessionConfig.addToImplicitBlacklist(this.topology, address) - this._topology = topology + return new SessionManager({ + topology, + address: this.address, + provider: this._provider, + implicitSigners: this._implicitSigners, + explicitSigners: this._explicitSigners, + }) } - async removeBlacklistAddress(address: Address.Address): Promise { + withoutBlacklistAddress(address: Address.Address): SessionManager { const topology = SessionConfig.removeFromImplicitBlacklist(this.topology, address) - this._topology = topology + return new SessionManager({ + topology, + address: this.address, + provider: this._provider, + implicitSigners: this._implicitSigners, + explicitSigners: this._explicitSigners, + }) } async signSapient( wallet: Address.Address, chainId: bigint, payload: Payload.Parented, + imageHash: Hex.Hex, ): Promise { + if (this.imageHash !== imageHash) { + throw new Error('Unexpected image hash') + } + if (!Payload.isCalls(payload)) { throw new Error('Only calls are supported') } + // Try to sign with each signer, prioritizing implicit signers const signers = [...this._implicitSigners, ...this._explicitSigners] const signatures = await Promise.all( diff --git a/packages/primitives/src/config.ts b/packages/primitives/src/config.ts index 9c239d4e0..ad06a67a0 100644 --- a/packages/primitives/src/config.ts +++ b/packages/primitives/src/config.ts @@ -140,6 +140,26 @@ export function getSigners(configuration: Config | Topology): { return { signers: Array.from(signers), sapientSigners: Array.from(sapientSigners), isComplete } } +export function findSignerLeaf( + configuration: Config | Topology, + address: Address.Address, +): SignerLeaf | SapientSignerLeaf | undefined { + if (isConfig(configuration)) { + return findSignerLeaf(configuration.topology, address) + } else if (isNode(configuration)) { + return findSignerLeaf(configuration[0], address) || findSignerLeaf(configuration[1], address) + } else if (isSignerLeaf(configuration)) { + if (configuration.address === address) { + return configuration + } + } else if (isSapientSignerLeaf(configuration)) { + if (configuration.address === address) { + return configuration + } + } + return undefined +} + export function getWeight( topology: RawTopology | RawConfig, canSign?: (signer: SignerLeaf | SapientSignerLeaf) => boolean, diff --git a/packages/primitives/src/constants.ts b/packages/primitives/src/constants.ts index e67328b5b..7fecf9ee4 100644 --- a/packages/primitives/src/constants.ts +++ b/packages/primitives/src/constants.ts @@ -4,6 +4,7 @@ export const DEFAULT_CREATION_CODE: Hex.Hex = '0x603e600e3d39601e805130553df33d3d34601c57363d3d373d363d30545af43d82803e903d91601c57fd5bf3' export const DefaultGuest: Address.Address = '0xd17b93dEC460956aeCc45fD9614Dbd163623aE30' +export const DefaultSessionManager: Address.Address = '0x0D3b3497f4B7E99239aE748Fc45216F45431B105' // ERC1271 export const IS_VALID_SIGNATURE = Abi.from([ diff --git a/packages/primitives/src/signature.ts b/packages/primitives/src/signature.ts index ca23489b1..841afd22b 100644 --- a/packages/primitives/src/signature.ts +++ b/packages/primitives/src/signature.ts @@ -41,15 +41,24 @@ export type RSY = { yParity: number } +export type SignatureOfSignerLeafEthSign = { + type: 'eth_sign' +} & RSY + +export type SignatureOfSignerLeafHash = { + type: 'hash' +} & RSY + +export type SignatureOfSignerLeafErc1271 = { + type: 'erc1271' + address: `0x${string}` + data: Bytes.Bytes +} + export type SignatureOfSignerLeaf = - | ({ - type: 'eth_sign' | 'hash' - } & RSY) - | { - address: `0x${string}` - data: Bytes.Bytes - type: 'erc1271' - } + | SignatureOfSignerLeafEthSign + | SignatureOfSignerLeafHash + | SignatureOfSignerLeafErc1271 export type SignatureOfSapientSignerLeaf = { address: `0x${string}` diff --git a/packages/wdk/src/identity/signer.ts b/packages/wdk/src/identity/signer.ts index 9401ed1c6..98b65f1d3 100644 --- a/packages/wdk/src/identity/signer.ts +++ b/packages/wdk/src/identity/signer.ts @@ -27,7 +27,7 @@ export class IdentitySigner implements Signers.Signer { return this.signDigest(payloadHash) } - async signDigest(digest: Bytes.Bytes): Promise { + async signDigest(digest: Bytes.Bytes): Promise { const digestHex = Hex.fromBytes(digest) const authKeySignature = await this.authKey.signMessage(digestHex) const params = { diff --git a/packages/wdk/src/session/index.ts b/packages/wdk/src/session/index.ts index 6eb0af133..3f820971a 100644 --- a/packages/wdk/src/session/index.ts +++ b/packages/wdk/src/session/index.ts @@ -1 +1 @@ -export * from './session-manager' +export * from './session-controller' diff --git a/packages/wdk/src/session/session-controller.ts b/packages/wdk/src/session/session-controller.ts new file mode 100644 index 000000000..6ff1b2dea --- /dev/null +++ b/packages/wdk/src/session/session-controller.ts @@ -0,0 +1,124 @@ +import { Signers, Wallet } from '@0xsequence/sequence-core' +import { + Attestation, + Config, + GenericTree, + Signature as SequenceSignature, + SessionConfig, +} from '@0xsequence/sequence-primitives' +import { Address, Bytes, Provider } from 'ox' +import { IdentitySigner } from '../identity' + +type SessionControllerConfiguration = { + wallet: Wallet // FIXME Account? + identitySigner: IdentitySigner + topology: SessionConfig.SessionsTopology + provider: Provider.Provider +} + +export class SessionController { + private _manager: Signers.SessionManager + private _wallet: Wallet + private readonly _identitySigner: IdentitySigner + + constructor(configuration: SessionControllerConfiguration) { + this._manager = new Signers.SessionManager({ + topology: configuration.topology, + provider: configuration.provider, + }) + this._wallet = configuration.wallet + this._identitySigner = configuration.identitySigner + } + + static createEmpty( + identitySignerAddress: Address.Address, + configuration: Omit, + ): SessionController { + return new SessionController({ + ...configuration, + topology: SessionConfig.emptySessionsTopology(identitySignerAddress), + }) + } + + get topology(): SessionConfig.SessionsTopology { + return this._manager.topology + } + + get imageHash(): Bytes.Bytes { + const configurationTree = SessionConfig.sessionsTopologyToConfigurationTree(this._manager.topology) + return GenericTree.hash(configurationTree) + } + + withProvider(provider: Provider.Provider): SessionController { + this._manager = this._manager.withProvider(provider) + return this + } + + async addImplicitSession( + signerAddress: Address.Address, + attestationParams: Signers.Session.AttestationParams, + ): Promise { + const attestation: Attestation.Attestation = { + ...attestationParams, + approvedSigner: signerAddress, + } + const attestationHash = Attestation.hash(attestation) + // Return the signature to the client + return await this._identitySigner.signDigest(attestationHash) + } + + async addExplicitSession(signerAddress: Address.Address, permissions: Signers.Session.ExplicitParams): Promise { + const topology = SessionConfig.addExplicitSession(this.topology, { + ...permissions, + signer: signerAddress, + }) + await this.updateConfiguration(topology) + } + + async removeExplicitSession(signerAddress: Address.Address): Promise { + const topology = SessionConfig.removeExplicitSession(this.topology, signerAddress) + if (!topology) { + throw new Error('Session not found') + } + await this.updateConfiguration(topology) + } + + async addBlacklistAddress(address: Address.Address): Promise { + const topology = SessionConfig.addToImplicitBlacklist(this.topology, address) + await this.updateConfiguration(topology) + } + + async removeBlacklistAddress(address: Address.Address): Promise { + const topology = SessionConfig.removeFromImplicitBlacklist(this.topology, address) + await this.updateConfiguration(topology) + } + + // Update the configuration to use the new topology + private async updateConfiguration(topology: SessionConfig.SessionsTopology): Promise { + // Remove the old manager from the wallet + this._wallet.removeSapientSigner(this._manager.address, this._manager.imageHash) + + // Update the manager with the new topology + this._manager = this._manager.withTopology(topology) + + // Add the new manager to the wallet + this._wallet.setSapientSigner(this._manager, true) + + // Get the old wallet configuration + const status = await this._wallet.getStatus() + const oldConfiguration = status.configuration + + // Find the session manager in the old configuration + const managerLeaf = Config.findSignerLeaf(oldConfiguration, this._manager.address) + if (!managerLeaf || !Config.isSapientSignerLeaf(managerLeaf)) { + // FIXME: Just add it? + throw new Error('Session manager not found in configuration') + } + + // Update the configuration to use the new session manager image hash + managerLeaf.imageHash = this.imageHash + + // Update the wallet configuration + await this._wallet.setConfiguration(oldConfiguration) + } +} From a8eee4eeac56cfaae312d03629a5829a61503299 Mon Sep 17 00:00:00 2001 From: Michael Standen Date: Fri, 14 Mar 2025 11:30:50 +1300 Subject: [PATCH 205/439] Update session manager and tests --- packages/core/.env.test | 3 + packages/core/jest.config.ts | 13 + packages/core/package.json | 8 +- packages/core/src/signers/session-manager.ts | 37 +- packages/core/src/signers/session/implicit.ts | 14 +- packages/core/src/wallet.ts | 4 +- packages/core/test/constants.ts | 15 + .../test/session-manager.test.ts | 357 +++++++++--------- packages/core/tsconfig.json | 3 +- packages/primitives/src/constants.ts | 12 +- packages/primitives/src/context.ts | 2 +- packages/primitives/src/payload.ts | 4 +- packages/primitives/src/signature.ts | 8 +- packages/wdk/package.json | 2 +- pnpm-lock.yaml | 15 + 15 files changed, 272 insertions(+), 225 deletions(-) create mode 100644 packages/core/.env.test create mode 100644 packages/core/jest.config.ts create mode 100644 packages/core/test/constants.ts rename packages/{wdk => core}/test/session-manager.test.ts (51%) diff --git a/packages/core/.env.test b/packages/core/.env.test new file mode 100644 index 000000000..296d44f99 --- /dev/null +++ b/packages/core/.env.test @@ -0,0 +1,3 @@ +# Random private key +PRIVATE_KEY=0x137423264e4622f9884e3078dfdc887fcf418741b090d6e7c11a04d49d55d4cb +RPC_URL= diff --git a/packages/core/jest.config.ts b/packages/core/jest.config.ts new file mode 100644 index 000000000..fca9161b1 --- /dev/null +++ b/packages/core/jest.config.ts @@ -0,0 +1,13 @@ +import type { Config } from 'jest' + +const config: Config = { + preset: 'ts-jest', + testEnvironment: 'node', + testMatch: ['**/test/**/*.test.ts'], + moduleNameMapper: { + '^@0xsequence/sequence-core$': '/src', + '^@0xsequence/sequence-primitives$': '/../primitives/src', + }, +} + +export default config diff --git a/packages/core/package.json b/packages/core/package.json index 264cc691e..067fffc74 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -4,7 +4,8 @@ "license": "Apache-2.0", "scripts": { "build": "tsc", - "dev": "tsc --watch" + "dev": "tsc --watch", + "test": "jest" }, "exports": { ".": { @@ -14,6 +15,11 @@ }, "devDependencies": { "@repo/typescript-config": "workspace:^", + "@types/jest": "^29.5.14", + "@types/node": "^22.13.9", + "dotenv": "^16.4.7", + "jest": "^29.7.0", + "ts-jest": "^29.2.6", "typescript": "^5.7.3" }, "dependencies": { diff --git a/packages/core/src/signers/session-manager.ts b/packages/core/src/signers/session-manager.ts index f54795fc6..cb4c1de70 100644 --- a/packages/core/src/signers/session-manager.ts +++ b/packages/core/src/signers/session-manager.ts @@ -1,15 +1,14 @@ -import { SapientSigner } from '.' -import { Implicit, Explicit, AttestationParams } from './session' import { - Attestation, Constants, + GenericTree, Payload, SessionConfig, SessionSignature, Signature as SignatureTypes, - GenericTree, } from '@0xsequence/sequence-primitives' -import { AbiFunction, Address, Bytes, Hex, Provider, Secp256k1 } from 'ox' +import { AbiFunction, Address, Bytes, Hex, Provider } from 'ox' +import { SapientSigner } from '.' +import { Explicit, Implicit } from './session' type SessionManagerConfiguration = { topology: SessionConfig.SessionsTopology @@ -89,9 +88,8 @@ export class SessionManager implements SapientSigner { withExplicitSigner(signer: Explicit): SessionManager { const explicitSigners = [...this._explicitSigners, signer] - // FIXME Update the topology? - // const topology = SessionConfig.addExplicitSession(this.topology, signer.sessionPermissions) - const topology = this.topology + // Update the topology + const topology = SessionConfig.addExplicitSession(this.topology, signer.sessionPermissions) return new SessionManager({ topology, @@ -182,17 +180,22 @@ export class SessionManager implements SapientSigner { return false } const encodedPayload = Payload.encodeSapient(chainId, payload) - const encodedCallData = AbiFunction.encodeData(Constants.IS_VALID_SAPIENT_SIGNATURE, [ + const encodedCallData = AbiFunction.encodeData(Constants.RECOVER_SAPIENT_SIGNATURE, [ encodedPayload, Bytes.toHex(signature.data), ]) - const isValidSapientSignatureResult = await this._provider.request({ - method: 'eth_call', - params: [{ from: wallet, to: this.address, data: encodedCallData }], - }) - const resultImageHash = Hex.from( - AbiFunction.decodeResult(Constants.IS_VALID_SAPIENT_SIGNATURE, isValidSapientSignatureResult), - ) - return resultImageHash === Hex.from(this.imageHash) + try { + const recoverSapientSignatureResult = await this._provider.request({ + method: 'eth_call', + params: [{ from: wallet, to: this.address, data: encodedCallData }], + }) + const resultImageHash = Hex.from( + AbiFunction.decodeResult(Constants.RECOVER_SAPIENT_SIGNATURE, recoverSapientSignatureResult), + ) + return resultImageHash === Hex.from(this.imageHash) + } catch (error) { + console.error('recoverSapientSignature error', error) + return false + } } } diff --git a/packages/core/src/signers/session/implicit.ts b/packages/core/src/signers/session/implicit.ts index 241c2cf65..e49f699e7 100644 --- a/packages/core/src/signers/session/implicit.ts +++ b/packages/core/src/signers/session/implicit.ts @@ -14,6 +14,9 @@ export class Implicit implements SignerInterface { private readonly _sessionManager: Address.Address, ) { this.address = Address.fromPublicKey(Secp256k1.getPublicKey({ privateKey: this._privateKey })) + if (this._attestation.approvedSigner !== this.address) { + throw new Error('Invalid attestation') + } } async supportedCall( @@ -23,7 +26,6 @@ export class Implicit implements SignerInterface { provider: Provider.Provider, ): Promise { try { - console.log('implicit signer supportedCall', call, 'to', call.to, 'sessionManager', this._sessionManager) // Call the acceptImplicitRequest function on the called contract const encodedCallData = AbiFunction.encodeData(acceptImplicitRequestFunctionAbi, [ wallet, @@ -45,16 +47,6 @@ export class Implicit implements SignerInterface { behaviorOnError: BigInt(Payload.encodeBehaviorOnError(call.behaviorOnError)), }, ]) - console.log( - 'implicit signer supported call', - call, - 'to', - call.to, - 'sessionManager', - this._sessionManager, - 'encodedCallData', - encodedCallData, - ) const acceptImplicitRequestResult = await provider.request({ method: 'eth_call', params: [{ from: this._sessionManager, to: call.to, data: encodedCallData }], diff --git a/packages/core/src/wallet.ts b/packages/core/src/wallet.ts index 390ca34f4..4b5e5815b 100644 --- a/packages/core/src/wallet.ts +++ b/packages/core/src/wallet.ts @@ -423,7 +423,7 @@ export class Wallet { switch (signature.type) { case 'sapient': { - const callData = AbiFunction.encodeData(Constants.IS_VALID_SAPIENT_SIGNATURE, [ + const callData = AbiFunction.encodeData(Constants.RECOVER_SAPIENT_SIGNATURE, [ Payload.encodeSapient(chainId, payload), Bytes.toHex(signature.data), ]) @@ -451,7 +451,7 @@ export class Wallet { params: [ { to: leaf.address, - data: AbiFunction.encodeData(Constants.IS_VALID_SAPIENT_SIGNATURE_COMPACT, [ + data: AbiFunction.encodeData(Constants.RECOVER_SAPIENT_SIGNATURE_COMPACT, [ Bytes.toHex(digest), Bytes.toHex(signature.data), ]), diff --git a/packages/core/test/constants.ts b/packages/core/test/constants.ts new file mode 100644 index 000000000..50d74be76 --- /dev/null +++ b/packages/core/test/constants.ts @@ -0,0 +1,15 @@ +import { config as dotenvConfig } from 'dotenv' +import { Abi, Address } from 'ox' + +const envFile = process.env.CI ? '.env.test' : '.env.test.local' +dotenvConfig({ path: envFile }) + +export const ERC20_IMPLICIT_MINT_CONTRACT: Address.Address = '0x7aC9f16587B279998f1522f8F737a28aCb4C9f06' +export const MOCK_IMPLICIT_CONTRACT: Address.Address = '0x9D5E1139e02eB025470308EeF65D2d15bC1f5d9F' +export const MOCK_IMPLICIT_INVALID_CONTRACT: Address.Address = '0x977F7fbCAc606C3B33357ebDff0205B8C4055a3B' + +export const ERC20_MINT_ONCE = Abi.from(['function mintOnce(address to, uint256 amount)'])[0] + +// Environment variables +export const { RPC_URL, PRIVATE_KEY } = process.env +export const CAN_RUN_LIVE = !!RPC_URL && !!PRIVATE_KEY diff --git a/packages/wdk/test/session-manager.test.ts b/packages/core/test/session-manager.test.ts similarity index 51% rename from packages/wdk/test/session-manager.test.ts rename to packages/core/test/session-manager.test.ts index d2eeeaf61..66d77a445 100644 --- a/packages/wdk/test/session-manager.test.ts +++ b/packages/core/test/session-manager.test.ts @@ -1,6 +1,5 @@ import { Signers, Wallet } from '@0xsequence/sequence-core' -import { Attestation, Constants, Payload } from '@0xsequence/sequence-primitives' -import { Identity, Session } from '@0xsequence/sequence-wdk' +import { Attestation, Constants, Payload, Permission, SessionConfig } from '@0xsequence/sequence-primitives' import { AbiFunction, Address, Bytes, Hex, Provider, RpcTransport, Secp256k1, TransactionEnvelopeEip1559 } from 'ox' import { CAN_RUN_LIVE, @@ -11,233 +10,234 @@ import { RPC_URL, } from './constants' -describe('SessionManager (mocked)', () => { - // Mock provider for testing - const mockProvider = jest.mocked({ - request: jest.fn().mockResolvedValue(Bytes.fromHex(MOCK_IMPLICIT_CONTRACT)), - on: jest.fn(), - removeListener: jest.fn(), - }) - - // Create mock class extending IdentityInstrument - class MockIdentityInstrument extends Identity.IdentityInstrument { - constructor() { - super('/nitro', jest.fn()) +describe('SessionManager', () => { + const getProvider = async (): Promise<{ provider: Provider.Provider; chainId: bigint }> => { + let provider: Provider.Provider + let chainId = 1n + if (CAN_RUN_LIVE) { + provider = Provider.from(RpcTransport.fromHttp(RPC_URL!!)) + chainId = BigInt(await provider.request({ method: 'eth_chainId' })) + } else { + provider = jest.mocked({ + request: jest.fn(), + on: jest.fn(), + removeListener: jest.fn(), + }) } - sign = jest.fn() - initiateAuth = jest.fn() - registerAuth = jest.fn() - fetch = jest.fn() + return { provider: provider!, chainId } } - // Use in mock - const mockIdentitySigner = jest.mocked({ - address: '0x1234567890123456789012345678901234567890', - sign: jest.fn(), - signDigest: jest.fn(), - ecosystemId: 'test', - nitro: new MockIdentityInstrument(), - authKey: {} as Identity.AuthKey, - }) + const testWalletAddress = Address.fromPublicKey(Secp256k1.getPublicKey({ privateKey: Secp256k1.randomPrivateKey() })) + const identityPrivateKey = Secp256k1.randomPrivateKey() + const testIdentityAddress = Address.fromPublicKey(Secp256k1.getPublicKey({ privateKey: identityPrivateKey })) - // Test wallet address - const testWallet = '0x1234567890123456789012345678901234567890' as Address.Address + const requireContractDeployed = async (provider: Provider.Provider, contract: Address.Address) => { + const code = await provider.request({ method: 'eth_getCode', params: [contract, 'latest'] }) + if (code === '0x') { + throw new Error('Contract not deployed') + } + } beforeEach(() => { jest.clearAllMocks() }) - it('should create an empty session manager', () => { - const sessionManager = Session.SessionManager.createEmpty(mockIdentitySigner.address, { - provider: mockProvider, + it('should create an empty session manager', async () => { + const { provider } = await getProvider() + const sessionManager = Signers.SessionManager.createEmpty(testIdentityAddress, { + provider, }) expect(sessionManager.address).toBeDefined() - expect(sessionManager.topology).toBeDefined() + expect(SessionConfig.isCompleteSessionsTopology(sessionManager.topology)).toBe(true) + expect(SessionConfig.getIdentitySigner(sessionManager.topology)).toBe(testIdentityAddress) + expect(SessionConfig.getImplicitBlacklist(sessionManager.topology)).toStrictEqual([]) }) it('should create and sign with an implicit session', async () => { - const sessionManager = Session.SessionManager.createEmpty(mockIdentitySigner.address, { - provider: mockProvider, - }) + const { provider, chainId } = await getProvider() + await requireContractDeployed(provider, ERC20_IMPLICIT_MINT_CONTRACT) - // Create attestation - const redirectUrl = 'https://test.com/redirect' + // Create implicit signer + const implicitPrivateKey = Secp256k1.randomPrivateKey() + const implicitAddress = Address.fromPublicKey(Secp256k1.getPublicKey({ privateKey: implicitPrivateKey })) + // -- This is sent to the wallet (somehow)-- const attestation: Attestation.Attestation = { - approvedSigner: '0x0000000000000000000000000000000000000000', // Placeholder + approvedSigner: implicitAddress, identityType: new Uint8Array(4), issuerHash: new Uint8Array(32), audienceHash: new Uint8Array(32), + applicationData: new Uint8Array(), authData: { - redirectUrl, + redirectUrl: 'https://example.com', }, - applicationData: new Uint8Array(), } - - // Configure the signer mock - mockIdentitySigner.signDigest.mockResolvedValue({ - type: 'hash', - r: 0n, - s: 0n, - yParity: 1, + const identitySignature = Secp256k1.sign({ + payload: Attestation.hash(attestation), + privateKey: identityPrivateKey, }) + // -- Back in core -- + const implicitSigner = new Signers.Session.Implicit( + implicitPrivateKey, + attestation, + identitySignature, + implicitAddress, + ) + const sessionManager = Signers.SessionManager.createEmpty(testIdentityAddress, { + provider, + }).withImplicitSigner(implicitSigner) - // Create implicit session - const implicitSession = await sessionManager.createImplicitSession(mockIdentitySigner, attestation) - attestation.approvedSigner = implicitSession.address // Update approvedSigner to the implicit session address - - // Configure the provider mock - const generateImplicitRequestMagicResult = Attestation.generateImplicitRequestMagic(attestation, testWallet) - mockProvider.request.mockResolvedValue(generateImplicitRequestMagicResult) + if (!CAN_RUN_LIVE) { + // Configure the provider mock + const generateImplicitRequestMagicResult = Attestation.generateImplicitRequestMagic( + attestation, + testWalletAddress, + ) + ;(provider as any).request.mockResolvedValue(generateImplicitRequestMagicResult) + } // Create a test transaction - const testCall: Payload.Call = { - to: MOCK_IMPLICIT_CONTRACT, + const call: Payload.Call = { + to: ERC20_IMPLICIT_MINT_CONTRACT, value: 0n, - data: new Uint8Array(), + data: Bytes.fromHex(AbiFunction.encodeData(ERC20_MINT_ONCE, [testWalletAddress, 1000000000000000000n])), gasLimit: 0n, delegateCall: false, onlyFallback: false, behaviorOnError: 'revert', } + const payload: Payload.Calls = { + type: 'call', + nonce: 0n, + space: 0n, + calls: [call], + } // Sign the transaction - const signature = await sessionManager.signSapient( - testWallet, - 1n, // chainId - { - type: 'call', - nonce: 0n, - space: 0n, - calls: [testCall], - }, - ) + const signature = await sessionManager.signSapient(testWalletAddress, chainId, payload, sessionManager.imageHash) expect(signature.type).toBe('sapient') expect(signature.address).toBe(sessionManager.address) expect(signature.data).toBeDefined() + + if (!CAN_RUN_LIVE) { + // Configure the provider mock + ;(provider as any).request.mockResolvedValue(sessionManager.imageHash) + } + + // Check if the signature is valid + const isValid = await sessionManager.isValidSapientSignature(testWalletAddress, chainId, payload, signature) + expect(isValid).toBe(true) }) it('should create and sign with an explicit session', async () => { - const sessionManager = Session.SessionManager.createEmpty(mockIdentitySigner.address, { - provider: mockProvider, - }) + const { provider, chainId } = await getProvider() + await requireContractDeployed(provider, ERC20_IMPLICIT_MINT_CONTRACT) - // Create explicit session with permissions - await sessionManager.createExplicitSession({ + // Create explicit signer + const explicitPrivateKey = Secp256k1.randomPrivateKey() + const explicitSigner = new Signers.Session.Explicit(explicitPrivateKey, { valueLimit: 1000000000000000000n, // 1 ETH deadline: BigInt(Math.floor(Date.now() / 1000) + 3600), // 1 hour from now permissions: [ { - target: MOCK_IMPLICIT_CONTRACT, + target: ERC20_IMPLICIT_MINT_CONTRACT, rules: [], }, ], }) + const sessionManager = Signers.SessionManager.createEmpty(testIdentityAddress, { + provider, + }).withExplicitSigner(explicitSigner) // Create a test transaction within permissions - const testCall: Payload.Call = { - to: MOCK_IMPLICIT_CONTRACT, - value: 100000000000000000n, // 0.1 ETH - data: new Uint8Array(), + const call: Payload.Call = { + to: ERC20_IMPLICIT_MINT_CONTRACT, + value: 0n, + data: Bytes.fromHex(AbiFunction.encodeData(ERC20_MINT_ONCE, [testWalletAddress, 1000000000000000000n])), gasLimit: 0n, delegateCall: false, onlyFallback: false, behaviorOnError: 'revert', } - - // Sign the transaction - const signature = await sessionManager.signSapient(testWallet, 1n, { + const payload: Payload.Calls = { type: 'call', nonce: 0n, space: 0n, - calls: [testCall], - }) + calls: [call], + } + + // Sign the transaction + const signature = await sessionManager.signSapient(testWalletAddress, chainId, payload, sessionManager.imageHash) expect(signature.type).toBe('sapient') expect(signature.address).toBe(sessionManager.address) expect(signature.data).toBeDefined() - }) -}) -// Only run real tests when RPC is provided -if (CAN_RUN_LIVE) { - describe('SessionManager (live)', () => { - const walletAddress: Address.Address = '0x1234567890123456789012345678901234567890' + if (!CAN_RUN_LIVE) { + // Configure the provider mock + ;(provider as any).request.mockResolvedValue(sessionManager.imageHash) + } - const rpcTransport = RpcTransport.fromHttp(RPC_URL!!) - const provider = Provider.from(rpcTransport) + // Check if the signature is valid + const isValid = await sessionManager.isValidSapientSignature(testWalletAddress, chainId, payload, signature) + expect(isValid).toBe(true) + }) - // Mock the identity signer using a local private key instead of calling nitro + if (CAN_RUN_LIVE) { + // Load the sender const pkHex = Hex.from(PRIVATE_KEY as `0x${string}`) - const pk = new Signers.Pk(pkHex) - const mockIdentitySigner = pk as unknown as Identity.IdentitySigner - - const sessionManager = Session.SessionManager.createEmpty(mockIdentitySigner.address, { - provider, - }) - - const requireContractDeployed = async (contract: Address.Address) => { - const code = await provider.request({ method: 'eth_getCode', params: [contract, 'latest'] }) - if (code === '0x') { - throw new Error('Contract not deployed') - } - } - - it('should create and sign with an implicit session', async () => { - const chainId = BigInt(await provider.request({ method: 'eth_chainId' })) + const senderAddress = Address.fromPublicKey(Secp256k1.getPublicKey({ privateKey: pkHex })) - const attestation = { + // Submit a real transaction with a wallet that has a SessionManager using implicit session + it('Submits a real transaction with a wallet that has a SessionManager using implicit session', async () => { + // Check the contracts have been deployed + const { provider, chainId } = await getProvider() + await requireContractDeployed(provider, ERC20_IMPLICIT_MINT_CONTRACT) + await requireContractDeployed(provider, Constants.DefaultGuest) + + // Create an implicit signer + const implicitPrivateKey = Secp256k1.randomPrivateKey() + const implicitAddress = Address.fromPublicKey(Secp256k1.getPublicKey({ privateKey: implicitPrivateKey })) + // -- This is sent to the wallet (somehow)-- + const attestation: Attestation.Attestation = { + approvedSigner: implicitAddress, identityType: new Uint8Array(4), issuerHash: new Uint8Array(32), audienceHash: new Uint8Array(32), applicationData: new Uint8Array(), authData: { - redirectUrl: 'https://test.com/redirect', + redirectUrl: 'https://example.com', }, } - - await sessionManager.createImplicitSession(mockIdentitySigner, attestation) - const payload: Payload.Calls = { - type: 'call', - nonce: 0n, - space: 0n, - calls: [ - { - to: MOCK_IMPLICIT_CONTRACT, - value: 0n, - data: new Uint8Array(), - gasLimit: 0n, - delegateCall: false, - onlyFallback: false, - behaviorOnError: 'revert', - }, - ], - } - const signature = await sessionManager.signSapient(walletAddress, chainId, payload) - - // Check if the signature is valid - const isValid = await sessionManager.isValidSapientSignature(walletAddress, chainId, payload, signature) - expect(isValid).toBe(true) - }) - - it('Submits a real transaction with a wallet that has a SessionManager using implicit session', async () => { - // Check the contracts have been deployed - await requireContractDeployed(ERC20_IMPLICIT_MINT_CONTRACT) - await requireContractDeployed(Constants.DefaultGuest) - - // Check balance of the private key account - const senderAddress = Address.fromPublicKey(Secp256k1.getPublicKey({ privateKey: pkHex })) - + const identitySignature = Secp256k1.sign({ + payload: Attestation.hash(attestation), + privateKey: identityPrivateKey, + }) + // -- Back in core -- + const implicitSigner = new Signers.Session.Implicit( + implicitPrivateKey, + attestation, + identitySignature, + implicitAddress, + ) + const sessionManager = Signers.SessionManager.createEmpty(testIdentityAddress, { + provider, + implicitSigners: [implicitSigner], + }) const wallet = await Wallet.fromConfiguration({ threshold: 1n, checkpoint: 0n, - topology: { - type: 'sapient-signer', - address: sessionManager.address, - weight: 100n, - imageHash: Bytes.fromHex(sessionManager.imageHash), - }, + topology: [ + { + type: 'sapient-signer', + address: sessionManager.address, + weight: 1n, + imageHash: Bytes.fromHex(sessionManager.imageHash), + }, + // Include a random node leaf (bytes32) to prevent image hash collision + Bytes.random(32), + ], }) wallet.setSapientSigner(sessionManager) @@ -251,20 +251,9 @@ if (CAN_RUN_LIVE) { behaviorOnError: 'revert', } - // Add an implicit session - const attestation = { - identityType: new Uint8Array(4), - issuerHash: new Uint8Array(32), - audienceHash: new Uint8Array(32), - applicationData: new Uint8Array(), - authData: { - redirectUrl: 'https://example.com', - }, - } - await sessionManager.createImplicitSession(mockIdentitySigner, attestation) - // Send the transaction const transaction = await wallet.getTransaction(provider, [call]) + console.log('transaction', transaction) // Estimate gas with a safety buffer const estimatedGas = BigInt(await provider.request({ method: 'eth_estimateGas', params: [transaction] })) @@ -290,7 +279,6 @@ if (CAN_RUN_LIVE) { }), ) - const chainId = await provider.request({ method: 'eth_chainId' }) const envelope = TransactionEnvelopeEip1559.from({ chainId: Number(chainId), type: 'eip1559', @@ -319,31 +307,42 @@ if (CAN_RUN_LIVE) { }, 60000) it('Submits a real transaction with a wallet that has a SessionManager using explicit session', async () => { + const { provider, chainId } = await getProvider() // Check the contracts have been deployed - await requireContractDeployed(ERC20_IMPLICIT_MINT_CONTRACT) - await requireContractDeployed(Constants.DefaultGuest) - - // Check balance of the private key account - const senderAddress = Address.fromPublicKey(Secp256k1.getPublicKey({ privateKey: pkHex })) + await requireContractDeployed(provider, ERC20_IMPLICIT_MINT_CONTRACT) + await requireContractDeployed(provider, Constants.DefaultGuest) - // Add an implicit session - const sessionPermissions: Signers.Session.ExplicitParams = { - valueLimit: 0n, // Can't send ETH + // Create explicit signer + const explicitPrivateKey = Secp256k1.randomPrivateKey() + const sessionPermission: Signers.Session.ExplicitParams = { + valueLimit: 1000000000000000000n, // 1 ETH deadline: BigInt(Math.floor(Date.now() / 1000) + 3600), // 1 hour from now - permissions: [ - { target: ERC20_IMPLICIT_MINT_CONTRACT, rules: [] }, // Anything on this contract is allowed - ], + permissions: [{ target: ERC20_IMPLICIT_MINT_CONTRACT, rules: [] }], } - await sessionManager.createExplicitSession(sessionPermissions) + const explicitSigner = new Signers.Session.Explicit(explicitPrivateKey, sessionPermission) + // Test manually building the session topology + const sessionTopology = SessionConfig.addExplicitSession( + SessionConfig.emptySessionsTopology(testIdentityAddress), + { + ...sessionPermission, + signer: explicitSigner.address, + }, + ) + const sessionManager = new Signers.SessionManager({ + topology: sessionTopology, + explicitSigners: [explicitSigner], + provider, + }) - // FIXME This is the wrong order to do this but the wallet doesn't currently support a sapient signer with an image hash that changes + // Create the wallet const wallet = await Wallet.fromConfiguration({ threshold: 1n, checkpoint: 0n, topology: { + // Random explicit signer will randomise the image hash type: 'sapient-signer', address: sessionManager.address, - weight: 100n, + weight: 1n, imageHash: Bytes.fromHex(sessionManager.imageHash), }, }) @@ -361,6 +360,7 @@ if (CAN_RUN_LIVE) { // Send the transaction const transaction = await wallet.getTransaction(provider, [call]) + console.log('transaction', transaction) // Estimate gas with a safety buffer const estimatedGas = BigInt(await provider.request({ method: 'eth_estimateGas', params: [transaction] })) @@ -386,7 +386,6 @@ if (CAN_RUN_LIVE) { }), ) - const chainId = await provider.request({ method: 'eth_chainId' }) const envelope = TransactionEnvelopeEip1559.from({ chainId: Number(chainId), type: 'eip1559', @@ -413,5 +412,5 @@ if (CAN_RUN_LIVE) { console.log('Transaction sent', tx) await provider.request({ method: 'eth_getTransactionReceipt', params: [tx] }) }, 60000) - }) -} + } +}) diff --git a/packages/core/tsconfig.json b/packages/core/tsconfig.json index e502f58f4..ba6dfce5c 100644 --- a/packages/core/tsconfig.json +++ b/packages/core/tsconfig.json @@ -2,7 +2,8 @@ "extends": "@repo/typescript-config/base.json", "compilerOptions": { "rootDir": "src", - "outDir": "dist" + "outDir": "dist", + "types": ["node", "jest"] }, "include": ["src"], "exclude": ["node_modules", "dist"] diff --git a/packages/primitives/src/constants.ts b/packages/primitives/src/constants.ts index 7fecf9ee4..136bec307 100644 --- a/packages/primitives/src/constants.ts +++ b/packages/primitives/src/constants.ts @@ -3,8 +3,8 @@ import { Abi, Address, Hex } from 'ox' export const DEFAULT_CREATION_CODE: Hex.Hex = '0x603e600e3d39601e805130553df33d3d34601c57363d3d373d363d30545af43d82803e903d91601c57fd5bf3' -export const DefaultGuest: Address.Address = '0xd17b93dEC460956aeCc45fD9614Dbd163623aE30' -export const DefaultSessionManager: Address.Address = '0x0D3b3497f4B7E99239aE748Fc45216F45431B105' +export const DefaultGuest: Address.Address = '0x6b38229f7F0f0bcfe777c1bB5F127e1dAaC5aFaC' +export const DefaultSessionManager: Address.Address = '0xC3A9e9cCEFF60CadE0976AD521E37bb632FDF24b' // ERC1271 export const IS_VALID_SIGNATURE = Abi.from([ @@ -25,11 +25,11 @@ export const READ_NONCE = Abi.from(['function readNonce(uint256 _space) public v export const EXECUTE = Abi.from(['function execute(bytes calldata _payload, bytes calldata _signature) external'])[0] // Sapient -export const IS_VALID_SAPIENT_SIGNATURE = Abi.from([ - 'function isValidSapientSignature((uint8 kind,bool noChainId,(address to,uint256 value,bytes data,uint256 gasLimit,bool delegateCall,bool onlyFallback,uint256 behaviorOnError)[] calls,uint256 space,uint256 nonce,bytes message,bytes32 imageHash,bytes32 digest,address[] parentWallets) calldata _payload, bytes calldata _signature) external view returns (bytes32)', +export const RECOVER_SAPIENT_SIGNATURE = Abi.from([ + 'function recoverSapientSignature((uint8 kind,bool noChainId,(address to,uint256 value,bytes data,uint256 gasLimit,bool delegateCall,bool onlyFallback,uint256 behaviorOnError)[] calls,uint256 space,uint256 nonce,bytes message,bytes32 imageHash,bytes32 digest,address[] parentWallets) calldata _payload, bytes calldata _signature) external view returns (bytes32)', ])[0] // SapientCompact -export const IS_VALID_SAPIENT_SIGNATURE_COMPACT = Abi.from([ - 'function isValidSapientSignatureCompact(bytes32 _digest, bytes calldata _signature) external view returns (bytes32)', +export const RECOVER_SAPIENT_SIGNATURE_COMPACT = Abi.from([ + 'function recoverSapientSignatureCompact(bytes32 _digest, bytes calldata _signature) external view returns (bytes32)', ])[0] diff --git a/packages/primitives/src/context.ts b/packages/primitives/src/context.ts index cfc095067..08970deff 100644 --- a/packages/primitives/src/context.ts +++ b/packages/primitives/src/context.ts @@ -9,6 +9,6 @@ export type Context = { export const Dev1: Context = { factory: '0xBd0F8abD58B4449B39C57Ac9D5C67433239aC447', - stage1: '0x7cc3cd2a7c2611e8be6baffe17d0fa9b15a8858d', + stage1: '0x7CC3CD2a7c2611e8bE6BAFfe17d0fA9B15a8858d', creationCode: DEFAULT_CREATION_CODE, } diff --git a/packages/primitives/src/payload.ts b/packages/primitives/src/payload.ts index 4007b2769..165f55599 100644 --- a/packages/primitives/src/payload.ts +++ b/packages/primitives/src/payload.ts @@ -1,5 +1,5 @@ import { AbiFunction, AbiParameters, Address, Bytes, Hash, Hex, TypedData } from 'ox' -import { IS_VALID_SAPIENT_SIGNATURE } from './constants' +import { RECOVER_SAPIENT_SIGNATURE } from './constants' import { minBytesFor } from './utils' import { getSignPayload } from 'ox/TypedData' @@ -250,7 +250,7 @@ export function encode(payload: Calls, self?: Address.Address): Bytes.Bytes { export function encodeSapient( chainId: bigint, payload: Parented, -): Exclude[0], undefined>[0] { +): Exclude[0], undefined>[0] { const encoded: ReturnType = { kind: 0, noChainId: !chainId, diff --git a/packages/primitives/src/signature.ts b/packages/primitives/src/signature.ts index 841afd22b..66890fb6f 100644 --- a/packages/primitives/src/signature.ts +++ b/packages/primitives/src/signature.ts @@ -18,7 +18,7 @@ import { isAnyAddressSubdigestLeaf, isTopology, } from './config' -import { IS_VALID_SAPIENT_SIGNATURE, IS_VALID_SAPIENT_SIGNATURE_COMPACT, IS_VALID_SIGNATURE } from './constants' +import { RECOVER_SAPIENT_SIGNATURE, RECOVER_SAPIENT_SIGNATURE_COMPACT, IS_VALID_SIGNATURE } from './constants' import { wrap, decode } from './erc-6492' import { fromConfigUpdate, hash, Parented } from './payload' import { minBytesFor, packRSY, unpackRSY } from './utils' @@ -1264,11 +1264,11 @@ async function recoverTopology( to: topology.signature.address, data: topology.signature.type === 'sapient' - ? AbiFunction.encodeData(IS_VALID_SAPIENT_SIGNATURE, [ + ? AbiFunction.encodeData(RECOVER_SAPIENT_SIGNATURE, [ encode(chainId, payload), Bytes.toHex(topology.signature.data), ]) - : AbiFunction.encodeData(IS_VALID_SAPIENT_SIGNATURE_COMPACT, [ + : AbiFunction.encodeData(RECOVER_SAPIENT_SIGNATURE_COMPACT, [ Bytes.toHex(digest), Bytes.toHex(topology.signature.data), ]), @@ -1327,7 +1327,7 @@ async function recoverTopology( function encode( chainId: bigint, payload: Parented, -): Exclude, []>[0][0] { +): Exclude, []>[0][0] { switch (payload.type) { case 'call': return { diff --git a/packages/wdk/package.json b/packages/wdk/package.json index e3bc3e09f..28f0fe9b4 100644 --- a/packages/wdk/package.json +++ b/packages/wdk/package.json @@ -5,7 +5,7 @@ "scripts": { "build": "tsc", "dev": "tsc --watch", - "test": "jest" + "test": "jest --passWithNoTests" }, "exports": { ".": { diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 3c7b0df6c..3a05817b3 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -144,6 +144,21 @@ importers: '@repo/typescript-config': specifier: workspace:^ version: link:../typescript-config + '@types/jest': + specifier: ^29.5.14 + version: 29.5.14 + '@types/node': + specifier: ^22.13.9 + version: 22.13.9 + dotenv: + specifier: ^16.4.7 + version: 16.4.7 + jest: + specifier: ^29.7.0 + version: 29.7.0(@types/node@22.13.9)(ts-node@10.9.2(@types/node@22.13.9)(typescript@5.7.3)) + ts-jest: + specifier: ^29.2.6 + version: 29.2.6(@babel/core@7.26.9)(@jest/transform@29.7.0)(@jest/types@29.6.3)(babel-jest@29.7.0(@babel/core@7.26.9))(jest@29.7.0(@types/node@22.13.9)(ts-node@10.9.2(@types/node@22.13.9)(typescript@5.7.3)))(typescript@5.7.3) typescript: specifier: ^5.7.3 version: 5.7.3 From f6eccff2e1c721553e718b9962d510f18f5f3e38 Mon Sep 17 00:00:00 2001 From: Michael Standen Date: Mon, 17 Mar 2025 08:30:17 +1300 Subject: [PATCH 206/439] Remove unused type --- packages/core/src/state/local/index.ts | 2 -- 1 file changed, 2 deletions(-) diff --git a/packages/core/src/state/local/index.ts b/packages/core/src/state/local/index.ts index 195c8bc63..4bce45f66 100644 --- a/packages/core/src/state/local/index.ts +++ b/packages/core/src/state/local/index.ts @@ -372,5 +372,3 @@ export class Provider implements ProviderInterface { return this.store.saveTree(Bytes.toHex(GenericTree.hash(tree)), tree) } } - -type Unpromise = T extends Promise ? S : T From 3ae1fde82925cfbd67f2121daca345af6659d428 Mon Sep 17 00:00:00 2001 From: Michael Standen Date: Mon, 17 Mar 2025 08:48:26 +1300 Subject: [PATCH 207/439] Add state to session controller --- .../wdk/src/session/session-controller.ts | 29 +++++++++++++++++-- 1 file changed, 26 insertions(+), 3 deletions(-) diff --git a/packages/wdk/src/session/session-controller.ts b/packages/wdk/src/session/session-controller.ts index 6ff1b2dea..828c7816a 100644 --- a/packages/wdk/src/session/session-controller.ts +++ b/packages/wdk/src/session/session-controller.ts @@ -1,4 +1,4 @@ -import { Signers, Wallet } from '@0xsequence/sequence-core' +import { Signers, State, Wallet } from '@0xsequence/sequence-core' import { Attestation, Config, @@ -6,7 +6,7 @@ import { Signature as SequenceSignature, SessionConfig, } from '@0xsequence/sequence-primitives' -import { Address, Bytes, Provider } from 'ox' +import { Address, Bytes, Hex, Provider } from 'ox' import { IdentitySigner } from '../identity' type SessionControllerConfiguration = { @@ -14,12 +14,14 @@ type SessionControllerConfiguration = { identitySigner: IdentitySigner topology: SessionConfig.SessionsTopology provider: Provider.Provider + stateProvider?: State.Provider } export class SessionController { private _manager: Signers.SessionManager - private _wallet: Wallet + private readonly _wallet: Wallet private readonly _identitySigner: IdentitySigner + private readonly _stateProvider: State.Provider | null constructor(configuration: SessionControllerConfiguration) { this._manager = new Signers.SessionManager({ @@ -28,6 +30,7 @@ export class SessionController { }) this._wallet = configuration.wallet this._identitySigner = configuration.identitySigner + this._stateProvider = configuration.stateProvider ?? null } static createEmpty( @@ -40,6 +43,23 @@ export class SessionController { }) } + static async createFromStorage( + imageHash: Hex.Hex, + configuration: Omit, + ): Promise { + if (!configuration.stateProvider) { + throw new Error('State provider not provided') + } + const configurationTree = await configuration.stateProvider.getTree(imageHash) + if (!configurationTree) { + throw new Error('Configuration not found') + } + return new SessionController({ + ...configuration, + topology: SessionConfig.configurationTreeToSessionsTopology(configurationTree), + }) + } + get topology(): SessionConfig.SessionsTopology { return this._manager.topology } @@ -101,6 +121,9 @@ export class SessionController { // Update the manager with the new topology this._manager = this._manager.withTopology(topology) + // Store the new configuration + await this._stateProvider?.saveTree(SessionConfig.sessionsTopologyToConfigurationTree(topology)) + // Add the new manager to the wallet this._wallet.setSapientSigner(this._manager, true) From 9b631d980666b379594a95eb67cd6c28f6fbe94a Mon Sep 17 00:00:00 2001 From: Michael Standen Date: Mon, 17 Mar 2025 09:51:10 +1300 Subject: [PATCH 208/439] Add session manage creation from state --- packages/core/src/signers/session-manager.ts | 16 ++++ packages/core/test/session-manager.test.ts | 82 +++++++++++++++++--- packages/primitives/src/permission.ts | 60 +++++++++++++- packages/primitives/src/session-config.ts | 21 ++++- 4 files changed, 166 insertions(+), 13 deletions(-) diff --git a/packages/core/src/signers/session-manager.ts b/packages/core/src/signers/session-manager.ts index cb4c1de70..4ab05fc7c 100644 --- a/packages/core/src/signers/session-manager.ts +++ b/packages/core/src/signers/session-manager.ts @@ -9,6 +9,7 @@ import { import { AbiFunction, Address, Bytes, Hex, Provider } from 'ox' import { SapientSigner } from '.' import { Explicit, Implicit } from './session' +import { State } from '..' type SessionManagerConfiguration = { topology: SessionConfig.SessionsTopology @@ -45,6 +46,21 @@ export class SessionManager implements SapientSigner { }) } + static async createFromStorage( + imageHash: Hex.Hex, + stateProvider: State.Provider, + configuration: Omit, + ): Promise { + const configurationTree = await stateProvider.getTree(imageHash) + if (!configurationTree) { + throw new Error('Configuration not found') + } + return new SessionManager({ + ...configuration, + topology: SessionConfig.configurationTreeToSessionsTopology(configurationTree), + }) + } + get address(): Address.Address { return this._address } diff --git a/packages/core/test/session-manager.test.ts b/packages/core/test/session-manager.test.ts index 66d77a445..892bc07e5 100644 --- a/packages/core/test/session-manager.test.ts +++ b/packages/core/test/session-manager.test.ts @@ -1,14 +1,12 @@ -import { Signers, Wallet } from '@0xsequence/sequence-core' -import { Attestation, Constants, Payload, Permission, SessionConfig } from '@0xsequence/sequence-primitives' +import { Signers, State, Wallet } from '@0xsequence/sequence-core' +import { Attestation, Constants, GenericTree, Payload, SessionConfig } from '@0xsequence/sequence-primitives' import { AbiFunction, Address, Bytes, Hex, Provider, RpcTransport, Secp256k1, TransactionEnvelopeEip1559 } from 'ox' -import { - CAN_RUN_LIVE, - ERC20_IMPLICIT_MINT_CONTRACT, - ERC20_MINT_ONCE, - MOCK_IMPLICIT_CONTRACT, - PRIVATE_KEY, - RPC_URL, -} from './constants' +import { CAN_RUN_LIVE, ERC20_IMPLICIT_MINT_CONTRACT, ERC20_MINT_ONCE, PRIVATE_KEY, RPC_URL } from './constants' +import { ParameterOperation } from '../../primitives/src/permission' + +function randomAddress(): Address.Address { + return Address.fromPublicKey(Secp256k1.getPublicKey({ privateKey: Secp256k1.randomPrivateKey() })) +} describe('SessionManager', () => { const getProvider = async (): Promise<{ provider: Provider.Provider; chainId: bigint }> => { @@ -27,7 +25,7 @@ describe('SessionManager', () => { return { provider: provider!, chainId } } - const testWalletAddress = Address.fromPublicKey(Secp256k1.getPublicKey({ privateKey: Secp256k1.randomPrivateKey() })) + const testWalletAddress = randomAddress() const identityPrivateKey = Secp256k1.randomPrivateKey() const testIdentityAddress = Address.fromPublicKey(Secp256k1.getPublicKey({ privateKey: identityPrivateKey })) @@ -54,6 +52,68 @@ describe('SessionManager', () => { expect(SessionConfig.getImplicitBlacklist(sessionManager.topology)).toStrictEqual([]) }) + it('should load from state', async () => { + const { provider } = await getProvider() + const stateProvider = new State.Local.Provider() + + let topology = SessionConfig.emptySessionsTopology(testIdentityAddress) + // Add random signer to the topology + const sessionPermission: Signers.Session.ExplicitParams = { + valueLimit: 1000000000000000000n, + deadline: BigInt(Math.floor(Date.now() / 1000) + 3600), // 1 hour from now + permissions: [ + { + target: randomAddress(), + rules: [ + { + cumulative: true, + operation: ParameterOperation.EQUAL, + value: Bytes.padLeft(Bytes.fromHex('0x'), 32), + offset: 0n, + mask: Bytes.padLeft(Bytes.fromHex('0x'), 32), + }, + { + cumulative: false, + operation: ParameterOperation.EQUAL, + value: Bytes.padLeft(Bytes.fromHex('0x01'), 32), + offset: 2n, + mask: Bytes.padLeft(Bytes.fromHex('0x03'), 32), + }, + ], + }, + ], + } + const randomSigner = randomAddress() + topology = SessionConfig.addExplicitSession(topology, { + ...sessionPermission, + signer: randomSigner, + }) + // Add random blacklist to the topology + const randomBlacklistAddress = randomAddress() + topology = SessionConfig.addToImplicitBlacklist(topology, randomBlacklistAddress) + + const imageHash = Hex.fromBytes(GenericTree.hash(SessionConfig.sessionsTopologyToConfigurationTree(topology))) + + // Save the topology to storage + await stateProvider.saveTree(SessionConfig.sessionsTopologyToConfigurationTree(topology)) + + // Create the session manager using the storage + const sessionManager = await Signers.SessionManager.createFromStorage(imageHash, stateProvider, { + provider, + }) + + // Check config is correct + expect(sessionManager.imageHash).toBe(imageHash) + expect(SessionConfig.isCompleteSessionsTopology(sessionManager.topology)).toBe(true) + expect(SessionConfig.getIdentitySigner(sessionManager.topology)).toBe(testIdentityAddress) + expect(SessionConfig.getImplicitBlacklist(sessionManager.topology)).toStrictEqual([randomBlacklistAddress]) + const actualPermissions = SessionConfig.getSessionPermissions(sessionManager.topology, randomSigner) + expect(actualPermissions).toStrictEqual({ + ...sessionPermission, + signer: randomSigner, + }) + }) + it('should create and sign with an implicit session', async () => { const { provider, chainId } = await getProvider() await requireContractDeployed(provider, ERC20_IMPLICIT_MINT_CONTRACT) diff --git a/packages/primitives/src/permission.ts b/packages/primitives/src/permission.ts index a66002789..49c9c5361 100644 --- a/packages/primitives/src/permission.ts +++ b/packages/primitives/src/permission.ts @@ -1,5 +1,4 @@ import { AbiParameters, Address, Bytes } from 'ox' -import { Call } from './payload' export enum ParameterOperation { EQUAL = 0, @@ -75,6 +74,65 @@ function encodeParameterRule(rule: ParameterRule): Bytes.Bytes { ) } +// Decoding + +export function decodeSessionPermissions(bytes: Bytes.Bytes): SessionPermissions { + const signer = Bytes.toHex(bytes.slice(0, 20)) + const valueLimit = Bytes.toBigInt(bytes.slice(20, 52)) + const deadline = Bytes.toBigInt(bytes.slice(52, 84)) + const permissionsLength = Number(bytes[84]!) + const permissions = [] + let pointer = 85 + for (let i = 0; i < permissionsLength; i++) { + // Pass the remaining bytes instead of a fixed slice length + const { permission, consumed } = decodePermission(bytes.slice(pointer)) + permissions.push(permission) + pointer += consumed + } + return { + signer, + valueLimit, + deadline, + permissions, + } +} + +// Returns the permission and the number of bytes consumed in the permission block +function decodePermission(bytes: Bytes.Bytes): { permission: Permission; consumed: number } { + const target = Bytes.toHex(bytes.slice(0, 20)) + const rulesLength = Number(bytes[20]!) + const rules = [] + let pointer = 21 + for (let i = 0; i < rulesLength; i++) { + const ruleBytes = bytes.slice(pointer, pointer + 97) + rules.push(decodeParameterRule(ruleBytes)) + pointer += 97 + } + return { + permission: { + target, + rules, + }, + consumed: pointer, + } +} + +function decodeParameterRule(bytes: Bytes.Bytes): ParameterRule { + const operationCumulative = Number(bytes[0]!) + const cumulative = (operationCumulative & 1) === 1 + const operation = operationCumulative >> 1 + const value = bytes.slice(1, 33) + const offset = Bytes.toBigInt(bytes.slice(33, 65)) + const mask = bytes.slice(65, 97) + return { + cumulative, + operation, + value, + offset, + mask, + } +} + // ABI encode export const permissionStructAbi = { diff --git a/packages/primitives/src/session-config.ts b/packages/primitives/src/session-config.ts index 6247034c0..9cc7a36cc 100644 --- a/packages/primitives/src/session-config.ts +++ b/packages/primitives/src/session-config.ts @@ -1,6 +1,7 @@ import { Address, Bytes, Hash } from 'ox' import * as GenericTree from './generic-tree' import { + decodeSessionPermissions, encodeSessionPermissions, encodeSessionPermissionsForJson, SessionPermissions, @@ -174,6 +175,24 @@ export function getSessionPermissions(topology: SessionsTopology, address: Addre return null } +export function getExplicitSigners(topology: SessionsTopology): Address.Address[] { + return getExplicitSignersFromBranch(topology, []) +} + +function getExplicitSignersFromBranch(topology: SessionsTopology, current: Address.Address[]): Address.Address[] { + if (isSessionPermissions(topology)) { + return [...current, topology.signer] + } + if (isSessionsBranch(topology)) { + const result: Address.Address[] = [...current] + for (const child of topology) { + result.push(...getExplicitSignersFromBranch(child, current)) + } + return result + } + return current +} + // Encode / decode to configuration tree /** @@ -224,7 +243,7 @@ export function decodeLeafFromBytes(bytes: Bytes.Bytes): SessionLeaf { return { identitySigner: Bytes.toHex(bytes.slice(1, 21)) } } if (flag === SESSIONS_FLAG_PERMISSIONS) { - return sessionPermissionsFromParsed(bytes.slice(1)) + return decodeSessionPermissions(bytes.slice(1)) } throw new Error('Invalid leaf') } From b552b1b2dfc59e5efd90ad0d4f471c9b8e2589ce Mon Sep 17 00:00:00 2001 From: Michael Standen Date: Mon, 17 Mar 2025 10:23:33 +1300 Subject: [PATCH 209/439] More helper create functions --- packages/core/src/signers/session-manager.ts | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/packages/core/src/signers/session-manager.ts b/packages/core/src/signers/session-manager.ts index 4ab05fc7c..d2a0d27c7 100644 --- a/packages/core/src/signers/session-manager.ts +++ b/packages/core/src/signers/session-manager.ts @@ -46,6 +46,16 @@ export class SessionManager implements SapientSigner { }) } + static createFromConfigurationTree( + configurationTree: GenericTree.Tree, + configuration: Omit, + ): SessionManager { + return new SessionManager({ + ...configuration, + topology: SessionConfig.configurationTreeToSessionsTopology(configurationTree), + }) + } + static async createFromStorage( imageHash: Hex.Hex, stateProvider: State.Provider, @@ -55,10 +65,7 @@ export class SessionManager implements SapientSigner { if (!configurationTree) { throw new Error('Configuration not found') } - return new SessionManager({ - ...configuration, - topology: SessionConfig.configurationTreeToSessionsTopology(configurationTree), - }) + return SessionManager.createFromConfigurationTree(configurationTree, configuration) } get address(): Address.Address { From 5a9a45a95aa49ac1e2b8431e6b5ec5f7d24eb0c6 Mon Sep 17 00:00:00 2001 From: Agusx1211 Date: Mon, 17 Mar 2025 17:47:55 +0000 Subject: [PATCH 210/439] Encrypted pk store --- packages/core/src/signers/pk/encrypted.ts | 153 ++++++++++++++++++ .../core/src/signers/{pk.ts => pk/index.ts} | 37 ++++- 2 files changed, 184 insertions(+), 6 deletions(-) create mode 100644 packages/core/src/signers/pk/encrypted.ts rename packages/core/src/signers/{pk.ts => pk/index.ts} (54%) diff --git a/packages/core/src/signers/pk/encrypted.ts b/packages/core/src/signers/pk/encrypted.ts new file mode 100644 index 000000000..f081ba0b2 --- /dev/null +++ b/packages/core/src/signers/pk/encrypted.ts @@ -0,0 +1,153 @@ +import { Hex, Address, PublicKey, Secp256k1, Bytes } from 'ox' +import { PkStore } from '.' + +export interface EncryptedData { + iv: Uint8Array + data: ArrayBuffer + keyPointer: string + address: Address.Address + publicKey: PublicKey.PublicKey +} + +export class EncryptedPksDb { + private tableName: string + private dbName: string = 'pk-db' + private dbVersion: number = 1 + + constructor( + private readonly localStorageKeyPrefix: string = 'e_pk_key_', + tableName: string = 'e_pk', + ) { + this.tableName = tableName + } + + private openDB(): Promise { + return new Promise((resolve, reject) => { + const request = indexedDB.open(this.dbName, this.dbVersion) + request.onupgradeneeded = () => { + const db = request.result + if (!db.objectStoreNames.contains(this.tableName)) { + db.createObjectStore(this.tableName) + } + } + request.onsuccess = () => resolve(request.result) + request.onerror = () => reject(request.error) + }) + } + + private async putData(key: string, value: any): Promise { + const db = await this.openDB() + return new Promise((resolve, reject) => { + const tx = db.transaction(this.tableName, 'readwrite') + const store = tx.objectStore(this.tableName) + const request = store.put(value, key) + request.onsuccess = () => resolve() + request.onerror = () => reject(request.error) + }) + } + + private async getData(key: string): Promise { + const db = await this.openDB() + return new Promise((resolve, reject) => { + const tx = db.transaction(this.tableName, 'readonly') + const store = tx.objectStore(this.tableName) + const request = store.get(key) + request.onsuccess = () => resolve(request.result) + request.onerror = () => reject(request.error) + }) + } + + private async getAllData(): Promise { + const db = await this.openDB() + return new Promise((resolve, reject) => { + const tx = db.transaction(this.tableName, 'readonly') + const store = tx.objectStore(this.tableName) + const request = store.getAll() + request.onsuccess = () => resolve(request.result) + request.onerror = () => reject(request.error) + }) + } + + private randomHexString(length: number): Hex.Hex { + const bytes = new Uint8Array(length) + window.crypto.getRandomValues(bytes) + return Array.from(bytes) + .map((b) => b.toString(16).padStart(2, '0')) + .join('') as Hex.Hex + } + + async generateAndStore(): Promise { + const encryptionKey = await window.crypto.subtle.generateKey({ name: 'AES-GCM', length: 256 }, true, [ + 'encrypt', + 'decrypt', + ]) + + const keyPointer = this.localStorageKeyPrefix + this.randomHexString(8) + const exportedKey = await window.crypto.subtle.exportKey('jwk', encryptionKey) + window.localStorage.setItem(keyPointer, JSON.stringify(exportedKey)) + + const privateKey = this.randomHexString(32) + const publicKey = Secp256k1.getPublicKey({ privateKey }) + const address = Address.fromPublicKey(publicKey) + + const encoder = new TextEncoder() + const encodedPk = encoder.encode(privateKey) + const iv = window.crypto.getRandomValues(new Uint8Array(12)) + const encryptedBuffer = await window.crypto.subtle.encrypt({ name: 'AES-GCM', iv }, encryptionKey, encodedPk) + + const encrypted: EncryptedData = { + iv, + data: encryptedBuffer, + keyPointer, + address, + publicKey, + } + + const dbKey = `pk_${address}` + await this.putData(dbKey, encrypted) + return encrypted + } + + async getEncryptedEntry(address: Address.Address): Promise { + const dbKey = `pk_${address}` + return this.getData(dbKey) + } + + async getEncryptedPkStore(address: Address.Address): Promise { + const entry = await this.getEncryptedEntry(address) + if (!entry) return + return new EncryptedPkStore(entry) + } + + async listAddresses(): Promise { + const allEntries = await this.getAllData() + return allEntries.map((entry) => entry.address) + } +} + +export class EncryptedPkStore implements PkStore { + constructor(private readonly encrypted: EncryptedData) {} + + address(): Address.Address { + return this.encrypted.address + } + + publicKey(): PublicKey.PublicKey { + return this.encrypted.publicKey + } + + async signDigest(digest: Bytes.Bytes): Promise<{ r: bigint; s: bigint; yParity: number }> { + const keyJson = window.localStorage.getItem(this.encrypted.keyPointer) + if (!keyJson) throw new Error('Encryption key not found in localStorage') + const jwk = JSON.parse(keyJson) + const encryptionKey = await window.crypto.subtle.importKey('jwk', jwk, { name: 'AES-GCM' }, false, ['decrypt']) + const decryptedBuffer = await window.crypto.subtle.decrypt( + { name: 'AES-GCM', iv: this.encrypted.iv }, + encryptionKey, + this.encrypted.data, + ) + const decoder = new TextDecoder() + const privateKey = decoder.decode(decryptedBuffer) as Hex.Hex + return Secp256k1.sign({ payload: digest, privateKey }) + } +} diff --git a/packages/core/src/signers/pk.ts b/packages/core/src/signers/pk/index.ts similarity index 54% rename from packages/core/src/signers/pk.ts rename to packages/core/src/signers/pk/index.ts index 80bd9ed34..fdfd50646 100644 --- a/packages/core/src/signers/pk.ts +++ b/packages/core/src/signers/pk/index.ts @@ -1,16 +1,41 @@ import type { Payload as PayloadTypes, Signature as SignatureTypes } from '@0xsequence/sequence-primitives' import { Payload } from '@0xsequence/sequence-primitives' import { Address, Bytes, Hex, PublicKey, Secp256k1 } from 'ox' -import { Signer as SignerInterface, Witnessable } from '.' -import { State } from '..' +import { Signer as SignerInterface, Witnessable } from '..' +import { State } from '../..' + +export interface PkStore { + address(): Address.Address + publicKey(): PublicKey.PublicKey + signDigest(digest: Bytes.Bytes): Promise<{ r: bigint; s: bigint; yParity: number }> +} + +export class MemoryPkStore implements PkStore { + constructor(private readonly privateKey: Hex.Hex) {} + + address(): Address.Address { + return Address.fromPublicKey(this.publicKey()) + } + + publicKey(): PublicKey.PublicKey { + return Secp256k1.getPublicKey({ privateKey: this.privateKey }) + } + + signDigest(digest: Bytes.Bytes): Promise<{ r: bigint; s: bigint; yParity: number }> { + return Promise.resolve(Secp256k1.sign({ payload: digest, privateKey: this.privateKey })) + } +} export class Pk implements SignerInterface, Witnessable { + private readonly privateKey: PkStore + public readonly address: Address.Address public readonly pubKey: PublicKey.PublicKey - constructor(private readonly privateKey: Hex.Hex | Bytes.Bytes) { - this.pubKey = Secp256k1.getPublicKey({ privateKey: this.privateKey }) - this.address = Address.fromPublicKey(this.pubKey) + constructor(privateKey: Hex.Hex | PkStore) { + this.privateKey = typeof privateKey === 'string' ? new MemoryPkStore(privateKey) : privateKey + this.pubKey = this.privateKey.publicKey() + this.address = this.privateKey.address() } async sign( @@ -23,7 +48,7 @@ export class Pk implements SignerInterface, Witnessable { } async signDigest(digest: Bytes.Bytes): Promise { - const signature = Secp256k1.sign({ payload: digest, privateKey: this.privateKey }) + const signature = await this.privateKey.signDigest(digest) return { ...signature, type: 'hash' } } From 5663d01c59c1f89b97ceee2f147ba073ed3d3800 Mon Sep 17 00:00:00 2001 From: Patryk Kalinowski Date: Tue, 18 Mar 2025 13:37:13 +0100 Subject: [PATCH 211/439] wdk: OtpChallenge and loginWithOtp --- packages/wdk/src/identity/challenge.ts | 30 +++++++++++++++++++++++++- packages/wdk/src/identity/index.ts | 4 ++-- packages/wdk/src/identity/wdk.ts | 25 +++++++++++++++++++-- 3 files changed, 54 insertions(+), 5 deletions(-) diff --git a/packages/wdk/src/identity/challenge.ts b/packages/wdk/src/identity/challenge.ts index 14061fbaa..fea045d46 100644 --- a/packages/wdk/src/identity/challenge.ts +++ b/packages/wdk/src/identity/challenge.ts @@ -1,4 +1,4 @@ -import { Hash, Hex } from 'ox' +import { Bytes, Hash, Hex } from 'ox' import { jwtDecode } from 'jwt-decode' import { IdentityType, AuthMode } from './nitro' @@ -73,3 +73,31 @@ export class AuthCodePkceChallenge extends Challenge { return challenge } } + +export class OtpChallenge extends Challenge { + private answer?: string + + constructor( + readonly identityType: IdentityType, + readonly verifier: string, + ) { + super() + } + + public getParams(): ChallengeParams { + return { + authMode: AuthMode.OTP, + identityType: this.identityType, + verifier: this.verifier, + answer: this.answer, + metadata: {}, + } + } + + public withAnswer(verifier: string, codeChallenge: string, otp: string): OtpChallenge { + const challenge = new OtpChallenge(this.identityType, verifier) + const answerHash = Hash.keccak256(Bytes.fromString(codeChallenge + otp)) + challenge.answer = Hex.fromBytes(answerHash) + return challenge + } +} diff --git a/packages/wdk/src/identity/index.ts b/packages/wdk/src/identity/index.ts index fe7777cb2..e02954b06 100644 --- a/packages/wdk/src/identity/index.ts +++ b/packages/wdk/src/identity/index.ts @@ -1,5 +1,5 @@ -import { IdentityInstrument } from './nitro' -export { IdentityInstrument } +import { IdentityInstrument, IdentityType } from './nitro' +export { IdentityInstrument, IdentityType } export * from './wdk' export * from './authkey' diff --git a/packages/wdk/src/identity/wdk.ts b/packages/wdk/src/identity/wdk.ts index f2fbfb48a..74bae4cc6 100644 --- a/packages/wdk/src/identity/wdk.ts +++ b/packages/wdk/src/identity/wdk.ts @@ -1,5 +1,5 @@ -import { Challenge, IdTokenChallenge, AuthCodePkceChallenge } from './challenge' -import { IdentityInstrument } from './nitro' +import { Challenge, IdTokenChallenge, AuthCodePkceChallenge, OtpChallenge } from './challenge' +import { IdentityInstrument, IdentityType } from './nitro' import { AuthKey } from './authkey' import { IdentitySigner } from './signer' import { getDefaultSecureStoreBackend } from './secure-store' @@ -26,6 +26,27 @@ export class Wdk { readonly nitro: IdentityInstrument, ) {} + public async loginWithOtp( + identityType: IdentityType, + recipient: string, + callback: (respondToChallenge: (code: string) => Promise) => void, + ) { + const challenge = new OtpChallenge(identityType, recipient) + const [verifier, codeChallenge] = await this.initiateAuth(challenge) + + return new Promise((resolve, reject) => { + const respondToChallenge = async (code: string) => { + try { + const signer = await this.completeAuth(challenge.withAnswer(verifier, codeChallenge, code)) + resolve(signer) + } catch (error) { + reject(error) + } + } + callback(respondToChallenge) + }) + } + public async loginWithIdToken(issuer: string, audience: string, idToken: string) { const challenge = new IdTokenChallenge(issuer, audience, idToken) await this.initiateAuth(challenge) From 89793a22160db6c5adadea61815f74568ca12525 Mon Sep 17 00:00:00 2001 From: Patryk Kalinowski Date: Tue, 18 Mar 2025 13:38:05 +0100 Subject: [PATCH 212/439] demo-wallet: common attestation generation --- .../app/handlers/auth-code-pkce.tsx | 42 +++++----------- apps/demo-wallet/app/handlers/id-token.tsx | 42 ++++++---------- apps/demo-wallet/app/lib/attestation.ts | 48 +++++++++++++++++++ 3 files changed, 76 insertions(+), 56 deletions(-) create mode 100644 apps/demo-wallet/app/lib/attestation.ts diff --git a/apps/demo-wallet/app/handlers/auth-code-pkce.tsx b/apps/demo-wallet/app/handlers/auth-code-pkce.tsx index 3559328c4..a4481976c 100644 --- a/apps/demo-wallet/app/handlers/auth-code-pkce.tsx +++ b/apps/demo-wallet/app/handlers/auth-code-pkce.tsx @@ -3,12 +3,9 @@ import { useEffect } from 'react' import { Identity } from '@0xsequence/sequence-wdk' import { redirect } from 'next/navigation' -import { Hex } from 'ox' -import { Bytes } from 'ox' -import { PersonalMessage } from 'ox' -import { Signature } from 'ox' import { ClientParams } from '../lib/client-params' import { storeClientParams, getClientParams } from '../lib/session-storage' +import { Attestation } from '../lib/attestation' interface InitParams { type: 'init' @@ -56,35 +53,22 @@ export default function AuthCodePkceHandler({ nitroRpc, ecosystemId, issuer, aud const signer = await wdk.completeOAuthLogin(oauthParams.state, oauthParams.code) // We have the signer, now we can use it to sign a message - console.log(signer) + console.log({ signer }) - const attestationMessage = [ - `SessionAddress=${clientParams.session_address}`, - `EcosystemID=${ecosystemId}`, - `AppID=${clientParams.app_id}`, - `IdentityType=OIDC`, - `Issuer=${issuer}`, - `Audience=${audience}`, - `RedirectURI=${clientParams.redirect_uri}`, - ].join('; ') - - const personalMessage = PersonalMessage.getSignPayload(Hex.fromString(attestationMessage)) - const attestationSignature = await signer.signDigest(Bytes.fromHex(personalMessage)) - console.log({ attestationSignature, attestationMessage }) - - if (attestationSignature.type !== 'hash') { - throw new Error('Invalid signature type') - } - - const sig = Signature.toHex({ - r: attestationSignature.r, - s: attestationSignature.s, - yParity: attestationSignature.yParity, + const attestation = await Attestation.create(signer, { + sessionAddress: clientParams.session_address, + ecosystemId, + appId: clientParams.app_id, + identityType: 'OIDC', + issuer, + audience, + redirectUri: clientParams.redirect_uri, }) + console.log({ attestation }) const returnParams = new URLSearchParams({ - attestation_signature: sig, - attestation_message: attestationMessage, + attestation_signature: attestation.signature, + attestation_message: attestation.message, state: clientParams.state, session_address: clientParams.session_address, }) diff --git a/apps/demo-wallet/app/handlers/id-token.tsx b/apps/demo-wallet/app/handlers/id-token.tsx index d3945621e..f4ceda24a 100644 --- a/apps/demo-wallet/app/handlers/id-token.tsx +++ b/apps/demo-wallet/app/handlers/id-token.tsx @@ -2,9 +2,9 @@ import { useEffect } from 'react' import { redirect } from 'next/navigation' -import { PersonalMessage, Hex, Bytes, Signature } from 'ox' import { Identity } from '@0xsequence/sequence-wdk' import type { ClientParams } from '../lib/client-params' +import { Attestation } from '../lib/attestation' interface Props { nitroRpc: string @@ -22,35 +22,23 @@ export default function IdTokenHandler({ nitroRpc, idToken, ecosystemId, issuer, const signer = await wdk.loginWithIdToken(issuer, audience, idToken) // We have the signer, now we can use it to sign a message - console.log(signer) - - const attestationMessage = [ - `SessionAddress=${clientParams.session_address}`, - `EcosystemID=${ecosystemId}`, - `AppID=${clientParams.app_id}`, - `IdentityType=OIDC`, - `Issuer=${issuer}`, - `Audience=${audience}`, - `RedirectURI=${clientParams.redirect_uri}`, - ].join('; ') - - const personalMessage = PersonalMessage.getSignPayload(Hex.fromString(attestationMessage)) - const attestationSignature = await signer.signDigest(Bytes.fromHex(personalMessage)) - console.log({ attestationSignature, attestationMessage }) - - if (attestationSignature.type !== 'hash') { - throw new Error('Invalid signature type') - } - - const sig = Signature.toHex({ - r: attestationSignature.r, - s: attestationSignature.s, - yParity: attestationSignature.yParity, + console.log({ signer }) + + const attestation = await Attestation.create(signer, { + sessionAddress: clientParams.session_address, + ecosystemId, + appId: clientParams.app_id, + identityType: 'OIDC', + issuer, + audience, + redirectUri: clientParams.redirect_uri, }) + console.log({ attestation }) + const returnParams = new URLSearchParams({ - attestation_signature: sig, - attestation_message: attestationMessage, + attestation_message: attestation.message, + attestation_signature: attestation.signature, state: clientParams.state, session_address: clientParams.session_address, }) diff --git a/apps/demo-wallet/app/lib/attestation.ts b/apps/demo-wallet/app/lib/attestation.ts new file mode 100644 index 000000000..64e4f298c --- /dev/null +++ b/apps/demo-wallet/app/lib/attestation.ts @@ -0,0 +1,48 @@ +import { Hex, Bytes, Signature, PersonalMessage } from 'ox' +import { Identity } from '@0xsequence/sequence-wdk' + +export interface AttestationParams { + sessionAddress: string + ecosystemId: string + identityType: string + appId: string + issuer?: string + audience?: string + redirectUri: string +} + +export class Attestation { + private constructor( + public readonly message: string, + public readonly signature: string, + ) {} + + static async create(signer: Identity.IdentitySigner, params: AttestationParams) { + const attestationMessage = [ + `SessionAddress=${params.sessionAddress}`, + `EcosystemID=${params.ecosystemId}`, + `AppID=${params.appId}`, + `IdentityType=${params.identityType}`, + params.issuer ? `Issuer=${params.issuer}` : null, + params.audience ? `Audience=${params.audience}` : null, + `RedirectURI=${params.redirectUri}`, + ] + .filter(Boolean) + .join('; ') + + const personalMessage = PersonalMessage.getSignPayload(Hex.fromString(attestationMessage)) + const attestationSignature = await signer.signDigest(Bytes.fromHex(personalMessage)) + + if (attestationSignature.type !== 'hash') { + throw new Error('Invalid signature type') + } + + const sig = Signature.toHex({ + r: attestationSignature.r, + s: attestationSignature.s, + yParity: attestationSignature.yParity, + }) + + return new Attestation(attestationMessage, sig) + } +} From 583609b2b8333c35f3b1277efd5ce73df44b5dfd Mon Sep 17 00:00:00 2001 From: Patryk Kalinowski Date: Tue, 18 Mar 2025 13:38:19 +0100 Subject: [PATCH 213/439] demo-wallet: implement OTP auth mode --- apps/demo-wallet/app/email-otp/page.tsx | 23 +++++++++ apps/demo-wallet/app/handlers/otp.tsx | 63 +++++++++++++++++++++++++ 2 files changed, 86 insertions(+) create mode 100644 apps/demo-wallet/app/email-otp/page.tsx create mode 100644 apps/demo-wallet/app/handlers/otp.tsx diff --git a/apps/demo-wallet/app/email-otp/page.tsx b/apps/demo-wallet/app/email-otp/page.tsx new file mode 100644 index 000000000..937035065 --- /dev/null +++ b/apps/demo-wallet/app/email-otp/page.tsx @@ -0,0 +1,23 @@ +'use server' + +import OtpHandler from '../handlers/otp' +import { ClientParams } from '../lib/client-params' +import { Identity } from '@0xsequence/sequence-wdk' + +type EmailParams = ClientParams & { + email: string +} + +export default async function EmailOtp({ searchParams }: { searchParams: Promise }) { + const params = await searchParams + + return ( + + ) +} diff --git a/apps/demo-wallet/app/handlers/otp.tsx b/apps/demo-wallet/app/handlers/otp.tsx new file mode 100644 index 000000000..4ea828240 --- /dev/null +++ b/apps/demo-wallet/app/handlers/otp.tsx @@ -0,0 +1,63 @@ +'use client' + +import { useEffect, useState } from 'react' +import { redirect } from 'next/navigation' +import { Identity } from '@0xsequence/sequence-wdk' +import type { ClientParams } from '../lib/client-params' +import { Attestation } from '../lib/attestation' + +interface Props { + nitroRpc: string + ecosystemId: string + identityType: Identity.IdentityType + recipient: string + clientParams: ClientParams +} + +export default function OtpHandler({ nitroRpc, ecosystemId, identityType, recipient, clientParams }: Props) { + const wdk = new Identity.Wdk(ecosystemId, new Identity.IdentityInstrument(nitroRpc, window.fetch)) + + const [code, setCode] = useState('') + const [respondToChallenge, setRespondToChallenge] = useState<((code: string) => Promise) | null>(null) + + useEffect(() => { + ;(async () => { + if (respondToChallenge) { + return + } + + const signer = await wdk.loginWithOtp(identityType, recipient, (respondToChallenge) => { + setRespondToChallenge(() => respondToChallenge) + }) + + // We have the signer, now we can use it to sign a message + console.log({ signer }) + + const attestation = await Attestation.create(signer, { + sessionAddress: clientParams.session_address, + ecosystemId, + appId: clientParams.app_id, + identityType, + redirectUri: clientParams.redirect_uri, + }) + + console.log({ attestation }) + + const returnParams = new URLSearchParams({ + attestation_message: attestation.message, + attestation_signature: attestation.signature, + state: clientParams.state, + session_address: clientParams.session_address, + }) + + redirect(`${clientParams.redirect_uri}?${returnParams.toString()}`) + })() + }, []) + + return ( +
+ setCode(e.target.value)} /> + {respondToChallenge && } +
+ ) +} From aefd79a3cc6466cfec5a361a8bd38b405766c4f0 Mon Sep 17 00:00:00 2001 From: Agusx1211 Date: Tue, 18 Mar 2025 17:57:56 +0000 Subject: [PATCH 214/439] Remove provider writes --- packages/core/src/wallet.ts | 19 ------------------- 1 file changed, 19 deletions(-) diff --git a/packages/core/src/wallet.ts b/packages/core/src/wallet.ts index 4b5e5815b..09388ecb4 100644 --- a/packages/core/src/wallet.ts +++ b/packages/core/src/wallet.ts @@ -86,13 +86,6 @@ export class Wallet { return (await provider.request({ method: 'eth_getCode', params: [this.address, 'pending'] })) !== '0x' } - async deploy(provider: Provider.Provider) { - if (!(await this.isDeployed(provider))) { - const transaction = await this.getDeployTransaction() - return provider.request({ method: 'eth_sendTransaction', params: [transaction] }) - } - } - async getDeployTransaction(): Promise<{ to: Address.Address; data: Hex.Hex }> { const deployInformation = await this.stateProvider.getDeploy(this.address) if (!deployInformation) { @@ -193,18 +186,6 @@ export class Wallet { } } - async send( - provider: Provider.Provider, - calls: Payload.Call[], - options?: { space?: bigint; trustSigners?: boolean; onSignerError?: Config.SignerErrorCallback }, - ) { - const transaction = await this.getTransaction(provider, calls, options) - return provider.request({ - method: 'eth_sendTransaction', - params: [transaction], - }) - } - async getTransaction( provider: Provider.Provider, calls: Payload.Call[], From 8140f804c389e0e3f35788014e0718b7a44c4877 Mon Sep 17 00:00:00 2001 From: Agusx1211 Date: Tue, 18 Mar 2025 17:58:27 +0000 Subject: [PATCH 215/439] Fix encrypted pk store --- packages/core/src/signers/index.ts | 4 ++-- packages/core/src/signers/pk/encrypted.ts | 17 +++++------------ packages/core/src/signers/pk/index.ts | 2 ++ packages/core/src/state/local/index.ts | 3 +++ 4 files changed, 12 insertions(+), 14 deletions(-) diff --git a/packages/core/src/signers/index.ts b/packages/core/src/signers/index.ts index c11c48a92..c70c71564 100644 --- a/packages/core/src/signers/index.ts +++ b/packages/core/src/signers/index.ts @@ -2,8 +2,8 @@ import { Config, Payload, Signature } from '@0xsequence/sequence-primitives' import { Address, Hex } from 'ox' import { State } from '..' -export * from './pk' -export * from './passkey' +export * as Pk from './pk/index' +export * as Passkey from './passkey' export * as Session from './session' export * from './session-manager' diff --git a/packages/core/src/signers/pk/encrypted.ts b/packages/core/src/signers/pk/encrypted.ts index f081ba0b2..2c2b62798 100644 --- a/packages/core/src/signers/pk/encrypted.ts +++ b/packages/core/src/signers/pk/encrypted.ts @@ -68,27 +68,20 @@ export class EncryptedPksDb { }) } - private randomHexString(length: number): Hex.Hex { - const bytes = new Uint8Array(length) - window.crypto.getRandomValues(bytes) - return Array.from(bytes) - .map((b) => b.toString(16).padStart(2, '0')) - .join('') as Hex.Hex - } - async generateAndStore(): Promise { const encryptionKey = await window.crypto.subtle.generateKey({ name: 'AES-GCM', length: 256 }, true, [ 'encrypt', 'decrypt', ]) - const keyPointer = this.localStorageKeyPrefix + this.randomHexString(8) - const exportedKey = await window.crypto.subtle.exportKey('jwk', encryptionKey) - window.localStorage.setItem(keyPointer, JSON.stringify(exportedKey)) + const privateKey = Hex.random(32) - const privateKey = this.randomHexString(32) const publicKey = Secp256k1.getPublicKey({ privateKey }) const address = Address.fromPublicKey(publicKey) + const keyPointer = this.localStorageKeyPrefix + address + + const exportedKey = await window.crypto.subtle.exportKey('jwk', encryptionKey) + window.localStorage.setItem(keyPointer, JSON.stringify(exportedKey)) const encoder = new TextEncoder() const encodedPk = encoder.encode(privateKey) diff --git a/packages/core/src/signers/pk/index.ts b/packages/core/src/signers/pk/index.ts index fdfd50646..8b07c514a 100644 --- a/packages/core/src/signers/pk/index.ts +++ b/packages/core/src/signers/pk/index.ts @@ -72,3 +72,5 @@ export class Pk implements SignerInterface, Witnessable { }) } } + +export * as Encrypted from './encrypted' diff --git a/packages/core/src/state/local/index.ts b/packages/core/src/state/local/index.ts index 4bce45f66..72b41b01a 100644 --- a/packages/core/src/state/local/index.ts +++ b/packages/core/src/state/local/index.ts @@ -372,3 +372,6 @@ export class Provider implements ProviderInterface { return this.store.saveTree(Bytes.toHex(GenericTree.hash(tree)), tree) } } + +export * from './memory' +export * from './indexed-db' From 5993c397840041786947687dc0efbaedf6c10926 Mon Sep 17 00:00:00 2001 From: Agusx1211 Date: Tue, 18 Mar 2025 18:27:08 +0000 Subject: [PATCH 216/439] Basic wallet manager --- packages/wdk/src/account.ts | 7 - packages/wdk/src/index.ts | 3 + packages/wdk/src/manager/db.ts | 172 ++++++++++++++++++++ packages/wdk/src/manager/index.ts | 2 + packages/wdk/src/manager/manager.ts | 240 ++++++++++++++++++++++++++++ packages/wdk/src/wallet/index.ts | 1 + packages/wdk/src/wallet/wallet.ts | 18 +++ 7 files changed, 436 insertions(+), 7 deletions(-) delete mode 100644 packages/wdk/src/account.ts create mode 100644 packages/wdk/src/manager/db.ts create mode 100644 packages/wdk/src/manager/index.ts create mode 100644 packages/wdk/src/manager/manager.ts create mode 100644 packages/wdk/src/wallet/index.ts create mode 100644 packages/wdk/src/wallet/wallet.ts diff --git a/packages/wdk/src/account.ts b/packages/wdk/src/account.ts deleted file mode 100644 index d632d22a9..000000000 --- a/packages/wdk/src/account.ts +++ /dev/null @@ -1,7 +0,0 @@ -import { Address } from 'ox' - -export class Account { - constructor(public readonly address: Address.Address) {} - - static async create(address: Address.Address) {} -} diff --git a/packages/wdk/src/index.ts b/packages/wdk/src/index.ts index 4af1bbd5a..e0aec2008 100644 --- a/packages/wdk/src/index.ts +++ b/packages/wdk/src/index.ts @@ -1,2 +1,5 @@ export * as Identity from './identity' export * as Session from './session' +export * as Manager from './manager/index' +export * as Wallet from './wallet/index' +export * as Network from './network' diff --git a/packages/wdk/src/manager/db.ts b/packages/wdk/src/manager/db.ts new file mode 100644 index 000000000..cedb4b746 --- /dev/null +++ b/packages/wdk/src/manager/db.ts @@ -0,0 +1,172 @@ +import { Address } from 'ox' + +const DB_VERSION = 2 +const WALLETS_TABLE = 'wallets' + +export interface WalletRow { + wallet: Address.Address + status: string + loginDate: string + device: Address.Address + loginType: string + useGuard: boolean +} + +export type WalletUpdateType = 'added' | 'removed' | 'updated' + +export type WalletUpdateListener = ( + wallet: Address.Address, + updateType: WalletUpdateType, + oldRow?: WalletRow, + newRow?: WalletRow, +) => void + +export class ManagerDb { + private _db: IDBDatabase | null = null + private dbName: string + private listeners: WalletUpdateListener[] = [] + private broadcastChannel?: BroadcastChannel + + constructor(dbName: string = 'sequence-manager') { + this.dbName = dbName + + if (typeof BroadcastChannel !== 'undefined') { + this.broadcastChannel = new BroadcastChannel(this.dbName + '-manager') + this.broadcastChannel.onmessage = (event) => { + if (event.data && event.data.type && event.data.wallet) { + this.listeners.forEach((cb) => cb(event.data.wallet, event.data.type, event.data.oldRow, event.data.newRow)) + } + } + } + } + + private async openDB(): Promise { + if (this._db) return this._db + + return new Promise((resolve, reject) => { + const request = indexedDB.open(this.dbName, DB_VERSION) + + request.onupgradeneeded = () => { + const db = request.result + if (!db.objectStoreNames.contains(WALLETS_TABLE)) { + db.createObjectStore(WALLETS_TABLE, { keyPath: 'wallet' }) + } + } + + request.onsuccess = () => { + this._db = request.result + resolve(this._db!) + } + + request.onerror = () => { + reject(request.error) + } + + request.onblocked = () => { + console.error('db blocked') + } + }) + } + + private async getStore(mode: IDBTransactionMode = 'readonly'): Promise { + const db = await this.openDB() + const tx = db.transaction(WALLETS_TABLE, mode) + return tx.objectStore(WALLETS_TABLE) + } + + private notifyUpdate( + wallet: Address.Address, + updateType: WalletUpdateType, + oldRow?: WalletRow, + newRow?: WalletRow, + ): void { + this.listeners.forEach((cb) => cb(wallet, updateType, oldRow, newRow)) + if (this.broadcastChannel) { + this.broadcastChannel.postMessage({ + type: updateType, + wallet, + oldRow, + newRow, + }) + } + } + + addListener(listener: WalletUpdateListener): () => void { + this.listeners.push(listener) + return () => { + this.removeListener(listener) + } + } + + removeListener(listener: WalletUpdateListener): void { + this.listeners = this.listeners.filter((l) => l !== listener) + } + + async listWallets(): Promise { + const store = await this.getStore('readonly') + return new Promise((resolve, reject) => { + const req = store.getAll() + req.onsuccess = () => { + resolve(req.result as WalletRow[]) + } + req.onerror = () => reject(req.error) + }) + } + + async getWallet(wallet: Address.Address): Promise { + const store = await this.getStore('readonly') + return new Promise((resolve, reject) => { + const req = store.get(wallet.toLowerCase()) + req.onsuccess = () => resolve(req.result) + req.onerror = () => reject(req.error) + }) + } + + async deleteWallet(wallet: Address.Address): Promise { + const existing = await this.getWallet(wallet) + const store = await this.getStore('readwrite') + return new Promise((resolve, reject) => { + const req = store.delete(wallet.toLowerCase()) + req.onsuccess = () => { + resolve() + if (existing) { + try { + this.notifyUpdate(wallet, 'removed', existing, undefined) + } catch (err) { + console.error('notifyUpdate failed', err) + } + } + } + req.onerror = () => reject(req.error) + }) + } + + async saveWallet(row: WalletRow): Promise { + const old = await this.getWallet(row.wallet) + const store = await this.getStore('readwrite') + const normalizedRow = { ...row, wallet: row.wallet.toLowerCase() } as WalletRow + + return new Promise((resolve, reject) => { + const req = store.put(normalizedRow) + + req.onsuccess = () => { + resolve() + let updateType: WalletUpdateType | null = null + if (!old) { + updateType = 'added' + } else if (JSON.stringify(old) !== JSON.stringify(normalizedRow)) { + updateType = 'updated' + } + if (updateType) { + try { + this.notifyUpdate(row.wallet, updateType, old, normalizedRow) + } catch (err) { + console.error('notifyUpdate failed', err) + } + } + } + + req.onerror = () => reject(req.error) + }) + } +} diff --git a/packages/wdk/src/manager/index.ts b/packages/wdk/src/manager/index.ts new file mode 100644 index 000000000..641c23e84 --- /dev/null +++ b/packages/wdk/src/manager/index.ts @@ -0,0 +1,2 @@ +export * from './db' +export * from './manager' diff --git a/packages/wdk/src/manager/manager.ts b/packages/wdk/src/manager/manager.ts new file mode 100644 index 000000000..f4a889d52 --- /dev/null +++ b/packages/wdk/src/manager/manager.ts @@ -0,0 +1,240 @@ +import { Address } from 'ox' + +import { Extensions, Context, Config, Constants } from '@0xsequence/sequence-primitives' +import { Signers, Wallet as CoreWallet, State } from '@0xsequence/sequence-core' +import { ManagerDb } from './db' +import { Network } from '..' + +export type ManagerOptions = { + verbose?: boolean + + extensions?: Extensions.Extensions + context?: Context.Context + guest?: Address.Address + + encryptedPksDb?: Signers.Pk.Encrypted.EncryptedPksDb + managerDb?: ManagerDb + + stateProvider?: State.Provider + networks?: Network.Network[] + + defaultGuardTopology?: Config.Topology +} + +export const ManagerOptionsDefaults = { + verbose: false, + + extensions: Extensions.Dev1, + context: Context.Dev1, + guest: Constants.DefaultGuest, + encryptedPksDb: new Signers.Pk.Encrypted.EncryptedPksDb(), + managerDb: new ManagerDb(), + + stateProvider: new State.Local.Provider(new State.Local.IndexedDbStore()), + network: Network.Defaults.All, + + defaultGuardTopology: { + // TODO: Move this somewhere else + type: 'signer', + address: '0xf71eC72C8C03a0857DD7601ACeF1e42b85983e99', + weight: 1n, + } as Config.SignerLeaf, +} + +export type CreateWalletOptions = { + kind: 'passkey' + useGuard?: boolean +} + +export const CreateWalletOptionsDefaults = { + useGuard: false, +} + +export function applyDefaults(options?: ManagerOptions) { + return { ...ManagerOptionsDefaults, ...options } +} + +function buildCappedTreeFromTopology(weight: bigint, topology: Config.Topology): Config.Topology { + // We may optimize this for some topology types + // but it is not worth it, because the topology + // that we will use for prod won't be optimizable + return { + type: 'nested', + weight: weight, + threshold: weight, + tree: topology, + } +} + +function buildCappedTree(weight: bigint, members: Address.Address[]): Config.Topology { + const loginMemberWeight = 1n + + if (members.length === 0) { + throw new Error('Cannot build login tree with no members') + } + + if (members.length === 1) { + return { + type: 'signer', + address: members[0], + weight: loginMemberWeight, + } as Config.SignerLeaf + } + + // Limit their total signing power + return { + type: 'nested', + weight: loginMemberWeight, + threshold: 1n, + tree: Config.flatLeavesToTopology( + members.map((member) => ({ + type: 'signer', + address: member, + weight: 1n, + })), + ), + } as Config.NestedLeaf +} + +export class Manager { + public readonly verbose: boolean + + public readonly extensions: Extensions.Extensions + public readonly context: Context.Context + public readonly guestModule: Address.Address + + public readonly stateProvider: State.Provider + + private readonly encryptedPksDb + private readonly managerDb + + public readonly defaultGuardTopology: Config.Topology + + private walletsDbListener: (() => void) | undefined + private walletsListeners: ((wallets: Address.Address[]) => void)[] = [] + + constructor(options?: ManagerOptions) { + const ops = applyDefaults(options) + this.extensions = ops.extensions + this.context = ops.context + this.verbose = ops.verbose + this.defaultGuardTopology = ops.defaultGuardTopology + this.stateProvider = ops.stateProvider + this.guestModule = ops.guest + this.encryptedPksDb = ops.encryptedPksDb + this.managerDb = ops.managerDb + } + + public async listWallets(): Promise { + return this.managerDb.listWallets().then((r) => r.map((x) => x.wallet)) + } + + public onWalletsUpdate(cb: (wallets: Address.Address[]) => void, trigger?: boolean) { + if (!this.walletsDbListener) { + this.walletsDbListener = this.managerDb.addListener(() => { + this.listWallets().then((wallets) => { + this.walletsListeners.forEach((cb) => cb(wallets)) + }) + }) + } + + this.walletsListeners.push(cb) + + if (trigger) { + this.listWallets().then((wallets) => { + cb(wallets) + }) + } + + return () => { + this.removeOnWalletsUpdate(cb) + } + } + + public removeOnWalletsUpdate(cb: (wallets: Address.Address[]) => void) { + this.walletsListeners = this.walletsListeners.filter((x) => x !== cb) + if (this.walletsListeners.length === 0 && this.walletsDbListener) { + this.walletsDbListener() + this.walletsDbListener = undefined + } + } + + private log(...args: any[]) { + if (this.verbose) { + console.log(...args) + } + } + + private async createDevice() { + const e = await this.encryptedPksDb.generateAndStore() + const s = await this.encryptedPksDb.getEncryptedPkStore(e.address) + + if (!s) { + throw new Error('Failed to create session') + } + + this.log('Created new session:', s.address) + return new Signers.Pk.Pk(s) + } + + async create(args: CreateWalletOptions) { + switch (args.kind) { + case 'passkey': + const passkeySigner = await Signers.Passkey.Passkey.create(this.extensions) + + this.log('Created new passkey signer:', passkeySigner.address) + + // Create the first session + const device = await this.createDevice() + + // If the guard is defined, set threshold to 2, if not, set to 1 + const threshold = this.defaultGuardTopology ? 2n : 1n + + // Build the login tree + const loginTopology = buildCappedTree(1n, [passkeySigner.address]) + const devicesTopology = buildCappedTree(1n, [device.address]) + const guardTopology = buildCappedTreeFromTopology(1n, this.defaultGuardTopology) + + // TODO: Add recovery module + // TODO: Add smart sessions module + + // Create initial configuration + const initialConfiguration: Config.Config = { + checkpoint: 0n, + threshold, + topology: Config.flatLeavesToTopology( + [loginTopology, devicesTopology, guardTopology].filter((x) => x !== undefined) as Config.Leaf[], + ), + } + + // Create wallet + const wallet = await CoreWallet.fromConfiguration(initialConfiguration, { + context: this.context, + stateProvider: this.stateProvider, + guest: this.guestModule, + }) + + this.log('Created new sequence wallet:', wallet.address) + + // Sign witness using device signer + await device.witness(this.stateProvider, wallet.address) + + // Sign witness using the passkey signer + await passkeySigner.witness(this.stateProvider, wallet.address) + + // Save entry in the manager db + await this.managerDb.saveWallet({ + wallet: wallet.address, + status: 'logged-in', + loginDate: new Date().toISOString(), + device: device.address, + loginType: 'passkey', + useGuard: args.useGuard || false, + }) + + return wallet.address + default: + throw new Error(`Unsupported wallet kind: ${args.kind}`) + } + } +} diff --git a/packages/wdk/src/wallet/index.ts b/packages/wdk/src/wallet/index.ts new file mode 100644 index 000000000..67eb1b4ca --- /dev/null +++ b/packages/wdk/src/wallet/index.ts @@ -0,0 +1 @@ +export * from './wallet' diff --git a/packages/wdk/src/wallet/wallet.ts b/packages/wdk/src/wallet/wallet.ts new file mode 100644 index 000000000..f1fa986fa --- /dev/null +++ b/packages/wdk/src/wallet/wallet.ts @@ -0,0 +1,18 @@ +import { Address } from 'ox' +import { WalletRow } from '../manager' + +export type Transaction = { + to: Address.Address + value?: bigint + data?: Uint8Array +} + +export class Wallet { + constructor(private readonly row: WalletRow) {} + + address(): string { + return this.row.wallet + } + + async sendTransaction(chainId: bigint, txs: Transaction[]): Promise {} +} From f2291ca51450274b120deba92e34bc3b93556d0b Mon Sep 17 00:00:00 2001 From: Agusx1211 Date: Tue, 18 Mar 2025 18:27:19 +0000 Subject: [PATCH 217/439] Add networks --- packages/primitives/src/index.ts | 1 + packages/primitives/src/network.ts | 25 +++++++++++++++++++++++++ 2 files changed, 26 insertions(+) create mode 100644 packages/primitives/src/network.ts diff --git a/packages/primitives/src/index.ts b/packages/primitives/src/index.ts index 31f0fd05b..4c4a25b5a 100644 --- a/packages/primitives/src/index.ts +++ b/packages/primitives/src/index.ts @@ -12,3 +12,4 @@ export * as Config from './config' export * as Context from './context' export * as Extensions from './extensions/index' export * as GenericTree from './generic-tree' +export * as Network from './network' diff --git a/packages/primitives/src/network.ts b/packages/primitives/src/network.ts new file mode 100644 index 000000000..7e1205eef --- /dev/null +++ b/packages/primitives/src/network.ts @@ -0,0 +1,25 @@ +export type Network = { + name: string + rpc: string + chainId: bigint + explorer: string + nativeCurrency: { + name: string + symbol: string + decimals: number + } +} + +export const Arbitrum: Network = { + name: 'Arbitrum', + rpc: 'https://nodes.sequence.app/arbitrum', + chainId: 42161n, + explorer: 'https://arbiscan.io/', + nativeCurrency: { + name: 'Ether', + symbol: 'ETH', + decimals: 18, + }, +} + +export const All = [Arbitrum] From ffd7f35cdd63f3c39ccf1b1f28ed286baa23d929 Mon Sep 17 00:00:00 2001 From: Agusx1211 Date: Tue, 18 Mar 2025 18:28:22 +0000 Subject: [PATCH 218/439] Rename to build methods --- packages/core/src/wallet.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/core/src/wallet.ts b/packages/core/src/wallet.ts index 09388ecb4..2c307f8fb 100644 --- a/packages/core/src/wallet.ts +++ b/packages/core/src/wallet.ts @@ -86,7 +86,7 @@ export class Wallet { return (await provider.request({ method: 'eth_getCode', params: [this.address, 'pending'] })) !== '0x' } - async getDeployTransaction(): Promise<{ to: Address.Address; data: Hex.Hex }> { + async buildDeployTransaction(): Promise<{ to: Address.Address; data: Hex.Hex }> { const deployInformation = await this.stateProvider.getDeploy(this.address) if (!deployInformation) { throw new Error(`cannot find deploy information for ${this.address}`) @@ -186,7 +186,7 @@ export class Wallet { } } - async getTransaction( + async buildTransaction( provider: Provider.Provider, calls: Payload.Call[], options?: { space?: bigint; trustSigners?: boolean; onSignerError?: Config.SignerErrorCallback }, @@ -220,7 +220,7 @@ export class Wallet { const payload: Payload.Calls = { type: 'call', space, nonce, calls } const [signature, deploy] = await Promise.all([ this.sign(payload, { ...options, provider, skip6492: true }), - this.getDeployTransaction(), + this.buildDeployTransaction(), ]) return { From 590a237841cd15fcea804b8361e9b4ed3eec31a3 Mon Sep 17 00:00:00 2001 From: Michael Standen Date: Wed, 19 Mar 2025 10:41:31 +1300 Subject: [PATCH 219/439] Fix build --- packages/wdk/src/index.ts | 1 - packages/wdk/src/manager/manager.ts | 5 ++--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/packages/wdk/src/index.ts b/packages/wdk/src/index.ts index e0aec2008..cf8dc6b44 100644 --- a/packages/wdk/src/index.ts +++ b/packages/wdk/src/index.ts @@ -2,4 +2,3 @@ export * as Identity from './identity' export * as Session from './session' export * as Manager from './manager/index' export * as Wallet from './wallet/index' -export * as Network from './network' diff --git a/packages/wdk/src/manager/manager.ts b/packages/wdk/src/manager/manager.ts index f4a889d52..9cc88a2df 100644 --- a/packages/wdk/src/manager/manager.ts +++ b/packages/wdk/src/manager/manager.ts @@ -1,9 +1,8 @@ import { Address } from 'ox' -import { Extensions, Context, Config, Constants } from '@0xsequence/sequence-primitives' +import { Extensions, Context, Config, Constants, Network } from '@0xsequence/sequence-primitives' import { Signers, Wallet as CoreWallet, State } from '@0xsequence/sequence-core' import { ManagerDb } from './db' -import { Network } from '..' export type ManagerOptions = { verbose?: boolean @@ -31,7 +30,7 @@ export const ManagerOptionsDefaults = { managerDb: new ManagerDb(), stateProvider: new State.Local.Provider(new State.Local.IndexedDbStore()), - network: Network.Defaults.All, + network: Network.All, defaultGuardTopology: { // TODO: Move this somewhere else From b595f935b6b0674ace4af15f5fa9a7c2a9d5a205 Mon Sep 17 00:00:00 2001 From: Michael Standen Date: Wed, 19 Mar 2025 10:43:41 +1300 Subject: [PATCH 220/439] Add prepush build check --- lefthook.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lefthook.yml b/lefthook.yml index 0e0a9a427..ea15ddc35 100644 --- a/lefthook.yml +++ b/lefthook.yml @@ -3,3 +3,8 @@ pre-commit: prettier: glob: '**/*.{js,jsx,ts,tsx,json,md,yml,yaml}' run: pnpm prettier --write {staged_files} && git add {staged_files} + +pre-push: + commands: + build: + run: pnpm build From fd1638aea1df791c0b31df377056d828316a11a1 Mon Sep 17 00:00:00 2001 From: Michael Standen Date: Wed, 19 Mar 2025 10:48:49 +1300 Subject: [PATCH 221/439] Fix tests --- packages/core/test/session-manager.test.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/core/test/session-manager.test.ts b/packages/core/test/session-manager.test.ts index 892bc07e5..59972b4cb 100644 --- a/packages/core/test/session-manager.test.ts +++ b/packages/core/test/session-manager.test.ts @@ -312,7 +312,7 @@ describe('SessionManager', () => { } // Send the transaction - const transaction = await wallet.getTransaction(provider, [call]) + const transaction = await wallet.buildTransaction(provider, [call]) console.log('transaction', transaction) // Estimate gas with a safety buffer @@ -419,7 +419,7 @@ describe('SessionManager', () => { } // Send the transaction - const transaction = await wallet.getTransaction(provider, [call]) + const transaction = await wallet.buildTransaction(provider, [call]) console.log('transaction', transaction) // Estimate gas with a safety buffer From 832380675818793aa94addffe2962f0285ed4697 Mon Sep 17 00:00:00 2001 From: Michael Standen Date: Wed, 19 Mar 2025 10:49:07 +1300 Subject: [PATCH 222/439] Add tests to prepush hook --- lefthook.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lefthook.yml b/lefthook.yml index ea15ddc35..33fd551ea 100644 --- a/lefthook.yml +++ b/lefthook.yml @@ -8,3 +8,5 @@ pre-push: commands: build: run: pnpm build + test: + run: pnpm test From f76f4928dfff9b0cfd3c76672791a10f3c0f9fc5 Mon Sep 17 00:00:00 2001 From: Agusx1211 Date: Wed, 19 Mar 2025 21:38:03 +0000 Subject: [PATCH 223/439] Basic local relayer --- packages/core/src/index.ts | 1 + packages/core/src/relayer/index.ts | 2 + packages/core/src/relayer/local.ts | 48 +++++++++ packages/core/src/relayer/relayer.ts | 50 ++++++++++ packages/primitives/src/payload.ts | 144 +++++++++++++++++++++++++++ 5 files changed, 245 insertions(+) create mode 100644 packages/core/src/relayer/index.ts create mode 100644 packages/core/src/relayer/local.ts create mode 100644 packages/core/src/relayer/relayer.ts diff --git a/packages/core/src/index.ts b/packages/core/src/index.ts index 37d4f6641..559863f6f 100644 --- a/packages/core/src/index.ts +++ b/packages/core/src/index.ts @@ -2,3 +2,4 @@ export * from './wallet' export * as Signers from './signers' export * as State from './state' +export * as Relayer from './relayer' diff --git a/packages/core/src/relayer/index.ts b/packages/core/src/relayer/index.ts new file mode 100644 index 000000000..576105aef --- /dev/null +++ b/packages/core/src/relayer/index.ts @@ -0,0 +1,2 @@ +export * from './relayer' +export * as Local from './local' diff --git a/packages/core/src/relayer/local.ts b/packages/core/src/relayer/local.ts new file mode 100644 index 000000000..85db0ef74 --- /dev/null +++ b/packages/core/src/relayer/local.ts @@ -0,0 +1,48 @@ +import { AbiFunction, Address, Bytes, Hex } from 'ox' +import { FeeOption, FeeQuote, OperationStatus, Relayer } from './relayer' +import { Constants, Payload } from '@0xsequence/sequence-primitives' + +export interface GenericProvider { + sendTransaction(args: { to: string; data: string }): Promise +} + +export class LocalRelayer implements Relayer { + constructor(public readonly provider: GenericProvider) {} + + feeOptions( + wallet: Address.Address, + chainId: bigint, + calls: Payload.Call[], + ): Promise<{ options: FeeOption[]; quote?: FeeQuote }> { + return Promise.resolve({ options: [] }) + } + + private decodeCalls(data: Hex.Hex): Payload.Calls { + const executeSelector = AbiFunction.getSelector(Constants.EXECUTE) + + let packedPayload + if (data.startsWith(executeSelector)) { + const decode = AbiFunction.decodeData(Constants.EXECUTE, data) + packedPayload = decode[0] + } else { + packedPayload = data + } + + return Payload.decode(Bytes.fromHex(packedPayload)) + } + + async relay(to: Address.Address, data: Hex.Hex, chainId: bigint, _?: FeeQuote): Promise<{ opHash: Hex.Hex }> { + const hash = Payload.hash(to, chainId, this.decodeCalls(data)) + + await this.provider.sendTransaction({ + to, + data, + }) + + return { opHash: Hex.fromBytes(hash) } + } + + status(opHash: Hex.Hex, chainId: bigint): Promise { + throw new Error('Method not implemented.') + } +} diff --git a/packages/core/src/relayer/relayer.ts b/packages/core/src/relayer/relayer.ts new file mode 100644 index 000000000..8e1035fe2 --- /dev/null +++ b/packages/core/src/relayer/relayer.ts @@ -0,0 +1,50 @@ +import { Payload } from '@0xsequence/sequence-primitives' +import { Address, Bytes, Hex } from 'ox' + +export interface FeeOption { + token: Address.Address + to: string + value: string + gasLimit: number +} + +export interface FeeQuote { + _tag: 'FeeQuote' + _quote: unknown +} + +export type OperationUknownStatus = { + status: 'unknown' +} + +export type OperationPendingStatus = { + status: 'pending' +} + +export type OperationConfirmedStatus = { + status: 'confirmed' + transactionHash: Hex.Hex +} + +export type OperationFailedStatus = { + status: 'failed' + reason: string +} + +export type OperationStatus = + | OperationUknownStatus + | OperationPendingStatus + | OperationConfirmedStatus + | OperationFailedStatus + +export interface Relayer { + feeOptions( + wallet: Address.Address, + chainId: bigint, + calls: Payload.Call[], + ): Promise<{ options: FeeOption[]; quote?: FeeQuote }> + + relay(to: Address.Address, data: Hex.Hex, chainId: bigint, quote?: FeeQuote): Promise<{ opHash: Hex.Hex }> + + status(opHash: Hex.Hex, chainId: bigint): Promise +} diff --git a/packages/primitives/src/payload.ts b/packages/primitives/src/payload.ts index 165f55599..4c801fe2f 100644 --- a/packages/primitives/src/payload.ts +++ b/packages/primitives/src/payload.ts @@ -460,3 +460,147 @@ export function hashCall(call: Call): Hex.Hex { ), ) } + +export function decode(packed: Bytes.Bytes, self?: Address.Address): Calls { + let pointer = 0 + if (packed.length < 1) { + throw new Error('Invalid packed data: missing globalFlag') + } + + // Read globalFlag + const globalFlag = Bytes.toNumber(packed.slice(pointer, pointer + 1)) + pointer += 1 + + // bit 0 => spaceZeroFlag + const spaceZeroFlag = (globalFlag & 0x01) === 0x01 + let space = 0n + if (!spaceZeroFlag) { + if (pointer + 20 > packed.length) { + throw new Error('Invalid packed data: not enough bytes for space') + } + space = Bytes.toBigInt(packed.slice(pointer, pointer + 20)) + pointer += 20 + } + + // bits [1..3] => nonceSize + const nonceSize = (globalFlag >> 1) & 0x07 + let nonce = 0n + if (nonceSize > 0) { + if (pointer + nonceSize > packed.length) { + throw new Error('Invalid packed data: not enough bytes for nonce') + } + nonce = Bytes.toBigInt(packed.slice(pointer, pointer + nonceSize)) + pointer += nonceSize + } + + // bit [4] => singleCallFlag + let callsCount = 1 + const singleCallFlag = (globalFlag & 0x10) === 0x10 + if (!singleCallFlag) { + // bit [5] => callsCountSizeFlag => 1 => 2 bytes, 0 => 1 byte + const callsCountSizeFlag = (globalFlag & 0x20) === 0x20 + const countSize = callsCountSizeFlag ? 2 : 1 + if (pointer + countSize > packed.length) { + throw new Error('Invalid packed data: not enough bytes for callsCount') + } + callsCount = Bytes.toNumber(packed.slice(pointer, pointer + countSize)) + pointer += countSize + } + + const calls: Call[] = [] + for (let i = 0; i < callsCount; i++) { + if (pointer + 1 > packed.length) { + throw new Error('Invalid packed data: missing call flags') + } + const flags = Bytes.toNumber(packed.slice(pointer, pointer + 1)) + pointer += 1 + + // bit 0 => toSelf + let to: Address.Address + if ((flags & 0x01) === 0x01) { + if (!self) { + throw new Error('Missing "self" address for toSelf call') + } + to = self + } else { + if (pointer + 20 > packed.length) { + throw new Error('Invalid packed data: not enough bytes for address') + } + to = Bytes.toHex(packed.slice(pointer, pointer + 20)) as Address.Address + pointer += 20 + } + + // bit 1 => hasValue + let value = 0n + if ((flags & 0x02) === 0x02) { + if (pointer + 32 > packed.length) { + throw new Error('Invalid packed data: not enough bytes for value') + } + value = Bytes.toBigInt(packed.slice(pointer, pointer + 32)) + pointer += 32 + } + + // bit 2 => hasData + let data = Bytes.fromHex('0x') + if ((flags & 0x04) === 0x04) { + if (pointer + 3 > packed.length) { + throw new Error('Invalid packed data: not enough bytes for data length') + } + const dataLen = Bytes.toNumber(packed.slice(pointer, pointer + 3)) + pointer += 3 + if (pointer + dataLen > packed.length) { + throw new Error('Invalid packed data: not enough bytes for call data') + } + data = packed.slice(pointer, pointer + dataLen) + pointer += dataLen + } + + // bit 3 => hasGasLimit + let gasLimit = 0n + if ((flags & 0x08) === 0x08) { + if (pointer + 32 > packed.length) { + throw new Error('Invalid packed data: not enough bytes for gasLimit') + } + gasLimit = Bytes.toBigInt(packed.slice(pointer, pointer + 32)) + pointer += 32 + } + + // bits 4..5 => delegateCall, onlyFallback + const delegateCall = (flags & 0x10) === 0x10 + const onlyFallback = (flags & 0x20) === 0x20 + + // bits 6..7 => behaviorOnError + const behaviorCode = (flags & 0xc0) >> 6 + const behaviorOnError = decodeBehaviorOnError(behaviorCode) + + calls.push({ + to, + value, + data, + gasLimit, + delegateCall, + onlyFallback, + behaviorOnError, + }) + } + + return { + type: 'call', + space, + nonce, + calls, + } +} + +export function decodeBehaviorOnError(value: number): Call['behaviorOnError'] { + switch (value) { + case 0: + return 'ignore' + case 1: + return 'revert' + case 2: + return 'abort' + default: + throw new Error(`Invalid behaviorOnError value: ${value}`) + } +} From fc44dcd4c603f5a51876788f5973a1506385e7dc Mon Sep 17 00:00:00 2001 From: Agusx1211 Date: Wed, 19 Mar 2025 21:38:26 +0000 Subject: [PATCH 224/439] WIP Wallet on wdk --- packages/wdk/src/index.ts | 1 - packages/wdk/src/manager/manager.ts | 9 +-- packages/wdk/src/wallet/wallet.ts | 91 +++++++++++++++++++++++++++-- 3 files changed, 91 insertions(+), 10 deletions(-) diff --git a/packages/wdk/src/index.ts b/packages/wdk/src/index.ts index e0aec2008..cf8dc6b44 100644 --- a/packages/wdk/src/index.ts +++ b/packages/wdk/src/index.ts @@ -2,4 +2,3 @@ export * as Identity from './identity' export * as Session from './session' export * as Manager from './manager/index' export * as Wallet from './wallet/index' -export * as Network from './network' diff --git a/packages/wdk/src/manager/manager.ts b/packages/wdk/src/manager/manager.ts index f4a889d52..7cc249d12 100644 --- a/packages/wdk/src/manager/manager.ts +++ b/packages/wdk/src/manager/manager.ts @@ -1,9 +1,8 @@ import { Address } from 'ox' -import { Extensions, Context, Config, Constants } from '@0xsequence/sequence-primitives' -import { Signers, Wallet as CoreWallet, State } from '@0xsequence/sequence-core' +import { Extensions, Context, Config, Constants, Network } from '@0xsequence/sequence-primitives' +import { Signers, Wallet as CoreWallet, State, Relayer } from '@0xsequence/sequence-core' import { ManagerDb } from './db' -import { Network } from '..' export type ManagerOptions = { verbose?: boolean @@ -17,6 +16,7 @@ export type ManagerOptions = { stateProvider?: State.Provider networks?: Network.Network[] + relayers?: Relayer.Relayer[] defaultGuardTopology?: Config.Topology } @@ -31,7 +31,8 @@ export const ManagerOptionsDefaults = { managerDb: new ManagerDb(), stateProvider: new State.Local.Provider(new State.Local.IndexedDbStore()), - network: Network.Defaults.All, + network: Network.All, + relayers: [], // TODO: How to auto-populate local relayer? defaultGuardTopology: { // TODO: Move this somewhere else diff --git a/packages/wdk/src/wallet/wallet.ts b/packages/wdk/src/wallet/wallet.ts index f1fa986fa..ccb24aae3 100644 --- a/packages/wdk/src/wallet/wallet.ts +++ b/packages/wdk/src/wallet/wallet.ts @@ -1,5 +1,7 @@ -import { Address } from 'ox' +import { Address, Hex } from 'ox' import { WalletRow } from '../manager' +import { Relayer } from '@0xsequence/sequence-core' +import { Payload } from '@0xsequence/sequence-primitives' export type Transaction = { to: Address.Address @@ -7,12 +9,91 @@ export type Transaction = { data?: Uint8Array } +export type WalletOptions = { + row: WalletRow + relayers: Relayer.Relayer[] +} + +export type RelayerOption = { + id: string + chainId: bigint + txs: Transaction[] + relayer: Relayer.Relayer + feeOption?: Relayer.FeeOption + quote?: Relayer.FeeQuote +} + export class Wallet { - constructor(private readonly row: WalletRow) {} + constructor(private readonly options: WalletOptions) {} - address(): string { - return this.row.wallet + get address(): Address.Address { + return this.options.row.wallet } - async sendTransaction(chainId: bigint, txs: Transaction[]): Promise {} + async sendTransaction( + chainId: bigint, + txs: Transaction[], + selectRelayer: (feeOptions: RelayerOption[]) => Promise, + confirmCalls: (calls: Payload.Call[]) => Promise, + ): Promise { + const calls = txs.map( + (tx): Payload.Call => ({ + to: tx.to, + value: tx.value ?? 0n, + data: tx.data ?? new Uint8Array(0), + gasLimit: 0n, // TODO: Add gas estimation + delegateCall: false, + onlyFallback: false, + behaviorOnError: 'revert', + }), + ) + + const confirmedCalls = await confirmCalls(calls) + + // We need to check that nothing has changed into `delegateCall: true` + if (confirmedCalls.some((call) => call.delegateCall)) { + throw new Error('Delegate calls are not allowed') + } + + let idTag = Hex.random(8) + let idCounter = 0 + + const allRelayerOptions = await Promise.all( + this.options.relayers.map(async (relayer): Promise => { + const feeOptions = await relayer.feeOptions(this.address, chainId, confirmedCalls) + + if (feeOptions.options.length === 0) { + return [ + { + id: `${idTag}-${(idCounter++).toString()}`, + chainId: chainId, + txs: txs, + relayer: relayer, + } as RelayerOption, + ] + } + + return feeOptions.options.map((feeOption) => ({ + id: `${idTag}-${(idCounter++).toString()}`, + chainId: chainId, + txs: txs, + feeOption: feeOption, + relayer: relayer, + quote: feeOptions.quote, + })) + }), + ) + + const allRelayerOptionsFlat = allRelayerOptions.flat() + if (allRelayerOptionsFlat.length === 0) { + throw new Error('No relayer options found') + } + + const selected = await selectRelayer(allRelayerOptionsFlat) + const found = allRelayerOptionsFlat.find((feeOption) => feeOption.id === selected) + + if (!found) { + throw new Error('Selected fee option not found') + } + } } From 99846e20238b2a3cf95dbea639eda11648954eb1 Mon Sep 17 00:00:00 2001 From: Agusx1211 Date: Thu, 20 Mar 2025 19:26:41 +0000 Subject: [PATCH 225/439] Use envelopes for signing --- packages/core/src/envelope.ts | 67 ++++ packages/core/src/wallet.ts | 333 ++++-------------- packages/primitives/src/config.ts | 194 ---------- packages/primitives/src/payload.ts | 8 +- .../wdk/src/session/session-controller.ts | 43 +-- 5 files changed, 164 insertions(+), 481 deletions(-) create mode 100644 packages/core/src/envelope.ts diff --git a/packages/core/src/envelope.ts b/packages/core/src/envelope.ts new file mode 100644 index 000000000..3705f4759 --- /dev/null +++ b/packages/core/src/envelope.ts @@ -0,0 +1,67 @@ +import { Config, Payload, Signature } from '@0xsequence/sequence-primitives' +import { Address, Bytes } from 'ox' + +export type Envelope = { + wallet: Address.Address + chainId: bigint + configuration: Config.Config + payload: T +} + +export type EnvelopeSignature = { + address: Address.Address + signature: Signature.SignatureOfSignerLeaf +} + +// Address not included as it is included in the signature +export type EnvelopeSapientSignature = { + imageHash: Bytes.Bytes + signature: Signature.SignatureOfSapientSignerLeaf +} + +export function isEnvelopeSignature(sig: any): sig is EnvelopeSignature { + return typeof sig === 'object' && 'address' in sig && 'signature' in sig && !('imageHash' in sig) +} + +export function isEnvelopeSapientSignature(sig: any): sig is EnvelopeSapientSignature { + return typeof sig === 'object' && 'signature' in sig && 'imageHash' in sig +} + +export type SignedEnvelope = Envelope & { + signatures: (EnvelopeSignature | EnvelopeSapientSignature)[] +} + +export function envelopeSignatureForLeaf(envelope: SignedEnvelope, leaf: Config.Leaf) { + if (Config.isSignerLeaf(leaf)) { + return envelope.signatures.find((sig) => isEnvelopeSignature(sig) && sig.address === leaf.address) + } + + if (Config.isSapientSignerLeaf(leaf)) { + return envelope.signatures.find( + (sig) => + isEnvelopeSapientSignature(sig) && sig.imageHash === leaf.imageHash && sig.signature.address === leaf.address, + ) + } + + return undefined +} + +export function weightOf(envelope: SignedEnvelope): { weight: bigint; threshold: bigint } { + const { maxWeight } = Config.getWeight(envelope.configuration, (s) => !!envelopeSignatureForLeaf(envelope, s)) + + return { + weight: maxWeight, + threshold: envelope.configuration.threshold, + } +} + +export function encodeSignature(envelope: SignedEnvelope): Signature.RawSignature { + const topology = Signature.fillLeaves( + envelope.configuration.topology, + (s) => envelopeSignatureForLeaf(envelope, s)?.signature, + ) + return { + noChainId: envelope.chainId === 0n, + configuration: { ...envelope.configuration, topology }, + } +} diff --git a/packages/core/src/wallet.ts b/packages/core/src/wallet.ts index 2c307f8fb..f150eff2f 100644 --- a/packages/core/src/wallet.ts +++ b/packages/core/src/wallet.ts @@ -1,4 +1,4 @@ -import { AbiFunction, Address, Bytes, Hex, PersonalMessage, Provider, Secp256k1 } from 'ox' +import { AbiFunction, Address, Bytes, Hex, Provider } from 'ox' import * as State from './state' import { Constants, @@ -9,7 +9,7 @@ import { Payload, Signature as SequenceSignature, } from '@0xsequence/sequence-primitives' -import { SapientSigner, Signer } from './signers' +import { encodeSignature, Envelope, SignedEnvelope, weightOf } from './envelope' export type WalletOptions = { context: Context.Context @@ -37,10 +37,6 @@ export type WalletStatus = { } export class Wallet { - private readonly signers = new Map() - private readonly sapientSigners = new Map() - private readonly onSignerError?: Config.SignerErrorCallback - public readonly context: Context.Context public readonly guest: Address.Address public readonly stateProvider: State.Provider @@ -62,26 +58,6 @@ export class Wallet { return new Wallet(SequenceAddress.from(configuration, merged.context), merged) } - async setSigner(signer: Signer, isTrusted = false) { - this.signers.set(await signer.address, { signer, isTrusted }) - } - - async setSapientSigner(signer: SapientSigner, isTrusted = false) { - this.sapientSigners.set(this.getSapientKey(await signer.address, await signer.imageHash), { signer, isTrusted }) - } - - private getSapientKey(address: Address.Address, imageHash?: Hex.Hex): string { - return `${address}:${imageHash ?? 'any'}` - } - - removeSigner(address: Address.Address) { - this.signers.delete(address) - } - - removeSapientSigner(address: Address.Address, imageHash?: Hex.Hex) { - this.sapientSigners.delete(this.getSapientKey(address, imageHash)) - } - async isDeployed(provider: Provider.Provider): Promise { return (await provider.request({ method: 'eth_getCode', params: [this.address, 'pending'] })) !== '0x' } @@ -94,13 +70,40 @@ export class Wallet { return Erc6492.deploy(deployInformation.imageHash, deployInformation.context) } - async setConfiguration( - configuration: Config.Config, - options?: { trustSigners?: boolean; onSignerError?: Config.SignerErrorCallback }, - ) { + async prepareUpdate(configuration: Config.Config): Promise> { const imageHash = Config.hashConfiguration(configuration) - const signature = await this.sign(Payload.fromConfigUpdate(Bytes.toHex(imageHash)), options) - await this.stateProvider.saveUpdate(this.address, configuration, signature) + const blankEvelope = ( + await Promise.all([ + this.prepareBlankEnvelope(0n), + // TODO: Add save configuration + this.stateProvider.saveWallet(configuration, this.context), + ]) + )[0] + + return { + ...blankEvelope, + payload: Payload.fromConfigUpdate(Bytes.toHex(imageHash)), + } + } + + async submitUpdate(envelope: SignedEnvelope, provider: Provider.Provider): Promise { + const [status, newConfig] = await Promise.all([ + this.getStatus(provider), + this.stateProvider.getConfiguration(envelope.payload.imageHash), + ]) + + if (!newConfig) { + throw new Error(`cannot find configuration details for ${envelope.payload.imageHash}`) + } + + const updatedEnvelope = { ...envelope, configuration: status.configuration } + const { weight, threshold } = weightOf(updatedEnvelope) + if (weight < threshold) { + throw new Error('insufficient weight in envelope') + } + + const signature = encodeSignature(updatedEnvelope) + await this.stateProvider.saveUpdate(this.address, newConfig, signature) } async getStatus(provider?: Provider.Provider): Promise { @@ -186,42 +189,56 @@ export class Wallet { } } - async buildTransaction( + async prepareTransaction( provider: Provider.Provider, calls: Payload.Call[], - options?: { space?: bigint; trustSigners?: boolean; onSignerError?: Config.SignerErrorCallback }, - ): Promise<{ to: Address.Address; data: Hex.Hex }> { + options?: { space?: bigint }, + ): Promise> { const space = options?.space ?? 0n - - // Use getStatus to check if the wallet is deployed const status = await this.getStatus(provider) + let nonce: bigint = 0n if (status.isDeployed) { - const nonce = BigInt( + nonce = BigInt( await provider.request({ method: 'eth_call', params: [{ to: this.address, data: AbiFunction.encodeData(Constants.READ_NONCE, [space]) }], }), ) + } + + return { + payload: { + type: 'call', + space, + nonce, + calls, + }, + ...(await this.prepareBlankEnvelope(status.chainId ?? 0n)), + } + } + + async buildTransaction(provider: Provider.Provider, envelope: SignedEnvelope) { + const status = await this.getStatus(provider) + + const updatedEnvelope = { ...envelope, configuration: status.configuration } + const { weight, threshold } = weightOf(updatedEnvelope) + if (weight < threshold) { + throw new Error('insufficient weight in envelope') + } - const payload: Payload.Calls = { type: 'call', space, nonce, calls } - const signature = await this.sign(payload, { ...options, provider, skip6492: true }) + const signature = encodeSignature(updatedEnvelope) + if (status.isDeployed) { return { to: this.address, data: AbiFunction.encodeData(Constants.EXECUTE, [ - Bytes.toHex(Payload.encode(payload)), + Bytes.toHex(Payload.encode(envelope.payload)), Bytes.toHex(SequenceSignature.encodeSignature(signature)), ]), } } else { - const nonce = 0n - - const payload: Payload.Calls = { type: 'call', space, nonce, calls } - const [signature, deploy] = await Promise.all([ - this.sign(payload, { ...options, provider, skip6492: true }), - this.buildDeployTransaction(), - ]) + const deploy = await this.buildDeployTransaction() return { to: this.guest, @@ -245,7 +262,7 @@ export class Wallet { value: 0n, data: Hex.toBytes( AbiFunction.encodeData(Constants.EXECUTE, [ - Bytes.toHex(Payload.encode(payload)), + Bytes.toHex(Payload.encode(envelope.payload)), Bytes.toHex(SequenceSignature.encodeSignature(signature)), ]), ), @@ -261,221 +278,13 @@ export class Wallet { } } - async sign( - payload: Payload.Parented, - options?: { - skip6492?: boolean - provider?: Provider.Provider - trustSigners?: boolean - onSignerError?: Config.SignerErrorCallback - }, - ): Promise { - const provider = options?.provider - - // Use getStatus to get the wallet status - const status = await this.getStatus(provider) - - const chainId = status.chainId ?? 0n - - // Get deploy hash if needed for ERC-6492 - let deployHash: { deployHash: Hex.Hex; context: Context.Context } | undefined - if (!status.isDeployed || status.stage === 'stage1') { - const deployInformation = await this.stateProvider.getDeploy(this.address) - if (!deployInformation) { - throw new Error(`cannot find deploy information for ${this.address}`) - } - deployHash = { deployHash: deployInformation.imageHash, context: deployInformation.context } - } - - const configuration = status.configuration - const updates = status.pendingUpdates - - const topology = await Config.sign( - configuration.topology, - { - sign: (leaf) => { - const signer = this.signers.get(leaf.address) - if (!signer) { - throw new Error(`no signer ${leaf.address}`) - } - if (typeof signer.signer.sign !== 'function') { - throw new Error(`${leaf.address} does not implement Signer.sign()`) - } - - const signature = Config.normalizeSignerSignature(signer.signer.sign(this.address, chainId, payload)) - - signature.signature = signature.signature.then((signature) => { - if (signature.type === 'erc1271') { - if (signature.address !== leaf.address) { - throw new Error( - `expected erc-1271 signature by ${leaf.address}, but received signature from ${signature.address}`, - ) - } - if (!provider) { - throw new Error(`erc-1271 signer ${leaf.address} cannot sign for a no-chain-id signature`) - } - } - - return signature - }) - - if (options?.trustSigners === false || (!options?.trustSigners && !signer.isTrusted)) { - signature.signature = signature.signature.then(async (signature) => { - const digest = Payload.hash(this.address, chainId, payload) - - switch (signature.type) { - case 'eth_sign': - case 'hash': - if ( - !Secp256k1.verify({ - payload: signature.type === 'eth_sign' ? PersonalMessage.getSignPayload(digest) : digest, - address: leaf.address, - signature, - }) - ) { - throw new Error(`invalid signature for ${leaf.type} signer ${leaf.address}`) - } - break - - case 'erc1271': - if (!provider) { - throw new Error(`erc-1271 signatures are not valid for no-chain-id signatures`) - } - if ( - (await provider.request({ - method: 'eth_call', - params: [ - { - to: leaf.address, - data: AbiFunction.encodeData(Constants.IS_VALID_SIGNATURE, [ - Bytes.toHex(digest), - Bytes.toHex(signature.data), - ]), - }, - ], - })) !== AbiFunction.getSelector(Constants.IS_VALID_SIGNATURE) - ) { - throw new Error(`invalid signature for erc-1271 signer ${leaf.address}`) - } - break - } - - return signature - }) - } - - return signature - }, - signSapient: (leaf) => { - // If we have a signer for this imageHash, we give it priority - // if not, then we fetch the signer for any imageHash (undefined) - const signer = - this.sapientSigners.get(this.getSapientKey(leaf.address, Hex.fromBytes(leaf.imageHash))) || - this.sapientSigners.get(this.getSapientKey(leaf.address, undefined)) - - if (!signer) { - throw new Error(`no signer ${leaf.address}`) - } - if (typeof signer.signer.signSapient !== 'function') { - throw new Error(`${leaf.address} does not implement Signer.signSapient()`) - } - - const signature = Config.normalizeSignerSignature( - signer.signer.signSapient(this.address, chainId, payload, Bytes.toHex(leaf.imageHash)), - ) - - signature.signature = signature.signature.then((signature) => { - if (signature.address !== leaf.address) { - throw new Error( - `expected sapient signature by ${leaf.address}, but received signature from ${signature.address}`, - ) - } - - return signature - }) - - if (options?.trustSigners === false || (!options?.trustSigners && !signer.isTrusted)) { - signature.signature = signature.signature.then(async (signature) => { - if (!provider) { - throw new Error(`sapient signer ${leaf.address} cannot sign for a no-chain-id signature`) - } - - const digest = Payload.hash(this.address, chainId, payload) - - switch (signature.type) { - case 'sapient': { - const callData = AbiFunction.encodeData(Constants.RECOVER_SAPIENT_SIGNATURE, [ - Payload.encodeSapient(chainId, payload), - Bytes.toHex(signature.data), - ]) - const imageHash = await provider.request({ - method: 'eth_call', - params: [ - { - from: this.address, - to: leaf.address, - data: callData, - }, - ], - }) - if (imageHash !== Bytes.toHex(leaf.imageHash)) { - throw new Error( - `invalid sapient signature for ${leaf.type} signer ${leaf.address}: expected ${leaf.imageHash}, derived ${imageHash}`, - ) - } - break - } - - case 'sapient_compact': { - const imageHash = await provider.request({ - method: 'eth_call', - params: [ - { - to: leaf.address, - data: AbiFunction.encodeData(Constants.RECOVER_SAPIENT_SIGNATURE_COMPACT, [ - Bytes.toHex(digest), - Bytes.toHex(signature.data), - ]), - }, - ], - }) - if (imageHash !== Bytes.toHex(leaf.imageHash)) { - throw new Error( - `invalid sapient signature for ${leaf.type} signer ${leaf.address}: expected ${leaf.imageHash}, derived ${imageHash}`, - ) - } - break - } - } - - return signature - }) - } - - return signature - }, - }, - { - threshold: configuration.threshold, - onSignerError: (leaf, error) => { - options?.onSignerError?.(leaf, error) - this.onSignerError?.(leaf, error) - }, - }, - ) - - const erc6492 = - !status.isDeployed && deployHash && !options?.skip6492 - ? Erc6492.deploy(deployHash.deployHash, deployHash.context) - : undefined + private async prepareBlankEnvelope(chainId: bigint) { + const status = await this.getStatus() return { - noChainId: !chainId, - configuration: { ...configuration, topology }, - suffix: updates.map(({ signature }) => signature), - erc6492: erc6492 && { ...erc6492, data: Hex.toBytes(erc6492.data) }, + wallet: this.address, + chainId: chainId, + configuration: status.configuration, } } } - -type Unpromise = T extends Promise ? S : T diff --git a/packages/primitives/src/config.ts b/packages/primitives/src/config.ts index ad06a67a0..4e0a3a108 100644 --- a/packages/primitives/src/config.ts +++ b/packages/primitives/src/config.ts @@ -386,200 +386,6 @@ function decodeTopology(obj: any): Topology { } } -export function sign( - topology: RawTopology, - signers: { - sign?: (signer: SignerLeaf) => SignerSignature - signSapient?: (signer: SapientSignerLeaf) => SignerSignature - }, - options?: { threshold?: bigint; onSignerError?: SignerErrorCallback }, - internal?: { - signatures?: Map> - cancelled?: Set - }, -): Promise { - const copy = (topology: T): T => { - if (isSignerLeaf(topology)) { - return { ...topology } - } else if (isSapientSignerLeaf(topology)) { - return { ...topology } - } else if (isSubdigestLeaf(topology)) { - return topology - } else if (isAnyAddressSubdigestLeaf(topology)) { - return topology - } else if (isNodeLeaf(topology)) { - return topology - } else if (isRawSignerLeaf(topology)) { - return topology - } else if (isRawNestedLeaf(topology)) { - return { ...topology, tree: copy(topology.tree) } - } else { - return [copy(topology[0]), copy(topology[1])] as T - } - } - topology = copy(topology) - - return new Promise((resolve, reject) => { - const signatures: Map< - Hex.Hex, - Promise - > = internal?.signatures ?? new Map() - const cancelled: Set = internal?.cancelled ?? new Set() - - const signerSignatureCallbacks: SignerSignatureCallback[] = [] - const cancelCallbacks: CancelCallback[] = [] - - let done = false - const check = () => { - if (done) { - return - } - - const { weight, maxWeight } = getWeight(topology, (leaf) => { - if (isSignerLeaf(leaf)) { - if (signers.sign === undefined) { - return false - } - } else { - if (signers.signSapient === undefined) { - return false - } - } - - if (cancelled.has(Bytes.toHex(hashConfiguration(leaf)))) { - return false - } - - return true - }) - - if (options?.threshold !== undefined) { - if (weight >= options.threshold) { - cancelCallbacks.forEach((callback) => callback(true)) - cancelCallbacks.length = 0 - signerSignatureCallbacks.length = 0 - done = true - resolve(topology) - } else if (maxWeight < options.threshold) { - cancelCallbacks.forEach((callback) => callback(false)) - cancelCallbacks.length = 0 - signerSignatureCallbacks.length = 0 - done = true - reject(new Error(`unable to meet threshold ${options.threshold}`)) - } - } else if (weight === maxWeight) { - cancelCallbacks.forEach((callback) => callback(true)) - cancelCallbacks.length = 0 - signerSignatureCallbacks.length = 0 - done = true - resolve(topology) - } - } - - const onSignerSignature = - (signer: SignerLeaf | SapientSignerLeaf) => (signature: SignatureOfSignerLeaf | SignatureOfSapientSignerLeaf) => { - if (done) { - return - } - - signer.signed = true - signer.signature = signature - - signerSignatureCallbacks.forEach((callback) => callback(topology)) - - check() - } - - const onSignerError = (signer: SignerLeaf | SapientSignerLeaf) => (error: any) => { - if (done) { - return - } - - options?.onSignerError?.(signer, error) - - cancelled.add(Bytes.toHex(hashConfiguration(signer))) - - check() - } - - const search = async (topology: RawTopology) => { - if (isSignerLeaf(topology)) { - const imageHash = Bytes.toHex(hashConfiguration(topology)) - - const signature = - signatures.get(imageHash) ?? - (() => { - const signature = signers.sign?.(topology) - if (!signature) { - return Promise.reject(new Error(`no signer for ${topology.address}`)) - } - const normalized = normalizeSignerSignature(signature) - - signatures.set(imageHash, normalized.signature) - - if (normalized.onSignerSignature) { - signerSignatureCallbacks.push(normalized.onSignerSignature) - } - if (normalized.onCancel) { - cancelCallbacks.push(normalized.onCancel) - } - - return normalized.signature - })() - - signature.then(onSignerSignature(topology)).catch(onSignerError(topology)) - } else if (isSapientSignerLeaf(topology)) { - const imageHash = Bytes.toHex(hashConfiguration(topology)) - - const signature = - signatures.get(imageHash) ?? - (() => { - const signature = signers.signSapient?.(topology) - if (!signature) { - return Promise.reject(new Error(`no sapient signer for ${topology.address}`)) - } - const normalized = normalizeSignerSignature(signature) - - signatures.set(imageHash, normalized.signature) - - if (normalized.onSignerSignature) { - signerSignatureCallbacks.push(normalized.onSignerSignature) - } - if (normalized.onCancel) { - cancelCallbacks.push(normalized.onCancel) - } - - return normalized.signature - })() - - signature.then(onSignerSignature(topology)).catch(onSignerError(topology)) - } else if (isSubdigestLeaf(topology)) { - return - } else if (isAnyAddressSubdigestLeaf(topology)) { - return - } else if (isNodeLeaf(topology)) { - return - } else if (isRawSignerLeaf(topology)) { - return - } else if (isRawNestedLeaf(topology)) { - try { - topology.tree = await sign( - topology.tree, - signers, - { ...options, threshold: topology.threshold }, - { signatures: signatures, cancelled: cancelled }, - ) - } catch {} - check() - } else { - search(topology[0]) - search(topology[1]) - } - } - search(topology) - }) -} - export type SignerSignature = [T] extends [Promise] ? never : MaybePromise | { signature: Promise; onSignerSignature?: SignerSignatureCallback; onCancel?: CancelCallback } diff --git a/packages/primitives/src/payload.ts b/packages/primitives/src/payload.ts index 4c801fe2f..506db2414 100644 --- a/packages/primitives/src/payload.ts +++ b/packages/primitives/src/payload.ts @@ -55,28 +55,28 @@ export type TypedDataToSign = { message: Record } -export function fromMessage(message: Bytes.Bytes): Payload { +export function fromMessage(message: Bytes.Bytes): Message { return { type: 'message', message, } } -export function fromConfigUpdate(imageHash: Hex.Hex): Payload { +export function fromConfigUpdate(imageHash: Hex.Hex): ConfigUpdate { return { type: 'config-update', imageHash, } } -export function fromDigest(digest: Hex.Hex): Payload { +export function fromDigest(digest: Hex.Hex): Digest { return { type: 'digest', digest, } } -export function fromCall(nonce: bigint, space: bigint, calls: Call[]): Payload { +export function fromCall(nonce: bigint, space: bigint, calls: Call[]): Calls { return { type: 'call', nonce, diff --git a/packages/wdk/src/session/session-controller.ts b/packages/wdk/src/session/session-controller.ts index 828c7816a..cf368607b 100644 --- a/packages/wdk/src/session/session-controller.ts +++ b/packages/wdk/src/session/session-controller.ts @@ -115,33 +115,34 @@ export class SessionController { // Update the configuration to use the new topology private async updateConfiguration(topology: SessionConfig.SessionsTopology): Promise { - // Remove the old manager from the wallet - this._wallet.removeSapientSigner(this._manager.address, this._manager.imageHash) + throw new Error('TODO: re-implemented') + // // Remove the old manager from the wallet + // // this._wallet.removeSapientSigner(this._manager.address, this._manager.imageHash) - // Update the manager with the new topology - this._manager = this._manager.withTopology(topology) + // // Update the manager with the new topology + // this._manager = this._manager.withTopology(topology) - // Store the new configuration - await this._stateProvider?.saveTree(SessionConfig.sessionsTopologyToConfigurationTree(topology)) + // // Store the new configuration + // await this._stateProvider?.saveTree(SessionConfig.sessionsTopologyToConfigurationTree(topology)) - // Add the new manager to the wallet - this._wallet.setSapientSigner(this._manager, true) + // // Add the new manager to the wallet + // // this._wallet.setSapientSigner(this._manager, true) - // Get the old wallet configuration - const status = await this._wallet.getStatus() - const oldConfiguration = status.configuration + // // Get the old wallet configuration + // const status = await this._wallet.getStatus() + // const oldConfiguration = status.configuration - // Find the session manager in the old configuration - const managerLeaf = Config.findSignerLeaf(oldConfiguration, this._manager.address) - if (!managerLeaf || !Config.isSapientSignerLeaf(managerLeaf)) { - // FIXME: Just add it? - throw new Error('Session manager not found in configuration') - } + // // Find the session manager in the old configuration + // const managerLeaf = Config.findSignerLeaf(oldConfiguration, this._manager.address) + // if (!managerLeaf || !Config.isSapientSignerLeaf(managerLeaf)) { + // // FIXME: Just add it? + // throw new Error('Session manager not found in configuration') + // } - // Update the configuration to use the new session manager image hash - managerLeaf.imageHash = this.imageHash + // // Update the configuration to use the new session manager image hash + // managerLeaf.imageHash = this.imageHash - // Update the wallet configuration - await this._wallet.setConfiguration(oldConfiguration) + // // Update the wallet configuration + // // await this._wallet.setConfiguration(oldConfiguration) } } From 95cb75d084dc6e55eab5ccc61134482f25e90acd Mon Sep 17 00:00:00 2001 From: Agusx1211 Date: Thu, 20 Mar 2025 19:37:14 +0000 Subject: [PATCH 226/439] Use envelope namespace --- packages/core/src/envelope.ts | 27 +++++++++++++-------------- packages/core/src/index.ts | 1 + packages/core/src/wallet.ts | 18 +++++++++--------- 3 files changed, 23 insertions(+), 23 deletions(-) diff --git a/packages/core/src/envelope.ts b/packages/core/src/envelope.ts index 3705f4759..8583e1989 100644 --- a/packages/core/src/envelope.ts +++ b/packages/core/src/envelope.ts @@ -8,46 +8,45 @@ export type Envelope = { payload: T } -export type EnvelopeSignature = { +export type Signature = { address: Address.Address signature: Signature.SignatureOfSignerLeaf } // Address not included as it is included in the signature -export type EnvelopeSapientSignature = { +export type SapientSignature = { imageHash: Bytes.Bytes signature: Signature.SignatureOfSapientSignerLeaf } -export function isEnvelopeSignature(sig: any): sig is EnvelopeSignature { +export function isSignature(sig: any): sig is Signature { return typeof sig === 'object' && 'address' in sig && 'signature' in sig && !('imageHash' in sig) } -export function isEnvelopeSapientSignature(sig: any): sig is EnvelopeSapientSignature { +export function isSapientSignature(sig: any): sig is SapientSignature { return typeof sig === 'object' && 'signature' in sig && 'imageHash' in sig } -export type SignedEnvelope = Envelope & { - signatures: (EnvelopeSignature | EnvelopeSapientSignature)[] +export type Signed = Envelope & { + signatures: (Signature | SapientSignature)[] } -export function envelopeSignatureForLeaf(envelope: SignedEnvelope, leaf: Config.Leaf) { +export function signatureForLeaf(envelope: Signed, leaf: Config.Leaf) { if (Config.isSignerLeaf(leaf)) { - return envelope.signatures.find((sig) => isEnvelopeSignature(sig) && sig.address === leaf.address) + return envelope.signatures.find((sig) => isSignature(sig) && sig.address === leaf.address) } if (Config.isSapientSignerLeaf(leaf)) { return envelope.signatures.find( - (sig) => - isEnvelopeSapientSignature(sig) && sig.imageHash === leaf.imageHash && sig.signature.address === leaf.address, + (sig) => isSapientSignature(sig) && sig.imageHash === leaf.imageHash && sig.signature.address === leaf.address, ) } return undefined } -export function weightOf(envelope: SignedEnvelope): { weight: bigint; threshold: bigint } { - const { maxWeight } = Config.getWeight(envelope.configuration, (s) => !!envelopeSignatureForLeaf(envelope, s)) +export function weightOf(envelope: Signed): { weight: bigint; threshold: bigint } { + const { maxWeight } = Config.getWeight(envelope.configuration, (s) => !!signatureForLeaf(envelope, s)) return { weight: maxWeight, @@ -55,10 +54,10 @@ export function weightOf(envelope: SignedEnvelope): { weight: b } } -export function encodeSignature(envelope: SignedEnvelope): Signature.RawSignature { +export function encodeSignature(envelope: Signed): Signature.RawSignature { const topology = Signature.fillLeaves( envelope.configuration.topology, - (s) => envelopeSignatureForLeaf(envelope, s)?.signature, + (s) => signatureForLeaf(envelope, s)?.signature, ) return { noChainId: envelope.chainId === 0n, diff --git a/packages/core/src/index.ts b/packages/core/src/index.ts index 559863f6f..2cadc4a0d 100644 --- a/packages/core/src/index.ts +++ b/packages/core/src/index.ts @@ -3,3 +3,4 @@ export * from './wallet' export * as Signers from './signers' export * as State from './state' export * as Relayer from './relayer' +export * as Envelope from './envelope' diff --git a/packages/core/src/wallet.ts b/packages/core/src/wallet.ts index f150eff2f..932c2ff60 100644 --- a/packages/core/src/wallet.ts +++ b/packages/core/src/wallet.ts @@ -9,7 +9,7 @@ import { Payload, Signature as SequenceSignature, } from '@0xsequence/sequence-primitives' -import { encodeSignature, Envelope, SignedEnvelope, weightOf } from './envelope' +import * as Envelope from './envelope' export type WalletOptions = { context: Context.Context @@ -70,7 +70,7 @@ export class Wallet { return Erc6492.deploy(deployInformation.imageHash, deployInformation.context) } - async prepareUpdate(configuration: Config.Config): Promise> { + async prepareUpdate(configuration: Config.Config): Promise> { const imageHash = Config.hashConfiguration(configuration) const blankEvelope = ( await Promise.all([ @@ -86,7 +86,7 @@ export class Wallet { } } - async submitUpdate(envelope: SignedEnvelope, provider: Provider.Provider): Promise { + async submitUpdate(envelope: Envelope.Signed, provider: Provider.Provider): Promise { const [status, newConfig] = await Promise.all([ this.getStatus(provider), this.stateProvider.getConfiguration(envelope.payload.imageHash), @@ -97,12 +97,12 @@ export class Wallet { } const updatedEnvelope = { ...envelope, configuration: status.configuration } - const { weight, threshold } = weightOf(updatedEnvelope) + const { weight, threshold } = Envelope.weightOf(updatedEnvelope) if (weight < threshold) { throw new Error('insufficient weight in envelope') } - const signature = encodeSignature(updatedEnvelope) + const signature = Envelope.encodeSignature(updatedEnvelope) await this.stateProvider.saveUpdate(this.address, newConfig, signature) } @@ -193,7 +193,7 @@ export class Wallet { provider: Provider.Provider, calls: Payload.Call[], options?: { space?: bigint }, - ): Promise> { + ): Promise> { const space = options?.space ?? 0n const status = await this.getStatus(provider) @@ -218,16 +218,16 @@ export class Wallet { } } - async buildTransaction(provider: Provider.Provider, envelope: SignedEnvelope) { + async buildTransaction(provider: Provider.Provider, envelope: Envelope.Signed) { const status = await this.getStatus(provider) const updatedEnvelope = { ...envelope, configuration: status.configuration } - const { weight, threshold } = weightOf(updatedEnvelope) + const { weight, threshold } = Envelope.weightOf(updatedEnvelope) if (weight < threshold) { throw new Error('insufficient weight in envelope') } - const signature = encodeSignature(updatedEnvelope) + const signature = Envelope.encodeSignature(updatedEnvelope) if (status.isDeployed) { return { From 90cb7671cacb1e3f2f4b77bbb26a0141762ccd82 Mon Sep 17 00:00:00 2001 From: Michael Standen Date: Fri, 21 Mar 2025 13:28:29 +1300 Subject: [PATCH 227/439] Fix large blacklist support --- .../primitives-cli/src/subcommands/server.ts | 4 +- .../primitives-cli/src/subcommands/session.ts | 50 +++++++++---------- packages/primitives/src/session-config.ts | 11 ++-- 3 files changed, 34 insertions(+), 31 deletions(-) diff --git a/packages/primitives-cli/src/subcommands/server.ts b/packages/primitives-cli/src/subcommands/server.ts index 4f5969155..0ec54f075 100644 --- a/packages/primitives-cli/src/subcommands/server.ts +++ b/packages/primitives-cli/src/subcommands/server.ts @@ -126,9 +126,9 @@ const rpcMethods: Record Promise> = { const result = await session.doEmptyTopology(identitySigner) return result }, - async session_encodeConfiguration(params) { + async session_encodeTopology(params) { const { sessionTopology } = params - const result = await session.doEncodeConfiguration(JSON.stringify(sessionTopology)) + const result = await session.doEncodeTopology(JSON.stringify(sessionTopology)) return result }, async session_encodeCallSignatures(params) { diff --git a/packages/primitives-cli/src/subcommands/session.ts b/packages/primitives-cli/src/subcommands/session.ts index 96679e8ed..70b9693fb 100644 --- a/packages/primitives-cli/src/subcommands/session.ts +++ b/packages/primitives-cli/src/subcommands/session.ts @@ -10,33 +10,33 @@ export async function doEmptyTopology(identitySigner: `0x${string}`): Promise { - const sessionConfiguration = SessionConfig.sessionsTopologyFromJson(sessionConfigurationInput) - const configurationTree = SessionConfig.sessionsTopologyToConfigurationTree(sessionConfiguration) - return JSON.stringify(configurationTree) +export async function doEncodeTopology(sessionTopologyInput: string): Promise { + const sessionTopology = SessionConfig.sessionsTopologyFromJson(sessionTopologyInput) + const encoded = SessionConfig.encodeSessionsTopology(sessionTopology) + return Hex.from(encoded) } export async function doEncodeSessionCallSignatures( - sessionConfigurationInput: string, + sessionTopologyInput: string, callSignaturesInput: string[], explicitSigners: string[] = [], implicitSigners: string[] = [], ): Promise { - const sessionConfiguration = SessionConfig.sessionsTopologyFromJson(sessionConfigurationInput) + const sessionTopology = SessionConfig.sessionsTopologyFromJson(sessionTopologyInput) const callSignatures = callSignaturesInput.map((s) => SessionSignature.sessionCallSignatureFromJson(s)) const encoded = SessionSignature.encodeSessionCallSignatures( callSignatures, - sessionConfiguration, + sessionTopology, explicitSigners as `0x${string}`[], implicitSigners as `0x${string}`[], ) return Hex.from(encoded) } -export async function doImageHash(sessionConfigurationInput: string): Promise { - const sessionConfiguration = SessionConfig.sessionsTopologyFromJson(sessionConfigurationInput) - const configurationTree = SessionConfig.sessionsTopologyToConfigurationTree(sessionConfiguration) - const hash = GenericTree.hash(configurationTree) +export async function doImageHash(sessionTopologyInput: string): Promise { + const sessionTopology = SessionConfig.sessionsTopologyFromJson(sessionTopologyInput) + const encoded = SessionConfig.encodeSessionsTopology(sessionTopology) + const hash = GenericTree.hash(encoded) return Hex.from(hash) } @@ -61,27 +61,27 @@ const sessionCommand: CommandModule = { }, ) .command( - 'encode-configuration [session-configuration]', - 'Encode a session configuration', + 'encode-topology [session-topology]', + 'Encode a session topology', (yargs) => { - return yargs.positional('session-configuration', { + return yargs.positional('session-topology', { type: 'string', - description: 'The session configuration', + description: 'The session topology', demandOption: true, }) }, async (args) => { - console.log(await doEncodeConfiguration(args.sessionConfiguration)) + console.log(await doEncodeTopology(args.sessionTopology)) }, ) .command( - 'encode-calls [session-configuration] [call-signatures] [explicit-signers] [implicit-signers]', + 'encode-calls [session-topology] [call-signatures] [explicit-signers] [implicit-signers]', 'Encode a call signature for an implicit session', (yargs) => { return yargs - .positional('session-configuration', { + .positional('session-topology', { type: 'string', - description: 'The session configuration', + description: 'The session topology', demandOption: true, }) .positional('call-signatures', { @@ -110,7 +110,7 @@ const sessionCommand: CommandModule = { async (args) => { console.log( await doEncodeSessionCallSignatures( - args.sessionConfiguration, + args.sessionTopology, args.callSignatures, args.explicitSigners, args.implicitSigners, @@ -119,17 +119,17 @@ const sessionCommand: CommandModule = { }, ) .command( - 'image-hash [session-configuration]', - 'Hash a session configuration', + 'image-hash [session-topology]', + 'Hash a session topology', (yargs) => { - return yargs.positional('session-configuration', { + return yargs.positional('session-topology', { type: 'string', - description: 'The session configuration', + description: 'The session topology', demandOption: true, }) }, async (args) => { - console.log(await doImageHash(args.sessionConfiguration)) + console.log(await doImageHash(args.sessionTopology)) }, ) .command(sessionExplicitCommand) diff --git a/packages/primitives/src/session-config.ts b/packages/primitives/src/session-config.ts index 9cc7a36cc..66635b686 100644 --- a/packages/primitives/src/session-config.ts +++ b/packages/primitives/src/session-config.ts @@ -313,12 +313,15 @@ export function encodeSessionsTopology(topology: SessionsTopology): Bytes.Bytes if (isImplicitBlacklist(topology)) { const encoded = Bytes.concat(...topology.blacklist.map((b) => Bytes.fromHex(b))) - if (topology.blacklist.length > 14) { + if (topology.blacklist.length >= 0x0f) { // If the blacklist is too large, we can't encode the length into the flag byte. - // Instead we encode 0xff and the length in the next byte. + // Instead we encode 0x0f and the length in the next 2 bytes. + if (topology.blacklist.length > 0xffff) { + throw new Error('Blacklist too large') + } return Bytes.concat( - Bytes.fromNumber((SESSIONS_FLAG_BLACKLIST << 4) | 0xff), - Bytes.fromNumber(topology.blacklist.length), + Bytes.fromNumber((SESSIONS_FLAG_BLACKLIST << 4) | 0x0f), + Bytes.fromNumber(topology.blacklist.length, { size: 2 }), encoded, ) } From a31c59411f7ccc8cb45b2363187133fd63799a35 Mon Sep 17 00:00:00 2001 From: Michael Standen Date: Fri, 21 Mar 2025 13:44:26 +1300 Subject: [PATCH 228/439] Fix session image hash --- packages/primitives-cli/src/subcommands/session.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/primitives-cli/src/subcommands/session.ts b/packages/primitives-cli/src/subcommands/session.ts index 70b9693fb..e15a7955e 100644 --- a/packages/primitives-cli/src/subcommands/session.ts +++ b/packages/primitives-cli/src/subcommands/session.ts @@ -35,7 +35,7 @@ export async function doEncodeSessionCallSignatures( export async function doImageHash(sessionTopologyInput: string): Promise { const sessionTopology = SessionConfig.sessionsTopologyFromJson(sessionTopologyInput) - const encoded = SessionConfig.encodeSessionsTopology(sessionTopology) + const encoded = SessionConfig.sessionsTopologyToConfigurationTree(sessionTopology) const hash = GenericTree.hash(encoded) return Hex.from(hash) } From a60daa5a080213f7da8a12096f185cda5dac0bf8 Mon Sep 17 00:00:00 2001 From: Agusx1211 Date: Fri, 21 Mar 2025 18:52:28 +0000 Subject: [PATCH 229/439] WIP wdk --- packages/core/src/envelope.ts | 71 +++++++ packages/core/src/relayer/local.ts | 2 + packages/core/src/relayer/relayer.ts | 2 + packages/core/src/wallet.ts | 1 - packages/wdk/package.json | 3 +- packages/wdk/src/dbs/index.ts | 157 ++++++++++++++ packages/wdk/src/dbs/manager.ts | 17 ++ packages/wdk/src/dbs/signatures.ts | 19 ++ packages/wdk/src/dbs/transactions.ts | 49 +++++ packages/wdk/src/index.ts | 1 - packages/wdk/src/manager/db.ts | 172 ---------------- packages/wdk/src/manager/devices.ts | 21 ++ packages/wdk/src/manager/index.ts | 1 - packages/wdk/src/manager/logger.ts | 9 + packages/wdk/src/manager/manager.ts | 237 +++++++--------------- packages/wdk/src/manager/signatures.ts | 38 ++++ packages/wdk/src/manager/transactions.ts | 160 +++++++++++++++ packages/wdk/src/manager/wallets.ts | 168 +++++++++++++++ packages/wdk/src/signers/DeviceSigner.ts | 41 ++++ packages/wdk/src/signers/PasskeySigner.ts | 42 ++++ packages/wdk/src/signers/signer.ts | 31 +++ packages/wdk/src/wallet/index.ts | 1 - packages/wdk/src/wallet/wallet.ts | 99 --------- pnpm-lock.yaml | 9 + 24 files changed, 913 insertions(+), 438 deletions(-) create mode 100644 packages/wdk/src/dbs/index.ts create mode 100644 packages/wdk/src/dbs/manager.ts create mode 100644 packages/wdk/src/dbs/signatures.ts create mode 100644 packages/wdk/src/dbs/transactions.ts delete mode 100644 packages/wdk/src/manager/db.ts create mode 100644 packages/wdk/src/manager/devices.ts create mode 100644 packages/wdk/src/manager/logger.ts create mode 100644 packages/wdk/src/manager/signatures.ts create mode 100644 packages/wdk/src/manager/transactions.ts create mode 100644 packages/wdk/src/manager/wallets.ts create mode 100644 packages/wdk/src/signers/DeviceSigner.ts create mode 100644 packages/wdk/src/signers/PasskeySigner.ts create mode 100644 packages/wdk/src/signers/signer.ts delete mode 100644 packages/wdk/src/wallet/index.ts delete mode 100644 packages/wdk/src/wallet/wallet.ts diff --git a/packages/core/src/envelope.ts b/packages/core/src/envelope.ts index 8583e1989..222631125 100644 --- a/packages/core/src/envelope.ts +++ b/packages/core/src/envelope.ts @@ -64,3 +64,74 @@ export function encodeSignature(envelope: Signed): Signature.Ra configuration: { ...envelope.configuration, topology }, } } + +export function toSigned( + envelope: Envelope, + signatures: (Signature | SapientSignature)[] = [], +): Signed { + return { + ...envelope, + signatures, + } +} + +export function addSignature( + envelope: Signed, + signature: Signature | SapientSignature, + args?: { replace?: boolean }, +) { + if (isSapientSignature(signature)) { + // Find if the signature already exists in envelope + const prev = envelope.signatures.find( + (sig) => + isSapientSignature(sig) && + sig.signature.address === signature.signature.address && + sig.imageHash === signature.imageHash, + ) as SapientSignature | undefined + + if (prev) { + // If the signatures are identical, then we can do nothing + if (prev.signature.data === signature.signature.data) { + return + } + + // If not and we are replacing, then remove the previous signature + if (args?.replace) { + envelope.signatures = envelope.signatures.filter((sig) => sig !== prev) + } else { + throw new Error('Signature already defined for signer') + } + } + + envelope.signatures.push(signature) + } else if (isSignature(signature)) { + // Find if the signature already exists in envelope + const prev = envelope.signatures.find((sig) => isSignature(sig) && sig.address === signature.address) as + | Signature + | undefined + + if (prev) { + // If the signatures are identical, then we can do nothing + if (prev.signature.type === 'erc1271' && signature.signature.type === 'erc1271') { + if (prev.signature.data === signature.signature.data) { + return + } + } else if (prev.signature.type !== 'erc1271' && signature.signature.type !== 'erc1271') { + if (prev.signature.r === signature.signature.r && prev.signature.s === signature.signature.s) { + return + } + } + + // If not and we are replacing, then remove the previous signature + if (args?.replace) { + envelope.signatures = envelope.signatures.filter((sig) => sig !== prev) + } else { + throw new Error('Signature already defined for signer') + } + } + + envelope.signatures.push(signature) + } else { + throw new Error('Unsupported signature type') + } +} diff --git a/packages/core/src/relayer/local.ts b/packages/core/src/relayer/local.ts index 85db0ef74..c570cc44b 100644 --- a/packages/core/src/relayer/local.ts +++ b/packages/core/src/relayer/local.ts @@ -7,6 +7,8 @@ export interface GenericProvider { } export class LocalRelayer implements Relayer { + public readonly id = 'local' + constructor(public readonly provider: GenericProvider) {} feeOptions( diff --git a/packages/core/src/relayer/relayer.ts b/packages/core/src/relayer/relayer.ts index 8e1035fe2..c27d22891 100644 --- a/packages/core/src/relayer/relayer.ts +++ b/packages/core/src/relayer/relayer.ts @@ -38,6 +38,8 @@ export type OperationStatus = | OperationFailedStatus export interface Relayer { + id: string + feeOptions( wallet: Address.Address, chainId: bigint, diff --git a/packages/core/src/wallet.ts b/packages/core/src/wallet.ts index 932c2ff60..96eab61b2 100644 --- a/packages/core/src/wallet.ts +++ b/packages/core/src/wallet.ts @@ -14,7 +14,6 @@ import * as Envelope from './envelope' export type WalletOptions = { context: Context.Context stateProvider: State.Provider - onSignerError?: Config.SignerErrorCallback guest: Address.Address } diff --git a/packages/wdk/package.json b/packages/wdk/package.json index 28f0fe9b4..2d9016430 100644 --- a/packages/wdk/package.json +++ b/packages/wdk/package.json @@ -27,6 +27,7 @@ "@0xsequence/sequence-primitives": "workspace:^", "idb": "^7.1.1", "jwt-decode": "^4.0.0", - "ox": "^0.6.7" + "ox": "^0.6.7", + "uuid": "^11.1.0" } } diff --git a/packages/wdk/src/dbs/index.ts b/packages/wdk/src/dbs/index.ts new file mode 100644 index 000000000..c8556bf00 --- /dev/null +++ b/packages/wdk/src/dbs/index.ts @@ -0,0 +1,157 @@ +export * from './manager' +export * from './signatures' +export * from './transactions' + +export type DbUpdateType = 'added' | 'updated' | 'removed' + +export type DbUpdateListener = ( + keyValue: T[K], + updateType: DbUpdateType, + oldItem?: T, + newItem?: T, +) => void + +export type Migration = (db: IDBDatabase, transaction: IDBTransaction, event: IDBVersionChangeEvent) => void + +export class Generic { + private _db: IDBDatabase | null = null + private listeners: DbUpdateListener[] = [] + private broadcastChannel?: BroadcastChannel + + /** + * @param dbName The name of the IndexedDB database. + * @param storeName The name of the object store. + * @param key The property key in T to be used as the primary key. + * @param migrations An array of migration functions; the database version is migrations.length + 1. + */ + constructor( + private dbName: string, + private storeName: string, + private key: K, + private migrations: Migration[] = [], + ) { + if (typeof BroadcastChannel !== 'undefined') { + this.broadcastChannel = new BroadcastChannel(this.dbName + '-observer') + this.broadcastChannel.onmessage = (event) => { + if (event.data && event.data.keyValue !== undefined && event.data.updateType) { + this.listeners.forEach((cb) => + cb(event.data.keyValue, event.data.updateType, event.data.oldItem, event.data.newItem), + ) + } + } + } + } + + private async openDB(): Promise { + if (this._db) return this._db + + return new Promise((resolve, reject) => { + const version = this.migrations.length + 1 + const request = indexedDB.open(this.dbName, version) + + request.onupgradeneeded = (event) => { + const db = request.result + const tx = request.transaction! + const oldVersion = (event.oldVersion as number) || 0 + for (let i = oldVersion; i < this.migrations.length; i++) { + const migration = this.migrations[i] + if (!migration) throw new Error(`Migration ${i} not found`) + migration(db, tx, event) + } + } + + request.onsuccess = () => { + this._db = request.result + resolve(this._db) + } + + request.onerror = () => reject(request.error) + request.onblocked = () => console.error('Database upgrade blocked') + }) + } + + private async getStore(mode: IDBTransactionMode): Promise { + const db = await this.openDB() + const tx = db.transaction(this.storeName, mode) + return tx.objectStore(this.storeName) + } + + async get(keyValue: T[K]): Promise { + const store = await this.getStore('readonly') + return new Promise((resolve, reject) => { + const req = store.get(keyValue) + req.onsuccess = () => resolve(req.result as T) + req.onerror = () => reject(req.error) + }) + } + + async list(): Promise { + const store = await this.getStore('readonly') + return new Promise((resolve, reject) => { + const req = store.getAll() + req.onsuccess = () => resolve(req.result as T[]) + req.onerror = () => reject(req.error) + }) + } + + async set(item: T): Promise { + const store = await this.getStore('readwrite') + const keyValue = item[this.key] + const oldItem = await this.get(keyValue) + return new Promise((resolve, reject) => { + const req = store.put(item) + req.onsuccess = () => { + let updateType: DbUpdateType | null = null + if (!oldItem) { + updateType = 'added' + } else if (JSON.stringify(oldItem) !== JSON.stringify(item)) { + updateType = 'updated' + } + if (updateType) { + try { + this.notifyUpdate(keyValue, updateType, oldItem, item) + } catch (err) { + console.error('notifyUpdate failed', err) + } + } + resolve(keyValue) + } + req.onerror = () => reject(req.error) + }) + } + + async del(keyValue: T[K]): Promise { + const oldItem = await this.get(keyValue) + const store = await this.getStore('readwrite') + return new Promise((resolve, reject) => { + const req = store.delete(keyValue) + req.onsuccess = () => { + if (oldItem) { + try { + this.notifyUpdate(keyValue, 'removed', oldItem, undefined) + } catch (err) { + console.error('notifyUpdate failed', err) + } + } + resolve() + } + req.onerror = () => reject(req.error) + }) + } + + private notifyUpdate(keyValue: T[K], updateType: DbUpdateType, oldItem?: T, newItem?: T): void { + this.listeners.forEach((listener) => listener(keyValue, updateType, oldItem, newItem)) + if (this.broadcastChannel) { + this.broadcastChannel.postMessage({ keyValue, updateType, oldItem, newItem }) + } + } + + addListener(listener: DbUpdateListener): () => void { + this.listeners.push(listener) + return () => this.removeListener(listener) + } + + removeListener(listener: DbUpdateListener): void { + this.listeners = this.listeners.filter((l) => l !== listener) + } +} diff --git a/packages/wdk/src/dbs/manager.ts b/packages/wdk/src/dbs/manager.ts new file mode 100644 index 000000000..d73e2f1df --- /dev/null +++ b/packages/wdk/src/dbs/manager.ts @@ -0,0 +1,17 @@ +import { Address } from 'ox' +import { Generic } from '.' + +export interface WalletRow { + wallet: Address.Address + status: string + loginDate: string + device: Address.Address + loginType: string + useGuard: boolean +} + +export class Manager extends Generic { + constructor(dbName: string = 'sequence-manager') { + super(dbName, 'wallets', 'wallet') + } +} diff --git a/packages/wdk/src/dbs/signatures.ts b/packages/wdk/src/dbs/signatures.ts new file mode 100644 index 000000000..e8e90b111 --- /dev/null +++ b/packages/wdk/src/dbs/signatures.ts @@ -0,0 +1,19 @@ +import { Address } from 'ox' +import { Payload } from '@0xsequence/sequence-primitives' +import { Envelope } from '@0xsequence/sequence-core' +import { Generic } from '.' + +export type SignatureRequest = { + id: string + wallet: Address.Address + envelope: Envelope.Signed + origin: string + reason: string + status: 'pending' | 'done' | 'rejected' +} + +export class Signatures extends Generic { + constructor(dbName: string = 'sequence-signature-requests') { + super(dbName, 'envelopes', 'id') + } +} diff --git a/packages/wdk/src/dbs/transactions.ts b/packages/wdk/src/dbs/transactions.ts new file mode 100644 index 000000000..32d206c2f --- /dev/null +++ b/packages/wdk/src/dbs/transactions.ts @@ -0,0 +1,49 @@ +import { Address } from 'ox' +import { Payload } from '@0xsequence/sequence-primitives' +import { Relayer, Envelope } from '@0xsequence/sequence-core' +import { Generic } from '.' + +export type TransactionRequest = { + to: Address.Address + value?: bigint + data?: Uint8Array + gasLimit?: bigint +} + +export type RelayerOption = { + id: string + relayerId: string + feeOption?: Relayer.FeeOption + quote?: Relayer.FeeQuote +} + +export type EnvelopeStatus = 'requested' | 'defined' | 'formed' + +type TransactionBase = { + id: string + wallet: Address.Address + requests: TransactionRequest[] + source: string + envelope: Envelope.Envelope +} + +export type TransactionRequestedRow = TransactionBase & { + status: 'requested' +} + +export type TransactionDefinedRow = TransactionBase & { + status: 'defined' +} + +export type TransactionFormedRow = TransactionBase & { + relayerOption: RelayerOption + status: 'formed' +} + +export type TransactionRow = TransactionRequestedRow | TransactionDefinedRow | TransactionFormedRow + +export class Transactions extends Generic { + constructor(dbName: string = 'sequence-transactions') { + super(dbName, 'transactions', 'id') + } +} diff --git a/packages/wdk/src/index.ts b/packages/wdk/src/index.ts index cf8dc6b44..dfc684e5a 100644 --- a/packages/wdk/src/index.ts +++ b/packages/wdk/src/index.ts @@ -1,4 +1,3 @@ export * as Identity from './identity' export * as Session from './session' export * as Manager from './manager/index' -export * as Wallet from './wallet/index' diff --git a/packages/wdk/src/manager/db.ts b/packages/wdk/src/manager/db.ts deleted file mode 100644 index cedb4b746..000000000 --- a/packages/wdk/src/manager/db.ts +++ /dev/null @@ -1,172 +0,0 @@ -import { Address } from 'ox' - -const DB_VERSION = 2 -const WALLETS_TABLE = 'wallets' - -export interface WalletRow { - wallet: Address.Address - status: string - loginDate: string - device: Address.Address - loginType: string - useGuard: boolean -} - -export type WalletUpdateType = 'added' | 'removed' | 'updated' - -export type WalletUpdateListener = ( - wallet: Address.Address, - updateType: WalletUpdateType, - oldRow?: WalletRow, - newRow?: WalletRow, -) => void - -export class ManagerDb { - private _db: IDBDatabase | null = null - private dbName: string - private listeners: WalletUpdateListener[] = [] - private broadcastChannel?: BroadcastChannel - - constructor(dbName: string = 'sequence-manager') { - this.dbName = dbName - - if (typeof BroadcastChannel !== 'undefined') { - this.broadcastChannel = new BroadcastChannel(this.dbName + '-manager') - this.broadcastChannel.onmessage = (event) => { - if (event.data && event.data.type && event.data.wallet) { - this.listeners.forEach((cb) => cb(event.data.wallet, event.data.type, event.data.oldRow, event.data.newRow)) - } - } - } - } - - private async openDB(): Promise { - if (this._db) return this._db - - return new Promise((resolve, reject) => { - const request = indexedDB.open(this.dbName, DB_VERSION) - - request.onupgradeneeded = () => { - const db = request.result - if (!db.objectStoreNames.contains(WALLETS_TABLE)) { - db.createObjectStore(WALLETS_TABLE, { keyPath: 'wallet' }) - } - } - - request.onsuccess = () => { - this._db = request.result - resolve(this._db!) - } - - request.onerror = () => { - reject(request.error) - } - - request.onblocked = () => { - console.error('db blocked') - } - }) - } - - private async getStore(mode: IDBTransactionMode = 'readonly'): Promise { - const db = await this.openDB() - const tx = db.transaction(WALLETS_TABLE, mode) - return tx.objectStore(WALLETS_TABLE) - } - - private notifyUpdate( - wallet: Address.Address, - updateType: WalletUpdateType, - oldRow?: WalletRow, - newRow?: WalletRow, - ): void { - this.listeners.forEach((cb) => cb(wallet, updateType, oldRow, newRow)) - if (this.broadcastChannel) { - this.broadcastChannel.postMessage({ - type: updateType, - wallet, - oldRow, - newRow, - }) - } - } - - addListener(listener: WalletUpdateListener): () => void { - this.listeners.push(listener) - return () => { - this.removeListener(listener) - } - } - - removeListener(listener: WalletUpdateListener): void { - this.listeners = this.listeners.filter((l) => l !== listener) - } - - async listWallets(): Promise { - const store = await this.getStore('readonly') - return new Promise((resolve, reject) => { - const req = store.getAll() - req.onsuccess = () => { - resolve(req.result as WalletRow[]) - } - req.onerror = () => reject(req.error) - }) - } - - async getWallet(wallet: Address.Address): Promise { - const store = await this.getStore('readonly') - return new Promise((resolve, reject) => { - const req = store.get(wallet.toLowerCase()) - req.onsuccess = () => resolve(req.result) - req.onerror = () => reject(req.error) - }) - } - - async deleteWallet(wallet: Address.Address): Promise { - const existing = await this.getWallet(wallet) - const store = await this.getStore('readwrite') - return new Promise((resolve, reject) => { - const req = store.delete(wallet.toLowerCase()) - req.onsuccess = () => { - resolve() - if (existing) { - try { - this.notifyUpdate(wallet, 'removed', existing, undefined) - } catch (err) { - console.error('notifyUpdate failed', err) - } - } - } - req.onerror = () => reject(req.error) - }) - } - - async saveWallet(row: WalletRow): Promise { - const old = await this.getWallet(row.wallet) - const store = await this.getStore('readwrite') - const normalizedRow = { ...row, wallet: row.wallet.toLowerCase() } as WalletRow - - return new Promise((resolve, reject) => { - const req = store.put(normalizedRow) - - req.onsuccess = () => { - resolve() - let updateType: WalletUpdateType | null = null - if (!old) { - updateType = 'added' - } else if (JSON.stringify(old) !== JSON.stringify(normalizedRow)) { - updateType = 'updated' - } - if (updateType) { - try { - this.notifyUpdate(row.wallet, updateType, old, normalizedRow) - } catch (err) { - console.error('notifyUpdate failed', err) - } - } - } - - req.onerror = () => reject(req.error) - }) - } -} diff --git a/packages/wdk/src/manager/devices.ts b/packages/wdk/src/manager/devices.ts new file mode 100644 index 000000000..98267e71f --- /dev/null +++ b/packages/wdk/src/manager/devices.ts @@ -0,0 +1,21 @@ +import { Signers } from '@0xsequence/sequence-core' +import { Logger } from './logger' + +export class Devices { + constructor( + private readonly logger: Logger, + private readonly encryptedPksDb: Signers.Pk.Encrypted.EncryptedPksDb, + ) {} + + async create() { + const e = await this.encryptedPksDb.generateAndStore() + const s = await this.encryptedPksDb.getEncryptedPkStore(e.address) + + if (!s) { + throw new Error('Failed to create session') + } + + this.logger.log('Created new session:', s.address) + return new Signers.Pk.Pk(s) + } +} diff --git a/packages/wdk/src/manager/index.ts b/packages/wdk/src/manager/index.ts index 641c23e84..0f1b5674a 100644 --- a/packages/wdk/src/manager/index.ts +++ b/packages/wdk/src/manager/index.ts @@ -1,2 +1 @@ -export * from './db' export * from './manager' diff --git a/packages/wdk/src/manager/logger.ts b/packages/wdk/src/manager/logger.ts new file mode 100644 index 000000000..d634372ab --- /dev/null +++ b/packages/wdk/src/manager/logger.ts @@ -0,0 +1,9 @@ +export class Logger { + constructor(public readonly verbose: boolean) {} + + log(...args: any[]) { + if (this.verbose) { + console.log(...args) + } + } +} diff --git a/packages/wdk/src/manager/manager.ts b/packages/wdk/src/manager/manager.ts index 7cc249d12..d11abac1c 100644 --- a/packages/wdk/src/manager/manager.ts +++ b/packages/wdk/src/manager/manager.ts @@ -1,8 +1,20 @@ -import { Address } from 'ox' - -import { Extensions, Context, Config, Constants, Network } from '@0xsequence/sequence-primitives' -import { Signers, Wallet as CoreWallet, State, Relayer } from '@0xsequence/sequence-core' -import { ManagerDb } from './db' +import { Address, Provider } from 'ox' + +import { Extensions, Context, Config, Constants, Network, Payload } from '@0xsequence/sequence-primitives' +import { Signers, Wallet as CoreWallet, State, Relayer, Wallet } from '@0xsequence/sequence-core' +import * as Db from '../dbs' +import { v7 as uuidv7 } from 'uuid' +import { Logger } from './logger' +import { Devices } from './devices' +import { CreateWalletOptions, Wallets } from './wallets' +import { Transactions } from './transactions' +import { Signatures } from './signatures' + +export type Transaction = { + to: Address.Address + value?: bigint + data?: Uint8Array +} export type ManagerOptions = { verbose?: boolean @@ -12,7 +24,9 @@ export type ManagerOptions = { guest?: Address.Address encryptedPksDb?: Signers.Pk.Encrypted.EncryptedPksDb - managerDb?: ManagerDb + managerDb?: Db.Manager + transactionsDb?: Db.Transactions + signaturesDb?: Db.Signatures stateProvider?: State.Provider networks?: Network.Network[] @@ -27,11 +41,14 @@ export const ManagerOptionsDefaults = { extensions: Extensions.Dev1, context: Context.Dev1, guest: Constants.DefaultGuest, + encryptedPksDb: new Signers.Pk.Encrypted.EncryptedPksDb(), - managerDb: new ManagerDb(), + managerDb: new Db.Manager(), + signaturesDb: new Db.Signatures(), + transactionsDb: new Db.Transactions(), stateProvider: new State.Local.Provider(new State.Local.IndexedDbStore()), - network: Network.All, + networks: Network.All, relayers: [], // TODO: How to auto-populate local relayer? defaultGuardTopology: { @@ -42,11 +59,6 @@ export const ManagerOptionsDefaults = { } as Config.SignerLeaf, } -export type CreateWalletOptions = { - kind: 'passkey' - useGuard?: boolean -} - export const CreateWalletOptionsDefaults = { useGuard: false, } @@ -55,48 +67,6 @@ export function applyDefaults(options?: ManagerOptions) { return { ...ManagerOptionsDefaults, ...options } } -function buildCappedTreeFromTopology(weight: bigint, topology: Config.Topology): Config.Topology { - // We may optimize this for some topology types - // but it is not worth it, because the topology - // that we will use for prod won't be optimizable - return { - type: 'nested', - weight: weight, - threshold: weight, - tree: topology, - } -} - -function buildCappedTree(weight: bigint, members: Address.Address[]): Config.Topology { - const loginMemberWeight = 1n - - if (members.length === 0) { - throw new Error('Cannot build login tree with no members') - } - - if (members.length === 1) { - return { - type: 'signer', - address: members[0], - weight: loginMemberWeight, - } as Config.SignerLeaf - } - - // Limit their total signing power - return { - type: 'nested', - weight: loginMemberWeight, - threshold: 1n, - tree: Config.flatLeavesToTopology( - members.map((member) => ({ - type: 'signer', - address: member, - weight: 1n, - })), - ), - } as Config.NestedLeaf -} - export class Manager { public readonly verbose: boolean @@ -105,14 +75,16 @@ export class Manager { public readonly guestModule: Address.Address public readonly stateProvider: State.Provider + public readonly networks: Network.Network[] + public readonly relayers: Relayer.Relayer[] private readonly encryptedPksDb private readonly managerDb + private readonly signaturesDb + private readonly transactionsDb public readonly defaultGuardTopology: Config.Topology - - private walletsDbListener: (() => void) | undefined - private walletsListeners: ((wallets: Address.Address[]) => void)[] = [] + private readonly modules constructor(options?: ManagerOptions) { const ops = applyDefaults(options) @@ -124,118 +96,59 @@ export class Manager { this.guestModule = ops.guest this.encryptedPksDb = ops.encryptedPksDb this.managerDb = ops.managerDb - } - - public async listWallets(): Promise { - return this.managerDb.listWallets().then((r) => r.map((x) => x.wallet)) - } - - public onWalletsUpdate(cb: (wallets: Address.Address[]) => void, trigger?: boolean) { - if (!this.walletsDbListener) { - this.walletsDbListener = this.managerDb.addListener(() => { - this.listWallets().then((wallets) => { - this.walletsListeners.forEach((cb) => cb(wallets)) - }) - }) - } - - this.walletsListeners.push(cb) - - if (trigger) { - this.listWallets().then((wallets) => { - cb(wallets) - }) - } - - return () => { - this.removeOnWalletsUpdate(cb) + this.signaturesDb = ops.signaturesDb + this.transactionsDb = ops.transactionsDb + this.networks = ops.networks + this.relayers = ops.relayers + + const logger = new Logger(this.verbose) + const devices = new Devices(logger, this.encryptedPksDb) + const wallets = new Wallets( + logger, + devices, + this.managerDb, + this.extensions, + this.context, + this.defaultGuardTopology, + this.stateProvider, + this.guestModule, + ) + const signatures = new Signatures(this.signaturesDb, this.networks, this.stateProvider) + const transactions = new Transactions( + signatures, + this.transactionsDb, + this.networks, + this.stateProvider, + this.relayers, + ) + + this.modules = { + logger, + devices, + wallets, + signatures, + transactions, } } - public removeOnWalletsUpdate(cb: (wallets: Address.Address[]) => void) { - this.walletsListeners = this.walletsListeners.filter((x) => x !== cb) - if (this.walletsListeners.length === 0 && this.walletsDbListener) { - this.walletsDbListener() - this.walletsDbListener = undefined - } + public async createWallet(options: CreateWalletOptions) { + return this.modules.wallets.create(options) } - private log(...args: any[]) { - if (this.verbose) { - console.log(...args) - } + public async listWallets() { + return this.modules.wallets.list() } - private async createDevice() { - const e = await this.encryptedPksDb.generateAndStore() - const s = await this.encryptedPksDb.getEncryptedPkStore(e.address) - - if (!s) { - throw new Error('Failed to create session') - } - - this.log('Created new session:', s.address) - return new Signers.Pk.Pk(s) + public async hasWallet(address: Address.Address) { + return this.modules.wallets.exists(address) } - async create(args: CreateWalletOptions) { - switch (args.kind) { - case 'passkey': - const passkeySigner = await Signers.Passkey.Passkey.create(this.extensions) - - this.log('Created new passkey signer:', passkeySigner.address) - - // Create the first session - const device = await this.createDevice() - - // If the guard is defined, set threshold to 2, if not, set to 1 - const threshold = this.defaultGuardTopology ? 2n : 1n - - // Build the login tree - const loginTopology = buildCappedTree(1n, [passkeySigner.address]) - const devicesTopology = buildCappedTree(1n, [device.address]) - const guardTopology = buildCappedTreeFromTopology(1n, this.defaultGuardTopology) - - // TODO: Add recovery module - // TODO: Add smart sessions module - - // Create initial configuration - const initialConfiguration: Config.Config = { - checkpoint: 0n, - threshold, - topology: Config.flatLeavesToTopology( - [loginTopology, devicesTopology, guardTopology].filter((x) => x !== undefined) as Config.Leaf[], - ), - } - - // Create wallet - const wallet = await CoreWallet.fromConfiguration(initialConfiguration, { - context: this.context, - stateProvider: this.stateProvider, - guest: this.guestModule, - }) - - this.log('Created new sequence wallet:', wallet.address) - - // Sign witness using device signer - await device.witness(this.stateProvider, wallet.address) - - // Sign witness using the passkey signer - await passkeySigner.witness(this.stateProvider, wallet.address) - - // Save entry in the manager db - await this.managerDb.saveWallet({ - wallet: wallet.address, - status: 'logged-in', - loginDate: new Date().toISOString(), - device: device.address, - loginType: 'passkey', - useGuard: args.useGuard || false, - }) - - return wallet.address - default: - throw new Error(`Unsupported wallet kind: ${args.kind}`) - } + public async requestTransaction( + from: Address.Address, + chainId: bigint, + txs: Db.TransactionRequest[], + options?: { skipDefineGas?: boolean; source?: string }, + ) { + return this.modules.transactions.request(from, chainId, txs, options) } } diff --git a/packages/wdk/src/manager/signatures.ts b/packages/wdk/src/manager/signatures.ts new file mode 100644 index 000000000..afc9c5a8a --- /dev/null +++ b/packages/wdk/src/manager/signatures.ts @@ -0,0 +1,38 @@ +import { Address, Provider } from 'ox' +import * as Db from '../dbs' +import { Network, Payload } from '@0xsequence/sequence-primitives' +import { Envelope, State, Wallet } from '@0xsequence/sequence-core' +import { v7 as uuidv7 } from 'uuid' + +export class Signatures { + constructor( + private readonly signaturesDb: Db.Signatures, + private readonly networks: Network.Network[], + private readonly stateProvider: State.Provider, + ) {} + + async list(): Promise { + return this.signaturesDb.list() + } + + async request( + envelope: Envelope.Envelope, + options: { + origin?: string + reason?: string + }, + ): Promise { + const id = uuidv7() + + await this.signaturesDb.set({ + id, + wallet: envelope.wallet, + envelope: Envelope.toSigned(envelope), + origin: options.origin ?? 'unknown', + reason: options.reason ?? 'unknown', + status: 'pending', + }) + + return id + } +} diff --git a/packages/wdk/src/manager/transactions.ts b/packages/wdk/src/manager/transactions.ts new file mode 100644 index 000000000..96fd54ca3 --- /dev/null +++ b/packages/wdk/src/manager/transactions.ts @@ -0,0 +1,160 @@ +import { Network, Payload } from '@0xsequence/sequence-primitives' +import * as Db from '../dbs' +import { Relayer, State, Wallet } from '@0xsequence/sequence-core' +import { Address, Provider } from 'ox' +import { v7 as uuidv7 } from 'uuid' +import { Signatures } from './signatures' + +export class Transactions { + constructor( + private readonly signatures: Signatures, + private readonly transactionsDb: Db.Transactions, + private readonly networks: Network.Network[], + private readonly stateProvider: State.Provider, + private readonly relayers: Relayer.Relayer[], + ) {} + + public async list(): Promise { + return this.transactionsDb.list() + } + + async request( + from: Address.Address, + chainId: bigint, + txs: Db.TransactionRequest[], + options?: { + skipDefineGas?: boolean + source?: string + }, + ): Promise { + const network = this.networks.find((network) => network.chainId === chainId) + if (!network) { + throw new Error(`Network not found for ${chainId}`) + } + + const provider = Provider.from(network.rpc) + const wallet = new Wallet(from, { stateProvider: this.stateProvider }) + + const calls = txs.map( + (tx): Payload.Call => ({ + to: tx.to, + value: tx.value ?? 0n, + data: tx.data ?? new Uint8Array(0), + gasLimit: tx.gasLimit ?? 0n, // TODO: Add gas estimation + delegateCall: false, + onlyFallback: false, + behaviorOnError: 'revert', + }), + ) + + const envelope = await wallet.prepareTransaction(provider, calls) + + const id = uuidv7() + await this.transactionsDb.set({ + id, + wallet: from, + requests: txs, + envelope, + source: options?.source ?? 'unknown', + status: 'requested', + }) + + return id + } + + async define( + transactionId: string, + changes?: { + nonce?: bigint + space?: bigint + calls?: Pick[] + }, + ): Promise { + const tx = await this.transactionsDb.get(transactionId) + if (!tx) { + throw new Error(`Transaction ${transactionId} not found`) + } + + if (tx.status !== 'requested') { + throw new Error(`Transaction ${transactionId} is not in the requested state`) + } + + // Modify the envelope with the changes + if (changes?.nonce) { + tx.envelope.payload.nonce = changes.nonce + } + + if (changes?.space) { + tx.envelope.payload.space = changes.space + } + + if (changes?.calls) { + if (changes.calls.length !== tx.envelope.payload.calls.length) { + throw new Error(`Invalid number of calls for transaction ${transactionId}`) + } + + for (let i = 0; i < changes.calls.length; i++) { + tx.envelope.payload.calls[i]!.gasLimit = changes.calls[i]!.gasLimit + } + } + + await this.transactionsDb.set({ + ...tx, + status: 'defined', + }) + } + + async selectRelayer( + transactionId: string, + selectRelayer: (relayerOptions: Db.RelayerOption[]) => Promise, + ): Promise { + const tx = await this.transactionsDb.get(transactionId) + if (!tx) { + throw new Error(`Transaction ${transactionId} not found`) + } + + if (tx.status !== 'defined') { + throw new Error(`Transaction ${transactionId} is not in the defined state`) + } + + // Obtain the relayer options for the next stage + const allRelayerOptions = await Promise.all( + this.relayers.map(async (relayer): Promise => { + const feeOptions = await relayer.feeOptions(tx.wallet, tx.envelope.chainId, tx.envelope.payload.calls) + + if (feeOptions.options.length === 0) { + return [ + { + id: uuidv7(), + relayerId: relayer.id, + } as Db.RelayerOption, + ] + } + + return feeOptions.options.map((feeOption) => ({ + id: uuidv7(), + feeOption: feeOption, + relayerId: relayer.id, + quote: feeOptions.quote, + })) + }), + ) + + const selection = await selectRelayer(allRelayerOptions.flat()) + if (!selection) { + return + } + + await this.transactionsDb.set({ + ...tx, + relayerOption: selection, + status: 'formed', + }) + + // Pass to the signatures manager + return this.signatures.request(tx.envelope, { + origin: tx.source, + reason: 'transaction', + }) + } +} diff --git a/packages/wdk/src/manager/wallets.ts b/packages/wdk/src/manager/wallets.ts new file mode 100644 index 000000000..6e6628f77 --- /dev/null +++ b/packages/wdk/src/manager/wallets.ts @@ -0,0 +1,168 @@ +import { Logger } from './logger' +import * as Db from '../dbs' +import { Address } from 'ox' +import { Signers, State, Wallet } from '@0xsequence/sequence-core' +import { Config, Context, Extensions } from '@0xsequence/sequence-primitives' +import { Devices } from './devices' + +export type CreateWalletOptions = { + kind: 'passkey' + useGuard?: boolean +} + +function buildCappedTree(members: Address.Address[]): Config.Topology { + const loginMemberWeight = 1n + + if (members.length === 0) { + throw new Error('Cannot build login tree with no members') + } + + if (members.length === 1) { + return { + type: 'signer', + address: members[0], + weight: loginMemberWeight, + } as Config.SignerLeaf + } + + // Limit their total signing power + return { + type: 'nested', + weight: loginMemberWeight, + threshold: 1n, + tree: Config.flatLeavesToTopology( + members.map((member) => ({ + type: 'signer', + address: member, + weight: 1n, + })), + ), + } as Config.NestedLeaf +} + +function buildCappedTreeFromTopology(weight: bigint, topology: Config.Topology): Config.Topology { + // We may optimize this for some topology types + // but it is not worth it, because the topology + // that we will use for prod won't be optimizable + return { + type: 'nested', + weight: weight, + threshold: weight, + tree: topology, + } +} + +export class Wallets { + private walletsDbListener: (() => void) | undefined + private walletsListeners: ((wallets: Address.Address[]) => void)[] = [] + + constructor( + private readonly logger: Logger, + private readonly devices: Devices, + private readonly managerDb: Db.Manager, + private readonly extensions: Extensions.Extensions, + private readonly context: Context.Context, + private readonly defaultGuardTopology: Config.Topology, + private readonly stateProvider: State.Provider, + private readonly guestModule: Address.Address, + ) {} + + public async exists(wallet: Address.Address): Promise { + return this.managerDb.get(wallet).then((r) => r !== undefined) + } + + public async list(): Promise { + return this.managerDb.list().then((r) => r.map((x) => x.wallet)) + } + + public onWalletsUpdate(cb: (wallets: Address.Address[]) => void, trigger?: boolean) { + if (!this.walletsDbListener) { + this.walletsDbListener = this.managerDb.addListener(() => { + this.list().then((wallets) => { + this.walletsListeners.forEach((cb) => cb(wallets)) + }) + }) + } + + this.walletsListeners.push(cb) + + if (trigger) { + this.list().then((wallets) => { + cb(wallets) + }) + } + + return () => { + this.removeOnWalletsUpdate(cb) + } + } + + public removeOnWalletsUpdate(cb: (wallets: Address.Address[]) => void) { + this.walletsListeners = this.walletsListeners.filter((x) => x !== cb) + if (this.walletsListeners.length === 0 && this.walletsDbListener) { + this.walletsDbListener() + this.walletsDbListener = undefined + } + } + + async create(args: CreateWalletOptions) { + switch (args.kind) { + case 'passkey': + const passkeySigner = await Signers.Passkey.Passkey.create(this.extensions) + + this.logger.log('Created new passkey signer:', passkeySigner.address) + + // Create the first session + const device = await this.devices.create() + + // If the guard is defined, set threshold to 2, if not, set to 1 + const threshold = this.defaultGuardTopology ? 2n : 1n + + // Build the login tree + const loginTopology = buildCappedTree([passkeySigner.address]) + const devicesTopology = buildCappedTree([device.address]) + const guardTopology = buildCappedTreeFromTopology(1n, this.defaultGuardTopology) + + // TODO: Add recovery module + // TODO: Add smart sessions module + + // Create initial configuration + const initialConfiguration: Config.Config = { + checkpoint: 0n, + threshold, + topology: Config.flatLeavesToTopology( + [loginTopology, devicesTopology, guardTopology].filter((x) => x !== undefined) as Config.Leaf[], + ), + } + + // Create wallet + const wallet = await Wallet.fromConfiguration(initialConfiguration, { + context: this.context, + stateProvider: this.stateProvider, + guest: this.guestModule, + }) + + this.logger.log('Created new sequence wallet:', wallet.address) + + // Sign witness using device signer + await device.witness(this.stateProvider, wallet.address) + + // Sign witness using the passkey signer + await passkeySigner.witness(this.stateProvider, wallet.address) + + // Save entry in the manager db + await this.managerDb.set({ + wallet: wallet.address, + status: 'logged-in', + loginDate: new Date().toISOString(), + device: device.address, + loginType: 'passkey', + useGuard: args.useGuard || false, + }) + + return wallet.address + default: + throw new Error(`Unsupported wallet kind: ${args.kind}`) + } + } +} diff --git a/packages/wdk/src/signers/DeviceSigner.ts b/packages/wdk/src/signers/DeviceSigner.ts new file mode 100644 index 000000000..134802c82 --- /dev/null +++ b/packages/wdk/src/signers/DeviceSigner.ts @@ -0,0 +1,41 @@ +import { Envelope, Signers } from '@0xsequence/sequence-core' +import { InteractiveSigner, InteractiveSignerStatus } from './signer' +import * as Db from '../dbs' +import { Address } from 'ox' + +export class DeviceSigner implements InteractiveSigner { + address: Address.Address + + constructor(private readonly innerSigner: Signers.Pk.Pk) { + this.address = this.innerSigner.address + } + + icon(): string { + return 'device' + } + + label(): string { + return 'Device (TODO add deterministic name)' + } + + prepare(_request: Db.SignatureRequest): void { + // NO-OP + } + + async sign(request: Db.SignatureRequest): Promise { + const ie = request.envelope + const signature = await this.innerSigner.sign(ie.wallet, ie.chainId, ie.payload) + return { + address: this.address, + signature, + } + } + + status(_requestId?: string): InteractiveSignerStatus { + return { + // TODO: Handle localisation + message: 'Device is ready to sign', + status: 'ready', + } + } +} diff --git a/packages/wdk/src/signers/PasskeySigner.ts b/packages/wdk/src/signers/PasskeySigner.ts new file mode 100644 index 000000000..a539f8441 --- /dev/null +++ b/packages/wdk/src/signers/PasskeySigner.ts @@ -0,0 +1,42 @@ +import { Envelope, Signers } from '@0xsequence/sequence-core' +import { InteractiveSigner, InteractiveSignerStatus } from './signer' +import * as Db from '../dbs' +import { Address, Bytes } from 'ox' + +export class PasskeySigner implements InteractiveSigner { + address: Address.Address + + constructor(private readonly innerSigner: Signers.Passkey.Passkey) { + this.address = this.innerSigner.address + } + + icon(): string { + return 'passkey' + } + + label(): string { + return `Passkey - ${this.innerSigner.metadata?.name || 'Unknown'}` + } + + prepare(_request: Db.SignatureRequest): void { + // NO-OP + } + + async sign(request: Db.SignatureRequest): Promise { + const ie = request.envelope + const ih = this.innerSigner.imageHash + const signature = await this.innerSigner.signSapient(ie.wallet, ie.chainId, ie.payload, ih) + return { + imageHash: Bytes.from(ih), + signature, + } + } + + status(_requestId?: string): InteractiveSignerStatus { + return { + // TODO: Handle localisation + message: 'Request interaction with passkey', + status: 'ready', + } + } +} diff --git a/packages/wdk/src/signers/signer.ts b/packages/wdk/src/signers/signer.ts new file mode 100644 index 000000000..73c14a9d0 --- /dev/null +++ b/packages/wdk/src/signers/signer.ts @@ -0,0 +1,31 @@ +import { Envelope } from '@0xsequence/sequence-core' +import * as Db from '../dbs' +import { Address, Hex } from 'ox' + +export type InteractiveSignerStatus = { + message: string + + // ready: the signer is ready to sign, without user interaction + // actionable: the signer is ready to sign, but requires user interaction + // unavailable: the signer is not available to sign + status: 'ready' | 'actionable' | 'unavailable' +} + +export interface InteractiveSigner { + address: Address.Address + imageHash?: Hex.Hex | undefined + + // Icon and text for the signing options screen + icon(): string + label(): string + + // Tells the signer to prepare for signing a given request + prepare(request: Db.SignatureRequest): void + + // Extended sign method that allows for focus request + sign(request: Db.SignatureRequest): Promise + + // Some signers may have different status per request + // some others may have a global status. This pattern enables both. + status(requestId?: string): InteractiveSignerStatus +} diff --git a/packages/wdk/src/wallet/index.ts b/packages/wdk/src/wallet/index.ts deleted file mode 100644 index 67eb1b4ca..000000000 --- a/packages/wdk/src/wallet/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './wallet' diff --git a/packages/wdk/src/wallet/wallet.ts b/packages/wdk/src/wallet/wallet.ts deleted file mode 100644 index ccb24aae3..000000000 --- a/packages/wdk/src/wallet/wallet.ts +++ /dev/null @@ -1,99 +0,0 @@ -import { Address, Hex } from 'ox' -import { WalletRow } from '../manager' -import { Relayer } from '@0xsequence/sequence-core' -import { Payload } from '@0xsequence/sequence-primitives' - -export type Transaction = { - to: Address.Address - value?: bigint - data?: Uint8Array -} - -export type WalletOptions = { - row: WalletRow - relayers: Relayer.Relayer[] -} - -export type RelayerOption = { - id: string - chainId: bigint - txs: Transaction[] - relayer: Relayer.Relayer - feeOption?: Relayer.FeeOption - quote?: Relayer.FeeQuote -} - -export class Wallet { - constructor(private readonly options: WalletOptions) {} - - get address(): Address.Address { - return this.options.row.wallet - } - - async sendTransaction( - chainId: bigint, - txs: Transaction[], - selectRelayer: (feeOptions: RelayerOption[]) => Promise, - confirmCalls: (calls: Payload.Call[]) => Promise, - ): Promise { - const calls = txs.map( - (tx): Payload.Call => ({ - to: tx.to, - value: tx.value ?? 0n, - data: tx.data ?? new Uint8Array(0), - gasLimit: 0n, // TODO: Add gas estimation - delegateCall: false, - onlyFallback: false, - behaviorOnError: 'revert', - }), - ) - - const confirmedCalls = await confirmCalls(calls) - - // We need to check that nothing has changed into `delegateCall: true` - if (confirmedCalls.some((call) => call.delegateCall)) { - throw new Error('Delegate calls are not allowed') - } - - let idTag = Hex.random(8) - let idCounter = 0 - - const allRelayerOptions = await Promise.all( - this.options.relayers.map(async (relayer): Promise => { - const feeOptions = await relayer.feeOptions(this.address, chainId, confirmedCalls) - - if (feeOptions.options.length === 0) { - return [ - { - id: `${idTag}-${(idCounter++).toString()}`, - chainId: chainId, - txs: txs, - relayer: relayer, - } as RelayerOption, - ] - } - - return feeOptions.options.map((feeOption) => ({ - id: `${idTag}-${(idCounter++).toString()}`, - chainId: chainId, - txs: txs, - feeOption: feeOption, - relayer: relayer, - quote: feeOptions.quote, - })) - }), - ) - - const allRelayerOptionsFlat = allRelayerOptions.flat() - if (allRelayerOptionsFlat.length === 0) { - throw new Error('No relayer options found') - } - - const selected = await selectRelayer(allRelayerOptionsFlat) - const found = allRelayerOptionsFlat.find((feeOption) => feeOption.id === selected) - - if (!found) { - throw new Error('Selected fee option not found') - } - } -} diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 3a05817b3..d3f0eee54 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -299,6 +299,9 @@ importers: ox: specifier: ^0.6.7 version: 0.6.7(typescript@5.7.3) + uuid: + specifier: ^11.1.0 + version: 11.1.0 devDependencies: '@repo/typescript-config': specifier: workspace:^ @@ -3501,6 +3504,10 @@ packages: util-deprecate@1.0.2: resolution: {integrity: sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==} + uuid@11.1.0: + resolution: {integrity: sha512-0/A9rDy9P7cJ+8w1c9WD9V//9Wj15Ce2MPz8Ri6032usz+NfePxx5AcN3bN+r6ZL6jEo066/yNYB3tn4pQEx+A==} + hasBin: true + v8-compile-cache-lib@3.0.1: resolution: {integrity: sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg==} @@ -7404,6 +7411,8 @@ snapshots: util-deprecate@1.0.2: {} + uuid@11.1.0: {} + v8-compile-cache-lib@3.0.1: {} v8-to-istanbul@9.3.0: From 893b291d921ba76fd78c5c559204e6ee6a9b9906 Mon Sep 17 00:00:00 2001 From: Agusx1211 Date: Sat, 22 Mar 2025 19:52:11 +0000 Subject: [PATCH 230/439] Signers signatures and handlers wip --- packages/core/src/signers/index.ts | 2 +- packages/core/src/signers/passkey.ts | 7 +- packages/core/src/signers/pk/index.ts | 3 +- packages/core/src/state/index.ts | 15 +++ packages/core/src/state/local/index.ts | 23 ++++ packages/wdk/src/dbs/index.ts | 1 + packages/wdk/src/dbs/signers.ts | 15 +++ packages/wdk/src/manager/devices.ts | 34 +++++- packages/wdk/src/manager/manager.ts | 12 ++- packages/wdk/src/manager/signatures.ts | 126 +++++++++++++++++++++- packages/wdk/src/manager/signers.ts | 73 +++++++++++++ packages/wdk/src/manager/wallets.ts | 5 +- packages/wdk/src/signers/DeviceSigner.ts | 68 +++++++----- packages/wdk/src/signers/PasskeySigner.ts | 102 +++++++++++++----- packages/wdk/src/signers/signer.ts | 37 ++----- 15 files changed, 422 insertions(+), 101 deletions(-) create mode 100644 packages/wdk/src/dbs/signers.ts create mode 100644 packages/wdk/src/manager/signers.ts diff --git a/packages/core/src/signers/index.ts b/packages/core/src/signers/index.ts index c70c71564..e19ec29a2 100644 --- a/packages/core/src/signers/index.ts +++ b/packages/core/src/signers/index.ts @@ -30,7 +30,7 @@ export interface SapientSigner { } export interface Witnessable { - witness: (stateWriter: State.Writer, wallet: Address.Address) => Promise + witness: (stateWriter: State.Writer, wallet: Address.Address, extra?: Object) => Promise } type MaybePromise = T | Promise diff --git a/packages/core/src/signers/passkey.ts b/packages/core/src/signers/passkey.ts index f5e59ed9b..4d9624153 100644 --- a/packages/core/src/signers/passkey.ts +++ b/packages/core/src/signers/passkey.ts @@ -62,9 +62,7 @@ export class Passkey implements SapientSigner, Witnessable { imageHash: Hex.Hex, ) { // In the witness we will find the public key, and may find the credential id - const wallets = await stateReader.getWalletsForSapient(extensions.passkeys, imageHash) - const witness = wallets[wallet] - + const witness = await stateReader.getWitnessForSapient(wallet, extensions.passkeys, imageHash) if (!witness) { throw new Error('Witness for wallet not found') } @@ -172,7 +170,7 @@ export class Passkey implements SapientSigner, Witnessable { } } - async witness(stateWriter: State.Writer, wallet: Address.Address): Promise { + async witness(stateWriter: State.Writer, wallet: Address.Address, extra?: Object): Promise { const payload = Payload.fromMessage( Bytes.fromString( JSON.stringify({ @@ -181,6 +179,7 @@ export class Passkey implements SapientSigner, Witnessable { publicKey: this.publicKey, metadata: this.metadata, timestamp: Date.now(), + ...extra, } as WitnessMessage), ), ) diff --git a/packages/core/src/signers/pk/index.ts b/packages/core/src/signers/pk/index.ts index 8b07c514a..5738d510c 100644 --- a/packages/core/src/signers/pk/index.ts +++ b/packages/core/src/signers/pk/index.ts @@ -52,7 +52,7 @@ export class Pk implements SignerInterface, Witnessable { return { ...signature, type: 'hash' } } - async witness(stateWriter: State.Writer, wallet: Address.Address): Promise { + async witness(stateWriter: State.Writer, wallet: Address.Address, extra?: Object): Promise { const payload = Payload.fromMessage( Bytes.fromString( JSON.stringify({ @@ -60,6 +60,7 @@ export class Pk implements SignerInterface, Witnessable { wallet, signer: this.address, timestamp: Date.now(), + ...extra, }), ), ) diff --git a/packages/core/src/state/index.ts b/packages/core/src/state/index.ts index e58194778..88c3556b4 100644 --- a/packages/core/src/state/index.ts +++ b/packages/core/src/state/index.ts @@ -27,6 +27,21 @@ export interface Reader { } }> + getWitnessFor( + wallet: Address.Address, + signer: Address.Address, + ): MaybePromise< + { chainId: bigint; payload: Payload.Parented; signature: Signature.SignatureOfSignerLeaf } | undefined + > + + getWitnessForSapient( + wallet: Address.Address, + signer: Address.Address, + imageHash: Hex.Hex, + ): MaybePromise< + { chainId: bigint; payload: Payload.Parented; signature: Signature.SignatureOfSapientSignerLeaf } | undefined + > + getConfigurationUpdates( wallet: Address.Address, fromImageHash: Hex.Hex, diff --git a/packages/core/src/state/local/index.ts b/packages/core/src/state/local/index.ts index 72b41b01a..650967e02 100644 --- a/packages/core/src/state/local/index.ts +++ b/packages/core/src/state/local/index.ts @@ -140,6 +140,29 @@ export class Provider implements ProviderInterface { ) } + getWitnessFor( + wallet: Address.Address, + signer: Address.Address, + ): + | { chainId: bigint; payload: Payload.Parented; signature: Signature.SignatureOfSignerLeaf } + | Promise<{ chainId: bigint; payload: Payload.Parented; signature: Signature.SignatureOfSignerLeaf } | undefined> + | undefined { + return this.getWallets(signer).then((wallets) => wallets[wallet]) + } + + getWitnessForSapient( + wallet: Address.Address, + signer: Address.Address, + imageHash: Hex.Hex, + ): + | { chainId: bigint; payload: Payload.Parented; signature: Signature.SignatureOfSapientSignerLeaf } + | Promise< + { chainId: bigint; payload: Payload.Parented; signature: Signature.SignatureOfSapientSignerLeaf } | undefined + > + | undefined { + return this.getWalletsForSapient(signer, imageHash).then((wallets) => wallets[wallet]) + } + async saveWitnesses( wallet: Address.Address, chainId: bigint, diff --git a/packages/wdk/src/dbs/index.ts b/packages/wdk/src/dbs/index.ts index c8556bf00..3cf805197 100644 --- a/packages/wdk/src/dbs/index.ts +++ b/packages/wdk/src/dbs/index.ts @@ -1,6 +1,7 @@ export * from './manager' export * from './signatures' export * from './transactions' +export * from './signers' export type DbUpdateType = 'added' | 'updated' | 'removed' diff --git a/packages/wdk/src/dbs/signers.ts b/packages/wdk/src/dbs/signers.ts new file mode 100644 index 000000000..f33083d06 --- /dev/null +++ b/packages/wdk/src/dbs/signers.ts @@ -0,0 +1,15 @@ +import { Address } from 'ox' +import { Generic } from '.' + +export interface SignerRow { + address: Address.Address + imageHash?: string + + kind: string +} + +export class Signers extends Generic { + constructor(dbName: string = 'sequence-signers') { + super(dbName, 'signers', 'address') + } +} diff --git a/packages/wdk/src/manager/devices.ts b/packages/wdk/src/manager/devices.ts index 98267e71f..02bc31290 100644 --- a/packages/wdk/src/manager/devices.ts +++ b/packages/wdk/src/manager/devices.ts @@ -1,12 +1,24 @@ -import { Signers } from '@0xsequence/sequence-core' +import { Signers, State } from '@0xsequence/sequence-core' import { Logger } from './logger' +import { Address } from 'ox' +import { Kinds, WitnessExtraSignerKind } from './signers' export class Devices { constructor( private readonly logger: Logger, + private readonly stateProvider: State.Provider, private readonly encryptedPksDb: Signers.Pk.Encrypted.EncryptedPksDb, ) {} + async list() { + return this.encryptedPksDb.listAddresses() + } + + async has(address: Address.Address) { + const entry = await this.encryptedPksDb.getEncryptedEntry(address) + return entry !== undefined + } + async create() { const e = await this.encryptedPksDb.generateAndStore() const s = await this.encryptedPksDb.getEncryptedPkStore(e.address) @@ -18,4 +30,24 @@ export class Devices { this.logger.log('Created new session:', s.address) return new Signers.Pk.Pk(s) } + + async get(address: Address.Address) { + const s = await this.encryptedPksDb.getEncryptedPkStore(address) + if (!s) { + return undefined + } + + return new Signers.Pk.Pk(s) + } + + async witness(address: Address.Address, wallet: Address.Address) { + const signer = await this.get(address) + if (!signer) { + throw new Error('Signer not found') + } + + await signer.witness(this.stateProvider, wallet, { + signerKind: Kinds.LocalDevice, + } as WitnessExtraSignerKind) + } } diff --git a/packages/wdk/src/manager/manager.ts b/packages/wdk/src/manager/manager.ts index d11abac1c..e33361d51 100644 --- a/packages/wdk/src/manager/manager.ts +++ b/packages/wdk/src/manager/manager.ts @@ -1,7 +1,7 @@ import { Address, Provider } from 'ox' import { Extensions, Context, Config, Constants, Network, Payload } from '@0xsequence/sequence-primitives' -import { Signers, Wallet as CoreWallet, State, Relayer, Wallet } from '@0xsequence/sequence-core' +import { Signers as CoreSigners, Wallet as CoreWallet, State, Relayer, Wallet } from '@0xsequence/sequence-core' import * as Db from '../dbs' import { v7 as uuidv7 } from 'uuid' import { Logger } from './logger' @@ -9,6 +9,7 @@ import { Devices } from './devices' import { CreateWalletOptions, Wallets } from './wallets' import { Transactions } from './transactions' import { Signatures } from './signatures' +import { Signers } from './signers' export type Transaction = { to: Address.Address @@ -23,7 +24,7 @@ export type ManagerOptions = { context?: Context.Context guest?: Address.Address - encryptedPksDb?: Signers.Pk.Encrypted.EncryptedPksDb + encryptedPksDb?: CoreSigners.Pk.Encrypted.EncryptedPksDb managerDb?: Db.Manager transactionsDb?: Db.Transactions signaturesDb?: Db.Signatures @@ -42,7 +43,7 @@ export const ManagerOptionsDefaults = { context: Context.Dev1, guest: Constants.DefaultGuest, - encryptedPksDb: new Signers.Pk.Encrypted.EncryptedPksDb(), + encryptedPksDb: new CoreSigners.Pk.Encrypted.EncryptedPksDb(), managerDb: new Db.Manager(), signaturesDb: new Db.Signatures(), transactionsDb: new Db.Transactions(), @@ -102,7 +103,7 @@ export class Manager { this.relayers = ops.relayers const logger = new Logger(this.verbose) - const devices = new Devices(logger, this.encryptedPksDb) + const devices = new Devices(logger, this.stateProvider, this.encryptedPksDb) const wallets = new Wallets( logger, devices, @@ -113,7 +114,8 @@ export class Manager { this.stateProvider, this.guestModule, ) - const signatures = new Signatures(this.signaturesDb, this.networks, this.stateProvider) + const signers = new Signers(devices, this.stateProvider) + const signatures = new Signatures(signers, this.signaturesDb, new Map()) const transactions = new Transactions( signatures, this.transactionsDb, diff --git a/packages/wdk/src/manager/signatures.ts b/packages/wdk/src/manager/signatures.ts index afc9c5a8a..3673189eb 100644 --- a/packages/wdk/src/manager/signatures.ts +++ b/packages/wdk/src/manager/signatures.ts @@ -1,14 +1,51 @@ -import { Address, Provider } from 'ox' +import { Address, Bytes, Hex, Provider } from 'ox' import * as Db from '../dbs' -import { Network, Payload } from '@0xsequence/sequence-primitives' -import { Envelope, State, Wallet } from '@0xsequence/sequence-core' +import { Config, Payload } from '@0xsequence/sequence-primitives' +import { Envelope } from '@0xsequence/sequence-core' import { v7 as uuidv7 } from 'uuid' +import { Signers } from './signers' +import { SignerHandler } from '../signers/signer' + +export type SignerBase = { + address: Address.Address + imageHash?: Bytes.Bytes +} + +export type SignerSigned = SignerBase & { + handler?: SignerHandler + status: 'signed' +} + +export type SignerUnavailable = SignerBase & { + handler?: SignerHandler + reason: string + status: 'unavailable' +} + +export type SignerReady = SignerBase & { + handler: SignerHandler + status: 'ready' + sign: () => Promise +} + +export type SignerActionable = SignerBase & { + handler: SignerHandler + status: 'actionable' + message: string // TODO: Localization? + sign: () => Promise +} + +export type Signer = SignerSigned | SignerUnavailable | SignerReady | SignerActionable + +export type SignatureRequest = Db.SignatureRequest & { + signers: Signer[] +} export class Signatures { constructor( + private readonly signers: Signers, private readonly signaturesDb: Db.Signatures, - private readonly networks: Network.Network[], - private readonly stateProvider: State.Provider, + private readonly handlers: Map, ) {} async list(): Promise { @@ -35,4 +72,83 @@ export class Signatures { return id } + + async addSignature(requestId: string, signature: Envelope.SapientSignature | Envelope.Signature) { + const request = await this.signaturesDb.get(requestId) + if (!request) { + throw new Error(`Request not found for ${requestId}`) + } + + Envelope.addSignature(request.envelope, signature) + + await this.signaturesDb.set(request) + } + + async sign(requestId: string, onSigners: (signers: Signer[]) => void): Promise { + const request = await this.signaturesDb.get(requestId) + if (!request) { + throw new Error(`Request not found for ${requestId}`) + } + + const signers = Config.getSigners(request.envelope.configuration.topology) + const signersAndKinds = await Promise.all([ + ...signers.signers.map(async (signer) => { + const kind = await this.signers.kindOf(request.wallet, signer) + return { + address: signer, + imageHash: undefined, + kind, + } + }), + ...signers.sapientSigners.map(async (signer) => { + const kind = await this.signers.kindOf(request.wallet, signer.address, Hex.from(signer.imageHash)) + return { + address: signer.address, + imageHash: signer.imageHash, + kind, + } + }), + ]) + + const statuses = await Promise.all( + signersAndKinds.map(async (sak) => { + const base = { + address: sak.address, + imageHash: sak.imageHash, + } as SignerBase + + // We may have a signature for this signer already + const signed = request.envelope.signatures.some((sig) => { + if (Envelope.isSapientSignature(sig)) { + return sig.signature.address === sak.address && sig.imageHash === sak.imageHash + } + return sig.address === sak.address + }) + + const handler = sak.kind && this.handlers.get(sak.kind) + if (signed) { + return { + ...base, + handler, + status: 'signed', + } as SignerSigned + } + + if (!handler) { + return { + ...base, + handler: undefined, + reason: 'unknown-kind', + status: 'unavailable', + } as SignerUnavailable + } + + return handler.status(sak.address, sak.imageHash, request) + }), + ) + + onSigners(statuses) + + return false + } } diff --git a/packages/wdk/src/manager/signers.ts b/packages/wdk/src/manager/signers.ts new file mode 100644 index 000000000..946b81950 --- /dev/null +++ b/packages/wdk/src/manager/signers.ts @@ -0,0 +1,73 @@ +import { Address, Bytes, Hex } from 'ox' +import { State } from '@0xsequence/sequence-core' +import { Devices } from './devices' +import { Payload } from '@0xsequence/sequence-primitives' + +export const Kinds = { + LocalDevice: 'local-device', + LoginPasskey: 'login-passkey', + Unknown: 'unknown', +} as const + +export type Kind = (typeof Kinds)[keyof typeof Kinds] + +export type WitnessExtraSignerKind = { + signerKind: string +} + +export function isWitnessExtraSignerKind(extra: any): extra is WitnessExtraSignerKind { + return typeof extra === 'object' && extra !== null && 'signerKind' in extra +} + +function toKnownKind(kind: string): Kind { + if (Object.values(Kinds).includes(kind as Kind)) { + return kind as Kind + } + + console.warn(`Unknown signer kind: ${kind}`) + + return Kinds.Unknown +} + +// Signers is in charge to know (or figure out) the "kind" of each signer +// i.e., when a signature is requested, we only get address and imageHash (if sapient) +// this module takes care of figuring out the kind of signer (e.g., device, passkey, recovery, etc.) +export class Signers { + constructor( + private readonly devices: Devices, + private readonly stateProvider: State.Provider, + ) {} + + async kindOf(wallet: Address.Address, address: Address.Address, imageHash?: Hex.Hex): Promise { + // // The device may be among the local devices, in that case it is a local device + // // TODO: Maybe signers shouldn't be getting in the way of devices, it feels like a + // // different concern + // if (await this.devices.has(address)) { + // return Kinds.LocalDevice + // } + + // We need to use the state provider (and witness) this will tell us the kind of signer + // NOTICE: This looks expensive, but this operation should be cached by the state provider + const witness = await (imageHash + ? this.stateProvider.getWitnessForSapient(wallet, address, imageHash) + : this.stateProvider.getWitnessFor(wallet, address)) + + if (!witness) { + return undefined + } + + // Parse the payload, it may have the kind of signer + if (!Payload.isMessage(witness.payload)) { + return undefined + } + + try { + const message = JSON.parse(Bytes.toString(witness.payload.message)) + if (isWitnessExtraSignerKind(message)) { + return toKnownKind(message.signerKind) + } + } catch {} + + return undefined + } +} diff --git a/packages/wdk/src/manager/wallets.ts b/packages/wdk/src/manager/wallets.ts index 6e6628f77..a9b04394d 100644 --- a/packages/wdk/src/manager/wallets.ts +++ b/packages/wdk/src/manager/wallets.ts @@ -4,6 +4,7 @@ import { Address } from 'ox' import { Signers, State, Wallet } from '@0xsequence/sequence-core' import { Config, Context, Extensions } from '@0xsequence/sequence-primitives' import { Devices } from './devices' +import { Kinds, WitnessExtraSignerKind } from './signers' export type CreateWalletOptions = { kind: 'passkey' @@ -148,7 +149,9 @@ export class Wallets { await device.witness(this.stateProvider, wallet.address) // Sign witness using the passkey signer - await passkeySigner.witness(this.stateProvider, wallet.address) + await passkeySigner.witness(this.stateProvider, wallet.address, { + signerKind: Kinds.LoginPasskey, + } as WitnessExtraSignerKind) // Save entry in the manager db await this.managerDb.set({ diff --git a/packages/wdk/src/signers/DeviceSigner.ts b/packages/wdk/src/signers/DeviceSigner.ts index 134802c82..3132027fd 100644 --- a/packages/wdk/src/signers/DeviceSigner.ts +++ b/packages/wdk/src/signers/DeviceSigner.ts @@ -1,41 +1,51 @@ -import { Envelope, Signers } from '@0xsequence/sequence-core' -import { InteractiveSigner, InteractiveSignerStatus } from './signer' import * as Db from '../dbs' -import { Address } from 'ox' +import { SignerHandler } from './signer' +import { Kinds } from '../manager/signers' +import { Signatures, SignerReady, SignerUnavailable } from '../manager/signatures' +import { Address, Bytes } from 'ox' +import { Devices } from '../manager/devices' -export class DeviceSigner implements InteractiveSigner { - address: Address.Address +export class DeviceSignerHandler implements SignerHandler { + kind = Kinds.LocalDevice - constructor(private readonly innerSigner: Signers.Pk.Pk) { - this.address = this.innerSigner.address - } - - icon(): string { - return 'device' - } - - label(): string { - return 'Device (TODO add deterministic name)' - } + constructor( + private readonly signatures: Signatures, + private readonly devices: Devices, + ) {} - prepare(_request: Db.SignatureRequest): void { - // NO-OP + uiStatus(): 'non-required' { + return 'non-required' } - async sign(request: Db.SignatureRequest): Promise { - const ie = request.envelope - const signature = await this.innerSigner.sign(ie.wallet, ie.chainId, ie.payload) - return { - address: this.address, - signature, + async status( + address: Address.Address, + _imageHash: Bytes.Bytes | undefined, + request: Db.SignatureRequest, + ): Promise { + const signer = await this.devices.get(address) + if (!signer) { + return { + address, + handler: this, + reason: 'not-local-key', + status: 'unavailable', + } as SignerUnavailable } - } - status(_requestId?: string): InteractiveSignerStatus { return { - // TODO: Handle localisation - message: 'Device is ready to sign', + address, + handler: this, status: 'ready', - } + sign: async () => { + const signature = await signer.sign(request.envelope.wallet, request.envelope.chainId, request.envelope.payload) + + await this.signatures.addSignature(request.id, { + address, + signature, + }) + + return true + }, + } as SignerReady } } diff --git a/packages/wdk/src/signers/PasskeySigner.ts b/packages/wdk/src/signers/PasskeySigner.ts index a539f8441..92ff7daf4 100644 --- a/packages/wdk/src/signers/PasskeySigner.ts +++ b/packages/wdk/src/signers/PasskeySigner.ts @@ -1,42 +1,88 @@ -import { Envelope, Signers } from '@0xsequence/sequence-core' -import { InteractiveSigner, InteractiveSignerStatus } from './signer' +import { Signers, State } from '@0xsequence/sequence-core' import * as Db from '../dbs' -import { Address, Bytes } from 'ox' +import { Address, Bytes, Hex } from 'ox' +import { SignerHandler } from './signer' +import { Kinds } from '../manager/signers' +import { Signatures, SignerActionable, SignerUnavailable } from '../manager/signatures' +import { Extensions } from '@0xsequence/sequence-primitives' -export class PasskeySigner implements InteractiveSigner { - address: Address.Address +export class PasskeySigner implements SignerHandler { + kind = Kinds.LoginPasskey - constructor(private readonly innerSigner: Signers.Passkey.Passkey) { - this.address = this.innerSigner.address - } + constructor( + private readonly signatures: Signatures, + private readonly extensions: Pick, + private readonly stateReader: State.Reader, + ) {} - icon(): string { - return 'passkey' + uiStatus(): 'non-required' { + return 'non-required' } - label(): string { - return `Passkey - ${this.innerSigner.metadata?.name || 'Unknown'}` + private async loadPasskey( + wallet: Address.Address, + imageHash: Bytes.Bytes, + ): Promise { + try { + return await Signers.Passkey.Passkey.loadFromWitness( + this.stateReader, + this.extensions, + wallet, + Hex.from(imageHash), + ) + } catch (e) { + console.warn('Failed to load passkey:', e) + return undefined + } } - prepare(_request: Db.SignatureRequest): void { - // NO-OP - } + async status( + address: Address.Address, + imageHash: Bytes.Bytes | undefined, + request: Db.SignatureRequest, + ): Promise { + const base = { address, imageHash, handler: this } + if (address !== this.extensions.passkeys) { + console.warn( + 'PasskeySigner: status address does not match passkey module address', + address, + this.extensions.passkeys, + ) + return { + ...base, + status: 'unavailable', + reason: 'unknown-error', + } as SignerUnavailable + } - async sign(request: Db.SignatureRequest): Promise { - const ie = request.envelope - const ih = this.innerSigner.imageHash - const signature = await this.innerSigner.signSapient(ie.wallet, ie.chainId, ie.payload, ih) - return { - imageHash: Bytes.from(ih), - signature, + const passkey = imageHash && (await this.loadPasskey(request.envelope.wallet, imageHash)) + if (!passkey) { + console.warn('PasskeySigner: status failed to load passkey', address, imageHash) + return { + ...base, + status: 'unavailable', + reason: 'unknown-error', + } as SignerUnavailable } - } - status(_requestId?: string): InteractiveSignerStatus { return { - // TODO: Handle localisation - message: 'Request interaction with passkey', - status: 'ready', - } + ...base, + status: 'actionable', + message: 'request-interaction-with-passkey', + sign: async () => { + const signature = await passkey.signSapient( + request.envelope.wallet, + request.envelope.chainId, + request.envelope.payload, + Hex.from(imageHash), + ) + await this.signatures.addSignature(request.id, { + address, + imageHash, + signature, + }) + return true + }, + } as SignerActionable } } diff --git a/packages/wdk/src/signers/signer.ts b/packages/wdk/src/signers/signer.ts index 73c14a9d0..b1dfd8063 100644 --- a/packages/wdk/src/signers/signer.ts +++ b/packages/wdk/src/signers/signer.ts @@ -1,31 +1,16 @@ -import { Envelope } from '@0xsequence/sequence-core' import * as Db from '../dbs' -import { Address, Hex } from 'ox' - -export type InteractiveSignerStatus = { - message: string - - // ready: the signer is ready to sign, without user interaction - // actionable: the signer is ready to sign, but requires user interaction - // unavailable: the signer is not available to sign - status: 'ready' | 'actionable' | 'unavailable' -} - -export interface InteractiveSigner { - address: Address.Address - imageHash?: Hex.Hex | undefined - - // Icon and text for the signing options screen - icon(): string - label(): string +import { Address, Bytes } from 'ox' +import { SignerActionable, SignerReady, SignerUnavailable } from '../manager/signatures' +import { Envelope } from '@0xsequence/sequence-core' - // Tells the signer to prepare for signing a given request - prepare(request: Db.SignatureRequest): void +export interface SignerHandler { + kind: string - // Extended sign method that allows for focus request - sign(request: Db.SignatureRequest): Promise + uiStatus(): 'non-required' | 'non-registered' | 'registered' - // Some signers may have different status per request - // some others may have a global status. This pattern enables both. - status(requestId?: string): InteractiveSignerStatus + status( + address: Address.Address, + imageHash: Bytes.Bytes | undefined, + request: Db.SignatureRequest, + ): Promise } From 1f1588f10faf27cf6b395f9f0d8556b6da8984f7 Mon Sep 17 00:00:00 2001 From: Agusx1211 Date: Sat, 22 Mar 2025 22:55:44 +0000 Subject: [PATCH 231/439] Pass shared vars --- packages/wdk/src/manager/devices.ts | 24 ++-- packages/wdk/src/manager/logger.ts | 6 +- packages/wdk/src/manager/manager.ts | 146 +++++++++++++---------- packages/wdk/src/manager/signatures.ts | 30 ++--- packages/wdk/src/manager/signers.ts | 12 +- packages/wdk/src/manager/transactions.ts | 34 +++--- packages/wdk/src/manager/wallets.ts | 49 +++----- 7 files changed, 149 insertions(+), 152 deletions(-) diff --git a/packages/wdk/src/manager/devices.ts b/packages/wdk/src/manager/devices.ts index 02bc31290..bc6bbbc40 100644 --- a/packages/wdk/src/manager/devices.ts +++ b/packages/wdk/src/manager/devices.ts @@ -1,38 +1,34 @@ -import { Signers, State } from '@0xsequence/sequence-core' -import { Logger } from './logger' +import { Signers } from '@0xsequence/sequence-core' import { Address } from 'ox' import { Kinds, WitnessExtraSignerKind } from './signers' +import { Shared } from './manager' export class Devices { - constructor( - private readonly logger: Logger, - private readonly stateProvider: State.Provider, - private readonly encryptedPksDb: Signers.Pk.Encrypted.EncryptedPksDb, - ) {} + constructor(private readonly shared: Shared) {} async list() { - return this.encryptedPksDb.listAddresses() + return this.shared.databases.encryptedPks.listAddresses() } async has(address: Address.Address) { - const entry = await this.encryptedPksDb.getEncryptedEntry(address) + const entry = await this.shared.databases.encryptedPks.getEncryptedEntry(address) return entry !== undefined } async create() { - const e = await this.encryptedPksDb.generateAndStore() - const s = await this.encryptedPksDb.getEncryptedPkStore(e.address) + const e = await this.shared.databases.encryptedPks.generateAndStore() + const s = await this.shared.databases.encryptedPks.getEncryptedPkStore(e.address) if (!s) { throw new Error('Failed to create session') } - this.logger.log('Created new session:', s.address) + this.shared.modules.logger.log('Created new session:', s.address) return new Signers.Pk.Pk(s) } async get(address: Address.Address) { - const s = await this.encryptedPksDb.getEncryptedPkStore(address) + const s = await this.shared.databases.encryptedPks.getEncryptedPkStore(address) if (!s) { return undefined } @@ -46,7 +42,7 @@ export class Devices { throw new Error('Signer not found') } - await signer.witness(this.stateProvider, wallet, { + await signer.witness(this.shared.sequence.stateProvider, wallet, { signerKind: Kinds.LocalDevice, } as WitnessExtraSignerKind) } diff --git a/packages/wdk/src/manager/logger.ts b/packages/wdk/src/manager/logger.ts index d634372ab..8c038dd19 100644 --- a/packages/wdk/src/manager/logger.ts +++ b/packages/wdk/src/manager/logger.ts @@ -1,8 +1,10 @@ +import { Shared } from './manager' + export class Logger { - constructor(public readonly verbose: boolean) {} + constructor(private readonly shared: Shared) {} log(...args: any[]) { - if (this.verbose) { + if (this.shared.verbose) { console.log(...args) } } diff --git a/packages/wdk/src/manager/manager.ts b/packages/wdk/src/manager/manager.ts index e33361d51..abf500623 100644 --- a/packages/wdk/src/manager/manager.ts +++ b/packages/wdk/src/manager/manager.ts @@ -1,15 +1,15 @@ import { Address, Provider } from 'ox' -import { Extensions, Context, Config, Constants, Network, Payload } from '@0xsequence/sequence-primitives' -import { Signers as CoreSigners, Wallet as CoreWallet, State, Relayer, Wallet } from '@0xsequence/sequence-core' +import { Extensions, Context, Config, Constants, Network } from '@0xsequence/sequence-primitives' +import { Signers as CoreSigners, State, Relayer } from '@0xsequence/sequence-core' import * as Db from '../dbs' -import { v7 as uuidv7 } from 'uuid' import { Logger } from './logger' import { Devices } from './devices' import { CreateWalletOptions, Wallets } from './wallets' import { Transactions } from './transactions' -import { Signatures } from './signatures' +import { Signatures, Signer } from './signatures' import { Signers } from './signers' +import { SignerHandler } from '../signers/signer' export type Transaction = { to: Address.Address @@ -68,81 +68,101 @@ export function applyDefaults(options?: ManagerOptions) { return { ...ManagerOptionsDefaults, ...options } } -export class Manager { - public readonly verbose: boolean +export type Databases = { + readonly encryptedPks: CoreSigners.Pk.Encrypted.EncryptedPksDb + readonly manager: Db.Manager + readonly signatures: Db.Signatures + readonly transactions: Db.Transactions +} + +export type Sequence = { + readonly context: Context.Context + readonly extensions: Extensions.Extensions + readonly guest: Address.Address - public readonly extensions: Extensions.Extensions - public readonly context: Context.Context - public readonly guestModule: Address.Address + readonly stateProvider: State.Provider - public readonly stateProvider: State.Provider - public readonly networks: Network.Network[] - public readonly relayers: Relayer.Relayer[] + readonly networks: Network.Network[] + readonly relayers: Relayer.Relayer[] - private readonly encryptedPksDb - private readonly managerDb - private readonly signaturesDb - private readonly transactionsDb + readonly defaultGuardTopology: Config.Topology +} + +export type Modules = { + readonly logger: Logger + readonly devices: Devices + readonly wallets: Wallets + readonly signers: Signers + readonly signatures: Signatures + readonly transactions: Transactions +} - public readonly defaultGuardTopology: Config.Topology - private readonly modules +export type Shared = { + readonly verbose: boolean + + readonly sequence: Sequence + readonly databases: Databases + + readonly handlers: Map + + modules: Modules +} + +export class Manager { + private readonly shared: Shared constructor(options?: ManagerOptions) { const ops = applyDefaults(options) - this.extensions = ops.extensions - this.context = ops.context - this.verbose = ops.verbose - this.defaultGuardTopology = ops.defaultGuardTopology - this.stateProvider = ops.stateProvider - this.guestModule = ops.guest - this.encryptedPksDb = ops.encryptedPksDb - this.managerDb = ops.managerDb - this.signaturesDb = ops.signaturesDb - this.transactionsDb = ops.transactionsDb - this.networks = ops.networks - this.relayers = ops.relayers - - const logger = new Logger(this.verbose) - const devices = new Devices(logger, this.stateProvider, this.encryptedPksDb) - const wallets = new Wallets( - logger, - devices, - this.managerDb, - this.extensions, - this.context, - this.defaultGuardTopology, - this.stateProvider, - this.guestModule, - ) - const signers = new Signers(devices, this.stateProvider) - const signatures = new Signatures(signers, this.signaturesDb, new Map()) - const transactions = new Transactions( - signatures, - this.transactionsDb, - this.networks, - this.stateProvider, - this.relayers, - ) - - this.modules = { - logger, - devices, - wallets, - signatures, - transactions, + + const shared: Shared = { + verbose: ops.verbose, + + sequence: { + context: ops.context, + extensions: ops.extensions, + guest: ops.guest, + + stateProvider: ops.stateProvider, + networks: ops.networks, + relayers: ops.relayers, + + defaultGuardTopology: ops.defaultGuardTopology, + }, + + databases: { + encryptedPks: ops.encryptedPksDb, + manager: ops.managerDb, + signatures: ops.signaturesDb, + transactions: ops.transactionsDb, + }, + + modules: {} as any, + handlers: new Map(), } + + const modules: Modules = { + logger: new Logger(shared), + devices: new Devices(shared), + wallets: new Wallets(shared), + signers: new Signers(shared), + signatures: new Signatures(shared), + transactions: new Transactions(shared), + } + + shared.modules = modules + this.shared = shared } public async createWallet(options: CreateWalletOptions) { - return this.modules.wallets.create(options) + return this.shared.modules.wallets.create(options) } public async listWallets() { - return this.modules.wallets.list() + return this.shared.modules.wallets.list() } public async hasWallet(address: Address.Address) { - return this.modules.wallets.exists(address) + return this.shared.modules.wallets.exists(address) } public async requestTransaction( @@ -151,6 +171,6 @@ export class Manager { txs: Db.TransactionRequest[], options?: { skipDefineGas?: boolean; source?: string }, ) { - return this.modules.transactions.request(from, chainId, txs, options) + return this.shared.modules.transactions.request(from, chainId, txs, options) } } diff --git a/packages/wdk/src/manager/signatures.ts b/packages/wdk/src/manager/signatures.ts index 3673189eb..b922429ae 100644 --- a/packages/wdk/src/manager/signatures.ts +++ b/packages/wdk/src/manager/signatures.ts @@ -1,10 +1,10 @@ -import { Address, Bytes, Hex, Provider } from 'ox' +import { Address, Bytes, Hex } from 'ox' import * as Db from '../dbs' import { Config, Payload } from '@0xsequence/sequence-primitives' import { Envelope } from '@0xsequence/sequence-core' import { v7 as uuidv7 } from 'uuid' -import { Signers } from './signers' import { SignerHandler } from '../signers/signer' +import { Shared } from './manager' export type SignerBase = { address: Address.Address @@ -42,14 +42,10 @@ export type SignatureRequest = Db.SignatureRequest & { } export class Signatures { - constructor( - private readonly signers: Signers, - private readonly signaturesDb: Db.Signatures, - private readonly handlers: Map, - ) {} + constructor(private readonly shared: Shared) {} async list(): Promise { - return this.signaturesDb.list() + return this.shared.databases.signatures.list() } async request( @@ -61,7 +57,7 @@ export class Signatures { ): Promise { const id = uuidv7() - await this.signaturesDb.set({ + await this.shared.databases.signatures.set({ id, wallet: envelope.wallet, envelope: Envelope.toSigned(envelope), @@ -74,18 +70,18 @@ export class Signatures { } async addSignature(requestId: string, signature: Envelope.SapientSignature | Envelope.Signature) { - const request = await this.signaturesDb.get(requestId) + const request = await this.shared.databases.signatures.get(requestId) if (!request) { throw new Error(`Request not found for ${requestId}`) } Envelope.addSignature(request.envelope, signature) - await this.signaturesDb.set(request) + await this.shared.databases.signatures.set(request) } async sign(requestId: string, onSigners: (signers: Signer[]) => void): Promise { - const request = await this.signaturesDb.get(requestId) + const request = await this.shared.databases.signatures.get(requestId) if (!request) { throw new Error(`Request not found for ${requestId}`) } @@ -93,7 +89,7 @@ export class Signatures { const signers = Config.getSigners(request.envelope.configuration.topology) const signersAndKinds = await Promise.all([ ...signers.signers.map(async (signer) => { - const kind = await this.signers.kindOf(request.wallet, signer) + const kind = await this.shared.modules.signers.kindOf(request.wallet, signer) return { address: signer, imageHash: undefined, @@ -101,7 +97,11 @@ export class Signatures { } }), ...signers.sapientSigners.map(async (signer) => { - const kind = await this.signers.kindOf(request.wallet, signer.address, Hex.from(signer.imageHash)) + const kind = await this.shared.modules.signers.kindOf( + request.wallet, + signer.address, + Hex.from(signer.imageHash), + ) return { address: signer.address, imageHash: signer.imageHash, @@ -125,7 +125,7 @@ export class Signatures { return sig.address === sak.address }) - const handler = sak.kind && this.handlers.get(sak.kind) + const handler = sak.kind && this.shared.handlers.get(sak.kind) if (signed) { return { ...base, diff --git a/packages/wdk/src/manager/signers.ts b/packages/wdk/src/manager/signers.ts index 946b81950..06d227f31 100644 --- a/packages/wdk/src/manager/signers.ts +++ b/packages/wdk/src/manager/signers.ts @@ -1,7 +1,6 @@ import { Address, Bytes, Hex } from 'ox' -import { State } from '@0xsequence/sequence-core' -import { Devices } from './devices' import { Payload } from '@0xsequence/sequence-primitives' +import { Shared } from './manager' export const Kinds = { LocalDevice: 'local-device', @@ -33,10 +32,7 @@ function toKnownKind(kind: string): Kind { // i.e., when a signature is requested, we only get address and imageHash (if sapient) // this module takes care of figuring out the kind of signer (e.g., device, passkey, recovery, etc.) export class Signers { - constructor( - private readonly devices: Devices, - private readonly stateProvider: State.Provider, - ) {} + constructor(private readonly shared: Shared) {} async kindOf(wallet: Address.Address, address: Address.Address, imageHash?: Hex.Hex): Promise { // // The device may be among the local devices, in that case it is a local device @@ -49,8 +45,8 @@ export class Signers { // We need to use the state provider (and witness) this will tell us the kind of signer // NOTICE: This looks expensive, but this operation should be cached by the state provider const witness = await (imageHash - ? this.stateProvider.getWitnessForSapient(wallet, address, imageHash) - : this.stateProvider.getWitnessFor(wallet, address)) + ? this.shared.sequence.stateProvider.getWitnessForSapient(wallet, address, imageHash) + : this.shared.sequence.stateProvider.getWitnessFor(wallet, address)) if (!witness) { return undefined diff --git a/packages/wdk/src/manager/transactions.ts b/packages/wdk/src/manager/transactions.ts index 96fd54ca3..b76bb6169 100644 --- a/packages/wdk/src/manager/transactions.ts +++ b/packages/wdk/src/manager/transactions.ts @@ -1,21 +1,15 @@ -import { Network, Payload } from '@0xsequence/sequence-primitives' +import { Payload } from '@0xsequence/sequence-primitives' import * as Db from '../dbs' -import { Relayer, State, Wallet } from '@0xsequence/sequence-core' +import { Wallet } from '@0xsequence/sequence-core' import { Address, Provider } from 'ox' import { v7 as uuidv7 } from 'uuid' -import { Signatures } from './signatures' +import { Shared } from './manager' export class Transactions { - constructor( - private readonly signatures: Signatures, - private readonly transactionsDb: Db.Transactions, - private readonly networks: Network.Network[], - private readonly stateProvider: State.Provider, - private readonly relayers: Relayer.Relayer[], - ) {} + constructor(private readonly shared: Shared) {} public async list(): Promise { - return this.transactionsDb.list() + return this.shared.databases.transactions.list() } async request( @@ -27,13 +21,13 @@ export class Transactions { source?: string }, ): Promise { - const network = this.networks.find((network) => network.chainId === chainId) + const network = this.shared.sequence.networks.find((network) => network.chainId === chainId) if (!network) { throw new Error(`Network not found for ${chainId}`) } const provider = Provider.from(network.rpc) - const wallet = new Wallet(from, { stateProvider: this.stateProvider }) + const wallet = new Wallet(from, { stateProvider: this.shared.sequence.stateProvider }) const calls = txs.map( (tx): Payload.Call => ({ @@ -50,7 +44,7 @@ export class Transactions { const envelope = await wallet.prepareTransaction(provider, calls) const id = uuidv7() - await this.transactionsDb.set({ + await this.shared.databases.transactions.set({ id, wallet: from, requests: txs, @@ -70,7 +64,7 @@ export class Transactions { calls?: Pick[] }, ): Promise { - const tx = await this.transactionsDb.get(transactionId) + const tx = await this.shared.databases.transactions.get(transactionId) if (!tx) { throw new Error(`Transaction ${transactionId} not found`) } @@ -98,7 +92,7 @@ export class Transactions { } } - await this.transactionsDb.set({ + await this.shared.databases.transactions.set({ ...tx, status: 'defined', }) @@ -108,7 +102,7 @@ export class Transactions { transactionId: string, selectRelayer: (relayerOptions: Db.RelayerOption[]) => Promise, ): Promise { - const tx = await this.transactionsDb.get(transactionId) + const tx = await this.shared.databases.transactions.get(transactionId) if (!tx) { throw new Error(`Transaction ${transactionId} not found`) } @@ -119,7 +113,7 @@ export class Transactions { // Obtain the relayer options for the next stage const allRelayerOptions = await Promise.all( - this.relayers.map(async (relayer): Promise => { + this.shared.sequence.relayers.map(async (relayer): Promise => { const feeOptions = await relayer.feeOptions(tx.wallet, tx.envelope.chainId, tx.envelope.payload.calls) if (feeOptions.options.length === 0) { @@ -145,14 +139,14 @@ export class Transactions { return } - await this.transactionsDb.set({ + await this.shared.databases.transactions.set({ ...tx, relayerOption: selection, status: 'formed', }) // Pass to the signatures manager - return this.signatures.request(tx.envelope, { + return this.shared.modules.signatures.request(tx.envelope, { origin: tx.source, reason: 'transaction', }) diff --git a/packages/wdk/src/manager/wallets.ts b/packages/wdk/src/manager/wallets.ts index a9b04394d..d71444cc0 100644 --- a/packages/wdk/src/manager/wallets.ts +++ b/packages/wdk/src/manager/wallets.ts @@ -1,10 +1,8 @@ -import { Logger } from './logger' -import * as Db from '../dbs' import { Address } from 'ox' -import { Signers, State, Wallet } from '@0xsequence/sequence-core' -import { Config, Context, Extensions } from '@0xsequence/sequence-primitives' -import { Devices } from './devices' +import { Signers, Wallet } from '@0xsequence/sequence-core' +import { Config } from '@0xsequence/sequence-primitives' import { Kinds, WitnessExtraSignerKind } from './signers' +import { Shared } from './manager' export type CreateWalletOptions = { kind: 'passkey' @@ -57,28 +55,19 @@ export class Wallets { private walletsDbListener: (() => void) | undefined private walletsListeners: ((wallets: Address.Address[]) => void)[] = [] - constructor( - private readonly logger: Logger, - private readonly devices: Devices, - private readonly managerDb: Db.Manager, - private readonly extensions: Extensions.Extensions, - private readonly context: Context.Context, - private readonly defaultGuardTopology: Config.Topology, - private readonly stateProvider: State.Provider, - private readonly guestModule: Address.Address, - ) {} + constructor(private readonly shared: Shared) {} public async exists(wallet: Address.Address): Promise { - return this.managerDb.get(wallet).then((r) => r !== undefined) + return this.shared.databases.manager.get(wallet).then((r) => r !== undefined) } public async list(): Promise { - return this.managerDb.list().then((r) => r.map((x) => x.wallet)) + return this.shared.databases.manager.list().then((r) => r.map((x) => x.wallet)) } public onWalletsUpdate(cb: (wallets: Address.Address[]) => void, trigger?: boolean) { if (!this.walletsDbListener) { - this.walletsDbListener = this.managerDb.addListener(() => { + this.walletsDbListener = this.shared.databases.manager.addListener(() => { this.list().then((wallets) => { this.walletsListeners.forEach((cb) => cb(wallets)) }) @@ -109,20 +98,20 @@ export class Wallets { async create(args: CreateWalletOptions) { switch (args.kind) { case 'passkey': - const passkeySigner = await Signers.Passkey.Passkey.create(this.extensions) + const passkeySigner = await Signers.Passkey.Passkey.create(this.shared.sequence.extensions) - this.logger.log('Created new passkey signer:', passkeySigner.address) + this.shared.modules.logger.log('Created new passkey signer:', passkeySigner.address) // Create the first session - const device = await this.devices.create() + const device = await this.shared.modules.devices.create() // If the guard is defined, set threshold to 2, if not, set to 1 - const threshold = this.defaultGuardTopology ? 2n : 1n + const threshold = this.shared.sequence.defaultGuardTopology ? 2n : 1n // Build the login tree const loginTopology = buildCappedTree([passkeySigner.address]) const devicesTopology = buildCappedTree([device.address]) - const guardTopology = buildCappedTreeFromTopology(1n, this.defaultGuardTopology) + const guardTopology = buildCappedTreeFromTopology(1n, this.shared.sequence.defaultGuardTopology) // TODO: Add recovery module // TODO: Add smart sessions module @@ -138,23 +127,23 @@ export class Wallets { // Create wallet const wallet = await Wallet.fromConfiguration(initialConfiguration, { - context: this.context, - stateProvider: this.stateProvider, - guest: this.guestModule, + context: this.shared.sequence.context, + stateProvider: this.shared.sequence.stateProvider, + guest: this.shared.sequence.guest, }) - this.logger.log('Created new sequence wallet:', wallet.address) + this.shared.modules.logger.log('Created new sequence wallet:', wallet.address) // Sign witness using device signer - await device.witness(this.stateProvider, wallet.address) + await device.witness(this.shared.sequence.stateProvider, wallet.address) // Sign witness using the passkey signer - await passkeySigner.witness(this.stateProvider, wallet.address, { + await passkeySigner.witness(this.shared.sequence.stateProvider, wallet.address, { signerKind: Kinds.LoginPasskey, } as WitnessExtraSignerKind) // Save entry in the manager db - await this.managerDb.set({ + await this.shared.databases.manager.set({ wallet: wallet.address, status: 'logged-in', loginDate: new Date().toISOString(), From 1fb73d8bf6cb4df127ee8c0852a8f8f600fa576c Mon Sep 17 00:00:00 2001 From: Agusx1211 Date: Sat, 22 Mar 2025 23:06:40 +0000 Subject: [PATCH 232/439] Move handlers --- .../handlers/devices.ts} | 12 ++++++------ .../signer.ts => manager/handlers/index.ts} | 10 ++++++---- .../handlers/passkeys.ts} | 10 +++++----- packages/wdk/src/manager/manager.ts | 15 +++++++++++---- 4 files changed, 28 insertions(+), 19 deletions(-) rename packages/wdk/src/{signers/DeviceSigner.ts => manager/handlers/devices.ts} (77%) rename packages/wdk/src/{signers/signer.ts => manager/handlers/index.ts} (72%) rename packages/wdk/src/{signers/PasskeySigner.ts => manager/handlers/passkeys.ts} (92%) diff --git a/packages/wdk/src/signers/DeviceSigner.ts b/packages/wdk/src/manager/handlers/devices.ts similarity index 77% rename from packages/wdk/src/signers/DeviceSigner.ts rename to packages/wdk/src/manager/handlers/devices.ts index 3132027fd..5781b0bbe 100644 --- a/packages/wdk/src/signers/DeviceSigner.ts +++ b/packages/wdk/src/manager/handlers/devices.ts @@ -1,11 +1,11 @@ -import * as Db from '../dbs' -import { SignerHandler } from './signer' -import { Kinds } from '../manager/signers' -import { Signatures, SignerReady, SignerUnavailable } from '../manager/signatures' +import * as Db from '../../dbs' +import { Kinds } from '../signers' +import { Signatures, SignerReady, SignerUnavailable } from '../signatures' import { Address, Bytes } from 'ox' -import { Devices } from '../manager/devices' +import { Devices } from '../devices' +import { Handler } from '.' -export class DeviceSignerHandler implements SignerHandler { +export class DevicesHandler implements Handler { kind = Kinds.LocalDevice constructor( diff --git a/packages/wdk/src/signers/signer.ts b/packages/wdk/src/manager/handlers/index.ts similarity index 72% rename from packages/wdk/src/signers/signer.ts rename to packages/wdk/src/manager/handlers/index.ts index b1dfd8063..b464028bf 100644 --- a/packages/wdk/src/signers/signer.ts +++ b/packages/wdk/src/manager/handlers/index.ts @@ -1,9 +1,8 @@ -import * as Db from '../dbs' +import * as Db from '../../dbs' import { Address, Bytes } from 'ox' -import { SignerActionable, SignerReady, SignerUnavailable } from '../manager/signatures' -import { Envelope } from '@0xsequence/sequence-core' +import { SignerActionable, SignerReady, SignerUnavailable } from '../signatures' -export interface SignerHandler { +export interface Handler { kind: string uiStatus(): 'non-required' | 'non-registered' | 'registered' @@ -14,3 +13,6 @@ export interface SignerHandler { request: Db.SignatureRequest, ): Promise } + +export * from './devices' +export * from './passkeys' diff --git a/packages/wdk/src/signers/PasskeySigner.ts b/packages/wdk/src/manager/handlers/passkeys.ts similarity index 92% rename from packages/wdk/src/signers/PasskeySigner.ts rename to packages/wdk/src/manager/handlers/passkeys.ts index 92ff7daf4..95ba55146 100644 --- a/packages/wdk/src/signers/PasskeySigner.ts +++ b/packages/wdk/src/manager/handlers/passkeys.ts @@ -1,12 +1,12 @@ import { Signers, State } from '@0xsequence/sequence-core' -import * as Db from '../dbs' +import * as Db from '../../dbs' import { Address, Bytes, Hex } from 'ox' -import { SignerHandler } from './signer' -import { Kinds } from '../manager/signers' -import { Signatures, SignerActionable, SignerUnavailable } from '../manager/signatures' +import { Kinds } from '../signers' +import { Signatures, SignerActionable, SignerUnavailable } from '../signatures' import { Extensions } from '@0xsequence/sequence-primitives' +import { Handler } from '.' -export class PasskeySigner implements SignerHandler { +export class PasskeysHandler implements Handler { kind = Kinds.LoginPasskey constructor( diff --git a/packages/wdk/src/manager/manager.ts b/packages/wdk/src/manager/manager.ts index abf500623..d833d7757 100644 --- a/packages/wdk/src/manager/manager.ts +++ b/packages/wdk/src/manager/manager.ts @@ -1,4 +1,4 @@ -import { Address, Provider } from 'ox' +import { Address } from 'ox' import { Extensions, Context, Config, Constants, Network } from '@0xsequence/sequence-primitives' import { Signers as CoreSigners, State, Relayer } from '@0xsequence/sequence-core' @@ -8,8 +8,8 @@ import { Devices } from './devices' import { CreateWalletOptions, Wallets } from './wallets' import { Transactions } from './transactions' import { Signatures, Signer } from './signatures' -import { Signers } from './signers' -import { SignerHandler } from '../signers/signer' +import { Kinds, Signers } from './signers' +import { DevicesHandler, Handler, PasskeysHandler } from './handlers' export type Transaction = { to: Address.Address @@ -103,7 +103,7 @@ export type Shared = { readonly sequence: Sequence readonly databases: Databases - readonly handlers: Map + readonly handlers: Map modules: Modules } @@ -149,6 +149,13 @@ export class Manager { transactions: new Transactions(shared), } + shared.handlers.set(Kinds.LocalDevice, new DevicesHandler(modules.signatures, modules.devices)) + + shared.handlers.set( + Kinds.LoginPasskey, + new PasskeysHandler(modules.signatures, shared.sequence.extensions, shared.sequence.stateProvider), + ) + shared.modules = modules this.shared = shared } From fe71b45eebe5bbffd9f17f6e523cb7db9f92a967 Mon Sep 17 00:00:00 2001 From: Agusx1211 Date: Sun, 23 Mar 2025 01:26:57 +0000 Subject: [PATCH 233/439] Add mnemonic handler --- packages/wdk/src/manager/handlers/devices.ts | 6 +- packages/wdk/src/manager/handlers/index.ts | 2 +- packages/wdk/src/manager/handlers/mnemonic.ts | 65 +++++++++++++++++++ packages/wdk/src/manager/handlers/passkeys.ts | 6 +- packages/wdk/src/manager/signatures.ts | 10 +-- 5 files changed, 77 insertions(+), 12 deletions(-) create mode 100644 packages/wdk/src/manager/handlers/mnemonic.ts diff --git a/packages/wdk/src/manager/handlers/devices.ts b/packages/wdk/src/manager/handlers/devices.ts index 5781b0bbe..805ce9088 100644 --- a/packages/wdk/src/manager/handlers/devices.ts +++ b/packages/wdk/src/manager/handlers/devices.ts @@ -13,9 +13,9 @@ export class DevicesHandler implements Handler { private readonly devices: Devices, ) {} - uiStatus(): 'non-required' { - return 'non-required' - } + // uiStatus(): 'non-required' { + // return 'non-required' + // } async status( address: Address.Address, diff --git a/packages/wdk/src/manager/handlers/index.ts b/packages/wdk/src/manager/handlers/index.ts index b464028bf..c37ff70f5 100644 --- a/packages/wdk/src/manager/handlers/index.ts +++ b/packages/wdk/src/manager/handlers/index.ts @@ -5,7 +5,7 @@ import { SignerActionable, SignerReady, SignerUnavailable } from '../signatures' export interface Handler { kind: string - uiStatus(): 'non-required' | 'non-registered' | 'registered' + // uiStatus(): 'non-required' | 'non-registered' | 'registered' status( address: Address.Address, diff --git a/packages/wdk/src/manager/handlers/mnemonic.ts b/packages/wdk/src/manager/handlers/mnemonic.ts new file mode 100644 index 000000000..f9d4993d9 --- /dev/null +++ b/packages/wdk/src/manager/handlers/mnemonic.ts @@ -0,0 +1,65 @@ +import * as Db from '../../dbs' +import { Kinds } from '../signers' +import { Signatures, SignerReady, SignerUnavailable } from '../signatures' +import { Address, Bytes, Hex, Mnemonic } from 'ox' +import { Handler } from '.' +import { Signers } from '@0xsequence/sequence-core' + +export class MnemonicHandler implements Handler { + kind = Kinds.LocalDevice + + private onPromptMnemonic: undefined | (() => Promise<{ mnemonic: string; error: (e: string) => void }>) + + constructor(private readonly signatures: Signatures) {} + + // uiStatus() { + // return this._uiStatus + // } + + async status( + address: Address.Address, + _imageHash: Bytes.Bytes | undefined, + request: Db.SignatureRequest, + ): Promise { + const onPromptMnemonic = this.onPromptMnemonic + if (!onPromptMnemonic) { + return { + address, + handler: this, + reason: 'ui-not-registered', + status: 'unavailable', + } + } + + return { + address, + handler: this, + status: 'ready', + sign: async () => { + const { mnemonic, error } = await onPromptMnemonic() + try { + const pk = Mnemonic.toPrivateKey(mnemonic) + const signer = new Signers.Pk.Pk(Hex.from(pk)) + if (signer.address !== address) { + error('wrong-mnemonic') + return false + } + + const signature = await signer.sign( + request.envelope.wallet, + request.envelope.chainId, + request.envelope.payload, + ) + await this.signatures.addSignature(request.id, { + address, + signature, + }) + return true + } catch { + error('invalid-mnemonic') + return false + } + }, + } + } +} diff --git a/packages/wdk/src/manager/handlers/passkeys.ts b/packages/wdk/src/manager/handlers/passkeys.ts index 95ba55146..035882ed8 100644 --- a/packages/wdk/src/manager/handlers/passkeys.ts +++ b/packages/wdk/src/manager/handlers/passkeys.ts @@ -15,9 +15,9 @@ export class PasskeysHandler implements Handler { private readonly stateReader: State.Reader, ) {} - uiStatus(): 'non-required' { - return 'non-required' - } + // uiStatus(): 'non-required' { + // return 'non-required' + // } private async loadPasskey( wallet: Address.Address, diff --git a/packages/wdk/src/manager/signatures.ts b/packages/wdk/src/manager/signatures.ts index b922429ae..a801deade 100644 --- a/packages/wdk/src/manager/signatures.ts +++ b/packages/wdk/src/manager/signatures.ts @@ -3,8 +3,8 @@ import * as Db from '../dbs' import { Config, Payload } from '@0xsequence/sequence-primitives' import { Envelope } from '@0xsequence/sequence-core' import { v7 as uuidv7 } from 'uuid' -import { SignerHandler } from '../signers/signer' import { Shared } from './manager' +import { Handler } from './handlers' export type SignerBase = { address: Address.Address @@ -12,24 +12,24 @@ export type SignerBase = { } export type SignerSigned = SignerBase & { - handler?: SignerHandler + handler?: Handler status: 'signed' } export type SignerUnavailable = SignerBase & { - handler?: SignerHandler + handler?: Handler reason: string status: 'unavailable' } export type SignerReady = SignerBase & { - handler: SignerHandler + handler: Handler status: 'ready' sign: () => Promise } export type SignerActionable = SignerBase & { - handler: SignerHandler + handler: Handler status: 'actionable' message: string // TODO: Localization? sign: () => Promise From ef9e636fb0c03c3dba1dbefcab02ff6bb0dde120 Mon Sep 17 00:00:00 2001 From: Michael Standen Date: Mon, 24 Mar 2025 07:52:15 +1300 Subject: [PATCH 234/439] Align topology in cmd --- .../primitives-cli/src/subcommands/server.ts | 11 +++--- .../src/subcommands/sessionImplicit.ts | 35 +++++++++---------- 2 files changed, 20 insertions(+), 26 deletions(-) diff --git a/packages/primitives-cli/src/subcommands/server.ts b/packages/primitives-cli/src/subcommands/server.ts index 0ec54f075..0cc1267c0 100644 --- a/packages/primitives-cli/src/subcommands/server.ts +++ b/packages/primitives-cli/src/subcommands/server.ts @@ -161,16 +161,13 @@ const rpcMethods: Record Promise> = { // SESSION IMPLICIT async session_implicit_addBlacklistAddress(params) { - const { blacklistAddress, sessionConfiguration } = params - const result = await sessionImplicit.doAddBlacklistAddress(blacklistAddress, JSON.stringify(sessionConfiguration)) + const { blacklistAddress, sessionTopology } = params + const result = await sessionImplicit.doAddBlacklistAddress(blacklistAddress, JSON.stringify(sessionTopology)) return result }, async session_implicit_removeBlacklistAddress(params) { - const { blacklistAddress, sessionConfiguration } = params - const result = await sessionImplicit.doRemoveBlacklistAddress( - blacklistAddress, - JSON.stringify(sessionConfiguration), - ) + const { blacklistAddress, sessionTopology } = params + const result = await sessionImplicit.doRemoveBlacklistAddress(blacklistAddress, JSON.stringify(sessionTopology)) return result }, diff --git a/packages/primitives-cli/src/subcommands/sessionImplicit.ts b/packages/primitives-cli/src/subcommands/sessionImplicit.ts index 9310cc715..b7b500559 100644 --- a/packages/primitives-cli/src/subcommands/sessionImplicit.ts +++ b/packages/primitives-cli/src/subcommands/sessionImplicit.ts @@ -3,21 +3,18 @@ import { Address } from 'ox' import type { CommandModule } from 'yargs' import { fromPosOrStdin, requireString } from '../utils' -export async function doAddBlacklistAddress( - blacklistAddress: string, - sessionConfigurationInput: string, -): Promise { - const sessionConfiguration = JSON.parse(sessionConfigurationInput) as SessionConfig.SessionsTopology - const updated = SessionConfig.addToImplicitBlacklist(sessionConfiguration, blacklistAddress as Address.Address) +export async function doAddBlacklistAddress(blacklistAddress: string, sessionTopologyInput: string): Promise { + const sessionTopology = SessionConfig.sessionsTopologyFromJson(sessionTopologyInput) + const updated = SessionConfig.addToImplicitBlacklist(sessionTopology, blacklistAddress as Address.Address) return JSON.stringify(updated) } export async function doRemoveBlacklistAddress( blacklistAddress: string, - sessionConfigurationInput: string, + sessionTopologyInput: string, ): Promise { - const sessionConfiguration = JSON.parse(sessionConfigurationInput) as SessionConfig.SessionsTopology - const updated = SessionConfig.removeFromImplicitBlacklist(sessionConfiguration, blacklistAddress as Address.Address) + const sessionTopology = SessionConfig.sessionsTopologyFromJson(sessionTopologyInput) + const updated = SessionConfig.removeFromImplicitBlacklist(sessionTopology, blacklistAddress as Address.Address) return JSON.stringify(updated) } @@ -27,7 +24,7 @@ const sessionImplicitCommand: CommandModule = { builder: (yargs) => { return yargs .command( - 'blacklist-add [blacklist-address] [session-configuration]', + 'blacklist-add [blacklist-address] [session-topology]', 'Add an address to the implicit session blacklist', (yargs) => { return yargs @@ -36,21 +33,21 @@ const sessionImplicitCommand: CommandModule = { description: 'Blacklist address', demandOption: true, }) - .positional('session-configuration', { + .positional('session-topology', { type: 'string', - description: 'Session configuration', + description: 'Session topology', demandOption: true, }) }, async (argv) => { const blacklistAddress = argv.blacklistAddress requireString(blacklistAddress, 'Blacklist address') - const sessionConfigurationInput = await fromPosOrStdin(argv, 'session-configuration') - console.log(await doAddBlacklistAddress(blacklistAddress, sessionConfigurationInput)) + const sessionTopologyInput = await fromPosOrStdin(argv, 'session-topology') + console.log(await doAddBlacklistAddress(blacklistAddress, sessionTopologyInput)) }, ) .command( - 'blacklist-remove [blacklist-address] [session-configuration]', + 'blacklist-remove [blacklist-address] [session-topology]', 'Remove an address from the implicit session blacklist', (yargs) => { return yargs @@ -59,9 +56,9 @@ const sessionImplicitCommand: CommandModule = { description: 'Blacklist address', demandOption: true, }) - .positional('session-configuration', { + .positional('session-topology', { type: 'string', - description: 'Session configuration', + description: 'Session topology', demandOption: true, }) }, @@ -70,8 +67,8 @@ const sessionImplicitCommand: CommandModule = { if (!blacklistAddress) { throw new Error('Blacklist address is required') } - const sessionConfigurationInput = await fromPosOrStdin(argv, 'session-configuration') - console.log(await doRemoveBlacklistAddress(blacklistAddress, sessionConfigurationInput)) + const sessionTopologyInput = await fromPosOrStdin(argv, 'session-topology') + console.log(await doRemoveBlacklistAddress(blacklistAddress, sessionTopologyInput)) }, ) .demandCommand(1, 'You must specify a subcommand for implicit session') From fcd1251103432522bd6854abae2a9e85b6616746 Mon Sep 17 00:00:00 2001 From: Agusx1211 Date: Sun, 23 Mar 2025 19:45:03 +0000 Subject: [PATCH 235/439] db fixes --- package.json | 3 +- packages/wdk/src/dbs/generic.ts | 160 +++++++++++++++++++++++++++ packages/wdk/src/dbs/index.ts | 155 +------------------------- packages/wdk/src/dbs/manager.ts | 12 +- packages/wdk/src/dbs/signatures.ts | 12 +- packages/wdk/src/dbs/signers.ts | 12 +- packages/wdk/src/dbs/transactions.ts | 12 +- packages/wdk/src/manager/manager.ts | 4 + 8 files changed, 207 insertions(+), 163 deletions(-) create mode 100644 packages/wdk/src/dbs/generic.ts diff --git a/package.json b/package.json index eace68884..835128c49 100644 --- a/package.json +++ b/package.json @@ -9,7 +9,8 @@ "lint": "turbo lint", "format": "prettier --write \"**/*.{ts,tsx,md}\"", "postinstall": "lefthook install", - "dev:server": "node packages/primitives-cli/dist/index.js server" + "dev:server": "node packages/primitives-cli/dist/index.js server", + "build:packages": "turbo build --filter=\"./packages/*\"" }, "devDependencies": { "@changesets/cli": "^2.27.11", diff --git a/packages/wdk/src/dbs/generic.ts b/packages/wdk/src/dbs/generic.ts new file mode 100644 index 000000000..7c5c1d4af --- /dev/null +++ b/packages/wdk/src/dbs/generic.ts @@ -0,0 +1,160 @@ +export type DbUpdateType = 'added' | 'updated' | 'removed' + +export type DbUpdateListener = ( + keyValue: T[K], + updateType: DbUpdateType, + oldItem?: T, + newItem?: T, +) => void + +export type Migration = (db: IDBDatabase, transaction: IDBTransaction, event: IDBVersionChangeEvent) => void + +export class Generic { + private _db: IDBDatabase | null = null + private listeners: DbUpdateListener[] = [] + private broadcastChannel?: BroadcastChannel + + /** + * @param dbName The name of the IndexedDB database. + * @param storeName The name of the object store. + * @param key The property key in T to be used as the primary key. + * @param migrations An array of migration functions; the database version is migrations.length + 1. + */ + constructor( + private dbName: string, + private storeName: string, + private key: K, + private migrations: Migration[] = [], + ) { + if (typeof BroadcastChannel !== 'undefined') { + this.broadcastChannel = new BroadcastChannel(this.dbName + '-observer') + this.broadcastChannel.onmessage = (event) => { + if (event.data && event.data.keyValue !== undefined && event.data.updateType) { + this.listeners.forEach((cb) => + cb(event.data.keyValue, event.data.updateType, event.data.oldItem, event.data.newItem), + ) + } + } + } + } + + private async openDB(): Promise { + if (this._db) return this._db + + return new Promise((resolve, reject) => { + const version = this.migrations.length + 1 + const request = indexedDB.open(this.dbName, version) + + request.onupgradeneeded = (event) => { + const db = request.result + const tx = request.transaction! + const oldVersion = (event.oldVersion as number) || 0 + for (let i = oldVersion; i < this.migrations.length; i++) { + const migration = this.migrations[i] + if (!migration) throw new Error(`Migration ${i} not found`) + migration(db, tx, event) + } + } + + request.onsuccess = () => { + this._db = request.result + resolve(this._db) + } + + request.onerror = () => reject(request.error) + request.onblocked = () => console.error('Database upgrade blocked') + }) + } + + private async getStore(mode: IDBTransactionMode): Promise { + const db = await this.openDB() + const tx = db.transaction(this.storeName, mode) + return tx.objectStore(this.storeName) + } + + async get(keyValue: T[K]): Promise { + const store = await this.getStore('readonly') + return new Promise((resolve, reject) => { + const req = store.get(keyValue) + req.onsuccess = () => resolve(req.result as T) + req.onerror = () => reject(req.error) + }) + } + + async list(): Promise { + const store = await this.getStore('readonly') + return new Promise((resolve, reject) => { + const req = store.getAll() + req.onsuccess = () => resolve(req.result as T[]) + req.onerror = () => reject(req.error) + }) + } + + async set(item: T): Promise { + const db = await this.openDB() + return new Promise((resolve, reject) => { + const tx = db.transaction(this.storeName, 'readwrite') + const store = tx.objectStore(this.storeName) + const keyValue = item[this.key] + + const getReq = store.get(keyValue) + getReq.onsuccess = () => { + const oldItem = getReq.result + const putReq = store.put(item, keyValue) + putReq.onsuccess = () => { + let updateType: DbUpdateType | null = null + if (!oldItem) { + updateType = 'added' + } else if (JSON.stringify(oldItem) !== JSON.stringify(item)) { + updateType = 'updated' + } + if (updateType) { + try { + this.notifyUpdate(keyValue, updateType, oldItem, item) + } catch (err) { + console.error('notifyUpdate failed', err) + } + } + resolve(keyValue) + } + putReq.onerror = () => reject(putReq.error) + } + getReq.onerror = () => reject(getReq.error) + }) + } + + async del(keyValue: T[K]): Promise { + const oldItem = await this.get(keyValue) + const store = await this.getStore('readwrite') + return new Promise((resolve, reject) => { + const req = store.delete(keyValue) + req.onsuccess = () => { + if (oldItem) { + try { + this.notifyUpdate(keyValue, 'removed', oldItem, undefined) + } catch (err) { + console.error('notifyUpdate failed', err) + } + } + resolve() + } + req.onerror = () => reject(req.error) + }) + } + + private notifyUpdate(keyValue: T[K], updateType: DbUpdateType, oldItem?: T, newItem?: T): void { + this.listeners.forEach((listener) => listener(keyValue, updateType, oldItem, newItem)) + if (this.broadcastChannel) { + this.broadcastChannel.postMessage({ keyValue, updateType, oldItem, newItem }) + } + } + + addListener(listener: DbUpdateListener): () => void { + this.listeners.push(listener) + return () => this.removeListener(listener) + } + + removeListener(listener: DbUpdateListener): void { + this.listeners = this.listeners.filter((l) => l !== listener) + } +} diff --git a/packages/wdk/src/dbs/index.ts b/packages/wdk/src/dbs/index.ts index 3cf805197..16cba0b39 100644 --- a/packages/wdk/src/dbs/index.ts +++ b/packages/wdk/src/dbs/index.ts @@ -2,157 +2,4 @@ export * from './manager' export * from './signatures' export * from './transactions' export * from './signers' - -export type DbUpdateType = 'added' | 'updated' | 'removed' - -export type DbUpdateListener = ( - keyValue: T[K], - updateType: DbUpdateType, - oldItem?: T, - newItem?: T, -) => void - -export type Migration = (db: IDBDatabase, transaction: IDBTransaction, event: IDBVersionChangeEvent) => void - -export class Generic { - private _db: IDBDatabase | null = null - private listeners: DbUpdateListener[] = [] - private broadcastChannel?: BroadcastChannel - - /** - * @param dbName The name of the IndexedDB database. - * @param storeName The name of the object store. - * @param key The property key in T to be used as the primary key. - * @param migrations An array of migration functions; the database version is migrations.length + 1. - */ - constructor( - private dbName: string, - private storeName: string, - private key: K, - private migrations: Migration[] = [], - ) { - if (typeof BroadcastChannel !== 'undefined') { - this.broadcastChannel = new BroadcastChannel(this.dbName + '-observer') - this.broadcastChannel.onmessage = (event) => { - if (event.data && event.data.keyValue !== undefined && event.data.updateType) { - this.listeners.forEach((cb) => - cb(event.data.keyValue, event.data.updateType, event.data.oldItem, event.data.newItem), - ) - } - } - } - } - - private async openDB(): Promise { - if (this._db) return this._db - - return new Promise((resolve, reject) => { - const version = this.migrations.length + 1 - const request = indexedDB.open(this.dbName, version) - - request.onupgradeneeded = (event) => { - const db = request.result - const tx = request.transaction! - const oldVersion = (event.oldVersion as number) || 0 - for (let i = oldVersion; i < this.migrations.length; i++) { - const migration = this.migrations[i] - if (!migration) throw new Error(`Migration ${i} not found`) - migration(db, tx, event) - } - } - - request.onsuccess = () => { - this._db = request.result - resolve(this._db) - } - - request.onerror = () => reject(request.error) - request.onblocked = () => console.error('Database upgrade blocked') - }) - } - - private async getStore(mode: IDBTransactionMode): Promise { - const db = await this.openDB() - const tx = db.transaction(this.storeName, mode) - return tx.objectStore(this.storeName) - } - - async get(keyValue: T[K]): Promise { - const store = await this.getStore('readonly') - return new Promise((resolve, reject) => { - const req = store.get(keyValue) - req.onsuccess = () => resolve(req.result as T) - req.onerror = () => reject(req.error) - }) - } - - async list(): Promise { - const store = await this.getStore('readonly') - return new Promise((resolve, reject) => { - const req = store.getAll() - req.onsuccess = () => resolve(req.result as T[]) - req.onerror = () => reject(req.error) - }) - } - - async set(item: T): Promise { - const store = await this.getStore('readwrite') - const keyValue = item[this.key] - const oldItem = await this.get(keyValue) - return new Promise((resolve, reject) => { - const req = store.put(item) - req.onsuccess = () => { - let updateType: DbUpdateType | null = null - if (!oldItem) { - updateType = 'added' - } else if (JSON.stringify(oldItem) !== JSON.stringify(item)) { - updateType = 'updated' - } - if (updateType) { - try { - this.notifyUpdate(keyValue, updateType, oldItem, item) - } catch (err) { - console.error('notifyUpdate failed', err) - } - } - resolve(keyValue) - } - req.onerror = () => reject(req.error) - }) - } - - async del(keyValue: T[K]): Promise { - const oldItem = await this.get(keyValue) - const store = await this.getStore('readwrite') - return new Promise((resolve, reject) => { - const req = store.delete(keyValue) - req.onsuccess = () => { - if (oldItem) { - try { - this.notifyUpdate(keyValue, 'removed', oldItem, undefined) - } catch (err) { - console.error('notifyUpdate failed', err) - } - } - resolve() - } - req.onerror = () => reject(req.error) - }) - } - - private notifyUpdate(keyValue: T[K], updateType: DbUpdateType, oldItem?: T, newItem?: T): void { - this.listeners.forEach((listener) => listener(keyValue, updateType, oldItem, newItem)) - if (this.broadcastChannel) { - this.broadcastChannel.postMessage({ keyValue, updateType, oldItem, newItem }) - } - } - - addListener(listener: DbUpdateListener): () => void { - this.listeners.push(listener) - return () => this.removeListener(listener) - } - - removeListener(listener: DbUpdateListener): void { - this.listeners = this.listeners.filter((l) => l !== listener) - } -} +export * from './generic' diff --git a/packages/wdk/src/dbs/manager.ts b/packages/wdk/src/dbs/manager.ts index d73e2f1df..6460e13b9 100644 --- a/packages/wdk/src/dbs/manager.ts +++ b/packages/wdk/src/dbs/manager.ts @@ -1,5 +1,5 @@ import { Address } from 'ox' -import { Generic } from '.' +import { Generic } from './generic' export interface WalletRow { wallet: Address.Address @@ -10,8 +10,16 @@ export interface WalletRow { useGuard: boolean } +const TABLE_NAME = 'wallets' + export class Manager extends Generic { constructor(dbName: string = 'sequence-manager') { - super(dbName, 'wallets', 'wallet') + super(dbName, TABLE_NAME, 'wallet', [ + (db: IDBDatabase) => { + if (!db.objectStoreNames.contains(TABLE_NAME)) { + db.createObjectStore(TABLE_NAME) + } + }, + ]) } } diff --git a/packages/wdk/src/dbs/signatures.ts b/packages/wdk/src/dbs/signatures.ts index e8e90b111..8ed5776ab 100644 --- a/packages/wdk/src/dbs/signatures.ts +++ b/packages/wdk/src/dbs/signatures.ts @@ -1,7 +1,7 @@ import { Address } from 'ox' import { Payload } from '@0xsequence/sequence-primitives' import { Envelope } from '@0xsequence/sequence-core' -import { Generic } from '.' +import { Generic } from './generic' export type SignatureRequest = { id: string @@ -12,8 +12,16 @@ export type SignatureRequest = { status: 'pending' | 'done' | 'rejected' } +const TABLE_NAME = 'envelopes' + export class Signatures extends Generic { constructor(dbName: string = 'sequence-signature-requests') { - super(dbName, 'envelopes', 'id') + super(dbName, TABLE_NAME, 'id', [ + (db: IDBDatabase) => { + if (!db.objectStoreNames.contains(TABLE_NAME)) { + db.createObjectStore(TABLE_NAME) + } + }, + ]) } } diff --git a/packages/wdk/src/dbs/signers.ts b/packages/wdk/src/dbs/signers.ts index f33083d06..1fc1c5ccb 100644 --- a/packages/wdk/src/dbs/signers.ts +++ b/packages/wdk/src/dbs/signers.ts @@ -1,5 +1,5 @@ import { Address } from 'ox' -import { Generic } from '.' +import { Generic } from './generic' export interface SignerRow { address: Address.Address @@ -8,8 +8,16 @@ export interface SignerRow { kind: string } +const TABLE_NAME = 'signers' + export class Signers extends Generic { constructor(dbName: string = 'sequence-signers') { - super(dbName, 'signers', 'address') + super(dbName, TABLE_NAME, 'address', [ + (db: IDBDatabase) => { + if (!db.objectStoreNames.contains(TABLE_NAME)) { + db.createObjectStore(TABLE_NAME) + } + }, + ]) } } diff --git a/packages/wdk/src/dbs/transactions.ts b/packages/wdk/src/dbs/transactions.ts index 32d206c2f..726f8b852 100644 --- a/packages/wdk/src/dbs/transactions.ts +++ b/packages/wdk/src/dbs/transactions.ts @@ -1,7 +1,7 @@ import { Address } from 'ox' import { Payload } from '@0xsequence/sequence-primitives' import { Relayer, Envelope } from '@0xsequence/sequence-core' -import { Generic } from '.' +import { Generic } from './generic' export type TransactionRequest = { to: Address.Address @@ -42,8 +42,16 @@ export type TransactionFormedRow = TransactionBase & { export type TransactionRow = TransactionRequestedRow | TransactionDefinedRow | TransactionFormedRow +const TABLE_NAME = 'transactions' + export class Transactions extends Generic { constructor(dbName: string = 'sequence-transactions') { - super(dbName, 'transactions', 'id') + super(dbName, TABLE_NAME, 'id', [ + (db: IDBDatabase) => { + if (!db.objectStoreNames.contains(TABLE_NAME)) { + db.createObjectStore(TABLE_NAME) + } + }, + ]) } } diff --git a/packages/wdk/src/manager/manager.ts b/packages/wdk/src/manager/manager.ts index d833d7757..427d5da97 100644 --- a/packages/wdk/src/manager/manager.ts +++ b/packages/wdk/src/manager/manager.ts @@ -172,6 +172,10 @@ export class Manager { return this.shared.modules.wallets.exists(address) } + public onWalletsUpdate(cb: (wallets: Address.Address[]) => void, trigger?: boolean) { + return this.shared.modules.wallets.onWalletsUpdate(cb, trigger) + } + public async requestTransaction( from: Address.Address, chainId: bigint, From 7d1326ed11a570500d88ae1efbfa2c1220969a7c Mon Sep 17 00:00:00 2001 From: Agusx1211 Date: Sun, 23 Mar 2025 20:01:43 +0000 Subject: [PATCH 236/439] Single signup flow --- packages/wdk/src/manager/handlers/mnemonic.ts | 46 +++--- packages/wdk/src/manager/manager.ts | 6 +- packages/wdk/src/manager/signers.ts | 1 + packages/wdk/src/manager/wallets.ts | 134 ++++++++++++------ 4 files changed, 114 insertions(+), 73 deletions(-) diff --git a/packages/wdk/src/manager/handlers/mnemonic.ts b/packages/wdk/src/manager/handlers/mnemonic.ts index f9d4993d9..65cfb7e78 100644 --- a/packages/wdk/src/manager/handlers/mnemonic.ts +++ b/packages/wdk/src/manager/handlers/mnemonic.ts @@ -1,6 +1,6 @@ import * as Db from '../../dbs' import { Kinds } from '../signers' -import { Signatures, SignerReady, SignerUnavailable } from '../signatures' +import { Signatures, Signer, SignerReady, SignerUnavailable } from '../signatures' import { Address, Bytes, Hex, Mnemonic } from 'ox' import { Handler } from '.' import { Signers } from '@0xsequence/sequence-core' @@ -12,9 +12,14 @@ export class MnemonicHandler implements Handler { constructor(private readonly signatures: Signatures) {} - // uiStatus() { - // return this._uiStatus - // } + public static toSigner(mnemonic: string): Signers.Pk.Pk | undefined { + try { + const pk = Mnemonic.toPrivateKey(mnemonic) + return new Signers.Pk.Pk(Hex.from(pk)) + } catch { + return undefined + } + } async status( address: Address.Address, @@ -37,28 +42,23 @@ export class MnemonicHandler implements Handler { status: 'ready', sign: async () => { const { mnemonic, error } = await onPromptMnemonic() - try { - const pk = Mnemonic.toPrivateKey(mnemonic) - const signer = new Signers.Pk.Pk(Hex.from(pk)) - if (signer.address !== address) { - error('wrong-mnemonic') - return false - } - - const signature = await signer.sign( - request.envelope.wallet, - request.envelope.chainId, - request.envelope.payload, - ) - await this.signatures.addSignature(request.id, { - address, - signature, - }) - return true - } catch { + const signer = MnemonicHandler.toSigner(mnemonic) + if (!signer) { error('invalid-mnemonic') return false } + + if (signer.address !== address) { + error('wrong-mnemonic') + return false + } + + const signature = await signer.sign(request.envelope.wallet, request.envelope.chainId, request.envelope.payload) + await this.signatures.addSignature(request.id, { + address, + signature, + }) + return true }, } } diff --git a/packages/wdk/src/manager/manager.ts b/packages/wdk/src/manager/manager.ts index 427d5da97..ffc37caa0 100644 --- a/packages/wdk/src/manager/manager.ts +++ b/packages/wdk/src/manager/manager.ts @@ -5,7 +5,7 @@ import { Signers as CoreSigners, State, Relayer } from '@0xsequence/sequence-cor import * as Db from '../dbs' import { Logger } from './logger' import { Devices } from './devices' -import { CreateWalletOptions, Wallets } from './wallets' +import { SignupArgs, Wallets } from './wallets' import { Transactions } from './transactions' import { Signatures, Signer } from './signatures' import { Kinds, Signers } from './signers' @@ -160,8 +160,8 @@ export class Manager { this.shared = shared } - public async createWallet(options: CreateWalletOptions) { - return this.shared.modules.wallets.create(options) + public async signUp(options: SignupArgs) { + return this.shared.modules.wallets.signUp(options) } public async listWallets() { diff --git a/packages/wdk/src/manager/signers.ts b/packages/wdk/src/manager/signers.ts index 06d227f31..36319c034 100644 --- a/packages/wdk/src/manager/signers.ts +++ b/packages/wdk/src/manager/signers.ts @@ -5,6 +5,7 @@ import { Shared } from './manager' export const Kinds = { LocalDevice: 'local-device', LoginPasskey: 'login-passkey', + LoginMnemonic: 'login-mnemonic', Unknown: 'unknown', } as const diff --git a/packages/wdk/src/manager/wallets.ts b/packages/wdk/src/manager/wallets.ts index d71444cc0..9e8f3c32d 100644 --- a/packages/wdk/src/manager/wallets.ts +++ b/packages/wdk/src/manager/wallets.ts @@ -1,14 +1,26 @@ -import { Address } from 'ox' +import { Address, Hex, Mnemonic } from 'ox' import { Signers, Wallet } from '@0xsequence/sequence-core' import { Config } from '@0xsequence/sequence-primitives' import { Kinds, WitnessExtraSignerKind } from './signers' import { Shared } from './manager' +import { MnemonicHandler } from './handlers/mnemonic' -export type CreateWalletOptions = { +export type CommonSignupArgs = { + useGuard?: boolean +} + +export type PasskeySignupArgs = CommonSignupArgs & { kind: 'passkey' useGuard?: boolean } +export type MnemonicSignupArgs = CommonSignupArgs & { + kind: 'mnemonic' + mnemonic: string +} + +export type SignupArgs = PasskeySignupArgs | MnemonicSignupArgs + function buildCappedTree(members: Address.Address[]): Config.Topology { const loginMemberWeight = 1n @@ -95,66 +107,94 @@ export class Wallets { } } - async create(args: CreateWalletOptions) { + private async prepareSignUp( + args: SignupArgs, + ): Promise<{ + signer: (Signers.Signer | Signers.SapientSigner) & Signers.Witnessable + extra: WitnessExtraSignerKind + }> { switch (args.kind) { case 'passkey': const passkeySigner = await Signers.Passkey.Passkey.create(this.shared.sequence.extensions) - this.shared.modules.logger.log('Created new passkey signer:', passkeySigner.address) - // Create the first session - const device = await this.shared.modules.devices.create() - - // If the guard is defined, set threshold to 2, if not, set to 1 - const threshold = this.shared.sequence.defaultGuardTopology ? 2n : 1n + return { + signer: passkeySigner, + extra: { + signerKind: Kinds.LoginPasskey, + }, + } - // Build the login tree - const loginTopology = buildCappedTree([passkeySigner.address]) - const devicesTopology = buildCappedTree([device.address]) - const guardTopology = buildCappedTreeFromTopology(1n, this.shared.sequence.defaultGuardTopology) + case 'mnemonic': + const mnemonicSigner = MnemonicHandler.toSigner(args.mnemonic) + if (!mnemonicSigner) { + throw new Error('invalid-mnemonic') + } - // TODO: Add recovery module - // TODO: Add smart sessions module + this.shared.modules.logger.log('Created new mnemonic signer:', mnemonicSigner.address) - // Create initial configuration - const initialConfiguration: Config.Config = { - checkpoint: 0n, - threshold, - topology: Config.flatLeavesToTopology( - [loginTopology, devicesTopology, guardTopology].filter((x) => x !== undefined) as Config.Leaf[], - ), + return { + signer: mnemonicSigner, + extra: { + signerKind: Kinds.LoginMnemonic, + }, } + } + } - // Create wallet - const wallet = await Wallet.fromConfiguration(initialConfiguration, { - context: this.shared.sequence.context, - stateProvider: this.shared.sequence.stateProvider, - guest: this.shared.sequence.guest, - }) + async signUp(args: SignupArgs) { + const loginSigner = await this.prepareSignUp(args) - this.shared.modules.logger.log('Created new sequence wallet:', wallet.address) + // Create the first session + const device = await this.shared.modules.devices.create() - // Sign witness using device signer - await device.witness(this.shared.sequence.stateProvider, wallet.address) + // If the guard is defined, set threshold to 2, if not, set to 1 + const threshold = this.shared.sequence.defaultGuardTopology ? 2n : 1n - // Sign witness using the passkey signer - await passkeySigner.witness(this.shared.sequence.stateProvider, wallet.address, { - signerKind: Kinds.LoginPasskey, - } as WitnessExtraSignerKind) + // Build the login tree + const loginTopology = buildCappedTree([await loginSigner.signer.address]) + const devicesTopology = buildCappedTree([device.address]) + const guardTopology = buildCappedTreeFromTopology(1n, this.shared.sequence.defaultGuardTopology) - // Save entry in the manager db - await this.shared.databases.manager.set({ - wallet: wallet.address, - status: 'logged-in', - loginDate: new Date().toISOString(), - device: device.address, - loginType: 'passkey', - useGuard: args.useGuard || false, - }) + // TODO: Add recovery module + // TODO: Add smart sessions module - return wallet.address - default: - throw new Error(`Unsupported wallet kind: ${args.kind}`) + // Create initial configuration + const initialConfiguration: Config.Config = { + checkpoint: 0n, + threshold, + topology: Config.flatLeavesToTopology( + [loginTopology, devicesTopology, guardTopology].filter((x) => x !== undefined) as Config.Leaf[], + ), } + + // Create wallet + const wallet = await Wallet.fromConfiguration(initialConfiguration, { + context: this.shared.sequence.context, + stateProvider: this.shared.sequence.stateProvider, + guest: this.shared.sequence.guest, + }) + + this.shared.modules.logger.log('Created new sequence wallet:', wallet.address) + + // Sign witness using device signer + await device.witness(this.shared.sequence.stateProvider, wallet.address) + + // Sign witness using the passkey signer + await loginSigner.signer.witness(this.shared.sequence.stateProvider, wallet.address, { + signerKind: Kinds.LoginPasskey, + } as WitnessExtraSignerKind) + + // Save entry in the manager db + await this.shared.databases.manager.set({ + wallet: wallet.address, + status: 'logged-in', + loginDate: new Date().toISOString(), + device: device.address, + loginType: 'passkey', + useGuard: args.useGuard || false, + }) + + return wallet.address } } From 38e3af753fcd62dcc40b74724bec0987f9d462fd Mon Sep 17 00:00:00 2001 From: Agusx1211 Date: Mon, 24 Mar 2025 17:12:15 +0000 Subject: [PATCH 237/439] Handlers and handle --- packages/wdk/src/manager/handlers/devices.ts | 2 +- packages/wdk/src/manager/handlers/mnemonic.ts | 2 +- packages/wdk/src/manager/handlers/passkeys.ts | 2 +- packages/wdk/src/manager/signatures.ts | 4 +- packages/wdk/src/signers/DeviceSigner.ts | 51 +++++++++++ packages/wdk/src/signers/PasskeySigner.ts | 88 +++++++++++++++++++ 6 files changed, 144 insertions(+), 5 deletions(-) create mode 100644 packages/wdk/src/signers/DeviceSigner.ts create mode 100644 packages/wdk/src/signers/PasskeySigner.ts diff --git a/packages/wdk/src/manager/handlers/devices.ts b/packages/wdk/src/manager/handlers/devices.ts index 805ce9088..6e15b603f 100644 --- a/packages/wdk/src/manager/handlers/devices.ts +++ b/packages/wdk/src/manager/handlers/devices.ts @@ -36,7 +36,7 @@ export class DevicesHandler implements Handler { address, handler: this, status: 'ready', - sign: async () => { + handle: async () => { const signature = await signer.sign(request.envelope.wallet, request.envelope.chainId, request.envelope.payload) await this.signatures.addSignature(request.id, { diff --git a/packages/wdk/src/manager/handlers/mnemonic.ts b/packages/wdk/src/manager/handlers/mnemonic.ts index 65cfb7e78..5c620a3c7 100644 --- a/packages/wdk/src/manager/handlers/mnemonic.ts +++ b/packages/wdk/src/manager/handlers/mnemonic.ts @@ -40,7 +40,7 @@ export class MnemonicHandler implements Handler { address, handler: this, status: 'ready', - sign: async () => { + handle: async () => { const { mnemonic, error } = await onPromptMnemonic() const signer = MnemonicHandler.toSigner(mnemonic) if (!signer) { diff --git a/packages/wdk/src/manager/handlers/passkeys.ts b/packages/wdk/src/manager/handlers/passkeys.ts index 035882ed8..7aaa4e120 100644 --- a/packages/wdk/src/manager/handlers/passkeys.ts +++ b/packages/wdk/src/manager/handlers/passkeys.ts @@ -69,7 +69,7 @@ export class PasskeysHandler implements Handler { ...base, status: 'actionable', message: 'request-interaction-with-passkey', - sign: async () => { + handle: async () => { const signature = await passkey.signSapient( request.envelope.wallet, request.envelope.chainId, diff --git a/packages/wdk/src/manager/signatures.ts b/packages/wdk/src/manager/signatures.ts index a801deade..09510f2c2 100644 --- a/packages/wdk/src/manager/signatures.ts +++ b/packages/wdk/src/manager/signatures.ts @@ -25,14 +25,14 @@ export type SignerUnavailable = SignerBase & { export type SignerReady = SignerBase & { handler: Handler status: 'ready' - sign: () => Promise + handle: () => Promise } export type SignerActionable = SignerBase & { handler: Handler status: 'actionable' message: string // TODO: Localization? - sign: () => Promise + handle: () => Promise } export type Signer = SignerSigned | SignerUnavailable | SignerReady | SignerActionable diff --git a/packages/wdk/src/signers/DeviceSigner.ts b/packages/wdk/src/signers/DeviceSigner.ts new file mode 100644 index 000000000..c72d665bb --- /dev/null +++ b/packages/wdk/src/signers/DeviceSigner.ts @@ -0,0 +1,51 @@ +import * as Db from '../dbs' +import { Kinds } from '../manager/signers' +import { Signatures, SignerReady, SignerUnavailable } from '../manager/signatures' +import { Address, Bytes } from 'ox' +import { Devices } from '../manager/devices' +import { Handler } from '../manager/handlers' + +export class DeviceSignerHandler implements Handler { + kind = Kinds.LocalDevice + + constructor( + private readonly signatures: Signatures, + private readonly devices: Devices, + ) {} + + uiStatus(): 'non-required' { + return 'non-required' + } + + async status( + address: Address.Address, + _imageHash: Bytes.Bytes | undefined, + request: Db.SignatureRequest, + ): Promise { + const signer = await this.devices.get(address) + if (!signer) { + return { + address, + handler: this, + reason: 'not-local-key', + status: 'unavailable', + } as SignerUnavailable + } + + return { + address, + handler: this, + status: 'ready', + handle: async () => { + const signature = await signer.sign(request.envelope.wallet, request.envelope.chainId, request.envelope.payload) + + await this.signatures.addSignature(request.id, { + address, + signature, + }) + + return true + }, + } as SignerReady + } +} diff --git a/packages/wdk/src/signers/PasskeySigner.ts b/packages/wdk/src/signers/PasskeySigner.ts new file mode 100644 index 000000000..4b5bc47e5 --- /dev/null +++ b/packages/wdk/src/signers/PasskeySigner.ts @@ -0,0 +1,88 @@ +import { Signers, State } from '@0xsequence/sequence-core' +import * as Db from '../dbs' +import { Address, Bytes, Hex } from 'ox' +import { Kinds } from '../manager/signers' +import { Signatures, SignerActionable, SignerUnavailable } from '../manager/signatures' +import { Extensions } from '@0xsequence/sequence-primitives' +import { Handler } from '../manager/handlers' + +export class PasskeySigner implements Handler { + kind = Kinds.LoginPasskey + + constructor( + private readonly signatures: Signatures, + private readonly extensions: Pick, + private readonly stateReader: State.Reader, + ) {} + + uiStatus(): 'non-required' { + return 'non-required' + } + + private async loadPasskey( + wallet: Address.Address, + imageHash: Bytes.Bytes, + ): Promise { + try { + return await Signers.Passkey.Passkey.loadFromWitness( + this.stateReader, + this.extensions, + wallet, + Hex.from(imageHash), + ) + } catch (e) { + console.warn('Failed to load passkey:', e) + return undefined + } + } + + async status( + address: Address.Address, + imageHash: Bytes.Bytes | undefined, + request: Db.SignatureRequest, + ): Promise { + const base = { address, imageHash, handler: this } + if (address !== this.extensions.passkeys) { + console.warn( + 'PasskeySigner: status address does not match passkey module address', + address, + this.extensions.passkeys, + ) + return { + ...base, + status: 'unavailable', + reason: 'unknown-error', + } as SignerUnavailable + } + + const passkey = imageHash && (await this.loadPasskey(request.envelope.wallet, imageHash)) + if (!passkey) { + console.warn('PasskeySigner: status failed to load passkey', address, imageHash) + return { + ...base, + status: 'unavailable', + reason: 'unknown-error', + } as SignerUnavailable + } + + return { + ...base, + status: 'actionable', + message: 'request-interaction-with-passkey', + handle: async () => { + const signature = await passkey.signSapient( + request.envelope.wallet, + request.envelope.chainId, + request.envelope.payload, + Hex.from(imageHash), + ) + await this.signatures.addSignature(request.id, { + address, + imageHash, + signature, + }) + return true + }, + } as SignerActionable + } +} From 8a609ef186fa5119841ed68cf181023ad5edd232 Mon Sep 17 00:00:00 2001 From: Agusx1211 Date: Mon, 24 Mar 2025 17:13:20 +0000 Subject: [PATCH 238/439] Remove redundant signers --- packages/wdk/src/signers/DeviceSigner.ts | 51 ------------- packages/wdk/src/signers/PasskeySigner.ts | 88 ----------------------- 2 files changed, 139 deletions(-) delete mode 100644 packages/wdk/src/signers/DeviceSigner.ts delete mode 100644 packages/wdk/src/signers/PasskeySigner.ts diff --git a/packages/wdk/src/signers/DeviceSigner.ts b/packages/wdk/src/signers/DeviceSigner.ts deleted file mode 100644 index c72d665bb..000000000 --- a/packages/wdk/src/signers/DeviceSigner.ts +++ /dev/null @@ -1,51 +0,0 @@ -import * as Db from '../dbs' -import { Kinds } from '../manager/signers' -import { Signatures, SignerReady, SignerUnavailable } from '../manager/signatures' -import { Address, Bytes } from 'ox' -import { Devices } from '../manager/devices' -import { Handler } from '../manager/handlers' - -export class DeviceSignerHandler implements Handler { - kind = Kinds.LocalDevice - - constructor( - private readonly signatures: Signatures, - private readonly devices: Devices, - ) {} - - uiStatus(): 'non-required' { - return 'non-required' - } - - async status( - address: Address.Address, - _imageHash: Bytes.Bytes | undefined, - request: Db.SignatureRequest, - ): Promise { - const signer = await this.devices.get(address) - if (!signer) { - return { - address, - handler: this, - reason: 'not-local-key', - status: 'unavailable', - } as SignerUnavailable - } - - return { - address, - handler: this, - status: 'ready', - handle: async () => { - const signature = await signer.sign(request.envelope.wallet, request.envelope.chainId, request.envelope.payload) - - await this.signatures.addSignature(request.id, { - address, - signature, - }) - - return true - }, - } as SignerReady - } -} diff --git a/packages/wdk/src/signers/PasskeySigner.ts b/packages/wdk/src/signers/PasskeySigner.ts deleted file mode 100644 index 4b5bc47e5..000000000 --- a/packages/wdk/src/signers/PasskeySigner.ts +++ /dev/null @@ -1,88 +0,0 @@ -import { Signers, State } from '@0xsequence/sequence-core' -import * as Db from '../dbs' -import { Address, Bytes, Hex } from 'ox' -import { Kinds } from '../manager/signers' -import { Signatures, SignerActionable, SignerUnavailable } from '../manager/signatures' -import { Extensions } from '@0xsequence/sequence-primitives' -import { Handler } from '../manager/handlers' - -export class PasskeySigner implements Handler { - kind = Kinds.LoginPasskey - - constructor( - private readonly signatures: Signatures, - private readonly extensions: Pick, - private readonly stateReader: State.Reader, - ) {} - - uiStatus(): 'non-required' { - return 'non-required' - } - - private async loadPasskey( - wallet: Address.Address, - imageHash: Bytes.Bytes, - ): Promise { - try { - return await Signers.Passkey.Passkey.loadFromWitness( - this.stateReader, - this.extensions, - wallet, - Hex.from(imageHash), - ) - } catch (e) { - console.warn('Failed to load passkey:', e) - return undefined - } - } - - async status( - address: Address.Address, - imageHash: Bytes.Bytes | undefined, - request: Db.SignatureRequest, - ): Promise { - const base = { address, imageHash, handler: this } - if (address !== this.extensions.passkeys) { - console.warn( - 'PasskeySigner: status address does not match passkey module address', - address, - this.extensions.passkeys, - ) - return { - ...base, - status: 'unavailable', - reason: 'unknown-error', - } as SignerUnavailable - } - - const passkey = imageHash && (await this.loadPasskey(request.envelope.wallet, imageHash)) - if (!passkey) { - console.warn('PasskeySigner: status failed to load passkey', address, imageHash) - return { - ...base, - status: 'unavailable', - reason: 'unknown-error', - } as SignerUnavailable - } - - return { - ...base, - status: 'actionable', - message: 'request-interaction-with-passkey', - handle: async () => { - const signature = await passkey.signSapient( - request.envelope.wallet, - request.envelope.chainId, - request.envelope.payload, - Hex.from(imageHash), - ) - await this.signatures.addSignature(request.id, { - address, - imageHash, - signature, - }) - return true - }, - } as SignerActionable - } -} From b0ec78191cbdc56290268b9ee510e95a8a0c3d16 Mon Sep 17 00:00:00 2001 From: Agusx1211 Date: Mon, 24 Mar 2025 20:29:00 +0000 Subject: [PATCH 239/439] Login wip --- packages/wdk/src/manager/handlers/mnemonic.ts | 11 ++ packages/wdk/src/manager/manager.ts | 23 +++- packages/wdk/src/manager/wallets.ts | 123 +++++++++++++++--- 3 files changed, 138 insertions(+), 19 deletions(-) diff --git a/packages/wdk/src/manager/handlers/mnemonic.ts b/packages/wdk/src/manager/handlers/mnemonic.ts index 5c620a3c7..0f138608f 100644 --- a/packages/wdk/src/manager/handlers/mnemonic.ts +++ b/packages/wdk/src/manager/handlers/mnemonic.ts @@ -12,6 +12,17 @@ export class MnemonicHandler implements Handler { constructor(private readonly signatures: Signatures) {} + public registerUI(onPromptMnemonic: () => Promise<{ mnemonic: string; error: (e: string) => void }>) { + this.onPromptMnemonic = onPromptMnemonic + return () => { + this.onPromptMnemonic = undefined + } + } + + public unregisterUI() { + this.onPromptMnemonic = undefined + } + public static toSigner(mnemonic: string): Signers.Pk.Pk | undefined { try { const pk = Mnemonic.toPrivateKey(mnemonic) diff --git a/packages/wdk/src/manager/manager.ts b/packages/wdk/src/manager/manager.ts index ffc37caa0..c95299c58 100644 --- a/packages/wdk/src/manager/manager.ts +++ b/packages/wdk/src/manager/manager.ts @@ -10,6 +10,7 @@ import { Transactions } from './transactions' import { Signatures, Signer } from './signatures' import { Kinds, Signers } from './signers' import { DevicesHandler, Handler, PasskeysHandler } from './handlers' +import { MnemonicHandler } from './handlers/mnemonic' export type Transaction = { to: Address.Address @@ -111,6 +112,10 @@ export type Shared = { export class Manager { private readonly shared: Shared + private readonly mnemonicHandler: MnemonicHandler + private readonly devicesHandler: DevicesHandler + private readonly passkeysHandler: PasskeysHandler + constructor(options?: ManagerOptions) { const ops = applyDefaults(options) @@ -149,12 +154,18 @@ export class Manager { transactions: new Transactions(shared), } - shared.handlers.set(Kinds.LocalDevice, new DevicesHandler(modules.signatures, modules.devices)) + this.devicesHandler = new DevicesHandler(modules.signatures, modules.devices) + shared.handlers.set(Kinds.LocalDevice, this.devicesHandler) - shared.handlers.set( - Kinds.LoginPasskey, - new PasskeysHandler(modules.signatures, shared.sequence.extensions, shared.sequence.stateProvider), + this.passkeysHandler = new PasskeysHandler( + modules.signatures, + shared.sequence.extensions, + shared.sequence.stateProvider, ) + shared.handlers.set(Kinds.LoginPasskey, this.passkeysHandler) + + this.mnemonicHandler = new MnemonicHandler(modules.signatures) + shared.handlers.set(Kinds.LocalDevice, this.mnemonicHandler) shared.modules = modules this.shared = shared @@ -184,4 +195,8 @@ export class Manager { ) { return this.shared.modules.transactions.request(from, chainId, txs, options) } + + public async registerMnmemonicUI(onPromptMnemonic: () => Promise<{ mnemonic: string; error: (e: string) => void }>) { + return this.mnemonicHandler.registerUI(onPromptMnemonic) + } } diff --git a/packages/wdk/src/manager/wallets.ts b/packages/wdk/src/manager/wallets.ts index 9e8f3c32d..336509cf7 100644 --- a/packages/wdk/src/manager/wallets.ts +++ b/packages/wdk/src/manager/wallets.ts @@ -6,12 +6,11 @@ import { Shared } from './manager' import { MnemonicHandler } from './handlers/mnemonic' export type CommonSignupArgs = { - useGuard?: boolean + ignoreGuard?: boolean } export type PasskeySignupArgs = CommonSignupArgs & { kind: 'passkey' - useGuard?: boolean } export type MnemonicSignupArgs = CommonSignupArgs & { @@ -21,6 +20,16 @@ export type MnemonicSignupArgs = CommonSignupArgs & { export type SignupArgs = PasskeySignupArgs | MnemonicSignupArgs +export type LoginToWalletArgs = { + wallet: Address.Address +} + +export type LoginArgs = LoginToWalletArgs + +export function isLoginToWalletArgs(args: LoginArgs): args is LoginToWalletArgs { + return 'wallet' in args +} + function buildCappedTree(members: Address.Address[]): Config.Topology { const loginMemberWeight = 1n @@ -63,6 +72,59 @@ function buildCappedTreeFromTopology(weight: bigint, topology: Config.Topology): } } +function toConfig( + loginTopology: Config.Topology, + devicesTopology: Config.Topology, + modules: Config.Topology, + guardTopology?: Config.Topology, +): Config.Config { + if (!guardTopology) { + return { + checkpoint: 0n, + threshold: 1n, + topology: [[loginTopology, devicesTopology], modules], + } + } else { + return { + checkpoint: 0n, + threshold: 2n, + topology: [[[loginTopology, devicesTopology], guardTopology], modules], + } + } +} + +function fromConfig(config: Config.Config): { + loginTopology: Config.Topology + devicesTopology: Config.Topology + modules: Config.Topology + guardTopology?: Config.Topology +} { + if (config.threshold === 1n) { + if (Config.isNode(config.topology) && Config.isNode(config.topology[0])) { + return { + loginTopology: config.topology[0][0], + devicesTopology: config.topology[0][1], + modules: config.topology[1], + } + } else { + throw new Error('unknown-config-format') + } + } else if (config.threshold === 2n) { + if (Config.isNode(config.topology) && Config.isNode(config.topology[0]) && Config.isNode(config.topology[0][0])) { + return { + loginTopology: config.topology[0][0][0], + devicesTopology: config.topology[0][0][1], + guardTopology: config.topology[0][1], + modules: config.topology[1], + } + } else { + throw new Error('unknown-config-format') + } + } + + throw new Error('unknown-config-format') +} + export class Wallets { private walletsDbListener: (() => void) | undefined private walletsListeners: ((wallets: Address.Address[]) => void)[] = [] @@ -107,9 +169,7 @@ export class Wallets { } } - private async prepareSignUp( - args: SignupArgs, - ): Promise<{ + private async prepareSignUp(args: SignupArgs): Promise<{ signer: (Signers.Signer | Signers.SapientSigner) & Signers.Witnessable extra: WitnessExtraSignerKind }> { @@ -148,8 +208,9 @@ export class Wallets { // Create the first session const device = await this.shared.modules.devices.create() - // If the guard is defined, set threshold to 2, if not, set to 1 - const threshold = this.shared.sequence.defaultGuardTopology ? 2n : 1n + if (!args.ignoreGuard && !this.shared.sequence.defaultGuardTopology) { + throw new Error('guard is required for signup') + } // Build the login tree const loginTopology = buildCappedTree([await loginSigner.signer.address]) @@ -158,15 +219,15 @@ export class Wallets { // TODO: Add recovery module // TODO: Add smart sessions module + // Placeholder + const modules = { + type: 'signer', + address: '0x0000000000000000000000000000000000000000', + weight: 0n, + } as Config.SignerLeaf // Create initial configuration - const initialConfiguration: Config.Config = { - checkpoint: 0n, - threshold, - topology: Config.flatLeavesToTopology( - [loginTopology, devicesTopology, guardTopology].filter((x) => x !== undefined) as Config.Leaf[], - ), - } + const initialConfiguration = toConfig(loginTopology, devicesTopology, modules, guardTopology) // Create wallet const wallet = await Wallet.fromConfiguration(initialConfiguration, { @@ -192,9 +253,41 @@ export class Wallets { loginDate: new Date().toISOString(), device: device.address, loginType: 'passkey', - useGuard: args.useGuard || false, + useGuard: !args.ignoreGuard, }) return wallet.address } + + async login(args: LoginArgs) { + if (isLoginToWalletArgs(args)) { + const wallet = new Wallet(args.wallet, { + context: this.shared.sequence.context, + stateProvider: this.shared.sequence.stateProvider, + guest: this.shared.sequence.guest, + }) + + const device = await this.shared.modules.devices.create() + const status = await wallet.getStatus() + + const { loginTopology, devicesTopology, modules, guardTopology } = fromConfig(status.configuration) + + // Add device to devices topology + const prevDevices = Config.getSigners(devicesTopology) + if (prevDevices.sapientSigners.length > 0) { + throw new Error('found-sapient-signer-in-devices-topology') + } + + if (!prevDevices.isComplete) { + throw new Error('devices-topology-incomplete') + } + + const nextDevicesTopology = buildCappedTree([...prevDevices.signers, device.address]) + + const envelope = await wallet.prepareUpdate({ + ...status.configuration, + topology: [[loginTopology, nextDevicesTopology], modules], + }) + } + } } From 6e567711ba45a4b2fa5b7d02c532c01870b44928 Mon Sep 17 00:00:00 2001 From: Agusx1211 Date: Tue, 25 Mar 2025 17:41:23 +0000 Subject: [PATCH 240/439] add wdk methods --- packages/core/src/envelope.ts | 13 +- packages/core/src/signers/pk/encrypted.ts | 7 + packages/core/src/wallet.ts | 4 +- packages/wdk/src/dbs/manager.ts | 2 +- packages/wdk/src/dbs/signatures.ts | 3 +- packages/wdk/src/manager/devices.ts | 4 + packages/wdk/src/manager/handlers/devices.ts | 6 +- packages/wdk/src/manager/handlers/index.ts | 2 +- packages/wdk/src/manager/handlers/mnemonic.ts | 6 +- packages/wdk/src/manager/handlers/passkeys.ts | 6 +- packages/wdk/src/manager/index.ts | 1 + packages/wdk/src/manager/manager.ts | 29 +++- packages/wdk/src/manager/signatures.ts | 145 ++++++++++++----- packages/wdk/src/manager/wallets.ts | 153 ++++++++++++++---- 14 files changed, 291 insertions(+), 90 deletions(-) diff --git a/packages/core/src/envelope.ts b/packages/core/src/envelope.ts index 222631125..bf8c803f4 100644 --- a/packages/core/src/envelope.ts +++ b/packages/core/src/envelope.ts @@ -2,10 +2,10 @@ import { Config, Payload, Signature } from '@0xsequence/sequence-primitives' import { Address, Bytes } from 'ox' export type Envelope = { - wallet: Address.Address - chainId: bigint - configuration: Config.Config - payload: T + readonly wallet: Address.Address + readonly chainId: bigint + readonly configuration: Config.Config + readonly payload: T } export type Signature = { @@ -54,6 +54,11 @@ export function weightOf(envelope: Signed): { weight: bigint; t } } +export function reachedThreshold(envelope: Signed): boolean { + const { weight, threshold } = weightOf(envelope) + return weight >= threshold +} + export function encodeSignature(envelope: Signed): Signature.RawSignature { const topology = Signature.fillLeaves( envelope.configuration.topology, diff --git a/packages/core/src/signers/pk/encrypted.ts b/packages/core/src/signers/pk/encrypted.ts index 2c2b62798..2da811d62 100644 --- a/packages/core/src/signers/pk/encrypted.ts +++ b/packages/core/src/signers/pk/encrypted.ts @@ -116,6 +116,13 @@ export class EncryptedPksDb { const allEntries = await this.getAllData() return allEntries.map((entry) => entry.address) } + + async remove(address: Address.Address) { + const dbKey = `pk_${address}` + await this.putData(dbKey, undefined) + const keyPointer = this.localStorageKeyPrefix + address + window.localStorage.removeItem(keyPointer) + } } export class EncryptedPkStore implements PkStore { diff --git a/packages/core/src/wallet.ts b/packages/core/src/wallet.ts index 96eab61b2..e8512fd12 100644 --- a/packages/core/src/wallet.ts +++ b/packages/core/src/wallet.ts @@ -85,9 +85,9 @@ export class Wallet { } } - async submitUpdate(envelope: Envelope.Signed, provider: Provider.Provider): Promise { + async submitUpdate(envelope: Envelope.Signed): Promise { const [status, newConfig] = await Promise.all([ - this.getStatus(provider), + this.getStatus(), this.stateProvider.getConfiguration(envelope.payload.imageHash), ]) diff --git a/packages/wdk/src/dbs/manager.ts b/packages/wdk/src/dbs/manager.ts index 6460e13b9..24ea8e47d 100644 --- a/packages/wdk/src/dbs/manager.ts +++ b/packages/wdk/src/dbs/manager.ts @@ -3,7 +3,7 @@ import { Generic } from './generic' export interface WalletRow { wallet: Address.Address - status: string + status: 'ready' | 'logging-in' loginDate: string device: Address.Address loginType: string diff --git a/packages/wdk/src/dbs/signatures.ts b/packages/wdk/src/dbs/signatures.ts index 8ed5776ab..116357547 100644 --- a/packages/wdk/src/dbs/signatures.ts +++ b/packages/wdk/src/dbs/signatures.ts @@ -9,7 +9,8 @@ export type SignatureRequest = { envelope: Envelope.Signed origin: string reason: string - status: 'pending' | 'done' | 'rejected' + createdAt: string + status: 'pending' | 'completed' | 'rejected' } const TABLE_NAME = 'envelopes' diff --git a/packages/wdk/src/manager/devices.ts b/packages/wdk/src/manager/devices.ts index bc6bbbc40..b6a4c52dc 100644 --- a/packages/wdk/src/manager/devices.ts +++ b/packages/wdk/src/manager/devices.ts @@ -46,4 +46,8 @@ export class Devices { signerKind: Kinds.LocalDevice, } as WitnessExtraSignerKind) } + + async remove(address: Address.Address) { + await this.shared.databases.encryptedPks.remove(address) + } } diff --git a/packages/wdk/src/manager/handlers/devices.ts b/packages/wdk/src/manager/handlers/devices.ts index 6e15b603f..725a949ed 100644 --- a/packages/wdk/src/manager/handlers/devices.ts +++ b/packages/wdk/src/manager/handlers/devices.ts @@ -13,9 +13,9 @@ export class DevicesHandler implements Handler { private readonly devices: Devices, ) {} - // uiStatus(): 'non-required' { - // return 'non-required' - // } + onStatusChange(cb: () => void): () => void { + return () => {} + } async status( address: Address.Address, diff --git a/packages/wdk/src/manager/handlers/index.ts b/packages/wdk/src/manager/handlers/index.ts index c37ff70f5..9d4123faa 100644 --- a/packages/wdk/src/manager/handlers/index.ts +++ b/packages/wdk/src/manager/handlers/index.ts @@ -5,7 +5,7 @@ import { SignerActionable, SignerReady, SignerUnavailable } from '../signatures' export interface Handler { kind: string - // uiStatus(): 'non-required' | 'non-registered' | 'registered' + onStatusChange(cb: () => void): () => void status( address: Address.Address, diff --git a/packages/wdk/src/manager/handlers/mnemonic.ts b/packages/wdk/src/manager/handlers/mnemonic.ts index 0f138608f..d621545f1 100644 --- a/packages/wdk/src/manager/handlers/mnemonic.ts +++ b/packages/wdk/src/manager/handlers/mnemonic.ts @@ -6,7 +6,7 @@ import { Handler } from '.' import { Signers } from '@0xsequence/sequence-core' export class MnemonicHandler implements Handler { - kind = Kinds.LocalDevice + kind = Kinds.LoginMnemonic private onPromptMnemonic: undefined | (() => Promise<{ mnemonic: string; error: (e: string) => void }>) @@ -23,6 +23,10 @@ export class MnemonicHandler implements Handler { this.onPromptMnemonic = undefined } + onStatusChange(_cb: () => void): () => void { + return () => {} + } + public static toSigner(mnemonic: string): Signers.Pk.Pk | undefined { try { const pk = Mnemonic.toPrivateKey(mnemonic) diff --git a/packages/wdk/src/manager/handlers/passkeys.ts b/packages/wdk/src/manager/handlers/passkeys.ts index 7aaa4e120..154e41e9b 100644 --- a/packages/wdk/src/manager/handlers/passkeys.ts +++ b/packages/wdk/src/manager/handlers/passkeys.ts @@ -15,9 +15,9 @@ export class PasskeysHandler implements Handler { private readonly stateReader: State.Reader, ) {} - // uiStatus(): 'non-required' { - // return 'non-required' - // } + onStatusChange(cb: () => void): () => void { + return () => {} + } private async loadPasskey( wallet: Address.Address, diff --git a/packages/wdk/src/manager/index.ts b/packages/wdk/src/manager/index.ts index 0f1b5674a..3ad4d311d 100644 --- a/packages/wdk/src/manager/index.ts +++ b/packages/wdk/src/manager/index.ts @@ -1 +1,2 @@ export * from './manager' +export * from './signatures' diff --git a/packages/wdk/src/manager/manager.ts b/packages/wdk/src/manager/manager.ts index c95299c58..e0fb2f462 100644 --- a/packages/wdk/src/manager/manager.ts +++ b/packages/wdk/src/manager/manager.ts @@ -7,7 +7,7 @@ import { Logger } from './logger' import { Devices } from './devices' import { SignupArgs, Wallets } from './wallets' import { Transactions } from './transactions' -import { Signatures, Signer } from './signatures' +import { BaseSignatureRequest, SignatureRequest, Signatures } from './signatures' import { Kinds, Signers } from './signers' import { DevicesHandler, Handler, PasskeysHandler } from './handlers' import { MnemonicHandler } from './handlers/mnemonic' @@ -165,7 +165,7 @@ export class Manager { shared.handlers.set(Kinds.LoginPasskey, this.passkeysHandler) this.mnemonicHandler = new MnemonicHandler(modules.signatures) - shared.handlers.set(Kinds.LocalDevice, this.mnemonicHandler) + shared.handlers.set(Kinds.LoginMnemonic, this.mnemonicHandler) shared.modules = modules this.shared = shared @@ -175,6 +175,10 @@ export class Manager { return this.shared.modules.wallets.signUp(options) } + public async logout(wallet: Address.Address, options?: { skipRemoveDevice?: boolean }) { + return this.shared.modules.wallets.logout(wallet, options) + } + public async listWallets() { return this.shared.modules.wallets.list() } @@ -187,6 +191,27 @@ export class Manager { return this.shared.modules.wallets.onWalletsUpdate(cb, trigger) } + public async listSignatureRequests(): Promise { + return this.shared.modules.signatures.list() + } + + public async getSignatureRequest(requestId: string): Promise { + return this.shared.modules.signatures.get(requestId) + } + + public onSignatureRequestsUpdate(cb: (requests: BaseSignatureRequest[]) => void, trigger?: boolean) { + return this.shared.modules.signatures.onSignatureRequestsUpdate(cb, trigger) + } + + public async onSignatureRequestUpdate( + requestId: string, + cb: (requests: SignatureRequest) => void, + onError?: (error: Error) => void, + trigger?: boolean, + ) { + return this.shared.modules.signatures.onSignatureRequestUpdate(requestId, cb, onError, trigger) + } + public async requestTransaction( from: Address.Address, chainId: bigint, diff --git a/packages/wdk/src/manager/signatures.ts b/packages/wdk/src/manager/signatures.ts index 09510f2c2..267c79b1a 100644 --- a/packages/wdk/src/manager/signatures.ts +++ b/packages/wdk/src/manager/signatures.ts @@ -37,7 +37,9 @@ export type SignerActionable = SignerBase & { export type Signer = SignerSigned | SignerUnavailable | SignerReady | SignerActionable -export type SignatureRequest = Db.SignatureRequest & { +export type BaseSignatureRequest = Db.SignatureRequest + +export type SignatureRequest = BaseSignatureRequest & { signers: Signer[] } @@ -48,39 +50,7 @@ export class Signatures { return this.shared.databases.signatures.list() } - async request( - envelope: Envelope.Envelope, - options: { - origin?: string - reason?: string - }, - ): Promise { - const id = uuidv7() - - await this.shared.databases.signatures.set({ - id, - wallet: envelope.wallet, - envelope: Envelope.toSigned(envelope), - origin: options.origin ?? 'unknown', - reason: options.reason ?? 'unknown', - status: 'pending', - }) - - return id - } - - async addSignature(requestId: string, signature: Envelope.SapientSignature | Envelope.Signature) { - const request = await this.shared.databases.signatures.get(requestId) - if (!request) { - throw new Error(`Request not found for ${requestId}`) - } - - Envelope.addSignature(request.envelope, signature) - - await this.shared.databases.signatures.set(request) - } - - async sign(requestId: string, onSigners: (signers: Signer[]) => void): Promise { + async get(requestId: string): Promise { const request = await this.shared.databases.signatures.get(requestId) if (!request) { throw new Error(`Request not found for ${requestId}`) @@ -125,7 +95,16 @@ export class Signatures { return sig.address === sak.address }) - const handler = sak.kind && this.shared.handlers.get(sak.kind) + if (!sak.kind) { + return { + ...base, + handler: undefined, + reason: 'unknown-signer-kind', + status: 'unavailable', + } as SignerUnavailable + } + + const handler = this.shared.handlers.get(sak.kind) if (signed) { return { ...base, @@ -138,7 +117,7 @@ export class Signatures { return { ...base, handler: undefined, - reason: 'unknown-kind', + reason: 'no-handler', status: 'unavailable', } as SignerUnavailable } @@ -147,8 +126,98 @@ export class Signatures { }), ) - onSigners(statuses) + return { + ...request, + signers: statuses, + } + } + + async onSignatureRequestUpdate( + requestId: string, + cb: (requests: SignatureRequest) => void, + onError?: (error: Error) => void, + trigger?: boolean, + ): Promise<() => void> { + const undoDbListener = this.shared.databases.signatures.addListener(() => { + this.get(requestId) + .then((request) => cb(request)) + .catch((error) => onError?.(error)) + }) + + const undoHandlerListeners = Object.values(this.shared.handlers).map((handler) => + handler.onStatusChange(() => { + this.get(requestId) + .then((request) => cb(request)) + .catch((error) => onError?.(error)) + }), + ) - return false + if (trigger) { + this.get(requestId) + .then((request) => cb(request)) + .catch((error) => onError?.(error)) + } + + return () => { + undoDbListener() + undoHandlerListeners.forEach((undoFn) => undoFn()) + } + } + + onSignatureRequestsUpdate(cb: (requests: BaseSignatureRequest[]) => void, trigger?: boolean) { + const undo = this.shared.databases.signatures.addListener(() => { + this.list().then((l) => cb(l)) + }) + + if (trigger) { + this.list().then((l) => cb(l)) + } + + return undo + } + + async complete(requestId: string) { + const request = await this.get(requestId) + if (request.status !== 'pending') { + throw new Error('request-not-pending') + } + + return this.shared.databases.signatures.set({ + ...request, + status: 'completed', + }) + } + + async request( + envelope: Envelope.Envelope, + options: { + origin?: string + reason?: string + }, + ): Promise { + const id = uuidv7() + + await this.shared.databases.signatures.set({ + id, + wallet: envelope.wallet, + envelope: Envelope.toSigned(envelope), + origin: options.origin ?? 'unknown', + reason: options.reason ?? 'unknown', + status: 'pending', + createdAt: new Date().toISOString(), + }) + + return id + } + + async addSignature(requestId: string, signature: Envelope.SapientSignature | Envelope.Signature) { + const request = await this.shared.databases.signatures.get(requestId) + if (!request) { + throw new Error(`Request not found for ${requestId}`) + } + + Envelope.addSignature(request.envelope, signature) + + await this.shared.databases.signatures.set(request) } } diff --git a/packages/wdk/src/manager/wallets.ts b/packages/wdk/src/manager/wallets.ts index 336509cf7..480b3e050 100644 --- a/packages/wdk/src/manager/wallets.ts +++ b/packages/wdk/src/manager/wallets.ts @@ -1,6 +1,6 @@ import { Address, Hex, Mnemonic } from 'ox' -import { Signers, Wallet } from '@0xsequence/sequence-core' -import { Config } from '@0xsequence/sequence-primitives' +import { Envelope, Signers, Wallet } from '@0xsequence/sequence-core' +import { Config, Payload } from '@0xsequence/sequence-primitives' import { Kinds, WitnessExtraSignerKind } from './signers' import { Shared } from './manager' import { MnemonicHandler } from './handlers/mnemonic' @@ -34,7 +34,13 @@ function buildCappedTree(members: Address.Address[]): Config.Topology { const loginMemberWeight = 1n if (members.length === 0) { - throw new Error('Cannot build login tree with no members') + // We need to maintain the general structure of the tree, so we can't have an empty node here + // instead, we add a dummy signer with weight 0 + return { + type: 'signer', + address: '0x0000000000000000000000000000000000000000', + weight: 0n, + } as Config.SignerLeaf } if (members.length === 1) { @@ -126,9 +132,6 @@ function fromConfig(config: Config.Config): { } export class Wallets { - private walletsDbListener: (() => void) | undefined - private walletsListeners: ((wallets: Address.Address[]) => void)[] = [] - constructor(private readonly shared: Shared) {} public async exists(wallet: Address.Address): Promise { @@ -140,15 +143,11 @@ export class Wallets { } public onWalletsUpdate(cb: (wallets: Address.Address[]) => void, trigger?: boolean) { - if (!this.walletsDbListener) { - this.walletsDbListener = this.shared.databases.manager.addListener(() => { - this.list().then((wallets) => { - this.walletsListeners.forEach((cb) => cb(wallets)) - }) + const undo = this.shared.databases.manager.addListener((wallets) => { + this.list().then((wallets) => { + cb(wallets) }) - } - - this.walletsListeners.push(cb) + }) if (trigger) { this.list().then((wallets) => { @@ -156,17 +155,7 @@ export class Wallets { }) } - return () => { - this.removeOnWalletsUpdate(cb) - } - } - - public removeOnWalletsUpdate(cb: (wallets: Address.Address[]) => void) { - this.walletsListeners = this.walletsListeners.filter((x) => x !== cb) - if (this.walletsListeners.length === 0 && this.walletsDbListener) { - this.walletsDbListener() - this.walletsDbListener = undefined - } + return undo } private async prepareSignUp(args: SignupArgs): Promise<{ @@ -239,17 +228,15 @@ export class Wallets { this.shared.modules.logger.log('Created new sequence wallet:', wallet.address) // Sign witness using device signer - await device.witness(this.shared.sequence.stateProvider, wallet.address) + await this.shared.modules.devices.witness(device.address, wallet.address) // Sign witness using the passkey signer - await loginSigner.signer.witness(this.shared.sequence.stateProvider, wallet.address, { - signerKind: Kinds.LoginPasskey, - } as WitnessExtraSignerKind) + await loginSigner.signer.witness(this.shared.sequence.stateProvider, wallet.address, loginSigner.extra) // Save entry in the manager db await this.shared.databases.manager.set({ wallet: wallet.address, - status: 'logged-in', + status: 'ready', loginDate: new Date().toISOString(), device: device.address, loginType: 'passkey', @@ -282,12 +269,110 @@ export class Wallets { throw new Error('devices-topology-incomplete') } - const nextDevicesTopology = buildCappedTree([...prevDevices.signers, device.address]) + const nextDevicesTopology = buildCappedTree([ + ...prevDevices.signers.filter((x) => x !== '0x0000000000000000000000000000000000000000'), + device.address, + ]) + const envelope = await wallet.prepareUpdate(toConfig(loginTopology, nextDevicesTopology, modules, guardTopology)) + + const requestId = await this.shared.modules.signatures.request(envelope, { + origin: 'login', + reason: 'login', + }) + + await this.shared.modules.devices.witness(device.address, wallet.address) - const envelope = await wallet.prepareUpdate({ - ...status.configuration, - topology: [[loginTopology, nextDevicesTopology], modules], + await this.shared.databases.manager.set({ + wallet: wallet.address, + status: 'logging-in', + loginDate: new Date().toISOString(), + device: device.address, + loginType: 'passkey', + useGuard: guardTopology !== undefined, }) + + return requestId + } + } + + async completeLogin(requestId: string) { + const request = await this.shared.modules.signatures.get(requestId) + + const envelope = request.envelope + if (!Payload.isConfigUpdate(envelope.payload)) { + throw new Error('invalid-request-payload') + } + + if (!Envelope.reachedThreshold(envelope)) { + throw new Error('insufficient-weight') + } + + const walletEntry = await this.shared.databases.manager.get(request.wallet) + if (!walletEntry) { + throw new Error('login-for-wallet-not-found') + } + + const wallet = new Wallet(request.wallet, { + context: this.shared.sequence.context, + stateProvider: this.shared.sequence.stateProvider, + guest: this.shared.sequence.guest, + }) + + await wallet.submitUpdate(envelope as Envelope.Signed) + await this.shared.modules.signatures.complete(requestId) + + // Save entry in the manager db + await this.shared.databases.manager.set({ + ...walletEntry, + status: 'ready', + loginDate: new Date().toISOString(), + }) + } + + async logout( + wallet: Address.Address, + options?: T, + ): Promise { + const walletEntry = await this.shared.databases.manager.get(wallet) + if (!walletEntry) { + throw new Error('wallet-not-found') + } + + if (options?.skipRemoveDevice) { + await Promise.all([ + this.shared.databases.manager.del(wallet), + this.shared.modules.devices.remove(walletEntry.device), + ]) + return undefined as any + } + + const device = await this.shared.modules.devices.get(walletEntry.device) + if (!device) { + throw new Error('device-not-found') } + + const walletObj = new Wallet(wallet, { + context: this.shared.sequence.context, + stateProvider: this.shared.sequence.stateProvider, + guest: this.shared.sequence.guest, + }) + + const status = await walletObj.getStatus() + const { loginTopology, devicesTopology, modules, guardTopology } = fromConfig(status.configuration) + + const nextDevicesTopology = buildCappedTree( + Config.getSigners(devicesTopology).signers.filter( + (x) => x !== device.address && x !== '0x0000000000000000000000000000000000000000', + ), + ) + + const envelope = await walletObj.prepareUpdate(toConfig(loginTopology, nextDevicesTopology, modules, guardTopology)) + + const requestId = await this.shared.modules.signatures.request(envelope, { + origin: 'logout', + reason: 'logout', + }) + + return requestId as any } } From c5ab10ae59d8075eedff7fd5d3e3adb9662a2207 Mon Sep 17 00:00:00 2001 From: Agusx1211 Date: Tue, 25 Mar 2025 20:55:36 +0000 Subject: [PATCH 241/439] Wip sign --- packages/core/src/envelope.ts | 4 +-- packages/core/src/state/local/index.ts | 2 -- packages/core/src/wallet.ts | 12 ++++++- packages/primitives/src/config.ts | 5 ++- packages/wdk/src/dbs/generic.ts | 23 ++++++++++++- packages/wdk/src/dbs/signatures.ts | 22 ++++++++++--- packages/wdk/src/manager/manager.ts | 6 +++- packages/wdk/src/manager/signatures.ts | 22 +++++-------- packages/wdk/src/manager/transactions.ts | 3 +- packages/wdk/src/manager/wallets.ts | 41 ++++++++++++++++++------ 10 files changed, 101 insertions(+), 39 deletions(-) diff --git a/packages/core/src/envelope.ts b/packages/core/src/envelope.ts index bf8c803f4..c99c061e6 100644 --- a/packages/core/src/envelope.ts +++ b/packages/core/src/envelope.ts @@ -46,10 +46,10 @@ export function signatureForLeaf(envelope: Signed, leaf: Config } export function weightOf(envelope: Signed): { weight: bigint; threshold: bigint } { - const { maxWeight } = Config.getWeight(envelope.configuration, (s) => !!signatureForLeaf(envelope, s)) + const { weight } = Config.getWeight(envelope.configuration, (s) => !!signatureForLeaf(envelope, s)) return { - weight: maxWeight, + weight: weight, threshold: envelope.configuration.threshold, } } diff --git a/packages/core/src/state/local/index.ts b/packages/core/src/state/local/index.ts index 650967e02..8406b1e8f 100644 --- a/packages/core/src/state/local/index.ts +++ b/packages/core/src/state/local/index.ts @@ -383,8 +383,6 @@ export class Provider implements ProviderInterface { } } } - - throw new Error('Unsupported signature type') } getTree(rootHash: Hex.Hex): GenericTree.Tree | Promise | undefined { diff --git a/packages/core/src/wallet.ts b/packages/core/src/wallet.ts index e8512fd12..609f4b008 100644 --- a/packages/core/src/wallet.ts +++ b/packages/core/src/wallet.ts @@ -85,7 +85,10 @@ export class Wallet { } } - async submitUpdate(envelope: Envelope.Signed): Promise { + async submitUpdate( + envelope: Envelope.Signed, + options?: { validateSave?: boolean }, + ): Promise { const [status, newConfig] = await Promise.all([ this.getStatus(), this.stateProvider.getConfiguration(envelope.payload.imageHash), @@ -103,6 +106,13 @@ export class Wallet { const signature = Envelope.encodeSignature(updatedEnvelope) await this.stateProvider.saveUpdate(this.address, newConfig, signature) + + if (options?.validateSave) { + const status = await this.getStatus() + if (Hex.from(Config.hashConfiguration(status.configuration)) !== envelope.payload.imageHash) { + throw new Error('configuration not saved') + } + } } async getStatus(provider?: Provider.Provider): Promise { diff --git a/packages/primitives/src/config.ts b/packages/primitives/src/config.ts index 4e0a3a108..0579a9f25 100644 --- a/packages/primitives/src/config.ts +++ b/packages/primitives/src/config.ts @@ -162,10 +162,9 @@ export function findSignerLeaf( export function getWeight( topology: RawTopology | RawConfig, - canSign?: (signer: SignerLeaf | SapientSignerLeaf) => boolean, + canSign: (signer: SignerLeaf | SapientSignerLeaf) => boolean, ): { weight: bigint; maxWeight: bigint } { topology = isRawConfig(topology) ? topology.topology : topology - canSign = canSign || ((_signer: SignerLeaf | SapientSignerLeaf) => true) if (isSignedSignerLeaf(topology)) { return { weight: topology.weight, maxWeight: topology.weight } @@ -182,7 +181,7 @@ export function getWeight( } else if (isAnyAddressSubdigestLeaf(topology)) { return { weight: 0n, maxWeight: 0n } } else if (isRawNestedLeaf(topology)) { - const { weight, maxWeight } = getWeight(topology.tree) + const { weight, maxWeight } = getWeight(topology.tree, canSign) return { weight: weight >= topology.threshold ? topology.weight : 0n, maxWeight: maxWeight >= topology.threshold ? topology.weight : 0n, diff --git a/packages/wdk/src/dbs/generic.ts b/packages/wdk/src/dbs/generic.ts index 7c5c1d4af..6a049ee0b 100644 --- a/packages/wdk/src/dbs/generic.ts +++ b/packages/wdk/src/dbs/generic.ts @@ -9,6 +9,27 @@ export type DbUpdateListener = ( export type Migration = (db: IDBDatabase, transaction: IDBTransaction, event: IDBVersionChangeEvent) => void +function deepEqual(a: any, b: any): boolean { + if (a === b) { + return true + } + + if (a === null || b === null || typeof a !== 'object' || typeof b !== 'object') { + return false + } + + const keysA = Object.keys(a) + const keysB = Object.keys(b) + if (keysA.length !== keysB.length) return false + + for (const key of keysA) { + if (!keysB.includes(key)) return false + if (!deepEqual(a[key], b[key])) return false + } + + return true +} + export class Generic { private _db: IDBDatabase | null = null private listeners: DbUpdateListener[] = [] @@ -105,7 +126,7 @@ export class Generic { let updateType: DbUpdateType | null = null if (!oldItem) { updateType = 'added' - } else if (JSON.stringify(oldItem) !== JSON.stringify(item)) { + } else if (!deepEqual(oldItem, item)) { updateType = 'updated' } if (updateType) { diff --git a/packages/wdk/src/dbs/signatures.ts b/packages/wdk/src/dbs/signatures.ts index 116357547..1a8c42fda 100644 --- a/packages/wdk/src/dbs/signatures.ts +++ b/packages/wdk/src/dbs/signatures.ts @@ -3,14 +3,28 @@ import { Payload } from '@0xsequence/sequence-primitives' import { Envelope } from '@0xsequence/sequence-core' import { Generic } from './generic' -export type SignatureRequest = { +export type ActionToPayload = { + [Actions.Logout]: Payload.ConfigUpdate + [Actions.Login]: Payload.ConfigUpdate + [Actions.SendTransaction]: Payload.Calls +} + +export const Actions = { + Logout: 'logout', + Login: 'login', + SendTransaction: 'send-transaction', +} as const + +export type Action = (typeof Actions)[keyof typeof Actions] + +export type SignatureRequest = { id: string wallet: Address.Address - envelope: Envelope.Signed origin: string - reason: string createdAt: string - status: 'pending' | 'completed' | 'rejected' + + action: A + envelope: Envelope.Signed } const TABLE_NAME = 'envelopes' diff --git a/packages/wdk/src/manager/manager.ts b/packages/wdk/src/manager/manager.ts index e0fb2f462..fc9d63fe8 100644 --- a/packages/wdk/src/manager/manager.ts +++ b/packages/wdk/src/manager/manager.ts @@ -179,6 +179,10 @@ export class Manager { return this.shared.modules.wallets.logout(wallet, options) } + public async completeLogout(requestId: string, options?: { skipValidateSave?: boolean }) { + return this.shared.modules.wallets.completeLogout(requestId, options) + } + public async listWallets() { return this.shared.modules.wallets.list() } @@ -221,7 +225,7 @@ export class Manager { return this.shared.modules.transactions.request(from, chainId, txs, options) } - public async registerMnmemonicUI(onPromptMnemonic: () => Promise<{ mnemonic: string; error: (e: string) => void }>) { + public async registerMnemonicUI(onPromptMnemonic: () => Promise<{ mnemonic: string; error: (e: string) => void }>) { return this.mnemonicHandler.registerUI(onPromptMnemonic) } } diff --git a/packages/wdk/src/manager/signatures.ts b/packages/wdk/src/manager/signatures.ts index 267c79b1a..b1cb71f83 100644 --- a/packages/wdk/src/manager/signatures.ts +++ b/packages/wdk/src/manager/signatures.ts @@ -40,6 +40,8 @@ export type Signer = SignerSigned | SignerUnavailable | SignerReady | SignerActi export type BaseSignatureRequest = Db.SignatureRequest export type SignatureRequest = BaseSignatureRequest & { + weight: bigint + threshold: bigint signers: Signer[] } @@ -128,6 +130,7 @@ export class Signatures { return { ...request, + ...Envelope.weightOf(request.envelope), signers: statuses, } } @@ -177,22 +180,14 @@ export class Signatures { } async complete(requestId: string) { - const request = await this.get(requestId) - if (request.status !== 'pending') { - throw new Error('request-not-pending') - } - - return this.shared.databases.signatures.set({ - ...request, - status: 'completed', - }) + await this.shared.databases.signatures.del(requestId) } - async request( - envelope: Envelope.Envelope, + async request( + envelope: Envelope.Envelope, + action: A, options: { origin?: string - reason?: string }, ): Promise { const id = uuidv7() @@ -202,8 +197,7 @@ export class Signatures { wallet: envelope.wallet, envelope: Envelope.toSigned(envelope), origin: options.origin ?? 'unknown', - reason: options.reason ?? 'unknown', - status: 'pending', + action, createdAt: new Date().toISOString(), }) diff --git a/packages/wdk/src/manager/transactions.ts b/packages/wdk/src/manager/transactions.ts index b76bb6169..2cb701f96 100644 --- a/packages/wdk/src/manager/transactions.ts +++ b/packages/wdk/src/manager/transactions.ts @@ -146,9 +146,8 @@ export class Transactions { }) // Pass to the signatures manager - return this.shared.modules.signatures.request(tx.envelope, { + return this.shared.modules.signatures.request(tx.envelope, 'send-transaction', { origin: tx.source, - reason: 'transaction', }) } } diff --git a/packages/wdk/src/manager/wallets.ts b/packages/wdk/src/manager/wallets.ts index 480b3e050..89523cd0e 100644 --- a/packages/wdk/src/manager/wallets.ts +++ b/packages/wdk/src/manager/wallets.ts @@ -6,7 +6,7 @@ import { Shared } from './manager' import { MnemonicHandler } from './handlers/mnemonic' export type CommonSignupArgs = { - ignoreGuard?: boolean + noGuard?: boolean } export type PasskeySignupArgs = CommonSignupArgs & { @@ -197,7 +197,7 @@ export class Wallets { // Create the first session const device = await this.shared.modules.devices.create() - if (!args.ignoreGuard && !this.shared.sequence.defaultGuardTopology) { + if (!args.noGuard && !this.shared.sequence.defaultGuardTopology) { throw new Error('guard is required for signup') } @@ -240,7 +240,7 @@ export class Wallets { loginDate: new Date().toISOString(), device: device.address, loginType: 'passkey', - useGuard: !args.ignoreGuard, + useGuard: !args.noGuard, }) return wallet.address @@ -275,9 +275,8 @@ export class Wallets { ]) const envelope = await wallet.prepareUpdate(toConfig(loginTopology, nextDevicesTopology, modules, guardTopology)) - const requestId = await this.shared.modules.signatures.request(envelope, { - origin: 'login', - reason: 'login', + const requestId = await this.shared.modules.signatures.request(envelope, 'login', { + origin: 'wallet-webapp', }) await this.shared.modules.devices.witness(device.address, wallet.address) @@ -368,11 +367,35 @@ export class Wallets { const envelope = await walletObj.prepareUpdate(toConfig(loginTopology, nextDevicesTopology, modules, guardTopology)) - const requestId = await this.shared.modules.signatures.request(envelope, { - origin: 'logout', - reason: 'logout', + const requestId = await this.shared.modules.signatures.request(envelope, 'logout', { + origin: 'wallet-webapp', }) return requestId as any } + + async completeLogout(requestId: string, options?: { skipValidateSave?: boolean }) { + const request = await this.shared.modules.signatures.get(requestId) + if (!Payload.isConfigUpdate(request.envelope.payload)) { + throw new Error('invalid-request-payload') + } + + const walletEntry = await this.shared.databases.manager.get(request.wallet) + if (!walletEntry) { + throw new Error('wallet-not-found') + } + + const wallet = new Wallet(request.wallet, { + context: this.shared.sequence.context, + stateProvider: this.shared.sequence.stateProvider, + guest: this.shared.sequence.guest, + }) + + await wallet.submitUpdate(request.envelope as Envelope.Signed, { + validateSave: !options?.skipValidateSave, + }) + + await this.shared.modules.signatures.complete(requestId) + await this.shared.databases.manager.del(request.wallet) + } } From c0226ac17c66607e55ba0a5ffe8c3af7f5efc8a2 Mon Sep 17 00:00:00 2001 From: Agusx1211 Date: Tue, 25 Mar 2025 21:10:38 +0000 Subject: [PATCH 242/439] Fix use no guard and weightOf config --- packages/core/src/envelope.ts | 5 ++--- packages/wdk/src/manager/wallets.ts | 4 +++- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/packages/core/src/envelope.ts b/packages/core/src/envelope.ts index c99c061e6..53400791b 100644 --- a/packages/core/src/envelope.ts +++ b/packages/core/src/envelope.ts @@ -46,10 +46,9 @@ export function signatureForLeaf(envelope: Signed, leaf: Config } export function weightOf(envelope: Signed): { weight: bigint; threshold: bigint } { - const { weight } = Config.getWeight(envelope.configuration, (s) => !!signatureForLeaf(envelope, s)) - + const { maxWeight } = Config.getWeight(envelope.configuration, (s) => !!signatureForLeaf(envelope, s)) return { - weight: weight, + weight: maxWeight, threshold: envelope.configuration.threshold, } } diff --git a/packages/wdk/src/manager/wallets.ts b/packages/wdk/src/manager/wallets.ts index 89523cd0e..0740d078b 100644 --- a/packages/wdk/src/manager/wallets.ts +++ b/packages/wdk/src/manager/wallets.ts @@ -204,7 +204,9 @@ export class Wallets { // Build the login tree const loginTopology = buildCappedTree([await loginSigner.signer.address]) const devicesTopology = buildCappedTree([device.address]) - const guardTopology = buildCappedTreeFromTopology(1n, this.shared.sequence.defaultGuardTopology) + const guardTopology = args.noGuard + ? undefined + : buildCappedTreeFromTopology(1n, this.shared.sequence.defaultGuardTopology) // TODO: Add recovery module // TODO: Add smart sessions module From 3c1e78f5cd9023f92e6d9a57138517ca8fb04863 Mon Sep 17 00:00:00 2001 From: Michael Standen Date: Mon, 24 Mar 2025 09:57:33 +1300 Subject: [PATCH 243/439] Add type discriminator to session config leaves --- .../src/subcommands/devTools.ts | 1 + packages/primitives/src/session-config.ts | 32 ++++++++++++------- 2 files changed, 21 insertions(+), 12 deletions(-) diff --git a/packages/primitives-cli/src/subcommands/devTools.ts b/packages/primitives-cli/src/subcommands/devTools.ts index c53743905..2435a5faf 100644 --- a/packages/primitives-cli/src/subcommands/devTools.ts +++ b/packages/primitives-cli/src/subcommands/devTools.ts @@ -103,6 +103,7 @@ async function generateSessionsTopology( if (isLeaf || depth <= 1) { const permissionsCount = Math.floor((options?.seededRandom ?? Math.random)() * (options?.maxPermissions ?? 5)) + 1 return { + type: 'session-permissions', signer: randomAddress(options), valueLimit: randomBigInt(100n, options), deadline: randomBigInt(1000n, options), diff --git a/packages/primitives/src/session-config.ts b/packages/primitives/src/session-config.ts index 66635b686..c03103eb2 100644 --- a/packages/primitives/src/session-config.ts +++ b/packages/primitives/src/session-config.ts @@ -16,16 +16,22 @@ export const SESSIONS_FLAG_BRANCH = 2 export const SESSIONS_FLAG_BLACKLIST = 3 export const SESSIONS_FLAG_IDENTITY_SIGNER = 4 -export type ImplicitBlacklist = { +export type ImplicitBlacklistLeaf = { + type: 'implicit-blacklist' blacklist: Address.Address[] } export type IdentitySignerLeaf = { + type: 'identity-signer' identitySigner: Address.Address } +export type SessionPermissionsLeaf = SessionPermissions & { + type: 'session-permissions' +} + export type SessionNode = Bytes.Bytes // Hashed -export type SessionLeaf = SessionPermissions | ImplicitBlacklist | IdentitySignerLeaf +export type SessionLeaf = SessionPermissionsLeaf | ImplicitBlacklistLeaf | IdentitySignerLeaf export type SessionBranch = [SessionsTopology, SessionsTopology, ...SessionsTopology[]] export type SessionsTopology = SessionBranch | SessionLeaf | SessionNode @@ -33,7 +39,7 @@ function isSessionsNode(topology: any): topology is SessionNode { return Bytes.validate(topology) } -function isImplicitBlacklist(topology: any): topology is ImplicitBlacklist { +function isImplicitBlacklist(topology: any): topology is ImplicitBlacklistLeaf { return typeof topology === 'object' && topology !== null && 'blacklist' in topology } @@ -41,7 +47,7 @@ function isIdentitySignerLeaf(topology: any): topology is IdentitySignerLeaf { return typeof topology === 'object' && topology !== null && 'identitySigner' in topology } -function isSessionPermissions(topology: any): topology is SessionPermissions { +function isSessionPermissions(topology: any): topology is SessionPermissionsLeaf { return typeof topology === 'object' && topology !== null && 'signer' in topology } @@ -138,7 +144,7 @@ export function getImplicitBlacklist(topology: SessionsTopology): Address.Addres * @param topology The topology to get the implicit blacklist leaf from * @returns The implicit blacklist leaf or null if it's not present */ -export function getImplicitBlacklistLeaf(topology: SessionsTopology): ImplicitBlacklist | null { +export function getImplicitBlacklistLeaf(topology: SessionsTopology): ImplicitBlacklistLeaf | null { if (isImplicitBlacklist(topology)) { // Got it return topology @@ -237,13 +243,13 @@ export function decodeLeafFromBytes(bytes: Bytes.Bytes): SessionLeaf { for (let i = 1; i < bytes.length; i += 20) { blacklist.push(Bytes.toHex(bytes.slice(i, i + 20))) } - return { blacklist } + return { type: 'implicit-blacklist', blacklist } } if (flag === SESSIONS_FLAG_IDENTITY_SIGNER) { - return { identitySigner: Bytes.toHex(bytes.slice(1, 21)) } + return { type: 'identity-signer', identitySigner: Bytes.toHex(bytes.slice(1, 21)) } } if (flag === SESSIONS_FLAG_PERMISSIONS) { - return decodeSessionPermissions(bytes.slice(1)) + return { type: 'session-permissions', ...decodeSessionPermissions(bytes.slice(1)) } } throw new Error('Invalid leaf') } @@ -393,19 +399,19 @@ function sessionsTopologyFromParsed(parsed: any): SessionsTopology { 'deadline' in parsed && 'permissions' in parsed ) { - return sessionPermissionsFromParsed(parsed) + return { type: 'session-permissions', ...sessionPermissionsFromParsed(parsed) } } // Parse identity signer if (typeof parsed === 'object' && parsed !== null && 'identitySigner' in parsed) { const identitySigner = parsed.identitySigner as `0x${string}` - return { identitySigner } + return { type: 'identity-signer', identitySigner } } // Parse blacklist if (typeof parsed === 'object' && parsed !== null && 'blacklist' in parsed) { const blacklist = parsed.blacklist.map((address: any) => Address.from(address)) - return { blacklist } + return { type: 'implicit-blacklist', blacklist } } throw new Error('Invalid topology') @@ -467,7 +473,7 @@ export function addExplicitSession( throw new Error('Session already exists') } // Merge and balance - const merged = mergeSessionsTopologies(topology, sessionPermissions) + const merged = mergeSessionsTopologies(topology, { type: 'session-permissions', ...sessionPermissions }) return balanceSessionsTopology(merged) } @@ -667,9 +673,11 @@ export function removeFromImplicitBlacklist(topology: SessionsTopology, address: export function emptySessionsTopology(identitySigner: Address.Address): SessionsTopology { return [ { + type: 'implicit-blacklist', blacklist: [], }, { + type: 'identity-signer', identitySigner, }, ] From f573dbeecee8f1f7533576127c2e2df828386361 Mon Sep 17 00:00:00 2001 From: Michael Standen Date: Wed, 26 Mar 2025 08:19:06 +1300 Subject: [PATCH 244/439] Update cli message --- packages/primitives-cli/src/subcommands/session.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/primitives-cli/src/subcommands/session.ts b/packages/primitives-cli/src/subcommands/session.ts index e15a7955e..6835f911c 100644 --- a/packages/primitives-cli/src/subcommands/session.ts +++ b/packages/primitives-cli/src/subcommands/session.ts @@ -76,7 +76,7 @@ const sessionCommand: CommandModule = { ) .command( 'encode-calls [session-topology] [call-signatures] [explicit-signers] [implicit-signers]', - 'Encode a call signature for an implicit session', + 'Encode call signatures for sessions', (yargs) => { return yargs .positional('session-topology', { From e635544226ef0a22293b70c072197b1ad5bd7522 Mon Sep 17 00:00:00 2001 From: Michael Standen Date: Wed, 26 Mar 2025 08:19:23 +1300 Subject: [PATCH 245/439] Update default addresses --- packages/primitives/src/constants.ts | 4 ++-- packages/primitives/src/context.ts | 4 +++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/packages/primitives/src/constants.ts b/packages/primitives/src/constants.ts index 136bec307..590d94766 100644 --- a/packages/primitives/src/constants.ts +++ b/packages/primitives/src/constants.ts @@ -3,8 +3,8 @@ import { Abi, Address, Hex } from 'ox' export const DEFAULT_CREATION_CODE: Hex.Hex = '0x603e600e3d39601e805130553df33d3d34601c57363d3d373d363d30545af43d82803e903d91601c57fd5bf3' -export const DefaultGuest: Address.Address = '0x6b38229f7F0f0bcfe777c1bB5F127e1dAaC5aFaC' -export const DefaultSessionManager: Address.Address = '0xC3A9e9cCEFF60CadE0976AD521E37bb632FDF24b' +export const DefaultGuest: Address.Address = '0x4569b0450924b130E6177bcAa6A7c20e4bFdDdE0' +export const DefaultSessionManager: Address.Address = '0x20115Aa0988e2d4EC7e41bA599Fd64A3Eb667bB5' // ERC1271 export const IS_VALID_SIGNATURE = Abi.from([ diff --git a/packages/primitives/src/context.ts b/packages/primitives/src/context.ts index 08970deff..5e0740b9d 100644 --- a/packages/primitives/src/context.ts +++ b/packages/primitives/src/context.ts @@ -4,11 +4,13 @@ import { DEFAULT_CREATION_CODE } from './constants' export type Context = { factory: Address.Address stage1: Address.Address + // stage2: Address.Address creationCode: Hex.Hex } export const Dev1: Context = { factory: '0xBd0F8abD58B4449B39C57Ac9D5C67433239aC447', - stage1: '0x7CC3CD2a7c2611e8bE6BAFfe17d0fA9B15a8858d', + stage1: '0x76E132217927D8B0d1374328adC48Bd2b7EEC8d7', + // stage2: '0xb1ED343aAaC68F800B66b66c63F87211BEF8Bb97', creationCode: DEFAULT_CREATION_CODE, } From 1ba88a7ffbf5da64b3cd8fb351e3a9a02747d743 Mon Sep 17 00:00:00 2001 From: Michael Standen Date: Wed, 26 Mar 2025 09:52:55 +1300 Subject: [PATCH 246/439] Standardize imageHash as Hex.Hex --- packages/core/src/envelope.ts | 4 ++-- packages/core/src/state/local/index.ts | 6 +++--- .../primitives-cli/src/subcommands/config.ts | 5 ++++- .../primitives-cli/src/subcommands/devTools.ts | 7 ++++++- packages/primitives/src/config.ts | 14 +++++++------- packages/primitives/src/signature.ts | 6 +++--- packages/wdk/src/manager/handlers/devices.ts | 4 ++-- packages/wdk/src/manager/handlers/index.ts | 4 ++-- packages/wdk/src/manager/handlers/mnemonic.ts | 10 +++++----- packages/wdk/src/manager/handlers/passkeys.ts | 16 ++++------------ 10 files changed, 38 insertions(+), 38 deletions(-) diff --git a/packages/core/src/envelope.ts b/packages/core/src/envelope.ts index c99c061e6..da31c0926 100644 --- a/packages/core/src/envelope.ts +++ b/packages/core/src/envelope.ts @@ -1,5 +1,5 @@ import { Config, Payload, Signature } from '@0xsequence/sequence-primitives' -import { Address, Bytes } from 'ox' +import { Address, Hex } from 'ox' export type Envelope = { readonly wallet: Address.Address @@ -15,7 +15,7 @@ export type Signature = { // Address not included as it is included in the signature export type SapientSignature = { - imageHash: Bytes.Bytes + imageHash: Hex.Hex signature: Signature.SignatureOfSapientSignerLeaf } diff --git a/packages/core/src/state/local/index.ts b/packages/core/src/state/local/index.ts index 8406b1e8f..ef908acb7 100644 --- a/packages/core/src/state/local/index.ts +++ b/packages/core/src/state/local/index.ts @@ -192,7 +192,7 @@ export class Provider implements ProviderInterface { const { signers, sapientSigners } = Config.getSigners(fromConfig) const subdigestsOfSigner = await Promise.all([ ...signers.map((s) => this.store.loadSubdigestsOfSigner(s)), - ...sapientSigners.map((s) => this.store.loadSubdigestsOfSapientSigner(s.address, Hex.fromBytes(s.imageHash))), + ...sapientSigners.map((s) => this.store.loadSubdigestsOfSapientSigner(s.address, s.imageHash)), ]) const subdigests = [...new Set(subdigestsOfSigner.flat())] @@ -260,7 +260,7 @@ export class Provider implements ProviderInterface { signature: await this.store.loadSapientSignatureOfSubdigest( signer.address, expectedSubdigest, - Hex.fromBytes(signer.imageHash), + signer.imageHash, ), } }), @@ -270,7 +270,7 @@ export class Provider implements ProviderInterface { const encoded = Signature.fillLeaves(fromConfig.topology, (leaf) => { if (Config.isSapientSignerLeaf(leaf)) { const sapientSignature = signaturesOfSigners.find( - ({ signer, imageHash }: { signer: Address.Address; imageHash?: Bytes.Bytes }) => { + ({ signer, imageHash }: { signer: Address.Address; imageHash?: Hex.Hex }) => { return imageHash && signer === leaf.address && imageHash === leaf.imageHash }, )?.signature diff --git a/packages/primitives-cli/src/subcommands/config.ts b/packages/primitives-cli/src/subcommands/config.ts index 8e41def4b..eaccedb62 100644 --- a/packages/primitives-cli/src/subcommands/config.ts +++ b/packages/primitives-cli/src/subcommands/config.ts @@ -68,9 +68,12 @@ function parseElements(elements: string): Config.Leaf[] { remainingElements = remainingElements.slice(firstElement!.length + 1) } else if (firstElementType === 'sapient') { const [_, imageHash, address, weight] = firstElement!.split(':') + if (!imageHash || !imageHash.startsWith('0x') || imageHash.length !== 66) { + throw new Error(`Invalid image hash: ${imageHash}`) + } leaves.push({ type: 'sapient-signer', - imageHash: Bytes.fromHex(imageHash as `0x${string}`), + imageHash: imageHash as `0x${string}`, address: Address.from(address!), weight: BigInt(weight!), }) diff --git a/packages/primitives-cli/src/subcommands/devTools.ts b/packages/primitives-cli/src/subcommands/devTools.ts index 2435a5faf..1666a0ed8 100644 --- a/packages/primitives-cli/src/subcommands/devTools.ts +++ b/packages/primitives-cli/src/subcommands/devTools.ts @@ -1,5 +1,6 @@ import { Permission, SessionConfig, Config } from '@0xsequence/sequence-primitives' import crypto from 'crypto' +import { Bytes } from 'ox' import type { CommandModule } from 'yargs' export interface RandomOptions { @@ -39,6 +40,10 @@ function randomBytes(length: number, options?: RandomOptions): Uint8Array { return crypto.getRandomValues(bytes) } +function randomHex(length: number, options?: RandomOptions): `0x${string}` { + return `0x${Bytes.toHex(randomBytes(length, options))}` +} + function randomBigInt(max: bigint, options?: RandomOptions): bigint { if (options?.seededRandom) { return BigInt(Math.floor(options.seededRandom() * Number(max))) @@ -67,7 +72,7 @@ function generateRandomTopology(depth: number, options?: RandomOptions): Config. type: 'sapient-signer', address: randomAddress(options), weight: randomBigInt(256n, options), - imageHash: randomBytes(32, options), + imageHash: randomHex(32, options), } case 2: // SubdigestLeaf diff --git a/packages/primitives/src/config.ts b/packages/primitives/src/config.ts index 0579a9f25..086cfd128 100644 --- a/packages/primitives/src/config.ts +++ b/packages/primitives/src/config.ts @@ -23,7 +23,7 @@ export type SapientSignerLeaf = { type: 'sapient-signer' address: Address.Address weight: bigint - imageHash: Bytes.Bytes + imageHash: Hex.Hex signed?: boolean signature?: SignatureOfSapientSignerLeaf } @@ -109,11 +109,11 @@ export function isTopology(cand: any): cand is Topology { export function getSigners(configuration: Config | Topology): { signers: Address.Address[] - sapientSigners: { address: Address.Address; imageHash: Bytes.Bytes }[] + sapientSigners: { address: Address.Address; imageHash: Hex.Hex }[] isComplete: boolean } { const signers = new Set() - const sapientSigners = new Set<{ address: Address.Address; imageHash: Bytes.Bytes }>() + const sapientSigners = new Set<{ address: Address.Address; imageHash: Hex.Hex }>() let isComplete = true @@ -224,7 +224,7 @@ export function hashConfiguration(topology: Topology | Config): Bytes.Bytes { Bytes.fromString('Sequence sapient config:\n'), Bytes.fromHex(topology.address), Bytes.padLeft(Bytes.fromNumber(topology.weight), 32), - topology.imageHash, + Bytes.padLeft(Bytes.fromHex(topology.imageHash), 32), ), ) } @@ -311,7 +311,7 @@ function encodeTopology(top: Topology): any { type: 'sapient-signer', address: top.address, weight: top.weight.toString(), - imageHash: Bytes.toHex(Bytes.padLeft(top.imageHash, 32)), + imageHash: top.imageHash, } } else if (isSubdigestLeaf(top)) { return { @@ -361,7 +361,7 @@ function decodeTopology(obj: any): Topology { type: 'sapient-signer', address: obj.address, weight: BigInt(obj.weight), - imageHash: Bytes.padLeft(Bytes.fromHex(obj.imageHash), 32), + imageHash: obj.imageHash, } case 'subdigest': return { @@ -479,7 +479,7 @@ function mergeLeaf(a: Leaf, b: Leaf): Leaf { } if (isSapientSignerLeaf(a) && isSapientSignerLeaf(b)) { - if (a.address !== b.address || a.weight !== b.weight || !Bytes.isEqual(a.imageHash, b.imageHash)) { + if (a.address !== b.address || a.weight !== b.weight || a.imageHash !== b.imageHash) { throw new Error('Topology mismatch: sapient signer fields differ') } if (!!a.signed !== !!b.signed || !!a.signature !== !!b.signature) { diff --git a/packages/primitives/src/signature.ts b/packages/primitives/src/signature.ts index 66890fb6f..f8fb54f43 100644 --- a/packages/primitives/src/signature.ts +++ b/packages/primitives/src/signature.ts @@ -924,7 +924,7 @@ function rawTopologyToJson(top: RawTopology): any { type: 'sapient-signer', address: top.address, weight: top.weight.toString(), - imageHash: Bytes.toHex(Bytes.padLeft(top.imageHash, 32)), + imageHash: top.imageHash, } case 'subdigest': return { @@ -1029,7 +1029,7 @@ function rawTopologyFromJson(obj: any): RawTopology { type: 'sapient-signer', address: obj.address, weight: BigInt(obj.weight), - imageHash: Bytes.fromHex(obj.imageHash), + imageHash: obj.imageHash, } case 'subdigest': return { @@ -1284,7 +1284,7 @@ async function recoverTopology( type: 'sapient-signer', address: topology.signature.address, weight: topology.weight, - imageHash: Hex.toBytes(response), + imageHash: response, signed: true, signature: topology.signature, }, diff --git a/packages/wdk/src/manager/handlers/devices.ts b/packages/wdk/src/manager/handlers/devices.ts index 725a949ed..3eb056ba2 100644 --- a/packages/wdk/src/manager/handlers/devices.ts +++ b/packages/wdk/src/manager/handlers/devices.ts @@ -1,7 +1,7 @@ import * as Db from '../../dbs' import { Kinds } from '../signers' import { Signatures, SignerReady, SignerUnavailable } from '../signatures' -import { Address, Bytes } from 'ox' +import { Address, Hex } from 'ox' import { Devices } from '../devices' import { Handler } from '.' @@ -19,7 +19,7 @@ export class DevicesHandler implements Handler { async status( address: Address.Address, - _imageHash: Bytes.Bytes | undefined, + _imageHash: Hex.Hex | undefined, request: Db.SignatureRequest, ): Promise { const signer = await this.devices.get(address) diff --git a/packages/wdk/src/manager/handlers/index.ts b/packages/wdk/src/manager/handlers/index.ts index 9d4123faa..3ee08dff9 100644 --- a/packages/wdk/src/manager/handlers/index.ts +++ b/packages/wdk/src/manager/handlers/index.ts @@ -1,5 +1,5 @@ import * as Db from '../../dbs' -import { Address, Bytes } from 'ox' +import { Address, Hex } from 'ox' import { SignerActionable, SignerReady, SignerUnavailable } from '../signatures' export interface Handler { @@ -9,7 +9,7 @@ export interface Handler { status( address: Address.Address, - imageHash: Bytes.Bytes | undefined, + imageHash: Hex.Hex | undefined, request: Db.SignatureRequest, ): Promise } diff --git a/packages/wdk/src/manager/handlers/mnemonic.ts b/packages/wdk/src/manager/handlers/mnemonic.ts index d621545f1..0f4703261 100644 --- a/packages/wdk/src/manager/handlers/mnemonic.ts +++ b/packages/wdk/src/manager/handlers/mnemonic.ts @@ -1,9 +1,9 @@ +import { Signers } from '@0xsequence/sequence-core' +import { Address, Hex, Mnemonic } from 'ox' +import { Handler } from '.' import * as Db from '../../dbs' +import { Signatures, SignerReady, SignerUnavailable } from '../signatures' import { Kinds } from '../signers' -import { Signatures, Signer, SignerReady, SignerUnavailable } from '../signatures' -import { Address, Bytes, Hex, Mnemonic } from 'ox' -import { Handler } from '.' -import { Signers } from '@0xsequence/sequence-core' export class MnemonicHandler implements Handler { kind = Kinds.LoginMnemonic @@ -38,7 +38,7 @@ export class MnemonicHandler implements Handler { async status( address: Address.Address, - _imageHash: Bytes.Bytes | undefined, + _imageHash: Hex.Hex | undefined, request: Db.SignatureRequest, ): Promise { const onPromptMnemonic = this.onPromptMnemonic diff --git a/packages/wdk/src/manager/handlers/passkeys.ts b/packages/wdk/src/manager/handlers/passkeys.ts index 154e41e9b..dfd8cf297 100644 --- a/packages/wdk/src/manager/handlers/passkeys.ts +++ b/packages/wdk/src/manager/handlers/passkeys.ts @@ -19,17 +19,9 @@ export class PasskeysHandler implements Handler { return () => {} } - private async loadPasskey( - wallet: Address.Address, - imageHash: Bytes.Bytes, - ): Promise { + private async loadPasskey(wallet: Address.Address, imageHash: Hex.Hex): Promise { try { - return await Signers.Passkey.Passkey.loadFromWitness( - this.stateReader, - this.extensions, - wallet, - Hex.from(imageHash), - ) + return await Signers.Passkey.Passkey.loadFromWitness(this.stateReader, this.extensions, wallet, imageHash) } catch (e) { console.warn('Failed to load passkey:', e) return undefined @@ -38,7 +30,7 @@ export class PasskeysHandler implements Handler { async status( address: Address.Address, - imageHash: Bytes.Bytes | undefined, + imageHash: Hex.Hex | undefined, request: Db.SignatureRequest, ): Promise { const base = { address, imageHash, handler: this } @@ -74,7 +66,7 @@ export class PasskeysHandler implements Handler { request.envelope.wallet, request.envelope.chainId, request.envelope.payload, - Hex.from(imageHash), + imageHash, ) await this.signatures.addSignature(request.id, { address, From 5091dac9e95d56efb8cfe463f814fb51be824b8f Mon Sep 17 00:00:00 2001 From: Michael Standen Date: Wed, 26 Mar 2025 09:53:20 +1300 Subject: [PATCH 247/439] Update deployed contract addresses --- packages/core/test/constants.ts | 6 +++--- packages/wdk/test/constants.ts | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/packages/core/test/constants.ts b/packages/core/test/constants.ts index 50d74be76..824b5f5c3 100644 --- a/packages/core/test/constants.ts +++ b/packages/core/test/constants.ts @@ -4,9 +4,9 @@ import { Abi, Address } from 'ox' const envFile = process.env.CI ? '.env.test' : '.env.test.local' dotenvConfig({ path: envFile }) -export const ERC20_IMPLICIT_MINT_CONTRACT: Address.Address = '0x7aC9f16587B279998f1522f8F737a28aCb4C9f06' -export const MOCK_IMPLICIT_CONTRACT: Address.Address = '0x9D5E1139e02eB025470308EeF65D2d15bC1f5d9F' -export const MOCK_IMPLICIT_INVALID_CONTRACT: Address.Address = '0x977F7fbCAc606C3B33357ebDff0205B8C4055a3B' +export const ERC20_IMPLICIT_MINT_CONTRACT: Address.Address = '0x96ea29a63fdCf897eDc059a7f7A7bf04Bf574eF3' +export const MOCK_IMPLICIT_CONTRACT: Address.Address = '0x95b45E3131e836Ed3773C169c2A7E0C52478F1C6' +export const MOCK_IMPLICIT_INVALID_CONTRACT: Address.Address = '0x4cFD26fBADCeef5dA7e1D1BF4894a36FdaDfA3d6' export const ERC20_MINT_ONCE = Abi.from(['function mintOnce(address to, uint256 amount)'])[0] diff --git a/packages/wdk/test/constants.ts b/packages/wdk/test/constants.ts index c7a1760a0..3b2639c83 100644 --- a/packages/wdk/test/constants.ts +++ b/packages/wdk/test/constants.ts @@ -4,9 +4,9 @@ import { Abi } from 'ox' const envFile = process.env.CI ? '.env.test' : '.env.test.local' dotenvConfig({ path: envFile }) -export const ERC20_IMPLICIT_MINT_CONTRACT = '0x7aC9f16587B279998f1522f8F737a28aCb4C9f06' -export const MOCK_IMPLICIT_CONTRACT = '0x9D5E1139e02eB025470308EeF65D2d15bC1f5d9F' -export const MOCK_IMPLICIT_INVALID_CONTRACT = '0x977F7fbCAc606C3B33357ebDff0205B8C4055a3B' +export const ERC20_IMPLICIT_MINT_CONTRACT = '0x96ea29a63fdCf897eDc059a7f7A7bf04Bf574eF3' +export const MOCK_IMPLICIT_CONTRACT = '0x95b45E3131e836Ed3773C169c2A7E0C52478F1C6' +export const MOCK_IMPLICIT_INVALID_CONTRACT = '0x4cFD26fBADCeef5dA7e1D1BF4894a36FdaDfA3d6' export const ERC20_MINT_ONCE = Abi.from(['function mintOnce(address to, uint256 amount)'])[0] From e50407dac4320abca0288a64c5408af7687b3ff1 Mon Sep 17 00:00:00 2001 From: Michael Standen Date: Wed, 26 Mar 2025 10:24:21 +1300 Subject: [PATCH 248/439] Fix session manager tests --- packages/core/test/session-manager.test.ts | 234 ++++++++++----------- 1 file changed, 114 insertions(+), 120 deletions(-) diff --git a/packages/core/test/session-manager.test.ts b/packages/core/test/session-manager.test.ts index 59972b4cb..8dc809c80 100644 --- a/packages/core/test/session-manager.test.ts +++ b/packages/core/test/session-manager.test.ts @@ -1,8 +1,14 @@ -import { Signers, State, Wallet } from '@0xsequence/sequence-core' -import { Attestation, Constants, GenericTree, Payload, SessionConfig } from '@0xsequence/sequence-primitives' +import { Envelope, Signers, State, Wallet } from '@0xsequence/sequence-core' +import { + Attestation, + Constants, + GenericTree, + Payload, + Permission, + SessionConfig, +} from '@0xsequence/sequence-primitives' import { AbiFunction, Address, Bytes, Hex, Provider, RpcTransport, Secp256k1, TransactionEnvelopeEip1559 } from 'ox' import { CAN_RUN_LIVE, ERC20_IMPLICIT_MINT_CONTRACT, ERC20_MINT_ONCE, PRIVATE_KEY, RPC_URL } from './constants' -import { ParameterOperation } from '../../primitives/src/permission' function randomAddress(): Address.Address { return Address.fromPublicKey(Secp256k1.getPublicKey({ privateKey: Secp256k1.randomPrivateKey() })) @@ -67,14 +73,14 @@ describe('SessionManager', () => { rules: [ { cumulative: true, - operation: ParameterOperation.EQUAL, + operation: Permission.ParameterOperation.EQUAL, value: Bytes.padLeft(Bytes.fromHex('0x'), 32), offset: 0n, mask: Bytes.padLeft(Bytes.fromHex('0x'), 32), }, { cumulative: false, - operation: ParameterOperation.EQUAL, + operation: Permission.ParameterOperation.EQUAL, value: Bytes.padLeft(Bytes.fromHex('0x01'), 32), offset: 2n, mask: Bytes.padLeft(Bytes.fromHex('0x03'), 32), @@ -110,6 +116,7 @@ describe('SessionManager', () => { const actualPermissions = SessionConfig.getSessionPermissions(sessionManager.topology, randomSigner) expect(actualPermissions).toStrictEqual({ ...sessionPermission, + type: 'session-permissions', signer: randomSigner, }) }) @@ -249,6 +256,91 @@ describe('SessionManager', () => { const pkHex = Hex.from(PRIVATE_KEY as `0x${string}`) const senderAddress = Address.fromPublicKey(Secp256k1.getPublicKey({ privateKey: pkHex })) + const buildAndSignCall = async ( + wallet: Wallet, + sessionManager: Signers.SessionManager, + call: Payload.Call, + provider: Provider.Provider, + chainId: bigint, + ) => { + // Prepare the transaction + const envelope = await wallet.prepareTransaction(provider, [call]) + const parentedEnvelope: Payload.Parented = { + ...envelope.payload, + parentWallets: [wallet.address], + } + const signature = await sessionManager.signSapient( + wallet.address, + chainId, + parentedEnvelope, + sessionManager.imageHash, + ) + const sapientSignature: Envelope.SapientSignature = { + imageHash: sessionManager.imageHash, + signature, + } + // Sign the envelope + const signedEnvelope = Envelope.toSigned(envelope, [sapientSignature]) + const transaction = await wallet.buildTransaction(provider, signedEnvelope) + return transaction + } + + const sendTransaction = async ( + provider: Provider.Provider, + transaction: { to: Address.Address; data: Hex.Hex }, + chainId: bigint, + ) => { + // Estimate gas with a safety buffer + const estimatedGas = BigInt(await provider.request({ method: 'eth_estimateGas', params: [transaction] })) + const safeGasLimit = estimatedGas > 21000n ? (estimatedGas * 12n) / 10n : 50000n + + // Get base fee and priority fee + const baseFee = BigInt(await provider.request({ method: 'eth_gasPrice' })) + const priorityFee = 100000000n // 0.1 gwei priority fee + const maxFeePerGas = baseFee + priorityFee + + // Check sender have enough balance + const senderBalance = BigInt( + await provider.request({ method: 'eth_getBalance', params: [senderAddress, 'latest'] }), + ) + if (senderBalance < maxFeePerGas * safeGasLimit) { + console.log('Sender balance:', senderBalance.toString(), 'wei') + throw new Error('Sender has insufficient balance to pay for gas') + } + const nonce = BigInt( + await provider.request({ + method: 'eth_getTransactionCount', + params: [senderAddress, 'latest'], + }), + ) + + const relayEnvelope = TransactionEnvelopeEip1559.from({ + chainId: Number(chainId), + type: 'eip1559', + from: senderAddress, + to: transaction.to, + data: transaction.data, + gas: safeGasLimit, + maxFeePerGas: maxFeePerGas, + maxPriorityFeePerGas: priorityFee, + nonce: nonce, + value: 0n, + }) + const relayerSignature = Secp256k1.sign({ + payload: TransactionEnvelopeEip1559.getSignPayload(relayEnvelope), + privateKey: pkHex, + }) + const signedRelayEnvelope = TransactionEnvelopeEip1559.from(relayEnvelope, { + signature: relayerSignature, + }) + const tx = await provider.request({ + method: 'eth_sendRawTransaction', + params: [TransactionEnvelopeEip1559.serialize(signedRelayEnvelope)], + }) + console.log('Transaction sent', tx) + await provider.request({ method: 'eth_getTransactionReceipt', params: [tx] }) + } + // Submit a real transaction with a wallet that has a SessionManager using implicit session it('Submits a real transaction with a wallet that has a SessionManager using implicit session', async () => { // Check the contracts have been deployed @@ -293,13 +385,12 @@ describe('SessionManager', () => { type: 'sapient-signer', address: sessionManager.address, weight: 1n, - imageHash: Bytes.fromHex(sessionManager.imageHash), + imageHash: sessionManager.imageHash, }, // Include a random node leaf (bytes32) to prevent image hash collision Bytes.random(32), ], }) - wallet.setSapientSigner(sessionManager) const call: Payload.Call = { to: ERC20_IMPLICIT_MINT_CONTRACT, @@ -311,59 +402,9 @@ describe('SessionManager', () => { behaviorOnError: 'revert', } - // Send the transaction - const transaction = await wallet.buildTransaction(provider, [call]) - console.log('transaction', transaction) - - // Estimate gas with a safety buffer - const estimatedGas = BigInt(await provider.request({ method: 'eth_estimateGas', params: [transaction] })) - const safeGasLimit = estimatedGas > 21000n ? (estimatedGas * 12n) / 10n : 50000n - - // Get base fee and priority fee - const baseFee = BigInt(await provider.request({ method: 'eth_gasPrice' })) - const priorityFee = 100000000n // 0.1 gwei priority fee - const maxFeePerGas = baseFee + priorityFee - - // Check sender have enough balance - const senderBalance = BigInt( - await provider.request({ method: 'eth_getBalance', params: [senderAddress, 'latest'] }), - ) - if (senderBalance < maxFeePerGas * safeGasLimit) { - console.log('Sender balance:', senderBalance.toString(), 'wei') - throw new Error('Sender has insufficient balance to pay for gas') - } - const nonce = BigInt( - await provider.request({ - method: 'eth_getTransactionCount', - params: [senderAddress, 'latest'], - }), - ) - - const envelope = TransactionEnvelopeEip1559.from({ - chainId: Number(chainId), - type: 'eip1559', - from: senderAddress, - to: transaction.to, - data: transaction.data, - gas: safeGasLimit, - maxFeePerGas: maxFeePerGas, - maxPriorityFeePerGas: priorityFee, - nonce: nonce, - value: 0n, - }) - const relayerSignature = Secp256k1.sign({ - payload: TransactionEnvelopeEip1559.getSignPayload(envelope), - privateKey: pkHex, - }) - const signedEnvelope = TransactionEnvelopeEip1559.from(envelope, { - signature: relayerSignature, - }) - const tx = await provider.request({ - method: 'eth_sendRawTransaction', - params: [TransactionEnvelopeEip1559.serialize(signedEnvelope)], - }) - console.log('Transaction sent', tx) - await provider.request({ method: 'eth_getTransactionReceipt', params: [tx] }) + // Build, sign and send the transaction + const transaction = await buildAndSignCall(wallet, sessionManager, call, provider, chainId) + await sendTransaction(provider, transaction, chainId) }, 60000) it('Submits a real transaction with a wallet that has a SessionManager using explicit session', async () => { @@ -398,15 +439,18 @@ describe('SessionManager', () => { const wallet = await Wallet.fromConfiguration({ threshold: 1n, checkpoint: 0n, - topology: { + topology: [ // Random explicit signer will randomise the image hash - type: 'sapient-signer', - address: sessionManager.address, - weight: 1n, - imageHash: Bytes.fromHex(sessionManager.imageHash), - }, + { + type: 'sapient-signer', + address: sessionManager.address, + weight: 1n, + imageHash: sessionManager.imageHash, + }, + // Include a random node leaf (bytes32) to prevent image hash collision + Bytes.random(32), + ], }) - wallet.setSapientSigner(sessionManager) const call: Payload.Call = { to: ERC20_IMPLICIT_MINT_CONTRACT, @@ -418,59 +462,9 @@ describe('SessionManager', () => { behaviorOnError: 'revert', } - // Send the transaction - const transaction = await wallet.buildTransaction(provider, [call]) - console.log('transaction', transaction) - - // Estimate gas with a safety buffer - const estimatedGas = BigInt(await provider.request({ method: 'eth_estimateGas', params: [transaction] })) - const safeGasLimit = estimatedGas > 21000n ? (estimatedGas * 12n) / 10n : 50000n - - // Get base fee and priority fee - const baseFee = BigInt(await provider.request({ method: 'eth_gasPrice' })) - const priorityFee = 100000000n // 0.1 gwei priority fee - const maxFeePerGas = baseFee + priorityFee - - // Check sender have enough balance - const senderBalance = BigInt( - await provider.request({ method: 'eth_getBalance', params: [senderAddress, 'latest'] }), - ) - if (senderBalance < maxFeePerGas * safeGasLimit) { - console.log('Sender balance:', senderBalance.toString(), 'wei') - throw new Error('Sender has insufficient balance to pay for gas') - } - const nonce = BigInt( - await provider.request({ - method: 'eth_getTransactionCount', - params: [senderAddress, 'latest'], - }), - ) - - const envelope = TransactionEnvelopeEip1559.from({ - chainId: Number(chainId), - type: 'eip1559', - from: senderAddress, - to: transaction.to, - data: transaction.data, - gas: safeGasLimit, - maxFeePerGas: maxFeePerGas, - maxPriorityFeePerGas: priorityFee, - nonce: nonce, - value: 0n, - }) - const relayerSignature = Secp256k1.sign({ - payload: TransactionEnvelopeEip1559.getSignPayload(envelope), - privateKey: pkHex, - }) - const signedEnvelope = TransactionEnvelopeEip1559.from(envelope, { - signature: relayerSignature, - }) - const tx = await provider.request({ - method: 'eth_sendRawTransaction', - params: [TransactionEnvelopeEip1559.serialize(signedEnvelope)], - }) - console.log('Transaction sent', tx) - await provider.request({ method: 'eth_getTransactionReceipt', params: [tx] }) + // Build, sign and send the transaction + const transaction = await buildAndSignCall(wallet, sessionManager, call, provider, chainId) + await sendTransaction(provider, transaction, chainId) }, 60000) } }) From 83f22eed650affb1ab6a7886e4778d65b8bffd8f Mon Sep 17 00:00:00 2001 From: Agusx1211 Date: Wed, 26 Mar 2025 16:30:00 +0000 Subject: [PATCH 249/439] Update checkpoint on config change --- packages/wdk/src/manager/wallets.ts | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/packages/wdk/src/manager/wallets.ts b/packages/wdk/src/manager/wallets.ts index 0740d078b..f1573d25d 100644 --- a/packages/wdk/src/manager/wallets.ts +++ b/packages/wdk/src/manager/wallets.ts @@ -79,6 +79,7 @@ function buildCappedTreeFromTopology(weight: bigint, topology: Config.Topology): } function toConfig( + checkpoint: bigint, loginTopology: Config.Topology, devicesTopology: Config.Topology, modules: Config.Topology, @@ -86,13 +87,13 @@ function toConfig( ): Config.Config { if (!guardTopology) { return { - checkpoint: 0n, + checkpoint: checkpoint, threshold: 1n, topology: [[loginTopology, devicesTopology], modules], } } else { return { - checkpoint: 0n, + checkpoint: checkpoint, threshold: 2n, topology: [[[loginTopology, devicesTopology], guardTopology], modules], } @@ -218,7 +219,7 @@ export class Wallets { } as Config.SignerLeaf // Create initial configuration - const initialConfiguration = toConfig(loginTopology, devicesTopology, modules, guardTopology) + const initialConfiguration = toConfig(0n, loginTopology, devicesTopology, modules, guardTopology) // Create wallet const wallet = await Wallet.fromConfiguration(initialConfiguration, { @@ -275,7 +276,9 @@ export class Wallets { ...prevDevices.signers.filter((x) => x !== '0x0000000000000000000000000000000000000000'), device.address, ]) - const envelope = await wallet.prepareUpdate(toConfig(loginTopology, nextDevicesTopology, modules, guardTopology)) + const envelope = await wallet.prepareUpdate( + toConfig(status.configuration.checkpoint + 1n, loginTopology, nextDevicesTopology, modules, guardTopology), + ) const requestId = await this.shared.modules.signatures.request(envelope, 'login', { origin: 'wallet-webapp', @@ -367,7 +370,9 @@ export class Wallets { ), ) - const envelope = await walletObj.prepareUpdate(toConfig(loginTopology, nextDevicesTopology, modules, guardTopology)) + const envelope = await walletObj.prepareUpdate( + toConfig(status.configuration.checkpoint + 1n, loginTopology, nextDevicesTopology, modules, guardTopology), + ) const requestId = await this.shared.modules.signatures.request(envelope, 'logout', { origin: 'wallet-webapp', From 5eb9623de7e524b2aeea2b4fb4a88011808978db Mon Sep 17 00:00:00 2001 From: Agusx1211 Date: Wed, 26 Mar 2025 16:38:14 +0000 Subject: [PATCH 250/439] Add transaction methods --- packages/wdk/src/manager/manager.ts | 30 +++++++++++++++- packages/wdk/src/manager/transactions.ts | 45 ++++++++++++++++++------ 2 files changed, 64 insertions(+), 11 deletions(-) diff --git a/packages/wdk/src/manager/manager.ts b/packages/wdk/src/manager/manager.ts index fc9d63fe8..ac17cccad 100644 --- a/packages/wdk/src/manager/manager.ts +++ b/packages/wdk/src/manager/manager.ts @@ -1,6 +1,6 @@ import { Address } from 'ox' -import { Extensions, Context, Config, Constants, Network } from '@0xsequence/sequence-primitives' +import { Extensions, Context, Config, Constants, Network, Payload } from '@0xsequence/sequence-primitives' import { Signers as CoreSigners, State, Relayer } from '@0xsequence/sequence-core' import * as Db from '../dbs' import { Logger } from './logger' @@ -171,6 +171,8 @@ export class Manager { this.shared = shared } + // Wallets + public async signUp(options: SignupArgs) { return this.shared.modules.wallets.signUp(options) } @@ -195,6 +197,8 @@ export class Manager { return this.shared.modules.wallets.onWalletsUpdate(cb, trigger) } + // Signatures + public async listSignatureRequests(): Promise { return this.shared.modules.signatures.list() } @@ -216,6 +220,8 @@ export class Manager { return this.shared.modules.signatures.onSignatureRequestUpdate(requestId, cb, onError, trigger) } + // Transactions + public async requestTransaction( from: Address.Address, chainId: bigint, @@ -225,6 +231,28 @@ export class Manager { return this.shared.modules.transactions.request(from, chainId, txs, options) } + public async defineTransaction( + transactionId: string, + changes?: { nonce?: bigint; space?: bigint; calls?: Pick[] }, + ) { + return this.shared.modules.transactions.define(transactionId, changes) + } + + public async selectRelayer( + transactionId: string, + selectRelayer: (relayerOptions: Db.RelayerOption[]) => Promise, + ) { + return this.shared.modules.transactions.selectRelayer(transactionId, selectRelayer) + } + + public onTransactionsUpdate(cb: (transactions: Db.TransactionRow[]) => void, trigger?: boolean) { + return this.shared.modules.transactions.onTransactionsUpdate(cb, trigger) + } + + public onTransactionUpdate(transactionId: string, cb: (transaction: Db.TransactionRow) => void, trigger?: boolean) { + return this.shared.modules.transactions.onTransactionUpdate(transactionId, cb, trigger) + } + public async registerMnemonicUI(onPromptMnemonic: () => Promise<{ mnemonic: string; error: (e: string) => void }>) { return this.mnemonicHandler.registerUI(onPromptMnemonic) } diff --git a/packages/wdk/src/manager/transactions.ts b/packages/wdk/src/manager/transactions.ts index 2cb701f96..7bf77700e 100644 --- a/packages/wdk/src/manager/transactions.ts +++ b/packages/wdk/src/manager/transactions.ts @@ -12,6 +12,15 @@ export class Transactions { return this.shared.databases.transactions.list() } + public async get(transactionId: string): Promise { + const tx = await this.shared.databases.transactions.get(transactionId) + if (!tx) { + throw new Error(`Transaction ${transactionId} not found`) + } + + return tx + } + async request( from: Address.Address, chainId: bigint, @@ -64,11 +73,7 @@ export class Transactions { calls?: Pick[] }, ): Promise { - const tx = await this.shared.databases.transactions.get(transactionId) - if (!tx) { - throw new Error(`Transaction ${transactionId} not found`) - } - + const tx = await this.get(transactionId) if (tx.status !== 'requested') { throw new Error(`Transaction ${transactionId} is not in the requested state`) } @@ -102,11 +107,7 @@ export class Transactions { transactionId: string, selectRelayer: (relayerOptions: Db.RelayerOption[]) => Promise, ): Promise { - const tx = await this.shared.databases.transactions.get(transactionId) - if (!tx) { - throw new Error(`Transaction ${transactionId} not found`) - } - + const tx = await this.get(transactionId) if (tx.status !== 'defined') { throw new Error(`Transaction ${transactionId} is not in the defined state`) } @@ -150,4 +151,28 @@ export class Transactions { origin: tx.source, }) } + + onTransactionsUpdate(cb: (transactions: Db.TransactionRow[]) => void, trigger?: boolean) { + const undo = this.shared.databases.transactions.addListener(() => { + this.list().then((l) => cb(l)) + }) + + if (trigger) { + this.list().then((l) => cb(l)) + } + + return undo + } + + onTransactionUpdate(transactionId: string, cb: (transaction: Db.TransactionRow) => void, trigger?: boolean) { + const undo = this.shared.databases.transactions.addListener(() => { + this.get(transactionId).then((t) => cb(t)) + }) + + if (trigger) { + this.get(transactionId).then((t) => cb(t)) + } + + return undo + } } From 069e9dbc35d308d5bee84285053b59d777fc3eba Mon Sep 17 00:00:00 2001 From: Agusx1211 Date: Wed, 26 Mar 2025 17:26:57 +0000 Subject: [PATCH 251/439] Return full wallet rows --- packages/wdk/src/dbs/manager.ts | 6 +++--- packages/wdk/src/manager/index.ts | 1 + packages/wdk/src/manager/manager.ts | 12 ++++++++++-- packages/wdk/src/manager/wallets.ts | 20 ++++++++++++++------ 4 files changed, 28 insertions(+), 11 deletions(-) diff --git a/packages/wdk/src/dbs/manager.ts b/packages/wdk/src/dbs/manager.ts index 24ea8e47d..8c104c68d 100644 --- a/packages/wdk/src/dbs/manager.ts +++ b/packages/wdk/src/dbs/manager.ts @@ -2,7 +2,7 @@ import { Address } from 'ox' import { Generic } from './generic' export interface WalletRow { - wallet: Address.Address + address: Address.Address status: 'ready' | 'logging-in' loginDate: string device: Address.Address @@ -12,9 +12,9 @@ export interface WalletRow { const TABLE_NAME = 'wallets' -export class Manager extends Generic { +export class Manager extends Generic { constructor(dbName: string = 'sequence-manager') { - super(dbName, TABLE_NAME, 'wallet', [ + super(dbName, TABLE_NAME, 'address', [ (db: IDBDatabase) => { if (!db.objectStoreNames.contains(TABLE_NAME)) { db.createObjectStore(TABLE_NAME) diff --git a/packages/wdk/src/manager/index.ts b/packages/wdk/src/manager/index.ts index 3ad4d311d..e739a3ae0 100644 --- a/packages/wdk/src/manager/index.ts +++ b/packages/wdk/src/manager/index.ts @@ -1,2 +1,3 @@ export * from './manager' export * from './signatures' +export * from './wallets' diff --git a/packages/wdk/src/manager/manager.ts b/packages/wdk/src/manager/manager.ts index ac17cccad..ab6cee2fa 100644 --- a/packages/wdk/src/manager/manager.ts +++ b/packages/wdk/src/manager/manager.ts @@ -5,7 +5,7 @@ import { Signers as CoreSigners, State, Relayer } from '@0xsequence/sequence-cor import * as Db from '../dbs' import { Logger } from './logger' import { Devices } from './devices' -import { SignupArgs, Wallets } from './wallets' +import { LoginArgs, SignupArgs, WalletRow, Wallets } from './wallets' import { Transactions } from './transactions' import { BaseSignatureRequest, SignatureRequest, Signatures } from './signatures' import { Kinds, Signers } from './signers' @@ -185,6 +185,14 @@ export class Manager { return this.shared.modules.wallets.completeLogout(requestId, options) } + public async login(args: LoginArgs) { + return this.shared.modules.wallets.login(args) + } + + public async completeLogin(requestId: string) { + return this.shared.modules.wallets.completeLogin(requestId) + } + public async listWallets() { return this.shared.modules.wallets.list() } @@ -193,7 +201,7 @@ export class Manager { return this.shared.modules.wallets.exists(address) } - public onWalletsUpdate(cb: (wallets: Address.Address[]) => void, trigger?: boolean) { + public onWalletsUpdate(cb: (wallets: WalletRow[]) => void, trigger?: boolean) { return this.shared.modules.wallets.onWalletsUpdate(cb, trigger) } diff --git a/packages/wdk/src/manager/wallets.ts b/packages/wdk/src/manager/wallets.ts index f1573d25d..d7eb74acf 100644 --- a/packages/wdk/src/manager/wallets.ts +++ b/packages/wdk/src/manager/wallets.ts @@ -4,6 +4,9 @@ import { Config, Payload } from '@0xsequence/sequence-primitives' import { Kinds, WitnessExtraSignerKind } from './signers' import { Shared } from './manager' import { MnemonicHandler } from './handlers/mnemonic' +import * as Db from '../dbs' + +export type WalletRow = Db.WalletRow export type CommonSignupArgs = { noGuard?: boolean @@ -139,12 +142,12 @@ export class Wallets { return this.shared.databases.manager.get(wallet).then((r) => r !== undefined) } - public async list(): Promise { - return this.shared.databases.manager.list().then((r) => r.map((x) => x.wallet)) + public async list(): Promise { + return this.shared.databases.manager.list() } - public onWalletsUpdate(cb: (wallets: Address.Address[]) => void, trigger?: boolean) { - const undo = this.shared.databases.manager.addListener((wallets) => { + public onWalletsUpdate(cb: (wallets: WalletRow[]) => void, trigger?: boolean) { + const undo = this.shared.databases.manager.addListener(() => { this.list().then((wallets) => { cb(wallets) }) @@ -238,7 +241,7 @@ export class Wallets { // Save entry in the manager db await this.shared.databases.manager.set({ - wallet: wallet.address, + address: wallet.address, status: 'ready', loginDate: new Date().toISOString(), device: device.address, @@ -251,6 +254,11 @@ export class Wallets { async login(args: LoginArgs) { if (isLoginToWalletArgs(args)) { + const prevWallet = await this.exists(args.wallet) + if (prevWallet) { + throw new Error('wallet-already-logged-in') + } + const wallet = new Wallet(args.wallet, { context: this.shared.sequence.context, stateProvider: this.shared.sequence.stateProvider, @@ -287,7 +295,7 @@ export class Wallets { await this.shared.modules.devices.witness(device.address, wallet.address) await this.shared.databases.manager.set({ - wallet: wallet.address, + address: wallet.address, status: 'logging-in', loginDate: new Date().toISOString(), device: device.address, From 9349a2a9286ec82da917ef0bbbc84422c9c92678 Mon Sep 17 00:00:00 2001 From: Agusx1211 Date: Wed, 26 Mar 2025 19:04:16 +0000 Subject: [PATCH 252/439] Refactor types --- packages/wdk/src/dbs/index.ts | 3 +- packages/wdk/src/dbs/signers.ts | 23 ------- packages/wdk/src/dbs/transactions.ts | 45 +------------ .../wdk/src/dbs/{manager.ts => wallets.ts} | 13 +--- packages/wdk/src/index.ts | 2 +- .../wdk/src/{manager => sequence}/devices.ts | 0 .../{manager => sequence}/handlers/devices.ts | 3 +- .../{manager => sequence}/handlers/index.ts | 2 +- .../handlers/mnemonic.ts | 3 +- .../handlers/passkeys.ts | 3 +- .../wdk/src/{manager => sequence}/index.ts | 1 + .../wdk/src/{manager => sequence}/logger.ts | 0 .../wdk/src/{manager => sequence}/manager.ts | 28 ++++---- .../src/{manager => sequence}/signatures.ts | 40 +----------- .../wdk/src/{manager => sequence}/signers.ts | 0 .../src/{manager => sequence}/transactions.ts | 17 ++--- packages/wdk/src/sequence/types/index.ts | 3 + .../src/sequence/types/signatureRequest.ts | 65 +++++++++++++++++++ .../src/sequence/types/transactionRequest.ts | 42 ++++++++++++ packages/wdk/src/sequence/types/wallet.ts | 10 +++ .../wdk/src/{manager => sequence}/wallets.ts | 20 +++--- 21 files changed, 165 insertions(+), 158 deletions(-) delete mode 100644 packages/wdk/src/dbs/signers.ts rename packages/wdk/src/dbs/{manager.ts => wallets.ts} (54%) rename packages/wdk/src/{manager => sequence}/devices.ts (100%) rename packages/wdk/src/{manager => sequence}/handlers/devices.ts (92%) rename packages/wdk/src/{manager => sequence}/handlers/index.ts (96%) rename packages/wdk/src/{manager => sequence}/handlers/mnemonic.ts (95%) rename packages/wdk/src/{manager => sequence}/handlers/passkeys.ts (95%) rename packages/wdk/src/{manager => sequence}/index.ts (77%) rename packages/wdk/src/{manager => sequence}/logger.ts (100%) rename packages/wdk/src/{manager => sequence}/manager.ts (91%) rename packages/wdk/src/{manager => sequence}/signatures.ts (85%) rename packages/wdk/src/{manager => sequence}/signers.ts (100%) rename packages/wdk/src/{manager => sequence}/transactions.ts (88%) create mode 100644 packages/wdk/src/sequence/types/index.ts create mode 100644 packages/wdk/src/sequence/types/signatureRequest.ts create mode 100644 packages/wdk/src/sequence/types/transactionRequest.ts create mode 100644 packages/wdk/src/sequence/types/wallet.ts rename packages/wdk/src/{manager => sequence}/wallets.ts (95%) diff --git a/packages/wdk/src/dbs/index.ts b/packages/wdk/src/dbs/index.ts index 16cba0b39..774b2210a 100644 --- a/packages/wdk/src/dbs/index.ts +++ b/packages/wdk/src/dbs/index.ts @@ -1,5 +1,4 @@ -export * from './manager' +export * from './wallets' export * from './signatures' export * from './transactions' -export * from './signers' export * from './generic' diff --git a/packages/wdk/src/dbs/signers.ts b/packages/wdk/src/dbs/signers.ts deleted file mode 100644 index 1fc1c5ccb..000000000 --- a/packages/wdk/src/dbs/signers.ts +++ /dev/null @@ -1,23 +0,0 @@ -import { Address } from 'ox' -import { Generic } from './generic' - -export interface SignerRow { - address: Address.Address - imageHash?: string - - kind: string -} - -const TABLE_NAME = 'signers' - -export class Signers extends Generic { - constructor(dbName: string = 'sequence-signers') { - super(dbName, TABLE_NAME, 'address', [ - (db: IDBDatabase) => { - if (!db.objectStoreNames.contains(TABLE_NAME)) { - db.createObjectStore(TABLE_NAME) - } - }, - ]) - } -} diff --git a/packages/wdk/src/dbs/transactions.ts b/packages/wdk/src/dbs/transactions.ts index 726f8b852..0a1330e74 100644 --- a/packages/wdk/src/dbs/transactions.ts +++ b/packages/wdk/src/dbs/transactions.ts @@ -1,50 +1,9 @@ -import { Address } from 'ox' -import { Payload } from '@0xsequence/sequence-primitives' -import { Relayer, Envelope } from '@0xsequence/sequence-core' +import { Transaction } from '../sequence/types/transactionRequest' import { Generic } from './generic' -export type TransactionRequest = { - to: Address.Address - value?: bigint - data?: Uint8Array - gasLimit?: bigint -} - -export type RelayerOption = { - id: string - relayerId: string - feeOption?: Relayer.FeeOption - quote?: Relayer.FeeQuote -} - -export type EnvelopeStatus = 'requested' | 'defined' | 'formed' - -type TransactionBase = { - id: string - wallet: Address.Address - requests: TransactionRequest[] - source: string - envelope: Envelope.Envelope -} - -export type TransactionRequestedRow = TransactionBase & { - status: 'requested' -} - -export type TransactionDefinedRow = TransactionBase & { - status: 'defined' -} - -export type TransactionFormedRow = TransactionBase & { - relayerOption: RelayerOption - status: 'formed' -} - -export type TransactionRow = TransactionRequestedRow | TransactionDefinedRow | TransactionFormedRow - const TABLE_NAME = 'transactions' -export class Transactions extends Generic { +export class Transactions extends Generic { constructor(dbName: string = 'sequence-transactions') { super(dbName, TABLE_NAME, 'id', [ (db: IDBDatabase) => { diff --git a/packages/wdk/src/dbs/manager.ts b/packages/wdk/src/dbs/wallets.ts similarity index 54% rename from packages/wdk/src/dbs/manager.ts rename to packages/wdk/src/dbs/wallets.ts index 8c104c68d..3a4e63833 100644 --- a/packages/wdk/src/dbs/manager.ts +++ b/packages/wdk/src/dbs/wallets.ts @@ -1,18 +1,9 @@ -import { Address } from 'ox' import { Generic } from './generic' - -export interface WalletRow { - address: Address.Address - status: 'ready' | 'logging-in' - loginDate: string - device: Address.Address - loginType: string - useGuard: boolean -} +import { Wallet } from '../sequence/types' const TABLE_NAME = 'wallets' -export class Manager extends Generic { +export class Wallets extends Generic { constructor(dbName: string = 'sequence-manager') { super(dbName, TABLE_NAME, 'address', [ (db: IDBDatabase) => { diff --git a/packages/wdk/src/index.ts b/packages/wdk/src/index.ts index dfc684e5a..1ee8eb9e2 100644 --- a/packages/wdk/src/index.ts +++ b/packages/wdk/src/index.ts @@ -1,3 +1,3 @@ export * as Identity from './identity' export * as Session from './session' -export * as Manager from './manager/index' +export * as Sequence from './sequence' diff --git a/packages/wdk/src/manager/devices.ts b/packages/wdk/src/sequence/devices.ts similarity index 100% rename from packages/wdk/src/manager/devices.ts rename to packages/wdk/src/sequence/devices.ts diff --git a/packages/wdk/src/manager/handlers/devices.ts b/packages/wdk/src/sequence/handlers/devices.ts similarity index 92% rename from packages/wdk/src/manager/handlers/devices.ts rename to packages/wdk/src/sequence/handlers/devices.ts index 3eb056ba2..3385b9aaa 100644 --- a/packages/wdk/src/manager/handlers/devices.ts +++ b/packages/wdk/src/sequence/handlers/devices.ts @@ -1,9 +1,10 @@ import * as Db from '../../dbs' import { Kinds } from '../signers' -import { Signatures, SignerReady, SignerUnavailable } from '../signatures' +import { Signatures } from '../signatures' import { Address, Hex } from 'ox' import { Devices } from '../devices' import { Handler } from '.' +import { SignerReady, SignerUnavailable } from '../types' export class DevicesHandler implements Handler { kind = Kinds.LocalDevice diff --git a/packages/wdk/src/manager/handlers/index.ts b/packages/wdk/src/sequence/handlers/index.ts similarity index 96% rename from packages/wdk/src/manager/handlers/index.ts rename to packages/wdk/src/sequence/handlers/index.ts index 3ee08dff9..09f3cd12b 100644 --- a/packages/wdk/src/manager/handlers/index.ts +++ b/packages/wdk/src/sequence/handlers/index.ts @@ -1,6 +1,6 @@ import * as Db from '../../dbs' import { Address, Hex } from 'ox' -import { SignerActionable, SignerReady, SignerUnavailable } from '../signatures' +import { SignerActionable, SignerReady, SignerUnavailable } from '../types' export interface Handler { kind: string diff --git a/packages/wdk/src/manager/handlers/mnemonic.ts b/packages/wdk/src/sequence/handlers/mnemonic.ts similarity index 95% rename from packages/wdk/src/manager/handlers/mnemonic.ts rename to packages/wdk/src/sequence/handlers/mnemonic.ts index 0f4703261..b41f829f5 100644 --- a/packages/wdk/src/manager/handlers/mnemonic.ts +++ b/packages/wdk/src/sequence/handlers/mnemonic.ts @@ -2,8 +2,9 @@ import { Signers } from '@0xsequence/sequence-core' import { Address, Hex, Mnemonic } from 'ox' import { Handler } from '.' import * as Db from '../../dbs' -import { Signatures, SignerReady, SignerUnavailable } from '../signatures' +import { Signatures } from '../signatures' import { Kinds } from '../signers' +import { SignerReady, SignerUnavailable } from '../types' export class MnemonicHandler implements Handler { kind = Kinds.LoginMnemonic diff --git a/packages/wdk/src/manager/handlers/passkeys.ts b/packages/wdk/src/sequence/handlers/passkeys.ts similarity index 95% rename from packages/wdk/src/manager/handlers/passkeys.ts rename to packages/wdk/src/sequence/handlers/passkeys.ts index dfd8cf297..ddef24d0c 100644 --- a/packages/wdk/src/manager/handlers/passkeys.ts +++ b/packages/wdk/src/sequence/handlers/passkeys.ts @@ -2,9 +2,10 @@ import { Signers, State } from '@0xsequence/sequence-core' import * as Db from '../../dbs' import { Address, Bytes, Hex } from 'ox' import { Kinds } from '../signers' -import { Signatures, SignerActionable, SignerUnavailable } from '../signatures' +import { Signatures } from '../signatures' import { Extensions } from '@0xsequence/sequence-primitives' import { Handler } from '.' +import { SignerActionable, SignerUnavailable } from '../types' export class PasskeysHandler implements Handler { kind = Kinds.LoginPasskey diff --git a/packages/wdk/src/manager/index.ts b/packages/wdk/src/sequence/index.ts similarity index 77% rename from packages/wdk/src/manager/index.ts rename to packages/wdk/src/sequence/index.ts index e739a3ae0..7af1da624 100644 --- a/packages/wdk/src/manager/index.ts +++ b/packages/wdk/src/sequence/index.ts @@ -1,3 +1,4 @@ export * from './manager' export * from './signatures' export * from './wallets' +export * from './types' diff --git a/packages/wdk/src/manager/logger.ts b/packages/wdk/src/sequence/logger.ts similarity index 100% rename from packages/wdk/src/manager/logger.ts rename to packages/wdk/src/sequence/logger.ts diff --git a/packages/wdk/src/manager/manager.ts b/packages/wdk/src/sequence/manager.ts similarity index 91% rename from packages/wdk/src/manager/manager.ts rename to packages/wdk/src/sequence/manager.ts index ab6cee2fa..3f6ca211a 100644 --- a/packages/wdk/src/manager/manager.ts +++ b/packages/wdk/src/sequence/manager.ts @@ -5,18 +5,14 @@ import { Signers as CoreSigners, State, Relayer } from '@0xsequence/sequence-cor import * as Db from '../dbs' import { Logger } from './logger' import { Devices } from './devices' -import { LoginArgs, SignupArgs, WalletRow, Wallets } from './wallets' +import { LoginArgs, SignupArgs, Wallets } from './wallets' import { Transactions } from './transactions' -import { BaseSignatureRequest, SignatureRequest, Signatures } from './signatures' +import { Signatures } from './signatures' import { Kinds, Signers } from './signers' import { DevicesHandler, Handler, PasskeysHandler } from './handlers' import { MnemonicHandler } from './handlers/mnemonic' - -export type Transaction = { - to: Address.Address - value?: bigint - data?: Uint8Array -} +import { RelayerOption, TransactionRequest, Transaction } from './types/transactionRequest' +import { BaseSignatureRequest, SignatureRequest, Wallet } from './types' export type ManagerOptions = { verbose?: boolean @@ -26,7 +22,7 @@ export type ManagerOptions = { guest?: Address.Address encryptedPksDb?: CoreSigners.Pk.Encrypted.EncryptedPksDb - managerDb?: Db.Manager + managerDb?: Db.Wallets transactionsDb?: Db.Transactions signaturesDb?: Db.Signatures @@ -45,7 +41,7 @@ export const ManagerOptionsDefaults = { guest: Constants.DefaultGuest, encryptedPksDb: new CoreSigners.Pk.Encrypted.EncryptedPksDb(), - managerDb: new Db.Manager(), + managerDb: new Db.Wallets(), signaturesDb: new Db.Signatures(), transactionsDb: new Db.Transactions(), @@ -71,7 +67,7 @@ export function applyDefaults(options?: ManagerOptions) { export type Databases = { readonly encryptedPks: CoreSigners.Pk.Encrypted.EncryptedPksDb - readonly manager: Db.Manager + readonly manager: Db.Wallets readonly signatures: Db.Signatures readonly transactions: Db.Transactions } @@ -201,7 +197,7 @@ export class Manager { return this.shared.modules.wallets.exists(address) } - public onWalletsUpdate(cb: (wallets: WalletRow[]) => void, trigger?: boolean) { + public onWalletsUpdate(cb: (wallets: Wallet[]) => void, trigger?: boolean) { return this.shared.modules.wallets.onWalletsUpdate(cb, trigger) } @@ -233,7 +229,7 @@ export class Manager { public async requestTransaction( from: Address.Address, chainId: bigint, - txs: Db.TransactionRequest[], + txs: TransactionRequest[], options?: { skipDefineGas?: boolean; source?: string }, ) { return this.shared.modules.transactions.request(from, chainId, txs, options) @@ -248,16 +244,16 @@ export class Manager { public async selectRelayer( transactionId: string, - selectRelayer: (relayerOptions: Db.RelayerOption[]) => Promise, + selectRelayer: (relayerOptions: RelayerOption[]) => Promise, ) { return this.shared.modules.transactions.selectRelayer(transactionId, selectRelayer) } - public onTransactionsUpdate(cb: (transactions: Db.TransactionRow[]) => void, trigger?: boolean) { + public onTransactionsUpdate(cb: (transactions: Transaction[]) => void, trigger?: boolean) { return this.shared.modules.transactions.onTransactionsUpdate(cb, trigger) } - public onTransactionUpdate(transactionId: string, cb: (transaction: Db.TransactionRow) => void, trigger?: boolean) { + public onTransactionUpdate(transactionId: string, cb: (transaction: Transaction) => void, trigger?: boolean) { return this.shared.modules.transactions.onTransactionUpdate(transactionId, cb, trigger) } diff --git a/packages/wdk/src/manager/signatures.ts b/packages/wdk/src/sequence/signatures.ts similarity index 85% rename from packages/wdk/src/manager/signatures.ts rename to packages/wdk/src/sequence/signatures.ts index b1cb71f83..1f8dbdebd 100644 --- a/packages/wdk/src/manager/signatures.ts +++ b/packages/wdk/src/sequence/signatures.ts @@ -5,45 +5,7 @@ import { Envelope } from '@0xsequence/sequence-core' import { v7 as uuidv7 } from 'uuid' import { Shared } from './manager' import { Handler } from './handlers' - -export type SignerBase = { - address: Address.Address - imageHash?: Bytes.Bytes -} - -export type SignerSigned = SignerBase & { - handler?: Handler - status: 'signed' -} - -export type SignerUnavailable = SignerBase & { - handler?: Handler - reason: string - status: 'unavailable' -} - -export type SignerReady = SignerBase & { - handler: Handler - status: 'ready' - handle: () => Promise -} - -export type SignerActionable = SignerBase & { - handler: Handler - status: 'actionable' - message: string // TODO: Localization? - handle: () => Promise -} - -export type Signer = SignerSigned | SignerUnavailable | SignerReady | SignerActionable - -export type BaseSignatureRequest = Db.SignatureRequest - -export type SignatureRequest = BaseSignatureRequest & { - weight: bigint - threshold: bigint - signers: Signer[] -} +import { BaseSignatureRequest, SignatureRequest, SignerBase, SignerSigned, SignerUnavailable } from './types' export class Signatures { constructor(private readonly shared: Shared) {} diff --git a/packages/wdk/src/manager/signers.ts b/packages/wdk/src/sequence/signers.ts similarity index 100% rename from packages/wdk/src/manager/signers.ts rename to packages/wdk/src/sequence/signers.ts diff --git a/packages/wdk/src/manager/transactions.ts b/packages/wdk/src/sequence/transactions.ts similarity index 88% rename from packages/wdk/src/manager/transactions.ts rename to packages/wdk/src/sequence/transactions.ts index 7bf77700e..7e6febbfd 100644 --- a/packages/wdk/src/manager/transactions.ts +++ b/packages/wdk/src/sequence/transactions.ts @@ -4,15 +4,16 @@ import { Wallet } from '@0xsequence/sequence-core' import { Address, Provider } from 'ox' import { v7 as uuidv7 } from 'uuid' import { Shared } from './manager' +import { RelayerOption, Transaction, TransactionRequest } from './types/transactionRequest' export class Transactions { constructor(private readonly shared: Shared) {} - public async list(): Promise { + public async list(): Promise { return this.shared.databases.transactions.list() } - public async get(transactionId: string): Promise { + public async get(transactionId: string): Promise { const tx = await this.shared.databases.transactions.get(transactionId) if (!tx) { throw new Error(`Transaction ${transactionId} not found`) @@ -24,7 +25,7 @@ export class Transactions { async request( from: Address.Address, chainId: bigint, - txs: Db.TransactionRequest[], + txs: TransactionRequest[], options?: { skipDefineGas?: boolean source?: string @@ -105,7 +106,7 @@ export class Transactions { async selectRelayer( transactionId: string, - selectRelayer: (relayerOptions: Db.RelayerOption[]) => Promise, + selectRelayer: (relayerOptions: RelayerOption[]) => Promise, ): Promise { const tx = await this.get(transactionId) if (tx.status !== 'defined') { @@ -114,7 +115,7 @@ export class Transactions { // Obtain the relayer options for the next stage const allRelayerOptions = await Promise.all( - this.shared.sequence.relayers.map(async (relayer): Promise => { + this.shared.sequence.relayers.map(async (relayer): Promise => { const feeOptions = await relayer.feeOptions(tx.wallet, tx.envelope.chainId, tx.envelope.payload.calls) if (feeOptions.options.length === 0) { @@ -122,7 +123,7 @@ export class Transactions { { id: uuidv7(), relayerId: relayer.id, - } as Db.RelayerOption, + } as RelayerOption, ] } @@ -152,7 +153,7 @@ export class Transactions { }) } - onTransactionsUpdate(cb: (transactions: Db.TransactionRow[]) => void, trigger?: boolean) { + onTransactionsUpdate(cb: (transactions: Transaction[]) => void, trigger?: boolean) { const undo = this.shared.databases.transactions.addListener(() => { this.list().then((l) => cb(l)) }) @@ -164,7 +165,7 @@ export class Transactions { return undo } - onTransactionUpdate(transactionId: string, cb: (transaction: Db.TransactionRow) => void, trigger?: boolean) { + onTransactionUpdate(transactionId: string, cb: (transaction: Transaction) => void, trigger?: boolean) { const undo = this.shared.databases.transactions.addListener(() => { this.get(transactionId).then((t) => cb(t)) }) diff --git a/packages/wdk/src/sequence/types/index.ts b/packages/wdk/src/sequence/types/index.ts new file mode 100644 index 000000000..341a87f1b --- /dev/null +++ b/packages/wdk/src/sequence/types/index.ts @@ -0,0 +1,3 @@ +export * from './wallet' +export * from './transactionRequest' +export * from './signatureRequest' diff --git a/packages/wdk/src/sequence/types/signatureRequest.ts b/packages/wdk/src/sequence/types/signatureRequest.ts new file mode 100644 index 000000000..6cd7a226a --- /dev/null +++ b/packages/wdk/src/sequence/types/signatureRequest.ts @@ -0,0 +1,65 @@ +import { Envelope } from '@0xsequence/sequence-core' +import { Payload } from '@0xsequence/sequence-primitives' +import { Address, Bytes } from 'ox' +import { Handler } from '../handlers' + +export type ActionToPayload = { + [Actions.Logout]: Payload.ConfigUpdate + [Actions.Login]: Payload.ConfigUpdate + [Actions.SendTransaction]: Payload.Calls +} + +export const Actions = { + Logout: 'logout', + Login: 'login', + SendTransaction: 'send-transaction', +} as const + +export type Action = (typeof Actions)[keyof typeof Actions] + +export type BaseSignatureRequest = { + id: string + wallet: Address.Address + origin: string + createdAt: string + + action: A + envelope: Envelope.Signed +} + +export type SignerBase = { + address: Address.Address + imageHash?: Bytes.Bytes +} + +export type SignerSigned = SignerBase & { + handler?: Handler + status: 'signed' +} + +export type SignerUnavailable = SignerBase & { + handler?: Handler + reason: string + status: 'unavailable' +} + +export type SignerReady = SignerBase & { + handler: Handler + status: 'ready' + handle: () => Promise +} + +export type SignerActionable = SignerBase & { + handler: Handler + status: 'actionable' + message: string // TODO: Localization? + handle: () => Promise +} + +export type Signer = SignerSigned | SignerUnavailable | SignerReady | SignerActionable + +export type SignatureRequest = BaseSignatureRequest & { + weight: bigint + threshold: bigint + signers: Signer[] +} diff --git a/packages/wdk/src/sequence/types/transactionRequest.ts b/packages/wdk/src/sequence/types/transactionRequest.ts new file mode 100644 index 000000000..83758496d --- /dev/null +++ b/packages/wdk/src/sequence/types/transactionRequest.ts @@ -0,0 +1,42 @@ +import { Envelope, Relayer } from '@0xsequence/sequence-core' +import { Payload } from '@0xsequence/sequence-primitives' +import { Address } from 'ox' + +export type TransactionRequest = { + to: Address.Address + value?: bigint + data?: Uint8Array + gasLimit?: bigint +} + +export type RelayerOption = { + id: string + relayerId: string + feeOption?: Relayer.FeeOption + quote?: Relayer.FeeQuote +} + +export type EnvelopeStatus = 'requested' | 'defined' | 'formed' + +type TransactionBase = { + id: string + wallet: Address.Address + requests: TransactionRequest[] + source: string + envelope: Envelope.Envelope +} + +export type TransactionRequested = TransactionBase & { + status: 'requested' +} + +export type TransactionDefined = TransactionBase & { + status: 'defined' +} + +export type TransactionFormed = TransactionBase & { + relayerOption: RelayerOption + status: 'formed' +} + +export type Transaction = TransactionRequested | TransactionDefined | TransactionFormed diff --git a/packages/wdk/src/sequence/types/wallet.ts b/packages/wdk/src/sequence/types/wallet.ts new file mode 100644 index 000000000..4dffd9adf --- /dev/null +++ b/packages/wdk/src/sequence/types/wallet.ts @@ -0,0 +1,10 @@ +import { Address } from 'ox' + +export interface Wallet { + address: Address.Address + status: 'ready' | 'logging-in' + loginDate: string + device: Address.Address + loginType: string + useGuard: boolean +} diff --git a/packages/wdk/src/manager/wallets.ts b/packages/wdk/src/sequence/wallets.ts similarity index 95% rename from packages/wdk/src/manager/wallets.ts rename to packages/wdk/src/sequence/wallets.ts index d7eb74acf..4601eb906 100644 --- a/packages/wdk/src/manager/wallets.ts +++ b/packages/wdk/src/sequence/wallets.ts @@ -1,12 +1,10 @@ import { Address, Hex, Mnemonic } from 'ox' -import { Envelope, Signers, Wallet } from '@0xsequence/sequence-core' +import { Envelope, Signers, Wallet as CoreWallet } from '@0xsequence/sequence-core' import { Config, Payload } from '@0xsequence/sequence-primitives' import { Kinds, WitnessExtraSignerKind } from './signers' import { Shared } from './manager' import { MnemonicHandler } from './handlers/mnemonic' -import * as Db from '../dbs' - -export type WalletRow = Db.WalletRow +import { Wallet } from './types' export type CommonSignupArgs = { noGuard?: boolean @@ -142,11 +140,11 @@ export class Wallets { return this.shared.databases.manager.get(wallet).then((r) => r !== undefined) } - public async list(): Promise { + public async list(): Promise { return this.shared.databases.manager.list() } - public onWalletsUpdate(cb: (wallets: WalletRow[]) => void, trigger?: boolean) { + public onWalletsUpdate(cb: (wallets: Wallet[]) => void, trigger?: boolean) { const undo = this.shared.databases.manager.addListener(() => { this.list().then((wallets) => { cb(wallets) @@ -225,7 +223,7 @@ export class Wallets { const initialConfiguration = toConfig(0n, loginTopology, devicesTopology, modules, guardTopology) // Create wallet - const wallet = await Wallet.fromConfiguration(initialConfiguration, { + const wallet = await CoreWallet.fromConfiguration(initialConfiguration, { context: this.shared.sequence.context, stateProvider: this.shared.sequence.stateProvider, guest: this.shared.sequence.guest, @@ -259,7 +257,7 @@ export class Wallets { throw new Error('wallet-already-logged-in') } - const wallet = new Wallet(args.wallet, { + const wallet = new CoreWallet(args.wallet, { context: this.shared.sequence.context, stateProvider: this.shared.sequence.stateProvider, guest: this.shared.sequence.guest, @@ -324,7 +322,7 @@ export class Wallets { throw new Error('login-for-wallet-not-found') } - const wallet = new Wallet(request.wallet, { + const wallet = new CoreWallet(request.wallet, { context: this.shared.sequence.context, stateProvider: this.shared.sequence.stateProvider, guest: this.shared.sequence.guest, @@ -363,7 +361,7 @@ export class Wallets { throw new Error('device-not-found') } - const walletObj = new Wallet(wallet, { + const walletObj = new CoreWallet(wallet, { context: this.shared.sequence.context, stateProvider: this.shared.sequence.stateProvider, guest: this.shared.sequence.guest, @@ -400,7 +398,7 @@ export class Wallets { throw new Error('wallet-not-found') } - const wallet = new Wallet(request.wallet, { + const wallet = new CoreWallet(request.wallet, { context: this.shared.sequence.context, stateProvider: this.shared.sequence.stateProvider, guest: this.shared.sequence.guest, From 10f93de5a3835ebd6072bd8fffa31dce9184c4fe Mon Sep 17 00:00:00 2001 From: Agusx1211 Date: Thu, 27 Mar 2025 18:33:13 +0000 Subject: [PATCH 253/439] Fix create provider --- packages/wdk/src/sequence/index.ts | 4 ++++ packages/wdk/src/sequence/manager.ts | 6 +++++- packages/wdk/src/sequence/transactions.ts | 9 +++++++-- 3 files changed, 16 insertions(+), 3 deletions(-) diff --git a/packages/wdk/src/sequence/index.ts b/packages/wdk/src/sequence/index.ts index 7af1da624..56f7d9ef2 100644 --- a/packages/wdk/src/sequence/index.ts +++ b/packages/wdk/src/sequence/index.ts @@ -1,4 +1,8 @@ +import { Network } from '@0xsequence/sequence-primitives' + export * from './manager' export * from './signatures' export * from './wallets' export * from './types' + +export { Network as Networks } diff --git a/packages/wdk/src/sequence/manager.ts b/packages/wdk/src/sequence/manager.ts index 3f6ca211a..a0e4dc1c9 100644 --- a/packages/wdk/src/sequence/manager.ts +++ b/packages/wdk/src/sequence/manager.ts @@ -242,13 +242,17 @@ export class Manager { return this.shared.modules.transactions.define(transactionId, changes) } - public async selectRelayer( + public async selectTransactionRelayer( transactionId: string, selectRelayer: (relayerOptions: RelayerOption[]) => Promise, ) { return this.shared.modules.transactions.selectRelayer(transactionId, selectRelayer) } + public async deleteTransaction(transactionId: string) { + return this.shared.modules.transactions.delete(transactionId) + } + public onTransactionsUpdate(cb: (transactions: Transaction[]) => void, trigger?: boolean) { return this.shared.modules.transactions.onTransactionsUpdate(cb, trigger) } diff --git a/packages/wdk/src/sequence/transactions.ts b/packages/wdk/src/sequence/transactions.ts index 7e6febbfd..cc54c3948 100644 --- a/packages/wdk/src/sequence/transactions.ts +++ b/packages/wdk/src/sequence/transactions.ts @@ -1,7 +1,7 @@ import { Payload } from '@0xsequence/sequence-primitives' import * as Db from '../dbs' import { Wallet } from '@0xsequence/sequence-core' -import { Address, Provider } from 'ox' +import { Address, Provider, RpcTransport } from 'ox' import { v7 as uuidv7 } from 'uuid' import { Shared } from './manager' import { RelayerOption, Transaction, TransactionRequest } from './types/transactionRequest' @@ -36,7 +36,8 @@ export class Transactions { throw new Error(`Network not found for ${chainId}`) } - const provider = Provider.from(network.rpc) + const transport = RpcTransport.fromHttp(network.rpc) + const provider = Provider.from(transport) const wallet = new Wallet(from, { stateProvider: this.shared.sequence.stateProvider }) const calls = txs.map( @@ -176,4 +177,8 @@ export class Transactions { return undo } + + async delete(transactionId: string) { + await this.shared.databases.transactions.del(transactionId) + } } From 4f5631b85c1d360335d99b64478bac9e2808c92e Mon Sep 17 00:00:00 2001 From: Michael Standen Date: Wed, 26 Mar 2025 11:07:49 +1300 Subject: [PATCH 254/439] hash() like functions return Hex.Hex --- packages/core/src/signers/session-manager.ts | 2 +- packages/core/src/state/local/index.ts | 2 +- packages/core/test/session-manager.test.ts | 2 +- .../primitives/src/extensions/passkeys.ts | 28 +++++++++---------- packages/primitives/src/generic-tree.ts | 17 +++++------ packages/primitives/src/session-config.ts | 19 ++++++------- .../wdk/src/session/session-controller.ts | 2 +- 7 files changed, 35 insertions(+), 37 deletions(-) diff --git a/packages/core/src/signers/session-manager.ts b/packages/core/src/signers/session-manager.ts index d2a0d27c7..00c93e509 100644 --- a/packages/core/src/signers/session-manager.ts +++ b/packages/core/src/signers/session-manager.ts @@ -78,7 +78,7 @@ export class SessionManager implements SapientSigner { get imageHash(): Hex.Hex { const configurationTree = SessionConfig.sessionsTopologyToConfigurationTree(this._topology) - return Hex.fromBytes(GenericTree.hash(configurationTree)) + return GenericTree.hash(configurationTree) } withProvider(provider: Provider.Provider): SessionManager { diff --git a/packages/core/src/state/local/index.ts b/packages/core/src/state/local/index.ts index ef908acb7..0cee751cd 100644 --- a/packages/core/src/state/local/index.ts +++ b/packages/core/src/state/local/index.ts @@ -390,7 +390,7 @@ export class Provider implements ProviderInterface { } saveTree(tree: GenericTree.Tree): void | Promise { - return this.store.saveTree(Bytes.toHex(GenericTree.hash(tree)), tree) + return this.store.saveTree(GenericTree.hash(tree), tree) } } diff --git a/packages/core/test/session-manager.test.ts b/packages/core/test/session-manager.test.ts index 8dc809c80..98e12ea5f 100644 --- a/packages/core/test/session-manager.test.ts +++ b/packages/core/test/session-manager.test.ts @@ -98,7 +98,7 @@ describe('SessionManager', () => { const randomBlacklistAddress = randomAddress() topology = SessionConfig.addToImplicitBlacklist(topology, randomBlacklistAddress) - const imageHash = Hex.fromBytes(GenericTree.hash(SessionConfig.sessionsTopologyToConfigurationTree(topology))) + const imageHash = GenericTree.hash(SessionConfig.sessionsTopologyToConfigurationTree(topology)) // Save the topology to storage await stateProvider.saveTree(SessionConfig.sessionsTopologyToConfigurationTree(topology)) diff --git a/packages/primitives/src/extensions/passkeys.ts b/packages/primitives/src/extensions/passkeys.ts index 03c0a30fd..77b0a5e98 100644 --- a/packages/primitives/src/extensions/passkeys.ts +++ b/packages/primitives/src/extensions/passkeys.ts @@ -33,7 +33,7 @@ export function metadataTree(metadata: Required['metadata']): Generic ], ] } else { - return Bytes.fromHex(metadata) + return metadata } } @@ -42,9 +42,9 @@ export function metadataNode(metadata: Required['metadata']): Generic } export function toTree(publicKey: PublicKey): GenericTree.Tree { - const a = Bytes.padLeft(Bytes.fromHex(publicKey.x), 32) - const b = Bytes.padLeft(Bytes.fromHex(publicKey.y), 32) - const c = Bytes.padLeft(publicKey.requireUserVerification ? Bytes.from([1]) : Bytes.from([0]), 32) + const a = Hex.padLeft(publicKey.x, 32) + const b = Hex.padLeft(publicKey.y, 32) + const c = Hex.padLeft(publicKey.requireUserVerification ? '0x01' : '0x00', 32) if (publicKey.metadata) { return [ @@ -65,16 +65,14 @@ export function fromTree(tree: GenericTree.Tree): PublicKey { throw new Error('Invalid tree for x,y') } - const [xBytes, yBytes] = p1 - if (!GenericTree.isNode(xBytes) || xBytes.length !== 32) { + const [x, y] = p1 + if (!GenericTree.isNode(x)) { throw new Error('Invalid x bytes') } - if (!GenericTree.isNode(yBytes) || yBytes.length !== 32) { + if (!GenericTree.isNode(y)) { throw new Error('Invalid y bytes') } - const x = Hex.fromBytes(xBytes) - const y = Hex.fromBytes(yBytes) let requireUserVerification = false let metadata: PublicKey['metadata'] @@ -87,7 +85,8 @@ export function fromTree(tree: GenericTree.Tree): PublicKey { if (!GenericTree.isNode(c) || c.length !== 32) { throw new Error('Invalid c bytes') } - requireUserVerification = c[31] === 1 + const cBytes = Hex.toBytes(c) + requireUserVerification = cBytes[31] === 1 if (GenericTree.isBranch(meta)) { if (meta.length !== 2) { @@ -113,7 +112,7 @@ export function fromTree(tree: GenericTree.Tree): PublicKey { const createdAt = Number(Bytes.toBigInt(createdAtLeaf.value)) metadata = { credentialId, name, createdAt } } else if (GenericTree.isNode(meta) && meta.length === 32) { - metadata = Hex.fromBytes(meta) + metadata = meta } else { throw new Error('Invalid metadata node') } @@ -121,14 +120,15 @@ export function fromTree(tree: GenericTree.Tree): PublicKey { if (!GenericTree.isNode(p2) || p2.length !== 32) { throw new Error('Invalid c bytes') } - requireUserVerification = p2[31] === 1 + const p2Bytes = Hex.toBytes(p2) + requireUserVerification = p2Bytes[31] === 1 } return { requireUserVerification, x, y, metadata } } export function rootFor(publicKey: PublicKey): Hex.Hex { - return Hex.fromBytes(GenericTree.hash(toTree(publicKey))) + return GenericTree.hash(toTree(publicKey)) } export type DecodedSignature = { @@ -179,7 +179,7 @@ export function encode(decoded: DecodedSignature): Bytes.Bytes { if (!decoded.publicKey.metadata) { throw new Error('Metadata is not present in the public key') } - result = Bytes.concat(result, metadataNode(decoded.publicKey.metadata)) + result = Bytes.concat(result, Hex.toBytes(metadataNode(decoded.publicKey.metadata))) } result = Bytes.concat(result, Bytes.padLeft(Bytes.fromNumber(authDataSize), bytesAuthDataSize)) diff --git a/packages/primitives/src/generic-tree.ts b/packages/primitives/src/generic-tree.ts index dca9b4617..4270e64dc 100644 --- a/packages/primitives/src/generic-tree.ts +++ b/packages/primitives/src/generic-tree.ts @@ -1,4 +1,4 @@ -import { Bytes, Hash } from 'ox' +import { Bytes, Hash, Hex } from 'ox' // An encoded configuration tree is a generic configuration tree that has been encoded into a bytes sequence. // It can be used to represent a configuration tree in a compact form. @@ -9,7 +9,8 @@ export type Leaf = { value: Bytes.Bytes } -export type Node = Bytes.Bytes +// Hashed leaf +export type Node = Hex.Hex export type Branch = [Tree, Tree, ...Tree[]] export type Tree = Branch | Leaf | Node @@ -27,21 +28,21 @@ export function isTree(tree: any): tree is Tree { } export function isNode(node: any): node is Node { - return Bytes.validate(node) && node.length === 32 + return Hex.validate(node) && Hex.size(node) === 32 } -export function hash(tree: Tree): Bytes.Bytes { +export function hash(tree: Tree): Hex.Hex { if (isBranch(tree)) { // Sequentially hash the children const hashedChildren = tree.map(hash) if (hashedChildren.length === 0) { throw new Error('Empty branch') } - let chash = hashedChildren[0]! + let chashBytes = Hex.toBytes(hashedChildren[0]!) for (let i = 1; i < hashedChildren.length; i++) { - chash = Hash.keccak256(Bytes.concat(chash, hashedChildren[i]!)) + chashBytes = Hash.keccak256(Bytes.concat(chashBytes, Hex.toBytes(hashedChildren[i]!))) } - return chash + return Hex.fromBytes(chashBytes) } // Nodes are already hashed @@ -50,5 +51,5 @@ export function hash(tree: Tree): Bytes.Bytes { } // Hash the leaf - return Hash.keccak256(tree.value) + return Hash.keccak256(tree.value, { as: 'Hex' }) } diff --git a/packages/primitives/src/session-config.ts b/packages/primitives/src/session-config.ts index c03103eb2..5b7da7720 100644 --- a/packages/primitives/src/session-config.ts +++ b/packages/primitives/src/session-config.ts @@ -1,4 +1,4 @@ -import { Address, Bytes, Hash } from 'ox' +import { Address, Bytes, Hash, Hex } from 'ox' import * as GenericTree from './generic-tree' import { decodeSessionPermissions, @@ -30,13 +30,13 @@ export type SessionPermissionsLeaf = SessionPermissions & { type: 'session-permissions' } -export type SessionNode = Bytes.Bytes // Hashed +export type SessionNode = Hex.Hex // Hashed leaf export type SessionLeaf = SessionPermissionsLeaf | ImplicitBlacklistLeaf | IdentitySignerLeaf export type SessionBranch = [SessionsTopology, SessionsTopology, ...SessionsTopology[]] export type SessionsTopology = SessionBranch | SessionLeaf | SessionNode function isSessionsNode(topology: any): topology is SessionNode { - return Bytes.validate(topology) + return Hex.validate(topology) && Hex.size(topology) === 32 } function isImplicitBlacklist(topology: any): topology is ImplicitBlacklistLeaf { @@ -314,7 +314,7 @@ export function encodeSessionsTopology(topology: SessionsTopology): Bytes.Bytes if (isSessionsNode(topology)) { const flagByte = SESSIONS_FLAG_NODE << 4 - return Bytes.concat(Bytes.fromNumber(flagByte), topology) + return Bytes.concat(Bytes.fromNumber(flagByte), Hex.toBytes(topology)) } if (isImplicitBlacklist(topology)) { @@ -352,7 +352,7 @@ export function sessionsTopologyToJson(topology: SessionsTopology): string { function encodeSessionsTopologyForJson(topology: SessionsTopology): any { if (isSessionsNode(topology)) { - return Bytes.toHex(topology) + return topology } if (isSessionPermissions(topology)) { @@ -383,11 +383,8 @@ function sessionsTopologyFromParsed(parsed: any): SessionsTopology { } // Parse node - if (typeof parsed === 'string' && parsed.startsWith('0x')) { - const maybeBytes = Bytes.fromHex(parsed as `0x${string}`) - if (Bytes.validate(maybeBytes)) { - return maybeBytes - } + if (typeof parsed === 'string' && Hex.validate(parsed) && Hex.size(parsed) === 32) { + return parsed } // Parse permissions @@ -604,7 +601,7 @@ export function minimiseSessionsTopology( const branches = topology.map((b) => minimiseSessionsTopology(b, explicitSigners, implicitSigners)) // If all branches are nodes, the branch can be a node too if (branches.every((b) => isSessionsNode(b))) { - return Hash.keccak256(Bytes.concat(...branches)) + return Hash.keccak256(Bytes.concat(...branches.map((b) => Hex.toBytes(b))), { as: 'Hex' }) } return branches as SessionBranch } diff --git a/packages/wdk/src/session/session-controller.ts b/packages/wdk/src/session/session-controller.ts index cf368607b..31f7d7618 100644 --- a/packages/wdk/src/session/session-controller.ts +++ b/packages/wdk/src/session/session-controller.ts @@ -64,7 +64,7 @@ export class SessionController { return this._manager.topology } - get imageHash(): Bytes.Bytes { + get imageHash(): Hex.Hex { const configurationTree = SessionConfig.sessionsTopologyToConfigurationTree(this._manager.topology) return GenericTree.hash(configurationTree) } From 46cf85db710ba916a758af3a5017330e4b4d7f26 Mon Sep 17 00:00:00 2001 From: Agusx1211 Date: Fri, 28 Mar 2025 11:33:27 +0000 Subject: [PATCH 255/439] Basic local relayer --- packages/core/src/envelope.ts | 4 + packages/core/src/relayer/local.ts | 31 +++++ packages/core/src/wallet.ts | 1 + packages/primitives/src/constants.ts | 2 +- packages/primitives/src/context.ts | 3 +- packages/wdk/src/sequence/manager.ts | 13 +- packages/wdk/src/sequence/transactions.ts | 117 ++++++++++++++---- .../src/sequence/types/transactionRequest.ts | 2 + 8 files changed, 139 insertions(+), 34 deletions(-) diff --git a/packages/core/src/envelope.ts b/packages/core/src/envelope.ts index 323e91911..fdc0ee860 100644 --- a/packages/core/src/envelope.ts +++ b/packages/core/src/envelope.ts @@ -139,3 +139,7 @@ export function addSignature( throw new Error('Unsupported signature type') } } + +export function isSigned(envelope: Envelope): envelope is Signed { + return typeof envelope === 'object' && 'signatures' in envelope +} diff --git a/packages/core/src/relayer/local.ts b/packages/core/src/relayer/local.ts index c570cc44b..ee4be3376 100644 --- a/packages/core/src/relayer/local.ts +++ b/packages/core/src/relayer/local.ts @@ -11,6 +11,37 @@ export class LocalRelayer implements Relayer { constructor(public readonly provider: GenericProvider) {} + static createFromWindow(window: Window): LocalRelayer | undefined { + const eth = (window as any).ethereum + if (!eth) { + console.warn('Window.ethereum not found, skipping local relayer') + return undefined + } + + return new LocalRelayer({ + sendTransaction: async (args) => { + const accounts: string[] = await eth.request({ method: 'eth_requestAccounts' }) + const from = accounts[0] + if (!from) { + console.warn('No account selected, skipping local relayer') + return undefined + } + + const tx = await eth.request({ + method: 'eth_sendTransaction', + params: [ + { + from, + to: args.to, + data: args.data, + }, + ], + }) + return tx + }, + }) + } + feeOptions( wallet: Address.Address, chainId: bigint, diff --git a/packages/core/src/wallet.ts b/packages/core/src/wallet.ts index 609f4b008..4c38c4e22 100644 --- a/packages/core/src/wallet.ts +++ b/packages/core/src/wallet.ts @@ -182,6 +182,7 @@ export class Wallet { // Get the current configuration const configuration = await this.stateProvider.getConfiguration(imageHash) + console.log('configuration', imageHash, configuration) if (!configuration) { throw new Error(`cannot find configuration details for ${this.address}`) } diff --git a/packages/primitives/src/constants.ts b/packages/primitives/src/constants.ts index 590d94766..dcc2829f9 100644 --- a/packages/primitives/src/constants.ts +++ b/packages/primitives/src/constants.ts @@ -3,7 +3,7 @@ import { Abi, Address, Hex } from 'ox' export const DEFAULT_CREATION_CODE: Hex.Hex = '0x603e600e3d39601e805130553df33d3d34601c57363d3d373d363d30545af43d82803e903d91601c57fd5bf3' -export const DefaultGuest: Address.Address = '0x4569b0450924b130E6177bcAa6A7c20e4bFdDdE0' +export const DefaultGuest: Address.Address = '0xbe6E447E83Ff66Dbfc7843992191f42F6140912C' export const DefaultSessionManager: Address.Address = '0x20115Aa0988e2d4EC7e41bA599Fd64A3Eb667bB5' // ERC1271 diff --git a/packages/primitives/src/context.ts b/packages/primitives/src/context.ts index 5e0740b9d..72d8700d4 100644 --- a/packages/primitives/src/context.ts +++ b/packages/primitives/src/context.ts @@ -10,7 +10,6 @@ export type Context = { export const Dev1: Context = { factory: '0xBd0F8abD58B4449B39C57Ac9D5C67433239aC447', - stage1: '0x76E132217927D8B0d1374328adC48Bd2b7EEC8d7', - // stage2: '0xb1ED343aAaC68F800B66b66c63F87211BEF8Bb97', + stage1: '0xB65020d89aC5EfDD71EB4FE17C59FEf4233EB8b9', creationCode: DEFAULT_CREATION_CODE, } diff --git a/packages/wdk/src/sequence/manager.ts b/packages/wdk/src/sequence/manager.ts index a0e4dc1c9..8d85815c1 100644 --- a/packages/wdk/src/sequence/manager.ts +++ b/packages/wdk/src/sequence/manager.ts @@ -47,7 +47,7 @@ export const ManagerOptionsDefaults = { stateProvider: new State.Local.Provider(new State.Local.IndexedDbStore()), networks: Network.All, - relayers: [], // TODO: How to auto-populate local relayer? + relayers: [Relayer.Local.LocalRelayer.createFromWindow(window)].filter((r) => r !== undefined), defaultGuardTopology: { // TODO: Move this somewhere else @@ -242,11 +242,12 @@ export class Manager { return this.shared.modules.transactions.define(transactionId, changes) } - public async selectTransactionRelayer( - transactionId: string, - selectRelayer: (relayerOptions: RelayerOption[]) => Promise, - ) { - return this.shared.modules.transactions.selectRelayer(transactionId, selectRelayer) + public async selectTransactionRelayer(transactionId: string, relayerOptionId: string) { + return this.shared.modules.transactions.selectRelayer(transactionId, relayerOptionId) + } + + public async relayTransaction(transactionOrSignatureId: string) { + return this.shared.modules.transactions.relay(transactionOrSignatureId) } public async deleteTransaction(transactionId: string) { diff --git a/packages/wdk/src/sequence/transactions.ts b/packages/wdk/src/sequence/transactions.ts index cc54c3948..928a634f7 100644 --- a/packages/wdk/src/sequence/transactions.ts +++ b/packages/wdk/src/sequence/transactions.ts @@ -1,10 +1,10 @@ import { Payload } from '@0xsequence/sequence-primitives' import * as Db from '../dbs' -import { Wallet } from '@0xsequence/sequence-core' +import { Envelope, Wallet } from '@0xsequence/sequence-core' import { Address, Provider, RpcTransport } from 'ox' import { v7 as uuidv7 } from 'uuid' import { Shared } from './manager' -import { RelayerOption, Transaction, TransactionRequest } from './types/transactionRequest' +import { RelayerOption, Transaction, TransactionFormed, TransactionRequest } from './types/transactionRequest' export class Transactions { constructor(private readonly shared: Shared) {} @@ -99,22 +99,7 @@ export class Transactions { } } - await this.shared.databases.transactions.set({ - ...tx, - status: 'defined', - }) - } - - async selectRelayer( - transactionId: string, - selectRelayer: (relayerOptions: RelayerOption[]) => Promise, - ): Promise { - const tx = await this.get(transactionId) - if (tx.status !== 'defined') { - throw new Error(`Transaction ${transactionId} is not in the defined state`) - } - - // Obtain the relayer options for the next stage + // Get relayer options const allRelayerOptions = await Promise.all( this.shared.sequence.relayers.map(async (relayer): Promise => { const feeOptions = await relayer.feeOptions(tx.wallet, tx.envelope.chainId, tx.envelope.payload.calls) @@ -137,21 +122,103 @@ export class Transactions { }), ) - const selection = await selectRelayer(allRelayerOptions.flat()) + await this.shared.databases.transactions.set({ + ...tx, + relayerOptions: allRelayerOptions.flat(), + status: 'defined', + }) + } + + async selectRelayer(transactionId: string, relayerOptionId: string): Promise { + const tx = await this.get(transactionId) + if (tx.status !== 'defined') { + throw new Error(`Transaction ${transactionId} is not in the defined state`) + } + + const selection = tx.relayerOptions.find((option) => option.id === relayerOptionId) if (!selection) { - return + throw new Error(`Relayer option ${relayerOptionId} not found for transaction ${transactionId}`) } + // Pass to the signatures manager + const signatureId = await this.shared.modules.signatures.request(tx.envelope, 'send-transaction', { + origin: tx.source, + }) + await this.shared.databases.transactions.set({ ...tx, + relayerOptions: undefined, relayerOption: selection, status: 'formed', - }) + signatureId, + } as TransactionFormed) - // Pass to the signatures manager - return this.shared.modules.signatures.request(tx.envelope, 'send-transaction', { - origin: tx.source, - }) + return signatureId + } + async relay(transactionOrSignatureId: string) { + // First, try to get the transaction directly + let tx: Transaction | undefined + try { + tx = await this.get(transactionOrSignatureId) + } catch (e) { + // If not found, it might be a signature ID + const signature = await this.shared.modules.signatures.get(transactionOrSignatureId) + if (!signature) { + throw new Error(`Neither transaction nor signature found with ID ${transactionOrSignatureId}`) + } + + // Find the transaction associated with this signature + const transactions = await this.list() + tx = transactions.find( + (t) => t.status === 'formed' && 'signatureId' in t && t.signatureId === transactionOrSignatureId, + ) + + if (!tx) { + throw new Error(`No transaction found for signature ${transactionOrSignatureId}`) + } + } + + const transactionId = tx.id + + if (tx.status !== 'formed') { + throw new Error(`Transaction ${transactionId} is not in the formed state`) + } + + const signature = await this.shared.modules.signatures.get(tx.signatureId) + if (!signature) { + throw new Error(`Signature ${tx.signatureId} not found for transaction ${transactionId}`) + } + + const network = this.shared.sequence.networks.find((network) => network.chainId === tx.envelope.chainId) + if (!network) { + throw new Error(`Network not found for ${tx.envelope.chainId}`) + } + + const transport = RpcTransport.fromHttp(network.rpc) + const provider = Provider.from(transport) + + const wallet = new Wallet(tx.wallet, { stateProvider: this.shared.sequence.stateProvider }) + if (!Payload.isCalls(signature.envelope.payload)) { + throw new Error(`Signature ${tx.signatureId} is not a calls payload`) + } + + if (!Envelope.isSigned(signature.envelope)) { + throw new Error(`Transaction ${transactionId} is not signed`) + } + + const { weight, threshold } = Envelope.weightOf(signature.envelope) + if (weight < threshold) { + throw new Error(`Transaction ${transactionId} has insufficient weight`) + } + + const transaction = await wallet.buildTransaction(provider, signature.envelope as Envelope.Signed) + const relayer = this.shared.sequence.relayers.find((relayer) => relayer.id === tx.relayerOption.relayerId) + + if (!relayer) { + throw new Error(`Relayer ${tx.relayerOption.relayerId} not found for transaction ${transactionId}`) + } + + return relayer.relay(transaction.to, transaction.data, tx.envelope.chainId, tx.relayerOption.quote) } onTransactionsUpdate(cb: (transactions: Transaction[]) => void, trigger?: boolean) { diff --git a/packages/wdk/src/sequence/types/transactionRequest.ts b/packages/wdk/src/sequence/types/transactionRequest.ts index 83758496d..d22107c87 100644 --- a/packages/wdk/src/sequence/types/transactionRequest.ts +++ b/packages/wdk/src/sequence/types/transactionRequest.ts @@ -32,11 +32,13 @@ export type TransactionRequested = TransactionBase & { export type TransactionDefined = TransactionBase & { status: 'defined' + relayerOptions: RelayerOption[] } export type TransactionFormed = TransactionBase & { relayerOption: RelayerOption status: 'formed' + signatureId: string } export type Transaction = TransactionRequested | TransactionDefined | TransactionFormed From e5588424638a8fb5d8701a5d034e7391e696ed95 Mon Sep 17 00:00:00 2001 From: Agusx1211 Date: Fri, 28 Mar 2025 15:10:34 +0000 Subject: [PATCH 256/439] Handle relayed transaction --- packages/wdk/src/sequence/manager.ts | 4 +++ packages/wdk/src/sequence/signatures.ts | 4 +++ packages/wdk/src/sequence/transactions.ts | 25 +++++++++++++++++-- .../src/sequence/types/transactionRequest.ts | 9 +++++-- 4 files changed, 38 insertions(+), 4 deletions(-) diff --git a/packages/wdk/src/sequence/manager.ts b/packages/wdk/src/sequence/manager.ts index 8d85815c1..27a05bdc5 100644 --- a/packages/wdk/src/sequence/manager.ts +++ b/packages/wdk/src/sequence/manager.ts @@ -224,6 +224,10 @@ export class Manager { return this.shared.modules.signatures.onSignatureRequestUpdate(requestId, cb, onError, trigger) } + public async deleteSignatureRequest(requestId: string) { + return this.shared.modules.signatures.delete(requestId) + } + // Transactions public async requestTransaction( diff --git a/packages/wdk/src/sequence/signatures.ts b/packages/wdk/src/sequence/signatures.ts index 1f8dbdebd..62219b3de 100644 --- a/packages/wdk/src/sequence/signatures.ts +++ b/packages/wdk/src/sequence/signatures.ts @@ -176,4 +176,8 @@ export class Signatures { await this.shared.databases.signatures.set(request) } + + async delete(requestId: string) { + await this.shared.databases.signatures.del(requestId) + } } diff --git a/packages/wdk/src/sequence/transactions.ts b/packages/wdk/src/sequence/transactions.ts index 928a634f7..f6dfe2577 100644 --- a/packages/wdk/src/sequence/transactions.ts +++ b/packages/wdk/src/sequence/transactions.ts @@ -4,7 +4,13 @@ import { Envelope, Wallet } from '@0xsequence/sequence-core' import { Address, Provider, RpcTransport } from 'ox' import { v7 as uuidv7 } from 'uuid' import { Shared } from './manager' -import { RelayerOption, Transaction, TransactionFormed, TransactionRequest } from './types/transactionRequest' +import { + RelayerOption, + Transaction, + TransactionFormed, + TransactionRelayed, + TransactionRequest, +} from './types/transactionRequest' export class Transactions { constructor(private readonly shared: Shared) {} @@ -218,7 +224,22 @@ export class Transactions { throw new Error(`Relayer ${tx.relayerOption.relayerId} not found for transaction ${transactionId}`) } - return relayer.relay(transaction.to, transaction.data, tx.envelope.chainId, tx.relayerOption.quote) + const { opHash } = await relayer.relay( + transaction.to, + transaction.data, + tx.envelope.chainId, + tx.relayerOption.quote, + ) + + await this.shared.databases.transactions.set({ + ...tx, + status: 'relayed', + opHash, + } as TransactionRelayed) + + await this.shared.modules.signatures.delete(signature.id) + + return opHash } onTransactionsUpdate(cb: (transactions: Transaction[]) => void, trigger?: boolean) { diff --git a/packages/wdk/src/sequence/types/transactionRequest.ts b/packages/wdk/src/sequence/types/transactionRequest.ts index d22107c87..d5c0f00ee 100644 --- a/packages/wdk/src/sequence/types/transactionRequest.ts +++ b/packages/wdk/src/sequence/types/transactionRequest.ts @@ -16,7 +16,7 @@ export type RelayerOption = { quote?: Relayer.FeeQuote } -export type EnvelopeStatus = 'requested' | 'defined' | 'formed' +export type EnvelopeStatus = 'requested' | 'defined' | 'formed' | 'relayed' type TransactionBase = { id: string @@ -41,4 +41,9 @@ export type TransactionFormed = TransactionBase & { signatureId: string } -export type Transaction = TransactionRequested | TransactionDefined | TransactionFormed +export type TransactionRelayed = TransactionBase & { + status: 'relayed' + opHash: string +} + +export type Transaction = TransactionRequested | TransactionDefined | TransactionFormed | TransactionRelayed From e77b5de6f5563618483728a429c02dac8be89444 Mon Sep 17 00:00:00 2001 From: Agusx1211 Date: Fri, 28 Mar 2025 16:51:22 +0000 Subject: [PATCH 257/439] Passkey fixes --- packages/core/src/signers/index.ts | 8 +++ packages/primitives/src/extensions/index.ts | 2 +- packages/wdk/src/sequence/wallets.ts | 72 ++++++++++++++------- 3 files changed, 59 insertions(+), 23 deletions(-) diff --git a/packages/core/src/signers/index.ts b/packages/core/src/signers/index.ts index e19ec29a2..81d271134 100644 --- a/packages/core/src/signers/index.ts +++ b/packages/core/src/signers/index.ts @@ -34,3 +34,11 @@ export interface Witnessable { } type MaybePromise = T | Promise + +export function isSapientSigner(signer: Signer | SapientSigner): signer is SapientSigner { + return 'signSapient' in signer +} + +export function isSigner(signer: Signer | SapientSigner): signer is Signer { + return 'sign' in signer +} diff --git a/packages/primitives/src/extensions/index.ts b/packages/primitives/src/extensions/index.ts index 951996f63..5405ff8d5 100644 --- a/packages/primitives/src/extensions/index.ts +++ b/packages/primitives/src/extensions/index.ts @@ -5,7 +5,7 @@ export type Extensions = { } export const Dev1: Extensions = { - passkeys: '0x38A6E2281C1A010e2F98159f5Fc44787957a6725', + passkeys: '0x8f26281dB84C18aAeEa8a53F94c835393229d296', } export * as Passkeys from './passkeys' diff --git a/packages/wdk/src/sequence/wallets.ts b/packages/wdk/src/sequence/wallets.ts index 4601eb906..c17d1f658 100644 --- a/packages/wdk/src/sequence/wallets.ts +++ b/packages/wdk/src/sequence/wallets.ts @@ -1,4 +1,4 @@ -import { Address, Hex, Mnemonic } from 'ox' +import { Address, Hex } from 'ox' import { Envelope, Signers, Wallet as CoreWallet } from '@0xsequence/sequence-core' import { Config, Payload } from '@0xsequence/sequence-primitives' import { Kinds, WitnessExtraSignerKind } from './signers' @@ -31,7 +31,7 @@ export function isLoginToWalletArgs(args: LoginArgs): args is LoginToWalletArgs return 'wallet' in args } -function buildCappedTree(members: Address.Address[]): Config.Topology { +function buildCappedTree(members: { address: Address.Address; imageHash?: Hex.Hex }[]): Config.Topology { const loginMemberWeight = 1n if (members.length === 0) { @@ -45,24 +45,41 @@ function buildCappedTree(members: Address.Address[]): Config.Topology { } if (members.length === 1) { - return { - type: 'signer', - address: members[0], - weight: loginMemberWeight, - } as Config.SignerLeaf + if (members[0]!.imageHash) { + return { + type: 'sapient-signer', + address: members[0]!.address, + imageHash: members[0]!.imageHash, + weight: loginMemberWeight, + } as Config.SapientSignerLeaf + } else { + return { + type: 'signer', + address: members[0]!.address, + weight: loginMemberWeight, + } as Config.SignerLeaf + } } - // Limit their total signing power return { type: 'nested', weight: loginMemberWeight, threshold: 1n, tree: Config.flatLeavesToTopology( - members.map((member) => ({ - type: 'signer', - address: member, - weight: 1n, - })), + members.map((member) => + member.imageHash + ? { + type: 'sapient-signer', + address: member.address, + imageHash: member.imageHash, + weight: 1n, + } + : { + type: 'signer', + address: member.address, + weight: 1n, + }, + ), ), } as Config.NestedLeaf } @@ -204,8 +221,14 @@ export class Wallets { } // Build the login tree - const loginTopology = buildCappedTree([await loginSigner.signer.address]) - const devicesTopology = buildCappedTree([device.address]) + const loginTopology = buildCappedTree([ + { + address: await loginSigner.signer.address, + imageHash: Signers.isSapientSigner(loginSigner.signer) ? await loginSigner.signer.imageHash : undefined, + }, + ]) + + const devicesTopology = buildCappedTree([{ address: device.address }]) const guardTopology = args.noGuard ? undefined : buildCappedTreeFromTopology(1n, this.shared.sequence.defaultGuardTopology) @@ -221,6 +244,7 @@ export class Wallets { // Create initial configuration const initialConfiguration = toConfig(0n, loginTopology, devicesTopology, modules, guardTopology) + console.log('initialConfiguration', initialConfiguration) // Create wallet const wallet = await CoreWallet.fromConfiguration(initialConfiguration, { @@ -279,8 +303,11 @@ export class Wallets { } const nextDevicesTopology = buildCappedTree([ - ...prevDevices.signers.filter((x) => x !== '0x0000000000000000000000000000000000000000'), - device.address, + ...prevDevices.signers + .filter((x) => x !== '0x0000000000000000000000000000000000000000') + .map((x) => ({ address: x })), + ...prevDevices.sapientSigners.map((x) => ({ address: x.address, imageHash: x.imageHash })), + { address: device.address }, ]) const envelope = await wallet.prepareUpdate( toConfig(status.configuration.checkpoint + 1n, loginTopology, nextDevicesTopology, modules, guardTopology), @@ -370,11 +397,12 @@ export class Wallets { const status = await walletObj.getStatus() const { loginTopology, devicesTopology, modules, guardTopology } = fromConfig(status.configuration) - const nextDevicesTopology = buildCappedTree( - Config.getSigners(devicesTopology).signers.filter( - (x) => x !== device.address && x !== '0x0000000000000000000000000000000000000000', - ), - ) + const nextDevicesTopology = buildCappedTree([ + ...Config.getSigners(devicesTopology) + .signers.filter((x) => x !== '0x0000000000000000000000000000000000000000') + .map((x) => ({ address: x })), + ...Config.getSigners(devicesTopology).sapientSigners, + ]) const envelope = await walletObj.prepareUpdate( toConfig(status.configuration.checkpoint + 1n, loginTopology, nextDevicesTopology, modules, guardTopology), From eb3f097e243d7d2e16d1a11df13d7c59d1f830e0 Mon Sep 17 00:00:00 2001 From: Agusx1211 Date: Fri, 28 Mar 2025 17:26:48 +0000 Subject: [PATCH 258/439] Fix passkeys tree --- packages/primitives/src/extensions/passkeys.ts | 9 ++++++--- packages/wdk/src/sequence/wallets.ts | 4 +++- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/packages/primitives/src/extensions/passkeys.ts b/packages/primitives/src/extensions/passkeys.ts index 77b0a5e98..3b0f5a4c2 100644 --- a/packages/primitives/src/extensions/passkeys.ts +++ b/packages/primitives/src/extensions/passkeys.ts @@ -51,9 +51,12 @@ export function toTree(publicKey: PublicKey): GenericTree.Tree { [a, b], [c, metadataTree(publicKey.metadata)], ] + } else { + return [ + [a, b], + [c, Hex.padLeft('0x00', 32)], + ] } - - return [[a, b], c] } export function fromTree(tree: GenericTree.Tree): PublicKey { @@ -232,7 +235,7 @@ export function decode(data: Bytes.Bytes): Required & { challe throw new Error('Invalid flags') } - const requireUserVerification = (flags & 0x01) === 0x01 + const requireUserVerification = (flags & 0x01) !== 0x00 const bytesAuthDataSize = ((flags >> 1) & 0x01) + 1 const bytesClientDataJSONSize = ((flags >> 2) & 0x01) + 1 const bytesChallengeIndex = ((flags >> 3) & 0x01) + 1 diff --git a/packages/wdk/src/sequence/wallets.ts b/packages/wdk/src/sequence/wallets.ts index c17d1f658..90cda9e04 100644 --- a/packages/wdk/src/sequence/wallets.ts +++ b/packages/wdk/src/sequence/wallets.ts @@ -183,7 +183,9 @@ export class Wallets { }> { switch (args.kind) { case 'passkey': - const passkeySigner = await Signers.Passkey.Passkey.create(this.shared.sequence.extensions) + const passkeySigner = await Signers.Passkey.Passkey.create(this.shared.sequence.extensions, { + stateProvider: this.shared.sequence.stateProvider, + }) this.shared.modules.logger.log('Created new passkey signer:', passkeySigner.address) return { From d8321a551b99b1b84c946ea03071fc4ec0d213ef Mon Sep 17 00:00:00 2001 From: Agusx1211 Date: Mon, 31 Mar 2025 17:24:40 +0000 Subject: [PATCH 259/439] signup onExistingWallets --- packages/core/src/state/index.ts | 1 + packages/core/src/state/utils.ts | 47 ++++++++++++++++++++++++++++ packages/wdk/src/sequence/wallets.ts | 27 ++++++++++++++-- 3 files changed, 73 insertions(+), 2 deletions(-) create mode 100644 packages/core/src/state/utils.ts diff --git a/packages/core/src/state/index.ts b/packages/core/src/state/index.ts index 88c3556b4..f8b622e5c 100644 --- a/packages/core/src/state/index.ts +++ b/packages/core/src/state/index.ts @@ -73,3 +73,4 @@ export interface Writer { type MaybePromise = T | Promise export * as Local from './local' +export * from './utils' diff --git a/packages/core/src/state/utils.ts b/packages/core/src/state/utils.ts new file mode 100644 index 000000000..33b1d9b8f --- /dev/null +++ b/packages/core/src/state/utils.ts @@ -0,0 +1,47 @@ +import { Payload, Signature } from '@0xsequence/sequence-primitives' +import { Address, Hex } from 'ox' +import { Reader } from '.' +import { isSapientSigner, SapientSigner, Signer } from '../signers' + +export type WalletWithWitness = { + wallet: Address.Address + chainId: bigint + payload: Payload.Parented + signature: S extends SapientSigner ? Signature.SignatureOfSapientSignerLeaf : Signature.SignatureOfSignerLeaf +} + +export async function getWalletsFor( + stateReader: Reader, + signer: S, +): Promise>> { + const wallets = await retrieveWallets(stateReader, signer) + return Object.entries(wallets).map(([wallet, { chainId, payload, signature }]) => ({ + wallet: Hex.fromString(wallet), + chainId, + payload, + signature, + })) +} + +async function retrieveWallets( + stateReader: Reader, + signer: S, +): Promise<{ + [wallet: `0x${string}`]: { + chainId: bigint + payload: Payload.Parented + signature: S extends SapientSigner ? Signature.SignatureOfSapientSignerLeaf : Signature.SignatureOfSignerLeaf + } +}> { + if (isSapientSigner(signer)) { + const [signerAddress, signerImageHash] = await Promise.all([signer.address, signer.imageHash]) + if (signerImageHash) { + return stateReader.getWalletsForSapient(signerAddress, signerImageHash) as unknown as any + } else { + console.warn('Sapient signer has no imageHash') + return {} as any + } + } else { + return stateReader.getWallets(await signer.address) as unknown as any + } +} diff --git a/packages/wdk/src/sequence/wallets.ts b/packages/wdk/src/sequence/wallets.ts index 90cda9e04..8f455bf14 100644 --- a/packages/wdk/src/sequence/wallets.ts +++ b/packages/wdk/src/sequence/wallets.ts @@ -1,5 +1,5 @@ import { Address, Hex } from 'ox' -import { Envelope, Signers, Wallet as CoreWallet } from '@0xsequence/sequence-core' +import { Envelope, Signers, Wallet as CoreWallet, State } from '@0xsequence/sequence-core' import { Config, Payload } from '@0xsequence/sequence-primitives' import { Kinds, WitnessExtraSignerKind } from './signers' import { Shared } from './manager' @@ -8,6 +8,7 @@ import { Wallet } from './types' export type CommonSignupArgs = { noGuard?: boolean + onExistingWallets?: (wallets: Address.Address[]) => Promise } export type PasskeySignupArgs = CommonSignupArgs & { @@ -25,7 +26,18 @@ export type LoginToWalletArgs = { wallet: Address.Address } -export type LoginArgs = LoginToWalletArgs +export type LoginToMnemonicArgs = { + kind: 'mnemonic' + mnemonic: string + selectWallet: (wallets: Wallet[]) => Promise +} + +export type LoginToPasskeyArgs = { + kind: 'passkey' + selectWallet: (wallets: Wallet[]) => Promise +} + +export type LoginArgs = LoginToWalletArgs | LoginToMnemonicArgs | LoginToPasskeyArgs export function isLoginToWalletArgs(args: LoginArgs): args is LoginToWalletArgs { return 'wallet' in args @@ -215,6 +227,17 @@ export class Wallets { async signUp(args: SignupArgs) { const loginSigner = await this.prepareSignUp(args) + // If there is an existing wallet callback, we check if any wallet already exist for this login signer + if (args.onExistingWallets) { + const existingWallets = await State.getWalletsFor(this.shared.sequence.stateProvider, loginSigner.signer) + if (existingWallets.length > 0) { + const result = await args.onExistingWallets(existingWallets.map((w) => w.wallet)) + if (result) { + return + } + } + } + // Create the first session const device = await this.shared.modules.devices.create() From c7d5b77c37be1e94fc7fe955aeae62ea670dffee Mon Sep 17 00:00:00 2001 From: Agusx1211 Date: Mon, 31 Mar 2025 17:28:24 +0000 Subject: [PATCH 260/439] Handle login to mnemonic --- packages/wdk/src/sequence/wallets.ts | 31 ++++++++++++++++++++++++++-- 1 file changed, 29 insertions(+), 2 deletions(-) diff --git a/packages/wdk/src/sequence/wallets.ts b/packages/wdk/src/sequence/wallets.ts index 8f455bf14..9870bc803 100644 --- a/packages/wdk/src/sequence/wallets.ts +++ b/packages/wdk/src/sequence/wallets.ts @@ -29,12 +29,12 @@ export type LoginToWalletArgs = { export type LoginToMnemonicArgs = { kind: 'mnemonic' mnemonic: string - selectWallet: (wallets: Wallet[]) => Promise + selectWallet: (wallets: Address.Address[]) => Promise } export type LoginToPasskeyArgs = { kind: 'passkey' - selectWallet: (wallets: Wallet[]) => Promise + selectWallet: (wallets: Address.Address[]) => Promise } export type LoginArgs = LoginToWalletArgs | LoginToMnemonicArgs | LoginToPasskeyArgs @@ -43,6 +43,14 @@ export function isLoginToWalletArgs(args: LoginArgs): args is LoginToWalletArgs return 'wallet' in args } +export function isLoginToMnemonicArgs(args: LoginArgs): args is LoginToMnemonicArgs { + return 'kind' in args && args.kind === 'mnemonic' +} + +export function isLoginToPasskeyArgs(args: LoginArgs): args is LoginToPasskeyArgs { + return 'kind' in args && args.kind === 'passkey' +} + function buildCappedTree(members: { address: Address.Address; imageHash?: Hex.Hex }[]): Config.Topology { const loginMemberWeight = 1n @@ -355,6 +363,25 @@ export class Wallets { return requestId } + + if (isLoginToMnemonicArgs(args)) { + const mnemonicSigner = MnemonicHandler.toSigner(args.mnemonic) + if (!mnemonicSigner) { + throw new Error('invalid-mnemonic') + } + + const wallets = await State.getWalletsFor(this.shared.sequence.stateProvider, mnemonicSigner) + if (wallets.length === 0) { + throw new Error('no-wallets-found') + } + + const wallet = await args.selectWallet(wallets.map((w) => w.wallet)) + if (!wallets.some((w) => w.wallet === wallet)) { + throw new Error('wallet-not-found') + } + + return this.login({ wallet }) + } } async completeLogin(requestId: string) { From 441a4295dfd5d91099e614e586d9d020d247ad78 Mon Sep 17 00:00:00 2001 From: Agusx1211 Date: Tue, 1 Apr 2025 12:39:11 +0000 Subject: [PATCH 261/439] wip passkeys login --- packages/core/src/signers/passkey.ts | 75 ++++++++++++++++++- .../primitives/src/extensions/passkeys.ts | 26 ++----- packages/wdk/src/sequence/wallets.ts | 26 ++++++- 3 files changed, 104 insertions(+), 23 deletions(-) diff --git a/packages/core/src/signers/passkey.ts b/packages/core/src/signers/passkey.ts index 4d9624153..2d8cb3704 100644 --- a/packages/core/src/signers/passkey.ts +++ b/packages/core/src/signers/passkey.ts @@ -1,4 +1,4 @@ -import { Hex, Bytes, Address } from 'ox' +import { Hex, Bytes, Address, P256 } from 'ox' import { Payload, Extensions } from '@0xsequence/sequence-primitives' import type { Signature as SignatureTypes } from '@0xsequence/sequence-primitives' import { WebAuthnP256 } from 'ox' @@ -131,6 +131,79 @@ export class Passkey implements SapientSigner, Witnessable { return passkey } + static async find( + stateReader: State.Reader, + extensions: Pick, + ): Promise { + const challenge = Hex.random(32) + const response = await WebAuthnP256.sign({ + challenge, + }) + + const credential = response.raw + if (!credential) { + throw new Error('No credential returned') + } + + // Recover the public key from the credential + const publicKey = P256.recoverPublicKey({ + payload: challenge, + signature: { + r: BigInt(response.signature.r), + s: BigInt(response.signature.s), + yParity: 0, + }, + }) + + // Compute the imageHash for all public key combinations + // - requireUserVerification: true / false + // - embedMetadata: true / false + + const base = { + x: Hex.fromNumber(publicKey.x), + y: Hex.fromNumber(publicKey.y), + } + + const metadata = { + credentialId: credential.id, + } + + const imageHashes = [ + Extensions.Passkeys.rootFor({ ...base, requireUserVerification: true }), + Extensions.Passkeys.rootFor({ ...base, requireUserVerification: true }), + Extensions.Passkeys.rootFor({ ...base, requireUserVerification: false, metadata }), + Extensions.Passkeys.rootFor({ ...base, requireUserVerification: false, metadata }), + ] + // Find wallets for all possible image hashes + const signers = await Promise.all( + imageHashes.map(async (imageHash) => { + const wallets = await stateReader.getWalletsForSapient(extensions.passkeys, imageHash) + return Object.keys(wallets).map((wallet) => ({ + wallet: Address.from(wallet), + imageHash, + })) + }), + ) + + // Flatten and remove duplicates + const flattened = signers + .flat() + .filter((v, i, self) => self.findIndex((t) => t.wallet === v.wallet && t.imageHash === v.imageHash) === i) + + // If there are no signers, return undefined + if (flattened.length === 0) { + return undefined + } + + // If there are multiple signers log a warning + // but we still return the first one + if (flattened.length > 1) { + console.warn('Multiple signers found for passkey', flattened) + } + + return Passkey.loadFromWitness(stateReader, extensions, flattened[0]!.wallet, flattened[0]!.imageHash) + } + async signSapient( wallet: Address.Address, chainId: bigint, diff --git a/packages/primitives/src/extensions/passkeys.ts b/packages/primitives/src/extensions/passkeys.ts index 3b0f5a4c2..eee7bb7b6 100644 --- a/packages/primitives/src/extensions/passkeys.ts +++ b/packages/primitives/src/extensions/passkeys.ts @@ -2,9 +2,7 @@ import { Bytes, Hex, WebAuthnP256 } from 'ox' import { GenericTree } from '..' export type PasskeyMetadata = { - name: string credentialId: string - createdAt: number } export type PublicKey = { @@ -16,22 +14,10 @@ export type PublicKey = { export function metadataTree(metadata: Required['metadata']): GenericTree.Tree { if (typeof metadata === 'object') { - return [ - { - type: 'leaf', - value: Bytes.fromString(metadata.credentialId), - }, - [ - { - type: 'leaf', - value: Bytes.fromString(metadata.name), - }, - { - type: 'leaf', - value: Bytes.fromNumber(metadata.createdAt), - }, - ], - ] + return { + type: 'leaf', + value: Bytes.fromString(metadata.credentialId), + } } else { return metadata } @@ -111,9 +97,7 @@ export function fromTree(tree: GenericTree.Tree): PublicKey { throw new Error('Invalid metadata leaves') } - const name = new TextDecoder().decode(nameLeaf.value) - const createdAt = Number(Bytes.toBigInt(createdAtLeaf.value)) - metadata = { credentialId, name, createdAt } + metadata = { credentialId } } else if (GenericTree.isNode(meta) && meta.length === 32) { metadata = meta } else { diff --git a/packages/wdk/src/sequence/wallets.ts b/packages/wdk/src/sequence/wallets.ts index 9870bc803..937bca122 100644 --- a/packages/wdk/src/sequence/wallets.ts +++ b/packages/wdk/src/sequence/wallets.ts @@ -307,7 +307,7 @@ export class Wallets { return wallet.address } - async login(args: LoginArgs) { + async login(args: LoginArgs): Promise { if (isLoginToWalletArgs(args)) { const prevWallet = await this.exists(args.wallet) if (prevWallet) { @@ -382,6 +382,30 @@ export class Wallets { return this.login({ wallet }) } + + if (isLoginToPasskeyArgs(args)) { + const passkeySigner = await Signers.Passkey.Passkey.find( + this.shared.sequence.stateProvider, + this.shared.sequence.extensions, + ) + if (!passkeySigner) { + throw new Error('no-passkey-found') + } + + const wallets = await State.getWalletsFor(this.shared.sequence.stateProvider, passkeySigner) + if (wallets.length === 0) { + throw new Error('no-wallets-found') + } + + const wallet = await args.selectWallet(wallets.map((w) => w.wallet)) + if (!wallets.some((w) => w.wallet === wallet)) { + throw new Error('wallet-not-found') + } + + return this.login({ wallet }) + } + + throw new Error('invalid-login-args') } async completeLogin(requestId: string) { From db4771c081d9a699834a6ae9ba56f66830c9ccbf Mon Sep 17 00:00:00 2001 From: Agusx1211 Date: Tue, 1 Apr 2025 18:47:21 +0000 Subject: [PATCH 262/439] Add recovery primitives --- packages/primitives/src/extensions/index.ts | 1 + .../primitives/src/extensions/recovery.ts | 373 ++++++++++++++++++ 2 files changed, 374 insertions(+) create mode 100644 packages/primitives/src/extensions/recovery.ts diff --git a/packages/primitives/src/extensions/index.ts b/packages/primitives/src/extensions/index.ts index 5405ff8d5..b6eade640 100644 --- a/packages/primitives/src/extensions/index.ts +++ b/packages/primitives/src/extensions/index.ts @@ -9,3 +9,4 @@ export const Dev1: Extensions = { } export * as Passkeys from './passkeys' +export * as Recovery from './recovery' diff --git a/packages/primitives/src/extensions/recovery.ts b/packages/primitives/src/extensions/recovery.ts new file mode 100644 index 000000000..dc516204d --- /dev/null +++ b/packages/primitives/src/extensions/recovery.ts @@ -0,0 +1,373 @@ +import { Address, Bytes, Hash, Hex } from 'ox' +import * as Payload from '../payload' +import { getSignPayload } from 'ox/TypedData' + +export const FLAG_RECOVERY_LEAF = 1 +export const FLAG_NODE = 3 +export const FLAG_BRANCH = 4 + +/** + * A leaf in the Recovery tree, storing: + * - signer who can queue a payload + * - requiredDeltaTime how many seconds must pass since the payload is queued + * - minTimestamp a minimal timestamp that must be at or below the queueing time + */ +export type RecoveryLeaf = { + type: 'leaf' + signer: Address.Address + requiredDeltaTime: bigint + minTimestamp: bigint +} + +/** + * A node is just a 32-byte hash + */ +export type NodeLeaf = Hex.Hex + +/** + * A branch is a list of subtrees (≥2 in length). + */ +export type Node = [Node, Node] + +/** + * The topology of a recovery tree can be either: + * - A node (pair of subtrees) + * - A node leaf (32-byte hash) + * - A recovery leaf (signer with timing constraints) + */ +export type Topology = Node | NodeLeaf | RecoveryLeaf + +/** + * Type guard to check if a value is a RecoveryLeaf + */ +export function isRecoveryLeaf(cand: any): cand is RecoveryLeaf { + return typeof cand === 'object' && cand !== null && cand.type === 'leaf' +} + +/** + * Type guard to check if a value is a NodeLeaf (32-byte hash) + */ +export function isNodeLeaf(cand: any): cand is NodeLeaf { + return typeof cand === 'string' && cand.length === 66 && cand.startsWith('0x') +} + +/** + * Type guard to check if a value is a Node (pair of subtrees) + */ +export function isNode(cand: any): cand is Node { + return Array.isArray(cand) && cand.length === 2 && isNode(cand[0]) && isNode(cand[1]) +} + +/** + * EIP-712 domain parameters for "Sequence Wallet - Recovery Mode" + */ +export const DOMAIN_NAME = 'Sequence Wallet - Recovery Mode' +export const DOMAIN_VERSION = '1' + +/** + * Recursively computes the root hash of a RecoveryTree, + * consistent with the contract's fkeccak256 usage for (root, node). + * + * For recovery leaves, it hashes the leaf data with a prefix. + * For node leaves, it returns the hash directly. + * For nodes, it hashes the concatenation of the hashes of both subtrees. + */ +export function hashConfiguration(topology: Topology): Hex.Hex { + if (isRecoveryLeaf(topology)) { + return Hash.keccak256( + Bytes.concat( + Bytes.fromString('Sequence recovery leaf:\n'), + Bytes.fromHex(topology.signer, { size: 20 }), + Bytes.padLeft(Bytes.fromNumber(topology.requiredDeltaTime), 32), + Bytes.padLeft(Bytes.fromNumber(topology.minTimestamp), 32), + ), + { as: 'Hex' }, + ) + } else if (isNodeLeaf(topology)) { + return topology + } else if (isNode(topology)) { + return Hash.keccak256(Hex.concat(hashConfiguration(topology[0]), hashConfiguration(topology[1])), { as: 'Hex' }) + } else { + throw new Error('Invalid topology') + } +} + +/** + * Flatten a RecoveryTree into an array of just the leaves. + * Ignores branch boundaries or node references. + * + * @returns Object containing: + * - leaves: Array of RecoveryLeaf nodes + * - isComplete: boolean indicating if all leaves are present (no node references) + */ +export function getRecoveryLeaves(topology: Topology): { leaves: RecoveryLeaf[]; isComplete: boolean } { + const isComplete = true + if (isRecoveryLeaf(topology)) { + return { leaves: [topology], isComplete } + } else if (isNodeLeaf(topology)) { + return { leaves: [], isComplete: false } + } else if (isNode(topology)) { + const left = getRecoveryLeaves(topology[0]) + const right = getRecoveryLeaves(topology[1]) + return { leaves: [...left.leaves, ...right.leaves], isComplete: left.isComplete && right.isComplete } + } else { + throw new Error('Invalid topology') + } +} + +/** + * Decode a binary encoded topology into a Topology object + * + * @param encoded - The binary encoded topology + * @returns The decoded Topology object + * @throws Error if the encoding is invalid + */ +export function decodeTopology(encoded: Bytes.Bytes): Topology { + const { nodes, leftover } = parseBranch(encoded) + if (leftover.length > 0) { + throw new Error('Leftover bytes in branch') + } + return foldNodes(nodes) +} + +/** + * Parse a branch of the topology from binary encoding + * + * @param encoded - The binary encoded branch + * @returns Object containing: + * - nodes: Array of parsed Topology nodes + * - leftover: Any remaining unparsed bytes + * @throws Error if the encoding is invalid + */ +export function parseBranch(encoded: Bytes.Bytes): { nodes: Topology[]; leftover: Bytes.Bytes } { + if (encoded.length === 0) { + throw new Error('Empty branch') + } + + const nodes: Topology[] = [] + let index = 0 + + while (index < encoded.length) { + const flag = encoded[index]! + if (flag === FLAG_RECOVERY_LEAF) { + if (encoded.length < index + 85) { + throw new Error('Invalid recovery leaf') + } + const signer = Address.from(Hex.fromBytes(encoded.slice(index + 1, index + 21))) + const requiredDeltaTime = Bytes.toBigInt(encoded.slice(index + 21, index + 53)) + const minTimestamp = Bytes.toBigInt(encoded.slice(index + 53, index + 85)) + nodes.push({ type: 'leaf', signer, requiredDeltaTime, minTimestamp }) + index += 85 + continue + } else if (flag === FLAG_NODE) { + if (encoded.length < index + 33) { + throw new Error('Invalid node') + } + // Read just the first 32 bytes of the node + const node = Hex.fromBytes(encoded.slice(index + 1, index + 33)) + nodes.push(node) + index += 33 + continue + } else if (flag === FLAG_BRANCH) { + if (encoded.length < index + 4) { + throw new Error('Invalid branch') + } + const size = Bytes.toNumber(encoded.slice(index + 1, index + 4)) + if (encoded.length < index + 4 + size) { + throw new Error('Invalid branch') + } + const branch = encoded.slice(index + 4, index + 4 + size) + const { nodes: subNodes, leftover } = parseBranch(branch) + if (leftover.length > 0) { + throw new Error('Leftover bytes in sub-branch') + } + const subTree = foldNodes(subNodes) + nodes.push(subTree) + index += 4 + size + continue + } else { + throw new Error('Invalid flag') + } + } + + return { nodes, leftover: encoded.slice(index) } +} + +/** + * Trim a topology tree to only include leaves for a specific signer. + * All other leaves are replaced with their hashes. + * + * @param topology - The topology to trim + * @param signer - The signer address to keep + * @returns The trimmed topology + */ +export function trimTopology(topology: Topology, signer: Address.Address): Topology { + if (isRecoveryLeaf(topology)) { + if (topology.signer === signer) { + return topology + } else { + return hashConfiguration(topology) + } + } + + if (isNodeLeaf(topology)) { + return topology + } + + if (isNode(topology)) { + const left = trimTopology(topology[0], signer) + const right = trimTopology(topology[1], signer) + + // If both are hashes, we can just return the hash of the node + if (isNodeLeaf(left) && isNodeLeaf(right)) { + return hashConfiguration(topology) + } + + return [left, right] as Node + } + + throw new Error('Invalid topology') +} + +/** + * Encode a topology into its binary representation + * + * @param topology - The topology to encode + * @returns The binary encoded topology + * @throws Error if the topology is invalid + */ +export function encodeTopology(topology: Topology): Bytes.Bytes { + if (isNode(topology)) { + const encoded0 = encodeTopology(topology[0]!) + const encoded1 = encodeTopology(topology[1]!) + const isBranching = isNode(topology[1]!) + + if (isBranching) { + // max 3 bytes for the size + if (encoded1.length > 16777215) { + throw new Error('Branch too large') + } + + const flag = Bytes.fromNumber(FLAG_BRANCH) + const size = Bytes.padLeft(Bytes.fromNumber(encoded1.length), 3) + return Bytes.concat(encoded0, flag, size, encoded1) + } else { + return Bytes.concat(encoded0, encoded1) + } + } + + if (isNodeLeaf(topology)) { + return Bytes.fromHex(topology) + } + + if (isRecoveryLeaf(topology)) { + const flag = Bytes.fromNumber(FLAG_RECOVERY_LEAF) + const signer = Bytes.fromHex(topology.signer, { size: 20 }) + const requiredDeltaTime = Bytes.padLeft(Bytes.fromNumber(topology.requiredDeltaTime), 32) + const minTimestamp = Bytes.padLeft(Bytes.fromNumber(topology.minTimestamp), 32) + return Bytes.concat(flag, signer, requiredDeltaTime, minTimestamp) + } + + throw new Error('Invalid topology') +} + +/** + * Helper function to fold a list of nodes into a binary tree structure + * + * @param nodes - Array of topology nodes + * @returns A binary tree structure + * @throws Error if the nodes array is empty + */ +function foldNodes(nodes: Topology[]): Topology { + if (nodes.length === 0) { + throw new Error('Empty signature tree') + } + + if (nodes.length === 1) { + return nodes[0]! + } + + let tree: Topology = nodes[0]! + for (let i = 1; i < nodes.length; i++) { + tree = [tree, nodes[i]!] as Topology + } + return tree +} + +/** + * Build a RecoveryTree from an array of leaves, making a minimal branch structure. + * If there's exactly one leaf, we return that leaf. If there's more than one, we + * build a branch of them in pairs. + * + * @param leaves - Array of recovery leaves + * @returns A topology tree structure + * @throws Error if the leaves array is empty + */ +export function fromRecoveryLeaves(leaves: RecoveryLeaf[]): Topology { + if (leaves.length === 0) { + throw new Error('Cannot build a tree with zero leaves') + } + + if (leaves.length === 1) { + return leaves[0] as RecoveryLeaf + } + + const mid = Math.floor(leaves.length / 2) + const left = fromRecoveryLeaves(leaves.slice(0, mid)) + const right = fromRecoveryLeaves(leaves.slice(mid)) + return [left, right] as Node +} + +/** + * Creates the EIP-712 domain separator for the "Sequence Wallet - Recovery Mode" domain + * + * @param wallet - The wallet address + * @param chainId - The chain ID + * @param noChainId - Whether to omit the chain ID from the domain separator + * @returns The domain separator hash + */ +export function domainSeparator(wallet: Address.Address, chainId: bigint, noChainId: boolean): Hex.Hex { + // keccak256("EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)") + const EIP712_DOMAIN_TYPEHASH = Hash.keccak256( + Bytes.fromString('EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)'), + ) + const nameHash = Hash.keccak256(Bytes.fromString(DOMAIN_NAME)) + const versionHash = Hash.keccak256(Bytes.fromString(DOMAIN_VERSION)) + + const chain = noChainId ? 0 : Number(chainId) + const encoded = Bytes.concat( + EIP712_DOMAIN_TYPEHASH, + nameHash, + versionHash, + Bytes.padLeft(Bytes.fromNumber(chain), 32), + Bytes.padLeft(Bytes.fromHex(wallet), 32), + ) + return Hash.keccak256(encoded, { as: 'Hex' }) +} + +/** + * Produces an EIP-712 typed data hash for a "recovery mode" payload, + * matching the logic in Recovery.sol: + * + * keccak256( + * "\x19\x01", + * domainSeparator(noChainId, wallet), + * Payload.toEIP712(payload) + * ) + * + * @param payload - The payload to hash + * @param wallet - The wallet address + * @param chainId - The chain ID + * @param noChainId - Whether to omit the chain ID from the domain separator + * @returns The payload hash + */ +export function hashRecoveryPayload( + payload: Payload.Parented, + wallet: Address.Address, + chainId: bigint, + noChainId: boolean, +): Hex.Hex { + const ds = domainSeparator(wallet, chainId, noChainId) + const structHash = Bytes.fromHex(getSignPayload(Payload.toTyped(wallet, noChainId ? 0n : chainId, payload))) + return Hash.keccak256(Bytes.concat(Bytes.fromString('\x19\x01'), Hex.toBytes(ds), structHash), { as: 'Hex' }) +} From 172e967551d8c931592819cd6979b75210c5ef82 Mon Sep 17 00:00:00 2001 From: Michael Standen Date: Wed, 2 Apr 2025 11:28:42 +1300 Subject: [PATCH 263/439] Fix session encoding for blacklist in CLI --- packages/primitives-cli/src/subcommands/sessionImplicit.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/primitives-cli/src/subcommands/sessionImplicit.ts b/packages/primitives-cli/src/subcommands/sessionImplicit.ts index b7b500559..d003367b1 100644 --- a/packages/primitives-cli/src/subcommands/sessionImplicit.ts +++ b/packages/primitives-cli/src/subcommands/sessionImplicit.ts @@ -6,7 +6,7 @@ import { fromPosOrStdin, requireString } from '../utils' export async function doAddBlacklistAddress(blacklistAddress: string, sessionTopologyInput: string): Promise { const sessionTopology = SessionConfig.sessionsTopologyFromJson(sessionTopologyInput) const updated = SessionConfig.addToImplicitBlacklist(sessionTopology, blacklistAddress as Address.Address) - return JSON.stringify(updated) + return SessionConfig.sessionsTopologyToJson(updated) } export async function doRemoveBlacklistAddress( @@ -15,7 +15,7 @@ export async function doRemoveBlacklistAddress( ): Promise { const sessionTopology = SessionConfig.sessionsTopologyFromJson(sessionTopologyInput) const updated = SessionConfig.removeFromImplicitBlacklist(sessionTopology, blacklistAddress as Address.Address) - return JSON.stringify(updated) + return SessionConfig.sessionsTopologyToJson(updated) } const sessionImplicitCommand: CommandModule = { From 3aa57599eb9060c2a1cec72393a6b8bde1ce2272 Mon Sep 17 00:00:00 2001 From: Corban Riley Date: Tue, 1 Apr 2025 20:45:09 -0400 Subject: [PATCH 264/439] onSignatureRequestUpdate should not be async --- packages/wdk/src/sequence/signatures.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/wdk/src/sequence/signatures.ts b/packages/wdk/src/sequence/signatures.ts index 62219b3de..8cd41b7b5 100644 --- a/packages/wdk/src/sequence/signatures.ts +++ b/packages/wdk/src/sequence/signatures.ts @@ -97,12 +97,12 @@ export class Signatures { } } - async onSignatureRequestUpdate( + onSignatureRequestUpdate( requestId: string, cb: (requests: SignatureRequest) => void, onError?: (error: Error) => void, trigger?: boolean, - ): Promise<() => void> { + ) { const undoDbListener = this.shared.databases.signatures.addListener(() => { this.get(requestId) .then((request) => cb(request)) From 424ee089d62474b27b794cbf828005156d956c1c Mon Sep 17 00:00:00 2001 From: Corban Riley Date: Tue, 1 Apr 2025 20:55:42 -0400 Subject: [PATCH 265/439] onSignatureRequestUpdate should not be async --- packages/wdk/src/sequence/manager.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/wdk/src/sequence/manager.ts b/packages/wdk/src/sequence/manager.ts index 27a05bdc5..437937409 100644 --- a/packages/wdk/src/sequence/manager.ts +++ b/packages/wdk/src/sequence/manager.ts @@ -215,7 +215,7 @@ export class Manager { return this.shared.modules.signatures.onSignatureRequestsUpdate(cb, trigger) } - public async onSignatureRequestUpdate( + public onSignatureRequestUpdate( requestId: string, cb: (requests: SignatureRequest) => void, onError?: (error: Error) => void, From 0c8ad01fa1724d27822044b7c3d0bd7f8d8bc602 Mon Sep 17 00:00:00 2001 From: Corban Riley Date: Wed, 2 Apr 2025 12:18:30 -0400 Subject: [PATCH 266/439] using --list-different option on prettier format --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 835128c49..2855d695e 100644 --- a/package.json +++ b/package.json @@ -7,7 +7,7 @@ "dev": "turbo dev", "test": "turbo test", "lint": "turbo lint", - "format": "prettier --write \"**/*.{ts,tsx,md}\"", + "format": "prettier --list-different --write \"**/*.{ts,tsx,md}\"", "postinstall": "lefthook install", "dev:server": "node packages/primitives-cli/dist/index.js server", "build:packages": "turbo build --filter=\"./packages/*\"" From 7a5ddc51599bcc043a0ba52474314a616e747357 Mon Sep 17 00:00:00 2001 From: Agusx1211 Date: Wed, 2 Apr 2025 16:26:29 +0000 Subject: [PATCH 267/439] Add recovery primitives --- packages/primitives-cli/src/index.ts | 2 + .../src/subcommands/recovery.ts | 191 ++++++++++++++++++ .../primitives-cli/src/subcommands/server.ts | 23 +++ .../primitives/src/extensions/recovery.ts | 32 ++- 4 files changed, 240 insertions(+), 8 deletions(-) create mode 100644 packages/primitives-cli/src/subcommands/recovery.ts diff --git a/packages/primitives-cli/src/index.ts b/packages/primitives-cli/src/index.ts index f3bdcbe1c..481d9a32c 100644 --- a/packages/primitives-cli/src/index.ts +++ b/packages/primitives-cli/src/index.ts @@ -9,6 +9,7 @@ import signatureCommand from './subcommands/signature' import sessionCommand from './subcommands/session' import serverCommand from './subcommands/server' import addressCommand from './subcommands/address' +import recoveryCommand from './subcommands/recovery' void yargs(hideBin(process.argv)) .command(payloadCommand) @@ -18,6 +19,7 @@ void yargs(hideBin(process.argv)) .command(sessionCommand) .command(serverCommand) .command(addressCommand) + .command(recoveryCommand) .demandCommand(1) .strict() .help().argv diff --git a/packages/primitives-cli/src/subcommands/recovery.ts b/packages/primitives-cli/src/subcommands/recovery.ts new file mode 100644 index 000000000..95643125e --- /dev/null +++ b/packages/primitives-cli/src/subcommands/recovery.ts @@ -0,0 +1,191 @@ +import { CommandModule } from 'yargs' +import { readStdin } from '../utils' +import { Address, Bytes, Hex } from 'ox' +import { Extensions } from '@0xsequence/sequence-primitives' + +async function parseLeaves(leavesInput: string | string[]): Promise { + if (typeof leavesInput === 'string') { + return parseLeaves(leavesInput.split(' ')) + } + + return leavesInput.map((leafStr) => { + const parts = leafStr.split(':') + if (parts.length !== 4 || parts[0] !== 'signer') { + throw new Error(`Invalid leaf format: ${leafStr}`) + } + const [_, address, requiredDeltaTimeStr, minTimestampStr] = parts + if (!requiredDeltaTimeStr || !minTimestampStr) { + throw new Error(`Invalid leaf format: ${leafStr}`) + } + const requiredDeltaTime = BigInt(requiredDeltaTimeStr) + const minTimestamp = BigInt(minTimestampStr) + return { + type: 'leaf', + signer: address as Address.Address, + requiredDeltaTime, + minTimestamp, + } + }) +} + +export async function doHashFromLeaves(leavesInput: string | string[]): Promise { + const leaves = await parseLeaves(leavesInput) + const topology = Extensions.Recovery.fromRecoveryLeaves(leaves) + return Extensions.Recovery.hashConfiguration(topology) +} + +export async function doEncode(leavesInput: string | string[]): Promise { + const leaves = await parseLeaves(leavesInput) + const topology = Extensions.Recovery.fromRecoveryLeaves(leaves) + const encoded = Extensions.Recovery.encodeTopology(topology) + return Bytes.toHex(encoded) +} + +export async function doTrim(leavesInput: string | string[], signer: string): Promise { + const leaves = await parseLeaves(leavesInput) + const topology = Extensions.Recovery.fromRecoveryLeaves(leaves) + const trimmed = Extensions.Recovery.trimTopology(topology, signer as Address.Address) + const encoded = Extensions.Recovery.encodeTopology(trimmed) + return Bytes.toHex(encoded) +} + +export async function doHashEncoded(encodedStr: Hex.Hex): Promise { + const encoded = Bytes.fromHex(encodedStr) + const topology = Extensions.Recovery.decodeTopology(encoded) + return Extensions.Recovery.hashConfiguration(topology) +} + +const recoveryCommand: CommandModule = { + command: 'recovery', + describe: 'Recovery tree utilities', + builder: (yargs) => { + return yargs + .command( + 'hash-from-leaves [leaves...]', + 'Compute the hash of a recovery topology from leaves', + (yargs) => { + return yargs + .positional('leaves', { + type: 'string', + array: true, + description: 'List of recovery leaves in "signer:address:requiredDeltaTime:minTimestamp" format', + demandOption: false, + }) + .example('$0 recovery hash-from-leaves signer:0x123...:100:1600000000', 'hash a single leaf') + }, + async (argv) => { + let leavesInput: string[] + if (argv.leaves) { + leavesInput = argv.leaves + } else { + const stdin = await readStdin() + leavesInput = stdin + .split('\n') + .map((line) => line.trim()) + .filter((line) => line) + } + try { + const hash = await doHashFromLeaves(leavesInput) + console.log(hash) + } catch (error) { + console.error((error as Error).message) + process.exit(1) + } + }, + ) + .command( + 'encode [leaves...]', + 'Encode recovery leaves into topology bytes', + (yargs) => { + return yargs.positional('leaves', { + type: 'string', + array: true, + description: 'List of recovery leaves in "signer:address:requiredDeltaTime:minTimestamp" format', + demandOption: false, + }) + }, + async (argv) => { + let leavesInput: string[] + if (argv.leaves) { + leavesInput = argv.leaves + } else { + const stdin = await readStdin() + leavesInput = stdin + .split('\n') + .map((line) => line.trim()) + .filter((line) => line) + } + try { + const encoded = await doEncode(leavesInput) + console.log(encoded) + } catch (error) { + console.error((error as Error).message) + process.exit(1) + } + }, + ) + .command( + 'trim [leaves...]', + 'Trim the topology to a specific signer and encode', + (yargs) => { + return yargs + .positional('leaves', { + type: 'string', + array: true, + description: 'List of recovery leaves in "signer:address:requiredDeltaTime:minTimestamp" format', + demandOption: false, + }) + .option('signer', { + type: 'string', + description: 'Signer address to keep', + demandOption: true, + }) + }, + async (argv) => { + let leavesInput: string[] + if (argv.leaves) { + leavesInput = argv.leaves + } else { + const stdin = await readStdin() + leavesInput = stdin + .split('\n') + .map((line) => line.trim()) + .filter((line) => line) + } + const signer = argv.signer + try { + const encoded = await doTrim(leavesInput, signer) + console.log(encoded) + } catch (error) { + console.error((error as Error).message) + process.exit(1) + } + }, + ) + .command( + 'hash-encoded [encoded]', + 'Compute the hash of an encoded recovery topology', + (yargs) => { + return yargs.positional('encoded', { + type: 'string', + description: 'The encoded topology in hex format', + demandOption: true, + }) + }, + async (argv) => { + const encodedStr = argv.encoded + try { + const hash = await doHashEncoded(Hex.fromString(encodedStr)) + console.log(hash) + } catch (error) { + console.error((error as Error).message) + process.exit(1) + } + }, + ) + .demandCommand(1, 'You must specify a subcommand for recovery') + }, + handler: () => {}, +} + +export default recoveryCommand diff --git a/packages/primitives-cli/src/subcommands/server.ts b/packages/primitives-cli/src/subcommands/server.ts index 0cc1267c0..f1161d9fe 100644 --- a/packages/primitives-cli/src/subcommands/server.ts +++ b/packages/primitives-cli/src/subcommands/server.ts @@ -8,6 +8,7 @@ import * as sessionExplicit from './sessionExplicit' import * as sessionImplicit from './sessionImplicit' import * as signatureUtils from './signature' import * as address from './address' +import * as recovery from './recovery' // Basic JSON-RPC types interface JsonRpcRequest { @@ -193,6 +194,28 @@ const rpcMethods: Record Promise> = { const { imageHash, factory, module, creationCode } = params return await address.doCalculateAddress({ imageHash, factory, module, creationCode }) }, + + // RECOVERY + async recovery_hashFromLeaves(params) { + const { leaves } = params + const result = await recovery.doHashFromLeaves(leaves) + return result + }, + async recovery_encode(params) { + const { leaves } = params + const result = await recovery.doEncode(leaves) + return result + }, + async recovery_trim(params) { + const { leaves, signer } = params + const result = await recovery.doTrim(leaves, signer) + return result + }, + async recovery_hashEncoded(params) { + const { encoded } = params + const result = await recovery.doHashEncoded(encoded) + return result + }, } async function handleSingleRequest( diff --git a/packages/primitives/src/extensions/recovery.ts b/packages/primitives/src/extensions/recovery.ts index dc516204d..e762b3c42 100644 --- a/packages/primitives/src/extensions/recovery.ts +++ b/packages/primitives/src/extensions/recovery.ts @@ -55,7 +55,14 @@ export function isNodeLeaf(cand: any): cand is NodeLeaf { * Type guard to check if a value is a Node (pair of subtrees) */ export function isNode(cand: any): cand is Node { - return Array.isArray(cand) && cand.length === 2 && isNode(cand[0]) && isNode(cand[1]) + return Array.isArray(cand) && cand.length === 2 && isTopology(cand[0]) && isTopology(cand[1]) +} + +/** + * Type guard to check if a value is a Topology + */ +export function isTopology(cand: any): cand is Topology { + return isRecoveryLeaf(cand) || isNodeLeaf(cand) || isNode(cand) } /** @@ -150,20 +157,20 @@ export function parseBranch(encoded: Bytes.Bytes): { nodes: Topology[]; leftover while (index < encoded.length) { const flag = encoded[index]! if (flag === FLAG_RECOVERY_LEAF) { - if (encoded.length < index + 85) { + if (encoded.length < index + 32) { throw new Error('Invalid recovery leaf') } const signer = Address.from(Hex.fromBytes(encoded.slice(index + 1, index + 21))) - const requiredDeltaTime = Bytes.toBigInt(encoded.slice(index + 21, index + 53)) - const minTimestamp = Bytes.toBigInt(encoded.slice(index + 53, index + 85)) + const requiredDeltaTime = Bytes.toBigInt(encoded.slice(index + 21, index + 24)) + const minTimestamp = Bytes.toBigInt(encoded.slice(index + 24, index + 32)) nodes.push({ type: 'leaf', signer, requiredDeltaTime, minTimestamp }) - index += 85 + index += 32 continue } else if (flag === FLAG_NODE) { + // total = 1 (flag) + 32 (node hash) if (encoded.length < index + 33) { throw new Error('Invalid node') } - // Read just the first 32 bytes of the node const node = Hex.fromBytes(encoded.slice(index + 1, index + 33)) nodes.push(node) index += 33 @@ -263,8 +270,17 @@ export function encodeTopology(topology: Topology): Bytes.Bytes { if (isRecoveryLeaf(topology)) { const flag = Bytes.fromNumber(FLAG_RECOVERY_LEAF) const signer = Bytes.fromHex(topology.signer, { size: 20 }) - const requiredDeltaTime = Bytes.padLeft(Bytes.fromNumber(topology.requiredDeltaTime), 32) - const minTimestamp = Bytes.padLeft(Bytes.fromNumber(topology.minTimestamp), 32) + + if (topology.requiredDeltaTime > 16777215n) { + throw new Error('Required delta time too large') + } + + const requiredDeltaTime = Bytes.padLeft(Bytes.fromNumber(topology.requiredDeltaTime), 3) + if (topology.minTimestamp > 18446744073709551615n) { + throw new Error('Min timestamp too large') + } + + const minTimestamp = Bytes.padLeft(Bytes.fromNumber(topology.minTimestamp), 8) return Bytes.concat(flag, signer, requiredDeltaTime, minTimestamp) } From 4b30af752a303081f00b13cfc57dd20ac5f9f353 Mon Sep 17 00:00:00 2001 From: Agusx1211 Date: Wed, 2 Apr 2025 16:43:22 +0000 Subject: [PATCH 268/439] Fix generate random config --- packages/primitives-cli/src/subcommands/devTools.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/primitives-cli/src/subcommands/devTools.ts b/packages/primitives-cli/src/subcommands/devTools.ts index 1666a0ed8..dd802429b 100644 --- a/packages/primitives-cli/src/subcommands/devTools.ts +++ b/packages/primitives-cli/src/subcommands/devTools.ts @@ -41,7 +41,7 @@ function randomBytes(length: number, options?: RandomOptions): Uint8Array { } function randomHex(length: number, options?: RandomOptions): `0x${string}` { - return `0x${Bytes.toHex(randomBytes(length, options))}` + return Bytes.toHex(randomBytes(length, options)) } function randomBigInt(max: bigint, options?: RandomOptions): bigint { From 5416c84b92ea4827a93ca124a0146e68341f56c2 Mon Sep 17 00:00:00 2001 From: Agusx1211 Date: Wed, 2 Apr 2025 16:59:58 +0000 Subject: [PATCH 269/439] Disable digest payload hash calculation --- packages/primitives/src/payload.ts | 19 +------------------ 1 file changed, 1 insertion(+), 18 deletions(-) diff --git a/packages/primitives/src/payload.ts b/packages/primitives/src/payload.ts index 506db2414..0b0918753 100644 --- a/packages/primitives/src/payload.ts +++ b/packages/primitives/src/payload.ts @@ -395,24 +395,7 @@ export function toTyped(wallet: Address.Address, chainId: bigint, payload: Paren } case 'digest': { - const types = { - Digest: [ - { name: 'digest', type: 'bytes32' }, - { name: 'wallets', type: 'address[]' }, - ], - } - - const message = { - digest: payload.digest, - wallets: payload.parentWallets ?? [], - } - - return { - domain, - types, - primaryType: 'Digest', - message, - } + throw new Error('Digest is not supported - Use message instead') } } } From b153e2ce62f71d3d84c7aad850bb930bd0f27e98 Mon Sep 17 00:00:00 2001 From: Agusx1211 Date: Thu, 3 Apr 2025 15:39:41 +0000 Subject: [PATCH 270/439] Add encode with checkpointer methods --- .../primitives-cli/src/subcommands/config.ts | 9 ++++++++- .../primitives-cli/src/subcommands/server.ts | 13 ++++++++---- .../src/subcommands/signature.ts | 20 ++++++++++++++++--- 3 files changed, 34 insertions(+), 8 deletions(-) diff --git a/packages/primitives-cli/src/subcommands/config.ts b/packages/primitives-cli/src/subcommands/config.ts index eaccedb62..bca714a2d 100644 --- a/packages/primitives-cli/src/subcommands/config.ts +++ b/packages/primitives-cli/src/subcommands/config.ts @@ -112,6 +112,7 @@ export async function createConfig(options: { checkpoint: string from: string content: string[] + checkpointer?: string }): Promise { const leaves = parseElements(options.content.join(' ')) const config: Config.Config = { @@ -119,7 +120,7 @@ export async function createConfig(options: { checkpoint: BigInt(options.checkpoint), // Starts with empty topology topology: Config.flatLeavesToTopology(leaves), - checkpointer: undefined, + checkpointer: options.checkpointer ? Address.from(options.checkpointer) : undefined, } return Config.configToJson(config) @@ -157,6 +158,12 @@ const configCommand: CommandModule = { demandOption: true, alias: 'c', }) + .option('checkpointer', { + type: 'string', + description: 'Checkpointer address for the configuration', + demandOption: false, + alias: 'p', + }) .option('from', { type: 'string', description: 'The process to use to create the configuration', diff --git a/packages/primitives-cli/src/subcommands/server.ts b/packages/primitives-cli/src/subcommands/server.ts index f1161d9fe..0b6efa489 100644 --- a/packages/primitives-cli/src/subcommands/server.ts +++ b/packages/primitives-cli/src/subcommands/server.ts @@ -63,8 +63,8 @@ function errorResponse( const rpcMethods: Record Promise> = { // CONFIG async config_new(params) { - const { threshold, checkpoint, from = 'flat', content } = params - const result = await config.createConfig({ threshold, checkpoint, from, content: content.split(' ') }) + const { threshold, checkpoint, from = 'flat', content, checkpointer } = params + const result = await config.createConfig({ threshold, checkpoint, from, content: content.split(' '), checkpointer }) return result }, async config_imageHash(params) { @@ -174,8 +174,13 @@ const rpcMethods: Record Promise> = { // SIGNATURE async signature_encode(params) { - const { input, signatures, chainId = true } = params - const result = await signatureUtils.doEncode(JSON.stringify(input), signatures.split(' '), !chainId) + const { input, signatures, chainId = true, checkpointerData } = params + const result = await signatureUtils.doEncode( + JSON.stringify(input), + signatures.split(' '), + !chainId, + checkpointerData, + ) return result }, async signature_concat(params) { diff --git a/packages/primitives-cli/src/subcommands/signature.ts b/packages/primitives-cli/src/subcommands/signature.ts index 2782d8744..3c6cf7f13 100644 --- a/packages/primitives-cli/src/subcommands/signature.ts +++ b/packages/primitives-cli/src/subcommands/signature.ts @@ -42,7 +42,12 @@ const SignatureElements = [ }, ] -export async function doEncode(input: string, signatures: string[] = [], noChainId: boolean): Promise { +export async function doEncode( + input: string, + signatures: string[] = [], + noChainId: boolean, + checkpointerData?: string, +): Promise { const config = Config.configFromJson(input) const allSignatures = signatures.map((s) => { @@ -120,7 +125,11 @@ export async function doEncode(input: string, signatures: string[] = [], noChain return undefined }) - const encoded = Signature.encodeSignature({ noChainId, configuration: { ...config, topology: fullTopology } }) + const encoded = Signature.encodeSignature({ + noChainId, + configuration: { ...config, topology: fullTopology }, + checkpointerData: checkpointerData ? Bytes.fromHex(checkpointerData as `0x${string}`) : undefined, + }) return Hex.fromBytes(encoded) } @@ -171,6 +180,11 @@ const signatureCommand: CommandModule = { demandOption: false, default: true, }) + .option('checkpointer-data', { + type: 'string', + description: 'Checkpointer data in hex format', + demandOption: false, + }) .positional('input', { type: 'string', description: 'Hex input to encode (if not using pipe)', @@ -178,7 +192,7 @@ const signatureCommand: CommandModule = { }, async (argv) => { const input = await fromPosOrStdin(argv, 'input') - console.log(await doEncode(input, argv.signature, !argv.chainId)) + console.log(await doEncode(input, argv.signature, !argv.chainId, argv.checkpointerData)) }, ) .command( From e09c37444177c056731a70e95201ad00b02492b3 Mon Sep 17 00:00:00 2001 From: Patryk Kalinowski Date: Fri, 4 Apr 2025 15:27:36 +0200 Subject: [PATCH 271/439] wdk/identity: changes to identity-instrument --- packages/wdk/src/identity/authkey.ts | 5 +- packages/wdk/src/identity/challenge.ts | 116 ++++++++++++++---- .../identity/nitro/identity-instrument.gen.ts | 44 ++++--- packages/wdk/src/identity/wdk.ts | 28 ++--- 4 files changed, 135 insertions(+), 58 deletions(-) diff --git a/packages/wdk/src/identity/authkey.ts b/packages/wdk/src/identity/authkey.ts index 82dcfbeb3..3a251bb9b 100644 --- a/packages/wdk/src/identity/authkey.ts +++ b/packages/wdk/src/identity/authkey.ts @@ -60,10 +60,11 @@ export class AuthKeyP256K1 extends AuthKey { storage: SecureStoreBackend, _crypto?: SubtleCryptoBackend, ): Promise { - const [signer, privateKey] = await storage.get(idbName, idbStoreName, 'p256k1') - if (!privateKey) { + const result = await storage.get(idbName, idbStoreName, 'p256k1') + if (!result) { return null } + const [signer, privateKey] = result if (!privateKey.startsWith('0x')) { return null } diff --git a/packages/wdk/src/identity/challenge.ts b/packages/wdk/src/identity/challenge.ts index fea045d46..6599bec2d 100644 --- a/packages/wdk/src/identity/challenge.ts +++ b/packages/wdk/src/identity/challenge.ts @@ -2,47 +2,69 @@ import { Bytes, Hash, Hex } from 'ox' import { jwtDecode } from 'jwt-decode' import { IdentityType, AuthMode } from './nitro' -export interface ChallengeParams { +export interface CommitChallengeParams { authMode: AuthMode identityType: IdentityType - verifier: string - answer?: string + handle?: string + signer?: string metadata: { [key: string]: string } } +export interface CompleteChallengeParams { + authMode: AuthMode + identityType: IdentityType + verifier: string + answer: string +} + export abstract class Challenge { - public abstract getParams(): ChallengeParams + public abstract getCommitParams(): CommitChallengeParams + public abstract getCompleteParams(): CompleteChallengeParams } export class IdTokenChallenge extends Challenge { + private handle = '' + private exp = '' + constructor( readonly issuer: string, readonly audience: string, readonly idToken: string, ) { super() - } - - public getParams(): ChallengeParams { const decoded = jwtDecode(this.idToken) const idTokenHash = Hash.keccak256(new TextEncoder().encode(this.idToken)) + this.handle = Hex.fromBytes(idTokenHash) + this.exp = decoded.exp?.toString() ?? '' + } + + public getCommitParams(): CommitChallengeParams { return { authMode: AuthMode.IDToken, identityType: IdentityType.OIDC, - verifier: Hex.fromBytes(idTokenHash), - answer: this.idToken, + handle: this.handle, metadata: { iss: this.issuer, aud: this.audience, - exp: decoded.exp?.toString() ?? '', + exp: this.exp, }, } } + + public getCompleteParams(): CompleteChallengeParams { + return { + authMode: AuthMode.IDToken, + identityType: IdentityType.OIDC, + verifier: this.handle, + answer: this.idToken, + } + } } export class AuthCodePkceChallenge extends Challenge { private verifier?: string private authCode?: string + private signer?: string constructor( readonly issuer: string, @@ -52,12 +74,11 @@ export class AuthCodePkceChallenge extends Challenge { super() } - public getParams(): ChallengeParams { + public getCommitParams(): CommitChallengeParams { return { authMode: AuthMode.AuthCodePKCE, identityType: IdentityType.OIDC, - verifier: this.verifier ?? '', - answer: this.authCode ?? '', + signer: this.signer, metadata: { iss: this.issuer, aud: this.audience, @@ -66,8 +87,29 @@ export class AuthCodePkceChallenge extends Challenge { } } + public getCompleteParams(): CompleteChallengeParams { + if (!this.verifier || !this.authCode) { + throw new Error('AuthCodePkceChallenge is not complete') + } + + return { + authMode: AuthMode.AuthCodePKCE, + identityType: IdentityType.OIDC, + verifier: this.verifier, + answer: this.authCode, + } + } + + public withSigner(signer: string): AuthCodePkceChallenge { + const challenge = new AuthCodePkceChallenge(this.issuer, this.audience, this.redirectUri) + challenge.verifier = this.verifier + challenge.signer = signer + return challenge + } + public withAnswer(verifier: string, authCode: string): AuthCodePkceChallenge { const challenge = new AuthCodePkceChallenge(this.issuer, this.audience, this.redirectUri) + challenge.signer = this.signer challenge.verifier = verifier challenge.authCode = authCode return challenge @@ -76,26 +118,56 @@ export class AuthCodePkceChallenge extends Challenge { export class OtpChallenge extends Challenge { private answer?: string + private recipient?: string + private signer?: string - constructor( - readonly identityType: IdentityType, - readonly verifier: string, - ) { + private constructor(readonly identityType: IdentityType) { super() } - public getParams(): ChallengeParams { + public static fromRecipient(identityType: IdentityType, recipient: string): OtpChallenge { + const challenge = new OtpChallenge(identityType) + challenge.recipient = recipient + return challenge + } + + public static fromSigner(identityType: IdentityType, signer: string): OtpChallenge { + const challenge = new OtpChallenge(identityType) + challenge.signer = signer + return challenge + } + + public getCommitParams(): CommitChallengeParams { + if (!this.recipient && !this.signer) { + throw new Error('OtpChallenge is not complete') + } + return { authMode: AuthMode.OTP, identityType: this.identityType, - verifier: this.verifier, - answer: this.answer, + handle: this.recipient, + signer: this.signer, metadata: {}, } } - public withAnswer(verifier: string, codeChallenge: string, otp: string): OtpChallenge { - const challenge = new OtpChallenge(this.identityType, verifier) + public getCompleteParams(): CompleteChallengeParams { + if (!this.answer || (!this.recipient && !this.signer)) { + throw new Error('OtpChallenge is not complete') + } + + return { + authMode: AuthMode.OTP, + identityType: this.identityType, + verifier: this.recipient ?? this.signer ?? '', + answer: this.answer, + } + } + + public withAnswer(codeChallenge: string, otp: string): OtpChallenge { + const challenge = new OtpChallenge(this.identityType) + challenge.recipient = this.recipient + challenge.signer = this.signer const answerHash = Hash.keccak256(Bytes.fromString(codeChallenge + otp)) challenge.answer = Hex.fromBytes(answerHash) return challenge diff --git a/packages/wdk/src/identity/nitro/identity-instrument.gen.ts b/packages/wdk/src/identity/nitro/identity-instrument.gen.ts index ee81b5e95..e34a3ff28 100644 --- a/packages/wdk/src/identity/nitro/identity-instrument.gen.ts +++ b/packages/wdk/src/identity/nitro/identity-instrument.gen.ts @@ -1,5 +1,5 @@ /* eslint-disable */ -// identity-instrument v0.1.0 bcc0193c36f307e517fdc26c9e87a0c768320497 +// identity-instrument v0.1.0 b96afdef4772e7b9d3da1ddcc425247178e7608c // -- // Code generated by webrpc-gen@v0.23.1 with typescript generator. DO NOT EDIT. // @@ -16,7 +16,7 @@ export const WebRPCVersion = 'v1' export const WebRPCSchemaVersion = 'v0.1.0' // Schema hash generated from your RIDL schema -export const WebRPCSchemaHash = 'bcc0193c36f307e517fdc26c9e87a0c768320497' +export const WebRPCSchemaHash = 'b96afdef4772e7b9d3da1ddcc425247178e7608c' type WebrpcGenVersions = { webrpcGenVersion: string @@ -90,16 +90,17 @@ export enum AuthMode { AuthCodePKCE = 'AuthCodePKCE', } -export interface InitiateAuthParams { +export interface CommitVerifierParams { ecosystem: string authKey: AuthKey identityType: IdentityType authMode: AuthMode metadata: { [key: string]: string } - verifier?: string + handle?: string + signer?: string } -export interface RegisterAuthParams { +export interface CompleteAuthParams { ecosystem: string authKey: AuthKey identityType: IdentityType @@ -155,7 +156,8 @@ export interface AuthCommitmentData { authKey: AuthKey authMode: AuthMode identityType: IdentityType - verifier: string + handle: string + signer: string challenge: string answer: string metadata: { [key: string]: string } @@ -163,24 +165,25 @@ export interface AuthCommitmentData { } export interface IdentityInstrument { - initiateAuth(args: InitiateAuthArgs, headers?: object, signal?: AbortSignal): Promise - registerAuth(args: RegisterAuthArgs, headers?: object, signal?: AbortSignal): Promise + commitVerifier(args: CommitVerifierArgs, headers?: object, signal?: AbortSignal): Promise + completeAuth(args: CompleteAuthArgs, headers?: object, signal?: AbortSignal): Promise sign(args: SignArgs, headers?: object, signal?: AbortSignal): Promise } -export interface InitiateAuthArgs { - params: InitiateAuthParams +export interface CommitVerifierArgs { + params: CommitVerifierParams } -export interface InitiateAuthReturn { +export interface CommitVerifierReturn { verifier: string + loginHint: string challenge: string } -export interface RegisterAuthArgs { - params: RegisterAuthParams +export interface CompleteAuthArgs { + params: CompleteAuthParams } -export interface RegisterAuthReturn { +export interface CompleteAuthReturn { signer: string } export interface SignArgs { @@ -208,12 +211,17 @@ export class IdentityInstrument implements IdentityInstrument { return this.hostname + this.path + name } - initiateAuth = (args: InitiateAuthArgs, headers?: object, signal?: AbortSignal): Promise => { - return this.fetch(this.url('InitiateAuth'), createHTTPRequest(args, headers, signal)).then( + commitVerifier = ( + args: CommitVerifierArgs, + headers?: object, + signal?: AbortSignal, + ): Promise => { + return this.fetch(this.url('CommitVerifier'), createHTTPRequest(args, headers, signal)).then( (res) => { return buildResponse(res).then((_data) => { return { verifier: _data.verifier, + loginHint: _data.loginHint, challenge: _data.challenge, } }) @@ -224,8 +232,8 @@ export class IdentityInstrument implements IdentityInstrument { ) } - registerAuth = (args: RegisterAuthArgs, headers?: object, signal?: AbortSignal): Promise => { - return this.fetch(this.url('RegisterAuth'), createHTTPRequest(args, headers, signal)).then( + completeAuth = (args: CompleteAuthArgs, headers?: object, signal?: AbortSignal): Promise => { + return this.fetch(this.url('CompleteAuth'), createHTTPRequest(args, headers, signal)).then( (res) => { return buildResponse(res).then((_data) => { return { diff --git a/packages/wdk/src/identity/wdk.ts b/packages/wdk/src/identity/wdk.ts index 74bae4cc6..ba5fdc704 100644 --- a/packages/wdk/src/identity/wdk.ts +++ b/packages/wdk/src/identity/wdk.ts @@ -31,13 +31,13 @@ export class Wdk { recipient: string, callback: (respondToChallenge: (code: string) => Promise) => void, ) { - const challenge = new OtpChallenge(identityType, recipient) - const [verifier, codeChallenge] = await this.initiateAuth(challenge) + const challenge = OtpChallenge.fromRecipient(identityType, recipient) + const { challenge: codeChallenge } = await this.initiateAuth(challenge) return new Promise((resolve, reject) => { const respondToChallenge = async (code: string) => { try { - const signer = await this.completeAuth(challenge.withAnswer(verifier, codeChallenge, code)) + const signer = await this.completeAuth(challenge.withAnswer(codeChallenge, code)) resolve(signer) } catch (error) { reject(error) @@ -60,9 +60,9 @@ export class Wdk { } const challenge = new AuthCodePkceChallenge(params.issuer, params.audience, params.redirectUri) - const [verifier, codeChallenge] = await this.initiateAuth(challenge) + const { verifier, loginHint, challenge: codeChallenge } = await this.initiateAuth(challenge) const state = params.state || Hex.random(32) - const stateJson = JSON.stringify({ verifier, params }) + const stateJson = JSON.stringify({ verifier, loginHint, params }) sessionStorage.setItem(state, stateJson) @@ -101,29 +101,25 @@ export class Wdk { return new IdentitySigner(this.ecosystemId, this.nitro, authKey) } - private async initiateAuth(challenge: Challenge): Promise<[string, string]> { + public async initiateAuth(challenge: Challenge) { const authKey = await this.getAuthKey() - const challengeParams = challenge.getParams() const params = { + ...challenge.getCommitParams(), ecosystem: this.ecosystemId, authKey: authKey.toProto(), - ...challengeParams, - answer: undefined, } - const res = await this.nitro.initiateAuth({ params }) - return [res.verifier, res.challenge] + const res = await this.nitro.commitVerifier({ params }) + return res } - private async completeAuth(challenge: Challenge) { + public async completeAuth(challenge: Challenge) { const authKey = await this.getAuthKey() - const challengeParams = challenge.getParams() const params = { - answer: '', - ...challengeParams, + ...challenge.getCompleteParams(), ecosystem: this.ecosystemId, authKey: authKey.toProto(), } - const res = await this.nitro.registerAuth({ params }) + const res = await this.nitro.completeAuth({ params }) await authKey.setIdentitySigner(res.signer as `0x${string}`) return new IdentitySigner(this.ecosystemId, this.nitro, authKey) } From 335e8c360b6d505cb33250572c7bdb7645c52da8 Mon Sep 17 00:00:00 2001 From: Patryk Kalinowski Date: Fri, 4 Apr 2025 15:28:00 +0200 Subject: [PATCH 272/439] wdk/identity: signer interface --- packages/wdk/src/identity/signer.ts | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/packages/wdk/src/identity/signer.ts b/packages/wdk/src/identity/signer.ts index 98b65f1d3..6ccd389a9 100644 --- a/packages/wdk/src/identity/signer.ts +++ b/packages/wdk/src/identity/signer.ts @@ -1,5 +1,5 @@ import { Address, Signature, Hex, Bytes } from 'ox' -import { Signers } from '@0xsequence/sequence-core' +import { Signers, State } from '@0xsequence/sequence-core' import { AuthKey } from './authkey' import { IdentityInstrument } from './nitro' import { Payload, Signature as SequenceSignature } from '@0xsequence/sequence-primitives' @@ -45,4 +45,25 @@ export class IdentitySigner implements Signers.Signer { ...sig, } } + + async witness(stateWriter: State.Writer, wallet: Address.Address, extra?: Object): Promise { + const payload = Payload.fromMessage( + Bytes.fromString( + JSON.stringify({ + action: 'consent-to-be-part-of-wallet', + wallet, + signer: this.address, + timestamp: Date.now(), + ...extra, + }), + ), + ) + + const signature = await this.sign(wallet, 0n, payload) + await stateWriter.saveWitnesses(wallet, 0n, payload, { + type: 'unrecovered-signer', + weight: 1n, + signature, + }) + } } From c064e654b8f93fcfdc2d90fffc0ea55fb0c36cff Mon Sep 17 00:00:00 2001 From: Patryk Kalinowski Date: Fri, 4 Apr 2025 15:28:16 +0200 Subject: [PATCH 273/439] wdk/dbs: auth commitments table --- packages/wdk/src/dbs/auth-commitments.ts | 25 ++++++++++++++++++++++++ packages/wdk/src/dbs/index.ts | 1 + 2 files changed, 26 insertions(+) create mode 100644 packages/wdk/src/dbs/auth-commitments.ts diff --git a/packages/wdk/src/dbs/auth-commitments.ts b/packages/wdk/src/dbs/auth-commitments.ts new file mode 100644 index 000000000..fc9c4bde0 --- /dev/null +++ b/packages/wdk/src/dbs/auth-commitments.ts @@ -0,0 +1,25 @@ +import { Generic } from './generic' + +const TABLE_NAME = 'auth-commitments' + +export type AuthCommitment = { + id: string + kind: 'google-pkce' | 'apple-pkce' + metadata: { [key: string]: string } + verifier: string + challenge: string + target: string + isSignUp: boolean +} + +export class AuthCommitments extends Generic { + constructor(dbName: string = 'sequence-auth-commitments') { + super(dbName, TABLE_NAME, 'id', [ + (db: IDBDatabase) => { + if (!db.objectStoreNames.contains(TABLE_NAME)) { + db.createObjectStore(TABLE_NAME) + } + }, + ]) + } +} diff --git a/packages/wdk/src/dbs/index.ts b/packages/wdk/src/dbs/index.ts index 774b2210a..f37db3ebb 100644 --- a/packages/wdk/src/dbs/index.ts +++ b/packages/wdk/src/dbs/index.ts @@ -2,3 +2,4 @@ export * from './wallets' export * from './signatures' export * from './transactions' export * from './generic' +export * from './auth-commitments' From 1c1625f1efba44a776e2a130af2efee393225886 Mon Sep 17 00:00:00 2001 From: Patryk Kalinowski Date: Fri, 4 Apr 2025 15:29:16 +0200 Subject: [PATCH 274/439] wdk: OTP handler --- packages/wdk/src/sequence/handlers/index.ts | 1 + packages/wdk/src/sequence/handlers/otp.ts | 111 ++++++++++++++++++++ 2 files changed, 112 insertions(+) create mode 100644 packages/wdk/src/sequence/handlers/otp.ts diff --git a/packages/wdk/src/sequence/handlers/index.ts b/packages/wdk/src/sequence/handlers/index.ts index 09f3cd12b..7f55f36dd 100644 --- a/packages/wdk/src/sequence/handlers/index.ts +++ b/packages/wdk/src/sequence/handlers/index.ts @@ -16,3 +16,4 @@ export interface Handler { export * from './devices' export * from './passkeys' +export * from './otp' diff --git a/packages/wdk/src/sequence/handlers/otp.ts b/packages/wdk/src/sequence/handlers/otp.ts new file mode 100644 index 000000000..d45c7ded6 --- /dev/null +++ b/packages/wdk/src/sequence/handlers/otp.ts @@ -0,0 +1,111 @@ +import { Hex, Address } from 'ox' +import { Handler } from '.' +import { Signers } from '@0xsequence/sequence-core' +import * as Db from '../../dbs' +import { Signatures } from '../signatures' +import { SignerUnavailable, SignerReady, SignerActionable } from '../types' +import { Kinds } from '../signers' +import * as Identity from '../../identity' + +export class OtpHandler implements Handler { + kind = Kinds.LoginEmailOtp + + private onPromptOtp: undefined | ((recipient: string) => Promise<{ otp: string; error: (e: string) => void }>) + + constructor( + private readonly nitro: Identity.IdentityInstrument, + private readonly signatures: Signatures, + ) {} + + public registerUI(onPromptOtp: (recipient: string) => Promise<{ otp: string; error: (e: string) => void }>) { + this.onPromptOtp = onPromptOtp + return () => { + this.onPromptOtp = undefined + } + } + + public unregisterUI() { + this.onPromptOtp = undefined + } + + public onStatusChange(cb: () => void): () => void { + // TODO: keep track of signer validity and call cb when it changes + return () => {} + } + + public async getSigner(email: string): Promise { + if (!this.onPromptOtp) { + throw new Error('otp-handler-ui-not-registered') + } + + const wdk = new Identity.Wdk('694', this.nitro) + const challenge = Identity.OtpChallenge.fromRecipient(Identity.IdentityType.Email, email) + const { loginHint, challenge: codeChallenge } = await wdk.initiateAuth(challenge) + const { otp, error } = await this.onPromptOtp(loginHint) + try { + const signer = await wdk.completeAuth(challenge.withAnswer(codeChallenge, otp)) + return signer + } catch (e) { + error('invalid-otp') + throw e + } + } + + async status( + address: Address.Address, + _imageHash: Hex.Hex | undefined, + request: Db.SignatureRequest, + ): Promise { + const onPromptOtp = this.onPromptOtp + if (!onPromptOtp) { + return { + address, + handler: this, + reason: 'ui-not-registered', + status: 'unavailable', + } + } + + const wdk = new Identity.Wdk('694', this.nitro) + const signer = await wdk.getSigner() // TODO: specify which signer + if (signer && signer.address === address) { + return { + address, + handler: this, + status: 'actionable', + message: 'request-otp', + handle: async () => { + const signature = await signer.sign( + request.envelope.wallet, + request.envelope.chainId, + request.envelope.payload, + ) + await this.signatures.addSignature(request.id, { + address, + signature, + }) + return true + }, + } + } + + return { + address, + handler: this, + status: 'ready', + handle: async () => { + const challenge = Identity.OtpChallenge.fromSigner(Identity.IdentityType.Email, address) + const { loginHint, challenge: codeChallenge } = await wdk.initiateAuth(challenge) + const { otp, error } = await onPromptOtp(loginHint) + try { + await wdk.completeAuth(challenge.withAnswer(codeChallenge, otp)) + return true + } catch (e) { + console.error(e) + error('invalid-otp') + return false + } + }, + } + } +} From 480708662951b474d3ce3fe5e085102f80551ec7 Mon Sep 17 00:00:00 2001 From: Patryk Kalinowski Date: Fri, 4 Apr 2025 15:31:04 +0200 Subject: [PATCH 275/439] wdk: AuthCodePkce handler --- .../src/sequence/handlers/authcode-pkce.ts | 131 ++++++++++++++++++ packages/wdk/src/sequence/handlers/index.ts | 1 + 2 files changed, 132 insertions(+) create mode 100644 packages/wdk/src/sequence/handlers/authcode-pkce.ts diff --git a/packages/wdk/src/sequence/handlers/authcode-pkce.ts b/packages/wdk/src/sequence/handlers/authcode-pkce.ts new file mode 100644 index 000000000..75a011f89 --- /dev/null +++ b/packages/wdk/src/sequence/handlers/authcode-pkce.ts @@ -0,0 +1,131 @@ +import { Hex, Address, Bytes } from 'ox' +import { Handler } from '.' +import * as Db from '../../dbs' +import { Signatures } from '../signatures' +import * as Identity from '../../identity' +import { SignerUnavailable, SignerReady, SignerActionable } from '../types' +import { AuthCommitment } from '../../dbs' + +export class AuthCodePkceHandler implements Handler { + private redirectUri: string = '' + + constructor( + public readonly signupKind: 'google-pkce' | 'apple-pkce', + private readonly issuer: string, + private readonly audience: string, + private readonly nitro: Identity.IdentityInstrument, + private readonly signatures: Signatures, + private readonly commitments: Db.AuthCommitments, + ) {} + + public get kind() { + return 'login-' + this.signupKind + } + + public setRedirectUri(redirectUri: string) { + this.redirectUri = redirectUri + } + + public onStatusChange(cb: () => void): () => void { + // TODO: keep track of signer validity and call cb when it changes + return () => {} + } + + public async commitAuth(target: string, isSignUp: boolean, state?: string, signer?: string) { + const wdk = new Identity.Wdk('694', this.nitro) + let challenge = new Identity.AuthCodePkceChallenge(this.issuer, this.audience, this.redirectUri) + if (signer) { + challenge = challenge.withSigner(signer) + } + const { verifier, loginHint, challenge: codeChallenge } = await wdk.initiateAuth(challenge) + if (!state) { + state = Hex.fromBytes(Bytes.random(32)) + } + + await this.commitments.set({ + id: state, + kind: this.signupKind, + verifier, + challenge: codeChallenge, + target, + metadata: {}, + isSignUp, + }) + + const searchParams = new URLSearchParams({ + code_challenge: codeChallenge, + code_challenge_method: 'S256', + client_id: this.audience, + redirect_uri: this.redirectUri, + login_hint: loginHint, + response_type: 'code', + scope: 'openid profile email', + state, + }) + + const oauthUrl = this.oauthUrl() + return `${oauthUrl}?${searchParams.toString()}` + } + + public async completeAuth( + commitment: AuthCommitment, + code: string, + ): Promise<[Identity.IdentitySigner, { [key: string]: string }]> { + const wdk = new Identity.Wdk('694', this.nitro) + const challenge = new Identity.AuthCodePkceChallenge('', '', '') + const signer = await wdk.completeAuth(challenge.withAnswer(commitment.verifier, code)) + await this.commitments.del(commitment.id) + return [signer, commitment.metadata] + } + + async status( + address: Address.Address, + _imageHash: Hex.Hex | undefined, + request: Db.SignatureRequest, + ): Promise { + const wdk = new Identity.Wdk('694', this.nitro) + const signer = await wdk.getSigner() // TODO: specify which signer + if (signer && signer.address === address) { + return { + address, + handler: this, + status: 'ready', + handle: async () => { + const signature = await signer.sign( + request.envelope.wallet, + request.envelope.chainId, + request.envelope.payload, + ) + await this.signatures.addSignature(request.id, { + address, + signature, + }) + return true + }, + } + } + + return { + address, + handler: this, + status: 'actionable', + message: 'request-redirect', + handle: async () => { + const url = await this.commitAuth(window.location.pathname, false, request.id, address.toString()) + window.location.href = url + return true + }, + } + } + + private oauthUrl() { + switch (this.issuer) { + case 'https://accounts.google.com': + return 'https://accounts.google.com/o/oauth2/v2/auth' + case 'https://appleid.apple.com': + return 'https://appleid.apple.com/auth/authorize' + default: + throw new Error('unsupported-issuer') + } + } +} diff --git a/packages/wdk/src/sequence/handlers/index.ts b/packages/wdk/src/sequence/handlers/index.ts index 7f55f36dd..83979c952 100644 --- a/packages/wdk/src/sequence/handlers/index.ts +++ b/packages/wdk/src/sequence/handlers/index.ts @@ -17,3 +17,4 @@ export interface Handler { export * from './devices' export * from './passkeys' export * from './otp' +export * from './authcode-pkce' From 7ce383483c050b648bbeeec5fdff0f9e0e1ab7f6 Mon Sep 17 00:00:00 2001 From: Patryk Kalinowski Date: Fri, 4 Apr 2025 15:32:34 +0200 Subject: [PATCH 276/439] wdk: implement OTP and AuthCodePkce --- packages/wdk/src/sequence/manager.ts | 46 +++++++++++++- packages/wdk/src/sequence/signers.ts | 3 + packages/wdk/src/sequence/wallets.ts | 94 +++++++++++++++++++++++++++- 3 files changed, 141 insertions(+), 2 deletions(-) diff --git a/packages/wdk/src/sequence/manager.ts b/packages/wdk/src/sequence/manager.ts index 437937409..d36903041 100644 --- a/packages/wdk/src/sequence/manager.ts +++ b/packages/wdk/src/sequence/manager.ts @@ -5,7 +5,7 @@ import { Signers as CoreSigners, State, Relayer } from '@0xsequence/sequence-cor import * as Db from '../dbs' import { Logger } from './logger' import { Devices } from './devices' -import { LoginArgs, SignupArgs, Wallets } from './wallets' +import { CompleteRedirectArgs, LoginArgs, SignupArgs, StartSignUpWithRedirectArgs, Wallets } from './wallets' import { Transactions } from './transactions' import { Signatures } from './signatures' import { Kinds, Signers } from './signers' @@ -13,6 +13,9 @@ import { DevicesHandler, Handler, PasskeysHandler } from './handlers' import { MnemonicHandler } from './handlers/mnemonic' import { RelayerOption, TransactionRequest, Transaction } from './types/transactionRequest' import { BaseSignatureRequest, SignatureRequest, Wallet } from './types' +import { OtpHandler } from './handlers/otp' +import { AuthCodePkceHandler } from './handlers/authcode-pkce' +import * as Identity from '../identity' export type ManagerOptions = { verbose?: boolean @@ -25,6 +28,7 @@ export type ManagerOptions = { managerDb?: Db.Wallets transactionsDb?: Db.Transactions signaturesDb?: Db.Signatures + authCommitmentsDb?: Db.AuthCommitments stateProvider?: State.Provider networks?: Network.Network[] @@ -44,6 +48,7 @@ export const ManagerOptionsDefaults = { managerDb: new Db.Wallets(), signaturesDb: new Db.Signatures(), transactionsDb: new Db.Transactions(), + authCommitmentsDb: new Db.AuthCommitments(), stateProvider: new State.Local.Provider(new State.Local.IndexedDbStore()), networks: Network.All, @@ -70,6 +75,7 @@ export type Databases = { readonly manager: Db.Wallets readonly signatures: Db.Signatures readonly transactions: Db.Transactions + readonly authCommitments: Db.AuthCommitments } export type Sequence = { @@ -111,6 +117,7 @@ export class Manager { private readonly mnemonicHandler: MnemonicHandler private readonly devicesHandler: DevicesHandler private readonly passkeysHandler: PasskeysHandler + private readonly otpHandler: OtpHandler constructor(options?: ManagerOptions) { const ops = applyDefaults(options) @@ -135,6 +142,7 @@ export class Manager { manager: ops.managerDb, signatures: ops.signaturesDb, transactions: ops.transactionsDb, + authCommitments: ops.authCommitmentsDb, }, modules: {} as any, @@ -163,12 +171,36 @@ export class Manager { this.mnemonicHandler = new MnemonicHandler(modules.signatures) shared.handlers.set(Kinds.LoginMnemonic, this.mnemonicHandler) + // TODO: configurable nitro rpc + const nitro = new Identity.IdentityInstrument('https://dev-identity.sequence-dev.app', window.fetch) + this.otpHandler = new OtpHandler(nitro, modules.signatures) + shared.handlers.set(Kinds.LoginEmailOtp, this.otpHandler) + shared.handlers.set( + Kinds.LoginGooglePkce, + new AuthCodePkceHandler( + 'google-pkce', + 'https://accounts.google.com', + '970987756660-1evc76k7g9sd51qn9lodiu7e97ls0mmm.apps.googleusercontent.com', + nitro, + modules.signatures, + shared.databases.authCommitments, + ), + ) + shared.modules = modules this.shared = shared } // Wallets + public async startSignUpWithRedirect(args: StartSignUpWithRedirectArgs) { + return this.shared.modules.wallets.startSignUpWithRedirect(args) + } + + public async completeRedirect(args: CompleteRedirectArgs) { + return this.shared.modules.wallets.completeRedirect(args) + } + public async signUp(options: SignupArgs) { return this.shared.modules.wallets.signUp(options) } @@ -269,4 +301,16 @@ export class Manager { public async registerMnemonicUI(onPromptMnemonic: () => Promise<{ mnemonic: string; error: (e: string) => void }>) { return this.mnemonicHandler.registerUI(onPromptMnemonic) } + + public async registerOtpUI(onPromptOtp: (recipient: string) => Promise<{ otp: string; error: (e: string) => void }>) { + return this.otpHandler.registerUI(onPromptOtp) + } + + public async setRedirectPrefix(prefix: string) { + this.shared.handlers.forEach((handler) => { + if (handler instanceof AuthCodePkceHandler) { + handler.setRedirectUri(prefix + '/' + handler.signupKind) + } + }) + } } diff --git a/packages/wdk/src/sequence/signers.ts b/packages/wdk/src/sequence/signers.ts index 36319c034..b929c35cd 100644 --- a/packages/wdk/src/sequence/signers.ts +++ b/packages/wdk/src/sequence/signers.ts @@ -6,6 +6,9 @@ export const Kinds = { LocalDevice: 'local-device', LoginPasskey: 'login-passkey', LoginMnemonic: 'login-mnemonic', + LoginEmailOtp: 'login-email-otp', + LoginGooglePkce: 'login-google-pkce', + LoginApplePkce: 'login-apple-pkce', Unknown: 'unknown', } as const diff --git a/packages/wdk/src/sequence/wallets.ts b/packages/wdk/src/sequence/wallets.ts index 937bca122..2a2e19e67 100644 --- a/packages/wdk/src/sequence/wallets.ts +++ b/packages/wdk/src/sequence/wallets.ts @@ -4,7 +4,16 @@ import { Config, Payload } from '@0xsequence/sequence-primitives' import { Kinds, WitnessExtraSignerKind } from './signers' import { Shared } from './manager' import { MnemonicHandler } from './handlers/mnemonic' +import { OtpHandler } from './handlers/otp' import { Wallet } from './types' +import { AuthCodePkceHandler } from './handlers/authcode-pkce' +import { AuthCommitment } from '../dbs/auth-commitments' + +export type StartSignUpWithRedirectArgs = { + kind: 'google-pkce' | 'apple-pkce' + target: string + metadata: { [key: string]: string } +} export type CommonSignupArgs = { noGuard?: boolean @@ -20,7 +29,23 @@ export type MnemonicSignupArgs = CommonSignupArgs & { mnemonic: string } -export type SignupArgs = PasskeySignupArgs | MnemonicSignupArgs +export type EmailOtpSignupArgs = CommonSignupArgs & { + kind: 'email-otp' + email: string +} + +export type CompleteRedirectArgs = CommonSignupArgs & { + state: string + code: string +} + +export type AuthCodePkceSignupArgs = CommonSignupArgs & { + kind: 'google-pkce' | 'apple-pkce' + commitment: AuthCommitment + code: string +} + +export type SignupArgs = PasskeySignupArgs | MnemonicSignupArgs | EmailOtpSignupArgs | AuthCodePkceSignupArgs export type LoginToWalletArgs = { wallet: Address.Address @@ -229,7 +254,74 @@ export class Wallets { signerKind: Kinds.LoginMnemonic, }, } + + case 'email-otp': { + const handler = this.shared.handlers.get(Kinds.LoginEmailOtp) as OtpHandler + if (!handler) { + throw new Error('email-otp-handler-not-registered') + } + + const signer = await handler.getSigner(args.email) + this.shared.modules.logger.log('Created new email otp signer:', signer.address) + + return { + signer, + extra: { + signerKind: Kinds.LoginEmailOtp, + }, + } + } + + case 'google-pkce': + case 'apple-pkce': { + const handler = this.shared.handlers.get('login-' + args.kind) as AuthCodePkceHandler + if (!handler) { + throw new Error('handler-not-registered') + } + + const [signer, metadata] = await handler.completeAuth(args.commitment, args.code) + this.shared.modules.logger.log('Created new auth code pkce signer:', signer.address) + + return { + signer, + extra: { + signerKind: 'login-' + args.kind, + }, + } + } + } + } + + async startSignUpWithRedirect(args: StartSignUpWithRedirectArgs) { + const handler = this.shared.handlers.get('login-' + args.kind) as AuthCodePkceHandler + if (!handler) { + throw new Error('handler-not-registered') + } + return handler.commitAuth(args.target, true) + } + + async completeRedirect(args: CompleteRedirectArgs) { + const commitment = await this.shared.databases.authCommitments.get(args.state) + if (!commitment) { + throw new Error('invalid-state') + } + + if (commitment.isSignUp) { + await this.signUp({ + kind: commitment.kind, + commitment, + code: args.code, + noGuard: args.noGuard, + }) + } else { + const handler = this.shared.handlers.get('login-' + commitment.kind) as AuthCodePkceHandler + if (!handler) { + throw new Error('handler-not-registered') + } + + await handler.completeAuth(commitment, args.code) } + return commitment.target } async signUp(args: SignupArgs) { From d828963f6ac979bd958857be22832b2ac60d1cff Mon Sep 17 00:00:00 2001 From: Agusx1211 Date: Fri, 4 Apr 2025 14:48:49 +0000 Subject: [PATCH 277/439] Fix chained encoding with checkpointer --- packages/primitives/src/signature.ts | 64 ++++++++++++++++------------ 1 file changed, 37 insertions(+), 27 deletions(-) diff --git a/packages/primitives/src/signature.ts b/packages/primitives/src/signature.ts index f8fb54f43..4c27ba934 100644 --- a/packages/primitives/src/signature.ts +++ b/packages/primitives/src/signature.ts @@ -191,22 +191,6 @@ export function decodeSignature(erc6492Signature: Bytes.Bytes): RawSignature { const noChainId = (flag & 0x02) === 0x02 - // bits [2..4] => checkpoint size - const checkpointSize = (flag & 0x1c) >> 2 - if (index + checkpointSize > signature.length) { - throw new Error('Not enough bytes for checkpoint') - } - const checkpoint = Bytes.toBigInt(signature.slice(index, index + checkpointSize)) - index += checkpointSize - - // bit [5] => threshold size offset - const thresholdSize = ((flag & 0x20) >> 5) + 1 - if (index + thresholdSize > signature.length) { - throw new Error('Not enough bytes for threshold') - } - const threshold = Bytes.toBigInt(signature.slice(index, index + thresholdSize)) - index += thresholdSize - let checkpointerAddress: Address.Address | undefined let checkpointerData: Bytes.Bytes | undefined @@ -218,7 +202,12 @@ export function decodeSignature(erc6492Signature: Bytes.Bytes): RawSignature { checkpointerAddress = Bytes.toHex(signature.slice(index, index + 20)) index += 20 - const checkpointerDataSize = (flag & 0x1c) >> 2 + if (index + 3 > signature.length) { + throw new Error('Not enough bytes for checkpointer data size') + } + const checkpointerDataSize = Bytes.toNumber(signature.slice(index, index + 3)) + index += 3 + if (index + checkpointerDataSize > signature.length) { throw new Error('Not enough bytes for checkpointer data') } @@ -226,6 +215,22 @@ export function decodeSignature(erc6492Signature: Bytes.Bytes): RawSignature { index += checkpointerDataSize } + // bits [2..4] => checkpoint size + const checkpointSize = (flag & 0x1c) >> 2 + if (index + checkpointSize > signature.length) { + throw new Error('Not enough bytes for checkpoint') + } + const checkpoint = Bytes.toBigInt(signature.slice(index, index + checkpointSize)) + index += checkpointSize + + // bit [5] => threshold size offset + const thresholdSize = ((flag & 0x20) >> 5) + 1 + if (index + thresholdSize > signature.length) { + throw new Error('Not enough bytes for threshold') + } + const threshold = Bytes.toBigInt(signature.slice(index, index + thresholdSize)) + index += thresholdSize + // If bit 1 is set => chained signature if ((flag & 0x01) === 0x01) { const subsignatures: Array = [] @@ -631,7 +636,7 @@ export function encodeChainedSignature(signatures: RawSignature[]): Uint8Array { for (let i = 0; i < signatures.length; i++) { const signature = signatures[i]! - const encoded = encodeSignature(signature, true) + const encoded = encodeSignature(signature, true, i === signatures.length - 1) if (encoded.length > 16777215) { throw new Error('Chained signature too large') } @@ -642,7 +647,11 @@ export function encodeChainedSignature(signatures: RawSignature[]): Uint8Array { return output } -export function encodeSignature(signature: RawSignature, skipCheckpointerData?: boolean): Uint8Array { +export function encodeSignature( + signature: RawSignature, + skipCheckpointerData?: boolean, + skipCheckpointerAddress?: boolean, +): Uint8Array { const { noChainId, checkpointerData, configuration: config, suffix } = signature if (suffix?.length) { @@ -668,22 +677,23 @@ export function encodeSignature(signature: RawSignature, skipCheckpointerData?: } flag |= bytesForThreshold == 2 ? 0x20 : 0x00 - if (config.checkpointer) { + if (config.checkpointer && !skipCheckpointerAddress) { flag |= 0x40 } let output = Bytes.fromNumber(flag) - if (config.checkpointer && !skipCheckpointerData) { + if (config.checkpointer && !skipCheckpointerAddress) { output = Bytes.concat(output, Bytes.padLeft(Bytes.fromHex(config.checkpointer), 20)) + if (!skipCheckpointerData) { + const checkpointerDataSize = checkpointerData?.length ?? 0 + if (checkpointerDataSize > 16777215) { + throw new Error('Checkpointer data too large') + } - const checkpointerDataSize = checkpointerData?.length ?? 0 - if (checkpointerDataSize > 16777215) { - throw new Error('Checkpointer data too large') + const checkpointerDataSizeBytes = Bytes.padLeft(Bytes.fromNumber(checkpointerDataSize), 3) + output = Bytes.concat(output, checkpointerDataSizeBytes, checkpointerData ?? Bytes.fromArray([])) } - - const checkpointerDataSizeBytes = Bytes.padLeft(Bytes.fromNumber(checkpointerDataSize), 3) - output = Bytes.concat(output, checkpointerDataSizeBytes, checkpointerData ?? Bytes.fromArray([])) } const checkpointBytes = Bytes.padLeft(Bytes.fromNumber(config.checkpoint), bytesForCheckpoint) From 4280fea6df7eba7fc2f5733a0ade1a117478838d Mon Sep 17 00:00:00 2001 From: Agusx1211 Date: Sat, 5 Apr 2025 17:38:57 +0000 Subject: [PATCH 278/439] Fix recovery encoding --- packages/primitives/src/extensions/recovery.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/primitives/src/extensions/recovery.ts b/packages/primitives/src/extensions/recovery.ts index e762b3c42..f76496251 100644 --- a/packages/primitives/src/extensions/recovery.ts +++ b/packages/primitives/src/extensions/recovery.ts @@ -264,7 +264,9 @@ export function encodeTopology(topology: Topology): Bytes.Bytes { } if (isNodeLeaf(topology)) { - return Bytes.fromHex(topology) + const flag = Bytes.fromNumber(FLAG_NODE) + const nodeHash = Bytes.fromHex(topology, { size: 32 }) + return Bytes.concat(flag, nodeHash) } if (isRecoveryLeaf(topology)) { From 56f369fb3a04313abaeb32a2197065ddc121d41c Mon Sep 17 00:00:00 2001 From: Agusx1211 Date: Sat, 5 Apr 2025 18:39:42 +0000 Subject: [PATCH 279/439] Passkeys CLI --- packages/primitives-cli/src/index.ts | 3 +- .../src/subcommands/passkeys.ts | 297 ++++++++++++++++++ .../primitives-cli/src/subcommands/server.ts | 20 ++ 3 files changed, 319 insertions(+), 1 deletion(-) create mode 100644 packages/primitives-cli/src/subcommands/passkeys.ts diff --git a/packages/primitives-cli/src/index.ts b/packages/primitives-cli/src/index.ts index 481d9a32c..05ec03c46 100644 --- a/packages/primitives-cli/src/index.ts +++ b/packages/primitives-cli/src/index.ts @@ -10,7 +10,7 @@ import sessionCommand from './subcommands/session' import serverCommand from './subcommands/server' import addressCommand from './subcommands/address' import recoveryCommand from './subcommands/recovery' - +import passkeysCommand from './subcommands/passkeys' void yargs(hideBin(process.argv)) .command(payloadCommand) .command(configCommand) @@ -20,6 +20,7 @@ void yargs(hideBin(process.argv)) .command(serverCommand) .command(addressCommand) .command(recoveryCommand) + .command(passkeysCommand) .demandCommand(1) .strict() .help().argv diff --git a/packages/primitives-cli/src/subcommands/passkeys.ts b/packages/primitives-cli/src/subcommands/passkeys.ts new file mode 100644 index 000000000..fcab1c76b --- /dev/null +++ b/packages/primitives-cli/src/subcommands/passkeys.ts @@ -0,0 +1,297 @@ +// ./packages/primitives-cli/src/subcommands/passkeys.ts + +import type { CommandModule } from 'yargs' +import { Bytes, Hex } from 'ox' +import { fromPosOrStdin } from '../utils' +import { Extensions } from '@0xsequence/sequence-primitives' + +// Reusable function for encoding a signature +export async function doEncodeSignature(options: { + x: string + y: string + requireUserVerification: boolean + credentialId?: string + metadataHash?: string + r: string + s: string + authenticatorData: string + clientDataJson: string + embedMetadata: boolean +}): Promise { + if (options.credentialId && options.metadataHash) { + throw new Error('Cannot provide both credential-id and metadata-hash') + } + if (options.embedMetadata && !options.credentialId && !options.metadataHash) { + throw new Error('Metadata (credential-id or metadata-hash) is required when embed-metadata is true') + } + + const publicKey: Extensions.Passkeys.PublicKey = { + x: options.x as Hex.Hex, + y: options.y as Hex.Hex, + requireUserVerification: options.requireUserVerification, + metadata: options.credentialId + ? { credentialId: options.credentialId } + : options.metadataHash + ? (options.metadataHash as Hex.Hex) + : undefined, + } + + const decodedSignature: Extensions.Passkeys.DecodedSignature = { + publicKey, + r: Bytes.fromHex(options.r as Hex.Hex), + s: Bytes.fromHex(options.s as Hex.Hex), + authenticatorData: Bytes.fromHex(options.authenticatorData as Hex.Hex), + clientDataJSON: options.clientDataJson, + embedMetadata: options.embedMetadata, + } + + const encoded = Extensions.Passkeys.encode(decodedSignature) + return Bytes.toHex(encoded) +} + +// Reusable function for decoding a signature +export async function doDecodeSignature(encodedSignatureHex: string): Promise { + const encodedBytes = Bytes.fromHex(encodedSignatureHex as Hex.Hex) + const decoded = Extensions.Passkeys.decode(encodedBytes) + + // Convert bytes back to hex for readability in JSON output + const jsonFriendlyDecoded = { + ...decoded, + publicKey: { + ...decoded.publicKey, + metadata: + typeof decoded.publicKey.metadata === 'string' + ? decoded.publicKey.metadata // Keep hex hash as is + : decoded.publicKey.metadata, // Keep credentialId object as is + }, + r: Bytes.toHex(decoded.r), + s: Bytes.toHex(decoded.s), + authenticatorData: Bytes.toHex(decoded.authenticatorData), + } + + return JSON.stringify(jsonFriendlyDecoded, null, 2) +} + +// Reusable function for computing the root +export async function doComputeRoot(options: { + x: string + y: string + requireUserVerification: boolean + credentialId?: string + metadataHash?: string +}): Promise { + if (options.credentialId && options.metadataHash) { + throw new Error('Cannot provide both credential-id and metadata-hash') + } + + const publicKey: Extensions.Passkeys.PublicKey = { + x: options.x as Hex.Hex, + y: options.y as Hex.Hex, + requireUserVerification: options.requireUserVerification, + metadata: options.credentialId + ? { credentialId: options.credentialId } + : options.metadataHash + ? (options.metadataHash as Hex.Hex) + : undefined, + } + + const root = Extensions.Passkeys.rootFor(publicKey) + return root +} + +// Reusable function for validating a signature +export async function doValidateSignature(options: { + challenge: string + x: string + y: string + requireUserVerification: boolean + credentialId?: string + metadataHash?: string + r: string + s: string + authenticatorData: string + clientDataJson: string +}): Promise { + if (options.credentialId && options.metadataHash) { + throw new Error('Cannot provide both credential-id and metadata-hash') + } + + const publicKey: Extensions.Passkeys.PublicKey = { + x: options.x as Hex.Hex, + y: options.y as Hex.Hex, + requireUserVerification: options.requireUserVerification, + metadata: options.credentialId + ? { credentialId: options.credentialId } + : options.metadataHash + ? (options.metadataHash as Hex.Hex) + : undefined, + } + + // Construct DecodedSignature without embedMetadata flag, as validation doesn't need it directly + const decodedSignature: Omit = { + publicKey, + r: Bytes.fromHex(options.r as Hex.Hex), + s: Bytes.fromHex(options.s as Hex.Hex), + authenticatorData: Bytes.fromHex(options.authenticatorData as Hex.Hex), + clientDataJSON: options.clientDataJson, + } + + return Extensions.Passkeys.isValidSignature(options.challenge as Hex.Hex, decodedSignature) +} + +const passkeysCommand: CommandModule = { + command: 'passkeys', + describe: 'Passkeys extension utilities', + builder: (yargs) => { + return yargs + .command( + 'encode-signature', + 'Encode a passkey signature', + (yargs) => { + return yargs + .option('x', { type: 'string', description: 'Public key X coordinate (hex)', demandOption: true }) + .option('y', { type: 'string', description: 'Public key Y coordinate (hex)', demandOption: true }) + .option('require-user-verification', { + type: 'boolean', + description: 'Flag if UV is required', + default: false, + }) + .option('credential-id', { type: 'string', description: 'Credential ID (string, for metadata)' }) + .option('metadata-hash', { + type: 'string', + description: 'Metadata hash (hex, alternative to credential-id)', + }) + .option('r', { type: 'string', description: 'Signature R component (hex)', demandOption: true }) + .option('s', { type: 'string', description: 'Signature S component (hex)', demandOption: true }) + .option('authenticator-data', { + type: 'string', + description: 'Authenticator data (hex)', + demandOption: true, + }) + .option('client-data-json', { + type: 'string', + description: 'Client data JSON (string)', + demandOption: true, + }) + .option('embed-metadata', { + type: 'boolean', + description: 'Flag to embed metadata hash in the encoded signature', + default: false, + }) + .conflicts('credential-id', 'metadata-hash') + }, + async (argv) => { + const result = await doEncodeSignature({ + x: argv.x, + y: argv.y, + requireUserVerification: argv.requireUserVerification, + credentialId: argv.credentialId, + metadataHash: argv.metadataHash, + r: argv.r, + s: argv.s, + authenticatorData: argv.authenticatorData, + clientDataJson: argv.clientDataJson, + embedMetadata: argv.embedMetadata, + }) + console.log(result) + }, + ) + .command( + 'decode-signature [encoded-signature]', + 'Decode an encoded passkey signature', + (yargs) => { + return yargs.positional('encoded-signature', { + type: 'string', + description: 'Encoded signature in hex format (or read from stdin)', + }) + }, + async (argv) => { + const encodedSignatureHex = await fromPosOrStdin(argv, 'encoded-signature') + const result = await doDecodeSignature(encodedSignatureHex) + console.log(result) + }, + ) + .command( + 'root', + 'Compute the root hash of a passkey public key tree', + (yargs) => { + return yargs + .option('x', { type: 'string', description: 'Public key X coordinate (hex)', demandOption: true }) + .option('y', { type: 'string', description: 'Public key Y coordinate (hex)', demandOption: true }) + .option('require-user-verification', { + type: 'boolean', + description: 'Flag if UV is required', + default: false, + }) + .option('credential-id', { type: 'string', description: 'Credential ID (string, for metadata)' }) + .option('metadata-hash', { + type: 'string', + description: 'Metadata hash (hex, alternative to credential-id)', + }) + .conflicts('credential-id', 'metadata-hash') + }, + async (argv) => { + const result = await doComputeRoot({ + x: argv.x, + y: argv.y, + requireUserVerification: argv.requireUserVerification, + credentialId: argv.credentialId, + metadataHash: argv.metadataHash, + }) + console.log(result) + }, + ) + .command( + 'validate-signature', + 'Validate a passkey signature', + (yargs) => { + return yargs + .option('challenge', { type: 'string', description: 'Original challenge (hex)', demandOption: true }) + .option('x', { type: 'string', description: 'Public key X coordinate (hex)', demandOption: true }) + .option('y', { type: 'string', description: 'Public key Y coordinate (hex)', demandOption: true }) + .option('require-user-verification', { + type: 'boolean', + description: 'Flag if UV is required', + default: false, + }) + .option('credential-id', { type: 'string', description: 'Credential ID (string, for metadata)' }) + .option('metadata-hash', { + type: 'string', + description: 'Metadata hash (hex, alternative to credential-id)', + }) + .option('r', { type: 'string', description: 'Signature R component (hex)', demandOption: true }) + .option('s', { type: 'string', description: 'Signature S component (hex)', demandOption: true }) + .option('authenticator-data', { + type: 'string', + description: 'Authenticator data (hex)', + demandOption: true, + }) + .option('client-data-json', { + type: 'string', + description: 'Client data JSON (string)', + demandOption: true, + }) + .conflicts('credential-id', 'metadata-hash') + }, + async (argv) => { + const isValid = await doValidateSignature({ + challenge: argv.challenge, + x: argv.x, + y: argv.y, + requireUserVerification: argv.requireUserVerification, + credentialId: argv.credentialId, + metadataHash: argv.metadataHash, + r: argv.r, + s: argv.s, + authenticatorData: argv.authenticatorData, + clientDataJson: argv.clientDataJson, + }) + console.log(isValid) + }, + ) + .demandCommand(1, 'You must specify a subcommand for passkeys') + }, + handler: () => {}, +} + +export default passkeysCommand diff --git a/packages/primitives-cli/src/subcommands/server.ts b/packages/primitives-cli/src/subcommands/server.ts index 0b6efa489..6ff3a1e48 100644 --- a/packages/primitives-cli/src/subcommands/server.ts +++ b/packages/primitives-cli/src/subcommands/server.ts @@ -9,6 +9,7 @@ import * as sessionImplicit from './sessionImplicit' import * as signatureUtils from './signature' import * as address from './address' import * as recovery from './recovery' +import * as passkeys from './passkeys' // Basic JSON-RPC types interface JsonRpcRequest { @@ -221,6 +222,25 @@ const rpcMethods: Record Promise> = { const result = await recovery.doHashEncoded(encoded) return result }, + + // PASSKEYS + async passkeys_encodeSignature(params) { + const result = await passkeys.doEncodeSignature(params) + return result + }, + async passkeys_decodeSignature(params) { + const { encodedSignature } = params + const resultString = await passkeys.doDecodeSignature(encodedSignature) + return JSON.parse(resultString) + }, + async passkeys_computeRoot(params) { + const result = await passkeys.doComputeRoot(params) + return result + }, + async passkeys_validateSignature(params) { + const result = await passkeys.doValidateSignature(params) + return result + }, } async function handleSingleRequest( From 07fb3b3eae53c7dd30c65c41f48acbf79b6e9d82 Mon Sep 17 00:00:00 2001 From: Agusx1211 Date: Sun, 6 Apr 2025 17:45:15 +0000 Subject: [PATCH 280/439] Passkeys rpc fixes --- packages/primitives-cli/src/subcommands/passkeys.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/packages/primitives-cli/src/subcommands/passkeys.ts b/packages/primitives-cli/src/subcommands/passkeys.ts index fcab1c76b..1556e9c42 100644 --- a/packages/primitives-cli/src/subcommands/passkeys.ts +++ b/packages/primitives-cli/src/subcommands/passkeys.ts @@ -15,7 +15,7 @@ export async function doEncodeSignature(options: { r: string s: string authenticatorData: string - clientDataJson: string + clientDataJson: string | object embedMetadata: boolean }): Promise { if (options.credentialId && options.metadataHash) { @@ -41,7 +41,8 @@ export async function doEncodeSignature(options: { r: Bytes.fromHex(options.r as Hex.Hex), s: Bytes.fromHex(options.s as Hex.Hex), authenticatorData: Bytes.fromHex(options.authenticatorData as Hex.Hex), - clientDataJSON: options.clientDataJson, + clientDataJSON: + typeof options.clientDataJson === 'string' ? options.clientDataJson : JSON.stringify(options.clientDataJson), embedMetadata: options.embedMetadata, } From 4b056af3c3d1e399f4b10dee8874c2afdbd934ce Mon Sep 17 00:00:00 2001 From: Michael Standen Date: Mon, 7 Apr 2025 19:07:26 +1200 Subject: [PATCH 281/439] Add self call encoding to CLI --- .../primitives-cli/src/subcommands/payload.ts | 22 ++++++++++++------- .../primitives-cli/src/subcommands/server.ts | 4 ++-- packages/primitives/src/payload.ts | 2 +- 3 files changed, 17 insertions(+), 11 deletions(-) diff --git a/packages/primitives-cli/src/subcommands/payload.ts b/packages/primitives-cli/src/subcommands/payload.ts index d39236c06..5e6500f1b 100644 --- a/packages/primitives-cli/src/subcommands/payload.ts +++ b/packages/primitives-cli/src/subcommands/payload.ts @@ -124,7 +124,7 @@ export function solidityEncodedToParentedPayload(decoded: SolidityDecoded): Payl throw new Error('Not implemented') } -export async function doConvertToPacked(payload: string): Promise { +export async function doConvertToPacked(payload: string, wallet?: string): Promise { const decodedPayload = solidityEncodedToParentedPayload( AbiParameters.decode( [{ type: 'tuple', name: 'payload', components: DecodedAbi }], @@ -133,7 +133,7 @@ export async function doConvertToPacked(payload: string): Promise { ) if (Payload.isCalls(decodedPayload)) { - const packed = Payload.encode(decodedPayload) + const packed = Payload.encode(decodedPayload, wallet ? (wallet as `0x${string}`) : undefined) return Hex.from(packed) } @@ -180,17 +180,23 @@ const payloadCommand: CommandModule = { }, ) .command( - 'to-packed [payload]', + 'to-packed [payload] [wallet]', 'Convert payload to packed format', (yargs) => { - return yargs.positional('payload', { - type: 'string', - description: 'Input payload to convert', - }) + return yargs + .positional('payload', { + type: 'string', + description: 'Input payload to convert', + }) + .positional('wallet', { + type: 'string', + description: 'Wallet of the wallet to hash the payload', + demandOption: false, + }) }, async (argv) => { const payload = await fromPosOrStdin(argv, 'payload') - const result = await doConvertToPacked(payload) + const result = await doConvertToPacked(payload, argv.wallet) console.log(result) }, ) diff --git a/packages/primitives-cli/src/subcommands/server.ts b/packages/primitives-cli/src/subcommands/server.ts index 6ff3a1e48..4c16d4139 100644 --- a/packages/primitives-cli/src/subcommands/server.ts +++ b/packages/primitives-cli/src/subcommands/server.ts @@ -108,8 +108,8 @@ const rpcMethods: Record Promise> = { return result }, async payload_toPacked(params) { - const { payload: inputPayload } = params - const result = await payload.doConvertToPacked(inputPayload) + const { payload: inputPayload, wallet } = params + const result = await payload.doConvertToPacked(inputPayload, wallet) return result }, async payload_toJson(params) { diff --git a/packages/primitives/src/payload.ts b/packages/primitives/src/payload.ts index 0b0918753..fdd61b2d8 100644 --- a/packages/primitives/src/payload.ts +++ b/packages/primitives/src/payload.ts @@ -183,7 +183,7 @@ export function encode(payload: Calls, self?: Address.Address): Bytes.Bytes { */ let flags = 0 - if (self && call.to === self) { + if (self && Address.isEqual(call.to, self)) { flags |= 0x01 } From 5683458f22d04b3cedc68626625957ed53a80166 Mon Sep 17 00:00:00 2001 From: Michael Standen Date: Mon, 7 Apr 2025 19:09:27 +1200 Subject: [PATCH 282/439] Only build packages in prepush hook --- lefthook.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lefthook.yml b/lefthook.yml index 33fd551ea..c66bba8e9 100644 --- a/lefthook.yml +++ b/lefthook.yml @@ -7,6 +7,6 @@ pre-commit: pre-push: commands: build: - run: pnpm build + run: pnpm build:packages test: run: pnpm test From 3b7f9d721728d378edb51f1ddab6cb3689f03afd Mon Sep 17 00:00:00 2001 From: Patryk Kalinowski Date: Mon, 7 Apr 2025 19:20:03 +0200 Subject: [PATCH 283/439] otp: fix wrong status --- packages/wdk/src/sequence/handlers/otp.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/wdk/src/sequence/handlers/otp.ts b/packages/wdk/src/sequence/handlers/otp.ts index d45c7ded6..3997924cc 100644 --- a/packages/wdk/src/sequence/handlers/otp.ts +++ b/packages/wdk/src/sequence/handlers/otp.ts @@ -72,8 +72,7 @@ export class OtpHandler implements Handler { return { address, handler: this, - status: 'actionable', - message: 'request-otp', + status: 'ready', handle: async () => { const signature = await signer.sign( request.envelope.wallet, @@ -92,7 +91,8 @@ export class OtpHandler implements Handler { return { address, handler: this, - status: 'ready', + status: 'actionable', + message: 'request-otp', handle: async () => { const challenge = Identity.OtpChallenge.fromSigner(Identity.IdentityType.Email, address) const { loginHint, challenge: codeChallenge } = await wdk.initiateAuth(challenge) From 655df742b9d32b96b6bef1b70d07c54dca80477a Mon Sep 17 00:00:00 2001 From: Patryk Kalinowski Date: Mon, 7 Apr 2025 19:20:30 +0200 Subject: [PATCH 284/439] core/state: fix wallet hex conversion --- packages/core/src/state/utils.ts | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/packages/core/src/state/utils.ts b/packages/core/src/state/utils.ts index 33b1d9b8f..f06caed23 100644 --- a/packages/core/src/state/utils.ts +++ b/packages/core/src/state/utils.ts @@ -15,12 +15,15 @@ export async function getWalletsFor( signer: S, ): Promise>> { const wallets = await retrieveWallets(stateReader, signer) - return Object.entries(wallets).map(([wallet, { chainId, payload, signature }]) => ({ - wallet: Hex.fromString(wallet), - chainId, - payload, - signature, - })) + return Object.entries(wallets).map(([wallet, { chainId, payload, signature }]) => { + Hex.assert(wallet) + return { + wallet, + chainId, + payload, + signature, + } + }) } async function retrieveWallets( From 2831cda16a7960fb3458d76f6b51b29a11d2cfe2 Mon Sep 17 00:00:00 2001 From: Patryk Kalinowski Date: Mon, 7 Apr 2025 19:21:05 +0200 Subject: [PATCH 285/439] wdk: onExistingWalletsWithTarget for completeRedirect --- packages/wdk/src/sequence/wallets.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/packages/wdk/src/sequence/wallets.ts b/packages/wdk/src/sequence/wallets.ts index 2a2e19e67..53e68c505 100644 --- a/packages/wdk/src/sequence/wallets.ts +++ b/packages/wdk/src/sequence/wallets.ts @@ -37,6 +37,7 @@ export type EmailOtpSignupArgs = CommonSignupArgs & { export type CompleteRedirectArgs = CommonSignupArgs & { state: string code: string + onExistingWalletsWithTarget?: (wallets: Address.Address[], target: string) => Promise } export type AuthCodePkceSignupArgs = CommonSignupArgs & { @@ -312,6 +313,9 @@ export class Wallets { commitment, code: args.code, noGuard: args.noGuard, + onExistingWallets: args.onExistingWalletsWithTarget + ? (wallets) => args.onExistingWalletsWithTarget!(wallets, commitment.target) + : args.onExistingWallets, }) } else { const handler = this.shared.handlers.get('login-' + commitment.kind) as AuthCodePkceHandler From 41197c7673e9920f0ef713da52b8ef858549f024 Mon Sep 17 00:00:00 2001 From: Patryk Kalinowski Date: Tue, 8 Apr 2025 12:26:42 +0200 Subject: [PATCH 286/439] Fix listener registration --- packages/wdk/src/sequence/signatures.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/wdk/src/sequence/signatures.ts b/packages/wdk/src/sequence/signatures.ts index 8cd41b7b5..a23d7a8a4 100644 --- a/packages/wdk/src/sequence/signatures.ts +++ b/packages/wdk/src/sequence/signatures.ts @@ -109,7 +109,7 @@ export class Signatures { .catch((error) => onError?.(error)) }) - const undoHandlerListeners = Object.values(this.shared.handlers).map((handler) => + const undoHandlerListeners = Array.from(this.shared.handlers.values()).map((handler) => handler.onStatusChange(() => { this.get(requestId) .then((request) => cb(request)) From 1e6f35c6fa1b6da15319bda32ff01d391b2e08f8 Mon Sep 17 00:00:00 2001 From: Patryk Kalinowski Date: Tue, 8 Apr 2025 12:27:17 +0200 Subject: [PATCH 287/439] use the respond callback flow for otp --- packages/wdk/src/sequence/handlers/otp.ts | 71 ++++++++++++++--------- packages/wdk/src/sequence/manager.ts | 4 +- 2 files changed, 48 insertions(+), 27 deletions(-) diff --git a/packages/wdk/src/sequence/handlers/otp.ts b/packages/wdk/src/sequence/handlers/otp.ts index 3997924cc..d4b71424c 100644 --- a/packages/wdk/src/sequence/handlers/otp.ts +++ b/packages/wdk/src/sequence/handlers/otp.ts @@ -7,17 +7,20 @@ import { SignerUnavailable, SignerReady, SignerActionable } from '../types' import { Kinds } from '../signers' import * as Identity from '../../identity' +type RespondFn = (otp: string) => Promise + export class OtpHandler implements Handler { kind = Kinds.LoginEmailOtp - private onPromptOtp: undefined | ((recipient: string) => Promise<{ otp: string; error: (e: string) => void }>) + private onPromptOtp: undefined | ((recipient: string, respond: RespondFn) => Promise) + private statusChangeListeners: (() => void)[] = [] constructor( private readonly nitro: Identity.IdentityInstrument, private readonly signatures: Signatures, ) {} - public registerUI(onPromptOtp: (recipient: string) => Promise<{ otp: string; error: (e: string) => void }>) { + public registerUI(onPromptOtp: (recipient: string, respond: RespondFn) => Promise) { this.onPromptOtp = onPromptOtp return () => { this.onPromptOtp = undefined @@ -29,26 +32,33 @@ export class OtpHandler implements Handler { } public onStatusChange(cb: () => void): () => void { - // TODO: keep track of signer validity and call cb when it changes - return () => {} + this.statusChangeListeners.push(cb) + return () => { + this.statusChangeListeners = this.statusChangeListeners.filter((l) => l !== cb) + } } public async getSigner(email: string): Promise { - if (!this.onPromptOtp) { + const onPromptOtp = this.onPromptOtp + if (!onPromptOtp) { throw new Error('otp-handler-ui-not-registered') } const wdk = new Identity.Wdk('694', this.nitro) const challenge = Identity.OtpChallenge.fromRecipient(Identity.IdentityType.Email, email) const { loginHint, challenge: codeChallenge } = await wdk.initiateAuth(challenge) - const { otp, error } = await this.onPromptOtp(loginHint) - try { - const signer = await wdk.completeAuth(challenge.withAnswer(codeChallenge, otp)) - return signer - } catch (e) { - error('invalid-otp') - throw e - } + + return new Promise(async (resolve, reject) => { + const respond = async (otp: string) => { + try { + const signer = await wdk.completeAuth(challenge.withAnswer(codeChallenge, otp)) + resolve(signer) + } catch (e) { + reject(e) + } + } + await onPromptOtp(loginHint, respond) + }) } async status( @@ -93,19 +103,28 @@ export class OtpHandler implements Handler { handler: this, status: 'actionable', message: 'request-otp', - handle: async () => { - const challenge = Identity.OtpChallenge.fromSigner(Identity.IdentityType.Email, address) - const { loginHint, challenge: codeChallenge } = await wdk.initiateAuth(challenge) - const { otp, error } = await onPromptOtp(loginHint) - try { - await wdk.completeAuth(challenge.withAnswer(codeChallenge, otp)) - return true - } catch (e) { - console.error(e) - error('invalid-otp') - return false - } - }, + handle: () => + new Promise(async (resolve, reject) => { + const challenge = Identity.OtpChallenge.fromSigner(Identity.IdentityType.Email, address) + const { loginHint, challenge: codeChallenge } = await wdk.initiateAuth(challenge) + + const respond = async (otp: string) => { + try { + await wdk.completeAuth(challenge.withAnswer(codeChallenge, otp)) + this.notifyStatusChange() + resolve(true) + } catch (e) { + resolve(false) + throw e + } + } + + await onPromptOtp(loginHint, respond) + }), } } + + private notifyStatusChange() { + this.statusChangeListeners.forEach((l) => l()) + } } diff --git a/packages/wdk/src/sequence/manager.ts b/packages/wdk/src/sequence/manager.ts index d36903041..611f99ef4 100644 --- a/packages/wdk/src/sequence/manager.ts +++ b/packages/wdk/src/sequence/manager.ts @@ -302,7 +302,9 @@ export class Manager { return this.mnemonicHandler.registerUI(onPromptMnemonic) } - public async registerOtpUI(onPromptOtp: (recipient: string) => Promise<{ otp: string; error: (e: string) => void }>) { + public async registerOtpUI( + onPromptOtp: (recipient: string, respond: (otp: string) => Promise) => Promise, + ) { return this.otpHandler.registerUI(onPromptOtp) } From fd08c979cf03b8a95a4094e8157843aa5f9c5e1f Mon Sep 17 00:00:00 2001 From: Patryk Kalinowski Date: Tue, 8 Apr 2025 13:11:19 +0200 Subject: [PATCH 288/439] Make mnemonic work with the respond flow --- .../wdk/src/sequence/handlers/mnemonic.ts | 47 +++++++++++-------- packages/wdk/src/sequence/manager.ts | 2 +- 2 files changed, 28 insertions(+), 21 deletions(-) diff --git a/packages/wdk/src/sequence/handlers/mnemonic.ts b/packages/wdk/src/sequence/handlers/mnemonic.ts index b41f829f5..9940c6d71 100644 --- a/packages/wdk/src/sequence/handlers/mnemonic.ts +++ b/packages/wdk/src/sequence/handlers/mnemonic.ts @@ -6,14 +6,16 @@ import { Signatures } from '../signatures' import { Kinds } from '../signers' import { SignerReady, SignerUnavailable } from '../types' +type RespondFn = (mnemonic: string) => Promise + export class MnemonicHandler implements Handler { kind = Kinds.LoginMnemonic - private onPromptMnemonic: undefined | (() => Promise<{ mnemonic: string; error: (e: string) => void }>) + private onPromptMnemonic: undefined | ((respond: RespondFn) => Promise) constructor(private readonly signatures: Signatures) {} - public registerUI(onPromptMnemonic: () => Promise<{ mnemonic: string; error: (e: string) => void }>) { + public registerUI(onPromptMnemonic: (respond: RespondFn) => Promise) { this.onPromptMnemonic = onPromptMnemonic return () => { this.onPromptMnemonic = undefined @@ -56,26 +58,31 @@ export class MnemonicHandler implements Handler { address, handler: this, status: 'ready', - handle: async () => { - const { mnemonic, error } = await onPromptMnemonic() - const signer = MnemonicHandler.toSigner(mnemonic) - if (!signer) { - error('invalid-mnemonic') - return false - } + handle: () => + new Promise(async (resolve, reject) => { + const respond = async (mnemonic: string) => { + const signer = MnemonicHandler.toSigner(mnemonic) + if (!signer) { + return reject('invalid-mnemonic') + } - if (signer.address !== address) { - error('wrong-mnemonic') - return false - } + if (signer.address !== address) { + return reject('wrong-mnemonic') + } - const signature = await signer.sign(request.envelope.wallet, request.envelope.chainId, request.envelope.payload) - await this.signatures.addSignature(request.id, { - address, - signature, - }) - return true - }, + const signature = await signer.sign( + request.envelope.wallet, + request.envelope.chainId, + request.envelope.payload, + ) + await this.signatures.addSignature(request.id, { + address, + signature, + }) + resolve(true) + } + await onPromptMnemonic(respond) + }), } } } diff --git a/packages/wdk/src/sequence/manager.ts b/packages/wdk/src/sequence/manager.ts index 611f99ef4..4c13d9282 100644 --- a/packages/wdk/src/sequence/manager.ts +++ b/packages/wdk/src/sequence/manager.ts @@ -298,7 +298,7 @@ export class Manager { return this.shared.modules.transactions.onTransactionUpdate(transactionId, cb, trigger) } - public async registerMnemonicUI(onPromptMnemonic: () => Promise<{ mnemonic: string; error: (e: string) => void }>) { + public async registerMnemonicUI(onPromptMnemonic: (respond: (mnemonic: string) => Promise) => Promise) { return this.mnemonicHandler.registerUI(onPromptMnemonic) } From 5e21e78abd9ab4bd899f85fb0fda96028ef590af Mon Sep 17 00:00:00 2001 From: Corban Riley Date: Tue, 8 Apr 2025 14:33:27 -0400 Subject: [PATCH 289/439] Manager registerOtpUI and registerMnemonicUI should not be async --- packages/wdk/src/sequence/manager.ts | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/packages/wdk/src/sequence/manager.ts b/packages/wdk/src/sequence/manager.ts index 4c13d9282..e74718fd3 100644 --- a/packages/wdk/src/sequence/manager.ts +++ b/packages/wdk/src/sequence/manager.ts @@ -298,13 +298,11 @@ export class Manager { return this.shared.modules.transactions.onTransactionUpdate(transactionId, cb, trigger) } - public async registerMnemonicUI(onPromptMnemonic: (respond: (mnemonic: string) => Promise) => Promise) { + public registerMnemonicUI(onPromptMnemonic: (respond: (mnemonic: string) => Promise) => Promise) { return this.mnemonicHandler.registerUI(onPromptMnemonic) } - public async registerOtpUI( - onPromptOtp: (recipient: string, respond: (otp: string) => Promise) => Promise, - ) { + public registerOtpUI(onPromptOtp: (recipient: string, respond: (otp: string) => Promise) => Promise) { return this.otpHandler.registerUI(onPromptOtp) } From 5946b33725f4d5512df5e1c53b4394542718a169 Mon Sep 17 00:00:00 2001 From: Michael Standen Date: Wed, 9 Apr 2025 08:54:21 +1200 Subject: [PATCH 290/439] Update the SessionManager address --- packages/primitives/src/constants.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/primitives/src/constants.ts b/packages/primitives/src/constants.ts index dcc2829f9..51d6311a6 100644 --- a/packages/primitives/src/constants.ts +++ b/packages/primitives/src/constants.ts @@ -4,7 +4,7 @@ export const DEFAULT_CREATION_CODE: Hex.Hex = '0x603e600e3d39601e805130553df33d3d34601c57363d3d373d363d30545af43d82803e903d91601c57fd5bf3' export const DefaultGuest: Address.Address = '0xbe6E447E83Ff66Dbfc7843992191f42F6140912C' -export const DefaultSessionManager: Address.Address = '0x20115Aa0988e2d4EC7e41bA599Fd64A3Eb667bB5' +export const DefaultSessionManager: Address.Address = '0xDfB66323C6485eE10d81A0fa60BaEbbbA732Ba0a' // ERC1271 export const IS_VALID_SIGNATURE = Abi.from([ From e5809035efc52c97ed3faffac3e2e2e85f5bff22 Mon Sep 17 00:00:00 2001 From: Michael Standen Date: Wed, 9 Apr 2025 09:06:37 +1200 Subject: [PATCH 291/439] Update deployed addresses --- packages/core/test/constants.ts | 6 +++--- packages/core/test/session-manager.test.ts | 6 +++--- packages/primitives/src/constants.ts | 2 +- packages/primitives/src/context.ts | 2 +- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/packages/core/test/constants.ts b/packages/core/test/constants.ts index 824b5f5c3..2bb7643dc 100644 --- a/packages/core/test/constants.ts +++ b/packages/core/test/constants.ts @@ -4,9 +4,9 @@ import { Abi, Address } from 'ox' const envFile = process.env.CI ? '.env.test' : '.env.test.local' dotenvConfig({ path: envFile }) -export const ERC20_IMPLICIT_MINT_CONTRACT: Address.Address = '0x96ea29a63fdCf897eDc059a7f7A7bf04Bf574eF3' -export const MOCK_IMPLICIT_CONTRACT: Address.Address = '0x95b45E3131e836Ed3773C169c2A7E0C52478F1C6' -export const MOCK_IMPLICIT_INVALID_CONTRACT: Address.Address = '0x4cFD26fBADCeef5dA7e1D1BF4894a36FdaDfA3d6' +export const MOCK_IMPLICIT_CONTRACT: Address.Address = '0x041E0CDC028050519C8e6485B2d9840caf63773F' +export const MOCK_IMPLICIT_INVALID_CONTRACT: Address.Address = '0x99aA13abCDB1759Eb8653fB12090BA95bd793083' +export const ERC20_IMPLICIT_MINT_CONTRACT: Address.Address = '0xe19D4dBC90e371c4adC42f07344C2C9a50838d84' export const ERC20_MINT_ONCE = Abi.from(['function mintOnce(address to, uint256 amount)'])[0] diff --git a/packages/core/test/session-manager.test.ts b/packages/core/test/session-manager.test.ts index 98e12ea5f..8f0572bf2 100644 --- a/packages/core/test/session-manager.test.ts +++ b/packages/core/test/session-manager.test.ts @@ -38,7 +38,7 @@ describe('SessionManager', () => { const requireContractDeployed = async (provider: Provider.Provider, contract: Address.Address) => { const code = await provider.request({ method: 'eth_getCode', params: [contract, 'latest'] }) if (code === '0x') { - throw new Error('Contract not deployed') + throw new Error(`Contract ${contract} not deployed`) } } @@ -143,7 +143,7 @@ describe('SessionManager', () => { payload: Attestation.hash(attestation), privateKey: identityPrivateKey, }) - // -- Back in core -- + // -- Back in dapp -- const implicitSigner = new Signers.Session.Implicit( implicitPrivateKey, attestation, @@ -366,7 +366,7 @@ describe('SessionManager', () => { payload: Attestation.hash(attestation), privateKey: identityPrivateKey, }) - // -- Back in core -- + // -- Back in dapp -- const implicitSigner = new Signers.Session.Implicit( implicitPrivateKey, attestation, diff --git a/packages/primitives/src/constants.ts b/packages/primitives/src/constants.ts index 51d6311a6..20d7ebaaa 100644 --- a/packages/primitives/src/constants.ts +++ b/packages/primitives/src/constants.ts @@ -3,7 +3,7 @@ import { Abi, Address, Hex } from 'ox' export const DEFAULT_CREATION_CODE: Hex.Hex = '0x603e600e3d39601e805130553df33d3d34601c57363d3d373d363d30545af43d82803e903d91601c57fd5bf3' -export const DefaultGuest: Address.Address = '0xbe6E447E83Ff66Dbfc7843992191f42F6140912C' +export const DefaultGuest: Address.Address = '0x31Ee387418502E1e75a40B3bb40d38C886269CF0' export const DefaultSessionManager: Address.Address = '0xDfB66323C6485eE10d81A0fa60BaEbbbA732Ba0a' // ERC1271 diff --git a/packages/primitives/src/context.ts b/packages/primitives/src/context.ts index 72d8700d4..31be74ba2 100644 --- a/packages/primitives/src/context.ts +++ b/packages/primitives/src/context.ts @@ -10,6 +10,6 @@ export type Context = { export const Dev1: Context = { factory: '0xBd0F8abD58B4449B39C57Ac9D5C67433239aC447', - stage1: '0xB65020d89aC5EfDD71EB4FE17C59FEf4233EB8b9', + stage1: '0x656e2d390E76f3Fba9f0770Dd0EcF4707eee3dF1', creationCode: DEFAULT_CREATION_CODE, } From d35e0b976dabad1684ab5f37514cd0ec14faedf9 Mon Sep 17 00:00:00 2001 From: Michael Standen Date: Thu, 10 Apr 2025 11:32:51 +1200 Subject: [PATCH 292/439] Only build packages in the ci --- .github/workflows/ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 52e8c798c..d3fa9ae33 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -7,7 +7,7 @@ on: branches: [main] jobs: - build: + build-packages: runs-on: ubuntu-latest steps: @@ -27,7 +27,7 @@ jobs: run: pnpm install - name: Build - run: pnpm build + run: pnpm build:packages test: runs-on: ubuntu-latest From 25ff751344faac6d93228c1d656585701fdceaba Mon Sep 17 00:00:00 2001 From: Michael Standen Date: Thu, 10 Apr 2025 11:34:23 +1200 Subject: [PATCH 293/439] Default build command is packages --- package.json | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index 2855d695e..b1c242f40 100644 --- a/package.json +++ b/package.json @@ -3,14 +3,15 @@ "license": "Apache-2.0", "private": true, "scripts": { - "build": "turbo build", + "build:all": "turbo build", + "build:packages": "turbo build --filter=\"./packages/*\"", + "build": "pnpm build:packages", "dev": "turbo dev", "test": "turbo test", "lint": "turbo lint", "format": "prettier --list-different --write \"**/*.{ts,tsx,md}\"", "postinstall": "lefthook install", - "dev:server": "node packages/primitives-cli/dist/index.js server", - "build:packages": "turbo build --filter=\"./packages/*\"" + "dev:server": "node packages/primitives-cli/dist/index.js server" }, "devDependencies": { "@changesets/cli": "^2.27.11", From 09e3efcdc47b93b489a3063c5a7d33dfd73d548f Mon Sep 17 00:00:00 2001 From: Michael Standen Date: Mon, 31 Mar 2025 08:50:08 +1300 Subject: [PATCH 294/439] Avoid using as for type setting --- packages/wdk/src/sequence/handlers/devices.ts | 10 ++++++---- packages/wdk/src/sequence/handlers/passkeys.ts | 16 ++++++++++------ .../wdk/src/sequence/types/signatureRequest.ts | 4 ++-- 3 files changed, 18 insertions(+), 12 deletions(-) diff --git a/packages/wdk/src/sequence/handlers/devices.ts b/packages/wdk/src/sequence/handlers/devices.ts index 3385b9aaa..729fb7d2c 100644 --- a/packages/wdk/src/sequence/handlers/devices.ts +++ b/packages/wdk/src/sequence/handlers/devices.ts @@ -25,15 +25,16 @@ export class DevicesHandler implements Handler { ): Promise { const signer = await this.devices.get(address) if (!signer) { - return { + const status: SignerUnavailable = { address, handler: this, reason: 'not-local-key', status: 'unavailable', - } as SignerUnavailable + } + return status } - return { + const status: SignerReady = { address, handler: this, status: 'ready', @@ -47,6 +48,7 @@ export class DevicesHandler implements Handler { return true }, - } as SignerReady + } + return status } } diff --git a/packages/wdk/src/sequence/handlers/passkeys.ts b/packages/wdk/src/sequence/handlers/passkeys.ts index ddef24d0c..65c1aa3ce 100644 --- a/packages/wdk/src/sequence/handlers/passkeys.ts +++ b/packages/wdk/src/sequence/handlers/passkeys.ts @@ -41,27 +41,30 @@ export class PasskeysHandler implements Handler { address, this.extensions.passkeys, ) - return { + const status: SignerUnavailable = { ...base, status: 'unavailable', reason: 'unknown-error', - } as SignerUnavailable + } + return status } const passkey = imageHash && (await this.loadPasskey(request.envelope.wallet, imageHash)) if (!passkey) { console.warn('PasskeySigner: status failed to load passkey', address, imageHash) - return { + const status: SignerUnavailable = { ...base, status: 'unavailable', reason: 'unknown-error', - } as SignerUnavailable + } + return status } - return { + const status: SignerActionable = { ...base, status: 'actionable', message: 'request-interaction-with-passkey', + imageHash: imageHash, handle: async () => { const signature = await passkey.signSapient( request.envelope.wallet, @@ -76,6 +79,7 @@ export class PasskeysHandler implements Handler { }) return true }, - } as SignerActionable + } + return status } } diff --git a/packages/wdk/src/sequence/types/signatureRequest.ts b/packages/wdk/src/sequence/types/signatureRequest.ts index 6cd7a226a..f14faa3eb 100644 --- a/packages/wdk/src/sequence/types/signatureRequest.ts +++ b/packages/wdk/src/sequence/types/signatureRequest.ts @@ -1,6 +1,6 @@ import { Envelope } from '@0xsequence/sequence-core' import { Payload } from '@0xsequence/sequence-primitives' -import { Address, Bytes } from 'ox' +import { Address, Hex } from 'ox' import { Handler } from '../handlers' export type ActionToPayload = { @@ -29,7 +29,7 @@ export type BaseSignatureRequest = { export type SignerBase = { address: Address.Address - imageHash?: Bytes.Bytes + imageHash?: Hex.Hex } export type SignerSigned = SignerBase & { From 6f6ae4f125be0700169acd05305e2ced51ff5d02 Mon Sep 17 00:00:00 2001 From: Michael Standen Date: Mon, 31 Mar 2025 11:00:59 +1300 Subject: [PATCH 295/439] Add sessions to manager --- packages/core/src/signers/session-manager.ts | 15 ++- packages/wdk/src/sequence/index.ts | 1 + packages/wdk/src/sequence/manager.ts | 35 ++++--- packages/wdk/src/sequence/sessions.ts | 40 ++++++++ packages/wdk/src/sequence/wallets.ts | 34 +++++-- .../wdk/src/session/session-controller.ts | 99 +++++++++++-------- 6 files changed, 160 insertions(+), 64 deletions(-) create mode 100644 packages/wdk/src/sequence/sessions.ts diff --git a/packages/core/src/signers/session-manager.ts b/packages/core/src/signers/session-manager.ts index 00c93e509..8bbf18f09 100644 --- a/packages/core/src/signers/session-manager.ts +++ b/packages/core/src/signers/session-manager.ts @@ -13,7 +13,7 @@ import { State } from '..' type SessionManagerConfiguration = { topology: SessionConfig.SessionsTopology - provider: Provider.Provider + provider?: Provider.Provider implicitSigners?: Implicit[] explicitSigners?: Explicit[] address?: Address.Address @@ -22,7 +22,7 @@ type SessionManagerConfiguration = { export class SessionManager implements SapientSigner { private readonly _address: Address.Address private readonly _topology: SessionConfig.SessionsTopology - private readonly _provider: Provider.Provider + private readonly _provider: Provider.Provider | undefined private readonly _implicitSigners: Implicit[] private readonly _explicitSigners: Explicit[] @@ -159,13 +159,17 @@ export class SessionManager implements SapientSigner { throw new Error('Only calls are supported') } + if (!this._provider) { + throw new Error('Provider not set') + } + // Try to sign with each signer, prioritizing implicit signers const signers = [...this._implicitSigners, ...this._explicitSigners] const signatures = await Promise.all( //FIXME Run sync to support cumulative rules within a payload payload.calls.map(async (call) => { for (const signer of signers) { - if (await signer.supportedCall(wallet, chainId, call, this._provider)) { + if (this._provider && (await signer.supportedCall(wallet, chainId, call, this._provider))) { const signature = await signer.signCall(wallet, chainId, call, payload, this._provider) return { ...signature, @@ -202,6 +206,11 @@ export class SessionManager implements SapientSigner { // Only calls are supported return false } + + if (!this._provider) { + throw new Error('Provider not set') + } + const encodedPayload = Payload.encodeSapient(chainId, payload) const encodedCallData = AbiFunction.encodeData(Constants.RECOVER_SAPIENT_SIGNATURE, [ encodedPayload, diff --git a/packages/wdk/src/sequence/index.ts b/packages/wdk/src/sequence/index.ts index 56f7d9ef2..1eb715fd8 100644 --- a/packages/wdk/src/sequence/index.ts +++ b/packages/wdk/src/sequence/index.ts @@ -1,6 +1,7 @@ import { Network } from '@0xsequence/sequence-primitives' export * from './manager' +export * from './sessions' export * from './signatures' export * from './wallets' export * from './types' diff --git a/packages/wdk/src/sequence/manager.ts b/packages/wdk/src/sequence/manager.ts index e74718fd3..054b5de18 100644 --- a/packages/wdk/src/sequence/manager.ts +++ b/packages/wdk/src/sequence/manager.ts @@ -1,21 +1,21 @@ +import { Signers as CoreSigners, Relayer, State } from '@0xsequence/sequence-core' +import { Config, Constants, Context, Extensions, Network, Payload } from '@0xsequence/sequence-primitives' import { Address } from 'ox' - -import { Extensions, Context, Config, Constants, Network, Payload } from '@0xsequence/sequence-primitives' -import { Signers as CoreSigners, State, Relayer } from '@0xsequence/sequence-core' import * as Db from '../dbs' -import { Logger } from './logger' +import * as Identity from '../identity' import { Devices } from './devices' -import { CompleteRedirectArgs, LoginArgs, SignupArgs, StartSignUpWithRedirectArgs, Wallets } from './wallets' -import { Transactions } from './transactions' -import { Signatures } from './signatures' -import { Kinds, Signers } from './signers' import { DevicesHandler, Handler, PasskeysHandler } from './handlers' +import { AuthCodePkceHandler } from './handlers/authcode-pkce' import { MnemonicHandler } from './handlers/mnemonic' -import { RelayerOption, TransactionRequest, Transaction } from './types/transactionRequest' -import { BaseSignatureRequest, SignatureRequest, Wallet } from './types' import { OtpHandler } from './handlers/otp' -import { AuthCodePkceHandler } from './handlers/authcode-pkce' -import * as Identity from '../identity' +import { Logger } from './logger' +import { Sessions } from './sessions' +import { Signatures } from './signatures' +import { Kinds, Signers } from './signers' +import { Transactions } from './transactions' +import { BaseSignatureRequest, SignatureRequest, Wallet } from './types' +import { Transaction, TransactionRequest } from './types/transactionRequest' +import { CompleteRedirectArgs, LoginArgs, SignupArgs, StartSignUpWithRedirectArgs, Wallets } from './wallets' export type ManagerOptions = { verbose?: boolean @@ -60,6 +60,13 @@ export const ManagerOptionsDefaults = { address: '0xf71eC72C8C03a0857DD7601ACeF1e42b85983e99', weight: 1n, } as Config.SignerLeaf, + + defaultSessionTopology: { + // TODO: Move this somewhere else + type: 'sapient-signer', + address: Constants.DefaultSessionManager, + weight: 1n, + } as Omit, } export const CreateWalletOptionsDefaults = { @@ -89,12 +96,14 @@ export type Sequence = { readonly relayers: Relayer.Relayer[] readonly defaultGuardTopology: Config.Topology + readonly defaultSessionTopology: Omit } export type Modules = { readonly logger: Logger readonly devices: Devices readonly wallets: Wallets + readonly sessions: Sessions readonly signers: Signers readonly signatures: Signatures readonly transactions: Transactions @@ -135,6 +144,7 @@ export class Manager { relayers: ops.relayers, defaultGuardTopology: ops.defaultGuardTopology, + defaultSessionTopology: ops.defaultSessionTopology, }, databases: { @@ -153,6 +163,7 @@ export class Manager { logger: new Logger(shared), devices: new Devices(shared), wallets: new Wallets(shared), + sessions: new Sessions(shared), signers: new Signers(shared), signatures: new Signatures(shared), transactions: new Transactions(shared), diff --git a/packages/wdk/src/sequence/sessions.ts b/packages/wdk/src/sequence/sessions.ts new file mode 100644 index 000000000..dbcb4b5a4 --- /dev/null +++ b/packages/wdk/src/sequence/sessions.ts @@ -0,0 +1,40 @@ +import { Wallet } from '@0xsequence/sequence-core' +import { Config, Constants } from '@0xsequence/sequence-primitives' +import { Address, Provider, RpcTransport } from 'ox' +import { SessionController } from '../session' +import { Shared } from './manager' + +export class Sessions { + constructor(private readonly shared: Shared) {} + + async controllerForWallet(address: Address.Address, chainId?: bigint) { + // Find the session configuration for the wallet + const wallet = new Wallet(address, { + context: this.shared.sequence.context, + stateProvider: this.shared.sequence.stateProvider, + guest: this.shared.sequence.guest, + }) + const status = await wallet.getStatus() + const walletConfig = status.configuration + const sessionConfigLeaf = Config.findSignerLeaf(walletConfig, Constants.DefaultSessionManager) + if (!sessionConfigLeaf || !Config.isSapientSignerLeaf(sessionConfigLeaf)) { + throw new Error(`Session module not found for wallet ${address}`) + } + + // Get the provider if available + let provider: Provider.Provider | undefined + if (chainId) { + const network = this.shared.sequence.networks.find((network) => network.chainId === chainId) + if (network) { + provider = Provider.from(RpcTransport.fromHttp(network.rpc)) + } + } + + // Create the controller + const controller = SessionController.createFromStorage(sessionConfigLeaf.imageHash, { + wallet, + provider, + }) + return controller + } +} diff --git a/packages/wdk/src/sequence/wallets.ts b/packages/wdk/src/sequence/wallets.ts index 53e68c505..b2e9e26a9 100644 --- a/packages/wdk/src/sequence/wallets.ts +++ b/packages/wdk/src/sequence/wallets.ts @@ -1,13 +1,13 @@ +import { Wallet as CoreWallet, Envelope, Signers, State } from '@0xsequence/sequence-core' +import { Config, GenericTree, Payload, SessionConfig } from '@0xsequence/sequence-primitives' import { Address, Hex } from 'ox' -import { Envelope, Signers, Wallet as CoreWallet, State } from '@0xsequence/sequence-core' -import { Config, Payload } from '@0xsequence/sequence-primitives' -import { Kinds, WitnessExtraSignerKind } from './signers' -import { Shared } from './manager' +import { AuthCommitment } from '../dbs/auth-commitments' +import { AuthCodePkceHandler } from './handlers/authcode-pkce' import { MnemonicHandler } from './handlers/mnemonic' import { OtpHandler } from './handlers/otp' +import { Shared } from './manager' +import { Kinds, WitnessExtraSignerKind } from './signers' import { Wallet } from './types' -import { AuthCodePkceHandler } from './handlers/authcode-pkce' -import { AuthCommitment } from '../dbs/auth-commitments' export type StartSignUpWithRedirectArgs = { kind: 'google-pkce' | 'apple-pkce' @@ -17,6 +17,7 @@ export type StartSignUpWithRedirectArgs = { export type CommonSignupArgs = { noGuard?: boolean + noSessionManager?: boolean onExistingWallets?: (wallets: Address.Address[]) => Promise } @@ -350,13 +351,13 @@ export class Wallets { } // Build the login tree + const loginSignerAddress = await loginSigner.signer.address const loginTopology = buildCappedTree([ { - address: await loginSigner.signer.address, + address: loginSignerAddress, imageHash: Signers.isSapientSigner(loginSigner.signer) ? await loginSigner.signer.imageHash : undefined, }, ]) - const devicesTopology = buildCappedTree([{ address: device.address }]) const guardTopology = args.noGuard ? undefined @@ -365,11 +366,24 @@ export class Wallets { // TODO: Add recovery module // TODO: Add smart sessions module // Placeholder - const modules = { + let modules: Config.Topology = { type: 'signer', address: '0x0000000000000000000000000000000000000000', weight: 0n, - } as Config.SignerLeaf + } + if (!args.noSessionManager) { + // FIXME: Calculate image hash with the identity signer + const sessionManagerTopology = SessionConfig.emptySessionsTopology(loginSignerAddress) + const sessionConfigTree = SessionConfig.sessionsTopologyToConfigurationTree(sessionManagerTopology) + const sessionImageHash = GenericTree.hash(sessionConfigTree) + modules = [ + { + ...this.shared.sequence.defaultSessionTopology, + imageHash: sessionImageHash, + }, + modules, + ] + } // Create initial configuration const initialConfiguration = toConfig(0n, loginTopology, devicesTopology, modules, guardTopology) diff --git a/packages/wdk/src/session/session-controller.ts b/packages/wdk/src/session/session-controller.ts index 31f7d7618..b2fd810ff 100644 --- a/packages/wdk/src/session/session-controller.ts +++ b/packages/wdk/src/session/session-controller.ts @@ -1,35 +1,41 @@ -import { Signers, State, Wallet } from '@0xsequence/sequence-core' +import { Envelope, Signers, State, Wallet } from '@0xsequence/sequence-core' import { Attestation, Config, GenericTree, + Payload, Signature as SequenceSignature, SessionConfig, } from '@0xsequence/sequence-primitives' -import { Address, Bytes, Hex, Provider } from 'ox' +import { Address, Hex, Provider } from 'ox' import { IdentitySigner } from '../identity' type SessionControllerConfiguration = { - wallet: Wallet // FIXME Account? - identitySigner: IdentitySigner + wallet: Wallet topology: SessionConfig.SessionsTopology - provider: Provider.Provider + provider?: Provider.Provider + identitySigner?: IdentitySigner stateProvider?: State.Provider } export class SessionController { private _manager: Signers.SessionManager private readonly _wallet: Wallet - private readonly _identitySigner: IdentitySigner + private readonly _identitySigner: IdentitySigner | null private readonly _stateProvider: State.Provider | null + private _pendingUpdate: { + envelope: Envelope.Envelope + topology: SessionConfig.SessionsTopology + } | null = null + constructor(configuration: SessionControllerConfiguration) { this._manager = new Signers.SessionManager({ topology: configuration.topology, provider: configuration.provider, }) this._wallet = configuration.wallet - this._identitySigner = configuration.identitySigner + this._identitySigner = configuration.identitySigner ?? null this._stateProvider = configuration.stateProvider ?? null } @@ -84,65 +90,80 @@ export class SessionController { } const attestationHash = Attestation.hash(attestation) // Return the signature to the client + if (!this._identitySigner) { + throw new Error('Identity signer not provided') + } return await this._identitySigner.signDigest(attestationHash) } - async addExplicitSession(signerAddress: Address.Address, permissions: Signers.Session.ExplicitParams): Promise { + async addExplicitSession( + signerAddress: Address.Address, + permissions: Signers.Session.ExplicitParams, + ): Promise> { const topology = SessionConfig.addExplicitSession(this.topology, { ...permissions, signer: signerAddress, }) - await this.updateConfiguration(topology) + return await this.prepareUpdateConfiguration(topology) } - async removeExplicitSession(signerAddress: Address.Address): Promise { + async removeExplicitSession(signerAddress: Address.Address): Promise> { const topology = SessionConfig.removeExplicitSession(this.topology, signerAddress) if (!topology) { throw new Error('Session not found') } - await this.updateConfiguration(topology) + return await this.prepareUpdateConfiguration(topology) } - async addBlacklistAddress(address: Address.Address): Promise { + async addBlacklistAddress(address: Address.Address): Promise> { const topology = SessionConfig.addToImplicitBlacklist(this.topology, address) - await this.updateConfiguration(topology) + return await this.prepareUpdateConfiguration(topology) } - async removeBlacklistAddress(address: Address.Address): Promise { + async removeBlacklistAddress(address: Address.Address): Promise> { const topology = SessionConfig.removeFromImplicitBlacklist(this.topology, address) - await this.updateConfiguration(topology) + return await this.prepareUpdateConfiguration(topology) } - // Update the configuration to use the new topology - private async updateConfiguration(topology: SessionConfig.SessionsTopology): Promise { - throw new Error('TODO: re-implemented') - // // Remove the old manager from the wallet - // // this._wallet.removeSapientSigner(this._manager.address, this._manager.imageHash) + // Prepare the configuration update to use the new topology + private async prepareUpdateConfiguration( + topology: SessionConfig.SessionsTopology, + ): Promise> { + // Create a new manager with the new topology - // // Update the manager with the new topology - // this._manager = this._manager.withTopology(topology) + // Store the new configuration + await this._stateProvider?.saveTree(SessionConfig.sessionsTopologyToConfigurationTree(topology)) - // // Store the new configuration - // await this._stateProvider?.saveTree(SessionConfig.sessionsTopologyToConfigurationTree(topology)) + // Get the old wallet configuration + const { configuration } = await this._wallet.getStatus() - // // Add the new manager to the wallet - // // this._wallet.setSapientSigner(this._manager, true) + // Find the session manager in the old configuration + const managerLeaf = Config.findSignerLeaf(configuration, this._manager.address) + if (!managerLeaf || !Config.isSapientSignerLeaf(managerLeaf)) { + // FIXME: Just add it? + throw new Error('Session manager not found in configuration') + } - // // Get the old wallet configuration - // const status = await this._wallet.getStatus() - // const oldConfiguration = status.configuration + // Update the configuration to use the new session manager image hash + managerLeaf.imageHash = this.imageHash - // // Find the session manager in the old configuration - // const managerLeaf = Config.findSignerLeaf(oldConfiguration, this._manager.address) - // if (!managerLeaf || !Config.isSapientSignerLeaf(managerLeaf)) { - // // FIXME: Just add it? - // throw new Error('Session manager not found in configuration') - // } + // Update the wallet configuration + const envelope = await this._wallet.prepareUpdate(configuration) + return envelope + } - // // Update the configuration to use the new session manager image hash - // managerLeaf.imageHash = this.imageHash + // Complete the configuration update + protected async completeUpdateConfiguration(envelope: Envelope.Signed): Promise { + // Verify this is the pending configuration update + if (!this._pendingUpdate) { + throw new Error('No pending configuration update') + } + if (this._pendingUpdate.envelope.payload.imageHash !== envelope.payload.imageHash) { + throw new Error('Invalid configuration update') + } - // // Update the wallet configuration - // // await this._wallet.setConfiguration(oldConfiguration) + // Update the manager and wallet with the new topology + this._manager = this._manager.withTopology(this._pendingUpdate.topology) + await this._wallet.submitUpdate(envelope) } } From eee46dca0e8f1948405a4d5108be1270028e6d3b Mon Sep 17 00:00:00 2001 From: Michael Standen Date: Tue, 1 Apr 2025 14:36:07 +1300 Subject: [PATCH 296/439] Update sessions configuration updates --- packages/core/src/wallet.ts | 1 + packages/wdk/src/dbs/signatures.ts | 2 + packages/wdk/src/sequence/manager.ts | 51 +++++++++- packages/wdk/src/sequence/sessions.ts | 94 +++++++++++++++++-- packages/wdk/src/sequence/signatures.ts | 6 +- packages/wdk/src/sequence/transactions.ts | 2 +- .../src/sequence/types/signatureRequest.ts | 2 + packages/wdk/src/sequence/wallets.ts | 7 ++ .../wdk/src/session/session-controller.ts | 50 ++++++---- 9 files changed, 181 insertions(+), 34 deletions(-) diff --git a/packages/core/src/wallet.ts b/packages/core/src/wallet.ts index 4c38c4e22..1848cf323 100644 --- a/packages/core/src/wallet.ts +++ b/packages/core/src/wallet.ts @@ -98,6 +98,7 @@ export class Wallet { throw new Error(`cannot find configuration details for ${envelope.payload.imageHash}`) } + // Verify the new configuration is valid const updatedEnvelope = { ...envelope, configuration: status.configuration } const { weight, threshold } = Envelope.weightOf(updatedEnvelope) if (weight < threshold) { diff --git a/packages/wdk/src/dbs/signatures.ts b/packages/wdk/src/dbs/signatures.ts index 1a8c42fda..4e737ad5a 100644 --- a/packages/wdk/src/dbs/signatures.ts +++ b/packages/wdk/src/dbs/signatures.ts @@ -7,12 +7,14 @@ export type ActionToPayload = { [Actions.Logout]: Payload.ConfigUpdate [Actions.Login]: Payload.ConfigUpdate [Actions.SendTransaction]: Payload.Calls + [Actions.SessionUpdate]: Payload.ConfigUpdate } export const Actions = { Logout: 'logout', Login: 'login', SendTransaction: 'send-transaction', + SessionUpdate: 'session-update', } as const export type Action = (typeof Actions)[keyof typeof Actions] diff --git a/packages/wdk/src/sequence/manager.ts b/packages/wdk/src/sequence/manager.ts index 054b5de18..ef99f5b6c 100644 --- a/packages/wdk/src/sequence/manager.ts +++ b/packages/wdk/src/sequence/manager.ts @@ -1,5 +1,13 @@ import { Signers as CoreSigners, Relayer, State } from '@0xsequence/sequence-core' -import { Config, Constants, Context, Extensions, Network, Payload } from '@0xsequence/sequence-primitives' +import { + Config, + Constants, + Context, + Extensions, + Network, + Payload, + SessionConfig, +} from '@0xsequence/sequence-primitives' import { Address } from 'ox' import * as Db from '../dbs' import * as Identity from '../identity' @@ -246,7 +254,7 @@ export class Manager { // Signatures - public async listSignatureRequests(): Promise { + public async listSignatureRequests(): Promise { return this.shared.modules.signatures.list() } @@ -324,4 +332,43 @@ export class Manager { } }) } + + // Sessions + + public async getSessionTopology(walletAddress: Address.Address): Promise { + return this.shared.modules.sessions.getSessionTopology(walletAddress) + } + + public async addImplicitSession(walletAddress: Address.Address, sessionAddress: Address.Address) { + return this.shared.modules.sessions.addImplicitSession(walletAddress, sessionAddress) + } + + public async addExplicitSession( + walletAddress: Address.Address, + sessionAddress: Address.Address, + permissions: CoreSigners.Session.ExplicitParams, + ): Promise { + return this.shared.modules.sessions.addExplicitSession(walletAddress, sessionAddress, permissions) + } + + public async removeExplicitSession(walletAddress: Address.Address, sessionAddress: Address.Address): Promise { + return this.shared.modules.sessions.removeExplicitSession(walletAddress, sessionAddress) + } + + public async addBlacklistAddress(walletAddress: Address.Address, address: Address.Address): Promise { + return this.shared.modules.sessions.addBlacklistAddress(walletAddress, address) + } + + public async removeBlacklistAddress(walletAddress: Address.Address, address: Address.Address): Promise { + return this.shared.modules.sessions.removeBlacklistAddress(walletAddress, address) + } + + public async completeSessionUpdate(requestId: string) { + const sigRequest = await this.shared.modules.signatures.get(requestId) + if (sigRequest.action !== 'session-update' || !Payload.isConfigUpdate(sigRequest.envelope.payload)) { + throw new Error('Invalid action') + } + console.log('Completing session update:', requestId) + return this.shared.modules.sessions.completeSessionUpdate(sigRequest.wallet, requestId) + } } diff --git a/packages/wdk/src/sequence/sessions.ts b/packages/wdk/src/sequence/sessions.ts index dbcb4b5a4..ee4c733fa 100644 --- a/packages/wdk/src/sequence/sessions.ts +++ b/packages/wdk/src/sequence/sessions.ts @@ -1,24 +1,30 @@ -import { Wallet } from '@0xsequence/sequence-core' -import { Config, Constants } from '@0xsequence/sequence-primitives' +import { Signers as CoreSigners, Envelope, Wallet } from '@0xsequence/sequence-core' +import { Config, Constants, Payload, SessionConfig } from '@0xsequence/sequence-primitives' import { Address, Provider, RpcTransport } from 'ox' import { SessionController } from '../session' import { Shared } from './manager' export class Sessions { + private readonly _sessionControllers: Map = new Map() + constructor(private readonly shared: Shared) {} - async controllerForWallet(address: Address.Address, chainId?: bigint) { + async getControllerForWallet(walletAddress: Address.Address, chainId?: bigint): Promise { + if (this._sessionControllers.has(walletAddress)) { + return this._sessionControllers.get(walletAddress)! + } + + //FIXME How do we check the wallet is available? Is it necessary? // Find the session configuration for the wallet - const wallet = new Wallet(address, { + const wallet = new Wallet(walletAddress, { context: this.shared.sequence.context, stateProvider: this.shared.sequence.stateProvider, guest: this.shared.sequence.guest, }) - const status = await wallet.getStatus() - const walletConfig = status.configuration - const sessionConfigLeaf = Config.findSignerLeaf(walletConfig, Constants.DefaultSessionManager) + const { configuration } = await wallet.getStatus() + const sessionConfigLeaf = Config.findSignerLeaf(configuration, Constants.DefaultSessionManager) if (!sessionConfigLeaf || !Config.isSapientSignerLeaf(sessionConfigLeaf)) { - throw new Error(`Session module not found for wallet ${address}`) + throw new Error(`Session module not found for wallet ${walletAddress}`) } // Get the provider if available @@ -31,10 +37,80 @@ export class Sessions { } // Create the controller - const controller = SessionController.createFromStorage(sessionConfigLeaf.imageHash, { + const controller = await SessionController.createFromStorage(sessionConfigLeaf.imageHash, { wallet, provider, + stateProvider: this.shared.sequence.stateProvider, }) + this._sessionControllers.set(walletAddress, controller) return controller } + + async getSessionTopology(walletAddress: Address.Address): Promise { + console.log('Getting session topology for:', walletAddress) + const controller = await this.getControllerForWallet(walletAddress) + console.log('Session topology:', controller.topology) + return controller.topology + } + + async addImplicitSession(walletAddress: Address.Address, sessionAddress: Address.Address): Promise { + const controller = await this.getControllerForWallet(walletAddress) + // Create attestation params + //FIXME This is a login request? + // const attestationParams: Attestation.Attestation = { + // approvedSigner: sessionAddress, + // } + // const envelope = await controller.addImplicitSession(sessionAddress) + // return this.shared.modules.signatures.request(envelope, 'config-update', { + // origin: 'session-manager', + // }) + throw new Error('Not implemented') + } + + async addExplicitSession( + walletAddress: Address.Address, + sessionAddress: Address.Address, + permissions: CoreSigners.Session.ExplicitParams, + ): Promise { + const controller = await this.getControllerForWallet(walletAddress) + const envelope = await controller.addExplicitSession(sessionAddress, permissions) + return this.prepareSessionUpdate(envelope) + } + + async removeExplicitSession(walletAddress: Address.Address, sessionAddress: Address.Address): Promise { + const controller = await this.getControllerForWallet(walletAddress) + const envelope = await controller.removeExplicitSession(sessionAddress) + return this.prepareSessionUpdate(envelope) + } + + async addBlacklistAddress(walletAddress: Address.Address, address: Address.Address): Promise { + const controller = await this.getControllerForWallet(walletAddress) + const envelope = await controller.addBlacklistAddress(address) + return this.prepareSessionUpdate(envelope) + } + + async removeBlacklistAddress(walletAddress: Address.Address, address: Address.Address): Promise { + const controller = await this.getControllerForWallet(walletAddress) + const envelope = await controller.removeBlacklistAddress(address) + return this.prepareSessionUpdate(envelope) + } + + private async prepareSessionUpdate(envelope: Envelope.Envelope): Promise { + const requestId = await this.shared.modules.signatures.request(envelope, 'session-update', { + origin: 'wallet-webapp', + }) + return requestId + } + + async completeSessionUpdate(walletAddress: Address.Address, requestId: string) { + const controller = await this.getControllerForWallet(walletAddress) + const sigRequest = await this.shared.modules.signatures.get(requestId) + const envelope = sigRequest.envelope + if (sigRequest.action !== 'session-update' || !Payload.isConfigUpdate(envelope.payload)) { + throw new Error('Invalid action') + } + console.log('Completing session update:', requestId) + await controller.completeUpdateConfiguration(envelope as Envelope.Signed) + return this.shared.modules.signatures.complete(requestId) + } } diff --git a/packages/wdk/src/sequence/signatures.ts b/packages/wdk/src/sequence/signatures.ts index a23d7a8a4..f8981d60a 100644 --- a/packages/wdk/src/sequence/signatures.ts +++ b/packages/wdk/src/sequence/signatures.ts @@ -10,8 +10,8 @@ import { BaseSignatureRequest, SignatureRequest, SignerBase, SignerSigned, Signe export class Signatures { constructor(private readonly shared: Shared) {} - async list(): Promise { - return this.shared.databases.signatures.list() + async list(): Promise { + return this.shared.databases.signatures.list() as any as SignatureRequest[] } async get(requestId: string): Promise { @@ -94,7 +94,7 @@ export class Signatures { ...request, ...Envelope.weightOf(request.envelope), signers: statuses, - } + } as SignatureRequest } onSignatureRequestUpdate( diff --git a/packages/wdk/src/sequence/transactions.ts b/packages/wdk/src/sequence/transactions.ts index f6dfe2577..78c231d1b 100644 --- a/packages/wdk/src/sequence/transactions.ts +++ b/packages/wdk/src/sequence/transactions.ts @@ -1,5 +1,4 @@ import { Payload } from '@0xsequence/sequence-primitives' -import * as Db from '../dbs' import { Envelope, Wallet } from '@0xsequence/sequence-core' import { Address, Provider, RpcTransport } from 'ox' import { v7 as uuidv7 } from 'uuid' @@ -161,6 +160,7 @@ export class Transactions { return signatureId } + async relay(transactionOrSignatureId: string) { // First, try to get the transaction directly let tx: Transaction | undefined diff --git a/packages/wdk/src/sequence/types/signatureRequest.ts b/packages/wdk/src/sequence/types/signatureRequest.ts index f14faa3eb..57fdd8084 100644 --- a/packages/wdk/src/sequence/types/signatureRequest.ts +++ b/packages/wdk/src/sequence/types/signatureRequest.ts @@ -7,12 +7,14 @@ export type ActionToPayload = { [Actions.Logout]: Payload.ConfigUpdate [Actions.Login]: Payload.ConfigUpdate [Actions.SendTransaction]: Payload.Calls + [Actions.SessionUpdate]: Payload.ConfigUpdate } export const Actions = { Logout: 'logout', Login: 'login', SendTransaction: 'send-transaction', + SessionUpdate: 'session-update', } as const export type Action = (typeof Actions)[keyof typeof Actions] diff --git a/packages/wdk/src/sequence/wallets.ts b/packages/wdk/src/sequence/wallets.ts index b2e9e26a9..155e4d609 100644 --- a/packages/wdk/src/sequence/wallets.ts +++ b/packages/wdk/src/sequence/wallets.ts @@ -204,6 +204,10 @@ export class Wallets { return this.shared.databases.manager.get(wallet).then((r) => r !== undefined) } + public async get(walletAddress: Address.Address): Promise { + return await this.shared.databases.manager.get(walletAddress) + } + public async list(): Promise { return this.shared.databases.manager.list() } @@ -374,7 +378,10 @@ export class Wallets { if (!args.noSessionManager) { // FIXME: Calculate image hash with the identity signer const sessionManagerTopology = SessionConfig.emptySessionsTopology(loginSignerAddress) + // Store this tree in the state provider const sessionConfigTree = SessionConfig.sessionsTopologyToConfigurationTree(sessionManagerTopology) + this.shared.sequence.stateProvider.saveTree(sessionConfigTree) + // Prepare the configuration leaf const sessionImageHash = GenericTree.hash(sessionConfigTree) modules = [ { diff --git a/packages/wdk/src/session/session-controller.ts b/packages/wdk/src/session/session-controller.ts index b2fd810ff..574a3fbd6 100644 --- a/packages/wdk/src/session/session-controller.ts +++ b/packages/wdk/src/session/session-controller.ts @@ -24,11 +24,6 @@ export class SessionController { private readonly _identitySigner: IdentitySigner | null private readonly _stateProvider: State.Provider | null - private _pendingUpdate: { - envelope: Envelope.Envelope - topology: SessionConfig.SessionsTopology - } | null = null - constructor(configuration: SessionControllerConfiguration) { this._manager = new Signers.SessionManager({ topology: configuration.topology, @@ -132,7 +127,14 @@ export class SessionController { // Create a new manager with the new topology // Store the new configuration - await this._stateProvider?.saveTree(SessionConfig.sessionsTopologyToConfigurationTree(topology)) + if (!this._stateProvider) { + throw new Error('State provider not provided') + } + const tree = SessionConfig.sessionsTopologyToConfigurationTree(topology) + console.log('prepareUpdateConfiguration Tree:', tree) + const newImageHash = GenericTree.hash(tree) + console.log('New image hash:', newImageHash) + await this._stateProvider.saveTree(tree) // Get the old wallet configuration const { configuration } = await this._wallet.getStatus() @@ -144,26 +146,36 @@ export class SessionController { throw new Error('Session manager not found in configuration') } - // Update the configuration to use the new session manager image hash - managerLeaf.imageHash = this.imageHash + console.log('prepareUpdateConfiguration Manager Leaf:', managerLeaf) + console.log('New image hash:', newImageHash) - // Update the wallet configuration - const envelope = await this._wallet.prepareUpdate(configuration) - return envelope + // Update the configuration to use the new session manager image hash + managerLeaf.imageHash = newImageHash + return await this._wallet.prepareUpdate(configuration) } // Complete the configuration update - protected async completeUpdateConfiguration(envelope: Envelope.Signed): Promise { - // Verify this is the pending configuration update - if (!this._pendingUpdate) { - throw new Error('No pending configuration update') + async completeUpdateConfiguration(envelope: Envelope.Signed): Promise { + const configuration = await this._stateProvider?.getConfiguration(envelope.payload.imageHash) + if (!configuration) { + throw new Error('Wallet configuration not found') + } + + // Find the session manager in the new configuration + const managerLeaf = Config.findSignerLeaf(configuration, this._manager.address) + if (!managerLeaf || !Config.isSapientSignerLeaf(managerLeaf)) { + throw new Error('Session manager not found in configuration') } - if (this._pendingUpdate.envelope.payload.imageHash !== envelope.payload.imageHash) { - throw new Error('Invalid configuration update') + const sessionTree = await this._stateProvider?.getTree(managerLeaf.imageHash) + if (!sessionTree) { + throw new Error('Session tree not found') } + const topology = SessionConfig.configurationTreeToSessionsTopology(sessionTree) + console.log('completeUpdateConfiguration Topology:', topology) - // Update the manager and wallet with the new topology - this._manager = this._manager.withTopology(this._pendingUpdate.topology) + // Update the manager and wallet with the new topology and submit the update + this._manager = this._manager.withTopology(topology) + console.log('Submitting update:', envelope.payload.imageHash) await this._wallet.submitUpdate(envelope) } } From 3dace7f25340e2c10e77133674c03b8811a5a8f5 Mon Sep 17 00:00:00 2001 From: Michael Standen Date: Wed, 9 Apr 2025 14:49:02 +1200 Subject: [PATCH 297/439] Update comments --- packages/primitives/src/index.ts | 2 +- packages/wdk/src/sequence/sessions.ts | 19 ++++++------------- 2 files changed, 7 insertions(+), 14 deletions(-) diff --git a/packages/primitives/src/index.ts b/packages/primitives/src/index.ts index 4c4a25b5a..95c7727a0 100644 --- a/packages/primitives/src/index.ts +++ b/packages/primitives/src/index.ts @@ -6,7 +6,7 @@ export * as Payload from './payload' export * as Permission from './permission' export * as SessionConfig from './session-config' export * as SessionSignature from './session-signature' -export * as Signature from './signature' //FIXME This name conflicts with oxlib +export * as Signature from './signature' export * as Utils from './utils' export * as Config from './config' export * as Context from './context' diff --git a/packages/wdk/src/sequence/sessions.ts b/packages/wdk/src/sequence/sessions.ts index ee4c733fa..6d14c6f3d 100644 --- a/packages/wdk/src/sequence/sessions.ts +++ b/packages/wdk/src/sequence/sessions.ts @@ -47,23 +47,16 @@ export class Sessions { } async getSessionTopology(walletAddress: Address.Address): Promise { - console.log('Getting session topology for:', walletAddress) const controller = await this.getControllerForWallet(walletAddress) - console.log('Session topology:', controller.topology) return controller.topology } - async addImplicitSession(walletAddress: Address.Address, sessionAddress: Address.Address): Promise { - const controller = await this.getControllerForWallet(walletAddress) - // Create attestation params - //FIXME This is a login request? - // const attestationParams: Attestation.Attestation = { - // approvedSigner: sessionAddress, - // } - // const envelope = await controller.addImplicitSession(sessionAddress) - // return this.shared.modules.signatures.request(envelope, 'config-update', { - // origin: 'session-manager', - // }) + async addImplicitSession( + walletAddress: Address.Address, + sessionAddress: Address.Address, + origin?: string, + ): Promise { + //FIXME This is a login request. Not required here? throw new Error('Not implemented') } From 192485b9b071f21d14e8a86fb2664f2b6a140268 Mon Sep 17 00:00:00 2001 From: Michael Standen Date: Wed, 9 Apr 2025 14:49:23 +1200 Subject: [PATCH 298/439] Add origin to session config updates --- packages/wdk/src/sequence/sessions.ts | 37 +++++++++++++++++++-------- 1 file changed, 26 insertions(+), 11 deletions(-) diff --git a/packages/wdk/src/sequence/sessions.ts b/packages/wdk/src/sequence/sessions.ts index 6d14c6f3d..6cf876c64 100644 --- a/packages/wdk/src/sequence/sessions.ts +++ b/packages/wdk/src/sequence/sessions.ts @@ -64,35 +64,50 @@ export class Sessions { walletAddress: Address.Address, sessionAddress: Address.Address, permissions: CoreSigners.Session.ExplicitParams, + origin?: string, ): Promise { const controller = await this.getControllerForWallet(walletAddress) const envelope = await controller.addExplicitSession(sessionAddress, permissions) - return this.prepareSessionUpdate(envelope) + return this.prepareSessionUpdate(envelope, origin) } - async removeExplicitSession(walletAddress: Address.Address, sessionAddress: Address.Address): Promise { + async removeExplicitSession( + walletAddress: Address.Address, + sessionAddress: Address.Address, + origin?: string, + ): Promise { const controller = await this.getControllerForWallet(walletAddress) const envelope = await controller.removeExplicitSession(sessionAddress) - return this.prepareSessionUpdate(envelope) + return this.prepareSessionUpdate(envelope, origin) } - async addBlacklistAddress(walletAddress: Address.Address, address: Address.Address): Promise { + async addBlacklistAddress( + walletAddress: Address.Address, + address: Address.Address, + origin?: string, + ): Promise { const controller = await this.getControllerForWallet(walletAddress) const envelope = await controller.addBlacklistAddress(address) - return this.prepareSessionUpdate(envelope) + return this.prepareSessionUpdate(envelope, origin) } - async removeBlacklistAddress(walletAddress: Address.Address, address: Address.Address): Promise { + async removeBlacklistAddress( + walletAddress: Address.Address, + address: Address.Address, + origin?: string, + ): Promise { const controller = await this.getControllerForWallet(walletAddress) const envelope = await controller.removeBlacklistAddress(address) - return this.prepareSessionUpdate(envelope) + return this.prepareSessionUpdate(envelope, origin) } - private async prepareSessionUpdate(envelope: Envelope.Envelope): Promise { - const requestId = await this.shared.modules.signatures.request(envelope, 'session-update', { - origin: 'wallet-webapp', + private async prepareSessionUpdate( + envelope: Envelope.Envelope, + origin: string = 'wallet-webapp', + ): Promise { + return await this.shared.modules.signatures.request(envelope, 'session-update', { + origin, }) - return requestId } async completeSessionUpdate(walletAddress: Address.Address, requestId: string) { From b8095762b035997cb42b590fdb64c57d67992a7e Mon Sep 17 00:00:00 2001 From: Michael Standen Date: Thu, 10 Apr 2025 09:02:11 +1200 Subject: [PATCH 299/439] Update comment --- packages/wdk/src/sequence/wallets.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/wdk/src/sequence/wallets.ts b/packages/wdk/src/sequence/wallets.ts index 155e4d609..fa24da999 100644 --- a/packages/wdk/src/sequence/wallets.ts +++ b/packages/wdk/src/sequence/wallets.ts @@ -376,7 +376,7 @@ export class Wallets { weight: 0n, } if (!args.noSessionManager) { - // FIXME: Calculate image hash with the identity signer + // Calculate image hash with the identity signer const sessionManagerTopology = SessionConfig.emptySessionsTopology(loginSignerAddress) // Store this tree in the state provider const sessionConfigTree = SessionConfig.sessionsTopologyToConfigurationTree(sessionManagerTopology) From eb29c7f48edc0d087ac6a462ec578a728b0a9f61 Mon Sep 17 00:00:00 2001 From: Michael Standen Date: Thu, 10 Apr 2025 10:12:09 +1200 Subject: [PATCH 300/439] Update naming --- packages/wdk/src/sequence/manager.ts | 6 +++--- packages/wdk/src/sequence/wallets.ts | 14 +++++++------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/packages/wdk/src/sequence/manager.ts b/packages/wdk/src/sequence/manager.ts index ef99f5b6c..28872de13 100644 --- a/packages/wdk/src/sequence/manager.ts +++ b/packages/wdk/src/sequence/manager.ts @@ -69,7 +69,7 @@ export const ManagerOptionsDefaults = { weight: 1n, } as Config.SignerLeaf, - defaultSessionTopology: { + defaultSessionsTopology: { // TODO: Move this somewhere else type: 'sapient-signer', address: Constants.DefaultSessionManager, @@ -104,7 +104,7 @@ export type Sequence = { readonly relayers: Relayer.Relayer[] readonly defaultGuardTopology: Config.Topology - readonly defaultSessionTopology: Omit + readonly defaultSessionsTopology: Omit } export type Modules = { @@ -152,7 +152,7 @@ export class Manager { relayers: ops.relayers, defaultGuardTopology: ops.defaultGuardTopology, - defaultSessionTopology: ops.defaultSessionTopology, + defaultSessionsTopology: ops.defaultSessionsTopology, }, databases: { diff --git a/packages/wdk/src/sequence/wallets.ts b/packages/wdk/src/sequence/wallets.ts index fa24da999..711b29930 100644 --- a/packages/wdk/src/sequence/wallets.ts +++ b/packages/wdk/src/sequence/wallets.ts @@ -1,5 +1,5 @@ import { Wallet as CoreWallet, Envelope, Signers, State } from '@0xsequence/sequence-core' -import { Config, GenericTree, Payload, SessionConfig } from '@0xsequence/sequence-primitives' +import { Config, GenericTree, Payload, SessionConfig, Permission } from '@0xsequence/sequence-primitives' import { Address, Hex } from 'ox' import { AuthCommitment } from '../dbs/auth-commitments' import { AuthCodePkceHandler } from './handlers/authcode-pkce' @@ -377,16 +377,16 @@ export class Wallets { } if (!args.noSessionManager) { // Calculate image hash with the identity signer - const sessionManagerTopology = SessionConfig.emptySessionsTopology(loginSignerAddress) + const sessionsTopology = SessionConfig.emptySessionsTopology(loginSignerAddress) // Store this tree in the state provider - const sessionConfigTree = SessionConfig.sessionsTopologyToConfigurationTree(sessionManagerTopology) - this.shared.sequence.stateProvider.saveTree(sessionConfigTree) + const sessionsConfigTree = SessionConfig.sessionsTopologyToConfigurationTree(sessionsTopology) + this.shared.sequence.stateProvider.saveTree(sessionsConfigTree) // Prepare the configuration leaf - const sessionImageHash = GenericTree.hash(sessionConfigTree) + const sessionsImageHash = GenericTree.hash(sessionsConfigTree) modules = [ { - ...this.shared.sequence.defaultSessionTopology, - imageHash: sessionImageHash, + ...this.shared.sequence.defaultSessionsTopology, + imageHash: sessionsImageHash, }, modules, ] From 6e593e82b82ef1a6aeaf1c82c9f675c6fd8161d9 Mon Sep 17 00:00:00 2001 From: Michael Standen Date: Thu, 10 Apr 2025 10:52:05 +1200 Subject: [PATCH 301/439] Permissions require min 1 --- packages/primitives-cli/src/subcommands/devTools.ts | 5 ++++- packages/primitives/src/permission.ts | 7 +++++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/packages/primitives-cli/src/subcommands/devTools.ts b/packages/primitives-cli/src/subcommands/devTools.ts index dd802429b..f26444e6a 100644 --- a/packages/primitives-cli/src/subcommands/devTools.ts +++ b/packages/primitives-cli/src/subcommands/devTools.ts @@ -107,12 +107,15 @@ async function generateSessionsTopology( if (isLeaf || depth <= 1) { const permissionsCount = Math.floor((options?.seededRandom ?? Math.random)() * (options?.maxPermissions ?? 5)) + 1 + const permissions = await Promise.all( + Array.from({ length: permissionsCount }, () => generateRandomPermission(options)), + ) return { type: 'session-permissions', signer: randomAddress(options), valueLimit: randomBigInt(100n, options), deadline: randomBigInt(1000n, options), - permissions: await Promise.all(Array.from({ length: permissionsCount }, () => generateRandomPermission(options))), + permissions: permissions as [Permission.Permission, ...Permission.Permission[]], } } diff --git a/packages/primitives/src/permission.ts b/packages/primitives/src/permission.ts index 49c9c5361..03f6497ec 100644 --- a/packages/primitives/src/permission.ts +++ b/packages/primitives/src/permission.ts @@ -24,7 +24,7 @@ export type SessionPermissions = { signer: Address.Address valueLimit: bigint deadline: bigint - permissions: Permission[] + permissions: [Permission, ...Permission[]] } export const MAX_PERMISSIONS_COUNT = 2 ** 7 - 1 @@ -89,11 +89,14 @@ export function decodeSessionPermissions(bytes: Bytes.Bytes): SessionPermissions permissions.push(permission) pointer += consumed } + if (permissions.length === 0) { + throw new Error('No permissions') + } return { signer, valueLimit, deadline, - permissions, + permissions: permissions as [Permission, ...Permission[]], } } From 80aaa106fc123f12f989bd5c3f5ed6dd8de96c2f Mon Sep 17 00:00:00 2001 From: Michael Standen Date: Mon, 14 Apr 2025 14:51:49 +1200 Subject: [PATCH 302/439] Session configuration update should increment checkpoint --- packages/wdk/src/session/session-controller.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/packages/wdk/src/session/session-controller.ts b/packages/wdk/src/session/session-controller.ts index 574a3fbd6..2c2d4b023 100644 --- a/packages/wdk/src/session/session-controller.ts +++ b/packages/wdk/src/session/session-controller.ts @@ -151,6 +151,11 @@ export class SessionController { // Update the configuration to use the new session manager image hash managerLeaf.imageHash = newImageHash + + // Increment the checkpoint + configuration.checkpoint += 1n + + // Update the wallet configuration return await this._wallet.prepareUpdate(configuration) } From d0578b38973b9ba5499fd023a303b6c25c490c92 Mon Sep 17 00:00:00 2001 From: Peter Kieltyka Date: Mon, 14 Apr 2025 10:50:41 -0400 Subject: [PATCH 303/439] prepare for v3 by moving v2 code under 'old' folder --- {.changeset => old/.changeset}/README.md | 0 {.changeset => old/.changeset}/config.json | 0 .eslintignore => old/.eslintignore | 0 .eslintrc.js => old/.eslintrc.js | 0 .gitignore => old/.gitignore | 0 .prettierrc => old/.prettierrc | 0 LICENSE => old/LICENSE | 0 README.md => old/README.md | 0 babel.config.js => old/babel.config.js | 0 package.json => old/package.json | 0 {packages => old/packages}/0xsequence/CHANGELOG.md | 0 {packages => old/packages}/0xsequence/README.md | 0 {packages => old/packages}/0xsequence/hardhat.config.js | 0 {packages => old/packages}/0xsequence/hardhat2.config.js | 0 {packages => old/packages}/0xsequence/package.json | 0 {packages => old/packages}/0xsequence/src/abi.ts | 0 {packages => old/packages}/0xsequence/src/account.ts | 0 {packages => old/packages}/0xsequence/src/api.ts | 0 {packages => old/packages}/0xsequence/src/auth.ts | 0 {packages => old/packages}/0xsequence/src/core.ts | 0 {packages => old/packages}/0xsequence/src/guard.ts | 0 {packages => old/packages}/0xsequence/src/index.ts | 0 {packages => old/packages}/0xsequence/src/indexer.ts | 0 {packages => old/packages}/0xsequence/src/metadata.ts | 0 {packages => old/packages}/0xsequence/src/migration.ts | 0 {packages => old/packages}/0xsequence/src/network.ts | 0 {packages => old/packages}/0xsequence/src/provider.ts | 0 {packages => old/packages}/0xsequence/src/relayer.ts | 0 {packages => old/packages}/0xsequence/src/sequence.ts | 0 {packages => old/packages}/0xsequence/src/sessions.ts | 0 {packages => old/packages}/0xsequence/src/signhub.ts | 0 {packages => old/packages}/0xsequence/src/transactions.ts | 0 {packages => old/packages}/0xsequence/src/utils.ts | 0 .../0xsequence/tests/browser/json-rpc-provider/rpc.test.ts | 0 .../0xsequence/tests/browser/mock-wallet/mock-wallet.test.ts | 0 .../packages}/0xsequence/tests/browser/mux-transport/mux.test.ts | 0 .../0xsequence/tests/browser/proxy-transport/channel.test.ts | 0 .../packages}/0xsequence/tests/browser/testutils/accounts.ts | 0 .../0xsequence/tests/browser/testutils/deploy-wallet-context.ts | 0 .../packages}/0xsequence/tests/browser/testutils/index.ts | 0 .../packages}/0xsequence/tests/browser/testutils/wallet.ts | 0 .../0xsequence/tests/browser/wallet-provider/dapp.test.ts | 0 .../0xsequence/tests/browser/wallet-provider/dapp2.test.ts | 0 .../0xsequence/tests/browser/window-transport/dapp.test.ts | 0 .../packages}/0xsequence/tests/json-rpc-provider.spec.ts | 0 {packages => old/packages}/0xsequence/tests/mock-wallet.spec.ts | 0 {packages => old/packages}/0xsequence/tests/mux-transport.spec.ts | 0 .../packages}/0xsequence/tests/proxy-transport.spec.ts | 0 {packages => old/packages}/0xsequence/tests/utils/assert.ts | 0 .../packages}/0xsequence/tests/utils/browser-test-runner.ts | 0 .../packages}/0xsequence/tests/utils/webpack-test-server.ts | 0 .../packages}/0xsequence/tests/wallet-provider.spec.ts | 0 {packages => old/packages}/0xsequence/tests/webpack.config.js | 0 .../packages}/0xsequence/tests/window-transport.spec.ts | 0 {packages => old/packages}/abi/CHANGELOG.md | 0 {packages => old/packages}/abi/README.md | 0 {packages => old/packages}/abi/package.json | 0 {packages => old/packages}/abi/src/index.ts | 0 {packages => old/packages}/abi/src/sale/erc1155Sale.ts | 0 {packages => old/packages}/abi/src/sale/erc721Sale.ts | 0 {packages => old/packages}/abi/src/saleItems/erc1155SaleItems.ts | 0 {packages => old/packages}/abi/src/saleItems/erc721SaleItems.ts | 0 {packages => old/packages}/abi/src/tokens/erc1155.ts | 0 {packages => old/packages}/abi/src/tokens/erc20.ts | 0 {packages => old/packages}/abi/src/tokens/erc6909.ts | 0 {packages => old/packages}/abi/src/tokens/erc721.ts | 0 {packages => old/packages}/abi/src/wallet/erc1271.ts | 0 {packages => old/packages}/abi/src/wallet/erc5719.ts | 0 {packages => old/packages}/abi/src/wallet/erc6492.ts | 0 {packages => old/packages}/abi/src/wallet/factory.ts | 0 {packages => old/packages}/abi/src/wallet/index.ts | 0 .../packages}/abi/src/wallet/libs/requireFreshSigners.ts | 0 {packages => old/packages}/abi/src/wallet/mainModule.ts | 0 {packages => old/packages}/abi/src/wallet/mainModuleUpgradable.ts | 0 {packages => old/packages}/abi/src/wallet/moduleHooks.ts | 0 {packages => old/packages}/abi/src/wallet/sequenceUtils.ts | 0 {packages => old/packages}/abi/src/wallet/walletProxyHook.ts | 0 {packages => old/packages}/account/CHANGELOG.md | 0 {packages => old/packages}/account/hardhat.config.js | 0 {packages => old/packages}/account/hardhat2.config.js | 0 {packages => old/packages}/account/package.json | 0 {packages => old/packages}/account/src/account.ts | 0 {packages => old/packages}/account/src/index.ts | 0 {packages => old/packages}/account/src/orchestrator/wrapper.ts | 0 {packages => old/packages}/account/src/signer.ts | 0 {packages => old/packages}/account/tests/account.spec.ts | 0 {packages => old/packages}/account/tests/signer.spec.ts | 0 {packages => old/packages}/api/CHANGELOG.md | 0 {packages => old/packages}/api/README.md | 0 {packages => old/packages}/api/package.json | 0 {packages => old/packages}/api/src/api.gen.ts | 0 {packages => old/packages}/api/src/index.ts | 0 {packages => old/packages}/auth/CHANGELOG.md | 0 {packages => old/packages}/auth/README.md | 0 {packages => old/packages}/auth/hardhat.config.js | 0 {packages => old/packages}/auth/package.json | 0 {packages => old/packages}/auth/src/authorization.ts | 0 {packages => old/packages}/auth/src/index.ts | 0 {packages => old/packages}/auth/src/proof.ts | 0 {packages => old/packages}/auth/src/services.ts | 0 {packages => old/packages}/auth/src/session.ts | 0 {packages => old/packages}/auth/tests/session.spec.ts | 0 {packages => old/packages}/auth/tests/utils/index.ts | 0 {packages => old/packages}/builder/CHANGELOG.md | 0 {packages => old/packages}/builder/README.md | 0 {packages => old/packages}/builder/package.json | 0 {packages => old/packages}/builder/src/builder.gen.ts | 0 {packages => old/packages}/builder/src/index.ts | 0 {packages => old/packages}/core/CHANGELOG.md | 0 {packages => old/packages}/core/package.json | 0 {packages => old/packages}/core/src/commons/config.ts | 0 {packages => old/packages}/core/src/commons/context.ts | 0 {packages => old/packages}/core/src/commons/index.ts | 0 {packages => old/packages}/core/src/commons/orchestrator.ts | 0 {packages => old/packages}/core/src/commons/reader.ts | 0 {packages => old/packages}/core/src/commons/signature.ts | 0 {packages => old/packages}/core/src/commons/signer.ts | 0 {packages => old/packages}/core/src/commons/transaction.ts | 0 {packages => old/packages}/core/src/commons/validateEIP1271.ts | 0 {packages => old/packages}/core/src/commons/validateEIP6492.ts | 0 {packages => old/packages}/core/src/index.ts | 0 {packages => old/packages}/core/src/universal/index.ts | 0 {packages => old/packages}/core/src/v1/config.ts | 0 {packages => old/packages}/core/src/v1/context.ts | 0 {packages => old/packages}/core/src/v1/index.ts | 0 {packages => old/packages}/core/src/v1/signature.ts | 0 {packages => old/packages}/core/src/v2/chained.ts | 0 {packages => old/packages}/core/src/v2/config.ts | 0 {packages => old/packages}/core/src/v2/context.ts | 0 {packages => old/packages}/core/src/v2/index.ts | 0 {packages => old/packages}/core/src/v2/signature.ts | 0 {packages => old/packages}/core/src/version.ts | 0 {packages => old/packages}/core/tests/v2/config.spec.ts | 0 {packages => old/packages}/core/tests/v2/signature.spec.ts | 0 {packages => old/packages}/deployer/.gitignore | 0 {packages => old/packages}/deployer/CHANGELOG.md | 0 {packages => old/packages}/deployer/README.md | 0 .../NanoUniversalDeployer.sol/NanoUniversalDeployer.json | 0 .../contracts/UniversalDeployer2.sol/UniversalDeployer2.json | 0 {packages => old/packages}/deployer/config/PROD.env.sample | 0 .../packages}/deployer/contracts/NanoUniversalDeployer.sol | 0 .../packages}/deployer/contracts/UniversalDeployer2.sol | 0 {packages => old/packages}/deployer/hardhat.config.ts | 0 {packages => old/packages}/deployer/package.json | 0 {packages => old/packages}/deployer/src/UniversalDeployer.ts | 0 {packages => old/packages}/deployer/src/constants.ts | 0 {packages => old/packages}/deployer/src/index.ts | 0 {packages => old/packages}/deployer/src/types.ts | 0 .../deployer/src/typings/contracts/NanoUniversalDeployer.ts | 0 .../deployer/src/typings/contracts/UniversalDeployer2.ts | 0 .../packages}/deployer/src/typings/contracts/common.ts | 0 .../typings/contracts/factories/NanoUniversalDeployer__factory.ts | 0 .../typings/contracts/factories/UniversalDeployer2__factory.ts | 0 .../packages}/deployer/src/typings/contracts/factories/index.ts | 0 .../packages}/deployer/src/typings/contracts/index.ts | 0 {packages => old/packages}/deployer/src/utils/configLoader.ts | 0 {packages => old/packages}/deployer/src/utils/logger.ts | 0 {packages => old/packages}/deployer/tests/mock.spec.ts | 0 {packages => old/packages}/guard/CHANGELOG.md | 0 {packages => old/packages}/guard/README.md | 0 {packages => old/packages}/guard/package.json | 0 {packages => old/packages}/guard/src/guard.gen.ts | 0 {packages => old/packages}/guard/src/index.ts | 0 {packages => old/packages}/guard/src/signer.ts | 0 {packages => old/packages}/indexer/CHANGELOG.md | 0 {packages => old/packages}/indexer/README.md | 0 {packages => old/packages}/indexer/package.json | 0 {packages => old/packages}/indexer/src/index.ts | 0 {packages => old/packages}/indexer/src/indexer.gen.ts | 0 {packages => old/packages}/indexer/src/indexergw.gen.ts | 0 {packages => old/packages}/marketplace/CHANGELOG.md | 0 {packages => old/packages}/marketplace/README.md | 0 {packages => old/packages}/marketplace/package.json | 0 {packages => old/packages}/marketplace/src/index.ts | 0 {packages => old/packages}/marketplace/src/marketplace.gen.ts | 0 {packages => old/packages}/metadata/CHANGELOG.md | 0 {packages => old/packages}/metadata/README.md | 0 {packages => old/packages}/metadata/package.json | 0 {packages => old/packages}/metadata/src/index.ts | 0 {packages => old/packages}/metadata/src/metadata.gen.ts | 0 {packages => old/packages}/migration/CHANGELOG.md | 0 {packages => old/packages}/migration/package.json | 0 {packages => old/packages}/migration/src/defaults.ts | 0 {packages => old/packages}/migration/src/index.ts | 0 {packages => old/packages}/migration/src/migrations/index.ts | 0 .../packages}/migration/src/migrations/migration_01_02.ts | 0 {packages => old/packages}/migration/src/migrator.ts | 0 {packages => old/packages}/migration/src/version.ts | 0 {packages => old/packages}/network/CHANGELOG.md | 0 {packages => old/packages}/network/README.md | 0 {packages => old/packages}/network/constants/package.json | 0 {packages => old/packages}/network/networkNames.md | 0 {packages => old/packages}/network/networkNames.template.md | 0 {packages => old/packages}/network/package.json | 0 {packages => old/packages}/network/src/config.ts | 0 {packages => old/packages}/network/src/constants.ts | 0 {packages => old/packages}/network/src/index.ts | 0 {packages => old/packages}/network/src/json-rpc-provider.ts | 0 {packages => old/packages}/network/src/json-rpc/handler.ts | 0 {packages => old/packages}/network/src/json-rpc/index.ts | 0 .../packages}/network/src/json-rpc/middleware/allow-provider.ts | 0 .../packages}/network/src/json-rpc/middleware/cached-provider.ts | 0 .../packages}/network/src/json-rpc/middleware/eager-provider.ts | 0 .../network/src/json-rpc/middleware/exception-provider.ts | 0 .../packages}/network/src/json-rpc/middleware/index.ts | 0 .../packages}/network/src/json-rpc/middleware/logging-provider.ts | 0 .../packages}/network/src/json-rpc/middleware/network-provider.ts | 0 .../packages}/network/src/json-rpc/middleware/public-provider.ts | 0 .../packages}/network/src/json-rpc/middleware/signing-provider.ts | 0 .../packages}/network/src/json-rpc/middleware/singleflight.ts | 0 {packages => old/packages}/network/src/json-rpc/router.ts | 0 {packages => old/packages}/network/src/json-rpc/types.ts | 0 {packages => old/packages}/network/src/json-rpc/utils.ts | 0 {packages => old/packages}/network/src/utils.ts | 0 {packages => old/packages}/provider/CHANGELOG.md | 0 {packages => old/packages}/provider/README.md | 0 {packages => old/packages}/provider/hardhat1.config.cts | 0 {packages => old/packages}/provider/hardhat1.config.js | 0 {packages => old/packages}/provider/hardhat2.config.cts | 0 {packages => old/packages}/provider/hardhat2.config.js | 0 {packages => old/packages}/provider/package.json | 0 {packages => old/packages}/provider/src/analytics.ts | 0 {packages => old/packages}/provider/src/client.ts | 0 {packages => old/packages}/provider/src/eip191exceptions.ts | 0 {packages => old/packages}/provider/src/extended.ts | 0 {packages => old/packages}/provider/src/index.ts | 0 {packages => old/packages}/provider/src/init.ts | 0 {packages => old/packages}/provider/src/provider.ts | 0 {packages => old/packages}/provider/src/signer.ts | 0 {packages => old/packages}/provider/src/transactions.ts | 0 .../packages}/provider/src/transports/base-provider-transport.ts | 0 .../packages}/provider/src/transports/base-wallet-transport.ts | 0 .../src/transports/extension-transport/base-injected-transport.ts | 0 .../transports/extension-transport/extension-message-handler.ts | 0 .../transports/extension-transport/extension-message-provider.ts | 0 .../provider/src/transports/extension-transport/index.ts | 0 {packages => old/packages}/provider/src/transports/index.ts | 0 .../packages}/provider/src/transports/mux-transport/index.ts | 0 .../provider/src/transports/mux-transport/mux-message-provider.ts | 0 .../packages}/provider/src/transports/proxy-transport/index.ts | 0 .../src/transports/proxy-transport/proxy-message-channel.ts | 0 .../src/transports/proxy-transport/proxy-message-handler.ts | 0 .../src/transports/proxy-transport/proxy-message-provider.ts | 0 .../packages}/provider/src/transports/unreal-transport/index.ts | 0 .../provider/src/transports/unreal-transport/overridelogs.ts | 0 .../src/transports/unreal-transport/unreal-message-handler.ts | 0 .../src/transports/unreal-transport/unreal-message-provider.ts | 0 .../packages}/provider/src/transports/wallet-request-handler.ts | 0 .../packages}/provider/src/transports/window-transport/index.ts | 0 .../src/transports/window-transport/window-message-handler.ts | 0 .../src/transports/window-transport/window-message-provider.ts | 0 {packages => old/packages}/provider/src/types.ts | 0 {packages => old/packages}/provider/src/utils.ts | 0 {packages => old/packages}/provider/src/utils/index.ts | 0 {packages => old/packages}/provider/tests/client.spec.ts | 0 {packages => old/packages}/provider/tests/eip191prefix.spec.ts | 0 {packages => old/packages}/provider/tests/messages.ts | 0 {packages => old/packages}/provider/tests/provider.spec.ts | 0 .../packages}/provider/tests/remove-eip191prefix.spec.ts | 0 {packages => old/packages}/provider/tests/signer.spec.ts | 0 {packages => old/packages}/provider/tests/transactions.spec.ts | 0 {packages => old/packages}/provider/tests/zeroxv3.spec.ts | 0 {packages => old/packages}/react-native/CHANGELOG.md | 0 {packages => old/packages}/react-native/package.json | 0 {packages => old/packages}/react-native/src/index.ts | 0 {packages => old/packages}/react-native/src/keychain-store.ts | 0 {packages => old/packages}/relayer/CHANGELOG.md | 0 {packages => old/packages}/relayer/README.md | 0 {packages => old/packages}/relayer/hardhat.config.js | 0 {packages => old/packages}/relayer/package.json | 0 {packages => old/packages}/relayer/src/index.ts | 0 {packages => old/packages}/relayer/src/local-relayer.ts | 0 {packages => old/packages}/relayer/src/provider-relayer.ts | 0 {packages => old/packages}/relayer/src/rpc-relayer/index.ts | 0 {packages => old/packages}/relayer/src/rpc-relayer/relayer.gen.ts | 0 {packages => old/packages}/relayer/tests/provider-relayer.spec.ts | 0 {packages => old/packages}/replacer/CHANGELOG.md | 0 {packages => old/packages}/replacer/package.json | 0 {packages => old/packages}/replacer/src/cached.ts | 0 {packages => old/packages}/replacer/src/index.ts | 0 {packages => old/packages}/replacer/src/ipfs.ts | 0 {packages => old/packages}/sessions/CHANGELOG.md | 0 {packages => old/packages}/sessions/hardhat.config.js | 0 {packages => old/packages}/sessions/package.json | 0 {packages => old/packages}/sessions/src/index.ts | 0 {packages => old/packages}/sessions/src/tracker.ts | 0 {packages => old/packages}/sessions/src/trackers/arweave.ts | 0 {packages => old/packages}/sessions/src/trackers/cached.ts | 0 {packages => old/packages}/sessions/src/trackers/debug.ts | 0 {packages => old/packages}/sessions/src/trackers/deduped.ts | 0 {packages => old/packages}/sessions/src/trackers/index.ts | 0 {packages => old/packages}/sessions/src/trackers/local.ts | 0 {packages => old/packages}/sessions/src/trackers/multiple.ts | 0 {packages => old/packages}/sessions/src/trackers/promise-cache.ts | 0 {packages => old/packages}/sessions/src/trackers/remote/index.ts | 0 .../packages}/sessions/src/trackers/remote/sessions.gen.ts | 0 {packages => old/packages}/sessions/src/trackers/stores/index.ts | 0 .../packages}/sessions/src/trackers/stores/indexedDBStore.ts | 0 .../packages}/sessions/src/trackers/stores/memoryStore.ts | 0 {packages => old/packages}/sessions/tests/arweave.spec.ts | 0 {packages => old/packages}/sessions/tests/local.spec.ts | 0 {packages => old/packages}/signhub/CHANGELOG.md | 0 {packages => old/packages}/signhub/package.json | 0 {packages => old/packages}/signhub/src/index.ts | 0 {packages => old/packages}/signhub/src/orchestrator.ts | 0 {packages => old/packages}/signhub/src/signers/index.ts | 0 {packages => old/packages}/signhub/src/signers/signer.ts | 0 {packages => old/packages}/signhub/src/signers/wrapper.ts | 0 {packages => old/packages}/signhub/tests/orchestrator.spec.ts | 0 {packages => old/packages}/tests/CHANGELOG.md | 0 {packages => old/packages}/tests/package.json | 0 {packages => old/packages}/tests/src/builds/artifact.ts | 0 {packages => old/packages}/tests/src/builds/index.ts | 0 .../packages}/tests/src/builds/v1/artifacts/Factory.ts | 0 .../packages}/tests/src/builds/v1/artifacts/GuestModule.ts | 0 .../packages}/tests/src/builds/v1/artifacts/MainModule.ts | 0 .../tests/src/builds/v1/artifacts/MainModuleUpgradable.ts | 0 .../packages}/tests/src/builds/v1/artifacts/MultiCallUtils.ts | 0 .../packages}/tests/src/builds/v1/artifacts/SequenceUtils.ts | 0 {packages => old/packages}/tests/src/builds/v1/index.ts | 0 .../packages}/tests/src/builds/v2/artifacts/Factory.ts | 0 .../packages}/tests/src/builds/v2/artifacts/GuestModule.ts | 0 .../packages}/tests/src/builds/v2/artifacts/MainModule.ts | 0 .../tests/src/builds/v2/artifacts/MainModuleUpgradable.ts | 0 .../tests/src/builds/v2/artifacts/UniversalSigValidator.ts | 0 {packages => old/packages}/tests/src/builds/v2/index.ts | 0 {packages => old/packages}/tests/src/configs/index.ts | 0 {packages => old/packages}/tests/src/configs/random.ts | 0 {packages => old/packages}/tests/src/context/index.ts | 0 {packages => old/packages}/tests/src/context/v1.ts | 0 {packages => old/packages}/tests/src/context/v2.ts | 0 {packages => old/packages}/tests/src/index.ts | 0 {packages => old/packages}/tests/src/networks.ts | 0 {packages => old/packages}/tests/src/singletonFactory.ts | 0 {packages => old/packages}/tests/src/tokens/erc20.ts | 0 {packages => old/packages}/tests/src/utils.ts | 0 {packages => old/packages}/utils/CHANGELOG.md | 0 {packages => old/packages}/utils/README.md | 0 {packages => old/packages}/utils/package.json | 0 {packages => old/packages}/utils/src/access-key.ts | 0 {packages => old/packages}/utils/src/base64.ts | 0 {packages => old/packages}/utils/src/bigint.ts | 0 {packages => old/packages}/utils/src/digest.ts | 0 {packages => old/packages}/utils/src/index.ts | 0 {packages => old/packages}/utils/src/is-node-or-browser.ts | 0 {packages => old/packages}/utils/src/jwt-decode.ts | 0 {packages => old/packages}/utils/src/logger.ts | 0 {packages => old/packages}/utils/src/merkle.ts | 0 {packages => old/packages}/utils/src/merkletree/Base.ts | 0 {packages => old/packages}/utils/src/merkletree/MerkleTree.ts | 0 {packages => old/packages}/utils/src/merkletree/README.md | 0 {packages => old/packages}/utils/src/merkletree/index.ts | 0 {packages => old/packages}/utils/src/network.ts | 0 {packages => old/packages}/utils/src/promise-cache.ts | 0 {packages => old/packages}/utils/src/promisify.ts | 0 {packages => old/packages}/utils/src/query-string.ts | 0 {packages => old/packages}/utils/src/rand.ts | 0 {packages => old/packages}/utils/src/sanitize.ts | 0 {packages => old/packages}/utils/src/sleep.ts | 0 {packages => old/packages}/utils/src/typed-data.ts | 0 {packages => old/packages}/utils/src/types.ts | 0 {packages => old/packages}/utils/src/web.ts | 0 {packages => old/packages}/utils/tests/access-key.spec.ts | 0 {packages => old/packages}/utils/tests/base64.spec.ts | 0 {packages => old/packages}/utils/tests/bigint.spec.ts | 0 {packages => old/packages}/utils/tests/jwt-decode.spec.ts | 0 {packages => old/packages}/utils/tests/merkle.spec.ts | 0 {packages => old/packages}/utils/tests/query-string.spec.ts | 0 {packages => old/packages}/utils/tests/sanitize.spec.ts | 0 {packages => old/packages}/waas-ethers/CHANGELOG.md | 0 {packages => old/packages}/waas-ethers/README.md | 0 {packages => old/packages}/waas-ethers/package.json | 0 {packages => old/packages}/waas-ethers/src/index.ts | 0 {packages => old/packages}/waas-ethers/src/signer.ts | 0 {packages => old/packages}/waas/CHANGELOG.md | 0 {packages => old/packages}/waas/README.md | 0 {packages => old/packages}/waas/package.json | 0 {packages => old/packages}/waas/src/auth.ts | 0 {packages => old/packages}/waas/src/base.ts | 0 {packages => old/packages}/waas/src/challenge.ts | 0 {packages => old/packages}/waas/src/clients/authenticator.gen.ts | 0 {packages => old/packages}/waas/src/clients/intent.gen.ts | 0 {packages => old/packages}/waas/src/email.ts | 0 {packages => old/packages}/waas/src/errors.ts | 0 {packages => old/packages}/waas/src/index.ts | 0 {packages => old/packages}/waas/src/intents/accounts.ts | 0 {packages => old/packages}/waas/src/intents/base.ts | 0 {packages => old/packages}/waas/src/intents/index.ts | 0 {packages => old/packages}/waas/src/intents/messages.ts | 0 {packages => old/packages}/waas/src/intents/responses.ts | 0 {packages => old/packages}/waas/src/intents/session.ts | 0 {packages => old/packages}/waas/src/intents/transactions.ts | 0 {packages => old/packages}/waas/src/intents/utils.ts | 0 {packages => old/packages}/waas/src/networks.ts | 0 {packages => old/packages}/waas/src/secure-store.ts | 0 {packages => old/packages}/waas/src/session/index.ts | 0 {packages => old/packages}/waas/src/session/keyTypes.ts | 0 {packages => old/packages}/waas/src/session/secp256k1.ts | 0 {packages => old/packages}/waas/src/session/secp256r1.ts | 0 {packages => old/packages}/waas/src/store.ts | 0 {packages => old/packages}/waas/src/subtle-crypto.ts | 0 {packages => old/packages}/waas/tests/intents.spec.ts | 0 {packages => old/packages}/wallet/CHANGELOG.md | 0 {packages => old/packages}/wallet/README.md | 0 {packages => old/packages}/wallet/hardhat.config.js | 0 {packages => old/packages}/wallet/hardhat2.config.js | 0 {packages => old/packages}/wallet/package.json | 0 {packages => old/packages}/wallet/src/index.ts | 0 {packages => old/packages}/wallet/src/orchestrator/wrapper.ts | 0 {packages => old/packages}/wallet/src/signer.ts | 0 {packages => old/packages}/wallet/src/utils.ts | 0 {packages => old/packages}/wallet/src/wallet.ts | 0 .../packages}/wallet/tests/utils/deploy-wallet-context.ts | 0 {packages => old/packages}/wallet/tests/utils/get-contract.ts | 0 {packages => old/packages}/wallet/tests/utils/index.ts | 0 {packages => old/packages}/wallet/tests/wallet.spec.ts | 0 pnpm-lock.yaml => old/pnpm-lock.yaml | 0 pnpm-workspace.yaml => old/pnpm-workspace.yaml | 0 {scripts => old/scripts}/fix-mocha-ref.js | 0 {scripts => old/scripts}/pnpm-link.sh | 0 {scripts => old/scripts}/update-network-names-doc.ts | 0 {scripts => old/scripts}/update-version.js | 0 tsconfig.json => old/tsconfig.json | 0 tsconfig.test.json => old/tsconfig.test.json | 0 424 files changed, 0 insertions(+), 0 deletions(-) rename {.changeset => old/.changeset}/README.md (100%) rename {.changeset => old/.changeset}/config.json (100%) rename .eslintignore => old/.eslintignore (100%) rename .eslintrc.js => old/.eslintrc.js (100%) rename .gitignore => old/.gitignore (100%) rename .prettierrc => old/.prettierrc (100%) rename LICENSE => old/LICENSE (100%) rename README.md => old/README.md (100%) rename babel.config.js => old/babel.config.js (100%) rename package.json => old/package.json (100%) rename {packages => old/packages}/0xsequence/CHANGELOG.md (100%) rename {packages => old/packages}/0xsequence/README.md (100%) rename {packages => old/packages}/0xsequence/hardhat.config.js (100%) rename {packages => old/packages}/0xsequence/hardhat2.config.js (100%) rename {packages => old/packages}/0xsequence/package.json (100%) rename {packages => old/packages}/0xsequence/src/abi.ts (100%) rename {packages => old/packages}/0xsequence/src/account.ts (100%) rename {packages => old/packages}/0xsequence/src/api.ts (100%) rename {packages => old/packages}/0xsequence/src/auth.ts (100%) rename {packages => old/packages}/0xsequence/src/core.ts (100%) rename {packages => old/packages}/0xsequence/src/guard.ts (100%) rename {packages => old/packages}/0xsequence/src/index.ts (100%) rename {packages => old/packages}/0xsequence/src/indexer.ts (100%) rename {packages => old/packages}/0xsequence/src/metadata.ts (100%) rename {packages => old/packages}/0xsequence/src/migration.ts (100%) rename {packages => old/packages}/0xsequence/src/network.ts (100%) rename {packages => old/packages}/0xsequence/src/provider.ts (100%) rename {packages => old/packages}/0xsequence/src/relayer.ts (100%) rename {packages => old/packages}/0xsequence/src/sequence.ts (100%) rename {packages => old/packages}/0xsequence/src/sessions.ts (100%) rename {packages => old/packages}/0xsequence/src/signhub.ts (100%) rename {packages => old/packages}/0xsequence/src/transactions.ts (100%) rename {packages => old/packages}/0xsequence/src/utils.ts (100%) rename {packages => old/packages}/0xsequence/tests/browser/json-rpc-provider/rpc.test.ts (100%) rename {packages => old/packages}/0xsequence/tests/browser/mock-wallet/mock-wallet.test.ts (100%) rename {packages => old/packages}/0xsequence/tests/browser/mux-transport/mux.test.ts (100%) rename {packages => old/packages}/0xsequence/tests/browser/proxy-transport/channel.test.ts (100%) rename {packages => old/packages}/0xsequence/tests/browser/testutils/accounts.ts (100%) rename {packages => old/packages}/0xsequence/tests/browser/testutils/deploy-wallet-context.ts (100%) rename {packages => old/packages}/0xsequence/tests/browser/testutils/index.ts (100%) rename {packages => old/packages}/0xsequence/tests/browser/testutils/wallet.ts (100%) rename {packages => old/packages}/0xsequence/tests/browser/wallet-provider/dapp.test.ts (100%) rename {packages => old/packages}/0xsequence/tests/browser/wallet-provider/dapp2.test.ts (100%) rename {packages => old/packages}/0xsequence/tests/browser/window-transport/dapp.test.ts (100%) rename {packages => old/packages}/0xsequence/tests/json-rpc-provider.spec.ts (100%) rename {packages => old/packages}/0xsequence/tests/mock-wallet.spec.ts (100%) rename {packages => old/packages}/0xsequence/tests/mux-transport.spec.ts (100%) rename {packages => old/packages}/0xsequence/tests/proxy-transport.spec.ts (100%) rename {packages => old/packages}/0xsequence/tests/utils/assert.ts (100%) rename {packages => old/packages}/0xsequence/tests/utils/browser-test-runner.ts (100%) rename {packages => old/packages}/0xsequence/tests/utils/webpack-test-server.ts (100%) rename {packages => old/packages}/0xsequence/tests/wallet-provider.spec.ts (100%) rename {packages => old/packages}/0xsequence/tests/webpack.config.js (100%) rename {packages => old/packages}/0xsequence/tests/window-transport.spec.ts (100%) rename {packages => old/packages}/abi/CHANGELOG.md (100%) rename {packages => old/packages}/abi/README.md (100%) rename {packages => old/packages}/abi/package.json (100%) rename {packages => old/packages}/abi/src/index.ts (100%) rename {packages => old/packages}/abi/src/sale/erc1155Sale.ts (100%) rename {packages => old/packages}/abi/src/sale/erc721Sale.ts (100%) rename {packages => old/packages}/abi/src/saleItems/erc1155SaleItems.ts (100%) rename {packages => old/packages}/abi/src/saleItems/erc721SaleItems.ts (100%) rename {packages => old/packages}/abi/src/tokens/erc1155.ts (100%) rename {packages => old/packages}/abi/src/tokens/erc20.ts (100%) rename {packages => old/packages}/abi/src/tokens/erc6909.ts (100%) rename {packages => old/packages}/abi/src/tokens/erc721.ts (100%) rename {packages => old/packages}/abi/src/wallet/erc1271.ts (100%) rename {packages => old/packages}/abi/src/wallet/erc5719.ts (100%) rename {packages => old/packages}/abi/src/wallet/erc6492.ts (100%) rename {packages => old/packages}/abi/src/wallet/factory.ts (100%) rename {packages => old/packages}/abi/src/wallet/index.ts (100%) rename {packages => old/packages}/abi/src/wallet/libs/requireFreshSigners.ts (100%) rename {packages => old/packages}/abi/src/wallet/mainModule.ts (100%) rename {packages => old/packages}/abi/src/wallet/mainModuleUpgradable.ts (100%) rename {packages => old/packages}/abi/src/wallet/moduleHooks.ts (100%) rename {packages => old/packages}/abi/src/wallet/sequenceUtils.ts (100%) rename {packages => old/packages}/abi/src/wallet/walletProxyHook.ts (100%) rename {packages => old/packages}/account/CHANGELOG.md (100%) rename {packages => old/packages}/account/hardhat.config.js (100%) rename {packages => old/packages}/account/hardhat2.config.js (100%) rename {packages => old/packages}/account/package.json (100%) rename {packages => old/packages}/account/src/account.ts (100%) rename {packages => old/packages}/account/src/index.ts (100%) rename {packages => old/packages}/account/src/orchestrator/wrapper.ts (100%) rename {packages => old/packages}/account/src/signer.ts (100%) rename {packages => old/packages}/account/tests/account.spec.ts (100%) rename {packages => old/packages}/account/tests/signer.spec.ts (100%) rename {packages => old/packages}/api/CHANGELOG.md (100%) rename {packages => old/packages}/api/README.md (100%) rename {packages => old/packages}/api/package.json (100%) rename {packages => old/packages}/api/src/api.gen.ts (100%) rename {packages => old/packages}/api/src/index.ts (100%) rename {packages => old/packages}/auth/CHANGELOG.md (100%) rename {packages => old/packages}/auth/README.md (100%) rename {packages => old/packages}/auth/hardhat.config.js (100%) rename {packages => old/packages}/auth/package.json (100%) rename {packages => old/packages}/auth/src/authorization.ts (100%) rename {packages => old/packages}/auth/src/index.ts (100%) rename {packages => old/packages}/auth/src/proof.ts (100%) rename {packages => old/packages}/auth/src/services.ts (100%) rename {packages => old/packages}/auth/src/session.ts (100%) rename {packages => old/packages}/auth/tests/session.spec.ts (100%) rename {packages => old/packages}/auth/tests/utils/index.ts (100%) rename {packages => old/packages}/builder/CHANGELOG.md (100%) rename {packages => old/packages}/builder/README.md (100%) rename {packages => old/packages}/builder/package.json (100%) rename {packages => old/packages}/builder/src/builder.gen.ts (100%) rename {packages => old/packages}/builder/src/index.ts (100%) rename {packages => old/packages}/core/CHANGELOG.md (100%) rename {packages => old/packages}/core/package.json (100%) rename {packages => old/packages}/core/src/commons/config.ts (100%) rename {packages => old/packages}/core/src/commons/context.ts (100%) rename {packages => old/packages}/core/src/commons/index.ts (100%) rename {packages => old/packages}/core/src/commons/orchestrator.ts (100%) rename {packages => old/packages}/core/src/commons/reader.ts (100%) rename {packages => old/packages}/core/src/commons/signature.ts (100%) rename {packages => old/packages}/core/src/commons/signer.ts (100%) rename {packages => old/packages}/core/src/commons/transaction.ts (100%) rename {packages => old/packages}/core/src/commons/validateEIP1271.ts (100%) rename {packages => old/packages}/core/src/commons/validateEIP6492.ts (100%) rename {packages => old/packages}/core/src/index.ts (100%) rename {packages => old/packages}/core/src/universal/index.ts (100%) rename {packages => old/packages}/core/src/v1/config.ts (100%) rename {packages => old/packages}/core/src/v1/context.ts (100%) rename {packages => old/packages}/core/src/v1/index.ts (100%) rename {packages => old/packages}/core/src/v1/signature.ts (100%) rename {packages => old/packages}/core/src/v2/chained.ts (100%) rename {packages => old/packages}/core/src/v2/config.ts (100%) rename {packages => old/packages}/core/src/v2/context.ts (100%) rename {packages => old/packages}/core/src/v2/index.ts (100%) rename {packages => old/packages}/core/src/v2/signature.ts (100%) rename {packages => old/packages}/core/src/version.ts (100%) rename {packages => old/packages}/core/tests/v2/config.spec.ts (100%) rename {packages => old/packages}/core/tests/v2/signature.spec.ts (100%) rename {packages => old/packages}/deployer/.gitignore (100%) rename {packages => old/packages}/deployer/CHANGELOG.md (100%) rename {packages => old/packages}/deployer/README.md (100%) rename {packages => old/packages}/deployer/artifacts/contracts/NanoUniversalDeployer.sol/NanoUniversalDeployer.json (100%) rename {packages => old/packages}/deployer/artifacts/contracts/UniversalDeployer2.sol/UniversalDeployer2.json (100%) rename {packages => old/packages}/deployer/config/PROD.env.sample (100%) rename {packages => old/packages}/deployer/contracts/NanoUniversalDeployer.sol (100%) rename {packages => old/packages}/deployer/contracts/UniversalDeployer2.sol (100%) rename {packages => old/packages}/deployer/hardhat.config.ts (100%) rename {packages => old/packages}/deployer/package.json (100%) rename {packages => old/packages}/deployer/src/UniversalDeployer.ts (100%) rename {packages => old/packages}/deployer/src/constants.ts (100%) rename {packages => old/packages}/deployer/src/index.ts (100%) rename {packages => old/packages}/deployer/src/types.ts (100%) rename {packages => old/packages}/deployer/src/typings/contracts/NanoUniversalDeployer.ts (100%) rename {packages => old/packages}/deployer/src/typings/contracts/UniversalDeployer2.ts (100%) rename {packages => old/packages}/deployer/src/typings/contracts/common.ts (100%) rename {packages => old/packages}/deployer/src/typings/contracts/factories/NanoUniversalDeployer__factory.ts (100%) rename {packages => old/packages}/deployer/src/typings/contracts/factories/UniversalDeployer2__factory.ts (100%) rename {packages => old/packages}/deployer/src/typings/contracts/factories/index.ts (100%) rename {packages => old/packages}/deployer/src/typings/contracts/index.ts (100%) rename {packages => old/packages}/deployer/src/utils/configLoader.ts (100%) rename {packages => old/packages}/deployer/src/utils/logger.ts (100%) rename {packages => old/packages}/deployer/tests/mock.spec.ts (100%) rename {packages => old/packages}/guard/CHANGELOG.md (100%) rename {packages => old/packages}/guard/README.md (100%) rename {packages => old/packages}/guard/package.json (100%) rename {packages => old/packages}/guard/src/guard.gen.ts (100%) rename {packages => old/packages}/guard/src/index.ts (100%) rename {packages => old/packages}/guard/src/signer.ts (100%) rename {packages => old/packages}/indexer/CHANGELOG.md (100%) rename {packages => old/packages}/indexer/README.md (100%) rename {packages => old/packages}/indexer/package.json (100%) rename {packages => old/packages}/indexer/src/index.ts (100%) rename {packages => old/packages}/indexer/src/indexer.gen.ts (100%) rename {packages => old/packages}/indexer/src/indexergw.gen.ts (100%) rename {packages => old/packages}/marketplace/CHANGELOG.md (100%) rename {packages => old/packages}/marketplace/README.md (100%) rename {packages => old/packages}/marketplace/package.json (100%) rename {packages => old/packages}/marketplace/src/index.ts (100%) rename {packages => old/packages}/marketplace/src/marketplace.gen.ts (100%) rename {packages => old/packages}/metadata/CHANGELOG.md (100%) rename {packages => old/packages}/metadata/README.md (100%) rename {packages => old/packages}/metadata/package.json (100%) rename {packages => old/packages}/metadata/src/index.ts (100%) rename {packages => old/packages}/metadata/src/metadata.gen.ts (100%) rename {packages => old/packages}/migration/CHANGELOG.md (100%) rename {packages => old/packages}/migration/package.json (100%) rename {packages => old/packages}/migration/src/defaults.ts (100%) rename {packages => old/packages}/migration/src/index.ts (100%) rename {packages => old/packages}/migration/src/migrations/index.ts (100%) rename {packages => old/packages}/migration/src/migrations/migration_01_02.ts (100%) rename {packages => old/packages}/migration/src/migrator.ts (100%) rename {packages => old/packages}/migration/src/version.ts (100%) rename {packages => old/packages}/network/CHANGELOG.md (100%) rename {packages => old/packages}/network/README.md (100%) rename {packages => old/packages}/network/constants/package.json (100%) rename {packages => old/packages}/network/networkNames.md (100%) rename {packages => old/packages}/network/networkNames.template.md (100%) rename {packages => old/packages}/network/package.json (100%) rename {packages => old/packages}/network/src/config.ts (100%) rename {packages => old/packages}/network/src/constants.ts (100%) rename {packages => old/packages}/network/src/index.ts (100%) rename {packages => old/packages}/network/src/json-rpc-provider.ts (100%) rename {packages => old/packages}/network/src/json-rpc/handler.ts (100%) rename {packages => old/packages}/network/src/json-rpc/index.ts (100%) rename {packages => old/packages}/network/src/json-rpc/middleware/allow-provider.ts (100%) rename {packages => old/packages}/network/src/json-rpc/middleware/cached-provider.ts (100%) rename {packages => old/packages}/network/src/json-rpc/middleware/eager-provider.ts (100%) rename {packages => old/packages}/network/src/json-rpc/middleware/exception-provider.ts (100%) rename {packages => old/packages}/network/src/json-rpc/middleware/index.ts (100%) rename {packages => old/packages}/network/src/json-rpc/middleware/logging-provider.ts (100%) rename {packages => old/packages}/network/src/json-rpc/middleware/network-provider.ts (100%) rename {packages => old/packages}/network/src/json-rpc/middleware/public-provider.ts (100%) rename {packages => old/packages}/network/src/json-rpc/middleware/signing-provider.ts (100%) rename {packages => old/packages}/network/src/json-rpc/middleware/singleflight.ts (100%) rename {packages => old/packages}/network/src/json-rpc/router.ts (100%) rename {packages => old/packages}/network/src/json-rpc/types.ts (100%) rename {packages => old/packages}/network/src/json-rpc/utils.ts (100%) rename {packages => old/packages}/network/src/utils.ts (100%) rename {packages => old/packages}/provider/CHANGELOG.md (100%) rename {packages => old/packages}/provider/README.md (100%) rename {packages => old/packages}/provider/hardhat1.config.cts (100%) rename {packages => old/packages}/provider/hardhat1.config.js (100%) rename {packages => old/packages}/provider/hardhat2.config.cts (100%) rename {packages => old/packages}/provider/hardhat2.config.js (100%) rename {packages => old/packages}/provider/package.json (100%) rename {packages => old/packages}/provider/src/analytics.ts (100%) rename {packages => old/packages}/provider/src/client.ts (100%) rename {packages => old/packages}/provider/src/eip191exceptions.ts (100%) rename {packages => old/packages}/provider/src/extended.ts (100%) rename {packages => old/packages}/provider/src/index.ts (100%) rename {packages => old/packages}/provider/src/init.ts (100%) rename {packages => old/packages}/provider/src/provider.ts (100%) rename {packages => old/packages}/provider/src/signer.ts (100%) rename {packages => old/packages}/provider/src/transactions.ts (100%) rename {packages => old/packages}/provider/src/transports/base-provider-transport.ts (100%) rename {packages => old/packages}/provider/src/transports/base-wallet-transport.ts (100%) rename {packages => old/packages}/provider/src/transports/extension-transport/base-injected-transport.ts (100%) rename {packages => old/packages}/provider/src/transports/extension-transport/extension-message-handler.ts (100%) rename {packages => old/packages}/provider/src/transports/extension-transport/extension-message-provider.ts (100%) rename {packages => old/packages}/provider/src/transports/extension-transport/index.ts (100%) rename {packages => old/packages}/provider/src/transports/index.ts (100%) rename {packages => old/packages}/provider/src/transports/mux-transport/index.ts (100%) rename {packages => old/packages}/provider/src/transports/mux-transport/mux-message-provider.ts (100%) rename {packages => old/packages}/provider/src/transports/proxy-transport/index.ts (100%) rename {packages => old/packages}/provider/src/transports/proxy-transport/proxy-message-channel.ts (100%) rename {packages => old/packages}/provider/src/transports/proxy-transport/proxy-message-handler.ts (100%) rename {packages => old/packages}/provider/src/transports/proxy-transport/proxy-message-provider.ts (100%) rename {packages => old/packages}/provider/src/transports/unreal-transport/index.ts (100%) rename {packages => old/packages}/provider/src/transports/unreal-transport/overridelogs.ts (100%) rename {packages => old/packages}/provider/src/transports/unreal-transport/unreal-message-handler.ts (100%) rename {packages => old/packages}/provider/src/transports/unreal-transport/unreal-message-provider.ts (100%) rename {packages => old/packages}/provider/src/transports/wallet-request-handler.ts (100%) rename {packages => old/packages}/provider/src/transports/window-transport/index.ts (100%) rename {packages => old/packages}/provider/src/transports/window-transport/window-message-handler.ts (100%) rename {packages => old/packages}/provider/src/transports/window-transport/window-message-provider.ts (100%) rename {packages => old/packages}/provider/src/types.ts (100%) rename {packages => old/packages}/provider/src/utils.ts (100%) rename {packages => old/packages}/provider/src/utils/index.ts (100%) rename {packages => old/packages}/provider/tests/client.spec.ts (100%) rename {packages => old/packages}/provider/tests/eip191prefix.spec.ts (100%) rename {packages => old/packages}/provider/tests/messages.ts (100%) rename {packages => old/packages}/provider/tests/provider.spec.ts (100%) rename {packages => old/packages}/provider/tests/remove-eip191prefix.spec.ts (100%) rename {packages => old/packages}/provider/tests/signer.spec.ts (100%) rename {packages => old/packages}/provider/tests/transactions.spec.ts (100%) rename {packages => old/packages}/provider/tests/zeroxv3.spec.ts (100%) rename {packages => old/packages}/react-native/CHANGELOG.md (100%) rename {packages => old/packages}/react-native/package.json (100%) rename {packages => old/packages}/react-native/src/index.ts (100%) rename {packages => old/packages}/react-native/src/keychain-store.ts (100%) rename {packages => old/packages}/relayer/CHANGELOG.md (100%) rename {packages => old/packages}/relayer/README.md (100%) rename {packages => old/packages}/relayer/hardhat.config.js (100%) rename {packages => old/packages}/relayer/package.json (100%) rename {packages => old/packages}/relayer/src/index.ts (100%) rename {packages => old/packages}/relayer/src/local-relayer.ts (100%) rename {packages => old/packages}/relayer/src/provider-relayer.ts (100%) rename {packages => old/packages}/relayer/src/rpc-relayer/index.ts (100%) rename {packages => old/packages}/relayer/src/rpc-relayer/relayer.gen.ts (100%) rename {packages => old/packages}/relayer/tests/provider-relayer.spec.ts (100%) rename {packages => old/packages}/replacer/CHANGELOG.md (100%) rename {packages => old/packages}/replacer/package.json (100%) rename {packages => old/packages}/replacer/src/cached.ts (100%) rename {packages => old/packages}/replacer/src/index.ts (100%) rename {packages => old/packages}/replacer/src/ipfs.ts (100%) rename {packages => old/packages}/sessions/CHANGELOG.md (100%) rename {packages => old/packages}/sessions/hardhat.config.js (100%) rename {packages => old/packages}/sessions/package.json (100%) rename {packages => old/packages}/sessions/src/index.ts (100%) rename {packages => old/packages}/sessions/src/tracker.ts (100%) rename {packages => old/packages}/sessions/src/trackers/arweave.ts (100%) rename {packages => old/packages}/sessions/src/trackers/cached.ts (100%) rename {packages => old/packages}/sessions/src/trackers/debug.ts (100%) rename {packages => old/packages}/sessions/src/trackers/deduped.ts (100%) rename {packages => old/packages}/sessions/src/trackers/index.ts (100%) rename {packages => old/packages}/sessions/src/trackers/local.ts (100%) rename {packages => old/packages}/sessions/src/trackers/multiple.ts (100%) rename {packages => old/packages}/sessions/src/trackers/promise-cache.ts (100%) rename {packages => old/packages}/sessions/src/trackers/remote/index.ts (100%) rename {packages => old/packages}/sessions/src/trackers/remote/sessions.gen.ts (100%) rename {packages => old/packages}/sessions/src/trackers/stores/index.ts (100%) rename {packages => old/packages}/sessions/src/trackers/stores/indexedDBStore.ts (100%) rename {packages => old/packages}/sessions/src/trackers/stores/memoryStore.ts (100%) rename {packages => old/packages}/sessions/tests/arweave.spec.ts (100%) rename {packages => old/packages}/sessions/tests/local.spec.ts (100%) rename {packages => old/packages}/signhub/CHANGELOG.md (100%) rename {packages => old/packages}/signhub/package.json (100%) rename {packages => old/packages}/signhub/src/index.ts (100%) rename {packages => old/packages}/signhub/src/orchestrator.ts (100%) rename {packages => old/packages}/signhub/src/signers/index.ts (100%) rename {packages => old/packages}/signhub/src/signers/signer.ts (100%) rename {packages => old/packages}/signhub/src/signers/wrapper.ts (100%) rename {packages => old/packages}/signhub/tests/orchestrator.spec.ts (100%) rename {packages => old/packages}/tests/CHANGELOG.md (100%) rename {packages => old/packages}/tests/package.json (100%) rename {packages => old/packages}/tests/src/builds/artifact.ts (100%) rename {packages => old/packages}/tests/src/builds/index.ts (100%) rename {packages => old/packages}/tests/src/builds/v1/artifacts/Factory.ts (100%) rename {packages => old/packages}/tests/src/builds/v1/artifacts/GuestModule.ts (100%) rename {packages => old/packages}/tests/src/builds/v1/artifacts/MainModule.ts (100%) rename {packages => old/packages}/tests/src/builds/v1/artifacts/MainModuleUpgradable.ts (100%) rename {packages => old/packages}/tests/src/builds/v1/artifacts/MultiCallUtils.ts (100%) rename {packages => old/packages}/tests/src/builds/v1/artifacts/SequenceUtils.ts (100%) rename {packages => old/packages}/tests/src/builds/v1/index.ts (100%) rename {packages => old/packages}/tests/src/builds/v2/artifacts/Factory.ts (100%) rename {packages => old/packages}/tests/src/builds/v2/artifacts/GuestModule.ts (100%) rename {packages => old/packages}/tests/src/builds/v2/artifacts/MainModule.ts (100%) rename {packages => old/packages}/tests/src/builds/v2/artifacts/MainModuleUpgradable.ts (100%) rename {packages => old/packages}/tests/src/builds/v2/artifacts/UniversalSigValidator.ts (100%) rename {packages => old/packages}/tests/src/builds/v2/index.ts (100%) rename {packages => old/packages}/tests/src/configs/index.ts (100%) rename {packages => old/packages}/tests/src/configs/random.ts (100%) rename {packages => old/packages}/tests/src/context/index.ts (100%) rename {packages => old/packages}/tests/src/context/v1.ts (100%) rename {packages => old/packages}/tests/src/context/v2.ts (100%) rename {packages => old/packages}/tests/src/index.ts (100%) rename {packages => old/packages}/tests/src/networks.ts (100%) rename {packages => old/packages}/tests/src/singletonFactory.ts (100%) rename {packages => old/packages}/tests/src/tokens/erc20.ts (100%) rename {packages => old/packages}/tests/src/utils.ts (100%) rename {packages => old/packages}/utils/CHANGELOG.md (100%) rename {packages => old/packages}/utils/README.md (100%) rename {packages => old/packages}/utils/package.json (100%) rename {packages => old/packages}/utils/src/access-key.ts (100%) rename {packages => old/packages}/utils/src/base64.ts (100%) rename {packages => old/packages}/utils/src/bigint.ts (100%) rename {packages => old/packages}/utils/src/digest.ts (100%) rename {packages => old/packages}/utils/src/index.ts (100%) rename {packages => old/packages}/utils/src/is-node-or-browser.ts (100%) rename {packages => old/packages}/utils/src/jwt-decode.ts (100%) rename {packages => old/packages}/utils/src/logger.ts (100%) rename {packages => old/packages}/utils/src/merkle.ts (100%) rename {packages => old/packages}/utils/src/merkletree/Base.ts (100%) rename {packages => old/packages}/utils/src/merkletree/MerkleTree.ts (100%) rename {packages => old/packages}/utils/src/merkletree/README.md (100%) rename {packages => old/packages}/utils/src/merkletree/index.ts (100%) rename {packages => old/packages}/utils/src/network.ts (100%) rename {packages => old/packages}/utils/src/promise-cache.ts (100%) rename {packages => old/packages}/utils/src/promisify.ts (100%) rename {packages => old/packages}/utils/src/query-string.ts (100%) rename {packages => old/packages}/utils/src/rand.ts (100%) rename {packages => old/packages}/utils/src/sanitize.ts (100%) rename {packages => old/packages}/utils/src/sleep.ts (100%) rename {packages => old/packages}/utils/src/typed-data.ts (100%) rename {packages => old/packages}/utils/src/types.ts (100%) rename {packages => old/packages}/utils/src/web.ts (100%) rename {packages => old/packages}/utils/tests/access-key.spec.ts (100%) rename {packages => old/packages}/utils/tests/base64.spec.ts (100%) rename {packages => old/packages}/utils/tests/bigint.spec.ts (100%) rename {packages => old/packages}/utils/tests/jwt-decode.spec.ts (100%) rename {packages => old/packages}/utils/tests/merkle.spec.ts (100%) rename {packages => old/packages}/utils/tests/query-string.spec.ts (100%) rename {packages => old/packages}/utils/tests/sanitize.spec.ts (100%) rename {packages => old/packages}/waas-ethers/CHANGELOG.md (100%) rename {packages => old/packages}/waas-ethers/README.md (100%) rename {packages => old/packages}/waas-ethers/package.json (100%) rename {packages => old/packages}/waas-ethers/src/index.ts (100%) rename {packages => old/packages}/waas-ethers/src/signer.ts (100%) rename {packages => old/packages}/waas/CHANGELOG.md (100%) rename {packages => old/packages}/waas/README.md (100%) rename {packages => old/packages}/waas/package.json (100%) rename {packages => old/packages}/waas/src/auth.ts (100%) rename {packages => old/packages}/waas/src/base.ts (100%) rename {packages => old/packages}/waas/src/challenge.ts (100%) rename {packages => old/packages}/waas/src/clients/authenticator.gen.ts (100%) rename {packages => old/packages}/waas/src/clients/intent.gen.ts (100%) rename {packages => old/packages}/waas/src/email.ts (100%) rename {packages => old/packages}/waas/src/errors.ts (100%) rename {packages => old/packages}/waas/src/index.ts (100%) rename {packages => old/packages}/waas/src/intents/accounts.ts (100%) rename {packages => old/packages}/waas/src/intents/base.ts (100%) rename {packages => old/packages}/waas/src/intents/index.ts (100%) rename {packages => old/packages}/waas/src/intents/messages.ts (100%) rename {packages => old/packages}/waas/src/intents/responses.ts (100%) rename {packages => old/packages}/waas/src/intents/session.ts (100%) rename {packages => old/packages}/waas/src/intents/transactions.ts (100%) rename {packages => old/packages}/waas/src/intents/utils.ts (100%) rename {packages => old/packages}/waas/src/networks.ts (100%) rename {packages => old/packages}/waas/src/secure-store.ts (100%) rename {packages => old/packages}/waas/src/session/index.ts (100%) rename {packages => old/packages}/waas/src/session/keyTypes.ts (100%) rename {packages => old/packages}/waas/src/session/secp256k1.ts (100%) rename {packages => old/packages}/waas/src/session/secp256r1.ts (100%) rename {packages => old/packages}/waas/src/store.ts (100%) rename {packages => old/packages}/waas/src/subtle-crypto.ts (100%) rename {packages => old/packages}/waas/tests/intents.spec.ts (100%) rename {packages => old/packages}/wallet/CHANGELOG.md (100%) rename {packages => old/packages}/wallet/README.md (100%) rename {packages => old/packages}/wallet/hardhat.config.js (100%) rename {packages => old/packages}/wallet/hardhat2.config.js (100%) rename {packages => old/packages}/wallet/package.json (100%) rename {packages => old/packages}/wallet/src/index.ts (100%) rename {packages => old/packages}/wallet/src/orchestrator/wrapper.ts (100%) rename {packages => old/packages}/wallet/src/signer.ts (100%) rename {packages => old/packages}/wallet/src/utils.ts (100%) rename {packages => old/packages}/wallet/src/wallet.ts (100%) rename {packages => old/packages}/wallet/tests/utils/deploy-wallet-context.ts (100%) rename {packages => old/packages}/wallet/tests/utils/get-contract.ts (100%) rename {packages => old/packages}/wallet/tests/utils/index.ts (100%) rename {packages => old/packages}/wallet/tests/wallet.spec.ts (100%) rename pnpm-lock.yaml => old/pnpm-lock.yaml (100%) rename pnpm-workspace.yaml => old/pnpm-workspace.yaml (100%) rename {scripts => old/scripts}/fix-mocha-ref.js (100%) rename {scripts => old/scripts}/pnpm-link.sh (100%) rename {scripts => old/scripts}/update-network-names-doc.ts (100%) rename {scripts => old/scripts}/update-version.js (100%) rename tsconfig.json => old/tsconfig.json (100%) rename tsconfig.test.json => old/tsconfig.test.json (100%) diff --git a/.changeset/README.md b/old/.changeset/README.md similarity index 100% rename from .changeset/README.md rename to old/.changeset/README.md diff --git a/.changeset/config.json b/old/.changeset/config.json similarity index 100% rename from .changeset/config.json rename to old/.changeset/config.json diff --git a/.eslintignore b/old/.eslintignore similarity index 100% rename from .eslintignore rename to old/.eslintignore diff --git a/.eslintrc.js b/old/.eslintrc.js similarity index 100% rename from .eslintrc.js rename to old/.eslintrc.js diff --git a/.gitignore b/old/.gitignore similarity index 100% rename from .gitignore rename to old/.gitignore diff --git a/.prettierrc b/old/.prettierrc similarity index 100% rename from .prettierrc rename to old/.prettierrc diff --git a/LICENSE b/old/LICENSE similarity index 100% rename from LICENSE rename to old/LICENSE diff --git a/README.md b/old/README.md similarity index 100% rename from README.md rename to old/README.md diff --git a/babel.config.js b/old/babel.config.js similarity index 100% rename from babel.config.js rename to old/babel.config.js diff --git a/package.json b/old/package.json similarity index 100% rename from package.json rename to old/package.json diff --git a/packages/0xsequence/CHANGELOG.md b/old/packages/0xsequence/CHANGELOG.md similarity index 100% rename from packages/0xsequence/CHANGELOG.md rename to old/packages/0xsequence/CHANGELOG.md diff --git a/packages/0xsequence/README.md b/old/packages/0xsequence/README.md similarity index 100% rename from packages/0xsequence/README.md rename to old/packages/0xsequence/README.md diff --git a/packages/0xsequence/hardhat.config.js b/old/packages/0xsequence/hardhat.config.js similarity index 100% rename from packages/0xsequence/hardhat.config.js rename to old/packages/0xsequence/hardhat.config.js diff --git a/packages/0xsequence/hardhat2.config.js b/old/packages/0xsequence/hardhat2.config.js similarity index 100% rename from packages/0xsequence/hardhat2.config.js rename to old/packages/0xsequence/hardhat2.config.js diff --git a/packages/0xsequence/package.json b/old/packages/0xsequence/package.json similarity index 100% rename from packages/0xsequence/package.json rename to old/packages/0xsequence/package.json diff --git a/packages/0xsequence/src/abi.ts b/old/packages/0xsequence/src/abi.ts similarity index 100% rename from packages/0xsequence/src/abi.ts rename to old/packages/0xsequence/src/abi.ts diff --git a/packages/0xsequence/src/account.ts b/old/packages/0xsequence/src/account.ts similarity index 100% rename from packages/0xsequence/src/account.ts rename to old/packages/0xsequence/src/account.ts diff --git a/packages/0xsequence/src/api.ts b/old/packages/0xsequence/src/api.ts similarity index 100% rename from packages/0xsequence/src/api.ts rename to old/packages/0xsequence/src/api.ts diff --git a/packages/0xsequence/src/auth.ts b/old/packages/0xsequence/src/auth.ts similarity index 100% rename from packages/0xsequence/src/auth.ts rename to old/packages/0xsequence/src/auth.ts diff --git a/packages/0xsequence/src/core.ts b/old/packages/0xsequence/src/core.ts similarity index 100% rename from packages/0xsequence/src/core.ts rename to old/packages/0xsequence/src/core.ts diff --git a/packages/0xsequence/src/guard.ts b/old/packages/0xsequence/src/guard.ts similarity index 100% rename from packages/0xsequence/src/guard.ts rename to old/packages/0xsequence/src/guard.ts diff --git a/packages/0xsequence/src/index.ts b/old/packages/0xsequence/src/index.ts similarity index 100% rename from packages/0xsequence/src/index.ts rename to old/packages/0xsequence/src/index.ts diff --git a/packages/0xsequence/src/indexer.ts b/old/packages/0xsequence/src/indexer.ts similarity index 100% rename from packages/0xsequence/src/indexer.ts rename to old/packages/0xsequence/src/indexer.ts diff --git a/packages/0xsequence/src/metadata.ts b/old/packages/0xsequence/src/metadata.ts similarity index 100% rename from packages/0xsequence/src/metadata.ts rename to old/packages/0xsequence/src/metadata.ts diff --git a/packages/0xsequence/src/migration.ts b/old/packages/0xsequence/src/migration.ts similarity index 100% rename from packages/0xsequence/src/migration.ts rename to old/packages/0xsequence/src/migration.ts diff --git a/packages/0xsequence/src/network.ts b/old/packages/0xsequence/src/network.ts similarity index 100% rename from packages/0xsequence/src/network.ts rename to old/packages/0xsequence/src/network.ts diff --git a/packages/0xsequence/src/provider.ts b/old/packages/0xsequence/src/provider.ts similarity index 100% rename from packages/0xsequence/src/provider.ts rename to old/packages/0xsequence/src/provider.ts diff --git a/packages/0xsequence/src/relayer.ts b/old/packages/0xsequence/src/relayer.ts similarity index 100% rename from packages/0xsequence/src/relayer.ts rename to old/packages/0xsequence/src/relayer.ts diff --git a/packages/0xsequence/src/sequence.ts b/old/packages/0xsequence/src/sequence.ts similarity index 100% rename from packages/0xsequence/src/sequence.ts rename to old/packages/0xsequence/src/sequence.ts diff --git a/packages/0xsequence/src/sessions.ts b/old/packages/0xsequence/src/sessions.ts similarity index 100% rename from packages/0xsequence/src/sessions.ts rename to old/packages/0xsequence/src/sessions.ts diff --git a/packages/0xsequence/src/signhub.ts b/old/packages/0xsequence/src/signhub.ts similarity index 100% rename from packages/0xsequence/src/signhub.ts rename to old/packages/0xsequence/src/signhub.ts diff --git a/packages/0xsequence/src/transactions.ts b/old/packages/0xsequence/src/transactions.ts similarity index 100% rename from packages/0xsequence/src/transactions.ts rename to old/packages/0xsequence/src/transactions.ts diff --git a/packages/0xsequence/src/utils.ts b/old/packages/0xsequence/src/utils.ts similarity index 100% rename from packages/0xsequence/src/utils.ts rename to old/packages/0xsequence/src/utils.ts diff --git a/packages/0xsequence/tests/browser/json-rpc-provider/rpc.test.ts b/old/packages/0xsequence/tests/browser/json-rpc-provider/rpc.test.ts similarity index 100% rename from packages/0xsequence/tests/browser/json-rpc-provider/rpc.test.ts rename to old/packages/0xsequence/tests/browser/json-rpc-provider/rpc.test.ts diff --git a/packages/0xsequence/tests/browser/mock-wallet/mock-wallet.test.ts b/old/packages/0xsequence/tests/browser/mock-wallet/mock-wallet.test.ts similarity index 100% rename from packages/0xsequence/tests/browser/mock-wallet/mock-wallet.test.ts rename to old/packages/0xsequence/tests/browser/mock-wallet/mock-wallet.test.ts diff --git a/packages/0xsequence/tests/browser/mux-transport/mux.test.ts b/old/packages/0xsequence/tests/browser/mux-transport/mux.test.ts similarity index 100% rename from packages/0xsequence/tests/browser/mux-transport/mux.test.ts rename to old/packages/0xsequence/tests/browser/mux-transport/mux.test.ts diff --git a/packages/0xsequence/tests/browser/proxy-transport/channel.test.ts b/old/packages/0xsequence/tests/browser/proxy-transport/channel.test.ts similarity index 100% rename from packages/0xsequence/tests/browser/proxy-transport/channel.test.ts rename to old/packages/0xsequence/tests/browser/proxy-transport/channel.test.ts diff --git a/packages/0xsequence/tests/browser/testutils/accounts.ts b/old/packages/0xsequence/tests/browser/testutils/accounts.ts similarity index 100% rename from packages/0xsequence/tests/browser/testutils/accounts.ts rename to old/packages/0xsequence/tests/browser/testutils/accounts.ts diff --git a/packages/0xsequence/tests/browser/testutils/deploy-wallet-context.ts b/old/packages/0xsequence/tests/browser/testutils/deploy-wallet-context.ts similarity index 100% rename from packages/0xsequence/tests/browser/testutils/deploy-wallet-context.ts rename to old/packages/0xsequence/tests/browser/testutils/deploy-wallet-context.ts diff --git a/packages/0xsequence/tests/browser/testutils/index.ts b/old/packages/0xsequence/tests/browser/testutils/index.ts similarity index 100% rename from packages/0xsequence/tests/browser/testutils/index.ts rename to old/packages/0xsequence/tests/browser/testutils/index.ts diff --git a/packages/0xsequence/tests/browser/testutils/wallet.ts b/old/packages/0xsequence/tests/browser/testutils/wallet.ts similarity index 100% rename from packages/0xsequence/tests/browser/testutils/wallet.ts rename to old/packages/0xsequence/tests/browser/testutils/wallet.ts diff --git a/packages/0xsequence/tests/browser/wallet-provider/dapp.test.ts b/old/packages/0xsequence/tests/browser/wallet-provider/dapp.test.ts similarity index 100% rename from packages/0xsequence/tests/browser/wallet-provider/dapp.test.ts rename to old/packages/0xsequence/tests/browser/wallet-provider/dapp.test.ts diff --git a/packages/0xsequence/tests/browser/wallet-provider/dapp2.test.ts b/old/packages/0xsequence/tests/browser/wallet-provider/dapp2.test.ts similarity index 100% rename from packages/0xsequence/tests/browser/wallet-provider/dapp2.test.ts rename to old/packages/0xsequence/tests/browser/wallet-provider/dapp2.test.ts diff --git a/packages/0xsequence/tests/browser/window-transport/dapp.test.ts b/old/packages/0xsequence/tests/browser/window-transport/dapp.test.ts similarity index 100% rename from packages/0xsequence/tests/browser/window-transport/dapp.test.ts rename to old/packages/0xsequence/tests/browser/window-transport/dapp.test.ts diff --git a/packages/0xsequence/tests/json-rpc-provider.spec.ts b/old/packages/0xsequence/tests/json-rpc-provider.spec.ts similarity index 100% rename from packages/0xsequence/tests/json-rpc-provider.spec.ts rename to old/packages/0xsequence/tests/json-rpc-provider.spec.ts diff --git a/packages/0xsequence/tests/mock-wallet.spec.ts b/old/packages/0xsequence/tests/mock-wallet.spec.ts similarity index 100% rename from packages/0xsequence/tests/mock-wallet.spec.ts rename to old/packages/0xsequence/tests/mock-wallet.spec.ts diff --git a/packages/0xsequence/tests/mux-transport.spec.ts b/old/packages/0xsequence/tests/mux-transport.spec.ts similarity index 100% rename from packages/0xsequence/tests/mux-transport.spec.ts rename to old/packages/0xsequence/tests/mux-transport.spec.ts diff --git a/packages/0xsequence/tests/proxy-transport.spec.ts b/old/packages/0xsequence/tests/proxy-transport.spec.ts similarity index 100% rename from packages/0xsequence/tests/proxy-transport.spec.ts rename to old/packages/0xsequence/tests/proxy-transport.spec.ts diff --git a/packages/0xsequence/tests/utils/assert.ts b/old/packages/0xsequence/tests/utils/assert.ts similarity index 100% rename from packages/0xsequence/tests/utils/assert.ts rename to old/packages/0xsequence/tests/utils/assert.ts diff --git a/packages/0xsequence/tests/utils/browser-test-runner.ts b/old/packages/0xsequence/tests/utils/browser-test-runner.ts similarity index 100% rename from packages/0xsequence/tests/utils/browser-test-runner.ts rename to old/packages/0xsequence/tests/utils/browser-test-runner.ts diff --git a/packages/0xsequence/tests/utils/webpack-test-server.ts b/old/packages/0xsequence/tests/utils/webpack-test-server.ts similarity index 100% rename from packages/0xsequence/tests/utils/webpack-test-server.ts rename to old/packages/0xsequence/tests/utils/webpack-test-server.ts diff --git a/packages/0xsequence/tests/wallet-provider.spec.ts b/old/packages/0xsequence/tests/wallet-provider.spec.ts similarity index 100% rename from packages/0xsequence/tests/wallet-provider.spec.ts rename to old/packages/0xsequence/tests/wallet-provider.spec.ts diff --git a/packages/0xsequence/tests/webpack.config.js b/old/packages/0xsequence/tests/webpack.config.js similarity index 100% rename from packages/0xsequence/tests/webpack.config.js rename to old/packages/0xsequence/tests/webpack.config.js diff --git a/packages/0xsequence/tests/window-transport.spec.ts b/old/packages/0xsequence/tests/window-transport.spec.ts similarity index 100% rename from packages/0xsequence/tests/window-transport.spec.ts rename to old/packages/0xsequence/tests/window-transport.spec.ts diff --git a/packages/abi/CHANGELOG.md b/old/packages/abi/CHANGELOG.md similarity index 100% rename from packages/abi/CHANGELOG.md rename to old/packages/abi/CHANGELOG.md diff --git a/packages/abi/README.md b/old/packages/abi/README.md similarity index 100% rename from packages/abi/README.md rename to old/packages/abi/README.md diff --git a/packages/abi/package.json b/old/packages/abi/package.json similarity index 100% rename from packages/abi/package.json rename to old/packages/abi/package.json diff --git a/packages/abi/src/index.ts b/old/packages/abi/src/index.ts similarity index 100% rename from packages/abi/src/index.ts rename to old/packages/abi/src/index.ts diff --git a/packages/abi/src/sale/erc1155Sale.ts b/old/packages/abi/src/sale/erc1155Sale.ts similarity index 100% rename from packages/abi/src/sale/erc1155Sale.ts rename to old/packages/abi/src/sale/erc1155Sale.ts diff --git a/packages/abi/src/sale/erc721Sale.ts b/old/packages/abi/src/sale/erc721Sale.ts similarity index 100% rename from packages/abi/src/sale/erc721Sale.ts rename to old/packages/abi/src/sale/erc721Sale.ts diff --git a/packages/abi/src/saleItems/erc1155SaleItems.ts b/old/packages/abi/src/saleItems/erc1155SaleItems.ts similarity index 100% rename from packages/abi/src/saleItems/erc1155SaleItems.ts rename to old/packages/abi/src/saleItems/erc1155SaleItems.ts diff --git a/packages/abi/src/saleItems/erc721SaleItems.ts b/old/packages/abi/src/saleItems/erc721SaleItems.ts similarity index 100% rename from packages/abi/src/saleItems/erc721SaleItems.ts rename to old/packages/abi/src/saleItems/erc721SaleItems.ts diff --git a/packages/abi/src/tokens/erc1155.ts b/old/packages/abi/src/tokens/erc1155.ts similarity index 100% rename from packages/abi/src/tokens/erc1155.ts rename to old/packages/abi/src/tokens/erc1155.ts diff --git a/packages/abi/src/tokens/erc20.ts b/old/packages/abi/src/tokens/erc20.ts similarity index 100% rename from packages/abi/src/tokens/erc20.ts rename to old/packages/abi/src/tokens/erc20.ts diff --git a/packages/abi/src/tokens/erc6909.ts b/old/packages/abi/src/tokens/erc6909.ts similarity index 100% rename from packages/abi/src/tokens/erc6909.ts rename to old/packages/abi/src/tokens/erc6909.ts diff --git a/packages/abi/src/tokens/erc721.ts b/old/packages/abi/src/tokens/erc721.ts similarity index 100% rename from packages/abi/src/tokens/erc721.ts rename to old/packages/abi/src/tokens/erc721.ts diff --git a/packages/abi/src/wallet/erc1271.ts b/old/packages/abi/src/wallet/erc1271.ts similarity index 100% rename from packages/abi/src/wallet/erc1271.ts rename to old/packages/abi/src/wallet/erc1271.ts diff --git a/packages/abi/src/wallet/erc5719.ts b/old/packages/abi/src/wallet/erc5719.ts similarity index 100% rename from packages/abi/src/wallet/erc5719.ts rename to old/packages/abi/src/wallet/erc5719.ts diff --git a/packages/abi/src/wallet/erc6492.ts b/old/packages/abi/src/wallet/erc6492.ts similarity index 100% rename from packages/abi/src/wallet/erc6492.ts rename to old/packages/abi/src/wallet/erc6492.ts diff --git a/packages/abi/src/wallet/factory.ts b/old/packages/abi/src/wallet/factory.ts similarity index 100% rename from packages/abi/src/wallet/factory.ts rename to old/packages/abi/src/wallet/factory.ts diff --git a/packages/abi/src/wallet/index.ts b/old/packages/abi/src/wallet/index.ts similarity index 100% rename from packages/abi/src/wallet/index.ts rename to old/packages/abi/src/wallet/index.ts diff --git a/packages/abi/src/wallet/libs/requireFreshSigners.ts b/old/packages/abi/src/wallet/libs/requireFreshSigners.ts similarity index 100% rename from packages/abi/src/wallet/libs/requireFreshSigners.ts rename to old/packages/abi/src/wallet/libs/requireFreshSigners.ts diff --git a/packages/abi/src/wallet/mainModule.ts b/old/packages/abi/src/wallet/mainModule.ts similarity index 100% rename from packages/abi/src/wallet/mainModule.ts rename to old/packages/abi/src/wallet/mainModule.ts diff --git a/packages/abi/src/wallet/mainModuleUpgradable.ts b/old/packages/abi/src/wallet/mainModuleUpgradable.ts similarity index 100% rename from packages/abi/src/wallet/mainModuleUpgradable.ts rename to old/packages/abi/src/wallet/mainModuleUpgradable.ts diff --git a/packages/abi/src/wallet/moduleHooks.ts b/old/packages/abi/src/wallet/moduleHooks.ts similarity index 100% rename from packages/abi/src/wallet/moduleHooks.ts rename to old/packages/abi/src/wallet/moduleHooks.ts diff --git a/packages/abi/src/wallet/sequenceUtils.ts b/old/packages/abi/src/wallet/sequenceUtils.ts similarity index 100% rename from packages/abi/src/wallet/sequenceUtils.ts rename to old/packages/abi/src/wallet/sequenceUtils.ts diff --git a/packages/abi/src/wallet/walletProxyHook.ts b/old/packages/abi/src/wallet/walletProxyHook.ts similarity index 100% rename from packages/abi/src/wallet/walletProxyHook.ts rename to old/packages/abi/src/wallet/walletProxyHook.ts diff --git a/packages/account/CHANGELOG.md b/old/packages/account/CHANGELOG.md similarity index 100% rename from packages/account/CHANGELOG.md rename to old/packages/account/CHANGELOG.md diff --git a/packages/account/hardhat.config.js b/old/packages/account/hardhat.config.js similarity index 100% rename from packages/account/hardhat.config.js rename to old/packages/account/hardhat.config.js diff --git a/packages/account/hardhat2.config.js b/old/packages/account/hardhat2.config.js similarity index 100% rename from packages/account/hardhat2.config.js rename to old/packages/account/hardhat2.config.js diff --git a/packages/account/package.json b/old/packages/account/package.json similarity index 100% rename from packages/account/package.json rename to old/packages/account/package.json diff --git a/packages/account/src/account.ts b/old/packages/account/src/account.ts similarity index 100% rename from packages/account/src/account.ts rename to old/packages/account/src/account.ts diff --git a/packages/account/src/index.ts b/old/packages/account/src/index.ts similarity index 100% rename from packages/account/src/index.ts rename to old/packages/account/src/index.ts diff --git a/packages/account/src/orchestrator/wrapper.ts b/old/packages/account/src/orchestrator/wrapper.ts similarity index 100% rename from packages/account/src/orchestrator/wrapper.ts rename to old/packages/account/src/orchestrator/wrapper.ts diff --git a/packages/account/src/signer.ts b/old/packages/account/src/signer.ts similarity index 100% rename from packages/account/src/signer.ts rename to old/packages/account/src/signer.ts diff --git a/packages/account/tests/account.spec.ts b/old/packages/account/tests/account.spec.ts similarity index 100% rename from packages/account/tests/account.spec.ts rename to old/packages/account/tests/account.spec.ts diff --git a/packages/account/tests/signer.spec.ts b/old/packages/account/tests/signer.spec.ts similarity index 100% rename from packages/account/tests/signer.spec.ts rename to old/packages/account/tests/signer.spec.ts diff --git a/packages/api/CHANGELOG.md b/old/packages/api/CHANGELOG.md similarity index 100% rename from packages/api/CHANGELOG.md rename to old/packages/api/CHANGELOG.md diff --git a/packages/api/README.md b/old/packages/api/README.md similarity index 100% rename from packages/api/README.md rename to old/packages/api/README.md diff --git a/packages/api/package.json b/old/packages/api/package.json similarity index 100% rename from packages/api/package.json rename to old/packages/api/package.json diff --git a/packages/api/src/api.gen.ts b/old/packages/api/src/api.gen.ts similarity index 100% rename from packages/api/src/api.gen.ts rename to old/packages/api/src/api.gen.ts diff --git a/packages/api/src/index.ts b/old/packages/api/src/index.ts similarity index 100% rename from packages/api/src/index.ts rename to old/packages/api/src/index.ts diff --git a/packages/auth/CHANGELOG.md b/old/packages/auth/CHANGELOG.md similarity index 100% rename from packages/auth/CHANGELOG.md rename to old/packages/auth/CHANGELOG.md diff --git a/packages/auth/README.md b/old/packages/auth/README.md similarity index 100% rename from packages/auth/README.md rename to old/packages/auth/README.md diff --git a/packages/auth/hardhat.config.js b/old/packages/auth/hardhat.config.js similarity index 100% rename from packages/auth/hardhat.config.js rename to old/packages/auth/hardhat.config.js diff --git a/packages/auth/package.json b/old/packages/auth/package.json similarity index 100% rename from packages/auth/package.json rename to old/packages/auth/package.json diff --git a/packages/auth/src/authorization.ts b/old/packages/auth/src/authorization.ts similarity index 100% rename from packages/auth/src/authorization.ts rename to old/packages/auth/src/authorization.ts diff --git a/packages/auth/src/index.ts b/old/packages/auth/src/index.ts similarity index 100% rename from packages/auth/src/index.ts rename to old/packages/auth/src/index.ts diff --git a/packages/auth/src/proof.ts b/old/packages/auth/src/proof.ts similarity index 100% rename from packages/auth/src/proof.ts rename to old/packages/auth/src/proof.ts diff --git a/packages/auth/src/services.ts b/old/packages/auth/src/services.ts similarity index 100% rename from packages/auth/src/services.ts rename to old/packages/auth/src/services.ts diff --git a/packages/auth/src/session.ts b/old/packages/auth/src/session.ts similarity index 100% rename from packages/auth/src/session.ts rename to old/packages/auth/src/session.ts diff --git a/packages/auth/tests/session.spec.ts b/old/packages/auth/tests/session.spec.ts similarity index 100% rename from packages/auth/tests/session.spec.ts rename to old/packages/auth/tests/session.spec.ts diff --git a/packages/auth/tests/utils/index.ts b/old/packages/auth/tests/utils/index.ts similarity index 100% rename from packages/auth/tests/utils/index.ts rename to old/packages/auth/tests/utils/index.ts diff --git a/packages/builder/CHANGELOG.md b/old/packages/builder/CHANGELOG.md similarity index 100% rename from packages/builder/CHANGELOG.md rename to old/packages/builder/CHANGELOG.md diff --git a/packages/builder/README.md b/old/packages/builder/README.md similarity index 100% rename from packages/builder/README.md rename to old/packages/builder/README.md diff --git a/packages/builder/package.json b/old/packages/builder/package.json similarity index 100% rename from packages/builder/package.json rename to old/packages/builder/package.json diff --git a/packages/builder/src/builder.gen.ts b/old/packages/builder/src/builder.gen.ts similarity index 100% rename from packages/builder/src/builder.gen.ts rename to old/packages/builder/src/builder.gen.ts diff --git a/packages/builder/src/index.ts b/old/packages/builder/src/index.ts similarity index 100% rename from packages/builder/src/index.ts rename to old/packages/builder/src/index.ts diff --git a/packages/core/CHANGELOG.md b/old/packages/core/CHANGELOG.md similarity index 100% rename from packages/core/CHANGELOG.md rename to old/packages/core/CHANGELOG.md diff --git a/packages/core/package.json b/old/packages/core/package.json similarity index 100% rename from packages/core/package.json rename to old/packages/core/package.json diff --git a/packages/core/src/commons/config.ts b/old/packages/core/src/commons/config.ts similarity index 100% rename from packages/core/src/commons/config.ts rename to old/packages/core/src/commons/config.ts diff --git a/packages/core/src/commons/context.ts b/old/packages/core/src/commons/context.ts similarity index 100% rename from packages/core/src/commons/context.ts rename to old/packages/core/src/commons/context.ts diff --git a/packages/core/src/commons/index.ts b/old/packages/core/src/commons/index.ts similarity index 100% rename from packages/core/src/commons/index.ts rename to old/packages/core/src/commons/index.ts diff --git a/packages/core/src/commons/orchestrator.ts b/old/packages/core/src/commons/orchestrator.ts similarity index 100% rename from packages/core/src/commons/orchestrator.ts rename to old/packages/core/src/commons/orchestrator.ts diff --git a/packages/core/src/commons/reader.ts b/old/packages/core/src/commons/reader.ts similarity index 100% rename from packages/core/src/commons/reader.ts rename to old/packages/core/src/commons/reader.ts diff --git a/packages/core/src/commons/signature.ts b/old/packages/core/src/commons/signature.ts similarity index 100% rename from packages/core/src/commons/signature.ts rename to old/packages/core/src/commons/signature.ts diff --git a/packages/core/src/commons/signer.ts b/old/packages/core/src/commons/signer.ts similarity index 100% rename from packages/core/src/commons/signer.ts rename to old/packages/core/src/commons/signer.ts diff --git a/packages/core/src/commons/transaction.ts b/old/packages/core/src/commons/transaction.ts similarity index 100% rename from packages/core/src/commons/transaction.ts rename to old/packages/core/src/commons/transaction.ts diff --git a/packages/core/src/commons/validateEIP1271.ts b/old/packages/core/src/commons/validateEIP1271.ts similarity index 100% rename from packages/core/src/commons/validateEIP1271.ts rename to old/packages/core/src/commons/validateEIP1271.ts diff --git a/packages/core/src/commons/validateEIP6492.ts b/old/packages/core/src/commons/validateEIP6492.ts similarity index 100% rename from packages/core/src/commons/validateEIP6492.ts rename to old/packages/core/src/commons/validateEIP6492.ts diff --git a/packages/core/src/index.ts b/old/packages/core/src/index.ts similarity index 100% rename from packages/core/src/index.ts rename to old/packages/core/src/index.ts diff --git a/packages/core/src/universal/index.ts b/old/packages/core/src/universal/index.ts similarity index 100% rename from packages/core/src/universal/index.ts rename to old/packages/core/src/universal/index.ts diff --git a/packages/core/src/v1/config.ts b/old/packages/core/src/v1/config.ts similarity index 100% rename from packages/core/src/v1/config.ts rename to old/packages/core/src/v1/config.ts diff --git a/packages/core/src/v1/context.ts b/old/packages/core/src/v1/context.ts similarity index 100% rename from packages/core/src/v1/context.ts rename to old/packages/core/src/v1/context.ts diff --git a/packages/core/src/v1/index.ts b/old/packages/core/src/v1/index.ts similarity index 100% rename from packages/core/src/v1/index.ts rename to old/packages/core/src/v1/index.ts diff --git a/packages/core/src/v1/signature.ts b/old/packages/core/src/v1/signature.ts similarity index 100% rename from packages/core/src/v1/signature.ts rename to old/packages/core/src/v1/signature.ts diff --git a/packages/core/src/v2/chained.ts b/old/packages/core/src/v2/chained.ts similarity index 100% rename from packages/core/src/v2/chained.ts rename to old/packages/core/src/v2/chained.ts diff --git a/packages/core/src/v2/config.ts b/old/packages/core/src/v2/config.ts similarity index 100% rename from packages/core/src/v2/config.ts rename to old/packages/core/src/v2/config.ts diff --git a/packages/core/src/v2/context.ts b/old/packages/core/src/v2/context.ts similarity index 100% rename from packages/core/src/v2/context.ts rename to old/packages/core/src/v2/context.ts diff --git a/packages/core/src/v2/index.ts b/old/packages/core/src/v2/index.ts similarity index 100% rename from packages/core/src/v2/index.ts rename to old/packages/core/src/v2/index.ts diff --git a/packages/core/src/v2/signature.ts b/old/packages/core/src/v2/signature.ts similarity index 100% rename from packages/core/src/v2/signature.ts rename to old/packages/core/src/v2/signature.ts diff --git a/packages/core/src/version.ts b/old/packages/core/src/version.ts similarity index 100% rename from packages/core/src/version.ts rename to old/packages/core/src/version.ts diff --git a/packages/core/tests/v2/config.spec.ts b/old/packages/core/tests/v2/config.spec.ts similarity index 100% rename from packages/core/tests/v2/config.spec.ts rename to old/packages/core/tests/v2/config.spec.ts diff --git a/packages/core/tests/v2/signature.spec.ts b/old/packages/core/tests/v2/signature.spec.ts similarity index 100% rename from packages/core/tests/v2/signature.spec.ts rename to old/packages/core/tests/v2/signature.spec.ts diff --git a/packages/deployer/.gitignore b/old/packages/deployer/.gitignore similarity index 100% rename from packages/deployer/.gitignore rename to old/packages/deployer/.gitignore diff --git a/packages/deployer/CHANGELOG.md b/old/packages/deployer/CHANGELOG.md similarity index 100% rename from packages/deployer/CHANGELOG.md rename to old/packages/deployer/CHANGELOG.md diff --git a/packages/deployer/README.md b/old/packages/deployer/README.md similarity index 100% rename from packages/deployer/README.md rename to old/packages/deployer/README.md diff --git a/packages/deployer/artifacts/contracts/NanoUniversalDeployer.sol/NanoUniversalDeployer.json b/old/packages/deployer/artifacts/contracts/NanoUniversalDeployer.sol/NanoUniversalDeployer.json similarity index 100% rename from packages/deployer/artifacts/contracts/NanoUniversalDeployer.sol/NanoUniversalDeployer.json rename to old/packages/deployer/artifacts/contracts/NanoUniversalDeployer.sol/NanoUniversalDeployer.json diff --git a/packages/deployer/artifacts/contracts/UniversalDeployer2.sol/UniversalDeployer2.json b/old/packages/deployer/artifacts/contracts/UniversalDeployer2.sol/UniversalDeployer2.json similarity index 100% rename from packages/deployer/artifacts/contracts/UniversalDeployer2.sol/UniversalDeployer2.json rename to old/packages/deployer/artifacts/contracts/UniversalDeployer2.sol/UniversalDeployer2.json diff --git a/packages/deployer/config/PROD.env.sample b/old/packages/deployer/config/PROD.env.sample similarity index 100% rename from packages/deployer/config/PROD.env.sample rename to old/packages/deployer/config/PROD.env.sample diff --git a/packages/deployer/contracts/NanoUniversalDeployer.sol b/old/packages/deployer/contracts/NanoUniversalDeployer.sol similarity index 100% rename from packages/deployer/contracts/NanoUniversalDeployer.sol rename to old/packages/deployer/contracts/NanoUniversalDeployer.sol diff --git a/packages/deployer/contracts/UniversalDeployer2.sol b/old/packages/deployer/contracts/UniversalDeployer2.sol similarity index 100% rename from packages/deployer/contracts/UniversalDeployer2.sol rename to old/packages/deployer/contracts/UniversalDeployer2.sol diff --git a/packages/deployer/hardhat.config.ts b/old/packages/deployer/hardhat.config.ts similarity index 100% rename from packages/deployer/hardhat.config.ts rename to old/packages/deployer/hardhat.config.ts diff --git a/packages/deployer/package.json b/old/packages/deployer/package.json similarity index 100% rename from packages/deployer/package.json rename to old/packages/deployer/package.json diff --git a/packages/deployer/src/UniversalDeployer.ts b/old/packages/deployer/src/UniversalDeployer.ts similarity index 100% rename from packages/deployer/src/UniversalDeployer.ts rename to old/packages/deployer/src/UniversalDeployer.ts diff --git a/packages/deployer/src/constants.ts b/old/packages/deployer/src/constants.ts similarity index 100% rename from packages/deployer/src/constants.ts rename to old/packages/deployer/src/constants.ts diff --git a/packages/deployer/src/index.ts b/old/packages/deployer/src/index.ts similarity index 100% rename from packages/deployer/src/index.ts rename to old/packages/deployer/src/index.ts diff --git a/packages/deployer/src/types.ts b/old/packages/deployer/src/types.ts similarity index 100% rename from packages/deployer/src/types.ts rename to old/packages/deployer/src/types.ts diff --git a/packages/deployer/src/typings/contracts/NanoUniversalDeployer.ts b/old/packages/deployer/src/typings/contracts/NanoUniversalDeployer.ts similarity index 100% rename from packages/deployer/src/typings/contracts/NanoUniversalDeployer.ts rename to old/packages/deployer/src/typings/contracts/NanoUniversalDeployer.ts diff --git a/packages/deployer/src/typings/contracts/UniversalDeployer2.ts b/old/packages/deployer/src/typings/contracts/UniversalDeployer2.ts similarity index 100% rename from packages/deployer/src/typings/contracts/UniversalDeployer2.ts rename to old/packages/deployer/src/typings/contracts/UniversalDeployer2.ts diff --git a/packages/deployer/src/typings/contracts/common.ts b/old/packages/deployer/src/typings/contracts/common.ts similarity index 100% rename from packages/deployer/src/typings/contracts/common.ts rename to old/packages/deployer/src/typings/contracts/common.ts diff --git a/packages/deployer/src/typings/contracts/factories/NanoUniversalDeployer__factory.ts b/old/packages/deployer/src/typings/contracts/factories/NanoUniversalDeployer__factory.ts similarity index 100% rename from packages/deployer/src/typings/contracts/factories/NanoUniversalDeployer__factory.ts rename to old/packages/deployer/src/typings/contracts/factories/NanoUniversalDeployer__factory.ts diff --git a/packages/deployer/src/typings/contracts/factories/UniversalDeployer2__factory.ts b/old/packages/deployer/src/typings/contracts/factories/UniversalDeployer2__factory.ts similarity index 100% rename from packages/deployer/src/typings/contracts/factories/UniversalDeployer2__factory.ts rename to old/packages/deployer/src/typings/contracts/factories/UniversalDeployer2__factory.ts diff --git a/packages/deployer/src/typings/contracts/factories/index.ts b/old/packages/deployer/src/typings/contracts/factories/index.ts similarity index 100% rename from packages/deployer/src/typings/contracts/factories/index.ts rename to old/packages/deployer/src/typings/contracts/factories/index.ts diff --git a/packages/deployer/src/typings/contracts/index.ts b/old/packages/deployer/src/typings/contracts/index.ts similarity index 100% rename from packages/deployer/src/typings/contracts/index.ts rename to old/packages/deployer/src/typings/contracts/index.ts diff --git a/packages/deployer/src/utils/configLoader.ts b/old/packages/deployer/src/utils/configLoader.ts similarity index 100% rename from packages/deployer/src/utils/configLoader.ts rename to old/packages/deployer/src/utils/configLoader.ts diff --git a/packages/deployer/src/utils/logger.ts b/old/packages/deployer/src/utils/logger.ts similarity index 100% rename from packages/deployer/src/utils/logger.ts rename to old/packages/deployer/src/utils/logger.ts diff --git a/packages/deployer/tests/mock.spec.ts b/old/packages/deployer/tests/mock.spec.ts similarity index 100% rename from packages/deployer/tests/mock.spec.ts rename to old/packages/deployer/tests/mock.spec.ts diff --git a/packages/guard/CHANGELOG.md b/old/packages/guard/CHANGELOG.md similarity index 100% rename from packages/guard/CHANGELOG.md rename to old/packages/guard/CHANGELOG.md diff --git a/packages/guard/README.md b/old/packages/guard/README.md similarity index 100% rename from packages/guard/README.md rename to old/packages/guard/README.md diff --git a/packages/guard/package.json b/old/packages/guard/package.json similarity index 100% rename from packages/guard/package.json rename to old/packages/guard/package.json diff --git a/packages/guard/src/guard.gen.ts b/old/packages/guard/src/guard.gen.ts similarity index 100% rename from packages/guard/src/guard.gen.ts rename to old/packages/guard/src/guard.gen.ts diff --git a/packages/guard/src/index.ts b/old/packages/guard/src/index.ts similarity index 100% rename from packages/guard/src/index.ts rename to old/packages/guard/src/index.ts diff --git a/packages/guard/src/signer.ts b/old/packages/guard/src/signer.ts similarity index 100% rename from packages/guard/src/signer.ts rename to old/packages/guard/src/signer.ts diff --git a/packages/indexer/CHANGELOG.md b/old/packages/indexer/CHANGELOG.md similarity index 100% rename from packages/indexer/CHANGELOG.md rename to old/packages/indexer/CHANGELOG.md diff --git a/packages/indexer/README.md b/old/packages/indexer/README.md similarity index 100% rename from packages/indexer/README.md rename to old/packages/indexer/README.md diff --git a/packages/indexer/package.json b/old/packages/indexer/package.json similarity index 100% rename from packages/indexer/package.json rename to old/packages/indexer/package.json diff --git a/packages/indexer/src/index.ts b/old/packages/indexer/src/index.ts similarity index 100% rename from packages/indexer/src/index.ts rename to old/packages/indexer/src/index.ts diff --git a/packages/indexer/src/indexer.gen.ts b/old/packages/indexer/src/indexer.gen.ts similarity index 100% rename from packages/indexer/src/indexer.gen.ts rename to old/packages/indexer/src/indexer.gen.ts diff --git a/packages/indexer/src/indexergw.gen.ts b/old/packages/indexer/src/indexergw.gen.ts similarity index 100% rename from packages/indexer/src/indexergw.gen.ts rename to old/packages/indexer/src/indexergw.gen.ts diff --git a/packages/marketplace/CHANGELOG.md b/old/packages/marketplace/CHANGELOG.md similarity index 100% rename from packages/marketplace/CHANGELOG.md rename to old/packages/marketplace/CHANGELOG.md diff --git a/packages/marketplace/README.md b/old/packages/marketplace/README.md similarity index 100% rename from packages/marketplace/README.md rename to old/packages/marketplace/README.md diff --git a/packages/marketplace/package.json b/old/packages/marketplace/package.json similarity index 100% rename from packages/marketplace/package.json rename to old/packages/marketplace/package.json diff --git a/packages/marketplace/src/index.ts b/old/packages/marketplace/src/index.ts similarity index 100% rename from packages/marketplace/src/index.ts rename to old/packages/marketplace/src/index.ts diff --git a/packages/marketplace/src/marketplace.gen.ts b/old/packages/marketplace/src/marketplace.gen.ts similarity index 100% rename from packages/marketplace/src/marketplace.gen.ts rename to old/packages/marketplace/src/marketplace.gen.ts diff --git a/packages/metadata/CHANGELOG.md b/old/packages/metadata/CHANGELOG.md similarity index 100% rename from packages/metadata/CHANGELOG.md rename to old/packages/metadata/CHANGELOG.md diff --git a/packages/metadata/README.md b/old/packages/metadata/README.md similarity index 100% rename from packages/metadata/README.md rename to old/packages/metadata/README.md diff --git a/packages/metadata/package.json b/old/packages/metadata/package.json similarity index 100% rename from packages/metadata/package.json rename to old/packages/metadata/package.json diff --git a/packages/metadata/src/index.ts b/old/packages/metadata/src/index.ts similarity index 100% rename from packages/metadata/src/index.ts rename to old/packages/metadata/src/index.ts diff --git a/packages/metadata/src/metadata.gen.ts b/old/packages/metadata/src/metadata.gen.ts similarity index 100% rename from packages/metadata/src/metadata.gen.ts rename to old/packages/metadata/src/metadata.gen.ts diff --git a/packages/migration/CHANGELOG.md b/old/packages/migration/CHANGELOG.md similarity index 100% rename from packages/migration/CHANGELOG.md rename to old/packages/migration/CHANGELOG.md diff --git a/packages/migration/package.json b/old/packages/migration/package.json similarity index 100% rename from packages/migration/package.json rename to old/packages/migration/package.json diff --git a/packages/migration/src/defaults.ts b/old/packages/migration/src/defaults.ts similarity index 100% rename from packages/migration/src/defaults.ts rename to old/packages/migration/src/defaults.ts diff --git a/packages/migration/src/index.ts b/old/packages/migration/src/index.ts similarity index 100% rename from packages/migration/src/index.ts rename to old/packages/migration/src/index.ts diff --git a/packages/migration/src/migrations/index.ts b/old/packages/migration/src/migrations/index.ts similarity index 100% rename from packages/migration/src/migrations/index.ts rename to old/packages/migration/src/migrations/index.ts diff --git a/packages/migration/src/migrations/migration_01_02.ts b/old/packages/migration/src/migrations/migration_01_02.ts similarity index 100% rename from packages/migration/src/migrations/migration_01_02.ts rename to old/packages/migration/src/migrations/migration_01_02.ts diff --git a/packages/migration/src/migrator.ts b/old/packages/migration/src/migrator.ts similarity index 100% rename from packages/migration/src/migrator.ts rename to old/packages/migration/src/migrator.ts diff --git a/packages/migration/src/version.ts b/old/packages/migration/src/version.ts similarity index 100% rename from packages/migration/src/version.ts rename to old/packages/migration/src/version.ts diff --git a/packages/network/CHANGELOG.md b/old/packages/network/CHANGELOG.md similarity index 100% rename from packages/network/CHANGELOG.md rename to old/packages/network/CHANGELOG.md diff --git a/packages/network/README.md b/old/packages/network/README.md similarity index 100% rename from packages/network/README.md rename to old/packages/network/README.md diff --git a/packages/network/constants/package.json b/old/packages/network/constants/package.json similarity index 100% rename from packages/network/constants/package.json rename to old/packages/network/constants/package.json diff --git a/packages/network/networkNames.md b/old/packages/network/networkNames.md similarity index 100% rename from packages/network/networkNames.md rename to old/packages/network/networkNames.md diff --git a/packages/network/networkNames.template.md b/old/packages/network/networkNames.template.md similarity index 100% rename from packages/network/networkNames.template.md rename to old/packages/network/networkNames.template.md diff --git a/packages/network/package.json b/old/packages/network/package.json similarity index 100% rename from packages/network/package.json rename to old/packages/network/package.json diff --git a/packages/network/src/config.ts b/old/packages/network/src/config.ts similarity index 100% rename from packages/network/src/config.ts rename to old/packages/network/src/config.ts diff --git a/packages/network/src/constants.ts b/old/packages/network/src/constants.ts similarity index 100% rename from packages/network/src/constants.ts rename to old/packages/network/src/constants.ts diff --git a/packages/network/src/index.ts b/old/packages/network/src/index.ts similarity index 100% rename from packages/network/src/index.ts rename to old/packages/network/src/index.ts diff --git a/packages/network/src/json-rpc-provider.ts b/old/packages/network/src/json-rpc-provider.ts similarity index 100% rename from packages/network/src/json-rpc-provider.ts rename to old/packages/network/src/json-rpc-provider.ts diff --git a/packages/network/src/json-rpc/handler.ts b/old/packages/network/src/json-rpc/handler.ts similarity index 100% rename from packages/network/src/json-rpc/handler.ts rename to old/packages/network/src/json-rpc/handler.ts diff --git a/packages/network/src/json-rpc/index.ts b/old/packages/network/src/json-rpc/index.ts similarity index 100% rename from packages/network/src/json-rpc/index.ts rename to old/packages/network/src/json-rpc/index.ts diff --git a/packages/network/src/json-rpc/middleware/allow-provider.ts b/old/packages/network/src/json-rpc/middleware/allow-provider.ts similarity index 100% rename from packages/network/src/json-rpc/middleware/allow-provider.ts rename to old/packages/network/src/json-rpc/middleware/allow-provider.ts diff --git a/packages/network/src/json-rpc/middleware/cached-provider.ts b/old/packages/network/src/json-rpc/middleware/cached-provider.ts similarity index 100% rename from packages/network/src/json-rpc/middleware/cached-provider.ts rename to old/packages/network/src/json-rpc/middleware/cached-provider.ts diff --git a/packages/network/src/json-rpc/middleware/eager-provider.ts b/old/packages/network/src/json-rpc/middleware/eager-provider.ts similarity index 100% rename from packages/network/src/json-rpc/middleware/eager-provider.ts rename to old/packages/network/src/json-rpc/middleware/eager-provider.ts diff --git a/packages/network/src/json-rpc/middleware/exception-provider.ts b/old/packages/network/src/json-rpc/middleware/exception-provider.ts similarity index 100% rename from packages/network/src/json-rpc/middleware/exception-provider.ts rename to old/packages/network/src/json-rpc/middleware/exception-provider.ts diff --git a/packages/network/src/json-rpc/middleware/index.ts b/old/packages/network/src/json-rpc/middleware/index.ts similarity index 100% rename from packages/network/src/json-rpc/middleware/index.ts rename to old/packages/network/src/json-rpc/middleware/index.ts diff --git a/packages/network/src/json-rpc/middleware/logging-provider.ts b/old/packages/network/src/json-rpc/middleware/logging-provider.ts similarity index 100% rename from packages/network/src/json-rpc/middleware/logging-provider.ts rename to old/packages/network/src/json-rpc/middleware/logging-provider.ts diff --git a/packages/network/src/json-rpc/middleware/network-provider.ts b/old/packages/network/src/json-rpc/middleware/network-provider.ts similarity index 100% rename from packages/network/src/json-rpc/middleware/network-provider.ts rename to old/packages/network/src/json-rpc/middleware/network-provider.ts diff --git a/packages/network/src/json-rpc/middleware/public-provider.ts b/old/packages/network/src/json-rpc/middleware/public-provider.ts similarity index 100% rename from packages/network/src/json-rpc/middleware/public-provider.ts rename to old/packages/network/src/json-rpc/middleware/public-provider.ts diff --git a/packages/network/src/json-rpc/middleware/signing-provider.ts b/old/packages/network/src/json-rpc/middleware/signing-provider.ts similarity index 100% rename from packages/network/src/json-rpc/middleware/signing-provider.ts rename to old/packages/network/src/json-rpc/middleware/signing-provider.ts diff --git a/packages/network/src/json-rpc/middleware/singleflight.ts b/old/packages/network/src/json-rpc/middleware/singleflight.ts similarity index 100% rename from packages/network/src/json-rpc/middleware/singleflight.ts rename to old/packages/network/src/json-rpc/middleware/singleflight.ts diff --git a/packages/network/src/json-rpc/router.ts b/old/packages/network/src/json-rpc/router.ts similarity index 100% rename from packages/network/src/json-rpc/router.ts rename to old/packages/network/src/json-rpc/router.ts diff --git a/packages/network/src/json-rpc/types.ts b/old/packages/network/src/json-rpc/types.ts similarity index 100% rename from packages/network/src/json-rpc/types.ts rename to old/packages/network/src/json-rpc/types.ts diff --git a/packages/network/src/json-rpc/utils.ts b/old/packages/network/src/json-rpc/utils.ts similarity index 100% rename from packages/network/src/json-rpc/utils.ts rename to old/packages/network/src/json-rpc/utils.ts diff --git a/packages/network/src/utils.ts b/old/packages/network/src/utils.ts similarity index 100% rename from packages/network/src/utils.ts rename to old/packages/network/src/utils.ts diff --git a/packages/provider/CHANGELOG.md b/old/packages/provider/CHANGELOG.md similarity index 100% rename from packages/provider/CHANGELOG.md rename to old/packages/provider/CHANGELOG.md diff --git a/packages/provider/README.md b/old/packages/provider/README.md similarity index 100% rename from packages/provider/README.md rename to old/packages/provider/README.md diff --git a/packages/provider/hardhat1.config.cts b/old/packages/provider/hardhat1.config.cts similarity index 100% rename from packages/provider/hardhat1.config.cts rename to old/packages/provider/hardhat1.config.cts diff --git a/packages/provider/hardhat1.config.js b/old/packages/provider/hardhat1.config.js similarity index 100% rename from packages/provider/hardhat1.config.js rename to old/packages/provider/hardhat1.config.js diff --git a/packages/provider/hardhat2.config.cts b/old/packages/provider/hardhat2.config.cts similarity index 100% rename from packages/provider/hardhat2.config.cts rename to old/packages/provider/hardhat2.config.cts diff --git a/packages/provider/hardhat2.config.js b/old/packages/provider/hardhat2.config.js similarity index 100% rename from packages/provider/hardhat2.config.js rename to old/packages/provider/hardhat2.config.js diff --git a/packages/provider/package.json b/old/packages/provider/package.json similarity index 100% rename from packages/provider/package.json rename to old/packages/provider/package.json diff --git a/packages/provider/src/analytics.ts b/old/packages/provider/src/analytics.ts similarity index 100% rename from packages/provider/src/analytics.ts rename to old/packages/provider/src/analytics.ts diff --git a/packages/provider/src/client.ts b/old/packages/provider/src/client.ts similarity index 100% rename from packages/provider/src/client.ts rename to old/packages/provider/src/client.ts diff --git a/packages/provider/src/eip191exceptions.ts b/old/packages/provider/src/eip191exceptions.ts similarity index 100% rename from packages/provider/src/eip191exceptions.ts rename to old/packages/provider/src/eip191exceptions.ts diff --git a/packages/provider/src/extended.ts b/old/packages/provider/src/extended.ts similarity index 100% rename from packages/provider/src/extended.ts rename to old/packages/provider/src/extended.ts diff --git a/packages/provider/src/index.ts b/old/packages/provider/src/index.ts similarity index 100% rename from packages/provider/src/index.ts rename to old/packages/provider/src/index.ts diff --git a/packages/provider/src/init.ts b/old/packages/provider/src/init.ts similarity index 100% rename from packages/provider/src/init.ts rename to old/packages/provider/src/init.ts diff --git a/packages/provider/src/provider.ts b/old/packages/provider/src/provider.ts similarity index 100% rename from packages/provider/src/provider.ts rename to old/packages/provider/src/provider.ts diff --git a/packages/provider/src/signer.ts b/old/packages/provider/src/signer.ts similarity index 100% rename from packages/provider/src/signer.ts rename to old/packages/provider/src/signer.ts diff --git a/packages/provider/src/transactions.ts b/old/packages/provider/src/transactions.ts similarity index 100% rename from packages/provider/src/transactions.ts rename to old/packages/provider/src/transactions.ts diff --git a/packages/provider/src/transports/base-provider-transport.ts b/old/packages/provider/src/transports/base-provider-transport.ts similarity index 100% rename from packages/provider/src/transports/base-provider-transport.ts rename to old/packages/provider/src/transports/base-provider-transport.ts diff --git a/packages/provider/src/transports/base-wallet-transport.ts b/old/packages/provider/src/transports/base-wallet-transport.ts similarity index 100% rename from packages/provider/src/transports/base-wallet-transport.ts rename to old/packages/provider/src/transports/base-wallet-transport.ts diff --git a/packages/provider/src/transports/extension-transport/base-injected-transport.ts b/old/packages/provider/src/transports/extension-transport/base-injected-transport.ts similarity index 100% rename from packages/provider/src/transports/extension-transport/base-injected-transport.ts rename to old/packages/provider/src/transports/extension-transport/base-injected-transport.ts diff --git a/packages/provider/src/transports/extension-transport/extension-message-handler.ts b/old/packages/provider/src/transports/extension-transport/extension-message-handler.ts similarity index 100% rename from packages/provider/src/transports/extension-transport/extension-message-handler.ts rename to old/packages/provider/src/transports/extension-transport/extension-message-handler.ts diff --git a/packages/provider/src/transports/extension-transport/extension-message-provider.ts b/old/packages/provider/src/transports/extension-transport/extension-message-provider.ts similarity index 100% rename from packages/provider/src/transports/extension-transport/extension-message-provider.ts rename to old/packages/provider/src/transports/extension-transport/extension-message-provider.ts diff --git a/packages/provider/src/transports/extension-transport/index.ts b/old/packages/provider/src/transports/extension-transport/index.ts similarity index 100% rename from packages/provider/src/transports/extension-transport/index.ts rename to old/packages/provider/src/transports/extension-transport/index.ts diff --git a/packages/provider/src/transports/index.ts b/old/packages/provider/src/transports/index.ts similarity index 100% rename from packages/provider/src/transports/index.ts rename to old/packages/provider/src/transports/index.ts diff --git a/packages/provider/src/transports/mux-transport/index.ts b/old/packages/provider/src/transports/mux-transport/index.ts similarity index 100% rename from packages/provider/src/transports/mux-transport/index.ts rename to old/packages/provider/src/transports/mux-transport/index.ts diff --git a/packages/provider/src/transports/mux-transport/mux-message-provider.ts b/old/packages/provider/src/transports/mux-transport/mux-message-provider.ts similarity index 100% rename from packages/provider/src/transports/mux-transport/mux-message-provider.ts rename to old/packages/provider/src/transports/mux-transport/mux-message-provider.ts diff --git a/packages/provider/src/transports/proxy-transport/index.ts b/old/packages/provider/src/transports/proxy-transport/index.ts similarity index 100% rename from packages/provider/src/transports/proxy-transport/index.ts rename to old/packages/provider/src/transports/proxy-transport/index.ts diff --git a/packages/provider/src/transports/proxy-transport/proxy-message-channel.ts b/old/packages/provider/src/transports/proxy-transport/proxy-message-channel.ts similarity index 100% rename from packages/provider/src/transports/proxy-transport/proxy-message-channel.ts rename to old/packages/provider/src/transports/proxy-transport/proxy-message-channel.ts diff --git a/packages/provider/src/transports/proxy-transport/proxy-message-handler.ts b/old/packages/provider/src/transports/proxy-transport/proxy-message-handler.ts similarity index 100% rename from packages/provider/src/transports/proxy-transport/proxy-message-handler.ts rename to old/packages/provider/src/transports/proxy-transport/proxy-message-handler.ts diff --git a/packages/provider/src/transports/proxy-transport/proxy-message-provider.ts b/old/packages/provider/src/transports/proxy-transport/proxy-message-provider.ts similarity index 100% rename from packages/provider/src/transports/proxy-transport/proxy-message-provider.ts rename to old/packages/provider/src/transports/proxy-transport/proxy-message-provider.ts diff --git a/packages/provider/src/transports/unreal-transport/index.ts b/old/packages/provider/src/transports/unreal-transport/index.ts similarity index 100% rename from packages/provider/src/transports/unreal-transport/index.ts rename to old/packages/provider/src/transports/unreal-transport/index.ts diff --git a/packages/provider/src/transports/unreal-transport/overridelogs.ts b/old/packages/provider/src/transports/unreal-transport/overridelogs.ts similarity index 100% rename from packages/provider/src/transports/unreal-transport/overridelogs.ts rename to old/packages/provider/src/transports/unreal-transport/overridelogs.ts diff --git a/packages/provider/src/transports/unreal-transport/unreal-message-handler.ts b/old/packages/provider/src/transports/unreal-transport/unreal-message-handler.ts similarity index 100% rename from packages/provider/src/transports/unreal-transport/unreal-message-handler.ts rename to old/packages/provider/src/transports/unreal-transport/unreal-message-handler.ts diff --git a/packages/provider/src/transports/unreal-transport/unreal-message-provider.ts b/old/packages/provider/src/transports/unreal-transport/unreal-message-provider.ts similarity index 100% rename from packages/provider/src/transports/unreal-transport/unreal-message-provider.ts rename to old/packages/provider/src/transports/unreal-transport/unreal-message-provider.ts diff --git a/packages/provider/src/transports/wallet-request-handler.ts b/old/packages/provider/src/transports/wallet-request-handler.ts similarity index 100% rename from packages/provider/src/transports/wallet-request-handler.ts rename to old/packages/provider/src/transports/wallet-request-handler.ts diff --git a/packages/provider/src/transports/window-transport/index.ts b/old/packages/provider/src/transports/window-transport/index.ts similarity index 100% rename from packages/provider/src/transports/window-transport/index.ts rename to old/packages/provider/src/transports/window-transport/index.ts diff --git a/packages/provider/src/transports/window-transport/window-message-handler.ts b/old/packages/provider/src/transports/window-transport/window-message-handler.ts similarity index 100% rename from packages/provider/src/transports/window-transport/window-message-handler.ts rename to old/packages/provider/src/transports/window-transport/window-message-handler.ts diff --git a/packages/provider/src/transports/window-transport/window-message-provider.ts b/old/packages/provider/src/transports/window-transport/window-message-provider.ts similarity index 100% rename from packages/provider/src/transports/window-transport/window-message-provider.ts rename to old/packages/provider/src/transports/window-transport/window-message-provider.ts diff --git a/packages/provider/src/types.ts b/old/packages/provider/src/types.ts similarity index 100% rename from packages/provider/src/types.ts rename to old/packages/provider/src/types.ts diff --git a/packages/provider/src/utils.ts b/old/packages/provider/src/utils.ts similarity index 100% rename from packages/provider/src/utils.ts rename to old/packages/provider/src/utils.ts diff --git a/packages/provider/src/utils/index.ts b/old/packages/provider/src/utils/index.ts similarity index 100% rename from packages/provider/src/utils/index.ts rename to old/packages/provider/src/utils/index.ts diff --git a/packages/provider/tests/client.spec.ts b/old/packages/provider/tests/client.spec.ts similarity index 100% rename from packages/provider/tests/client.spec.ts rename to old/packages/provider/tests/client.spec.ts diff --git a/packages/provider/tests/eip191prefix.spec.ts b/old/packages/provider/tests/eip191prefix.spec.ts similarity index 100% rename from packages/provider/tests/eip191prefix.spec.ts rename to old/packages/provider/tests/eip191prefix.spec.ts diff --git a/packages/provider/tests/messages.ts b/old/packages/provider/tests/messages.ts similarity index 100% rename from packages/provider/tests/messages.ts rename to old/packages/provider/tests/messages.ts diff --git a/packages/provider/tests/provider.spec.ts b/old/packages/provider/tests/provider.spec.ts similarity index 100% rename from packages/provider/tests/provider.spec.ts rename to old/packages/provider/tests/provider.spec.ts diff --git a/packages/provider/tests/remove-eip191prefix.spec.ts b/old/packages/provider/tests/remove-eip191prefix.spec.ts similarity index 100% rename from packages/provider/tests/remove-eip191prefix.spec.ts rename to old/packages/provider/tests/remove-eip191prefix.spec.ts diff --git a/packages/provider/tests/signer.spec.ts b/old/packages/provider/tests/signer.spec.ts similarity index 100% rename from packages/provider/tests/signer.spec.ts rename to old/packages/provider/tests/signer.spec.ts diff --git a/packages/provider/tests/transactions.spec.ts b/old/packages/provider/tests/transactions.spec.ts similarity index 100% rename from packages/provider/tests/transactions.spec.ts rename to old/packages/provider/tests/transactions.spec.ts diff --git a/packages/provider/tests/zeroxv3.spec.ts b/old/packages/provider/tests/zeroxv3.spec.ts similarity index 100% rename from packages/provider/tests/zeroxv3.spec.ts rename to old/packages/provider/tests/zeroxv3.spec.ts diff --git a/packages/react-native/CHANGELOG.md b/old/packages/react-native/CHANGELOG.md similarity index 100% rename from packages/react-native/CHANGELOG.md rename to old/packages/react-native/CHANGELOG.md diff --git a/packages/react-native/package.json b/old/packages/react-native/package.json similarity index 100% rename from packages/react-native/package.json rename to old/packages/react-native/package.json diff --git a/packages/react-native/src/index.ts b/old/packages/react-native/src/index.ts similarity index 100% rename from packages/react-native/src/index.ts rename to old/packages/react-native/src/index.ts diff --git a/packages/react-native/src/keychain-store.ts b/old/packages/react-native/src/keychain-store.ts similarity index 100% rename from packages/react-native/src/keychain-store.ts rename to old/packages/react-native/src/keychain-store.ts diff --git a/packages/relayer/CHANGELOG.md b/old/packages/relayer/CHANGELOG.md similarity index 100% rename from packages/relayer/CHANGELOG.md rename to old/packages/relayer/CHANGELOG.md diff --git a/packages/relayer/README.md b/old/packages/relayer/README.md similarity index 100% rename from packages/relayer/README.md rename to old/packages/relayer/README.md diff --git a/packages/relayer/hardhat.config.js b/old/packages/relayer/hardhat.config.js similarity index 100% rename from packages/relayer/hardhat.config.js rename to old/packages/relayer/hardhat.config.js diff --git a/packages/relayer/package.json b/old/packages/relayer/package.json similarity index 100% rename from packages/relayer/package.json rename to old/packages/relayer/package.json diff --git a/packages/relayer/src/index.ts b/old/packages/relayer/src/index.ts similarity index 100% rename from packages/relayer/src/index.ts rename to old/packages/relayer/src/index.ts diff --git a/packages/relayer/src/local-relayer.ts b/old/packages/relayer/src/local-relayer.ts similarity index 100% rename from packages/relayer/src/local-relayer.ts rename to old/packages/relayer/src/local-relayer.ts diff --git a/packages/relayer/src/provider-relayer.ts b/old/packages/relayer/src/provider-relayer.ts similarity index 100% rename from packages/relayer/src/provider-relayer.ts rename to old/packages/relayer/src/provider-relayer.ts diff --git a/packages/relayer/src/rpc-relayer/index.ts b/old/packages/relayer/src/rpc-relayer/index.ts similarity index 100% rename from packages/relayer/src/rpc-relayer/index.ts rename to old/packages/relayer/src/rpc-relayer/index.ts diff --git a/packages/relayer/src/rpc-relayer/relayer.gen.ts b/old/packages/relayer/src/rpc-relayer/relayer.gen.ts similarity index 100% rename from packages/relayer/src/rpc-relayer/relayer.gen.ts rename to old/packages/relayer/src/rpc-relayer/relayer.gen.ts diff --git a/packages/relayer/tests/provider-relayer.spec.ts b/old/packages/relayer/tests/provider-relayer.spec.ts similarity index 100% rename from packages/relayer/tests/provider-relayer.spec.ts rename to old/packages/relayer/tests/provider-relayer.spec.ts diff --git a/packages/replacer/CHANGELOG.md b/old/packages/replacer/CHANGELOG.md similarity index 100% rename from packages/replacer/CHANGELOG.md rename to old/packages/replacer/CHANGELOG.md diff --git a/packages/replacer/package.json b/old/packages/replacer/package.json similarity index 100% rename from packages/replacer/package.json rename to old/packages/replacer/package.json diff --git a/packages/replacer/src/cached.ts b/old/packages/replacer/src/cached.ts similarity index 100% rename from packages/replacer/src/cached.ts rename to old/packages/replacer/src/cached.ts diff --git a/packages/replacer/src/index.ts b/old/packages/replacer/src/index.ts similarity index 100% rename from packages/replacer/src/index.ts rename to old/packages/replacer/src/index.ts diff --git a/packages/replacer/src/ipfs.ts b/old/packages/replacer/src/ipfs.ts similarity index 100% rename from packages/replacer/src/ipfs.ts rename to old/packages/replacer/src/ipfs.ts diff --git a/packages/sessions/CHANGELOG.md b/old/packages/sessions/CHANGELOG.md similarity index 100% rename from packages/sessions/CHANGELOG.md rename to old/packages/sessions/CHANGELOG.md diff --git a/packages/sessions/hardhat.config.js b/old/packages/sessions/hardhat.config.js similarity index 100% rename from packages/sessions/hardhat.config.js rename to old/packages/sessions/hardhat.config.js diff --git a/packages/sessions/package.json b/old/packages/sessions/package.json similarity index 100% rename from packages/sessions/package.json rename to old/packages/sessions/package.json diff --git a/packages/sessions/src/index.ts b/old/packages/sessions/src/index.ts similarity index 100% rename from packages/sessions/src/index.ts rename to old/packages/sessions/src/index.ts diff --git a/packages/sessions/src/tracker.ts b/old/packages/sessions/src/tracker.ts similarity index 100% rename from packages/sessions/src/tracker.ts rename to old/packages/sessions/src/tracker.ts diff --git a/packages/sessions/src/trackers/arweave.ts b/old/packages/sessions/src/trackers/arweave.ts similarity index 100% rename from packages/sessions/src/trackers/arweave.ts rename to old/packages/sessions/src/trackers/arweave.ts diff --git a/packages/sessions/src/trackers/cached.ts b/old/packages/sessions/src/trackers/cached.ts similarity index 100% rename from packages/sessions/src/trackers/cached.ts rename to old/packages/sessions/src/trackers/cached.ts diff --git a/packages/sessions/src/trackers/debug.ts b/old/packages/sessions/src/trackers/debug.ts similarity index 100% rename from packages/sessions/src/trackers/debug.ts rename to old/packages/sessions/src/trackers/debug.ts diff --git a/packages/sessions/src/trackers/deduped.ts b/old/packages/sessions/src/trackers/deduped.ts similarity index 100% rename from packages/sessions/src/trackers/deduped.ts rename to old/packages/sessions/src/trackers/deduped.ts diff --git a/packages/sessions/src/trackers/index.ts b/old/packages/sessions/src/trackers/index.ts similarity index 100% rename from packages/sessions/src/trackers/index.ts rename to old/packages/sessions/src/trackers/index.ts diff --git a/packages/sessions/src/trackers/local.ts b/old/packages/sessions/src/trackers/local.ts similarity index 100% rename from packages/sessions/src/trackers/local.ts rename to old/packages/sessions/src/trackers/local.ts diff --git a/packages/sessions/src/trackers/multiple.ts b/old/packages/sessions/src/trackers/multiple.ts similarity index 100% rename from packages/sessions/src/trackers/multiple.ts rename to old/packages/sessions/src/trackers/multiple.ts diff --git a/packages/sessions/src/trackers/promise-cache.ts b/old/packages/sessions/src/trackers/promise-cache.ts similarity index 100% rename from packages/sessions/src/trackers/promise-cache.ts rename to old/packages/sessions/src/trackers/promise-cache.ts diff --git a/packages/sessions/src/trackers/remote/index.ts b/old/packages/sessions/src/trackers/remote/index.ts similarity index 100% rename from packages/sessions/src/trackers/remote/index.ts rename to old/packages/sessions/src/trackers/remote/index.ts diff --git a/packages/sessions/src/trackers/remote/sessions.gen.ts b/old/packages/sessions/src/trackers/remote/sessions.gen.ts similarity index 100% rename from packages/sessions/src/trackers/remote/sessions.gen.ts rename to old/packages/sessions/src/trackers/remote/sessions.gen.ts diff --git a/packages/sessions/src/trackers/stores/index.ts b/old/packages/sessions/src/trackers/stores/index.ts similarity index 100% rename from packages/sessions/src/trackers/stores/index.ts rename to old/packages/sessions/src/trackers/stores/index.ts diff --git a/packages/sessions/src/trackers/stores/indexedDBStore.ts b/old/packages/sessions/src/trackers/stores/indexedDBStore.ts similarity index 100% rename from packages/sessions/src/trackers/stores/indexedDBStore.ts rename to old/packages/sessions/src/trackers/stores/indexedDBStore.ts diff --git a/packages/sessions/src/trackers/stores/memoryStore.ts b/old/packages/sessions/src/trackers/stores/memoryStore.ts similarity index 100% rename from packages/sessions/src/trackers/stores/memoryStore.ts rename to old/packages/sessions/src/trackers/stores/memoryStore.ts diff --git a/packages/sessions/tests/arweave.spec.ts b/old/packages/sessions/tests/arweave.spec.ts similarity index 100% rename from packages/sessions/tests/arweave.spec.ts rename to old/packages/sessions/tests/arweave.spec.ts diff --git a/packages/sessions/tests/local.spec.ts b/old/packages/sessions/tests/local.spec.ts similarity index 100% rename from packages/sessions/tests/local.spec.ts rename to old/packages/sessions/tests/local.spec.ts diff --git a/packages/signhub/CHANGELOG.md b/old/packages/signhub/CHANGELOG.md similarity index 100% rename from packages/signhub/CHANGELOG.md rename to old/packages/signhub/CHANGELOG.md diff --git a/packages/signhub/package.json b/old/packages/signhub/package.json similarity index 100% rename from packages/signhub/package.json rename to old/packages/signhub/package.json diff --git a/packages/signhub/src/index.ts b/old/packages/signhub/src/index.ts similarity index 100% rename from packages/signhub/src/index.ts rename to old/packages/signhub/src/index.ts diff --git a/packages/signhub/src/orchestrator.ts b/old/packages/signhub/src/orchestrator.ts similarity index 100% rename from packages/signhub/src/orchestrator.ts rename to old/packages/signhub/src/orchestrator.ts diff --git a/packages/signhub/src/signers/index.ts b/old/packages/signhub/src/signers/index.ts similarity index 100% rename from packages/signhub/src/signers/index.ts rename to old/packages/signhub/src/signers/index.ts diff --git a/packages/signhub/src/signers/signer.ts b/old/packages/signhub/src/signers/signer.ts similarity index 100% rename from packages/signhub/src/signers/signer.ts rename to old/packages/signhub/src/signers/signer.ts diff --git a/packages/signhub/src/signers/wrapper.ts b/old/packages/signhub/src/signers/wrapper.ts similarity index 100% rename from packages/signhub/src/signers/wrapper.ts rename to old/packages/signhub/src/signers/wrapper.ts diff --git a/packages/signhub/tests/orchestrator.spec.ts b/old/packages/signhub/tests/orchestrator.spec.ts similarity index 100% rename from packages/signhub/tests/orchestrator.spec.ts rename to old/packages/signhub/tests/orchestrator.spec.ts diff --git a/packages/tests/CHANGELOG.md b/old/packages/tests/CHANGELOG.md similarity index 100% rename from packages/tests/CHANGELOG.md rename to old/packages/tests/CHANGELOG.md diff --git a/packages/tests/package.json b/old/packages/tests/package.json similarity index 100% rename from packages/tests/package.json rename to old/packages/tests/package.json diff --git a/packages/tests/src/builds/artifact.ts b/old/packages/tests/src/builds/artifact.ts similarity index 100% rename from packages/tests/src/builds/artifact.ts rename to old/packages/tests/src/builds/artifact.ts diff --git a/packages/tests/src/builds/index.ts b/old/packages/tests/src/builds/index.ts similarity index 100% rename from packages/tests/src/builds/index.ts rename to old/packages/tests/src/builds/index.ts diff --git a/packages/tests/src/builds/v1/artifacts/Factory.ts b/old/packages/tests/src/builds/v1/artifacts/Factory.ts similarity index 100% rename from packages/tests/src/builds/v1/artifacts/Factory.ts rename to old/packages/tests/src/builds/v1/artifacts/Factory.ts diff --git a/packages/tests/src/builds/v1/artifacts/GuestModule.ts b/old/packages/tests/src/builds/v1/artifacts/GuestModule.ts similarity index 100% rename from packages/tests/src/builds/v1/artifacts/GuestModule.ts rename to old/packages/tests/src/builds/v1/artifacts/GuestModule.ts diff --git a/packages/tests/src/builds/v1/artifacts/MainModule.ts b/old/packages/tests/src/builds/v1/artifacts/MainModule.ts similarity index 100% rename from packages/tests/src/builds/v1/artifacts/MainModule.ts rename to old/packages/tests/src/builds/v1/artifacts/MainModule.ts diff --git a/packages/tests/src/builds/v1/artifacts/MainModuleUpgradable.ts b/old/packages/tests/src/builds/v1/artifacts/MainModuleUpgradable.ts similarity index 100% rename from packages/tests/src/builds/v1/artifacts/MainModuleUpgradable.ts rename to old/packages/tests/src/builds/v1/artifacts/MainModuleUpgradable.ts diff --git a/packages/tests/src/builds/v1/artifacts/MultiCallUtils.ts b/old/packages/tests/src/builds/v1/artifacts/MultiCallUtils.ts similarity index 100% rename from packages/tests/src/builds/v1/artifacts/MultiCallUtils.ts rename to old/packages/tests/src/builds/v1/artifacts/MultiCallUtils.ts diff --git a/packages/tests/src/builds/v1/artifacts/SequenceUtils.ts b/old/packages/tests/src/builds/v1/artifacts/SequenceUtils.ts similarity index 100% rename from packages/tests/src/builds/v1/artifacts/SequenceUtils.ts rename to old/packages/tests/src/builds/v1/artifacts/SequenceUtils.ts diff --git a/packages/tests/src/builds/v1/index.ts b/old/packages/tests/src/builds/v1/index.ts similarity index 100% rename from packages/tests/src/builds/v1/index.ts rename to old/packages/tests/src/builds/v1/index.ts diff --git a/packages/tests/src/builds/v2/artifacts/Factory.ts b/old/packages/tests/src/builds/v2/artifacts/Factory.ts similarity index 100% rename from packages/tests/src/builds/v2/artifacts/Factory.ts rename to old/packages/tests/src/builds/v2/artifacts/Factory.ts diff --git a/packages/tests/src/builds/v2/artifacts/GuestModule.ts b/old/packages/tests/src/builds/v2/artifacts/GuestModule.ts similarity index 100% rename from packages/tests/src/builds/v2/artifacts/GuestModule.ts rename to old/packages/tests/src/builds/v2/artifacts/GuestModule.ts diff --git a/packages/tests/src/builds/v2/artifacts/MainModule.ts b/old/packages/tests/src/builds/v2/artifacts/MainModule.ts similarity index 100% rename from packages/tests/src/builds/v2/artifacts/MainModule.ts rename to old/packages/tests/src/builds/v2/artifacts/MainModule.ts diff --git a/packages/tests/src/builds/v2/artifacts/MainModuleUpgradable.ts b/old/packages/tests/src/builds/v2/artifacts/MainModuleUpgradable.ts similarity index 100% rename from packages/tests/src/builds/v2/artifacts/MainModuleUpgradable.ts rename to old/packages/tests/src/builds/v2/artifacts/MainModuleUpgradable.ts diff --git a/packages/tests/src/builds/v2/artifacts/UniversalSigValidator.ts b/old/packages/tests/src/builds/v2/artifacts/UniversalSigValidator.ts similarity index 100% rename from packages/tests/src/builds/v2/artifacts/UniversalSigValidator.ts rename to old/packages/tests/src/builds/v2/artifacts/UniversalSigValidator.ts diff --git a/packages/tests/src/builds/v2/index.ts b/old/packages/tests/src/builds/v2/index.ts similarity index 100% rename from packages/tests/src/builds/v2/index.ts rename to old/packages/tests/src/builds/v2/index.ts diff --git a/packages/tests/src/configs/index.ts b/old/packages/tests/src/configs/index.ts similarity index 100% rename from packages/tests/src/configs/index.ts rename to old/packages/tests/src/configs/index.ts diff --git a/packages/tests/src/configs/random.ts b/old/packages/tests/src/configs/random.ts similarity index 100% rename from packages/tests/src/configs/random.ts rename to old/packages/tests/src/configs/random.ts diff --git a/packages/tests/src/context/index.ts b/old/packages/tests/src/context/index.ts similarity index 100% rename from packages/tests/src/context/index.ts rename to old/packages/tests/src/context/index.ts diff --git a/packages/tests/src/context/v1.ts b/old/packages/tests/src/context/v1.ts similarity index 100% rename from packages/tests/src/context/v1.ts rename to old/packages/tests/src/context/v1.ts diff --git a/packages/tests/src/context/v2.ts b/old/packages/tests/src/context/v2.ts similarity index 100% rename from packages/tests/src/context/v2.ts rename to old/packages/tests/src/context/v2.ts diff --git a/packages/tests/src/index.ts b/old/packages/tests/src/index.ts similarity index 100% rename from packages/tests/src/index.ts rename to old/packages/tests/src/index.ts diff --git a/packages/tests/src/networks.ts b/old/packages/tests/src/networks.ts similarity index 100% rename from packages/tests/src/networks.ts rename to old/packages/tests/src/networks.ts diff --git a/packages/tests/src/singletonFactory.ts b/old/packages/tests/src/singletonFactory.ts similarity index 100% rename from packages/tests/src/singletonFactory.ts rename to old/packages/tests/src/singletonFactory.ts diff --git a/packages/tests/src/tokens/erc20.ts b/old/packages/tests/src/tokens/erc20.ts similarity index 100% rename from packages/tests/src/tokens/erc20.ts rename to old/packages/tests/src/tokens/erc20.ts diff --git a/packages/tests/src/utils.ts b/old/packages/tests/src/utils.ts similarity index 100% rename from packages/tests/src/utils.ts rename to old/packages/tests/src/utils.ts diff --git a/packages/utils/CHANGELOG.md b/old/packages/utils/CHANGELOG.md similarity index 100% rename from packages/utils/CHANGELOG.md rename to old/packages/utils/CHANGELOG.md diff --git a/packages/utils/README.md b/old/packages/utils/README.md similarity index 100% rename from packages/utils/README.md rename to old/packages/utils/README.md diff --git a/packages/utils/package.json b/old/packages/utils/package.json similarity index 100% rename from packages/utils/package.json rename to old/packages/utils/package.json diff --git a/packages/utils/src/access-key.ts b/old/packages/utils/src/access-key.ts similarity index 100% rename from packages/utils/src/access-key.ts rename to old/packages/utils/src/access-key.ts diff --git a/packages/utils/src/base64.ts b/old/packages/utils/src/base64.ts similarity index 100% rename from packages/utils/src/base64.ts rename to old/packages/utils/src/base64.ts diff --git a/packages/utils/src/bigint.ts b/old/packages/utils/src/bigint.ts similarity index 100% rename from packages/utils/src/bigint.ts rename to old/packages/utils/src/bigint.ts diff --git a/packages/utils/src/digest.ts b/old/packages/utils/src/digest.ts similarity index 100% rename from packages/utils/src/digest.ts rename to old/packages/utils/src/digest.ts diff --git a/packages/utils/src/index.ts b/old/packages/utils/src/index.ts similarity index 100% rename from packages/utils/src/index.ts rename to old/packages/utils/src/index.ts diff --git a/packages/utils/src/is-node-or-browser.ts b/old/packages/utils/src/is-node-or-browser.ts similarity index 100% rename from packages/utils/src/is-node-or-browser.ts rename to old/packages/utils/src/is-node-or-browser.ts diff --git a/packages/utils/src/jwt-decode.ts b/old/packages/utils/src/jwt-decode.ts similarity index 100% rename from packages/utils/src/jwt-decode.ts rename to old/packages/utils/src/jwt-decode.ts diff --git a/packages/utils/src/logger.ts b/old/packages/utils/src/logger.ts similarity index 100% rename from packages/utils/src/logger.ts rename to old/packages/utils/src/logger.ts diff --git a/packages/utils/src/merkle.ts b/old/packages/utils/src/merkle.ts similarity index 100% rename from packages/utils/src/merkle.ts rename to old/packages/utils/src/merkle.ts diff --git a/packages/utils/src/merkletree/Base.ts b/old/packages/utils/src/merkletree/Base.ts similarity index 100% rename from packages/utils/src/merkletree/Base.ts rename to old/packages/utils/src/merkletree/Base.ts diff --git a/packages/utils/src/merkletree/MerkleTree.ts b/old/packages/utils/src/merkletree/MerkleTree.ts similarity index 100% rename from packages/utils/src/merkletree/MerkleTree.ts rename to old/packages/utils/src/merkletree/MerkleTree.ts diff --git a/packages/utils/src/merkletree/README.md b/old/packages/utils/src/merkletree/README.md similarity index 100% rename from packages/utils/src/merkletree/README.md rename to old/packages/utils/src/merkletree/README.md diff --git a/packages/utils/src/merkletree/index.ts b/old/packages/utils/src/merkletree/index.ts similarity index 100% rename from packages/utils/src/merkletree/index.ts rename to old/packages/utils/src/merkletree/index.ts diff --git a/packages/utils/src/network.ts b/old/packages/utils/src/network.ts similarity index 100% rename from packages/utils/src/network.ts rename to old/packages/utils/src/network.ts diff --git a/packages/utils/src/promise-cache.ts b/old/packages/utils/src/promise-cache.ts similarity index 100% rename from packages/utils/src/promise-cache.ts rename to old/packages/utils/src/promise-cache.ts diff --git a/packages/utils/src/promisify.ts b/old/packages/utils/src/promisify.ts similarity index 100% rename from packages/utils/src/promisify.ts rename to old/packages/utils/src/promisify.ts diff --git a/packages/utils/src/query-string.ts b/old/packages/utils/src/query-string.ts similarity index 100% rename from packages/utils/src/query-string.ts rename to old/packages/utils/src/query-string.ts diff --git a/packages/utils/src/rand.ts b/old/packages/utils/src/rand.ts similarity index 100% rename from packages/utils/src/rand.ts rename to old/packages/utils/src/rand.ts diff --git a/packages/utils/src/sanitize.ts b/old/packages/utils/src/sanitize.ts similarity index 100% rename from packages/utils/src/sanitize.ts rename to old/packages/utils/src/sanitize.ts diff --git a/packages/utils/src/sleep.ts b/old/packages/utils/src/sleep.ts similarity index 100% rename from packages/utils/src/sleep.ts rename to old/packages/utils/src/sleep.ts diff --git a/packages/utils/src/typed-data.ts b/old/packages/utils/src/typed-data.ts similarity index 100% rename from packages/utils/src/typed-data.ts rename to old/packages/utils/src/typed-data.ts diff --git a/packages/utils/src/types.ts b/old/packages/utils/src/types.ts similarity index 100% rename from packages/utils/src/types.ts rename to old/packages/utils/src/types.ts diff --git a/packages/utils/src/web.ts b/old/packages/utils/src/web.ts similarity index 100% rename from packages/utils/src/web.ts rename to old/packages/utils/src/web.ts diff --git a/packages/utils/tests/access-key.spec.ts b/old/packages/utils/tests/access-key.spec.ts similarity index 100% rename from packages/utils/tests/access-key.spec.ts rename to old/packages/utils/tests/access-key.spec.ts diff --git a/packages/utils/tests/base64.spec.ts b/old/packages/utils/tests/base64.spec.ts similarity index 100% rename from packages/utils/tests/base64.spec.ts rename to old/packages/utils/tests/base64.spec.ts diff --git a/packages/utils/tests/bigint.spec.ts b/old/packages/utils/tests/bigint.spec.ts similarity index 100% rename from packages/utils/tests/bigint.spec.ts rename to old/packages/utils/tests/bigint.spec.ts diff --git a/packages/utils/tests/jwt-decode.spec.ts b/old/packages/utils/tests/jwt-decode.spec.ts similarity index 100% rename from packages/utils/tests/jwt-decode.spec.ts rename to old/packages/utils/tests/jwt-decode.spec.ts diff --git a/packages/utils/tests/merkle.spec.ts b/old/packages/utils/tests/merkle.spec.ts similarity index 100% rename from packages/utils/tests/merkle.spec.ts rename to old/packages/utils/tests/merkle.spec.ts diff --git a/packages/utils/tests/query-string.spec.ts b/old/packages/utils/tests/query-string.spec.ts similarity index 100% rename from packages/utils/tests/query-string.spec.ts rename to old/packages/utils/tests/query-string.spec.ts diff --git a/packages/utils/tests/sanitize.spec.ts b/old/packages/utils/tests/sanitize.spec.ts similarity index 100% rename from packages/utils/tests/sanitize.spec.ts rename to old/packages/utils/tests/sanitize.spec.ts diff --git a/packages/waas-ethers/CHANGELOG.md b/old/packages/waas-ethers/CHANGELOG.md similarity index 100% rename from packages/waas-ethers/CHANGELOG.md rename to old/packages/waas-ethers/CHANGELOG.md diff --git a/packages/waas-ethers/README.md b/old/packages/waas-ethers/README.md similarity index 100% rename from packages/waas-ethers/README.md rename to old/packages/waas-ethers/README.md diff --git a/packages/waas-ethers/package.json b/old/packages/waas-ethers/package.json similarity index 100% rename from packages/waas-ethers/package.json rename to old/packages/waas-ethers/package.json diff --git a/packages/waas-ethers/src/index.ts b/old/packages/waas-ethers/src/index.ts similarity index 100% rename from packages/waas-ethers/src/index.ts rename to old/packages/waas-ethers/src/index.ts diff --git a/packages/waas-ethers/src/signer.ts b/old/packages/waas-ethers/src/signer.ts similarity index 100% rename from packages/waas-ethers/src/signer.ts rename to old/packages/waas-ethers/src/signer.ts diff --git a/packages/waas/CHANGELOG.md b/old/packages/waas/CHANGELOG.md similarity index 100% rename from packages/waas/CHANGELOG.md rename to old/packages/waas/CHANGELOG.md diff --git a/packages/waas/README.md b/old/packages/waas/README.md similarity index 100% rename from packages/waas/README.md rename to old/packages/waas/README.md diff --git a/packages/waas/package.json b/old/packages/waas/package.json similarity index 100% rename from packages/waas/package.json rename to old/packages/waas/package.json diff --git a/packages/waas/src/auth.ts b/old/packages/waas/src/auth.ts similarity index 100% rename from packages/waas/src/auth.ts rename to old/packages/waas/src/auth.ts diff --git a/packages/waas/src/base.ts b/old/packages/waas/src/base.ts similarity index 100% rename from packages/waas/src/base.ts rename to old/packages/waas/src/base.ts diff --git a/packages/waas/src/challenge.ts b/old/packages/waas/src/challenge.ts similarity index 100% rename from packages/waas/src/challenge.ts rename to old/packages/waas/src/challenge.ts diff --git a/packages/waas/src/clients/authenticator.gen.ts b/old/packages/waas/src/clients/authenticator.gen.ts similarity index 100% rename from packages/waas/src/clients/authenticator.gen.ts rename to old/packages/waas/src/clients/authenticator.gen.ts diff --git a/packages/waas/src/clients/intent.gen.ts b/old/packages/waas/src/clients/intent.gen.ts similarity index 100% rename from packages/waas/src/clients/intent.gen.ts rename to old/packages/waas/src/clients/intent.gen.ts diff --git a/packages/waas/src/email.ts b/old/packages/waas/src/email.ts similarity index 100% rename from packages/waas/src/email.ts rename to old/packages/waas/src/email.ts diff --git a/packages/waas/src/errors.ts b/old/packages/waas/src/errors.ts similarity index 100% rename from packages/waas/src/errors.ts rename to old/packages/waas/src/errors.ts diff --git a/packages/waas/src/index.ts b/old/packages/waas/src/index.ts similarity index 100% rename from packages/waas/src/index.ts rename to old/packages/waas/src/index.ts diff --git a/packages/waas/src/intents/accounts.ts b/old/packages/waas/src/intents/accounts.ts similarity index 100% rename from packages/waas/src/intents/accounts.ts rename to old/packages/waas/src/intents/accounts.ts diff --git a/packages/waas/src/intents/base.ts b/old/packages/waas/src/intents/base.ts similarity index 100% rename from packages/waas/src/intents/base.ts rename to old/packages/waas/src/intents/base.ts diff --git a/packages/waas/src/intents/index.ts b/old/packages/waas/src/intents/index.ts similarity index 100% rename from packages/waas/src/intents/index.ts rename to old/packages/waas/src/intents/index.ts diff --git a/packages/waas/src/intents/messages.ts b/old/packages/waas/src/intents/messages.ts similarity index 100% rename from packages/waas/src/intents/messages.ts rename to old/packages/waas/src/intents/messages.ts diff --git a/packages/waas/src/intents/responses.ts b/old/packages/waas/src/intents/responses.ts similarity index 100% rename from packages/waas/src/intents/responses.ts rename to old/packages/waas/src/intents/responses.ts diff --git a/packages/waas/src/intents/session.ts b/old/packages/waas/src/intents/session.ts similarity index 100% rename from packages/waas/src/intents/session.ts rename to old/packages/waas/src/intents/session.ts diff --git a/packages/waas/src/intents/transactions.ts b/old/packages/waas/src/intents/transactions.ts similarity index 100% rename from packages/waas/src/intents/transactions.ts rename to old/packages/waas/src/intents/transactions.ts diff --git a/packages/waas/src/intents/utils.ts b/old/packages/waas/src/intents/utils.ts similarity index 100% rename from packages/waas/src/intents/utils.ts rename to old/packages/waas/src/intents/utils.ts diff --git a/packages/waas/src/networks.ts b/old/packages/waas/src/networks.ts similarity index 100% rename from packages/waas/src/networks.ts rename to old/packages/waas/src/networks.ts diff --git a/packages/waas/src/secure-store.ts b/old/packages/waas/src/secure-store.ts similarity index 100% rename from packages/waas/src/secure-store.ts rename to old/packages/waas/src/secure-store.ts diff --git a/packages/waas/src/session/index.ts b/old/packages/waas/src/session/index.ts similarity index 100% rename from packages/waas/src/session/index.ts rename to old/packages/waas/src/session/index.ts diff --git a/packages/waas/src/session/keyTypes.ts b/old/packages/waas/src/session/keyTypes.ts similarity index 100% rename from packages/waas/src/session/keyTypes.ts rename to old/packages/waas/src/session/keyTypes.ts diff --git a/packages/waas/src/session/secp256k1.ts b/old/packages/waas/src/session/secp256k1.ts similarity index 100% rename from packages/waas/src/session/secp256k1.ts rename to old/packages/waas/src/session/secp256k1.ts diff --git a/packages/waas/src/session/secp256r1.ts b/old/packages/waas/src/session/secp256r1.ts similarity index 100% rename from packages/waas/src/session/secp256r1.ts rename to old/packages/waas/src/session/secp256r1.ts diff --git a/packages/waas/src/store.ts b/old/packages/waas/src/store.ts similarity index 100% rename from packages/waas/src/store.ts rename to old/packages/waas/src/store.ts diff --git a/packages/waas/src/subtle-crypto.ts b/old/packages/waas/src/subtle-crypto.ts similarity index 100% rename from packages/waas/src/subtle-crypto.ts rename to old/packages/waas/src/subtle-crypto.ts diff --git a/packages/waas/tests/intents.spec.ts b/old/packages/waas/tests/intents.spec.ts similarity index 100% rename from packages/waas/tests/intents.spec.ts rename to old/packages/waas/tests/intents.spec.ts diff --git a/packages/wallet/CHANGELOG.md b/old/packages/wallet/CHANGELOG.md similarity index 100% rename from packages/wallet/CHANGELOG.md rename to old/packages/wallet/CHANGELOG.md diff --git a/packages/wallet/README.md b/old/packages/wallet/README.md similarity index 100% rename from packages/wallet/README.md rename to old/packages/wallet/README.md diff --git a/packages/wallet/hardhat.config.js b/old/packages/wallet/hardhat.config.js similarity index 100% rename from packages/wallet/hardhat.config.js rename to old/packages/wallet/hardhat.config.js diff --git a/packages/wallet/hardhat2.config.js b/old/packages/wallet/hardhat2.config.js similarity index 100% rename from packages/wallet/hardhat2.config.js rename to old/packages/wallet/hardhat2.config.js diff --git a/packages/wallet/package.json b/old/packages/wallet/package.json similarity index 100% rename from packages/wallet/package.json rename to old/packages/wallet/package.json diff --git a/packages/wallet/src/index.ts b/old/packages/wallet/src/index.ts similarity index 100% rename from packages/wallet/src/index.ts rename to old/packages/wallet/src/index.ts diff --git a/packages/wallet/src/orchestrator/wrapper.ts b/old/packages/wallet/src/orchestrator/wrapper.ts similarity index 100% rename from packages/wallet/src/orchestrator/wrapper.ts rename to old/packages/wallet/src/orchestrator/wrapper.ts diff --git a/packages/wallet/src/signer.ts b/old/packages/wallet/src/signer.ts similarity index 100% rename from packages/wallet/src/signer.ts rename to old/packages/wallet/src/signer.ts diff --git a/packages/wallet/src/utils.ts b/old/packages/wallet/src/utils.ts similarity index 100% rename from packages/wallet/src/utils.ts rename to old/packages/wallet/src/utils.ts diff --git a/packages/wallet/src/wallet.ts b/old/packages/wallet/src/wallet.ts similarity index 100% rename from packages/wallet/src/wallet.ts rename to old/packages/wallet/src/wallet.ts diff --git a/packages/wallet/tests/utils/deploy-wallet-context.ts b/old/packages/wallet/tests/utils/deploy-wallet-context.ts similarity index 100% rename from packages/wallet/tests/utils/deploy-wallet-context.ts rename to old/packages/wallet/tests/utils/deploy-wallet-context.ts diff --git a/packages/wallet/tests/utils/get-contract.ts b/old/packages/wallet/tests/utils/get-contract.ts similarity index 100% rename from packages/wallet/tests/utils/get-contract.ts rename to old/packages/wallet/tests/utils/get-contract.ts diff --git a/packages/wallet/tests/utils/index.ts b/old/packages/wallet/tests/utils/index.ts similarity index 100% rename from packages/wallet/tests/utils/index.ts rename to old/packages/wallet/tests/utils/index.ts diff --git a/packages/wallet/tests/wallet.spec.ts b/old/packages/wallet/tests/wallet.spec.ts similarity index 100% rename from packages/wallet/tests/wallet.spec.ts rename to old/packages/wallet/tests/wallet.spec.ts diff --git a/pnpm-lock.yaml b/old/pnpm-lock.yaml similarity index 100% rename from pnpm-lock.yaml rename to old/pnpm-lock.yaml diff --git a/pnpm-workspace.yaml b/old/pnpm-workspace.yaml similarity index 100% rename from pnpm-workspace.yaml rename to old/pnpm-workspace.yaml diff --git a/scripts/fix-mocha-ref.js b/old/scripts/fix-mocha-ref.js similarity index 100% rename from scripts/fix-mocha-ref.js rename to old/scripts/fix-mocha-ref.js diff --git a/scripts/pnpm-link.sh b/old/scripts/pnpm-link.sh similarity index 100% rename from scripts/pnpm-link.sh rename to old/scripts/pnpm-link.sh diff --git a/scripts/update-network-names-doc.ts b/old/scripts/update-network-names-doc.ts similarity index 100% rename from scripts/update-network-names-doc.ts rename to old/scripts/update-network-names-doc.ts diff --git a/scripts/update-version.js b/old/scripts/update-version.js similarity index 100% rename from scripts/update-version.js rename to old/scripts/update-version.js diff --git a/tsconfig.json b/old/tsconfig.json similarity index 100% rename from tsconfig.json rename to old/tsconfig.json diff --git a/tsconfig.test.json b/old/tsconfig.test.json similarity index 100% rename from tsconfig.test.json rename to old/tsconfig.test.json From 255bfa56e5374fb53cfe11b714d1f4f9bfd73654 Mon Sep 17 00:00:00 2001 From: Peter Kieltyka Date: Mon, 14 Apr 2025 11:04:27 -0400 Subject: [PATCH 304/439] clean up: move turbo boilerplate pkgs from packages/ to repo/ folder --- packages/eslint-config/base.js | 52 ---- pnpm-lock.yaml | 224 +++++++++--------- pnpm-workspace.yaml | 1 + {packages => repo}/eslint-config/README.md | 0 repo/eslint-config/base.js | 52 ++++ {packages => repo}/eslint-config/next.js | 28 +-- {packages => repo}/eslint-config/package.json | 0 .../eslint-config/react-internal.js | 22 +- .../typescript-config/base.json | 0 .../typescript-config/nextjs.json | 0 .../typescript-config/package.json | 0 .../typescript-config/react-library.json | 0 {packages => repo}/ui/eslint.config.mjs | 0 {packages => repo}/ui/package.json | 0 {packages => repo}/ui/src/button.tsx | 0 {packages => repo}/ui/src/card.tsx | 0 {packages => repo}/ui/src/code.tsx | 0 {packages => repo}/ui/tsconfig.json | 0 .../ui/turbo/generators/config.ts | 0 .../turbo/generators/templates/component.hbs | 0 20 files changed, 190 insertions(+), 189 deletions(-) delete mode 100644 packages/eslint-config/base.js rename {packages => repo}/eslint-config/README.md (100%) create mode 100644 repo/eslint-config/base.js rename {packages => repo}/eslint-config/next.js (55%) rename {packages => repo}/eslint-config/package.json (100%) rename {packages => repo}/eslint-config/react-internal.js (58%) rename {packages => repo}/typescript-config/base.json (100%) rename {packages => repo}/typescript-config/nextjs.json (100%) rename {packages => repo}/typescript-config/package.json (100%) rename {packages => repo}/typescript-config/react-library.json (100%) rename {packages => repo}/ui/eslint.config.mjs (100%) rename {packages => repo}/ui/package.json (100%) rename {packages => repo}/ui/src/button.tsx (100%) rename {packages => repo}/ui/src/card.tsx (100%) rename {packages => repo}/ui/src/code.tsx (100%) rename {packages => repo}/ui/tsconfig.json (100%) rename {packages => repo}/ui/turbo/generators/config.ts (100%) rename {packages => repo}/ui/turbo/generators/templates/component.hbs (100%) diff --git a/packages/eslint-config/base.js b/packages/eslint-config/base.js deleted file mode 100644 index 0f2262a4d..000000000 --- a/packages/eslint-config/base.js +++ /dev/null @@ -1,52 +0,0 @@ -import js from "@eslint/js"; -import eslintConfigPrettier from "eslint-config-prettier"; -import turboPlugin from "eslint-plugin-turbo"; -import tseslint from "typescript-eslint"; -import onlyWarn from "eslint-plugin-only-warn"; - -/** - * A shared ESLint configuration for the repository. - * - * @type {import("eslint").Linter.Config} - * */ -export const config = [ - js.configs.recommended, - eslintConfigPrettier, - ...tseslint.configs.recommended, - { - plugins: { - turbo: turboPlugin, - }, - rules: { - "turbo/no-undeclared-env-vars": "warn", - }, - }, - { - plugins: { - onlyWarn, - }, - }, - { - rules: { - // Disallow semicolons - "semi": ["error", "never"], - - // Turn off the base ESLint version of no-unused-vars - "no-unused-vars": "off", - - // Use @typescript-eslint/no-unused-vars - // Allow unused vars prefixed with _ - "@typescript-eslint/no-unused-vars": [ - "error", - { - "argsIgnorePattern": "^_", - "varsIgnorePattern": "^_", - "destructuredArrayIgnorePattern": "^_" - } - ] - } - }, - { - ignores: ["dist/**"], - }, -]; diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index d3f0eee54..e295d41f9 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -31,7 +31,7 @@ importers: version: link:../../packages/wdk '@repo/ui': specifier: workspace:* - version: link:../../packages/ui + version: link:../../repo/ui next: specifier: ^15.1.0 version: 15.1.0(react-dom@19.0.0(react@19.0.0))(react@19.0.0) @@ -47,10 +47,10 @@ importers: devDependencies: '@repo/eslint-config': specifier: workspace:* - version: link:../../packages/eslint-config + version: link:../../repo/eslint-config '@repo/typescript-config': specifier: workspace:* - version: link:../../packages/typescript-config + version: link:../../repo/typescript-config '@types/node': specifier: ^20 version: 20.17.6 @@ -68,7 +68,7 @@ importers: dependencies: '@repo/ui': specifier: workspace:* - version: link:../../packages/ui + version: link:../../repo/ui next: specifier: ^15.1.0 version: 15.1.0(react-dom@19.0.0(react@19.0.0))(react@19.0.0) @@ -81,10 +81,10 @@ importers: devDependencies: '@repo/eslint-config': specifier: workspace:* - version: link:../../packages/eslint-config + version: link:../../repo/eslint-config '@repo/typescript-config': specifier: workspace:* - version: link:../../packages/typescript-config + version: link:../../repo/typescript-config '@types/node': specifier: ^20 version: 20.17.6 @@ -102,7 +102,7 @@ importers: dependencies: '@repo/ui': specifier: workspace:* - version: link:../../packages/ui + version: link:../../repo/ui next: specifier: ^15.1.0 version: 15.1.0(react-dom@19.0.0(react@19.0.0))(react@19.0.0) @@ -115,10 +115,10 @@ importers: devDependencies: '@repo/eslint-config': specifier: workspace:* - version: link:../../packages/eslint-config + version: link:../../repo/eslint-config '@repo/typescript-config': specifier: workspace:* - version: link:../../packages/typescript-config + version: link:../../repo/typescript-config '@types/node': specifier: ^20 version: 20.17.6 @@ -143,7 +143,7 @@ importers: devDependencies: '@repo/typescript-config': specifier: workspace:^ - version: link:../typescript-config + version: link:../../repo/typescript-config '@types/jest': specifier: ^29.5.14 version: 29.5.14 @@ -163,42 +163,6 @@ importers: specifier: ^5.7.3 version: 5.7.3 - packages/eslint-config: - devDependencies: - '@eslint/js': - specifier: ^9.17.0 - version: 9.17.0 - '@next/eslint-plugin-next': - specifier: ^15.1.0 - version: 15.1.0 - eslint: - specifier: ^9.15.0 - version: 9.15.0 - eslint-config-prettier: - specifier: ^9.1.0 - version: 9.1.0(eslint@9.15.0) - eslint-plugin-only-warn: - specifier: ^1.1.0 - version: 1.1.0 - eslint-plugin-react: - specifier: ^7.37.2 - version: 7.37.2(eslint@9.15.0) - eslint-plugin-react-hooks: - specifier: ^5.0.0 - version: 5.0.0(eslint@9.15.0) - eslint-plugin-turbo: - specifier: ^2.3.0 - version: 2.3.1(eslint@9.15.0) - globals: - specifier: ^15.12.0 - version: 15.12.0 - typescript: - specifier: ^5.3.3 - version: 5.5.4 - typescript-eslint: - specifier: ^8.15.0 - version: 8.15.0(eslint@9.15.0)(typescript@5.5.4) - packages/primitives: dependencies: ox: @@ -207,7 +171,7 @@ importers: devDependencies: '@repo/typescript-config': specifier: workspace:^ - version: link:../typescript-config + version: link:../../repo/typescript-config typescript: specifier: ^5.7.3 version: 5.7.3 @@ -226,10 +190,10 @@ importers: devDependencies: '@repo/eslint-config': specifier: workspace:* - version: link:../eslint-config + version: link:../../repo/eslint-config '@repo/typescript-config': specifier: workspace:^ - version: link:../typescript-config + version: link:../../repo/typescript-config '@types/node': specifier: ^22.10.9 version: 22.10.9 @@ -249,39 +213,6 @@ importers: specifier: ^5.7.3 version: 5.7.3 - packages/typescript-config: {} - - packages/ui: - dependencies: - react: - specifier: ^19.0.0 - version: 19.0.0 - react-dom: - specifier: ^19.0.0 - version: 19.0.0(react@19.0.0) - devDependencies: - '@repo/eslint-config': - specifier: workspace:* - version: link:../eslint-config - '@repo/typescript-config': - specifier: workspace:* - version: link:../typescript-config - '@turbo/gen': - specifier: ^1.12.4 - version: 1.13.4(@types/node@20.17.6)(typescript@5.5.4) - '@types/node': - specifier: ^20.11.24 - version: 20.17.6 - '@types/react': - specifier: 18.3.0 - version: 18.3.0 - '@types/react-dom': - specifier: 18.3.1 - version: 18.3.1 - typescript: - specifier: 5.5.4 - version: 5.5.4 - packages/wdk: dependencies: '@0xsequence/sequence-core': @@ -305,7 +236,7 @@ importers: devDependencies: '@repo/typescript-config': specifier: workspace:^ - version: link:../typescript-config + version: link:../../repo/typescript-config '@types/jest': specifier: ^29.5.14 version: 29.5.14 @@ -325,6 +256,75 @@ importers: specifier: ^5.7.3 version: 5.7.3 + repo/eslint-config: + devDependencies: + '@eslint/js': + specifier: ^9.17.0 + version: 9.17.0 + '@next/eslint-plugin-next': + specifier: ^15.1.0 + version: 15.1.0 + eslint: + specifier: ^9.15.0 + version: 9.15.0 + eslint-config-prettier: + specifier: ^9.1.0 + version: 9.1.0(eslint@9.15.0) + eslint-plugin-only-warn: + specifier: ^1.1.0 + version: 1.1.0 + eslint-plugin-react: + specifier: ^7.37.2 + version: 7.37.2(eslint@9.15.0) + eslint-plugin-react-hooks: + specifier: ^5.0.0 + version: 5.0.0(eslint@9.15.0) + eslint-plugin-turbo: + specifier: ^2.3.0 + version: 2.3.1(eslint@9.15.0) + globals: + specifier: ^15.12.0 + version: 15.12.0 + typescript: + specifier: ^5.3.3 + version: 5.7.3 + typescript-eslint: + specifier: ^8.15.0 + version: 8.15.0(eslint@9.15.0)(typescript@5.7.3) + + repo/typescript-config: {} + + repo/ui: + dependencies: + react: + specifier: ^19.0.0 + version: 19.0.0 + react-dom: + specifier: ^19.0.0 + version: 19.0.0(react@19.0.0) + devDependencies: + '@repo/eslint-config': + specifier: workspace:* + version: link:../eslint-config + '@repo/typescript-config': + specifier: workspace:* + version: link:../typescript-config + '@turbo/gen': + specifier: ^1.12.4 + version: 1.13.4(@types/node@20.17.6)(typescript@5.5.4) + '@types/node': + specifier: ^20.11.24 + version: 20.17.6 + '@types/react': + specifier: 18.3.0 + version: 18.3.0 + '@types/react-dom': + specifier: 18.3.1 + version: 18.3.1 + typescript: + specifier: 5.5.4 + version: 5.5.4 + packages: '@adraffy/ens-normalize@1.11.0': @@ -4479,7 +4479,7 @@ snapshots: js-yaml: 4.1.0 ora: 4.1.1 rimraf: 3.0.2 - semver: 7.6.3 + semver: 7.7.1 update-check: 1.5.4 '@types/babel__core@7.20.5': @@ -4586,34 +4586,34 @@ snapshots: dependencies: '@types/yargs-parser': 21.0.3 - '@typescript-eslint/eslint-plugin@8.15.0(@typescript-eslint/parser@8.15.0(eslint@9.15.0)(typescript@5.5.4))(eslint@9.15.0)(typescript@5.5.4)': + '@typescript-eslint/eslint-plugin@8.15.0(@typescript-eslint/parser@8.15.0(eslint@9.15.0)(typescript@5.7.3))(eslint@9.15.0)(typescript@5.7.3)': dependencies: '@eslint-community/regexpp': 4.12.1 - '@typescript-eslint/parser': 8.15.0(eslint@9.15.0)(typescript@5.5.4) + '@typescript-eslint/parser': 8.15.0(eslint@9.15.0)(typescript@5.7.3) '@typescript-eslint/scope-manager': 8.15.0 - '@typescript-eslint/type-utils': 8.15.0(eslint@9.15.0)(typescript@5.5.4) - '@typescript-eslint/utils': 8.15.0(eslint@9.15.0)(typescript@5.5.4) + '@typescript-eslint/type-utils': 8.15.0(eslint@9.15.0)(typescript@5.7.3) + '@typescript-eslint/utils': 8.15.0(eslint@9.15.0)(typescript@5.7.3) '@typescript-eslint/visitor-keys': 8.15.0 eslint: 9.15.0 graphemer: 1.4.0 ignore: 5.3.2 natural-compare: 1.4.0 - ts-api-utils: 1.4.0(typescript@5.5.4) + ts-api-utils: 1.4.0(typescript@5.7.3) optionalDependencies: - typescript: 5.5.4 + typescript: 5.7.3 transitivePeerDependencies: - supports-color - '@typescript-eslint/parser@8.15.0(eslint@9.15.0)(typescript@5.5.4)': + '@typescript-eslint/parser@8.15.0(eslint@9.15.0)(typescript@5.7.3)': dependencies: '@typescript-eslint/scope-manager': 8.15.0 '@typescript-eslint/types': 8.15.0 - '@typescript-eslint/typescript-estree': 8.15.0(typescript@5.5.4) + '@typescript-eslint/typescript-estree': 8.15.0(typescript@5.7.3) '@typescript-eslint/visitor-keys': 8.15.0 debug: 4.3.7(supports-color@5.5.0) eslint: 9.15.0 optionalDependencies: - typescript: 5.5.4 + typescript: 5.7.3 transitivePeerDependencies: - supports-color @@ -4622,21 +4622,21 @@ snapshots: '@typescript-eslint/types': 8.15.0 '@typescript-eslint/visitor-keys': 8.15.0 - '@typescript-eslint/type-utils@8.15.0(eslint@9.15.0)(typescript@5.5.4)': + '@typescript-eslint/type-utils@8.15.0(eslint@9.15.0)(typescript@5.7.3)': dependencies: - '@typescript-eslint/typescript-estree': 8.15.0(typescript@5.5.4) - '@typescript-eslint/utils': 8.15.0(eslint@9.15.0)(typescript@5.5.4) + '@typescript-eslint/typescript-estree': 8.15.0(typescript@5.7.3) + '@typescript-eslint/utils': 8.15.0(eslint@9.15.0)(typescript@5.7.3) debug: 4.3.7(supports-color@5.5.0) eslint: 9.15.0 - ts-api-utils: 1.4.0(typescript@5.5.4) + ts-api-utils: 1.4.0(typescript@5.7.3) optionalDependencies: - typescript: 5.5.4 + typescript: 5.7.3 transitivePeerDependencies: - supports-color '@typescript-eslint/types@8.15.0': {} - '@typescript-eslint/typescript-estree@8.15.0(typescript@5.5.4)': + '@typescript-eslint/typescript-estree@8.15.0(typescript@5.7.3)': dependencies: '@typescript-eslint/types': 8.15.0 '@typescript-eslint/visitor-keys': 8.15.0 @@ -4644,22 +4644,22 @@ snapshots: fast-glob: 3.3.2 is-glob: 4.0.3 minimatch: 9.0.5 - semver: 7.6.3 - ts-api-utils: 1.4.0(typescript@5.5.4) + semver: 7.7.1 + ts-api-utils: 1.4.0(typescript@5.7.3) optionalDependencies: - typescript: 5.5.4 + typescript: 5.7.3 transitivePeerDependencies: - supports-color - '@typescript-eslint/utils@8.15.0(eslint@9.15.0)(typescript@5.5.4)': + '@typescript-eslint/utils@8.15.0(eslint@9.15.0)(typescript@5.7.3)': dependencies: '@eslint-community/eslint-utils': 4.4.1(eslint@9.15.0) '@typescript-eslint/scope-manager': 8.15.0 '@typescript-eslint/types': 8.15.0 - '@typescript-eslint/typescript-estree': 8.15.0(typescript@5.5.4) + '@typescript-eslint/typescript-estree': 8.15.0(typescript@5.7.3) eslint: 9.15.0 optionalDependencies: - typescript: 5.5.4 + typescript: 5.7.3 transitivePeerDependencies: - supports-color @@ -7221,9 +7221,9 @@ snapshots: tree-kill@1.2.2: {} - ts-api-utils@1.4.0(typescript@5.5.4): + ts-api-utils@1.4.0(typescript@5.7.3): dependencies: - typescript: 5.5.4 + typescript: 5.7.3 ts-jest@29.2.6(@babel/core@7.26.9)(@jest/transform@29.7.0)(@jest/types@29.6.3)(babel-jest@29.7.0(@babel/core@7.26.9))(jest@29.7.0(@types/node@22.13.9)(ts-node@10.9.2(@types/node@22.13.9)(typescript@5.7.3)))(typescript@5.7.3): dependencies: @@ -7353,14 +7353,14 @@ snapshots: possible-typed-array-names: 1.0.0 reflect.getprototypeof: 1.0.6 - typescript-eslint@8.15.0(eslint@9.15.0)(typescript@5.5.4): + typescript-eslint@8.15.0(eslint@9.15.0)(typescript@5.7.3): dependencies: - '@typescript-eslint/eslint-plugin': 8.15.0(@typescript-eslint/parser@8.15.0(eslint@9.15.0)(typescript@5.5.4))(eslint@9.15.0)(typescript@5.5.4) - '@typescript-eslint/parser': 8.15.0(eslint@9.15.0)(typescript@5.5.4) - '@typescript-eslint/utils': 8.15.0(eslint@9.15.0)(typescript@5.5.4) + '@typescript-eslint/eslint-plugin': 8.15.0(@typescript-eslint/parser@8.15.0(eslint@9.15.0)(typescript@5.7.3))(eslint@9.15.0)(typescript@5.7.3) + '@typescript-eslint/parser': 8.15.0(eslint@9.15.0)(typescript@5.7.3) + '@typescript-eslint/utils': 8.15.0(eslint@9.15.0)(typescript@5.7.3) eslint: 9.15.0 optionalDependencies: - typescript: 5.5.4 + typescript: 5.7.3 transitivePeerDependencies: - supports-color diff --git a/pnpm-workspace.yaml b/pnpm-workspace.yaml index 64a8b98cb..ae9e2fdcd 100644 --- a/pnpm-workspace.yaml +++ b/pnpm-workspace.yaml @@ -1,4 +1,5 @@ packages: - "apps/*" - "packages/*" + - "repo/*" - "test/*" diff --git a/packages/eslint-config/README.md b/repo/eslint-config/README.md similarity index 100% rename from packages/eslint-config/README.md rename to repo/eslint-config/README.md diff --git a/repo/eslint-config/base.js b/repo/eslint-config/base.js new file mode 100644 index 000000000..0166a3ff2 --- /dev/null +++ b/repo/eslint-config/base.js @@ -0,0 +1,52 @@ +import js from '@eslint/js' +import eslintConfigPrettier from 'eslint-config-prettier' +import turboPlugin from 'eslint-plugin-turbo' +import tseslint from 'typescript-eslint' +import onlyWarn from 'eslint-plugin-only-warn' + +/** + * A shared ESLint configuration for the repository. + * + * @type {import("eslint").Linter.Config} + * */ +export const config = [ + js.configs.recommended, + eslintConfigPrettier, + ...tseslint.configs.recommended, + { + plugins: { + turbo: turboPlugin, + }, + rules: { + 'turbo/no-undeclared-env-vars': 'warn', + }, + }, + { + plugins: { + onlyWarn, + }, + }, + { + rules: { + // Disallow semicolons + semi: ['error', 'never'], + + // Turn off the base ESLint version of no-unused-vars + 'no-unused-vars': 'off', + + // Use @typescript-eslint/no-unused-vars + // Allow unused vars prefixed with _ + '@typescript-eslint/no-unused-vars': [ + 'error', + { + argsIgnorePattern: '^_', + varsIgnorePattern: '^_', + destructuredArrayIgnorePattern: '^_', + }, + ], + }, + }, + { + ignores: ['dist/**'], + }, +] diff --git a/packages/eslint-config/next.js b/repo/eslint-config/next.js similarity index 55% rename from packages/eslint-config/next.js rename to repo/eslint-config/next.js index 1997af7b6..7acbb7b5a 100644 --- a/packages/eslint-config/next.js +++ b/repo/eslint-config/next.js @@ -1,11 +1,11 @@ -import js from "@eslint/js"; -import eslintConfigPrettier from "eslint-config-prettier"; -import tseslint from "typescript-eslint"; -import pluginReactHooks from "eslint-plugin-react-hooks"; -import pluginReact from "eslint-plugin-react"; -import globals from "globals"; -import pluginNext from "@next/eslint-plugin-next"; -import { config as baseConfig } from "./base.js"; +import js from '@eslint/js' +import eslintConfigPrettier from 'eslint-config-prettier' +import tseslint from 'typescript-eslint' +import pluginReactHooks from 'eslint-plugin-react-hooks' +import pluginReact from 'eslint-plugin-react' +import globals from 'globals' +import pluginNext from '@next/eslint-plugin-next' +import { config as baseConfig } from './base.js' /** * A custom ESLint configuration for libraries that use Next.js. @@ -28,22 +28,22 @@ export const nextJsConfig = [ }, { plugins: { - "@next/next": pluginNext, + '@next/next': pluginNext, }, rules: { ...pluginNext.configs.recommended.rules, - ...pluginNext.configs["core-web-vitals"].rules, + ...pluginNext.configs['core-web-vitals'].rules, }, }, { plugins: { - "react-hooks": pluginReactHooks, + 'react-hooks': pluginReactHooks, }, - settings: { react: { version: "detect" } }, + settings: { react: { version: 'detect' } }, rules: { ...pluginReactHooks.configs.recommended.rules, // React scope no longer necessary with new JSX transform. - "react/react-in-jsx-scope": "off", + 'react/react-in-jsx-scope': 'off', }, }, -]; +] diff --git a/packages/eslint-config/package.json b/repo/eslint-config/package.json similarity index 100% rename from packages/eslint-config/package.json rename to repo/eslint-config/package.json diff --git a/packages/eslint-config/react-internal.js b/repo/eslint-config/react-internal.js similarity index 58% rename from packages/eslint-config/react-internal.js rename to repo/eslint-config/react-internal.js index 0cc8b1d39..4762b15d7 100644 --- a/packages/eslint-config/react-internal.js +++ b/repo/eslint-config/react-internal.js @@ -1,10 +1,10 @@ -import js from "@eslint/js"; -import eslintConfigPrettier from "eslint-config-prettier"; -import tseslint from "typescript-eslint"; -import pluginReactHooks from "eslint-plugin-react-hooks"; -import pluginReact from "eslint-plugin-react"; -import globals from "globals"; -import { config as baseConfig } from "./base.js"; +import js from '@eslint/js' +import eslintConfigPrettier from 'eslint-config-prettier' +import tseslint from 'typescript-eslint' +import pluginReactHooks from 'eslint-plugin-react-hooks' +import pluginReact from 'eslint-plugin-react' +import globals from 'globals' +import { config as baseConfig } from './base.js' /** * A custom ESLint configuration for libraries that use React. @@ -27,13 +27,13 @@ export const config = [ }, { plugins: { - "react-hooks": pluginReactHooks, + 'react-hooks': pluginReactHooks, }, - settings: { react: { version: "detect" } }, + settings: { react: { version: 'detect' } }, rules: { ...pluginReactHooks.configs.recommended.rules, // React scope no longer necessary with new JSX transform. - "react/react-in-jsx-scope": "off", + 'react/react-in-jsx-scope': 'off', }, }, -]; +] diff --git a/packages/typescript-config/base.json b/repo/typescript-config/base.json similarity index 100% rename from packages/typescript-config/base.json rename to repo/typescript-config/base.json diff --git a/packages/typescript-config/nextjs.json b/repo/typescript-config/nextjs.json similarity index 100% rename from packages/typescript-config/nextjs.json rename to repo/typescript-config/nextjs.json diff --git a/packages/typescript-config/package.json b/repo/typescript-config/package.json similarity index 100% rename from packages/typescript-config/package.json rename to repo/typescript-config/package.json diff --git a/packages/typescript-config/react-library.json b/repo/typescript-config/react-library.json similarity index 100% rename from packages/typescript-config/react-library.json rename to repo/typescript-config/react-library.json diff --git a/packages/ui/eslint.config.mjs b/repo/ui/eslint.config.mjs similarity index 100% rename from packages/ui/eslint.config.mjs rename to repo/ui/eslint.config.mjs diff --git a/packages/ui/package.json b/repo/ui/package.json similarity index 100% rename from packages/ui/package.json rename to repo/ui/package.json diff --git a/packages/ui/src/button.tsx b/repo/ui/src/button.tsx similarity index 100% rename from packages/ui/src/button.tsx rename to repo/ui/src/button.tsx diff --git a/packages/ui/src/card.tsx b/repo/ui/src/card.tsx similarity index 100% rename from packages/ui/src/card.tsx rename to repo/ui/src/card.tsx diff --git a/packages/ui/src/code.tsx b/repo/ui/src/code.tsx similarity index 100% rename from packages/ui/src/code.tsx rename to repo/ui/src/code.tsx diff --git a/packages/ui/tsconfig.json b/repo/ui/tsconfig.json similarity index 100% rename from packages/ui/tsconfig.json rename to repo/ui/tsconfig.json diff --git a/packages/ui/turbo/generators/config.ts b/repo/ui/turbo/generators/config.ts similarity index 100% rename from packages/ui/turbo/generators/config.ts rename to repo/ui/turbo/generators/config.ts diff --git a/packages/ui/turbo/generators/templates/component.hbs b/repo/ui/turbo/generators/templates/component.hbs similarity index 100% rename from packages/ui/turbo/generators/templates/component.hbs rename to repo/ui/turbo/generators/templates/component.hbs From c59a325e7fc335454337340f99d9c30c0e057b6a Mon Sep 17 00:00:00 2001 From: Peter Kieltyka Date: Mon, 14 Apr 2025 16:21:31 -0400 Subject: [PATCH 305/439] add packages/services and packages/utils --- package.json | 14 +- packages/services/README.md | 3 + packages/services/api/CHANGELOG.md | 2156 +++++++++ packages/services/api/README.md | 3 + packages/services/api/package.json | 27 + packages/services/api/src/api.gen.ts | 3724 ++++++++++++++++ packages/services/api/src/index.ts | 36 + packages/services/api/tsconfig.json | 10 + packages/services/builder/CHANGELOG.md | 155 + packages/services/builder/README.md | 3 + packages/services/builder/package.json | 27 + packages/services/builder/src/builder.gen.ts | 714 +++ packages/services/builder/src/index.ts | 30 + packages/services/builder/tsconfig.json | 10 + packages/services/guard/CHANGELOG.md | 2943 +++++++++++++ packages/services/guard/README.md | 3 + packages/services/guard/package.json | 27 + packages/services/guard/src/guard.gen.ts | 1023 +++++ packages/services/guard/src/index.ts | 2 + packages/services/guard/src/signer.ts | 308 ++ packages/services/guard/tsconfig.json | 10 + packages/services/indexer/CHANGELOG.md | 1781 ++++++++ packages/services/indexer/README.md | 3 + packages/services/indexer/package.json | 27 + packages/services/indexer/src/index.ts | 71 + packages/services/indexer/src/indexer.gen.ts | 2353 ++++++++++ .../services/indexer/src/indexergw.gen.ts | 1523 +++++++ packages/services/indexer/tsconfig.json | 10 + packages/services/marketplace/CHANGELOG.md | 238 + packages/services/marketplace/README.md | 3 + packages/services/marketplace/package.json | 27 + packages/services/marketplace/src/index.ts | 36 + .../marketplace/src/marketplace.gen.ts | 2483 +++++++++++ packages/services/marketplace/tsconfig.json | 10 + packages/services/metadata/CHANGELOG.md | 1789 ++++++++ packages/services/metadata/README.md | 3 + packages/services/metadata/package.json | 27 + packages/services/metadata/src/index.ts | 66 + .../services/metadata/src/metadata.gen.ts | 2818 ++++++++++++ packages/services/metadata/tsconfig.json | 10 + packages/services/relayer/CHANGELOG.md | 3848 +++++++++++++++++ packages/services/relayer/README.md | 3 + packages/services/relayer/hardhat.config.js | 15 + packages/services/relayer/package.json | 31 + packages/services/relayer/src/index.ts | 111 + .../services/relayer/src/local-relayer.ts | 125 + .../services/relayer/src/provider-relayer.ts | 284 ++ .../services/relayer/src/rpc-relayer/index.ts | 380 ++ .../relayer/src/rpc-relayer/relayer.gen.ts | 1901 ++++++++ packages/services/relayer/tsconfig.json | 10 + packages/utils/README.md | 4 + packages/utils/abi/CHANGELOG.md | 2087 +++++++++ packages/utils/abi/README.md | 3 + packages/utils/abi/package.json | 27 + packages/utils/abi/src/index.ts | 23 + packages/utils/abi/src/sale/erc1155Sale.ts | 352 ++ packages/utils/abi/src/sale/erc721Sale.ts | 352 ++ .../abi/src/saleItems/erc1155SaleItems.ts | 377 ++ .../abi/src/saleItems/erc721SaleItems.ts | 440 ++ packages/utils/abi/src/tokens/erc1155.ts | 422 ++ packages/utils/abi/src/tokens/erc20.ts | 316 ++ packages/utils/abi/src/tokens/erc6909.ts | 404 ++ packages/utils/abi/src/tokens/erc721.ts | 441 ++ packages/utils/abi/src/wallet/erc1271.ts | 26 + packages/utils/abi/src/wallet/erc5719.ts | 19 + packages/utils/abi/src/wallet/erc6492.ts | 61 + packages/utils/abi/src/wallet/factory.ts | 18 + packages/utils/abi/src/wallet/index.ts | 26 + .../src/wallet/libs/requireFreshSigners.ts | 15 + packages/utils/abi/src/wallet/mainModule.ts | 158 + .../abi/src/wallet/mainModuleUpgradable.ts | 28 + packages/utils/abi/src/wallet/moduleHooks.ts | 248 ++ .../utils/abi/src/wallet/sequenceUtils.ts | 516 +++ .../utils/abi/src/wallet/walletProxyHook.ts | 9 + packages/utils/abi/tsconfig.json | 10 + pnpm-lock.yaml | 428 +- pnpm-workspace.yaml | 10 +- repo/README.md | 4 + turbo.json | 2 + 79 files changed, 37867 insertions(+), 173 deletions(-) create mode 100644 packages/services/README.md create mode 100644 packages/services/api/CHANGELOG.md create mode 100644 packages/services/api/README.md create mode 100644 packages/services/api/package.json create mode 100644 packages/services/api/src/api.gen.ts create mode 100644 packages/services/api/src/index.ts create mode 100644 packages/services/api/tsconfig.json create mode 100644 packages/services/builder/CHANGELOG.md create mode 100644 packages/services/builder/README.md create mode 100644 packages/services/builder/package.json create mode 100644 packages/services/builder/src/builder.gen.ts create mode 100644 packages/services/builder/src/index.ts create mode 100644 packages/services/builder/tsconfig.json create mode 100644 packages/services/guard/CHANGELOG.md create mode 100644 packages/services/guard/README.md create mode 100644 packages/services/guard/package.json create mode 100644 packages/services/guard/src/guard.gen.ts create mode 100644 packages/services/guard/src/index.ts create mode 100644 packages/services/guard/src/signer.ts create mode 100644 packages/services/guard/tsconfig.json create mode 100644 packages/services/indexer/CHANGELOG.md create mode 100644 packages/services/indexer/README.md create mode 100644 packages/services/indexer/package.json create mode 100644 packages/services/indexer/src/index.ts create mode 100644 packages/services/indexer/src/indexer.gen.ts create mode 100644 packages/services/indexer/src/indexergw.gen.ts create mode 100644 packages/services/indexer/tsconfig.json create mode 100644 packages/services/marketplace/CHANGELOG.md create mode 100644 packages/services/marketplace/README.md create mode 100644 packages/services/marketplace/package.json create mode 100644 packages/services/marketplace/src/index.ts create mode 100644 packages/services/marketplace/src/marketplace.gen.ts create mode 100644 packages/services/marketplace/tsconfig.json create mode 100644 packages/services/metadata/CHANGELOG.md create mode 100644 packages/services/metadata/README.md create mode 100644 packages/services/metadata/package.json create mode 100644 packages/services/metadata/src/index.ts create mode 100644 packages/services/metadata/src/metadata.gen.ts create mode 100644 packages/services/metadata/tsconfig.json create mode 100644 packages/services/relayer/CHANGELOG.md create mode 100644 packages/services/relayer/README.md create mode 100644 packages/services/relayer/hardhat.config.js create mode 100644 packages/services/relayer/package.json create mode 100644 packages/services/relayer/src/index.ts create mode 100644 packages/services/relayer/src/local-relayer.ts create mode 100644 packages/services/relayer/src/provider-relayer.ts create mode 100644 packages/services/relayer/src/rpc-relayer/index.ts create mode 100644 packages/services/relayer/src/rpc-relayer/relayer.gen.ts create mode 100644 packages/services/relayer/tsconfig.json create mode 100644 packages/utils/README.md create mode 100644 packages/utils/abi/CHANGELOG.md create mode 100644 packages/utils/abi/README.md create mode 100644 packages/utils/abi/package.json create mode 100644 packages/utils/abi/src/index.ts create mode 100644 packages/utils/abi/src/sale/erc1155Sale.ts create mode 100644 packages/utils/abi/src/sale/erc721Sale.ts create mode 100644 packages/utils/abi/src/saleItems/erc1155SaleItems.ts create mode 100644 packages/utils/abi/src/saleItems/erc721SaleItems.ts create mode 100644 packages/utils/abi/src/tokens/erc1155.ts create mode 100644 packages/utils/abi/src/tokens/erc20.ts create mode 100644 packages/utils/abi/src/tokens/erc6909.ts create mode 100644 packages/utils/abi/src/tokens/erc721.ts create mode 100644 packages/utils/abi/src/wallet/erc1271.ts create mode 100644 packages/utils/abi/src/wallet/erc5719.ts create mode 100644 packages/utils/abi/src/wallet/erc6492.ts create mode 100644 packages/utils/abi/src/wallet/factory.ts create mode 100644 packages/utils/abi/src/wallet/index.ts create mode 100644 packages/utils/abi/src/wallet/libs/requireFreshSigners.ts create mode 100644 packages/utils/abi/src/wallet/mainModule.ts create mode 100644 packages/utils/abi/src/wallet/mainModuleUpgradable.ts create mode 100644 packages/utils/abi/src/wallet/moduleHooks.ts create mode 100644 packages/utils/abi/src/wallet/sequenceUtils.ts create mode 100644 packages/utils/abi/src/wallet/walletProxyHook.ts create mode 100644 packages/utils/abi/tsconfig.json create mode 100644 repo/README.md diff --git a/package.json b/package.json index b1c242f40..961287781 100644 --- a/package.json +++ b/package.json @@ -4,7 +4,7 @@ "private": true, "scripts": { "build:all": "turbo build", - "build:packages": "turbo build --filter=\"./packages/*\"", + "build:packages": "turbo build --filter=\"./packages/**/*\"", "build": "pnpm build:packages", "dev": "turbo dev", "test": "turbo test", @@ -14,13 +14,13 @@ "dev:server": "node packages/primitives-cli/dist/index.js server" }, "devDependencies": { - "@changesets/cli": "^2.27.11", - "lefthook": "^1.6.1", - "prettier": "^3.2.5", - "turbo": "^2.3.3", - "typescript": "5.5.4" + "@changesets/cli": "^2.29.0", + "lefthook": "^1.11.10", + "prettier": "^3.5.3", + "turbo": "^2.5.0", + "typescript": "5.8.3" }, - "packageManager": "pnpm@9.0.0", + "packageManager": "pnpm@10.8.1", "engines": { "node": ">=18" } diff --git a/packages/services/README.md b/packages/services/README.md new file mode 100644 index 000000000..a6c67631d --- /dev/null +++ b/packages/services/README.md @@ -0,0 +1,3 @@ +# packages/services + +This folder contains clients to Sequence backend/infrastructure services. diff --git a/packages/services/api/CHANGELOG.md b/packages/services/api/CHANGELOG.md new file mode 100644 index 000000000..0a4106482 --- /dev/null +++ b/packages/services/api/CHANGELOG.md @@ -0,0 +1,2156 @@ +# @0xsequence/api + +## 2.3.8 + +### Patch Changes + +- indexer: update clients + +## 2.3.7 + +### Patch Changes + +- Metadata updates + +## 2.3.6 + +### Patch Changes + +- New chains + +## 2.3.5 + +### Patch Changes + +- Add Frequency Testnet + +## 2.3.4 + +### Patch Changes + +- metadata: exclude deprecated methods on rpc client + +## 2.3.3 + +### Patch Changes + +- metadata: client update + +## 2.3.2 + +### Patch Changes + +- metadata: update rpc client + +## 2.3.1 + +### Patch Changes + +- indexer: update rpc client + +## 2.3.0 + +### Minor Changes + +- update metadata rpc client + +## 2.2.15 + +### Patch Changes + +- API updates + +## 2.2.14 + +### Patch Changes + +- Somnia Testnet and Monad Testnet + +## 2.2.13 + +### Patch Changes + +- Add XR1 to all networks + +## 2.2.12 + +### Patch Changes + +- Add XR1 + +## 2.2.11 + +### Patch Changes + +- Relayer updates + +## 2.2.10 + +### Patch Changes + +- Etherlink support + +## 2.2.9 + +### Patch Changes + +- Indexer gateway native token balances + +## 2.2.8 + +### Patch Changes + +- Add Moonbeam and Moonbase Alpha + +## 2.2.7 + +### Patch Changes + +- Update Builder package + +## 2.2.6 + +### Patch Changes + +- Update relayer package + +## 2.2.5 + +### Patch Changes + +- auth: fix sequence indexer gateway url +- account: immutable wallet proxy hook + +## 2.2.4 + +### Patch Changes + +- network: update soneium mainnet block explorer url +- waas: signTypedData intent support + +## 2.2.3 + +### Patch Changes + +- provider: updating initWallet to use connected network configs if they exist + +## 2.2.2 + +### Patch Changes + +- pass projectAccessKey to relayer at all times + +## 2.2.1 + +### Patch Changes + +- waas-ethers: sign typed data + +## 2.2.0 + +### Minor Changes + +- indexer: gateway client +- @0xsequence/builder +- upgrade puppeteer to v23.10.3 + +## 2.1.8 + +### Patch Changes + +- Add Soneium Mainnet + +## 2.1.7 + +### Patch Changes + +- guard: pass project access key to guard requests + +## 2.1.6 + +### Patch Changes + +- Add LAOS and Telos Testnet chains + +## 2.1.5 + +### Patch Changes + +- account: save presigned configuration with reference chain id 1 + +## 2.1.4 + +### Patch Changes + +- provider: pass projectAccessKey into MuxMessageProvider + +## 2.1.3 + +### Patch Changes + +- waas: time drift date fix due to strange browser quirk + +## 2.1.2 + +### Patch Changes + +- provider: export analytics correctly + +## 2.1.1 + +### Patch Changes + +- Add LAOS chain support + +## 2.1.0 + +### Minor Changes + +- account: forward project access key when estimating fees and sending transactions + +### Patch Changes + +- sessions: save signatures with reference chain id + +## 2.0.26 + +### Patch Changes + +- account: fix chain id comparison + +## 2.0.25 + +### Patch Changes + +- skale-nebula: deploy gas limit = 10m + +## 2.0.24 + +### Patch Changes + +- sessions: arweave: configurable gateway url +- waas: use /status to get time drift before sending any intents + +## 2.0.23 + +### Patch Changes + +- Add The Root Network support + +## 2.0.22 + +### Patch Changes + +- Add SKALE Nebula Mainnet support + +## 2.0.21 + +### Patch Changes + +- account: add publishWitnessFor + +## 2.0.20 + +### Patch Changes + +- upgrade deps, and improve waas session status handling + +## 2.0.19 + +### Patch Changes + +- Add Immutable zkEVM support + +## 2.0.18 + +### Patch Changes + +- waas: new contractCall transaction type +- sessions: add arweave owner + +## 2.0.17 + +### Patch Changes + +- update waas auth to clear session before signIn + +## 2.0.16 + +### Patch Changes + +- Removed Astar chains + +## 2.0.15 + +### Patch Changes + +- indexer: update bindings with token balance additions + +## 2.0.14 + +### Patch Changes + +- sessions: arweave config reader +- network: add b3 and apechain mainnet configs + +## 2.0.13 + +### Patch Changes + +- network: toy-testnet + +## 2.0.12 + +### Patch Changes + +- api: update bindings + +## 2.0.11 + +### Patch Changes + +- waas: intents test fix +- api: update bindings + +## 2.0.10 + +### Patch Changes + +- network: soneium minato testnet + +## 2.0.9 + +### Patch Changes + +- network: fix SKALE network name + +## 2.0.8 + +### Patch Changes + +- metadata: update bindings + +## 2.0.7 + +### Patch Changes + +- wallet request handler fix + +## 2.0.6 + +### Patch Changes + +- network: matic -> pol + +## 2.0.5 + +### Patch Changes + +- provider: update databeat to 0.9.2 + +## 2.0.4 + +### Patch Changes + +- network: add skale-nebula-testnet + +## 2.0.3 + +### Patch Changes + +- waas: check session status in SequenceWaaS.isSignedIn() + +## 2.0.2 + +### Patch Changes + +- sessions: property convert serialized bignumber hex value to bigint + +## 2.0.1 + +### Patch Changes + +- waas: http signature check for authenticator requests +- provider: unwrap legacy json rpc responses +- use json replacer and reviver for bigints + +## 2.0.0 + +### Major Changes + +- ethers v6 + +## 1.10.15 + +### Patch Changes + +- utils: extractProjectIdFromAccessKey + +## 1.10.14 + +### Patch Changes + +- network: add borne-testnet to allNetworks + +## 1.10.13 + +### Patch Changes + +- network: add borne testnet + +## 1.10.12 + +### Patch Changes + +- api: update bindings +- global/window -> globalThis + +## 1.10.11 + +### Patch Changes + +- waas: updated intent.gen without webrpc types, errors exported from authenticator.gen + +## 1.10.10 + +### Patch Changes + +- metadata: update bindings with new contract collections api + +## 1.10.9 + +### Patch Changes + +- waas minor update + +## 1.10.8 + +### Patch Changes + +- update metadata bindings + +## 1.10.7 + +### Patch Changes + +- minor fixes to waas client + +## 1.10.6 + +### Patch Changes + +- metadata: update bindings + +## 1.10.5 + +### Patch Changes + +- network: ape-chain-testnet -> apechain-testnet + +## 1.10.4 + +### Patch Changes + +- network: add b3-sepolia, ape-chain-testnet, blast, blast-sepolia + +## 1.10.3 + +### Patch Changes + +- typing fix + +## 1.10.2 + +### Patch Changes + +- - waas: add getIdToken method + - indexer: update api client + +## 1.10.1 + +### Patch Changes + +- metadata: update bindings + +## 1.10.0 + +### Minor Changes + +- waas release v1.3.0 + +## 1.9.37 + +### Patch Changes + +- network: adds nativeToken data to NetworkMetadata constants + +## 1.9.36 + +### Patch Changes + +- guard: export client + +## 1.9.35 + +### Patch Changes + +- guard: update bindings + +## 1.9.34 + +### Patch Changes + +- waas: always use lowercase email + +## 1.9.33 + +### Patch Changes + +- waas: umd build + +## 1.9.32 + +### Patch Changes + +- indexer: update bindings + +## 1.9.31 + +### Patch Changes + +- metadata: token directory changes + +## 1.9.30 + +### Patch Changes + +- update + +## 1.9.29 + +### Patch Changes + +- disable gnosis chain + +## 1.9.28 + +### Patch Changes + +- add utils/merkletree + +## 1.9.27 + +### Patch Changes + +- network: optimistic -> optimism +- waas: remove defaults +- api, sessions: update bindings + +## 1.9.26 + +### Patch Changes + +- - add backend interfaces for pluggable interfaces + - introduce @0xsequence/react-native + - update pnpm to lockfile v9 + +## 1.9.25 + +### Patch Changes + +- update webrpc clients with new error types + +## 1.9.24 + +### Patch Changes + +- waas: add memoryStore backend to localStore + +## 1.9.23 + +### Patch Changes + +- update api client bindings + +## 1.9.22 + +### Patch Changes + +- update metadata client bindings + +## 1.9.21 + +### Patch Changes + +- api client bindings + +## 1.9.20 + +### Patch Changes + +- api client bindings update + +## 1.9.19 + +### Patch Changes + +- waas update + +## 1.9.18 + +### Patch Changes + +- provider: prohibit dangerous functions + +## 1.9.17 + +### Patch Changes + +- network: add xr-sepolia + +## 1.9.16 + +### Patch Changes + +- waas: sequence.feeOptions + +## 1.9.15 + +### Patch Changes + +- metadata: collection external_link field name fix + +## 1.9.14 + +### Patch Changes + +- network: astar-zkatana -> astar-zkyoto +- network: deprecate polygon mumbai network +- network: add xai and polygon amoy + +## 1.9.13 + +### Patch Changes + +- waas: fix @0xsequence/network dependency + +## 1.9.12 + +### Patch Changes + +- indexer: update rpc bindings +- provider: signMessage: Serialize the BytesLike or string message into hexstring before sending +- waas: SessionAuthProof + +## 1.9.11 + +### Patch Changes + +- metdata, update rpc bindings + +## 1.9.10 + +### Patch Changes + +- update metadata rpc bindings + +## 1.9.9 + +### Patch Changes + +- metadata, add SequenceCollections rpc client + +## 1.9.8 + +### Patch Changes + +- waas client update + +## 1.9.7 + +### Patch Changes + +- update rpc client bindings for api, metadata and relayer + +## 1.9.6 + +### Patch Changes + +- waas package update + +## 1.9.5 + +### Patch Changes + +- RpcRelayer prioritize project access key + +## 1.9.4 + +### Patch Changes + +- waas: fix network dependency + +## 1.9.3 + +### Patch Changes + +- provider: don't append access key to RPC url if user has already provided it + +## 1.9.2 + +### Patch Changes + +- network: add xai-sepolia + +## 1.9.1 + +### Patch Changes + +- analytics fix + +## 1.9.0 + +### Minor Changes + +- waas release + +## 1.8.8 + +### Patch Changes + +- update metadata bindings + +## 1.8.7 + +### Patch Changes + +- provider: update databeat to 0.9.1 + +## 1.8.6 + +### Patch Changes + +- guard: SignedOwnershipProof + +## 1.8.5 + +### Patch Changes + +- guard: signOwnershipProof and isSignedOwnershipProof + +## 1.8.4 + +### Patch Changes + +- network: add homeverse to networks list + +## 1.8.3 + +### Patch Changes + +- api: introduce basic linked wallet support + +## 1.8.2 + +### Patch Changes + +- provider: don't initialize analytics unless explicitly requested + +## 1.8.1 + +### Patch Changes + +- update to analytics provider + +## 1.8.0 + +### Minor Changes + +- provider: project analytics + +## 1.7.2 + +### Patch Changes + +- 0xsequence: ChainId should not be exported as a type +- account, wallet: fix nonce selection + +## 1.7.1 + +### Patch Changes + +- network: add missing avalanche logoURI + +## 1.7.0 + +### Minor Changes + +- provider: projectAccessKey is now required + +### Patch Changes + +- network: add NetworkMetadata.logoURI property for all networks + +## 1.6.3 + +### Patch Changes + +- network list update + +## 1.6.2 + +### Patch Changes + +- auth: projectAccessKey option +- wallet: use 12 bytes for random space + +## 1.6.1 + +### Patch Changes + +- core: add simple config from subdigest support +- core: fix encode tree with subdigest +- account: implement buildOnChainSignature on Account + +## 1.6.0 + +### Minor Changes + +- account, wallet: parallel transactions by default + +### Patch Changes + +- provider: emit disconnect on sign out + +## 1.5.0 + +### Minor Changes + +- signhub: add 'signing' signer status + +### Patch Changes + +- auth: Session.open: onAccountAddress callback +- account: allow empty transaction bundles + +## 1.4.9 + +### Patch Changes + +- rename SequenceMetadataClient to SequenceMetadata + +## 1.4.8 + +### Patch Changes + +- account: Account.getSigners + +## 1.4.7 + +### Patch Changes + +- update indexer client bindings + +## 1.4.6 + +### Patch Changes + +- - add sepolia networks, mark goerli as deprecated + - update indexer client bindings + +## 1.4.5 + +### Patch Changes + +- indexer/metadata: update client bindings +- auth: selectWallet with new address + +## 1.4.4 + +### Patch Changes + +- indexer: update bindings +- auth: handle jwt expiry + +## 1.4.3 + +### Patch Changes + +- guard: return active status from GuardSigner.getAuthMethods + +## 1.4.2 + +### Patch Changes + +- guard: update bindings + +## 1.4.1 + +### Patch Changes + +- network: remove unused networks +- signhub: orchestrator interface +- guard: auth methods interface +- guard: update bindings for pin and totp +- guard: no more retry logic + +## 1.4.0 + +### Minor Changes + +- project access key support + +## 1.3.0 + +### Minor Changes + +- signhub: account children + +### Patch Changes + +- guard: do not throw when building deploy transaction +- network: snowtrace.io -> subnets.avax.network/c-chain + +## 1.2.9 + +### Patch Changes + +- account: AccountSigner.sendTransaction simulateForFeeOptions +- relayer: update bindings + +## 1.2.8 + +### Patch Changes + +- rename X-Sequence-Token-Key header to X-Access-Key + +## 1.2.7 + +### Patch Changes + +- add x-sequence-token-key to clients + +## 1.2.6 + +### Patch Changes + +- Fix bind multicall provider + +## 1.2.5 + +### Patch Changes + +- Multicall default configuration fixes + +## 1.2.4 + +### Patch Changes + +- provider: Adding missing payment provider types to PaymentProviderOption +- provider: WalletRequestHandler.notifyChainChanged + +## 1.2.3 + +### Patch Changes + +- auth, provider: connect to accept optional authorizeNonce + +## 1.2.2 + +### Patch Changes + +- provider: allow createContract calls +- core: check for explicit zero address in contract deployments + +## 1.2.1 + +### Patch Changes + +- auth: use sequence api chain id as reference chain id if available + +## 1.2.0 + +### Minor Changes + +- split services from session, better local support + +## 1.1.15 + +### Patch Changes + +- guard: remove error filtering + +## 1.1.14 + +### Patch Changes + +- guard: add GuardSigner.onError + +## 1.1.13 + +### Patch Changes + +- provider: pass client version with connect options +- provider: removing large from BannerSize + +## 1.1.12 + +### Patch Changes + +- provider: adding bannerSize to ConnectOptions + +## 1.1.11 + +### Patch Changes + +- add homeverse configs + +## 1.1.10 + +### Patch Changes + +- handle default EIP6492 on send + +## 1.1.9 + +### Patch Changes + +- Custom default EIP6492 on client + +## 1.1.8 + +### Patch Changes + +- metadata: searchMetadata: add types filter + +## 1.1.7 + +### Patch Changes + +- adding signInWith connect settings option to allow dapps to automatically login their users with a certain provider optimizing the normal authentication flow + +## 1.1.6 + +### Patch Changes + +- metadata: searchMetadata: add chainID and excludeTokenMetadata filters + +## 1.1.5 + +### Patch Changes + +- account: re-compute meta-transaction id for wallet deployment transactions + +## 1.1.4 + +### Patch Changes + +- network: rename base-mainnet to base +- provider: override isDefaultChain with ConnectOptions.networkId if provided + +## 1.1.3 + +### Patch Changes + +- provider: use network id from transport session +- provider: sign authorization using ConnectOptions.networkId if provided + +## 1.1.2 + +### Patch Changes + +- provider: jsonrpc chain id fixes + +## 1.1.1 + +### Patch Changes + +- network: add base mainnet and sepolia +- provider: reject toxic transaction requests + +## 1.1.0 + +### Minor Changes + +- Refactor dapp facing provider + +## 1.0.5 + +### Patch Changes + +- network: export network constants +- guard: use the correct global for fetch +- network: nova-explorer.arbitrum.io -> nova.arbiscan.io + +## 1.0.4 + +### Patch Changes + +- provider: accept name or number for networkId + +## 1.0.3 + +### Patch Changes + +- Simpler isValidSignature helpers + +## 1.0.2 + +### Patch Changes + +- add extra signature validation utils methods + +## 1.0.1 + +### Patch Changes + +- add homeverse testnet + +## 1.0.0 + +### Major Changes + +- https://sequence.xyz/blog/sequence-wallet-light-state-sync-full-merkle-wallets + +## 0.43.34 + +### Patch Changes + +- auth: no jwt for indexer + +## 0.43.33 + +### Patch Changes + +- Adding onConnectOptionsChange handler to WalletRequestHandler + +## 0.43.32 + +### Patch Changes + +- add Base Goerli network + +## 0.43.31 + +### Patch Changes + +- remove AuxDataProvider, add promptSignInConnect + +## 0.43.30 + +### Patch Changes + +- add arbitrum goerli testnet + +## 0.43.29 + +### Patch Changes + +- provider: check availability of window object + +## 0.43.28 + +### Patch Changes + +- update api bindings + +## 0.43.27 + +### Patch Changes + +- Add rpc is sequence method + +## 0.43.26 + +### Patch Changes + +- add zkevm url to enum + +## 0.43.25 + +### Patch Changes + +- added polygon zkevm to mainnet networks + +## 0.43.24 + +### Patch Changes + +- name change from zkevm to polygon-zkevm + +## 0.43.23 + +### Patch Changes + +- update zkEVM name to Polygon zkEVM + +## 0.43.22 + +### Patch Changes + +- add zkevm chain + +## 0.43.21 + +### Patch Changes + +- api: update client bindings + +## 0.43.20 + +### Patch Changes + +- indexer: update bindings + +## 0.43.19 + +### Patch Changes + +- session proof update + +## 0.43.18 + +### Patch Changes + +- rpc client global check, hardening + +## 0.43.17 + +### Patch Changes + +- rpc clients, check of 'global' is defined + +## 0.43.16 + +### Patch Changes + +- ethers peerDep to v5, update rpc client global use + +## 0.43.15 + +### Patch Changes + +- - provider: expand receiver type on some util methods + +## 0.43.14 + +### Patch Changes + +- bump + +## 0.43.13 + +### Patch Changes + +- update rpc bindings + +## 0.43.12 + +### Patch Changes + +- provider: single wallet init, and add new unregisterWallet() method + +## 0.43.11 + +### Patch Changes + +- fix lockfiles +- re-add mocha type deleter + +## 0.43.10 + +### Patch Changes + +- various improvements + +## 0.43.9 + +### Patch Changes + +- update deps + +## 0.43.8 + +### Patch Changes + +- network: JsonRpcProvider with caching + +## 0.43.7 + +### Patch Changes + +- provider: fix wallet network init + +## 0.43.6 + +### Patch Changes + +- metadatata: update rpc bindings + +## 0.43.5 + +### Patch Changes + +- provider: do not set default network for connect messages +- provider: forward missing error message + +## 0.43.4 + +### Patch Changes + +- no-change version bump to fix incorrectly tagged snapshot build + +## 0.43.3 + +### Patch Changes + +- metadata: update bindings + +## 0.43.2 + +### Patch Changes + +- provider: implement connectUnchecked + +## 0.43.1 + +### Patch Changes + +- update to latest ethauth dep + +## 0.43.0 + +### Minor Changes + +- move ethers to a peer dependency + +## 0.42.10 + +### Patch Changes + +- add auxDataProvider + +## 0.42.9 + +### Patch Changes + +- provider: add eip-191 exceptions + +## 0.42.8 + +### Patch Changes + +- provider: skip setting intent origin if we're unity plugin + +## 0.42.7 + +### Patch Changes + +- Add sign in options to connection settings + +## 0.42.6 + +### Patch Changes + +- api bindings update + +## 0.42.5 + +### Patch Changes + +- relayer: don't treat missing receipt as hard failure + +## 0.42.4 + +### Patch Changes + +- provider: add custom app protocol to connect options + +## 0.42.3 + +### Patch Changes + +- update api bindings + +## 0.42.2 + +### Patch Changes + +- disable rinkeby network + +## 0.42.1 + +### Patch Changes + +- wallet: optional waitForReceipt parameter + +## 0.42.0 + +### Minor Changes + +- relayer: estimateGasLimits -> simulate +- add simulator package + +### Patch Changes + +- transactions: fix flattenAuxTransactions +- provider: only filter nullish values +- provider: re-map transaction 'gas' back to 'gasLimit' + +## 0.41.3 + +### Patch Changes + +- api bindings update + +## 0.41.2 + +### Patch Changes + +- api bindings update + +## 0.41.1 + +### Patch Changes + +- update default networks + +## 0.41.0 + +### Minor Changes + +- relayer: fix Relayer.wait() interface + + The interface for calling Relayer.wait() has changed. Instead of a single optional ill-defined timeout/delay parameter, there are three optional parameters, in order: + + - timeout: the maximum time to wait for the transaction receipt + - delay: the polling interval, i.e. the time to wait between requests + - maxFails: the maximum number of hard failures to tolerate before giving up + + Please update your codebase accordingly. + +- relayer: add optional waitForReceipt parameter to Relayer.relay + + The behaviour of Relayer.relay() was not well-defined with respect to whether or not it waited for a receipt. + This change allows the caller to specify whether to wait or not, with the default behaviour being to wait. + +### Patch Changes + +- relayer: wait receipt retry logic +- fix wrapped object error +- provider: forward delegateCall and revertOnError transaction fields + +## 0.40.6 + +### Patch Changes + +- add arbitrum-nova chain + +## 0.40.5 + +### Patch Changes + +- api: update bindings + +## 0.40.4 + +### Patch Changes + +- add unreal transport + +## 0.40.3 + +### Patch Changes + +- provider: fix MessageToSign message type + +## 0.40.2 + +### Patch Changes + +- Wallet provider, loadSession method + +## 0.40.1 + +### Patch Changes + +- export sequence.initWallet and sequence.getWallet + +## 0.40.0 + +### Minor Changes + +- add sequence.initWallet(network, config) and sequence.getWallet() helper methods + +## 0.39.6 + +### Patch Changes + +- indexer: update client bindings + +## 0.39.5 + +### Patch Changes + +- provider: fix networkRpcUrl config option + +## 0.39.4 + +### Patch Changes + +- api: update client bindings + +## 0.39.3 + +### Patch Changes + +- add request method on Web3Provider + +## 0.39.2 + +### Patch Changes + +- update umd name + +## 0.39.1 + +### Patch Changes + +- add Aurora network +- add origin info for accountsChanged event to handle it per dapp + +## 0.39.0 + +### Minor Changes + +- abstract window.localStorage to interface type + +## 0.38.2 + +### Patch Changes + +- provider: add Settings.defaultPurchaseAmount + +## 0.38.1 + +### Patch Changes + +- update api and metadata rpc bindings + +## 0.38.0 + +### Minor Changes + +- api: update bindings, change TokenPrice interface +- bridge: remove @0xsequence/bridge package +- api: update bindings, rename ContractCallArg to TupleComponent + +## 0.37.1 + +### Patch Changes + +- Add back sortNetworks - Removing sorting was a breaking change for dapps on older versions which directly integrate sequence. + +## 0.37.0 + +### Minor Changes + +- network related fixes and improvements +- api: bindings: exchange rate lookups + +## 0.36.13 + +### Patch Changes + +- api: update bindings with new price endpoints + +## 0.36.12 + +### Patch Changes + +- wallet: skip remote signers if not needed +- auth: check that signature meets threshold before requesting auth token + +## 0.36.11 + +### Patch Changes + +- Prefix EIP191 message on wallet-request-handler + +## 0.36.10 + +### Patch Changes + +- support bannerUrl on connect + +## 0.36.9 + +### Patch Changes + +- minor dev xp improvements + +## 0.36.8 + +### Patch Changes + +- more connect options (theme, payment providers, funding currencies) + +## 0.36.7 + +### Patch Changes + +- fix missing break + +## 0.36.6 + +### Patch Changes + +- wallet_switchEthereumChain support + +## 0.36.5 + +### Patch Changes + +- auth: bump ethauth to 0.7.0 + network, wallet: don't assume position of auth network in list + api/indexer/metadata: trim trailing slash on hostname, and add endpoint urls + relayer: Allow to specify local relayer transaction parameters like gas price or gas limit + +## 0.36.4 + +### Patch Changes + +- Updating list of chain ids to include other ethereum compatible chains + +## 0.36.3 + +### Patch Changes + +- provider: pass connect options to prompter methods + +## 0.36.2 + +### Patch Changes + +- transactions: Setting target to 0x0 when empty to during SequenceTxAbiEncode + +## 0.36.1 + +### Patch Changes + +- metadata: update client with more fields + +## 0.36.0 + +### Minor Changes + +- relayer, wallet: fee quote support + +## 0.35.12 + +### Patch Changes + +- provider: rename wallet.commands to wallet.utils + +## 0.35.11 + +### Patch Changes + +- provider/utils: smoother message validation + +## 0.35.10 + +### Patch Changes + +- upgrade deps + +## 0.35.9 + +### Patch Changes + +- provider: window-transport override event handlers with new wallet instance + +## 0.35.8 + +### Patch Changes + +- provider: async wallet sign in improvements + +## 0.35.7 + +### Patch Changes + +- config: cache wallet configs + +## 0.35.6 + +### Patch Changes + +- provider: support async signin of wallet request handler + +## 0.35.5 + +### Patch Changes + +- wallet: skip threshold check during fee estimation + +## 0.35.4 + +### Patch Changes + +- - browser extension mode, center window + +## 0.35.3 + +### Patch Changes + +- - update window position when in browser extension mode + +## 0.35.2 + +### Patch Changes + +- - provider: WindowMessageHandler accept optional windowHref + +## 0.35.1 + +### Patch Changes + +- wallet: update config on undeployed too + +## 0.35.0 + +### Minor Changes + +- - config: add buildStubSignature + - provider: add checks to signing cases for wallet deployment and config statuses + - provider: add prompt for wallet deployment + - relayer: add BaseRelayer.prependWalletDeploy + - relayer: add Relayer.feeOptions + - relayer: account for wallet deployment in fee estimation + - transactions: add fromTransactionish + - wallet: add Account.prependConfigUpdate + - wallet: add Account.getFeeOptions + +## 0.34.0 + +### Minor Changes + +- - upgrade deps + +## 0.33.1 + +### Patch Changes + +- update bindings + +## 0.31.0 + +### Minor Changes + +- - upgrading to ethers v5.5 + +## 0.30.0 + +### Minor Changes + +- - upgrade most deps + +## 0.29.9 + +### Patch Changes + +- update client + +## 0.29.8 + +### Patch Changes + +- update api + +## 0.29.4 + +### Patch Changes + +- api: update rpc bindings + +## 0.29.1 + +### Patch Changes + +- metadata: ContractInfo.decimals is now optional, i.e. may be undefined + + api: new APIs for user storage and isUsingGoogleMail + +## 0.29.0 + +### Minor Changes + +- major architectural changes in Sequence design + + - only one API instance, API is no longer a per-chain service + - separate per-chain indexer service, API no longer handles indexing + - single contract metadata service, API no longer serves metadata + + chaind package has been removed, indexer and metadata packages have been added + + stronger typing with new explicit ChainId type + + multicall fixes and improvements + + forbid "wait" transactions in sendTransactionBatch calls + +## 0.28.0 + +### Minor Changes + +- extension provider + +## 0.27.0 + +### Minor Changes + +- Add requireFreshSigner lib to sessions + +## 0.25.1 + +### Patch Changes + +- Fix build typescrypt issue + +## 0.25.0 + +### Minor Changes + +- 10c8af8: Add estimator package + Fix multicall few calls bug + +## 0.24.0 + +### Minor Changes + +- pass wallet config and nonce to GetMetaTxnNetworkFeeOptions + +## 0.23.0 + +### Minor Changes + +- - relayer: offer variety of gas fee options from the relayer service" + +## 0.22.2 + +### Patch Changes + +- e1c109e: Fix authProof on expired sessions + +## 0.22.1 + +### Patch Changes + +- transport session cache + +## 0.22.0 + +### Minor Changes + +- e667b65: Expose all relayer options on networks + +## 0.21.5 + +### Patch Changes + +- Give priority to metaTxnId returned by relayer + +## 0.21.4 + +### Patch Changes + +- Add has enough signers method + +## 0.21.3 + +### Patch Changes + +- add window session cache + +## 0.21.2 + +### Patch Changes + +- exception handlind in relayer + +## 0.21.0 + +### Minor Changes + +- - fix gas estimation on wallets with large number of signers + - update to session handling and wallet config construction upon auth + +## 0.20.0 + +### Minor Changes + +- revert JWT request piggybacking + +## 0.19.3 + +### Patch Changes + +- jwtAuth visibility, package version sync + +## 0.19.0 + +### Minor Changes + +- - provider, improve dapp / wallet transport io + +## 0.18.0 + +### Minor Changes + +- relayer improvements and pending transaction handling + +## 0.17.0 + +### Minor Changes + +- ArcadeumAPIClient no longer exposes jwtAuth + +## 0.16.1 + +### Patch Changes + +- api: add legacy types for bw compat + +## 0.16.0 + +### Minor Changes + +- relayer as its own service separate from chaind + +## 0.15.1 + +### Patch Changes + +- update api clients + +## 0.15.0 + +### Patch Changes + +- - update chaind and api bindings + - replace EstimateMetaTxnGasReceipt with UpdateMetaTxnGasLimits and GetMetaTxnNetworkFeeOptions + +## 0.14.3 + +### Patch Changes + +- Fix 0xSequence relayer dependencies + +## 0.14.2 + +### Patch Changes + +- Add debug logs to rpc-relayer + +## 0.14.1 + +### Patch Changes + +- update api client + +## 0.14.0 + +### Minor Changes + +- update sequence utils finder which includes optimization + +## 0.13.0 + +### Minor Changes + +- Update SequenceUtils deployed contract + +## 0.12.1 + +### Patch Changes + +- npm bump + +## 0.12.0 + +### Minor Changes + +- provider: improvements to window transport + +## 0.11.4 + +### Patch Changes + +- update api client + +## 0.11.3 + +### Patch Changes + +- improve openWindow state options handling + +## 0.11.2 + +### Patch Changes + +- Fix multicall proxy scopes + +## 0.11.1 + +### Patch Changes + +- Add support for dynamic and nested signatures + +## 0.11.0 + +### Minor Changes + +- Update wallet context to 1.7 contracts + +## 0.10.9 + +### Patch Changes + +- add support for public addresses as signers in session.open + +## 0.10.8 + +### Patch Changes + +- Multicall production configuration + +## 0.10.7 + +### Patch Changes + +- allow provider transport to force disconnect + +## 0.10.6 + +### Patch Changes + +- - fix getWalletState method + +## 0.10.5 + +### Patch Changes + +- update relayer gas refund options + +## 0.10.4 + +### Patch Changes + +- Update api proto + +## 0.10.3 + +### Patch Changes + +- Fix loading config cross-chain + +## 0.10.2 + +### Patch Changes + +- - message digest fix + +## 0.10.1 + +### Patch Changes + +- upgrade deps + +## 0.10.0 + +### Minor Changes + +- Deployed new contracts with ERC1271 signer support + +## 0.9.6 + +### Patch Changes + +- Update ABIs for latest sequence contracts + +## 0.9.5 + +### Patch Changes + +- Implemented session class + +## 0.9.3 + +### Patch Changes + +- - minor improvements + +## 0.9.2 + +### Patch Changes + +- - Update api client + +## 0.9.1 + +### Patch Changes + +- - patch bump + +## 0.9.0 + +### Minor Changes + +- - provider transport hardening + +## 0.8.5 + +### Patch Changes + +- - use latest wallet-contracts + +## 0.8.4 + +### Patch Changes + +- - minor improvements, name updates and comments + +## 0.8.3 + +### Patch Changes + +- - refinements + + - normalize signer address in config + + - provider: getWalletState() method to WalletProvider + +## 0.8.2 + +### Patch Changes + +- - field rename and ethauth dependency bump + +## 0.8.1 + +### Patch Changes + +- - variety of optimizations + +## 0.8.0 + +### Minor Changes + +- - changeset fix + +## 0.7.0 + +### Patch Changes + +- 6f11ed7: sequence.js, init release diff --git a/packages/services/api/README.md b/packages/services/api/README.md new file mode 100644 index 000000000..1e3d3fdd3 --- /dev/null +++ b/packages/services/api/README.md @@ -0,0 +1,3 @@ +# @0xsequence/api + +See [0xsequence project page](https://github.com/0xsequence/sequence.js). diff --git a/packages/services/api/package.json b/packages/services/api/package.json new file mode 100644 index 000000000..39b5d575f --- /dev/null +++ b/packages/services/api/package.json @@ -0,0 +1,27 @@ +{ + "name": "@0xsequence/api", + "version": "3.0.0", + "description": "api sub-package for Sequence", + "repository": "https://github.com/0xsequence/sequence.js/tree/master/packages/api", + "author": "Sequence Platforms Inc.", + "license": "Apache-2.0", + "scripts": { + "build": "tsc", + "dev": "tsc --watch", + "test": "echo", + "typecheck": "tsc --noEmit" + }, + "exports": { + ".": { + "types": "./src/index.ts", + "default": "./dist/index.js" + } + }, + "peerDependencies": {}, + "devDependencies": { + "@repo/typescript-config": "workspace:^", + "@types/node": "^22.13.9", + "typescript": "^5.7.3" + }, + "dependencies": {} +} diff --git a/packages/services/api/src/api.gen.ts b/packages/services/api/src/api.gen.ts new file mode 100644 index 000000000..5366159cb --- /dev/null +++ b/packages/services/api/src/api.gen.ts @@ -0,0 +1,3724 @@ +/* eslint-disable */ +// sequence-api v0.4.0 2409c101bc62a1b7aa797e099d913b1c4046e9f6 +// -- +// Code generated by webrpc-gen@v0.24.0 with typescript generator. DO NOT EDIT. +// +// webrpc-gen -schema=api.ridl -target=typescript -client -out=./clients/api.gen.ts + +export const WebrpcHeader = 'Webrpc' + +export const WebrpcHeaderValue = 'webrpc@v0.24.0;gen-typescript@v0.16.3;sequence-api@v0.4.0' + +// WebRPC description and code-gen version +export const WebRPCVersion = 'v1' + +// Schema version of your RIDL schema +export const WebRPCSchemaVersion = 'v0.4.0' + +// Schema hash generated from your RIDL schema +export const WebRPCSchemaHash = '2409c101bc62a1b7aa797e099d913b1c4046e9f6' + +type WebrpcGenVersions = { + webrpcGenVersion: string + codeGenName: string + codeGenVersion: string + schemaName: string + schemaVersion: string +} + +export function VersionFromHeader(headers: Headers): WebrpcGenVersions { + const headerValue = headers.get(WebrpcHeader) + if (!headerValue) { + return { + webrpcGenVersion: '', + codeGenName: '', + codeGenVersion: '', + schemaName: '', + schemaVersion: '', + } + } + + return parseWebrpcGenVersions(headerValue) +} + +function parseWebrpcGenVersions(header: string): WebrpcGenVersions { + const versions = header.split(';') + if (versions.length < 3) { + return { + webrpcGenVersion: '', + codeGenName: '', + codeGenVersion: '', + schemaName: '', + schemaVersion: '', + } + } + + const [_, webrpcGenVersion] = versions[0]!.split('@') + const [codeGenName, codeGenVersion] = versions[1]!.split('@') + const [schemaName, schemaVersion] = versions[2]!.split('@') + + return { + webrpcGenVersion: webrpcGenVersion ?? '', + codeGenName: codeGenName ?? '', + codeGenVersion: codeGenVersion ?? '', + schemaName: schemaName ?? '', + schemaVersion: schemaVersion ?? '', + } +} + +// +// Types +// + +export enum SortOrder { + DESC = 'DESC', + ASC = 'ASC', +} + +export enum SardinePaymentType { + ach = 'ach', + debit = 'debit', + credit = 'credit', + us_debit = 'us_debit', + international_debit = 'international_debit', + international_credit = 'international_credit', +} + +export enum SardineQuoteType { + buy = 'buy', + sell = 'sell', +} + +export enum TokenType { + ERC20 = 'ERC20', + ERC721 = 'ERC721', + ERC1155 = 'ERC1155', +} + +export enum TransakBuySell { + UNKNOWN = 'UNKNOWN', + BUY = 'BUY', + SELL = 'SELL', +} + +export interface Version { + webrpcVersion: string + schemaVersion: string + schemaHash: string + appVersion: string +} + +export interface RuntimeStatus { + healthOK: boolean + startTime: string + uptime: number + ver: string + branch: string + commitHash: string + checks: RuntimeChecks + numTxnsRelayed: { [key: string]: NumTxnsRelayed } +} + +export interface NumTxnsRelayed { + chainID: number + prev: number + current: number + period: number +} + +export interface RuntimeChecks {} + +export interface SequenceContext { + factory: string + mainModule: string + mainModuleUpgradable: string + guestModule: string + utils: string +} + +export interface PublicKey { + id: string + x: string + y: string +} + +export interface User { + address: string + username: string + avatar: string + bio: string + location: string + locale: string + backup?: boolean + backupConfirmed?: boolean + maxInvites?: number + updatedAt?: string + createdAt?: string +} + +export interface WalletBackup { + accountAddress: string + secretHash: string + encryptedWallet: string + userConfirmed: boolean + updatedAt?: string + createdAt?: string +} + +export interface Friend { + id: number + userAddress: string + friendAddress: string + nickname: string + user?: User + createdAt?: string +} + +export interface InviteCode { + usesLeft: number + ownerAccount: string + email?: string + url: string + createdAt?: string + expiresAt?: string +} + +export interface InviteCodeAccount { + claimedByUserAddress: string + claimedAt?: string +} + +export interface InviteInfo { + expiryInHours: number + max: number + invites: Array +} + +export interface ContractCall { + signature: string + function: string + args: Array +} + +export interface TupleComponent { + name?: string + type: string + value: any +} + +export interface IntentPrecondition { + type: string + chainID: string + data: any +} + +export interface IntentSolution { + transactions: Array +} + +export interface Transactions { + chainID: string + transactions: Array + preconditions?: Array +} + +export interface Transaction { + delegateCall: boolean + revertOnError: boolean + gasLimit: string + target: string + value: string + data: string +} + +export interface UserStorage { + userAddress: string + key: string + value: any +} + +export interface Token { + chainId: number + contractAddress: string + tokenId?: string +} + +export interface Price { + value: number + currency: string +} + +export interface TokenPrice { + token: Token + price?: Price + price24hChange?: Price + floorPrice: Price + buyPrice: Price + sellPrice: Price + updatedAt: string +} + +export interface ExchangeRate { + name: string + symbol: string + value: number + vsCurrency: string + currencyType: string +} + +export interface LinkedWallet { + id: number + walletType?: string + walletAddress: string + linkedWalletAddress: string + createdAt?: string +} + +export interface Page { + pageSize?: number + page?: number + totalRecords?: number + column?: string + before?: any + after?: any + sort?: Array + more?: boolean +} + +export interface SortBy { + column: string + order: SortOrder +} + +export interface SardineNFTCheckoutParams { + name: string + imageUrl: string + network: string + recipientAddress: string + blockchainNftId: string + contractAddress: string + quantity: number + decimals?: number + tokenAmount: string + tokenAddress: string + tokenSymbol: string + tokenDecimals?: number + calldata: string + platform: string + approvedSpenderAddress?: string +} + +export interface SardineNFTCheckout { + token: string + expiresAt: string + orderId: string +} + +export interface SardineOrder { + id: string + createdAt?: string + referenceId: string + status: string + fiatCurrency: string + fiatExchangeRateUSD: number + transactionId: string + expiresAt?: string + total: number + subTotal: number + transactionFee: number + networkFee: number + paymentCurrency?: string + paymentMethodType?: string + transactionType: string + name: string + price: number + imageUrl: string + contractAddress?: string + transactionHash?: string + recipientAddress: string +} + +export interface SardineRegion { + countryCode: string + isAllowedOnRamp: boolean + isAllowedOnNFT: boolean + isBasicKycRequired: Array + isSsnRequired: Array + name: string + currencyCode: string + isPayrollSupported: boolean + supportedDocuments: Array + paymentMethods: Array + states: Array +} + +export interface SardineRegionPaymentMethod { + name: string + isAllowedOnRamp: boolean + isAllowedOnNFT: boolean + subTypes: Array + type: string + subType: string +} + +export interface SardineRegionState { + code: string + name: string + isAllowedOnRamp: boolean + isAllowedOnNFT: boolean +} + +export interface SardineSupportedToken { + network: string + assetSymbol: string + assetName: string + chainId: string + tokenName: string + token: string + tokenAddress: string +} + +export interface SardineSupportedTokenForSwap { + isSupported: boolean + isSupportedForAbstraction: boolean + currentBalance: string +} + +export interface SardineEnabledToken { + network: string + assetSymbol: string + assetName: string + chainId: string + tokenName: string + token: string + tokenAddress: string +} + +export interface SardineGetQuoteParams { + assetType: string + network: string + total: number + currency?: string + paymentType?: SardinePaymentType + quoteType?: SardineQuoteType + walletAddress?: string +} + +export interface SardineQuote { + quantity: number + network: string + assetType: string + total: number + currency: string + expiresAt: string + paymentType: string + price: number + subtotal: number + transactionFee: number + networkFee: number + highNetworkFee: boolean + minTransactionValue: number + maxTransactionValue: number + liquidityProvider: string +} + +export interface SardineFiatCurrency { + currencyCode: string + name: string + currencySymbol: string + paymentOptions: Array + supportingCountries: Array +} + +export interface SardinePaymentOption { + name: string + dailyLimit: number + weeklyLimit: number + monthlyLimit: number + maxAmount: number + minAmount: number + subTypes: Array + type: string + subType: string + processingTime: string +} + +export interface SwapPermit2Price { + currencyAddress: string + currencyBalance: string + price: string + maxPrice: string + transactionValue: string +} + +export interface SwapPermit2Quote { + currencyAddress: string + currencyBalance: string + price: string + maxPrice: string + to: string + transactionData: string + transactionValue: string + approveData: string +} + +export interface SwapPrice { + currencyAddress: string + currencyBalance: string + price: string + maxPrice: string + transactionValue: string +} + +export interface SwapQuote { + currencyAddress: string + currencyBalance: string + price: string + maxPrice: string + to: string + transactionData: string + transactionValue: string + approveData: string +} + +export interface CurrencyGroup { + name: string + tokens: Array +} + +export interface CurrencyGroupToken { + chainId: number + tokenAddress: string +} + +export interface OffchainInventory { + id: number + projectId: number + chainId: number + externalProductId: string + paymentTokenAddress: string + paymentTokenType: TokenType + paymentTokenId: number + paymentAmount: number + paymentRecipient: string + chainedCallAddress?: string + chainedCallData?: string + allowCrossChainPayments?: boolean + callbackURL?: string + createdAt: string + deletedAt?: string +} + +export interface OffchainPayment { + id: number + offchainInventoryId: number + productRecipient: string + paymentChainId: number + paymentTokenAddress: string + expiration: string + createdAt: string + completedAt?: string + processedAt?: string +} + +export interface PaymentResponse { + paymentId: number + offchainInventoryId: number + chainId: number + externalProductId: string + paymentTokenAddress: string + paymentTokenType: TokenType + paymentTokenId: number + paymentTotal: number + expiration: string + signature: string + txTo: string + txData: string +} + +export interface AdoptedChildWallet { + address: string +} + +export interface Pack { + id: number + chainId: number + projectId: number + contractAddress: string + content: Array + createdAt?: string +} + +export interface PackContent { + tokenAddresses: Array + tokenIds: Array> + amounts: Array> +} + +export interface TransakCountry { + alpha2: string + alpha3: string + isAllowed: boolean + isLightKycAllowed: boolean + name: string + currencyCode: string + supportedDocuments: Array + partners: Array + states: Array +} + +export interface TransakPartner { + name: string + isCardPayment: boolean + currencyCode: string +} + +export interface TransakState { + code: string + name: string + isAllowed: boolean +} + +export interface TransakCryptoCurrency { + id: string + coinID: string + address: string + addressAdditionalData: any + createdAt: string + decimals: number + image: TransakCryptoCurrencyImage + isAllowed: boolean + isPopular: boolean + isStable: boolean + name: string + roundOff: number + symbol: string + isIgnorePriceVerification: boolean + imageBk: TransakCryptoCurrencyImage + kycCountriesNotSupported: Array + network: TransakCryptoCurrencyNetwork + uniqueID: string + tokenType: string + tokenIdentifier: string + isPayInAllowed: boolean + isSuspended: boolean +} + +export interface TransakCryptoCurrencyImage { + large: string + small: string + thumb: string +} + +export interface TransakCryptoCurrencyNetwork { + name: string + fiatCurrenciesNotSupported: Array + chainID: string +} + +export interface TransakCryptoCurrencyNetworkFiatNotSupported { + fiatCurrency: string + paymentMethod: string +} + +export interface TransakFiatCurrency { + symbol: string + supportingCountries: Array + logoSymbol: string + name: string + paymentOptions: Array + isPopular: boolean + isAllowed: boolean + roundOff: number + isPayOutAllowed: boolean + defaultCountryForNFT: string + icon: string + displayMessage: string +} + +export interface TransakFiatCurrencyPaymentOption { + name: string + id: string + isNftAllowed: boolean + isNonCustodial: boolean + processingTime: string + displayText: boolean + icon: string + limitCurrency: string + isActive: boolean + provider: string + maxAmount: number + minAmount: number + defaultAmount: number + isConverted: boolean + visaPayoutCountries: Array + mastercardPayoutCountries: Array + isPayOutAllowed: boolean + minAmountForPayOut: number + maxAmountForPayOut: number + defaultAmountForPayOut: number +} + +export interface TransakPrice { + quoteID: string + conversionPrice: number + marketConversionPrice: number + slippage: number + fiatCurrency: string + cryptoCurrency: string + paymentMethod: string + fiatAmount: number + cryptoAmount: number + isBuyOrSell: string + network: string + feeDecimal: number + totalFee: number + feeBreakdown: Array + nonce: number + cryptoLiquidityProvider: string + notes: Array +} + +export interface TransakPriceFeeBreakdown { + Name: string + Value: number + ID: string + Ids: Array +} + +export interface TransakGetPriceParams { + fiatCurrency: string + cryptoCurrency: string + isBuyOrSell: TransakBuySell + network: string + paymentMethod: string + fiatAmount: number + cryptoAmount: number + quoteCountryCode: string +} + +export interface TransakChain { + name: string + chainId: number +} + +export interface API { + ping(headers?: object, signal?: AbortSignal): Promise + version(headers?: object, signal?: AbortSignal): Promise + runtimeStatus(headers?: object, signal?: AbortSignal): Promise + clock(headers?: object, signal?: AbortSignal): Promise + getSequenceContext(headers?: object, signal?: AbortSignal): Promise + getAuthToken(args: GetAuthTokenArgs, headers?: object, signal?: AbortSignal): Promise + getAuthToken2(args: GetAuthToken2Args, headers?: object, signal?: AbortSignal): Promise + sendPasswordlessLink( + args: SendPasswordlessLinkArgs, + headers?: object, + signal?: AbortSignal, + ): Promise + registerPublicKey( + args: RegisterPublicKeyArgs, + headers?: object, + signal?: AbortSignal, + ): Promise + getPublicKey(args: GetPublicKeyArgs, headers?: object, signal?: AbortSignal): Promise + friendList(args: FriendListArgs, headers?: object, signal?: AbortSignal): Promise + getFriendByAddress( + args: GetFriendByAddressArgs, + headers?: object, + signal?: AbortSignal, + ): Promise + searchFriends(args: SearchFriendsArgs, headers?: object, signal?: AbortSignal): Promise + addFriend(args: AddFriendArgs, headers?: object, signal?: AbortSignal): Promise + updateFriendNickname( + args: UpdateFriendNicknameArgs, + headers?: object, + signal?: AbortSignal, + ): Promise + removeFriend(args: RemoveFriendArgs, headers?: object, signal?: AbortSignal): Promise + contractCall(args: ContractCallArgs, headers?: object, signal?: AbortSignal): Promise + decodeContractCall( + args: DecodeContractCallArgs, + headers?: object, + signal?: AbortSignal, + ): Promise + lookupContractCallSelectors( + args: LookupContractCallSelectorsArgs, + headers?: object, + signal?: AbortSignal, + ): Promise + userStorageFetch(args: UserStorageFetchArgs, headers?: object, signal?: AbortSignal): Promise + userStorageSave(args: UserStorageSaveArgs, headers?: object, signal?: AbortSignal): Promise + userStorageDelete( + args: UserStorageDeleteArgs, + headers?: object, + signal?: AbortSignal, + ): Promise + userStorageFetchAll( + args: UserStorageFetchAllArgs, + headers?: object, + signal?: AbortSignal, + ): Promise + getMoonpayLink(args: GetMoonpayLinkArgs, headers?: object, signal?: AbortSignal): Promise + resolveENSAddress( + args: ResolveENSAddressArgs, + headers?: object, + signal?: AbortSignal, + ): Promise + isValidSignature(args: IsValidSignatureArgs, headers?: object, signal?: AbortSignal): Promise + isValidMessageSignature( + args: IsValidMessageSignatureArgs, + headers?: object, + signal?: AbortSignal, + ): Promise + isValidTypedDataSignature( + args: IsValidTypedDataSignatureArgs, + headers?: object, + signal?: AbortSignal, + ): Promise + isValidETHAuthProof( + args: IsValidETHAuthProofArgs, + headers?: object, + signal?: AbortSignal, + ): Promise + sardineGetClientToken(headers?: object, signal?: AbortSignal): Promise + sardineGetNFTCheckoutToken( + args: SardineGetNFTCheckoutTokenArgs, + headers?: object, + signal?: AbortSignal, + ): Promise + sardineGetNFTCheckoutOrderStatus( + args: SardineGetNFTCheckoutOrderStatusArgs, + headers?: object, + signal?: AbortSignal, + ): Promise + sardineGetSupportedRegions(headers?: object, signal?: AbortSignal): Promise + sardineGetSupportedFiatCurrencies( + headers?: object, + signal?: AbortSignal, + ): Promise + sardineGetSupportedTokens(headers?: object, signal?: AbortSignal): Promise + sardineGetSupportedTokenForSwap( + args: SardineGetSupportedTokenForSwapArgs, + headers?: object, + signal?: AbortSignal, + ): Promise + sardineGetEnabledTokens(headers?: object, signal?: AbortSignal): Promise + sardineGetQuote(args: SardineGetQuoteArgs, headers?: object, signal?: AbortSignal): Promise + getSardineClientToken(headers?: object, signal?: AbortSignal): Promise + getSardineNFTCheckoutToken( + args: GetSardineNFTCheckoutTokenArgs, + headers?: object, + signal?: AbortSignal, + ): Promise + getSardineNFTCheckoutOrderStatus( + args: GetSardineNFTCheckoutOrderStatusArgs, + headers?: object, + signal?: AbortSignal, + ): Promise + transakGetCountries(headers?: object, signal?: AbortSignal): Promise + transakGetCryptoCurrencies(headers?: object, signal?: AbortSignal): Promise + transakGetFiatCurrencies(headers?: object, signal?: AbortSignal): Promise + transakGetPrice(args: TransakGetPriceArgs, headers?: object, signal?: AbortSignal): Promise + transakGetSupportedNFTCheckoutChains( + headers?: object, + signal?: AbortSignal, + ): Promise + getCoinPrices(args: GetCoinPricesArgs, headers?: object, signal?: AbortSignal): Promise + getCollectiblePrices( + args: GetCollectiblePricesArgs, + headers?: object, + signal?: AbortSignal, + ): Promise + getExchangeRate(args: GetExchangeRateArgs, headers?: object, signal?: AbortSignal): Promise + memoryStore(args: MemoryStoreArgs, headers?: object, signal?: AbortSignal): Promise + memoryLoad(args: MemoryLoadArgs, headers?: object, signal?: AbortSignal): Promise + getInviteInfo(headers?: object, signal?: AbortSignal): Promise + isValidAccessCode( + args: IsValidAccessCodeArgs, + headers?: object, + signal?: AbortSignal, + ): Promise + internalClaimAccessCode( + args: InternalClaimAccessCodeArgs, + headers?: object, + signal?: AbortSignal, + ): Promise + blockNumberAtTime( + args: BlockNumberAtTimeArgs, + headers?: object, + signal?: AbortSignal, + ): Promise + paperSessionSecret( + args: PaperSessionSecretArgs, + headers?: object, + signal?: AbortSignal, + ): Promise + paperSessionSecret2( + args: PaperSessionSecret2Args, + headers?: object, + signal?: AbortSignal, + ): Promise + linkWallet(args: LinkWalletArgs, headers?: object, signal?: AbortSignal): Promise + getLinkedWallets(args: GetLinkedWalletsArgs, headers?: object, signal?: AbortSignal): Promise + removeLinkedWallet( + args: RemoveLinkedWalletArgs, + headers?: object, + signal?: AbortSignal, + ): Promise + generateWaaSVerificationURL( + args: GenerateWaaSVerificationURLArgs, + headers?: object, + signal?: AbortSignal, + ): Promise + validateWaaSVerificationNonce( + args: ValidateWaaSVerificationNonceArgs, + headers?: object, + signal?: AbortSignal, + ): Promise + listAdoptedWallets( + args: ListAdoptedWalletsArgs, + headers?: object, + signal?: AbortSignal, + ): Promise + getSwapPermit2Price( + args: GetSwapPermit2PriceArgs, + headers?: object, + signal?: AbortSignal, + ): Promise + getSwapPermit2Prices( + args: GetSwapPermit2PricesArgs, + headers?: object, + signal?: AbortSignal, + ): Promise + getSwapPermit2Quote( + args: GetSwapPermit2QuoteArgs, + headers?: object, + signal?: AbortSignal, + ): Promise + getSwapPrice(args: GetSwapPriceArgs, headers?: object, signal?: AbortSignal): Promise + getSwapPrices(args: GetSwapPricesArgs, headers?: object, signal?: AbortSignal): Promise + getSwapQuote(args: GetSwapQuoteArgs, headers?: object, signal?: AbortSignal): Promise + getSwapQuoteV2(args: GetSwapQuoteV2Args, headers?: object, signal?: AbortSignal): Promise + intentQuery(args: IntentQueryArgs, headers?: object, signal?: AbortSignal): Promise + listCurrencyGroups(headers?: object, signal?: AbortSignal): Promise + addOffchainInventory( + args: AddOffchainInventoryArgs, + headers?: object, + signal?: AbortSignal, + ): Promise + getOffchainInventory( + args: GetOffchainInventoryArgs, + headers?: object, + signal?: AbortSignal, + ): Promise + listOffchainInventories( + args: ListOffchainInventoriesArgs, + headers?: object, + signal?: AbortSignal, + ): Promise + updateOffchainInventory( + args: UpdateOffchainInventoryArgs, + headers?: object, + signal?: AbortSignal, + ): Promise + deleteOffchainInventory( + args: DeleteOffchainInventoryArgs, + headers?: object, + signal?: AbortSignal, + ): Promise + requestOffchainPayment( + args: RequestOffchainPaymentArgs, + headers?: object, + signal?: AbortSignal, + ): Promise + listOffchainPayments( + args: ListOffchainPaymentsArgs, + headers?: object, + signal?: AbortSignal, + ): Promise + savePack(args: SavePackArgs, headers?: object, signal?: AbortSignal): Promise + getPack(args: GetPackArgs, headers?: object, signal?: AbortSignal): Promise + deletePack(args: DeletePackArgs, headers?: object, signal?: AbortSignal): Promise + updatePackContent( + args: UpdatePackContentArgs, + headers?: object, + signal?: AbortSignal, + ): Promise +} + +export interface PingArgs {} + +export interface PingReturn { + status: boolean +} +export interface VersionArgs {} + +export interface VersionReturn { + version: Version +} +export interface RuntimeStatusArgs {} + +export interface RuntimeStatusReturn { + status: RuntimeStatus +} +export interface ClockArgs {} + +export interface ClockReturn { + serverTime: string +} +export interface GetSequenceContextArgs {} + +export interface GetSequenceContextReturn { + data: SequenceContext +} +export interface GetAuthTokenArgs { + ewtString: string + testnetMode?: boolean +} + +export interface GetAuthTokenReturn { + status: boolean + jwtToken: string + address: string + user?: User +} +export interface GetAuthToken2Args { + ewtString: string + chainID: string +} + +export interface GetAuthToken2Return { + status: boolean + jwtToken: string + address: string + user?: User +} +export interface SendPasswordlessLinkArgs { + email: string + redirectUri: string + intent: string +} + +export interface SendPasswordlessLinkReturn { + status: boolean +} +export interface RegisterPublicKeyArgs { + publicKey: PublicKey +} + +export interface RegisterPublicKeyReturn { + status: boolean +} +export interface GetPublicKeyArgs { + id: string +} + +export interface GetPublicKeyReturn { + publicKey: PublicKey +} +export interface FriendListArgs { + nickname?: string + page?: Page +} + +export interface FriendListReturn { + page: Page + friends: Array +} +export interface GetFriendByAddressArgs { + friendAddress: string +} + +export interface GetFriendByAddressReturn { + status: boolean + friend: Friend +} +export interface SearchFriendsArgs { + filterUsername: string + page?: Page +} + +export interface SearchFriendsReturn { + friends: Array +} +export interface AddFriendArgs { + friendAddress: string + optionalNickname?: string +} + +export interface AddFriendReturn { + status: boolean + friend?: Friend +} +export interface UpdateFriendNicknameArgs { + friendAddress: string + nickname: string +} + +export interface UpdateFriendNicknameReturn { + status: boolean + friend?: Friend +} +export interface RemoveFriendArgs { + friendAddress: string +} + +export interface RemoveFriendReturn { + status: boolean +} +export interface ContractCallArgs { + chainID: string + contract: string + inputExpr: string + outputExpr: string + args: Array +} + +export interface ContractCallReturn { + returns: Array +} +export interface DecodeContractCallArgs { + callData: string +} + +export interface DecodeContractCallReturn { + call: ContractCall +} +export interface LookupContractCallSelectorsArgs { + selectors: Array +} + +export interface LookupContractCallSelectorsReturn { + signatures: Array> +} +export interface UserStorageFetchArgs { + key: string +} + +export interface UserStorageFetchReturn { + object: any +} +export interface UserStorageSaveArgs { + key: string + object: any +} + +export interface UserStorageSaveReturn { + ok: boolean +} +export interface UserStorageDeleteArgs { + key: string +} + +export interface UserStorageDeleteReturn { + ok: boolean +} +export interface UserStorageFetchAllArgs { + keys?: Array +} + +export interface UserStorageFetchAllReturn { + objects: { [key: string]: any } +} +export interface GetMoonpayLinkArgs { + url: string +} + +export interface GetMoonpayLinkReturn { + signedUrl: string +} +export interface ResolveENSAddressArgs { + ens: string +} + +export interface ResolveENSAddressReturn { + address: string + ok: boolean +} +export interface IsValidSignatureArgs { + chainId: string + walletAddress: string + digest: string + signature: string +} + +export interface IsValidSignatureReturn { + isValid: boolean +} +export interface IsValidMessageSignatureArgs { + chainId: string + walletAddress: string + message: string + signature: string +} + +export interface IsValidMessageSignatureReturn { + isValid: boolean +} +export interface IsValidTypedDataSignatureArgs { + chainId: string + walletAddress: string + typedData: any + signature: string +} + +export interface IsValidTypedDataSignatureReturn { + isValid: boolean +} +export interface IsValidETHAuthProofArgs { + chainId: string + walletAddress: string + ethAuthProofString: string +} + +export interface IsValidETHAuthProofReturn { + isValid: boolean +} +export interface SardineGetClientTokenArgs {} + +export interface SardineGetClientTokenReturn { + token: string +} +export interface SardineGetNFTCheckoutTokenArgs { + params: SardineNFTCheckoutParams +} + +export interface SardineGetNFTCheckoutTokenReturn { + resp: SardineNFTCheckout +} +export interface SardineGetNFTCheckoutOrderStatusArgs { + orderId: string +} + +export interface SardineGetNFTCheckoutOrderStatusReturn { + resp: SardineOrder +} +export interface SardineGetSupportedRegionsArgs {} + +export interface SardineGetSupportedRegionsReturn { + regions: Array +} +export interface SardineGetSupportedFiatCurrenciesArgs {} + +export interface SardineGetSupportedFiatCurrenciesReturn { + tokens: Array +} +export interface SardineGetSupportedTokensArgs {} + +export interface SardineGetSupportedTokensReturn { + tokens: Array +} +export interface SardineGetSupportedTokenForSwapArgs { + network: string + tokenAddress: string +} + +export interface SardineGetSupportedTokenForSwapReturn { + token: SardineSupportedTokenForSwap +} +export interface SardineGetEnabledTokensArgs {} + +export interface SardineGetEnabledTokensReturn { + tokens: Array +} +export interface SardineGetQuoteArgs { + params: SardineGetQuoteParams +} + +export interface SardineGetQuoteReturn { + quote: SardineQuote +} +export interface GetSardineClientTokenArgs {} + +export interface GetSardineClientTokenReturn { + token: string +} +export interface GetSardineNFTCheckoutTokenArgs { + params: SardineNFTCheckoutParams +} + +export interface GetSardineNFTCheckoutTokenReturn { + resp: SardineNFTCheckout +} +export interface GetSardineNFTCheckoutOrderStatusArgs { + orderId: string +} + +export interface GetSardineNFTCheckoutOrderStatusReturn { + resp: SardineOrder +} +export interface TransakGetCountriesArgs {} + +export interface TransakGetCountriesReturn { + regions: Array +} +export interface TransakGetCryptoCurrenciesArgs {} + +export interface TransakGetCryptoCurrenciesReturn { + currencies: Array +} +export interface TransakGetFiatCurrenciesArgs {} + +export interface TransakGetFiatCurrenciesReturn { + currencies: Array +} +export interface TransakGetPriceArgs { + params: TransakGetPriceParams +} + +export interface TransakGetPriceReturn { + price: TransakPrice +} +export interface TransakGetSupportedNFTCheckoutChainsArgs {} + +export interface TransakGetSupportedNFTCheckoutChainsReturn { + chains: Array +} +export interface GetCoinPricesArgs { + tokens: Array +} + +export interface GetCoinPricesReturn { + tokenPrices: Array +} +export interface GetCollectiblePricesArgs { + tokens: Array +} + +export interface GetCollectiblePricesReturn { + tokenPrices: Array +} +export interface GetExchangeRateArgs { + toCurrency: string +} + +export interface GetExchangeRateReturn { + exchangeRate: ExchangeRate +} +export interface MemoryStoreArgs { + key: string + value: string +} + +export interface MemoryStoreReturn { + ok: boolean +} +export interface MemoryLoadArgs { + key: string +} + +export interface MemoryLoadReturn { + value: string +} +export interface GetInviteInfoArgs {} + +export interface GetInviteInfoReturn { + inviteInfo: InviteInfo +} +export interface IsValidAccessCodeArgs { + accessCode: string +} + +export interface IsValidAccessCodeReturn { + status: boolean +} +export interface InternalClaimAccessCodeArgs { + address: string + accessCode: string +} + +export interface InternalClaimAccessCodeReturn { + status: boolean +} +export interface BlockNumberAtTimeArgs { + chainId: number + timestamps: Array +} + +export interface BlockNumberAtTimeReturn { + blocks: Array +} +export interface PaperSessionSecretArgs { + chainName: string + contractAddress: string + paramsJson: string + contractType: string +} + +export interface PaperSessionSecretReturn { + secret: string +} +export interface PaperSessionSecret2Args { + chainName: string + contractAddress: string + paramsJson: string + abi: string +} + +export interface PaperSessionSecret2Return { + secret: string +} +export interface LinkWalletArgs { + parentWalletAddress: string + parentWalletMessage: string + parentWalletSignature: string + linkedWalletAddress: string + linkedWalletMessage: string + linkedWalletSignature: string + signatureChainId: string + linkedWalletType?: string +} + +export interface LinkWalletReturn { + status: boolean +} +export interface GetLinkedWalletsArgs { + parentWalletAddress: string + parentWalletMessage: string + parentWalletSignature: string + signatureChainId: string +} + +export interface GetLinkedWalletsReturn { + linkedWallets: Array +} +export interface RemoveLinkedWalletArgs { + parentWalletAddress: string + parentWalletMessage: string + parentWalletSignature: string + linkedWalletAddress: string + signatureChainId: string +} + +export interface RemoveLinkedWalletReturn { + status: boolean +} +export interface GenerateWaaSVerificationURLArgs { + walletAddress: string +} + +export interface GenerateWaaSVerificationURLReturn { + nonce: string + verificationURL: string +} +export interface ValidateWaaSVerificationNonceArgs { + nonce: string + signature: string + sessionId: string + chainId: string +} + +export interface ValidateWaaSVerificationNonceReturn { + walletAddress: string +} +export interface ListAdoptedWalletsArgs { + page?: Page +} + +export interface ListAdoptedWalletsReturn { + page: Page + wallets: Array +} +export interface GetSwapPermit2PriceArgs { + buyCurrencyAddress: string + sellCurrencyAddress: string + buyAmount: string + chainId: number + slippagePercentage?: number +} + +export interface GetSwapPermit2PriceReturn { + swapPermit2Price: SwapPermit2Price +} +export interface GetSwapPermit2PricesArgs { + userAddress: string + buyCurrencyAddress: string + buyAmount: string + chainId: number + slippagePercentage?: number +} + +export interface GetSwapPermit2PricesReturn { + swapPermit2Prices: Array +} +export interface GetSwapPermit2QuoteArgs { + userAddress: string + buyCurrencyAddress: string + sellCurrencyAddress: string + buyAmount: string + chainId: number + includeApprove: boolean + slippagePercentage?: number +} + +export interface GetSwapPermit2QuoteReturn { + swapPermit2Quote: SwapPermit2Quote +} +export interface GetSwapPriceArgs { + buyCurrencyAddress: string + sellCurrencyAddress: string + buyAmount: string + chainId: number + slippagePercentage?: number +} + +export interface GetSwapPriceReturn { + swapPrice: SwapPrice +} +export interface GetSwapPricesArgs { + userAddress: string + buyCurrencyAddress: string + buyAmount: string + chainId: number + slippagePercentage?: number +} + +export interface GetSwapPricesReturn { + swapPrices: Array +} +export interface GetSwapQuoteArgs { + userAddress: string + buyCurrencyAddress: string + sellCurrencyAddress: string + buyAmount: string + chainId: number + includeApprove: boolean + slippagePercentage?: number +} + +export interface GetSwapQuoteReturn { + swapQuote: SwapQuote +} +export interface GetSwapQuoteV2Args { + userAddress: string + buyCurrencyAddress: string + sellCurrencyAddress: string + buyAmount: string + chainId: number + includeApprove: boolean + slippagePercentage?: number +} + +export interface GetSwapQuoteV2Return { + swapQuote: SwapQuote +} +export interface IntentQueryArgs { + wallet: string + preconditions: Array +} + +export interface IntentQueryReturn { + solutions: Array +} +export interface ListCurrencyGroupsArgs {} + +export interface ListCurrencyGroupsReturn { + currencyGroups: Array +} +export interface AddOffchainInventoryArgs { + inventory: OffchainInventory +} + +export interface AddOffchainInventoryReturn { + inventoryId: number +} +export interface GetOffchainInventoryArgs { + inventoryId: number +} + +export interface GetOffchainInventoryReturn { + inventory: OffchainInventory +} +export interface ListOffchainInventoriesArgs { + projectId: number +} + +export interface ListOffchainInventoriesReturn { + inventory: Array +} +export interface UpdateOffchainInventoryArgs { + inventory: OffchainInventory +} + +export interface UpdateOffchainInventoryReturn {} +export interface DeleteOffchainInventoryArgs { + inventoryId: number +} + +export interface DeleteOffchainInventoryReturn { + ok: boolean +} +export interface RequestOffchainPaymentArgs { + inventoryId: number + recipient: string + chainId?: number + tokenAddress?: string +} + +export interface RequestOffchainPaymentReturn { + payment: PaymentResponse +} +export interface ListOffchainPaymentsArgs { + inventoryId: number + page?: Page +} + +export interface ListOffchainPaymentsReturn { + page: Page + payments: Array +} +export interface SavePackArgs { + pack: Pack +} + +export interface SavePackReturn { + merkleRoot: string +} +export interface GetPackArgs { + contractAddress: string + chainId: number +} + +export interface GetPackReturn { + pack: Pack +} +export interface DeletePackArgs { + contractAddress: string + chainId: number +} + +export interface DeletePackReturn { + status: boolean +} +export interface UpdatePackContentArgs { + pack: Pack +} + +export interface UpdatePackContentReturn { + merkleRoot: string +} + +// +// Client +// +export class API implements API { + protected hostname: string + protected fetch: Fetch + protected path = '/rpc/API/' + + constructor(hostname: string, fetch: Fetch) { + this.hostname = hostname.replace(/\/*$/, '') + this.fetch = (input: RequestInfo, init?: RequestInit) => fetch(input, init) + } + + private url(name: string): string { + return this.hostname + this.path + name + } + + ping = (headers?: object, signal?: AbortSignal): Promise => { + return this.fetch(this.url('Ping'), createHTTPRequest({}, headers, signal)).then( + (res) => { + return buildResponse(res).then((_data) => { + return { + status: _data.status, + } + }) + }, + (error) => { + throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) + }, + ) + } + + version = (headers?: object, signal?: AbortSignal): Promise => { + return this.fetch(this.url('Version'), createHTTPRequest({}, headers, signal)).then( + (res) => { + return buildResponse(res).then((_data) => { + return { + version: _data.version, + } + }) + }, + (error) => { + throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) + }, + ) + } + + runtimeStatus = (headers?: object, signal?: AbortSignal): Promise => { + return this.fetch(this.url('RuntimeStatus'), createHTTPRequest({}, headers, signal)).then( + (res) => { + return buildResponse(res).then((_data) => { + return { + status: _data.status, + } + }) + }, + (error) => { + throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) + }, + ) + } + + clock = (headers?: object, signal?: AbortSignal): Promise => { + return this.fetch(this.url('Clock'), createHTTPRequest({}, headers, signal)).then( + (res) => { + return buildResponse(res).then((_data) => { + return { + serverTime: _data.serverTime, + } + }) + }, + (error) => { + throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) + }, + ) + } + + getSequenceContext = (headers?: object, signal?: AbortSignal): Promise => { + return this.fetch(this.url('GetSequenceContext'), createHTTPRequest({}, headers, signal)).then( + (res) => { + return buildResponse(res).then((_data) => { + return { + data: _data.data, + } + }) + }, + (error) => { + throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) + }, + ) + } + + getAuthToken = (args: GetAuthTokenArgs, headers?: object, signal?: AbortSignal): Promise => { + return this.fetch(this.url('GetAuthToken'), createHTTPRequest(args, headers, signal)).then( + (res) => { + return buildResponse(res).then((_data) => { + return { + status: _data.status, + jwtToken: _data.jwtToken, + address: _data.address, + user: _data.user, + } + }) + }, + (error) => { + throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) + }, + ) + } + + getAuthToken2 = (args: GetAuthToken2Args, headers?: object, signal?: AbortSignal): Promise => { + return this.fetch(this.url('GetAuthToken2'), createHTTPRequest(args, headers, signal)).then( + (res) => { + return buildResponse(res).then((_data) => { + return { + status: _data.status, + jwtToken: _data.jwtToken, + address: _data.address, + user: _data.user, + } + }) + }, + (error) => { + throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) + }, + ) + } + + sendPasswordlessLink = ( + args: SendPasswordlessLinkArgs, + headers?: object, + signal?: AbortSignal, + ): Promise => { + return this.fetch(this.url('SendPasswordlessLink'), createHTTPRequest(args, headers, signal)).then( + (res) => { + return buildResponse(res).then((_data) => { + return { + status: _data.status, + } + }) + }, + (error) => { + throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) + }, + ) + } + + registerPublicKey = ( + args: RegisterPublicKeyArgs, + headers?: object, + signal?: AbortSignal, + ): Promise => { + return this.fetch(this.url('RegisterPublicKey'), createHTTPRequest(args, headers, signal)).then( + (res) => { + return buildResponse(res).then((_data) => { + return { + status: _data.status, + } + }) + }, + (error) => { + throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) + }, + ) + } + + getPublicKey = (args: GetPublicKeyArgs, headers?: object, signal?: AbortSignal): Promise => { + return this.fetch(this.url('GetPublicKey'), createHTTPRequest(args, headers, signal)).then( + (res) => { + return buildResponse(res).then((_data) => { + return { + publicKey: _data.publicKey, + } + }) + }, + (error) => { + throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) + }, + ) + } + + friendList = (args: FriendListArgs, headers?: object, signal?: AbortSignal): Promise => { + return this.fetch(this.url('FriendList'), createHTTPRequest(args, headers, signal)).then( + (res) => { + return buildResponse(res).then((_data) => { + return { + page: _data.page, + friends: >_data.friends, + } + }) + }, + (error) => { + throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) + }, + ) + } + + getFriendByAddress = ( + args: GetFriendByAddressArgs, + headers?: object, + signal?: AbortSignal, + ): Promise => { + return this.fetch(this.url('GetFriendByAddress'), createHTTPRequest(args, headers, signal)).then( + (res) => { + return buildResponse(res).then((_data) => { + return { + status: _data.status, + friend: _data.friend, + } + }) + }, + (error) => { + throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) + }, + ) + } + + searchFriends = (args: SearchFriendsArgs, headers?: object, signal?: AbortSignal): Promise => { + return this.fetch(this.url('SearchFriends'), createHTTPRequest(args, headers, signal)).then( + (res) => { + return buildResponse(res).then((_data) => { + return { + friends: >_data.friends, + } + }) + }, + (error) => { + throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) + }, + ) + } + + addFriend = (args: AddFriendArgs, headers?: object, signal?: AbortSignal): Promise => { + return this.fetch(this.url('AddFriend'), createHTTPRequest(args, headers, signal)).then( + (res) => { + return buildResponse(res).then((_data) => { + return { + status: _data.status, + friend: _data.friend, + } + }) + }, + (error) => { + throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) + }, + ) + } + + updateFriendNickname = ( + args: UpdateFriendNicknameArgs, + headers?: object, + signal?: AbortSignal, + ): Promise => { + return this.fetch(this.url('UpdateFriendNickname'), createHTTPRequest(args, headers, signal)).then( + (res) => { + return buildResponse(res).then((_data) => { + return { + status: _data.status, + friend: _data.friend, + } + }) + }, + (error) => { + throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) + }, + ) + } + + removeFriend = (args: RemoveFriendArgs, headers?: object, signal?: AbortSignal): Promise => { + return this.fetch(this.url('RemoveFriend'), createHTTPRequest(args, headers, signal)).then( + (res) => { + return buildResponse(res).then((_data) => { + return { + status: _data.status, + } + }) + }, + (error) => { + throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) + }, + ) + } + + contractCall = (args: ContractCallArgs, headers?: object, signal?: AbortSignal): Promise => { + return this.fetch(this.url('ContractCall'), createHTTPRequest(args, headers, signal)).then( + (res) => { + return buildResponse(res).then((_data) => { + return { + returns: >_data.returns, + } + }) + }, + (error) => { + throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) + }, + ) + } + + decodeContractCall = ( + args: DecodeContractCallArgs, + headers?: object, + signal?: AbortSignal, + ): Promise => { + return this.fetch(this.url('DecodeContractCall'), createHTTPRequest(args, headers, signal)).then( + (res) => { + return buildResponse(res).then((_data) => { + return { + call: _data.call, + } + }) + }, + (error) => { + throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) + }, + ) + } + + lookupContractCallSelectors = ( + args: LookupContractCallSelectorsArgs, + headers?: object, + signal?: AbortSignal, + ): Promise => { + return this.fetch(this.url('LookupContractCallSelectors'), createHTTPRequest(args, headers, signal)).then( + (res) => { + return buildResponse(res).then((_data) => { + return { + signatures: >>_data.signatures, + } + }) + }, + (error) => { + throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) + }, + ) + } + + userStorageFetch = ( + args: UserStorageFetchArgs, + headers?: object, + signal?: AbortSignal, + ): Promise => { + return this.fetch(this.url('UserStorageFetch'), createHTTPRequest(args, headers, signal)).then( + (res) => { + return buildResponse(res).then((_data) => { + return { + object: _data.object, + } + }) + }, + (error) => { + throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) + }, + ) + } + + userStorageSave = ( + args: UserStorageSaveArgs, + headers?: object, + signal?: AbortSignal, + ): Promise => { + return this.fetch(this.url('UserStorageSave'), createHTTPRequest(args, headers, signal)).then( + (res) => { + return buildResponse(res).then((_data) => { + return { + ok: _data.ok, + } + }) + }, + (error) => { + throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) + }, + ) + } + + userStorageDelete = ( + args: UserStorageDeleteArgs, + headers?: object, + signal?: AbortSignal, + ): Promise => { + return this.fetch(this.url('UserStorageDelete'), createHTTPRequest(args, headers, signal)).then( + (res) => { + return buildResponse(res).then((_data) => { + return { + ok: _data.ok, + } + }) + }, + (error) => { + throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) + }, + ) + } + + userStorageFetchAll = ( + args: UserStorageFetchAllArgs, + headers?: object, + signal?: AbortSignal, + ): Promise => { + return this.fetch(this.url('UserStorageFetchAll'), createHTTPRequest(args, headers, signal)).then( + (res) => { + return buildResponse(res).then((_data) => { + return { + objects: <{ [key: string]: any }>_data.objects, + } + }) + }, + (error) => { + throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) + }, + ) + } + + getMoonpayLink = ( + args: GetMoonpayLinkArgs, + headers?: object, + signal?: AbortSignal, + ): Promise => { + return this.fetch(this.url('GetMoonpayLink'), createHTTPRequest(args, headers, signal)).then( + (res) => { + return buildResponse(res).then((_data) => { + return { + signedUrl: _data.signedUrl, + } + }) + }, + (error) => { + throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) + }, + ) + } + + resolveENSAddress = ( + args: ResolveENSAddressArgs, + headers?: object, + signal?: AbortSignal, + ): Promise => { + return this.fetch(this.url('ResolveENSAddress'), createHTTPRequest(args, headers, signal)).then( + (res) => { + return buildResponse(res).then((_data) => { + return { + address: _data.address, + ok: _data.ok, + } + }) + }, + (error) => { + throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) + }, + ) + } + + isValidSignature = ( + args: IsValidSignatureArgs, + headers?: object, + signal?: AbortSignal, + ): Promise => { + return this.fetch(this.url('IsValidSignature'), createHTTPRequest(args, headers, signal)).then( + (res) => { + return buildResponse(res).then((_data) => { + return { + isValid: _data.isValid, + } + }) + }, + (error) => { + throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) + }, + ) + } + + isValidMessageSignature = ( + args: IsValidMessageSignatureArgs, + headers?: object, + signal?: AbortSignal, + ): Promise => { + return this.fetch(this.url('IsValidMessageSignature'), createHTTPRequest(args, headers, signal)).then( + (res) => { + return buildResponse(res).then((_data) => { + return { + isValid: _data.isValid, + } + }) + }, + (error) => { + throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) + }, + ) + } + + isValidTypedDataSignature = ( + args: IsValidTypedDataSignatureArgs, + headers?: object, + signal?: AbortSignal, + ): Promise => { + return this.fetch(this.url('IsValidTypedDataSignature'), createHTTPRequest(args, headers, signal)).then( + (res) => { + return buildResponse(res).then((_data) => { + return { + isValid: _data.isValid, + } + }) + }, + (error) => { + throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) + }, + ) + } + + isValidETHAuthProof = ( + args: IsValidETHAuthProofArgs, + headers?: object, + signal?: AbortSignal, + ): Promise => { + return this.fetch(this.url('IsValidETHAuthProof'), createHTTPRequest(args, headers, signal)).then( + (res) => { + return buildResponse(res).then((_data) => { + return { + isValid: _data.isValid, + } + }) + }, + (error) => { + throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) + }, + ) + } + + sardineGetClientToken = (headers?: object, signal?: AbortSignal): Promise => { + return this.fetch(this.url('SardineGetClientToken'), createHTTPRequest({}, headers, signal)).then( + (res) => { + return buildResponse(res).then((_data) => { + return { + token: _data.token, + } + }) + }, + (error) => { + throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) + }, + ) + } + + sardineGetNFTCheckoutToken = ( + args: SardineGetNFTCheckoutTokenArgs, + headers?: object, + signal?: AbortSignal, + ): Promise => { + return this.fetch(this.url('SardineGetNFTCheckoutToken'), createHTTPRequest(args, headers, signal)).then( + (res) => { + return buildResponse(res).then((_data) => { + return { + resp: _data.resp, + } + }) + }, + (error) => { + throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) + }, + ) + } + + sardineGetNFTCheckoutOrderStatus = ( + args: SardineGetNFTCheckoutOrderStatusArgs, + headers?: object, + signal?: AbortSignal, + ): Promise => { + return this.fetch(this.url('SardineGetNFTCheckoutOrderStatus'), createHTTPRequest(args, headers, signal)).then( + (res) => { + return buildResponse(res).then((_data) => { + return { + resp: _data.resp, + } + }) + }, + (error) => { + throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) + }, + ) + } + + sardineGetSupportedRegions = (headers?: object, signal?: AbortSignal): Promise => { + return this.fetch(this.url('SardineGetSupportedRegions'), createHTTPRequest({}, headers, signal)).then( + (res) => { + return buildResponse(res).then((_data) => { + return { + regions: >_data.regions, + } + }) + }, + (error) => { + throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) + }, + ) + } + + sardineGetSupportedFiatCurrencies = ( + headers?: object, + signal?: AbortSignal, + ): Promise => { + return this.fetch(this.url('SardineGetSupportedFiatCurrencies'), createHTTPRequest({}, headers, signal)).then( + (res) => { + return buildResponse(res).then((_data) => { + return { + tokens: >_data.tokens, + } + }) + }, + (error) => { + throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) + }, + ) + } + + sardineGetSupportedTokens = (headers?: object, signal?: AbortSignal): Promise => { + return this.fetch(this.url('SardineGetSupportedTokens'), createHTTPRequest({}, headers, signal)).then( + (res) => { + return buildResponse(res).then((_data) => { + return { + tokens: >_data.tokens, + } + }) + }, + (error) => { + throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) + }, + ) + } + + sardineGetSupportedTokenForSwap = ( + args: SardineGetSupportedTokenForSwapArgs, + headers?: object, + signal?: AbortSignal, + ): Promise => { + return this.fetch(this.url('SardineGetSupportedTokenForSwap'), createHTTPRequest(args, headers, signal)).then( + (res) => { + return buildResponse(res).then((_data) => { + return { + token: _data.token, + } + }) + }, + (error) => { + throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) + }, + ) + } + + sardineGetEnabledTokens = (headers?: object, signal?: AbortSignal): Promise => { + return this.fetch(this.url('SardineGetEnabledTokens'), createHTTPRequest({}, headers, signal)).then( + (res) => { + return buildResponse(res).then((_data) => { + return { + tokens: >_data.tokens, + } + }) + }, + (error) => { + throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) + }, + ) + } + + sardineGetQuote = ( + args: SardineGetQuoteArgs, + headers?: object, + signal?: AbortSignal, + ): Promise => { + return this.fetch(this.url('SardineGetQuote'), createHTTPRequest(args, headers, signal)).then( + (res) => { + return buildResponse(res).then((_data) => { + return { + quote: _data.quote, + } + }) + }, + (error) => { + throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) + }, + ) + } + + getSardineClientToken = (headers?: object, signal?: AbortSignal): Promise => { + return this.fetch(this.url('GetSardineClientToken'), createHTTPRequest({}, headers, signal)).then( + (res) => { + return buildResponse(res).then((_data) => { + return { + token: _data.token, + } + }) + }, + (error) => { + throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) + }, + ) + } + + getSardineNFTCheckoutToken = ( + args: GetSardineNFTCheckoutTokenArgs, + headers?: object, + signal?: AbortSignal, + ): Promise => { + return this.fetch(this.url('GetSardineNFTCheckoutToken'), createHTTPRequest(args, headers, signal)).then( + (res) => { + return buildResponse(res).then((_data) => { + return { + resp: _data.resp, + } + }) + }, + (error) => { + throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) + }, + ) + } + + getSardineNFTCheckoutOrderStatus = ( + args: GetSardineNFTCheckoutOrderStatusArgs, + headers?: object, + signal?: AbortSignal, + ): Promise => { + return this.fetch(this.url('GetSardineNFTCheckoutOrderStatus'), createHTTPRequest(args, headers, signal)).then( + (res) => { + return buildResponse(res).then((_data) => { + return { + resp: _data.resp, + } + }) + }, + (error) => { + throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) + }, + ) + } + + transakGetCountries = (headers?: object, signal?: AbortSignal): Promise => { + return this.fetch(this.url('TransakGetCountries'), createHTTPRequest({}, headers, signal)).then( + (res) => { + return buildResponse(res).then((_data) => { + return { + regions: >_data.regions, + } + }) + }, + (error) => { + throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) + }, + ) + } + + transakGetCryptoCurrencies = (headers?: object, signal?: AbortSignal): Promise => { + return this.fetch(this.url('TransakGetCryptoCurrencies'), createHTTPRequest({}, headers, signal)).then( + (res) => { + return buildResponse(res).then((_data) => { + return { + currencies: >_data.currencies, + } + }) + }, + (error) => { + throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) + }, + ) + } + + transakGetFiatCurrencies = (headers?: object, signal?: AbortSignal): Promise => { + return this.fetch(this.url('TransakGetFiatCurrencies'), createHTTPRequest({}, headers, signal)).then( + (res) => { + return buildResponse(res).then((_data) => { + return { + currencies: >_data.currencies, + } + }) + }, + (error) => { + throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) + }, + ) + } + + transakGetPrice = ( + args: TransakGetPriceArgs, + headers?: object, + signal?: AbortSignal, + ): Promise => { + return this.fetch(this.url('TransakGetPrice'), createHTTPRequest(args, headers, signal)).then( + (res) => { + return buildResponse(res).then((_data) => { + return { + price: _data.price, + } + }) + }, + (error) => { + throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) + }, + ) + } + + transakGetSupportedNFTCheckoutChains = ( + headers?: object, + signal?: AbortSignal, + ): Promise => { + return this.fetch(this.url('TransakGetSupportedNFTCheckoutChains'), createHTTPRequest({}, headers, signal)).then( + (res) => { + return buildResponse(res).then((_data) => { + return { + chains: >_data.chains, + } + }) + }, + (error) => { + throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) + }, + ) + } + + getCoinPrices = (args: GetCoinPricesArgs, headers?: object, signal?: AbortSignal): Promise => { + return this.fetch(this.url('GetCoinPrices'), createHTTPRequest(args, headers, signal)).then( + (res) => { + return buildResponse(res).then((_data) => { + return { + tokenPrices: >_data.tokenPrices, + } + }) + }, + (error) => { + throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) + }, + ) + } + + getCollectiblePrices = ( + args: GetCollectiblePricesArgs, + headers?: object, + signal?: AbortSignal, + ): Promise => { + return this.fetch(this.url('GetCollectiblePrices'), createHTTPRequest(args, headers, signal)).then( + (res) => { + return buildResponse(res).then((_data) => { + return { + tokenPrices: >_data.tokenPrices, + } + }) + }, + (error) => { + throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) + }, + ) + } + + getExchangeRate = ( + args: GetExchangeRateArgs, + headers?: object, + signal?: AbortSignal, + ): Promise => { + return this.fetch(this.url('GetExchangeRate'), createHTTPRequest(args, headers, signal)).then( + (res) => { + return buildResponse(res).then((_data) => { + return { + exchangeRate: _data.exchangeRate, + } + }) + }, + (error) => { + throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) + }, + ) + } + + memoryStore = (args: MemoryStoreArgs, headers?: object, signal?: AbortSignal): Promise => { + return this.fetch(this.url('MemoryStore'), createHTTPRequest(args, headers, signal)).then( + (res) => { + return buildResponse(res).then((_data) => { + return { + ok: _data.ok, + } + }) + }, + (error) => { + throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) + }, + ) + } + + memoryLoad = (args: MemoryLoadArgs, headers?: object, signal?: AbortSignal): Promise => { + return this.fetch(this.url('MemoryLoad'), createHTTPRequest(args, headers, signal)).then( + (res) => { + return buildResponse(res).then((_data) => { + return { + value: _data.value, + } + }) + }, + (error) => { + throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) + }, + ) + } + + getInviteInfo = (headers?: object, signal?: AbortSignal): Promise => { + return this.fetch(this.url('GetInviteInfo'), createHTTPRequest({}, headers, signal)).then( + (res) => { + return buildResponse(res).then((_data) => { + return { + inviteInfo: _data.inviteInfo, + } + }) + }, + (error) => { + throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) + }, + ) + } + + isValidAccessCode = ( + args: IsValidAccessCodeArgs, + headers?: object, + signal?: AbortSignal, + ): Promise => { + return this.fetch(this.url('IsValidAccessCode'), createHTTPRequest(args, headers, signal)).then( + (res) => { + return buildResponse(res).then((_data) => { + return { + status: _data.status, + } + }) + }, + (error) => { + throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) + }, + ) + } + + internalClaimAccessCode = ( + args: InternalClaimAccessCodeArgs, + headers?: object, + signal?: AbortSignal, + ): Promise => { + return this.fetch(this.url('InternalClaimAccessCode'), createHTTPRequest(args, headers, signal)).then( + (res) => { + return buildResponse(res).then((_data) => { + return { + status: _data.status, + } + }) + }, + (error) => { + throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) + }, + ) + } + + blockNumberAtTime = ( + args: BlockNumberAtTimeArgs, + headers?: object, + signal?: AbortSignal, + ): Promise => { + return this.fetch(this.url('BlockNumberAtTime'), createHTTPRequest(args, headers, signal)).then( + (res) => { + return buildResponse(res).then((_data) => { + return { + blocks: >_data.blocks, + } + }) + }, + (error) => { + throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) + }, + ) + } + + paperSessionSecret = ( + args: PaperSessionSecretArgs, + headers?: object, + signal?: AbortSignal, + ): Promise => { + return this.fetch(this.url('PaperSessionSecret'), createHTTPRequest(args, headers, signal)).then( + (res) => { + return buildResponse(res).then((_data) => { + return { + secret: _data.secret, + } + }) + }, + (error) => { + throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) + }, + ) + } + + paperSessionSecret2 = ( + args: PaperSessionSecret2Args, + headers?: object, + signal?: AbortSignal, + ): Promise => { + return this.fetch(this.url('PaperSessionSecret2'), createHTTPRequest(args, headers, signal)).then( + (res) => { + return buildResponse(res).then((_data) => { + return { + secret: _data.secret, + } + }) + }, + (error) => { + throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) + }, + ) + } + + linkWallet = (args: LinkWalletArgs, headers?: object, signal?: AbortSignal): Promise => { + return this.fetch(this.url('LinkWallet'), createHTTPRequest(args, headers, signal)).then( + (res) => { + return buildResponse(res).then((_data) => { + return { + status: _data.status, + } + }) + }, + (error) => { + throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) + }, + ) + } + + getLinkedWallets = ( + args: GetLinkedWalletsArgs, + headers?: object, + signal?: AbortSignal, + ): Promise => { + return this.fetch(this.url('GetLinkedWallets'), createHTTPRequest(args, headers, signal)).then( + (res) => { + return buildResponse(res).then((_data) => { + return { + linkedWallets: >_data.linkedWallets, + } + }) + }, + (error) => { + throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) + }, + ) + } + + removeLinkedWallet = ( + args: RemoveLinkedWalletArgs, + headers?: object, + signal?: AbortSignal, + ): Promise => { + return this.fetch(this.url('RemoveLinkedWallet'), createHTTPRequest(args, headers, signal)).then( + (res) => { + return buildResponse(res).then((_data) => { + return { + status: _data.status, + } + }) + }, + (error) => { + throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) + }, + ) + } + + generateWaaSVerificationURL = ( + args: GenerateWaaSVerificationURLArgs, + headers?: object, + signal?: AbortSignal, + ): Promise => { + return this.fetch(this.url('GenerateWaaSVerificationURL'), createHTTPRequest(args, headers, signal)).then( + (res) => { + return buildResponse(res).then((_data) => { + return { + nonce: _data.nonce, + verificationURL: _data.verificationURL, + } + }) + }, + (error) => { + throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) + }, + ) + } + + validateWaaSVerificationNonce = ( + args: ValidateWaaSVerificationNonceArgs, + headers?: object, + signal?: AbortSignal, + ): Promise => { + return this.fetch(this.url('ValidateWaaSVerificationNonce'), createHTTPRequest(args, headers, signal)).then( + (res) => { + return buildResponse(res).then((_data) => { + return { + walletAddress: _data.walletAddress, + } + }) + }, + (error) => { + throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) + }, + ) + } + + listAdoptedWallets = ( + args: ListAdoptedWalletsArgs, + headers?: object, + signal?: AbortSignal, + ): Promise => { + return this.fetch(this.url('ListAdoptedWallets'), createHTTPRequest(args, headers, signal)).then( + (res) => { + return buildResponse(res).then((_data) => { + return { + page: _data.page, + wallets: >_data.wallets, + } + }) + }, + (error) => { + throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) + }, + ) + } + + getSwapPermit2Price = ( + args: GetSwapPermit2PriceArgs, + headers?: object, + signal?: AbortSignal, + ): Promise => { + return this.fetch(this.url('GetSwapPermit2Price'), createHTTPRequest(args, headers, signal)).then( + (res) => { + return buildResponse(res).then((_data) => { + return { + swapPermit2Price: _data.swapPermit2Price, + } + }) + }, + (error) => { + throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) + }, + ) + } + + getSwapPermit2Prices = ( + args: GetSwapPermit2PricesArgs, + headers?: object, + signal?: AbortSignal, + ): Promise => { + return this.fetch(this.url('GetSwapPermit2Prices'), createHTTPRequest(args, headers, signal)).then( + (res) => { + return buildResponse(res).then((_data) => { + return { + swapPermit2Prices: >_data.swapPermit2Prices, + } + }) + }, + (error) => { + throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) + }, + ) + } + + getSwapPermit2Quote = ( + args: GetSwapPermit2QuoteArgs, + headers?: object, + signal?: AbortSignal, + ): Promise => { + return this.fetch(this.url('GetSwapPermit2Quote'), createHTTPRequest(args, headers, signal)).then( + (res) => { + return buildResponse(res).then((_data) => { + return { + swapPermit2Quote: _data.swapPermit2Quote, + } + }) + }, + (error) => { + throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) + }, + ) + } + + getSwapPrice = (args: GetSwapPriceArgs, headers?: object, signal?: AbortSignal): Promise => { + return this.fetch(this.url('GetSwapPrice'), createHTTPRequest(args, headers, signal)).then( + (res) => { + return buildResponse(res).then((_data) => { + return { + swapPrice: _data.swapPrice, + } + }) + }, + (error) => { + throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) + }, + ) + } + + getSwapPrices = (args: GetSwapPricesArgs, headers?: object, signal?: AbortSignal): Promise => { + return this.fetch(this.url('GetSwapPrices'), createHTTPRequest(args, headers, signal)).then( + (res) => { + return buildResponse(res).then((_data) => { + return { + swapPrices: >_data.swapPrices, + } + }) + }, + (error) => { + throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) + }, + ) + } + + getSwapQuote = (args: GetSwapQuoteArgs, headers?: object, signal?: AbortSignal): Promise => { + return this.fetch(this.url('GetSwapQuote'), createHTTPRequest(args, headers, signal)).then( + (res) => { + return buildResponse(res).then((_data) => { + return { + swapQuote: _data.swapQuote, + } + }) + }, + (error) => { + throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) + }, + ) + } + + getSwapQuoteV2 = ( + args: GetSwapQuoteV2Args, + headers?: object, + signal?: AbortSignal, + ): Promise => { + return this.fetch(this.url('GetSwapQuoteV2'), createHTTPRequest(args, headers, signal)).then( + (res) => { + return buildResponse(res).then((_data) => { + return { + swapQuote: _data.swapQuote, + } + }) + }, + (error) => { + throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) + }, + ) + } + + intentQuery = (args: IntentQueryArgs, headers?: object, signal?: AbortSignal): Promise => { + return this.fetch(this.url('IntentQuery'), createHTTPRequest(args, headers, signal)).then( + (res) => { + return buildResponse(res).then((_data) => { + return { + solutions: >_data.solutions, + } + }) + }, + (error) => { + throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) + }, + ) + } + + listCurrencyGroups = (headers?: object, signal?: AbortSignal): Promise => { + return this.fetch(this.url('ListCurrencyGroups'), createHTTPRequest({}, headers, signal)).then( + (res) => { + return buildResponse(res).then((_data) => { + return { + currencyGroups: >_data.currencyGroups, + } + }) + }, + (error) => { + throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) + }, + ) + } + + addOffchainInventory = ( + args: AddOffchainInventoryArgs, + headers?: object, + signal?: AbortSignal, + ): Promise => { + return this.fetch(this.url('AddOffchainInventory'), createHTTPRequest(args, headers, signal)).then( + (res) => { + return buildResponse(res).then((_data) => { + return { + inventoryId: _data.inventoryId, + } + }) + }, + (error) => { + throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) + }, + ) + } + + getOffchainInventory = ( + args: GetOffchainInventoryArgs, + headers?: object, + signal?: AbortSignal, + ): Promise => { + return this.fetch(this.url('GetOffchainInventory'), createHTTPRequest(args, headers, signal)).then( + (res) => { + return buildResponse(res).then((_data) => { + return { + inventory: _data.inventory, + } + }) + }, + (error) => { + throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) + }, + ) + } + + listOffchainInventories = ( + args: ListOffchainInventoriesArgs, + headers?: object, + signal?: AbortSignal, + ): Promise => { + return this.fetch(this.url('ListOffchainInventories'), createHTTPRequest(args, headers, signal)).then( + (res) => { + return buildResponse(res).then((_data) => { + return { + inventory: >_data.inventory, + } + }) + }, + (error) => { + throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) + }, + ) + } + + updateOffchainInventory = ( + args: UpdateOffchainInventoryArgs, + headers?: object, + signal?: AbortSignal, + ): Promise => { + return this.fetch(this.url('UpdateOffchainInventory'), createHTTPRequest(args, headers, signal)).then( + (res) => { + return buildResponse(res).then((_data) => { + return {} + }) + }, + (error) => { + throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) + }, + ) + } + + deleteOffchainInventory = ( + args: DeleteOffchainInventoryArgs, + headers?: object, + signal?: AbortSignal, + ): Promise => { + return this.fetch(this.url('DeleteOffchainInventory'), createHTTPRequest(args, headers, signal)).then( + (res) => { + return buildResponse(res).then((_data) => { + return { + ok: _data.ok, + } + }) + }, + (error) => { + throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) + }, + ) + } + + requestOffchainPayment = ( + args: RequestOffchainPaymentArgs, + headers?: object, + signal?: AbortSignal, + ): Promise => { + return this.fetch(this.url('RequestOffchainPayment'), createHTTPRequest(args, headers, signal)).then( + (res) => { + return buildResponse(res).then((_data) => { + return { + payment: _data.payment, + } + }) + }, + (error) => { + throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) + }, + ) + } + + listOffchainPayments = ( + args: ListOffchainPaymentsArgs, + headers?: object, + signal?: AbortSignal, + ): Promise => { + return this.fetch(this.url('ListOffchainPayments'), createHTTPRequest(args, headers, signal)).then( + (res) => { + return buildResponse(res).then((_data) => { + return { + page: _data.page, + payments: >_data.payments, + } + }) + }, + (error) => { + throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) + }, + ) + } + + savePack = (args: SavePackArgs, headers?: object, signal?: AbortSignal): Promise => { + return this.fetch(this.url('SavePack'), createHTTPRequest(args, headers, signal)).then( + (res) => { + return buildResponse(res).then((_data) => { + return { + merkleRoot: _data.merkleRoot, + } + }) + }, + (error) => { + throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) + }, + ) + } + + getPack = (args: GetPackArgs, headers?: object, signal?: AbortSignal): Promise => { + return this.fetch(this.url('GetPack'), createHTTPRequest(args, headers, signal)).then( + (res) => { + return buildResponse(res).then((_data) => { + return { + pack: _data.pack, + } + }) + }, + (error) => { + throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) + }, + ) + } + + deletePack = (args: DeletePackArgs, headers?: object, signal?: AbortSignal): Promise => { + return this.fetch(this.url('DeletePack'), createHTTPRequest(args, headers, signal)).then( + (res) => { + return buildResponse(res).then((_data) => { + return { + status: _data.status, + } + }) + }, + (error) => { + throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) + }, + ) + } + + updatePackContent = ( + args: UpdatePackContentArgs, + headers?: object, + signal?: AbortSignal, + ): Promise => { + return this.fetch(this.url('UpdatePackContent'), createHTTPRequest(args, headers, signal)).then( + (res) => { + return buildResponse(res).then((_data) => { + return { + merkleRoot: _data.merkleRoot, + } + }) + }, + (error) => { + throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) + }, + ) + } +} + +const createHTTPRequest = (body: object = {}, headers: object = {}, signal: AbortSignal | null = null): object => { + const reqHeaders: { [key: string]: string } = { ...headers, 'Content-Type': 'application/json' } + reqHeaders[WebrpcHeader] = WebrpcHeaderValue + + return { + method: 'POST', + headers: reqHeaders, + body: JSON.stringify(body || {}), + signal, + } +} + +const buildResponse = (res: Response): Promise => { + return res.text().then((text) => { + let data + try { + data = JSON.parse(text) + } catch (error) { + let message = '' + if (error instanceof Error) { + message = error.message + } + throw WebrpcBadResponseError.new({ + status: res.status, + cause: `JSON.parse(): ${message}: response text: ${text}`, + }) + } + if (!res.ok) { + const code: number = typeof data.code === 'number' ? data.code : 0 + throw (webrpcErrorByCode[code] || WebrpcError).new(data) + } + return data + }) +} + +// +// Errors +// + +export class WebrpcError extends Error { + name: string + code: number + message: string + status: number + cause?: string + + /** @deprecated Use message instead of msg. Deprecated in webrpc v0.11.0. */ + msg: string + + constructor(name: string, code: number, message: string, status: number, cause?: string) { + super(message) + this.name = name || 'WebrpcError' + this.code = typeof code === 'number' ? code : 0 + this.message = message || `endpoint error ${this.code}` + this.msg = this.message + this.status = typeof status === 'number' ? status : 0 + this.cause = cause + Object.setPrototypeOf(this, WebrpcError.prototype) + } + + static new(payload: any): WebrpcError { + return new this(payload.error, payload.code, payload.message || payload.msg, payload.status, payload.cause) + } +} + +// Webrpc errors + +export class WebrpcEndpointError extends WebrpcError { + constructor( + name: string = 'WebrpcEndpoint', + code: number = 0, + message: string = `endpoint error`, + status: number = 0, + cause?: string, + ) { + super(name, code, message, status, cause) + Object.setPrototypeOf(this, WebrpcEndpointError.prototype) + } +} + +export class WebrpcRequestFailedError extends WebrpcError { + constructor( + name: string = 'WebrpcRequestFailed', + code: number = -1, + message: string = `request failed`, + status: number = 0, + cause?: string, + ) { + super(name, code, message, status, cause) + Object.setPrototypeOf(this, WebrpcRequestFailedError.prototype) + } +} + +export class WebrpcBadRouteError extends WebrpcError { + constructor( + name: string = 'WebrpcBadRoute', + code: number = -2, + message: string = `bad route`, + status: number = 0, + cause?: string, + ) { + super(name, code, message, status, cause) + Object.setPrototypeOf(this, WebrpcBadRouteError.prototype) + } +} + +export class WebrpcBadMethodError extends WebrpcError { + constructor( + name: string = 'WebrpcBadMethod', + code: number = -3, + message: string = `bad method`, + status: number = 0, + cause?: string, + ) { + super(name, code, message, status, cause) + Object.setPrototypeOf(this, WebrpcBadMethodError.prototype) + } +} + +export class WebrpcBadRequestError extends WebrpcError { + constructor( + name: string = 'WebrpcBadRequest', + code: number = -4, + message: string = `bad request`, + status: number = 0, + cause?: string, + ) { + super(name, code, message, status, cause) + Object.setPrototypeOf(this, WebrpcBadRequestError.prototype) + } +} + +export class WebrpcBadResponseError extends WebrpcError { + constructor( + name: string = 'WebrpcBadResponse', + code: number = -5, + message: string = `bad response`, + status: number = 0, + cause?: string, + ) { + super(name, code, message, status, cause) + Object.setPrototypeOf(this, WebrpcBadResponseError.prototype) + } +} + +export class WebrpcServerPanicError extends WebrpcError { + constructor( + name: string = 'WebrpcServerPanic', + code: number = -6, + message: string = `server panic`, + status: number = 0, + cause?: string, + ) { + super(name, code, message, status, cause) + Object.setPrototypeOf(this, WebrpcServerPanicError.prototype) + } +} + +export class WebrpcInternalErrorError extends WebrpcError { + constructor( + name: string = 'WebrpcInternalError', + code: number = -7, + message: string = `internal error`, + status: number = 0, + cause?: string, + ) { + super(name, code, message, status, cause) + Object.setPrototypeOf(this, WebrpcInternalErrorError.prototype) + } +} + +export class WebrpcClientDisconnectedError extends WebrpcError { + constructor( + name: string = 'WebrpcClientDisconnected', + code: number = -8, + message: string = `client disconnected`, + status: number = 0, + cause?: string, + ) { + super(name, code, message, status, cause) + Object.setPrototypeOf(this, WebrpcClientDisconnectedError.prototype) + } +} + +export class WebrpcStreamLostError extends WebrpcError { + constructor( + name: string = 'WebrpcStreamLost', + code: number = -9, + message: string = `stream lost`, + status: number = 0, + cause?: string, + ) { + super(name, code, message, status, cause) + Object.setPrototypeOf(this, WebrpcStreamLostError.prototype) + } +} + +export class WebrpcStreamFinishedError extends WebrpcError { + constructor( + name: string = 'WebrpcStreamFinished', + code: number = -10, + message: string = `stream finished`, + status: number = 0, + cause?: string, + ) { + super(name, code, message, status, cause) + Object.setPrototypeOf(this, WebrpcStreamFinishedError.prototype) + } +} + +// Schema errors + +export class UnauthorizedError extends WebrpcError { + constructor( + name: string = 'Unauthorized', + code: number = 1000, + message: string = `Unauthorized access`, + status: number = 0, + cause?: string, + ) { + super(name, code, message, status, cause) + Object.setPrototypeOf(this, UnauthorizedError.prototype) + } +} + +export class PermissionDeniedError extends WebrpcError { + constructor( + name: string = 'PermissionDenied', + code: number = 1001, + message: string = `Permission denied`, + status: number = 0, + cause?: string, + ) { + super(name, code, message, status, cause) + Object.setPrototypeOf(this, PermissionDeniedError.prototype) + } +} + +export class SessionExpiredError extends WebrpcError { + constructor( + name: string = 'SessionExpired', + code: number = 1002, + message: string = `Session expired`, + status: number = 0, + cause?: string, + ) { + super(name, code, message, status, cause) + Object.setPrototypeOf(this, SessionExpiredError.prototype) + } +} + +export class MethodNotFoundError extends WebrpcError { + constructor( + name: string = 'MethodNotFound', + code: number = 1003, + message: string = `Method not found`, + status: number = 0, + cause?: string, + ) { + super(name, code, message, status, cause) + Object.setPrototypeOf(this, MethodNotFoundError.prototype) + } +} + +export class RequestConflictError extends WebrpcError { + constructor( + name: string = 'RequestConflict', + code: number = 1004, + message: string = `Conflict with target resource`, + status: number = 0, + cause?: string, + ) { + super(name, code, message, status, cause) + Object.setPrototypeOf(this, RequestConflictError.prototype) + } +} + +export class AbortedError extends WebrpcError { + constructor( + name: string = 'Aborted', + code: number = 1005, + message: string = `Request aborted`, + status: number = 0, + cause?: string, + ) { + super(name, code, message, status, cause) + Object.setPrototypeOf(this, AbortedError.prototype) + } +} + +export class GeoblockedError extends WebrpcError { + constructor( + name: string = 'Geoblocked', + code: number = 1006, + message: string = `Geoblocked region`, + status: number = 0, + cause?: string, + ) { + super(name, code, message, status, cause) + Object.setPrototypeOf(this, GeoblockedError.prototype) + } +} + +export class RateLimitedError extends WebrpcError { + constructor( + name: string = 'RateLimited', + code: number = 1007, + message: string = `Rate-limited. Please slow down.`, + status: number = 0, + cause?: string, + ) { + super(name, code, message, status, cause) + Object.setPrototypeOf(this, RateLimitedError.prototype) + } +} + +export class ProjectNotFoundError extends WebrpcError { + constructor( + name: string = 'ProjectNotFound', + code: number = 1008, + message: string = `Project not found`, + status: number = 0, + cause?: string, + ) { + super(name, code, message, status, cause) + Object.setPrototypeOf(this, ProjectNotFoundError.prototype) + } +} + +export class AccessKeyNotFoundError extends WebrpcError { + constructor( + name: string = 'AccessKeyNotFound', + code: number = 1101, + message: string = `Access key not found`, + status: number = 0, + cause?: string, + ) { + super(name, code, message, status, cause) + Object.setPrototypeOf(this, AccessKeyNotFoundError.prototype) + } +} + +export class AccessKeyMismatchError extends WebrpcError { + constructor( + name: string = 'AccessKeyMismatch', + code: number = 1102, + message: string = `Access key mismatch`, + status: number = 0, + cause?: string, + ) { + super(name, code, message, status, cause) + Object.setPrototypeOf(this, AccessKeyMismatchError.prototype) + } +} + +export class InvalidOriginError extends WebrpcError { + constructor( + name: string = 'InvalidOrigin', + code: number = 1103, + message: string = `Invalid origin for Access Key`, + status: number = 0, + cause?: string, + ) { + super(name, code, message, status, cause) + Object.setPrototypeOf(this, InvalidOriginError.prototype) + } +} + +export class InvalidServiceError extends WebrpcError { + constructor( + name: string = 'InvalidService', + code: number = 1104, + message: string = `Service not enabled for Access key`, + status: number = 0, + cause?: string, + ) { + super(name, code, message, status, cause) + Object.setPrototypeOf(this, InvalidServiceError.prototype) + } +} + +export class UnauthorizedUserError extends WebrpcError { + constructor( + name: string = 'UnauthorizedUser', + code: number = 1105, + message: string = `Unauthorized user`, + status: number = 0, + cause?: string, + ) { + super(name, code, message, status, cause) + Object.setPrototypeOf(this, UnauthorizedUserError.prototype) + } +} + +export class QuotaExceededError extends WebrpcError { + constructor( + name: string = 'QuotaExceeded', + code: number = 1200, + message: string = `Quota request exceeded`, + status: number = 0, + cause?: string, + ) { + super(name, code, message, status, cause) + Object.setPrototypeOf(this, QuotaExceededError.prototype) + } +} + +export class QuotaRateLimitError extends WebrpcError { + constructor( + name: string = 'QuotaRateLimit', + code: number = 1201, + message: string = `Quota rate limit exceeded`, + status: number = 0, + cause?: string, + ) { + super(name, code, message, status, cause) + Object.setPrototypeOf(this, QuotaRateLimitError.prototype) + } +} + +export class NoDefaultKeyError extends WebrpcError { + constructor( + name: string = 'NoDefaultKey', + code: number = 1300, + message: string = `No default access key found`, + status: number = 0, + cause?: string, + ) { + super(name, code, message, status, cause) + Object.setPrototypeOf(this, NoDefaultKeyError.prototype) + } +} + +export class MaxAccessKeysError extends WebrpcError { + constructor( + name: string = 'MaxAccessKeys', + code: number = 1301, + message: string = `Access keys limit reached`, + status: number = 0, + cause?: string, + ) { + super(name, code, message, status, cause) + Object.setPrototypeOf(this, MaxAccessKeysError.prototype) + } +} + +export class AtLeastOneKeyError extends WebrpcError { + constructor( + name: string = 'AtLeastOneKey', + code: number = 1302, + message: string = `You need at least one Access Key`, + status: number = 0, + cause?: string, + ) { + super(name, code, message, status, cause) + Object.setPrototypeOf(this, AtLeastOneKeyError.prototype) + } +} + +export class TimeoutError extends WebrpcError { + constructor( + name: string = 'Timeout', + code: number = 1900, + message: string = `Request timed out`, + status: number = 0, + cause?: string, + ) { + super(name, code, message, status, cause) + Object.setPrototypeOf(this, TimeoutError.prototype) + } +} + +export class InvalidArgumentError extends WebrpcError { + constructor( + name: string = 'InvalidArgument', + code: number = 2000, + message: string = `Invalid argument`, + status: number = 0, + cause?: string, + ) { + super(name, code, message, status, cause) + Object.setPrototypeOf(this, InvalidArgumentError.prototype) + } +} + +export class UnavailableError extends WebrpcError { + constructor( + name: string = 'Unavailable', + code: number = 2002, + message: string = `Unavailable resource`, + status: number = 0, + cause?: string, + ) { + super(name, code, message, status, cause) + Object.setPrototypeOf(this, UnavailableError.prototype) + } +} + +export class QueryFailedError extends WebrpcError { + constructor( + name: string = 'QueryFailed', + code: number = 2003, + message: string = `Query failed`, + status: number = 0, + cause?: string, + ) { + super(name, code, message, status, cause) + Object.setPrototypeOf(this, QueryFailedError.prototype) + } +} + +export class NotFoundError extends WebrpcError { + constructor( + name: string = 'NotFound', + code: number = 3000, + message: string = `Resource not found`, + status: number = 0, + cause?: string, + ) { + super(name, code, message, status, cause) + Object.setPrototypeOf(this, NotFoundError.prototype) + } +} + +export class UnsupportedNetworkError extends WebrpcError { + constructor( + name: string = 'UnsupportedNetwork', + code: number = 3008, + message: string = `Unsupported network`, + status: number = 0, + cause?: string, + ) { + super(name, code, message, status, cause) + Object.setPrototypeOf(this, UnsupportedNetworkError.prototype) + } +} + +export enum errors { + WebrpcEndpoint = 'WebrpcEndpoint', + WebrpcRequestFailed = 'WebrpcRequestFailed', + WebrpcBadRoute = 'WebrpcBadRoute', + WebrpcBadMethod = 'WebrpcBadMethod', + WebrpcBadRequest = 'WebrpcBadRequest', + WebrpcBadResponse = 'WebrpcBadResponse', + WebrpcServerPanic = 'WebrpcServerPanic', + WebrpcInternalError = 'WebrpcInternalError', + WebrpcClientDisconnected = 'WebrpcClientDisconnected', + WebrpcStreamLost = 'WebrpcStreamLost', + WebrpcStreamFinished = 'WebrpcStreamFinished', + Unauthorized = 'Unauthorized', + PermissionDenied = 'PermissionDenied', + SessionExpired = 'SessionExpired', + MethodNotFound = 'MethodNotFound', + RequestConflict = 'RequestConflict', + Aborted = 'Aborted', + Geoblocked = 'Geoblocked', + RateLimited = 'RateLimited', + ProjectNotFound = 'ProjectNotFound', + AccessKeyNotFound = 'AccessKeyNotFound', + AccessKeyMismatch = 'AccessKeyMismatch', + InvalidOrigin = 'InvalidOrigin', + InvalidService = 'InvalidService', + UnauthorizedUser = 'UnauthorizedUser', + QuotaExceeded = 'QuotaExceeded', + QuotaRateLimit = 'QuotaRateLimit', + NoDefaultKey = 'NoDefaultKey', + MaxAccessKeys = 'MaxAccessKeys', + AtLeastOneKey = 'AtLeastOneKey', + Timeout = 'Timeout', + InvalidArgument = 'InvalidArgument', + Unavailable = 'Unavailable', + QueryFailed = 'QueryFailed', + NotFound = 'NotFound', + UnsupportedNetwork = 'UnsupportedNetwork', +} + +export enum WebrpcErrorCodes { + WebrpcEndpoint = 0, + WebrpcRequestFailed = -1, + WebrpcBadRoute = -2, + WebrpcBadMethod = -3, + WebrpcBadRequest = -4, + WebrpcBadResponse = -5, + WebrpcServerPanic = -6, + WebrpcInternalError = -7, + WebrpcClientDisconnected = -8, + WebrpcStreamLost = -9, + WebrpcStreamFinished = -10, + Unauthorized = 1000, + PermissionDenied = 1001, + SessionExpired = 1002, + MethodNotFound = 1003, + RequestConflict = 1004, + Aborted = 1005, + Geoblocked = 1006, + RateLimited = 1007, + ProjectNotFound = 1008, + AccessKeyNotFound = 1101, + AccessKeyMismatch = 1102, + InvalidOrigin = 1103, + InvalidService = 1104, + UnauthorizedUser = 1105, + QuotaExceeded = 1200, + QuotaRateLimit = 1201, + NoDefaultKey = 1300, + MaxAccessKeys = 1301, + AtLeastOneKey = 1302, + Timeout = 1900, + InvalidArgument = 2000, + Unavailable = 2002, + QueryFailed = 2003, + NotFound = 3000, + UnsupportedNetwork = 3008, +} + +export const webrpcErrorByCode: { [code: number]: any } = { + [0]: WebrpcEndpointError, + [-1]: WebrpcRequestFailedError, + [-2]: WebrpcBadRouteError, + [-3]: WebrpcBadMethodError, + [-4]: WebrpcBadRequestError, + [-5]: WebrpcBadResponseError, + [-6]: WebrpcServerPanicError, + [-7]: WebrpcInternalErrorError, + [-8]: WebrpcClientDisconnectedError, + [-9]: WebrpcStreamLostError, + [-10]: WebrpcStreamFinishedError, + [1000]: UnauthorizedError, + [1001]: PermissionDeniedError, + [1002]: SessionExpiredError, + [1003]: MethodNotFoundError, + [1004]: RequestConflictError, + [1005]: AbortedError, + [1006]: GeoblockedError, + [1007]: RateLimitedError, + [1008]: ProjectNotFoundError, + [1101]: AccessKeyNotFoundError, + [1102]: AccessKeyMismatchError, + [1103]: InvalidOriginError, + [1104]: InvalidServiceError, + [1105]: UnauthorizedUserError, + [1200]: QuotaExceededError, + [1201]: QuotaRateLimitError, + [1300]: NoDefaultKeyError, + [1301]: MaxAccessKeysError, + [1302]: AtLeastOneKeyError, + [1900]: TimeoutError, + [2000]: InvalidArgumentError, + [2002]: UnavailableError, + [2003]: QueryFailedError, + [3000]: NotFoundError, + [3008]: UnsupportedNetworkError, +} + +export type Fetch = (input: RequestInfo, init?: RequestInit) => Promise diff --git a/packages/services/api/src/index.ts b/packages/services/api/src/index.ts new file mode 100644 index 000000000..12656d2c0 --- /dev/null +++ b/packages/services/api/src/index.ts @@ -0,0 +1,36 @@ +export * from './api.gen' + +import { API as ApiRpc } from './api.gen' + +export class SequenceAPIClient extends ApiRpc { + constructor( + hostname: string, + public projectAccessKey?: string, + public jwtAuth?: string, + ) { + super(hostname.endsWith('/') ? hostname.slice(0, -1) : hostname, fetch) + this.fetch = this._fetch + } + + _fetch = (input: RequestInfo, init?: RequestInit): Promise => { + // automatically include jwt and access key auth header to requests + // if its been set on the api client + const headers: { [key: string]: any } = {} + + const jwtAuth = this.jwtAuth + const projectAccessKey = this.projectAccessKey + + if (jwtAuth && jwtAuth.length > 0) { + headers['Authorization'] = `BEARER ${jwtAuth}` + } + + if (projectAccessKey && projectAccessKey.length > 0) { + headers['X-Access-Key'] = projectAccessKey + } + + // before the request is made + init!.headers = { ...init!.headers, ...headers } + + return fetch(input, init) + } +} diff --git a/packages/services/api/tsconfig.json b/packages/services/api/tsconfig.json new file mode 100644 index 000000000..fed9c77b4 --- /dev/null +++ b/packages/services/api/tsconfig.json @@ -0,0 +1,10 @@ +{ + "extends": "@repo/typescript-config/base.json", + "compilerOptions": { + "rootDir": "src", + "outDir": "dist", + "types": ["node"] + }, + "include": ["src"], + "exclude": ["node_modules", "dist"] +} diff --git a/packages/services/builder/CHANGELOG.md b/packages/services/builder/CHANGELOG.md new file mode 100644 index 000000000..0a86b4aa5 --- /dev/null +++ b/packages/services/builder/CHANGELOG.md @@ -0,0 +1,155 @@ +# @0xsequence/builder + +## 2.3.8 + +### Patch Changes + +- indexer: update clients + +## 2.3.7 + +### Patch Changes + +- Metadata updates + +## 2.3.6 + +### Patch Changes + +- New chains + +## 2.3.5 + +### Patch Changes + +- Add Frequency Testnet + +## 2.3.4 + +### Patch Changes + +- metadata: exclude deprecated methods on rpc client + +## 2.3.3 + +### Patch Changes + +- metadata: client update + +## 2.3.2 + +### Patch Changes + +- metadata: update rpc client + +## 2.3.1 + +### Patch Changes + +- indexer: update rpc client + +## 2.3.0 + +### Minor Changes + +- update metadata rpc client + +## 2.2.15 + +### Patch Changes + +- API updates + +## 2.2.14 + +### Patch Changes + +- Somnia Testnet and Monad Testnet + +## 2.2.13 + +### Patch Changes + +- Add XR1 to all networks + +## 2.2.12 + +### Patch Changes + +- Add XR1 + +## 2.2.11 + +### Patch Changes + +- Relayer updates + +## 2.2.10 + +### Patch Changes + +- Etherlink support + +## 2.2.9 + +### Patch Changes + +- Indexer gateway native token balances + +## 2.2.8 + +### Patch Changes + +- Add Moonbeam and Moonbase Alpha + +## 2.2.7 + +### Patch Changes + +- Update Builder package + +## 2.2.6 + +### Patch Changes + +- Update relayer package + +## 2.2.5 + +### Patch Changes + +- auth: fix sequence indexer gateway url +- account: immutable wallet proxy hook + +## 2.2.4 + +### Patch Changes + +- network: update soneium mainnet block explorer url +- waas: signTypedData intent support + +## 2.2.3 + +### Patch Changes + +- provider: updating initWallet to use connected network configs if they exist + +## 2.2.2 + +### Patch Changes + +- pass projectAccessKey to relayer at all times + +## 2.2.1 + +### Patch Changes + +- waas-ethers: sign typed data + +## 2.2.0 + +### Minor Changes + +- indexer: gateway client +- @0xsequence/builder +- upgrade puppeteer to v23.10.3 diff --git a/packages/services/builder/README.md b/packages/services/builder/README.md new file mode 100644 index 000000000..ec20b181c --- /dev/null +++ b/packages/services/builder/README.md @@ -0,0 +1,3 @@ +# @0xsequence/builder + +See [0xsequence project page](https://github.com/0xsequence/sequence.js). diff --git a/packages/services/builder/package.json b/packages/services/builder/package.json new file mode 100644 index 000000000..a8d0d9c7d --- /dev/null +++ b/packages/services/builder/package.json @@ -0,0 +1,27 @@ +{ + "name": "@0xsequence/builder", + "version": "3.0.0", + "description": "builder sub-package for Sequence", + "repository": "https://github.com/0xsequence/sequence.js/tree/master/packages/builder", + "author": "Sequence Platforms Inc.", + "license": "Apache-2.0", + "scripts": { + "build": "tsc", + "dev": "tsc --watch", + "test": "echo", + "typecheck": "tsc --noEmit" + }, + "exports": { + ".": { + "types": "./src/index.ts", + "default": "./dist/index.js" + } + }, + "peerDependencies": {}, + "devDependencies": { + "@repo/typescript-config": "workspace:^", + "@types/node": "^22.13.9", + "typescript": "^5.7.3" + }, + "dependencies": {} +} diff --git a/packages/services/builder/src/builder.gen.ts b/packages/services/builder/src/builder.gen.ts new file mode 100644 index 000000000..a0e704960 --- /dev/null +++ b/packages/services/builder/src/builder.gen.ts @@ -0,0 +1,714 @@ +/* eslint-disable */ +// NOTE: this is just a subset of the builder api to scope down the +// surface area of the client. +// +// In the future we can include additional interfaces as needed. +export const WebrpcHeader = 'Webrpc' + +export const WebrpcHeaderValue = 'webrpc@v0.22.1;gen-typescript@v0.16.2;sequence-builder@v0.1.0' + +// WebRPC description and code-gen version +export const WebRPCVersion = 'v1' + +// Schema version of your RIDL schema +export const WebRPCSchemaVersion = 'v0.1.0' + +// Schema hash generated from your RIDL schema +export const WebRPCSchemaHash = '461bc324d241f4df14fbf63268fde2cfe4873e3e' + +type WebrpcGenVersions = { + webrpcGenVersion: string + codeGenName: string + codeGenVersion: string + schemaName: string + schemaVersion: string +} + +export function VersionFromHeader(headers: Headers): WebrpcGenVersions { + const headerValue = headers.get(WebrpcHeader) + if (!headerValue) { + return { + webrpcGenVersion: '', + codeGenName: '', + codeGenVersion: '', + schemaName: '', + schemaVersion: '', + } + } + + return parseWebrpcGenVersions(headerValue) +} + +function parseWebrpcGenVersions(header: string): WebrpcGenVersions { + const versions = header.split(';') + if (versions.length < 3) { + return { + webrpcGenVersion: '', + codeGenName: '', + codeGenVersion: '', + schemaName: '', + schemaVersion: '', + } + } + + const [_, webrpcGenVersion] = versions[0]!.split('@') + const [codeGenName, codeGenVersion] = versions[1]!.split('@') + const [schemaName, schemaVersion] = versions[2]!.split('@') + + return { + webrpcGenVersion: webrpcGenVersion!, + codeGenName: codeGenName!, + codeGenVersion: codeGenVersion!, + schemaName: schemaName!, + schemaVersion: schemaVersion!, + } +} + +// +// Types +// + +export interface AudienceContact { + id?: number + audienceId: number + name?: string + address: string + email?: string + userIp?: string + stage?: number + provider?: string + createdAt?: string + updatedAt?: string +} + +export interface AudienceRegistrationStatus { + totalCount: number +} + +export interface WalletProof { + address: string + message: string + signature: string + chainId: number +} + +export interface Builder { + ping(headers?: object, signal?: AbortSignal): Promise + registerAudienceContact( + args: RegisterAudienceContactArgs, + headers?: object, + signal?: AbortSignal, + ): Promise + getRegisteredAudienceContact( + args: GetRegisteredAudienceContactArgs, + headers?: object, + signal?: AbortSignal, + ): Promise + getAudienceRegistrationPublicStatus( + args: GetAudienceRegistrationPublicStatusArgs, + headers?: object, + signal?: AbortSignal, + ): Promise + isAudienceContactRegistered( + args: IsAudienceContactRegisteredArgs, + headers?: object, + signal?: AbortSignal, + ): Promise +} + +export interface PingArgs {} + +export interface PingReturn { + status: boolean +} + +export interface RegisterAudienceContactArgs { + projectId: number + audienceId: number + contact: AudienceContact + walletProof: WalletProof +} + +export interface RegisterAudienceContactReturn { + ok: boolean +} +export interface GetRegisteredAudienceContactArgs { + projectId: number + audienceId: number + walletProof: WalletProof +} + +export interface GetRegisteredAudienceContactReturn { + contact: AudienceContact +} +export interface GetAudienceRegistrationPublicStatusArgs { + projectId: number + audienceId: number +} + +export interface GetAudienceRegistrationPublicStatusReturn { + status: AudienceRegistrationStatus +} +export interface IsAudienceContactRegisteredArgs { + projectId: number + audienceId: number + walletAddress: string +} + +export interface IsAudienceContactRegisteredReturn { + registered: boolean +} + +// +// Client +// +export class Builder implements Builder { + protected hostname: string + protected fetch: Fetch + protected path = '/rpc/Builder/' + + constructor(hostname: string, fetch: Fetch) { + this.hostname = hostname.replace(/\/*$/, '') + this.fetch = (input: RequestInfo, init?: RequestInit) => fetch(input, init) + } + + private url(name: string): string { + return this.hostname + this.path + name + } + + ping = (headers?: object, signal?: AbortSignal): Promise => { + return this.fetch(this.url('Ping'), createHTTPRequest({}, headers, signal)).then( + (res) => { + return buildResponse(res).then((_data) => { + return { + status: _data.status, + } + }) + }, + (error) => { + throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) + }, + ) + } + + registerAudienceContact = ( + args: RegisterAudienceContactArgs, + headers?: object, + signal?: AbortSignal, + ): Promise => { + return this.fetch(this.url('RegisterAudienceContact'), createHTTPRequest(args, headers, signal)).then( + (res) => { + return buildResponse(res).then((_data) => { + return { + ok: _data.ok, + } + }) + }, + (error) => { + throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) + }, + ) + } + + getRegisteredAudienceContact = ( + args: GetRegisteredAudienceContactArgs, + headers?: object, + signal?: AbortSignal, + ): Promise => { + return this.fetch(this.url('GetRegisteredAudienceContact'), createHTTPRequest(args, headers, signal)).then( + (res) => { + return buildResponse(res).then((_data) => { + return { + contact: _data.contact, + } + }) + }, + (error) => { + throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) + }, + ) + } + + getAudienceRegistrationPublicStatus = ( + args: GetAudienceRegistrationPublicStatusArgs, + headers?: object, + signal?: AbortSignal, + ): Promise => { + return this.fetch(this.url('GetAudienceRegistrationPublicStatus'), createHTTPRequest(args, headers, signal)).then( + (res) => { + return buildResponse(res).then((_data) => { + return { + status: _data.status, + } + }) + }, + (error) => { + throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) + }, + ) + } + + isAudienceContactRegistered = ( + args: IsAudienceContactRegisteredArgs, + headers?: object, + signal?: AbortSignal, + ): Promise => { + return this.fetch(this.url('IsAudienceContactRegistered'), createHTTPRequest(args, headers, signal)).then( + (res) => { + return buildResponse(res).then((_data) => { + return { + registered: _data.registered, + } + }) + }, + (error) => { + throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) + }, + ) + } +} + +const createHTTPRequest = (body: object = {}, headers: object = {}, signal: AbortSignal | null = null): object => { + const reqHeaders: { [key: string]: string } = { ...headers, 'Content-Type': 'application/json' } + reqHeaders[WebrpcHeader] = WebrpcHeaderValue + + return { + method: 'POST', + headers: reqHeaders, + body: JSON.stringify(body || {}), + signal, + } +} + +const buildResponse = (res: Response): Promise => { + return res.text().then((text) => { + let data + try { + data = JSON.parse(text) + } catch (error) { + let message = '' + if (error instanceof Error) { + message = error.message + } + throw WebrpcBadResponseError.new({ + status: res.status, + cause: `JSON.parse(): ${message}: response text: ${text}`, + }) + } + if (!res.ok) { + const code: number = typeof data.code === 'number' ? data.code : 0 + throw (webrpcErrorByCode[code] || WebrpcError).new(data) + } + return data + }) +} + +// +// Errors +// + +export class WebrpcError extends Error { + name: string + code: number + message: string + status: number + cause?: string + + /** @deprecated Use message instead of msg. Deprecated in webrpc v0.11.0. */ + msg: string + + constructor(name: string, code: number, message: string, status: number, cause?: string) { + super(message) + this.name = name || 'WebrpcError' + this.code = typeof code === 'number' ? code : 0 + this.message = message || `endpoint error ${this.code}` + this.msg = this.message + this.status = typeof status === 'number' ? status : 0 + this.cause = cause + Object.setPrototypeOf(this, WebrpcError.prototype) + } + + static new(payload: any): WebrpcError { + return new this(payload.error, payload.code, payload.message || payload.msg, payload.status, payload.cause) + } +} + +// Webrpc errors + +export class WebrpcEndpointError extends WebrpcError { + constructor( + name: string = 'WebrpcEndpoint', + code: number = 0, + message: string = 'endpoint error', + status: number = 0, + cause?: string, + ) { + super(name, code, message, status, cause) + Object.setPrototypeOf(this, WebrpcEndpointError.prototype) + } +} + +export class WebrpcRequestFailedError extends WebrpcError { + constructor( + name: string = 'WebrpcRequestFailed', + code: number = -1, + message: string = 'request failed', + status: number = 0, + cause?: string, + ) { + super(name, code, message, status, cause) + Object.setPrototypeOf(this, WebrpcRequestFailedError.prototype) + } +} + +export class WebrpcBadRouteError extends WebrpcError { + constructor( + name: string = 'WebrpcBadRoute', + code: number = -2, + message: string = 'bad route', + status: number = 0, + cause?: string, + ) { + super(name, code, message, status, cause) + Object.setPrototypeOf(this, WebrpcBadRouteError.prototype) + } +} + +export class WebrpcBadMethodError extends WebrpcError { + constructor( + name: string = 'WebrpcBadMethod', + code: number = -3, + message: string = 'bad method', + status: number = 0, + cause?: string, + ) { + super(name, code, message, status, cause) + Object.setPrototypeOf(this, WebrpcBadMethodError.prototype) + } +} + +export class WebrpcBadRequestError extends WebrpcError { + constructor( + name: string = 'WebrpcBadRequest', + code: number = -4, + message: string = 'bad request', + status: number = 0, + cause?: string, + ) { + super(name, code, message, status, cause) + Object.setPrototypeOf(this, WebrpcBadRequestError.prototype) + } +} + +export class WebrpcBadResponseError extends WebrpcError { + constructor( + name: string = 'WebrpcBadResponse', + code: number = -5, + message: string = 'bad response', + status: number = 0, + cause?: string, + ) { + super(name, code, message, status, cause) + Object.setPrototypeOf(this, WebrpcBadResponseError.prototype) + } +} + +export class WebrpcServerPanicError extends WebrpcError { + constructor( + name: string = 'WebrpcServerPanic', + code: number = -6, + message: string = 'server panic', + status: number = 0, + cause?: string, + ) { + super(name, code, message, status, cause) + Object.setPrototypeOf(this, WebrpcServerPanicError.prototype) + } +} + +export class WebrpcInternalErrorError extends WebrpcError { + constructor( + name: string = 'WebrpcInternalError', + code: number = -7, + message: string = 'internal error', + status: number = 0, + cause?: string, + ) { + super(name, code, message, status, cause) + Object.setPrototypeOf(this, WebrpcInternalErrorError.prototype) + } +} + +export class WebrpcClientDisconnectedError extends WebrpcError { + constructor( + name: string = 'WebrpcClientDisconnected', + code: number = -8, + message: string = 'client disconnected', + status: number = 0, + cause?: string, + ) { + super(name, code, message, status, cause) + Object.setPrototypeOf(this, WebrpcClientDisconnectedError.prototype) + } +} + +export class WebrpcStreamLostError extends WebrpcError { + constructor( + name: string = 'WebrpcStreamLost', + code: number = -9, + message: string = 'stream lost', + status: number = 0, + cause?: string, + ) { + super(name, code, message, status, cause) + Object.setPrototypeOf(this, WebrpcStreamLostError.prototype) + } +} + +export class WebrpcStreamFinishedError extends WebrpcError { + constructor( + name: string = 'WebrpcStreamFinished', + code: number = -10, + message: string = 'stream finished', + status: number = 0, + cause?: string, + ) { + super(name, code, message, status, cause) + Object.setPrototypeOf(this, WebrpcStreamFinishedError.prototype) + } +} + +// Schema errors + +export class UnauthorizedError extends WebrpcError { + constructor( + name: string = 'Unauthorized', + code: number = 1000, + message: string = 'Unauthorized access', + status: number = 0, + cause?: string, + ) { + super(name, code, message, status, cause) + Object.setPrototypeOf(this, UnauthorizedError.prototype) + } +} + +export class PermissionDeniedError extends WebrpcError { + constructor( + name: string = 'PermissionDenied', + code: number = 1001, + message: string = 'Permission denied', + status: number = 0, + cause?: string, + ) { + super(name, code, message, status, cause) + Object.setPrototypeOf(this, PermissionDeniedError.prototype) + } +} + +export class SessionExpiredError extends WebrpcError { + constructor( + name: string = 'SessionExpired', + code: number = 1002, + message: string = 'Session expired', + status: number = 0, + cause?: string, + ) { + super(name, code, message, status, cause) + Object.setPrototypeOf(this, SessionExpiredError.prototype) + } +} + +export class MethodNotFoundError extends WebrpcError { + constructor( + name: string = 'MethodNotFound', + code: number = 1003, + message: string = 'Method not found', + status: number = 0, + cause?: string, + ) { + super(name, code, message, status, cause) + Object.setPrototypeOf(this, MethodNotFoundError.prototype) + } +} + +export class RequestConflictError extends WebrpcError { + constructor( + name: string = 'RequestConflict', + code: number = 1004, + message: string = 'Conflict with target resource', + status: number = 0, + cause?: string, + ) { + super(name, code, message, status, cause) + Object.setPrototypeOf(this, RequestConflictError.prototype) + } +} + +export class ServiceDisabledError extends WebrpcError { + constructor( + name: string = 'ServiceDisabled', + code: number = 1005, + message: string = 'Service disabled', + status: number = 0, + cause?: string, + ) { + super(name, code, message, status, cause) + Object.setPrototypeOf(this, ServiceDisabledError.prototype) + } +} + +export class TimeoutError extends WebrpcError { + constructor( + name: string = 'Timeout', + code: number = 2000, + message: string = 'Request timed out', + status: number = 0, + cause?: string, + ) { + super(name, code, message, status, cause) + Object.setPrototypeOf(this, TimeoutError.prototype) + } +} + +export class InvalidArgumentError extends WebrpcError { + constructor( + name: string = 'InvalidArgument', + code: number = 2001, + message: string = 'Invalid argument', + status: number = 0, + cause?: string, + ) { + super(name, code, message, status, cause) + Object.setPrototypeOf(this, InvalidArgumentError.prototype) + } +} + +export class NotFoundError extends WebrpcError { + constructor( + name: string = 'NotFound', + code: number = 3000, + message: string = 'Resource not found', + status: number = 0, + cause?: string, + ) { + super(name, code, message, status, cause) + Object.setPrototypeOf(this, NotFoundError.prototype) + } +} + +export class UserNotFoundError extends WebrpcError { + constructor( + name: string = 'UserNotFound', + code: number = 3001, + message: string = 'User not found', + status: number = 0, + cause?: string, + ) { + super(name, code, message, status, cause) + Object.setPrototypeOf(this, UserNotFoundError.prototype) + } +} + +export class ProjectNotFoundError extends WebrpcError { + constructor( + name: string = 'ProjectNotFound', + code: number = 3002, + message: string = 'Project not found', + status: number = 0, + cause?: string, + ) { + super(name, code, message, status, cause) + Object.setPrototypeOf(this, ProjectNotFoundError.prototype) + } +} + +export class AlreadyCollaboratorError extends WebrpcError { + constructor( + name: string = 'AlreadyCollaborator', + code: number = 4001, + message: string = 'Already a collaborator', + status: number = 0, + cause?: string, + ) { + super(name, code, message, status, cause) + Object.setPrototypeOf(this, AlreadyCollaboratorError.prototype) + } +} + +export enum errors { + WebrpcEndpoint = 'WebrpcEndpoint', + WebrpcRequestFailed = 'WebrpcRequestFailed', + WebrpcBadRoute = 'WebrpcBadRoute', + WebrpcBadMethod = 'WebrpcBadMethod', + WebrpcBadRequest = 'WebrpcBadRequest', + WebrpcBadResponse = 'WebrpcBadResponse', + WebrpcServerPanic = 'WebrpcServerPanic', + WebrpcInternalError = 'WebrpcInternalError', + WebrpcClientDisconnected = 'WebrpcClientDisconnected', + WebrpcStreamLost = 'WebrpcStreamLost', + WebrpcStreamFinished = 'WebrpcStreamFinished', + Unauthorized = 'Unauthorized', + PermissionDenied = 'PermissionDenied', + SessionExpired = 'SessionExpired', + MethodNotFound = 'MethodNotFound', + RequestConflict = 'RequestConflict', + ServiceDisabled = 'ServiceDisabled', + Timeout = 'Timeout', + InvalidArgument = 'InvalidArgument', + NotFound = 'NotFound', + UserNotFound = 'UserNotFound', + ProjectNotFound = 'ProjectNotFound', +} + +export enum WebrpcErrorCodes { + WebrpcEndpoint = 0, + WebrpcRequestFailed = -1, + WebrpcBadRoute = -2, + WebrpcBadMethod = -3, + WebrpcBadRequest = -4, + WebrpcBadResponse = -5, + WebrpcServerPanic = -6, + WebrpcInternalError = -7, + WebrpcClientDisconnected = -8, + WebrpcStreamLost = -9, + WebrpcStreamFinished = -10, + Unauthorized = 1000, + PermissionDenied = 1001, + SessionExpired = 1002, + MethodNotFound = 1003, + RequestConflict = 1004, + ServiceDisabled = 1005, + Timeout = 2000, + InvalidArgument = 2001, + NotFound = 3000, + UserNotFound = 3001, + ProjectNotFound = 3002, +} + +export const webrpcErrorByCode: { [code: number]: any } = { + [0]: WebrpcEndpointError, + [-1]: WebrpcRequestFailedError, + [-2]: WebrpcBadRouteError, + [-3]: WebrpcBadMethodError, + [-4]: WebrpcBadRequestError, + [-5]: WebrpcBadResponseError, + [-6]: WebrpcServerPanicError, + [-7]: WebrpcInternalErrorError, + [-8]: WebrpcClientDisconnectedError, + [-9]: WebrpcStreamLostError, + [-10]: WebrpcStreamFinishedError, + [1000]: UnauthorizedError, + [1001]: PermissionDeniedError, + [1002]: SessionExpiredError, + [1003]: MethodNotFoundError, + [1004]: RequestConflictError, + [1005]: ServiceDisabledError, + [2000]: TimeoutError, + [2001]: InvalidArgumentError, + [3000]: NotFoundError, + [3001]: UserNotFoundError, + [3002]: ProjectNotFoundError, +} + +export type Fetch = (input: RequestInfo, init?: RequestInit) => Promise diff --git a/packages/services/builder/src/index.ts b/packages/services/builder/src/index.ts new file mode 100644 index 000000000..7abe21855 --- /dev/null +++ b/packages/services/builder/src/index.ts @@ -0,0 +1,30 @@ +export * from './builder.gen' + +import { Builder as BuilderRpc } from './builder.gen' + +export class SequenceBuilderClient extends BuilderRpc { + constructor( + public projectAccessKey: string, + apiUrl?: string, + ) { + const hostname = apiUrl ?? 'https://api.sequence.build' + super(hostname.endsWith('/') ? hostname.slice(0, -1) : hostname, fetch) + this.fetch = this._fetch + } + + _fetch = (input: RequestInfo, init?: RequestInit): Promise => { + // automatically include access key auth header to requests + // if its been set on the api client + const headers: { [key: string]: any } = {} + + const projectAccessKey = this.projectAccessKey + if (projectAccessKey && projectAccessKey.length > 0) { + headers['X-Access-Key'] = projectAccessKey + } + + // before the request is made + init!.headers = { ...init!.headers, ...headers } + + return fetch(input, init) + } +} diff --git a/packages/services/builder/tsconfig.json b/packages/services/builder/tsconfig.json new file mode 100644 index 000000000..fed9c77b4 --- /dev/null +++ b/packages/services/builder/tsconfig.json @@ -0,0 +1,10 @@ +{ + "extends": "@repo/typescript-config/base.json", + "compilerOptions": { + "rootDir": "src", + "outDir": "dist", + "types": ["node"] + }, + "include": ["src"], + "exclude": ["node_modules", "dist"] +} diff --git a/packages/services/guard/CHANGELOG.md b/packages/services/guard/CHANGELOG.md new file mode 100644 index 000000000..63fd273bc --- /dev/null +++ b/packages/services/guard/CHANGELOG.md @@ -0,0 +1,2943 @@ +# @0xsequence/guard + +## 2.3.8 + +### Patch Changes + +- indexer: update clients +- Updated dependencies + - @0xsequence/account@2.3.8 + - @0xsequence/core@2.3.8 + - @0xsequence/signhub@2.3.8 + - @0xsequence/utils@2.3.8 + +## 2.3.7 + +### Patch Changes + +- Metadata updates +- Updated dependencies + - @0xsequence/account@2.3.7 + - @0xsequence/core@2.3.7 + - @0xsequence/signhub@2.3.7 + - @0xsequence/utils@2.3.7 + +## 2.3.6 + +### Patch Changes + +- New chains +- Updated dependencies + - @0xsequence/account@2.3.6 + - @0xsequence/core@2.3.6 + - @0xsequence/signhub@2.3.6 + - @0xsequence/utils@2.3.6 + +## 2.3.5 + +### Patch Changes + +- Add Frequency Testnet +- Updated dependencies + - @0xsequence/account@2.3.5 + - @0xsequence/core@2.3.5 + - @0xsequence/signhub@2.3.5 + - @0xsequence/utils@2.3.5 + +## 2.3.4 + +### Patch Changes + +- metadata: exclude deprecated methods on rpc client +- Updated dependencies + - @0xsequence/account@2.3.4 + - @0xsequence/core@2.3.4 + - @0xsequence/signhub@2.3.4 + - @0xsequence/utils@2.3.4 + +## 2.3.3 + +### Patch Changes + +- metadata: client update +- Updated dependencies + - @0xsequence/account@2.3.3 + - @0xsequence/core@2.3.3 + - @0xsequence/signhub@2.3.3 + - @0xsequence/utils@2.3.3 + +## 2.3.2 + +### Patch Changes + +- metadata: update rpc client +- Updated dependencies + - @0xsequence/account@2.3.2 + - @0xsequence/core@2.3.2 + - @0xsequence/signhub@2.3.2 + - @0xsequence/utils@2.3.2 + +## 2.3.1 + +### Patch Changes + +- indexer: update rpc client +- Updated dependencies + - @0xsequence/account@2.3.1 + - @0xsequence/core@2.3.1 + - @0xsequence/signhub@2.3.1 + - @0xsequence/utils@2.3.1 + +## 2.3.0 + +### Minor Changes + +- update metadata rpc client + +### Patch Changes + +- Updated dependencies + - @0xsequence/account@2.3.0 + - @0xsequence/core@2.3.0 + - @0xsequence/signhub@2.3.0 + - @0xsequence/utils@2.3.0 + +## 2.2.15 + +### Patch Changes + +- API updates +- Updated dependencies + - @0xsequence/account@2.2.15 + - @0xsequence/core@2.2.15 + - @0xsequence/signhub@2.2.15 + - @0xsequence/utils@2.2.15 + +## 2.2.14 + +### Patch Changes + +- Somnia Testnet and Monad Testnet +- Updated dependencies + - @0xsequence/account@2.2.14 + - @0xsequence/core@2.2.14 + - @0xsequence/signhub@2.2.14 + - @0xsequence/utils@2.2.14 + +## 2.2.13 + +### Patch Changes + +- Add XR1 to all networks +- Updated dependencies + - @0xsequence/account@2.2.13 + - @0xsequence/core@2.2.13 + - @0xsequence/signhub@2.2.13 + - @0xsequence/utils@2.2.13 + +## 2.2.12 + +### Patch Changes + +- Add XR1 +- Updated dependencies + - @0xsequence/account@2.2.12 + - @0xsequence/core@2.2.12 + - @0xsequence/signhub@2.2.12 + - @0xsequence/utils@2.2.12 + +## 2.2.11 + +### Patch Changes + +- Relayer updates +- Updated dependencies + - @0xsequence/account@2.2.11 + - @0xsequence/core@2.2.11 + - @0xsequence/signhub@2.2.11 + - @0xsequence/utils@2.2.11 + +## 2.2.10 + +### Patch Changes + +- Etherlink support +- Updated dependencies + - @0xsequence/account@2.2.10 + - @0xsequence/core@2.2.10 + - @0xsequence/signhub@2.2.10 + - @0xsequence/utils@2.2.10 + +## 2.2.9 + +### Patch Changes + +- Indexer gateway native token balances +- Updated dependencies + - @0xsequence/account@2.2.9 + - @0xsequence/core@2.2.9 + - @0xsequence/signhub@2.2.9 + - @0xsequence/utils@2.2.9 + +## 2.2.8 + +### Patch Changes + +- Add Moonbeam and Moonbase Alpha +- Updated dependencies + - @0xsequence/account@2.2.8 + - @0xsequence/core@2.2.8 + - @0xsequence/signhub@2.2.8 + - @0xsequence/utils@2.2.8 + +## 2.2.7 + +### Patch Changes + +- Update Builder package +- Updated dependencies + - @0xsequence/account@2.2.7 + - @0xsequence/core@2.2.7 + - @0xsequence/signhub@2.2.7 + - @0xsequence/utils@2.2.7 + +## 2.2.6 + +### Patch Changes + +- Update relayer package +- Updated dependencies + - @0xsequence/account@2.2.6 + - @0xsequence/core@2.2.6 + - @0xsequence/signhub@2.2.6 + - @0xsequence/utils@2.2.6 + +## 2.2.5 + +### Patch Changes + +- auth: fix sequence indexer gateway url +- account: immutable wallet proxy hook +- Updated dependencies +- Updated dependencies + - @0xsequence/account@2.2.5 + - @0xsequence/core@2.2.5 + - @0xsequence/signhub@2.2.5 + - @0xsequence/utils@2.2.5 + +## 2.2.4 + +### Patch Changes + +- network: update soneium mainnet block explorer url +- waas: signTypedData intent support +- Updated dependencies +- Updated dependencies + - @0xsequence/account@2.2.4 + - @0xsequence/core@2.2.4 + - @0xsequence/signhub@2.2.4 + - @0xsequence/utils@2.2.4 + +## 2.2.3 + +### Patch Changes + +- provider: updating initWallet to use connected network configs if they exist +- Updated dependencies + - @0xsequence/account@2.2.3 + - @0xsequence/core@2.2.3 + - @0xsequence/signhub@2.2.3 + - @0xsequence/utils@2.2.3 + +## 2.2.2 + +### Patch Changes + +- pass projectAccessKey to relayer at all times +- Updated dependencies + - @0xsequence/account@2.2.2 + - @0xsequence/core@2.2.2 + - @0xsequence/signhub@2.2.2 + - @0xsequence/utils@2.2.2 + +## 2.2.1 + +### Patch Changes + +- waas-ethers: sign typed data +- Updated dependencies + - @0xsequence/account@2.2.1 + - @0xsequence/core@2.2.1 + - @0xsequence/signhub@2.2.1 + - @0xsequence/utils@2.2.1 + +## 2.2.0 + +### Minor Changes + +- indexer: gateway client +- @0xsequence/builder +- upgrade puppeteer to v23.10.3 + +### Patch Changes + +- Updated dependencies +- Updated dependencies +- Updated dependencies + - @0xsequence/account@2.2.0 + - @0xsequence/core@2.2.0 + - @0xsequence/signhub@2.2.0 + - @0xsequence/utils@2.2.0 + +## 2.1.8 + +### Patch Changes + +- Add Soneium Mainnet +- Updated dependencies + - @0xsequence/account@2.1.8 + - @0xsequence/core@2.1.8 + - @0xsequence/signhub@2.1.8 + - @0xsequence/utils@2.1.8 + +## 2.1.7 + +### Patch Changes + +- guard: pass project access key to guard requests +- Updated dependencies + - @0xsequence/account@2.1.7 + - @0xsequence/core@2.1.7 + - @0xsequence/signhub@2.1.7 + - @0xsequence/utils@2.1.7 + +## 2.1.6 + +### Patch Changes + +- Add LAOS and Telos Testnet chains +- Updated dependencies + - @0xsequence/account@2.1.6 + - @0xsequence/core@2.1.6 + - @0xsequence/signhub@2.1.6 + - @0xsequence/utils@2.1.6 + +## 2.1.5 + +### Patch Changes + +- account: save presigned configuration with reference chain id 1 +- Updated dependencies + - @0xsequence/account@2.1.5 + - @0xsequence/core@2.1.5 + - @0xsequence/signhub@2.1.5 + - @0xsequence/utils@2.1.5 + +## 2.1.4 + +### Patch Changes + +- provider: pass projectAccessKey into MuxMessageProvider +- Updated dependencies + - @0xsequence/account@2.1.4 + - @0xsequence/core@2.1.4 + - @0xsequence/signhub@2.1.4 + - @0xsequence/utils@2.1.4 + +## 2.1.3 + +### Patch Changes + +- waas: time drift date fix due to strange browser quirk +- Updated dependencies + - @0xsequence/account@2.1.3 + - @0xsequence/core@2.1.3 + - @0xsequence/signhub@2.1.3 + - @0xsequence/utils@2.1.3 + +## 2.1.2 + +### Patch Changes + +- provider: export analytics correctly +- Updated dependencies + - @0xsequence/account@2.1.2 + - @0xsequence/core@2.1.2 + - @0xsequence/signhub@2.1.2 + - @0xsequence/utils@2.1.2 + +## 2.1.1 + +### Patch Changes + +- Add LAOS chain support +- Updated dependencies + - @0xsequence/account@2.1.1 + - @0xsequence/core@2.1.1 + - @0xsequence/signhub@2.1.1 + - @0xsequence/utils@2.1.1 + +## 2.1.0 + +### Minor Changes + +- account: forward project access key when estimating fees and sending transactions + +### Patch Changes + +- sessions: save signatures with reference chain id +- Updated dependencies +- Updated dependencies + - @0xsequence/account@2.1.0 + - @0xsequence/core@2.1.0 + - @0xsequence/signhub@2.1.0 + - @0xsequence/utils@2.1.0 + +## 2.0.26 + +### Patch Changes + +- account: fix chain id comparison +- Updated dependencies + - @0xsequence/account@2.0.26 + - @0xsequence/core@2.0.26 + - @0xsequence/signhub@2.0.26 + - @0xsequence/utils@2.0.26 + +## 2.0.25 + +### Patch Changes + +- skale-nebula: deploy gas limit = 10m +- Updated dependencies + - @0xsequence/account@2.0.25 + - @0xsequence/core@2.0.25 + - @0xsequence/signhub@2.0.25 + - @0xsequence/utils@2.0.25 + +## 2.0.24 + +### Patch Changes + +- sessions: arweave: configurable gateway url +- waas: use /status to get time drift before sending any intents +- Updated dependencies +- Updated dependencies + - @0xsequence/account@2.0.24 + - @0xsequence/core@2.0.24 + - @0xsequence/signhub@2.0.24 + - @0xsequence/utils@2.0.24 + +## 2.0.23 + +### Patch Changes + +- Add The Root Network support +- Updated dependencies + - @0xsequence/account@2.0.23 + - @0xsequence/core@2.0.23 + - @0xsequence/signhub@2.0.23 + - @0xsequence/utils@2.0.23 + +## 2.0.22 + +### Patch Changes + +- Add SKALE Nebula Mainnet support +- Updated dependencies + - @0xsequence/account@2.0.22 + - @0xsequence/core@2.0.22 + - @0xsequence/signhub@2.0.22 + - @0xsequence/utils@2.0.22 + +## 2.0.21 + +### Patch Changes + +- account: add publishWitnessFor +- Updated dependencies + - @0xsequence/account@2.0.21 + - @0xsequence/core@2.0.21 + - @0xsequence/signhub@2.0.21 + - @0xsequence/utils@2.0.21 + +## 2.0.20 + +### Patch Changes + +- upgrade deps, and improve waas session status handling +- Updated dependencies + - @0xsequence/account@2.0.20 + - @0xsequence/core@2.0.20 + - @0xsequence/signhub@2.0.20 + - @0xsequence/utils@2.0.20 + +## 2.0.19 + +### Patch Changes + +- Add Immutable zkEVM support +- Updated dependencies + - @0xsequence/account@2.0.19 + - @0xsequence/core@2.0.19 + - @0xsequence/signhub@2.0.19 + - @0xsequence/utils@2.0.19 + +## 2.0.18 + +### Patch Changes + +- waas: new contractCall transaction type +- sessions: add arweave owner +- Updated dependencies +- Updated dependencies + - @0xsequence/account@2.0.18 + - @0xsequence/core@2.0.18 + - @0xsequence/signhub@2.0.18 + - @0xsequence/utils@2.0.18 + +## 2.0.17 + +### Patch Changes + +- update waas auth to clear session before signIn +- Updated dependencies + - @0xsequence/account@2.0.17 + - @0xsequence/core@2.0.17 + - @0xsequence/signhub@2.0.17 + - @0xsequence/utils@2.0.17 + +## 2.0.16 + +### Patch Changes + +- Removed Astar chains +- Updated dependencies + - @0xsequence/account@2.0.16 + - @0xsequence/core@2.0.16 + - @0xsequence/signhub@2.0.16 + - @0xsequence/utils@2.0.16 + +## 2.0.15 + +### Patch Changes + +- indexer: update bindings with token balance additions +- Updated dependencies + - @0xsequence/account@2.0.15 + - @0xsequence/core@2.0.15 + - @0xsequence/signhub@2.0.15 + - @0xsequence/utils@2.0.15 + +## 2.0.14 + +### Patch Changes + +- sessions: arweave config reader +- network: add b3 and apechain mainnet configs +- Updated dependencies +- Updated dependencies + - @0xsequence/account@2.0.14 + - @0xsequence/core@2.0.14 + - @0xsequence/signhub@2.0.14 + - @0xsequence/utils@2.0.14 + +## 2.0.13 + +### Patch Changes + +- network: toy-testnet +- Updated dependencies + - @0xsequence/account@2.0.13 + - @0xsequence/core@2.0.13 + - @0xsequence/signhub@2.0.13 + - @0xsequence/utils@2.0.13 + +## 2.0.12 + +### Patch Changes + +- api: update bindings +- Updated dependencies + - @0xsequence/account@2.0.12 + - @0xsequence/core@2.0.12 + - @0xsequence/signhub@2.0.12 + - @0xsequence/utils@2.0.12 + +## 2.0.11 + +### Patch Changes + +- waas: intents test fix +- api: update bindings +- Updated dependencies +- Updated dependencies + - @0xsequence/account@2.0.11 + - @0xsequence/core@2.0.11 + - @0xsequence/signhub@2.0.11 + - @0xsequence/utils@2.0.11 + +## 2.0.10 + +### Patch Changes + +- network: soneium minato testnet +- Updated dependencies + - @0xsequence/account@2.0.10 + - @0xsequence/core@2.0.10 + - @0xsequence/signhub@2.0.10 + - @0xsequence/utils@2.0.10 + +## 2.0.9 + +### Patch Changes + +- network: fix SKALE network name +- Updated dependencies + - @0xsequence/account@2.0.9 + - @0xsequence/core@2.0.9 + - @0xsequence/signhub@2.0.9 + - @0xsequence/utils@2.0.9 + +## 2.0.8 + +### Patch Changes + +- metadata: update bindings +- Updated dependencies + - @0xsequence/account@2.0.8 + - @0xsequence/core@2.0.8 + - @0xsequence/signhub@2.0.8 + - @0xsequence/utils@2.0.8 + +## 2.0.7 + +### Patch Changes + +- wallet request handler fix +- Updated dependencies + - @0xsequence/account@2.0.7 + - @0xsequence/core@2.0.7 + - @0xsequence/signhub@2.0.7 + - @0xsequence/utils@2.0.7 + +## 2.0.6 + +### Patch Changes + +- network: matic -> pol +- Updated dependencies + - @0xsequence/account@2.0.6 + - @0xsequence/core@2.0.6 + - @0xsequence/signhub@2.0.6 + - @0xsequence/utils@2.0.6 + +## 2.0.5 + +### Patch Changes + +- provider: update databeat to 0.9.2 +- Updated dependencies + - @0xsequence/account@2.0.5 + - @0xsequence/core@2.0.5 + - @0xsequence/signhub@2.0.5 + - @0xsequence/utils@2.0.5 + +## 2.0.4 + +### Patch Changes + +- network: add skale-nebula-testnet +- Updated dependencies + - @0xsequence/account@2.0.4 + - @0xsequence/core@2.0.4 + - @0xsequence/signhub@2.0.4 + - @0xsequence/utils@2.0.4 + +## 2.0.3 + +### Patch Changes + +- waas: check session status in SequenceWaaS.isSignedIn() +- Updated dependencies + - @0xsequence/account@2.0.3 + - @0xsequence/core@2.0.3 + - @0xsequence/signhub@2.0.3 + - @0xsequence/utils@2.0.3 + +## 2.0.2 + +### Patch Changes + +- sessions: property convert serialized bignumber hex value to bigint +- Updated dependencies + - @0xsequence/account@2.0.2 + - @0xsequence/core@2.0.2 + - @0xsequence/signhub@2.0.2 + - @0xsequence/utils@2.0.2 + +## 2.0.1 + +### Patch Changes + +- waas: http signature check for authenticator requests +- provider: unwrap legacy json rpc responses +- use json replacer and reviver for bigints +- Updated dependencies +- Updated dependencies +- Updated dependencies + - @0xsequence/account@2.0.1 + - @0xsequence/core@2.0.1 + - @0xsequence/signhub@2.0.1 + - @0xsequence/utils@2.0.1 + +## 2.0.0 + +### Major Changes + +- ethers v6 + +### Patch Changes + +- Updated dependencies + - @0xsequence/account@2.0.0 + - @0xsequence/core@2.0.0 + - @0xsequence/signhub@2.0.0 + - @0xsequence/utils@2.0.0 + +## 1.10.15 + +### Patch Changes + +- utils: extractProjectIdFromAccessKey +- Updated dependencies + - @0xsequence/account@1.10.15 + - @0xsequence/core@1.10.15 + - @0xsequence/signhub@1.10.15 + - @0xsequence/utils@1.10.15 + +## 1.10.14 + +### Patch Changes + +- network: add borne-testnet to allNetworks +- Updated dependencies + - @0xsequence/account@1.10.14 + - @0xsequence/core@1.10.14 + - @0xsequence/signhub@1.10.14 + - @0xsequence/utils@1.10.14 + +## 1.10.13 + +### Patch Changes + +- network: add borne testnet +- Updated dependencies + - @0xsequence/account@1.10.13 + - @0xsequence/core@1.10.13 + - @0xsequence/signhub@1.10.13 + - @0xsequence/utils@1.10.13 + +## 1.10.12 + +### Patch Changes + +- api: update bindings +- global/window -> globalThis +- Updated dependencies +- Updated dependencies + - @0xsequence/account@1.10.12 + - @0xsequence/core@1.10.12 + - @0xsequence/signhub@1.10.12 + - @0xsequence/utils@1.10.12 + +## 1.10.11 + +### Patch Changes + +- waas: updated intent.gen without webrpc types, errors exported from authenticator.gen +- Updated dependencies + - @0xsequence/account@1.10.11 + - @0xsequence/core@1.10.11 + - @0xsequence/signhub@1.10.11 + - @0xsequence/utils@1.10.11 + +## 1.10.10 + +### Patch Changes + +- metadata: update bindings with new contract collections api +- Updated dependencies + - @0xsequence/account@1.10.10 + - @0xsequence/core@1.10.10 + - @0xsequence/signhub@1.10.10 + - @0xsequence/utils@1.10.10 + +## 1.10.9 + +### Patch Changes + +- waas minor update +- Updated dependencies + - @0xsequence/account@1.10.9 + - @0xsequence/core@1.10.9 + - @0xsequence/signhub@1.10.9 + - @0xsequence/utils@1.10.9 + +## 1.10.8 + +### Patch Changes + +- update metadata bindings +- Updated dependencies + - @0xsequence/account@1.10.8 + - @0xsequence/core@1.10.8 + - @0xsequence/signhub@1.10.8 + - @0xsequence/utils@1.10.8 + +## 1.10.7 + +### Patch Changes + +- minor fixes to waas client +- Updated dependencies + - @0xsequence/account@1.10.7 + - @0xsequence/core@1.10.7 + - @0xsequence/signhub@1.10.7 + - @0xsequence/utils@1.10.7 + +## 1.10.6 + +### Patch Changes + +- metadata: update bindings +- Updated dependencies + - @0xsequence/account@1.10.6 + - @0xsequence/core@1.10.6 + - @0xsequence/signhub@1.10.6 + - @0xsequence/utils@1.10.6 + +## 1.10.5 + +### Patch Changes + +- network: ape-chain-testnet -> apechain-testnet +- Updated dependencies + - @0xsequence/account@1.10.5 + - @0xsequence/core@1.10.5 + - @0xsequence/signhub@1.10.5 + - @0xsequence/utils@1.10.5 + +## 1.10.4 + +### Patch Changes + +- network: add b3-sepolia, ape-chain-testnet, blast, blast-sepolia +- Updated dependencies + - @0xsequence/account@1.10.4 + - @0xsequence/core@1.10.4 + - @0xsequence/signhub@1.10.4 + - @0xsequence/utils@1.10.4 + +## 1.10.3 + +### Patch Changes + +- typing fix +- Updated dependencies + - @0xsequence/account@1.10.3 + - @0xsequence/core@1.10.3 + - @0xsequence/signhub@1.10.3 + - @0xsequence/utils@1.10.3 + +## 1.10.2 + +### Patch Changes + +- - waas: add getIdToken method + - indexer: update api client +- Updated dependencies + - @0xsequence/account@1.10.2 + - @0xsequence/core@1.10.2 + - @0xsequence/signhub@1.10.2 + - @0xsequence/utils@1.10.2 + +## 1.10.1 + +### Patch Changes + +- metadata: update bindings +- Updated dependencies + - @0xsequence/account@1.10.1 + - @0xsequence/core@1.10.1 + - @0xsequence/signhub@1.10.1 + - @0xsequence/utils@1.10.1 + +## 1.10.0 + +### Minor Changes + +- waas release v1.3.0 + +### Patch Changes + +- Updated dependencies + - @0xsequence/account@1.10.0 + - @0xsequence/core@1.10.0 + - @0xsequence/signhub@1.10.0 + - @0xsequence/utils@1.10.0 + +## 1.9.37 + +### Patch Changes + +- network: adds nativeToken data to NetworkMetadata constants +- Updated dependencies + - @0xsequence/account@1.9.37 + - @0xsequence/core@1.9.37 + - @0xsequence/signhub@1.9.37 + - @0xsequence/utils@1.9.37 + +## 1.9.36 + +### Patch Changes + +- guard: export client +- Updated dependencies + - @0xsequence/account@1.9.36 + - @0xsequence/core@1.9.36 + - @0xsequence/signhub@1.9.36 + - @0xsequence/utils@1.9.36 + +## 1.9.35 + +### Patch Changes + +- guard: update bindings +- Updated dependencies + - @0xsequence/account@1.9.35 + - @0xsequence/core@1.9.35 + - @0xsequence/signhub@1.9.35 + - @0xsequence/utils@1.9.35 + +## 1.9.34 + +### Patch Changes + +- waas: always use lowercase email +- Updated dependencies + - @0xsequence/account@1.9.34 + - @0xsequence/core@1.9.34 + - @0xsequence/signhub@1.9.34 + - @0xsequence/utils@1.9.34 + +## 1.9.33 + +### Patch Changes + +- waas: umd build +- Updated dependencies + - @0xsequence/account@1.9.33 + - @0xsequence/core@1.9.33 + - @0xsequence/signhub@1.9.33 + - @0xsequence/utils@1.9.33 + +## 1.9.32 + +### Patch Changes + +- indexer: update bindings +- Updated dependencies + - @0xsequence/account@1.9.32 + - @0xsequence/core@1.9.32 + - @0xsequence/signhub@1.9.32 + - @0xsequence/utils@1.9.32 + +## 1.9.31 + +### Patch Changes + +- metadata: token directory changes +- Updated dependencies + - @0xsequence/account@1.9.31 + - @0xsequence/core@1.9.31 + - @0xsequence/signhub@1.9.31 + - @0xsequence/utils@1.9.31 + +## 1.9.30 + +### Patch Changes + +- update +- Updated dependencies + - @0xsequence/account@1.9.30 + - @0xsequence/core@1.9.30 + - @0xsequence/signhub@1.9.30 + - @0xsequence/utils@1.9.30 + +## 1.9.29 + +### Patch Changes + +- disable gnosis chain +- Updated dependencies + - @0xsequence/account@1.9.29 + - @0xsequence/core@1.9.29 + - @0xsequence/signhub@1.9.29 + - @0xsequence/utils@1.9.29 + +## 1.9.28 + +### Patch Changes + +- add utils/merkletree +- Updated dependencies + - @0xsequence/account@1.9.28 + - @0xsequence/core@1.9.28 + - @0xsequence/signhub@1.9.28 + - @0xsequence/utils@1.9.28 + +## 1.9.27 + +### Patch Changes + +- network: optimistic -> optimism +- waas: remove defaults +- api, sessions: update bindings +- Updated dependencies +- Updated dependencies +- Updated dependencies + - @0xsequence/account@1.9.27 + - @0xsequence/core@1.9.27 + - @0xsequence/signhub@1.9.27 + - @0xsequence/utils@1.9.27 + +## 1.9.26 + +### Patch Changes + +- - add backend interfaces for pluggable interfaces + - introduce @0xsequence/react-native + - update pnpm to lockfile v9 +- Updated dependencies + - @0xsequence/account@1.9.26 + - @0xsequence/core@1.9.26 + - @0xsequence/signhub@1.9.26 + - @0xsequence/utils@1.9.26 + +## 1.9.25 + +### Patch Changes + +- update webrpc clients with new error types +- Updated dependencies + - @0xsequence/account@1.9.25 + - @0xsequence/core@1.9.25 + - @0xsequence/signhub@1.9.25 + - @0xsequence/utils@1.9.25 + +## 1.9.24 + +### Patch Changes + +- waas: add memoryStore backend to localStore +- Updated dependencies + - @0xsequence/account@1.9.24 + - @0xsequence/core@1.9.24 + - @0xsequence/signhub@1.9.24 + - @0xsequence/utils@1.9.24 + +## 1.9.23 + +### Patch Changes + +- update api client bindings +- Updated dependencies + - @0xsequence/account@1.9.23 + - @0xsequence/core@1.9.23 + - @0xsequence/signhub@1.9.23 + - @0xsequence/utils@1.9.23 + +## 1.9.22 + +### Patch Changes + +- update metadata client bindings +- Updated dependencies + - @0xsequence/account@1.9.22 + - @0xsequence/core@1.9.22 + - @0xsequence/signhub@1.9.22 + - @0xsequence/utils@1.9.22 + +## 1.9.21 + +### Patch Changes + +- api client bindings +- Updated dependencies + - @0xsequence/account@1.9.21 + - @0xsequence/core@1.9.21 + - @0xsequence/signhub@1.9.21 + - @0xsequence/utils@1.9.21 + +## 1.9.20 + +### Patch Changes + +- api client bindings update +- Updated dependencies + - @0xsequence/account@1.9.20 + - @0xsequence/core@1.9.20 + - @0xsequence/signhub@1.9.20 + - @0xsequence/utils@1.9.20 + +## 1.9.19 + +### Patch Changes + +- waas update +- Updated dependencies + - @0xsequence/account@1.9.19 + - @0xsequence/core@1.9.19 + - @0xsequence/signhub@1.9.19 + - @0xsequence/utils@1.9.19 + +## 1.9.18 + +### Patch Changes + +- provider: prohibit dangerous functions +- Updated dependencies + - @0xsequence/account@1.9.18 + - @0xsequence/core@1.9.18 + - @0xsequence/signhub@1.9.18 + - @0xsequence/utils@1.9.18 + +## 1.9.17 + +### Patch Changes + +- network: add xr-sepolia +- Updated dependencies + - @0xsequence/account@1.9.17 + - @0xsequence/core@1.9.17 + - @0xsequence/signhub@1.9.17 + - @0xsequence/utils@1.9.17 + +## 1.9.16 + +### Patch Changes + +- waas: sequence.feeOptions +- Updated dependencies + - @0xsequence/account@1.9.16 + - @0xsequence/core@1.9.16 + - @0xsequence/signhub@1.9.16 + - @0xsequence/utils@1.9.16 + +## 1.9.15 + +### Patch Changes + +- metadata: collection external_link field name fix +- Updated dependencies + - @0xsequence/account@1.9.15 + - @0xsequence/core@1.9.15 + - @0xsequence/signhub@1.9.15 + - @0xsequence/utils@1.9.15 + +## 1.9.14 + +### Patch Changes + +- network: astar-zkatana -> astar-zkyoto +- network: deprecate polygon mumbai network +- network: add xai and polygon amoy +- Updated dependencies +- Updated dependencies +- Updated dependencies + - @0xsequence/account@1.9.14 + - @0xsequence/core@1.9.14 + - @0xsequence/signhub@1.9.14 + - @0xsequence/utils@1.9.14 + +## 1.9.13 + +### Patch Changes + +- waas: fix @0xsequence/network dependency +- Updated dependencies + - @0xsequence/account@1.9.13 + - @0xsequence/core@1.9.13 + - @0xsequence/signhub@1.9.13 + - @0xsequence/utils@1.9.13 + +## 1.9.12 + +### Patch Changes + +- indexer: update rpc bindings +- provider: signMessage: Serialize the BytesLike or string message into hexstring before sending +- waas: SessionAuthProof +- Updated dependencies +- Updated dependencies +- Updated dependencies + - @0xsequence/account@1.9.12 + - @0xsequence/core@1.9.12 + - @0xsequence/signhub@1.9.12 + - @0xsequence/utils@1.9.12 + +## 1.9.11 + +### Patch Changes + +- metdata, update rpc bindings +- Updated dependencies + - @0xsequence/account@1.9.11 + - @0xsequence/core@1.9.11 + - @0xsequence/signhub@1.9.11 + - @0xsequence/utils@1.9.11 + +## 1.9.10 + +### Patch Changes + +- update metadata rpc bindings +- Updated dependencies + - @0xsequence/account@1.9.10 + - @0xsequence/core@1.9.10 + - @0xsequence/signhub@1.9.10 + - @0xsequence/utils@1.9.10 + +## 1.9.9 + +### Patch Changes + +- metadata, add SequenceCollections rpc client +- Updated dependencies + - @0xsequence/account@1.9.9 + - @0xsequence/core@1.9.9 + - @0xsequence/signhub@1.9.9 + - @0xsequence/utils@1.9.9 + +## 1.9.8 + +### Patch Changes + +- waas client update +- Updated dependencies + - @0xsequence/account@1.9.8 + - @0xsequence/core@1.9.8 + - @0xsequence/signhub@1.9.8 + - @0xsequence/utils@1.9.8 + +## 1.9.7 + +### Patch Changes + +- update rpc client bindings for api, metadata and relayer +- Updated dependencies + - @0xsequence/account@1.9.7 + - @0xsequence/core@1.9.7 + - @0xsequence/signhub@1.9.7 + - @0xsequence/utils@1.9.7 + +## 1.9.6 + +### Patch Changes + +- waas package update +- Updated dependencies + - @0xsequence/account@1.9.6 + - @0xsequence/core@1.9.6 + - @0xsequence/signhub@1.9.6 + - @0xsequence/utils@1.9.6 + +## 1.9.5 + +### Patch Changes + +- RpcRelayer prioritize project access key +- Updated dependencies + - @0xsequence/account@1.9.5 + - @0xsequence/core@1.9.5 + - @0xsequence/signhub@1.9.5 + - @0xsequence/utils@1.9.5 + +## 1.9.4 + +### Patch Changes + +- waas: fix network dependency +- Updated dependencies + - @0xsequence/account@1.9.4 + - @0xsequence/core@1.9.4 + - @0xsequence/signhub@1.9.4 + - @0xsequence/utils@1.9.4 + +## 1.9.3 + +### Patch Changes + +- provider: don't append access key to RPC url if user has already provided it +- Updated dependencies + - @0xsequence/account@1.9.3 + - @0xsequence/core@1.9.3 + - @0xsequence/signhub@1.9.3 + - @0xsequence/utils@1.9.3 + +## 1.9.2 + +### Patch Changes + +- network: add xai-sepolia +- Updated dependencies + - @0xsequence/account@1.9.2 + - @0xsequence/core@1.9.2 + - @0xsequence/signhub@1.9.2 + - @0xsequence/utils@1.9.2 + +## 1.9.1 + +### Patch Changes + +- analytics fix +- Updated dependencies + - @0xsequence/account@1.9.1 + - @0xsequence/core@1.9.1 + - @0xsequence/signhub@1.9.1 + - @0xsequence/utils@1.9.1 + +## 1.9.0 + +### Minor Changes + +- waas release + +### Patch Changes + +- Updated dependencies + - @0xsequence/account@1.9.0 + - @0xsequence/core@1.9.0 + - @0xsequence/signhub@1.9.0 + - @0xsequence/utils@1.9.0 + +## 1.8.8 + +### Patch Changes + +- update metadata bindings +- Updated dependencies + - @0xsequence/account@1.8.8 + - @0xsequence/core@1.8.8 + - @0xsequence/signhub@1.8.8 + - @0xsequence/utils@1.8.8 + +## 1.8.7 + +### Patch Changes + +- provider: update databeat to 0.9.1 +- Updated dependencies + - @0xsequence/account@1.8.7 + - @0xsequence/core@1.8.7 + - @0xsequence/signhub@1.8.7 + - @0xsequence/utils@1.8.7 + +## 1.8.6 + +### Patch Changes + +- guard: SignedOwnershipProof +- Updated dependencies + - @0xsequence/account@1.8.6 + - @0xsequence/core@1.8.6 + - @0xsequence/signhub@1.8.6 + - @0xsequence/utils@1.8.6 + +## 1.8.5 + +### Patch Changes + +- guard: signOwnershipProof and isSignedOwnershipProof +- Updated dependencies + - @0xsequence/account@1.8.5 + - @0xsequence/core@1.8.5 + - @0xsequence/signhub@1.8.5 + - @0xsequence/utils@1.8.5 + +## 1.8.4 + +### Patch Changes + +- network: add homeverse to networks list +- Updated dependencies + - @0xsequence/account@1.8.4 + - @0xsequence/core@1.8.4 + - @0xsequence/signhub@1.8.4 + - @0xsequence/utils@1.8.4 + +## 1.8.3 + +### Patch Changes + +- api: introduce basic linked wallet support +- Updated dependencies + - @0xsequence/account@1.8.3 + - @0xsequence/core@1.8.3 + - @0xsequence/signhub@1.8.3 + - @0xsequence/utils@1.8.3 + +## 1.8.2 + +### Patch Changes + +- provider: don't initialize analytics unless explicitly requested +- Updated dependencies + - @0xsequence/account@1.8.2 + - @0xsequence/core@1.8.2 + - @0xsequence/signhub@1.8.2 + - @0xsequence/utils@1.8.2 + +## 1.8.1 + +### Patch Changes + +- update to analytics provider +- Updated dependencies + - @0xsequence/account@1.8.1 + - @0xsequence/core@1.8.1 + - @0xsequence/signhub@1.8.1 + - @0xsequence/utils@1.8.1 + +## 1.8.0 + +### Minor Changes + +- provider: project analytics + +### Patch Changes + +- Updated dependencies + - @0xsequence/account@1.8.0 + - @0xsequence/core@1.8.0 + - @0xsequence/signhub@1.8.0 + - @0xsequence/utils@1.8.0 + +## 1.7.2 + +### Patch Changes + +- 0xsequence: ChainId should not be exported as a type +- account, wallet: fix nonce selection +- Updated dependencies +- Updated dependencies + - @0xsequence/account@1.7.2 + - @0xsequence/core@1.7.2 + - @0xsequence/signhub@1.7.2 + - @0xsequence/utils@1.7.2 + +## 1.7.1 + +### Patch Changes + +- network: add missing avalanche logoURI +- Updated dependencies + - @0xsequence/account@1.7.1 + - @0xsequence/core@1.7.1 + - @0xsequence/signhub@1.7.1 + - @0xsequence/utils@1.7.1 + +## 1.7.0 + +### Minor Changes + +- provider: projectAccessKey is now required + +### Patch Changes + +- network: add NetworkMetadata.logoURI property for all networks +- Updated dependencies +- Updated dependencies + - @0xsequence/account@1.7.0 + - @0xsequence/core@1.7.0 + - @0xsequence/signhub@1.7.0 + - @0xsequence/utils@1.7.0 + +## 1.6.3 + +### Patch Changes + +- network list update +- Updated dependencies + - @0xsequence/account@1.6.3 + - @0xsequence/core@1.6.3 + - @0xsequence/signhub@1.6.3 + - @0xsequence/utils@1.6.3 + +## 1.6.2 + +### Patch Changes + +- auth: projectAccessKey option +- wallet: use 12 bytes for random space +- Updated dependencies +- Updated dependencies + - @0xsequence/account@1.6.2 + - @0xsequence/core@1.6.2 + - @0xsequence/signhub@1.6.2 + - @0xsequence/utils@1.6.2 + +## 1.6.1 + +### Patch Changes + +- core: add simple config from subdigest support +- core: fix encode tree with subdigest +- account: implement buildOnChainSignature on Account +- Updated dependencies +- Updated dependencies +- Updated dependencies + - @0xsequence/account@1.6.1 + - @0xsequence/core@1.6.1 + - @0xsequence/signhub@1.6.1 + - @0xsequence/utils@1.6.1 + +## 1.6.0 + +### Minor Changes + +- account, wallet: parallel transactions by default + +### Patch Changes + +- provider: emit disconnect on sign out +- Updated dependencies +- Updated dependencies + - @0xsequence/account@1.6.0 + - @0xsequence/core@1.6.0 + - @0xsequence/signhub@1.6.0 + - @0xsequence/utils@1.6.0 + +## 1.5.0 + +### Minor Changes + +- signhub: add 'signing' signer status + +### Patch Changes + +- auth: Session.open: onAccountAddress callback +- account: allow empty transaction bundles +- Updated dependencies +- Updated dependencies +- Updated dependencies + - @0xsequence/account@1.5.0 + - @0xsequence/core@1.5.0 + - @0xsequence/signhub@1.5.0 + - @0xsequence/utils@1.5.0 + +## 1.4.9 + +### Patch Changes + +- rename SequenceMetadataClient to SequenceMetadata +- Updated dependencies + - @0xsequence/account@1.4.9 + - @0xsequence/core@1.4.9 + - @0xsequence/signhub@1.4.9 + - @0xsequence/utils@1.4.9 + +## 1.4.8 + +### Patch Changes + +- account: Account.getSigners +- Updated dependencies + - @0xsequence/account@1.4.8 + - @0xsequence/core@1.4.8 + - @0xsequence/signhub@1.4.8 + - @0xsequence/utils@1.4.8 + +## 1.4.7 + +### Patch Changes + +- update indexer client bindings +- Updated dependencies + - @0xsequence/account@1.4.7 + - @0xsequence/core@1.4.7 + - @0xsequence/signhub@1.4.7 + - @0xsequence/utils@1.4.7 + +## 1.4.6 + +### Patch Changes + +- - add sepolia networks, mark goerli as deprecated + - update indexer client bindings +- Updated dependencies + - @0xsequence/account@1.4.6 + - @0xsequence/core@1.4.6 + - @0xsequence/signhub@1.4.6 + - @0xsequence/utils@1.4.6 + +## 1.4.5 + +### Patch Changes + +- indexer/metadata: update client bindings +- auth: selectWallet with new address +- Updated dependencies +- Updated dependencies + - @0xsequence/account@1.4.5 + - @0xsequence/core@1.4.5 + - @0xsequence/signhub@1.4.5 + - @0xsequence/utils@1.4.5 + +## 1.4.4 + +### Patch Changes + +- indexer: update bindings +- auth: handle jwt expiry +- Updated dependencies +- Updated dependencies + - @0xsequence/account@1.4.4 + - @0xsequence/core@1.4.4 + - @0xsequence/signhub@1.4.4 + - @0xsequence/utils@1.4.4 + +## 1.4.3 + +### Patch Changes + +- guard: return active status from GuardSigner.getAuthMethods +- Updated dependencies + - @0xsequence/account@1.4.3 + - @0xsequence/core@1.4.3 + - @0xsequence/signhub@1.4.3 + - @0xsequence/utils@1.4.3 + +## 1.4.2 + +### Patch Changes + +- guard: update bindings +- Updated dependencies + - @0xsequence/account@1.4.2 + - @0xsequence/core@1.4.2 + - @0xsequence/signhub@1.4.2 + - @0xsequence/utils@1.4.2 + +## 1.4.1 + +### Patch Changes + +- network: remove unused networks +- signhub: orchestrator interface +- guard: auth methods interface +- guard: update bindings for pin and totp +- guard: no more retry logic +- Updated dependencies +- Updated dependencies +- Updated dependencies +- Updated dependencies +- Updated dependencies + - @0xsequence/account@1.4.1 + - @0xsequence/core@1.4.1 + - @0xsequence/signhub@1.4.1 + - @0xsequence/utils@1.4.1 + +## 1.4.0 + +### Minor Changes + +- project access key support + +### Patch Changes + +- Updated dependencies + - @0xsequence/core@1.4.0 + - @0xsequence/signhub@1.4.0 + +## 1.3.0 + +### Minor Changes + +- signhub: account children + +### Patch Changes + +- guard: do not throw when building deploy transaction +- network: snowtrace.io -> subnets.avax.network/c-chain +- Updated dependencies +- Updated dependencies +- Updated dependencies + - @0xsequence/core@1.3.0 + - @0xsequence/signhub@1.3.0 + +## 1.2.9 + +### Patch Changes + +- account: AccountSigner.sendTransaction simulateForFeeOptions +- relayer: update bindings +- Updated dependencies +- Updated dependencies + - @0xsequence/core@1.2.9 + - @0xsequence/signhub@1.2.9 + +## 1.2.8 + +### Patch Changes + +- rename X-Sequence-Token-Key header to X-Access-Key +- Updated dependencies + - @0xsequence/core@1.2.8 + - @0xsequence/signhub@1.2.8 + +## 1.2.7 + +### Patch Changes + +- add x-sequence-token-key to clients +- Updated dependencies + - @0xsequence/core@1.2.7 + - @0xsequence/signhub@1.2.7 + +## 1.2.6 + +### Patch Changes + +- Fix bind multicall provider +- Updated dependencies + - @0xsequence/core@1.2.6 + - @0xsequence/signhub@1.2.6 + +## 1.2.5 + +### Patch Changes + +- Multicall default configuration fixes +- Updated dependencies + - @0xsequence/core@1.2.5 + - @0xsequence/signhub@1.2.5 + +## 1.2.4 + +### Patch Changes + +- provider: Adding missing payment provider types to PaymentProviderOption +- provider: WalletRequestHandler.notifyChainChanged +- Updated dependencies +- Updated dependencies + - @0xsequence/core@1.2.4 + - @0xsequence/signhub@1.2.4 + +## 1.2.3 + +### Patch Changes + +- auth, provider: connect to accept optional authorizeNonce +- Updated dependencies + - @0xsequence/core@1.2.3 + - @0xsequence/signhub@1.2.3 + +## 1.2.2 + +### Patch Changes + +- provider: allow createContract calls +- core: check for explicit zero address in contract deployments +- Updated dependencies +- Updated dependencies + - @0xsequence/core@1.2.2 + - @0xsequence/signhub@1.2.2 + +## 1.2.1 + +### Patch Changes + +- auth: use sequence api chain id as reference chain id if available +- Updated dependencies + - @0xsequence/core@1.2.1 + - @0xsequence/signhub@1.2.1 + +## 1.2.0 + +### Minor Changes + +- split services from session, better local support + +### Patch Changes + +- Updated dependencies + - @0xsequence/core@1.2.0 + - @0xsequence/signhub@1.2.0 + +## 1.1.15 + +### Patch Changes + +- guard: remove error filtering +- Updated dependencies + - @0xsequence/core@1.1.15 + - @0xsequence/signhub@1.1.15 + +## 1.1.14 + +### Patch Changes + +- guard: add GuardSigner.onError +- Updated dependencies + - @0xsequence/core@1.1.14 + - @0xsequence/signhub@1.1.14 + +## 1.1.13 + +### Patch Changes + +- provider: pass client version with connect options +- provider: removing large from BannerSize +- Updated dependencies +- Updated dependencies + - @0xsequence/core@1.1.13 + - @0xsequence/signhub@1.1.13 + +## 1.1.12 + +### Patch Changes + +- provider: adding bannerSize to ConnectOptions +- Updated dependencies + - @0xsequence/core@1.1.12 + - @0xsequence/signhub@1.1.12 + +## 1.1.11 + +### Patch Changes + +- add homeverse configs +- Updated dependencies + - @0xsequence/core@1.1.11 + - @0xsequence/signhub@1.1.11 + +## 1.1.10 + +### Patch Changes + +- handle default EIP6492 on send +- Updated dependencies + - @0xsequence/core@1.1.10 + - @0xsequence/signhub@1.1.10 + +## 1.1.9 + +### Patch Changes + +- Custom default EIP6492 on client +- Updated dependencies + - @0xsequence/core@1.1.9 + - @0xsequence/signhub@1.1.9 + +## 1.1.8 + +### Patch Changes + +- metadata: searchMetadata: add types filter +- Updated dependencies + - @0xsequence/core@1.1.8 + - @0xsequence/signhub@1.1.8 + +## 1.1.7 + +### Patch Changes + +- adding signInWith connect settings option to allow dapps to automatically login their users with a certain provider optimizing the normal authentication flow +- Updated dependencies + - @0xsequence/core@1.1.7 + - @0xsequence/signhub@1.1.7 + +## 1.1.6 + +### Patch Changes + +- metadata: searchMetadata: add chainID and excludeTokenMetadata filters +- Updated dependencies + - @0xsequence/core@1.1.6 + - @0xsequence/signhub@1.1.6 + +## 1.1.5 + +### Patch Changes + +- account: re-compute meta-transaction id for wallet deployment transactions +- Updated dependencies + - @0xsequence/core@1.1.5 + - @0xsequence/signhub@1.1.5 + +## 1.1.4 + +### Patch Changes + +- network: rename base-mainnet to base +- provider: override isDefaultChain with ConnectOptions.networkId if provided +- Updated dependencies +- Updated dependencies + - @0xsequence/core@1.1.4 + - @0xsequence/signhub@1.1.4 + +## 1.1.3 + +### Patch Changes + +- provider: use network id from transport session +- provider: sign authorization using ConnectOptions.networkId if provided +- Updated dependencies +- Updated dependencies + - @0xsequence/core@1.1.3 + - @0xsequence/signhub@1.1.3 + +## 1.1.2 + +### Patch Changes + +- provider: jsonrpc chain id fixes +- Updated dependencies + - @0xsequence/core@1.1.2 + - @0xsequence/signhub@1.1.2 + +## 1.1.1 + +### Patch Changes + +- network: add base mainnet and sepolia +- provider: reject toxic transaction requests +- Updated dependencies +- Updated dependencies + - @0xsequence/core@1.1.1 + - @0xsequence/signhub@1.1.1 + +## 1.1.0 + +### Minor Changes + +- Refactor dapp facing provider + +### Patch Changes + +- Updated dependencies + - @0xsequence/core@1.1.0 + - @0xsequence/signhub@1.1.0 + +## 1.0.5 + +### Patch Changes + +- network: export network constants +- guard: use the correct global for fetch +- network: nova-explorer.arbitrum.io -> nova.arbiscan.io +- Updated dependencies +- Updated dependencies +- Updated dependencies + - @0xsequence/core@1.0.5 + - @0xsequence/signhub@1.0.5 + +## 1.0.4 + +### Patch Changes + +- provider: accept name or number for networkId +- Updated dependencies + - @0xsequence/core@1.0.4 + - @0xsequence/signhub@1.0.4 + +## 1.0.3 + +### Patch Changes + +- Simpler isValidSignature helpers +- Updated dependencies + - @0xsequence/core@1.0.3 + - @0xsequence/signhub@1.0.3 + +## 1.0.2 + +### Patch Changes + +- add extra signature validation utils methods +- Updated dependencies + - @0xsequence/core@1.0.2 + - @0xsequence/signhub@1.0.2 + +## 1.0.1 + +### Patch Changes + +- add homeverse testnet +- Updated dependencies + - @0xsequence/core@1.0.1 + - @0xsequence/signhub@1.0.1 + +## 1.0.0 + +### Major Changes + +- https://sequence.xyz/blog/sequence-wallet-light-state-sync-full-merkle-wallets + +### Patch Changes + +- Updated dependencies + - @0xsequence/core@1.0.0 + - @0xsequence/signhub@1.0.0 + +## 0.43.34 + +### Patch Changes + +- auth: no jwt for indexer + +## 0.43.33 + +### Patch Changes + +- Adding onConnectOptionsChange handler to WalletRequestHandler + +## 0.43.32 + +### Patch Changes + +- add Base Goerli network + +## 0.43.31 + +### Patch Changes + +- remove AuxDataProvider, add promptSignInConnect + +## 0.43.30 + +### Patch Changes + +- add arbitrum goerli testnet + +## 0.43.29 + +### Patch Changes + +- provider: check availability of window object + +## 0.43.28 + +### Patch Changes + +- update api bindings + +## 0.43.27 + +### Patch Changes + +- Add rpc is sequence method + +## 0.43.26 + +### Patch Changes + +- add zkevm url to enum + +## 0.43.25 + +### Patch Changes + +- added polygon zkevm to mainnet networks + +## 0.43.24 + +### Patch Changes + +- name change from zkevm to polygon-zkevm + +## 0.43.23 + +### Patch Changes + +- update zkEVM name to Polygon zkEVM + +## 0.43.22 + +### Patch Changes + +- add zkevm chain + +## 0.43.21 + +### Patch Changes + +- api: update client bindings + +## 0.43.20 + +### Patch Changes + +- indexer: update bindings + +## 0.43.19 + +### Patch Changes + +- session proof update + +## 0.43.18 + +### Patch Changes + +- rpc client global check, hardening + +## 0.43.17 + +### Patch Changes + +- rpc clients, check of 'global' is defined + +## 0.43.16 + +### Patch Changes + +- ethers peerDep to v5, update rpc client global use + +## 0.43.15 + +### Patch Changes + +- - provider: expand receiver type on some util methods + +## 0.43.14 + +### Patch Changes + +- bump + +## 0.43.13 + +### Patch Changes + +- update rpc bindings + +## 0.43.12 + +### Patch Changes + +- provider: single wallet init, and add new unregisterWallet() method + +## 0.43.11 + +### Patch Changes + +- fix lockfiles +- re-add mocha type deleter + +## 0.43.10 + +### Patch Changes + +- various improvements + +## 0.43.9 + +### Patch Changes + +- update deps + +## 0.43.8 + +### Patch Changes + +- network: JsonRpcProvider with caching + +## 0.43.7 + +### Patch Changes + +- provider: fix wallet network init + +## 0.43.6 + +### Patch Changes + +- metadatata: update rpc bindings + +## 0.43.5 + +### Patch Changes + +- provider: do not set default network for connect messages +- provider: forward missing error message + +## 0.43.4 + +### Patch Changes + +- no-change version bump to fix incorrectly tagged snapshot build + +## 0.43.3 + +### Patch Changes + +- metadata: update bindings + +## 0.43.2 + +### Patch Changes + +- provider: implement connectUnchecked + +## 0.43.1 + +### Patch Changes + +- update to latest ethauth dep + +## 0.43.0 + +### Minor Changes + +- move ethers to a peer dependency + +## 0.42.10 + +### Patch Changes + +- add auxDataProvider + +## 0.42.9 + +### Patch Changes + +- provider: add eip-191 exceptions + +## 0.42.8 + +### Patch Changes + +- provider: skip setting intent origin if we're unity plugin + +## 0.42.7 + +### Patch Changes + +- Add sign in options to connection settings + +## 0.42.6 + +### Patch Changes + +- api bindings update + +## 0.42.5 + +### Patch Changes + +- relayer: don't treat missing receipt as hard failure + +## 0.42.4 + +### Patch Changes + +- provider: add custom app protocol to connect options + +## 0.42.3 + +### Patch Changes + +- update api bindings + +## 0.42.2 + +### Patch Changes + +- disable rinkeby network + +## 0.42.1 + +### Patch Changes + +- wallet: optional waitForReceipt parameter + +## 0.42.0 + +### Minor Changes + +- relayer: estimateGasLimits -> simulate +- add simulator package + +### Patch Changes + +- transactions: fix flattenAuxTransactions +- provider: only filter nullish values +- provider: re-map transaction 'gas' back to 'gasLimit' + +## 0.41.3 + +### Patch Changes + +- api bindings update + +## 0.41.2 + +### Patch Changes + +- api bindings update + +## 0.41.1 + +### Patch Changes + +- update default networks + +## 0.41.0 + +### Minor Changes + +- relayer: fix Relayer.wait() interface + + The interface for calling Relayer.wait() has changed. Instead of a single optional ill-defined timeout/delay parameter, there are three optional parameters, in order: + + - timeout: the maximum time to wait for the transaction receipt + - delay: the polling interval, i.e. the time to wait between requests + - maxFails: the maximum number of hard failures to tolerate before giving up + + Please update your codebase accordingly. + +- relayer: add optional waitForReceipt parameter to Relayer.relay + + The behaviour of Relayer.relay() was not well-defined with respect to whether or not it waited for a receipt. + This change allows the caller to specify whether to wait or not, with the default behaviour being to wait. + +### Patch Changes + +- relayer: wait receipt retry logic +- fix wrapped object error +- provider: forward delegateCall and revertOnError transaction fields + +## 0.40.6 + +### Patch Changes + +- add arbitrum-nova chain + +## 0.40.5 + +### Patch Changes + +- api: update bindings + +## 0.40.4 + +### Patch Changes + +- add unreal transport + +## 0.40.3 + +### Patch Changes + +- provider: fix MessageToSign message type + +## 0.40.2 + +### Patch Changes + +- Wallet provider, loadSession method + +## 0.40.1 + +### Patch Changes + +- export sequence.initWallet and sequence.getWallet + +## 0.40.0 + +### Minor Changes + +- add sequence.initWallet(network, config) and sequence.getWallet() helper methods + +## 0.39.6 + +### Patch Changes + +- indexer: update client bindings + +## 0.39.5 + +### Patch Changes + +- provider: fix networkRpcUrl config option + +## 0.39.4 + +### Patch Changes + +- api: update client bindings + +## 0.39.3 + +### Patch Changes + +- add request method on Web3Provider + +## 0.39.2 + +### Patch Changes + +- update umd name + +## 0.39.1 + +### Patch Changes + +- add Aurora network +- add origin info for accountsChanged event to handle it per dapp + +## 0.39.0 + +### Minor Changes + +- abstract window.localStorage to interface type + +## 0.38.2 + +### Patch Changes + +- provider: add Settings.defaultPurchaseAmount + +## 0.38.1 + +### Patch Changes + +- update api and metadata rpc bindings + +## 0.38.0 + +### Minor Changes + +- api: update bindings, change TokenPrice interface +- bridge: remove @0xsequence/bridge package +- api: update bindings, rename ContractCallArg to TupleComponent + +## 0.37.1 + +### Patch Changes + +- Add back sortNetworks - Removing sorting was a breaking change for dapps on older versions which directly integrate sequence. + +## 0.37.0 + +### Minor Changes + +- network related fixes and improvements +- api: bindings: exchange rate lookups + +## 0.36.13 + +### Patch Changes + +- api: update bindings with new price endpoints + +## 0.36.12 + +### Patch Changes + +- wallet: skip remote signers if not needed +- auth: check that signature meets threshold before requesting auth token + +## 0.36.11 + +### Patch Changes + +- Prefix EIP191 message on wallet-request-handler + +## 0.36.10 + +### Patch Changes + +- support bannerUrl on connect + +## 0.36.9 + +### Patch Changes + +- minor dev xp improvements + +## 0.36.8 + +### Patch Changes + +- more connect options (theme, payment providers, funding currencies) + +## 0.36.7 + +### Patch Changes + +- fix missing break + +## 0.36.6 + +### Patch Changes + +- wallet_switchEthereumChain support + +## 0.36.5 + +### Patch Changes + +- auth: bump ethauth to 0.7.0 + network, wallet: don't assume position of auth network in list + api/indexer/metadata: trim trailing slash on hostname, and add endpoint urls + relayer: Allow to specify local relayer transaction parameters like gas price or gas limit + +## 0.36.4 + +### Patch Changes + +- Updating list of chain ids to include other ethereum compatible chains + +## 0.36.3 + +### Patch Changes + +- provider: pass connect options to prompter methods + +## 0.36.2 + +### Patch Changes + +- transactions: Setting target to 0x0 when empty to during SequenceTxAbiEncode + +## 0.36.1 + +### Patch Changes + +- metadata: update client with more fields + +## 0.36.0 + +### Minor Changes + +- relayer, wallet: fee quote support + +## 0.35.12 + +### Patch Changes + +- provider: rename wallet.commands to wallet.utils + +## 0.35.11 + +### Patch Changes + +- provider/utils: smoother message validation + +## 0.35.10 + +### Patch Changes + +- upgrade deps + +## 0.35.9 + +### Patch Changes + +- provider: window-transport override event handlers with new wallet instance + +## 0.35.8 + +### Patch Changes + +- provider: async wallet sign in improvements + +## 0.35.7 + +### Patch Changes + +- config: cache wallet configs + +## 0.35.6 + +### Patch Changes + +- provider: support async signin of wallet request handler + +## 0.35.5 + +### Patch Changes + +- wallet: skip threshold check during fee estimation + +## 0.35.4 + +### Patch Changes + +- - browser extension mode, center window + +## 0.35.3 + +### Patch Changes + +- - update window position when in browser extension mode + +## 0.35.2 + +### Patch Changes + +- - provider: WindowMessageHandler accept optional windowHref + +## 0.35.1 + +### Patch Changes + +- wallet: update config on undeployed too + +## 0.35.0 + +### Minor Changes + +- - config: add buildStubSignature + - provider: add checks to signing cases for wallet deployment and config statuses + - provider: add prompt for wallet deployment + - relayer: add BaseRelayer.prependWalletDeploy + - relayer: add Relayer.feeOptions + - relayer: account for wallet deployment in fee estimation + - transactions: add fromTransactionish + - wallet: add Account.prependConfigUpdate + - wallet: add Account.getFeeOptions + +## 0.34.0 + +### Minor Changes + +- - upgrade deps + +## 0.31.0 + +### Minor Changes + +- - upgrading to ethers v5.5 + +## 0.30.0 + +### Minor Changes + +- - upgrade most deps + +## 0.29.8 + +### Patch Changes + +- update api + +## 0.28.0 + +### Minor Changes + +- extension provider + +## 0.27.0 + +### Minor Changes + +- Add requireFreshSigner lib to sessions + +## 0.25.1 + +### Patch Changes + +- Fix build typescrypt issue + +## 0.25.0 + +### Minor Changes + +- 10c8af8: Add estimator package + Fix multicall few calls bug + +## 0.23.0 + +### Minor Changes + +- - relayer: offer variety of gas fee options from the relayer service" + +## 0.22.2 + +### Patch Changes + +- e1c109e: Fix authProof on expired sessions + +## 0.22.1 + +### Patch Changes + +- transport session cache + +## 0.22.0 + +### Minor Changes + +- e667b65: Expose all relayer options on networks + +## 0.21.5 + +### Patch Changes + +- Give priority to metaTxnId returned by relayer + +## 0.21.4 + +### Patch Changes + +- Add has enough signers method + +## 0.21.3 + +### Patch Changes + +- add window session cache + +## 0.21.2 + +### Patch Changes + +- exception handlind in relayer + +## 0.21.0 + +### Minor Changes + +- - fix gas estimation on wallets with large number of signers + - update to session handling and wallet config construction upon auth + +## 0.19.3 + +### Patch Changes + +- jwtAuth visibility, package version sync + +## 0.19.0 + +### Minor Changes + +- - provider, improve dapp / wallet transport io + +## 0.18.0 + +### Minor Changes + +- relayer improvements and pending transaction handling + +## 0.16.0 + +### Minor Changes + +- relayer as its own service separate from chaind + +## 0.15.1 + +### Patch Changes + +- update api clients + +## 0.14.3 + +### Patch Changes + +- Fix 0xSequence relayer dependencies + +## 0.14.2 + +### Patch Changes + +- Add debug logs to rpc-relayer + +## 0.14.0 + +### Minor Changes + +- update sequence utils finder which includes optimization + +## 0.13.0 + +### Minor Changes + +- Update SequenceUtils deployed contract + +## 0.12.1 + +### Patch Changes + +- npm bump + +## 0.12.0 + +### Minor Changes + +- provider: improvements to window transport + +## 0.11.4 + +### Patch Changes + +- update api client + +## 0.11.3 + +### Patch Changes + +- improve openWindow state options handling + +## 0.11.2 + +### Patch Changes + +- Fix multicall proxy scopes + +## 0.11.1 + +### Patch Changes + +- Add support for dynamic and nested signatures + +## 0.11.0 + +### Minor Changes + +- Update wallet context to 1.7 contracts + +## 0.10.9 + +### Patch Changes + +- add support for public addresses as signers in session.open + +## 0.10.8 + +### Patch Changes + +- Multicall production configuration + +## 0.10.7 + +### Patch Changes + +- allow provider transport to force disconnect + +## 0.10.6 + +### Patch Changes + +- - fix getWalletState method + +## 0.10.5 + +### Patch Changes + +- update relayer gas refund options + +## 0.10.4 + +### Patch Changes + +- Update api proto + +## 0.10.3 + +### Patch Changes + +- Fix loading config cross-chain + +## 0.10.2 + +### Patch Changes + +- - message digest fix + +## 0.10.1 + +### Patch Changes + +- upgrade deps + +## 0.10.0 + +### Minor Changes + +- Deployed new contracts with ERC1271 signer support + +## 0.9.6 + +### Patch Changes + +- Update ABIs for latest sequence contracts + +## 0.9.3 + +### Patch Changes + +- - minor improvements + +## 0.9.1 + +### Patch Changes + +- - patch bump + +## 0.9.0 + +### Minor Changes + +- - provider transport hardening + +## 0.8.5 + +### Patch Changes + +- - use latest wallet-contracts + +## 0.8.4 + +### Patch Changes + +- - minor improvements, name updates and comments + +## 0.8.3 + +### Patch Changes + +- - refinements + + - normalize signer address in config + + - provider: getWalletState() method to WalletProvider + +## 0.8.2 + +### Patch Changes + +- - field rename and ethauth dependency bump + +## 0.8.1 + +### Patch Changes + +- - variety of optimizations + +## 0.8.0 + +### Minor Changes + +- - changeset fix + +## 0.7.0 + +### Patch Changes + +- 6f11ed7: sequence.js, init release diff --git a/packages/services/guard/README.md b/packages/services/guard/README.md new file mode 100644 index 000000000..dfb8a383f --- /dev/null +++ b/packages/services/guard/README.md @@ -0,0 +1,3 @@ +# @0xsequence/guard + +See [0xsequence project page](https://github.com/0xsequence/sequence.js). diff --git a/packages/services/guard/package.json b/packages/services/guard/package.json new file mode 100644 index 000000000..f04eb1936 --- /dev/null +++ b/packages/services/guard/package.json @@ -0,0 +1,27 @@ +{ + "name": "@0xsequence/guard", + "version": "3.0.0", + "description": "guard sub-package for Sequence", + "repository": "https://github.com/0xsequence/sequence.js/tree/master/packages/guard", + "author": "Sequence Platforms Inc.", + "license": "Apache-2.0", + "scripts": { + "build": "tsc", + "dev": "tsc --watch", + "test": "echo", + "typecheck": "tsc --noEmit" + }, + "exports": { + ".": { + "types": "./src/index.ts", + "default": "./dist/index.js" + } + }, + "peerDependencies": {}, + "devDependencies": { + "@repo/typescript-config": "workspace:^", + "@types/node": "^22.13.9", + "typescript": "^5.7.3" + }, + "dependencies": {} +} diff --git a/packages/services/guard/src/guard.gen.ts b/packages/services/guard/src/guard.gen.ts new file mode 100644 index 000000000..0298fb5ef --- /dev/null +++ b/packages/services/guard/src/guard.gen.ts @@ -0,0 +1,1023 @@ +/* eslint-disable */ +// sequence-guard v0.4.0 776b307c2145ac7a994eec63240acae042c96067 +// -- +// Code generated by webrpc-gen@v0.25.3 with typescript generator. DO NOT EDIT. +// +// webrpc-gen -schema=guard.ridl -target=typescript -client -out=./clients/guard.gen.ts + +export const WebrpcHeader = 'Webrpc' + +export const WebrpcHeaderValue = 'webrpc@v0.25.3;gen-typescript@v0.17.0;sequence-guard@v0.4.0' + +// WebRPC description and code-gen version +export const WebRPCVersion = 'v1' + +// Schema version of your RIDL schema +export const WebRPCSchemaVersion = 'v0.4.0' + +// Schema hash generated from your RIDL schema +export const WebRPCSchemaHash = '776b307c2145ac7a994eec63240acae042c96067' + +type WebrpcGenVersions = { + webrpcGenVersion: string + codeGenName: string + codeGenVersion: string + schemaName: string + schemaVersion: string +} + +export function VersionFromHeader(headers: Headers): WebrpcGenVersions { + const headerValue = headers.get(WebrpcHeader) + if (!headerValue) { + return { + webrpcGenVersion: '', + codeGenName: '', + codeGenVersion: '', + schemaName: '', + schemaVersion: '', + } + } + + return parseWebrpcGenVersions(headerValue) +} + +function parseWebrpcGenVersions(header: string): WebrpcGenVersions { + const versions = header.split(';') + if (versions.length < 3) { + return { + webrpcGenVersion: '', + codeGenName: '', + codeGenVersion: '', + schemaName: '', + schemaVersion: '', + } + } + + const [_, webrpcGenVersion] = versions[0]!.split('@') + const [codeGenName, codeGenVersion] = versions[1]!.split('@') + const [schemaName, schemaVersion] = versions[2]!.split('@') + + return { + webrpcGenVersion: webrpcGenVersion ?? '', + codeGenName: codeGenName ?? '', + codeGenVersion: codeGenVersion ?? '', + schemaName: schemaName ?? '', + schemaVersion: schemaVersion ?? '', + } +} + +// +// Types +// + +export interface Version { + webrpcVersion: string + schemaVersion: string + schemaHash: string + appVersion: string +} + +export interface RuntimeStatus { + healthOK: boolean + startTime: string + uptime: number + ver: string + branch: string + commitHash: string +} + +export interface WalletConfig { + address: string + content: string +} + +export interface WalletSigner { + address: string + weight: number +} + +export interface SignRequest { + chainId: number + msg: string + auxData: string +} + +export interface OwnershipProof { + wallet: string + timestamp: number + signer: string + signature: string +} + +export interface AuthToken { + id: string + token: string +} + +export interface RecoveryCode { + code: string + used: boolean +} + +export interface Guard { + ping(headers?: object, signal?: AbortSignal): Promise + version(headers?: object, signal?: AbortSignal): Promise + runtimeStatus(headers?: object, signal?: AbortSignal): Promise + getSignerConfig(args: GetSignerConfigArgs, headers?: object, signal?: AbortSignal): Promise + /** + * Called by sequence.app when the user signs in, and signs messages/transactions/migrations. + * Requires a valid 2FA token if enabled. + */ + sign(args: SignArgs, headers?: object, signal?: AbortSignal): Promise + signWith(args: SignWithArgs, headers?: object, signal?: AbortSignal): Promise + /** + * Internal use only. + * Only ever needs to be called once per chain. + * Signs a preconfigured payload that the caller has no control over. + */ + patch(args: PatchArgs, headers?: object, signal?: AbortSignal): Promise + /** + * Called by sequence.app when it needs to check the user's 2FA. + * This happens during sign in, before signing messages and transactions, and when configuring 2FA. + * Requires either a valid JWT or a signature by one of the wallet's signers. + */ + authMethods(args: AuthMethodsArgs, headers?: object, signal?: AbortSignal): Promise + /** + * Not currently called. Requires both a JWT and a wallet signature. + */ + setPIN(args: SetPINArgs, headers?: object, signal?: AbortSignal): Promise + /** + * Not currently called. Requires both a JWT and a wallet signature. + */ + resetPIN(args: ResetPINArgs, headers?: object, signal?: AbortSignal): Promise + /** + * Called by sequence.app when the user configures their 2FA. + * Requires both a JWT and a wallet signature. + */ + createTOTP(args: CreateTOTPArgs, headers?: object, signal?: AbortSignal): Promise + /** + * Called by sequence.app when the user configures their 2FA. + * Requires both a JWT and a wallet signature. + */ + commitTOTP(args: CommitTOTPArgs, headers?: object, signal?: AbortSignal): Promise + /** + * Called by sequence.app when the user configures their 2FA. + * Requires both a JWT and a wallet signature. + */ + resetTOTP(args: ResetTOTPArgs, headers?: object, signal?: AbortSignal): Promise + /** + * Called by sequence.app when the user uses a recovery code. + * Requires either a valid JWT or a signature by one of the wallet's signers. + */ + reset2FA(args: Reset2FAArgs, headers?: object, signal?: AbortSignal): Promise + /** + * Called by sequence.app when the user is viewing their recovery codes. + * Requires both a JWT and a wallet signature. + */ + recoveryCodes(args: RecoveryCodesArgs, headers?: object, signal?: AbortSignal): Promise + /** + * Called by sequence.app when the user is viewing their recovery codes. + * Requires both a JWT and a wallet signature. + */ + resetRecoveryCodes( + args: ResetRecoveryCodesArgs, + headers?: object, + signal?: AbortSignal, + ): Promise +} + +export interface PingArgs {} + +export interface PingReturn { + status: boolean +} +export interface VersionArgs {} + +export interface VersionReturn { + version: Version +} +export interface RuntimeStatusArgs {} + +export interface RuntimeStatusReturn { + status: RuntimeStatus +} +export interface GetSignerConfigArgs { + signer: string +} + +export interface GetSignerConfigReturn { + signerConfig: WalletConfig +} +export interface SignArgs { + request: SignRequest + token?: AuthToken +} + +export interface SignReturn { + sig: string +} +export interface SignWithArgs { + signer: string + request: SignRequest + token?: AuthToken +} + +export interface SignWithReturn { + sig: string +} +export interface PatchArgs { + signer: string + chainId: number + secret: string +} + +export interface PatchReturn { + txs: any +} +export interface AuthMethodsArgs { + proof?: OwnershipProof +} + +export interface AuthMethodsReturn { + methods: Array + active: boolean +} +export interface SetPINArgs { + pin: string + timestamp: number + signature: string +} + +export interface SetPINReturn {} +export interface ResetPINArgs { + timestamp: number + signature: string +} + +export interface ResetPINReturn {} +export interface CreateTOTPArgs { + timestamp: number + signature: string +} + +export interface CreateTOTPReturn { + uri: string +} +export interface CommitTOTPArgs { + token: string +} + +export interface CommitTOTPReturn { + codes: Array +} +export interface ResetTOTPArgs { + timestamp: number + signature: string +} + +export interface ResetTOTPReturn {} +export interface Reset2FAArgs { + code: string + proof?: OwnershipProof +} + +export interface Reset2FAReturn {} +export interface RecoveryCodesArgs { + timestamp: number + signature: string +} + +export interface RecoveryCodesReturn { + codes: Array +} +export interface ResetRecoveryCodesArgs { + timestamp: number + signature: string +} + +export interface ResetRecoveryCodesReturn { + codes: Array +} + +// +// Client +// +export class Guard implements Guard { + protected hostname: string + protected fetch: Fetch + protected path = '/rpc/Guard/' + + constructor(hostname: string, fetch: Fetch) { + this.hostname = hostname.replace(/\/*$/, '') + this.fetch = (input: RequestInfo, init?: RequestInit) => fetch(input, init) + } + + private url(name: string): string { + return this.hostname + this.path + name + } + + ping = (headers?: object, signal?: AbortSignal): Promise => { + return this.fetch(this.url('Ping'), createHTTPRequest({}, headers, signal)).then( + (res) => { + return buildResponse(res).then((_data) => { + return { + status: _data.status, + } + }) + }, + (error) => { + throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) + }, + ) + } + + version = (headers?: object, signal?: AbortSignal): Promise => { + return this.fetch(this.url('Version'), createHTTPRequest({}, headers, signal)).then( + (res) => { + return buildResponse(res).then((_data) => { + return { + version: _data.version, + } + }) + }, + (error) => { + throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) + }, + ) + } + + runtimeStatus = (headers?: object, signal?: AbortSignal): Promise => { + return this.fetch(this.url('RuntimeStatus'), createHTTPRequest({}, headers, signal)).then( + (res) => { + return buildResponse(res).then((_data) => { + return { + status: _data.status, + } + }) + }, + (error) => { + throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) + }, + ) + } + + getSignerConfig = ( + args: GetSignerConfigArgs, + headers?: object, + signal?: AbortSignal, + ): Promise => { + return this.fetch(this.url('GetSignerConfig'), createHTTPRequest(args, headers, signal)).then( + (res) => { + return buildResponse(res).then((_data) => { + return { + signerConfig: _data.signerConfig, + } + }) + }, + (error) => { + throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) + }, + ) + } + + sign = (args: SignArgs, headers?: object, signal?: AbortSignal): Promise => { + return this.fetch(this.url('Sign'), createHTTPRequest(args, headers, signal)).then( + (res) => { + return buildResponse(res).then((_data) => { + return { + sig: _data.sig, + } + }) + }, + (error) => { + throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) + }, + ) + } + + signWith = (args: SignWithArgs, headers?: object, signal?: AbortSignal): Promise => { + return this.fetch(this.url('SignWith'), createHTTPRequest(args, headers, signal)).then( + (res) => { + return buildResponse(res).then((_data) => { + return { + sig: _data.sig, + } + }) + }, + (error) => { + throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) + }, + ) + } + + patch = (args: PatchArgs, headers?: object, signal?: AbortSignal): Promise => { + return this.fetch(this.url('Patch'), createHTTPRequest(args, headers, signal)).then( + (res) => { + return buildResponse(res).then((_data) => { + return { + txs: _data.txs, + } + }) + }, + (error) => { + throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) + }, + ) + } + + authMethods = (args: AuthMethodsArgs, headers?: object, signal?: AbortSignal): Promise => { + return this.fetch(this.url('AuthMethods'), createHTTPRequest(args, headers, signal)).then( + (res) => { + return buildResponse(res).then((_data) => { + return { + methods: >_data.methods, + active: _data.active, + } + }) + }, + (error) => { + throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) + }, + ) + } + + setPIN = (args: SetPINArgs, headers?: object, signal?: AbortSignal): Promise => { + return this.fetch(this.url('SetPIN'), createHTTPRequest(args, headers, signal)).then( + (res) => { + return buildResponse(res).then((_data) => { + return {} + }) + }, + (error) => { + throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) + }, + ) + } + + resetPIN = (args: ResetPINArgs, headers?: object, signal?: AbortSignal): Promise => { + return this.fetch(this.url('ResetPIN'), createHTTPRequest(args, headers, signal)).then( + (res) => { + return buildResponse(res).then((_data) => { + return {} + }) + }, + (error) => { + throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) + }, + ) + } + + createTOTP = (args: CreateTOTPArgs, headers?: object, signal?: AbortSignal): Promise => { + return this.fetch(this.url('CreateTOTP'), createHTTPRequest(args, headers, signal)).then( + (res) => { + return buildResponse(res).then((_data) => { + return { + uri: _data.uri, + } + }) + }, + (error) => { + throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) + }, + ) + } + + commitTOTP = (args: CommitTOTPArgs, headers?: object, signal?: AbortSignal): Promise => { + return this.fetch(this.url('CommitTOTP'), createHTTPRequest(args, headers, signal)).then( + (res) => { + return buildResponse(res).then((_data) => { + return { + codes: >_data.codes, + } + }) + }, + (error) => { + throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) + }, + ) + } + + resetTOTP = (args: ResetTOTPArgs, headers?: object, signal?: AbortSignal): Promise => { + return this.fetch(this.url('ResetTOTP'), createHTTPRequest(args, headers, signal)).then( + (res) => { + return buildResponse(res).then((_data) => { + return {} + }) + }, + (error) => { + throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) + }, + ) + } + + reset2FA = (args: Reset2FAArgs, headers?: object, signal?: AbortSignal): Promise => { + return this.fetch(this.url('Reset2FA'), createHTTPRequest(args, headers, signal)).then( + (res) => { + return buildResponse(res).then((_data) => { + return {} + }) + }, + (error) => { + throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) + }, + ) + } + + recoveryCodes = (args: RecoveryCodesArgs, headers?: object, signal?: AbortSignal): Promise => { + return this.fetch(this.url('RecoveryCodes'), createHTTPRequest(args, headers, signal)).then( + (res) => { + return buildResponse(res).then((_data) => { + return { + codes: >_data.codes, + } + }) + }, + (error) => { + throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) + }, + ) + } + + resetRecoveryCodes = ( + args: ResetRecoveryCodesArgs, + headers?: object, + signal?: AbortSignal, + ): Promise => { + return this.fetch(this.url('ResetRecoveryCodes'), createHTTPRequest(args, headers, signal)).then( + (res) => { + return buildResponse(res).then((_data) => { + return { + codes: >_data.codes, + } + }) + }, + (error) => { + throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) + }, + ) + } +} + +const createHTTPRequest = (body: object = {}, headers: object = {}, signal: AbortSignal | null = null): object => { + const reqHeaders: { [key: string]: string } = { ...headers, 'Content-Type': 'application/json' } + reqHeaders[WebrpcHeader] = WebrpcHeaderValue + + return { + method: 'POST', + headers: reqHeaders, + body: JSON.stringify(body || {}), + signal, + } +} + +const buildResponse = (res: Response): Promise => { + return res.text().then((text) => { + let data + try { + data = JSON.parse(text) + } catch (error) { + let message = '' + if (error instanceof Error) { + message = error.message + } + throw WebrpcBadResponseError.new({ + status: res.status, + cause: `JSON.parse(): ${message}: response text: ${text}`, + }) + } + if (!res.ok) { + const code: number = typeof data.code === 'number' ? data.code : 0 + throw (webrpcErrorByCode[code] || WebrpcError).new(data) + } + return data + }) +} + +// +// Errors +// + +export class WebrpcError extends Error { + name: string + code: number + message: string + status: number + cause?: string + + /** @deprecated Use message instead of msg. Deprecated in webrpc v0.11.0. */ + msg: string + + constructor(name: string, code: number, message: string, status: number, cause?: string) { + super(message) + this.name = name || 'WebrpcError' + this.code = typeof code === 'number' ? code : 0 + this.message = message || `endpoint error ${this.code}` + this.msg = this.message + this.status = typeof status === 'number' ? status : 0 + this.cause = cause + Object.setPrototypeOf(this, WebrpcError.prototype) + } + + static new(payload: any): WebrpcError { + return new this(payload.error, payload.code, payload.message || payload.msg, payload.status, payload.cause) + } +} + +// Webrpc errors + +export class WebrpcEndpointError extends WebrpcError { + constructor( + name: string = 'WebrpcEndpoint', + code: number = 0, + message: string = `endpoint error`, + status: number = 0, + cause?: string, + ) { + super(name, code, message, status, cause) + Object.setPrototypeOf(this, WebrpcEndpointError.prototype) + } +} + +export class WebrpcRequestFailedError extends WebrpcError { + constructor( + name: string = 'WebrpcRequestFailed', + code: number = -1, + message: string = `request failed`, + status: number = 0, + cause?: string, + ) { + super(name, code, message, status, cause) + Object.setPrototypeOf(this, WebrpcRequestFailedError.prototype) + } +} + +export class WebrpcBadRouteError extends WebrpcError { + constructor( + name: string = 'WebrpcBadRoute', + code: number = -2, + message: string = `bad route`, + status: number = 0, + cause?: string, + ) { + super(name, code, message, status, cause) + Object.setPrototypeOf(this, WebrpcBadRouteError.prototype) + } +} + +export class WebrpcBadMethodError extends WebrpcError { + constructor( + name: string = 'WebrpcBadMethod', + code: number = -3, + message: string = `bad method`, + status: number = 0, + cause?: string, + ) { + super(name, code, message, status, cause) + Object.setPrototypeOf(this, WebrpcBadMethodError.prototype) + } +} + +export class WebrpcBadRequestError extends WebrpcError { + constructor( + name: string = 'WebrpcBadRequest', + code: number = -4, + message: string = `bad request`, + status: number = 0, + cause?: string, + ) { + super(name, code, message, status, cause) + Object.setPrototypeOf(this, WebrpcBadRequestError.prototype) + } +} + +export class WebrpcBadResponseError extends WebrpcError { + constructor( + name: string = 'WebrpcBadResponse', + code: number = -5, + message: string = `bad response`, + status: number = 0, + cause?: string, + ) { + super(name, code, message, status, cause) + Object.setPrototypeOf(this, WebrpcBadResponseError.prototype) + } +} + +export class WebrpcServerPanicError extends WebrpcError { + constructor( + name: string = 'WebrpcServerPanic', + code: number = -6, + message: string = `server panic`, + status: number = 0, + cause?: string, + ) { + super(name, code, message, status, cause) + Object.setPrototypeOf(this, WebrpcServerPanicError.prototype) + } +} + +export class WebrpcInternalErrorError extends WebrpcError { + constructor( + name: string = 'WebrpcInternalError', + code: number = -7, + message: string = `internal error`, + status: number = 0, + cause?: string, + ) { + super(name, code, message, status, cause) + Object.setPrototypeOf(this, WebrpcInternalErrorError.prototype) + } +} + +export class WebrpcClientDisconnectedError extends WebrpcError { + constructor( + name: string = 'WebrpcClientDisconnected', + code: number = -8, + message: string = `client disconnected`, + status: number = 0, + cause?: string, + ) { + super(name, code, message, status, cause) + Object.setPrototypeOf(this, WebrpcClientDisconnectedError.prototype) + } +} + +export class WebrpcStreamLostError extends WebrpcError { + constructor( + name: string = 'WebrpcStreamLost', + code: number = -9, + message: string = `stream lost`, + status: number = 0, + cause?: string, + ) { + super(name, code, message, status, cause) + Object.setPrototypeOf(this, WebrpcStreamLostError.prototype) + } +} + +export class WebrpcStreamFinishedError extends WebrpcError { + constructor( + name: string = 'WebrpcStreamFinished', + code: number = -10, + message: string = `stream finished`, + status: number = 0, + cause?: string, + ) { + super(name, code, message, status, cause) + Object.setPrototypeOf(this, WebrpcStreamFinishedError.prototype) + } +} + +// Schema errors + +export class UnauthorizedError extends WebrpcError { + constructor( + name: string = 'Unauthorized', + code: number = 1000, + message: string = `Unauthorized access`, + status: number = 0, + cause?: string, + ) { + super(name, code, message, status, cause) + Object.setPrototypeOf(this, UnauthorizedError.prototype) + } +} + +export class PermissionDeniedError extends WebrpcError { + constructor( + name: string = 'PermissionDenied', + code: number = 1001, + message: string = `Permission denied`, + status: number = 0, + cause?: string, + ) { + super(name, code, message, status, cause) + Object.setPrototypeOf(this, PermissionDeniedError.prototype) + } +} + +export class SessionExpiredError extends WebrpcError { + constructor( + name: string = 'SessionExpired', + code: number = 1002, + message: string = `Session expired`, + status: number = 0, + cause?: string, + ) { + super(name, code, message, status, cause) + Object.setPrototypeOf(this, SessionExpiredError.prototype) + } +} + +export class MethodNotFoundError extends WebrpcError { + constructor( + name: string = 'MethodNotFound', + code: number = 1003, + message: string = `Method not found`, + status: number = 0, + cause?: string, + ) { + super(name, code, message, status, cause) + Object.setPrototypeOf(this, MethodNotFoundError.prototype) + } +} + +export class RequestConflictError extends WebrpcError { + constructor( + name: string = 'RequestConflict', + code: number = 1004, + message: string = `Conflict with target resource`, + status: number = 0, + cause?: string, + ) { + super(name, code, message, status, cause) + Object.setPrototypeOf(this, RequestConflictError.prototype) + } +} + +export class AbortedError extends WebrpcError { + constructor( + name: string = 'Aborted', + code: number = 1005, + message: string = `Request aborted`, + status: number = 0, + cause?: string, + ) { + super(name, code, message, status, cause) + Object.setPrototypeOf(this, AbortedError.prototype) + } +} + +export class GeoblockedError extends WebrpcError { + constructor( + name: string = 'Geoblocked', + code: number = 1006, + message: string = `Geoblocked region`, + status: number = 0, + cause?: string, + ) { + super(name, code, message, status, cause) + Object.setPrototypeOf(this, GeoblockedError.prototype) + } +} + +export class RateLimitedError extends WebrpcError { + constructor( + name: string = 'RateLimited', + code: number = 1007, + message: string = `Rate-limited. Please slow down.`, + status: number = 0, + cause?: string, + ) { + super(name, code, message, status, cause) + Object.setPrototypeOf(this, RateLimitedError.prototype) + } +} + +export class InvalidArgumentError extends WebrpcError { + constructor( + name: string = 'InvalidArgument', + code: number = 2001, + message: string = `Invalid argument`, + status: number = 0, + cause?: string, + ) { + super(name, code, message, status, cause) + Object.setPrototypeOf(this, InvalidArgumentError.prototype) + } +} + +export class UnavailableError extends WebrpcError { + constructor( + name: string = 'Unavailable', + code: number = 2002, + message: string = `Unavailable resource`, + status: number = 0, + cause?: string, + ) { + super(name, code, message, status, cause) + Object.setPrototypeOf(this, UnavailableError.prototype) + } +} + +export class QueryFailedError extends WebrpcError { + constructor( + name: string = 'QueryFailed', + code: number = 2003, + message: string = `Query failed`, + status: number = 0, + cause?: string, + ) { + super(name, code, message, status, cause) + Object.setPrototypeOf(this, QueryFailedError.prototype) + } +} + +export class ValidationFailedError extends WebrpcError { + constructor( + name: string = 'ValidationFailed', + code: number = 2004, + message: string = `Validation Failed`, + status: number = 0, + cause?: string, + ) { + super(name, code, message, status, cause) + Object.setPrototypeOf(this, ValidationFailedError.prototype) + } +} + +export class NotFoundError extends WebrpcError { + constructor( + name: string = 'NotFound', + code: number = 3000, + message: string = `Resource not found`, + status: number = 0, + cause?: string, + ) { + super(name, code, message, status, cause) + Object.setPrototypeOf(this, NotFoundError.prototype) + } +} + +export enum errors { + WebrpcEndpoint = 'WebrpcEndpoint', + WebrpcRequestFailed = 'WebrpcRequestFailed', + WebrpcBadRoute = 'WebrpcBadRoute', + WebrpcBadMethod = 'WebrpcBadMethod', + WebrpcBadRequest = 'WebrpcBadRequest', + WebrpcBadResponse = 'WebrpcBadResponse', + WebrpcServerPanic = 'WebrpcServerPanic', + WebrpcInternalError = 'WebrpcInternalError', + WebrpcClientDisconnected = 'WebrpcClientDisconnected', + WebrpcStreamLost = 'WebrpcStreamLost', + WebrpcStreamFinished = 'WebrpcStreamFinished', + Unauthorized = 'Unauthorized', + PermissionDenied = 'PermissionDenied', + SessionExpired = 'SessionExpired', + MethodNotFound = 'MethodNotFound', + RequestConflict = 'RequestConflict', + Aborted = 'Aborted', + Geoblocked = 'Geoblocked', + RateLimited = 'RateLimited', + InvalidArgument = 'InvalidArgument', + Unavailable = 'Unavailable', + QueryFailed = 'QueryFailed', + ValidationFailed = 'ValidationFailed', + NotFound = 'NotFound', +} + +export enum WebrpcErrorCodes { + WebrpcEndpoint = 0, + WebrpcRequestFailed = -1, + WebrpcBadRoute = -2, + WebrpcBadMethod = -3, + WebrpcBadRequest = -4, + WebrpcBadResponse = -5, + WebrpcServerPanic = -6, + WebrpcInternalError = -7, + WebrpcClientDisconnected = -8, + WebrpcStreamLost = -9, + WebrpcStreamFinished = -10, + Unauthorized = 1000, + PermissionDenied = 1001, + SessionExpired = 1002, + MethodNotFound = 1003, + RequestConflict = 1004, + Aborted = 1005, + Geoblocked = 1006, + RateLimited = 1007, + InvalidArgument = 2001, + Unavailable = 2002, + QueryFailed = 2003, + ValidationFailed = 2004, + NotFound = 3000, +} + +export const webrpcErrorByCode: { [code: number]: any } = { + [0]: WebrpcEndpointError, + [-1]: WebrpcRequestFailedError, + [-2]: WebrpcBadRouteError, + [-3]: WebrpcBadMethodError, + [-4]: WebrpcBadRequestError, + [-5]: WebrpcBadResponseError, + [-6]: WebrpcServerPanicError, + [-7]: WebrpcInternalErrorError, + [-8]: WebrpcClientDisconnectedError, + [-9]: WebrpcStreamLostError, + [-10]: WebrpcStreamFinishedError, + [1000]: UnauthorizedError, + [1001]: PermissionDeniedError, + [1002]: SessionExpiredError, + [1003]: MethodNotFoundError, + [1004]: RequestConflictError, + [1005]: AbortedError, + [1006]: GeoblockedError, + [1007]: RateLimitedError, + [2001]: InvalidArgumentError, + [2002]: UnavailableError, + [2003]: QueryFailedError, + [2004]: ValidationFailedError, + [3000]: NotFoundError, +} + +export type Fetch = (input: RequestInfo, init?: RequestInit) => Promise diff --git a/packages/services/guard/src/index.ts b/packages/services/guard/src/index.ts new file mode 100644 index 000000000..fa29a2f54 --- /dev/null +++ b/packages/services/guard/src/index.ts @@ -0,0 +1,2 @@ +// export { Guard } from './guard.gen' +// export * from './signer' diff --git a/packages/services/guard/src/signer.ts b/packages/services/guard/src/signer.ts new file mode 100644 index 000000000..72aeda78f --- /dev/null +++ b/packages/services/guard/src/signer.ts @@ -0,0 +1,308 @@ +// import { Account } from '@0xsequence/account' +// import { commons, universal } from '@0xsequence/core' +// import { signers, Status } from '@0xsequence/signhub' +// import { encodeTypedDataDigest, TypedData } from '@0xsequence/utils' +// import { ethers } from 'ethers' +// import { AuthMethodsReturn, Guard, RecoveryCode as GuardRecoveryCode } from './guard.gen' + +// export class GuardSigner implements signers.SapientSigner { +// private guard: Guard + +// constructor( +// public readonly address: string, +// public readonly url: string, +// public readonly appendSuffix: boolean = false, +// public readonly projectAccessKey?: string +// ) { +// this.guard = new Guard(url, this._fetch) +// } + +// _fetch = (input: RequestInfo, init?: RequestInit): Promise => { +// const headers: { [key: string]: any } = {} + +// const projectAccessKey = this.projectAccessKey + +// if (projectAccessKey && projectAccessKey.length > 0) { +// headers['X-Access-Key'] = projectAccessKey +// } + +// // before the request is made +// init!.headers = { ...init!.headers, ...headers } + +// return fetch(input, init) +// } + +// async getAddress(): Promise { +// return this.address +// } + +// async buildDeployTransaction(_metadata: object): Promise { +// return undefined +// } + +// async predecorateSignedTransactions(_metadata: object): Promise { +// return [] +// } + +// async decorateTransactions( +// bundle: commons.transaction.IntendedTransactionBundle, +// _metadata: object +// ): Promise { +// return bundle +// } + +// async sign(message: ethers.BytesLike, metadata: object): Promise { +// if (!commons.isWalletSignRequestMetadata(metadata)) { +// throw new Error('expected sequence signature request metadata') +// } + +// const guardTotpCode = (metadata as { guardTotpCode?: string }).guardTotpCode + +// // Building auxData, notice: this uses the old v1 format +// // TODO: We should update the guard API so we can pass the metadata directly +// const coder = universal.genericCoderFor(metadata.config.version) +// const { encoded } = coder.signature.encodeSigners(metadata.config, metadata.parts ?? new Map(), [], metadata.chainId) + +// return ( +// await this.guard.signWith({ +// signer: this.address, +// request: { +// msg: ethers.hexlify(message), +// auxData: this.packMsgAndSig(metadata.address, metadata.digest, encoded, metadata.chainId), +// chainId: Number(metadata.chainId) +// }, +// token: guardTotpCode ? { id: AuthMethod.TOTP, token: guardTotpCode } : undefined +// }) +// ).sig +// } + +// notifyStatusChange(_id: string, _status: Status, _metadata: object): void {} + +// async getAuthMethods(proof: OwnershipProof): Promise<{ methods: AuthMethod[]; active: boolean }> { +// let response: AuthMethodsReturn + +// if ('jwt' in proof) { +// response = await this.guard.authMethods({}, { Authorization: `BEARER ${proof.jwt}` }) +// } else { +// const signedProof = await signOwnershipProof(proof) + +// response = await this.guard.authMethods({ +// proof: { +// wallet: signedProof.walletAddress, +// timestamp: signedProof.timestamp.getTime(), +// signer: signedProof.signerAddress, +// signature: signedProof.signature +// } +// }) +// } + +// return { ...response, methods: response.methods.map(parseAuthMethod) } +// } + +// async setPin(pin: string | undefined, proof: AuthUpdateProof): Promise { +// const signedProof = await signAuthUpdateProof(proof) + +// if (pin === undefined) { +// await this.guard.resetPIN( +// { timestamp: signedProof.timestamp.getTime(), signature: signedProof.signature }, +// { Authorization: `BEARER ${proof.jwt}` } +// ) +// } else { +// await this.guard.setPIN( +// { pin, timestamp: signedProof.timestamp.getTime(), signature: signedProof.signature }, +// { Authorization: `BEARER ${proof.jwt}` } +// ) +// } +// } + +// resetPin(proof: AuthUpdateProof): Promise { +// return this.setPin(undefined, proof) +// } + +// async createTotp(proof: AuthUpdateProof): Promise { +// const signedProof = await signAuthUpdateProof(proof) + +// const { uri } = await this.guard.createTOTP( +// { timestamp: signedProof.timestamp.getTime(), signature: signedProof.signature }, +// { Authorization: `BEARER ${proof.jwt}` } +// ) + +// return new URL(uri) +// } + +// async commitTotp(token: string, jwt: string): Promise { +// const { codes } = await this.guard.commitTOTP({ token }, { Authorization: `BEARER ${jwt}` }) +// return codes +// } + +// async resetTotp(proof: AuthUpdateProof): Promise { +// const signedProof = await signAuthUpdateProof(proof) + +// await this.guard.resetTOTP( +// { timestamp: signedProof.timestamp.getTime(), signature: signedProof.signature }, +// { Authorization: `BEARER ${proof.jwt}` } +// ) +// } + +// async reset2fa(recoveryCode: string, proof: OwnershipProof): Promise { +// if ('jwt' in proof) { +// await this.guard.reset2FA({ code: recoveryCode }, { Authorization: `BEARER ${proof.jwt}` }) +// } else { +// const signedProof = await signOwnershipProof(proof) + +// await this.guard.reset2FA({ +// code: recoveryCode, +// proof: { +// wallet: signedProof.walletAddress, +// timestamp: signedProof.timestamp.getTime(), +// signer: signedProof.signerAddress, +// signature: signedProof.signature +// } +// }) +// } +// } + +// async getRecoveryCodes(proof: AuthUpdateProof): Promise { +// const signedProof = await signAuthUpdateProof(proof) + +// const { codes } = await this.guard.recoveryCodes( +// { timestamp: signedProof.timestamp.getTime(), signature: signedProof.signature }, +// { Authorization: `BEARER ${proof.jwt}` } +// ) + +// return codes +// } + +// async resetRecoveryCodes(proof: AuthUpdateProof): Promise { +// const signedProof = await signAuthUpdateProof(proof) + +// const { codes } = await this.guard.resetRecoveryCodes( +// { timestamp: signedProof.timestamp.getTime(), signature: signedProof.signature }, +// { Authorization: `BEARER ${proof.jwt}` } +// ) + +// return codes +// } + +// private packMsgAndSig(address: string, msg: ethers.BytesLike, sig: ethers.BytesLike, chainId: ethers.BigNumberish): string { +// return ethers.AbiCoder.defaultAbiCoder().encode(['address', 'uint256', 'bytes', 'bytes'], [address, chainId, msg, sig]) +// } + +// suffix(): ethers.BytesLike { +// return new Uint8Array(this.appendSuffix ? [3] : []) +// } +// } + +// export type RecoveryCode = GuardRecoveryCode + +// export enum AuthMethod { +// PIN = 'PIN', +// TOTP = 'TOTP' +// } + +// function parseAuthMethod(method: string): AuthMethod { +// switch (method) { +// case AuthMethod.PIN: +// case AuthMethod.TOTP: +// return method +// default: +// throw new Error(`unknown auth method '${method}'`) +// } +// } + +// export type SignedOwnershipProof = { +// walletAddress: string +// timestamp: Date +// signerAddress: string +// signature: string +// } + +// export type OwnershipProof = +// | SignedOwnershipProof +// | { jwt: string } +// | { +// walletAddress: string +// signer: ethers.Signer | signers.SapientSigner +// } + +// export function isSignedOwnershipProof(proof: OwnershipProof): proof is SignedOwnershipProof { +// return 'signerAddress' in proof && typeof proof.signerAddress === 'string' +// } + +// export async function signOwnershipProof(proof: Exclude): Promise { +// if (isSignedOwnershipProof(proof)) { +// return proof +// } else { +// const signer = signers.isSapientSigner(proof.signer) ? proof.signer : new signers.SignerWrapper(proof.signer) +// const signerAddress = await signer.getAddress() +// const timestamp = new Date() +// const typedData = getOwnershipProofTypedData(proof.walletAddress, timestamp) +// const digest = encodeTypedDataDigest(typedData) + +// return { +// walletAddress: proof.walletAddress, +// timestamp, +// signerAddress, +// signature: ethers.hexlify(await signer.sign(digest, {})) +// } +// } +// } + +// export type AuthUpdateProof = { jwt: string } & ({ timestamp: Date; signature: string } | { wallet: Account }) + +// async function signAuthUpdateProof(proof: AuthUpdateProof): Promise<{ jwt: string; timestamp: Date; signature: string }> { +// if ('wallet' in proof) { +// const timestamp = new Date() +// const typedData = getAuthUpdateProofTypedData(timestamp) + +// const signature = await proof.wallet.signTypedData( +// typedData.domain, +// typedData.types, +// typedData.message, +// typedData.domain.chainId ?? 1, +// 'eip6492' +// ) + +// return { jwt: proof.jwt, timestamp, signature } +// } else { +// return proof +// } +// } + +// export function getOwnershipProofTypedData(wallet: string, timestamp: Date): TypedData { +// return { +// domain, +// types: { +// AuthMethods: [ +// { name: 'wallet', type: 'address' }, +// { name: 'timestamp', type: 'string' } +// ] +// }, +// message: { +// wallet: ethers.getAddress(wallet), +// timestamp: toUTCString(timestamp) +// } +// } +// } + +// export function getAuthUpdateProofTypedData(timestamp: Date): TypedData { +// return { +// domain, +// types: { +// AuthUpdate: [{ name: 'timestamp', type: 'string' }] +// }, +// message: { +// timestamp: toUTCString(timestamp) +// } +// } +// } + +// const domain: ethers.TypedDataDomain = { +// name: 'Sequence Guard', +// version: '1', +// chainId: 1 +// } + +// function toUTCString(date: Date): string { +// return date.toUTCString().replace('GMT', 'UTC') +// } diff --git a/packages/services/guard/tsconfig.json b/packages/services/guard/tsconfig.json new file mode 100644 index 000000000..fed9c77b4 --- /dev/null +++ b/packages/services/guard/tsconfig.json @@ -0,0 +1,10 @@ +{ + "extends": "@repo/typescript-config/base.json", + "compilerOptions": { + "rootDir": "src", + "outDir": "dist", + "types": ["node"] + }, + "include": ["src"], + "exclude": ["node_modules", "dist"] +} diff --git a/packages/services/indexer/CHANGELOG.md b/packages/services/indexer/CHANGELOG.md new file mode 100644 index 000000000..6b1ea35be --- /dev/null +++ b/packages/services/indexer/CHANGELOG.md @@ -0,0 +1,1781 @@ +# @0xsequence/indexer + +## 2.3.8 + +### Patch Changes + +- indexer: update clients + +## 2.3.7 + +### Patch Changes + +- Metadata updates + +## 2.3.6 + +### Patch Changes + +- New chains + +## 2.3.5 + +### Patch Changes + +- Add Frequency Testnet + +## 2.3.4 + +### Patch Changes + +- metadata: exclude deprecated methods on rpc client + +## 2.3.3 + +### Patch Changes + +- metadata: client update + +## 2.3.2 + +### Patch Changes + +- metadata: update rpc client + +## 2.3.1 + +### Patch Changes + +- indexer: update rpc client + +## 2.3.0 + +### Minor Changes + +- update metadata rpc client + +## 2.2.15 + +### Patch Changes + +- API updates + +## 2.2.14 + +### Patch Changes + +- Somnia Testnet and Monad Testnet + +## 2.2.13 + +### Patch Changes + +- Add XR1 to all networks + +## 2.2.12 + +### Patch Changes + +- Add XR1 + +## 2.2.11 + +### Patch Changes + +- Relayer updates + +## 2.2.10 + +### Patch Changes + +- Etherlink support + +## 2.2.9 + +### Patch Changes + +- Indexer gateway native token balances + +## 2.2.8 + +### Patch Changes + +- Add Moonbeam and Moonbase Alpha + +## 2.2.7 + +### Patch Changes + +- Update Builder package + +## 2.2.6 + +### Patch Changes + +- Update relayer package + +## 2.2.5 + +### Patch Changes + +- auth: fix sequence indexer gateway url +- account: immutable wallet proxy hook + +## 2.2.4 + +### Patch Changes + +- network: update soneium mainnet block explorer url +- waas: signTypedData intent support + +## 2.2.3 + +### Patch Changes + +- provider: updating initWallet to use connected network configs if they exist + +## 2.2.2 + +### Patch Changes + +- pass projectAccessKey to relayer at all times + +## 2.2.1 + +### Patch Changes + +- waas-ethers: sign typed data + +## 2.2.0 + +### Minor Changes + +- indexer: gateway client +- @0xsequence/builder +- upgrade puppeteer to v23.10.3 + +## 2.1.8 + +### Patch Changes + +- Add Soneium Mainnet + +## 2.1.7 + +### Patch Changes + +- guard: pass project access key to guard requests + +## 2.1.6 + +### Patch Changes + +- Add LAOS and Telos Testnet chains + +## 2.1.5 + +### Patch Changes + +- account: save presigned configuration with reference chain id 1 + +## 2.1.4 + +### Patch Changes + +- provider: pass projectAccessKey into MuxMessageProvider + +## 2.1.3 + +### Patch Changes + +- waas: time drift date fix due to strange browser quirk + +## 2.1.2 + +### Patch Changes + +- provider: export analytics correctly + +## 2.1.1 + +### Patch Changes + +- Add LAOS chain support + +## 2.1.0 + +### Minor Changes + +- account: forward project access key when estimating fees and sending transactions + +### Patch Changes + +- sessions: save signatures with reference chain id + +## 2.0.26 + +### Patch Changes + +- account: fix chain id comparison + +## 2.0.25 + +### Patch Changes + +- skale-nebula: deploy gas limit = 10m + +## 2.0.24 + +### Patch Changes + +- sessions: arweave: configurable gateway url +- waas: use /status to get time drift before sending any intents + +## 2.0.23 + +### Patch Changes + +- Add The Root Network support + +## 2.0.22 + +### Patch Changes + +- Add SKALE Nebula Mainnet support + +## 2.0.21 + +### Patch Changes + +- account: add publishWitnessFor + +## 2.0.20 + +### Patch Changes + +- upgrade deps, and improve waas session status handling + +## 2.0.19 + +### Patch Changes + +- Add Immutable zkEVM support + +## 2.0.18 + +### Patch Changes + +- waas: new contractCall transaction type +- sessions: add arweave owner + +## 2.0.17 + +### Patch Changes + +- update waas auth to clear session before signIn + +## 2.0.16 + +### Patch Changes + +- Removed Astar chains + +## 2.0.15 + +### Patch Changes + +- indexer: update bindings with token balance additions + +## 2.0.14 + +### Patch Changes + +- sessions: arweave config reader +- network: add b3 and apechain mainnet configs + +## 2.0.13 + +### Patch Changes + +- network: toy-testnet + +## 2.0.12 + +### Patch Changes + +- api: update bindings + +## 2.0.11 + +### Patch Changes + +- waas: intents test fix +- api: update bindings + +## 2.0.10 + +### Patch Changes + +- network: soneium minato testnet + +## 2.0.9 + +### Patch Changes + +- network: fix SKALE network name + +## 2.0.8 + +### Patch Changes + +- metadata: update bindings + +## 2.0.7 + +### Patch Changes + +- wallet request handler fix + +## 2.0.6 + +### Patch Changes + +- network: matic -> pol + +## 2.0.5 + +### Patch Changes + +- provider: update databeat to 0.9.2 + +## 2.0.4 + +### Patch Changes + +- network: add skale-nebula-testnet + +## 2.0.3 + +### Patch Changes + +- waas: check session status in SequenceWaaS.isSignedIn() + +## 2.0.2 + +### Patch Changes + +- sessions: property convert serialized bignumber hex value to bigint + +## 2.0.1 + +### Patch Changes + +- waas: http signature check for authenticator requests +- provider: unwrap legacy json rpc responses +- use json replacer and reviver for bigints + +## 2.0.0 + +### Major Changes + +- ethers v6 + +## 1.10.15 + +### Patch Changes + +- utils: extractProjectIdFromAccessKey + +## 1.10.14 + +### Patch Changes + +- network: add borne-testnet to allNetworks + +## 1.10.13 + +### Patch Changes + +- network: add borne testnet + +## 1.10.12 + +### Patch Changes + +- api: update bindings +- global/window -> globalThis + +## 1.10.11 + +### Patch Changes + +- waas: updated intent.gen without webrpc types, errors exported from authenticator.gen + +## 1.10.10 + +### Patch Changes + +- metadata: update bindings with new contract collections api + +## 1.10.9 + +### Patch Changes + +- waas minor update + +## 1.10.8 + +### Patch Changes + +- update metadata bindings + +## 1.10.7 + +### Patch Changes + +- minor fixes to waas client + +## 1.10.6 + +### Patch Changes + +- metadata: update bindings + +## 1.10.5 + +### Patch Changes + +- network: ape-chain-testnet -> apechain-testnet + +## 1.10.4 + +### Patch Changes + +- network: add b3-sepolia, ape-chain-testnet, blast, blast-sepolia + +## 1.10.3 + +### Patch Changes + +- typing fix + +## 1.10.2 + +### Patch Changes + +- - waas: add getIdToken method + - indexer: update api client + +## 1.10.1 + +### Patch Changes + +- metadata: update bindings + +## 1.10.0 + +### Minor Changes + +- waas release v1.3.0 + +## 1.9.37 + +### Patch Changes + +- network: adds nativeToken data to NetworkMetadata constants + +## 1.9.36 + +### Patch Changes + +- guard: export client + +## 1.9.35 + +### Patch Changes + +- guard: update bindings + +## 1.9.34 + +### Patch Changes + +- waas: always use lowercase email + +## 1.9.33 + +### Patch Changes + +- waas: umd build + +## 1.9.32 + +### Patch Changes + +- indexer: update bindings + +## 1.9.31 + +### Patch Changes + +- metadata: token directory changes + +## 1.9.30 + +### Patch Changes + +- update + +## 1.9.29 + +### Patch Changes + +- disable gnosis chain + +## 1.9.28 + +### Patch Changes + +- add utils/merkletree + +## 1.9.27 + +### Patch Changes + +- network: optimistic -> optimism +- waas: remove defaults +- api, sessions: update bindings + +## 1.9.26 + +### Patch Changes + +- - add backend interfaces for pluggable interfaces + - introduce @0xsequence/react-native + - update pnpm to lockfile v9 + +## 1.9.25 + +### Patch Changes + +- update webrpc clients with new error types + +## 1.9.24 + +### Patch Changes + +- waas: add memoryStore backend to localStore + +## 1.9.23 + +### Patch Changes + +- update api client bindings + +## 1.9.22 + +### Patch Changes + +- update metadata client bindings + +## 1.9.21 + +### Patch Changes + +- api client bindings + +## 1.9.20 + +### Patch Changes + +- api client bindings update + +## 1.9.19 + +### Patch Changes + +- waas update + +## 1.9.18 + +### Patch Changes + +- provider: prohibit dangerous functions + +## 1.9.17 + +### Patch Changes + +- network: add xr-sepolia + +## 1.9.16 + +### Patch Changes + +- waas: sequence.feeOptions + +## 1.9.15 + +### Patch Changes + +- metadata: collection external_link field name fix + +## 1.9.14 + +### Patch Changes + +- network: astar-zkatana -> astar-zkyoto +- network: deprecate polygon mumbai network +- network: add xai and polygon amoy + +## 1.9.13 + +### Patch Changes + +- waas: fix @0xsequence/network dependency + +## 1.9.12 + +### Patch Changes + +- indexer: update rpc bindings +- provider: signMessage: Serialize the BytesLike or string message into hexstring before sending +- waas: SessionAuthProof + +## 1.9.11 + +### Patch Changes + +- metdata, update rpc bindings + +## 1.9.10 + +### Patch Changes + +- update metadata rpc bindings + +## 1.9.9 + +### Patch Changes + +- metadata, add SequenceCollections rpc client + +## 1.9.8 + +### Patch Changes + +- waas client update + +## 1.9.7 + +### Patch Changes + +- update rpc client bindings for api, metadata and relayer + +## 1.9.6 + +### Patch Changes + +- waas package update + +## 1.9.5 + +### Patch Changes + +- RpcRelayer prioritize project access key + +## 1.9.4 + +### Patch Changes + +- waas: fix network dependency + +## 1.9.3 + +### Patch Changes + +- provider: don't append access key to RPC url if user has already provided it + +## 1.9.2 + +### Patch Changes + +- network: add xai-sepolia + +## 1.9.1 + +### Patch Changes + +- analytics fix + +## 1.9.0 + +### Minor Changes + +- waas release + +## 1.8.8 + +### Patch Changes + +- update metadata bindings + +## 1.8.7 + +### Patch Changes + +- provider: update databeat to 0.9.1 + +## 1.8.6 + +### Patch Changes + +- guard: SignedOwnershipProof + +## 1.8.5 + +### Patch Changes + +- guard: signOwnershipProof and isSignedOwnershipProof + +## 1.8.4 + +### Patch Changes + +- network: add homeverse to networks list + +## 1.8.3 + +### Patch Changes + +- api: introduce basic linked wallet support + +## 1.8.2 + +### Patch Changes + +- provider: don't initialize analytics unless explicitly requested + +## 1.8.1 + +### Patch Changes + +- update to analytics provider + +## 1.8.0 + +### Minor Changes + +- provider: project analytics + +## 1.7.2 + +### Patch Changes + +- 0xsequence: ChainId should not be exported as a type +- account, wallet: fix nonce selection + +## 1.7.1 + +### Patch Changes + +- network: add missing avalanche logoURI + +## 1.7.0 + +### Minor Changes + +- provider: projectAccessKey is now required + +### Patch Changes + +- network: add NetworkMetadata.logoURI property for all networks + +## 1.6.3 + +### Patch Changes + +- network list update + +## 1.6.2 + +### Patch Changes + +- auth: projectAccessKey option +- wallet: use 12 bytes for random space + +## 1.6.1 + +### Patch Changes + +- core: add simple config from subdigest support +- core: fix encode tree with subdigest +- account: implement buildOnChainSignature on Account + +## 1.6.0 + +### Minor Changes + +- account, wallet: parallel transactions by default + +### Patch Changes + +- provider: emit disconnect on sign out + +## 1.5.0 + +### Minor Changes + +- signhub: add 'signing' signer status + +### Patch Changes + +- auth: Session.open: onAccountAddress callback +- account: allow empty transaction bundles + +## 1.4.9 + +### Patch Changes + +- rename SequenceMetadataClient to SequenceMetadata + +## 1.4.8 + +### Patch Changes + +- account: Account.getSigners + +## 1.4.7 + +### Patch Changes + +- update indexer client bindings + +## 1.4.6 + +### Patch Changes + +- - add sepolia networks, mark goerli as deprecated + - update indexer client bindings + +## 1.4.5 + +### Patch Changes + +- indexer/metadata: update client bindings +- auth: selectWallet with new address + +## 1.4.4 + +### Patch Changes + +- indexer: update bindings +- auth: handle jwt expiry + +## 1.4.3 + +### Patch Changes + +- guard: return active status from GuardSigner.getAuthMethods + +## 1.4.2 + +### Patch Changes + +- guard: update bindings + +## 1.4.1 + +### Patch Changes + +- network: remove unused networks +- signhub: orchestrator interface +- guard: auth methods interface +- guard: update bindings for pin and totp +- guard: no more retry logic + +## 1.4.0 + +### Minor Changes + +- project access key support + +## 1.3.0 + +### Minor Changes + +- signhub: account children + +### Patch Changes + +- guard: do not throw when building deploy transaction +- network: snowtrace.io -> subnets.avax.network/c-chain + +## 1.2.9 + +### Patch Changes + +- account: AccountSigner.sendTransaction simulateForFeeOptions +- relayer: update bindings + +## 1.2.8 + +### Patch Changes + +- rename X-Sequence-Token-Key header to X-Access-Key + +## 1.2.7 + +### Patch Changes + +- add x-sequence-token-key to clients + +## 1.2.6 + +### Patch Changes + +- Fix bind multicall provider + +## 1.2.5 + +### Patch Changes + +- Multicall default configuration fixes + +## 1.2.4 + +### Patch Changes + +- provider: Adding missing payment provider types to PaymentProviderOption +- provider: WalletRequestHandler.notifyChainChanged + +## 1.2.3 + +### Patch Changes + +- auth, provider: connect to accept optional authorizeNonce + +## 1.2.2 + +### Patch Changes + +- provider: allow createContract calls +- core: check for explicit zero address in contract deployments + +## 1.2.1 + +### Patch Changes + +- auth: use sequence api chain id as reference chain id if available + +## 1.2.0 + +### Minor Changes + +- split services from session, better local support + +## 1.1.15 + +### Patch Changes + +- guard: remove error filtering + +## 1.1.14 + +### Patch Changes + +- guard: add GuardSigner.onError + +## 1.1.13 + +### Patch Changes + +- provider: pass client version with connect options +- provider: removing large from BannerSize + +## 1.1.12 + +### Patch Changes + +- provider: adding bannerSize to ConnectOptions + +## 1.1.11 + +### Patch Changes + +- add homeverse configs + +## 1.1.10 + +### Patch Changes + +- handle default EIP6492 on send + +## 1.1.9 + +### Patch Changes + +- Custom default EIP6492 on client + +## 1.1.8 + +### Patch Changes + +- metadata: searchMetadata: add types filter + +## 1.1.7 + +### Patch Changes + +- adding signInWith connect settings option to allow dapps to automatically login their users with a certain provider optimizing the normal authentication flow + +## 1.1.6 + +### Patch Changes + +- metadata: searchMetadata: add chainID and excludeTokenMetadata filters + +## 1.1.5 + +### Patch Changes + +- account: re-compute meta-transaction id for wallet deployment transactions + +## 1.1.4 + +### Patch Changes + +- network: rename base-mainnet to base +- provider: override isDefaultChain with ConnectOptions.networkId if provided + +## 1.1.3 + +### Patch Changes + +- provider: use network id from transport session +- provider: sign authorization using ConnectOptions.networkId if provided + +## 1.1.2 + +### Patch Changes + +- provider: jsonrpc chain id fixes + +## 1.1.1 + +### Patch Changes + +- network: add base mainnet and sepolia +- provider: reject toxic transaction requests + +## 1.1.0 + +### Minor Changes + +- Refactor dapp facing provider + +## 1.0.5 + +### Patch Changes + +- network: export network constants +- guard: use the correct global for fetch +- network: nova-explorer.arbitrum.io -> nova.arbiscan.io + +## 1.0.4 + +### Patch Changes + +- provider: accept name or number for networkId + +## 1.0.3 + +### Patch Changes + +- Simpler isValidSignature helpers + +## 1.0.2 + +### Patch Changes + +- add extra signature validation utils methods + +## 1.0.1 + +### Patch Changes + +- add homeverse testnet + +## 1.0.0 + +### Major Changes + +- https://sequence.xyz/blog/sequence-wallet-light-state-sync-full-merkle-wallets + +## 0.43.34 + +### Patch Changes + +- auth: no jwt for indexer + +## 0.43.33 + +### Patch Changes + +- Adding onConnectOptionsChange handler to WalletRequestHandler + +## 0.43.32 + +### Patch Changes + +- add Base Goerli network + +## 0.43.31 + +### Patch Changes + +- remove AuxDataProvider, add promptSignInConnect + +## 0.43.30 + +### Patch Changes + +- add arbitrum goerli testnet + +## 0.43.29 + +### Patch Changes + +- provider: check availability of window object + +## 0.43.28 + +### Patch Changes + +- update api bindings + +## 0.43.27 + +### Patch Changes + +- Add rpc is sequence method + +## 0.43.26 + +### Patch Changes + +- add zkevm url to enum + +## 0.43.25 + +### Patch Changes + +- added polygon zkevm to mainnet networks + +## 0.43.24 + +### Patch Changes + +- name change from zkevm to polygon-zkevm + +## 0.43.23 + +### Patch Changes + +- update zkEVM name to Polygon zkEVM + +## 0.43.22 + +### Patch Changes + +- add zkevm chain + +## 0.43.21 + +### Patch Changes + +- api: update client bindings + +## 0.43.20 + +### Patch Changes + +- indexer: update bindings + +## 0.43.19 + +### Patch Changes + +- session proof update + +## 0.43.18 + +### Patch Changes + +- rpc client global check, hardening + +## 0.43.17 + +### Patch Changes + +- rpc clients, check of 'global' is defined + +## 0.43.16 + +### Patch Changes + +- ethers peerDep to v5, update rpc client global use + +## 0.43.15 + +### Patch Changes + +- - provider: expand receiver type on some util methods + +## 0.43.14 + +### Patch Changes + +- bump + +## 0.43.13 + +### Patch Changes + +- update rpc bindings + +## 0.43.12 + +### Patch Changes + +- provider: single wallet init, and add new unregisterWallet() method + +## 0.43.11 + +### Patch Changes + +- fix lockfiles +- re-add mocha type deleter + +## 0.43.10 + +### Patch Changes + +- various improvements + +## 0.43.9 + +### Patch Changes + +- update deps + +## 0.43.8 + +### Patch Changes + +- network: JsonRpcProvider with caching + +## 0.43.7 + +### Patch Changes + +- provider: fix wallet network init + +## 0.43.6 + +### Patch Changes + +- metadatata: update rpc bindings + +## 0.43.5 + +### Patch Changes + +- provider: do not set default network for connect messages +- provider: forward missing error message + +## 0.43.4 + +### Patch Changes + +- no-change version bump to fix incorrectly tagged snapshot build + +## 0.43.3 + +### Patch Changes + +- metadata: update bindings + +## 0.43.2 + +### Patch Changes + +- provider: implement connectUnchecked + +## 0.43.1 + +### Patch Changes + +- update to latest ethauth dep + +## 0.43.0 + +### Minor Changes + +- move ethers to a peer dependency + +## 0.42.10 + +### Patch Changes + +- add auxDataProvider + +## 0.42.9 + +### Patch Changes + +- provider: add eip-191 exceptions + +## 0.42.8 + +### Patch Changes + +- provider: skip setting intent origin if we're unity plugin + +## 0.42.7 + +### Patch Changes + +- Add sign in options to connection settings + +## 0.42.6 + +### Patch Changes + +- api bindings update + +## 0.42.5 + +### Patch Changes + +- relayer: don't treat missing receipt as hard failure + +## 0.42.4 + +### Patch Changes + +- provider: add custom app protocol to connect options + +## 0.42.3 + +### Patch Changes + +- update api bindings + +## 0.42.2 + +### Patch Changes + +- disable rinkeby network + +## 0.42.1 + +### Patch Changes + +- wallet: optional waitForReceipt parameter + +## 0.42.0 + +### Minor Changes + +- relayer: estimateGasLimits -> simulate +- add simulator package + +### Patch Changes + +- transactions: fix flattenAuxTransactions +- provider: only filter nullish values +- provider: re-map transaction 'gas' back to 'gasLimit' + +## 0.41.3 + +### Patch Changes + +- api bindings update + +## 0.41.2 + +### Patch Changes + +- api bindings update + +## 0.41.1 + +### Patch Changes + +- update default networks + +## 0.41.0 + +### Minor Changes + +- relayer: fix Relayer.wait() interface + + The interface for calling Relayer.wait() has changed. Instead of a single optional ill-defined timeout/delay parameter, there are three optional parameters, in order: + + - timeout: the maximum time to wait for the transaction receipt + - delay: the polling interval, i.e. the time to wait between requests + - maxFails: the maximum number of hard failures to tolerate before giving up + + Please update your codebase accordingly. + +- relayer: add optional waitForReceipt parameter to Relayer.relay + + The behaviour of Relayer.relay() was not well-defined with respect to whether or not it waited for a receipt. + This change allows the caller to specify whether to wait or not, with the default behaviour being to wait. + +### Patch Changes + +- relayer: wait receipt retry logic +- fix wrapped object error +- provider: forward delegateCall and revertOnError transaction fields + +## 0.40.6 + +### Patch Changes + +- add arbitrum-nova chain + +## 0.40.5 + +### Patch Changes + +- api: update bindings + +## 0.40.4 + +### Patch Changes + +- add unreal transport + +## 0.40.3 + +### Patch Changes + +- provider: fix MessageToSign message type + +## 0.40.2 + +### Patch Changes + +- Wallet provider, loadSession method + +## 0.40.1 + +### Patch Changes + +- export sequence.initWallet and sequence.getWallet + +## 0.40.0 + +### Minor Changes + +- add sequence.initWallet(network, config) and sequence.getWallet() helper methods + +## 0.39.6 + +### Patch Changes + +- indexer: update client bindings + +## 0.39.5 + +### Patch Changes + +- provider: fix networkRpcUrl config option + +## 0.39.4 + +### Patch Changes + +- api: update client bindings + +## 0.39.3 + +### Patch Changes + +- add request method on Web3Provider + +## 0.39.2 + +### Patch Changes + +- update umd name + +## 0.39.1 + +### Patch Changes + +- add Aurora network +- add origin info for accountsChanged event to handle it per dapp + +## 0.39.0 + +### Minor Changes + +- abstract window.localStorage to interface type + +## 0.38.2 + +### Patch Changes + +- provider: add Settings.defaultPurchaseAmount + +## 0.38.1 + +### Patch Changes + +- update api and metadata rpc bindings + +## 0.38.0 + +### Minor Changes + +- api: update bindings, change TokenPrice interface +- bridge: remove @0xsequence/bridge package +- api: update bindings, rename ContractCallArg to TupleComponent + +## 0.37.1 + +### Patch Changes + +- Add back sortNetworks - Removing sorting was a breaking change for dapps on older versions which directly integrate sequence. + +## 0.37.0 + +### Minor Changes + +- network related fixes and improvements +- api: bindings: exchange rate lookups + +## 0.36.13 + +### Patch Changes + +- api: update bindings with new price endpoints + +## 0.36.12 + +### Patch Changes + +- wallet: skip remote signers if not needed +- auth: check that signature meets threshold before requesting auth token + +## 0.36.11 + +### Patch Changes + +- Prefix EIP191 message on wallet-request-handler + +## 0.36.10 + +### Patch Changes + +- support bannerUrl on connect + +## 0.36.9 + +### Patch Changes + +- minor dev xp improvements + +## 0.36.8 + +### Patch Changes + +- more connect options (theme, payment providers, funding currencies) + +## 0.36.7 + +### Patch Changes + +- fix missing break + +## 0.36.6 + +### Patch Changes + +- wallet_switchEthereumChain support + +## 0.36.5 + +### Patch Changes + +- auth: bump ethauth to 0.7.0 + network, wallet: don't assume position of auth network in list + api/indexer/metadata: trim trailing slash on hostname, and add endpoint urls + relayer: Allow to specify local relayer transaction parameters like gas price or gas limit + +## 0.36.4 + +### Patch Changes + +- Updating list of chain ids to include other ethereum compatible chains + +## 0.36.3 + +### Patch Changes + +- provider: pass connect options to prompter methods + +## 0.36.2 + +### Patch Changes + +- transactions: Setting target to 0x0 when empty to during SequenceTxAbiEncode + +## 0.36.1 + +### Patch Changes + +- metadata: update client with more fields + +## 0.36.0 + +### Minor Changes + +- relayer, wallet: fee quote support + +## 0.35.12 + +### Patch Changes + +- provider: rename wallet.commands to wallet.utils + +## 0.35.11 + +### Patch Changes + +- provider/utils: smoother message validation + +## 0.35.10 + +### Patch Changes + +- upgrade deps + +## 0.35.9 + +### Patch Changes + +- provider: window-transport override event handlers with new wallet instance + +## 0.35.8 + +### Patch Changes + +- provider: async wallet sign in improvements + +## 0.35.7 + +### Patch Changes + +- config: cache wallet configs + +## 0.35.6 + +### Patch Changes + +- provider: support async signin of wallet request handler + +## 0.35.5 + +### Patch Changes + +- wallet: skip threshold check during fee estimation + +## 0.35.4 + +### Patch Changes + +- - browser extension mode, center window + +## 0.35.3 + +### Patch Changes + +- - update window position when in browser extension mode + +## 0.35.2 + +### Patch Changes + +- - provider: WindowMessageHandler accept optional windowHref + +## 0.35.1 + +### Patch Changes + +- wallet: update config on undeployed too + +## 0.35.0 + +### Minor Changes + +- - config: add buildStubSignature + - provider: add checks to signing cases for wallet deployment and config statuses + - provider: add prompt for wallet deployment + - relayer: add BaseRelayer.prependWalletDeploy + - relayer: add Relayer.feeOptions + - relayer: account for wallet deployment in fee estimation + - transactions: add fromTransactionish + - wallet: add Account.prependConfigUpdate + - wallet: add Account.getFeeOptions + +## 0.34.0 + +### Minor Changes + +- - upgrade deps + +## 0.31.0 + +### Minor Changes + +- - upgrading to ethers v5.5 + +## 0.30.0 + +### Minor Changes + +- - upgrade most deps + +## 0.29.8 + +### Patch Changes + +- update api + +## 0.29.3 + +### Patch Changes + +- indexer: add bridge contract types + +## 0.29.0 + +### Minor Changes + +- major architectural changes in Sequence design + + - only one API instance, API is no longer a per-chain service + - separate per-chain indexer service, API no longer handles indexing + - single contract metadata service, API no longer serves metadata + + chaind package has been removed, indexer and metadata packages have been added + + stronger typing with new explicit ChainId type + + multicall fixes and improvements + + forbid "wait" transactions in sendTransactionBatch calls diff --git a/packages/services/indexer/README.md b/packages/services/indexer/README.md new file mode 100644 index 000000000..f468766d8 --- /dev/null +++ b/packages/services/indexer/README.md @@ -0,0 +1,3 @@ +# @0xsequence/indexer + +See [0xsequence project page](https://github.com/0xsequence/sequence.js). diff --git a/packages/services/indexer/package.json b/packages/services/indexer/package.json new file mode 100644 index 000000000..6224ff72d --- /dev/null +++ b/packages/services/indexer/package.json @@ -0,0 +1,27 @@ +{ + "name": "@0xsequence/indexer", + "version": "3.0.0", + "description": "indexer sub-package for Sequence", + "repository": "https://github.com/0xsequence/sequence.js/tree/master/packages/indexer", + "author": "Sequence Platforms Inc.", + "license": "Apache-2.0", + "scripts": { + "build": "tsc", + "dev": "tsc --watch", + "test": "echo", + "typecheck": "tsc --noEmit" + }, + "exports": { + ".": { + "types": "./src/index.ts", + "default": "./dist/index.js" + } + }, + "peerDependencies": {}, + "devDependencies": { + "@repo/typescript-config": "workspace:^", + "@types/node": "^22.13.9", + "typescript": "^5.7.3" + }, + "dependencies": {} +} diff --git a/packages/services/indexer/src/index.ts b/packages/services/indexer/src/index.ts new file mode 100644 index 000000000..a4588c71e --- /dev/null +++ b/packages/services/indexer/src/index.ts @@ -0,0 +1,71 @@ +export * from './indexer.gen' +export * as IndexerGateway from './indexergw.gen' + +import { Indexer as IndexerRpc } from './indexer.gen' +import { IndexerGateway as IndexerGatewayRpc } from './indexergw.gen' + +export class SequenceIndexer extends IndexerRpc { + constructor( + hostname: string, + public projectAccessKey?: string, + public jwtAuth?: string, + ) { + super(hostname.endsWith('/') ? hostname.slice(0, -1) : hostname, fetch) + this.fetch = this._fetch + } + + _fetch = (input: RequestInfo, init?: RequestInit): Promise => { + // automatically include jwt and access key auth header to requests + // if its been set on the api client + const headers: { [key: string]: any } = {} + + const jwtAuth = this.jwtAuth + const projectAccessKey = this.projectAccessKey + + if (jwtAuth && jwtAuth.length > 0) { + headers['Authorization'] = `BEARER ${jwtAuth}` + } + + if (projectAccessKey && projectAccessKey.length > 0) { + headers['X-Access-Key'] = projectAccessKey + } + + // before the request is made + init!.headers = { ...init!.headers, ...headers } + + return fetch(input, init) + } +} + +export class SequenceIndexerGateway extends IndexerGatewayRpc { + constructor( + hostname: string, + public projectAccessKey?: string, + public jwtAuth?: string, + ) { + super(hostname.endsWith('/') ? hostname.slice(0, -1) : hostname, fetch) + this.fetch = this._fetch + } + + _fetch = (input: RequestInfo, init?: RequestInit): Promise => { + // automatically include jwt and access key auth header to requests + // if its been set on the api client + const headers: { [key: string]: any } = {} + + const jwtAuth = this.jwtAuth + const projectAccessKey = this.projectAccessKey + + if (jwtAuth && jwtAuth.length > 0) { + headers['Authorization'] = `BEARER ${jwtAuth}` + } + + if (projectAccessKey && projectAccessKey.length > 0) { + headers['X-Access-Key'] = projectAccessKey + } + + // before the request is made + init!.headers = { ...init!.headers, ...headers } + + return fetch(input, init) + } +} diff --git a/packages/services/indexer/src/indexer.gen.ts b/packages/services/indexer/src/indexer.gen.ts new file mode 100644 index 000000000..89de72566 --- /dev/null +++ b/packages/services/indexer/src/indexer.gen.ts @@ -0,0 +1,2353 @@ +/* eslint-disable */ +// sequence-indexer v0.4.0 546b527de7002f409ffa602ad35b5a3abe979088 +// -- +// Code generated by webrpc-gen@v0.21.1 with typescript generator. DO NOT EDIT. +// +// webrpc-gen -schema=indexer.ridl -service=Indexer -target=typescript -client -out=./clients/indexer.gen.ts + +export const WebrpcHeader = 'Webrpc' + +export const WebrpcHeaderValue = 'webrpc@v0.21.1;gen-typescript@v0.15.1;sequence-indexer@v0.4.0' + +// WebRPC description and code-gen version +export const WebRPCVersion = 'v1' + +// Schema version of your RIDL schema +export const WebRPCSchemaVersion = 'v0.4.0' + +// Schema hash generated from your RIDL schema +export const WebRPCSchemaHash = '546b527de7002f409ffa602ad35b5a3abe979088' + +type WebrpcGenVersions = { + webrpcGenVersion: string + codeGenName: string + codeGenVersion: string + schemaName: string + schemaVersion: string +} + +export function VersionFromHeader(headers: Headers): WebrpcGenVersions { + const headerValue = headers.get(WebrpcHeader) + if (!headerValue) { + return { + webrpcGenVersion: '', + codeGenName: '', + codeGenVersion: '', + schemaName: '', + schemaVersion: '', + } + } + + return parseWebrpcGenVersions(headerValue) +} + +function parseWebrpcGenVersions(header: string): WebrpcGenVersions { + const versions = header.split(';') + if (versions.length < 3) { + return { + webrpcGenVersion: '', + codeGenName: '', + codeGenVersion: '', + schemaName: '', + schemaVersion: '', + } + } + + const [_, webrpcGenVersion] = versions[0]!.split('@') + const [codeGenName, codeGenVersion] = versions[1]!.split('@') + const [schemaName, schemaVersion] = versions[2]!.split('@') + + return { + webrpcGenVersion: webrpcGenVersion!, + codeGenName: codeGenName!, + codeGenVersion: codeGenVersion!, + schemaName: schemaName!, + schemaVersion: schemaVersion!, + } +} + +// +// Types +// + +export enum ResourceStatus { + NOT_AVAILABLE = 'NOT_AVAILABLE', + REFRESHING = 'REFRESHING', + AVAILABLE = 'AVAILABLE', +} + +export interface ContractInfo { + chainId: number + address: string + source: string + name: string + type: string + symbol: string + decimals?: number + logoURI: string + deployed: boolean + bytecodeHash: string + extensions: ContractInfoExtensions + updatedAt: string + queuedAt?: string + status: ResourceStatus +} + +export interface ContractInfoExtensions { + link: string + description: string + categories: Array + ogImage: string + ogName: string + originChainId: number + originAddress: string + blacklist: boolean + verified: boolean + verifiedBy: string + featured: boolean + featureIndex: number +} + +export interface TokenMetadata { + contractAddress?: string + tokenId: string + source: string + name: string + description?: string + image?: string + video?: string + audio?: string + properties?: { [key: string]: any } + attributes: Array<{ [key: string]: any }> + image_data?: string + external_url?: string + background_color?: string + animation_url?: string + decimals?: number + updatedAt?: string + assets?: Array + status: ResourceStatus + queuedAt?: string + lastFetched?: string +} + +export interface Asset { + id: number + collectionId: number + tokenId?: string + url?: string + metadataField: string + name?: string + filesize?: number + mimeType?: string + width?: number + height?: number + updatedAt?: string +} + +export enum ContractType { + UNKNOWN = 'UNKNOWN', + NATIVE = 'NATIVE', + ERC20 = 'ERC20', + ERC721 = 'ERC721', + ERC1155 = 'ERC1155', + SEQUENCE_WALLET = 'SEQUENCE_WALLET', + ERC20_BRIDGE = 'ERC20_BRIDGE', + ERC721_BRIDGE = 'ERC721_BRIDGE', + ERC1155_BRIDGE = 'ERC1155_BRIDGE', + SEQ_MARKETPLACE = 'SEQ_MARKETPLACE', +} + +export enum EventLogType { + UNKNOWN = 'UNKNOWN', + BLOCK_ADDED = 'BLOCK_ADDED', + BLOCK_REMOVED = 'BLOCK_REMOVED', +} + +export enum EventLogDataType { + EVENT = 'EVENT', + TOKEN_TRANSFER = 'TOKEN_TRANSFER', + NATIVE_TOKEN_TRANSFER = 'NATIVE_TOKEN_TRANSFER', + SEQUENCE_TXN = 'SEQUENCE_TXN', +} + +export enum OrderStatus { + OPEN = 'OPEN', + CLOSED = 'CLOSED', + CANCELLED = 'CANCELLED', +} + +export enum TxnTransferType { + UNKNOWN = 'UNKNOWN', + SEND = 'SEND', + RECEIVE = 'RECEIVE', +} + +export enum TransactionStatus { + FAILED = 'FAILED', + SUCCESSFUL = 'SUCCESSFUL', +} + +export enum TransactionType { + LegacyTxnType = 'LegacyTxnType', + AccessListTxnType = 'AccessListTxnType', + DynamicFeeTxnType = 'DynamicFeeTxnType', +} + +export enum SortOrder { + DESC = 'DESC', + ASC = 'ASC', +} + +export enum ContractVerificationStatus { + VERIFIED = 'VERIFIED', + UNVERIFIED = 'UNVERIFIED', + ALL = 'ALL', +} + +export interface Version { + webrpcVersion: string + schemaVersion: string + schemaHash: string + appVersion: string +} + +export interface RuntimeStatus { + healthOK: boolean + indexerEnabled: boolean + startTime: string + uptime: number + ver: string + branch: string + commitHash: string + chainID: number + checks: RuntimeChecks +} + +export interface GatewayBackendResponseTime { + percentiles: { [key: string]: number } + average: number +} + +export interface GatewayBackendRuntimeStatus { + name: string + chainId: number + responseTime: GatewayBackendResponseTime +} + +export interface GatewayRuntimeStatus { + healthOK: boolean + startTime: string + uptime: number + ver: string + branch: string + commitHash: string + backends: Array +} + +export interface WALWriterRuntimeStatus { + healthOK: boolean + startTime: string + uptime: number + ver: string + branch: string + commitHash: string + chainID: number + percentWALWritten: number +} + +export interface RuntimeChecks { + running: boolean + runnables: any + cgoEnabled: boolean + quotaControlEnabled: boolean + syncMode: string + percentIndexed: number + lastBlockNum: number + lastBlockNumWithState: number + bloomStatus: BloomStatus + bond: Bond + diskUsage: DiskUsage +} + +export interface DiskUsage { + humanReadable: string + used: number + size: number + percent: number + dirs: { [key: string]: string } +} + +export interface Bond { + pebble: PebbleMetrics + estimatedDiskUsagePerTable: any + estimatedDiskUsageTotal: string +} + +export interface PebbleMetrics { + compactionCount: number + compactionEstimatedDebt: number + compactionInProgressBytes: number + compactionNumInProgress: number + compactionMarkedFiles: number +} + +export interface BloomStatus { + enabled: boolean + initialized: boolean + bloomInitElapsedTime: string +} + +export interface EtherBalance { + accountAddress: string + balanceWei: string +} + +export interface NativeTokenBalance { + accountAddress: string + chainId: number + balance: string + error: string +} + +export interface IndexState { + chainId: string + lastBlockNum: number + lastBlockHash: string +} + +export interface IndexedBlock { + blockNumber: number + blockShortHash: string +} + +export interface TxnInfo { + from: string + to: string + value: string +} + +export interface EventLog { + id: number + uid: string + type: EventLogType + blockNumber: number + blockHash: string + parentBlockHash: string + contractAddress: string + contractType: ContractType + txnHash: string + txnIndex: number + txnLogIndex: number + logDataType: EventLogDataType + ts: string + txnInfo?: TxnInfo + rawLog?: { [key: string]: any } + event?: EventDecoded +} + +export interface EventDecoded { + topicHash: string + eventSig: string + types: Array + names: Array + values: Array +} + +export interface TokenBalance { + contractType: ContractType + contractAddress: string + accountAddress: string + tokenID?: string + balance: string + blockHash: string + blockNumber: number + chainId: number + uniqueCollectibles: string + isSummary: boolean + contractInfo?: ContractInfo + tokenMetadata?: TokenMetadata +} + +export interface OrderbookOrder { + orderId: string + tokenContract: string + tokenId: string + isListing: boolean + quantity: string + quantityRemaining: string + currencyAddress: string + pricePerToken: string + expiry: string + orderStatus: OrderStatus + createdBy: string + blockNumber: number + orderbookContractAddress: string + createdAt: number +} + +export interface OrderbookOrderFilter { + isListing?: boolean + userAddresses?: Array + tokenIds: Array + excludeUserAddresses?: Array + afterBlockNumber: number + afterCreatedAt: number + beforeExpiry: number + userAddress?: string + excludeUserAddress?: string +} + +export interface TokenHistory { + blockNumber: number + blockHash: string + accountAddress: string + contractAddress: string + contractType: ContractType + fromAddress: string + toAddress: string + txnHash: string + txnIndex: number + txnLogIndex: number + logData: string + tokenIDs: string + Amounts: string + ts: string +} + +export interface TokenSupply { + tokenID: string + supply: string + chainId: number + contractInfo?: ContractInfo + tokenMetadata?: TokenMetadata +} + +export interface Transaction { + txnHash: string + blockNumber: number + blockHash: string + chainId: number + metaTxnID?: string + transfers?: Array + timestamp: string +} + +export interface TxnTransfer { + transferType: TxnTransferType + contractAddress: string + contractType: ContractType + from: string + to: string + tokenIds?: Array + amounts: Array + logIndex: number + contractInfo?: ContractInfo + tokenMetadata?: { [key: string]: TokenMetadata } +} + +export interface TransactionHistoryFilter { + accountAddress?: string + contractAddress?: string + accountAddresses?: Array + contractAddresses?: Array + transactionHashes?: Array + metaTransactionIDs?: Array + fromBlock?: number + toBlock?: number + tokenID?: string +} + +export interface TransactionFilter { + txnHash?: string + from?: string + to?: string + contractAddress?: string + event?: string +} + +export interface TransactionReceipt { + txnHash: string + txnStatus: TransactionStatus + txnIndex: number + txnType: TransactionType + blockHash: string + blockNumber: number + gasUsed: number + effectiveGasPrice: string + from: string + to: string + logs: Array + final: boolean + reorged: boolean +} + +export interface TransactionLog { + contractAddress: string + topics: Array + data: string + index: number +} + +export interface TokenIDRange { + start: string + end: string +} + +export interface Page { + page?: number + column?: string + before?: any + after?: any + sort?: Array + pageSize?: number + more?: boolean +} + +export interface SortBy { + column: string + order: SortOrder +} + +export interface WebhookListener { + id: number + projectID: number + url: string + filters: EventFilter + name: string + updatedAt: string + active: boolean +} + +export interface EventFilter { + events?: Array + contractAddresses?: Array + accounts?: Array + tokenIDs?: Array +} + +export interface TokenBalanceFilter { + contractAddress: string + sinceBlockNumber: number +} + +export interface MetadataOptions { + verifiedOnly?: boolean + unverifiedOnly?: boolean + includeContracts?: Array +} + +export interface TokenBalancesFilter { + accountAddresses: Array + contractStatus?: ContractVerificationStatus + contractTypes?: Array + contractWhitelist?: Array + contractBlacklist?: Array + omitNativeBalances: boolean +} + +export interface TokenBalancesByContractFilter { + contractAddresses: Array + accountAddresses?: Array + contractStatus?: ContractVerificationStatus +} + +export interface GatewayEtherBalance { + chainId: number + error: string + result: EtherBalance +} + +export interface GatewayNativeTokenBalance { + chainId: number + error: string + result: NativeTokenBalance +} + +export interface GatewayNativeTokenBalances { + chainId: number + error: string + results: Array +} + +export interface GatewayTokenBalance { + chainId: number + error: string + results: Array +} + +export interface Indexer { + ping(headers?: object, signal?: AbortSignal): Promise + version(headers?: object, signal?: AbortSignal): Promise + runtimeStatus(headers?: object, signal?: AbortSignal): Promise + getChainID(headers?: object, signal?: AbortSignal): Promise + getEtherBalance(args: GetEtherBalanceArgs, headers?: object, signal?: AbortSignal): Promise + getNativeTokenBalance( + args: GetNativeTokenBalanceArgs, + headers?: object, + signal?: AbortSignal, + ): Promise + getTokenBalancesSummary( + args: GetTokenBalancesSummaryArgs, + headers?: object, + signal?: AbortSignal, + ): Promise + getTokenBalancesDetails( + args: GetTokenBalancesDetailsArgs, + headers?: object, + signal?: AbortSignal, + ): Promise + getTokenBalancesByContract( + args: GetTokenBalancesByContractArgs, + headers?: object, + signal?: AbortSignal, + ): Promise + getTokenBalances(args: GetTokenBalancesArgs, headers?: object, signal?: AbortSignal): Promise + getTokenSupplies(args: GetTokenSuppliesArgs, headers?: object, signal?: AbortSignal): Promise + getTokenSuppliesMap( + args: GetTokenSuppliesMapArgs, + headers?: object, + signal?: AbortSignal, + ): Promise + getTokenIDs(args: GetTokenIDsArgs, headers?: object, signal?: AbortSignal): Promise + getTokenIDRanges(args: GetTokenIDRangesArgs, headers?: object, signal?: AbortSignal): Promise + getBalanceUpdates( + args: GetBalanceUpdatesArgs, + headers?: object, + signal?: AbortSignal, + ): Promise + getTransactionHistory( + args: GetTransactionHistoryArgs, + headers?: object, + signal?: AbortSignal, + ): Promise + fetchTransactionReceipt( + args: FetchTransactionReceiptArgs, + headers?: object, + signal?: AbortSignal, + ): Promise + fetchTransactionReceiptWithFilter( + args: FetchTransactionReceiptWithFilterArgs, + headers?: object, + signal?: AbortSignal, + ): Promise + subscribeReceipts(args: SubscribeReceiptsArgs, options: WebrpcStreamOptions): Promise + subscribeEvents(args: SubscribeEventsArgs, options: WebrpcStreamOptions): Promise + subscribeBalanceUpdates( + args: SubscribeBalanceUpdatesArgs, + options: WebrpcStreamOptions, + ): Promise + syncBalance(args: SyncBalanceArgs, headers?: object, signal?: AbortSignal): Promise + getAllWebhookListeners( + args: GetAllWebhookListenersArgs, + headers?: object, + signal?: AbortSignal, + ): Promise + getWebhookListener( + args: GetWebhookListenerArgs, + headers?: object, + signal?: AbortSignal, + ): Promise + addWebhookListener( + args: AddWebhookListenerArgs, + headers?: object, + signal?: AbortSignal, + ): Promise + updateWebhookListener( + args: UpdateWebhookListenerArgs, + headers?: object, + signal?: AbortSignal, + ): Promise + removeWebhookListener( + args: RemoveWebhookListenerArgs, + headers?: object, + signal?: AbortSignal, + ): Promise + removeAllWebhookListeners( + args: RemoveAllWebhookListenersArgs, + headers?: object, + signal?: AbortSignal, + ): Promise + toggleWebhookListener( + args: ToggleWebhookListenerArgs, + headers?: object, + signal?: AbortSignal, + ): Promise + pauseAllWebhookListeners( + args: PauseAllWebhookListenersArgs, + headers?: object, + signal?: AbortSignal, + ): Promise + resumeAllWebhookListeners( + args: ResumeAllWebhookListenersArgs, + headers?: object, + signal?: AbortSignal, + ): Promise + getOrderbookOrders( + args: GetOrderbookOrdersArgs, + headers?: object, + signal?: AbortSignal, + ): Promise + getTopOrders(args: GetTopOrdersArgs, headers?: object, signal?: AbortSignal): Promise +} + +export interface PingArgs {} + +export interface PingReturn { + status: boolean +} +export interface VersionArgs {} + +export interface VersionReturn { + version: Version +} +export interface RuntimeStatusArgs {} + +export interface RuntimeStatusReturn { + status: RuntimeStatus +} +export interface GetChainIDArgs {} + +export interface GetChainIDReturn { + chainID: number +} +export interface GetEtherBalanceArgs { + accountAddress?: string +} + +export interface GetEtherBalanceReturn { + balance: EtherBalance +} +export interface GetNativeTokenBalanceArgs { + accountAddress?: string +} + +export interface GetNativeTokenBalanceReturn { + balance: NativeTokenBalance +} +export interface GetTokenBalancesSummaryArgs { + filter: TokenBalancesFilter + omitMetadata?: boolean + page?: Page +} + +export interface GetTokenBalancesSummaryReturn { + page: Page + nativeBalances: Array + balances: Array +} +export interface GetTokenBalancesDetailsArgs { + filter: TokenBalancesFilter + omitMetadata?: boolean + page?: Page +} + +export interface GetTokenBalancesDetailsReturn { + page: Page + nativeBalances: Array + balances: Array +} +export interface GetTokenBalancesByContractArgs { + filter: TokenBalancesByContractFilter + omitMetadata?: boolean + page?: Page +} + +export interface GetTokenBalancesByContractReturn { + page: Page + balances: Array +} +export interface GetTokenBalancesArgs { + accountAddress?: string + contractAddress?: string + tokenID?: string + includeMetadata?: boolean + metadataOptions?: MetadataOptions + includeCollectionTokens?: boolean + page?: Page +} + +export interface GetTokenBalancesReturn { + page: Page + balances: Array +} +export interface GetTokenSuppliesArgs { + contractAddress: string + includeMetadata?: boolean + metadataOptions?: MetadataOptions + page?: Page +} + +export interface GetTokenSuppliesReturn { + page: Page + contractType: ContractType + tokenIDs: Array +} +export interface GetTokenSuppliesMapArgs { + tokenMap: { [key: string]: Array } + includeMetadata?: boolean + metadataOptions?: MetadataOptions +} + +export interface GetTokenSuppliesMapReturn { + supplies: { [key: string]: Array } +} +export interface GetTokenIDsArgs { + contractAddress: string + page?: Page +} + +export interface GetTokenIDsReturn { + page: Page + contractType: ContractType + tokenIDs: Array +} +export interface GetTokenIDRangesArgs { + contractAddress: string +} + +export interface GetTokenIDRangesReturn { + contractType: ContractType + tokenIDRanges: Array + moreRanges: boolean +} +export interface GetBalanceUpdatesArgs { + contractAddress: string + lastBlockNumber: number + lastBlockHash?: string + page?: Page +} + +export interface GetBalanceUpdatesReturn { + page: Page + balances: Array +} +export interface GetTransactionHistoryArgs { + filter: TransactionHistoryFilter + page?: Page + includeMetadata?: boolean + metadataOptions?: MetadataOptions +} + +export interface GetTransactionHistoryReturn { + page: Page + transactions: Array +} +export interface FetchTransactionReceiptArgs { + txnHash: string + maxBlockWait?: number +} + +export interface FetchTransactionReceiptReturn { + receipt: TransactionReceipt +} +export interface FetchTransactionReceiptWithFilterArgs { + filter: TransactionFilter + maxBlockWait?: number +} + +export interface FetchTransactionReceiptWithFilterReturn { + receipt: TransactionReceipt +} +export interface SubscribeReceiptsArgs { + filter: TransactionFilter +} + +export interface SubscribeReceiptsReturn { + receipt: TransactionReceipt +} +export interface SubscribeEventsArgs { + filter: EventFilter +} + +export interface SubscribeEventsReturn { + log: EventLog +} +export interface SubscribeBalanceUpdatesArgs { + contractAddress: string +} + +export interface SubscribeBalanceUpdatesReturn { + balance: TokenBalance +} +export interface SyncBalanceArgs { + accountAddress: string + contractAddress: string + tokenID?: string +} + +export interface SyncBalanceReturn {} +export interface GetAllWebhookListenersArgs { + projectId?: number +} + +export interface GetAllWebhookListenersReturn { + listeners: Array +} +export interface GetWebhookListenerArgs { + id: number + projectId?: number +} + +export interface GetWebhookListenerReturn { + listener: WebhookListener +} +export interface AddWebhookListenerArgs { + url: string + filters: EventFilter + projectId?: number +} + +export interface AddWebhookListenerReturn { + status: boolean + listener: WebhookListener +} +export interface UpdateWebhookListenerArgs { + listener: WebhookListener + projectId?: number +} + +export interface UpdateWebhookListenerReturn { + status: boolean +} +export interface RemoveWebhookListenerArgs { + id: number + projectId?: number +} + +export interface RemoveWebhookListenerReturn { + status: boolean +} +export interface RemoveAllWebhookListenersArgs { + projectId?: number +} + +export interface RemoveAllWebhookListenersReturn { + status: boolean +} +export interface ToggleWebhookListenerArgs { + id: number + projectId?: number +} + +export interface ToggleWebhookListenerReturn { + webhookListener: WebhookListener +} +export interface PauseAllWebhookListenersArgs { + projectId?: number +} + +export interface PauseAllWebhookListenersReturn { + status: boolean +} +export interface ResumeAllWebhookListenersArgs { + projectId?: number +} + +export interface ResumeAllWebhookListenersReturn { + status: boolean +} +export interface GetOrderbookOrdersArgs { + page?: Page + orderbookContractAddress: string + collectionAddress: string + currencyAddresses: Array + filter: OrderbookOrderFilter + orderStatuses: Array + filters: Array + beforeExpiryTimestamp: number + blockNumberAfter: number + createdAtAfter: number +} + +export interface GetOrderbookOrdersReturn { + page?: Page + orders: Array +} +export interface GetTopOrdersArgs { + orderbookContractAddress: string + collectionAddress: string + currencyAddresses: Array + tokenIDs: Array + isListing: boolean + priceSort: SortOrder + excludeUser?: string +} + +export interface GetTopOrdersReturn { + orders: Array +} + +// +// Client +// +export class Indexer implements Indexer { + protected hostname: string + protected fetch: Fetch + protected path = '/rpc/Indexer/' + + constructor(hostname: string, fetch: Fetch) { + this.hostname = hostname.replace(/\/*$/, '') + this.fetch = (input: RequestInfo, init?: RequestInit) => fetch(input, init) + } + + private url(name: string): string { + return this.hostname + this.path + name + } + + ping = (headers?: object, signal?: AbortSignal): Promise => { + return this.fetch(this.url('Ping'), createHTTPRequest({}, headers, signal)).then( + (res) => { + return buildResponse(res).then((_data) => { + return { + status: _data.status, + } + }) + }, + (error) => { + throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) + }, + ) + } + + version = (headers?: object, signal?: AbortSignal): Promise => { + return this.fetch(this.url('Version'), createHTTPRequest({}, headers, signal)).then( + (res) => { + return buildResponse(res).then((_data) => { + return { + version: _data.version, + } + }) + }, + (error) => { + throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) + }, + ) + } + + runtimeStatus = (headers?: object, signal?: AbortSignal): Promise => { + return this.fetch(this.url('RuntimeStatus'), createHTTPRequest({}, headers, signal)).then( + (res) => { + return buildResponse(res).then((_data) => { + return { + status: _data.status, + } + }) + }, + (error) => { + throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) + }, + ) + } + + getChainID = (headers?: object, signal?: AbortSignal): Promise => { + return this.fetch(this.url('GetChainID'), createHTTPRequest({}, headers, signal)).then( + (res) => { + return buildResponse(res).then((_data) => { + return { + chainID: _data.chainID, + } + }) + }, + (error) => { + throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) + }, + ) + } + + getEtherBalance = ( + args: GetEtherBalanceArgs, + headers?: object, + signal?: AbortSignal, + ): Promise => { + return this.fetch(this.url('GetEtherBalance'), createHTTPRequest(args, headers, signal)).then( + (res) => { + return buildResponse(res).then((_data) => { + return { + balance: _data.balance, + } + }) + }, + (error) => { + throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) + }, + ) + } + + getNativeTokenBalance = ( + args: GetNativeTokenBalanceArgs, + headers?: object, + signal?: AbortSignal, + ): Promise => { + return this.fetch(this.url('GetNativeTokenBalance'), createHTTPRequest(args, headers, signal)).then( + (res) => { + return buildResponse(res).then((_data) => { + return { + balance: _data.balance, + } + }) + }, + (error) => { + throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) + }, + ) + } + + getTokenBalancesSummary = ( + args: GetTokenBalancesSummaryArgs, + headers?: object, + signal?: AbortSignal, + ): Promise => { + return this.fetch(this.url('GetTokenBalancesSummary'), createHTTPRequest(args, headers, signal)).then( + (res) => { + return buildResponse(res).then((_data) => { + return { + page: _data.page, + nativeBalances: >_data.nativeBalances, + balances: >_data.balances, + } + }) + }, + (error) => { + throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) + }, + ) + } + + getTokenBalancesDetails = ( + args: GetTokenBalancesDetailsArgs, + headers?: object, + signal?: AbortSignal, + ): Promise => { + return this.fetch(this.url('GetTokenBalancesDetails'), createHTTPRequest(args, headers, signal)).then( + (res) => { + return buildResponse(res).then((_data) => { + return { + page: _data.page, + nativeBalances: >_data.nativeBalances, + balances: >_data.balances, + } + }) + }, + (error) => { + throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) + }, + ) + } + + getTokenBalancesByContract = ( + args: GetTokenBalancesByContractArgs, + headers?: object, + signal?: AbortSignal, + ): Promise => { + return this.fetch(this.url('GetTokenBalancesByContract'), createHTTPRequest(args, headers, signal)).then( + (res) => { + return buildResponse(res).then((_data) => { + return { + page: _data.page, + balances: >_data.balances, + } + }) + }, + (error) => { + throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) + }, + ) + } + + getTokenBalances = ( + args: GetTokenBalancesArgs, + headers?: object, + signal?: AbortSignal, + ): Promise => { + return this.fetch(this.url('GetTokenBalances'), createHTTPRequest(args, headers, signal)).then( + (res) => { + return buildResponse(res).then((_data) => { + return { + page: _data.page, + balances: >_data.balances, + } + }) + }, + (error) => { + throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) + }, + ) + } + + getTokenSupplies = ( + args: GetTokenSuppliesArgs, + headers?: object, + signal?: AbortSignal, + ): Promise => { + return this.fetch(this.url('GetTokenSupplies'), createHTTPRequest(args, headers, signal)).then( + (res) => { + return buildResponse(res).then((_data) => { + return { + page: _data.page, + contractType: _data.contractType, + tokenIDs: >_data.tokenIDs, + } + }) + }, + (error) => { + throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) + }, + ) + } + + getTokenSuppliesMap = ( + args: GetTokenSuppliesMapArgs, + headers?: object, + signal?: AbortSignal, + ): Promise => { + return this.fetch(this.url('GetTokenSuppliesMap'), createHTTPRequest(args, headers, signal)).then( + (res) => { + return buildResponse(res).then((_data) => { + return { + supplies: <{ [key: string]: Array }>_data.supplies, + } + }) + }, + (error) => { + throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) + }, + ) + } + + getTokenIDs = (args: GetTokenIDsArgs, headers?: object, signal?: AbortSignal): Promise => { + return this.fetch(this.url('GetTokenIDs'), createHTTPRequest(args, headers, signal)).then( + (res) => { + return buildResponse(res).then((_data) => { + return { + page: _data.page, + contractType: _data.contractType, + tokenIDs: >_data.tokenIDs, + } + }) + }, + (error) => { + throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) + }, + ) + } + + getTokenIDRanges = ( + args: GetTokenIDRangesArgs, + headers?: object, + signal?: AbortSignal, + ): Promise => { + return this.fetch(this.url('GetTokenIDRanges'), createHTTPRequest(args, headers, signal)).then( + (res) => { + return buildResponse(res).then((_data) => { + return { + contractType: _data.contractType, + tokenIDRanges: >_data.tokenIDRanges, + moreRanges: _data.moreRanges, + } + }) + }, + (error) => { + throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) + }, + ) + } + + getBalanceUpdates = ( + args: GetBalanceUpdatesArgs, + headers?: object, + signal?: AbortSignal, + ): Promise => { + return this.fetch(this.url('GetBalanceUpdates'), createHTTPRequest(args, headers, signal)).then( + (res) => { + return buildResponse(res).then((_data) => { + return { + page: _data.page, + balances: >_data.balances, + } + }) + }, + (error) => { + throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) + }, + ) + } + + getTransactionHistory = ( + args: GetTransactionHistoryArgs, + headers?: object, + signal?: AbortSignal, + ): Promise => { + return this.fetch(this.url('GetTransactionHistory'), createHTTPRequest(args, headers, signal)).then( + (res) => { + return buildResponse(res).then((_data) => { + return { + page: _data.page, + transactions: >_data.transactions, + } + }) + }, + (error) => { + throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) + }, + ) + } + + fetchTransactionReceipt = ( + args: FetchTransactionReceiptArgs, + headers?: object, + signal?: AbortSignal, + ): Promise => { + return this.fetch(this.url('FetchTransactionReceipt'), createHTTPRequest(args, headers, signal)).then( + (res) => { + return buildResponse(res).then((_data) => { + return { + receipt: _data.receipt, + } + }) + }, + (error) => { + throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) + }, + ) + } + + fetchTransactionReceiptWithFilter = ( + args: FetchTransactionReceiptWithFilterArgs, + headers?: object, + signal?: AbortSignal, + ): Promise => { + return this.fetch(this.url('FetchTransactionReceiptWithFilter'), createHTTPRequest(args, headers, signal)).then( + (res) => { + return buildResponse(res).then((_data) => { + return { + receipt: _data.receipt, + } + }) + }, + (error) => { + throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) + }, + ) + } + + subscribeReceipts = ( + args: SubscribeReceiptsArgs, + options: WebrpcStreamOptions, + ): Promise => { + const _fetch = () => + this.fetch(this.url('SubscribeReceipts'), createHTTPRequest(args, options.headers, options.signal)).then( + async (res) => { + await sseResponse(res, options, _fetch) + }, + (error) => { + options.onError(error, _fetch) + }, + ) + return _fetch() + } + subscribeEvents = (args: SubscribeEventsArgs, options: WebrpcStreamOptions): Promise => { + const _fetch = () => + this.fetch(this.url('SubscribeEvents'), createHTTPRequest(args, options.headers, options.signal)).then( + async (res) => { + await sseResponse(res, options, _fetch) + }, + (error) => { + options.onError(error, _fetch) + }, + ) + return _fetch() + } + subscribeBalanceUpdates = ( + args: SubscribeBalanceUpdatesArgs, + options: WebrpcStreamOptions, + ): Promise => { + const _fetch = () => + this.fetch(this.url('SubscribeBalanceUpdates'), createHTTPRequest(args, options.headers, options.signal)).then( + async (res) => { + await sseResponse(res, options, _fetch) + }, + (error) => { + options.onError(error, _fetch) + }, + ) + return _fetch() + } + syncBalance = (args: SyncBalanceArgs, headers?: object, signal?: AbortSignal): Promise => { + return this.fetch(this.url('SyncBalance'), createHTTPRequest(args, headers, signal)).then( + (res) => { + return buildResponse(res).then((_data) => { + return {} + }) + }, + (error) => { + throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) + }, + ) + } + + getAllWebhookListeners = ( + args: GetAllWebhookListenersArgs, + headers?: object, + signal?: AbortSignal, + ): Promise => { + return this.fetch(this.url('GetAllWebhookListeners'), createHTTPRequest(args, headers, signal)).then( + (res) => { + return buildResponse(res).then((_data) => { + return { + listeners: >_data.listeners, + } + }) + }, + (error) => { + throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) + }, + ) + } + + getWebhookListener = ( + args: GetWebhookListenerArgs, + headers?: object, + signal?: AbortSignal, + ): Promise => { + return this.fetch(this.url('GetWebhookListener'), createHTTPRequest(args, headers, signal)).then( + (res) => { + return buildResponse(res).then((_data) => { + return { + listener: _data.listener, + } + }) + }, + (error) => { + throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) + }, + ) + } + + addWebhookListener = ( + args: AddWebhookListenerArgs, + headers?: object, + signal?: AbortSignal, + ): Promise => { + return this.fetch(this.url('AddWebhookListener'), createHTTPRequest(args, headers, signal)).then( + (res) => { + return buildResponse(res).then((_data) => { + return { + status: _data.status, + listener: _data.listener, + } + }) + }, + (error) => { + throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) + }, + ) + } + + updateWebhookListener = ( + args: UpdateWebhookListenerArgs, + headers?: object, + signal?: AbortSignal, + ): Promise => { + return this.fetch(this.url('UpdateWebhookListener'), createHTTPRequest(args, headers, signal)).then( + (res) => { + return buildResponse(res).then((_data) => { + return { + status: _data.status, + } + }) + }, + (error) => { + throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) + }, + ) + } + + removeWebhookListener = ( + args: RemoveWebhookListenerArgs, + headers?: object, + signal?: AbortSignal, + ): Promise => { + return this.fetch(this.url('RemoveWebhookListener'), createHTTPRequest(args, headers, signal)).then( + (res) => { + return buildResponse(res).then((_data) => { + return { + status: _data.status, + } + }) + }, + (error) => { + throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) + }, + ) + } + + removeAllWebhookListeners = ( + args: RemoveAllWebhookListenersArgs, + headers?: object, + signal?: AbortSignal, + ): Promise => { + return this.fetch(this.url('RemoveAllWebhookListeners'), createHTTPRequest(args, headers, signal)).then( + (res) => { + return buildResponse(res).then((_data) => { + return { + status: _data.status, + } + }) + }, + (error) => { + throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) + }, + ) + } + + toggleWebhookListener = ( + args: ToggleWebhookListenerArgs, + headers?: object, + signal?: AbortSignal, + ): Promise => { + return this.fetch(this.url('ToggleWebhookListener'), createHTTPRequest(args, headers, signal)).then( + (res) => { + return buildResponse(res).then((_data) => { + return { + webhookListener: _data.webhookListener, + } + }) + }, + (error) => { + throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) + }, + ) + } + + pauseAllWebhookListeners = ( + args: PauseAllWebhookListenersArgs, + headers?: object, + signal?: AbortSignal, + ): Promise => { + return this.fetch(this.url('PauseAllWebhookListeners'), createHTTPRequest(args, headers, signal)).then( + (res) => { + return buildResponse(res).then((_data) => { + return { + status: _data.status, + } + }) + }, + (error) => { + throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) + }, + ) + } + + resumeAllWebhookListeners = ( + args: ResumeAllWebhookListenersArgs, + headers?: object, + signal?: AbortSignal, + ): Promise => { + return this.fetch(this.url('ResumeAllWebhookListeners'), createHTTPRequest(args, headers, signal)).then( + (res) => { + return buildResponse(res).then((_data) => { + return { + status: _data.status, + } + }) + }, + (error) => { + throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) + }, + ) + } + + getOrderbookOrders = ( + args: GetOrderbookOrdersArgs, + headers?: object, + signal?: AbortSignal, + ): Promise => { + return this.fetch(this.url('GetOrderbookOrders'), createHTTPRequest(args, headers, signal)).then( + (res) => { + return buildResponse(res).then((_data) => { + return { + page: _data.page, + orders: >_data.orders, + } + }) + }, + (error) => { + throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) + }, + ) + } + + getTopOrders = (args: GetTopOrdersArgs, headers?: object, signal?: AbortSignal): Promise => { + return this.fetch(this.url('GetTopOrders'), createHTTPRequest(args, headers, signal)).then( + (res) => { + return buildResponse(res).then((_data) => { + return { + orders: >_data.orders, + } + }) + }, + (error) => { + throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) + }, + ) + } +} + +const sseResponse = async (res: Response, options: WebrpcStreamOptions, retryFetch: () => Promise) => { + const { onMessage, onOpen, onClose, onError } = options + + if (!res.ok) { + try { + await buildResponse(res) + } catch (error) { + // @ts-ignore + onError(error, retryFetch) + } + return + } + + if (!res.body) { + onError( + WebrpcBadResponseError.new({ + status: res.status, + cause: 'Invalid response, missing body', + }), + retryFetch, + ) + return + } + + onOpen && onOpen() + + const reader = res.body.getReader() + const decoder = new TextDecoder() + let buffer = '' + let lastReadTime = Date.now() + const timeout = (10 + 1) * 1000 + let timeoutError = false + const intervalId = setInterval(() => { + if (Date.now() - lastReadTime > timeout) { + timeoutError = true + clearInterval(intervalId) + reader.releaseLock() + } + }, timeout) + + while (true) { + let value + let done + try { + ;({ value, done } = await reader.read()) + if (timeoutError) throw new Error('Timeout, no data or heartbeat received') + lastReadTime = Date.now() + buffer += decoder.decode(value, { stream: true }) + } catch (error) { + let message = '' + if (error instanceof Error) { + message = error.message + } + + if (error instanceof DOMException && error.name === 'AbortError') { + onError( + WebrpcRequestFailedError.new({ + message: 'AbortError', + cause: `AbortError: ${message}`, + }), + () => { + throw new Error('Abort signal cannot be used to reconnect') + }, + ) + } else { + onError( + WebrpcStreamLostError.new({ + cause: `reader.read(): ${message}`, + }), + retryFetch, + ) + } + return + } + + let lines = buffer.split('\n') + for (let i = 0; i < lines.length - 1; i++) { + if (lines[i]!.length == 0) { + continue + } + let data: any + try { + data = JSON.parse(lines[i]!) + if (data.hasOwnProperty('webrpcError')) { + const error = data.webrpcError + const code: number = typeof error.code === 'number' ? error.code : 0 + onError((webrpcErrorByCode[code] || WebrpcError).new(error), retryFetch) + return + } + } catch (error) { + if (error instanceof Error && error.message === 'Abort signal cannot be used to reconnect') { + throw error + } + onError( + WebrpcBadResponseError.new({ + status: res.status, + // @ts-ignore + cause: `JSON.parse(): ${error.message}`, + }), + retryFetch, + ) + } + onMessage(data) + } + + if (!done) { + buffer = lines[lines.length - 1]! + continue + } + + onClose && onClose() + return + } +} + +const createHTTPRequest = (body: object = {}, headers: object = {}, signal: AbortSignal | null = null): object => { + const reqHeaders: { [key: string]: string } = { ...headers, 'Content-Type': 'application/json' } + reqHeaders[WebrpcHeader] = WebrpcHeaderValue + + return { + method: 'POST', + headers: reqHeaders, + body: JSON.stringify(body || {}), + signal, + } +} + +const buildResponse = (res: Response): Promise => { + return res.text().then((text) => { + let data + try { + data = JSON.parse(text) + } catch (error) { + let message = '' + if (error instanceof Error) { + message = error.message + } + throw WebrpcBadResponseError.new({ + status: res.status, + cause: `JSON.parse(): ${message}: response text: ${text}`, + }) + } + if (!res.ok) { + const code: number = typeof data.code === 'number' ? data.code : 0 + throw (webrpcErrorByCode[code] || WebrpcError).new(data) + } + return data + }) +} + +// +// Errors +// + +export class WebrpcError extends Error { + name: string + code: number + message: string + status: number + cause?: string + + /** @deprecated Use message instead of msg. Deprecated in webrpc v0.11.0. */ + msg: string + + constructor(name: string, code: number, message: string, status: number, cause?: string) { + super(message) + this.name = name || 'WebrpcError' + this.code = typeof code === 'number' ? code : 0 + this.message = message || `endpoint error ${this.code}` + this.msg = this.message + this.status = typeof status === 'number' ? status : 0 + this.cause = cause + Object.setPrototypeOf(this, WebrpcError.prototype) + } + + static new(payload: any): WebrpcError { + return new this(payload.error, payload.code, payload.message || payload.msg, payload.status, payload.cause) + } +} + +// Webrpc errors + +export class WebrpcEndpointError extends WebrpcError { + constructor( + name: string = 'WebrpcEndpoint', + code: number = 0, + message: string = 'endpoint error', + status: number = 0, + cause?: string, + ) { + super(name, code, message, status, cause) + Object.setPrototypeOf(this, WebrpcEndpointError.prototype) + } +} + +export class WebrpcRequestFailedError extends WebrpcError { + constructor( + name: string = 'WebrpcRequestFailed', + code: number = -1, + message: string = 'request failed', + status: number = 0, + cause?: string, + ) { + super(name, code, message, status, cause) + Object.setPrototypeOf(this, WebrpcRequestFailedError.prototype) + } +} + +export class WebrpcBadRouteError extends WebrpcError { + constructor( + name: string = 'WebrpcBadRoute', + code: number = -2, + message: string = 'bad route', + status: number = 0, + cause?: string, + ) { + super(name, code, message, status, cause) + Object.setPrototypeOf(this, WebrpcBadRouteError.prototype) + } +} + +export class WebrpcBadMethodError extends WebrpcError { + constructor( + name: string = 'WebrpcBadMethod', + code: number = -3, + message: string = 'bad method', + status: number = 0, + cause?: string, + ) { + super(name, code, message, status, cause) + Object.setPrototypeOf(this, WebrpcBadMethodError.prototype) + } +} + +export class WebrpcBadRequestError extends WebrpcError { + constructor( + name: string = 'WebrpcBadRequest', + code: number = -4, + message: string = 'bad request', + status: number = 0, + cause?: string, + ) { + super(name, code, message, status, cause) + Object.setPrototypeOf(this, WebrpcBadRequestError.prototype) + } +} + +export class WebrpcBadResponseError extends WebrpcError { + constructor( + name: string = 'WebrpcBadResponse', + code: number = -5, + message: string = 'bad response', + status: number = 0, + cause?: string, + ) { + super(name, code, message, status, cause) + Object.setPrototypeOf(this, WebrpcBadResponseError.prototype) + } +} + +export class WebrpcServerPanicError extends WebrpcError { + constructor( + name: string = 'WebrpcServerPanic', + code: number = -6, + message: string = 'server panic', + status: number = 0, + cause?: string, + ) { + super(name, code, message, status, cause) + Object.setPrototypeOf(this, WebrpcServerPanicError.prototype) + } +} + +export class WebrpcInternalErrorError extends WebrpcError { + constructor( + name: string = 'WebrpcInternalError', + code: number = -7, + message: string = 'internal error', + status: number = 0, + cause?: string, + ) { + super(name, code, message, status, cause) + Object.setPrototypeOf(this, WebrpcInternalErrorError.prototype) + } +} + +export class WebrpcClientDisconnectedError extends WebrpcError { + constructor( + name: string = 'WebrpcClientDisconnected', + code: number = -8, + message: string = 'client disconnected', + status: number = 0, + cause?: string, + ) { + super(name, code, message, status, cause) + Object.setPrototypeOf(this, WebrpcClientDisconnectedError.prototype) + } +} + +export class WebrpcStreamLostError extends WebrpcError { + constructor( + name: string = 'WebrpcStreamLost', + code: number = -9, + message: string = 'stream lost', + status: number = 0, + cause?: string, + ) { + super(name, code, message, status, cause) + Object.setPrototypeOf(this, WebrpcStreamLostError.prototype) + } +} + +export class WebrpcStreamFinishedError extends WebrpcError { + constructor( + name: string = 'WebrpcStreamFinished', + code: number = -10, + message: string = 'stream finished', + status: number = 0, + cause?: string, + ) { + super(name, code, message, status, cause) + Object.setPrototypeOf(this, WebrpcStreamFinishedError.prototype) + } +} + +// Schema errors + +export class UnauthorizedError extends WebrpcError { + constructor( + name: string = 'Unauthorized', + code: number = 1000, + message: string = 'Unauthorized access', + status: number = 0, + cause?: string, + ) { + super(name, code, message, status, cause) + Object.setPrototypeOf(this, UnauthorizedError.prototype) + } +} + +export class PermissionDeniedError extends WebrpcError { + constructor( + name: string = 'PermissionDenied', + code: number = 1001, + message: string = 'Permission denied', + status: number = 0, + cause?: string, + ) { + super(name, code, message, status, cause) + Object.setPrototypeOf(this, PermissionDeniedError.prototype) + } +} + +export class SessionExpiredError extends WebrpcError { + constructor( + name: string = 'SessionExpired', + code: number = 1002, + message: string = 'Session expired', + status: number = 0, + cause?: string, + ) { + super(name, code, message, status, cause) + Object.setPrototypeOf(this, SessionExpiredError.prototype) + } +} + +export class MethodNotFoundError extends WebrpcError { + constructor( + name: string = 'MethodNotFound', + code: number = 1003, + message: string = 'Method not found', + status: number = 0, + cause?: string, + ) { + super(name, code, message, status, cause) + Object.setPrototypeOf(this, MethodNotFoundError.prototype) + } +} + +export class RequestConflictError extends WebrpcError { + constructor( + name: string = 'RequestConflict', + code: number = 1004, + message: string = 'Conflict with target resource', + status: number = 0, + cause?: string, + ) { + super(name, code, message, status, cause) + Object.setPrototypeOf(this, RequestConflictError.prototype) + } +} + +export class AbortedError extends WebrpcError { + constructor( + name: string = 'Aborted', + code: number = 1005, + message: string = 'Request aborted', + status: number = 0, + cause?: string, + ) { + super(name, code, message, status, cause) + Object.setPrototypeOf(this, AbortedError.prototype) + } +} + +export class GeoblockedError extends WebrpcError { + constructor( + name: string = 'Geoblocked', + code: number = 1006, + message: string = 'Geoblocked region', + status: number = 0, + cause?: string, + ) { + super(name, code, message, status, cause) + Object.setPrototypeOf(this, GeoblockedError.prototype) + } +} + +export class RateLimitedError extends WebrpcError { + constructor( + name: string = 'RateLimited', + code: number = 1007, + message: string = 'Rate-limited. Please slow down.', + status: number = 0, + cause?: string, + ) { + super(name, code, message, status, cause) + Object.setPrototypeOf(this, RateLimitedError.prototype) + } +} + +export class ProjectNotFoundError extends WebrpcError { + constructor( + name: string = 'ProjectNotFound', + code: number = 1100, + message: string = 'Project not found', + status: number = 0, + cause?: string, + ) { + super(name, code, message, status, cause) + Object.setPrototypeOf(this, ProjectNotFoundError.prototype) + } +} + +export class AccessKeyNotFoundError extends WebrpcError { + constructor( + name: string = 'AccessKeyNotFound', + code: number = 1101, + message: string = 'Access key not found', + status: number = 0, + cause?: string, + ) { + super(name, code, message, status, cause) + Object.setPrototypeOf(this, AccessKeyNotFoundError.prototype) + } +} + +export class AccessKeyMismatchError extends WebrpcError { + constructor( + name: string = 'AccessKeyMismatch', + code: number = 1102, + message: string = 'Access key mismatch', + status: number = 0, + cause?: string, + ) { + super(name, code, message, status, cause) + Object.setPrototypeOf(this, AccessKeyMismatchError.prototype) + } +} + +export class InvalidOriginError extends WebrpcError { + constructor( + name: string = 'InvalidOrigin', + code: number = 1103, + message: string = 'Invalid origin for Access Key', + status: number = 0, + cause?: string, + ) { + super(name, code, message, status, cause) + Object.setPrototypeOf(this, InvalidOriginError.prototype) + } +} + +export class InvalidServiceError extends WebrpcError { + constructor( + name: string = 'InvalidService', + code: number = 1104, + message: string = 'Service not enabled for Access key', + status: number = 0, + cause?: string, + ) { + super(name, code, message, status, cause) + Object.setPrototypeOf(this, InvalidServiceError.prototype) + } +} + +export class UnauthorizedUserError extends WebrpcError { + constructor( + name: string = 'UnauthorizedUser', + code: number = 1105, + message: string = 'Unauthorized user', + status: number = 0, + cause?: string, + ) { + super(name, code, message, status, cause) + Object.setPrototypeOf(this, UnauthorizedUserError.prototype) + } +} + +export class QuotaExceededError extends WebrpcError { + constructor( + name: string = 'QuotaExceeded', + code: number = 1200, + message: string = 'Quota exceeded', + status: number = 0, + cause?: string, + ) { + super(name, code, message, status, cause) + Object.setPrototypeOf(this, QuotaExceededError.prototype) + } +} + +export class RateLimitError extends WebrpcError { + constructor( + name: string = 'RateLimit', + code: number = 1201, + message: string = 'Rate limit exceeded', + status: number = 0, + cause?: string, + ) { + super(name, code, message, status, cause) + Object.setPrototypeOf(this, RateLimitError.prototype) + } +} + +export class NoDefaultKeyError extends WebrpcError { + constructor( + name: string = 'NoDefaultKey', + code: number = 1300, + message: string = 'No default access key found', + status: number = 0, + cause?: string, + ) { + super(name, code, message, status, cause) + Object.setPrototypeOf(this, NoDefaultKeyError.prototype) + } +} + +export class MaxAccessKeysError extends WebrpcError { + constructor( + name: string = 'MaxAccessKeys', + code: number = 1301, + message: string = 'Access keys limit reached', + status: number = 0, + cause?: string, + ) { + super(name, code, message, status, cause) + Object.setPrototypeOf(this, MaxAccessKeysError.prototype) + } +} + +export class AtLeastOneKeyError extends WebrpcError { + constructor( + name: string = 'AtLeastOneKey', + code: number = 1302, + message: string = 'You need at least one Access Key', + status: number = 0, + cause?: string, + ) { + super(name, code, message, status, cause) + Object.setPrototypeOf(this, AtLeastOneKeyError.prototype) + } +} + +export class TimeoutError extends WebrpcError { + constructor( + name: string = 'Timeout', + code: number = 1900, + message: string = 'Request timed out', + status: number = 0, + cause?: string, + ) { + super(name, code, message, status, cause) + Object.setPrototypeOf(this, TimeoutError.prototype) + } +} + +export class InvalidArgumentError extends WebrpcError { + constructor( + name: string = 'InvalidArgument', + code: number = 2001, + message: string = 'Invalid argument', + status: number = 0, + cause?: string, + ) { + super(name, code, message, status, cause) + Object.setPrototypeOf(this, InvalidArgumentError.prototype) + } +} + +export class UnavailableError extends WebrpcError { + constructor( + name: string = 'Unavailable', + code: number = 2002, + message: string = 'Unavailable resource', + status: number = 0, + cause?: string, + ) { + super(name, code, message, status, cause) + Object.setPrototypeOf(this, UnavailableError.prototype) + } +} + +export class QueryFailedError extends WebrpcError { + constructor( + name: string = 'QueryFailed', + code: number = 2003, + message: string = 'Query failed', + status: number = 0, + cause?: string, + ) { + super(name, code, message, status, cause) + Object.setPrototypeOf(this, QueryFailedError.prototype) + } +} + +export class ResourceExhaustedError extends WebrpcError { + constructor( + name: string = 'ResourceExhausted', + code: number = 2004, + message: string = 'Resource exhausted', + status: number = 0, + cause?: string, + ) { + super(name, code, message, status, cause) + Object.setPrototypeOf(this, ResourceExhaustedError.prototype) + } +} + +export class NotFoundError extends WebrpcError { + constructor( + name: string = 'NotFound', + code: number = 3000, + message: string = 'Resource not found', + status: number = 0, + cause?: string, + ) { + super(name, code, message, status, cause) + Object.setPrototypeOf(this, NotFoundError.prototype) + } +} + +export class MetadataCallFailedError extends WebrpcError { + constructor( + name: string = 'MetadataCallFailed', + code: number = 3003, + message: string = 'Metadata service call failed', + status: number = 0, + cause?: string, + ) { + super(name, code, message, status, cause) + Object.setPrototypeOf(this, MetadataCallFailedError.prototype) + } +} + +export enum errors { + WebrpcEndpoint = 'WebrpcEndpoint', + WebrpcRequestFailed = 'WebrpcRequestFailed', + WebrpcBadRoute = 'WebrpcBadRoute', + WebrpcBadMethod = 'WebrpcBadMethod', + WebrpcBadRequest = 'WebrpcBadRequest', + WebrpcBadResponse = 'WebrpcBadResponse', + WebrpcServerPanic = 'WebrpcServerPanic', + WebrpcInternalError = 'WebrpcInternalError', + WebrpcClientDisconnected = 'WebrpcClientDisconnected', + WebrpcStreamLost = 'WebrpcStreamLost', + WebrpcStreamFinished = 'WebrpcStreamFinished', + Unauthorized = 'Unauthorized', + PermissionDenied = 'PermissionDenied', + SessionExpired = 'SessionExpired', + MethodNotFound = 'MethodNotFound', + RequestConflict = 'RequestConflict', + Aborted = 'Aborted', + Geoblocked = 'Geoblocked', + RateLimited = 'RateLimited', + ProjectNotFound = 'ProjectNotFound', + AccessKeyNotFound = 'AccessKeyNotFound', + AccessKeyMismatch = 'AccessKeyMismatch', + InvalidOrigin = 'InvalidOrigin', + InvalidService = 'InvalidService', + UnauthorizedUser = 'UnauthorizedUser', + QuotaExceeded = 'QuotaExceeded', + RateLimit = 'RateLimit', + NoDefaultKey = 'NoDefaultKey', + MaxAccessKeys = 'MaxAccessKeys', + AtLeastOneKey = 'AtLeastOneKey', + Timeout = 'Timeout', + InvalidArgument = 'InvalidArgument', + Unavailable = 'Unavailable', + QueryFailed = 'QueryFailed', + ResourceExhausted = 'ResourceExhausted', + NotFound = 'NotFound', + MetadataCallFailed = 'MetadataCallFailed', +} + +const webrpcErrorByCode: { [code: number]: any } = { + [0]: WebrpcEndpointError, + [-1]: WebrpcRequestFailedError, + [-2]: WebrpcBadRouteError, + [-3]: WebrpcBadMethodError, + [-4]: WebrpcBadRequestError, + [-5]: WebrpcBadResponseError, + [-6]: WebrpcServerPanicError, + [-7]: WebrpcInternalErrorError, + [-8]: WebrpcClientDisconnectedError, + [-9]: WebrpcStreamLostError, + [-10]: WebrpcStreamFinishedError, + [1000]: UnauthorizedError, + [1001]: PermissionDeniedError, + [1002]: SessionExpiredError, + [1003]: MethodNotFoundError, + [1004]: RequestConflictError, + [1005]: AbortedError, + [1006]: GeoblockedError, + [1007]: RateLimitedError, + [1100]: ProjectNotFoundError, + [1101]: AccessKeyNotFoundError, + [1102]: AccessKeyMismatchError, + [1103]: InvalidOriginError, + [1104]: InvalidServiceError, + [1105]: UnauthorizedUserError, + [1200]: QuotaExceededError, + [1201]: RateLimitError, + [1300]: NoDefaultKeyError, + [1301]: MaxAccessKeysError, + [1302]: AtLeastOneKeyError, + [1900]: TimeoutError, + [2001]: InvalidArgumentError, + [2002]: UnavailableError, + [2003]: QueryFailedError, + [2004]: ResourceExhaustedError, + [3000]: NotFoundError, + [3003]: MetadataCallFailedError, +} + +export type Fetch = (input: RequestInfo, init?: RequestInit) => Promise + +export interface WebrpcStreamOptions extends WebrpcOptions { + onMessage: (message: T) => void + onError: (error: WebrpcError, reconnect: () => void) => void + onOpen?: () => void + onClose?: () => void +} +export interface WebrpcOptions { + headers?: HeadersInit + signal?: AbortSignal +} diff --git a/packages/services/indexer/src/indexergw.gen.ts b/packages/services/indexer/src/indexergw.gen.ts new file mode 100644 index 000000000..92f85b2c8 --- /dev/null +++ b/packages/services/indexer/src/indexergw.gen.ts @@ -0,0 +1,1523 @@ +/* eslint-disable */ +// sequence-indexer v0.4.0 5be4a3e78d9c7e0cc378c675ec01c518e83772e3 +// -- +// Code generated by webrpc-gen@v0.21.1 with typescript generator. DO NOT EDIT. +// +// webrpc-gen -schema=indexer.ridl -service=IndexerGateway -target=typescript -client -out=./clients/indexergw.gen.ts + +export const WebrpcHeader = 'Webrpc' + +export const WebrpcHeaderValue = 'webrpc@v0.21.1;gen-typescript@v0.15.1;sequence-indexer@v0.4.0' + +// WebRPC description and code-gen version +export const WebRPCVersion = 'v1' + +// Schema version of your RIDL schema +export const WebRPCSchemaVersion = 'v0.4.0' + +// Schema hash generated from your RIDL schema +export const WebRPCSchemaHash = '5be4a3e78d9c7e0cc378c675ec01c518e83772e3' + +type WebrpcGenVersions = { + webrpcGenVersion: string + codeGenName: string + codeGenVersion: string + schemaName: string + schemaVersion: string +} + +export function VersionFromHeader(headers: Headers): WebrpcGenVersions { + const headerValue = headers.get(WebrpcHeader) + if (!headerValue) { + return { + webrpcGenVersion: '', + codeGenName: '', + codeGenVersion: '', + schemaName: '', + schemaVersion: '', + } + } + + return parseWebrpcGenVersions(headerValue) +} + +function parseWebrpcGenVersions(header: string): WebrpcGenVersions { + const versions = header.split(';') + if (versions.length < 3) { + return { + webrpcGenVersion: '', + codeGenName: '', + codeGenVersion: '', + schemaName: '', + schemaVersion: '', + } + } + + const [_, webrpcGenVersion] = versions[0]!.split('@') + const [codeGenName, codeGenVersion] = versions[1]!.split('@') + const [schemaName, schemaVersion] = versions[2]!.split('@') + + return { + webrpcGenVersion: webrpcGenVersion!, + codeGenName: codeGenName!, + codeGenVersion: codeGenVersion!, + schemaName: schemaName!, + schemaVersion: schemaVersion!, + } +} + +// +// Types +// + +export enum ResourceStatus { + NOT_AVAILABLE = 'NOT_AVAILABLE', + REFRESHING = 'REFRESHING', + AVAILABLE = 'AVAILABLE', +} + +export interface ContractInfo { + chainId: number + address: string + source: string + name: string + type: string + symbol: string + decimals?: number + logoURI: string + deployed: boolean + bytecodeHash: string + extensions: ContractInfoExtensions + updatedAt: string + queuedAt?: string + status: ResourceStatus +} + +export interface ContractInfoExtensions { + link: string + description: string + categories: Array + ogImage: string + ogName: string + originChainId: number + originAddress: string + blacklist: boolean + verified: boolean + verifiedBy: string + featured: boolean + featureIndex: number +} + +export interface TokenMetadata { + contractAddress?: string + tokenId: string + source: string + name: string + description?: string + image?: string + video?: string + audio?: string + properties?: { [key: string]: any } + attributes: Array<{ [key: string]: any }> + image_data?: string + external_url?: string + background_color?: string + animation_url?: string + decimals?: number + updatedAt?: string + assets?: Array + status: ResourceStatus + queuedAt?: string + lastFetched?: string +} + +export interface Asset { + id: number + collectionId: number + tokenId?: string + url?: string + metadataField: string + name?: string + filesize?: number + mimeType?: string + width?: number + height?: number + updatedAt?: string +} + +export enum ContractType { + UNKNOWN = 'UNKNOWN', + NATIVE = 'NATIVE', + ERC20 = 'ERC20', + ERC721 = 'ERC721', + ERC1155 = 'ERC1155', + SEQUENCE_WALLET = 'SEQUENCE_WALLET', + ERC20_BRIDGE = 'ERC20_BRIDGE', + ERC721_BRIDGE = 'ERC721_BRIDGE', + ERC1155_BRIDGE = 'ERC1155_BRIDGE', + SEQ_MARKETPLACE = 'SEQ_MARKETPLACE', +} + +export enum EventLogType { + UNKNOWN = 'UNKNOWN', + BLOCK_ADDED = 'BLOCK_ADDED', + BLOCK_REMOVED = 'BLOCK_REMOVED', +} + +export enum EventLogDataType { + EVENT = 'EVENT', + TOKEN_TRANSFER = 'TOKEN_TRANSFER', + NATIVE_TOKEN_TRANSFER = 'NATIVE_TOKEN_TRANSFER', + SEQUENCE_TXN = 'SEQUENCE_TXN', +} + +export enum OrderStatus { + OPEN = 'OPEN', + CLOSED = 'CLOSED', + CANCELLED = 'CANCELLED', +} + +export enum TxnTransferType { + UNKNOWN = 'UNKNOWN', + SEND = 'SEND', + RECEIVE = 'RECEIVE', +} + +export enum TransactionStatus { + FAILED = 'FAILED', + SUCCESSFUL = 'SUCCESSFUL', +} + +export enum TransactionType { + LegacyTxnType = 'LegacyTxnType', + AccessListTxnType = 'AccessListTxnType', + DynamicFeeTxnType = 'DynamicFeeTxnType', +} + +export enum SortOrder { + DESC = 'DESC', + ASC = 'ASC', +} + +export enum ContractVerificationStatus { + VERIFIED = 'VERIFIED', + UNVERIFIED = 'UNVERIFIED', + ALL = 'ALL', +} + +export interface Version { + webrpcVersion: string + schemaVersion: string + schemaHash: string + appVersion: string +} + +export interface RuntimeStatus { + healthOK: boolean + indexerEnabled: boolean + startTime: string + uptime: number + ver: string + branch: string + commitHash: string + chainID: number + checks: RuntimeChecks +} + +export interface GatewayBackendResponseTime { + percentiles: { [key: string]: number } + average: number +} + +export interface GatewayBackendRuntimeStatus { + name: string + chainId: number + responseTime: GatewayBackendResponseTime +} + +export interface GatewayRuntimeStatus { + healthOK: boolean + startTime: string + uptime: number + ver: string + branch: string + commitHash: string + backends: Array +} + +export interface WALWriterRuntimeStatus { + healthOK: boolean + startTime: string + uptime: number + ver: string + branch: string + commitHash: string + chainID: number + percentWALWritten: number +} + +export interface RuntimeChecks { + running: boolean + runnables: any + cgoEnabled: boolean + quotaControlEnabled: boolean + syncMode: string + percentIndexed: number + lastBlockNum: number + lastBlockNumWithState: number + bloomStatus: BloomStatus + bond: Bond + diskUsage: DiskUsage +} + +export interface DiskUsage { + humanReadable: string + used: number + size: number + percent: number + dirs: { [key: string]: string } +} + +export interface Bond { + pebble: PebbleMetrics + estimatedDiskUsagePerTable: any + estimatedDiskUsageTotal: string +} + +export interface PebbleMetrics { + compactionCount: number + compactionEstimatedDebt: number + compactionInProgressBytes: number + compactionNumInProgress: number + compactionMarkedFiles: number +} + +export interface BloomStatus { + enabled: boolean + initialized: boolean + bloomInitElapsedTime: string +} + +export interface EtherBalance { + accountAddress: string + balanceWei: string +} + +export interface NativeTokenBalance { + accountAddress: string + chainId: number + balance: string + error: string +} + +export interface IndexState { + chainId: string + lastBlockNum: number + lastBlockHash: string +} + +export interface IndexedBlock { + blockNumber: number + blockShortHash: string +} + +export interface TxnInfo { + from: string + to: string + value: string +} + +export interface EventLog { + id: number + uid: string + type: EventLogType + blockNumber: number + blockHash: string + parentBlockHash: string + contractAddress: string + contractType: ContractType + txnHash: string + txnIndex: number + txnLogIndex: number + logDataType: EventLogDataType + ts: string + txnInfo?: TxnInfo + rawLog?: { [key: string]: any } + event?: EventDecoded +} + +export interface EventDecoded { + topicHash: string + eventSig: string + types: Array + names: Array + values: Array +} + +export interface TokenBalance { + contractType: ContractType + contractAddress: string + accountAddress: string + tokenID?: string + balance: string + blockHash: string + blockNumber: number + chainId: number + uniqueCollectibles: string + isSummary: boolean + contractInfo?: ContractInfo + tokenMetadata?: TokenMetadata +} + +export interface OrderbookOrder { + orderId: string + tokenContract: string + tokenId: string + isListing: boolean + quantity: string + quantityRemaining: string + currencyAddress: string + pricePerToken: string + expiry: string + orderStatus: OrderStatus + createdBy: string + blockNumber: number + orderbookContractAddress: string + createdAt: number +} + +export interface OrderbookOrderFilter { + isListing?: boolean + userAddresses?: Array + tokenIds: Array + excludeUserAddresses?: Array + afterBlockNumber: number + afterCreatedAt: number + beforeExpiry: number + userAddress?: string + excludeUserAddress?: string +} + +export interface TokenHistory { + blockNumber: number + blockHash: string + accountAddress: string + contractAddress: string + contractType: ContractType + fromAddress: string + toAddress: string + txnHash: string + txnIndex: number + txnLogIndex: number + logData: string + tokenIDs: string + Amounts: string + ts: string +} + +export interface TokenSupply { + tokenID: string + supply: string + chainId: number + contractInfo?: ContractInfo + tokenMetadata?: TokenMetadata +} + +export interface Transaction { + txnHash: string + blockNumber: number + blockHash: string + chainId: number + metaTxnID?: string + transfers?: Array + timestamp: string +} + +export interface TxnTransfer { + transferType: TxnTransferType + contractAddress: string + contractType: ContractType + from: string + to: string + tokenIds?: Array + amounts: Array + logIndex: number + contractInfo?: ContractInfo + tokenMetadata?: { [key: string]: TokenMetadata } +} + +export interface TransactionHistoryFilter { + accountAddress?: string + contractAddress?: string + accountAddresses?: Array + contractAddresses?: Array + transactionHashes?: Array + metaTransactionIDs?: Array + fromBlock?: number + toBlock?: number + tokenID?: string +} + +export interface TransactionFilter { + txnHash?: string + from?: string + to?: string + contractAddress?: string + event?: string +} + +export interface TransactionReceipt { + txnHash: string + txnStatus: TransactionStatus + txnIndex: number + txnType: TransactionType + blockHash: string + blockNumber: number + gasUsed: number + effectiveGasPrice: string + from: string + to: string + logs: Array + final: boolean + reorged: boolean +} + +export interface TransactionLog { + contractAddress: string + topics: Array + data: string + index: number +} + +export interface TokenIDRange { + start: string + end: string +} + +export interface Page { + page?: number + column?: string + before?: any + after?: any + sort?: Array + pageSize?: number + more?: boolean +} + +export interface SortBy { + column: string + order: SortOrder +} + +export interface WebhookListener { + id: number + projectID: number + url: string + filters: EventFilter + name: string + updatedAt: string + active: boolean +} + +export interface EventFilter { + events?: Array + contractAddresses?: Array + accounts?: Array + tokenIDs?: Array +} + +export interface TokenBalanceFilter { + contractAddress: string + sinceBlockNumber: number +} + +export interface MetadataOptions { + verifiedOnly?: boolean + unverifiedOnly?: boolean + includeContracts?: Array +} + +export interface TokenBalancesFilter { + accountAddresses: Array + contractStatus?: ContractVerificationStatus + contractTypes?: Array + contractWhitelist?: Array + contractBlacklist?: Array + omitNativeBalances: boolean +} + +export interface TokenBalancesByContractFilter { + contractAddresses: Array + accountAddresses?: Array + contractStatus?: ContractVerificationStatus +} + +export interface GatewayEtherBalance { + chainId: number + error: string + result: EtherBalance +} + +export interface GatewayNativeTokenBalance { + chainId: number + error: string + result: NativeTokenBalance +} + +export interface GatewayNativeTokenBalances { + chainId: number + error: string + results: Array +} + +export interface GatewayTokenBalance { + chainId: number + error: string + results: Array +} + +export interface IndexerGateway { + getNativeTokenBalance( + args: GetNativeTokenBalanceArgs, + headers?: object, + signal?: AbortSignal, + ): Promise + getTokenBalances(args: GetTokenBalancesArgs, headers?: object, signal?: AbortSignal): Promise + getTokenBalancesSummary( + args: GetTokenBalancesSummaryArgs, + headers?: object, + signal?: AbortSignal, + ): Promise + getTokenBalancesDetails( + args: GetTokenBalancesDetailsArgs, + headers?: object, + signal?: AbortSignal, + ): Promise + getTokenBalancesByContract( + args: GetTokenBalancesByContractArgs, + headers?: object, + signal?: AbortSignal, + ): Promise + getBalanceUpdates( + args: GetBalanceUpdatesArgs, + headers?: object, + signal?: AbortSignal, + ): Promise + ping(headers?: object, signal?: AbortSignal): Promise + version(headers?: object, signal?: AbortSignal): Promise + runtimeStatus(headers?: object, signal?: AbortSignal): Promise +} + +export interface GetNativeTokenBalanceArgs { + chainIds?: Array + networks?: Array + testnets?: boolean + accountAddress?: string +} + +export interface GetNativeTokenBalanceReturn { + balances: Array +} +export interface GetTokenBalancesArgs { + chainIds?: Array + networks?: Array + testnets?: boolean + accountAddress?: string + contractAddress?: string + tokenID?: string + includeMetadata?: boolean + metadataOptions?: MetadataOptions + includeCollectionTokens?: boolean + page?: Page +} + +export interface GetTokenBalancesReturn { + page: Page + balances: Array +} +export interface GetTokenBalancesSummaryArgs { + chainIds?: Array + networks?: Array + testnets?: boolean + filter: TokenBalancesFilter + omitMetadata?: boolean + page?: Page +} + +export interface GetTokenBalancesSummaryReturn { + page: Page + nativeBalances: Array + balances: Array +} +export interface GetTokenBalancesDetailsArgs { + chainIds?: Array + networks?: Array + testnets?: boolean + filter: TokenBalancesFilter + omitMetadata?: boolean + page?: Page +} + +export interface GetTokenBalancesDetailsReturn { + page: Page + nativeBalances: Array + balances: Array +} +export interface GetTokenBalancesByContractArgs { + chainIds?: Array + networks?: Array + testnets?: boolean + filter: TokenBalancesByContractFilter + omitMetadata?: boolean + page?: Page +} + +export interface GetTokenBalancesByContractReturn { + page: Page + balances: Array +} +export interface GetBalanceUpdatesArgs { + chainIds?: Array + networks?: Array + testnets?: boolean + contractAddress: string + lastBlockNumber: number + lastBlockHash?: string + page?: Page +} + +export interface GetBalanceUpdatesReturn { + page: Page + balances: Array +} +export interface PingArgs {} + +export interface PingReturn { + status: boolean +} +export interface VersionArgs {} + +export interface VersionReturn { + version: Version +} +export interface RuntimeStatusArgs {} + +export interface RuntimeStatusReturn { + status: GatewayRuntimeStatus +} + +// +// Client +// +export class IndexerGateway implements IndexerGateway { + protected hostname: string + protected fetch: Fetch + protected path = '/rpc/IndexerGateway/' + + constructor(hostname: string, fetch: Fetch) { + this.hostname = hostname.replace(/\/*$/, '') + this.fetch = (input: RequestInfo, init?: RequestInit) => fetch(input, init) + } + + private url(name: string): string { + return this.hostname + this.path + name + } + + getNativeTokenBalance = ( + args: GetNativeTokenBalanceArgs, + headers?: object, + signal?: AbortSignal, + ): Promise => { + return this.fetch(this.url('GetNativeTokenBalance'), createHTTPRequest(args, headers, signal)).then( + (res) => { + return buildResponse(res).then((_data) => { + return { + balances: >_data.balances, + } + }) + }, + (error) => { + throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) + }, + ) + } + + getTokenBalances = ( + args: GetTokenBalancesArgs, + headers?: object, + signal?: AbortSignal, + ): Promise => { + return this.fetch(this.url('GetTokenBalances'), createHTTPRequest(args, headers, signal)).then( + (res) => { + return buildResponse(res).then((_data) => { + return { + page: _data.page, + balances: >_data.balances, + } + }) + }, + (error) => { + throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) + }, + ) + } + + getTokenBalancesSummary = ( + args: GetTokenBalancesSummaryArgs, + headers?: object, + signal?: AbortSignal, + ): Promise => { + return this.fetch(this.url('GetTokenBalancesSummary'), createHTTPRequest(args, headers, signal)).then( + (res) => { + return buildResponse(res).then((_data) => { + return { + page: _data.page, + nativeBalances: >_data.nativeBalances, + balances: >_data.balances, + } + }) + }, + (error) => { + throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) + }, + ) + } + + getTokenBalancesDetails = ( + args: GetTokenBalancesDetailsArgs, + headers?: object, + signal?: AbortSignal, + ): Promise => { + return this.fetch(this.url('GetTokenBalancesDetails'), createHTTPRequest(args, headers, signal)).then( + (res) => { + return buildResponse(res).then((_data) => { + return { + page: _data.page, + nativeBalances: >_data.nativeBalances, + balances: >_data.balances, + } + }) + }, + (error) => { + throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) + }, + ) + } + + getTokenBalancesByContract = ( + args: GetTokenBalancesByContractArgs, + headers?: object, + signal?: AbortSignal, + ): Promise => { + return this.fetch(this.url('GetTokenBalancesByContract'), createHTTPRequest(args, headers, signal)).then( + (res) => { + return buildResponse(res).then((_data) => { + return { + page: _data.page, + balances: >_data.balances, + } + }) + }, + (error) => { + throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) + }, + ) + } + + getBalanceUpdates = ( + args: GetBalanceUpdatesArgs, + headers?: object, + signal?: AbortSignal, + ): Promise => { + return this.fetch(this.url('GetBalanceUpdates'), createHTTPRequest(args, headers, signal)).then( + (res) => { + return buildResponse(res).then((_data) => { + return { + page: _data.page, + balances: >_data.balances, + } + }) + }, + (error) => { + throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) + }, + ) + } + + ping = (headers?: object, signal?: AbortSignal): Promise => { + return this.fetch(this.url('Ping'), createHTTPRequest({}, headers, signal)).then( + (res) => { + return buildResponse(res).then((_data) => { + return { + status: _data.status, + } + }) + }, + (error) => { + throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) + }, + ) + } + + version = (headers?: object, signal?: AbortSignal): Promise => { + return this.fetch(this.url('Version'), createHTTPRequest({}, headers, signal)).then( + (res) => { + return buildResponse(res).then((_data) => { + return { + version: _data.version, + } + }) + }, + (error) => { + throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) + }, + ) + } + + runtimeStatus = (headers?: object, signal?: AbortSignal): Promise => { + return this.fetch(this.url('RuntimeStatus'), createHTTPRequest({}, headers, signal)).then( + (res) => { + return buildResponse(res).then((_data) => { + return { + status: _data.status, + } + }) + }, + (error) => { + throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) + }, + ) + } +} + +const createHTTPRequest = (body: object = {}, headers: object = {}, signal: AbortSignal | null = null): object => { + const reqHeaders: { [key: string]: string } = { ...headers, 'Content-Type': 'application/json' } + reqHeaders[WebrpcHeader] = WebrpcHeaderValue + + return { + method: 'POST', + headers: reqHeaders, + body: JSON.stringify(body || {}), + signal, + } +} + +const buildResponse = (res: Response): Promise => { + return res.text().then((text) => { + let data + try { + data = JSON.parse(text) + } catch (error) { + let message = '' + if (error instanceof Error) { + message = error.message + } + throw WebrpcBadResponseError.new({ + status: res.status, + cause: `JSON.parse(): ${message}: response text: ${text}`, + }) + } + if (!res.ok) { + const code: number = typeof data.code === 'number' ? data.code : 0 + throw (webrpcErrorByCode[code] || WebrpcError).new(data) + } + return data + }) +} + +// +// Errors +// + +export class WebrpcError extends Error { + name: string + code: number + message: string + status: number + cause?: string + + /** @deprecated Use message instead of msg. Deprecated in webrpc v0.11.0. */ + msg: string + + constructor(name: string, code: number, message: string, status: number, cause?: string) { + super(message) + this.name = name || 'WebrpcError' + this.code = typeof code === 'number' ? code : 0 + this.message = message || `endpoint error ${this.code}` + this.msg = this.message + this.status = typeof status === 'number' ? status : 0 + this.cause = cause + Object.setPrototypeOf(this, WebrpcError.prototype) + } + + static new(payload: any): WebrpcError { + return new this(payload.error, payload.code, payload.message || payload.msg, payload.status, payload.cause) + } +} + +// Webrpc errors + +export class WebrpcEndpointError extends WebrpcError { + constructor( + name: string = 'WebrpcEndpoint', + code: number = 0, + message: string = 'endpoint error', + status: number = 0, + cause?: string, + ) { + super(name, code, message, status, cause) + Object.setPrototypeOf(this, WebrpcEndpointError.prototype) + } +} + +export class WebrpcRequestFailedError extends WebrpcError { + constructor( + name: string = 'WebrpcRequestFailed', + code: number = -1, + message: string = 'request failed', + status: number = 0, + cause?: string, + ) { + super(name, code, message, status, cause) + Object.setPrototypeOf(this, WebrpcRequestFailedError.prototype) + } +} + +export class WebrpcBadRouteError extends WebrpcError { + constructor( + name: string = 'WebrpcBadRoute', + code: number = -2, + message: string = 'bad route', + status: number = 0, + cause?: string, + ) { + super(name, code, message, status, cause) + Object.setPrototypeOf(this, WebrpcBadRouteError.prototype) + } +} + +export class WebrpcBadMethodError extends WebrpcError { + constructor( + name: string = 'WebrpcBadMethod', + code: number = -3, + message: string = 'bad method', + status: number = 0, + cause?: string, + ) { + super(name, code, message, status, cause) + Object.setPrototypeOf(this, WebrpcBadMethodError.prototype) + } +} + +export class WebrpcBadRequestError extends WebrpcError { + constructor( + name: string = 'WebrpcBadRequest', + code: number = -4, + message: string = 'bad request', + status: number = 0, + cause?: string, + ) { + super(name, code, message, status, cause) + Object.setPrototypeOf(this, WebrpcBadRequestError.prototype) + } +} + +export class WebrpcBadResponseError extends WebrpcError { + constructor( + name: string = 'WebrpcBadResponse', + code: number = -5, + message: string = 'bad response', + status: number = 0, + cause?: string, + ) { + super(name, code, message, status, cause) + Object.setPrototypeOf(this, WebrpcBadResponseError.prototype) + } +} + +export class WebrpcServerPanicError extends WebrpcError { + constructor( + name: string = 'WebrpcServerPanic', + code: number = -6, + message: string = 'server panic', + status: number = 0, + cause?: string, + ) { + super(name, code, message, status, cause) + Object.setPrototypeOf(this, WebrpcServerPanicError.prototype) + } +} + +export class WebrpcInternalErrorError extends WebrpcError { + constructor( + name: string = 'WebrpcInternalError', + code: number = -7, + message: string = 'internal error', + status: number = 0, + cause?: string, + ) { + super(name, code, message, status, cause) + Object.setPrototypeOf(this, WebrpcInternalErrorError.prototype) + } +} + +export class WebrpcClientDisconnectedError extends WebrpcError { + constructor( + name: string = 'WebrpcClientDisconnected', + code: number = -8, + message: string = 'client disconnected', + status: number = 0, + cause?: string, + ) { + super(name, code, message, status, cause) + Object.setPrototypeOf(this, WebrpcClientDisconnectedError.prototype) + } +} + +export class WebrpcStreamLostError extends WebrpcError { + constructor( + name: string = 'WebrpcStreamLost', + code: number = -9, + message: string = 'stream lost', + status: number = 0, + cause?: string, + ) { + super(name, code, message, status, cause) + Object.setPrototypeOf(this, WebrpcStreamLostError.prototype) + } +} + +export class WebrpcStreamFinishedError extends WebrpcError { + constructor( + name: string = 'WebrpcStreamFinished', + code: number = -10, + message: string = 'stream finished', + status: number = 0, + cause?: string, + ) { + super(name, code, message, status, cause) + Object.setPrototypeOf(this, WebrpcStreamFinishedError.prototype) + } +} + +// Schema errors + +export class UnauthorizedError extends WebrpcError { + constructor( + name: string = 'Unauthorized', + code: number = 1000, + message: string = 'Unauthorized access', + status: number = 0, + cause?: string, + ) { + super(name, code, message, status, cause) + Object.setPrototypeOf(this, UnauthorizedError.prototype) + } +} + +export class PermissionDeniedError extends WebrpcError { + constructor( + name: string = 'PermissionDenied', + code: number = 1001, + message: string = 'Permission denied', + status: number = 0, + cause?: string, + ) { + super(name, code, message, status, cause) + Object.setPrototypeOf(this, PermissionDeniedError.prototype) + } +} + +export class SessionExpiredError extends WebrpcError { + constructor( + name: string = 'SessionExpired', + code: number = 1002, + message: string = 'Session expired', + status: number = 0, + cause?: string, + ) { + super(name, code, message, status, cause) + Object.setPrototypeOf(this, SessionExpiredError.prototype) + } +} + +export class MethodNotFoundError extends WebrpcError { + constructor( + name: string = 'MethodNotFound', + code: number = 1003, + message: string = 'Method not found', + status: number = 0, + cause?: string, + ) { + super(name, code, message, status, cause) + Object.setPrototypeOf(this, MethodNotFoundError.prototype) + } +} + +export class RequestConflictError extends WebrpcError { + constructor( + name: string = 'RequestConflict', + code: number = 1004, + message: string = 'Conflict with target resource', + status: number = 0, + cause?: string, + ) { + super(name, code, message, status, cause) + Object.setPrototypeOf(this, RequestConflictError.prototype) + } +} + +export class AbortedError extends WebrpcError { + constructor( + name: string = 'Aborted', + code: number = 1005, + message: string = 'Request aborted', + status: number = 0, + cause?: string, + ) { + super(name, code, message, status, cause) + Object.setPrototypeOf(this, AbortedError.prototype) + } +} + +export class GeoblockedError extends WebrpcError { + constructor( + name: string = 'Geoblocked', + code: number = 1006, + message: string = 'Geoblocked region', + status: number = 0, + cause?: string, + ) { + super(name, code, message, status, cause) + Object.setPrototypeOf(this, GeoblockedError.prototype) + } +} + +export class RateLimitedError extends WebrpcError { + constructor( + name: string = 'RateLimited', + code: number = 1007, + message: string = 'Rate-limited. Please slow down.', + status: number = 0, + cause?: string, + ) { + super(name, code, message, status, cause) + Object.setPrototypeOf(this, RateLimitedError.prototype) + } +} + +export class ProjectNotFoundError extends WebrpcError { + constructor( + name: string = 'ProjectNotFound', + code: number = 1100, + message: string = 'Project not found', + status: number = 0, + cause?: string, + ) { + super(name, code, message, status, cause) + Object.setPrototypeOf(this, ProjectNotFoundError.prototype) + } +} + +export class AccessKeyNotFoundError extends WebrpcError { + constructor( + name: string = 'AccessKeyNotFound', + code: number = 1101, + message: string = 'Access key not found', + status: number = 0, + cause?: string, + ) { + super(name, code, message, status, cause) + Object.setPrototypeOf(this, AccessKeyNotFoundError.prototype) + } +} + +export class AccessKeyMismatchError extends WebrpcError { + constructor( + name: string = 'AccessKeyMismatch', + code: number = 1102, + message: string = 'Access key mismatch', + status: number = 0, + cause?: string, + ) { + super(name, code, message, status, cause) + Object.setPrototypeOf(this, AccessKeyMismatchError.prototype) + } +} + +export class InvalidOriginError extends WebrpcError { + constructor( + name: string = 'InvalidOrigin', + code: number = 1103, + message: string = 'Invalid origin for Access Key', + status: number = 0, + cause?: string, + ) { + super(name, code, message, status, cause) + Object.setPrototypeOf(this, InvalidOriginError.prototype) + } +} + +export class InvalidServiceError extends WebrpcError { + constructor( + name: string = 'InvalidService', + code: number = 1104, + message: string = 'Service not enabled for Access key', + status: number = 0, + cause?: string, + ) { + super(name, code, message, status, cause) + Object.setPrototypeOf(this, InvalidServiceError.prototype) + } +} + +export class UnauthorizedUserError extends WebrpcError { + constructor( + name: string = 'UnauthorizedUser', + code: number = 1105, + message: string = 'Unauthorized user', + status: number = 0, + cause?: string, + ) { + super(name, code, message, status, cause) + Object.setPrototypeOf(this, UnauthorizedUserError.prototype) + } +} + +export class QuotaExceededError extends WebrpcError { + constructor( + name: string = 'QuotaExceeded', + code: number = 1200, + message: string = 'Quota exceeded', + status: number = 0, + cause?: string, + ) { + super(name, code, message, status, cause) + Object.setPrototypeOf(this, QuotaExceededError.prototype) + } +} + +export class RateLimitError extends WebrpcError { + constructor( + name: string = 'RateLimit', + code: number = 1201, + message: string = 'Rate limit exceeded', + status: number = 0, + cause?: string, + ) { + super(name, code, message, status, cause) + Object.setPrototypeOf(this, RateLimitError.prototype) + } +} + +export class NoDefaultKeyError extends WebrpcError { + constructor( + name: string = 'NoDefaultKey', + code: number = 1300, + message: string = 'No default access key found', + status: number = 0, + cause?: string, + ) { + super(name, code, message, status, cause) + Object.setPrototypeOf(this, NoDefaultKeyError.prototype) + } +} + +export class MaxAccessKeysError extends WebrpcError { + constructor( + name: string = 'MaxAccessKeys', + code: number = 1301, + message: string = 'Access keys limit reached', + status: number = 0, + cause?: string, + ) { + super(name, code, message, status, cause) + Object.setPrototypeOf(this, MaxAccessKeysError.prototype) + } +} + +export class AtLeastOneKeyError extends WebrpcError { + constructor( + name: string = 'AtLeastOneKey', + code: number = 1302, + message: string = 'You need at least one Access Key', + status: number = 0, + cause?: string, + ) { + super(name, code, message, status, cause) + Object.setPrototypeOf(this, AtLeastOneKeyError.prototype) + } +} + +export class TimeoutError extends WebrpcError { + constructor( + name: string = 'Timeout', + code: number = 1900, + message: string = 'Request timed out', + status: number = 0, + cause?: string, + ) { + super(name, code, message, status, cause) + Object.setPrototypeOf(this, TimeoutError.prototype) + } +} + +export class InvalidArgumentError extends WebrpcError { + constructor( + name: string = 'InvalidArgument', + code: number = 2001, + message: string = 'Invalid argument', + status: number = 0, + cause?: string, + ) { + super(name, code, message, status, cause) + Object.setPrototypeOf(this, InvalidArgumentError.prototype) + } +} + +export class UnavailableError extends WebrpcError { + constructor( + name: string = 'Unavailable', + code: number = 2002, + message: string = 'Unavailable resource', + status: number = 0, + cause?: string, + ) { + super(name, code, message, status, cause) + Object.setPrototypeOf(this, UnavailableError.prototype) + } +} + +export class QueryFailedError extends WebrpcError { + constructor( + name: string = 'QueryFailed', + code: number = 2003, + message: string = 'Query failed', + status: number = 0, + cause?: string, + ) { + super(name, code, message, status, cause) + Object.setPrototypeOf(this, QueryFailedError.prototype) + } +} + +export class ResourceExhaustedError extends WebrpcError { + constructor( + name: string = 'ResourceExhausted', + code: number = 2004, + message: string = 'Resource exhausted', + status: number = 0, + cause?: string, + ) { + super(name, code, message, status, cause) + Object.setPrototypeOf(this, ResourceExhaustedError.prototype) + } +} + +export class NotFoundError extends WebrpcError { + constructor( + name: string = 'NotFound', + code: number = 3000, + message: string = 'Resource not found', + status: number = 0, + cause?: string, + ) { + super(name, code, message, status, cause) + Object.setPrototypeOf(this, NotFoundError.prototype) + } +} + +export class MetadataCallFailedError extends WebrpcError { + constructor( + name: string = 'MetadataCallFailed', + code: number = 3003, + message: string = 'Metadata service call failed', + status: number = 0, + cause?: string, + ) { + super(name, code, message, status, cause) + Object.setPrototypeOf(this, MetadataCallFailedError.prototype) + } +} + +export enum errors { + WebrpcEndpoint = 'WebrpcEndpoint', + WebrpcRequestFailed = 'WebrpcRequestFailed', + WebrpcBadRoute = 'WebrpcBadRoute', + WebrpcBadMethod = 'WebrpcBadMethod', + WebrpcBadRequest = 'WebrpcBadRequest', + WebrpcBadResponse = 'WebrpcBadResponse', + WebrpcServerPanic = 'WebrpcServerPanic', + WebrpcInternalError = 'WebrpcInternalError', + WebrpcClientDisconnected = 'WebrpcClientDisconnected', + WebrpcStreamLost = 'WebrpcStreamLost', + WebrpcStreamFinished = 'WebrpcStreamFinished', + Unauthorized = 'Unauthorized', + PermissionDenied = 'PermissionDenied', + SessionExpired = 'SessionExpired', + MethodNotFound = 'MethodNotFound', + RequestConflict = 'RequestConflict', + Aborted = 'Aborted', + Geoblocked = 'Geoblocked', + RateLimited = 'RateLimited', + ProjectNotFound = 'ProjectNotFound', + AccessKeyNotFound = 'AccessKeyNotFound', + AccessKeyMismatch = 'AccessKeyMismatch', + InvalidOrigin = 'InvalidOrigin', + InvalidService = 'InvalidService', + UnauthorizedUser = 'UnauthorizedUser', + QuotaExceeded = 'QuotaExceeded', + RateLimit = 'RateLimit', + NoDefaultKey = 'NoDefaultKey', + MaxAccessKeys = 'MaxAccessKeys', + AtLeastOneKey = 'AtLeastOneKey', + Timeout = 'Timeout', + InvalidArgument = 'InvalidArgument', + Unavailable = 'Unavailable', + QueryFailed = 'QueryFailed', + ResourceExhausted = 'ResourceExhausted', + NotFound = 'NotFound', + MetadataCallFailed = 'MetadataCallFailed', +} + +const webrpcErrorByCode: { [code: number]: any } = { + [0]: WebrpcEndpointError, + [-1]: WebrpcRequestFailedError, + [-2]: WebrpcBadRouteError, + [-3]: WebrpcBadMethodError, + [-4]: WebrpcBadRequestError, + [-5]: WebrpcBadResponseError, + [-6]: WebrpcServerPanicError, + [-7]: WebrpcInternalErrorError, + [-8]: WebrpcClientDisconnectedError, + [-9]: WebrpcStreamLostError, + [-10]: WebrpcStreamFinishedError, + [1000]: UnauthorizedError, + [1001]: PermissionDeniedError, + [1002]: SessionExpiredError, + [1003]: MethodNotFoundError, + [1004]: RequestConflictError, + [1005]: AbortedError, + [1006]: GeoblockedError, + [1007]: RateLimitedError, + [1100]: ProjectNotFoundError, + [1101]: AccessKeyNotFoundError, + [1102]: AccessKeyMismatchError, + [1103]: InvalidOriginError, + [1104]: InvalidServiceError, + [1105]: UnauthorizedUserError, + [1200]: QuotaExceededError, + [1201]: RateLimitError, + [1300]: NoDefaultKeyError, + [1301]: MaxAccessKeysError, + [1302]: AtLeastOneKeyError, + [1900]: TimeoutError, + [2001]: InvalidArgumentError, + [2002]: UnavailableError, + [2003]: QueryFailedError, + [2004]: ResourceExhaustedError, + [3000]: NotFoundError, + [3003]: MetadataCallFailedError, +} + +export type Fetch = (input: RequestInfo, init?: RequestInit) => Promise diff --git a/packages/services/indexer/tsconfig.json b/packages/services/indexer/tsconfig.json new file mode 100644 index 000000000..fed9c77b4 --- /dev/null +++ b/packages/services/indexer/tsconfig.json @@ -0,0 +1,10 @@ +{ + "extends": "@repo/typescript-config/base.json", + "compilerOptions": { + "rootDir": "src", + "outDir": "dist", + "types": ["node"] + }, + "include": ["src"], + "exclude": ["node_modules", "dist"] +} diff --git a/packages/services/marketplace/CHANGELOG.md b/packages/services/marketplace/CHANGELOG.md new file mode 100644 index 000000000..6295f3498 --- /dev/null +++ b/packages/services/marketplace/CHANGELOG.md @@ -0,0 +1,238 @@ +# @0xsequence/marketplace + +## 2.3.8 + +### Patch Changes + +- indexer: update clients + +## 2.3.7 + +### Patch Changes + +- Metadata updates + +## 2.3.6 + +### Patch Changes + +- New chains + +## 2.3.5 + +### Patch Changes + +- Add Frequency Testnet + +## 2.3.4 + +### Patch Changes + +- metadata: exclude deprecated methods on rpc client + +## 2.3.3 + +### Patch Changes + +- metadata: client update + +## 2.3.2 + +### Patch Changes + +- metadata: update rpc client + +## 2.3.1 + +### Patch Changes + +- indexer: update rpc client + +## 2.3.0 + +### Minor Changes + +- update metadata rpc client + +## 2.2.15 + +### Patch Changes + +- API updates + +## 2.2.14 + +### Patch Changes + +- Somnia Testnet and Monad Testnet + +## 2.2.13 + +### Patch Changes + +- Add XR1 to all networks + +## 2.2.12 + +### Patch Changes + +- Add XR1 + +## 2.2.11 + +### Patch Changes + +- Relayer updates + +## 2.2.10 + +### Patch Changes + +- Etherlink support + +## 2.2.9 + +### Patch Changes + +- Indexer gateway native token balances + +## 2.2.8 + +### Patch Changes + +- Add Moonbeam and Moonbase Alpha + +## 2.2.7 + +### Patch Changes + +- Update Builder package + +## 2.2.6 + +### Patch Changes + +- Update relayer package + +## 2.2.5 + +### Patch Changes + +- auth: fix sequence indexer gateway url +- account: immutable wallet proxy hook + +## 2.2.4 + +### Patch Changes + +- network: update soneium mainnet block explorer url +- waas: signTypedData intent support + +## 2.2.3 + +### Patch Changes + +- provider: updating initWallet to use connected network configs if they exist + +## 2.2.2 + +### Patch Changes + +- pass projectAccessKey to relayer at all times + +## 2.2.1 + +### Patch Changes + +- waas-ethers: sign typed data + +## 2.2.0 + +### Minor Changes + +- indexer: gateway client +- @0xsequence/builder +- upgrade puppeteer to v23.10.3 + +## 2.1.8 + +### Patch Changes + +- Add Soneium Mainnet + +## 2.1.7 + +### Patch Changes + +- guard: pass project access key to guard requests + +## 2.1.6 + +### Patch Changes + +- Add LAOS and Telos Testnet chains + +## 2.1.5 + +### Patch Changes + +- account: save presigned configuration with reference chain id 1 + +## 2.1.4 + +### Patch Changes + +- provider: pass projectAccessKey into MuxMessageProvider + +## 2.1.3 + +### Patch Changes + +- waas: time drift date fix due to strange browser quirk + +## 2.1.2 + +### Patch Changes + +- provider: export analytics correctly + +## 2.1.1 + +### Patch Changes + +- Add LAOS chain support + +## 2.1.0 + +### Minor Changes + +- account: forward project access key when estimating fees and sending transactions + +### Patch Changes + +- sessions: save signatures with reference chain id + +## 2.0.26 + +### Patch Changes + +- account: fix chain id comparison + +## 2.0.25 + +### Patch Changes + +- skale-nebula: deploy gas limit = 10m + +## 2.0.24 + +### Patch Changes + +- sessions: arweave: configurable gateway url +- waas: use /status to get time drift before sending any intents + +## 2.0.23 + +### Patch Changes + +- Add The Root Network support diff --git a/packages/services/marketplace/README.md b/packages/services/marketplace/README.md new file mode 100644 index 000000000..aa6a9d87b --- /dev/null +++ b/packages/services/marketplace/README.md @@ -0,0 +1,3 @@ +# @0xsequence/marketplace + +See [0xsequence project page](https://github.com/0xsequence/sequence.js). diff --git a/packages/services/marketplace/package.json b/packages/services/marketplace/package.json new file mode 100644 index 000000000..15c2e3cb7 --- /dev/null +++ b/packages/services/marketplace/package.json @@ -0,0 +1,27 @@ +{ + "name": "@0xsequence/marketplace", + "version": "3.0.0", + "description": "marketplace sub-package for Sequence", + "repository": "https://github.com/0xsequence/sequence.js/tree/master/packages/marketplace", + "author": "Sequence Platforms Inc.", + "license": "Apache-2.0", + "scripts": { + "build": "tsc", + "dev": "tsc --watch", + "test": "echo", + "typecheck": "tsc --noEmit" + }, + "exports": { + ".": { + "types": "./src/index.ts", + "default": "./dist/index.js" + } + }, + "peerDependencies": {}, + "devDependencies": { + "@repo/typescript-config": "workspace:^", + "@types/node": "^22.13.9", + "typescript": "^5.7.3" + }, + "dependencies": {} +} diff --git a/packages/services/marketplace/src/index.ts b/packages/services/marketplace/src/index.ts new file mode 100644 index 000000000..f7ec2b0d3 --- /dev/null +++ b/packages/services/marketplace/src/index.ts @@ -0,0 +1,36 @@ +export * from './marketplace.gen' + +import { Marketplace as MarketplaceRpc } from './marketplace.gen' + +export class MarketplaceIndexer extends MarketplaceRpc { + constructor( + hostname: string, + public projectAccessKey?: string, + public jwtAuth?: string, + ) { + super(hostname.endsWith('/') ? hostname.slice(0, -1) : hostname, fetch) + this.fetch = this._fetch + } + + _fetch = (input: RequestInfo, init?: RequestInit): Promise => { + // automatically include jwt and access key auth header to requests + // if its been set on the api client + const headers: { [key: string]: any } = {} + + const jwtAuth = this.jwtAuth + const projectAccessKey = this.projectAccessKey + + if (jwtAuth && jwtAuth.length > 0) { + headers['Authorization'] = `BEARER ${jwtAuth}` + } + + if (projectAccessKey && projectAccessKey.length > 0) { + headers['X-Access-Key'] = projectAccessKey + } + + // before the request is made + init!.headers = { ...init!.headers, ...headers } + + return fetch(input, init) + } +} diff --git a/packages/services/marketplace/src/marketplace.gen.ts b/packages/services/marketplace/src/marketplace.gen.ts new file mode 100644 index 000000000..f251bce5d --- /dev/null +++ b/packages/services/marketplace/src/marketplace.gen.ts @@ -0,0 +1,2483 @@ +/* eslint-disable */ +// marketplace-api 7ab3354385f317680dd861e82a18aa351d8579d5 +// -- +// Code generated by webrpc-gen@v0.25.1 with typescript generator. DO NOT EDIT. +// +// webrpc-gen -schema=marketplace.ridl -target=typescript -client -out=./clients/marketplace.gen.ts + +export const WebrpcHeader = 'Webrpc' + +export const WebrpcHeaderValue = + 'webrpc@v0.25.1;gen-typescript@v0.17.0;marketplace-api@v0.0.0-7ab3354385f317680dd861e82a18aa351d8579d5' + +// WebRPC description and code-gen version +export const WebRPCVersion = 'v1' + +// Schema version of your RIDL schema +export const WebRPCSchemaVersion = '' + +// Schema hash generated from your RIDL schema +export const WebRPCSchemaHash = '7ab3354385f317680dd861e82a18aa351d8579d5' + +type WebrpcGenVersions = { + webrpcGenVersion: string + codeGenName: string + codeGenVersion: string + schemaName: string + schemaVersion: string +} + +export function VersionFromHeader(headers: Headers): WebrpcGenVersions { + const headerValue = headers.get(WebrpcHeader) + if (!headerValue) { + return { + webrpcGenVersion: '', + codeGenName: '', + codeGenVersion: '', + schemaName: '', + schemaVersion: '', + } + } + + return parseWebrpcGenVersions(headerValue) +} + +function parseWebrpcGenVersions(header: string): WebrpcGenVersions { + const versions = header.split(';') + if (versions.length < 3) { + return { + webrpcGenVersion: '', + codeGenName: '', + codeGenVersion: '', + schemaName: '', + schemaVersion: '', + } + } + + const [_, webrpcGenVersion] = versions[0]!.split('@') + const [codeGenName, codeGenVersion] = versions[1]!.split('@') + const [schemaName, schemaVersion] = versions[2]!.split('@') + + return { + webrpcGenVersion: webrpcGenVersion ?? '', + codeGenName: codeGenName ?? '', + codeGenVersion: codeGenVersion ?? '', + schemaName: schemaName ?? '', + schemaVersion: schemaVersion ?? '', + } +} + +// +// Types +// + +export interface TokenMetadata { + tokenId: string + name: string + description?: string + image?: string + video?: string + audio?: string + properties?: { [key: string]: any } + attributes: Array<{ [key: string]: any }> + image_data?: string + external_url?: string + background_color?: string + animation_url?: string + decimals?: number + updatedAt?: string + assets?: Array +} + +export interface Asset { + id: number + collectionId: number + tokenId: string + url?: string + metadataField: string + name?: string + filesize?: number + mimeType?: string + width?: number + height?: number + updatedAt?: string +} + +export enum SortOrder { + DESC = 'DESC', + ASC = 'ASC', +} + +export enum PropertyType { + INT = 'INT', + STRING = 'STRING', + ARRAY = 'ARRAY', + GENERIC = 'GENERIC', +} + +export enum MarketplaceKind { + unknown = 'unknown', + sequence_marketplace_v1 = 'sequence_marketplace_v1', + sequence_marketplace_v2 = 'sequence_marketplace_v2', + blur = 'blur', + zerox = 'zerox', + opensea = 'opensea', + looks_rare = 'looks_rare', + x2y2 = 'x2y2', + alienswap = 'alienswap', + payment_processor = 'payment_processor', + mintify = 'mintify', +} + +export enum OrderbookKind { + unknown = 'unknown', + sequence_marketplace_v1 = 'sequence_marketplace_v1', + sequence_marketplace_v2 = 'sequence_marketplace_v2', + blur = 'blur', + opensea = 'opensea', + looks_rare = 'looks_rare', + reservoir = 'reservoir', + x2y2 = 'x2y2', +} + +export enum SourceKind { + unknown = 'unknown', + external = 'external', + sequence_marketplace_v1 = 'sequence_marketplace_v1', + sequence_marketplace_v2 = 'sequence_marketplace_v2', +} + +export enum OrderSide { + unknown = 'unknown', + listing = 'listing', + offer = 'offer', +} + +export enum OrderStatus { + unknown = 'unknown', + active = 'active', + inactive = 'inactive', + expired = 'expired', + cancelled = 'cancelled', + filled = 'filled', + decimals_missing = 'decimals_missing', +} + +export enum ContractType { + UNKNOWN = 'UNKNOWN', + ERC20 = 'ERC20', + ERC721 = 'ERC721', + ERC1155 = 'ERC1155', +} + +export enum CollectionPriority { + unknown = 'unknown', + low = 'low', + normal = 'normal', + high = 'high', +} + +export enum CollectionStatus { + unknown = 'unknown', + created = 'created', + syncing_contract_metadata = 'syncing_contract_metadata', + synced_contract_metadata = 'synced_contract_metadata', + syncing_metadata = 'syncing_metadata', + synced_metadata = 'synced_metadata', + syncing_tokens = 'syncing_tokens', + synced_tokens = 'synced_tokens', + syncing_orders = 'syncing_orders', + active = 'active', + failed = 'failed', + inactive = 'inactive', + incompatible_type = 'incompatible_type', +} + +export enum ProjectStatus { + unknown = 'unknown', + active = 'active', + inactive = 'inactive', +} + +export enum CollectibleStatus { + unknown = 'unknown', + active = 'active', + inactive = 'inactive', +} + +export enum CurrencyStatus { + unknown = 'unknown', + created = 'created', + syncing_metadata = 'syncing_metadata', + active = 'active', + failed = 'failed', +} + +export enum WalletKind { + unknown = 'unknown', + sequence = 'sequence', +} + +export enum StepType { + unknown = 'unknown', + tokenApproval = 'tokenApproval', + buy = 'buy', + sell = 'sell', + createListing = 'createListing', + createOffer = 'createOffer', + signEIP712 = 'signEIP712', + signEIP191 = 'signEIP191', + cancel = 'cancel', +} + +export enum TransactionCrypto { + none = 'none', + partially = 'partially', + all = 'all', +} + +export enum TransactionNFTCheckoutProvider { + unknown = 'unknown', + sardine = 'sardine', + transak = 'transak', +} + +export enum TransactionOnRampProvider { + unknown = 'unknown', + sardine = 'sardine', + transak = 'transak', +} + +export enum TransactionSwapProvider { + unknown = 'unknown', + zerox = 'zerox', +} + +export enum ExecuteType { + unknown = 'unknown', + order = 'order', +} + +export enum ActivityAction { + unknown = 'unknown', + listing = 'listing', + offer = 'offer', + mint = 'mint', + sale = 'sale', + listingCancel = 'listingCancel', + offerCancel = 'offerCancel', + transfer = 'transfer', +} + +export interface Page { + page: number + pageSize: number + more?: boolean + sort?: Array +} + +export interface SortBy { + column: string + order: SortOrder +} + +export interface Filter { + text?: string + properties?: Array +} + +export interface PropertyFilter { + name: string + type: PropertyType + min?: number + max?: number + values?: Array +} + +export interface CollectiblesFilter { + includeEmpty: boolean + searchText?: string + properties?: Array + marketplaces?: Array + inAccounts?: Array + notInAccounts?: Array + ordersCreatedBy?: Array + ordersNotCreatedBy?: Array + inCurrencyAddresses?: Array + notInCurrencyAddresses?: Array +} + +export interface Order { + orderId: string + marketplace: MarketplaceKind + side: OrderSide + status: OrderStatus + chainId: number + originName: string + collectionContractAddress: string + tokenId?: string + createdBy: string + priceAmount: string + priceAmountFormatted: string + priceAmountNet: string + priceAmountNetFormatted: string + priceCurrencyAddress: string + priceDecimals: number + priceUSD: number + priceUSDFormatted: string + quantityInitial: string + quantityInitialFormatted: string + quantityRemaining: string + quantityRemainingFormatted: string + quantityAvailable: string + quantityAvailableFormatted: string + quantityDecimals: number + feeBps: number + feeBreakdown: Array + validFrom: string + validUntil: string + blockNumber: number + orderCreatedAt?: string + orderUpdatedAt?: string + createdAt: string + updatedAt: string + deletedAt?: string +} + +export interface FeeBreakdown { + kind: string + recipientAddress: string + bps: number +} + +export interface CollectibleOrder { + metadata: TokenMetadata + order?: Order + listing?: Order + offer?: Order +} + +export interface OrderFilter { + createdBy?: Array + marketplace?: Array + currencies?: Array +} + +export interface Collection { + status: CollectionStatus + chainId: number + contractAddress: string + contractType: ContractType + priority: CollectionPriority + tokenQuantityDecimals: number + config: CollectionConfig + createdAt: string + updatedAt: string + deletedAt?: string +} + +export interface CollectionConfig { + lastSynced: { [key: string]: CollectionLastSynced } + collectiblesSynced: string + activitiesSynced: string + activitiesSyncedContinuity: string +} + +export interface CollectionLastSynced { + allOrders: string + newOrders: string +} + +export interface Project { + projectId: number + chainId: number + contractAddress: string + status: ProjectStatus + createdAt: string + updatedAt: string + deletedAt?: string +} + +export interface Collectible { + chainId: number + contractAddress: string + status: CollectibleStatus + tokenId: string + decimals: number + createdAt: string + updatedAt: string + deletedAt?: string +} + +export interface Currency { + chainId: number + contractAddress: string + status: CurrencyStatus + name: string + symbol: string + decimals: number + imageUrl: string + exchangeRate: number + defaultChainCurrency: boolean + nativeCurrency: boolean + createdAt: string + updatedAt: string + deletedAt?: string +} + +export interface OrderData { + orderId: string + quantity: string + tokenId?: string +} + +export interface AdditionalFee { + amount: string + receiver: string +} + +export interface Step { + id: StepType + data: string + to: string + value: string + price: string + signature?: Signature + post?: PostRequest + executeType?: ExecuteType +} + +export interface PostRequest { + endpoint: string + method: string + body: any +} + +export interface CreateReq { + tokenId: string + quantity: string + expiry: string + currencyAddress: string + pricePerToken: string +} + +export interface GetOrdersInput { + contractAddress: string + orderId: string + marketplace: MarketplaceKind +} + +export interface Signature { + domain: Domain + types: any + primaryType: string + value: any +} + +export interface Domain { + name: string + version: string + chainId: number + verifyingContract: string +} + +export interface CheckoutOptionsMarketplaceOrder { + contractAddress: string + orderId: string + marketplace: MarketplaceKind +} + +export interface CheckoutOptionsItem { + tokenId: string + quantity: string +} + +export interface CheckoutOptions { + crypto: TransactionCrypto + swap: Array + nftCheckout: Array + onRamp: Array +} + +export interface Activity { + chainId: number + contractAddress: string + tokenId: string + action: ActivityAction + txHash: string + from: string + to?: string + quantity: string + quantityDecimals: number + priceAmount?: string + priceAmountFormatted?: string + priceCurrencyAddress?: string + priceDecimals?: number + activityCreatedAt: string + uniqueHash: string + createdAt: string + updatedAt: string + deletedAt?: string +} + +export interface Admin { + createCollection(args: CreateCollectionArgs, headers?: object, signal?: AbortSignal): Promise + getCollection(args: GetCollectionArgs, headers?: object, signal?: AbortSignal): Promise + updateCollection(args: UpdateCollectionArgs, headers?: object, signal?: AbortSignal): Promise + listCollections(args: ListCollectionsArgs, headers?: object, signal?: AbortSignal): Promise + deleteCollection(args: DeleteCollectionArgs, headers?: object, signal?: AbortSignal): Promise + /** + * determine what should happen here + */ + syncCollection(args: SyncCollectionArgs, headers?: object, signal?: AbortSignal): Promise + createCurrency(args: CreateCurrencyArgs, headers?: object, signal?: AbortSignal): Promise + createCurrencies(args: CreateCurrenciesArgs, headers?: object, signal?: AbortSignal): Promise + updateCurrency(args: UpdateCurrencyArgs, headers?: object, signal?: AbortSignal): Promise + listCurrencies(headers?: object, signal?: AbortSignal): Promise + deleteCurrency(args: DeleteCurrencyArgs, headers?: object, signal?: AbortSignal): Promise +} + +export interface CreateCollectionArgs { + projectId: number + contractAddress: string +} + +export interface CreateCollectionReturn { + collection: Collection +} +export interface GetCollectionArgs { + projectId: number + contractAddress: string +} + +export interface GetCollectionReturn { + collection: Collection +} +export interface UpdateCollectionArgs { + collection: Collection +} + +export interface UpdateCollectionReturn { + collection: Collection +} +export interface ListCollectionsArgs { + projectId: number + page?: Page +} + +export interface ListCollectionsReturn { + collections: Array + page?: Page +} +export interface DeleteCollectionArgs { + projectId: number + contractAddress: string +} + +export interface DeleteCollectionReturn { + collection: Collection +} +export interface SyncCollectionArgs { + projectId: number + contractAddress: string +} + +export interface SyncCollectionReturn { + collection: Collection +} +export interface CreateCurrencyArgs { + currency: Currency +} + +export interface CreateCurrencyReturn { + currency: Currency +} +export interface CreateCurrenciesArgs { + currencies: Array +} + +export interface CreateCurrenciesReturn { + currency: { [key: string]: Currency } +} +export interface UpdateCurrencyArgs { + currency: Currency +} + +export interface UpdateCurrencyReturn { + currency: Currency +} +export interface ListCurrenciesArgs {} + +export interface ListCurrenciesReturn { + currencies: Array +} +export interface DeleteCurrencyArgs { + chainId: number + contractAddress: string +} + +export interface DeleteCurrencyReturn { + currency: Currency +} + +export interface Marketplace { + listCurrencies(headers?: object, signal?: AbortSignal): Promise + getCollectionDetail( + args: GetCollectionDetailArgs, + headers?: object, + signal?: AbortSignal, + ): Promise + getCollectible(args: GetCollectibleArgs, headers?: object, signal?: AbortSignal): Promise + getLowestPriceOfferForCollectible( + args: GetLowestPriceOfferForCollectibleArgs, + headers?: object, + signal?: AbortSignal, + ): Promise + getHighestPriceOfferForCollectible( + args: GetHighestPriceOfferForCollectibleArgs, + headers?: object, + signal?: AbortSignal, + ): Promise + getLowestPriceListingForCollectible( + args: GetLowestPriceListingForCollectibleArgs, + headers?: object, + signal?: AbortSignal, + ): Promise + getHighestPriceListingForCollectible( + args: GetHighestPriceListingForCollectibleArgs, + headers?: object, + signal?: AbortSignal, + ): Promise + listListingsForCollectible( + args: ListListingsForCollectibleArgs, + headers?: object, + signal?: AbortSignal, + ): Promise + listOffersForCollectible( + args: ListOffersForCollectibleArgs, + headers?: object, + signal?: AbortSignal, + ): Promise + getCountOfListingsForCollectible( + args: GetCountOfListingsForCollectibleArgs, + headers?: object, + signal?: AbortSignal, + ): Promise + getCountOfOffersForCollectible( + args: GetCountOfOffersForCollectibleArgs, + headers?: object, + signal?: AbortSignal, + ): Promise + /** + * @deprecated Please use GetLowestPriceOfferForCollectible instead. + */ + getCollectibleLowestOffer( + args: GetCollectibleLowestOfferArgs, + headers?: object, + signal?: AbortSignal, + ): Promise + /** + * @deprecated Please use GetHighestPriceOfferForCollectible instead. + */ + getCollectibleHighestOffer( + args: GetCollectibleHighestOfferArgs, + headers?: object, + signal?: AbortSignal, + ): Promise + /** + * @deprecated Please use GetLowestPriceListingForCollectible instead. + */ + getCollectibleLowestListing( + args: GetCollectibleLowestListingArgs, + headers?: object, + signal?: AbortSignal, + ): Promise + /** + * @deprecated Please use GetHighestPriceListingForCollectible instead. + */ + getCollectibleHighestListing( + args: GetCollectibleHighestListingArgs, + headers?: object, + signal?: AbortSignal, + ): Promise + /** + * @deprecated Please use ListListingsForCollectible instead. + */ + listCollectibleListings( + args: ListCollectibleListingsArgs, + headers?: object, + signal?: AbortSignal, + ): Promise + /** + * @deprecated Please use ListOffersForCollectible instead. + */ + listCollectibleOffers( + args: ListCollectibleOffersArgs, + headers?: object, + signal?: AbortSignal, + ): Promise + /** + * checkout process + */ + generateBuyTransaction( + args: GenerateBuyTransactionArgs, + headers?: object, + signal?: AbortSignal, + ): Promise + generateSellTransaction( + args: GenerateSellTransactionArgs, + headers?: object, + signal?: AbortSignal, + ): Promise + generateListingTransaction( + args: GenerateListingTransactionArgs, + headers?: object, + signal?: AbortSignal, + ): Promise + generateOfferTransaction( + args: GenerateOfferTransactionArgs, + headers?: object, + signal?: AbortSignal, + ): Promise + generateCancelTransaction( + args: GenerateCancelTransactionArgs, + headers?: object, + signal?: AbortSignal, + ): Promise + /** + * only used in a case of external transactions ( when we create off-chain transactions ) for instance opensea market + */ + execute(args: ExecuteArgs, headers?: object, signal?: AbortSignal): Promise + /** + * list of collectibles with best order for each collectible, by default this only returns collectibles with an order + */ + listCollectibles(args: ListCollectiblesArgs, headers?: object, signal?: AbortSignal): Promise + getCountOfAllCollectibles( + args: GetCountOfAllCollectiblesArgs, + headers?: object, + signal?: AbortSignal, + ): Promise + getCountOfFilteredCollectibles( + args: GetCountOfFilteredCollectiblesArgs, + headers?: object, + signal?: AbortSignal, + ): Promise + getFloorOrder(args: GetFloorOrderArgs, headers?: object, signal?: AbortSignal): Promise + listCollectionActivities( + args: ListCollectionActivitiesArgs, + headers?: object, + signal?: AbortSignal, + ): Promise + listCollectibleActivities( + args: ListCollectibleActivitiesArgs, + headers?: object, + signal?: AbortSignal, + ): Promise + listCollectiblesWithLowestListing( + args: ListCollectiblesWithLowestListingArgs, + headers?: object, + signal?: AbortSignal, + ): Promise + listCollectiblesWithHighestOffer( + args: ListCollectiblesWithHighestOfferArgs, + headers?: object, + signal?: AbortSignal, + ): Promise + syncOrder(args: SyncOrderArgs, headers?: object, signal?: AbortSignal): Promise + syncOrders(args: SyncOrdersArgs, headers?: object, signal?: AbortSignal): Promise + getOrders(args: GetOrdersArgs, headers?: object, signal?: AbortSignal): Promise + checkoutOptionsMarketplace( + args: CheckoutOptionsMarketplaceArgs, + headers?: object, + signal?: AbortSignal, + ): Promise + checkoutOptionsSalesContract( + args: CheckoutOptionsSalesContractArgs, + headers?: object, + signal?: AbortSignal, + ): Promise +} + +export interface ListCurrenciesArgs {} + +export interface ListCurrenciesReturn { + currencies: Array +} +export interface GetCollectionDetailArgs { + contractAddress: string +} + +export interface GetCollectionDetailReturn { + collection: Collection +} +export interface GetCollectibleArgs { + contractAddress: string + tokenId: string +} + +export interface GetCollectibleReturn { + metadata: TokenMetadata +} +export interface GetLowestPriceOfferForCollectibleArgs { + contractAddress: string + tokenId: string + filter?: OrderFilter +} + +export interface GetLowestPriceOfferForCollectibleReturn { + order: Order +} +export interface GetHighestPriceOfferForCollectibleArgs { + contractAddress: string + tokenId: string + filter?: OrderFilter +} + +export interface GetHighestPriceOfferForCollectibleReturn { + order: Order +} +export interface GetLowestPriceListingForCollectibleArgs { + contractAddress: string + tokenId: string + filter?: OrderFilter +} + +export interface GetLowestPriceListingForCollectibleReturn { + order: Order +} +export interface GetHighestPriceListingForCollectibleArgs { + contractAddress: string + tokenId: string + filter?: OrderFilter +} + +export interface GetHighestPriceListingForCollectibleReturn { + order: Order +} +export interface ListListingsForCollectibleArgs { + contractAddress: string + tokenId: string + filter?: OrderFilter + page?: Page +} + +export interface ListListingsForCollectibleReturn { + listings: Array + page?: Page +} +export interface ListOffersForCollectibleArgs { + contractAddress: string + tokenId: string + filter?: OrderFilter + page?: Page +} + +export interface ListOffersForCollectibleReturn { + offers: Array + page?: Page +} +export interface GetCountOfListingsForCollectibleArgs { + contractAddress: string + tokenId: string + filter?: OrderFilter +} + +export interface GetCountOfListingsForCollectibleReturn { + count: number +} +export interface GetCountOfOffersForCollectibleArgs { + contractAddress: string + tokenId: string + filter?: OrderFilter +} + +export interface GetCountOfOffersForCollectibleReturn { + count: number +} +export interface GetCollectibleLowestOfferArgs { + contractAddress: string + tokenId: string + filter?: OrderFilter +} + +export interface GetCollectibleLowestOfferReturn { + order?: Order +} +export interface GetCollectibleHighestOfferArgs { + contractAddress: string + tokenId: string + filter?: OrderFilter +} + +export interface GetCollectibleHighestOfferReturn { + order?: Order +} +export interface GetCollectibleLowestListingArgs { + contractAddress: string + tokenId: string + filter?: OrderFilter +} + +export interface GetCollectibleLowestListingReturn { + order?: Order +} +export interface GetCollectibleHighestListingArgs { + contractAddress: string + tokenId: string + filter?: OrderFilter +} + +export interface GetCollectibleHighestListingReturn { + order?: Order +} +export interface ListCollectibleListingsArgs { + contractAddress: string + tokenId: string + filter?: OrderFilter + page?: Page +} + +export interface ListCollectibleListingsReturn { + listings: Array + page?: Page +} +export interface ListCollectibleOffersArgs { + contractAddress: string + tokenId: string + filter?: OrderFilter + page?: Page +} + +export interface ListCollectibleOffersReturn { + offers: Array + page?: Page +} +export interface GenerateBuyTransactionArgs { + collectionAddress: string + buyer: string + marketplace: MarketplaceKind + ordersData: Array + additionalFees: Array + walletType?: WalletKind +} + +export interface GenerateBuyTransactionReturn { + steps: Array +} +export interface GenerateSellTransactionArgs { + collectionAddress: string + seller: string + marketplace: MarketplaceKind + ordersData: Array + additionalFees: Array + walletType?: WalletKind +} + +export interface GenerateSellTransactionReturn { + steps: Array +} +export interface GenerateListingTransactionArgs { + collectionAddress: string + owner: string + contractType: ContractType + orderbook: OrderbookKind + listing: CreateReq + walletType?: WalletKind +} + +export interface GenerateListingTransactionReturn { + steps: Array +} +export interface GenerateOfferTransactionArgs { + collectionAddress: string + maker: string + contractType: ContractType + orderbook: OrderbookKind + offer: CreateReq + walletType?: WalletKind +} + +export interface GenerateOfferTransactionReturn { + steps: Array +} +export interface GenerateCancelTransactionArgs { + collectionAddress: string + maker: string + marketplace: MarketplaceKind + orderId: string +} + +export interface GenerateCancelTransactionReturn { + steps: Array +} +export interface ExecuteArgs { + signature: string + method: string + endpoint: string + executeType: ExecuteType + body: any +} + +export interface ExecuteReturn { + orderId: string +} +export interface ListCollectiblesArgs { + side: OrderSide + contractAddress: string + filter?: CollectiblesFilter + page?: Page +} + +export interface ListCollectiblesReturn { + collectibles: Array + page?: Page +} +export interface GetCountOfAllCollectiblesArgs { + contractAddress: string +} + +export interface GetCountOfAllCollectiblesReturn { + count: number +} +export interface GetCountOfFilteredCollectiblesArgs { + side: OrderSide + contractAddress: string + filter?: CollectiblesFilter +} + +export interface GetCountOfFilteredCollectiblesReturn { + count: number +} +export interface GetFloorOrderArgs { + contractAddress: string + filter?: CollectiblesFilter +} + +export interface GetFloorOrderReturn { + collectible: CollectibleOrder +} +export interface ListCollectionActivitiesArgs { + contractAddress: string + page?: Page +} + +export interface ListCollectionActivitiesReturn { + activities: Array + page?: Page +} +export interface ListCollectibleActivitiesArgs { + contractAddress: string + tokenId: string + page?: Page +} + +export interface ListCollectibleActivitiesReturn { + activities: Array + page?: Page +} +export interface ListCollectiblesWithLowestListingArgs { + contractAddress: string + filter?: CollectiblesFilter + page?: Page +} + +export interface ListCollectiblesWithLowestListingReturn { + collectibles: Array + page?: Page +} +export interface ListCollectiblesWithHighestOfferArgs { + contractAddress: string + filter?: CollectiblesFilter + page?: Page +} + +export interface ListCollectiblesWithHighestOfferReturn { + collectibles: Array + page?: Page +} +export interface SyncOrderArgs { + order: Order +} + +export interface SyncOrderReturn {} +export interface SyncOrdersArgs { + orders: Array +} + +export interface SyncOrdersReturn {} +export interface GetOrdersArgs { + input: Array + page?: Page +} + +export interface GetOrdersReturn { + orders: Array + page?: Page +} +export interface CheckoutOptionsMarketplaceArgs { + wallet: string + orders: Array + additionalFee: number +} + +export interface CheckoutOptionsMarketplaceReturn { + options: CheckoutOptions +} +export interface CheckoutOptionsSalesContractArgs { + wallet: string + contractAddress: string + collectionAddress: string + items: Array +} + +export interface CheckoutOptionsSalesContractReturn { + options: CheckoutOptions +} + +// +// Client +// +export class Admin implements Admin { + protected hostname: string + protected fetch: Fetch + protected path = '/rpc/Admin/' + + constructor(hostname: string, fetch: Fetch) { + this.hostname = hostname.replace(/\/*$/, '') + this.fetch = (input: RequestInfo, init?: RequestInit) => fetch(input, init) + } + + private url(name: string): string { + return this.hostname + this.path + name + } + + createCollection = ( + args: CreateCollectionArgs, + headers?: object, + signal?: AbortSignal, + ): Promise => { + return this.fetch(this.url('CreateCollection'), createHTTPRequest(args, headers, signal)).then( + (res) => { + return buildResponse(res).then((_data) => { + return { + collection: _data.collection, + } + }) + }, + (error) => { + throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) + }, + ) + } + + getCollection = (args: GetCollectionArgs, headers?: object, signal?: AbortSignal): Promise => { + return this.fetch(this.url('GetCollection'), createHTTPRequest(args, headers, signal)).then( + (res) => { + return buildResponse(res).then((_data) => { + return { + collection: _data.collection, + } + }) + }, + (error) => { + throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) + }, + ) + } + + updateCollection = ( + args: UpdateCollectionArgs, + headers?: object, + signal?: AbortSignal, + ): Promise => { + return this.fetch(this.url('UpdateCollection'), createHTTPRequest(args, headers, signal)).then( + (res) => { + return buildResponse(res).then((_data) => { + return { + collection: _data.collection, + } + }) + }, + (error) => { + throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) + }, + ) + } + + listCollections = ( + args: ListCollectionsArgs, + headers?: object, + signal?: AbortSignal, + ): Promise => { + return this.fetch(this.url('ListCollections'), createHTTPRequest(args, headers, signal)).then( + (res) => { + return buildResponse(res).then((_data) => { + return { + collections: >_data.collections, + page: _data.page, + } + }) + }, + (error) => { + throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) + }, + ) + } + + deleteCollection = ( + args: DeleteCollectionArgs, + headers?: object, + signal?: AbortSignal, + ): Promise => { + return this.fetch(this.url('DeleteCollection'), createHTTPRequest(args, headers, signal)).then( + (res) => { + return buildResponse(res).then((_data) => { + return { + collection: _data.collection, + } + }) + }, + (error) => { + throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) + }, + ) + } + + syncCollection = ( + args: SyncCollectionArgs, + headers?: object, + signal?: AbortSignal, + ): Promise => { + return this.fetch(this.url('SyncCollection'), createHTTPRequest(args, headers, signal)).then( + (res) => { + return buildResponse(res).then((_data) => { + return { + collection: _data.collection, + } + }) + }, + (error) => { + throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) + }, + ) + } + + createCurrency = ( + args: CreateCurrencyArgs, + headers?: object, + signal?: AbortSignal, + ): Promise => { + return this.fetch(this.url('CreateCurrency'), createHTTPRequest(args, headers, signal)).then( + (res) => { + return buildResponse(res).then((_data) => { + return { + currency: _data.currency, + } + }) + }, + (error) => { + throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) + }, + ) + } + + createCurrencies = ( + args: CreateCurrenciesArgs, + headers?: object, + signal?: AbortSignal, + ): Promise => { + return this.fetch(this.url('CreateCurrencies'), createHTTPRequest(args, headers, signal)).then( + (res) => { + return buildResponse(res).then((_data) => { + return { + currency: <{ [key: string]: Currency }>_data.currency, + } + }) + }, + (error) => { + throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) + }, + ) + } + + updateCurrency = ( + args: UpdateCurrencyArgs, + headers?: object, + signal?: AbortSignal, + ): Promise => { + return this.fetch(this.url('UpdateCurrency'), createHTTPRequest(args, headers, signal)).then( + (res) => { + return buildResponse(res).then((_data) => { + return { + currency: _data.currency, + } + }) + }, + (error) => { + throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) + }, + ) + } + + listCurrencies = (headers?: object, signal?: AbortSignal): Promise => { + return this.fetch(this.url('ListCurrencies'), createHTTPRequest({}, headers, signal)).then( + (res) => { + return buildResponse(res).then((_data) => { + return { + currencies: >_data.currencies, + } + }) + }, + (error) => { + throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) + }, + ) + } + + deleteCurrency = ( + args: DeleteCurrencyArgs, + headers?: object, + signal?: AbortSignal, + ): Promise => { + return this.fetch(this.url('DeleteCurrency'), createHTTPRequest(args, headers, signal)).then( + (res) => { + return buildResponse(res).then((_data) => { + return { + currency: _data.currency, + } + }) + }, + (error) => { + throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) + }, + ) + } +} +export class Marketplace implements Marketplace { + protected hostname: string + protected fetch: Fetch + protected path = '/rpc/Marketplace/' + + constructor(hostname: string, fetch: Fetch) { + this.hostname = hostname.replace(/\/*$/, '') + this.fetch = (input: RequestInfo, init?: RequestInit) => fetch(input, init) + } + + private url(name: string): string { + return this.hostname + this.path + name + } + + listCurrencies = (headers?: object, signal?: AbortSignal): Promise => { + return this.fetch(this.url('ListCurrencies'), createHTTPRequest({}, headers, signal)).then( + (res) => { + return buildResponse(res).then((_data) => { + return { + currencies: >_data.currencies, + } + }) + }, + (error) => { + throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) + }, + ) + } + + getCollectionDetail = ( + args: GetCollectionDetailArgs, + headers?: object, + signal?: AbortSignal, + ): Promise => { + return this.fetch(this.url('GetCollectionDetail'), createHTTPRequest(args, headers, signal)).then( + (res) => { + return buildResponse(res).then((_data) => { + return { + collection: _data.collection, + } + }) + }, + (error) => { + throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) + }, + ) + } + + getCollectible = ( + args: GetCollectibleArgs, + headers?: object, + signal?: AbortSignal, + ): Promise => { + return this.fetch(this.url('GetCollectible'), createHTTPRequest(args, headers, signal)).then( + (res) => { + return buildResponse(res).then((_data) => { + return { + metadata: _data.metadata, + } + }) + }, + (error) => { + throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) + }, + ) + } + + getLowestPriceOfferForCollectible = ( + args: GetLowestPriceOfferForCollectibleArgs, + headers?: object, + signal?: AbortSignal, + ): Promise => { + return this.fetch(this.url('GetLowestPriceOfferForCollectible'), createHTTPRequest(args, headers, signal)).then( + (res) => { + return buildResponse(res).then((_data) => { + return { + order: _data.order, + } + }) + }, + (error) => { + throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) + }, + ) + } + + getHighestPriceOfferForCollectible = ( + args: GetHighestPriceOfferForCollectibleArgs, + headers?: object, + signal?: AbortSignal, + ): Promise => { + return this.fetch(this.url('GetHighestPriceOfferForCollectible'), createHTTPRequest(args, headers, signal)).then( + (res) => { + return buildResponse(res).then((_data) => { + return { + order: _data.order, + } + }) + }, + (error) => { + throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) + }, + ) + } + + getLowestPriceListingForCollectible = ( + args: GetLowestPriceListingForCollectibleArgs, + headers?: object, + signal?: AbortSignal, + ): Promise => { + return this.fetch(this.url('GetLowestPriceListingForCollectible'), createHTTPRequest(args, headers, signal)).then( + (res) => { + return buildResponse(res).then((_data) => { + return { + order: _data.order, + } + }) + }, + (error) => { + throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) + }, + ) + } + + getHighestPriceListingForCollectible = ( + args: GetHighestPriceListingForCollectibleArgs, + headers?: object, + signal?: AbortSignal, + ): Promise => { + return this.fetch(this.url('GetHighestPriceListingForCollectible'), createHTTPRequest(args, headers, signal)).then( + (res) => { + return buildResponse(res).then((_data) => { + return { + order: _data.order, + } + }) + }, + (error) => { + throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) + }, + ) + } + + listListingsForCollectible = ( + args: ListListingsForCollectibleArgs, + headers?: object, + signal?: AbortSignal, + ): Promise => { + return this.fetch(this.url('ListListingsForCollectible'), createHTTPRequest(args, headers, signal)).then( + (res) => { + return buildResponse(res).then((_data) => { + return { + listings: >_data.listings, + page: _data.page, + } + }) + }, + (error) => { + throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) + }, + ) + } + + listOffersForCollectible = ( + args: ListOffersForCollectibleArgs, + headers?: object, + signal?: AbortSignal, + ): Promise => { + return this.fetch(this.url('ListOffersForCollectible'), createHTTPRequest(args, headers, signal)).then( + (res) => { + return buildResponse(res).then((_data) => { + return { + offers: >_data.offers, + page: _data.page, + } + }) + }, + (error) => { + throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) + }, + ) + } + + getCountOfListingsForCollectible = ( + args: GetCountOfListingsForCollectibleArgs, + headers?: object, + signal?: AbortSignal, + ): Promise => { + return this.fetch(this.url('GetCountOfListingsForCollectible'), createHTTPRequest(args, headers, signal)).then( + (res) => { + return buildResponse(res).then((_data) => { + return { + count: _data.count, + } + }) + }, + (error) => { + throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) + }, + ) + } + + getCountOfOffersForCollectible = ( + args: GetCountOfOffersForCollectibleArgs, + headers?: object, + signal?: AbortSignal, + ): Promise => { + return this.fetch(this.url('GetCountOfOffersForCollectible'), createHTTPRequest(args, headers, signal)).then( + (res) => { + return buildResponse(res).then((_data) => { + return { + count: _data.count, + } + }) + }, + (error) => { + throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) + }, + ) + } + + getCollectibleLowestOffer = ( + args: GetCollectibleLowestOfferArgs, + headers?: object, + signal?: AbortSignal, + ): Promise => { + return this.fetch(this.url('GetCollectibleLowestOffer'), createHTTPRequest(args, headers, signal)).then( + (res) => { + return buildResponse(res).then((_data) => { + return { + order: _data.order, + } + }) + }, + (error) => { + throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) + }, + ) + } + + getCollectibleHighestOffer = ( + args: GetCollectibleHighestOfferArgs, + headers?: object, + signal?: AbortSignal, + ): Promise => { + return this.fetch(this.url('GetCollectibleHighestOffer'), createHTTPRequest(args, headers, signal)).then( + (res) => { + return buildResponse(res).then((_data) => { + return { + order: _data.order, + } + }) + }, + (error) => { + throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) + }, + ) + } + + getCollectibleLowestListing = ( + args: GetCollectibleLowestListingArgs, + headers?: object, + signal?: AbortSignal, + ): Promise => { + return this.fetch(this.url('GetCollectibleLowestListing'), createHTTPRequest(args, headers, signal)).then( + (res) => { + return buildResponse(res).then((_data) => { + return { + order: _data.order, + } + }) + }, + (error) => { + throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) + }, + ) + } + + getCollectibleHighestListing = ( + args: GetCollectibleHighestListingArgs, + headers?: object, + signal?: AbortSignal, + ): Promise => { + return this.fetch(this.url('GetCollectibleHighestListing'), createHTTPRequest(args, headers, signal)).then( + (res) => { + return buildResponse(res).then((_data) => { + return { + order: _data.order, + } + }) + }, + (error) => { + throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) + }, + ) + } + + listCollectibleListings = ( + args: ListCollectibleListingsArgs, + headers?: object, + signal?: AbortSignal, + ): Promise => { + return this.fetch(this.url('ListCollectibleListings'), createHTTPRequest(args, headers, signal)).then( + (res) => { + return buildResponse(res).then((_data) => { + return { + listings: >_data.listings, + page: _data.page, + } + }) + }, + (error) => { + throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) + }, + ) + } + + listCollectibleOffers = ( + args: ListCollectibleOffersArgs, + headers?: object, + signal?: AbortSignal, + ): Promise => { + return this.fetch(this.url('ListCollectibleOffers'), createHTTPRequest(args, headers, signal)).then( + (res) => { + return buildResponse(res).then((_data) => { + return { + offers: >_data.offers, + page: _data.page, + } + }) + }, + (error) => { + throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) + }, + ) + } + + generateBuyTransaction = ( + args: GenerateBuyTransactionArgs, + headers?: object, + signal?: AbortSignal, + ): Promise => { + return this.fetch(this.url('GenerateBuyTransaction'), createHTTPRequest(args, headers, signal)).then( + (res) => { + return buildResponse(res).then((_data) => { + return { + steps: >_data.steps, + } + }) + }, + (error) => { + throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) + }, + ) + } + + generateSellTransaction = ( + args: GenerateSellTransactionArgs, + headers?: object, + signal?: AbortSignal, + ): Promise => { + return this.fetch(this.url('GenerateSellTransaction'), createHTTPRequest(args, headers, signal)).then( + (res) => { + return buildResponse(res).then((_data) => { + return { + steps: >_data.steps, + } + }) + }, + (error) => { + throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) + }, + ) + } + + generateListingTransaction = ( + args: GenerateListingTransactionArgs, + headers?: object, + signal?: AbortSignal, + ): Promise => { + return this.fetch(this.url('GenerateListingTransaction'), createHTTPRequest(args, headers, signal)).then( + (res) => { + return buildResponse(res).then((_data) => { + return { + steps: >_data.steps, + } + }) + }, + (error) => { + throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) + }, + ) + } + + generateOfferTransaction = ( + args: GenerateOfferTransactionArgs, + headers?: object, + signal?: AbortSignal, + ): Promise => { + return this.fetch(this.url('GenerateOfferTransaction'), createHTTPRequest(args, headers, signal)).then( + (res) => { + return buildResponse(res).then((_data) => { + return { + steps: >_data.steps, + } + }) + }, + (error) => { + throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) + }, + ) + } + + generateCancelTransaction = ( + args: GenerateCancelTransactionArgs, + headers?: object, + signal?: AbortSignal, + ): Promise => { + return this.fetch(this.url('GenerateCancelTransaction'), createHTTPRequest(args, headers, signal)).then( + (res) => { + return buildResponse(res).then((_data) => { + return { + steps: >_data.steps, + } + }) + }, + (error) => { + throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) + }, + ) + } + + execute = (args: ExecuteArgs, headers?: object, signal?: AbortSignal): Promise => { + return this.fetch(this.url('Execute'), createHTTPRequest(args, headers, signal)).then( + (res) => { + return buildResponse(res).then((_data) => { + return { + orderId: _data.orderId, + } + }) + }, + (error) => { + throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) + }, + ) + } + + listCollectibles = ( + args: ListCollectiblesArgs, + headers?: object, + signal?: AbortSignal, + ): Promise => { + return this.fetch(this.url('ListCollectibles'), createHTTPRequest(args, headers, signal)).then( + (res) => { + return buildResponse(res).then((_data) => { + return { + collectibles: >_data.collectibles, + page: _data.page, + } + }) + }, + (error) => { + throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) + }, + ) + } + + getCountOfAllCollectibles = ( + args: GetCountOfAllCollectiblesArgs, + headers?: object, + signal?: AbortSignal, + ): Promise => { + return this.fetch(this.url('GetCountOfAllCollectibles'), createHTTPRequest(args, headers, signal)).then( + (res) => { + return buildResponse(res).then((_data) => { + return { + count: _data.count, + } + }) + }, + (error) => { + throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) + }, + ) + } + + getCountOfFilteredCollectibles = ( + args: GetCountOfFilteredCollectiblesArgs, + headers?: object, + signal?: AbortSignal, + ): Promise => { + return this.fetch(this.url('GetCountOfFilteredCollectibles'), createHTTPRequest(args, headers, signal)).then( + (res) => { + return buildResponse(res).then((_data) => { + return { + count: _data.count, + } + }) + }, + (error) => { + throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) + }, + ) + } + + getFloorOrder = (args: GetFloorOrderArgs, headers?: object, signal?: AbortSignal): Promise => { + return this.fetch(this.url('GetFloorOrder'), createHTTPRequest(args, headers, signal)).then( + (res) => { + return buildResponse(res).then((_data) => { + return { + collectible: _data.collectible, + } + }) + }, + (error) => { + throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) + }, + ) + } + + listCollectionActivities = ( + args: ListCollectionActivitiesArgs, + headers?: object, + signal?: AbortSignal, + ): Promise => { + return this.fetch(this.url('ListCollectionActivities'), createHTTPRequest(args, headers, signal)).then( + (res) => { + return buildResponse(res).then((_data) => { + return { + activities: >_data.activities, + page: _data.page, + } + }) + }, + (error) => { + throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) + }, + ) + } + + listCollectibleActivities = ( + args: ListCollectibleActivitiesArgs, + headers?: object, + signal?: AbortSignal, + ): Promise => { + return this.fetch(this.url('ListCollectibleActivities'), createHTTPRequest(args, headers, signal)).then( + (res) => { + return buildResponse(res).then((_data) => { + return { + activities: >_data.activities, + page: _data.page, + } + }) + }, + (error) => { + throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) + }, + ) + } + + listCollectiblesWithLowestListing = ( + args: ListCollectiblesWithLowestListingArgs, + headers?: object, + signal?: AbortSignal, + ): Promise => { + return this.fetch(this.url('ListCollectiblesWithLowestListing'), createHTTPRequest(args, headers, signal)).then( + (res) => { + return buildResponse(res).then((_data) => { + return { + collectibles: >_data.collectibles, + page: _data.page, + } + }) + }, + (error) => { + throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) + }, + ) + } + + listCollectiblesWithHighestOffer = ( + args: ListCollectiblesWithHighestOfferArgs, + headers?: object, + signal?: AbortSignal, + ): Promise => { + return this.fetch(this.url('ListCollectiblesWithHighestOffer'), createHTTPRequest(args, headers, signal)).then( + (res) => { + return buildResponse(res).then((_data) => { + return { + collectibles: >_data.collectibles, + page: _data.page, + } + }) + }, + (error) => { + throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) + }, + ) + } + + syncOrder = (args: SyncOrderArgs, headers?: object, signal?: AbortSignal): Promise => { + return this.fetch(this.url('SyncOrder'), createHTTPRequest(args, headers, signal)).then( + (res) => { + return buildResponse(res).then((_data) => { + return {} + }) + }, + (error) => { + throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) + }, + ) + } + + syncOrders = (args: SyncOrdersArgs, headers?: object, signal?: AbortSignal): Promise => { + return this.fetch(this.url('SyncOrders'), createHTTPRequest(args, headers, signal)).then( + (res) => { + return buildResponse(res).then((_data) => { + return {} + }) + }, + (error) => { + throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) + }, + ) + } + + getOrders = (args: GetOrdersArgs, headers?: object, signal?: AbortSignal): Promise => { + return this.fetch(this.url('GetOrders'), createHTTPRequest(args, headers, signal)).then( + (res) => { + return buildResponse(res).then((_data) => { + return { + orders: >_data.orders, + page: _data.page, + } + }) + }, + (error) => { + throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) + }, + ) + } + + checkoutOptionsMarketplace = ( + args: CheckoutOptionsMarketplaceArgs, + headers?: object, + signal?: AbortSignal, + ): Promise => { + return this.fetch(this.url('CheckoutOptionsMarketplace'), createHTTPRequest(args, headers, signal)).then( + (res) => { + return buildResponse(res).then((_data) => { + return { + options: _data.options, + } + }) + }, + (error) => { + throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) + }, + ) + } + + checkoutOptionsSalesContract = ( + args: CheckoutOptionsSalesContractArgs, + headers?: object, + signal?: AbortSignal, + ): Promise => { + return this.fetch(this.url('CheckoutOptionsSalesContract'), createHTTPRequest(args, headers, signal)).then( + (res) => { + return buildResponse(res).then((_data) => { + return { + options: _data.options, + } + }) + }, + (error) => { + throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) + }, + ) + } +} + +const createHTTPRequest = (body: object = {}, headers: object = {}, signal: AbortSignal | null = null): object => { + const reqHeaders: { [key: string]: string } = { ...headers, 'Content-Type': 'application/json' } + reqHeaders[WebrpcHeader] = WebrpcHeaderValue + + return { + method: 'POST', + headers: reqHeaders, + body: JSON.stringify(body || {}), + signal, + } +} + +const buildResponse = (res: Response): Promise => { + return res.text().then((text) => { + let data + try { + data = JSON.parse(text) + } catch (error) { + let message = '' + if (error instanceof Error) { + message = error.message + } + throw WebrpcBadResponseError.new({ + status: res.status, + cause: `JSON.parse(): ${message}: response text: ${text}`, + }) + } + if (!res.ok) { + const code: number = typeof data.code === 'number' ? data.code : 0 + throw (webrpcErrorByCode[code] || WebrpcError).new(data) + } + return data + }) +} + +// +// Errors +// + +export class WebrpcError extends Error { + name: string + code: number + message: string + status: number + cause?: string + + /** @deprecated Use message instead of msg. Deprecated in webrpc v0.11.0. */ + msg: string + + constructor(name: string, code: number, message: string, status: number, cause?: string) { + super(message) + this.name = name || 'WebrpcError' + this.code = typeof code === 'number' ? code : 0 + this.message = message || `endpoint error ${this.code}` + this.msg = this.message + this.status = typeof status === 'number' ? status : 0 + this.cause = cause + Object.setPrototypeOf(this, WebrpcError.prototype) + } + + static new(payload: any): WebrpcError { + return new this(payload.error, payload.code, payload.message || payload.msg, payload.status, payload.cause) + } +} + +// Webrpc errors + +export class WebrpcEndpointError extends WebrpcError { + constructor( + name: string = 'WebrpcEndpoint', + code: number = 0, + message: string = `endpoint error`, + status: number = 0, + cause?: string, + ) { + super(name, code, message, status, cause) + Object.setPrototypeOf(this, WebrpcEndpointError.prototype) + } +} + +export class WebrpcRequestFailedError extends WebrpcError { + constructor( + name: string = 'WebrpcRequestFailed', + code: number = -1, + message: string = `request failed`, + status: number = 0, + cause?: string, + ) { + super(name, code, message, status, cause) + Object.setPrototypeOf(this, WebrpcRequestFailedError.prototype) + } +} + +export class WebrpcBadRouteError extends WebrpcError { + constructor( + name: string = 'WebrpcBadRoute', + code: number = -2, + message: string = `bad route`, + status: number = 0, + cause?: string, + ) { + super(name, code, message, status, cause) + Object.setPrototypeOf(this, WebrpcBadRouteError.prototype) + } +} + +export class WebrpcBadMethodError extends WebrpcError { + constructor( + name: string = 'WebrpcBadMethod', + code: number = -3, + message: string = `bad method`, + status: number = 0, + cause?: string, + ) { + super(name, code, message, status, cause) + Object.setPrototypeOf(this, WebrpcBadMethodError.prototype) + } +} + +export class WebrpcBadRequestError extends WebrpcError { + constructor( + name: string = 'WebrpcBadRequest', + code: number = -4, + message: string = `bad request`, + status: number = 0, + cause?: string, + ) { + super(name, code, message, status, cause) + Object.setPrototypeOf(this, WebrpcBadRequestError.prototype) + } +} + +export class WebrpcBadResponseError extends WebrpcError { + constructor( + name: string = 'WebrpcBadResponse', + code: number = -5, + message: string = `bad response`, + status: number = 0, + cause?: string, + ) { + super(name, code, message, status, cause) + Object.setPrototypeOf(this, WebrpcBadResponseError.prototype) + } +} + +export class WebrpcServerPanicError extends WebrpcError { + constructor( + name: string = 'WebrpcServerPanic', + code: number = -6, + message: string = `server panic`, + status: number = 0, + cause?: string, + ) { + super(name, code, message, status, cause) + Object.setPrototypeOf(this, WebrpcServerPanicError.prototype) + } +} + +export class WebrpcInternalErrorError extends WebrpcError { + constructor( + name: string = 'WebrpcInternalError', + code: number = -7, + message: string = `internal error`, + status: number = 0, + cause?: string, + ) { + super(name, code, message, status, cause) + Object.setPrototypeOf(this, WebrpcInternalErrorError.prototype) + } +} + +export class WebrpcClientDisconnectedError extends WebrpcError { + constructor( + name: string = 'WebrpcClientDisconnected', + code: number = -8, + message: string = `client disconnected`, + status: number = 0, + cause?: string, + ) { + super(name, code, message, status, cause) + Object.setPrototypeOf(this, WebrpcClientDisconnectedError.prototype) + } +} + +export class WebrpcStreamLostError extends WebrpcError { + constructor( + name: string = 'WebrpcStreamLost', + code: number = -9, + message: string = `stream lost`, + status: number = 0, + cause?: string, + ) { + super(name, code, message, status, cause) + Object.setPrototypeOf(this, WebrpcStreamLostError.prototype) + } +} + +export class WebrpcStreamFinishedError extends WebrpcError { + constructor( + name: string = 'WebrpcStreamFinished', + code: number = -10, + message: string = `stream finished`, + status: number = 0, + cause?: string, + ) { + super(name, code, message, status, cause) + Object.setPrototypeOf(this, WebrpcStreamFinishedError.prototype) + } +} + +// Schema errors + +export class UnauthorizedError extends WebrpcError { + constructor( + name: string = 'Unauthorized', + code: number = 1000, + message: string = `Unauthorized access`, + status: number = 0, + cause?: string, + ) { + super(name, code, message, status, cause) + Object.setPrototypeOf(this, UnauthorizedError.prototype) + } +} + +export class PermissionDeniedError extends WebrpcError { + constructor( + name: string = 'PermissionDenied', + code: number = 1001, + message: string = `Permission denied`, + status: number = 0, + cause?: string, + ) { + super(name, code, message, status, cause) + Object.setPrototypeOf(this, PermissionDeniedError.prototype) + } +} + +export class SessionExpiredError extends WebrpcError { + constructor( + name: string = 'SessionExpired', + code: number = 1002, + message: string = `Session expired`, + status: number = 0, + cause?: string, + ) { + super(name, code, message, status, cause) + Object.setPrototypeOf(this, SessionExpiredError.prototype) + } +} + +export class MethodNotFoundError extends WebrpcError { + constructor( + name: string = 'MethodNotFound', + code: number = 1003, + message: string = `Method not found`, + status: number = 0, + cause?: string, + ) { + super(name, code, message, status, cause) + Object.setPrototypeOf(this, MethodNotFoundError.prototype) + } +} + +export class TimeoutError extends WebrpcError { + constructor( + name: string = 'Timeout', + code: number = 2000, + message: string = `Request timed out`, + status: number = 0, + cause?: string, + ) { + super(name, code, message, status, cause) + Object.setPrototypeOf(this, TimeoutError.prototype) + } +} + +export class InvalidArgumentError extends WebrpcError { + constructor( + name: string = 'InvalidArgument', + code: number = 2001, + message: string = `Invalid argument`, + status: number = 0, + cause?: string, + ) { + super(name, code, message, status, cause) + Object.setPrototypeOf(this, InvalidArgumentError.prototype) + } +} + +export class NotFoundError extends WebrpcError { + constructor( + name: string = 'NotFound', + code: number = 3000, + message: string = `Resource not found`, + status: number = 0, + cause?: string, + ) { + super(name, code, message, status, cause) + Object.setPrototypeOf(this, NotFoundError.prototype) + } +} + +export class UserNotFoundError extends WebrpcError { + constructor( + name: string = 'UserNotFound', + code: number = 3001, + message: string = `User not found`, + status: number = 0, + cause?: string, + ) { + super(name, code, message, status, cause) + Object.setPrototypeOf(this, UserNotFoundError.prototype) + } +} + +export class ProjectNotFoundError extends WebrpcError { + constructor( + name: string = 'ProjectNotFound', + code: number = 3002, + message: string = `Project not found`, + status: number = 0, + cause?: string, + ) { + super(name, code, message, status, cause) + Object.setPrototypeOf(this, ProjectNotFoundError.prototype) + } +} + +export class InvalidTierError extends WebrpcError { + constructor( + name: string = 'InvalidTier', + code: number = 3003, + message: string = `Invalid subscription tier`, + status: number = 0, + cause?: string, + ) { + super(name, code, message, status, cause) + Object.setPrototypeOf(this, InvalidTierError.prototype) + } +} + +export class ProjectLimitReachedError extends WebrpcError { + constructor( + name: string = 'ProjectLimitReached', + code: number = 3005, + message: string = `Project limit reached`, + status: number = 0, + cause?: string, + ) { + super(name, code, message, status, cause) + Object.setPrototypeOf(this, ProjectLimitReachedError.prototype) + } +} + +export class NotImplementedError extends WebrpcError { + constructor( + name: string = 'NotImplemented', + code: number = 9999, + message: string = `Not Implemented`, + status: number = 0, + cause?: string, + ) { + super(name, code, message, status, cause) + Object.setPrototypeOf(this, NotImplementedError.prototype) + } +} + +export enum errors { + WebrpcEndpoint = 'WebrpcEndpoint', + WebrpcRequestFailed = 'WebrpcRequestFailed', + WebrpcBadRoute = 'WebrpcBadRoute', + WebrpcBadMethod = 'WebrpcBadMethod', + WebrpcBadRequest = 'WebrpcBadRequest', + WebrpcBadResponse = 'WebrpcBadResponse', + WebrpcServerPanic = 'WebrpcServerPanic', + WebrpcInternalError = 'WebrpcInternalError', + WebrpcClientDisconnected = 'WebrpcClientDisconnected', + WebrpcStreamLost = 'WebrpcStreamLost', + WebrpcStreamFinished = 'WebrpcStreamFinished', + Unauthorized = 'Unauthorized', + PermissionDenied = 'PermissionDenied', + SessionExpired = 'SessionExpired', + MethodNotFound = 'MethodNotFound', + Timeout = 'Timeout', + InvalidArgument = 'InvalidArgument', + NotFound = 'NotFound', + UserNotFound = 'UserNotFound', + ProjectNotFound = 'ProjectNotFound', + InvalidTier = 'InvalidTier', + ProjectLimitReached = 'ProjectLimitReached', + NotImplemented = 'NotImplemented', +} + +export enum WebrpcErrorCodes { + WebrpcEndpoint = 0, + WebrpcRequestFailed = -1, + WebrpcBadRoute = -2, + WebrpcBadMethod = -3, + WebrpcBadRequest = -4, + WebrpcBadResponse = -5, + WebrpcServerPanic = -6, + WebrpcInternalError = -7, + WebrpcClientDisconnected = -8, + WebrpcStreamLost = -9, + WebrpcStreamFinished = -10, + Unauthorized = 1000, + PermissionDenied = 1001, + SessionExpired = 1002, + MethodNotFound = 1003, + Timeout = 2000, + InvalidArgument = 2001, + NotFound = 3000, + UserNotFound = 3001, + ProjectNotFound = 3002, + InvalidTier = 3003, + ProjectLimitReached = 3005, + NotImplemented = 9999, +} + +export const webrpcErrorByCode: { [code: number]: any } = { + [0]: WebrpcEndpointError, + [-1]: WebrpcRequestFailedError, + [-2]: WebrpcBadRouteError, + [-3]: WebrpcBadMethodError, + [-4]: WebrpcBadRequestError, + [-5]: WebrpcBadResponseError, + [-6]: WebrpcServerPanicError, + [-7]: WebrpcInternalErrorError, + [-8]: WebrpcClientDisconnectedError, + [-9]: WebrpcStreamLostError, + [-10]: WebrpcStreamFinishedError, + [1000]: UnauthorizedError, + [1001]: PermissionDeniedError, + [1002]: SessionExpiredError, + [1003]: MethodNotFoundError, + [2000]: TimeoutError, + [2001]: InvalidArgumentError, + [3000]: NotFoundError, + [3001]: UserNotFoundError, + [3002]: ProjectNotFoundError, + [3003]: InvalidTierError, + [3005]: ProjectLimitReachedError, + [9999]: NotImplementedError, +} + +export type Fetch = (input: RequestInfo, init?: RequestInit) => Promise diff --git a/packages/services/marketplace/tsconfig.json b/packages/services/marketplace/tsconfig.json new file mode 100644 index 000000000..fed9c77b4 --- /dev/null +++ b/packages/services/marketplace/tsconfig.json @@ -0,0 +1,10 @@ +{ + "extends": "@repo/typescript-config/base.json", + "compilerOptions": { + "rootDir": "src", + "outDir": "dist", + "types": ["node"] + }, + "include": ["src"], + "exclude": ["node_modules", "dist"] +} diff --git a/packages/services/metadata/CHANGELOG.md b/packages/services/metadata/CHANGELOG.md new file mode 100644 index 000000000..b51ee450c --- /dev/null +++ b/packages/services/metadata/CHANGELOG.md @@ -0,0 +1,1789 @@ +# @0xsequence/metadata + +## 2.3.8 + +### Patch Changes + +- indexer: update clients + +## 2.3.7 + +### Patch Changes + +- Metadata updates + +## 2.3.6 + +### Patch Changes + +- New chains + +## 2.3.5 + +### Patch Changes + +- Add Frequency Testnet + +## 2.3.4 + +### Patch Changes + +- metadata: exclude deprecated methods on rpc client + +## 2.3.3 + +### Patch Changes + +- metadata: client update + +## 2.3.2 + +### Patch Changes + +- metadata: update rpc client + +## 2.3.1 + +### Patch Changes + +- indexer: update rpc client + +## 2.3.0 + +### Minor Changes + +- update metadata rpc client + +## 2.2.15 + +### Patch Changes + +- API updates + +## 2.2.14 + +### Patch Changes + +- Somnia Testnet and Monad Testnet + +## 2.2.13 + +### Patch Changes + +- Add XR1 to all networks + +## 2.2.12 + +### Patch Changes + +- Add XR1 + +## 2.2.11 + +### Patch Changes + +- Relayer updates + +## 2.2.10 + +### Patch Changes + +- Etherlink support + +## 2.2.9 + +### Patch Changes + +- Indexer gateway native token balances + +## 2.2.8 + +### Patch Changes + +- Add Moonbeam and Moonbase Alpha + +## 2.2.7 + +### Patch Changes + +- Update Builder package + +## 2.2.6 + +### Patch Changes + +- Update relayer package + +## 2.2.5 + +### Patch Changes + +- auth: fix sequence indexer gateway url +- account: immutable wallet proxy hook + +## 2.2.4 + +### Patch Changes + +- network: update soneium mainnet block explorer url +- waas: signTypedData intent support + +## 2.2.3 + +### Patch Changes + +- provider: updating initWallet to use connected network configs if they exist + +## 2.2.2 + +### Patch Changes + +- pass projectAccessKey to relayer at all times + +## 2.2.1 + +### Patch Changes + +- waas-ethers: sign typed data + +## 2.2.0 + +### Minor Changes + +- indexer: gateway client +- @0xsequence/builder +- upgrade puppeteer to v23.10.3 + +## 2.1.8 + +### Patch Changes + +- Add Soneium Mainnet + +## 2.1.7 + +### Patch Changes + +- guard: pass project access key to guard requests + +## 2.1.6 + +### Patch Changes + +- Add LAOS and Telos Testnet chains + +## 2.1.5 + +### Patch Changes + +- account: save presigned configuration with reference chain id 1 + +## 2.1.4 + +### Patch Changes + +- provider: pass projectAccessKey into MuxMessageProvider + +## 2.1.3 + +### Patch Changes + +- waas: time drift date fix due to strange browser quirk + +## 2.1.2 + +### Patch Changes + +- provider: export analytics correctly + +## 2.1.1 + +### Patch Changes + +- Add LAOS chain support + +## 2.1.0 + +### Minor Changes + +- account: forward project access key when estimating fees and sending transactions + +### Patch Changes + +- sessions: save signatures with reference chain id + +## 2.0.26 + +### Patch Changes + +- account: fix chain id comparison + +## 2.0.25 + +### Patch Changes + +- skale-nebula: deploy gas limit = 10m + +## 2.0.24 + +### Patch Changes + +- sessions: arweave: configurable gateway url +- waas: use /status to get time drift before sending any intents + +## 2.0.23 + +### Patch Changes + +- Add The Root Network support + +## 2.0.22 + +### Patch Changes + +- Add SKALE Nebula Mainnet support + +## 2.0.21 + +### Patch Changes + +- account: add publishWitnessFor + +## 2.0.20 + +### Patch Changes + +- upgrade deps, and improve waas session status handling + +## 2.0.19 + +### Patch Changes + +- Add Immutable zkEVM support + +## 2.0.18 + +### Patch Changes + +- waas: new contractCall transaction type +- sessions: add arweave owner + +## 2.0.17 + +### Patch Changes + +- update waas auth to clear session before signIn + +## 2.0.16 + +### Patch Changes + +- Removed Astar chains + +## 2.0.15 + +### Patch Changes + +- indexer: update bindings with token balance additions + +## 2.0.14 + +### Patch Changes + +- sessions: arweave config reader +- network: add b3 and apechain mainnet configs + +## 2.0.13 + +### Patch Changes + +- network: toy-testnet + +## 2.0.12 + +### Patch Changes + +- api: update bindings + +## 2.0.11 + +### Patch Changes + +- waas: intents test fix +- api: update bindings + +## 2.0.10 + +### Patch Changes + +- network: soneium minato testnet + +## 2.0.9 + +### Patch Changes + +- network: fix SKALE network name + +## 2.0.8 + +### Patch Changes + +- metadata: update bindings + +## 2.0.7 + +### Patch Changes + +- wallet request handler fix + +## 2.0.6 + +### Patch Changes + +- network: matic -> pol + +## 2.0.5 + +### Patch Changes + +- provider: update databeat to 0.9.2 + +## 2.0.4 + +### Patch Changes + +- network: add skale-nebula-testnet + +## 2.0.3 + +### Patch Changes + +- waas: check session status in SequenceWaaS.isSignedIn() + +## 2.0.2 + +### Patch Changes + +- sessions: property convert serialized bignumber hex value to bigint + +## 2.0.1 + +### Patch Changes + +- waas: http signature check for authenticator requests +- provider: unwrap legacy json rpc responses +- use json replacer and reviver for bigints + +## 2.0.0 + +### Major Changes + +- ethers v6 + +## 1.10.15 + +### Patch Changes + +- utils: extractProjectIdFromAccessKey + +## 1.10.14 + +### Patch Changes + +- network: add borne-testnet to allNetworks + +## 1.10.13 + +### Patch Changes + +- network: add borne testnet + +## 1.10.12 + +### Patch Changes + +- api: update bindings +- global/window -> globalThis + +## 1.10.11 + +### Patch Changes + +- waas: updated intent.gen without webrpc types, errors exported from authenticator.gen + +## 1.10.10 + +### Patch Changes + +- metadata: update bindings with new contract collections api + +## 1.10.9 + +### Patch Changes + +- waas minor update + +## 1.10.8 + +### Patch Changes + +- update metadata bindings + +## 1.10.7 + +### Patch Changes + +- minor fixes to waas client + +## 1.10.6 + +### Patch Changes + +- metadata: update bindings + +## 1.10.5 + +### Patch Changes + +- network: ape-chain-testnet -> apechain-testnet + +## 1.10.4 + +### Patch Changes + +- network: add b3-sepolia, ape-chain-testnet, blast, blast-sepolia + +## 1.10.3 + +### Patch Changes + +- typing fix + +## 1.10.2 + +### Patch Changes + +- - waas: add getIdToken method + - indexer: update api client + +## 1.10.1 + +### Patch Changes + +- metadata: update bindings + +## 1.10.0 + +### Minor Changes + +- waas release v1.3.0 + +## 1.9.37 + +### Patch Changes + +- network: adds nativeToken data to NetworkMetadata constants + +## 1.9.36 + +### Patch Changes + +- guard: export client + +## 1.9.35 + +### Patch Changes + +- guard: update bindings + +## 1.9.34 + +### Patch Changes + +- waas: always use lowercase email + +## 1.9.33 + +### Patch Changes + +- waas: umd build + +## 1.9.32 + +### Patch Changes + +- indexer: update bindings + +## 1.9.31 + +### Patch Changes + +- metadata: token directory changes + +## 1.9.30 + +### Patch Changes + +- update + +## 1.9.29 + +### Patch Changes + +- disable gnosis chain + +## 1.9.28 + +### Patch Changes + +- add utils/merkletree + +## 1.9.27 + +### Patch Changes + +- network: optimistic -> optimism +- waas: remove defaults +- api, sessions: update bindings + +## 1.9.26 + +### Patch Changes + +- - add backend interfaces for pluggable interfaces + - introduce @0xsequence/react-native + - update pnpm to lockfile v9 + +## 1.9.25 + +### Patch Changes + +- update webrpc clients with new error types + +## 1.9.24 + +### Patch Changes + +- waas: add memoryStore backend to localStore + +## 1.9.23 + +### Patch Changes + +- update api client bindings + +## 1.9.22 + +### Patch Changes + +- update metadata client bindings + +## 1.9.21 + +### Patch Changes + +- api client bindings + +## 1.9.20 + +### Patch Changes + +- api client bindings update + +## 1.9.19 + +### Patch Changes + +- waas update + +## 1.9.18 + +### Patch Changes + +- provider: prohibit dangerous functions + +## 1.9.17 + +### Patch Changes + +- network: add xr-sepolia + +## 1.9.16 + +### Patch Changes + +- waas: sequence.feeOptions + +## 1.9.15 + +### Patch Changes + +- metadata: collection external_link field name fix + +## 1.9.14 + +### Patch Changes + +- network: astar-zkatana -> astar-zkyoto +- network: deprecate polygon mumbai network +- network: add xai and polygon amoy + +## 1.9.13 + +### Patch Changes + +- waas: fix @0xsequence/network dependency + +## 1.9.12 + +### Patch Changes + +- indexer: update rpc bindings +- provider: signMessage: Serialize the BytesLike or string message into hexstring before sending +- waas: SessionAuthProof + +## 1.9.11 + +### Patch Changes + +- metdata, update rpc bindings + +## 1.9.10 + +### Patch Changes + +- update metadata rpc bindings + +## 1.9.9 + +### Patch Changes + +- metadata, add SequenceCollections rpc client + +## 1.9.8 + +### Patch Changes + +- waas client update + +## 1.9.7 + +### Patch Changes + +- update rpc client bindings for api, metadata and relayer + +## 1.9.6 + +### Patch Changes + +- waas package update + +## 1.9.5 + +### Patch Changes + +- RpcRelayer prioritize project access key + +## 1.9.4 + +### Patch Changes + +- waas: fix network dependency + +## 1.9.3 + +### Patch Changes + +- provider: don't append access key to RPC url if user has already provided it + +## 1.9.2 + +### Patch Changes + +- network: add xai-sepolia + +## 1.9.1 + +### Patch Changes + +- analytics fix + +## 1.9.0 + +### Minor Changes + +- waas release + +## 1.8.8 + +### Patch Changes + +- update metadata bindings + +## 1.8.7 + +### Patch Changes + +- provider: update databeat to 0.9.1 + +## 1.8.6 + +### Patch Changes + +- guard: SignedOwnershipProof + +## 1.8.5 + +### Patch Changes + +- guard: signOwnershipProof and isSignedOwnershipProof + +## 1.8.4 + +### Patch Changes + +- network: add homeverse to networks list + +## 1.8.3 + +### Patch Changes + +- api: introduce basic linked wallet support + +## 1.8.2 + +### Patch Changes + +- provider: don't initialize analytics unless explicitly requested + +## 1.8.1 + +### Patch Changes + +- update to analytics provider + +## 1.8.0 + +### Minor Changes + +- provider: project analytics + +## 1.7.2 + +### Patch Changes + +- 0xsequence: ChainId should not be exported as a type +- account, wallet: fix nonce selection + +## 1.7.1 + +### Patch Changes + +- network: add missing avalanche logoURI + +## 1.7.0 + +### Minor Changes + +- provider: projectAccessKey is now required + +### Patch Changes + +- network: add NetworkMetadata.logoURI property for all networks + +## 1.6.3 + +### Patch Changes + +- network list update + +## 1.6.2 + +### Patch Changes + +- auth: projectAccessKey option +- wallet: use 12 bytes for random space + +## 1.6.1 + +### Patch Changes + +- core: add simple config from subdigest support +- core: fix encode tree with subdigest +- account: implement buildOnChainSignature on Account + +## 1.6.0 + +### Minor Changes + +- account, wallet: parallel transactions by default + +### Patch Changes + +- provider: emit disconnect on sign out + +## 1.5.0 + +### Minor Changes + +- signhub: add 'signing' signer status + +### Patch Changes + +- auth: Session.open: onAccountAddress callback +- account: allow empty transaction bundles + +## 1.4.9 + +### Patch Changes + +- rename SequenceMetadataClient to SequenceMetadata + +## 1.4.8 + +### Patch Changes + +- account: Account.getSigners + +## 1.4.7 + +### Patch Changes + +- update indexer client bindings + +## 1.4.6 + +### Patch Changes + +- - add sepolia networks, mark goerli as deprecated + - update indexer client bindings + +## 1.4.5 + +### Patch Changes + +- indexer/metadata: update client bindings +- auth: selectWallet with new address + +## 1.4.4 + +### Patch Changes + +- indexer: update bindings +- auth: handle jwt expiry + +## 1.4.3 + +### Patch Changes + +- guard: return active status from GuardSigner.getAuthMethods + +## 1.4.2 + +### Patch Changes + +- guard: update bindings + +## 1.4.1 + +### Patch Changes + +- network: remove unused networks +- signhub: orchestrator interface +- guard: auth methods interface +- guard: update bindings for pin and totp +- guard: no more retry logic + +## 1.4.0 + +### Minor Changes + +- project access key support + +## 1.3.0 + +### Minor Changes + +- signhub: account children + +### Patch Changes + +- guard: do not throw when building deploy transaction +- network: snowtrace.io -> subnets.avax.network/c-chain + +## 1.2.9 + +### Patch Changes + +- account: AccountSigner.sendTransaction simulateForFeeOptions +- relayer: update bindings + +## 1.2.8 + +### Patch Changes + +- rename X-Sequence-Token-Key header to X-Access-Key + +## 1.2.7 + +### Patch Changes + +- add x-sequence-token-key to clients + +## 1.2.6 + +### Patch Changes + +- Fix bind multicall provider + +## 1.2.5 + +### Patch Changes + +- Multicall default configuration fixes + +## 1.2.4 + +### Patch Changes + +- provider: Adding missing payment provider types to PaymentProviderOption +- provider: WalletRequestHandler.notifyChainChanged + +## 1.2.3 + +### Patch Changes + +- auth, provider: connect to accept optional authorizeNonce + +## 1.2.2 + +### Patch Changes + +- provider: allow createContract calls +- core: check for explicit zero address in contract deployments + +## 1.2.1 + +### Patch Changes + +- auth: use sequence api chain id as reference chain id if available + +## 1.2.0 + +### Minor Changes + +- split services from session, better local support + +## 1.1.15 + +### Patch Changes + +- guard: remove error filtering + +## 1.1.14 + +### Patch Changes + +- guard: add GuardSigner.onError + +## 1.1.13 + +### Patch Changes + +- provider: pass client version with connect options +- provider: removing large from BannerSize + +## 1.1.12 + +### Patch Changes + +- provider: adding bannerSize to ConnectOptions + +## 1.1.11 + +### Patch Changes + +- add homeverse configs + +## 1.1.10 + +### Patch Changes + +- handle default EIP6492 on send + +## 1.1.9 + +### Patch Changes + +- Custom default EIP6492 on client + +## 1.1.8 + +### Patch Changes + +- metadata: searchMetadata: add types filter + +## 1.1.7 + +### Patch Changes + +- adding signInWith connect settings option to allow dapps to automatically login their users with a certain provider optimizing the normal authentication flow + +## 1.1.6 + +### Patch Changes + +- metadata: searchMetadata: add chainID and excludeTokenMetadata filters + +## 1.1.5 + +### Patch Changes + +- account: re-compute meta-transaction id for wallet deployment transactions + +## 1.1.4 + +### Patch Changes + +- network: rename base-mainnet to base +- provider: override isDefaultChain with ConnectOptions.networkId if provided + +## 1.1.3 + +### Patch Changes + +- provider: use network id from transport session +- provider: sign authorization using ConnectOptions.networkId if provided + +## 1.1.2 + +### Patch Changes + +- provider: jsonrpc chain id fixes + +## 1.1.1 + +### Patch Changes + +- network: add base mainnet and sepolia +- provider: reject toxic transaction requests + +## 1.1.0 + +### Minor Changes + +- Refactor dapp facing provider + +## 1.0.5 + +### Patch Changes + +- network: export network constants +- guard: use the correct global for fetch +- network: nova-explorer.arbitrum.io -> nova.arbiscan.io + +## 1.0.4 + +### Patch Changes + +- provider: accept name or number for networkId + +## 1.0.3 + +### Patch Changes + +- Simpler isValidSignature helpers + +## 1.0.2 + +### Patch Changes + +- add extra signature validation utils methods + +## 1.0.1 + +### Patch Changes + +- add homeverse testnet + +## 1.0.0 + +### Major Changes + +- https://sequence.xyz/blog/sequence-wallet-light-state-sync-full-merkle-wallets + +## 0.43.34 + +### Patch Changes + +- auth: no jwt for indexer + +## 0.43.33 + +### Patch Changes + +- Adding onConnectOptionsChange handler to WalletRequestHandler + +## 0.43.32 + +### Patch Changes + +- add Base Goerli network + +## 0.43.31 + +### Patch Changes + +- remove AuxDataProvider, add promptSignInConnect + +## 0.43.30 + +### Patch Changes + +- add arbitrum goerli testnet + +## 0.43.29 + +### Patch Changes + +- provider: check availability of window object + +## 0.43.28 + +### Patch Changes + +- update api bindings + +## 0.43.27 + +### Patch Changes + +- Add rpc is sequence method + +## 0.43.26 + +### Patch Changes + +- add zkevm url to enum + +## 0.43.25 + +### Patch Changes + +- added polygon zkevm to mainnet networks + +## 0.43.24 + +### Patch Changes + +- name change from zkevm to polygon-zkevm + +## 0.43.23 + +### Patch Changes + +- update zkEVM name to Polygon zkEVM + +## 0.43.22 + +### Patch Changes + +- add zkevm chain + +## 0.43.21 + +### Patch Changes + +- api: update client bindings + +## 0.43.20 + +### Patch Changes + +- indexer: update bindings + +## 0.43.19 + +### Patch Changes + +- session proof update + +## 0.43.18 + +### Patch Changes + +- rpc client global check, hardening + +## 0.43.17 + +### Patch Changes + +- rpc clients, check of 'global' is defined + +## 0.43.16 + +### Patch Changes + +- ethers peerDep to v5, update rpc client global use + +## 0.43.15 + +### Patch Changes + +- - provider: expand receiver type on some util methods + +## 0.43.14 + +### Patch Changes + +- bump + +## 0.43.13 + +### Patch Changes + +- update rpc bindings + +## 0.43.12 + +### Patch Changes + +- provider: single wallet init, and add new unregisterWallet() method + +## 0.43.11 + +### Patch Changes + +- fix lockfiles +- re-add mocha type deleter + +## 0.43.10 + +### Patch Changes + +- various improvements + +## 0.43.9 + +### Patch Changes + +- update deps + +## 0.43.8 + +### Patch Changes + +- network: JsonRpcProvider with caching + +## 0.43.7 + +### Patch Changes + +- provider: fix wallet network init + +## 0.43.6 + +### Patch Changes + +- metadatata: update rpc bindings + +## 0.43.5 + +### Patch Changes + +- provider: do not set default network for connect messages +- provider: forward missing error message + +## 0.43.4 + +### Patch Changes + +- no-change version bump to fix incorrectly tagged snapshot build + +## 0.43.3 + +### Patch Changes + +- metadata: update bindings + +## 0.43.2 + +### Patch Changes + +- provider: implement connectUnchecked + +## 0.43.1 + +### Patch Changes + +- update to latest ethauth dep + +## 0.43.0 + +### Minor Changes + +- move ethers to a peer dependency + +## 0.42.10 + +### Patch Changes + +- add auxDataProvider + +## 0.42.9 + +### Patch Changes + +- provider: add eip-191 exceptions + +## 0.42.8 + +### Patch Changes + +- provider: skip setting intent origin if we're unity plugin + +## 0.42.7 + +### Patch Changes + +- Add sign in options to connection settings + +## 0.42.6 + +### Patch Changes + +- api bindings update + +## 0.42.5 + +### Patch Changes + +- relayer: don't treat missing receipt as hard failure + +## 0.42.4 + +### Patch Changes + +- provider: add custom app protocol to connect options + +## 0.42.3 + +### Patch Changes + +- update api bindings + +## 0.42.2 + +### Patch Changes + +- disable rinkeby network + +## 0.42.1 + +### Patch Changes + +- wallet: optional waitForReceipt parameter + +## 0.42.0 + +### Minor Changes + +- relayer: estimateGasLimits -> simulate +- add simulator package + +### Patch Changes + +- transactions: fix flattenAuxTransactions +- provider: only filter nullish values +- provider: re-map transaction 'gas' back to 'gasLimit' + +## 0.41.3 + +### Patch Changes + +- api bindings update + +## 0.41.2 + +### Patch Changes + +- api bindings update + +## 0.41.1 + +### Patch Changes + +- update default networks + +## 0.41.0 + +### Minor Changes + +- relayer: fix Relayer.wait() interface + + The interface for calling Relayer.wait() has changed. Instead of a single optional ill-defined timeout/delay parameter, there are three optional parameters, in order: + + - timeout: the maximum time to wait for the transaction receipt + - delay: the polling interval, i.e. the time to wait between requests + - maxFails: the maximum number of hard failures to tolerate before giving up + + Please update your codebase accordingly. + +- relayer: add optional waitForReceipt parameter to Relayer.relay + + The behaviour of Relayer.relay() was not well-defined with respect to whether or not it waited for a receipt. + This change allows the caller to specify whether to wait or not, with the default behaviour being to wait. + +### Patch Changes + +- relayer: wait receipt retry logic +- fix wrapped object error +- provider: forward delegateCall and revertOnError transaction fields + +## 0.40.6 + +### Patch Changes + +- add arbitrum-nova chain + +## 0.40.5 + +### Patch Changes + +- api: update bindings + +## 0.40.4 + +### Patch Changes + +- add unreal transport + +## 0.40.3 + +### Patch Changes + +- provider: fix MessageToSign message type + +## 0.40.2 + +### Patch Changes + +- Wallet provider, loadSession method + +## 0.40.1 + +### Patch Changes + +- export sequence.initWallet and sequence.getWallet + +## 0.40.0 + +### Minor Changes + +- add sequence.initWallet(network, config) and sequence.getWallet() helper methods + +## 0.39.6 + +### Patch Changes + +- indexer: update client bindings + +## 0.39.5 + +### Patch Changes + +- provider: fix networkRpcUrl config option + +## 0.39.4 + +### Patch Changes + +- api: update client bindings + +## 0.39.3 + +### Patch Changes + +- add request method on Web3Provider + +## 0.39.2 + +### Patch Changes + +- update umd name + +## 0.39.1 + +### Patch Changes + +- add Aurora network +- add origin info for accountsChanged event to handle it per dapp + +## 0.39.0 + +### Minor Changes + +- abstract window.localStorage to interface type + +## 0.38.2 + +### Patch Changes + +- provider: add Settings.defaultPurchaseAmount + +## 0.38.1 + +### Patch Changes + +- update api and metadata rpc bindings + +## 0.38.0 + +### Minor Changes + +- api: update bindings, change TokenPrice interface +- bridge: remove @0xsequence/bridge package +- api: update bindings, rename ContractCallArg to TupleComponent + +## 0.37.1 + +### Patch Changes + +- Add back sortNetworks - Removing sorting was a breaking change for dapps on older versions which directly integrate sequence. + +## 0.37.0 + +### Minor Changes + +- network related fixes and improvements +- api: bindings: exchange rate lookups + +## 0.36.13 + +### Patch Changes + +- api: update bindings with new price endpoints + +## 0.36.12 + +### Patch Changes + +- wallet: skip remote signers if not needed +- auth: check that signature meets threshold before requesting auth token + +## 0.36.11 + +### Patch Changes + +- Prefix EIP191 message on wallet-request-handler + +## 0.36.10 + +### Patch Changes + +- support bannerUrl on connect + +## 0.36.9 + +### Patch Changes + +- minor dev xp improvements + +## 0.36.8 + +### Patch Changes + +- more connect options (theme, payment providers, funding currencies) + +## 0.36.7 + +### Patch Changes + +- fix missing break + +## 0.36.6 + +### Patch Changes + +- wallet_switchEthereumChain support + +## 0.36.5 + +### Patch Changes + +- auth: bump ethauth to 0.7.0 + network, wallet: don't assume position of auth network in list + api/indexer/metadata: trim trailing slash on hostname, and add endpoint urls + relayer: Allow to specify local relayer transaction parameters like gas price or gas limit + +## 0.36.4 + +### Patch Changes + +- Updating list of chain ids to include other ethereum compatible chains + +## 0.36.3 + +### Patch Changes + +- provider: pass connect options to prompter methods + +## 0.36.2 + +### Patch Changes + +- transactions: Setting target to 0x0 when empty to during SequenceTxAbiEncode + +## 0.36.1 + +### Patch Changes + +- metadata: update client with more fields + +## 0.36.0 + +### Minor Changes + +- relayer, wallet: fee quote support + +## 0.35.12 + +### Patch Changes + +- provider: rename wallet.commands to wallet.utils + +## 0.35.11 + +### Patch Changes + +- provider/utils: smoother message validation + +## 0.35.10 + +### Patch Changes + +- upgrade deps + +## 0.35.9 + +### Patch Changes + +- provider: window-transport override event handlers with new wallet instance + +## 0.35.8 + +### Patch Changes + +- provider: async wallet sign in improvements + +## 0.35.7 + +### Patch Changes + +- config: cache wallet configs + +## 0.35.6 + +### Patch Changes + +- provider: support async signin of wallet request handler + +## 0.35.5 + +### Patch Changes + +- wallet: skip threshold check during fee estimation + +## 0.35.4 + +### Patch Changes + +- - browser extension mode, center window + +## 0.35.3 + +### Patch Changes + +- - update window position when in browser extension mode + +## 0.35.2 + +### Patch Changes + +- - provider: WindowMessageHandler accept optional windowHref + +## 0.35.1 + +### Patch Changes + +- wallet: update config on undeployed too + +## 0.35.0 + +### Minor Changes + +- - config: add buildStubSignature + - provider: add checks to signing cases for wallet deployment and config statuses + - provider: add prompt for wallet deployment + - relayer: add BaseRelayer.prependWalletDeploy + - relayer: add Relayer.feeOptions + - relayer: account for wallet deployment in fee estimation + - transactions: add fromTransactionish + - wallet: add Account.prependConfigUpdate + - wallet: add Account.getFeeOptions + +## 0.34.0 + +### Minor Changes + +- - upgrade deps + +## 0.31.3 + +### Patch Changes + +- update metadata bindings + +## 0.31.0 + +### Minor Changes + +- - upgrading to ethers v5.5 + +## 0.30.0 + +### Minor Changes + +- - upgrade most deps + +## 0.29.8 + +### Patch Changes + +- update api + +## 0.29.1 + +### Patch Changes + +- metadata: ContractInfo.decimals is now optional, i.e. may be undefined + + api: new APIs for user storage and isUsingGoogleMail + +## 0.29.0 + +### Minor Changes + +- major architectural changes in Sequence design + + - only one API instance, API is no longer a per-chain service + - separate per-chain indexer service, API no longer handles indexing + - single contract metadata service, API no longer serves metadata + + chaind package has been removed, indexer and metadata packages have been added + + stronger typing with new explicit ChainId type + + multicall fixes and improvements + + forbid "wait" transactions in sendTransactionBatch calls diff --git a/packages/services/metadata/README.md b/packages/services/metadata/README.md new file mode 100644 index 000000000..ab2b0b9ea --- /dev/null +++ b/packages/services/metadata/README.md @@ -0,0 +1,3 @@ +# @0xsequence/metadata + +See [0xsequence project page](https://github.com/0xsequence/sequence.js). diff --git a/packages/services/metadata/package.json b/packages/services/metadata/package.json new file mode 100644 index 000000000..cb93be546 --- /dev/null +++ b/packages/services/metadata/package.json @@ -0,0 +1,27 @@ +{ + "name": "@0xsequence/metadata", + "version": "3.0.0", + "description": "metadata sub-package for Sequence", + "repository": "https://github.com/0xsequence/sequence.js/tree/master/packages/metadata", + "author": "Sequence Platforms Inc.", + "license": "Apache-2.0", + "scripts": { + "build": "tsc", + "dev": "tsc --watch", + "test": "echo", + "typecheck": "tsc --noEmit" + }, + "exports": { + ".": { + "types": "./src/index.ts", + "default": "./dist/index.js" + } + }, + "peerDependencies": {}, + "devDependencies": { + "@repo/typescript-config": "workspace:^", + "@types/node": "^22.13.9", + "typescript": "^5.7.3" + }, + "dependencies": {} +} diff --git a/packages/services/metadata/src/index.ts b/packages/services/metadata/src/index.ts new file mode 100644 index 000000000..8c620b424 --- /dev/null +++ b/packages/services/metadata/src/index.ts @@ -0,0 +1,66 @@ +export * from './metadata.gen' + +import { Metadata as MetadataRpc, Collections as CollectionsRpc } from './metadata.gen' + +export class SequenceMetadata extends MetadataRpc { + constructor( + hostname: string = 'https://metadata.sequence.app', + public projectAccessKey?: string, + public jwtAuth?: string, + ) { + super(hostname.endsWith('/') ? hostname.slice(0, -1) : hostname, fetch) + this.fetch = this._fetch + } + + _fetch = (input: RequestInfo, init?: RequestInit): Promise => { + // automatically include jwt and access key auth header to requests + // if its been set on the client + const headers: { [key: string]: any } = {} + + const jwtAuth = this.jwtAuth + const projectAccessKey = this.projectAccessKey + + if (jwtAuth && jwtAuth.length > 0) { + headers['Authorization'] = `BEARER ${jwtAuth}` + } + + if (projectAccessKey && projectAccessKey.length > 0) { + headers['X-Access-Key'] = projectAccessKey + } + + // before the request is made + init!.headers = { ...init!.headers, ...headers } + + return fetch(input, init) + } +} + +export class SequenceCollections extends CollectionsRpc { + constructor( + hostname: string = 'https://metadata.sequence.app', + public jwtAuth?: string, + ) { + super(hostname.endsWith('/') ? hostname.slice(0, -1) : hostname, fetch) + this.fetch = this._fetch + } + + _fetch = (input: RequestInfo, init?: RequestInit): Promise => { + // automatically include jwt auth header to requests + // if its been set on the client + const headers: { [key: string]: any } = {} + + const jwtAuth = this.jwtAuth + + if (jwtAuth && jwtAuth.length > 0) { + headers['Authorization'] = `BEARER ${jwtAuth}` + } + + // before the request is made + init!.headers = { ...init!.headers, ...headers } + + return fetch(input, init) + } + + // TODO: add uploadAsset() method similar to, + // https://github.com/0xsequence/go-sequence/blob/master/metadata/collections.go#L52 +} diff --git a/packages/services/metadata/src/metadata.gen.ts b/packages/services/metadata/src/metadata.gen.ts new file mode 100644 index 000000000..05cdfb194 --- /dev/null +++ b/packages/services/metadata/src/metadata.gen.ts @@ -0,0 +1,2818 @@ +/* eslint-disable */ +// sequence-metadata v0.4.0 5cb74ff169ce80c2e42e65d6bbc98b1daaa0945f +// -- +// Code generated by webrpc-gen@v0.25.3 with typescript generator. DO NOT EDIT. +// +// webrpc-gen -schema=metadata.ridl -target=typescript -client -ignore=@deprecated -out=./clients/metadata.gen.ts + +export const WebrpcHeader = 'Webrpc' + +export const WebrpcHeaderValue = 'webrpc@v0.25.3;gen-typescript@v0.17.0;sequence-metadata@v0.4.0' + +// WebRPC description and code-gen version +export const WebRPCVersion = 'v1' + +// Schema version of your RIDL schema +export const WebRPCSchemaVersion = 'v0.4.0' + +// Schema hash generated from your RIDL schema +export const WebRPCSchemaHash = '5cb74ff169ce80c2e42e65d6bbc98b1daaa0945f' + +type WebrpcGenVersions = { + webrpcGenVersion: string + codeGenName: string + codeGenVersion: string + schemaName: string + schemaVersion: string +} + +export function VersionFromHeader(headers: Headers): WebrpcGenVersions { + const headerValue = headers.get(WebrpcHeader) + if (!headerValue) { + return { + webrpcGenVersion: '', + codeGenName: '', + codeGenVersion: '', + schemaName: '', + schemaVersion: '', + } + } + + return parseWebrpcGenVersions(headerValue) +} + +function parseWebrpcGenVersions(header: string): WebrpcGenVersions { + const versions = header.split(';') + if (versions.length < 3) { + return { + webrpcGenVersion: '', + codeGenName: '', + codeGenVersion: '', + schemaName: '', + schemaVersion: '', + } + } + + const [_, webrpcGenVersion] = versions[0]!.split('@') + const [codeGenName, codeGenVersion] = versions[1]!.split('@') + const [schemaName, schemaVersion] = versions[2]!.split('@') + + return { + webrpcGenVersion: webrpcGenVersion ?? '', + codeGenName: codeGenName ?? '', + codeGenVersion: codeGenVersion ?? '', + schemaName: schemaName ?? '', + schemaVersion: schemaVersion ?? '', + } +} + +// +// Types +// + +export enum ContractType { + UNKNOWN = 'UNKNOWN', + ERC20 = 'ERC20', + ERC721 = 'ERC721', + ERC1155 = 'ERC1155', + ERC6909 = 'ERC6909', + MISC = 'MISC', +} + +export enum Source { + UNKNOWN = 'UNKNOWN', + FETCHER = 'FETCHER', + FETCHER_OPENSEA_API = 'FETCHER_OPENSEA_API', + FETCHER_ENS_API = 'FETCHER_ENS_API', + FETCHER_ON_CHAIN_ERC20_INTERFACE = 'FETCHER_ON_CHAIN_ERC20_INTERFACE', + FETCHER_ON_CHAIN_TOKEN_URI = 'FETCHER_ON_CHAIN_TOKEN_URI', + FETCHER_ON_CHAIN_CONTRACT_URI = 'FETCHER_ON_CHAIN_CONTRACT_URI', + FETCHER_TOKEN_DIRECTORY_ADMIN = 'FETCHER_TOKEN_DIRECTORY_ADMIN', + TOKEN_DIRECTORY = 'TOKEN_DIRECTORY', + TOKEN_DIRECTORY_PUBLIC_TOKEN_LIST = 'TOKEN_DIRECTORY_PUBLIC_TOKEN_LIST', + TOKEN_DIRECTORY_3RD_PARTY = 'TOKEN_DIRECTORY_3RD_PARTY', + TOKEN_DIRECTORY_SEQUENCE_GITHUB = 'TOKEN_DIRECTORY_SEQUENCE_GITHUB', + TOKEN_DIRECTORY_SEQUENCE_BUILDER = 'TOKEN_DIRECTORY_SEQUENCE_BUILDER', + SEQUENCE_BUILDER = 'SEQUENCE_BUILDER', + SEQUENCE_BUILDER_DEPLOYED = 'SEQUENCE_BUILDER_DEPLOYED', + SEQUENCE_BUILDER_COLLECTIONS = 'SEQUENCE_BUILDER_COLLECTIONS', + SEQUENCE_BUILDER_ADMIN = 'SEQUENCE_BUILDER_ADMIN', +} + +export enum ResourceStatus { + NOT_AVAILABLE = 'NOT_AVAILABLE', + REFRESHING = 'REFRESHING', + AVAILABLE = 'AVAILABLE', +} + +export enum PropertyType { + INT = 'INT', + STRING = 'STRING', + ARRAY = 'ARRAY', + GENERIC = 'GENERIC', +} + +export enum SwapType { + UNKNOWN = 'UNKNOWN', + BUY = 'BUY', + SELL = 'SELL', +} + +export enum TaskStatus { + QUEUED = 'QUEUED', + PAUSED = 'PAUSED', + FAILED = 'FAILED', + DONE = 'DONE', +} + +export interface Version { + webrpcVersion: string + schemaVersion: string + schemaHash: string + appVersion: string +} + +export interface RuntimeStatus { + healthOK: boolean + startTime: string + uptime: number + uptimeString: string + ver: string + branch: string + commitHash: string + runnable: { [key: string]: RunnableStatus } +} + +export interface RunnableStatus { + running: boolean + restarts: number + startTime: string + endTime?: string + lastError: any +} + +export interface ContractIndex { + chainId: number + address: string + type: ContractType + source: Source + metadata: { [key: string]: any } + contentHash: number + deployed: boolean + bytecodeHash: string + notFound: boolean + updatedAt: string + queuedAt?: string + status: ResourceStatus +} + +export interface TokenIndex { + chainId: number + contractAddress: string + tokenId: string + source: Source + metadata: { [key: string]: any } + notFound?: boolean + lastFetched?: string + fetchCount?: number + updatedAt: string + queuedAt?: string +} + +export interface ContractInfo { + chainId: number + address: string + source: string + name: string + type: string + symbol: string + decimals?: number + logoURI: string + deployed: boolean + bytecodeHash: string + extensions: ContractInfoExtensions + updatedAt: string + queuedAt?: string + status: ResourceStatus +} + +export interface ContractInfoExtensions { + link?: string + description?: string + categories?: Array + bridgeInfo?: { [key: string]: ContractInfoExtensionBridgeInfo } + ogImage?: string + ogName?: string + originChainId?: number + originAddress?: string + blacklist?: boolean + verified?: boolean + verifiedBy?: string + featured?: boolean + featureIndex?: number +} + +export interface ContractInfoExtensionBridgeInfo { + tokenAddress: string +} + +export interface ContractInfoOverride { + name?: string + type?: string + symbol?: string + decimals?: number + logoURI?: string + extensions: ContractInfoExtensionsOverride +} + +export interface ContractInfoExtensionsOverride { + link?: string + description?: string + categories?: Array + ogImage?: string + ogName?: string + originChainId?: number + originAddress?: string + blacklist?: boolean + verified?: boolean + verifiedBy?: string + featureIndex?: number +} + +export interface TokenMetadata { + chainId?: number + contractAddress?: string + tokenId: string + source: string + name: string + description?: string + image?: string + video?: string + audio?: string + properties?: { [key: string]: any } + attributes: Array<{ [key: string]: any }> + image_data?: string + external_url?: string + background_color?: string + animation_url?: string + decimals?: number + updatedAt?: string + assets?: Array + status: ResourceStatus + queuedAt?: string + lastFetched?: string +} + +export interface PropertyFilter { + name: string + type: PropertyType + min?: number + max?: number + values?: Array +} + +export interface Filter { + text?: string + properties?: Array +} + +export interface Collection { + id: number + projectId: number + metadata: CollectionMetadata + private: boolean + revealKey?: string + tokenCount?: number + createdAt?: string + updatedAt?: string + deletedAt?: string + baseURIs?: CollectionBaseURIs + assets?: Array +} + +export interface CollectionMetadata { + name: string + description?: string + image?: string + external_link?: string + properties?: { [key: string]: any } + attributes?: Array<{ [key: string]: any }> +} + +export interface CollectionBaseURIs { + contractMetadataURI: string + tokenMetadataURI: string +} + +export interface ContractCollection { + id: number + chainId: number + contractAddress: string + collectionId: number +} + +export interface Asset { + id: number + collectionId: number + tokenId?: string + url?: string + metadataField: string + name?: string + filesize?: number + mimeType?: string + width?: number + height?: number + updatedAt?: string +} + +export interface Token { + collectionId: number + tokenId: string + metadata: TokenMetadata + private: boolean + updatedAt?: string +} + +export interface GetNiftyswapUnitPricesRequest { + swapType: SwapType + ids: Array + amounts: Array +} + +export interface GetNiftyswapUnitPricesResponse { + unitPrice: string + unitAmount: string + availableAmount: string +} + +export interface Page { + page?: number + column?: string + before?: any + after?: any + pageSize?: number + more?: boolean +} + +export interface Task { + id: number + queue: string + status: TaskStatus + try: number + runAt?: string + lastRanAt?: string + createdAt?: string + payload: Array + result: Array +} + +export interface Metadata { + ping(headers?: object, signal?: AbortSignal): Promise + version(headers?: object, signal?: AbortSignal): Promise + runtimeStatus(headers?: object, signal?: AbortSignal): Promise + getTask(args: GetTaskArgs, headers?: object, signal?: AbortSignal): Promise + getTaskStatus(args: GetTaskStatusArgs, headers?: object, signal?: AbortSignal): Promise + /** + * Contract Info -- returns contract meta-info for contracts found in registered chain's token-lists + */ + getContractInfo(args: GetContractInfoArgs, headers?: object, signal?: AbortSignal): Promise + getContractInfoBatch( + args: GetContractInfoBatchArgs, + headers?: object, + signal?: AbortSignal, + ): Promise + /** + * Find Contract Info across all chains token-lists. Similar to GetContractInfo above, + * but it will traverse all chains and results from all. + */ + findContractInfo(args: FindContractInfoArgs, headers?: object, signal?: AbortSignal): Promise + /** + * map of contractAddress :: []ContractInfo + */ + findContractInfoBatch( + args: FindContractInfoBatchArgs, + headers?: object, + signal?: AbortSignal, + ): Promise + /** + * Refresh Contract Info -- refresh contract meta-info + */ + refreshContractInfo( + args: RefreshContractInfoArgs, + headers?: object, + signal?: AbortSignal, + ): Promise + refreshContractInfoBatch( + args: RefreshContractInfoBatchArgs, + headers?: object, + signal?: AbortSignal, + ): Promise + /** + * Search for contract infos using a query string + */ + searchContractsByQuery( + args: SearchContractsByQueryArgs, + headers?: object, + signal?: AbortSignal, + ): Promise + /** + * GetTokenMetadata - fetch token metadata for a particular contract and respective tokenIDs + */ + getTokenMetadata(args: GetTokenMetadataArgs, headers?: object, signal?: AbortSignal): Promise + /** + * GetTokenMetadataBatch allows you to query the token metadata of a batch of contracts and respective tokenIDs + * where map is contractAddress::[]tokenID => contractAddress::[]TokenMetadata + * + * Note, we limit each request to 50 contracts max and 50 tokens max per contract. + */ + getTokenMetadataBatch( + args: GetTokenMetadataBatchArgs, + headers?: object, + signal?: AbortSignal, + ): Promise + /** + * RefreshTokenMetadata allows you to refresh a contract metadata for contract-level and token-level metadata. + */ + refreshTokenMetadata( + args: RefreshTokenMetadataArgs, + headers?: object, + signal?: AbortSignal, + ): Promise + /** + * Search ERC721 & ERC1155 token metadata by query string 'q' + */ + searchTokenMetadataByQuery( + args: SearchTokenMetadataByQueryArgs, + headers?: object, + signal?: AbortSignal, + ): Promise + /** + * Search ERC721 & ERC1155 token metadata by filter object 'filter' + * which allows to search by text or properties. + */ + searchTokenMetadata( + args: SearchTokenMetadataArgs, + headers?: object, + signal?: AbortSignal, + ): Promise + /** + * Search ERC721 & ERC1155 for token IDs by filter object 'filter' + * which allows to search by text or properties. + */ + searchTokenMetadataTokenIDs( + args: SearchTokenMetadataTokenIDsArgs, + headers?: object, + signal?: AbortSignal, + ): Promise + /** + * Get token metadata property filters for a contract address + */ + getTokenMetadataPropertyFilters( + args: GetTokenMetadataPropertyFiltersArgs, + headers?: object, + signal?: AbortSignal, + ): Promise + /** + * Gets Token Directory supported networks + */ + getTokenDirectoryNetworks( + args: GetTokenDirectoryNetworksArgs, + headers?: object, + signal?: AbortSignal, + ): Promise + /** + * Gets Token Directory entries + */ + getTokenDirectory( + args: GetTokenDirectoryArgs, + headers?: object, + signal?: AbortSignal, + ): Promise + /** + * Search in Token Directory + */ + searchTokenDirectory( + args: SearchTokenDirectoryArgs, + headers?: object, + signal?: AbortSignal, + ): Promise + /** + * Niftyswap querying data + */ + getNiftyswapTokenQuantity( + args: GetNiftyswapTokenQuantityArgs, + headers?: object, + signal?: AbortSignal, + ): Promise + /** + * map of tokenID :: quantity + */ + getNiftyswapUnitPrices( + args: GetNiftyswapUnitPricesArgs, + headers?: object, + signal?: AbortSignal, + ): Promise + /** + * map of tokenID :: price + */ + getNiftyswapUnitPricesWithQuantities( + args: GetNiftyswapUnitPricesWithQuantitiesArgs, + headers?: object, + signal?: AbortSignal, + ): Promise +} + +export interface PingArgs {} + +export interface PingReturn { + status: boolean +} +export interface VersionArgs {} + +export interface VersionReturn { + version: Version +} +export interface RuntimeStatusArgs {} + +export interface RuntimeStatusReturn { + status: RuntimeStatus +} +export interface GetTaskArgs { + taskId: number +} + +export interface GetTaskReturn { + task: Task +} +export interface GetTaskStatusArgs { + taskId: number +} + +export interface GetTaskStatusReturn { + status?: TaskStatus +} +export interface GetContractInfoArgs { + chainID: string + contractAddress: string +} + +export interface GetContractInfoReturn { + contractInfo: ContractInfo + taskID?: number +} +export interface GetContractInfoBatchArgs { + chainID: string + contractAddresses: Array +} + +export interface GetContractInfoBatchReturn { + contractInfoMap: { [key: string]: ContractInfo } + taskID?: number +} +export interface FindContractInfoArgs { + contractAddress: string +} + +export interface FindContractInfoReturn { + contractInfoList: Array +} +export interface FindContractInfoBatchArgs { + contractAddresses: Array +} + +export interface FindContractInfoBatchReturn { + contractInfoByChain: { [key: string]: Array } +} +export interface RefreshContractInfoArgs { + chainID: string + contractAddress: string +} + +export interface RefreshContractInfoReturn { + taskID?: number +} +export interface RefreshContractInfoBatchArgs { + chainID: string + contractAddresses: Array +} + +export interface RefreshContractInfoBatchReturn { + taskID?: number +} +export interface SearchContractsByQueryArgs { + q: string + chainID?: string + chainIDs?: Array + types?: Array + page?: Page +} + +export interface SearchContractsByQueryReturn { + contractInfo: Array + nextPage: Page +} +export interface GetTokenMetadataArgs { + chainID: string + contractAddress: string + tokenIDs: Array +} + +export interface GetTokenMetadataReturn { + tokenMetadata: Array + taskID?: number +} +export interface GetTokenMetadataBatchArgs { + chainID: string + contractTokenMap: { [key: string]: Array } +} + +export interface GetTokenMetadataBatchReturn { + contractTokenMetadata: { [key: string]: Array } + taskID?: number +} +export interface RefreshTokenMetadataArgs { + chainID: string + contractAddress: string + tokenIDs?: Array + refreshAll?: boolean +} + +export interface RefreshTokenMetadataReturn { + taskID: number +} +export interface SearchTokenMetadataByQueryArgs { + q: string + chainID?: string + contractAddress?: string + page?: Page +} + +export interface SearchTokenMetadataByQueryReturn { + tokenMetadata: Array + nextPage: Page +} +export interface SearchTokenMetadataArgs { + chainID: string + contractAddress: string + filter: Filter + page?: Page +} + +export interface SearchTokenMetadataReturn { + page: Page + tokenMetadata: Array +} +export interface SearchTokenMetadataTokenIDsArgs { + chainID: string + contractAddress: string + filter: Filter + page?: Page +} + +export interface SearchTokenMetadataTokenIDsReturn { + page: Page + tokenIDs: Array +} +export interface GetTokenMetadataPropertyFiltersArgs { + chainID: string + contractAddress: string + excludeProperties: Array + excludePropertyValues?: boolean +} + +export interface GetTokenMetadataPropertyFiltersReturn { + filters: Array +} +export interface GetTokenDirectoryNetworksArgs { + includeTestnets?: boolean + onlyFeatured?: boolean +} + +export interface GetTokenDirectoryNetworksReturn { + chainIDs: Array + networks: Array +} +export interface GetTokenDirectoryArgs { + chainID?: string + includeTestnets?: boolean + onlyFeatured?: boolean + page?: Page +} + +export interface GetTokenDirectoryReturn { + contracts: Array + page: Page +} +export interface SearchTokenDirectoryArgs { + query: string + chainID?: number + includeTestnets?: boolean + onlyFeatured?: boolean + page?: Page +} + +export interface SearchTokenDirectoryReturn { + contracts: Array + page: Page +} +export interface GetNiftyswapTokenQuantityArgs { + chainID: string + contractAddress: string + tokenIDs: Array +} + +export interface GetNiftyswapTokenQuantityReturn { + quantity: { [key: string]: string } +} +export interface GetNiftyswapUnitPricesArgs { + chainID: string + contractAddress: string + req: GetNiftyswapUnitPricesRequest + fresh: boolean +} + +export interface GetNiftyswapUnitPricesReturn { + prices: { [key: string]: string } +} +export interface GetNiftyswapUnitPricesWithQuantitiesArgs { + chainID: string + contractAddress: string + req: GetNiftyswapUnitPricesRequest + fresh: boolean +} + +export interface GetNiftyswapUnitPricesWithQuantitiesReturn { + prices: { [key: string]: GetNiftyswapUnitPricesResponse } +} + +export interface Collections { + createCollection(args: CreateCollectionArgs, headers?: object, signal?: AbortSignal): Promise + getCollection(args: GetCollectionArgs, headers?: object, signal?: AbortSignal): Promise + listCollections(args: ListCollectionsArgs, headers?: object, signal?: AbortSignal): Promise + updateCollection(args: UpdateCollectionArgs, headers?: object, signal?: AbortSignal): Promise + deleteCollection(args: DeleteCollectionArgs, headers?: object, signal?: AbortSignal): Promise + publishCollection( + args: PublishCollectionArgs, + headers?: object, + signal?: AbortSignal, + ): Promise + unpublishCollection( + args: UnpublishCollectionArgs, + headers?: object, + signal?: AbortSignal, + ): Promise + createContractCollection( + args: CreateContractCollectionArgs, + headers?: object, + signal?: AbortSignal, + ): Promise + getContractCollection( + args: GetContractCollectionArgs, + headers?: object, + signal?: AbortSignal, + ): Promise + listContractCollections( + args: ListContractCollectionsArgs, + headers?: object, + signal?: AbortSignal, + ): Promise + updateContractCollection( + args: UpdateContractCollectionArgs, + headers?: object, + signal?: AbortSignal, + ): Promise + deleteContractCollection( + args: DeleteContractCollectionArgs, + headers?: object, + signal?: AbortSignal, + ): Promise + createToken(args: CreateTokenArgs, headers?: object, signal?: AbortSignal): Promise + getToken(args: GetTokenArgs, headers?: object, signal?: AbortSignal): Promise + listTokens(args: ListTokensArgs, headers?: object, signal?: AbortSignal): Promise + updateToken(args: UpdateTokenArgs, headers?: object, signal?: AbortSignal): Promise + deleteToken(args: DeleteTokenArgs, headers?: object, signal?: AbortSignal): Promise + createAsset(args: CreateAssetArgs, headers?: object, signal?: AbortSignal): Promise + getAsset(args: GetAssetArgs, headers?: object, signal?: AbortSignal): Promise + updateAsset(args: UpdateAssetArgs, headers?: object, signal?: AbortSignal): Promise + deleteAsset(args: DeleteAssetArgs, headers?: object, signal?: AbortSignal): Promise +} + +export interface CreateCollectionArgs { + projectId?: number + collection: Collection +} + +export interface CreateCollectionReturn { + collection: Collection +} +export interface GetCollectionArgs { + projectId?: number + collectionId: number +} + +export interface GetCollectionReturn { + collection: Collection +} +export interface ListCollectionsArgs { + projectId?: number + page?: Page +} + +export interface ListCollectionsReturn { + page: Page + collections: Array +} +export interface UpdateCollectionArgs { + projectId?: number + collection: Collection +} + +export interface UpdateCollectionReturn { + collection: Collection +} +export interface DeleteCollectionArgs { + projectId?: number + collectionId: number +} + +export interface DeleteCollectionReturn { + status: boolean +} +export interface PublishCollectionArgs { + projectId?: number + collectionId: number + recursive?: boolean +} + +export interface PublishCollectionReturn { + collection: Collection +} +export interface UnpublishCollectionArgs { + projectId?: number + collectionId: number +} + +export interface UnpublishCollectionReturn { + collection: Collection +} +export interface CreateContractCollectionArgs { + projectId: number + contractCollection: ContractCollection +} + +export interface CreateContractCollectionReturn { + contractCollection: ContractCollection +} +export interface GetContractCollectionArgs { + projectId: number + chainId: number + contractAddress: string +} + +export interface GetContractCollectionReturn { + contractCollection: ContractCollection +} +export interface ListContractCollectionsArgs { + projectId: number + collectionId?: number + page?: Page +} + +export interface ListContractCollectionsReturn { + contractCollections: Array + collections: Array + page: Page +} +export interface UpdateContractCollectionArgs { + projectId: number + contractCollection: ContractCollection +} + +export interface UpdateContractCollectionReturn { + ok: boolean +} +export interface DeleteContractCollectionArgs { + projectId: number + chainId: number + contractAddress: string +} + +export interface DeleteContractCollectionReturn { + ok: boolean +} +export interface CreateTokenArgs { + projectId?: number + collectionId: number + token: TokenMetadata + private?: boolean +} + +export interface CreateTokenReturn { + token: TokenMetadata + assets: Array +} +export interface GetTokenArgs { + projectId?: number + collectionId: number + tokenId: string +} + +export interface GetTokenReturn { + token: TokenMetadata + assets: Array +} +export interface ListTokensArgs { + projectId?: number + collectionId: number + page?: Page +} + +export interface ListTokensReturn { + page: Page + tokens: Array +} +export interface UpdateTokenArgs { + projectId?: number + collectionId: number + tokenId: string + token: TokenMetadata + private?: boolean +} + +export interface UpdateTokenReturn { + token: TokenMetadata +} +export interface DeleteTokenArgs { + projectId?: number + collectionId: number + tokenId: string +} + +export interface DeleteTokenReturn { + status: boolean +} +export interface CreateAssetArgs { + projectId?: number + asset: Asset +} + +export interface CreateAssetReturn { + asset: Asset +} +export interface GetAssetArgs { + projectId?: number + assetId: number +} + +export interface GetAssetReturn { + asset: Asset +} +export interface UpdateAssetArgs { + projectId?: number + asset: Asset +} + +export interface UpdateAssetReturn { + asset: Asset +} +export interface DeleteAssetArgs { + projectId?: number + assetId: number +} + +export interface DeleteAssetReturn { + status: boolean +} + +export interface Admin { + /** + * ContractInfo + */ + refreshContractInfoUpdatedBefore( + args: RefreshContractInfoUpdatedBeforeArgs, + headers?: object, + signal?: AbortSignal, + ): Promise + /** + * TokenMetadata + */ + refreshTokenMetadataUpdatedBefore( + args: RefreshTokenMetadataUpdatedBeforeArgs, + headers?: object, + signal?: AbortSignal, + ): Promise + /** + * Contract Info Overrides + */ + getContractInfoOverride( + args: GetContractInfoOverrideArgs, + headers?: object, + signal?: AbortSignal, + ): Promise + getContractInfoOverrides( + args: GetContractInfoOverridesArgs, + headers?: object, + signal?: AbortSignal, + ): Promise + addContractInfoOverride( + args: AddContractInfoOverrideArgs, + headers?: object, + signal?: AbortSignal, + ): Promise + updateContractInfoOverride( + args: UpdateContractInfoOverrideArgs, + headers?: object, + signal?: AbortSignal, + ): Promise + removeContractInfoOverride( + args: RemoveContractInfoOverrideArgs, + headers?: object, + signal?: AbortSignal, + ): Promise + /** + * Token Directory + */ + isInTokenDirectory( + args: IsInTokenDirectoryArgs, + headers?: object, + signal?: AbortSignal, + ): Promise + setTokenDirectoryFeatureIndex( + args: SetTokenDirectoryFeatureIndexArgs, + headers?: object, + signal?: AbortSignal, + ): Promise + addContractToTokenDirectory( + args: AddContractToTokenDirectoryArgs, + headers?: object, + signal?: AbortSignal, + ): Promise + removeContractFromTokenDirectory( + args: RemoveContractFromTokenDirectoryArgs, + headers?: object, + signal?: AbortSignal, + ): Promise + refreshTokenDirectory(headers?: object, signal?: AbortSignal): Promise +} + +export interface RefreshContractInfoUpdatedBeforeArgs { + before: string + maxContractNumber: number +} + +export interface RefreshContractInfoUpdatedBeforeReturn { + taskIDs: Array +} +export interface RefreshTokenMetadataUpdatedBeforeArgs { + before: string + maxTokenNumber: number +} + +export interface RefreshTokenMetadataUpdatedBeforeReturn { + taskIDs: Array +} +export interface GetContractInfoOverrideArgs { + chainID: string + contractAddress: string +} + +export interface GetContractInfoOverrideReturn { + contractInfoOverride: ContractInfoOverride +} +export interface GetContractInfoOverridesArgs { + chainID?: string + page?: Page +} + +export interface GetContractInfoOverridesReturn { + contractInfoOverrides: Array + page: Page +} +export interface AddContractInfoOverrideArgs { + chainID: string + contractAddress: string + contractInfoOverride: ContractInfoOverride +} + +export interface AddContractInfoOverrideReturn { + ok: boolean +} +export interface UpdateContractInfoOverrideArgs { + chainID: string + contractAddress: string + contractInfoOverride: ContractInfoOverride +} + +export interface UpdateContractInfoOverrideReturn { + ok: boolean +} +export interface RemoveContractInfoOverrideArgs { + chainID: string + contractAddress: string +} + +export interface RemoveContractInfoOverrideReturn { + ok: boolean +} +export interface IsInTokenDirectoryArgs { + chainID: string + contractAddress: string +} + +export interface IsInTokenDirectoryReturn { + ok: boolean + featureIndex: number +} +export interface SetTokenDirectoryFeatureIndexArgs { + chainID: string + contractAddress: string + featureIndex: number +} + +export interface SetTokenDirectoryFeatureIndexReturn { + ok: boolean +} +export interface AddContractToTokenDirectoryArgs { + chainID: string + contractAddress: string +} + +export interface AddContractToTokenDirectoryReturn { + ok: boolean +} +export interface RemoveContractFromTokenDirectoryArgs { + chainID: string + contractAddress: string +} + +export interface RemoveContractFromTokenDirectoryReturn { + ok: boolean +} +export interface RefreshTokenDirectoryArgs {} + +export interface RefreshTokenDirectoryReturn { + taskID: number +} + +// +// Client +// +export class Metadata implements Metadata { + protected hostname: string + protected fetch: Fetch + protected path = '/rpc/Metadata/' + + constructor(hostname: string, fetch: Fetch) { + this.hostname = hostname.replace(/\/*$/, '') + this.fetch = (input: RequestInfo, init?: RequestInit) => fetch(input, init) + } + + private url(name: string): string { + return this.hostname + this.path + name + } + + ping = (headers?: object, signal?: AbortSignal): Promise => { + return this.fetch(this.url('Ping'), createHTTPRequest({}, headers, signal)).then( + (res) => { + return buildResponse(res).then((_data) => { + return { + status: _data.status, + } + }) + }, + (error) => { + throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) + }, + ) + } + + version = (headers?: object, signal?: AbortSignal): Promise => { + return this.fetch(this.url('Version'), createHTTPRequest({}, headers, signal)).then( + (res) => { + return buildResponse(res).then((_data) => { + return { + version: _data.version, + } + }) + }, + (error) => { + throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) + }, + ) + } + + runtimeStatus = (headers?: object, signal?: AbortSignal): Promise => { + return this.fetch(this.url('RuntimeStatus'), createHTTPRequest({}, headers, signal)).then( + (res) => { + return buildResponse(res).then((_data) => { + return { + status: _data.status, + } + }) + }, + (error) => { + throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) + }, + ) + } + + getTask = (args: GetTaskArgs, headers?: object, signal?: AbortSignal): Promise => { + return this.fetch(this.url('GetTask'), createHTTPRequest(args, headers, signal)).then( + (res) => { + return buildResponse(res).then((_data) => { + return { + task: _data.task, + } + }) + }, + (error) => { + throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) + }, + ) + } + + getTaskStatus = (args: GetTaskStatusArgs, headers?: object, signal?: AbortSignal): Promise => { + return this.fetch(this.url('GetTaskStatus'), createHTTPRequest(args, headers, signal)).then( + (res) => { + return buildResponse(res).then((_data) => { + return { + status: _data.status, + } + }) + }, + (error) => { + throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) + }, + ) + } + + getContractInfo = ( + args: GetContractInfoArgs, + headers?: object, + signal?: AbortSignal, + ): Promise => { + return this.fetch(this.url('GetContractInfo'), createHTTPRequest(args, headers, signal)).then( + (res) => { + return buildResponse(res).then((_data) => { + return { + contractInfo: _data.contractInfo, + taskID: _data.taskID, + } + }) + }, + (error) => { + throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) + }, + ) + } + + getContractInfoBatch = ( + args: GetContractInfoBatchArgs, + headers?: object, + signal?: AbortSignal, + ): Promise => { + return this.fetch(this.url('GetContractInfoBatch'), createHTTPRequest(args, headers, signal)).then( + (res) => { + return buildResponse(res).then((_data) => { + return { + contractInfoMap: <{ [key: string]: ContractInfo }>_data.contractInfoMap, + taskID: _data.taskID, + } + }) + }, + (error) => { + throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) + }, + ) + } + + findContractInfo = ( + args: FindContractInfoArgs, + headers?: object, + signal?: AbortSignal, + ): Promise => { + return this.fetch(this.url('FindContractInfo'), createHTTPRequest(args, headers, signal)).then( + (res) => { + return buildResponse(res).then((_data) => { + return { + contractInfoList: >_data.contractInfoList, + } + }) + }, + (error) => { + throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) + }, + ) + } + + findContractInfoBatch = ( + args: FindContractInfoBatchArgs, + headers?: object, + signal?: AbortSignal, + ): Promise => { + return this.fetch(this.url('FindContractInfoBatch'), createHTTPRequest(args, headers, signal)).then( + (res) => { + return buildResponse(res).then((_data) => { + return { + contractInfoByChain: <{ [key: string]: Array }>_data.contractInfoByChain, + } + }) + }, + (error) => { + throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) + }, + ) + } + + refreshContractInfo = ( + args: RefreshContractInfoArgs, + headers?: object, + signal?: AbortSignal, + ): Promise => { + return this.fetch(this.url('RefreshContractInfo'), createHTTPRequest(args, headers, signal)).then( + (res) => { + return buildResponse(res).then((_data) => { + return { + taskID: _data.taskID, + } + }) + }, + (error) => { + throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) + }, + ) + } + + refreshContractInfoBatch = ( + args: RefreshContractInfoBatchArgs, + headers?: object, + signal?: AbortSignal, + ): Promise => { + return this.fetch(this.url('RefreshContractInfoBatch'), createHTTPRequest(args, headers, signal)).then( + (res) => { + return buildResponse(res).then((_data) => { + return { + taskID: _data.taskID, + } + }) + }, + (error) => { + throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) + }, + ) + } + + searchContractsByQuery = ( + args: SearchContractsByQueryArgs, + headers?: object, + signal?: AbortSignal, + ): Promise => { + return this.fetch(this.url('SearchContractsByQuery'), createHTTPRequest(args, headers, signal)).then( + (res) => { + return buildResponse(res).then((_data) => { + return { + contractInfo: >_data.contractInfo, + nextPage: _data.nextPage, + } + }) + }, + (error) => { + throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) + }, + ) + } + + getTokenMetadata = ( + args: GetTokenMetadataArgs, + headers?: object, + signal?: AbortSignal, + ): Promise => { + return this.fetch(this.url('GetTokenMetadata'), createHTTPRequest(args, headers, signal)).then( + (res) => { + return buildResponse(res).then((_data) => { + return { + tokenMetadata: >_data.tokenMetadata, + taskID: _data.taskID, + } + }) + }, + (error) => { + throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) + }, + ) + } + + getTokenMetadataBatch = ( + args: GetTokenMetadataBatchArgs, + headers?: object, + signal?: AbortSignal, + ): Promise => { + return this.fetch(this.url('GetTokenMetadataBatch'), createHTTPRequest(args, headers, signal)).then( + (res) => { + return buildResponse(res).then((_data) => { + return { + contractTokenMetadata: <{ [key: string]: Array }>_data.contractTokenMetadata, + taskID: _data.taskID, + } + }) + }, + (error) => { + throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) + }, + ) + } + + refreshTokenMetadata = ( + args: RefreshTokenMetadataArgs, + headers?: object, + signal?: AbortSignal, + ): Promise => { + return this.fetch(this.url('RefreshTokenMetadata'), createHTTPRequest(args, headers, signal)).then( + (res) => { + return buildResponse(res).then((_data) => { + return { + taskID: _data.taskID, + } + }) + }, + (error) => { + throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) + }, + ) + } + + searchTokenMetadataByQuery = ( + args: SearchTokenMetadataByQueryArgs, + headers?: object, + signal?: AbortSignal, + ): Promise => { + return this.fetch(this.url('SearchTokenMetadataByQuery'), createHTTPRequest(args, headers, signal)).then( + (res) => { + return buildResponse(res).then((_data) => { + return { + tokenMetadata: >_data.tokenMetadata, + nextPage: _data.nextPage, + } + }) + }, + (error) => { + throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) + }, + ) + } + + searchTokenMetadata = ( + args: SearchTokenMetadataArgs, + headers?: object, + signal?: AbortSignal, + ): Promise => { + return this.fetch(this.url('SearchTokenMetadata'), createHTTPRequest(args, headers, signal)).then( + (res) => { + return buildResponse(res).then((_data) => { + return { + page: _data.page, + tokenMetadata: >_data.tokenMetadata, + } + }) + }, + (error) => { + throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) + }, + ) + } + + searchTokenMetadataTokenIDs = ( + args: SearchTokenMetadataTokenIDsArgs, + headers?: object, + signal?: AbortSignal, + ): Promise => { + return this.fetch(this.url('SearchTokenMetadataTokenIDs'), createHTTPRequest(args, headers, signal)).then( + (res) => { + return buildResponse(res).then((_data) => { + return { + page: _data.page, + tokenIDs: >_data.tokenIDs, + } + }) + }, + (error) => { + throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) + }, + ) + } + + getTokenMetadataPropertyFilters = ( + args: GetTokenMetadataPropertyFiltersArgs, + headers?: object, + signal?: AbortSignal, + ): Promise => { + return this.fetch(this.url('GetTokenMetadataPropertyFilters'), createHTTPRequest(args, headers, signal)).then( + (res) => { + return buildResponse(res).then((_data) => { + return { + filters: >_data.filters, + } + }) + }, + (error) => { + throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) + }, + ) + } + + getTokenDirectoryNetworks = ( + args: GetTokenDirectoryNetworksArgs, + headers?: object, + signal?: AbortSignal, + ): Promise => { + return this.fetch(this.url('GetTokenDirectoryNetworks'), createHTTPRequest(args, headers, signal)).then( + (res) => { + return buildResponse(res).then((_data) => { + return { + chainIDs: >_data.chainIDs, + networks: >_data.networks, + } + }) + }, + (error) => { + throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) + }, + ) + } + + getTokenDirectory = ( + args: GetTokenDirectoryArgs, + headers?: object, + signal?: AbortSignal, + ): Promise => { + return this.fetch(this.url('GetTokenDirectory'), createHTTPRequest(args, headers, signal)).then( + (res) => { + return buildResponse(res).then((_data) => { + return { + contracts: >_data.contracts, + page: _data.page, + } + }) + }, + (error) => { + throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) + }, + ) + } + + searchTokenDirectory = ( + args: SearchTokenDirectoryArgs, + headers?: object, + signal?: AbortSignal, + ): Promise => { + return this.fetch(this.url('SearchTokenDirectory'), createHTTPRequest(args, headers, signal)).then( + (res) => { + return buildResponse(res).then((_data) => { + return { + contracts: >_data.contracts, + page: _data.page, + } + }) + }, + (error) => { + throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) + }, + ) + } + + getNiftyswapTokenQuantity = ( + args: GetNiftyswapTokenQuantityArgs, + headers?: object, + signal?: AbortSignal, + ): Promise => { + return this.fetch(this.url('GetNiftyswapTokenQuantity'), createHTTPRequest(args, headers, signal)).then( + (res) => { + return buildResponse(res).then((_data) => { + return { + quantity: <{ [key: string]: string }>_data.quantity, + } + }) + }, + (error) => { + throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) + }, + ) + } + + getNiftyswapUnitPrices = ( + args: GetNiftyswapUnitPricesArgs, + headers?: object, + signal?: AbortSignal, + ): Promise => { + return this.fetch(this.url('GetNiftyswapUnitPrices'), createHTTPRequest(args, headers, signal)).then( + (res) => { + return buildResponse(res).then((_data) => { + return { + prices: <{ [key: string]: string }>_data.prices, + } + }) + }, + (error) => { + throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) + }, + ) + } + + getNiftyswapUnitPricesWithQuantities = ( + args: GetNiftyswapUnitPricesWithQuantitiesArgs, + headers?: object, + signal?: AbortSignal, + ): Promise => { + return this.fetch(this.url('GetNiftyswapUnitPricesWithQuantities'), createHTTPRequest(args, headers, signal)).then( + (res) => { + return buildResponse(res).then((_data) => { + return { + prices: <{ [key: string]: GetNiftyswapUnitPricesResponse }>_data.prices, + } + }) + }, + (error) => { + throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) + }, + ) + } +} +export class Collections implements Collections { + protected hostname: string + protected fetch: Fetch + protected path = '/rpc/Collections/' + + constructor(hostname: string, fetch: Fetch) { + this.hostname = hostname.replace(/\/*$/, '') + this.fetch = (input: RequestInfo, init?: RequestInit) => fetch(input, init) + } + + private url(name: string): string { + return this.hostname + this.path + name + } + + createCollection = ( + args: CreateCollectionArgs, + headers?: object, + signal?: AbortSignal, + ): Promise => { + return this.fetch(this.url('CreateCollection'), createHTTPRequest(args, headers, signal)).then( + (res) => { + return buildResponse(res).then((_data) => { + return { + collection: _data.collection, + } + }) + }, + (error) => { + throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) + }, + ) + } + + getCollection = (args: GetCollectionArgs, headers?: object, signal?: AbortSignal): Promise => { + return this.fetch(this.url('GetCollection'), createHTTPRequest(args, headers, signal)).then( + (res) => { + return buildResponse(res).then((_data) => { + return { + collection: _data.collection, + } + }) + }, + (error) => { + throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) + }, + ) + } + + listCollections = ( + args: ListCollectionsArgs, + headers?: object, + signal?: AbortSignal, + ): Promise => { + return this.fetch(this.url('ListCollections'), createHTTPRequest(args, headers, signal)).then( + (res) => { + return buildResponse(res).then((_data) => { + return { + page: _data.page, + collections: >_data.collections, + } + }) + }, + (error) => { + throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) + }, + ) + } + + updateCollection = ( + args: UpdateCollectionArgs, + headers?: object, + signal?: AbortSignal, + ): Promise => { + return this.fetch(this.url('UpdateCollection'), createHTTPRequest(args, headers, signal)).then( + (res) => { + return buildResponse(res).then((_data) => { + return { + collection: _data.collection, + } + }) + }, + (error) => { + throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) + }, + ) + } + + deleteCollection = ( + args: DeleteCollectionArgs, + headers?: object, + signal?: AbortSignal, + ): Promise => { + return this.fetch(this.url('DeleteCollection'), createHTTPRequest(args, headers, signal)).then( + (res) => { + return buildResponse(res).then((_data) => { + return { + status: _data.status, + } + }) + }, + (error) => { + throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) + }, + ) + } + + publishCollection = ( + args: PublishCollectionArgs, + headers?: object, + signal?: AbortSignal, + ): Promise => { + return this.fetch(this.url('PublishCollection'), createHTTPRequest(args, headers, signal)).then( + (res) => { + return buildResponse(res).then((_data) => { + return { + collection: _data.collection, + } + }) + }, + (error) => { + throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) + }, + ) + } + + unpublishCollection = ( + args: UnpublishCollectionArgs, + headers?: object, + signal?: AbortSignal, + ): Promise => { + return this.fetch(this.url('UnpublishCollection'), createHTTPRequest(args, headers, signal)).then( + (res) => { + return buildResponse(res).then((_data) => { + return { + collection: _data.collection, + } + }) + }, + (error) => { + throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) + }, + ) + } + + createContractCollection = ( + args: CreateContractCollectionArgs, + headers?: object, + signal?: AbortSignal, + ): Promise => { + return this.fetch(this.url('CreateContractCollection'), createHTTPRequest(args, headers, signal)).then( + (res) => { + return buildResponse(res).then((_data) => { + return { + contractCollection: _data.contractCollection, + } + }) + }, + (error) => { + throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) + }, + ) + } + + getContractCollection = ( + args: GetContractCollectionArgs, + headers?: object, + signal?: AbortSignal, + ): Promise => { + return this.fetch(this.url('GetContractCollection'), createHTTPRequest(args, headers, signal)).then( + (res) => { + return buildResponse(res).then((_data) => { + return { + contractCollection: _data.contractCollection, + } + }) + }, + (error) => { + throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) + }, + ) + } + + listContractCollections = ( + args: ListContractCollectionsArgs, + headers?: object, + signal?: AbortSignal, + ): Promise => { + return this.fetch(this.url('ListContractCollections'), createHTTPRequest(args, headers, signal)).then( + (res) => { + return buildResponse(res).then((_data) => { + return { + contractCollections: >_data.contractCollections, + collections: >_data.collections, + page: _data.page, + } + }) + }, + (error) => { + throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) + }, + ) + } + + updateContractCollection = ( + args: UpdateContractCollectionArgs, + headers?: object, + signal?: AbortSignal, + ): Promise => { + return this.fetch(this.url('UpdateContractCollection'), createHTTPRequest(args, headers, signal)).then( + (res) => { + return buildResponse(res).then((_data) => { + return { + ok: _data.ok, + } + }) + }, + (error) => { + throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) + }, + ) + } + + deleteContractCollection = ( + args: DeleteContractCollectionArgs, + headers?: object, + signal?: AbortSignal, + ): Promise => { + return this.fetch(this.url('DeleteContractCollection'), createHTTPRequest(args, headers, signal)).then( + (res) => { + return buildResponse(res).then((_data) => { + return { + ok: _data.ok, + } + }) + }, + (error) => { + throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) + }, + ) + } + + createToken = (args: CreateTokenArgs, headers?: object, signal?: AbortSignal): Promise => { + return this.fetch(this.url('CreateToken'), createHTTPRequest(args, headers, signal)).then( + (res) => { + return buildResponse(res).then((_data) => { + return { + token: _data.token, + assets: >_data.assets, + } + }) + }, + (error) => { + throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) + }, + ) + } + + getToken = (args: GetTokenArgs, headers?: object, signal?: AbortSignal): Promise => { + return this.fetch(this.url('GetToken'), createHTTPRequest(args, headers, signal)).then( + (res) => { + return buildResponse(res).then((_data) => { + return { + token: _data.token, + assets: >_data.assets, + } + }) + }, + (error) => { + throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) + }, + ) + } + + listTokens = (args: ListTokensArgs, headers?: object, signal?: AbortSignal): Promise => { + return this.fetch(this.url('ListTokens'), createHTTPRequest(args, headers, signal)).then( + (res) => { + return buildResponse(res).then((_data) => { + return { + page: _data.page, + tokens: >_data.tokens, + } + }) + }, + (error) => { + throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) + }, + ) + } + + updateToken = (args: UpdateTokenArgs, headers?: object, signal?: AbortSignal): Promise => { + return this.fetch(this.url('UpdateToken'), createHTTPRequest(args, headers, signal)).then( + (res) => { + return buildResponse(res).then((_data) => { + return { + token: _data.token, + } + }) + }, + (error) => { + throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) + }, + ) + } + + deleteToken = (args: DeleteTokenArgs, headers?: object, signal?: AbortSignal): Promise => { + return this.fetch(this.url('DeleteToken'), createHTTPRequest(args, headers, signal)).then( + (res) => { + return buildResponse(res).then((_data) => { + return { + status: _data.status, + } + }) + }, + (error) => { + throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) + }, + ) + } + + createAsset = (args: CreateAssetArgs, headers?: object, signal?: AbortSignal): Promise => { + return this.fetch(this.url('CreateAsset'), createHTTPRequest(args, headers, signal)).then( + (res) => { + return buildResponse(res).then((_data) => { + return { + asset: _data.asset, + } + }) + }, + (error) => { + throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) + }, + ) + } + + getAsset = (args: GetAssetArgs, headers?: object, signal?: AbortSignal): Promise => { + return this.fetch(this.url('GetAsset'), createHTTPRequest(args, headers, signal)).then( + (res) => { + return buildResponse(res).then((_data) => { + return { + asset: _data.asset, + } + }) + }, + (error) => { + throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) + }, + ) + } + + updateAsset = (args: UpdateAssetArgs, headers?: object, signal?: AbortSignal): Promise => { + return this.fetch(this.url('UpdateAsset'), createHTTPRequest(args, headers, signal)).then( + (res) => { + return buildResponse(res).then((_data) => { + return { + asset: _data.asset, + } + }) + }, + (error) => { + throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) + }, + ) + } + + deleteAsset = (args: DeleteAssetArgs, headers?: object, signal?: AbortSignal): Promise => { + return this.fetch(this.url('DeleteAsset'), createHTTPRequest(args, headers, signal)).then( + (res) => { + return buildResponse(res).then((_data) => { + return { + status: _data.status, + } + }) + }, + (error) => { + throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) + }, + ) + } +} +export class Admin implements Admin { + protected hostname: string + protected fetch: Fetch + protected path = '/rpc/Admin/' + + constructor(hostname: string, fetch: Fetch) { + this.hostname = hostname.replace(/\/*$/, '') + this.fetch = (input: RequestInfo, init?: RequestInit) => fetch(input, init) + } + + private url(name: string): string { + return this.hostname + this.path + name + } + + refreshContractInfoUpdatedBefore = ( + args: RefreshContractInfoUpdatedBeforeArgs, + headers?: object, + signal?: AbortSignal, + ): Promise => { + return this.fetch(this.url('RefreshContractInfoUpdatedBefore'), createHTTPRequest(args, headers, signal)).then( + (res) => { + return buildResponse(res).then((_data) => { + return { + taskIDs: >_data.taskIDs, + } + }) + }, + (error) => { + throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) + }, + ) + } + + refreshTokenMetadataUpdatedBefore = ( + args: RefreshTokenMetadataUpdatedBeforeArgs, + headers?: object, + signal?: AbortSignal, + ): Promise => { + return this.fetch(this.url('RefreshTokenMetadataUpdatedBefore'), createHTTPRequest(args, headers, signal)).then( + (res) => { + return buildResponse(res).then((_data) => { + return { + taskIDs: >_data.taskIDs, + } + }) + }, + (error) => { + throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) + }, + ) + } + + getContractInfoOverride = ( + args: GetContractInfoOverrideArgs, + headers?: object, + signal?: AbortSignal, + ): Promise => { + return this.fetch(this.url('GetContractInfoOverride'), createHTTPRequest(args, headers, signal)).then( + (res) => { + return buildResponse(res).then((_data) => { + return { + contractInfoOverride: _data.contractInfoOverride, + } + }) + }, + (error) => { + throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) + }, + ) + } + + getContractInfoOverrides = ( + args: GetContractInfoOverridesArgs, + headers?: object, + signal?: AbortSignal, + ): Promise => { + return this.fetch(this.url('GetContractInfoOverrides'), createHTTPRequest(args, headers, signal)).then( + (res) => { + return buildResponse(res).then((_data) => { + return { + contractInfoOverrides: >_data.contractInfoOverrides, + page: _data.page, + } + }) + }, + (error) => { + throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) + }, + ) + } + + addContractInfoOverride = ( + args: AddContractInfoOverrideArgs, + headers?: object, + signal?: AbortSignal, + ): Promise => { + return this.fetch(this.url('AddContractInfoOverride'), createHTTPRequest(args, headers, signal)).then( + (res) => { + return buildResponse(res).then((_data) => { + return { + ok: _data.ok, + } + }) + }, + (error) => { + throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) + }, + ) + } + + updateContractInfoOverride = ( + args: UpdateContractInfoOverrideArgs, + headers?: object, + signal?: AbortSignal, + ): Promise => { + return this.fetch(this.url('UpdateContractInfoOverride'), createHTTPRequest(args, headers, signal)).then( + (res) => { + return buildResponse(res).then((_data) => { + return { + ok: _data.ok, + } + }) + }, + (error) => { + throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) + }, + ) + } + + removeContractInfoOverride = ( + args: RemoveContractInfoOverrideArgs, + headers?: object, + signal?: AbortSignal, + ): Promise => { + return this.fetch(this.url('RemoveContractInfoOverride'), createHTTPRequest(args, headers, signal)).then( + (res) => { + return buildResponse(res).then((_data) => { + return { + ok: _data.ok, + } + }) + }, + (error) => { + throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) + }, + ) + } + + isInTokenDirectory = ( + args: IsInTokenDirectoryArgs, + headers?: object, + signal?: AbortSignal, + ): Promise => { + return this.fetch(this.url('IsInTokenDirectory'), createHTTPRequest(args, headers, signal)).then( + (res) => { + return buildResponse(res).then((_data) => { + return { + ok: _data.ok, + featureIndex: _data.featureIndex, + } + }) + }, + (error) => { + throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) + }, + ) + } + + setTokenDirectoryFeatureIndex = ( + args: SetTokenDirectoryFeatureIndexArgs, + headers?: object, + signal?: AbortSignal, + ): Promise => { + return this.fetch(this.url('SetTokenDirectoryFeatureIndex'), createHTTPRequest(args, headers, signal)).then( + (res) => { + return buildResponse(res).then((_data) => { + return { + ok: _data.ok, + } + }) + }, + (error) => { + throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) + }, + ) + } + + addContractToTokenDirectory = ( + args: AddContractToTokenDirectoryArgs, + headers?: object, + signal?: AbortSignal, + ): Promise => { + return this.fetch(this.url('AddContractToTokenDirectory'), createHTTPRequest(args, headers, signal)).then( + (res) => { + return buildResponse(res).then((_data) => { + return { + ok: _data.ok, + } + }) + }, + (error) => { + throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) + }, + ) + } + + removeContractFromTokenDirectory = ( + args: RemoveContractFromTokenDirectoryArgs, + headers?: object, + signal?: AbortSignal, + ): Promise => { + return this.fetch(this.url('RemoveContractFromTokenDirectory'), createHTTPRequest(args, headers, signal)).then( + (res) => { + return buildResponse(res).then((_data) => { + return { + ok: _data.ok, + } + }) + }, + (error) => { + throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) + }, + ) + } + + refreshTokenDirectory = (headers?: object, signal?: AbortSignal): Promise => { + return this.fetch(this.url('RefreshTokenDirectory'), createHTTPRequest({}, headers, signal)).then( + (res) => { + return buildResponse(res).then((_data) => { + return { + taskID: _data.taskID, + } + }) + }, + (error) => { + throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) + }, + ) + } +} + +const createHTTPRequest = (body: object = {}, headers: object = {}, signal: AbortSignal | null = null): object => { + const reqHeaders: { [key: string]: string } = { ...headers, 'Content-Type': 'application/json' } + reqHeaders[WebrpcHeader] = WebrpcHeaderValue + + return { + method: 'POST', + headers: reqHeaders, + body: JSON.stringify(body || {}), + signal, + } +} + +const buildResponse = (res: Response): Promise => { + return res.text().then((text) => { + let data + try { + data = JSON.parse(text) + } catch (error) { + let message = '' + if (error instanceof Error) { + message = error.message + } + throw WebrpcBadResponseError.new({ + status: res.status, + cause: `JSON.parse(): ${message}: response text: ${text}`, + }) + } + if (!res.ok) { + const code: number = typeof data.code === 'number' ? data.code : 0 + throw (webrpcErrorByCode[code] || WebrpcError).new(data) + } + return data + }) +} + +// +// Errors +// + +export class WebrpcError extends Error { + name: string + code: number + message: string + status: number + cause?: string + + /** @deprecated Use message instead of msg. Deprecated in webrpc v0.11.0. */ + msg: string + + constructor(name: string, code: number, message: string, status: number, cause?: string) { + super(message) + this.name = name || 'WebrpcError' + this.code = typeof code === 'number' ? code : 0 + this.message = message || `endpoint error ${this.code}` + this.msg = this.message + this.status = typeof status === 'number' ? status : 0 + this.cause = cause + Object.setPrototypeOf(this, WebrpcError.prototype) + } + + static new(payload: any): WebrpcError { + return new this(payload.error, payload.code, payload.message || payload.msg, payload.status, payload.cause) + } +} + +// Webrpc errors + +export class WebrpcEndpointError extends WebrpcError { + constructor( + name: string = 'WebrpcEndpoint', + code: number = 0, + message: string = `endpoint error`, + status: number = 0, + cause?: string, + ) { + super(name, code, message, status, cause) + Object.setPrototypeOf(this, WebrpcEndpointError.prototype) + } +} + +export class WebrpcRequestFailedError extends WebrpcError { + constructor( + name: string = 'WebrpcRequestFailed', + code: number = -1, + message: string = `request failed`, + status: number = 0, + cause?: string, + ) { + super(name, code, message, status, cause) + Object.setPrototypeOf(this, WebrpcRequestFailedError.prototype) + } +} + +export class WebrpcBadRouteError extends WebrpcError { + constructor( + name: string = 'WebrpcBadRoute', + code: number = -2, + message: string = `bad route`, + status: number = 0, + cause?: string, + ) { + super(name, code, message, status, cause) + Object.setPrototypeOf(this, WebrpcBadRouteError.prototype) + } +} + +export class WebrpcBadMethodError extends WebrpcError { + constructor( + name: string = 'WebrpcBadMethod', + code: number = -3, + message: string = `bad method`, + status: number = 0, + cause?: string, + ) { + super(name, code, message, status, cause) + Object.setPrototypeOf(this, WebrpcBadMethodError.prototype) + } +} + +export class WebrpcBadRequestError extends WebrpcError { + constructor( + name: string = 'WebrpcBadRequest', + code: number = -4, + message: string = `bad request`, + status: number = 0, + cause?: string, + ) { + super(name, code, message, status, cause) + Object.setPrototypeOf(this, WebrpcBadRequestError.prototype) + } +} + +export class WebrpcBadResponseError extends WebrpcError { + constructor( + name: string = 'WebrpcBadResponse', + code: number = -5, + message: string = `bad response`, + status: number = 0, + cause?: string, + ) { + super(name, code, message, status, cause) + Object.setPrototypeOf(this, WebrpcBadResponseError.prototype) + } +} + +export class WebrpcServerPanicError extends WebrpcError { + constructor( + name: string = 'WebrpcServerPanic', + code: number = -6, + message: string = `server panic`, + status: number = 0, + cause?: string, + ) { + super(name, code, message, status, cause) + Object.setPrototypeOf(this, WebrpcServerPanicError.prototype) + } +} + +export class WebrpcInternalErrorError extends WebrpcError { + constructor( + name: string = 'WebrpcInternalError', + code: number = -7, + message: string = `internal error`, + status: number = 0, + cause?: string, + ) { + super(name, code, message, status, cause) + Object.setPrototypeOf(this, WebrpcInternalErrorError.prototype) + } +} + +export class WebrpcClientDisconnectedError extends WebrpcError { + constructor( + name: string = 'WebrpcClientDisconnected', + code: number = -8, + message: string = `client disconnected`, + status: number = 0, + cause?: string, + ) { + super(name, code, message, status, cause) + Object.setPrototypeOf(this, WebrpcClientDisconnectedError.prototype) + } +} + +export class WebrpcStreamLostError extends WebrpcError { + constructor( + name: string = 'WebrpcStreamLost', + code: number = -9, + message: string = `stream lost`, + status: number = 0, + cause?: string, + ) { + super(name, code, message, status, cause) + Object.setPrototypeOf(this, WebrpcStreamLostError.prototype) + } +} + +export class WebrpcStreamFinishedError extends WebrpcError { + constructor( + name: string = 'WebrpcStreamFinished', + code: number = -10, + message: string = `stream finished`, + status: number = 0, + cause?: string, + ) { + super(name, code, message, status, cause) + Object.setPrototypeOf(this, WebrpcStreamFinishedError.prototype) + } +} + +// Schema errors + +export class UnauthorizedError extends WebrpcError { + constructor( + name: string = 'Unauthorized', + code: number = 1000, + message: string = `Unauthorized access`, + status: number = 0, + cause?: string, + ) { + super(name, code, message, status, cause) + Object.setPrototypeOf(this, UnauthorizedError.prototype) + } +} + +export class PermissionDeniedError extends WebrpcError { + constructor( + name: string = 'PermissionDenied', + code: number = 1001, + message: string = `Permission denied`, + status: number = 0, + cause?: string, + ) { + super(name, code, message, status, cause) + Object.setPrototypeOf(this, PermissionDeniedError.prototype) + } +} + +export class SessionExpiredError extends WebrpcError { + constructor( + name: string = 'SessionExpired', + code: number = 1002, + message: string = `Session expired`, + status: number = 0, + cause?: string, + ) { + super(name, code, message, status, cause) + Object.setPrototypeOf(this, SessionExpiredError.prototype) + } +} + +export class MethodNotFoundError extends WebrpcError { + constructor( + name: string = 'MethodNotFound', + code: number = 1003, + message: string = `Method not found`, + status: number = 0, + cause?: string, + ) { + super(name, code, message, status, cause) + Object.setPrototypeOf(this, MethodNotFoundError.prototype) + } +} + +export class RequestConflictError extends WebrpcError { + constructor( + name: string = 'RequestConflict', + code: number = 1004, + message: string = `Conflict with target resource`, + status: number = 0, + cause?: string, + ) { + super(name, code, message, status, cause) + Object.setPrototypeOf(this, RequestConflictError.prototype) + } +} + +export class FailError extends WebrpcError { + constructor( + name: string = 'Fail', + code: number = 1005, + message: string = `Request Failed`, + status: number = 0, + cause?: string, + ) { + super(name, code, message, status, cause) + Object.setPrototypeOf(this, FailError.prototype) + } +} + +export class GeoblockedError extends WebrpcError { + constructor( + name: string = 'Geoblocked', + code: number = 1006, + message: string = `Geoblocked region`, + status: number = 0, + cause?: string, + ) { + super(name, code, message, status, cause) + Object.setPrototypeOf(this, GeoblockedError.prototype) + } +} + +export class TaskFailedError extends WebrpcError { + constructor( + name: string = 'TaskFailed', + code: number = 1007, + message: string = `Task failed`, + status: number = 0, + cause?: string, + ) { + super(name, code, message, status, cause) + Object.setPrototypeOf(this, TaskFailedError.prototype) + } +} + +export class DeprecatedError extends WebrpcError { + constructor( + name: string = 'Deprecated', + code: number = 1008, + message: string = `RPC method is deprecated`, + status: number = 0, + cause?: string, + ) { + super(name, code, message, status, cause) + Object.setPrototypeOf(this, DeprecatedError.prototype) + } +} + +export class TimeoutError extends WebrpcError { + constructor( + name: string = 'Timeout', + code: number = 2000, + message: string = `Request timed out`, + status: number = 0, + cause?: string, + ) { + super(name, code, message, status, cause) + Object.setPrototypeOf(this, TimeoutError.prototype) + } +} + +export class InvalidArgumentError extends WebrpcError { + constructor( + name: string = 'InvalidArgument', + code: number = 2001, + message: string = `Invalid argument`, + status: number = 0, + cause?: string, + ) { + super(name, code, message, status, cause) + Object.setPrototypeOf(this, InvalidArgumentError.prototype) + } +} + +export class RequiredArgumentError extends WebrpcError { + constructor( + name: string = 'RequiredArgument', + code: number = 2002, + message: string = `Required argument missing`, + status: number = 0, + cause?: string, + ) { + super(name, code, message, status, cause) + Object.setPrototypeOf(this, RequiredArgumentError.prototype) + } +} + +export class QueryFailedError extends WebrpcError { + constructor( + name: string = 'QueryFailed', + code: number = 2003, + message: string = `Query failed`, + status: number = 0, + cause?: string, + ) { + super(name, code, message, status, cause) + Object.setPrototypeOf(this, QueryFailedError.prototype) + } +} + +export class ValidationFailedError extends WebrpcError { + constructor( + name: string = 'ValidationFailed', + code: number = 2004, + message: string = `Validation failed`, + status: number = 0, + cause?: string, + ) { + super(name, code, message, status, cause) + Object.setPrototypeOf(this, ValidationFailedError.prototype) + } +} + +export class RateLimitedError extends WebrpcError { + constructor( + name: string = 'RateLimited', + code: number = 2005, + message: string = `Rate limited`, + status: number = 0, + cause?: string, + ) { + super(name, code, message, status, cause) + Object.setPrototypeOf(this, RateLimitedError.prototype) + } +} + +export class NotFoundError extends WebrpcError { + constructor( + name: string = 'NotFound', + code: number = 3000, + message: string = `Resource not found`, + status: number = 0, + cause?: string, + ) { + super(name, code, message, status, cause) + Object.setPrototypeOf(this, NotFoundError.prototype) + } +} + +export class ProjectNotFoundError extends WebrpcError { + constructor( + name: string = 'ProjectNotFound', + code: number = 3002, + message: string = `Project not found`, + status: number = 0, + cause?: string, + ) { + super(name, code, message, status, cause) + Object.setPrototypeOf(this, ProjectNotFoundError.prototype) + } +} + +export class ChainNotFoundError extends WebrpcError { + constructor( + name: string = 'ChainNotFound', + code: number = 3003, + message: string = `Chain not found`, + status: number = 0, + cause?: string, + ) { + super(name, code, message, status, cause) + Object.setPrototypeOf(this, ChainNotFoundError.prototype) + } +} + +export class TokenDirectoryDisabledError extends WebrpcError { + constructor( + name: string = 'TokenDirectoryDisabled', + code: number = 4001, + message: string = `Token Directory is disabled`, + status: number = 0, + cause?: string, + ) { + super(name, code, message, status, cause) + Object.setPrototypeOf(this, TokenDirectoryDisabledError.prototype) + } +} + +export enum errors { + WebrpcEndpoint = 'WebrpcEndpoint', + WebrpcRequestFailed = 'WebrpcRequestFailed', + WebrpcBadRoute = 'WebrpcBadRoute', + WebrpcBadMethod = 'WebrpcBadMethod', + WebrpcBadRequest = 'WebrpcBadRequest', + WebrpcBadResponse = 'WebrpcBadResponse', + WebrpcServerPanic = 'WebrpcServerPanic', + WebrpcInternalError = 'WebrpcInternalError', + WebrpcClientDisconnected = 'WebrpcClientDisconnected', + WebrpcStreamLost = 'WebrpcStreamLost', + WebrpcStreamFinished = 'WebrpcStreamFinished', + Unauthorized = 'Unauthorized', + PermissionDenied = 'PermissionDenied', + SessionExpired = 'SessionExpired', + MethodNotFound = 'MethodNotFound', + RequestConflict = 'RequestConflict', + Fail = 'Fail', + Geoblocked = 'Geoblocked', + TaskFailed = 'TaskFailed', + Deprecated = 'Deprecated', + Timeout = 'Timeout', + InvalidArgument = 'InvalidArgument', + RequiredArgument = 'RequiredArgument', + QueryFailed = 'QueryFailed', + ValidationFailed = 'ValidationFailed', + RateLimited = 'RateLimited', + NotFound = 'NotFound', + ProjectNotFound = 'ProjectNotFound', + ChainNotFound = 'ChainNotFound', + TokenDirectoryDisabled = 'TokenDirectoryDisabled', +} + +export enum WebrpcErrorCodes { + WebrpcEndpoint = 0, + WebrpcRequestFailed = -1, + WebrpcBadRoute = -2, + WebrpcBadMethod = -3, + WebrpcBadRequest = -4, + WebrpcBadResponse = -5, + WebrpcServerPanic = -6, + WebrpcInternalError = -7, + WebrpcClientDisconnected = -8, + WebrpcStreamLost = -9, + WebrpcStreamFinished = -10, + Unauthorized = 1000, + PermissionDenied = 1001, + SessionExpired = 1002, + MethodNotFound = 1003, + RequestConflict = 1004, + Fail = 1005, + Geoblocked = 1006, + TaskFailed = 1007, + Deprecated = 1008, + Timeout = 2000, + InvalidArgument = 2001, + RequiredArgument = 2002, + QueryFailed = 2003, + ValidationFailed = 2004, + RateLimited = 2005, + NotFound = 3000, + ProjectNotFound = 3002, + ChainNotFound = 3003, + TokenDirectoryDisabled = 4001, +} + +export const webrpcErrorByCode: { [code: number]: any } = { + [0]: WebrpcEndpointError, + [-1]: WebrpcRequestFailedError, + [-2]: WebrpcBadRouteError, + [-3]: WebrpcBadMethodError, + [-4]: WebrpcBadRequestError, + [-5]: WebrpcBadResponseError, + [-6]: WebrpcServerPanicError, + [-7]: WebrpcInternalErrorError, + [-8]: WebrpcClientDisconnectedError, + [-9]: WebrpcStreamLostError, + [-10]: WebrpcStreamFinishedError, + [1000]: UnauthorizedError, + [1001]: PermissionDeniedError, + [1002]: SessionExpiredError, + [1003]: MethodNotFoundError, + [1004]: RequestConflictError, + [1005]: FailError, + [1006]: GeoblockedError, + [1007]: TaskFailedError, + [1008]: DeprecatedError, + [2000]: TimeoutError, + [2001]: InvalidArgumentError, + [2002]: RequiredArgumentError, + [2003]: QueryFailedError, + [2004]: ValidationFailedError, + [2005]: RateLimitedError, + [3000]: NotFoundError, + [3002]: ProjectNotFoundError, + [3003]: ChainNotFoundError, + [4001]: TokenDirectoryDisabledError, +} + +export type Fetch = (input: RequestInfo, init?: RequestInit) => Promise diff --git a/packages/services/metadata/tsconfig.json b/packages/services/metadata/tsconfig.json new file mode 100644 index 000000000..fed9c77b4 --- /dev/null +++ b/packages/services/metadata/tsconfig.json @@ -0,0 +1,10 @@ +{ + "extends": "@repo/typescript-config/base.json", + "compilerOptions": { + "rootDir": "src", + "outDir": "dist", + "types": ["node"] + }, + "include": ["src"], + "exclude": ["node_modules", "dist"] +} diff --git a/packages/services/relayer/CHANGELOG.md b/packages/services/relayer/CHANGELOG.md new file mode 100644 index 000000000..c35614659 --- /dev/null +++ b/packages/services/relayer/CHANGELOG.md @@ -0,0 +1,3848 @@ +# @0xsequence/relayer + +## 2.3.8 + +### Patch Changes + +- indexer: update clients +- Updated dependencies + - @0xsequence/abi@2.3.8 + - @0xsequence/core@2.3.8 + - @0xsequence/utils@2.3.8 + +## 2.3.7 + +### Patch Changes + +- Metadata updates +- Updated dependencies + - @0xsequence/abi@2.3.7 + - @0xsequence/core@2.3.7 + - @0xsequence/utils@2.3.7 + +## 2.3.6 + +### Patch Changes + +- New chains +- Updated dependencies + - @0xsequence/abi@2.3.6 + - @0xsequence/core@2.3.6 + - @0xsequence/utils@2.3.6 + +## 2.3.5 + +### Patch Changes + +- Add Frequency Testnet +- Updated dependencies + - @0xsequence/abi@2.3.5 + - @0xsequence/core@2.3.5 + - @0xsequence/utils@2.3.5 + +## 2.3.4 + +### Patch Changes + +- metadata: exclude deprecated methods on rpc client +- Updated dependencies + - @0xsequence/abi@2.3.4 + - @0xsequence/core@2.3.4 + - @0xsequence/utils@2.3.4 + +## 2.3.3 + +### Patch Changes + +- metadata: client update +- Updated dependencies + - @0xsequence/abi@2.3.3 + - @0xsequence/core@2.3.3 + - @0xsequence/utils@2.3.3 + +## 2.3.2 + +### Patch Changes + +- metadata: update rpc client +- Updated dependencies + - @0xsequence/abi@2.3.2 + - @0xsequence/core@2.3.2 + - @0xsequence/utils@2.3.2 + +## 2.3.1 + +### Patch Changes + +- indexer: update rpc client +- Updated dependencies + - @0xsequence/abi@2.3.1 + - @0xsequence/core@2.3.1 + - @0xsequence/utils@2.3.1 + +## 2.3.0 + +### Minor Changes + +- update metadata rpc client + +### Patch Changes + +- Updated dependencies + - @0xsequence/abi@2.3.0 + - @0xsequence/core@2.3.0 + - @0xsequence/utils@2.3.0 + +## 2.2.15 + +### Patch Changes + +- API updates +- Updated dependencies + - @0xsequence/abi@2.2.15 + - @0xsequence/core@2.2.15 + - @0xsequence/utils@2.2.15 + +## 2.2.14 + +### Patch Changes + +- Somnia Testnet and Monad Testnet +- Updated dependencies + - @0xsequence/abi@2.2.14 + - @0xsequence/core@2.2.14 + - @0xsequence/utils@2.2.14 + +## 2.2.13 + +### Patch Changes + +- Add XR1 to all networks +- Updated dependencies + - @0xsequence/abi@2.2.13 + - @0xsequence/core@2.2.13 + - @0xsequence/utils@2.2.13 + +## 2.2.12 + +### Patch Changes + +- Add XR1 +- Updated dependencies + - @0xsequence/abi@2.2.12 + - @0xsequence/core@2.2.12 + - @0xsequence/utils@2.2.12 + +## 2.2.11 + +### Patch Changes + +- Relayer updates +- Updated dependencies + - @0xsequence/abi@2.2.11 + - @0xsequence/core@2.2.11 + - @0xsequence/utils@2.2.11 + +## 2.2.10 + +### Patch Changes + +- Etherlink support +- Updated dependencies + - @0xsequence/abi@2.2.10 + - @0xsequence/core@2.2.10 + - @0xsequence/utils@2.2.10 + +## 2.2.9 + +### Patch Changes + +- Indexer gateway native token balances +- Updated dependencies + - @0xsequence/abi@2.2.9 + - @0xsequence/core@2.2.9 + - @0xsequence/utils@2.2.9 + +## 2.2.8 + +### Patch Changes + +- Add Moonbeam and Moonbase Alpha +- Updated dependencies + - @0xsequence/abi@2.2.8 + - @0xsequence/core@2.2.8 + - @0xsequence/utils@2.2.8 + +## 2.2.7 + +### Patch Changes + +- Update Builder package +- Updated dependencies + - @0xsequence/abi@2.2.7 + - @0xsequence/core@2.2.7 + - @0xsequence/utils@2.2.7 + +## 2.2.6 + +### Patch Changes + +- Update relayer package +- Updated dependencies + - @0xsequence/abi@2.2.6 + - @0xsequence/core@2.2.6 + - @0xsequence/utils@2.2.6 + +## 2.2.5 + +### Patch Changes + +- auth: fix sequence indexer gateway url +- account: immutable wallet proxy hook +- Updated dependencies +- Updated dependencies + - @0xsequence/abi@2.2.5 + - @0xsequence/core@2.2.5 + - @0xsequence/utils@2.2.5 + +## 2.2.4 + +### Patch Changes + +- network: update soneium mainnet block explorer url +- waas: signTypedData intent support +- Updated dependencies +- Updated dependencies + - @0xsequence/abi@2.2.4 + - @0xsequence/core@2.2.4 + - @0xsequence/utils@2.2.4 + +## 2.2.3 + +### Patch Changes + +- provider: updating initWallet to use connected network configs if they exist +- Updated dependencies + - @0xsequence/abi@2.2.3 + - @0xsequence/core@2.2.3 + - @0xsequence/utils@2.2.3 + +## 2.2.2 + +### Patch Changes + +- pass projectAccessKey to relayer at all times +- Updated dependencies + - @0xsequence/abi@2.2.2 + - @0xsequence/core@2.2.2 + - @0xsequence/utils@2.2.2 + +## 2.2.1 + +### Patch Changes + +- waas-ethers: sign typed data +- Updated dependencies + - @0xsequence/abi@2.2.1 + - @0xsequence/core@2.2.1 + - @0xsequence/utils@2.2.1 + +## 2.2.0 + +### Minor Changes + +- indexer: gateway client +- @0xsequence/builder +- upgrade puppeteer to v23.10.3 + +### Patch Changes + +- Updated dependencies +- Updated dependencies +- Updated dependencies + - @0xsequence/abi@2.2.0 + - @0xsequence/core@2.2.0 + - @0xsequence/utils@2.2.0 + +## 2.1.8 + +### Patch Changes + +- Add Soneium Mainnet +- Updated dependencies + - @0xsequence/abi@2.1.8 + - @0xsequence/core@2.1.8 + - @0xsequence/utils@2.1.8 + +## 2.1.7 + +### Patch Changes + +- guard: pass project access key to guard requests +- Updated dependencies + - @0xsequence/abi@2.1.7 + - @0xsequence/core@2.1.7 + - @0xsequence/utils@2.1.7 + +## 2.1.6 + +### Patch Changes + +- Add LAOS and Telos Testnet chains +- Updated dependencies + - @0xsequence/abi@2.1.6 + - @0xsequence/core@2.1.6 + - @0xsequence/utils@2.1.6 + +## 2.1.5 + +### Patch Changes + +- account: save presigned configuration with reference chain id 1 +- Updated dependencies + - @0xsequence/abi@2.1.5 + - @0xsequence/core@2.1.5 + - @0xsequence/utils@2.1.5 + +## 2.1.4 + +### Patch Changes + +- provider: pass projectAccessKey into MuxMessageProvider +- Updated dependencies + - @0xsequence/abi@2.1.4 + - @0xsequence/core@2.1.4 + - @0xsequence/utils@2.1.4 + +## 2.1.3 + +### Patch Changes + +- waas: time drift date fix due to strange browser quirk +- Updated dependencies + - @0xsequence/abi@2.1.3 + - @0xsequence/core@2.1.3 + - @0xsequence/utils@2.1.3 + +## 2.1.2 + +### Patch Changes + +- provider: export analytics correctly +- Updated dependencies + - @0xsequence/abi@2.1.2 + - @0xsequence/core@2.1.2 + - @0xsequence/utils@2.1.2 + +## 2.1.1 + +### Patch Changes + +- Add LAOS chain support +- Updated dependencies + - @0xsequence/abi@2.1.1 + - @0xsequence/core@2.1.1 + - @0xsequence/utils@2.1.1 + +## 2.1.0 + +### Minor Changes + +- account: forward project access key when estimating fees and sending transactions + +### Patch Changes + +- sessions: save signatures with reference chain id +- Updated dependencies +- Updated dependencies + - @0xsequence/abi@2.1.0 + - @0xsequence/core@2.1.0 + - @0xsequence/utils@2.1.0 + +## 2.0.26 + +### Patch Changes + +- account: fix chain id comparison +- Updated dependencies + - @0xsequence/abi@2.0.26 + - @0xsequence/core@2.0.26 + - @0xsequence/utils@2.0.26 + +## 2.0.25 + +### Patch Changes + +- skale-nebula: deploy gas limit = 10m +- Updated dependencies + - @0xsequence/abi@2.0.25 + - @0xsequence/core@2.0.25 + - @0xsequence/utils@2.0.25 + +## 2.0.24 + +### Patch Changes + +- sessions: arweave: configurable gateway url +- waas: use /status to get time drift before sending any intents +- Updated dependencies +- Updated dependencies + - @0xsequence/abi@2.0.24 + - @0xsequence/core@2.0.24 + - @0xsequence/utils@2.0.24 + +## 2.0.23 + +### Patch Changes + +- Add The Root Network support +- Updated dependencies + - @0xsequence/abi@2.0.23 + - @0xsequence/core@2.0.23 + - @0xsequence/utils@2.0.23 + +## 2.0.22 + +### Patch Changes + +- Add SKALE Nebula Mainnet support +- Updated dependencies + - @0xsequence/abi@2.0.22 + - @0xsequence/core@2.0.22 + - @0xsequence/utils@2.0.22 + +## 2.0.21 + +### Patch Changes + +- account: add publishWitnessFor +- Updated dependencies + - @0xsequence/abi@2.0.21 + - @0xsequence/core@2.0.21 + - @0xsequence/utils@2.0.21 + +## 2.0.20 + +### Patch Changes + +- upgrade deps, and improve waas session status handling +- Updated dependencies + - @0xsequence/abi@2.0.20 + - @0xsequence/core@2.0.20 + - @0xsequence/utils@2.0.20 + +## 2.0.19 + +### Patch Changes + +- Add Immutable zkEVM support +- Updated dependencies + - @0xsequence/abi@2.0.19 + - @0xsequence/core@2.0.19 + - @0xsequence/utils@2.0.19 + +## 2.0.18 + +### Patch Changes + +- waas: new contractCall transaction type +- sessions: add arweave owner +- Updated dependencies +- Updated dependencies + - @0xsequence/abi@2.0.18 + - @0xsequence/core@2.0.18 + - @0xsequence/utils@2.0.18 + +## 2.0.17 + +### Patch Changes + +- update waas auth to clear session before signIn +- Updated dependencies + - @0xsequence/abi@2.0.17 + - @0xsequence/core@2.0.17 + - @0xsequence/utils@2.0.17 + +## 2.0.16 + +### Patch Changes + +- Removed Astar chains +- Updated dependencies + - @0xsequence/abi@2.0.16 + - @0xsequence/core@2.0.16 + - @0xsequence/utils@2.0.16 + +## 2.0.15 + +### Patch Changes + +- indexer: update bindings with token balance additions +- Updated dependencies + - @0xsequence/abi@2.0.15 + - @0xsequence/core@2.0.15 + - @0xsequence/utils@2.0.15 + +## 2.0.14 + +### Patch Changes + +- sessions: arweave config reader +- network: add b3 and apechain mainnet configs +- Updated dependencies +- Updated dependencies + - @0xsequence/abi@2.0.14 + - @0xsequence/core@2.0.14 + - @0xsequence/utils@2.0.14 + +## 2.0.13 + +### Patch Changes + +- network: toy-testnet +- Updated dependencies + - @0xsequence/abi@2.0.13 + - @0xsequence/core@2.0.13 + - @0xsequence/utils@2.0.13 + +## 2.0.12 + +### Patch Changes + +- api: update bindings +- Updated dependencies + - @0xsequence/abi@2.0.12 + - @0xsequence/core@2.0.12 + - @0xsequence/utils@2.0.12 + +## 2.0.11 + +### Patch Changes + +- waas: intents test fix +- api: update bindings +- Updated dependencies +- Updated dependencies + - @0xsequence/abi@2.0.11 + - @0xsequence/core@2.0.11 + - @0xsequence/utils@2.0.11 + +## 2.0.10 + +### Patch Changes + +- network: soneium minato testnet +- Updated dependencies + - @0xsequence/abi@2.0.10 + - @0xsequence/core@2.0.10 + - @0xsequence/utils@2.0.10 + +## 2.0.9 + +### Patch Changes + +- network: fix SKALE network name +- Updated dependencies + - @0xsequence/abi@2.0.9 + - @0xsequence/core@2.0.9 + - @0xsequence/utils@2.0.9 + +## 2.0.8 + +### Patch Changes + +- metadata: update bindings +- Updated dependencies + - @0xsequence/abi@2.0.8 + - @0xsequence/core@2.0.8 + - @0xsequence/utils@2.0.8 + +## 2.0.7 + +### Patch Changes + +- wallet request handler fix +- Updated dependencies + - @0xsequence/abi@2.0.7 + - @0xsequence/core@2.0.7 + - @0xsequence/utils@2.0.7 + +## 2.0.6 + +### Patch Changes + +- network: matic -> pol +- Updated dependencies + - @0xsequence/abi@2.0.6 + - @0xsequence/core@2.0.6 + - @0xsequence/utils@2.0.6 + +## 2.0.5 + +### Patch Changes + +- provider: update databeat to 0.9.2 +- Updated dependencies + - @0xsequence/abi@2.0.5 + - @0xsequence/core@2.0.5 + - @0xsequence/utils@2.0.5 + +## 2.0.4 + +### Patch Changes + +- network: add skale-nebula-testnet +- Updated dependencies + - @0xsequence/abi@2.0.4 + - @0xsequence/core@2.0.4 + - @0xsequence/utils@2.0.4 + +## 2.0.3 + +### Patch Changes + +- waas: check session status in SequenceWaaS.isSignedIn() +- Updated dependencies + - @0xsequence/abi@2.0.3 + - @0xsequence/core@2.0.3 + - @0xsequence/utils@2.0.3 + +## 2.0.2 + +### Patch Changes + +- sessions: property convert serialized bignumber hex value to bigint +- Updated dependencies + - @0xsequence/abi@2.0.2 + - @0xsequence/core@2.0.2 + - @0xsequence/utils@2.0.2 + +## 2.0.1 + +### Patch Changes + +- waas: http signature check for authenticator requests +- provider: unwrap legacy json rpc responses +- use json replacer and reviver for bigints +- Updated dependencies +- Updated dependencies +- Updated dependencies + - @0xsequence/abi@2.0.1 + - @0xsequence/core@2.0.1 + - @0xsequence/utils@2.0.1 + +## 2.0.0 + +### Major Changes + +- ethers v6 + +### Patch Changes + +- Updated dependencies + - @0xsequence/abi@2.0.0 + - @0xsequence/core@2.0.0 + - @0xsequence/utils@2.0.0 + +## 1.10.15 + +### Patch Changes + +- utils: extractProjectIdFromAccessKey +- Updated dependencies + - @0xsequence/abi@1.10.15 + - @0xsequence/core@1.10.15 + - @0xsequence/utils@1.10.15 + +## 1.10.14 + +### Patch Changes + +- network: add borne-testnet to allNetworks +- Updated dependencies + - @0xsequence/abi@1.10.14 + - @0xsequence/core@1.10.14 + - @0xsequence/utils@1.10.14 + +## 1.10.13 + +### Patch Changes + +- network: add borne testnet +- Updated dependencies + - @0xsequence/abi@1.10.13 + - @0xsequence/core@1.10.13 + - @0xsequence/utils@1.10.13 + +## 1.10.12 + +### Patch Changes + +- api: update bindings +- global/window -> globalThis +- Updated dependencies +- Updated dependencies + - @0xsequence/abi@1.10.12 + - @0xsequence/core@1.10.12 + - @0xsequence/utils@1.10.12 + +## 1.10.11 + +### Patch Changes + +- waas: updated intent.gen without webrpc types, errors exported from authenticator.gen +- Updated dependencies + - @0xsequence/abi@1.10.11 + - @0xsequence/core@1.10.11 + - @0xsequence/utils@1.10.11 + +## 1.10.10 + +### Patch Changes + +- metadata: update bindings with new contract collections api +- Updated dependencies + - @0xsequence/abi@1.10.10 + - @0xsequence/core@1.10.10 + - @0xsequence/utils@1.10.10 + +## 1.10.9 + +### Patch Changes + +- waas minor update +- Updated dependencies + - @0xsequence/abi@1.10.9 + - @0xsequence/core@1.10.9 + - @0xsequence/utils@1.10.9 + +## 1.10.8 + +### Patch Changes + +- update metadata bindings +- Updated dependencies + - @0xsequence/abi@1.10.8 + - @0xsequence/core@1.10.8 + - @0xsequence/utils@1.10.8 + +## 1.10.7 + +### Patch Changes + +- minor fixes to waas client +- Updated dependencies + - @0xsequence/abi@1.10.7 + - @0xsequence/core@1.10.7 + - @0xsequence/utils@1.10.7 + +## 1.10.6 + +### Patch Changes + +- metadata: update bindings +- Updated dependencies + - @0xsequence/abi@1.10.6 + - @0xsequence/core@1.10.6 + - @0xsequence/utils@1.10.6 + +## 1.10.5 + +### Patch Changes + +- network: ape-chain-testnet -> apechain-testnet +- Updated dependencies + - @0xsequence/abi@1.10.5 + - @0xsequence/core@1.10.5 + - @0xsequence/utils@1.10.5 + +## 1.10.4 + +### Patch Changes + +- network: add b3-sepolia, ape-chain-testnet, blast, blast-sepolia +- Updated dependencies + - @0xsequence/abi@1.10.4 + - @0xsequence/core@1.10.4 + - @0xsequence/utils@1.10.4 + +## 1.10.3 + +### Patch Changes + +- typing fix +- Updated dependencies + - @0xsequence/abi@1.10.3 + - @0xsequence/core@1.10.3 + - @0xsequence/utils@1.10.3 + +## 1.10.2 + +### Patch Changes + +- - waas: add getIdToken method + - indexer: update api client +- Updated dependencies + - @0xsequence/abi@1.10.2 + - @0xsequence/core@1.10.2 + - @0xsequence/utils@1.10.2 + +## 1.10.1 + +### Patch Changes + +- metadata: update bindings +- Updated dependencies + - @0xsequence/abi@1.10.1 + - @0xsequence/core@1.10.1 + - @0xsequence/utils@1.10.1 + +## 1.10.0 + +### Minor Changes + +- waas release v1.3.0 + +### Patch Changes + +- Updated dependencies + - @0xsequence/abi@1.10.0 + - @0xsequence/core@1.10.0 + - @0xsequence/utils@1.10.0 + +## 1.9.37 + +### Patch Changes + +- network: adds nativeToken data to NetworkMetadata constants +- Updated dependencies + - @0xsequence/abi@1.9.37 + - @0xsequence/core@1.9.37 + - @0xsequence/utils@1.9.37 + +## 1.9.36 + +### Patch Changes + +- guard: export client +- Updated dependencies + - @0xsequence/abi@1.9.36 + - @0xsequence/core@1.9.36 + - @0xsequence/utils@1.9.36 + +## 1.9.35 + +### Patch Changes + +- guard: update bindings +- Updated dependencies + - @0xsequence/abi@1.9.35 + - @0xsequence/core@1.9.35 + - @0xsequence/utils@1.9.35 + +## 1.9.34 + +### Patch Changes + +- waas: always use lowercase email +- Updated dependencies + - @0xsequence/abi@1.9.34 + - @0xsequence/core@1.9.34 + - @0xsequence/utils@1.9.34 + +## 1.9.33 + +### Patch Changes + +- waas: umd build +- Updated dependencies + - @0xsequence/abi@1.9.33 + - @0xsequence/core@1.9.33 + - @0xsequence/utils@1.9.33 + +## 1.9.32 + +### Patch Changes + +- indexer: update bindings +- Updated dependencies + - @0xsequence/abi@1.9.32 + - @0xsequence/core@1.9.32 + - @0xsequence/utils@1.9.32 + +## 1.9.31 + +### Patch Changes + +- metadata: token directory changes +- Updated dependencies + - @0xsequence/abi@1.9.31 + - @0xsequence/core@1.9.31 + - @0xsequence/utils@1.9.31 + +## 1.9.30 + +### Patch Changes + +- update +- Updated dependencies + - @0xsequence/abi@1.9.30 + - @0xsequence/core@1.9.30 + - @0xsequence/utils@1.9.30 + +## 1.9.29 + +### Patch Changes + +- disable gnosis chain +- Updated dependencies + - @0xsequence/abi@1.9.29 + - @0xsequence/core@1.9.29 + - @0xsequence/utils@1.9.29 + +## 1.9.28 + +### Patch Changes + +- add utils/merkletree +- Updated dependencies + - @0xsequence/abi@1.9.28 + - @0xsequence/core@1.9.28 + - @0xsequence/utils@1.9.28 + +## 1.9.27 + +### Patch Changes + +- network: optimistic -> optimism +- waas: remove defaults +- api, sessions: update bindings +- Updated dependencies +- Updated dependencies +- Updated dependencies + - @0xsequence/abi@1.9.27 + - @0xsequence/core@1.9.27 + - @0xsequence/utils@1.9.27 + +## 1.9.26 + +### Patch Changes + +- - add backend interfaces for pluggable interfaces + - introduce @0xsequence/react-native + - update pnpm to lockfile v9 +- Updated dependencies + - @0xsequence/abi@1.9.26 + - @0xsequence/core@1.9.26 + - @0xsequence/utils@1.9.26 + +## 1.9.25 + +### Patch Changes + +- update webrpc clients with new error types +- Updated dependencies + - @0xsequence/abi@1.9.25 + - @0xsequence/core@1.9.25 + - @0xsequence/utils@1.9.25 + +## 1.9.24 + +### Patch Changes + +- waas: add memoryStore backend to localStore +- Updated dependencies + - @0xsequence/abi@1.9.24 + - @0xsequence/core@1.9.24 + - @0xsequence/utils@1.9.24 + +## 1.9.23 + +### Patch Changes + +- update api client bindings +- Updated dependencies + - @0xsequence/abi@1.9.23 + - @0xsequence/core@1.9.23 + - @0xsequence/utils@1.9.23 + +## 1.9.22 + +### Patch Changes + +- update metadata client bindings +- Updated dependencies + - @0xsequence/abi@1.9.22 + - @0xsequence/core@1.9.22 + - @0xsequence/utils@1.9.22 + +## 1.9.21 + +### Patch Changes + +- api client bindings +- Updated dependencies + - @0xsequence/abi@1.9.21 + - @0xsequence/core@1.9.21 + - @0xsequence/utils@1.9.21 + +## 1.9.20 + +### Patch Changes + +- api client bindings update +- Updated dependencies + - @0xsequence/abi@1.9.20 + - @0xsequence/core@1.9.20 + - @0xsequence/utils@1.9.20 + +## 1.9.19 + +### Patch Changes + +- waas update +- Updated dependencies + - @0xsequence/abi@1.9.19 + - @0xsequence/core@1.9.19 + - @0xsequence/utils@1.9.19 + +## 1.9.18 + +### Patch Changes + +- provider: prohibit dangerous functions +- Updated dependencies + - @0xsequence/abi@1.9.18 + - @0xsequence/core@1.9.18 + - @0xsequence/utils@1.9.18 + +## 1.9.17 + +### Patch Changes + +- network: add xr-sepolia +- Updated dependencies + - @0xsequence/abi@1.9.17 + - @0xsequence/core@1.9.17 + - @0xsequence/utils@1.9.17 + +## 1.9.16 + +### Patch Changes + +- waas: sequence.feeOptions +- Updated dependencies + - @0xsequence/abi@1.9.16 + - @0xsequence/core@1.9.16 + - @0xsequence/utils@1.9.16 + +## 1.9.15 + +### Patch Changes + +- metadata: collection external_link field name fix +- Updated dependencies + - @0xsequence/abi@1.9.15 + - @0xsequence/core@1.9.15 + - @0xsequence/utils@1.9.15 + +## 1.9.14 + +### Patch Changes + +- network: astar-zkatana -> astar-zkyoto +- network: deprecate polygon mumbai network +- network: add xai and polygon amoy +- Updated dependencies +- Updated dependencies +- Updated dependencies + - @0xsequence/abi@1.9.14 + - @0xsequence/core@1.9.14 + - @0xsequence/utils@1.9.14 + +## 1.9.13 + +### Patch Changes + +- waas: fix @0xsequence/network dependency +- Updated dependencies + - @0xsequence/abi@1.9.13 + - @0xsequence/core@1.9.13 + - @0xsequence/utils@1.9.13 + +## 1.9.12 + +### Patch Changes + +- indexer: update rpc bindings +- provider: signMessage: Serialize the BytesLike or string message into hexstring before sending +- waas: SessionAuthProof +- Updated dependencies +- Updated dependencies +- Updated dependencies + - @0xsequence/abi@1.9.12 + - @0xsequence/core@1.9.12 + - @0xsequence/utils@1.9.12 + +## 1.9.11 + +### Patch Changes + +- metdata, update rpc bindings +- Updated dependencies + - @0xsequence/abi@1.9.11 + - @0xsequence/core@1.9.11 + - @0xsequence/utils@1.9.11 + +## 1.9.10 + +### Patch Changes + +- update metadata rpc bindings +- Updated dependencies + - @0xsequence/abi@1.9.10 + - @0xsequence/core@1.9.10 + - @0xsequence/utils@1.9.10 + +## 1.9.9 + +### Patch Changes + +- metadata, add SequenceCollections rpc client +- Updated dependencies + - @0xsequence/abi@1.9.9 + - @0xsequence/core@1.9.9 + - @0xsequence/utils@1.9.9 + +## 1.9.8 + +### Patch Changes + +- waas client update +- Updated dependencies + - @0xsequence/abi@1.9.8 + - @0xsequence/core@1.9.8 + - @0xsequence/utils@1.9.8 + +## 1.9.7 + +### Patch Changes + +- update rpc client bindings for api, metadata and relayer +- Updated dependencies + - @0xsequence/abi@1.9.7 + - @0xsequence/core@1.9.7 + - @0xsequence/utils@1.9.7 + +## 1.9.6 + +### Patch Changes + +- waas package update +- Updated dependencies + - @0xsequence/abi@1.9.6 + - @0xsequence/core@1.9.6 + - @0xsequence/utils@1.9.6 + +## 1.9.5 + +### Patch Changes + +- RpcRelayer prioritize project access key +- Updated dependencies + - @0xsequence/abi@1.9.5 + - @0xsequence/core@1.9.5 + - @0xsequence/utils@1.9.5 + +## 1.9.4 + +### Patch Changes + +- waas: fix network dependency +- Updated dependencies + - @0xsequence/abi@1.9.4 + - @0xsequence/core@1.9.4 + - @0xsequence/utils@1.9.4 + +## 1.9.3 + +### Patch Changes + +- provider: don't append access key to RPC url if user has already provided it +- Updated dependencies + - @0xsequence/abi@1.9.3 + - @0xsequence/core@1.9.3 + - @0xsequence/utils@1.9.3 + +## 1.9.2 + +### Patch Changes + +- network: add xai-sepolia +- Updated dependencies + - @0xsequence/abi@1.9.2 + - @0xsequence/core@1.9.2 + - @0xsequence/utils@1.9.2 + +## 1.9.1 + +### Patch Changes + +- analytics fix +- Updated dependencies + - @0xsequence/abi@1.9.1 + - @0xsequence/core@1.9.1 + - @0xsequence/utils@1.9.1 + +## 1.9.0 + +### Minor Changes + +- waas release + +### Patch Changes + +- Updated dependencies + - @0xsequence/abi@1.9.0 + - @0xsequence/core@1.9.0 + - @0xsequence/utils@1.9.0 + +## 1.8.8 + +### Patch Changes + +- update metadata bindings +- Updated dependencies + - @0xsequence/abi@1.8.8 + - @0xsequence/core@1.8.8 + - @0xsequence/utils@1.8.8 + +## 1.8.7 + +### Patch Changes + +- provider: update databeat to 0.9.1 +- Updated dependencies + - @0xsequence/abi@1.8.7 + - @0xsequence/core@1.8.7 + - @0xsequence/utils@1.8.7 + +## 1.8.6 + +### Patch Changes + +- guard: SignedOwnershipProof +- Updated dependencies + - @0xsequence/abi@1.8.6 + - @0xsequence/core@1.8.6 + - @0xsequence/utils@1.8.6 + +## 1.8.5 + +### Patch Changes + +- guard: signOwnershipProof and isSignedOwnershipProof +- Updated dependencies + - @0xsequence/abi@1.8.5 + - @0xsequence/core@1.8.5 + - @0xsequence/utils@1.8.5 + +## 1.8.4 + +### Patch Changes + +- network: add homeverse to networks list +- Updated dependencies + - @0xsequence/abi@1.8.4 + - @0xsequence/core@1.8.4 + - @0xsequence/utils@1.8.4 + +## 1.8.3 + +### Patch Changes + +- api: introduce basic linked wallet support +- Updated dependencies + - @0xsequence/abi@1.8.3 + - @0xsequence/core@1.8.3 + - @0xsequence/utils@1.8.3 + +## 1.8.2 + +### Patch Changes + +- provider: don't initialize analytics unless explicitly requested +- Updated dependencies + - @0xsequence/abi@1.8.2 + - @0xsequence/core@1.8.2 + - @0xsequence/utils@1.8.2 + +## 1.8.1 + +### Patch Changes + +- update to analytics provider +- Updated dependencies + - @0xsequence/abi@1.8.1 + - @0xsequence/core@1.8.1 + - @0xsequence/utils@1.8.1 + +## 1.8.0 + +### Minor Changes + +- provider: project analytics + +### Patch Changes + +- Updated dependencies + - @0xsequence/abi@1.8.0 + - @0xsequence/core@1.8.0 + - @0xsequence/utils@1.8.0 + +## 1.7.2 + +### Patch Changes + +- 0xsequence: ChainId should not be exported as a type +- account, wallet: fix nonce selection +- Updated dependencies +- Updated dependencies + - @0xsequence/abi@1.7.2 + - @0xsequence/core@1.7.2 + - @0xsequence/utils@1.7.2 + +## 1.7.1 + +### Patch Changes + +- network: add missing avalanche logoURI +- Updated dependencies + - @0xsequence/abi@1.7.1 + - @0xsequence/core@1.7.1 + - @0xsequence/utils@1.7.1 + +## 1.7.0 + +### Minor Changes + +- provider: projectAccessKey is now required + +### Patch Changes + +- network: add NetworkMetadata.logoURI property for all networks +- Updated dependencies +- Updated dependencies + - @0xsequence/abi@1.7.0 + - @0xsequence/core@1.7.0 + - @0xsequence/utils@1.7.0 + +## 1.6.3 + +### Patch Changes + +- network list update +- Updated dependencies + - @0xsequence/abi@1.6.3 + - @0xsequence/core@1.6.3 + - @0xsequence/utils@1.6.3 + +## 1.6.2 + +### Patch Changes + +- auth: projectAccessKey option +- wallet: use 12 bytes for random space +- Updated dependencies +- Updated dependencies + - @0xsequence/abi@1.6.2 + - @0xsequence/core@1.6.2 + - @0xsequence/utils@1.6.2 + +## 1.6.1 + +### Patch Changes + +- core: add simple config from subdigest support +- core: fix encode tree with subdigest +- account: implement buildOnChainSignature on Account +- Updated dependencies +- Updated dependencies +- Updated dependencies + - @0xsequence/abi@1.6.1 + - @0xsequence/core@1.6.1 + - @0xsequence/utils@1.6.1 + +## 1.6.0 + +### Minor Changes + +- account, wallet: parallel transactions by default + +### Patch Changes + +- provider: emit disconnect on sign out +- Updated dependencies +- Updated dependencies + - @0xsequence/abi@1.6.0 + - @0xsequence/core@1.6.0 + - @0xsequence/utils@1.6.0 + +## 1.5.0 + +### Minor Changes + +- signhub: add 'signing' signer status + +### Patch Changes + +- auth: Session.open: onAccountAddress callback +- account: allow empty transaction bundles +- Updated dependencies +- Updated dependencies +- Updated dependencies + - @0xsequence/abi@1.5.0 + - @0xsequence/core@1.5.0 + - @0xsequence/utils@1.5.0 + +## 1.4.9 + +### Patch Changes + +- rename SequenceMetadataClient to SequenceMetadata +- Updated dependencies + - @0xsequence/abi@1.4.9 + - @0xsequence/core@1.4.9 + - @0xsequence/utils@1.4.9 + +## 1.4.8 + +### Patch Changes + +- account: Account.getSigners +- Updated dependencies + - @0xsequence/abi@1.4.8 + - @0xsequence/core@1.4.8 + - @0xsequence/utils@1.4.8 + +## 1.4.7 + +### Patch Changes + +- update indexer client bindings +- Updated dependencies + - @0xsequence/abi@1.4.7 + - @0xsequence/core@1.4.7 + - @0xsequence/utils@1.4.7 + +## 1.4.6 + +### Patch Changes + +- - add sepolia networks, mark goerli as deprecated + - update indexer client bindings +- Updated dependencies + - @0xsequence/abi@1.4.6 + - @0xsequence/core@1.4.6 + - @0xsequence/utils@1.4.6 + +## 1.4.5 + +### Patch Changes + +- indexer/metadata: update client bindings +- auth: selectWallet with new address +- Updated dependencies +- Updated dependencies + - @0xsequence/abi@1.4.5 + - @0xsequence/core@1.4.5 + - @0xsequence/utils@1.4.5 + +## 1.4.4 + +### Patch Changes + +- indexer: update bindings +- auth: handle jwt expiry +- Updated dependencies +- Updated dependencies + - @0xsequence/abi@1.4.4 + - @0xsequence/core@1.4.4 + - @0xsequence/utils@1.4.4 + +## 1.4.3 + +### Patch Changes + +- guard: return active status from GuardSigner.getAuthMethods +- Updated dependencies + - @0xsequence/abi@1.4.3 + - @0xsequence/core@1.4.3 + - @0xsequence/utils@1.4.3 + +## 1.4.2 + +### Patch Changes + +- guard: update bindings +- Updated dependencies + - @0xsequence/abi@1.4.2 + - @0xsequence/core@1.4.2 + - @0xsequence/utils@1.4.2 + +## 1.4.1 + +### Patch Changes + +- network: remove unused networks +- signhub: orchestrator interface +- guard: auth methods interface +- guard: update bindings for pin and totp +- guard: no more retry logic +- Updated dependencies +- Updated dependencies +- Updated dependencies +- Updated dependencies +- Updated dependencies + - @0xsequence/abi@1.4.1 + - @0xsequence/core@1.4.1 + - @0xsequence/utils@1.4.1 + +## 1.4.0 + +### Minor Changes + +- project access key support + +### Patch Changes + +- Updated dependencies + - @0xsequence/abi@1.4.0 + - @0xsequence/core@1.4.0 + - @0xsequence/utils@1.4.0 + +## 1.3.0 + +### Minor Changes + +- signhub: account children + +### Patch Changes + +- guard: do not throw when building deploy transaction +- network: snowtrace.io -> subnets.avax.network/c-chain +- Updated dependencies +- Updated dependencies +- Updated dependencies + - @0xsequence/abi@1.3.0 + - @0xsequence/core@1.3.0 + - @0xsequence/utils@1.3.0 + +## 1.2.9 + +### Patch Changes + +- account: AccountSigner.sendTransaction simulateForFeeOptions +- relayer: update bindings +- Updated dependencies +- Updated dependencies + - @0xsequence/abi@1.2.9 + - @0xsequence/core@1.2.9 + - @0xsequence/utils@1.2.9 + +## 1.2.8 + +### Patch Changes + +- rename X-Sequence-Token-Key header to X-Access-Key +- Updated dependencies + - @0xsequence/abi@1.2.8 + - @0xsequence/core@1.2.8 + - @0xsequence/utils@1.2.8 + +## 1.2.7 + +### Patch Changes + +- add x-sequence-token-key to clients +- Updated dependencies + - @0xsequence/abi@1.2.7 + - @0xsequence/core@1.2.7 + - @0xsequence/utils@1.2.7 + +## 1.2.6 + +### Patch Changes + +- Fix bind multicall provider +- Updated dependencies + - @0xsequence/abi@1.2.6 + - @0xsequence/core@1.2.6 + - @0xsequence/utils@1.2.6 + +## 1.2.5 + +### Patch Changes + +- Multicall default configuration fixes +- Updated dependencies + - @0xsequence/abi@1.2.5 + - @0xsequence/core@1.2.5 + - @0xsequence/utils@1.2.5 + +## 1.2.4 + +### Patch Changes + +- provider: Adding missing payment provider types to PaymentProviderOption +- provider: WalletRequestHandler.notifyChainChanged +- Updated dependencies +- Updated dependencies + - @0xsequence/abi@1.2.4 + - @0xsequence/core@1.2.4 + - @0xsequence/utils@1.2.4 + +## 1.2.3 + +### Patch Changes + +- auth, provider: connect to accept optional authorizeNonce +- Updated dependencies + - @0xsequence/abi@1.2.3 + - @0xsequence/core@1.2.3 + - @0xsequence/utils@1.2.3 + +## 1.2.2 + +### Patch Changes + +- provider: allow createContract calls +- core: check for explicit zero address in contract deployments +- Updated dependencies +- Updated dependencies + - @0xsequence/abi@1.2.2 + - @0xsequence/core@1.2.2 + - @0xsequence/utils@1.2.2 + +## 1.2.1 + +### Patch Changes + +- auth: use sequence api chain id as reference chain id if available +- Updated dependencies + - @0xsequence/abi@1.2.1 + - @0xsequence/core@1.2.1 + - @0xsequence/utils@1.2.1 + +## 1.2.0 + +### Minor Changes + +- split services from session, better local support + +### Patch Changes + +- Updated dependencies + - @0xsequence/abi@1.2.0 + - @0xsequence/core@1.2.0 + - @0xsequence/utils@1.2.0 + +## 1.1.15 + +### Patch Changes + +- guard: remove error filtering +- Updated dependencies + - @0xsequence/abi@1.1.15 + - @0xsequence/core@1.1.15 + - @0xsequence/utils@1.1.15 + +## 1.1.14 + +### Patch Changes + +- guard: add GuardSigner.onError +- Updated dependencies + - @0xsequence/abi@1.1.14 + - @0xsequence/core@1.1.14 + - @0xsequence/utils@1.1.14 + +## 1.1.13 + +### Patch Changes + +- provider: pass client version with connect options +- provider: removing large from BannerSize +- Updated dependencies +- Updated dependencies + - @0xsequence/abi@1.1.13 + - @0xsequence/core@1.1.13 + - @0xsequence/utils@1.1.13 + +## 1.1.12 + +### Patch Changes + +- provider: adding bannerSize to ConnectOptions +- Updated dependencies + - @0xsequence/abi@1.1.12 + - @0xsequence/core@1.1.12 + - @0xsequence/utils@1.1.12 + +## 1.1.11 + +### Patch Changes + +- add homeverse configs +- Updated dependencies + - @0xsequence/abi@1.1.11 + - @0xsequence/core@1.1.11 + - @0xsequence/utils@1.1.11 + +## 1.1.10 + +### Patch Changes + +- handle default EIP6492 on send +- Updated dependencies + - @0xsequence/abi@1.1.10 + - @0xsequence/core@1.1.10 + - @0xsequence/utils@1.1.10 + +## 1.1.9 + +### Patch Changes + +- Custom default EIP6492 on client +- Updated dependencies + - @0xsequence/abi@1.1.9 + - @0xsequence/core@1.1.9 + - @0xsequence/utils@1.1.9 + +## 1.1.8 + +### Patch Changes + +- metadata: searchMetadata: add types filter +- Updated dependencies + - @0xsequence/abi@1.1.8 + - @0xsequence/core@1.1.8 + - @0xsequence/utils@1.1.8 + +## 1.1.7 + +### Patch Changes + +- adding signInWith connect settings option to allow dapps to automatically login their users with a certain provider optimizing the normal authentication flow +- Updated dependencies + - @0xsequence/abi@1.1.7 + - @0xsequence/core@1.1.7 + - @0xsequence/utils@1.1.7 + +## 1.1.6 + +### Patch Changes + +- metadata: searchMetadata: add chainID and excludeTokenMetadata filters +- Updated dependencies + - @0xsequence/abi@1.1.6 + - @0xsequence/core@1.1.6 + - @0xsequence/utils@1.1.6 + +## 1.1.5 + +### Patch Changes + +- account: re-compute meta-transaction id for wallet deployment transactions +- Updated dependencies + - @0xsequence/abi@1.1.5 + - @0xsequence/core@1.1.5 + - @0xsequence/utils@1.1.5 + +## 1.1.4 + +### Patch Changes + +- network: rename base-mainnet to base +- provider: override isDefaultChain with ConnectOptions.networkId if provided +- Updated dependencies +- Updated dependencies + - @0xsequence/abi@1.1.4 + - @0xsequence/core@1.1.4 + - @0xsequence/utils@1.1.4 + +## 1.1.3 + +### Patch Changes + +- provider: use network id from transport session +- provider: sign authorization using ConnectOptions.networkId if provided +- Updated dependencies +- Updated dependencies + - @0xsequence/abi@1.1.3 + - @0xsequence/core@1.1.3 + - @0xsequence/utils@1.1.3 + +## 1.1.2 + +### Patch Changes + +- provider: jsonrpc chain id fixes +- Updated dependencies + - @0xsequence/abi@1.1.2 + - @0xsequence/core@1.1.2 + - @0xsequence/utils@1.1.2 + +## 1.1.1 + +### Patch Changes + +- network: add base mainnet and sepolia +- provider: reject toxic transaction requests +- Updated dependencies +- Updated dependencies + - @0xsequence/abi@1.1.1 + - @0xsequence/core@1.1.1 + - @0xsequence/utils@1.1.1 + +## 1.1.0 + +### Minor Changes + +- Refactor dapp facing provider + +### Patch Changes + +- Updated dependencies + - @0xsequence/abi@1.1.0 + - @0xsequence/core@1.1.0 + - @0xsequence/utils@1.1.0 + +## 1.0.5 + +### Patch Changes + +- network: export network constants +- guard: use the correct global for fetch +- network: nova-explorer.arbitrum.io -> nova.arbiscan.io +- Updated dependencies +- Updated dependencies +- Updated dependencies + - @0xsequence/abi@1.0.5 + - @0xsequence/core@1.0.5 + - @0xsequence/utils@1.0.5 + +## 1.0.4 + +### Patch Changes + +- provider: accept name or number for networkId +- Updated dependencies + - @0xsequence/abi@1.0.4 + - @0xsequence/core@1.0.4 + - @0xsequence/utils@1.0.4 + +## 1.0.3 + +### Patch Changes + +- Simpler isValidSignature helpers +- Updated dependencies + - @0xsequence/abi@1.0.3 + - @0xsequence/core@1.0.3 + - @0xsequence/utils@1.0.3 + +## 1.0.2 + +### Patch Changes + +- add extra signature validation utils methods +- Updated dependencies + - @0xsequence/abi@1.0.2 + - @0xsequence/core@1.0.2 + - @0xsequence/utils@1.0.2 + +## 1.0.1 + +### Patch Changes + +- add homeverse testnet +- Updated dependencies + - @0xsequence/abi@1.0.1 + - @0xsequence/core@1.0.1 + - @0xsequence/utils@1.0.1 + +## 1.0.0 + +### Major Changes + +- https://sequence.xyz/blog/sequence-wallet-light-state-sync-full-merkle-wallets + +### Patch Changes + +- Updated dependencies + - @0xsequence/abi@1.0.0 + - @0xsequence/core@1.0.0 + - @0xsequence/utils@1.0.0 + +## 0.43.34 + +### Patch Changes + +- auth: no jwt for indexer +- Updated dependencies + - @0xsequence/abi@0.43.34 + - @0xsequence/config@0.43.34 + - @0xsequence/network@0.43.34 + - @0xsequence/transactions@0.43.34 + - @0xsequence/utils@0.43.34 + +## 0.43.33 + +### Patch Changes + +- Adding onConnectOptionsChange handler to WalletRequestHandler +- Updated dependencies + - @0xsequence/abi@0.43.33 + - @0xsequence/config@0.43.33 + - @0xsequence/network@0.43.33 + - @0xsequence/transactions@0.43.33 + - @0xsequence/utils@0.43.33 + +## 0.43.32 + +### Patch Changes + +- add Base Goerli network +- Updated dependencies + - @0xsequence/abi@0.43.32 + - @0xsequence/config@0.43.32 + - @0xsequence/network@0.43.32 + - @0xsequence/transactions@0.43.32 + - @0xsequence/utils@0.43.32 + +## 0.43.31 + +### Patch Changes + +- remove AuxDataProvider, add promptSignInConnect +- Updated dependencies + - @0xsequence/abi@0.43.31 + - @0xsequence/config@0.43.31 + - @0xsequence/network@0.43.31 + - @0xsequence/transactions@0.43.31 + - @0xsequence/utils@0.43.31 + +## 0.43.30 + +### Patch Changes + +- add arbitrum goerli testnet +- Updated dependencies + - @0xsequence/abi@0.43.30 + - @0xsequence/config@0.43.30 + - @0xsequence/network@0.43.30 + - @0xsequence/transactions@0.43.30 + - @0xsequence/utils@0.43.30 + +## 0.43.29 + +### Patch Changes + +- provider: check availability of window object +- Updated dependencies + - @0xsequence/abi@0.43.29 + - @0xsequence/config@0.43.29 + - @0xsequence/network@0.43.29 + - @0xsequence/transactions@0.43.29 + - @0xsequence/utils@0.43.29 + +## 0.43.28 + +### Patch Changes + +- update api bindings +- Updated dependencies + - @0xsequence/abi@0.43.28 + - @0xsequence/config@0.43.28 + - @0xsequence/network@0.43.28 + - @0xsequence/transactions@0.43.28 + - @0xsequence/utils@0.43.28 + +## 0.43.27 + +### Patch Changes + +- Add rpc is sequence method +- Updated dependencies + - @0xsequence/abi@0.43.27 + - @0xsequence/config@0.43.27 + - @0xsequence/network@0.43.27 + - @0xsequence/transactions@0.43.27 + - @0xsequence/utils@0.43.27 + +## 0.43.26 + +### Patch Changes + +- add zkevm url to enum +- Updated dependencies + - @0xsequence/abi@0.43.26 + - @0xsequence/config@0.43.26 + - @0xsequence/network@0.43.26 + - @0xsequence/transactions@0.43.26 + - @0xsequence/utils@0.43.26 + +## 0.43.25 + +### Patch Changes + +- added polygon zkevm to mainnet networks +- Updated dependencies + - @0xsequence/abi@0.43.25 + - @0xsequence/config@0.43.25 + - @0xsequence/network@0.43.25 + - @0xsequence/transactions@0.43.25 + - @0xsequence/utils@0.43.25 + +## 0.43.24 + +### Patch Changes + +- name change from zkevm to polygon-zkevm +- Updated dependencies + - @0xsequence/abi@0.43.24 + - @0xsequence/config@0.43.24 + - @0xsequence/network@0.43.24 + - @0xsequence/transactions@0.43.24 + - @0xsequence/utils@0.43.24 + +## 0.43.23 + +### Patch Changes + +- update zkEVM name to Polygon zkEVM +- Updated dependencies + - @0xsequence/abi@0.43.23 + - @0xsequence/config@0.43.23 + - @0xsequence/network@0.43.23 + - @0xsequence/transactions@0.43.23 + - @0xsequence/utils@0.43.23 + +## 0.43.22 + +### Patch Changes + +- add zkevm chain +- Updated dependencies + - @0xsequence/abi@0.43.22 + - @0xsequence/config@0.43.22 + - @0xsequence/network@0.43.22 + - @0xsequence/transactions@0.43.22 + - @0xsequence/utils@0.43.22 + +## 0.43.21 + +### Patch Changes + +- api: update client bindings +- Updated dependencies + - @0xsequence/abi@0.43.21 + - @0xsequence/config@0.43.21 + - @0xsequence/network@0.43.21 + - @0xsequence/transactions@0.43.21 + - @0xsequence/utils@0.43.21 + +## 0.43.20 + +### Patch Changes + +- indexer: update bindings +- Updated dependencies + - @0xsequence/abi@0.43.20 + - @0xsequence/config@0.43.20 + - @0xsequence/network@0.43.20 + - @0xsequence/transactions@0.43.20 + - @0xsequence/utils@0.43.20 + +## 0.43.19 + +### Patch Changes + +- session proof update +- Updated dependencies + - @0xsequence/abi@0.43.19 + - @0xsequence/config@0.43.19 + - @0xsequence/network@0.43.19 + - @0xsequence/transactions@0.43.19 + - @0xsequence/utils@0.43.19 + +## 0.43.18 + +### Patch Changes + +- rpc client global check, hardening +- Updated dependencies + - @0xsequence/abi@0.43.18 + - @0xsequence/config@0.43.18 + - @0xsequence/network@0.43.18 + - @0xsequence/transactions@0.43.18 + - @0xsequence/utils@0.43.18 + +## 0.43.17 + +### Patch Changes + +- rpc clients, check of 'global' is defined +- Updated dependencies + - @0xsequence/abi@0.43.17 + - @0xsequence/config@0.43.17 + - @0xsequence/network@0.43.17 + - @0xsequence/transactions@0.43.17 + - @0xsequence/utils@0.43.17 + +## 0.43.16 + +### Patch Changes + +- ethers peerDep to v5, update rpc client global use +- Updated dependencies + - @0xsequence/abi@0.43.16 + - @0xsequence/config@0.43.16 + - @0xsequence/network@0.43.16 + - @0xsequence/transactions@0.43.16 + - @0xsequence/utils@0.43.16 + +## 0.43.15 + +### Patch Changes + +- - provider: expand receiver type on some util methods +- Updated dependencies + - @0xsequence/abi@0.43.15 + - @0xsequence/config@0.43.15 + - @0xsequence/network@0.43.15 + - @0xsequence/transactions@0.43.15 + - @0xsequence/utils@0.43.15 + +## 0.43.14 + +### Patch Changes + +- bump +- Updated dependencies + - @0xsequence/abi@0.43.14 + - @0xsequence/config@0.43.14 + - @0xsequence/network@0.43.14 + - @0xsequence/transactions@0.43.14 + - @0xsequence/utils@0.43.14 + +## 0.43.13 + +### Patch Changes + +- update rpc bindings +- Updated dependencies + - @0xsequence/abi@0.43.13 + - @0xsequence/config@0.43.13 + - @0xsequence/network@0.43.13 + - @0xsequence/transactions@0.43.13 + - @0xsequence/utils@0.43.13 + +## 0.43.12 + +### Patch Changes + +- provider: single wallet init, and add new unregisterWallet() method +- Updated dependencies + - @0xsequence/abi@0.43.12 + - @0xsequence/config@0.43.12 + - @0xsequence/network@0.43.12 + - @0xsequence/transactions@0.43.12 + - @0xsequence/utils@0.43.12 + +## 0.43.11 + +### Patch Changes + +- fix lockfiles +- re-add mocha type deleter +- Updated dependencies +- Updated dependencies + - @0xsequence/abi@0.43.11 + - @0xsequence/config@0.43.11 + - @0xsequence/network@0.43.11 + - @0xsequence/transactions@0.43.11 + - @0xsequence/utils@0.43.11 + +## 0.43.10 + +### Patch Changes + +- various improvements +- Updated dependencies + - @0xsequence/abi@0.43.10 + - @0xsequence/config@0.43.10 + - @0xsequence/network@0.43.10 + - @0xsequence/transactions@0.43.10 + - @0xsequence/utils@0.43.10 + +## 0.43.9 + +### Patch Changes + +- update deps +- Updated dependencies + - @0xsequence/abi@0.43.9 + - @0xsequence/config@0.43.9 + - @0xsequence/network@0.43.9 + - @0xsequence/transactions@0.43.9 + - @0xsequence/utils@0.43.9 + +## 0.43.8 + +### Patch Changes + +- network: JsonRpcProvider with caching +- Updated dependencies + - @0xsequence/abi@0.43.8 + - @0xsequence/config@0.43.8 + - @0xsequence/network@0.43.8 + - @0xsequence/transactions@0.43.8 + - @0xsequence/utils@0.43.8 + +## 0.43.7 + +### Patch Changes + +- provider: fix wallet network init +- Updated dependencies + - @0xsequence/abi@0.43.7 + - @0xsequence/config@0.43.7 + - @0xsequence/transactions@0.43.7 + - @0xsequence/utils@0.43.7 + +## 0.43.6 + +### Patch Changes + +- metadatata: update rpc bindings +- Updated dependencies + - @0xsequence/abi@0.43.6 + - @0xsequence/config@0.43.6 + - @0xsequence/transactions@0.43.6 + - @0xsequence/utils@0.43.6 + +## 0.43.5 + +### Patch Changes + +- provider: do not set default network for connect messages +- provider: forward missing error message +- Updated dependencies +- Updated dependencies + - @0xsequence/abi@0.43.5 + - @0xsequence/config@0.43.5 + - @0xsequence/transactions@0.43.5 + - @0xsequence/utils@0.43.5 + +## 0.43.4 + +### Patch Changes + +- no-change version bump to fix incorrectly tagged snapshot build +- Updated dependencies + - @0xsequence/abi@0.43.4 + - @0xsequence/config@0.43.4 + - @0xsequence/transactions@0.43.4 + - @0xsequence/utils@0.43.4 + +## 0.43.3 + +### Patch Changes + +- metadata: update bindings +- Updated dependencies + - @0xsequence/abi@0.43.3 + - @0xsequence/config@0.43.3 + - @0xsequence/transactions@0.43.3 + - @0xsequence/utils@0.43.3 + +## 0.43.2 + +### Patch Changes + +- provider: implement connectUnchecked +- Updated dependencies + - @0xsequence/abi@0.43.2 + - @0xsequence/config@0.43.2 + - @0xsequence/transactions@0.43.2 + - @0xsequence/utils@0.43.2 + +## 0.43.1 + +### Patch Changes + +- update to latest ethauth dep +- Updated dependencies + - @0xsequence/abi@0.43.1 + - @0xsequence/config@0.43.1 + - @0xsequence/transactions@0.43.1 + - @0xsequence/utils@0.43.1 + +## 0.43.0 + +### Minor Changes + +- move ethers to a peer dependency + +### Patch Changes + +- Updated dependencies + - @0xsequence/abi@0.43.0 + - @0xsequence/config@0.43.0 + - @0xsequence/transactions@0.43.0 + - @0xsequence/utils@0.43.0 + +## 0.42.10 + +### Patch Changes + +- add auxDataProvider +- Updated dependencies + - @0xsequence/abi@0.42.10 + - @0xsequence/config@0.42.10 + - @0xsequence/transactions@0.42.10 + - @0xsequence/utils@0.42.10 + +## 0.42.9 + +### Patch Changes + +- provider: add eip-191 exceptions +- Updated dependencies + - @0xsequence/abi@0.42.9 + - @0xsequence/config@0.42.9 + - @0xsequence/transactions@0.42.9 + - @0xsequence/utils@0.42.9 + +## 0.42.8 + +### Patch Changes + +- provider: skip setting intent origin if we're unity plugin +- Updated dependencies + - @0xsequence/abi@0.42.8 + - @0xsequence/config@0.42.8 + - @0xsequence/transactions@0.42.8 + - @0xsequence/utils@0.42.8 + +## 0.42.7 + +### Patch Changes + +- Add sign in options to connection settings +- Updated dependencies + - @0xsequence/abi@0.42.7 + - @0xsequence/config@0.42.7 + - @0xsequence/transactions@0.42.7 + - @0xsequence/utils@0.42.7 + +## 0.42.6 + +### Patch Changes + +- api bindings update +- Updated dependencies + - @0xsequence/abi@0.42.6 + - @0xsequence/config@0.42.6 + - @0xsequence/transactions@0.42.6 + - @0xsequence/utils@0.42.6 + +## 0.42.5 + +### Patch Changes + +- relayer: don't treat missing receipt as hard failure +- Updated dependencies + - @0xsequence/abi@0.42.5 + - @0xsequence/config@0.42.5 + - @0xsequence/transactions@0.42.5 + - @0xsequence/utils@0.42.5 + +## 0.42.4 + +### Patch Changes + +- provider: add custom app protocol to connect options +- Updated dependencies + - @0xsequence/abi@0.42.4 + - @0xsequence/config@0.42.4 + - @0xsequence/transactions@0.42.4 + - @0xsequence/utils@0.42.4 + +## 0.42.3 + +### Patch Changes + +- update api bindings +- Updated dependencies + - @0xsequence/abi@0.42.3 + - @0xsequence/config@0.42.3 + - @0xsequence/transactions@0.42.3 + - @0xsequence/utils@0.42.3 + +## 0.42.2 + +### Patch Changes + +- disable rinkeby network +- Updated dependencies + - @0xsequence/abi@0.42.2 + - @0xsequence/config@0.42.2 + - @0xsequence/transactions@0.42.2 + - @0xsequence/utils@0.42.2 + +## 0.42.1 + +### Patch Changes + +- wallet: optional waitForReceipt parameter +- Updated dependencies + - @0xsequence/abi@0.42.1 + - @0xsequence/config@0.42.1 + - @0xsequence/transactions@0.42.1 + - @0xsequence/utils@0.42.1 + +## 0.42.0 + +### Minor Changes + +- relayer: estimateGasLimits -> simulate +- add simulator package + +### Patch Changes + +- transactions: fix flattenAuxTransactions +- provider: only filter nullish values +- provider: re-map transaction 'gas' back to 'gasLimit' +- Updated dependencies +- Updated dependencies +- Updated dependencies +- Updated dependencies +- Updated dependencies + - @0xsequence/abi@0.42.0 + - @0xsequence/config@0.42.0 + - @0xsequence/transactions@0.42.0 + - @0xsequence/utils@0.42.0 + +## 0.41.3 + +### Patch Changes + +- api bindings update +- Updated dependencies + - @0xsequence/abi@0.41.3 + - @0xsequence/config@0.41.3 + - @0xsequence/transactions@0.41.3 + - @0xsequence/utils@0.41.3 + +## 0.41.2 + +### Patch Changes + +- api bindings update +- Updated dependencies + - @0xsequence/abi@0.41.2 + - @0xsequence/config@0.41.2 + - @0xsequence/transactions@0.41.2 + - @0xsequence/utils@0.41.2 + +## 0.41.1 + +### Patch Changes + +- update default networks +- Updated dependencies + - @0xsequence/abi@0.41.1 + - @0xsequence/config@0.41.1 + - @0xsequence/transactions@0.41.1 + - @0xsequence/utils@0.41.1 + +## 0.41.0 + +### Minor Changes + +- relayer: fix Relayer.wait() interface + + The interface for calling Relayer.wait() has changed. Instead of a single optional ill-defined timeout/delay parameter, there are three optional parameters, in order: + + - timeout: the maximum time to wait for the transaction receipt + - delay: the polling interval, i.e. the time to wait between requests + - maxFails: the maximum number of hard failures to tolerate before giving up + + Please update your codebase accordingly. + +- relayer: add optional waitForReceipt parameter to Relayer.relay + + The behaviour of Relayer.relay() was not well-defined with respect to whether or not it waited for a receipt. + This change allows the caller to specify whether to wait or not, with the default behaviour being to wait. + +### Patch Changes + +- relayer: wait receipt retry logic +- fix wrapped object error +- provider: forward delegateCall and revertOnError transaction fields +- Updated dependencies +- Updated dependencies +- Updated dependencies +- Updated dependencies +- Updated dependencies + - @0xsequence/abi@0.41.0 + - @0xsequence/config@0.41.0 + - @0xsequence/transactions@0.41.0 + - @0xsequence/utils@0.41.0 + +## 0.40.6 + +### Patch Changes + +- add arbitrum-nova chain +- Updated dependencies + - @0xsequence/abi@0.40.6 + - @0xsequence/config@0.40.6 + - @0xsequence/transactions@0.40.6 + - @0xsequence/utils@0.40.6 + +## 0.40.5 + +### Patch Changes + +- api: update bindings +- Updated dependencies + - @0xsequence/abi@0.40.5 + - @0xsequence/config@0.40.5 + - @0xsequence/transactions@0.40.5 + - @0xsequence/utils@0.40.5 + +## 0.40.4 + +### Patch Changes + +- add unreal transport +- Updated dependencies + - @0xsequence/abi@0.40.4 + - @0xsequence/config@0.40.4 + - @0xsequence/transactions@0.40.4 + - @0xsequence/utils@0.40.4 + +## 0.40.3 + +### Patch Changes + +- provider: fix MessageToSign message type +- Updated dependencies + - @0xsequence/abi@0.40.3 + - @0xsequence/config@0.40.3 + - @0xsequence/transactions@0.40.3 + - @0xsequence/utils@0.40.3 + +## 0.40.2 + +### Patch Changes + +- Wallet provider, loadSession method +- Updated dependencies + - @0xsequence/abi@0.40.2 + - @0xsequence/config@0.40.2 + - @0xsequence/transactions@0.40.2 + - @0xsequence/utils@0.40.2 + +## 0.40.1 + +### Patch Changes + +- export sequence.initWallet and sequence.getWallet +- Updated dependencies + - @0xsequence/abi@0.40.1 + - @0xsequence/config@0.40.1 + - @0xsequence/transactions@0.40.1 + - @0xsequence/utils@0.40.1 + +## 0.40.0 + +### Minor Changes + +- add sequence.initWallet(network, config) and sequence.getWallet() helper methods + +### Patch Changes + +- Updated dependencies + - @0xsequence/abi@0.40.0 + - @0xsequence/config@0.40.0 + - @0xsequence/transactions@0.40.0 + - @0xsequence/utils@0.40.0 + +## 0.39.6 + +### Patch Changes + +- indexer: update client bindings +- Updated dependencies + - @0xsequence/abi@0.39.6 + - @0xsequence/config@0.39.6 + - @0xsequence/transactions@0.39.6 + - @0xsequence/utils@0.39.6 + +## 0.39.5 + +### Patch Changes + +- provider: fix networkRpcUrl config option +- Updated dependencies + - @0xsequence/abi@0.39.5 + - @0xsequence/config@0.39.5 + - @0xsequence/transactions@0.39.5 + - @0xsequence/utils@0.39.5 + +## 0.39.4 + +### Patch Changes + +- api: update client bindings +- Updated dependencies + - @0xsequence/abi@0.39.4 + - @0xsequence/config@0.39.4 + - @0xsequence/transactions@0.39.4 + - @0xsequence/utils@0.39.4 + +## 0.39.3 + +### Patch Changes + +- add request method on Web3Provider +- Updated dependencies + - @0xsequence/abi@0.39.3 + - @0xsequence/config@0.39.3 + - @0xsequence/transactions@0.39.3 + - @0xsequence/utils@0.39.3 + +## 0.39.2 + +### Patch Changes + +- update umd name +- Updated dependencies + - @0xsequence/abi@0.39.2 + - @0xsequence/config@0.39.2 + - @0xsequence/transactions@0.39.2 + - @0xsequence/utils@0.39.2 + +## 0.39.1 + +### Patch Changes + +- add Aurora network +- add origin info for accountsChanged event to handle it per dapp +- Updated dependencies +- Updated dependencies + - @0xsequence/abi@0.39.1 + - @0xsequence/config@0.39.1 + - @0xsequence/transactions@0.39.1 + - @0xsequence/utils@0.39.1 + +## 0.39.0 + +### Minor Changes + +- abstract window.localStorage to interface type + +### Patch Changes + +- Updated dependencies + - @0xsequence/abi@0.39.0 + - @0xsequence/config@0.39.0 + - @0xsequence/transactions@0.39.0 + - @0xsequence/utils@0.39.0 + +## 0.38.2 + +### Patch Changes + +- provider: add Settings.defaultPurchaseAmount +- Updated dependencies + - @0xsequence/abi@0.38.2 + - @0xsequence/config@0.38.2 + - @0xsequence/transactions@0.38.2 + - @0xsequence/utils@0.38.2 + +## 0.38.1 + +### Patch Changes + +- update api and metadata rpc bindings +- Updated dependencies + - @0xsequence/abi@0.38.1 + - @0xsequence/config@0.38.1 + - @0xsequence/transactions@0.38.1 + - @0xsequence/utils@0.38.1 + +## 0.38.0 + +### Minor Changes + +- api: update bindings, change TokenPrice interface +- bridge: remove @0xsequence/bridge package +- api: update bindings, rename ContractCallArg to TupleComponent + +### Patch Changes + +- Updated dependencies +- Updated dependencies +- Updated dependencies + - @0xsequence/abi@0.38.0 + - @0xsequence/config@0.38.0 + - @0xsequence/transactions@0.38.0 + - @0xsequence/utils@0.38.0 + +## 0.37.1 + +### Patch Changes + +- Add back sortNetworks - Removing sorting was a breaking change for dapps on older versions which directly integrate sequence. +- Updated dependencies + - @0xsequence/abi@0.37.1 + - @0xsequence/config@0.37.1 + - @0xsequence/transactions@0.37.1 + - @0xsequence/utils@0.37.1 + +## 0.37.0 + +### Minor Changes + +- network related fixes and improvements +- api: bindings: exchange rate lookups + +### Patch Changes + +- Updated dependencies +- Updated dependencies + - @0xsequence/abi@0.37.0 + - @0xsequence/config@0.37.0 + - @0xsequence/transactions@0.37.0 + - @0xsequence/utils@0.37.0 + +## 0.36.13 + +### Patch Changes + +- api: update bindings with new price endpoints +- Updated dependencies + - @0xsequence/abi@0.36.13 + - @0xsequence/config@0.36.13 + - @0xsequence/transactions@0.36.13 + - @0xsequence/utils@0.36.13 + +## 0.36.12 + +### Patch Changes + +- wallet: skip remote signers if not needed +- auth: check that signature meets threshold before requesting auth token +- Updated dependencies +- Updated dependencies + - @0xsequence/abi@0.36.12 + - @0xsequence/config@0.36.12 + - @0xsequence/transactions@0.36.12 + - @0xsequence/utils@0.36.12 + +## 0.36.11 + +### Patch Changes + +- Prefix EIP191 message on wallet-request-handler +- Updated dependencies + - @0xsequence/abi@0.36.11 + - @0xsequence/config@0.36.11 + - @0xsequence/transactions@0.36.11 + - @0xsequence/utils@0.36.11 + +## 0.36.10 + +### Patch Changes + +- support bannerUrl on connect +- Updated dependencies + - @0xsequence/abi@0.36.10 + - @0xsequence/config@0.36.10 + - @0xsequence/transactions@0.36.10 + - @0xsequence/utils@0.36.10 + +## 0.36.9 + +### Patch Changes + +- minor dev xp improvements +- Updated dependencies + - @0xsequence/abi@0.36.9 + - @0xsequence/config@0.36.9 + - @0xsequence/transactions@0.36.9 + - @0xsequence/utils@0.36.9 + +## 0.36.8 + +### Patch Changes + +- more connect options (theme, payment providers, funding currencies) +- Updated dependencies + - @0xsequence/abi@0.36.8 + - @0xsequence/config@0.36.8 + - @0xsequence/transactions@0.36.8 + - @0xsequence/utils@0.36.8 + +## 0.36.7 + +### Patch Changes + +- fix missing break +- Updated dependencies + - @0xsequence/abi@0.36.7 + - @0xsequence/config@0.36.7 + - @0xsequence/transactions@0.36.7 + - @0xsequence/utils@0.36.7 + +## 0.36.6 + +### Patch Changes + +- wallet_switchEthereumChain support +- Updated dependencies + - @0xsequence/abi@0.36.6 + - @0xsequence/config@0.36.6 + - @0xsequence/transactions@0.36.6 + - @0xsequence/utils@0.36.6 + +## 0.36.5 + +### Patch Changes + +- auth: bump ethauth to 0.7.0 + network, wallet: don't assume position of auth network in list + api/indexer/metadata: trim trailing slash on hostname, and add endpoint urls + relayer: Allow to specify local relayer transaction parameters like gas price or gas limit +- Updated dependencies + - @0xsequence/abi@0.36.5 + - @0xsequence/config@0.36.5 + - @0xsequence/transactions@0.36.5 + - @0xsequence/utils@0.36.5 + +## 0.36.4 + +### Patch Changes + +- Updating list of chain ids to include other ethereum compatible chains +- Updated dependencies + - @0xsequence/abi@0.36.4 + - @0xsequence/config@0.36.4 + - @0xsequence/transactions@0.36.4 + - @0xsequence/utils@0.36.4 + +## 0.36.3 + +### Patch Changes + +- provider: pass connect options to prompter methods +- Updated dependencies + - @0xsequence/abi@0.36.3 + - @0xsequence/config@0.36.3 + - @0xsequence/transactions@0.36.3 + - @0xsequence/utils@0.36.3 + +## 0.36.2 + +### Patch Changes + +- transactions: Setting target to 0x0 when empty to during SequenceTxAbiEncode +- Updated dependencies + - @0xsequence/abi@0.36.2 + - @0xsequence/config@0.36.2 + - @0xsequence/transactions@0.36.2 + - @0xsequence/utils@0.36.2 + +## 0.36.1 + +### Patch Changes + +- metadata: update client with more fields +- Updated dependencies + - @0xsequence/abi@0.36.1 + - @0xsequence/config@0.36.1 + - @0xsequence/transactions@0.36.1 + - @0xsequence/utils@0.36.1 + +## 0.36.0 + +### Minor Changes + +- relayer, wallet: fee quote support + +### Patch Changes + +- Updated dependencies + - @0xsequence/abi@0.36.0 + - @0xsequence/config@0.36.0 + - @0xsequence/transactions@0.36.0 + - @0xsequence/utils@0.36.0 + +## 0.35.12 + +### Patch Changes + +- provider: rename wallet.commands to wallet.utils +- Updated dependencies + - @0xsequence/abi@0.35.12 + - @0xsequence/config@0.35.12 + - @0xsequence/transactions@0.35.12 + - @0xsequence/utils@0.35.12 + +## 0.35.11 + +### Patch Changes + +- provider/utils: smoother message validation +- Updated dependencies + - @0xsequence/abi@0.35.11 + - @0xsequence/config@0.35.11 + - @0xsequence/transactions@0.35.11 + - @0xsequence/utils@0.35.11 + +## 0.35.10 + +### Patch Changes + +- upgrade deps +- Updated dependencies + - @0xsequence/abi@0.35.10 + - @0xsequence/config@0.35.10 + - @0xsequence/transactions@0.35.10 + - @0xsequence/utils@0.35.10 + +## 0.35.9 + +### Patch Changes + +- provider: window-transport override event handlers with new wallet instance +- Updated dependencies + - @0xsequence/abi@0.35.9 + - @0xsequence/config@0.35.9 + - @0xsequence/transactions@0.35.9 + - @0xsequence/utils@0.35.9 + +## 0.35.8 + +### Patch Changes + +- provider: async wallet sign in improvements +- Updated dependencies + - @0xsequence/abi@0.35.8 + - @0xsequence/config@0.35.8 + - @0xsequence/transactions@0.35.8 + - @0xsequence/utils@0.35.8 + +## 0.35.7 + +### Patch Changes + +- config: cache wallet configs +- Updated dependencies + - @0xsequence/abi@0.35.7 + - @0xsequence/config@0.35.7 + - @0xsequence/transactions@0.35.7 + - @0xsequence/utils@0.35.7 + +## 0.35.6 + +### Patch Changes + +- provider: support async signin of wallet request handler +- Updated dependencies + - @0xsequence/abi@0.35.6 + - @0xsequence/config@0.35.6 + - @0xsequence/transactions@0.35.6 + - @0xsequence/utils@0.35.6 + +## 0.35.5 + +### Patch Changes + +- wallet: skip threshold check during fee estimation +- Updated dependencies + - @0xsequence/abi@0.35.5 + - @0xsequence/config@0.35.5 + - @0xsequence/transactions@0.35.5 + - @0xsequence/utils@0.35.5 + +## 0.35.4 + +### Patch Changes + +- - browser extension mode, center window +- Updated dependencies + - @0xsequence/abi@0.35.4 + - @0xsequence/config@0.35.4 + - @0xsequence/transactions@0.35.4 + - @0xsequence/utils@0.35.4 + +## 0.35.3 + +### Patch Changes + +- - update window position when in browser extension mode +- Updated dependencies + - @0xsequence/abi@0.35.3 + - @0xsequence/config@0.35.3 + - @0xsequence/transactions@0.35.3 + - @0xsequence/utils@0.35.3 + +## 0.35.2 + +### Patch Changes + +- - provider: WindowMessageHandler accept optional windowHref +- Updated dependencies + - @0xsequence/abi@0.35.2 + - @0xsequence/config@0.35.2 + - @0xsequence/transactions@0.35.2 + - @0xsequence/utils@0.35.2 + +## 0.35.1 + +### Patch Changes + +- wallet: update config on undeployed too +- Updated dependencies + - @0xsequence/abi@0.35.1 + - @0xsequence/config@0.35.1 + - @0xsequence/transactions@0.35.1 + - @0xsequence/utils@0.35.1 + +## 0.35.0 + +### Minor Changes + +- - config: add buildStubSignature + - provider: add checks to signing cases for wallet deployment and config statuses + - provider: add prompt for wallet deployment + - relayer: add BaseRelayer.prependWalletDeploy + - relayer: add Relayer.feeOptions + - relayer: account for wallet deployment in fee estimation + - transactions: add fromTransactionish + - wallet: add Account.prependConfigUpdate + - wallet: add Account.getFeeOptions + +### Patch Changes + +- Updated dependencies + - @0xsequence/abi@0.35.0 + - @0xsequence/config@0.35.0 + - @0xsequence/transactions@0.35.0 + - @0xsequence/utils@0.35.0 + +## 0.34.0 + +### Minor Changes + +- - upgrade deps + +### Patch Changes + +- Updated dependencies + - @0xsequence/abi@0.34.0 + - @0xsequence/config@0.34.0 + - @0xsequence/transactions@0.34.0 + - @0xsequence/utils@0.34.0 + +## 0.33.2 + +### Patch Changes + +- Updated dependencies + - @0xsequence/transactions@0.33.2 + +## 0.31.1 + +### Patch Changes + +- relayer: add Relayer.simulate + +## 0.31.0 + +### Minor Changes + +- - upgrading to ethers v5.5 + +### Patch Changes + +- Updated dependencies + - @0xsequence/abi@0.31.0 + - @0xsequence/config@0.31.0 + - @0xsequence/transactions@0.31.0 + - @0xsequence/utils@0.31.0 + +## 0.30.0 + +### Minor Changes + +- - upgrade most deps + +### Patch Changes + +- Updated dependencies + - @0xsequence/abi@0.30.0 + - @0xsequence/config@0.30.0 + - @0xsequence/transactions@0.30.0 + - @0xsequence/utils@0.30.0 + +## 0.29.8 + +### Patch Changes + +- update api +- Updated dependencies [undefined] + - @0xsequence/abi@0.29.8 + - @0xsequence/config@0.29.8 + - @0xsequence/transactions@0.29.8 + - @0xsequence/utils@0.29.8 + +## 0.29.6 + +### Patch Changes + +- @0xsequence/config@0.29.6 +- @0xsequence/transactions@0.29.6 + +## 0.29.5 + +### Patch Changes + +- Updated dependencies [undefined] + - @0xsequence/config@0.29.5 + +## 0.29.2 + +### Patch Changes + +- relayer: don't pass nonce to GetMetaTxnNetworkFeeOptions + +## 0.29.0 + +### Minor Changes + +- major architectural changes in Sequence design + + - only one API instance, API is no longer a per-chain service + - separate per-chain indexer service, API no longer handles indexing + - single contract metadata service, API no longer serves metadata + + chaind package has been removed, indexer and metadata packages have been added + + stronger typing with new explicit ChainId type + + multicall fixes and improvements + + forbid "wait" transactions in sendTransactionBatch calls + +### Patch Changes + +- Updated dependencies [undefined] + - @0xsequence/config@0.29.0 + - @0xsequence/transactions@0.29.0 + - @0xsequence/abi@0.29.0 + - @0xsequence/utils@0.29.0 + +## 0.28.0 + +### Minor Changes + +- extension provider + +### Patch Changes + +- Updated dependencies [undefined] + - @0xsequence/abi@0.28.0 + - @0xsequence/chaind@0.28.0 + - @0xsequence/config@0.28.0 + - @0xsequence/transactions@0.28.0 + - @0xsequence/utils@0.28.0 + +## 0.27.1 + +### Patch Changes + +- fix waitReceipt polling logic + +## 0.27.0 + +### Minor Changes + +- Add requireFreshSigner lib to sessions + +### Patch Changes + +- Updated dependencies [undefined] + - @0xsequence/abi@0.27.0 + - @0xsequence/chaind@0.27.0 + - @0xsequence/config@0.27.0 + - @0xsequence/transactions@0.27.0 + - @0xsequence/utils@0.27.0 + +## 0.26.0 + +### Minor Changes + +- update relayer client bindings + provide the wallet's address for calls to SendMetaTxn + modify the semantics of Relayer.getNonce() to allow relayers to select nonce spaces for clients + +## 0.25.1 + +### Patch Changes + +- Fix build typescrypt issue +- Updated dependencies [undefined] + - @0xsequence/abi@0.25.1 + - @0xsequence/chaind@0.25.1 + - @0xsequence/config@0.25.1 + - @0xsequence/transactions@0.25.1 + - @0xsequence/utils@0.25.1 + +## 0.25.0 + +### Minor Changes + +- 10c8af8: Add estimator package + Fix multicall few calls bug + +### Patch Changes + +- Updated dependencies [10c8af8] + - @0xsequence/abi@0.25.0 + - @0xsequence/chaind@0.25.0 + - @0xsequence/config@0.25.0 + - @0xsequence/transactions@0.25.0 + - @0xsequence/utils@0.25.0 + +## 0.24.1 + +### Patch Changes + +- relayer: wait for queued status instead of unknown + +## 0.24.0 + +### Minor Changes + +- pass wallet config and nonce to GetMetaTxnNetworkFeeOptions + +## 0.23.0 + +### Minor Changes + +- - relayer: offer variety of gas fee options from the relayer service" + +### Patch Changes + +- Updated dependencies [undefined] + - @0xsequence/abi@0.23.0 + - @0xsequence/chaind@0.23.0 + - @0xsequence/config@0.23.0 + - @0xsequence/transactions@0.23.0 + - @0xsequence/utils@0.23.0 + +## 0.22.2 + +### Patch Changes + +- e1c109e: Fix authProof on expired sessions +- Updated dependencies [e1c109e] + - @0xsequence/abi@0.22.2 + - @0xsequence/chaind@0.22.2 + - @0xsequence/config@0.22.2 + - @0xsequence/transactions@0.22.2 + - @0xsequence/utils@0.22.2 + +## 0.22.1 + +### Patch Changes + +- transport session cache +- Updated dependencies [undefined] + - @0xsequence/abi@0.22.1 + - @0xsequence/chaind@0.22.1 + - @0xsequence/config@0.22.1 + - @0xsequence/transactions@0.22.1 + - @0xsequence/utils@0.22.1 + +## 0.22.0 + +### Minor Changes + +- e667b65: Expose all relayer options on networks + +### Patch Changes + +- Updated dependencies [e667b65] + - @0xsequence/abi@0.22.0 + - @0xsequence/utils@0.22.0 + - @0xsequence/chaind@0.22.0 + - @0xsequence/config@0.22.0 + - @0xsequence/transactions@0.22.0 + +## 0.21.5 + +### Patch Changes + +- Give priority to metaTxnId returned by relayer +- Updated dependencies [undefined] + - @0xsequence/abi@0.21.5 + - @0xsequence/chaind@0.21.5 + - @0xsequence/config@0.21.5 + - @0xsequence/transactions@0.21.5 + - @0xsequence/utils@0.21.5 + +## 0.21.4 + +### Patch Changes + +- Add has enough signers method +- Updated dependencies [undefined] + - @0xsequence/abi@0.21.4 + - @0xsequence/chaind@0.21.4 + - @0xsequence/config@0.21.4 + - @0xsequence/transactions@0.21.4 + - @0xsequence/utils@0.21.4 + +## 0.21.3 + +### Patch Changes + +- add window session cache +- Updated dependencies [undefined] + - @0xsequence/abi@0.21.3 + - @0xsequence/chaind@0.21.3 + - @0xsequence/config@0.21.3 + - @0xsequence/transactions@0.21.3 + - @0xsequence/utils@0.21.3 + +## 0.21.2 + +### Patch Changes + +- exception handlind in relayer +- Updated dependencies [undefined] + - @0xsequence/abi@0.21.2 + - @0xsequence/chaind@0.21.2 + - @0xsequence/config@0.21.2 + - @0xsequence/transactions@0.21.2 + - @0xsequence/utils@0.21.2 + +## 0.21.0 + +### Minor Changes + +- - fix gas estimation on wallets with large number of signers + - update to session handling and wallet config construction upon auth + +### Patch Changes + +- Updated dependencies [undefined] + - @0xsequence/abi@0.21.0 + - @0xsequence/chaind@0.21.0 + - @0xsequence/config@0.21.0 + - @0xsequence/transactions@0.21.0 + - @0xsequence/utils@0.21.0 + +## 0.19.3 + +### Patch Changes + +- jwtAuth visibility, package version sync +- Updated dependencies [undefined] + - @0xsequence/abi@0.19.3 + - @0xsequence/chaind@0.19.3 + - @0xsequence/config@0.19.3 + - @0xsequence/transactions@0.19.3 + - @0xsequence/utils@0.19.3 + +## 0.19.2 + +### Patch Changes + +- Updated dependencies [undefined] + - @0xsequence/abi@0.19.2 + - @0xsequence/config@0.19.2 + - @0xsequence/transactions@0.19.2 + +## 0.19.0 + +### Minor Changes + +- - provider, improve dapp / wallet transport io + +### Patch Changes + +- Updated dependencies [undefined] + - @0xsequence/abi@0.19.0 + - @0xsequence/chaind@0.19.0 + - @0xsequence/config@0.19.0 + - @0xsequence/transactions@0.19.0 + - @0xsequence/utils@0.19.0 + +## 0.18.0 + +### Minor Changes + +- relayer improvements and pending transaction handling + +### Patch Changes + +- Updated dependencies [undefined] + - @0xsequence/abi@0.18.0 + - @0xsequence/chaind@0.18.0 + - @0xsequence/config@0.18.0 + - @0xsequence/transactions@0.18.0 + - @0xsequence/utils@0.18.0 + +## 0.16.0 + +### Minor Changes + +- relayer as its own service separate from chaind + +### Patch Changes + +- Updated dependencies [undefined] + - @0xsequence/abi@0.16.0 + - @0xsequence/chaind@0.16.0 + - @0xsequence/config@0.16.0 + - @0xsequence/transactions@0.16.0 + - @0xsequence/utils@0.16.0 + +## 0.15.1 + +### Patch Changes + +- update api clients +- Updated dependencies [undefined] + - @0xsequence/abi@0.15.1 + - @0xsequence/chaind@0.15.1 + - @0xsequence/config@0.15.1 + - @0xsequence/transactions@0.15.1 + - @0xsequence/utils@0.15.1 + +## 0.15.0 + +### Minor Changes + +- - update chaind and api bindings + - replace EstimateMetaTxnGasReceipt with UpdateMetaTxnGasLimits and GetMetaTxnNetworkFeeOptions + +### Patch Changes + +- Updated dependencies [undefined] + - @0xsequence/chaind@0.15.0 + - @0xsequence/transactions@0.15.0 + +## 0.14.3 + +### Patch Changes + +- Fix 0xSequence relayer dependencies +- Updated dependencies [undefined] + - @0xsequence/abi@0.14.3 + - @0xsequence/chaind@0.14.3 + - @0xsequence/config@0.14.3 + - @0xsequence/transactions@0.14.3 + - @0xsequence/utils@0.14.3 + +## 0.14.2 + +### Patch Changes + +- Add debug logs to rpc-relayer +- Updated dependencies [undefined] + - @0xsequence/abi@0.14.2 + - @0xsequence/chaind@0.14.2 + - @0xsequence/config@0.14.2 + - @0xsequence/transactions@0.14.2 + +## 0.14.0 + +### Minor Changes + +- update sequence utils finder which includes optimization + +### Patch Changes + +- Updated dependencies [undefined] + - @0xsequence/abi@0.14.0 + - @0xsequence/chaind@0.14.0 + - @0xsequence/config@0.14.0 + - @0xsequence/transactions@0.14.0 + +## 0.13.0 + +### Minor Changes + +- Update SequenceUtils deployed contract + +### Patch Changes + +- Updated dependencies [undefined] + - @0xsequence/abi@0.13.0 + - @0xsequence/chaind@0.13.0 + - @0xsequence/config@0.13.0 + - @0xsequence/transactions@0.13.0 + +## 0.12.1 + +### Patch Changes + +- npm bump +- Updated dependencies [undefined] + - @0xsequence/abi@0.12.1 + - @0xsequence/chaind@0.12.1 + - @0xsequence/config@0.12.1 + - @0xsequence/transactions@0.12.1 + +## 0.12.0 + +### Minor Changes + +- provider: improvements to window transport + +### Patch Changes + +- Updated dependencies [undefined] + - @0xsequence/abi@0.12.0 + - @0xsequence/chaind@0.12.0 + - @0xsequence/config@0.12.0 + - @0xsequence/transactions@0.12.0 + +## 0.11.4 + +### Patch Changes + +- update api client +- Updated dependencies [undefined] + - @0xsequence/abi@0.11.4 + - @0xsequence/chaind@0.11.4 + - @0xsequence/config@0.11.4 + - @0xsequence/transactions@0.11.4 + +## 0.11.3 + +### Patch Changes + +- improve openWindow state options handling +- Updated dependencies [undefined] + - @0xsequence/abi@0.11.3 + - @0xsequence/chaind@0.11.3 + - @0xsequence/config@0.11.3 + - @0xsequence/transactions@0.11.3 + +## 0.11.2 + +### Patch Changes + +- Fix multicall proxy scopes +- Updated dependencies [undefined] + - @0xsequence/abi@0.11.2 + - @0xsequence/chaind@0.11.2 + - @0xsequence/config@0.11.2 + - @0xsequence/transactions@0.11.2 + +## 0.11.1 + +### Patch Changes + +- Add support for dynamic and nested signatures +- Updated dependencies [undefined] + - @0xsequence/abi@0.11.1 + - @0xsequence/chaind@0.11.1 + - @0xsequence/config@0.11.1 + - @0xsequence/transactions@0.11.1 + +## 0.11.0 + +### Minor Changes + +- Update wallet context to 1.7 contracts + +### Patch Changes + +- Updated dependencies [undefined] + - @0xsequence/abi@0.11.0 + - @0xsequence/chaind@0.11.0 + - @0xsequence/config@0.11.0 + - @0xsequence/transactions@0.11.0 + +## 0.10.9 + +### Patch Changes + +- add support for public addresses as signers in session.open +- Updated dependencies [undefined] + - @0xsequence/abi@0.10.9 + - @0xsequence/chaind@0.10.9 + - @0xsequence/config@0.10.9 + - @0xsequence/transactions@0.10.9 + +## 0.10.8 + +### Patch Changes + +- Multicall production configuration +- Updated dependencies [undefined] + - @0xsequence/abi@0.10.8 + - @0xsequence/chaind@0.10.8 + - @0xsequence/config@0.10.8 + - @0xsequence/transactions@0.10.8 + +## 0.10.7 + +### Patch Changes + +- allow provider transport to force disconnect +- Updated dependencies [undefined] + - @0xsequence/abi@0.10.7 + - @0xsequence/chaind@0.10.7 + - @0xsequence/config@0.10.7 + - @0xsequence/transactions@0.10.7 + +## 0.10.6 + +### Patch Changes + +- - fix getWalletState method +- Updated dependencies [undefined] + - @0xsequence/abi@0.10.6 + - @0xsequence/chaind@0.10.6 + - @0xsequence/config@0.10.6 + - @0xsequence/transactions@0.10.6 + +## 0.10.5 + +### Patch Changes + +- update relayer gas refund options +- Updated dependencies [undefined] + - @0xsequence/abi@0.10.5 + - @0xsequence/chaind@0.10.5 + - @0xsequence/config@0.10.5 + - @0xsequence/transactions@0.10.5 + +## 0.10.4 + +### Patch Changes + +- Update api proto +- Updated dependencies [undefined] + - @0xsequence/abi@0.10.4 + - @0xsequence/chaind@0.10.4 + - @0xsequence/config@0.10.4 + - @0xsequence/transactions@0.10.4 + +## 0.10.3 + +### Patch Changes + +- Fix loading config cross-chain +- Updated dependencies [undefined] + - @0xsequence/abi@0.10.3 + - @0xsequence/chaind@0.10.3 + - @0xsequence/config@0.10.3 + - @0xsequence/transactions@0.10.3 + +## 0.10.2 + +### Patch Changes + +- - message digest fix +- Updated dependencies [undefined] + - @0xsequence/abi@0.10.2 + - @0xsequence/chaind@0.10.2 + - @0xsequence/config@0.10.2 + - @0xsequence/transactions@0.10.2 + +## 0.10.1 + +### Patch Changes + +- upgrade deps +- Updated dependencies [undefined] + - @0xsequence/abi@0.10.1 + - @0xsequence/chaind@0.10.1 + - @0xsequence/config@0.10.1 + - @0xsequence/transactions@0.10.1 + +## 0.10.0 + +### Minor Changes + +- Deployed new contracts with ERC1271 signer support + +### Patch Changes + +- Updated dependencies [undefined] + - @0xsequence/abi@0.10.0 + - @0xsequence/chaind@0.10.0 + - @0xsequence/config@0.10.0 + - @0xsequence/transactions@0.10.0 + +## 0.9.6 + +### Patch Changes + +- Update ABIs for latest sequence contracts +- Updated dependencies [undefined] + - @0xsequence/config@0.9.6 + - @0xsequence/transactions@0.9.6 + - @0xsequence/abi@0.9.6 + - @0xsequence/chaind@0.9.6 + +## 0.9.5 + +### Patch Changes + +- Implemented session class +- Updated dependencies [undefined] + - @0xsequence/config@0.9.5 + - @0xsequence/transactions@0.9.5 + +## 0.9.3 + +### Patch Changes + +- - minor improvements +- Updated dependencies [undefined] + - @0xsequence/abi@0.9.3 + - @0xsequence/chaind@0.9.3 + - @0xsequence/config@0.9.3 + - @0xsequence/transactions@0.9.3 + +## 0.9.1 + +### Patch Changes + +- - patch bump +- Updated dependencies [undefined] + - @0xsequence/abi@0.9.1 + - @0xsequence/chaind@0.9.1 + - @0xsequence/config@0.9.1 + - @0xsequence/transactions@0.9.1 + +## 0.9.0 + +### Minor Changes + +- - provider transport hardening + +### Patch Changes + +- Updated dependencies [undefined] + - @0xsequence/abi@0.9.0 + - @0xsequence/chaind@0.9.0 + - @0xsequence/config@0.9.0 + - @0xsequence/transactions@0.9.0 + +## 0.8.5 + +### Patch Changes + +- - use latest wallet-contracts +- Updated dependencies [undefined] + - @0xsequence/abi@0.8.5 + - @0xsequence/chaind@0.8.5 + - @0xsequence/config@0.8.5 + - @0xsequence/transactions@0.8.5 + +## 0.8.4 + +### Patch Changes + +- - minor improvements, name updates and comments +- Updated dependencies [undefined] + - @0xsequence/abi@0.8.4 + - @0xsequence/chaind@0.8.4 + - @0xsequence/config@0.8.4 + - @0xsequence/transactions@0.8.4 + +## 0.8.3 + +### Patch Changes + +- - refinements + + - normalize signer address in config + + - provider: getWalletState() method to WalletProvider + +- Updated dependencies [undefined] + - @0xsequence/abi@0.8.3 + - @0xsequence/chaind@0.8.3 + - @0xsequence/config@0.8.3 + - @0xsequence/transactions@0.8.3 + +## 0.8.2 + +### Patch Changes + +- - field rename and ethauth dependency bump +- Updated dependencies [undefined] + - @0xsequence/abi@0.8.2 + - @0xsequence/chaind@0.8.2 + - @0xsequence/config@0.8.2 + - @0xsequence/transactions@0.8.2 + +## 0.8.1 + +### Patch Changes + +- - variety of optimizations +- Updated dependencies [undefined] + - @0xsequence/abi@0.8.1 + - @0xsequence/chaind@0.8.1 + - @0xsequence/config@0.8.1 + - @0xsequence/transactions@0.8.1 + +## 0.8.0 + +### Minor Changes + +- - changeset fix + +### Patch Changes + +- Updated dependencies [undefined] + - @0xsequence/abi@0.8.0 + - @0xsequence/chaind@0.8.0 + - @0xsequence/config@0.8.0 + - @0xsequence/transactions@0.8.0 + +## 0.7.1 + +### Patch Changes + +- 02377ab: Minor improvements + +## 0.7.0 + +### Patch Changes + +- 6f11ed7: sequence.js, init release +- Updated dependencies [6f11ed7] + - @0xsequence/abi@0.7.0 + - @0xsequence/chaind@0.7.0 + - @0xsequence/config@0.7.0 + - @0xsequence/transactions@0.7.0 diff --git a/packages/services/relayer/README.md b/packages/services/relayer/README.md new file mode 100644 index 000000000..f736cc8d3 --- /dev/null +++ b/packages/services/relayer/README.md @@ -0,0 +1,3 @@ +# @0xsequence/relayer + +See [0xsequence project page](https://github.com/0xsequence/sequence.js). diff --git a/packages/services/relayer/hardhat.config.js b/packages/services/relayer/hardhat.config.js new file mode 100644 index 000000000..fd760378b --- /dev/null +++ b/packages/services/relayer/hardhat.config.js @@ -0,0 +1,15 @@ +/** + * @type import('hardhat/config').HardhatUserConfig + */ +module.exports = { + solidity: '0.7.6', + + networks: { + hardhat: { + chainId: 31337, + accounts: { + mnemonic: 'ripple axis someone ridge uniform wrist prosper there frog rate olympic knee', + }, + }, + }, +} diff --git a/packages/services/relayer/package.json b/packages/services/relayer/package.json new file mode 100644 index 000000000..626a998b2 --- /dev/null +++ b/packages/services/relayer/package.json @@ -0,0 +1,31 @@ +{ + "name": "@0xsequence/relayer", + "version": "3.0.0", + "description": "relayer sub-package for Sequence", + "repository": "https://github.com/0xsequence/sequence.js/tree/master/packages/relayer", + "author": "Sequence Platforms Inc.", + "license": "Apache-2.0", + "scripts": { + "build": "tsc", + "dev": "tsc --watch", + "test": "pnpm test:concurrently 'pnpm test:run'", + "test:run": "pnpm test:file tests/**/*.spec.ts", + "test:file": "NODE_OPTIONS='--import tsx' mocha --timeout 60000", + "test:concurrently": "concurrently -k --success first 'pnpm start:hardhat > /dev/null' ", + "start:hardhat": "pnpm hardhat node --port 9547", + "typecheck": "tsc --noEmit" + }, + "exports": { + ".": { + "types": "./src/index.ts", + "default": "./dist/index.js" + } + }, + "peerDependencies": {}, + "devDependencies": { + "@repo/typescript-config": "workspace:^", + "@types/node": "^22.13.9", + "typescript": "^5.7.3" + }, + "dependencies": {} +} diff --git a/packages/services/relayer/src/index.ts b/packages/services/relayer/src/index.ts new file mode 100644 index 000000000..6303365dc --- /dev/null +++ b/packages/services/relayer/src/index.ts @@ -0,0 +1,111 @@ +// import { ethers } from 'ethers' +// import { proto } from './rpc-relayer' + +// import { commons } from '@0xsequence/core' + +// export interface Relayer { +// // simulate returns the execution results for a list of transactions. +// simulate(wallet: string, ...transactions: commons.transaction.Transaction[]): Promise + +// // getFeeOptions returns the fee options that the relayer will accept as payment. +// // If a quote is returned, it may be passed back to the relayer for dispatch. +// getFeeOptions( +// address: string, +// ...transactions: commons.transaction.Transaction[] +// ): Promise<{ options: FeeOption[]; quote?: FeeQuote }> + +// // getFeeOptionsRaw returns the fee options that the relayer will accept as payment. +// // If a quote is returned, it may be passed back to the relayer for dispatch. +// // It doesn't make any assumptions about the transaction format. +// getFeeOptionsRaw( +// entrypoint: string, +// data: ethers.BytesLike, +// options?: { +// simulate?: boolean +// } +// ): Promise<{ options: FeeOption[]; quote?: FeeQuote }> + +// // gasRefundOptions returns the transactions which can be included to refund a +// // relayer for submitting your transaction to a network. +// gasRefundOptions(address: string, ...transactions: commons.transaction.Transaction[]): Promise + +// // Gas tank sponsorship management +// listGasSponsors(args: proto.ListGasSponsorsArgs): Promise +// addGasSponsor(args: proto.AddGasSponsorArgs): Promise +// updateGasSponsor(args: proto.UpdateGasSponsorArgs): Promise +// removeGasSponsor(args: proto.RemoveGasSponsorArgs): Promise + +// // getNonce returns the transaction count/nonce for a wallet, encoded with nonce space. +// // If space is undefined, the relayer can choose a nonce space to encode the result with. +// // Otherwise, the relayer must return a nonce encoded for the given nonce space. +// getNonce(address: string, space?: ethers.BigNumberish, blockTag?: ethers.BlockTag): Promise + +// // relayer will submit the transaction(s) to the network and return the transaction response. +// // The quote should be the one returned from getFeeOptions, if any. +// // waitForReceipt must default to true. +// relay( +// signedTxs: commons.transaction.IntendedTransactionBundle, +// quote?: FeeQuote, +// waitForReceipt?: boolean, +// projectAccessKey?: string +// ): Promise + +// // wait for transaction confirmation +// // timeout is the maximum time to wait for the transaction response +// // delay is the polling interval, i.e. the time to wait between requests +// // maxFails is the maximum number of hard failures to tolerate before giving up +// wait( +// metaTxnId: string | commons.transaction.SignedTransactionBundle, +// timeout?: number, +// delay?: number, +// maxFails?: number +// ): Promise + +// // getMetaTransactions returns a list of meta transactions for a given project and gas tank +// getMetaTransactions( +// projectId: number, +// page?: proto.Page +// ): Promise<{ +// page: proto.Page +// transactions: proto.MetaTxnLog[] +// }> + +// // getTransactionCost returns the used fee cost for gas tank during a given period +// getTransactionCost( +// projectId: number, +// from: string, +// to: string +// ): Promise<{ +// cost: number +// }> +// } + +// export * from './local-relayer' +// export * from './provider-relayer' +// export * from './rpc-relayer' +// export { proto as RpcRelayerProto } from './rpc-relayer' +// export type SimulateResult = proto.SimulateResult +// export type FeeOption = proto.FeeOption + +// // A fee quote is simply an opaque value that can be obtained via Relayer.getFeeOptions(), and +// // returned back to the same relayer via Relayer.relay(). Fee quotes should be treated as an +// // implementation detail of the relayer that produces them. +// // +// // This interface exists for type-safety purposes to protect against passing non-FeeQuotes to +// // Relayer.relay(), or any other functions that call it indirectly (e.g. Account.sendTransaction). +// export interface FeeQuote { +// _tag: 'FeeQuote' +// _quote: unknown +// } + +// export function isRelayer(cand: any): cand is Relayer { +// return ( +// typeof cand === 'object' && +// typeof cand.simulate === 'function' && +// typeof cand.getFeeOptions === 'function' && +// typeof cand.gasRefundOptions === 'function' && +// typeof cand.getNonce === 'function' && +// typeof cand.relay === 'function' && +// typeof cand.wait === 'function' +// ) +// } diff --git a/packages/services/relayer/src/local-relayer.ts b/packages/services/relayer/src/local-relayer.ts new file mode 100644 index 000000000..29850be34 --- /dev/null +++ b/packages/services/relayer/src/local-relayer.ts @@ -0,0 +1,125 @@ +// import { ethers } from 'ethers' +// import { logger } from '@0xsequence/utils' +// import { FeeOption, FeeQuote, proto, Relayer } from '.' +// import { ProviderRelayer, ProviderRelayerOptions } from './provider-relayer' +// import { commons } from '@0xsequence/core' + +// export type LocalRelayerOptions = Omit & { +// signer: ethers.Signer +// } + +// export function isLocalRelayerOptions(obj: any): obj is LocalRelayerOptions { +// return typeof obj === 'object' && isAbstractSigner(obj.signer) +// } + +// export class LocalRelayer extends ProviderRelayer implements Relayer { +// private signer: ethers.Signer +// private txnOptions: ethers.TransactionRequest + +// constructor(options: LocalRelayerOptions | ethers.AbstractSigner) { +// super(isAbstractSigner(options) ? { provider: options.provider! } : { ...options, provider: options.signer.provider! }) +// this.signer = isAbstractSigner(options) ? options : options.signer +// if (!this.signer.provider) throw new Error('Signer must have a provider') +// } + +// async getFeeOptions(_address: string, ..._transactions: commons.transaction.Transaction[]): Promise<{ options: FeeOption[] }> { +// return { options: [] } +// } + +// async getFeeOptionsRaw( +// _entrypoint: string, +// _data: ethers.BytesLike, +// _options?: { +// simulate?: boolean +// } +// ): Promise<{ options: FeeOption[] }> { +// return { options: [] } +// } + +// async gasRefundOptions(address: string, ...transactions: commons.transaction.Transaction[]): Promise { +// const { options } = await this.getFeeOptions(address, ...transactions) +// return options +// } + +// setTransactionOptions(transactionRequest: ethers.TransactionRequest) { +// this.txnOptions = transactionRequest +// } + +// async relay( +// signedTxs: commons.transaction.IntendedTransactionBundle, +// quote?: FeeQuote, +// waitForReceipt: boolean = true +// ): Promise> { +// if (quote !== undefined) { +// logger.warn(`LocalRelayer doesn't accept fee quotes`) +// } + +// const data = commons.transaction.encodeBundleExecData(signedTxs) + +// // TODO: think about computing gas limit individually, summing together and passing across +// // NOTE: we expect that all txns have set their gasLimit ahead of time through proper estimation +// // const gasLimit = signedTxs.transactions.reduce((sum, tx) => sum + tx.gasLimit, 0n) +// // txRequest.gasLimit = gasLimit + +// const responsePromise = this.signer.sendTransaction({ +// to: signedTxs.entrypoint, +// data, +// ...this.txnOptions, +// gasLimit: 9000000 +// }) + +// if (waitForReceipt) { +// const response: commons.transaction.TransactionResponse = await responsePromise +// response.receipt = await response.wait() +// return response +// } else { +// return responsePromise +// } +// } + +// async getMetaTransactions( +// projectId: number, +// page?: proto.Page +// ): Promise<{ +// page: proto.Page +// transactions: proto.MetaTxnLog[] +// }> { +// return { page: { page: 0, pageSize: 100 }, transactions: [] } +// } + +// async getTransactionCost( +// projectId: number, +// from: string, +// to: string +// ): Promise<{ +// cost: number +// }> { +// return { cost: 0 } +// } + +// async listGasSponsors(args: proto.ListGasSponsorsArgs): Promise { +// return { page: { page: 0, pageSize: 100 }, gasSponsors: [] } +// } + +// async addGasSponsor(args: proto.AddGasSponsorArgs): Promise { +// return { status: true, gasSponsor: {} as proto.GasSponsor } +// } + +// async updateGasSponsor(args: proto.UpdateGasSponsorArgs): Promise { +// return { status: true, gasSponsor: {} as proto.GasSponsor } +// } + +// async removeGasSponsor(args: proto.RemoveGasSponsorArgs): Promise { +// return { status: true } +// } +// } + +// function isAbstractSigner(signer: any): signer is ethers.AbstractSigner { +// return ( +// signer && +// typeof signer === 'object' && +// typeof signer.provider === 'object' && +// typeof signer.getAddress === 'function' && +// typeof signer.connect === 'function' +// ) +// } diff --git a/packages/services/relayer/src/provider-relayer.ts b/packages/services/relayer/src/provider-relayer.ts new file mode 100644 index 000000000..85e9257f2 --- /dev/null +++ b/packages/services/relayer/src/provider-relayer.ts @@ -0,0 +1,284 @@ +// import { ethers } from 'ethers' +// import { walletContracts } from '@0xsequence/abi' +// import { FeeOption, FeeQuote, proto, Relayer, SimulateResult } from '.' +// import { logger, Optionals } from '@0xsequence/utils' +// import { commons } from '@0xsequence/core' + +// const DEFAULT_GAS_LIMIT = 800000n + +// export interface ProviderRelayerOptions { +// provider: ethers.Provider +// waitPollRate?: number +// deltaBlocksLog?: number +// fromBlockLog?: number +// } + +// export const ProviderRelayerDefaults: Required> = { +// waitPollRate: 1000, +// deltaBlocksLog: 12, +// fromBlockLog: -1024 +// } + +// export function isProviderRelayerOptions(obj: any): obj is ProviderRelayerOptions { +// return typeof obj === 'object' && isAbstractProvider(obj.provider) +// } + +// export abstract class ProviderRelayer implements Relayer { +// public provider: ethers.Provider +// public waitPollRate: number +// public deltaBlocksLog: number +// public fromBlockLog: number + +// constructor(options: ProviderRelayerOptions) { +// const opts = { ...ProviderRelayerDefaults, ...options } + +// this.provider = opts.provider +// this.waitPollRate = opts.waitPollRate +// this.deltaBlocksLog = opts.deltaBlocksLog +// this.fromBlockLog = opts.fromBlockLog +// } + +// abstract getFeeOptions( +// address: string, +// ...transactions: commons.transaction.Transaction[] +// ): Promise<{ options: FeeOption[]; quote?: FeeQuote }> + +// abstract getFeeOptionsRaw( +// entrypoint: string, +// data: ethers.BytesLike, +// options?: { +// simulate?: boolean +// } +// ): Promise<{ options: FeeOption[]; quote?: FeeQuote }> + +// abstract gasRefundOptions(address: string, ...transactions: commons.transaction.Transaction[]): Promise + +// abstract relay( +// signedTxs: commons.transaction.IntendedTransactionBundle, +// quote?: FeeQuote, +// waitForReceipt?: boolean +// ): Promise + +// abstract getTransactionCost( +// projectId: number, +// from: string, +// to: string +// ): Promise<{ +// cost: number +// }> + +// abstract getMetaTransactions( +// projectId: number, +// page?: proto.Page +// ): Promise<{ +// page: proto.Page +// transactions: proto.MetaTxnLog[] +// }> + +// abstract listGasSponsors(args: proto.ListGasSponsorsArgs): Promise + +// abstract addGasSponsor(args: proto.AddGasSponsorArgs): Promise + +// abstract updateGasSponsor(args: proto.UpdateGasSponsorArgs): Promise + +// abstract removeGasSponsor(args: proto.RemoveGasSponsorArgs): Promise + +// async simulate(wallet: string, ...transactions: commons.transaction.Transaction[]): Promise { +// return ( +// await Promise.all( +// transactions.map(async tx => { +// // Respect gasLimit request of the transaction (as long as its not 0) +// if (tx.gasLimit && BigInt(tx.gasLimit || 0) !== 0n) { +// return tx.gasLimit +// } + +// // Fee can't be estimated locally for delegateCalls +// if (tx.delegateCall) { +// return DEFAULT_GAS_LIMIT +// } + +// // Fee can't be estimated for self-called if wallet hasn't been deployed +// if (tx.to === wallet && (await this.provider.getCode(wallet).then(code => ethers.getBytes(code).length === 0))) { +// return DEFAULT_GAS_LIMIT +// } + +// if (!this.provider) { +// throw new Error('signer.provider is not set, but is required') +// } + +// // TODO: If the wallet address has been deployed, gas limits can be +// // estimated with more accurately by using self-calls with the batch transactions one by one +// return this.provider.estimateGas({ +// from: wallet, +// to: tx.to, +// data: tx.data, +// value: tx.value +// }) +// }) +// ) +// ).map(gasLimit => ({ +// executed: true, +// succeeded: true, +// gasUsed: Number(gasLimit), +// gasLimit: Number(gasLimit) +// })) +// } + +// async getNonce(address: string, space?: ethers.BigNumberish, blockTag?: ethers.BlockTag): Promise { +// if (!this.provider) { +// throw new Error('provider is not set') +// } + +// if ((await this.provider.getCode(address)) === '0x') { +// return 0 +// } + +// if (space === undefined) { +// space = 0 +// } + +// const module = new ethers.Contract(address, walletContracts.mainModule.abi, this.provider) +// const nonce = await module.readNonce(space, { blockTag: blockTag }) +// return commons.transaction.encodeNonce(space, nonce) +// } + +// async wait( +// metaTxnId: string | commons.transaction.SignedTransactionBundle, +// timeoutDuration?: number, +// delay: number = this.waitPollRate, +// maxFails: number = 5 +// ): Promise { +// if (typeof metaTxnId !== 'string') { +// metaTxnId = commons.transaction.intendedTransactionID(metaTxnId) +// } + +// let timedOut = false + +// const retry = async (f: () => Promise, errorMessage: string): Promise => { +// let fails = 0 + +// while (!timedOut) { +// try { +// return await f() +// } catch (error) { +// fails++ + +// if (maxFails !== undefined && fails >= maxFails) { +// logger.error(`giving up after ${fails} failed attempts${errorMessage ? `: ${errorMessage}` : ''}`, error) +// throw error +// } else { +// logger.warn(`attempt #${fails} failed${errorMessage ? `: ${errorMessage}` : ''}`, error) +// } +// } + +// if (delay > 0) { +// await new Promise(resolve => setTimeout(resolve, delay)) +// } +// } + +// throw new Error(`timed out after ${fails} failed attempts${errorMessage ? `: ${errorMessage}` : ''}`) +// } + +// const waitReceipt = async (): Promise => { +// // Transactions can only get executed on nonce change +// // get all nonce changes and look for metaTxnIds in between logs +// let lastBlock: number = this.fromBlockLog + +// if (lastBlock < 0) { +// const block = await retry(() => this.provider.getBlockNumber(), 'unable to get latest block number') +// lastBlock = block + lastBlock +// } + +// if (typeof metaTxnId !== 'string') { +// throw new Error('impossible') +// } + +// const normalMetaTxnId = metaTxnId.replace('0x', '') + +// while (!timedOut) { +// const block = await retry(() => this.provider.getBlockNumber(), 'unable to get latest block number') + +// const logs = await retry( +// () => +// this.provider.getLogs({ +// fromBlock: Math.max(0, lastBlock - this.deltaBlocksLog), +// toBlock: block, +// // Nonce change event topic +// topics: ['0x1f180c27086c7a39ea2a7b25239d1ab92348f07ca7bb59d1438fcf527568f881'] +// }), +// `unable to get NonceChange logs for blocks ${Math.max(0, lastBlock - this.deltaBlocksLog)} to ${block}` +// ) + +// lastBlock = block + +// // Get receipts of all transactions +// const txs = await Promise.all( +// logs.map(l => +// retry( +// () => this.provider.getTransactionReceipt(l.transactionHash), +// `unable to get receipt for transaction ${l.transactionHash}` +// ) +// ) +// ) + +// // Find a transaction with a TxExecuted log +// const found = txs.find(tx => +// tx?.logs.find( +// l => +// (l.topics.length === 0 && l.data.replace('0x', '') === normalMetaTxnId) || +// (l.topics.length === 1 && +// // TxFailed event topic +// l.topics[0] === '0x3dbd1590ea96dd3253a91f24e64e3a502e1225d602a5731357bc12643070ccd7' && +// l.data.length >= 64 && +// l.data.replace('0x', '').startsWith(normalMetaTxnId)) +// ) +// ) + +// // If found return that +// if (found) { +// const response = await retry(() => this.provider.getTransaction(found.hash), `unable to get transaction ${found.hash}`) +// if (!response) { +// throw new Error(`Transaction response not found for ${metaTxnId}`) +// } + +// // NOTE: we have to do this, because ethers-v6 uses private fields +// // and we can't just extend the class and override the method, so +// // we just modify the response object directly by adding the receipt to it. +// const out: any = response +// out.receipt = found +// return out +// } + +// // Otherwise wait and try again +// if (!timedOut) { +// await new Promise(r => setTimeout(r, delay)) +// } +// } + +// throw new Error(`Timeout waiting for transaction receipt ${metaTxnId}`) +// } + +// if (timeoutDuration !== undefined) { +// return Promise.race([ +// waitReceipt(), +// new Promise((_, reject) => +// setTimeout(() => { +// timedOut = true +// reject(`Timeout waiting for transaction receipt ${metaTxnId}`) +// }, timeoutDuration) +// ) +// ]) +// } else { +// return waitReceipt() +// } +// } +// } + +// function isAbstractProvider(provider: any): provider is ethers.AbstractProvider { +// return ( +// provider && +// typeof provider === 'object' && +// typeof provider.getNetwork === 'function' && +// typeof provider.getBlockNumber === 'function' +// ) +// } diff --git a/packages/services/relayer/src/rpc-relayer/index.ts b/packages/services/relayer/src/rpc-relayer/index.ts new file mode 100644 index 000000000..dfc837941 --- /dev/null +++ b/packages/services/relayer/src/rpc-relayer/index.ts @@ -0,0 +1,380 @@ +// import { ethers } from 'ethers' +// import { FeeOption, FeeQuote, Relayer, SimulateResult } from '..' +// import * as proto from './relayer.gen' +// import { commons } from '@0xsequence/core' +// import { bigintReplacer, getFetchRequest, logger, toHexString } from '@0xsequence/utils' + +// export { proto } + +// const FINAL_STATUSES = [ +// proto.ETHTxnStatus.DROPPED, +// proto.ETHTxnStatus.SUCCEEDED, +// proto.ETHTxnStatus.PARTIALLY_FAILED, +// proto.ETHTxnStatus.FAILED +// ] + +// const FAILED_STATUSES = [proto.ETHTxnStatus.DROPPED, proto.ETHTxnStatus.PARTIALLY_FAILED, proto.ETHTxnStatus.FAILED] + +// export interface RpcRelayerOptions { +// provider: ethers.AbstractProvider | { url: string } +// url: string +// projectAccessKey?: string +// jwtAuth?: string +// } + +// export function isRpcRelayerOptions(obj: any): obj is RpcRelayerOptions { +// return obj.url !== undefined && typeof obj.url === 'string' && obj.provider !== undefined && isAbstractProvider(obj.provider) +// } + +// // TODO: rename to SequenceRelayer +// export class RpcRelayer implements Relayer { +// private readonly service: proto.Relayer +// public readonly provider: ethers.Provider + +// constructor(public options: RpcRelayerOptions) { +// this.service = new proto.Relayer(options.url, this._fetch) + +// if (isAbstractProvider(options.provider)) { +// this.provider = options.provider +// } else { +// const { jwtAuth, projectAccessKey } = this.options +// const fetchRequest = getFetchRequest(options.provider.url, projectAccessKey, jwtAuth) +// this.provider = new ethers.JsonRpcProvider(fetchRequest, undefined, { staticNetwork: true }) +// } +// } + +// _fetch = (input: RequestInfo, init?: RequestInit): Promise => { +// // automatically include jwt and access key auth header to requests +// // if its been set on the api client +// const headers: { [key: string]: any } = {} + +// const { jwtAuth, projectAccessKey } = this.options + +// if (jwtAuth && jwtAuth.length > 0) { +// headers['Authorization'] = `BEARER ${jwtAuth}` +// } + +// if (projectAccessKey && projectAccessKey.length > 0) { +// headers['X-Access-Key'] = projectAccessKey +// } + +// // before the request is made +// init!.headers = { ...headers, ...init!.headers } + +// return fetch(input, init) +// } + +// async waitReceipt( +// metaTxnId: string | commons.transaction.SignedTransactionBundle, +// delay: number = 1000, +// maxFails: number = 5, +// isCancelled?: () => boolean +// ): Promise { +// if (typeof metaTxnId !== 'string') { +// metaTxnId = commons.transaction.intendedTransactionID(metaTxnId) +// } + +// logger.info(`[rpc-relayer/waitReceipt] waiting for ${metaTxnId}`) + +// let fails = 0 + +// while (isCancelled === undefined || !isCancelled()) { +// try { +// const { receipt } = await this.service.getMetaTxnReceipt({ metaTxID: metaTxnId }) + +// if ( +// receipt && +// receipt.txnReceipt && +// receipt.txnReceipt !== 'null' && +// FINAL_STATUSES.includes(receipt.status as proto.ETHTxnStatus) +// ) { +// return { receipt } +// } +// } catch (e) { +// fails++ + +// if (fails === maxFails) { +// throw e +// } +// } + +// if (isCancelled === undefined || !isCancelled()) { +// await new Promise(resolve => setTimeout(resolve, delay)) +// } +// } + +// throw new Error(`Cancelled waiting for transaction receipt ${metaTxnId}`) +// } + +// async simulate(wallet: string, ...transactions: commons.transaction.Transaction[]): Promise { +// const coder = ethers.AbiCoder.defaultAbiCoder() +// const encoded = coder.encode( +// [commons.transaction.MetaTransactionsType], +// [commons.transaction.sequenceTxAbiEncode(transactions)] +// ) +// return (await this.service.simulate({ wallet, transactions: encoded })).results +// } + +// async getFeeOptions( +// address: string, +// ...transactions: commons.transaction.Transaction[] +// ): Promise<{ options: FeeOption[]; quote?: FeeQuote }> { +// // NOTE/TODO: for a given `service` the feeTokens will not change between execution, so we should memoize this value +// // for a short-period of time, perhaps for 1 day or in memory. Perhaps one day we can make this happen automatically +// // with http cache response for this endpoint and service-worker.. lots of approaches +// const feeTokens = await this.service.feeTokens() + +// if (feeTokens.isFeeRequired) { +// const symbols = feeTokens.tokens.map(token => token.symbol).join(', ') +// logger.info(`[rpc-relayer/getFeeOptions] relayer fees are required, accepted tokens are ${symbols}`) + +// const nonce = await this.getNonce(address) + +// if (!this.provider) { +// logger.warn(`[rpc-relayer/getFeeOptions] provider not set, needed for stub signature`) +// throw new Error('provider is not set') +// } + +// const { options, quote } = await this.service.feeOptions({ +// wallet: address, +// to: address, +// data: commons.transaction.encodeBundleExecData({ +// entrypoint: address, +// transactions, +// nonce +// }) +// }) + +// logger.info(`[rpc-relayer/getFeeOptions] got refund options ${JSON.stringify(options, bigintReplacer)}`) +// return { options, quote: { _tag: 'FeeQuote', _quote: quote } } +// } else { +// logger.info(`[rpc-relayer/getFeeOptions] relayer fees are not required`) +// return { options: [] } +// } +// } + +// async getFeeOptionsRaw( +// entrypoint: string, +// data: ethers.BytesLike, +// options?: { +// simulate?: boolean +// projectAccessKey?: string +// } +// ): Promise<{ options: FeeOption[]; quote?: FeeQuote }> { +// const { options: feeOptions, quote } = await this.service.feeOptions( +// { +// wallet: entrypoint, +// to: entrypoint, +// data: ethers.hexlify(data), +// simulate: options?.simulate +// }, +// { ...(options?.projectAccessKey ? { 'X-Access-Key': options.projectAccessKey } : undefined) } +// ) + +// return { options: feeOptions, quote: { _tag: 'FeeQuote', _quote: quote } } +// } + +// async gasRefundOptions(address: string, ...transactions: commons.transaction.Transaction[]): Promise { +// const { options } = await this.getFeeOptions(address, ...transactions) +// return options +// } + +// async getNonce(address: string, space?: ethers.BigNumberish): Promise { +// logger.info(`[rpc-relayer/getNonce] get nonce for wallet ${address} space: ${space}`) +// const encodedNonce = space !== undefined ? toHexString(BigInt(space)) : undefined +// const resp = await this.service.getMetaTxnNonce({ walletContractAddress: address, space: encodedNonce }) +// const nonce = BigInt(resp.nonce) +// const [decodedSpace, decodedNonce] = commons.transaction.decodeNonce(nonce) +// logger.info(`[rpc-relayer/getNonce] got next nonce for wallet ${address} ${decodedNonce} space: ${decodedSpace}`) +// return nonce +// } + +// async relay( +// signedTxs: commons.transaction.IntendedTransactionBundle, +// quote?: FeeQuote, +// waitForReceipt: boolean = true, +// projectAccessKey?: string +// ): Promise> { +// logger.info( +// `[rpc-relayer/relay] relaying signed meta-transactions ${JSON.stringify(signedTxs, bigintReplacer)} with quote ${JSON.stringify(quote, bigintReplacer)}` +// ) + +// let typecheckedQuote: string | undefined +// if (quote !== undefined) { +// if (typeof quote._quote === 'string') { +// typecheckedQuote = quote._quote +// } else { +// logger.warn('[rpc-relayer/relay] ignoring invalid fee quote') +// } +// } + +// if (!this.provider) { +// logger.warn(`[rpc-relayer/relay] provider not set, failed relay`) +// throw new Error('provider is not set') +// } + +// const data = commons.transaction.encodeBundleExecData(signedTxs) +// const metaTxn = await this.service.sendMetaTxn( +// { +// call: { +// walletAddress: signedTxs.intent.wallet, +// contract: signedTxs.entrypoint, +// input: data +// }, +// quote: typecheckedQuote +// }, +// { ...(projectAccessKey ? { 'X-Access-Key': projectAccessKey } : undefined) } +// ) + +// logger.info(`[rpc-relayer/relay] got relay result ${JSON.stringify(metaTxn, bigintReplacer)}`) + +// if (waitForReceipt) { +// return this.wait(signedTxs.intent.id) +// } else { +// const response = { +// hash: signedTxs.intent.id, +// confirmations: 0, +// from: signedTxs.intent.wallet, +// wait: (_confirmations?: number): Promise => Promise.reject(new Error('impossible')) +// } + +// const wait = async (confirmations?: number): Promise => { +// if (!this.provider) { +// throw new Error('cannot wait for receipt, relayer has no provider set') +// } + +// const waitResponse = await this.wait(signedTxs.intent.id) +// const transactionHash = waitResponse.receipt?.transactionHash + +// if (!transactionHash) { +// throw new Error('cannot wait for receipt, unknown native transaction hash') +// } + +// Object.assign(response, waitResponse) + +// return this.provider.waitForTransaction(transactionHash, confirmations) +// } + +// response.wait = wait + +// // NOTE: we just ignore these errors which come from the private fields +// // of ethers-v6 .. but, we should probably rework this instead.. +// // @ts-ignore +// return response as commons.transaction.TransactionResponse +// } +// } + +// async wait( +// metaTxnId: string | commons.transaction.SignedTransactionBundle, +// timeout?: number, +// delay: number = 1000, +// maxFails: number = 5 +// ): Promise> { +// let timedOut = false + +// const { receipt } = await (timeout !== undefined +// ? Promise.race([ +// this.waitReceipt(metaTxnId, delay, maxFails, () => timedOut), +// new Promise((_, reject) => +// setTimeout(() => { +// timedOut = true +// reject(`Timeout waiting for transaction receipt ${metaTxnId}`) +// }, timeout) +// ) +// ]) +// : this.waitReceipt(metaTxnId, delay, maxFails)) + +// if (!receipt.txnReceipt || FAILED_STATUSES.includes(receipt.status as proto.ETHTxnStatus)) { +// throw new MetaTransactionResponseException(receipt) +// } + +// const txReceipt = JSON.parse(receipt.txnReceipt) as RelayerTxReceipt + +// // NOTE: we just ignore these errors which come from the private fields +// // of ethers-v6 .. but, we should probably rework this instead.. +// // @ts-ignore +// return { +// blockHash: txReceipt.blockHash, +// blockNumber: Number(txReceipt.blockNumber), +// confirmations: 1, +// from: typeof metaTxnId === 'string' ? undefined : metaTxnId.intent.wallet, +// hash: txReceipt.transactionHash, +// raw: receipt.txnReceipt, +// receipt: txReceipt, // extended type which is Sequence-specific. Contains the decoded metaTxReceipt +// wait: async (confirmations?: number) => this.provider!.waitForTransaction(txReceipt.transactionHash, confirmations) +// } as commons.transaction.TransactionResponse +// } + +// async getMetaTransactions( +// projectId: number, +// page?: proto.Page +// ): Promise<{ +// page: proto.Page +// transactions: proto.MetaTxnLog[] +// }> { +// return this.service.getMetaTransactions({ projectId, page }) +// } + +// async getTransactionCost( +// projectId: number, +// from: string, +// to: string +// ): Promise<{ +// cost: number +// }> { +// return this.service.getTransactionCost({ projectId, from, to }) +// } + +// async listGasSponsors(args: proto.ListGasSponsorsArgs): Promise { +// return this.service.listGasSponsors(args) +// } + +// async addGasSponsor(args: proto.AddGasSponsorArgs): Promise { +// return this.service.addGasSponsor(args) +// } + +// async updateGasSponsor(args: proto.UpdateGasSponsorArgs): Promise { +// return this.service.updateGasSponsor(args) +// } + +// async removeGasSponsor(args: proto.RemoveGasSponsorArgs): Promise { +// return this.service.removeGasSponsor(args) +// } +// } + +// class MetaTransactionResponseException { +// constructor(public receipt: proto.MetaTxnReceipt) {} +// } + +// export type RelayerTxReceipt = { +// blockHash: string +// blockNumber: string +// contractAddress: string +// cumulativeGasUsed: string +// gasUsed: string +// logs: { +// address: string +// blockHash: string +// blockNumber: string +// data: string +// logIndex: string +// removed: boolean +// topics: string[] +// transactionHash: string +// transactionIndex: string +// }[] +// logsBloom: string +// root: string +// status: string +// transactionHash: string +// transactionIndex: string +// } + +// function isAbstractProvider(provider: any): provider is ethers.AbstractProvider { +// return ( +// provider && +// typeof provider === 'object' && +// typeof provider.getNetwork === 'function' && +// typeof provider.getBlockNumber === 'function' +// ) +// } diff --git a/packages/services/relayer/src/rpc-relayer/relayer.gen.ts b/packages/services/relayer/src/rpc-relayer/relayer.gen.ts new file mode 100644 index 000000000..a0f8204a0 --- /dev/null +++ b/packages/services/relayer/src/rpc-relayer/relayer.gen.ts @@ -0,0 +1,1901 @@ +/* eslint-disable */ +// sequence-relayer v0.4.1 da20208d66be29ad86d2662ca38c4425bc5910f8 +// -- +// Code generated by webrpc-gen@v0.24.0 with typescript generator. DO NOT EDIT. +// +// webrpc-gen -schema=relayer.ridl -target=typescript -client -out=./clients/relayer.gen.ts + +export const WebrpcHeader = 'Webrpc' + +export const WebrpcHeaderValue = 'webrpc@v0.24.0;gen-typescript@v0.16.3;sequence-relayer@v0.4.1' + +// WebRPC description and code-gen version +export const WebRPCVersion = 'v1' + +// Schema version of your RIDL schema +export const WebRPCSchemaVersion = 'v0.4.1' + +// Schema hash generated from your RIDL schema +export const WebRPCSchemaHash = 'da20208d66be29ad86d2662ca38c4425bc5910f8' + +type WebrpcGenVersions = { + webrpcGenVersion: string + codeGenName: string + codeGenVersion: string + schemaName: string + schemaVersion: string +} + +export function VersionFromHeader(headers: Headers): WebrpcGenVersions { + const headerValue = headers.get(WebrpcHeader) + if (!headerValue) { + return { + webrpcGenVersion: '', + codeGenName: '', + codeGenVersion: '', + schemaName: '', + schemaVersion: '', + } + } + + return parseWebrpcGenVersions(headerValue) +} + +function parseWebrpcGenVersions(header: string): WebrpcGenVersions { + const versions = header.split(';') + if (versions.length < 3) { + return { + webrpcGenVersion: '', + codeGenName: '', + codeGenVersion: '', + schemaName: '', + schemaVersion: '', + } + } + + const [_, webrpcGenVersion] = versions[0]!.split('@') + const [codeGenName, codeGenVersion] = versions[1]!.split('@') + const [schemaName, schemaVersion] = versions[2]!.split('@') + + return { + webrpcGenVersion: webrpcGenVersion ?? '', + codeGenName: codeGenName ?? '', + codeGenVersion: codeGenVersion ?? '', + schemaName: schemaName ?? '', + schemaVersion: schemaVersion ?? '', + } +} + +// +// Types +// + +export enum ETHTxnStatus { + UNKNOWN = 'UNKNOWN', + DROPPED = 'DROPPED', + QUEUED = 'QUEUED', + SENT = 'SENT', + SUCCEEDED = 'SUCCEEDED', + PARTIALLY_FAILED = 'PARTIALLY_FAILED', + FAILED = 'FAILED', +} + +export enum TransferType { + SEND = 'SEND', + RECEIVE = 'RECEIVE', + BRIDGE_DEPOSIT = 'BRIDGE_DEPOSIT', + BRIDGE_WITHDRAW = 'BRIDGE_WITHDRAW', + BURN = 'BURN', + UNKNOWN = 'UNKNOWN', +} + +export enum FeeTokenType { + UNKNOWN = 'UNKNOWN', + ERC20_TOKEN = 'ERC20_TOKEN', + ERC1155_TOKEN = 'ERC1155_TOKEN', +} + +export enum SortOrder { + DESC = 'DESC', + ASC = 'ASC', +} + +export interface Version { + webrpcVersion: string + schemaVersion: string + schemaHash: string + appVersion: string +} + +export interface RuntimeStatus { + healthOK: boolean + startTime: string + uptime: number + ver: string + branch: string + commitHash: string + chainID: number + useEIP1559: boolean + senders: Array + checks: RuntimeChecks +} + +export interface SenderStatus { + index: number + address: string + etherBalance: number + active: boolean +} + +export interface RuntimeChecks {} + +export interface SequenceContext { + factory: string + mainModule: string + mainModuleUpgradable: string + guestModule: string + utils: string +} + +export interface GasTank { + id: number + chainId: number + name: string + currentBalance: number + unlimited: boolean + feeMarkupFactor: number + updatedAt: string + createdAt: string +} + +export interface GasTankBalanceAdjustment { + gasTankId: number + nonce: number + amount: number + totalBalance: number + balanceTimestamp: string + createdAt: string +} + +export interface GasSponsor { + id: number + gasTankId: number + projectId: number + chainId: number + address: string + name: string + active: boolean + updatedAt: string + createdAt: string + deletedAt: string +} + +export interface GasSponsorUsage { + name: string + id: number + totalGasUsed: number + totalTxnFees: number + totalTxnFeesUsd: number + avgGasPrice: number + totalTxns: number + startTime: string + endTime: string +} + +export interface MetaTxn { + walletAddress: string + contract: string + input: string +} + +export interface MetaTxnLog { + id: number + chainId: number + projectId: number + txnHash: string + txnNonce: string + metaTxnID?: string + txnStatus: ETHTxnStatus + txnRevertReason: string + requeues: number + queuedAt: string + sentAt: string + minedAt: string + target: string + input: string + txnArgs: { [key: string]: any } + txnReceipt?: { [key: string]: any } + walletAddress: string + metaTxnNonce: string + gasLimit: number + gasPrice: string + gasUsed: number + gasEstimated: number + gasFeeMarkup?: number + usdRate: string + creditsUsed: number + cost: string + isWhitelisted: boolean + gasSponsor?: number + gasTank?: number + updatedAt: string + createdAt: string +} + +export interface MetaTxnReceipt { + id: string + status: string + revertReason?: string + index: number + logs: Array + receipts: Array + txnReceipt: string +} + +export interface MetaTxnReceiptLog { + address: string + topics: Array + data: string +} + +export interface Transaction { + txnHash?: string + blockNumber: number + chainId: number + metaTxnID?: string + transfers?: Array + users?: { [key: string]: TxnLogUser } + timestamp: string +} + +export interface TxnLogUser { + username: string +} + +export interface TxnLogTransfer { + transferType: TransferType + contractAddress: string + from: string + to: string + ids: Array + amounts: Array +} + +export interface SentTransactionsFilter { + pending?: boolean + failed?: boolean +} + +export interface SimulateResult { + executed: boolean + succeeded: boolean + result?: string + reason?: string + gasUsed: number + gasLimit: number +} + +export interface FeeOption { + token: FeeToken + to: string + value: string + gasLimit: number +} + +export interface FeeToken { + chainId: number + name: string + symbol: string + type: FeeTokenType + decimals?: number + logoURL: string + contractAddress?: string + tokenID?: string +} + +export interface Page { + pageSize?: number + page?: number + more?: boolean + totalRecords?: number + column?: string + before?: any + after?: any + sort?: Array +} + +export interface SortBy { + column: string + order: SortOrder +} + +export interface Relayer { + ping(headers?: object, signal?: AbortSignal): Promise + version(headers?: object, signal?: AbortSignal): Promise + runtimeStatus(headers?: object, signal?: AbortSignal): Promise + getSequenceContext(headers?: object, signal?: AbortSignal): Promise + getChainID(headers?: object, signal?: AbortSignal): Promise + sendMetaTxn(args: SendMetaTxnArgs, headers?: object, signal?: AbortSignal): Promise + getMetaTxnNonce(args: GetMetaTxnNonceArgs, headers?: object, signal?: AbortSignal): Promise + getMetaTxnReceipt( + args: GetMetaTxnReceiptArgs, + headers?: object, + signal?: AbortSignal, + ): Promise + simulate(args: SimulateArgs, headers?: object, signal?: AbortSignal): Promise + updateMetaTxnGasLimits( + args: UpdateMetaTxnGasLimitsArgs, + headers?: object, + signal?: AbortSignal, + ): Promise + feeTokens(headers?: object, signal?: AbortSignal): Promise + feeOptions(args: FeeOptionsArgs, headers?: object, signal?: AbortSignal): Promise + getMetaTxnNetworkFeeOptions( + args: GetMetaTxnNetworkFeeOptionsArgs, + headers?: object, + signal?: AbortSignal, + ): Promise + getMetaTransactions( + args: GetMetaTransactionsArgs, + headers?: object, + signal?: AbortSignal, + ): Promise + getTransactionCost( + args: GetTransactionCostArgs, + headers?: object, + signal?: AbortSignal, + ): Promise + sentTransactions(args: SentTransactionsArgs, headers?: object, signal?: AbortSignal): Promise + pendingTransactions( + args: PendingTransactionsArgs, + headers?: object, + signal?: AbortSignal, + ): Promise + getGasTank(args: GetGasTankArgs, headers?: object, signal?: AbortSignal): Promise + addGasTank(args: AddGasTankArgs, headers?: object, signal?: AbortSignal): Promise + updateGasTank(args: UpdateGasTankArgs, headers?: object, signal?: AbortSignal): Promise + nextGasTankBalanceAdjustmentNonce( + args: NextGasTankBalanceAdjustmentNonceArgs, + headers?: object, + signal?: AbortSignal, + ): Promise + adjustGasTankBalance( + args: AdjustGasTankBalanceArgs, + headers?: object, + signal?: AbortSignal, + ): Promise + getGasTankBalanceAdjustment( + args: GetGasTankBalanceAdjustmentArgs, + headers?: object, + signal?: AbortSignal, + ): Promise + listGasTankBalanceAdjustments( + args: ListGasTankBalanceAdjustmentsArgs, + headers?: object, + signal?: AbortSignal, + ): Promise + listGasSponsors(args: ListGasSponsorsArgs, headers?: object, signal?: AbortSignal): Promise + getGasSponsor(args: GetGasSponsorArgs, headers?: object, signal?: AbortSignal): Promise + addGasSponsor(args: AddGasSponsorArgs, headers?: object, signal?: AbortSignal): Promise + updateGasSponsor(args: UpdateGasSponsorArgs, headers?: object, signal?: AbortSignal): Promise + removeGasSponsor(args: RemoveGasSponsorArgs, headers?: object, signal?: AbortSignal): Promise + addressGasSponsors( + args: AddressGasSponsorsArgs, + headers?: object, + signal?: AbortSignal, + ): Promise + getProjectBalance( + args: GetProjectBalanceArgs, + headers?: object, + signal?: AbortSignal, + ): Promise + adjustProjectBalance( + args: AdjustProjectBalanceArgs, + headers?: object, + signal?: AbortSignal, + ): Promise +} + +export interface PingArgs {} + +export interface PingReturn { + status: boolean +} +export interface VersionArgs {} + +export interface VersionReturn { + version: Version +} +export interface RuntimeStatusArgs {} + +export interface RuntimeStatusReturn { + status: RuntimeStatus +} +export interface GetSequenceContextArgs {} + +export interface GetSequenceContextReturn { + data: SequenceContext +} +export interface GetChainIDArgs {} + +export interface GetChainIDReturn { + chainID: number +} +export interface SendMetaTxnArgs { + call: MetaTxn + quote?: string + projectID?: number +} + +export interface SendMetaTxnReturn { + status: boolean + txnHash: string +} +export interface GetMetaTxnNonceArgs { + walletContractAddress: string + space?: string +} + +export interface GetMetaTxnNonceReturn { + nonce: string +} +export interface GetMetaTxnReceiptArgs { + metaTxID: string +} + +export interface GetMetaTxnReceiptReturn { + receipt: MetaTxnReceipt +} +export interface SimulateArgs { + wallet: string + transactions: string +} + +export interface SimulateReturn { + results: Array +} +export interface UpdateMetaTxnGasLimitsArgs { + walletAddress: string + walletConfig: any + payload: string +} + +export interface UpdateMetaTxnGasLimitsReturn { + payload: string +} +export interface FeeTokensArgs {} + +export interface FeeTokensReturn { + isFeeRequired: boolean + tokens: Array +} +export interface FeeOptionsArgs { + wallet: string + to: string + data: string + simulate?: boolean +} + +export interface FeeOptionsReturn { + options: Array + sponsored: boolean + quote?: string +} +export interface GetMetaTxnNetworkFeeOptionsArgs { + walletConfig: any + payload: string +} + +export interface GetMetaTxnNetworkFeeOptionsReturn { + options: Array +} +export interface GetMetaTransactionsArgs { + projectId: number + page?: Page +} + +export interface GetMetaTransactionsReturn { + page: Page + transactions: Array +} +export interface GetTransactionCostArgs { + projectId: number + from: string + to: string +} + +export interface GetTransactionCostReturn { + cost: number +} +export interface SentTransactionsArgs { + filter?: SentTransactionsFilter + page?: Page +} + +export interface SentTransactionsReturn { + page: Page + transactions: Array +} +export interface PendingTransactionsArgs { + page?: Page +} + +export interface PendingTransactionsReturn { + page: Page + transactions: Array +} +export interface GetGasTankArgs { + id: number +} + +export interface GetGasTankReturn { + gasTank: GasTank +} +export interface AddGasTankArgs { + name: string + feeMarkupFactor: number + unlimited?: boolean +} + +export interface AddGasTankReturn { + status: boolean + gasTank: GasTank +} +export interface UpdateGasTankArgs { + id: number + name?: string + feeMarkupFactor?: number + unlimited?: boolean +} + +export interface UpdateGasTankReturn { + status: boolean + gasTank: GasTank +} +export interface NextGasTankBalanceAdjustmentNonceArgs { + id: number +} + +export interface NextGasTankBalanceAdjustmentNonceReturn { + nonce: number +} +export interface AdjustGasTankBalanceArgs { + id: number + nonce: number + amount: number +} + +export interface AdjustGasTankBalanceReturn { + status: boolean + adjustment: GasTankBalanceAdjustment +} +export interface GetGasTankBalanceAdjustmentArgs { + id: number + nonce: number +} + +export interface GetGasTankBalanceAdjustmentReturn { + adjustment: GasTankBalanceAdjustment +} +export interface ListGasTankBalanceAdjustmentsArgs { + id: number + page?: Page +} + +export interface ListGasTankBalanceAdjustmentsReturn { + page: Page + adjustments: Array +} +export interface ListGasSponsorsArgs { + projectId: number + page?: Page +} + +export interface ListGasSponsorsReturn { + page: Page + gasSponsors: Array +} +export interface GetGasSponsorArgs { + projectId: number + id: number +} + +export interface GetGasSponsorReturn { + gasSponsor: GasSponsor +} +export interface AddGasSponsorArgs { + projectId: number + address: string + name?: string + active?: boolean +} + +export interface AddGasSponsorReturn { + status: boolean + gasSponsor: GasSponsor +} +export interface UpdateGasSponsorArgs { + projectId: number + id: number + name?: string + active?: boolean +} + +export interface UpdateGasSponsorReturn { + status: boolean + gasSponsor: GasSponsor +} +export interface RemoveGasSponsorArgs { + projectId: number + id: number +} + +export interface RemoveGasSponsorReturn { + status: boolean +} +export interface AddressGasSponsorsArgs { + address: string + page?: Page +} + +export interface AddressGasSponsorsReturn { + page: Page + gasSponsors: Array +} +export interface GetProjectBalanceArgs { + projectId: number +} + +export interface GetProjectBalanceReturn { + balance: number +} +export interface AdjustProjectBalanceArgs { + projectId: number + amount: number + identifier: string +} + +export interface AdjustProjectBalanceReturn { + balance: number +} + +// +// Client +// +export class Relayer implements Relayer { + protected hostname: string + protected fetch: Fetch + protected path = '/rpc/Relayer/' + + constructor(hostname: string, fetch: Fetch) { + this.hostname = hostname.replace(/\/*$/, '') + this.fetch = (input: RequestInfo, init?: RequestInit) => fetch(input, init) + } + + private url(name: string): string { + return this.hostname + this.path + name + } + + ping = (headers?: object, signal?: AbortSignal): Promise => { + return this.fetch(this.url('Ping'), createHTTPRequest({}, headers, signal)).then( + (res) => { + return buildResponse(res).then((_data) => { + return { + status: _data.status, + } + }) + }, + (error) => { + throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) + }, + ) + } + + version = (headers?: object, signal?: AbortSignal): Promise => { + return this.fetch(this.url('Version'), createHTTPRequest({}, headers, signal)).then( + (res) => { + return buildResponse(res).then((_data) => { + return { + version: _data.version, + } + }) + }, + (error) => { + throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) + }, + ) + } + + runtimeStatus = (headers?: object, signal?: AbortSignal): Promise => { + return this.fetch(this.url('RuntimeStatus'), createHTTPRequest({}, headers, signal)).then( + (res) => { + return buildResponse(res).then((_data) => { + return { + status: _data.status, + } + }) + }, + (error) => { + throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) + }, + ) + } + + getSequenceContext = (headers?: object, signal?: AbortSignal): Promise => { + return this.fetch(this.url('GetSequenceContext'), createHTTPRequest({}, headers, signal)).then( + (res) => { + return buildResponse(res).then((_data) => { + return { + data: _data.data, + } + }) + }, + (error) => { + throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) + }, + ) + } + + getChainID = (headers?: object, signal?: AbortSignal): Promise => { + return this.fetch(this.url('GetChainID'), createHTTPRequest({}, headers, signal)).then( + (res) => { + return buildResponse(res).then((_data) => { + return { + chainID: _data.chainID, + } + }) + }, + (error) => { + throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) + }, + ) + } + + sendMetaTxn = (args: SendMetaTxnArgs, headers?: object, signal?: AbortSignal): Promise => { + return this.fetch(this.url('SendMetaTxn'), createHTTPRequest(args, headers, signal)).then( + (res) => { + return buildResponse(res).then((_data) => { + return { + status: _data.status, + txnHash: _data.txnHash, + } + }) + }, + (error) => { + throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) + }, + ) + } + + getMetaTxnNonce = ( + args: GetMetaTxnNonceArgs, + headers?: object, + signal?: AbortSignal, + ): Promise => { + return this.fetch(this.url('GetMetaTxnNonce'), createHTTPRequest(args, headers, signal)).then( + (res) => { + return buildResponse(res).then((_data) => { + return { + nonce: _data.nonce, + } + }) + }, + (error) => { + throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) + }, + ) + } + + getMetaTxnReceipt = ( + args: GetMetaTxnReceiptArgs, + headers?: object, + signal?: AbortSignal, + ): Promise => { + return this.fetch(this.url('GetMetaTxnReceipt'), createHTTPRequest(args, headers, signal)).then( + (res) => { + return buildResponse(res).then((_data) => { + return { + receipt: _data.receipt, + } + }) + }, + (error) => { + throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) + }, + ) + } + + simulate = (args: SimulateArgs, headers?: object, signal?: AbortSignal): Promise => { + return this.fetch(this.url('Simulate'), createHTTPRequest(args, headers, signal)).then( + (res) => { + return buildResponse(res).then((_data) => { + return { + results: >_data.results, + } + }) + }, + (error) => { + throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) + }, + ) + } + + updateMetaTxnGasLimits = ( + args: UpdateMetaTxnGasLimitsArgs, + headers?: object, + signal?: AbortSignal, + ): Promise => { + return this.fetch(this.url('UpdateMetaTxnGasLimits'), createHTTPRequest(args, headers, signal)).then( + (res) => { + return buildResponse(res).then((_data) => { + return { + payload: _data.payload, + } + }) + }, + (error) => { + throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) + }, + ) + } + + feeTokens = (headers?: object, signal?: AbortSignal): Promise => { + return this.fetch(this.url('FeeTokens'), createHTTPRequest({}, headers, signal)).then( + (res) => { + return buildResponse(res).then((_data) => { + return { + isFeeRequired: _data.isFeeRequired, + tokens: >_data.tokens, + } + }) + }, + (error) => { + throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) + }, + ) + } + + feeOptions = (args: FeeOptionsArgs, headers?: object, signal?: AbortSignal): Promise => { + return this.fetch(this.url('FeeOptions'), createHTTPRequest(args, headers, signal)).then( + (res) => { + return buildResponse(res).then((_data) => { + return { + options: >_data.options, + sponsored: _data.sponsored, + quote: _data.quote, + } + }) + }, + (error) => { + throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) + }, + ) + } + + getMetaTxnNetworkFeeOptions = ( + args: GetMetaTxnNetworkFeeOptionsArgs, + headers?: object, + signal?: AbortSignal, + ): Promise => { + return this.fetch(this.url('GetMetaTxnNetworkFeeOptions'), createHTTPRequest(args, headers, signal)).then( + (res) => { + return buildResponse(res).then((_data) => { + return { + options: >_data.options, + } + }) + }, + (error) => { + throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) + }, + ) + } + + getMetaTransactions = ( + args: GetMetaTransactionsArgs, + headers?: object, + signal?: AbortSignal, + ): Promise => { + return this.fetch(this.url('GetMetaTransactions'), createHTTPRequest(args, headers, signal)).then( + (res) => { + return buildResponse(res).then((_data) => { + return { + page: _data.page, + transactions: >_data.transactions, + } + }) + }, + (error) => { + throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) + }, + ) + } + + getTransactionCost = ( + args: GetTransactionCostArgs, + headers?: object, + signal?: AbortSignal, + ): Promise => { + return this.fetch(this.url('GetTransactionCost'), createHTTPRequest(args, headers, signal)).then( + (res) => { + return buildResponse(res).then((_data) => { + return { + cost: _data.cost, + } + }) + }, + (error) => { + throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) + }, + ) + } + + sentTransactions = ( + args: SentTransactionsArgs, + headers?: object, + signal?: AbortSignal, + ): Promise => { + return this.fetch(this.url('SentTransactions'), createHTTPRequest(args, headers, signal)).then( + (res) => { + return buildResponse(res).then((_data) => { + return { + page: _data.page, + transactions: >_data.transactions, + } + }) + }, + (error) => { + throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) + }, + ) + } + + pendingTransactions = ( + args: PendingTransactionsArgs, + headers?: object, + signal?: AbortSignal, + ): Promise => { + return this.fetch(this.url('PendingTransactions'), createHTTPRequest(args, headers, signal)).then( + (res) => { + return buildResponse(res).then((_data) => { + return { + page: _data.page, + transactions: >_data.transactions, + } + }) + }, + (error) => { + throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) + }, + ) + } + + getGasTank = (args: GetGasTankArgs, headers?: object, signal?: AbortSignal): Promise => { + return this.fetch(this.url('GetGasTank'), createHTTPRequest(args, headers, signal)).then( + (res) => { + return buildResponse(res).then((_data) => { + return { + gasTank: _data.gasTank, + } + }) + }, + (error) => { + throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) + }, + ) + } + + addGasTank = (args: AddGasTankArgs, headers?: object, signal?: AbortSignal): Promise => { + return this.fetch(this.url('AddGasTank'), createHTTPRequest(args, headers, signal)).then( + (res) => { + return buildResponse(res).then((_data) => { + return { + status: _data.status, + gasTank: _data.gasTank, + } + }) + }, + (error) => { + throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) + }, + ) + } + + updateGasTank = (args: UpdateGasTankArgs, headers?: object, signal?: AbortSignal): Promise => { + return this.fetch(this.url('UpdateGasTank'), createHTTPRequest(args, headers, signal)).then( + (res) => { + return buildResponse(res).then((_data) => { + return { + status: _data.status, + gasTank: _data.gasTank, + } + }) + }, + (error) => { + throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) + }, + ) + } + + nextGasTankBalanceAdjustmentNonce = ( + args: NextGasTankBalanceAdjustmentNonceArgs, + headers?: object, + signal?: AbortSignal, + ): Promise => { + return this.fetch(this.url('NextGasTankBalanceAdjustmentNonce'), createHTTPRequest(args, headers, signal)).then( + (res) => { + return buildResponse(res).then((_data) => { + return { + nonce: _data.nonce, + } + }) + }, + (error) => { + throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) + }, + ) + } + + adjustGasTankBalance = ( + args: AdjustGasTankBalanceArgs, + headers?: object, + signal?: AbortSignal, + ): Promise => { + return this.fetch(this.url('AdjustGasTankBalance'), createHTTPRequest(args, headers, signal)).then( + (res) => { + return buildResponse(res).then((_data) => { + return { + status: _data.status, + adjustment: _data.adjustment, + } + }) + }, + (error) => { + throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) + }, + ) + } + + getGasTankBalanceAdjustment = ( + args: GetGasTankBalanceAdjustmentArgs, + headers?: object, + signal?: AbortSignal, + ): Promise => { + return this.fetch(this.url('GetGasTankBalanceAdjustment'), createHTTPRequest(args, headers, signal)).then( + (res) => { + return buildResponse(res).then((_data) => { + return { + adjustment: _data.adjustment, + } + }) + }, + (error) => { + throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) + }, + ) + } + + listGasTankBalanceAdjustments = ( + args: ListGasTankBalanceAdjustmentsArgs, + headers?: object, + signal?: AbortSignal, + ): Promise => { + return this.fetch(this.url('ListGasTankBalanceAdjustments'), createHTTPRequest(args, headers, signal)).then( + (res) => { + return buildResponse(res).then((_data) => { + return { + page: _data.page, + adjustments: >_data.adjustments, + } + }) + }, + (error) => { + throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) + }, + ) + } + + listGasSponsors = ( + args: ListGasSponsorsArgs, + headers?: object, + signal?: AbortSignal, + ): Promise => { + return this.fetch(this.url('ListGasSponsors'), createHTTPRequest(args, headers, signal)).then( + (res) => { + return buildResponse(res).then((_data) => { + return { + page: _data.page, + gasSponsors: >_data.gasSponsors, + } + }) + }, + (error) => { + throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) + }, + ) + } + + getGasSponsor = (args: GetGasSponsorArgs, headers?: object, signal?: AbortSignal): Promise => { + return this.fetch(this.url('GetGasSponsor'), createHTTPRequest(args, headers, signal)).then( + (res) => { + return buildResponse(res).then((_data) => { + return { + gasSponsor: _data.gasSponsor, + } + }) + }, + (error) => { + throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) + }, + ) + } + + addGasSponsor = (args: AddGasSponsorArgs, headers?: object, signal?: AbortSignal): Promise => { + return this.fetch(this.url('AddGasSponsor'), createHTTPRequest(args, headers, signal)).then( + (res) => { + return buildResponse(res).then((_data) => { + return { + status: _data.status, + gasSponsor: _data.gasSponsor, + } + }) + }, + (error) => { + throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) + }, + ) + } + + updateGasSponsor = ( + args: UpdateGasSponsorArgs, + headers?: object, + signal?: AbortSignal, + ): Promise => { + return this.fetch(this.url('UpdateGasSponsor'), createHTTPRequest(args, headers, signal)).then( + (res) => { + return buildResponse(res).then((_data) => { + return { + status: _data.status, + gasSponsor: _data.gasSponsor, + } + }) + }, + (error) => { + throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) + }, + ) + } + + removeGasSponsor = ( + args: RemoveGasSponsorArgs, + headers?: object, + signal?: AbortSignal, + ): Promise => { + return this.fetch(this.url('RemoveGasSponsor'), createHTTPRequest(args, headers, signal)).then( + (res) => { + return buildResponse(res).then((_data) => { + return { + status: _data.status, + } + }) + }, + (error) => { + throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) + }, + ) + } + + addressGasSponsors = ( + args: AddressGasSponsorsArgs, + headers?: object, + signal?: AbortSignal, + ): Promise => { + return this.fetch(this.url('AddressGasSponsors'), createHTTPRequest(args, headers, signal)).then( + (res) => { + return buildResponse(res).then((_data) => { + return { + page: _data.page, + gasSponsors: >_data.gasSponsors, + } + }) + }, + (error) => { + throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) + }, + ) + } + + getProjectBalance = ( + args: GetProjectBalanceArgs, + headers?: object, + signal?: AbortSignal, + ): Promise => { + return this.fetch(this.url('GetProjectBalance'), createHTTPRequest(args, headers, signal)).then( + (res) => { + return buildResponse(res).then((_data) => { + return { + balance: _data.balance, + } + }) + }, + (error) => { + throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) + }, + ) + } + + adjustProjectBalance = ( + args: AdjustProjectBalanceArgs, + headers?: object, + signal?: AbortSignal, + ): Promise => { + return this.fetch(this.url('AdjustProjectBalance'), createHTTPRequest(args, headers, signal)).then( + (res) => { + return buildResponse(res).then((_data) => { + return { + balance: _data.balance, + } + }) + }, + (error) => { + throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) + }, + ) + } +} + +const createHTTPRequest = (body: object = {}, headers: object = {}, signal: AbortSignal | null = null): object => { + const reqHeaders: { [key: string]: string } = { ...headers, 'Content-Type': 'application/json' } + reqHeaders[WebrpcHeader] = WebrpcHeaderValue + + return { + method: 'POST', + headers: reqHeaders, + body: JSON.stringify(body || {}), + signal, + } +} + +const buildResponse = (res: Response): Promise => { + return res.text().then((text) => { + let data + try { + data = JSON.parse(text) + } catch (error) { + let message = '' + if (error instanceof Error) { + message = error.message + } + throw WebrpcBadResponseError.new({ + status: res.status, + cause: `JSON.parse(): ${message}: response text: ${text}`, + }) + } + if (!res.ok) { + const code: number = typeof data.code === 'number' ? data.code : 0 + throw (webrpcErrorByCode[code] || WebrpcError).new(data) + } + return data + }) +} + +// +// Errors +// + +export class WebrpcError extends Error { + name: string + code: number + message: string + status: number + cause?: string + + /** @deprecated Use message instead of msg. Deprecated in webrpc v0.11.0. */ + msg: string + + constructor(name: string, code: number, message: string, status: number, cause?: string) { + super(message) + this.name = name || 'WebrpcError' + this.code = typeof code === 'number' ? code : 0 + this.message = message || `endpoint error ${this.code}` + this.msg = this.message + this.status = typeof status === 'number' ? status : 0 + this.cause = cause + Object.setPrototypeOf(this, WebrpcError.prototype) + } + + static new(payload: any): WebrpcError { + return new this(payload.error, payload.code, payload.message || payload.msg, payload.status, payload.cause) + } +} + +// Webrpc errors + +export class WebrpcEndpointError extends WebrpcError { + constructor( + name: string = 'WebrpcEndpoint', + code: number = 0, + message: string = `endpoint error`, + status: number = 0, + cause?: string, + ) { + super(name, code, message, status, cause) + Object.setPrototypeOf(this, WebrpcEndpointError.prototype) + } +} + +export class WebrpcRequestFailedError extends WebrpcError { + constructor( + name: string = 'WebrpcRequestFailed', + code: number = -1, + message: string = `request failed`, + status: number = 0, + cause?: string, + ) { + super(name, code, message, status, cause) + Object.setPrototypeOf(this, WebrpcRequestFailedError.prototype) + } +} + +export class WebrpcBadRouteError extends WebrpcError { + constructor( + name: string = 'WebrpcBadRoute', + code: number = -2, + message: string = `bad route`, + status: number = 0, + cause?: string, + ) { + super(name, code, message, status, cause) + Object.setPrototypeOf(this, WebrpcBadRouteError.prototype) + } +} + +export class WebrpcBadMethodError extends WebrpcError { + constructor( + name: string = 'WebrpcBadMethod', + code: number = -3, + message: string = `bad method`, + status: number = 0, + cause?: string, + ) { + super(name, code, message, status, cause) + Object.setPrototypeOf(this, WebrpcBadMethodError.prototype) + } +} + +export class WebrpcBadRequestError extends WebrpcError { + constructor( + name: string = 'WebrpcBadRequest', + code: number = -4, + message: string = `bad request`, + status: number = 0, + cause?: string, + ) { + super(name, code, message, status, cause) + Object.setPrototypeOf(this, WebrpcBadRequestError.prototype) + } +} + +export class WebrpcBadResponseError extends WebrpcError { + constructor( + name: string = 'WebrpcBadResponse', + code: number = -5, + message: string = `bad response`, + status: number = 0, + cause?: string, + ) { + super(name, code, message, status, cause) + Object.setPrototypeOf(this, WebrpcBadResponseError.prototype) + } +} + +export class WebrpcServerPanicError extends WebrpcError { + constructor( + name: string = 'WebrpcServerPanic', + code: number = -6, + message: string = `server panic`, + status: number = 0, + cause?: string, + ) { + super(name, code, message, status, cause) + Object.setPrototypeOf(this, WebrpcServerPanicError.prototype) + } +} + +export class WebrpcInternalErrorError extends WebrpcError { + constructor( + name: string = 'WebrpcInternalError', + code: number = -7, + message: string = `internal error`, + status: number = 0, + cause?: string, + ) { + super(name, code, message, status, cause) + Object.setPrototypeOf(this, WebrpcInternalErrorError.prototype) + } +} + +export class WebrpcClientDisconnectedError extends WebrpcError { + constructor( + name: string = 'WebrpcClientDisconnected', + code: number = -8, + message: string = `client disconnected`, + status: number = 0, + cause?: string, + ) { + super(name, code, message, status, cause) + Object.setPrototypeOf(this, WebrpcClientDisconnectedError.prototype) + } +} + +export class WebrpcStreamLostError extends WebrpcError { + constructor( + name: string = 'WebrpcStreamLost', + code: number = -9, + message: string = `stream lost`, + status: number = 0, + cause?: string, + ) { + super(name, code, message, status, cause) + Object.setPrototypeOf(this, WebrpcStreamLostError.prototype) + } +} + +export class WebrpcStreamFinishedError extends WebrpcError { + constructor( + name: string = 'WebrpcStreamFinished', + code: number = -10, + message: string = `stream finished`, + status: number = 0, + cause?: string, + ) { + super(name, code, message, status, cause) + Object.setPrototypeOf(this, WebrpcStreamFinishedError.prototype) + } +} + +// Schema errors + +export class UnauthorizedError extends WebrpcError { + constructor( + name: string = 'Unauthorized', + code: number = 1000, + message: string = `Unauthorized access`, + status: number = 0, + cause?: string, + ) { + super(name, code, message, status, cause) + Object.setPrototypeOf(this, UnauthorizedError.prototype) + } +} + +export class PermissionDeniedError extends WebrpcError { + constructor( + name: string = 'PermissionDenied', + code: number = 1001, + message: string = `Permission denied`, + status: number = 0, + cause?: string, + ) { + super(name, code, message, status, cause) + Object.setPrototypeOf(this, PermissionDeniedError.prototype) + } +} + +export class SessionExpiredError extends WebrpcError { + constructor( + name: string = 'SessionExpired', + code: number = 1002, + message: string = `Session expired`, + status: number = 0, + cause?: string, + ) { + super(name, code, message, status, cause) + Object.setPrototypeOf(this, SessionExpiredError.prototype) + } +} + +export class MethodNotFoundError extends WebrpcError { + constructor( + name: string = 'MethodNotFound', + code: number = 1003, + message: string = `Method not found`, + status: number = 0, + cause?: string, + ) { + super(name, code, message, status, cause) + Object.setPrototypeOf(this, MethodNotFoundError.prototype) + } +} + +export class RequestConflictError extends WebrpcError { + constructor( + name: string = 'RequestConflict', + code: number = 1004, + message: string = `Conflict with target resource`, + status: number = 0, + cause?: string, + ) { + super(name, code, message, status, cause) + Object.setPrototypeOf(this, RequestConflictError.prototype) + } +} + +export class AbortedError extends WebrpcError { + constructor( + name: string = 'Aborted', + code: number = 1005, + message: string = `Request aborted`, + status: number = 0, + cause?: string, + ) { + super(name, code, message, status, cause) + Object.setPrototypeOf(this, AbortedError.prototype) + } +} + +export class GeoblockedError extends WebrpcError { + constructor( + name: string = 'Geoblocked', + code: number = 1006, + message: string = `Geoblocked region`, + status: number = 0, + cause?: string, + ) { + super(name, code, message, status, cause) + Object.setPrototypeOf(this, GeoblockedError.prototype) + } +} + +export class RateLimitedError extends WebrpcError { + constructor( + name: string = 'RateLimited', + code: number = 1007, + message: string = `Rate-limited. Please slow down.`, + status: number = 0, + cause?: string, + ) { + super(name, code, message, status, cause) + Object.setPrototypeOf(this, RateLimitedError.prototype) + } +} + +export class ProjectNotFoundError extends WebrpcError { + constructor( + name: string = 'ProjectNotFound', + code: number = 1008, + message: string = `Project not found`, + status: number = 0, + cause?: string, + ) { + super(name, code, message, status, cause) + Object.setPrototypeOf(this, ProjectNotFoundError.prototype) + } +} + +export class AccessKeyNotFoundError extends WebrpcError { + constructor( + name: string = 'AccessKeyNotFound', + code: number = 1101, + message: string = `Access key not found`, + status: number = 0, + cause?: string, + ) { + super(name, code, message, status, cause) + Object.setPrototypeOf(this, AccessKeyNotFoundError.prototype) + } +} + +export class AccessKeyMismatchError extends WebrpcError { + constructor( + name: string = 'AccessKeyMismatch', + code: number = 1102, + message: string = `Access key mismatch`, + status: number = 0, + cause?: string, + ) { + super(name, code, message, status, cause) + Object.setPrototypeOf(this, AccessKeyMismatchError.prototype) + } +} + +export class InvalidOriginError extends WebrpcError { + constructor( + name: string = 'InvalidOrigin', + code: number = 1103, + message: string = `Invalid origin for Access Key`, + status: number = 0, + cause?: string, + ) { + super(name, code, message, status, cause) + Object.setPrototypeOf(this, InvalidOriginError.prototype) + } +} + +export class InvalidServiceError extends WebrpcError { + constructor( + name: string = 'InvalidService', + code: number = 1104, + message: string = `Service not enabled for Access key`, + status: number = 0, + cause?: string, + ) { + super(name, code, message, status, cause) + Object.setPrototypeOf(this, InvalidServiceError.prototype) + } +} + +export class UnauthorizedUserError extends WebrpcError { + constructor( + name: string = 'UnauthorizedUser', + code: number = 1105, + message: string = `Unauthorized user`, + status: number = 0, + cause?: string, + ) { + super(name, code, message, status, cause) + Object.setPrototypeOf(this, UnauthorizedUserError.prototype) + } +} + +export class QuotaExceededError extends WebrpcError { + constructor( + name: string = 'QuotaExceeded', + code: number = 1200, + message: string = `Quota request exceeded`, + status: number = 0, + cause?: string, + ) { + super(name, code, message, status, cause) + Object.setPrototypeOf(this, QuotaExceededError.prototype) + } +} + +export class QuotaRateLimitError extends WebrpcError { + constructor( + name: string = 'QuotaRateLimit', + code: number = 1201, + message: string = `Quota rate limit exceeded`, + status: number = 0, + cause?: string, + ) { + super(name, code, message, status, cause) + Object.setPrototypeOf(this, QuotaRateLimitError.prototype) + } +} + +export class NoDefaultKeyError extends WebrpcError { + constructor( + name: string = 'NoDefaultKey', + code: number = 1300, + message: string = `No default access key found`, + status: number = 0, + cause?: string, + ) { + super(name, code, message, status, cause) + Object.setPrototypeOf(this, NoDefaultKeyError.prototype) + } +} + +export class MaxAccessKeysError extends WebrpcError { + constructor( + name: string = 'MaxAccessKeys', + code: number = 1301, + message: string = `Access keys limit reached`, + status: number = 0, + cause?: string, + ) { + super(name, code, message, status, cause) + Object.setPrototypeOf(this, MaxAccessKeysError.prototype) + } +} + +export class AtLeastOneKeyError extends WebrpcError { + constructor( + name: string = 'AtLeastOneKey', + code: number = 1302, + message: string = `You need at least one Access Key`, + status: number = 0, + cause?: string, + ) { + super(name, code, message, status, cause) + Object.setPrototypeOf(this, AtLeastOneKeyError.prototype) + } +} + +export class TimeoutError extends WebrpcError { + constructor( + name: string = 'Timeout', + code: number = 1900, + message: string = `Request timed out`, + status: number = 0, + cause?: string, + ) { + super(name, code, message, status, cause) + Object.setPrototypeOf(this, TimeoutError.prototype) + } +} + +export class InvalidArgumentError extends WebrpcError { + constructor( + name: string = 'InvalidArgument', + code: number = 2001, + message: string = `Invalid argument`, + status: number = 0, + cause?: string, + ) { + super(name, code, message, status, cause) + Object.setPrototypeOf(this, InvalidArgumentError.prototype) + } +} + +export class UnavailableError extends WebrpcError { + constructor( + name: string = 'Unavailable', + code: number = 2002, + message: string = `Unavailable resource`, + status: number = 0, + cause?: string, + ) { + super(name, code, message, status, cause) + Object.setPrototypeOf(this, UnavailableError.prototype) + } +} + +export class QueryFailedError extends WebrpcError { + constructor( + name: string = 'QueryFailed', + code: number = 2003, + message: string = `Query failed`, + status: number = 0, + cause?: string, + ) { + super(name, code, message, status, cause) + Object.setPrototypeOf(this, QueryFailedError.prototype) + } +} + +export class NotFoundError extends WebrpcError { + constructor( + name: string = 'NotFound', + code: number = 3000, + message: string = `Resource not found`, + status: number = 0, + cause?: string, + ) { + super(name, code, message, status, cause) + Object.setPrototypeOf(this, NotFoundError.prototype) + } +} + +export class InsufficientFeeError extends WebrpcError { + constructor( + name: string = 'InsufficientFee', + code: number = 3004, + message: string = `Insufficient fee`, + status: number = 0, + cause?: string, + ) { + super(name, code, message, status, cause) + Object.setPrototypeOf(this, InsufficientFeeError.prototype) + } +} + +export enum errors { + WebrpcEndpoint = 'WebrpcEndpoint', + WebrpcRequestFailed = 'WebrpcRequestFailed', + WebrpcBadRoute = 'WebrpcBadRoute', + WebrpcBadMethod = 'WebrpcBadMethod', + WebrpcBadRequest = 'WebrpcBadRequest', + WebrpcBadResponse = 'WebrpcBadResponse', + WebrpcServerPanic = 'WebrpcServerPanic', + WebrpcInternalError = 'WebrpcInternalError', + WebrpcClientDisconnected = 'WebrpcClientDisconnected', + WebrpcStreamLost = 'WebrpcStreamLost', + WebrpcStreamFinished = 'WebrpcStreamFinished', + Unauthorized = 'Unauthorized', + PermissionDenied = 'PermissionDenied', + SessionExpired = 'SessionExpired', + MethodNotFound = 'MethodNotFound', + RequestConflict = 'RequestConflict', + Aborted = 'Aborted', + Geoblocked = 'Geoblocked', + RateLimited = 'RateLimited', + ProjectNotFound = 'ProjectNotFound', + AccessKeyNotFound = 'AccessKeyNotFound', + AccessKeyMismatch = 'AccessKeyMismatch', + InvalidOrigin = 'InvalidOrigin', + InvalidService = 'InvalidService', + UnauthorizedUser = 'UnauthorizedUser', + QuotaExceeded = 'QuotaExceeded', + QuotaRateLimit = 'QuotaRateLimit', + NoDefaultKey = 'NoDefaultKey', + MaxAccessKeys = 'MaxAccessKeys', + AtLeastOneKey = 'AtLeastOneKey', + Timeout = 'Timeout', + InvalidArgument = 'InvalidArgument', + Unavailable = 'Unavailable', + QueryFailed = 'QueryFailed', + NotFound = 'NotFound', + InsufficientFee = 'InsufficientFee', +} + +export enum WebrpcErrorCodes { + WebrpcEndpoint = 0, + WebrpcRequestFailed = -1, + WebrpcBadRoute = -2, + WebrpcBadMethod = -3, + WebrpcBadRequest = -4, + WebrpcBadResponse = -5, + WebrpcServerPanic = -6, + WebrpcInternalError = -7, + WebrpcClientDisconnected = -8, + WebrpcStreamLost = -9, + WebrpcStreamFinished = -10, + Unauthorized = 1000, + PermissionDenied = 1001, + SessionExpired = 1002, + MethodNotFound = 1003, + RequestConflict = 1004, + Aborted = 1005, + Geoblocked = 1006, + RateLimited = 1007, + ProjectNotFound = 1008, + AccessKeyNotFound = 1101, + AccessKeyMismatch = 1102, + InvalidOrigin = 1103, + InvalidService = 1104, + UnauthorizedUser = 1105, + QuotaExceeded = 1200, + QuotaRateLimit = 1201, + NoDefaultKey = 1300, + MaxAccessKeys = 1301, + AtLeastOneKey = 1302, + Timeout = 1900, + InvalidArgument = 2001, + Unavailable = 2002, + QueryFailed = 2003, + NotFound = 3000, + InsufficientFee = 3004, +} + +export const webrpcErrorByCode: { [code: number]: any } = { + [0]: WebrpcEndpointError, + [-1]: WebrpcRequestFailedError, + [-2]: WebrpcBadRouteError, + [-3]: WebrpcBadMethodError, + [-4]: WebrpcBadRequestError, + [-5]: WebrpcBadResponseError, + [-6]: WebrpcServerPanicError, + [-7]: WebrpcInternalErrorError, + [-8]: WebrpcClientDisconnectedError, + [-9]: WebrpcStreamLostError, + [-10]: WebrpcStreamFinishedError, + [1000]: UnauthorizedError, + [1001]: PermissionDeniedError, + [1002]: SessionExpiredError, + [1003]: MethodNotFoundError, + [1004]: RequestConflictError, + [1005]: AbortedError, + [1006]: GeoblockedError, + [1007]: RateLimitedError, + [1008]: ProjectNotFoundError, + [1101]: AccessKeyNotFoundError, + [1102]: AccessKeyMismatchError, + [1103]: InvalidOriginError, + [1104]: InvalidServiceError, + [1105]: UnauthorizedUserError, + [1200]: QuotaExceededError, + [1201]: QuotaRateLimitError, + [1300]: NoDefaultKeyError, + [1301]: MaxAccessKeysError, + [1302]: AtLeastOneKeyError, + [1900]: TimeoutError, + [2001]: InvalidArgumentError, + [2002]: UnavailableError, + [2003]: QueryFailedError, + [3000]: NotFoundError, + [3004]: InsufficientFeeError, +} + +export type Fetch = (input: RequestInfo, init?: RequestInit) => Promise diff --git a/packages/services/relayer/tsconfig.json b/packages/services/relayer/tsconfig.json new file mode 100644 index 000000000..fed9c77b4 --- /dev/null +++ b/packages/services/relayer/tsconfig.json @@ -0,0 +1,10 @@ +{ + "extends": "@repo/typescript-config/base.json", + "compilerOptions": { + "rootDir": "src", + "outDir": "dist", + "types": ["node"] + }, + "include": ["src"], + "exclude": ["node_modules", "dist"] +} diff --git a/packages/utils/README.md b/packages/utils/README.md new file mode 100644 index 000000000..90a929712 --- /dev/null +++ b/packages/utils/README.md @@ -0,0 +1,4 @@ +# packages/utils + +This folder contains utility packages. We group them under +the utils/ folder to keep the repo nice and tidy. diff --git a/packages/utils/abi/CHANGELOG.md b/packages/utils/abi/CHANGELOG.md new file mode 100644 index 000000000..aa0333e53 --- /dev/null +++ b/packages/utils/abi/CHANGELOG.md @@ -0,0 +1,2087 @@ +# @0xsequence/abi + +## 2.3.8 + +### Patch Changes + +- indexer: update clients + +## 2.3.7 + +### Patch Changes + +- Metadata updates + +## 2.3.6 + +### Patch Changes + +- New chains + +## 2.3.5 + +### Patch Changes + +- Add Frequency Testnet + +## 2.3.4 + +### Patch Changes + +- metadata: exclude deprecated methods on rpc client + +## 2.3.3 + +### Patch Changes + +- metadata: client update + +## 2.3.2 + +### Patch Changes + +- metadata: update rpc client + +## 2.3.1 + +### Patch Changes + +- indexer: update rpc client + +## 2.3.0 + +### Minor Changes + +- update metadata rpc client + +## 2.2.15 + +### Patch Changes + +- API updates + +## 2.2.14 + +### Patch Changes + +- Somnia Testnet and Monad Testnet + +## 2.2.13 + +### Patch Changes + +- Add XR1 to all networks + +## 2.2.12 + +### Patch Changes + +- Add XR1 + +## 2.2.11 + +### Patch Changes + +- Relayer updates + +## 2.2.10 + +### Patch Changes + +- Etherlink support + +## 2.2.9 + +### Patch Changes + +- Indexer gateway native token balances + +## 2.2.8 + +### Patch Changes + +- Add Moonbeam and Moonbase Alpha + +## 2.2.7 + +### Patch Changes + +- Update Builder package + +## 2.2.6 + +### Patch Changes + +- Update relayer package + +## 2.2.5 + +### Patch Changes + +- auth: fix sequence indexer gateway url +- account: immutable wallet proxy hook + +## 2.2.4 + +### Patch Changes + +- network: update soneium mainnet block explorer url +- waas: signTypedData intent support + +## 2.2.3 + +### Patch Changes + +- provider: updating initWallet to use connected network configs if they exist + +## 2.2.2 + +### Patch Changes + +- pass projectAccessKey to relayer at all times + +## 2.2.1 + +### Patch Changes + +- waas-ethers: sign typed data + +## 2.2.0 + +### Minor Changes + +- indexer: gateway client +- @0xsequence/builder +- upgrade puppeteer to v23.10.3 + +## 2.1.8 + +### Patch Changes + +- Add Soneium Mainnet + +## 2.1.7 + +### Patch Changes + +- guard: pass project access key to guard requests + +## 2.1.6 + +### Patch Changes + +- Add LAOS and Telos Testnet chains + +## 2.1.5 + +### Patch Changes + +- account: save presigned configuration with reference chain id 1 + +## 2.1.4 + +### Patch Changes + +- provider: pass projectAccessKey into MuxMessageProvider + +## 2.1.3 + +### Patch Changes + +- waas: time drift date fix due to strange browser quirk + +## 2.1.2 + +### Patch Changes + +- provider: export analytics correctly + +## 2.1.1 + +### Patch Changes + +- Add LAOS chain support + +## 2.1.0 + +### Minor Changes + +- account: forward project access key when estimating fees and sending transactions + +### Patch Changes + +- sessions: save signatures with reference chain id + +## 2.0.26 + +### Patch Changes + +- account: fix chain id comparison + +## 2.0.25 + +### Patch Changes + +- skale-nebula: deploy gas limit = 10m + +## 2.0.24 + +### Patch Changes + +- sessions: arweave: configurable gateway url +- waas: use /status to get time drift before sending any intents + +## 2.0.23 + +### Patch Changes + +- Add The Root Network support + +## 2.0.22 + +### Patch Changes + +- Add SKALE Nebula Mainnet support + +## 2.0.21 + +### Patch Changes + +- account: add publishWitnessFor + +## 2.0.20 + +### Patch Changes + +- upgrade deps, and improve waas session status handling + +## 2.0.19 + +### Patch Changes + +- Add Immutable zkEVM support + +## 2.0.18 + +### Patch Changes + +- waas: new contractCall transaction type +- sessions: add arweave owner + +## 2.0.17 + +### Patch Changes + +- update waas auth to clear session before signIn + +## 2.0.16 + +### Patch Changes + +- Removed Astar chains + +## 2.0.15 + +### Patch Changes + +- indexer: update bindings with token balance additions + +## 2.0.14 + +### Patch Changes + +- sessions: arweave config reader +- network: add b3 and apechain mainnet configs + +## 2.0.13 + +### Patch Changes + +- network: toy-testnet + +## 2.0.12 + +### Patch Changes + +- api: update bindings + +## 2.0.11 + +### Patch Changes + +- waas: intents test fix +- api: update bindings + +## 2.0.10 + +### Patch Changes + +- network: soneium minato testnet + +## 2.0.9 + +### Patch Changes + +- network: fix SKALE network name + +## 2.0.8 + +### Patch Changes + +- metadata: update bindings + +## 2.0.7 + +### Patch Changes + +- wallet request handler fix + +## 2.0.6 + +### Patch Changes + +- network: matic -> pol + +## 2.0.5 + +### Patch Changes + +- provider: update databeat to 0.9.2 + +## 2.0.4 + +### Patch Changes + +- network: add skale-nebula-testnet + +## 2.0.3 + +### Patch Changes + +- waas: check session status in SequenceWaaS.isSignedIn() + +## 2.0.2 + +### Patch Changes + +- sessions: property convert serialized bignumber hex value to bigint + +## 2.0.1 + +### Patch Changes + +- waas: http signature check for authenticator requests +- provider: unwrap legacy json rpc responses +- use json replacer and reviver for bigints + +## 2.0.0 + +### Major Changes + +- ethers v6 + +## 1.10.15 + +### Patch Changes + +- utils: extractProjectIdFromAccessKey + +## 1.10.14 + +### Patch Changes + +- network: add borne-testnet to allNetworks + +## 1.10.13 + +### Patch Changes + +- network: add borne testnet + +## 1.10.12 + +### Patch Changes + +- api: update bindings +- global/window -> globalThis + +## 1.10.11 + +### Patch Changes + +- waas: updated intent.gen without webrpc types, errors exported from authenticator.gen + +## 1.10.10 + +### Patch Changes + +- metadata: update bindings with new contract collections api + +## 1.10.9 + +### Patch Changes + +- waas minor update + +## 1.10.8 + +### Patch Changes + +- update metadata bindings + +## 1.10.7 + +### Patch Changes + +- minor fixes to waas client + +## 1.10.6 + +### Patch Changes + +- metadata: update bindings + +## 1.10.5 + +### Patch Changes + +- network: ape-chain-testnet -> apechain-testnet + +## 1.10.4 + +### Patch Changes + +- network: add b3-sepolia, ape-chain-testnet, blast, blast-sepolia + +## 1.10.3 + +### Patch Changes + +- typing fix + +## 1.10.2 + +### Patch Changes + +- - waas: add getIdToken method + - indexer: update api client + +## 1.10.1 + +### Patch Changes + +- metadata: update bindings + +## 1.10.0 + +### Minor Changes + +- waas release v1.3.0 + +## 1.9.37 + +### Patch Changes + +- network: adds nativeToken data to NetworkMetadata constants + +## 1.9.36 + +### Patch Changes + +- guard: export client + +## 1.9.35 + +### Patch Changes + +- guard: update bindings + +## 1.9.34 + +### Patch Changes + +- waas: always use lowercase email + +## 1.9.33 + +### Patch Changes + +- waas: umd build + +## 1.9.32 + +### Patch Changes + +- indexer: update bindings + +## 1.9.31 + +### Patch Changes + +- metadata: token directory changes + +## 1.9.30 + +### Patch Changes + +- update + +## 1.9.29 + +### Patch Changes + +- disable gnosis chain + +## 1.9.28 + +### Patch Changes + +- add utils/merkletree + +## 1.9.27 + +### Patch Changes + +- network: optimistic -> optimism +- waas: remove defaults +- api, sessions: update bindings + +## 1.9.26 + +### Patch Changes + +- - add backend interfaces for pluggable interfaces + - introduce @0xsequence/react-native + - update pnpm to lockfile v9 + +## 1.9.25 + +### Patch Changes + +- update webrpc clients with new error types + +## 1.9.24 + +### Patch Changes + +- waas: add memoryStore backend to localStore + +## 1.9.23 + +### Patch Changes + +- update api client bindings + +## 1.9.22 + +### Patch Changes + +- update metadata client bindings + +## 1.9.21 + +### Patch Changes + +- api client bindings + +## 1.9.20 + +### Patch Changes + +- api client bindings update + +## 1.9.19 + +### Patch Changes + +- waas update + +## 1.9.18 + +### Patch Changes + +- provider: prohibit dangerous functions + +## 1.9.17 + +### Patch Changes + +- network: add xr-sepolia + +## 1.9.16 + +### Patch Changes + +- waas: sequence.feeOptions + +## 1.9.15 + +### Patch Changes + +- metadata: collection external_link field name fix + +## 1.9.14 + +### Patch Changes + +- network: astar-zkatana -> astar-zkyoto +- network: deprecate polygon mumbai network +- network: add xai and polygon amoy + +## 1.9.13 + +### Patch Changes + +- waas: fix @0xsequence/network dependency + +## 1.9.12 + +### Patch Changes + +- indexer: update rpc bindings +- provider: signMessage: Serialize the BytesLike or string message into hexstring before sending +- waas: SessionAuthProof + +## 1.9.11 + +### Patch Changes + +- metdata, update rpc bindings + +## 1.9.10 + +### Patch Changes + +- update metadata rpc bindings + +## 1.9.9 + +### Patch Changes + +- metadata, add SequenceCollections rpc client + +## 1.9.8 + +### Patch Changes + +- waas client update + +## 1.9.7 + +### Patch Changes + +- update rpc client bindings for api, metadata and relayer + +## 1.9.6 + +### Patch Changes + +- waas package update + +## 1.9.5 + +### Patch Changes + +- RpcRelayer prioritize project access key + +## 1.9.4 + +### Patch Changes + +- waas: fix network dependency + +## 1.9.3 + +### Patch Changes + +- provider: don't append access key to RPC url if user has already provided it + +## 1.9.2 + +### Patch Changes + +- network: add xai-sepolia + +## 1.9.1 + +### Patch Changes + +- analytics fix + +## 1.9.0 + +### Minor Changes + +- waas release + +## 1.8.8 + +### Patch Changes + +- update metadata bindings + +## 1.8.7 + +### Patch Changes + +- provider: update databeat to 0.9.1 + +## 1.8.6 + +### Patch Changes + +- guard: SignedOwnershipProof + +## 1.8.5 + +### Patch Changes + +- guard: signOwnershipProof and isSignedOwnershipProof + +## 1.8.4 + +### Patch Changes + +- network: add homeverse to networks list + +## 1.8.3 + +### Patch Changes + +- api: introduce basic linked wallet support + +## 1.8.2 + +### Patch Changes + +- provider: don't initialize analytics unless explicitly requested + +## 1.8.1 + +### Patch Changes + +- update to analytics provider + +## 1.8.0 + +### Minor Changes + +- provider: project analytics + +## 1.7.2 + +### Patch Changes + +- 0xsequence: ChainId should not be exported as a type +- account, wallet: fix nonce selection + +## 1.7.1 + +### Patch Changes + +- network: add missing avalanche logoURI + +## 1.7.0 + +### Minor Changes + +- provider: projectAccessKey is now required + +### Patch Changes + +- network: add NetworkMetadata.logoURI property for all networks + +## 1.6.3 + +### Patch Changes + +- network list update + +## 1.6.2 + +### Patch Changes + +- auth: projectAccessKey option +- wallet: use 12 bytes for random space + +## 1.6.1 + +### Patch Changes + +- core: add simple config from subdigest support +- core: fix encode tree with subdigest +- account: implement buildOnChainSignature on Account + +## 1.6.0 + +### Minor Changes + +- account, wallet: parallel transactions by default + +### Patch Changes + +- provider: emit disconnect on sign out + +## 1.5.0 + +### Minor Changes + +- signhub: add 'signing' signer status + +### Patch Changes + +- auth: Session.open: onAccountAddress callback +- account: allow empty transaction bundles + +## 1.4.9 + +### Patch Changes + +- rename SequenceMetadataClient to SequenceMetadata + +## 1.4.8 + +### Patch Changes + +- account: Account.getSigners + +## 1.4.7 + +### Patch Changes + +- update indexer client bindings + +## 1.4.6 + +### Patch Changes + +- - add sepolia networks, mark goerli as deprecated + - update indexer client bindings + +## 1.4.5 + +### Patch Changes + +- indexer/metadata: update client bindings +- auth: selectWallet with new address + +## 1.4.4 + +### Patch Changes + +- indexer: update bindings +- auth: handle jwt expiry + +## 1.4.3 + +### Patch Changes + +- guard: return active status from GuardSigner.getAuthMethods + +## 1.4.2 + +### Patch Changes + +- guard: update bindings + +## 1.4.1 + +### Patch Changes + +- network: remove unused networks +- signhub: orchestrator interface +- guard: auth methods interface +- guard: update bindings for pin and totp +- guard: no more retry logic + +## 1.4.0 + +### Minor Changes + +- project access key support + +## 1.3.0 + +### Minor Changes + +- signhub: account children + +### Patch Changes + +- guard: do not throw when building deploy transaction +- network: snowtrace.io -> subnets.avax.network/c-chain + +## 1.2.9 + +### Patch Changes + +- account: AccountSigner.sendTransaction simulateForFeeOptions +- relayer: update bindings + +## 1.2.8 + +### Patch Changes + +- rename X-Sequence-Token-Key header to X-Access-Key + +## 1.2.7 + +### Patch Changes + +- add x-sequence-token-key to clients + +## 1.2.6 + +### Patch Changes + +- Fix bind multicall provider + +## 1.2.5 + +### Patch Changes + +- Multicall default configuration fixes + +## 1.2.4 + +### Patch Changes + +- provider: Adding missing payment provider types to PaymentProviderOption +- provider: WalletRequestHandler.notifyChainChanged + +## 1.2.3 + +### Patch Changes + +- auth, provider: connect to accept optional authorizeNonce + +## 1.2.2 + +### Patch Changes + +- provider: allow createContract calls +- core: check for explicit zero address in contract deployments + +## 1.2.1 + +### Patch Changes + +- auth: use sequence api chain id as reference chain id if available + +## 1.2.0 + +### Minor Changes + +- split services from session, better local support + +## 1.1.15 + +### Patch Changes + +- guard: remove error filtering + +## 1.1.14 + +### Patch Changes + +- guard: add GuardSigner.onError + +## 1.1.13 + +### Patch Changes + +- provider: pass client version with connect options +- provider: removing large from BannerSize + +## 1.1.12 + +### Patch Changes + +- provider: adding bannerSize to ConnectOptions + +## 1.1.11 + +### Patch Changes + +- add homeverse configs + +## 1.1.10 + +### Patch Changes + +- handle default EIP6492 on send + +## 1.1.9 + +### Patch Changes + +- Custom default EIP6492 on client + +## 1.1.8 + +### Patch Changes + +- metadata: searchMetadata: add types filter + +## 1.1.7 + +### Patch Changes + +- adding signInWith connect settings option to allow dapps to automatically login their users with a certain provider optimizing the normal authentication flow + +## 1.1.6 + +### Patch Changes + +- metadata: searchMetadata: add chainID and excludeTokenMetadata filters + +## 1.1.5 + +### Patch Changes + +- account: re-compute meta-transaction id for wallet deployment transactions + +## 1.1.4 + +### Patch Changes + +- network: rename base-mainnet to base +- provider: override isDefaultChain with ConnectOptions.networkId if provided + +## 1.1.3 + +### Patch Changes + +- provider: use network id from transport session +- provider: sign authorization using ConnectOptions.networkId if provided + +## 1.1.2 + +### Patch Changes + +- provider: jsonrpc chain id fixes + +## 1.1.1 + +### Patch Changes + +- network: add base mainnet and sepolia +- provider: reject toxic transaction requests + +## 1.1.0 + +### Minor Changes + +- Refactor dapp facing provider + +## 1.0.5 + +### Patch Changes + +- network: export network constants +- guard: use the correct global for fetch +- network: nova-explorer.arbitrum.io -> nova.arbiscan.io + +## 1.0.4 + +### Patch Changes + +- provider: accept name or number for networkId + +## 1.0.3 + +### Patch Changes + +- Simpler isValidSignature helpers + +## 1.0.2 + +### Patch Changes + +- add extra signature validation utils methods + +## 1.0.1 + +### Patch Changes + +- add homeverse testnet + +## 1.0.0 + +### Major Changes + +- https://sequence.xyz/blog/sequence-wallet-light-state-sync-full-merkle-wallets + +## 0.43.34 + +### Patch Changes + +- auth: no jwt for indexer + +## 0.43.33 + +### Patch Changes + +- Adding onConnectOptionsChange handler to WalletRequestHandler + +## 0.43.32 + +### Patch Changes + +- add Base Goerli network + +## 0.43.31 + +### Patch Changes + +- remove AuxDataProvider, add promptSignInConnect + +## 0.43.30 + +### Patch Changes + +- add arbitrum goerli testnet + +## 0.43.29 + +### Patch Changes + +- provider: check availability of window object + +## 0.43.28 + +### Patch Changes + +- update api bindings + +## 0.43.27 + +### Patch Changes + +- Add rpc is sequence method + +## 0.43.26 + +### Patch Changes + +- add zkevm url to enum + +## 0.43.25 + +### Patch Changes + +- added polygon zkevm to mainnet networks + +## 0.43.24 + +### Patch Changes + +- name change from zkevm to polygon-zkevm + +## 0.43.23 + +### Patch Changes + +- update zkEVM name to Polygon zkEVM + +## 0.43.22 + +### Patch Changes + +- add zkevm chain + +## 0.43.21 + +### Patch Changes + +- api: update client bindings + +## 0.43.20 + +### Patch Changes + +- indexer: update bindings + +## 0.43.19 + +### Patch Changes + +- session proof update + +## 0.43.18 + +### Patch Changes + +- rpc client global check, hardening + +## 0.43.17 + +### Patch Changes + +- rpc clients, check of 'global' is defined + +## 0.43.16 + +### Patch Changes + +- ethers peerDep to v5, update rpc client global use + +## 0.43.15 + +### Patch Changes + +- - provider: expand receiver type on some util methods + +## 0.43.14 + +### Patch Changes + +- bump + +## 0.43.13 + +### Patch Changes + +- update rpc bindings + +## 0.43.12 + +### Patch Changes + +- provider: single wallet init, and add new unregisterWallet() method + +## 0.43.11 + +### Patch Changes + +- fix lockfiles +- re-add mocha type deleter + +## 0.43.10 + +### Patch Changes + +- various improvements + +## 0.43.9 + +### Patch Changes + +- update deps + +## 0.43.8 + +### Patch Changes + +- network: JsonRpcProvider with caching + +## 0.43.7 + +### Patch Changes + +- provider: fix wallet network init + +## 0.43.6 + +### Patch Changes + +- metadatata: update rpc bindings + +## 0.43.5 + +### Patch Changes + +- provider: do not set default network for connect messages +- provider: forward missing error message + +## 0.43.4 + +### Patch Changes + +- no-change version bump to fix incorrectly tagged snapshot build + +## 0.43.3 + +### Patch Changes + +- metadata: update bindings + +## 0.43.2 + +### Patch Changes + +- provider: implement connectUnchecked + +## 0.43.1 + +### Patch Changes + +- update to latest ethauth dep + +## 0.43.0 + +### Minor Changes + +- move ethers to a peer dependency + +## 0.42.10 + +### Patch Changes + +- add auxDataProvider + +## 0.42.9 + +### Patch Changes + +- provider: add eip-191 exceptions + +## 0.42.8 + +### Patch Changes + +- provider: skip setting intent origin if we're unity plugin + +## 0.42.7 + +### Patch Changes + +- Add sign in options to connection settings + +## 0.42.6 + +### Patch Changes + +- api bindings update + +## 0.42.5 + +### Patch Changes + +- relayer: don't treat missing receipt as hard failure + +## 0.42.4 + +### Patch Changes + +- provider: add custom app protocol to connect options + +## 0.42.3 + +### Patch Changes + +- update api bindings + +## 0.42.2 + +### Patch Changes + +- disable rinkeby network + +## 0.42.1 + +### Patch Changes + +- wallet: optional waitForReceipt parameter + +## 0.42.0 + +### Minor Changes + +- relayer: estimateGasLimits -> simulate +- add simulator package + +### Patch Changes + +- transactions: fix flattenAuxTransactions +- provider: only filter nullish values +- provider: re-map transaction 'gas' back to 'gasLimit' + +## 0.41.3 + +### Patch Changes + +- api bindings update + +## 0.41.2 + +### Patch Changes + +- api bindings update + +## 0.41.1 + +### Patch Changes + +- update default networks + +## 0.41.0 + +### Minor Changes + +- relayer: fix Relayer.wait() interface + + The interface for calling Relayer.wait() has changed. Instead of a single optional ill-defined timeout/delay parameter, there are three optional parameters, in order: + + - timeout: the maximum time to wait for the transaction receipt + - delay: the polling interval, i.e. the time to wait between requests + - maxFails: the maximum number of hard failures to tolerate before giving up + + Please update your codebase accordingly. + +- relayer: add optional waitForReceipt parameter to Relayer.relay + + The behaviour of Relayer.relay() was not well-defined with respect to whether or not it waited for a receipt. + This change allows the caller to specify whether to wait or not, with the default behaviour being to wait. + +### Patch Changes + +- relayer: wait receipt retry logic +- fix wrapped object error +- provider: forward delegateCall and revertOnError transaction fields + +## 0.40.6 + +### Patch Changes + +- add arbitrum-nova chain + +## 0.40.5 + +### Patch Changes + +- api: update bindings + +## 0.40.4 + +### Patch Changes + +- add unreal transport + +## 0.40.3 + +### Patch Changes + +- provider: fix MessageToSign message type + +## 0.40.2 + +### Patch Changes + +- Wallet provider, loadSession method + +## 0.40.1 + +### Patch Changes + +- export sequence.initWallet and sequence.getWallet + +## 0.40.0 + +### Minor Changes + +- add sequence.initWallet(network, config) and sequence.getWallet() helper methods + +## 0.39.6 + +### Patch Changes + +- indexer: update client bindings + +## 0.39.5 + +### Patch Changes + +- provider: fix networkRpcUrl config option + +## 0.39.4 + +### Patch Changes + +- api: update client bindings + +## 0.39.3 + +### Patch Changes + +- add request method on Web3Provider + +## 0.39.2 + +### Patch Changes + +- update umd name + +## 0.39.1 + +### Patch Changes + +- add Aurora network +- add origin info for accountsChanged event to handle it per dapp + +## 0.39.0 + +### Minor Changes + +- abstract window.localStorage to interface type + +## 0.38.2 + +### Patch Changes + +- provider: add Settings.defaultPurchaseAmount + +## 0.38.1 + +### Patch Changes + +- update api and metadata rpc bindings + +## 0.38.0 + +### Minor Changes + +- api: update bindings, change TokenPrice interface +- bridge: remove @0xsequence/bridge package +- api: update bindings, rename ContractCallArg to TupleComponent + +## 0.37.1 + +### Patch Changes + +- Add back sortNetworks - Removing sorting was a breaking change for dapps on older versions which directly integrate sequence. + +## 0.37.0 + +### Minor Changes + +- network related fixes and improvements +- api: bindings: exchange rate lookups + +## 0.36.13 + +### Patch Changes + +- api: update bindings with new price endpoints + +## 0.36.12 + +### Patch Changes + +- wallet: skip remote signers if not needed +- auth: check that signature meets threshold before requesting auth token + +## 0.36.11 + +### Patch Changes + +- Prefix EIP191 message on wallet-request-handler + +## 0.36.10 + +### Patch Changes + +- support bannerUrl on connect + +## 0.36.9 + +### Patch Changes + +- minor dev xp improvements + +## 0.36.8 + +### Patch Changes + +- more connect options (theme, payment providers, funding currencies) + +## 0.36.7 + +### Patch Changes + +- fix missing break + +## 0.36.6 + +### Patch Changes + +- wallet_switchEthereumChain support + +## 0.36.5 + +### Patch Changes + +- auth: bump ethauth to 0.7.0 + network, wallet: don't assume position of auth network in list + api/indexer/metadata: trim trailing slash on hostname, and add endpoint urls + relayer: Allow to specify local relayer transaction parameters like gas price or gas limit + +## 0.36.4 + +### Patch Changes + +- Updating list of chain ids to include other ethereum compatible chains + +## 0.36.3 + +### Patch Changes + +- provider: pass connect options to prompter methods + +## 0.36.2 + +### Patch Changes + +- transactions: Setting target to 0x0 when empty to during SequenceTxAbiEncode + +## 0.36.1 + +### Patch Changes + +- metadata: update client with more fields + +## 0.36.0 + +### Minor Changes + +- relayer, wallet: fee quote support + +## 0.35.12 + +### Patch Changes + +- provider: rename wallet.commands to wallet.utils + +## 0.35.11 + +### Patch Changes + +- provider/utils: smoother message validation + +## 0.35.10 + +### Patch Changes + +- upgrade deps + +## 0.35.9 + +### Patch Changes + +- provider: window-transport override event handlers with new wallet instance + +## 0.35.8 + +### Patch Changes + +- provider: async wallet sign in improvements + +## 0.35.7 + +### Patch Changes + +- config: cache wallet configs + +## 0.35.6 + +### Patch Changes + +- provider: support async signin of wallet request handler + +## 0.35.5 + +### Patch Changes + +- wallet: skip threshold check during fee estimation + +## 0.35.4 + +### Patch Changes + +- - browser extension mode, center window + +## 0.35.3 + +### Patch Changes + +- - update window position when in browser extension mode + +## 0.35.2 + +### Patch Changes + +- - provider: WindowMessageHandler accept optional windowHref + +## 0.35.1 + +### Patch Changes + +- wallet: update config on undeployed too + +## 0.35.0 + +### Minor Changes + +- - config: add buildStubSignature + - provider: add checks to signing cases for wallet deployment and config statuses + - provider: add prompt for wallet deployment + - relayer: add BaseRelayer.prependWalletDeploy + - relayer: add Relayer.feeOptions + - relayer: account for wallet deployment in fee estimation + - transactions: add fromTransactionish + - wallet: add Account.prependConfigUpdate + - wallet: add Account.getFeeOptions + +## 0.34.0 + +### Minor Changes + +- - upgrade deps + +## 0.31.0 + +### Minor Changes + +- - upgrading to ethers v5.5 + +## 0.30.0 + +### Minor Changes + +- - upgrade most deps + +## 0.29.8 + +### Patch Changes + +- update api + +## 0.29.0 + +### Minor Changes + +- major architectural changes in Sequence design + + - only one API instance, API is no longer a per-chain service + - separate per-chain indexer service, API no longer handles indexing + - single contract metadata service, API no longer serves metadata + + chaind package has been removed, indexer and metadata packages have been added + + stronger typing with new explicit ChainId type + + multicall fixes and improvements + + forbid "wait" transactions in sendTransactionBatch calls + +## 0.28.0 + +### Minor Changes + +- extension provider + +## 0.27.0 + +### Minor Changes + +- Add requireFreshSigner lib to sessions + +## 0.25.1 + +### Patch Changes + +- Fix build typescrypt issue + +## 0.25.0 + +### Minor Changes + +- 10c8af8: Add estimator package + Fix multicall few calls bug + +## 0.23.0 + +### Minor Changes + +- - relayer: offer variety of gas fee options from the relayer service" + +## 0.22.2 + +### Patch Changes + +- e1c109e: Fix authProof on expired sessions + +## 0.22.1 + +### Patch Changes + +- transport session cache + +## 0.22.0 + +### Minor Changes + +- e667b65: Expose all relayer options on networks + +## 0.21.5 + +### Patch Changes + +- Give priority to metaTxnId returned by relayer + +## 0.21.4 + +### Patch Changes + +- Add has enough signers method + +## 0.21.3 + +### Patch Changes + +- add window session cache + +## 0.21.2 + +### Patch Changes + +- exception handlind in relayer + +## 0.21.0 + +### Minor Changes + +- - fix gas estimation on wallets with large number of signers + - update to session handling and wallet config construction upon auth + +## 0.19.3 + +### Patch Changes + +- jwtAuth visibility, package version sync + +## 0.19.2 + +### Patch Changes + +- - api: change jwtAuth visibility + +## 0.19.0 + +### Minor Changes + +- - provider, improve dapp / wallet transport io + +## 0.18.0 + +### Minor Changes + +- relayer improvements and pending transaction handling + +## 0.16.0 + +### Minor Changes + +- relayer as its own service separate from chaind + +## 0.15.1 + +### Patch Changes + +- update api clients + +## 0.14.3 + +### Patch Changes + +- Fix 0xSequence relayer dependencies + +## 0.14.2 + +### Patch Changes + +- Add debug logs to rpc-relayer + +## 0.14.0 + +### Minor Changes + +- update sequence utils finder which includes optimization + +## 0.13.0 + +### Minor Changes + +- Update SequenceUtils deployed contract + +## 0.12.1 + +### Patch Changes + +- npm bump + +## 0.12.0 + +### Minor Changes + +- provider: improvements to window transport + +## 0.11.4 + +### Patch Changes + +- update api client + +## 0.11.3 + +### Patch Changes + +- improve openWindow state options handling + +## 0.11.2 + +### Patch Changes + +- Fix multicall proxy scopes + +## 0.11.1 + +### Patch Changes + +- Add support for dynamic and nested signatures + +## 0.11.0 + +### Minor Changes + +- Update wallet context to 1.7 contracts + +## 0.10.9 + +### Patch Changes + +- add support for public addresses as signers in session.open + +## 0.10.8 + +### Patch Changes + +- Multicall production configuration + +## 0.10.7 + +### Patch Changes + +- allow provider transport to force disconnect + +## 0.10.6 + +### Patch Changes + +- - fix getWalletState method + +## 0.10.5 + +### Patch Changes + +- update relayer gas refund options + +## 0.10.4 + +### Patch Changes + +- Update api proto + +## 0.10.3 + +### Patch Changes + +- Fix loading config cross-chain + +## 0.10.2 + +### Patch Changes + +- - message digest fix + +## 0.10.1 + +### Patch Changes + +- upgrade deps + +## 0.10.0 + +### Minor Changes + +- Deployed new contracts with ERC1271 signer support + +## 0.9.6 + +### Patch Changes + +- Update ABIs for latest sequence contracts + +## 0.9.3 + +### Patch Changes + +- - minor improvements + +## 0.9.1 + +### Patch Changes + +- - patch bump + +## 0.9.0 + +### Minor Changes + +- - provider transport hardening + +## 0.8.5 + +### Patch Changes + +- - use latest wallet-contracts + +## 0.8.4 + +### Patch Changes + +- - minor improvements, name updates and comments + +## 0.8.3 + +### Patch Changes + +- - refinements + + - normalize signer address in config + + - provider: getWalletState() method to WalletProvider + +## 0.8.2 + +### Patch Changes + +- - field rename and ethauth dependency bump + +## 0.8.1 + +### Patch Changes + +- - variety of optimizations + +## 0.8.0 + +### Minor Changes + +- - changeset fix + +## 0.7.0 + +### Patch Changes + +- 6f11ed7: sequence.js, init release diff --git a/packages/utils/abi/README.md b/packages/utils/abi/README.md new file mode 100644 index 000000000..79488d496 --- /dev/null +++ b/packages/utils/abi/README.md @@ -0,0 +1,3 @@ +# @0xsequence/abi + +See [0xsequence project page](https://github.com/0xsequence/sequence.js). diff --git a/packages/utils/abi/package.json b/packages/utils/abi/package.json new file mode 100644 index 000000000..5634e7f6e --- /dev/null +++ b/packages/utils/abi/package.json @@ -0,0 +1,27 @@ +{ + "name": "@0xsequence/abi", + "version": "3.0.0", + "description": "abi sub-package for Sequence", + "repository": "https://github.com/0xsequence/sequence.js/tree/master/packages/abi", + "author": "Sequence Platforms Inc.", + "license": "Apache-2.0", + "scripts": { + "build": "tsc", + "dev": "tsc --watch", + "test": "echo", + "typecheck": "tsc --noEmit" + }, + "exports": { + ".": { + "types": "./src/index.ts", + "default": "./dist/index.js" + } + }, + "peerDependencies": {}, + "devDependencies": { + "@repo/typescript-config": "workspace:^", + "@types/node": "^22.13.9", + "typescript": "^5.7.3" + }, + "dependencies": {} +} diff --git a/packages/utils/abi/src/index.ts b/packages/utils/abi/src/index.ts new file mode 100644 index 000000000..ce88f5b8e --- /dev/null +++ b/packages/utils/abi/src/index.ts @@ -0,0 +1,23 @@ +export { abi as erc5719Abi } from './wallet/erc5719' +export { abi as erc1271Abi } from './wallet/erc1271' +export { abi as erc6492Abi } from './wallet/erc6492' +export { abi as factoryAbi } from './wallet/factory' +export { abi as mainModuleAbi } from './wallet/mainModule' +export { abi as mainModuleUpgradableAbi } from './wallet/mainModuleUpgradable' +export { abi as moduleHooksAbi } from './wallet/moduleHooks' +export { abi as sequenceUtilsAbi } from './wallet/sequenceUtils' +export { abi as requireFreshSignerAbi } from './wallet/libs/requireFreshSigners' +export { abi as walletProxyHookAbi } from './wallet/walletProxyHook' + +export { walletContracts } from './wallet' + +export { ERC1155_ABI } from './tokens/erc1155' +export { ERC20_ABI } from './tokens/erc20' +export { ERC6909_ABI } from './tokens/erc6909' +export { ERC721_ABI } from './tokens/erc721' + +export { ERC1155_SALE_ABI } from './sale/erc1155Sale' +export { ERC721_SALE_ABI } from './sale/erc721Sale' + +export { ERC1155_SALE_ITEMS_ABI } from './saleItems/erc1155SaleItems' +export { ERC721_SALE_ITEMS_ABI } from './saleItems/erc721SaleItems' diff --git a/packages/utils/abi/src/sale/erc1155Sale.ts b/packages/utils/abi/src/sale/erc1155Sale.ts new file mode 100644 index 000000000..cbc20ff0e --- /dev/null +++ b/packages/utils/abi/src/sale/erc1155Sale.ts @@ -0,0 +1,352 @@ +export const ERC1155_SALE_ABI = [ + { + type: 'function', + name: 'DEFAULT_ADMIN_ROLE', + inputs: [], + outputs: [{ name: '', type: 'bytes32', internalType: 'bytes32' }], + stateMutability: 'view', + }, + { + type: 'function', + name: 'checkMerkleProof', + inputs: [ + { name: 'root', type: 'bytes32', internalType: 'bytes32' }, + { name: 'proof', type: 'bytes32[]', internalType: 'bytes32[]' }, + { name: 'addr', type: 'address', internalType: 'address' }, + { name: 'salt', type: 'bytes32', internalType: 'bytes32' }, + ], + outputs: [{ name: '', type: 'bool', internalType: 'bool' }], + stateMutability: 'view', + }, + { + type: 'function', + name: 'getRoleAdmin', + inputs: [{ name: 'role', type: 'bytes32', internalType: 'bytes32' }], + outputs: [{ name: '', type: 'bytes32', internalType: 'bytes32' }], + stateMutability: 'view', + }, + { + type: 'function', + name: 'getRoleMember', + inputs: [ + { name: 'role', type: 'bytes32', internalType: 'bytes32' }, + { name: 'index', type: 'uint256', internalType: 'uint256' }, + ], + outputs: [{ name: '', type: 'address', internalType: 'address' }], + stateMutability: 'view', + }, + { + type: 'function', + name: 'getRoleMemberCount', + inputs: [{ name: 'role', type: 'bytes32', internalType: 'bytes32' }], + outputs: [{ name: '', type: 'uint256', internalType: 'uint256' }], + stateMutability: 'view', + }, + { + type: 'function', + name: 'grantRole', + inputs: [ + { name: 'role', type: 'bytes32', internalType: 'bytes32' }, + { name: 'account', type: 'address', internalType: 'address' }, + ], + outputs: [], + stateMutability: 'nonpayable', + }, + { + type: 'function', + name: 'hasRole', + inputs: [ + { name: 'role', type: 'bytes32', internalType: 'bytes32' }, + { name: 'account', type: 'address', internalType: 'address' }, + ], + outputs: [{ name: '', type: 'bool', internalType: 'bool' }], + stateMutability: 'view', + }, + { + type: 'function', + name: 'initialize', + inputs: [ + { name: 'owner', type: 'address', internalType: 'address' }, + { name: 'items', type: 'address', internalType: 'address' }, + ], + outputs: [], + stateMutability: 'nonpayable', + }, + { + type: 'function', + name: 'itemsContract', + inputs: [], + outputs: [{ name: '', type: 'address', internalType: 'address' }], + stateMutability: 'view', + }, + { + type: 'function', + name: 'mint', + inputs: [ + { name: 'to', type: 'address', internalType: 'address' }, + { name: 'amount', type: 'uint256', internalType: 'uint256' }, + { + name: 'paymentToken', + type: 'address', + internalType: 'address', + }, + { name: 'maxTotal', type: 'uint256', internalType: 'uint256' }, + { name: 'proof', type: 'bytes32[]', internalType: 'bytes32[]' }, + ], + outputs: [], + stateMutability: 'payable', + }, + { + type: 'function', + name: 'renounceRole', + inputs: [ + { name: 'role', type: 'bytes32', internalType: 'bytes32' }, + { name: 'account', type: 'address', internalType: 'address' }, + ], + outputs: [], + stateMutability: 'nonpayable', + }, + { + type: 'function', + name: 'revokeRole', + inputs: [ + { name: 'role', type: 'bytes32', internalType: 'bytes32' }, + { name: 'account', type: 'address', internalType: 'address' }, + ], + outputs: [], + stateMutability: 'nonpayable', + }, + { + type: 'function', + name: 'saleDetails', + inputs: [], + outputs: [ + { + name: '', + type: 'tuple', + internalType: 'struct IERC721SaleFunctions.SaleDetails', + components: [ + { + name: 'supplyCap', + type: 'uint256', + internalType: 'uint256', + }, + { name: 'cost', type: 'uint256', internalType: 'uint256' }, + { + name: 'paymentToken', + type: 'address', + internalType: 'address', + }, + { name: 'startTime', type: 'uint64', internalType: 'uint64' }, + { name: 'endTime', type: 'uint64', internalType: 'uint64' }, + { + name: 'merkleRoot', + type: 'bytes32', + internalType: 'bytes32', + }, + ], + }, + ], + stateMutability: 'view', + }, + { + type: 'function', + name: 'setSaleDetails', + inputs: [ + { name: 'supplyCap', type: 'uint256', internalType: 'uint256' }, + { name: 'cost', type: 'uint256', internalType: 'uint256' }, + { + name: 'paymentToken', + type: 'address', + internalType: 'address', + }, + { name: 'startTime', type: 'uint64', internalType: 'uint64' }, + { name: 'endTime', type: 'uint64', internalType: 'uint64' }, + { name: 'merkleRoot', type: 'bytes32', internalType: 'bytes32' }, + ], + outputs: [], + stateMutability: 'nonpayable', + }, + { + type: 'function', + name: 'supportsInterface', + inputs: [{ name: 'interfaceId', type: 'bytes4', internalType: 'bytes4' }], + outputs: [{ name: '', type: 'bool', internalType: 'bool' }], + stateMutability: 'view', + }, + { + type: 'function', + name: 'withdrawERC20', + inputs: [ + { name: 'token', type: 'address', internalType: 'address' }, + { name: 'to', type: 'address', internalType: 'address' }, + { name: 'value', type: 'uint256', internalType: 'uint256' }, + ], + outputs: [], + stateMutability: 'nonpayable', + }, + { + type: 'function', + name: 'withdrawETH', + inputs: [ + { name: 'to', type: 'address', internalType: 'address' }, + { name: 'value', type: 'uint256', internalType: 'uint256' }, + ], + outputs: [], + stateMutability: 'nonpayable', + }, + { + type: 'event', + name: 'RoleAdminChanged', + inputs: [ + { + name: 'role', + type: 'bytes32', + indexed: true, + internalType: 'bytes32', + }, + { + name: 'previousAdminRole', + type: 'bytes32', + indexed: true, + internalType: 'bytes32', + }, + { + name: 'newAdminRole', + type: 'bytes32', + indexed: true, + internalType: 'bytes32', + }, + ], + anonymous: false, + }, + { + type: 'event', + name: 'RoleGranted', + inputs: [ + { + name: 'role', + type: 'bytes32', + indexed: true, + internalType: 'bytes32', + }, + { + name: 'account', + type: 'address', + indexed: true, + internalType: 'address', + }, + { + name: 'sender', + type: 'address', + indexed: true, + internalType: 'address', + }, + ], + anonymous: false, + }, + { + type: 'event', + name: 'RoleRevoked', + inputs: [ + { + name: 'role', + type: 'bytes32', + indexed: true, + internalType: 'bytes32', + }, + { + name: 'account', + type: 'address', + indexed: true, + internalType: 'address', + }, + { + name: 'sender', + type: 'address', + indexed: true, + internalType: 'address', + }, + ], + anonymous: false, + }, + { + type: 'event', + name: 'SaleDetailsUpdated', + inputs: [ + { + name: 'supplyCap', + type: 'uint256', + indexed: false, + internalType: 'uint256', + }, + { + name: 'cost', + type: 'uint256', + indexed: false, + internalType: 'uint256', + }, + { + name: 'paymentToken', + type: 'address', + indexed: false, + internalType: 'address', + }, + { + name: 'startTime', + type: 'uint64', + indexed: false, + internalType: 'uint64', + }, + { + name: 'endTime', + type: 'uint64', + indexed: false, + internalType: 'uint64', + }, + { + name: 'merkleRoot', + type: 'bytes32', + indexed: false, + internalType: 'bytes32', + }, + ], + anonymous: false, + }, + { + type: 'error', + name: 'InsufficientPayment', + inputs: [ + { name: 'currency', type: 'address', internalType: 'address' }, + { name: 'expected', type: 'uint256', internalType: 'uint256' }, + { name: 'actual', type: 'uint256', internalType: 'uint256' }, + ], + }, + { + type: 'error', + name: 'InsufficientSupply', + inputs: [ + { + name: 'currentSupply', + type: 'uint256', + internalType: 'uint256', + }, + { name: 'amount', type: 'uint256', internalType: 'uint256' }, + { name: 'maxSupply', type: 'uint256', internalType: 'uint256' }, + ], + }, + { type: 'error', name: 'InvalidInitialization', inputs: [] }, + { type: 'error', name: 'InvalidSaleDetails', inputs: [] }, + { + type: 'error', + name: 'MerkleProofInvalid', + inputs: [ + { name: 'root', type: 'bytes32', internalType: 'bytes32' }, + { name: 'proof', type: 'bytes32[]', internalType: 'bytes32[]' }, + { name: 'addr', type: 'address', internalType: 'address' }, + { name: 'salt', type: 'bytes32', internalType: 'bytes32' }, + ], + }, + { type: 'error', name: 'SaleInactive', inputs: [] }, + { type: 'error', name: 'WithdrawFailed', inputs: [] }, +] as const diff --git a/packages/utils/abi/src/sale/erc721Sale.ts b/packages/utils/abi/src/sale/erc721Sale.ts new file mode 100644 index 000000000..c03a0977b --- /dev/null +++ b/packages/utils/abi/src/sale/erc721Sale.ts @@ -0,0 +1,352 @@ +export const ERC721_SALE_ABI = [ + { + type: 'function', + name: 'DEFAULT_ADMIN_ROLE', + inputs: [], + outputs: [{ name: '', type: 'bytes32', internalType: 'bytes32' }], + stateMutability: 'view', + }, + { + type: 'function', + name: 'checkMerkleProof', + inputs: [ + { name: 'root', type: 'bytes32', internalType: 'bytes32' }, + { name: 'proof', type: 'bytes32[]', internalType: 'bytes32[]' }, + { name: 'addr', type: 'address', internalType: 'address' }, + { name: 'salt', type: 'bytes32', internalType: 'bytes32' }, + ], + outputs: [{ name: '', type: 'bool', internalType: 'bool' }], + stateMutability: 'view', + }, + { + type: 'function', + name: 'getRoleAdmin', + inputs: [{ name: 'role', type: 'bytes32', internalType: 'bytes32' }], + outputs: [{ name: '', type: 'bytes32', internalType: 'bytes32' }], + stateMutability: 'view', + }, + { + type: 'function', + name: 'getRoleMember', + inputs: [ + { name: 'role', type: 'bytes32', internalType: 'bytes32' }, + { name: 'index', type: 'uint256', internalType: 'uint256' }, + ], + outputs: [{ name: '', type: 'address', internalType: 'address' }], + stateMutability: 'view', + }, + { + type: 'function', + name: 'getRoleMemberCount', + inputs: [{ name: 'role', type: 'bytes32', internalType: 'bytes32' }], + outputs: [{ name: '', type: 'uint256', internalType: 'uint256' }], + stateMutability: 'view', + }, + { + type: 'function', + name: 'grantRole', + inputs: [ + { name: 'role', type: 'bytes32', internalType: 'bytes32' }, + { name: 'account', type: 'address', internalType: 'address' }, + ], + outputs: [], + stateMutability: 'nonpayable', + }, + { + type: 'function', + name: 'hasRole', + inputs: [ + { name: 'role', type: 'bytes32', internalType: 'bytes32' }, + { name: 'account', type: 'address', internalType: 'address' }, + ], + outputs: [{ name: '', type: 'bool', internalType: 'bool' }], + stateMutability: 'view', + }, + { + type: 'function', + name: 'initialize', + inputs: [ + { name: 'owner', type: 'address', internalType: 'address' }, + { name: 'items', type: 'address', internalType: 'address' }, + ], + outputs: [], + stateMutability: 'nonpayable', + }, + { + type: 'function', + name: 'itemsContract', + inputs: [], + outputs: [{ name: '', type: 'address', internalType: 'address' }], + stateMutability: 'view', + }, + { + type: 'function', + name: 'mint', + inputs: [ + { name: 'to', type: 'address', internalType: 'address' }, + { name: 'amount', type: 'uint256', internalType: 'uint256' }, + { + name: 'paymentToken', + type: 'address', + internalType: 'address', + }, + { name: 'maxTotal', type: 'uint256', internalType: 'uint256' }, + { name: 'proof', type: 'bytes32[]', internalType: 'bytes32[]' }, + ], + outputs: [], + stateMutability: 'payable', + }, + { + type: 'function', + name: 'renounceRole', + inputs: [ + { name: 'role', type: 'bytes32', internalType: 'bytes32' }, + { name: 'account', type: 'address', internalType: 'address' }, + ], + outputs: [], + stateMutability: 'nonpayable', + }, + { + type: 'function', + name: 'revokeRole', + inputs: [ + { name: 'role', type: 'bytes32', internalType: 'bytes32' }, + { name: 'account', type: 'address', internalType: 'address' }, + ], + outputs: [], + stateMutability: 'nonpayable', + }, + { + type: 'function', + name: 'saleDetails', + inputs: [], + outputs: [ + { + name: '', + type: 'tuple', + internalType: 'struct IERC721SaleFunctions.SaleDetails', + components: [ + { + name: 'supplyCap', + type: 'uint256', + internalType: 'uint256', + }, + { name: 'cost', type: 'uint256', internalType: 'uint256' }, + { + name: 'paymentToken', + type: 'address', + internalType: 'address', + }, + { name: 'startTime', type: 'uint64', internalType: 'uint64' }, + { name: 'endTime', type: 'uint64', internalType: 'uint64' }, + { + name: 'merkleRoot', + type: 'bytes32', + internalType: 'bytes32', + }, + ], + }, + ], + stateMutability: 'view', + }, + { + type: 'function', + name: 'setSaleDetails', + inputs: [ + { name: 'supplyCap', type: 'uint256', internalType: 'uint256' }, + { name: 'cost', type: 'uint256', internalType: 'uint256' }, + { + name: 'paymentToken', + type: 'address', + internalType: 'address', + }, + { name: 'startTime', type: 'uint64', internalType: 'uint64' }, + { name: 'endTime', type: 'uint64', internalType: 'uint64' }, + { name: 'merkleRoot', type: 'bytes32', internalType: 'bytes32' }, + ], + outputs: [], + stateMutability: 'nonpayable', + }, + { + type: 'function', + name: 'supportsInterface', + inputs: [{ name: 'interfaceId', type: 'bytes4', internalType: 'bytes4' }], + outputs: [{ name: '', type: 'bool', internalType: 'bool' }], + stateMutability: 'view', + }, + { + type: 'function', + name: 'withdrawERC20', + inputs: [ + { name: 'token', type: 'address', internalType: 'address' }, + { name: 'to', type: 'address', internalType: 'address' }, + { name: 'value', type: 'uint256', internalType: 'uint256' }, + ], + outputs: [], + stateMutability: 'nonpayable', + }, + { + type: 'function', + name: 'withdrawETH', + inputs: [ + { name: 'to', type: 'address', internalType: 'address' }, + { name: 'value', type: 'uint256', internalType: 'uint256' }, + ], + outputs: [], + stateMutability: 'nonpayable', + }, + { + type: 'event', + name: 'RoleAdminChanged', + inputs: [ + { + name: 'role', + type: 'bytes32', + indexed: true, + internalType: 'bytes32', + }, + { + name: 'previousAdminRole', + type: 'bytes32', + indexed: true, + internalType: 'bytes32', + }, + { + name: 'newAdminRole', + type: 'bytes32', + indexed: true, + internalType: 'bytes32', + }, + ], + anonymous: false, + }, + { + type: 'event', + name: 'RoleGranted', + inputs: [ + { + name: 'role', + type: 'bytes32', + indexed: true, + internalType: 'bytes32', + }, + { + name: 'account', + type: 'address', + indexed: true, + internalType: 'address', + }, + { + name: 'sender', + type: 'address', + indexed: true, + internalType: 'address', + }, + ], + anonymous: false, + }, + { + type: 'event', + name: 'RoleRevoked', + inputs: [ + { + name: 'role', + type: 'bytes32', + indexed: true, + internalType: 'bytes32', + }, + { + name: 'account', + type: 'address', + indexed: true, + internalType: 'address', + }, + { + name: 'sender', + type: 'address', + indexed: true, + internalType: 'address', + }, + ], + anonymous: false, + }, + { + type: 'event', + name: 'SaleDetailsUpdated', + inputs: [ + { + name: 'supplyCap', + type: 'uint256', + indexed: false, + internalType: 'uint256', + }, + { + name: 'cost', + type: 'uint256', + indexed: false, + internalType: 'uint256', + }, + { + name: 'paymentToken', + type: 'address', + indexed: false, + internalType: 'address', + }, + { + name: 'startTime', + type: 'uint64', + indexed: false, + internalType: 'uint64', + }, + { + name: 'endTime', + type: 'uint64', + indexed: false, + internalType: 'uint64', + }, + { + name: 'merkleRoot', + type: 'bytes32', + indexed: false, + internalType: 'bytes32', + }, + ], + anonymous: false, + }, + { + type: 'error', + name: 'InsufficientPayment', + inputs: [ + { name: 'currency', type: 'address', internalType: 'address' }, + { name: 'expected', type: 'uint256', internalType: 'uint256' }, + { name: 'actual', type: 'uint256', internalType: 'uint256' }, + ], + }, + { + type: 'error', + name: 'InsufficientSupply', + inputs: [ + { + name: 'currentSupply', + type: 'uint256', + internalType: 'uint256', + }, + { name: 'amount', type: 'uint256', internalType: 'uint256' }, + { name: 'maxSupply', type: 'uint256', internalType: 'uint256' }, + ], + }, + { type: 'error', name: 'InvalidInitialization', inputs: [] }, + { type: 'error', name: 'InvalidSaleDetails', inputs: [] }, + { + type: 'error', + name: 'MerkleProofInvalid', + inputs: [ + { name: 'root', type: 'bytes32', internalType: 'bytes32' }, + { name: 'proof', type: 'bytes32[]', internalType: 'bytes32[]' }, + { name: 'addr', type: 'address', internalType: 'address' }, + { name: 'salt', type: 'bytes32', internalType: 'bytes32' }, + ], + }, + { type: 'error', name: 'SaleInactive', inputs: [] }, + { type: 'error', name: 'WithdrawFailed', inputs: [] }, +] as const diff --git a/packages/utils/abi/src/saleItems/erc1155SaleItems.ts b/packages/utils/abi/src/saleItems/erc1155SaleItems.ts new file mode 100644 index 000000000..e0be8140a --- /dev/null +++ b/packages/utils/abi/src/saleItems/erc1155SaleItems.ts @@ -0,0 +1,377 @@ +export const ERC1155_SALE_ITEMS_ABI = [ + { type: 'constructor', inputs: [], stateMutability: 'nonpayable' }, + { + type: 'function', + name: 'DEFAULT_ADMIN_ROLE', + inputs: [], + outputs: [{ name: '', type: 'bytes32', internalType: 'bytes32' }], + stateMutability: 'view', + }, + { + type: 'function', + name: 'balanceOf', + inputs: [ + { name: '_owner', type: 'address', internalType: 'address' }, + { name: '_id', type: 'uint256', internalType: 'uint256' }, + ], + outputs: [{ name: '', type: 'uint256', internalType: 'uint256' }], + stateMutability: 'view', + }, + { + type: 'function', + name: 'balanceOfBatch', + inputs: [ + { name: '_owners', type: 'address[]', internalType: 'address[]' }, + { name: '_ids', type: 'uint256[]', internalType: 'uint256[]' }, + ], + outputs: [{ name: '', type: 'uint256[]', internalType: 'uint256[]' }], + stateMutability: 'view', + }, + { + type: 'function', + name: 'baseURI', + inputs: [], + outputs: [{ name: '', type: 'string', internalType: 'string' }], + stateMutability: 'view', + }, + { + type: 'function', + name: 'batchBurn', + inputs: [ + { name: 'tokenIds', type: 'uint256[]', internalType: 'uint256[]' }, + { name: 'amounts', type: 'uint256[]', internalType: 'uint256[]' }, + ], + outputs: [], + stateMutability: 'nonpayable', + }, + { + type: 'function', + name: 'batchMint', + inputs: [ + { name: 'to', type: 'address', internalType: 'address' }, + { name: 'tokenIds', type: 'uint256[]', internalType: 'uint256[]' }, + { name: 'amounts', type: 'uint256[]', internalType: 'uint256[]' }, + { name: 'data', type: 'bytes', internalType: 'bytes' }, + ], + outputs: [], + stateMutability: 'nonpayable', + }, + { + type: 'function', + name: 'burn', + inputs: [ + { name: 'tokenId', type: 'uint256', internalType: 'uint256' }, + { name: 'amount', type: 'uint256', internalType: 'uint256' }, + ], + outputs: [], + stateMutability: 'nonpayable', + }, + { + type: 'function', + name: 'contractURI', + inputs: [], + outputs: [{ name: '', type: 'string', internalType: 'string' }], + stateMutability: 'view', + }, + { + type: 'function', + name: 'getRoleAdmin', + inputs: [{ name: 'role', type: 'bytes32', internalType: 'bytes32' }], + outputs: [{ name: '', type: 'bytes32', internalType: 'bytes32' }], + stateMutability: 'view', + }, + { + type: 'function', + name: 'getRoleMember', + inputs: [ + { name: 'role', type: 'bytes32', internalType: 'bytes32' }, + { name: 'index', type: 'uint256', internalType: 'uint256' }, + ], + outputs: [{ name: '', type: 'address', internalType: 'address' }], + stateMutability: 'view', + }, + { + type: 'function', + name: 'getRoleMemberCount', + inputs: [{ name: 'role', type: 'bytes32', internalType: 'bytes32' }], + outputs: [{ name: '', type: 'uint256', internalType: 'uint256' }], + stateMutability: 'view', + }, + { + type: 'function', + name: 'grantRole', + inputs: [ + { name: 'role', type: 'bytes32', internalType: 'bytes32' }, + { name: 'account', type: 'address', internalType: 'address' }, + ], + outputs: [], + stateMutability: 'nonpayable', + }, + { + type: 'function', + name: 'hasRole', + inputs: [ + { name: 'role', type: 'bytes32', internalType: 'bytes32' }, + { name: 'account', type: 'address', internalType: 'address' }, + ], + outputs: [{ name: '', type: 'bool', internalType: 'bool' }], + stateMutability: 'view', + }, + { + type: 'function', + name: 'initialize', + inputs: [ + { name: 'owner', type: 'address', internalType: 'address' }, + { name: 'tokenName', type: 'string', internalType: 'string' }, + { name: 'tokenBaseURI', type: 'string', internalType: 'string' }, + { name: 'tokenContractURI', type: 'string', internalType: 'string' }, + { name: 'royaltyReceiver', type: 'address', internalType: 'address' }, + { name: 'royaltyFeeNumerator', type: 'uint96', internalType: 'uint96' }, + ], + outputs: [], + stateMutability: 'nonpayable', + }, + { + type: 'function', + name: 'isApprovedForAll', + inputs: [ + { name: '_owner', type: 'address', internalType: 'address' }, + { name: '_operator', type: 'address', internalType: 'address' }, + ], + outputs: [{ name: 'isOperator', type: 'bool', internalType: 'bool' }], + stateMutability: 'view', + }, + { + type: 'function', + name: 'mint', + inputs: [ + { name: 'to', type: 'address', internalType: 'address' }, + { name: 'tokenId', type: 'uint256', internalType: 'uint256' }, + { name: 'amount', type: 'uint256', internalType: 'uint256' }, + { name: 'data', type: 'bytes', internalType: 'bytes' }, + ], + outputs: [], + stateMutability: 'nonpayable', + }, + { + type: 'function', + name: 'name', + inputs: [], + outputs: [{ name: '', type: 'string', internalType: 'string' }], + stateMutability: 'view', + }, + { + type: 'function', + name: 'renounceRole', + inputs: [ + { name: 'role', type: 'bytes32', internalType: 'bytes32' }, + { name: 'account', type: 'address', internalType: 'address' }, + ], + outputs: [], + stateMutability: 'nonpayable', + }, + { + type: 'function', + name: 'revokeRole', + inputs: [ + { name: 'role', type: 'bytes32', internalType: 'bytes32' }, + { name: 'account', type: 'address', internalType: 'address' }, + ], + outputs: [], + stateMutability: 'nonpayable', + }, + { + type: 'function', + name: 'royaltyInfo', + inputs: [ + { name: 'tokenId', type: 'uint256', internalType: 'uint256' }, + { name: 'salePrice', type: 'uint256', internalType: 'uint256' }, + ], + outputs: [ + { name: '', type: 'address', internalType: 'address' }, + { name: '', type: 'uint256', internalType: 'uint256' }, + ], + stateMutability: 'view', + }, + { + type: 'function', + name: 'safeBatchTransferFrom', + inputs: [ + { name: '_from', type: 'address', internalType: 'address' }, + { name: '_to', type: 'address', internalType: 'address' }, + { name: '_ids', type: 'uint256[]', internalType: 'uint256[]' }, + { name: '_amounts', type: 'uint256[]', internalType: 'uint256[]' }, + { name: '_data', type: 'bytes', internalType: 'bytes' }, + ], + outputs: [], + stateMutability: 'nonpayable', + }, + { + type: 'function', + name: 'safeTransferFrom', + inputs: [ + { name: '_from', type: 'address', internalType: 'address' }, + { name: '_to', type: 'address', internalType: 'address' }, + { name: '_id', type: 'uint256', internalType: 'uint256' }, + { name: '_amount', type: 'uint256', internalType: 'uint256' }, + { name: '_data', type: 'bytes', internalType: 'bytes' }, + ], + outputs: [], + stateMutability: 'nonpayable', + }, + { + type: 'function', + name: 'setApprovalForAll', + inputs: [ + { name: '_operator', type: 'address', internalType: 'address' }, + { name: '_approved', type: 'bool', internalType: 'bool' }, + ], + outputs: [], + stateMutability: 'nonpayable', + }, + { + type: 'function', + name: 'setBaseMetadataURI', + inputs: [{ name: 'tokenBaseURI', type: 'string', internalType: 'string' }], + outputs: [], + stateMutability: 'nonpayable', + }, + { + type: 'function', + name: 'setContractName', + inputs: [{ name: 'tokenName', type: 'string', internalType: 'string' }], + outputs: [], + stateMutability: 'nonpayable', + }, + { + type: 'function', + name: 'setContractURI', + inputs: [{ name: 'tokenContractURI', type: 'string', internalType: 'string' }], + outputs: [], + stateMutability: 'nonpayable', + }, + { + type: 'function', + name: 'setDefaultRoyalty', + inputs: [ + { name: 'receiver', type: 'address', internalType: 'address' }, + { name: 'feeNumerator', type: 'uint96', internalType: 'uint96' }, + ], + outputs: [], + stateMutability: 'nonpayable', + }, + { + type: 'function', + name: 'setTokenRoyalty', + inputs: [ + { name: 'tokenId', type: 'uint256', internalType: 'uint256' }, + { name: 'receiver', type: 'address', internalType: 'address' }, + { name: 'feeNumerator', type: 'uint96', internalType: 'uint96' }, + ], + outputs: [], + stateMutability: 'nonpayable', + }, + { + type: 'function', + name: 'supportsInterface', + inputs: [{ name: 'interfaceId', type: 'bytes4', internalType: 'bytes4' }], + outputs: [{ name: '', type: 'bool', internalType: 'bool' }], + stateMutability: 'view', + }, + { + type: 'function', + name: 'tokenSupply', + inputs: [{ name: '', type: 'uint256', internalType: 'uint256' }], + outputs: [{ name: '', type: 'uint256', internalType: 'uint256' }], + stateMutability: 'view', + }, + { + type: 'function', + name: 'totalSupply', + inputs: [], + outputs: [{ name: '', type: 'uint256', internalType: 'uint256' }], + stateMutability: 'view', + }, + { + type: 'function', + name: 'uri', + inputs: [{ name: '_id', type: 'uint256', internalType: 'uint256' }], + outputs: [{ name: '', type: 'string', internalType: 'string' }], + stateMutability: 'view', + }, + { + type: 'event', + name: 'ApprovalForAll', + inputs: [ + { name: '_owner', type: 'address', indexed: true, internalType: 'address' }, + { name: '_operator', type: 'address', indexed: true, internalType: 'address' }, + { name: '_approved', type: 'bool', indexed: false, internalType: 'bool' }, + ], + anonymous: false, + }, + { + type: 'event', + name: 'RoleAdminChanged', + inputs: [ + { name: 'role', type: 'bytes32', indexed: true, internalType: 'bytes32' }, + { name: 'previousAdminRole', type: 'bytes32', indexed: true, internalType: 'bytes32' }, + { name: 'newAdminRole', type: 'bytes32', indexed: true, internalType: 'bytes32' }, + ], + anonymous: false, + }, + { + type: 'event', + name: 'RoleGranted', + inputs: [ + { name: 'role', type: 'bytes32', indexed: true, internalType: 'bytes32' }, + { name: 'account', type: 'address', indexed: true, internalType: 'address' }, + { name: 'sender', type: 'address', indexed: true, internalType: 'address' }, + ], + anonymous: false, + }, + { + type: 'event', + name: 'RoleRevoked', + inputs: [ + { name: 'role', type: 'bytes32', indexed: true, internalType: 'bytes32' }, + { name: 'account', type: 'address', indexed: true, internalType: 'address' }, + { name: 'sender', type: 'address', indexed: true, internalType: 'address' }, + ], + anonymous: false, + }, + { + type: 'event', + name: 'TransferBatch', + inputs: [ + { name: '_operator', type: 'address', indexed: true, internalType: 'address' }, + { name: '_from', type: 'address', indexed: true, internalType: 'address' }, + { name: '_to', type: 'address', indexed: true, internalType: 'address' }, + { name: '_ids', type: 'uint256[]', indexed: false, internalType: 'uint256[]' }, + { name: '_amounts', type: 'uint256[]', indexed: false, internalType: 'uint256[]' }, + ], + anonymous: false, + }, + { + type: 'event', + name: 'TransferSingle', + inputs: [ + { name: '_operator', type: 'address', indexed: true, internalType: 'address' }, + { name: '_from', type: 'address', indexed: true, internalType: 'address' }, + { name: '_to', type: 'address', indexed: true, internalType: 'address' }, + { name: '_id', type: 'uint256', indexed: false, internalType: 'uint256' }, + { name: '_amount', type: 'uint256', indexed: false, internalType: 'uint256' }, + ], + anonymous: false, + }, + { + type: 'event', + name: 'URI', + inputs: [ + { name: '_uri', type: 'string', indexed: false, internalType: 'string' }, + { name: '_id', type: 'uint256', indexed: true, internalType: 'uint256' }, + ], + anonymous: false, + }, + { type: 'error', name: 'InvalidArrayLength', inputs: [] }, + { type: 'error', name: 'InvalidInitialization', inputs: [] }, +] as const diff --git a/packages/utils/abi/src/saleItems/erc721SaleItems.ts b/packages/utils/abi/src/saleItems/erc721SaleItems.ts new file mode 100644 index 000000000..616819098 --- /dev/null +++ b/packages/utils/abi/src/saleItems/erc721SaleItems.ts @@ -0,0 +1,440 @@ +export const ERC721_SALE_ITEMS_ABI = [ + { type: 'constructor', inputs: [], stateMutability: 'nonpayable' }, + { + type: 'function', + name: 'DEFAULT_ADMIN_ROLE', + inputs: [], + outputs: [{ name: '', type: 'bytes32', internalType: 'bytes32' }], + stateMutability: 'view', + }, + { + type: 'function', + name: 'approve', + inputs: [ + { name: 'to', type: 'address', internalType: 'address' }, + { name: 'tokenId', type: 'uint256', internalType: 'uint256' }, + ], + outputs: [], + stateMutability: 'payable', + }, + { + type: 'function', + name: 'balanceOf', + inputs: [{ name: 'owner', type: 'address', internalType: 'address' }], + outputs: [{ name: '', type: 'uint256', internalType: 'uint256' }], + stateMutability: 'view', + }, + { + type: 'function', + name: 'batchBurn', + inputs: [{ name: 'tokenIds', type: 'uint256[]', internalType: 'uint256[]' }], + outputs: [], + stateMutability: 'nonpayable', + }, + { + type: 'function', + name: 'burn', + inputs: [{ name: 'tokenId', type: 'uint256', internalType: 'uint256' }], + outputs: [], + stateMutability: 'nonpayable', + }, + { + type: 'function', + name: 'contractURI', + inputs: [], + outputs: [{ name: '', type: 'string', internalType: 'string' }], + stateMutability: 'view', + }, + { + type: 'function', + name: 'explicitOwnershipOf', + inputs: [{ name: 'tokenId', type: 'uint256', internalType: 'uint256' }], + outputs: [ + { + name: '', + type: 'tuple', + internalType: 'struct IERC721A.TokenOwnership', + components: [ + { name: 'addr', type: 'address', internalType: 'address' }, + { name: 'startTimestamp', type: 'uint64', internalType: 'uint64' }, + { name: 'burned', type: 'bool', internalType: 'bool' }, + { name: 'extraData', type: 'uint24', internalType: 'uint24' }, + ], + }, + ], + stateMutability: 'view', + }, + { + type: 'function', + name: 'explicitOwnershipsOf', + inputs: [{ name: 'tokenIds', type: 'uint256[]', internalType: 'uint256[]' }], + outputs: [ + { + name: '', + type: 'tuple[]', + internalType: 'struct IERC721A.TokenOwnership[]', + components: [ + { name: 'addr', type: 'address', internalType: 'address' }, + { name: 'startTimestamp', type: 'uint64', internalType: 'uint64' }, + { name: 'burned', type: 'bool', internalType: 'bool' }, + { name: 'extraData', type: 'uint24', internalType: 'uint24' }, + ], + }, + ], + stateMutability: 'view', + }, + { + type: 'function', + name: 'getApproved', + inputs: [{ name: 'tokenId', type: 'uint256', internalType: 'uint256' }], + outputs: [{ name: '', type: 'address', internalType: 'address' }], + stateMutability: 'view', + }, + { + type: 'function', + name: 'getRoleAdmin', + inputs: [{ name: 'role', type: 'bytes32', internalType: 'bytes32' }], + outputs: [{ name: '', type: 'bytes32', internalType: 'bytes32' }], + stateMutability: 'view', + }, + { + type: 'function', + name: 'getRoleMember', + inputs: [ + { name: 'role', type: 'bytes32', internalType: 'bytes32' }, + { name: 'index', type: 'uint256', internalType: 'uint256' }, + ], + outputs: [{ name: '', type: 'address', internalType: 'address' }], + stateMutability: 'view', + }, + { + type: 'function', + name: 'getRoleMemberCount', + inputs: [{ name: 'role', type: 'bytes32', internalType: 'bytes32' }], + outputs: [{ name: '', type: 'uint256', internalType: 'uint256' }], + stateMutability: 'view', + }, + { + type: 'function', + name: 'grantRole', + inputs: [ + { name: 'role', type: 'bytes32', internalType: 'bytes32' }, + { name: 'account', type: 'address', internalType: 'address' }, + ], + outputs: [], + stateMutability: 'nonpayable', + }, + { + type: 'function', + name: 'hasRole', + inputs: [ + { name: 'role', type: 'bytes32', internalType: 'bytes32' }, + { name: 'account', type: 'address', internalType: 'address' }, + ], + outputs: [{ name: '', type: 'bool', internalType: 'bool' }], + stateMutability: 'view', + }, + { + type: 'function', + name: 'initialize', + inputs: [ + { name: 'owner', type: 'address', internalType: 'address' }, + { name: 'tokenName', type: 'string', internalType: 'string' }, + { name: 'tokenSymbol', type: 'string', internalType: 'string' }, + { name: 'tokenBaseURI', type: 'string', internalType: 'string' }, + { name: 'tokenContractURI', type: 'string', internalType: 'string' }, + { name: 'royaltyReceiver', type: 'address', internalType: 'address' }, + { name: 'royaltyFeeNumerator', type: 'uint96', internalType: 'uint96' }, + ], + outputs: [], + stateMutability: 'nonpayable', + }, + { + type: 'function', + name: 'isApprovedForAll', + inputs: [ + { name: 'owner', type: 'address', internalType: 'address' }, + { name: 'operator', type: 'address', internalType: 'address' }, + ], + outputs: [{ name: '', type: 'bool', internalType: 'bool' }], + stateMutability: 'view', + }, + { + type: 'function', + name: 'mint', + inputs: [ + { name: 'to', type: 'address', internalType: 'address' }, + { name: 'amount', type: 'uint256', internalType: 'uint256' }, + ], + outputs: [], + stateMutability: 'nonpayable', + }, + { + type: 'function', + name: 'name', + inputs: [], + outputs: [{ name: '', type: 'string', internalType: 'string' }], + stateMutability: 'view', + }, + { + type: 'function', + name: 'ownerOf', + inputs: [{ name: 'tokenId', type: 'uint256', internalType: 'uint256' }], + outputs: [{ name: '', type: 'address', internalType: 'address' }], + stateMutability: 'view', + }, + { + type: 'function', + name: 'renounceRole', + inputs: [ + { name: 'role', type: 'bytes32', internalType: 'bytes32' }, + { name: 'account', type: 'address', internalType: 'address' }, + ], + outputs: [], + stateMutability: 'nonpayable', + }, + { + type: 'function', + name: 'revokeRole', + inputs: [ + { name: 'role', type: 'bytes32', internalType: 'bytes32' }, + { name: 'account', type: 'address', internalType: 'address' }, + ], + outputs: [], + stateMutability: 'nonpayable', + }, + { + type: 'function', + name: 'royaltyInfo', + inputs: [ + { name: 'tokenId', type: 'uint256', internalType: 'uint256' }, + { name: 'salePrice', type: 'uint256', internalType: 'uint256' }, + ], + outputs: [ + { name: '', type: 'address', internalType: 'address' }, + { name: '', type: 'uint256', internalType: 'uint256' }, + ], + stateMutability: 'view', + }, + { + type: 'function', + name: 'safeTransferFrom', + inputs: [ + { name: 'from', type: 'address', internalType: 'address' }, + { name: 'to', type: 'address', internalType: 'address' }, + { name: 'tokenId', type: 'uint256', internalType: 'uint256' }, + ], + outputs: [], + stateMutability: 'payable', + }, + { + type: 'function', + name: 'safeTransferFrom', + inputs: [ + { name: 'from', type: 'address', internalType: 'address' }, + { name: 'to', type: 'address', internalType: 'address' }, + { name: 'tokenId', type: 'uint256', internalType: 'uint256' }, + { name: '_data', type: 'bytes', internalType: 'bytes' }, + ], + outputs: [], + stateMutability: 'payable', + }, + { + type: 'function', + name: 'setApprovalForAll', + inputs: [ + { name: 'operator', type: 'address', internalType: 'address' }, + { name: 'approved', type: 'bool', internalType: 'bool' }, + ], + outputs: [], + stateMutability: 'nonpayable', + }, + { + type: 'function', + name: 'setBaseMetadataURI', + inputs: [{ name: 'tokenBaseURI', type: 'string', internalType: 'string' }], + outputs: [], + stateMutability: 'nonpayable', + }, + { + type: 'function', + name: 'setContractURI', + inputs: [{ name: 'tokenContractURI', type: 'string', internalType: 'string' }], + outputs: [], + stateMutability: 'nonpayable', + }, + { + type: 'function', + name: 'setDefaultRoyalty', + inputs: [ + { name: 'receiver', type: 'address', internalType: 'address' }, + { name: 'feeNumerator', type: 'uint96', internalType: 'uint96' }, + ], + outputs: [], + stateMutability: 'nonpayable', + }, + { + type: 'function', + name: 'setNameAndSymbol', + inputs: [ + { name: 'tokenName', type: 'string', internalType: 'string' }, + { name: 'tokenSymbol', type: 'string', internalType: 'string' }, + ], + outputs: [], + stateMutability: 'nonpayable', + }, + { + type: 'function', + name: 'setTokenRoyalty', + inputs: [ + { name: 'tokenId', type: 'uint256', internalType: 'uint256' }, + { name: 'receiver', type: 'address', internalType: 'address' }, + { name: 'feeNumerator', type: 'uint96', internalType: 'uint96' }, + ], + outputs: [], + stateMutability: 'nonpayable', + }, + { + type: 'function', + name: 'supportsInterface', + inputs: [{ name: 'interfaceId', type: 'bytes4', internalType: 'bytes4' }], + outputs: [{ name: '', type: 'bool', internalType: 'bool' }], + stateMutability: 'view', + }, + { + type: 'function', + name: 'symbol', + inputs: [], + outputs: [{ name: '', type: 'string', internalType: 'string' }], + stateMutability: 'view', + }, + { + type: 'function', + name: 'tokenURI', + inputs: [{ name: 'tokenId', type: 'uint256', internalType: 'uint256' }], + outputs: [{ name: '', type: 'string', internalType: 'string' }], + stateMutability: 'view', + }, + { + type: 'function', + name: 'tokensOfOwner', + inputs: [{ name: 'owner', type: 'address', internalType: 'address' }], + outputs: [{ name: '', type: 'uint256[]', internalType: 'uint256[]' }], + stateMutability: 'view', + }, + { + type: 'function', + name: 'tokensOfOwnerIn', + inputs: [ + { name: 'owner', type: 'address', internalType: 'address' }, + { name: 'start', type: 'uint256', internalType: 'uint256' }, + { name: 'stop', type: 'uint256', internalType: 'uint256' }, + ], + outputs: [{ name: '', type: 'uint256[]', internalType: 'uint256[]' }], + stateMutability: 'view', + }, + { + type: 'function', + name: 'totalSupply', + inputs: [], + outputs: [{ name: '', type: 'uint256', internalType: 'uint256' }], + stateMutability: 'view', + }, + { + type: 'function', + name: 'transferFrom', + inputs: [ + { name: 'from', type: 'address', internalType: 'address' }, + { name: 'to', type: 'address', internalType: 'address' }, + { name: 'tokenId', type: 'uint256', internalType: 'uint256' }, + ], + outputs: [], + stateMutability: 'payable', + }, + { + type: 'event', + name: 'Approval', + inputs: [ + { name: 'owner', type: 'address', indexed: true, internalType: 'address' }, + { name: 'approved', type: 'address', indexed: true, internalType: 'address' }, + { name: 'tokenId', type: 'uint256', indexed: true, internalType: 'uint256' }, + ], + anonymous: false, + }, + { + type: 'event', + name: 'ApprovalForAll', + inputs: [ + { name: 'owner', type: 'address', indexed: true, internalType: 'address' }, + { name: 'operator', type: 'address', indexed: true, internalType: 'address' }, + { name: 'approved', type: 'bool', indexed: false, internalType: 'bool' }, + ], + anonymous: false, + }, + { + type: 'event', + name: 'ConsecutiveTransfer', + inputs: [ + { name: 'fromTokenId', type: 'uint256', indexed: true, internalType: 'uint256' }, + { name: 'toTokenId', type: 'uint256', indexed: false, internalType: 'uint256' }, + { name: 'from', type: 'address', indexed: true, internalType: 'address' }, + { name: 'to', type: 'address', indexed: true, internalType: 'address' }, + ], + anonymous: false, + }, + { + type: 'event', + name: 'RoleAdminChanged', + inputs: [ + { name: 'role', type: 'bytes32', indexed: true, internalType: 'bytes32' }, + { name: 'previousAdminRole', type: 'bytes32', indexed: true, internalType: 'bytes32' }, + { name: 'newAdminRole', type: 'bytes32', indexed: true, internalType: 'bytes32' }, + ], + anonymous: false, + }, + { + type: 'event', + name: 'RoleGranted', + inputs: [ + { name: 'role', type: 'bytes32', indexed: true, internalType: 'bytes32' }, + { name: 'account', type: 'address', indexed: true, internalType: 'address' }, + { name: 'sender', type: 'address', indexed: true, internalType: 'address' }, + ], + anonymous: false, + }, + { + type: 'event', + name: 'RoleRevoked', + inputs: [ + { name: 'role', type: 'bytes32', indexed: true, internalType: 'bytes32' }, + { name: 'account', type: 'address', indexed: true, internalType: 'address' }, + { name: 'sender', type: 'address', indexed: true, internalType: 'address' }, + ], + anonymous: false, + }, + { + type: 'event', + name: 'Transfer', + inputs: [ + { name: 'from', type: 'address', indexed: true, internalType: 'address' }, + { name: 'to', type: 'address', indexed: true, internalType: 'address' }, + { name: 'tokenId', type: 'uint256', indexed: true, internalType: 'uint256' }, + ], + anonymous: false, + }, + { type: 'error', name: 'ApprovalCallerNotOwnerNorApproved', inputs: [] }, + { type: 'error', name: 'ApprovalQueryForNonexistentToken', inputs: [] }, + { type: 'error', name: 'BalanceQueryForZeroAddress', inputs: [] }, + { type: 'error', name: 'InvalidInitialization', inputs: [] }, + { type: 'error', name: 'InvalidQueryRange', inputs: [] }, + { type: 'error', name: 'MintERC2309QuantityExceedsLimit', inputs: [] }, + { type: 'error', name: 'MintToZeroAddress', inputs: [] }, + { type: 'error', name: 'MintZeroQuantity', inputs: [] }, + { type: 'error', name: 'OwnerQueryForNonexistentToken', inputs: [] }, + { type: 'error', name: 'OwnershipNotInitializedForExtraData', inputs: [] }, + { type: 'error', name: 'TransferCallerNotOwnerNorApproved', inputs: [] }, + { type: 'error', name: 'TransferFromIncorrectOwner', inputs: [] }, + { type: 'error', name: 'TransferToNonERC721ReceiverImplementer', inputs: [] }, + { type: 'error', name: 'TransferToZeroAddress', inputs: [] }, + { type: 'error', name: 'URIQueryForNonexistentToken', inputs: [] }, +] as const diff --git a/packages/utils/abi/src/tokens/erc1155.ts b/packages/utils/abi/src/tokens/erc1155.ts new file mode 100644 index 000000000..3776277b0 --- /dev/null +++ b/packages/utils/abi/src/tokens/erc1155.ts @@ -0,0 +1,422 @@ +// @openzeppelin/contracts@5.0.0/token/ERC1155/ERC1155.sol +export const ERC1155_ABI = [ + { + inputs: [], + stateMutability: 'nonpayable', + type: 'constructor', + }, + { + inputs: [ + { + internalType: 'address', + name: 'sender', + type: 'address', + }, + { + internalType: 'uint256', + name: 'balance', + type: 'uint256', + }, + { + internalType: 'uint256', + name: 'needed', + type: 'uint256', + }, + { + internalType: 'uint256', + name: 'tokenId', + type: 'uint256', + }, + ], + name: 'ERC1155InsufficientBalance', + type: 'error', + }, + { + inputs: [ + { + internalType: 'address', + name: 'approver', + type: 'address', + }, + ], + name: 'ERC1155InvalidApprover', + type: 'error', + }, + { + inputs: [ + { + internalType: 'uint256', + name: 'idsLength', + type: 'uint256', + }, + { + internalType: 'uint256', + name: 'valuesLength', + type: 'uint256', + }, + ], + name: 'ERC1155InvalidArrayLength', + type: 'error', + }, + { + inputs: [ + { + internalType: 'address', + name: 'operator', + type: 'address', + }, + ], + name: 'ERC1155InvalidOperator', + type: 'error', + }, + { + inputs: [ + { + internalType: 'address', + name: 'receiver', + type: 'address', + }, + ], + name: 'ERC1155InvalidReceiver', + type: 'error', + }, + { + inputs: [ + { + internalType: 'address', + name: 'sender', + type: 'address', + }, + ], + name: 'ERC1155InvalidSender', + type: 'error', + }, + { + inputs: [ + { + internalType: 'address', + name: 'operator', + type: 'address', + }, + { + internalType: 'address', + name: 'owner', + type: 'address', + }, + ], + name: 'ERC1155MissingApprovalForAll', + type: 'error', + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: 'address', + name: 'account', + type: 'address', + }, + { + indexed: true, + internalType: 'address', + name: 'operator', + type: 'address', + }, + { + indexed: false, + internalType: 'bool', + name: 'approved', + type: 'bool', + }, + ], + name: 'ApprovalForAll', + type: 'event', + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: 'address', + name: 'operator', + type: 'address', + }, + { + indexed: true, + internalType: 'address', + name: 'from', + type: 'address', + }, + { + indexed: true, + internalType: 'address', + name: 'to', + type: 'address', + }, + { + indexed: false, + internalType: 'uint256[]', + name: 'ids', + type: 'uint256[]', + }, + { + indexed: false, + internalType: 'uint256[]', + name: 'values', + type: 'uint256[]', + }, + ], + name: 'TransferBatch', + type: 'event', + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: 'address', + name: 'operator', + type: 'address', + }, + { + indexed: true, + internalType: 'address', + name: 'from', + type: 'address', + }, + { + indexed: true, + internalType: 'address', + name: 'to', + type: 'address', + }, + { + indexed: false, + internalType: 'uint256', + name: 'id', + type: 'uint256', + }, + { + indexed: false, + internalType: 'uint256', + name: 'value', + type: 'uint256', + }, + ], + name: 'TransferSingle', + type: 'event', + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: 'string', + name: 'value', + type: 'string', + }, + { + indexed: true, + internalType: 'uint256', + name: 'id', + type: 'uint256', + }, + ], + name: 'URI', + type: 'event', + }, + { + inputs: [ + { + internalType: 'address', + name: 'account', + type: 'address', + }, + { + internalType: 'uint256', + name: 'id', + type: 'uint256', + }, + ], + name: 'balanceOf', + outputs: [ + { + internalType: 'uint256', + name: '', + type: 'uint256', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [ + { + internalType: 'address[]', + name: 'accounts', + type: 'address[]', + }, + { + internalType: 'uint256[]', + name: 'ids', + type: 'uint256[]', + }, + ], + name: 'balanceOfBatch', + outputs: [ + { + internalType: 'uint256[]', + name: '', + type: 'uint256[]', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [ + { + internalType: 'address', + name: 'account', + type: 'address', + }, + { + internalType: 'address', + name: 'operator', + type: 'address', + }, + ], + name: 'isApprovedForAll', + outputs: [ + { + internalType: 'bool', + name: '', + type: 'bool', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [ + { + internalType: 'address', + name: 'from', + type: 'address', + }, + { + internalType: 'address', + name: 'to', + type: 'address', + }, + { + internalType: 'uint256[]', + name: 'ids', + type: 'uint256[]', + }, + { + internalType: 'uint256[]', + name: 'values', + type: 'uint256[]', + }, + { + internalType: 'bytes', + name: 'data', + type: 'bytes', + }, + ], + name: 'safeBatchTransferFrom', + outputs: [], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [ + { + internalType: 'address', + name: 'from', + type: 'address', + }, + { + internalType: 'address', + name: 'to', + type: 'address', + }, + { + internalType: 'uint256', + name: 'id', + type: 'uint256', + }, + { + internalType: 'uint256', + name: 'value', + type: 'uint256', + }, + { + internalType: 'bytes', + name: 'data', + type: 'bytes', + }, + ], + name: 'safeTransferFrom', + outputs: [], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [ + { + internalType: 'address', + name: 'operator', + type: 'address', + }, + { + internalType: 'bool', + name: 'approved', + type: 'bool', + }, + ], + name: 'setApprovalForAll', + outputs: [], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [ + { + internalType: 'bytes4', + name: 'interfaceId', + type: 'bytes4', + }, + ], + name: 'supportsInterface', + outputs: [ + { + internalType: 'bool', + name: '', + type: 'bool', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [ + { + internalType: 'uint256', + name: '', + type: 'uint256', + }, + ], + name: 'uri', + outputs: [ + { + internalType: 'string', + name: '', + type: 'string', + }, + ], + stateMutability: 'view', + type: 'function', + }, +] as const diff --git a/packages/utils/abi/src/tokens/erc20.ts b/packages/utils/abi/src/tokens/erc20.ts new file mode 100644 index 000000000..f8136eecd --- /dev/null +++ b/packages/utils/abi/src/tokens/erc20.ts @@ -0,0 +1,316 @@ +// @openzeppelin/contracts@5.0.0/token/ERC20/ERC20.sol +export const ERC20_ABI = [ + { + inputs: [], + stateMutability: 'nonpayable', + type: 'constructor', + }, + { + inputs: [ + { + internalType: 'address', + name: 'spender', + type: 'address', + }, + { + internalType: 'uint256', + name: 'allowance', + type: 'uint256', + }, + { + internalType: 'uint256', + name: 'needed', + type: 'uint256', + }, + ], + name: 'ERC20InsufficientAllowance', + type: 'error', + }, + { + inputs: [ + { + internalType: 'address', + name: 'sender', + type: 'address', + }, + { + internalType: 'uint256', + name: 'balance', + type: 'uint256', + }, + { + internalType: 'uint256', + name: 'needed', + type: 'uint256', + }, + ], + name: 'ERC20InsufficientBalance', + type: 'error', + }, + { + inputs: [ + { + internalType: 'address', + name: 'approver', + type: 'address', + }, + ], + name: 'ERC20InvalidApprover', + type: 'error', + }, + { + inputs: [ + { + internalType: 'address', + name: 'receiver', + type: 'address', + }, + ], + name: 'ERC20InvalidReceiver', + type: 'error', + }, + { + inputs: [ + { + internalType: 'address', + name: 'sender', + type: 'address', + }, + ], + name: 'ERC20InvalidSender', + type: 'error', + }, + { + inputs: [ + { + internalType: 'address', + name: 'spender', + type: 'address', + }, + ], + name: 'ERC20InvalidSpender', + type: 'error', + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: 'address', + name: 'owner', + type: 'address', + }, + { + indexed: true, + internalType: 'address', + name: 'spender', + type: 'address', + }, + { + indexed: false, + internalType: 'uint256', + name: 'value', + type: 'uint256', + }, + ], + name: 'Approval', + type: 'event', + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: 'address', + name: 'from', + type: 'address', + }, + { + indexed: true, + internalType: 'address', + name: 'to', + type: 'address', + }, + { + indexed: false, + internalType: 'uint256', + name: 'value', + type: 'uint256', + }, + ], + name: 'Transfer', + type: 'event', + }, + { + inputs: [ + { + internalType: 'address', + name: 'owner', + type: 'address', + }, + { + internalType: 'address', + name: 'spender', + type: 'address', + }, + ], + name: 'allowance', + outputs: [ + { + internalType: 'uint256', + name: '', + type: 'uint256', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [ + { + internalType: 'address', + name: 'spender', + type: 'address', + }, + { + internalType: 'uint256', + name: 'value', + type: 'uint256', + }, + ], + name: 'approve', + outputs: [ + { + internalType: 'bool', + name: '', + type: 'bool', + }, + ], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [ + { + internalType: 'address', + name: 'account', + type: 'address', + }, + ], + name: 'balanceOf', + outputs: [ + { + internalType: 'uint256', + name: '', + type: 'uint256', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [], + name: 'decimals', + outputs: [ + { + internalType: 'uint8', + name: '', + type: 'uint8', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [], + name: 'name', + outputs: [ + { + internalType: 'string', + name: '', + type: 'string', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [], + name: 'symbol', + outputs: [ + { + internalType: 'string', + name: '', + type: 'string', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [], + name: 'totalSupply', + outputs: [ + { + internalType: 'uint256', + name: '', + type: 'uint256', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [ + { + internalType: 'address', + name: 'to', + type: 'address', + }, + { + internalType: 'uint256', + name: 'value', + type: 'uint256', + }, + ], + name: 'transfer', + outputs: [ + { + internalType: 'bool', + name: '', + type: 'bool', + }, + ], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [ + { + internalType: 'address', + name: 'from', + type: 'address', + }, + { + internalType: 'address', + name: 'to', + type: 'address', + }, + { + internalType: 'uint256', + name: 'value', + type: 'uint256', + }, + ], + name: 'transferFrom', + outputs: [ + { + internalType: 'bool', + name: '', + type: 'bool', + }, + ], + stateMutability: 'nonpayable', + type: 'function', + }, +] as const diff --git a/packages/utils/abi/src/tokens/erc6909.ts b/packages/utils/abi/src/tokens/erc6909.ts new file mode 100644 index 000000000..c15bfd90e --- /dev/null +++ b/packages/utils/abi/src/tokens/erc6909.ts @@ -0,0 +1,404 @@ +// @openzeppelin/contracts@5.0.0/token/ERC6909/ERC6909.sol +export const ERC6909_ABI = [ + { + inputs: [ + { + internalType: 'address', + name: 'spender', + type: 'address', + }, + { + internalType: 'uint256', + name: 'allowance', + type: 'uint256', + }, + { + internalType: 'uint256', + name: 'needed', + type: 'uint256', + }, + { + internalType: 'uint256', + name: 'id', + type: 'uint256', + }, + ], + name: 'ERC6909InsufficientAllowance', + type: 'error', + }, + { + inputs: [ + { + internalType: 'address', + name: 'sender', + type: 'address', + }, + { + internalType: 'uint256', + name: 'balance', + type: 'uint256', + }, + { + internalType: 'uint256', + name: 'needed', + type: 'uint256', + }, + { + internalType: 'uint256', + name: 'id', + type: 'uint256', + }, + ], + name: 'ERC6909InsufficientBalance', + type: 'error', + }, + { + inputs: [ + { + internalType: 'address', + name: 'approver', + type: 'address', + }, + ], + name: 'ERC6909InvalidApprover', + type: 'error', + }, + { + inputs: [ + { + internalType: 'address', + name: 'receiver', + type: 'address', + }, + ], + name: 'ERC6909InvalidReceiver', + type: 'error', + }, + { + inputs: [ + { + internalType: 'address', + name: 'sender', + type: 'address', + }, + ], + name: 'ERC6909InvalidSender', + type: 'error', + }, + { + inputs: [ + { + internalType: 'address', + name: 'spender', + type: 'address', + }, + ], + name: 'ERC6909InvalidSpender', + type: 'error', + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: 'address', + name: 'owner', + type: 'address', + }, + { + indexed: true, + internalType: 'address', + name: 'spender', + type: 'address', + }, + { + indexed: true, + internalType: 'uint256', + name: 'id', + type: 'uint256', + }, + { + indexed: false, + internalType: 'uint256', + name: 'amount', + type: 'uint256', + }, + ], + name: 'Approval', + type: 'event', + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: 'address', + name: 'owner', + type: 'address', + }, + { + indexed: true, + internalType: 'address', + name: 'spender', + type: 'address', + }, + { + indexed: false, + internalType: 'bool', + name: 'approved', + type: 'bool', + }, + ], + name: 'OperatorSet', + type: 'event', + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: 'address', + name: 'caller', + type: 'address', + }, + { + indexed: true, + internalType: 'address', + name: 'sender', + type: 'address', + }, + { + indexed: true, + internalType: 'address', + name: 'receiver', + type: 'address', + }, + { + indexed: true, + internalType: 'uint256', + name: 'id', + type: 'uint256', + }, + { + indexed: false, + internalType: 'uint256', + name: 'amount', + type: 'uint256', + }, + ], + name: 'Transfer', + type: 'event', + }, + { + inputs: [ + { + internalType: 'address', + name: 'owner', + type: 'address', + }, + { + internalType: 'address', + name: 'spender', + type: 'address', + }, + { + internalType: 'uint256', + name: 'id', + type: 'uint256', + }, + ], + name: 'allowance', + outputs: [ + { + internalType: 'uint256', + name: '', + type: 'uint256', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [ + { + internalType: 'address', + name: 'spender', + type: 'address', + }, + { + internalType: 'uint256', + name: 'id', + type: 'uint256', + }, + { + internalType: 'uint256', + name: 'amount', + type: 'uint256', + }, + ], + name: 'approve', + outputs: [ + { + internalType: 'bool', + name: '', + type: 'bool', + }, + ], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [ + { + internalType: 'address', + name: 'owner', + type: 'address', + }, + { + internalType: 'uint256', + name: 'id', + type: 'uint256', + }, + ], + name: 'balanceOf', + outputs: [ + { + internalType: 'uint256', + name: '', + type: 'uint256', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [ + { + internalType: 'address', + name: 'owner', + type: 'address', + }, + { + internalType: 'address', + name: 'spender', + type: 'address', + }, + ], + name: 'isOperator', + outputs: [ + { + internalType: 'bool', + name: '', + type: 'bool', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [ + { + internalType: 'address', + name: 'spender', + type: 'address', + }, + { + internalType: 'bool', + name: 'approved', + type: 'bool', + }, + ], + name: 'setOperator', + outputs: [ + { + internalType: 'bool', + name: '', + type: 'bool', + }, + ], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [ + { + internalType: 'bytes4', + name: 'interfaceId', + type: 'bytes4', + }, + ], + name: 'supportsInterface', + outputs: [ + { + internalType: 'bool', + name: '', + type: 'bool', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [ + { + internalType: 'address', + name: 'receiver', + type: 'address', + }, + { + internalType: 'uint256', + name: 'id', + type: 'uint256', + }, + { + internalType: 'uint256', + name: 'amount', + type: 'uint256', + }, + ], + name: 'transfer', + outputs: [ + { + internalType: 'bool', + name: '', + type: 'bool', + }, + ], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [ + { + internalType: 'address', + name: 'sender', + type: 'address', + }, + { + internalType: 'address', + name: 'receiver', + type: 'address', + }, + { + internalType: 'uint256', + name: 'id', + type: 'uint256', + }, + { + internalType: 'uint256', + name: 'amount', + type: 'uint256', + }, + ], + name: 'transferFrom', + outputs: [ + { + internalType: 'bool', + name: '', + type: 'bool', + }, + ], + stateMutability: 'nonpayable', + type: 'function', + }, +] as const diff --git a/packages/utils/abi/src/tokens/erc721.ts b/packages/utils/abi/src/tokens/erc721.ts new file mode 100644 index 000000000..fde46fef0 --- /dev/null +++ b/packages/utils/abi/src/tokens/erc721.ts @@ -0,0 +1,441 @@ +// @openzeppelin/contracts@5.0.0/token/ERC721/ERC721.sol +export const ERC721_ABI = [ + { + inputs: [], + stateMutability: 'nonpayable', + type: 'constructor', + }, + { + inputs: [ + { + internalType: 'address', + name: 'sender', + type: 'address', + }, + { + internalType: 'uint256', + name: 'tokenId', + type: 'uint256', + }, + { + internalType: 'address', + name: 'owner', + type: 'address', + }, + ], + name: 'ERC721IncorrectOwner', + type: 'error', + }, + { + inputs: [ + { + internalType: 'address', + name: 'operator', + type: 'address', + }, + { + internalType: 'uint256', + name: 'tokenId', + type: 'uint256', + }, + ], + name: 'ERC721InsufficientApproval', + type: 'error', + }, + { + inputs: [ + { + internalType: 'address', + name: 'approver', + type: 'address', + }, + ], + name: 'ERC721InvalidApprover', + type: 'error', + }, + { + inputs: [ + { + internalType: 'address', + name: 'operator', + type: 'address', + }, + ], + name: 'ERC721InvalidOperator', + type: 'error', + }, + { + inputs: [ + { + internalType: 'address', + name: 'owner', + type: 'address', + }, + ], + name: 'ERC721InvalidOwner', + type: 'error', + }, + { + inputs: [ + { + internalType: 'address', + name: 'receiver', + type: 'address', + }, + ], + name: 'ERC721InvalidReceiver', + type: 'error', + }, + { + inputs: [ + { + internalType: 'address', + name: 'sender', + type: 'address', + }, + ], + name: 'ERC721InvalidSender', + type: 'error', + }, + { + inputs: [ + { + internalType: 'uint256', + name: 'tokenId', + type: 'uint256', + }, + ], + name: 'ERC721NonexistentToken', + type: 'error', + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: 'address', + name: 'owner', + type: 'address', + }, + { + indexed: true, + internalType: 'address', + name: 'approved', + type: 'address', + }, + { + indexed: true, + internalType: 'uint256', + name: 'tokenId', + type: 'uint256', + }, + ], + name: 'Approval', + type: 'event', + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: 'address', + name: 'owner', + type: 'address', + }, + { + indexed: true, + internalType: 'address', + name: 'operator', + type: 'address', + }, + { + indexed: false, + internalType: 'bool', + name: 'approved', + type: 'bool', + }, + ], + name: 'ApprovalForAll', + type: 'event', + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: 'address', + name: 'from', + type: 'address', + }, + { + indexed: true, + internalType: 'address', + name: 'to', + type: 'address', + }, + { + indexed: true, + internalType: 'uint256', + name: 'tokenId', + type: 'uint256', + }, + ], + name: 'Transfer', + type: 'event', + }, + { + inputs: [ + { + internalType: 'address', + name: 'to', + type: 'address', + }, + { + internalType: 'uint256', + name: 'tokenId', + type: 'uint256', + }, + ], + name: 'approve', + outputs: [], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [ + { + internalType: 'address', + name: 'owner', + type: 'address', + }, + ], + name: 'balanceOf', + outputs: [ + { + internalType: 'uint256', + name: '', + type: 'uint256', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [ + { + internalType: 'uint256', + name: 'tokenId', + type: 'uint256', + }, + ], + name: 'getApproved', + outputs: [ + { + internalType: 'address', + name: '', + type: 'address', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [ + { + internalType: 'address', + name: 'owner', + type: 'address', + }, + { + internalType: 'address', + name: 'operator', + type: 'address', + }, + ], + name: 'isApprovedForAll', + outputs: [ + { + internalType: 'bool', + name: '', + type: 'bool', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [], + name: 'name', + outputs: [ + { + internalType: 'string', + name: '', + type: 'string', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [ + { + internalType: 'uint256', + name: 'tokenId', + type: 'uint256', + }, + ], + name: 'ownerOf', + outputs: [ + { + internalType: 'address', + name: '', + type: 'address', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [ + { + internalType: 'address', + name: 'from', + type: 'address', + }, + { + internalType: 'address', + name: 'to', + type: 'address', + }, + { + internalType: 'uint256', + name: 'tokenId', + type: 'uint256', + }, + ], + name: 'safeTransferFrom', + outputs: [], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [ + { + internalType: 'address', + name: 'from', + type: 'address', + }, + { + internalType: 'address', + name: 'to', + type: 'address', + }, + { + internalType: 'uint256', + name: 'tokenId', + type: 'uint256', + }, + { + internalType: 'bytes', + name: 'data', + type: 'bytes', + }, + ], + name: 'safeTransferFrom', + outputs: [], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [ + { + internalType: 'address', + name: 'operator', + type: 'address', + }, + { + internalType: 'bool', + name: 'approved', + type: 'bool', + }, + ], + name: 'setApprovalForAll', + outputs: [], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [ + { + internalType: 'bytes4', + name: 'interfaceId', + type: 'bytes4', + }, + ], + name: 'supportsInterface', + outputs: [ + { + internalType: 'bool', + name: '', + type: 'bool', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [], + name: 'symbol', + outputs: [ + { + internalType: 'string', + name: '', + type: 'string', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [ + { + internalType: 'uint256', + name: 'tokenId', + type: 'uint256', + }, + ], + name: 'tokenURI', + outputs: [ + { + internalType: 'string', + name: '', + type: 'string', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [ + { + internalType: 'address', + name: 'from', + type: 'address', + }, + { + internalType: 'address', + name: 'to', + type: 'address', + }, + { + internalType: 'uint256', + name: 'tokenId', + type: 'uint256', + }, + ], + name: 'transferFrom', + outputs: [], + stateMutability: 'nonpayable', + type: 'function', + }, +] as const diff --git a/packages/utils/abi/src/wallet/erc1271.ts b/packages/utils/abi/src/wallet/erc1271.ts new file mode 100644 index 000000000..747aaa33d --- /dev/null +++ b/packages/utils/abi/src/wallet/erc1271.ts @@ -0,0 +1,26 @@ +export const abi = [ + { + type: 'function', + name: 'isValidSignature', + constant: true, + inputs: [ + { + type: 'bytes32', + }, + { + type: 'bytes', + }, + ], + outputs: [ + { + type: 'bytes4', + }, + ], + payable: false, + stateMutability: 'view', + }, +] as const + +export const returns = { + isValidSignatureBytes32: '0x1626ba7e', +} diff --git a/packages/utils/abi/src/wallet/erc5719.ts b/packages/utils/abi/src/wallet/erc5719.ts new file mode 100644 index 000000000..52c9e7e48 --- /dev/null +++ b/packages/utils/abi/src/wallet/erc5719.ts @@ -0,0 +1,19 @@ +export const abi = [ + { + inputs: [ + { + internalType: 'bytes32', + type: 'bytes32', + }, + ], + name: 'getAlternativeSignature', + outputs: [ + { + internalType: 'string', + type: 'string', + }, + ], + stateMutability: 'view', + type: 'function', + }, +] as const diff --git a/packages/utils/abi/src/wallet/erc6492.ts b/packages/utils/abi/src/wallet/erc6492.ts new file mode 100644 index 000000000..158bf4a8e --- /dev/null +++ b/packages/utils/abi/src/wallet/erc6492.ts @@ -0,0 +1,61 @@ +export const abi = [ + { inputs: [{ internalType: 'bytes', name: 'error', type: 'bytes' }], name: 'ERC1271Revert', type: 'error' }, + { inputs: [{ internalType: 'bytes', name: 'error', type: 'bytes' }], name: 'ERC6492DeployFailed', type: 'error' }, + { + inputs: [ + { internalType: 'address', name: '_signer', type: 'address' }, + { internalType: 'bytes32', name: '_hash', type: 'bytes32' }, + { internalType: 'bytes', name: '_signature', type: 'bytes' }, + ], + name: 'isValidSig', + outputs: [{ internalType: 'bool', name: '', type: 'bool' }], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [ + { internalType: 'address', name: '_signer', type: 'address' }, + { internalType: 'bytes32', name: '_hash', type: 'bytes32' }, + { internalType: 'bytes', name: '_signature', type: 'bytes' }, + { internalType: 'bool', name: 'allowSideEffects', type: 'bool' }, + { internalType: 'bool', name: 'deployAlreadyDeployed', type: 'bool' }, + ], + name: 'isValidSigImpl', + outputs: [{ internalType: 'bool', name: '', type: 'bool' }], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [ + { internalType: 'address', name: '_signer', type: 'address' }, + { internalType: 'bytes32', name: '_hash', type: 'bytes32' }, + { internalType: 'bytes', name: '_signature', type: 'bytes' }, + ], + name: 'isValidSigNoThrow', + outputs: [{ internalType: 'bool', name: '', type: 'bool' }], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [ + { internalType: 'address', name: '_signer', type: 'address' }, + { internalType: 'bytes32', name: '_hash', type: 'bytes32' }, + { internalType: 'bytes', name: '_signature', type: 'bytes' }, + ], + name: 'isValidSigWithSideEffects', + outputs: [{ internalType: 'bool', name: '', type: 'bool' }], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [ + { internalType: 'address', name: '_signer', type: 'address' }, + { internalType: 'bytes32', name: '_hash', type: 'bytes32' }, + { internalType: 'bytes', name: '_signature', type: 'bytes' }, + ], + name: 'isValidSigWithSideEffectsNoThrow', + outputs: [{ internalType: 'bool', name: '', type: 'bool' }], + stateMutability: 'nonpayable', + type: 'function', + }, +] as const diff --git a/packages/utils/abi/src/wallet/factory.ts b/packages/utils/abi/src/wallet/factory.ts new file mode 100644 index 000000000..72d8ef02f --- /dev/null +++ b/packages/utils/abi/src/wallet/factory.ts @@ -0,0 +1,18 @@ +export const abi = [ + { + type: 'function', + name: 'deploy', + constant: false, + inputs: [ + { + type: 'address', + }, + { + type: 'bytes32', + }, + ], + outputs: [], + payable: true, + stateMutability: 'payable', + }, +] as const diff --git a/packages/utils/abi/src/wallet/index.ts b/packages/utils/abi/src/wallet/index.ts new file mode 100644 index 000000000..0ceae0a35 --- /dev/null +++ b/packages/utils/abi/src/wallet/index.ts @@ -0,0 +1,26 @@ +import * as erc5719 from './erc5719' +import * as erc1271 from './erc1271' +import * as erc6492 from './erc6492' +import * as factory from './factory' +import * as mainModule from './mainModule' +import * as mainModuleUpgradable from './mainModuleUpgradable' +import * as moduleHooks from './moduleHooks' +import * as sequenceUtils from './sequenceUtils' +import * as requireFreshSigner from './libs/requireFreshSigners' +import * as walletProxyHook from './walletProxyHook' + +/** + * @deprecated import directly from @0xsequence/abi/* instead, omitting "walletContracts" + */ +export const walletContracts = { + erc6492, + erc5719, + erc1271, + factory, + mainModule, + mainModuleUpgradable, + moduleHooks, + sequenceUtils, + requireFreshSigner, + walletProxyHook, +} diff --git a/packages/utils/abi/src/wallet/libs/requireFreshSigners.ts b/packages/utils/abi/src/wallet/libs/requireFreshSigners.ts new file mode 100644 index 000000000..ac0ce50c5 --- /dev/null +++ b/packages/utils/abi/src/wallet/libs/requireFreshSigners.ts @@ -0,0 +1,15 @@ +export const abi = [ + { + inputs: [ + { + internalType: 'address', + name: '', + type: 'address', + }, + ], + name: 'requireFreshSigner', + outputs: [], + stateMutability: 'nonpayable', + type: 'function', + }, +] as const diff --git a/packages/utils/abi/src/wallet/mainModule.ts b/packages/utils/abi/src/wallet/mainModule.ts new file mode 100644 index 000000000..8d069db05 --- /dev/null +++ b/packages/utils/abi/src/wallet/mainModule.ts @@ -0,0 +1,158 @@ +export const abi = [ + { + type: 'function', + name: 'nonce', + constant: true, + inputs: [], + outputs: [ + { + type: 'uint256', + }, + ], + payable: false, + stateMutability: 'view', + }, + { + type: 'function', + name: 'readNonce', + constant: true, + inputs: [ + { + type: 'uint256', + }, + ], + outputs: [ + { + type: 'uint256', + }, + ], + payable: false, + stateMutability: 'view', + }, + { + type: 'function', + name: 'updateImplementation', + constant: false, + inputs: [ + { + type: 'address', + }, + ], + outputs: [], + payable: false, + stateMutability: 'nonpayable', + }, + { + type: 'function', + name: 'selfExecute', + constant: false, + inputs: [ + { + components: [ + { + type: 'bool', + name: 'delegateCall', + }, + { + type: 'bool', + name: 'revertOnError', + }, + { + type: 'uint256', + name: 'gasLimit', + }, + { + type: 'address', + name: 'target', + }, + { + type: 'uint256', + name: 'value', + }, + { + type: 'bytes', + name: 'data', + }, + ], + type: 'tuple[]', + }, + ], + outputs: [], + payable: false, + stateMutability: 'nonpayable', + }, + { + type: 'function', + name: 'execute', + constant: false, + inputs: [ + { + components: [ + { + type: 'bool', + name: 'delegateCall', + }, + { + type: 'bool', + name: 'revertOnError', + }, + { + type: 'uint256', + name: 'gasLimit', + }, + { + type: 'address', + name: 'target', + }, + { + type: 'uint256', + name: 'value', + }, + { + type: 'bytes', + name: 'data', + }, + ], + type: 'tuple[]', + }, + { + type: 'uint256', + }, + { + type: 'bytes', + }, + ], + outputs: [], + payable: false, + stateMutability: 'nonpayable', + }, + { + type: 'function', + name: 'createContract', + inputs: [ + { + type: 'bytes', + }, + ], + payable: true, + stateMutability: 'payable', + }, + { + type: 'function', + name: 'setExtraImageHash', + constant: false, + inputs: [ + { + type: 'bytes32', + name: 'imageHash', + }, + { + type: 'uint256', + name: 'expiration', + }, + ], + outputs: [], + payable: false, + stateMutability: 'nonpayable', + }, +] as const diff --git a/packages/utils/abi/src/wallet/mainModuleUpgradable.ts b/packages/utils/abi/src/wallet/mainModuleUpgradable.ts new file mode 100644 index 000000000..6a3be59cc --- /dev/null +++ b/packages/utils/abi/src/wallet/mainModuleUpgradable.ts @@ -0,0 +1,28 @@ +export const abi = [ + { + type: 'function', + name: 'updateImageHash', + constant: true, + inputs: [ + { + type: 'bytes32', + }, + ], + outputs: [], + payable: false, + stateMutability: 'view', + }, + { + type: 'function', + name: 'imageHash', + constant: true, + inputs: [], + outputs: [ + { + type: 'bytes32', + }, + ], + payable: false, + stateMutability: 'view', + }, +] as const diff --git a/packages/utils/abi/src/wallet/moduleHooks.ts b/packages/utils/abi/src/wallet/moduleHooks.ts new file mode 100644 index 000000000..93a1dbfdd --- /dev/null +++ b/packages/utils/abi/src/wallet/moduleHooks.ts @@ -0,0 +1,248 @@ +export const abi = [ + { + inputs: [ + { + internalType: 'bytes4', + name: '_signature', + type: 'bytes4', + }, + ], + name: 'HookAlreadyExists', + type: 'error', + }, + { + inputs: [ + { + internalType: 'bytes4', + name: '_signature', + type: 'bytes4', + }, + ], + name: 'HookDoesNotExist', + type: 'error', + }, + { + inputs: [ + { + internalType: 'address', + name: '_sender', + type: 'address', + }, + { + internalType: 'address', + name: '_self', + type: 'address', + }, + ], + name: 'OnlySelfAuth', + type: 'error', + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: 'bytes4', + name: '_signature', + type: 'bytes4', + }, + { + indexed: false, + internalType: 'address', + name: '_implementation', + type: 'address', + }, + ], + name: 'DefinedHook', + type: 'event', + }, + { + stateMutability: 'payable', + type: 'fallback', + }, + { + inputs: [ + { + internalType: 'bytes4', + name: '_signature', + type: 'bytes4', + }, + { + internalType: 'address', + name: '_implementation', + type: 'address', + }, + ], + name: 'addHook', + outputs: [], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [ + { + internalType: 'address', + name: '', + type: 'address', + }, + { + internalType: 'address', + name: '', + type: 'address', + }, + { + internalType: 'uint256[]', + name: '', + type: 'uint256[]', + }, + { + internalType: 'uint256[]', + name: '', + type: 'uint256[]', + }, + { + internalType: 'bytes', + name: '', + type: 'bytes', + }, + ], + name: 'onERC1155BatchReceived', + outputs: [ + { + internalType: 'bytes4', + name: '', + type: 'bytes4', + }, + ], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [ + { + internalType: 'address', + name: '', + type: 'address', + }, + { + internalType: 'address', + name: '', + type: 'address', + }, + { + internalType: 'uint256', + name: '', + type: 'uint256', + }, + { + internalType: 'uint256', + name: '', + type: 'uint256', + }, + { + internalType: 'bytes', + name: '', + type: 'bytes', + }, + ], + name: 'onERC1155Received', + outputs: [ + { + internalType: 'bytes4', + name: '', + type: 'bytes4', + }, + ], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [ + { + internalType: 'address', + name: '', + type: 'address', + }, + { + internalType: 'address', + name: '', + type: 'address', + }, + { + internalType: 'uint256', + name: '', + type: 'uint256', + }, + { + internalType: 'bytes', + name: '', + type: 'bytes', + }, + ], + name: 'onERC721Received', + outputs: [ + { + internalType: 'bytes4', + name: '', + type: 'bytes4', + }, + ], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [ + { + internalType: 'bytes4', + name: '_signature', + type: 'bytes4', + }, + ], + name: 'readHook', + outputs: [ + { + internalType: 'address', + name: '', + type: 'address', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [ + { + internalType: 'bytes4', + name: '_signature', + type: 'bytes4', + }, + ], + name: 'removeHook', + outputs: [], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [ + { + internalType: 'bytes4', + name: '_interfaceID', + type: 'bytes4', + }, + ], + name: 'supportsInterface', + outputs: [ + { + internalType: 'bool', + name: '', + type: 'bool', + }, + ], + stateMutability: 'pure', + type: 'function', + }, + { + stateMutability: 'payable', + type: 'receive', + }, +] as const diff --git a/packages/utils/abi/src/wallet/sequenceUtils.ts b/packages/utils/abi/src/wallet/sequenceUtils.ts new file mode 100644 index 000000000..2480e830f --- /dev/null +++ b/packages/utils/abi/src/wallet/sequenceUtils.ts @@ -0,0 +1,516 @@ +export const abi = [ + { + inputs: [ + { + internalType: 'address', + name: '_factory', + type: 'address', + }, + { + internalType: 'address', + name: '_mainModule', + type: 'address', + }, + ], + stateMutability: 'nonpayable', + type: 'constructor', + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: 'address', + name: '_wallet', + type: 'address', + }, + { + indexed: true, + internalType: 'bytes32', + name: '_imageHash', + type: 'bytes32', + }, + { + indexed: false, + internalType: 'uint256', + name: '_threshold', + type: 'uint256', + }, + { + indexed: false, + internalType: 'bytes', + name: '_signers', + type: 'bytes', + }, + ], + name: 'RequiredConfig', + type: 'event', + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: 'address', + name: '_wallet', + type: 'address', + }, + { + indexed: true, + internalType: 'address', + name: '_signer', + type: 'address', + }, + ], + name: 'RequiredSigner', + type: 'event', + }, + { + inputs: [ + { + internalType: 'address', + name: '_addr', + type: 'address', + }, + ], + name: 'callBalanceOf', + outputs: [ + { + internalType: 'uint256', + name: '', + type: 'uint256', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [], + name: 'callBlockNumber', + outputs: [ + { + internalType: 'uint256', + name: '', + type: 'uint256', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [ + { + internalType: 'uint256', + name: '_i', + type: 'uint256', + }, + ], + name: 'callBlockhash', + outputs: [ + { + internalType: 'bytes32', + name: '', + type: 'bytes32', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [], + name: 'callChainId', + outputs: [ + { + internalType: 'uint256', + name: 'id', + type: 'uint256', + }, + ], + stateMutability: 'pure', + type: 'function', + }, + { + inputs: [ + { + internalType: 'address', + name: '_addr', + type: 'address', + }, + ], + name: 'callCode', + outputs: [ + { + internalType: 'bytes', + name: 'code', + type: 'bytes', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [ + { + internalType: 'address', + name: '_addr', + type: 'address', + }, + ], + name: 'callCodeHash', + outputs: [ + { + internalType: 'bytes32', + name: 'codeHash', + type: 'bytes32', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [ + { + internalType: 'address', + name: '_addr', + type: 'address', + }, + ], + name: 'callCodeSize', + outputs: [ + { + internalType: 'uint256', + name: 'size', + type: 'uint256', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [], + name: 'callCoinbase', + outputs: [ + { + internalType: 'address', + name: '', + type: 'address', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [], + name: 'callDifficulty', + outputs: [ + { + internalType: 'uint256', + name: '', + type: 'uint256', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [], + name: 'callGasLeft', + outputs: [ + { + internalType: 'uint256', + name: '', + type: 'uint256', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [], + name: 'callGasLimit', + outputs: [ + { + internalType: 'uint256', + name: '', + type: 'uint256', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [], + name: 'callGasPrice', + outputs: [ + { + internalType: 'uint256', + name: '', + type: 'uint256', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [], + name: 'callOrigin', + outputs: [ + { + internalType: 'address', + name: '', + type: 'address', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [], + name: 'callTimestamp', + outputs: [ + { + internalType: 'uint256', + name: '', + type: 'uint256', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [ + { + internalType: 'address', + name: '', + type: 'address', + }, + ], + name: 'knownImageHashes', + outputs: [ + { + internalType: 'bytes32', + name: '', + type: 'bytes32', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [ + { + internalType: 'bytes32', + name: '', + type: 'bytes32', + }, + ], + name: 'lastImageHashUpdate', + outputs: [ + { + internalType: 'uint256', + name: '', + type: 'uint256', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [ + { + internalType: 'address', + name: '', + type: 'address', + }, + ], + name: 'lastSignerUpdate', + outputs: [ + { + internalType: 'uint256', + name: '', + type: 'uint256', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [ + { + internalType: 'address', + name: '', + type: 'address', + }, + ], + name: 'lastWalletUpdate', + outputs: [ + { + internalType: 'uint256', + name: '', + type: 'uint256', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [ + { + components: [ + { + internalType: 'bool', + name: 'delegateCall', + type: 'bool', + }, + { + internalType: 'bool', + name: 'revertOnError', + type: 'bool', + }, + { + internalType: 'uint256', + name: 'gasLimit', + type: 'uint256', + }, + { + internalType: 'address', + name: 'target', + type: 'address', + }, + { + internalType: 'uint256', + name: 'value', + type: 'uint256', + }, + { + internalType: 'bytes', + name: 'data', + type: 'bytes', + }, + ], + internalType: 'struct IModuleCalls.Transaction[]', + name: '_txs', + type: 'tuple[]', + }, + ], + name: 'multiCall', + outputs: [ + { + internalType: 'bool[]', + name: '_successes', + type: 'bool[]', + }, + { + internalType: 'bytes[]', + name: '_results', + type: 'bytes[]', + }, + ], + stateMutability: 'payable', + type: 'function', + }, + { + inputs: [ + { + internalType: 'address', + name: '_wallet', + type: 'address', + }, + { + internalType: 'uint256', + name: '_threshold', + type: 'uint256', + }, + { + components: [ + { + internalType: 'uint256', + name: 'weight', + type: 'uint256', + }, + { + internalType: 'address', + name: 'signer', + type: 'address', + }, + ], + internalType: 'struct RequireUtils.Member[]', + name: '_members', + type: 'tuple[]', + }, + { + internalType: 'bool', + name: '_index', + type: 'bool', + }, + ], + name: 'publishConfig', + outputs: [], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [ + { + internalType: 'address', + name: '_wallet', + type: 'address', + }, + { + internalType: 'bytes32', + name: '_hash', + type: 'bytes32', + }, + { + internalType: 'uint256', + name: '_sizeMembers', + type: 'uint256', + }, + { + internalType: 'bytes', + name: '_signature', + type: 'bytes', + }, + { + internalType: 'bool', + name: '_index', + type: 'bool', + }, + ], + name: 'publishInitialSigners', + outputs: [], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [ + { + internalType: 'address', + name: '_wallet', + type: 'address', + }, + { + internalType: 'uint256', + name: '_nonce', + type: 'uint256', + }, + ], + name: 'requireMinNonce', + outputs: [], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [ + { + internalType: 'uint256', + name: '_expiration', + type: 'uint256', + }, + ], + name: 'requireNonExpired', + outputs: [], + stateMutability: 'view', + type: 'function', + }, +] as const diff --git a/packages/utils/abi/src/wallet/walletProxyHook.ts b/packages/utils/abi/src/wallet/walletProxyHook.ts new file mode 100644 index 000000000..dfa00c6a7 --- /dev/null +++ b/packages/utils/abi/src/wallet/walletProxyHook.ts @@ -0,0 +1,9 @@ +export const abi = [ + { + type: 'function', + name: 'PROXY_getImplementation', + inputs: [], + outputs: [{ name: '', type: 'address', internalType: 'address' }], + stateMutability: 'view', + }, +] as const diff --git a/packages/utils/abi/tsconfig.json b/packages/utils/abi/tsconfig.json new file mode 100644 index 000000000..fed9c77b4 --- /dev/null +++ b/packages/utils/abi/tsconfig.json @@ -0,0 +1,10 @@ +{ + "extends": "@repo/typescript-config/base.json", + "compilerOptions": { + "rootDir": "src", + "outDir": "dist", + "types": ["node"] + }, + "include": ["src"], + "exclude": ["node_modules", "dist"] +} diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index e295d41f9..cc06d37ea 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -9,20 +9,20 @@ importers: .: devDependencies: '@changesets/cli': - specifier: ^2.27.11 - version: 2.27.11 + specifier: ^2.29.0 + version: 2.29.0 lefthook: - specifier: ^1.6.1 - version: 1.10.10 + specifier: ^1.11.10 + version: 1.11.10 prettier: - specifier: ^3.2.5 - version: 3.3.3 + specifier: ^3.5.3 + version: 3.5.3 turbo: - specifier: ^2.3.3 - version: 2.3.3 + specifier: ^2.5.0 + version: 2.5.0 typescript: - specifier: 5.5.4 - version: 5.5.4 + specifier: 5.8.3 + version: 5.8.3 apps/demo-wallet: dependencies: @@ -213,6 +213,102 @@ importers: specifier: ^5.7.3 version: 5.7.3 + packages/services/api: + devDependencies: + '@repo/typescript-config': + specifier: workspace:^ + version: link:../../../repo/typescript-config + '@types/node': + specifier: ^22.13.9 + version: 22.13.9 + typescript: + specifier: ^5.7.3 + version: 5.8.3 + + packages/services/builder: + devDependencies: + '@repo/typescript-config': + specifier: workspace:^ + version: link:../../../repo/typescript-config + '@types/node': + specifier: ^22.13.9 + version: 22.13.9 + typescript: + specifier: ^5.7.3 + version: 5.8.3 + + packages/services/guard: + devDependencies: + '@repo/typescript-config': + specifier: workspace:^ + version: link:../../../repo/typescript-config + '@types/node': + specifier: ^22.13.9 + version: 22.13.9 + typescript: + specifier: ^5.7.3 + version: 5.8.3 + + packages/services/indexer: + devDependencies: + '@repo/typescript-config': + specifier: workspace:^ + version: link:../../../repo/typescript-config + '@types/node': + specifier: ^22.13.9 + version: 22.13.9 + typescript: + specifier: ^5.7.3 + version: 5.8.3 + + packages/services/marketplace: + devDependencies: + '@repo/typescript-config': + specifier: workspace:^ + version: link:../../../repo/typescript-config + '@types/node': + specifier: ^22.13.9 + version: 22.13.9 + typescript: + specifier: ^5.7.3 + version: 5.8.3 + + packages/services/metadata: + devDependencies: + '@repo/typescript-config': + specifier: workspace:^ + version: link:../../../repo/typescript-config + '@types/node': + specifier: ^22.13.9 + version: 22.13.9 + typescript: + specifier: ^5.7.3 + version: 5.8.3 + + packages/services/relayer: + devDependencies: + '@repo/typescript-config': + specifier: workspace:^ + version: link:../../../repo/typescript-config + '@types/node': + specifier: ^22.13.9 + version: 22.13.9 + typescript: + specifier: ^5.7.3 + version: 5.8.3 + + packages/utils/abi: + devDependencies: + '@repo/typescript-config': + specifier: workspace:^ + version: link:../../../repo/typescript-config + '@types/node': + specifier: ^22.13.9 + version: 22.13.9 + typescript: + specifier: ^5.7.3 + version: 5.8.3 + packages/wdk: dependencies: '@0xsequence/sequence-core': @@ -503,30 +599,30 @@ packages: '@bcoe/v8-coverage@0.2.3': resolution: {integrity: sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==} - '@changesets/apply-release-plan@7.0.7': - resolution: {integrity: sha512-qnPOcmmmnD0MfMg9DjU1/onORFyRpDXkMMl2IJg9mECY6RnxL3wN0TCCc92b2sXt1jt8DgjAUUsZYGUGTdYIXA==} + '@changesets/apply-release-plan@7.0.10': + resolution: {integrity: sha512-wNyeIJ3yDsVspYvHnEz1xQDq18D9ifed3lI+wxRQRK4pArUcuHgCTrHv0QRnnwjhVCQACxZ+CBih3wgOct6UXw==} - '@changesets/assemble-release-plan@6.0.5': - resolution: {integrity: sha512-IgvBWLNKZd6k4t72MBTBK3nkygi0j3t3zdC1zrfusYo0KpdsvnDjrMM9vPnTCLCMlfNs55jRL4gIMybxa64FCQ==} + '@changesets/assemble-release-plan@6.0.6': + resolution: {integrity: sha512-Frkj8hWJ1FRZiY3kzVCKzS0N5mMwWKwmv9vpam7vt8rZjLL1JMthdh6pSDVSPumHPshTTkKZ0VtNbE0cJHZZUg==} - '@changesets/changelog-git@0.2.0': - resolution: {integrity: sha512-bHOx97iFI4OClIT35Lok3sJAwM31VbUM++gnMBV16fdbtBhgYu4dxsphBF/0AZZsyAHMrnM0yFcj5gZM1py6uQ==} + '@changesets/changelog-git@0.2.1': + resolution: {integrity: sha512-x/xEleCFLH28c3bQeQIyeZf8lFXyDFVn1SgcBiR2Tw/r4IAWlk1fzxCEZ6NxQAjF2Nwtczoen3OA2qR+UawQ8Q==} - '@changesets/cli@2.27.11': - resolution: {integrity: sha512-1QislpE+nvJgSZZo9+Lj3Lno5pKBgN46dAV8IVxKJy9wX8AOrs9nn5pYVZuDpoxWJJCALmbfOsHkyxujgetQSg==} + '@changesets/cli@2.29.0': + resolution: {integrity: sha512-VQdSo9L/Y+PgX1HbytCSftadmHIOK20Y8mOhORDBwaelgjHccxYtO3YBDDhDdaZEPctcuH1YPmIyodHJADXwZA==} hasBin: true - '@changesets/config@3.0.5': - resolution: {integrity: sha512-QyXLSSd10GquX7hY0Mt4yQFMEeqnO5z/XLpbIr4PAkNNoQNKwDyiSrx4yd749WddusH1v3OSiA0NRAYmH/APpQ==} + '@changesets/config@3.1.1': + resolution: {integrity: sha512-bd+3Ap2TKXxljCggI0mKPfzCQKeV/TU4yO2h2C6vAihIo8tzseAn2e7klSuiyYYXvgu53zMN1OeYMIQkaQoWnA==} '@changesets/errors@0.2.0': resolution: {integrity: sha512-6BLOQUscTpZeGljvyQXlWOItQyU71kCdGz7Pi8H8zdw6BI0g3m43iL4xKUVPWtG+qrrL9DTjpdn8eYuCQSRpow==} - '@changesets/get-dependents-graph@2.1.2': - resolution: {integrity: sha512-sgcHRkiBY9i4zWYBwlVyAjEM9sAzs4wYVwJUdnbDLnVG3QwAaia1Mk5P8M7kraTOZN+vBET7n8KyB0YXCbFRLQ==} + '@changesets/get-dependents-graph@2.1.3': + resolution: {integrity: sha512-gphr+v0mv2I3Oxt19VdWRRUxq3sseyUpX9DaHpTUmLj92Y10AGy+XOtV+kbM6L/fDcpx7/ISDFK6T8A/P3lOdQ==} - '@changesets/get-release-plan@4.0.6': - resolution: {integrity: sha512-FHRwBkY7Eili04Y5YMOZb0ezQzKikTka4wL753vfUA5COSebt7KThqiuCN9BewE4/qFGgF/5t3AuzXx1/UAY4w==} + '@changesets/get-release-plan@4.0.8': + resolution: {integrity: sha512-MM4mq2+DQU1ZT7nqxnpveDMTkMBLnwNX44cX7NSxlXmr7f8hO6/S2MXNiXG54uf/0nYnefv0cfy4Czf/ZL/EKQ==} '@changesets/get-version-range-type@0.4.0': resolution: {integrity: sha512-hwawtob9DryoGTpixy1D3ZXbGgJu1Rhr+ySH2PvTLHvkZuQ7sRT4oQwMh0hbqZH1weAooedEjRsbrWcGLCeyVQ==} @@ -537,26 +633,26 @@ packages: '@changesets/logger@0.1.1': resolution: {integrity: sha512-OQtR36ZlnuTxKqoW4Sv6x5YIhOmClRd5pWsjZsddYxpWs517R0HkyiefQPIytCVh4ZcC5x9XaG8KTdd5iRQUfg==} - '@changesets/parse@0.4.0': - resolution: {integrity: sha512-TS/9KG2CdGXS27S+QxbZXgr8uPsP4yNJYb4BC2/NeFUj80Rni3TeD2qwWmabymxmrLo7JEsytXH1FbpKTbvivw==} + '@changesets/parse@0.4.1': + resolution: {integrity: sha512-iwksMs5Bf/wUItfcg+OXrEpravm5rEd9Bf4oyIPL4kVTmJQ7PNDSd6MDYkpSJR1pn7tz/k8Zf2DhTCqX08Ou+Q==} - '@changesets/pre@2.0.1': - resolution: {integrity: sha512-vvBJ/If4jKM4tPz9JdY2kGOgWmCowUYOi5Ycv8dyLnEE8FgpYYUo1mgJZxcdtGGP3aG8rAQulGLyyXGSLkIMTQ==} + '@changesets/pre@2.0.2': + resolution: {integrity: sha512-HaL/gEyFVvkf9KFg6484wR9s0qjAXlZ8qWPDkTyKF6+zqjBe/I2mygg3MbpZ++hdi0ToqNUF8cjj7fBy0dg8Ug==} - '@changesets/read@0.6.2': - resolution: {integrity: sha512-wjfQpJvryY3zD61p8jR87mJdyx2FIhEcdXhKUqkja87toMrP/3jtg/Yg29upN+N4Ckf525/uvV7a4tzBlpk6gg==} + '@changesets/read@0.6.3': + resolution: {integrity: sha512-9H4p/OuJ3jXEUTjaVGdQEhBdqoT2cO5Ts95JTFsQyawmKzpL8FnIeJSyhTDPW1MBRDnwZlHFEM9SpPwJDY5wIg==} - '@changesets/should-skip-package@0.1.1': - resolution: {integrity: sha512-H9LjLbF6mMHLtJIc/eHR9Na+MifJ3VxtgP/Y+XLn4BF7tDTEN1HNYtH6QMcjP1uxp9sjaFYmW8xqloaCi/ckTg==} + '@changesets/should-skip-package@0.1.2': + resolution: {integrity: sha512-qAK/WrqWLNCP22UDdBTMPH5f41elVDlsNyat180A33dWxuUDyNpg6fPi/FyTZwRriVjg0L8gnjJn2F9XAoF0qw==} '@changesets/types@4.1.0': resolution: {integrity: sha512-LDQvVDv5Kb50ny2s25Fhm3d9QSZimsoUGBsUioj6MC3qbMUCuC8GPIvk/M6IvXx3lYhAs0lwWUQLb+VIEUCECw==} - '@changesets/types@6.0.0': - resolution: {integrity: sha512-b1UkfNulgKoWfqyHtzKS5fOZYSJO+77adgL7DLRDr+/7jhChN+QcHnbjiQVOz/U+Ts3PGNySq7diAItzDgugfQ==} + '@changesets/types@6.1.0': + resolution: {integrity: sha512-rKQcJ+o1nKNgeoYRHKOS07tAMNd3YSN0uHaJOZYjBAgxfV7TUE7JE+z4BzZdQwb5hKaYbayKN5KrYV7ODb2rAA==} - '@changesets/write@0.3.2': - resolution: {integrity: sha512-kDxDrPNpUgsjDbWBvUo27PzKX4gqeKOlhibaOXDJA6kuBisGqNHv/HwGJrAu8U/dSf8ZEFIeHIPtvSlZI1kULw==} + '@changesets/write@0.4.0': + resolution: {integrity: sha512-CdTLvIOPiCNuH71pyDu3rA+Q0n65cmAbXnwWH84rKGiFumFzkmHNT8KHTMEchcxN+Kl8I54xGUhJ7l3E7X396Q==} '@cspotcode/source-map-support@0.8.1': resolution: {integrity: sha512-IchNf6dN4tHoMFIn/7OE8LWZ19Y6q/67Bmf6vnGREv8RSbBVb9LPJxEcnwrcwX6ixSvaiGoomAUvu4YSxXrVgw==} @@ -2082,8 +2178,9 @@ packages: resolution: {integrity: sha512-1e4Wqeblerz+tMKPIq2EMGiiWW1dIjZOksyHWSUm1rmuvw/how9hBHZ38lAGj5ID4Ik6EdkOw7NmWPy6LAwalw==} engines: {node: '>= 14'} - human-id@1.0.2: - resolution: {integrity: sha512-UNopramDEhHJD+VR+ehk8rOslwSfByxPIZyJRfV739NDhN5LF1fa1MqnzKm2lGTQRjNrjK19Q5fhkgIfjlVUKw==} + human-id@4.1.1: + resolution: {integrity: sha512-3gKm/gCSUipeLsRYZbbdA1BD83lBoWUkZ7G9VFrhWPAU76KwYo5KR8V28bpoPm/ygy0x5/GCbpRQdY7VLYCoIg==} + hasBin: true human-signals@2.1.0: resolution: {integrity: sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw==} @@ -2527,58 +2624,58 @@ packages: resolution: {integrity: sha512-eTIzlVOSUR+JxdDFepEYcBMtZ9Qqdef+rnzWdRZuMbOywu5tO2w2N7rqjoANZ5k9vywhL6Br1VRjUIgTQx4E8w==} engines: {node: '>=6'} - lefthook-darwin-arm64@1.10.10: - resolution: {integrity: sha512-hEypKdwWpmNSl4Q8eJxgmlGb2ybJj1+W5/v13Mxc+ApEmjbpNiJzPcdjC9zyaMEpPK4EybiHy8g5ZC0dLOwkpA==} + lefthook-darwin-arm64@1.11.10: + resolution: {integrity: sha512-Rufl8BRP77GRFtgNwW95/FHPD0VDfu5bRyzASPcyVrFczJiBK1glAHRdYrErBDNqJhEEjkyv9+EkCZS/MnDKPQ==} cpu: [arm64] os: [darwin] - lefthook-darwin-x64@1.10.10: - resolution: {integrity: sha512-9xNbeE78i4Amz+uOheg9dcy7X/6X12h98SUMrYWk7fONvjW/Bp9h6nPGIGxI5krHp9iRB8rhmo33ljVDVtTlyg==} + lefthook-darwin-x64@1.11.10: + resolution: {integrity: sha512-3ReMyC103S+RozcYQlej9RVa1tKr9t8/PGqXbCiWcPAgA9To3GywPk8533qzTs7Nz9fYDiqJMYyQoXovX0Q4SA==} cpu: [x64] os: [darwin] - lefthook-freebsd-arm64@1.10.10: - resolution: {integrity: sha512-GT9wYxPxkvO1rtIAmctayT9xQIVII5xUIG3Pv6gZo+r6yEyle0EFTLFDbmVje7p7rQNCsvJ8XzCNdnyDrva90g==} + lefthook-freebsd-arm64@1.11.10: + resolution: {integrity: sha512-UQOdQuvoVEe0HnoVX4Uz8beegndBDKE6Igo5flV3OkrBuO1Cz7dGbTQwzsYg6gBLYUOa8Ecb3Xur80oviQqwnA==} cpu: [arm64] os: [freebsd] - lefthook-freebsd-x64@1.10.10: - resolution: {integrity: sha512-2BB/HRhEb9wGpk5K38iNkHtMPnn+TjXDtFG6C/AmUPLXLNhGnNiYp+v2uhUE8quWzxJx7QzfnU7Ga+/gzJcIcw==} + lefthook-freebsd-x64@1.11.10: + resolution: {integrity: sha512-IkoywmTzw9dKDtN34HJ8AZkbY3CGu1XpAVU08pIIvlhv0y7PlLGHYTdmx90SC1d4FhTlTMyiANgXyIaAnXjucw==} cpu: [x64] os: [freebsd] - lefthook-linux-arm64@1.10.10: - resolution: {integrity: sha512-GJ7GALKJ1NcMnNZG9uY+zJR3yS8q7/MgcHFWSJhBl+w4KTiiD/RAdSl5ALwEK2+UX36Eo+7iQA7AXzaRdAii4w==} + lefthook-linux-arm64@1.11.10: + resolution: {integrity: sha512-l/lH4FSljNSIetcptPKLI5sTBpjS6dJZ4gk9oXoGM0ftvb22AlLcZI4l6NFCC1oLVWM0CbhkbStDGTI5txsVaA==} cpu: [arm64] os: [linux] - lefthook-linux-x64@1.10.10: - resolution: {integrity: sha512-dWUvPM9YTIJ3+X9dB+8iOnzoVHbnNmpscmUqEOKSeizgBrvuuIYKZJGDyjEtw65Qnmn1SJ7ouSaKK93p5c7SkQ==} + lefthook-linux-x64@1.11.10: + resolution: {integrity: sha512-yAIIP711p7t0Z9zLfPtdSx1d7pSgtnuVC5B9PANud3I0JOs82aCzmqpc9Q/zp+imWXdI2PpZlFyKx8GLrDW5BQ==} cpu: [x64] os: [linux] - lefthook-openbsd-arm64@1.10.10: - resolution: {integrity: sha512-KnwDyxOvbvGSBTbEF/OxkynZRPLowd3mIXUKHtkg3ABcQ4UREalX+Sh0nWU2dNjQbINx7Eh6B42TxNC7h+qXEg==} + lefthook-openbsd-arm64@1.11.10: + resolution: {integrity: sha512-OAqg9BLsTaeioCJduzZrRLupA2dhTOwHOX0GkO4HTSrOD85JuEPqr5RbYoJ7zuzTQcJEXTJYzaeATM2QHjp/aQ==} cpu: [arm64] os: [openbsd] - lefthook-openbsd-x64@1.10.10: - resolution: {integrity: sha512-49nnG886CI3WkrzVJ71D1M2KWpUYN1BP9LMKNzN11cmZ0j6dUK4hj3nbW+NcrKXxgYzzyLU3FFwrc51OVy2eKA==} + lefthook-openbsd-x64@1.11.10: + resolution: {integrity: sha512-EiUU3mFvqcUdnj3gt0V0gRpQQp0b70cLDSA0LgZyFMM4UimeMbA7OgNYl72RKJgrHcTPHrQc4Vj7Mowbhb/X5w==} cpu: [x64] os: [openbsd] - lefthook-windows-arm64@1.10.10: - resolution: {integrity: sha512-9ni0Tsnk+O5oL7EBfKj9C5ZctD1mrTyHCtiu1zQJBbREReJtPjIM9DwWzecfbuVfrIlpbviVQvx5mjZ44bqlWw==} + lefthook-windows-arm64@1.11.10: + resolution: {integrity: sha512-clKfI95dCpzxJ1zVgcuYWlSl2oNbtAALoMGqYrzJsoy+CAi+vIs54sqJoGOE60+zrVbdk65z8hriCoYNr98SgA==} cpu: [arm64] os: [win32] - lefthook-windows-x64@1.10.10: - resolution: {integrity: sha512-gkKWYrlay4iecFfY1Ris5VcRYa0BaNJKMk0qE/wZmIpMgu4GvNg+f9BEwTMflkQIanABduT9lrECaL1lX5ClKw==} + lefthook-windows-x64@1.11.10: + resolution: {integrity: sha512-zpf/0sG50xsGnwVG/a2giUbmaM/g0uIRqxN5qBbmwKCf0P4PPD2r1xiFZNDb520+tUTC1lWe0RWVoSSwZbBQRA==} cpu: [x64] os: [win32] - lefthook@1.10.10: - resolution: {integrity: sha512-YW0fTONgOXsephvXq2gIFbegCW19MHCyKYX7JDWmzVF1ZiVMnDBYUL/SP3i0RtFvlCmqENl4SgKwYYQGUMnvig==} + lefthook@1.11.10: + resolution: {integrity: sha512-nuiRqBADcRiU6dzwf2H1zBCsdcWGEOsxY8hqoXw5nkEuoTEYN1Bwi2vskHXjIzJ62iCOCo4FZhcHBAzT9gwL5g==} hasBin: true leven@3.1.0: @@ -2933,8 +3030,8 @@ packages: engines: {node: '>=10.13.0'} hasBin: true - prettier@3.3.3: - resolution: {integrity: sha512-i2tDNA0O5IrMO757lfrdQZCc2jPNDVntV0m/+4whiDfWaTKfMNgR7Qz0NAeGz/nRqF4m5/6CLzbP4/liHt12Ew==} + prettier@3.5.3: + resolution: {integrity: sha512-QQtaxnoDJeAkDvDKWCLiwIXkTgRhwYDEQCghU9Z6q03iyek/rxRh/2lC3HB7P8sWT2xC/y5JDctPLBIGzHKbhw==} engines: {node: '>=14'} hasBin: true @@ -3376,38 +3473,38 @@ packages: tslib@2.8.1: resolution: {integrity: sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==} - turbo-darwin-64@2.3.3: - resolution: {integrity: sha512-bxX82xe6du/3rPmm4aCC5RdEilIN99VUld4HkFQuw+mvFg6darNBuQxyWSHZTtc25XgYjQrjsV05888w1grpaA==} + turbo-darwin-64@2.5.0: + resolution: {integrity: sha512-fP1hhI9zY8hv0idym3hAaXdPi80TLovmGmgZFocVAykFtOxF+GlfIgM/l4iLAV9ObIO4SUXPVWHeBZQQ+Hpjag==} cpu: [x64] os: [darwin] - turbo-darwin-arm64@2.3.3: - resolution: {integrity: sha512-DYbQwa3NsAuWkCUYVzfOUBbSUBVQzH5HWUFy2Kgi3fGjIWVZOFk86ss+xsWu//rlEAfYwEmopigsPYSmW4X15A==} + turbo-darwin-arm64@2.5.0: + resolution: {integrity: sha512-p9sYq7kXH7qeJwIQE86cOWv/xNqvow846l6c/qWc26Ib1ci5W7V0sI5thsrP3eH+VA0d+SHalTKg5SQXgNQBWA==} cpu: [arm64] os: [darwin] - turbo-linux-64@2.3.3: - resolution: {integrity: sha512-eHj9OIB0dFaP6BxB88jSuaCLsOQSYWBgmhy2ErCu6D2GG6xW3b6e2UWHl/1Ho9FsTg4uVgo4DB9wGsKa5erjUA==} + turbo-linux-64@2.5.0: + resolution: {integrity: sha512-1iEln2GWiF3iPPPS1HQJT6ZCFXynJPd89gs9SkggH2EJsj3eRUSVMmMC8y6d7bBbhBFsiGGazwFIYrI12zs6uQ==} cpu: [x64] os: [linux] - turbo-linux-arm64@2.3.3: - resolution: {integrity: sha512-NmDE/NjZoDj1UWBhMtOPmqFLEBKhzGS61KObfrDEbXvU3lekwHeoPvAMfcovzswzch+kN2DrtbNIlz+/rp8OCg==} + turbo-linux-arm64@2.5.0: + resolution: {integrity: sha512-bKBcbvuQHmsX116KcxHJuAcppiiBOfivOObh2O5aXNER6mce7YDDQJy00xQQNp1DhEfcSV2uOsvb3O3nN2cbcA==} cpu: [arm64] os: [linux] - turbo-windows-64@2.3.3: - resolution: {integrity: sha512-O2+BS4QqjK3dOERscXqv7N2GXNcqHr9hXumkMxDj/oGx9oCatIwnnwx34UmzodloSnJpgSqjl8iRWiY65SmYoQ==} + turbo-windows-64@2.5.0: + resolution: {integrity: sha512-9BCo8oQ7BO7J0K913Czbc3tw8QwLqn2nTe4E47k6aVYkM12ASTScweXPTuaPFP5iYXAT6z5Dsniw704Ixa5eGg==} cpu: [x64] os: [win32] - turbo-windows-arm64@2.3.3: - resolution: {integrity: sha512-dW4ZK1r6XLPNYLIKjC4o87HxYidtRRcBeo/hZ9Wng2XM/MqqYkAyzJXJGgRMsc0MMEN9z4+ZIfnSNBrA0b08ag==} + turbo-windows-arm64@2.5.0: + resolution: {integrity: sha512-OUHCV+ueXa3UzfZ4co/ueIHgeq9B2K48pZwIxKSm5VaLVuv8M13MhM7unukW09g++dpdrrE1w4IOVgxKZ0/exg==} cpu: [arm64] os: [win32] - turbo@2.3.3: - resolution: {integrity: sha512-DUHWQAcC8BTiUZDRzAYGvpSpGLiaOQPfYXlCieQbwUvmml/LRGIe3raKdrOPOoiX0DYlzxs2nH6BoWJoZrj8hA==} + turbo@2.5.0: + resolution: {integrity: sha512-PvSRruOsitjy6qdqwIIyolv99+fEn57gP6gn4zhsHTEcCYgXPhv6BAxzAjleS8XKpo+Y582vTTA9nuqYDmbRuA==} hasBin: true type-check@0.4.0: @@ -3458,6 +3555,11 @@ packages: engines: {node: '>=14.17'} hasBin: true + typescript@5.8.3: + resolution: {integrity: sha512-p1diW6TqL9L07nNxvRMM7hMMw4c5XOo/1ibL4aAIGmSAt9slTE1Xgw5KWuof2uTOvCg9BY7ZRi+GaF+7sfgPeQ==} + engines: {node: '>=14.17'} + hasBin: true + uglify-js@3.19.3: resolution: {integrity: sha512-v3Xu+yuwBXisp6QYTcH4UbH+xYJXqnq2m/LtQVWKWzYc1iehYnLixoQDN9FH6/j9/oybfd6W9Ghwkl8+UMKTKQ==} engines: {node: '>=0.8.0'} @@ -3795,13 +3897,13 @@ snapshots: '@bcoe/v8-coverage@0.2.3': {} - '@changesets/apply-release-plan@7.0.7': + '@changesets/apply-release-plan@7.0.10': dependencies: - '@changesets/config': 3.0.5 + '@changesets/config': 3.1.1 '@changesets/get-version-range-type': 0.4.0 '@changesets/git': 3.0.2 - '@changesets/should-skip-package': 0.1.1 - '@changesets/types': 6.0.0 + '@changesets/should-skip-package': 0.1.2 + '@changesets/types': 6.1.0 '@manypkg/get-packages': 1.1.3 detect-indent: 6.1.0 fs-extra: 7.0.1 @@ -3809,37 +3911,37 @@ snapshots: outdent: 0.5.0 prettier: 2.8.8 resolve-from: 5.0.0 - semver: 7.6.3 + semver: 7.7.1 - '@changesets/assemble-release-plan@6.0.5': + '@changesets/assemble-release-plan@6.0.6': dependencies: '@changesets/errors': 0.2.0 - '@changesets/get-dependents-graph': 2.1.2 - '@changesets/should-skip-package': 0.1.1 - '@changesets/types': 6.0.0 + '@changesets/get-dependents-graph': 2.1.3 + '@changesets/should-skip-package': 0.1.2 + '@changesets/types': 6.1.0 '@manypkg/get-packages': 1.1.3 - semver: 7.6.3 + semver: 7.7.1 - '@changesets/changelog-git@0.2.0': + '@changesets/changelog-git@0.2.1': dependencies: - '@changesets/types': 6.0.0 + '@changesets/types': 6.1.0 - '@changesets/cli@2.27.11': + '@changesets/cli@2.29.0': dependencies: - '@changesets/apply-release-plan': 7.0.7 - '@changesets/assemble-release-plan': 6.0.5 - '@changesets/changelog-git': 0.2.0 - '@changesets/config': 3.0.5 + '@changesets/apply-release-plan': 7.0.10 + '@changesets/assemble-release-plan': 6.0.6 + '@changesets/changelog-git': 0.2.1 + '@changesets/config': 3.1.1 '@changesets/errors': 0.2.0 - '@changesets/get-dependents-graph': 2.1.2 - '@changesets/get-release-plan': 4.0.6 + '@changesets/get-dependents-graph': 2.1.3 + '@changesets/get-release-plan': 4.0.8 '@changesets/git': 3.0.2 '@changesets/logger': 0.1.1 - '@changesets/pre': 2.0.1 - '@changesets/read': 0.6.2 - '@changesets/should-skip-package': 0.1.1 - '@changesets/types': 6.0.0 - '@changesets/write': 0.3.2 + '@changesets/pre': 2.0.2 + '@changesets/read': 0.6.3 + '@changesets/should-skip-package': 0.1.2 + '@changesets/types': 6.1.0 + '@changesets/write': 0.4.0 '@manypkg/get-packages': 1.1.3 ansi-colors: 4.1.3 ci-info: 3.9.0 @@ -3851,16 +3953,16 @@ snapshots: package-manager-detector: 0.2.8 picocolors: 1.1.1 resolve-from: 5.0.0 - semver: 7.6.3 + semver: 7.7.1 spawndamnit: 3.0.1 term-size: 2.2.1 - '@changesets/config@3.0.5': + '@changesets/config@3.1.1': dependencies: '@changesets/errors': 0.2.0 - '@changesets/get-dependents-graph': 2.1.2 + '@changesets/get-dependents-graph': 2.1.3 '@changesets/logger': 0.1.1 - '@changesets/types': 6.0.0 + '@changesets/types': 6.1.0 '@manypkg/get-packages': 1.1.3 fs-extra: 7.0.1 micromatch: 4.0.8 @@ -3869,20 +3971,20 @@ snapshots: dependencies: extendable-error: 0.1.7 - '@changesets/get-dependents-graph@2.1.2': + '@changesets/get-dependents-graph@2.1.3': dependencies: - '@changesets/types': 6.0.0 + '@changesets/types': 6.1.0 '@manypkg/get-packages': 1.1.3 picocolors: 1.1.1 - semver: 7.6.3 + semver: 7.7.1 - '@changesets/get-release-plan@4.0.6': + '@changesets/get-release-plan@4.0.8': dependencies: - '@changesets/assemble-release-plan': 6.0.5 - '@changesets/config': 3.0.5 - '@changesets/pre': 2.0.1 - '@changesets/read': 0.6.2 - '@changesets/types': 6.0.0 + '@changesets/assemble-release-plan': 6.0.6 + '@changesets/config': 3.1.1 + '@changesets/pre': 2.0.2 + '@changesets/read': 0.6.3 + '@changesets/types': 6.1.0 '@manypkg/get-packages': 1.1.3 '@changesets/get-version-range-type@0.4.0': {} @@ -3899,42 +4001,42 @@ snapshots: dependencies: picocolors: 1.1.1 - '@changesets/parse@0.4.0': + '@changesets/parse@0.4.1': dependencies: - '@changesets/types': 6.0.0 + '@changesets/types': 6.1.0 js-yaml: 3.14.1 - '@changesets/pre@2.0.1': + '@changesets/pre@2.0.2': dependencies: '@changesets/errors': 0.2.0 - '@changesets/types': 6.0.0 + '@changesets/types': 6.1.0 '@manypkg/get-packages': 1.1.3 fs-extra: 7.0.1 - '@changesets/read@0.6.2': + '@changesets/read@0.6.3': dependencies: '@changesets/git': 3.0.2 '@changesets/logger': 0.1.1 - '@changesets/parse': 0.4.0 - '@changesets/types': 6.0.0 + '@changesets/parse': 0.4.1 + '@changesets/types': 6.1.0 fs-extra: 7.0.1 p-filter: 2.1.0 picocolors: 1.1.1 - '@changesets/should-skip-package@0.1.1': + '@changesets/should-skip-package@0.1.2': dependencies: - '@changesets/types': 6.0.0 + '@changesets/types': 6.1.0 '@manypkg/get-packages': 1.1.3 '@changesets/types@4.1.0': {} - '@changesets/types@6.0.0': {} + '@changesets/types@6.1.0': {} - '@changesets/write@0.3.2': + '@changesets/write@0.4.0': dependencies: - '@changesets/types': 6.0.0 + '@changesets/types': 6.1.0 fs-extra: 7.0.1 - human-id: 1.0.2 + human-id: 4.1.1 prettier: 2.8.8 '@cspotcode/source-map-support@0.8.1': @@ -5733,7 +5835,7 @@ snapshots: transitivePeerDependencies: - supports-color - human-id@1.0.2: {} + human-id@4.1.1: {} human-signals@2.1.0: {} @@ -6365,48 +6467,48 @@ snapshots: kleur@3.0.3: {} - lefthook-darwin-arm64@1.10.10: + lefthook-darwin-arm64@1.11.10: optional: true - lefthook-darwin-x64@1.10.10: + lefthook-darwin-x64@1.11.10: optional: true - lefthook-freebsd-arm64@1.10.10: + lefthook-freebsd-arm64@1.11.10: optional: true - lefthook-freebsd-x64@1.10.10: + lefthook-freebsd-x64@1.11.10: optional: true - lefthook-linux-arm64@1.10.10: + lefthook-linux-arm64@1.11.10: optional: true - lefthook-linux-x64@1.10.10: + lefthook-linux-x64@1.11.10: optional: true - lefthook-openbsd-arm64@1.10.10: + lefthook-openbsd-arm64@1.11.10: optional: true - lefthook-openbsd-x64@1.10.10: + lefthook-openbsd-x64@1.11.10: optional: true - lefthook-windows-arm64@1.10.10: + lefthook-windows-arm64@1.11.10: optional: true - lefthook-windows-x64@1.10.10: + lefthook-windows-x64@1.11.10: optional: true - lefthook@1.10.10: + lefthook@1.11.10: optionalDependencies: - lefthook-darwin-arm64: 1.10.10 - lefthook-darwin-x64: 1.10.10 - lefthook-freebsd-arm64: 1.10.10 - lefthook-freebsd-x64: 1.10.10 - lefthook-linux-arm64: 1.10.10 - lefthook-linux-x64: 1.10.10 - lefthook-openbsd-arm64: 1.10.10 - lefthook-openbsd-x64: 1.10.10 - lefthook-windows-arm64: 1.10.10 - lefthook-windows-x64: 1.10.10 + lefthook-darwin-arm64: 1.11.10 + lefthook-darwin-x64: 1.11.10 + lefthook-freebsd-arm64: 1.11.10 + lefthook-freebsd-x64: 1.11.10 + lefthook-linux-arm64: 1.11.10 + lefthook-linux-x64: 1.11.10 + lefthook-openbsd-arm64: 1.11.10 + lefthook-openbsd-x64: 1.11.10 + lefthook-windows-arm64: 1.11.10 + lefthook-windows-x64: 1.11.10 leven@3.1.0: {} @@ -6789,7 +6891,7 @@ snapshots: prettier@2.8.8: {} - prettier@3.3.3: {} + prettier@3.5.3: {} pretty-format@29.7.0: dependencies: @@ -7285,32 +7387,32 @@ snapshots: tslib@2.8.1: {} - turbo-darwin-64@2.3.3: + turbo-darwin-64@2.5.0: optional: true - turbo-darwin-arm64@2.3.3: + turbo-darwin-arm64@2.5.0: optional: true - turbo-linux-64@2.3.3: + turbo-linux-64@2.5.0: optional: true - turbo-linux-arm64@2.3.3: + turbo-linux-arm64@2.5.0: optional: true - turbo-windows-64@2.3.3: + turbo-windows-64@2.5.0: optional: true - turbo-windows-arm64@2.3.3: + turbo-windows-arm64@2.5.0: optional: true - turbo@2.3.3: + turbo@2.5.0: optionalDependencies: - turbo-darwin-64: 2.3.3 - turbo-darwin-arm64: 2.3.3 - turbo-linux-64: 2.3.3 - turbo-linux-arm64: 2.3.3 - turbo-windows-64: 2.3.3 - turbo-windows-arm64: 2.3.3 + turbo-darwin-64: 2.5.0 + turbo-darwin-arm64: 2.5.0 + turbo-linux-64: 2.5.0 + turbo-linux-arm64: 2.5.0 + turbo-windows-64: 2.5.0 + turbo-windows-arm64: 2.5.0 type-check@0.4.0: dependencies: @@ -7368,6 +7470,8 @@ snapshots: typescript@5.7.3: {} + typescript@5.8.3: {} + uglify-js@3.19.3: optional: true diff --git a/pnpm-workspace.yaml b/pnpm-workspace.yaml index ae9e2fdcd..897621b37 100644 --- a/pnpm-workspace.yaml +++ b/pnpm-workspace.yaml @@ -1,5 +1,7 @@ packages: - - "apps/*" - - "packages/*" - - "repo/*" - - "test/*" + - apps/* + - packages/* + - packages/services/* + - packages/utils/* + - repo/* + - test/* diff --git a/repo/README.md b/repo/README.md new file mode 100644 index 000000000..ff6be7a7b --- /dev/null +++ b/repo/README.md @@ -0,0 +1,4 @@ +# repo + +This folder contains the boilerplate packages needed to manage +our monorepo. diff --git a/turbo.json b/turbo.json index e345eb059..70607f033 100644 --- a/turbo.json +++ b/turbo.json @@ -22,6 +22,8 @@ "inputs": [ "packages/**/*.tsx", "packages/**/*.ts", + "repo/**/*.ts", + "repo/**/*.tsx", "test/**/*.ts", "test/**/*.tsx" ], From 92cfe52eb933f9789b0656daa9148a6bdb11f75d Mon Sep 17 00:00:00 2001 From: Peter Kieltyka Date: Mon, 14 Apr 2025 16:28:29 -0400 Subject: [PATCH 306/439] services/relayer: disable older tests --- packages/services/relayer/package.json | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/services/relayer/package.json b/packages/services/relayer/package.json index 626a998b2..4dacd567b 100644 --- a/packages/services/relayer/package.json +++ b/packages/services/relayer/package.json @@ -8,10 +8,10 @@ "scripts": { "build": "tsc", "dev": "tsc --watch", - "test": "pnpm test:concurrently 'pnpm test:run'", - "test:run": "pnpm test:file tests/**/*.spec.ts", - "test:file": "NODE_OPTIONS='--import tsx' mocha --timeout 60000", - "test:concurrently": "concurrently -k --success first 'pnpm start:hardhat > /dev/null' ", + "old-test": "pnpm test:concurrently 'pnpm test:run'", + "old-test:run": "pnpm test:file tests/**/*.spec.ts", + "old-test:file": "NODE_OPTIONS='--import tsx' mocha --timeout 60000", + "old-test:concurrently": "concurrently -k --success first 'pnpm start:hardhat > /dev/null' ", "start:hardhat": "pnpm hardhat node --port 9547", "typecheck": "tsc --noEmit" }, From 266dfcd2fcd1aed6c3566d3eee3406dcbe8fa138 Mon Sep 17 00:00:00 2001 From: Peter Kieltyka Date: Mon, 14 Apr 2025 17:49:00 -0400 Subject: [PATCH 307/439] remove old. rename apps to extras. group core wallet pkgs in folder. --- apps/docs/eslint.config.js | 4 - apps/docs/next.config.js | 4 - apps/docs/tsconfig.json | 20 - apps/web/eslint.config.js | 4 - apps/web/next.config.js | 4 - apps/web/tsconfig.json | 20 - {apps => extras}/demo-wallet/.gitignore | 0 {apps => extras}/demo-wallet/README.md | 0 .../demo-wallet/app/email-otp/page.tsx | 0 {apps => extras}/demo-wallet/app/favicon.ico | Bin .../app/google-legacy/callback/page.tsx | 0 .../demo-wallet/app/google-legacy/route.tsx | 0 .../demo-wallet/app/google/callback/page.tsx | 0 .../demo-wallet/app/google/page.tsx | 0 .../app/handlers/auth-code-pkce.tsx | 0 .../demo-wallet/app/handlers/id-token.tsx | 0 .../demo-wallet/app/handlers/otp.tsx | 0 {apps => extras}/demo-wallet/app/layout.tsx | 0 .../demo-wallet/app/lib/attestation.ts | 0 .../demo-wallet/app/lib/client-params.ts | 0 .../demo-wallet/app/lib/cookies.ts | 0 .../demo-wallet/app/lib/session-storage.ts | 0 {apps => extras}/demo-wallet/eslint.config.js | 0 {apps => extras}/demo-wallet/next.config.js | 0 {apps => extras}/demo-wallet/package.json | 0 {apps => extras}/demo-wallet/tsconfig.json | 0 {apps => extras}/docs/.gitignore | 0 {apps => extras}/docs/README.md | 0 {apps => extras}/docs/app/favicon.ico | Bin .../docs/app/fonts/GeistMonoVF.woff | Bin {apps => extras}/docs/app/fonts/GeistVF.woff | Bin {apps => extras}/docs/app/globals.css | 0 {apps => extras}/docs/app/layout.tsx | 0 {apps => extras}/docs/app/page.module.css | 0 {apps => extras}/docs/app/page.tsx | 0 extras/docs/eslint.config.js | 4 + extras/docs/next.config.js | 4 + {apps => extras}/docs/package.json | 0 {apps => extras}/docs/public/file-text.svg | 0 {apps => extras}/docs/public/globe.svg | 0 {apps => extras}/docs/public/next.svg | 0 .../docs/public/turborepo-dark.svg | 0 .../docs/public/turborepo-light.svg | 0 {apps => extras}/docs/public/vercel.svg | 0 {apps => extras}/docs/public/window.svg | 0 extras/docs/tsconfig.json | 12 + {apps => extras}/web/.gitignore | 0 {apps => extras}/web/README.md | 0 {apps => extras}/web/app/favicon.ico | Bin .../web/app/fonts/GeistMonoVF.woff | Bin {apps => extras}/web/app/fonts/GeistVF.woff | Bin {apps => extras}/web/app/globals.css | 0 {apps => extras}/web/app/layout.tsx | 0 {apps => extras}/web/app/page.module.css | 0 {apps => extras}/web/app/page.tsx | 0 extras/web/eslint.config.js | 4 + extras/web/next.config.js | 4 + {apps => extras}/web/package.json | 0 {apps => extras}/web/public/file-text.svg | 0 {apps => extras}/web/public/globe.svg | 0 {apps => extras}/web/public/next.svg | 0 .../web/public/turborepo-dark.svg | 0 .../web/public/turborepo-light.svg | 0 {apps => extras}/web/public/vercel.svg | 0 {apps => extras}/web/public/window.svg | 0 extras/web/tsconfig.json | 12 + old/.changeset/README.md | 8 - old/.changeset/config.json | 19 - old/.eslintignore | 2 - old/.eslintrc.js | 50 - old/.gitignore | 26 - old/.prettierrc | 9 - old/LICENSE | 219 - old/README.md | 125 - old/babel.config.js | 19 - old/package.json | 108 - old/packages/0xsequence/CHANGELOG.md | 7934 ------- old/packages/0xsequence/README.md | 67 - old/packages/0xsequence/hardhat.config.js | 21 - old/packages/0xsequence/hardhat2.config.js | 21 - old/packages/0xsequence/package.json | 91 - old/packages/0xsequence/src/abi.ts | 1 - old/packages/0xsequence/src/account.ts | 1 - old/packages/0xsequence/src/api.ts | 1 - old/packages/0xsequence/src/auth.ts | 1 - old/packages/0xsequence/src/core.ts | 6 - old/packages/0xsequence/src/guard.ts | 1 - old/packages/0xsequence/src/index.ts | 3 - old/packages/0xsequence/src/indexer.ts | 1 - old/packages/0xsequence/src/metadata.ts | 1 - old/packages/0xsequence/src/migration.ts | 1 - old/packages/0xsequence/src/network.ts | 17 - old/packages/0xsequence/src/provider.ts | 29 - old/packages/0xsequence/src/relayer.ts | 3 - old/packages/0xsequence/src/sequence.ts | 20 - old/packages/0xsequence/src/sessions.ts | 1 - old/packages/0xsequence/src/signhub.ts | 1 - old/packages/0xsequence/src/transactions.ts | 10 - old/packages/0xsequence/src/utils.ts | 5 - .../browser/json-rpc-provider/rpc.test.ts | 37 - .../browser/mock-wallet/mock-wallet.test.ts | 120 - .../tests/browser/mux-transport/mux.test.ts | 177 - .../browser/proxy-transport/channel.test.ts | 174 - .../tests/browser/testutils/accounts.ts | 44 - .../testutils/deploy-wallet-context.ts | 79 - .../tests/browser/testutils/index.ts | 3 - .../tests/browser/testutils/wallet.ts | 13 - .../browser/wallet-provider/dapp.test.ts | 527 - .../browser/wallet-provider/dapp2.test.ts | 116 - .../browser/window-transport/dapp.test.ts | 130 - .../tests/json-rpc-provider.spec.ts | 3 - .../0xsequence/tests/mock-wallet.spec.ts | 3 - .../0xsequence/tests/mux-transport.spec.ts | 3 - .../0xsequence/tests/proxy-transport.spec.ts | 3 - old/packages/0xsequence/tests/utils/assert.ts | 97 - .../tests/utils/browser-test-runner.ts | 89 - .../tests/utils/webpack-test-server.ts | 31 - .../0xsequence/tests/wallet-provider.spec.ts | 4 - .../0xsequence/tests/webpack.config.js | 165 - .../0xsequence/tests/window-transport.spec.ts | 3 - old/packages/abi/CHANGELOG.md | 2087 -- old/packages/abi/README.md | 4 - old/packages/abi/package.json | 22 - old/packages/abi/src/index.ts | 23 - old/packages/abi/src/sale/erc1155Sale.ts | 352 - old/packages/abi/src/sale/erc721Sale.ts | 352 - .../abi/src/saleItems/erc1155SaleItems.ts | 377 - .../abi/src/saleItems/erc721SaleItems.ts | 440 - old/packages/abi/src/tokens/erc1155.ts | 422 - old/packages/abi/src/tokens/erc20.ts | 316 - old/packages/abi/src/tokens/erc6909.ts | 404 - old/packages/abi/src/tokens/erc721.ts | 441 - old/packages/abi/src/wallet/erc1271.ts | 26 - old/packages/abi/src/wallet/erc5719.ts | 19 - old/packages/abi/src/wallet/erc6492.ts | 61 - old/packages/abi/src/wallet/factory.ts | 18 - old/packages/abi/src/wallet/index.ts | 26 - .../src/wallet/libs/requireFreshSigners.ts | 15 - old/packages/abi/src/wallet/mainModule.ts | 158 - .../abi/src/wallet/mainModuleUpgradable.ts | 28 - old/packages/abi/src/wallet/moduleHooks.ts | 248 - old/packages/abi/src/wallet/sequenceUtils.ts | 516 - .../abi/src/wallet/walletProxyHook.ts | 9 - old/packages/account/CHANGELOG.md | 2716 --- old/packages/account/hardhat.config.js | 12 - old/packages/account/hardhat2.config.js | 11 - old/packages/account/package.json | 43 - old/packages/account/src/account.ts | 1190 -- old/packages/account/src/index.ts | 1 - .../account/src/orchestrator/wrapper.ts | 69 - old/packages/account/src/signer.ts | 241 - old/packages/account/tests/account.spec.ts | 1561 -- old/packages/account/tests/signer.spec.ts | 891 - old/packages/api/CHANGELOG.md | 2156 -- old/packages/api/README.md | 4 - old/packages/api/package.json | 22 - old/packages/api/src/api.gen.ts | 3597 ---- old/packages/api/src/index.ts | 36 - old/packages/auth/CHANGELOG.md | 5972 ------ old/packages/auth/README.md | 4 - old/packages/auth/hardhat.config.js | 15 - old/packages/auth/package.json | 49 - old/packages/auth/src/authorization.ts | 81 - old/packages/auth/src/index.ts | 3 - old/packages/auth/src/proof.ts | 16 - old/packages/auth/src/services.ts | 349 - old/packages/auth/src/session.ts | 400 - old/packages/auth/tests/session.spec.ts | 1437 -- old/packages/auth/tests/utils/index.ts | 33 - old/packages/builder/CHANGELOG.md | 155 - old/packages/builder/README.md | 4 - old/packages/builder/package.json | 22 - old/packages/builder/src/builder.gen.ts | 714 - old/packages/builder/src/index.ts | 30 - old/packages/core/CHANGELOG.md | 1597 -- old/packages/core/package.json | 32 - old/packages/core/src/commons/config.ts | 67 - old/packages/core/src/commons/context.ts | 114 - old/packages/core/src/commons/index.ts | 10 - old/packages/core/src/commons/orchestrator.ts | 42 - old/packages/core/src/commons/reader.ts | 92 - old/packages/core/src/commons/signature.ts | 71 - old/packages/core/src/commons/signer.ts | 73 - old/packages/core/src/commons/transaction.ts | 327 - .../core/src/commons/validateEIP1271.ts | 38 - .../core/src/commons/validateEIP6492.ts | 200 - old/packages/core/src/index.ts | 11 - old/packages/core/src/universal/index.ts | 25 - old/packages/core/src/v1/config.ts | 221 - old/packages/core/src/v1/context.ts | 6 - old/packages/core/src/v1/index.ts | 16 - old/packages/core/src/v1/signature.ts | 258 - old/packages/core/src/v2/chained.ts | 30 - old/packages/core/src/v2/config.ts | 620 - old/packages/core/src/v2/context.ts | 6 - old/packages/core/src/v2/index.ts | 26 - old/packages/core/src/v2/signature.ts | 975 - old/packages/core/src/version.ts | 1 - old/packages/core/tests/v2/config.spec.ts | 512 - old/packages/core/tests/v2/signature.spec.ts | 603 - old/packages/deployer/.gitignore | 4 - old/packages/deployer/CHANGELOG.md | 2923 --- old/packages/deployer/README.md | 59 - .../NanoUniversalDeployer.json | 28 - .../UniversalDeployer2.json | 42 - old/packages/deployer/config/PROD.env.sample | 2 - .../contracts/NanoUniversalDeployer.sol | 12 - .../deployer/contracts/UniversalDeployer2.sol | 16 - old/packages/deployer/hardhat.config.ts | 31 - old/packages/deployer/package.json | 34 - .../deployer/src/UniversalDeployer.ts | 213 - old/packages/deployer/src/constants.ts | 16 - old/packages/deployer/src/index.ts | 3 - old/packages/deployer/src/types.ts | 16 - .../contracts/NanoUniversalDeployer.ts | 73 - .../typings/contracts/UniversalDeployer2.ts | 95 - .../deployer/src/typings/contracts/common.ts | 86 - .../NanoUniversalDeployer__factory.ts | 68 - .../factories/UniversalDeployer2__factory.ts | 82 - .../src/typings/contracts/factories/index.ts | 5 - .../deployer/src/typings/contracts/index.ts | 8 - .../deployer/src/utils/configLoader.ts | 49 - old/packages/deployer/src/utils/logger.ts | 34 - old/packages/deployer/tests/mock.spec.ts | 3 - old/packages/guard/CHANGELOG.md | 2943 --- old/packages/guard/README.md | 4 - old/packages/guard/package.json | 31 - old/packages/guard/src/guard.gen.ts | 1015 - old/packages/guard/src/index.ts | 2 - old/packages/guard/src/signer.ts | 308 - old/packages/indexer/CHANGELOG.md | 1781 -- old/packages/indexer/README.md | 4 - old/packages/indexer/package.json | 22 - old/packages/indexer/src/index.ts | 71 - old/packages/indexer/src/indexer.gen.ts | 2310 -- old/packages/indexer/src/indexergw.gen.ts | 1511 -- old/packages/marketplace/CHANGELOG.md | 238 - old/packages/marketplace/README.md | 3 - old/packages/marketplace/package.json | 22 - old/packages/marketplace/src/index.ts | 36 - .../marketplace/src/marketplace.gen.ts | 2435 --- old/packages/metadata/CHANGELOG.md | 1789 -- old/packages/metadata/README.md | 4 - old/packages/metadata/package.json | 22 - old/packages/metadata/src/index.ts | 66 - old/packages/metadata/src/metadata.gen.ts | 2758 --- old/packages/migration/CHANGELOG.md | 1886 -- old/packages/migration/package.json | 31 - old/packages/migration/src/defaults.ts | 6 - old/packages/migration/src/index.ts | 4 - .../migration/src/migrations/index.ts | 25 - .../src/migrations/migration_01_02.ts | 113 - old/packages/migration/src/migrator.ts | 123 - old/packages/migration/src/version.ts | 29 - old/packages/network/CHANGELOG.md | 3533 --- old/packages/network/README.md | 4 - old/packages/network/constants/package.json | 4 - old/packages/network/networkNames.md | 62 - old/packages/network/networkNames.template.md | 9 - old/packages/network/package.json | 38 - old/packages/network/src/config.ts | 148 - old/packages/network/src/constants.ts | 1184 -- old/packages/network/src/index.ts | 5 - old/packages/network/src/json-rpc-provider.ts | 150 - old/packages/network/src/json-rpc/handler.ts | 40 - old/packages/network/src/json-rpc/index.ts | 5 - .../src/json-rpc/middleware/allow-provider.ts | 36 - .../json-rpc/middleware/cached-provider.ts | 165 - .../src/json-rpc/middleware/eager-provider.ts | 56 - .../json-rpc/middleware/exception-provider.ts | 15 - .../network/src/json-rpc/middleware/index.ts | 9 - .../json-rpc/middleware/logging-provider.ts | 30 - .../json-rpc/middleware/network-provider.ts | 23 - .../json-rpc/middleware/public-provider.ts | 46 - .../json-rpc/middleware/signing-provider.ts | 50 - .../src/json-rpc/middleware/singleflight.ts | 90 - old/packages/network/src/json-rpc/router.ts | 43 - old/packages/network/src/json-rpc/types.ts | 45 - old/packages/network/src/json-rpc/utils.ts | 18 - old/packages/network/src/utils.ts | 210 - old/packages/provider/CHANGELOG.md | 5487 ----- old/packages/provider/README.md | 4 - old/packages/provider/hardhat1.config.cts | 18 - old/packages/provider/hardhat1.config.js | 16 - old/packages/provider/hardhat2.config.cts | 18 - old/packages/provider/hardhat2.config.js | 16 - old/packages/provider/package.json | 48 - old/packages/provider/src/analytics.ts | 47 - old/packages/provider/src/client.ts | 529 - old/packages/provider/src/eip191exceptions.ts | 137 - old/packages/provider/src/extended.ts | 26 - old/packages/provider/src/index.ts | 9 - old/packages/provider/src/init.ts | 191 - old/packages/provider/src/provider.ts | 570 - old/packages/provider/src/signer.ts | 295 - old/packages/provider/src/transactions.ts | 57 - .../src/transports/base-provider-transport.ts | 416 - .../src/transports/base-wallet-transport.ts | 484 - .../base-injected-transport.ts | 101 - .../extension-message-handler.ts | 29 - .../extension-message-provider.ts | 41 - .../transports/extension-transport/index.ts | 3 - old/packages/provider/src/transports/index.ts | 8 - .../src/transports/mux-transport/index.ts | 1 - .../mux-transport/mux-message-provider.ts | 248 - .../src/transports/proxy-transport/index.ts | 3 - .../proxy-transport/proxy-message-channel.ts | 57 - .../proxy-transport/proxy-message-handler.ts | 44 - .../proxy-transport/proxy-message-provider.ts | 88 - .../src/transports/unreal-transport/index.ts | 2 - .../unreal-transport/overridelogs.ts | 38 - .../unreal-message-handler.ts | 121 - .../unreal-message-provider.ts | 121 - .../src/transports/wallet-request-handler.ts | 941 - .../src/transports/window-transport/index.ts | 2 - .../window-message-handler.ts | 167 - .../window-message-provider.ts | 197 - old/packages/provider/src/types.ts | 380 - old/packages/provider/src/utils.ts | 210 - old/packages/provider/src/utils/index.ts | 75 - old/packages/provider/tests/client.spec.ts | 1679 -- .../provider/tests/eip191prefix.spec.ts | 22 - old/packages/provider/tests/messages.ts | 93 - old/packages/provider/tests/provider.spec.ts | 1768 -- .../tests/remove-eip191prefix.spec.ts | 34 - old/packages/provider/tests/signer.spec.ts | 1000 - .../provider/tests/transactions.spec.ts | 109 - old/packages/provider/tests/zeroxv3.spec.ts | 14 - old/packages/react-native/CHANGELOG.md | 759 - old/packages/react-native/package.json | 25 - old/packages/react-native/src/index.ts | 1 - .../react-native/src/keychain-store.ts | 30 - old/packages/relayer/CHANGELOG.md | 3848 ---- old/packages/relayer/README.md | 4 - old/packages/relayer/hardhat.config.js | 15 - old/packages/relayer/package.json | 37 - old/packages/relayer/src/index.ts | 111 - old/packages/relayer/src/local-relayer.ts | 125 - old/packages/relayer/src/provider-relayer.ts | 284 - old/packages/relayer/src/rpc-relayer/index.ts | 380 - .../relayer/src/rpc-relayer/relayer.gen.ts | 1849 -- .../relayer/tests/provider-relayer.spec.ts | 543 - old/packages/replacer/CHANGELOG.md | 1711 -- old/packages/replacer/package.json | 26 - old/packages/replacer/src/cached.ts | 31 - old/packages/replacer/src/index.ts | 119 - old/packages/replacer/src/ipfs.ts | 9 - old/packages/sessions/CHANGELOG.md | 1946 -- old/packages/sessions/hardhat.config.js | 11 - old/packages/sessions/package.json | 38 - old/packages/sessions/src/index.ts | 2 - old/packages/sessions/src/tracker.ts | 57 - old/packages/sessions/src/trackers/arweave.ts | 642 - old/packages/sessions/src/trackers/cached.ts | 186 - old/packages/sessions/src/trackers/debug.ts | 97 - old/packages/sessions/src/trackers/deduped.ts | 100 - old/packages/sessions/src/trackers/index.ts | 8 - old/packages/sessions/src/trackers/local.ts | 594 - .../sessions/src/trackers/multiple.ts | 236 - .../sessions/src/trackers/promise-cache.ts | 60 - .../sessions/src/trackers/remote/index.ts | 360 - .../src/trackers/remote/sessions.gen.ts | 808 - .../sessions/src/trackers/stores/index.ts | 78 - .../src/trackers/stores/indexedDBStore.ts | 191 - .../src/trackers/stores/memoryStore.ts | 88 - old/packages/sessions/tests/arweave.spec.ts | 433 - old/packages/sessions/tests/local.spec.ts | 1192 -- old/packages/signhub/CHANGELOG.md | 1454 -- old/packages/signhub/package.json | 31 - old/packages/signhub/src/index.ts | 2 - old/packages/signhub/src/orchestrator.ts | 218 - old/packages/signhub/src/signers/index.ts | 2 - old/packages/signhub/src/signers/signer.ts | 45 - old/packages/signhub/src/signers/wrapper.ts | 41 - .../signhub/tests/orchestrator.spec.ts | 551 - old/packages/tests/CHANGELOG.md | 1597 -- old/packages/tests/package.json | 30 - old/packages/tests/src/builds/artifact.ts | 9 - old/packages/tests/src/builds/index.ts | 4 - .../tests/src/builds/v1/artifacts/Factory.ts | 37 - .../src/builds/v1/artifacts/GuestModule.ts | 295 - .../src/builds/v1/artifacts/MainModule.ts | 528 - .../v1/artifacts/MainModuleUpgradable.ts | 530 - .../src/builds/v1/artifacts/MultiCallUtils.ts | 281 - .../src/builds/v1/artifacts/SequenceUtils.ts | 527 - old/packages/tests/src/builds/v1/index.ts | 6 - .../tests/src/builds/v2/artifacts/Factory.ts | 37 - .../src/builds/v2/artifacts/GuestModule.ts | 628 - .../src/builds/v2/artifacts/MainModule.ts | 1104 - .../v2/artifacts/MainModuleUpgradable.ts | 1062 - .../v2/artifacts/UniversalSigValidator.ts | 190 - old/packages/tests/src/builds/v2/index.ts | 5 - old/packages/tests/src/configs/index.ts | 1 - old/packages/tests/src/configs/random.ts | 47 - old/packages/tests/src/context/index.ts | 22 - old/packages/tests/src/context/v1.ts | 118 - old/packages/tests/src/context/v2.ts | 49 - old/packages/tests/src/index.ts | 8 - old/packages/tests/src/networks.ts | 52 - old/packages/tests/src/singletonFactory.ts | 106 - old/packages/tests/src/tokens/erc20.ts | 324 - old/packages/tests/src/utils.ts | 35 - old/packages/utils/CHANGELOG.md | 2093 -- old/packages/utils/README.md | 4 - old/packages/utils/package.json | 29 - old/packages/utils/src/access-key.ts | 30 - old/packages/utils/src/base64.ts | 24 - old/packages/utils/src/bigint.ts | 107 - old/packages/utils/src/digest.ts | 18 - old/packages/utils/src/index.ts | 18 - old/packages/utils/src/is-node-or-browser.ts | 9 - old/packages/utils/src/jwt-decode.ts | 10 - old/packages/utils/src/logger.ts | 98 - old/packages/utils/src/merkle.ts | 49 - old/packages/utils/src/merkletree/Base.ts | 107 - .../utils/src/merkletree/MerkleTree.ts | 186 - old/packages/utils/src/merkletree/README.md | 1 - old/packages/utils/src/merkletree/index.ts | 1 - old/packages/utils/src/network.ts | 41 - old/packages/utils/src/promise-cache.ts | 58 - old/packages/utils/src/promisify.ts | 32 - old/packages/utils/src/query-string.ts | 15 - old/packages/utils/src/rand.ts | 5 - old/packages/utils/src/sanitize.ts | 27 - old/packages/utils/src/sleep.ts | 8 - old/packages/utils/src/typed-data.ts | 24 - old/packages/utils/src/types.ts | 21 - old/packages/utils/src/web.ts | 2 - old/packages/utils/tests/access-key.spec.ts | 11 - old/packages/utils/tests/base64.spec.ts | 49 - old/packages/utils/tests/bigint.spec.ts | 57 - old/packages/utils/tests/jwt-decode.spec.ts | 13 - old/packages/utils/tests/merkle.spec.ts | 34 - old/packages/utils/tests/query-string.spec.ts | 51 - old/packages/utils/tests/sanitize.spec.ts | 21 - old/packages/waas-ethers/CHANGELOG.md | 986 - old/packages/waas-ethers/README.md | 4 - old/packages/waas-ethers/package.json | 29 - old/packages/waas-ethers/src/index.ts | 1 - old/packages/waas-ethers/src/signer.ts | 152 - old/packages/waas/CHANGELOG.md | 1128 - old/packages/waas/README.md | 4 - old/packages/waas/package.json | 41 - old/packages/waas/src/auth.ts | 897 - old/packages/waas/src/base.ts | 647 - old/packages/waas/src/challenge.ts | 121 - .../waas/src/clients/authenticator.gen.ts | 908 - old/packages/waas/src/clients/intent.gen.ts | 435 - old/packages/waas/src/email.ts | 134 - old/packages/waas/src/errors.ts | 6 - old/packages/waas/src/index.ts | 37 - old/packages/waas/src/intents/accounts.ts | 24 - old/packages/waas/src/intents/base.ts | 91 - old/packages/waas/src/intents/index.ts | 4 - old/packages/waas/src/intents/messages.ts | 38 - old/packages/waas/src/intents/responses.ts | 309 - old/packages/waas/src/intents/session.ts | 71 - old/packages/waas/src/intents/transactions.ts | 453 - old/packages/waas/src/intents/utils.ts | 9 - old/packages/waas/src/networks.ts | 49 - old/packages/waas/src/secure-store.ts | 69 - old/packages/waas/src/session/index.ts | 42 - old/packages/waas/src/session/keyTypes.ts | 4 - old/packages/waas/src/session/secp256k1.ts | 49 - old/packages/waas/src/session/secp256r1.ts | 93 - old/packages/waas/src/store.ts | 89 - old/packages/waas/src/subtle-crypto.ts | 120 - old/packages/waas/tests/intents.spec.ts | 165 - old/packages/wallet/CHANGELOG.md | 4836 ----- old/packages/wallet/README.md | 4 - old/packages/wallet/hardhat.config.js | 11 - old/packages/wallet/hardhat2.config.js | 11 - old/packages/wallet/package.json | 42 - old/packages/wallet/src/index.ts | 5 - .../wallet/src/orchestrator/wrapper.ts | 46 - old/packages/wallet/src/signer.ts | 100 - old/packages/wallet/src/utils.ts | 26 - old/packages/wallet/src/wallet.ts | 470 - .../tests/utils/deploy-wallet-context.ts | 50 - .../wallet/tests/utils/get-contract.ts | 0 old/packages/wallet/tests/utils/index.ts | 5 - old/packages/wallet/tests/wallet.spec.ts | 619 - old/pnpm-lock.yaml | 17687 ---------------- old/pnpm-workspace.yaml | 2 - old/scripts/fix-mocha-ref.js | 43 - old/scripts/pnpm-link.sh | 36 - old/scripts/update-network-names-doc.ts | 30 - old/scripts/update-version.js | 11 - old/tsconfig.json | 19 - old/tsconfig.test.json | 15 - packages/{ => wallet}/core/.env.test | 0 packages/{ => wallet}/core/jest.config.ts | 0 packages/{ => wallet}/core/package.json | 0 packages/{ => wallet}/core/src/envelope.ts | 0 packages/{ => wallet}/core/src/index.ts | 0 .../{ => wallet}/core/src/relayer/index.ts | 0 .../{ => wallet}/core/src/relayer/local.ts | 0 .../{ => wallet}/core/src/relayer/relayer.ts | 0 .../{ => wallet}/core/src/signers/index.ts | 0 .../{ => wallet}/core/src/signers/passkey.ts | 0 .../core/src/signers/pk/encrypted.ts | 0 .../{ => wallet}/core/src/signers/pk/index.ts | 0 .../core/src/signers/session-manager.ts | 0 .../core/src/signers/session/explicit.ts | 0 .../core/src/signers/session/implicit.ts | 0 .../core/src/signers/session/index.ts | 0 .../core/src/signers/session/session.ts | 0 packages/{ => wallet}/core/src/state/index.ts | 0 .../core/src/state/local/index.ts | 0 .../core/src/state/local/indexed-db.ts | 0 .../core/src/state/local/memory.ts | 0 packages/{ => wallet}/core/src/state/utils.ts | 0 packages/{ => wallet}/core/src/wallet.ts | 0 packages/{ => wallet}/core/test/constants.ts | 0 .../core/test/session-manager.test.ts | 0 packages/{ => wallet}/core/tsconfig.json | 0 .../primitives-cli/eslint.config.mjs | 0 .../{ => wallet}/primitives-cli/package.json | 0 .../{ => wallet}/primitives-cli/src/index.ts | 0 .../primitives-cli/src/subcommands/address.ts | 0 .../primitives-cli/src/subcommands/config.ts | 0 .../src/subcommands/devTools.ts | 0 .../src/subcommands/passkeys.ts | 0 .../primitives-cli/src/subcommands/payload.ts | 0 .../src/subcommands/recovery.ts | 0 .../primitives-cli/src/subcommands/server.ts | 0 .../primitives-cli/src/subcommands/session.ts | 0 .../src/subcommands/sessionExplicit.ts | 0 .../src/subcommands/sessionImplicit.ts | 0 .../src/subcommands/signature.ts | 0 .../{ => wallet}/primitives-cli/src/utils.ts | 0 .../{ => wallet}/primitives-cli/tsconfig.json | 0 .../{ => wallet}/primitives/eslint.config.mjs | 0 packages/{ => wallet}/primitives/package.json | 0 .../{ => wallet}/primitives/src/address.ts | 0 .../primitives/src/attestation.ts | 0 .../{ => wallet}/primitives/src/config.ts | 0 .../{ => wallet}/primitives/src/constants.ts | 0 .../{ => wallet}/primitives/src/context.ts | 0 .../{ => wallet}/primitives/src/erc-6492.ts | 0 .../primitives/src/extensions/index.ts | 0 .../primitives/src/extensions/passkeys.ts | 0 .../primitives/src/extensions/recovery.ts | 0 .../primitives/src/generic-tree.ts | 0 packages/{ => wallet}/primitives/src/index.ts | 0 .../{ => wallet}/primitives/src/network.ts | 0 .../{ => wallet}/primitives/src/payload.ts | 0 .../{ => wallet}/primitives/src/permission.ts | 0 .../primitives/src/session-config.ts | 0 .../primitives/src/session-signature.ts | 0 .../{ => wallet}/primitives/src/signature.ts | 0 packages/{ => wallet}/primitives/src/utils.ts | 0 .../{ => wallet}/primitives/tsconfig.json | 0 packages/{ => wallet}/wdk/.env.test | 0 packages/{ => wallet}/wdk/jest.config.ts | 0 packages/{ => wallet}/wdk/package.json | 0 .../wdk/src/dbs/auth-commitments.ts | 0 packages/{ => wallet}/wdk/src/dbs/generic.ts | 0 packages/{ => wallet}/wdk/src/dbs/index.ts | 0 .../{ => wallet}/wdk/src/dbs/signatures.ts | 0 .../{ => wallet}/wdk/src/dbs/transactions.ts | 0 packages/{ => wallet}/wdk/src/dbs/wallets.ts | 0 .../{ => wallet}/wdk/src/identity/authkey.ts | 0 .../wdk/src/identity/challenge.ts | 0 .../{ => wallet}/wdk/src/identity/index.ts | 0 .../identity/nitro/identity-instrument.gen.ts | 0 .../wdk/src/identity/nitro/index.ts | 0 .../wdk/src/identity/secure-store.ts | 0 .../{ => wallet}/wdk/src/identity/signer.ts | 0 .../wdk/src/identity/subtle-crypto.ts | 0 packages/{ => wallet}/wdk/src/identity/wdk.ts | 0 packages/{ => wallet}/wdk/src/index.ts | 0 .../{ => wallet}/wdk/src/sequence/devices.ts | 0 .../src/sequence/handlers/authcode-pkce.ts | 0 .../wdk/src/sequence/handlers/devices.ts | 0 .../wdk/src/sequence/handlers/index.ts | 0 .../wdk/src/sequence/handlers/mnemonic.ts | 0 .../wdk/src/sequence/handlers/otp.ts | 0 .../wdk/src/sequence/handlers/passkeys.ts | 0 .../{ => wallet}/wdk/src/sequence/index.ts | 0 .../{ => wallet}/wdk/src/sequence/logger.ts | 0 .../{ => wallet}/wdk/src/sequence/manager.ts | 0 .../{ => wallet}/wdk/src/sequence/sessions.ts | 0 .../wdk/src/sequence/signatures.ts | 0 .../{ => wallet}/wdk/src/sequence/signers.ts | 0 .../wdk/src/sequence/transactions.ts | 0 .../wdk/src/sequence/types/index.ts | 0 .../src/sequence/types/signatureRequest.ts | 0 .../src/sequence/types/transactionRequest.ts | 0 .../wdk/src/sequence/types/wallet.ts | 0 .../{ => wallet}/wdk/src/sequence/wallets.ts | 0 .../{ => wallet}/wdk/src/session/index.ts | 0 .../wdk/src/session/session-controller.ts | 0 packages/{ => wallet}/wdk/test/constants.ts | 0 packages/{ => wallet}/wdk/tsconfig.json | 0 pnpm-lock.yaml | 218 +- pnpm-workspace.yaml | 3 +- 597 files changed, 144 insertions(+), 152003 deletions(-) delete mode 100644 apps/docs/eslint.config.js delete mode 100644 apps/docs/next.config.js delete mode 100644 apps/docs/tsconfig.json delete mode 100644 apps/web/eslint.config.js delete mode 100644 apps/web/next.config.js delete mode 100644 apps/web/tsconfig.json rename {apps => extras}/demo-wallet/.gitignore (100%) rename {apps => extras}/demo-wallet/README.md (100%) rename {apps => extras}/demo-wallet/app/email-otp/page.tsx (100%) rename {apps => extras}/demo-wallet/app/favicon.ico (100%) rename {apps => extras}/demo-wallet/app/google-legacy/callback/page.tsx (100%) rename {apps => extras}/demo-wallet/app/google-legacy/route.tsx (100%) rename {apps => extras}/demo-wallet/app/google/callback/page.tsx (100%) rename {apps => extras}/demo-wallet/app/google/page.tsx (100%) rename {apps => extras}/demo-wallet/app/handlers/auth-code-pkce.tsx (100%) rename {apps => extras}/demo-wallet/app/handlers/id-token.tsx (100%) rename {apps => extras}/demo-wallet/app/handlers/otp.tsx (100%) rename {apps => extras}/demo-wallet/app/layout.tsx (100%) rename {apps => extras}/demo-wallet/app/lib/attestation.ts (100%) rename {apps => extras}/demo-wallet/app/lib/client-params.ts (100%) rename {apps => extras}/demo-wallet/app/lib/cookies.ts (100%) rename {apps => extras}/demo-wallet/app/lib/session-storage.ts (100%) rename {apps => extras}/demo-wallet/eslint.config.js (100%) rename {apps => extras}/demo-wallet/next.config.js (100%) rename {apps => extras}/demo-wallet/package.json (100%) rename {apps => extras}/demo-wallet/tsconfig.json (100%) rename {apps => extras}/docs/.gitignore (100%) rename {apps => extras}/docs/README.md (100%) rename {apps => extras}/docs/app/favicon.ico (100%) rename {apps => extras}/docs/app/fonts/GeistMonoVF.woff (100%) rename {apps => extras}/docs/app/fonts/GeistVF.woff (100%) rename {apps => extras}/docs/app/globals.css (100%) rename {apps => extras}/docs/app/layout.tsx (100%) rename {apps => extras}/docs/app/page.module.css (100%) rename {apps => extras}/docs/app/page.tsx (100%) create mode 100644 extras/docs/eslint.config.js create mode 100644 extras/docs/next.config.js rename {apps => extras}/docs/package.json (100%) rename {apps => extras}/docs/public/file-text.svg (100%) rename {apps => extras}/docs/public/globe.svg (100%) rename {apps => extras}/docs/public/next.svg (100%) rename {apps => extras}/docs/public/turborepo-dark.svg (100%) rename {apps => extras}/docs/public/turborepo-light.svg (100%) rename {apps => extras}/docs/public/vercel.svg (100%) rename {apps => extras}/docs/public/window.svg (100%) create mode 100644 extras/docs/tsconfig.json rename {apps => extras}/web/.gitignore (100%) rename {apps => extras}/web/README.md (100%) rename {apps => extras}/web/app/favicon.ico (100%) rename {apps => extras}/web/app/fonts/GeistMonoVF.woff (100%) rename {apps => extras}/web/app/fonts/GeistVF.woff (100%) rename {apps => extras}/web/app/globals.css (100%) rename {apps => extras}/web/app/layout.tsx (100%) rename {apps => extras}/web/app/page.module.css (100%) rename {apps => extras}/web/app/page.tsx (100%) create mode 100644 extras/web/eslint.config.js create mode 100644 extras/web/next.config.js rename {apps => extras}/web/package.json (100%) rename {apps => extras}/web/public/file-text.svg (100%) rename {apps => extras}/web/public/globe.svg (100%) rename {apps => extras}/web/public/next.svg (100%) rename {apps => extras}/web/public/turborepo-dark.svg (100%) rename {apps => extras}/web/public/turborepo-light.svg (100%) rename {apps => extras}/web/public/vercel.svg (100%) rename {apps => extras}/web/public/window.svg (100%) create mode 100644 extras/web/tsconfig.json delete mode 100644 old/.changeset/README.md delete mode 100644 old/.changeset/config.json delete mode 100644 old/.eslintignore delete mode 100644 old/.eslintrc.js delete mode 100644 old/.gitignore delete mode 100644 old/.prettierrc delete mode 100644 old/LICENSE delete mode 100644 old/README.md delete mode 100644 old/babel.config.js delete mode 100644 old/package.json delete mode 100644 old/packages/0xsequence/CHANGELOG.md delete mode 100644 old/packages/0xsequence/README.md delete mode 100644 old/packages/0xsequence/hardhat.config.js delete mode 100644 old/packages/0xsequence/hardhat2.config.js delete mode 100644 old/packages/0xsequence/package.json delete mode 100644 old/packages/0xsequence/src/abi.ts delete mode 100644 old/packages/0xsequence/src/account.ts delete mode 100644 old/packages/0xsequence/src/api.ts delete mode 100644 old/packages/0xsequence/src/auth.ts delete mode 100644 old/packages/0xsequence/src/core.ts delete mode 100644 old/packages/0xsequence/src/guard.ts delete mode 100644 old/packages/0xsequence/src/index.ts delete mode 100644 old/packages/0xsequence/src/indexer.ts delete mode 100644 old/packages/0xsequence/src/metadata.ts delete mode 100644 old/packages/0xsequence/src/migration.ts delete mode 100644 old/packages/0xsequence/src/network.ts delete mode 100644 old/packages/0xsequence/src/provider.ts delete mode 100644 old/packages/0xsequence/src/relayer.ts delete mode 100644 old/packages/0xsequence/src/sequence.ts delete mode 100644 old/packages/0xsequence/src/sessions.ts delete mode 100644 old/packages/0xsequence/src/signhub.ts delete mode 100644 old/packages/0xsequence/src/transactions.ts delete mode 100644 old/packages/0xsequence/src/utils.ts delete mode 100644 old/packages/0xsequence/tests/browser/json-rpc-provider/rpc.test.ts delete mode 100644 old/packages/0xsequence/tests/browser/mock-wallet/mock-wallet.test.ts delete mode 100644 old/packages/0xsequence/tests/browser/mux-transport/mux.test.ts delete mode 100644 old/packages/0xsequence/tests/browser/proxy-transport/channel.test.ts delete mode 100644 old/packages/0xsequence/tests/browser/testutils/accounts.ts delete mode 100644 old/packages/0xsequence/tests/browser/testutils/deploy-wallet-context.ts delete mode 100644 old/packages/0xsequence/tests/browser/testutils/index.ts delete mode 100644 old/packages/0xsequence/tests/browser/testutils/wallet.ts delete mode 100644 old/packages/0xsequence/tests/browser/wallet-provider/dapp.test.ts delete mode 100644 old/packages/0xsequence/tests/browser/wallet-provider/dapp2.test.ts delete mode 100644 old/packages/0xsequence/tests/browser/window-transport/dapp.test.ts delete mode 100644 old/packages/0xsequence/tests/json-rpc-provider.spec.ts delete mode 100644 old/packages/0xsequence/tests/mock-wallet.spec.ts delete mode 100644 old/packages/0xsequence/tests/mux-transport.spec.ts delete mode 100644 old/packages/0xsequence/tests/proxy-transport.spec.ts delete mode 100644 old/packages/0xsequence/tests/utils/assert.ts delete mode 100644 old/packages/0xsequence/tests/utils/browser-test-runner.ts delete mode 100644 old/packages/0xsequence/tests/utils/webpack-test-server.ts delete mode 100644 old/packages/0xsequence/tests/wallet-provider.spec.ts delete mode 100644 old/packages/0xsequence/tests/webpack.config.js delete mode 100644 old/packages/0xsequence/tests/window-transport.spec.ts delete mode 100644 old/packages/abi/CHANGELOG.md delete mode 100644 old/packages/abi/README.md delete mode 100644 old/packages/abi/package.json delete mode 100644 old/packages/abi/src/index.ts delete mode 100644 old/packages/abi/src/sale/erc1155Sale.ts delete mode 100644 old/packages/abi/src/sale/erc721Sale.ts delete mode 100644 old/packages/abi/src/saleItems/erc1155SaleItems.ts delete mode 100644 old/packages/abi/src/saleItems/erc721SaleItems.ts delete mode 100644 old/packages/abi/src/tokens/erc1155.ts delete mode 100644 old/packages/abi/src/tokens/erc20.ts delete mode 100644 old/packages/abi/src/tokens/erc6909.ts delete mode 100644 old/packages/abi/src/tokens/erc721.ts delete mode 100644 old/packages/abi/src/wallet/erc1271.ts delete mode 100644 old/packages/abi/src/wallet/erc5719.ts delete mode 100644 old/packages/abi/src/wallet/erc6492.ts delete mode 100644 old/packages/abi/src/wallet/factory.ts delete mode 100644 old/packages/abi/src/wallet/index.ts delete mode 100644 old/packages/abi/src/wallet/libs/requireFreshSigners.ts delete mode 100644 old/packages/abi/src/wallet/mainModule.ts delete mode 100644 old/packages/abi/src/wallet/mainModuleUpgradable.ts delete mode 100644 old/packages/abi/src/wallet/moduleHooks.ts delete mode 100644 old/packages/abi/src/wallet/sequenceUtils.ts delete mode 100644 old/packages/abi/src/wallet/walletProxyHook.ts delete mode 100644 old/packages/account/CHANGELOG.md delete mode 100644 old/packages/account/hardhat.config.js delete mode 100644 old/packages/account/hardhat2.config.js delete mode 100644 old/packages/account/package.json delete mode 100644 old/packages/account/src/account.ts delete mode 100644 old/packages/account/src/index.ts delete mode 100644 old/packages/account/src/orchestrator/wrapper.ts delete mode 100644 old/packages/account/src/signer.ts delete mode 100644 old/packages/account/tests/account.spec.ts delete mode 100644 old/packages/account/tests/signer.spec.ts delete mode 100644 old/packages/api/CHANGELOG.md delete mode 100644 old/packages/api/README.md delete mode 100644 old/packages/api/package.json delete mode 100644 old/packages/api/src/api.gen.ts delete mode 100644 old/packages/api/src/index.ts delete mode 100644 old/packages/auth/CHANGELOG.md delete mode 100644 old/packages/auth/README.md delete mode 100644 old/packages/auth/hardhat.config.js delete mode 100644 old/packages/auth/package.json delete mode 100644 old/packages/auth/src/authorization.ts delete mode 100644 old/packages/auth/src/index.ts delete mode 100644 old/packages/auth/src/proof.ts delete mode 100644 old/packages/auth/src/services.ts delete mode 100644 old/packages/auth/src/session.ts delete mode 100644 old/packages/auth/tests/session.spec.ts delete mode 100644 old/packages/auth/tests/utils/index.ts delete mode 100644 old/packages/builder/CHANGELOG.md delete mode 100644 old/packages/builder/README.md delete mode 100644 old/packages/builder/package.json delete mode 100644 old/packages/builder/src/builder.gen.ts delete mode 100644 old/packages/builder/src/index.ts delete mode 100644 old/packages/core/CHANGELOG.md delete mode 100644 old/packages/core/package.json delete mode 100644 old/packages/core/src/commons/config.ts delete mode 100644 old/packages/core/src/commons/context.ts delete mode 100644 old/packages/core/src/commons/index.ts delete mode 100644 old/packages/core/src/commons/orchestrator.ts delete mode 100644 old/packages/core/src/commons/reader.ts delete mode 100644 old/packages/core/src/commons/signature.ts delete mode 100644 old/packages/core/src/commons/signer.ts delete mode 100644 old/packages/core/src/commons/transaction.ts delete mode 100644 old/packages/core/src/commons/validateEIP1271.ts delete mode 100644 old/packages/core/src/commons/validateEIP6492.ts delete mode 100644 old/packages/core/src/index.ts delete mode 100644 old/packages/core/src/universal/index.ts delete mode 100644 old/packages/core/src/v1/config.ts delete mode 100644 old/packages/core/src/v1/context.ts delete mode 100644 old/packages/core/src/v1/index.ts delete mode 100644 old/packages/core/src/v1/signature.ts delete mode 100644 old/packages/core/src/v2/chained.ts delete mode 100644 old/packages/core/src/v2/config.ts delete mode 100644 old/packages/core/src/v2/context.ts delete mode 100644 old/packages/core/src/v2/index.ts delete mode 100644 old/packages/core/src/v2/signature.ts delete mode 100644 old/packages/core/src/version.ts delete mode 100644 old/packages/core/tests/v2/config.spec.ts delete mode 100644 old/packages/core/tests/v2/signature.spec.ts delete mode 100644 old/packages/deployer/.gitignore delete mode 100644 old/packages/deployer/CHANGELOG.md delete mode 100644 old/packages/deployer/README.md delete mode 100644 old/packages/deployer/artifacts/contracts/NanoUniversalDeployer.sol/NanoUniversalDeployer.json delete mode 100644 old/packages/deployer/artifacts/contracts/UniversalDeployer2.sol/UniversalDeployer2.json delete mode 100644 old/packages/deployer/config/PROD.env.sample delete mode 100644 old/packages/deployer/contracts/NanoUniversalDeployer.sol delete mode 100644 old/packages/deployer/contracts/UniversalDeployer2.sol delete mode 100644 old/packages/deployer/hardhat.config.ts delete mode 100644 old/packages/deployer/package.json delete mode 100644 old/packages/deployer/src/UniversalDeployer.ts delete mode 100644 old/packages/deployer/src/constants.ts delete mode 100644 old/packages/deployer/src/index.ts delete mode 100644 old/packages/deployer/src/types.ts delete mode 100644 old/packages/deployer/src/typings/contracts/NanoUniversalDeployer.ts delete mode 100644 old/packages/deployer/src/typings/contracts/UniversalDeployer2.ts delete mode 100644 old/packages/deployer/src/typings/contracts/common.ts delete mode 100644 old/packages/deployer/src/typings/contracts/factories/NanoUniversalDeployer__factory.ts delete mode 100644 old/packages/deployer/src/typings/contracts/factories/UniversalDeployer2__factory.ts delete mode 100644 old/packages/deployer/src/typings/contracts/factories/index.ts delete mode 100644 old/packages/deployer/src/typings/contracts/index.ts delete mode 100644 old/packages/deployer/src/utils/configLoader.ts delete mode 100644 old/packages/deployer/src/utils/logger.ts delete mode 100644 old/packages/deployer/tests/mock.spec.ts delete mode 100644 old/packages/guard/CHANGELOG.md delete mode 100644 old/packages/guard/README.md delete mode 100644 old/packages/guard/package.json delete mode 100644 old/packages/guard/src/guard.gen.ts delete mode 100644 old/packages/guard/src/index.ts delete mode 100644 old/packages/guard/src/signer.ts delete mode 100644 old/packages/indexer/CHANGELOG.md delete mode 100644 old/packages/indexer/README.md delete mode 100644 old/packages/indexer/package.json delete mode 100644 old/packages/indexer/src/index.ts delete mode 100644 old/packages/indexer/src/indexer.gen.ts delete mode 100644 old/packages/indexer/src/indexergw.gen.ts delete mode 100644 old/packages/marketplace/CHANGELOG.md delete mode 100644 old/packages/marketplace/README.md delete mode 100644 old/packages/marketplace/package.json delete mode 100644 old/packages/marketplace/src/index.ts delete mode 100644 old/packages/marketplace/src/marketplace.gen.ts delete mode 100644 old/packages/metadata/CHANGELOG.md delete mode 100644 old/packages/metadata/README.md delete mode 100644 old/packages/metadata/package.json delete mode 100644 old/packages/metadata/src/index.ts delete mode 100644 old/packages/metadata/src/metadata.gen.ts delete mode 100644 old/packages/migration/CHANGELOG.md delete mode 100644 old/packages/migration/package.json delete mode 100644 old/packages/migration/src/defaults.ts delete mode 100644 old/packages/migration/src/index.ts delete mode 100644 old/packages/migration/src/migrations/index.ts delete mode 100644 old/packages/migration/src/migrations/migration_01_02.ts delete mode 100644 old/packages/migration/src/migrator.ts delete mode 100644 old/packages/migration/src/version.ts delete mode 100644 old/packages/network/CHANGELOG.md delete mode 100644 old/packages/network/README.md delete mode 100644 old/packages/network/constants/package.json delete mode 100644 old/packages/network/networkNames.md delete mode 100644 old/packages/network/networkNames.template.md delete mode 100644 old/packages/network/package.json delete mode 100644 old/packages/network/src/config.ts delete mode 100644 old/packages/network/src/constants.ts delete mode 100644 old/packages/network/src/index.ts delete mode 100644 old/packages/network/src/json-rpc-provider.ts delete mode 100644 old/packages/network/src/json-rpc/handler.ts delete mode 100644 old/packages/network/src/json-rpc/index.ts delete mode 100644 old/packages/network/src/json-rpc/middleware/allow-provider.ts delete mode 100644 old/packages/network/src/json-rpc/middleware/cached-provider.ts delete mode 100644 old/packages/network/src/json-rpc/middleware/eager-provider.ts delete mode 100644 old/packages/network/src/json-rpc/middleware/exception-provider.ts delete mode 100644 old/packages/network/src/json-rpc/middleware/index.ts delete mode 100644 old/packages/network/src/json-rpc/middleware/logging-provider.ts delete mode 100644 old/packages/network/src/json-rpc/middleware/network-provider.ts delete mode 100644 old/packages/network/src/json-rpc/middleware/public-provider.ts delete mode 100644 old/packages/network/src/json-rpc/middleware/signing-provider.ts delete mode 100644 old/packages/network/src/json-rpc/middleware/singleflight.ts delete mode 100644 old/packages/network/src/json-rpc/router.ts delete mode 100644 old/packages/network/src/json-rpc/types.ts delete mode 100644 old/packages/network/src/json-rpc/utils.ts delete mode 100644 old/packages/network/src/utils.ts delete mode 100644 old/packages/provider/CHANGELOG.md delete mode 100644 old/packages/provider/README.md delete mode 100644 old/packages/provider/hardhat1.config.cts delete mode 100644 old/packages/provider/hardhat1.config.js delete mode 100644 old/packages/provider/hardhat2.config.cts delete mode 100644 old/packages/provider/hardhat2.config.js delete mode 100644 old/packages/provider/package.json delete mode 100644 old/packages/provider/src/analytics.ts delete mode 100644 old/packages/provider/src/client.ts delete mode 100644 old/packages/provider/src/eip191exceptions.ts delete mode 100644 old/packages/provider/src/extended.ts delete mode 100644 old/packages/provider/src/index.ts delete mode 100644 old/packages/provider/src/init.ts delete mode 100644 old/packages/provider/src/provider.ts delete mode 100644 old/packages/provider/src/signer.ts delete mode 100644 old/packages/provider/src/transactions.ts delete mode 100644 old/packages/provider/src/transports/base-provider-transport.ts delete mode 100644 old/packages/provider/src/transports/base-wallet-transport.ts delete mode 100644 old/packages/provider/src/transports/extension-transport/base-injected-transport.ts delete mode 100644 old/packages/provider/src/transports/extension-transport/extension-message-handler.ts delete mode 100644 old/packages/provider/src/transports/extension-transport/extension-message-provider.ts delete mode 100644 old/packages/provider/src/transports/extension-transport/index.ts delete mode 100644 old/packages/provider/src/transports/index.ts delete mode 100644 old/packages/provider/src/transports/mux-transport/index.ts delete mode 100644 old/packages/provider/src/transports/mux-transport/mux-message-provider.ts delete mode 100644 old/packages/provider/src/transports/proxy-transport/index.ts delete mode 100644 old/packages/provider/src/transports/proxy-transport/proxy-message-channel.ts delete mode 100644 old/packages/provider/src/transports/proxy-transport/proxy-message-handler.ts delete mode 100644 old/packages/provider/src/transports/proxy-transport/proxy-message-provider.ts delete mode 100644 old/packages/provider/src/transports/unreal-transport/index.ts delete mode 100644 old/packages/provider/src/transports/unreal-transport/overridelogs.ts delete mode 100644 old/packages/provider/src/transports/unreal-transport/unreal-message-handler.ts delete mode 100644 old/packages/provider/src/transports/unreal-transport/unreal-message-provider.ts delete mode 100644 old/packages/provider/src/transports/wallet-request-handler.ts delete mode 100644 old/packages/provider/src/transports/window-transport/index.ts delete mode 100644 old/packages/provider/src/transports/window-transport/window-message-handler.ts delete mode 100644 old/packages/provider/src/transports/window-transport/window-message-provider.ts delete mode 100644 old/packages/provider/src/types.ts delete mode 100644 old/packages/provider/src/utils.ts delete mode 100644 old/packages/provider/src/utils/index.ts delete mode 100644 old/packages/provider/tests/client.spec.ts delete mode 100644 old/packages/provider/tests/eip191prefix.spec.ts delete mode 100644 old/packages/provider/tests/messages.ts delete mode 100644 old/packages/provider/tests/provider.spec.ts delete mode 100644 old/packages/provider/tests/remove-eip191prefix.spec.ts delete mode 100644 old/packages/provider/tests/signer.spec.ts delete mode 100644 old/packages/provider/tests/transactions.spec.ts delete mode 100644 old/packages/provider/tests/zeroxv3.spec.ts delete mode 100644 old/packages/react-native/CHANGELOG.md delete mode 100644 old/packages/react-native/package.json delete mode 100644 old/packages/react-native/src/index.ts delete mode 100644 old/packages/react-native/src/keychain-store.ts delete mode 100644 old/packages/relayer/CHANGELOG.md delete mode 100644 old/packages/relayer/README.md delete mode 100644 old/packages/relayer/hardhat.config.js delete mode 100644 old/packages/relayer/package.json delete mode 100644 old/packages/relayer/src/index.ts delete mode 100644 old/packages/relayer/src/local-relayer.ts delete mode 100644 old/packages/relayer/src/provider-relayer.ts delete mode 100644 old/packages/relayer/src/rpc-relayer/index.ts delete mode 100644 old/packages/relayer/src/rpc-relayer/relayer.gen.ts delete mode 100644 old/packages/relayer/tests/provider-relayer.spec.ts delete mode 100644 old/packages/replacer/CHANGELOG.md delete mode 100644 old/packages/replacer/package.json delete mode 100644 old/packages/replacer/src/cached.ts delete mode 100644 old/packages/replacer/src/index.ts delete mode 100644 old/packages/replacer/src/ipfs.ts delete mode 100644 old/packages/sessions/CHANGELOG.md delete mode 100644 old/packages/sessions/hardhat.config.js delete mode 100644 old/packages/sessions/package.json delete mode 100644 old/packages/sessions/src/index.ts delete mode 100644 old/packages/sessions/src/tracker.ts delete mode 100644 old/packages/sessions/src/trackers/arweave.ts delete mode 100644 old/packages/sessions/src/trackers/cached.ts delete mode 100644 old/packages/sessions/src/trackers/debug.ts delete mode 100644 old/packages/sessions/src/trackers/deduped.ts delete mode 100644 old/packages/sessions/src/trackers/index.ts delete mode 100644 old/packages/sessions/src/trackers/local.ts delete mode 100644 old/packages/sessions/src/trackers/multiple.ts delete mode 100644 old/packages/sessions/src/trackers/promise-cache.ts delete mode 100644 old/packages/sessions/src/trackers/remote/index.ts delete mode 100644 old/packages/sessions/src/trackers/remote/sessions.gen.ts delete mode 100644 old/packages/sessions/src/trackers/stores/index.ts delete mode 100644 old/packages/sessions/src/trackers/stores/indexedDBStore.ts delete mode 100644 old/packages/sessions/src/trackers/stores/memoryStore.ts delete mode 100644 old/packages/sessions/tests/arweave.spec.ts delete mode 100644 old/packages/sessions/tests/local.spec.ts delete mode 100644 old/packages/signhub/CHANGELOG.md delete mode 100644 old/packages/signhub/package.json delete mode 100644 old/packages/signhub/src/index.ts delete mode 100644 old/packages/signhub/src/orchestrator.ts delete mode 100644 old/packages/signhub/src/signers/index.ts delete mode 100644 old/packages/signhub/src/signers/signer.ts delete mode 100644 old/packages/signhub/src/signers/wrapper.ts delete mode 100644 old/packages/signhub/tests/orchestrator.spec.ts delete mode 100644 old/packages/tests/CHANGELOG.md delete mode 100644 old/packages/tests/package.json delete mode 100644 old/packages/tests/src/builds/artifact.ts delete mode 100644 old/packages/tests/src/builds/index.ts delete mode 100644 old/packages/tests/src/builds/v1/artifacts/Factory.ts delete mode 100644 old/packages/tests/src/builds/v1/artifacts/GuestModule.ts delete mode 100644 old/packages/tests/src/builds/v1/artifacts/MainModule.ts delete mode 100644 old/packages/tests/src/builds/v1/artifacts/MainModuleUpgradable.ts delete mode 100644 old/packages/tests/src/builds/v1/artifacts/MultiCallUtils.ts delete mode 100644 old/packages/tests/src/builds/v1/artifacts/SequenceUtils.ts delete mode 100644 old/packages/tests/src/builds/v1/index.ts delete mode 100644 old/packages/tests/src/builds/v2/artifacts/Factory.ts delete mode 100644 old/packages/tests/src/builds/v2/artifacts/GuestModule.ts delete mode 100644 old/packages/tests/src/builds/v2/artifacts/MainModule.ts delete mode 100644 old/packages/tests/src/builds/v2/artifacts/MainModuleUpgradable.ts delete mode 100644 old/packages/tests/src/builds/v2/artifacts/UniversalSigValidator.ts delete mode 100644 old/packages/tests/src/builds/v2/index.ts delete mode 100644 old/packages/tests/src/configs/index.ts delete mode 100644 old/packages/tests/src/configs/random.ts delete mode 100644 old/packages/tests/src/context/index.ts delete mode 100644 old/packages/tests/src/context/v1.ts delete mode 100644 old/packages/tests/src/context/v2.ts delete mode 100644 old/packages/tests/src/index.ts delete mode 100644 old/packages/tests/src/networks.ts delete mode 100644 old/packages/tests/src/singletonFactory.ts delete mode 100644 old/packages/tests/src/tokens/erc20.ts delete mode 100644 old/packages/tests/src/utils.ts delete mode 100644 old/packages/utils/CHANGELOG.md delete mode 100644 old/packages/utils/README.md delete mode 100644 old/packages/utils/package.json delete mode 100644 old/packages/utils/src/access-key.ts delete mode 100644 old/packages/utils/src/base64.ts delete mode 100644 old/packages/utils/src/bigint.ts delete mode 100644 old/packages/utils/src/digest.ts delete mode 100644 old/packages/utils/src/index.ts delete mode 100644 old/packages/utils/src/is-node-or-browser.ts delete mode 100644 old/packages/utils/src/jwt-decode.ts delete mode 100644 old/packages/utils/src/logger.ts delete mode 100644 old/packages/utils/src/merkle.ts delete mode 100644 old/packages/utils/src/merkletree/Base.ts delete mode 100644 old/packages/utils/src/merkletree/MerkleTree.ts delete mode 100644 old/packages/utils/src/merkletree/README.md delete mode 100644 old/packages/utils/src/merkletree/index.ts delete mode 100644 old/packages/utils/src/network.ts delete mode 100644 old/packages/utils/src/promise-cache.ts delete mode 100644 old/packages/utils/src/promisify.ts delete mode 100644 old/packages/utils/src/query-string.ts delete mode 100644 old/packages/utils/src/rand.ts delete mode 100644 old/packages/utils/src/sanitize.ts delete mode 100644 old/packages/utils/src/sleep.ts delete mode 100644 old/packages/utils/src/typed-data.ts delete mode 100644 old/packages/utils/src/types.ts delete mode 100644 old/packages/utils/src/web.ts delete mode 100644 old/packages/utils/tests/access-key.spec.ts delete mode 100644 old/packages/utils/tests/base64.spec.ts delete mode 100644 old/packages/utils/tests/bigint.spec.ts delete mode 100644 old/packages/utils/tests/jwt-decode.spec.ts delete mode 100644 old/packages/utils/tests/merkle.spec.ts delete mode 100644 old/packages/utils/tests/query-string.spec.ts delete mode 100644 old/packages/utils/tests/sanitize.spec.ts delete mode 100644 old/packages/waas-ethers/CHANGELOG.md delete mode 100644 old/packages/waas-ethers/README.md delete mode 100644 old/packages/waas-ethers/package.json delete mode 100644 old/packages/waas-ethers/src/index.ts delete mode 100644 old/packages/waas-ethers/src/signer.ts delete mode 100644 old/packages/waas/CHANGELOG.md delete mode 100644 old/packages/waas/README.md delete mode 100644 old/packages/waas/package.json delete mode 100644 old/packages/waas/src/auth.ts delete mode 100644 old/packages/waas/src/base.ts delete mode 100644 old/packages/waas/src/challenge.ts delete mode 100644 old/packages/waas/src/clients/authenticator.gen.ts delete mode 100644 old/packages/waas/src/clients/intent.gen.ts delete mode 100644 old/packages/waas/src/email.ts delete mode 100644 old/packages/waas/src/errors.ts delete mode 100644 old/packages/waas/src/index.ts delete mode 100644 old/packages/waas/src/intents/accounts.ts delete mode 100644 old/packages/waas/src/intents/base.ts delete mode 100644 old/packages/waas/src/intents/index.ts delete mode 100644 old/packages/waas/src/intents/messages.ts delete mode 100644 old/packages/waas/src/intents/responses.ts delete mode 100644 old/packages/waas/src/intents/session.ts delete mode 100644 old/packages/waas/src/intents/transactions.ts delete mode 100644 old/packages/waas/src/intents/utils.ts delete mode 100644 old/packages/waas/src/networks.ts delete mode 100644 old/packages/waas/src/secure-store.ts delete mode 100644 old/packages/waas/src/session/index.ts delete mode 100644 old/packages/waas/src/session/keyTypes.ts delete mode 100644 old/packages/waas/src/session/secp256k1.ts delete mode 100644 old/packages/waas/src/session/secp256r1.ts delete mode 100644 old/packages/waas/src/store.ts delete mode 100644 old/packages/waas/src/subtle-crypto.ts delete mode 100644 old/packages/waas/tests/intents.spec.ts delete mode 100644 old/packages/wallet/CHANGELOG.md delete mode 100644 old/packages/wallet/README.md delete mode 100644 old/packages/wallet/hardhat.config.js delete mode 100644 old/packages/wallet/hardhat2.config.js delete mode 100644 old/packages/wallet/package.json delete mode 100644 old/packages/wallet/src/index.ts delete mode 100644 old/packages/wallet/src/orchestrator/wrapper.ts delete mode 100644 old/packages/wallet/src/signer.ts delete mode 100644 old/packages/wallet/src/utils.ts delete mode 100644 old/packages/wallet/src/wallet.ts delete mode 100644 old/packages/wallet/tests/utils/deploy-wallet-context.ts delete mode 100644 old/packages/wallet/tests/utils/get-contract.ts delete mode 100644 old/packages/wallet/tests/utils/index.ts delete mode 100644 old/packages/wallet/tests/wallet.spec.ts delete mode 100644 old/pnpm-lock.yaml delete mode 100644 old/pnpm-workspace.yaml delete mode 100644 old/scripts/fix-mocha-ref.js delete mode 100755 old/scripts/pnpm-link.sh delete mode 100644 old/scripts/update-network-names-doc.ts delete mode 100644 old/scripts/update-version.js delete mode 100644 old/tsconfig.json delete mode 100644 old/tsconfig.test.json rename packages/{ => wallet}/core/.env.test (100%) rename packages/{ => wallet}/core/jest.config.ts (100%) rename packages/{ => wallet}/core/package.json (100%) rename packages/{ => wallet}/core/src/envelope.ts (100%) rename packages/{ => wallet}/core/src/index.ts (100%) rename packages/{ => wallet}/core/src/relayer/index.ts (100%) rename packages/{ => wallet}/core/src/relayer/local.ts (100%) rename packages/{ => wallet}/core/src/relayer/relayer.ts (100%) rename packages/{ => wallet}/core/src/signers/index.ts (100%) rename packages/{ => wallet}/core/src/signers/passkey.ts (100%) rename packages/{ => wallet}/core/src/signers/pk/encrypted.ts (100%) rename packages/{ => wallet}/core/src/signers/pk/index.ts (100%) rename packages/{ => wallet}/core/src/signers/session-manager.ts (100%) rename packages/{ => wallet}/core/src/signers/session/explicit.ts (100%) rename packages/{ => wallet}/core/src/signers/session/implicit.ts (100%) rename packages/{ => wallet}/core/src/signers/session/index.ts (100%) rename packages/{ => wallet}/core/src/signers/session/session.ts (100%) rename packages/{ => wallet}/core/src/state/index.ts (100%) rename packages/{ => wallet}/core/src/state/local/index.ts (100%) rename packages/{ => wallet}/core/src/state/local/indexed-db.ts (100%) rename packages/{ => wallet}/core/src/state/local/memory.ts (100%) rename packages/{ => wallet}/core/src/state/utils.ts (100%) rename packages/{ => wallet}/core/src/wallet.ts (100%) rename packages/{ => wallet}/core/test/constants.ts (100%) rename packages/{ => wallet}/core/test/session-manager.test.ts (100%) rename packages/{ => wallet}/core/tsconfig.json (100%) rename packages/{ => wallet}/primitives-cli/eslint.config.mjs (100%) rename packages/{ => wallet}/primitives-cli/package.json (100%) rename packages/{ => wallet}/primitives-cli/src/index.ts (100%) rename packages/{ => wallet}/primitives-cli/src/subcommands/address.ts (100%) rename packages/{ => wallet}/primitives-cli/src/subcommands/config.ts (100%) rename packages/{ => wallet}/primitives-cli/src/subcommands/devTools.ts (100%) rename packages/{ => wallet}/primitives-cli/src/subcommands/passkeys.ts (100%) rename packages/{ => wallet}/primitives-cli/src/subcommands/payload.ts (100%) rename packages/{ => wallet}/primitives-cli/src/subcommands/recovery.ts (100%) rename packages/{ => wallet}/primitives-cli/src/subcommands/server.ts (100%) rename packages/{ => wallet}/primitives-cli/src/subcommands/session.ts (100%) rename packages/{ => wallet}/primitives-cli/src/subcommands/sessionExplicit.ts (100%) rename packages/{ => wallet}/primitives-cli/src/subcommands/sessionImplicit.ts (100%) rename packages/{ => wallet}/primitives-cli/src/subcommands/signature.ts (100%) rename packages/{ => wallet}/primitives-cli/src/utils.ts (100%) rename packages/{ => wallet}/primitives-cli/tsconfig.json (100%) rename packages/{ => wallet}/primitives/eslint.config.mjs (100%) rename packages/{ => wallet}/primitives/package.json (100%) rename packages/{ => wallet}/primitives/src/address.ts (100%) rename packages/{ => wallet}/primitives/src/attestation.ts (100%) rename packages/{ => wallet}/primitives/src/config.ts (100%) rename packages/{ => wallet}/primitives/src/constants.ts (100%) rename packages/{ => wallet}/primitives/src/context.ts (100%) rename packages/{ => wallet}/primitives/src/erc-6492.ts (100%) rename packages/{ => wallet}/primitives/src/extensions/index.ts (100%) rename packages/{ => wallet}/primitives/src/extensions/passkeys.ts (100%) rename packages/{ => wallet}/primitives/src/extensions/recovery.ts (100%) rename packages/{ => wallet}/primitives/src/generic-tree.ts (100%) rename packages/{ => wallet}/primitives/src/index.ts (100%) rename packages/{ => wallet}/primitives/src/network.ts (100%) rename packages/{ => wallet}/primitives/src/payload.ts (100%) rename packages/{ => wallet}/primitives/src/permission.ts (100%) rename packages/{ => wallet}/primitives/src/session-config.ts (100%) rename packages/{ => wallet}/primitives/src/session-signature.ts (100%) rename packages/{ => wallet}/primitives/src/signature.ts (100%) rename packages/{ => wallet}/primitives/src/utils.ts (100%) rename packages/{ => wallet}/primitives/tsconfig.json (100%) rename packages/{ => wallet}/wdk/.env.test (100%) rename packages/{ => wallet}/wdk/jest.config.ts (100%) rename packages/{ => wallet}/wdk/package.json (100%) rename packages/{ => wallet}/wdk/src/dbs/auth-commitments.ts (100%) rename packages/{ => wallet}/wdk/src/dbs/generic.ts (100%) rename packages/{ => wallet}/wdk/src/dbs/index.ts (100%) rename packages/{ => wallet}/wdk/src/dbs/signatures.ts (100%) rename packages/{ => wallet}/wdk/src/dbs/transactions.ts (100%) rename packages/{ => wallet}/wdk/src/dbs/wallets.ts (100%) rename packages/{ => wallet}/wdk/src/identity/authkey.ts (100%) rename packages/{ => wallet}/wdk/src/identity/challenge.ts (100%) rename packages/{ => wallet}/wdk/src/identity/index.ts (100%) rename packages/{ => wallet}/wdk/src/identity/nitro/identity-instrument.gen.ts (100%) rename packages/{ => wallet}/wdk/src/identity/nitro/index.ts (100%) rename packages/{ => wallet}/wdk/src/identity/secure-store.ts (100%) rename packages/{ => wallet}/wdk/src/identity/signer.ts (100%) rename packages/{ => wallet}/wdk/src/identity/subtle-crypto.ts (100%) rename packages/{ => wallet}/wdk/src/identity/wdk.ts (100%) rename packages/{ => wallet}/wdk/src/index.ts (100%) rename packages/{ => wallet}/wdk/src/sequence/devices.ts (100%) rename packages/{ => wallet}/wdk/src/sequence/handlers/authcode-pkce.ts (100%) rename packages/{ => wallet}/wdk/src/sequence/handlers/devices.ts (100%) rename packages/{ => wallet}/wdk/src/sequence/handlers/index.ts (100%) rename packages/{ => wallet}/wdk/src/sequence/handlers/mnemonic.ts (100%) rename packages/{ => wallet}/wdk/src/sequence/handlers/otp.ts (100%) rename packages/{ => wallet}/wdk/src/sequence/handlers/passkeys.ts (100%) rename packages/{ => wallet}/wdk/src/sequence/index.ts (100%) rename packages/{ => wallet}/wdk/src/sequence/logger.ts (100%) rename packages/{ => wallet}/wdk/src/sequence/manager.ts (100%) rename packages/{ => wallet}/wdk/src/sequence/sessions.ts (100%) rename packages/{ => wallet}/wdk/src/sequence/signatures.ts (100%) rename packages/{ => wallet}/wdk/src/sequence/signers.ts (100%) rename packages/{ => wallet}/wdk/src/sequence/transactions.ts (100%) rename packages/{ => wallet}/wdk/src/sequence/types/index.ts (100%) rename packages/{ => wallet}/wdk/src/sequence/types/signatureRequest.ts (100%) rename packages/{ => wallet}/wdk/src/sequence/types/transactionRequest.ts (100%) rename packages/{ => wallet}/wdk/src/sequence/types/wallet.ts (100%) rename packages/{ => wallet}/wdk/src/sequence/wallets.ts (100%) rename packages/{ => wallet}/wdk/src/session/index.ts (100%) rename packages/{ => wallet}/wdk/src/session/session-controller.ts (100%) rename packages/{ => wallet}/wdk/test/constants.ts (100%) rename packages/{ => wallet}/wdk/tsconfig.json (100%) diff --git a/apps/docs/eslint.config.js b/apps/docs/eslint.config.js deleted file mode 100644 index e8759ff50..000000000 --- a/apps/docs/eslint.config.js +++ /dev/null @@ -1,4 +0,0 @@ -import { nextJsConfig } from "@repo/eslint-config/next-js"; - -/** @type {import("eslint").Linter.Config} */ -export default nextJsConfig; diff --git a/apps/docs/next.config.js b/apps/docs/next.config.js deleted file mode 100644 index 4678774e6..000000000 --- a/apps/docs/next.config.js +++ /dev/null @@ -1,4 +0,0 @@ -/** @type {import('next').NextConfig} */ -const nextConfig = {}; - -export default nextConfig; diff --git a/apps/docs/tsconfig.json b/apps/docs/tsconfig.json deleted file mode 100644 index 7aef05698..000000000 --- a/apps/docs/tsconfig.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "extends": "@repo/typescript-config/nextjs.json", - "compilerOptions": { - "plugins": [ - { - "name": "next" - } - ] - }, - "include": [ - "**/*.ts", - "**/*.tsx", - "next-env.d.ts", - "next.config.js", - ".next/types/**/*.ts" - ], - "exclude": [ - "node_modules" - ] -} diff --git a/apps/web/eslint.config.js b/apps/web/eslint.config.js deleted file mode 100644 index e8759ff50..000000000 --- a/apps/web/eslint.config.js +++ /dev/null @@ -1,4 +0,0 @@ -import { nextJsConfig } from "@repo/eslint-config/next-js"; - -/** @type {import("eslint").Linter.Config} */ -export default nextJsConfig; diff --git a/apps/web/next.config.js b/apps/web/next.config.js deleted file mode 100644 index 4678774e6..000000000 --- a/apps/web/next.config.js +++ /dev/null @@ -1,4 +0,0 @@ -/** @type {import('next').NextConfig} */ -const nextConfig = {}; - -export default nextConfig; diff --git a/apps/web/tsconfig.json b/apps/web/tsconfig.json deleted file mode 100644 index 7aef05698..000000000 --- a/apps/web/tsconfig.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "extends": "@repo/typescript-config/nextjs.json", - "compilerOptions": { - "plugins": [ - { - "name": "next" - } - ] - }, - "include": [ - "**/*.ts", - "**/*.tsx", - "next-env.d.ts", - "next.config.js", - ".next/types/**/*.ts" - ], - "exclude": [ - "node_modules" - ] -} diff --git a/apps/demo-wallet/.gitignore b/extras/demo-wallet/.gitignore similarity index 100% rename from apps/demo-wallet/.gitignore rename to extras/demo-wallet/.gitignore diff --git a/apps/demo-wallet/README.md b/extras/demo-wallet/README.md similarity index 100% rename from apps/demo-wallet/README.md rename to extras/demo-wallet/README.md diff --git a/apps/demo-wallet/app/email-otp/page.tsx b/extras/demo-wallet/app/email-otp/page.tsx similarity index 100% rename from apps/demo-wallet/app/email-otp/page.tsx rename to extras/demo-wallet/app/email-otp/page.tsx diff --git a/apps/demo-wallet/app/favicon.ico b/extras/demo-wallet/app/favicon.ico similarity index 100% rename from apps/demo-wallet/app/favicon.ico rename to extras/demo-wallet/app/favicon.ico diff --git a/apps/demo-wallet/app/google-legacy/callback/page.tsx b/extras/demo-wallet/app/google-legacy/callback/page.tsx similarity index 100% rename from apps/demo-wallet/app/google-legacy/callback/page.tsx rename to extras/demo-wallet/app/google-legacy/callback/page.tsx diff --git a/apps/demo-wallet/app/google-legacy/route.tsx b/extras/demo-wallet/app/google-legacy/route.tsx similarity index 100% rename from apps/demo-wallet/app/google-legacy/route.tsx rename to extras/demo-wallet/app/google-legacy/route.tsx diff --git a/apps/demo-wallet/app/google/callback/page.tsx b/extras/demo-wallet/app/google/callback/page.tsx similarity index 100% rename from apps/demo-wallet/app/google/callback/page.tsx rename to extras/demo-wallet/app/google/callback/page.tsx diff --git a/apps/demo-wallet/app/google/page.tsx b/extras/demo-wallet/app/google/page.tsx similarity index 100% rename from apps/demo-wallet/app/google/page.tsx rename to extras/demo-wallet/app/google/page.tsx diff --git a/apps/demo-wallet/app/handlers/auth-code-pkce.tsx b/extras/demo-wallet/app/handlers/auth-code-pkce.tsx similarity index 100% rename from apps/demo-wallet/app/handlers/auth-code-pkce.tsx rename to extras/demo-wallet/app/handlers/auth-code-pkce.tsx diff --git a/apps/demo-wallet/app/handlers/id-token.tsx b/extras/demo-wallet/app/handlers/id-token.tsx similarity index 100% rename from apps/demo-wallet/app/handlers/id-token.tsx rename to extras/demo-wallet/app/handlers/id-token.tsx diff --git a/apps/demo-wallet/app/handlers/otp.tsx b/extras/demo-wallet/app/handlers/otp.tsx similarity index 100% rename from apps/demo-wallet/app/handlers/otp.tsx rename to extras/demo-wallet/app/handlers/otp.tsx diff --git a/apps/demo-wallet/app/layout.tsx b/extras/demo-wallet/app/layout.tsx similarity index 100% rename from apps/demo-wallet/app/layout.tsx rename to extras/demo-wallet/app/layout.tsx diff --git a/apps/demo-wallet/app/lib/attestation.ts b/extras/demo-wallet/app/lib/attestation.ts similarity index 100% rename from apps/demo-wallet/app/lib/attestation.ts rename to extras/demo-wallet/app/lib/attestation.ts diff --git a/apps/demo-wallet/app/lib/client-params.ts b/extras/demo-wallet/app/lib/client-params.ts similarity index 100% rename from apps/demo-wallet/app/lib/client-params.ts rename to extras/demo-wallet/app/lib/client-params.ts diff --git a/apps/demo-wallet/app/lib/cookies.ts b/extras/demo-wallet/app/lib/cookies.ts similarity index 100% rename from apps/demo-wallet/app/lib/cookies.ts rename to extras/demo-wallet/app/lib/cookies.ts diff --git a/apps/demo-wallet/app/lib/session-storage.ts b/extras/demo-wallet/app/lib/session-storage.ts similarity index 100% rename from apps/demo-wallet/app/lib/session-storage.ts rename to extras/demo-wallet/app/lib/session-storage.ts diff --git a/apps/demo-wallet/eslint.config.js b/extras/demo-wallet/eslint.config.js similarity index 100% rename from apps/demo-wallet/eslint.config.js rename to extras/demo-wallet/eslint.config.js diff --git a/apps/demo-wallet/next.config.js b/extras/demo-wallet/next.config.js similarity index 100% rename from apps/demo-wallet/next.config.js rename to extras/demo-wallet/next.config.js diff --git a/apps/demo-wallet/package.json b/extras/demo-wallet/package.json similarity index 100% rename from apps/demo-wallet/package.json rename to extras/demo-wallet/package.json diff --git a/apps/demo-wallet/tsconfig.json b/extras/demo-wallet/tsconfig.json similarity index 100% rename from apps/demo-wallet/tsconfig.json rename to extras/demo-wallet/tsconfig.json diff --git a/apps/docs/.gitignore b/extras/docs/.gitignore similarity index 100% rename from apps/docs/.gitignore rename to extras/docs/.gitignore diff --git a/apps/docs/README.md b/extras/docs/README.md similarity index 100% rename from apps/docs/README.md rename to extras/docs/README.md diff --git a/apps/docs/app/favicon.ico b/extras/docs/app/favicon.ico similarity index 100% rename from apps/docs/app/favicon.ico rename to extras/docs/app/favicon.ico diff --git a/apps/docs/app/fonts/GeistMonoVF.woff b/extras/docs/app/fonts/GeistMonoVF.woff similarity index 100% rename from apps/docs/app/fonts/GeistMonoVF.woff rename to extras/docs/app/fonts/GeistMonoVF.woff diff --git a/apps/docs/app/fonts/GeistVF.woff b/extras/docs/app/fonts/GeistVF.woff similarity index 100% rename from apps/docs/app/fonts/GeistVF.woff rename to extras/docs/app/fonts/GeistVF.woff diff --git a/apps/docs/app/globals.css b/extras/docs/app/globals.css similarity index 100% rename from apps/docs/app/globals.css rename to extras/docs/app/globals.css diff --git a/apps/docs/app/layout.tsx b/extras/docs/app/layout.tsx similarity index 100% rename from apps/docs/app/layout.tsx rename to extras/docs/app/layout.tsx diff --git a/apps/docs/app/page.module.css b/extras/docs/app/page.module.css similarity index 100% rename from apps/docs/app/page.module.css rename to extras/docs/app/page.module.css diff --git a/apps/docs/app/page.tsx b/extras/docs/app/page.tsx similarity index 100% rename from apps/docs/app/page.tsx rename to extras/docs/app/page.tsx diff --git a/extras/docs/eslint.config.js b/extras/docs/eslint.config.js new file mode 100644 index 000000000..3d2c2e9d4 --- /dev/null +++ b/extras/docs/eslint.config.js @@ -0,0 +1,4 @@ +import { nextJsConfig } from '@repo/eslint-config/next-js' + +/** @type {import("eslint").Linter.Config} */ +export default nextJsConfig diff --git a/extras/docs/next.config.js b/extras/docs/next.config.js new file mode 100644 index 000000000..1d6147825 --- /dev/null +++ b/extras/docs/next.config.js @@ -0,0 +1,4 @@ +/** @type {import('next').NextConfig} */ +const nextConfig = {} + +export default nextConfig diff --git a/apps/docs/package.json b/extras/docs/package.json similarity index 100% rename from apps/docs/package.json rename to extras/docs/package.json diff --git a/apps/docs/public/file-text.svg b/extras/docs/public/file-text.svg similarity index 100% rename from apps/docs/public/file-text.svg rename to extras/docs/public/file-text.svg diff --git a/apps/docs/public/globe.svg b/extras/docs/public/globe.svg similarity index 100% rename from apps/docs/public/globe.svg rename to extras/docs/public/globe.svg diff --git a/apps/docs/public/next.svg b/extras/docs/public/next.svg similarity index 100% rename from apps/docs/public/next.svg rename to extras/docs/public/next.svg diff --git a/apps/docs/public/turborepo-dark.svg b/extras/docs/public/turborepo-dark.svg similarity index 100% rename from apps/docs/public/turborepo-dark.svg rename to extras/docs/public/turborepo-dark.svg diff --git a/apps/docs/public/turborepo-light.svg b/extras/docs/public/turborepo-light.svg similarity index 100% rename from apps/docs/public/turborepo-light.svg rename to extras/docs/public/turborepo-light.svg diff --git a/apps/docs/public/vercel.svg b/extras/docs/public/vercel.svg similarity index 100% rename from apps/docs/public/vercel.svg rename to extras/docs/public/vercel.svg diff --git a/apps/docs/public/window.svg b/extras/docs/public/window.svg similarity index 100% rename from apps/docs/public/window.svg rename to extras/docs/public/window.svg diff --git a/extras/docs/tsconfig.json b/extras/docs/tsconfig.json new file mode 100644 index 000000000..c2fa4ee5d --- /dev/null +++ b/extras/docs/tsconfig.json @@ -0,0 +1,12 @@ +{ + "extends": "@repo/typescript-config/nextjs.json", + "compilerOptions": { + "plugins": [ + { + "name": "next" + } + ] + }, + "include": ["**/*.ts", "**/*.tsx", "next-env.d.ts", "next.config.js", ".next/types/**/*.ts"], + "exclude": ["node_modules"] +} diff --git a/apps/web/.gitignore b/extras/web/.gitignore similarity index 100% rename from apps/web/.gitignore rename to extras/web/.gitignore diff --git a/apps/web/README.md b/extras/web/README.md similarity index 100% rename from apps/web/README.md rename to extras/web/README.md diff --git a/apps/web/app/favicon.ico b/extras/web/app/favicon.ico similarity index 100% rename from apps/web/app/favicon.ico rename to extras/web/app/favicon.ico diff --git a/apps/web/app/fonts/GeistMonoVF.woff b/extras/web/app/fonts/GeistMonoVF.woff similarity index 100% rename from apps/web/app/fonts/GeistMonoVF.woff rename to extras/web/app/fonts/GeistMonoVF.woff diff --git a/apps/web/app/fonts/GeistVF.woff b/extras/web/app/fonts/GeistVF.woff similarity index 100% rename from apps/web/app/fonts/GeistVF.woff rename to extras/web/app/fonts/GeistVF.woff diff --git a/apps/web/app/globals.css b/extras/web/app/globals.css similarity index 100% rename from apps/web/app/globals.css rename to extras/web/app/globals.css diff --git a/apps/web/app/layout.tsx b/extras/web/app/layout.tsx similarity index 100% rename from apps/web/app/layout.tsx rename to extras/web/app/layout.tsx diff --git a/apps/web/app/page.module.css b/extras/web/app/page.module.css similarity index 100% rename from apps/web/app/page.module.css rename to extras/web/app/page.module.css diff --git a/apps/web/app/page.tsx b/extras/web/app/page.tsx similarity index 100% rename from apps/web/app/page.tsx rename to extras/web/app/page.tsx diff --git a/extras/web/eslint.config.js b/extras/web/eslint.config.js new file mode 100644 index 000000000..3d2c2e9d4 --- /dev/null +++ b/extras/web/eslint.config.js @@ -0,0 +1,4 @@ +import { nextJsConfig } from '@repo/eslint-config/next-js' + +/** @type {import("eslint").Linter.Config} */ +export default nextJsConfig diff --git a/extras/web/next.config.js b/extras/web/next.config.js new file mode 100644 index 000000000..1d6147825 --- /dev/null +++ b/extras/web/next.config.js @@ -0,0 +1,4 @@ +/** @type {import('next').NextConfig} */ +const nextConfig = {} + +export default nextConfig diff --git a/apps/web/package.json b/extras/web/package.json similarity index 100% rename from apps/web/package.json rename to extras/web/package.json diff --git a/apps/web/public/file-text.svg b/extras/web/public/file-text.svg similarity index 100% rename from apps/web/public/file-text.svg rename to extras/web/public/file-text.svg diff --git a/apps/web/public/globe.svg b/extras/web/public/globe.svg similarity index 100% rename from apps/web/public/globe.svg rename to extras/web/public/globe.svg diff --git a/apps/web/public/next.svg b/extras/web/public/next.svg similarity index 100% rename from apps/web/public/next.svg rename to extras/web/public/next.svg diff --git a/apps/web/public/turborepo-dark.svg b/extras/web/public/turborepo-dark.svg similarity index 100% rename from apps/web/public/turborepo-dark.svg rename to extras/web/public/turborepo-dark.svg diff --git a/apps/web/public/turborepo-light.svg b/extras/web/public/turborepo-light.svg similarity index 100% rename from apps/web/public/turborepo-light.svg rename to extras/web/public/turborepo-light.svg diff --git a/apps/web/public/vercel.svg b/extras/web/public/vercel.svg similarity index 100% rename from apps/web/public/vercel.svg rename to extras/web/public/vercel.svg diff --git a/apps/web/public/window.svg b/extras/web/public/window.svg similarity index 100% rename from apps/web/public/window.svg rename to extras/web/public/window.svg diff --git a/extras/web/tsconfig.json b/extras/web/tsconfig.json new file mode 100644 index 000000000..c2fa4ee5d --- /dev/null +++ b/extras/web/tsconfig.json @@ -0,0 +1,12 @@ +{ + "extends": "@repo/typescript-config/nextjs.json", + "compilerOptions": { + "plugins": [ + { + "name": "next" + } + ] + }, + "include": ["**/*.ts", "**/*.tsx", "next-env.d.ts", "next.config.js", ".next/types/**/*.ts"], + "exclude": ["node_modules"] +} diff --git a/old/.changeset/README.md b/old/.changeset/README.md deleted file mode 100644 index 4f3b76b09..000000000 --- a/old/.changeset/README.md +++ /dev/null @@ -1,8 +0,0 @@ -# Changesets - -Hello and welcome! This folder has been automatically generated by `@changesets/cli`, a build tool that works -with multi-package repos, or single-package repos to help you version and publish your code. You can -find the full documentation for it [in our repository](https://github.com/changesets/changesets) - -We have a quick list of common questions to get you started engaging with this project in -[our documentation](https://github.com/changesets/changesets/blob/master/docs/common-questions.md) diff --git a/old/.changeset/config.json b/old/.changeset/config.json deleted file mode 100644 index cb87a8113..000000000 --- a/old/.changeset/config.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "$schema": "https://unpkg.com/@changesets/config@1.4.0/schema.json", - "changelog": [ - "@changesets/cli/changelog", - { "repo": "0xsequence/sequence.js" } - ], - "commit": false, - "linked": [ - [ - "@0xsequence/*" - ] - ], - "access": "public", - "baseBranch": "master", - "ignore": [], - "___experimentalUnsafeOptions_WILL_CHANGE_IN_PATCH": { - "updateInternalDependents": "always" - } -} diff --git a/old/.eslintignore b/old/.eslintignore deleted file mode 100644 index 849dc677d..000000000 --- a/old/.eslintignore +++ /dev/null @@ -1,2 +0,0 @@ -.eslintrc.js -packages/**/dist diff --git a/old/.eslintrc.js b/old/.eslintrc.js deleted file mode 100644 index 6c3aa9069..000000000 --- a/old/.eslintrc.js +++ /dev/null @@ -1,50 +0,0 @@ -const { off } = require('process') - -module.exports = { - parser: '@typescript-eslint/parser', - parserOptions: { - ecmaVersion: 2018, - sourceType: 'module' - }, - - settings: { - 'import/ignore': ['react-native'], - }, - - extends: [ - 'plugin:@typescript-eslint/recommended', - 'plugin:import/errors', - 'plugin:import/warnings', - 'plugin:import/typescript', - 'prettier' - ], - - rules: { - '@typescript-eslint/no-unused-vars': 'off', - '@typescript-eslint/no-explicit-any': 'off', - '@typescript-eslint/no-non-null-assertion': 'off', - '@typescript-eslint/explicit-module-boundary-types': 'off', - '@typescript-eslint/ban-types': 'off', - '@typescript-eslint/ban-ts-comment': 'off', - '@typescript-eslint/no-empty-function': 'off', - '@typescript-eslint/no-inferrable-types': 'off', - '@typescript-eslint/no-var-requires': 'off', - '@typescript-eslint/no-this-alias': 'off', - - 'import/no-unresolved': 'off', - 'import/no-default-export': 2, - 'import/no-named-as-default-member': 'off', - 'import/export': 'off' - - // 'import/order': [ - // 'warn', - // { - // 'groups': ['builtin', 'external', 'parent', 'sibling', 'index'], - // 'alphabetize': { - // 'order': 'asc', /* sort in ascending order. Options: ['ignore', 'asc', 'desc'] */ - // 'caseInsensitive': true /* ignore case. Options: [true, false] */ - // } - // }, - // ] - } -} diff --git a/old/.gitignore b/old/.gitignore deleted file mode 100644 index 8c1467da7..000000000 --- a/old/.gitignore +++ /dev/null @@ -1,26 +0,0 @@ -# See https://help.github.com/ignore-files/ for more about ignoring files. - -node_modules/ -cache/ -build/ -dist/ - -test_chain/ - -*.js.map -PROD.env - -.DS_Store -.vscode -.idea -*.iml -.cache -package-lock.json -coverage -.rts2_cache* - -yarn-debug.log* -yarn-error.log* -lerna-debug.log* - -.nyc_output/ diff --git a/old/.prettierrc b/old/.prettierrc deleted file mode 100644 index 421afa979..000000000 --- a/old/.prettierrc +++ /dev/null @@ -1,9 +0,0 @@ -{ - "tabWidth": 2, - "useTabs": false, - "semi": false, - "singleQuote": true, - "trailingComma": "none", - "arrowParens": "avoid", - "printWidth": 130 -} diff --git a/old/LICENSE b/old/LICENSE deleted file mode 100644 index bf69ef4b9..000000000 --- a/old/LICENSE +++ /dev/null @@ -1,219 +0,0 @@ - Copyright (c) 2017-present Horizon Blockchain Games Inc. - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - - - ------------------------------------------------------------------------ - - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/old/README.md b/old/README.md deleted file mode 100644 index 6df5ac14b..000000000 --- a/old/README.md +++ /dev/null @@ -1,125 +0,0 @@ -# 0xsequence - -[Sequence](https://sequence.xyz): a modular web3 stack and smart wallet for Ethereum chains - -## Usage - -`npm install 0xsequence ethers` - -or - -`pnpm install 0xsequence ethers` - -or - -`yarn add 0xsequence ethers` - -## Packages - -- [0xsequence](./packages/0xsequence) -- [@0xsequence/abi](./packages/abi) -- [@0xsequence/api](./packages/api) -- [@0xsequence/auth](./packages/auth) -- [@0xsequence/core](./packages/core) -- [@0xsequence/deployer](./packages/deployer) -- [@0xsequence/guard](./packages/guard) -- [@0xsequence/marketplace](./packages/marketplace) -- [@0xsequence/multicall](./packages/multicall) -- [@0xsequence/network](./packages/network) -- [@0xsequence/provider](./packages/provider) -- [@0xsequence/relayer](./packages/relayer) -- [@0xsequence/replacer](./packages/replacer) -- [@0xsequence/sessions](./packages/sessions) -- [@0xsequence/signhub](./packages/signhub) -- [@0xsequence/utils](./packages/utils) -- [@0xsequence/wallet](./packages/wallet) - -## Development Environment - -Below are notes and instructions on how to get your development environment up and running, -and enjoyable. - -1. **Install dependencies** - Run, `pnpm install` - -2. **Workflow** -- we use the amazing [preconstruct](https://github.com/preconstruct/preconstruct) - package to handle our monorepo build system. - -3. **Local dev** -- when you're working on the code in this repository, you can safely run - `pnpm dev` at the root-level, which will link all packages/** together, so that when a - local dependency from packages/** is used by another, it will automatically be linked - without having to run a build command. Just remember: run `pnpm dev` anytime you developing - in this repo. Note, that when you run `pnpm build` it will clear the dev environment, so - you will need to run `pnpm dev` again after a build. However, `pnpm build` should only be - used when making a release. - -4. **Testing** -- to test the system, you can run `pnpm test` at the top-level or at an individual - package-level. - -5. **Type-checking** -- to typecheck the system you can run `pnpm typecheck` at any level. - -6. **Building** -- to _compile_ the project to dist files for a release, run `pnpm build` at - the root-level. Note building packages repeatedly during development is unnecessary with - `preconstruct`. During local development run `pnpm dev` and when building to make a release, - run `pnpm build`. - -7. **Versioning** -- this repository uses the handy [changesets](https://github.com/atlassian/changesets) - package for package versioning across the monorepo, as well as changelogs. See _Releasing_ section below. - -## Releasing to NPM - -0xsequence uses changesets to do versioning. This makes releasing really easy and changelogs are automatically generated. - -### How to do a release - -Authorization on https://www.npmjs.com/ to push to the 0xsequence organization's packages is required. - -0. (first time) `pnpm login` -1. check that master is passing tests on github -2. (warning: destructive) start from a clean repo: - `git checkout master && git reset --hard && git clean -dfx && pnpm i` -3. for each new change: - a. `pnpm changeset` - b. select all packages - c. update all packages with either a minor or patch bump according to semver - d. add a summary of the form: `package: description of a single change` - e. repeat a-d until all changes are accounted for -4. `pnpm changeset:version && pnpm i && pnpm build && pnpm i` -5. `git diff` and copy the newest version according to the changelogs -6. `git commit -a -m ` -7. `git push` -8. `pnpm changeset:publish` and enter your 2fa totp token when prompted -9. `git push --tags` - -## How to do a snapshot release - -Authorization on https://www.npmjs.com/ to push to the 0xsequence organization's packages is required. - -Snapshot releases are versioned as 0.0.0-YYYYmmddHHMMSS and are intended for testing builds only. - -0. (first time) `pnpm login` -1. (warning: destructive) start from a clean repo: - `git checkout && git reset --hard && git clean -dfx && pnpm i` -2. `pnpm changeset:snapshot` - a. select all packages - b. update all packages with a patch bump - c. any summary is ok - d. enter your 2fa totp token when prompted - e. note the snapshot version 0.0.0-YYYYmmddHHMMSS -3. `git reset --hard` - -## NOTES - -1. Browser tests can be run with `pnpm test` or, separately `pnpm test:server` and `pnpm test:run` -2. To run a specific test, run `pnpm test:only `, ie. `pnpm test:only window-transport` - -## TIPS - -- If you're using node v18+ and you hit the error `Error: error:0308010C:digital envelope routines::unsupported`, - make sure to first set, `export NODE_OPTIONS=--openssl-legacy-provider` - -## LICENSE - -Apache-2.0 - -Copyright (c) 2017-present Horizon Blockchain Games Inc. / https://horizon.io diff --git a/old/babel.config.js b/old/babel.config.js deleted file mode 100644 index 226b59df3..000000000 --- a/old/babel.config.js +++ /dev/null @@ -1,19 +0,0 @@ -module.exports = { - presets: [ - ['@babel/preset-env', { - targets: { - esmodules: true - }, - bugfixes: true, - loose: true, - exclude: [ - '@babel/plugin-transform-async-to-generator', - '@babel/plugin-transform-regenerator' - ] - }], - '@babel/preset-typescript' - ], - plugins: [ - ['@babel/plugin-transform-class-properties', { loose: true }] - ] -} diff --git a/old/package.json b/old/package.json deleted file mode 100644 index 9d34fe759..000000000 --- a/old/package.json +++ /dev/null @@ -1,108 +0,0 @@ -{ - "name": "0xsequence", - "private": true, - "license": "Apache-2.0", - "scripts": { - "build": "pnpm dev && pnpm typecheck && preconstruct build && node scripts/fix-mocha-ref.js", - "watch": "preconstruct watch", - "clean": "rimraf ./node_modules", - "changeset": "changeset", - "changeset:version": "changeset version && pnpm update-version && pnpm update-network-names-doc", - "changeset:publish": "pnpm build && changeset publish", - "changeset:snapshot": "changeset && changeset version --snapshot && pnpm i && pnpm build && changeset publish --tag snapshot && git tag | grep '0\\.0\\.0' | xargs git tag -d && echo && echo -n 'Published sequence.js snapshot ' && grep '^## ' packages/0xsequence/CHANGELOG.md | head -n 1 | cut -c 4-", - "update-version": "node ./scripts/update-version", - "update-network-names-doc": "ts-node ./scripts/update-network-names-doc.ts", - "test": "pnpm -r --workspace-concurrency=1 test", - "test:parallel": "pnpm -r test", - "lint": "eslint -c .eslintrc.js 'packages/**/src/**/*.{ts,tsx}'", - "lint:fix": "eslint -c .eslintrc.js --fix 'packages/**/src/**/*.{ts,tsx}'", - "lint:tests": "eslint -c .eslintrc.js 'packages/**/tests/**/*.{ts,tsx}'", - "lint:tests:fix": "eslint -c .eslintrc.js --fix 'packages/**/tests/**/*.{ts,tsx}'", - "format": "prettier --write \"packages/**/src/**/*.ts\" \"packages/**/tests/**/*.ts\"", - "audit:fix": "pnpm audit --fix", - "typecheck": "tsc --noEmit", - "dev": "preconstruct dev", - "postinstall": "preconstruct dev", - "coverage": "rimraf ./coverage && rimraf ./.nyc_output && nyc pnpm test", - "prepare": "husky install" - }, - "husky": { - "hooks": { - "pre-commit": "pnpm lint", - "pre-push": "pnpm lint && pnpm build && pnpm test:parallel && pnpm update-network-names-doc" - } - }, - "devDependencies": { - "@0xsequence/abi": "workspace:*", - "@0xsequence/api": "workspace:*", - "@0xsequence/auth": "workspace:*", - "@0xsequence/deployer": "workspace:*", - "@0xsequence/guard": "workspace:*", - "@0xsequence/indexer": "workspace:*", - "@0xsequence/marketplace": "workspace:*", - "@0xsequence/metadata": "workspace:*", - "@0xsequence/network": "workspace:*", - "@0xsequence/provider": "workspace:*", - "@0xsequence/relayer": "workspace:*", - "@0xsequence/utils": "workspace:*", - "@0xsequence/wallet": "workspace:*", - "@babel/core": "^7.21.4", - "@babel/plugin-transform-class-properties": "^7.23.3", - "@babel/preset-env": "^7.21.4", - "@babel/preset-typescript": "^7.21.4", - "@babel/runtime": "^7.26.10", - "@changesets/changelog-github": "^0.5.0", - "@changesets/cli": "^2.26.1", - "@nomicfoundation/hardhat-toolbox": "^5.0.0", - "@preconstruct/cli": "^2.8.9", - "@types/chai": "^4.3.11", - "@types/chai-as-promised": "^7.1.8", - "@types/mocha": "^10.0.6", - "@types/node": "^22.7.9", - "@typescript-eslint/eslint-plugin": "^8.11.0", - "@typescript-eslint/parser": "^8.11.0", - "ava": "^6.1.3", - "chai": "^4.3.10", - "chai-as-promised": "^7.1.1", - "concurrently": "^9.0.1", - "eslint": "^8.39.0", - "eslint-config-prettier": "^9.1.0", - "eslint-plugin-import": "^2.27.5", - "eslint-plugin-prettier": "^5.0.1", - "ethers": "6.13.4", - "express": "^4.18.2", - "hardhat": "^2.22.14", - "husky": "^8.0.0", - "mocha": "^10.1.0", - "nyc": "^17.1.0", - "prettier": "^3.0.0", - "puppeteer": "^23.10.3", - "rimraf": "^6.0.1", - "ts-node": "^10.9.2", - "tsx": "^4.19.1", - "typescript": "~5.6.3", - "wait-on": "^8.0.1" - }, - "resolutions": {}, - "workspaces": [ - "packages/*" - ], - "preconstruct": { - "packages": [ - "packages/*" - ], - "globals": { - "ethers": "ethers" - } - }, - "pnpm": { - "overrides": { - "bufferutil": "^4.0.8", - "node-forge@<1.0.0": ">=1.0.0", - "node-forge@<1.3.0": ">=1.3.0", - "got@<11.8.5": ">=11.8.5", - "glob-parent@<5.1.2": ">=5.1.2" - } - }, - "packageManager": "pnpm@9.15.4+sha512.b2dc20e2fc72b3e18848459b37359a32064663e5627a51e4c74b2c29dd8e8e0491483c3abb40789cfd578bf362fb6ba8261b05f0387d76792ed6e23ea3b1b6a0" -} diff --git a/old/packages/0xsequence/CHANGELOG.md b/old/packages/0xsequence/CHANGELOG.md deleted file mode 100644 index deb8c47c6..000000000 --- a/old/packages/0xsequence/CHANGELOG.md +++ /dev/null @@ -1,7934 +0,0 @@ -# 0xsequence - -## 2.3.8 - -### Patch Changes - -- indexer: update clients -- Updated dependencies - - @0xsequence/abi@2.3.8 - - @0xsequence/account@2.3.8 - - @0xsequence/api@2.3.8 - - @0xsequence/auth@2.3.8 - - @0xsequence/core@2.3.8 - - @0xsequence/guard@2.3.8 - - @0xsequence/indexer@2.3.8 - - @0xsequence/metadata@2.3.8 - - @0xsequence/migration@2.3.8 - - @0xsequence/network@2.3.8 - - @0xsequence/provider@2.3.8 - - @0xsequence/relayer@2.3.8 - - @0xsequence/sessions@2.3.8 - - @0xsequence/signhub@2.3.8 - - @0xsequence/utils@2.3.8 - - @0xsequence/wallet@2.3.8 - -## 2.3.7 - -### Patch Changes - -- Metadata updates -- Updated dependencies - - @0xsequence/abi@2.3.7 - - @0xsequence/account@2.3.7 - - @0xsequence/api@2.3.7 - - @0xsequence/auth@2.3.7 - - @0xsequence/core@2.3.7 - - @0xsequence/guard@2.3.7 - - @0xsequence/indexer@2.3.7 - - @0xsequence/metadata@2.3.7 - - @0xsequence/migration@2.3.7 - - @0xsequence/network@2.3.7 - - @0xsequence/provider@2.3.7 - - @0xsequence/relayer@2.3.7 - - @0xsequence/sessions@2.3.7 - - @0xsequence/signhub@2.3.7 - - @0xsequence/utils@2.3.7 - - @0xsequence/wallet@2.3.7 - -## 2.3.6 - -### Patch Changes - -- New chains -- Updated dependencies - - @0xsequence/abi@2.3.6 - - @0xsequence/account@2.3.6 - - @0xsequence/api@2.3.6 - - @0xsequence/auth@2.3.6 - - @0xsequence/core@2.3.6 - - @0xsequence/guard@2.3.6 - - @0xsequence/indexer@2.3.6 - - @0xsequence/metadata@2.3.6 - - @0xsequence/migration@2.3.6 - - @0xsequence/network@2.3.6 - - @0xsequence/provider@2.3.6 - - @0xsequence/relayer@2.3.6 - - @0xsequence/sessions@2.3.6 - - @0xsequence/signhub@2.3.6 - - @0xsequence/utils@2.3.6 - - @0xsequence/wallet@2.3.6 - -## 2.3.5 - -### Patch Changes - -- Add Frequency Testnet -- Updated dependencies - - @0xsequence/abi@2.3.5 - - @0xsequence/account@2.3.5 - - @0xsequence/api@2.3.5 - - @0xsequence/auth@2.3.5 - - @0xsequence/core@2.3.5 - - @0xsequence/guard@2.3.5 - - @0xsequence/indexer@2.3.5 - - @0xsequence/metadata@2.3.5 - - @0xsequence/migration@2.3.5 - - @0xsequence/network@2.3.5 - - @0xsequence/provider@2.3.5 - - @0xsequence/relayer@2.3.5 - - @0xsequence/sessions@2.3.5 - - @0xsequence/signhub@2.3.5 - - @0xsequence/utils@2.3.5 - - @0xsequence/wallet@2.3.5 - -## 2.3.4 - -### Patch Changes - -- metadata: exclude deprecated methods on rpc client -- Updated dependencies - - @0xsequence/abi@2.3.4 - - @0xsequence/account@2.3.4 - - @0xsequence/api@2.3.4 - - @0xsequence/auth@2.3.4 - - @0xsequence/core@2.3.4 - - @0xsequence/guard@2.3.4 - - @0xsequence/indexer@2.3.4 - - @0xsequence/metadata@2.3.4 - - @0xsequence/migration@2.3.4 - - @0xsequence/network@2.3.4 - - @0xsequence/provider@2.3.4 - - @0xsequence/relayer@2.3.4 - - @0xsequence/sessions@2.3.4 - - @0xsequence/signhub@2.3.4 - - @0xsequence/utils@2.3.4 - - @0xsequence/wallet@2.3.4 - -## 2.3.3 - -### Patch Changes - -- metadata: client update -- Updated dependencies - - @0xsequence/abi@2.3.3 - - @0xsequence/account@2.3.3 - - @0xsequence/api@2.3.3 - - @0xsequence/auth@2.3.3 - - @0xsequence/core@2.3.3 - - @0xsequence/guard@2.3.3 - - @0xsequence/indexer@2.3.3 - - @0xsequence/metadata@2.3.3 - - @0xsequence/migration@2.3.3 - - @0xsequence/network@2.3.3 - - @0xsequence/provider@2.3.3 - - @0xsequence/relayer@2.3.3 - - @0xsequence/sessions@2.3.3 - - @0xsequence/signhub@2.3.3 - - @0xsequence/utils@2.3.3 - - @0xsequence/wallet@2.3.3 - -## 2.3.2 - -### Patch Changes - -- metadata: update rpc client -- Updated dependencies - - @0xsequence/metadata@2.3.2 - - @0xsequence/abi@2.3.2 - - @0xsequence/account@2.3.2 - - @0xsequence/api@2.3.2 - - @0xsequence/auth@2.3.2 - - @0xsequence/core@2.3.2 - - @0xsequence/guard@2.3.2 - - @0xsequence/indexer@2.3.2 - - @0xsequence/migration@2.3.2 - - @0xsequence/network@2.3.2 - - @0xsequence/provider@2.3.2 - - @0xsequence/relayer@2.3.2 - - @0xsequence/sessions@2.3.2 - - @0xsequence/signhub@2.3.2 - - @0xsequence/utils@2.3.2 - - @0xsequence/wallet@2.3.2 - -## 2.3.1 - -### Patch Changes - -- indexer: update rpc client -- Updated dependencies - - @0xsequence/abi@2.3.1 - - @0xsequence/account@2.3.1 - - @0xsequence/api@2.3.1 - - @0xsequence/auth@2.3.1 - - @0xsequence/core@2.3.1 - - @0xsequence/guard@2.3.1 - - @0xsequence/indexer@2.3.1 - - @0xsequence/metadata@2.3.1 - - @0xsequence/migration@2.3.1 - - @0xsequence/network@2.3.1 - - @0xsequence/provider@2.3.1 - - @0xsequence/relayer@2.3.1 - - @0xsequence/sessions@2.3.1 - - @0xsequence/signhub@2.3.1 - - @0xsequence/utils@2.3.1 - - @0xsequence/wallet@2.3.1 - -## 2.3.0 - -### Minor Changes - -- update metadata rpc client - -### Patch Changes - -- Updated dependencies - - @0xsequence/abi@2.3.0 - - @0xsequence/account@2.3.0 - - @0xsequence/api@2.3.0 - - @0xsequence/auth@2.3.0 - - @0xsequence/core@2.3.0 - - @0xsequence/guard@2.3.0 - - @0xsequence/indexer@2.3.0 - - @0xsequence/metadata@2.3.0 - - @0xsequence/migration@2.3.0 - - @0xsequence/network@2.3.0 - - @0xsequence/provider@2.3.0 - - @0xsequence/relayer@2.3.0 - - @0xsequence/sessions@2.3.0 - - @0xsequence/signhub@2.3.0 - - @0xsequence/utils@2.3.0 - - @0xsequence/wallet@2.3.0 - -## 2.2.15 - -### Patch Changes - -- API updates -- Updated dependencies - - @0xsequence/abi@2.2.15 - - @0xsequence/account@2.2.15 - - @0xsequence/api@2.2.15 - - @0xsequence/auth@2.2.15 - - @0xsequence/core@2.2.15 - - @0xsequence/guard@2.2.15 - - @0xsequence/indexer@2.2.15 - - @0xsequence/metadata@2.2.15 - - @0xsequence/migration@2.2.15 - - @0xsequence/network@2.2.15 - - @0xsequence/provider@2.2.15 - - @0xsequence/relayer@2.2.15 - - @0xsequence/sessions@2.2.15 - - @0xsequence/signhub@2.2.15 - - @0xsequence/utils@2.2.15 - - @0xsequence/wallet@2.2.15 - -## 2.2.14 - -### Patch Changes - -- Somnia Testnet and Monad Testnet -- Updated dependencies - - @0xsequence/abi@2.2.14 - - @0xsequence/account@2.2.14 - - @0xsequence/api@2.2.14 - - @0xsequence/auth@2.2.14 - - @0xsequence/core@2.2.14 - - @0xsequence/guard@2.2.14 - - @0xsequence/indexer@2.2.14 - - @0xsequence/metadata@2.2.14 - - @0xsequence/migration@2.2.14 - - @0xsequence/network@2.2.14 - - @0xsequence/provider@2.2.14 - - @0xsequence/relayer@2.2.14 - - @0xsequence/sessions@2.2.14 - - @0xsequence/signhub@2.2.14 - - @0xsequence/utils@2.2.14 - - @0xsequence/wallet@2.2.14 - -## 2.2.13 - -### Patch Changes - -- Add XR1 to all networks -- Updated dependencies - - @0xsequence/abi@2.2.13 - - @0xsequence/account@2.2.13 - - @0xsequence/api@2.2.13 - - @0xsequence/auth@2.2.13 - - @0xsequence/core@2.2.13 - - @0xsequence/guard@2.2.13 - - @0xsequence/indexer@2.2.13 - - @0xsequence/metadata@2.2.13 - - @0xsequence/migration@2.2.13 - - @0xsequence/network@2.2.13 - - @0xsequence/provider@2.2.13 - - @0xsequence/relayer@2.2.13 - - @0xsequence/sessions@2.2.13 - - @0xsequence/signhub@2.2.13 - - @0xsequence/utils@2.2.13 - - @0xsequence/wallet@2.2.13 - -## 2.2.12 - -### Patch Changes - -- Add XR1 -- Updated dependencies - - @0xsequence/abi@2.2.12 - - @0xsequence/account@2.2.12 - - @0xsequence/api@2.2.12 - - @0xsequence/auth@2.2.12 - - @0xsequence/core@2.2.12 - - @0xsequence/guard@2.2.12 - - @0xsequence/indexer@2.2.12 - - @0xsequence/metadata@2.2.12 - - @0xsequence/migration@2.2.12 - - @0xsequence/network@2.2.12 - - @0xsequence/provider@2.2.12 - - @0xsequence/relayer@2.2.12 - - @0xsequence/sessions@2.2.12 - - @0xsequence/signhub@2.2.12 - - @0xsequence/utils@2.2.12 - - @0xsequence/wallet@2.2.12 - -## 2.2.11 - -### Patch Changes - -- Relayer updates -- Updated dependencies - - @0xsequence/abi@2.2.11 - - @0xsequence/account@2.2.11 - - @0xsequence/api@2.2.11 - - @0xsequence/auth@2.2.11 - - @0xsequence/core@2.2.11 - - @0xsequence/guard@2.2.11 - - @0xsequence/indexer@2.2.11 - - @0xsequence/metadata@2.2.11 - - @0xsequence/migration@2.2.11 - - @0xsequence/network@2.2.11 - - @0xsequence/provider@2.2.11 - - @0xsequence/relayer@2.2.11 - - @0xsequence/sessions@2.2.11 - - @0xsequence/signhub@2.2.11 - - @0xsequence/utils@2.2.11 - - @0xsequence/wallet@2.2.11 - -## 2.2.10 - -### Patch Changes - -- Etherlink support -- Updated dependencies - - @0xsequence/abi@2.2.10 - - @0xsequence/account@2.2.10 - - @0xsequence/api@2.2.10 - - @0xsequence/auth@2.2.10 - - @0xsequence/core@2.2.10 - - @0xsequence/guard@2.2.10 - - @0xsequence/indexer@2.2.10 - - @0xsequence/metadata@2.2.10 - - @0xsequence/migration@2.2.10 - - @0xsequence/network@2.2.10 - - @0xsequence/provider@2.2.10 - - @0xsequence/relayer@2.2.10 - - @0xsequence/sessions@2.2.10 - - @0xsequence/signhub@2.2.10 - - @0xsequence/utils@2.2.10 - - @0xsequence/wallet@2.2.10 - -## 2.2.9 - -### Patch Changes - -- Indexer gateway native token balances -- Updated dependencies - - @0xsequence/abi@2.2.9 - - @0xsequence/account@2.2.9 - - @0xsequence/api@2.2.9 - - @0xsequence/auth@2.2.9 - - @0xsequence/core@2.2.9 - - @0xsequence/guard@2.2.9 - - @0xsequence/indexer@2.2.9 - - @0xsequence/metadata@2.2.9 - - @0xsequence/migration@2.2.9 - - @0xsequence/network@2.2.9 - - @0xsequence/provider@2.2.9 - - @0xsequence/relayer@2.2.9 - - @0xsequence/sessions@2.2.9 - - @0xsequence/signhub@2.2.9 - - @0xsequence/utils@2.2.9 - - @0xsequence/wallet@2.2.9 - -## 2.2.8 - -### Patch Changes - -- Add Moonbeam and Moonbase Alpha -- Updated dependencies - - @0xsequence/abi@2.2.8 - - @0xsequence/account@2.2.8 - - @0xsequence/api@2.2.8 - - @0xsequence/auth@2.2.8 - - @0xsequence/core@2.2.8 - - @0xsequence/guard@2.2.8 - - @0xsequence/indexer@2.2.8 - - @0xsequence/metadata@2.2.8 - - @0xsequence/migration@2.2.8 - - @0xsequence/network@2.2.8 - - @0xsequence/provider@2.2.8 - - @0xsequence/relayer@2.2.8 - - @0xsequence/sessions@2.2.8 - - @0xsequence/signhub@2.2.8 - - @0xsequence/utils@2.2.8 - - @0xsequence/wallet@2.2.8 - -## 2.2.7 - -### Patch Changes - -- Update Builder package -- Updated dependencies - - @0xsequence/abi@2.2.7 - - @0xsequence/account@2.2.7 - - @0xsequence/api@2.2.7 - - @0xsequence/auth@2.2.7 - - @0xsequence/core@2.2.7 - - @0xsequence/guard@2.2.7 - - @0xsequence/indexer@2.2.7 - - @0xsequence/metadata@2.2.7 - - @0xsequence/migration@2.2.7 - - @0xsequence/network@2.2.7 - - @0xsequence/provider@2.2.7 - - @0xsequence/relayer@2.2.7 - - @0xsequence/sessions@2.2.7 - - @0xsequence/signhub@2.2.7 - - @0xsequence/utils@2.2.7 - - @0xsequence/wallet@2.2.7 - -## 2.2.6 - -### Patch Changes - -- Update relayer package -- Updated dependencies - - @0xsequence/abi@2.2.6 - - @0xsequence/account@2.2.6 - - @0xsequence/api@2.2.6 - - @0xsequence/auth@2.2.6 - - @0xsequence/core@2.2.6 - - @0xsequence/guard@2.2.6 - - @0xsequence/indexer@2.2.6 - - @0xsequence/metadata@2.2.6 - - @0xsequence/migration@2.2.6 - - @0xsequence/network@2.2.6 - - @0xsequence/provider@2.2.6 - - @0xsequence/relayer@2.2.6 - - @0xsequence/sessions@2.2.6 - - @0xsequence/signhub@2.2.6 - - @0xsequence/utils@2.2.6 - - @0xsequence/wallet@2.2.6 - -## 2.2.5 - -### Patch Changes - -- auth: fix sequence indexer gateway url -- account: immutable wallet proxy hook -- Updated dependencies -- Updated dependencies - - @0xsequence/abi@2.2.5 - - @0xsequence/account@2.2.5 - - @0xsequence/api@2.2.5 - - @0xsequence/auth@2.2.5 - - @0xsequence/core@2.2.5 - - @0xsequence/guard@2.2.5 - - @0xsequence/indexer@2.2.5 - - @0xsequence/metadata@2.2.5 - - @0xsequence/migration@2.2.5 - - @0xsequence/network@2.2.5 - - @0xsequence/provider@2.2.5 - - @0xsequence/relayer@2.2.5 - - @0xsequence/sessions@2.2.5 - - @0xsequence/signhub@2.2.5 - - @0xsequence/utils@2.2.5 - - @0xsequence/wallet@2.2.5 - -## 2.2.4 - -### Patch Changes - -- network: update soneium mainnet block explorer url -- waas: signTypedData intent support -- Updated dependencies -- Updated dependencies - - @0xsequence/abi@2.2.4 - - @0xsequence/account@2.2.4 - - @0xsequence/api@2.2.4 - - @0xsequence/auth@2.2.4 - - @0xsequence/core@2.2.4 - - @0xsequence/guard@2.2.4 - - @0xsequence/indexer@2.2.4 - - @0xsequence/metadata@2.2.4 - - @0xsequence/migration@2.2.4 - - @0xsequence/network@2.2.4 - - @0xsequence/provider@2.2.4 - - @0xsequence/relayer@2.2.4 - - @0xsequence/sessions@2.2.4 - - @0xsequence/signhub@2.2.4 - - @0xsequence/utils@2.2.4 - - @0xsequence/wallet@2.2.4 - -## 2.2.3 - -### Patch Changes - -- provider: updating initWallet to use connected network configs if they exist -- Updated dependencies - - @0xsequence/abi@2.2.3 - - @0xsequence/account@2.2.3 - - @0xsequence/api@2.2.3 - - @0xsequence/auth@2.2.3 - - @0xsequence/core@2.2.3 - - @0xsequence/guard@2.2.3 - - @0xsequence/indexer@2.2.3 - - @0xsequence/metadata@2.2.3 - - @0xsequence/migration@2.2.3 - - @0xsequence/network@2.2.3 - - @0xsequence/provider@2.2.3 - - @0xsequence/relayer@2.2.3 - - @0xsequence/sessions@2.2.3 - - @0xsequence/signhub@2.2.3 - - @0xsequence/utils@2.2.3 - - @0xsequence/wallet@2.2.3 - -## 2.2.2 - -### Patch Changes - -- pass projectAccessKey to relayer at all times -- Updated dependencies - - @0xsequence/abi@2.2.2 - - @0xsequence/account@2.2.2 - - @0xsequence/api@2.2.2 - - @0xsequence/auth@2.2.2 - - @0xsequence/core@2.2.2 - - @0xsequence/guard@2.2.2 - - @0xsequence/indexer@2.2.2 - - @0xsequence/metadata@2.2.2 - - @0xsequence/migration@2.2.2 - - @0xsequence/network@2.2.2 - - @0xsequence/provider@2.2.2 - - @0xsequence/relayer@2.2.2 - - @0xsequence/sessions@2.2.2 - - @0xsequence/signhub@2.2.2 - - @0xsequence/utils@2.2.2 - - @0xsequence/wallet@2.2.2 - -## 2.2.1 - -### Patch Changes - -- waas-ethers: sign typed data -- Updated dependencies - - @0xsequence/abi@2.2.1 - - @0xsequence/account@2.2.1 - - @0xsequence/api@2.2.1 - - @0xsequence/auth@2.2.1 - - @0xsequence/core@2.2.1 - - @0xsequence/guard@2.2.1 - - @0xsequence/indexer@2.2.1 - - @0xsequence/metadata@2.2.1 - - @0xsequence/migration@2.2.1 - - @0xsequence/network@2.2.1 - - @0xsequence/provider@2.2.1 - - @0xsequence/relayer@2.2.1 - - @0xsequence/sessions@2.2.1 - - @0xsequence/signhub@2.2.1 - - @0xsequence/utils@2.2.1 - - @0xsequence/wallet@2.2.1 - -## 2.2.0 - -### Minor Changes - -- indexer: gateway client -- @0xsequence/builder -- upgrade puppeteer to v23.10.3 - -### Patch Changes - -- Updated dependencies -- Updated dependencies -- Updated dependencies - - @0xsequence/abi@2.2.0 - - @0xsequence/account@2.2.0 - - @0xsequence/api@2.2.0 - - @0xsequence/auth@2.2.0 - - @0xsequence/core@2.2.0 - - @0xsequence/guard@2.2.0 - - @0xsequence/indexer@2.2.0 - - @0xsequence/metadata@2.2.0 - - @0xsequence/migration@2.2.0 - - @0xsequence/network@2.2.0 - - @0xsequence/provider@2.2.0 - - @0xsequence/relayer@2.2.0 - - @0xsequence/sessions@2.2.0 - - @0xsequence/signhub@2.2.0 - - @0xsequence/utils@2.2.0 - - @0xsequence/wallet@2.2.0 - -## 2.1.8 - -### Patch Changes - -- Add Soneium Mainnet -- Updated dependencies - - @0xsequence/abi@2.1.8 - - @0xsequence/account@2.1.8 - - @0xsequence/api@2.1.8 - - @0xsequence/auth@2.1.8 - - @0xsequence/core@2.1.8 - - @0xsequence/guard@2.1.8 - - @0xsequence/indexer@2.1.8 - - @0xsequence/metadata@2.1.8 - - @0xsequence/migration@2.1.8 - - @0xsequence/network@2.1.8 - - @0xsequence/provider@2.1.8 - - @0xsequence/relayer@2.1.8 - - @0xsequence/sessions@2.1.8 - - @0xsequence/signhub@2.1.8 - - @0xsequence/utils@2.1.8 - - @0xsequence/wallet@2.1.8 - -## 2.1.7 - -### Patch Changes - -- guard: pass project access key to guard requests -- Updated dependencies - - @0xsequence/abi@2.1.7 - - @0xsequence/account@2.1.7 - - @0xsequence/api@2.1.7 - - @0xsequence/auth@2.1.7 - - @0xsequence/core@2.1.7 - - @0xsequence/guard@2.1.7 - - @0xsequence/indexer@2.1.7 - - @0xsequence/metadata@2.1.7 - - @0xsequence/migration@2.1.7 - - @0xsequence/network@2.1.7 - - @0xsequence/provider@2.1.7 - - @0xsequence/relayer@2.1.7 - - @0xsequence/sessions@2.1.7 - - @0xsequence/signhub@2.1.7 - - @0xsequence/utils@2.1.7 - - @0xsequence/wallet@2.1.7 - -## 2.1.6 - -### Patch Changes - -- Add LAOS and Telos Testnet chains -- Updated dependencies - - @0xsequence/abi@2.1.6 - - @0xsequence/account@2.1.6 - - @0xsequence/api@2.1.6 - - @0xsequence/auth@2.1.6 - - @0xsequence/core@2.1.6 - - @0xsequence/guard@2.1.6 - - @0xsequence/indexer@2.1.6 - - @0xsequence/metadata@2.1.6 - - @0xsequence/migration@2.1.6 - - @0xsequence/network@2.1.6 - - @0xsequence/provider@2.1.6 - - @0xsequence/relayer@2.1.6 - - @0xsequence/sessions@2.1.6 - - @0xsequence/signhub@2.1.6 - - @0xsequence/utils@2.1.6 - - @0xsequence/wallet@2.1.6 - -## 2.1.5 - -### Patch Changes - -- account: save presigned configuration with reference chain id 1 -- Updated dependencies - - @0xsequence/abi@2.1.5 - - @0xsequence/account@2.1.5 - - @0xsequence/api@2.1.5 - - @0xsequence/auth@2.1.5 - - @0xsequence/core@2.1.5 - - @0xsequence/guard@2.1.5 - - @0xsequence/indexer@2.1.5 - - @0xsequence/metadata@2.1.5 - - @0xsequence/migration@2.1.5 - - @0xsequence/network@2.1.5 - - @0xsequence/provider@2.1.5 - - @0xsequence/relayer@2.1.5 - - @0xsequence/sessions@2.1.5 - - @0xsequence/signhub@2.1.5 - - @0xsequence/utils@2.1.5 - - @0xsequence/wallet@2.1.5 - -## 2.1.4 - -### Patch Changes - -- provider: pass projectAccessKey into MuxMessageProvider -- Updated dependencies - - @0xsequence/abi@2.1.4 - - @0xsequence/account@2.1.4 - - @0xsequence/api@2.1.4 - - @0xsequence/auth@2.1.4 - - @0xsequence/core@2.1.4 - - @0xsequence/guard@2.1.4 - - @0xsequence/indexer@2.1.4 - - @0xsequence/metadata@2.1.4 - - @0xsequence/migration@2.1.4 - - @0xsequence/network@2.1.4 - - @0xsequence/provider@2.1.4 - - @0xsequence/relayer@2.1.4 - - @0xsequence/sessions@2.1.4 - - @0xsequence/signhub@2.1.4 - - @0xsequence/utils@2.1.4 - - @0xsequence/wallet@2.1.4 - -## 2.1.3 - -### Patch Changes - -- waas: time drift date fix due to strange browser quirk -- Updated dependencies - - @0xsequence/abi@2.1.3 - - @0xsequence/account@2.1.3 - - @0xsequence/api@2.1.3 - - @0xsequence/auth@2.1.3 - - @0xsequence/core@2.1.3 - - @0xsequence/guard@2.1.3 - - @0xsequence/indexer@2.1.3 - - @0xsequence/metadata@2.1.3 - - @0xsequence/migration@2.1.3 - - @0xsequence/network@2.1.3 - - @0xsequence/provider@2.1.3 - - @0xsequence/relayer@2.1.3 - - @0xsequence/sessions@2.1.3 - - @0xsequence/signhub@2.1.3 - - @0xsequence/utils@2.1.3 - - @0xsequence/wallet@2.1.3 - -## 2.1.2 - -### Patch Changes - -- provider: export analytics correctly -- Updated dependencies - - @0xsequence/abi@2.1.2 - - @0xsequence/account@2.1.2 - - @0xsequence/api@2.1.2 - - @0xsequence/auth@2.1.2 - - @0xsequence/core@2.1.2 - - @0xsequence/guard@2.1.2 - - @0xsequence/indexer@2.1.2 - - @0xsequence/metadata@2.1.2 - - @0xsequence/migration@2.1.2 - - @0xsequence/network@2.1.2 - - @0xsequence/provider@2.1.2 - - @0xsequence/relayer@2.1.2 - - @0xsequence/sessions@2.1.2 - - @0xsequence/signhub@2.1.2 - - @0xsequence/utils@2.1.2 - - @0xsequence/wallet@2.1.2 - -## 2.1.1 - -### Patch Changes - -- Add LAOS chain support -- Updated dependencies - - @0xsequence/abi@2.1.1 - - @0xsequence/account@2.1.1 - - @0xsequence/api@2.1.1 - - @0xsequence/auth@2.1.1 - - @0xsequence/core@2.1.1 - - @0xsequence/guard@2.1.1 - - @0xsequence/indexer@2.1.1 - - @0xsequence/metadata@2.1.1 - - @0xsequence/migration@2.1.1 - - @0xsequence/network@2.1.1 - - @0xsequence/provider@2.1.1 - - @0xsequence/relayer@2.1.1 - - @0xsequence/sessions@2.1.1 - - @0xsequence/signhub@2.1.1 - - @0xsequence/utils@2.1.1 - - @0xsequence/wallet@2.1.1 - -## 2.1.0 - -### Minor Changes - -- account: forward project access key when estimating fees and sending transactions - -### Patch Changes - -- sessions: save signatures with reference chain id -- Updated dependencies -- Updated dependencies - - @0xsequence/abi@2.1.0 - - @0xsequence/account@2.1.0 - - @0xsequence/api@2.1.0 - - @0xsequence/auth@2.1.0 - - @0xsequence/core@2.1.0 - - @0xsequence/guard@2.1.0 - - @0xsequence/indexer@2.1.0 - - @0xsequence/metadata@2.1.0 - - @0xsequence/migration@2.1.0 - - @0xsequence/network@2.1.0 - - @0xsequence/provider@2.1.0 - - @0xsequence/relayer@2.1.0 - - @0xsequence/sessions@2.1.0 - - @0xsequence/signhub@2.1.0 - - @0xsequence/utils@2.1.0 - - @0xsequence/wallet@2.1.0 - -## 2.0.26 - -### Patch Changes - -- account: fix chain id comparison -- Updated dependencies - - @0xsequence/abi@2.0.26 - - @0xsequence/account@2.0.26 - - @0xsequence/api@2.0.26 - - @0xsequence/auth@2.0.26 - - @0xsequence/core@2.0.26 - - @0xsequence/guard@2.0.26 - - @0xsequence/indexer@2.0.26 - - @0xsequence/metadata@2.0.26 - - @0xsequence/migration@2.0.26 - - @0xsequence/network@2.0.26 - - @0xsequence/provider@2.0.26 - - @0xsequence/relayer@2.0.26 - - @0xsequence/sessions@2.0.26 - - @0xsequence/signhub@2.0.26 - - @0xsequence/utils@2.0.26 - - @0xsequence/wallet@2.0.26 - -## 2.0.25 - -### Patch Changes - -- skale-nebula: deploy gas limit = 10m -- Updated dependencies - - @0xsequence/abi@2.0.25 - - @0xsequence/account@2.0.25 - - @0xsequence/api@2.0.25 - - @0xsequence/auth@2.0.25 - - @0xsequence/core@2.0.25 - - @0xsequence/guard@2.0.25 - - @0xsequence/indexer@2.0.25 - - @0xsequence/metadata@2.0.25 - - @0xsequence/migration@2.0.25 - - @0xsequence/network@2.0.25 - - @0xsequence/provider@2.0.25 - - @0xsequence/relayer@2.0.25 - - @0xsequence/sessions@2.0.25 - - @0xsequence/signhub@2.0.25 - - @0xsequence/utils@2.0.25 - - @0xsequence/wallet@2.0.25 - -## 2.0.24 - -### Patch Changes - -- sessions: arweave: configurable gateway url -- waas: use /status to get time drift before sending any intents -- Updated dependencies -- Updated dependencies - - @0xsequence/abi@2.0.24 - - @0xsequence/account@2.0.24 - - @0xsequence/api@2.0.24 - - @0xsequence/auth@2.0.24 - - @0xsequence/core@2.0.24 - - @0xsequence/guard@2.0.24 - - @0xsequence/indexer@2.0.24 - - @0xsequence/metadata@2.0.24 - - @0xsequence/migration@2.0.24 - - @0xsequence/network@2.0.24 - - @0xsequence/provider@2.0.24 - - @0xsequence/relayer@2.0.24 - - @0xsequence/sessions@2.0.24 - - @0xsequence/signhub@2.0.24 - - @0xsequence/utils@2.0.24 - - @0xsequence/wallet@2.0.24 - -## 2.0.23 - -### Patch Changes - -- Add The Root Network support -- Updated dependencies - - @0xsequence/abi@2.0.23 - - @0xsequence/account@2.0.23 - - @0xsequence/api@2.0.23 - - @0xsequence/auth@2.0.23 - - @0xsequence/core@2.0.23 - - @0xsequence/guard@2.0.23 - - @0xsequence/indexer@2.0.23 - - @0xsequence/metadata@2.0.23 - - @0xsequence/migration@2.0.23 - - @0xsequence/network@2.0.23 - - @0xsequence/provider@2.0.23 - - @0xsequence/relayer@2.0.23 - - @0xsequence/sessions@2.0.23 - - @0xsequence/signhub@2.0.23 - - @0xsequence/utils@2.0.23 - - @0xsequence/wallet@2.0.23 - -## 2.0.22 - -### Patch Changes - -- Add SKALE Nebula Mainnet support -- Updated dependencies - - @0xsequence/abi@2.0.22 - - @0xsequence/account@2.0.22 - - @0xsequence/api@2.0.22 - - @0xsequence/auth@2.0.22 - - @0xsequence/core@2.0.22 - - @0xsequence/guard@2.0.22 - - @0xsequence/indexer@2.0.22 - - @0xsequence/metadata@2.0.22 - - @0xsequence/migration@2.0.22 - - @0xsequence/network@2.0.22 - - @0xsequence/provider@2.0.22 - - @0xsequence/relayer@2.0.22 - - @0xsequence/sessions@2.0.22 - - @0xsequence/signhub@2.0.22 - - @0xsequence/utils@2.0.22 - - @0xsequence/wallet@2.0.22 - -## 2.0.21 - -### Patch Changes - -- account: add publishWitnessFor -- Updated dependencies - - @0xsequence/abi@2.0.21 - - @0xsequence/account@2.0.21 - - @0xsequence/api@2.0.21 - - @0xsequence/auth@2.0.21 - - @0xsequence/core@2.0.21 - - @0xsequence/guard@2.0.21 - - @0xsequence/indexer@2.0.21 - - @0xsequence/metadata@2.0.21 - - @0xsequence/migration@2.0.21 - - @0xsequence/network@2.0.21 - - @0xsequence/provider@2.0.21 - - @0xsequence/relayer@2.0.21 - - @0xsequence/sessions@2.0.21 - - @0xsequence/signhub@2.0.21 - - @0xsequence/utils@2.0.21 - - @0xsequence/wallet@2.0.21 - -## 2.0.20 - -### Patch Changes - -- upgrade deps, and improve waas session status handling -- Updated dependencies - - @0xsequence/abi@2.0.20 - - @0xsequence/account@2.0.20 - - @0xsequence/api@2.0.20 - - @0xsequence/auth@2.0.20 - - @0xsequence/core@2.0.20 - - @0xsequence/guard@2.0.20 - - @0xsequence/indexer@2.0.20 - - @0xsequence/metadata@2.0.20 - - @0xsequence/migration@2.0.20 - - @0xsequence/network@2.0.20 - - @0xsequence/provider@2.0.20 - - @0xsequence/relayer@2.0.20 - - @0xsequence/sessions@2.0.20 - - @0xsequence/signhub@2.0.20 - - @0xsequence/utils@2.0.20 - - @0xsequence/wallet@2.0.20 - -## 2.0.19 - -### Patch Changes - -- Add Immutable zkEVM support -- Updated dependencies - - @0xsequence/abi@2.0.19 - - @0xsequence/account@2.0.19 - - @0xsequence/api@2.0.19 - - @0xsequence/auth@2.0.19 - - @0xsequence/core@2.0.19 - - @0xsequence/guard@2.0.19 - - @0xsequence/indexer@2.0.19 - - @0xsequence/metadata@2.0.19 - - @0xsequence/migration@2.0.19 - - @0xsequence/network@2.0.19 - - @0xsequence/provider@2.0.19 - - @0xsequence/relayer@2.0.19 - - @0xsequence/sessions@2.0.19 - - @0xsequence/signhub@2.0.19 - - @0xsequence/utils@2.0.19 - - @0xsequence/wallet@2.0.19 - -## 2.0.18 - -### Patch Changes - -- waas: new contractCall transaction type -- sessions: add arweave owner -- Updated dependencies -- Updated dependencies - - @0xsequence/abi@2.0.18 - - @0xsequence/account@2.0.18 - - @0xsequence/api@2.0.18 - - @0xsequence/auth@2.0.18 - - @0xsequence/core@2.0.18 - - @0xsequence/guard@2.0.18 - - @0xsequence/indexer@2.0.18 - - @0xsequence/metadata@2.0.18 - - @0xsequence/migration@2.0.18 - - @0xsequence/network@2.0.18 - - @0xsequence/provider@2.0.18 - - @0xsequence/relayer@2.0.18 - - @0xsequence/sessions@2.0.18 - - @0xsequence/signhub@2.0.18 - - @0xsequence/utils@2.0.18 - - @0xsequence/wallet@2.0.18 - -## 2.0.17 - -### Patch Changes - -- update waas auth to clear session before signIn -- Updated dependencies - - @0xsequence/abi@2.0.17 - - @0xsequence/account@2.0.17 - - @0xsequence/api@2.0.17 - - @0xsequence/auth@2.0.17 - - @0xsequence/core@2.0.17 - - @0xsequence/guard@2.0.17 - - @0xsequence/indexer@2.0.17 - - @0xsequence/metadata@2.0.17 - - @0xsequence/migration@2.0.17 - - @0xsequence/network@2.0.17 - - @0xsequence/provider@2.0.17 - - @0xsequence/relayer@2.0.17 - - @0xsequence/sessions@2.0.17 - - @0xsequence/signhub@2.0.17 - - @0xsequence/utils@2.0.17 - - @0xsequence/wallet@2.0.17 - -## 2.0.16 - -### Patch Changes - -- Removed Astar chains -- Updated dependencies - - @0xsequence/abi@2.0.16 - - @0xsequence/account@2.0.16 - - @0xsequence/api@2.0.16 - - @0xsequence/auth@2.0.16 - - @0xsequence/core@2.0.16 - - @0xsequence/guard@2.0.16 - - @0xsequence/indexer@2.0.16 - - @0xsequence/metadata@2.0.16 - - @0xsequence/migration@2.0.16 - - @0xsequence/network@2.0.16 - - @0xsequence/provider@2.0.16 - - @0xsequence/relayer@2.0.16 - - @0xsequence/sessions@2.0.16 - - @0xsequence/signhub@2.0.16 - - @0xsequence/utils@2.0.16 - - @0xsequence/wallet@2.0.16 - -## 2.0.15 - -### Patch Changes - -- indexer: update bindings with token balance additions -- Updated dependencies - - @0xsequence/abi@2.0.15 - - @0xsequence/account@2.0.15 - - @0xsequence/api@2.0.15 - - @0xsequence/auth@2.0.15 - - @0xsequence/core@2.0.15 - - @0xsequence/guard@2.0.15 - - @0xsequence/indexer@2.0.15 - - @0xsequence/metadata@2.0.15 - - @0xsequence/migration@2.0.15 - - @0xsequence/network@2.0.15 - - @0xsequence/provider@2.0.15 - - @0xsequence/relayer@2.0.15 - - @0xsequence/sessions@2.0.15 - - @0xsequence/signhub@2.0.15 - - @0xsequence/utils@2.0.15 - - @0xsequence/wallet@2.0.15 - -## 2.0.14 - -### Patch Changes - -- sessions: arweave config reader -- network: add b3 and apechain mainnet configs -- Updated dependencies -- Updated dependencies - - @0xsequence/abi@2.0.14 - - @0xsequence/account@2.0.14 - - @0xsequence/api@2.0.14 - - @0xsequence/auth@2.0.14 - - @0xsequence/core@2.0.14 - - @0xsequence/guard@2.0.14 - - @0xsequence/indexer@2.0.14 - - @0xsequence/metadata@2.0.14 - - @0xsequence/migration@2.0.14 - - @0xsequence/network@2.0.14 - - @0xsequence/provider@2.0.14 - - @0xsequence/relayer@2.0.14 - - @0xsequence/sessions@2.0.14 - - @0xsequence/signhub@2.0.14 - - @0xsequence/utils@2.0.14 - - @0xsequence/wallet@2.0.14 - -## 2.0.13 - -### Patch Changes - -- network: toy-testnet -- Updated dependencies - - @0xsequence/abi@2.0.13 - - @0xsequence/account@2.0.13 - - @0xsequence/api@2.0.13 - - @0xsequence/auth@2.0.13 - - @0xsequence/core@2.0.13 - - @0xsequence/guard@2.0.13 - - @0xsequence/indexer@2.0.13 - - @0xsequence/metadata@2.0.13 - - @0xsequence/migration@2.0.13 - - @0xsequence/network@2.0.13 - - @0xsequence/provider@2.0.13 - - @0xsequence/relayer@2.0.13 - - @0xsequence/sessions@2.0.13 - - @0xsequence/signhub@2.0.13 - - @0xsequence/utils@2.0.13 - - @0xsequence/wallet@2.0.13 - -## 2.0.12 - -### Patch Changes - -- api: update bindings -- Updated dependencies - - @0xsequence/abi@2.0.12 - - @0xsequence/account@2.0.12 - - @0xsequence/api@2.0.12 - - @0xsequence/auth@2.0.12 - - @0xsequence/core@2.0.12 - - @0xsequence/guard@2.0.12 - - @0xsequence/indexer@2.0.12 - - @0xsequence/metadata@2.0.12 - - @0xsequence/migration@2.0.12 - - @0xsequence/network@2.0.12 - - @0xsequence/provider@2.0.12 - - @0xsequence/relayer@2.0.12 - - @0xsequence/sessions@2.0.12 - - @0xsequence/signhub@2.0.12 - - @0xsequence/utils@2.0.12 - - @0xsequence/wallet@2.0.12 - -## 2.0.11 - -### Patch Changes - -- waas: intents test fix -- api: update bindings -- Updated dependencies -- Updated dependencies - - @0xsequence/abi@2.0.11 - - @0xsequence/account@2.0.11 - - @0xsequence/api@2.0.11 - - @0xsequence/auth@2.0.11 - - @0xsequence/core@2.0.11 - - @0xsequence/guard@2.0.11 - - @0xsequence/indexer@2.0.11 - - @0xsequence/metadata@2.0.11 - - @0xsequence/migration@2.0.11 - - @0xsequence/network@2.0.11 - - @0xsequence/provider@2.0.11 - - @0xsequence/relayer@2.0.11 - - @0xsequence/sessions@2.0.11 - - @0xsequence/signhub@2.0.11 - - @0xsequence/utils@2.0.11 - - @0xsequence/wallet@2.0.11 - -## 2.0.10 - -### Patch Changes - -- network: soneium minato testnet -- Updated dependencies - - @0xsequence/abi@2.0.10 - - @0xsequence/account@2.0.10 - - @0xsequence/api@2.0.10 - - @0xsequence/auth@2.0.10 - - @0xsequence/core@2.0.10 - - @0xsequence/guard@2.0.10 - - @0xsequence/indexer@2.0.10 - - @0xsequence/metadata@2.0.10 - - @0xsequence/migration@2.0.10 - - @0xsequence/network@2.0.10 - - @0xsequence/provider@2.0.10 - - @0xsequence/relayer@2.0.10 - - @0xsequence/sessions@2.0.10 - - @0xsequence/signhub@2.0.10 - - @0xsequence/utils@2.0.10 - - @0xsequence/wallet@2.0.10 - -## 2.0.9 - -### Patch Changes - -- network: fix SKALE network name -- Updated dependencies - - @0xsequence/abi@2.0.9 - - @0xsequence/account@2.0.9 - - @0xsequence/api@2.0.9 - - @0xsequence/auth@2.0.9 - - @0xsequence/core@2.0.9 - - @0xsequence/guard@2.0.9 - - @0xsequence/indexer@2.0.9 - - @0xsequence/metadata@2.0.9 - - @0xsequence/migration@2.0.9 - - @0xsequence/network@2.0.9 - - @0xsequence/provider@2.0.9 - - @0xsequence/relayer@2.0.9 - - @0xsequence/sessions@2.0.9 - - @0xsequence/signhub@2.0.9 - - @0xsequence/utils@2.0.9 - - @0xsequence/wallet@2.0.9 - -## 2.0.8 - -### Patch Changes - -- metadata: update bindings -- Updated dependencies - - @0xsequence/abi@2.0.8 - - @0xsequence/account@2.0.8 - - @0xsequence/api@2.0.8 - - @0xsequence/auth@2.0.8 - - @0xsequence/core@2.0.8 - - @0xsequence/guard@2.0.8 - - @0xsequence/indexer@2.0.8 - - @0xsequence/metadata@2.0.8 - - @0xsequence/migration@2.0.8 - - @0xsequence/network@2.0.8 - - @0xsequence/provider@2.0.8 - - @0xsequence/relayer@2.0.8 - - @0xsequence/sessions@2.0.8 - - @0xsequence/signhub@2.0.8 - - @0xsequence/utils@2.0.8 - - @0xsequence/wallet@2.0.8 - -## 2.0.7 - -### Patch Changes - -- wallet request handler fix -- Updated dependencies - - @0xsequence/abi@2.0.7 - - @0xsequence/account@2.0.7 - - @0xsequence/api@2.0.7 - - @0xsequence/auth@2.0.7 - - @0xsequence/core@2.0.7 - - @0xsequence/guard@2.0.7 - - @0xsequence/indexer@2.0.7 - - @0xsequence/metadata@2.0.7 - - @0xsequence/migration@2.0.7 - - @0xsequence/network@2.0.7 - - @0xsequence/provider@2.0.7 - - @0xsequence/relayer@2.0.7 - - @0xsequence/sessions@2.0.7 - - @0xsequence/signhub@2.0.7 - - @0xsequence/utils@2.0.7 - - @0xsequence/wallet@2.0.7 - -## 2.0.6 - -### Patch Changes - -- network: matic -> pol -- Updated dependencies - - @0xsequence/abi@2.0.6 - - @0xsequence/account@2.0.6 - - @0xsequence/api@2.0.6 - - @0xsequence/auth@2.0.6 - - @0xsequence/core@2.0.6 - - @0xsequence/guard@2.0.6 - - @0xsequence/indexer@2.0.6 - - @0xsequence/metadata@2.0.6 - - @0xsequence/migration@2.0.6 - - @0xsequence/network@2.0.6 - - @0xsequence/provider@2.0.6 - - @0xsequence/relayer@2.0.6 - - @0xsequence/sessions@2.0.6 - - @0xsequence/signhub@2.0.6 - - @0xsequence/utils@2.0.6 - - @0xsequence/wallet@2.0.6 - -## 2.0.5 - -### Patch Changes - -- provider: update databeat to 0.9.2 -- Updated dependencies - - @0xsequence/abi@2.0.5 - - @0xsequence/account@2.0.5 - - @0xsequence/api@2.0.5 - - @0xsequence/auth@2.0.5 - - @0xsequence/core@2.0.5 - - @0xsequence/guard@2.0.5 - - @0xsequence/indexer@2.0.5 - - @0xsequence/metadata@2.0.5 - - @0xsequence/migration@2.0.5 - - @0xsequence/network@2.0.5 - - @0xsequence/provider@2.0.5 - - @0xsequence/relayer@2.0.5 - - @0xsequence/sessions@2.0.5 - - @0xsequence/signhub@2.0.5 - - @0xsequence/utils@2.0.5 - - @0xsequence/wallet@2.0.5 - -## 2.0.4 - -### Patch Changes - -- network: add skale-nebula-testnet -- Updated dependencies - - @0xsequence/abi@2.0.4 - - @0xsequence/account@2.0.4 - - @0xsequence/api@2.0.4 - - @0xsequence/auth@2.0.4 - - @0xsequence/core@2.0.4 - - @0xsequence/guard@2.0.4 - - @0xsequence/indexer@2.0.4 - - @0xsequence/metadata@2.0.4 - - @0xsequence/migration@2.0.4 - - @0xsequence/network@2.0.4 - - @0xsequence/provider@2.0.4 - - @0xsequence/relayer@2.0.4 - - @0xsequence/sessions@2.0.4 - - @0xsequence/signhub@2.0.4 - - @0xsequence/utils@2.0.4 - - @0xsequence/wallet@2.0.4 - -## 2.0.3 - -### Patch Changes - -- waas: check session status in SequenceWaaS.isSignedIn() -- Updated dependencies - - @0xsequence/abi@2.0.3 - - @0xsequence/account@2.0.3 - - @0xsequence/api@2.0.3 - - @0xsequence/auth@2.0.3 - - @0xsequence/core@2.0.3 - - @0xsequence/guard@2.0.3 - - @0xsequence/indexer@2.0.3 - - @0xsequence/metadata@2.0.3 - - @0xsequence/migration@2.0.3 - - @0xsequence/network@2.0.3 - - @0xsequence/provider@2.0.3 - - @0xsequence/relayer@2.0.3 - - @0xsequence/sessions@2.0.3 - - @0xsequence/signhub@2.0.3 - - @0xsequence/utils@2.0.3 - - @0xsequence/wallet@2.0.3 - -## 2.0.2 - -### Patch Changes - -- sessions: property convert serialized bignumber hex value to bigint -- Updated dependencies - - @0xsequence/abi@2.0.2 - - @0xsequence/account@2.0.2 - - @0xsequence/api@2.0.2 - - @0xsequence/auth@2.0.2 - - @0xsequence/core@2.0.2 - - @0xsequence/guard@2.0.2 - - @0xsequence/indexer@2.0.2 - - @0xsequence/metadata@2.0.2 - - @0xsequence/migration@2.0.2 - - @0xsequence/network@2.0.2 - - @0xsequence/provider@2.0.2 - - @0xsequence/relayer@2.0.2 - - @0xsequence/sessions@2.0.2 - - @0xsequence/signhub@2.0.2 - - @0xsequence/utils@2.0.2 - - @0xsequence/wallet@2.0.2 - -## 2.0.1 - -### Patch Changes - -- waas: http signature check for authenticator requests -- provider: unwrap legacy json rpc responses -- use json replacer and reviver for bigints -- Updated dependencies -- Updated dependencies -- Updated dependencies - - @0xsequence/abi@2.0.1 - - @0xsequence/account@2.0.1 - - @0xsequence/api@2.0.1 - - @0xsequence/auth@2.0.1 - - @0xsequence/core@2.0.1 - - @0xsequence/guard@2.0.1 - - @0xsequence/indexer@2.0.1 - - @0xsequence/metadata@2.0.1 - - @0xsequence/migration@2.0.1 - - @0xsequence/network@2.0.1 - - @0xsequence/provider@2.0.1 - - @0xsequence/relayer@2.0.1 - - @0xsequence/sessions@2.0.1 - - @0xsequence/signhub@2.0.1 - - @0xsequence/utils@2.0.1 - - @0xsequence/wallet@2.0.1 - -## 2.0.0 - -### Major Changes - -- ethers v6 - -### Patch Changes - -- Updated dependencies - - @0xsequence/abi@2.0.0 - - @0xsequence/account@2.0.0 - - @0xsequence/api@2.0.0 - - @0xsequence/auth@2.0.0 - - @0xsequence/core@2.0.0 - - @0xsequence/guard@2.0.0 - - @0xsequence/indexer@2.0.0 - - @0xsequence/metadata@2.0.0 - - @0xsequence/migration@2.0.0 - - @0xsequence/network@2.0.0 - - @0xsequence/provider@2.0.0 - - @0xsequence/relayer@2.0.0 - - @0xsequence/sessions@2.0.0 - - @0xsequence/signhub@2.0.0 - - @0xsequence/utils@2.0.0 - - @0xsequence/wallet@2.0.0 - -## 1.10.15 - -### Patch Changes - -- utils: extractProjectIdFromAccessKey -- Updated dependencies - - @0xsequence/abi@1.10.15 - - @0xsequence/account@1.10.15 - - @0xsequence/api@1.10.15 - - @0xsequence/auth@1.10.15 - - @0xsequence/core@1.10.15 - - @0xsequence/guard@1.10.15 - - @0xsequence/indexer@1.10.15 - - @0xsequence/metadata@1.10.15 - - @0xsequence/migration@1.10.15 - - @0xsequence/multicall@1.10.15 - - @0xsequence/network@1.10.15 - - @0xsequence/provider@1.10.15 - - @0xsequence/relayer@1.10.15 - - @0xsequence/sessions@1.10.15 - - @0xsequence/signhub@1.10.15 - - @0xsequence/utils@1.10.15 - - @0xsequence/wallet@1.10.15 - -## 1.10.14 - -### Patch Changes - -- network: add borne-testnet to allNetworks -- Updated dependencies - - @0xsequence/abi@1.10.14 - - @0xsequence/account@1.10.14 - - @0xsequence/api@1.10.14 - - @0xsequence/auth@1.10.14 - - @0xsequence/core@1.10.14 - - @0xsequence/guard@1.10.14 - - @0xsequence/indexer@1.10.14 - - @0xsequence/metadata@1.10.14 - - @0xsequence/migration@1.10.14 - - @0xsequence/multicall@1.10.14 - - @0xsequence/network@1.10.14 - - @0xsequence/provider@1.10.14 - - @0xsequence/relayer@1.10.14 - - @0xsequence/sessions@1.10.14 - - @0xsequence/signhub@1.10.14 - - @0xsequence/utils@1.10.14 - - @0xsequence/wallet@1.10.14 - -## 1.10.13 - -### Patch Changes - -- network: add borne testnet -- Updated dependencies - - @0xsequence/abi@1.10.13 - - @0xsequence/account@1.10.13 - - @0xsequence/api@1.10.13 - - @0xsequence/auth@1.10.13 - - @0xsequence/core@1.10.13 - - @0xsequence/guard@1.10.13 - - @0xsequence/indexer@1.10.13 - - @0xsequence/metadata@1.10.13 - - @0xsequence/migration@1.10.13 - - @0xsequence/multicall@1.10.13 - - @0xsequence/network@1.10.13 - - @0xsequence/provider@1.10.13 - - @0xsequence/relayer@1.10.13 - - @0xsequence/sessions@1.10.13 - - @0xsequence/signhub@1.10.13 - - @0xsequence/utils@1.10.13 - - @0xsequence/wallet@1.10.13 - -## 1.10.12 - -### Patch Changes - -- api: update bindings -- global/window -> globalThis -- Updated dependencies -- Updated dependencies - - @0xsequence/abi@1.10.12 - - @0xsequence/account@1.10.12 - - @0xsequence/api@1.10.12 - - @0xsequence/auth@1.10.12 - - @0xsequence/core@1.10.12 - - @0xsequence/guard@1.10.12 - - @0xsequence/indexer@1.10.12 - - @0xsequence/metadata@1.10.12 - - @0xsequence/migration@1.10.12 - - @0xsequence/multicall@1.10.12 - - @0xsequence/network@1.10.12 - - @0xsequence/provider@1.10.12 - - @0xsequence/relayer@1.10.12 - - @0xsequence/sessions@1.10.12 - - @0xsequence/signhub@1.10.12 - - @0xsequence/utils@1.10.12 - - @0xsequence/wallet@1.10.12 - -## 1.10.11 - -### Patch Changes - -- waas: updated intent.gen without webrpc types, errors exported from authenticator.gen -- Updated dependencies - - @0xsequence/abi@1.10.11 - - @0xsequence/account@1.10.11 - - @0xsequence/api@1.10.11 - - @0xsequence/auth@1.10.11 - - @0xsequence/core@1.10.11 - - @0xsequence/guard@1.10.11 - - @0xsequence/indexer@1.10.11 - - @0xsequence/metadata@1.10.11 - - @0xsequence/migration@1.10.11 - - @0xsequence/multicall@1.10.11 - - @0xsequence/network@1.10.11 - - @0xsequence/provider@1.10.11 - - @0xsequence/relayer@1.10.11 - - @0xsequence/sessions@1.10.11 - - @0xsequence/signhub@1.10.11 - - @0xsequence/utils@1.10.11 - - @0xsequence/wallet@1.10.11 - -## 1.10.10 - -### Patch Changes - -- metadata: update bindings with new contract collections api -- Updated dependencies - - @0xsequence/abi@1.10.10 - - @0xsequence/account@1.10.10 - - @0xsequence/api@1.10.10 - - @0xsequence/auth@1.10.10 - - @0xsequence/core@1.10.10 - - @0xsequence/guard@1.10.10 - - @0xsequence/indexer@1.10.10 - - @0xsequence/metadata@1.10.10 - - @0xsequence/migration@1.10.10 - - @0xsequence/multicall@1.10.10 - - @0xsequence/network@1.10.10 - - @0xsequence/provider@1.10.10 - - @0xsequence/relayer@1.10.10 - - @0xsequence/sessions@1.10.10 - - @0xsequence/signhub@1.10.10 - - @0xsequence/utils@1.10.10 - - @0xsequence/wallet@1.10.10 - -## 1.10.9 - -### Patch Changes - -- waas minor update -- Updated dependencies - - @0xsequence/abi@1.10.9 - - @0xsequence/account@1.10.9 - - @0xsequence/api@1.10.9 - - @0xsequence/auth@1.10.9 - - @0xsequence/core@1.10.9 - - @0xsequence/guard@1.10.9 - - @0xsequence/indexer@1.10.9 - - @0xsequence/metadata@1.10.9 - - @0xsequence/migration@1.10.9 - - @0xsequence/multicall@1.10.9 - - @0xsequence/network@1.10.9 - - @0xsequence/provider@1.10.9 - - @0xsequence/relayer@1.10.9 - - @0xsequence/sessions@1.10.9 - - @0xsequence/signhub@1.10.9 - - @0xsequence/utils@1.10.9 - - @0xsequence/wallet@1.10.9 - -## 1.10.8 - -### Patch Changes - -- update metadata bindings -- Updated dependencies - - @0xsequence/abi@1.10.8 - - @0xsequence/account@1.10.8 - - @0xsequence/api@1.10.8 - - @0xsequence/auth@1.10.8 - - @0xsequence/core@1.10.8 - - @0xsequence/guard@1.10.8 - - @0xsequence/indexer@1.10.8 - - @0xsequence/metadata@1.10.8 - - @0xsequence/migration@1.10.8 - - @0xsequence/multicall@1.10.8 - - @0xsequence/network@1.10.8 - - @0xsequence/provider@1.10.8 - - @0xsequence/relayer@1.10.8 - - @0xsequence/sessions@1.10.8 - - @0xsequence/signhub@1.10.8 - - @0xsequence/utils@1.10.8 - - @0xsequence/wallet@1.10.8 - -## 1.10.7 - -### Patch Changes - -- minor fixes to waas client -- Updated dependencies - - @0xsequence/abi@1.10.7 - - @0xsequence/account@1.10.7 - - @0xsequence/api@1.10.7 - - @0xsequence/auth@1.10.7 - - @0xsequence/core@1.10.7 - - @0xsequence/guard@1.10.7 - - @0xsequence/indexer@1.10.7 - - @0xsequence/metadata@1.10.7 - - @0xsequence/migration@1.10.7 - - @0xsequence/multicall@1.10.7 - - @0xsequence/network@1.10.7 - - @0xsequence/provider@1.10.7 - - @0xsequence/relayer@1.10.7 - - @0xsequence/sessions@1.10.7 - - @0xsequence/signhub@1.10.7 - - @0xsequence/utils@1.10.7 - - @0xsequence/wallet@1.10.7 - -## 1.10.6 - -### Patch Changes - -- metadata: update bindings -- Updated dependencies - - @0xsequence/abi@1.10.6 - - @0xsequence/account@1.10.6 - - @0xsequence/api@1.10.6 - - @0xsequence/auth@1.10.6 - - @0xsequence/core@1.10.6 - - @0xsequence/guard@1.10.6 - - @0xsequence/indexer@1.10.6 - - @0xsequence/metadata@1.10.6 - - @0xsequence/migration@1.10.6 - - @0xsequence/multicall@1.10.6 - - @0xsequence/network@1.10.6 - - @0xsequence/provider@1.10.6 - - @0xsequence/relayer@1.10.6 - - @0xsequence/sessions@1.10.6 - - @0xsequence/signhub@1.10.6 - - @0xsequence/utils@1.10.6 - - @0xsequence/wallet@1.10.6 - -## 1.10.5 - -### Patch Changes - -- network: ape-chain-testnet -> apechain-testnet -- Updated dependencies - - @0xsequence/abi@1.10.5 - - @0xsequence/account@1.10.5 - - @0xsequence/api@1.10.5 - - @0xsequence/auth@1.10.5 - - @0xsequence/core@1.10.5 - - @0xsequence/guard@1.10.5 - - @0xsequence/indexer@1.10.5 - - @0xsequence/metadata@1.10.5 - - @0xsequence/migration@1.10.5 - - @0xsequence/multicall@1.10.5 - - @0xsequence/network@1.10.5 - - @0xsequence/provider@1.10.5 - - @0xsequence/relayer@1.10.5 - - @0xsequence/sessions@1.10.5 - - @0xsequence/signhub@1.10.5 - - @0xsequence/utils@1.10.5 - - @0xsequence/wallet@1.10.5 - -## 1.10.4 - -### Patch Changes - -- network: add b3-sepolia, ape-chain-testnet, blast, blast-sepolia -- Updated dependencies - - @0xsequence/abi@1.10.4 - - @0xsequence/account@1.10.4 - - @0xsequence/api@1.10.4 - - @0xsequence/auth@1.10.4 - - @0xsequence/core@1.10.4 - - @0xsequence/guard@1.10.4 - - @0xsequence/indexer@1.10.4 - - @0xsequence/metadata@1.10.4 - - @0xsequence/migration@1.10.4 - - @0xsequence/multicall@1.10.4 - - @0xsequence/network@1.10.4 - - @0xsequence/provider@1.10.4 - - @0xsequence/relayer@1.10.4 - - @0xsequence/sessions@1.10.4 - - @0xsequence/signhub@1.10.4 - - @0xsequence/utils@1.10.4 - - @0xsequence/wallet@1.10.4 - -## 1.10.3 - -### Patch Changes - -- typing fix -- Updated dependencies - - @0xsequence/abi@1.10.3 - - @0xsequence/account@1.10.3 - - @0xsequence/api@1.10.3 - - @0xsequence/auth@1.10.3 - - @0xsequence/core@1.10.3 - - @0xsequence/guard@1.10.3 - - @0xsequence/indexer@1.10.3 - - @0xsequence/metadata@1.10.3 - - @0xsequence/migration@1.10.3 - - @0xsequence/multicall@1.10.3 - - @0xsequence/network@1.10.3 - - @0xsequence/provider@1.10.3 - - @0xsequence/relayer@1.10.3 - - @0xsequence/sessions@1.10.3 - - @0xsequence/signhub@1.10.3 - - @0xsequence/utils@1.10.3 - - @0xsequence/wallet@1.10.3 - -## 1.10.2 - -### Patch Changes - -- - waas: add getIdToken method - - indexer: update api client -- Updated dependencies - - @0xsequence/abi@1.10.2 - - @0xsequence/account@1.10.2 - - @0xsequence/api@1.10.2 - - @0xsequence/auth@1.10.2 - - @0xsequence/core@1.10.2 - - @0xsequence/guard@1.10.2 - - @0xsequence/indexer@1.10.2 - - @0xsequence/metadata@1.10.2 - - @0xsequence/migration@1.10.2 - - @0xsequence/multicall@1.10.2 - - @0xsequence/network@1.10.2 - - @0xsequence/provider@1.10.2 - - @0xsequence/relayer@1.10.2 - - @0xsequence/sessions@1.10.2 - - @0xsequence/signhub@1.10.2 - - @0xsequence/utils@1.10.2 - - @0xsequence/wallet@1.10.2 - -## 1.10.1 - -### Patch Changes - -- metadata: update bindings -- Updated dependencies - - @0xsequence/abi@1.10.1 - - @0xsequence/account@1.10.1 - - @0xsequence/api@1.10.1 - - @0xsequence/auth@1.10.1 - - @0xsequence/core@1.10.1 - - @0xsequence/guard@1.10.1 - - @0xsequence/indexer@1.10.1 - - @0xsequence/metadata@1.10.1 - - @0xsequence/migration@1.10.1 - - @0xsequence/multicall@1.10.1 - - @0xsequence/network@1.10.1 - - @0xsequence/provider@1.10.1 - - @0xsequence/relayer@1.10.1 - - @0xsequence/sessions@1.10.1 - - @0xsequence/signhub@1.10.1 - - @0xsequence/utils@1.10.1 - - @0xsequence/wallet@1.10.1 - -## 1.10.0 - -### Minor Changes - -- waas release v1.3.0 - -### Patch Changes - -- Updated dependencies - - @0xsequence/abi@1.10.0 - - @0xsequence/account@1.10.0 - - @0xsequence/api@1.10.0 - - @0xsequence/auth@1.10.0 - - @0xsequence/core@1.10.0 - - @0xsequence/guard@1.10.0 - - @0xsequence/indexer@1.10.0 - - @0xsequence/metadata@1.10.0 - - @0xsequence/migration@1.10.0 - - @0xsequence/multicall@1.10.0 - - @0xsequence/network@1.10.0 - - @0xsequence/provider@1.10.0 - - @0xsequence/relayer@1.10.0 - - @0xsequence/sessions@1.10.0 - - @0xsequence/signhub@1.10.0 - - @0xsequence/utils@1.10.0 - - @0xsequence/wallet@1.10.0 - -## 1.9.37 - -### Patch Changes - -- network: adds nativeToken data to NetworkMetadata constants -- Updated dependencies - - @0xsequence/abi@1.9.37 - - @0xsequence/account@1.9.37 - - @0xsequence/api@1.9.37 - - @0xsequence/auth@1.9.37 - - @0xsequence/core@1.9.37 - - @0xsequence/guard@1.9.37 - - @0xsequence/indexer@1.9.37 - - @0xsequence/metadata@1.9.37 - - @0xsequence/migration@1.9.37 - - @0xsequence/multicall@1.9.37 - - @0xsequence/network@1.9.37 - - @0xsequence/provider@1.9.37 - - @0xsequence/relayer@1.9.37 - - @0xsequence/sessions@1.9.37 - - @0xsequence/signhub@1.9.37 - - @0xsequence/utils@1.9.37 - - @0xsequence/wallet@1.9.37 - -## 1.9.36 - -### Patch Changes - -- guard: export client -- Updated dependencies - - @0xsequence/abi@1.9.36 - - @0xsequence/account@1.9.36 - - @0xsequence/api@1.9.36 - - @0xsequence/auth@1.9.36 - - @0xsequence/core@1.9.36 - - @0xsequence/guard@1.9.36 - - @0xsequence/indexer@1.9.36 - - @0xsequence/metadata@1.9.36 - - @0xsequence/migration@1.9.36 - - @0xsequence/multicall@1.9.36 - - @0xsequence/network@1.9.36 - - @0xsequence/provider@1.9.36 - - @0xsequence/relayer@1.9.36 - - @0xsequence/sessions@1.9.36 - - @0xsequence/signhub@1.9.36 - - @0xsequence/utils@1.9.36 - - @0xsequence/wallet@1.9.36 - -## 1.9.35 - -### Patch Changes - -- guard: update bindings -- Updated dependencies - - @0xsequence/abi@1.9.35 - - @0xsequence/account@1.9.35 - - @0xsequence/api@1.9.35 - - @0xsequence/auth@1.9.35 - - @0xsequence/core@1.9.35 - - @0xsequence/guard@1.9.35 - - @0xsequence/indexer@1.9.35 - - @0xsequence/metadata@1.9.35 - - @0xsequence/migration@1.9.35 - - @0xsequence/multicall@1.9.35 - - @0xsequence/network@1.9.35 - - @0xsequence/provider@1.9.35 - - @0xsequence/relayer@1.9.35 - - @0xsequence/sessions@1.9.35 - - @0xsequence/signhub@1.9.35 - - @0xsequence/utils@1.9.35 - - @0xsequence/wallet@1.9.35 - -## 1.9.34 - -### Patch Changes - -- waas: always use lowercase email -- Updated dependencies - - @0xsequence/abi@1.9.34 - - @0xsequence/account@1.9.34 - - @0xsequence/api@1.9.34 - - @0xsequence/auth@1.9.34 - - @0xsequence/core@1.9.34 - - @0xsequence/guard@1.9.34 - - @0xsequence/indexer@1.9.34 - - @0xsequence/metadata@1.9.34 - - @0xsequence/migration@1.9.34 - - @0xsequence/multicall@1.9.34 - - @0xsequence/network@1.9.34 - - @0xsequence/provider@1.9.34 - - @0xsequence/relayer@1.9.34 - - @0xsequence/sessions@1.9.34 - - @0xsequence/signhub@1.9.34 - - @0xsequence/utils@1.9.34 - - @0xsequence/wallet@1.9.34 - -## 1.9.33 - -### Patch Changes - -- waas: umd build -- Updated dependencies - - @0xsequence/abi@1.9.33 - - @0xsequence/account@1.9.33 - - @0xsequence/api@1.9.33 - - @0xsequence/auth@1.9.33 - - @0xsequence/core@1.9.33 - - @0xsequence/guard@1.9.33 - - @0xsequence/indexer@1.9.33 - - @0xsequence/metadata@1.9.33 - - @0xsequence/migration@1.9.33 - - @0xsequence/multicall@1.9.33 - - @0xsequence/network@1.9.33 - - @0xsequence/provider@1.9.33 - - @0xsequence/relayer@1.9.33 - - @0xsequence/sessions@1.9.33 - - @0xsequence/signhub@1.9.33 - - @0xsequence/utils@1.9.33 - - @0xsequence/wallet@1.9.33 - -## 1.9.32 - -### Patch Changes - -- indexer: update bindings -- Updated dependencies - - @0xsequence/abi@1.9.32 - - @0xsequence/account@1.9.32 - - @0xsequence/api@1.9.32 - - @0xsequence/auth@1.9.32 - - @0xsequence/core@1.9.32 - - @0xsequence/guard@1.9.32 - - @0xsequence/indexer@1.9.32 - - @0xsequence/metadata@1.9.32 - - @0xsequence/migration@1.9.32 - - @0xsequence/multicall@1.9.32 - - @0xsequence/network@1.9.32 - - @0xsequence/provider@1.9.32 - - @0xsequence/relayer@1.9.32 - - @0xsequence/sessions@1.9.32 - - @0xsequence/signhub@1.9.32 - - @0xsequence/utils@1.9.32 - - @0xsequence/wallet@1.9.32 - -## 1.9.31 - -### Patch Changes - -- metadata: token directory changes -- Updated dependencies - - @0xsequence/abi@1.9.31 - - @0xsequence/account@1.9.31 - - @0xsequence/api@1.9.31 - - @0xsequence/auth@1.9.31 - - @0xsequence/core@1.9.31 - - @0xsequence/guard@1.9.31 - - @0xsequence/indexer@1.9.31 - - @0xsequence/metadata@1.9.31 - - @0xsequence/migration@1.9.31 - - @0xsequence/multicall@1.9.31 - - @0xsequence/network@1.9.31 - - @0xsequence/provider@1.9.31 - - @0xsequence/relayer@1.9.31 - - @0xsequence/sessions@1.9.31 - - @0xsequence/signhub@1.9.31 - - @0xsequence/utils@1.9.31 - - @0xsequence/wallet@1.9.31 - -## 1.9.30 - -### Patch Changes - -- update -- Updated dependencies - - @0xsequence/abi@1.9.30 - - @0xsequence/account@1.9.30 - - @0xsequence/api@1.9.30 - - @0xsequence/auth@1.9.30 - - @0xsequence/core@1.9.30 - - @0xsequence/guard@1.9.30 - - @0xsequence/indexer@1.9.30 - - @0xsequence/metadata@1.9.30 - - @0xsequence/migration@1.9.30 - - @0xsequence/multicall@1.9.30 - - @0xsequence/network@1.9.30 - - @0xsequence/provider@1.9.30 - - @0xsequence/relayer@1.9.30 - - @0xsequence/sessions@1.9.30 - - @0xsequence/signhub@1.9.30 - - @0xsequence/utils@1.9.30 - - @0xsequence/wallet@1.9.30 - -## 1.9.29 - -### Patch Changes - -- disable gnosis chain -- Updated dependencies - - @0xsequence/abi@1.9.29 - - @0xsequence/account@1.9.29 - - @0xsequence/api@1.9.29 - - @0xsequence/auth@1.9.29 - - @0xsequence/core@1.9.29 - - @0xsequence/guard@1.9.29 - - @0xsequence/indexer@1.9.29 - - @0xsequence/metadata@1.9.29 - - @0xsequence/migration@1.9.29 - - @0xsequence/multicall@1.9.29 - - @0xsequence/network@1.9.29 - - @0xsequence/provider@1.9.29 - - @0xsequence/relayer@1.9.29 - - @0xsequence/sessions@1.9.29 - - @0xsequence/signhub@1.9.29 - - @0xsequence/utils@1.9.29 - - @0xsequence/wallet@1.9.29 - -## 1.9.28 - -### Patch Changes - -- add utils/merkletree -- Updated dependencies - - @0xsequence/abi@1.9.28 - - @0xsequence/account@1.9.28 - - @0xsequence/api@1.9.28 - - @0xsequence/auth@1.9.28 - - @0xsequence/core@1.9.28 - - @0xsequence/guard@1.9.28 - - @0xsequence/indexer@1.9.28 - - @0xsequence/metadata@1.9.28 - - @0xsequence/migration@1.9.28 - - @0xsequence/multicall@1.9.28 - - @0xsequence/network@1.9.28 - - @0xsequence/provider@1.9.28 - - @0xsequence/relayer@1.9.28 - - @0xsequence/sessions@1.9.28 - - @0xsequence/signhub@1.9.28 - - @0xsequence/utils@1.9.28 - - @0xsequence/wallet@1.9.28 - -## 1.9.27 - -### Patch Changes - -- network: optimistic -> optimism -- waas: remove defaults -- api, sessions: update bindings -- Updated dependencies -- Updated dependencies -- Updated dependencies - - @0xsequence/abi@1.9.27 - - @0xsequence/account@1.9.27 - - @0xsequence/api@1.9.27 - - @0xsequence/auth@1.9.27 - - @0xsequence/core@1.9.27 - - @0xsequence/guard@1.9.27 - - @0xsequence/indexer@1.9.27 - - @0xsequence/metadata@1.9.27 - - @0xsequence/migration@1.9.27 - - @0xsequence/multicall@1.9.27 - - @0xsequence/network@1.9.27 - - @0xsequence/provider@1.9.27 - - @0xsequence/relayer@1.9.27 - - @0xsequence/sessions@1.9.27 - - @0xsequence/signhub@1.9.27 - - @0xsequence/utils@1.9.27 - - @0xsequence/wallet@1.9.27 - -## 1.9.26 - -### Patch Changes - -- - add backend interfaces for pluggable interfaces - - introduce @0xsequence/react-native - - update pnpm to lockfile v9 -- Updated dependencies - - @0xsequence/abi@1.9.26 - - @0xsequence/account@1.9.26 - - @0xsequence/api@1.9.26 - - @0xsequence/auth@1.9.26 - - @0xsequence/core@1.9.26 - - @0xsequence/guard@1.9.26 - - @0xsequence/indexer@1.9.26 - - @0xsequence/metadata@1.9.26 - - @0xsequence/migration@1.9.26 - - @0xsequence/multicall@1.9.26 - - @0xsequence/network@1.9.26 - - @0xsequence/provider@1.9.26 - - @0xsequence/relayer@1.9.26 - - @0xsequence/sessions@1.9.26 - - @0xsequence/signhub@1.9.26 - - @0xsequence/utils@1.9.26 - - @0xsequence/wallet@1.9.26 - -## 1.9.25 - -### Patch Changes - -- update webrpc clients with new error types -- Updated dependencies - - @0xsequence/abi@1.9.25 - - @0xsequence/account@1.9.25 - - @0xsequence/api@1.9.25 - - @0xsequence/auth@1.9.25 - - @0xsequence/core@1.9.25 - - @0xsequence/guard@1.9.25 - - @0xsequence/indexer@1.9.25 - - @0xsequence/metadata@1.9.25 - - @0xsequence/migration@1.9.25 - - @0xsequence/multicall@1.9.25 - - @0xsequence/network@1.9.25 - - @0xsequence/provider@1.9.25 - - @0xsequence/relayer@1.9.25 - - @0xsequence/sessions@1.9.25 - - @0xsequence/signhub@1.9.25 - - @0xsequence/utils@1.9.25 - - @0xsequence/wallet@1.9.25 - -## 1.9.24 - -### Patch Changes - -- waas: add memoryStore backend to localStore -- Updated dependencies - - @0xsequence/abi@1.9.24 - - @0xsequence/account@1.9.24 - - @0xsequence/api@1.9.24 - - @0xsequence/auth@1.9.24 - - @0xsequence/core@1.9.24 - - @0xsequence/guard@1.9.24 - - @0xsequence/indexer@1.9.24 - - @0xsequence/metadata@1.9.24 - - @0xsequence/migration@1.9.24 - - @0xsequence/multicall@1.9.24 - - @0xsequence/network@1.9.24 - - @0xsequence/provider@1.9.24 - - @0xsequence/relayer@1.9.24 - - @0xsequence/sessions@1.9.24 - - @0xsequence/signhub@1.9.24 - - @0xsequence/utils@1.9.24 - - @0xsequence/wallet@1.9.24 - -## 1.9.23 - -### Patch Changes - -- update api client bindings -- Updated dependencies - - @0xsequence/abi@1.9.23 - - @0xsequence/account@1.9.23 - - @0xsequence/api@1.9.23 - - @0xsequence/auth@1.9.23 - - @0xsequence/core@1.9.23 - - @0xsequence/guard@1.9.23 - - @0xsequence/indexer@1.9.23 - - @0xsequence/metadata@1.9.23 - - @0xsequence/migration@1.9.23 - - @0xsequence/multicall@1.9.23 - - @0xsequence/network@1.9.23 - - @0xsequence/provider@1.9.23 - - @0xsequence/relayer@1.9.23 - - @0xsequence/sessions@1.9.23 - - @0xsequence/signhub@1.9.23 - - @0xsequence/utils@1.9.23 - - @0xsequence/wallet@1.9.23 - -## 1.9.22 - -### Patch Changes - -- update metadata client bindings -- Updated dependencies - - @0xsequence/abi@1.9.22 - - @0xsequence/account@1.9.22 - - @0xsequence/api@1.9.22 - - @0xsequence/auth@1.9.22 - - @0xsequence/core@1.9.22 - - @0xsequence/guard@1.9.22 - - @0xsequence/indexer@1.9.22 - - @0xsequence/metadata@1.9.22 - - @0xsequence/migration@1.9.22 - - @0xsequence/multicall@1.9.22 - - @0xsequence/network@1.9.22 - - @0xsequence/provider@1.9.22 - - @0xsequence/relayer@1.9.22 - - @0xsequence/sessions@1.9.22 - - @0xsequence/signhub@1.9.22 - - @0xsequence/utils@1.9.22 - - @0xsequence/wallet@1.9.22 - -## 1.9.21 - -### Patch Changes - -- api client bindings -- Updated dependencies - - @0xsequence/abi@1.9.21 - - @0xsequence/account@1.9.21 - - @0xsequence/api@1.9.21 - - @0xsequence/auth@1.9.21 - - @0xsequence/core@1.9.21 - - @0xsequence/guard@1.9.21 - - @0xsequence/indexer@1.9.21 - - @0xsequence/metadata@1.9.21 - - @0xsequence/migration@1.9.21 - - @0xsequence/multicall@1.9.21 - - @0xsequence/network@1.9.21 - - @0xsequence/provider@1.9.21 - - @0xsequence/relayer@1.9.21 - - @0xsequence/sessions@1.9.21 - - @0xsequence/signhub@1.9.21 - - @0xsequence/utils@1.9.21 - - @0xsequence/wallet@1.9.21 - -## 1.9.20 - -### Patch Changes - -- api client bindings update -- Updated dependencies - - @0xsequence/abi@1.9.20 - - @0xsequence/account@1.9.20 - - @0xsequence/api@1.9.20 - - @0xsequence/auth@1.9.20 - - @0xsequence/core@1.9.20 - - @0xsequence/guard@1.9.20 - - @0xsequence/indexer@1.9.20 - - @0xsequence/metadata@1.9.20 - - @0xsequence/migration@1.9.20 - - @0xsequence/multicall@1.9.20 - - @0xsequence/network@1.9.20 - - @0xsequence/provider@1.9.20 - - @0xsequence/relayer@1.9.20 - - @0xsequence/sessions@1.9.20 - - @0xsequence/signhub@1.9.20 - - @0xsequence/utils@1.9.20 - - @0xsequence/wallet@1.9.20 - -## 1.9.19 - -### Patch Changes - -- waas update -- Updated dependencies - - @0xsequence/abi@1.9.19 - - @0xsequence/account@1.9.19 - - @0xsequence/api@1.9.19 - - @0xsequence/auth@1.9.19 - - @0xsequence/core@1.9.19 - - @0xsequence/guard@1.9.19 - - @0xsequence/indexer@1.9.19 - - @0xsequence/metadata@1.9.19 - - @0xsequence/migration@1.9.19 - - @0xsequence/multicall@1.9.19 - - @0xsequence/network@1.9.19 - - @0xsequence/provider@1.9.19 - - @0xsequence/relayer@1.9.19 - - @0xsequence/sessions@1.9.19 - - @0xsequence/signhub@1.9.19 - - @0xsequence/utils@1.9.19 - - @0xsequence/wallet@1.9.19 - -## 1.9.18 - -### Patch Changes - -- provider: prohibit dangerous functions -- Updated dependencies - - @0xsequence/abi@1.9.18 - - @0xsequence/account@1.9.18 - - @0xsequence/api@1.9.18 - - @0xsequence/auth@1.9.18 - - @0xsequence/core@1.9.18 - - @0xsequence/guard@1.9.18 - - @0xsequence/indexer@1.9.18 - - @0xsequence/metadata@1.9.18 - - @0xsequence/migration@1.9.18 - - @0xsequence/multicall@1.9.18 - - @0xsequence/network@1.9.18 - - @0xsequence/provider@1.9.18 - - @0xsequence/relayer@1.9.18 - - @0xsequence/sessions@1.9.18 - - @0xsequence/signhub@1.9.18 - - @0xsequence/utils@1.9.18 - - @0xsequence/wallet@1.9.18 - -## 1.9.17 - -### Patch Changes - -- network: add xr-sepolia -- Updated dependencies - - @0xsequence/network@1.9.17 - - @0xsequence/abi@1.9.17 - - @0xsequence/account@1.9.17 - - @0xsequence/api@1.9.17 - - @0xsequence/auth@1.9.17 - - @0xsequence/core@1.9.17 - - @0xsequence/guard@1.9.17 - - @0xsequence/indexer@1.9.17 - - @0xsequence/metadata@1.9.17 - - @0xsequence/migration@1.9.17 - - @0xsequence/multicall@1.9.17 - - @0xsequence/provider@1.9.17 - - @0xsequence/relayer@1.9.17 - - @0xsequence/sessions@1.9.17 - - @0xsequence/signhub@1.9.17 - - @0xsequence/utils@1.9.17 - - @0xsequence/wallet@1.9.17 - -## 1.9.16 - -### Patch Changes - -- waas: sequence.feeOptions -- Updated dependencies - - @0xsequence/abi@1.9.16 - - @0xsequence/account@1.9.16 - - @0xsequence/api@1.9.16 - - @0xsequence/auth@1.9.16 - - @0xsequence/core@1.9.16 - - @0xsequence/guard@1.9.16 - - @0xsequence/indexer@1.9.16 - - @0xsequence/metadata@1.9.16 - - @0xsequence/migration@1.9.16 - - @0xsequence/multicall@1.9.16 - - @0xsequence/network@1.9.16 - - @0xsequence/provider@1.9.16 - - @0xsequence/relayer@1.9.16 - - @0xsequence/sessions@1.9.16 - - @0xsequence/signhub@1.9.16 - - @0xsequence/utils@1.9.16 - - @0xsequence/wallet@1.9.16 - -## 1.9.15 - -### Patch Changes - -- metadata: collection external_link field name fix -- Updated dependencies - - @0xsequence/abi@1.9.15 - - @0xsequence/account@1.9.15 - - @0xsequence/api@1.9.15 - - @0xsequence/auth@1.9.15 - - @0xsequence/core@1.9.15 - - @0xsequence/guard@1.9.15 - - @0xsequence/indexer@1.9.15 - - @0xsequence/metadata@1.9.15 - - @0xsequence/migration@1.9.15 - - @0xsequence/multicall@1.9.15 - - @0xsequence/network@1.9.15 - - @0xsequence/provider@1.9.15 - - @0xsequence/relayer@1.9.15 - - @0xsequence/sessions@1.9.15 - - @0xsequence/signhub@1.9.15 - - @0xsequence/utils@1.9.15 - - @0xsequence/wallet@1.9.15 - -## 1.9.14 - -### Patch Changes - -- network: astar-zkatana -> astar-zkyoto -- network: deprecate polygon mumbai network -- network: add xai and polygon amoy -- Updated dependencies -- Updated dependencies -- Updated dependencies - - @0xsequence/abi@1.9.14 - - @0xsequence/account@1.9.14 - - @0xsequence/api@1.9.14 - - @0xsequence/auth@1.9.14 - - @0xsequence/core@1.9.14 - - @0xsequence/guard@1.9.14 - - @0xsequence/indexer@1.9.14 - - @0xsequence/metadata@1.9.14 - - @0xsequence/migration@1.9.14 - - @0xsequence/multicall@1.9.14 - - @0xsequence/network@1.9.14 - - @0xsequence/provider@1.9.14 - - @0xsequence/relayer@1.9.14 - - @0xsequence/sessions@1.9.14 - - @0xsequence/signhub@1.9.14 - - @0xsequence/utils@1.9.14 - - @0xsequence/wallet@1.9.14 - -## 1.9.13 - -### Patch Changes - -- waas: fix @0xsequence/network dependency -- Updated dependencies - - @0xsequence/abi@1.9.13 - - @0xsequence/account@1.9.13 - - @0xsequence/api@1.9.13 - - @0xsequence/auth@1.9.13 - - @0xsequence/core@1.9.13 - - @0xsequence/guard@1.9.13 - - @0xsequence/indexer@1.9.13 - - @0xsequence/metadata@1.9.13 - - @0xsequence/migration@1.9.13 - - @0xsequence/multicall@1.9.13 - - @0xsequence/network@1.9.13 - - @0xsequence/provider@1.9.13 - - @0xsequence/relayer@1.9.13 - - @0xsequence/sessions@1.9.13 - - @0xsequence/signhub@1.9.13 - - @0xsequence/utils@1.9.13 - - @0xsequence/wallet@1.9.13 - -## 1.9.12 - -### Patch Changes - -- indexer: update rpc bindings -- provider: signMessage: Serialize the BytesLike or string message into hexstring before sending -- waas: SessionAuthProof -- Updated dependencies -- Updated dependencies -- Updated dependencies - - @0xsequence/abi@1.9.12 - - @0xsequence/account@1.9.12 - - @0xsequence/api@1.9.12 - - @0xsequence/auth@1.9.12 - - @0xsequence/core@1.9.12 - - @0xsequence/guard@1.9.12 - - @0xsequence/indexer@1.9.12 - - @0xsequence/metadata@1.9.12 - - @0xsequence/migration@1.9.12 - - @0xsequence/multicall@1.9.12 - - @0xsequence/network@1.9.12 - - @0xsequence/provider@1.9.12 - - @0xsequence/relayer@1.9.12 - - @0xsequence/sessions@1.9.12 - - @0xsequence/signhub@1.9.12 - - @0xsequence/utils@1.9.12 - - @0xsequence/wallet@1.9.12 - -## 1.9.11 - -### Patch Changes - -- metdata, update rpc bindings -- Updated dependencies - - @0xsequence/abi@1.9.11 - - @0xsequence/account@1.9.11 - - @0xsequence/api@1.9.11 - - @0xsequence/auth@1.9.11 - - @0xsequence/core@1.9.11 - - @0xsequence/guard@1.9.11 - - @0xsequence/indexer@1.9.11 - - @0xsequence/metadata@1.9.11 - - @0xsequence/migration@1.9.11 - - @0xsequence/multicall@1.9.11 - - @0xsequence/network@1.9.11 - - @0xsequence/provider@1.9.11 - - @0xsequence/relayer@1.9.11 - - @0xsequence/sessions@1.9.11 - - @0xsequence/signhub@1.9.11 - - @0xsequence/utils@1.9.11 - - @0xsequence/wallet@1.9.11 - -## 1.9.10 - -### Patch Changes - -- update metadata rpc bindings -- Updated dependencies - - @0xsequence/abi@1.9.10 - - @0xsequence/account@1.9.10 - - @0xsequence/api@1.9.10 - - @0xsequence/auth@1.9.10 - - @0xsequence/core@1.9.10 - - @0xsequence/guard@1.9.10 - - @0xsequence/indexer@1.9.10 - - @0xsequence/metadata@1.9.10 - - @0xsequence/migration@1.9.10 - - @0xsequence/multicall@1.9.10 - - @0xsequence/network@1.9.10 - - @0xsequence/provider@1.9.10 - - @0xsequence/relayer@1.9.10 - - @0xsequence/sessions@1.9.10 - - @0xsequence/signhub@1.9.10 - - @0xsequence/utils@1.9.10 - - @0xsequence/wallet@1.9.10 - -## 1.9.9 - -### Patch Changes - -- metadata, add SequenceCollections rpc client -- Updated dependencies - - @0xsequence/abi@1.9.9 - - @0xsequence/account@1.9.9 - - @0xsequence/api@1.9.9 - - @0xsequence/auth@1.9.9 - - @0xsequence/core@1.9.9 - - @0xsequence/guard@1.9.9 - - @0xsequence/indexer@1.9.9 - - @0xsequence/metadata@1.9.9 - - @0xsequence/migration@1.9.9 - - @0xsequence/multicall@1.9.9 - - @0xsequence/network@1.9.9 - - @0xsequence/provider@1.9.9 - - @0xsequence/relayer@1.9.9 - - @0xsequence/sessions@1.9.9 - - @0xsequence/signhub@1.9.9 - - @0xsequence/utils@1.9.9 - - @0xsequence/wallet@1.9.9 - -## 1.9.8 - -### Patch Changes - -- waas client update -- Updated dependencies - - @0xsequence/abi@1.9.8 - - @0xsequence/account@1.9.8 - - @0xsequence/api@1.9.8 - - @0xsequence/auth@1.9.8 - - @0xsequence/core@1.9.8 - - @0xsequence/guard@1.9.8 - - @0xsequence/indexer@1.9.8 - - @0xsequence/metadata@1.9.8 - - @0xsequence/migration@1.9.8 - - @0xsequence/multicall@1.9.8 - - @0xsequence/network@1.9.8 - - @0xsequence/provider@1.9.8 - - @0xsequence/relayer@1.9.8 - - @0xsequence/sessions@1.9.8 - - @0xsequence/signhub@1.9.8 - - @0xsequence/utils@1.9.8 - - @0xsequence/wallet@1.9.8 - -## 1.9.7 - -### Patch Changes - -- update rpc client bindings for api, metadata and relayer -- Updated dependencies - - @0xsequence/abi@1.9.7 - - @0xsequence/account@1.9.7 - - @0xsequence/api@1.9.7 - - @0xsequence/auth@1.9.7 - - @0xsequence/core@1.9.7 - - @0xsequence/guard@1.9.7 - - @0xsequence/indexer@1.9.7 - - @0xsequence/metadata@1.9.7 - - @0xsequence/migration@1.9.7 - - @0xsequence/multicall@1.9.7 - - @0xsequence/network@1.9.7 - - @0xsequence/provider@1.9.7 - - @0xsequence/relayer@1.9.7 - - @0xsequence/sessions@1.9.7 - - @0xsequence/signhub@1.9.7 - - @0xsequence/utils@1.9.7 - - @0xsequence/wallet@1.9.7 - -## 1.9.6 - -### Patch Changes - -- waas package update -- Updated dependencies - - @0xsequence/abi@1.9.6 - - @0xsequence/account@1.9.6 - - @0xsequence/api@1.9.6 - - @0xsequence/auth@1.9.6 - - @0xsequence/core@1.9.6 - - @0xsequence/guard@1.9.6 - - @0xsequence/indexer@1.9.6 - - @0xsequence/metadata@1.9.6 - - @0xsequence/migration@1.9.6 - - @0xsequence/multicall@1.9.6 - - @0xsequence/network@1.9.6 - - @0xsequence/provider@1.9.6 - - @0xsequence/relayer@1.9.6 - - @0xsequence/sessions@1.9.6 - - @0xsequence/signhub@1.9.6 - - @0xsequence/utils@1.9.6 - - @0xsequence/wallet@1.9.6 - -## 1.9.5 - -### Patch Changes - -- RpcRelayer prioritize project access key -- Updated dependencies - - @0xsequence/abi@1.9.5 - - @0xsequence/account@1.9.5 - - @0xsequence/api@1.9.5 - - @0xsequence/auth@1.9.5 - - @0xsequence/core@1.9.5 - - @0xsequence/guard@1.9.5 - - @0xsequence/indexer@1.9.5 - - @0xsequence/metadata@1.9.5 - - @0xsequence/migration@1.9.5 - - @0xsequence/multicall@1.9.5 - - @0xsequence/network@1.9.5 - - @0xsequence/provider@1.9.5 - - @0xsequence/relayer@1.9.5 - - @0xsequence/sessions@1.9.5 - - @0xsequence/signhub@1.9.5 - - @0xsequence/utils@1.9.5 - - @0xsequence/wallet@1.9.5 - -## 1.9.4 - -### Patch Changes - -- waas: fix network dependency -- Updated dependencies - - @0xsequence/abi@1.9.4 - - @0xsequence/account@1.9.4 - - @0xsequence/api@1.9.4 - - @0xsequence/auth@1.9.4 - - @0xsequence/core@1.9.4 - - @0xsequence/guard@1.9.4 - - @0xsequence/indexer@1.9.4 - - @0xsequence/metadata@1.9.4 - - @0xsequence/migration@1.9.4 - - @0xsequence/multicall@1.9.4 - - @0xsequence/network@1.9.4 - - @0xsequence/provider@1.9.4 - - @0xsequence/relayer@1.9.4 - - @0xsequence/sessions@1.9.4 - - @0xsequence/signhub@1.9.4 - - @0xsequence/utils@1.9.4 - - @0xsequence/wallet@1.9.4 - -## 1.9.3 - -### Patch Changes - -- provider: don't append access key to RPC url if user has already provided it -- Updated dependencies - - @0xsequence/abi@1.9.3 - - @0xsequence/account@1.9.3 - - @0xsequence/api@1.9.3 - - @0xsequence/auth@1.9.3 - - @0xsequence/core@1.9.3 - - @0xsequence/guard@1.9.3 - - @0xsequence/indexer@1.9.3 - - @0xsequence/metadata@1.9.3 - - @0xsequence/migration@1.9.3 - - @0xsequence/multicall@1.9.3 - - @0xsequence/network@1.9.3 - - @0xsequence/provider@1.9.3 - - @0xsequence/relayer@1.9.3 - - @0xsequence/sessions@1.9.3 - - @0xsequence/signhub@1.9.3 - - @0xsequence/utils@1.9.3 - - @0xsequence/wallet@1.9.3 - -## 1.9.2 - -### Patch Changes - -- network: add xai-sepolia -- Updated dependencies - - @0xsequence/abi@1.9.2 - - @0xsequence/account@1.9.2 - - @0xsequence/api@1.9.2 - - @0xsequence/auth@1.9.2 - - @0xsequence/core@1.9.2 - - @0xsequence/guard@1.9.2 - - @0xsequence/indexer@1.9.2 - - @0xsequence/metadata@1.9.2 - - @0xsequence/migration@1.9.2 - - @0xsequence/multicall@1.9.2 - - @0xsequence/network@1.9.2 - - @0xsequence/provider@1.9.2 - - @0xsequence/relayer@1.9.2 - - @0xsequence/sessions@1.9.2 - - @0xsequence/signhub@1.9.2 - - @0xsequence/utils@1.9.2 - - @0xsequence/wallet@1.9.2 - -## 1.9.1 - -### Patch Changes - -- analytics fix -- Updated dependencies - - @0xsequence/abi@1.9.1 - - @0xsequence/account@1.9.1 - - @0xsequence/api@1.9.1 - - @0xsequence/auth@1.9.1 - - @0xsequence/core@1.9.1 - - @0xsequence/guard@1.9.1 - - @0xsequence/indexer@1.9.1 - - @0xsequence/metadata@1.9.1 - - @0xsequence/migration@1.9.1 - - @0xsequence/multicall@1.9.1 - - @0xsequence/network@1.9.1 - - @0xsequence/provider@1.9.1 - - @0xsequence/relayer@1.9.1 - - @0xsequence/sessions@1.9.1 - - @0xsequence/signhub@1.9.1 - - @0xsequence/utils@1.9.1 - - @0xsequence/wallet@1.9.1 - -## 1.9.0 - -### Minor Changes - -- waas release - -### Patch Changes - -- Updated dependencies - - @0xsequence/abi@1.9.0 - - @0xsequence/account@1.9.0 - - @0xsequence/api@1.9.0 - - @0xsequence/auth@1.9.0 - - @0xsequence/core@1.9.0 - - @0xsequence/guard@1.9.0 - - @0xsequence/indexer@1.9.0 - - @0xsequence/metadata@1.9.0 - - @0xsequence/migration@1.9.0 - - @0xsequence/multicall@1.9.0 - - @0xsequence/network@1.9.0 - - @0xsequence/provider@1.9.0 - - @0xsequence/relayer@1.9.0 - - @0xsequence/sessions@1.9.0 - - @0xsequence/signhub@1.9.0 - - @0xsequence/utils@1.9.0 - - @0xsequence/wallet@1.9.0 - -## 1.8.8 - -### Patch Changes - -- update metadata bindings -- Updated dependencies - - @0xsequence/abi@1.8.8 - - @0xsequence/account@1.8.8 - - @0xsequence/api@1.8.8 - - @0xsequence/auth@1.8.8 - - @0xsequence/core@1.8.8 - - @0xsequence/guard@1.8.8 - - @0xsequence/indexer@1.8.8 - - @0xsequence/metadata@1.8.8 - - @0xsequence/migration@1.8.8 - - @0xsequence/multicall@1.8.8 - - @0xsequence/network@1.8.8 - - @0xsequence/provider@1.8.8 - - @0xsequence/relayer@1.8.8 - - @0xsequence/sessions@1.8.8 - - @0xsequence/signhub@1.8.8 - - @0xsequence/utils@1.8.8 - - @0xsequence/wallet@1.8.8 - -## 1.8.7 - -### Patch Changes - -- provider: update databeat to 0.9.1 -- Updated dependencies - - @0xsequence/abi@1.8.7 - - @0xsequence/account@1.8.7 - - @0xsequence/api@1.8.7 - - @0xsequence/auth@1.8.7 - - @0xsequence/core@1.8.7 - - @0xsequence/guard@1.8.7 - - @0xsequence/indexer@1.8.7 - - @0xsequence/metadata@1.8.7 - - @0xsequence/migration@1.8.7 - - @0xsequence/multicall@1.8.7 - - @0xsequence/network@1.8.7 - - @0xsequence/provider@1.8.7 - - @0xsequence/relayer@1.8.7 - - @0xsequence/sessions@1.8.7 - - @0xsequence/signhub@1.8.7 - - @0xsequence/utils@1.8.7 - - @0xsequence/wallet@1.8.7 - -## 1.8.6 - -### Patch Changes - -- guard: SignedOwnershipProof -- Updated dependencies - - @0xsequence/abi@1.8.6 - - @0xsequence/account@1.8.6 - - @0xsequence/api@1.8.6 - - @0xsequence/auth@1.8.6 - - @0xsequence/core@1.8.6 - - @0xsequence/guard@1.8.6 - - @0xsequence/indexer@1.8.6 - - @0xsequence/metadata@1.8.6 - - @0xsequence/migration@1.8.6 - - @0xsequence/multicall@1.8.6 - - @0xsequence/network@1.8.6 - - @0xsequence/provider@1.8.6 - - @0xsequence/relayer@1.8.6 - - @0xsequence/sessions@1.8.6 - - @0xsequence/signhub@1.8.6 - - @0xsequence/utils@1.8.6 - - @0xsequence/wallet@1.8.6 - -## 1.8.5 - -### Patch Changes - -- guard: signOwnershipProof and isSignedOwnershipProof -- Updated dependencies - - @0xsequence/abi@1.8.5 - - @0xsequence/account@1.8.5 - - @0xsequence/api@1.8.5 - - @0xsequence/auth@1.8.5 - - @0xsequence/core@1.8.5 - - @0xsequence/guard@1.8.5 - - @0xsequence/indexer@1.8.5 - - @0xsequence/metadata@1.8.5 - - @0xsequence/migration@1.8.5 - - @0xsequence/multicall@1.8.5 - - @0xsequence/network@1.8.5 - - @0xsequence/provider@1.8.5 - - @0xsequence/relayer@1.8.5 - - @0xsequence/sessions@1.8.5 - - @0xsequence/signhub@1.8.5 - - @0xsequence/utils@1.8.5 - - @0xsequence/wallet@1.8.5 - -## 1.8.4 - -### Patch Changes - -- network: add homeverse to networks list -- Updated dependencies - - @0xsequence/abi@1.8.4 - - @0xsequence/account@1.8.4 - - @0xsequence/api@1.8.4 - - @0xsequence/auth@1.8.4 - - @0xsequence/core@1.8.4 - - @0xsequence/guard@1.8.4 - - @0xsequence/indexer@1.8.4 - - @0xsequence/metadata@1.8.4 - - @0xsequence/migration@1.8.4 - - @0xsequence/multicall@1.8.4 - - @0xsequence/network@1.8.4 - - @0xsequence/provider@1.8.4 - - @0xsequence/relayer@1.8.4 - - @0xsequence/sessions@1.8.4 - - @0xsequence/signhub@1.8.4 - - @0xsequence/utils@1.8.4 - - @0xsequence/wallet@1.8.4 - -## 1.8.3 - -### Patch Changes - -- api: introduce basic linked wallet support -- Updated dependencies - - @0xsequence/abi@1.8.3 - - @0xsequence/account@1.8.3 - - @0xsequence/api@1.8.3 - - @0xsequence/auth@1.8.3 - - @0xsequence/core@1.8.3 - - @0xsequence/guard@1.8.3 - - @0xsequence/indexer@1.8.3 - - @0xsequence/metadata@1.8.3 - - @0xsequence/migration@1.8.3 - - @0xsequence/multicall@1.8.3 - - @0xsequence/network@1.8.3 - - @0xsequence/provider@1.8.3 - - @0xsequence/relayer@1.8.3 - - @0xsequence/sessions@1.8.3 - - @0xsequence/signhub@1.8.3 - - @0xsequence/utils@1.8.3 - - @0xsequence/wallet@1.8.3 - -## 1.8.2 - -### Patch Changes - -- provider: don't initialize analytics unless explicitly requested -- Updated dependencies - - @0xsequence/abi@1.8.2 - - @0xsequence/account@1.8.2 - - @0xsequence/api@1.8.2 - - @0xsequence/auth@1.8.2 - - @0xsequence/core@1.8.2 - - @0xsequence/guard@1.8.2 - - @0xsequence/indexer@1.8.2 - - @0xsequence/metadata@1.8.2 - - @0xsequence/migration@1.8.2 - - @0xsequence/multicall@1.8.2 - - @0xsequence/network@1.8.2 - - @0xsequence/provider@1.8.2 - - @0xsequence/relayer@1.8.2 - - @0xsequence/sessions@1.8.2 - - @0xsequence/signhub@1.8.2 - - @0xsequence/utils@1.8.2 - - @0xsequence/wallet@1.8.2 - -## 1.8.1 - -### Patch Changes - -- update to analytics provider -- Updated dependencies - - @0xsequence/abi@1.8.1 - - @0xsequence/account@1.8.1 - - @0xsequence/api@1.8.1 - - @0xsequence/auth@1.8.1 - - @0xsequence/core@1.8.1 - - @0xsequence/guard@1.8.1 - - @0xsequence/indexer@1.8.1 - - @0xsequence/metadata@1.8.1 - - @0xsequence/migration@1.8.1 - - @0xsequence/multicall@1.8.1 - - @0xsequence/network@1.8.1 - - @0xsequence/provider@1.8.1 - - @0xsequence/relayer@1.8.1 - - @0xsequence/sessions@1.8.1 - - @0xsequence/signhub@1.8.1 - - @0xsequence/utils@1.8.1 - - @0xsequence/wallet@1.8.1 - -## 1.8.0 - -### Minor Changes - -- provider: project analytics - -### Patch Changes - -- Updated dependencies - - @0xsequence/abi@1.8.0 - - @0xsequence/account@1.8.0 - - @0xsequence/api@1.8.0 - - @0xsequence/auth@1.8.0 - - @0xsequence/core@1.8.0 - - @0xsequence/guard@1.8.0 - - @0xsequence/indexer@1.8.0 - - @0xsequence/metadata@1.8.0 - - @0xsequence/migration@1.8.0 - - @0xsequence/multicall@1.8.0 - - @0xsequence/network@1.8.0 - - @0xsequence/provider@1.8.0 - - @0xsequence/relayer@1.8.0 - - @0xsequence/sessions@1.8.0 - - @0xsequence/signhub@1.8.0 - - @0xsequence/utils@1.8.0 - - @0xsequence/wallet@1.8.0 - -## 1.7.2 - -### Patch Changes - -- 0xsequence: ChainId should not be exported as a type -- account, wallet: fix nonce selection -- Updated dependencies -- Updated dependencies - - @0xsequence/abi@1.7.2 - - @0xsequence/account@1.7.2 - - @0xsequence/api@1.7.2 - - @0xsequence/auth@1.7.2 - - @0xsequence/core@1.7.2 - - @0xsequence/guard@1.7.2 - - @0xsequence/indexer@1.7.2 - - @0xsequence/metadata@1.7.2 - - @0xsequence/migration@1.7.2 - - @0xsequence/multicall@1.7.2 - - @0xsequence/network@1.7.2 - - @0xsequence/provider@1.7.2 - - @0xsequence/relayer@1.7.2 - - @0xsequence/sessions@1.7.2 - - @0xsequence/signhub@1.7.2 - - @0xsequence/utils@1.7.2 - - @0xsequence/wallet@1.7.2 - -## 1.7.1 - -### Patch Changes - -- network: add missing avalanche logoURI -- Updated dependencies - - @0xsequence/abi@1.7.1 - - @0xsequence/account@1.7.1 - - @0xsequence/api@1.7.1 - - @0xsequence/auth@1.7.1 - - @0xsequence/core@1.7.1 - - @0xsequence/guard@1.7.1 - - @0xsequence/indexer@1.7.1 - - @0xsequence/metadata@1.7.1 - - @0xsequence/migration@1.7.1 - - @0xsequence/multicall@1.7.1 - - @0xsequence/network@1.7.1 - - @0xsequence/provider@1.7.1 - - @0xsequence/relayer@1.7.1 - - @0xsequence/sessions@1.7.1 - - @0xsequence/signhub@1.7.1 - - @0xsequence/utils@1.7.1 - - @0xsequence/wallet@1.7.1 - -## 1.7.0 - -### Minor Changes - -- provider: projectAccessKey is now required - -### Patch Changes - -- network: add NetworkMetadata.logoURI property for all networks -- Updated dependencies -- Updated dependencies - - @0xsequence/abi@1.7.0 - - @0xsequence/account@1.7.0 - - @0xsequence/api@1.7.0 - - @0xsequence/auth@1.7.0 - - @0xsequence/core@1.7.0 - - @0xsequence/guard@1.7.0 - - @0xsequence/indexer@1.7.0 - - @0xsequence/metadata@1.7.0 - - @0xsequence/migration@1.7.0 - - @0xsequence/multicall@1.7.0 - - @0xsequence/network@1.7.0 - - @0xsequence/provider@1.7.0 - - @0xsequence/relayer@1.7.0 - - @0xsequence/sessions@1.7.0 - - @0xsequence/signhub@1.7.0 - - @0xsequence/utils@1.7.0 - - @0xsequence/wallet@1.7.0 - -## 1.6.3 - -### Patch Changes - -- network list update -- Updated dependencies - - @0xsequence/abi@1.6.3 - - @0xsequence/account@1.6.3 - - @0xsequence/api@1.6.3 - - @0xsequence/auth@1.6.3 - - @0xsequence/core@1.6.3 - - @0xsequence/guard@1.6.3 - - @0xsequence/indexer@1.6.3 - - @0xsequence/metadata@1.6.3 - - @0xsequence/migration@1.6.3 - - @0xsequence/multicall@1.6.3 - - @0xsequence/network@1.6.3 - - @0xsequence/provider@1.6.3 - - @0xsequence/relayer@1.6.3 - - @0xsequence/sessions@1.6.3 - - @0xsequence/signhub@1.6.3 - - @0xsequence/utils@1.6.3 - - @0xsequence/wallet@1.6.3 - -## 1.6.2 - -### Patch Changes - -- auth: projectAccessKey option -- wallet: use 12 bytes for random space -- Updated dependencies -- Updated dependencies - - @0xsequence/abi@1.6.2 - - @0xsequence/account@1.6.2 - - @0xsequence/api@1.6.2 - - @0xsequence/auth@1.6.2 - - @0xsequence/core@1.6.2 - - @0xsequence/guard@1.6.2 - - @0xsequence/indexer@1.6.2 - - @0xsequence/metadata@1.6.2 - - @0xsequence/migration@1.6.2 - - @0xsequence/multicall@1.6.2 - - @0xsequence/network@1.6.2 - - @0xsequence/provider@1.6.2 - - @0xsequence/relayer@1.6.2 - - @0xsequence/sessions@1.6.2 - - @0xsequence/signhub@1.6.2 - - @0xsequence/utils@1.6.2 - - @0xsequence/wallet@1.6.2 - -## 1.6.1 - -### Patch Changes - -- core: add simple config from subdigest support -- core: fix encode tree with subdigest -- account: implement buildOnChainSignature on Account -- Updated dependencies -- Updated dependencies -- Updated dependencies - - @0xsequence/abi@1.6.1 - - @0xsequence/account@1.6.1 - - @0xsequence/api@1.6.1 - - @0xsequence/auth@1.6.1 - - @0xsequence/core@1.6.1 - - @0xsequence/guard@1.6.1 - - @0xsequence/indexer@1.6.1 - - @0xsequence/metadata@1.6.1 - - @0xsequence/migration@1.6.1 - - @0xsequence/multicall@1.6.1 - - @0xsequence/network@1.6.1 - - @0xsequence/provider@1.6.1 - - @0xsequence/relayer@1.6.1 - - @0xsequence/sessions@1.6.1 - - @0xsequence/signhub@1.6.1 - - @0xsequence/utils@1.6.1 - - @0xsequence/wallet@1.6.1 - -## 1.6.0 - -### Minor Changes - -- account, wallet: parallel transactions by default - -### Patch Changes - -- provider: emit disconnect on sign out -- Updated dependencies -- Updated dependencies - - @0xsequence/abi@1.6.0 - - @0xsequence/account@1.6.0 - - @0xsequence/api@1.6.0 - - @0xsequence/auth@1.6.0 - - @0xsequence/core@1.6.0 - - @0xsequence/guard@1.6.0 - - @0xsequence/indexer@1.6.0 - - @0xsequence/metadata@1.6.0 - - @0xsequence/migration@1.6.0 - - @0xsequence/multicall@1.6.0 - - @0xsequence/network@1.6.0 - - @0xsequence/provider@1.6.0 - - @0xsequence/relayer@1.6.0 - - @0xsequence/sessions@1.6.0 - - @0xsequence/signhub@1.6.0 - - @0xsequence/utils@1.6.0 - - @0xsequence/wallet@1.6.0 - -## 1.5.0 - -### Minor Changes - -- signhub: add 'signing' signer status - -### Patch Changes - -- auth: Session.open: onAccountAddress callback -- account: allow empty transaction bundles -- Updated dependencies -- Updated dependencies -- Updated dependencies - - @0xsequence/abi@1.5.0 - - @0xsequence/account@1.5.0 - - @0xsequence/api@1.5.0 - - @0xsequence/auth@1.5.0 - - @0xsequence/core@1.5.0 - - @0xsequence/guard@1.5.0 - - @0xsequence/indexer@1.5.0 - - @0xsequence/metadata@1.5.0 - - @0xsequence/migration@1.5.0 - - @0xsequence/multicall@1.5.0 - - @0xsequence/network@1.5.0 - - @0xsequence/provider@1.5.0 - - @0xsequence/relayer@1.5.0 - - @0xsequence/sessions@1.5.0 - - @0xsequence/signhub@1.5.0 - - @0xsequence/utils@1.5.0 - - @0xsequence/wallet@1.5.0 - -## 1.4.9 - -### Patch Changes - -- rename SequenceMetadataClient to SequenceMetadata -- Updated dependencies - - @0xsequence/abi@1.4.9 - - @0xsequence/account@1.4.9 - - @0xsequence/api@1.4.9 - - @0xsequence/auth@1.4.9 - - @0xsequence/core@1.4.9 - - @0xsequence/guard@1.4.9 - - @0xsequence/indexer@1.4.9 - - @0xsequence/metadata@1.4.9 - - @0xsequence/migration@1.4.9 - - @0xsequence/multicall@1.4.9 - - @0xsequence/network@1.4.9 - - @0xsequence/provider@1.4.9 - - @0xsequence/relayer@1.4.9 - - @0xsequence/sessions@1.4.9 - - @0xsequence/signhub@1.4.9 - - @0xsequence/utils@1.4.9 - - @0xsequence/wallet@1.4.9 - -## 1.4.8 - -### Patch Changes - -- account: Account.getSigners -- Updated dependencies - - @0xsequence/abi@1.4.8 - - @0xsequence/account@1.4.8 - - @0xsequence/api@1.4.8 - - @0xsequence/auth@1.4.8 - - @0xsequence/core@1.4.8 - - @0xsequence/guard@1.4.8 - - @0xsequence/indexer@1.4.8 - - @0xsequence/metadata@1.4.8 - - @0xsequence/migration@1.4.8 - - @0xsequence/multicall@1.4.8 - - @0xsequence/network@1.4.8 - - @0xsequence/provider@1.4.8 - - @0xsequence/relayer@1.4.8 - - @0xsequence/sessions@1.4.8 - - @0xsequence/signhub@1.4.8 - - @0xsequence/utils@1.4.8 - - @0xsequence/wallet@1.4.8 - -## 1.4.7 - -### Patch Changes - -- update indexer client bindings -- Updated dependencies - - @0xsequence/abi@1.4.7 - - @0xsequence/account@1.4.7 - - @0xsequence/api@1.4.7 - - @0xsequence/auth@1.4.7 - - @0xsequence/core@1.4.7 - - @0xsequence/guard@1.4.7 - - @0xsequence/indexer@1.4.7 - - @0xsequence/metadata@1.4.7 - - @0xsequence/migration@1.4.7 - - @0xsequence/multicall@1.4.7 - - @0xsequence/network@1.4.7 - - @0xsequence/provider@1.4.7 - - @0xsequence/relayer@1.4.7 - - @0xsequence/sessions@1.4.7 - - @0xsequence/signhub@1.4.7 - - @0xsequence/utils@1.4.7 - - @0xsequence/wallet@1.4.7 - -## 1.4.6 - -### Patch Changes - -- - add sepolia networks, mark goerli as deprecated - - update indexer client bindings -- Updated dependencies - - @0xsequence/abi@1.4.6 - - @0xsequence/account@1.4.6 - - @0xsequence/api@1.4.6 - - @0xsequence/auth@1.4.6 - - @0xsequence/core@1.4.6 - - @0xsequence/guard@1.4.6 - - @0xsequence/indexer@1.4.6 - - @0xsequence/metadata@1.4.6 - - @0xsequence/migration@1.4.6 - - @0xsequence/multicall@1.4.6 - - @0xsequence/network@1.4.6 - - @0xsequence/provider@1.4.6 - - @0xsequence/relayer@1.4.6 - - @0xsequence/sessions@1.4.6 - - @0xsequence/signhub@1.4.6 - - @0xsequence/utils@1.4.6 - - @0xsequence/wallet@1.4.6 - -## 1.4.5 - -### Patch Changes - -- indexer/metadata: update client bindings -- auth: selectWallet with new address -- Updated dependencies -- Updated dependencies - - @0xsequence/abi@1.4.5 - - @0xsequence/account@1.4.5 - - @0xsequence/api@1.4.5 - - @0xsequence/auth@1.4.5 - - @0xsequence/core@1.4.5 - - @0xsequence/guard@1.4.5 - - @0xsequence/indexer@1.4.5 - - @0xsequence/metadata@1.4.5 - - @0xsequence/migration@1.4.5 - - @0xsequence/multicall@1.4.5 - - @0xsequence/network@1.4.5 - - @0xsequence/provider@1.4.5 - - @0xsequence/relayer@1.4.5 - - @0xsequence/sessions@1.4.5 - - @0xsequence/signhub@1.4.5 - - @0xsequence/utils@1.4.5 - - @0xsequence/wallet@1.4.5 - -## 1.4.4 - -### Patch Changes - -- indexer: update bindings -- auth: handle jwt expiry -- Updated dependencies -- Updated dependencies - - @0xsequence/abi@1.4.4 - - @0xsequence/account@1.4.4 - - @0xsequence/api@1.4.4 - - @0xsequence/auth@1.4.4 - - @0xsequence/core@1.4.4 - - @0xsequence/guard@1.4.4 - - @0xsequence/indexer@1.4.4 - - @0xsequence/metadata@1.4.4 - - @0xsequence/migration@1.4.4 - - @0xsequence/multicall@1.4.4 - - @0xsequence/network@1.4.4 - - @0xsequence/provider@1.4.4 - - @0xsequence/relayer@1.4.4 - - @0xsequence/sessions@1.4.4 - - @0xsequence/signhub@1.4.4 - - @0xsequence/utils@1.4.4 - - @0xsequence/wallet@1.4.4 - -## 1.4.3 - -### Patch Changes - -- guard: return active status from GuardSigner.getAuthMethods -- Updated dependencies - - @0xsequence/abi@1.4.3 - - @0xsequence/account@1.4.3 - - @0xsequence/api@1.4.3 - - @0xsequence/auth@1.4.3 - - @0xsequence/core@1.4.3 - - @0xsequence/guard@1.4.3 - - @0xsequence/indexer@1.4.3 - - @0xsequence/metadata@1.4.3 - - @0xsequence/migration@1.4.3 - - @0xsequence/multicall@1.4.3 - - @0xsequence/network@1.4.3 - - @0xsequence/provider@1.4.3 - - @0xsequence/relayer@1.4.3 - - @0xsequence/sessions@1.4.3 - - @0xsequence/signhub@1.4.3 - - @0xsequence/utils@1.4.3 - - @0xsequence/wallet@1.4.3 - -## 1.4.2 - -### Patch Changes - -- guard: update bindings -- Updated dependencies - - @0xsequence/abi@1.4.2 - - @0xsequence/account@1.4.2 - - @0xsequence/api@1.4.2 - - @0xsequence/auth@1.4.2 - - @0xsequence/core@1.4.2 - - @0xsequence/guard@1.4.2 - - @0xsequence/indexer@1.4.2 - - @0xsequence/metadata@1.4.2 - - @0xsequence/migration@1.4.2 - - @0xsequence/multicall@1.4.2 - - @0xsequence/network@1.4.2 - - @0xsequence/provider@1.4.2 - - @0xsequence/relayer@1.4.2 - - @0xsequence/sessions@1.4.2 - - @0xsequence/signhub@1.4.2 - - @0xsequence/utils@1.4.2 - - @0xsequence/wallet@1.4.2 - -## 1.4.1 - -### Patch Changes - -- network: remove unused networks -- signhub: orchestrator interface -- guard: auth methods interface -- guard: update bindings for pin and totp -- guard: no more retry logic -- Updated dependencies -- Updated dependencies -- Updated dependencies -- Updated dependencies -- Updated dependencies - - @0xsequence/abi@1.4.1 - - @0xsequence/account@1.4.1 - - @0xsequence/api@1.4.1 - - @0xsequence/auth@1.4.1 - - @0xsequence/core@1.4.1 - - @0xsequence/guard@1.4.1 - - @0xsequence/indexer@1.4.1 - - @0xsequence/metadata@1.4.1 - - @0xsequence/migration@1.4.1 - - @0xsequence/multicall@1.4.1 - - @0xsequence/network@1.4.1 - - @0xsequence/provider@1.4.1 - - @0xsequence/relayer@1.4.1 - - @0xsequence/sessions@1.4.1 - - @0xsequence/signhub@1.4.1 - - @0xsequence/utils@1.4.1 - - @0xsequence/wallet@1.4.1 - -## 1.4.0 - -### Minor Changes - -- project access key support - -### Patch Changes - -- Updated dependencies - - @0xsequence/abi@1.4.0 - - @0xsequence/account@1.4.0 - - @0xsequence/api@1.4.0 - - @0xsequence/auth@1.4.0 - - @0xsequence/core@1.4.0 - - @0xsequence/guard@1.4.0 - - @0xsequence/indexer@1.4.0 - - @0xsequence/metadata@1.4.0 - - @0xsequence/migration@1.4.0 - - @0xsequence/multicall@1.4.0 - - @0xsequence/network@1.4.0 - - @0xsequence/provider@1.4.0 - - @0xsequence/relayer@1.4.0 - - @0xsequence/sessions@1.4.0 - - @0xsequence/signhub@1.4.0 - - @0xsequence/utils@1.4.0 - - @0xsequence/wallet@1.4.0 - -## 1.3.0 - -### Minor Changes - -- signhub: account children - -### Patch Changes - -- guard: do not throw when building deploy transaction -- network: snowtrace.io -> subnets.avax.network/c-chain -- Updated dependencies -- Updated dependencies -- Updated dependencies - - @0xsequence/abi@1.3.0 - - @0xsequence/account@1.3.0 - - @0xsequence/api@1.3.0 - - @0xsequence/auth@1.3.0 - - @0xsequence/core@1.3.0 - - @0xsequence/guard@1.3.0 - - @0xsequence/indexer@1.3.0 - - @0xsequence/metadata@1.3.0 - - @0xsequence/migration@1.3.0 - - @0xsequence/multicall@1.3.0 - - @0xsequence/network@1.3.0 - - @0xsequence/provider@1.3.0 - - @0xsequence/relayer@1.3.0 - - @0xsequence/sessions@1.3.0 - - @0xsequence/signhub@1.3.0 - - @0xsequence/utils@1.3.0 - - @0xsequence/wallet@1.3.0 - -## 1.2.9 - -### Patch Changes - -- account: AccountSigner.sendTransaction simulateForFeeOptions -- relayer: update bindings -- Updated dependencies -- Updated dependencies - - @0xsequence/abi@1.2.9 - - @0xsequence/account@1.2.9 - - @0xsequence/api@1.2.9 - - @0xsequence/auth@1.2.9 - - @0xsequence/core@1.2.9 - - @0xsequence/guard@1.2.9 - - @0xsequence/indexer@1.2.9 - - @0xsequence/metadata@1.2.9 - - @0xsequence/migration@1.2.9 - - @0xsequence/multicall@1.2.9 - - @0xsequence/network@1.2.9 - - @0xsequence/provider@1.2.9 - - @0xsequence/relayer@1.2.9 - - @0xsequence/sessions@1.2.9 - - @0xsequence/signhub@1.2.9 - - @0xsequence/utils@1.2.9 - - @0xsequence/wallet@1.2.9 - -## 1.2.8 - -### Patch Changes - -- rename X-Sequence-Token-Key header to X-Access-Key -- Updated dependencies - - @0xsequence/abi@1.2.8 - - @0xsequence/account@1.2.8 - - @0xsequence/api@1.2.8 - - @0xsequence/auth@1.2.8 - - @0xsequence/core@1.2.8 - - @0xsequence/guard@1.2.8 - - @0xsequence/indexer@1.2.8 - - @0xsequence/metadata@1.2.8 - - @0xsequence/migration@1.2.8 - - @0xsequence/multicall@1.2.8 - - @0xsequence/network@1.2.8 - - @0xsequence/provider@1.2.8 - - @0xsequence/relayer@1.2.8 - - @0xsequence/sessions@1.2.8 - - @0xsequence/signhub@1.2.8 - - @0xsequence/utils@1.2.8 - - @0xsequence/wallet@1.2.8 - -## 1.2.7 - -### Patch Changes - -- add x-sequence-token-key to clients -- Updated dependencies - - @0xsequence/abi@1.2.7 - - @0xsequence/account@1.2.7 - - @0xsequence/api@1.2.7 - - @0xsequence/auth@1.2.7 - - @0xsequence/core@1.2.7 - - @0xsequence/guard@1.2.7 - - @0xsequence/indexer@1.2.7 - - @0xsequence/metadata@1.2.7 - - @0xsequence/migration@1.2.7 - - @0xsequence/multicall@1.2.7 - - @0xsequence/network@1.2.7 - - @0xsequence/provider@1.2.7 - - @0xsequence/relayer@1.2.7 - - @0xsequence/sessions@1.2.7 - - @0xsequence/signhub@1.2.7 - - @0xsequence/utils@1.2.7 - - @0xsequence/wallet@1.2.7 - -## 1.2.6 - -### Patch Changes - -- Fix bind multicall provider -- Updated dependencies - - @0xsequence/abi@1.2.6 - - @0xsequence/account@1.2.6 - - @0xsequence/api@1.2.6 - - @0xsequence/auth@1.2.6 - - @0xsequence/core@1.2.6 - - @0xsequence/guard@1.2.6 - - @0xsequence/indexer@1.2.6 - - @0xsequence/metadata@1.2.6 - - @0xsequence/migration@1.2.6 - - @0xsequence/multicall@1.2.6 - - @0xsequence/network@1.2.6 - - @0xsequence/provider@1.2.6 - - @0xsequence/relayer@1.2.6 - - @0xsequence/sessions@1.2.6 - - @0xsequence/signhub@1.2.6 - - @0xsequence/utils@1.2.6 - - @0xsequence/wallet@1.2.6 - -## 1.2.5 - -### Patch Changes - -- Multicall default configuration fixes -- Updated dependencies - - @0xsequence/abi@1.2.5 - - @0xsequence/account@1.2.5 - - @0xsequence/api@1.2.5 - - @0xsequence/auth@1.2.5 - - @0xsequence/core@1.2.5 - - @0xsequence/guard@1.2.5 - - @0xsequence/indexer@1.2.5 - - @0xsequence/metadata@1.2.5 - - @0xsequence/migration@1.2.5 - - @0xsequence/multicall@1.2.5 - - @0xsequence/network@1.2.5 - - @0xsequence/provider@1.2.5 - - @0xsequence/relayer@1.2.5 - - @0xsequence/sessions@1.2.5 - - @0xsequence/signhub@1.2.5 - - @0xsequence/utils@1.2.5 - - @0xsequence/wallet@1.2.5 - -## 1.2.4 - -### Patch Changes - -- provider: Adding missing payment provider types to PaymentProviderOption -- provider: WalletRequestHandler.notifyChainChanged -- Updated dependencies -- Updated dependencies - - @0xsequence/abi@1.2.4 - - @0xsequence/account@1.2.4 - - @0xsequence/api@1.2.4 - - @0xsequence/auth@1.2.4 - - @0xsequence/core@1.2.4 - - @0xsequence/guard@1.2.4 - - @0xsequence/indexer@1.2.4 - - @0xsequence/metadata@1.2.4 - - @0xsequence/migration@1.2.4 - - @0xsequence/multicall@1.2.4 - - @0xsequence/network@1.2.4 - - @0xsequence/provider@1.2.4 - - @0xsequence/relayer@1.2.4 - - @0xsequence/sessions@1.2.4 - - @0xsequence/signhub@1.2.4 - - @0xsequence/utils@1.2.4 - - @0xsequence/wallet@1.2.4 - -## 1.2.3 - -### Patch Changes - -- auth, provider: connect to accept optional authorizeNonce -- Updated dependencies - - @0xsequence/abi@1.2.3 - - @0xsequence/account@1.2.3 - - @0xsequence/api@1.2.3 - - @0xsequence/auth@1.2.3 - - @0xsequence/core@1.2.3 - - @0xsequence/guard@1.2.3 - - @0xsequence/indexer@1.2.3 - - @0xsequence/metadata@1.2.3 - - @0xsequence/migration@1.2.3 - - @0xsequence/multicall@1.2.3 - - @0xsequence/network@1.2.3 - - @0xsequence/provider@1.2.3 - - @0xsequence/relayer@1.2.3 - - @0xsequence/sessions@1.2.3 - - @0xsequence/signhub@1.2.3 - - @0xsequence/utils@1.2.3 - - @0xsequence/wallet@1.2.3 - -## 1.2.2 - -### Patch Changes - -- provider: allow createContract calls -- core: check for explicit zero address in contract deployments -- Updated dependencies -- Updated dependencies - - @0xsequence/abi@1.2.2 - - @0xsequence/account@1.2.2 - - @0xsequence/api@1.2.2 - - @0xsequence/auth@1.2.2 - - @0xsequence/core@1.2.2 - - @0xsequence/guard@1.2.2 - - @0xsequence/indexer@1.2.2 - - @0xsequence/metadata@1.2.2 - - @0xsequence/migration@1.2.2 - - @0xsequence/multicall@1.2.2 - - @0xsequence/network@1.2.2 - - @0xsequence/provider@1.2.2 - - @0xsequence/relayer@1.2.2 - - @0xsequence/sessions@1.2.2 - - @0xsequence/signhub@1.2.2 - - @0xsequence/utils@1.2.2 - - @0xsequence/wallet@1.2.2 - -## 1.2.1 - -### Patch Changes - -- auth: use sequence api chain id as reference chain id if available -- Updated dependencies - - @0xsequence/abi@1.2.1 - - @0xsequence/account@1.2.1 - - @0xsequence/api@1.2.1 - - @0xsequence/auth@1.2.1 - - @0xsequence/core@1.2.1 - - @0xsequence/guard@1.2.1 - - @0xsequence/indexer@1.2.1 - - @0xsequence/metadata@1.2.1 - - @0xsequence/migration@1.2.1 - - @0xsequence/multicall@1.2.1 - - @0xsequence/network@1.2.1 - - @0xsequence/provider@1.2.1 - - @0xsequence/relayer@1.2.1 - - @0xsequence/sessions@1.2.1 - - @0xsequence/signhub@1.2.1 - - @0xsequence/utils@1.2.1 - - @0xsequence/wallet@1.2.1 - -## 1.2.0 - -### Minor Changes - -- split services from session, better local support - -### Patch Changes - -- Updated dependencies - - @0xsequence/abi@1.2.0 - - @0xsequence/account@1.2.0 - - @0xsequence/api@1.2.0 - - @0xsequence/auth@1.2.0 - - @0xsequence/core@1.2.0 - - @0xsequence/guard@1.2.0 - - @0xsequence/indexer@1.2.0 - - @0xsequence/metadata@1.2.0 - - @0xsequence/migration@1.2.0 - - @0xsequence/multicall@1.2.0 - - @0xsequence/network@1.2.0 - - @0xsequence/provider@1.2.0 - - @0xsequence/relayer@1.2.0 - - @0xsequence/sessions@1.2.0 - - @0xsequence/signhub@1.2.0 - - @0xsequence/utils@1.2.0 - - @0xsequence/wallet@1.2.0 - -## 1.1.15 - -### Patch Changes - -- guard: remove error filtering -- Updated dependencies - - @0xsequence/abi@1.1.15 - - @0xsequence/account@1.1.15 - - @0xsequence/api@1.1.15 - - @0xsequence/auth@1.1.15 - - @0xsequence/core@1.1.15 - - @0xsequence/guard@1.1.15 - - @0xsequence/indexer@1.1.15 - - @0xsequence/metadata@1.1.15 - - @0xsequence/migration@1.1.15 - - @0xsequence/multicall@1.1.15 - - @0xsequence/network@1.1.15 - - @0xsequence/provider@1.1.15 - - @0xsequence/relayer@1.1.15 - - @0xsequence/sessions@1.1.15 - - @0xsequence/signhub@1.1.15 - - @0xsequence/utils@1.1.15 - - @0xsequence/wallet@1.1.15 - -## 1.1.14 - -### Patch Changes - -- guard: add GuardSigner.onError -- Updated dependencies - - @0xsequence/abi@1.1.14 - - @0xsequence/account@1.1.14 - - @0xsequence/api@1.1.14 - - @0xsequence/auth@1.1.14 - - @0xsequence/core@1.1.14 - - @0xsequence/guard@1.1.14 - - @0xsequence/indexer@1.1.14 - - @0xsequence/metadata@1.1.14 - - @0xsequence/migration@1.1.14 - - @0xsequence/multicall@1.1.14 - - @0xsequence/network@1.1.14 - - @0xsequence/provider@1.1.14 - - @0xsequence/relayer@1.1.14 - - @0xsequence/sessions@1.1.14 - - @0xsequence/signhub@1.1.14 - - @0xsequence/utils@1.1.14 - - @0xsequence/wallet@1.1.14 - -## 1.1.13 - -### Patch Changes - -- provider: pass client version with connect options -- provider: removing large from BannerSize -- Updated dependencies -- Updated dependencies - - @0xsequence/abi@1.1.13 - - @0xsequence/account@1.1.13 - - @0xsequence/api@1.1.13 - - @0xsequence/auth@1.1.13 - - @0xsequence/core@1.1.13 - - @0xsequence/guard@1.1.13 - - @0xsequence/indexer@1.1.13 - - @0xsequence/metadata@1.1.13 - - @0xsequence/migration@1.1.13 - - @0xsequence/multicall@1.1.13 - - @0xsequence/network@1.1.13 - - @0xsequence/provider@1.1.13 - - @0xsequence/relayer@1.1.13 - - @0xsequence/sessions@1.1.13 - - @0xsequence/signhub@1.1.13 - - @0xsequence/utils@1.1.13 - - @0xsequence/wallet@1.1.13 - -## 1.1.12 - -### Patch Changes - -- provider: adding bannerSize to ConnectOptions -- Updated dependencies - - @0xsequence/abi@1.1.12 - - @0xsequence/account@1.1.12 - - @0xsequence/api@1.1.12 - - @0xsequence/auth@1.1.12 - - @0xsequence/core@1.1.12 - - @0xsequence/guard@1.1.12 - - @0xsequence/indexer@1.1.12 - - @0xsequence/metadata@1.1.12 - - @0xsequence/migration@1.1.12 - - @0xsequence/multicall@1.1.12 - - @0xsequence/network@1.1.12 - - @0xsequence/provider@1.1.12 - - @0xsequence/relayer@1.1.12 - - @0xsequence/sessions@1.1.12 - - @0xsequence/signhub@1.1.12 - - @0xsequence/utils@1.1.12 - - @0xsequence/wallet@1.1.12 - -## 1.1.11 - -### Patch Changes - -- add homeverse configs -- Updated dependencies - - @0xsequence/abi@1.1.11 - - @0xsequence/account@1.1.11 - - @0xsequence/api@1.1.11 - - @0xsequence/auth@1.1.11 - - @0xsequence/core@1.1.11 - - @0xsequence/guard@1.1.11 - - @0xsequence/indexer@1.1.11 - - @0xsequence/metadata@1.1.11 - - @0xsequence/migration@1.1.11 - - @0xsequence/multicall@1.1.11 - - @0xsequence/network@1.1.11 - - @0xsequence/provider@1.1.11 - - @0xsequence/relayer@1.1.11 - - @0xsequence/sessions@1.1.11 - - @0xsequence/signhub@1.1.11 - - @0xsequence/utils@1.1.11 - - @0xsequence/wallet@1.1.11 - -## 1.1.10 - -### Patch Changes - -- handle default EIP6492 on send -- Updated dependencies - - @0xsequence/abi@1.1.10 - - @0xsequence/account@1.1.10 - - @0xsequence/api@1.1.10 - - @0xsequence/auth@1.1.10 - - @0xsequence/core@1.1.10 - - @0xsequence/guard@1.1.10 - - @0xsequence/indexer@1.1.10 - - @0xsequence/metadata@1.1.10 - - @0xsequence/migration@1.1.10 - - @0xsequence/multicall@1.1.10 - - @0xsequence/network@1.1.10 - - @0xsequence/provider@1.1.10 - - @0xsequence/relayer@1.1.10 - - @0xsequence/sessions@1.1.10 - - @0xsequence/signhub@1.1.10 - - @0xsequence/utils@1.1.10 - - @0xsequence/wallet@1.1.10 - -## 1.1.9 - -### Patch Changes - -- Custom default EIP6492 on client -- Updated dependencies - - @0xsequence/abi@1.1.9 - - @0xsequence/account@1.1.9 - - @0xsequence/api@1.1.9 - - @0xsequence/auth@1.1.9 - - @0xsequence/core@1.1.9 - - @0xsequence/guard@1.1.9 - - @0xsequence/indexer@1.1.9 - - @0xsequence/metadata@1.1.9 - - @0xsequence/migration@1.1.9 - - @0xsequence/multicall@1.1.9 - - @0xsequence/network@1.1.9 - - @0xsequence/provider@1.1.9 - - @0xsequence/relayer@1.1.9 - - @0xsequence/sessions@1.1.9 - - @0xsequence/signhub@1.1.9 - - @0xsequence/utils@1.1.9 - - @0xsequence/wallet@1.1.9 - -## 1.1.8 - -### Patch Changes - -- metadata: searchMetadata: add types filter -- Updated dependencies - - @0xsequence/abi@1.1.8 - - @0xsequence/account@1.1.8 - - @0xsequence/api@1.1.8 - - @0xsequence/auth@1.1.8 - - @0xsequence/core@1.1.8 - - @0xsequence/guard@1.1.8 - - @0xsequence/indexer@1.1.8 - - @0xsequence/metadata@1.1.8 - - @0xsequence/migration@1.1.8 - - @0xsequence/multicall@1.1.8 - - @0xsequence/network@1.1.8 - - @0xsequence/provider@1.1.8 - - @0xsequence/relayer@1.1.8 - - @0xsequence/sessions@1.1.8 - - @0xsequence/signhub@1.1.8 - - @0xsequence/utils@1.1.8 - - @0xsequence/wallet@1.1.8 - -## 1.1.7 - -### Patch Changes - -- adding signInWith connect settings option to allow dapps to automatically login their users with a certain provider optimizing the normal authentication flow -- Updated dependencies - - @0xsequence/abi@1.1.7 - - @0xsequence/account@1.1.7 - - @0xsequence/api@1.1.7 - - @0xsequence/auth@1.1.7 - - @0xsequence/core@1.1.7 - - @0xsequence/guard@1.1.7 - - @0xsequence/indexer@1.1.7 - - @0xsequence/metadata@1.1.7 - - @0xsequence/migration@1.1.7 - - @0xsequence/multicall@1.1.7 - - @0xsequence/network@1.1.7 - - @0xsequence/provider@1.1.7 - - @0xsequence/relayer@1.1.7 - - @0xsequence/sessions@1.1.7 - - @0xsequence/signhub@1.1.7 - - @0xsequence/utils@1.1.7 - - @0xsequence/wallet@1.1.7 - -## 1.1.6 - -### Patch Changes - -- metadata: searchMetadata: add chainID and excludeTokenMetadata filters -- Updated dependencies - - @0xsequence/abi@1.1.6 - - @0xsequence/account@1.1.6 - - @0xsequence/api@1.1.6 - - @0xsequence/auth@1.1.6 - - @0xsequence/core@1.1.6 - - @0xsequence/guard@1.1.6 - - @0xsequence/indexer@1.1.6 - - @0xsequence/metadata@1.1.6 - - @0xsequence/migration@1.1.6 - - @0xsequence/multicall@1.1.6 - - @0xsequence/network@1.1.6 - - @0xsequence/provider@1.1.6 - - @0xsequence/relayer@1.1.6 - - @0xsequence/sessions@1.1.6 - - @0xsequence/signhub@1.1.6 - - @0xsequence/utils@1.1.6 - - @0xsequence/wallet@1.1.6 - -## 1.1.5 - -### Patch Changes - -- account: re-compute meta-transaction id for wallet deployment transactions -- Updated dependencies - - @0xsequence/abi@1.1.5 - - @0xsequence/account@1.1.5 - - @0xsequence/api@1.1.5 - - @0xsequence/auth@1.1.5 - - @0xsequence/core@1.1.5 - - @0xsequence/guard@1.1.5 - - @0xsequence/indexer@1.1.5 - - @0xsequence/metadata@1.1.5 - - @0xsequence/migration@1.1.5 - - @0xsequence/multicall@1.1.5 - - @0xsequence/network@1.1.5 - - @0xsequence/provider@1.1.5 - - @0xsequence/relayer@1.1.5 - - @0xsequence/sessions@1.1.5 - - @0xsequence/signhub@1.1.5 - - @0xsequence/utils@1.1.5 - - @0xsequence/wallet@1.1.5 - -## 1.1.4 - -### Patch Changes - -- network: rename base-mainnet to base -- provider: override isDefaultChain with ConnectOptions.networkId if provided -- Updated dependencies -- Updated dependencies - - @0xsequence/abi@1.1.4 - - @0xsequence/account@1.1.4 - - @0xsequence/api@1.1.4 - - @0xsequence/auth@1.1.4 - - @0xsequence/core@1.1.4 - - @0xsequence/guard@1.1.4 - - @0xsequence/indexer@1.1.4 - - @0xsequence/metadata@1.1.4 - - @0xsequence/migration@1.1.4 - - @0xsequence/multicall@1.1.4 - - @0xsequence/network@1.1.4 - - @0xsequence/provider@1.1.4 - - @0xsequence/relayer@1.1.4 - - @0xsequence/sessions@1.1.4 - - @0xsequence/signhub@1.1.4 - - @0xsequence/utils@1.1.4 - - @0xsequence/wallet@1.1.4 - -## 1.1.3 - -### Patch Changes - -- provider: use network id from transport session -- provider: sign authorization using ConnectOptions.networkId if provided -- Updated dependencies -- Updated dependencies - - @0xsequence/abi@1.1.3 - - @0xsequence/account@1.1.3 - - @0xsequence/api@1.1.3 - - @0xsequence/auth@1.1.3 - - @0xsequence/core@1.1.3 - - @0xsequence/guard@1.1.3 - - @0xsequence/indexer@1.1.3 - - @0xsequence/metadata@1.1.3 - - @0xsequence/migration@1.1.3 - - @0xsequence/multicall@1.1.3 - - @0xsequence/network@1.1.3 - - @0xsequence/provider@1.1.3 - - @0xsequence/relayer@1.1.3 - - @0xsequence/sessions@1.1.3 - - @0xsequence/signhub@1.1.3 - - @0xsequence/utils@1.1.3 - - @0xsequence/wallet@1.1.3 - -## 1.1.2 - -### Patch Changes - -- provider: jsonrpc chain id fixes -- Updated dependencies - - @0xsequence/abi@1.1.2 - - @0xsequence/account@1.1.2 - - @0xsequence/api@1.1.2 - - @0xsequence/auth@1.1.2 - - @0xsequence/core@1.1.2 - - @0xsequence/guard@1.1.2 - - @0xsequence/indexer@1.1.2 - - @0xsequence/metadata@1.1.2 - - @0xsequence/migration@1.1.2 - - @0xsequence/multicall@1.1.2 - - @0xsequence/network@1.1.2 - - @0xsequence/provider@1.1.2 - - @0xsequence/relayer@1.1.2 - - @0xsequence/sessions@1.1.2 - - @0xsequence/signhub@1.1.2 - - @0xsequence/utils@1.1.2 - - @0xsequence/wallet@1.1.2 - -## 1.1.1 - -### Patch Changes - -- network: add base mainnet and sepolia -- provider: reject toxic transaction requests -- Updated dependencies -- Updated dependencies - - @0xsequence/abi@1.1.1 - - @0xsequence/account@1.1.1 - - @0xsequence/api@1.1.1 - - @0xsequence/auth@1.1.1 - - @0xsequence/core@1.1.1 - - @0xsequence/guard@1.1.1 - - @0xsequence/indexer@1.1.1 - - @0xsequence/metadata@1.1.1 - - @0xsequence/migration@1.1.1 - - @0xsequence/multicall@1.1.1 - - @0xsequence/network@1.1.1 - - @0xsequence/provider@1.1.1 - - @0xsequence/relayer@1.1.1 - - @0xsequence/sessions@1.1.1 - - @0xsequence/signhub@1.1.1 - - @0xsequence/utils@1.1.1 - - @0xsequence/wallet@1.1.1 - -## 1.1.0 - -### Minor Changes - -- Refactor dapp facing provider - -### Patch Changes - -- Updated dependencies - - @0xsequence/abi@1.1.0 - - @0xsequence/account@1.1.0 - - @0xsequence/api@1.1.0 - - @0xsequence/auth@1.1.0 - - @0xsequence/core@1.1.0 - - @0xsequence/guard@1.1.0 - - @0xsequence/indexer@1.1.0 - - @0xsequence/metadata@1.1.0 - - @0xsequence/migration@1.1.0 - - @0xsequence/multicall@1.1.0 - - @0xsequence/network@1.1.0 - - @0xsequence/provider@1.1.0 - - @0xsequence/relayer@1.1.0 - - @0xsequence/sessions@1.1.0 - - @0xsequence/signhub@1.1.0 - - @0xsequence/utils@1.1.0 - - @0xsequence/wallet@1.1.0 - -## 1.0.5 - -### Patch Changes - -- network: export network constants -- guard: use the correct global for fetch -- network: nova-explorer.arbitrum.io -> nova.arbiscan.io -- Updated dependencies -- Updated dependencies -- Updated dependencies - - @0xsequence/abi@1.0.5 - - @0xsequence/account@1.0.5 - - @0xsequence/api@1.0.5 - - @0xsequence/auth@1.0.5 - - @0xsequence/core@1.0.5 - - @0xsequence/guard@1.0.5 - - @0xsequence/indexer@1.0.5 - - @0xsequence/metadata@1.0.5 - - @0xsequence/migration@1.0.5 - - @0xsequence/multicall@1.0.5 - - @0xsequence/network@1.0.5 - - @0xsequence/provider@1.0.5 - - @0xsequence/relayer@1.0.5 - - @0xsequence/sessions@1.0.5 - - @0xsequence/signhub@1.0.5 - - @0xsequence/utils@1.0.5 - - @0xsequence/wallet@1.0.5 - -## 1.0.4 - -### Patch Changes - -- provider: accept name or number for networkId -- Updated dependencies - - @0xsequence/abi@1.0.4 - - @0xsequence/account@1.0.4 - - @0xsequence/api@1.0.4 - - @0xsequence/auth@1.0.4 - - @0xsequence/core@1.0.4 - - @0xsequence/guard@1.0.4 - - @0xsequence/indexer@1.0.4 - - @0xsequence/metadata@1.0.4 - - @0xsequence/migration@1.0.4 - - @0xsequence/multicall@1.0.4 - - @0xsequence/network@1.0.4 - - @0xsequence/provider@1.0.4 - - @0xsequence/relayer@1.0.4 - - @0xsequence/sessions@1.0.4 - - @0xsequence/signhub@1.0.4 - - @0xsequence/utils@1.0.4 - - @0xsequence/wallet@1.0.4 - -## 1.0.3 - -### Patch Changes - -- Simpler isValidSignature helpers -- Updated dependencies - - @0xsequence/abi@1.0.3 - - @0xsequence/account@1.0.3 - - @0xsequence/api@1.0.3 - - @0xsequence/auth@1.0.3 - - @0xsequence/core@1.0.3 - - @0xsequence/guard@1.0.3 - - @0xsequence/indexer@1.0.3 - - @0xsequence/metadata@1.0.3 - - @0xsequence/migration@1.0.3 - - @0xsequence/multicall@1.0.3 - - @0xsequence/network@1.0.3 - - @0xsequence/provider@1.0.3 - - @0xsequence/relayer@1.0.3 - - @0xsequence/sessions@1.0.3 - - @0xsequence/signhub@1.0.3 - - @0xsequence/utils@1.0.3 - - @0xsequence/wallet@1.0.3 - -## 1.0.2 - -### Patch Changes - -- add extra signature validation utils methods -- Updated dependencies - - @0xsequence/abi@1.0.2 - - @0xsequence/account@1.0.2 - - @0xsequence/api@1.0.2 - - @0xsequence/auth@1.0.2 - - @0xsequence/core@1.0.2 - - @0xsequence/guard@1.0.2 - - @0xsequence/indexer@1.0.2 - - @0xsequence/metadata@1.0.2 - - @0xsequence/migration@1.0.2 - - @0xsequence/multicall@1.0.2 - - @0xsequence/network@1.0.2 - - @0xsequence/provider@1.0.2 - - @0xsequence/relayer@1.0.2 - - @0xsequence/sessions@1.0.2 - - @0xsequence/signhub@1.0.2 - - @0xsequence/utils@1.0.2 - - @0xsequence/wallet@1.0.2 - -## 1.0.1 - -### Patch Changes - -- add homeverse testnet -- Updated dependencies - - @0xsequence/abi@1.0.1 - - @0xsequence/account@1.0.1 - - @0xsequence/api@1.0.1 - - @0xsequence/auth@1.0.1 - - @0xsequence/core@1.0.1 - - @0xsequence/guard@1.0.1 - - @0xsequence/indexer@1.0.1 - - @0xsequence/metadata@1.0.1 - - @0xsequence/migration@1.0.1 - - @0xsequence/multicall@1.0.1 - - @0xsequence/network@1.0.1 - - @0xsequence/provider@1.0.1 - - @0xsequence/relayer@1.0.1 - - @0xsequence/sessions@1.0.1 - - @0xsequence/signhub@1.0.1 - - @0xsequence/utils@1.0.1 - - @0xsequence/wallet@1.0.1 - -## 1.0.0 - -### Major Changes - -- https://sequence.xyz/blog/sequence-wallet-light-state-sync-full-merkle-wallets - -### Patch Changes - -- Updated dependencies - - @0xsequence/abi@1.0.0 - - @0xsequence/account@1.0.0 - - @0xsequence/api@1.0.0 - - @0xsequence/auth@1.0.0 - - @0xsequence/core@1.0.0 - - @0xsequence/guard@1.0.0 - - @0xsequence/indexer@1.0.0 - - @0xsequence/metadata@1.0.0 - - @0xsequence/migration@1.0.0 - - @0xsequence/multicall@1.0.0 - - @0xsequence/network@1.0.0 - - @0xsequence/provider@1.0.0 - - @0xsequence/relayer@1.0.0 - - @0xsequence/sessions@1.0.0 - - @0xsequence/signhub@1.0.0 - - @0xsequence/utils@1.0.0 - - @0xsequence/wallet@1.0.0 - -## 0.43.34 - -### Patch Changes - -- auth: no jwt for indexer -- Updated dependencies - - @0xsequence/abi@0.43.34 - - @0xsequence/api@0.43.34 - - @0xsequence/auth@0.43.34 - - @0xsequence/config@0.43.34 - - @0xsequence/guard@0.43.34 - - @0xsequence/indexer@0.43.34 - - @0xsequence/metadata@0.43.34 - - @0xsequence/multicall@0.43.34 - - @0xsequence/network@0.43.34 - - @0xsequence/provider@0.43.34 - - @0xsequence/relayer@0.43.34 - - @0xsequence/transactions@0.43.34 - - @0xsequence/utils@0.43.34 - - @0xsequence/wallet@0.43.34 - -## 0.43.33 - -### Patch Changes - -- Adding onConnectOptionsChange handler to WalletRequestHandler -- Updated dependencies - - @0xsequence/abi@0.43.33 - - @0xsequence/api@0.43.33 - - @0xsequence/auth@0.43.33 - - @0xsequence/config@0.43.33 - - @0xsequence/guard@0.43.33 - - @0xsequence/indexer@0.43.33 - - @0xsequence/metadata@0.43.33 - - @0xsequence/multicall@0.43.33 - - @0xsequence/network@0.43.33 - - @0xsequence/provider@0.43.33 - - @0xsequence/relayer@0.43.33 - - @0xsequence/transactions@0.43.33 - - @0xsequence/utils@0.43.33 - - @0xsequence/wallet@0.43.33 - -## 0.43.32 - -### Patch Changes - -- add Base Goerli network -- Updated dependencies - - @0xsequence/abi@0.43.32 - - @0xsequence/api@0.43.32 - - @0xsequence/auth@0.43.32 - - @0xsequence/config@0.43.32 - - @0xsequence/guard@0.43.32 - - @0xsequence/indexer@0.43.32 - - @0xsequence/metadata@0.43.32 - - @0xsequence/multicall@0.43.32 - - @0xsequence/network@0.43.32 - - @0xsequence/provider@0.43.32 - - @0xsequence/relayer@0.43.32 - - @0xsequence/transactions@0.43.32 - - @0xsequence/utils@0.43.32 - - @0xsequence/wallet@0.43.32 - -## 0.43.31 - -### Patch Changes - -- remove AuxDataProvider, add promptSignInConnect -- Updated dependencies - - @0xsequence/abi@0.43.31 - - @0xsequence/api@0.43.31 - - @0xsequence/auth@0.43.31 - - @0xsequence/config@0.43.31 - - @0xsequence/guard@0.43.31 - - @0xsequence/indexer@0.43.31 - - @0xsequence/metadata@0.43.31 - - @0xsequence/multicall@0.43.31 - - @0xsequence/network@0.43.31 - - @0xsequence/provider@0.43.31 - - @0xsequence/relayer@0.43.31 - - @0xsequence/transactions@0.43.31 - - @0xsequence/utils@0.43.31 - - @0xsequence/wallet@0.43.31 - -## 0.43.30 - -### Patch Changes - -- add arbitrum goerli testnet -- Updated dependencies - - @0xsequence/abi@0.43.30 - - @0xsequence/api@0.43.30 - - @0xsequence/auth@0.43.30 - - @0xsequence/config@0.43.30 - - @0xsequence/guard@0.43.30 - - @0xsequence/indexer@0.43.30 - - @0xsequence/metadata@0.43.30 - - @0xsequence/multicall@0.43.30 - - @0xsequence/network@0.43.30 - - @0xsequence/provider@0.43.30 - - @0xsequence/relayer@0.43.30 - - @0xsequence/transactions@0.43.30 - - @0xsequence/utils@0.43.30 - - @0xsequence/wallet@0.43.30 - -## 0.43.29 - -### Patch Changes - -- provider: check availability of window object -- Updated dependencies - - @0xsequence/abi@0.43.29 - - @0xsequence/api@0.43.29 - - @0xsequence/auth@0.43.29 - - @0xsequence/config@0.43.29 - - @0xsequence/guard@0.43.29 - - @0xsequence/indexer@0.43.29 - - @0xsequence/metadata@0.43.29 - - @0xsequence/multicall@0.43.29 - - @0xsequence/network@0.43.29 - - @0xsequence/provider@0.43.29 - - @0xsequence/relayer@0.43.29 - - @0xsequence/transactions@0.43.29 - - @0xsequence/utils@0.43.29 - - @0xsequence/wallet@0.43.29 - -## 0.43.28 - -### Patch Changes - -- update api bindings -- Updated dependencies - - @0xsequence/abi@0.43.28 - - @0xsequence/api@0.43.28 - - @0xsequence/auth@0.43.28 - - @0xsequence/config@0.43.28 - - @0xsequence/guard@0.43.28 - - @0xsequence/indexer@0.43.28 - - @0xsequence/metadata@0.43.28 - - @0xsequence/multicall@0.43.28 - - @0xsequence/network@0.43.28 - - @0xsequence/provider@0.43.28 - - @0xsequence/relayer@0.43.28 - - @0xsequence/transactions@0.43.28 - - @0xsequence/utils@0.43.28 - - @0xsequence/wallet@0.43.28 - -## 0.43.27 - -### Patch Changes - -- Add rpc is sequence method -- Updated dependencies - - @0xsequence/abi@0.43.27 - - @0xsequence/api@0.43.27 - - @0xsequence/auth@0.43.27 - - @0xsequence/config@0.43.27 - - @0xsequence/guard@0.43.27 - - @0xsequence/indexer@0.43.27 - - @0xsequence/metadata@0.43.27 - - @0xsequence/multicall@0.43.27 - - @0xsequence/network@0.43.27 - - @0xsequence/provider@0.43.27 - - @0xsequence/relayer@0.43.27 - - @0xsequence/transactions@0.43.27 - - @0xsequence/utils@0.43.27 - - @0xsequence/wallet@0.43.27 - -## 0.43.26 - -### Patch Changes - -- add zkevm url to enum -- Updated dependencies - - @0xsequence/abi@0.43.26 - - @0xsequence/api@0.43.26 - - @0xsequence/auth@0.43.26 - - @0xsequence/config@0.43.26 - - @0xsequence/guard@0.43.26 - - @0xsequence/indexer@0.43.26 - - @0xsequence/metadata@0.43.26 - - @0xsequence/multicall@0.43.26 - - @0xsequence/network@0.43.26 - - @0xsequence/provider@0.43.26 - - @0xsequence/relayer@0.43.26 - - @0xsequence/transactions@0.43.26 - - @0xsequence/utils@0.43.26 - - @0xsequence/wallet@0.43.26 - -## 0.43.25 - -### Patch Changes - -- added polygon zkevm to mainnet networks -- Updated dependencies - - @0xsequence/abi@0.43.25 - - @0xsequence/api@0.43.25 - - @0xsequence/auth@0.43.25 - - @0xsequence/config@0.43.25 - - @0xsequence/guard@0.43.25 - - @0xsequence/indexer@0.43.25 - - @0xsequence/metadata@0.43.25 - - @0xsequence/multicall@0.43.25 - - @0xsequence/network@0.43.25 - - @0xsequence/provider@0.43.25 - - @0xsequence/relayer@0.43.25 - - @0xsequence/transactions@0.43.25 - - @0xsequence/utils@0.43.25 - - @0xsequence/wallet@0.43.25 - -## 0.43.24 - -### Patch Changes - -- name change from zkevm to polygon-zkevm -- Updated dependencies - - @0xsequence/abi@0.43.24 - - @0xsequence/api@0.43.24 - - @0xsequence/auth@0.43.24 - - @0xsequence/config@0.43.24 - - @0xsequence/guard@0.43.24 - - @0xsequence/indexer@0.43.24 - - @0xsequence/metadata@0.43.24 - - @0xsequence/multicall@0.43.24 - - @0xsequence/network@0.43.24 - - @0xsequence/provider@0.43.24 - - @0xsequence/relayer@0.43.24 - - @0xsequence/transactions@0.43.24 - - @0xsequence/utils@0.43.24 - - @0xsequence/wallet@0.43.24 - -## 0.43.23 - -### Patch Changes - -- update zkEVM name to Polygon zkEVM -- Updated dependencies - - @0xsequence/abi@0.43.23 - - @0xsequence/api@0.43.23 - - @0xsequence/auth@0.43.23 - - @0xsequence/config@0.43.23 - - @0xsequence/guard@0.43.23 - - @0xsequence/indexer@0.43.23 - - @0xsequence/metadata@0.43.23 - - @0xsequence/multicall@0.43.23 - - @0xsequence/network@0.43.23 - - @0xsequence/provider@0.43.23 - - @0xsequence/relayer@0.43.23 - - @0xsequence/transactions@0.43.23 - - @0xsequence/utils@0.43.23 - - @0xsequence/wallet@0.43.23 - -## 0.43.22 - -### Patch Changes - -- add zkevm chain -- Updated dependencies - - @0xsequence/abi@0.43.22 - - @0xsequence/api@0.43.22 - - @0xsequence/auth@0.43.22 - - @0xsequence/config@0.43.22 - - @0xsequence/guard@0.43.22 - - @0xsequence/indexer@0.43.22 - - @0xsequence/metadata@0.43.22 - - @0xsequence/multicall@0.43.22 - - @0xsequence/network@0.43.22 - - @0xsequence/provider@0.43.22 - - @0xsequence/relayer@0.43.22 - - @0xsequence/transactions@0.43.22 - - @0xsequence/utils@0.43.22 - - @0xsequence/wallet@0.43.22 - -## 0.43.21 - -### Patch Changes - -- api: update client bindings -- Updated dependencies - - @0xsequence/abi@0.43.21 - - @0xsequence/api@0.43.21 - - @0xsequence/auth@0.43.21 - - @0xsequence/config@0.43.21 - - @0xsequence/guard@0.43.21 - - @0xsequence/indexer@0.43.21 - - @0xsequence/metadata@0.43.21 - - @0xsequence/multicall@0.43.21 - - @0xsequence/network@0.43.21 - - @0xsequence/provider@0.43.21 - - @0xsequence/relayer@0.43.21 - - @0xsequence/transactions@0.43.21 - - @0xsequence/utils@0.43.21 - - @0xsequence/wallet@0.43.21 - -## 0.43.20 - -### Patch Changes - -- indexer: update bindings -- Updated dependencies - - @0xsequence/abi@0.43.20 - - @0xsequence/api@0.43.20 - - @0xsequence/auth@0.43.20 - - @0xsequence/config@0.43.20 - - @0xsequence/guard@0.43.20 - - @0xsequence/indexer@0.43.20 - - @0xsequence/metadata@0.43.20 - - @0xsequence/multicall@0.43.20 - - @0xsequence/network@0.43.20 - - @0xsequence/provider@0.43.20 - - @0xsequence/relayer@0.43.20 - - @0xsequence/transactions@0.43.20 - - @0xsequence/utils@0.43.20 - - @0xsequence/wallet@0.43.20 - -## 0.43.19 - -### Patch Changes - -- session proof update -- Updated dependencies - - @0xsequence/abi@0.43.19 - - @0xsequence/api@0.43.19 - - @0xsequence/auth@0.43.19 - - @0xsequence/config@0.43.19 - - @0xsequence/guard@0.43.19 - - @0xsequence/indexer@0.43.19 - - @0xsequence/metadata@0.43.19 - - @0xsequence/multicall@0.43.19 - - @0xsequence/network@0.43.19 - - @0xsequence/provider@0.43.19 - - @0xsequence/relayer@0.43.19 - - @0xsequence/transactions@0.43.19 - - @0xsequence/utils@0.43.19 - - @0xsequence/wallet@0.43.19 - -## 0.43.18 - -### Patch Changes - -- rpc client global check, hardening -- Updated dependencies - - @0xsequence/abi@0.43.18 - - @0xsequence/api@0.43.18 - - @0xsequence/auth@0.43.18 - - @0xsequence/config@0.43.18 - - @0xsequence/guard@0.43.18 - - @0xsequence/indexer@0.43.18 - - @0xsequence/metadata@0.43.18 - - @0xsequence/multicall@0.43.18 - - @0xsequence/network@0.43.18 - - @0xsequence/provider@0.43.18 - - @0xsequence/relayer@0.43.18 - - @0xsequence/transactions@0.43.18 - - @0xsequence/utils@0.43.18 - - @0xsequence/wallet@0.43.18 - -## 0.43.17 - -### Patch Changes - -- rpc clients, check of 'global' is defined -- Updated dependencies - - @0xsequence/abi@0.43.17 - - @0xsequence/api@0.43.17 - - @0xsequence/auth@0.43.17 - - @0xsequence/config@0.43.17 - - @0xsequence/guard@0.43.17 - - @0xsequence/indexer@0.43.17 - - @0xsequence/metadata@0.43.17 - - @0xsequence/multicall@0.43.17 - - @0xsequence/network@0.43.17 - - @0xsequence/provider@0.43.17 - - @0xsequence/relayer@0.43.17 - - @0xsequence/transactions@0.43.17 - - @0xsequence/utils@0.43.17 - - @0xsequence/wallet@0.43.17 - -## 0.43.16 - -### Patch Changes - -- ethers peerDep to v5, update rpc client global use -- Updated dependencies - - @0xsequence/abi@0.43.16 - - @0xsequence/api@0.43.16 - - @0xsequence/auth@0.43.16 - - @0xsequence/config@0.43.16 - - @0xsequence/guard@0.43.16 - - @0xsequence/indexer@0.43.16 - - @0xsequence/metadata@0.43.16 - - @0xsequence/multicall@0.43.16 - - @0xsequence/network@0.43.16 - - @0xsequence/provider@0.43.16 - - @0xsequence/relayer@0.43.16 - - @0xsequence/transactions@0.43.16 - - @0xsequence/utils@0.43.16 - - @0xsequence/wallet@0.43.16 - -## 0.43.15 - -### Patch Changes - -- - provider: expand receiver type on some util methods -- Updated dependencies - - @0xsequence/abi@0.43.15 - - @0xsequence/api@0.43.15 - - @0xsequence/auth@0.43.15 - - @0xsequence/config@0.43.15 - - @0xsequence/guard@0.43.15 - - @0xsequence/indexer@0.43.15 - - @0xsequence/metadata@0.43.15 - - @0xsequence/multicall@0.43.15 - - @0xsequence/network@0.43.15 - - @0xsequence/provider@0.43.15 - - @0xsequence/relayer@0.43.15 - - @0xsequence/transactions@0.43.15 - - @0xsequence/utils@0.43.15 - - @0xsequence/wallet@0.43.15 - -## 0.43.14 - -### Patch Changes - -- bump -- Updated dependencies - - @0xsequence/abi@0.43.14 - - @0xsequence/api@0.43.14 - - @0xsequence/auth@0.43.14 - - @0xsequence/config@0.43.14 - - @0xsequence/guard@0.43.14 - - @0xsequence/indexer@0.43.14 - - @0xsequence/metadata@0.43.14 - - @0xsequence/multicall@0.43.14 - - @0xsequence/network@0.43.14 - - @0xsequence/provider@0.43.14 - - @0xsequence/relayer@0.43.14 - - @0xsequence/transactions@0.43.14 - - @0xsequence/utils@0.43.14 - - @0xsequence/wallet@0.43.14 - -## 0.43.13 - -### Patch Changes - -- update rpc bindings -- Updated dependencies - - @0xsequence/abi@0.43.13 - - @0xsequence/api@0.43.13 - - @0xsequence/auth@0.43.13 - - @0xsequence/config@0.43.13 - - @0xsequence/guard@0.43.13 - - @0xsequence/indexer@0.43.13 - - @0xsequence/metadata@0.43.13 - - @0xsequence/multicall@0.43.13 - - @0xsequence/network@0.43.13 - - @0xsequence/provider@0.43.13 - - @0xsequence/relayer@0.43.13 - - @0xsequence/transactions@0.43.13 - - @0xsequence/utils@0.43.13 - - @0xsequence/wallet@0.43.13 - -## 0.43.12 - -### Patch Changes - -- provider: single wallet init, and add new unregisterWallet() method -- Updated dependencies - - @0xsequence/abi@0.43.12 - - @0xsequence/api@0.43.12 - - @0xsequence/auth@0.43.12 - - @0xsequence/config@0.43.12 - - @0xsequence/guard@0.43.12 - - @0xsequence/indexer@0.43.12 - - @0xsequence/metadata@0.43.12 - - @0xsequence/multicall@0.43.12 - - @0xsequence/network@0.43.12 - - @0xsequence/provider@0.43.12 - - @0xsequence/relayer@0.43.12 - - @0xsequence/transactions@0.43.12 - - @0xsequence/utils@0.43.12 - - @0xsequence/wallet@0.43.12 - -## 0.43.11 - -### Patch Changes - -- fix lockfiles -- re-add mocha type deleter -- Updated dependencies -- Updated dependencies - - @0xsequence/abi@0.43.11 - - @0xsequence/api@0.43.11 - - @0xsequence/auth@0.43.11 - - @0xsequence/config@0.43.11 - - @0xsequence/guard@0.43.11 - - @0xsequence/indexer@0.43.11 - - @0xsequence/metadata@0.43.11 - - @0xsequence/multicall@0.43.11 - - @0xsequence/network@0.43.11 - - @0xsequence/provider@0.43.11 - - @0xsequence/relayer@0.43.11 - - @0xsequence/transactions@0.43.11 - - @0xsequence/utils@0.43.11 - - @0xsequence/wallet@0.43.11 - -## 0.43.10 - -### Patch Changes - -- various improvements -- Updated dependencies - - @0xsequence/abi@0.43.10 - - @0xsequence/api@0.43.10 - - @0xsequence/auth@0.43.10 - - @0xsequence/config@0.43.10 - - @0xsequence/guard@0.43.10 - - @0xsequence/indexer@0.43.10 - - @0xsequence/metadata@0.43.10 - - @0xsequence/multicall@0.43.10 - - @0xsequence/network@0.43.10 - - @0xsequence/provider@0.43.10 - - @0xsequence/relayer@0.43.10 - - @0xsequence/transactions@0.43.10 - - @0xsequence/utils@0.43.10 - - @0xsequence/wallet@0.43.10 - -## 0.43.9 - -### Patch Changes - -- update deps -- Updated dependencies - - @0xsequence/abi@0.43.9 - - @0xsequence/api@0.43.9 - - @0xsequence/auth@0.43.9 - - @0xsequence/config@0.43.9 - - @0xsequence/guard@0.43.9 - - @0xsequence/indexer@0.43.9 - - @0xsequence/metadata@0.43.9 - - @0xsequence/multicall@0.43.9 - - @0xsequence/network@0.43.9 - - @0xsequence/provider@0.43.9 - - @0xsequence/relayer@0.43.9 - - @0xsequence/transactions@0.43.9 - - @0xsequence/utils@0.43.9 - - @0xsequence/wallet@0.43.9 - -## 0.43.8 - -### Patch Changes - -- network: JsonRpcProvider with caching -- Updated dependencies - - @0xsequence/abi@0.43.8 - - @0xsequence/api@0.43.8 - - @0xsequence/auth@0.43.8 - - @0xsequence/config@0.43.8 - - @0xsequence/guard@0.43.8 - - @0xsequence/indexer@0.43.8 - - @0xsequence/metadata@0.43.8 - - @0xsequence/multicall@0.43.8 - - @0xsequence/network@0.43.8 - - @0xsequence/provider@0.43.8 - - @0xsequence/relayer@0.43.8 - - @0xsequence/transactions@0.43.8 - - @0xsequence/utils@0.43.8 - - @0xsequence/wallet@0.43.8 - -## 0.43.7 - -### Patch Changes - -- provider: fix wallet network init -- Updated dependencies - - @0xsequence/abi@0.43.7 - - @0xsequence/api@0.43.7 - - @0xsequence/auth@0.43.7 - - @0xsequence/config@0.43.7 - - @0xsequence/guard@0.43.7 - - @0xsequence/indexer@0.43.7 - - @0xsequence/metadata@0.43.7 - - @0xsequence/multicall@0.43.7 - - @0xsequence/network@0.43.7 - - @0xsequence/provider@0.43.7 - - @0xsequence/relayer@0.43.7 - - @0xsequence/transactions@0.43.7 - - @0xsequence/utils@0.43.7 - - @0xsequence/wallet@0.43.7 - -## 0.43.6 - -### Patch Changes - -- metadatata: update rpc bindings -- Updated dependencies - - @0xsequence/abi@0.43.6 - - @0xsequence/api@0.43.6 - - @0xsequence/auth@0.43.6 - - @0xsequence/config@0.43.6 - - @0xsequence/guard@0.43.6 - - @0xsequence/indexer@0.43.6 - - @0xsequence/metadata@0.43.6 - - @0xsequence/multicall@0.43.6 - - @0xsequence/network@0.43.6 - - @0xsequence/provider@0.43.6 - - @0xsequence/relayer@0.43.6 - - @0xsequence/transactions@0.43.6 - - @0xsequence/utils@0.43.6 - - @0xsequence/wallet@0.43.6 - -## 0.43.5 - -### Patch Changes - -- provider: do not set default network for connect messages -- provider: forward missing error message -- Updated dependencies -- Updated dependencies - - @0xsequence/abi@0.43.5 - - @0xsequence/api@0.43.5 - - @0xsequence/auth@0.43.5 - - @0xsequence/config@0.43.5 - - @0xsequence/guard@0.43.5 - - @0xsequence/indexer@0.43.5 - - @0xsequence/metadata@0.43.5 - - @0xsequence/multicall@0.43.5 - - @0xsequence/network@0.43.5 - - @0xsequence/provider@0.43.5 - - @0xsequence/relayer@0.43.5 - - @0xsequence/transactions@0.43.5 - - @0xsequence/utils@0.43.5 - - @0xsequence/wallet@0.43.5 - -## 0.43.4 - -### Patch Changes - -- no-change version bump to fix incorrectly tagged snapshot build -- Updated dependencies - - @0xsequence/abi@0.43.4 - - @0xsequence/api@0.43.4 - - @0xsequence/auth@0.43.4 - - @0xsequence/config@0.43.4 - - @0xsequence/guard@0.43.4 - - @0xsequence/indexer@0.43.4 - - @0xsequence/metadata@0.43.4 - - @0xsequence/multicall@0.43.4 - - @0xsequence/network@0.43.4 - - @0xsequence/provider@0.43.4 - - @0xsequence/relayer@0.43.4 - - @0xsequence/transactions@0.43.4 - - @0xsequence/utils@0.43.4 - - @0xsequence/wallet@0.43.4 - -## 0.43.3 - -### Patch Changes - -- metadata: update bindings -- Updated dependencies - - @0xsequence/abi@0.43.3 - - @0xsequence/api@0.43.3 - - @0xsequence/auth@0.43.3 - - @0xsequence/config@0.43.3 - - @0xsequence/guard@0.43.3 - - @0xsequence/indexer@0.43.3 - - @0xsequence/metadata@0.43.3 - - @0xsequence/multicall@0.43.3 - - @0xsequence/network@0.43.3 - - @0xsequence/provider@0.43.3 - - @0xsequence/relayer@0.43.3 - - @0xsequence/transactions@0.43.3 - - @0xsequence/utils@0.43.3 - - @0xsequence/wallet@0.43.3 - -## 0.43.2 - -### Patch Changes - -- provider: implement connectUnchecked -- Updated dependencies - - @0xsequence/abi@0.43.2 - - @0xsequence/api@0.43.2 - - @0xsequence/auth@0.43.2 - - @0xsequence/config@0.43.2 - - @0xsequence/guard@0.43.2 - - @0xsequence/indexer@0.43.2 - - @0xsequence/metadata@0.43.2 - - @0xsequence/multicall@0.43.2 - - @0xsequence/network@0.43.2 - - @0xsequence/provider@0.43.2 - - @0xsequence/relayer@0.43.2 - - @0xsequence/transactions@0.43.2 - - @0xsequence/utils@0.43.2 - - @0xsequence/wallet@0.43.2 - -## 0.43.1 - -### Patch Changes - -- update to latest ethauth dep -- Updated dependencies - - @0xsequence/abi@0.43.1 - - @0xsequence/api@0.43.1 - - @0xsequence/auth@0.43.1 - - @0xsequence/config@0.43.1 - - @0xsequence/guard@0.43.1 - - @0xsequence/indexer@0.43.1 - - @0xsequence/metadata@0.43.1 - - @0xsequence/multicall@0.43.1 - - @0xsequence/network@0.43.1 - - @0xsequence/provider@0.43.1 - - @0xsequence/relayer@0.43.1 - - @0xsequence/transactions@0.43.1 - - @0xsequence/utils@0.43.1 - - @0xsequence/wallet@0.43.1 - -## 0.43.0 - -### Minor Changes - -- move ethers to a peer dependency - -### Patch Changes - -- Updated dependencies - - @0xsequence/abi@0.43.0 - - @0xsequence/api@0.43.0 - - @0xsequence/auth@0.43.0 - - @0xsequence/config@0.43.0 - - @0xsequence/guard@0.43.0 - - @0xsequence/indexer@0.43.0 - - @0xsequence/metadata@0.43.0 - - @0xsequence/multicall@0.43.0 - - @0xsequence/network@0.43.0 - - @0xsequence/provider@0.43.0 - - @0xsequence/relayer@0.43.0 - - @0xsequence/transactions@0.43.0 - - @0xsequence/utils@0.43.0 - - @0xsequence/wallet@0.43.0 - -## 0.42.10 - -### Patch Changes - -- add auxDataProvider -- Updated dependencies - - @0xsequence/abi@0.42.10 - - @0xsequence/api@0.42.10 - - @0xsequence/auth@0.42.10 - - @0xsequence/config@0.42.10 - - @0xsequence/guard@0.42.10 - - @0xsequence/indexer@0.42.10 - - @0xsequence/metadata@0.42.10 - - @0xsequence/multicall@0.42.10 - - @0xsequence/network@0.42.10 - - @0xsequence/provider@0.42.10 - - @0xsequence/relayer@0.42.10 - - @0xsequence/transactions@0.42.10 - - @0xsequence/utils@0.42.10 - - @0xsequence/wallet@0.42.10 - -## 0.42.9 - -### Patch Changes - -- provider: add eip-191 exceptions -- Updated dependencies - - @0xsequence/abi@0.42.9 - - @0xsequence/api@0.42.9 - - @0xsequence/auth@0.42.9 - - @0xsequence/config@0.42.9 - - @0xsequence/guard@0.42.9 - - @0xsequence/indexer@0.42.9 - - @0xsequence/metadata@0.42.9 - - @0xsequence/multicall@0.42.9 - - @0xsequence/network@0.42.9 - - @0xsequence/provider@0.42.9 - - @0xsequence/relayer@0.42.9 - - @0xsequence/transactions@0.42.9 - - @0xsequence/utils@0.42.9 - - @0xsequence/wallet@0.42.9 - -## 0.42.8 - -### Patch Changes - -- provider: skip setting intent origin if we're unity plugin -- Updated dependencies - - @0xsequence/abi@0.42.8 - - @0xsequence/api@0.42.8 - - @0xsequence/auth@0.42.8 - - @0xsequence/config@0.42.8 - - @0xsequence/guard@0.42.8 - - @0xsequence/indexer@0.42.8 - - @0xsequence/metadata@0.42.8 - - @0xsequence/multicall@0.42.8 - - @0xsequence/network@0.42.8 - - @0xsequence/provider@0.42.8 - - @0xsequence/relayer@0.42.8 - - @0xsequence/transactions@0.42.8 - - @0xsequence/utils@0.42.8 - - @0xsequence/wallet@0.42.8 - -## 0.42.7 - -### Patch Changes - -- Add sign in options to connection settings -- Updated dependencies - - @0xsequence/abi@0.42.7 - - @0xsequence/api@0.42.7 - - @0xsequence/auth@0.42.7 - - @0xsequence/config@0.42.7 - - @0xsequence/guard@0.42.7 - - @0xsequence/indexer@0.42.7 - - @0xsequence/metadata@0.42.7 - - @0xsequence/multicall@0.42.7 - - @0xsequence/network@0.42.7 - - @0xsequence/provider@0.42.7 - - @0xsequence/relayer@0.42.7 - - @0xsequence/transactions@0.42.7 - - @0xsequence/utils@0.42.7 - - @0xsequence/wallet@0.42.7 - -## 0.42.6 - -### Patch Changes - -- api bindings update -- Updated dependencies - - @0xsequence/abi@0.42.6 - - @0xsequence/api@0.42.6 - - @0xsequence/auth@0.42.6 - - @0xsequence/config@0.42.6 - - @0xsequence/guard@0.42.6 - - @0xsequence/indexer@0.42.6 - - @0xsequence/metadata@0.42.6 - - @0xsequence/multicall@0.42.6 - - @0xsequence/network@0.42.6 - - @0xsequence/provider@0.42.6 - - @0xsequence/relayer@0.42.6 - - @0xsequence/transactions@0.42.6 - - @0xsequence/utils@0.42.6 - - @0xsequence/wallet@0.42.6 - -## 0.42.5 - -### Patch Changes - -- relayer: don't treat missing receipt as hard failure -- Updated dependencies - - @0xsequence/abi@0.42.5 - - @0xsequence/api@0.42.5 - - @0xsequence/auth@0.42.5 - - @0xsequence/config@0.42.5 - - @0xsequence/guard@0.42.5 - - @0xsequence/indexer@0.42.5 - - @0xsequence/metadata@0.42.5 - - @0xsequence/multicall@0.42.5 - - @0xsequence/network@0.42.5 - - @0xsequence/provider@0.42.5 - - @0xsequence/relayer@0.42.5 - - @0xsequence/transactions@0.42.5 - - @0xsequence/utils@0.42.5 - - @0xsequence/wallet@0.42.5 - -## 0.42.4 - -### Patch Changes - -- provider: add custom app protocol to connect options -- Updated dependencies - - @0xsequence/abi@0.42.4 - - @0xsequence/api@0.42.4 - - @0xsequence/auth@0.42.4 - - @0xsequence/config@0.42.4 - - @0xsequence/guard@0.42.4 - - @0xsequence/indexer@0.42.4 - - @0xsequence/metadata@0.42.4 - - @0xsequence/multicall@0.42.4 - - @0xsequence/network@0.42.4 - - @0xsequence/provider@0.42.4 - - @0xsequence/relayer@0.42.4 - - @0xsequence/transactions@0.42.4 - - @0xsequence/utils@0.42.4 - - @0xsequence/wallet@0.42.4 - -## 0.42.3 - -### Patch Changes - -- update api bindings -- Updated dependencies - - @0xsequence/abi@0.42.3 - - @0xsequence/api@0.42.3 - - @0xsequence/auth@0.42.3 - - @0xsequence/config@0.42.3 - - @0xsequence/guard@0.42.3 - - @0xsequence/indexer@0.42.3 - - @0xsequence/metadata@0.42.3 - - @0xsequence/multicall@0.42.3 - - @0xsequence/network@0.42.3 - - @0xsequence/provider@0.42.3 - - @0xsequence/relayer@0.42.3 - - @0xsequence/transactions@0.42.3 - - @0xsequence/utils@0.42.3 - - @0xsequence/wallet@0.42.3 - -## 0.42.2 - -### Patch Changes - -- disable rinkeby network -- Updated dependencies - - @0xsequence/abi@0.42.2 - - @0xsequence/api@0.42.2 - - @0xsequence/auth@0.42.2 - - @0xsequence/config@0.42.2 - - @0xsequence/guard@0.42.2 - - @0xsequence/indexer@0.42.2 - - @0xsequence/metadata@0.42.2 - - @0xsequence/multicall@0.42.2 - - @0xsequence/network@0.42.2 - - @0xsequence/provider@0.42.2 - - @0xsequence/relayer@0.42.2 - - @0xsequence/transactions@0.42.2 - - @0xsequence/utils@0.42.2 - - @0xsequence/wallet@0.42.2 - -## 0.42.1 - -### Patch Changes - -- wallet: optional waitForReceipt parameter -- Updated dependencies - - @0xsequence/abi@0.42.1 - - @0xsequence/api@0.42.1 - - @0xsequence/auth@0.42.1 - - @0xsequence/config@0.42.1 - - @0xsequence/guard@0.42.1 - - @0xsequence/indexer@0.42.1 - - @0xsequence/metadata@0.42.1 - - @0xsequence/multicall@0.42.1 - - @0xsequence/network@0.42.1 - - @0xsequence/provider@0.42.1 - - @0xsequence/relayer@0.42.1 - - @0xsequence/transactions@0.42.1 - - @0xsequence/utils@0.42.1 - - @0xsequence/wallet@0.42.1 - -## 0.42.0 - -### Minor Changes - -- relayer: estimateGasLimits -> simulate -- add simulator package - -### Patch Changes - -- transactions: fix flattenAuxTransactions -- provider: only filter nullish values -- provider: re-map transaction 'gas' back to 'gasLimit' -- Updated dependencies -- Updated dependencies -- Updated dependencies -- Updated dependencies -- Updated dependencies - - @0xsequence/abi@0.42.0 - - @0xsequence/api@0.42.0 - - @0xsequence/auth@0.42.0 - - @0xsequence/config@0.42.0 - - @0xsequence/guard@0.42.0 - - @0xsequence/indexer@0.42.0 - - @0xsequence/metadata@0.42.0 - - @0xsequence/multicall@0.42.0 - - @0xsequence/network@0.42.0 - - @0xsequence/provider@0.42.0 - - @0xsequence/relayer@0.42.0 - - @0xsequence/transactions@0.42.0 - - @0xsequence/utils@0.42.0 - - @0xsequence/wallet@0.42.0 - -## 0.41.3 - -### Patch Changes - -- api bindings update -- Updated dependencies - - @0xsequence/abi@0.41.3 - - @0xsequence/api@0.41.3 - - @0xsequence/auth@0.41.3 - - @0xsequence/config@0.41.3 - - @0xsequence/guard@0.41.3 - - @0xsequence/indexer@0.41.3 - - @0xsequence/metadata@0.41.3 - - @0xsequence/multicall@0.41.3 - - @0xsequence/network@0.41.3 - - @0xsequence/provider@0.41.3 - - @0xsequence/relayer@0.41.3 - - @0xsequence/transactions@0.41.3 - - @0xsequence/utils@0.41.3 - - @0xsequence/wallet@0.41.3 - -## 0.41.2 - -### Patch Changes - -- api bindings update -- Updated dependencies - - @0xsequence/abi@0.41.2 - - @0xsequence/api@0.41.2 - - @0xsequence/auth@0.41.2 - - @0xsequence/config@0.41.2 - - @0xsequence/guard@0.41.2 - - @0xsequence/indexer@0.41.2 - - @0xsequence/metadata@0.41.2 - - @0xsequence/multicall@0.41.2 - - @0xsequence/network@0.41.2 - - @0xsequence/provider@0.41.2 - - @0xsequence/relayer@0.41.2 - - @0xsequence/transactions@0.41.2 - - @0xsequence/utils@0.41.2 - - @0xsequence/wallet@0.41.2 - -## 0.41.1 - -### Patch Changes - -- update default networks -- Updated dependencies - - @0xsequence/abi@0.41.1 - - @0xsequence/api@0.41.1 - - @0xsequence/auth@0.41.1 - - @0xsequence/config@0.41.1 - - @0xsequence/guard@0.41.1 - - @0xsequence/indexer@0.41.1 - - @0xsequence/metadata@0.41.1 - - @0xsequence/multicall@0.41.1 - - @0xsequence/network@0.41.1 - - @0xsequence/provider@0.41.1 - - @0xsequence/relayer@0.41.1 - - @0xsequence/transactions@0.41.1 - - @0xsequence/utils@0.41.1 - - @0xsequence/wallet@0.41.1 - -## 0.41.0 - -### Minor Changes - -- relayer: fix Relayer.wait() interface - - The interface for calling Relayer.wait() has changed. Instead of a single optional ill-defined timeout/delay parameter, there are three optional parameters, in order: - - - timeout: the maximum time to wait for the transaction receipt - - delay: the polling interval, i.e. the time to wait between requests - - maxFails: the maximum number of hard failures to tolerate before giving up - - Please update your codebase accordingly. - -- relayer: add optional waitForReceipt parameter to Relayer.relay - - The behaviour of Relayer.relay() was not well-defined with respect to whether or not it waited for a receipt. - This change allows the caller to specify whether to wait or not, with the default behaviour being to wait. - -### Patch Changes - -- relayer: wait receipt retry logic -- fix wrapped object error -- provider: forward delegateCall and revertOnError transaction fields -- Updated dependencies -- Updated dependencies -- Updated dependencies -- Updated dependencies -- Updated dependencies - - @0xsequence/abi@0.41.0 - - @0xsequence/api@0.41.0 - - @0xsequence/auth@0.41.0 - - @0xsequence/config@0.41.0 - - @0xsequence/guard@0.41.0 - - @0xsequence/indexer@0.41.0 - - @0xsequence/metadata@0.41.0 - - @0xsequence/multicall@0.41.0 - - @0xsequence/network@0.41.0 - - @0xsequence/provider@0.41.0 - - @0xsequence/relayer@0.41.0 - - @0xsequence/transactions@0.41.0 - - @0xsequence/utils@0.41.0 - - @0xsequence/wallet@0.41.0 - -## 0.40.6 - -### Patch Changes - -- add arbitrum-nova chain -- Updated dependencies - - @0xsequence/abi@0.40.6 - - @0xsequence/api@0.40.6 - - @0xsequence/auth@0.40.6 - - @0xsequence/config@0.40.6 - - @0xsequence/guard@0.40.6 - - @0xsequence/indexer@0.40.6 - - @0xsequence/metadata@0.40.6 - - @0xsequence/multicall@0.40.6 - - @0xsequence/network@0.40.6 - - @0xsequence/provider@0.40.6 - - @0xsequence/relayer@0.40.6 - - @0xsequence/transactions@0.40.6 - - @0xsequence/utils@0.40.6 - - @0xsequence/wallet@0.40.6 - -## 0.40.5 - -### Patch Changes - -- api: update bindings -- Updated dependencies - - @0xsequence/abi@0.40.5 - - @0xsequence/api@0.40.5 - - @0xsequence/auth@0.40.5 - - @0xsequence/config@0.40.5 - - @0xsequence/guard@0.40.5 - - @0xsequence/indexer@0.40.5 - - @0xsequence/metadata@0.40.5 - - @0xsequence/multicall@0.40.5 - - @0xsequence/network@0.40.5 - - @0xsequence/provider@0.40.5 - - @0xsequence/relayer@0.40.5 - - @0xsequence/transactions@0.40.5 - - @0xsequence/utils@0.40.5 - - @0xsequence/wallet@0.40.5 - -## 0.40.4 - -### Patch Changes - -- add unreal transport -- Updated dependencies - - @0xsequence/abi@0.40.4 - - @0xsequence/api@0.40.4 - - @0xsequence/auth@0.40.4 - - @0xsequence/config@0.40.4 - - @0xsequence/guard@0.40.4 - - @0xsequence/indexer@0.40.4 - - @0xsequence/metadata@0.40.4 - - @0xsequence/multicall@0.40.4 - - @0xsequence/network@0.40.4 - - @0xsequence/provider@0.40.4 - - @0xsequence/relayer@0.40.4 - - @0xsequence/transactions@0.40.4 - - @0xsequence/utils@0.40.4 - - @0xsequence/wallet@0.40.4 - -## 0.40.3 - -### Patch Changes - -- provider: fix MessageToSign message type -- Updated dependencies - - @0xsequence/abi@0.40.3 - - @0xsequence/api@0.40.3 - - @0xsequence/auth@0.40.3 - - @0xsequence/config@0.40.3 - - @0xsequence/guard@0.40.3 - - @0xsequence/indexer@0.40.3 - - @0xsequence/metadata@0.40.3 - - @0xsequence/multicall@0.40.3 - - @0xsequence/network@0.40.3 - - @0xsequence/provider@0.40.3 - - @0xsequence/relayer@0.40.3 - - @0xsequence/transactions@0.40.3 - - @0xsequence/utils@0.40.3 - - @0xsequence/wallet@0.40.3 - -## 0.40.2 - -### Patch Changes - -- Wallet provider, loadSession method -- Updated dependencies - - @0xsequence/abi@0.40.2 - - @0xsequence/api@0.40.2 - - @0xsequence/auth@0.40.2 - - @0xsequence/config@0.40.2 - - @0xsequence/guard@0.40.2 - - @0xsequence/indexer@0.40.2 - - @0xsequence/metadata@0.40.2 - - @0xsequence/multicall@0.40.2 - - @0xsequence/network@0.40.2 - - @0xsequence/provider@0.40.2 - - @0xsequence/relayer@0.40.2 - - @0xsequence/transactions@0.40.2 - - @0xsequence/utils@0.40.2 - - @0xsequence/wallet@0.40.2 - -## 0.40.1 - -### Patch Changes - -- export sequence.initWallet and sequence.getWallet -- Updated dependencies - - @0xsequence/abi@0.40.1 - - @0xsequence/api@0.40.1 - - @0xsequence/auth@0.40.1 - - @0xsequence/config@0.40.1 - - @0xsequence/guard@0.40.1 - - @0xsequence/indexer@0.40.1 - - @0xsequence/metadata@0.40.1 - - @0xsequence/multicall@0.40.1 - - @0xsequence/network@0.40.1 - - @0xsequence/provider@0.40.1 - - @0xsequence/relayer@0.40.1 - - @0xsequence/transactions@0.40.1 - - @0xsequence/utils@0.40.1 - - @0xsequence/wallet@0.40.1 - -## 0.40.0 - -### Minor Changes - -- add sequence.initWallet(network, config) and sequence.getWallet() helper methods - -### Patch Changes - -- Updated dependencies - - @0xsequence/abi@0.40.0 - - @0xsequence/api@0.40.0 - - @0xsequence/auth@0.40.0 - - @0xsequence/config@0.40.0 - - @0xsequence/guard@0.40.0 - - @0xsequence/indexer@0.40.0 - - @0xsequence/metadata@0.40.0 - - @0xsequence/multicall@0.40.0 - - @0xsequence/network@0.40.0 - - @0xsequence/provider@0.40.0 - - @0xsequence/relayer@0.40.0 - - @0xsequence/transactions@0.40.0 - - @0xsequence/utils@0.40.0 - - @0xsequence/wallet@0.40.0 - -## 0.39.6 - -### Patch Changes - -- indexer: update client bindings -- Updated dependencies - - @0xsequence/abi@0.39.6 - - @0xsequence/api@0.39.6 - - @0xsequence/auth@0.39.6 - - @0xsequence/config@0.39.6 - - @0xsequence/guard@0.39.6 - - @0xsequence/indexer@0.39.6 - - @0xsequence/metadata@0.39.6 - - @0xsequence/multicall@0.39.6 - - @0xsequence/network@0.39.6 - - @0xsequence/provider@0.39.6 - - @0xsequence/relayer@0.39.6 - - @0xsequence/transactions@0.39.6 - - @0xsequence/utils@0.39.6 - - @0xsequence/wallet@0.39.6 - -## 0.39.5 - -### Patch Changes - -- provider: fix networkRpcUrl config option -- Updated dependencies - - @0xsequence/abi@0.39.5 - - @0xsequence/api@0.39.5 - - @0xsequence/auth@0.39.5 - - @0xsequence/config@0.39.5 - - @0xsequence/guard@0.39.5 - - @0xsequence/indexer@0.39.5 - - @0xsequence/metadata@0.39.5 - - @0xsequence/multicall@0.39.5 - - @0xsequence/network@0.39.5 - - @0xsequence/provider@0.39.5 - - @0xsequence/relayer@0.39.5 - - @0xsequence/transactions@0.39.5 - - @0xsequence/utils@0.39.5 - - @0xsequence/wallet@0.39.5 - -## 0.39.4 - -### Patch Changes - -- api: update client bindings -- Updated dependencies - - @0xsequence/abi@0.39.4 - - @0xsequence/api@0.39.4 - - @0xsequence/auth@0.39.4 - - @0xsequence/config@0.39.4 - - @0xsequence/guard@0.39.4 - - @0xsequence/indexer@0.39.4 - - @0xsequence/metadata@0.39.4 - - @0xsequence/multicall@0.39.4 - - @0xsequence/network@0.39.4 - - @0xsequence/provider@0.39.4 - - @0xsequence/relayer@0.39.4 - - @0xsequence/transactions@0.39.4 - - @0xsequence/utils@0.39.4 - - @0xsequence/wallet@0.39.4 - -## 0.39.3 - -### Patch Changes - -- add request method on Web3Provider -- Updated dependencies - - @0xsequence/abi@0.39.3 - - @0xsequence/api@0.39.3 - - @0xsequence/auth@0.39.3 - - @0xsequence/config@0.39.3 - - @0xsequence/guard@0.39.3 - - @0xsequence/indexer@0.39.3 - - @0xsequence/metadata@0.39.3 - - @0xsequence/multicall@0.39.3 - - @0xsequence/network@0.39.3 - - @0xsequence/provider@0.39.3 - - @0xsequence/relayer@0.39.3 - - @0xsequence/transactions@0.39.3 - - @0xsequence/utils@0.39.3 - - @0xsequence/wallet@0.39.3 - -## 0.39.2 - -### Patch Changes - -- update umd name -- Updated dependencies - - @0xsequence/abi@0.39.2 - - @0xsequence/api@0.39.2 - - @0xsequence/auth@0.39.2 - - @0xsequence/config@0.39.2 - - @0xsequence/guard@0.39.2 - - @0xsequence/indexer@0.39.2 - - @0xsequence/metadata@0.39.2 - - @0xsequence/multicall@0.39.2 - - @0xsequence/network@0.39.2 - - @0xsequence/provider@0.39.2 - - @0xsequence/relayer@0.39.2 - - @0xsequence/transactions@0.39.2 - - @0xsequence/utils@0.39.2 - - @0xsequence/wallet@0.39.2 - -## 0.39.1 - -### Patch Changes - -- add Aurora network -- add origin info for accountsChanged event to handle it per dapp -- Updated dependencies -- Updated dependencies - - @0xsequence/abi@0.39.1 - - @0xsequence/api@0.39.1 - - @0xsequence/auth@0.39.1 - - @0xsequence/config@0.39.1 - - @0xsequence/guard@0.39.1 - - @0xsequence/indexer@0.39.1 - - @0xsequence/metadata@0.39.1 - - @0xsequence/multicall@0.39.1 - - @0xsequence/network@0.39.1 - - @0xsequence/provider@0.39.1 - - @0xsequence/relayer@0.39.1 - - @0xsequence/transactions@0.39.1 - - @0xsequence/utils@0.39.1 - - @0xsequence/wallet@0.39.1 - -## 0.39.0 - -### Minor Changes - -- abstract window.localStorage to interface type - -### Patch Changes - -- Updated dependencies - - @0xsequence/abi@0.39.0 - - @0xsequence/api@0.39.0 - - @0xsequence/auth@0.39.0 - - @0xsequence/config@0.39.0 - - @0xsequence/guard@0.39.0 - - @0xsequence/indexer@0.39.0 - - @0xsequence/metadata@0.39.0 - - @0xsequence/multicall@0.39.0 - - @0xsequence/network@0.39.0 - - @0xsequence/provider@0.39.0 - - @0xsequence/relayer@0.39.0 - - @0xsequence/transactions@0.39.0 - - @0xsequence/utils@0.39.0 - - @0xsequence/wallet@0.39.0 - -## 0.38.2 - -### Patch Changes - -- provider: add Settings.defaultPurchaseAmount -- Updated dependencies - - @0xsequence/abi@0.38.2 - - @0xsequence/api@0.38.2 - - @0xsequence/auth@0.38.2 - - @0xsequence/config@0.38.2 - - @0xsequence/guard@0.38.2 - - @0xsequence/indexer@0.38.2 - - @0xsequence/metadata@0.38.2 - - @0xsequence/multicall@0.38.2 - - @0xsequence/network@0.38.2 - - @0xsequence/provider@0.38.2 - - @0xsequence/relayer@0.38.2 - - @0xsequence/transactions@0.38.2 - - @0xsequence/utils@0.38.2 - - @0xsequence/wallet@0.38.2 - -## 0.38.1 - -### Patch Changes - -- update api and metadata rpc bindings -- Updated dependencies - - @0xsequence/abi@0.38.1 - - @0xsequence/api@0.38.1 - - @0xsequence/auth@0.38.1 - - @0xsequence/config@0.38.1 - - @0xsequence/guard@0.38.1 - - @0xsequence/indexer@0.38.1 - - @0xsequence/metadata@0.38.1 - - @0xsequence/multicall@0.38.1 - - @0xsequence/network@0.38.1 - - @0xsequence/provider@0.38.1 - - @0xsequence/relayer@0.38.1 - - @0xsequence/transactions@0.38.1 - - @0xsequence/utils@0.38.1 - - @0xsequence/wallet@0.38.1 - -## 0.38.0 - -### Minor Changes - -- api: update bindings, change TokenPrice interface -- bridge: remove @0xsequence/bridge package -- api: update bindings, rename ContractCallArg to TupleComponent - -### Patch Changes - -- Updated dependencies -- Updated dependencies -- Updated dependencies - - @0xsequence/abi@0.38.0 - - @0xsequence/api@0.38.0 - - @0xsequence/auth@0.38.0 - - @0xsequence/config@0.38.0 - - @0xsequence/guard@0.38.0 - - @0xsequence/indexer@0.38.0 - - @0xsequence/metadata@0.38.0 - - @0xsequence/multicall@0.38.0 - - @0xsequence/network@0.38.0 - - @0xsequence/provider@0.38.0 - - @0xsequence/relayer@0.38.0 - - @0xsequence/transactions@0.38.0 - - @0xsequence/utils@0.38.0 - - @0xsequence/wallet@0.38.0 - -## 0.37.1 - -### Patch Changes - -- Add back sortNetworks - Removing sorting was a breaking change for dapps on older versions which directly integrate sequence. -- Updated dependencies - - @0xsequence/abi@0.37.1 - - @0xsequence/api@0.37.1 - - @0xsequence/auth@0.37.1 - - @0xsequence/config@0.37.1 - - @0xsequence/guard@0.37.1 - - @0xsequence/indexer@0.37.1 - - @0xsequence/metadata@0.37.1 - - @0xsequence/multicall@0.37.1 - - @0xsequence/network@0.37.1 - - @0xsequence/provider@0.37.1 - - @0xsequence/relayer@0.37.1 - - @0xsequence/transactions@0.37.1 - - @0xsequence/utils@0.37.1 - - @0xsequence/wallet@0.37.1 - -## 0.37.0 - -### Minor Changes - -- network related fixes and improvements -- api: bindings: exchange rate lookups - -### Patch Changes - -- Updated dependencies -- Updated dependencies - - @0xsequence/abi@0.37.0 - - @0xsequence/api@0.37.0 - - @0xsequence/auth@0.37.0 - - @0xsequence/config@0.37.0 - - @0xsequence/guard@0.37.0 - - @0xsequence/indexer@0.37.0 - - @0xsequence/metadata@0.37.0 - - @0xsequence/multicall@0.37.0 - - @0xsequence/network@0.37.0 - - @0xsequence/provider@0.37.0 - - @0xsequence/relayer@0.37.0 - - @0xsequence/transactions@0.37.0 - - @0xsequence/utils@0.37.0 - - @0xsequence/wallet@0.37.0 - -## 0.36.13 - -### Patch Changes - -- api: update bindings with new price endpoints -- Updated dependencies - - @0xsequence/abi@0.36.13 - - @0xsequence/api@0.36.13 - - @0xsequence/auth@0.36.13 - - @0xsequence/config@0.36.13 - - @0xsequence/guard@0.36.13 - - @0xsequence/indexer@0.36.13 - - @0xsequence/metadata@0.36.13 - - @0xsequence/multicall@0.36.13 - - @0xsequence/network@0.36.13 - - @0xsequence/provider@0.36.13 - - @0xsequence/relayer@0.36.13 - - @0xsequence/transactions@0.36.13 - - @0xsequence/utils@0.36.13 - - @0xsequence/wallet@0.36.13 - -## 0.36.12 - -### Patch Changes - -- wallet: skip remote signers if not needed -- auth: check that signature meets threshold before requesting auth token -- Updated dependencies -- Updated dependencies - - @0xsequence/abi@0.36.12 - - @0xsequence/api@0.36.12 - - @0xsequence/auth@0.36.12 - - @0xsequence/config@0.36.12 - - @0xsequence/guard@0.36.12 - - @0xsequence/indexer@0.36.12 - - @0xsequence/metadata@0.36.12 - - @0xsequence/multicall@0.36.12 - - @0xsequence/network@0.36.12 - - @0xsequence/provider@0.36.12 - - @0xsequence/relayer@0.36.12 - - @0xsequence/transactions@0.36.12 - - @0xsequence/utils@0.36.12 - - @0xsequence/wallet@0.36.12 - -## 0.36.11 - -### Patch Changes - -- Prefix EIP191 message on wallet-request-handler -- Updated dependencies - - @0xsequence/abi@0.36.11 - - @0xsequence/api@0.36.11 - - @0xsequence/auth@0.36.11 - - @0xsequence/config@0.36.11 - - @0xsequence/guard@0.36.11 - - @0xsequence/indexer@0.36.11 - - @0xsequence/metadata@0.36.11 - - @0xsequence/multicall@0.36.11 - - @0xsequence/network@0.36.11 - - @0xsequence/provider@0.36.11 - - @0xsequence/relayer@0.36.11 - - @0xsequence/transactions@0.36.11 - - @0xsequence/utils@0.36.11 - - @0xsequence/wallet@0.36.11 - -## 0.36.10 - -### Patch Changes - -- support bannerUrl on connect -- Updated dependencies - - @0xsequence/abi@0.36.10 - - @0xsequence/api@0.36.10 - - @0xsequence/auth@0.36.10 - - @0xsequence/config@0.36.10 - - @0xsequence/guard@0.36.10 - - @0xsequence/indexer@0.36.10 - - @0xsequence/metadata@0.36.10 - - @0xsequence/multicall@0.36.10 - - @0xsequence/network@0.36.10 - - @0xsequence/provider@0.36.10 - - @0xsequence/relayer@0.36.10 - - @0xsequence/transactions@0.36.10 - - @0xsequence/utils@0.36.10 - - @0xsequence/wallet@0.36.10 - -## 0.36.9 - -### Patch Changes - -- minor dev xp improvements -- Updated dependencies - - @0xsequence/abi@0.36.9 - - @0xsequence/api@0.36.9 - - @0xsequence/auth@0.36.9 - - @0xsequence/config@0.36.9 - - @0xsequence/guard@0.36.9 - - @0xsequence/indexer@0.36.9 - - @0xsequence/metadata@0.36.9 - - @0xsequence/multicall@0.36.9 - - @0xsequence/network@0.36.9 - - @0xsequence/provider@0.36.9 - - @0xsequence/relayer@0.36.9 - - @0xsequence/transactions@0.36.9 - - @0xsequence/utils@0.36.9 - - @0xsequence/wallet@0.36.9 - -## 0.36.8 - -### Patch Changes - -- more connect options (theme, payment providers, funding currencies) -- Updated dependencies - - @0xsequence/abi@0.36.8 - - @0xsequence/api@0.36.8 - - @0xsequence/auth@0.36.8 - - @0xsequence/config@0.36.8 - - @0xsequence/guard@0.36.8 - - @0xsequence/indexer@0.36.8 - - @0xsequence/metadata@0.36.8 - - @0xsequence/multicall@0.36.8 - - @0xsequence/network@0.36.8 - - @0xsequence/provider@0.36.8 - - @0xsequence/relayer@0.36.8 - - @0xsequence/transactions@0.36.8 - - @0xsequence/utils@0.36.8 - - @0xsequence/wallet@0.36.8 - -## 0.36.7 - -### Patch Changes - -- fix missing break -- Updated dependencies - - @0xsequence/abi@0.36.7 - - @0xsequence/api@0.36.7 - - @0xsequence/auth@0.36.7 - - @0xsequence/config@0.36.7 - - @0xsequence/guard@0.36.7 - - @0xsequence/indexer@0.36.7 - - @0xsequence/metadata@0.36.7 - - @0xsequence/multicall@0.36.7 - - @0xsequence/network@0.36.7 - - @0xsequence/provider@0.36.7 - - @0xsequence/relayer@0.36.7 - - @0xsequence/transactions@0.36.7 - - @0xsequence/utils@0.36.7 - - @0xsequence/wallet@0.36.7 - -## 0.36.6 - -### Patch Changes - -- wallet_switchEthereumChain support -- Updated dependencies - - @0xsequence/abi@0.36.6 - - @0xsequence/api@0.36.6 - - @0xsequence/auth@0.36.6 - - @0xsequence/config@0.36.6 - - @0xsequence/guard@0.36.6 - - @0xsequence/indexer@0.36.6 - - @0xsequence/metadata@0.36.6 - - @0xsequence/multicall@0.36.6 - - @0xsequence/network@0.36.6 - - @0xsequence/provider@0.36.6 - - @0xsequence/relayer@0.36.6 - - @0xsequence/transactions@0.36.6 - - @0xsequence/utils@0.36.6 - - @0xsequence/wallet@0.36.6 - -## 0.36.5 - -### Patch Changes - -- auth: bump ethauth to 0.7.0 - network, wallet: don't assume position of auth network in list - api/indexer/metadata: trim trailing slash on hostname, and add endpoint urls - relayer: Allow to specify local relayer transaction parameters like gas price or gas limit -- Updated dependencies - - @0xsequence/abi@0.36.5 - - @0xsequence/api@0.36.5 - - @0xsequence/auth@0.36.5 - - @0xsequence/config@0.36.5 - - @0xsequence/guard@0.36.5 - - @0xsequence/indexer@0.36.5 - - @0xsequence/metadata@0.36.5 - - @0xsequence/multicall@0.36.5 - - @0xsequence/network@0.36.5 - - @0xsequence/provider@0.36.5 - - @0xsequence/relayer@0.36.5 - - @0xsequence/transactions@0.36.5 - - @0xsequence/utils@0.36.5 - - @0xsequence/wallet@0.36.5 - -## 0.36.4 - -### Patch Changes - -- Updating list of chain ids to include other ethereum compatible chains -- Updated dependencies - - @0xsequence/abi@0.36.4 - - @0xsequence/api@0.36.4 - - @0xsequence/auth@0.36.4 - - @0xsequence/config@0.36.4 - - @0xsequence/guard@0.36.4 - - @0xsequence/indexer@0.36.4 - - @0xsequence/metadata@0.36.4 - - @0xsequence/multicall@0.36.4 - - @0xsequence/network@0.36.4 - - @0xsequence/provider@0.36.4 - - @0xsequence/relayer@0.36.4 - - @0xsequence/transactions@0.36.4 - - @0xsequence/utils@0.36.4 - - @0xsequence/wallet@0.36.4 - -## 0.36.3 - -### Patch Changes - -- provider: pass connect options to prompter methods -- Updated dependencies - - @0xsequence/abi@0.36.3 - - @0xsequence/api@0.36.3 - - @0xsequence/auth@0.36.3 - - @0xsequence/config@0.36.3 - - @0xsequence/guard@0.36.3 - - @0xsequence/indexer@0.36.3 - - @0xsequence/metadata@0.36.3 - - @0xsequence/multicall@0.36.3 - - @0xsequence/network@0.36.3 - - @0xsequence/provider@0.36.3 - - @0xsequence/relayer@0.36.3 - - @0xsequence/transactions@0.36.3 - - @0xsequence/utils@0.36.3 - - @0xsequence/wallet@0.36.3 - -## 0.36.2 - -### Patch Changes - -- transactions: Setting target to 0x0 when empty to during SequenceTxAbiEncode -- Updated dependencies - - @0xsequence/abi@0.36.2 - - @0xsequence/api@0.36.2 - - @0xsequence/auth@0.36.2 - - @0xsequence/config@0.36.2 - - @0xsequence/guard@0.36.2 - - @0xsequence/indexer@0.36.2 - - @0xsequence/metadata@0.36.2 - - @0xsequence/multicall@0.36.2 - - @0xsequence/network@0.36.2 - - @0xsequence/provider@0.36.2 - - @0xsequence/relayer@0.36.2 - - @0xsequence/transactions@0.36.2 - - @0xsequence/utils@0.36.2 - - @0xsequence/wallet@0.36.2 - -## 0.36.1 - -### Patch Changes - -- metadata: update client with more fields -- Updated dependencies - - @0xsequence/abi@0.36.1 - - @0xsequence/api@0.36.1 - - @0xsequence/auth@0.36.1 - - @0xsequence/config@0.36.1 - - @0xsequence/guard@0.36.1 - - @0xsequence/indexer@0.36.1 - - @0xsequence/metadata@0.36.1 - - @0xsequence/multicall@0.36.1 - - @0xsequence/network@0.36.1 - - @0xsequence/provider@0.36.1 - - @0xsequence/relayer@0.36.1 - - @0xsequence/transactions@0.36.1 - - @0xsequence/utils@0.36.1 - - @0xsequence/wallet@0.36.1 - -## 0.36.0 - -### Minor Changes - -- relayer, wallet: fee quote support - -### Patch Changes - -- Updated dependencies - - @0xsequence/abi@0.36.0 - - @0xsequence/api@0.36.0 - - @0xsequence/auth@0.36.0 - - @0xsequence/config@0.36.0 - - @0xsequence/guard@0.36.0 - - @0xsequence/indexer@0.36.0 - - @0xsequence/metadata@0.36.0 - - @0xsequence/multicall@0.36.0 - - @0xsequence/network@0.36.0 - - @0xsequence/provider@0.36.0 - - @0xsequence/relayer@0.36.0 - - @0xsequence/transactions@0.36.0 - - @0xsequence/utils@0.36.0 - - @0xsequence/wallet@0.36.0 - -## 0.35.12 - -### Patch Changes - -- provider: rename wallet.commands to wallet.utils -- Updated dependencies - - @0xsequence/abi@0.35.12 - - @0xsequence/api@0.35.12 - - @0xsequence/auth@0.35.12 - - @0xsequence/config@0.35.12 - - @0xsequence/guard@0.35.12 - - @0xsequence/indexer@0.35.12 - - @0xsequence/metadata@0.35.12 - - @0xsequence/multicall@0.35.12 - - @0xsequence/network@0.35.12 - - @0xsequence/provider@0.35.12 - - @0xsequence/relayer@0.35.12 - - @0xsequence/transactions@0.35.12 - - @0xsequence/utils@0.35.12 - - @0xsequence/wallet@0.35.12 - -## 0.35.11 - -### Patch Changes - -- provider/utils: smoother message validation -- Updated dependencies - - @0xsequence/abi@0.35.11 - - @0xsequence/api@0.35.11 - - @0xsequence/auth@0.35.11 - - @0xsequence/config@0.35.11 - - @0xsequence/guard@0.35.11 - - @0xsequence/indexer@0.35.11 - - @0xsequence/metadata@0.35.11 - - @0xsequence/multicall@0.35.11 - - @0xsequence/network@0.35.11 - - @0xsequence/provider@0.35.11 - - @0xsequence/relayer@0.35.11 - - @0xsequence/transactions@0.35.11 - - @0xsequence/utils@0.35.11 - - @0xsequence/wallet@0.35.11 - -## 0.35.10 - -### Patch Changes - -- upgrade deps -- Updated dependencies - - @0xsequence/abi@0.35.10 - - @0xsequence/api@0.35.10 - - @0xsequence/auth@0.35.10 - - @0xsequence/config@0.35.10 - - @0xsequence/guard@0.35.10 - - @0xsequence/indexer@0.35.10 - - @0xsequence/metadata@0.35.10 - - @0xsequence/multicall@0.35.10 - - @0xsequence/network@0.35.10 - - @0xsequence/provider@0.35.10 - - @0xsequence/relayer@0.35.10 - - @0xsequence/transactions@0.35.10 - - @0xsequence/utils@0.35.10 - - @0xsequence/wallet@0.35.10 - -## 0.35.9 - -### Patch Changes - -- provider: window-transport override event handlers with new wallet instance -- Updated dependencies - - @0xsequence/abi@0.35.9 - - @0xsequence/api@0.35.9 - - @0xsequence/auth@0.35.9 - - @0xsequence/config@0.35.9 - - @0xsequence/guard@0.35.9 - - @0xsequence/indexer@0.35.9 - - @0xsequence/metadata@0.35.9 - - @0xsequence/multicall@0.35.9 - - @0xsequence/network@0.35.9 - - @0xsequence/provider@0.35.9 - - @0xsequence/relayer@0.35.9 - - @0xsequence/transactions@0.35.9 - - @0xsequence/utils@0.35.9 - - @0xsequence/wallet@0.35.9 - -## 0.35.8 - -### Patch Changes - -- provider: async wallet sign in improvements -- Updated dependencies - - @0xsequence/abi@0.35.8 - - @0xsequence/api@0.35.8 - - @0xsequence/auth@0.35.8 - - @0xsequence/config@0.35.8 - - @0xsequence/guard@0.35.8 - - @0xsequence/indexer@0.35.8 - - @0xsequence/metadata@0.35.8 - - @0xsequence/multicall@0.35.8 - - @0xsequence/network@0.35.8 - - @0xsequence/provider@0.35.8 - - @0xsequence/relayer@0.35.8 - - @0xsequence/transactions@0.35.8 - - @0xsequence/utils@0.35.8 - - @0xsequence/wallet@0.35.8 - -## 0.35.7 - -### Patch Changes - -- config: cache wallet configs -- Updated dependencies - - @0xsequence/abi@0.35.7 - - @0xsequence/api@0.35.7 - - @0xsequence/auth@0.35.7 - - @0xsequence/config@0.35.7 - - @0xsequence/guard@0.35.7 - - @0xsequence/indexer@0.35.7 - - @0xsequence/metadata@0.35.7 - - @0xsequence/multicall@0.35.7 - - @0xsequence/network@0.35.7 - - @0xsequence/provider@0.35.7 - - @0xsequence/relayer@0.35.7 - - @0xsequence/transactions@0.35.7 - - @0xsequence/utils@0.35.7 - - @0xsequence/wallet@0.35.7 - -## 0.35.6 - -### Patch Changes - -- provider: support async signin of wallet request handler -- Updated dependencies - - @0xsequence/abi@0.35.6 - - @0xsequence/api@0.35.6 - - @0xsequence/auth@0.35.6 - - @0xsequence/config@0.35.6 - - @0xsequence/guard@0.35.6 - - @0xsequence/indexer@0.35.6 - - @0xsequence/metadata@0.35.6 - - @0xsequence/multicall@0.35.6 - - @0xsequence/network@0.35.6 - - @0xsequence/provider@0.35.6 - - @0xsequence/relayer@0.35.6 - - @0xsequence/transactions@0.35.6 - - @0xsequence/utils@0.35.6 - - @0xsequence/wallet@0.35.6 - -## 0.35.5 - -### Patch Changes - -- wallet: skip threshold check during fee estimation -- Updated dependencies - - @0xsequence/abi@0.35.5 - - @0xsequence/api@0.35.5 - - @0xsequence/auth@0.35.5 - - @0xsequence/config@0.35.5 - - @0xsequence/guard@0.35.5 - - @0xsequence/indexer@0.35.5 - - @0xsequence/metadata@0.35.5 - - @0xsequence/multicall@0.35.5 - - @0xsequence/network@0.35.5 - - @0xsequence/provider@0.35.5 - - @0xsequence/relayer@0.35.5 - - @0xsequence/transactions@0.35.5 - - @0xsequence/utils@0.35.5 - - @0xsequence/wallet@0.35.5 - -## 0.35.4 - -### Patch Changes - -- - browser extension mode, center window -- Updated dependencies - - @0xsequence/abi@0.35.4 - - @0xsequence/api@0.35.4 - - @0xsequence/auth@0.35.4 - - @0xsequence/config@0.35.4 - - @0xsequence/guard@0.35.4 - - @0xsequence/indexer@0.35.4 - - @0xsequence/metadata@0.35.4 - - @0xsequence/multicall@0.35.4 - - @0xsequence/network@0.35.4 - - @0xsequence/provider@0.35.4 - - @0xsequence/relayer@0.35.4 - - @0xsequence/transactions@0.35.4 - - @0xsequence/utils@0.35.4 - - @0xsequence/wallet@0.35.4 - -## 0.35.3 - -### Patch Changes - -- - update window position when in browser extension mode -- Updated dependencies - - @0xsequence/abi@0.35.3 - - @0xsequence/api@0.35.3 - - @0xsequence/auth@0.35.3 - - @0xsequence/config@0.35.3 - - @0xsequence/guard@0.35.3 - - @0xsequence/indexer@0.35.3 - - @0xsequence/metadata@0.35.3 - - @0xsequence/multicall@0.35.3 - - @0xsequence/network@0.35.3 - - @0xsequence/provider@0.35.3 - - @0xsequence/relayer@0.35.3 - - @0xsequence/transactions@0.35.3 - - @0xsequence/utils@0.35.3 - - @0xsequence/wallet@0.35.3 - -## 0.35.2 - -### Patch Changes - -- - provider: WindowMessageHandler accept optional windowHref -- Updated dependencies - - @0xsequence/abi@0.35.2 - - @0xsequence/api@0.35.2 - - @0xsequence/auth@0.35.2 - - @0xsequence/config@0.35.2 - - @0xsequence/guard@0.35.2 - - @0xsequence/indexer@0.35.2 - - @0xsequence/metadata@0.35.2 - - @0xsequence/multicall@0.35.2 - - @0xsequence/network@0.35.2 - - @0xsequence/provider@0.35.2 - - @0xsequence/relayer@0.35.2 - - @0xsequence/transactions@0.35.2 - - @0xsequence/utils@0.35.2 - - @0xsequence/wallet@0.35.2 - -## 0.35.1 - -### Patch Changes - -- wallet: update config on undeployed too -- Updated dependencies - - @0xsequence/abi@0.35.1 - - @0xsequence/api@0.35.1 - - @0xsequence/auth@0.35.1 - - @0xsequence/config@0.35.1 - - @0xsequence/guard@0.35.1 - - @0xsequence/indexer@0.35.1 - - @0xsequence/metadata@0.35.1 - - @0xsequence/multicall@0.35.1 - - @0xsequence/network@0.35.1 - - @0xsequence/provider@0.35.1 - - @0xsequence/relayer@0.35.1 - - @0xsequence/transactions@0.35.1 - - @0xsequence/utils@0.35.1 - - @0xsequence/wallet@0.35.1 - -## 0.35.0 - -### Minor Changes - -- - config: add buildStubSignature - - provider: add checks to signing cases for wallet deployment and config statuses - - provider: add prompt for wallet deployment - - relayer: add BaseRelayer.prependWalletDeploy - - relayer: add Relayer.feeOptions - - relayer: account for wallet deployment in fee estimation - - transactions: add fromTransactionish - - wallet: add Account.prependConfigUpdate - - wallet: add Account.getFeeOptions - -### Patch Changes - -- Updated dependencies - - @0xsequence/abi@0.35.0 - - @0xsequence/api@0.35.0 - - @0xsequence/auth@0.35.0 - - @0xsequence/config@0.35.0 - - @0xsequence/guard@0.35.0 - - @0xsequence/indexer@0.35.0 - - @0xsequence/metadata@0.35.0 - - @0xsequence/multicall@0.35.0 - - @0xsequence/network@0.35.0 - - @0xsequence/provider@0.35.0 - - @0xsequence/relayer@0.35.0 - - @0xsequence/transactions@0.35.0 - - @0xsequence/utils@0.35.0 - - @0xsequence/wallet@0.35.0 - -## 0.34.1 - -### Patch Changes - -- Updated dependencies - - @0xsequence/auth@0.34.1 - - @0xsequence/provider@0.34.1 - -## 0.34.0 - -### Minor Changes - -- - upgrade deps - -### Patch Changes - -- Updated dependencies - - @0xsequence/abi@0.34.0 - - @0xsequence/api@0.34.0 - - @0xsequence/auth@0.34.0 - - @0xsequence/config@0.34.0 - - @0xsequence/guard@0.34.0 - - @0xsequence/indexer@0.34.0 - - @0xsequence/metadata@0.34.0 - - @0xsequence/multicall@0.34.0 - - @0xsequence/network@0.34.0 - - @0xsequence/provider@0.34.0 - - @0xsequence/relayer@0.34.0 - - @0xsequence/transactions@0.34.0 - - @0xsequence/utils@0.34.0 - - @0xsequence/wallet@0.34.0 - -## 0.31.6 - -### Patch Changes - -- Updated dependencies - - @0xsequence/wallet@0.33.3 - - @0xsequence/auth@0.33.3 - - @0xsequence/provider@0.33.3 - -## 0.31.5 - -### Patch Changes - -- Updated dependencies - - @0xsequence/transactions@0.33.2 - - @0xsequence/provider@0.33.2 - - @0xsequence/relayer@0.33.2 - - @0xsequence/wallet@0.33.2 - - @0xsequence/auth@0.33.2 - -## 0.31.4 - -### Patch Changes - -- Updated dependencies - - @0xsequence/api@0.33.1 - - @0xsequence/auth@0.33.1 - - @0xsequence/provider@0.33.1 - -## 0.31.3 - -### Patch Changes - -- Updated dependencies - - @0xsequence/auth@0.33.0 - - @0xsequence/provider@0.33.0 - -## 0.31.2 - -### Patch Changes - -- Updated dependencies - - @0xsequence/metadata@0.31.3 - - @0xsequence/auth@0.31.3 - - @0xsequence/provider@0.31.3 - -## 0.31.1 - -### Patch Changes - -- Updated dependencies - - @0xsequence/relayer@0.31.1 - - @0xsequence/wallet@0.31.1 - - @0xsequence/auth@0.31.1 - - @0xsequence/provider@0.31.1 - -## 0.31.0 - -### Minor Changes - -- - upgrading to ethers v5.5 - -### Patch Changes - -- Updated dependencies - - @0xsequence/abi@0.31.0 - - @0xsequence/api@0.31.0 - - @0xsequence/auth@0.31.0 - - @0xsequence/config@0.31.0 - - @0xsequence/guard@0.31.0 - - @0xsequence/indexer@0.31.0 - - @0xsequence/metadata@0.31.0 - - @0xsequence/multicall@0.31.0 - - @0xsequence/network@0.31.0 - - @0xsequence/provider@0.31.0 - - @0xsequence/relayer@0.31.0 - - @0xsequence/transactions@0.31.0 - - @0xsequence/utils@0.31.0 - - @0xsequence/wallet@0.31.0 - -## 0.30.0 - -### Minor Changes - -- - upgrade most deps - -### Patch Changes - -- Updated dependencies - - @0xsequence/abi@0.30.0 - - @0xsequence/api@0.30.0 - - @0xsequence/auth@0.30.0 - - @0xsequence/config@0.30.0 - - @0xsequence/guard@0.30.0 - - @0xsequence/indexer@0.30.0 - - @0xsequence/metadata@0.30.0 - - @0xsequence/multicall@0.30.0 - - @0xsequence/network@0.30.0 - - @0xsequence/provider@0.30.0 - - @0xsequence/relayer@0.30.0 - - @0xsequence/transactions@0.30.0 - - @0xsequence/utils@0.30.0 - - @0xsequence/wallet@0.30.0 - -## 0.29.9 - -### Patch Changes - -- Updated dependencies [undefined] - - @0xsequence/api@0.29.9 - - @0xsequence/auth@0.29.9 - - @0xsequence/provider@0.29.9 - -## 0.29.8 - -### Patch Changes - -- update api -- Updated dependencies [undefined] - - @0xsequence/abi@0.29.8 - - @0xsequence/api@0.29.8 - - @0xsequence/auth@0.29.8 - - @0xsequence/config@0.29.8 - - @0xsequence/guard@0.29.8 - - @0xsequence/indexer@0.29.8 - - @0xsequence/metadata@0.29.8 - - @0xsequence/multicall@0.29.8 - - @0xsequence/network@0.29.8 - - @0xsequence/provider@0.29.8 - - @0xsequence/relayer@0.29.8 - - @0xsequence/transactions@0.29.8 - - @0xsequence/utils@0.29.8 - - @0xsequence/wallet@0.29.8 - -## 0.29.7 - -### Patch Changes - -- Updated dependencies [undefined] - - @0xsequence/wallet@0.29.7 - - @0xsequence/auth@0.29.7 - - @0xsequence/provider@0.29.7 - -## 0.29.6 - -### Patch Changes - -- Updated dependencies [undefined] - - @0xsequence/network@0.29.6 - - @0xsequence/auth@0.29.6 - - @0xsequence/config@0.29.6 - - @0xsequence/multicall@0.29.6 - - @0xsequence/provider@0.29.6 - - @0xsequence/transactions@0.29.6 - - @0xsequence/wallet@0.29.6 - - @0xsequence/relayer@0.29.6 - -## 0.29.5 - -### Patch Changes - -- auth: pass testnetMode flag depending on network -- Updated dependencies [undefined] - - @0xsequence/auth@0.29.5 - - @0xsequence/config@0.29.5 - - @0xsequence/provider@0.29.5 - - @0xsequence/relayer@0.29.5 - - @0xsequence/wallet@0.29.5 - -## 0.29.4 - -### Patch Changes - -- Updated dependencies [undefined] - - @0xsequence/api@0.29.4 - - @0xsequence/auth@0.29.4 - - @0xsequence/provider@0.29.4 - -## 0.29.3 - -### Patch Changes - -- Updated dependencies [undefined] - - @0xsequence/indexer@0.29.3 - - @0xsequence/auth@0.29.3 - - @0xsequence/provider@0.29.3 - -## 0.29.2 - -### Patch Changes - -- Updated dependencies [undefined] - - @0xsequence/relayer@0.29.2 - - @0xsequence/wallet@0.29.2 - - @0xsequence/auth@0.29.2 - - @0xsequence/provider@0.29.2 - -## 0.29.1 - -### Patch Changes - -- Updated dependencies [undefined] - - @0xsequence/api@0.29.1 - - @0xsequence/metadata@0.29.1 - - @0xsequence/auth@0.29.1 - - @0xsequence/provider@0.29.1 - -## 0.29.0 - -### Minor Changes - -- major architectural changes in Sequence design - - - only one API instance, API is no longer a per-chain service - - separate per-chain indexer service, API no longer handles indexing - - single contract metadata service, API no longer serves metadata - - chaind package has been removed, indexer and metadata packages have been added - - stronger typing with new explicit ChainId type - - multicall fixes and improvements - - forbid "wait" transactions in sendTransactionBatch calls - -### Patch Changes - -- Updated dependencies [undefined] - - @0xsequence/api@0.29.0 - - @0xsequence/auth@0.29.0 - - @0xsequence/config@0.29.0 - - @0xsequence/indexer@0.29.0 - - @0xsequence/metadata@0.29.0 - - @0xsequence/network@0.29.0 - - @0xsequence/relayer@0.29.0 - - @0xsequence/transactions@0.29.0 - - @0xsequence/abi@0.29.0 - - @0xsequence/multicall@0.29.0 - - @0xsequence/provider@0.29.0 - - @0xsequence/utils@0.29.0 - - @0xsequence/wallet@0.29.0 - -## 0.28.0 - -### Minor Changes - -- extension provider - -### Patch Changes - -- Updated dependencies [undefined] - - @0xsequence/abi@0.28.0 - - @0xsequence/api@0.28.0 - - @0xsequence/auth@0.28.0 - - @0xsequence/chaind@0.28.0 - - @0xsequence/config@0.28.0 - - @0xsequence/guard@0.28.0 - - @0xsequence/multicall@0.28.0 - - @0xsequence/network@0.28.0 - - @0xsequence/provider@0.28.0 - - @0xsequence/relayer@0.28.0 - - @0xsequence/transactions@0.28.0 - - @0xsequence/utils@0.28.0 - - @0xsequence/wallet@0.28.0 - -## 0.27.2 - -### Patch Changes - -- Updated dependencies [undefined] - - @0xsequence/wallet@0.27.2 - - @0xsequence/auth@0.27.2 - - @0xsequence/provider@0.27.2 - -## 0.27.1 - -### Patch Changes - -- Updated dependencies [undefined] - - @0xsequence/relayer@0.27.1 - - @0xsequence/wallet@0.27.1 - - @0xsequence/auth@0.27.1 - - @0xsequence/provider@0.27.1 - -## 0.27.0 - -### Minor Changes - -- Add requireFreshSigner lib to sessions - -### Patch Changes - -- Updated dependencies [undefined] - - @0xsequence/abi@0.27.0 - - @0xsequence/api@0.27.0 - - @0xsequence/auth@0.27.0 - - @0xsequence/chaind@0.27.0 - - @0xsequence/config@0.27.0 - - @0xsequence/guard@0.27.0 - - @0xsequence/multicall@0.27.0 - - @0xsequence/network@0.27.0 - - @0xsequence/provider@0.27.0 - - @0xsequence/relayer@0.27.0 - - @0xsequence/transactions@0.27.0 - - @0xsequence/utils@0.27.0 - - @0xsequence/wallet@0.27.0 - -## 0.26.0 - -### Minor Changes - -- update relayer client bindings - provide the wallet's address for calls to SendMetaTxn - modify the semantics of Relayer.getNonce() to allow relayers to select nonce spaces for clients - -## 0.25.2 - -### Patch Changes - -- Updated dependencies [undefined] - - @0xsequence/relayer@0.26.0 - - @0xsequence/wallet@0.26.0 - - @0xsequence/auth@0.26.0 - - @0xsequence/provider@0.26.0 - -## 0.25.1 - -### Patch Changes - -- Fix build typescrypt issue -- Updated dependencies [undefined] - - @0xsequence/abi@0.25.1 - - @0xsequence/api@0.25.1 - - @0xsequence/auth@0.25.1 - - @0xsequence/chaind@0.25.1 - - @0xsequence/config@0.25.1 - - @0xsequence/guard@0.25.1 - - @0xsequence/multicall@0.25.1 - - @0xsequence/network@0.25.1 - - @0xsequence/provider@0.25.1 - - @0xsequence/relayer@0.25.1 - - @0xsequence/transactions@0.25.1 - - @0xsequence/utils@0.25.1 - - @0xsequence/wallet@0.25.1 - -## 0.25.0 - -### Minor Changes - -- 10c8af8: Add estimator package - Fix multicall few calls bug - -### Patch Changes - -- Updated dependencies [10c8af8] - - @0xsequence/abi@0.25.0 - - @0xsequence/api@0.25.0 - - @0xsequence/auth@0.25.0 - - @0xsequence/chaind@0.25.0 - - @0xsequence/config@0.25.0 - - @0xsequence/guard@0.25.0 - - @0xsequence/multicall@0.25.0 - - @0xsequence/network@0.25.0 - - @0xsequence/provider@0.25.0 - - @0xsequence/relayer@0.25.0 - - @0xsequence/transactions@0.25.0 - - @0xsequence/utils@0.25.0 - - @0xsequence/wallet@0.25.0 - -## 0.24.1 - -### Patch Changes - -- Updated dependencies [undefined] - - @0xsequence/relayer@0.24.1 - - @0xsequence/wallet@0.24.1 - - @0xsequence/auth@0.24.1 - - @0xsequence/provider@0.24.1 - -## 0.24.0 - -### Minor Changes - -- pass wallet config and nonce to GetMetaTxnNetworkFeeOptions - -### Patch Changes - -- Updated dependencies [undefined] - - @0xsequence/api@0.24.0 - - @0xsequence/relayer@0.24.0 - - @0xsequence/auth@0.24.0 - - @0xsequence/wallet@0.24.0 - - @0xsequence/provider@0.24.0 - -## 0.23.0 - -### Minor Changes - -- - relayer: offer variety of gas fee options from the relayer service" - -### Patch Changes - -- Updated dependencies [undefined] - - @0xsequence/abi@0.23.0 - - @0xsequence/api@0.23.0 - - @0xsequence/auth@0.23.0 - - @0xsequence/chaind@0.23.0 - - @0xsequence/config@0.23.0 - - @0xsequence/guard@0.23.0 - - @0xsequence/multicall@0.23.0 - - @0xsequence/network@0.23.0 - - @0xsequence/provider@0.23.0 - - @0xsequence/relayer@0.23.0 - - @0xsequence/transactions@0.23.0 - - @0xsequence/utils@0.23.0 - - @0xsequence/wallet@0.23.0 - -## 0.22.2 - -### Patch Changes - -- e1c109e: Fix authProof on expired sessions -- Updated dependencies [e1c109e] - - @0xsequence/auth@0.22.2 - - @0xsequence/abi@0.22.2 - - @0xsequence/api@0.22.2 - - @0xsequence/chaind@0.22.2 - - @0xsequence/config@0.22.2 - - @0xsequence/guard@0.22.2 - - @0xsequence/multicall@0.22.2 - - @0xsequence/network@0.22.2 - - @0xsequence/provider@0.22.2 - - @0xsequence/relayer@0.22.2 - - @0xsequence/transactions@0.22.2 - - @0xsequence/utils@0.22.2 - - @0xsequence/wallet@0.22.2 - -## 0.22.1 - -### Patch Changes - -- transport session cache -- Updated dependencies [undefined] - - @0xsequence/abi@0.22.1 - - @0xsequence/api@0.22.1 - - @0xsequence/auth@0.22.1 - - @0xsequence/chaind@0.22.1 - - @0xsequence/config@0.22.1 - - @0xsequence/guard@0.22.1 - - @0xsequence/multicall@0.22.1 - - @0xsequence/network@0.22.1 - - @0xsequence/provider@0.22.1 - - @0xsequence/relayer@0.22.1 - - @0xsequence/transactions@0.22.1 - - @0xsequence/utils@0.22.1 - - @0xsequence/wallet@0.22.1 - -## 0.22.0 - -### Minor Changes - -- e667b65: Expose all relayer options on networks - -### Patch Changes - -- Updated dependencies [e667b65] - - @0xsequence/abi@0.22.0 - - @0xsequence/network@0.22.0 - - @0xsequence/relayer@0.22.0 - - @0xsequence/utils@0.22.0 - - @0xsequence/wallet@0.22.0 - - @0xsequence/api@0.22.0 - - @0xsequence/auth@0.22.0 - - @0xsequence/chaind@0.22.0 - - @0xsequence/config@0.22.0 - - @0xsequence/guard@0.22.0 - - @0xsequence/multicall@0.22.0 - - @0xsequence/provider@0.22.0 - - @0xsequence/transactions@0.22.0 - -## 0.21.5 - -### Patch Changes - -- Give priority to metaTxnId returned by relayer -- Updated dependencies [undefined] - - @0xsequence/abi@0.21.5 - - @0xsequence/api@0.21.5 - - @0xsequence/auth@0.21.5 - - @0xsequence/chaind@0.21.5 - - @0xsequence/config@0.21.5 - - @0xsequence/guard@0.21.5 - - @0xsequence/multicall@0.21.5 - - @0xsequence/network@0.21.5 - - @0xsequence/provider@0.21.5 - - @0xsequence/relayer@0.21.5 - - @0xsequence/transactions@0.21.5 - - @0xsequence/utils@0.21.5 - - @0xsequence/wallet@0.21.5 - -## 0.21.4 - -### Patch Changes - -- Add has enough signers method -- Updated dependencies [undefined] - - @0xsequence/abi@0.21.4 - - @0xsequence/api@0.21.4 - - @0xsequence/auth@0.21.4 - - @0xsequence/chaind@0.21.4 - - @0xsequence/config@0.21.4 - - @0xsequence/guard@0.21.4 - - @0xsequence/multicall@0.21.4 - - @0xsequence/network@0.21.4 - - @0xsequence/provider@0.21.4 - - @0xsequence/relayer@0.21.4 - - @0xsequence/transactions@0.21.4 - - @0xsequence/utils@0.21.4 - - @0xsequence/wallet@0.21.4 - -## 0.21.3 - -### Patch Changes - -- add window session cache -- Updated dependencies [undefined] - - @0xsequence/abi@0.21.3 - - @0xsequence/api@0.21.3 - - @0xsequence/auth@0.21.3 - - @0xsequence/chaind@0.21.3 - - @0xsequence/config@0.21.3 - - @0xsequence/guard@0.21.3 - - @0xsequence/multicall@0.21.3 - - @0xsequence/network@0.21.3 - - @0xsequence/provider@0.21.3 - - @0xsequence/relayer@0.21.3 - - @0xsequence/transactions@0.21.3 - - @0xsequence/utils@0.21.3 - - @0xsequence/wallet@0.21.3 - -## 0.21.2 - -### Patch Changes - -- exception handlind in relayer -- Updated dependencies [undefined] - - @0xsequence/abi@0.21.2 - - @0xsequence/api@0.21.2 - - @0xsequence/auth@0.21.2 - - @0xsequence/chaind@0.21.2 - - @0xsequence/config@0.21.2 - - @0xsequence/guard@0.21.2 - - @0xsequence/multicall@0.21.2 - - @0xsequence/network@0.21.2 - - @0xsequence/provider@0.21.2 - - @0xsequence/relayer@0.21.2 - - @0xsequence/transactions@0.21.2 - - @0xsequence/utils@0.21.2 - - @0xsequence/wallet@0.21.2 - -## 0.21.1 - -### Patch Changes - -- config updates must not be revertOnError -- Updated dependencies [undefined] - - @0xsequence/wallet@0.21.1 - - @0xsequence/auth@0.21.1 - - @0xsequence/provider@0.21.1 - -## 0.21.0 - -### Minor Changes - -- - fix gas estimation on wallets with large number of signers - - update to session handling and wallet config construction upon auth - -### Patch Changes - -- Updated dependencies [undefined] - - @0xsequence/abi@0.21.0 - - @0xsequence/api@0.21.0 - - @0xsequence/auth@0.21.0 - - @0xsequence/chaind@0.21.0 - - @0xsequence/config@0.21.0 - - @0xsequence/guard@0.21.0 - - @0xsequence/multicall@0.21.0 - - @0xsequence/network@0.21.0 - - @0xsequence/provider@0.21.0 - - @0xsequence/relayer@0.21.0 - - @0xsequence/transactions@0.21.0 - - @0xsequence/utils@0.21.0 - - @0xsequence/wallet@0.21.0 - -## 0.20.0 - -### Minor Changes - -- revert JWT request piggybacking - -### Patch Changes - -- Updated dependencies [undefined] - - @0xsequence/api@0.20.0 - - @0xsequence/auth@0.20.0 - - @0xsequence/provider@0.20.0 - -## 0.19.3 - -### Patch Changes - -- jwtAuth visibility, package version sync -- Updated dependencies [undefined] - - @0xsequence/abi@0.19.3 - - @0xsequence/api@0.19.3 - - @0xsequence/auth@0.19.3 - - @0xsequence/chaind@0.19.3 - - @0xsequence/config@0.19.3 - - @0xsequence/guard@0.19.3 - - @0xsequence/multicall@0.19.3 - - @0xsequence/network@0.19.3 - - @0xsequence/provider@0.19.3 - - @0xsequence/relayer@0.19.3 - - @0xsequence/transactions@0.19.3 - - @0xsequence/utils@0.19.3 - - @0xsequence/wallet@0.19.3 - -## 0.19.2 - -### Patch Changes - -- Updated dependencies [undefined] - - @0xsequence/abi@0.19.2 - - @0xsequence/auth@0.19.2 - - @0xsequence/config@0.19.2 - - @0xsequence/multicall@0.19.2 - - @0xsequence/provider@0.19.2 - - @0xsequence/relayer@0.19.2 - - @0xsequence/transactions@0.19.2 - - @0xsequence/wallet@0.19.2 - -## 0.19.1 - -### Patch Changes - -- Updated dependencies [undefined] - - @0xsequence/provider@0.19.1 - -## 0.19.0 - -### Minor Changes - -- - provider, improve dapp / wallet transport io - -### Patch Changes - -- Updated dependencies [undefined] - - @0xsequence/abi@0.19.0 - - @0xsequence/api@0.19.0 - - @0xsequence/auth@0.19.0 - - @0xsequence/chaind@0.19.0 - - @0xsequence/config@0.19.0 - - @0xsequence/guard@0.19.0 - - @0xsequence/multicall@0.19.0 - - @0xsequence/network@0.19.0 - - @0xsequence/provider@0.19.0 - - @0xsequence/relayer@0.19.0 - - @0xsequence/transactions@0.19.0 - - @0xsequence/utils@0.19.0 - - @0xsequence/wallet@0.19.0 - -## 0.18.0 - -### Minor Changes - -- relayer improvements and pending transaction handling - -### Patch Changes - -- Updated dependencies [undefined] - - @0xsequence/abi@0.18.0 - - @0xsequence/api@0.18.0 - - @0xsequence/auth@0.18.0 - - @0xsequence/chaind@0.18.0 - - @0xsequence/config@0.18.0 - - @0xsequence/guard@0.18.0 - - @0xsequence/multicall@0.18.0 - - @0xsequence/network@0.18.0 - - @0xsequence/provider@0.18.0 - - @0xsequence/relayer@0.18.0 - - @0xsequence/transactions@0.18.0 - - @0xsequence/utils@0.18.0 - - @0xsequence/wallet@0.18.0 - -## 0.17.0 - -### Minor Changes - -- api: ArcadeumAPIClient no longer exposes jwtAuth -- auth: piggyback on already pending JWT and signing requests - -### Patch Changes - -- Updated dependencies [undefined] - - @0xsequence/api@0.17.0 - - @0xsequence/auth@0.17.0 - - @0xsequence/provider@0.17.0 - -## 0.16.1 - -### Patch Changes - -- Updated dependencies [undefined] - - @0xsequence/api@0.16.1 - - @0xsequence/auth@0.16.1 - - @0xsequence/provider@0.16.1 - -## 0.16.0 - -### Minor Changes - -- relayer as its own service separate from chaind - -### Patch Changes - -- Updated dependencies [undefined] - - @0xsequence/abi@0.16.0 - - @0xsequence/api@0.16.0 - - @0xsequence/auth@0.16.0 - - @0xsequence/chaind@0.16.0 - - @0xsequence/config@0.16.0 - - @0xsequence/guard@0.16.0 - - @0xsequence/multicall@0.16.0 - - @0xsequence/network@0.16.0 - - @0xsequence/provider@0.16.0 - - @0xsequence/relayer@0.16.0 - - @0xsequence/transactions@0.16.0 - - @0xsequence/utils@0.16.0 - - @0xsequence/wallet@0.16.0 - -## 0.15.1 - -### Patch Changes - -- update api clients -- Updated dependencies [undefined] - - @0xsequence/abi@0.15.1 - - @0xsequence/api@0.15.1 - - @0xsequence/auth@0.15.1 - - @0xsequence/chaind@0.15.1 - - @0xsequence/config@0.15.1 - - @0xsequence/guard@0.15.1 - - @0xsequence/multicall@0.15.1 - - @0xsequence/network@0.15.1 - - @0xsequence/provider@0.15.1 - - @0xsequence/relayer@0.15.1 - - @0xsequence/transactions@0.15.1 - - @0xsequence/utils@0.15.1 - - @0xsequence/wallet@0.15.1 - -## 0.15.0 - -### Minor Changes - -- - update chaind and api bindings - - replace EstimateMetaTxnGasReceipt with UpdateMetaTxnGasLimits and GetMetaTxnNetworkFeeOptions - -### Patch Changes - -- Updated dependencies [undefined] - - @0xsequence/relayer@0.15.0 - - @0xsequence/api@0.15.0 - - @0xsequence/chaind@0.15.0 - - @0xsequence/wallet@0.15.0 - - @0xsequence/auth@0.15.0 - - @0xsequence/transactions@0.15.0 - - @0xsequence/provider@0.15.0 - -## 0.14.2 - -### Patch Changes - -- Fix 0xSequence relayer dependencies -- Updated dependencies [undefined] - - @0xsequence/abi@0.14.3 - - @0xsequence/api@0.14.3 - - @0xsequence/auth@0.14.3 - - @0xsequence/chaind@0.14.3 - - @0xsequence/config@0.14.3 - - @0xsequence/guard@0.14.3 - - @0xsequence/multicall@0.14.3 - - @0xsequence/network@0.14.3 - - @0xsequence/provider@0.14.3 - - @0xsequence/relayer@0.14.3 - - @0xsequence/transactions@0.14.3 - - @0xsequence/utils@0.14.3 - - @0xsequence/wallet@0.14.3 - -## 0.14.1 - -### Patch Changes - -- Add debug logs to rpc-relayer -- Updated dependencies [undefined] - - @0xsequence/abi@0.14.2 - - @0xsequence/api@0.14.2 - - @0xsequence/auth@0.14.2 - - @0xsequence/chaind@0.14.2 - - @0xsequence/config@0.14.2 - - @0xsequence/guard@0.14.2 - - @0xsequence/multicall@0.14.2 - - @0xsequence/network@0.14.2 - - @0xsequence/provider@0.14.2 - - @0xsequence/relayer@0.14.2 - - @0xsequence/transactions@0.14.2 - - @0xsequence/utils@0.14.2 - - @0xsequence/wallet@0.14.2 - -## 0.14.0 - -### Minor Changes - -- update sequence utils finder which includes optimization - -### Patch Changes - -- Updated dependencies [undefined] - - @0xsequence/abi@0.14.0 - - @0xsequence/api@0.14.0 - - @0xsequence/auth@0.14.0 - - @0xsequence/chaind@0.14.0 - - @0xsequence/config@0.14.0 - - @0xsequence/guard@0.14.0 - - @0xsequence/multicall@0.14.0 - - @0xsequence/network@0.14.0 - - @0xsequence/provider@0.14.0 - - @0xsequence/relayer@0.14.0 - - @0xsequence/transactions@0.14.0 - - @0xsequence/utils@0.14.0 - - @0xsequence/wallet@0.14.0 - -## 0.13.0 - -### Minor Changes - -- Update SequenceUtils deployed contract - -### Patch Changes - -- Updated dependencies [undefined] - - @0xsequence/abi@0.13.0 - - @0xsequence/api@0.13.0 - - @0xsequence/auth@0.13.0 - - @0xsequence/chaind@0.13.0 - - @0xsequence/config@0.13.0 - - @0xsequence/guard@0.13.0 - - @0xsequence/multicall@0.13.0 - - @0xsequence/network@0.13.0 - - @0xsequence/provider@0.13.0 - - @0xsequence/relayer@0.13.0 - - @0xsequence/transactions@0.13.0 - - @0xsequence/utils@0.13.0 - - @0xsequence/wallet@0.13.0 - -## 0.12.4 - -### Patch Changes - -- Updated dependencies [undefined] - - @0xsequence/provider@0.12.4 - -## 0.12.3 - -### Patch Changes - -- Updated dependencies [undefined] - - @0xsequence/provider@0.12.3 - -## 0.12.2 - -### Patch Changes - -- Updated dependencies [undefined] - - @0xsequence/provider@0.12.2 - -## 0.12.1 - -### Patch Changes - -- npm bump -- Updated dependencies [undefined] - - @0xsequence/abi@0.12.1 - - @0xsequence/api@0.12.1 - - @0xsequence/auth@0.12.1 - - @0xsequence/chaind@0.12.1 - - @0xsequence/config@0.12.1 - - @0xsequence/guard@0.12.1 - - @0xsequence/multicall@0.12.1 - - @0xsequence/network@0.12.1 - - @0xsequence/provider@0.12.1 - - @0xsequence/relayer@0.12.1 - - @0xsequence/transactions@0.12.1 - - @0xsequence/utils@0.12.1 - - @0xsequence/wallet@0.12.1 - -## 0.12.0 - -### Minor Changes - -- provider: improvements to window transport - -### Patch Changes - -- Updated dependencies [undefined] - - @0xsequence/abi@0.12.0 - - @0xsequence/api@0.12.0 - - @0xsequence/auth@0.12.0 - - @0xsequence/chaind@0.12.0 - - @0xsequence/config@0.12.0 - - @0xsequence/guard@0.12.0 - - @0xsequence/multicall@0.12.0 - - @0xsequence/network@0.12.0 - - @0xsequence/provider@0.12.0 - - @0xsequence/relayer@0.12.0 - - @0xsequence/transactions@0.12.0 - - @0xsequence/utils@0.12.0 - - @0xsequence/wallet@0.12.0 - -## 0.11.4 - -### Patch Changes - -- update api client -- Updated dependencies [undefined] - - @0xsequence/api@0.11.4 - - @0xsequence/abi@0.11.4 - - @0xsequence/auth@0.11.4 - - @0xsequence/chaind@0.11.4 - - @0xsequence/config@0.11.4 - - @0xsequence/guard@0.11.4 - - @0xsequence/multicall@0.11.4 - - @0xsequence/network@0.11.4 - - @0xsequence/provider@0.11.4 - - @0xsequence/relayer@0.11.4 - - @0xsequence/transactions@0.11.4 - - @0xsequence/utils@0.11.4 - - @0xsequence/wallet@0.11.4 - -## 0.11.3 - -### Patch Changes - -- improve openWindow state options handling -- Updated dependencies [undefined] - - @0xsequence/abi@0.11.3 - - @0xsequence/api@0.11.3 - - @0xsequence/auth@0.11.3 - - @0xsequence/chaind@0.11.3 - - @0xsequence/config@0.11.3 - - @0xsequence/guard@0.11.3 - - @0xsequence/multicall@0.11.3 - - @0xsequence/network@0.11.3 - - @0xsequence/provider@0.11.3 - - @0xsequence/relayer@0.11.3 - - @0xsequence/transactions@0.11.3 - - @0xsequence/utils@0.11.3 - - @0xsequence/wallet@0.11.3 - -## 0.11.2 - -### Patch Changes - -- Fix multicall proxy scopes -- Updated dependencies [undefined] - - @0xsequence/abi@0.11.2 - - @0xsequence/api@0.11.2 - - @0xsequence/auth@0.11.2 - - @0xsequence/chaind@0.11.2 - - @0xsequence/config@0.11.2 - - @0xsequence/guard@0.11.2 - - @0xsequence/multicall@0.11.2 - - @0xsequence/network@0.11.2 - - @0xsequence/provider@0.11.2 - - @0xsequence/relayer@0.11.2 - - @0xsequence/transactions@0.11.2 - - @0xsequence/utils@0.11.2 - - @0xsequence/wallet@0.11.2 - -## 0.11.1 - -### Patch Changes - -- Add support for dynamic and nested signatures -- Updated dependencies [undefined] - - @0xsequence/abi@0.11.1 - - @0xsequence/api@0.11.1 - - @0xsequence/auth@0.11.1 - - @0xsequence/chaind@0.11.1 - - @0xsequence/config@0.11.1 - - @0xsequence/guard@0.11.1 - - @0xsequence/multicall@0.11.1 - - @0xsequence/network@0.11.1 - - @0xsequence/provider@0.11.1 - - @0xsequence/relayer@0.11.1 - - @0xsequence/transactions@0.11.1 - - @0xsequence/utils@0.11.1 - - @0xsequence/wallet@0.11.1 - -## 0.11.0 - -### Minor Changes - -- Update wallet context to 1.7 contracts - -### Patch Changes - -- Updated dependencies [undefined] - - @0xsequence/abi@0.11.0 - - @0xsequence/api@0.11.0 - - @0xsequence/auth@0.11.0 - - @0xsequence/chaind@0.11.0 - - @0xsequence/config@0.11.0 - - @0xsequence/guard@0.11.0 - - @0xsequence/multicall@0.11.0 - - @0xsequence/network@0.11.0 - - @0xsequence/provider@0.11.0 - - @0xsequence/relayer@0.11.0 - - @0xsequence/transactions@0.11.0 - - @0xsequence/utils@0.11.0 - - @0xsequence/wallet@0.11.0 - -## 0.10.9 - -### Patch Changes - -- add support for public addresses as signers in session.open -- Updated dependencies [undefined] - - @0xsequence/abi@0.10.9 - - @0xsequence/api@0.10.9 - - @0xsequence/auth@0.10.9 - - @0xsequence/chaind@0.10.9 - - @0xsequence/config@0.10.9 - - @0xsequence/guard@0.10.9 - - @0xsequence/multicall@0.10.9 - - @0xsequence/network@0.10.9 - - @0xsequence/provider@0.10.9 - - @0xsequence/relayer@0.10.9 - - @0xsequence/transactions@0.10.9 - - @0xsequence/utils@0.10.9 - - @0xsequence/wallet@0.10.9 - -## 0.10.8 - -### Patch Changes - -- Multicall production configuration -- Updated dependencies [undefined] - - @0xsequence/abi@0.10.8 - - @0xsequence/api@0.10.8 - - @0xsequence/auth@0.10.8 - - @0xsequence/chaind@0.10.8 - - @0xsequence/config@0.10.8 - - @0xsequence/guard@0.10.8 - - @0xsequence/multicall@0.10.8 - - @0xsequence/network@0.10.8 - - @0xsequence/provider@0.10.8 - - @0xsequence/relayer@0.10.8 - - @0xsequence/transactions@0.10.8 - - @0xsequence/utils@0.10.8 - - @0xsequence/wallet@0.10.8 - -## 0.10.7 - -### Patch Changes - -- allow provider transport to force disconnect -- Updated dependencies [undefined] - - @0xsequence/abi@0.10.7 - - @0xsequence/api@0.10.7 - - @0xsequence/auth@0.10.7 - - @0xsequence/chaind@0.10.7 - - @0xsequence/config@0.10.7 - - @0xsequence/guard@0.10.7 - - @0xsequence/multicall@0.10.7 - - @0xsequence/network@0.10.7 - - @0xsequence/provider@0.10.7 - - @0xsequence/relayer@0.10.7 - - @0xsequence/transactions@0.10.7 - - @0xsequence/utils@0.10.7 - - @0xsequence/wallet@0.10.7 - -## 0.10.6 - -### Patch Changes - -- - fix getWalletState method -- Updated dependencies [undefined] - - @0xsequence/abi@0.10.6 - - @0xsequence/api@0.10.6 - - @0xsequence/auth@0.10.6 - - @0xsequence/chaind@0.10.6 - - @0xsequence/config@0.10.6 - - @0xsequence/guard@0.10.6 - - @0xsequence/multicall@0.10.6 - - @0xsequence/network@0.10.6 - - @0xsequence/provider@0.10.6 - - @0xsequence/relayer@0.10.6 - - @0xsequence/transactions@0.10.6 - - @0xsequence/utils@0.10.6 - - @0xsequence/wallet@0.10.6 - -## 0.10.5 - -### Patch Changes - -- update relayer gas refund options -- Updated dependencies [undefined] - - @0xsequence/abi@0.10.5 - - @0xsequence/api@0.10.5 - - @0xsequence/auth@0.10.5 - - @0xsequence/chaind@0.10.5 - - @0xsequence/config@0.10.5 - - @0xsequence/guard@0.10.5 - - @0xsequence/multicall@0.10.5 - - @0xsequence/network@0.10.5 - - @0xsequence/provider@0.10.5 - - @0xsequence/relayer@0.10.5 - - @0xsequence/transactions@0.10.5 - - @0xsequence/utils@0.10.5 - - @0xsequence/wallet@0.10.5 - -## 0.10.4 - -### Patch Changes - -- Update api proto -- Updated dependencies [undefined] - - @0xsequence/abi@0.10.4 - - @0xsequence/api@0.10.4 - - @0xsequence/auth@0.10.4 - - @0xsequence/chaind@0.10.4 - - @0xsequence/config@0.10.4 - - @0xsequence/guard@0.10.4 - - @0xsequence/multicall@0.10.4 - - @0xsequence/network@0.10.4 - - @0xsequence/provider@0.10.4 - - @0xsequence/relayer@0.10.4 - - @0xsequence/transactions@0.10.4 - - @0xsequence/utils@0.10.4 - - @0xsequence/wallet@0.10.4 - -## 0.10.3 - -### Patch Changes - -- Fix loading config cross-chain -- Updated dependencies [undefined] - - @0xsequence/abi@0.10.3 - - @0xsequence/api@0.10.3 - - @0xsequence/auth@0.10.3 - - @0xsequence/chaind@0.10.3 - - @0xsequence/config@0.10.3 - - @0xsequence/guard@0.10.3 - - @0xsequence/multicall@0.10.3 - - @0xsequence/network@0.10.3 - - @0xsequence/provider@0.10.3 - - @0xsequence/relayer@0.10.3 - - @0xsequence/transactions@0.10.3 - - @0xsequence/utils@0.10.3 - - @0xsequence/wallet@0.10.3 - -## 0.10.2 - -### Patch Changes - -- - message digest fix -- Updated dependencies [undefined] - - @0xsequence/abi@0.10.2 - - @0xsequence/api@0.10.2 - - @0xsequence/auth@0.10.2 - - @0xsequence/chaind@0.10.2 - - @0xsequence/config@0.10.2 - - @0xsequence/guard@0.10.2 - - @0xsequence/multicall@0.10.2 - - @0xsequence/network@0.10.2 - - @0xsequence/provider@0.10.2 - - @0xsequence/relayer@0.10.2 - - @0xsequence/transactions@0.10.2 - - @0xsequence/utils@0.10.2 - - @0xsequence/wallet@0.10.2 - -## 0.10.1 - -### Patch Changes - -- upgrade deps -- Updated dependencies [undefined] - - @0xsequence/abi@0.10.1 - - @0xsequence/api@0.10.1 - - @0xsequence/auth@0.10.1 - - @0xsequence/chaind@0.10.1 - - @0xsequence/config@0.10.1 - - @0xsequence/guard@0.10.1 - - @0xsequence/multicall@0.10.1 - - @0xsequence/network@0.10.1 - - @0xsequence/provider@0.10.1 - - @0xsequence/relayer@0.10.1 - - @0xsequence/transactions@0.10.1 - - @0xsequence/utils@0.10.1 - - @0xsequence/wallet@0.10.1 - -## 0.10.0 - -### Minor Changes - -- Deployed new contracts with ERC1271 signer support - -### Patch Changes - -- Updated dependencies [undefined] - - @0xsequence/abi@0.10.0 - - @0xsequence/api@0.10.0 - - @0xsequence/auth@0.10.0 - - @0xsequence/chaind@0.10.0 - - @0xsequence/config@0.10.0 - - @0xsequence/guard@0.10.0 - - @0xsequence/multicall@0.10.0 - - @0xsequence/network@0.10.0 - - @0xsequence/provider@0.10.0 - - @0xsequence/relayer@0.10.0 - - @0xsequence/transactions@0.10.0 - - @0xsequence/utils@0.10.0 - - @0xsequence/wallet@0.10.0 - -## 0.9.6 - -### Patch Changes - -- Update ABIs for latest sequence contracts -- Updated dependencies [undefined] - - @0xsequence/api@0.9.6 - - @0xsequence/auth@0.9.6 - - @0xsequence/config@0.9.6 - - @0xsequence/multicall@0.9.6 - - @0xsequence/network@0.9.6 - - @0xsequence/provider@0.9.6 - - @0xsequence/relayer@0.9.6 - - @0xsequence/transactions@0.9.6 - - @0xsequence/utils@0.9.6 - - @0xsequence/wallet@0.9.6 - - @0xsequence/abi@0.9.6 - - @0xsequence/chaind@0.9.6 - - @0xsequence/guard@0.9.6 - -## 0.9.5 - -### Patch Changes - -- Implemented session class -- Updated dependencies [undefined] - - @0xsequence/api@0.9.5 - - @0xsequence/auth@0.9.5 - - @0xsequence/config@0.9.5 - - @0xsequence/multicall@0.9.5 - - @0xsequence/network@0.9.5 - - @0xsequence/provider@0.9.5 - - @0xsequence/relayer@0.9.5 - - @0xsequence/transactions@0.9.5 - - @0xsequence/utils@0.9.5 - - @0xsequence/wallet@0.9.5 - -## 0.9.4 - -### Patch Changes - -- - session improvements -- Updated dependencies [undefined] - - @0xsequence/provider@0.9.4 - -## 0.9.3 - -### Patch Changes - -- - minor improvements -- Updated dependencies [undefined] - - @0xsequence/abi@0.9.3 - - @0xsequence/api@0.9.3 - - @0xsequence/auth@0.9.3 - - @0xsequence/chaind@0.9.3 - - @0xsequence/config@0.9.3 - - @0xsequence/guard@0.9.3 - - @0xsequence/multicall@0.9.3 - - @0xsequence/network@0.9.3 - - @0xsequence/provider@0.9.3 - - @0xsequence/relayer@0.9.3 - - @0xsequence/transactions@0.9.3 - - @0xsequence/utils@0.9.3 - - @0xsequence/wallet@0.9.3 - -## 0.9.2 - -### Patch Changes - -- - Update api client -- Updated dependencies [undefined] - - @0xsequence/api@0.9.2 - -## 0.9.1 - -### Patch Changes - -- - patch bump -- Updated dependencies [undefined] - - @0xsequence/abi@0.9.1 - - @0xsequence/api@0.9.1 - - @0xsequence/auth@0.9.1 - - @0xsequence/chaind@0.9.1 - - @0xsequence/config@0.9.1 - - @0xsequence/guard@0.9.1 - - @0xsequence/multicall@0.9.1 - - @0xsequence/network@0.9.1 - - @0xsequence/provider@0.9.1 - - @0xsequence/relayer@0.9.1 - - @0xsequence/transactions@0.9.1 - - @0xsequence/utils@0.9.1 - - @0xsequence/wallet@0.9.1 - -## 0.9.0 - -### Minor Changes - -- - provider transport hardening - -### Patch Changes - -- Updated dependencies [undefined] - - @0xsequence/api@0.9.0 - - @0xsequence/abi@0.9.0 - - @0xsequence/auth@0.9.0 - - @0xsequence/chaind@0.9.0 - - @0xsequence/config@0.9.0 - - @0xsequence/guard@0.9.0 - - @0xsequence/multicall@0.9.0 - - @0xsequence/network@0.9.0 - - @0xsequence/provider@0.9.0 - - @0xsequence/relayer@0.9.0 - - @0xsequence/transactions@0.9.0 - - @0xsequence/utils@0.9.0 - - @0xsequence/wallet@0.9.0 - -## 0.8.5 - -### Patch Changes - -- - use latest wallet-contracts -- Updated dependencies [undefined] - - @0xsequence/abi@0.8.5 - - @0xsequence/api@0.8.5 - - @0xsequence/auth@0.8.5 - - @0xsequence/chaind@0.8.5 - - @0xsequence/config@0.8.5 - - @0xsequence/guard@0.8.5 - - @0xsequence/multicall@0.8.5 - - @0xsequence/network@0.8.5 - - @0xsequence/provider@0.8.5 - - @0xsequence/relayer@0.8.5 - - @0xsequence/transactions@0.8.5 - - @0xsequence/utils@0.8.5 - - @0xsequence/wallet@0.8.5 - -## 0.8.4 - -### Patch Changes - -- - minor improvements, name updates and comments -- Updated dependencies [undefined] - - @0xsequence/abi@0.8.4 - - @0xsequence/api@0.8.4 - - @0xsequence/auth@0.8.4 - - @0xsequence/chaind@0.8.4 - - @0xsequence/config@0.8.4 - - @0xsequence/guard@0.8.4 - - @0xsequence/multicall@0.8.4 - - @0xsequence/network@0.8.4 - - @0xsequence/provider@0.8.4 - - @0xsequence/relayer@0.8.4 - - @0xsequence/transactions@0.8.4 - - @0xsequence/utils@0.8.4 - - @0xsequence/wallet@0.8.4 - -## 0.8.3 - -### Patch Changes - -- - refinements - - - normalize signer address in config - - - provider: getWalletState() method to WalletProvider - -- Updated dependencies [undefined] - - @0xsequence/abi@0.8.3 - - @0xsequence/api@0.8.3 - - @0xsequence/auth@0.8.3 - - @0xsequence/chaind@0.8.3 - - @0xsequence/config@0.8.3 - - @0xsequence/guard@0.8.3 - - @0xsequence/multicall@0.8.3 - - @0xsequence/network@0.8.3 - - @0xsequence/provider@0.8.3 - - @0xsequence/relayer@0.8.3 - - @0xsequence/transactions@0.8.3 - - @0xsequence/utils@0.8.3 - - @0xsequence/wallet@0.8.3 - -## 0.8.2 - -### Patch Changes - -- - field rename and ethauth dependency bump -- Updated dependencies [undefined] - - @0xsequence/abi@0.8.2 - - @0xsequence/api@0.8.2 - - @0xsequence/auth@0.8.2 - - @0xsequence/chaind@0.8.2 - - @0xsequence/config@0.8.2 - - @0xsequence/guard@0.8.2 - - @0xsequence/multicall@0.8.2 - - @0xsequence/network@0.8.2 - - @0xsequence/provider@0.8.2 - - @0xsequence/relayer@0.8.2 - - @0xsequence/transactions@0.8.2 - - @0xsequence/utils@0.8.2 - - @0xsequence/wallet@0.8.2 - -## 0.8.1 - -### Patch Changes - -- - variety of optimizations -- Updated dependencies [undefined] - - @0xsequence/abi@0.8.1 - - @0xsequence/api@0.8.1 - - @0xsequence/auth@0.8.1 - - @0xsequence/chaind@0.8.1 - - @0xsequence/config@0.8.1 - - @0xsequence/guard@0.8.1 - - @0xsequence/multicall@0.8.1 - - @0xsequence/network@0.8.1 - - @0xsequence/provider@0.8.1 - - @0xsequence/relayer@0.8.1 - - @0xsequence/transactions@0.8.1 - - @0xsequence/utils@0.8.1 - - @0xsequence/wallet@0.8.1 - -## 0.8.0 - -### Minor Changes - -- - changeset fix - -### Patch Changes - -- Updated dependencies [undefined] - - @0xsequence/abi@0.8.0 - - @0xsequence/api@0.8.0 - - @0xsequence/auth@0.8.0 - - @0xsequence/chaind@0.8.0 - - @0xsequence/config@0.8.0 - - @0xsequence/guard@0.8.0 - - @0xsequence/multicall@0.8.0 - - @0xsequence/network@0.8.0 - - @0xsequence/provider@0.8.0 - - @0xsequence/relayer@0.8.0 - - @0xsequence/transactions@0.8.0 - - @0xsequence/utils@0.8.0 - - @0xsequence/wallet@0.8.0 - -## 0.7.4 - -### Patch Changes - -- bump - -## 0.7.3 - -### Patch Changes - -- Bump - -## 0.7.2 - -### Patch Changes - -- 02377ab: Minor improvements -- 1fe4379: \* explicitly export types in 0xsequence meta-package - - introduce new `networksIndex` method in network package -- Updated dependencies [02377ab] -- Updated dependencies [1fe4379] - - @0xsequence/network@0.7.1 - - @0xsequence/provider@0.7.1 - - @0xsequence/relayer@0.7.1 - - @0xsequence/utils@0.7.1 - - @0xsequence/wallet@0.7.1 - -## 0.7.1 - -### Patch Changes - -- - For developer convenience, update 0xsequence package to make possible: `import { sequence } from '0xsequence'` - -## 0.7.0 - -### Patch Changes - -- 6f11ed7: sequence.js, init release -- Updated dependencies [6f11ed7] - - @0xsequence/abi@0.7.0 - - @0xsequence/api@0.7.0 - - @0xsequence/auth@0.7.0 - - @0xsequence/chaind@0.7.0 - - @0xsequence/config@0.7.0 - - @0xsequence/guard@0.7.0 - - @0xsequence/multicall@0.7.0 - - @0xsequence/network@0.7.0 - - @0xsequence/provider@0.7.0 - - @0xsequence/relayer@0.7.0 - - @0xsequence/transactions@0.7.0 - - @0xsequence/utils@0.7.0 - - @0xsequence/wallet@0.7.0 diff --git a/old/packages/0xsequence/README.md b/old/packages/0xsequence/README.md deleted file mode 100644 index 1b4b9e670..000000000 --- a/old/packages/0xsequence/README.md +++ /dev/null @@ -1,67 +0,0 @@ -0xsequence -========== - -## Install - -`npm install 0xsequence ethers` - -or - -`pnpm install 0xsequence ethers` - -or - -`yarn add 0xsequence ethers` - - -## Development Workflow - -Sequence is a critical piece of software and any change should be delivered via a TDD (test-driven development) -workflow. - -As well, sequence.js's monorepo tooling is setup with preconstruct, which links all sub-packages together -so it feels like a single program and is easy to work with. Please run `pnpm dev` in the root of `sequence.js/` -folder to ensure the monorepo is in 'dev-mode'. - -Second, you can run the test suite directly from console with a single `pnpm test`, or you can boot up the Typescript -compiling server (`pnpm test:server`) and ethereum test node (`pnpm start:hardhat` and `pnpm start:hardhat2`) manually -in separate terminals, and then run a specific test directly from your browser instance. We recommend running the -test stack separately and running specific browser tests manually during development. See [here for recommended setup](./#from-browser). - - -## Running E2E Tests - -This 0xsequence top-level package contains e2e tests which run in a headless chrome browser. - -You can view tests running directly from the browser directly, or from the cli which will communicate -to the headless browser behind the scenes. See below. Please note, for an improved development workflow -we highly recommend to view your tests running from the browser as its more clear and better experience. - - -### From Browser - -1. `pnpm test:server` -- in one terminal, to start the webpack server compiling typescript -2. `pnpm start:hardhat` -- in a second terminal, to start hardhat local ethereum test node -3. `pnpm start:hardhat2` -- (2nd chain) in a third terminal, to start hardhat2 local ethereum test node -4. open browser to `http://localhost:9999/{browser-test-dir}/{test-filename}.test.html` for example, - http://localhost:9999/wallet-provider/dapp.test.html -5. open your browser console so you can see the tests running and their results. - -Finally, if you'd like to run only a specific test case, either add a temporary "return" statement -following the last test case, so you will preempt the runner after a certain test case. - -As well, since you have all the services running in terminals, you can also execute commands via -the cli by calling `test:run`, which is similar to step 4 above, but executing all tests from the terminal. -There is also the `test:only` command if you'd like to execute a specific test from ./tests/browser/*.spec.ts -file, ie. `pnpm test:only window-transport`. - - -### From CLI - -With a single command, you can spin up the testing stack and execute tests: - -`pnpm test` - -This is useful for a sanity check to ensure tests pass, or using it with the CI. However, if you're -developing on sequence.js, its highly recommended you follow the [development workflow instructions](./#development-workflow). - diff --git a/old/packages/0xsequence/hardhat.config.js b/old/packages/0xsequence/hardhat.config.js deleted file mode 100644 index 88c1e3f0a..000000000 --- a/old/packages/0xsequence/hardhat.config.js +++ /dev/null @@ -1,21 +0,0 @@ -/** - * @type import('hardhat/config').HardhatUserConfig - */ -module.exports = { - solidity: '0.7.6', - - networks: { - hardhat: { - // gas: 10000000000000, - // blockGasLimit: 10000000000000, - // gasPrice: 2, - initialBaseFeePerGas: 1, - chainId: 31337, - accounts: { - mnemonic: 'ripple axis someone ridge uniform wrist prosper there frog rate olympic knee' - }, - // loggingEnabled: true - // verbose: true - }, - } -} diff --git a/old/packages/0xsequence/hardhat2.config.js b/old/packages/0xsequence/hardhat2.config.js deleted file mode 100644 index 4ec2897be..000000000 --- a/old/packages/0xsequence/hardhat2.config.js +++ /dev/null @@ -1,21 +0,0 @@ -/** - * @type import('hardhat/config').HardhatUserConfig - */ -module.exports = { - solidity: '0.7.6', - - networks: { - hardhat: { - // gas: 10000000000000, - // blockGasLimit: 10000000000000, - // gasPrice: 2, - initialBaseFeePerGas: 1, - chainId: 31338, - accounts: { - mnemonic: 'ripple axis someone ridge uniform wrist prosper there frog rate olympic knee' - }, - // loggingEnabled: true - // verbose: true - }, - } -} diff --git a/old/packages/0xsequence/package.json b/old/packages/0xsequence/package.json deleted file mode 100644 index d1286c877..000000000 --- a/old/packages/0xsequence/package.json +++ /dev/null @@ -1,91 +0,0 @@ -{ - "name": "0xsequence", - "version": "2.3.8", - "description": "Sequence: a modular web3 stack and smart wallet for Ethereum chains", - "repository": "https://github.com/0xsequence/sequence.js", - "source": "src/index.ts", - "main": "dist/0xsequence.cjs.js", - "module": "dist/0xsequence.esm.js", - "umd:main": "dist/0xsequence.umd.min.js", - "license": "Apache-2.0", - "scripts": { - "test": "pnpm test:concurrently 'pnpm test:run'", - "test:run": "NODE_OPTIONS='--import tsx' ava --serial --fail-fast --timeout 5m", - "test:only": "pnpm test:run --match", - "test:watch": "pnpm test:run --watch", - "test:server": "webpack serve --config tests/webpack.config.js", - "test:server2": "PORT=8888 webpack serve --config tests/webpack.config.js", - "test:concurrently": "concurrently -k --success first 'pnpm test:server' 'pnpm start:hardhat' 'pnpm start:hardhat2'", - "start:hardhat": "hardhat node --hostname 0.0.0.0", - "start:hardhat:verbose": "hardhat --verbose node --hostname 0.0.0.0", - "start:hardhat2": "hardhat --config hardhat2.config.js node --hostname 0.0.0.0 --port 9545", - "start:hardhat2:verbose": "hardhat --config hardhat2.config.js --verbose node --hostname 0.0.0.0 --port 9545", - "start:ganache": "ganache --chain.chainId ${npm_package_config_ganacheChainID} --chain.networkId ${npm_package_config_ganacheChainID} --server.port ${npm_package_config_ganachePort} --miner.blockGasLimit ${npm_package_config_ganacheGasLimit} --miner.defaultGasPrice ${npm_package_config_ganacheGasPrice} --wallet.defaultBalance ${npm_package_config_etherBalance} --wallet.mnemonic \"${npm_package_config_mnemonic}\" ${npm_package_config_extra}", - "start:ganache:verbose": "pnpm start:ganache --verbose", - "start:ganache2": "ganache --chain.chainId 31338 --chain.networkId 31338 --server.port 9545 --miner.blockGasLimit ${npm_package_config_ganacheGasLimit} --miner.defaultGasPrice ${npm_package_config_ganacheGasPrice} --wallet.defaultBalance ${npm_package_config_etherBalance} --wallet.mnemonic \"${npm_package_config_mnemonic}\" ${npm_package_config_extra}", - "start:ganache2:verbose": "pnpm start:ganache2 --verbose", - "stop:ganache": "ps aux | grep ganache | grep -v grep | awk '{print $2}' | xargs kill -9", - "typecheck": "tsc --noEmit" - }, - "peerDependencies": { - "ethers": ">=6" - }, - "dependencies": { - "@0xsequence/abi": "workspace:*", - "@0xsequence/account": "workspace:*", - "@0xsequence/api": "workspace:*", - "@0xsequence/auth": "workspace:*", - "@0xsequence/core": "workspace:*", - "@0xsequence/guard": "workspace:*", - "@0xsequence/indexer": "workspace:*", - "@0xsequence/metadata": "workspace:*", - "@0xsequence/migration": "workspace:*", - "@0xsequence/network": "workspace:*", - "@0xsequence/provider": "workspace:*", - "@0xsequence/relayer": "workspace:*", - "@0xsequence/sessions": "workspace:*", - "@0xsequence/signhub": "workspace:*", - "@0xsequence/utils": "workspace:*", - "@0xsequence/wallet": "workspace:*" - }, - "devDependencies": { - "@0xsequence/tests": "workspace:*", - "@0xsequence/wallet-contracts": "^3.0.1", - "@babel/plugin-transform-runtime": "^7.19.6", - "babel-loader": "^9.1.0", - "ethers": "6.13.4", - "ganache": "^7.5.0", - "hardhat": "^2.22.14", - "html-webpack-plugin": "^5.3.1", - "webpack": "^5.65.0", - "webpack-cli": "^4.6.0", - "webpack-dev-server": "^3.11.2" - }, - "keywords": [], - "preconstruct": { - "umdName": "sequence" - }, - "files": [ - "src", - "dist" - ], - "ava": { - "require": [], - "files": [ - "tests/**/*.spec.ts" - ], - "extensions": [ - "ts" - ], - "verbose": true - }, - "config": { - "mnemonic": "ripple axis someone ridge uniform wrist prosper there frog rate olympic knee", - "ganacheChainID": 31337, - "ganachePort": 8545, - "ganacheGasLimit": "0xfffffffffff", - "ganacheGasPrice": "0x200", - "etherBalance": "100000", - "extra": "" - } -} diff --git a/old/packages/0xsequence/src/abi.ts b/old/packages/0xsequence/src/abi.ts deleted file mode 100644 index 56f239636..000000000 --- a/old/packages/0xsequence/src/abi.ts +++ /dev/null @@ -1 +0,0 @@ -export * from '@0xsequence/abi' diff --git a/old/packages/0xsequence/src/account.ts b/old/packages/0xsequence/src/account.ts deleted file mode 100644 index 5378d5293..000000000 --- a/old/packages/0xsequence/src/account.ts +++ /dev/null @@ -1 +0,0 @@ -export * from '@0xsequence/account' diff --git a/old/packages/0xsequence/src/api.ts b/old/packages/0xsequence/src/api.ts deleted file mode 100644 index 157694d57..000000000 --- a/old/packages/0xsequence/src/api.ts +++ /dev/null @@ -1 +0,0 @@ -export * from '@0xsequence/api' diff --git a/old/packages/0xsequence/src/auth.ts b/old/packages/0xsequence/src/auth.ts deleted file mode 100644 index 5ea89b7ea..000000000 --- a/old/packages/0xsequence/src/auth.ts +++ /dev/null @@ -1 +0,0 @@ -export * from '@0xsequence/auth' diff --git a/old/packages/0xsequence/src/core.ts b/old/packages/0xsequence/src/core.ts deleted file mode 100644 index c9df6528a..000000000 --- a/old/packages/0xsequence/src/core.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { commons } from '@0xsequence/core' - -export * from '@0xsequence/core' - -export type Config = commons.config.Config -export type WalletContext = commons.context.WalletContext diff --git a/old/packages/0xsequence/src/guard.ts b/old/packages/0xsequence/src/guard.ts deleted file mode 100644 index d91cdc903..000000000 --- a/old/packages/0xsequence/src/guard.ts +++ /dev/null @@ -1 +0,0 @@ -export * from '@0xsequence/guard' diff --git a/old/packages/0xsequence/src/index.ts b/old/packages/0xsequence/src/index.ts deleted file mode 100644 index e8f182e4c..000000000 --- a/old/packages/0xsequence/src/index.ts +++ /dev/null @@ -1,3 +0,0 @@ -export * as sequence from './sequence' - -export { initWallet } from '@0xsequence/provider' diff --git a/old/packages/0xsequence/src/indexer.ts b/old/packages/0xsequence/src/indexer.ts deleted file mode 100644 index e59cb5bce..000000000 --- a/old/packages/0xsequence/src/indexer.ts +++ /dev/null @@ -1 +0,0 @@ -export * from '@0xsequence/indexer' diff --git a/old/packages/0xsequence/src/metadata.ts b/old/packages/0xsequence/src/metadata.ts deleted file mode 100644 index cb9f18198..000000000 --- a/old/packages/0xsequence/src/metadata.ts +++ /dev/null @@ -1 +0,0 @@ -export * from '@0xsequence/metadata' diff --git a/old/packages/0xsequence/src/migration.ts b/old/packages/0xsequence/src/migration.ts deleted file mode 100644 index 029dfd709..000000000 --- a/old/packages/0xsequence/src/migration.ts +++ /dev/null @@ -1 +0,0 @@ -export * from '@0xsequence/migration' diff --git a/old/packages/0xsequence/src/network.ts b/old/packages/0xsequence/src/network.ts deleted file mode 100644 index 1d9b96b92..000000000 --- a/old/packages/0xsequence/src/network.ts +++ /dev/null @@ -1,17 +0,0 @@ -export * from '@0xsequence/network' - -export type { - JsonRpcRequest, - JsonRpcResponse, - JsonRpcResponseCallback, - JsonRpcHandler, - JsonRpcSender, - EIP1193Provider, - EIP1193ProviderFunc, - JsonRpcSendFunc, - JsonRpcSendAsyncFunc, - JsonRpcMiddleware, - JsonRpcMiddlewareHandler, - NetworkConfig, - ChainIdLike -} from '@0xsequence/network' diff --git a/old/packages/0xsequence/src/provider.ts b/old/packages/0xsequence/src/provider.ts deleted file mode 100644 index 65262e5f4..000000000 --- a/old/packages/0xsequence/src/provider.ts +++ /dev/null @@ -1,29 +0,0 @@ -export * from '@0xsequence/provider' - -export type { - SequenceProvider, - ProviderConfig, - WalletSignInOptions, - ProviderTransport, - WalletTransport, - ProviderMessage, - ProviderMessageRequest, - ProviderMessageResponse, - ProviderMessageResponseCallback, - ProviderMessageRequestHandler, - ProviderMessageTransport, - WalletEventTypes, - ProviderEventTypes, - EventType, - WalletSession, - OpenState, - ConnectOptions, - ConnectDetails, - PromptConnectDetails, - OpenWalletIntent, - ETHAuthProof, - ProviderError, - MessageToSign, - ProviderRpcError, - ErrSignedInRequired -} from '@0xsequence/provider' diff --git a/old/packages/0xsequence/src/relayer.ts b/old/packages/0xsequence/src/relayer.ts deleted file mode 100644 index 92995de5f..000000000 --- a/old/packages/0xsequence/src/relayer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export * from '@0xsequence/relayer' - -export type { Relayer, RpcRelayerProto, RelayerTxReceipt } from '@0xsequence/relayer' diff --git a/old/packages/0xsequence/src/sequence.ts b/old/packages/0xsequence/src/sequence.ts deleted file mode 100644 index fac5905f2..000000000 --- a/old/packages/0xsequence/src/sequence.ts +++ /dev/null @@ -1,20 +0,0 @@ -export * as abi from './abi' -export * as api from './api' -export * as auth from './auth' -export * as guard from './guard' -export * as indexer from './indexer' -export * as metadata from './metadata' -export * as network from './network' -export * as provider from './provider' -export * as relayer from './relayer' -export * as transactions from './transactions' -export * as utils from './utils' -export * as core from './core' -export * as signhub from './signhub' -export * as sessions from './sessions' -export * as migration from './migration' -export * as account from './account' - -export { initWallet, getWallet, unregisterWallet, SequenceProvider, SequenceClient, SequenceSigner } from '@0xsequence/provider' - -export type { ProviderConfig, WalletSession } from '@0xsequence/provider' diff --git a/old/packages/0xsequence/src/sessions.ts b/old/packages/0xsequence/src/sessions.ts deleted file mode 100644 index 9a4eebe7c..000000000 --- a/old/packages/0xsequence/src/sessions.ts +++ /dev/null @@ -1 +0,0 @@ -export * from '@0xsequence/sessions' diff --git a/old/packages/0xsequence/src/signhub.ts b/old/packages/0xsequence/src/signhub.ts deleted file mode 100644 index 6c49ae506..000000000 --- a/old/packages/0xsequence/src/signhub.ts +++ /dev/null @@ -1 +0,0 @@ -export * from '@0xsequence/signhub' diff --git a/old/packages/0xsequence/src/transactions.ts b/old/packages/0xsequence/src/transactions.ts deleted file mode 100644 index f2b08c462..000000000 --- a/old/packages/0xsequence/src/transactions.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { commons } from '@0xsequence/core' - -export const transactions = commons.transaction - -export type Transaction = commons.transaction.Transaction -export type TransactionEncoded = commons.transaction.TransactionEncoded -export type TransactionResponse = commons.transaction.TransactionResponse -export type Transactionish = commons.transaction.Transactionish -export type SignedTransactionBundle = commons.transaction.SignedTransactionBundle -export type RelayReadyTransactionBundle = commons.transaction.RelayReadyTransactionBundle diff --git a/old/packages/0xsequence/src/utils.ts b/old/packages/0xsequence/src/utils.ts deleted file mode 100644 index 40b856986..000000000 --- a/old/packages/0xsequence/src/utils.ts +++ /dev/null @@ -1,5 +0,0 @@ -export * from '@0xsequence/utils' - -export { isValidSignature, isValidMessageSignature, isValidTypedDataSignature, isWalletUpToDate } from '@0xsequence/provider' - -export type { TypedData, TypedDataDomain, TypedDataField, LogLevel, LoggerConfig } from '@0xsequence/utils' diff --git a/old/packages/0xsequence/tests/browser/json-rpc-provider/rpc.test.ts b/old/packages/0xsequence/tests/browser/json-rpc-provider/rpc.test.ts deleted file mode 100644 index 4e4f2e574..000000000 --- a/old/packages/0xsequence/tests/browser/json-rpc-provider/rpc.test.ts +++ /dev/null @@ -1,37 +0,0 @@ -import { test, assert } from '../../utils/assert' - -import { configureLogger } from '@0xsequence/utils' -import { JsonRpcProvider } from '@0xsequence/network' - -configureLogger({ logLevel: 'DEBUG', silence: false }) - -export const tests = async () => { - const provider = new JsonRpcProvider('http://localhost:8545', { chainId: 31337 }, { cacheTimeout: -1 }) - - await test('sending a json-rpc request', async () => { - { - const network = await provider.getNetwork() - console.log('network?', network) - } - { - const chainId = await provider.send('eth_chainId', []) - assert.equal(BigInt(chainId), 31337n) - } - { - const chainId = await provider.send('eth_chainId', []) - assert.equal(BigInt(chainId), 31337n) - } - { - const chainId = await provider.send('eth_chainId', []) - assert.equal(BigInt(chainId), 31337n) - } - { - const chainId = await provider.send('eth_chainId', []) - assert.equal(BigInt(chainId), 31337n) - } - { - const netVersion = await provider.send('net_version', []) - assert.equal(netVersion, '31337') - } - }) -} diff --git a/old/packages/0xsequence/tests/browser/mock-wallet/mock-wallet.test.ts b/old/packages/0xsequence/tests/browser/mock-wallet/mock-wallet.test.ts deleted file mode 100644 index 38e761aeb..000000000 --- a/old/packages/0xsequence/tests/browser/mock-wallet/mock-wallet.test.ts +++ /dev/null @@ -1,120 +0,0 @@ -import { ethers } from 'ethers' -import { WalletRequestHandler, WindowMessageHandler } from '@0xsequence/provider' -import { Account } from '@0xsequence/account' -import { NetworkConfig } from '@0xsequence/network' -import { LocalRelayer } from '@0xsequence/relayer' -import { configureLogger } from '@0xsequence/utils' - -import { testAccounts, getEOAWallet } from '../testutils' -import { test, assert } from '../../utils/assert' -import * as utils from '@0xsequence/tests' -import { Orchestrator } from '@0xsequence/signhub' -import { trackers } from '@0xsequence/sessions' - -configureLogger({ logLevel: 'DEBUG', silence: false }) - -// -// Wallet, a test wallet -// - -const main = async () => { - // - // Providers - // - const provider = new ethers.JsonRpcProvider('http://localhost:8545', undefined, { cacheTimeout: -1 }) - const provider2 = new ethers.JsonRpcProvider('http://localhost:9545', undefined, { cacheTimeout: -1 }) - - // - // Deploy Sequence WalletContext (deterministic) - // - const deployedWalletContext = await utils.context.deploySequenceContexts(await provider.getSigner()) - await utils.context.deploySequenceContexts(await provider2.getSigner()) - - // Generate a new wallet every time, otherwise tests will fail - // due to EIP-6492 being used only sometimes (some tests deploy the wallet) - const owner = ethers.Wallet.createRandom() - - const relayer = new LocalRelayer(getEOAWallet(testAccounts[5].privateKey)) - const relayer2 = new LocalRelayer(getEOAWallet(testAccounts[5].privateKey, provider2)) - - // Network available list - const networks: NetworkConfig[] = [ - { - name: 'hardhat', - chainId: 31337, - rpcUrl: provider._getConnection().url, - provider: provider, - relayer: relayer, - isDefaultChain: true, - nativeToken: { - symbol: 'ETH', - name: 'Ether', - decimals: 18 - } - }, - { - name: 'hardhat2', - chainId: 31338, - rpcUrl: provider2._getConnection().url, - provider: provider2, - relayer: relayer2, - nativeToken: { - symbol: 'ETH', - name: 'Ether', - decimals: 18 - } - } - ] - - // Account for managing multi-network wallets - // TODO: make this a 3-key multisig with threshold of 2 - // const account = new Account( - // { - // initialConfig: wallet.config, - // networks, - // context: deployedWalletContext - // }, - // owner - // ) - const account = await Account.new({ - config: { - threshold: 2, - checkpoint: 0, - signers: [ - { - address: owner.address, - weight: 2 - } - ] - }, - networks, - contexts: deployedWalletContext, - orchestrator: new Orchestrator([owner]), - tracker: new trackers.local.LocalConfigTracker(provider) - }) - - // the json-rpc signer via the wallet - const walletRequestHandler = new WalletRequestHandler(undefined, null, networks) - - // fake/force an async wallet initialization for the wallet-request handler. This is the behaviour - // of the wallet-webapp, so lets ensure the mock wallet does the same thing too. - setTimeout(() => { - walletRequestHandler.signIn(account) - }, 1000) - - // setup and register window message transport - const windowHandler = new WindowMessageHandler(walletRequestHandler) - windowHandler.register() -} - -main() - -export const tests = async () => { - // TODO: add tests() method to verify some wallet functionality such a login - // and adding / removing keys, etc.. - // + mock in a RemoteSigner as well. - - await test('stub', async () => { - assert.true(true, 'ok') - }) -} diff --git a/old/packages/0xsequence/tests/browser/mux-transport/mux.test.ts b/old/packages/0xsequence/tests/browser/mux-transport/mux.test.ts deleted file mode 100644 index dcacdcced..000000000 --- a/old/packages/0xsequence/tests/browser/mux-transport/mux.test.ts +++ /dev/null @@ -1,177 +0,0 @@ -import { - WalletRequestHandler, - ProxyMessageChannel, - ProxyMessageHandler, - WindowMessageHandler, - SequenceClient, - MemoryItemStore -} from '@0xsequence/provider' -import { ethers } from 'ethers' -import { test, assert } from '../../utils/assert' -import { NetworkConfig } from '@0xsequence/network' -import { LocalRelayer } from '@0xsequence/relayer' -import { configureLogger } from '@0xsequence/utils' -import { testAccounts, getEOAWallet } from '../testutils' -import * as utils from '@0xsequence/tests' -import { Account } from '@0xsequence/account' -import { Orchestrator } from '@0xsequence/signhub' -import { trackers } from '@0xsequence/sessions' -import { commons } from '@0xsequence/core' - -configureLogger({ logLevel: 'DEBUG', silence: false }) - -// Tests simulates a multi-message provider environment by having a wallet available via the -// proxy channel and wallet window. -export const tests = async () => { - // - // Providers - // - const provider1 = new ethers.JsonRpcProvider('http://localhost:8545', undefined, { cacheTimeout: -1 }) - const provider2 = new ethers.JsonRpcProvider('http://localhost:9545', undefined, { cacheTimeout: -1 }) - - // - // Deploy Sequence WalletContext (deterministic). - // - const deployedWalletContext = await utils.context.deploySequenceContexts(await provider1.getSigner()) - await utils.context.deploySequenceContexts(await provider2.getSigner()) - console.log('walletContext:', deployedWalletContext) - - // - // Proxy Channel (normally would be out-of-band) - // - const ch = new ProxyMessageChannel() - - // - // Wallet Handler (local mock wallet, same a mock-wallet tests) - // - - // owner account address: 0x4e37E14f5d5AAC4DF1151C6E8DF78B7541680853 - const owner = getEOAWallet(testAccounts[0].privateKey) - - // relayers, account address: 0x3631d4d374c3710c3456d6b1de1ee8745fbff8ba - // const relayerAccount = getEOAWallet(testAccounts[5].privateKey) - const relayer1 = new LocalRelayer(getEOAWallet(testAccounts[5].privateKey)) - const relayer2 = new LocalRelayer(getEOAWallet(testAccounts[5].privateKey, provider2)) - - // Network available list - const networks: NetworkConfig[] = [ - // @ts-ignore - { - name: 'hardhat', - chainId: 31337, - rpcUrl: provider1._getConnection().url, - provider: provider1, - relayer: relayer1, - isDefaultChain: true - }, - // @ts-ignore - { - name: 'hardhat2', - chainId: 31338, - rpcUrl: provider2._getConnection().url, - provider: provider2, - relayer: relayer2 - } - ] - - // Account for managing multi-network wallets - const saccount = await Account.new({ - networks, - contexts: deployedWalletContext, - config: { - threshold: 1, - checkpoint: 0, - signers: [ - { - address: owner.address, - weight: 1 - } - ] - }, - orchestrator: new Orchestrator([owner]), - tracker: new trackers.local.LocalConfigTracker(provider1) - }) - - // the rpc signer via the wallet - const walletRequestHandler = new WalletRequestHandler(saccount, null, networks) - - // register wallet message handler, in this case using the ProxyMessage transport. - const proxyHandler = new ProxyMessageHandler(walletRequestHandler, ch.wallet) - proxyHandler.register() - - // register window message transport - const windowHandler = new WindowMessageHandler(walletRequestHandler) - windowHandler.register() - - // - // Dapp, wallet provider and dapp tests - // - - // wallet client with multiple message provider transports enabled - const client = new SequenceClient( - { - windowTransport: { enabled: true }, - proxyTransport: { enabled: true, appPort: ch.app } - }, - new MemoryItemStore(), - { - defaultChainId: 31337 - } - ) - - // provider + signer, by default if a chainId is not specified it will direct - // requests to the defaultChain - // const provider = wallet.getProvider() - // const signer = wallet.getSigner() - - // clear it in case we're testing in browser session - client.disconnect() - - await test('is disconnected / logged out', async () => { - assert.false(client.isConnected(), 'is logged out') - }) - - await test('is closed', async () => { - assert.false(client.isOpened(), 'is closed') - }) - - await test('connect', async () => { - const { connected } = await client.connect({ - app: 'test', - keepWalletOpened: true - }) - - assert.true(connected, 'is connected') - }) - - await test('isOpened', async () => { - assert.true(client.isOpened(), 'is opened') - }) - - await test('isConnected', async () => { - assert.true(client.isConnected(), 'is connected') - }) - - await test('open wallet while its already opened', async () => { - // its already opened, but lets do it again - const opened = await client.openWallet() - assert.true(opened, 'wallet is opened') - }) - - let walletContext: commons.context.VersionedContext - await test('getWalletContext', async () => { - walletContext = await client.getWalletContext() - assert.equal(walletContext[2].factory, deployedWalletContext[2].factory, 'wallet context factory') - assert.equal(walletContext[2].guestModule, deployedWalletContext[2].guestModule, 'wallet context guestModule') - }) - - await test('getChainId', async () => { - const chainId = client.getChainId() - assert.equal(chainId, 31337, 'chainId is correct') - }) - - await test('switch chains', async () => { - client.setDefaultChainId(31338) - assert.equal(client.getChainId(), 31338, 'chainId of other chain is 31338') - }) -} diff --git a/old/packages/0xsequence/tests/browser/proxy-transport/channel.test.ts b/old/packages/0xsequence/tests/browser/proxy-transport/channel.test.ts deleted file mode 100644 index 2a9e2dd66..000000000 --- a/old/packages/0xsequence/tests/browser/proxy-transport/channel.test.ts +++ /dev/null @@ -1,174 +0,0 @@ -import { - SequenceClient, - ProxyMessageProvider, - WalletRequestHandler, - ProxyMessageChannel, - ProxyMessageHandler, - prefixEIP191Message, - MemoryItemStore -} from '@0xsequence/provider' -import { ethers } from 'ethers' -import { test, assert } from '../../utils/assert' -import { LocalRelayer } from '@0xsequence/relayer' -import { configureLogger, encodeMessageDigest } from '@0xsequence/utils' -import { testAccounts, getEOAWallet } from '../testutils' -import { Account } from '@0xsequence/account' -import * as utils from '@0xsequence/tests' -import { Orchestrator } from '@0xsequence/signhub' -import { trackers } from '@0xsequence/sessions' -import { commons } from '@0xsequence/core' - -configureLogger({ logLevel: 'DEBUG', silence: false }) - -export const tests = async () => { - // ProxyMessageChannel object is to be instantiated by the app coordinating - // the channel, ie. such as the mobile application itself. - // - // `ch.app` (port) will be injected into the app, and `ch.wallet` (port) will be injected into the wallet. - // - // Sending messages to the app port will go through channel and get received by the wallet. - // Sending messages to the wallet port will go through channel and get received by the app. - const ch = new ProxyMessageChannel() - - ch.app.on('open', openInfo => { - console.log('app, wallet opened.', openInfo) - }) - ch.app.on('close', () => { - console.log('app, wallet closed.') - }) - ch.app.on('connect', () => { - console.log('app, wallet connected.') - }) - ch.app.on('disconnect', () => { - console.log('app, wallet disconnected.') - }) - // ch.wallet.on('open', () => { - // console.log('wallet, wallet opened.') - // }) - // ch.wallet.on('close', () => { - // console.log('wallet, wallet closed.') - // }) - // ch.wallet.on('connect', () => { - // console.log('wallet, wallet connected.') - // }) - // ch.wallet.on('disconnect', () => { - // console.log('wallet, wallet disconnected.') - // }) - - // - // Wallet Handler - // - - // owner account address: 0x4e37E14f5d5AAC4DF1151C6E8DF78B7541680853 - const owner = getEOAWallet(testAccounts[0].privateKey) - - // relayer account is same as owner here - const relayer = new LocalRelayer(owner) - const rpcProvider = new ethers.JsonRpcProvider('http://localhost:8545', undefined, { cacheTimeout: -1 }) - const contexts = await utils.context.deploySequenceContexts(await rpcProvider.getSigner()) - - const networks = [ - { - name: 'hardhat', - chainId: 31337, - rpcUrl: rpcProvider._getConnection().url, - provider: rpcProvider, - relayer: relayer, - isDefaultChain: true, - nativeToken: { - symbol: 'ETH', - name: 'Ether', - decimals: 18 - } - } - ] - - // wallet account address: 0x91A858FbBa42E7EE200b4303b1A8B2F0BD139663 based on the chainId - const account = await Account.new({ - config: { - threshold: 1, - checkpoint: 1674142220, - signers: [ - { - address: owner.address, - weight: 1 - } - ] - }, - networks, - contexts, - orchestrator: new Orchestrator([owner]), - tracker: new trackers.local.LocalConfigTracker(rpcProvider) - }) - - // the rpc signer via the wallet - const walletRequestHandler = new WalletRequestHandler(undefined, null, networks) - - // register wallet message handler, in this case using the ProxyMessage transport. - const proxyHandler = new ProxyMessageHandler(walletRequestHandler, ch.wallet) - proxyHandler.register() - - // - // App Provider - // - const walletProvider = new ProxyMessageProvider(ch.app) - walletProvider.register() - - // setup web3 provider - const client = new SequenceClient(walletProvider, new MemoryItemStore(), { defaultChainId: 31337 }) - const connectPromise = client.connect({ app: 'proxy-transport-channel test', keepWalletOpened: true }) - - // fake/force an async wallet initialization for the wallet-request handler. This is the behaviour - // of the wallet-webapp, so lets ensure the mock wallet does the same thing too. - walletRequestHandler.signIn(account, { connect: true }) - - await connectPromise - - const address = client.getAddress() - - await test('verifying getAddress result', async () => { - assert.equal(address, ethers.getAddress('0x91A858FbBa42E7EE200b4303b1A8B2F0BD139663'), 'wallet address') - }) - - await test('sending a json-rpc request', async () => { - const result = await walletProvider.request({ method: 'eth_accounts', params: [] }) - assert.equal(result[0], address, 'response address check') - }) - - await test('get chain id', async () => { - const chainIdClient = client.getChainId() - assert.equal(chainIdClient, 31337, 'chain id match') - - const netVersion = await client.request({ method: 'net_version' }) - assert.equal(netVersion, '31337', 'net_version check') - - const chainId = await client.request({ method: 'eth_chainId' }) - assert.equal(chainId, '0x7a69', 'eth_chainId check') - }) - - await test('sign a message and validate/recover', async () => { - const message = ethers.toUtf8Bytes('hihi') - - // - // Sign the message - // - const sig = await client.signMessage(message) - assert.equal( - sig, - '0x000163c9620c0001045ea593a25d0053816f2cfb0239eb04c30cc08fd26193927bf6cf68f7f31a8239ecbcbd1365f18a6bf2bf3b13d544c91d85e35503696a28fcb96a4078a7556a1c02', - 'signature match' - ) - - const reader = new commons.reader.OnChainReader(rpcProvider) - - // - // Verify the message signature - // - await account.doBootstrap(31337) - const messageDigest = encodeMessageDigest(prefixEIP191Message(message)) - const isValid = await reader.isValidSignature(address, messageDigest, sig) - assert.true(isValid, 'signature is valid - 1') - }) - - walletProvider.closeWallet() -} diff --git a/old/packages/0xsequence/tests/browser/testutils/accounts.ts b/old/packages/0xsequence/tests/browser/testutils/accounts.ts deleted file mode 100644 index 0b84bfe09..000000000 --- a/old/packages/0xsequence/tests/browser/testutils/accounts.ts +++ /dev/null @@ -1,44 +0,0 @@ -import { ethers } from 'ethers' - -// testAccounts with 10000 ETH each -export const testAccounts = [ - { - address: '0x4e37e14f5d5aac4df1151c6e8df78b7541680853', - privateKey: '0xcd0434442164a4a6ef9bb677da8dc326fddf412cad4df65e1a3f2555aee5e2b3' - }, - { - address: '0x8a6e090a13d2dc04f87a127699952ce2d4428cd9', - privateKey: '0x15d476cba8e6a981e77a00fa22a06ce7f418b80dbb3cb2860f67ea811da9b108' - }, - { - address: '0xf1fc4872058b066578008519970b7e789eea5040', - privateKey: '0x5b7ce9d034f2d2d8cc5667fcd5986db6e4c1e73b51bc84d61fa0b197068e381a' - }, - { - address: '0x4875692d103162f4e29ccdd5678806043d3f16c7', - privateKey: '0x02173b01073b895fa3f92335658b4b1bbb3686c06193069b5c5914157f6a360a' - }, - { - address: '0xf4b294d1fce145a73ce91b860b871e77573957e5', - privateKey: '0xbbbf16b45613564ad7bff353d4cb9e249f5a6d6ac2ef27a256ffafb9afaf8d58' - }, - { - address: '0x3631d4d374c3710c3456d6b1de1ee8745fbff8ba', - privateKey: '0x2c527b40d4db8eff67de1b6b583b5e15037d0e02f88143668e5626039199da48' - } -] - -export const getEOAWallet = (privateKey: string, provider?: string | ethers.Provider): ethers.Wallet => { - // defaults - if (!provider) { - provider = 'http://localhost:8545' - } - - const wallet = new ethers.Wallet(privateKey) - - if (typeof provider === 'string') { - return wallet.connect(new ethers.JsonRpcProvider(provider, undefined, { cacheTimeout: -1 })) - } else { - return wallet.connect(provider) - } -} diff --git a/old/packages/0xsequence/tests/browser/testutils/deploy-wallet-context.ts b/old/packages/0xsequence/tests/browser/testutils/deploy-wallet-context.ts deleted file mode 100644 index fc3805e16..000000000 --- a/old/packages/0xsequence/tests/browser/testutils/deploy-wallet-context.ts +++ /dev/null @@ -1,79 +0,0 @@ -// import { ethers } from 'ethers' -// import { UniversalDeployer } from '@0xsequence/deployer' -// import { WalletContext } from '@0xsequence/network' -// import { testAccounts, getEOAWallet } from './accounts' - -// // TODO/NOTE: it should be possible to import below from just '@0xsequence/wallet-contracts' -// // however, experiencing a strange JS packaging/module resolution issue which leads to: -// // -// // mock-wallet.test.js:70822 Uncaught (in promise) TypeError: Class constructor ContractFactory cannot be invoked without 'new' -// // -// // by importing from '@0xsequence/wallet-contracts/gen/typechain', this issue goes away - -// import { -// Factory__factory, -// MainModule__factory, -// MainModuleUpgradable__factory, -// GuestModule__factory, -// SequenceUtils__factory, -// RequireFreshSigner__factory, -// } from '@0xsequence/wallet-contracts' - -// const deployWalletContextCache: WalletContext[] = [] - -// // deployWalletContext will deploy the Sequence WalletContext via the UniversalDeployer -// // which will return deterministic contract addresses between calls. -// export const deployWalletContext = async (...providers: ethers.JsonRpcProvider[]): Promise => { -// if (!providers || providers.length === 0) { -// providers.push(new ethers.JsonRpcProvider('http://localhost:8545')) -// } - -// // Memoize the result. Even though its universal/deterministic, caching the result -// // offers greater efficiency between calls -// if (deployWalletContextCache.length === providers.length) { -// return deployWalletContextCache[0] -// } - -// await Promise.all(providers.map(async provider => { -// // Deploying test accounts with the first test account -// const wallet = getEOAWallet(testAccounts[0].privateKey, provider) - -// // Universal deployer for deterministic contract addresses -// const universalDeployer = new UniversalDeployer('local', wallet.provider as ethers.JsonRpcProvider) -// const txParams = { gasLimit: 8000000, gasPrice: 10n.pow(9).mul(10) } - -// const walletFactory = await universalDeployer.deploy('WalletFactory', Factory__factory as any, txParams) -// const mainModule = await universalDeployer.deploy('MainModule', MainModule__factory as any, txParams, 0, walletFactory.address) - -// await universalDeployer.deploy('MainModuleUpgradable', MainModuleUpgradable__factory as any, txParams) -// await universalDeployer.deploy('GuestModule', GuestModule__factory as any, txParams) - -// const sequenceUtils = await universalDeployer.deploy('SequenceUtils', SequenceUtils__factory as any, txParams, 0, walletFactory.address, mainModule.address) -// await universalDeployer.deploy('RequireFreshSignerLib', RequireFreshSigner__factory as any, txParams, 0, sequenceUtils.address) - -// const deployment = universalDeployer.getDeployment() - -// deployWalletContextCache.push({ -// factory: deployment['WalletFactory'].address, -// mainModule: deployment['MainModule'].address, -// mainModuleUpgradable: deployment['MainModuleUpgradable'].address, -// guestModule: deployment['GuestModule'].address, -// sequenceUtils: deployment['SequenceUtils'].address, -// libs: { -// requireFreshSigner: deployment['RequireFreshSignerLib'].address -// } -// }) -// })) - -// return deployWalletContextCache[0] -// } - -// // testWalletContext is determined by the `deployWalletContext` method above. We can use this -// // across instances, but, we must ensure the contracts are deployed by the mock-wallet at least. -// export const testWalletContext: WalletContext = { -// factory: "0xf9D09D634Fb818b05149329C1dcCFAeA53639d96", -// guestModule: "0x02390F3E6E5FD1C6786CB78FD3027C117a9955A7", -// mainModule: "0xd01F11855bCcb95f88D7A48492F66410d4637313", -// mainModuleUpgradable: "0x7EFE6cE415956c5f80C6530cC6cc81b4808F6118", -// sequenceUtils: "0xd130B43062D875a4B7aF3f8fc036Bc6e9D3E1B3E" -// } diff --git a/old/packages/0xsequence/tests/browser/testutils/index.ts b/old/packages/0xsequence/tests/browser/testutils/index.ts deleted file mode 100644 index 63f7cc82a..000000000 --- a/old/packages/0xsequence/tests/browser/testutils/index.ts +++ /dev/null @@ -1,3 +0,0 @@ -export * from './accounts' -// export * from './deploy-wallet-context' -export * from './wallet' diff --git a/old/packages/0xsequence/tests/browser/testutils/wallet.ts b/old/packages/0xsequence/tests/browser/testutils/wallet.ts deleted file mode 100644 index 8f74d0841..000000000 --- a/old/packages/0xsequence/tests/browser/testutils/wallet.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { ethers } from 'ethers' -import { toHexString } from '@0xsequence/utils' - -export const sendETH = (eoaWallet: ethers.Wallet, toAddress: string, amount: bigint): Promise => { - const tx = { - gasPrice: '0x55555', - gasLimit: '0x55555', - to: toAddress, - value: toHexString(amount), - data: '0x' - } - return eoaWallet.sendTransaction(tx) -} diff --git a/old/packages/0xsequence/tests/browser/wallet-provider/dapp.test.ts b/old/packages/0xsequence/tests/browser/wallet-provider/dapp.test.ts deleted file mode 100644 index d3ccb8713..000000000 --- a/old/packages/0xsequence/tests/browser/wallet-provider/dapp.test.ts +++ /dev/null @@ -1,527 +0,0 @@ -import { commons, v2 } from '@0xsequence/core' -import { SequenceClient, SequenceProvider, DefaultProviderConfig, MemoryItemStore } from '@0xsequence/provider' -import { context } from '@0xsequence/tests' -import { configureLogger, parseEther } from '@0xsequence/utils' -import { ethers } from 'ethers' -import { test, assert } from '../../utils/assert' -import { testAccounts, getEOAWallet, sendETH } from '../testutils' - -configureLogger({ logLevel: 'DEBUG', silence: false }) - -export const tests = async () => { - // - // Setup - // - const transportsConfig = { - ...DefaultProviderConfig.transports, - walletAppURL: 'http://localhost:9999/mock-wallet/mock-wallet.test.html' - } - - // - // Deploy Sequence WalletContext (deterministic). - // - const deployedWalletContext = await (async () => { - const provider = new ethers.JsonRpcProvider('http://localhost:8545', undefined, { cacheTimeout: -1 }) - const signer = await provider.getSigner() - return context.deploySequenceContexts(signer) - })() - - const hardhatProvider = new ethers.JsonRpcProvider('http://localhost:8545', undefined, { cacheTimeout: -1 }) - - const client = new SequenceClient(transportsConfig, new MemoryItemStore(), { defaultChainId: 31337 }) - const wallet = new SequenceProvider(client, chainId => { - if (chainId === 31337) { - return hardhatProvider - } - - if (chainId === 31338) { - return new ethers.JsonRpcProvider('http://localhost:9545', undefined, { cacheTimeout: -1 }) - } - - throw new Error(`No provider for chainId ${chainId}`) - }) - - // provider + signer, by default if a chainId is not specified it will direct - // requests to the defaultChain - const provider = wallet.getProvider() - const signer = wallet.getSigner() - - // clear it in case we're testing in browser session - await wallet.disconnect() - - await test('is disconnected / logged out', async () => { - assert.false(wallet.isConnected(), 'is connected') - }) - - await test('is closed', async () => { - assert.false(wallet.isOpened(), 'is closed') - }) - - await test('is disconnected', async () => { - assert.false(wallet.isConnected(), 'is disconnnected') - }) - - await test('connect', async () => { - const { connected } = await wallet.connect({ - app: 'test', - keepWalletOpened: true - }) - assert.true(connected, 'is connected') - }) - - await test('isOpened', async () => { - assert.true(wallet.isOpened(), 'is opened') - }) - - await test('isConnected', async () => { - assert.true(wallet.isConnected(), 'is connected') - }) - - let walletContext: commons.context.VersionedContext - await test('getWalletContext', async () => { - walletContext = await wallet.getWalletContext() - assert.equal(walletContext[1].factory, deployedWalletContext[1].factory, 'wallet context factory') - assert.equal(walletContext[1].guestModule, deployedWalletContext[1].guestModule, 'wallet context guestModule') - assert.equal(walletContext[2].factory, deployedWalletContext[2].factory, 'wallet context factory') - assert.equal(walletContext[2].guestModule, deployedWalletContext[2].guestModule, 'wallet context guestModule') - }) - - await test('getChainId', async () => { - const chainId = wallet.getChainId() - assert.equal(chainId, 31337, 'chainId is correct') - }) - - await test('networks', async () => { - const networks = await wallet.getNetworks() - - assert.equal(networks.length, 2, '2 networks') - assert.true(networks[0].isDefaultChain!, '1st network is DefaultChain') - assert.true(!networks[1].isDefaultChain, '1st network is not DefaultChain') - assert.equal(networks[1].chainId, 31338, 'authChainId is correct') - - const authProvider = wallet.getProvider(31338)! - assert.equal(authProvider.getChainId(), 31338, 'authProvider chainId is 31338') - - assert.equal(provider.getChainId(), 31337, 'provider chainId is 31337') - }) - - await test('getAddress', async () => { - const address = wallet.getAddress() - assert.true(ethers.isAddress(address), 'wallet address is valid') - }) - - await test('getWalletConfig', async () => { - const allWalletConfigs = await wallet.getWalletConfig() - - const config = allWalletConfigs as v2.config.WalletConfig - assert.equal(config.version, 2, 'wallet config version is correct') - assert.equal(BigInt(config.threshold), 2n, 'config, 2 threshold') - assert.equal(BigInt(config.checkpoint), 0n, 'config, 0 checkpoint') - assert.true(v2.config.isSignerLeaf(config.tree), 'config, isSignerLeaf') - assert.true(ethers.isAddress((config.tree as v2.config.SignerLeaf).address), 'config, signer address') - assert.equal(BigInt((config.tree as v2.config.SignerLeaf).weight), 2n, 'config, signer weight') - }) - - await test('multiple networks', async () => { - // chainId 31337 - { - assert.equal(provider.getChainId(), 31337, 'provider chainId is 31337') - - const network = await provider.getNetwork() - assert.equal(network.chainId, 31337n, 'chain id match') - - const netVersion = await provider.send('net_version', []) - assert.equal(netVersion, '31337', 'net_version check') - - const chainId = await provider.send('eth_chainId', []) - assert.equal(chainId, ethers.toQuantity(31337), 'eth_chainId check') - - const chainId2 = await signer.getChainId() - assert.equal(chainId2, 31337, 'chainId check') - } - - // chainId 31338 - { - const provider2 = wallet.getProvider(31338) - assert.equal(provider2.getChainId(), 31338, '2nd chain, chainId is 31338 - 2') - - const network = await provider2.getNetwork() - assert.equal(network.chainId, 31338n, '2nd chain, chain id match - 3') - - const netVersion = await provider2.send('net_version', []) - assert.equal(netVersion, '31338', '2nd chain, net_version check - 4') - - const chainId = await provider2.send('eth_chainId', []) - assert.equal(chainId, ethers.toQuantity(31338), '2nd chain, eth_chainId check - 5') - - const chainId2 = await provider2.getSigner().getChainId() - assert.equal(chainId2, 31338, '2nd chain, chainId check - 6') - } - }) - - await test('listAccounts', async () => { - const signers = provider.listAccounts() - assert.equal(signers.length, 1, 'signers, single owner') - assert.equal(signers[0], wallet.getAddress(), 'signers, check address') - }) - - await test('signMessage on defaultChain', async () => { - const address = wallet.getAddress() - const chainId = wallet.getChainId() - - const message = 'hihi' - const message2 = ethers.toUtf8Bytes(message) - - // Sign the message - const sigs = await Promise.all( - [message, message2].map(async m => { - assert.equal(await signer.getChainId(), 31337, 'signer chainId is 31337') - - // NOTE: below line is equivalent to `signer.signMessage(m)` call - // const sig = await wallet.utils.signMessage(m) - const sig = await signer.signMessage(m, { eip6492: true }) - - // Non-deployed wallet (with EIP6492) should return a signature - // that ends with the EIP-6492 magic bytes - const suffix = '6492649264926492649264926492649264926492649264926492649264926492' - assert.true(sig.endsWith(suffix), 'signature ends with EIP-6492 magic bytes') - - return sig - }) - ) - - assert.equal(sigs[0], sigs[1], 'signatures should match even if message type is different') - - const sig = sigs[0] - - // Verify the signature - const isValid = await wallet.utils.isValidMessageSignature(address, message, sig, chainId) - assert.true(isValid, 'signature is valid - 2') - }) - - await test('signTypedData on defaultChain', async () => { - const address = wallet.getAddress() - const chainId = wallet.getChainId() - - const domain: ethers.TypedDataDomain = { - name: 'Ether Mail', - version: '1', - chainId: chainId, - verifyingContract: '0xCcCCccccCCCCcCCCCCCcCcCccCcCCCcCcccccccC' - } - - const types: { [key: string]: ethers.TypedDataField[] } = { - Person: [ - { name: 'name', type: 'string' }, - { name: 'wallet', type: 'address' } - ] - } - - const message = { - name: 'Bob', - wallet: '0xbBbBBBBbbBBBbbbBbbBbbbbBBbBbbbbBbBbbBBbB' - } - - const sig = await signer.signTypedData(domain, types, message) - - // Verify typed data - const isValid = await wallet.utils.isValidTypedDataSignature(address, { domain, types, message }, sig, chainId) - assert.true(isValid, 'signature is valid - 3') - }) - - await test('signAuthMessage', async () => { - const address = wallet.getAddress() - const chainId = 31337 - const authProvider = wallet.getProvider(chainId)! - - assert.equal(chainId, 31337, 'chainId is 31337 (authChain)') - assert.equal(authProvider.getChainId(), 31337, 'authProvider chainId is 31337') - assert.equal(authProvider.getChainId(), await authProvider.getSigner().getChainId(), 'authProvider signer chainId is 31337') - - // Sign the message - const message = 'hihi' - const sig = await signer.signMessage(message, { chainId }) - - // confirm that authSigner, the chain-bound provider, derived from the authProvider returns the same signature - const authSigner = authProvider.getSigner() - const sigChk = await authSigner.signMessage(message, { chainId }) - assert.equal(sigChk, sig, 'authSigner.signMessage returns the same sig') - - // Verify the signature - const isValid = await wallet.utils.isValidMessageSignature(address, message, sig, chainId) - assert.true(isValid, 'signAuthMessage, signature is valid') - }) - - await test('getBalance', async () => { - // technically, the mock-wallet's single signer owner has some ETH.. - const balanceSigner1 = await provider.getBalance('0x4e37E14f5d5AAC4DF1151C6E8DF78B7541680853') - assert.true(balanceSigner1 > 0n, 'signer1 balance > 0') - }) - - await test('fund sequence wallet', async () => { - // fund Sequence wallet with some ETH from test seed account - const testAccount = getEOAWallet(testAccounts[0].privateKey) - const walletBalanceBefore = await signer.getBalance() - - const ethAmount = parseEther('10.1234') - const txResp = await sendETH(testAccount, wallet.getAddress(), ethAmount) - const txReceipt = await provider.getTransactionReceipt(txResp.hash) - assert.equal(txReceipt?.status, 1, 'eth sent from signer1') - - const walletBalanceAfter = await signer.getBalance() - assert.equal(walletBalanceAfter - walletBalanceBefore, ethAmount, `wallet received ${ethAmount} eth`) - }) - - const testSendETH = async ( - title: string, - opts: { - gasLimit?: string - } = {} - ) => - test(title, async () => { - // sequence wallet to now send some eth back to another seed account - // via the relayer - { - const walletAddress = wallet.getAddress() - const walletBalanceBefore = await signer.getBalance() - - // send eth from sequence smart wallet to another test account - const toAddress = testAccounts[1].address - const toBalanceBefore = await provider.getBalance(toAddress) - - const ethAmount = parseEther('1.4242') - - // NOTE: when a wallet is undeployed (counterfactual), and although the txn contents are to send from our - // sequence wallet to the test account, the transaction by the Sequence Wallet instance will be sent `to` the - // `GuestModule` smart contract address of the Sequence context `from` the Sequence Relayer (local) account. - // - // However, when a wallet is deployed on-chain, and the txn object is to send from our sequence wallet to the - // test account, the transaction will be sent `to` the smart wallet contract address of the sender by - // the relayer. The transaction will then be delegated through the Smart Wallet and transfer will occur - // as an internal transaction on-chain. - // - // Also note, the gasLimit and gasPrice can be estimated by the relayer, or optionally may be specified. - - //-- - - // Record wallet deployed state before, so we can check the receipt.to below. We have to do this - // because a wallet will automatically get bundled for deployment when it sends a transaction. - const beforeWalletDeployed = (await hardhatProvider.getCode(wallet.getAddress())) !== '0x' - - // NOTE/TODO: gasPrice even if set will be set again by the LocalRelayer, we should allow it to be overridden - const tx: ethers.TransactionRequest = { - from: walletAddress, - to: toAddress, - value: ethAmount - } - - // specifying gasLimit manually - if (opts.gasLimit) { - tx.gasLimit = opts.gasLimit - } - - const txResp = await signer.sendTransaction(tx) - const txReceipt = await txResp.wait() - - assert.equal(txReceipt?.status, 1, 'txn sent successfully') - assert.true( - (await hardhatProvider.getCode(wallet.getAddress())) !== '0x', - 'wallet must be in deployed state after the txn' - ) - - // transaction is sent to the deployed wallet, if the wallet is deployed.. otherwise its sent to guestModule - if (beforeWalletDeployed) { - assert.equal(txReceipt?.to, wallet.getAddress(), 'recipient is correct') - } else { - assert.equal(txReceipt?.to, walletContext[2].guestModule, 'recipient is correct') - } - - // Ensure fromAddress sent their eth - const walletBalanceAfter = await signer.getBalance() - const sent = (walletBalanceAfter - walletBalanceBefore) * -1n - - assert.equal(sent, ethAmount, `wallet sent ${sent} eth while expected ${ethAmount}`) - - // Ensure toAddress received their eth - const toBalanceAfter = await provider.getBalance(toAddress) - const received = toBalanceAfter - toBalanceBefore - assert.equal(received, ethAmount, `toAddress received ${received} eth while expected ${ethAmount}`) - - // Extra checks - if (opts.gasLimit) { - // In our test, we are passing a high gas limit for an internal transaction, so overall - // transaction must be higher than this value if it used our value correctly - assert.true(txResp.gasLimit >= BigInt(opts.gasLimit), 'sendETH, using higher gasLimit') - } - } - }) - - await testSendETH('sendETH (defaultChain)') - - // NOTE: this will pass, as we set the gasLimit low on the txn, but the LocalRelayer will re-estimate - // the entire transaction to have it pass. - await testSendETH('sendETH with high gasLimit override (defaultChain)', { gasLimit: '0x55555' }) - - await test('sendTransaction batch', async () => { - const testAccount = getEOAWallet(testAccounts[1].privateKey) - - const ethAmount1 = parseEther('1.234') - const ethAmount2 = parseEther('0.456') - - const tx1: ethers.TransactionRequest = { - to: testAccount.address, - value: ethAmount1 - } - const tx2: ethers.TransactionRequest = { - to: testAccount.address, - value: ethAmount2 - } - - const toBalanceBefore = await provider.getBalance(testAccount.address) - const txnResp = await signer.sendTransaction([tx1, tx2]) - - await txnResp.wait() - - const toBalanceAfter = await provider.getBalance(testAccount.address) - const sent = toBalanceAfter - toBalanceBefore - const expected = ethAmount1 + ethAmount2 - assert.equal(sent, expected, `wallet sent ${sent} eth while expected ${expected} (${ethAmount1} + ${ethAmount2})`) - }) - - await test('sendTransaction batch format 2', async () => { - const testAccount = getEOAWallet(testAccounts[1].privateKey) - - const ethAmount1 = parseEther('1.234') - const ethAmount2 = parseEther('0.456') - - const tx1: ethers.TransactionRequest = { - to: testAccount.address, - value: ethAmount1 - } - - const tx2: ethers.TransactionRequest = { - to: testAccount.address, - value: ethAmount2 - } - - const toBalanceBefore = await provider.getBalance(testAccount.address) - const txnResp = await signer.sendTransaction([tx1, tx2]) - - await txnResp.wait() - - const toBalanceAfter = await provider.getBalance(testAccount.address) - const sent = toBalanceAfter - toBalanceBefore - const expected = ethAmount1 + ethAmount2 - assert.equal(sent, expected, `wallet sent ${sent} eth while expected ${expected} (${ethAmount1} + ${ethAmount2})`) - }) - - await test('sendTransaction batch format 3', async () => { - const testAccount = getEOAWallet(testAccounts[1].privateKey) - - const ethAmount1 = parseEther('1.234') - const ethAmount2 = parseEther('0.456') - - const tx1: commons.transaction.Transaction = { - to: testAccount.address, - value: ethAmount1 - } - - const tx2: commons.transaction.Transaction = { - to: testAccount.address, - value: ethAmount2 - } - - const toBalanceBefore = await provider.getBalance(testAccount.address) - - const txnResp = await signer.sendTransaction([tx1, tx2]) - await txnResp.wait() - - const toBalanceAfter = await provider.getBalance(testAccount.address) - const sent = toBalanceAfter - toBalanceBefore - const expected = ethAmount1 + ethAmount2 - assert.equal(sent, expected, `wallet sent ${sent} eth while expected ${expected} (${ethAmount1} + ${ethAmount2})`) - }) - - await test('sendETH from the sequence smart wallet (authChain)', async () => { - // multi-chain to send eth on an alternative chain, in this case the authChain - // - // NOTE: the account addresses are both chains have been seeded with the same private key - // so we can have overlapping addresses and keys for ease of use duringtesting - - // get provider of the 2nd chain - const provider2 = wallet.getProvider('hardhat2')! - - assert.equal(provider2.getChainId(), 31338, 'provider is the 2nd chain - 1') - assert.equal(provider2.getChainId(), wallet.getProvider(31338)!.getChainId(), 'provider2 code path check') - - const signer2 = provider2.getSigner() - - // confirm all account addresses are the same and correct - { - assert.equal(wallet.getAddress(), await signer.getAddress(), 'wallet and signer address match') - assert.equal(wallet.getAddress(), await signer2.getAddress(), 'wallet and signer2 address match') - assert.true(wallet.getAddress() !== testAccounts[0].address, 'wallet is not subkey address') - } - - // initial balances - { - const testAccount = getEOAWallet(testAccounts[0].privateKey, provider2) - const walletBalanceBefore = await provider2.getBalance(await testAccount.getAddress()) - - const mainTestAccount = getEOAWallet(testAccounts[0].privateKey, wallet.getProvider()) - const mainWalletBalanceBefore = await provider.getBalance(await mainTestAccount.getAddress()) - - assert.true(walletBalanceBefore !== mainWalletBalanceBefore, 'balances across networks do not match') - } - - // first, lets move some ETH info the wallet from teh testnet seed account - { - const testAccount = getEOAWallet(testAccounts[0].privateKey, provider2) - const walletBalanceBefore = await signer2.getBalance() - - const ethAmount = parseEther('4.2') - - // const txResp = await sendETH(testAccount, await wallet.getAddress(), ethAmount) - // const txReceipt = await provider2.getTransactionReceipt(txResp.hash) - - const txReceipt = await (await sendETH(testAccount, wallet.getAddress(), ethAmount)).wait() - assert.equal(txReceipt?.status, 1, 'eth sent') - - const walletBalanceAfter = await signer2.getBalance() - assert.equal(walletBalanceAfter - walletBalanceBefore, ethAmount, `wallet received ${ethAmount} eth`) - } - - // using sequence wallet on the authChain, send eth back to anotehr seed account via - // the authChain relayer - { - const walletAddress = wallet.getAddress() - const walletBalanceBefore = await signer2.getBalance() - - // send eth from sequence smart wallet to another test account - const toAddress = testAccounts[1].address - const toBalanceBefore = await provider2.getBalance(toAddress) - - const ethAmount = parseEther('1.1234') - - const tx = { - from: walletAddress, - to: toAddress, - value: ethAmount - } - const txReceipt = await (await signer2.sendTransaction(tx)).wait() - - assert.equal(txReceipt?.status, 1, 'txn sent successfully') - assert.true((await hardhatProvider.getCode(walletAddress)) !== '0x', 'wallet must be in deployed state after the txn') - - // Ensure fromAddress sent their eth - const walletBalanceAfter = await signer2.getBalance() - const sent = (walletBalanceAfter - walletBalanceBefore) * -1n - - assert.equal(sent, ethAmount, `wallet sent ${ethAmount} eth`) - - // Ensure toAddress received their eth - const toBalanceAfter = await provider2.getBalance(toAddress) - assert.equal(toBalanceAfter - toBalanceBefore, ethAmount, `toAddress received ${ethAmount} eth`) - } - }) -} diff --git a/old/packages/0xsequence/tests/browser/wallet-provider/dapp2.test.ts b/old/packages/0xsequence/tests/browser/wallet-provider/dapp2.test.ts deleted file mode 100644 index e4839b67f..000000000 --- a/old/packages/0xsequence/tests/browser/wallet-provider/dapp2.test.ts +++ /dev/null @@ -1,116 +0,0 @@ -import { DefaultProviderConfig, MemoryItemStore, SequenceClient, SequenceProvider } from '@0xsequence/provider' -import { configureLogger } from '@0xsequence/utils' -import { ethers } from 'ethers' -import { test, assert } from '../../utils/assert' - -configureLogger({ logLevel: 'DEBUG', silence: false }) - -export const tests = async () => { - // - // Setup - // - const transportsConfig = { - ...DefaultProviderConfig.transports, - walletAppURL: 'http://localhost:9999/mock-wallet/mock-wallet.test.html' - } - - const hardhatProvider = new ethers.JsonRpcProvider('http://localhost:8545', undefined, { cacheTimeout: -1 }) - - const client = new SequenceClient(transportsConfig, new MemoryItemStore(), { defaultChainId: 31338 }) - const provider = new SequenceProvider(client, chainId => { - if (chainId === 31337) { - return hardhatProvider - } - - if (chainId === 31338) { - return new ethers.JsonRpcProvider('http://localhost:9545', undefined, { cacheTimeout: -1 }) - } - - throw new Error(`No provider for chainId ${chainId}`) - }) - - // clear it in case we're testing in browser session - provider.disconnect() - - await test('is logged out', async () => { - assert.false(provider.isConnected(), 'is logged out') - }) - - await test('is disconnected', async () => { - assert.false(provider.isConnected(), 'is disconnnected') - }) - - await test('connect / login', async () => { - const { connected } = await provider.connect({ - app: 'test', - keepWalletOpened: true - }) - - assert.true(connected, 'is connected') - }) - - await test('isConnected', async () => { - assert.true(provider.isConnected(), 'is connected') - }) - - await test('check defaultNetwork is 31338', async () => { - assert.equal(provider.getChainId(), 31338, 'provider chainId is 31338') - - const network = await provider.getNetwork() - assert.equal(network.chainId, 31338n, 'chain id match') - }) - - await test('getNetworks()', async () => { - const networks = await provider.getNetworks() - console.log('=> networks', networks) - - // There should be two chains, hardhat and hardhat2 - assert.equal(networks.length, 2, 'networks length is 2') - assert.equal(networks[0].chainId, 31337, 'chain id match') - assert.equal(networks[1].chainId, 31338, 'chain id match') - }) - - await test('signMessage with our custom defaultChain', async () => { - console.log('signing message...') - const signer = provider.getSigner() - - const message = 'Hi there! Please sign this message, 123456789, thanks.' - - // sign - const sig = await signer.signMessage(message) - - // validate - const isValid = await provider.utils.isValidMessageSignature(provider.getAddress(), message, sig, await signer.getChainId()) - assert.true(isValid, 'signMessage sig is valid') - }) - - await test('signTypedData on defaultChain (in this case, hardhat2)', async () => { - const address = provider.getAddress() - const chainId = provider.getChainId() - - const domain: ethers.TypedDataDomain = { - name: 'Ether Mail', - version: '1', - chainId: chainId, - verifyingContract: '0xCcCCccccCCCCcCCCCCCcCcCccCcCCCcCcccccccC' - } - - const types: { [key: string]: ethers.TypedDataField[] } = { - Person: [ - { name: 'name', type: 'string' }, - { name: 'wallet', type: 'address' } - ] - } - - const message = { - name: 'Bob', - wallet: '0xbBbBBBBbbBBBbbbBbbBbbbbBBbBbbbbBbBbbBBbB' - } - - const sig = await provider.getSigner().signTypedData(domain, types, message) - - // Verify typed data - const isValid = await provider.utils.isValidTypedDataSignature(address, { domain, types, message }, sig, chainId) - assert.true(isValid, 'signature is valid - 4') - }) -} diff --git a/old/packages/0xsequence/tests/browser/window-transport/dapp.test.ts b/old/packages/0xsequence/tests/browser/window-transport/dapp.test.ts deleted file mode 100644 index 12c6bd9f3..000000000 --- a/old/packages/0xsequence/tests/browser/window-transport/dapp.test.ts +++ /dev/null @@ -1,130 +0,0 @@ -import { isValidSignature, prefixEIP191Message, WindowMessageProvider } from '@0xsequence/provider' -import { context } from '@0xsequence/tests' -import { configureLogger, encodeMessageDigest, packMessageData } from '@0xsequence/utils' -import { ethers } from 'ethers' -import { test, assert } from '../../utils/assert' - -configureLogger({ logLevel: 'DEBUG', silence: false }) - -const walletProvider = new WindowMessageProvider('http://localhost:9999/mock-wallet/mock-wallet.test.html') -walletProvider.register() - -// ;(window as any).walletProvider = walletProvider - -export const tests = async () => { - await (async () => { - const provider = new ethers.JsonRpcProvider('http://localhost:8545', undefined, { cacheTimeout: -1 }) - const signer = await provider.getSigner() - return context.deploySequenceContexts(signer) - })() - - walletProvider.openWallet() - - await test('provider opened the wallet', async () => { - const opened = await walletProvider.waitUntilOpened() - assert.true(!!opened, 'opened is true') - }) - - // TODO: try this again, but turn off hardhat, to ensure our error reponses are working correctly.. - // .. - const provider = new ethers.BrowserProvider(walletProvider, undefined, { cacheTimeout: -1 }) - const signer = await provider.getSigner() - - const address = await signer.getAddress() - const { chainId } = await provider.getNetwork() - - await test('getAddress', async () => { - assert.true(ethers.isAddress(address), 'wallet address') - }) - - await test('sending a json-rpc request', async () => { - const result = await walletProvider.request({ method: 'eth_accounts', params: [] }) - assert.equal(result[0], address, 'response address check') - - const resp = await provider.send('eth_accounts', []) - assert.true(!!resp, 'response successful') - assert.equal(resp[0], address, 'response address check') - }) - - await test('get chain id', async () => { - const network = await provider.getNetwork() - assert.equal(network.chainId, 31337n, 'chain id match') - - const netVersion = await provider.send('net_version', []) - assert.equal(netVersion, '31337', 'net_version check') - - const chainId = await provider.send('eth_chainId', []) - assert.equal(chainId, '0x7a69', 'eth_chainId check') - }) - - // NOTE: when a dapp wants to verify SmartWallet signed messages, they will need to verify against EIP-1271 - await test('sign a message and validate/recover', async () => { - const message = ethers.toUtf8Bytes('hihi') - - // TODO: signer should be a Sequence signer, and should be able to specify the chainId - // however, for a single wallet, it can check the chainId and throw if doesnt match, for multi-wallet it will select - - // Deploy the wallet (by sending a random tx) - // (this step is performed by wallet-webapp when signing without EIP-6492 support) - await signer.sendTransaction({ to: ethers.Wallet.createRandom().address }) - - // - // Sign the message - // - const sig = await signer.signMessage(message) - - // - // Verify the message signature - // - const messageDigest = encodeMessageDigest(prefixEIP191Message(message)) - const isValid = await isValidSignature(address, messageDigest, sig, provider) - assert.true(isValid, 'signature is valid - 5') - - // also compute the subDigest of the message, to be provided to the end-user - // in order to recover the config properly, the subDigest + sig is required. - const subDigest = packMessageData(address, chainId, messageDigest) - }) - - await test('sign EIP712 typed data and validate/recover', async () => { - const typedData = { - types: { - Person: [ - { name: 'name', type: 'string' }, - { name: 'wallet', type: 'address' } - ] - }, - primaryType: 'Person' as const, - domain: { - name: 'Ether Mail', - version: '1', - chainId: 31337, - verifyingContract: '0xCcCCccccCCCCcCCCCCCcCcCccCcCCCcCcccccccC' - }, - message: { - name: 'Bob', - wallet: '0xbBbBBBBbbBBBbbbBbbBbbbbBBbBbbbbBbBbbBBbB' - } - } - - // - // Sign the message - // - const sig = await provider.send('eth_signTypedData', [address, typedData]) - - // NOTE: verification of message below is identical to verifying a message with eth_sign, - // the difference is we have to provide 'message' as the typedData digest format - - // - // Verify the message signature - // - - const messageHash = ethers.TypedDataEncoder.hash(typedData.domain, typedData.types, typedData.message) - const messageDigest = ethers.getBytes(messageHash) - const isValid = await isValidSignature(address, messageDigest, sig, provider) - assert.true(isValid, 'signature is valid - 6') - - // also compute the subDigest of the message, to be provided to the end-user - // in order to recover the config properly, the subDigest + sig is required. - const subDigest = packMessageData(address, chainId, messageDigest) - }) -} diff --git a/old/packages/0xsequence/tests/json-rpc-provider.spec.ts b/old/packages/0xsequence/tests/json-rpc-provider.spec.ts deleted file mode 100644 index 317194949..000000000 --- a/old/packages/0xsequence/tests/json-rpc-provider.spec.ts +++ /dev/null @@ -1,3 +0,0 @@ -import { runBrowserTests } from './utils/browser-test-runner' - -runBrowserTests('json-rpc-provider', 'json-rpc-provider/rpc.test.html') diff --git a/old/packages/0xsequence/tests/mock-wallet.spec.ts b/old/packages/0xsequence/tests/mock-wallet.spec.ts deleted file mode 100644 index 62f770985..000000000 --- a/old/packages/0xsequence/tests/mock-wallet.spec.ts +++ /dev/null @@ -1,3 +0,0 @@ -import { runBrowserTests } from './utils/browser-test-runner' - -runBrowserTests('mock-wallet', 'mock-wallet/mock-wallet.test.html') diff --git a/old/packages/0xsequence/tests/mux-transport.spec.ts b/old/packages/0xsequence/tests/mux-transport.spec.ts deleted file mode 100644 index 814f019ec..000000000 --- a/old/packages/0xsequence/tests/mux-transport.spec.ts +++ /dev/null @@ -1,3 +0,0 @@ -import { runBrowserTests } from './utils/browser-test-runner' - -runBrowserTests('mux-transport', 'mux-transport/mux.test.html') diff --git a/old/packages/0xsequence/tests/proxy-transport.spec.ts b/old/packages/0xsequence/tests/proxy-transport.spec.ts deleted file mode 100644 index 338fb0fc3..000000000 --- a/old/packages/0xsequence/tests/proxy-transport.spec.ts +++ /dev/null @@ -1,3 +0,0 @@ -import { runBrowserTests } from './utils/browser-test-runner' - -runBrowserTests('proxy-transport-channel', 'proxy-transport/channel.test.html') diff --git a/old/packages/0xsequence/tests/utils/assert.ts b/old/packages/0xsequence/tests/utils/assert.ts deleted file mode 100644 index 6af2b776c..000000000 --- a/old/packages/0xsequence/tests/utils/assert.ts +++ /dev/null @@ -1,97 +0,0 @@ -interface Entry { - title: string - pass: boolean | null - startTime: number - error: string | null - stack: string | null -} - -declare global { - interface Window { - __testResults: Entry[] - } -} - -const testResults: Entry[] = [] - -window.__testResults = testResults - -export const test = async (title: string, run: () => void) => { - console.log(`\n -╔══════════════════════════════════════════════════════════════════════════════╗ -║ ║ -║ ${title}${' '.repeat(77 - title.length)}║ -║ ║ -╚══════════════════════════════════════════════════════════════════════════════╝\n`) - - const entry: Entry = { - title: title, - pass: null, - startTime: performance.now(), - error: null, - stack: null - } - testResults.push(entry) - - try { - await run() - entry.pass = true - } catch (err) { - entry.error = err.message - entry.stack = err.stack - // throw new Error(`case '${title}' failed due to ${err.message}`) - // throw err - err.message = `case '${title}' failed due to ${err.message}` - throw err - } -} - -export const assert = { - true: function (cond: boolean, msg?: string) { - if (cond !== true) { - if (msg) { - throw new Error(`invalid condition, '${msg}'`) - } else { - throw new Error(`invalid condition`) - } - } - }, - - false: function (cond: boolean, msg?: string) { - return assert.true(!cond, msg) - }, - - equal: function (actual: any, expected: any, msg?: string) { - if (actual !== expected) { - if (msg) { - throw new Error(`expected '${expected}' but got '${actual}', '${msg}'`) - } else { - throw new Error(`expected '${expected}' but got '${actual}'`) - } - } - }, - - rejected: async function (promise: Promise, msg?: string) { - let wasRejected = false - - try { - await promise - } catch { - wasRejected = true - } - - if (!wasRejected) { - if (msg) { - throw new Error(`expected to be rejected`) - } else { - throw new Error(`expected to be rejected, ${msg}`) - } - } - } -} - -export const sleep = (time: number) => { - return new Promise((resolve, reject) => { - setTimeout(resolve, time) - }) -} diff --git a/old/packages/0xsequence/tests/utils/browser-test-runner.ts b/old/packages/0xsequence/tests/utils/browser-test-runner.ts deleted file mode 100644 index 4a709a570..000000000 --- a/old/packages/0xsequence/tests/utils/browser-test-runner.ts +++ /dev/null @@ -1,89 +0,0 @@ -import test from 'ava' -import * as puppeteer from 'puppeteer' - -export const runBrowserTests = async (title: string, path: string) => { - test.serial(title, browserContext, async (t, page: puppeteer.Page) => { - await page.goto('http://localhost:9999/' + path, { - waitUntil: 'networkidle0', - timeout: 30000 - }) - - // confirm - t.true((await page.title()) === 'test') - - // debugging - page.on('console', msg => console.log(`console: ${msg.text()}`)) - - // catch uncaught errors - page.on('pageerror', err => { - page.close() - t.fail(`${err}`) - }) - - // run the test - try { - const timeout = setTimeout(() => { - throw `Test runner timed out after 60s!` - }, 60000) // 60 seconds to run the tests - - const testResults = await page.evaluate(async () => { - // @ts-ignore - await lib.tests() - - // @ts-ignore - return window.__testResults - }) - - clearTimeout(timeout) - - for (let i = 0; i < testResults.length; i++) { - const result = testResults[i] - if (result.pass === true) { - t.log(`${result.title}: \x1b[32mPASS\x1b[0m`) - } else { - t.log(`${result.title}: \x1b[31mFAIL\x1b[0m`) - if (result.error) { - t.fail(`WHOOPS! case '${result.title}' failed due to ${result.error} !`) - } else { - t.fail(`WHOOPS! case '${result.title}' failed !`) - } - } - } - } catch (err) { - t.fail(`${err}`) - } - }) -} - -export const browserContext = async (t, run) => { - const browser = await puppeteer.launch({ - headless: true, - args: ['--no-sandbox', '--disable-setuid-sandbox'] - }) - const page = await browser.newPage() - try { - await run(t, page) - } finally { - await page.close() - await browser.close() - } -} - -// const getChromePath = (): string | undefined => { -// if (process.env['NIX_PATH']) { -// // nixos users are unable to use the chrome bin packaged with puppeteer, -// // so instead we use the locally installed chrome or chromium binary. -// for (const bin of ['google-chrome-stable', 'chromium']) { -// const out = spawnSync('which', [bin]) -// if (out.status === 0) { -// const executablePath = out.stdout.toString().trim() -// return executablePath -// } -// } -// console.error('Unable to find `google-chrome-stable` or `chromium` binary on your NixOS system.') -// process.exit(1) -// } else { -// // undefined will use the chrome version packaged with puppeteer npm package -// return undefined -// } -// } diff --git a/old/packages/0xsequence/tests/utils/webpack-test-server.ts b/old/packages/0xsequence/tests/utils/webpack-test-server.ts deleted file mode 100644 index 8b4a050d4..000000000 --- a/old/packages/0xsequence/tests/utils/webpack-test-server.ts +++ /dev/null @@ -1,31 +0,0 @@ -import webpack from 'webpack' -import WebpackDevServer from 'webpack-dev-server' -import webpackTestConfig from '../webpack.config' - -export const DEFAULT_PORT = 9999 - -// NOTE: currently not in use, instead we run the server as a separate process via `pnpm test:server` - -export const createWebpackTestServer = async (port = DEFAULT_PORT) => { - const testServer = new WebpackDevServer( - // @ts-ignore - webpack(webpackTestConfig), - { - clientLogLevel: 'silent', - open: false, - host: '0.0.0.0', - historyApiFallback: true, - stats: 'errors-only', - disableHostCheck: true, - publicPath: '/', - inline: false, - hot: false - } - ) - - await testServer.listen(port, '0.0.0.0', function (err) { - if (err) { - console.error(err) - } - }) -} diff --git a/old/packages/0xsequence/tests/wallet-provider.spec.ts b/old/packages/0xsequence/tests/wallet-provider.spec.ts deleted file mode 100644 index 418cefd9f..000000000 --- a/old/packages/0xsequence/tests/wallet-provider.spec.ts +++ /dev/null @@ -1,4 +0,0 @@ -import { runBrowserTests } from './utils/browser-test-runner' - -runBrowserTests('wallet-provider/dapp', 'wallet-provider/dapp.test.html') -runBrowserTests('wallet-provider/dapp2', 'wallet-provider/dapp2.test.html') diff --git a/old/packages/0xsequence/tests/webpack.config.js b/old/packages/0xsequence/tests/webpack.config.js deleted file mode 100644 index 9b0297079..000000000 --- a/old/packages/0xsequence/tests/webpack.config.js +++ /dev/null @@ -1,165 +0,0 @@ -const path = require('path') -const fs = require('fs') -const webpack = require('webpack') -const HtmlWebpackPlugin = require('html-webpack-plugin') - -const port = process.env['PORT'] || 9999 - -const appDirectory = fs.realpathSync(process.cwd()) -const resolveCwd = (relativePath) => path.resolve(appDirectory, relativePath) - -const resolvePackages = () => { - const pkgs = path.resolve(fs.realpathSync(process.cwd()), '..') - return fs.readdirSync(pkgs).reduce((list, dir) => { - const p = path.join(pkgs, dir, 'src') - if (fs.existsSync(p)) { - list.push(p) - } - return list - }, []) -} - -// Include extra sources for compilation. -// -// NOTE: if you experience an error in your webpack builder such as, -// Module parse failed: Unexpected token (11:20) -// You may need an appropriate loader to handle this file type, currently no loaders are -// configured to process this file. See https://webpack.js.org/concepts#loaders -// -// The above error is due to not passing the TypeScript files to the module.rules for -// babel below. The solution is to include the path to the source files below, and -// the error will go away. -const resolveExtras = [ - // resolveCwd('../wallet/tests/utils'), - resolveCwd('../../node_modules/@0xsequence/wallet-contracts/gen') -] - -const resolveTestEntries = (location) => { - return fs.readdirSync(location).reduce((list, f) => { - const n = path.join(location, f) - if (fs.lstatSync(n).isDirectory()) { - list.push(...resolveTestEntries(n)) - } else { - if (n.endsWith(".test.ts") > 0) list.push(n) - } - return list - }, []) -} - -const resolveEntry = () => { - const browserTestRoot = fs.realpathSync(path.join(process.cwd(), 'tests', 'browser')) - const entry = { 'lib': './src/index.ts' } - const testEntries = resolveTestEntries(browserTestRoot) - testEntries.forEach(v => entry[v.slice(browserTestRoot.length+1, v.length-3)] = v) - return entry -} - -const resolveHtmlPlugins = (entry) => { - const plugins = [] - for (let k in entry) { - if (k === 'lib') continue - plugins.push(new HtmlWebpackPlugin({ - inject: false, - filename: `${k}.html`, - templateContent: htmlTemplate(k) - })) - } - return plugins -} - -const htmlTemplate = (k) => ` - - - - test - - -

${k}

- -
- -
- - - - - - -` - -const entry = resolveEntry() - -module.exports = { - mode: 'none', - context: process.cwd(), - entry: entry, - output: { - library: 'lib', - libraryTarget: 'umd' - }, - watch: false, - plugins: [...resolveHtmlPlugins(entry)], - module: { - rules: [ - { - test: /\.(js|mjs|ts)$/, - include: [...resolvePackages(), resolveCwd('./tests'), ...resolveExtras], - loader: require.resolve('babel-loader'), - options: { - presets: ['@babel/preset-typescript'], - plugins: [ - [require.resolve('@babel/plugin-transform-class-properties'), { loose: true }] - ], - cacheCompression: false, - compact: false, - }, - }, - { - test: /\.(jpe?g|png|gif|svg)$/i, - use: [ - { - loader: 'url-loader', - options: { - limit: 8192000 - } - } - ] - } - ] - }, - resolve: { - modules: ['node_modules', resolveCwd('node_modules')], - extensions: ['.ts', '.js', '.png', '.jpg', '.d.ts'], - alias: {}, - fallback: { - fs: false, - stream: false, - readline: false, - assert: false - } - }, - devServer: { - clientLogLevel: 'silent', - open: false, - host: '0.0.0.0', - port: port, - historyApiFallback: true, - stats: 'errors-only', - disableHostCheck: true, - contentBase: path.resolve(process.cwd(), 'tests/browser'), - publicPath: '/', - inline: false, - hot: false - } -} diff --git a/old/packages/0xsequence/tests/window-transport.spec.ts b/old/packages/0xsequence/tests/window-transport.spec.ts deleted file mode 100644 index d56374379..000000000 --- a/old/packages/0xsequence/tests/window-transport.spec.ts +++ /dev/null @@ -1,3 +0,0 @@ -import { runBrowserTests } from './utils/browser-test-runner' - -runBrowserTests('window-transport', 'window-transport/dapp.test.html') diff --git a/old/packages/abi/CHANGELOG.md b/old/packages/abi/CHANGELOG.md deleted file mode 100644 index aa0333e53..000000000 --- a/old/packages/abi/CHANGELOG.md +++ /dev/null @@ -1,2087 +0,0 @@ -# @0xsequence/abi - -## 2.3.8 - -### Patch Changes - -- indexer: update clients - -## 2.3.7 - -### Patch Changes - -- Metadata updates - -## 2.3.6 - -### Patch Changes - -- New chains - -## 2.3.5 - -### Patch Changes - -- Add Frequency Testnet - -## 2.3.4 - -### Patch Changes - -- metadata: exclude deprecated methods on rpc client - -## 2.3.3 - -### Patch Changes - -- metadata: client update - -## 2.3.2 - -### Patch Changes - -- metadata: update rpc client - -## 2.3.1 - -### Patch Changes - -- indexer: update rpc client - -## 2.3.0 - -### Minor Changes - -- update metadata rpc client - -## 2.2.15 - -### Patch Changes - -- API updates - -## 2.2.14 - -### Patch Changes - -- Somnia Testnet and Monad Testnet - -## 2.2.13 - -### Patch Changes - -- Add XR1 to all networks - -## 2.2.12 - -### Patch Changes - -- Add XR1 - -## 2.2.11 - -### Patch Changes - -- Relayer updates - -## 2.2.10 - -### Patch Changes - -- Etherlink support - -## 2.2.9 - -### Patch Changes - -- Indexer gateway native token balances - -## 2.2.8 - -### Patch Changes - -- Add Moonbeam and Moonbase Alpha - -## 2.2.7 - -### Patch Changes - -- Update Builder package - -## 2.2.6 - -### Patch Changes - -- Update relayer package - -## 2.2.5 - -### Patch Changes - -- auth: fix sequence indexer gateway url -- account: immutable wallet proxy hook - -## 2.2.4 - -### Patch Changes - -- network: update soneium mainnet block explorer url -- waas: signTypedData intent support - -## 2.2.3 - -### Patch Changes - -- provider: updating initWallet to use connected network configs if they exist - -## 2.2.2 - -### Patch Changes - -- pass projectAccessKey to relayer at all times - -## 2.2.1 - -### Patch Changes - -- waas-ethers: sign typed data - -## 2.2.0 - -### Minor Changes - -- indexer: gateway client -- @0xsequence/builder -- upgrade puppeteer to v23.10.3 - -## 2.1.8 - -### Patch Changes - -- Add Soneium Mainnet - -## 2.1.7 - -### Patch Changes - -- guard: pass project access key to guard requests - -## 2.1.6 - -### Patch Changes - -- Add LAOS and Telos Testnet chains - -## 2.1.5 - -### Patch Changes - -- account: save presigned configuration with reference chain id 1 - -## 2.1.4 - -### Patch Changes - -- provider: pass projectAccessKey into MuxMessageProvider - -## 2.1.3 - -### Patch Changes - -- waas: time drift date fix due to strange browser quirk - -## 2.1.2 - -### Patch Changes - -- provider: export analytics correctly - -## 2.1.1 - -### Patch Changes - -- Add LAOS chain support - -## 2.1.0 - -### Minor Changes - -- account: forward project access key when estimating fees and sending transactions - -### Patch Changes - -- sessions: save signatures with reference chain id - -## 2.0.26 - -### Patch Changes - -- account: fix chain id comparison - -## 2.0.25 - -### Patch Changes - -- skale-nebula: deploy gas limit = 10m - -## 2.0.24 - -### Patch Changes - -- sessions: arweave: configurable gateway url -- waas: use /status to get time drift before sending any intents - -## 2.0.23 - -### Patch Changes - -- Add The Root Network support - -## 2.0.22 - -### Patch Changes - -- Add SKALE Nebula Mainnet support - -## 2.0.21 - -### Patch Changes - -- account: add publishWitnessFor - -## 2.0.20 - -### Patch Changes - -- upgrade deps, and improve waas session status handling - -## 2.0.19 - -### Patch Changes - -- Add Immutable zkEVM support - -## 2.0.18 - -### Patch Changes - -- waas: new contractCall transaction type -- sessions: add arweave owner - -## 2.0.17 - -### Patch Changes - -- update waas auth to clear session before signIn - -## 2.0.16 - -### Patch Changes - -- Removed Astar chains - -## 2.0.15 - -### Patch Changes - -- indexer: update bindings with token balance additions - -## 2.0.14 - -### Patch Changes - -- sessions: arweave config reader -- network: add b3 and apechain mainnet configs - -## 2.0.13 - -### Patch Changes - -- network: toy-testnet - -## 2.0.12 - -### Patch Changes - -- api: update bindings - -## 2.0.11 - -### Patch Changes - -- waas: intents test fix -- api: update bindings - -## 2.0.10 - -### Patch Changes - -- network: soneium minato testnet - -## 2.0.9 - -### Patch Changes - -- network: fix SKALE network name - -## 2.0.8 - -### Patch Changes - -- metadata: update bindings - -## 2.0.7 - -### Patch Changes - -- wallet request handler fix - -## 2.0.6 - -### Patch Changes - -- network: matic -> pol - -## 2.0.5 - -### Patch Changes - -- provider: update databeat to 0.9.2 - -## 2.0.4 - -### Patch Changes - -- network: add skale-nebula-testnet - -## 2.0.3 - -### Patch Changes - -- waas: check session status in SequenceWaaS.isSignedIn() - -## 2.0.2 - -### Patch Changes - -- sessions: property convert serialized bignumber hex value to bigint - -## 2.0.1 - -### Patch Changes - -- waas: http signature check for authenticator requests -- provider: unwrap legacy json rpc responses -- use json replacer and reviver for bigints - -## 2.0.0 - -### Major Changes - -- ethers v6 - -## 1.10.15 - -### Patch Changes - -- utils: extractProjectIdFromAccessKey - -## 1.10.14 - -### Patch Changes - -- network: add borne-testnet to allNetworks - -## 1.10.13 - -### Patch Changes - -- network: add borne testnet - -## 1.10.12 - -### Patch Changes - -- api: update bindings -- global/window -> globalThis - -## 1.10.11 - -### Patch Changes - -- waas: updated intent.gen without webrpc types, errors exported from authenticator.gen - -## 1.10.10 - -### Patch Changes - -- metadata: update bindings with new contract collections api - -## 1.10.9 - -### Patch Changes - -- waas minor update - -## 1.10.8 - -### Patch Changes - -- update metadata bindings - -## 1.10.7 - -### Patch Changes - -- minor fixes to waas client - -## 1.10.6 - -### Patch Changes - -- metadata: update bindings - -## 1.10.5 - -### Patch Changes - -- network: ape-chain-testnet -> apechain-testnet - -## 1.10.4 - -### Patch Changes - -- network: add b3-sepolia, ape-chain-testnet, blast, blast-sepolia - -## 1.10.3 - -### Patch Changes - -- typing fix - -## 1.10.2 - -### Patch Changes - -- - waas: add getIdToken method - - indexer: update api client - -## 1.10.1 - -### Patch Changes - -- metadata: update bindings - -## 1.10.0 - -### Minor Changes - -- waas release v1.3.0 - -## 1.9.37 - -### Patch Changes - -- network: adds nativeToken data to NetworkMetadata constants - -## 1.9.36 - -### Patch Changes - -- guard: export client - -## 1.9.35 - -### Patch Changes - -- guard: update bindings - -## 1.9.34 - -### Patch Changes - -- waas: always use lowercase email - -## 1.9.33 - -### Patch Changes - -- waas: umd build - -## 1.9.32 - -### Patch Changes - -- indexer: update bindings - -## 1.9.31 - -### Patch Changes - -- metadata: token directory changes - -## 1.9.30 - -### Patch Changes - -- update - -## 1.9.29 - -### Patch Changes - -- disable gnosis chain - -## 1.9.28 - -### Patch Changes - -- add utils/merkletree - -## 1.9.27 - -### Patch Changes - -- network: optimistic -> optimism -- waas: remove defaults -- api, sessions: update bindings - -## 1.9.26 - -### Patch Changes - -- - add backend interfaces for pluggable interfaces - - introduce @0xsequence/react-native - - update pnpm to lockfile v9 - -## 1.9.25 - -### Patch Changes - -- update webrpc clients with new error types - -## 1.9.24 - -### Patch Changes - -- waas: add memoryStore backend to localStore - -## 1.9.23 - -### Patch Changes - -- update api client bindings - -## 1.9.22 - -### Patch Changes - -- update metadata client bindings - -## 1.9.21 - -### Patch Changes - -- api client bindings - -## 1.9.20 - -### Patch Changes - -- api client bindings update - -## 1.9.19 - -### Patch Changes - -- waas update - -## 1.9.18 - -### Patch Changes - -- provider: prohibit dangerous functions - -## 1.9.17 - -### Patch Changes - -- network: add xr-sepolia - -## 1.9.16 - -### Patch Changes - -- waas: sequence.feeOptions - -## 1.9.15 - -### Patch Changes - -- metadata: collection external_link field name fix - -## 1.9.14 - -### Patch Changes - -- network: astar-zkatana -> astar-zkyoto -- network: deprecate polygon mumbai network -- network: add xai and polygon amoy - -## 1.9.13 - -### Patch Changes - -- waas: fix @0xsequence/network dependency - -## 1.9.12 - -### Patch Changes - -- indexer: update rpc bindings -- provider: signMessage: Serialize the BytesLike or string message into hexstring before sending -- waas: SessionAuthProof - -## 1.9.11 - -### Patch Changes - -- metdata, update rpc bindings - -## 1.9.10 - -### Patch Changes - -- update metadata rpc bindings - -## 1.9.9 - -### Patch Changes - -- metadata, add SequenceCollections rpc client - -## 1.9.8 - -### Patch Changes - -- waas client update - -## 1.9.7 - -### Patch Changes - -- update rpc client bindings for api, metadata and relayer - -## 1.9.6 - -### Patch Changes - -- waas package update - -## 1.9.5 - -### Patch Changes - -- RpcRelayer prioritize project access key - -## 1.9.4 - -### Patch Changes - -- waas: fix network dependency - -## 1.9.3 - -### Patch Changes - -- provider: don't append access key to RPC url if user has already provided it - -## 1.9.2 - -### Patch Changes - -- network: add xai-sepolia - -## 1.9.1 - -### Patch Changes - -- analytics fix - -## 1.9.0 - -### Minor Changes - -- waas release - -## 1.8.8 - -### Patch Changes - -- update metadata bindings - -## 1.8.7 - -### Patch Changes - -- provider: update databeat to 0.9.1 - -## 1.8.6 - -### Patch Changes - -- guard: SignedOwnershipProof - -## 1.8.5 - -### Patch Changes - -- guard: signOwnershipProof and isSignedOwnershipProof - -## 1.8.4 - -### Patch Changes - -- network: add homeverse to networks list - -## 1.8.3 - -### Patch Changes - -- api: introduce basic linked wallet support - -## 1.8.2 - -### Patch Changes - -- provider: don't initialize analytics unless explicitly requested - -## 1.8.1 - -### Patch Changes - -- update to analytics provider - -## 1.8.0 - -### Minor Changes - -- provider: project analytics - -## 1.7.2 - -### Patch Changes - -- 0xsequence: ChainId should not be exported as a type -- account, wallet: fix nonce selection - -## 1.7.1 - -### Patch Changes - -- network: add missing avalanche logoURI - -## 1.7.0 - -### Minor Changes - -- provider: projectAccessKey is now required - -### Patch Changes - -- network: add NetworkMetadata.logoURI property for all networks - -## 1.6.3 - -### Patch Changes - -- network list update - -## 1.6.2 - -### Patch Changes - -- auth: projectAccessKey option -- wallet: use 12 bytes for random space - -## 1.6.1 - -### Patch Changes - -- core: add simple config from subdigest support -- core: fix encode tree with subdigest -- account: implement buildOnChainSignature on Account - -## 1.6.0 - -### Minor Changes - -- account, wallet: parallel transactions by default - -### Patch Changes - -- provider: emit disconnect on sign out - -## 1.5.0 - -### Minor Changes - -- signhub: add 'signing' signer status - -### Patch Changes - -- auth: Session.open: onAccountAddress callback -- account: allow empty transaction bundles - -## 1.4.9 - -### Patch Changes - -- rename SequenceMetadataClient to SequenceMetadata - -## 1.4.8 - -### Patch Changes - -- account: Account.getSigners - -## 1.4.7 - -### Patch Changes - -- update indexer client bindings - -## 1.4.6 - -### Patch Changes - -- - add sepolia networks, mark goerli as deprecated - - update indexer client bindings - -## 1.4.5 - -### Patch Changes - -- indexer/metadata: update client bindings -- auth: selectWallet with new address - -## 1.4.4 - -### Patch Changes - -- indexer: update bindings -- auth: handle jwt expiry - -## 1.4.3 - -### Patch Changes - -- guard: return active status from GuardSigner.getAuthMethods - -## 1.4.2 - -### Patch Changes - -- guard: update bindings - -## 1.4.1 - -### Patch Changes - -- network: remove unused networks -- signhub: orchestrator interface -- guard: auth methods interface -- guard: update bindings for pin and totp -- guard: no more retry logic - -## 1.4.0 - -### Minor Changes - -- project access key support - -## 1.3.0 - -### Minor Changes - -- signhub: account children - -### Patch Changes - -- guard: do not throw when building deploy transaction -- network: snowtrace.io -> subnets.avax.network/c-chain - -## 1.2.9 - -### Patch Changes - -- account: AccountSigner.sendTransaction simulateForFeeOptions -- relayer: update bindings - -## 1.2.8 - -### Patch Changes - -- rename X-Sequence-Token-Key header to X-Access-Key - -## 1.2.7 - -### Patch Changes - -- add x-sequence-token-key to clients - -## 1.2.6 - -### Patch Changes - -- Fix bind multicall provider - -## 1.2.5 - -### Patch Changes - -- Multicall default configuration fixes - -## 1.2.4 - -### Patch Changes - -- provider: Adding missing payment provider types to PaymentProviderOption -- provider: WalletRequestHandler.notifyChainChanged - -## 1.2.3 - -### Patch Changes - -- auth, provider: connect to accept optional authorizeNonce - -## 1.2.2 - -### Patch Changes - -- provider: allow createContract calls -- core: check for explicit zero address in contract deployments - -## 1.2.1 - -### Patch Changes - -- auth: use sequence api chain id as reference chain id if available - -## 1.2.0 - -### Minor Changes - -- split services from session, better local support - -## 1.1.15 - -### Patch Changes - -- guard: remove error filtering - -## 1.1.14 - -### Patch Changes - -- guard: add GuardSigner.onError - -## 1.1.13 - -### Patch Changes - -- provider: pass client version with connect options -- provider: removing large from BannerSize - -## 1.1.12 - -### Patch Changes - -- provider: adding bannerSize to ConnectOptions - -## 1.1.11 - -### Patch Changes - -- add homeverse configs - -## 1.1.10 - -### Patch Changes - -- handle default EIP6492 on send - -## 1.1.9 - -### Patch Changes - -- Custom default EIP6492 on client - -## 1.1.8 - -### Patch Changes - -- metadata: searchMetadata: add types filter - -## 1.1.7 - -### Patch Changes - -- adding signInWith connect settings option to allow dapps to automatically login their users with a certain provider optimizing the normal authentication flow - -## 1.1.6 - -### Patch Changes - -- metadata: searchMetadata: add chainID and excludeTokenMetadata filters - -## 1.1.5 - -### Patch Changes - -- account: re-compute meta-transaction id for wallet deployment transactions - -## 1.1.4 - -### Patch Changes - -- network: rename base-mainnet to base -- provider: override isDefaultChain with ConnectOptions.networkId if provided - -## 1.1.3 - -### Patch Changes - -- provider: use network id from transport session -- provider: sign authorization using ConnectOptions.networkId if provided - -## 1.1.2 - -### Patch Changes - -- provider: jsonrpc chain id fixes - -## 1.1.1 - -### Patch Changes - -- network: add base mainnet and sepolia -- provider: reject toxic transaction requests - -## 1.1.0 - -### Minor Changes - -- Refactor dapp facing provider - -## 1.0.5 - -### Patch Changes - -- network: export network constants -- guard: use the correct global for fetch -- network: nova-explorer.arbitrum.io -> nova.arbiscan.io - -## 1.0.4 - -### Patch Changes - -- provider: accept name or number for networkId - -## 1.0.3 - -### Patch Changes - -- Simpler isValidSignature helpers - -## 1.0.2 - -### Patch Changes - -- add extra signature validation utils methods - -## 1.0.1 - -### Patch Changes - -- add homeverse testnet - -## 1.0.0 - -### Major Changes - -- https://sequence.xyz/blog/sequence-wallet-light-state-sync-full-merkle-wallets - -## 0.43.34 - -### Patch Changes - -- auth: no jwt for indexer - -## 0.43.33 - -### Patch Changes - -- Adding onConnectOptionsChange handler to WalletRequestHandler - -## 0.43.32 - -### Patch Changes - -- add Base Goerli network - -## 0.43.31 - -### Patch Changes - -- remove AuxDataProvider, add promptSignInConnect - -## 0.43.30 - -### Patch Changes - -- add arbitrum goerli testnet - -## 0.43.29 - -### Patch Changes - -- provider: check availability of window object - -## 0.43.28 - -### Patch Changes - -- update api bindings - -## 0.43.27 - -### Patch Changes - -- Add rpc is sequence method - -## 0.43.26 - -### Patch Changes - -- add zkevm url to enum - -## 0.43.25 - -### Patch Changes - -- added polygon zkevm to mainnet networks - -## 0.43.24 - -### Patch Changes - -- name change from zkevm to polygon-zkevm - -## 0.43.23 - -### Patch Changes - -- update zkEVM name to Polygon zkEVM - -## 0.43.22 - -### Patch Changes - -- add zkevm chain - -## 0.43.21 - -### Patch Changes - -- api: update client bindings - -## 0.43.20 - -### Patch Changes - -- indexer: update bindings - -## 0.43.19 - -### Patch Changes - -- session proof update - -## 0.43.18 - -### Patch Changes - -- rpc client global check, hardening - -## 0.43.17 - -### Patch Changes - -- rpc clients, check of 'global' is defined - -## 0.43.16 - -### Patch Changes - -- ethers peerDep to v5, update rpc client global use - -## 0.43.15 - -### Patch Changes - -- - provider: expand receiver type on some util methods - -## 0.43.14 - -### Patch Changes - -- bump - -## 0.43.13 - -### Patch Changes - -- update rpc bindings - -## 0.43.12 - -### Patch Changes - -- provider: single wallet init, and add new unregisterWallet() method - -## 0.43.11 - -### Patch Changes - -- fix lockfiles -- re-add mocha type deleter - -## 0.43.10 - -### Patch Changes - -- various improvements - -## 0.43.9 - -### Patch Changes - -- update deps - -## 0.43.8 - -### Patch Changes - -- network: JsonRpcProvider with caching - -## 0.43.7 - -### Patch Changes - -- provider: fix wallet network init - -## 0.43.6 - -### Patch Changes - -- metadatata: update rpc bindings - -## 0.43.5 - -### Patch Changes - -- provider: do not set default network for connect messages -- provider: forward missing error message - -## 0.43.4 - -### Patch Changes - -- no-change version bump to fix incorrectly tagged snapshot build - -## 0.43.3 - -### Patch Changes - -- metadata: update bindings - -## 0.43.2 - -### Patch Changes - -- provider: implement connectUnchecked - -## 0.43.1 - -### Patch Changes - -- update to latest ethauth dep - -## 0.43.0 - -### Minor Changes - -- move ethers to a peer dependency - -## 0.42.10 - -### Patch Changes - -- add auxDataProvider - -## 0.42.9 - -### Patch Changes - -- provider: add eip-191 exceptions - -## 0.42.8 - -### Patch Changes - -- provider: skip setting intent origin if we're unity plugin - -## 0.42.7 - -### Patch Changes - -- Add sign in options to connection settings - -## 0.42.6 - -### Patch Changes - -- api bindings update - -## 0.42.5 - -### Patch Changes - -- relayer: don't treat missing receipt as hard failure - -## 0.42.4 - -### Patch Changes - -- provider: add custom app protocol to connect options - -## 0.42.3 - -### Patch Changes - -- update api bindings - -## 0.42.2 - -### Patch Changes - -- disable rinkeby network - -## 0.42.1 - -### Patch Changes - -- wallet: optional waitForReceipt parameter - -## 0.42.0 - -### Minor Changes - -- relayer: estimateGasLimits -> simulate -- add simulator package - -### Patch Changes - -- transactions: fix flattenAuxTransactions -- provider: only filter nullish values -- provider: re-map transaction 'gas' back to 'gasLimit' - -## 0.41.3 - -### Patch Changes - -- api bindings update - -## 0.41.2 - -### Patch Changes - -- api bindings update - -## 0.41.1 - -### Patch Changes - -- update default networks - -## 0.41.0 - -### Minor Changes - -- relayer: fix Relayer.wait() interface - - The interface for calling Relayer.wait() has changed. Instead of a single optional ill-defined timeout/delay parameter, there are three optional parameters, in order: - - - timeout: the maximum time to wait for the transaction receipt - - delay: the polling interval, i.e. the time to wait between requests - - maxFails: the maximum number of hard failures to tolerate before giving up - - Please update your codebase accordingly. - -- relayer: add optional waitForReceipt parameter to Relayer.relay - - The behaviour of Relayer.relay() was not well-defined with respect to whether or not it waited for a receipt. - This change allows the caller to specify whether to wait or not, with the default behaviour being to wait. - -### Patch Changes - -- relayer: wait receipt retry logic -- fix wrapped object error -- provider: forward delegateCall and revertOnError transaction fields - -## 0.40.6 - -### Patch Changes - -- add arbitrum-nova chain - -## 0.40.5 - -### Patch Changes - -- api: update bindings - -## 0.40.4 - -### Patch Changes - -- add unreal transport - -## 0.40.3 - -### Patch Changes - -- provider: fix MessageToSign message type - -## 0.40.2 - -### Patch Changes - -- Wallet provider, loadSession method - -## 0.40.1 - -### Patch Changes - -- export sequence.initWallet and sequence.getWallet - -## 0.40.0 - -### Minor Changes - -- add sequence.initWallet(network, config) and sequence.getWallet() helper methods - -## 0.39.6 - -### Patch Changes - -- indexer: update client bindings - -## 0.39.5 - -### Patch Changes - -- provider: fix networkRpcUrl config option - -## 0.39.4 - -### Patch Changes - -- api: update client bindings - -## 0.39.3 - -### Patch Changes - -- add request method on Web3Provider - -## 0.39.2 - -### Patch Changes - -- update umd name - -## 0.39.1 - -### Patch Changes - -- add Aurora network -- add origin info for accountsChanged event to handle it per dapp - -## 0.39.0 - -### Minor Changes - -- abstract window.localStorage to interface type - -## 0.38.2 - -### Patch Changes - -- provider: add Settings.defaultPurchaseAmount - -## 0.38.1 - -### Patch Changes - -- update api and metadata rpc bindings - -## 0.38.0 - -### Minor Changes - -- api: update bindings, change TokenPrice interface -- bridge: remove @0xsequence/bridge package -- api: update bindings, rename ContractCallArg to TupleComponent - -## 0.37.1 - -### Patch Changes - -- Add back sortNetworks - Removing sorting was a breaking change for dapps on older versions which directly integrate sequence. - -## 0.37.0 - -### Minor Changes - -- network related fixes and improvements -- api: bindings: exchange rate lookups - -## 0.36.13 - -### Patch Changes - -- api: update bindings with new price endpoints - -## 0.36.12 - -### Patch Changes - -- wallet: skip remote signers if not needed -- auth: check that signature meets threshold before requesting auth token - -## 0.36.11 - -### Patch Changes - -- Prefix EIP191 message on wallet-request-handler - -## 0.36.10 - -### Patch Changes - -- support bannerUrl on connect - -## 0.36.9 - -### Patch Changes - -- minor dev xp improvements - -## 0.36.8 - -### Patch Changes - -- more connect options (theme, payment providers, funding currencies) - -## 0.36.7 - -### Patch Changes - -- fix missing break - -## 0.36.6 - -### Patch Changes - -- wallet_switchEthereumChain support - -## 0.36.5 - -### Patch Changes - -- auth: bump ethauth to 0.7.0 - network, wallet: don't assume position of auth network in list - api/indexer/metadata: trim trailing slash on hostname, and add endpoint urls - relayer: Allow to specify local relayer transaction parameters like gas price or gas limit - -## 0.36.4 - -### Patch Changes - -- Updating list of chain ids to include other ethereum compatible chains - -## 0.36.3 - -### Patch Changes - -- provider: pass connect options to prompter methods - -## 0.36.2 - -### Patch Changes - -- transactions: Setting target to 0x0 when empty to during SequenceTxAbiEncode - -## 0.36.1 - -### Patch Changes - -- metadata: update client with more fields - -## 0.36.0 - -### Minor Changes - -- relayer, wallet: fee quote support - -## 0.35.12 - -### Patch Changes - -- provider: rename wallet.commands to wallet.utils - -## 0.35.11 - -### Patch Changes - -- provider/utils: smoother message validation - -## 0.35.10 - -### Patch Changes - -- upgrade deps - -## 0.35.9 - -### Patch Changes - -- provider: window-transport override event handlers with new wallet instance - -## 0.35.8 - -### Patch Changes - -- provider: async wallet sign in improvements - -## 0.35.7 - -### Patch Changes - -- config: cache wallet configs - -## 0.35.6 - -### Patch Changes - -- provider: support async signin of wallet request handler - -## 0.35.5 - -### Patch Changes - -- wallet: skip threshold check during fee estimation - -## 0.35.4 - -### Patch Changes - -- - browser extension mode, center window - -## 0.35.3 - -### Patch Changes - -- - update window position when in browser extension mode - -## 0.35.2 - -### Patch Changes - -- - provider: WindowMessageHandler accept optional windowHref - -## 0.35.1 - -### Patch Changes - -- wallet: update config on undeployed too - -## 0.35.0 - -### Minor Changes - -- - config: add buildStubSignature - - provider: add checks to signing cases for wallet deployment and config statuses - - provider: add prompt for wallet deployment - - relayer: add BaseRelayer.prependWalletDeploy - - relayer: add Relayer.feeOptions - - relayer: account for wallet deployment in fee estimation - - transactions: add fromTransactionish - - wallet: add Account.prependConfigUpdate - - wallet: add Account.getFeeOptions - -## 0.34.0 - -### Minor Changes - -- - upgrade deps - -## 0.31.0 - -### Minor Changes - -- - upgrading to ethers v5.5 - -## 0.30.0 - -### Minor Changes - -- - upgrade most deps - -## 0.29.8 - -### Patch Changes - -- update api - -## 0.29.0 - -### Minor Changes - -- major architectural changes in Sequence design - - - only one API instance, API is no longer a per-chain service - - separate per-chain indexer service, API no longer handles indexing - - single contract metadata service, API no longer serves metadata - - chaind package has been removed, indexer and metadata packages have been added - - stronger typing with new explicit ChainId type - - multicall fixes and improvements - - forbid "wait" transactions in sendTransactionBatch calls - -## 0.28.0 - -### Minor Changes - -- extension provider - -## 0.27.0 - -### Minor Changes - -- Add requireFreshSigner lib to sessions - -## 0.25.1 - -### Patch Changes - -- Fix build typescrypt issue - -## 0.25.0 - -### Minor Changes - -- 10c8af8: Add estimator package - Fix multicall few calls bug - -## 0.23.0 - -### Minor Changes - -- - relayer: offer variety of gas fee options from the relayer service" - -## 0.22.2 - -### Patch Changes - -- e1c109e: Fix authProof on expired sessions - -## 0.22.1 - -### Patch Changes - -- transport session cache - -## 0.22.0 - -### Minor Changes - -- e667b65: Expose all relayer options on networks - -## 0.21.5 - -### Patch Changes - -- Give priority to metaTxnId returned by relayer - -## 0.21.4 - -### Patch Changes - -- Add has enough signers method - -## 0.21.3 - -### Patch Changes - -- add window session cache - -## 0.21.2 - -### Patch Changes - -- exception handlind in relayer - -## 0.21.0 - -### Minor Changes - -- - fix gas estimation on wallets with large number of signers - - update to session handling and wallet config construction upon auth - -## 0.19.3 - -### Patch Changes - -- jwtAuth visibility, package version sync - -## 0.19.2 - -### Patch Changes - -- - api: change jwtAuth visibility - -## 0.19.0 - -### Minor Changes - -- - provider, improve dapp / wallet transport io - -## 0.18.0 - -### Minor Changes - -- relayer improvements and pending transaction handling - -## 0.16.0 - -### Minor Changes - -- relayer as its own service separate from chaind - -## 0.15.1 - -### Patch Changes - -- update api clients - -## 0.14.3 - -### Patch Changes - -- Fix 0xSequence relayer dependencies - -## 0.14.2 - -### Patch Changes - -- Add debug logs to rpc-relayer - -## 0.14.0 - -### Minor Changes - -- update sequence utils finder which includes optimization - -## 0.13.0 - -### Minor Changes - -- Update SequenceUtils deployed contract - -## 0.12.1 - -### Patch Changes - -- npm bump - -## 0.12.0 - -### Minor Changes - -- provider: improvements to window transport - -## 0.11.4 - -### Patch Changes - -- update api client - -## 0.11.3 - -### Patch Changes - -- improve openWindow state options handling - -## 0.11.2 - -### Patch Changes - -- Fix multicall proxy scopes - -## 0.11.1 - -### Patch Changes - -- Add support for dynamic and nested signatures - -## 0.11.0 - -### Minor Changes - -- Update wallet context to 1.7 contracts - -## 0.10.9 - -### Patch Changes - -- add support for public addresses as signers in session.open - -## 0.10.8 - -### Patch Changes - -- Multicall production configuration - -## 0.10.7 - -### Patch Changes - -- allow provider transport to force disconnect - -## 0.10.6 - -### Patch Changes - -- - fix getWalletState method - -## 0.10.5 - -### Patch Changes - -- update relayer gas refund options - -## 0.10.4 - -### Patch Changes - -- Update api proto - -## 0.10.3 - -### Patch Changes - -- Fix loading config cross-chain - -## 0.10.2 - -### Patch Changes - -- - message digest fix - -## 0.10.1 - -### Patch Changes - -- upgrade deps - -## 0.10.0 - -### Minor Changes - -- Deployed new contracts with ERC1271 signer support - -## 0.9.6 - -### Patch Changes - -- Update ABIs for latest sequence contracts - -## 0.9.3 - -### Patch Changes - -- - minor improvements - -## 0.9.1 - -### Patch Changes - -- - patch bump - -## 0.9.0 - -### Minor Changes - -- - provider transport hardening - -## 0.8.5 - -### Patch Changes - -- - use latest wallet-contracts - -## 0.8.4 - -### Patch Changes - -- - minor improvements, name updates and comments - -## 0.8.3 - -### Patch Changes - -- - refinements - - - normalize signer address in config - - - provider: getWalletState() method to WalletProvider - -## 0.8.2 - -### Patch Changes - -- - field rename and ethauth dependency bump - -## 0.8.1 - -### Patch Changes - -- - variety of optimizations - -## 0.8.0 - -### Minor Changes - -- - changeset fix - -## 0.7.0 - -### Patch Changes - -- 6f11ed7: sequence.js, init release diff --git a/old/packages/abi/README.md b/old/packages/abi/README.md deleted file mode 100644 index e0bbc2309..000000000 --- a/old/packages/abi/README.md +++ /dev/null @@ -1,4 +0,0 @@ -@0xsequence/abi -=============== - -See [0xsequence project page](https://github.com/0xsequence/sequence.js). diff --git a/old/packages/abi/package.json b/old/packages/abi/package.json deleted file mode 100644 index 9ac813429..000000000 --- a/old/packages/abi/package.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "name": "@0xsequence/abi", - "version": "2.3.8", - "description": "abi sub-package for Sequence", - "repository": "https://github.com/0xsequence/sequence.js/tree/master/packages/abi", - "source": "src/index.ts", - "main": "dist/0xsequence-abi.cjs.js", - "module": "dist/0xsequence-abi.esm.js", - "author": "Horizon Blockchain Games", - "license": "Apache-2.0", - "scripts": { - "test": "echo", - "typecheck": "tsc --noEmit" - }, - "dependencies": {}, - "peerDependencies": {}, - "devDependencies": {}, - "files": [ - "src", - "dist" - ] -} diff --git a/old/packages/abi/src/index.ts b/old/packages/abi/src/index.ts deleted file mode 100644 index ce88f5b8e..000000000 --- a/old/packages/abi/src/index.ts +++ /dev/null @@ -1,23 +0,0 @@ -export { abi as erc5719Abi } from './wallet/erc5719' -export { abi as erc1271Abi } from './wallet/erc1271' -export { abi as erc6492Abi } from './wallet/erc6492' -export { abi as factoryAbi } from './wallet/factory' -export { abi as mainModuleAbi } from './wallet/mainModule' -export { abi as mainModuleUpgradableAbi } from './wallet/mainModuleUpgradable' -export { abi as moduleHooksAbi } from './wallet/moduleHooks' -export { abi as sequenceUtilsAbi } from './wallet/sequenceUtils' -export { abi as requireFreshSignerAbi } from './wallet/libs/requireFreshSigners' -export { abi as walletProxyHookAbi } from './wallet/walletProxyHook' - -export { walletContracts } from './wallet' - -export { ERC1155_ABI } from './tokens/erc1155' -export { ERC20_ABI } from './tokens/erc20' -export { ERC6909_ABI } from './tokens/erc6909' -export { ERC721_ABI } from './tokens/erc721' - -export { ERC1155_SALE_ABI } from './sale/erc1155Sale' -export { ERC721_SALE_ABI } from './sale/erc721Sale' - -export { ERC1155_SALE_ITEMS_ABI } from './saleItems/erc1155SaleItems' -export { ERC721_SALE_ITEMS_ABI } from './saleItems/erc721SaleItems' diff --git a/old/packages/abi/src/sale/erc1155Sale.ts b/old/packages/abi/src/sale/erc1155Sale.ts deleted file mode 100644 index c58b9f29e..000000000 --- a/old/packages/abi/src/sale/erc1155Sale.ts +++ /dev/null @@ -1,352 +0,0 @@ -export const ERC1155_SALE_ABI = [ - { - type: 'function', - name: 'DEFAULT_ADMIN_ROLE', - inputs: [], - outputs: [{ name: '', type: 'bytes32', internalType: 'bytes32' }], - stateMutability: 'view' - }, - { - type: 'function', - name: 'checkMerkleProof', - inputs: [ - { name: 'root', type: 'bytes32', internalType: 'bytes32' }, - { name: 'proof', type: 'bytes32[]', internalType: 'bytes32[]' }, - { name: 'addr', type: 'address', internalType: 'address' }, - { name: 'salt', type: 'bytes32', internalType: 'bytes32' } - ], - outputs: [{ name: '', type: 'bool', internalType: 'bool' }], - stateMutability: 'view' - }, - { - type: 'function', - name: 'getRoleAdmin', - inputs: [{ name: 'role', type: 'bytes32', internalType: 'bytes32' }], - outputs: [{ name: '', type: 'bytes32', internalType: 'bytes32' }], - stateMutability: 'view' - }, - { - type: 'function', - name: 'getRoleMember', - inputs: [ - { name: 'role', type: 'bytes32', internalType: 'bytes32' }, - { name: 'index', type: 'uint256', internalType: 'uint256' } - ], - outputs: [{ name: '', type: 'address', internalType: 'address' }], - stateMutability: 'view' - }, - { - type: 'function', - name: 'getRoleMemberCount', - inputs: [{ name: 'role', type: 'bytes32', internalType: 'bytes32' }], - outputs: [{ name: '', type: 'uint256', internalType: 'uint256' }], - stateMutability: 'view' - }, - { - type: 'function', - name: 'grantRole', - inputs: [ - { name: 'role', type: 'bytes32', internalType: 'bytes32' }, - { name: 'account', type: 'address', internalType: 'address' } - ], - outputs: [], - stateMutability: 'nonpayable' - }, - { - type: 'function', - name: 'hasRole', - inputs: [ - { name: 'role', type: 'bytes32', internalType: 'bytes32' }, - { name: 'account', type: 'address', internalType: 'address' } - ], - outputs: [{ name: '', type: 'bool', internalType: 'bool' }], - stateMutability: 'view' - }, - { - type: 'function', - name: 'initialize', - inputs: [ - { name: 'owner', type: 'address', internalType: 'address' }, - { name: 'items', type: 'address', internalType: 'address' } - ], - outputs: [], - stateMutability: 'nonpayable' - }, - { - type: 'function', - name: 'itemsContract', - inputs: [], - outputs: [{ name: '', type: 'address', internalType: 'address' }], - stateMutability: 'view' - }, - { - type: 'function', - name: 'mint', - inputs: [ - { name: 'to', type: 'address', internalType: 'address' }, - { name: 'amount', type: 'uint256', internalType: 'uint256' }, - { - name: 'paymentToken', - type: 'address', - internalType: 'address' - }, - { name: 'maxTotal', type: 'uint256', internalType: 'uint256' }, - { name: 'proof', type: 'bytes32[]', internalType: 'bytes32[]' } - ], - outputs: [], - stateMutability: 'payable' - }, - { - type: 'function', - name: 'renounceRole', - inputs: [ - { name: 'role', type: 'bytes32', internalType: 'bytes32' }, - { name: 'account', type: 'address', internalType: 'address' } - ], - outputs: [], - stateMutability: 'nonpayable' - }, - { - type: 'function', - name: 'revokeRole', - inputs: [ - { name: 'role', type: 'bytes32', internalType: 'bytes32' }, - { name: 'account', type: 'address', internalType: 'address' } - ], - outputs: [], - stateMutability: 'nonpayable' - }, - { - type: 'function', - name: 'saleDetails', - inputs: [], - outputs: [ - { - name: '', - type: 'tuple', - internalType: 'struct IERC721SaleFunctions.SaleDetails', - components: [ - { - name: 'supplyCap', - type: 'uint256', - internalType: 'uint256' - }, - { name: 'cost', type: 'uint256', internalType: 'uint256' }, - { - name: 'paymentToken', - type: 'address', - internalType: 'address' - }, - { name: 'startTime', type: 'uint64', internalType: 'uint64' }, - { name: 'endTime', type: 'uint64', internalType: 'uint64' }, - { - name: 'merkleRoot', - type: 'bytes32', - internalType: 'bytes32' - } - ] - } - ], - stateMutability: 'view' - }, - { - type: 'function', - name: 'setSaleDetails', - inputs: [ - { name: 'supplyCap', type: 'uint256', internalType: 'uint256' }, - { name: 'cost', type: 'uint256', internalType: 'uint256' }, - { - name: 'paymentToken', - type: 'address', - internalType: 'address' - }, - { name: 'startTime', type: 'uint64', internalType: 'uint64' }, - { name: 'endTime', type: 'uint64', internalType: 'uint64' }, - { name: 'merkleRoot', type: 'bytes32', internalType: 'bytes32' } - ], - outputs: [], - stateMutability: 'nonpayable' - }, - { - type: 'function', - name: 'supportsInterface', - inputs: [{ name: 'interfaceId', type: 'bytes4', internalType: 'bytes4' }], - outputs: [{ name: '', type: 'bool', internalType: 'bool' }], - stateMutability: 'view' - }, - { - type: 'function', - name: 'withdrawERC20', - inputs: [ - { name: 'token', type: 'address', internalType: 'address' }, - { name: 'to', type: 'address', internalType: 'address' }, - { name: 'value', type: 'uint256', internalType: 'uint256' } - ], - outputs: [], - stateMutability: 'nonpayable' - }, - { - type: 'function', - name: 'withdrawETH', - inputs: [ - { name: 'to', type: 'address', internalType: 'address' }, - { name: 'value', type: 'uint256', internalType: 'uint256' } - ], - outputs: [], - stateMutability: 'nonpayable' - }, - { - type: 'event', - name: 'RoleAdminChanged', - inputs: [ - { - name: 'role', - type: 'bytes32', - indexed: true, - internalType: 'bytes32' - }, - { - name: 'previousAdminRole', - type: 'bytes32', - indexed: true, - internalType: 'bytes32' - }, - { - name: 'newAdminRole', - type: 'bytes32', - indexed: true, - internalType: 'bytes32' - } - ], - anonymous: false - }, - { - type: 'event', - name: 'RoleGranted', - inputs: [ - { - name: 'role', - type: 'bytes32', - indexed: true, - internalType: 'bytes32' - }, - { - name: 'account', - type: 'address', - indexed: true, - internalType: 'address' - }, - { - name: 'sender', - type: 'address', - indexed: true, - internalType: 'address' - } - ], - anonymous: false - }, - { - type: 'event', - name: 'RoleRevoked', - inputs: [ - { - name: 'role', - type: 'bytes32', - indexed: true, - internalType: 'bytes32' - }, - { - name: 'account', - type: 'address', - indexed: true, - internalType: 'address' - }, - { - name: 'sender', - type: 'address', - indexed: true, - internalType: 'address' - } - ], - anonymous: false - }, - { - type: 'event', - name: 'SaleDetailsUpdated', - inputs: [ - { - name: 'supplyCap', - type: 'uint256', - indexed: false, - internalType: 'uint256' - }, - { - name: 'cost', - type: 'uint256', - indexed: false, - internalType: 'uint256' - }, - { - name: 'paymentToken', - type: 'address', - indexed: false, - internalType: 'address' - }, - { - name: 'startTime', - type: 'uint64', - indexed: false, - internalType: 'uint64' - }, - { - name: 'endTime', - type: 'uint64', - indexed: false, - internalType: 'uint64' - }, - { - name: 'merkleRoot', - type: 'bytes32', - indexed: false, - internalType: 'bytes32' - } - ], - anonymous: false - }, - { - type: 'error', - name: 'InsufficientPayment', - inputs: [ - { name: 'currency', type: 'address', internalType: 'address' }, - { name: 'expected', type: 'uint256', internalType: 'uint256' }, - { name: 'actual', type: 'uint256', internalType: 'uint256' } - ] - }, - { - type: 'error', - name: 'InsufficientSupply', - inputs: [ - { - name: 'currentSupply', - type: 'uint256', - internalType: 'uint256' - }, - { name: 'amount', type: 'uint256', internalType: 'uint256' }, - { name: 'maxSupply', type: 'uint256', internalType: 'uint256' } - ] - }, - { type: 'error', name: 'InvalidInitialization', inputs: [] }, - { type: 'error', name: 'InvalidSaleDetails', inputs: [] }, - { - type: 'error', - name: 'MerkleProofInvalid', - inputs: [ - { name: 'root', type: 'bytes32', internalType: 'bytes32' }, - { name: 'proof', type: 'bytes32[]', internalType: 'bytes32[]' }, - { name: 'addr', type: 'address', internalType: 'address' }, - { name: 'salt', type: 'bytes32', internalType: 'bytes32' } - ] - }, - { type: 'error', name: 'SaleInactive', inputs: [] }, - { type: 'error', name: 'WithdrawFailed', inputs: [] } -] as const diff --git a/old/packages/abi/src/sale/erc721Sale.ts b/old/packages/abi/src/sale/erc721Sale.ts deleted file mode 100644 index 480dc15f3..000000000 --- a/old/packages/abi/src/sale/erc721Sale.ts +++ /dev/null @@ -1,352 +0,0 @@ -export const ERC721_SALE_ABI = [ - { - type: 'function', - name: 'DEFAULT_ADMIN_ROLE', - inputs: [], - outputs: [{ name: '', type: 'bytes32', internalType: 'bytes32' }], - stateMutability: 'view' - }, - { - type: 'function', - name: 'checkMerkleProof', - inputs: [ - { name: 'root', type: 'bytes32', internalType: 'bytes32' }, - { name: 'proof', type: 'bytes32[]', internalType: 'bytes32[]' }, - { name: 'addr', type: 'address', internalType: 'address' }, - { name: 'salt', type: 'bytes32', internalType: 'bytes32' } - ], - outputs: [{ name: '', type: 'bool', internalType: 'bool' }], - stateMutability: 'view' - }, - { - type: 'function', - name: 'getRoleAdmin', - inputs: [{ name: 'role', type: 'bytes32', internalType: 'bytes32' }], - outputs: [{ name: '', type: 'bytes32', internalType: 'bytes32' }], - stateMutability: 'view' - }, - { - type: 'function', - name: 'getRoleMember', - inputs: [ - { name: 'role', type: 'bytes32', internalType: 'bytes32' }, - { name: 'index', type: 'uint256', internalType: 'uint256' } - ], - outputs: [{ name: '', type: 'address', internalType: 'address' }], - stateMutability: 'view' - }, - { - type: 'function', - name: 'getRoleMemberCount', - inputs: [{ name: 'role', type: 'bytes32', internalType: 'bytes32' }], - outputs: [{ name: '', type: 'uint256', internalType: 'uint256' }], - stateMutability: 'view' - }, - { - type: 'function', - name: 'grantRole', - inputs: [ - { name: 'role', type: 'bytes32', internalType: 'bytes32' }, - { name: 'account', type: 'address', internalType: 'address' } - ], - outputs: [], - stateMutability: 'nonpayable' - }, - { - type: 'function', - name: 'hasRole', - inputs: [ - { name: 'role', type: 'bytes32', internalType: 'bytes32' }, - { name: 'account', type: 'address', internalType: 'address' } - ], - outputs: [{ name: '', type: 'bool', internalType: 'bool' }], - stateMutability: 'view' - }, - { - type: 'function', - name: 'initialize', - inputs: [ - { name: 'owner', type: 'address', internalType: 'address' }, - { name: 'items', type: 'address', internalType: 'address' } - ], - outputs: [], - stateMutability: 'nonpayable' - }, - { - type: 'function', - name: 'itemsContract', - inputs: [], - outputs: [{ name: '', type: 'address', internalType: 'address' }], - stateMutability: 'view' - }, - { - type: 'function', - name: 'mint', - inputs: [ - { name: 'to', type: 'address', internalType: 'address' }, - { name: 'amount', type: 'uint256', internalType: 'uint256' }, - { - name: 'paymentToken', - type: 'address', - internalType: 'address' - }, - { name: 'maxTotal', type: 'uint256', internalType: 'uint256' }, - { name: 'proof', type: 'bytes32[]', internalType: 'bytes32[]' } - ], - outputs: [], - stateMutability: 'payable' - }, - { - type: 'function', - name: 'renounceRole', - inputs: [ - { name: 'role', type: 'bytes32', internalType: 'bytes32' }, - { name: 'account', type: 'address', internalType: 'address' } - ], - outputs: [], - stateMutability: 'nonpayable' - }, - { - type: 'function', - name: 'revokeRole', - inputs: [ - { name: 'role', type: 'bytes32', internalType: 'bytes32' }, - { name: 'account', type: 'address', internalType: 'address' } - ], - outputs: [], - stateMutability: 'nonpayable' - }, - { - type: 'function', - name: 'saleDetails', - inputs: [], - outputs: [ - { - name: '', - type: 'tuple', - internalType: 'struct IERC721SaleFunctions.SaleDetails', - components: [ - { - name: 'supplyCap', - type: 'uint256', - internalType: 'uint256' - }, - { name: 'cost', type: 'uint256', internalType: 'uint256' }, - { - name: 'paymentToken', - type: 'address', - internalType: 'address' - }, - { name: 'startTime', type: 'uint64', internalType: 'uint64' }, - { name: 'endTime', type: 'uint64', internalType: 'uint64' }, - { - name: 'merkleRoot', - type: 'bytes32', - internalType: 'bytes32' - } - ] - } - ], - stateMutability: 'view' - }, - { - type: 'function', - name: 'setSaleDetails', - inputs: [ - { name: 'supplyCap', type: 'uint256', internalType: 'uint256' }, - { name: 'cost', type: 'uint256', internalType: 'uint256' }, - { - name: 'paymentToken', - type: 'address', - internalType: 'address' - }, - { name: 'startTime', type: 'uint64', internalType: 'uint64' }, - { name: 'endTime', type: 'uint64', internalType: 'uint64' }, - { name: 'merkleRoot', type: 'bytes32', internalType: 'bytes32' } - ], - outputs: [], - stateMutability: 'nonpayable' - }, - { - type: 'function', - name: 'supportsInterface', - inputs: [{ name: 'interfaceId', type: 'bytes4', internalType: 'bytes4' }], - outputs: [{ name: '', type: 'bool', internalType: 'bool' }], - stateMutability: 'view' - }, - { - type: 'function', - name: 'withdrawERC20', - inputs: [ - { name: 'token', type: 'address', internalType: 'address' }, - { name: 'to', type: 'address', internalType: 'address' }, - { name: 'value', type: 'uint256', internalType: 'uint256' } - ], - outputs: [], - stateMutability: 'nonpayable' - }, - { - type: 'function', - name: 'withdrawETH', - inputs: [ - { name: 'to', type: 'address', internalType: 'address' }, - { name: 'value', type: 'uint256', internalType: 'uint256' } - ], - outputs: [], - stateMutability: 'nonpayable' - }, - { - type: 'event', - name: 'RoleAdminChanged', - inputs: [ - { - name: 'role', - type: 'bytes32', - indexed: true, - internalType: 'bytes32' - }, - { - name: 'previousAdminRole', - type: 'bytes32', - indexed: true, - internalType: 'bytes32' - }, - { - name: 'newAdminRole', - type: 'bytes32', - indexed: true, - internalType: 'bytes32' - } - ], - anonymous: false - }, - { - type: 'event', - name: 'RoleGranted', - inputs: [ - { - name: 'role', - type: 'bytes32', - indexed: true, - internalType: 'bytes32' - }, - { - name: 'account', - type: 'address', - indexed: true, - internalType: 'address' - }, - { - name: 'sender', - type: 'address', - indexed: true, - internalType: 'address' - } - ], - anonymous: false - }, - { - type: 'event', - name: 'RoleRevoked', - inputs: [ - { - name: 'role', - type: 'bytes32', - indexed: true, - internalType: 'bytes32' - }, - { - name: 'account', - type: 'address', - indexed: true, - internalType: 'address' - }, - { - name: 'sender', - type: 'address', - indexed: true, - internalType: 'address' - } - ], - anonymous: false - }, - { - type: 'event', - name: 'SaleDetailsUpdated', - inputs: [ - { - name: 'supplyCap', - type: 'uint256', - indexed: false, - internalType: 'uint256' - }, - { - name: 'cost', - type: 'uint256', - indexed: false, - internalType: 'uint256' - }, - { - name: 'paymentToken', - type: 'address', - indexed: false, - internalType: 'address' - }, - { - name: 'startTime', - type: 'uint64', - indexed: false, - internalType: 'uint64' - }, - { - name: 'endTime', - type: 'uint64', - indexed: false, - internalType: 'uint64' - }, - { - name: 'merkleRoot', - type: 'bytes32', - indexed: false, - internalType: 'bytes32' - } - ], - anonymous: false - }, - { - type: 'error', - name: 'InsufficientPayment', - inputs: [ - { name: 'currency', type: 'address', internalType: 'address' }, - { name: 'expected', type: 'uint256', internalType: 'uint256' }, - { name: 'actual', type: 'uint256', internalType: 'uint256' } - ] - }, - { - type: 'error', - name: 'InsufficientSupply', - inputs: [ - { - name: 'currentSupply', - type: 'uint256', - internalType: 'uint256' - }, - { name: 'amount', type: 'uint256', internalType: 'uint256' }, - { name: 'maxSupply', type: 'uint256', internalType: 'uint256' } - ] - }, - { type: 'error', name: 'InvalidInitialization', inputs: [] }, - { type: 'error', name: 'InvalidSaleDetails', inputs: [] }, - { - type: 'error', - name: 'MerkleProofInvalid', - inputs: [ - { name: 'root', type: 'bytes32', internalType: 'bytes32' }, - { name: 'proof', type: 'bytes32[]', internalType: 'bytes32[]' }, - { name: 'addr', type: 'address', internalType: 'address' }, - { name: 'salt', type: 'bytes32', internalType: 'bytes32' } - ] - }, - { type: 'error', name: 'SaleInactive', inputs: [] }, - { type: 'error', name: 'WithdrawFailed', inputs: [] } -] as const diff --git a/old/packages/abi/src/saleItems/erc1155SaleItems.ts b/old/packages/abi/src/saleItems/erc1155SaleItems.ts deleted file mode 100644 index 50913e907..000000000 --- a/old/packages/abi/src/saleItems/erc1155SaleItems.ts +++ /dev/null @@ -1,377 +0,0 @@ -export const ERC1155_SALE_ITEMS_ABI = [ - { type: 'constructor', inputs: [], stateMutability: 'nonpayable' }, - { - type: 'function', - name: 'DEFAULT_ADMIN_ROLE', - inputs: [], - outputs: [{ name: '', type: 'bytes32', internalType: 'bytes32' }], - stateMutability: 'view' - }, - { - type: 'function', - name: 'balanceOf', - inputs: [ - { name: '_owner', type: 'address', internalType: 'address' }, - { name: '_id', type: 'uint256', internalType: 'uint256' } - ], - outputs: [{ name: '', type: 'uint256', internalType: 'uint256' }], - stateMutability: 'view' - }, - { - type: 'function', - name: 'balanceOfBatch', - inputs: [ - { name: '_owners', type: 'address[]', internalType: 'address[]' }, - { name: '_ids', type: 'uint256[]', internalType: 'uint256[]' } - ], - outputs: [{ name: '', type: 'uint256[]', internalType: 'uint256[]' }], - stateMutability: 'view' - }, - { - type: 'function', - name: 'baseURI', - inputs: [], - outputs: [{ name: '', type: 'string', internalType: 'string' }], - stateMutability: 'view' - }, - { - type: 'function', - name: 'batchBurn', - inputs: [ - { name: 'tokenIds', type: 'uint256[]', internalType: 'uint256[]' }, - { name: 'amounts', type: 'uint256[]', internalType: 'uint256[]' } - ], - outputs: [], - stateMutability: 'nonpayable' - }, - { - type: 'function', - name: 'batchMint', - inputs: [ - { name: 'to', type: 'address', internalType: 'address' }, - { name: 'tokenIds', type: 'uint256[]', internalType: 'uint256[]' }, - { name: 'amounts', type: 'uint256[]', internalType: 'uint256[]' }, - { name: 'data', type: 'bytes', internalType: 'bytes' } - ], - outputs: [], - stateMutability: 'nonpayable' - }, - { - type: 'function', - name: 'burn', - inputs: [ - { name: 'tokenId', type: 'uint256', internalType: 'uint256' }, - { name: 'amount', type: 'uint256', internalType: 'uint256' } - ], - outputs: [], - stateMutability: 'nonpayable' - }, - { - type: 'function', - name: 'contractURI', - inputs: [], - outputs: [{ name: '', type: 'string', internalType: 'string' }], - stateMutability: 'view' - }, - { - type: 'function', - name: 'getRoleAdmin', - inputs: [{ name: 'role', type: 'bytes32', internalType: 'bytes32' }], - outputs: [{ name: '', type: 'bytes32', internalType: 'bytes32' }], - stateMutability: 'view' - }, - { - type: 'function', - name: 'getRoleMember', - inputs: [ - { name: 'role', type: 'bytes32', internalType: 'bytes32' }, - { name: 'index', type: 'uint256', internalType: 'uint256' } - ], - outputs: [{ name: '', type: 'address', internalType: 'address' }], - stateMutability: 'view' - }, - { - type: 'function', - name: 'getRoleMemberCount', - inputs: [{ name: 'role', type: 'bytes32', internalType: 'bytes32' }], - outputs: [{ name: '', type: 'uint256', internalType: 'uint256' }], - stateMutability: 'view' - }, - { - type: 'function', - name: 'grantRole', - inputs: [ - { name: 'role', type: 'bytes32', internalType: 'bytes32' }, - { name: 'account', type: 'address', internalType: 'address' } - ], - outputs: [], - stateMutability: 'nonpayable' - }, - { - type: 'function', - name: 'hasRole', - inputs: [ - { name: 'role', type: 'bytes32', internalType: 'bytes32' }, - { name: 'account', type: 'address', internalType: 'address' } - ], - outputs: [{ name: '', type: 'bool', internalType: 'bool' }], - stateMutability: 'view' - }, - { - type: 'function', - name: 'initialize', - inputs: [ - { name: 'owner', type: 'address', internalType: 'address' }, - { name: 'tokenName', type: 'string', internalType: 'string' }, - { name: 'tokenBaseURI', type: 'string', internalType: 'string' }, - { name: 'tokenContractURI', type: 'string', internalType: 'string' }, - { name: 'royaltyReceiver', type: 'address', internalType: 'address' }, - { name: 'royaltyFeeNumerator', type: 'uint96', internalType: 'uint96' } - ], - outputs: [], - stateMutability: 'nonpayable' - }, - { - type: 'function', - name: 'isApprovedForAll', - inputs: [ - { name: '_owner', type: 'address', internalType: 'address' }, - { name: '_operator', type: 'address', internalType: 'address' } - ], - outputs: [{ name: 'isOperator', type: 'bool', internalType: 'bool' }], - stateMutability: 'view' - }, - { - type: 'function', - name: 'mint', - inputs: [ - { name: 'to', type: 'address', internalType: 'address' }, - { name: 'tokenId', type: 'uint256', internalType: 'uint256' }, - { name: 'amount', type: 'uint256', internalType: 'uint256' }, - { name: 'data', type: 'bytes', internalType: 'bytes' } - ], - outputs: [], - stateMutability: 'nonpayable' - }, - { - type: 'function', - name: 'name', - inputs: [], - outputs: [{ name: '', type: 'string', internalType: 'string' }], - stateMutability: 'view' - }, - { - type: 'function', - name: 'renounceRole', - inputs: [ - { name: 'role', type: 'bytes32', internalType: 'bytes32' }, - { name: 'account', type: 'address', internalType: 'address' } - ], - outputs: [], - stateMutability: 'nonpayable' - }, - { - type: 'function', - name: 'revokeRole', - inputs: [ - { name: 'role', type: 'bytes32', internalType: 'bytes32' }, - { name: 'account', type: 'address', internalType: 'address' } - ], - outputs: [], - stateMutability: 'nonpayable' - }, - { - type: 'function', - name: 'royaltyInfo', - inputs: [ - { name: 'tokenId', type: 'uint256', internalType: 'uint256' }, - { name: 'salePrice', type: 'uint256', internalType: 'uint256' } - ], - outputs: [ - { name: '', type: 'address', internalType: 'address' }, - { name: '', type: 'uint256', internalType: 'uint256' } - ], - stateMutability: 'view' - }, - { - type: 'function', - name: 'safeBatchTransferFrom', - inputs: [ - { name: '_from', type: 'address', internalType: 'address' }, - { name: '_to', type: 'address', internalType: 'address' }, - { name: '_ids', type: 'uint256[]', internalType: 'uint256[]' }, - { name: '_amounts', type: 'uint256[]', internalType: 'uint256[]' }, - { name: '_data', type: 'bytes', internalType: 'bytes' } - ], - outputs: [], - stateMutability: 'nonpayable' - }, - { - type: 'function', - name: 'safeTransferFrom', - inputs: [ - { name: '_from', type: 'address', internalType: 'address' }, - { name: '_to', type: 'address', internalType: 'address' }, - { name: '_id', type: 'uint256', internalType: 'uint256' }, - { name: '_amount', type: 'uint256', internalType: 'uint256' }, - { name: '_data', type: 'bytes', internalType: 'bytes' } - ], - outputs: [], - stateMutability: 'nonpayable' - }, - { - type: 'function', - name: 'setApprovalForAll', - inputs: [ - { name: '_operator', type: 'address', internalType: 'address' }, - { name: '_approved', type: 'bool', internalType: 'bool' } - ], - outputs: [], - stateMutability: 'nonpayable' - }, - { - type: 'function', - name: 'setBaseMetadataURI', - inputs: [{ name: 'tokenBaseURI', type: 'string', internalType: 'string' }], - outputs: [], - stateMutability: 'nonpayable' - }, - { - type: 'function', - name: 'setContractName', - inputs: [{ name: 'tokenName', type: 'string', internalType: 'string' }], - outputs: [], - stateMutability: 'nonpayable' - }, - { - type: 'function', - name: 'setContractURI', - inputs: [{ name: 'tokenContractURI', type: 'string', internalType: 'string' }], - outputs: [], - stateMutability: 'nonpayable' - }, - { - type: 'function', - name: 'setDefaultRoyalty', - inputs: [ - { name: 'receiver', type: 'address', internalType: 'address' }, - { name: 'feeNumerator', type: 'uint96', internalType: 'uint96' } - ], - outputs: [], - stateMutability: 'nonpayable' - }, - { - type: 'function', - name: 'setTokenRoyalty', - inputs: [ - { name: 'tokenId', type: 'uint256', internalType: 'uint256' }, - { name: 'receiver', type: 'address', internalType: 'address' }, - { name: 'feeNumerator', type: 'uint96', internalType: 'uint96' } - ], - outputs: [], - stateMutability: 'nonpayable' - }, - { - type: 'function', - name: 'supportsInterface', - inputs: [{ name: 'interfaceId', type: 'bytes4', internalType: 'bytes4' }], - outputs: [{ name: '', type: 'bool', internalType: 'bool' }], - stateMutability: 'view' - }, - { - type: 'function', - name: 'tokenSupply', - inputs: [{ name: '', type: 'uint256', internalType: 'uint256' }], - outputs: [{ name: '', type: 'uint256', internalType: 'uint256' }], - stateMutability: 'view' - }, - { - type: 'function', - name: 'totalSupply', - inputs: [], - outputs: [{ name: '', type: 'uint256', internalType: 'uint256' }], - stateMutability: 'view' - }, - { - type: 'function', - name: 'uri', - inputs: [{ name: '_id', type: 'uint256', internalType: 'uint256' }], - outputs: [{ name: '', type: 'string', internalType: 'string' }], - stateMutability: 'view' - }, - { - type: 'event', - name: 'ApprovalForAll', - inputs: [ - { name: '_owner', type: 'address', indexed: true, internalType: 'address' }, - { name: '_operator', type: 'address', indexed: true, internalType: 'address' }, - { name: '_approved', type: 'bool', indexed: false, internalType: 'bool' } - ], - anonymous: false - }, - { - type: 'event', - name: 'RoleAdminChanged', - inputs: [ - { name: 'role', type: 'bytes32', indexed: true, internalType: 'bytes32' }, - { name: 'previousAdminRole', type: 'bytes32', indexed: true, internalType: 'bytes32' }, - { name: 'newAdminRole', type: 'bytes32', indexed: true, internalType: 'bytes32' } - ], - anonymous: false - }, - { - type: 'event', - name: 'RoleGranted', - inputs: [ - { name: 'role', type: 'bytes32', indexed: true, internalType: 'bytes32' }, - { name: 'account', type: 'address', indexed: true, internalType: 'address' }, - { name: 'sender', type: 'address', indexed: true, internalType: 'address' } - ], - anonymous: false - }, - { - type: 'event', - name: 'RoleRevoked', - inputs: [ - { name: 'role', type: 'bytes32', indexed: true, internalType: 'bytes32' }, - { name: 'account', type: 'address', indexed: true, internalType: 'address' }, - { name: 'sender', type: 'address', indexed: true, internalType: 'address' } - ], - anonymous: false - }, - { - type: 'event', - name: 'TransferBatch', - inputs: [ - { name: '_operator', type: 'address', indexed: true, internalType: 'address' }, - { name: '_from', type: 'address', indexed: true, internalType: 'address' }, - { name: '_to', type: 'address', indexed: true, internalType: 'address' }, - { name: '_ids', type: 'uint256[]', indexed: false, internalType: 'uint256[]' }, - { name: '_amounts', type: 'uint256[]', indexed: false, internalType: 'uint256[]' } - ], - anonymous: false - }, - { - type: 'event', - name: 'TransferSingle', - inputs: [ - { name: '_operator', type: 'address', indexed: true, internalType: 'address' }, - { name: '_from', type: 'address', indexed: true, internalType: 'address' }, - { name: '_to', type: 'address', indexed: true, internalType: 'address' }, - { name: '_id', type: 'uint256', indexed: false, internalType: 'uint256' }, - { name: '_amount', type: 'uint256', indexed: false, internalType: 'uint256' } - ], - anonymous: false - }, - { - type: 'event', - name: 'URI', - inputs: [ - { name: '_uri', type: 'string', indexed: false, internalType: 'string' }, - { name: '_id', type: 'uint256', indexed: true, internalType: 'uint256' } - ], - anonymous: false - }, - { type: 'error', name: 'InvalidArrayLength', inputs: [] }, - { type: 'error', name: 'InvalidInitialization', inputs: [] } -] as const diff --git a/old/packages/abi/src/saleItems/erc721SaleItems.ts b/old/packages/abi/src/saleItems/erc721SaleItems.ts deleted file mode 100644 index 615a2cfbe..000000000 --- a/old/packages/abi/src/saleItems/erc721SaleItems.ts +++ /dev/null @@ -1,440 +0,0 @@ -export const ERC721_SALE_ITEMS_ABI = [ - { type: 'constructor', inputs: [], stateMutability: 'nonpayable' }, - { - type: 'function', - name: 'DEFAULT_ADMIN_ROLE', - inputs: [], - outputs: [{ name: '', type: 'bytes32', internalType: 'bytes32' }], - stateMutability: 'view' - }, - { - type: 'function', - name: 'approve', - inputs: [ - { name: 'to', type: 'address', internalType: 'address' }, - { name: 'tokenId', type: 'uint256', internalType: 'uint256' } - ], - outputs: [], - stateMutability: 'payable' - }, - { - type: 'function', - name: 'balanceOf', - inputs: [{ name: 'owner', type: 'address', internalType: 'address' }], - outputs: [{ name: '', type: 'uint256', internalType: 'uint256' }], - stateMutability: 'view' - }, - { - type: 'function', - name: 'batchBurn', - inputs: [{ name: 'tokenIds', type: 'uint256[]', internalType: 'uint256[]' }], - outputs: [], - stateMutability: 'nonpayable' - }, - { - type: 'function', - name: 'burn', - inputs: [{ name: 'tokenId', type: 'uint256', internalType: 'uint256' }], - outputs: [], - stateMutability: 'nonpayable' - }, - { - type: 'function', - name: 'contractURI', - inputs: [], - outputs: [{ name: '', type: 'string', internalType: 'string' }], - stateMutability: 'view' - }, - { - type: 'function', - name: 'explicitOwnershipOf', - inputs: [{ name: 'tokenId', type: 'uint256', internalType: 'uint256' }], - outputs: [ - { - name: '', - type: 'tuple', - internalType: 'struct IERC721A.TokenOwnership', - components: [ - { name: 'addr', type: 'address', internalType: 'address' }, - { name: 'startTimestamp', type: 'uint64', internalType: 'uint64' }, - { name: 'burned', type: 'bool', internalType: 'bool' }, - { name: 'extraData', type: 'uint24', internalType: 'uint24' } - ] - } - ], - stateMutability: 'view' - }, - { - type: 'function', - name: 'explicitOwnershipsOf', - inputs: [{ name: 'tokenIds', type: 'uint256[]', internalType: 'uint256[]' }], - outputs: [ - { - name: '', - type: 'tuple[]', - internalType: 'struct IERC721A.TokenOwnership[]', - components: [ - { name: 'addr', type: 'address', internalType: 'address' }, - { name: 'startTimestamp', type: 'uint64', internalType: 'uint64' }, - { name: 'burned', type: 'bool', internalType: 'bool' }, - { name: 'extraData', type: 'uint24', internalType: 'uint24' } - ] - } - ], - stateMutability: 'view' - }, - { - type: 'function', - name: 'getApproved', - inputs: [{ name: 'tokenId', type: 'uint256', internalType: 'uint256' }], - outputs: [{ name: '', type: 'address', internalType: 'address' }], - stateMutability: 'view' - }, - { - type: 'function', - name: 'getRoleAdmin', - inputs: [{ name: 'role', type: 'bytes32', internalType: 'bytes32' }], - outputs: [{ name: '', type: 'bytes32', internalType: 'bytes32' }], - stateMutability: 'view' - }, - { - type: 'function', - name: 'getRoleMember', - inputs: [ - { name: 'role', type: 'bytes32', internalType: 'bytes32' }, - { name: 'index', type: 'uint256', internalType: 'uint256' } - ], - outputs: [{ name: '', type: 'address', internalType: 'address' }], - stateMutability: 'view' - }, - { - type: 'function', - name: 'getRoleMemberCount', - inputs: [{ name: 'role', type: 'bytes32', internalType: 'bytes32' }], - outputs: [{ name: '', type: 'uint256', internalType: 'uint256' }], - stateMutability: 'view' - }, - { - type: 'function', - name: 'grantRole', - inputs: [ - { name: 'role', type: 'bytes32', internalType: 'bytes32' }, - { name: 'account', type: 'address', internalType: 'address' } - ], - outputs: [], - stateMutability: 'nonpayable' - }, - { - type: 'function', - name: 'hasRole', - inputs: [ - { name: 'role', type: 'bytes32', internalType: 'bytes32' }, - { name: 'account', type: 'address', internalType: 'address' } - ], - outputs: [{ name: '', type: 'bool', internalType: 'bool' }], - stateMutability: 'view' - }, - { - type: 'function', - name: 'initialize', - inputs: [ - { name: 'owner', type: 'address', internalType: 'address' }, - { name: 'tokenName', type: 'string', internalType: 'string' }, - { name: 'tokenSymbol', type: 'string', internalType: 'string' }, - { name: 'tokenBaseURI', type: 'string', internalType: 'string' }, - { name: 'tokenContractURI', type: 'string', internalType: 'string' }, - { name: 'royaltyReceiver', type: 'address', internalType: 'address' }, - { name: 'royaltyFeeNumerator', type: 'uint96', internalType: 'uint96' } - ], - outputs: [], - stateMutability: 'nonpayable' - }, - { - type: 'function', - name: 'isApprovedForAll', - inputs: [ - { name: 'owner', type: 'address', internalType: 'address' }, - { name: 'operator', type: 'address', internalType: 'address' } - ], - outputs: [{ name: '', type: 'bool', internalType: 'bool' }], - stateMutability: 'view' - }, - { - type: 'function', - name: 'mint', - inputs: [ - { name: 'to', type: 'address', internalType: 'address' }, - { name: 'amount', type: 'uint256', internalType: 'uint256' } - ], - outputs: [], - stateMutability: 'nonpayable' - }, - { - type: 'function', - name: 'name', - inputs: [], - outputs: [{ name: '', type: 'string', internalType: 'string' }], - stateMutability: 'view' - }, - { - type: 'function', - name: 'ownerOf', - inputs: [{ name: 'tokenId', type: 'uint256', internalType: 'uint256' }], - outputs: [{ name: '', type: 'address', internalType: 'address' }], - stateMutability: 'view' - }, - { - type: 'function', - name: 'renounceRole', - inputs: [ - { name: 'role', type: 'bytes32', internalType: 'bytes32' }, - { name: 'account', type: 'address', internalType: 'address' } - ], - outputs: [], - stateMutability: 'nonpayable' - }, - { - type: 'function', - name: 'revokeRole', - inputs: [ - { name: 'role', type: 'bytes32', internalType: 'bytes32' }, - { name: 'account', type: 'address', internalType: 'address' } - ], - outputs: [], - stateMutability: 'nonpayable' - }, - { - type: 'function', - name: 'royaltyInfo', - inputs: [ - { name: 'tokenId', type: 'uint256', internalType: 'uint256' }, - { name: 'salePrice', type: 'uint256', internalType: 'uint256' } - ], - outputs: [ - { name: '', type: 'address', internalType: 'address' }, - { name: '', type: 'uint256', internalType: 'uint256' } - ], - stateMutability: 'view' - }, - { - type: 'function', - name: 'safeTransferFrom', - inputs: [ - { name: 'from', type: 'address', internalType: 'address' }, - { name: 'to', type: 'address', internalType: 'address' }, - { name: 'tokenId', type: 'uint256', internalType: 'uint256' } - ], - outputs: [], - stateMutability: 'payable' - }, - { - type: 'function', - name: 'safeTransferFrom', - inputs: [ - { name: 'from', type: 'address', internalType: 'address' }, - { name: 'to', type: 'address', internalType: 'address' }, - { name: 'tokenId', type: 'uint256', internalType: 'uint256' }, - { name: '_data', type: 'bytes', internalType: 'bytes' } - ], - outputs: [], - stateMutability: 'payable' - }, - { - type: 'function', - name: 'setApprovalForAll', - inputs: [ - { name: 'operator', type: 'address', internalType: 'address' }, - { name: 'approved', type: 'bool', internalType: 'bool' } - ], - outputs: [], - stateMutability: 'nonpayable' - }, - { - type: 'function', - name: 'setBaseMetadataURI', - inputs: [{ name: 'tokenBaseURI', type: 'string', internalType: 'string' }], - outputs: [], - stateMutability: 'nonpayable' - }, - { - type: 'function', - name: 'setContractURI', - inputs: [{ name: 'tokenContractURI', type: 'string', internalType: 'string' }], - outputs: [], - stateMutability: 'nonpayable' - }, - { - type: 'function', - name: 'setDefaultRoyalty', - inputs: [ - { name: 'receiver', type: 'address', internalType: 'address' }, - { name: 'feeNumerator', type: 'uint96', internalType: 'uint96' } - ], - outputs: [], - stateMutability: 'nonpayable' - }, - { - type: 'function', - name: 'setNameAndSymbol', - inputs: [ - { name: 'tokenName', type: 'string', internalType: 'string' }, - { name: 'tokenSymbol', type: 'string', internalType: 'string' } - ], - outputs: [], - stateMutability: 'nonpayable' - }, - { - type: 'function', - name: 'setTokenRoyalty', - inputs: [ - { name: 'tokenId', type: 'uint256', internalType: 'uint256' }, - { name: 'receiver', type: 'address', internalType: 'address' }, - { name: 'feeNumerator', type: 'uint96', internalType: 'uint96' } - ], - outputs: [], - stateMutability: 'nonpayable' - }, - { - type: 'function', - name: 'supportsInterface', - inputs: [{ name: 'interfaceId', type: 'bytes4', internalType: 'bytes4' }], - outputs: [{ name: '', type: 'bool', internalType: 'bool' }], - stateMutability: 'view' - }, - { - type: 'function', - name: 'symbol', - inputs: [], - outputs: [{ name: '', type: 'string', internalType: 'string' }], - stateMutability: 'view' - }, - { - type: 'function', - name: 'tokenURI', - inputs: [{ name: 'tokenId', type: 'uint256', internalType: 'uint256' }], - outputs: [{ name: '', type: 'string', internalType: 'string' }], - stateMutability: 'view' - }, - { - type: 'function', - name: 'tokensOfOwner', - inputs: [{ name: 'owner', type: 'address', internalType: 'address' }], - outputs: [{ name: '', type: 'uint256[]', internalType: 'uint256[]' }], - stateMutability: 'view' - }, - { - type: 'function', - name: 'tokensOfOwnerIn', - inputs: [ - { name: 'owner', type: 'address', internalType: 'address' }, - { name: 'start', type: 'uint256', internalType: 'uint256' }, - { name: 'stop', type: 'uint256', internalType: 'uint256' } - ], - outputs: [{ name: '', type: 'uint256[]', internalType: 'uint256[]' }], - stateMutability: 'view' - }, - { - type: 'function', - name: 'totalSupply', - inputs: [], - outputs: [{ name: '', type: 'uint256', internalType: 'uint256' }], - stateMutability: 'view' - }, - { - type: 'function', - name: 'transferFrom', - inputs: [ - { name: 'from', type: 'address', internalType: 'address' }, - { name: 'to', type: 'address', internalType: 'address' }, - { name: 'tokenId', type: 'uint256', internalType: 'uint256' } - ], - outputs: [], - stateMutability: 'payable' - }, - { - type: 'event', - name: 'Approval', - inputs: [ - { name: 'owner', type: 'address', indexed: true, internalType: 'address' }, - { name: 'approved', type: 'address', indexed: true, internalType: 'address' }, - { name: 'tokenId', type: 'uint256', indexed: true, internalType: 'uint256' } - ], - anonymous: false - }, - { - type: 'event', - name: 'ApprovalForAll', - inputs: [ - { name: 'owner', type: 'address', indexed: true, internalType: 'address' }, - { name: 'operator', type: 'address', indexed: true, internalType: 'address' }, - { name: 'approved', type: 'bool', indexed: false, internalType: 'bool' } - ], - anonymous: false - }, - { - type: 'event', - name: 'ConsecutiveTransfer', - inputs: [ - { name: 'fromTokenId', type: 'uint256', indexed: true, internalType: 'uint256' }, - { name: 'toTokenId', type: 'uint256', indexed: false, internalType: 'uint256' }, - { name: 'from', type: 'address', indexed: true, internalType: 'address' }, - { name: 'to', type: 'address', indexed: true, internalType: 'address' } - ], - anonymous: false - }, - { - type: 'event', - name: 'RoleAdminChanged', - inputs: [ - { name: 'role', type: 'bytes32', indexed: true, internalType: 'bytes32' }, - { name: 'previousAdminRole', type: 'bytes32', indexed: true, internalType: 'bytes32' }, - { name: 'newAdminRole', type: 'bytes32', indexed: true, internalType: 'bytes32' } - ], - anonymous: false - }, - { - type: 'event', - name: 'RoleGranted', - inputs: [ - { name: 'role', type: 'bytes32', indexed: true, internalType: 'bytes32' }, - { name: 'account', type: 'address', indexed: true, internalType: 'address' }, - { name: 'sender', type: 'address', indexed: true, internalType: 'address' } - ], - anonymous: false - }, - { - type: 'event', - name: 'RoleRevoked', - inputs: [ - { name: 'role', type: 'bytes32', indexed: true, internalType: 'bytes32' }, - { name: 'account', type: 'address', indexed: true, internalType: 'address' }, - { name: 'sender', type: 'address', indexed: true, internalType: 'address' } - ], - anonymous: false - }, - { - type: 'event', - name: 'Transfer', - inputs: [ - { name: 'from', type: 'address', indexed: true, internalType: 'address' }, - { name: 'to', type: 'address', indexed: true, internalType: 'address' }, - { name: 'tokenId', type: 'uint256', indexed: true, internalType: 'uint256' } - ], - anonymous: false - }, - { type: 'error', name: 'ApprovalCallerNotOwnerNorApproved', inputs: [] }, - { type: 'error', name: 'ApprovalQueryForNonexistentToken', inputs: [] }, - { type: 'error', name: 'BalanceQueryForZeroAddress', inputs: [] }, - { type: 'error', name: 'InvalidInitialization', inputs: [] }, - { type: 'error', name: 'InvalidQueryRange', inputs: [] }, - { type: 'error', name: 'MintERC2309QuantityExceedsLimit', inputs: [] }, - { type: 'error', name: 'MintToZeroAddress', inputs: [] }, - { type: 'error', name: 'MintZeroQuantity', inputs: [] }, - { type: 'error', name: 'OwnerQueryForNonexistentToken', inputs: [] }, - { type: 'error', name: 'OwnershipNotInitializedForExtraData', inputs: [] }, - { type: 'error', name: 'TransferCallerNotOwnerNorApproved', inputs: [] }, - { type: 'error', name: 'TransferFromIncorrectOwner', inputs: [] }, - { type: 'error', name: 'TransferToNonERC721ReceiverImplementer', inputs: [] }, - { type: 'error', name: 'TransferToZeroAddress', inputs: [] }, - { type: 'error', name: 'URIQueryForNonexistentToken', inputs: [] } -] as const diff --git a/old/packages/abi/src/tokens/erc1155.ts b/old/packages/abi/src/tokens/erc1155.ts deleted file mode 100644 index 12cd91967..000000000 --- a/old/packages/abi/src/tokens/erc1155.ts +++ /dev/null @@ -1,422 +0,0 @@ -// @openzeppelin/contracts@5.0.0/token/ERC1155/ERC1155.sol -export const ERC1155_ABI = [ - { - inputs: [], - stateMutability: 'nonpayable', - type: 'constructor' - }, - { - inputs: [ - { - internalType: 'address', - name: 'sender', - type: 'address' - }, - { - internalType: 'uint256', - name: 'balance', - type: 'uint256' - }, - { - internalType: 'uint256', - name: 'needed', - type: 'uint256' - }, - { - internalType: 'uint256', - name: 'tokenId', - type: 'uint256' - } - ], - name: 'ERC1155InsufficientBalance', - type: 'error' - }, - { - inputs: [ - { - internalType: 'address', - name: 'approver', - type: 'address' - } - ], - name: 'ERC1155InvalidApprover', - type: 'error' - }, - { - inputs: [ - { - internalType: 'uint256', - name: 'idsLength', - type: 'uint256' - }, - { - internalType: 'uint256', - name: 'valuesLength', - type: 'uint256' - } - ], - name: 'ERC1155InvalidArrayLength', - type: 'error' - }, - { - inputs: [ - { - internalType: 'address', - name: 'operator', - type: 'address' - } - ], - name: 'ERC1155InvalidOperator', - type: 'error' - }, - { - inputs: [ - { - internalType: 'address', - name: 'receiver', - type: 'address' - } - ], - name: 'ERC1155InvalidReceiver', - type: 'error' - }, - { - inputs: [ - { - internalType: 'address', - name: 'sender', - type: 'address' - } - ], - name: 'ERC1155InvalidSender', - type: 'error' - }, - { - inputs: [ - { - internalType: 'address', - name: 'operator', - type: 'address' - }, - { - internalType: 'address', - name: 'owner', - type: 'address' - } - ], - name: 'ERC1155MissingApprovalForAll', - type: 'error' - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'address', - name: 'account', - type: 'address' - }, - { - indexed: true, - internalType: 'address', - name: 'operator', - type: 'address' - }, - { - indexed: false, - internalType: 'bool', - name: 'approved', - type: 'bool' - } - ], - name: 'ApprovalForAll', - type: 'event' - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'address', - name: 'operator', - type: 'address' - }, - { - indexed: true, - internalType: 'address', - name: 'from', - type: 'address' - }, - { - indexed: true, - internalType: 'address', - name: 'to', - type: 'address' - }, - { - indexed: false, - internalType: 'uint256[]', - name: 'ids', - type: 'uint256[]' - }, - { - indexed: false, - internalType: 'uint256[]', - name: 'values', - type: 'uint256[]' - } - ], - name: 'TransferBatch', - type: 'event' - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'address', - name: 'operator', - type: 'address' - }, - { - indexed: true, - internalType: 'address', - name: 'from', - type: 'address' - }, - { - indexed: true, - internalType: 'address', - name: 'to', - type: 'address' - }, - { - indexed: false, - internalType: 'uint256', - name: 'id', - type: 'uint256' - }, - { - indexed: false, - internalType: 'uint256', - name: 'value', - type: 'uint256' - } - ], - name: 'TransferSingle', - type: 'event' - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: 'string', - name: 'value', - type: 'string' - }, - { - indexed: true, - internalType: 'uint256', - name: 'id', - type: 'uint256' - } - ], - name: 'URI', - type: 'event' - }, - { - inputs: [ - { - internalType: 'address', - name: 'account', - type: 'address' - }, - { - internalType: 'uint256', - name: 'id', - type: 'uint256' - } - ], - name: 'balanceOf', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256' - } - ], - stateMutability: 'view', - type: 'function' - }, - { - inputs: [ - { - internalType: 'address[]', - name: 'accounts', - type: 'address[]' - }, - { - internalType: 'uint256[]', - name: 'ids', - type: 'uint256[]' - } - ], - name: 'balanceOfBatch', - outputs: [ - { - internalType: 'uint256[]', - name: '', - type: 'uint256[]' - } - ], - stateMutability: 'view', - type: 'function' - }, - { - inputs: [ - { - internalType: 'address', - name: 'account', - type: 'address' - }, - { - internalType: 'address', - name: 'operator', - type: 'address' - } - ], - name: 'isApprovedForAll', - outputs: [ - { - internalType: 'bool', - name: '', - type: 'bool' - } - ], - stateMutability: 'view', - type: 'function' - }, - { - inputs: [ - { - internalType: 'address', - name: 'from', - type: 'address' - }, - { - internalType: 'address', - name: 'to', - type: 'address' - }, - { - internalType: 'uint256[]', - name: 'ids', - type: 'uint256[]' - }, - { - internalType: 'uint256[]', - name: 'values', - type: 'uint256[]' - }, - { - internalType: 'bytes', - name: 'data', - type: 'bytes' - } - ], - name: 'safeBatchTransferFrom', - outputs: [], - stateMutability: 'nonpayable', - type: 'function' - }, - { - inputs: [ - { - internalType: 'address', - name: 'from', - type: 'address' - }, - { - internalType: 'address', - name: 'to', - type: 'address' - }, - { - internalType: 'uint256', - name: 'id', - type: 'uint256' - }, - { - internalType: 'uint256', - name: 'value', - type: 'uint256' - }, - { - internalType: 'bytes', - name: 'data', - type: 'bytes' - } - ], - name: 'safeTransferFrom', - outputs: [], - stateMutability: 'nonpayable', - type: 'function' - }, - { - inputs: [ - { - internalType: 'address', - name: 'operator', - type: 'address' - }, - { - internalType: 'bool', - name: 'approved', - type: 'bool' - } - ], - name: 'setApprovalForAll', - outputs: [], - stateMutability: 'nonpayable', - type: 'function' - }, - { - inputs: [ - { - internalType: 'bytes4', - name: 'interfaceId', - type: 'bytes4' - } - ], - name: 'supportsInterface', - outputs: [ - { - internalType: 'bool', - name: '', - type: 'bool' - } - ], - stateMutability: 'view', - type: 'function' - }, - { - inputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256' - } - ], - name: 'uri', - outputs: [ - { - internalType: 'string', - name: '', - type: 'string' - } - ], - stateMutability: 'view', - type: 'function' - } -] as const diff --git a/old/packages/abi/src/tokens/erc20.ts b/old/packages/abi/src/tokens/erc20.ts deleted file mode 100644 index 6fd527a70..000000000 --- a/old/packages/abi/src/tokens/erc20.ts +++ /dev/null @@ -1,316 +0,0 @@ -// @openzeppelin/contracts@5.0.0/token/ERC20/ERC20.sol -export const ERC20_ABI = [ - { - inputs: [], - stateMutability: 'nonpayable', - type: 'constructor' - }, - { - inputs: [ - { - internalType: 'address', - name: 'spender', - type: 'address' - }, - { - internalType: 'uint256', - name: 'allowance', - type: 'uint256' - }, - { - internalType: 'uint256', - name: 'needed', - type: 'uint256' - } - ], - name: 'ERC20InsufficientAllowance', - type: 'error' - }, - { - inputs: [ - { - internalType: 'address', - name: 'sender', - type: 'address' - }, - { - internalType: 'uint256', - name: 'balance', - type: 'uint256' - }, - { - internalType: 'uint256', - name: 'needed', - type: 'uint256' - } - ], - name: 'ERC20InsufficientBalance', - type: 'error' - }, - { - inputs: [ - { - internalType: 'address', - name: 'approver', - type: 'address' - } - ], - name: 'ERC20InvalidApprover', - type: 'error' - }, - { - inputs: [ - { - internalType: 'address', - name: 'receiver', - type: 'address' - } - ], - name: 'ERC20InvalidReceiver', - type: 'error' - }, - { - inputs: [ - { - internalType: 'address', - name: 'sender', - type: 'address' - } - ], - name: 'ERC20InvalidSender', - type: 'error' - }, - { - inputs: [ - { - internalType: 'address', - name: 'spender', - type: 'address' - } - ], - name: 'ERC20InvalidSpender', - type: 'error' - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'address', - name: 'owner', - type: 'address' - }, - { - indexed: true, - internalType: 'address', - name: 'spender', - type: 'address' - }, - { - indexed: false, - internalType: 'uint256', - name: 'value', - type: 'uint256' - } - ], - name: 'Approval', - type: 'event' - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'address', - name: 'from', - type: 'address' - }, - { - indexed: true, - internalType: 'address', - name: 'to', - type: 'address' - }, - { - indexed: false, - internalType: 'uint256', - name: 'value', - type: 'uint256' - } - ], - name: 'Transfer', - type: 'event' - }, - { - inputs: [ - { - internalType: 'address', - name: 'owner', - type: 'address' - }, - { - internalType: 'address', - name: 'spender', - type: 'address' - } - ], - name: 'allowance', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256' - } - ], - stateMutability: 'view', - type: 'function' - }, - { - inputs: [ - { - internalType: 'address', - name: 'spender', - type: 'address' - }, - { - internalType: 'uint256', - name: 'value', - type: 'uint256' - } - ], - name: 'approve', - outputs: [ - { - internalType: 'bool', - name: '', - type: 'bool' - } - ], - stateMutability: 'nonpayable', - type: 'function' - }, - { - inputs: [ - { - internalType: 'address', - name: 'account', - type: 'address' - } - ], - name: 'balanceOf', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256' - } - ], - stateMutability: 'view', - type: 'function' - }, - { - inputs: [], - name: 'decimals', - outputs: [ - { - internalType: 'uint8', - name: '', - type: 'uint8' - } - ], - stateMutability: 'view', - type: 'function' - }, - { - inputs: [], - name: 'name', - outputs: [ - { - internalType: 'string', - name: '', - type: 'string' - } - ], - stateMutability: 'view', - type: 'function' - }, - { - inputs: [], - name: 'symbol', - outputs: [ - { - internalType: 'string', - name: '', - type: 'string' - } - ], - stateMutability: 'view', - type: 'function' - }, - { - inputs: [], - name: 'totalSupply', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256' - } - ], - stateMutability: 'view', - type: 'function' - }, - { - inputs: [ - { - internalType: 'address', - name: 'to', - type: 'address' - }, - { - internalType: 'uint256', - name: 'value', - type: 'uint256' - } - ], - name: 'transfer', - outputs: [ - { - internalType: 'bool', - name: '', - type: 'bool' - } - ], - stateMutability: 'nonpayable', - type: 'function' - }, - { - inputs: [ - { - internalType: 'address', - name: 'from', - type: 'address' - }, - { - internalType: 'address', - name: 'to', - type: 'address' - }, - { - internalType: 'uint256', - name: 'value', - type: 'uint256' - } - ], - name: 'transferFrom', - outputs: [ - { - internalType: 'bool', - name: '', - type: 'bool' - } - ], - stateMutability: 'nonpayable', - type: 'function' - } -] as const diff --git a/old/packages/abi/src/tokens/erc6909.ts b/old/packages/abi/src/tokens/erc6909.ts deleted file mode 100644 index c7a34b3a4..000000000 --- a/old/packages/abi/src/tokens/erc6909.ts +++ /dev/null @@ -1,404 +0,0 @@ -// @openzeppelin/contracts@5.0.0/token/ERC6909/ERC6909.sol -export const ERC6909_ABI = [ - { - inputs: [ - { - internalType: 'address', - name: 'spender', - type: 'address' - }, - { - internalType: 'uint256', - name: 'allowance', - type: 'uint256' - }, - { - internalType: 'uint256', - name: 'needed', - type: 'uint256' - }, - { - internalType: 'uint256', - name: 'id', - type: 'uint256' - } - ], - name: 'ERC6909InsufficientAllowance', - type: 'error' - }, - { - inputs: [ - { - internalType: 'address', - name: 'sender', - type: 'address' - }, - { - internalType: 'uint256', - name: 'balance', - type: 'uint256' - }, - { - internalType: 'uint256', - name: 'needed', - type: 'uint256' - }, - { - internalType: 'uint256', - name: 'id', - type: 'uint256' - } - ], - name: 'ERC6909InsufficientBalance', - type: 'error' - }, - { - inputs: [ - { - internalType: 'address', - name: 'approver', - type: 'address' - } - ], - name: 'ERC6909InvalidApprover', - type: 'error' - }, - { - inputs: [ - { - internalType: 'address', - name: 'receiver', - type: 'address' - } - ], - name: 'ERC6909InvalidReceiver', - type: 'error' - }, - { - inputs: [ - { - internalType: 'address', - name: 'sender', - type: 'address' - } - ], - name: 'ERC6909InvalidSender', - type: 'error' - }, - { - inputs: [ - { - internalType: 'address', - name: 'spender', - type: 'address' - } - ], - name: 'ERC6909InvalidSpender', - type: 'error' - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'address', - name: 'owner', - type: 'address' - }, - { - indexed: true, - internalType: 'address', - name: 'spender', - type: 'address' - }, - { - indexed: true, - internalType: 'uint256', - name: 'id', - type: 'uint256' - }, - { - indexed: false, - internalType: 'uint256', - name: 'amount', - type: 'uint256' - } - ], - name: 'Approval', - type: 'event' - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'address', - name: 'owner', - type: 'address' - }, - { - indexed: true, - internalType: 'address', - name: 'spender', - type: 'address' - }, - { - indexed: false, - internalType: 'bool', - name: 'approved', - type: 'bool' - } - ], - name: 'OperatorSet', - type: 'event' - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: 'address', - name: 'caller', - type: 'address' - }, - { - indexed: true, - internalType: 'address', - name: 'sender', - type: 'address' - }, - { - indexed: true, - internalType: 'address', - name: 'receiver', - type: 'address' - }, - { - indexed: true, - internalType: 'uint256', - name: 'id', - type: 'uint256' - }, - { - indexed: false, - internalType: 'uint256', - name: 'amount', - type: 'uint256' - } - ], - name: 'Transfer', - type: 'event' - }, - { - inputs: [ - { - internalType: 'address', - name: 'owner', - type: 'address' - }, - { - internalType: 'address', - name: 'spender', - type: 'address' - }, - { - internalType: 'uint256', - name: 'id', - type: 'uint256' - } - ], - name: 'allowance', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256' - } - ], - stateMutability: 'view', - type: 'function' - }, - { - inputs: [ - { - internalType: 'address', - name: 'spender', - type: 'address' - }, - { - internalType: 'uint256', - name: 'id', - type: 'uint256' - }, - { - internalType: 'uint256', - name: 'amount', - type: 'uint256' - } - ], - name: 'approve', - outputs: [ - { - internalType: 'bool', - name: '', - type: 'bool' - } - ], - stateMutability: 'nonpayable', - type: 'function' - }, - { - inputs: [ - { - internalType: 'address', - name: 'owner', - type: 'address' - }, - { - internalType: 'uint256', - name: 'id', - type: 'uint256' - } - ], - name: 'balanceOf', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256' - } - ], - stateMutability: 'view', - type: 'function' - }, - { - inputs: [ - { - internalType: 'address', - name: 'owner', - type: 'address' - }, - { - internalType: 'address', - name: 'spender', - type: 'address' - } - ], - name: 'isOperator', - outputs: [ - { - internalType: 'bool', - name: '', - type: 'bool' - } - ], - stateMutability: 'view', - type: 'function' - }, - { - inputs: [ - { - internalType: 'address', - name: 'spender', - type: 'address' - }, - { - internalType: 'bool', - name: 'approved', - type: 'bool' - } - ], - name: 'setOperator', - outputs: [ - { - internalType: 'bool', - name: '', - type: 'bool' - } - ], - stateMutability: 'nonpayable', - type: 'function' - }, - { - inputs: [ - { - internalType: 'bytes4', - name: 'interfaceId', - type: 'bytes4' - } - ], - name: 'supportsInterface', - outputs: [ - { - internalType: 'bool', - name: '', - type: 'bool' - } - ], - stateMutability: 'view', - type: 'function' - }, - { - inputs: [ - { - internalType: 'address', - name: 'receiver', - type: 'address' - }, - { - internalType: 'uint256', - name: 'id', - type: 'uint256' - }, - { - internalType: 'uint256', - name: 'amount', - type: 'uint256' - } - ], - name: 'transfer', - outputs: [ - { - internalType: 'bool', - name: '', - type: 'bool' - } - ], - stateMutability: 'nonpayable', - type: 'function' - }, - { - inputs: [ - { - internalType: 'address', - name: 'sender', - type: 'address' - }, - { - internalType: 'address', - name: 'receiver', - type: 'address' - }, - { - internalType: 'uint256', - name: 'id', - type: 'uint256' - }, - { - internalType: 'uint256', - name: 'amount', - type: 'uint256' - } - ], - name: 'transferFrom', - outputs: [ - { - internalType: 'bool', - name: '', - type: 'bool' - } - ], - stateMutability: 'nonpayable', - type: 'function' - } -] as const diff --git a/old/packages/abi/src/tokens/erc721.ts b/old/packages/abi/src/tokens/erc721.ts deleted file mode 100644 index 3cbaf84a9..000000000 --- a/old/packages/abi/src/tokens/erc721.ts +++ /dev/null @@ -1,441 +0,0 @@ -// @openzeppelin/contracts@5.0.0/token/ERC721/ERC721.sol -export const ERC721_ABI = [ - { - inputs: [], - stateMutability: 'nonpayable', - type: 'constructor' - }, - { - inputs: [ - { - internalType: 'address', - name: 'sender', - type: 'address' - }, - { - internalType: 'uint256', - name: 'tokenId', - type: 'uint256' - }, - { - internalType: 'address', - name: 'owner', - type: 'address' - } - ], - name: 'ERC721IncorrectOwner', - type: 'error' - }, - { - inputs: [ - { - internalType: 'address', - name: 'operator', - type: 'address' - }, - { - internalType: 'uint256', - name: 'tokenId', - type: 'uint256' - } - ], - name: 'ERC721InsufficientApproval', - type: 'error' - }, - { - inputs: [ - { - internalType: 'address', - name: 'approver', - type: 'address' - } - ], - name: 'ERC721InvalidApprover', - type: 'error' - }, - { - inputs: [ - { - internalType: 'address', - name: 'operator', - type: 'address' - } - ], - name: 'ERC721InvalidOperator', - type: 'error' - }, - { - inputs: [ - { - internalType: 'address', - name: 'owner', - type: 'address' - } - ], - name: 'ERC721InvalidOwner', - type: 'error' - }, - { - inputs: [ - { - internalType: 'address', - name: 'receiver', - type: 'address' - } - ], - name: 'ERC721InvalidReceiver', - type: 'error' - }, - { - inputs: [ - { - internalType: 'address', - name: 'sender', - type: 'address' - } - ], - name: 'ERC721InvalidSender', - type: 'error' - }, - { - inputs: [ - { - internalType: 'uint256', - name: 'tokenId', - type: 'uint256' - } - ], - name: 'ERC721NonexistentToken', - type: 'error' - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'address', - name: 'owner', - type: 'address' - }, - { - indexed: true, - internalType: 'address', - name: 'approved', - type: 'address' - }, - { - indexed: true, - internalType: 'uint256', - name: 'tokenId', - type: 'uint256' - } - ], - name: 'Approval', - type: 'event' - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'address', - name: 'owner', - type: 'address' - }, - { - indexed: true, - internalType: 'address', - name: 'operator', - type: 'address' - }, - { - indexed: false, - internalType: 'bool', - name: 'approved', - type: 'bool' - } - ], - name: 'ApprovalForAll', - type: 'event' - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'address', - name: 'from', - type: 'address' - }, - { - indexed: true, - internalType: 'address', - name: 'to', - type: 'address' - }, - { - indexed: true, - internalType: 'uint256', - name: 'tokenId', - type: 'uint256' - } - ], - name: 'Transfer', - type: 'event' - }, - { - inputs: [ - { - internalType: 'address', - name: 'to', - type: 'address' - }, - { - internalType: 'uint256', - name: 'tokenId', - type: 'uint256' - } - ], - name: 'approve', - outputs: [], - stateMutability: 'nonpayable', - type: 'function' - }, - { - inputs: [ - { - internalType: 'address', - name: 'owner', - type: 'address' - } - ], - name: 'balanceOf', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256' - } - ], - stateMutability: 'view', - type: 'function' - }, - { - inputs: [ - { - internalType: 'uint256', - name: 'tokenId', - type: 'uint256' - } - ], - name: 'getApproved', - outputs: [ - { - internalType: 'address', - name: '', - type: 'address' - } - ], - stateMutability: 'view', - type: 'function' - }, - { - inputs: [ - { - internalType: 'address', - name: 'owner', - type: 'address' - }, - { - internalType: 'address', - name: 'operator', - type: 'address' - } - ], - name: 'isApprovedForAll', - outputs: [ - { - internalType: 'bool', - name: '', - type: 'bool' - } - ], - stateMutability: 'view', - type: 'function' - }, - { - inputs: [], - name: 'name', - outputs: [ - { - internalType: 'string', - name: '', - type: 'string' - } - ], - stateMutability: 'view', - type: 'function' - }, - { - inputs: [ - { - internalType: 'uint256', - name: 'tokenId', - type: 'uint256' - } - ], - name: 'ownerOf', - outputs: [ - { - internalType: 'address', - name: '', - type: 'address' - } - ], - stateMutability: 'view', - type: 'function' - }, - { - inputs: [ - { - internalType: 'address', - name: 'from', - type: 'address' - }, - { - internalType: 'address', - name: 'to', - type: 'address' - }, - { - internalType: 'uint256', - name: 'tokenId', - type: 'uint256' - } - ], - name: 'safeTransferFrom', - outputs: [], - stateMutability: 'nonpayable', - type: 'function' - }, - { - inputs: [ - { - internalType: 'address', - name: 'from', - type: 'address' - }, - { - internalType: 'address', - name: 'to', - type: 'address' - }, - { - internalType: 'uint256', - name: 'tokenId', - type: 'uint256' - }, - { - internalType: 'bytes', - name: 'data', - type: 'bytes' - } - ], - name: 'safeTransferFrom', - outputs: [], - stateMutability: 'nonpayable', - type: 'function' - }, - { - inputs: [ - { - internalType: 'address', - name: 'operator', - type: 'address' - }, - { - internalType: 'bool', - name: 'approved', - type: 'bool' - } - ], - name: 'setApprovalForAll', - outputs: [], - stateMutability: 'nonpayable', - type: 'function' - }, - { - inputs: [ - { - internalType: 'bytes4', - name: 'interfaceId', - type: 'bytes4' - } - ], - name: 'supportsInterface', - outputs: [ - { - internalType: 'bool', - name: '', - type: 'bool' - } - ], - stateMutability: 'view', - type: 'function' - }, - { - inputs: [], - name: 'symbol', - outputs: [ - { - internalType: 'string', - name: '', - type: 'string' - } - ], - stateMutability: 'view', - type: 'function' - }, - { - inputs: [ - { - internalType: 'uint256', - name: 'tokenId', - type: 'uint256' - } - ], - name: 'tokenURI', - outputs: [ - { - internalType: 'string', - name: '', - type: 'string' - } - ], - stateMutability: 'view', - type: 'function' - }, - { - inputs: [ - { - internalType: 'address', - name: 'from', - type: 'address' - }, - { - internalType: 'address', - name: 'to', - type: 'address' - }, - { - internalType: 'uint256', - name: 'tokenId', - type: 'uint256' - } - ], - name: 'transferFrom', - outputs: [], - stateMutability: 'nonpayable', - type: 'function' - } -] as const diff --git a/old/packages/abi/src/wallet/erc1271.ts b/old/packages/abi/src/wallet/erc1271.ts deleted file mode 100644 index f4d983543..000000000 --- a/old/packages/abi/src/wallet/erc1271.ts +++ /dev/null @@ -1,26 +0,0 @@ -export const abi = [ - { - type: 'function', - name: 'isValidSignature', - constant: true, - inputs: [ - { - type: 'bytes32' - }, - { - type: 'bytes' - } - ], - outputs: [ - { - type: 'bytes4' - } - ], - payable: false, - stateMutability: 'view' - } -] as const - -export const returns = { - isValidSignatureBytes32: '0x1626ba7e' -} diff --git a/old/packages/abi/src/wallet/erc5719.ts b/old/packages/abi/src/wallet/erc5719.ts deleted file mode 100644 index a8ddda31a..000000000 --- a/old/packages/abi/src/wallet/erc5719.ts +++ /dev/null @@ -1,19 +0,0 @@ -export const abi = [ - { - inputs: [ - { - internalType: 'bytes32', - type: 'bytes32' - } - ], - name: 'getAlternativeSignature', - outputs: [ - { - internalType: 'string', - type: 'string' - } - ], - stateMutability: 'view', - type: 'function' - } -] as const diff --git a/old/packages/abi/src/wallet/erc6492.ts b/old/packages/abi/src/wallet/erc6492.ts deleted file mode 100644 index a29b2ca61..000000000 --- a/old/packages/abi/src/wallet/erc6492.ts +++ /dev/null @@ -1,61 +0,0 @@ -export const abi = [ - { inputs: [{ internalType: 'bytes', name: 'error', type: 'bytes' }], name: 'ERC1271Revert', type: 'error' }, - { inputs: [{ internalType: 'bytes', name: 'error', type: 'bytes' }], name: 'ERC6492DeployFailed', type: 'error' }, - { - inputs: [ - { internalType: 'address', name: '_signer', type: 'address' }, - { internalType: 'bytes32', name: '_hash', type: 'bytes32' }, - { internalType: 'bytes', name: '_signature', type: 'bytes' } - ], - name: 'isValidSig', - outputs: [{ internalType: 'bool', name: '', type: 'bool' }], - stateMutability: 'nonpayable', - type: 'function' - }, - { - inputs: [ - { internalType: 'address', name: '_signer', type: 'address' }, - { internalType: 'bytes32', name: '_hash', type: 'bytes32' }, - { internalType: 'bytes', name: '_signature', type: 'bytes' }, - { internalType: 'bool', name: 'allowSideEffects', type: 'bool' }, - { internalType: 'bool', name: 'deployAlreadyDeployed', type: 'bool' } - ], - name: 'isValidSigImpl', - outputs: [{ internalType: 'bool', name: '', type: 'bool' }], - stateMutability: 'nonpayable', - type: 'function' - }, - { - inputs: [ - { internalType: 'address', name: '_signer', type: 'address' }, - { internalType: 'bytes32', name: '_hash', type: 'bytes32' }, - { internalType: 'bytes', name: '_signature', type: 'bytes' } - ], - name: 'isValidSigNoThrow', - outputs: [{ internalType: 'bool', name: '', type: 'bool' }], - stateMutability: 'nonpayable', - type: 'function' - }, - { - inputs: [ - { internalType: 'address', name: '_signer', type: 'address' }, - { internalType: 'bytes32', name: '_hash', type: 'bytes32' }, - { internalType: 'bytes', name: '_signature', type: 'bytes' } - ], - name: 'isValidSigWithSideEffects', - outputs: [{ internalType: 'bool', name: '', type: 'bool' }], - stateMutability: 'nonpayable', - type: 'function' - }, - { - inputs: [ - { internalType: 'address', name: '_signer', type: 'address' }, - { internalType: 'bytes32', name: '_hash', type: 'bytes32' }, - { internalType: 'bytes', name: '_signature', type: 'bytes' } - ], - name: 'isValidSigWithSideEffectsNoThrow', - outputs: [{ internalType: 'bool', name: '', type: 'bool' }], - stateMutability: 'nonpayable', - type: 'function' - } -] as const diff --git a/old/packages/abi/src/wallet/factory.ts b/old/packages/abi/src/wallet/factory.ts deleted file mode 100644 index 0727c3d89..000000000 --- a/old/packages/abi/src/wallet/factory.ts +++ /dev/null @@ -1,18 +0,0 @@ -export const abi = [ - { - type: 'function', - name: 'deploy', - constant: false, - inputs: [ - { - type: 'address' - }, - { - type: 'bytes32' - } - ], - outputs: [], - payable: true, - stateMutability: 'payable' - } -] as const diff --git a/old/packages/abi/src/wallet/index.ts b/old/packages/abi/src/wallet/index.ts deleted file mode 100644 index 7fd21f066..000000000 --- a/old/packages/abi/src/wallet/index.ts +++ /dev/null @@ -1,26 +0,0 @@ -import * as erc5719 from './erc5719' -import * as erc1271 from './erc1271' -import * as erc6492 from './erc6492' -import * as factory from './factory' -import * as mainModule from './mainModule' -import * as mainModuleUpgradable from './mainModuleUpgradable' -import * as moduleHooks from './moduleHooks' -import * as sequenceUtils from './sequenceUtils' -import * as requireFreshSigner from './libs/requireFreshSigners' -import * as walletProxyHook from './walletProxyHook' - -/** - * @deprecated import directly from @0xsequence/abi/* instead, omitting "walletContracts" - */ -export const walletContracts = { - erc6492, - erc5719, - erc1271, - factory, - mainModule, - mainModuleUpgradable, - moduleHooks, - sequenceUtils, - requireFreshSigner, - walletProxyHook -} diff --git a/old/packages/abi/src/wallet/libs/requireFreshSigners.ts b/old/packages/abi/src/wallet/libs/requireFreshSigners.ts deleted file mode 100644 index ba2a13341..000000000 --- a/old/packages/abi/src/wallet/libs/requireFreshSigners.ts +++ /dev/null @@ -1,15 +0,0 @@ -export const abi = [ - { - inputs: [ - { - internalType: 'address', - name: '', - type: 'address' - } - ], - name: 'requireFreshSigner', - outputs: [], - stateMutability: 'nonpayable', - type: 'function' - } -] as const diff --git a/old/packages/abi/src/wallet/mainModule.ts b/old/packages/abi/src/wallet/mainModule.ts deleted file mode 100644 index a4eeb9be5..000000000 --- a/old/packages/abi/src/wallet/mainModule.ts +++ /dev/null @@ -1,158 +0,0 @@ -export const abi = [ - { - type: 'function', - name: 'nonce', - constant: true, - inputs: [], - outputs: [ - { - type: 'uint256' - } - ], - payable: false, - stateMutability: 'view' - }, - { - type: 'function', - name: 'readNonce', - constant: true, - inputs: [ - { - type: 'uint256' - } - ], - outputs: [ - { - type: 'uint256' - } - ], - payable: false, - stateMutability: 'view' - }, - { - type: 'function', - name: 'updateImplementation', - constant: false, - inputs: [ - { - type: 'address' - } - ], - outputs: [], - payable: false, - stateMutability: 'nonpayable' - }, - { - type: 'function', - name: 'selfExecute', - constant: false, - inputs: [ - { - components: [ - { - type: 'bool', - name: 'delegateCall' - }, - { - type: 'bool', - name: 'revertOnError' - }, - { - type: 'uint256', - name: 'gasLimit' - }, - { - type: 'address', - name: 'target' - }, - { - type: 'uint256', - name: 'value' - }, - { - type: 'bytes', - name: 'data' - } - ], - type: 'tuple[]' - } - ], - outputs: [], - payable: false, - stateMutability: 'nonpayable' - }, - { - type: 'function', - name: 'execute', - constant: false, - inputs: [ - { - components: [ - { - type: 'bool', - name: 'delegateCall' - }, - { - type: 'bool', - name: 'revertOnError' - }, - { - type: 'uint256', - name: 'gasLimit' - }, - { - type: 'address', - name: 'target' - }, - { - type: 'uint256', - name: 'value' - }, - { - type: 'bytes', - name: 'data' - } - ], - type: 'tuple[]' - }, - { - type: 'uint256' - }, - { - type: 'bytes' - } - ], - outputs: [], - payable: false, - stateMutability: 'nonpayable' - }, - { - type: 'function', - name: 'createContract', - inputs: [ - { - type: 'bytes' - } - ], - payable: true, - stateMutability: 'payable' - }, - { - type: 'function', - name: 'setExtraImageHash', - constant: false, - inputs: [ - { - type: 'bytes32', - name: 'imageHash' - }, - { - type: 'uint256', - name: 'expiration' - } - ], - outputs: [], - payable: false, - stateMutability: 'nonpayable' - } -] as const diff --git a/old/packages/abi/src/wallet/mainModuleUpgradable.ts b/old/packages/abi/src/wallet/mainModuleUpgradable.ts deleted file mode 100644 index 33c4ccb87..000000000 --- a/old/packages/abi/src/wallet/mainModuleUpgradable.ts +++ /dev/null @@ -1,28 +0,0 @@ -export const abi = [ - { - type: 'function', - name: 'updateImageHash', - constant: true, - inputs: [ - { - type: 'bytes32' - } - ], - outputs: [], - payable: false, - stateMutability: 'view' - }, - { - type: 'function', - name: 'imageHash', - constant: true, - inputs: [], - outputs: [ - { - type: 'bytes32' - } - ], - payable: false, - stateMutability: 'view' - } -] as const diff --git a/old/packages/abi/src/wallet/moduleHooks.ts b/old/packages/abi/src/wallet/moduleHooks.ts deleted file mode 100644 index e35174b94..000000000 --- a/old/packages/abi/src/wallet/moduleHooks.ts +++ /dev/null @@ -1,248 +0,0 @@ -export const abi = [ - { - inputs: [ - { - internalType: 'bytes4', - name: '_signature', - type: 'bytes4' - } - ], - name: 'HookAlreadyExists', - type: 'error' - }, - { - inputs: [ - { - internalType: 'bytes4', - name: '_signature', - type: 'bytes4' - } - ], - name: 'HookDoesNotExist', - type: 'error' - }, - { - inputs: [ - { - internalType: 'address', - name: '_sender', - type: 'address' - }, - { - internalType: 'address', - name: '_self', - type: 'address' - } - ], - name: 'OnlySelfAuth', - type: 'error' - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: 'bytes4', - name: '_signature', - type: 'bytes4' - }, - { - indexed: false, - internalType: 'address', - name: '_implementation', - type: 'address' - } - ], - name: 'DefinedHook', - type: 'event' - }, - { - stateMutability: 'payable', - type: 'fallback' - }, - { - inputs: [ - { - internalType: 'bytes4', - name: '_signature', - type: 'bytes4' - }, - { - internalType: 'address', - name: '_implementation', - type: 'address' - } - ], - name: 'addHook', - outputs: [], - stateMutability: 'nonpayable', - type: 'function' - }, - { - inputs: [ - { - internalType: 'address', - name: '', - type: 'address' - }, - { - internalType: 'address', - name: '', - type: 'address' - }, - { - internalType: 'uint256[]', - name: '', - type: 'uint256[]' - }, - { - internalType: 'uint256[]', - name: '', - type: 'uint256[]' - }, - { - internalType: 'bytes', - name: '', - type: 'bytes' - } - ], - name: 'onERC1155BatchReceived', - outputs: [ - { - internalType: 'bytes4', - name: '', - type: 'bytes4' - } - ], - stateMutability: 'nonpayable', - type: 'function' - }, - { - inputs: [ - { - internalType: 'address', - name: '', - type: 'address' - }, - { - internalType: 'address', - name: '', - type: 'address' - }, - { - internalType: 'uint256', - name: '', - type: 'uint256' - }, - { - internalType: 'uint256', - name: '', - type: 'uint256' - }, - { - internalType: 'bytes', - name: '', - type: 'bytes' - } - ], - name: 'onERC1155Received', - outputs: [ - { - internalType: 'bytes4', - name: '', - type: 'bytes4' - } - ], - stateMutability: 'nonpayable', - type: 'function' - }, - { - inputs: [ - { - internalType: 'address', - name: '', - type: 'address' - }, - { - internalType: 'address', - name: '', - type: 'address' - }, - { - internalType: 'uint256', - name: '', - type: 'uint256' - }, - { - internalType: 'bytes', - name: '', - type: 'bytes' - } - ], - name: 'onERC721Received', - outputs: [ - { - internalType: 'bytes4', - name: '', - type: 'bytes4' - } - ], - stateMutability: 'nonpayable', - type: 'function' - }, - { - inputs: [ - { - internalType: 'bytes4', - name: '_signature', - type: 'bytes4' - } - ], - name: 'readHook', - outputs: [ - { - internalType: 'address', - name: '', - type: 'address' - } - ], - stateMutability: 'view', - type: 'function' - }, - { - inputs: [ - { - internalType: 'bytes4', - name: '_signature', - type: 'bytes4' - } - ], - name: 'removeHook', - outputs: [], - stateMutability: 'nonpayable', - type: 'function' - }, - { - inputs: [ - { - internalType: 'bytes4', - name: '_interfaceID', - type: 'bytes4' - } - ], - name: 'supportsInterface', - outputs: [ - { - internalType: 'bool', - name: '', - type: 'bool' - } - ], - stateMutability: 'pure', - type: 'function' - }, - { - stateMutability: 'payable', - type: 'receive' - } -] as const diff --git a/old/packages/abi/src/wallet/sequenceUtils.ts b/old/packages/abi/src/wallet/sequenceUtils.ts deleted file mode 100644 index 578977299..000000000 --- a/old/packages/abi/src/wallet/sequenceUtils.ts +++ /dev/null @@ -1,516 +0,0 @@ -export const abi = [ - { - inputs: [ - { - internalType: 'address', - name: '_factory', - type: 'address' - }, - { - internalType: 'address', - name: '_mainModule', - type: 'address' - } - ], - stateMutability: 'nonpayable', - type: 'constructor' - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'address', - name: '_wallet', - type: 'address' - }, - { - indexed: true, - internalType: 'bytes32', - name: '_imageHash', - type: 'bytes32' - }, - { - indexed: false, - internalType: 'uint256', - name: '_threshold', - type: 'uint256' - }, - { - indexed: false, - internalType: 'bytes', - name: '_signers', - type: 'bytes' - } - ], - name: 'RequiredConfig', - type: 'event' - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'address', - name: '_wallet', - type: 'address' - }, - { - indexed: true, - internalType: 'address', - name: '_signer', - type: 'address' - } - ], - name: 'RequiredSigner', - type: 'event' - }, - { - inputs: [ - { - internalType: 'address', - name: '_addr', - type: 'address' - } - ], - name: 'callBalanceOf', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256' - } - ], - stateMutability: 'view', - type: 'function' - }, - { - inputs: [], - name: 'callBlockNumber', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256' - } - ], - stateMutability: 'view', - type: 'function' - }, - { - inputs: [ - { - internalType: 'uint256', - name: '_i', - type: 'uint256' - } - ], - name: 'callBlockhash', - outputs: [ - { - internalType: 'bytes32', - name: '', - type: 'bytes32' - } - ], - stateMutability: 'view', - type: 'function' - }, - { - inputs: [], - name: 'callChainId', - outputs: [ - { - internalType: 'uint256', - name: 'id', - type: 'uint256' - } - ], - stateMutability: 'pure', - type: 'function' - }, - { - inputs: [ - { - internalType: 'address', - name: '_addr', - type: 'address' - } - ], - name: 'callCode', - outputs: [ - { - internalType: 'bytes', - name: 'code', - type: 'bytes' - } - ], - stateMutability: 'view', - type: 'function' - }, - { - inputs: [ - { - internalType: 'address', - name: '_addr', - type: 'address' - } - ], - name: 'callCodeHash', - outputs: [ - { - internalType: 'bytes32', - name: 'codeHash', - type: 'bytes32' - } - ], - stateMutability: 'view', - type: 'function' - }, - { - inputs: [ - { - internalType: 'address', - name: '_addr', - type: 'address' - } - ], - name: 'callCodeSize', - outputs: [ - { - internalType: 'uint256', - name: 'size', - type: 'uint256' - } - ], - stateMutability: 'view', - type: 'function' - }, - { - inputs: [], - name: 'callCoinbase', - outputs: [ - { - internalType: 'address', - name: '', - type: 'address' - } - ], - stateMutability: 'view', - type: 'function' - }, - { - inputs: [], - name: 'callDifficulty', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256' - } - ], - stateMutability: 'view', - type: 'function' - }, - { - inputs: [], - name: 'callGasLeft', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256' - } - ], - stateMutability: 'view', - type: 'function' - }, - { - inputs: [], - name: 'callGasLimit', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256' - } - ], - stateMutability: 'view', - type: 'function' - }, - { - inputs: [], - name: 'callGasPrice', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256' - } - ], - stateMutability: 'view', - type: 'function' - }, - { - inputs: [], - name: 'callOrigin', - outputs: [ - { - internalType: 'address', - name: '', - type: 'address' - } - ], - stateMutability: 'view', - type: 'function' - }, - { - inputs: [], - name: 'callTimestamp', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256' - } - ], - stateMutability: 'view', - type: 'function' - }, - { - inputs: [ - { - internalType: 'address', - name: '', - type: 'address' - } - ], - name: 'knownImageHashes', - outputs: [ - { - internalType: 'bytes32', - name: '', - type: 'bytes32' - } - ], - stateMutability: 'view', - type: 'function' - }, - { - inputs: [ - { - internalType: 'bytes32', - name: '', - type: 'bytes32' - } - ], - name: 'lastImageHashUpdate', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256' - } - ], - stateMutability: 'view', - type: 'function' - }, - { - inputs: [ - { - internalType: 'address', - name: '', - type: 'address' - } - ], - name: 'lastSignerUpdate', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256' - } - ], - stateMutability: 'view', - type: 'function' - }, - { - inputs: [ - { - internalType: 'address', - name: '', - type: 'address' - } - ], - name: 'lastWalletUpdate', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256' - } - ], - stateMutability: 'view', - type: 'function' - }, - { - inputs: [ - { - components: [ - { - internalType: 'bool', - name: 'delegateCall', - type: 'bool' - }, - { - internalType: 'bool', - name: 'revertOnError', - type: 'bool' - }, - { - internalType: 'uint256', - name: 'gasLimit', - type: 'uint256' - }, - { - internalType: 'address', - name: 'target', - type: 'address' - }, - { - internalType: 'uint256', - name: 'value', - type: 'uint256' - }, - { - internalType: 'bytes', - name: 'data', - type: 'bytes' - } - ], - internalType: 'struct IModuleCalls.Transaction[]', - name: '_txs', - type: 'tuple[]' - } - ], - name: 'multiCall', - outputs: [ - { - internalType: 'bool[]', - name: '_successes', - type: 'bool[]' - }, - { - internalType: 'bytes[]', - name: '_results', - type: 'bytes[]' - } - ], - stateMutability: 'payable', - type: 'function' - }, - { - inputs: [ - { - internalType: 'address', - name: '_wallet', - type: 'address' - }, - { - internalType: 'uint256', - name: '_threshold', - type: 'uint256' - }, - { - components: [ - { - internalType: 'uint256', - name: 'weight', - type: 'uint256' - }, - { - internalType: 'address', - name: 'signer', - type: 'address' - } - ], - internalType: 'struct RequireUtils.Member[]', - name: '_members', - type: 'tuple[]' - }, - { - internalType: 'bool', - name: '_index', - type: 'bool' - } - ], - name: 'publishConfig', - outputs: [], - stateMutability: 'nonpayable', - type: 'function' - }, - { - inputs: [ - { - internalType: 'address', - name: '_wallet', - type: 'address' - }, - { - internalType: 'bytes32', - name: '_hash', - type: 'bytes32' - }, - { - internalType: 'uint256', - name: '_sizeMembers', - type: 'uint256' - }, - { - internalType: 'bytes', - name: '_signature', - type: 'bytes' - }, - { - internalType: 'bool', - name: '_index', - type: 'bool' - } - ], - name: 'publishInitialSigners', - outputs: [], - stateMutability: 'nonpayable', - type: 'function' - }, - { - inputs: [ - { - internalType: 'address', - name: '_wallet', - type: 'address' - }, - { - internalType: 'uint256', - name: '_nonce', - type: 'uint256' - } - ], - name: 'requireMinNonce', - outputs: [], - stateMutability: 'view', - type: 'function' - }, - { - inputs: [ - { - internalType: 'uint256', - name: '_expiration', - type: 'uint256' - } - ], - name: 'requireNonExpired', - outputs: [], - stateMutability: 'view', - type: 'function' - } -] as const diff --git a/old/packages/abi/src/wallet/walletProxyHook.ts b/old/packages/abi/src/wallet/walletProxyHook.ts deleted file mode 100644 index d977e1f0a..000000000 --- a/old/packages/abi/src/wallet/walletProxyHook.ts +++ /dev/null @@ -1,9 +0,0 @@ -export const abi = [ - { - type: 'function', - name: 'PROXY_getImplementation', - inputs: [], - outputs: [{ name: '', type: 'address', internalType: 'address' }], - stateMutability: 'view' - } -] as const diff --git a/old/packages/account/CHANGELOG.md b/old/packages/account/CHANGELOG.md deleted file mode 100644 index 52564d000..000000000 --- a/old/packages/account/CHANGELOG.md +++ /dev/null @@ -1,2716 +0,0 @@ -# @0xsequence/account - -## 2.3.8 - -### Patch Changes - -- indexer: update clients -- Updated dependencies - - @0xsequence/abi@2.3.8 - - @0xsequence/core@2.3.8 - - @0xsequence/migration@2.3.8 - - @0xsequence/network@2.3.8 - - @0xsequence/relayer@2.3.8 - - @0xsequence/sessions@2.3.8 - - @0xsequence/utils@2.3.8 - - @0xsequence/wallet@2.3.8 - -## 2.3.7 - -### Patch Changes - -- Metadata updates -- Updated dependencies - - @0xsequence/abi@2.3.7 - - @0xsequence/core@2.3.7 - - @0xsequence/migration@2.3.7 - - @0xsequence/network@2.3.7 - - @0xsequence/relayer@2.3.7 - - @0xsequence/sessions@2.3.7 - - @0xsequence/utils@2.3.7 - - @0xsequence/wallet@2.3.7 - -## 2.3.6 - -### Patch Changes - -- New chains -- Updated dependencies - - @0xsequence/abi@2.3.6 - - @0xsequence/core@2.3.6 - - @0xsequence/migration@2.3.6 - - @0xsequence/network@2.3.6 - - @0xsequence/relayer@2.3.6 - - @0xsequence/sessions@2.3.6 - - @0xsequence/utils@2.3.6 - - @0xsequence/wallet@2.3.6 - -## 2.3.5 - -### Patch Changes - -- Add Frequency Testnet -- Updated dependencies - - @0xsequence/abi@2.3.5 - - @0xsequence/core@2.3.5 - - @0xsequence/migration@2.3.5 - - @0xsequence/network@2.3.5 - - @0xsequence/relayer@2.3.5 - - @0xsequence/sessions@2.3.5 - - @0xsequence/utils@2.3.5 - - @0xsequence/wallet@2.3.5 - -## 2.3.4 - -### Patch Changes - -- metadata: exclude deprecated methods on rpc client -- Updated dependencies - - @0xsequence/abi@2.3.4 - - @0xsequence/core@2.3.4 - - @0xsequence/migration@2.3.4 - - @0xsequence/network@2.3.4 - - @0xsequence/relayer@2.3.4 - - @0xsequence/sessions@2.3.4 - - @0xsequence/utils@2.3.4 - - @0xsequence/wallet@2.3.4 - -## 2.3.3 - -### Patch Changes - -- metadata: client update -- Updated dependencies - - @0xsequence/abi@2.3.3 - - @0xsequence/core@2.3.3 - - @0xsequence/migration@2.3.3 - - @0xsequence/network@2.3.3 - - @0xsequence/relayer@2.3.3 - - @0xsequence/sessions@2.3.3 - - @0xsequence/utils@2.3.3 - - @0xsequence/wallet@2.3.3 - -## 2.3.2 - -### Patch Changes - -- metadata: update rpc client -- Updated dependencies - - @0xsequence/abi@2.3.2 - - @0xsequence/core@2.3.2 - - @0xsequence/migration@2.3.2 - - @0xsequence/network@2.3.2 - - @0xsequence/relayer@2.3.2 - - @0xsequence/sessions@2.3.2 - - @0xsequence/utils@2.3.2 - - @0xsequence/wallet@2.3.2 - -## 2.3.1 - -### Patch Changes - -- indexer: update rpc client -- Updated dependencies - - @0xsequence/abi@2.3.1 - - @0xsequence/core@2.3.1 - - @0xsequence/migration@2.3.1 - - @0xsequence/network@2.3.1 - - @0xsequence/relayer@2.3.1 - - @0xsequence/sessions@2.3.1 - - @0xsequence/utils@2.3.1 - - @0xsequence/wallet@2.3.1 - -## 2.3.0 - -### Minor Changes - -- update metadata rpc client - -### Patch Changes - -- Updated dependencies - - @0xsequence/abi@2.3.0 - - @0xsequence/core@2.3.0 - - @0xsequence/migration@2.3.0 - - @0xsequence/network@2.3.0 - - @0xsequence/relayer@2.3.0 - - @0xsequence/sessions@2.3.0 - - @0xsequence/utils@2.3.0 - - @0xsequence/wallet@2.3.0 - -## 2.2.15 - -### Patch Changes - -- API updates -- Updated dependencies - - @0xsequence/abi@2.2.15 - - @0xsequence/core@2.2.15 - - @0xsequence/migration@2.2.15 - - @0xsequence/network@2.2.15 - - @0xsequence/relayer@2.2.15 - - @0xsequence/sessions@2.2.15 - - @0xsequence/utils@2.2.15 - - @0xsequence/wallet@2.2.15 - -## 2.2.14 - -### Patch Changes - -- Somnia Testnet and Monad Testnet -- Updated dependencies - - @0xsequence/abi@2.2.14 - - @0xsequence/core@2.2.14 - - @0xsequence/migration@2.2.14 - - @0xsequence/network@2.2.14 - - @0xsequence/relayer@2.2.14 - - @0xsequence/sessions@2.2.14 - - @0xsequence/utils@2.2.14 - - @0xsequence/wallet@2.2.14 - -## 2.2.13 - -### Patch Changes - -- Add XR1 to all networks -- Updated dependencies - - @0xsequence/abi@2.2.13 - - @0xsequence/core@2.2.13 - - @0xsequence/migration@2.2.13 - - @0xsequence/network@2.2.13 - - @0xsequence/relayer@2.2.13 - - @0xsequence/sessions@2.2.13 - - @0xsequence/utils@2.2.13 - - @0xsequence/wallet@2.2.13 - -## 2.2.12 - -### Patch Changes - -- Add XR1 -- Updated dependencies - - @0xsequence/abi@2.2.12 - - @0xsequence/core@2.2.12 - - @0xsequence/migration@2.2.12 - - @0xsequence/network@2.2.12 - - @0xsequence/relayer@2.2.12 - - @0xsequence/sessions@2.2.12 - - @0xsequence/utils@2.2.12 - - @0xsequence/wallet@2.2.12 - -## 2.2.11 - -### Patch Changes - -- Relayer updates -- Updated dependencies - - @0xsequence/abi@2.2.11 - - @0xsequence/core@2.2.11 - - @0xsequence/migration@2.2.11 - - @0xsequence/network@2.2.11 - - @0xsequence/relayer@2.2.11 - - @0xsequence/sessions@2.2.11 - - @0xsequence/utils@2.2.11 - - @0xsequence/wallet@2.2.11 - -## 2.2.10 - -### Patch Changes - -- Etherlink support -- Updated dependencies - - @0xsequence/abi@2.2.10 - - @0xsequence/core@2.2.10 - - @0xsequence/migration@2.2.10 - - @0xsequence/network@2.2.10 - - @0xsequence/relayer@2.2.10 - - @0xsequence/sessions@2.2.10 - - @0xsequence/utils@2.2.10 - - @0xsequence/wallet@2.2.10 - -## 2.2.9 - -### Patch Changes - -- Indexer gateway native token balances -- Updated dependencies - - @0xsequence/abi@2.2.9 - - @0xsequence/core@2.2.9 - - @0xsequence/migration@2.2.9 - - @0xsequence/network@2.2.9 - - @0xsequence/relayer@2.2.9 - - @0xsequence/sessions@2.2.9 - - @0xsequence/utils@2.2.9 - - @0xsequence/wallet@2.2.9 - -## 2.2.8 - -### Patch Changes - -- Add Moonbeam and Moonbase Alpha -- Updated dependencies - - @0xsequence/abi@2.2.8 - - @0xsequence/core@2.2.8 - - @0xsequence/migration@2.2.8 - - @0xsequence/network@2.2.8 - - @0xsequence/relayer@2.2.8 - - @0xsequence/sessions@2.2.8 - - @0xsequence/utils@2.2.8 - - @0xsequence/wallet@2.2.8 - -## 2.2.7 - -### Patch Changes - -- Update Builder package -- Updated dependencies - - @0xsequence/abi@2.2.7 - - @0xsequence/core@2.2.7 - - @0xsequence/migration@2.2.7 - - @0xsequence/network@2.2.7 - - @0xsequence/relayer@2.2.7 - - @0xsequence/sessions@2.2.7 - - @0xsequence/utils@2.2.7 - - @0xsequence/wallet@2.2.7 - -## 2.2.6 - -### Patch Changes - -- Update relayer package -- Updated dependencies - - @0xsequence/abi@2.2.6 - - @0xsequence/core@2.2.6 - - @0xsequence/migration@2.2.6 - - @0xsequence/network@2.2.6 - - @0xsequence/relayer@2.2.6 - - @0xsequence/sessions@2.2.6 - - @0xsequence/utils@2.2.6 - - @0xsequence/wallet@2.2.6 - -## 2.2.5 - -### Patch Changes - -- auth: fix sequence indexer gateway url -- account: immutable wallet proxy hook -- Updated dependencies -- Updated dependencies - - @0xsequence/abi@2.2.5 - - @0xsequence/core@2.2.5 - - @0xsequence/migration@2.2.5 - - @0xsequence/network@2.2.5 - - @0xsequence/relayer@2.2.5 - - @0xsequence/sessions@2.2.5 - - @0xsequence/utils@2.2.5 - - @0xsequence/wallet@2.2.5 - -## 2.2.4 - -### Patch Changes - -- network: update soneium mainnet block explorer url -- waas: signTypedData intent support -- Updated dependencies -- Updated dependencies - - @0xsequence/abi@2.2.4 - - @0xsequence/core@2.2.4 - - @0xsequence/migration@2.2.4 - - @0xsequence/network@2.2.4 - - @0xsequence/relayer@2.2.4 - - @0xsequence/sessions@2.2.4 - - @0xsequence/utils@2.2.4 - - @0xsequence/wallet@2.2.4 - -## 2.2.3 - -### Patch Changes - -- provider: updating initWallet to use connected network configs if they exist -- Updated dependencies - - @0xsequence/abi@2.2.3 - - @0xsequence/core@2.2.3 - - @0xsequence/migration@2.2.3 - - @0xsequence/network@2.2.3 - - @0xsequence/relayer@2.2.3 - - @0xsequence/sessions@2.2.3 - - @0xsequence/utils@2.2.3 - - @0xsequence/wallet@2.2.3 - -## 2.2.2 - -### Patch Changes - -- pass projectAccessKey to relayer at all times -- Updated dependencies - - @0xsequence/abi@2.2.2 - - @0xsequence/core@2.2.2 - - @0xsequence/migration@2.2.2 - - @0xsequence/network@2.2.2 - - @0xsequence/relayer@2.2.2 - - @0xsequence/sessions@2.2.2 - - @0xsequence/utils@2.2.2 - - @0xsequence/wallet@2.2.2 - -## 2.2.1 - -### Patch Changes - -- waas-ethers: sign typed data -- Updated dependencies - - @0xsequence/abi@2.2.1 - - @0xsequence/core@2.2.1 - - @0xsequence/migration@2.2.1 - - @0xsequence/network@2.2.1 - - @0xsequence/relayer@2.2.1 - - @0xsequence/sessions@2.2.1 - - @0xsequence/utils@2.2.1 - - @0xsequence/wallet@2.2.1 - -## 2.2.0 - -### Minor Changes - -- indexer: gateway client -- @0xsequence/builder -- upgrade puppeteer to v23.10.3 - -### Patch Changes - -- Updated dependencies -- Updated dependencies -- Updated dependencies - - @0xsequence/abi@2.2.0 - - @0xsequence/core@2.2.0 - - @0xsequence/migration@2.2.0 - - @0xsequence/network@2.2.0 - - @0xsequence/relayer@2.2.0 - - @0xsequence/sessions@2.2.0 - - @0xsequence/utils@2.2.0 - - @0xsequence/wallet@2.2.0 - -## 2.1.8 - -### Patch Changes - -- Add Soneium Mainnet -- Updated dependencies - - @0xsequence/abi@2.1.8 - - @0xsequence/core@2.1.8 - - @0xsequence/migration@2.1.8 - - @0xsequence/network@2.1.8 - - @0xsequence/relayer@2.1.8 - - @0xsequence/sessions@2.1.8 - - @0xsequence/utils@2.1.8 - - @0xsequence/wallet@2.1.8 - -## 2.1.7 - -### Patch Changes - -- guard: pass project access key to guard requests -- Updated dependencies - - @0xsequence/abi@2.1.7 - - @0xsequence/core@2.1.7 - - @0xsequence/migration@2.1.7 - - @0xsequence/network@2.1.7 - - @0xsequence/relayer@2.1.7 - - @0xsequence/sessions@2.1.7 - - @0xsequence/utils@2.1.7 - - @0xsequence/wallet@2.1.7 - -## 2.1.6 - -### Patch Changes - -- Add LAOS and Telos Testnet chains -- Updated dependencies - - @0xsequence/abi@2.1.6 - - @0xsequence/core@2.1.6 - - @0xsequence/migration@2.1.6 - - @0xsequence/network@2.1.6 - - @0xsequence/relayer@2.1.6 - - @0xsequence/sessions@2.1.6 - - @0xsequence/utils@2.1.6 - - @0xsequence/wallet@2.1.6 - -## 2.1.5 - -### Patch Changes - -- account: save presigned configuration with reference chain id 1 -- Updated dependencies - - @0xsequence/abi@2.1.5 - - @0xsequence/core@2.1.5 - - @0xsequence/migration@2.1.5 - - @0xsequence/network@2.1.5 - - @0xsequence/relayer@2.1.5 - - @0xsequence/sessions@2.1.5 - - @0xsequence/utils@2.1.5 - - @0xsequence/wallet@2.1.5 - -## 2.1.4 - -### Patch Changes - -- provider: pass projectAccessKey into MuxMessageProvider -- Updated dependencies - - @0xsequence/abi@2.1.4 - - @0xsequence/core@2.1.4 - - @0xsequence/migration@2.1.4 - - @0xsequence/network@2.1.4 - - @0xsequence/relayer@2.1.4 - - @0xsequence/sessions@2.1.4 - - @0xsequence/utils@2.1.4 - - @0xsequence/wallet@2.1.4 - -## 2.1.3 - -### Patch Changes - -- waas: time drift date fix due to strange browser quirk -- Updated dependencies - - @0xsequence/abi@2.1.3 - - @0xsequence/core@2.1.3 - - @0xsequence/migration@2.1.3 - - @0xsequence/network@2.1.3 - - @0xsequence/relayer@2.1.3 - - @0xsequence/sessions@2.1.3 - - @0xsequence/utils@2.1.3 - - @0xsequence/wallet@2.1.3 - -## 2.1.2 - -### Patch Changes - -- provider: export analytics correctly -- Updated dependencies - - @0xsequence/abi@2.1.2 - - @0xsequence/core@2.1.2 - - @0xsequence/migration@2.1.2 - - @0xsequence/network@2.1.2 - - @0xsequence/relayer@2.1.2 - - @0xsequence/sessions@2.1.2 - - @0xsequence/utils@2.1.2 - - @0xsequence/wallet@2.1.2 - -## 2.1.1 - -### Patch Changes - -- Add LAOS chain support -- Updated dependencies - - @0xsequence/abi@2.1.1 - - @0xsequence/core@2.1.1 - - @0xsequence/migration@2.1.1 - - @0xsequence/network@2.1.1 - - @0xsequence/relayer@2.1.1 - - @0xsequence/sessions@2.1.1 - - @0xsequence/utils@2.1.1 - - @0xsequence/wallet@2.1.1 - -## 2.1.0 - -### Minor Changes - -- account: forward project access key when estimating fees and sending transactions - -### Patch Changes - -- sessions: save signatures with reference chain id -- Updated dependencies -- Updated dependencies - - @0xsequence/abi@2.1.0 - - @0xsequence/core@2.1.0 - - @0xsequence/migration@2.1.0 - - @0xsequence/network@2.1.0 - - @0xsequence/relayer@2.1.0 - - @0xsequence/sessions@2.1.0 - - @0xsequence/utils@2.1.0 - - @0xsequence/wallet@2.1.0 - -## 2.0.26 - -### Patch Changes - -- account: fix chain id comparison -- Updated dependencies - - @0xsequence/abi@2.0.26 - - @0xsequence/core@2.0.26 - - @0xsequence/migration@2.0.26 - - @0xsequence/network@2.0.26 - - @0xsequence/relayer@2.0.26 - - @0xsequence/sessions@2.0.26 - - @0xsequence/utils@2.0.26 - - @0xsequence/wallet@2.0.26 - -## 2.0.25 - -### Patch Changes - -- skale-nebula: deploy gas limit = 10m -- Updated dependencies - - @0xsequence/abi@2.0.25 - - @0xsequence/core@2.0.25 - - @0xsequence/migration@2.0.25 - - @0xsequence/network@2.0.25 - - @0xsequence/relayer@2.0.25 - - @0xsequence/sessions@2.0.25 - - @0xsequence/utils@2.0.25 - - @0xsequence/wallet@2.0.25 - -## 2.0.24 - -### Patch Changes - -- sessions: arweave: configurable gateway url -- waas: use /status to get time drift before sending any intents -- Updated dependencies -- Updated dependencies - - @0xsequence/abi@2.0.24 - - @0xsequence/core@2.0.24 - - @0xsequence/migration@2.0.24 - - @0xsequence/network@2.0.24 - - @0xsequence/relayer@2.0.24 - - @0xsequence/sessions@2.0.24 - - @0xsequence/utils@2.0.24 - - @0xsequence/wallet@2.0.24 - -## 2.0.23 - -### Patch Changes - -- Add The Root Network support -- Updated dependencies - - @0xsequence/abi@2.0.23 - - @0xsequence/core@2.0.23 - - @0xsequence/migration@2.0.23 - - @0xsequence/network@2.0.23 - - @0xsequence/relayer@2.0.23 - - @0xsequence/sessions@2.0.23 - - @0xsequence/utils@2.0.23 - - @0xsequence/wallet@2.0.23 - -## 2.0.22 - -### Patch Changes - -- Add SKALE Nebula Mainnet support -- Updated dependencies - - @0xsequence/abi@2.0.22 - - @0xsequence/core@2.0.22 - - @0xsequence/migration@2.0.22 - - @0xsequence/network@2.0.22 - - @0xsequence/relayer@2.0.22 - - @0xsequence/sessions@2.0.22 - - @0xsequence/utils@2.0.22 - - @0xsequence/wallet@2.0.22 - -## 2.0.21 - -### Patch Changes - -- account: add publishWitnessFor -- Updated dependencies - - @0xsequence/abi@2.0.21 - - @0xsequence/core@2.0.21 - - @0xsequence/migration@2.0.21 - - @0xsequence/network@2.0.21 - - @0xsequence/relayer@2.0.21 - - @0xsequence/sessions@2.0.21 - - @0xsequence/utils@2.0.21 - - @0xsequence/wallet@2.0.21 - -## 2.0.20 - -### Patch Changes - -- upgrade deps, and improve waas session status handling -- Updated dependencies - - @0xsequence/abi@2.0.20 - - @0xsequence/core@2.0.20 - - @0xsequence/migration@2.0.20 - - @0xsequence/network@2.0.20 - - @0xsequence/relayer@2.0.20 - - @0xsequence/sessions@2.0.20 - - @0xsequence/utils@2.0.20 - - @0xsequence/wallet@2.0.20 - -## 2.0.19 - -### Patch Changes - -- Add Immutable zkEVM support -- Updated dependencies - - @0xsequence/abi@2.0.19 - - @0xsequence/core@2.0.19 - - @0xsequence/migration@2.0.19 - - @0xsequence/network@2.0.19 - - @0xsequence/relayer@2.0.19 - - @0xsequence/sessions@2.0.19 - - @0xsequence/utils@2.0.19 - - @0xsequence/wallet@2.0.19 - -## 2.0.18 - -### Patch Changes - -- waas: new contractCall transaction type -- sessions: add arweave owner -- Updated dependencies -- Updated dependencies - - @0xsequence/abi@2.0.18 - - @0xsequence/core@2.0.18 - - @0xsequence/migration@2.0.18 - - @0xsequence/network@2.0.18 - - @0xsequence/relayer@2.0.18 - - @0xsequence/sessions@2.0.18 - - @0xsequence/utils@2.0.18 - - @0xsequence/wallet@2.0.18 - -## 2.0.17 - -### Patch Changes - -- update waas auth to clear session before signIn -- Updated dependencies - - @0xsequence/abi@2.0.17 - - @0xsequence/core@2.0.17 - - @0xsequence/migration@2.0.17 - - @0xsequence/network@2.0.17 - - @0xsequence/relayer@2.0.17 - - @0xsequence/sessions@2.0.17 - - @0xsequence/utils@2.0.17 - - @0xsequence/wallet@2.0.17 - -## 2.0.16 - -### Patch Changes - -- Removed Astar chains -- Updated dependencies - - @0xsequence/abi@2.0.16 - - @0xsequence/core@2.0.16 - - @0xsequence/migration@2.0.16 - - @0xsequence/network@2.0.16 - - @0xsequence/relayer@2.0.16 - - @0xsequence/sessions@2.0.16 - - @0xsequence/utils@2.0.16 - - @0xsequence/wallet@2.0.16 - -## 2.0.15 - -### Patch Changes - -- indexer: update bindings with token balance additions -- Updated dependencies - - @0xsequence/abi@2.0.15 - - @0xsequence/core@2.0.15 - - @0xsequence/migration@2.0.15 - - @0xsequence/network@2.0.15 - - @0xsequence/relayer@2.0.15 - - @0xsequence/sessions@2.0.15 - - @0xsequence/utils@2.0.15 - - @0xsequence/wallet@2.0.15 - -## 2.0.14 - -### Patch Changes - -- sessions: arweave config reader -- network: add b3 and apechain mainnet configs -- Updated dependencies -- Updated dependencies - - @0xsequence/abi@2.0.14 - - @0xsequence/core@2.0.14 - - @0xsequence/migration@2.0.14 - - @0xsequence/network@2.0.14 - - @0xsequence/relayer@2.0.14 - - @0xsequence/sessions@2.0.14 - - @0xsequence/utils@2.0.14 - - @0xsequence/wallet@2.0.14 - -## 2.0.13 - -### Patch Changes - -- network: toy-testnet -- Updated dependencies - - @0xsequence/abi@2.0.13 - - @0xsequence/core@2.0.13 - - @0xsequence/migration@2.0.13 - - @0xsequence/network@2.0.13 - - @0xsequence/relayer@2.0.13 - - @0xsequence/sessions@2.0.13 - - @0xsequence/utils@2.0.13 - - @0xsequence/wallet@2.0.13 - -## 2.0.12 - -### Patch Changes - -- api: update bindings -- Updated dependencies - - @0xsequence/abi@2.0.12 - - @0xsequence/core@2.0.12 - - @0xsequence/migration@2.0.12 - - @0xsequence/network@2.0.12 - - @0xsequence/relayer@2.0.12 - - @0xsequence/sessions@2.0.12 - - @0xsequence/utils@2.0.12 - - @0xsequence/wallet@2.0.12 - -## 2.0.11 - -### Patch Changes - -- waas: intents test fix -- api: update bindings -- Updated dependencies -- Updated dependencies - - @0xsequence/abi@2.0.11 - - @0xsequence/core@2.0.11 - - @0xsequence/migration@2.0.11 - - @0xsequence/network@2.0.11 - - @0xsequence/relayer@2.0.11 - - @0xsequence/sessions@2.0.11 - - @0xsequence/utils@2.0.11 - - @0xsequence/wallet@2.0.11 - -## 2.0.10 - -### Patch Changes - -- network: soneium minato testnet -- Updated dependencies - - @0xsequence/abi@2.0.10 - - @0xsequence/core@2.0.10 - - @0xsequence/migration@2.0.10 - - @0xsequence/network@2.0.10 - - @0xsequence/relayer@2.0.10 - - @0xsequence/sessions@2.0.10 - - @0xsequence/utils@2.0.10 - - @0xsequence/wallet@2.0.10 - -## 2.0.9 - -### Patch Changes - -- network: fix SKALE network name -- Updated dependencies - - @0xsequence/abi@2.0.9 - - @0xsequence/core@2.0.9 - - @0xsequence/migration@2.0.9 - - @0xsequence/network@2.0.9 - - @0xsequence/relayer@2.0.9 - - @0xsequence/sessions@2.0.9 - - @0xsequence/utils@2.0.9 - - @0xsequence/wallet@2.0.9 - -## 2.0.8 - -### Patch Changes - -- metadata: update bindings -- Updated dependencies - - @0xsequence/abi@2.0.8 - - @0xsequence/core@2.0.8 - - @0xsequence/migration@2.0.8 - - @0xsequence/network@2.0.8 - - @0xsequence/relayer@2.0.8 - - @0xsequence/sessions@2.0.8 - - @0xsequence/utils@2.0.8 - - @0xsequence/wallet@2.0.8 - -## 2.0.7 - -### Patch Changes - -- wallet request handler fix -- Updated dependencies - - @0xsequence/abi@2.0.7 - - @0xsequence/core@2.0.7 - - @0xsequence/migration@2.0.7 - - @0xsequence/network@2.0.7 - - @0xsequence/relayer@2.0.7 - - @0xsequence/sessions@2.0.7 - - @0xsequence/utils@2.0.7 - - @0xsequence/wallet@2.0.7 - -## 2.0.6 - -### Patch Changes - -- network: matic -> pol -- Updated dependencies - - @0xsequence/abi@2.0.6 - - @0xsequence/core@2.0.6 - - @0xsequence/migration@2.0.6 - - @0xsequence/network@2.0.6 - - @0xsequence/relayer@2.0.6 - - @0xsequence/sessions@2.0.6 - - @0xsequence/utils@2.0.6 - - @0xsequence/wallet@2.0.6 - -## 2.0.5 - -### Patch Changes - -- provider: update databeat to 0.9.2 -- Updated dependencies - - @0xsequence/abi@2.0.5 - - @0xsequence/core@2.0.5 - - @0xsequence/migration@2.0.5 - - @0xsequence/network@2.0.5 - - @0xsequence/relayer@2.0.5 - - @0xsequence/sessions@2.0.5 - - @0xsequence/utils@2.0.5 - - @0xsequence/wallet@2.0.5 - -## 2.0.4 - -### Patch Changes - -- network: add skale-nebula-testnet -- Updated dependencies - - @0xsequence/abi@2.0.4 - - @0xsequence/core@2.0.4 - - @0xsequence/migration@2.0.4 - - @0xsequence/network@2.0.4 - - @0xsequence/relayer@2.0.4 - - @0xsequence/sessions@2.0.4 - - @0xsequence/utils@2.0.4 - - @0xsequence/wallet@2.0.4 - -## 2.0.3 - -### Patch Changes - -- waas: check session status in SequenceWaaS.isSignedIn() -- Updated dependencies - - @0xsequence/abi@2.0.3 - - @0xsequence/core@2.0.3 - - @0xsequence/migration@2.0.3 - - @0xsequence/network@2.0.3 - - @0xsequence/relayer@2.0.3 - - @0xsequence/sessions@2.0.3 - - @0xsequence/utils@2.0.3 - - @0xsequence/wallet@2.0.3 - -## 2.0.2 - -### Patch Changes - -- sessions: property convert serialized bignumber hex value to bigint -- Updated dependencies - - @0xsequence/abi@2.0.2 - - @0xsequence/core@2.0.2 - - @0xsequence/migration@2.0.2 - - @0xsequence/network@2.0.2 - - @0xsequence/relayer@2.0.2 - - @0xsequence/sessions@2.0.2 - - @0xsequence/utils@2.0.2 - - @0xsequence/wallet@2.0.2 - -## 2.0.1 - -### Patch Changes - -- waas: http signature check for authenticator requests -- provider: unwrap legacy json rpc responses -- use json replacer and reviver for bigints -- Updated dependencies -- Updated dependencies -- Updated dependencies - - @0xsequence/abi@2.0.1 - - @0xsequence/core@2.0.1 - - @0xsequence/migration@2.0.1 - - @0xsequence/network@2.0.1 - - @0xsequence/relayer@2.0.1 - - @0xsequence/sessions@2.0.1 - - @0xsequence/utils@2.0.1 - - @0xsequence/wallet@2.0.1 - -## 2.0.0 - -### Major Changes - -- ethers v6 - -### Patch Changes - -- Updated dependencies - - @0xsequence/abi@2.0.0 - - @0xsequence/core@2.0.0 - - @0xsequence/migration@2.0.0 - - @0xsequence/network@2.0.0 - - @0xsequence/relayer@2.0.0 - - @0xsequence/sessions@2.0.0 - - @0xsequence/utils@2.0.0 - - @0xsequence/wallet@2.0.0 - -## 1.10.15 - -### Patch Changes - -- utils: extractProjectIdFromAccessKey -- Updated dependencies - - @0xsequence/abi@1.10.15 - - @0xsequence/core@1.10.15 - - @0xsequence/migration@1.10.15 - - @0xsequence/network@1.10.15 - - @0xsequence/relayer@1.10.15 - - @0xsequence/sessions@1.10.15 - - @0xsequence/utils@1.10.15 - - @0xsequence/wallet@1.10.15 - -## 1.10.14 - -### Patch Changes - -- network: add borne-testnet to allNetworks -- Updated dependencies - - @0xsequence/abi@1.10.14 - - @0xsequence/core@1.10.14 - - @0xsequence/migration@1.10.14 - - @0xsequence/network@1.10.14 - - @0xsequence/relayer@1.10.14 - - @0xsequence/sessions@1.10.14 - - @0xsequence/utils@1.10.14 - - @0xsequence/wallet@1.10.14 - -## 1.10.13 - -### Patch Changes - -- network: add borne testnet -- Updated dependencies - - @0xsequence/abi@1.10.13 - - @0xsequence/core@1.10.13 - - @0xsequence/migration@1.10.13 - - @0xsequence/network@1.10.13 - - @0xsequence/relayer@1.10.13 - - @0xsequence/sessions@1.10.13 - - @0xsequence/utils@1.10.13 - - @0xsequence/wallet@1.10.13 - -## 1.10.12 - -### Patch Changes - -- api: update bindings -- global/window -> globalThis -- Updated dependencies -- Updated dependencies - - @0xsequence/abi@1.10.12 - - @0xsequence/core@1.10.12 - - @0xsequence/migration@1.10.12 - - @0xsequence/network@1.10.12 - - @0xsequence/relayer@1.10.12 - - @0xsequence/sessions@1.10.12 - - @0xsequence/utils@1.10.12 - - @0xsequence/wallet@1.10.12 - -## 1.10.11 - -### Patch Changes - -- waas: updated intent.gen without webrpc types, errors exported from authenticator.gen -- Updated dependencies - - @0xsequence/abi@1.10.11 - - @0xsequence/core@1.10.11 - - @0xsequence/migration@1.10.11 - - @0xsequence/network@1.10.11 - - @0xsequence/relayer@1.10.11 - - @0xsequence/sessions@1.10.11 - - @0xsequence/utils@1.10.11 - - @0xsequence/wallet@1.10.11 - -## 1.10.10 - -### Patch Changes - -- metadata: update bindings with new contract collections api -- Updated dependencies - - @0xsequence/abi@1.10.10 - - @0xsequence/core@1.10.10 - - @0xsequence/migration@1.10.10 - - @0xsequence/network@1.10.10 - - @0xsequence/relayer@1.10.10 - - @0xsequence/sessions@1.10.10 - - @0xsequence/utils@1.10.10 - - @0xsequence/wallet@1.10.10 - -## 1.10.9 - -### Patch Changes - -- waas minor update -- Updated dependencies - - @0xsequence/abi@1.10.9 - - @0xsequence/core@1.10.9 - - @0xsequence/migration@1.10.9 - - @0xsequence/network@1.10.9 - - @0xsequence/relayer@1.10.9 - - @0xsequence/sessions@1.10.9 - - @0xsequence/utils@1.10.9 - - @0xsequence/wallet@1.10.9 - -## 1.10.8 - -### Patch Changes - -- update metadata bindings -- Updated dependencies - - @0xsequence/abi@1.10.8 - - @0xsequence/core@1.10.8 - - @0xsequence/migration@1.10.8 - - @0xsequence/network@1.10.8 - - @0xsequence/relayer@1.10.8 - - @0xsequence/sessions@1.10.8 - - @0xsequence/utils@1.10.8 - - @0xsequence/wallet@1.10.8 - -## 1.10.7 - -### Patch Changes - -- minor fixes to waas client -- Updated dependencies - - @0xsequence/abi@1.10.7 - - @0xsequence/core@1.10.7 - - @0xsequence/migration@1.10.7 - - @0xsequence/network@1.10.7 - - @0xsequence/relayer@1.10.7 - - @0xsequence/sessions@1.10.7 - - @0xsequence/utils@1.10.7 - - @0xsequence/wallet@1.10.7 - -## 1.10.6 - -### Patch Changes - -- metadata: update bindings -- Updated dependencies - - @0xsequence/abi@1.10.6 - - @0xsequence/core@1.10.6 - - @0xsequence/migration@1.10.6 - - @0xsequence/network@1.10.6 - - @0xsequence/relayer@1.10.6 - - @0xsequence/sessions@1.10.6 - - @0xsequence/utils@1.10.6 - - @0xsequence/wallet@1.10.6 - -## 1.10.5 - -### Patch Changes - -- network: ape-chain-testnet -> apechain-testnet -- Updated dependencies - - @0xsequence/abi@1.10.5 - - @0xsequence/core@1.10.5 - - @0xsequence/migration@1.10.5 - - @0xsequence/network@1.10.5 - - @0xsequence/relayer@1.10.5 - - @0xsequence/sessions@1.10.5 - - @0xsequence/utils@1.10.5 - - @0xsequence/wallet@1.10.5 - -## 1.10.4 - -### Patch Changes - -- network: add b3-sepolia, ape-chain-testnet, blast, blast-sepolia -- Updated dependencies - - @0xsequence/abi@1.10.4 - - @0xsequence/core@1.10.4 - - @0xsequence/migration@1.10.4 - - @0xsequence/network@1.10.4 - - @0xsequence/relayer@1.10.4 - - @0xsequence/sessions@1.10.4 - - @0xsequence/utils@1.10.4 - - @0xsequence/wallet@1.10.4 - -## 1.10.3 - -### Patch Changes - -- typing fix -- Updated dependencies - - @0xsequence/abi@1.10.3 - - @0xsequence/core@1.10.3 - - @0xsequence/migration@1.10.3 - - @0xsequence/network@1.10.3 - - @0xsequence/relayer@1.10.3 - - @0xsequence/sessions@1.10.3 - - @0xsequence/utils@1.10.3 - - @0xsequence/wallet@1.10.3 - -## 1.10.2 - -### Patch Changes - -- - waas: add getIdToken method - - indexer: update api client -- Updated dependencies - - @0xsequence/abi@1.10.2 - - @0xsequence/core@1.10.2 - - @0xsequence/migration@1.10.2 - - @0xsequence/network@1.10.2 - - @0xsequence/relayer@1.10.2 - - @0xsequence/sessions@1.10.2 - - @0xsequence/utils@1.10.2 - - @0xsequence/wallet@1.10.2 - -## 1.10.1 - -### Patch Changes - -- metadata: update bindings -- Updated dependencies - - @0xsequence/abi@1.10.1 - - @0xsequence/core@1.10.1 - - @0xsequence/migration@1.10.1 - - @0xsequence/network@1.10.1 - - @0xsequence/relayer@1.10.1 - - @0xsequence/sessions@1.10.1 - - @0xsequence/utils@1.10.1 - - @0xsequence/wallet@1.10.1 - -## 1.10.0 - -### Minor Changes - -- waas release v1.3.0 - -### Patch Changes - -- Updated dependencies - - @0xsequence/abi@1.10.0 - - @0xsequence/core@1.10.0 - - @0xsequence/migration@1.10.0 - - @0xsequence/network@1.10.0 - - @0xsequence/relayer@1.10.0 - - @0xsequence/sessions@1.10.0 - - @0xsequence/utils@1.10.0 - - @0xsequence/wallet@1.10.0 - -## 1.9.37 - -### Patch Changes - -- network: adds nativeToken data to NetworkMetadata constants -- Updated dependencies - - @0xsequence/abi@1.9.37 - - @0xsequence/core@1.9.37 - - @0xsequence/migration@1.9.37 - - @0xsequence/network@1.9.37 - - @0xsequence/relayer@1.9.37 - - @0xsequence/sessions@1.9.37 - - @0xsequence/utils@1.9.37 - - @0xsequence/wallet@1.9.37 - -## 1.9.36 - -### Patch Changes - -- guard: export client -- Updated dependencies - - @0xsequence/abi@1.9.36 - - @0xsequence/core@1.9.36 - - @0xsequence/migration@1.9.36 - - @0xsequence/network@1.9.36 - - @0xsequence/relayer@1.9.36 - - @0xsequence/sessions@1.9.36 - - @0xsequence/utils@1.9.36 - - @0xsequence/wallet@1.9.36 - -## 1.9.35 - -### Patch Changes - -- guard: update bindings -- Updated dependencies - - @0xsequence/abi@1.9.35 - - @0xsequence/core@1.9.35 - - @0xsequence/migration@1.9.35 - - @0xsequence/network@1.9.35 - - @0xsequence/relayer@1.9.35 - - @0xsequence/sessions@1.9.35 - - @0xsequence/utils@1.9.35 - - @0xsequence/wallet@1.9.35 - -## 1.9.34 - -### Patch Changes - -- waas: always use lowercase email -- Updated dependencies - - @0xsequence/abi@1.9.34 - - @0xsequence/core@1.9.34 - - @0xsequence/migration@1.9.34 - - @0xsequence/network@1.9.34 - - @0xsequence/relayer@1.9.34 - - @0xsequence/sessions@1.9.34 - - @0xsequence/utils@1.9.34 - - @0xsequence/wallet@1.9.34 - -## 1.9.33 - -### Patch Changes - -- waas: umd build -- Updated dependencies - - @0xsequence/abi@1.9.33 - - @0xsequence/core@1.9.33 - - @0xsequence/migration@1.9.33 - - @0xsequence/network@1.9.33 - - @0xsequence/relayer@1.9.33 - - @0xsequence/sessions@1.9.33 - - @0xsequence/utils@1.9.33 - - @0xsequence/wallet@1.9.33 - -## 1.9.32 - -### Patch Changes - -- indexer: update bindings -- Updated dependencies - - @0xsequence/abi@1.9.32 - - @0xsequence/core@1.9.32 - - @0xsequence/migration@1.9.32 - - @0xsequence/network@1.9.32 - - @0xsequence/relayer@1.9.32 - - @0xsequence/sessions@1.9.32 - - @0xsequence/utils@1.9.32 - - @0xsequence/wallet@1.9.32 - -## 1.9.31 - -### Patch Changes - -- metadata: token directory changes -- Updated dependencies - - @0xsequence/abi@1.9.31 - - @0xsequence/core@1.9.31 - - @0xsequence/migration@1.9.31 - - @0xsequence/network@1.9.31 - - @0xsequence/relayer@1.9.31 - - @0xsequence/sessions@1.9.31 - - @0xsequence/utils@1.9.31 - - @0xsequence/wallet@1.9.31 - -## 1.9.30 - -### Patch Changes - -- update -- Updated dependencies - - @0xsequence/abi@1.9.30 - - @0xsequence/core@1.9.30 - - @0xsequence/migration@1.9.30 - - @0xsequence/network@1.9.30 - - @0xsequence/relayer@1.9.30 - - @0xsequence/sessions@1.9.30 - - @0xsequence/utils@1.9.30 - - @0xsequence/wallet@1.9.30 - -## 1.9.29 - -### Patch Changes - -- disable gnosis chain -- Updated dependencies - - @0xsequence/abi@1.9.29 - - @0xsequence/core@1.9.29 - - @0xsequence/migration@1.9.29 - - @0xsequence/network@1.9.29 - - @0xsequence/relayer@1.9.29 - - @0xsequence/sessions@1.9.29 - - @0xsequence/utils@1.9.29 - - @0xsequence/wallet@1.9.29 - -## 1.9.28 - -### Patch Changes - -- add utils/merkletree -- Updated dependencies - - @0xsequence/abi@1.9.28 - - @0xsequence/core@1.9.28 - - @0xsequence/migration@1.9.28 - - @0xsequence/network@1.9.28 - - @0xsequence/relayer@1.9.28 - - @0xsequence/sessions@1.9.28 - - @0xsequence/utils@1.9.28 - - @0xsequence/wallet@1.9.28 - -## 1.9.27 - -### Patch Changes - -- network: optimistic -> optimism -- waas: remove defaults -- api, sessions: update bindings -- Updated dependencies -- Updated dependencies -- Updated dependencies - - @0xsequence/abi@1.9.27 - - @0xsequence/core@1.9.27 - - @0xsequence/migration@1.9.27 - - @0xsequence/network@1.9.27 - - @0xsequence/relayer@1.9.27 - - @0xsequence/sessions@1.9.27 - - @0xsequence/utils@1.9.27 - - @0xsequence/wallet@1.9.27 - -## 1.9.26 - -### Patch Changes - -- - add backend interfaces for pluggable interfaces - - introduce @0xsequence/react-native - - update pnpm to lockfile v9 -- Updated dependencies - - @0xsequence/abi@1.9.26 - - @0xsequence/core@1.9.26 - - @0xsequence/migration@1.9.26 - - @0xsequence/network@1.9.26 - - @0xsequence/relayer@1.9.26 - - @0xsequence/sessions@1.9.26 - - @0xsequence/utils@1.9.26 - - @0xsequence/wallet@1.9.26 - -## 1.9.25 - -### Patch Changes - -- update webrpc clients with new error types -- Updated dependencies - - @0xsequence/abi@1.9.25 - - @0xsequence/core@1.9.25 - - @0xsequence/migration@1.9.25 - - @0xsequence/network@1.9.25 - - @0xsequence/relayer@1.9.25 - - @0xsequence/sessions@1.9.25 - - @0xsequence/utils@1.9.25 - - @0xsequence/wallet@1.9.25 - -## 1.9.24 - -### Patch Changes - -- waas: add memoryStore backend to localStore -- Updated dependencies - - @0xsequence/abi@1.9.24 - - @0xsequence/core@1.9.24 - - @0xsequence/migration@1.9.24 - - @0xsequence/network@1.9.24 - - @0xsequence/relayer@1.9.24 - - @0xsequence/sessions@1.9.24 - - @0xsequence/utils@1.9.24 - - @0xsequence/wallet@1.9.24 - -## 1.9.23 - -### Patch Changes - -- update api client bindings -- Updated dependencies - - @0xsequence/abi@1.9.23 - - @0xsequence/core@1.9.23 - - @0xsequence/migration@1.9.23 - - @0xsequence/network@1.9.23 - - @0xsequence/relayer@1.9.23 - - @0xsequence/sessions@1.9.23 - - @0xsequence/utils@1.9.23 - - @0xsequence/wallet@1.9.23 - -## 1.9.22 - -### Patch Changes - -- update metadata client bindings -- Updated dependencies - - @0xsequence/abi@1.9.22 - - @0xsequence/core@1.9.22 - - @0xsequence/migration@1.9.22 - - @0xsequence/network@1.9.22 - - @0xsequence/relayer@1.9.22 - - @0xsequence/sessions@1.9.22 - - @0xsequence/utils@1.9.22 - - @0xsequence/wallet@1.9.22 - -## 1.9.21 - -### Patch Changes - -- api client bindings -- Updated dependencies - - @0xsequence/abi@1.9.21 - - @0xsequence/core@1.9.21 - - @0xsequence/migration@1.9.21 - - @0xsequence/network@1.9.21 - - @0xsequence/relayer@1.9.21 - - @0xsequence/sessions@1.9.21 - - @0xsequence/utils@1.9.21 - - @0xsequence/wallet@1.9.21 - -## 1.9.20 - -### Patch Changes - -- api client bindings update -- Updated dependencies - - @0xsequence/abi@1.9.20 - - @0xsequence/core@1.9.20 - - @0xsequence/migration@1.9.20 - - @0xsequence/network@1.9.20 - - @0xsequence/relayer@1.9.20 - - @0xsequence/sessions@1.9.20 - - @0xsequence/utils@1.9.20 - - @0xsequence/wallet@1.9.20 - -## 1.9.19 - -### Patch Changes - -- waas update -- Updated dependencies - - @0xsequence/abi@1.9.19 - - @0xsequence/core@1.9.19 - - @0xsequence/migration@1.9.19 - - @0xsequence/network@1.9.19 - - @0xsequence/relayer@1.9.19 - - @0xsequence/sessions@1.9.19 - - @0xsequence/utils@1.9.19 - - @0xsequence/wallet@1.9.19 - -## 1.9.18 - -### Patch Changes - -- provider: prohibit dangerous functions -- Updated dependencies - - @0xsequence/abi@1.9.18 - - @0xsequence/core@1.9.18 - - @0xsequence/migration@1.9.18 - - @0xsequence/network@1.9.18 - - @0xsequence/relayer@1.9.18 - - @0xsequence/sessions@1.9.18 - - @0xsequence/utils@1.9.18 - - @0xsequence/wallet@1.9.18 - -## 1.9.17 - -### Patch Changes - -- network: add xr-sepolia -- Updated dependencies - - @0xsequence/network@1.9.17 - - @0xsequence/abi@1.9.17 - - @0xsequence/core@1.9.17 - - @0xsequence/migration@1.9.17 - - @0xsequence/relayer@1.9.17 - - @0xsequence/sessions@1.9.17 - - @0xsequence/utils@1.9.17 - - @0xsequence/wallet@1.9.17 - -## 1.9.16 - -### Patch Changes - -- waas: sequence.feeOptions -- Updated dependencies - - @0xsequence/abi@1.9.16 - - @0xsequence/core@1.9.16 - - @0xsequence/migration@1.9.16 - - @0xsequence/network@1.9.16 - - @0xsequence/relayer@1.9.16 - - @0xsequence/sessions@1.9.16 - - @0xsequence/utils@1.9.16 - - @0xsequence/wallet@1.9.16 - -## 1.9.15 - -### Patch Changes - -- metadata: collection external_link field name fix -- Updated dependencies - - @0xsequence/abi@1.9.15 - - @0xsequence/core@1.9.15 - - @0xsequence/migration@1.9.15 - - @0xsequence/network@1.9.15 - - @0xsequence/relayer@1.9.15 - - @0xsequence/sessions@1.9.15 - - @0xsequence/utils@1.9.15 - - @0xsequence/wallet@1.9.15 - -## 1.9.14 - -### Patch Changes - -- network: astar-zkatana -> astar-zkyoto -- network: deprecate polygon mumbai network -- network: add xai and polygon amoy -- Updated dependencies -- Updated dependencies -- Updated dependencies - - @0xsequence/abi@1.9.14 - - @0xsequence/core@1.9.14 - - @0xsequence/migration@1.9.14 - - @0xsequence/network@1.9.14 - - @0xsequence/relayer@1.9.14 - - @0xsequence/sessions@1.9.14 - - @0xsequence/utils@1.9.14 - - @0xsequence/wallet@1.9.14 - -## 1.9.13 - -### Patch Changes - -- waas: fix @0xsequence/network dependency -- Updated dependencies - - @0xsequence/abi@1.9.13 - - @0xsequence/core@1.9.13 - - @0xsequence/migration@1.9.13 - - @0xsequence/network@1.9.13 - - @0xsequence/relayer@1.9.13 - - @0xsequence/sessions@1.9.13 - - @0xsequence/utils@1.9.13 - - @0xsequence/wallet@1.9.13 - -## 1.9.12 - -### Patch Changes - -- indexer: update rpc bindings -- provider: signMessage: Serialize the BytesLike or string message into hexstring before sending -- waas: SessionAuthProof -- Updated dependencies -- Updated dependencies -- Updated dependencies - - @0xsequence/abi@1.9.12 - - @0xsequence/core@1.9.12 - - @0xsequence/migration@1.9.12 - - @0xsequence/network@1.9.12 - - @0xsequence/relayer@1.9.12 - - @0xsequence/sessions@1.9.12 - - @0xsequence/utils@1.9.12 - - @0xsequence/wallet@1.9.12 - -## 1.9.11 - -### Patch Changes - -- metdata, update rpc bindings -- Updated dependencies - - @0xsequence/abi@1.9.11 - - @0xsequence/core@1.9.11 - - @0xsequence/migration@1.9.11 - - @0xsequence/network@1.9.11 - - @0xsequence/relayer@1.9.11 - - @0xsequence/sessions@1.9.11 - - @0xsequence/utils@1.9.11 - - @0xsequence/wallet@1.9.11 - -## 1.9.10 - -### Patch Changes - -- update metadata rpc bindings -- Updated dependencies - - @0xsequence/abi@1.9.10 - - @0xsequence/core@1.9.10 - - @0xsequence/migration@1.9.10 - - @0xsequence/network@1.9.10 - - @0xsequence/relayer@1.9.10 - - @0xsequence/sessions@1.9.10 - - @0xsequence/utils@1.9.10 - - @0xsequence/wallet@1.9.10 - -## 1.9.9 - -### Patch Changes - -- metadata, add SequenceCollections rpc client -- Updated dependencies - - @0xsequence/abi@1.9.9 - - @0xsequence/core@1.9.9 - - @0xsequence/migration@1.9.9 - - @0xsequence/network@1.9.9 - - @0xsequence/relayer@1.9.9 - - @0xsequence/sessions@1.9.9 - - @0xsequence/utils@1.9.9 - - @0xsequence/wallet@1.9.9 - -## 1.9.8 - -### Patch Changes - -- waas client update -- Updated dependencies - - @0xsequence/abi@1.9.8 - - @0xsequence/core@1.9.8 - - @0xsequence/migration@1.9.8 - - @0xsequence/network@1.9.8 - - @0xsequence/relayer@1.9.8 - - @0xsequence/sessions@1.9.8 - - @0xsequence/utils@1.9.8 - - @0xsequence/wallet@1.9.8 - -## 1.9.7 - -### Patch Changes - -- update rpc client bindings for api, metadata and relayer -- Updated dependencies - - @0xsequence/abi@1.9.7 - - @0xsequence/core@1.9.7 - - @0xsequence/migration@1.9.7 - - @0xsequence/network@1.9.7 - - @0xsequence/relayer@1.9.7 - - @0xsequence/sessions@1.9.7 - - @0xsequence/utils@1.9.7 - - @0xsequence/wallet@1.9.7 - -## 1.9.6 - -### Patch Changes - -- waas package update -- Updated dependencies - - @0xsequence/abi@1.9.6 - - @0xsequence/core@1.9.6 - - @0xsequence/migration@1.9.6 - - @0xsequence/network@1.9.6 - - @0xsequence/relayer@1.9.6 - - @0xsequence/sessions@1.9.6 - - @0xsequence/utils@1.9.6 - - @0xsequence/wallet@1.9.6 - -## 1.9.5 - -### Patch Changes - -- RpcRelayer prioritize project access key -- Updated dependencies - - @0xsequence/abi@1.9.5 - - @0xsequence/core@1.9.5 - - @0xsequence/migration@1.9.5 - - @0xsequence/network@1.9.5 - - @0xsequence/relayer@1.9.5 - - @0xsequence/sessions@1.9.5 - - @0xsequence/utils@1.9.5 - - @0xsequence/wallet@1.9.5 - -## 1.9.4 - -### Patch Changes - -- waas: fix network dependency -- Updated dependencies - - @0xsequence/abi@1.9.4 - - @0xsequence/core@1.9.4 - - @0xsequence/migration@1.9.4 - - @0xsequence/network@1.9.4 - - @0xsequence/relayer@1.9.4 - - @0xsequence/sessions@1.9.4 - - @0xsequence/utils@1.9.4 - - @0xsequence/wallet@1.9.4 - -## 1.9.3 - -### Patch Changes - -- provider: don't append access key to RPC url if user has already provided it -- Updated dependencies - - @0xsequence/abi@1.9.3 - - @0xsequence/core@1.9.3 - - @0xsequence/migration@1.9.3 - - @0xsequence/network@1.9.3 - - @0xsequence/relayer@1.9.3 - - @0xsequence/sessions@1.9.3 - - @0xsequence/utils@1.9.3 - - @0xsequence/wallet@1.9.3 - -## 1.9.2 - -### Patch Changes - -- network: add xai-sepolia -- Updated dependencies - - @0xsequence/abi@1.9.2 - - @0xsequence/core@1.9.2 - - @0xsequence/migration@1.9.2 - - @0xsequence/network@1.9.2 - - @0xsequence/relayer@1.9.2 - - @0xsequence/sessions@1.9.2 - - @0xsequence/utils@1.9.2 - - @0xsequence/wallet@1.9.2 - -## 1.9.1 - -### Patch Changes - -- analytics fix -- Updated dependencies - - @0xsequence/abi@1.9.1 - - @0xsequence/core@1.9.1 - - @0xsequence/migration@1.9.1 - - @0xsequence/network@1.9.1 - - @0xsequence/relayer@1.9.1 - - @0xsequence/sessions@1.9.1 - - @0xsequence/utils@1.9.1 - - @0xsequence/wallet@1.9.1 - -## 1.9.0 - -### Minor Changes - -- waas release - -### Patch Changes - -- Updated dependencies - - @0xsequence/abi@1.9.0 - - @0xsequence/core@1.9.0 - - @0xsequence/migration@1.9.0 - - @0xsequence/network@1.9.0 - - @0xsequence/relayer@1.9.0 - - @0xsequence/sessions@1.9.0 - - @0xsequence/utils@1.9.0 - - @0xsequence/wallet@1.9.0 - -## 1.8.8 - -### Patch Changes - -- update metadata bindings -- Updated dependencies - - @0xsequence/abi@1.8.8 - - @0xsequence/core@1.8.8 - - @0xsequence/migration@1.8.8 - - @0xsequence/network@1.8.8 - - @0xsequence/relayer@1.8.8 - - @0xsequence/sessions@1.8.8 - - @0xsequence/utils@1.8.8 - - @0xsequence/wallet@1.8.8 - -## 1.8.7 - -### Patch Changes - -- provider: update databeat to 0.9.1 -- Updated dependencies - - @0xsequence/abi@1.8.7 - - @0xsequence/core@1.8.7 - - @0xsequence/migration@1.8.7 - - @0xsequence/network@1.8.7 - - @0xsequence/relayer@1.8.7 - - @0xsequence/sessions@1.8.7 - - @0xsequence/utils@1.8.7 - - @0xsequence/wallet@1.8.7 - -## 1.8.6 - -### Patch Changes - -- guard: SignedOwnershipProof -- Updated dependencies - - @0xsequence/abi@1.8.6 - - @0xsequence/core@1.8.6 - - @0xsequence/migration@1.8.6 - - @0xsequence/network@1.8.6 - - @0xsequence/relayer@1.8.6 - - @0xsequence/sessions@1.8.6 - - @0xsequence/utils@1.8.6 - - @0xsequence/wallet@1.8.6 - -## 1.8.5 - -### Patch Changes - -- guard: signOwnershipProof and isSignedOwnershipProof -- Updated dependencies - - @0xsequence/abi@1.8.5 - - @0xsequence/core@1.8.5 - - @0xsequence/migration@1.8.5 - - @0xsequence/network@1.8.5 - - @0xsequence/relayer@1.8.5 - - @0xsequence/sessions@1.8.5 - - @0xsequence/utils@1.8.5 - - @0xsequence/wallet@1.8.5 - -## 1.8.4 - -### Patch Changes - -- network: add homeverse to networks list -- Updated dependencies - - @0xsequence/abi@1.8.4 - - @0xsequence/core@1.8.4 - - @0xsequence/migration@1.8.4 - - @0xsequence/network@1.8.4 - - @0xsequence/relayer@1.8.4 - - @0xsequence/sessions@1.8.4 - - @0xsequence/utils@1.8.4 - - @0xsequence/wallet@1.8.4 - -## 1.8.3 - -### Patch Changes - -- api: introduce basic linked wallet support -- Updated dependencies - - @0xsequence/abi@1.8.3 - - @0xsequence/core@1.8.3 - - @0xsequence/migration@1.8.3 - - @0xsequence/network@1.8.3 - - @0xsequence/relayer@1.8.3 - - @0xsequence/sessions@1.8.3 - - @0xsequence/utils@1.8.3 - - @0xsequence/wallet@1.8.3 - -## 1.8.2 - -### Patch Changes - -- provider: don't initialize analytics unless explicitly requested -- Updated dependencies - - @0xsequence/abi@1.8.2 - - @0xsequence/core@1.8.2 - - @0xsequence/migration@1.8.2 - - @0xsequence/network@1.8.2 - - @0xsequence/relayer@1.8.2 - - @0xsequence/sessions@1.8.2 - - @0xsequence/utils@1.8.2 - - @0xsequence/wallet@1.8.2 - -## 1.8.1 - -### Patch Changes - -- update to analytics provider -- Updated dependencies - - @0xsequence/abi@1.8.1 - - @0xsequence/core@1.8.1 - - @0xsequence/migration@1.8.1 - - @0xsequence/network@1.8.1 - - @0xsequence/relayer@1.8.1 - - @0xsequence/sessions@1.8.1 - - @0xsequence/utils@1.8.1 - - @0xsequence/wallet@1.8.1 - -## 1.8.0 - -### Minor Changes - -- provider: project analytics - -### Patch Changes - -- Updated dependencies - - @0xsequence/abi@1.8.0 - - @0xsequence/core@1.8.0 - - @0xsequence/migration@1.8.0 - - @0xsequence/network@1.8.0 - - @0xsequence/relayer@1.8.0 - - @0xsequence/sessions@1.8.0 - - @0xsequence/utils@1.8.0 - - @0xsequence/wallet@1.8.0 - -## 1.7.2 - -### Patch Changes - -- 0xsequence: ChainId should not be exported as a type -- account, wallet: fix nonce selection -- Updated dependencies -- Updated dependencies - - @0xsequence/abi@1.7.2 - - @0xsequence/core@1.7.2 - - @0xsequence/migration@1.7.2 - - @0xsequence/network@1.7.2 - - @0xsequence/relayer@1.7.2 - - @0xsequence/sessions@1.7.2 - - @0xsequence/utils@1.7.2 - - @0xsequence/wallet@1.7.2 - -## 1.7.1 - -### Patch Changes - -- network: add missing avalanche logoURI -- Updated dependencies - - @0xsequence/abi@1.7.1 - - @0xsequence/core@1.7.1 - - @0xsequence/migration@1.7.1 - - @0xsequence/network@1.7.1 - - @0xsequence/relayer@1.7.1 - - @0xsequence/sessions@1.7.1 - - @0xsequence/utils@1.7.1 - - @0xsequence/wallet@1.7.1 - -## 1.7.0 - -### Minor Changes - -- provider: projectAccessKey is now required - -### Patch Changes - -- network: add NetworkMetadata.logoURI property for all networks -- Updated dependencies -- Updated dependencies - - @0xsequence/abi@1.7.0 - - @0xsequence/core@1.7.0 - - @0xsequence/migration@1.7.0 - - @0xsequence/network@1.7.0 - - @0xsequence/relayer@1.7.0 - - @0xsequence/sessions@1.7.0 - - @0xsequence/utils@1.7.0 - - @0xsequence/wallet@1.7.0 - -## 1.6.3 - -### Patch Changes - -- network list update -- Updated dependencies - - @0xsequence/abi@1.6.3 - - @0xsequence/core@1.6.3 - - @0xsequence/migration@1.6.3 - - @0xsequence/network@1.6.3 - - @0xsequence/relayer@1.6.3 - - @0xsequence/sessions@1.6.3 - - @0xsequence/utils@1.6.3 - - @0xsequence/wallet@1.6.3 - -## 1.6.2 - -### Patch Changes - -- auth: projectAccessKey option -- wallet: use 12 bytes for random space -- Updated dependencies -- Updated dependencies - - @0xsequence/abi@1.6.2 - - @0xsequence/core@1.6.2 - - @0xsequence/migration@1.6.2 - - @0xsequence/network@1.6.2 - - @0xsequence/relayer@1.6.2 - - @0xsequence/sessions@1.6.2 - - @0xsequence/utils@1.6.2 - - @0xsequence/wallet@1.6.2 - -## 1.6.1 - -### Patch Changes - -- core: add simple config from subdigest support -- core: fix encode tree with subdigest -- account: implement buildOnChainSignature on Account -- Updated dependencies -- Updated dependencies -- Updated dependencies - - @0xsequence/abi@1.6.1 - - @0xsequence/core@1.6.1 - - @0xsequence/migration@1.6.1 - - @0xsequence/network@1.6.1 - - @0xsequence/relayer@1.6.1 - - @0xsequence/sessions@1.6.1 - - @0xsequence/utils@1.6.1 - - @0xsequence/wallet@1.6.1 - -## 1.6.0 - -### Minor Changes - -- account, wallet: parallel transactions by default - -### Patch Changes - -- provider: emit disconnect on sign out -- Updated dependencies -- Updated dependencies - - @0xsequence/core@1.6.0 - - @0xsequence/migration@1.6.0 - - @0xsequence/network@1.6.0 - - @0xsequence/relayer@1.6.0 - - @0xsequence/sessions@1.6.0 - - @0xsequence/utils@1.6.0 - - @0xsequence/wallet@1.6.0 - -## 1.5.0 - -### Minor Changes - -- signhub: add 'signing' signer status - -### Patch Changes - -- auth: Session.open: onAccountAddress callback -- account: allow empty transaction bundles -- Updated dependencies -- Updated dependencies -- Updated dependencies - - @0xsequence/core@1.5.0 - - @0xsequence/migration@1.5.0 - - @0xsequence/network@1.5.0 - - @0xsequence/relayer@1.5.0 - - @0xsequence/sessions@1.5.0 - - @0xsequence/utils@1.5.0 - - @0xsequence/wallet@1.5.0 - -## 1.4.9 - -### Patch Changes - -- rename SequenceMetadataClient to SequenceMetadata -- Updated dependencies - - @0xsequence/core@1.4.9 - - @0xsequence/migration@1.4.9 - - @0xsequence/network@1.4.9 - - @0xsequence/relayer@1.4.9 - - @0xsequence/sessions@1.4.9 - - @0xsequence/utils@1.4.9 - - @0xsequence/wallet@1.4.9 - -## 1.4.8 - -### Patch Changes - -- account: Account.getSigners -- Updated dependencies - - @0xsequence/core@1.4.8 - - @0xsequence/migration@1.4.8 - - @0xsequence/network@1.4.8 - - @0xsequence/relayer@1.4.8 - - @0xsequence/sessions@1.4.8 - - @0xsequence/utils@1.4.8 - - @0xsequence/wallet@1.4.8 - -## 1.4.7 - -### Patch Changes - -- update indexer client bindings -- Updated dependencies - - @0xsequence/core@1.4.7 - - @0xsequence/migration@1.4.7 - - @0xsequence/network@1.4.7 - - @0xsequence/relayer@1.4.7 - - @0xsequence/sessions@1.4.7 - - @0xsequence/utils@1.4.7 - - @0xsequence/wallet@1.4.7 - -## 1.4.6 - -### Patch Changes - -- - add sepolia networks, mark goerli as deprecated - - update indexer client bindings -- Updated dependencies - - @0xsequence/core@1.4.6 - - @0xsequence/migration@1.4.6 - - @0xsequence/network@1.4.6 - - @0xsequence/relayer@1.4.6 - - @0xsequence/sessions@1.4.6 - - @0xsequence/utils@1.4.6 - - @0xsequence/wallet@1.4.6 - -## 1.4.5 - -### Patch Changes - -- indexer/metadata: update client bindings -- auth: selectWallet with new address -- Updated dependencies -- Updated dependencies - - @0xsequence/core@1.4.5 - - @0xsequence/migration@1.4.5 - - @0xsequence/network@1.4.5 - - @0xsequence/relayer@1.4.5 - - @0xsequence/sessions@1.4.5 - - @0xsequence/utils@1.4.5 - - @0xsequence/wallet@1.4.5 - -## 1.4.4 - -### Patch Changes - -- indexer: update bindings -- auth: handle jwt expiry -- Updated dependencies -- Updated dependencies - - @0xsequence/core@1.4.4 - - @0xsequence/migration@1.4.4 - - @0xsequence/network@1.4.4 - - @0xsequence/relayer@1.4.4 - - @0xsequence/sessions@1.4.4 - - @0xsequence/utils@1.4.4 - - @0xsequence/wallet@1.4.4 - -## 1.4.3 - -### Patch Changes - -- guard: return active status from GuardSigner.getAuthMethods -- Updated dependencies - - @0xsequence/core@1.4.3 - - @0xsequence/migration@1.4.3 - - @0xsequence/network@1.4.3 - - @0xsequence/relayer@1.4.3 - - @0xsequence/sessions@1.4.3 - - @0xsequence/utils@1.4.3 - - @0xsequence/wallet@1.4.3 - -## 1.4.2 - -### Patch Changes - -- guard: update bindings -- Updated dependencies - - @0xsequence/core@1.4.2 - - @0xsequence/migration@1.4.2 - - @0xsequence/network@1.4.2 - - @0xsequence/relayer@1.4.2 - - @0xsequence/sessions@1.4.2 - - @0xsequence/utils@1.4.2 - - @0xsequence/wallet@1.4.2 - -## 1.4.1 - -### Patch Changes - -- network: remove unused networks -- signhub: orchestrator interface -- guard: auth methods interface -- guard: update bindings for pin and totp -- guard: no more retry logic -- Updated dependencies -- Updated dependencies -- Updated dependencies -- Updated dependencies -- Updated dependencies - - @0xsequence/core@1.4.1 - - @0xsequence/migration@1.4.1 - - @0xsequence/network@1.4.1 - - @0xsequence/relayer@1.4.1 - - @0xsequence/sessions@1.4.1 - - @0xsequence/utils@1.4.1 - - @0xsequence/wallet@1.4.1 - -## 1.4.0 - -### Minor Changes - -- project access key support - -### Patch Changes - -- Updated dependencies - - @0xsequence/core@1.4.0 - - @0xsequence/migration@1.4.0 - - @0xsequence/network@1.4.0 - - @0xsequence/relayer@1.4.0 - - @0xsequence/sessions@1.4.0 - - @0xsequence/utils@1.4.0 - - @0xsequence/wallet@1.4.0 - -## 1.3.0 - -### Minor Changes - -- signhub: account children - -### Patch Changes - -- guard: do not throw when building deploy transaction -- network: snowtrace.io -> subnets.avax.network/c-chain -- Updated dependencies -- Updated dependencies -- Updated dependencies - - @0xsequence/core@1.3.0 - - @0xsequence/migration@1.3.0 - - @0xsequence/network@1.3.0 - - @0xsequence/relayer@1.3.0 - - @0xsequence/sessions@1.3.0 - - @0xsequence/utils@1.3.0 - - @0xsequence/wallet@1.3.0 - -## 1.2.9 - -### Patch Changes - -- account: AccountSigner.sendTransaction simulateForFeeOptions -- relayer: update bindings -- Updated dependencies -- Updated dependencies - - @0xsequence/core@1.2.9 - - @0xsequence/migration@1.2.9 - - @0xsequence/network@1.2.9 - - @0xsequence/relayer@1.2.9 - - @0xsequence/sessions@1.2.9 - - @0xsequence/utils@1.2.9 - - @0xsequence/wallet@1.2.9 - -## 1.2.8 - -### Patch Changes - -- rename X-Sequence-Token-Key header to X-Access-Key -- Updated dependencies - - @0xsequence/core@1.2.8 - - @0xsequence/migration@1.2.8 - - @0xsequence/network@1.2.8 - - @0xsequence/relayer@1.2.8 - - @0xsequence/sessions@1.2.8 - - @0xsequence/utils@1.2.8 - - @0xsequence/wallet@1.2.8 - -## 1.2.7 - -### Patch Changes - -- add x-sequence-token-key to clients -- Updated dependencies - - @0xsequence/core@1.2.7 - - @0xsequence/migration@1.2.7 - - @0xsequence/network@1.2.7 - - @0xsequence/relayer@1.2.7 - - @0xsequence/sessions@1.2.7 - - @0xsequence/utils@1.2.7 - - @0xsequence/wallet@1.2.7 - -## 1.2.6 - -### Patch Changes - -- Fix bind multicall provider -- Updated dependencies - - @0xsequence/core@1.2.6 - - @0xsequence/migration@1.2.6 - - @0xsequence/network@1.2.6 - - @0xsequence/relayer@1.2.6 - - @0xsequence/sessions@1.2.6 - - @0xsequence/utils@1.2.6 - - @0xsequence/wallet@1.2.6 - -## 1.2.5 - -### Patch Changes - -- Multicall default configuration fixes -- Updated dependencies - - @0xsequence/core@1.2.5 - - @0xsequence/migration@1.2.5 - - @0xsequence/network@1.2.5 - - @0xsequence/relayer@1.2.5 - - @0xsequence/sessions@1.2.5 - - @0xsequence/utils@1.2.5 - - @0xsequence/wallet@1.2.5 - -## 1.2.4 - -### Patch Changes - -- provider: Adding missing payment provider types to PaymentProviderOption -- provider: WalletRequestHandler.notifyChainChanged -- Updated dependencies -- Updated dependencies - - @0xsequence/core@1.2.4 - - @0xsequence/migration@1.2.4 - - @0xsequence/network@1.2.4 - - @0xsequence/relayer@1.2.4 - - @0xsequence/sessions@1.2.4 - - @0xsequence/utils@1.2.4 - - @0xsequence/wallet@1.2.4 - -## 1.2.3 - -### Patch Changes - -- auth, provider: connect to accept optional authorizeNonce -- Updated dependencies - - @0xsequence/core@1.2.3 - - @0xsequence/migration@1.2.3 - - @0xsequence/network@1.2.3 - - @0xsequence/relayer@1.2.3 - - @0xsequence/sessions@1.2.3 - - @0xsequence/utils@1.2.3 - - @0xsequence/wallet@1.2.3 - -## 1.2.2 - -### Patch Changes - -- provider: allow createContract calls -- core: check for explicit zero address in contract deployments -- Updated dependencies -- Updated dependencies - - @0xsequence/core@1.2.2 - - @0xsequence/migration@1.2.2 - - @0xsequence/network@1.2.2 - - @0xsequence/relayer@1.2.2 - - @0xsequence/sessions@1.2.2 - - @0xsequence/utils@1.2.2 - - @0xsequence/wallet@1.2.2 - -## 1.2.1 - -### Patch Changes - -- auth: use sequence api chain id as reference chain id if available -- Updated dependencies - - @0xsequence/core@1.2.1 - - @0xsequence/migration@1.2.1 - - @0xsequence/network@1.2.1 - - @0xsequence/relayer@1.2.1 - - @0xsequence/sessions@1.2.1 - - @0xsequence/utils@1.2.1 - - @0xsequence/wallet@1.2.1 - -## 1.2.0 - -### Minor Changes - -- split services from session, better local support - -### Patch Changes - -- Updated dependencies - - @0xsequence/core@1.2.0 - - @0xsequence/migration@1.2.0 - - @0xsequence/network@1.2.0 - - @0xsequence/relayer@1.2.0 - - @0xsequence/sessions@1.2.0 - - @0xsequence/utils@1.2.0 - - @0xsequence/wallet@1.2.0 - -## 1.1.15 - -### Patch Changes - -- guard: remove error filtering -- Updated dependencies - - @0xsequence/core@1.1.15 - - @0xsequence/migration@1.1.15 - - @0xsequence/network@1.1.15 - - @0xsequence/relayer@1.1.15 - - @0xsequence/sessions@1.1.15 - - @0xsequence/utils@1.1.15 - - @0xsequence/wallet@1.1.15 - -## 1.1.14 - -### Patch Changes - -- guard: add GuardSigner.onError -- Updated dependencies - - @0xsequence/core@1.1.14 - - @0xsequence/migration@1.1.14 - - @0xsequence/network@1.1.14 - - @0xsequence/relayer@1.1.14 - - @0xsequence/sessions@1.1.14 - - @0xsequence/utils@1.1.14 - - @0xsequence/wallet@1.1.14 - -## 1.1.13 - -### Patch Changes - -- provider: pass client version with connect options -- provider: removing large from BannerSize -- Updated dependencies -- Updated dependencies - - @0xsequence/core@1.1.13 - - @0xsequence/migration@1.1.13 - - @0xsequence/network@1.1.13 - - @0xsequence/relayer@1.1.13 - - @0xsequence/sessions@1.1.13 - - @0xsequence/utils@1.1.13 - - @0xsequence/wallet@1.1.13 - -## 1.1.12 - -### Patch Changes - -- provider: adding bannerSize to ConnectOptions -- Updated dependencies - - @0xsequence/core@1.1.12 - - @0xsequence/migration@1.1.12 - - @0xsequence/network@1.1.12 - - @0xsequence/relayer@1.1.12 - - @0xsequence/sessions@1.1.12 - - @0xsequence/utils@1.1.12 - - @0xsequence/wallet@1.1.12 - -## 1.1.11 - -### Patch Changes - -- add homeverse configs -- Updated dependencies - - @0xsequence/core@1.1.11 - - @0xsequence/migration@1.1.11 - - @0xsequence/network@1.1.11 - - @0xsequence/relayer@1.1.11 - - @0xsequence/sessions@1.1.11 - - @0xsequence/utils@1.1.11 - - @0xsequence/wallet@1.1.11 - -## 1.1.10 - -### Patch Changes - -- handle default EIP6492 on send -- Updated dependencies - - @0xsequence/core@1.1.10 - - @0xsequence/migration@1.1.10 - - @0xsequence/network@1.1.10 - - @0xsequence/relayer@1.1.10 - - @0xsequence/sessions@1.1.10 - - @0xsequence/utils@1.1.10 - - @0xsequence/wallet@1.1.10 - -## 1.1.9 - -### Patch Changes - -- Custom default EIP6492 on client -- Updated dependencies - - @0xsequence/core@1.1.9 - - @0xsequence/migration@1.1.9 - - @0xsequence/network@1.1.9 - - @0xsequence/relayer@1.1.9 - - @0xsequence/sessions@1.1.9 - - @0xsequence/utils@1.1.9 - - @0xsequence/wallet@1.1.9 - -## 1.1.8 - -### Patch Changes - -- metadata: searchMetadata: add types filter -- Updated dependencies - - @0xsequence/core@1.1.8 - - @0xsequence/migration@1.1.8 - - @0xsequence/network@1.1.8 - - @0xsequence/relayer@1.1.8 - - @0xsequence/sessions@1.1.8 - - @0xsequence/utils@1.1.8 - - @0xsequence/wallet@1.1.8 - -## 1.1.7 - -### Patch Changes - -- adding signInWith connect settings option to allow dapps to automatically login their users with a certain provider optimizing the normal authentication flow -- Updated dependencies - - @0xsequence/core@1.1.7 - - @0xsequence/migration@1.1.7 - - @0xsequence/network@1.1.7 - - @0xsequence/relayer@1.1.7 - - @0xsequence/sessions@1.1.7 - - @0xsequence/utils@1.1.7 - - @0xsequence/wallet@1.1.7 - -## 1.1.6 - -### Patch Changes - -- metadata: searchMetadata: add chainID and excludeTokenMetadata filters -- Updated dependencies - - @0xsequence/core@1.1.6 - - @0xsequence/migration@1.1.6 - - @0xsequence/network@1.1.6 - - @0xsequence/relayer@1.1.6 - - @0xsequence/sessions@1.1.6 - - @0xsequence/utils@1.1.6 - - @0xsequence/wallet@1.1.6 - -## 1.1.5 - -### Patch Changes - -- account: re-compute meta-transaction id for wallet deployment transactions -- Updated dependencies - - @0xsequence/core@1.1.5 - - @0xsequence/migration@1.1.5 - - @0xsequence/network@1.1.5 - - @0xsequence/relayer@1.1.5 - - @0xsequence/sessions@1.1.5 - - @0xsequence/utils@1.1.5 - - @0xsequence/wallet@1.1.5 - -## 1.1.4 - -### Patch Changes - -- network: rename base-mainnet to base -- provider: override isDefaultChain with ConnectOptions.networkId if provided -- Updated dependencies -- Updated dependencies - - @0xsequence/core@1.1.4 - - @0xsequence/migration@1.1.4 - - @0xsequence/network@1.1.4 - - @0xsequence/relayer@1.1.4 - - @0xsequence/sessions@1.1.4 - - @0xsequence/utils@1.1.4 - - @0xsequence/wallet@1.1.4 - -## 1.1.3 - -### Patch Changes - -- provider: use network id from transport session -- provider: sign authorization using ConnectOptions.networkId if provided -- Updated dependencies -- Updated dependencies - - @0xsequence/core@1.1.3 - - @0xsequence/migration@1.1.3 - - @0xsequence/network@1.1.3 - - @0xsequence/relayer@1.1.3 - - @0xsequence/sessions@1.1.3 - - @0xsequence/utils@1.1.3 - - @0xsequence/wallet@1.1.3 - -## 1.1.2 - -### Patch Changes - -- provider: jsonrpc chain id fixes -- Updated dependencies - - @0xsequence/core@1.1.2 - - @0xsequence/migration@1.1.2 - - @0xsequence/network@1.1.2 - - @0xsequence/relayer@1.1.2 - - @0xsequence/sessions@1.1.2 - - @0xsequence/utils@1.1.2 - - @0xsequence/wallet@1.1.2 - -## 1.1.1 - -### Patch Changes - -- network: add base mainnet and sepolia -- provider: reject toxic transaction requests -- Updated dependencies -- Updated dependencies - - @0xsequence/core@1.1.1 - - @0xsequence/migration@1.1.1 - - @0xsequence/network@1.1.1 - - @0xsequence/relayer@1.1.1 - - @0xsequence/sessions@1.1.1 - - @0xsequence/utils@1.1.1 - - @0xsequence/wallet@1.1.1 - -## 1.1.0 - -### Minor Changes - -- Refactor dapp facing provider - -### Patch Changes - -- Updated dependencies - - @0xsequence/core@1.1.0 - - @0xsequence/migration@1.1.0 - - @0xsequence/network@1.1.0 - - @0xsequence/relayer@1.1.0 - - @0xsequence/sessions@1.1.0 - - @0xsequence/utils@1.1.0 - - @0xsequence/wallet@1.1.0 - -## 1.0.5 - -### Patch Changes - -- network: export network constants -- guard: use the correct global for fetch -- network: nova-explorer.arbitrum.io -> nova.arbiscan.io -- Updated dependencies -- Updated dependencies -- Updated dependencies - - @0xsequence/core@1.0.5 - - @0xsequence/migration@1.0.5 - - @0xsequence/network@1.0.5 - - @0xsequence/relayer@1.0.5 - - @0xsequence/sessions@1.0.5 - - @0xsequence/utils@1.0.5 - - @0xsequence/wallet@1.0.5 - -## 1.0.4 - -### Patch Changes - -- provider: accept name or number for networkId -- Updated dependencies - - @0xsequence/core@1.0.4 - - @0xsequence/migration@1.0.4 - - @0xsequence/network@1.0.4 - - @0xsequence/relayer@1.0.4 - - @0xsequence/sessions@1.0.4 - - @0xsequence/utils@1.0.4 - - @0xsequence/wallet@1.0.4 - -## 1.0.3 - -### Patch Changes - -- Simpler isValidSignature helpers -- Updated dependencies - - @0xsequence/core@1.0.3 - - @0xsequence/migration@1.0.3 - - @0xsequence/network@1.0.3 - - @0xsequence/relayer@1.0.3 - - @0xsequence/sessions@1.0.3 - - @0xsequence/utils@1.0.3 - - @0xsequence/wallet@1.0.3 - -## 1.0.2 - -### Patch Changes - -- add extra signature validation utils methods -- Updated dependencies - - @0xsequence/core@1.0.2 - - @0xsequence/migration@1.0.2 - - @0xsequence/network@1.0.2 - - @0xsequence/relayer@1.0.2 - - @0xsequence/sessions@1.0.2 - - @0xsequence/utils@1.0.2 - - @0xsequence/wallet@1.0.2 - -## 1.0.1 - -### Patch Changes - -- add homeverse testnet -- Updated dependencies - - @0xsequence/core@1.0.1 - - @0xsequence/migration@1.0.1 - - @0xsequence/network@1.0.1 - - @0xsequence/relayer@1.0.1 - - @0xsequence/sessions@1.0.1 - - @0xsequence/utils@1.0.1 - - @0xsequence/wallet@1.0.1 - -## 1.0.0 - -### Major Changes - -- https://sequence.xyz/blog/sequence-wallet-light-state-sync-full-merkle-wallets - -### Patch Changes - -- Updated dependencies - - @0xsequence/core@1.0.0 - - @0xsequence/migration@1.0.0 - - @0xsequence/network@1.0.0 - - @0xsequence/relayer@1.0.0 - - @0xsequence/sessions@1.0.0 - - @0xsequence/utils@1.0.0 - - @0xsequence/wallet@1.0.0 diff --git a/old/packages/account/hardhat.config.js b/old/packages/account/hardhat.config.js deleted file mode 100644 index 9e73336b0..000000000 --- a/old/packages/account/hardhat.config.js +++ /dev/null @@ -1,12 +0,0 @@ - -module.exports = { - networks: { - hardhat: { - chainId: 31337, - port: 7146, - accounts: { - mnemonic: 'ripple axis someone ridge uniform wrist prosper there frog rate olympic knee' - }, - }, - } -} diff --git a/old/packages/account/hardhat2.config.js b/old/packages/account/hardhat2.config.js deleted file mode 100644 index e984fc2e7..000000000 --- a/old/packages/account/hardhat2.config.js +++ /dev/null @@ -1,11 +0,0 @@ - -module.exports = { - networks: { - hardhat: { - chainId: 31338, - accounts: { - mnemonic: 'ripple axis someone ridge uniform wrist prosper there frog rate olympic knee' - } - } - } -} diff --git a/old/packages/account/package.json b/old/packages/account/package.json deleted file mode 100644 index c91b63c42..000000000 --- a/old/packages/account/package.json +++ /dev/null @@ -1,43 +0,0 @@ -{ - "name": "@0xsequence/account", - "version": "2.3.8", - "description": "tools for migrating sequence wallets to new versions", - "repository": "https://github.com/0xsequence/sequence.js/tree/master/packages/account", - "source": "src/index.ts", - "main": "dist/0xsequence-account.cjs.js", - "module": "dist/0xsequence-account.esm.js", - "author": "Horizon Blockchain Games", - "license": "Apache-2.0", - "scripts": { - "test": "pnpm test:concurrently 'pnpm test:run'", - "test:run": "pnpm test:file tests/**/*.spec.ts", - "test:file": "TS_NODE_PROJECT=../../tsconfig.test.json mocha -r ts-node/register --timeout 120000", - "test:concurrently": "concurrently -k --success first 'pnpm start:hardhat2 > /dev/null'", - "start:hardhat2": "hardhat node --hostname 0.0.0.0 --port 7048 --config ./hardhat2.config.js", - "test:coverage": "nyc pnpm test" - }, - "peerDependencies": { - "ethers": ">=6" - }, - "dependencies": { - "@0xsequence/abi": "workspace:*", - "@0xsequence/core": "workspace:*", - "@0xsequence/migration": "workspace:*", - "@0xsequence/network": "workspace:*", - "@0xsequence/relayer": "workspace:*", - "@0xsequence/sessions": "workspace:*", - "@0xsequence/utils": "workspace:*", - "@0xsequence/wallet": "workspace:*" - }, - "devDependencies": { - "@0xsequence/signhub": "workspace:*", - "@0xsequence/tests": "workspace:*", - "@istanbuljs/nyc-config-typescript": "^1.0.2", - "ethers": "6.13.4", - "nyc": "^15.1.0" - }, - "files": [ - "src", - "dist" - ] -} diff --git a/old/packages/account/src/account.ts b/old/packages/account/src/account.ts deleted file mode 100644 index a412fd45a..000000000 --- a/old/packages/account/src/account.ts +++ /dev/null @@ -1,1190 +0,0 @@ -import { walletContracts } from '@0xsequence/abi' -import { commons, universal } from '@0xsequence/core' -import { migrator, defaults, version } from '@0xsequence/migration' -import { ChainId, NetworkConfig } from '@0xsequence/network' -import { type FeeOption, type FeeQuote, isRelayer, type Relayer, RpcRelayer } from '@0xsequence/relayer' -import type { tracker } from '@0xsequence/sessions' -import type { SignatureOrchestrator } from '@0xsequence/signhub' -import { encodeTypedDataDigest, getFetchRequest } from '@0xsequence/utils' -import { Wallet } from '@0xsequence/wallet' -import { ethers, MessagePrefix } from 'ethers' -import { AccountSigner, AccountSignerOptions } from './signer' - -export type AccountStatus = { - original: { - version: number - imageHash: string - context: commons.context.WalletContext - } - onChain: { - imageHash: string - config: commons.config.Config - version: number - deployed: boolean - } - fullyMigrated: boolean - signedMigrations: migrator.SignedMigration[] - version: number - presignedConfigurations: tracker.PresignedConfigLink[] - imageHash: string - config: commons.config.Config - checkpoint: ethers.BigNumberish - canOnchainValidate: boolean -} - -export type AccountOptions = { - // The only unique identifier for a wallet is the address - address: string - - // The config tracker keeps track of chained configs, - // counterfactual addresses and reverse lookups for configurations - // it must implement both the ConfigTracker and MigrationTracker - tracker: tracker.ConfigTracker & migrator.PresignedMigrationTracker - - // Versioned contexts contains the context information for each Sequence version - contexts: commons.context.VersionedContext - - // Optional list of migrations, if not provided, the default migrations will be used - // NOTICE: the last vestion is considered the "current" version for the account - migrations?: migrator.Migrations - - // Orchestrator manages signing messages and transactions - orchestrator: SignatureOrchestrator - - // Networks information and providers - networks: NetworkConfig[] - - // Jwt - jwt?: string - - // Project access key - projectAccessKey?: string -} - -export interface PreparedTransactions { - transactions: commons.transaction.SimulatedTransaction[] - flatDecorated: commons.transaction.Transaction[] - feeOptions: FeeOption[] - feeQuote?: FeeQuote -} - -class Chain0Reader implements commons.reader.Reader { - async isDeployed(_wallet: string): Promise { - return false - } - - async implementation(_wallet: string): Promise { - return undefined - } - - async imageHash(_wallet: string): Promise { - return undefined - } - - async nonce(_wallet: string, _space: ethers.BigNumberish): Promise { - return 0n - } - - async isValidSignature(_wallet: string, _digest: ethers.BytesLike, _signature: ethers.BytesLike): Promise { - throw new Error('Method not supported.') - } -} - -export class Account { - public readonly address: string - - public readonly networks: NetworkConfig[] - public readonly tracker: tracker.ConfigTracker & migrator.PresignedMigrationTracker - public readonly contexts: commons.context.VersionedContext - - public readonly migrator: migrator.Migrator - public readonly migrations: migrator.Migrations - - private orchestrator: SignatureOrchestrator - - private jwt?: string - - private projectAccessKey?: string - - constructor(options: AccountOptions) { - this.address = ethers.getAddress(options.address) - - this.contexts = options.contexts - this.tracker = options.tracker - this.networks = options.networks - this.orchestrator = options.orchestrator - this.jwt = options.jwt - this.projectAccessKey = options.projectAccessKey - - this.migrations = options.migrations || defaults.DefaultMigrations - this.migrator = new migrator.Migrator(options.tracker, this.migrations, this.contexts) - } - - getSigner(chainId: ChainId, options?: AccountSignerOptions): AccountSigner { - return new AccountSigner(this, chainId, options) - } - - static async new(options: { - config: commons.config.SimpleConfig - tracker: tracker.ConfigTracker & migrator.PresignedMigrationTracker - contexts: commons.context.VersionedContext - orchestrator: SignatureOrchestrator - networks: NetworkConfig[] - migrations?: migrator.Migrations - projectAccessKey?: string - }): Promise { - const mig = new migrator.Migrator(options.tracker, options.migrations ?? defaults.DefaultMigrations, options.contexts) - - const lastMigration = mig.lastMigration() - const lastCoder = lastMigration.configCoder - - const config = lastCoder.fromSimple(options.config) - const imageHash = lastCoder.imageHashOf(config) - const context = options.contexts[lastMigration.version] - const address = commons.context.addressOf(context, imageHash) - - await options.tracker.saveCounterfactualWallet({ config, context: Object.values(options.contexts) }) - - return new Account({ - address, - tracker: options.tracker, - contexts: options.contexts, - networks: options.networks, - orchestrator: options.orchestrator, - migrations: options.migrations, - projectAccessKey: options.projectAccessKey - }) - } - - getAddress(): Promise { - return Promise.resolve(this.address) - } - - get version(): number { - return this.migrator.lastMigration().version - } - - get coders(): { - signature: commons.signature.SignatureCoder - config: commons.config.ConfigCoder - } { - const lastMigration = this.migrator.lastMigration() - - return { - signature: lastMigration.signatureCoder, - config: lastMigration.configCoder - } - } - - network(chainId: ethers.BigNumberish): NetworkConfig { - const tcid = BigInt(chainId) - const found = this.networks.find(n => tcid === BigInt(n.chainId)) - if (!found) throw new Error(`Network not found for chainId ${chainId}`) - return found - } - - providerFor(chainId: ethers.BigNumberish): ethers.Provider { - const found = this.network(chainId) - if (!found.provider && !found.rpcUrl) { - throw new Error(`Provider not found for chainId ${chainId}`) - } - - const network = new ethers.Network(found.name, found.chainId) - - return ( - found.provider || - new ethers.JsonRpcProvider(getFetchRequest(found.rpcUrl, this.projectAccessKey, this.jwt), network, { - staticNetwork: network - }) - ) - } - - reader(chainId: ethers.BigNumberish): commons.reader.Reader { - if (BigInt(chainId) === 0n) { - return new Chain0Reader() - } - - // TODO: Networks should be able to provide a reader directly - // and we should default to the on-chain reader - return new commons.reader.OnChainReader(this.providerFor(chainId)) - } - - relayer(chainId: ethers.BigNumberish): Relayer { - const found = this.network(chainId) - if (!found.relayer) throw new Error(`Relayer not found for chainId ${chainId}`) - if (isRelayer(found.relayer)) return found.relayer - return new RpcRelayer({ - ...found.relayer, - // we pass both projectAccessKey and jwtAuth because the projectAccessKey is - // used either for unauthenticated access, or gas sponsorship even if the jwtAuth is provided, - ...{ projectAccessKey: this.projectAccessKey, jwtAuth: this.jwt } - }) - } - - setOrchestrator(orchestrator: SignatureOrchestrator) { - this.orchestrator = orchestrator - } - - setJwt(jwt: string) { - this.jwt = jwt - } - - contextFor(version: number): commons.context.WalletContext { - const ctx = this.contexts[version] - if (!ctx) throw new Error(`Context not found for version ${version}`) - return ctx - } - - walletForStatus(chainId: ethers.BigNumberish, status: Pick & Pick): Wallet { - const coder = universal.coderFor(status.version) - return this.walletFor(chainId, this.contextFor(status.version), status.config, coder) - } - - walletFor( - chainId: ethers.BigNumberish, - context: commons.context.WalletContext, - config: commons.config.Config, - coders: typeof this.coders - ): Wallet { - const isNetworkZero = BigInt(chainId) === 0n - return new Wallet({ - config, - context, - chainId, - coders, - relayer: isNetworkZero ? undefined : this.relayer(chainId), - address: this.address, - orchestrator: this.orchestrator, - reader: this.reader(chainId) - }) - } - - // Get the status of the account on a given network - // this does the following process: - // 1. Get the current on-chain status of the wallet (version + imageHash) - // 2. Get any pending migrations that have been signed by the wallet - // 3. Get any pending configuration updates that have been signed by the wallet - // 4. Fetch reverse lookups for both on-chain and pending configurations - async status(chainId: ethers.BigNumberish, longestPath: boolean = false): Promise { - const isDeployedPromise = this.reader(chainId).isDeployed(this.address) - - const counterfactualImageHashPromise = this.tracker - .imageHashOfCounterfactualWallet({ - wallet: this.address - }) - .then(r => { - if (!r) throw new Error(`Counterfactual imageHash not found for wallet ${this.address}`) - return r - }) - - const counterFactualVersionPromise = counterfactualImageHashPromise.then(r => { - return version.counterfactualVersion(this.address, r.imageHash, Object.values(this.contexts)) - }) - - const onChainVersionPromise = (async () => { - const isDeployed = await isDeployedPromise - if (!isDeployed) return counterFactualVersionPromise - - const implementation = await this.reader(chainId).implementation(this.address) - if (!implementation) throw new Error(`Implementation not found for wallet ${this.address}`) - - const versions = Object.values(this.contexts) - for (let i = 0; i < versions.length; i++) { - if (versions[i].mainModule === implementation || versions[i].mainModuleUpgradable === implementation) { - return versions[i].version - } - } - - throw new Error(`Version not found for implementation ${implementation}`) - })() - - const onChainImageHashPromise = (async () => { - const deployedImageHash = await this.reader(chainId).imageHash(this.address) - if (deployedImageHash) return deployedImageHash - const counterfactualImageHash = await counterfactualImageHashPromise - if (counterfactualImageHash) return counterfactualImageHash.imageHash - throw new Error(`On-chain imageHash not found for wallet ${this.address}`) - })() - - const onChainConfigPromise = (async () => { - const onChainImageHash = await onChainImageHashPromise - const onChainConfig = await this.tracker.configOfImageHash({ imageHash: onChainImageHash }) - if (onChainConfig) return onChainConfig - throw new Error(`On-chain config not found for imageHash ${onChainImageHash}`) - })() - - const onChainVersion = await onChainVersionPromise - const onChainImageHash = await onChainImageHashPromise - - let fromImageHash = onChainImageHash - let lastVersion = onChainVersion - let signedMigrations: migrator.SignedMigration[] = [] - - if (onChainVersion !== this.version) { - // We either need to use the presigned configuration updates, or we haven't performed - // any updates yet, so we can only use the on-chain imageHash as-is - const presignedMigrate = await this.migrator.getAllMigratePresignedTransaction({ - address: this.address, - fromImageHash: onChainImageHash, - fromVersion: onChainVersion, - chainId - }) - - // The migrator returns the original version and imageHash - // if no presigned migration is found, so no need to check here - fromImageHash = presignedMigrate.lastImageHash - lastVersion = presignedMigrate.lastVersion - - signedMigrations = presignedMigrate.signedMigrations - } - - const presigned = await this.tracker.loadPresignedConfiguration({ - wallet: this.address, - fromImageHash: fromImageHash, - longestPath - }) - - const imageHash = presigned && presigned.length > 0 ? presigned[presigned.length - 1].nextImageHash : fromImageHash - const config = await this.tracker.configOfImageHash({ imageHash }) - if (!config) { - throw new Error(`Config not found for imageHash ${imageHash}`) - } - - const isDeployed = await isDeployedPromise - const counterfactualImageHash = await counterfactualImageHashPromise - const checkpoint = universal.coderFor(lastVersion).config.checkpointOf(config as any) - - return { - original: { - ...counterfactualImageHash, - version: await counterFactualVersionPromise - }, - onChain: { - imageHash: onChainImageHash, - config: await onChainConfigPromise, - version: onChainVersion, - deployed: isDeployed - }, - fullyMigrated: lastVersion === this.version, - signedMigrations, - version: lastVersion, - presignedConfigurations: presigned, - imageHash, - config, - checkpoint, - canOnchainValidate: onChainVersion === this.version && isDeployed - } - } - - private mustBeFullyMigrated(status: AccountStatus) { - if (!status.fullyMigrated) { - throw new Error(`Wallet ${this.address} is not fully migrated`) - } - } - - async predecorateSignedTransactions( - status: AccountStatus, - chainId: ethers.BigNumberish - ): Promise { - // Request signed predecorate transactions from child wallets - const bundles = await this.orchestrator.predecorateSignedTransactions({ chainId }) - // Get signed predecorate transaction - const predecorated = await this.predecorateTransactions([], status, chainId) - if (commons.transaction.fromTransactionish(this.address, predecorated).length > 0) { - // Sign it - bundles.push(await this.signTransactions(predecorated, chainId)) - } - return bundles - } - - async predecorateTransactions( - txs: commons.transaction.Transactionish, - status: AccountStatus, - chainId: ethers.BigNumberish - ): Promise { - txs = Array.isArray(txs) ? txs : [txs] - // if onchain wallet config is not up to date - // then we should append an extra transaction that updates it - // to the latest "lazy" state - if (status.onChain.imageHash !== status.imageHash) { - const wallet = this.walletForStatus(chainId, status) - const updateConfig = await wallet.buildUpdateConfigurationTransaction(status.config) - txs = [...txs, ...updateConfig.transactions] - } - - // On immutable chains, we add the WalletProxyHook - const { proxyImplementationHook } = this.contexts[status.config.version] - if (proxyImplementationHook && (chainId === ChainId.IMMUTABLE_ZKEVM || chainId === ChainId.IMMUTABLE_ZKEVM_TESTNET)) { - const provider = this.providerFor(chainId) - if (provider) { - const hook = new ethers.Contract(this.address, walletContracts.walletProxyHook.abi, provider) - let implementation - try { - implementation = await hook.PROXY_getImplementation() - } catch (e) { - // Handle below - console.log('Error getting implementation address', e) - } - if (!implementation || implementation === ethers.ZeroAddress) { - console.log('Adding wallet proxy hook') - const hooksInterface = new ethers.Interface(walletContracts.moduleHooks.abi) - const tx: commons.transaction.Transaction = { - to: this.address, - data: hooksInterface.encodeFunctionData(hooksInterface.getFunction('addHook')!, [ - '0x90611127', - proxyImplementationHook - ]), - gasLimit: 50000, // Expected ~28k gas. Buffer added - delegateCall: false, - revertOnError: false, - value: 0 - } - txs = [tx, ...txs] - } - } - } - - return txs - } - - async decorateTransactions( - bundles: commons.transaction.IntendedTransactionBundle | commons.transaction.IntendedTransactionBundle[], - status: AccountStatus, - chainId?: ethers.BigNumberish - ): Promise { - if (!Array.isArray(bundles)) { - // Recurse with array - return this.decorateTransactions([bundles], status, chainId) - } - - // Default to chainId of first bundle when not supplied - chainId = chainId ?? bundles[0].chainId - - const bootstrapBundle = await this.buildBootstrapTransactions(status, chainId) - const hasBootstrapTxs = bootstrapBundle.transactions.length > 0 - - if (!hasBootstrapTxs && bundles.length === 1) { - return bundles[0] - } - - // Intent defaults to first bundle when no bootstrap transaction - const { entrypoint } = hasBootstrapTxs ? bootstrapBundle : bundles[0] - - const decoratedBundle = { - entrypoint, - chainId, - // Intent of the first bundle is used - intent: bundles[0]?.intent, - transactions: [ - ...bootstrapBundle.transactions, - ...bundles.map( - (bundle): commons.transaction.Transaction => ({ - to: bundle.entrypoint, - data: commons.transaction.encodeBundleExecData(bundle), - gasLimit: 0, - delegateCall: false, - revertOnError: true, - value: 0 - }) - ) - ] - } - - // Re-compute the meta-transaction id to use the guest module subdigest - if (!status.onChain.deployed) { - const id = commons.transaction.subdigestOfGuestModuleTransactions( - this.contexts[this.version].guestModule, - chainId, - decoratedBundle.transactions - ) - - if (decoratedBundle.intent === undefined) { - decoratedBundle.intent = { id, wallet: this.address } - } else { - decoratedBundle.intent.id = id - } - } - - return decoratedBundle - } - - async decorateSignature( - signature: T, - status: Partial> - ): Promise { - if (!status.presignedConfigurations || status.presignedConfigurations.length === 0) { - return signature - } - - const coder = this.coders.signature - - const chain = status.presignedConfigurations.map(c => c.signature) - const chainedSignature = coder.chainSignatures(signature, chain) - return coder.trim(chainedSignature) - } - - async publishWitnessFor(signers: string[], chainId: ethers.BigNumberish = 0): Promise { - const digest = ethers.id(`This is a Sequence account woo! ${Date.now()}`) - - const status = await this.status(chainId) - const allOfAll = this.coders.config.fromSimple({ - threshold: signers.length, - checkpoint: 0, - signers: signers.map(s => ({ - address: s, - weight: 1 - })) - }) - - const wallet = this.walletFor(chainId, status.original.context, allOfAll, this.coders) - const signature = await wallet.signDigest(digest) - - const decoded = this.coders.signature.decode(signature) - const signatures = this.coders.signature.signaturesOfDecoded(decoded) - - if (signatures.length === 0) { - throw new Error('No signatures found') - } - - return this.tracker.saveWitnesses({ wallet: this.address, digest, chainId, signatures }) - } - - async publishWitness(): Promise { - const digest = ethers.id(`This is a Sequence account woo! ${Date.now()}`) - const signature = await this.signDigest(digest, 0, false) - const decoded = this.coders.signature.decode(signature) - const signatures = this.coders.signature.signaturesOfDecoded(decoded) - return this.tracker.saveWitnesses({ wallet: this.address, digest, chainId: 0, signatures }) - } - - async signDigest( - digest: ethers.BytesLike, - chainId: ethers.BigNumberish, - decorate: boolean = true, - cantValidateBehavior: 'ignore' | 'eip6492' | 'throw' = 'ignore', - metadata?: object - ): Promise { - // If we are signing a digest for chainId zero then we can never be fully migrated - // because Sequence v1 doesn't allow for signing a message on "all chains" - - // So we ignore the state on "chain zero" and instead use one of the states of the networks - // wallet-webapp should ensure the wallet is as migrated as possible, trying to mimic - // the behaviour of being migrated on all chains - const chainRef = BigInt(chainId) === 0n ? this.networks[0].chainId : chainId - const status = await this.status(chainRef) - this.mustBeFullyMigrated(status) - - // Check if we can validate onchain and what to do if we can't - // revert early, since there is no point in signing a digest now - if (!status.canOnchainValidate && cantValidateBehavior === 'throw') { - throw new Error('Wallet cannot validate onchain') - } - - const wallet = this.walletForStatus(chainId, status) - const signature = await wallet.signDigest(digest, metadata) - - const decorated = decorate ? this.decorateSignature(signature, status) : signature - - // If the wallet can't validate onchain then we - // need to prefix the decorated signature with all deployments and migrations - // aka doing a bootstrap using EIP-6492 - if (!status.canOnchainValidate) { - switch (cantValidateBehavior) { - // NOTICE: We covered this case before signing the digest - // case 'throw': - // throw new Error('Wallet cannot validate on-chain') - case 'ignore': - return decorated - - case 'eip6492': - return this.buildEIP6492Signature(await decorated, status, chainId) - } - } - - return decorated - } - - buildOnChainSignature(digest: ethers.BytesLike): { bundle: commons.transaction.TransactionBundle; signature: string } { - const subdigest = commons.signature.subdigestOf({ - digest: ethers.hexlify(digest), - chainId: 0, - address: this.address - }) - const hexSubdigest = ethers.hexlify(subdigest) - const config = this.coders.config.fromSimple({ - // Threshold *only* needs to be > 0, this is not a magic number - // we only use 2 ** 15 because it may lead to lower gas costs in some chains - threshold: 32768, - checkpoint: 0, - signers: [], - subdigests: [hexSubdigest] - }) - - const walletInterface = new ethers.Interface(walletContracts.mainModule.abi) - const bundle: commons.transaction.TransactionBundle = { - entrypoint: this.address, - transactions: [ - { - to: this.address, - data: walletInterface.encodeFunctionData( - // *NEVER* use updateImageHash here, as it would effectively destroy the wallet - // setExtraImageHash sets an additional imageHash, without changing the current one - 'setExtraImageHash', - [ - this.coders.config.imageHashOf(config), - // 2 ** 255 instead of max uint256, to have more zeros in the calldata - '57896044618658097711785492504343953926634992332820282019728792003956564819968' - ] - ), - // Conservative gas limit, used because the current relayer - // has trouble estimating gas for this transaction - gasLimit: 250000 - } - ] - } - - // Fire and forget request to save the config - this.tracker.saveWalletConfig({ config }) - - // Encode a signature proof for the given subdigest - // use `chainId = 0` to make it simpler, as this signature is only a proof - const signature = this.coders.signature.encodeSigners(config, new Map(), [hexSubdigest], 0).encoded - return { bundle, signature } - } - - private async buildEIP6492Signature(signature: string, status: AccountStatus, chainId: ethers.BigNumberish): Promise { - const bootstrapBundle = await this.buildBootstrapTransactions(status, chainId) - if (bootstrapBundle.transactions.length === 0) { - throw new Error('Cannot build EIP-6492 signature without bootstrap transactions') - } - - const encoded = ethers.AbiCoder.defaultAbiCoder().encode( - ['address', 'bytes', 'bytes'], - [bootstrapBundle.entrypoint, commons.transaction.encodeBundleExecData(bootstrapBundle), signature] - ) - - return ethers.solidityPacked(['bytes', 'bytes32'], [encoded, commons.EIP6492.EIP_6492_SUFFIX]) - } - - async editConfig(changes: { - add?: commons.config.SimpleSigner[] - remove?: string[] - threshold?: ethers.BigNumberish - }): Promise { - const currentConfig = await this.status(0).then(s => s.config) - const newConfig = this.coders.config.editConfig(currentConfig, { - ...changes, - checkpoint: this.coders.config.checkpointOf(currentConfig) + 1n - }) - - return this.updateConfig(newConfig) - } - - async updateConfig(config: commons.config.Config): Promise { - // config should be for the current version of the wallet - if (!this.coders.config.isWalletConfig(config)) { - throw new Error(`Invalid config for wallet ${this.address}`) - } - - const nextImageHash = this.coders.config.imageHashOf(config) - - // sign an update config struct - const updateStruct = this.coders.signature.hashSetImageHash(nextImageHash) - - // sign the update struct, using chain id 0 - const signature = await this.signDigest(updateStruct, 0, false) - - // save the presigned transaction to the sessions tracker - await this.tracker.savePresignedConfiguration({ - wallet: this.address, - nextConfig: config, - signature, - referenceChainId: 1 - }) - - // safety check, tracker should have a reverse lookup for the imageHash - // outside of the local cache - const reverseConfig = await this.tracker.configOfImageHash({ - imageHash: nextImageHash, - noCache: true - }) - - if (!reverseConfig || this.coders.config.imageHashOf(reverseConfig) !== nextImageHash) { - throw Error(`Reverse lookup failed for imageHash ${nextImageHash}`) - } - } - - /** - * This method is used to bootstrap the wallet on a given chain. - * this deploys the wallets and executes all the necessary transactions - * for that wallet to start working with the given version. - * - * This usually involves: (a) deploying the wallet, (b) executing migrations - * - * Notice: It should NOT explicitly include chained signatures. Unless internally used - * by any of the migrations. - * - */ - async buildBootstrapTransactions( - status: AccountStatus, - chainId: ethers.BigNumberish - ): Promise { - const bundle = await this.orchestrator.buildDeployTransaction({ chainId }) - const transactions: commons.transaction.Transaction[] = bundle?.transactions ?? [] - - // Add wallet deployment if needed - if (!status.onChain.deployed) { - let gasLimit: bigint | undefined - switch (BigInt(chainId)) { - case BigInt(ChainId.SKALE_NEBULA): - gasLimit = 10000000n - break - } - - // Wallet deployment will vary depending on the version - // so we need to use the context to get the correct deployment - const deployTransaction = Wallet.buildDeployTransaction(status.original.context, status.original.imageHash, gasLimit) - - transactions.push(...deployTransaction.transactions) - } - - // Get pending migrations - transactions.push( - ...status.signedMigrations.map(m => ({ - to: m.tx.entrypoint, - data: commons.transaction.encodeBundleExecData(m.tx), - value: 0, - gasLimit: 0, - revertOnError: true, - delegateCall: false - })) - ) - - // Build the transaction intent, if the transaction has migrations - // then we should use one of the intents of the migrations (anyone will do) - // if it doesn't, then the only intent we could use if the GuestModule one - // ... but this may fail if the relayer uses a different GuestModule - const id = - status.signedMigrations.length > 0 - ? status.signedMigrations[0].tx.intent.id - : commons.transaction.subdigestOfGuestModuleTransactions(this.contexts[this.version].guestModule, chainId, transactions) - - // Everything is encoded as a bundle - // using the GuestModule of the account version - const { guestModule } = this.contextFor(status.version) - return { entrypoint: guestModule, transactions, chainId, intent: { id, wallet: this.address } } - } - - async bootstrapTransactions( - chainId: ethers.BigNumberish, - prestatus?: AccountStatus - ): Promise> { - const status = prestatus || (await this.status(chainId)) - return this.buildBootstrapTransactions(status, chainId) - } - - async doBootstrap(chainId: ethers.BigNumberish, feeQuote?: FeeQuote, prestatus?: AccountStatus) { - const bootstrapTxs = await this.bootstrapTransactions(chainId, prestatus) - return this.relayer(chainId).relay({ ...bootstrapTxs, chainId }, feeQuote) - } - - /** - * Signs a message. - * - * This method will sign the message using the account associated with this signer - * and the specified chain ID. If the message is already prefixed with the EIP-191 - * prefix, it will be hashed directly. Otherwise, it will be prefixed before hashing. - * - * @param message - The message to sign. Can be a string or BytesLike. - * @param chainId - The chain ID to use for signing - * @param cantValidateBehavior - Behavior when the wallet cannot validate on-chain - * @returns A Promise that resolves to the signature as a hexadecimal string - */ - signMessage( - message: ethers.BytesLike, - chainId: ethers.BigNumberish, - cantValidateBehavior: 'ignore' | 'eip6492' | 'throw' = 'ignore' - ): Promise { - const messageHex = ethers.hexlify(message); - const prefixHex = ethers.hexlify(ethers.toUtf8Bytes(MessagePrefix)); - - let digest: string; - - // We check if the message is already prefixed with EIP-191 - // This will avoid breaking changes for codebases where the message is already prefixed - if (messageHex.substring(2).startsWith(prefixHex.substring(2))) { - digest = ethers.keccak256(message); - } else { - digest = ethers.hashMessage(message); - } - - return this.signDigest(digest, chainId, true, cantValidateBehavior); - } - - async signTransactions( - txs: commons.transaction.Transactionish, - chainId: ethers.BigNumberish, - pstatus?: AccountStatus, - options?: { - nonceSpace?: ethers.BigNumberish - serial?: boolean - } - ): Promise { - const status = pstatus || (await this.status(chainId)) - this.mustBeFullyMigrated(status) - - const wallet = this.walletForStatus(chainId, status) - - const metadata: commons.WalletSignRequestMetadata = { - address: this.address, - digest: '', // Set in wallet.signTransactions - chainId, - config: { version: this.version }, - decorate: true, - cantValidateBehavior: 'ignore' - } - - const nonceOptions = options?.serial - ? { serial: true } - : options?.nonceSpace !== undefined - ? { space: options.nonceSpace } - : undefined - - const signed = await wallet.signTransactions(txs, nonceOptions, metadata) - - return { - ...signed, - signature: await this.decorateSignature(signed.signature, status) - } - } - - async signMigrations( - chainId: ethers.BigNumberish, - editConfig: (prevConfig: commons.config.Config) => commons.config.Config - ): Promise { - const status = await this.status(chainId) - if (status.fullyMigrated) return false - - const wallet = this.walletForStatus(chainId, status) - const nextConfig = editConfig(wallet.config) - const signed = await this.migrator.signNextMigration(this.address, status.version, wallet, nextConfig) - if (!signed) return false - - // Make sure the tracker has a copy of the config - // before attempting to save the migration - // otherwise if this second step fails the tracker could end up - // with a migration to an unknown config - await this.tracker.saveWalletConfig({ config: nextConfig }) - const nextCoder = universal.coderFor(nextConfig.version).config - const nextImageHash = nextCoder.imageHashOf(nextConfig as any) - const reverseConfig = await this.tracker.configOfImageHash({ imageHash: nextImageHash, noCache: true }) - if (!reverseConfig || nextCoder.imageHashOf(reverseConfig as any) !== nextImageHash) { - throw Error(`Reverse lookup failed for imageHash ${nextImageHash}`) - } - - await this.tracker.saveMigration(this.address, signed, this.contexts) - - return true - } - - async signAllMigrations( - editConfig: (prevConfig: commons.config.Config) => commons.config.Config - ): Promise<{ signedMigrations: Array; failedChains: number[] }> { - const failedChains: number[] = [] - const signedMigrations = await Promise.all( - this.networks.map(async n => { - try { - // Signing migrations for each chain - return await this.signMigrations(n.chainId, editConfig) - } catch (error) { - console.warn(`Failed to sign migrations for chain ${n.chainId}`, error) - - // Adding failed chainId to the failedChains array - failedChains.push(n.chainId) - // Using null as a placeholder for failed chains - return null - } - }) - ) - - // Filter out null values to get only the successful signed migrations - const successfulSignedMigrations = signedMigrations.filter(migration => migration !== null) - - return { signedMigrations: successfulSignedMigrations, failedChains } - } - - async isMigratedAllChains(): Promise<{ migratedAllChains: boolean; failedChains: number[] }> { - const failedChains: number[] = [] - const statuses = await Promise.all( - this.networks.map(async n => { - try { - return await this.status(n.chainId) - } catch (error) { - failedChains.push(n.chainId) - - console.warn(`Failed to get status for chain ${n.chainId}`, error) - - // default to true for failed chains - return { fullyMigrated: true } - } - }) - ) - - const migratedAllChains = statuses.every(s => s.fullyMigrated) - return { migratedAllChains, failedChains } - } - - async sendSignedTransactions( - signedBundle: commons.transaction.IntendedTransactionBundle | commons.transaction.IntendedTransactionBundle[], - chainId: ethers.BigNumberish, - quote?: FeeQuote, - pstatus?: AccountStatus, - callback?: (bundle: commons.transaction.IntendedTransactionBundle) => void, - projectAccessKey?: string - ): Promise { - if (!Array.isArray(signedBundle)) { - return this.sendSignedTransactions([signedBundle], chainId, quote, pstatus, callback, projectAccessKey) - } - const status = pstatus || (await this.status(chainId)) - this.mustBeFullyMigrated(status) - - const decoratedBundle = await this.decorateTransactions(signedBundle, status, chainId) - callback?.(decoratedBundle) - - return this.relayer(chainId).relay(decoratedBundle, quote, undefined, projectAccessKey) - } - - async fillGasLimits( - txs: commons.transaction.Transactionish, - chainId: ethers.BigNumberish, - status?: AccountStatus - ): Promise { - const wallet = this.walletForStatus(chainId, status || (await this.status(chainId))) - return wallet.fillGasLimits(txs) - } - - async gasRefundQuotes( - txs: commons.transaction.Transactionish, - chainId: ethers.BigNumberish, - stubSignatureOverrides: Map, - status?: AccountStatus, - options?: { - simulate?: boolean - projectAccessKey?: string - } - ): Promise<{ - options: FeeOption[] - quote?: FeeQuote - decorated: commons.transaction.IntendedTransactionBundle - }> { - const wstatus = status || (await this.status(chainId)) - const wallet = this.walletForStatus(chainId, wstatus) - - const predecorated = await this.predecorateTransactions(txs, wstatus, chainId) - const transactions = commons.transaction.fromTransactionish(this.address, predecorated) - - // We can't sign the transactions (because we don't want to bother the user) - // so we use the latest configuration to build a "stub" signature, the relayer - // knows to ignore the wallet signatures - const stubSignature = wallet.coders.config.buildStubSignature(wallet.config, stubSignatureOverrides) - - // Now we can decorate the transactions as always, but we need to manually build the signed bundle - const intentId = ethers.hexlify(ethers.randomBytes(32)) - const signedBundle: commons.transaction.SignedTransactionBundle = { - chainId, - intent: { - id: intentId, - wallet: this.address - }, - signature: stubSignature, - transactions, - entrypoint: this.address, - nonce: 0 // The relayer also ignored the nonce - } - - const decoratedBundle = await this.decorateTransactions(signedBundle, wstatus) - const data = commons.transaction.encodeBundleExecData(decoratedBundle) - const res = await this.relayer(chainId).getFeeOptionsRaw(decoratedBundle.entrypoint, data, options) - return { ...res, decorated: decoratedBundle } - } - - async prepareTransactions(args: { - txs: commons.transaction.Transactionish - chainId: ethers.BigNumberish - stubSignatureOverrides: Map - simulateForFeeOptions?: boolean - projectAccessKey?: string - }): Promise { - const status = await this.status(args.chainId) - - const transactions = await this.fillGasLimits(args.txs, args.chainId, status) - const gasRefundQuote = await this.gasRefundQuotes(transactions, args.chainId, args.stubSignatureOverrides, status, { - simulate: args.simulateForFeeOptions, - projectAccessKey: args.projectAccessKey - }) - const flatDecorated = commons.transaction.unwind(this.address, gasRefundQuote.decorated.transactions) - - return { - transactions, - flatDecorated, - feeOptions: gasRefundQuote.options, - feeQuote: gasRefundQuote.quote - } - } - - async sendTransaction( - txs: commons.transaction.Transactionish, - chainId: ethers.BigNumberish, - quote?: FeeQuote, - skipPreDecorate: boolean = false, - callback?: (bundle: commons.transaction.IntendedTransactionBundle) => void, - options?: { - nonceSpace?: ethers.BigNumberish - serial?: boolean - projectAccessKey?: string - } - ): Promise { - const status = await this.status(chainId) - - const predecorated = skipPreDecorate ? txs : await this.predecorateTransactions(txs, status, chainId) - const hasTxs = commons.transaction.fromTransactionish(this.address, predecorated).length > 0 - const signed = hasTxs ? await this.signTransactions(predecorated, chainId, undefined, options) : undefined - - const childBundles = await this.orchestrator.predecorateSignedTransactions({ chainId }) - - const bundles: commons.transaction.SignedTransactionBundle[] = [] - if (signed !== undefined && signed.transactions.length > 0) { - bundles.push(signed) - } - bundles.push(...childBundles.filter(b => b.transactions.length > 0)) - - return this.sendSignedTransactions(bundles, chainId, quote, undefined, callback, options?.projectAccessKey) - } - - async signTypedData( - domain: ethers.TypedDataDomain, - types: Record>, - message: Record, - chainId: ethers.BigNumberish, - cantValidateBehavior: 'ignore' | 'eip6492' | 'throw' = 'ignore' - ): Promise { - const digest = encodeTypedDataDigest({ domain, types, message }) - return this.signDigest(digest, chainId, true, cantValidateBehavior) - } - - async getSigners(): Promise> { - const last = (ts: T[]): T | undefined => (ts.length ? ts[ts.length - 1] : undefined) - - return ( - await Promise.all( - this.networks.map(async ({ chainId, name }) => { - try { - const status = await this.status(chainId) - - let latestImageHash = last(status.presignedConfigurations)?.nextImageHash - if (!latestImageHash) { - if (status.onChain.version !== status.version) { - const migration = last(status.signedMigrations) - if (migration) { - const { toVersion, toConfig } = migration - const coder = universal.genericCoderFor(toVersion) - latestImageHash = coder.config.imageHashOf(toConfig) - } - } - } - if (!latestImageHash) { - latestImageHash = status.onChain.imageHash - } - - const latestConfig = await this.tracker.configOfImageHash({ imageHash: latestImageHash }) - if (!latestConfig) { - throw new Error(`unable to find config for image hash ${latestImageHash}`) - } - - const coder = universal.genericCoderFor(latestConfig.version) - const signers = coder.config.signersOf(latestConfig) - - return signers.map(signer => ({ ...signer, network: chainId })) - } catch (error) { - console.warn(`unable to get signers on network ${chainId} ${name}`, error) - return [] - } - }) - ) - ).flat() - } - - async getAllSigners(): Promise< - { - address: string - weight: number - network: number - flaggedForRemoval: boolean - }[] - > { - const allSigners: { - address: string - weight: number - network: number - flaggedForRemoval: boolean - }[] = [] - - // We need to get the signers for each status - await Promise.all( - this.networks.map(async network => { - const chainId = network.chainId - - // Getting the status with `longestPath` set to true will give us all the possible configurations - // between the current onChain config and the latest config, including the ones "flagged for removal" - const status = await this.status(chainId, true) - - const fullChain = [ - status.onChain.imageHash, - ...(status.onChain.version !== status.version - ? status.signedMigrations.map(m => universal.coderFor(m.toVersion).config.imageHashOf(m.toConfig as any)) - : []), - ...status.presignedConfigurations.map(update => update.nextImageHash) - ] - - return Promise.all( - fullChain.map(async (nextImageHash, iconf) => { - const isLast = iconf === fullChain.length - 1 - const config = await this.tracker.configOfImageHash({ imageHash: nextImageHash }) - - if (!config) { - console.warn(`AllSigners may be incomplete, config not found for imageHash ${nextImageHash}`) - return - } - - const coder = universal.genericCoderFor(config.version) - const signers = coder.config.signersOf(config) - - signers.forEach(signer => { - const exists = allSigners.find(s => s.address === signer.address && s.network === chainId) - - if (exists && isLast && exists.flaggedForRemoval) { - exists.flaggedForRemoval = false - return - } - - if (exists) return - - allSigners.push({ - address: signer.address, - weight: signer.weight, - network: chainId, - flaggedForRemoval: !isLast - }) - }) - }) - ) - }) - ) - - return allSigners - } -} - -export function isAccount(value: any): value is Account { - return value instanceof Account -} diff --git a/old/packages/account/src/index.ts b/old/packages/account/src/index.ts deleted file mode 100644 index 8a695b2e2..000000000 --- a/old/packages/account/src/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './account' diff --git a/old/packages/account/src/orchestrator/wrapper.ts b/old/packages/account/src/orchestrator/wrapper.ts deleted file mode 100644 index 9efa34af1..000000000 --- a/old/packages/account/src/orchestrator/wrapper.ts +++ /dev/null @@ -1,69 +0,0 @@ -import { commons } from '@0xsequence/core' -import { signers, Status } from '@0xsequence/signhub' -import { ethers } from 'ethers' -import { Account } from '../account' - -export type MetadataWithChainId = { - chainId: ethers.BigNumberish -} - -// Implements a wrapper for using Sequence accounts as nested signers in the signhub orchestrator. -export class AccountOrchestratorWrapper implements signers.SapientSigner { - constructor(public account: Account) {} - - async getAddress(): Promise { - return this.account.address - } - - getChainIdFromMetadata(metadata: object): bigint { - try { - const { chainId } = metadata as MetadataWithChainId - return BigInt(chainId) - } catch (err) { - // Invalid metadata object - throw new Error('AccountOrchestratorWrapper only supports metadata with chain id') - } - } - - async buildDeployTransaction(metadata: object): Promise { - const chainId = this.getChainIdFromMetadata(metadata) - const status = await this.account.status(chainId) - return this.account.buildBootstrapTransactions(status, chainId) - } - - async predecorateSignedTransactions(metadata: object): Promise { - const chainId = this.getChainIdFromMetadata(metadata) - const status = await this.account.status(chainId) - return this.account.predecorateSignedTransactions(status, chainId) - } - - async decorateTransactions( - bundle: commons.transaction.IntendedTransactionBundle, - metadata: object - ): Promise { - const chainId = this.getChainIdFromMetadata(metadata) - const status = await this.account.status(chainId) - return this.account.decorateTransactions(bundle, status) - } - - sign(message: ethers.BytesLike, metadata: object): Promise { - if (!commons.isWalletSignRequestMetadata(metadata)) { - throw new Error('AccountOrchestratorWrapper only supports wallet metadata requests') - } - - const { chainId, decorate } = metadata - // EIP-6492 not supported on nested signatures - // Default to throw instead of ignore. Ignoring should be explicit - const cantValidateBehavior = metadata.cantValidateBehavior ?? 'throw' - - // For Sequence nested signatures we must use `signDigest` and not `signMessage` - // otherwise the account will hash the digest and the signature will be invalid. - return this.account.signDigest(message, chainId, decorate, cantValidateBehavior, metadata) - } - - notifyStatusChange(_i: string, _s: Status, _m: object): void {} - - suffix(): ethers.BytesLike { - return new Uint8Array([3]) - } -} diff --git a/old/packages/account/src/signer.ts b/old/packages/account/src/signer.ts deleted file mode 100644 index 093e4f34d..000000000 --- a/old/packages/account/src/signer.ts +++ /dev/null @@ -1,241 +0,0 @@ -import { ChainId } from '@0xsequence/network' -import { Account } from './account' -import { ethers } from 'ethers' -import { commons } from '@0xsequence/core' -import { FeeOption, proto } from '@0xsequence/relayer' -import { toHexString } from '@0xsequence/utils' - -export type AccountSignerOptions = { - nonceSpace?: ethers.BigNumberish - cantValidateBehavior?: 'ignore' | 'eip6492' | 'throw' - stubSignatureOverrides?: Map - selectFee?: ( - txs: ethers.TransactionRequest | commons.transaction.Transactionish, - options: FeeOption[] - ) => Promise -} - -function encodeGasRefundTransaction(option?: FeeOption) { - if (!option) return [] - - const value = BigInt(option.value) - - switch (option.token.type) { - case proto.FeeTokenType.UNKNOWN: - return [ - { - delegateCall: false, - revertOnError: true, - gasLimit: option.gasLimit, - to: option.to, - value: toHexString(value), - data: '0x' - } - ] - - case proto.FeeTokenType.ERC20_TOKEN: - if (!option.token.contractAddress) { - throw new Error(`No contract address for ERC-20 fee option`) - } - - return [ - { - delegateCall: false, - revertOnError: true, - gasLimit: option.gasLimit, - to: option.token.contractAddress, - value: 0, - data: new ethers.Interface([ - { - constant: false, - inputs: [{ type: 'address' }, { type: 'uint256' }], - name: 'transfer', - outputs: [], - type: 'function' - } - ]).encodeFunctionData('transfer', [option.to, toHexString(value)]) - } - ] - - default: - throw new Error(`Unhandled fee token type ${option.token.type}`) - } -} - -export class AccountSigner implements ethers.AbstractSigner { - constructor( - public account: Account, - public chainId: ChainId, - public readonly options?: AccountSignerOptions - ) {} - - get provider() { - return this.account.providerFor(this.chainId) - } - - async getAddress(): Promise { - return this.account.address - } - - /** - * Signs a message. - * - * This method will sign the message using the account associated with this signer - * and the specified chain ID. The message is already being prefixed with the EIP-191 prefix. - * - * @param message - The message to sign. Can be a string or BytesLike. - * @returns A Promise that resolves to the signature as a hexadecimal string - * - * @example - * ```typescript - * const signer = account.getSigner(chainId) - * - * const message = "Hello, Sequence!"; - * const signature = await signer.signMessage(message); - * console.log(signature); - * // => "0x123abc..." (hexadecimal signature) - */ - signMessage(message: string | ethers.BytesLike): Promise { - return this.account.signMessage(message, this.chainId, this.options?.cantValidateBehavior ?? 'throw') - } - - signTypedData( - domain: ethers.TypedDataDomain, - types: Record>, - value: Record - ): Promise { - return this.account.signTypedData(domain, types, value, this.chainId, this.options?.cantValidateBehavior ?? 'throw') - } - - private async defaultSelectFee(_txs: commons.transaction.Transactionish, options: FeeOption[]): Promise { - // If no options, return undefined - if (options.length === 0) return undefined - - // If there are multiple options, try them one by one - // until we find one that satisfies the balance requirement - const balanceOfAbi = [ - { - constant: true, - inputs: [{ type: 'address' }], - name: 'balanceOf', - outputs: [{ type: 'uint256' }], - type: 'function' - } - ] - - for (const option of options) { - if (option.token.type === proto.FeeTokenType.UNKNOWN) { - // Native token - const balance = await this.getBalance() - if (balance >= BigInt(option.value)) { - return option - } - } else if (option.token.contractAddress && option.token.type === proto.FeeTokenType.ERC20_TOKEN) { - // ERC20 token - const token = new ethers.Contract(option.token.contractAddress, balanceOfAbi, this.provider) - const balance = await token.balanceOf(this.account.address) - if (balance >= BigInt(option.value)) { - return option - } - } else { - // Unsupported token type - } - } - - throw new Error('No fee option available - not enough balance') - } - - async sendTransaction( - txs: commons.transaction.Transactionish, - options?: { - simulateForFeeOptions?: boolean - } - ): Promise { - const prepare = await this.account.prepareTransactions({ - txs, - chainId: this.chainId, - stubSignatureOverrides: this.options?.stubSignatureOverrides ?? new Map(), - simulateForFeeOptions: options?.simulateForFeeOptions - }) - - const selectMethod = this.options?.selectFee ?? this.defaultSelectFee.bind(this) - const feeOption = await selectMethod(txs, prepare.feeOptions) - - const finalTransactions = [...prepare.transactions, ...encodeGasRefundTransaction(feeOption)] - - return this.account.sendTransaction( - finalTransactions, - this.chainId, - prepare.feeQuote, - undefined, - undefined, - this.options?.nonceSpace !== undefined - ? { - nonceSpace: this.options.nonceSpace - } - : undefined - ) as Promise // Will always have a transaction response - } - - getBalance(blockTag?: ethers.BlockTag | undefined): Promise { - return this.provider.getBalance(this.account.address, blockTag) - } - - call(transaction: ethers.TransactionRequest, blockTag?: ethers.BlockTag): Promise { - return this.provider.call({ ...transaction, blockTag }) - } - - async resolveName(name: string): Promise { - const res = await this.provider.resolveName(name) - if (!res) throw new Error(`Could not resolve name ${name}`) - return res - } - - connect(_provider: ethers.Provider): ethers.Signer { - throw new Error('Method not implemented.') - } - - signTransaction(transaction: ethers.TransactionRequest): Promise { - throw new Error('Method not implemented.') - } - - getTransactionCount(blockTag?: ethers.BlockTag | undefined): Promise { - throw new Error('Method not implemented.') - } - - estimateGas(transaction: ethers.TransactionRequest): Promise { - throw new Error('Method not implemented.') - } - - getChainId(): Promise { - return Promise.resolve(Number(this.chainId)) - } - - getGasPrice(): Promise { - throw new Error('Method not implemented.') - } - - getFeeData(): Promise { - throw new Error('Method not implemented.') - } - - getNonce(blockTag?: ethers.BlockTag): Promise { - throw new Error('Method not implemented.') - } - - populateCall(tx: ethers.TransactionRequest): Promise> { - throw new Error('Method not implemented.') - } - - checkTransaction(transaction: ethers.TransactionRequest): ethers.TransactionRequest { - throw new Error('Method not implemented.') - } - - async populateTransaction(tx: ethers.TransactionRequest): Promise> { - throw new Error('Method not implemented.') - } - - _checkProvider(operation?: string | undefined): void { - throw new Error('Method not implemented.') - } -} diff --git a/old/packages/account/tests/account.spec.ts b/old/packages/account/tests/account.spec.ts deleted file mode 100644 index a21b6ea8b..000000000 --- a/old/packages/account/tests/account.spec.ts +++ /dev/null @@ -1,1561 +0,0 @@ -import { walletContracts } from '@0xsequence/abi' -import { commons, v1, v2 } from '@0xsequence/core' -import type { migrator } from '@0xsequence/migration' -import type { NetworkConfig } from '@0xsequence/network' -import { LocalRelayer, Relayer } from '@0xsequence/relayer' -import { tracker, trackers } from '@0xsequence/sessions' -import { Orchestrator } from '@0xsequence/signhub' -import * as utils from '@0xsequence/tests' -import { Wallet } from '@0xsequence/wallet' -import * as chai from 'chai' -import chaiAsPromised from 'chai-as-promised' -import { concat, ethers, MessagePrefix, toUtf8Bytes } from 'ethers' -import hardhat from 'hardhat' - -import { Account } from '../src/account' -import { AccountOrchestratorWrapper } from '../src/orchestrator/wrapper' - -const { expect } = chai.use(chaiAsPromised) - -const deterministic = false - -describe('Account', () => { - let provider1: ethers.BrowserProvider - let provider2: ethers.JsonRpcProvider - - let signer1: ethers.Signer - let signer2: ethers.Signer - - let contexts: commons.context.VersionedContext - let networks: NetworkConfig[] - - let tracker: tracker.ConfigTracker & migrator.PresignedMigrationTracker - - let defaultArgs: { - contexts: commons.context.VersionedContext - networks: NetworkConfig[] - tracker: tracker.ConfigTracker & migrator.PresignedMigrationTracker - } - - let defaultTx: commons.transaction.Transaction - - const createNestedAccount = async (entropy: string, bootstrapInner = true, bootstrapOuter = true) => { - const signer = randomWallet(entropy) - - const configInner = { - threshold: 1, - checkpoint: Math.floor(now() / 1000), - signers: [{ address: signer.address, weight: 1 }] - } - const accountInner = await Account.new({ - ...defaultArgs, - config: configInner, - orchestrator: new Orchestrator([signer]) - }) - if (bootstrapInner) { - await accountInner.doBootstrap(networks[0].chainId) - } - - const configOuter = { - threshold: 1, - checkpoint: Math.floor(now() / 1000), - signers: [{ address: accountInner.address, weight: 1 }] - } - const accountOuter = await Account.new({ - ...defaultArgs, - config: configOuter, - orchestrator: new Orchestrator([new AccountOrchestratorWrapper(accountInner)]) - }) - if (bootstrapOuter) { - await accountOuter.doBootstrap(networks[0].chainId) - } - - return { signer, accountInner, accountOuter } - } - - const getEth = async (address: string, signer?: ethers.Signer) => { - if (signer === undefined) { - // Do both networks - await getEth(address, signer1) - await getEth(address, signer2) - return - } - // Signer sends the address some ETH for defaultTx use - const tx = await signer.sendTransaction({ - to: address, - value: 10 // Should be plenty - }) - await tx.wait() - } - - before(async () => { - provider1 = new ethers.BrowserProvider(hardhat.network.provider as any, undefined, { cacheTimeout: -1 }) - provider2 = new ethers.JsonRpcProvider('http://127.0.0.1:7048', undefined, { cacheTimeout: -1 }) - - // TODO: Implement migrations on local config tracker - tracker = new trackers.local.LocalConfigTracker(provider1) - - signer1 = await provider1.getSigner() - signer2 = await provider2.getSigner() - - networks = [ - { - chainId: 31337, - name: 'hardhat', - provider: provider1, - rpcUrl: '', - relayer: new LocalRelayer(signer1), - nativeToken: { - symbol: 'ETH', - name: 'Ether', - decimals: 18 - } - }, - { - chainId: 31338, - name: 'hardhat2', - provider: provider2, - rpcUrl: 'http://127.0.0.1:7048', - relayer: new LocalRelayer(signer2), - nativeToken: { - symbol: 'ETH', - name: 'Ether', - decimals: 18 - } - } - ] - - const context1 = utils.context.deploySequenceContexts(signer1) - const context2 = utils.context.deploySequenceContexts(signer2) - expect(await context1).to.deep.equal(await context2) - contexts = await context1 - - defaultArgs = { - contexts, - networks, - tracker - } - - defaultTx = { - to: await signer1.getAddress(), - value: 1 - } - }) - - describe('New account', () => { - it('Should create a new account', async () => { - const signer = randomWallet('Should create a new account') - const config = { - threshold: 1, - checkpoint: Math.floor(now() / 1000), - signers: [{ address: signer.address, weight: 1 }] - } - - const account = await Account.new({ - ...defaultArgs, - config, - orchestrator: new Orchestrator([signer]) - }) - - expect(account).to.be.instanceOf(Account) - expect(account.address).to.not.be.undefined - - await getEth(account.address) - const tx = await account.sendTransaction([defaultTx], networks[0].chainId) - expect(tx).to.not.be.undefined - - const status = await account.status(networks[0].chainId) - expect(status.fullyMigrated).to.be.true - expect(status.onChain.deployed).to.be.true - expect(status.onChain.version).to.equal(2) - }) - - it('Should create new nested accounts', async () => { - const { accountInner, accountOuter } = await createNestedAccount('create new nested accounts', false, false) - - await getEth(accountOuter.address) - await accountOuter.sendTransaction([defaultTx], networks[0].chainId) - - const statusOuter = await accountOuter.status(networks[0].chainId) - - expect(statusOuter.fullyMigrated).to.be.true - expect(statusOuter.onChain.deployed).to.be.true - expect(statusOuter.onChain.version).to.equal(2) - - const statusInner = await accountInner.status(networks[0].chainId) - expect(statusInner.fullyMigrated).to.be.true - expect(statusInner.onChain.deployed).to.be.true - expect(statusInner.onChain.version).to.equal(2) - }) - - it('Should send tx on nested accounts', async () => { - const { accountInner, accountOuter } = await createNestedAccount('sent tx on nested accounts', true, true) - - await getEth(accountOuter.address) - await accountOuter.sendTransaction([defaultTx], networks[0].chainId) - - const statusOuter = await accountOuter.status(networks[0].chainId) - - expect(statusOuter.fullyMigrated).to.be.true - expect(statusOuter.onChain.deployed).to.be.true - expect(statusOuter.onChain.version).to.equal(2) - - const statusInner = await accountInner.status(networks[0].chainId) - expect(statusInner.fullyMigrated).to.be.true - expect(statusInner.onChain.deployed).to.be.true - expect(statusInner.onChain.version).to.equal(2) - }) - - it('Should send transactions on multiple networks', async () => { - const signer = randomWallet('Should send transactions on multiple networks') - const config = { - threshold: 1, - checkpoint: Math.floor(now() / 1000), - signers: [{ address: signer.address, weight: 1 }] - } - - const account = await Account.new({ - ...defaultArgs, - config, - orchestrator: new Orchestrator([signer]) - }) - - await getEth(account.address) - await account.sendTransaction([defaultTx], networks[0].chainId) - await account.sendTransaction([defaultTx], networks[1].chainId) - - const status1 = await account.status(networks[0].chainId) - const status2 = await account.status(networks[1].chainId) - - expect(status1.fullyMigrated).to.be.true - expect(status1.onChain.deployed).to.be.true - expect(status1.onChain.version).to.equal(2) - - expect(status2.fullyMigrated).to.be.true - expect(status2.onChain.deployed).to.be.true - expect(status2.onChain.version).to.equal(2) - }) - - it('Should create a new account with many signers', async () => { - const signers = new Array(24).fill(0).map(() => randomWallet('Should create a new account with many signers')) - const config = { - threshold: 3, - checkpoint: Math.floor(now() / 1000), - signers: signers.map(signer => ({ - address: signer.address, - weight: 1 - })) - } - - const rsigners = signers.sort(() => randomFraction('Should create a new account with many signers 2') - 0.5) - const account = await Account.new({ - ...defaultArgs, - config, - orchestrator: new Orchestrator(rsigners.slice(0, 4)) - }) - - await getEth(account.address) - await account.sendTransaction([defaultTx], networks[0].chainId) - - const status = await account.status(networks[0].chainId) - expect(status.fullyMigrated).to.be.true - expect(status.onChain.deployed).to.be.true - expect(status.onChain.version).to.equal(2) - }) - - it('Should sign and validate a message', async () => { - const signer = randomWallet('Should sign and validate a message') - const config = { - threshold: 1, - checkpoint: Math.floor(now() / 1000), - signers: [{ address: signer.address, weight: 1 }] - } - - const account = await Account.new({ - ...defaultArgs, - config, - orchestrator: new Orchestrator([signer]) - }) - - await account.doBootstrap(networks[0].chainId) - - const msg = ethers.toUtf8Bytes('Hello World') - const sig = await account.signMessage(msg, networks[0].chainId) - - const valid = await commons.EIP1271.isValidEIP1271Signature( - account.address, - ethers.hashMessage(msg), - sig, - networks[0].provider! - ) - - expect(valid).to.be.true - }) - - it('Should sign and validate a message with nested account', async () => { - const { accountOuter } = await createNestedAccount('sign and validate nested') - - const msg = ethers.toUtf8Bytes('Hello World') - const sig = await accountOuter.signMessage(msg, networks[0].chainId) - - const valid = await commons.EIP1271.isValidEIP1271Signature( - accountOuter.address, - ethers.hashMessage(msg), - sig, - networks[0].provider! - ) - - expect(valid).to.be.true - }) - - it('Should update account to new configuration', async () => { - const signer = randomWallet('Should update account to new configuration') - const simpleConfig1 = { - threshold: 1, - checkpoint: Math.floor(now() / 1000), - signers: [{ address: signer.address, weight: 1 }] - } - const config1 = v2.config.ConfigCoder.fromSimple(simpleConfig1) - - const account = await Account.new({ - ...defaultArgs, - config: simpleConfig1, - orchestrator: new Orchestrator([signer]) - }) - - const signer2a = randomWallet('Should update account to new configuration 2') - const signer2b = randomWallet('Should update account to new configuration 3') - - const simpleConfig2 = { - threshold: 4, - checkpoint: Math.floor(now() / 1000) + 1, - signers: [ - { - address: signer2a.address, - weight: 2 - }, - { - address: signer2b.address, - weight: 2 - } - ] - } - - const config2 = v2.config.ConfigCoder.fromSimple(simpleConfig2) - await account.updateConfig(config2) - - const status2 = await account.status(networks[0].chainId) - expect(status2.fullyMigrated).to.be.true - expect(status2.onChain.deployed).to.be.false - expect(status2.onChain.version).to.equal(2) - expect(status2.onChain.imageHash).to.deep.equal(v2.config.ConfigCoder.imageHashOf(config1)) - expect(status2.imageHash).to.deep.equal(v2.config.ConfigCoder.imageHashOf(config2)) - }) - - it('Should sign and validate a message without being deployed', async () => { - const signer = randomWallet('Should sign and validate a message without being deployed') - const config = { - threshold: 1, - checkpoint: Math.floor(now() / 1000), - signers: [{ address: signer.address, weight: 1 }] - } - - const account = await Account.new({ - ...defaultArgs, - config, - orchestrator: new Orchestrator([signer]) - }) - - const msg = ethers.toUtf8Bytes('Hello World') - const sig = await account.signMessage(msg, networks[0].chainId, 'eip6492') - - const valid = await account.reader(networks[0].chainId).isValidSignature(account.address, ethers.hashMessage(msg), sig) - - expect(valid).to.be.true - }) - - it('Should sign and validate a message without being deployed with nested account', async () => { - const { accountOuter } = await createNestedAccount('sign and validate nested undeployed', true, false) - - const msg = ethers.toUtf8Bytes('Hello World') - const sig = await accountOuter.signMessage(msg, networks[0].chainId, 'eip6492') - - const valid = await accountOuter - .reader(networks[0].chainId) - .isValidSignature(accountOuter.address, ethers.hashMessage(msg), sig) - - expect(valid).to.be.true - }) - - it('Should sign and validate a message with undeployed nested account and signer', async () => { - // Testing that an undeployed account doesn't error as other signer can satisfy threshold - const signerA = randomWallet('Nested account signer A') - const signerB = randomWallet('Nested account signer B') - - const configInner = { - threshold: 1, - checkpoint: Math.floor(now() / 1000), - signers: [{ address: signerA.address, weight: 1 }] - } - const accountInner = await Account.new({ - ...defaultArgs, - config: configInner, - orchestrator: new Orchestrator([signerA]) - }) // Undeployed - - const configOuter = { - threshold: 1, - checkpoint: Math.floor(now() / 1000), - signers: [ - { address: accountInner.address, weight: 1 }, - { address: signerB.address, weight: 1 } - ] - } - const accountOuter = await Account.new({ - ...defaultArgs, - config: configOuter, - orchestrator: new Orchestrator([new AccountOrchestratorWrapper(accountInner), signerB]) - }) - await accountOuter.doBootstrap(networks[0].chainId) - - const msg = ethers.toUtf8Bytes('Hello World') - const sig = await accountOuter.signMessage(msg, networks[0].chainId) - - const valid = await accountOuter - .reader(networks[0].chainId) - .isValidSignature(accountOuter.address, ethers.hashMessage(msg), sig) - - expect(valid).to.be.true - }) - - it('Should refuse to sign when not deployed', async () => { - const signer = randomWallet('Should refuse to sign when not deployed') - const config = { - threshold: 1, - checkpoint: Math.floor(now() / 1000), - signers: [{ address: signer.address, weight: 1 }] - } - - const account = await Account.new({ - ...defaultArgs, - config, - orchestrator: new Orchestrator([signer]) - }) - - const msg = ethers.toUtf8Bytes('Hello World') - const sig = account.signMessage(msg, networks[0].chainId, 'throw') - - expect(sig).to.be.rejected - }) - - it('Should refuse to sign when not deployed (nested)', async () => { - const { accountOuter } = await createNestedAccount('refuse to sign undeployed', false, false) - - const msg = ethers.toUtf8Bytes('Hello World') - const sig = accountOuter.signMessage(msg, networks[0].chainId, 'eip6492') // Note EIP-6492 throws when nested not deployed - - expect(sig).to.be.rejected - }) - - describe('After upgrading', () => { - let account: Account - - let signer1: ethers.Wallet - let signer2a: ethers.Wallet - let signer2b: ethers.Wallet - let signerIndex = 1 - - beforeEach(async () => { - signer1 = randomWallet(`After upgrading ${signerIndex++}`) - const simpleConfig1 = { - threshold: 1, - checkpoint: Math.floor(now() / 1000) + 1, - signers: [{ address: signer1.address, weight: 1 }] - } - - account = await Account.new({ - ...defaultArgs, - config: simpleConfig1, - orchestrator: new Orchestrator([signer1]) - }) - await getEth(account.address) - - signer2a = randomWallet(`After upgrading ${signerIndex++}`) - signer2b = randomWallet(`After upgrading ${signerIndex++}`) - - const simpleConfig2 = { - threshold: 4, - checkpoint: await account.status(0).then(s => BigInt(s.checkpoint) + 1n), - signers: [ - { - address: signer2a.address, - weight: 2 - }, - { - address: signer2b.address, - weight: 2 - } - ] - } - - const config2 = v2.config.ConfigCoder.fromSimple(simpleConfig2) - await account.updateConfig(config2) - account.setOrchestrator(new Orchestrator([signer2a, signer2b])) - }) - - it('Should send a transaction', async () => { - const tx = await account.sendTransaction([defaultTx], networks[0].chainId) - expect(tx).to.not.be.undefined - - const status = await account.status(networks[0].chainId) - expect(status.fullyMigrated).to.be.true - expect(status.onChain.deployed).to.be.true - expect(status.onChain.imageHash).to.equal(status.imageHash) - }) - - it('Should send a transaction on nested account', async () => { - const configOuter = { - threshold: 1, - checkpoint: Math.floor(now() / 1000), - signers: [{ address: account.address, weight: 1 }] - } - const accountOuter = await Account.new({ - ...defaultArgs, - config: configOuter, - orchestrator: new Orchestrator([new AccountOrchestratorWrapper(account)]) - }) - - await accountOuter.doBootstrap(networks[0].chainId) - - const tx = await accountOuter.sendTransaction([], networks[0].chainId) - expect(tx).to.not.be.undefined - - const statusOuter = await accountOuter.status(networks[0].chainId) - expect(statusOuter.fullyMigrated).to.be.true - expect(statusOuter.onChain.deployed).to.be.true - expect(statusOuter.onChain.imageHash).to.equal(statusOuter.imageHash) - - const status = await account.status(networks[0].chainId) - expect(status.fullyMigrated).to.be.true - expect(status.onChain.deployed).to.be.true - expect(status.onChain.imageHash).to.equal(status.imageHash) - }) - - it('Should send a transaction on undeployed nested account', async () => { - const configOuter = { - threshold: 1, - checkpoint: Math.floor(now() / 1000), - signers: [{ address: account.address, weight: 1 }] - } - const accountOuter = await Account.new({ - ...defaultArgs, - config: configOuter, - orchestrator: new Orchestrator([new AccountOrchestratorWrapper(account)]) - }) - - await getEth(accountOuter.address) - const tx = await accountOuter.sendTransaction([defaultTx], networks[0].chainId) - expect(tx).to.not.be.undefined - - const status = await account.status(networks[0].chainId) - expect(status.fullyMigrated).to.be.true - expect(status.onChain.deployed).to.be.true - expect(status.onChain.imageHash).to.equal(status.imageHash) - }) - - it('Should sign a message', async () => { - const msg = ethers.toUtf8Bytes('Hello World') - const sig = await account.signMessage(msg, networks[0].chainId) - - const canOnchainValidate = await account.status(networks[0].chainId).then(s => s.canOnchainValidate) - expect(canOnchainValidate).to.be.false - await account.doBootstrap(networks[0].chainId) - - const valid = await commons.EIP1271.isValidEIP1271Signature( - account.address, - ethers.hashMessage(msg), - sig, - networks[0].provider! - ) - - expect(valid).to.be.true - }) - - it('Should sign a message, already prefixed with EIP-191', async () => { - const msg = ethers.toUtf8Bytes('Hello World') - - const prefixedMessage = concat([ - toUtf8Bytes(MessagePrefix), - toUtf8Bytes(String(msg.length)), - msg - ]) - - const sig = await account.signMessage(prefixedMessage, networks[0].chainId) - - const canOnchainValidate = await account.status(networks[0].chainId).then(s => s.canOnchainValidate) - expect(canOnchainValidate).to.be.false - await account.doBootstrap(networks[0].chainId) - - const valid = await commons.EIP1271.isValidEIP1271Signature( - account.address, - ethers.hashMessage(msg), - sig, - networks[0].provider! - ) - - expect(valid).to.be.true - }) - - it('Should fail to use old signer', async () => { - account.setOrchestrator(new Orchestrator([signer1])) - const tx = account.sendTransaction([defaultTx], networks[0].chainId) - await expect(tx).to.be.rejected - }) - - it('Should send a transaction on a different network', async () => { - const tx = await account.sendTransaction([defaultTx], networks[1].chainId) - expect(tx).to.not.be.undefined - - const status = await account.status(networks[1].chainId) - expect(status.fullyMigrated).to.be.true - expect(status.onChain.deployed).to.be.true - expect(status.onChain.imageHash).to.equal(status.imageHash) - }) - - describe('After reloading the account', () => { - beforeEach(async () => { - account = new Account({ - ...defaultArgs, - address: account.address, - orchestrator: new Orchestrator([signer2a, signer2b]) - }) - await getEth(account.address) - }) - - it('Should send a transaction', async () => { - const tx = await account.sendTransaction([defaultTx], networks[0].chainId) - expect(tx).to.not.be.undefined - - const status = await account.status(networks[0].chainId) - expect(status.fullyMigrated).to.be.true - expect(status.onChain.deployed).to.be.true - expect(status.onChain.imageHash).to.equal(status.imageHash) - }) - - it('Should sign a message', async () => { - const msg = ethers.toUtf8Bytes('Hello World') - const sig = await account.signMessage(msg, networks[0].chainId) - - const canOnchainValidate = await account.status(networks[0].chainId).then(s => s.canOnchainValidate) - expect(canOnchainValidate).to.be.false - await account.doBootstrap(networks[0].chainId) - - const valid = await commons.EIP1271.isValidEIP1271Signature( - account.address, - ethers.hashMessage(msg), - sig, - networks[0].provider! - ) - - expect(valid).to.be.true - }) - }) - - describe('After updating the config again', () => { - let signer3a: ethers.Wallet - let signer3b: ethers.Wallet - let signer3c: ethers.Wallet - let signerIndex = 1 - - let config3: v2.config.WalletConfig - - beforeEach(async () => { - signer3a = randomWallet(`After updating the config again ${signerIndex++}`) - signer3b = randomWallet(`After updating the config again ${signerIndex++}`) - signer3c = randomWallet(`After updating the config again ${signerIndex++}`) - - const simpleConfig3 = { - threshold: 5, - checkpoint: await account.status(0).then(s => BigInt(s.checkpoint) + 1n), - signers: [ - { - address: signer3a.address, - weight: 2 - }, - { - address: signer3b.address, - weight: 2 - }, - { - address: signer3c.address, - weight: 1 - } - ] - } - - config3 = v2.config.ConfigCoder.fromSimple(simpleConfig3) - - await account.updateConfig(config3) - account.setOrchestrator(new Orchestrator([signer3a, signer3b, signer3c])) - }) - - it('Should update account status', async () => { - const status = await account.status(networks[0].chainId) - expect(status.fullyMigrated).to.be.true - expect(status.onChain.deployed).to.be.false - expect(status.imageHash).to.equal(v2.config.ConfigCoder.imageHashOf(config3)) - expect(status.presignedConfigurations.length).to.equal(2) - }) - - it('Should send a transaction', async () => { - const tx = await account.sendTransaction([defaultTx], networks[0].chainId) - expect(tx).to.not.be.undefined - - const status = await account.status(networks[0].chainId) - expect(status.fullyMigrated).to.be.true - expect(status.onChain.deployed).to.be.true - expect(status.onChain.imageHash).to.equal(status.imageHash) - }) - - it('Should sign a message', async () => { - const msg = ethers.toUtf8Bytes('Hello World') - const sig = await account.signMessage(msg, networks[0].chainId) - - const canOnchainValidate = await account.status(networks[0].chainId).then(s => s.canOnchainValidate) - expect(canOnchainValidate).to.be.false - await account.doBootstrap(networks[0].chainId) - - const status = await account.status(networks[0].chainId) - expect(status.onChain.imageHash).to.not.equal(status.imageHash) - - const valid = await commons.EIP1271.isValidEIP1271Signature( - account.address, - ethers.hashMessage(msg), - sig, - networks[0].provider! - ) - - expect(valid).to.be.true - }) - }) - - describe('After sending a transaction', () => { - beforeEach(async () => { - await account.sendTransaction([defaultTx], networks[0].chainId) - }) - - it('Should send a transaction in a different network', async () => { - const tx = await account.sendTransaction([defaultTx], networks[1].chainId) - expect(tx).to.not.be.undefined - - const status = await account.status(networks[1].chainId) - expect(status.fullyMigrated).to.be.true - expect(status.onChain.deployed).to.be.true - expect(status.onChain.imageHash).to.equal(status.imageHash) - }) - - it('Should send a second transaction', async () => { - const tx = await account.sendTransaction([defaultTx], networks[0].chainId) - expect(tx).to.not.be.undefined - }) - - let signerIndex = 1 - it('Should update the configuration again', async () => { - const signer2a = randomWallet(`Should update the configuration again ${signerIndex++}`) - const signer2b = randomWallet(`Should update the configuration again ${signerIndex++}`) - const signer2c = randomWallet(`Should update the configuration again ${signerIndex++}`) - - const simpleConfig2 = { - threshold: 6, - checkpoint: await account.status(0).then(s => BigInt(s.checkpoint) + 1n), - signers: [ - { - address: signer2a.address, - weight: 3 - }, - { - address: signer2b.address, - weight: 3 - }, - { - address: signer2c.address, - weight: 3 - } - ] - } - - const ogOnchainImageHash = await account.status(0).then(s => s.onChain.imageHash) - const imageHash1 = await account.status(0).then(s => s.imageHash) - - const config2 = v2.config.ConfigCoder.fromSimple(simpleConfig2) - await account.updateConfig(config2) - - const status1 = await account.status(networks[0].chainId) - const status2 = await account.status(networks[1].chainId) - - expect(status1.fullyMigrated).to.be.true - expect(status1.onChain.deployed).to.be.true - expect(status1.onChain.imageHash).to.equal(imageHash1) - expect(status1.imageHash).to.equal(v2.config.ConfigCoder.imageHashOf(config2)) - expect(status1.presignedConfigurations.length).to.equal(1) - - expect(status2.fullyMigrated).to.be.true - expect(status2.onChain.deployed).to.be.false - expect(status2.onChain.imageHash).to.equal(ogOnchainImageHash) - expect(status2.imageHash).to.equal(v2.config.ConfigCoder.imageHashOf(config2)) - expect(status2.presignedConfigurations.length).to.equal(2) - }) - }) - }) - }) - - describe('Migrated wallet', () => { - it('Should migrate undeployed account', async () => { - // Old account may be an address that's not even deployed - const signer1 = randomWallet('Should migrate undeployed account') - - const simpleConfig: commons.config.SimpleConfig = { - threshold: 1, - checkpoint: 0, - signers: [ - { - address: signer1.address, - weight: 1 - } - ] - } - - const config = v1.config.ConfigCoder.fromSimple(simpleConfig) - const configv2 = v2.config.ConfigCoder.fromSimple(simpleConfig) - - const imageHash = v1.config.ConfigCoder.imageHashOf(config) - const address = commons.context.addressOf(contexts[1], imageHash) - - // Sessions server MUST have information about the old wallet - // in production this is retrieved from SequenceUtils contract - await tracker.saveCounterfactualWallet({ config, context: [contexts[1]] }) - - // Importing the account should work! - const account = new Account({ ...defaultArgs, address, orchestrator: new Orchestrator([signer1]) }) - - const status = await account.status(0) - expect(status.fullyMigrated).to.be.false - expect(status.onChain.deployed).to.be.false - expect(status.onChain.imageHash).to.equal(imageHash) - expect(status.imageHash).to.equal(imageHash) - expect(status.version).to.equal(1) - - // Sending a transaction should fail (not fully migrated) - await getEth(account.address) - await expect(account.sendTransaction([defaultTx], networks[0].chainId)).to.be.rejected - - // Should sign migration using the account - await account.signAllMigrations(c => c) - - const status2 = await account.status(networks[0].chainId) - expect(status2.fullyMigrated).to.be.true - expect(status2.onChain.deployed).to.be.false - expect(status2.onChain.imageHash).to.equal(imageHash) - expect(status2.onChain.version).to.equal(1) - expect(status2.imageHash).to.equal(v2.config.ConfigCoder.imageHashOf(configv2)) - expect(status2.version).to.equal(2) - - // Send a transaction - const tx = await account.sendTransaction([defaultTx], networks[0].chainId) - expect(tx).to.not.be.undefined - - const status3 = await account.status(networks[0].chainId) - expect(status3.fullyMigrated).to.be.true - expect(status3.onChain.deployed).to.be.true - expect(status3.onChain.imageHash).to.equal(v2.config.ConfigCoder.imageHashOf(configv2)) - expect(status3.onChain.version).to.equal(2) - expect(status3.imageHash).to.equal(v2.config.ConfigCoder.imageHashOf(configv2)) - expect(status3.version).to.equal(2) - - // Send another transaction on another chain - const tx2 = await account.sendTransaction([defaultTx], networks[1].chainId) - expect(tx2).to.not.be.undefined - - const status4 = await account.status(networks[1].chainId) - expect(status4.fullyMigrated).to.be.true - expect(status4.onChain.deployed).to.be.true - expect(status4.onChain.imageHash).to.equal(v2.config.ConfigCoder.imageHashOf(configv2)) - expect(status4.onChain.version).to.equal(2) - expect(status4.imageHash).to.equal(v2.config.ConfigCoder.imageHashOf(configv2)) - expect(status4.version).to.equal(2) - }) - - it('Should migrate a half-deployed account', async () => { - // Old account created with 3 signers, and already deployed - // in one of the chains - const signer1 = randomWallet('Should migrate a half-deployed account') - const signer2 = randomWallet('Should migrate a half-deployed account 2') - const signer3 = randomWallet('Should migrate a half-deployed account 3') - - const simpleConfig = { - threshold: 2, - checkpoint: 0, - signers: [ - { - address: signer1.address, - weight: 1 - }, - { - address: signer2.address, - weight: 1 - }, - { - address: signer3.address, - weight: 1 - } - ] - } - - const config = v1.config.ConfigCoder.fromSimple(simpleConfig) - const imageHash = v1.config.ConfigCoder.imageHashOf(config) - const address = commons.context.addressOf(contexts[1], imageHash) - - // Deploy the wallet on network 0 - const deployTx = Wallet.buildDeployTransaction(contexts[1], imageHash) - await (networks[0].relayer! as Relayer).relay({ - ...deployTx, - chainId: networks[0].chainId, - intent: { - id: '0x00', - wallet: address - } - }) - - // Feed all information to sequence-sessions - // (on prod this would be imported from SequenceUtils) - await tracker.saveCounterfactualWallet({ config, context: Object.values(contexts) }) - - // Importing the account should work! - const account = new Account({ - ...defaultArgs, - address, - orchestrator: new Orchestrator([signer1, signer3]) - }) - - // Status on network 0 should be deployed, network 1 not - // both should not be migrated, and use the original imageHash - const status1 = await account.status(networks[0].chainId) - expect(status1.fullyMigrated).to.be.false - expect(status1.onChain.deployed).to.be.true - expect(status1.onChain.imageHash).to.equal(imageHash) - expect(status1.onChain.version).to.equal(1) - expect(status1.imageHash).to.equal(imageHash) - expect(status1.version).to.equal(1) - - const status2 = await account.status(networks[1].chainId) - expect(status2.fullyMigrated).to.be.false - expect(status2.onChain.deployed).to.be.false - expect(status2.onChain.imageHash).to.equal(imageHash) - expect(status2.onChain.version).to.equal(1) - expect(status2.imageHash).to.equal(imageHash) - expect(status2.version).to.equal(1) - - // Signing transactions (on both networks) and signing messages should fail - await getEth(account.address) - await expect(account.sendTransaction([defaultTx], networks[0].chainId)).to.be.rejected - await expect(account.sendTransaction([defaultTx], networks[1].chainId)).to.be.rejected - await expect(account.signMessage('0x00', networks[0].chainId)).to.be.rejected - await expect(account.signMessage('0x00', networks[1].chainId)).to.be.rejected - - await account.signAllMigrations(c => c) - - // Sign a transaction on network 0 and network 1, both should work - // and should take the wallet on-chain up to speed - const configv2 = v2.config.ConfigCoder.fromSimple(simpleConfig) - - const tx1 = await account.sendTransaction([defaultTx], networks[0].chainId) - expect(tx1).to.not.be.undefined - await tx1!.wait() - - const status1b = await account.status(networks[0].chainId) - expect(status1b.fullyMigrated).to.be.true - expect(status1b.onChain.deployed).to.be.true - expect(status1b.onChain.imageHash).to.equal(v2.config.ConfigCoder.imageHashOf(configv2)) - expect(status1b.onChain.version).to.equal(2) - expect(status1b.imageHash).to.equal(v2.config.ConfigCoder.imageHashOf(configv2)) - expect(status1b.version).to.equal(2) - - const tx2 = await account.sendTransaction([defaultTx], networks[1].chainId) - expect(tx2).to.not.be.undefined - - const status2b = await account.status(networks[1].chainId) - expect(status2b).to.be.deep.equal(status1b) - }) - - it('Should migrate an upgraded wallet', async () => { - const signer1 = randomWallet('Should migrate an upgraded wallet') - const signer2 = randomWallet('Should migrate an upgraded wallet 2') - const signer3 = randomWallet('Should migrate an upgraded wallet 3') - const signer4 = randomWallet('Should migrate an upgraded wallet 4') - - const simpleConfig1a = { - threshold: 3, - checkpoint: 0, - signers: [ - { - address: signer1.address, - weight: 2 - }, - { - address: signer2.address, - weight: 2 - }, - { - address: signer3.address, - weight: 2 - } - ] - } - - const config1a = v1.config.ConfigCoder.fromSimple(simpleConfig1a) - const imageHash1a = v1.config.ConfigCoder.imageHashOf(config1a) - const address = commons.context.addressOf(contexts[1], imageHash1a) - - const simpleConfig1b = { - threshold: 3, - checkpoint: 0, - signers: [ - { - address: signer1.address, - weight: 2 - }, - { - address: signer2.address, - weight: 2 - }, - { - address: signer4.address, - weight: 2 - } - ] - } - - const config1b = v1.config.ConfigCoder.fromSimple(simpleConfig1b) - const imageHash1b = v1.config.ConfigCoder.imageHashOf(config1b) - - // Update wallet to config 1b (on network 0) - const wallet = new Wallet({ - coders: { - signature: v1.signature.SignatureCoder, - config: v1.config.ConfigCoder - }, - context: contexts[1], - config: config1a, - chainId: networks[0].chainId, - address, - orchestrator: new Orchestrator([signer1, signer3]), - relayer: (networks[0].relayer as Relayer)!, - provider: networks[0].provider! - }) - - const utx = await wallet.buildUpdateConfigurationTransaction(config1b) - const signed = await wallet.signTransactionBundle(utx) - const decorated = await wallet.decorateTransactions(signed) - await (networks[0].relayer as Relayer).relay(decorated) - - // Importing the account should work! - const account = new Account({ - ...defaultArgs, - address, - orchestrator: new Orchestrator([signer1, signer3]) - }) - - // Feed the tracker with all the data - await tracker.saveCounterfactualWallet({ config: config1a, context: [contexts[1]] }) - await tracker.saveWalletConfig({ config: config1b }) - - // Status on network 0 should be deployed, network 1 not - // and the configuration on network 0 should be the B one - const status1 = await account.status(networks[0].chainId) - expect(status1.fullyMigrated).to.be.false - expect(status1.onChain.deployed).to.be.true - expect(status1.onChain.imageHash).to.equal(imageHash1b) - expect(status1.onChain.version).to.equal(1) - expect(status1.imageHash).to.equal(imageHash1b) - - const status2 = await account.status(networks[1].chainId) - expect(status2.fullyMigrated).to.be.false - expect(status2.onChain.deployed).to.be.false - expect(status2.onChain.imageHash).to.equal(imageHash1a) - expect(status2.onChain.version).to.equal(1) - expect(status2.imageHash).to.equal(imageHash1a) - - // Signing transactions (on both networks) and signing messages should fail - await getEth(account.address) - await expect(account.sendTransaction([defaultTx], networks[0].chainId)).to.be.rejected - await expect(account.sendTransaction([defaultTx], networks[1].chainId)).to.be.rejected - await expect(account.signMessage('0x00', networks[0].chainId)).to.be.rejected - await expect(account.signMessage('0x00', networks[1].chainId)).to.be.rejected - - // Sign all migrations should only have signers1 and 2 - // so the migration should only be available on network 1 (the one not updated) - await account.signAllMigrations(c => c) - - const config2a = v2.config.ConfigCoder.fromSimple(simpleConfig1a) - const config2b = v2.config.ConfigCoder.fromSimple(simpleConfig1b) - const imageHash2a = v2.config.ConfigCoder.imageHashOf(config2a) - - const status1b = await account.status(networks[0].chainId) - expect(status1b.fullyMigrated).to.be.false - expect(status1b.onChain.deployed).to.be.true - expect(status1b.onChain.imageHash).to.equal(imageHash1b) - expect(status1b.onChain.version).to.equal(1) - expect(status1b.imageHash).to.equal(imageHash1b) - expect(status1b.version).to.equal(1) - - const status2b = await account.status(networks[1].chainId) - expect(status2b.fullyMigrated).to.be.true - expect(status2b.onChain.deployed).to.be.false - expect(status2b.onChain.imageHash).to.equal(imageHash1a) - expect(status2b.onChain.version).to.equal(1) - expect(status2b.imageHash).to.equal(imageHash2a) - expect(status2b.version).to.equal(2) - - // Sending a transaction should work for network 1 - // but fail for network 0, same with signing messages - await expect(account.sendTransaction([defaultTx], networks[0].chainId)).to.be.rejected - await expect(account.sendTransaction([defaultTx], networks[1].chainId)).to.be.fulfilled - - await expect(account.signMessage('0x00', networks[0].chainId)).to.be.rejected - await expect(account.signMessage('0x00', networks[1].chainId)).to.be.fulfilled - - // Signing another migration with signers1 and 2 should put both in sync - account.setOrchestrator(new Orchestrator([signer1, signer2])) - await account.signAllMigrations(c => c) - - await expect(account.sendTransaction([defaultTx], networks[0].chainId)).to.be.fulfilled - await expect(account.sendTransaction([defaultTx], networks[1].chainId)).to.be.fulfilled - - await expect(account.signMessage('0x00', networks[0].chainId)).to.be.fulfilled - await expect(account.signMessage('0x00', networks[1].chainId)).to.be.fulfilled - - const status1c = await account.status(networks[0].chainId) - const status2c = await account.status(networks[1].chainId) - - expect(status1c.fullyMigrated).to.be.true - expect(status2c.fullyMigrated).to.be.true - - // Configs are still different! - expect(status1c.imageHash).to.not.equal(status2c.imageHash) - - const simpleConfig4 = { - threshold: 2, - checkpoint: 1, - signers: [ - { - address: signer1.address, - weight: 1 - }, - { - address: signer2.address, - weight: 1 - }, - { - address: signer4.address, - weight: 1 - } - ] - } - - const config4 = v2.config.ConfigCoder.fromSimple(simpleConfig4) - - await account.updateConfig(config4) - - const status1d = await account.status(networks[0].chainId) - const status2d = await account.status(networks[1].chainId) - - // Configs are now the same! - expect(status1d.imageHash).to.be.equal(status2d.imageHash) - }) - - it('Should edit the configuration during the migration', async () => { - // Old account may be an address that's not even deployed - const signer1 = randomWallet('Should edit the configuration during the migration') - const signer2 = randomWallet('Should edit the configuration during the migration 2') - - const simpleConfig1 = { - threshold: 1, - checkpoint: 0, - signers: [ - { - address: signer1.address, - weight: 1 - } - ] - } - - const simpleConfig2 = { - threshold: 1, - checkpoint: 0, - signers: [ - { - address: signer2.address, - weight: 1 - } - ] - } - - const config = v1.config.ConfigCoder.fromSimple(simpleConfig1) - const configv2 = v2.config.ConfigCoder.fromSimple(simpleConfig2) - - const imageHash = v1.config.ConfigCoder.imageHashOf(config) - const address = commons.context.addressOf(contexts[1], imageHash) - - // Sessions server MUST have information about the old wallet - // in production this is retrieved from SequenceUtils contract - await tracker.saveCounterfactualWallet({ config, context: [contexts[1]] }) - - // Importing the account should work! - const orchestrator = new Orchestrator([signer1]) - const account = new Account({ ...defaultArgs, address, orchestrator: orchestrator }) - - const status = await account.status(0) - expect(status.fullyMigrated).to.be.false - expect(status.onChain.deployed).to.be.false - expect(status.onChain.imageHash).to.equal(imageHash) - expect(status.imageHash).to.equal(imageHash) - expect(status.version).to.equal(1) - - // Sending a transaction should fail (not fully migrated) - await getEth(account.address) - await expect(account.sendTransaction([defaultTx], networks[0].chainId)).to.be.rejected - - // Should sign migration using the account - await account.signAllMigrations(c => { - expect(v1.config.ConfigCoder.imageHashOf(c as any)).to.equal(v1.config.ConfigCoder.imageHashOf(config)) - return configv2 - }) - - const status2 = await account.status(networks[0].chainId) - expect(status2.fullyMigrated).to.be.true - expect(status2.onChain.deployed).to.be.false - expect(status2.onChain.imageHash).to.equal(imageHash) - expect(status2.onChain.version).to.equal(1) - expect(status2.imageHash).to.equal(v2.config.ConfigCoder.imageHashOf(configv2)) - expect(status2.version).to.equal(2) - - // Send a transaction - orchestrator.setSigners([signer2]) - const tx = await account.sendTransaction([defaultTx], networks[0].chainId) - expect(tx).to.not.be.undefined - - const status3 = await account.status(networks[0].chainId) - expect(status3.fullyMigrated).to.be.true - expect(status3.onChain.deployed).to.be.true - expect(status3.onChain.imageHash).to.equal(v2.config.ConfigCoder.imageHashOf(configv2)) - expect(status3.onChain.version).to.equal(2) - expect(status3.imageHash).to.equal(v2.config.ConfigCoder.imageHashOf(configv2)) - expect(status3.version).to.equal(2) - - // Send another transaction on another chain - const tx2 = await account.sendTransaction([defaultTx], networks[1].chainId) - expect(tx2).to.not.be.undefined - - const status4 = await account.status(networks[1].chainId) - expect(status4.fullyMigrated).to.be.true - expect(status4.onChain.deployed).to.be.true - expect(status4.onChain.imageHash).to.equal(v2.config.ConfigCoder.imageHashOf(configv2)) - expect(status4.onChain.version).to.equal(2) - expect(status4.imageHash).to.equal(v2.config.ConfigCoder.imageHashOf(configv2)) - expect(status4.version).to.equal(2) - }) - - context('Signing messages', async () => { - context('After migrating', async () => { - let account: Account - let imageHash: string - - beforeEach(async () => { - // Old account may be an address that's not even deployed - const signer1 = randomWallet( - // @ts-ignore - 'Signing messages - After migrating' + account?.address ?? '' // Append prev address to entropy to avoid collisions - ) - - const simpleConfig = { - threshold: 1, - checkpoint: 0, - signers: [ - { - address: signer1.address, - weight: 1 - } - ] - } - - const config = v1.config.ConfigCoder.fromSimple(simpleConfig) - imageHash = v1.config.ConfigCoder.imageHashOf(config) - const address = commons.context.addressOf(contexts[1], imageHash) - - // Sessions server MUST have information about the old wallet - // in production this is retrieved from SequenceUtils contract - await tracker.saveCounterfactualWallet({ config, context: [contexts[1]] }) - - account = new Account({ ...defaultArgs, address, orchestrator: new Orchestrator([signer1]) }) - - // Should sign migration using the account - await account.signAllMigrations(c => c) - }) - - it('Should validate a message signed by undeployed migrated wallet', async () => { - const msg = ethers.toUtf8Bytes('I like that you are reading our tests') - const sig = await account.signMessage(msg, networks[0].chainId, 'eip6492') - - const valid = await account.reader(networks[0].chainId).isValidSignature(account.address, ethers.hashMessage(msg), sig) - - expect(valid).to.be.true - }) - - it('Should reject a message signed by undeployed migrated wallet (if set the throw)', async () => { - const msg = ethers.toUtf8Bytes('I do not know what to write here anymore') - const sig = account.signMessage(msg, networks[0].chainId, 'throw') - - await expect(sig).to.be.rejected - }) - - it('Should return an invalid signature by undeployed migrated wallet (if set to ignore)', async () => { - const msg = ethers.toUtf8Bytes('Sending a hug') - const sig = await account.signMessage(msg, networks[0].chainId, 'ignore') - - const valid = await account.reader(networks[0].chainId).isValidSignature(account.address, ethers.hashMessage(msg), sig) - - expect(valid).to.be.false - }) - - it('Should validate a message signed by deployed migrated wallet (deployed with v1)', async () => { - const deployTx = Wallet.buildDeployTransaction(contexts[1], imageHash) - await signer1 - .sendTransaction({ - to: deployTx.entrypoint, - data: commons.transaction.encodeBundleExecData(deployTx) - }) - .then(t => t.wait()) - - expect(await networks[0].provider!.getCode(account.address).then(c => ethers.getBytes(c).length)).to.not.equal(0) - - const msg = ethers.toUtf8Bytes('Everything seems to be working fine so far') - const sig = await account.signMessage(msg, networks[0].chainId, 'eip6492') - - const valid = await account.reader(networks[0].chainId).isValidSignature(account.address, ethers.hashMessage(msg), sig) - - expect(valid).to.be.true - }) - - it('Should fail to sign a message signed by deployed migrated wallet (deployed with v1) if throw', async () => { - const deployTx = Wallet.buildDeployTransaction(contexts[1], imageHash) - await signer1 - .sendTransaction({ - to: deployTx.entrypoint, - data: commons.transaction.encodeBundleExecData(deployTx) - }) - .then(tx => tx.wait()) - - expect(await networks[0].provider!.getCode(account.address).then(c => ethers.getBytes(c).length)).to.not.equal(0) - - const msg = ethers.toUtf8Bytes('Everything seems to be working fine so far') - const sig = account.signMessage(msg, networks[0].chainId, 'throw') - expect(sig).to.be.rejected - }) - - it('Should return an invalid signature by deployed migrated wallet (deployed with v1) if ignore', async () => { - const deployTx = Wallet.buildDeployTransaction(contexts[1], imageHash) - await signer1 - .sendTransaction({ - to: deployTx.entrypoint, - data: commons.transaction.encodeBundleExecData(deployTx) - }) - .then(tx => tx.wait()) - - expect(await networks[0].provider!.getCode(account.address).then(c => ethers.getBytes(c).length)).to.not.equal(0) - - const msg = ethers.toUtf8Bytes('Everything seems to be working fine so far') - const sig = await account.signMessage(msg, networks[0].chainId, 'ignore') - const valid = await account.reader(networks[0].chainId).isValidSignature(account.address, ethers.hashMessage(msg), sig) - - expect(valid).to.be.false - }) - }) - }) - }) - - describe('Nonce selection', async () => { - let signer: ethers.Wallet - let account: Account - - let getNonce: (response: ethers.TransactionResponse) => { space: bigint; nonce: bigint } - - before(async () => { - const mainModule = new ethers.Interface(walletContracts.mainModule.abi) - - getNonce = ({ data }) => { - const [_, encoded] = mainModule.decodeFunctionData('execute', data) - const [space, nonce] = commons.transaction.decodeNonce(encoded) - return { space, nonce } - } - - signer = randomWallet('Nonce selection') - - const config = { - threshold: 1, - checkpoint: Math.floor(now() / 1000), - signers: [{ address: signer.address, weight: 1 }] - } - - account = await Account.new({ - ...defaultArgs, - config, - orchestrator: new Orchestrator([signer]) - }) - - // use a deployed account, otherwise we end up testing the decorated bundle nonce - const response = await account.sendTransaction([], networks[0].chainId) - await response?.wait() - - await getEth(account.address, signer1) - await getEth(account.address, signer2) - }) - - it('Should use explicitly set nonces', async () => { - let response = await account.sendTransaction( - { to: await signer1.getAddress(), value: 1 }, - networks[0].chainId, - undefined, - undefined, - undefined, - { nonceSpace: 6492 } - ) - if (!response) { - throw new Error('expected response') - } - - let { space, nonce } = getNonce(response) - - expect(space === 6492n).to.be.true - expect(nonce === 0n).to.be.true - - await response.wait() - - response = await account.sendTransaction( - { to: await signer1.getAddress(), value: 1 }, - networks[0].chainId, - undefined, - undefined, - undefined, - { nonceSpace: 6492 } - ) - if (!response) { - throw new Error('expected response') - } - - const encoded = getNonce(response) - space = encoded.space - nonce = encoded.nonce - - expect(space === 6492n).to.be.true - expect(nonce === 1n).to.be.true - }) - - it('Should select random nonces by default', async () => { - let response = await account.sendTransaction({ to: await signer1.getAddress(), value: 1 }, networks[0].chainId) - if (!response) { - throw new Error('expected response') - } - - const { space: firstSpace, nonce: firstNonce } = getNonce(response) - - expect(firstSpace === 0n).to.be.false - expect(firstNonce === 0n).to.be.true - - // not necessary, parallel execution is ok: - // await response.wait() - - response = await account.sendTransaction({ to: await signer1.getAddress(), value: 1 }, networks[0].chainId) - if (!response) { - throw new Error('expected response') - } - - const { space: secondSpace, nonce: secondNonce } = getNonce(response) - - expect(secondSpace === 0n).to.be.false - expect(secondNonce === 0n).to.be.true - - expect(secondSpace === firstSpace).to.be.false - }) - - it('Should respect the serial option', async () => { - let response = await account.sendTransaction( - { to: await signer1.getAddress(), value: 1 }, - networks[0].chainId, - undefined, - undefined, - undefined, - { serial: true } - ) - if (!response) { - throw new Error('expected response') - } - - let { space, nonce } = getNonce(response) - - expect(space === 0n).to.be.true - expect(nonce === 0n).to.be.true - - await response.wait() - - response = await account.sendTransaction( - { to: await signer1.getAddress(), value: 1 }, - networks[0].chainId, - undefined, - undefined, - undefined, - { serial: true } - ) - if (!response) { - throw new Error('expected response') - } - - const encoded = getNonce(response) - space = encoded.space - nonce = encoded.nonce - - expect(space === 0n).to.be.true - expect(nonce === 1n).to.be.true - }) - }) -}) - -let nowCalls = 0 -export function now(): number { - if (deterministic) { - return Date.parse('2023-02-14T00:00:00.000Z') + 1000 * nowCalls++ - } else { - return Date.now() - } -} - -export function randomWallet(entropy: number | string): ethers.Wallet { - return new ethers.Wallet(ethers.hexlify(randomBytes(32, entropy))) -} - -export function randomFraction(entropy: number | string): number { - const bytes = randomBytes(7, entropy) - bytes[0] &= 0x1f - return bytes.reduce((sum, byte) => 256 * sum + byte) / Number.MAX_SAFE_INTEGER -} - -export function randomBytes(length: number, entropy: number | string): Uint8Array { - if (deterministic) { - let bytes = '' - while (bytes.length < 2 * length) { - bytes += ethers.id(`${bytes}${entropy}`).slice(2) - } - return ethers.getBytes(`0x${bytes.slice(0, 2 * length)}`) - } else { - return ethers.randomBytes(length) - } -} diff --git a/old/packages/account/tests/signer.spec.ts b/old/packages/account/tests/signer.spec.ts deleted file mode 100644 index e5f51824e..000000000 --- a/old/packages/account/tests/signer.spec.ts +++ /dev/null @@ -1,891 +0,0 @@ -import { commons, v1, v2 } from '@0xsequence/core' -import { migrator } from '@0xsequence/migration' -import { NetworkConfig } from '@0xsequence/network' -import { FeeOption, FeeQuote, LocalRelayer, LocalRelayerOptions, Relayer, proto } from '@0xsequence/relayer' -import { tracker, trackers } from '@0xsequence/sessions' -import { Orchestrator } from '@0xsequence/signhub' -import * as utils from '@0xsequence/tests' -import { Wallet } from '@0xsequence/wallet' -import * as chai from 'chai' -import chaiAsPromised from 'chai-as-promised' -import { ethers } from 'ethers' -import hardhat from 'hardhat' - -import { Account } from '../src/account' -import { now, randomWallet } from './account.spec' -import { createERC20 } from '@0xsequence/tests/src/tokens/erc20' -import { parseEther } from '@0xsequence/utils' - -const { expect } = chai.use(chaiAsPromised) - -describe('Account signer', () => { - let provider1: ethers.BrowserProvider - let provider2: ethers.JsonRpcProvider - - let signer1: ethers.Signer - let signer2: ethers.Signer - - let contexts: commons.context.VersionedContext - let networks: NetworkConfig[] - - let tracker: tracker.ConfigTracker & migrator.PresignedMigrationTracker - - let defaultArgs: { - contexts: commons.context.VersionedContext - networks: NetworkConfig[] - tracker: tracker.ConfigTracker & migrator.PresignedMigrationTracker - } - - before(async () => { - provider1 = new ethers.BrowserProvider(hardhat.network.provider as any, undefined, { cacheTimeout: -1 }) - provider2 = new ethers.JsonRpcProvider('http://127.0.0.1:7048', undefined, { cacheTimeout: -1 }) - - signer1 = await provider1.getSigner() - signer2 = await provider2.getSigner() - - // TODO: Implement migrations on local config tracker - tracker = new trackers.local.LocalConfigTracker(provider1) as any - - networks = [ - { - chainId: 31337, - name: 'hardhat', - provider: provider1, - rpcUrl: '', - relayer: new LocalRelayer(signer1), - nativeToken: { - symbol: 'ETH', - name: 'Ether', - decimals: 18 - } - }, - { - chainId: 31338, - name: 'hardhat2', - provider: provider2, - rpcUrl: 'http://127.0.0.1:7048', - relayer: new LocalRelayer(signer2), - nativeToken: { - symbol: 'ETH', - name: 'Ether', - decimals: 18 - } - } - ] - - contexts = await utils.context.deploySequenceContexts(signer1) - const context2 = await utils.context.deploySequenceContexts(signer2) - - expect(contexts).to.deep.equal(context2) - - defaultArgs = { - contexts, - networks, - tracker - } - }) - - describe('with new account', () => { - let account: Account - let config: any - let accountSigner: ethers.Wallet - - beforeEach(async () => { - accountSigner = randomWallet('Should create a new account') - config = { - threshold: 1, - checkpoint: Math.floor(now() / 1000), - signers: [{ address: accountSigner.address, weight: 1 }] - } - - account = await Account.new({ - ...defaultArgs, - config, - orchestrator: new Orchestrator([accountSigner]) - }) - }) - ;[31337, 31338].map((chainId: number) => { - context(`for chain ${chainId}`, () => { - it('should send transaction', async () => { - const signer = account.getSigner(chainId) - - const res = await signer.sendTransaction({ - to: ethers.Wallet.createRandom().address - }) - - expect(res).to.exist - expect(res.hash).to.exist - - expect(await signer.provider.getTransaction(res.hash)).to.exist - }) - - it('should send batch transaction', async () => { - const signer = account.getSigner(chainId) - - const res = await signer.sendTransaction([ - { - to: ethers.Wallet.createRandom().address - }, - { - to: ethers.Wallet.createRandom().address - } - ]) - - expect(res).to.exist - expect(res.hash).to.exist - - expect(await signer.provider.getTransaction(res.hash)).to.exist - }) - - it('should send two transactions (one has deploy)', async () => { - const signer = account.getSigner(chainId) - - expect(await signer.provider.getCode(account.address)).to.equal('0x') - - await signer.sendTransaction({ - to: ethers.Wallet.createRandom().address - }) - - expect(await signer.provider.getCode(account.address)).to.not.equal('0x') - - const res = await signer.sendTransaction({ - to: ethers.Wallet.createRandom().address - }) - - expect(res).to.exist - expect(res.hash).to.exist - - expect(await signer.provider.getTransaction(res.hash)).to.exist - }) - - it('should fail to sign message because not deployed', async () => { - const signer = account.getSigner(chainId) - - await expect(signer.signMessage(ethers.randomBytes(32))).to.be.rejectedWith('Wallet cannot validate onchain') - }) - - it('should sign message after deployment', async () => { - const signer = account.getSigner(chainId) - - await signer.sendTransaction({ - to: ethers.Wallet.createRandom().address - }) - - expect(await signer.provider.getCode(account.address)).to.not.equal('0x') - - const signature = await signer.signMessage(ethers.randomBytes(32)) - expect(signature).to.exist - expect(signature).to.not.equal('0x') - }) - - it('should sign a message (undeployed) when using EIP6492', async () => { - const signer = account.getSigner(chainId, { cantValidateBehavior: 'eip6492' }) - - const signature = await signer.signMessage(ethers.randomBytes(32)) - expect(signature).to.exist - expect(signature).to.not.equal('0x') - }) - - it('should return account address', async () => { - expect(account.address).to.equal(await account.getSigner(chainId).getAddress()) - }) - - it('should return chainId', async () => { - expect(chainId).to.equal(await account.getSigner(chainId).getChainId()) - }) - - it('should call select fee even if there is no fee', async () => { - let callsToSelectFee = 0 - - const tx = { - to: ethers.Wallet.createRandom().address - } - - const signer = account.getSigner(chainId, { - selectFee: async (txs: any, options: FeeOption[]) => { - callsToSelectFee++ - expect(txs).to.deep.equal(tx) - expect(options).to.deep.equal([]) - return undefined - } - }) - - const res = await signer.sendTransaction(tx) - - expect(callsToSelectFee).to.equal(1) - - expect(res).to.exist - expect(res.hash).to.exist - - expect(await signer.provider.getTransaction(res.hash)).to.exist - }) - - describe('select fee', () => { - let account: never - let getAccount: (feeOptions: FeeOption[], feeQuote: FeeQuote) => Promise - - beforeEach(async () => { - class LocalRelayerWithFee extends LocalRelayer { - constructor( - options: LocalRelayerOptions | ethers.Signer, - public feeOptions: FeeOption[], - public quote: FeeQuote - ) { - super(options) - } - - async getFeeOptions( - _address: string, - ..._transactions: commons.transaction.Transaction[] - ): Promise<{ options: FeeOption[] }> { - return { options: this.feeOptions, quote: this.quote } as any - } - - async getFeeOptionsRaw( - _entrypoint: string, - _data: ethers.BytesLike, - _options?: { simulate?: boolean } - ): Promise<{ options: FeeOption[] }> { - return { options: this.feeOptions, quote: this.quote } as any - } - - async gasRefundOptions( - _address: string, - ..._transactions: commons.transaction.Transaction[] - ): Promise { - return this.feeOptions - } - - async relay( - signedTxs: commons.transaction.IntendedTransactionBundle, - quote?: FeeQuote | undefined, - waitForReceipt?: boolean | undefined - ): Promise> { - expect(quote).to.equal(this.quote) - return super.relay(signedTxs, quote, waitForReceipt) - } - } - - getAccount = async (feeOptions: FeeOption[], feeQuote: FeeQuote) => { - return Account.new({ - ...defaultArgs, - networks: defaultArgs.networks.map(n => { - return { - ...n, - relayer: new LocalRelayerWithFee(chainId === 31337 ? signer1 : signer2, feeOptions, feeQuote) - } - }), - config, - orchestrator: new Orchestrator([accountSigner]) - }) - } - }) - - it('should automatically select native fee', async () => { - const feeOptions: FeeOption[] = [ - { - token: { - chainId, - name: 'native', - symbol: 'ETH', - type: proto.FeeTokenType.UNKNOWN, - logoURL: '' - }, - to: ethers.Wallet.createRandom().address, - value: '12', - gasLimit: 100000 - } - ] - - const feeQuote: FeeQuote = { - _tag: 'FeeQuote', - _quote: ethers.randomBytes(99) - } - - const account = await getAccount(feeOptions, feeQuote) - const signer = account.getSigner(chainId) - - await (chainId === 31337 ? signer1 : signer2).sendTransaction({ - to: account.address, - value: 12 - }) - - const res = await signer.sendTransaction({ - to: ethers.Wallet.createRandom().address - }) - - expect(res).to.exist - expect(res.hash).to.exist - - expect(await signer.provider.getTransaction(res.hash)).to.exist - }) - - it('should reject if balance is not enough', async () => { - const feeOptions: FeeOption[] = [ - { - token: { - chainId, - name: 'native', - symbol: 'ETH', - type: proto.FeeTokenType.UNKNOWN, - logoURL: '' - }, - to: ethers.Wallet.createRandom().address, - value: parseEther('12').toString(), - gasLimit: 100000 - } - ] - - const feeQuote: FeeQuote = { - _tag: 'FeeQuote', - _quote: ethers.randomBytes(99) - } - - const account = await getAccount(feeOptions, feeQuote) - const signer = account.getSigner(chainId) - - await (chainId === 31337 ? signer1 : signer2).sendTransaction({ - to: account.address, - value: 11 - }) - - const res = signer.sendTransaction({ - to: ethers.Wallet.createRandom().address - }) - - expect(res).to.be.rejectedWith('No fee option available - not enough balance') - }) - - it('should automatically select ERC20 fee', async () => { - const token = await createERC20(chainId === 31337 ? signer1 : signer2, 'Test Token', 'TEST', 18) - - const recipient = ethers.Wallet.createRandom().address - const feeOptions: FeeOption[] = [ - { - token: { - chainId, - name: 'TEST', - symbol: 'TEST', - type: proto.FeeTokenType.ERC20_TOKEN, - logoURL: '', - contractAddress: await token.getAddress() - }, - to: recipient, - value: parseEther('250').toString(), - gasLimit: 400000 - } - ] - - const feeQuote: FeeQuote = { - _tag: 'FeeQuote', - _quote: ethers.randomBytes(99) - } - - const account = await getAccount(feeOptions, feeQuote) - const signer = account.getSigner(chainId) - - await token.getFunction('mint')(account.address, parseEther('6000')) - - const res = await signer.sendTransaction({ - to: ethers.Wallet.createRandom().address - }) - - expect(res).to.exist - expect(res.hash).to.exist - - expect(await signer.provider.getTransaction(res.hash)).to.exist - expect(await token.getFunction('balanceOf')(recipient)).to.equal(parseEther('250')) - }) - - it('should reject ERC20 fee if not enough balance', async () => { - const token = await createERC20(chainId === 31337 ? signer1 : signer2, 'Test Token', 'TEST', 18) - - const recipient = ethers.Wallet.createRandom().address - const feeOptions: FeeOption[] = [ - { - token: { - chainId, - name: 'TEST', - symbol: 'TEST', - type: proto.FeeTokenType.ERC20_TOKEN, - logoURL: '', - contractAddress: await token.getAddress() - }, - to: recipient, - value: parseEther('250').toString(), - gasLimit: 400000 - } - ] - - const feeQuote: FeeQuote = { - _tag: 'FeeQuote', - _quote: ethers.randomBytes(99) - } - - const account = await getAccount(feeOptions, feeQuote) - const signer = account.getSigner(chainId) - - const res = signer.sendTransaction({ - to: ethers.Wallet.createRandom().address - }) - - expect(res).to.be.rejectedWith('No fee option available - not enough balance') - }) - - it('should automatically select ERC20 fee if user has no ETH', async () => { - const token = await createERC20(chainId === 31337 ? signer1 : signer2, 'Test Token', 'TEST', 18) - - const recipient = ethers.Wallet.createRandom().address - const feeOptions: FeeOption[] = [ - { - token: { - chainId, - name: 'native', - symbol: 'ETH', - type: proto.FeeTokenType.UNKNOWN, - logoURL: '' - }, - to: recipient, - value: parseEther('12').toString(), - gasLimit: 100000 - }, - { - token: { - chainId, - name: 'TEST', - symbol: 'TEST', - type: proto.FeeTokenType.ERC20_TOKEN, - logoURL: '', - contractAddress: await token.getAddress() - }, - to: recipient, - value: parseEther('11').toString(), - gasLimit: 400000 - } - ] - - const feeQuote: FeeQuote = { - _tag: 'FeeQuote', - _quote: ethers.randomBytes(99) - } - - const account = await getAccount(feeOptions, feeQuote) - const signer = account.getSigner(chainId) - - await token.getFunction('mint')(account.address, parseEther('11')) - - const res = await signer.sendTransaction({ - to: ethers.Wallet.createRandom().address - }) - - expect(res).to.exist - expect(res.hash).to.exist - - expect(await signer.provider.getTransaction(res.hash)).to.exist - expect(await token.getFunction('balanceOf')(recipient)).to.equal(parseEther('11')) - }) - - it('should select fee using callback (first option)', async () => { - const recipient = ethers.Wallet.createRandom().address - - const token = await createERC20(chainId === 31337 ? signer1 : signer2, 'Test Token', 'TEST', 18) - - const feeOptions: FeeOption[] = [ - { - token: { - chainId, - name: 'native', - symbol: 'ETH', - type: proto.FeeTokenType.UNKNOWN, - logoURL: '' - }, - to: recipient, - value: '5', - gasLimit: 100000 - }, - { - token: { - chainId, - name: 'TEST', - symbol: 'TEST', - type: proto.FeeTokenType.ERC20_TOKEN, - logoURL: '', - contractAddress: await token.getAddress() - }, - to: recipient, - value: parseEther('11').toString(), - gasLimit: 400000 - } - ] - - const feeQuote: FeeQuote = { - _tag: 'FeeQuote', - _quote: ethers.randomBytes(99) - } - - const account = await getAccount(feeOptions, feeQuote) - const signer = account.getSigner(chainId, { - selectFee: async (_txs: any, options: FeeOption[]) => { - expect(options).to.deep.equal(feeOptions) - return options[0] - } - }) - - await (chainId === 31337 ? signer1 : signer2).sendTransaction({ - to: account.address, - value: 5 - }) - - const res = await signer.sendTransaction({ - to: ethers.Wallet.createRandom().address - }) - - expect(res).to.exist - expect(res.hash).to.exist - - expect(await signer.provider.getTransaction(res.hash)).to.exist - expect(await signer.provider.getBalance(recipient)).to.equal(5n) - expect(await token.getFunction('balanceOf')(recipient)).to.equal(parseEther('0')) - }) - - it('should select fee using callback (second option)', async () => { - const recipient = ethers.Wallet.createRandom().address - - const token = await createERC20(chainId === 31337 ? signer1 : signer2, 'Test Token', 'TEST', 18) - - const feeOptions: FeeOption[] = [ - { - token: { - chainId, - name: 'native', - symbol: 'ETH', - type: proto.FeeTokenType.UNKNOWN, - logoURL: '' - }, - to: recipient, - value: '5', - gasLimit: 100000 - }, - { - token: { - chainId, - name: 'TEST', - symbol: 'TEST', - type: proto.FeeTokenType.ERC20_TOKEN, - logoURL: '', - contractAddress: await token.getAddress() - }, - to: recipient, - value: parseEther('11').toString(), - gasLimit: 400000 - } - ] - - const feeQuote: FeeQuote = { - _tag: 'FeeQuote', - _quote: ethers.randomBytes(99) - } - - const account = await getAccount(feeOptions, feeQuote) - const signer = account.getSigner(chainId, { - selectFee: async (_txs: any, options: FeeOption[]) => { - expect(options).to.deep.equal(feeOptions) - return options[1] - } - }) - - await token.getFunction('mint')(account.address, parseEther('11')) - - const res = await signer.sendTransaction({ - to: ethers.Wallet.createRandom().address - }) - - expect(res).to.exist - expect(res.hash).to.exist - - expect(await signer.provider.getTransaction(res.hash)).to.exist - expect(await signer.provider.getBalance(recipient)).to.equal(0n) - expect(await token.getFunction('balanceOf')(recipient)).to.equal(parseEther('11')) - }) - }) - }) - - it('should send transactions on multiple nonce spaces one by one', async () => { - const signer1 = account.getSigner(chainId, { nonceSpace: '0x01' }) - const signer2 = account.getSigner(chainId, { nonceSpace: 2 }) - const randomSpace = BigInt(ethers.hexlify(ethers.randomBytes(12))) - const signer3 = account.getSigner(chainId, { - nonceSpace: randomSpace - }) - const signer4 = account.getSigner(chainId, { nonceSpace: '0x04' }) - const signer5 = account.getSigner(chainId, { nonceSpace: '0xffffffffffffffffffffffffffffffffffffffff' }) - - await signer1.sendTransaction({ - to: ethers.Wallet.createRandom().address - }) - - await signer2.sendTransaction({ - to: ethers.Wallet.createRandom().address - }) - - await signer3.sendTransaction({ - to: ethers.Wallet.createRandom().address - }) - - await signer4.sendTransaction({ - to: ethers.Wallet.createRandom().address - }) - - await signer5.sendTransaction({ - to: ethers.Wallet.createRandom().address - }) - - // Should have used all spaces - const wallet = account.walletForStatus(chainId, await account.status(chainId)) - - const nonceSpace1 = await wallet.getNonce('0x01').then(r => BigInt(r)) - expect(nonceSpace1.toString()).to.equal('1') - - const nonceSpace2 = await wallet.getNonce(2).then(r => BigInt(r)) - expect(nonceSpace2.toString()).to.equal('1') - - const nonceSpace3 = await wallet.getNonce(randomSpace).then(r => BigInt(r)) - expect(nonceSpace3.toString()).to.equal('1') - - const nonceSpace4 = await wallet.getNonce('0x04').then(r => BigInt(r)) - expect(nonceSpace4.toString()).to.equal('1') - - const nonceSpace5 = await wallet.getNonce('0xffffffffffffffffffffffffffffffffffffffff').then(r => BigInt(r)) - expect(nonceSpace5.toString()).to.equal('1') - - // Unused space should have nonce 0 - const nonceSpace6 = await wallet.getNonce('0x06').then(r => BigInt(r)) - expect(nonceSpace6.toString()).to.equal('0') - - // Using a space should consume it - await signer1.sendTransaction({ - to: ethers.Wallet.createRandom().address - }) - - const nonceSpace1b = await wallet.getNonce('0x01').then(r => BigInt(r)) - expect(nonceSpace1b.toString()).to.equal('2') - }) - - // Skip if using external network (chainId 31338) - // it randomly fails using node 20, it does not seem to be a bug - // on sequence.js, instead the external node returns empty data when calling - // `getNonce()`, when it should return a value - ;(chainId === 31338 ? describe.skip : describe)('multiple nonce spaces', async () => { - it('should send transactions on multiple nonce spaces at once', async () => { - const signer1 = account.getSigner(chainId, { nonceSpace: '0x01' }) - const signer2 = account.getSigner(chainId, { nonceSpace: 2 }) - const randomSpace = BigInt(ethers.hexlify(ethers.randomBytes(12))) - const signer3 = account.getSigner(chainId, { - nonceSpace: randomSpace - }) - const signer4 = account.getSigner(chainId, { nonceSpace: '0x04' }) - const signer5 = account.getSigner(chainId, { nonceSpace: '0xffffffffffffffffffffffffffffffffffffffff' }) - - const results = await Promise.all([ - signer1.sendTransaction({ - to: ethers.Wallet.createRandom().address - }), - signer2.sendTransaction({ - to: ethers.Wallet.createRandom().address - }), - signer3.sendTransaction({ - to: ethers.Wallet.createRandom().address - }), - signer4.sendTransaction({ - to: ethers.Wallet.createRandom().address - }), - signer5.sendTransaction({ - to: ethers.Wallet.createRandom().address - }) - ]) - - expect(results).to.have.lengthOf(5) - expect(results[0]).to.exist - expect(results[0].hash).to.exist - expect(results[1]).to.exist - expect(results[1].hash).to.exist - expect(results[2]).to.exist - expect(results[2].hash).to.exist - expect(results[3]).to.exist - expect(results[3].hash).to.exist - expect(results[4]).to.exist - expect(results[4].hash).to.exist - - // hashes should be different - for (let i = 0; i < results.length; i++) { - for (let j = i + 1; j < results.length; j++) { - expect(results[i].hash).to.not.equal(results[j].hash) - } - } - - // Should have used all spaces - const wallet = account.walletForStatus(chainId, await account.status(chainId)) - - const nonceSpace1 = await wallet.getNonce('0x01').then(r => BigInt(r)) - expect(nonceSpace1.toString()).to.equal('1') - - const nonceSpace2 = await wallet.getNonce(2).then(r => BigInt(r)) - expect(nonceSpace2.toString()).to.equal('1') - - const nonceSpace3 = await wallet.getNonce(randomSpace).then(r => BigInt(r)) - expect(nonceSpace3.toString()).to.equal('1') - - const nonceSpace4 = await wallet.getNonce('0x04').then(r => BigInt(r)) - expect(nonceSpace4.toString()).to.equal('1') - - const nonceSpace5 = await wallet.getNonce('0xffffffffffffffffffffffffffffffffffffffff').then(r => BigInt(r)) - expect(nonceSpace5.toString()).to.equal('1') - - // Unused space should have nonce 0 - const nonceSpace6 = await wallet.getNonce('0x06').then(r => BigInt(r)) - expect(nonceSpace6.toString()).to.equal('0') - - // Using a space should consume it - await signer1.sendTransaction({ - to: ethers.Wallet.createRandom().address - }) - - const nonceSpace1b = await wallet.getNonce('0x01').then(r => BigInt(r)) - expect(nonceSpace1b.toString()).to.equal('2') - }) - - it('should send 100 parallel transactions using different spaces', async () => { - const signers = new Array(100).fill(0).map(() => - account.getSigner(chainId, { - nonceSpace: BigInt(ethers.hexlify(ethers.randomBytes(12))) - }) - ) - - // Send a random transaction on each one of them - await Promise.all( - signers.map(signer => - signer.sendTransaction({ - to: ethers.Wallet.createRandom().address - }) - ) - ) - - // Send another - await Promise.all( - signers.map(signer => - signer.sendTransaction({ - to: ethers.Wallet.createRandom().address - }) - ) - ) - - /// ... and another - await Promise.all( - signers.map(signer => - signer.sendTransaction({ - to: ethers.Wallet.createRandom().address - }) - ) - ) - }) - - it('should send multiple transactions on multiple nonce spaces at once', async () => { - const signer1 = account.getSigner(chainId, { nonceSpace: '0x01' }) - const signer2 = account.getSigner(chainId, { nonceSpace: 2 }) - const randomSpace = BigInt(ethers.hexlify(ethers.randomBytes(12))) - - const signer3 = account.getSigner(chainId, { - nonceSpace: randomSpace - }) - const signer4 = account.getSigner(chainId, { nonceSpace: '0x04' }) - const signer5 = account.getSigner(chainId, { nonceSpace: '0xffffffffffffffffffffffffffffffffffffffff' }) - - await Promise.all([ - signer1.sendTransaction({ - to: ethers.Wallet.createRandom().address - }), - signer2.sendTransaction({ - to: ethers.Wallet.createRandom().address - }), - signer3.sendTransaction({ - to: ethers.Wallet.createRandom().address - }), - signer4.sendTransaction({ - to: ethers.Wallet.createRandom().address - }), - signer5.sendTransaction({ - to: ethers.Wallet.createRandom().address - }) - ]) - - const results = await Promise.all([ - signer1.sendTransaction({ - to: ethers.Wallet.createRandom().address - }), - signer2.sendTransaction({ - to: ethers.Wallet.createRandom().address - }), - signer3.sendTransaction({ - to: ethers.Wallet.createRandom().address - }), - signer4.sendTransaction({ - to: ethers.Wallet.createRandom().address - }), - signer5.sendTransaction({ - to: ethers.Wallet.createRandom().address - }) - ]) - - expect(results).to.have.lengthOf(5) - expect(results[0]).to.exist - expect(results[0].hash).to.exist - expect(results[1]).to.exist - expect(results[1].hash).to.exist - expect(results[2]).to.exist - expect(results[2].hash).to.exist - expect(results[3]).to.exist - expect(results[3].hash).to.exist - expect(results[4]).to.exist - expect(results[4].hash).to.exist - - // hashes should be different - for (let i = 0; i < results.length; i++) { - for (let j = i + 1; j < results.length; j++) { - expect(results[i].hash).to.not.equal(results[j].hash) - } - } - - // Should have used all spaces - const wallet = account.walletForStatus(chainId, await account.status(chainId)) - - const nonceSpace2 = await wallet.getNonce(2).then(r => BigInt(r)) - expect(nonceSpace2.toString()).to.equal('2') - - const nonceSpace1 = await wallet.getNonce('0x01').then(r => BigInt(r)) - expect(nonceSpace1.toString()).to.equal('2') - - const nonceSpace3 = await wallet.getNonce(randomSpace).then(r => BigInt(r)) - expect(nonceSpace3.toString()).to.equal('2') - - const nonceSpace4 = await wallet.getNonce('0x04').then(r => BigInt(r)) - expect(nonceSpace4.toString()).to.equal('2') - - const nonceSpace5 = await wallet.getNonce('0xffffffffffffffffffffffffffffffffffffffff').then(r => BigInt(r)) - expect(nonceSpace5.toString()).to.equal('2') - - // Unused space should have nonce 0 - const nonceSpace6 = await wallet.getNonce('0x06').then(r => BigInt(r)) - expect(nonceSpace6.toString()).to.equal('0') - - // Using a space should consume it - await signer1.sendTransaction({ - to: ethers.Wallet.createRandom().address - }) - - const nonceSpace1b = await wallet.getNonce('0x01').then(r => BigInt(r)) - expect(nonceSpace1b.toString()).to.equal('3') - }) - }) - }) - }) -}) diff --git a/old/packages/api/CHANGELOG.md b/old/packages/api/CHANGELOG.md deleted file mode 100644 index 0a4106482..000000000 --- a/old/packages/api/CHANGELOG.md +++ /dev/null @@ -1,2156 +0,0 @@ -# @0xsequence/api - -## 2.3.8 - -### Patch Changes - -- indexer: update clients - -## 2.3.7 - -### Patch Changes - -- Metadata updates - -## 2.3.6 - -### Patch Changes - -- New chains - -## 2.3.5 - -### Patch Changes - -- Add Frequency Testnet - -## 2.3.4 - -### Patch Changes - -- metadata: exclude deprecated methods on rpc client - -## 2.3.3 - -### Patch Changes - -- metadata: client update - -## 2.3.2 - -### Patch Changes - -- metadata: update rpc client - -## 2.3.1 - -### Patch Changes - -- indexer: update rpc client - -## 2.3.0 - -### Minor Changes - -- update metadata rpc client - -## 2.2.15 - -### Patch Changes - -- API updates - -## 2.2.14 - -### Patch Changes - -- Somnia Testnet and Monad Testnet - -## 2.2.13 - -### Patch Changes - -- Add XR1 to all networks - -## 2.2.12 - -### Patch Changes - -- Add XR1 - -## 2.2.11 - -### Patch Changes - -- Relayer updates - -## 2.2.10 - -### Patch Changes - -- Etherlink support - -## 2.2.9 - -### Patch Changes - -- Indexer gateway native token balances - -## 2.2.8 - -### Patch Changes - -- Add Moonbeam and Moonbase Alpha - -## 2.2.7 - -### Patch Changes - -- Update Builder package - -## 2.2.6 - -### Patch Changes - -- Update relayer package - -## 2.2.5 - -### Patch Changes - -- auth: fix sequence indexer gateway url -- account: immutable wallet proxy hook - -## 2.2.4 - -### Patch Changes - -- network: update soneium mainnet block explorer url -- waas: signTypedData intent support - -## 2.2.3 - -### Patch Changes - -- provider: updating initWallet to use connected network configs if they exist - -## 2.2.2 - -### Patch Changes - -- pass projectAccessKey to relayer at all times - -## 2.2.1 - -### Patch Changes - -- waas-ethers: sign typed data - -## 2.2.0 - -### Minor Changes - -- indexer: gateway client -- @0xsequence/builder -- upgrade puppeteer to v23.10.3 - -## 2.1.8 - -### Patch Changes - -- Add Soneium Mainnet - -## 2.1.7 - -### Patch Changes - -- guard: pass project access key to guard requests - -## 2.1.6 - -### Patch Changes - -- Add LAOS and Telos Testnet chains - -## 2.1.5 - -### Patch Changes - -- account: save presigned configuration with reference chain id 1 - -## 2.1.4 - -### Patch Changes - -- provider: pass projectAccessKey into MuxMessageProvider - -## 2.1.3 - -### Patch Changes - -- waas: time drift date fix due to strange browser quirk - -## 2.1.2 - -### Patch Changes - -- provider: export analytics correctly - -## 2.1.1 - -### Patch Changes - -- Add LAOS chain support - -## 2.1.0 - -### Minor Changes - -- account: forward project access key when estimating fees and sending transactions - -### Patch Changes - -- sessions: save signatures with reference chain id - -## 2.0.26 - -### Patch Changes - -- account: fix chain id comparison - -## 2.0.25 - -### Patch Changes - -- skale-nebula: deploy gas limit = 10m - -## 2.0.24 - -### Patch Changes - -- sessions: arweave: configurable gateway url -- waas: use /status to get time drift before sending any intents - -## 2.0.23 - -### Patch Changes - -- Add The Root Network support - -## 2.0.22 - -### Patch Changes - -- Add SKALE Nebula Mainnet support - -## 2.0.21 - -### Patch Changes - -- account: add publishWitnessFor - -## 2.0.20 - -### Patch Changes - -- upgrade deps, and improve waas session status handling - -## 2.0.19 - -### Patch Changes - -- Add Immutable zkEVM support - -## 2.0.18 - -### Patch Changes - -- waas: new contractCall transaction type -- sessions: add arweave owner - -## 2.0.17 - -### Patch Changes - -- update waas auth to clear session before signIn - -## 2.0.16 - -### Patch Changes - -- Removed Astar chains - -## 2.0.15 - -### Patch Changes - -- indexer: update bindings with token balance additions - -## 2.0.14 - -### Patch Changes - -- sessions: arweave config reader -- network: add b3 and apechain mainnet configs - -## 2.0.13 - -### Patch Changes - -- network: toy-testnet - -## 2.0.12 - -### Patch Changes - -- api: update bindings - -## 2.0.11 - -### Patch Changes - -- waas: intents test fix -- api: update bindings - -## 2.0.10 - -### Patch Changes - -- network: soneium minato testnet - -## 2.0.9 - -### Patch Changes - -- network: fix SKALE network name - -## 2.0.8 - -### Patch Changes - -- metadata: update bindings - -## 2.0.7 - -### Patch Changes - -- wallet request handler fix - -## 2.0.6 - -### Patch Changes - -- network: matic -> pol - -## 2.0.5 - -### Patch Changes - -- provider: update databeat to 0.9.2 - -## 2.0.4 - -### Patch Changes - -- network: add skale-nebula-testnet - -## 2.0.3 - -### Patch Changes - -- waas: check session status in SequenceWaaS.isSignedIn() - -## 2.0.2 - -### Patch Changes - -- sessions: property convert serialized bignumber hex value to bigint - -## 2.0.1 - -### Patch Changes - -- waas: http signature check for authenticator requests -- provider: unwrap legacy json rpc responses -- use json replacer and reviver for bigints - -## 2.0.0 - -### Major Changes - -- ethers v6 - -## 1.10.15 - -### Patch Changes - -- utils: extractProjectIdFromAccessKey - -## 1.10.14 - -### Patch Changes - -- network: add borne-testnet to allNetworks - -## 1.10.13 - -### Patch Changes - -- network: add borne testnet - -## 1.10.12 - -### Patch Changes - -- api: update bindings -- global/window -> globalThis - -## 1.10.11 - -### Patch Changes - -- waas: updated intent.gen without webrpc types, errors exported from authenticator.gen - -## 1.10.10 - -### Patch Changes - -- metadata: update bindings with new contract collections api - -## 1.10.9 - -### Patch Changes - -- waas minor update - -## 1.10.8 - -### Patch Changes - -- update metadata bindings - -## 1.10.7 - -### Patch Changes - -- minor fixes to waas client - -## 1.10.6 - -### Patch Changes - -- metadata: update bindings - -## 1.10.5 - -### Patch Changes - -- network: ape-chain-testnet -> apechain-testnet - -## 1.10.4 - -### Patch Changes - -- network: add b3-sepolia, ape-chain-testnet, blast, blast-sepolia - -## 1.10.3 - -### Patch Changes - -- typing fix - -## 1.10.2 - -### Patch Changes - -- - waas: add getIdToken method - - indexer: update api client - -## 1.10.1 - -### Patch Changes - -- metadata: update bindings - -## 1.10.0 - -### Minor Changes - -- waas release v1.3.0 - -## 1.9.37 - -### Patch Changes - -- network: adds nativeToken data to NetworkMetadata constants - -## 1.9.36 - -### Patch Changes - -- guard: export client - -## 1.9.35 - -### Patch Changes - -- guard: update bindings - -## 1.9.34 - -### Patch Changes - -- waas: always use lowercase email - -## 1.9.33 - -### Patch Changes - -- waas: umd build - -## 1.9.32 - -### Patch Changes - -- indexer: update bindings - -## 1.9.31 - -### Patch Changes - -- metadata: token directory changes - -## 1.9.30 - -### Patch Changes - -- update - -## 1.9.29 - -### Patch Changes - -- disable gnosis chain - -## 1.9.28 - -### Patch Changes - -- add utils/merkletree - -## 1.9.27 - -### Patch Changes - -- network: optimistic -> optimism -- waas: remove defaults -- api, sessions: update bindings - -## 1.9.26 - -### Patch Changes - -- - add backend interfaces for pluggable interfaces - - introduce @0xsequence/react-native - - update pnpm to lockfile v9 - -## 1.9.25 - -### Patch Changes - -- update webrpc clients with new error types - -## 1.9.24 - -### Patch Changes - -- waas: add memoryStore backend to localStore - -## 1.9.23 - -### Patch Changes - -- update api client bindings - -## 1.9.22 - -### Patch Changes - -- update metadata client bindings - -## 1.9.21 - -### Patch Changes - -- api client bindings - -## 1.9.20 - -### Patch Changes - -- api client bindings update - -## 1.9.19 - -### Patch Changes - -- waas update - -## 1.9.18 - -### Patch Changes - -- provider: prohibit dangerous functions - -## 1.9.17 - -### Patch Changes - -- network: add xr-sepolia - -## 1.9.16 - -### Patch Changes - -- waas: sequence.feeOptions - -## 1.9.15 - -### Patch Changes - -- metadata: collection external_link field name fix - -## 1.9.14 - -### Patch Changes - -- network: astar-zkatana -> astar-zkyoto -- network: deprecate polygon mumbai network -- network: add xai and polygon amoy - -## 1.9.13 - -### Patch Changes - -- waas: fix @0xsequence/network dependency - -## 1.9.12 - -### Patch Changes - -- indexer: update rpc bindings -- provider: signMessage: Serialize the BytesLike or string message into hexstring before sending -- waas: SessionAuthProof - -## 1.9.11 - -### Patch Changes - -- metdata, update rpc bindings - -## 1.9.10 - -### Patch Changes - -- update metadata rpc bindings - -## 1.9.9 - -### Patch Changes - -- metadata, add SequenceCollections rpc client - -## 1.9.8 - -### Patch Changes - -- waas client update - -## 1.9.7 - -### Patch Changes - -- update rpc client bindings for api, metadata and relayer - -## 1.9.6 - -### Patch Changes - -- waas package update - -## 1.9.5 - -### Patch Changes - -- RpcRelayer prioritize project access key - -## 1.9.4 - -### Patch Changes - -- waas: fix network dependency - -## 1.9.3 - -### Patch Changes - -- provider: don't append access key to RPC url if user has already provided it - -## 1.9.2 - -### Patch Changes - -- network: add xai-sepolia - -## 1.9.1 - -### Patch Changes - -- analytics fix - -## 1.9.0 - -### Minor Changes - -- waas release - -## 1.8.8 - -### Patch Changes - -- update metadata bindings - -## 1.8.7 - -### Patch Changes - -- provider: update databeat to 0.9.1 - -## 1.8.6 - -### Patch Changes - -- guard: SignedOwnershipProof - -## 1.8.5 - -### Patch Changes - -- guard: signOwnershipProof and isSignedOwnershipProof - -## 1.8.4 - -### Patch Changes - -- network: add homeverse to networks list - -## 1.8.3 - -### Patch Changes - -- api: introduce basic linked wallet support - -## 1.8.2 - -### Patch Changes - -- provider: don't initialize analytics unless explicitly requested - -## 1.8.1 - -### Patch Changes - -- update to analytics provider - -## 1.8.0 - -### Minor Changes - -- provider: project analytics - -## 1.7.2 - -### Patch Changes - -- 0xsequence: ChainId should not be exported as a type -- account, wallet: fix nonce selection - -## 1.7.1 - -### Patch Changes - -- network: add missing avalanche logoURI - -## 1.7.0 - -### Minor Changes - -- provider: projectAccessKey is now required - -### Patch Changes - -- network: add NetworkMetadata.logoURI property for all networks - -## 1.6.3 - -### Patch Changes - -- network list update - -## 1.6.2 - -### Patch Changes - -- auth: projectAccessKey option -- wallet: use 12 bytes for random space - -## 1.6.1 - -### Patch Changes - -- core: add simple config from subdigest support -- core: fix encode tree with subdigest -- account: implement buildOnChainSignature on Account - -## 1.6.0 - -### Minor Changes - -- account, wallet: parallel transactions by default - -### Patch Changes - -- provider: emit disconnect on sign out - -## 1.5.0 - -### Minor Changes - -- signhub: add 'signing' signer status - -### Patch Changes - -- auth: Session.open: onAccountAddress callback -- account: allow empty transaction bundles - -## 1.4.9 - -### Patch Changes - -- rename SequenceMetadataClient to SequenceMetadata - -## 1.4.8 - -### Patch Changes - -- account: Account.getSigners - -## 1.4.7 - -### Patch Changes - -- update indexer client bindings - -## 1.4.6 - -### Patch Changes - -- - add sepolia networks, mark goerli as deprecated - - update indexer client bindings - -## 1.4.5 - -### Patch Changes - -- indexer/metadata: update client bindings -- auth: selectWallet with new address - -## 1.4.4 - -### Patch Changes - -- indexer: update bindings -- auth: handle jwt expiry - -## 1.4.3 - -### Patch Changes - -- guard: return active status from GuardSigner.getAuthMethods - -## 1.4.2 - -### Patch Changes - -- guard: update bindings - -## 1.4.1 - -### Patch Changes - -- network: remove unused networks -- signhub: orchestrator interface -- guard: auth methods interface -- guard: update bindings for pin and totp -- guard: no more retry logic - -## 1.4.0 - -### Minor Changes - -- project access key support - -## 1.3.0 - -### Minor Changes - -- signhub: account children - -### Patch Changes - -- guard: do not throw when building deploy transaction -- network: snowtrace.io -> subnets.avax.network/c-chain - -## 1.2.9 - -### Patch Changes - -- account: AccountSigner.sendTransaction simulateForFeeOptions -- relayer: update bindings - -## 1.2.8 - -### Patch Changes - -- rename X-Sequence-Token-Key header to X-Access-Key - -## 1.2.7 - -### Patch Changes - -- add x-sequence-token-key to clients - -## 1.2.6 - -### Patch Changes - -- Fix bind multicall provider - -## 1.2.5 - -### Patch Changes - -- Multicall default configuration fixes - -## 1.2.4 - -### Patch Changes - -- provider: Adding missing payment provider types to PaymentProviderOption -- provider: WalletRequestHandler.notifyChainChanged - -## 1.2.3 - -### Patch Changes - -- auth, provider: connect to accept optional authorizeNonce - -## 1.2.2 - -### Patch Changes - -- provider: allow createContract calls -- core: check for explicit zero address in contract deployments - -## 1.2.1 - -### Patch Changes - -- auth: use sequence api chain id as reference chain id if available - -## 1.2.0 - -### Minor Changes - -- split services from session, better local support - -## 1.1.15 - -### Patch Changes - -- guard: remove error filtering - -## 1.1.14 - -### Patch Changes - -- guard: add GuardSigner.onError - -## 1.1.13 - -### Patch Changes - -- provider: pass client version with connect options -- provider: removing large from BannerSize - -## 1.1.12 - -### Patch Changes - -- provider: adding bannerSize to ConnectOptions - -## 1.1.11 - -### Patch Changes - -- add homeverse configs - -## 1.1.10 - -### Patch Changes - -- handle default EIP6492 on send - -## 1.1.9 - -### Patch Changes - -- Custom default EIP6492 on client - -## 1.1.8 - -### Patch Changes - -- metadata: searchMetadata: add types filter - -## 1.1.7 - -### Patch Changes - -- adding signInWith connect settings option to allow dapps to automatically login their users with a certain provider optimizing the normal authentication flow - -## 1.1.6 - -### Patch Changes - -- metadata: searchMetadata: add chainID and excludeTokenMetadata filters - -## 1.1.5 - -### Patch Changes - -- account: re-compute meta-transaction id for wallet deployment transactions - -## 1.1.4 - -### Patch Changes - -- network: rename base-mainnet to base -- provider: override isDefaultChain with ConnectOptions.networkId if provided - -## 1.1.3 - -### Patch Changes - -- provider: use network id from transport session -- provider: sign authorization using ConnectOptions.networkId if provided - -## 1.1.2 - -### Patch Changes - -- provider: jsonrpc chain id fixes - -## 1.1.1 - -### Patch Changes - -- network: add base mainnet and sepolia -- provider: reject toxic transaction requests - -## 1.1.0 - -### Minor Changes - -- Refactor dapp facing provider - -## 1.0.5 - -### Patch Changes - -- network: export network constants -- guard: use the correct global for fetch -- network: nova-explorer.arbitrum.io -> nova.arbiscan.io - -## 1.0.4 - -### Patch Changes - -- provider: accept name or number for networkId - -## 1.0.3 - -### Patch Changes - -- Simpler isValidSignature helpers - -## 1.0.2 - -### Patch Changes - -- add extra signature validation utils methods - -## 1.0.1 - -### Patch Changes - -- add homeverse testnet - -## 1.0.0 - -### Major Changes - -- https://sequence.xyz/blog/sequence-wallet-light-state-sync-full-merkle-wallets - -## 0.43.34 - -### Patch Changes - -- auth: no jwt for indexer - -## 0.43.33 - -### Patch Changes - -- Adding onConnectOptionsChange handler to WalletRequestHandler - -## 0.43.32 - -### Patch Changes - -- add Base Goerli network - -## 0.43.31 - -### Patch Changes - -- remove AuxDataProvider, add promptSignInConnect - -## 0.43.30 - -### Patch Changes - -- add arbitrum goerli testnet - -## 0.43.29 - -### Patch Changes - -- provider: check availability of window object - -## 0.43.28 - -### Patch Changes - -- update api bindings - -## 0.43.27 - -### Patch Changes - -- Add rpc is sequence method - -## 0.43.26 - -### Patch Changes - -- add zkevm url to enum - -## 0.43.25 - -### Patch Changes - -- added polygon zkevm to mainnet networks - -## 0.43.24 - -### Patch Changes - -- name change from zkevm to polygon-zkevm - -## 0.43.23 - -### Patch Changes - -- update zkEVM name to Polygon zkEVM - -## 0.43.22 - -### Patch Changes - -- add zkevm chain - -## 0.43.21 - -### Patch Changes - -- api: update client bindings - -## 0.43.20 - -### Patch Changes - -- indexer: update bindings - -## 0.43.19 - -### Patch Changes - -- session proof update - -## 0.43.18 - -### Patch Changes - -- rpc client global check, hardening - -## 0.43.17 - -### Patch Changes - -- rpc clients, check of 'global' is defined - -## 0.43.16 - -### Patch Changes - -- ethers peerDep to v5, update rpc client global use - -## 0.43.15 - -### Patch Changes - -- - provider: expand receiver type on some util methods - -## 0.43.14 - -### Patch Changes - -- bump - -## 0.43.13 - -### Patch Changes - -- update rpc bindings - -## 0.43.12 - -### Patch Changes - -- provider: single wallet init, and add new unregisterWallet() method - -## 0.43.11 - -### Patch Changes - -- fix lockfiles -- re-add mocha type deleter - -## 0.43.10 - -### Patch Changes - -- various improvements - -## 0.43.9 - -### Patch Changes - -- update deps - -## 0.43.8 - -### Patch Changes - -- network: JsonRpcProvider with caching - -## 0.43.7 - -### Patch Changes - -- provider: fix wallet network init - -## 0.43.6 - -### Patch Changes - -- metadatata: update rpc bindings - -## 0.43.5 - -### Patch Changes - -- provider: do not set default network for connect messages -- provider: forward missing error message - -## 0.43.4 - -### Patch Changes - -- no-change version bump to fix incorrectly tagged snapshot build - -## 0.43.3 - -### Patch Changes - -- metadata: update bindings - -## 0.43.2 - -### Patch Changes - -- provider: implement connectUnchecked - -## 0.43.1 - -### Patch Changes - -- update to latest ethauth dep - -## 0.43.0 - -### Minor Changes - -- move ethers to a peer dependency - -## 0.42.10 - -### Patch Changes - -- add auxDataProvider - -## 0.42.9 - -### Patch Changes - -- provider: add eip-191 exceptions - -## 0.42.8 - -### Patch Changes - -- provider: skip setting intent origin if we're unity plugin - -## 0.42.7 - -### Patch Changes - -- Add sign in options to connection settings - -## 0.42.6 - -### Patch Changes - -- api bindings update - -## 0.42.5 - -### Patch Changes - -- relayer: don't treat missing receipt as hard failure - -## 0.42.4 - -### Patch Changes - -- provider: add custom app protocol to connect options - -## 0.42.3 - -### Patch Changes - -- update api bindings - -## 0.42.2 - -### Patch Changes - -- disable rinkeby network - -## 0.42.1 - -### Patch Changes - -- wallet: optional waitForReceipt parameter - -## 0.42.0 - -### Minor Changes - -- relayer: estimateGasLimits -> simulate -- add simulator package - -### Patch Changes - -- transactions: fix flattenAuxTransactions -- provider: only filter nullish values -- provider: re-map transaction 'gas' back to 'gasLimit' - -## 0.41.3 - -### Patch Changes - -- api bindings update - -## 0.41.2 - -### Patch Changes - -- api bindings update - -## 0.41.1 - -### Patch Changes - -- update default networks - -## 0.41.0 - -### Minor Changes - -- relayer: fix Relayer.wait() interface - - The interface for calling Relayer.wait() has changed. Instead of a single optional ill-defined timeout/delay parameter, there are three optional parameters, in order: - - - timeout: the maximum time to wait for the transaction receipt - - delay: the polling interval, i.e. the time to wait between requests - - maxFails: the maximum number of hard failures to tolerate before giving up - - Please update your codebase accordingly. - -- relayer: add optional waitForReceipt parameter to Relayer.relay - - The behaviour of Relayer.relay() was not well-defined with respect to whether or not it waited for a receipt. - This change allows the caller to specify whether to wait or not, with the default behaviour being to wait. - -### Patch Changes - -- relayer: wait receipt retry logic -- fix wrapped object error -- provider: forward delegateCall and revertOnError transaction fields - -## 0.40.6 - -### Patch Changes - -- add arbitrum-nova chain - -## 0.40.5 - -### Patch Changes - -- api: update bindings - -## 0.40.4 - -### Patch Changes - -- add unreal transport - -## 0.40.3 - -### Patch Changes - -- provider: fix MessageToSign message type - -## 0.40.2 - -### Patch Changes - -- Wallet provider, loadSession method - -## 0.40.1 - -### Patch Changes - -- export sequence.initWallet and sequence.getWallet - -## 0.40.0 - -### Minor Changes - -- add sequence.initWallet(network, config) and sequence.getWallet() helper methods - -## 0.39.6 - -### Patch Changes - -- indexer: update client bindings - -## 0.39.5 - -### Patch Changes - -- provider: fix networkRpcUrl config option - -## 0.39.4 - -### Patch Changes - -- api: update client bindings - -## 0.39.3 - -### Patch Changes - -- add request method on Web3Provider - -## 0.39.2 - -### Patch Changes - -- update umd name - -## 0.39.1 - -### Patch Changes - -- add Aurora network -- add origin info for accountsChanged event to handle it per dapp - -## 0.39.0 - -### Minor Changes - -- abstract window.localStorage to interface type - -## 0.38.2 - -### Patch Changes - -- provider: add Settings.defaultPurchaseAmount - -## 0.38.1 - -### Patch Changes - -- update api and metadata rpc bindings - -## 0.38.0 - -### Minor Changes - -- api: update bindings, change TokenPrice interface -- bridge: remove @0xsequence/bridge package -- api: update bindings, rename ContractCallArg to TupleComponent - -## 0.37.1 - -### Patch Changes - -- Add back sortNetworks - Removing sorting was a breaking change for dapps on older versions which directly integrate sequence. - -## 0.37.0 - -### Minor Changes - -- network related fixes and improvements -- api: bindings: exchange rate lookups - -## 0.36.13 - -### Patch Changes - -- api: update bindings with new price endpoints - -## 0.36.12 - -### Patch Changes - -- wallet: skip remote signers if not needed -- auth: check that signature meets threshold before requesting auth token - -## 0.36.11 - -### Patch Changes - -- Prefix EIP191 message on wallet-request-handler - -## 0.36.10 - -### Patch Changes - -- support bannerUrl on connect - -## 0.36.9 - -### Patch Changes - -- minor dev xp improvements - -## 0.36.8 - -### Patch Changes - -- more connect options (theme, payment providers, funding currencies) - -## 0.36.7 - -### Patch Changes - -- fix missing break - -## 0.36.6 - -### Patch Changes - -- wallet_switchEthereumChain support - -## 0.36.5 - -### Patch Changes - -- auth: bump ethauth to 0.7.0 - network, wallet: don't assume position of auth network in list - api/indexer/metadata: trim trailing slash on hostname, and add endpoint urls - relayer: Allow to specify local relayer transaction parameters like gas price or gas limit - -## 0.36.4 - -### Patch Changes - -- Updating list of chain ids to include other ethereum compatible chains - -## 0.36.3 - -### Patch Changes - -- provider: pass connect options to prompter methods - -## 0.36.2 - -### Patch Changes - -- transactions: Setting target to 0x0 when empty to during SequenceTxAbiEncode - -## 0.36.1 - -### Patch Changes - -- metadata: update client with more fields - -## 0.36.0 - -### Minor Changes - -- relayer, wallet: fee quote support - -## 0.35.12 - -### Patch Changes - -- provider: rename wallet.commands to wallet.utils - -## 0.35.11 - -### Patch Changes - -- provider/utils: smoother message validation - -## 0.35.10 - -### Patch Changes - -- upgrade deps - -## 0.35.9 - -### Patch Changes - -- provider: window-transport override event handlers with new wallet instance - -## 0.35.8 - -### Patch Changes - -- provider: async wallet sign in improvements - -## 0.35.7 - -### Patch Changes - -- config: cache wallet configs - -## 0.35.6 - -### Patch Changes - -- provider: support async signin of wallet request handler - -## 0.35.5 - -### Patch Changes - -- wallet: skip threshold check during fee estimation - -## 0.35.4 - -### Patch Changes - -- - browser extension mode, center window - -## 0.35.3 - -### Patch Changes - -- - update window position when in browser extension mode - -## 0.35.2 - -### Patch Changes - -- - provider: WindowMessageHandler accept optional windowHref - -## 0.35.1 - -### Patch Changes - -- wallet: update config on undeployed too - -## 0.35.0 - -### Minor Changes - -- - config: add buildStubSignature - - provider: add checks to signing cases for wallet deployment and config statuses - - provider: add prompt for wallet deployment - - relayer: add BaseRelayer.prependWalletDeploy - - relayer: add Relayer.feeOptions - - relayer: account for wallet deployment in fee estimation - - transactions: add fromTransactionish - - wallet: add Account.prependConfigUpdate - - wallet: add Account.getFeeOptions - -## 0.34.0 - -### Minor Changes - -- - upgrade deps - -## 0.33.1 - -### Patch Changes - -- update bindings - -## 0.31.0 - -### Minor Changes - -- - upgrading to ethers v5.5 - -## 0.30.0 - -### Minor Changes - -- - upgrade most deps - -## 0.29.9 - -### Patch Changes - -- update client - -## 0.29.8 - -### Patch Changes - -- update api - -## 0.29.4 - -### Patch Changes - -- api: update rpc bindings - -## 0.29.1 - -### Patch Changes - -- metadata: ContractInfo.decimals is now optional, i.e. may be undefined - - api: new APIs for user storage and isUsingGoogleMail - -## 0.29.0 - -### Minor Changes - -- major architectural changes in Sequence design - - - only one API instance, API is no longer a per-chain service - - separate per-chain indexer service, API no longer handles indexing - - single contract metadata service, API no longer serves metadata - - chaind package has been removed, indexer and metadata packages have been added - - stronger typing with new explicit ChainId type - - multicall fixes and improvements - - forbid "wait" transactions in sendTransactionBatch calls - -## 0.28.0 - -### Minor Changes - -- extension provider - -## 0.27.0 - -### Minor Changes - -- Add requireFreshSigner lib to sessions - -## 0.25.1 - -### Patch Changes - -- Fix build typescrypt issue - -## 0.25.0 - -### Minor Changes - -- 10c8af8: Add estimator package - Fix multicall few calls bug - -## 0.24.0 - -### Minor Changes - -- pass wallet config and nonce to GetMetaTxnNetworkFeeOptions - -## 0.23.0 - -### Minor Changes - -- - relayer: offer variety of gas fee options from the relayer service" - -## 0.22.2 - -### Patch Changes - -- e1c109e: Fix authProof on expired sessions - -## 0.22.1 - -### Patch Changes - -- transport session cache - -## 0.22.0 - -### Minor Changes - -- e667b65: Expose all relayer options on networks - -## 0.21.5 - -### Patch Changes - -- Give priority to metaTxnId returned by relayer - -## 0.21.4 - -### Patch Changes - -- Add has enough signers method - -## 0.21.3 - -### Patch Changes - -- add window session cache - -## 0.21.2 - -### Patch Changes - -- exception handlind in relayer - -## 0.21.0 - -### Minor Changes - -- - fix gas estimation on wallets with large number of signers - - update to session handling and wallet config construction upon auth - -## 0.20.0 - -### Minor Changes - -- revert JWT request piggybacking - -## 0.19.3 - -### Patch Changes - -- jwtAuth visibility, package version sync - -## 0.19.0 - -### Minor Changes - -- - provider, improve dapp / wallet transport io - -## 0.18.0 - -### Minor Changes - -- relayer improvements and pending transaction handling - -## 0.17.0 - -### Minor Changes - -- ArcadeumAPIClient no longer exposes jwtAuth - -## 0.16.1 - -### Patch Changes - -- api: add legacy types for bw compat - -## 0.16.0 - -### Minor Changes - -- relayer as its own service separate from chaind - -## 0.15.1 - -### Patch Changes - -- update api clients - -## 0.15.0 - -### Patch Changes - -- - update chaind and api bindings - - replace EstimateMetaTxnGasReceipt with UpdateMetaTxnGasLimits and GetMetaTxnNetworkFeeOptions - -## 0.14.3 - -### Patch Changes - -- Fix 0xSequence relayer dependencies - -## 0.14.2 - -### Patch Changes - -- Add debug logs to rpc-relayer - -## 0.14.1 - -### Patch Changes - -- update api client - -## 0.14.0 - -### Minor Changes - -- update sequence utils finder which includes optimization - -## 0.13.0 - -### Minor Changes - -- Update SequenceUtils deployed contract - -## 0.12.1 - -### Patch Changes - -- npm bump - -## 0.12.0 - -### Minor Changes - -- provider: improvements to window transport - -## 0.11.4 - -### Patch Changes - -- update api client - -## 0.11.3 - -### Patch Changes - -- improve openWindow state options handling - -## 0.11.2 - -### Patch Changes - -- Fix multicall proxy scopes - -## 0.11.1 - -### Patch Changes - -- Add support for dynamic and nested signatures - -## 0.11.0 - -### Minor Changes - -- Update wallet context to 1.7 contracts - -## 0.10.9 - -### Patch Changes - -- add support for public addresses as signers in session.open - -## 0.10.8 - -### Patch Changes - -- Multicall production configuration - -## 0.10.7 - -### Patch Changes - -- allow provider transport to force disconnect - -## 0.10.6 - -### Patch Changes - -- - fix getWalletState method - -## 0.10.5 - -### Patch Changes - -- update relayer gas refund options - -## 0.10.4 - -### Patch Changes - -- Update api proto - -## 0.10.3 - -### Patch Changes - -- Fix loading config cross-chain - -## 0.10.2 - -### Patch Changes - -- - message digest fix - -## 0.10.1 - -### Patch Changes - -- upgrade deps - -## 0.10.0 - -### Minor Changes - -- Deployed new contracts with ERC1271 signer support - -## 0.9.6 - -### Patch Changes - -- Update ABIs for latest sequence contracts - -## 0.9.5 - -### Patch Changes - -- Implemented session class - -## 0.9.3 - -### Patch Changes - -- - minor improvements - -## 0.9.2 - -### Patch Changes - -- - Update api client - -## 0.9.1 - -### Patch Changes - -- - patch bump - -## 0.9.0 - -### Minor Changes - -- - provider transport hardening - -## 0.8.5 - -### Patch Changes - -- - use latest wallet-contracts - -## 0.8.4 - -### Patch Changes - -- - minor improvements, name updates and comments - -## 0.8.3 - -### Patch Changes - -- - refinements - - - normalize signer address in config - - - provider: getWalletState() method to WalletProvider - -## 0.8.2 - -### Patch Changes - -- - field rename and ethauth dependency bump - -## 0.8.1 - -### Patch Changes - -- - variety of optimizations - -## 0.8.0 - -### Minor Changes - -- - changeset fix - -## 0.7.0 - -### Patch Changes - -- 6f11ed7: sequence.js, init release diff --git a/old/packages/api/README.md b/old/packages/api/README.md deleted file mode 100644 index 6ac423e4d..000000000 --- a/old/packages/api/README.md +++ /dev/null @@ -1,4 +0,0 @@ -@0xsequence/api -=============== - -See [0xsequence project page](https://github.com/0xsequence/sequence.js). diff --git a/old/packages/api/package.json b/old/packages/api/package.json deleted file mode 100644 index 83168d29e..000000000 --- a/old/packages/api/package.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "name": "@0xsequence/api", - "version": "2.3.8", - "description": "api sub-package for Sequence", - "repository": "https://github.com/0xsequence/sequence.js/tree/master/packages/api", - "source": "src/index.ts", - "main": "dist/0xsequence-api.cjs.js", - "module": "dist/0xsequence-api.esm.js", - "author": "Horizon Blockchain Games", - "license": "Apache-2.0", - "scripts": { - "test": "echo", - "typecheck": "tsc --noEmit" - }, - "dependencies": {}, - "peerDependencies": {}, - "devDependencies": {}, - "files": [ - "src", - "dist" - ] -} diff --git a/old/packages/api/src/api.gen.ts b/old/packages/api/src/api.gen.ts deleted file mode 100644 index f835ba571..000000000 --- a/old/packages/api/src/api.gen.ts +++ /dev/null @@ -1,3597 +0,0 @@ -/* eslint-disable */ -// sequence-api v0.4.0 2409c101bc62a1b7aa797e099d913b1c4046e9f6 -// -- -// Code generated by webrpc-gen@v0.24.0 with typescript generator. DO NOT EDIT. -// -// webrpc-gen -schema=api.ridl -target=typescript -client -out=./clients/api.gen.ts - -export const WebrpcHeader = 'Webrpc' - -export const WebrpcHeaderValue = 'webrpc@v0.24.0;gen-typescript@v0.16.3;sequence-api@v0.4.0' - -// WebRPC description and code-gen version -export const WebRPCVersion = 'v1' - -// Schema version of your RIDL schema -export const WebRPCSchemaVersion = 'v0.4.0' - -// Schema hash generated from your RIDL schema -export const WebRPCSchemaHash = '2409c101bc62a1b7aa797e099d913b1c4046e9f6' - -type WebrpcGenVersions = { - webrpcGenVersion: string - codeGenName: string - codeGenVersion: string - schemaName: string - schemaVersion: string -} - -export function VersionFromHeader(headers: Headers): WebrpcGenVersions { - const headerValue = headers.get(WebrpcHeader) - if (!headerValue) { - return { - webrpcGenVersion: '', - codeGenName: '', - codeGenVersion: '', - schemaName: '', - schemaVersion: '' - } - } - - return parseWebrpcGenVersions(headerValue) -} - -function parseWebrpcGenVersions(header: string): WebrpcGenVersions { - const versions = header.split(';') - if (versions.length < 3) { - return { - webrpcGenVersion: '', - codeGenName: '', - codeGenVersion: '', - schemaName: '', - schemaVersion: '' - } - } - - const [_, webrpcGenVersion] = versions[0]!.split('@') - const [codeGenName, codeGenVersion] = versions[1]!.split('@') - const [schemaName, schemaVersion] = versions[2]!.split('@') - - return { - webrpcGenVersion: webrpcGenVersion ?? '', - codeGenName: codeGenName ?? '', - codeGenVersion: codeGenVersion ?? '', - schemaName: schemaName ?? '', - schemaVersion: schemaVersion ?? '' - } -} - -// -// Types -// - -export enum SortOrder { - DESC = 'DESC', - ASC = 'ASC' -} - -export enum SardinePaymentType { - ach = 'ach', - debit = 'debit', - credit = 'credit', - us_debit = 'us_debit', - international_debit = 'international_debit', - international_credit = 'international_credit' -} - -export enum SardineQuoteType { - buy = 'buy', - sell = 'sell' -} - -export enum TokenType { - ERC20 = 'ERC20', - ERC721 = 'ERC721', - ERC1155 = 'ERC1155' -} - -export enum TransakBuySell { - UNKNOWN = 'UNKNOWN', - BUY = 'BUY', - SELL = 'SELL' -} - -export interface Version { - webrpcVersion: string - schemaVersion: string - schemaHash: string - appVersion: string -} - -export interface RuntimeStatus { - healthOK: boolean - startTime: string - uptime: number - ver: string - branch: string - commitHash: string - checks: RuntimeChecks - numTxnsRelayed: { [key: string]: NumTxnsRelayed } -} - -export interface NumTxnsRelayed { - chainID: number - prev: number - current: number - period: number -} - -export interface RuntimeChecks {} - -export interface SequenceContext { - factory: string - mainModule: string - mainModuleUpgradable: string - guestModule: string - utils: string -} - -export interface PublicKey { - id: string - x: string - y: string -} - -export interface User { - address: string - username: string - avatar: string - bio: string - location: string - locale: string - backup?: boolean - backupConfirmed?: boolean - maxInvites?: number - updatedAt?: string - createdAt?: string -} - -export interface WalletBackup { - accountAddress: string - secretHash: string - encryptedWallet: string - userConfirmed: boolean - updatedAt?: string - createdAt?: string -} - -export interface Friend { - id: number - userAddress: string - friendAddress: string - nickname: string - user?: User - createdAt?: string -} - -export interface InviteCode { - usesLeft: number - ownerAccount: string - email?: string - url: string - createdAt?: string - expiresAt?: string -} - -export interface InviteCodeAccount { - claimedByUserAddress: string - claimedAt?: string -} - -export interface InviteInfo { - expiryInHours: number - max: number - invites: Array -} - -export interface ContractCall { - signature: string - function: string - args: Array -} - -export interface TupleComponent { - name?: string - type: string - value: any -} - -export interface IntentPrecondition { - type: string - chainID: string - data: any -} - -export interface IntentSolution { - transactions: Array -} - -export interface Transactions { - chainID: string - transactions: Array - preconditions?: Array -} - -export interface Transaction { - delegateCall: boolean - revertOnError: boolean - gasLimit: string - target: string - value: string - data: string -} - -export interface UserStorage { - userAddress: string - key: string - value: any -} - -export interface Token { - chainId: number - contractAddress: string - tokenId?: string -} - -export interface Price { - value: number - currency: string -} - -export interface TokenPrice { - token: Token - price?: Price - price24hChange?: Price - floorPrice: Price - buyPrice: Price - sellPrice: Price - updatedAt: string -} - -export interface ExchangeRate { - name: string - symbol: string - value: number - vsCurrency: string - currencyType: string -} - -export interface LinkedWallet { - id: number - walletType?: string - walletAddress: string - linkedWalletAddress: string - createdAt?: string -} - -export interface Page { - pageSize?: number - page?: number - totalRecords?: number - column?: string - before?: any - after?: any - sort?: Array - more?: boolean -} - -export interface SortBy { - column: string - order: SortOrder -} - -export interface SardineNFTCheckoutParams { - name: string - imageUrl: string - network: string - recipientAddress: string - blockchainNftId: string - contractAddress: string - quantity: number - decimals?: number - tokenAmount: string - tokenAddress: string - tokenSymbol: string - tokenDecimals?: number - calldata: string - platform: string - approvedSpenderAddress?: string -} - -export interface SardineNFTCheckout { - token: string - expiresAt: string - orderId: string -} - -export interface SardineOrder { - id: string - createdAt?: string - referenceId: string - status: string - fiatCurrency: string - fiatExchangeRateUSD: number - transactionId: string - expiresAt?: string - total: number - subTotal: number - transactionFee: number - networkFee: number - paymentCurrency?: string - paymentMethodType?: string - transactionType: string - name: string - price: number - imageUrl: string - contractAddress?: string - transactionHash?: string - recipientAddress: string -} - -export interface SardineRegion { - countryCode: string - isAllowedOnRamp: boolean - isAllowedOnNFT: boolean - isBasicKycRequired: Array - isSsnRequired: Array - name: string - currencyCode: string - isPayrollSupported: boolean - supportedDocuments: Array - paymentMethods: Array - states: Array -} - -export interface SardineRegionPaymentMethod { - name: string - isAllowedOnRamp: boolean - isAllowedOnNFT: boolean - subTypes: Array - type: string - subType: string -} - -export interface SardineRegionState { - code: string - name: string - isAllowedOnRamp: boolean - isAllowedOnNFT: boolean -} - -export interface SardineSupportedToken { - network: string - assetSymbol: string - assetName: string - chainId: string - tokenName: string - token: string - tokenAddress: string -} - -export interface SardineSupportedTokenForSwap { - isSupported: boolean - isSupportedForAbstraction: boolean - currentBalance: string -} - -export interface SardineEnabledToken { - network: string - assetSymbol: string - assetName: string - chainId: string - tokenName: string - token: string - tokenAddress: string -} - -export interface SardineGetQuoteParams { - assetType: string - network: string - total: number - currency?: string - paymentType?: SardinePaymentType - quoteType?: SardineQuoteType - walletAddress?: string -} - -export interface SardineQuote { - quantity: number - network: string - assetType: string - total: number - currency: string - expiresAt: string - paymentType: string - price: number - subtotal: number - transactionFee: number - networkFee: number - highNetworkFee: boolean - minTransactionValue: number - maxTransactionValue: number - liquidityProvider: string -} - -export interface SardineFiatCurrency { - currencyCode: string - name: string - currencySymbol: string - paymentOptions: Array - supportingCountries: Array -} - -export interface SardinePaymentOption { - name: string - dailyLimit: number - weeklyLimit: number - monthlyLimit: number - maxAmount: number - minAmount: number - subTypes: Array - type: string - subType: string - processingTime: string -} - -export interface SwapPermit2Price { - currencyAddress: string - currencyBalance: string - price: string - maxPrice: string - transactionValue: string -} - -export interface SwapPermit2Quote { - currencyAddress: string - currencyBalance: string - price: string - maxPrice: string - to: string - transactionData: string - transactionValue: string - approveData: string -} - -export interface SwapPrice { - currencyAddress: string - currencyBalance: string - price: string - maxPrice: string - transactionValue: string -} - -export interface SwapQuote { - currencyAddress: string - currencyBalance: string - price: string - maxPrice: string - to: string - transactionData: string - transactionValue: string - approveData: string -} - -export interface CurrencyGroup { - name: string - tokens: Array -} - -export interface CurrencyGroupToken { - chainId: number - tokenAddress: string -} - -export interface OffchainInventory { - id: number - projectId: number - chainId: number - externalProductId: string - paymentTokenAddress: string - paymentTokenType: TokenType - paymentTokenId: number - paymentAmount: number - paymentRecipient: string - chainedCallAddress?: string - chainedCallData?: string - allowCrossChainPayments?: boolean - callbackURL?: string - createdAt: string - deletedAt?: string -} - -export interface OffchainPayment { - id: number - offchainInventoryId: number - productRecipient: string - paymentChainId: number - paymentTokenAddress: string - expiration: string - createdAt: string - completedAt?: string - processedAt?: string -} - -export interface PaymentResponse { - paymentId: number - offchainInventoryId: number - chainId: number - externalProductId: string - paymentTokenAddress: string - paymentTokenType: TokenType - paymentTokenId: number - paymentTotal: number - expiration: string - signature: string - txTo: string - txData: string -} - -export interface AdoptedChildWallet { - address: string -} - -export interface Pack { - id: number - chainId: number - projectId: number - contractAddress: string - content: Array - createdAt?: string -} - -export interface PackContent { - tokenAddresses: Array - tokenIds: Array> - amounts: Array> -} - -export interface TransakCountry { - alpha2: string - alpha3: string - isAllowed: boolean - isLightKycAllowed: boolean - name: string - currencyCode: string - supportedDocuments: Array - partners: Array - states: Array -} - -export interface TransakPartner { - name: string - isCardPayment: boolean - currencyCode: string -} - -export interface TransakState { - code: string - name: string - isAllowed: boolean -} - -export interface TransakCryptoCurrency { - id: string - coinID: string - address: string - addressAdditionalData: any - createdAt: string - decimals: number - image: TransakCryptoCurrencyImage - isAllowed: boolean - isPopular: boolean - isStable: boolean - name: string - roundOff: number - symbol: string - isIgnorePriceVerification: boolean - imageBk: TransakCryptoCurrencyImage - kycCountriesNotSupported: Array - network: TransakCryptoCurrencyNetwork - uniqueID: string - tokenType: string - tokenIdentifier: string - isPayInAllowed: boolean - isSuspended: boolean -} - -export interface TransakCryptoCurrencyImage { - large: string - small: string - thumb: string -} - -export interface TransakCryptoCurrencyNetwork { - name: string - fiatCurrenciesNotSupported: Array - chainID: string -} - -export interface TransakCryptoCurrencyNetworkFiatNotSupported { - fiatCurrency: string - paymentMethod: string -} - -export interface TransakFiatCurrency { - symbol: string - supportingCountries: Array - logoSymbol: string - name: string - paymentOptions: Array - isPopular: boolean - isAllowed: boolean - roundOff: number - isPayOutAllowed: boolean - defaultCountryForNFT: string - icon: string - displayMessage: string -} - -export interface TransakFiatCurrencyPaymentOption { - name: string - id: string - isNftAllowed: boolean - isNonCustodial: boolean - processingTime: string - displayText: boolean - icon: string - limitCurrency: string - isActive: boolean - provider: string - maxAmount: number - minAmount: number - defaultAmount: number - isConverted: boolean - visaPayoutCountries: Array - mastercardPayoutCountries: Array - isPayOutAllowed: boolean - minAmountForPayOut: number - maxAmountForPayOut: number - defaultAmountForPayOut: number -} - -export interface TransakPrice { - quoteID: string - conversionPrice: number - marketConversionPrice: number - slippage: number - fiatCurrency: string - cryptoCurrency: string - paymentMethod: string - fiatAmount: number - cryptoAmount: number - isBuyOrSell: string - network: string - feeDecimal: number - totalFee: number - feeBreakdown: Array - nonce: number - cryptoLiquidityProvider: string - notes: Array -} - -export interface TransakPriceFeeBreakdown { - Name: string - Value: number - ID: string - Ids: Array -} - -export interface TransakGetPriceParams { - fiatCurrency: string - cryptoCurrency: string - isBuyOrSell: TransakBuySell - network: string - paymentMethod: string - fiatAmount: number - cryptoAmount: number - quoteCountryCode: string -} - -export interface TransakChain { - name: string - chainId: number -} - -export interface API { - ping(headers?: object, signal?: AbortSignal): Promise - version(headers?: object, signal?: AbortSignal): Promise - runtimeStatus(headers?: object, signal?: AbortSignal): Promise - clock(headers?: object, signal?: AbortSignal): Promise - getSequenceContext(headers?: object, signal?: AbortSignal): Promise - getAuthToken(args: GetAuthTokenArgs, headers?: object, signal?: AbortSignal): Promise - getAuthToken2(args: GetAuthToken2Args, headers?: object, signal?: AbortSignal): Promise - sendPasswordlessLink( - args: SendPasswordlessLinkArgs, - headers?: object, - signal?: AbortSignal - ): Promise - registerPublicKey(args: RegisterPublicKeyArgs, headers?: object, signal?: AbortSignal): Promise - getPublicKey(args: GetPublicKeyArgs, headers?: object, signal?: AbortSignal): Promise - friendList(args: FriendListArgs, headers?: object, signal?: AbortSignal): Promise - getFriendByAddress(args: GetFriendByAddressArgs, headers?: object, signal?: AbortSignal): Promise - searchFriends(args: SearchFriendsArgs, headers?: object, signal?: AbortSignal): Promise - addFriend(args: AddFriendArgs, headers?: object, signal?: AbortSignal): Promise - updateFriendNickname( - args: UpdateFriendNicknameArgs, - headers?: object, - signal?: AbortSignal - ): Promise - removeFriend(args: RemoveFriendArgs, headers?: object, signal?: AbortSignal): Promise - contractCall(args: ContractCallArgs, headers?: object, signal?: AbortSignal): Promise - decodeContractCall(args: DecodeContractCallArgs, headers?: object, signal?: AbortSignal): Promise - lookupContractCallSelectors( - args: LookupContractCallSelectorsArgs, - headers?: object, - signal?: AbortSignal - ): Promise - userStorageFetch(args: UserStorageFetchArgs, headers?: object, signal?: AbortSignal): Promise - userStorageSave(args: UserStorageSaveArgs, headers?: object, signal?: AbortSignal): Promise - userStorageDelete(args: UserStorageDeleteArgs, headers?: object, signal?: AbortSignal): Promise - userStorageFetchAll(args: UserStorageFetchAllArgs, headers?: object, signal?: AbortSignal): Promise - getMoonpayLink(args: GetMoonpayLinkArgs, headers?: object, signal?: AbortSignal): Promise - resolveENSAddress(args: ResolveENSAddressArgs, headers?: object, signal?: AbortSignal): Promise - isValidSignature(args: IsValidSignatureArgs, headers?: object, signal?: AbortSignal): Promise - isValidMessageSignature( - args: IsValidMessageSignatureArgs, - headers?: object, - signal?: AbortSignal - ): Promise - isValidTypedDataSignature( - args: IsValidTypedDataSignatureArgs, - headers?: object, - signal?: AbortSignal - ): Promise - isValidETHAuthProof(args: IsValidETHAuthProofArgs, headers?: object, signal?: AbortSignal): Promise - sardineGetClientToken(headers?: object, signal?: AbortSignal): Promise - sardineGetNFTCheckoutToken( - args: SardineGetNFTCheckoutTokenArgs, - headers?: object, - signal?: AbortSignal - ): Promise - sardineGetNFTCheckoutOrderStatus( - args: SardineGetNFTCheckoutOrderStatusArgs, - headers?: object, - signal?: AbortSignal - ): Promise - sardineGetSupportedRegions(headers?: object, signal?: AbortSignal): Promise - sardineGetSupportedFiatCurrencies(headers?: object, signal?: AbortSignal): Promise - sardineGetSupportedTokens(headers?: object, signal?: AbortSignal): Promise - sardineGetSupportedTokenForSwap( - args: SardineGetSupportedTokenForSwapArgs, - headers?: object, - signal?: AbortSignal - ): Promise - sardineGetEnabledTokens(headers?: object, signal?: AbortSignal): Promise - sardineGetQuote(args: SardineGetQuoteArgs, headers?: object, signal?: AbortSignal): Promise - getSardineClientToken(headers?: object, signal?: AbortSignal): Promise - getSardineNFTCheckoutToken( - args: GetSardineNFTCheckoutTokenArgs, - headers?: object, - signal?: AbortSignal - ): Promise - getSardineNFTCheckoutOrderStatus( - args: GetSardineNFTCheckoutOrderStatusArgs, - headers?: object, - signal?: AbortSignal - ): Promise - transakGetCountries(headers?: object, signal?: AbortSignal): Promise - transakGetCryptoCurrencies(headers?: object, signal?: AbortSignal): Promise - transakGetFiatCurrencies(headers?: object, signal?: AbortSignal): Promise - transakGetPrice(args: TransakGetPriceArgs, headers?: object, signal?: AbortSignal): Promise - transakGetSupportedNFTCheckoutChains( - headers?: object, - signal?: AbortSignal - ): Promise - getCoinPrices(args: GetCoinPricesArgs, headers?: object, signal?: AbortSignal): Promise - getCollectiblePrices( - args: GetCollectiblePricesArgs, - headers?: object, - signal?: AbortSignal - ): Promise - getExchangeRate(args: GetExchangeRateArgs, headers?: object, signal?: AbortSignal): Promise - memoryStore(args: MemoryStoreArgs, headers?: object, signal?: AbortSignal): Promise - memoryLoad(args: MemoryLoadArgs, headers?: object, signal?: AbortSignal): Promise - getInviteInfo(headers?: object, signal?: AbortSignal): Promise - isValidAccessCode(args: IsValidAccessCodeArgs, headers?: object, signal?: AbortSignal): Promise - internalClaimAccessCode( - args: InternalClaimAccessCodeArgs, - headers?: object, - signal?: AbortSignal - ): Promise - blockNumberAtTime(args: BlockNumberAtTimeArgs, headers?: object, signal?: AbortSignal): Promise - paperSessionSecret(args: PaperSessionSecretArgs, headers?: object, signal?: AbortSignal): Promise - paperSessionSecret2(args: PaperSessionSecret2Args, headers?: object, signal?: AbortSignal): Promise - linkWallet(args: LinkWalletArgs, headers?: object, signal?: AbortSignal): Promise - getLinkedWallets(args: GetLinkedWalletsArgs, headers?: object, signal?: AbortSignal): Promise - removeLinkedWallet(args: RemoveLinkedWalletArgs, headers?: object, signal?: AbortSignal): Promise - generateWaaSVerificationURL( - args: GenerateWaaSVerificationURLArgs, - headers?: object, - signal?: AbortSignal - ): Promise - validateWaaSVerificationNonce( - args: ValidateWaaSVerificationNonceArgs, - headers?: object, - signal?: AbortSignal - ): Promise - listAdoptedWallets(args: ListAdoptedWalletsArgs, headers?: object, signal?: AbortSignal): Promise - getSwapPermit2Price(args: GetSwapPermit2PriceArgs, headers?: object, signal?: AbortSignal): Promise - getSwapPermit2Prices( - args: GetSwapPermit2PricesArgs, - headers?: object, - signal?: AbortSignal - ): Promise - getSwapPermit2Quote(args: GetSwapPermit2QuoteArgs, headers?: object, signal?: AbortSignal): Promise - getSwapPrice(args: GetSwapPriceArgs, headers?: object, signal?: AbortSignal): Promise - getSwapPrices(args: GetSwapPricesArgs, headers?: object, signal?: AbortSignal): Promise - getSwapQuote(args: GetSwapQuoteArgs, headers?: object, signal?: AbortSignal): Promise - getSwapQuoteV2(args: GetSwapQuoteV2Args, headers?: object, signal?: AbortSignal): Promise - intentQuery(args: IntentQueryArgs, headers?: object, signal?: AbortSignal): Promise - listCurrencyGroups(headers?: object, signal?: AbortSignal): Promise - addOffchainInventory( - args: AddOffchainInventoryArgs, - headers?: object, - signal?: AbortSignal - ): Promise - getOffchainInventory( - args: GetOffchainInventoryArgs, - headers?: object, - signal?: AbortSignal - ): Promise - listOffchainInventories( - args: ListOffchainInventoriesArgs, - headers?: object, - signal?: AbortSignal - ): Promise - updateOffchainInventory( - args: UpdateOffchainInventoryArgs, - headers?: object, - signal?: AbortSignal - ): Promise - deleteOffchainInventory( - args: DeleteOffchainInventoryArgs, - headers?: object, - signal?: AbortSignal - ): Promise - requestOffchainPayment( - args: RequestOffchainPaymentArgs, - headers?: object, - signal?: AbortSignal - ): Promise - listOffchainPayments( - args: ListOffchainPaymentsArgs, - headers?: object, - signal?: AbortSignal - ): Promise - savePack(args: SavePackArgs, headers?: object, signal?: AbortSignal): Promise - getPack(args: GetPackArgs, headers?: object, signal?: AbortSignal): Promise - deletePack(args: DeletePackArgs, headers?: object, signal?: AbortSignal): Promise - updatePackContent(args: UpdatePackContentArgs, headers?: object, signal?: AbortSignal): Promise -} - -export interface PingArgs {} - -export interface PingReturn { - status: boolean -} -export interface VersionArgs {} - -export interface VersionReturn { - version: Version -} -export interface RuntimeStatusArgs {} - -export interface RuntimeStatusReturn { - status: RuntimeStatus -} -export interface ClockArgs {} - -export interface ClockReturn { - serverTime: string -} -export interface GetSequenceContextArgs {} - -export interface GetSequenceContextReturn { - data: SequenceContext -} -export interface GetAuthTokenArgs { - ewtString: string - testnetMode?: boolean -} - -export interface GetAuthTokenReturn { - status: boolean - jwtToken: string - address: string - user?: User -} -export interface GetAuthToken2Args { - ewtString: string - chainID: string -} - -export interface GetAuthToken2Return { - status: boolean - jwtToken: string - address: string - user?: User -} -export interface SendPasswordlessLinkArgs { - email: string - redirectUri: string - intent: string -} - -export interface SendPasswordlessLinkReturn { - status: boolean -} -export interface RegisterPublicKeyArgs { - publicKey: PublicKey -} - -export interface RegisterPublicKeyReturn { - status: boolean -} -export interface GetPublicKeyArgs { - id: string -} - -export interface GetPublicKeyReturn { - publicKey: PublicKey -} -export interface FriendListArgs { - nickname?: string - page?: Page -} - -export interface FriendListReturn { - page: Page - friends: Array -} -export interface GetFriendByAddressArgs { - friendAddress: string -} - -export interface GetFriendByAddressReturn { - status: boolean - friend: Friend -} -export interface SearchFriendsArgs { - filterUsername: string - page?: Page -} - -export interface SearchFriendsReturn { - friends: Array -} -export interface AddFriendArgs { - friendAddress: string - optionalNickname?: string -} - -export interface AddFriendReturn { - status: boolean - friend?: Friend -} -export interface UpdateFriendNicknameArgs { - friendAddress: string - nickname: string -} - -export interface UpdateFriendNicknameReturn { - status: boolean - friend?: Friend -} -export interface RemoveFriendArgs { - friendAddress: string -} - -export interface RemoveFriendReturn { - status: boolean -} -export interface ContractCallArgs { - chainID: string - contract: string - inputExpr: string - outputExpr: string - args: Array -} - -export interface ContractCallReturn { - returns: Array -} -export interface DecodeContractCallArgs { - callData: string -} - -export interface DecodeContractCallReturn { - call: ContractCall -} -export interface LookupContractCallSelectorsArgs { - selectors: Array -} - -export interface LookupContractCallSelectorsReturn { - signatures: Array> -} -export interface UserStorageFetchArgs { - key: string -} - -export interface UserStorageFetchReturn { - object: any -} -export interface UserStorageSaveArgs { - key: string - object: any -} - -export interface UserStorageSaveReturn { - ok: boolean -} -export interface UserStorageDeleteArgs { - key: string -} - -export interface UserStorageDeleteReturn { - ok: boolean -} -export interface UserStorageFetchAllArgs { - keys?: Array -} - -export interface UserStorageFetchAllReturn { - objects: { [key: string]: any } -} -export interface GetMoonpayLinkArgs { - url: string -} - -export interface GetMoonpayLinkReturn { - signedUrl: string -} -export interface ResolveENSAddressArgs { - ens: string -} - -export interface ResolveENSAddressReturn { - address: string - ok: boolean -} -export interface IsValidSignatureArgs { - chainId: string - walletAddress: string - digest: string - signature: string -} - -export interface IsValidSignatureReturn { - isValid: boolean -} -export interface IsValidMessageSignatureArgs { - chainId: string - walletAddress: string - message: string - signature: string -} - -export interface IsValidMessageSignatureReturn { - isValid: boolean -} -export interface IsValidTypedDataSignatureArgs { - chainId: string - walletAddress: string - typedData: any - signature: string -} - -export interface IsValidTypedDataSignatureReturn { - isValid: boolean -} -export interface IsValidETHAuthProofArgs { - chainId: string - walletAddress: string - ethAuthProofString: string -} - -export interface IsValidETHAuthProofReturn { - isValid: boolean -} -export interface SardineGetClientTokenArgs {} - -export interface SardineGetClientTokenReturn { - token: string -} -export interface SardineGetNFTCheckoutTokenArgs { - params: SardineNFTCheckoutParams -} - -export interface SardineGetNFTCheckoutTokenReturn { - resp: SardineNFTCheckout -} -export interface SardineGetNFTCheckoutOrderStatusArgs { - orderId: string -} - -export interface SardineGetNFTCheckoutOrderStatusReturn { - resp: SardineOrder -} -export interface SardineGetSupportedRegionsArgs {} - -export interface SardineGetSupportedRegionsReturn { - regions: Array -} -export interface SardineGetSupportedFiatCurrenciesArgs {} - -export interface SardineGetSupportedFiatCurrenciesReturn { - tokens: Array -} -export interface SardineGetSupportedTokensArgs {} - -export interface SardineGetSupportedTokensReturn { - tokens: Array -} -export interface SardineGetSupportedTokenForSwapArgs { - network: string - tokenAddress: string -} - -export interface SardineGetSupportedTokenForSwapReturn { - token: SardineSupportedTokenForSwap -} -export interface SardineGetEnabledTokensArgs {} - -export interface SardineGetEnabledTokensReturn { - tokens: Array -} -export interface SardineGetQuoteArgs { - params: SardineGetQuoteParams -} - -export interface SardineGetQuoteReturn { - quote: SardineQuote -} -export interface GetSardineClientTokenArgs {} - -export interface GetSardineClientTokenReturn { - token: string -} -export interface GetSardineNFTCheckoutTokenArgs { - params: SardineNFTCheckoutParams -} - -export interface GetSardineNFTCheckoutTokenReturn { - resp: SardineNFTCheckout -} -export interface GetSardineNFTCheckoutOrderStatusArgs { - orderId: string -} - -export interface GetSardineNFTCheckoutOrderStatusReturn { - resp: SardineOrder -} -export interface TransakGetCountriesArgs {} - -export interface TransakGetCountriesReturn { - regions: Array -} -export interface TransakGetCryptoCurrenciesArgs {} - -export interface TransakGetCryptoCurrenciesReturn { - currencies: Array -} -export interface TransakGetFiatCurrenciesArgs {} - -export interface TransakGetFiatCurrenciesReturn { - currencies: Array -} -export interface TransakGetPriceArgs { - params: TransakGetPriceParams -} - -export interface TransakGetPriceReturn { - price: TransakPrice -} -export interface TransakGetSupportedNFTCheckoutChainsArgs {} - -export interface TransakGetSupportedNFTCheckoutChainsReturn { - chains: Array -} -export interface GetCoinPricesArgs { - tokens: Array -} - -export interface GetCoinPricesReturn { - tokenPrices: Array -} -export interface GetCollectiblePricesArgs { - tokens: Array -} - -export interface GetCollectiblePricesReturn { - tokenPrices: Array -} -export interface GetExchangeRateArgs { - toCurrency: string -} - -export interface GetExchangeRateReturn { - exchangeRate: ExchangeRate -} -export interface MemoryStoreArgs { - key: string - value: string -} - -export interface MemoryStoreReturn { - ok: boolean -} -export interface MemoryLoadArgs { - key: string -} - -export interface MemoryLoadReturn { - value: string -} -export interface GetInviteInfoArgs {} - -export interface GetInviteInfoReturn { - inviteInfo: InviteInfo -} -export interface IsValidAccessCodeArgs { - accessCode: string -} - -export interface IsValidAccessCodeReturn { - status: boolean -} -export interface InternalClaimAccessCodeArgs { - address: string - accessCode: string -} - -export interface InternalClaimAccessCodeReturn { - status: boolean -} -export interface BlockNumberAtTimeArgs { - chainId: number - timestamps: Array -} - -export interface BlockNumberAtTimeReturn { - blocks: Array -} -export interface PaperSessionSecretArgs { - chainName: string - contractAddress: string - paramsJson: string - contractType: string -} - -export interface PaperSessionSecretReturn { - secret: string -} -export interface PaperSessionSecret2Args { - chainName: string - contractAddress: string - paramsJson: string - abi: string -} - -export interface PaperSessionSecret2Return { - secret: string -} -export interface LinkWalletArgs { - parentWalletAddress: string - parentWalletMessage: string - parentWalletSignature: string - linkedWalletAddress: string - linkedWalletMessage: string - linkedWalletSignature: string - signatureChainId: string - linkedWalletType?: string -} - -export interface LinkWalletReturn { - status: boolean -} -export interface GetLinkedWalletsArgs { - parentWalletAddress: string - parentWalletMessage: string - parentWalletSignature: string - signatureChainId: string -} - -export interface GetLinkedWalletsReturn { - linkedWallets: Array -} -export interface RemoveLinkedWalletArgs { - parentWalletAddress: string - parentWalletMessage: string - parentWalletSignature: string - linkedWalletAddress: string - signatureChainId: string -} - -export interface RemoveLinkedWalletReturn { - status: boolean -} -export interface GenerateWaaSVerificationURLArgs { - walletAddress: string -} - -export interface GenerateWaaSVerificationURLReturn { - nonce: string - verificationURL: string -} -export interface ValidateWaaSVerificationNonceArgs { - nonce: string - signature: string - sessionId: string - chainId: string -} - -export interface ValidateWaaSVerificationNonceReturn { - walletAddress: string -} -export interface ListAdoptedWalletsArgs { - page?: Page -} - -export interface ListAdoptedWalletsReturn { - page: Page - wallets: Array -} -export interface GetSwapPermit2PriceArgs { - buyCurrencyAddress: string - sellCurrencyAddress: string - buyAmount: string - chainId: number - slippagePercentage?: number -} - -export interface GetSwapPermit2PriceReturn { - swapPermit2Price: SwapPermit2Price -} -export interface GetSwapPermit2PricesArgs { - userAddress: string - buyCurrencyAddress: string - buyAmount: string - chainId: number - slippagePercentage?: number -} - -export interface GetSwapPermit2PricesReturn { - swapPermit2Prices: Array -} -export interface GetSwapPermit2QuoteArgs { - userAddress: string - buyCurrencyAddress: string - sellCurrencyAddress: string - buyAmount: string - chainId: number - includeApprove: boolean - slippagePercentage?: number -} - -export interface GetSwapPermit2QuoteReturn { - swapPermit2Quote: SwapPermit2Quote -} -export interface GetSwapPriceArgs { - buyCurrencyAddress: string - sellCurrencyAddress: string - buyAmount: string - chainId: number - slippagePercentage?: number -} - -export interface GetSwapPriceReturn { - swapPrice: SwapPrice -} -export interface GetSwapPricesArgs { - userAddress: string - buyCurrencyAddress: string - buyAmount: string - chainId: number - slippagePercentage?: number -} - -export interface GetSwapPricesReturn { - swapPrices: Array -} -export interface GetSwapQuoteArgs { - userAddress: string - buyCurrencyAddress: string - sellCurrencyAddress: string - buyAmount: string - chainId: number - includeApprove: boolean - slippagePercentage?: number -} - -export interface GetSwapQuoteReturn { - swapQuote: SwapQuote -} -export interface GetSwapQuoteV2Args { - userAddress: string - buyCurrencyAddress: string - sellCurrencyAddress: string - buyAmount: string - chainId: number - includeApprove: boolean - slippagePercentage?: number -} - -export interface GetSwapQuoteV2Return { - swapQuote: SwapQuote -} -export interface IntentQueryArgs { - wallet: string - preconditions: Array -} - -export interface IntentQueryReturn { - solutions: Array -} -export interface ListCurrencyGroupsArgs {} - -export interface ListCurrencyGroupsReturn { - currencyGroups: Array -} -export interface AddOffchainInventoryArgs { - inventory: OffchainInventory -} - -export interface AddOffchainInventoryReturn { - inventoryId: number -} -export interface GetOffchainInventoryArgs { - inventoryId: number -} - -export interface GetOffchainInventoryReturn { - inventory: OffchainInventory -} -export interface ListOffchainInventoriesArgs { - projectId: number -} - -export interface ListOffchainInventoriesReturn { - inventory: Array -} -export interface UpdateOffchainInventoryArgs { - inventory: OffchainInventory -} - -export interface UpdateOffchainInventoryReturn {} -export interface DeleteOffchainInventoryArgs { - inventoryId: number -} - -export interface DeleteOffchainInventoryReturn { - ok: boolean -} -export interface RequestOffchainPaymentArgs { - inventoryId: number - recipient: string - chainId?: number - tokenAddress?: string -} - -export interface RequestOffchainPaymentReturn { - payment: PaymentResponse -} -export interface ListOffchainPaymentsArgs { - inventoryId: number - page?: Page -} - -export interface ListOffchainPaymentsReturn { - page: Page - payments: Array -} -export interface SavePackArgs { - pack: Pack -} - -export interface SavePackReturn { - merkleRoot: string -} -export interface GetPackArgs { - contractAddress: string - chainId: number -} - -export interface GetPackReturn { - pack: Pack -} -export interface DeletePackArgs { - contractAddress: string - chainId: number -} - -export interface DeletePackReturn { - status: boolean -} -export interface UpdatePackContentArgs { - pack: Pack -} - -export interface UpdatePackContentReturn { - merkleRoot: string -} - -// -// Client -// -export class API implements API { - protected hostname: string - protected fetch: Fetch - protected path = '/rpc/API/' - - constructor(hostname: string, fetch: Fetch) { - this.hostname = hostname.replace(/\/*$/, '') - this.fetch = (input: RequestInfo, init?: RequestInit) => fetch(input, init) - } - - private url(name: string): string { - return this.hostname + this.path + name - } - - ping = (headers?: object, signal?: AbortSignal): Promise => { - return this.fetch(this.url('Ping'), createHTTPRequest({}, headers, signal)).then( - res => { - return buildResponse(res).then(_data => { - return { - status: _data.status - } - }) - }, - error => { - throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) - } - ) - } - - version = (headers?: object, signal?: AbortSignal): Promise => { - return this.fetch(this.url('Version'), createHTTPRequest({}, headers, signal)).then( - res => { - return buildResponse(res).then(_data => { - return { - version: _data.version - } - }) - }, - error => { - throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) - } - ) - } - - runtimeStatus = (headers?: object, signal?: AbortSignal): Promise => { - return this.fetch(this.url('RuntimeStatus'), createHTTPRequest({}, headers, signal)).then( - res => { - return buildResponse(res).then(_data => { - return { - status: _data.status - } - }) - }, - error => { - throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) - } - ) - } - - clock = (headers?: object, signal?: AbortSignal): Promise => { - return this.fetch(this.url('Clock'), createHTTPRequest({}, headers, signal)).then( - res => { - return buildResponse(res).then(_data => { - return { - serverTime: _data.serverTime - } - }) - }, - error => { - throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) - } - ) - } - - getSequenceContext = (headers?: object, signal?: AbortSignal): Promise => { - return this.fetch(this.url('GetSequenceContext'), createHTTPRequest({}, headers, signal)).then( - res => { - return buildResponse(res).then(_data => { - return { - data: _data.data - } - }) - }, - error => { - throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) - } - ) - } - - getAuthToken = (args: GetAuthTokenArgs, headers?: object, signal?: AbortSignal): Promise => { - return this.fetch(this.url('GetAuthToken'), createHTTPRequest(args, headers, signal)).then( - res => { - return buildResponse(res).then(_data => { - return { - status: _data.status, - jwtToken: _data.jwtToken, - address: _data.address, - user: _data.user - } - }) - }, - error => { - throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) - } - ) - } - - getAuthToken2 = (args: GetAuthToken2Args, headers?: object, signal?: AbortSignal): Promise => { - return this.fetch(this.url('GetAuthToken2'), createHTTPRequest(args, headers, signal)).then( - res => { - return buildResponse(res).then(_data => { - return { - status: _data.status, - jwtToken: _data.jwtToken, - address: _data.address, - user: _data.user - } - }) - }, - error => { - throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) - } - ) - } - - sendPasswordlessLink = ( - args: SendPasswordlessLinkArgs, - headers?: object, - signal?: AbortSignal - ): Promise => { - return this.fetch(this.url('SendPasswordlessLink'), createHTTPRequest(args, headers, signal)).then( - res => { - return buildResponse(res).then(_data => { - return { - status: _data.status - } - }) - }, - error => { - throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) - } - ) - } - - registerPublicKey = (args: RegisterPublicKeyArgs, headers?: object, signal?: AbortSignal): Promise => { - return this.fetch(this.url('RegisterPublicKey'), createHTTPRequest(args, headers, signal)).then( - res => { - return buildResponse(res).then(_data => { - return { - status: _data.status - } - }) - }, - error => { - throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) - } - ) - } - - getPublicKey = (args: GetPublicKeyArgs, headers?: object, signal?: AbortSignal): Promise => { - return this.fetch(this.url('GetPublicKey'), createHTTPRequest(args, headers, signal)).then( - res => { - return buildResponse(res).then(_data => { - return { - publicKey: _data.publicKey - } - }) - }, - error => { - throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) - } - ) - } - - friendList = (args: FriendListArgs, headers?: object, signal?: AbortSignal): Promise => { - return this.fetch(this.url('FriendList'), createHTTPRequest(args, headers, signal)).then( - res => { - return buildResponse(res).then(_data => { - return { - page: _data.page, - friends: >_data.friends - } - }) - }, - error => { - throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) - } - ) - } - - getFriendByAddress = ( - args: GetFriendByAddressArgs, - headers?: object, - signal?: AbortSignal - ): Promise => { - return this.fetch(this.url('GetFriendByAddress'), createHTTPRequest(args, headers, signal)).then( - res => { - return buildResponse(res).then(_data => { - return { - status: _data.status, - friend: _data.friend - } - }) - }, - error => { - throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) - } - ) - } - - searchFriends = (args: SearchFriendsArgs, headers?: object, signal?: AbortSignal): Promise => { - return this.fetch(this.url('SearchFriends'), createHTTPRequest(args, headers, signal)).then( - res => { - return buildResponse(res).then(_data => { - return { - friends: >_data.friends - } - }) - }, - error => { - throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) - } - ) - } - - addFriend = (args: AddFriendArgs, headers?: object, signal?: AbortSignal): Promise => { - return this.fetch(this.url('AddFriend'), createHTTPRequest(args, headers, signal)).then( - res => { - return buildResponse(res).then(_data => { - return { - status: _data.status, - friend: _data.friend - } - }) - }, - error => { - throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) - } - ) - } - - updateFriendNickname = ( - args: UpdateFriendNicknameArgs, - headers?: object, - signal?: AbortSignal - ): Promise => { - return this.fetch(this.url('UpdateFriendNickname'), createHTTPRequest(args, headers, signal)).then( - res => { - return buildResponse(res).then(_data => { - return { - status: _data.status, - friend: _data.friend - } - }) - }, - error => { - throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) - } - ) - } - - removeFriend = (args: RemoveFriendArgs, headers?: object, signal?: AbortSignal): Promise => { - return this.fetch(this.url('RemoveFriend'), createHTTPRequest(args, headers, signal)).then( - res => { - return buildResponse(res).then(_data => { - return { - status: _data.status - } - }) - }, - error => { - throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) - } - ) - } - - contractCall = (args: ContractCallArgs, headers?: object, signal?: AbortSignal): Promise => { - return this.fetch(this.url('ContractCall'), createHTTPRequest(args, headers, signal)).then( - res => { - return buildResponse(res).then(_data => { - return { - returns: >_data.returns - } - }) - }, - error => { - throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) - } - ) - } - - decodeContractCall = ( - args: DecodeContractCallArgs, - headers?: object, - signal?: AbortSignal - ): Promise => { - return this.fetch(this.url('DecodeContractCall'), createHTTPRequest(args, headers, signal)).then( - res => { - return buildResponse(res).then(_data => { - return { - call: _data.call - } - }) - }, - error => { - throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) - } - ) - } - - lookupContractCallSelectors = ( - args: LookupContractCallSelectorsArgs, - headers?: object, - signal?: AbortSignal - ): Promise => { - return this.fetch(this.url('LookupContractCallSelectors'), createHTTPRequest(args, headers, signal)).then( - res => { - return buildResponse(res).then(_data => { - return { - signatures: >>_data.signatures - } - }) - }, - error => { - throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) - } - ) - } - - userStorageFetch = (args: UserStorageFetchArgs, headers?: object, signal?: AbortSignal): Promise => { - return this.fetch(this.url('UserStorageFetch'), createHTTPRequest(args, headers, signal)).then( - res => { - return buildResponse(res).then(_data => { - return { - object: _data.object - } - }) - }, - error => { - throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) - } - ) - } - - userStorageSave = (args: UserStorageSaveArgs, headers?: object, signal?: AbortSignal): Promise => { - return this.fetch(this.url('UserStorageSave'), createHTTPRequest(args, headers, signal)).then( - res => { - return buildResponse(res).then(_data => { - return { - ok: _data.ok - } - }) - }, - error => { - throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) - } - ) - } - - userStorageDelete = (args: UserStorageDeleteArgs, headers?: object, signal?: AbortSignal): Promise => { - return this.fetch(this.url('UserStorageDelete'), createHTTPRequest(args, headers, signal)).then( - res => { - return buildResponse(res).then(_data => { - return { - ok: _data.ok - } - }) - }, - error => { - throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) - } - ) - } - - userStorageFetchAll = ( - args: UserStorageFetchAllArgs, - headers?: object, - signal?: AbortSignal - ): Promise => { - return this.fetch(this.url('UserStorageFetchAll'), createHTTPRequest(args, headers, signal)).then( - res => { - return buildResponse(res).then(_data => { - return { - objects: <{ [key: string]: any }>_data.objects - } - }) - }, - error => { - throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) - } - ) - } - - getMoonpayLink = (args: GetMoonpayLinkArgs, headers?: object, signal?: AbortSignal): Promise => { - return this.fetch(this.url('GetMoonpayLink'), createHTTPRequest(args, headers, signal)).then( - res => { - return buildResponse(res).then(_data => { - return { - signedUrl: _data.signedUrl - } - }) - }, - error => { - throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) - } - ) - } - - resolveENSAddress = (args: ResolveENSAddressArgs, headers?: object, signal?: AbortSignal): Promise => { - return this.fetch(this.url('ResolveENSAddress'), createHTTPRequest(args, headers, signal)).then( - res => { - return buildResponse(res).then(_data => { - return { - address: _data.address, - ok: _data.ok - } - }) - }, - error => { - throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) - } - ) - } - - isValidSignature = (args: IsValidSignatureArgs, headers?: object, signal?: AbortSignal): Promise => { - return this.fetch(this.url('IsValidSignature'), createHTTPRequest(args, headers, signal)).then( - res => { - return buildResponse(res).then(_data => { - return { - isValid: _data.isValid - } - }) - }, - error => { - throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) - } - ) - } - - isValidMessageSignature = ( - args: IsValidMessageSignatureArgs, - headers?: object, - signal?: AbortSignal - ): Promise => { - return this.fetch(this.url('IsValidMessageSignature'), createHTTPRequest(args, headers, signal)).then( - res => { - return buildResponse(res).then(_data => { - return { - isValid: _data.isValid - } - }) - }, - error => { - throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) - } - ) - } - - isValidTypedDataSignature = ( - args: IsValidTypedDataSignatureArgs, - headers?: object, - signal?: AbortSignal - ): Promise => { - return this.fetch(this.url('IsValidTypedDataSignature'), createHTTPRequest(args, headers, signal)).then( - res => { - return buildResponse(res).then(_data => { - return { - isValid: _data.isValid - } - }) - }, - error => { - throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) - } - ) - } - - isValidETHAuthProof = ( - args: IsValidETHAuthProofArgs, - headers?: object, - signal?: AbortSignal - ): Promise => { - return this.fetch(this.url('IsValidETHAuthProof'), createHTTPRequest(args, headers, signal)).then( - res => { - return buildResponse(res).then(_data => { - return { - isValid: _data.isValid - } - }) - }, - error => { - throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) - } - ) - } - - sardineGetClientToken = (headers?: object, signal?: AbortSignal): Promise => { - return this.fetch(this.url('SardineGetClientToken'), createHTTPRequest({}, headers, signal)).then( - res => { - return buildResponse(res).then(_data => { - return { - token: _data.token - } - }) - }, - error => { - throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) - } - ) - } - - sardineGetNFTCheckoutToken = ( - args: SardineGetNFTCheckoutTokenArgs, - headers?: object, - signal?: AbortSignal - ): Promise => { - return this.fetch(this.url('SardineGetNFTCheckoutToken'), createHTTPRequest(args, headers, signal)).then( - res => { - return buildResponse(res).then(_data => { - return { - resp: _data.resp - } - }) - }, - error => { - throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) - } - ) - } - - sardineGetNFTCheckoutOrderStatus = ( - args: SardineGetNFTCheckoutOrderStatusArgs, - headers?: object, - signal?: AbortSignal - ): Promise => { - return this.fetch(this.url('SardineGetNFTCheckoutOrderStatus'), createHTTPRequest(args, headers, signal)).then( - res => { - return buildResponse(res).then(_data => { - return { - resp: _data.resp - } - }) - }, - error => { - throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) - } - ) - } - - sardineGetSupportedRegions = (headers?: object, signal?: AbortSignal): Promise => { - return this.fetch(this.url('SardineGetSupportedRegions'), createHTTPRequest({}, headers, signal)).then( - res => { - return buildResponse(res).then(_data => { - return { - regions: >_data.regions - } - }) - }, - error => { - throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) - } - ) - } - - sardineGetSupportedFiatCurrencies = ( - headers?: object, - signal?: AbortSignal - ): Promise => { - return this.fetch(this.url('SardineGetSupportedFiatCurrencies'), createHTTPRequest({}, headers, signal)).then( - res => { - return buildResponse(res).then(_data => { - return { - tokens: >_data.tokens - } - }) - }, - error => { - throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) - } - ) - } - - sardineGetSupportedTokens = (headers?: object, signal?: AbortSignal): Promise => { - return this.fetch(this.url('SardineGetSupportedTokens'), createHTTPRequest({}, headers, signal)).then( - res => { - return buildResponse(res).then(_data => { - return { - tokens: >_data.tokens - } - }) - }, - error => { - throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) - } - ) - } - - sardineGetSupportedTokenForSwap = ( - args: SardineGetSupportedTokenForSwapArgs, - headers?: object, - signal?: AbortSignal - ): Promise => { - return this.fetch(this.url('SardineGetSupportedTokenForSwap'), createHTTPRequest(args, headers, signal)).then( - res => { - return buildResponse(res).then(_data => { - return { - token: _data.token - } - }) - }, - error => { - throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) - } - ) - } - - sardineGetEnabledTokens = (headers?: object, signal?: AbortSignal): Promise => { - return this.fetch(this.url('SardineGetEnabledTokens'), createHTTPRequest({}, headers, signal)).then( - res => { - return buildResponse(res).then(_data => { - return { - tokens: >_data.tokens - } - }) - }, - error => { - throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) - } - ) - } - - sardineGetQuote = (args: SardineGetQuoteArgs, headers?: object, signal?: AbortSignal): Promise => { - return this.fetch(this.url('SardineGetQuote'), createHTTPRequest(args, headers, signal)).then( - res => { - return buildResponse(res).then(_data => { - return { - quote: _data.quote - } - }) - }, - error => { - throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) - } - ) - } - - getSardineClientToken = (headers?: object, signal?: AbortSignal): Promise => { - return this.fetch(this.url('GetSardineClientToken'), createHTTPRequest({}, headers, signal)).then( - res => { - return buildResponse(res).then(_data => { - return { - token: _data.token - } - }) - }, - error => { - throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) - } - ) - } - - getSardineNFTCheckoutToken = ( - args: GetSardineNFTCheckoutTokenArgs, - headers?: object, - signal?: AbortSignal - ): Promise => { - return this.fetch(this.url('GetSardineNFTCheckoutToken'), createHTTPRequest(args, headers, signal)).then( - res => { - return buildResponse(res).then(_data => { - return { - resp: _data.resp - } - }) - }, - error => { - throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) - } - ) - } - - getSardineNFTCheckoutOrderStatus = ( - args: GetSardineNFTCheckoutOrderStatusArgs, - headers?: object, - signal?: AbortSignal - ): Promise => { - return this.fetch(this.url('GetSardineNFTCheckoutOrderStatus'), createHTTPRequest(args, headers, signal)).then( - res => { - return buildResponse(res).then(_data => { - return { - resp: _data.resp - } - }) - }, - error => { - throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) - } - ) - } - - transakGetCountries = (headers?: object, signal?: AbortSignal): Promise => { - return this.fetch(this.url('TransakGetCountries'), createHTTPRequest({}, headers, signal)).then( - res => { - return buildResponse(res).then(_data => { - return { - regions: >_data.regions - } - }) - }, - error => { - throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) - } - ) - } - - transakGetCryptoCurrencies = (headers?: object, signal?: AbortSignal): Promise => { - return this.fetch(this.url('TransakGetCryptoCurrencies'), createHTTPRequest({}, headers, signal)).then( - res => { - return buildResponse(res).then(_data => { - return { - currencies: >_data.currencies - } - }) - }, - error => { - throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) - } - ) - } - - transakGetFiatCurrencies = (headers?: object, signal?: AbortSignal): Promise => { - return this.fetch(this.url('TransakGetFiatCurrencies'), createHTTPRequest({}, headers, signal)).then( - res => { - return buildResponse(res).then(_data => { - return { - currencies: >_data.currencies - } - }) - }, - error => { - throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) - } - ) - } - - transakGetPrice = (args: TransakGetPriceArgs, headers?: object, signal?: AbortSignal): Promise => { - return this.fetch(this.url('TransakGetPrice'), createHTTPRequest(args, headers, signal)).then( - res => { - return buildResponse(res).then(_data => { - return { - price: _data.price - } - }) - }, - error => { - throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) - } - ) - } - - transakGetSupportedNFTCheckoutChains = ( - headers?: object, - signal?: AbortSignal - ): Promise => { - return this.fetch(this.url('TransakGetSupportedNFTCheckoutChains'), createHTTPRequest({}, headers, signal)).then( - res => { - return buildResponse(res).then(_data => { - return { - chains: >_data.chains - } - }) - }, - error => { - throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) - } - ) - } - - getCoinPrices = (args: GetCoinPricesArgs, headers?: object, signal?: AbortSignal): Promise => { - return this.fetch(this.url('GetCoinPrices'), createHTTPRequest(args, headers, signal)).then( - res => { - return buildResponse(res).then(_data => { - return { - tokenPrices: >_data.tokenPrices - } - }) - }, - error => { - throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) - } - ) - } - - getCollectiblePrices = ( - args: GetCollectiblePricesArgs, - headers?: object, - signal?: AbortSignal - ): Promise => { - return this.fetch(this.url('GetCollectiblePrices'), createHTTPRequest(args, headers, signal)).then( - res => { - return buildResponse(res).then(_data => { - return { - tokenPrices: >_data.tokenPrices - } - }) - }, - error => { - throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) - } - ) - } - - getExchangeRate = (args: GetExchangeRateArgs, headers?: object, signal?: AbortSignal): Promise => { - return this.fetch(this.url('GetExchangeRate'), createHTTPRequest(args, headers, signal)).then( - res => { - return buildResponse(res).then(_data => { - return { - exchangeRate: _data.exchangeRate - } - }) - }, - error => { - throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) - } - ) - } - - memoryStore = (args: MemoryStoreArgs, headers?: object, signal?: AbortSignal): Promise => { - return this.fetch(this.url('MemoryStore'), createHTTPRequest(args, headers, signal)).then( - res => { - return buildResponse(res).then(_data => { - return { - ok: _data.ok - } - }) - }, - error => { - throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) - } - ) - } - - memoryLoad = (args: MemoryLoadArgs, headers?: object, signal?: AbortSignal): Promise => { - return this.fetch(this.url('MemoryLoad'), createHTTPRequest(args, headers, signal)).then( - res => { - return buildResponse(res).then(_data => { - return { - value: _data.value - } - }) - }, - error => { - throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) - } - ) - } - - getInviteInfo = (headers?: object, signal?: AbortSignal): Promise => { - return this.fetch(this.url('GetInviteInfo'), createHTTPRequest({}, headers, signal)).then( - res => { - return buildResponse(res).then(_data => { - return { - inviteInfo: _data.inviteInfo - } - }) - }, - error => { - throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) - } - ) - } - - isValidAccessCode = (args: IsValidAccessCodeArgs, headers?: object, signal?: AbortSignal): Promise => { - return this.fetch(this.url('IsValidAccessCode'), createHTTPRequest(args, headers, signal)).then( - res => { - return buildResponse(res).then(_data => { - return { - status: _data.status - } - }) - }, - error => { - throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) - } - ) - } - - internalClaimAccessCode = ( - args: InternalClaimAccessCodeArgs, - headers?: object, - signal?: AbortSignal - ): Promise => { - return this.fetch(this.url('InternalClaimAccessCode'), createHTTPRequest(args, headers, signal)).then( - res => { - return buildResponse(res).then(_data => { - return { - status: _data.status - } - }) - }, - error => { - throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) - } - ) - } - - blockNumberAtTime = (args: BlockNumberAtTimeArgs, headers?: object, signal?: AbortSignal): Promise => { - return this.fetch(this.url('BlockNumberAtTime'), createHTTPRequest(args, headers, signal)).then( - res => { - return buildResponse(res).then(_data => { - return { - blocks: >_data.blocks - } - }) - }, - error => { - throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) - } - ) - } - - paperSessionSecret = ( - args: PaperSessionSecretArgs, - headers?: object, - signal?: AbortSignal - ): Promise => { - return this.fetch(this.url('PaperSessionSecret'), createHTTPRequest(args, headers, signal)).then( - res => { - return buildResponse(res).then(_data => { - return { - secret: _data.secret - } - }) - }, - error => { - throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) - } - ) - } - - paperSessionSecret2 = ( - args: PaperSessionSecret2Args, - headers?: object, - signal?: AbortSignal - ): Promise => { - return this.fetch(this.url('PaperSessionSecret2'), createHTTPRequest(args, headers, signal)).then( - res => { - return buildResponse(res).then(_data => { - return { - secret: _data.secret - } - }) - }, - error => { - throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) - } - ) - } - - linkWallet = (args: LinkWalletArgs, headers?: object, signal?: AbortSignal): Promise => { - return this.fetch(this.url('LinkWallet'), createHTTPRequest(args, headers, signal)).then( - res => { - return buildResponse(res).then(_data => { - return { - status: _data.status - } - }) - }, - error => { - throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) - } - ) - } - - getLinkedWallets = (args: GetLinkedWalletsArgs, headers?: object, signal?: AbortSignal): Promise => { - return this.fetch(this.url('GetLinkedWallets'), createHTTPRequest(args, headers, signal)).then( - res => { - return buildResponse(res).then(_data => { - return { - linkedWallets: >_data.linkedWallets - } - }) - }, - error => { - throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) - } - ) - } - - removeLinkedWallet = ( - args: RemoveLinkedWalletArgs, - headers?: object, - signal?: AbortSignal - ): Promise => { - return this.fetch(this.url('RemoveLinkedWallet'), createHTTPRequest(args, headers, signal)).then( - res => { - return buildResponse(res).then(_data => { - return { - status: _data.status - } - }) - }, - error => { - throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) - } - ) - } - - generateWaaSVerificationURL = ( - args: GenerateWaaSVerificationURLArgs, - headers?: object, - signal?: AbortSignal - ): Promise => { - return this.fetch(this.url('GenerateWaaSVerificationURL'), createHTTPRequest(args, headers, signal)).then( - res => { - return buildResponse(res).then(_data => { - return { - nonce: _data.nonce, - verificationURL: _data.verificationURL - } - }) - }, - error => { - throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) - } - ) - } - - validateWaaSVerificationNonce = ( - args: ValidateWaaSVerificationNonceArgs, - headers?: object, - signal?: AbortSignal - ): Promise => { - return this.fetch(this.url('ValidateWaaSVerificationNonce'), createHTTPRequest(args, headers, signal)).then( - res => { - return buildResponse(res).then(_data => { - return { - walletAddress: _data.walletAddress - } - }) - }, - error => { - throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) - } - ) - } - - listAdoptedWallets = ( - args: ListAdoptedWalletsArgs, - headers?: object, - signal?: AbortSignal - ): Promise => { - return this.fetch(this.url('ListAdoptedWallets'), createHTTPRequest(args, headers, signal)).then( - res => { - return buildResponse(res).then(_data => { - return { - page: _data.page, - wallets: >_data.wallets - } - }) - }, - error => { - throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) - } - ) - } - - getSwapPermit2Price = ( - args: GetSwapPermit2PriceArgs, - headers?: object, - signal?: AbortSignal - ): Promise => { - return this.fetch(this.url('GetSwapPermit2Price'), createHTTPRequest(args, headers, signal)).then( - res => { - return buildResponse(res).then(_data => { - return { - swapPermit2Price: _data.swapPermit2Price - } - }) - }, - error => { - throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) - } - ) - } - - getSwapPermit2Prices = ( - args: GetSwapPermit2PricesArgs, - headers?: object, - signal?: AbortSignal - ): Promise => { - return this.fetch(this.url('GetSwapPermit2Prices'), createHTTPRequest(args, headers, signal)).then( - res => { - return buildResponse(res).then(_data => { - return { - swapPermit2Prices: >_data.swapPermit2Prices - } - }) - }, - error => { - throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) - } - ) - } - - getSwapPermit2Quote = ( - args: GetSwapPermit2QuoteArgs, - headers?: object, - signal?: AbortSignal - ): Promise => { - return this.fetch(this.url('GetSwapPermit2Quote'), createHTTPRequest(args, headers, signal)).then( - res => { - return buildResponse(res).then(_data => { - return { - swapPermit2Quote: _data.swapPermit2Quote - } - }) - }, - error => { - throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) - } - ) - } - - getSwapPrice = (args: GetSwapPriceArgs, headers?: object, signal?: AbortSignal): Promise => { - return this.fetch(this.url('GetSwapPrice'), createHTTPRequest(args, headers, signal)).then( - res => { - return buildResponse(res).then(_data => { - return { - swapPrice: _data.swapPrice - } - }) - }, - error => { - throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) - } - ) - } - - getSwapPrices = (args: GetSwapPricesArgs, headers?: object, signal?: AbortSignal): Promise => { - return this.fetch(this.url('GetSwapPrices'), createHTTPRequest(args, headers, signal)).then( - res => { - return buildResponse(res).then(_data => { - return { - swapPrices: >_data.swapPrices - } - }) - }, - error => { - throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) - } - ) - } - - getSwapQuote = (args: GetSwapQuoteArgs, headers?: object, signal?: AbortSignal): Promise => { - return this.fetch(this.url('GetSwapQuote'), createHTTPRequest(args, headers, signal)).then( - res => { - return buildResponse(res).then(_data => { - return { - swapQuote: _data.swapQuote - } - }) - }, - error => { - throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) - } - ) - } - - getSwapQuoteV2 = (args: GetSwapQuoteV2Args, headers?: object, signal?: AbortSignal): Promise => { - return this.fetch(this.url('GetSwapQuoteV2'), createHTTPRequest(args, headers, signal)).then( - res => { - return buildResponse(res).then(_data => { - return { - swapQuote: _data.swapQuote - } - }) - }, - error => { - throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) - } - ) - } - - intentQuery = (args: IntentQueryArgs, headers?: object, signal?: AbortSignal): Promise => { - return this.fetch(this.url('IntentQuery'), createHTTPRequest(args, headers, signal)).then( - res => { - return buildResponse(res).then(_data => { - return { - solutions: >_data.solutions - } - }) - }, - error => { - throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) - } - ) - } - - listCurrencyGroups = (headers?: object, signal?: AbortSignal): Promise => { - return this.fetch(this.url('ListCurrencyGroups'), createHTTPRequest({}, headers, signal)).then( - res => { - return buildResponse(res).then(_data => { - return { - currencyGroups: >_data.currencyGroups - } - }) - }, - error => { - throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) - } - ) - } - - addOffchainInventory = ( - args: AddOffchainInventoryArgs, - headers?: object, - signal?: AbortSignal - ): Promise => { - return this.fetch(this.url('AddOffchainInventory'), createHTTPRequest(args, headers, signal)).then( - res => { - return buildResponse(res).then(_data => { - return { - inventoryId: _data.inventoryId - } - }) - }, - error => { - throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) - } - ) - } - - getOffchainInventory = ( - args: GetOffchainInventoryArgs, - headers?: object, - signal?: AbortSignal - ): Promise => { - return this.fetch(this.url('GetOffchainInventory'), createHTTPRequest(args, headers, signal)).then( - res => { - return buildResponse(res).then(_data => { - return { - inventory: _data.inventory - } - }) - }, - error => { - throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) - } - ) - } - - listOffchainInventories = ( - args: ListOffchainInventoriesArgs, - headers?: object, - signal?: AbortSignal - ): Promise => { - return this.fetch(this.url('ListOffchainInventories'), createHTTPRequest(args, headers, signal)).then( - res => { - return buildResponse(res).then(_data => { - return { - inventory: >_data.inventory - } - }) - }, - error => { - throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) - } - ) - } - - updateOffchainInventory = ( - args: UpdateOffchainInventoryArgs, - headers?: object, - signal?: AbortSignal - ): Promise => { - return this.fetch(this.url('UpdateOffchainInventory'), createHTTPRequest(args, headers, signal)).then( - res => { - return buildResponse(res).then(_data => { - return {} - }) - }, - error => { - throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) - } - ) - } - - deleteOffchainInventory = ( - args: DeleteOffchainInventoryArgs, - headers?: object, - signal?: AbortSignal - ): Promise => { - return this.fetch(this.url('DeleteOffchainInventory'), createHTTPRequest(args, headers, signal)).then( - res => { - return buildResponse(res).then(_data => { - return { - ok: _data.ok - } - }) - }, - error => { - throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) - } - ) - } - - requestOffchainPayment = ( - args: RequestOffchainPaymentArgs, - headers?: object, - signal?: AbortSignal - ): Promise => { - return this.fetch(this.url('RequestOffchainPayment'), createHTTPRequest(args, headers, signal)).then( - res => { - return buildResponse(res).then(_data => { - return { - payment: _data.payment - } - }) - }, - error => { - throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) - } - ) - } - - listOffchainPayments = ( - args: ListOffchainPaymentsArgs, - headers?: object, - signal?: AbortSignal - ): Promise => { - return this.fetch(this.url('ListOffchainPayments'), createHTTPRequest(args, headers, signal)).then( - res => { - return buildResponse(res).then(_data => { - return { - page: _data.page, - payments: >_data.payments - } - }) - }, - error => { - throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) - } - ) - } - - savePack = (args: SavePackArgs, headers?: object, signal?: AbortSignal): Promise => { - return this.fetch(this.url('SavePack'), createHTTPRequest(args, headers, signal)).then( - res => { - return buildResponse(res).then(_data => { - return { - merkleRoot: _data.merkleRoot - } - }) - }, - error => { - throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) - } - ) - } - - getPack = (args: GetPackArgs, headers?: object, signal?: AbortSignal): Promise => { - return this.fetch(this.url('GetPack'), createHTTPRequest(args, headers, signal)).then( - res => { - return buildResponse(res).then(_data => { - return { - pack: _data.pack - } - }) - }, - error => { - throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) - } - ) - } - - deletePack = (args: DeletePackArgs, headers?: object, signal?: AbortSignal): Promise => { - return this.fetch(this.url('DeletePack'), createHTTPRequest(args, headers, signal)).then( - res => { - return buildResponse(res).then(_data => { - return { - status: _data.status - } - }) - }, - error => { - throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) - } - ) - } - - updatePackContent = (args: UpdatePackContentArgs, headers?: object, signal?: AbortSignal): Promise => { - return this.fetch(this.url('UpdatePackContent'), createHTTPRequest(args, headers, signal)).then( - res => { - return buildResponse(res).then(_data => { - return { - merkleRoot: _data.merkleRoot - } - }) - }, - error => { - throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) - } - ) - } -} - -const createHTTPRequest = (body: object = {}, headers: object = {}, signal: AbortSignal | null = null): object => { - const reqHeaders: { [key: string]: string } = { ...headers, 'Content-Type': 'application/json' } - reqHeaders[WebrpcHeader] = WebrpcHeaderValue - - return { - method: 'POST', - headers: reqHeaders, - body: JSON.stringify(body || {}), - signal - } -} - -const buildResponse = (res: Response): Promise => { - return res.text().then(text => { - let data - try { - data = JSON.parse(text) - } catch (error) { - let message = '' - if (error instanceof Error) { - message = error.message - } - throw WebrpcBadResponseError.new({ - status: res.status, - cause: `JSON.parse(): ${message}: response text: ${text}` - }) - } - if (!res.ok) { - const code: number = typeof data.code === 'number' ? data.code : 0 - throw (webrpcErrorByCode[code] || WebrpcError).new(data) - } - return data - }) -} - -// -// Errors -// - -export class WebrpcError extends Error { - name: string - code: number - message: string - status: number - cause?: string - - /** @deprecated Use message instead of msg. Deprecated in webrpc v0.11.0. */ - msg: string - - constructor(name: string, code: number, message: string, status: number, cause?: string) { - super(message) - this.name = name || 'WebrpcError' - this.code = typeof code === 'number' ? code : 0 - this.message = message || `endpoint error ${this.code}` - this.msg = this.message - this.status = typeof status === 'number' ? status : 0 - this.cause = cause - Object.setPrototypeOf(this, WebrpcError.prototype) - } - - static new(payload: any): WebrpcError { - return new this(payload.error, payload.code, payload.message || payload.msg, payload.status, payload.cause) - } -} - -// Webrpc errors - -export class WebrpcEndpointError extends WebrpcError { - constructor( - name: string = 'WebrpcEndpoint', - code: number = 0, - message: string = `endpoint error`, - status: number = 0, - cause?: string - ) { - super(name, code, message, status, cause) - Object.setPrototypeOf(this, WebrpcEndpointError.prototype) - } -} - -export class WebrpcRequestFailedError extends WebrpcError { - constructor( - name: string = 'WebrpcRequestFailed', - code: number = -1, - message: string = `request failed`, - status: number = 0, - cause?: string - ) { - super(name, code, message, status, cause) - Object.setPrototypeOf(this, WebrpcRequestFailedError.prototype) - } -} - -export class WebrpcBadRouteError extends WebrpcError { - constructor( - name: string = 'WebrpcBadRoute', - code: number = -2, - message: string = `bad route`, - status: number = 0, - cause?: string - ) { - super(name, code, message, status, cause) - Object.setPrototypeOf(this, WebrpcBadRouteError.prototype) - } -} - -export class WebrpcBadMethodError extends WebrpcError { - constructor( - name: string = 'WebrpcBadMethod', - code: number = -3, - message: string = `bad method`, - status: number = 0, - cause?: string - ) { - super(name, code, message, status, cause) - Object.setPrototypeOf(this, WebrpcBadMethodError.prototype) - } -} - -export class WebrpcBadRequestError extends WebrpcError { - constructor( - name: string = 'WebrpcBadRequest', - code: number = -4, - message: string = `bad request`, - status: number = 0, - cause?: string - ) { - super(name, code, message, status, cause) - Object.setPrototypeOf(this, WebrpcBadRequestError.prototype) - } -} - -export class WebrpcBadResponseError extends WebrpcError { - constructor( - name: string = 'WebrpcBadResponse', - code: number = -5, - message: string = `bad response`, - status: number = 0, - cause?: string - ) { - super(name, code, message, status, cause) - Object.setPrototypeOf(this, WebrpcBadResponseError.prototype) - } -} - -export class WebrpcServerPanicError extends WebrpcError { - constructor( - name: string = 'WebrpcServerPanic', - code: number = -6, - message: string = `server panic`, - status: number = 0, - cause?: string - ) { - super(name, code, message, status, cause) - Object.setPrototypeOf(this, WebrpcServerPanicError.prototype) - } -} - -export class WebrpcInternalErrorError extends WebrpcError { - constructor( - name: string = 'WebrpcInternalError', - code: number = -7, - message: string = `internal error`, - status: number = 0, - cause?: string - ) { - super(name, code, message, status, cause) - Object.setPrototypeOf(this, WebrpcInternalErrorError.prototype) - } -} - -export class WebrpcClientDisconnectedError extends WebrpcError { - constructor( - name: string = 'WebrpcClientDisconnected', - code: number = -8, - message: string = `client disconnected`, - status: number = 0, - cause?: string - ) { - super(name, code, message, status, cause) - Object.setPrototypeOf(this, WebrpcClientDisconnectedError.prototype) - } -} - -export class WebrpcStreamLostError extends WebrpcError { - constructor( - name: string = 'WebrpcStreamLost', - code: number = -9, - message: string = `stream lost`, - status: number = 0, - cause?: string - ) { - super(name, code, message, status, cause) - Object.setPrototypeOf(this, WebrpcStreamLostError.prototype) - } -} - -export class WebrpcStreamFinishedError extends WebrpcError { - constructor( - name: string = 'WebrpcStreamFinished', - code: number = -10, - message: string = `stream finished`, - status: number = 0, - cause?: string - ) { - super(name, code, message, status, cause) - Object.setPrototypeOf(this, WebrpcStreamFinishedError.prototype) - } -} - -// Schema errors - -export class UnauthorizedError extends WebrpcError { - constructor( - name: string = 'Unauthorized', - code: number = 1000, - message: string = `Unauthorized access`, - status: number = 0, - cause?: string - ) { - super(name, code, message, status, cause) - Object.setPrototypeOf(this, UnauthorizedError.prototype) - } -} - -export class PermissionDeniedError extends WebrpcError { - constructor( - name: string = 'PermissionDenied', - code: number = 1001, - message: string = `Permission denied`, - status: number = 0, - cause?: string - ) { - super(name, code, message, status, cause) - Object.setPrototypeOf(this, PermissionDeniedError.prototype) - } -} - -export class SessionExpiredError extends WebrpcError { - constructor( - name: string = 'SessionExpired', - code: number = 1002, - message: string = `Session expired`, - status: number = 0, - cause?: string - ) { - super(name, code, message, status, cause) - Object.setPrototypeOf(this, SessionExpiredError.prototype) - } -} - -export class MethodNotFoundError extends WebrpcError { - constructor( - name: string = 'MethodNotFound', - code: number = 1003, - message: string = `Method not found`, - status: number = 0, - cause?: string - ) { - super(name, code, message, status, cause) - Object.setPrototypeOf(this, MethodNotFoundError.prototype) - } -} - -export class RequestConflictError extends WebrpcError { - constructor( - name: string = 'RequestConflict', - code: number = 1004, - message: string = `Conflict with target resource`, - status: number = 0, - cause?: string - ) { - super(name, code, message, status, cause) - Object.setPrototypeOf(this, RequestConflictError.prototype) - } -} - -export class AbortedError extends WebrpcError { - constructor( - name: string = 'Aborted', - code: number = 1005, - message: string = `Request aborted`, - status: number = 0, - cause?: string - ) { - super(name, code, message, status, cause) - Object.setPrototypeOf(this, AbortedError.prototype) - } -} - -export class GeoblockedError extends WebrpcError { - constructor( - name: string = 'Geoblocked', - code: number = 1006, - message: string = `Geoblocked region`, - status: number = 0, - cause?: string - ) { - super(name, code, message, status, cause) - Object.setPrototypeOf(this, GeoblockedError.prototype) - } -} - -export class RateLimitedError extends WebrpcError { - constructor( - name: string = 'RateLimited', - code: number = 1007, - message: string = `Rate-limited. Please slow down.`, - status: number = 0, - cause?: string - ) { - super(name, code, message, status, cause) - Object.setPrototypeOf(this, RateLimitedError.prototype) - } -} - -export class ProjectNotFoundError extends WebrpcError { - constructor( - name: string = 'ProjectNotFound', - code: number = 1008, - message: string = `Project not found`, - status: number = 0, - cause?: string - ) { - super(name, code, message, status, cause) - Object.setPrototypeOf(this, ProjectNotFoundError.prototype) - } -} - -export class AccessKeyNotFoundError extends WebrpcError { - constructor( - name: string = 'AccessKeyNotFound', - code: number = 1101, - message: string = `Access key not found`, - status: number = 0, - cause?: string - ) { - super(name, code, message, status, cause) - Object.setPrototypeOf(this, AccessKeyNotFoundError.prototype) - } -} - -export class AccessKeyMismatchError extends WebrpcError { - constructor( - name: string = 'AccessKeyMismatch', - code: number = 1102, - message: string = `Access key mismatch`, - status: number = 0, - cause?: string - ) { - super(name, code, message, status, cause) - Object.setPrototypeOf(this, AccessKeyMismatchError.prototype) - } -} - -export class InvalidOriginError extends WebrpcError { - constructor( - name: string = 'InvalidOrigin', - code: number = 1103, - message: string = `Invalid origin for Access Key`, - status: number = 0, - cause?: string - ) { - super(name, code, message, status, cause) - Object.setPrototypeOf(this, InvalidOriginError.prototype) - } -} - -export class InvalidServiceError extends WebrpcError { - constructor( - name: string = 'InvalidService', - code: number = 1104, - message: string = `Service not enabled for Access key`, - status: number = 0, - cause?: string - ) { - super(name, code, message, status, cause) - Object.setPrototypeOf(this, InvalidServiceError.prototype) - } -} - -export class UnauthorizedUserError extends WebrpcError { - constructor( - name: string = 'UnauthorizedUser', - code: number = 1105, - message: string = `Unauthorized user`, - status: number = 0, - cause?: string - ) { - super(name, code, message, status, cause) - Object.setPrototypeOf(this, UnauthorizedUserError.prototype) - } -} - -export class QuotaExceededError extends WebrpcError { - constructor( - name: string = 'QuotaExceeded', - code: number = 1200, - message: string = `Quota request exceeded`, - status: number = 0, - cause?: string - ) { - super(name, code, message, status, cause) - Object.setPrototypeOf(this, QuotaExceededError.prototype) - } -} - -export class QuotaRateLimitError extends WebrpcError { - constructor( - name: string = 'QuotaRateLimit', - code: number = 1201, - message: string = `Quota rate limit exceeded`, - status: number = 0, - cause?: string - ) { - super(name, code, message, status, cause) - Object.setPrototypeOf(this, QuotaRateLimitError.prototype) - } -} - -export class NoDefaultKeyError extends WebrpcError { - constructor( - name: string = 'NoDefaultKey', - code: number = 1300, - message: string = `No default access key found`, - status: number = 0, - cause?: string - ) { - super(name, code, message, status, cause) - Object.setPrototypeOf(this, NoDefaultKeyError.prototype) - } -} - -export class MaxAccessKeysError extends WebrpcError { - constructor( - name: string = 'MaxAccessKeys', - code: number = 1301, - message: string = `Access keys limit reached`, - status: number = 0, - cause?: string - ) { - super(name, code, message, status, cause) - Object.setPrototypeOf(this, MaxAccessKeysError.prototype) - } -} - -export class AtLeastOneKeyError extends WebrpcError { - constructor( - name: string = 'AtLeastOneKey', - code: number = 1302, - message: string = `You need at least one Access Key`, - status: number = 0, - cause?: string - ) { - super(name, code, message, status, cause) - Object.setPrototypeOf(this, AtLeastOneKeyError.prototype) - } -} - -export class TimeoutError extends WebrpcError { - constructor( - name: string = 'Timeout', - code: number = 1900, - message: string = `Request timed out`, - status: number = 0, - cause?: string - ) { - super(name, code, message, status, cause) - Object.setPrototypeOf(this, TimeoutError.prototype) - } -} - -export class InvalidArgumentError extends WebrpcError { - constructor( - name: string = 'InvalidArgument', - code: number = 2000, - message: string = `Invalid argument`, - status: number = 0, - cause?: string - ) { - super(name, code, message, status, cause) - Object.setPrototypeOf(this, InvalidArgumentError.prototype) - } -} - -export class UnavailableError extends WebrpcError { - constructor( - name: string = 'Unavailable', - code: number = 2002, - message: string = `Unavailable resource`, - status: number = 0, - cause?: string - ) { - super(name, code, message, status, cause) - Object.setPrototypeOf(this, UnavailableError.prototype) - } -} - -export class QueryFailedError extends WebrpcError { - constructor( - name: string = 'QueryFailed', - code: number = 2003, - message: string = `Query failed`, - status: number = 0, - cause?: string - ) { - super(name, code, message, status, cause) - Object.setPrototypeOf(this, QueryFailedError.prototype) - } -} - -export class NotFoundError extends WebrpcError { - constructor( - name: string = 'NotFound', - code: number = 3000, - message: string = `Resource not found`, - status: number = 0, - cause?: string - ) { - super(name, code, message, status, cause) - Object.setPrototypeOf(this, NotFoundError.prototype) - } -} - -export class UnsupportedNetworkError extends WebrpcError { - constructor( - name: string = 'UnsupportedNetwork', - code: number = 3008, - message: string = `Unsupported network`, - status: number = 0, - cause?: string - ) { - super(name, code, message, status, cause) - Object.setPrototypeOf(this, UnsupportedNetworkError.prototype) - } -} - -export enum errors { - WebrpcEndpoint = 'WebrpcEndpoint', - WebrpcRequestFailed = 'WebrpcRequestFailed', - WebrpcBadRoute = 'WebrpcBadRoute', - WebrpcBadMethod = 'WebrpcBadMethod', - WebrpcBadRequest = 'WebrpcBadRequest', - WebrpcBadResponse = 'WebrpcBadResponse', - WebrpcServerPanic = 'WebrpcServerPanic', - WebrpcInternalError = 'WebrpcInternalError', - WebrpcClientDisconnected = 'WebrpcClientDisconnected', - WebrpcStreamLost = 'WebrpcStreamLost', - WebrpcStreamFinished = 'WebrpcStreamFinished', - Unauthorized = 'Unauthorized', - PermissionDenied = 'PermissionDenied', - SessionExpired = 'SessionExpired', - MethodNotFound = 'MethodNotFound', - RequestConflict = 'RequestConflict', - Aborted = 'Aborted', - Geoblocked = 'Geoblocked', - RateLimited = 'RateLimited', - ProjectNotFound = 'ProjectNotFound', - AccessKeyNotFound = 'AccessKeyNotFound', - AccessKeyMismatch = 'AccessKeyMismatch', - InvalidOrigin = 'InvalidOrigin', - InvalidService = 'InvalidService', - UnauthorizedUser = 'UnauthorizedUser', - QuotaExceeded = 'QuotaExceeded', - QuotaRateLimit = 'QuotaRateLimit', - NoDefaultKey = 'NoDefaultKey', - MaxAccessKeys = 'MaxAccessKeys', - AtLeastOneKey = 'AtLeastOneKey', - Timeout = 'Timeout', - InvalidArgument = 'InvalidArgument', - Unavailable = 'Unavailable', - QueryFailed = 'QueryFailed', - NotFound = 'NotFound', - UnsupportedNetwork = 'UnsupportedNetwork' -} - -export enum WebrpcErrorCodes { - WebrpcEndpoint = 0, - WebrpcRequestFailed = -1, - WebrpcBadRoute = -2, - WebrpcBadMethod = -3, - WebrpcBadRequest = -4, - WebrpcBadResponse = -5, - WebrpcServerPanic = -6, - WebrpcInternalError = -7, - WebrpcClientDisconnected = -8, - WebrpcStreamLost = -9, - WebrpcStreamFinished = -10, - Unauthorized = 1000, - PermissionDenied = 1001, - SessionExpired = 1002, - MethodNotFound = 1003, - RequestConflict = 1004, - Aborted = 1005, - Geoblocked = 1006, - RateLimited = 1007, - ProjectNotFound = 1008, - AccessKeyNotFound = 1101, - AccessKeyMismatch = 1102, - InvalidOrigin = 1103, - InvalidService = 1104, - UnauthorizedUser = 1105, - QuotaExceeded = 1200, - QuotaRateLimit = 1201, - NoDefaultKey = 1300, - MaxAccessKeys = 1301, - AtLeastOneKey = 1302, - Timeout = 1900, - InvalidArgument = 2000, - Unavailable = 2002, - QueryFailed = 2003, - NotFound = 3000, - UnsupportedNetwork = 3008 -} - -export const webrpcErrorByCode: { [code: number]: any } = { - [0]: WebrpcEndpointError, - [-1]: WebrpcRequestFailedError, - [-2]: WebrpcBadRouteError, - [-3]: WebrpcBadMethodError, - [-4]: WebrpcBadRequestError, - [-5]: WebrpcBadResponseError, - [-6]: WebrpcServerPanicError, - [-7]: WebrpcInternalErrorError, - [-8]: WebrpcClientDisconnectedError, - [-9]: WebrpcStreamLostError, - [-10]: WebrpcStreamFinishedError, - [1000]: UnauthorizedError, - [1001]: PermissionDeniedError, - [1002]: SessionExpiredError, - [1003]: MethodNotFoundError, - [1004]: RequestConflictError, - [1005]: AbortedError, - [1006]: GeoblockedError, - [1007]: RateLimitedError, - [1008]: ProjectNotFoundError, - [1101]: AccessKeyNotFoundError, - [1102]: AccessKeyMismatchError, - [1103]: InvalidOriginError, - [1104]: InvalidServiceError, - [1105]: UnauthorizedUserError, - [1200]: QuotaExceededError, - [1201]: QuotaRateLimitError, - [1300]: NoDefaultKeyError, - [1301]: MaxAccessKeysError, - [1302]: AtLeastOneKeyError, - [1900]: TimeoutError, - [2000]: InvalidArgumentError, - [2002]: UnavailableError, - [2003]: QueryFailedError, - [3000]: NotFoundError, - [3008]: UnsupportedNetworkError -} - -export type Fetch = (input: RequestInfo, init?: RequestInit) => Promise diff --git a/old/packages/api/src/index.ts b/old/packages/api/src/index.ts deleted file mode 100644 index e7b9ab042..000000000 --- a/old/packages/api/src/index.ts +++ /dev/null @@ -1,36 +0,0 @@ -export * from './api.gen' - -import { API as ApiRpc } from './api.gen' - -export class SequenceAPIClient extends ApiRpc { - constructor( - hostname: string, - public projectAccessKey?: string, - public jwtAuth?: string - ) { - super(hostname.endsWith('/') ? hostname.slice(0, -1) : hostname, fetch) - this.fetch = this._fetch - } - - _fetch = (input: RequestInfo, init?: RequestInit): Promise => { - // automatically include jwt and access key auth header to requests - // if its been set on the api client - const headers: { [key: string]: any } = {} - - const jwtAuth = this.jwtAuth - const projectAccessKey = this.projectAccessKey - - if (jwtAuth && jwtAuth.length > 0) { - headers['Authorization'] = `BEARER ${jwtAuth}` - } - - if (projectAccessKey && projectAccessKey.length > 0) { - headers['X-Access-Key'] = projectAccessKey - } - - // before the request is made - init!.headers = { ...init!.headers, ...headers } - - return fetch(input, init) - } -} diff --git a/old/packages/auth/CHANGELOG.md b/old/packages/auth/CHANGELOG.md deleted file mode 100644 index e18bf2cdb..000000000 --- a/old/packages/auth/CHANGELOG.md +++ /dev/null @@ -1,5972 +0,0 @@ -# @0xsequence/auth - -## 2.3.8 - -### Patch Changes - -- indexer: update clients -- Updated dependencies - - @0xsequence/abi@2.3.8 - - @0xsequence/account@2.3.8 - - @0xsequence/api@2.3.8 - - @0xsequence/core@2.3.8 - - @0xsequence/indexer@2.3.8 - - @0xsequence/metadata@2.3.8 - - @0xsequence/migration@2.3.8 - - @0xsequence/network@2.3.8 - - @0xsequence/sessions@2.3.8 - - @0xsequence/signhub@2.3.8 - - @0xsequence/utils@2.3.8 - - @0xsequence/wallet@2.3.8 - -## 2.3.7 - -### Patch Changes - -- Metadata updates -- Updated dependencies - - @0xsequence/abi@2.3.7 - - @0xsequence/account@2.3.7 - - @0xsequence/api@2.3.7 - - @0xsequence/core@2.3.7 - - @0xsequence/indexer@2.3.7 - - @0xsequence/metadata@2.3.7 - - @0xsequence/migration@2.3.7 - - @0xsequence/network@2.3.7 - - @0xsequence/sessions@2.3.7 - - @0xsequence/signhub@2.3.7 - - @0xsequence/utils@2.3.7 - - @0xsequence/wallet@2.3.7 - -## 2.3.6 - -### Patch Changes - -- New chains -- Updated dependencies - - @0xsequence/abi@2.3.6 - - @0xsequence/account@2.3.6 - - @0xsequence/api@2.3.6 - - @0xsequence/core@2.3.6 - - @0xsequence/indexer@2.3.6 - - @0xsequence/metadata@2.3.6 - - @0xsequence/migration@2.3.6 - - @0xsequence/network@2.3.6 - - @0xsequence/sessions@2.3.6 - - @0xsequence/signhub@2.3.6 - - @0xsequence/utils@2.3.6 - - @0xsequence/wallet@2.3.6 - -## 2.3.5 - -### Patch Changes - -- Add Frequency Testnet -- Updated dependencies - - @0xsequence/abi@2.3.5 - - @0xsequence/account@2.3.5 - - @0xsequence/api@2.3.5 - - @0xsequence/core@2.3.5 - - @0xsequence/indexer@2.3.5 - - @0xsequence/metadata@2.3.5 - - @0xsequence/migration@2.3.5 - - @0xsequence/network@2.3.5 - - @0xsequence/sessions@2.3.5 - - @0xsequence/signhub@2.3.5 - - @0xsequence/utils@2.3.5 - - @0xsequence/wallet@2.3.5 - -## 2.3.4 - -### Patch Changes - -- metadata: exclude deprecated methods on rpc client -- Updated dependencies - - @0xsequence/abi@2.3.4 - - @0xsequence/account@2.3.4 - - @0xsequence/api@2.3.4 - - @0xsequence/core@2.3.4 - - @0xsequence/indexer@2.3.4 - - @0xsequence/metadata@2.3.4 - - @0xsequence/migration@2.3.4 - - @0xsequence/network@2.3.4 - - @0xsequence/sessions@2.3.4 - - @0xsequence/signhub@2.3.4 - - @0xsequence/utils@2.3.4 - - @0xsequence/wallet@2.3.4 - -## 2.3.3 - -### Patch Changes - -- metadata: client update -- Updated dependencies - - @0xsequence/abi@2.3.3 - - @0xsequence/account@2.3.3 - - @0xsequence/api@2.3.3 - - @0xsequence/core@2.3.3 - - @0xsequence/indexer@2.3.3 - - @0xsequence/metadata@2.3.3 - - @0xsequence/migration@2.3.3 - - @0xsequence/network@2.3.3 - - @0xsequence/sessions@2.3.3 - - @0xsequence/signhub@2.3.3 - - @0xsequence/utils@2.3.3 - - @0xsequence/wallet@2.3.3 - -## 2.3.2 - -### Patch Changes - -- metadata: update rpc client -- Updated dependencies - - @0xsequence/metadata@2.3.2 - - @0xsequence/abi@2.3.2 - - @0xsequence/account@2.3.2 - - @0xsequence/api@2.3.2 - - @0xsequence/core@2.3.2 - - @0xsequence/indexer@2.3.2 - - @0xsequence/migration@2.3.2 - - @0xsequence/network@2.3.2 - - @0xsequence/sessions@2.3.2 - - @0xsequence/signhub@2.3.2 - - @0xsequence/utils@2.3.2 - - @0xsequence/wallet@2.3.2 - -## 2.3.1 - -### Patch Changes - -- indexer: update rpc client -- Updated dependencies - - @0xsequence/abi@2.3.1 - - @0xsequence/account@2.3.1 - - @0xsequence/api@2.3.1 - - @0xsequence/core@2.3.1 - - @0xsequence/indexer@2.3.1 - - @0xsequence/metadata@2.3.1 - - @0xsequence/migration@2.3.1 - - @0xsequence/network@2.3.1 - - @0xsequence/sessions@2.3.1 - - @0xsequence/signhub@2.3.1 - - @0xsequence/utils@2.3.1 - - @0xsequence/wallet@2.3.1 - -## 2.3.0 - -### Minor Changes - -- update metadata rpc client - -### Patch Changes - -- Updated dependencies - - @0xsequence/abi@2.3.0 - - @0xsequence/account@2.3.0 - - @0xsequence/api@2.3.0 - - @0xsequence/core@2.3.0 - - @0xsequence/indexer@2.3.0 - - @0xsequence/metadata@2.3.0 - - @0xsequence/migration@2.3.0 - - @0xsequence/network@2.3.0 - - @0xsequence/sessions@2.3.0 - - @0xsequence/signhub@2.3.0 - - @0xsequence/utils@2.3.0 - - @0xsequence/wallet@2.3.0 - -## 2.2.15 - -### Patch Changes - -- API updates -- Updated dependencies - - @0xsequence/abi@2.2.15 - - @0xsequence/account@2.2.15 - - @0xsequence/api@2.2.15 - - @0xsequence/core@2.2.15 - - @0xsequence/indexer@2.2.15 - - @0xsequence/metadata@2.2.15 - - @0xsequence/migration@2.2.15 - - @0xsequence/network@2.2.15 - - @0xsequence/sessions@2.2.15 - - @0xsequence/signhub@2.2.15 - - @0xsequence/utils@2.2.15 - - @0xsequence/wallet@2.2.15 - -## 2.2.14 - -### Patch Changes - -- Somnia Testnet and Monad Testnet -- Updated dependencies - - @0xsequence/abi@2.2.14 - - @0xsequence/account@2.2.14 - - @0xsequence/api@2.2.14 - - @0xsequence/core@2.2.14 - - @0xsequence/indexer@2.2.14 - - @0xsequence/metadata@2.2.14 - - @0xsequence/migration@2.2.14 - - @0xsequence/network@2.2.14 - - @0xsequence/sessions@2.2.14 - - @0xsequence/signhub@2.2.14 - - @0xsequence/utils@2.2.14 - - @0xsequence/wallet@2.2.14 - -## 2.2.13 - -### Patch Changes - -- Add XR1 to all networks -- Updated dependencies - - @0xsequence/abi@2.2.13 - - @0xsequence/account@2.2.13 - - @0xsequence/api@2.2.13 - - @0xsequence/core@2.2.13 - - @0xsequence/indexer@2.2.13 - - @0xsequence/metadata@2.2.13 - - @0xsequence/migration@2.2.13 - - @0xsequence/network@2.2.13 - - @0xsequence/sessions@2.2.13 - - @0xsequence/signhub@2.2.13 - - @0xsequence/utils@2.2.13 - - @0xsequence/wallet@2.2.13 - -## 2.2.12 - -### Patch Changes - -- Add XR1 -- Updated dependencies - - @0xsequence/abi@2.2.12 - - @0xsequence/account@2.2.12 - - @0xsequence/api@2.2.12 - - @0xsequence/core@2.2.12 - - @0xsequence/indexer@2.2.12 - - @0xsequence/metadata@2.2.12 - - @0xsequence/migration@2.2.12 - - @0xsequence/network@2.2.12 - - @0xsequence/sessions@2.2.12 - - @0xsequence/signhub@2.2.12 - - @0xsequence/utils@2.2.12 - - @0xsequence/wallet@2.2.12 - -## 2.2.11 - -### Patch Changes - -- Relayer updates -- Updated dependencies - - @0xsequence/abi@2.2.11 - - @0xsequence/account@2.2.11 - - @0xsequence/api@2.2.11 - - @0xsequence/core@2.2.11 - - @0xsequence/indexer@2.2.11 - - @0xsequence/metadata@2.2.11 - - @0xsequence/migration@2.2.11 - - @0xsequence/network@2.2.11 - - @0xsequence/sessions@2.2.11 - - @0xsequence/signhub@2.2.11 - - @0xsequence/utils@2.2.11 - - @0xsequence/wallet@2.2.11 - -## 2.2.10 - -### Patch Changes - -- Etherlink support -- Updated dependencies - - @0xsequence/abi@2.2.10 - - @0xsequence/account@2.2.10 - - @0xsequence/api@2.2.10 - - @0xsequence/core@2.2.10 - - @0xsequence/indexer@2.2.10 - - @0xsequence/metadata@2.2.10 - - @0xsequence/migration@2.2.10 - - @0xsequence/network@2.2.10 - - @0xsequence/sessions@2.2.10 - - @0xsequence/signhub@2.2.10 - - @0xsequence/utils@2.2.10 - - @0xsequence/wallet@2.2.10 - -## 2.2.9 - -### Patch Changes - -- Indexer gateway native token balances -- Updated dependencies - - @0xsequence/abi@2.2.9 - - @0xsequence/account@2.2.9 - - @0xsequence/api@2.2.9 - - @0xsequence/core@2.2.9 - - @0xsequence/indexer@2.2.9 - - @0xsequence/metadata@2.2.9 - - @0xsequence/migration@2.2.9 - - @0xsequence/network@2.2.9 - - @0xsequence/sessions@2.2.9 - - @0xsequence/signhub@2.2.9 - - @0xsequence/utils@2.2.9 - - @0xsequence/wallet@2.2.9 - -## 2.2.8 - -### Patch Changes - -- Add Moonbeam and Moonbase Alpha -- Updated dependencies - - @0xsequence/abi@2.2.8 - - @0xsequence/account@2.2.8 - - @0xsequence/api@2.2.8 - - @0xsequence/core@2.2.8 - - @0xsequence/indexer@2.2.8 - - @0xsequence/metadata@2.2.8 - - @0xsequence/migration@2.2.8 - - @0xsequence/network@2.2.8 - - @0xsequence/sessions@2.2.8 - - @0xsequence/signhub@2.2.8 - - @0xsequence/utils@2.2.8 - - @0xsequence/wallet@2.2.8 - -## 2.2.7 - -### Patch Changes - -- Update Builder package -- Updated dependencies - - @0xsequence/abi@2.2.7 - - @0xsequence/account@2.2.7 - - @0xsequence/api@2.2.7 - - @0xsequence/core@2.2.7 - - @0xsequence/indexer@2.2.7 - - @0xsequence/metadata@2.2.7 - - @0xsequence/migration@2.2.7 - - @0xsequence/network@2.2.7 - - @0xsequence/sessions@2.2.7 - - @0xsequence/signhub@2.2.7 - - @0xsequence/utils@2.2.7 - - @0xsequence/wallet@2.2.7 - -## 2.2.6 - -### Patch Changes - -- Update relayer package -- Updated dependencies - - @0xsequence/abi@2.2.6 - - @0xsequence/account@2.2.6 - - @0xsequence/api@2.2.6 - - @0xsequence/core@2.2.6 - - @0xsequence/indexer@2.2.6 - - @0xsequence/metadata@2.2.6 - - @0xsequence/migration@2.2.6 - - @0xsequence/network@2.2.6 - - @0xsequence/sessions@2.2.6 - - @0xsequence/signhub@2.2.6 - - @0xsequence/utils@2.2.6 - - @0xsequence/wallet@2.2.6 - -## 2.2.5 - -### Patch Changes - -- auth: fix sequence indexer gateway url -- account: immutable wallet proxy hook -- Updated dependencies -- Updated dependencies - - @0xsequence/abi@2.2.5 - - @0xsequence/account@2.2.5 - - @0xsequence/api@2.2.5 - - @0xsequence/core@2.2.5 - - @0xsequence/indexer@2.2.5 - - @0xsequence/metadata@2.2.5 - - @0xsequence/migration@2.2.5 - - @0xsequence/network@2.2.5 - - @0xsequence/sessions@2.2.5 - - @0xsequence/signhub@2.2.5 - - @0xsequence/utils@2.2.5 - - @0xsequence/wallet@2.2.5 - -## 2.2.4 - -### Patch Changes - -- network: update soneium mainnet block explorer url -- waas: signTypedData intent support -- Updated dependencies -- Updated dependencies - - @0xsequence/abi@2.2.4 - - @0xsequence/account@2.2.4 - - @0xsequence/api@2.2.4 - - @0xsequence/core@2.2.4 - - @0xsequence/indexer@2.2.4 - - @0xsequence/metadata@2.2.4 - - @0xsequence/migration@2.2.4 - - @0xsequence/network@2.2.4 - - @0xsequence/sessions@2.2.4 - - @0xsequence/signhub@2.2.4 - - @0xsequence/utils@2.2.4 - - @0xsequence/wallet@2.2.4 - -## 2.2.3 - -### Patch Changes - -- provider: updating initWallet to use connected network configs if they exist -- Updated dependencies - - @0xsequence/abi@2.2.3 - - @0xsequence/account@2.2.3 - - @0xsequence/api@2.2.3 - - @0xsequence/core@2.2.3 - - @0xsequence/indexer@2.2.3 - - @0xsequence/metadata@2.2.3 - - @0xsequence/migration@2.2.3 - - @0xsequence/network@2.2.3 - - @0xsequence/sessions@2.2.3 - - @0xsequence/signhub@2.2.3 - - @0xsequence/utils@2.2.3 - - @0xsequence/wallet@2.2.3 - -## 2.2.2 - -### Patch Changes - -- pass projectAccessKey to relayer at all times -- Updated dependencies - - @0xsequence/abi@2.2.2 - - @0xsequence/account@2.2.2 - - @0xsequence/api@2.2.2 - - @0xsequence/core@2.2.2 - - @0xsequence/indexer@2.2.2 - - @0xsequence/metadata@2.2.2 - - @0xsequence/migration@2.2.2 - - @0xsequence/network@2.2.2 - - @0xsequence/sessions@2.2.2 - - @0xsequence/signhub@2.2.2 - - @0xsequence/utils@2.2.2 - - @0xsequence/wallet@2.2.2 - -## 2.2.1 - -### Patch Changes - -- waas-ethers: sign typed data -- Updated dependencies - - @0xsequence/abi@2.2.1 - - @0xsequence/account@2.2.1 - - @0xsequence/api@2.2.1 - - @0xsequence/core@2.2.1 - - @0xsequence/indexer@2.2.1 - - @0xsequence/metadata@2.2.1 - - @0xsequence/migration@2.2.1 - - @0xsequence/network@2.2.1 - - @0xsequence/sessions@2.2.1 - - @0xsequence/signhub@2.2.1 - - @0xsequence/utils@2.2.1 - - @0xsequence/wallet@2.2.1 - -## 2.2.0 - -### Minor Changes - -- indexer: gateway client -- @0xsequence/builder -- upgrade puppeteer to v23.10.3 - -### Patch Changes - -- Updated dependencies -- Updated dependencies -- Updated dependencies - - @0xsequence/abi@2.2.0 - - @0xsequence/account@2.2.0 - - @0xsequence/api@2.2.0 - - @0xsequence/core@2.2.0 - - @0xsequence/indexer@2.2.0 - - @0xsequence/metadata@2.2.0 - - @0xsequence/migration@2.2.0 - - @0xsequence/network@2.2.0 - - @0xsequence/sessions@2.2.0 - - @0xsequence/signhub@2.2.0 - - @0xsequence/utils@2.2.0 - - @0xsequence/wallet@2.2.0 - -## 2.1.8 - -### Patch Changes - -- Add Soneium Mainnet -- Updated dependencies - - @0xsequence/abi@2.1.8 - - @0xsequence/account@2.1.8 - - @0xsequence/api@2.1.8 - - @0xsequence/core@2.1.8 - - @0xsequence/indexer@2.1.8 - - @0xsequence/metadata@2.1.8 - - @0xsequence/migration@2.1.8 - - @0xsequence/network@2.1.8 - - @0xsequence/sessions@2.1.8 - - @0xsequence/signhub@2.1.8 - - @0xsequence/utils@2.1.8 - - @0xsequence/wallet@2.1.8 - -## 2.1.7 - -### Patch Changes - -- guard: pass project access key to guard requests -- Updated dependencies - - @0xsequence/abi@2.1.7 - - @0xsequence/account@2.1.7 - - @0xsequence/api@2.1.7 - - @0xsequence/core@2.1.7 - - @0xsequence/indexer@2.1.7 - - @0xsequence/metadata@2.1.7 - - @0xsequence/migration@2.1.7 - - @0xsequence/network@2.1.7 - - @0xsequence/sessions@2.1.7 - - @0xsequence/signhub@2.1.7 - - @0xsequence/utils@2.1.7 - - @0xsequence/wallet@2.1.7 - -## 2.1.6 - -### Patch Changes - -- Add LAOS and Telos Testnet chains -- Updated dependencies - - @0xsequence/abi@2.1.6 - - @0xsequence/account@2.1.6 - - @0xsequence/api@2.1.6 - - @0xsequence/core@2.1.6 - - @0xsequence/indexer@2.1.6 - - @0xsequence/metadata@2.1.6 - - @0xsequence/migration@2.1.6 - - @0xsequence/network@2.1.6 - - @0xsequence/sessions@2.1.6 - - @0xsequence/signhub@2.1.6 - - @0xsequence/utils@2.1.6 - - @0xsequence/wallet@2.1.6 - -## 2.1.5 - -### Patch Changes - -- account: save presigned configuration with reference chain id 1 -- Updated dependencies - - @0xsequence/abi@2.1.5 - - @0xsequence/account@2.1.5 - - @0xsequence/api@2.1.5 - - @0xsequence/core@2.1.5 - - @0xsequence/indexer@2.1.5 - - @0xsequence/metadata@2.1.5 - - @0xsequence/migration@2.1.5 - - @0xsequence/network@2.1.5 - - @0xsequence/sessions@2.1.5 - - @0xsequence/signhub@2.1.5 - - @0xsequence/utils@2.1.5 - - @0xsequence/wallet@2.1.5 - -## 2.1.4 - -### Patch Changes - -- provider: pass projectAccessKey into MuxMessageProvider -- Updated dependencies - - @0xsequence/abi@2.1.4 - - @0xsequence/account@2.1.4 - - @0xsequence/api@2.1.4 - - @0xsequence/core@2.1.4 - - @0xsequence/indexer@2.1.4 - - @0xsequence/metadata@2.1.4 - - @0xsequence/migration@2.1.4 - - @0xsequence/network@2.1.4 - - @0xsequence/sessions@2.1.4 - - @0xsequence/signhub@2.1.4 - - @0xsequence/utils@2.1.4 - - @0xsequence/wallet@2.1.4 - -## 2.1.3 - -### Patch Changes - -- waas: time drift date fix due to strange browser quirk -- Updated dependencies - - @0xsequence/abi@2.1.3 - - @0xsequence/account@2.1.3 - - @0xsequence/api@2.1.3 - - @0xsequence/core@2.1.3 - - @0xsequence/indexer@2.1.3 - - @0xsequence/metadata@2.1.3 - - @0xsequence/migration@2.1.3 - - @0xsequence/network@2.1.3 - - @0xsequence/sessions@2.1.3 - - @0xsequence/signhub@2.1.3 - - @0xsequence/utils@2.1.3 - - @0xsequence/wallet@2.1.3 - -## 2.1.2 - -### Patch Changes - -- provider: export analytics correctly -- Updated dependencies - - @0xsequence/abi@2.1.2 - - @0xsequence/account@2.1.2 - - @0xsequence/api@2.1.2 - - @0xsequence/core@2.1.2 - - @0xsequence/indexer@2.1.2 - - @0xsequence/metadata@2.1.2 - - @0xsequence/migration@2.1.2 - - @0xsequence/network@2.1.2 - - @0xsequence/sessions@2.1.2 - - @0xsequence/signhub@2.1.2 - - @0xsequence/utils@2.1.2 - - @0xsequence/wallet@2.1.2 - -## 2.1.1 - -### Patch Changes - -- Add LAOS chain support -- Updated dependencies - - @0xsequence/abi@2.1.1 - - @0xsequence/account@2.1.1 - - @0xsequence/api@2.1.1 - - @0xsequence/core@2.1.1 - - @0xsequence/indexer@2.1.1 - - @0xsequence/metadata@2.1.1 - - @0xsequence/migration@2.1.1 - - @0xsequence/network@2.1.1 - - @0xsequence/sessions@2.1.1 - - @0xsequence/signhub@2.1.1 - - @0xsequence/utils@2.1.1 - - @0xsequence/wallet@2.1.1 - -## 2.1.0 - -### Minor Changes - -- account: forward project access key when estimating fees and sending transactions - -### Patch Changes - -- sessions: save signatures with reference chain id -- Updated dependencies -- Updated dependencies - - @0xsequence/abi@2.1.0 - - @0xsequence/account@2.1.0 - - @0xsequence/api@2.1.0 - - @0xsequence/core@2.1.0 - - @0xsequence/indexer@2.1.0 - - @0xsequence/metadata@2.1.0 - - @0xsequence/migration@2.1.0 - - @0xsequence/network@2.1.0 - - @0xsequence/sessions@2.1.0 - - @0xsequence/signhub@2.1.0 - - @0xsequence/utils@2.1.0 - - @0xsequence/wallet@2.1.0 - -## 2.0.26 - -### Patch Changes - -- account: fix chain id comparison -- Updated dependencies - - @0xsequence/abi@2.0.26 - - @0xsequence/account@2.0.26 - - @0xsequence/api@2.0.26 - - @0xsequence/core@2.0.26 - - @0xsequence/indexer@2.0.26 - - @0xsequence/metadata@2.0.26 - - @0xsequence/migration@2.0.26 - - @0xsequence/network@2.0.26 - - @0xsequence/sessions@2.0.26 - - @0xsequence/signhub@2.0.26 - - @0xsequence/utils@2.0.26 - - @0xsequence/wallet@2.0.26 - -## 2.0.25 - -### Patch Changes - -- skale-nebula: deploy gas limit = 10m -- Updated dependencies - - @0xsequence/abi@2.0.25 - - @0xsequence/account@2.0.25 - - @0xsequence/api@2.0.25 - - @0xsequence/core@2.0.25 - - @0xsequence/indexer@2.0.25 - - @0xsequence/metadata@2.0.25 - - @0xsequence/migration@2.0.25 - - @0xsequence/network@2.0.25 - - @0xsequence/sessions@2.0.25 - - @0xsequence/signhub@2.0.25 - - @0xsequence/utils@2.0.25 - - @0xsequence/wallet@2.0.25 - -## 2.0.24 - -### Patch Changes - -- sessions: arweave: configurable gateway url -- waas: use /status to get time drift before sending any intents -- Updated dependencies -- Updated dependencies - - @0xsequence/abi@2.0.24 - - @0xsequence/account@2.0.24 - - @0xsequence/api@2.0.24 - - @0xsequence/core@2.0.24 - - @0xsequence/indexer@2.0.24 - - @0xsequence/metadata@2.0.24 - - @0xsequence/migration@2.0.24 - - @0xsequence/network@2.0.24 - - @0xsequence/sessions@2.0.24 - - @0xsequence/signhub@2.0.24 - - @0xsequence/utils@2.0.24 - - @0xsequence/wallet@2.0.24 - -## 2.0.23 - -### Patch Changes - -- Add The Root Network support -- Updated dependencies - - @0xsequence/abi@2.0.23 - - @0xsequence/account@2.0.23 - - @0xsequence/api@2.0.23 - - @0xsequence/core@2.0.23 - - @0xsequence/indexer@2.0.23 - - @0xsequence/metadata@2.0.23 - - @0xsequence/migration@2.0.23 - - @0xsequence/network@2.0.23 - - @0xsequence/sessions@2.0.23 - - @0xsequence/signhub@2.0.23 - - @0xsequence/utils@2.0.23 - - @0xsequence/wallet@2.0.23 - -## 2.0.22 - -### Patch Changes - -- Add SKALE Nebula Mainnet support -- Updated dependencies - - @0xsequence/abi@2.0.22 - - @0xsequence/account@2.0.22 - - @0xsequence/api@2.0.22 - - @0xsequence/core@2.0.22 - - @0xsequence/indexer@2.0.22 - - @0xsequence/metadata@2.0.22 - - @0xsequence/migration@2.0.22 - - @0xsequence/network@2.0.22 - - @0xsequence/sessions@2.0.22 - - @0xsequence/signhub@2.0.22 - - @0xsequence/utils@2.0.22 - - @0xsequence/wallet@2.0.22 - -## 2.0.21 - -### Patch Changes - -- account: add publishWitnessFor -- Updated dependencies - - @0xsequence/abi@2.0.21 - - @0xsequence/account@2.0.21 - - @0xsequence/api@2.0.21 - - @0xsequence/core@2.0.21 - - @0xsequence/indexer@2.0.21 - - @0xsequence/metadata@2.0.21 - - @0xsequence/migration@2.0.21 - - @0xsequence/network@2.0.21 - - @0xsequence/sessions@2.0.21 - - @0xsequence/signhub@2.0.21 - - @0xsequence/utils@2.0.21 - - @0xsequence/wallet@2.0.21 - -## 2.0.20 - -### Patch Changes - -- upgrade deps, and improve waas session status handling -- Updated dependencies - - @0xsequence/abi@2.0.20 - - @0xsequence/account@2.0.20 - - @0xsequence/api@2.0.20 - - @0xsequence/core@2.0.20 - - @0xsequence/indexer@2.0.20 - - @0xsequence/metadata@2.0.20 - - @0xsequence/migration@2.0.20 - - @0xsequence/network@2.0.20 - - @0xsequence/sessions@2.0.20 - - @0xsequence/signhub@2.0.20 - - @0xsequence/utils@2.0.20 - - @0xsequence/wallet@2.0.20 - -## 2.0.19 - -### Patch Changes - -- Add Immutable zkEVM support -- Updated dependencies - - @0xsequence/abi@2.0.19 - - @0xsequence/account@2.0.19 - - @0xsequence/api@2.0.19 - - @0xsequence/core@2.0.19 - - @0xsequence/indexer@2.0.19 - - @0xsequence/metadata@2.0.19 - - @0xsequence/migration@2.0.19 - - @0xsequence/network@2.0.19 - - @0xsequence/sessions@2.0.19 - - @0xsequence/signhub@2.0.19 - - @0xsequence/utils@2.0.19 - - @0xsequence/wallet@2.0.19 - -## 2.0.18 - -### Patch Changes - -- waas: new contractCall transaction type -- sessions: add arweave owner -- Updated dependencies -- Updated dependencies - - @0xsequence/abi@2.0.18 - - @0xsequence/account@2.0.18 - - @0xsequence/api@2.0.18 - - @0xsequence/core@2.0.18 - - @0xsequence/indexer@2.0.18 - - @0xsequence/metadata@2.0.18 - - @0xsequence/migration@2.0.18 - - @0xsequence/network@2.0.18 - - @0xsequence/sessions@2.0.18 - - @0xsequence/signhub@2.0.18 - - @0xsequence/utils@2.0.18 - - @0xsequence/wallet@2.0.18 - -## 2.0.17 - -### Patch Changes - -- update waas auth to clear session before signIn -- Updated dependencies - - @0xsequence/abi@2.0.17 - - @0xsequence/account@2.0.17 - - @0xsequence/api@2.0.17 - - @0xsequence/core@2.0.17 - - @0xsequence/indexer@2.0.17 - - @0xsequence/metadata@2.0.17 - - @0xsequence/migration@2.0.17 - - @0xsequence/network@2.0.17 - - @0xsequence/sessions@2.0.17 - - @0xsequence/signhub@2.0.17 - - @0xsequence/utils@2.0.17 - - @0xsequence/wallet@2.0.17 - -## 2.0.16 - -### Patch Changes - -- Removed Astar chains -- Updated dependencies - - @0xsequence/abi@2.0.16 - - @0xsequence/account@2.0.16 - - @0xsequence/api@2.0.16 - - @0xsequence/core@2.0.16 - - @0xsequence/indexer@2.0.16 - - @0xsequence/metadata@2.0.16 - - @0xsequence/migration@2.0.16 - - @0xsequence/network@2.0.16 - - @0xsequence/sessions@2.0.16 - - @0xsequence/signhub@2.0.16 - - @0xsequence/utils@2.0.16 - - @0xsequence/wallet@2.0.16 - -## 2.0.15 - -### Patch Changes - -- indexer: update bindings with token balance additions -- Updated dependencies - - @0xsequence/abi@2.0.15 - - @0xsequence/account@2.0.15 - - @0xsequence/api@2.0.15 - - @0xsequence/core@2.0.15 - - @0xsequence/indexer@2.0.15 - - @0xsequence/metadata@2.0.15 - - @0xsequence/migration@2.0.15 - - @0xsequence/network@2.0.15 - - @0xsequence/sessions@2.0.15 - - @0xsequence/signhub@2.0.15 - - @0xsequence/utils@2.0.15 - - @0xsequence/wallet@2.0.15 - -## 2.0.14 - -### Patch Changes - -- sessions: arweave config reader -- network: add b3 and apechain mainnet configs -- Updated dependencies -- Updated dependencies - - @0xsequence/abi@2.0.14 - - @0xsequence/account@2.0.14 - - @0xsequence/api@2.0.14 - - @0xsequence/core@2.0.14 - - @0xsequence/indexer@2.0.14 - - @0xsequence/metadata@2.0.14 - - @0xsequence/migration@2.0.14 - - @0xsequence/network@2.0.14 - - @0xsequence/sessions@2.0.14 - - @0xsequence/signhub@2.0.14 - - @0xsequence/utils@2.0.14 - - @0xsequence/wallet@2.0.14 - -## 2.0.13 - -### Patch Changes - -- network: toy-testnet -- Updated dependencies - - @0xsequence/abi@2.0.13 - - @0xsequence/account@2.0.13 - - @0xsequence/api@2.0.13 - - @0xsequence/core@2.0.13 - - @0xsequence/indexer@2.0.13 - - @0xsequence/metadata@2.0.13 - - @0xsequence/migration@2.0.13 - - @0xsequence/network@2.0.13 - - @0xsequence/sessions@2.0.13 - - @0xsequence/signhub@2.0.13 - - @0xsequence/utils@2.0.13 - - @0xsequence/wallet@2.0.13 - -## 2.0.12 - -### Patch Changes - -- api: update bindings -- Updated dependencies - - @0xsequence/abi@2.0.12 - - @0xsequence/account@2.0.12 - - @0xsequence/api@2.0.12 - - @0xsequence/core@2.0.12 - - @0xsequence/indexer@2.0.12 - - @0xsequence/metadata@2.0.12 - - @0xsequence/migration@2.0.12 - - @0xsequence/network@2.0.12 - - @0xsequence/sessions@2.0.12 - - @0xsequence/signhub@2.0.12 - - @0xsequence/utils@2.0.12 - - @0xsequence/wallet@2.0.12 - -## 2.0.11 - -### Patch Changes - -- waas: intents test fix -- api: update bindings -- Updated dependencies -- Updated dependencies - - @0xsequence/abi@2.0.11 - - @0xsequence/account@2.0.11 - - @0xsequence/api@2.0.11 - - @0xsequence/core@2.0.11 - - @0xsequence/indexer@2.0.11 - - @0xsequence/metadata@2.0.11 - - @0xsequence/migration@2.0.11 - - @0xsequence/network@2.0.11 - - @0xsequence/sessions@2.0.11 - - @0xsequence/signhub@2.0.11 - - @0xsequence/utils@2.0.11 - - @0xsequence/wallet@2.0.11 - -## 2.0.10 - -### Patch Changes - -- network: soneium minato testnet -- Updated dependencies - - @0xsequence/abi@2.0.10 - - @0xsequence/account@2.0.10 - - @0xsequence/api@2.0.10 - - @0xsequence/core@2.0.10 - - @0xsequence/indexer@2.0.10 - - @0xsequence/metadata@2.0.10 - - @0xsequence/migration@2.0.10 - - @0xsequence/network@2.0.10 - - @0xsequence/sessions@2.0.10 - - @0xsequence/signhub@2.0.10 - - @0xsequence/utils@2.0.10 - - @0xsequence/wallet@2.0.10 - -## 2.0.9 - -### Patch Changes - -- network: fix SKALE network name -- Updated dependencies - - @0xsequence/abi@2.0.9 - - @0xsequence/account@2.0.9 - - @0xsequence/api@2.0.9 - - @0xsequence/core@2.0.9 - - @0xsequence/indexer@2.0.9 - - @0xsequence/metadata@2.0.9 - - @0xsequence/migration@2.0.9 - - @0xsequence/network@2.0.9 - - @0xsequence/sessions@2.0.9 - - @0xsequence/signhub@2.0.9 - - @0xsequence/utils@2.0.9 - - @0xsequence/wallet@2.0.9 - -## 2.0.8 - -### Patch Changes - -- metadata: update bindings -- Updated dependencies - - @0xsequence/abi@2.0.8 - - @0xsequence/account@2.0.8 - - @0xsequence/api@2.0.8 - - @0xsequence/core@2.0.8 - - @0xsequence/indexer@2.0.8 - - @0xsequence/metadata@2.0.8 - - @0xsequence/migration@2.0.8 - - @0xsequence/network@2.0.8 - - @0xsequence/sessions@2.0.8 - - @0xsequence/signhub@2.0.8 - - @0xsequence/utils@2.0.8 - - @0xsequence/wallet@2.0.8 - -## 2.0.7 - -### Patch Changes - -- wallet request handler fix -- Updated dependencies - - @0xsequence/abi@2.0.7 - - @0xsequence/account@2.0.7 - - @0xsequence/api@2.0.7 - - @0xsequence/core@2.0.7 - - @0xsequence/indexer@2.0.7 - - @0xsequence/metadata@2.0.7 - - @0xsequence/migration@2.0.7 - - @0xsequence/network@2.0.7 - - @0xsequence/sessions@2.0.7 - - @0xsequence/signhub@2.0.7 - - @0xsequence/utils@2.0.7 - - @0xsequence/wallet@2.0.7 - -## 2.0.6 - -### Patch Changes - -- network: matic -> pol -- Updated dependencies - - @0xsequence/abi@2.0.6 - - @0xsequence/account@2.0.6 - - @0xsequence/api@2.0.6 - - @0xsequence/core@2.0.6 - - @0xsequence/indexer@2.0.6 - - @0xsequence/metadata@2.0.6 - - @0xsequence/migration@2.0.6 - - @0xsequence/network@2.0.6 - - @0xsequence/sessions@2.0.6 - - @0xsequence/signhub@2.0.6 - - @0xsequence/utils@2.0.6 - - @0xsequence/wallet@2.0.6 - -## 2.0.5 - -### Patch Changes - -- provider: update databeat to 0.9.2 -- Updated dependencies - - @0xsequence/abi@2.0.5 - - @0xsequence/account@2.0.5 - - @0xsequence/api@2.0.5 - - @0xsequence/core@2.0.5 - - @0xsequence/indexer@2.0.5 - - @0xsequence/metadata@2.0.5 - - @0xsequence/migration@2.0.5 - - @0xsequence/network@2.0.5 - - @0xsequence/sessions@2.0.5 - - @0xsequence/signhub@2.0.5 - - @0xsequence/utils@2.0.5 - - @0xsequence/wallet@2.0.5 - -## 2.0.4 - -### Patch Changes - -- network: add skale-nebula-testnet -- Updated dependencies - - @0xsequence/abi@2.0.4 - - @0xsequence/account@2.0.4 - - @0xsequence/api@2.0.4 - - @0xsequence/core@2.0.4 - - @0xsequence/indexer@2.0.4 - - @0xsequence/metadata@2.0.4 - - @0xsequence/migration@2.0.4 - - @0xsequence/network@2.0.4 - - @0xsequence/sessions@2.0.4 - - @0xsequence/signhub@2.0.4 - - @0xsequence/utils@2.0.4 - - @0xsequence/wallet@2.0.4 - -## 2.0.3 - -### Patch Changes - -- waas: check session status in SequenceWaaS.isSignedIn() -- Updated dependencies - - @0xsequence/abi@2.0.3 - - @0xsequence/account@2.0.3 - - @0xsequence/api@2.0.3 - - @0xsequence/core@2.0.3 - - @0xsequence/indexer@2.0.3 - - @0xsequence/metadata@2.0.3 - - @0xsequence/migration@2.0.3 - - @0xsequence/network@2.0.3 - - @0xsequence/sessions@2.0.3 - - @0xsequence/signhub@2.0.3 - - @0xsequence/utils@2.0.3 - - @0xsequence/wallet@2.0.3 - -## 2.0.2 - -### Patch Changes - -- sessions: property convert serialized bignumber hex value to bigint -- Updated dependencies - - @0xsequence/abi@2.0.2 - - @0xsequence/account@2.0.2 - - @0xsequence/api@2.0.2 - - @0xsequence/core@2.0.2 - - @0xsequence/indexer@2.0.2 - - @0xsequence/metadata@2.0.2 - - @0xsequence/migration@2.0.2 - - @0xsequence/network@2.0.2 - - @0xsequence/sessions@2.0.2 - - @0xsequence/signhub@2.0.2 - - @0xsequence/utils@2.0.2 - - @0xsequence/wallet@2.0.2 - -## 2.0.1 - -### Patch Changes - -- waas: http signature check for authenticator requests -- provider: unwrap legacy json rpc responses -- use json replacer and reviver for bigints -- Updated dependencies -- Updated dependencies -- Updated dependencies - - @0xsequence/abi@2.0.1 - - @0xsequence/account@2.0.1 - - @0xsequence/api@2.0.1 - - @0xsequence/core@2.0.1 - - @0xsequence/indexer@2.0.1 - - @0xsequence/metadata@2.0.1 - - @0xsequence/migration@2.0.1 - - @0xsequence/network@2.0.1 - - @0xsequence/sessions@2.0.1 - - @0xsequence/signhub@2.0.1 - - @0xsequence/utils@2.0.1 - - @0xsequence/wallet@2.0.1 - -## 2.0.0 - -### Major Changes - -- ethers v6 - -### Patch Changes - -- Updated dependencies - - @0xsequence/abi@2.0.0 - - @0xsequence/account@2.0.0 - - @0xsequence/api@2.0.0 - - @0xsequence/core@2.0.0 - - @0xsequence/indexer@2.0.0 - - @0xsequence/metadata@2.0.0 - - @0xsequence/migration@2.0.0 - - @0xsequence/network@2.0.0 - - @0xsequence/sessions@2.0.0 - - @0xsequence/signhub@2.0.0 - - @0xsequence/utils@2.0.0 - - @0xsequence/wallet@2.0.0 - -## 1.10.15 - -### Patch Changes - -- utils: extractProjectIdFromAccessKey -- Updated dependencies - - @0xsequence/abi@1.10.15 - - @0xsequence/account@1.10.15 - - @0xsequence/api@1.10.15 - - @0xsequence/core@1.10.15 - - @0xsequence/indexer@1.10.15 - - @0xsequence/metadata@1.10.15 - - @0xsequence/migration@1.10.15 - - @0xsequence/network@1.10.15 - - @0xsequence/sessions@1.10.15 - - @0xsequence/signhub@1.10.15 - - @0xsequence/utils@1.10.15 - - @0xsequence/wallet@1.10.15 - -## 1.10.14 - -### Patch Changes - -- network: add borne-testnet to allNetworks -- Updated dependencies - - @0xsequence/abi@1.10.14 - - @0xsequence/account@1.10.14 - - @0xsequence/api@1.10.14 - - @0xsequence/core@1.10.14 - - @0xsequence/indexer@1.10.14 - - @0xsequence/metadata@1.10.14 - - @0xsequence/migration@1.10.14 - - @0xsequence/network@1.10.14 - - @0xsequence/sessions@1.10.14 - - @0xsequence/signhub@1.10.14 - - @0xsequence/utils@1.10.14 - - @0xsequence/wallet@1.10.14 - -## 1.10.13 - -### Patch Changes - -- network: add borne testnet -- Updated dependencies - - @0xsequence/abi@1.10.13 - - @0xsequence/account@1.10.13 - - @0xsequence/api@1.10.13 - - @0xsequence/core@1.10.13 - - @0xsequence/indexer@1.10.13 - - @0xsequence/metadata@1.10.13 - - @0xsequence/migration@1.10.13 - - @0xsequence/network@1.10.13 - - @0xsequence/sessions@1.10.13 - - @0xsequence/signhub@1.10.13 - - @0xsequence/utils@1.10.13 - - @0xsequence/wallet@1.10.13 - -## 1.10.12 - -### Patch Changes - -- api: update bindings -- global/window -> globalThis -- Updated dependencies -- Updated dependencies - - @0xsequence/abi@1.10.12 - - @0xsequence/account@1.10.12 - - @0xsequence/api@1.10.12 - - @0xsequence/core@1.10.12 - - @0xsequence/indexer@1.10.12 - - @0xsequence/metadata@1.10.12 - - @0xsequence/migration@1.10.12 - - @0xsequence/network@1.10.12 - - @0xsequence/sessions@1.10.12 - - @0xsequence/signhub@1.10.12 - - @0xsequence/utils@1.10.12 - - @0xsequence/wallet@1.10.12 - -## 1.10.11 - -### Patch Changes - -- waas: updated intent.gen without webrpc types, errors exported from authenticator.gen -- Updated dependencies - - @0xsequence/abi@1.10.11 - - @0xsequence/account@1.10.11 - - @0xsequence/api@1.10.11 - - @0xsequence/core@1.10.11 - - @0xsequence/indexer@1.10.11 - - @0xsequence/metadata@1.10.11 - - @0xsequence/migration@1.10.11 - - @0xsequence/network@1.10.11 - - @0xsequence/sessions@1.10.11 - - @0xsequence/signhub@1.10.11 - - @0xsequence/utils@1.10.11 - - @0xsequence/wallet@1.10.11 - -## 1.10.10 - -### Patch Changes - -- metadata: update bindings with new contract collections api -- Updated dependencies - - @0xsequence/abi@1.10.10 - - @0xsequence/account@1.10.10 - - @0xsequence/api@1.10.10 - - @0xsequence/core@1.10.10 - - @0xsequence/indexer@1.10.10 - - @0xsequence/metadata@1.10.10 - - @0xsequence/migration@1.10.10 - - @0xsequence/network@1.10.10 - - @0xsequence/sessions@1.10.10 - - @0xsequence/signhub@1.10.10 - - @0xsequence/utils@1.10.10 - - @0xsequence/wallet@1.10.10 - -## 1.10.9 - -### Patch Changes - -- waas minor update -- Updated dependencies - - @0xsequence/abi@1.10.9 - - @0xsequence/account@1.10.9 - - @0xsequence/api@1.10.9 - - @0xsequence/core@1.10.9 - - @0xsequence/indexer@1.10.9 - - @0xsequence/metadata@1.10.9 - - @0xsequence/migration@1.10.9 - - @0xsequence/network@1.10.9 - - @0xsequence/sessions@1.10.9 - - @0xsequence/signhub@1.10.9 - - @0xsequence/utils@1.10.9 - - @0xsequence/wallet@1.10.9 - -## 1.10.8 - -### Patch Changes - -- update metadata bindings -- Updated dependencies - - @0xsequence/abi@1.10.8 - - @0xsequence/account@1.10.8 - - @0xsequence/api@1.10.8 - - @0xsequence/core@1.10.8 - - @0xsequence/indexer@1.10.8 - - @0xsequence/metadata@1.10.8 - - @0xsequence/migration@1.10.8 - - @0xsequence/network@1.10.8 - - @0xsequence/sessions@1.10.8 - - @0xsequence/signhub@1.10.8 - - @0xsequence/utils@1.10.8 - - @0xsequence/wallet@1.10.8 - -## 1.10.7 - -### Patch Changes - -- minor fixes to waas client -- Updated dependencies - - @0xsequence/abi@1.10.7 - - @0xsequence/account@1.10.7 - - @0xsequence/api@1.10.7 - - @0xsequence/core@1.10.7 - - @0xsequence/indexer@1.10.7 - - @0xsequence/metadata@1.10.7 - - @0xsequence/migration@1.10.7 - - @0xsequence/network@1.10.7 - - @0xsequence/sessions@1.10.7 - - @0xsequence/signhub@1.10.7 - - @0xsequence/utils@1.10.7 - - @0xsequence/wallet@1.10.7 - -## 1.10.6 - -### Patch Changes - -- metadata: update bindings -- Updated dependencies - - @0xsequence/abi@1.10.6 - - @0xsequence/account@1.10.6 - - @0xsequence/api@1.10.6 - - @0xsequence/core@1.10.6 - - @0xsequence/indexer@1.10.6 - - @0xsequence/metadata@1.10.6 - - @0xsequence/migration@1.10.6 - - @0xsequence/network@1.10.6 - - @0xsequence/sessions@1.10.6 - - @0xsequence/signhub@1.10.6 - - @0xsequence/utils@1.10.6 - - @0xsequence/wallet@1.10.6 - -## 1.10.5 - -### Patch Changes - -- network: ape-chain-testnet -> apechain-testnet -- Updated dependencies - - @0xsequence/abi@1.10.5 - - @0xsequence/account@1.10.5 - - @0xsequence/api@1.10.5 - - @0xsequence/core@1.10.5 - - @0xsequence/indexer@1.10.5 - - @0xsequence/metadata@1.10.5 - - @0xsequence/migration@1.10.5 - - @0xsequence/network@1.10.5 - - @0xsequence/sessions@1.10.5 - - @0xsequence/signhub@1.10.5 - - @0xsequence/utils@1.10.5 - - @0xsequence/wallet@1.10.5 - -## 1.10.4 - -### Patch Changes - -- network: add b3-sepolia, ape-chain-testnet, blast, blast-sepolia -- Updated dependencies - - @0xsequence/abi@1.10.4 - - @0xsequence/account@1.10.4 - - @0xsequence/api@1.10.4 - - @0xsequence/core@1.10.4 - - @0xsequence/indexer@1.10.4 - - @0xsequence/metadata@1.10.4 - - @0xsequence/migration@1.10.4 - - @0xsequence/network@1.10.4 - - @0xsequence/sessions@1.10.4 - - @0xsequence/signhub@1.10.4 - - @0xsequence/utils@1.10.4 - - @0xsequence/wallet@1.10.4 - -## 1.10.3 - -### Patch Changes - -- typing fix -- Updated dependencies - - @0xsequence/abi@1.10.3 - - @0xsequence/account@1.10.3 - - @0xsequence/api@1.10.3 - - @0xsequence/core@1.10.3 - - @0xsequence/indexer@1.10.3 - - @0xsequence/metadata@1.10.3 - - @0xsequence/migration@1.10.3 - - @0xsequence/network@1.10.3 - - @0xsequence/sessions@1.10.3 - - @0xsequence/signhub@1.10.3 - - @0xsequence/utils@1.10.3 - - @0xsequence/wallet@1.10.3 - -## 1.10.2 - -### Patch Changes - -- - waas: add getIdToken method - - indexer: update api client -- Updated dependencies - - @0xsequence/abi@1.10.2 - - @0xsequence/account@1.10.2 - - @0xsequence/api@1.10.2 - - @0xsequence/core@1.10.2 - - @0xsequence/indexer@1.10.2 - - @0xsequence/metadata@1.10.2 - - @0xsequence/migration@1.10.2 - - @0xsequence/network@1.10.2 - - @0xsequence/sessions@1.10.2 - - @0xsequence/signhub@1.10.2 - - @0xsequence/utils@1.10.2 - - @0xsequence/wallet@1.10.2 - -## 1.10.1 - -### Patch Changes - -- metadata: update bindings -- Updated dependencies - - @0xsequence/abi@1.10.1 - - @0xsequence/account@1.10.1 - - @0xsequence/api@1.10.1 - - @0xsequence/core@1.10.1 - - @0xsequence/indexer@1.10.1 - - @0xsequence/metadata@1.10.1 - - @0xsequence/migration@1.10.1 - - @0xsequence/network@1.10.1 - - @0xsequence/sessions@1.10.1 - - @0xsequence/signhub@1.10.1 - - @0xsequence/utils@1.10.1 - - @0xsequence/wallet@1.10.1 - -## 1.10.0 - -### Minor Changes - -- waas release v1.3.0 - -### Patch Changes - -- Updated dependencies - - @0xsequence/abi@1.10.0 - - @0xsequence/account@1.10.0 - - @0xsequence/api@1.10.0 - - @0xsequence/core@1.10.0 - - @0xsequence/indexer@1.10.0 - - @0xsequence/metadata@1.10.0 - - @0xsequence/migration@1.10.0 - - @0xsequence/network@1.10.0 - - @0xsequence/sessions@1.10.0 - - @0xsequence/signhub@1.10.0 - - @0xsequence/utils@1.10.0 - - @0xsequence/wallet@1.10.0 - -## 1.9.37 - -### Patch Changes - -- network: adds nativeToken data to NetworkMetadata constants -- Updated dependencies - - @0xsequence/abi@1.9.37 - - @0xsequence/account@1.9.37 - - @0xsequence/api@1.9.37 - - @0xsequence/core@1.9.37 - - @0xsequence/indexer@1.9.37 - - @0xsequence/metadata@1.9.37 - - @0xsequence/migration@1.9.37 - - @0xsequence/network@1.9.37 - - @0xsequence/sessions@1.9.37 - - @0xsequence/signhub@1.9.37 - - @0xsequence/utils@1.9.37 - - @0xsequence/wallet@1.9.37 - -## 1.9.36 - -### Patch Changes - -- guard: export client -- Updated dependencies - - @0xsequence/abi@1.9.36 - - @0xsequence/account@1.9.36 - - @0xsequence/api@1.9.36 - - @0xsequence/core@1.9.36 - - @0xsequence/indexer@1.9.36 - - @0xsequence/metadata@1.9.36 - - @0xsequence/migration@1.9.36 - - @0xsequence/network@1.9.36 - - @0xsequence/sessions@1.9.36 - - @0xsequence/signhub@1.9.36 - - @0xsequence/utils@1.9.36 - - @0xsequence/wallet@1.9.36 - -## 1.9.35 - -### Patch Changes - -- guard: update bindings -- Updated dependencies - - @0xsequence/abi@1.9.35 - - @0xsequence/account@1.9.35 - - @0xsequence/api@1.9.35 - - @0xsequence/core@1.9.35 - - @0xsequence/indexer@1.9.35 - - @0xsequence/metadata@1.9.35 - - @0xsequence/migration@1.9.35 - - @0xsequence/network@1.9.35 - - @0xsequence/sessions@1.9.35 - - @0xsequence/signhub@1.9.35 - - @0xsequence/utils@1.9.35 - - @0xsequence/wallet@1.9.35 - -## 1.9.34 - -### Patch Changes - -- waas: always use lowercase email -- Updated dependencies - - @0xsequence/abi@1.9.34 - - @0xsequence/account@1.9.34 - - @0xsequence/api@1.9.34 - - @0xsequence/core@1.9.34 - - @0xsequence/indexer@1.9.34 - - @0xsequence/metadata@1.9.34 - - @0xsequence/migration@1.9.34 - - @0xsequence/network@1.9.34 - - @0xsequence/sessions@1.9.34 - - @0xsequence/signhub@1.9.34 - - @0xsequence/utils@1.9.34 - - @0xsequence/wallet@1.9.34 - -## 1.9.33 - -### Patch Changes - -- waas: umd build -- Updated dependencies - - @0xsequence/abi@1.9.33 - - @0xsequence/account@1.9.33 - - @0xsequence/api@1.9.33 - - @0xsequence/core@1.9.33 - - @0xsequence/indexer@1.9.33 - - @0xsequence/metadata@1.9.33 - - @0xsequence/migration@1.9.33 - - @0xsequence/network@1.9.33 - - @0xsequence/sessions@1.9.33 - - @0xsequence/signhub@1.9.33 - - @0xsequence/utils@1.9.33 - - @0xsequence/wallet@1.9.33 - -## 1.9.32 - -### Patch Changes - -- indexer: update bindings -- Updated dependencies - - @0xsequence/abi@1.9.32 - - @0xsequence/account@1.9.32 - - @0xsequence/api@1.9.32 - - @0xsequence/core@1.9.32 - - @0xsequence/indexer@1.9.32 - - @0xsequence/metadata@1.9.32 - - @0xsequence/migration@1.9.32 - - @0xsequence/network@1.9.32 - - @0xsequence/sessions@1.9.32 - - @0xsequence/signhub@1.9.32 - - @0xsequence/utils@1.9.32 - - @0xsequence/wallet@1.9.32 - -## 1.9.31 - -### Patch Changes - -- metadata: token directory changes -- Updated dependencies - - @0xsequence/abi@1.9.31 - - @0xsequence/account@1.9.31 - - @0xsequence/api@1.9.31 - - @0xsequence/core@1.9.31 - - @0xsequence/indexer@1.9.31 - - @0xsequence/metadata@1.9.31 - - @0xsequence/migration@1.9.31 - - @0xsequence/network@1.9.31 - - @0xsequence/sessions@1.9.31 - - @0xsequence/signhub@1.9.31 - - @0xsequence/utils@1.9.31 - - @0xsequence/wallet@1.9.31 - -## 1.9.30 - -### Patch Changes - -- update -- Updated dependencies - - @0xsequence/abi@1.9.30 - - @0xsequence/account@1.9.30 - - @0xsequence/api@1.9.30 - - @0xsequence/core@1.9.30 - - @0xsequence/indexer@1.9.30 - - @0xsequence/metadata@1.9.30 - - @0xsequence/migration@1.9.30 - - @0xsequence/network@1.9.30 - - @0xsequence/sessions@1.9.30 - - @0xsequence/signhub@1.9.30 - - @0xsequence/utils@1.9.30 - - @0xsequence/wallet@1.9.30 - -## 1.9.29 - -### Patch Changes - -- disable gnosis chain -- Updated dependencies - - @0xsequence/abi@1.9.29 - - @0xsequence/account@1.9.29 - - @0xsequence/api@1.9.29 - - @0xsequence/core@1.9.29 - - @0xsequence/indexer@1.9.29 - - @0xsequence/metadata@1.9.29 - - @0xsequence/migration@1.9.29 - - @0xsequence/network@1.9.29 - - @0xsequence/sessions@1.9.29 - - @0xsequence/signhub@1.9.29 - - @0xsequence/utils@1.9.29 - - @0xsequence/wallet@1.9.29 - -## 1.9.28 - -### Patch Changes - -- add utils/merkletree -- Updated dependencies - - @0xsequence/abi@1.9.28 - - @0xsequence/account@1.9.28 - - @0xsequence/api@1.9.28 - - @0xsequence/core@1.9.28 - - @0xsequence/indexer@1.9.28 - - @0xsequence/metadata@1.9.28 - - @0xsequence/migration@1.9.28 - - @0xsequence/network@1.9.28 - - @0xsequence/sessions@1.9.28 - - @0xsequence/signhub@1.9.28 - - @0xsequence/utils@1.9.28 - - @0xsequence/wallet@1.9.28 - -## 1.9.27 - -### Patch Changes - -- network: optimistic -> optimism -- waas: remove defaults -- api, sessions: update bindings -- Updated dependencies -- Updated dependencies -- Updated dependencies - - @0xsequence/abi@1.9.27 - - @0xsequence/account@1.9.27 - - @0xsequence/api@1.9.27 - - @0xsequence/core@1.9.27 - - @0xsequence/indexer@1.9.27 - - @0xsequence/metadata@1.9.27 - - @0xsequence/migration@1.9.27 - - @0xsequence/network@1.9.27 - - @0xsequence/sessions@1.9.27 - - @0xsequence/signhub@1.9.27 - - @0xsequence/utils@1.9.27 - - @0xsequence/wallet@1.9.27 - -## 1.9.26 - -### Patch Changes - -- - add backend interfaces for pluggable interfaces - - introduce @0xsequence/react-native - - update pnpm to lockfile v9 -- Updated dependencies - - @0xsequence/abi@1.9.26 - - @0xsequence/account@1.9.26 - - @0xsequence/api@1.9.26 - - @0xsequence/core@1.9.26 - - @0xsequence/indexer@1.9.26 - - @0xsequence/metadata@1.9.26 - - @0xsequence/migration@1.9.26 - - @0xsequence/network@1.9.26 - - @0xsequence/sessions@1.9.26 - - @0xsequence/signhub@1.9.26 - - @0xsequence/utils@1.9.26 - - @0xsequence/wallet@1.9.26 - -## 1.9.25 - -### Patch Changes - -- update webrpc clients with new error types -- Updated dependencies - - @0xsequence/abi@1.9.25 - - @0xsequence/account@1.9.25 - - @0xsequence/api@1.9.25 - - @0xsequence/core@1.9.25 - - @0xsequence/indexer@1.9.25 - - @0xsequence/metadata@1.9.25 - - @0xsequence/migration@1.9.25 - - @0xsequence/network@1.9.25 - - @0xsequence/sessions@1.9.25 - - @0xsequence/signhub@1.9.25 - - @0xsequence/utils@1.9.25 - - @0xsequence/wallet@1.9.25 - -## 1.9.24 - -### Patch Changes - -- waas: add memoryStore backend to localStore -- Updated dependencies - - @0xsequence/abi@1.9.24 - - @0xsequence/account@1.9.24 - - @0xsequence/api@1.9.24 - - @0xsequence/core@1.9.24 - - @0xsequence/indexer@1.9.24 - - @0xsequence/metadata@1.9.24 - - @0xsequence/migration@1.9.24 - - @0xsequence/network@1.9.24 - - @0xsequence/sessions@1.9.24 - - @0xsequence/signhub@1.9.24 - - @0xsequence/utils@1.9.24 - - @0xsequence/wallet@1.9.24 - -## 1.9.23 - -### Patch Changes - -- update api client bindings -- Updated dependencies - - @0xsequence/abi@1.9.23 - - @0xsequence/account@1.9.23 - - @0xsequence/api@1.9.23 - - @0xsequence/core@1.9.23 - - @0xsequence/indexer@1.9.23 - - @0xsequence/metadata@1.9.23 - - @0xsequence/migration@1.9.23 - - @0xsequence/network@1.9.23 - - @0xsequence/sessions@1.9.23 - - @0xsequence/signhub@1.9.23 - - @0xsequence/utils@1.9.23 - - @0xsequence/wallet@1.9.23 - -## 1.9.22 - -### Patch Changes - -- update metadata client bindings -- Updated dependencies - - @0xsequence/abi@1.9.22 - - @0xsequence/account@1.9.22 - - @0xsequence/api@1.9.22 - - @0xsequence/core@1.9.22 - - @0xsequence/indexer@1.9.22 - - @0xsequence/metadata@1.9.22 - - @0xsequence/migration@1.9.22 - - @0xsequence/network@1.9.22 - - @0xsequence/sessions@1.9.22 - - @0xsequence/signhub@1.9.22 - - @0xsequence/utils@1.9.22 - - @0xsequence/wallet@1.9.22 - -## 1.9.21 - -### Patch Changes - -- api client bindings -- Updated dependencies - - @0xsequence/abi@1.9.21 - - @0xsequence/account@1.9.21 - - @0xsequence/api@1.9.21 - - @0xsequence/core@1.9.21 - - @0xsequence/indexer@1.9.21 - - @0xsequence/metadata@1.9.21 - - @0xsequence/migration@1.9.21 - - @0xsequence/network@1.9.21 - - @0xsequence/sessions@1.9.21 - - @0xsequence/signhub@1.9.21 - - @0xsequence/utils@1.9.21 - - @0xsequence/wallet@1.9.21 - -## 1.9.20 - -### Patch Changes - -- api client bindings update -- Updated dependencies - - @0xsequence/abi@1.9.20 - - @0xsequence/account@1.9.20 - - @0xsequence/api@1.9.20 - - @0xsequence/core@1.9.20 - - @0xsequence/indexer@1.9.20 - - @0xsequence/metadata@1.9.20 - - @0xsequence/migration@1.9.20 - - @0xsequence/network@1.9.20 - - @0xsequence/sessions@1.9.20 - - @0xsequence/signhub@1.9.20 - - @0xsequence/utils@1.9.20 - - @0xsequence/wallet@1.9.20 - -## 1.9.19 - -### Patch Changes - -- waas update -- Updated dependencies - - @0xsequence/abi@1.9.19 - - @0xsequence/account@1.9.19 - - @0xsequence/api@1.9.19 - - @0xsequence/core@1.9.19 - - @0xsequence/indexer@1.9.19 - - @0xsequence/metadata@1.9.19 - - @0xsequence/migration@1.9.19 - - @0xsequence/network@1.9.19 - - @0xsequence/sessions@1.9.19 - - @0xsequence/signhub@1.9.19 - - @0xsequence/utils@1.9.19 - - @0xsequence/wallet@1.9.19 - -## 1.9.18 - -### Patch Changes - -- provider: prohibit dangerous functions -- Updated dependencies - - @0xsequence/abi@1.9.18 - - @0xsequence/account@1.9.18 - - @0xsequence/api@1.9.18 - - @0xsequence/core@1.9.18 - - @0xsequence/indexer@1.9.18 - - @0xsequence/metadata@1.9.18 - - @0xsequence/migration@1.9.18 - - @0xsequence/network@1.9.18 - - @0xsequence/sessions@1.9.18 - - @0xsequence/signhub@1.9.18 - - @0xsequence/utils@1.9.18 - - @0xsequence/wallet@1.9.18 - -## 1.9.17 - -### Patch Changes - -- network: add xr-sepolia -- Updated dependencies - - @0xsequence/network@1.9.17 - - @0xsequence/abi@1.9.17 - - @0xsequence/account@1.9.17 - - @0xsequence/api@1.9.17 - - @0xsequence/core@1.9.17 - - @0xsequence/indexer@1.9.17 - - @0xsequence/metadata@1.9.17 - - @0xsequence/migration@1.9.17 - - @0xsequence/sessions@1.9.17 - - @0xsequence/signhub@1.9.17 - - @0xsequence/utils@1.9.17 - - @0xsequence/wallet@1.9.17 - -## 1.9.16 - -### Patch Changes - -- waas: sequence.feeOptions -- Updated dependencies - - @0xsequence/abi@1.9.16 - - @0xsequence/account@1.9.16 - - @0xsequence/api@1.9.16 - - @0xsequence/core@1.9.16 - - @0xsequence/indexer@1.9.16 - - @0xsequence/metadata@1.9.16 - - @0xsequence/migration@1.9.16 - - @0xsequence/network@1.9.16 - - @0xsequence/sessions@1.9.16 - - @0xsequence/signhub@1.9.16 - - @0xsequence/utils@1.9.16 - - @0xsequence/wallet@1.9.16 - -## 1.9.15 - -### Patch Changes - -- metadata: collection external_link field name fix -- Updated dependencies - - @0xsequence/abi@1.9.15 - - @0xsequence/account@1.9.15 - - @0xsequence/api@1.9.15 - - @0xsequence/core@1.9.15 - - @0xsequence/indexer@1.9.15 - - @0xsequence/metadata@1.9.15 - - @0xsequence/migration@1.9.15 - - @0xsequence/network@1.9.15 - - @0xsequence/sessions@1.9.15 - - @0xsequence/signhub@1.9.15 - - @0xsequence/utils@1.9.15 - - @0xsequence/wallet@1.9.15 - -## 1.9.14 - -### Patch Changes - -- network: astar-zkatana -> astar-zkyoto -- network: deprecate polygon mumbai network -- network: add xai and polygon amoy -- Updated dependencies -- Updated dependencies -- Updated dependencies - - @0xsequence/abi@1.9.14 - - @0xsequence/account@1.9.14 - - @0xsequence/api@1.9.14 - - @0xsequence/core@1.9.14 - - @0xsequence/indexer@1.9.14 - - @0xsequence/metadata@1.9.14 - - @0xsequence/migration@1.9.14 - - @0xsequence/network@1.9.14 - - @0xsequence/sessions@1.9.14 - - @0xsequence/signhub@1.9.14 - - @0xsequence/utils@1.9.14 - - @0xsequence/wallet@1.9.14 - -## 1.9.13 - -### Patch Changes - -- waas: fix @0xsequence/network dependency -- Updated dependencies - - @0xsequence/abi@1.9.13 - - @0xsequence/account@1.9.13 - - @0xsequence/api@1.9.13 - - @0xsequence/core@1.9.13 - - @0xsequence/indexer@1.9.13 - - @0xsequence/metadata@1.9.13 - - @0xsequence/migration@1.9.13 - - @0xsequence/network@1.9.13 - - @0xsequence/sessions@1.9.13 - - @0xsequence/signhub@1.9.13 - - @0xsequence/utils@1.9.13 - - @0xsequence/wallet@1.9.13 - -## 1.9.12 - -### Patch Changes - -- indexer: update rpc bindings -- provider: signMessage: Serialize the BytesLike or string message into hexstring before sending -- waas: SessionAuthProof -- Updated dependencies -- Updated dependencies -- Updated dependencies - - @0xsequence/abi@1.9.12 - - @0xsequence/account@1.9.12 - - @0xsequence/api@1.9.12 - - @0xsequence/core@1.9.12 - - @0xsequence/indexer@1.9.12 - - @0xsequence/metadata@1.9.12 - - @0xsequence/migration@1.9.12 - - @0xsequence/network@1.9.12 - - @0xsequence/sessions@1.9.12 - - @0xsequence/signhub@1.9.12 - - @0xsequence/utils@1.9.12 - - @0xsequence/wallet@1.9.12 - -## 1.9.11 - -### Patch Changes - -- metdata, update rpc bindings -- Updated dependencies - - @0xsequence/abi@1.9.11 - - @0xsequence/account@1.9.11 - - @0xsequence/api@1.9.11 - - @0xsequence/core@1.9.11 - - @0xsequence/indexer@1.9.11 - - @0xsequence/metadata@1.9.11 - - @0xsequence/migration@1.9.11 - - @0xsequence/network@1.9.11 - - @0xsequence/sessions@1.9.11 - - @0xsequence/signhub@1.9.11 - - @0xsequence/utils@1.9.11 - - @0xsequence/wallet@1.9.11 - -## 1.9.10 - -### Patch Changes - -- update metadata rpc bindings -- Updated dependencies - - @0xsequence/abi@1.9.10 - - @0xsequence/account@1.9.10 - - @0xsequence/api@1.9.10 - - @0xsequence/core@1.9.10 - - @0xsequence/indexer@1.9.10 - - @0xsequence/metadata@1.9.10 - - @0xsequence/migration@1.9.10 - - @0xsequence/network@1.9.10 - - @0xsequence/sessions@1.9.10 - - @0xsequence/signhub@1.9.10 - - @0xsequence/utils@1.9.10 - - @0xsequence/wallet@1.9.10 - -## 1.9.9 - -### Patch Changes - -- metadata, add SequenceCollections rpc client -- Updated dependencies - - @0xsequence/abi@1.9.9 - - @0xsequence/account@1.9.9 - - @0xsequence/api@1.9.9 - - @0xsequence/core@1.9.9 - - @0xsequence/indexer@1.9.9 - - @0xsequence/metadata@1.9.9 - - @0xsequence/migration@1.9.9 - - @0xsequence/network@1.9.9 - - @0xsequence/sessions@1.9.9 - - @0xsequence/signhub@1.9.9 - - @0xsequence/utils@1.9.9 - - @0xsequence/wallet@1.9.9 - -## 1.9.8 - -### Patch Changes - -- waas client update -- Updated dependencies - - @0xsequence/abi@1.9.8 - - @0xsequence/account@1.9.8 - - @0xsequence/api@1.9.8 - - @0xsequence/core@1.9.8 - - @0xsequence/indexer@1.9.8 - - @0xsequence/metadata@1.9.8 - - @0xsequence/migration@1.9.8 - - @0xsequence/network@1.9.8 - - @0xsequence/sessions@1.9.8 - - @0xsequence/signhub@1.9.8 - - @0xsequence/utils@1.9.8 - - @0xsequence/wallet@1.9.8 - -## 1.9.7 - -### Patch Changes - -- update rpc client bindings for api, metadata and relayer -- Updated dependencies - - @0xsequence/abi@1.9.7 - - @0xsequence/account@1.9.7 - - @0xsequence/api@1.9.7 - - @0xsequence/core@1.9.7 - - @0xsequence/indexer@1.9.7 - - @0xsequence/metadata@1.9.7 - - @0xsequence/migration@1.9.7 - - @0xsequence/network@1.9.7 - - @0xsequence/sessions@1.9.7 - - @0xsequence/signhub@1.9.7 - - @0xsequence/utils@1.9.7 - - @0xsequence/wallet@1.9.7 - -## 1.9.6 - -### Patch Changes - -- waas package update -- Updated dependencies - - @0xsequence/abi@1.9.6 - - @0xsequence/account@1.9.6 - - @0xsequence/api@1.9.6 - - @0xsequence/core@1.9.6 - - @0xsequence/indexer@1.9.6 - - @0xsequence/metadata@1.9.6 - - @0xsequence/migration@1.9.6 - - @0xsequence/network@1.9.6 - - @0xsequence/sessions@1.9.6 - - @0xsequence/signhub@1.9.6 - - @0xsequence/utils@1.9.6 - - @0xsequence/wallet@1.9.6 - -## 1.9.5 - -### Patch Changes - -- RpcRelayer prioritize project access key -- Updated dependencies - - @0xsequence/abi@1.9.5 - - @0xsequence/account@1.9.5 - - @0xsequence/api@1.9.5 - - @0xsequence/core@1.9.5 - - @0xsequence/indexer@1.9.5 - - @0xsequence/metadata@1.9.5 - - @0xsequence/migration@1.9.5 - - @0xsequence/network@1.9.5 - - @0xsequence/sessions@1.9.5 - - @0xsequence/signhub@1.9.5 - - @0xsequence/utils@1.9.5 - - @0xsequence/wallet@1.9.5 - -## 1.9.4 - -### Patch Changes - -- waas: fix network dependency -- Updated dependencies - - @0xsequence/abi@1.9.4 - - @0xsequence/account@1.9.4 - - @0xsequence/api@1.9.4 - - @0xsequence/core@1.9.4 - - @0xsequence/indexer@1.9.4 - - @0xsequence/metadata@1.9.4 - - @0xsequence/migration@1.9.4 - - @0xsequence/network@1.9.4 - - @0xsequence/sessions@1.9.4 - - @0xsequence/signhub@1.9.4 - - @0xsequence/utils@1.9.4 - - @0xsequence/wallet@1.9.4 - -## 1.9.3 - -### Patch Changes - -- provider: don't append access key to RPC url if user has already provided it -- Updated dependencies - - @0xsequence/abi@1.9.3 - - @0xsequence/account@1.9.3 - - @0xsequence/api@1.9.3 - - @0xsequence/core@1.9.3 - - @0xsequence/indexer@1.9.3 - - @0xsequence/metadata@1.9.3 - - @0xsequence/migration@1.9.3 - - @0xsequence/network@1.9.3 - - @0xsequence/sessions@1.9.3 - - @0xsequence/signhub@1.9.3 - - @0xsequence/utils@1.9.3 - - @0xsequence/wallet@1.9.3 - -## 1.9.2 - -### Patch Changes - -- network: add xai-sepolia -- Updated dependencies - - @0xsequence/abi@1.9.2 - - @0xsequence/account@1.9.2 - - @0xsequence/api@1.9.2 - - @0xsequence/core@1.9.2 - - @0xsequence/indexer@1.9.2 - - @0xsequence/metadata@1.9.2 - - @0xsequence/migration@1.9.2 - - @0xsequence/network@1.9.2 - - @0xsequence/sessions@1.9.2 - - @0xsequence/signhub@1.9.2 - - @0xsequence/utils@1.9.2 - - @0xsequence/wallet@1.9.2 - -## 1.9.1 - -### Patch Changes - -- analytics fix -- Updated dependencies - - @0xsequence/abi@1.9.1 - - @0xsequence/account@1.9.1 - - @0xsequence/api@1.9.1 - - @0xsequence/core@1.9.1 - - @0xsequence/indexer@1.9.1 - - @0xsequence/metadata@1.9.1 - - @0xsequence/migration@1.9.1 - - @0xsequence/network@1.9.1 - - @0xsequence/sessions@1.9.1 - - @0xsequence/signhub@1.9.1 - - @0xsequence/utils@1.9.1 - - @0xsequence/wallet@1.9.1 - -## 1.9.0 - -### Minor Changes - -- waas release - -### Patch Changes - -- Updated dependencies - - @0xsequence/abi@1.9.0 - - @0xsequence/account@1.9.0 - - @0xsequence/api@1.9.0 - - @0xsequence/core@1.9.0 - - @0xsequence/indexer@1.9.0 - - @0xsequence/metadata@1.9.0 - - @0xsequence/migration@1.9.0 - - @0xsequence/network@1.9.0 - - @0xsequence/sessions@1.9.0 - - @0xsequence/signhub@1.9.0 - - @0xsequence/utils@1.9.0 - - @0xsequence/wallet@1.9.0 - -## 1.8.8 - -### Patch Changes - -- update metadata bindings -- Updated dependencies - - @0xsequence/abi@1.8.8 - - @0xsequence/account@1.8.8 - - @0xsequence/api@1.8.8 - - @0xsequence/core@1.8.8 - - @0xsequence/indexer@1.8.8 - - @0xsequence/metadata@1.8.8 - - @0xsequence/migration@1.8.8 - - @0xsequence/network@1.8.8 - - @0xsequence/sessions@1.8.8 - - @0xsequence/signhub@1.8.8 - - @0xsequence/utils@1.8.8 - - @0xsequence/wallet@1.8.8 - -## 1.8.7 - -### Patch Changes - -- provider: update databeat to 0.9.1 -- Updated dependencies - - @0xsequence/abi@1.8.7 - - @0xsequence/account@1.8.7 - - @0xsequence/api@1.8.7 - - @0xsequence/core@1.8.7 - - @0xsequence/indexer@1.8.7 - - @0xsequence/metadata@1.8.7 - - @0xsequence/migration@1.8.7 - - @0xsequence/network@1.8.7 - - @0xsequence/sessions@1.8.7 - - @0xsequence/signhub@1.8.7 - - @0xsequence/utils@1.8.7 - - @0xsequence/wallet@1.8.7 - -## 1.8.6 - -### Patch Changes - -- guard: SignedOwnershipProof -- Updated dependencies - - @0xsequence/abi@1.8.6 - - @0xsequence/account@1.8.6 - - @0xsequence/api@1.8.6 - - @0xsequence/core@1.8.6 - - @0xsequence/indexer@1.8.6 - - @0xsequence/metadata@1.8.6 - - @0xsequence/migration@1.8.6 - - @0xsequence/network@1.8.6 - - @0xsequence/sessions@1.8.6 - - @0xsequence/signhub@1.8.6 - - @0xsequence/utils@1.8.6 - - @0xsequence/wallet@1.8.6 - -## 1.8.5 - -### Patch Changes - -- guard: signOwnershipProof and isSignedOwnershipProof -- Updated dependencies - - @0xsequence/abi@1.8.5 - - @0xsequence/account@1.8.5 - - @0xsequence/api@1.8.5 - - @0xsequence/core@1.8.5 - - @0xsequence/indexer@1.8.5 - - @0xsequence/metadata@1.8.5 - - @0xsequence/migration@1.8.5 - - @0xsequence/network@1.8.5 - - @0xsequence/sessions@1.8.5 - - @0xsequence/signhub@1.8.5 - - @0xsequence/utils@1.8.5 - - @0xsequence/wallet@1.8.5 - -## 1.8.4 - -### Patch Changes - -- network: add homeverse to networks list -- Updated dependencies - - @0xsequence/abi@1.8.4 - - @0xsequence/account@1.8.4 - - @0xsequence/api@1.8.4 - - @0xsequence/core@1.8.4 - - @0xsequence/indexer@1.8.4 - - @0xsequence/metadata@1.8.4 - - @0xsequence/migration@1.8.4 - - @0xsequence/network@1.8.4 - - @0xsequence/sessions@1.8.4 - - @0xsequence/signhub@1.8.4 - - @0xsequence/utils@1.8.4 - - @0xsequence/wallet@1.8.4 - -## 1.8.3 - -### Patch Changes - -- api: introduce basic linked wallet support -- Updated dependencies - - @0xsequence/abi@1.8.3 - - @0xsequence/account@1.8.3 - - @0xsequence/api@1.8.3 - - @0xsequence/core@1.8.3 - - @0xsequence/indexer@1.8.3 - - @0xsequence/metadata@1.8.3 - - @0xsequence/migration@1.8.3 - - @0xsequence/network@1.8.3 - - @0xsequence/sessions@1.8.3 - - @0xsequence/signhub@1.8.3 - - @0xsequence/utils@1.8.3 - - @0xsequence/wallet@1.8.3 - -## 1.8.2 - -### Patch Changes - -- provider: don't initialize analytics unless explicitly requested -- Updated dependencies - - @0xsequence/abi@1.8.2 - - @0xsequence/account@1.8.2 - - @0xsequence/api@1.8.2 - - @0xsequence/core@1.8.2 - - @0xsequence/indexer@1.8.2 - - @0xsequence/metadata@1.8.2 - - @0xsequence/migration@1.8.2 - - @0xsequence/network@1.8.2 - - @0xsequence/sessions@1.8.2 - - @0xsequence/signhub@1.8.2 - - @0xsequence/utils@1.8.2 - - @0xsequence/wallet@1.8.2 - -## 1.8.1 - -### Patch Changes - -- update to analytics provider -- Updated dependencies - - @0xsequence/abi@1.8.1 - - @0xsequence/account@1.8.1 - - @0xsequence/api@1.8.1 - - @0xsequence/core@1.8.1 - - @0xsequence/indexer@1.8.1 - - @0xsequence/metadata@1.8.1 - - @0xsequence/migration@1.8.1 - - @0xsequence/network@1.8.1 - - @0xsequence/sessions@1.8.1 - - @0xsequence/signhub@1.8.1 - - @0xsequence/utils@1.8.1 - - @0xsequence/wallet@1.8.1 - -## 1.8.0 - -### Minor Changes - -- provider: project analytics - -### Patch Changes - -- Updated dependencies - - @0xsequence/abi@1.8.0 - - @0xsequence/account@1.8.0 - - @0xsequence/api@1.8.0 - - @0xsequence/core@1.8.0 - - @0xsequence/indexer@1.8.0 - - @0xsequence/metadata@1.8.0 - - @0xsequence/migration@1.8.0 - - @0xsequence/network@1.8.0 - - @0xsequence/sessions@1.8.0 - - @0xsequence/signhub@1.8.0 - - @0xsequence/utils@1.8.0 - - @0xsequence/wallet@1.8.0 - -## 1.7.2 - -### Patch Changes - -- 0xsequence: ChainId should not be exported as a type -- account, wallet: fix nonce selection -- Updated dependencies -- Updated dependencies - - @0xsequence/abi@1.7.2 - - @0xsequence/account@1.7.2 - - @0xsequence/api@1.7.2 - - @0xsequence/core@1.7.2 - - @0xsequence/indexer@1.7.2 - - @0xsequence/metadata@1.7.2 - - @0xsequence/migration@1.7.2 - - @0xsequence/network@1.7.2 - - @0xsequence/sessions@1.7.2 - - @0xsequence/signhub@1.7.2 - - @0xsequence/utils@1.7.2 - - @0xsequence/wallet@1.7.2 - -## 1.7.1 - -### Patch Changes - -- network: add missing avalanche logoURI -- Updated dependencies - - @0xsequence/abi@1.7.1 - - @0xsequence/account@1.7.1 - - @0xsequence/api@1.7.1 - - @0xsequence/core@1.7.1 - - @0xsequence/indexer@1.7.1 - - @0xsequence/metadata@1.7.1 - - @0xsequence/migration@1.7.1 - - @0xsequence/network@1.7.1 - - @0xsequence/sessions@1.7.1 - - @0xsequence/signhub@1.7.1 - - @0xsequence/utils@1.7.1 - - @0xsequence/wallet@1.7.1 - -## 1.7.0 - -### Minor Changes - -- provider: projectAccessKey is now required - -### Patch Changes - -- network: add NetworkMetadata.logoURI property for all networks -- Updated dependencies -- Updated dependencies - - @0xsequence/abi@1.7.0 - - @0xsequence/account@1.7.0 - - @0xsequence/api@1.7.0 - - @0xsequence/core@1.7.0 - - @0xsequence/indexer@1.7.0 - - @0xsequence/metadata@1.7.0 - - @0xsequence/migration@1.7.0 - - @0xsequence/network@1.7.0 - - @0xsequence/sessions@1.7.0 - - @0xsequence/signhub@1.7.0 - - @0xsequence/utils@1.7.0 - - @0xsequence/wallet@1.7.0 - -## 1.6.3 - -### Patch Changes - -- network list update -- Updated dependencies - - @0xsequence/abi@1.6.3 - - @0xsequence/account@1.6.3 - - @0xsequence/api@1.6.3 - - @0xsequence/core@1.6.3 - - @0xsequence/indexer@1.6.3 - - @0xsequence/metadata@1.6.3 - - @0xsequence/migration@1.6.3 - - @0xsequence/network@1.6.3 - - @0xsequence/sessions@1.6.3 - - @0xsequence/signhub@1.6.3 - - @0xsequence/utils@1.6.3 - - @0xsequence/wallet@1.6.3 - -## 1.6.2 - -### Patch Changes - -- auth: projectAccessKey option -- wallet: use 12 bytes for random space -- Updated dependencies -- Updated dependencies - - @0xsequence/abi@1.6.2 - - @0xsequence/account@1.6.2 - - @0xsequence/api@1.6.2 - - @0xsequence/core@1.6.2 - - @0xsequence/indexer@1.6.2 - - @0xsequence/metadata@1.6.2 - - @0xsequence/migration@1.6.2 - - @0xsequence/network@1.6.2 - - @0xsequence/sessions@1.6.2 - - @0xsequence/signhub@1.6.2 - - @0xsequence/utils@1.6.2 - - @0xsequence/wallet@1.6.2 - -## 1.6.1 - -### Patch Changes - -- core: add simple config from subdigest support -- core: fix encode tree with subdigest -- account: implement buildOnChainSignature on Account -- Updated dependencies -- Updated dependencies -- Updated dependencies - - @0xsequence/abi@1.6.1 - - @0xsequence/account@1.6.1 - - @0xsequence/api@1.6.1 - - @0xsequence/core@1.6.1 - - @0xsequence/indexer@1.6.1 - - @0xsequence/metadata@1.6.1 - - @0xsequence/migration@1.6.1 - - @0xsequence/network@1.6.1 - - @0xsequence/sessions@1.6.1 - - @0xsequence/signhub@1.6.1 - - @0xsequence/utils@1.6.1 - - @0xsequence/wallet@1.6.1 - -## 1.6.0 - -### Minor Changes - -- account, wallet: parallel transactions by default - -### Patch Changes - -- provider: emit disconnect on sign out -- Updated dependencies -- Updated dependencies - - @0xsequence/abi@1.6.0 - - @0xsequence/account@1.6.0 - - @0xsequence/api@1.6.0 - - @0xsequence/core@1.6.0 - - @0xsequence/indexer@1.6.0 - - @0xsequence/metadata@1.6.0 - - @0xsequence/migration@1.6.0 - - @0xsequence/network@1.6.0 - - @0xsequence/sessions@1.6.0 - - @0xsequence/signhub@1.6.0 - - @0xsequence/utils@1.6.0 - - @0xsequence/wallet@1.6.0 - -## 1.5.0 - -### Minor Changes - -- signhub: add 'signing' signer status - -### Patch Changes - -- auth: Session.open: onAccountAddress callback -- account: allow empty transaction bundles -- Updated dependencies -- Updated dependencies -- Updated dependencies - - @0xsequence/abi@1.5.0 - - @0xsequence/account@1.5.0 - - @0xsequence/api@1.5.0 - - @0xsequence/core@1.5.0 - - @0xsequence/indexer@1.5.0 - - @0xsequence/metadata@1.5.0 - - @0xsequence/migration@1.5.0 - - @0xsequence/network@1.5.0 - - @0xsequence/sessions@1.5.0 - - @0xsequence/signhub@1.5.0 - - @0xsequence/utils@1.5.0 - - @0xsequence/wallet@1.5.0 - -## 1.4.9 - -### Patch Changes - -- rename SequenceMetadataClient to SequenceMetadata -- Updated dependencies - - @0xsequence/abi@1.4.9 - - @0xsequence/account@1.4.9 - - @0xsequence/api@1.4.9 - - @0xsequence/core@1.4.9 - - @0xsequence/indexer@1.4.9 - - @0xsequence/metadata@1.4.9 - - @0xsequence/migration@1.4.9 - - @0xsequence/network@1.4.9 - - @0xsequence/sessions@1.4.9 - - @0xsequence/signhub@1.4.9 - - @0xsequence/utils@1.4.9 - - @0xsequence/wallet@1.4.9 - -## 1.4.8 - -### Patch Changes - -- account: Account.getSigners -- Updated dependencies - - @0xsequence/abi@1.4.8 - - @0xsequence/account@1.4.8 - - @0xsequence/api@1.4.8 - - @0xsequence/core@1.4.8 - - @0xsequence/indexer@1.4.8 - - @0xsequence/metadata@1.4.8 - - @0xsequence/migration@1.4.8 - - @0xsequence/network@1.4.8 - - @0xsequence/sessions@1.4.8 - - @0xsequence/signhub@1.4.8 - - @0xsequence/utils@1.4.8 - - @0xsequence/wallet@1.4.8 - -## 1.4.7 - -### Patch Changes - -- update indexer client bindings -- Updated dependencies - - @0xsequence/abi@1.4.7 - - @0xsequence/account@1.4.7 - - @0xsequence/api@1.4.7 - - @0xsequence/core@1.4.7 - - @0xsequence/indexer@1.4.7 - - @0xsequence/metadata@1.4.7 - - @0xsequence/migration@1.4.7 - - @0xsequence/network@1.4.7 - - @0xsequence/sessions@1.4.7 - - @0xsequence/signhub@1.4.7 - - @0xsequence/utils@1.4.7 - - @0xsequence/wallet@1.4.7 - -## 1.4.6 - -### Patch Changes - -- - add sepolia networks, mark goerli as deprecated - - update indexer client bindings -- Updated dependencies - - @0xsequence/abi@1.4.6 - - @0xsequence/account@1.4.6 - - @0xsequence/api@1.4.6 - - @0xsequence/core@1.4.6 - - @0xsequence/indexer@1.4.6 - - @0xsequence/metadata@1.4.6 - - @0xsequence/migration@1.4.6 - - @0xsequence/network@1.4.6 - - @0xsequence/sessions@1.4.6 - - @0xsequence/signhub@1.4.6 - - @0xsequence/utils@1.4.6 - - @0xsequence/wallet@1.4.6 - -## 1.4.5 - -### Patch Changes - -- indexer/metadata: update client bindings -- auth: selectWallet with new address -- Updated dependencies -- Updated dependencies - - @0xsequence/abi@1.4.5 - - @0xsequence/account@1.4.5 - - @0xsequence/api@1.4.5 - - @0xsequence/core@1.4.5 - - @0xsequence/indexer@1.4.5 - - @0xsequence/metadata@1.4.5 - - @0xsequence/migration@1.4.5 - - @0xsequence/network@1.4.5 - - @0xsequence/sessions@1.4.5 - - @0xsequence/signhub@1.4.5 - - @0xsequence/utils@1.4.5 - - @0xsequence/wallet@1.4.5 - -## 1.4.4 - -### Patch Changes - -- indexer: update bindings -- auth: handle jwt expiry -- Updated dependencies -- Updated dependencies - - @0xsequence/abi@1.4.4 - - @0xsequence/account@1.4.4 - - @0xsequence/api@1.4.4 - - @0xsequence/core@1.4.4 - - @0xsequence/indexer@1.4.4 - - @0xsequence/metadata@1.4.4 - - @0xsequence/migration@1.4.4 - - @0xsequence/network@1.4.4 - - @0xsequence/sessions@1.4.4 - - @0xsequence/signhub@1.4.4 - - @0xsequence/utils@1.4.4 - - @0xsequence/wallet@1.4.4 - -## 1.4.3 - -### Patch Changes - -- guard: return active status from GuardSigner.getAuthMethods -- Updated dependencies - - @0xsequence/abi@1.4.3 - - @0xsequence/account@1.4.3 - - @0xsequence/api@1.4.3 - - @0xsequence/core@1.4.3 - - @0xsequence/indexer@1.4.3 - - @0xsequence/metadata@1.4.3 - - @0xsequence/migration@1.4.3 - - @0xsequence/network@1.4.3 - - @0xsequence/sessions@1.4.3 - - @0xsequence/signhub@1.4.3 - - @0xsequence/utils@1.4.3 - - @0xsequence/wallet@1.4.3 - -## 1.4.2 - -### Patch Changes - -- guard: update bindings -- Updated dependencies - - @0xsequence/abi@1.4.2 - - @0xsequence/account@1.4.2 - - @0xsequence/api@1.4.2 - - @0xsequence/core@1.4.2 - - @0xsequence/indexer@1.4.2 - - @0xsequence/metadata@1.4.2 - - @0xsequence/migration@1.4.2 - - @0xsequence/network@1.4.2 - - @0xsequence/sessions@1.4.2 - - @0xsequence/signhub@1.4.2 - - @0xsequence/utils@1.4.2 - - @0xsequence/wallet@1.4.2 - -## 1.4.1 - -### Patch Changes - -- network: remove unused networks -- signhub: orchestrator interface -- guard: auth methods interface -- guard: update bindings for pin and totp -- guard: no more retry logic -- Updated dependencies -- Updated dependencies -- Updated dependencies -- Updated dependencies -- Updated dependencies - - @0xsequence/abi@1.4.1 - - @0xsequence/account@1.4.1 - - @0xsequence/api@1.4.1 - - @0xsequence/core@1.4.1 - - @0xsequence/indexer@1.4.1 - - @0xsequence/metadata@1.4.1 - - @0xsequence/migration@1.4.1 - - @0xsequence/network@1.4.1 - - @0xsequence/sessions@1.4.1 - - @0xsequence/signhub@1.4.1 - - @0xsequence/utils@1.4.1 - - @0xsequence/wallet@1.4.1 - -## 1.4.0 - -### Minor Changes - -- project access key support - -### Patch Changes - -- Updated dependencies - - @0xsequence/abi@1.4.0 - - @0xsequence/account@1.4.0 - - @0xsequence/api@1.4.0 - - @0xsequence/core@1.4.0 - - @0xsequence/indexer@1.4.0 - - @0xsequence/metadata@1.4.0 - - @0xsequence/migration@1.4.0 - - @0xsequence/network@1.4.0 - - @0xsequence/sessions@1.4.0 - - @0xsequence/signhub@1.4.0 - - @0xsequence/utils@1.4.0 - - @0xsequence/wallet@1.4.0 - -## 1.3.0 - -### Minor Changes - -- signhub: account children - -### Patch Changes - -- guard: do not throw when building deploy transaction -- network: snowtrace.io -> subnets.avax.network/c-chain -- Updated dependencies -- Updated dependencies -- Updated dependencies - - @0xsequence/abi@1.3.0 - - @0xsequence/account@1.3.0 - - @0xsequence/api@1.3.0 - - @0xsequence/core@1.3.0 - - @0xsequence/indexer@1.3.0 - - @0xsequence/metadata@1.3.0 - - @0xsequence/migration@1.3.0 - - @0xsequence/network@1.3.0 - - @0xsequence/sessions@1.3.0 - - @0xsequence/signhub@1.3.0 - - @0xsequence/utils@1.3.0 - - @0xsequence/wallet@1.3.0 - -## 1.2.9 - -### Patch Changes - -- account: AccountSigner.sendTransaction simulateForFeeOptions -- relayer: update bindings -- Updated dependencies -- Updated dependencies - - @0xsequence/abi@1.2.9 - - @0xsequence/account@1.2.9 - - @0xsequence/api@1.2.9 - - @0xsequence/core@1.2.9 - - @0xsequence/indexer@1.2.9 - - @0xsequence/metadata@1.2.9 - - @0xsequence/migration@1.2.9 - - @0xsequence/network@1.2.9 - - @0xsequence/sessions@1.2.9 - - @0xsequence/signhub@1.2.9 - - @0xsequence/utils@1.2.9 - - @0xsequence/wallet@1.2.9 - -## 1.2.8 - -### Patch Changes - -- rename X-Sequence-Token-Key header to X-Access-Key -- Updated dependencies - - @0xsequence/abi@1.2.8 - - @0xsequence/account@1.2.8 - - @0xsequence/api@1.2.8 - - @0xsequence/core@1.2.8 - - @0xsequence/indexer@1.2.8 - - @0xsequence/metadata@1.2.8 - - @0xsequence/migration@1.2.8 - - @0xsequence/network@1.2.8 - - @0xsequence/sessions@1.2.8 - - @0xsequence/signhub@1.2.8 - - @0xsequence/utils@1.2.8 - - @0xsequence/wallet@1.2.8 - -## 1.2.7 - -### Patch Changes - -- add x-sequence-token-key to clients -- Updated dependencies - - @0xsequence/abi@1.2.7 - - @0xsequence/account@1.2.7 - - @0xsequence/api@1.2.7 - - @0xsequence/core@1.2.7 - - @0xsequence/indexer@1.2.7 - - @0xsequence/metadata@1.2.7 - - @0xsequence/migration@1.2.7 - - @0xsequence/network@1.2.7 - - @0xsequence/sessions@1.2.7 - - @0xsequence/signhub@1.2.7 - - @0xsequence/utils@1.2.7 - - @0xsequence/wallet@1.2.7 - -## 1.2.6 - -### Patch Changes - -- Fix bind multicall provider -- Updated dependencies - - @0xsequence/abi@1.2.6 - - @0xsequence/account@1.2.6 - - @0xsequence/api@1.2.6 - - @0xsequence/core@1.2.6 - - @0xsequence/indexer@1.2.6 - - @0xsequence/metadata@1.2.6 - - @0xsequence/migration@1.2.6 - - @0xsequence/network@1.2.6 - - @0xsequence/sessions@1.2.6 - - @0xsequence/signhub@1.2.6 - - @0xsequence/utils@1.2.6 - - @0xsequence/wallet@1.2.6 - -## 1.2.5 - -### Patch Changes - -- Multicall default configuration fixes -- Updated dependencies - - @0xsequence/abi@1.2.5 - - @0xsequence/account@1.2.5 - - @0xsequence/api@1.2.5 - - @0xsequence/core@1.2.5 - - @0xsequence/indexer@1.2.5 - - @0xsequence/metadata@1.2.5 - - @0xsequence/migration@1.2.5 - - @0xsequence/network@1.2.5 - - @0xsequence/sessions@1.2.5 - - @0xsequence/signhub@1.2.5 - - @0xsequence/utils@1.2.5 - - @0xsequence/wallet@1.2.5 - -## 1.2.4 - -### Patch Changes - -- provider: Adding missing payment provider types to PaymentProviderOption -- provider: WalletRequestHandler.notifyChainChanged -- Updated dependencies -- Updated dependencies - - @0xsequence/abi@1.2.4 - - @0xsequence/account@1.2.4 - - @0xsequence/api@1.2.4 - - @0xsequence/core@1.2.4 - - @0xsequence/indexer@1.2.4 - - @0xsequence/metadata@1.2.4 - - @0xsequence/migration@1.2.4 - - @0xsequence/network@1.2.4 - - @0xsequence/sessions@1.2.4 - - @0xsequence/signhub@1.2.4 - - @0xsequence/utils@1.2.4 - - @0xsequence/wallet@1.2.4 - -## 1.2.3 - -### Patch Changes - -- auth, provider: connect to accept optional authorizeNonce -- Updated dependencies - - @0xsequence/abi@1.2.3 - - @0xsequence/account@1.2.3 - - @0xsequence/api@1.2.3 - - @0xsequence/core@1.2.3 - - @0xsequence/indexer@1.2.3 - - @0xsequence/metadata@1.2.3 - - @0xsequence/migration@1.2.3 - - @0xsequence/network@1.2.3 - - @0xsequence/sessions@1.2.3 - - @0xsequence/signhub@1.2.3 - - @0xsequence/utils@1.2.3 - - @0xsequence/wallet@1.2.3 - -## 1.2.2 - -### Patch Changes - -- provider: allow createContract calls -- core: check for explicit zero address in contract deployments -- Updated dependencies -- Updated dependencies - - @0xsequence/abi@1.2.2 - - @0xsequence/account@1.2.2 - - @0xsequence/api@1.2.2 - - @0xsequence/core@1.2.2 - - @0xsequence/indexer@1.2.2 - - @0xsequence/metadata@1.2.2 - - @0xsequence/migration@1.2.2 - - @0xsequence/network@1.2.2 - - @0xsequence/sessions@1.2.2 - - @0xsequence/signhub@1.2.2 - - @0xsequence/utils@1.2.2 - - @0xsequence/wallet@1.2.2 - -## 1.2.1 - -### Patch Changes - -- auth: use sequence api chain id as reference chain id if available -- Updated dependencies - - @0xsequence/abi@1.2.1 - - @0xsequence/account@1.2.1 - - @0xsequence/api@1.2.1 - - @0xsequence/core@1.2.1 - - @0xsequence/indexer@1.2.1 - - @0xsequence/metadata@1.2.1 - - @0xsequence/migration@1.2.1 - - @0xsequence/network@1.2.1 - - @0xsequence/sessions@1.2.1 - - @0xsequence/signhub@1.2.1 - - @0xsequence/utils@1.2.1 - - @0xsequence/wallet@1.2.1 - -## 1.2.0 - -### Minor Changes - -- split services from session, better local support - -### Patch Changes - -- Updated dependencies - - @0xsequence/abi@1.2.0 - - @0xsequence/account@1.2.0 - - @0xsequence/api@1.2.0 - - @0xsequence/core@1.2.0 - - @0xsequence/indexer@1.2.0 - - @0xsequence/metadata@1.2.0 - - @0xsequence/migration@1.2.0 - - @0xsequence/network@1.2.0 - - @0xsequence/sessions@1.2.0 - - @0xsequence/signhub@1.2.0 - - @0xsequence/utils@1.2.0 - - @0xsequence/wallet@1.2.0 - -## 1.1.15 - -### Patch Changes - -- guard: remove error filtering -- Updated dependencies - - @0xsequence/abi@1.1.15 - - @0xsequence/account@1.1.15 - - @0xsequence/api@1.1.15 - - @0xsequence/core@1.1.15 - - @0xsequence/indexer@1.1.15 - - @0xsequence/metadata@1.1.15 - - @0xsequence/migration@1.1.15 - - @0xsequence/network@1.1.15 - - @0xsequence/sessions@1.1.15 - - @0xsequence/signhub@1.1.15 - - @0xsequence/utils@1.1.15 - - @0xsequence/wallet@1.1.15 - -## 1.1.14 - -### Patch Changes - -- guard: add GuardSigner.onError -- Updated dependencies - - @0xsequence/abi@1.1.14 - - @0xsequence/account@1.1.14 - - @0xsequence/api@1.1.14 - - @0xsequence/core@1.1.14 - - @0xsequence/indexer@1.1.14 - - @0xsequence/metadata@1.1.14 - - @0xsequence/migration@1.1.14 - - @0xsequence/network@1.1.14 - - @0xsequence/sessions@1.1.14 - - @0xsequence/signhub@1.1.14 - - @0xsequence/utils@1.1.14 - - @0xsequence/wallet@1.1.14 - -## 1.1.13 - -### Patch Changes - -- provider: pass client version with connect options -- provider: removing large from BannerSize -- Updated dependencies -- Updated dependencies - - @0xsequence/abi@1.1.13 - - @0xsequence/account@1.1.13 - - @0xsequence/api@1.1.13 - - @0xsequence/core@1.1.13 - - @0xsequence/indexer@1.1.13 - - @0xsequence/metadata@1.1.13 - - @0xsequence/migration@1.1.13 - - @0xsequence/network@1.1.13 - - @0xsequence/sessions@1.1.13 - - @0xsequence/signhub@1.1.13 - - @0xsequence/utils@1.1.13 - - @0xsequence/wallet@1.1.13 - -## 1.1.12 - -### Patch Changes - -- provider: adding bannerSize to ConnectOptions -- Updated dependencies - - @0xsequence/abi@1.1.12 - - @0xsequence/account@1.1.12 - - @0xsequence/api@1.1.12 - - @0xsequence/core@1.1.12 - - @0xsequence/indexer@1.1.12 - - @0xsequence/metadata@1.1.12 - - @0xsequence/migration@1.1.12 - - @0xsequence/network@1.1.12 - - @0xsequence/sessions@1.1.12 - - @0xsequence/signhub@1.1.12 - - @0xsequence/utils@1.1.12 - - @0xsequence/wallet@1.1.12 - -## 1.1.11 - -### Patch Changes - -- add homeverse configs -- Updated dependencies - - @0xsequence/abi@1.1.11 - - @0xsequence/account@1.1.11 - - @0xsequence/api@1.1.11 - - @0xsequence/core@1.1.11 - - @0xsequence/indexer@1.1.11 - - @0xsequence/metadata@1.1.11 - - @0xsequence/migration@1.1.11 - - @0xsequence/network@1.1.11 - - @0xsequence/sessions@1.1.11 - - @0xsequence/signhub@1.1.11 - - @0xsequence/utils@1.1.11 - - @0xsequence/wallet@1.1.11 - -## 1.1.10 - -### Patch Changes - -- handle default EIP6492 on send -- Updated dependencies - - @0xsequence/abi@1.1.10 - - @0xsequence/account@1.1.10 - - @0xsequence/api@1.1.10 - - @0xsequence/core@1.1.10 - - @0xsequence/indexer@1.1.10 - - @0xsequence/metadata@1.1.10 - - @0xsequence/migration@1.1.10 - - @0xsequence/network@1.1.10 - - @0xsequence/sessions@1.1.10 - - @0xsequence/signhub@1.1.10 - - @0xsequence/utils@1.1.10 - - @0xsequence/wallet@1.1.10 - -## 1.1.9 - -### Patch Changes - -- Custom default EIP6492 on client -- Updated dependencies - - @0xsequence/abi@1.1.9 - - @0xsequence/account@1.1.9 - - @0xsequence/api@1.1.9 - - @0xsequence/core@1.1.9 - - @0xsequence/indexer@1.1.9 - - @0xsequence/metadata@1.1.9 - - @0xsequence/migration@1.1.9 - - @0xsequence/network@1.1.9 - - @0xsequence/sessions@1.1.9 - - @0xsequence/signhub@1.1.9 - - @0xsequence/utils@1.1.9 - - @0xsequence/wallet@1.1.9 - -## 1.1.8 - -### Patch Changes - -- metadata: searchMetadata: add types filter -- Updated dependencies - - @0xsequence/abi@1.1.8 - - @0xsequence/account@1.1.8 - - @0xsequence/api@1.1.8 - - @0xsequence/core@1.1.8 - - @0xsequence/indexer@1.1.8 - - @0xsequence/metadata@1.1.8 - - @0xsequence/migration@1.1.8 - - @0xsequence/network@1.1.8 - - @0xsequence/sessions@1.1.8 - - @0xsequence/signhub@1.1.8 - - @0xsequence/utils@1.1.8 - - @0xsequence/wallet@1.1.8 - -## 1.1.7 - -### Patch Changes - -- adding signInWith connect settings option to allow dapps to automatically login their users with a certain provider optimizing the normal authentication flow -- Updated dependencies - - @0xsequence/abi@1.1.7 - - @0xsequence/account@1.1.7 - - @0xsequence/api@1.1.7 - - @0xsequence/core@1.1.7 - - @0xsequence/indexer@1.1.7 - - @0xsequence/metadata@1.1.7 - - @0xsequence/migration@1.1.7 - - @0xsequence/network@1.1.7 - - @0xsequence/sessions@1.1.7 - - @0xsequence/signhub@1.1.7 - - @0xsequence/utils@1.1.7 - - @0xsequence/wallet@1.1.7 - -## 1.1.6 - -### Patch Changes - -- metadata: searchMetadata: add chainID and excludeTokenMetadata filters -- Updated dependencies - - @0xsequence/abi@1.1.6 - - @0xsequence/account@1.1.6 - - @0xsequence/api@1.1.6 - - @0xsequence/core@1.1.6 - - @0xsequence/indexer@1.1.6 - - @0xsequence/metadata@1.1.6 - - @0xsequence/migration@1.1.6 - - @0xsequence/network@1.1.6 - - @0xsequence/sessions@1.1.6 - - @0xsequence/signhub@1.1.6 - - @0xsequence/utils@1.1.6 - - @0xsequence/wallet@1.1.6 - -## 1.1.5 - -### Patch Changes - -- account: re-compute meta-transaction id for wallet deployment transactions -- Updated dependencies - - @0xsequence/abi@1.1.5 - - @0xsequence/account@1.1.5 - - @0xsequence/api@1.1.5 - - @0xsequence/core@1.1.5 - - @0xsequence/indexer@1.1.5 - - @0xsequence/metadata@1.1.5 - - @0xsequence/migration@1.1.5 - - @0xsequence/network@1.1.5 - - @0xsequence/sessions@1.1.5 - - @0xsequence/signhub@1.1.5 - - @0xsequence/utils@1.1.5 - - @0xsequence/wallet@1.1.5 - -## 1.1.4 - -### Patch Changes - -- network: rename base-mainnet to base -- provider: override isDefaultChain with ConnectOptions.networkId if provided -- Updated dependencies -- Updated dependencies - - @0xsequence/abi@1.1.4 - - @0xsequence/account@1.1.4 - - @0xsequence/api@1.1.4 - - @0xsequence/core@1.1.4 - - @0xsequence/indexer@1.1.4 - - @0xsequence/metadata@1.1.4 - - @0xsequence/migration@1.1.4 - - @0xsequence/network@1.1.4 - - @0xsequence/sessions@1.1.4 - - @0xsequence/signhub@1.1.4 - - @0xsequence/utils@1.1.4 - - @0xsequence/wallet@1.1.4 - -## 1.1.3 - -### Patch Changes - -- provider: use network id from transport session -- provider: sign authorization using ConnectOptions.networkId if provided -- Updated dependencies -- Updated dependencies - - @0xsequence/abi@1.1.3 - - @0xsequence/account@1.1.3 - - @0xsequence/api@1.1.3 - - @0xsequence/core@1.1.3 - - @0xsequence/indexer@1.1.3 - - @0xsequence/metadata@1.1.3 - - @0xsequence/migration@1.1.3 - - @0xsequence/network@1.1.3 - - @0xsequence/sessions@1.1.3 - - @0xsequence/signhub@1.1.3 - - @0xsequence/utils@1.1.3 - - @0xsequence/wallet@1.1.3 - -## 1.1.2 - -### Patch Changes - -- provider: jsonrpc chain id fixes -- Updated dependencies - - @0xsequence/abi@1.1.2 - - @0xsequence/account@1.1.2 - - @0xsequence/api@1.1.2 - - @0xsequence/core@1.1.2 - - @0xsequence/indexer@1.1.2 - - @0xsequence/metadata@1.1.2 - - @0xsequence/migration@1.1.2 - - @0xsequence/network@1.1.2 - - @0xsequence/sessions@1.1.2 - - @0xsequence/signhub@1.1.2 - - @0xsequence/utils@1.1.2 - - @0xsequence/wallet@1.1.2 - -## 1.1.1 - -### Patch Changes - -- network: add base mainnet and sepolia -- provider: reject toxic transaction requests -- Updated dependencies -- Updated dependencies - - @0xsequence/abi@1.1.1 - - @0xsequence/account@1.1.1 - - @0xsequence/api@1.1.1 - - @0xsequence/core@1.1.1 - - @0xsequence/indexer@1.1.1 - - @0xsequence/metadata@1.1.1 - - @0xsequence/migration@1.1.1 - - @0xsequence/network@1.1.1 - - @0xsequence/sessions@1.1.1 - - @0xsequence/signhub@1.1.1 - - @0xsequence/utils@1.1.1 - - @0xsequence/wallet@1.1.1 - -## 1.1.0 - -### Minor Changes - -- Refactor dapp facing provider - -### Patch Changes - -- Updated dependencies - - @0xsequence/abi@1.1.0 - - @0xsequence/account@1.1.0 - - @0xsequence/api@1.1.0 - - @0xsequence/core@1.1.0 - - @0xsequence/indexer@1.1.0 - - @0xsequence/metadata@1.1.0 - - @0xsequence/migration@1.1.0 - - @0xsequence/network@1.1.0 - - @0xsequence/sessions@1.1.0 - - @0xsequence/signhub@1.1.0 - - @0xsequence/utils@1.1.0 - - @0xsequence/wallet@1.1.0 - -## 1.0.5 - -### Patch Changes - -- network: export network constants -- guard: use the correct global for fetch -- network: nova-explorer.arbitrum.io -> nova.arbiscan.io -- Updated dependencies -- Updated dependencies -- Updated dependencies - - @0xsequence/abi@1.0.5 - - @0xsequence/account@1.0.5 - - @0xsequence/api@1.0.5 - - @0xsequence/core@1.0.5 - - @0xsequence/indexer@1.0.5 - - @0xsequence/metadata@1.0.5 - - @0xsequence/migration@1.0.5 - - @0xsequence/network@1.0.5 - - @0xsequence/sessions@1.0.5 - - @0xsequence/signhub@1.0.5 - - @0xsequence/utils@1.0.5 - - @0xsequence/wallet@1.0.5 - -## 1.0.4 - -### Patch Changes - -- provider: accept name or number for networkId -- Updated dependencies - - @0xsequence/abi@1.0.4 - - @0xsequence/account@1.0.4 - - @0xsequence/api@1.0.4 - - @0xsequence/core@1.0.4 - - @0xsequence/indexer@1.0.4 - - @0xsequence/metadata@1.0.4 - - @0xsequence/migration@1.0.4 - - @0xsequence/network@1.0.4 - - @0xsequence/sessions@1.0.4 - - @0xsequence/signhub@1.0.4 - - @0xsequence/utils@1.0.4 - - @0xsequence/wallet@1.0.4 - -## 1.0.3 - -### Patch Changes - -- Simpler isValidSignature helpers -- Updated dependencies - - @0xsequence/abi@1.0.3 - - @0xsequence/account@1.0.3 - - @0xsequence/api@1.0.3 - - @0xsequence/core@1.0.3 - - @0xsequence/indexer@1.0.3 - - @0xsequence/metadata@1.0.3 - - @0xsequence/migration@1.0.3 - - @0xsequence/network@1.0.3 - - @0xsequence/sessions@1.0.3 - - @0xsequence/signhub@1.0.3 - - @0xsequence/utils@1.0.3 - - @0xsequence/wallet@1.0.3 - -## 1.0.2 - -### Patch Changes - -- add extra signature validation utils methods -- Updated dependencies - - @0xsequence/abi@1.0.2 - - @0xsequence/account@1.0.2 - - @0xsequence/api@1.0.2 - - @0xsequence/core@1.0.2 - - @0xsequence/indexer@1.0.2 - - @0xsequence/metadata@1.0.2 - - @0xsequence/migration@1.0.2 - - @0xsequence/network@1.0.2 - - @0xsequence/sessions@1.0.2 - - @0xsequence/signhub@1.0.2 - - @0xsequence/utils@1.0.2 - - @0xsequence/wallet@1.0.2 - -## 1.0.1 - -### Patch Changes - -- add homeverse testnet -- Updated dependencies - - @0xsequence/abi@1.0.1 - - @0xsequence/account@1.0.1 - - @0xsequence/api@1.0.1 - - @0xsequence/core@1.0.1 - - @0xsequence/indexer@1.0.1 - - @0xsequence/metadata@1.0.1 - - @0xsequence/migration@1.0.1 - - @0xsequence/network@1.0.1 - - @0xsequence/sessions@1.0.1 - - @0xsequence/signhub@1.0.1 - - @0xsequence/utils@1.0.1 - - @0xsequence/wallet@1.0.1 - -## 1.0.0 - -### Major Changes - -- https://sequence.xyz/blog/sequence-wallet-light-state-sync-full-merkle-wallets - -### Patch Changes - -- Updated dependencies - - @0xsequence/abi@1.0.0 - - @0xsequence/account@1.0.0 - - @0xsequence/api@1.0.0 - - @0xsequence/core@1.0.0 - - @0xsequence/indexer@1.0.0 - - @0xsequence/metadata@1.0.0 - - @0xsequence/migration@1.0.0 - - @0xsequence/network@1.0.0 - - @0xsequence/sessions@1.0.0 - - @0xsequence/signhub@1.0.0 - - @0xsequence/utils@1.0.0 - - @0xsequence/wallet@1.0.0 - -## 0.43.34 - -### Patch Changes - -- auth: no jwt for indexer -- Updated dependencies - - @0xsequence/abi@0.43.34 - - @0xsequence/api@0.43.34 - - @0xsequence/config@0.43.34 - - @0xsequence/indexer@0.43.34 - - @0xsequence/metadata@0.43.34 - - @0xsequence/network@0.43.34 - - @0xsequence/provider@0.43.34 - - @0xsequence/utils@0.43.34 - - @0xsequence/wallet@0.43.34 - -## 0.43.33 - -### Patch Changes - -- Adding onConnectOptionsChange handler to WalletRequestHandler -- Updated dependencies - - @0xsequence/abi@0.43.33 - - @0xsequence/api@0.43.33 - - @0xsequence/config@0.43.33 - - @0xsequence/indexer@0.43.33 - - @0xsequence/metadata@0.43.33 - - @0xsequence/network@0.43.33 - - @0xsequence/provider@0.43.33 - - @0xsequence/utils@0.43.33 - - @0xsequence/wallet@0.43.33 - -## 0.43.32 - -### Patch Changes - -- add Base Goerli network -- Updated dependencies - - @0xsequence/abi@0.43.32 - - @0xsequence/api@0.43.32 - - @0xsequence/config@0.43.32 - - @0xsequence/indexer@0.43.32 - - @0xsequence/metadata@0.43.32 - - @0xsequence/network@0.43.32 - - @0xsequence/provider@0.43.32 - - @0xsequence/utils@0.43.32 - - @0xsequence/wallet@0.43.32 - -## 0.43.31 - -### Patch Changes - -- remove AuxDataProvider, add promptSignInConnect -- Updated dependencies - - @0xsequence/abi@0.43.31 - - @0xsequence/api@0.43.31 - - @0xsequence/config@0.43.31 - - @0xsequence/indexer@0.43.31 - - @0xsequence/metadata@0.43.31 - - @0xsequence/network@0.43.31 - - @0xsequence/provider@0.43.31 - - @0xsequence/utils@0.43.31 - - @0xsequence/wallet@0.43.31 - -## 0.43.30 - -### Patch Changes - -- add arbitrum goerli testnet -- Updated dependencies - - @0xsequence/abi@0.43.30 - - @0xsequence/api@0.43.30 - - @0xsequence/config@0.43.30 - - @0xsequence/indexer@0.43.30 - - @0xsequence/metadata@0.43.30 - - @0xsequence/network@0.43.30 - - @0xsequence/provider@0.43.30 - - @0xsequence/utils@0.43.30 - - @0xsequence/wallet@0.43.30 - -## 0.43.29 - -### Patch Changes - -- provider: check availability of window object -- Updated dependencies - - @0xsequence/abi@0.43.29 - - @0xsequence/api@0.43.29 - - @0xsequence/config@0.43.29 - - @0xsequence/indexer@0.43.29 - - @0xsequence/metadata@0.43.29 - - @0xsequence/network@0.43.29 - - @0xsequence/provider@0.43.29 - - @0xsequence/utils@0.43.29 - - @0xsequence/wallet@0.43.29 - -## 0.43.28 - -### Patch Changes - -- update api bindings -- Updated dependencies - - @0xsequence/abi@0.43.28 - - @0xsequence/api@0.43.28 - - @0xsequence/config@0.43.28 - - @0xsequence/indexer@0.43.28 - - @0xsequence/metadata@0.43.28 - - @0xsequence/network@0.43.28 - - @0xsequence/provider@0.43.28 - - @0xsequence/utils@0.43.28 - - @0xsequence/wallet@0.43.28 - -## 0.43.27 - -### Patch Changes - -- Add rpc is sequence method -- Updated dependencies - - @0xsequence/abi@0.43.27 - - @0xsequence/api@0.43.27 - - @0xsequence/config@0.43.27 - - @0xsequence/indexer@0.43.27 - - @0xsequence/metadata@0.43.27 - - @0xsequence/network@0.43.27 - - @0xsequence/provider@0.43.27 - - @0xsequence/utils@0.43.27 - - @0xsequence/wallet@0.43.27 - -## 0.43.26 - -### Patch Changes - -- add zkevm url to enum -- Updated dependencies - - @0xsequence/abi@0.43.26 - - @0xsequence/api@0.43.26 - - @0xsequence/config@0.43.26 - - @0xsequence/indexer@0.43.26 - - @0xsequence/metadata@0.43.26 - - @0xsequence/network@0.43.26 - - @0xsequence/provider@0.43.26 - - @0xsequence/utils@0.43.26 - - @0xsequence/wallet@0.43.26 - -## 0.43.25 - -### Patch Changes - -- added polygon zkevm to mainnet networks -- Updated dependencies - - @0xsequence/abi@0.43.25 - - @0xsequence/api@0.43.25 - - @0xsequence/config@0.43.25 - - @0xsequence/indexer@0.43.25 - - @0xsequence/metadata@0.43.25 - - @0xsequence/network@0.43.25 - - @0xsequence/provider@0.43.25 - - @0xsequence/utils@0.43.25 - - @0xsequence/wallet@0.43.25 - -## 0.43.24 - -### Patch Changes - -- name change from zkevm to polygon-zkevm -- Updated dependencies - - @0xsequence/abi@0.43.24 - - @0xsequence/api@0.43.24 - - @0xsequence/config@0.43.24 - - @0xsequence/indexer@0.43.24 - - @0xsequence/metadata@0.43.24 - - @0xsequence/network@0.43.24 - - @0xsequence/provider@0.43.24 - - @0xsequence/utils@0.43.24 - - @0xsequence/wallet@0.43.24 - -## 0.43.23 - -### Patch Changes - -- update zkEVM name to Polygon zkEVM -- Updated dependencies - - @0xsequence/abi@0.43.23 - - @0xsequence/api@0.43.23 - - @0xsequence/config@0.43.23 - - @0xsequence/indexer@0.43.23 - - @0xsequence/metadata@0.43.23 - - @0xsequence/network@0.43.23 - - @0xsequence/provider@0.43.23 - - @0xsequence/utils@0.43.23 - - @0xsequence/wallet@0.43.23 - -## 0.43.22 - -### Patch Changes - -- add zkevm chain -- Updated dependencies - - @0xsequence/abi@0.43.22 - - @0xsequence/api@0.43.22 - - @0xsequence/config@0.43.22 - - @0xsequence/indexer@0.43.22 - - @0xsequence/metadata@0.43.22 - - @0xsequence/network@0.43.22 - - @0xsequence/provider@0.43.22 - - @0xsequence/utils@0.43.22 - - @0xsequence/wallet@0.43.22 - -## 0.43.21 - -### Patch Changes - -- api: update client bindings -- Updated dependencies - - @0xsequence/abi@0.43.21 - - @0xsequence/api@0.43.21 - - @0xsequence/config@0.43.21 - - @0xsequence/indexer@0.43.21 - - @0xsequence/metadata@0.43.21 - - @0xsequence/network@0.43.21 - - @0xsequence/provider@0.43.21 - - @0xsequence/utils@0.43.21 - - @0xsequence/wallet@0.43.21 - -## 0.43.20 - -### Patch Changes - -- indexer: update bindings -- Updated dependencies - - @0xsequence/abi@0.43.20 - - @0xsequence/api@0.43.20 - - @0xsequence/config@0.43.20 - - @0xsequence/indexer@0.43.20 - - @0xsequence/metadata@0.43.20 - - @0xsequence/network@0.43.20 - - @0xsequence/provider@0.43.20 - - @0xsequence/utils@0.43.20 - - @0xsequence/wallet@0.43.20 - -## 0.43.19 - -### Patch Changes - -- session proof update -- Updated dependencies - - @0xsequence/abi@0.43.19 - - @0xsequence/api@0.43.19 - - @0xsequence/config@0.43.19 - - @0xsequence/indexer@0.43.19 - - @0xsequence/metadata@0.43.19 - - @0xsequence/network@0.43.19 - - @0xsequence/provider@0.43.19 - - @0xsequence/utils@0.43.19 - - @0xsequence/wallet@0.43.19 - -## 0.43.18 - -### Patch Changes - -- rpc client global check, hardening -- Updated dependencies - - @0xsequence/abi@0.43.18 - - @0xsequence/api@0.43.18 - - @0xsequence/config@0.43.18 - - @0xsequence/indexer@0.43.18 - - @0xsequence/metadata@0.43.18 - - @0xsequence/network@0.43.18 - - @0xsequence/provider@0.43.18 - - @0xsequence/utils@0.43.18 - - @0xsequence/wallet@0.43.18 - -## 0.43.17 - -### Patch Changes - -- rpc clients, check of 'global' is defined -- Updated dependencies - - @0xsequence/abi@0.43.17 - - @0xsequence/api@0.43.17 - - @0xsequence/config@0.43.17 - - @0xsequence/indexer@0.43.17 - - @0xsequence/metadata@0.43.17 - - @0xsequence/network@0.43.17 - - @0xsequence/provider@0.43.17 - - @0xsequence/utils@0.43.17 - - @0xsequence/wallet@0.43.17 - -## 0.43.16 - -### Patch Changes - -- ethers peerDep to v5, update rpc client global use -- Updated dependencies - - @0xsequence/abi@0.43.16 - - @0xsequence/api@0.43.16 - - @0xsequence/config@0.43.16 - - @0xsequence/indexer@0.43.16 - - @0xsequence/metadata@0.43.16 - - @0xsequence/network@0.43.16 - - @0xsequence/provider@0.43.16 - - @0xsequence/utils@0.43.16 - - @0xsequence/wallet@0.43.16 - -## 0.43.15 - -### Patch Changes - -- - provider: expand receiver type on some util methods -- Updated dependencies - - @0xsequence/abi@0.43.15 - - @0xsequence/api@0.43.15 - - @0xsequence/config@0.43.15 - - @0xsequence/indexer@0.43.15 - - @0xsequence/metadata@0.43.15 - - @0xsequence/network@0.43.15 - - @0xsequence/provider@0.43.15 - - @0xsequence/utils@0.43.15 - - @0xsequence/wallet@0.43.15 - -## 0.43.14 - -### Patch Changes - -- bump -- Updated dependencies - - @0xsequence/abi@0.43.14 - - @0xsequence/api@0.43.14 - - @0xsequence/config@0.43.14 - - @0xsequence/indexer@0.43.14 - - @0xsequence/metadata@0.43.14 - - @0xsequence/network@0.43.14 - - @0xsequence/provider@0.43.14 - - @0xsequence/utils@0.43.14 - - @0xsequence/wallet@0.43.14 - -## 0.43.13 - -### Patch Changes - -- update rpc bindings -- Updated dependencies - - @0xsequence/abi@0.43.13 - - @0xsequence/api@0.43.13 - - @0xsequence/config@0.43.13 - - @0xsequence/indexer@0.43.13 - - @0xsequence/metadata@0.43.13 - - @0xsequence/network@0.43.13 - - @0xsequence/provider@0.43.13 - - @0xsequence/utils@0.43.13 - - @0xsequence/wallet@0.43.13 - -## 0.43.12 - -### Patch Changes - -- provider: single wallet init, and add new unregisterWallet() method -- Updated dependencies - - @0xsequence/abi@0.43.12 - - @0xsequence/api@0.43.12 - - @0xsequence/config@0.43.12 - - @0xsequence/indexer@0.43.12 - - @0xsequence/metadata@0.43.12 - - @0xsequence/network@0.43.12 - - @0xsequence/provider@0.43.12 - - @0xsequence/utils@0.43.12 - - @0xsequence/wallet@0.43.12 - -## 0.43.11 - -### Patch Changes - -- fix lockfiles -- re-add mocha type deleter -- Updated dependencies -- Updated dependencies - - @0xsequence/abi@0.43.11 - - @0xsequence/api@0.43.11 - - @0xsequence/config@0.43.11 - - @0xsequence/indexer@0.43.11 - - @0xsequence/metadata@0.43.11 - - @0xsequence/network@0.43.11 - - @0xsequence/provider@0.43.11 - - @0xsequence/utils@0.43.11 - - @0xsequence/wallet@0.43.11 - -## 0.43.10 - -### Patch Changes - -- various improvements -- Updated dependencies - - @0xsequence/abi@0.43.10 - - @0xsequence/api@0.43.10 - - @0xsequence/config@0.43.10 - - @0xsequence/indexer@0.43.10 - - @0xsequence/metadata@0.43.10 - - @0xsequence/network@0.43.10 - - @0xsequence/provider@0.43.10 - - @0xsequence/utils@0.43.10 - - @0xsequence/wallet@0.43.10 - -## 0.43.9 - -### Patch Changes - -- update deps -- Updated dependencies - - @0xsequence/abi@0.43.9 - - @0xsequence/api@0.43.9 - - @0xsequence/config@0.43.9 - - @0xsequence/indexer@0.43.9 - - @0xsequence/metadata@0.43.9 - - @0xsequence/network@0.43.9 - - @0xsequence/provider@0.43.9 - - @0xsequence/utils@0.43.9 - - @0xsequence/wallet@0.43.9 - -## 0.43.8 - -### Patch Changes - -- network: JsonRpcProvider with caching -- Updated dependencies - - @0xsequence/abi@0.43.8 - - @0xsequence/api@0.43.8 - - @0xsequence/config@0.43.8 - - @0xsequence/indexer@0.43.8 - - @0xsequence/metadata@0.43.8 - - @0xsequence/network@0.43.8 - - @0xsequence/provider@0.43.8 - - @0xsequence/utils@0.43.8 - - @0xsequence/wallet@0.43.8 - -## 0.43.7 - -### Patch Changes - -- provider: fix wallet network init -- Updated dependencies - - @0xsequence/abi@0.43.7 - - @0xsequence/api@0.43.7 - - @0xsequence/config@0.43.7 - - @0xsequence/indexer@0.43.7 - - @0xsequence/metadata@0.43.7 - - @0xsequence/network@0.43.7 - - @0xsequence/utils@0.43.7 - - @0xsequence/wallet@0.43.7 - -## 0.43.6 - -### Patch Changes - -- metadatata: update rpc bindings -- Updated dependencies - - @0xsequence/abi@0.43.6 - - @0xsequence/api@0.43.6 - - @0xsequence/config@0.43.6 - - @0xsequence/indexer@0.43.6 - - @0xsequence/metadata@0.43.6 - - @0xsequence/network@0.43.6 - - @0xsequence/utils@0.43.6 - - @0xsequence/wallet@0.43.6 - -## 0.43.5 - -### Patch Changes - -- provider: do not set default network for connect messages -- provider: forward missing error message -- Updated dependencies -- Updated dependencies - - @0xsequence/abi@0.43.5 - - @0xsequence/api@0.43.5 - - @0xsequence/config@0.43.5 - - @0xsequence/indexer@0.43.5 - - @0xsequence/metadata@0.43.5 - - @0xsequence/network@0.43.5 - - @0xsequence/utils@0.43.5 - - @0xsequence/wallet@0.43.5 - -## 0.43.4 - -### Patch Changes - -- no-change version bump to fix incorrectly tagged snapshot build -- Updated dependencies - - @0xsequence/abi@0.43.4 - - @0xsequence/api@0.43.4 - - @0xsequence/config@0.43.4 - - @0xsequence/indexer@0.43.4 - - @0xsequence/metadata@0.43.4 - - @0xsequence/network@0.43.4 - - @0xsequence/utils@0.43.4 - - @0xsequence/wallet@0.43.4 - -## 0.43.3 - -### Patch Changes - -- metadata: update bindings -- Updated dependencies - - @0xsequence/abi@0.43.3 - - @0xsequence/api@0.43.3 - - @0xsequence/config@0.43.3 - - @0xsequence/indexer@0.43.3 - - @0xsequence/metadata@0.43.3 - - @0xsequence/network@0.43.3 - - @0xsequence/utils@0.43.3 - - @0xsequence/wallet@0.43.3 - -## 0.43.2 - -### Patch Changes - -- provider: implement connectUnchecked -- Updated dependencies - - @0xsequence/abi@0.43.2 - - @0xsequence/api@0.43.2 - - @0xsequence/config@0.43.2 - - @0xsequence/indexer@0.43.2 - - @0xsequence/metadata@0.43.2 - - @0xsequence/network@0.43.2 - - @0xsequence/utils@0.43.2 - - @0xsequence/wallet@0.43.2 - -## 0.43.1 - -### Patch Changes - -- update to latest ethauth dep -- Updated dependencies - - @0xsequence/abi@0.43.1 - - @0xsequence/api@0.43.1 - - @0xsequence/config@0.43.1 - - @0xsequence/indexer@0.43.1 - - @0xsequence/metadata@0.43.1 - - @0xsequence/network@0.43.1 - - @0xsequence/utils@0.43.1 - - @0xsequence/wallet@0.43.1 - -## 0.43.0 - -### Minor Changes - -- move ethers to a peer dependency - -### Patch Changes - -- Updated dependencies - - @0xsequence/abi@0.43.0 - - @0xsequence/api@0.43.0 - - @0xsequence/config@0.43.0 - - @0xsequence/indexer@0.43.0 - - @0xsequence/metadata@0.43.0 - - @0xsequence/network@0.43.0 - - @0xsequence/utils@0.43.0 - - @0xsequence/wallet@0.43.0 - -## 0.42.10 - -### Patch Changes - -- add auxDataProvider -- Updated dependencies - - @0xsequence/abi@0.42.10 - - @0xsequence/api@0.42.10 - - @0xsequence/config@0.42.10 - - @0xsequence/indexer@0.42.10 - - @0xsequence/metadata@0.42.10 - - @0xsequence/network@0.42.10 - - @0xsequence/utils@0.42.10 - - @0xsequence/wallet@0.42.10 - -## 0.42.9 - -### Patch Changes - -- provider: add eip-191 exceptions -- Updated dependencies - - @0xsequence/abi@0.42.9 - - @0xsequence/api@0.42.9 - - @0xsequence/config@0.42.9 - - @0xsequence/indexer@0.42.9 - - @0xsequence/metadata@0.42.9 - - @0xsequence/network@0.42.9 - - @0xsequence/utils@0.42.9 - - @0xsequence/wallet@0.42.9 - -## 0.42.8 - -### Patch Changes - -- provider: skip setting intent origin if we're unity plugin -- Updated dependencies - - @0xsequence/abi@0.42.8 - - @0xsequence/api@0.42.8 - - @0xsequence/config@0.42.8 - - @0xsequence/indexer@0.42.8 - - @0xsequence/metadata@0.42.8 - - @0xsequence/network@0.42.8 - - @0xsequence/utils@0.42.8 - - @0xsequence/wallet@0.42.8 - -## 0.42.7 - -### Patch Changes - -- Add sign in options to connection settings -- Updated dependencies - - @0xsequence/abi@0.42.7 - - @0xsequence/api@0.42.7 - - @0xsequence/config@0.42.7 - - @0xsequence/indexer@0.42.7 - - @0xsequence/metadata@0.42.7 - - @0xsequence/network@0.42.7 - - @0xsequence/utils@0.42.7 - - @0xsequence/wallet@0.42.7 - -## 0.42.6 - -### Patch Changes - -- api bindings update -- Updated dependencies - - @0xsequence/abi@0.42.6 - - @0xsequence/api@0.42.6 - - @0xsequence/config@0.42.6 - - @0xsequence/indexer@0.42.6 - - @0xsequence/metadata@0.42.6 - - @0xsequence/network@0.42.6 - - @0xsequence/utils@0.42.6 - - @0xsequence/wallet@0.42.6 - -## 0.42.5 - -### Patch Changes - -- relayer: don't treat missing receipt as hard failure -- Updated dependencies - - @0xsequence/abi@0.42.5 - - @0xsequence/api@0.42.5 - - @0xsequence/config@0.42.5 - - @0xsequence/indexer@0.42.5 - - @0xsequence/metadata@0.42.5 - - @0xsequence/network@0.42.5 - - @0xsequence/utils@0.42.5 - - @0xsequence/wallet@0.42.5 - -## 0.42.4 - -### Patch Changes - -- provider: add custom app protocol to connect options -- Updated dependencies - - @0xsequence/abi@0.42.4 - - @0xsequence/api@0.42.4 - - @0xsequence/config@0.42.4 - - @0xsequence/indexer@0.42.4 - - @0xsequence/metadata@0.42.4 - - @0xsequence/network@0.42.4 - - @0xsequence/utils@0.42.4 - - @0xsequence/wallet@0.42.4 - -## 0.42.3 - -### Patch Changes - -- update api bindings -- Updated dependencies - - @0xsequence/abi@0.42.3 - - @0xsequence/api@0.42.3 - - @0xsequence/config@0.42.3 - - @0xsequence/indexer@0.42.3 - - @0xsequence/metadata@0.42.3 - - @0xsequence/network@0.42.3 - - @0xsequence/utils@0.42.3 - - @0xsequence/wallet@0.42.3 - -## 0.42.2 - -### Patch Changes - -- disable rinkeby network -- Updated dependencies - - @0xsequence/abi@0.42.2 - - @0xsequence/api@0.42.2 - - @0xsequence/config@0.42.2 - - @0xsequence/indexer@0.42.2 - - @0xsequence/metadata@0.42.2 - - @0xsequence/network@0.42.2 - - @0xsequence/utils@0.42.2 - - @0xsequence/wallet@0.42.2 - -## 0.42.1 - -### Patch Changes - -- wallet: optional waitForReceipt parameter -- Updated dependencies - - @0xsequence/abi@0.42.1 - - @0xsequence/api@0.42.1 - - @0xsequence/config@0.42.1 - - @0xsequence/indexer@0.42.1 - - @0xsequence/metadata@0.42.1 - - @0xsequence/network@0.42.1 - - @0xsequence/utils@0.42.1 - - @0xsequence/wallet@0.42.1 - -## 0.42.0 - -### Minor Changes - -- relayer: estimateGasLimits -> simulate -- add simulator package - -### Patch Changes - -- transactions: fix flattenAuxTransactions -- provider: only filter nullish values -- provider: re-map transaction 'gas' back to 'gasLimit' -- Updated dependencies -- Updated dependencies -- Updated dependencies -- Updated dependencies -- Updated dependencies - - @0xsequence/abi@0.42.0 - - @0xsequence/api@0.42.0 - - @0xsequence/config@0.42.0 - - @0xsequence/indexer@0.42.0 - - @0xsequence/metadata@0.42.0 - - @0xsequence/network@0.42.0 - - @0xsequence/utils@0.42.0 - - @0xsequence/wallet@0.42.0 - -## 0.41.3 - -### Patch Changes - -- api bindings update -- Updated dependencies - - @0xsequence/abi@0.41.3 - - @0xsequence/api@0.41.3 - - @0xsequence/config@0.41.3 - - @0xsequence/indexer@0.41.3 - - @0xsequence/metadata@0.41.3 - - @0xsequence/network@0.41.3 - - @0xsequence/utils@0.41.3 - - @0xsequence/wallet@0.41.3 - -## 0.41.2 - -### Patch Changes - -- api bindings update -- Updated dependencies - - @0xsequence/abi@0.41.2 - - @0xsequence/api@0.41.2 - - @0xsequence/config@0.41.2 - - @0xsequence/indexer@0.41.2 - - @0xsequence/metadata@0.41.2 - - @0xsequence/network@0.41.2 - - @0xsequence/utils@0.41.2 - - @0xsequence/wallet@0.41.2 - -## 0.41.1 - -### Patch Changes - -- update default networks -- Updated dependencies - - @0xsequence/abi@0.41.1 - - @0xsequence/api@0.41.1 - - @0xsequence/config@0.41.1 - - @0xsequence/indexer@0.41.1 - - @0xsequence/metadata@0.41.1 - - @0xsequence/network@0.41.1 - - @0xsequence/utils@0.41.1 - - @0xsequence/wallet@0.41.1 - -## 0.41.0 - -### Minor Changes - -- relayer: fix Relayer.wait() interface - - The interface for calling Relayer.wait() has changed. Instead of a single optional ill-defined timeout/delay parameter, there are three optional parameters, in order: - - - timeout: the maximum time to wait for the transaction receipt - - delay: the polling interval, i.e. the time to wait between requests - - maxFails: the maximum number of hard failures to tolerate before giving up - - Please update your codebase accordingly. - -- relayer: add optional waitForReceipt parameter to Relayer.relay - - The behaviour of Relayer.relay() was not well-defined with respect to whether or not it waited for a receipt. - This change allows the caller to specify whether to wait or not, with the default behaviour being to wait. - -### Patch Changes - -- relayer: wait receipt retry logic -- fix wrapped object error -- provider: forward delegateCall and revertOnError transaction fields -- Updated dependencies -- Updated dependencies -- Updated dependencies -- Updated dependencies -- Updated dependencies - - @0xsequence/abi@0.41.0 - - @0xsequence/api@0.41.0 - - @0xsequence/config@0.41.0 - - @0xsequence/indexer@0.41.0 - - @0xsequence/metadata@0.41.0 - - @0xsequence/network@0.41.0 - - @0xsequence/utils@0.41.0 - - @0xsequence/wallet@0.41.0 - -## 0.40.6 - -### Patch Changes - -- add arbitrum-nova chain -- Updated dependencies - - @0xsequence/abi@0.40.6 - - @0xsequence/api@0.40.6 - - @0xsequence/config@0.40.6 - - @0xsequence/indexer@0.40.6 - - @0xsequence/metadata@0.40.6 - - @0xsequence/network@0.40.6 - - @0xsequence/utils@0.40.6 - - @0xsequence/wallet@0.40.6 - -## 0.40.5 - -### Patch Changes - -- api: update bindings -- Updated dependencies - - @0xsequence/abi@0.40.5 - - @0xsequence/api@0.40.5 - - @0xsequence/config@0.40.5 - - @0xsequence/indexer@0.40.5 - - @0xsequence/metadata@0.40.5 - - @0xsequence/network@0.40.5 - - @0xsequence/utils@0.40.5 - - @0xsequence/wallet@0.40.5 - -## 0.40.4 - -### Patch Changes - -- add unreal transport -- Updated dependencies - - @0xsequence/abi@0.40.4 - - @0xsequence/api@0.40.4 - - @0xsequence/config@0.40.4 - - @0xsequence/indexer@0.40.4 - - @0xsequence/metadata@0.40.4 - - @0xsequence/network@0.40.4 - - @0xsequence/utils@0.40.4 - - @0xsequence/wallet@0.40.4 - -## 0.40.3 - -### Patch Changes - -- provider: fix MessageToSign message type -- Updated dependencies - - @0xsequence/abi@0.40.3 - - @0xsequence/api@0.40.3 - - @0xsequence/config@0.40.3 - - @0xsequence/indexer@0.40.3 - - @0xsequence/metadata@0.40.3 - - @0xsequence/network@0.40.3 - - @0xsequence/utils@0.40.3 - - @0xsequence/wallet@0.40.3 - -## 0.40.2 - -### Patch Changes - -- Wallet provider, loadSession method -- Updated dependencies - - @0xsequence/abi@0.40.2 - - @0xsequence/api@0.40.2 - - @0xsequence/config@0.40.2 - - @0xsequence/indexer@0.40.2 - - @0xsequence/metadata@0.40.2 - - @0xsequence/network@0.40.2 - - @0xsequence/utils@0.40.2 - - @0xsequence/wallet@0.40.2 - -## 0.40.1 - -### Patch Changes - -- export sequence.initWallet and sequence.getWallet -- Updated dependencies - - @0xsequence/abi@0.40.1 - - @0xsequence/api@0.40.1 - - @0xsequence/config@0.40.1 - - @0xsequence/indexer@0.40.1 - - @0xsequence/metadata@0.40.1 - - @0xsequence/network@0.40.1 - - @0xsequence/utils@0.40.1 - - @0xsequence/wallet@0.40.1 - -## 0.40.0 - -### Minor Changes - -- add sequence.initWallet(network, config) and sequence.getWallet() helper methods - -### Patch Changes - -- Updated dependencies - - @0xsequence/abi@0.40.0 - - @0xsequence/api@0.40.0 - - @0xsequence/config@0.40.0 - - @0xsequence/indexer@0.40.0 - - @0xsequence/metadata@0.40.0 - - @0xsequence/network@0.40.0 - - @0xsequence/utils@0.40.0 - - @0xsequence/wallet@0.40.0 - -## 0.39.6 - -### Patch Changes - -- indexer: update client bindings -- Updated dependencies - - @0xsequence/abi@0.39.6 - - @0xsequence/api@0.39.6 - - @0xsequence/config@0.39.6 - - @0xsequence/indexer@0.39.6 - - @0xsequence/metadata@0.39.6 - - @0xsequence/network@0.39.6 - - @0xsequence/utils@0.39.6 - - @0xsequence/wallet@0.39.6 - -## 0.39.5 - -### Patch Changes - -- provider: fix networkRpcUrl config option -- Updated dependencies - - @0xsequence/abi@0.39.5 - - @0xsequence/api@0.39.5 - - @0xsequence/config@0.39.5 - - @0xsequence/indexer@0.39.5 - - @0xsequence/metadata@0.39.5 - - @0xsequence/network@0.39.5 - - @0xsequence/utils@0.39.5 - - @0xsequence/wallet@0.39.5 - -## 0.39.4 - -### Patch Changes - -- api: update client bindings -- Updated dependencies - - @0xsequence/abi@0.39.4 - - @0xsequence/api@0.39.4 - - @0xsequence/config@0.39.4 - - @0xsequence/indexer@0.39.4 - - @0xsequence/metadata@0.39.4 - - @0xsequence/network@0.39.4 - - @0xsequence/utils@0.39.4 - - @0xsequence/wallet@0.39.4 - -## 0.39.3 - -### Patch Changes - -- add request method on Web3Provider -- Updated dependencies - - @0xsequence/abi@0.39.3 - - @0xsequence/api@0.39.3 - - @0xsequence/config@0.39.3 - - @0xsequence/indexer@0.39.3 - - @0xsequence/metadata@0.39.3 - - @0xsequence/network@0.39.3 - - @0xsequence/utils@0.39.3 - - @0xsequence/wallet@0.39.3 - -## 0.39.2 - -### Patch Changes - -- update umd name -- Updated dependencies - - @0xsequence/abi@0.39.2 - - @0xsequence/api@0.39.2 - - @0xsequence/config@0.39.2 - - @0xsequence/indexer@0.39.2 - - @0xsequence/metadata@0.39.2 - - @0xsequence/network@0.39.2 - - @0xsequence/utils@0.39.2 - - @0xsequence/wallet@0.39.2 - -## 0.39.1 - -### Patch Changes - -- add Aurora network -- add origin info for accountsChanged event to handle it per dapp -- Updated dependencies -- Updated dependencies - - @0xsequence/abi@0.39.1 - - @0xsequence/api@0.39.1 - - @0xsequence/config@0.39.1 - - @0xsequence/indexer@0.39.1 - - @0xsequence/metadata@0.39.1 - - @0xsequence/network@0.39.1 - - @0xsequence/utils@0.39.1 - - @0xsequence/wallet@0.39.1 - -## 0.39.0 - -### Minor Changes - -- abstract window.localStorage to interface type - -### Patch Changes - -- Updated dependencies - - @0xsequence/abi@0.39.0 - - @0xsequence/api@0.39.0 - - @0xsequence/config@0.39.0 - - @0xsequence/indexer@0.39.0 - - @0xsequence/metadata@0.39.0 - - @0xsequence/network@0.39.0 - - @0xsequence/utils@0.39.0 - - @0xsequence/wallet@0.39.0 - -## 0.38.2 - -### Patch Changes - -- provider: add Settings.defaultPurchaseAmount -- Updated dependencies - - @0xsequence/abi@0.38.2 - - @0xsequence/api@0.38.2 - - @0xsequence/config@0.38.2 - - @0xsequence/indexer@0.38.2 - - @0xsequence/metadata@0.38.2 - - @0xsequence/network@0.38.2 - - @0xsequence/utils@0.38.2 - - @0xsequence/wallet@0.38.2 - -## 0.38.1 - -### Patch Changes - -- update api and metadata rpc bindings -- Updated dependencies - - @0xsequence/abi@0.38.1 - - @0xsequence/api@0.38.1 - - @0xsequence/config@0.38.1 - - @0xsequence/indexer@0.38.1 - - @0xsequence/metadata@0.38.1 - - @0xsequence/network@0.38.1 - - @0xsequence/utils@0.38.1 - - @0xsequence/wallet@0.38.1 - -## 0.38.0 - -### Minor Changes - -- api: update bindings, change TokenPrice interface -- bridge: remove @0xsequence/bridge package -- api: update bindings, rename ContractCallArg to TupleComponent - -### Patch Changes - -- Updated dependencies -- Updated dependencies -- Updated dependencies - - @0xsequence/abi@0.38.0 - - @0xsequence/api@0.38.0 - - @0xsequence/config@0.38.0 - - @0xsequence/indexer@0.38.0 - - @0xsequence/metadata@0.38.0 - - @0xsequence/network@0.38.0 - - @0xsequence/utils@0.38.0 - - @0xsequence/wallet@0.38.0 - -## 0.37.1 - -### Patch Changes - -- Add back sortNetworks - Removing sorting was a breaking change for dapps on older versions which directly integrate sequence. -- Updated dependencies - - @0xsequence/abi@0.37.1 - - @0xsequence/api@0.37.1 - - @0xsequence/config@0.37.1 - - @0xsequence/indexer@0.37.1 - - @0xsequence/metadata@0.37.1 - - @0xsequence/network@0.37.1 - - @0xsequence/utils@0.37.1 - - @0xsequence/wallet@0.37.1 - -## 0.37.0 - -### Minor Changes - -- network related fixes and improvements -- api: bindings: exchange rate lookups - -### Patch Changes - -- Updated dependencies -- Updated dependencies - - @0xsequence/abi@0.37.0 - - @0xsequence/api@0.37.0 - - @0xsequence/config@0.37.0 - - @0xsequence/indexer@0.37.0 - - @0xsequence/metadata@0.37.0 - - @0xsequence/network@0.37.0 - - @0xsequence/utils@0.37.0 - - @0xsequence/wallet@0.37.0 - -## 0.36.13 - -### Patch Changes - -- api: update bindings with new price endpoints -- Updated dependencies - - @0xsequence/abi@0.36.13 - - @0xsequence/api@0.36.13 - - @0xsequence/config@0.36.13 - - @0xsequence/indexer@0.36.13 - - @0xsequence/metadata@0.36.13 - - @0xsequence/network@0.36.13 - - @0xsequence/utils@0.36.13 - - @0xsequence/wallet@0.36.13 - -## 0.36.12 - -### Patch Changes - -- wallet: skip remote signers if not needed -- auth: check that signature meets threshold before requesting auth token -- Updated dependencies -- Updated dependencies - - @0xsequence/abi@0.36.12 - - @0xsequence/api@0.36.12 - - @0xsequence/config@0.36.12 - - @0xsequence/indexer@0.36.12 - - @0xsequence/metadata@0.36.12 - - @0xsequence/network@0.36.12 - - @0xsequence/utils@0.36.12 - - @0xsequence/wallet@0.36.12 - -## 0.36.11 - -### Patch Changes - -- Prefix EIP191 message on wallet-request-handler -- Updated dependencies - - @0xsequence/abi@0.36.11 - - @0xsequence/api@0.36.11 - - @0xsequence/config@0.36.11 - - @0xsequence/indexer@0.36.11 - - @0xsequence/metadata@0.36.11 - - @0xsequence/network@0.36.11 - - @0xsequence/utils@0.36.11 - - @0xsequence/wallet@0.36.11 - -## 0.36.10 - -### Patch Changes - -- support bannerUrl on connect -- Updated dependencies - - @0xsequence/abi@0.36.10 - - @0xsequence/api@0.36.10 - - @0xsequence/config@0.36.10 - - @0xsequence/indexer@0.36.10 - - @0xsequence/metadata@0.36.10 - - @0xsequence/network@0.36.10 - - @0xsequence/utils@0.36.10 - - @0xsequence/wallet@0.36.10 - -## 0.36.9 - -### Patch Changes - -- minor dev xp improvements -- Updated dependencies - - @0xsequence/abi@0.36.9 - - @0xsequence/api@0.36.9 - - @0xsequence/config@0.36.9 - - @0xsequence/indexer@0.36.9 - - @0xsequence/metadata@0.36.9 - - @0xsequence/network@0.36.9 - - @0xsequence/utils@0.36.9 - - @0xsequence/wallet@0.36.9 - -## 0.36.8 - -### Patch Changes - -- more connect options (theme, payment providers, funding currencies) -- Updated dependencies - - @0xsequence/abi@0.36.8 - - @0xsequence/api@0.36.8 - - @0xsequence/config@0.36.8 - - @0xsequence/indexer@0.36.8 - - @0xsequence/metadata@0.36.8 - - @0xsequence/network@0.36.8 - - @0xsequence/utils@0.36.8 - - @0xsequence/wallet@0.36.8 - -## 0.36.7 - -### Patch Changes - -- fix missing break -- Updated dependencies - - @0xsequence/abi@0.36.7 - - @0xsequence/api@0.36.7 - - @0xsequence/config@0.36.7 - - @0xsequence/indexer@0.36.7 - - @0xsequence/metadata@0.36.7 - - @0xsequence/network@0.36.7 - - @0xsequence/utils@0.36.7 - - @0xsequence/wallet@0.36.7 - -## 0.36.6 - -### Patch Changes - -- wallet_switchEthereumChain support -- Updated dependencies - - @0xsequence/abi@0.36.6 - - @0xsequence/api@0.36.6 - - @0xsequence/config@0.36.6 - - @0xsequence/indexer@0.36.6 - - @0xsequence/metadata@0.36.6 - - @0xsequence/network@0.36.6 - - @0xsequence/utils@0.36.6 - - @0xsequence/wallet@0.36.6 - -## 0.36.5 - -### Patch Changes - -- auth: bump ethauth to 0.7.0 - network, wallet: don't assume position of auth network in list - api/indexer/metadata: trim trailing slash on hostname, and add endpoint urls - relayer: Allow to specify local relayer transaction parameters like gas price or gas limit -- Updated dependencies - - @0xsequence/abi@0.36.5 - - @0xsequence/api@0.36.5 - - @0xsequence/config@0.36.5 - - @0xsequence/indexer@0.36.5 - - @0xsequence/metadata@0.36.5 - - @0xsequence/network@0.36.5 - - @0xsequence/utils@0.36.5 - - @0xsequence/wallet@0.36.5 - -## 0.36.4 - -### Patch Changes - -- Updating list of chain ids to include other ethereum compatible chains -- Updated dependencies - - @0xsequence/abi@0.36.4 - - @0xsequence/api@0.36.4 - - @0xsequence/config@0.36.4 - - @0xsequence/indexer@0.36.4 - - @0xsequence/metadata@0.36.4 - - @0xsequence/network@0.36.4 - - @0xsequence/utils@0.36.4 - - @0xsequence/wallet@0.36.4 - -## 0.36.3 - -### Patch Changes - -- provider: pass connect options to prompter methods -- Updated dependencies - - @0xsequence/abi@0.36.3 - - @0xsequence/api@0.36.3 - - @0xsequence/config@0.36.3 - - @0xsequence/indexer@0.36.3 - - @0xsequence/metadata@0.36.3 - - @0xsequence/network@0.36.3 - - @0xsequence/utils@0.36.3 - - @0xsequence/wallet@0.36.3 - -## 0.36.2 - -### Patch Changes - -- transactions: Setting target to 0x0 when empty to during SequenceTxAbiEncode -- Updated dependencies - - @0xsequence/abi@0.36.2 - - @0xsequence/api@0.36.2 - - @0xsequence/config@0.36.2 - - @0xsequence/indexer@0.36.2 - - @0xsequence/metadata@0.36.2 - - @0xsequence/network@0.36.2 - - @0xsequence/utils@0.36.2 - - @0xsequence/wallet@0.36.2 - -## 0.36.1 - -### Patch Changes - -- metadata: update client with more fields -- Updated dependencies - - @0xsequence/abi@0.36.1 - - @0xsequence/api@0.36.1 - - @0xsequence/config@0.36.1 - - @0xsequence/indexer@0.36.1 - - @0xsequence/metadata@0.36.1 - - @0xsequence/network@0.36.1 - - @0xsequence/utils@0.36.1 - - @0xsequence/wallet@0.36.1 - -## 0.36.0 - -### Minor Changes - -- relayer, wallet: fee quote support - -### Patch Changes - -- Updated dependencies - - @0xsequence/abi@0.36.0 - - @0xsequence/api@0.36.0 - - @0xsequence/config@0.36.0 - - @0xsequence/indexer@0.36.0 - - @0xsequence/metadata@0.36.0 - - @0xsequence/network@0.36.0 - - @0xsequence/utils@0.36.0 - - @0xsequence/wallet@0.36.0 - -## 0.35.12 - -### Patch Changes - -- provider: rename wallet.commands to wallet.utils -- Updated dependencies - - @0xsequence/abi@0.35.12 - - @0xsequence/api@0.35.12 - - @0xsequence/config@0.35.12 - - @0xsequence/indexer@0.35.12 - - @0xsequence/metadata@0.35.12 - - @0xsequence/network@0.35.12 - - @0xsequence/utils@0.35.12 - - @0xsequence/wallet@0.35.12 - -## 0.35.11 - -### Patch Changes - -- provider/utils: smoother message validation -- Updated dependencies - - @0xsequence/abi@0.35.11 - - @0xsequence/api@0.35.11 - - @0xsequence/config@0.35.11 - - @0xsequence/indexer@0.35.11 - - @0xsequence/metadata@0.35.11 - - @0xsequence/network@0.35.11 - - @0xsequence/utils@0.35.11 - - @0xsequence/wallet@0.35.11 - -## 0.35.10 - -### Patch Changes - -- upgrade deps -- Updated dependencies - - @0xsequence/abi@0.35.10 - - @0xsequence/api@0.35.10 - - @0xsequence/config@0.35.10 - - @0xsequence/indexer@0.35.10 - - @0xsequence/metadata@0.35.10 - - @0xsequence/network@0.35.10 - - @0xsequence/utils@0.35.10 - - @0xsequence/wallet@0.35.10 - -## 0.35.9 - -### Patch Changes - -- provider: window-transport override event handlers with new wallet instance -- Updated dependencies - - @0xsequence/abi@0.35.9 - - @0xsequence/api@0.35.9 - - @0xsequence/config@0.35.9 - - @0xsequence/indexer@0.35.9 - - @0xsequence/metadata@0.35.9 - - @0xsequence/network@0.35.9 - - @0xsequence/utils@0.35.9 - - @0xsequence/wallet@0.35.9 - -## 0.35.8 - -### Patch Changes - -- provider: async wallet sign in improvements -- Updated dependencies - - @0xsequence/abi@0.35.8 - - @0xsequence/api@0.35.8 - - @0xsequence/config@0.35.8 - - @0xsequence/indexer@0.35.8 - - @0xsequence/metadata@0.35.8 - - @0xsequence/network@0.35.8 - - @0xsequence/utils@0.35.8 - - @0xsequence/wallet@0.35.8 - -## 0.35.7 - -### Patch Changes - -- config: cache wallet configs -- Updated dependencies - - @0xsequence/abi@0.35.7 - - @0xsequence/api@0.35.7 - - @0xsequence/config@0.35.7 - - @0xsequence/indexer@0.35.7 - - @0xsequence/metadata@0.35.7 - - @0xsequence/network@0.35.7 - - @0xsequence/utils@0.35.7 - - @0xsequence/wallet@0.35.7 - -## 0.35.6 - -### Patch Changes - -- provider: support async signin of wallet request handler -- Updated dependencies - - @0xsequence/abi@0.35.6 - - @0xsequence/api@0.35.6 - - @0xsequence/config@0.35.6 - - @0xsequence/indexer@0.35.6 - - @0xsequence/metadata@0.35.6 - - @0xsequence/network@0.35.6 - - @0xsequence/utils@0.35.6 - - @0xsequence/wallet@0.35.6 - -## 0.35.5 - -### Patch Changes - -- wallet: skip threshold check during fee estimation -- Updated dependencies - - @0xsequence/abi@0.35.5 - - @0xsequence/api@0.35.5 - - @0xsequence/config@0.35.5 - - @0xsequence/indexer@0.35.5 - - @0xsequence/metadata@0.35.5 - - @0xsequence/network@0.35.5 - - @0xsequence/utils@0.35.5 - - @0xsequence/wallet@0.35.5 - -## 0.35.4 - -### Patch Changes - -- - browser extension mode, center window -- Updated dependencies - - @0xsequence/abi@0.35.4 - - @0xsequence/api@0.35.4 - - @0xsequence/config@0.35.4 - - @0xsequence/indexer@0.35.4 - - @0xsequence/metadata@0.35.4 - - @0xsequence/network@0.35.4 - - @0xsequence/utils@0.35.4 - - @0xsequence/wallet@0.35.4 - -## 0.35.3 - -### Patch Changes - -- - update window position when in browser extension mode -- Updated dependencies - - @0xsequence/abi@0.35.3 - - @0xsequence/api@0.35.3 - - @0xsequence/config@0.35.3 - - @0xsequence/indexer@0.35.3 - - @0xsequence/metadata@0.35.3 - - @0xsequence/network@0.35.3 - - @0xsequence/utils@0.35.3 - - @0xsequence/wallet@0.35.3 - -## 0.35.2 - -### Patch Changes - -- - provider: WindowMessageHandler accept optional windowHref -- Updated dependencies - - @0xsequence/abi@0.35.2 - - @0xsequence/api@0.35.2 - - @0xsequence/config@0.35.2 - - @0xsequence/indexer@0.35.2 - - @0xsequence/metadata@0.35.2 - - @0xsequence/network@0.35.2 - - @0xsequence/utils@0.35.2 - - @0xsequence/wallet@0.35.2 - -## 0.35.1 - -### Patch Changes - -- wallet: update config on undeployed too -- Updated dependencies - - @0xsequence/abi@0.35.1 - - @0xsequence/api@0.35.1 - - @0xsequence/config@0.35.1 - - @0xsequence/indexer@0.35.1 - - @0xsequence/metadata@0.35.1 - - @0xsequence/network@0.35.1 - - @0xsequence/utils@0.35.1 - - @0xsequence/wallet@0.35.1 - -## 0.35.0 - -### Minor Changes - -- - config: add buildStubSignature - - provider: add checks to signing cases for wallet deployment and config statuses - - provider: add prompt for wallet deployment - - relayer: add BaseRelayer.prependWalletDeploy - - relayer: add Relayer.feeOptions - - relayer: account for wallet deployment in fee estimation - - transactions: add fromTransactionish - - wallet: add Account.prependConfigUpdate - - wallet: add Account.getFeeOptions - -### Patch Changes - -- Updated dependencies - - @0xsequence/abi@0.35.0 - - @0xsequence/api@0.35.0 - - @0xsequence/config@0.35.0 - - @0xsequence/indexer@0.35.0 - - @0xsequence/metadata@0.35.0 - - @0xsequence/network@0.35.0 - - @0xsequence/utils@0.35.0 - - @0xsequence/wallet@0.35.0 - -## 0.34.1 - -### Patch Changes - -- upgrade ethauth dep - -## 0.34.0 - -### Minor Changes - -- - upgrade deps - -### Patch Changes - -- Updated dependencies - - @0xsequence/abi@0.34.0 - - @0xsequence/api@0.34.0 - - @0xsequence/config@0.34.0 - - @0xsequence/indexer@0.34.0 - - @0xsequence/metadata@0.34.0 - - @0xsequence/network@0.34.0 - - @0xsequence/utils@0.34.0 - - @0xsequence/wallet@0.34.0 - -## 0.33.3 - -### Patch Changes - -- Updated dependencies - - @0xsequence/wallet@0.33.3 - -## 0.33.2 - -### Patch Changes - -- @0xsequence/wallet@0.33.2 - -## 0.33.1 - -### Patch Changes - -- Updated dependencies - - @0xsequence/api@0.33.1 - -## 0.33.0 - -### Minor Changes - -- auth: fix spelling of 'thershold' to 'threshold' - -## 0.31.3 - -### Patch Changes - -- Updated dependencies - - @0xsequence/metadata@0.31.3 - -## 0.31.1 - -### Patch Changes - -- @0xsequence/wallet@0.31.1 - -## 0.31.0 - -### Minor Changes - -- - upgrading to ethers v5.5 - -### Patch Changes - -- Updated dependencies - - @0xsequence/abi@0.31.0 - - @0xsequence/api@0.31.0 - - @0xsequence/config@0.31.0 - - @0xsequence/indexer@0.31.0 - - @0xsequence/metadata@0.31.0 - - @0xsequence/network@0.31.0 - - @0xsequence/utils@0.31.0 - - @0xsequence/wallet@0.31.0 - -## 0.30.0 - -### Minor Changes - -- - upgrade most deps - -### Patch Changes - -- Updated dependencies - - @0xsequence/abi@0.30.0 - - @0xsequence/api@0.30.0 - - @0xsequence/config@0.30.0 - - @0xsequence/indexer@0.30.0 - - @0xsequence/metadata@0.30.0 - - @0xsequence/network@0.30.0 - - @0xsequence/utils@0.30.0 - - @0xsequence/wallet@0.30.0 - -## 0.29.9 - -### Patch Changes - -- Updated dependencies [undefined] - - @0xsequence/api@0.29.9 - -## 0.29.8 - -### Patch Changes - -- update api -- Updated dependencies [undefined] - - @0xsequence/abi@0.29.8 - - @0xsequence/api@0.29.8 - - @0xsequence/config@0.29.8 - - @0xsequence/indexer@0.29.8 - - @0xsequence/metadata@0.29.8 - - @0xsequence/network@0.29.8 - - @0xsequence/utils@0.29.8 - - @0xsequence/wallet@0.29.8 - -## 0.29.7 - -### Patch Changes - -- Updated dependencies [undefined] - - @0xsequence/wallet@0.29.7 - -## 0.29.6 - -### Patch Changes - -- Updated dependencies [undefined] - - @0xsequence/network@0.29.6 - - @0xsequence/config@0.29.6 - - @0xsequence/wallet@0.29.6 - -## 0.29.5 - -### Patch Changes - -- auth: pass testnetMode flag depending on network -- Updated dependencies [undefined] - - @0xsequence/config@0.29.5 - - @0xsequence/wallet@0.29.5 - -## 0.29.4 - -### Patch Changes - -- Updated dependencies [undefined] - - @0xsequence/api@0.29.4 - -## 0.29.3 - -### Patch Changes - -- Updated dependencies [undefined] - - @0xsequence/indexer@0.29.3 - -## 0.29.2 - -### Patch Changes - -- @0xsequence/wallet@0.29.2 - -## 0.29.1 - -### Patch Changes - -- Updated dependencies [undefined] - - @0xsequence/api@0.29.1 - - @0xsequence/metadata@0.29.1 - -## 0.29.0 - -### Minor Changes - -- major architectural changes in Sequence design - - - only one API instance, API is no longer a per-chain service - - separate per-chain indexer service, API no longer handles indexing - - single contract metadata service, API no longer serves metadata - - chaind package has been removed, indexer and metadata packages have been added - - stronger typing with new explicit ChainId type - - multicall fixes and improvements - - forbid "wait" transactions in sendTransactionBatch calls - -### Patch Changes - -- Updated dependencies [undefined] - - @0xsequence/api@0.29.0 - - @0xsequence/config@0.29.0 - - @0xsequence/indexer@0.29.0 - - @0xsequence/metadata@0.29.0 - - @0xsequence/network@0.29.0 - - @0xsequence/abi@0.29.0 - - @0xsequence/utils@0.29.0 - - @0xsequence/wallet@0.29.0 - -## 0.28.0 - -### Minor Changes - -- extension provider - -### Patch Changes - -- Updated dependencies [undefined] - - @0xsequence/abi@0.28.0 - - @0xsequence/api@0.28.0 - - @0xsequence/config@0.28.0 - - @0xsequence/network@0.28.0 - - @0xsequence/utils@0.28.0 - - @0xsequence/wallet@0.28.0 - -## 0.27.2 - -### Patch Changes - -- Updated dependencies [undefined] - - @0xsequence/wallet@0.27.2 - -## 0.27.1 - -### Patch Changes - -- @0xsequence/wallet@0.27.1 - -## 0.27.0 - -### Minor Changes - -- Add requireFreshSigner lib to sessions - -### Patch Changes - -- Updated dependencies [undefined] - - @0xsequence/abi@0.27.0 - - @0xsequence/api@0.27.0 - - @0xsequence/config@0.27.0 - - @0xsequence/network@0.27.0 - - @0xsequence/utils@0.27.0 - - @0xsequence/wallet@0.27.0 - -## 0.26.0 - -### Minor Changes - -- update relayer client bindings - provide the wallet's address for calls to SendMetaTxn - modify the semantics of Relayer.getNonce() to allow relayers to select nonce spaces for clients - -### Patch Changes - -- Updated dependencies [undefined] - - @0xsequence/wallet@0.26.0 - -## 0.25.1 - -### Patch Changes - -- Fix build typescrypt issue -- Updated dependencies [undefined] - - @0xsequence/abi@0.25.1 - - @0xsequence/api@0.25.1 - - @0xsequence/config@0.25.1 - - @0xsequence/network@0.25.1 - - @0xsequence/utils@0.25.1 - - @0xsequence/wallet@0.25.1 - -## 0.25.0 - -### Minor Changes - -- 10c8af8: Add estimator package - Fix multicall few calls bug - -### Patch Changes - -- Updated dependencies [10c8af8] - - @0xsequence/abi@0.25.0 - - @0xsequence/api@0.25.0 - - @0xsequence/config@0.25.0 - - @0xsequence/network@0.25.0 - - @0xsequence/utils@0.25.0 - - @0xsequence/wallet@0.25.0 - -## 0.24.1 - -### Patch Changes - -- @0xsequence/wallet@0.24.1 - -## 0.24.0 - -### Patch Changes - -- Updated dependencies [undefined] - - @0xsequence/api@0.24.0 - - @0xsequence/wallet@0.24.0 - -## 0.23.0 - -### Minor Changes - -- - relayer: offer variety of gas fee options from the relayer service" - -### Patch Changes - -- Updated dependencies [undefined] - - @0xsequence/abi@0.23.0 - - @0xsequence/api@0.23.0 - - @0xsequence/config@0.23.0 - - @0xsequence/network@0.23.0 - - @0xsequence/utils@0.23.0 - - @0xsequence/wallet@0.23.0 - -## 0.22.2 - -### Patch Changes - -- e1c109e: Fix authProof on expired sessions -- Updated dependencies [e1c109e] - - @0xsequence/abi@0.22.2 - - @0xsequence/api@0.22.2 - - @0xsequence/config@0.22.2 - - @0xsequence/network@0.22.2 - - @0xsequence/utils@0.22.2 - - @0xsequence/wallet@0.22.2 - -## 0.22.1 - -### Patch Changes - -- transport session cache -- Updated dependencies [undefined] - - @0xsequence/abi@0.22.1 - - @0xsequence/api@0.22.1 - - @0xsequence/config@0.22.1 - - @0xsequence/network@0.22.1 - - @0xsequence/utils@0.22.1 - - @0xsequence/wallet@0.22.1 - -## 0.22.0 - -### Minor Changes - -- e667b65: Expose all relayer options on networks - -### Patch Changes - -- Updated dependencies [e667b65] - - @0xsequence/abi@0.22.0 - - @0xsequence/network@0.22.0 - - @0xsequence/utils@0.22.0 - - @0xsequence/wallet@0.22.0 - - @0xsequence/api@0.22.0 - - @0xsequence/config@0.22.0 - -## 0.21.5 - -### Patch Changes - -- Give priority to metaTxnId returned by relayer -- Updated dependencies [undefined] - - @0xsequence/abi@0.21.5 - - @0xsequence/api@0.21.5 - - @0xsequence/config@0.21.5 - - @0xsequence/network@0.21.5 - - @0xsequence/utils@0.21.5 - - @0xsequence/wallet@0.21.5 - -## 0.21.4 - -### Patch Changes - -- Add has enough signers method -- Updated dependencies [undefined] - - @0xsequence/abi@0.21.4 - - @0xsequence/api@0.21.4 - - @0xsequence/config@0.21.4 - - @0xsequence/network@0.21.4 - - @0xsequence/utils@0.21.4 - - @0xsequence/wallet@0.21.4 - -## 0.21.3 - -### Patch Changes - -- add window session cache -- Updated dependencies [undefined] - - @0xsequence/abi@0.21.3 - - @0xsequence/api@0.21.3 - - @0xsequence/config@0.21.3 - - @0xsequence/network@0.21.3 - - @0xsequence/utils@0.21.3 - - @0xsequence/wallet@0.21.3 - -## 0.21.2 - -### Patch Changes - -- exception handlind in relayer -- Updated dependencies [undefined] - - @0xsequence/abi@0.21.2 - - @0xsequence/api@0.21.2 - - @0xsequence/config@0.21.2 - - @0xsequence/network@0.21.2 - - @0xsequence/utils@0.21.2 - - @0xsequence/wallet@0.21.2 - -## 0.21.1 - -### Patch Changes - -- Updated dependencies [undefined] - - @0xsequence/wallet@0.21.1 - -## 0.21.0 - -### Minor Changes - -- - fix gas estimation on wallets with large number of signers - - update to session handling and wallet config construction upon auth - -### Patch Changes - -- Updated dependencies [undefined] - - @0xsequence/abi@0.21.0 - - @0xsequence/api@0.21.0 - - @0xsequence/config@0.21.0 - - @0xsequence/network@0.21.0 - - @0xsequence/utils@0.21.0 - - @0xsequence/wallet@0.21.0 - -## 0.20.0 - -### Minor Changes - -- revert JWT request piggybacking - -### Patch Changes - -- Updated dependencies [undefined] - - @0xsequence/api@0.20.0 - -## 0.19.3 - -### Patch Changes - -- jwtAuth visibility, package version sync -- Updated dependencies [undefined] - - @0xsequence/abi@0.19.3 - - @0xsequence/api@0.19.3 - - @0xsequence/config@0.19.3 - - @0xsequence/network@0.19.3 - - @0xsequence/utils@0.19.3 - - @0xsequence/wallet@0.19.3 - -## 0.19.2 - -### Patch Changes - -- Updated dependencies [undefined] - - @0xsequence/abi@0.19.2 - - @0xsequence/config@0.19.2 - - @0xsequence/wallet@0.19.2 - -## 0.19.0 - -### Minor Changes - -- - provider, improve dapp / wallet transport io - -### Patch Changes - -- Updated dependencies [undefined] - - @0xsequence/abi@0.19.0 - - @0xsequence/api@0.19.0 - - @0xsequence/config@0.19.0 - - @0xsequence/network@0.19.0 - - @0xsequence/utils@0.19.0 - - @0xsequence/wallet@0.19.0 - -## 0.18.0 - -### Minor Changes - -- relayer improvements and pending transaction handling - -### Patch Changes - -- Updated dependencies [undefined] - - @0xsequence/abi@0.18.0 - - @0xsequence/api@0.18.0 - - @0xsequence/config@0.18.0 - - @0xsequence/network@0.18.0 - - @0xsequence/wallet@0.18.0 - -## 0.17.0 - -### Minor Changes - -- piggyback on already pending JWT and signing requests - -### Patch Changes - -- Updated dependencies [undefined] - - @0xsequence/api@0.17.0 - -## 0.16.1 - -### Patch Changes - -- Updated dependencies [undefined] - - @0xsequence/api@0.16.1 - -## 0.16.0 - -### Minor Changes - -- relayer as its own service separate from chaind - -### Patch Changes - -- Updated dependencies [undefined] - - @0xsequence/abi@0.16.0 - - @0xsequence/api@0.16.0 - - @0xsequence/config@0.16.0 - - @0xsequence/network@0.16.0 - - @0xsequence/wallet@0.16.0 - -## 0.15.1 - -### Patch Changes - -- update api clients -- Updated dependencies [undefined] - - @0xsequence/abi@0.15.1 - - @0xsequence/api@0.15.1 - - @0xsequence/config@0.15.1 - - @0xsequence/network@0.15.1 - - @0xsequence/wallet@0.15.1 - -## 0.15.0 - -### Patch Changes - -- Updated dependencies [undefined] - - @0xsequence/api@0.15.0 - - @0xsequence/wallet@0.15.0 - -## 0.14.3 - -### Patch Changes - -- Fix 0xSequence relayer dependencies -- Updated dependencies [undefined] - - @0xsequence/abi@0.14.3 - - @0xsequence/api@0.14.3 - - @0xsequence/config@0.14.3 - - @0xsequence/network@0.14.3 - - @0xsequence/wallet@0.14.3 - -## 0.14.2 - -### Patch Changes - -- Add debug logs to rpc-relayer -- Updated dependencies [undefined] - - @0xsequence/abi@0.14.2 - - @0xsequence/api@0.14.2 - - @0xsequence/config@0.14.2 - - @0xsequence/network@0.14.2 - - @0xsequence/wallet@0.14.2 - -## 0.14.0 - -### Minor Changes - -- update sequence utils finder which includes optimization - -### Patch Changes - -- Updated dependencies [undefined] - - @0xsequence/abi@0.14.0 - - @0xsequence/api@0.14.0 - - @0xsequence/config@0.14.0 - - @0xsequence/network@0.14.0 - - @0xsequence/wallet@0.14.0 - -## 0.13.0 - -### Minor Changes - -- Update SequenceUtils deployed contract - -### Patch Changes - -- Updated dependencies [undefined] - - @0xsequence/abi@0.13.0 - - @0xsequence/api@0.13.0 - - @0xsequence/config@0.13.0 - - @0xsequence/network@0.13.0 - - @0xsequence/wallet@0.13.0 - -## 0.12.1 - -### Patch Changes - -- npm bump -- Updated dependencies [undefined] - - @0xsequence/abi@0.12.1 - - @0xsequence/api@0.12.1 - - @0xsequence/config@0.12.1 - - @0xsequence/network@0.12.1 - - @0xsequence/wallet@0.12.1 - -## 0.12.0 - -### Minor Changes - -- provider: improvements to window transport - -### Patch Changes - -- Updated dependencies [undefined] - - @0xsequence/abi@0.12.0 - - @0xsequence/api@0.12.0 - - @0xsequence/config@0.12.0 - - @0xsequence/network@0.12.0 - - @0xsequence/wallet@0.12.0 - -## 0.11.4 - -### Patch Changes - -- update api client -- Updated dependencies [undefined] - - @0xsequence/api@0.11.4 - - @0xsequence/abi@0.11.4 - - @0xsequence/config@0.11.4 - - @0xsequence/network@0.11.4 - - @0xsequence/wallet@0.11.4 - -## 0.11.3 - -### Patch Changes - -- improve openWindow state options handling -- Updated dependencies [undefined] - - @0xsequence/abi@0.11.3 - - @0xsequence/api@0.11.3 - - @0xsequence/config@0.11.3 - - @0xsequence/network@0.11.3 - - @0xsequence/wallet@0.11.3 - -## 0.11.2 - -### Patch Changes - -- Fix multicall proxy scopes -- Updated dependencies [undefined] - - @0xsequence/abi@0.11.2 - - @0xsequence/api@0.11.2 - - @0xsequence/config@0.11.2 - - @0xsequence/network@0.11.2 - - @0xsequence/wallet@0.11.2 - -## 0.11.1 - -### Patch Changes - -- Add support for dynamic and nested signatures -- Updated dependencies [undefined] - - @0xsequence/abi@0.11.1 - - @0xsequence/api@0.11.1 - - @0xsequence/config@0.11.1 - - @0xsequence/network@0.11.1 - - @0xsequence/wallet@0.11.1 - -## 0.11.0 - -### Minor Changes - -- Update wallet context to 1.7 contracts - -### Patch Changes - -- Updated dependencies [undefined] - - @0xsequence/abi@0.11.0 - - @0xsequence/api@0.11.0 - - @0xsequence/config@0.11.0 - - @0xsequence/network@0.11.0 - - @0xsequence/wallet@0.11.0 - -## 0.10.9 - -### Patch Changes - -- add support for public addresses as signers in session.open -- Updated dependencies [undefined] - - @0xsequence/abi@0.10.9 - - @0xsequence/api@0.10.9 - - @0xsequence/config@0.10.9 - - @0xsequence/network@0.10.9 - - @0xsequence/wallet@0.10.9 - -## 0.10.8 - -### Patch Changes - -- Multicall production configuration -- Updated dependencies [undefined] - - @0xsequence/abi@0.10.8 - - @0xsequence/api@0.10.8 - - @0xsequence/config@0.10.8 - - @0xsequence/network@0.10.8 - - @0xsequence/wallet@0.10.8 - -## 0.10.7 - -### Patch Changes - -- allow provider transport to force disconnect -- Updated dependencies [undefined] - - @0xsequence/abi@0.10.7 - - @0xsequence/api@0.10.7 - - @0xsequence/config@0.10.7 - - @0xsequence/network@0.10.7 - - @0xsequence/wallet@0.10.7 - -## 0.10.6 - -### Patch Changes - -- - fix getWalletState method -- Updated dependencies [undefined] - - @0xsequence/abi@0.10.6 - - @0xsequence/api@0.10.6 - - @0xsequence/config@0.10.6 - - @0xsequence/network@0.10.6 - - @0xsequence/wallet@0.10.6 - -## 0.10.5 - -### Patch Changes - -- update relayer gas refund options -- Updated dependencies [undefined] - - @0xsequence/abi@0.10.5 - - @0xsequence/api@0.10.5 - - @0xsequence/config@0.10.5 - - @0xsequence/network@0.10.5 - - @0xsequence/wallet@0.10.5 - -## 0.10.4 - -### Patch Changes - -- Update api proto -- Updated dependencies [undefined] - - @0xsequence/abi@0.10.4 - - @0xsequence/api@0.10.4 - - @0xsequence/config@0.10.4 - - @0xsequence/network@0.10.4 - - @0xsequence/wallet@0.10.4 - -## 0.10.3 - -### Patch Changes - -- Fix loading config cross-chain -- Updated dependencies [undefined] - - @0xsequence/abi@0.10.3 - - @0xsequence/api@0.10.3 - - @0xsequence/config@0.10.3 - - @0xsequence/network@0.10.3 - - @0xsequence/wallet@0.10.3 - -## 0.10.2 - -### Patch Changes - -- - message digest fix -- Updated dependencies [undefined] - - @0xsequence/abi@0.10.2 - - @0xsequence/api@0.10.2 - - @0xsequence/config@0.10.2 - - @0xsequence/network@0.10.2 - - @0xsequence/wallet@0.10.2 - -## 0.10.1 - -### Patch Changes - -- upgrade deps -- Updated dependencies [undefined] - - @0xsequence/abi@0.10.1 - - @0xsequence/api@0.10.1 - - @0xsequence/config@0.10.1 - - @0xsequence/network@0.10.1 - - @0xsequence/wallet@0.10.1 - -## 0.10.0 - -### Minor Changes - -- Deployed new contracts with ERC1271 signer support - -### Patch Changes - -- Updated dependencies [undefined] - - @0xsequence/abi@0.10.0 - - @0xsequence/api@0.10.0 - - @0xsequence/config@0.10.0 - - @0xsequence/network@0.10.0 - - @0xsequence/wallet@0.10.0 - -## 0.9.6 - -### Patch Changes - -- Update ABIs for latest sequence contracts -- Updated dependencies [undefined] - - @0xsequence/api@0.9.6 - - @0xsequence/config@0.9.6 - - @0xsequence/network@0.9.6 - - @0xsequence/wallet@0.9.6 - - @0xsequence/abi@0.9.6 - -## 0.9.5 - -### Patch Changes - -- Implemented session class -- Updated dependencies [undefined] - - @0xsequence/api@0.9.5 - - @0xsequence/config@0.9.5 - - @0xsequence/network@0.9.5 - - @0xsequence/wallet@0.9.5 - -## 0.9.3 - -### Patch Changes - -- - minor improvements -- Updated dependencies [undefined] - - @0xsequence/abi@0.9.3 - - @0xsequence/network@0.9.3 - - @0xsequence/wallet@0.9.3 - -## 0.9.1 - -### Patch Changes - -- - patch bump -- Updated dependencies [undefined] - - @0xsequence/abi@0.9.1 - - @0xsequence/network@0.9.1 - - @0xsequence/wallet@0.9.1 - -## 0.9.0 - -### Minor Changes - -- - provider transport hardening - -### Patch Changes - -- Updated dependencies [undefined] - - @0xsequence/abi@0.9.0 - - @0xsequence/network@0.9.0 - - @0xsequence/wallet@0.9.0 - -## 0.8.5 - -### Patch Changes - -- - use latest wallet-contracts -- Updated dependencies [undefined] - - @0xsequence/abi@0.8.5 - - @0xsequence/network@0.8.5 - - @0xsequence/wallet@0.8.5 - -## 0.8.4 - -### Patch Changes - -- - minor improvements, name updates and comments -- Updated dependencies [undefined] - - @0xsequence/abi@0.8.4 - - @0xsequence/network@0.8.4 - - @0xsequence/wallet@0.8.4 - -## 0.8.3 - -### Patch Changes - -- - refinements - - - normalize signer address in config - - - provider: getWalletState() method to WalletProvider - -- Updated dependencies [undefined] - - @0xsequence/abi@0.8.3 - - @0xsequence/network@0.8.3 - - @0xsequence/wallet@0.8.3 - -## 0.8.2 - -### Patch Changes - -- - field rename and ethauth dependency bump -- Updated dependencies [undefined] - - @0xsequence/abi@0.8.2 - - @0xsequence/network@0.8.2 - - @0xsequence/wallet@0.8.2 - -## 0.8.1 - -### Patch Changes - -- - variety of optimizations -- Updated dependencies [undefined] - - @0xsequence/abi@0.8.1 - - @0xsequence/network@0.8.1 - - @0xsequence/wallet@0.8.1 - -## 0.8.0 - -### Minor Changes - -- - changeset fix - -### Patch Changes - -- Updated dependencies [undefined] - - @0xsequence/abi@0.8.0 - - @0xsequence/network@0.8.0 - - @0xsequence/wallet@0.8.0 - -## 0.7.2 - -### Patch Changes - -- package.json fix - -## 0.7.0 - -### Patch Changes - -- 6f11ed7: sequence.js, init release -- Updated dependencies [6f11ed7] - - @0xsequence/abi@0.7.0 - - @0xsequence/network@0.7.0 - - @0xsequence/wallet@0.7.0 diff --git a/old/packages/auth/README.md b/old/packages/auth/README.md deleted file mode 100644 index 33f707235..000000000 --- a/old/packages/auth/README.md +++ /dev/null @@ -1,4 +0,0 @@ -@0xsequence/auth -================ - -See [0xsequence project page](https://github.com/0xsequence/sequence.js). diff --git a/old/packages/auth/hardhat.config.js b/old/packages/auth/hardhat.config.js deleted file mode 100644 index eaca50531..000000000 --- a/old/packages/auth/hardhat.config.js +++ /dev/null @@ -1,15 +0,0 @@ -/** - * @type import('hardhat/config').HardhatUserConfig - */ -module.exports = { - solidity: '0.7.6', - - networks: { - hardhat: { - chainId: 31337, - accounts: { - mnemonic: 'ripple axis someone ridge uniform wrist prosper there frog rate olympic knee' - } - } - } -} diff --git a/old/packages/auth/package.json b/old/packages/auth/package.json deleted file mode 100644 index 521044eb2..000000000 --- a/old/packages/auth/package.json +++ /dev/null @@ -1,49 +0,0 @@ -{ - "name": "@0xsequence/auth", - "version": "2.3.8", - "description": "auth sub-package for Sequence", - "repository": "https://github.com/0xsequence/sequence.js/tree/master/packages/auth", - "source": "src/index.ts", - "main": "dist/0xsequence-auth.cjs.js", - "module": "dist/0xsequence-auth.esm.js", - "author": "Horizon Blockchain Games", - "license": "Apache-2.0", - "scripts": { - "test": "pnpm test:concurrently 'pnpm test:run'", - "test:run": "pnpm test:file tests/**/*.spec.ts", - "test:file": "NODE_OPTIONS='--import tsx' mocha --timeout 60000", - "test:concurrently": "concurrently -k --success first 'pnpm start:hardhat > /dev/null' ", - "start:hardhat": "hardhat node --port 9546", - "typecheck": "tsc --noEmit" - }, - "dependencies": { - "@0xsequence/abi": "workspace:*", - "@0xsequence/account": "workspace:*", - "@0xsequence/api": "workspace:*", - "@0xsequence/core": "workspace:*", - "@0xsequence/ethauth": "^1.0.0", - "@0xsequence/indexer": "workspace:*", - "@0xsequence/metadata": "workspace:*", - "@0xsequence/migration": "workspace:*", - "@0xsequence/network": "workspace:*", - "@0xsequence/sessions": "workspace:*", - "@0xsequence/signhub": "workspace:*", - "@0xsequence/wallet": "workspace:*", - "@0xsequence/utils": "workspace:*" - }, - "peerDependencies": { - "ethers": ">=6" - }, - "devDependencies": { - "@0xsequence/tests": "workspace:*", - "@0xsequence/wallet-contracts": "^3.0.1", - "concurrently": "^9.0.1", - "ethers": "6.13.4", - "hardhat": "^2.22.14", - "mockttp": "^3.6.0" - }, - "files": [ - "src", - "dist" - ] -} diff --git a/old/packages/auth/src/authorization.ts b/old/packages/auth/src/authorization.ts deleted file mode 100644 index 1eacdd7a8..000000000 --- a/old/packages/auth/src/authorization.ts +++ /dev/null @@ -1,81 +0,0 @@ -import { ethers } from 'ethers' -import { ETHAuth, Proof } from '@0xsequence/ethauth' -import { ChainIdLike, toChainIdNumber } from '@0xsequence/network' -import { TypedData } from '@0xsequence/utils' -import { Signer } from '@0xsequence/wallet' -import { Account } from '@0xsequence/account' -import { DEFAULT_SESSION_EXPIRATION } from './services' - -export interface AuthorizationOptions { - // app name string, ie 'Skyweaver' - app?: string - - // origin hostname of encoded in the message, ie. 'play.skyweaver.net' - origin?: string - - // expiry in seconds encoded in the message - expiry?: number - - // nonce for the authorization request - nonce?: number -} - -export interface ETHAuthProof { - // eip712 typed-data payload for ETHAuth domain as input - typedData: TypedData - - // signature encoded in an ETHAuth proof string - proofString: string -} - -// signAuthorization will perform an EIP712 typed-data message signing of ETHAuth domain via the provided -// Signer and authorization options. -export const signAuthorization = async ( - signer: Signer | Account, - chainId: ChainIdLike, - options: AuthorizationOptions -): Promise => { - const address = ethers.getAddress(await signer.getAddress()) - if (!address || address === '' || address === '0x') { - throw ErrAccountIsRequired - } - - const proof = new Proof() - proof.address = address - - if (!options || !options.app || options.app === '') { - throw new AuthError('authorization options requires app to be set') - } - proof.claims.app = options.app - proof.claims.ogn = options.origin - proof.claims.n = options.nonce - - proof.setExpiryIn(options.expiry ? Math.max(options.expiry, 200) : DEFAULT_SESSION_EXPIRATION) - - const typedData = proof.messageTypedData() - - const chainIdNumber = toChainIdNumber(chainId) - - proof.signature = await (signer instanceof Account - ? // Account can sign EIP-6492 signatures, so it doesn't require deploying the wallet - signer.signTypedData(typedData.domain, typedData.types, typedData.message, chainIdNumber, 'eip6492') - : signer.signTypedData(typedData.domain, typedData.types, typedData.message, chainIdNumber)) - - const ethAuth = new ETHAuth() - const proofString = await ethAuth.encodeProof(proof, true) - - return { - typedData, - proofString - } -} - -// TODO: review...... -export class AuthError extends Error { - constructor(message?: string) { - super(message) - this.name = 'AuthError' - } -} - -export const ErrAccountIsRequired = new AuthError('auth error: account address is empty') diff --git a/old/packages/auth/src/index.ts b/old/packages/auth/src/index.ts deleted file mode 100644 index af64af8df..000000000 --- a/old/packages/auth/src/index.ts +++ /dev/null @@ -1,3 +0,0 @@ -export * from './authorization' -export * from './session' -export * from './proof' diff --git a/old/packages/auth/src/proof.ts b/old/packages/auth/src/proof.ts deleted file mode 100644 index 1753ef5fc..000000000 --- a/old/packages/auth/src/proof.ts +++ /dev/null @@ -1,16 +0,0 @@ -import { commons } from '@0xsequence/core' -import { Proof, ValidatorFunc } from '@0xsequence/ethauth' -import { tracker } from '@0xsequence/sessions' -import { ethers } from 'ethers' - -export const ValidateSequenceWalletProof = ( - readerFor: (chainId: number) => commons.reader.Reader, - tracker: tracker.ConfigTracker, - context: commons.context.WalletContext -): ValidatorFunc => { - return async (_provider: ethers.JsonRpcProvider, chainId: number, proof: Proof): Promise<{ isValid: boolean }> => { - const digest = proof.messageDigest() - const isValid = await readerFor(chainId).isValidSignature(proof.address, digest, proof.signature) - return { isValid } - } -} diff --git a/old/packages/auth/src/services.ts b/old/packages/auth/src/services.ts deleted file mode 100644 index fdc4bc9c9..000000000 --- a/old/packages/auth/src/services.ts +++ /dev/null @@ -1,349 +0,0 @@ -import { Account } from '@0xsequence/account' -import { SequenceAPIClient } from '@0xsequence/api' -import { ETHAuth, Proof } from '@0xsequence/ethauth' -import { Indexer, SequenceIndexer, SequenceIndexerGateway } from '@0xsequence/indexer' -import { SequenceMetadata } from '@0xsequence/metadata' -import { ChainIdLike, findNetworkConfig } from '@0xsequence/network' -import { getFetchRequest } from '@0xsequence/utils' -import { ethers } from 'ethers' - -export type SessionMeta = { - // name of the app requesting the session, used with ETHAuth - name: string - - // expiration in seconds for a session before it expires, used with ETHAuth - expiration?: number -} - -export type ServicesSettings = { - metadata: SessionMeta - sequenceApiUrl: string - sequenceApiChainId: ethers.BigNumberish - sequenceMetadataUrl: string - sequenceIndexerGatewayUrl: string -} - -export type SessionJWT = { - token: string - expiration: number -} - -export type SessionJWTPromise = { - token: Promise - expiration: number -} - -export type ProofStringPromise = { - proofString: Promise - expiration: number -} - -// Default session expiration of ETHAuth token (1 week) -export const DEFAULT_SESSION_EXPIRATION = 60 * 60 * 24 * 7 - -// Long session expiration of ETHAuth token (~1 year) -export const LONG_SESSION_EXPIRATION = 3e7 - -const EXPIRATION_JWT_MARGIN = 60 // seconds - -export class Services { - _initialAuthRequest: Promise - - // proof strings are indexed by account address and app name, see getProofStringKey() - private readonly proofStrings: Map = new Map() - - private onAuthCallbacks: ((result: PromiseSettledResult) => void)[] = [] - - private apiClient: SequenceAPIClient | undefined - private metadataClient: SequenceMetadata | undefined - private indexerClients: Map = new Map() - private indexerGateway: SequenceIndexerGateway | undefined - - private projectAccessKey?: string - - constructor( - public readonly account: Account, - public readonly settings: ServicesSettings, - public readonly status: { - jwt?: SessionJWTPromise - metadata?: SessionMeta - } = {}, - projectAccessKey?: string - ) { - this.projectAccessKey = projectAccessKey - } - - private now(): number { - return Math.floor(Date.now() / 1000) - } - - get expiration(): number { - return Math.max(this.settings.metadata.expiration ?? DEFAULT_SESSION_EXPIRATION, 120) - } - - onAuth(cb: (result: PromiseSettledResult) => void) { - this.onAuthCallbacks.push(cb) - return () => (this.onAuthCallbacks = this.onAuthCallbacks.filter(c => c !== cb)) - } - - async dump(): Promise<{ - jwt?: SessionJWT - metadata?: SessionMeta - }> { - if (!this.status.jwt) return { metadata: this.settings.metadata } - - return { - jwt: { - token: await this.status.jwt.token, - expiration: this.status.jwt.expiration - }, - metadata: this.status.metadata - } - } - - auth(maxTries: number = 5): Promise { - if (this._initialAuthRequest) return this._initialAuthRequest - - this._initialAuthRequest = (async () => { - const url = this.settings.sequenceApiUrl - if (!url) throw Error('No sequence api url') - - let jwtAuth: string | undefined - for (let i = 1; ; i++) { - try { - jwtAuth = (await this.getJWT(true)).token - break - } catch (error) { - if (i === maxTries) { - console.error(`couldn't authenticate after ${maxTries} attempts`, error) - throw error - } - } - } - - return new SequenceAPIClient(url, undefined, jwtAuth) - })() - - return this._initialAuthRequest - } - - private async getJWT(tryAuth: boolean): Promise { - const url = this.settings.sequenceApiUrl - if (!url) throw Error('No sequence api url') - - // check if we already have or are waiting for a token - if (this.status.jwt) { - const jwt = this.status.jwt - const token = await jwt.token - - if (this.now() < jwt.expiration) { - return { token, expiration: jwt.expiration } - } - - // token expired, delete it and get a new one - this.status.jwt = undefined - } - - if (!tryAuth) { - throw new Error('no auth token in memory') - } - - const proofStringKey = this.getProofStringKey() - const { proofString, expiration } = this.getProofString(proofStringKey) - - const jwt = { - token: proofString - .then(async proofString => { - const api = new SequenceAPIClient(url) - - const authResp = await api.getAuthToken({ ewtString: proofString }) - - if (authResp?.status === true && authResp.jwtToken.length !== 0) { - return authResp.jwtToken - } else { - if (!(await this.isProofStringValid(proofString))) { - this.proofStrings.delete(proofStringKey) - } - throw new Error('no auth token from server') - } - }) - .catch(reason => { - this.status.jwt = undefined - throw reason - }), - expiration - } - - this.status.jwt = jwt - - jwt.token - .then(token => { - this.onAuthCallbacks.forEach(cb => { - try { - cb({ status: 'fulfilled', value: token }) - } catch {} - }) - }) - .catch((reason: any) => { - this.onAuthCallbacks.forEach(cb => { - try { - cb({ status: 'rejected', reason }) - } catch {} - }) - }) - - const token = await jwt.token - return { token, expiration } - } - - private getProofStringKey(): string { - return `${this.account.address} - ${this.settings.metadata.name}` - } - - private async isProofStringValid(proofString: string): Promise { - try { - const ethAuth = new ETHAuth() - const chainId = BigInt(this.settings.sequenceApiChainId) - const found = findNetworkConfig(this.account.networks, chainId) - if (!found) { - throw Error('No network found') - } - ethAuth.chainId = Number(chainId) - - const network = new ethers.Network(found.name, chainId) - - // TODO: Modify ETHAuth so it can take a provider instead of a url - // ----- - // Can't pass jwt here since this is used for getting the jwt - ethAuth.provider = new ethers.JsonRpcProvider(getFetchRequest(found.rpcUrl, this.projectAccessKey), network, { - staticNetwork: network - }) - - await ethAuth.decodeProof(proofString) - - return true - } catch { - return false - } - } - - async getAPIClient(tryAuth: boolean = true): Promise { - if (!this.apiClient) { - const url = this.settings.sequenceApiUrl - if (!url) throw Error('No sequence api url') - - const jwtAuth = (await this.getJWT(tryAuth)).token - this.apiClient = new SequenceAPIClient(url, undefined, jwtAuth) - } - - return this.apiClient - } - - async getMetadataClient(tryAuth: boolean = true): Promise { - if (!this.metadataClient) { - const jwtAuth = (await this.getJWT(tryAuth)).token - this.metadataClient = new SequenceMetadata(this.settings.sequenceMetadataUrl, undefined, jwtAuth) - } - - return this.metadataClient - } - - async getIndexerClient(chainId: ChainIdLike, tryAuth: boolean = true): Promise { - const network = findNetworkConfig(this.account.networks, chainId) - if (!network) { - throw Error(`No network for chain ${chainId}`) - } - - if (!this.indexerClients.has(network.chainId)) { - if (network.indexer) { - this.indexerClients.set(network.chainId, network.indexer) - } else if (network.indexerUrl) { - const jwtAuth = (await this.getJWT(tryAuth)).token - this.indexerClients.set(network.chainId, new SequenceIndexer(network.indexerUrl, undefined, jwtAuth)) - } else { - throw Error(`No indexer url for chain ${chainId}`) - } - } - - return this.indexerClients.get(network.chainId)! - } - - async getIndexerGateway(tryAuth: boolean = true): Promise { - if (!this.indexerGateway) { - const jwtAuth = (await this.getJWT(tryAuth)).token - this.indexerGateway = new SequenceIndexerGateway(this.settings.sequenceIndexerGatewayUrl, undefined, jwtAuth) - } - - return this.indexerGateway - } - - private getProofString(key: string): ProofStringPromise { - // check if we already have or are waiting for a proof string - if (this.proofStrings.has(key)) { - const proofString = this.proofStrings.get(key)! - - if (this.now() < proofString.expiration) { - return proofString - } - - // proof string expired, delete it and make a new one - this.proofStrings.delete(key) - } - - const proof = new Proof({ - address: this.account.address - }) - - proof.claims.app = this.settings.metadata.name - if (typeof window === 'object') { - proof.claims.ogn = window.location.origin - } - proof.setExpiryIn(this.expiration) - - const ethAuth = new ETHAuth() - const chainId = BigInt(this.settings.sequenceApiChainId) - const found = findNetworkConfig(this.account.networks, chainId) - if (!found) { - throw Error('No network found') - } - ethAuth.chainId = Number(chainId) - - const network = new ethers.Network(found.name, chainId) - - // TODO: Modify ETHAuth so it can take a provider instead of a url - // ----- - // Can't pass jwt here since this is used for getting the jwt - ethAuth.provider = new ethers.JsonRpcProvider(getFetchRequest(found.rpcUrl, this.projectAccessKey), network, { - staticNetwork: network - }) - - const expiration = this.now() + this.expiration - EXPIRATION_JWT_MARGIN - - const proofString = { - proofString: Promise.resolve( - // NOTICE: TODO: Here we ask the account to sign the message - // using whatever configuration we have ON-CHAIN, this means - // that the account will still use the v1 wallet, even if the migration - // was signed. - // - // This works for Sequence webapp v1 -> v2 because all v1 configurations share the same formula - // (torus + guard), but if we ever decide to allow cross-device login, then it will not work, because - // those other signers may not be part of the configuration. - // - this.account.signDigest(proof.messageDigest(), this.settings.sequenceApiChainId, true, 'eip6492') - ) - .then(s => { - proof.signature = s - return ethAuth.encodeProof(proof, true) - }) - .catch(reason => { - this.proofStrings.delete(key) - throw reason - }), - expiration - } - - this.proofStrings.set(key, proofString) - return proofString - } -} diff --git a/old/packages/auth/src/session.ts b/old/packages/auth/src/session.ts deleted file mode 100644 index 18f08a6e1..000000000 --- a/old/packages/auth/src/session.ts +++ /dev/null @@ -1,400 +0,0 @@ -import { ChainId, NetworkConfig, allNetworks, findNetworkConfig } from '@0xsequence/network' -import { jwtDecodeClaims } from '@0xsequence/utils' -import { Account } from '@0xsequence/account' -import { ethers } from 'ethers' -import { tracker, trackers } from '@0xsequence/sessions' -import { Orchestrator, SignatureOrchestrator, signers } from '@0xsequence/signhub' -import { migrator } from '@0xsequence/migration' -import { commons, universal, v1 } from '@0xsequence/core' -import { Services, ServicesSettings, SessionJWT, SessionMeta } from './services' - -export interface SessionDumpV1 { - config: Omit & { address?: string } - jwt?: SessionJWT - metadata: SessionMeta -} - -export interface SessionDumpV2 { - version: 2 - address: string - jwt?: SessionJWT - metadata?: SessionMeta -} - -export function isSessionDumpV1(obj: any): obj is SessionDumpV1 { - return obj.config && obj.metadata && obj.version === undefined -} - -export function isSessionDumpV2(obj: any): obj is SessionDumpV2 { - return obj.version === 2 && obj.address -} - -// These chains are always validated for migrations -// if they are not available, the login will fail -export const CRITICAL_CHAINS = [1, 137] - -export type SessionSettings = { - services?: ServicesSettings - contexts: commons.context.VersionedContext - networks: NetworkConfig[] - tracker: tracker.ConfigTracker & migrator.PresignedMigrationTracker -} - -export const SessionSettingsDefault: SessionSettings = { - contexts: commons.context.defaultContexts, - networks: allNetworks, - tracker: new trackers.remote.RemoteConfigTracker('https://sessions.sequence.app') -} - -export class Session { - constructor( - public networks: NetworkConfig[], - public contexts: commons.context.VersionedContext, - public account: Account, - public services?: Services - ) {} - - async dump(): Promise { - const base = { - version: 2 as const, - address: this.account.address - } - - if (this.services) { - return { - ...base, - ...(await this.services.dump()) - } - } - - return base - } - - static async singleSigner(args: { - settings?: Partial - signer: ethers.Signer | signers.SapientSigner | string - selectWallet?: (wallets: string[]) => Promise - onAccountAddress?: (address: string) => void - onMigration?: (account: Account) => Promise - editConfigOnMigration?: (config: commons.config.Config) => commons.config.Config - projectAccessKey: string - }): Promise { - let { signer } = args - - if (typeof signer === 'string') { - signer = new ethers.Wallet(signer) - } - - const orchestrator = new Orchestrator([signer]) - const referenceSigner = await signer.getAddress() - const threshold = 1 - const addSigners = [ - { - weight: 1, - address: referenceSigner - } - ] - - const selectWallet = - args.selectWallet || - (async (wallets: string[]) => { - if (wallets.length === 0) return undefined - - // Find a wallet that was originally created - // as a 1/1 of the reference signer - const tracker = args.settings?.tracker ?? SessionSettingsDefault.tracker - - const configs = await Promise.all( - wallets.map(async wallet => { - const imageHash = await tracker.imageHashOfCounterfactualWallet({ wallet }) - - return { - wallet, - config: imageHash && (await tracker.configOfImageHash({ imageHash: imageHash.imageHash })) - } - }) - ) - - for (const config of configs) { - if (!config.config) { - continue - } - - const coder = universal.genericCoderFor(config.config.version) - const signers = coder.config.signersOf(config.config) - - if (signers.length === 1 && signers[0].address === referenceSigner) { - return config.wallet - } - } - - return undefined - }) - - return Session.open({ - ...args, - orchestrator, - referenceSigner, - threshold, - addSigners, - selectWallet - }) - } - - static async open(args: { - settings?: Partial - orchestrator: SignatureOrchestrator - addSigners?: commons.config.SimpleSigner[] - referenceSigner: string - threshold?: ethers.BigNumberish - selectWallet: (wallets: string[]) => Promise - onAccountAddress?: (address: string) => void - editConfigOnMigration?: (config: commons.config.Config) => commons.config.Config - onMigration?: (account: Account) => Promise - projectAccessKey?: string - }): Promise { - const { - referenceSigner, - threshold, - addSigners, - selectWallet, - onAccountAddress, - settings, - editConfigOnMigration, - onMigration, - orchestrator, - projectAccessKey - } = args - - const { contexts, networks, tracker, services } = { ...SessionSettingsDefault, ...settings } - - // The reference network is mainnet, if mainnet is not available, we use the first network - const referenceChainId = - findNetworkConfig(networks, settings?.services?.sequenceApiChainId ?? ChainId.MAINNET)?.chainId ?? networks[0]?.chainId - if (!referenceChainId) throw Error('No reference chain found') - - const foundWallets = await tracker.walletsOfSigner({ signer: referenceSigner }) - const selectedWallet = await selectWallet(foundWallets.map(w => w.wallet)) - - let account: Account - - if (selectedWallet) { - onAccountAddress?.(selectedWallet) - - // existing account, lets update it - account = new Account({ - address: selectedWallet, - tracker, - networks, - contexts, - orchestrator, - projectAccessKey - }) - - // Get the latest configuration of the wallet (on the reference chain) - // now this configuration should be of the latest version, so we can start - // manipulating it. - - // NOTICE: We are performing the wallet update on a single chain, assuming that - // all other networks have the same configuration. This is not always true. - if (addSigners && addSigners.length > 0) { - // New wallets never need migrations - // (because we create them on the latest version) - let status = await account.status(referenceChainId) - - // If the wallet was created originally on v2, then we can skip - // the migration checks all together. - if (status.original.version !== status.version || account.version !== status.version) { - // Account may not have been migrated yet, so we need to check - // if it has been migrated and if not, migrate it (in all chains) - const { migratedAllChains: isFullyMigrated, failedChains } = await account.isMigratedAllChains() - - // Failed chains must not contain mainnet or polygon, otherwise we cannot proceed. - if (failedChains.some(c => CRITICAL_CHAINS.includes(c))) { - throw Error(`Failed to fetch account status on ${failedChains.join(', ')}`) - } - - if (!isFullyMigrated) { - // This is an oportunity for whoever is opening the session to - // feed the orchestrator with more signers, so that the migration - // can be completed. - if (onMigration && !(await onMigration(account))) { - throw Error('Migration cancelled, cannot open session') - } - - const { failedChains } = await account.signAllMigrations(editConfigOnMigration || (c => c)) - if (failedChains.some(c => CRITICAL_CHAINS.includes(c))) { - throw Error(`Failed to sign migrations on ${failedChains.join(', ')}`) - } - - // If we are using a dedupped tracker we need to invalidate the cache - // otherwise we run the risk of not seeing the signed migrations reflected. - if (trackers.isDedupedTracker(tracker)) { - tracker.invalidateCache() - } - - let isFullyMigrated2: boolean - ;[isFullyMigrated2, status] = await Promise.all([ - account.isMigratedAllChains().then(r => r.migratedAllChains), - account.status(referenceChainId) - ]) - - if (!isFullyMigrated2) throw Error('Failed to migrate account') - } - } - - // NOTICE: We only need to do this because the API will not be able to - // validate the v2 signature (if the account has an onchain version of 1) - // we could speed this up by sending the migration alongside the jwt request - // and letting the API validate it offchain. - if (status.onChain.version !== status.version) { - await account.doBootstrap(referenceChainId, undefined, status) - } - - const prevConfig = status.config - const nextConfig = account.coders.config.editConfig(prevConfig, { - add: addSigners, - threshold - }) - - // Only update the onchain config if the imageHash has changed - if (account.coders.config.imageHashOf(prevConfig) !== account.coders.config.imageHashOf(nextConfig)) { - const newConfig = account.coders.config.editConfig(nextConfig, { - checkpoint: account.coders.config.checkpointOf(prevConfig) + 1n - }) - - await account.updateConfig(newConfig) - } - } - } else { - if (!addSigners || addSigners.length === 0) { - throw Error('Cannot create new account without signers') - } - - if (!threshold) { - throw Error('Cannot create new account without threshold') - } - - // fresh account - account = await Account.new({ - config: { threshold, checkpoint: 0, signers: addSigners }, - tracker, - contexts, - orchestrator, - networks, - projectAccessKey - }) - - onAccountAddress?.(account.address) - - // sign a digest and send it to the tracker - // otherwise the tracker will not know about this account - await account.publishWitness() - - // safety check, the remove tracker should be able to find - // this account for the reference signer - const foundWallets = await tracker.walletsOfSigner({ signer: referenceSigner, noCache: true }) - if (!foundWallets.some(w => w.wallet === account.address)) { - throw Error('Account not found on tracker') - } - } - - let servicesObj: Services | undefined - - if (services) { - servicesObj = new Services(account, services) - servicesObj.auth() // fire and forget - - servicesObj.onAuth(result => { - if (result.status === 'fulfilled') { - account.setJwt(result.value) - } - }) - } - - return new Session(networks, contexts, account, servicesObj) - } - - static async load(args: { - settings?: Partial - orchestrator: SignatureOrchestrator - dump: SessionDumpV1 | SessionDumpV2 - editConfigOnMigration: (config: commons.config.Config) => commons.config.Config - onMigration?: (account: Account) => Promise - projectAccessKey?: string - }): Promise { - const { dump, settings, editConfigOnMigration, onMigration, orchestrator, projectAccessKey } = args - const { contexts, networks, tracker, services } = { ...SessionSettingsDefault, ...settings } - - let account: Account - - if (isSessionDumpV1(dump)) { - // Old configuration format used to also contain an "address" field - // but if it doesn't, it means that it was a "counterfactual" account - // not yet updated, so we need to compute the address - const oldAddress = - dump.config.address || - commons.context.addressOf(contexts[1], v1.config.ConfigCoder.imageHashOf({ ...dump.config, version: 1 })) - - const jwtExpired = (dump.jwt?.expiration ?? 0) < Math.floor(Date.now() / 1000) - - account = new Account({ - address: oldAddress, - tracker, - networks, - contexts, - orchestrator, - jwt: jwtExpired ? undefined : dump.jwt?.token, - projectAccessKey - }) - - // TODO: This property may not hold if the user adds a new network - if (!(await account.isMigratedAllChains().then(r => r.migratedAllChains))) { - // This is an oportunity for whoever is opening the session to - // feed the orchestrator with more signers, so that the migration - // can be completed. - if (onMigration && !(await onMigration(account))) { - throw Error('Migration cancelled, cannot open session') - } - - console.log('Migrating account...') - await account.signAllMigrations(editConfigOnMigration) - if (!(await account.isMigratedAllChains().then(r => r.migratedAllChains))) throw Error('Failed to migrate account') - } - - // We may need to update the JWT if the account has been migrated - } else if (isSessionDumpV2(dump)) { - const jwtExpired = (dump.jwt?.expiration ?? 0) < Math.floor(Date.now() / 1000) - - account = new Account({ - address: dump.address, - tracker, - networks, - contexts, - orchestrator, - jwt: jwtExpired ? undefined : dump.jwt?.token, - projectAccessKey - }) - } else { - throw Error('Invalid dump format') - } - - let servicesObj: Services | undefined - - if (services) { - servicesObj = new Services( - account, - services, - dump.jwt && { - jwt: { - token: Promise.resolve(dump.jwt.token), - expiration: dump.jwt.expiration ?? jwtDecodeClaims(dump.jwt.token).exp - }, - metadata: dump.metadata - } - ) - } - - return new Session(networks, contexts, account, servicesObj) - } -} diff --git a/old/packages/auth/tests/session.spec.ts b/old/packages/auth/tests/session.spec.ts deleted file mode 100644 index bba425b9a..000000000 --- a/old/packages/auth/tests/session.spec.ts +++ /dev/null @@ -1,1437 +0,0 @@ -import { Account } from '@0xsequence/account' -import { commons, v1, v2 } from '@0xsequence/core' -import { ETHAuth, Proof } from '@0xsequence/ethauth' -import { migrator } from '@0xsequence/migration' -import { NetworkConfig } from '@0xsequence/network' -import { LocalRelayer } from '@0xsequence/relayer' -import { tracker, trackers } from '@0xsequence/sessions' -import { Orchestrator, SignatureOrchestrator } from '@0xsequence/signhub' -import * as utils from '@0xsequence/tests' -import { CallReceiverMock, HookCallerMock } from '@0xsequence/wallet-contracts' -import * as chai from 'chai' -import chaiAsPromised from 'chai-as-promised' -import { ethers } from 'ethers' -import * as mockServer from 'mockttp' -import { Session, SessionDumpV1, SessionSettings, ValidateSequenceWalletProof } from '../src' -import { delay, mockDate } from './utils' - -const CallReceiverMockArtifact = require('@0xsequence/wallet-contracts/artifacts/contracts/mocks/CallReceiverMock.sol/CallReceiverMock.json') -const HookCallerMockArtifact = require('@0xsequence/wallet-contracts/artifacts/contracts/mocks/HookCallerMock.sol/HookCallerMock.json') - -const { expect } = chai.use(chaiAsPromised) - -const deterministic = false - -type EthereumInstance = { - chainId?: number - providerUrl?: string - provider?: ethers.JsonRpcProvider - signer?: ethers.Signer -} - -class CountingSigner extends ethers.AbstractSigner { - private _signingRequests: number = 0 - - constructor(private readonly signer: ethers.Signer) { - super() - } - - get signingRequests(): number { - return this._signingRequests - } - - getAddress(): Promise { - return this.signer.getAddress() - } - - signMessage(message: ethers.BytesLike): Promise { - this._signingRequests++ - return this.signer.signMessage(message) - } - - signTransaction(transaction: ethers.TransactionRequest): Promise { - this._signingRequests++ - return this.signer.signTransaction(transaction) - } - - signTypedData( - domain: ethers.TypedDataDomain, - types: Record, - value: Record - ): Promise { - this._signingRequests++ - return this.signer.signTypedData(domain, types, value) - } - - connect(provider: ethers.Provider): ethers.Signer { - return this.signer.connect(provider) - } -} - -describe('Wallet integration', function () { - const ethnode: EthereumInstance = {} - - let relayer: LocalRelayer - let callReceiver: CallReceiverMock - let hookCaller: HookCallerMock - - let contexts: commons.context.VersionedContext - let networks: NetworkConfig[] - - let tracker: tracker.ConfigTracker & migrator.PresignedMigrationTracker - let orchestrator: SignatureOrchestrator - let simpleSettings: SessionSettings - - before(async () => { - // Provider from hardhat without a server instance - ethnode.providerUrl = `http://127.0.0.1:9546/` - ethnode.provider = new ethers.JsonRpcProvider(ethnode.providerUrl) - - const chainId = (await ethnode.provider.getNetwork()).chainId - ethnode.signer = await ethnode.provider.getSigner() - ethnode.chainId = Number(chainId) - - // Deploy local relayer - relayer = new LocalRelayer(ethnode.signer) - - networks = [ - { - name: 'local', - chainId: Number(chainId), - provider: ethnode.provider, - isDefaultChain: true, - relayer, - rpcUrl: '', - nativeToken: { - symbol: 'ETH', - name: 'Ether', - decimals: 18 - } - } - ] as NetworkConfig[] - - contexts = await utils.context.deploySequenceContexts(ethnode.signer) - - // Deploy call receiver mock - callReceiver = (await new ethers.ContractFactory( - CallReceiverMockArtifact.abi, - CallReceiverMockArtifact.bytecode, - ethnode.signer - ) - .deploy() - .then(tx => tx.waitForDeployment())) as CallReceiverMock - - // Deploy hook caller mock - hookCaller = (await new ethers.ContractFactory(HookCallerMockArtifact.abi, HookCallerMockArtifact.bytecode, ethnode.signer) - .deploy() - .then(tx => tx.waitForDeployment())) as HookCallerMock - - tracker = new trackers.local.LocalConfigTracker(ethnode.provider!) - orchestrator = new Orchestrator([]) - - simpleSettings = { - contexts, - networks, - tracker, - services: { - metadata: { - name: 'test' - }, - sequenceApiUrl: '', - sequenceApiChainId: chainId, - sequenceMetadataUrl: '' - } - } - }) - - it('Should open a new session', async () => { - const referenceSigner = randomWallet('Should open a new session') - orchestrator.setSigners([referenceSigner]) - - const session = await Session.open({ - orchestrator, - settings: simpleSettings, - referenceSigner: referenceSigner.address, - addSigners: [{ address: referenceSigner.address, weight: 1 }], - threshold: 1, - selectWallet: async ws => { - expect(ws.length).to.equal(0) - return undefined - }, - editConfigOnMigration: config => config - }) - - expect(session.account.address).to.not.equal(ethers.ZeroAddress) - - const status = await session.account.status(networks[0].chainId) - - expect(v2.config.isWalletConfig(status.config)).to.equal(true) - const configv2 = status.config as v2.config.WalletConfig - - expect(BigInt(configv2.threshold)).to.equal(1n) - expect(v2.config.isSignerLeaf(configv2.tree)).to.equal(true) - - const leaf = configv2.tree as v2.config.SignerLeaf - expect(leaf.address).to.equal(referenceSigner.address) - expect(BigInt(leaf.weight)).to.equal(1n) - - await session.account.sendTransaction({ to: referenceSigner.address }, networks[0].chainId) - }) - - it('Should dump and load a session', async () => { - const referenceSigner = randomWallet('Should dump and load a session') - orchestrator.setSigners([referenceSigner]) - - const session = await Session.open({ - settings: simpleSettings, - orchestrator, - referenceSigner: referenceSigner.address, - addSigners: [{ address: referenceSigner.address, weight: 1 }], - threshold: 1, - selectWallet: async ws => { - expect(ws.length).to.equal(0) - return undefined - }, - editConfigOnMigration: config => config - }) - - const dump = await session.dump() - - const session2 = await Session.load({ - settings: simpleSettings, - orchestrator, - dump, - editConfigOnMigration: config => config - }) - - await session.account.sendTransaction({ to: referenceSigner.address }, networks[0].chainId) - - expect(session.account.address).to.equal(session2.account.address) - }) - - it('Should open an existing session', async () => { - const referenceSigner = randomWallet('Should open an existing session') - orchestrator.setSigners([referenceSigner]) - - const session = await Session.open({ - settings: simpleSettings, - orchestrator, - referenceSigner: referenceSigner.address, - addSigners: [{ address: referenceSigner.address, weight: 1 }], - threshold: 1, - selectWallet: async ws => ws[0] ?? undefined, - editConfigOnMigration: config => config - }) - - const newSigner = randomWallet('Should open an existing session 2') - const session2 = await Session.open({ - settings: simpleSettings, - orchestrator, - referenceSigner: referenceSigner.address, - addSigners: [{ address: newSigner.address, weight: 1 }], - threshold: 2, - selectWallet: async ws => { - expect(ws.length).to.equal(1) - return ws[0] - }, - editConfigOnMigration: config => config - }) - - const newConfig = (await session2.account.status(networks[0].chainId).then(s => s.config)) as v2.config.WalletConfig - - expect(session2.account.address).to.equal(session.account.address) - expect(BigInt(newConfig.threshold)).to.equal(2n) - - const newSigners = v2.config.signersOf(newConfig.tree).map(s => s.address) - expect(newSigners.length).to.equal(2) - expect(newSigners).to.include(newSigner.address) - expect(newSigners).to.include(referenceSigner.address) - expect(BigInt((newConfig.tree as any).left.weight)).to.equal(1n) - expect(BigInt((newConfig.tree as any).right.weight)).to.equal(1n) - }) - - it('Should create a new account if selectWallet returns undefined', async () => { - const referenceSigner = randomWallet('Should create a new account if selectWallet returns undefined') - orchestrator.setSigners([referenceSigner]) - - const oldSession = await Session.open({ - settings: simpleSettings, - orchestrator, - referenceSigner: referenceSigner.address, - addSigners: [{ address: referenceSigner.address, weight: 1 }], - threshold: 1, - selectWallet: async () => undefined, - editConfigOnMigration: config => config - }) - - const newSigner = randomWallet('Should create a new account if selectWallet returns undefined 2') - const newSession = await Session.open({ - settings: simpleSettings, - orchestrator, - referenceSigner: referenceSigner.address, - addSigners: [ - { address: referenceSigner.address, weight: 1 }, - { address: newSigner.address, weight: 1 } - ], - threshold: 1, - selectWallet: async wallets => { - expect(wallets.length).to.equal(1) - return undefined - }, - editConfigOnMigration: config => config - }) - - expect(newSession.account.address).to.not.equal(oldSession.account.address) - }) - - it('Should select between two wallets using selectWallet', async () => { - const referenceSigner = randomWallet('Should select between two wallets using selectWallet') - orchestrator.setSigners([referenceSigner]) - - const oldSession1 = await Session.open({ - settings: simpleSettings, - orchestrator, - referenceSigner: referenceSigner.address, - addSigners: [{ address: referenceSigner.address, weight: 1 }], - threshold: 1, - selectWallet: async () => undefined, - editConfigOnMigration: config => config - }) - - const oldSession2 = await Session.open({ - settings: simpleSettings, - orchestrator, - referenceSigner: referenceSigner.address, - addSigners: [{ address: referenceSigner.address, weight: 2 }], - threshold: 2, - selectWallet: async () => undefined, - editConfigOnMigration: config => config - }) - - const newSigner = randomWallet('Should select between two wallets using selectWallet 2') - const newSession1 = await Session.open({ - settings: simpleSettings, - orchestrator, - referenceSigner: referenceSigner.address, - addSigners: [{ address: newSigner.address, weight: 1 }], - threshold: 1, - selectWallet: async wallets => { - expect(wallets.length).to.equal(2) - expect(wallets).to.include(oldSession1.account.address) - expect(wallets).to.include(oldSession2.account.address) - return oldSession1.account.address - }, - editConfigOnMigration: config => config - }) - - expect(newSession1.account.address).to.equal(oldSession1.account.address) - - const newSession2 = await Session.open({ - settings: simpleSettings, - orchestrator, - referenceSigner: referenceSigner.address, - addSigners: [{ address: newSigner.address, weight: 1 }], - threshold: 1, - selectWallet: async wallets => { - expect(wallets.length).to.equal(2) - expect(wallets).to.include(oldSession1.account.address) - expect(wallets).to.include(oldSession2.account.address) - return oldSession2.account.address - }, - editConfigOnMigration: config => config - }) - - expect(newSession2.account.address).to.equal(oldSession2.account.address) - - await newSession1.account.sendTransaction([], networks[0].chainId) - await newSession2.account.sendTransaction([], networks[0].chainId) - }) - - it('Should re-open a session after sending a transaction', async () => { - const referenceSigner = randomWallet('Should re-open a session after sending a transaction') - const signer1 = randomWallet('Should re-open a session after sending a transaction 2') - orchestrator.setSigners([referenceSigner, signer1]) - - const session = await Session.open({ - settings: simpleSettings, - orchestrator, - referenceSigner: referenceSigner.address, - addSigners: [ - { - address: referenceSigner.address, - weight: 1 - }, - { - address: signer1.address, - weight: 1 - } - ], - threshold: 2, - selectWallet: async () => undefined, - editConfigOnMigration: config => config - }) - - await session.account.sendTransaction([], networks[0].chainId) - - const signer2 = randomWallet('Should re-open a session after sending a transaction 3') - - const newSession = await Session.open({ - settings: simpleSettings, - orchestrator, - referenceSigner: referenceSigner.address, - addSigners: [{ address: signer2.address, weight: 1 }], - threshold: 2, - selectWallet: async wallets => { - expect(wallets.length).to.equal(1) - return wallets[0] - }, - editConfigOnMigration: config => config - }) - - expect(newSession.account.address).to.equal(session.account.address) - - await newSession.account.sendTransaction([], networks[0].chainId) - }) - - describe('Migrate sessions', () => { - let ogAccount: Account - let referenceSigner: ethers.Wallet - let referenceSignerIndex = 1 - let v1SessionDump: SessionDumpV1 - - beforeEach(async () => { - // Create a wallet using v1 - referenceSigner = randomWallet(`Migrate sessions ${referenceSignerIndex++}`) - orchestrator.setSigners([referenceSigner]) - - ogAccount = await Account.new({ - config: { threshold: 1, checkpoint: 0, signers: [{ address: referenceSigner.address, weight: 1 }] }, - tracker, - contexts: { 1: contexts[1] }, - orchestrator, - networks, - migrations: { - 0: { - version: 1, - configCoder: v1.config.ConfigCoder, - signatureCoder: v1.signature.SignatureCoder - } as any - } - }) - - await ogAccount.publishWitness() - - v1SessionDump = { - config: { - threshold: 1, - signers: [{ address: referenceSigner.address, weight: 1 }] - }, - metadata: { - name: 'Test' - } - } - }) - - it('Should open and migrate old session, without dump', async () => { - const newSigner = randomWallet('Should open and migrate old session, without dump') - orchestrator.setSigners([referenceSigner, newSigner]) - - const newSession = await Session.open({ - settings: simpleSettings, - orchestrator, - referenceSigner: referenceSigner.address, - addSigners: [{ address: newSigner.address, weight: 1 }], - threshold: 1, - selectWallet: async wallets => { - expect(wallets.length).to.equal(1) - return wallets[0] - }, - editConfigOnMigration: config => config - }) - - expect(newSession.account.address).to.equal(ogAccount.address) - const status = await newSession.account.status(networks[0].chainId) - expect(status.version).to.equal(2) - expect(status.fullyMigrated).to.be.true - - await newSession.account.sendTransaction([], networks[0].chainId) - }) - - it('Should open and migrate dump', async () => { - const newSession = await Session.load({ - settings: simpleSettings, - orchestrator, - dump: v1SessionDump, - editConfigOnMigration: config => config - }) - - expect(newSession.account.address).to.equal(ogAccount.address) - - const status = await newSession.account.status(networks[0].chainId) - expect(status.version).to.equal(2) - expect(status.fullyMigrated).to.be.true - - await newSession.account.sendTransaction([], networks[0].chainId) - }) - - describe('After updating old wallet', () => { - let newSignerIndex = 1 - - beforeEach(async () => { - const status = await ogAccount.status(networks[0].chainId) - const wallet = ogAccount.walletForStatus(networks[0].chainId, status) - - const newSigner = randomWallet(`After updating old wallet ${newSignerIndex++}`) - orchestrator.setSigners([referenceSigner, newSigner]) - - const uptx = await wallet.buildUpdateConfigurationTransaction({ - threshold: 2, - signers: [ - { address: referenceSigner.address, weight: 1 }, - { address: newSigner.address, weight: 1 } - ] - } as v1.config.WalletConfig) - - const suptx = await wallet.signTransactionBundle(uptx) - await wallet.relayer?.relay(suptx) - - v1SessionDump = { - ...v1SessionDump, - config: { - ...v1SessionDump.config, - address: wallet.address - } - } - }) - - it('Should open and migrate old session', async () => { - const newSigner2 = randomWallet('Should open and migrate old session') - - const newSession = await Session.open({ - settings: simpleSettings, - orchestrator, - referenceSigner: referenceSigner.address, - addSigners: [{ address: newSigner2.address, weight: 1 }], - threshold: 2, - selectWallet: async wallets => { - expect(wallets.length).to.equal(1) - return wallets[0] - }, - editConfigOnMigration: config => config - }) - - expect(newSession.account.address).to.equal(ogAccount.address) - const status = await newSession.account.status(networks[0].chainId) - expect(status.version).to.equal(2) - expect(status.fullyMigrated).to.be.true - - orchestrator.setSigners([referenceSigner, newSigner2]) - await newSession.account.sendTransaction([], networks[0].chainId) - }) - - it('Should open and migrate dump', async () => { - const newSession = await Session.load({ - settings: simpleSettings, - orchestrator, - dump: v1SessionDump, - editConfigOnMigration: config => config - }) - - expect(newSession.account.address).to.equal(ogAccount.address) - - const status = await newSession.account.status(networks[0].chainId) - expect(status.version).to.equal(2) - expect(status.fullyMigrated).to.be.true - - await newSession.account.sendTransaction([], networks[0].chainId) - }) - }) - }) - - describe('JWT Auth', () => { - let server: mockServer.Mockttp - let fakeJwt: string - let fakeJwtIndex = 1 - let proofAddress: string - - let delayMs: number = 0 - let totalCount: number = 0 - let recoverCount: { [address: string]: number } = {} - - let alwaysFail: boolean = false - - const sequenceApiUrl = 'http://127.0.0.1:8099' - let settings: SessionSettings - - beforeEach(() => { - settings = { - ...simpleSettings, - services: { - ...simpleSettings.services!, - sequenceApiUrl - } - } - - fakeJwt = ethers.hexlify(randomBytes(64, `JWT Auth ${fakeJwtIndex++}`)) - - server = mockServer.getLocal() - server.start(8099) - server.forPost('/rpc/API/GetAuthToken').thenCallback(async request => { - if (delayMs !== 0) await delay(delayMs) - - const validator = ValidateSequenceWalletProof( - () => new commons.reader.OnChainReader(networks[0].provider!), - tracker, - contexts[2] - ) - - const ethauth = new ETHAuth(validator) - - ethauth.chainId = ethnode.chainId! - ethauth.configJsonRpcProvider(ethnode.providerUrl!) - - totalCount++ - - if (alwaysFail) return { statusCode: 400 } - - try { - const proof = await ethauth.decodeProof((await request.body.getJson())!['ewtString']) - proofAddress = ethers.getAddress(proof.address) - - if (recoverCount[proofAddress]) { - recoverCount[proofAddress]++ - } else { - recoverCount[proofAddress] = 1 - } - - return { - statusCode: 200, - body: JSON.stringify({ - status: true, - jwtToken: fakeJwt - }) - } - } catch { - if (recoverCount['error']) { - recoverCount['error']++ - } else { - recoverCount['error'] = 1 - } - - return { - statusCode: 401 - } - } - }) - }) - - afterEach(() => { - server.stop() - delayMs = 0 - totalCount = 0 - recoverCount = {} - alwaysFail = false - }) - - it('Should get JWT token', async () => { - const referenceSigner = randomWallet('Should get JWT token') - orchestrator.setSigners([referenceSigner]) - - const session = await Session.open({ - settings, - orchestrator, - referenceSigner: referenceSigner.address, - addSigners: [{ address: referenceSigner.address, weight: 1 }], - threshold: 1, - selectWallet: async () => undefined, - editConfigOnMigration: config => config - }) - - await session.services?.auth() - expect(totalCount).to.equal(1) - expect(await session.services?.status.jwt?.token).to.equal(fakeJwt) - expect(proofAddress).to.equal(session.account.address) - }) - - it('Should get JWT after updating session', async () => { - const referenceSigner = randomWallet('Should get JWT after updating session') - orchestrator.setSigners([referenceSigner]) - - await Session.open({ - settings: simpleSettings, - orchestrator, - referenceSigner: referenceSigner.address, - addSigners: [{ address: referenceSigner.address, weight: 1 }], - threshold: 1, - selectWallet: async () => undefined, - editConfigOnMigration: config => config - }) - - const newSigner = randomWallet('Should get JWT after updating session 2') - const session = await Session.open({ - settings, - orchestrator, - referenceSigner: referenceSigner.address, - addSigners: [{ address: newSigner.address, weight: 1 }], - threshold: 1, - selectWallet: async ws => ws[0], - editConfigOnMigration: config => config - }) - - await session.services?.auth() - - expect(totalCount).to.equal(1) - expect(await session.services?.status.jwt?.token).to.equal(fakeJwt) - expect(proofAddress).to.equal(session.account.address) - }) - - it('Should get JWT during first session creation', async () => { - const referenceSigner = randomWallet('Should get JWT during first session creation') - orchestrator.setSigners([referenceSigner]) - - const session = await Session.open({ - settings, - orchestrator, - referenceSigner: referenceSigner.address, - addSigners: [{ address: referenceSigner.address, weight: 1 }], - threshold: 1, - selectWallet: async () => undefined, - editConfigOnMigration: config => config - }) - - await session.services?._initialAuthRequest - - expect(totalCount).to.equal(1) - expect(recoverCount[session.account.address]).to.equal(1) - - expect(await session.services?.status.jwt?.token).to.equal(fakeJwt) - }) - - it('Should get JWT during session opening', async () => { - delayMs = 500 - - const referenceSigner = randomWallet('Should get JWT during session opening - 1') - orchestrator.setSigners([referenceSigner]) - - let session = await Session.open({ - settings: simpleSettings, - orchestrator, - referenceSigner: referenceSigner.address, - addSigners: [{ address: referenceSigner.address, weight: 1 }], - threshold: 1, - selectWallet: async () => undefined, - editConfigOnMigration: config => config - }) - - await expect(session.services?._initialAuthRequest).to.be.rejected - - const newSigner = randomWallet('Should get JWT during session opening 2') - orchestrator.setSigners([referenceSigner, newSigner]) - - session = await Session.open({ - settings, - orchestrator, - referenceSigner: referenceSigner.address, - addSigners: [{ address: newSigner.address, weight: 1 }], - threshold: 2, - selectWallet: async ws => { - expect(ws.length).to.equal(1) - return ws[0] - }, - editConfigOnMigration: config => config - }) - - await session.services?._initialAuthRequest - - expect(totalCount).to.equal(1) - expect(recoverCount[session.account.address]).to.equal(1) - - expect(await session.services?.status.jwt?.token).to.equal(fakeJwt) - }) - - it('Should get API with lazy JWT during first session creation', async () => { - const referenceSigner = randomWallet('Should get API with lazy JWT during first session creation') - orchestrator.setSigners([referenceSigner]) - - const session = await Session.open({ - settings, - orchestrator, - referenceSigner: referenceSigner.address, - addSigners: [{ address: referenceSigner.address, weight: 1 }], - threshold: 1, - selectWallet: async () => undefined, - editConfigOnMigration: config => config - }) - - const api = await session.services?.getAPIClient() - - expect(totalCount).to.equal(1) - expect(recoverCount[session.account.address]).to.equal(1) - - expect(await session.services?.status.jwt?.token).to.equal(fakeJwt) - - server.forPost('/rpc/API/FriendList').thenCallback(async request => { - const hasToken = request.headers['authorization']!.includes(fakeJwt) - return { statusCode: hasToken ? 200 : 401, body: JSON.stringify({}) } - }) - - await api!.friendList({ page: {} }) - }) - - it('Should get API with lazy JWT during session opening', async () => { - delayMs = 500 - const referenceSigner = randomWallet('Should get API with lazy JWT during session opening') - orchestrator.setSigners([referenceSigner]) - - await Session.open({ - settings: simpleSettings, - orchestrator, - referenceSigner: referenceSigner.address, - addSigners: [{ address: referenceSigner.address, weight: 1 }], - threshold: 1, - selectWallet: async () => undefined, - editConfigOnMigration: config => config - }) - - const newSigner = randomWallet('Should get API with lazy JWT during session opening 2') - orchestrator.setSigners([referenceSigner, newSigner]) - - const session = await Session.open({ - settings, - orchestrator, - referenceSigner: referenceSigner.address, - addSigners: [{ address: newSigner.address, weight: 1 }], - threshold: 2, - selectWallet: async ws => ws[0], - editConfigOnMigration: config => config - }) - - const api = await session.services?.getAPIClient() - - expect(totalCount).to.equal(1) - expect(recoverCount[session.account.address]).to.equal(1) - - expect(await session.services?.status.jwt?.token).to.equal(fakeJwt) - - server.forPost('/rpc/API/FriendList').thenCallback(async request => { - const hasToken = request.headers['authorization']!.includes(fakeJwt) - return { statusCode: hasToken ? 200 : 401, body: JSON.stringify({}) } - }) - - await api!.friendList({ page: {} }) - }) - - it('Should call callbacks on JWT token', async () => { - const referenceSigner = randomWallet('Should call callbacks on JWT token') - orchestrator.setSigners([referenceSigner]) - - const session = await Session.open({ - settings, - orchestrator, - referenceSigner: referenceSigner.address, - addSigners: [{ address: referenceSigner.address, weight: 1 }], - threshold: 1, - selectWallet: async () => undefined, - editConfigOnMigration: config => config - }) - - let calledCallback = 0 - session.services?.onAuth(() => calledCallback++) - - await session.services?._initialAuthRequest - - expect(calledCallback).to.equal(1) - }) - - it('Should call callbacks on JWT token (on open only once)', async () => { - delayMs = 500 - - const referenceSigner = randomWallet('Should call callbacks on JWT token (on open only once)') - orchestrator.setSigners([referenceSigner]) - - await Session.open({ - settings: simpleSettings, - orchestrator, - referenceSigner: referenceSigner.address, - addSigners: [{ address: referenceSigner.address, weight: 1 }], - threshold: 1, - selectWallet: async () => undefined, - editConfigOnMigration: config => config - }) - - const newSigner = randomWallet('Should call callbacks on JWT token (on open only once) 2') - orchestrator.setSigners([referenceSigner, newSigner]) - - const session = await Session.open({ - settings, - orchestrator, - referenceSigner: referenceSigner.address, - addSigners: [ - { address: referenceSigner.address, weight: 1 }, - { address: newSigner.address, weight: 1 } - ], - threshold: 2, - selectWallet: async ws => ws[0], - editConfigOnMigration: config => config - }) - - let calledCallback = 0 - session.services?.onAuth(() => calledCallback++) - - await session.services?._initialAuthRequest - - expect(calledCallback).to.equal(1) - }) - - it('Should retry 5 times retrieving the JWT token', async () => { - delayMs = 1000 - const referenceSigner = randomWallet('Should retry 5 times retrieving the JWT token') - orchestrator.setSigners([referenceSigner]) - - const session = await Session.open({ - settings, - orchestrator, - referenceSigner: referenceSigner.address, - addSigners: [{ address: referenceSigner.address, weight: 1 }], - threshold: 1, - selectWallet: async () => undefined, - editConfigOnMigration: config => config - }) - - alwaysFail = true - await expect(session.services?.auth()).to.be.rejected - expect(totalCount).to.equal(5) - expect(session.services?.status.jwt).to.be.undefined - }) - - it('Should get API with JWT already present', async () => { - delayMs = 500 - - const referenceSigner = randomWallet('Should get API with JWT already present') - orchestrator.setSigners([referenceSigner]) - - await Session.open({ - settings: simpleSettings, - orchestrator, - referenceSigner: referenceSigner.address, - addSigners: [{ address: referenceSigner.address, weight: 1 }], - threshold: 1, - selectWallet: async () => undefined, - editConfigOnMigration: config => config - }) - - const newSigner = randomWallet('Should get API with JWT already present 2') - orchestrator.setSigners([referenceSigner, newSigner]) - - const session = await Session.open({ - settings, - orchestrator, - referenceSigner: referenceSigner.address, - addSigners: [{ address: newSigner.address, weight: 1 }], - threshold: 2, - selectWallet: async ws => ws[0], - editConfigOnMigration: config => config - }) - - await session.services?._initialAuthRequest - const totalCountBefore = totalCount - - // This should use the already existing JWT - const api = await session.services?.getAPIClient() - - expect(totalCount).to.equal(totalCountBefore) - expect(recoverCount[session.account.address]).to.equal(1) - expect(await session.services?.status.jwt?.token).to.equal(fakeJwt) - - server.forPost('/rpc/API/FriendList').thenCallback(async request => { - const hasToken = request.headers['authorization']!.includes(fakeJwt) - return { statusCode: hasToken ? 200 : 401, body: JSON.stringify({}) } - }) - - await api!.friendList({ page: {} }) - }) - - it('Should fail to get API with false tryAuth and no JWT', async () => { - const referenceSigner = randomWallet('Should fail to get API with false tryAuth and no JWT') - orchestrator.setSigners([referenceSigner]) - - alwaysFail = true - - const session = await Session.open({ - settings: simpleSettings, - orchestrator, - referenceSigner: referenceSigner.address, - addSigners: [{ address: referenceSigner.address, weight: 1 }], - threshold: 1, - selectWallet: async () => undefined, - editConfigOnMigration: config => config - }) - - await expect(session.services?._initialAuthRequest).to.be.rejected - - alwaysFail = false - - const apiPromise = session.services?.getAPIClient(false) - - await expect(apiPromise).to.be.rejected - - expect(totalCount).to.equal(0) - expect(session.services?.status.jwt).to.be.undefined - }) - - it('Should fail to get API without api url', async () => { - const referenceSigner = randomWallet('Should fail to get API without api url') - orchestrator.setSigners([referenceSigner]) - - const session = await Session.open({ - settings: simpleSettings, - orchestrator, - referenceSigner: referenceSigner.address, - addSigners: [{ address: referenceSigner.address, weight: 1 }], - threshold: 1, - selectWallet: async () => undefined, - editConfigOnMigration: config => config - }) - - const apiPromise = session.services?.getAPIClient() - - await expect(apiPromise).to.be.rejected - - expect(totalCount).to.equal(0) - expect(session.services?.status.jwt?.token).to.be.undefined - }) - - it('Should fail to get JWT with no api configured', async () => { - const referenceSigner = randomWallet('Should fail to get JWT with no api configured') - orchestrator.setSigners([referenceSigner]) - - const session = await Session.open({ - settings: simpleSettings, - orchestrator, - referenceSigner: referenceSigner.address, - addSigners: [{ address: referenceSigner.address, weight: 1 }], - threshold: 1, - selectWallet: async () => undefined, - editConfigOnMigration: config => config - }) - - await expect(session.services?.auth()).to.be.rejected - - expect(totalCount).to.equal(0) - expect(session.services?.status.jwt?.token).to.be.undefined - }) - - it('Should reuse outstanding JWT requests', async () => { - const referenceSigner = new CountingSigner(randomWallet('Should reuse outstanding JWT requests')) - orchestrator.setSigners([referenceSigner]) - - alwaysFail = true - - const session = await Session.open({ - settings, - orchestrator, - referenceSigner: await referenceSigner.getAddress(), - addSigners: [{ address: await referenceSigner.getAddress(), weight: 1 }], - threshold: 1, - selectWallet: async () => undefined, - editConfigOnMigration: config => config - }) - - // 1 signing request is made to publish signers - expect(referenceSigner.signingRequests).to.equal(1) - - const signingRequestsBefore = referenceSigner.signingRequests - - await expect(session.services?._initialAuthRequest).to.be.rejected - - alwaysFail = false - totalCount = 0 - - // Create a bunch of API clients concurrently - const requests: any[] = [] - while (requests.length < 10) { - requests.push(session.services?.getAPIClient()) - } - await expect(Promise.all(requests)).to.be.fulfilled - - expect(totalCount).to.equal(1) - expect(referenceSigner.signingRequests).to.equal(signingRequestsBefore + 1) - }) - - it('Should reuse existing proof signatures', async () => { - const referenceSigner = new CountingSigner(randomWallet('Should reuse existing proof signatures')) - orchestrator.setSigners([referenceSigner]) - - alwaysFail = true - - const session = await Session.open({ - settings, - orchestrator, - referenceSigner: await referenceSigner.getAddress(), - addSigners: [{ address: await referenceSigner.getAddress(), weight: 1 }], - threshold: 1, - selectWallet: async () => undefined, - editConfigOnMigration: config => config - }) - - // 1 signing request is made to publish signers - expect(referenceSigner.signingRequests).to.equal(1) - - const signingRequestsBefore = referenceSigner.signingRequests - - await expect(session.services?._initialAuthRequest).to.be.rejected - - totalCount = 0 - - // Create a bunch of API clients sequentially - for (let i = 0; i < 10; i++) { - await expect(session.services?.getAPIClient()).to.be.rejected - } - - expect(totalCount).to.equal(10) - expect(referenceSigner.signingRequests).to.equal(signingRequestsBefore + 1) - }) - - it('Should neither re-authenticate nor retry if request succeeds', async () => { - const referenceSigner = new CountingSigner(randomWallet('Should neither re-authenticate nor retry if request succeeds')) - orchestrator.setSigners([referenceSigner]) - - const session = await Session.open({ - settings, - orchestrator, - referenceSigner: await referenceSigner.getAddress(), - addSigners: [{ address: await referenceSigner.getAddress(), weight: 1 }], - threshold: 1, - selectWallet: async () => undefined, - editConfigOnMigration: config => config - }) - - await session.services?._initialAuthRequest - - const api = await session.services?.getAPIClient() - - const okResponses = [true] - server.forPost('/rpc/API/FriendList').thenCallback(async () => { - return { statusCode: okResponses.shift() ? 200 : 401, body: JSON.stringify({}) } - }) - - totalCount = 0 - - await expect(api!.friendList({ page: {} })).to.be.fulfilled - - // no re-authentication since it succeeded - expect(totalCount).to.equal(0) - }) - - describe('With expiration', () => { - let resetDateMock: Function | undefined - - const setDate = (seconds: number) => { - if (resetDateMock) resetDateMock() - const newMockDate = new Date() - newMockDate.setTime(seconds * 1000) - resetDateMock = mockDate(newMockDate) - } - - afterEach(() => { - if (resetDateMock) resetDateMock() - }) - - it('Should request a new JWT after expiration', async () => { - const baseTime = 1613579057 - setDate(baseTime) - - const referenceSigner = randomWallet('Should request a new JWT after expiration') - orchestrator.setSigners([referenceSigner]) - - const session = await Session.open({ - settings: { - ...settings, - services: { - ...settings.services!, - metadata: { - name: 'Test', - expiration: 240 - } - } - }, - orchestrator, - referenceSigner: referenceSigner.address, - addSigners: [{ address: referenceSigner.address, weight: 1 }], - threshold: 1, - selectWallet: async () => undefined, - editConfigOnMigration: config => config - }) - - await session.services?._initialAuthRequest - - expect(totalCount).to.equal(1) - expect(await session.services?.status.jwt?.token).to.equal(fakeJwt) - expect(session.services?.status.jwt?.expiration).to.equal(baseTime + 240 - 60) - - // Force expire (1 hour) - const newBaseTime = baseTime + 60 * 60 - setDate(newBaseTime) - - fakeJwt = ethers.hexlify(randomBytes(96, 'Should request a new JWT after expiration 2')) - - await session.services?.getAPIClient() - - expect(totalCount).to.equal(2) - expect(await session.services?.status.jwt?.token).to.equal(fakeJwt) - expect(session.services?.status.jwt?.expiration).to.equal(newBaseTime + 240 - 60) - }) - - it('Should force min expiration time', async () => { - const baseTime = 1613579057 - setDate(baseTime) - - const referenceSigner = randomWallet('Should force min expiration time') - orchestrator.setSigners([referenceSigner]) - - const session = await Session.open({ - settings: { - ...settings, - services: { - ...settings.services!, - metadata: { - name: 'Test', - expiration: 1 - } - } - }, - orchestrator, - referenceSigner: referenceSigner.address, - addSigners: [{ address: referenceSigner.address, weight: 1 }], - threshold: 1, - selectWallet: async () => undefined, - editConfigOnMigration: config => config - }) - - await session.services?._initialAuthRequest - - expect(totalCount).to.equal(1) - expect(await session.services?.status.jwt?.token).to.equal(fakeJwt) - expect(session.services?.status.jwt?.expiration).to.equal(baseTime + 120 - 60) - }) - }) - }) - - describe('ETHAuth proof validation', () => { - it('Should validate an ETHAuth signature by an undeployed wallet', async () => { - const signer = randomWallet('Should validate an ETHAuth signature by an undeployed wallet') - const config = { - threshold: 1, - checkpoint: Math.floor(now() / 1000), - signers: [{ address: signer.address, weight: 1 }] - } - const account = await Account.new({ - config, - tracker, - contexts, - orchestrator: new Orchestrator([signer]), - networks - }) - - // begin by setting the parameters of the ETHAuth proof - const proof = new Proof({ address: account.address }) - proof.claims.app = 'Should validate an ETHAuth signature by an undeployed wallet' - proof.claims.iat = Math.floor(now() / 1000) // seconds since epoch, or better yet, proof.setIssuedAtNow() - proof.claims.exp = proof.claims.iat + 3600 // seconds since epoch, or better yet, proof.setExpiryIn(3600) - - // create an EIP-6492-compatible ETHAuth proof signature of the proof's message digest - proof.signature = await account.signDigest(proof.messageDigest(), ethnode.chainId!, true, 'eip6492') - // an EIP-6492 signature for an undeployed wallet always ends with the EIP-6492 suffix - expect(proof.signature.endsWith(commons.EIP6492.EIP_6492_SUFFIX.slice(2))).to.be.true - - // create an EIP-6492-aware ETHAuth proof validator - const validator = ValidateSequenceWalletProof( - () => new commons.reader.OnChainReader(ethnode.provider!), - tracker, - contexts[2] - ) - const ethauth = new ETHAuth(validator) - await ethauth.configJsonRpcProvider(ethnode.providerUrl!) - - // proofs can be encoded to and decoded from strings like so - const proofString = await ethauth.encodeProof(proof) - const decodedProof = await ethauth.decodeProof(proofString) - - // decoded proofs can be validated like so - expect(ethauth.validateProof(decodedProof)).to.eventually.be.true - }) - }) - describe('session without services', () => { - let noServiceSettings: SessionSettings - - before(() => { - noServiceSettings = { - ...simpleSettings, - services: undefined - } - }) - - it('should open a session without services', async () => { - const referenceSigner = randomWallet('should open a session without services') - orchestrator.setSigners([referenceSigner]) - - const session = await Session.open({ - settings: noServiceSettings, - orchestrator, - referenceSigner: referenceSigner.address, - addSigners: [{ address: referenceSigner.address, weight: 1 }], - threshold: 1, - selectWallet: async () => { - return undefined - }, - editConfigOnMigration: config => config - }) - - expect(session.services).to.be.undefined - }) - - it('should dump a session without services', async () => { - const referenceSigner = randomWallet('should dump a session without services') - orchestrator.setSigners([referenceSigner]) - - const session = await Session.open({ - settings: noServiceSettings, - orchestrator, - referenceSigner: referenceSigner.address, - addSigners: [{ address: referenceSigner.address, weight: 1 }], - threshold: 1, - selectWallet: async () => { - return undefined - }, - editConfigOnMigration: config => config - }) - - const dump = await session.dump() - expect(dump).to.not.be.undefined - expect(dump.jwt).to.be.undefined - expect(dump.metadata).to.be.undefined - }) - - it('should load dump without services', async () => { - const referenceSigner = randomWallet('should load dump without services') - orchestrator.setSigners([referenceSigner]) - - const session = await Session.open({ - settings: noServiceSettings, - orchestrator, - referenceSigner: referenceSigner.address, - addSigners: [{ address: referenceSigner.address, weight: 1 }], - threshold: 1, - selectWallet: async () => { - return undefined - }, - editConfigOnMigration: config => config - }) - - const dump = await session.dump() - const newSession = await Session.load({ - orchestrator, - settings: noServiceSettings, - dump: dump, - editConfigOnMigration: config => config - }) - - expect(newSession.services).to.be.undefined - }) - }) - - describe('single signer session', () => { - it('should create a new single signer session', async () => { - const signer = randomWallet('should create a new single signer session') - - const session = await Session.singleSigner({ - settings: simpleSettings, - signer: signer, - projectAccessKey: '' - }) - - expect(session.account.address).to.not.be.undefined - - const status = await session.account.status(networks[0].chainId) - const config = status.config as v2.config.WalletConfig - - expect(config.threshold).to.equal(1) - expect(v2.config.isSignerLeaf(config.tree)).to.be.true - expect(config.tree as v2.config.SignerLeaf).to.deep.equal({ - weight: 1, - address: signer.address - }) - }) - - it('should open same single signer session twice', async () => { - const signer = randomWallet('should open same single signer session twice') - - const session1 = await Session.singleSigner({ - settings: simpleSettings, - signer: signer, - projectAccessKey: '' - }) - - const address1 = session1.account.address - const status1 = await session1.account.status(networks[0].chainId) - - const session2 = await Session.singleSigner({ - settings: simpleSettings, - signer: signer, - projectAccessKey: '' - }) - - const address2 = session2.account.address - const status2 = await session2.account.status(networks[0].chainId) - - expect(address1).to.equal(address2) - - // should not change the config! - expect(status1.config).to.deep.equal(status2.config) - }) - - it('should send a transaction from a single signer session', async () => { - const signer = randomWallet('should send a transaction from a single signer session') - - const session = await Session.singleSigner({ - settings: simpleSettings, - signer: signer, - projectAccessKey: '' - }) - - const receipt = await session.account.sendTransaction( - { - to: ethers.Wallet.createRandom().address - }, - networks[0].chainId - ) - - expect(receipt?.hash).to.not.be.undefined - }) - }) -}) - -let nowCalls = 0 -function now(): number { - if (deterministic) { - return Date.parse('2023-02-14T00:00:00.000Z') + 1000 * nowCalls++ - } else { - return Date.now() - } -} - -function randomWallet(entropy: number | string): ethers.Wallet { - return new ethers.Wallet(ethers.hexlify(randomBytes(32, entropy))) -} - -function randomBytes(length: number, entropy: number | string): Uint8Array { - if (deterministic) { - let bytes = '' - while (bytes.length < 2 * length) { - bytes += ethers.id(`${bytes}${entropy}`).slice(2) - } - return ethers.getBytes(`0x${bytes.slice(0, 2 * length)}`) - } else { - return ethers.randomBytes(length) - } -} diff --git a/old/packages/auth/tests/utils/index.ts b/old/packages/auth/tests/utils/index.ts deleted file mode 100644 index 8c4c6f999..000000000 --- a/old/packages/auth/tests/utils/index.ts +++ /dev/null @@ -1,33 +0,0 @@ -export function delay(time: number): Promise { - return new Promise(solve => setTimeout(solve, time)) -} - -/** - * @param {Date} expected The date to which we want to freeze time - * @returns {Function} Call to remove Date mocking - */ -export const mockDate = (expected: Date): (() => void) => { - const _Date = Date - - // If any Date or number is passed to the constructor - // use that instead of our mocked date - function MockDate(mockOverride?: Date | number) { - return new _Date(mockOverride || expected) - } - - MockDate.UTC = _Date.UTC - MockDate.parse = _Date.parse - MockDate.now = () => expected.getTime() - // Give our mock Date has the same prototype as Date - // Some libraries rely on this to identify Date objects - MockDate.prototype = _Date.prototype - - // Our mock is not a full implementation of Date - // Types will not match but it's good enough for our tests - global.Date = MockDate as any - - // Callback function to remove the Date mock - return () => { - global.Date = _Date - } -} diff --git a/old/packages/builder/CHANGELOG.md b/old/packages/builder/CHANGELOG.md deleted file mode 100644 index 0a86b4aa5..000000000 --- a/old/packages/builder/CHANGELOG.md +++ /dev/null @@ -1,155 +0,0 @@ -# @0xsequence/builder - -## 2.3.8 - -### Patch Changes - -- indexer: update clients - -## 2.3.7 - -### Patch Changes - -- Metadata updates - -## 2.3.6 - -### Patch Changes - -- New chains - -## 2.3.5 - -### Patch Changes - -- Add Frequency Testnet - -## 2.3.4 - -### Patch Changes - -- metadata: exclude deprecated methods on rpc client - -## 2.3.3 - -### Patch Changes - -- metadata: client update - -## 2.3.2 - -### Patch Changes - -- metadata: update rpc client - -## 2.3.1 - -### Patch Changes - -- indexer: update rpc client - -## 2.3.0 - -### Minor Changes - -- update metadata rpc client - -## 2.2.15 - -### Patch Changes - -- API updates - -## 2.2.14 - -### Patch Changes - -- Somnia Testnet and Monad Testnet - -## 2.2.13 - -### Patch Changes - -- Add XR1 to all networks - -## 2.2.12 - -### Patch Changes - -- Add XR1 - -## 2.2.11 - -### Patch Changes - -- Relayer updates - -## 2.2.10 - -### Patch Changes - -- Etherlink support - -## 2.2.9 - -### Patch Changes - -- Indexer gateway native token balances - -## 2.2.8 - -### Patch Changes - -- Add Moonbeam and Moonbase Alpha - -## 2.2.7 - -### Patch Changes - -- Update Builder package - -## 2.2.6 - -### Patch Changes - -- Update relayer package - -## 2.2.5 - -### Patch Changes - -- auth: fix sequence indexer gateway url -- account: immutable wallet proxy hook - -## 2.2.4 - -### Patch Changes - -- network: update soneium mainnet block explorer url -- waas: signTypedData intent support - -## 2.2.3 - -### Patch Changes - -- provider: updating initWallet to use connected network configs if they exist - -## 2.2.2 - -### Patch Changes - -- pass projectAccessKey to relayer at all times - -## 2.2.1 - -### Patch Changes - -- waas-ethers: sign typed data - -## 2.2.0 - -### Minor Changes - -- indexer: gateway client -- @0xsequence/builder -- upgrade puppeteer to v23.10.3 diff --git a/old/packages/builder/README.md b/old/packages/builder/README.md deleted file mode 100644 index 4c74ce616..000000000 --- a/old/packages/builder/README.md +++ /dev/null @@ -1,4 +0,0 @@ -@0xsequence/builder -=================== - -See [0xsequence project page](https://github.com/0xsequence/sequence.js). diff --git a/old/packages/builder/package.json b/old/packages/builder/package.json deleted file mode 100644 index 6f557efcf..000000000 --- a/old/packages/builder/package.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "name": "@0xsequence/builder", - "version": "2.3.8", - "description": "builder sub-package for Sequence", - "repository": "https://github.com/0xsequence/sequence.js/tree/master/packages/builder", - "source": "src/index.ts", - "main": "dist/0xsequence-builder.cjs.js", - "module": "dist/0xsequence-builder.esm.js", - "author": "Horizon Blockchain Games", - "license": "Apache-2.0", - "scripts": { - "test": "echo", - "typecheck": "tsc --noEmit" - }, - "dependencies": {}, - "peerDependencies": {}, - "devDependencies": {}, - "files": [ - "src", - "dist" - ] -} diff --git a/old/packages/builder/src/builder.gen.ts b/old/packages/builder/src/builder.gen.ts deleted file mode 100644 index cb2a6454d..000000000 --- a/old/packages/builder/src/builder.gen.ts +++ /dev/null @@ -1,714 +0,0 @@ -/* eslint-disable */ -// NOTE: this is just a subset of the builder api to scope down the -// surface area of the client. -// -// In the future we can include additional interfaces as needed. -export const WebrpcHeader = 'Webrpc' - -export const WebrpcHeaderValue = 'webrpc@v0.22.1;gen-typescript@v0.16.2;sequence-builder@v0.1.0' - -// WebRPC description and code-gen version -export const WebRPCVersion = 'v1' - -// Schema version of your RIDL schema -export const WebRPCSchemaVersion = 'v0.1.0' - -// Schema hash generated from your RIDL schema -export const WebRPCSchemaHash = '461bc324d241f4df14fbf63268fde2cfe4873e3e' - -type WebrpcGenVersions = { - webrpcGenVersion: string - codeGenName: string - codeGenVersion: string - schemaName: string - schemaVersion: string -} - -export function VersionFromHeader(headers: Headers): WebrpcGenVersions { - const headerValue = headers.get(WebrpcHeader) - if (!headerValue) { - return { - webrpcGenVersion: '', - codeGenName: '', - codeGenVersion: '', - schemaName: '', - schemaVersion: '' - } - } - - return parseWebrpcGenVersions(headerValue) -} - -function parseWebrpcGenVersions(header: string): WebrpcGenVersions { - const versions = header.split(';') - if (versions.length < 3) { - return { - webrpcGenVersion: '', - codeGenName: '', - codeGenVersion: '', - schemaName: '', - schemaVersion: '' - } - } - - const [_, webrpcGenVersion] = versions[0].split('@') - const [codeGenName, codeGenVersion] = versions[1].split('@') - const [schemaName, schemaVersion] = versions[2].split('@') - - return { - webrpcGenVersion, - codeGenName, - codeGenVersion, - schemaName, - schemaVersion - } -} - -// -// Types -// - -export interface AudienceContact { - id?: number - audienceId: number - name?: string - address: string - email?: string - userIp?: string - stage?: number - provider?: string - createdAt?: string - updatedAt?: string -} - -export interface AudienceRegistrationStatus { - totalCount: number -} - -export interface WalletProof { - address: string - message: string - signature: string - chainId: number -} - -export interface Builder { - ping(headers?: object, signal?: AbortSignal): Promise - registerAudienceContact( - args: RegisterAudienceContactArgs, - headers?: object, - signal?: AbortSignal - ): Promise - getRegisteredAudienceContact( - args: GetRegisteredAudienceContactArgs, - headers?: object, - signal?: AbortSignal - ): Promise - getAudienceRegistrationPublicStatus( - args: GetAudienceRegistrationPublicStatusArgs, - headers?: object, - signal?: AbortSignal - ): Promise - isAudienceContactRegistered( - args: IsAudienceContactRegisteredArgs, - headers?: object, - signal?: AbortSignal - ): Promise -} - -export interface PingArgs {} - -export interface PingReturn { - status: boolean -} - -export interface RegisterAudienceContactArgs { - projectId: number - audienceId: number - contact: AudienceContact - walletProof: WalletProof -} - -export interface RegisterAudienceContactReturn { - ok: boolean -} -export interface GetRegisteredAudienceContactArgs { - projectId: number - audienceId: number - walletProof: WalletProof -} - -export interface GetRegisteredAudienceContactReturn { - contact: AudienceContact -} -export interface GetAudienceRegistrationPublicStatusArgs { - projectId: number - audienceId: number -} - -export interface GetAudienceRegistrationPublicStatusReturn { - status: AudienceRegistrationStatus -} -export interface IsAudienceContactRegisteredArgs { - projectId: number - audienceId: number - walletAddress: string -} - -export interface IsAudienceContactRegisteredReturn { - registered: boolean -} - -// -// Client -// -export class Builder implements Builder { - protected hostname: string - protected fetch: Fetch - protected path = '/rpc/Builder/' - - constructor(hostname: string, fetch: Fetch) { - this.hostname = hostname.replace(/\/*$/, '') - this.fetch = (input: RequestInfo, init?: RequestInit) => fetch(input, init) - } - - private url(name: string): string { - return this.hostname + this.path + name - } - - ping = (headers?: object, signal?: AbortSignal): Promise => { - return this.fetch(this.url('Ping'), createHTTPRequest({}, headers, signal)).then( - res => { - return buildResponse(res).then(_data => { - return { - status: _data.status - } - }) - }, - error => { - throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) - } - ) - } - - registerAudienceContact = ( - args: RegisterAudienceContactArgs, - headers?: object, - signal?: AbortSignal - ): Promise => { - return this.fetch(this.url('RegisterAudienceContact'), createHTTPRequest(args, headers, signal)).then( - res => { - return buildResponse(res).then(_data => { - return { - ok: _data.ok - } - }) - }, - error => { - throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) - } - ) - } - - getRegisteredAudienceContact = ( - args: GetRegisteredAudienceContactArgs, - headers?: object, - signal?: AbortSignal - ): Promise => { - return this.fetch(this.url('GetRegisteredAudienceContact'), createHTTPRequest(args, headers, signal)).then( - res => { - return buildResponse(res).then(_data => { - return { - contact: _data.contact - } - }) - }, - error => { - throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) - } - ) - } - - getAudienceRegistrationPublicStatus = ( - args: GetAudienceRegistrationPublicStatusArgs, - headers?: object, - signal?: AbortSignal - ): Promise => { - return this.fetch(this.url('GetAudienceRegistrationPublicStatus'), createHTTPRequest(args, headers, signal)).then( - res => { - return buildResponse(res).then(_data => { - return { - status: _data.status - } - }) - }, - error => { - throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) - } - ) - } - - isAudienceContactRegistered = ( - args: IsAudienceContactRegisteredArgs, - headers?: object, - signal?: AbortSignal - ): Promise => { - return this.fetch(this.url('IsAudienceContactRegistered'), createHTTPRequest(args, headers, signal)).then( - res => { - return buildResponse(res).then(_data => { - return { - registered: _data.registered - } - }) - }, - error => { - throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) - } - ) - } -} - -const createHTTPRequest = (body: object = {}, headers: object = {}, signal: AbortSignal | null = null): object => { - const reqHeaders: { [key: string]: string } = { ...headers, 'Content-Type': 'application/json' } - reqHeaders[WebrpcHeader] = WebrpcHeaderValue - - return { - method: 'POST', - headers: reqHeaders, - body: JSON.stringify(body || {}), - signal - } -} - -const buildResponse = (res: Response): Promise => { - return res.text().then(text => { - let data - try { - data = JSON.parse(text) - } catch (error) { - let message = '' - if (error instanceof Error) { - message = error.message - } - throw WebrpcBadResponseError.new({ - status: res.status, - cause: `JSON.parse(): ${message}: response text: ${text}` - }) - } - if (!res.ok) { - const code: number = typeof data.code === 'number' ? data.code : 0 - throw (webrpcErrorByCode[code] || WebrpcError).new(data) - } - return data - }) -} - -// -// Errors -// - -export class WebrpcError extends Error { - name: string - code: number - message: string - status: number - cause?: string - - /** @deprecated Use message instead of msg. Deprecated in webrpc v0.11.0. */ - msg: string - - constructor(name: string, code: number, message: string, status: number, cause?: string) { - super(message) - this.name = name || 'WebrpcError' - this.code = typeof code === 'number' ? code : 0 - this.message = message || `endpoint error ${this.code}` - this.msg = this.message - this.status = typeof status === 'number' ? status : 0 - this.cause = cause - Object.setPrototypeOf(this, WebrpcError.prototype) - } - - static new(payload: any): WebrpcError { - return new this(payload.error, payload.code, payload.message || payload.msg, payload.status, payload.cause) - } -} - -// Webrpc errors - -export class WebrpcEndpointError extends WebrpcError { - constructor( - name: string = 'WebrpcEndpoint', - code: number = 0, - message: string = 'endpoint error', - status: number = 0, - cause?: string - ) { - super(name, code, message, status, cause) - Object.setPrototypeOf(this, WebrpcEndpointError.prototype) - } -} - -export class WebrpcRequestFailedError extends WebrpcError { - constructor( - name: string = 'WebrpcRequestFailed', - code: number = -1, - message: string = 'request failed', - status: number = 0, - cause?: string - ) { - super(name, code, message, status, cause) - Object.setPrototypeOf(this, WebrpcRequestFailedError.prototype) - } -} - -export class WebrpcBadRouteError extends WebrpcError { - constructor( - name: string = 'WebrpcBadRoute', - code: number = -2, - message: string = 'bad route', - status: number = 0, - cause?: string - ) { - super(name, code, message, status, cause) - Object.setPrototypeOf(this, WebrpcBadRouteError.prototype) - } -} - -export class WebrpcBadMethodError extends WebrpcError { - constructor( - name: string = 'WebrpcBadMethod', - code: number = -3, - message: string = 'bad method', - status: number = 0, - cause?: string - ) { - super(name, code, message, status, cause) - Object.setPrototypeOf(this, WebrpcBadMethodError.prototype) - } -} - -export class WebrpcBadRequestError extends WebrpcError { - constructor( - name: string = 'WebrpcBadRequest', - code: number = -4, - message: string = 'bad request', - status: number = 0, - cause?: string - ) { - super(name, code, message, status, cause) - Object.setPrototypeOf(this, WebrpcBadRequestError.prototype) - } -} - -export class WebrpcBadResponseError extends WebrpcError { - constructor( - name: string = 'WebrpcBadResponse', - code: number = -5, - message: string = 'bad response', - status: number = 0, - cause?: string - ) { - super(name, code, message, status, cause) - Object.setPrototypeOf(this, WebrpcBadResponseError.prototype) - } -} - -export class WebrpcServerPanicError extends WebrpcError { - constructor( - name: string = 'WebrpcServerPanic', - code: number = -6, - message: string = 'server panic', - status: number = 0, - cause?: string - ) { - super(name, code, message, status, cause) - Object.setPrototypeOf(this, WebrpcServerPanicError.prototype) - } -} - -export class WebrpcInternalErrorError extends WebrpcError { - constructor( - name: string = 'WebrpcInternalError', - code: number = -7, - message: string = 'internal error', - status: number = 0, - cause?: string - ) { - super(name, code, message, status, cause) - Object.setPrototypeOf(this, WebrpcInternalErrorError.prototype) - } -} - -export class WebrpcClientDisconnectedError extends WebrpcError { - constructor( - name: string = 'WebrpcClientDisconnected', - code: number = -8, - message: string = 'client disconnected', - status: number = 0, - cause?: string - ) { - super(name, code, message, status, cause) - Object.setPrototypeOf(this, WebrpcClientDisconnectedError.prototype) - } -} - -export class WebrpcStreamLostError extends WebrpcError { - constructor( - name: string = 'WebrpcStreamLost', - code: number = -9, - message: string = 'stream lost', - status: number = 0, - cause?: string - ) { - super(name, code, message, status, cause) - Object.setPrototypeOf(this, WebrpcStreamLostError.prototype) - } -} - -export class WebrpcStreamFinishedError extends WebrpcError { - constructor( - name: string = 'WebrpcStreamFinished', - code: number = -10, - message: string = 'stream finished', - status: number = 0, - cause?: string - ) { - super(name, code, message, status, cause) - Object.setPrototypeOf(this, WebrpcStreamFinishedError.prototype) - } -} - -// Schema errors - -export class UnauthorizedError extends WebrpcError { - constructor( - name: string = 'Unauthorized', - code: number = 1000, - message: string = 'Unauthorized access', - status: number = 0, - cause?: string - ) { - super(name, code, message, status, cause) - Object.setPrototypeOf(this, UnauthorizedError.prototype) - } -} - -export class PermissionDeniedError extends WebrpcError { - constructor( - name: string = 'PermissionDenied', - code: number = 1001, - message: string = 'Permission denied', - status: number = 0, - cause?: string - ) { - super(name, code, message, status, cause) - Object.setPrototypeOf(this, PermissionDeniedError.prototype) - } -} - -export class SessionExpiredError extends WebrpcError { - constructor( - name: string = 'SessionExpired', - code: number = 1002, - message: string = 'Session expired', - status: number = 0, - cause?: string - ) { - super(name, code, message, status, cause) - Object.setPrototypeOf(this, SessionExpiredError.prototype) - } -} - -export class MethodNotFoundError extends WebrpcError { - constructor( - name: string = 'MethodNotFound', - code: number = 1003, - message: string = 'Method not found', - status: number = 0, - cause?: string - ) { - super(name, code, message, status, cause) - Object.setPrototypeOf(this, MethodNotFoundError.prototype) - } -} - -export class RequestConflictError extends WebrpcError { - constructor( - name: string = 'RequestConflict', - code: number = 1004, - message: string = 'Conflict with target resource', - status: number = 0, - cause?: string - ) { - super(name, code, message, status, cause) - Object.setPrototypeOf(this, RequestConflictError.prototype) - } -} - -export class ServiceDisabledError extends WebrpcError { - constructor( - name: string = 'ServiceDisabled', - code: number = 1005, - message: string = 'Service disabled', - status: number = 0, - cause?: string - ) { - super(name, code, message, status, cause) - Object.setPrototypeOf(this, ServiceDisabledError.prototype) - } -} - -export class TimeoutError extends WebrpcError { - constructor( - name: string = 'Timeout', - code: number = 2000, - message: string = 'Request timed out', - status: number = 0, - cause?: string - ) { - super(name, code, message, status, cause) - Object.setPrototypeOf(this, TimeoutError.prototype) - } -} - -export class InvalidArgumentError extends WebrpcError { - constructor( - name: string = 'InvalidArgument', - code: number = 2001, - message: string = 'Invalid argument', - status: number = 0, - cause?: string - ) { - super(name, code, message, status, cause) - Object.setPrototypeOf(this, InvalidArgumentError.prototype) - } -} - -export class NotFoundError extends WebrpcError { - constructor( - name: string = 'NotFound', - code: number = 3000, - message: string = 'Resource not found', - status: number = 0, - cause?: string - ) { - super(name, code, message, status, cause) - Object.setPrototypeOf(this, NotFoundError.prototype) - } -} - -export class UserNotFoundError extends WebrpcError { - constructor( - name: string = 'UserNotFound', - code: number = 3001, - message: string = 'User not found', - status: number = 0, - cause?: string - ) { - super(name, code, message, status, cause) - Object.setPrototypeOf(this, UserNotFoundError.prototype) - } -} - -export class ProjectNotFoundError extends WebrpcError { - constructor( - name: string = 'ProjectNotFound', - code: number = 3002, - message: string = 'Project not found', - status: number = 0, - cause?: string - ) { - super(name, code, message, status, cause) - Object.setPrototypeOf(this, ProjectNotFoundError.prototype) - } -} - -export class AlreadyCollaboratorError extends WebrpcError { - constructor( - name: string = 'AlreadyCollaborator', - code: number = 4001, - message: string = 'Already a collaborator', - status: number = 0, - cause?: string - ) { - super(name, code, message, status, cause) - Object.setPrototypeOf(this, AlreadyCollaboratorError.prototype) - } -} - -export enum errors { - WebrpcEndpoint = 'WebrpcEndpoint', - WebrpcRequestFailed = 'WebrpcRequestFailed', - WebrpcBadRoute = 'WebrpcBadRoute', - WebrpcBadMethod = 'WebrpcBadMethod', - WebrpcBadRequest = 'WebrpcBadRequest', - WebrpcBadResponse = 'WebrpcBadResponse', - WebrpcServerPanic = 'WebrpcServerPanic', - WebrpcInternalError = 'WebrpcInternalError', - WebrpcClientDisconnected = 'WebrpcClientDisconnected', - WebrpcStreamLost = 'WebrpcStreamLost', - WebrpcStreamFinished = 'WebrpcStreamFinished', - Unauthorized = 'Unauthorized', - PermissionDenied = 'PermissionDenied', - SessionExpired = 'SessionExpired', - MethodNotFound = 'MethodNotFound', - RequestConflict = 'RequestConflict', - ServiceDisabled = 'ServiceDisabled', - Timeout = 'Timeout', - InvalidArgument = 'InvalidArgument', - NotFound = 'NotFound', - UserNotFound = 'UserNotFound', - ProjectNotFound = 'ProjectNotFound' -} - -export enum WebrpcErrorCodes { - WebrpcEndpoint = 0, - WebrpcRequestFailed = -1, - WebrpcBadRoute = -2, - WebrpcBadMethod = -3, - WebrpcBadRequest = -4, - WebrpcBadResponse = -5, - WebrpcServerPanic = -6, - WebrpcInternalError = -7, - WebrpcClientDisconnected = -8, - WebrpcStreamLost = -9, - WebrpcStreamFinished = -10, - Unauthorized = 1000, - PermissionDenied = 1001, - SessionExpired = 1002, - MethodNotFound = 1003, - RequestConflict = 1004, - ServiceDisabled = 1005, - Timeout = 2000, - InvalidArgument = 2001, - NotFound = 3000, - UserNotFound = 3001, - ProjectNotFound = 3002 -} - -export const webrpcErrorByCode: { [code: number]: any } = { - [0]: WebrpcEndpointError, - [-1]: WebrpcRequestFailedError, - [-2]: WebrpcBadRouteError, - [-3]: WebrpcBadMethodError, - [-4]: WebrpcBadRequestError, - [-5]: WebrpcBadResponseError, - [-6]: WebrpcServerPanicError, - [-7]: WebrpcInternalErrorError, - [-8]: WebrpcClientDisconnectedError, - [-9]: WebrpcStreamLostError, - [-10]: WebrpcStreamFinishedError, - [1000]: UnauthorizedError, - [1001]: PermissionDeniedError, - [1002]: SessionExpiredError, - [1003]: MethodNotFoundError, - [1004]: RequestConflictError, - [1005]: ServiceDisabledError, - [2000]: TimeoutError, - [2001]: InvalidArgumentError, - [3000]: NotFoundError, - [3001]: UserNotFoundError, - [3002]: ProjectNotFoundError -} - -export type Fetch = (input: RequestInfo, init?: RequestInit) => Promise diff --git a/old/packages/builder/src/index.ts b/old/packages/builder/src/index.ts deleted file mode 100644 index 403e39099..000000000 --- a/old/packages/builder/src/index.ts +++ /dev/null @@ -1,30 +0,0 @@ -export * from './builder.gen' - -import { Builder as BuilderRpc } from './builder.gen' - -export class SequenceBuilderClient extends BuilderRpc { - constructor( - public projectAccessKey: string, - apiUrl?: string - ) { - const hostname = apiUrl ?? 'https://api.sequence.build' - super(hostname.endsWith('/') ? hostname.slice(0, -1) : hostname, fetch) - this.fetch = this._fetch - } - - _fetch = (input: RequestInfo, init?: RequestInit): Promise => { - // automatically include access key auth header to requests - // if its been set on the api client - const headers: { [key: string]: any } = {} - - const projectAccessKey = this.projectAccessKey - if (projectAccessKey && projectAccessKey.length > 0) { - headers['X-Access-Key'] = projectAccessKey - } - - // before the request is made - init!.headers = { ...init!.headers, ...headers } - - return fetch(input, init) - } -} diff --git a/old/packages/core/CHANGELOG.md b/old/packages/core/CHANGELOG.md deleted file mode 100644 index a1343e936..000000000 --- a/old/packages/core/CHANGELOG.md +++ /dev/null @@ -1,1597 +0,0 @@ -# @0xsequence/core - -## 2.3.8 - -### Patch Changes - -- indexer: update clients -- Updated dependencies - - @0xsequence/abi@2.3.8 - - @0xsequence/utils@2.3.8 - -## 2.3.7 - -### Patch Changes - -- Metadata updates -- Updated dependencies - - @0xsequence/abi@2.3.7 - - @0xsequence/utils@2.3.7 - -## 2.3.6 - -### Patch Changes - -- New chains -- Updated dependencies - - @0xsequence/abi@2.3.6 - - @0xsequence/utils@2.3.6 - -## 2.3.5 - -### Patch Changes - -- Add Frequency Testnet -- Updated dependencies - - @0xsequence/abi@2.3.5 - - @0xsequence/utils@2.3.5 - -## 2.3.4 - -### Patch Changes - -- metadata: exclude deprecated methods on rpc client -- Updated dependencies - - @0xsequence/abi@2.3.4 - - @0xsequence/utils@2.3.4 - -## 2.3.3 - -### Patch Changes - -- metadata: client update -- Updated dependencies - - @0xsequence/abi@2.3.3 - - @0xsequence/utils@2.3.3 - -## 2.3.2 - -### Patch Changes - -- metadata: update rpc client -- Updated dependencies - - @0xsequence/abi@2.3.2 - - @0xsequence/utils@2.3.2 - -## 2.3.1 - -### Patch Changes - -- indexer: update rpc client -- Updated dependencies - - @0xsequence/abi@2.3.1 - - @0xsequence/utils@2.3.1 - -## 2.3.0 - -### Minor Changes - -- update metadata rpc client - -### Patch Changes - -- Updated dependencies - - @0xsequence/abi@2.3.0 - - @0xsequence/utils@2.3.0 - -## 2.2.15 - -### Patch Changes - -- API updates -- Updated dependencies - - @0xsequence/abi@2.2.15 - - @0xsequence/utils@2.2.15 - -## 2.2.14 - -### Patch Changes - -- Somnia Testnet and Monad Testnet -- Updated dependencies - - @0xsequence/abi@2.2.14 - - @0xsequence/utils@2.2.14 - -## 2.2.13 - -### Patch Changes - -- Add XR1 to all networks -- Updated dependencies - - @0xsequence/abi@2.2.13 - - @0xsequence/utils@2.2.13 - -## 2.2.12 - -### Patch Changes - -- Add XR1 -- Updated dependencies - - @0xsequence/abi@2.2.12 - - @0xsequence/utils@2.2.12 - -## 2.2.11 - -### Patch Changes - -- Relayer updates -- Updated dependencies - - @0xsequence/abi@2.2.11 - - @0xsequence/utils@2.2.11 - -## 2.2.10 - -### Patch Changes - -- Etherlink support -- Updated dependencies - - @0xsequence/abi@2.2.10 - - @0xsequence/utils@2.2.10 - -## 2.2.9 - -### Patch Changes - -- Indexer gateway native token balances -- Updated dependencies - - @0xsequence/abi@2.2.9 - - @0xsequence/utils@2.2.9 - -## 2.2.8 - -### Patch Changes - -- Add Moonbeam and Moonbase Alpha -- Updated dependencies - - @0xsequence/abi@2.2.8 - - @0xsequence/utils@2.2.8 - -## 2.2.7 - -### Patch Changes - -- Update Builder package -- Updated dependencies - - @0xsequence/abi@2.2.7 - - @0xsequence/utils@2.2.7 - -## 2.2.6 - -### Patch Changes - -- Update relayer package -- Updated dependencies - - @0xsequence/abi@2.2.6 - - @0xsequence/utils@2.2.6 - -## 2.2.5 - -### Patch Changes - -- auth: fix sequence indexer gateway url -- account: immutable wallet proxy hook -- Updated dependencies -- Updated dependencies - - @0xsequence/abi@2.2.5 - - @0xsequence/utils@2.2.5 - -## 2.2.4 - -### Patch Changes - -- network: update soneium mainnet block explorer url -- waas: signTypedData intent support -- Updated dependencies -- Updated dependencies - - @0xsequence/abi@2.2.4 - - @0xsequence/utils@2.2.4 - -## 2.2.3 - -### Patch Changes - -- provider: updating initWallet to use connected network configs if they exist -- Updated dependencies - - @0xsequence/abi@2.2.3 - - @0xsequence/utils@2.2.3 - -## 2.2.2 - -### Patch Changes - -- pass projectAccessKey to relayer at all times -- Updated dependencies - - @0xsequence/abi@2.2.2 - - @0xsequence/utils@2.2.2 - -## 2.2.1 - -### Patch Changes - -- waas-ethers: sign typed data -- Updated dependencies - - @0xsequence/abi@2.2.1 - - @0xsequence/utils@2.2.1 - -## 2.2.0 - -### Minor Changes - -- indexer: gateway client -- @0xsequence/builder -- upgrade puppeteer to v23.10.3 - -### Patch Changes - -- Updated dependencies -- Updated dependencies -- Updated dependencies - - @0xsequence/abi@2.2.0 - - @0xsequence/utils@2.2.0 - -## 2.1.8 - -### Patch Changes - -- Add Soneium Mainnet -- Updated dependencies - - @0xsequence/abi@2.1.8 - - @0xsequence/utils@2.1.8 - -## 2.1.7 - -### Patch Changes - -- guard: pass project access key to guard requests -- Updated dependencies - - @0xsequence/abi@2.1.7 - - @0xsequence/utils@2.1.7 - -## 2.1.6 - -### Patch Changes - -- Add LAOS and Telos Testnet chains -- Updated dependencies - - @0xsequence/abi@2.1.6 - - @0xsequence/utils@2.1.6 - -## 2.1.5 - -### Patch Changes - -- account: save presigned configuration with reference chain id 1 -- Updated dependencies - - @0xsequence/abi@2.1.5 - - @0xsequence/utils@2.1.5 - -## 2.1.4 - -### Patch Changes - -- provider: pass projectAccessKey into MuxMessageProvider -- Updated dependencies - - @0xsequence/abi@2.1.4 - - @0xsequence/utils@2.1.4 - -## 2.1.3 - -### Patch Changes - -- waas: time drift date fix due to strange browser quirk -- Updated dependencies - - @0xsequence/abi@2.1.3 - - @0xsequence/utils@2.1.3 - -## 2.1.2 - -### Patch Changes - -- provider: export analytics correctly -- Updated dependencies - - @0xsequence/abi@2.1.2 - - @0xsequence/utils@2.1.2 - -## 2.1.1 - -### Patch Changes - -- Add LAOS chain support -- Updated dependencies - - @0xsequence/abi@2.1.1 - - @0xsequence/utils@2.1.1 - -## 2.1.0 - -### Minor Changes - -- account: forward project access key when estimating fees and sending transactions - -### Patch Changes - -- sessions: save signatures with reference chain id -- Updated dependencies -- Updated dependencies - - @0xsequence/abi@2.1.0 - - @0xsequence/utils@2.1.0 - -## 2.0.26 - -### Patch Changes - -- account: fix chain id comparison -- Updated dependencies - - @0xsequence/abi@2.0.26 - - @0xsequence/utils@2.0.26 - -## 2.0.25 - -### Patch Changes - -- skale-nebula: deploy gas limit = 10m -- Updated dependencies - - @0xsequence/abi@2.0.25 - - @0xsequence/utils@2.0.25 - -## 2.0.24 - -### Patch Changes - -- sessions: arweave: configurable gateway url -- waas: use /status to get time drift before sending any intents -- Updated dependencies -- Updated dependencies - - @0xsequence/abi@2.0.24 - - @0xsequence/utils@2.0.24 - -## 2.0.23 - -### Patch Changes - -- Add The Root Network support -- Updated dependencies - - @0xsequence/abi@2.0.23 - - @0xsequence/utils@2.0.23 - -## 2.0.22 - -### Patch Changes - -- Add SKALE Nebula Mainnet support -- Updated dependencies - - @0xsequence/abi@2.0.22 - - @0xsequence/utils@2.0.22 - -## 2.0.21 - -### Patch Changes - -- account: add publishWitnessFor -- Updated dependencies - - @0xsequence/abi@2.0.21 - - @0xsequence/utils@2.0.21 - -## 2.0.20 - -### Patch Changes - -- upgrade deps, and improve waas session status handling -- Updated dependencies - - @0xsequence/abi@2.0.20 - - @0xsequence/utils@2.0.20 - -## 2.0.19 - -### Patch Changes - -- Add Immutable zkEVM support -- Updated dependencies - - @0xsequence/abi@2.0.19 - - @0xsequence/utils@2.0.19 - -## 2.0.18 - -### Patch Changes - -- waas: new contractCall transaction type -- sessions: add arweave owner -- Updated dependencies -- Updated dependencies - - @0xsequence/abi@2.0.18 - - @0xsequence/utils@2.0.18 - -## 2.0.17 - -### Patch Changes - -- update waas auth to clear session before signIn -- Updated dependencies - - @0xsequence/abi@2.0.17 - - @0xsequence/utils@2.0.17 - -## 2.0.16 - -### Patch Changes - -- Removed Astar chains -- Updated dependencies - - @0xsequence/abi@2.0.16 - - @0xsequence/utils@2.0.16 - -## 2.0.15 - -### Patch Changes - -- indexer: update bindings with token balance additions -- Updated dependencies - - @0xsequence/abi@2.0.15 - - @0xsequence/utils@2.0.15 - -## 2.0.14 - -### Patch Changes - -- sessions: arweave config reader -- network: add b3 and apechain mainnet configs -- Updated dependencies -- Updated dependencies - - @0xsequence/abi@2.0.14 - - @0xsequence/utils@2.0.14 - -## 2.0.13 - -### Patch Changes - -- network: toy-testnet -- Updated dependencies - - @0xsequence/abi@2.0.13 - - @0xsequence/utils@2.0.13 - -## 2.0.12 - -### Patch Changes - -- api: update bindings -- Updated dependencies - - @0xsequence/abi@2.0.12 - - @0xsequence/utils@2.0.12 - -## 2.0.11 - -### Patch Changes - -- waas: intents test fix -- api: update bindings -- Updated dependencies -- Updated dependencies - - @0xsequence/abi@2.0.11 - - @0xsequence/utils@2.0.11 - -## 2.0.10 - -### Patch Changes - -- network: soneium minato testnet -- Updated dependencies - - @0xsequence/abi@2.0.10 - - @0xsequence/utils@2.0.10 - -## 2.0.9 - -### Patch Changes - -- network: fix SKALE network name -- Updated dependencies - - @0xsequence/abi@2.0.9 - - @0xsequence/utils@2.0.9 - -## 2.0.8 - -### Patch Changes - -- metadata: update bindings -- Updated dependencies - - @0xsequence/abi@2.0.8 - - @0xsequence/utils@2.0.8 - -## 2.0.7 - -### Patch Changes - -- wallet request handler fix -- Updated dependencies - - @0xsequence/abi@2.0.7 - - @0xsequence/utils@2.0.7 - -## 2.0.6 - -### Patch Changes - -- network: matic -> pol -- Updated dependencies - - @0xsequence/abi@2.0.6 - - @0xsequence/utils@2.0.6 - -## 2.0.5 - -### Patch Changes - -- provider: update databeat to 0.9.2 -- Updated dependencies - - @0xsequence/abi@2.0.5 - - @0xsequence/utils@2.0.5 - -## 2.0.4 - -### Patch Changes - -- network: add skale-nebula-testnet -- Updated dependencies - - @0xsequence/abi@2.0.4 - - @0xsequence/utils@2.0.4 - -## 2.0.3 - -### Patch Changes - -- waas: check session status in SequenceWaaS.isSignedIn() -- Updated dependencies - - @0xsequence/abi@2.0.3 - - @0xsequence/utils@2.0.3 - -## 2.0.2 - -### Patch Changes - -- sessions: property convert serialized bignumber hex value to bigint -- Updated dependencies - - @0xsequence/abi@2.0.2 - - @0xsequence/utils@2.0.2 - -## 2.0.1 - -### Patch Changes - -- waas: http signature check for authenticator requests -- provider: unwrap legacy json rpc responses -- use json replacer and reviver for bigints -- Updated dependencies -- Updated dependencies -- Updated dependencies - - @0xsequence/abi@2.0.1 - - @0xsequence/utils@2.0.1 - -## 2.0.0 - -### Major Changes - -- ethers v6 - -### Patch Changes - -- Updated dependencies - - @0xsequence/abi@2.0.0 - - @0xsequence/utils@2.0.0 - -## 1.10.15 - -### Patch Changes - -- utils: extractProjectIdFromAccessKey -- Updated dependencies - - @0xsequence/abi@1.10.15 - -## 1.10.14 - -### Patch Changes - -- network: add borne-testnet to allNetworks -- Updated dependencies - - @0xsequence/abi@1.10.14 - -## 1.10.13 - -### Patch Changes - -- network: add borne testnet -- Updated dependencies - - @0xsequence/abi@1.10.13 - -## 1.10.12 - -### Patch Changes - -- api: update bindings -- global/window -> globalThis -- Updated dependencies -- Updated dependencies - - @0xsequence/abi@1.10.12 - -## 1.10.11 - -### Patch Changes - -- waas: updated intent.gen without webrpc types, errors exported from authenticator.gen -- Updated dependencies - - @0xsequence/abi@1.10.11 - -## 1.10.10 - -### Patch Changes - -- metadata: update bindings with new contract collections api -- Updated dependencies - - @0xsequence/abi@1.10.10 - -## 1.10.9 - -### Patch Changes - -- waas minor update -- Updated dependencies - - @0xsequence/abi@1.10.9 - -## 1.10.8 - -### Patch Changes - -- update metadata bindings -- Updated dependencies - - @0xsequence/abi@1.10.8 - -## 1.10.7 - -### Patch Changes - -- minor fixes to waas client -- Updated dependencies - - @0xsequence/abi@1.10.7 - -## 1.10.6 - -### Patch Changes - -- metadata: update bindings -- Updated dependencies - - @0xsequence/abi@1.10.6 - -## 1.10.5 - -### Patch Changes - -- network: ape-chain-testnet -> apechain-testnet -- Updated dependencies - - @0xsequence/abi@1.10.5 - -## 1.10.4 - -### Patch Changes - -- network: add b3-sepolia, ape-chain-testnet, blast, blast-sepolia -- Updated dependencies - - @0xsequence/abi@1.10.4 - -## 1.10.3 - -### Patch Changes - -- typing fix -- Updated dependencies - - @0xsequence/abi@1.10.3 - -## 1.10.2 - -### Patch Changes - -- - waas: add getIdToken method - - indexer: update api client -- Updated dependencies - - @0xsequence/abi@1.10.2 - -## 1.10.1 - -### Patch Changes - -- metadata: update bindings -- Updated dependencies - - @0xsequence/abi@1.10.1 - -## 1.10.0 - -### Minor Changes - -- waas release v1.3.0 - -### Patch Changes - -- Updated dependencies - - @0xsequence/abi@1.10.0 - -## 1.9.37 - -### Patch Changes - -- network: adds nativeToken data to NetworkMetadata constants -- Updated dependencies - - @0xsequence/abi@1.9.37 - -## 1.9.36 - -### Patch Changes - -- guard: export client -- Updated dependencies - - @0xsequence/abi@1.9.36 - -## 1.9.35 - -### Patch Changes - -- guard: update bindings -- Updated dependencies - - @0xsequence/abi@1.9.35 - -## 1.9.34 - -### Patch Changes - -- waas: always use lowercase email -- Updated dependencies - - @0xsequence/abi@1.9.34 - -## 1.9.33 - -### Patch Changes - -- waas: umd build -- Updated dependencies - - @0xsequence/abi@1.9.33 - -## 1.9.32 - -### Patch Changes - -- indexer: update bindings -- Updated dependencies - - @0xsequence/abi@1.9.32 - -## 1.9.31 - -### Patch Changes - -- metadata: token directory changes -- Updated dependencies - - @0xsequence/abi@1.9.31 - -## 1.9.30 - -### Patch Changes - -- update -- Updated dependencies - - @0xsequence/abi@1.9.30 - -## 1.9.29 - -### Patch Changes - -- disable gnosis chain -- Updated dependencies - - @0xsequence/abi@1.9.29 - -## 1.9.28 - -### Patch Changes - -- add utils/merkletree -- Updated dependencies - - @0xsequence/abi@1.9.28 - -## 1.9.27 - -### Patch Changes - -- network: optimistic -> optimism -- waas: remove defaults -- api, sessions: update bindings -- Updated dependencies -- Updated dependencies -- Updated dependencies - - @0xsequence/abi@1.9.27 - -## 1.9.26 - -### Patch Changes - -- - add backend interfaces for pluggable interfaces - - introduce @0xsequence/react-native - - update pnpm to lockfile v9 -- Updated dependencies - - @0xsequence/abi@1.9.26 - -## 1.9.25 - -### Patch Changes - -- update webrpc clients with new error types -- Updated dependencies - - @0xsequence/abi@1.9.25 - -## 1.9.24 - -### Patch Changes - -- waas: add memoryStore backend to localStore -- Updated dependencies - - @0xsequence/abi@1.9.24 - -## 1.9.23 - -### Patch Changes - -- update api client bindings -- Updated dependencies - - @0xsequence/abi@1.9.23 - -## 1.9.22 - -### Patch Changes - -- update metadata client bindings -- Updated dependencies - - @0xsequence/abi@1.9.22 - -## 1.9.21 - -### Patch Changes - -- api client bindings -- Updated dependencies - - @0xsequence/abi@1.9.21 - -## 1.9.20 - -### Patch Changes - -- api client bindings update -- Updated dependencies - - @0xsequence/abi@1.9.20 - -## 1.9.19 - -### Patch Changes - -- waas update -- Updated dependencies - - @0xsequence/abi@1.9.19 - -## 1.9.18 - -### Patch Changes - -- provider: prohibit dangerous functions -- Updated dependencies - - @0xsequence/abi@1.9.18 - -## 1.9.17 - -### Patch Changes - -- network: add xr-sepolia -- Updated dependencies - - @0xsequence/abi@1.9.17 - -## 1.9.16 - -### Patch Changes - -- waas: sequence.feeOptions -- Updated dependencies - - @0xsequence/abi@1.9.16 - -## 1.9.15 - -### Patch Changes - -- metadata: collection external_link field name fix -- Updated dependencies - - @0xsequence/abi@1.9.15 - -## 1.9.14 - -### Patch Changes - -- network: astar-zkatana -> astar-zkyoto -- network: deprecate polygon mumbai network -- network: add xai and polygon amoy -- Updated dependencies -- Updated dependencies -- Updated dependencies - - @0xsequence/abi@1.9.14 - -## 1.9.13 - -### Patch Changes - -- waas: fix @0xsequence/network dependency -- Updated dependencies - - @0xsequence/abi@1.9.13 - -## 1.9.12 - -### Patch Changes - -- indexer: update rpc bindings -- provider: signMessage: Serialize the BytesLike or string message into hexstring before sending -- waas: SessionAuthProof -- Updated dependencies -- Updated dependencies -- Updated dependencies - - @0xsequence/abi@1.9.12 - -## 1.9.11 - -### Patch Changes - -- metdata, update rpc bindings -- Updated dependencies - - @0xsequence/abi@1.9.11 - -## 1.9.10 - -### Patch Changes - -- update metadata rpc bindings -- Updated dependencies - - @0xsequence/abi@1.9.10 - -## 1.9.9 - -### Patch Changes - -- metadata, add SequenceCollections rpc client -- Updated dependencies - - @0xsequence/abi@1.9.9 - -## 1.9.8 - -### Patch Changes - -- waas client update -- Updated dependencies - - @0xsequence/abi@1.9.8 - -## 1.9.7 - -### Patch Changes - -- update rpc client bindings for api, metadata and relayer -- Updated dependencies - - @0xsequence/abi@1.9.7 - -## 1.9.6 - -### Patch Changes - -- waas package update -- Updated dependencies - - @0xsequence/abi@1.9.6 - -## 1.9.5 - -### Patch Changes - -- RpcRelayer prioritize project access key -- Updated dependencies - - @0xsequence/abi@1.9.5 - -## 1.9.4 - -### Patch Changes - -- waas: fix network dependency -- Updated dependencies - - @0xsequence/abi@1.9.4 - -## 1.9.3 - -### Patch Changes - -- provider: don't append access key to RPC url if user has already provided it -- Updated dependencies - - @0xsequence/abi@1.9.3 - -## 1.9.2 - -### Patch Changes - -- network: add xai-sepolia -- Updated dependencies - - @0xsequence/abi@1.9.2 - -## 1.9.1 - -### Patch Changes - -- analytics fix -- Updated dependencies - - @0xsequence/abi@1.9.1 - -## 1.9.0 - -### Minor Changes - -- waas release - -### Patch Changes - -- Updated dependencies - - @0xsequence/abi@1.9.0 - -## 1.8.8 - -### Patch Changes - -- update metadata bindings -- Updated dependencies - - @0xsequence/abi@1.8.8 - -## 1.8.7 - -### Patch Changes - -- provider: update databeat to 0.9.1 -- Updated dependencies - - @0xsequence/abi@1.8.7 - -## 1.8.6 - -### Patch Changes - -- guard: SignedOwnershipProof -- Updated dependencies - - @0xsequence/abi@1.8.6 - -## 1.8.5 - -### Patch Changes - -- guard: signOwnershipProof and isSignedOwnershipProof -- Updated dependencies - - @0xsequence/abi@1.8.5 - -## 1.8.4 - -### Patch Changes - -- network: add homeverse to networks list -- Updated dependencies - - @0xsequence/abi@1.8.4 - -## 1.8.3 - -### Patch Changes - -- api: introduce basic linked wallet support -- Updated dependencies - - @0xsequence/abi@1.8.3 - -## 1.8.2 - -### Patch Changes - -- provider: don't initialize analytics unless explicitly requested -- Updated dependencies - - @0xsequence/abi@1.8.2 - -## 1.8.1 - -### Patch Changes - -- update to analytics provider -- Updated dependencies - - @0xsequence/abi@1.8.1 - -## 1.8.0 - -### Minor Changes - -- provider: project analytics - -### Patch Changes - -- Updated dependencies - - @0xsequence/abi@1.8.0 - -## 1.7.2 - -### Patch Changes - -- 0xsequence: ChainId should not be exported as a type -- account, wallet: fix nonce selection -- Updated dependencies -- Updated dependencies - - @0xsequence/abi@1.7.2 - -## 1.7.1 - -### Patch Changes - -- network: add missing avalanche logoURI -- Updated dependencies - - @0xsequence/abi@1.7.1 - -## 1.7.0 - -### Minor Changes - -- provider: projectAccessKey is now required - -### Patch Changes - -- network: add NetworkMetadata.logoURI property for all networks -- Updated dependencies -- Updated dependencies - - @0xsequence/abi@1.7.0 - -## 1.6.3 - -### Patch Changes - -- network list update -- Updated dependencies - - @0xsequence/abi@1.6.3 - -## 1.6.2 - -### Patch Changes - -- auth: projectAccessKey option -- wallet: use 12 bytes for random space -- Updated dependencies -- Updated dependencies - - @0xsequence/abi@1.6.2 - -## 1.6.1 - -### Patch Changes - -- core: add simple config from subdigest support -- core: fix encode tree with subdigest -- account: implement buildOnChainSignature on Account -- Updated dependencies -- Updated dependencies -- Updated dependencies - - @0xsequence/abi@1.6.1 - -## 1.6.0 - -### Minor Changes - -- account, wallet: parallel transactions by default - -### Patch Changes - -- provider: emit disconnect on sign out -- Updated dependencies -- Updated dependencies - - @0xsequence/abi@1.6.0 - -## 1.5.0 - -### Minor Changes - -- signhub: add 'signing' signer status - -### Patch Changes - -- auth: Session.open: onAccountAddress callback -- account: allow empty transaction bundles -- Updated dependencies -- Updated dependencies -- Updated dependencies - - @0xsequence/abi@1.5.0 - -## 1.4.9 - -### Patch Changes - -- rename SequenceMetadataClient to SequenceMetadata -- Updated dependencies - - @0xsequence/abi@1.4.9 - -## 1.4.8 - -### Patch Changes - -- account: Account.getSigners -- Updated dependencies - - @0xsequence/abi@1.4.8 - -## 1.4.7 - -### Patch Changes - -- update indexer client bindings -- Updated dependencies - - @0xsequence/abi@1.4.7 - -## 1.4.6 - -### Patch Changes - -- - add sepolia networks, mark goerli as deprecated - - update indexer client bindings -- Updated dependencies - - @0xsequence/abi@1.4.6 - -## 1.4.5 - -### Patch Changes - -- indexer/metadata: update client bindings -- auth: selectWallet with new address -- Updated dependencies -- Updated dependencies - - @0xsequence/abi@1.4.5 - -## 1.4.4 - -### Patch Changes - -- indexer: update bindings -- auth: handle jwt expiry -- Updated dependencies -- Updated dependencies - - @0xsequence/abi@1.4.4 - -## 1.4.3 - -### Patch Changes - -- guard: return active status from GuardSigner.getAuthMethods -- Updated dependencies - - @0xsequence/abi@1.4.3 - -## 1.4.2 - -### Patch Changes - -- guard: update bindings -- Updated dependencies - - @0xsequence/abi@1.4.2 - -## 1.4.1 - -### Patch Changes - -- network: remove unused networks -- signhub: orchestrator interface -- guard: auth methods interface -- guard: update bindings for pin and totp -- guard: no more retry logic -- Updated dependencies -- Updated dependencies -- Updated dependencies -- Updated dependencies -- Updated dependencies - - @0xsequence/abi@1.4.1 - -## 1.4.0 - -### Minor Changes - -- project access key support - -### Patch Changes - -- Updated dependencies - - @0xsequence/abi@1.4.0 - -## 1.3.0 - -### Minor Changes - -- signhub: account children - -### Patch Changes - -- guard: do not throw when building deploy transaction -- network: snowtrace.io -> subnets.avax.network/c-chain -- Updated dependencies -- Updated dependencies -- Updated dependencies - - @0xsequence/abi@1.3.0 - -## 1.2.9 - -### Patch Changes - -- account: AccountSigner.sendTransaction simulateForFeeOptions -- relayer: update bindings -- Updated dependencies -- Updated dependencies - - @0xsequence/abi@1.2.9 - -## 1.2.8 - -### Patch Changes - -- rename X-Sequence-Token-Key header to X-Access-Key -- Updated dependencies - - @0xsequence/abi@1.2.8 - -## 1.2.7 - -### Patch Changes - -- add x-sequence-token-key to clients -- Updated dependencies - - @0xsequence/abi@1.2.7 - -## 1.2.6 - -### Patch Changes - -- Fix bind multicall provider -- Updated dependencies - - @0xsequence/abi@1.2.6 - -## 1.2.5 - -### Patch Changes - -- Multicall default configuration fixes -- Updated dependencies - - @0xsequence/abi@1.2.5 - -## 1.2.4 - -### Patch Changes - -- provider: Adding missing payment provider types to PaymentProviderOption -- provider: WalletRequestHandler.notifyChainChanged -- Updated dependencies -- Updated dependencies - - @0xsequence/abi@1.2.4 - -## 1.2.3 - -### Patch Changes - -- auth, provider: connect to accept optional authorizeNonce -- Updated dependencies - - @0xsequence/abi@1.2.3 - -## 1.2.2 - -### Patch Changes - -- provider: allow createContract calls -- core: check for explicit zero address in contract deployments -- Updated dependencies -- Updated dependencies - - @0xsequence/abi@1.2.2 - -## 1.2.1 - -### Patch Changes - -- auth: use sequence api chain id as reference chain id if available -- Updated dependencies - - @0xsequence/abi@1.2.1 - -## 1.2.0 - -### Minor Changes - -- split services from session, better local support - -### Patch Changes - -- Updated dependencies - - @0xsequence/abi@1.2.0 - -## 1.1.15 - -### Patch Changes - -- guard: remove error filtering -- Updated dependencies - - @0xsequence/abi@1.1.15 - -## 1.1.14 - -### Patch Changes - -- guard: add GuardSigner.onError -- Updated dependencies - - @0xsequence/abi@1.1.14 - -## 1.1.13 - -### Patch Changes - -- provider: pass client version with connect options -- provider: removing large from BannerSize -- Updated dependencies -- Updated dependencies - - @0xsequence/abi@1.1.13 - -## 1.1.12 - -### Patch Changes - -- provider: adding bannerSize to ConnectOptions -- Updated dependencies - - @0xsequence/abi@1.1.12 - -## 1.1.11 - -### Patch Changes - -- add homeverse configs -- Updated dependencies - - @0xsequence/abi@1.1.11 - -## 1.1.10 - -### Patch Changes - -- handle default EIP6492 on send -- Updated dependencies - - @0xsequence/abi@1.1.10 - -## 1.1.9 - -### Patch Changes - -- Custom default EIP6492 on client -- Updated dependencies - - @0xsequence/abi@1.1.9 - -## 1.1.8 - -### Patch Changes - -- metadata: searchMetadata: add types filter -- Updated dependencies - - @0xsequence/abi@1.1.8 - -## 1.1.7 - -### Patch Changes - -- adding signInWith connect settings option to allow dapps to automatically login their users with a certain provider optimizing the normal authentication flow -- Updated dependencies - - @0xsequence/abi@1.1.7 - -## 1.1.6 - -### Patch Changes - -- metadata: searchMetadata: add chainID and excludeTokenMetadata filters -- Updated dependencies - - @0xsequence/abi@1.1.6 - -## 1.1.5 - -### Patch Changes - -- account: re-compute meta-transaction id for wallet deployment transactions -- Updated dependencies - - @0xsequence/abi@1.1.5 - -## 1.1.4 - -### Patch Changes - -- network: rename base-mainnet to base -- provider: override isDefaultChain with ConnectOptions.networkId if provided -- Updated dependencies -- Updated dependencies - - @0xsequence/abi@1.1.4 - -## 1.1.3 - -### Patch Changes - -- provider: use network id from transport session -- provider: sign authorization using ConnectOptions.networkId if provided -- Updated dependencies -- Updated dependencies - - @0xsequence/abi@1.1.3 - -## 1.1.2 - -### Patch Changes - -- provider: jsonrpc chain id fixes -- Updated dependencies - - @0xsequence/abi@1.1.2 - -## 1.1.1 - -### Patch Changes - -- network: add base mainnet and sepolia -- provider: reject toxic transaction requests -- Updated dependencies -- Updated dependencies - - @0xsequence/abi@1.1.1 - -## 1.1.0 - -### Minor Changes - -- Refactor dapp facing provider - -### Patch Changes - -- Updated dependencies - - @0xsequence/abi@1.1.0 - -## 1.0.5 - -### Patch Changes - -- network: export network constants -- guard: use the correct global for fetch -- network: nova-explorer.arbitrum.io -> nova.arbiscan.io -- Updated dependencies -- Updated dependencies -- Updated dependencies - - @0xsequence/abi@1.0.5 - -## 1.0.4 - -### Patch Changes - -- provider: accept name or number for networkId -- Updated dependencies - - @0xsequence/abi@1.0.4 - -## 1.0.3 - -### Patch Changes - -- Simpler isValidSignature helpers -- Updated dependencies - - @0xsequence/abi@1.0.3 - -## 1.0.2 - -### Patch Changes - -- add extra signature validation utils methods -- Updated dependencies - - @0xsequence/abi@1.0.2 - -## 1.0.1 - -### Patch Changes - -- add homeverse testnet -- Updated dependencies - - @0xsequence/abi@1.0.1 - -## 1.0.0 - -### Major Changes - -- https://sequence.xyz/blog/sequence-wallet-light-state-sync-full-merkle-wallets - -### Patch Changes - -- Updated dependencies - - @0xsequence/abi@1.0.0 diff --git a/old/packages/core/package.json b/old/packages/core/package.json deleted file mode 100644 index 1658cc0e5..000000000 --- a/old/packages/core/package.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "name": "@0xsequence/core", - "version": "2.3.8", - "description": "core primitives for interacting with the sequence wallet contracts", - "repository": "https://github.com/0xsequence/sequence.js/tree/master/packages/core", - "source": "src/index.ts", - "main": "dist/0xsequence-core.cjs.js", - "module": "dist/0xsequence-core.esm.js", - "author": "Horizon Blockchain Games", - "license": "Apache-2.0", - "scripts": { - "test": "pnpm test:file tests/**/*.spec.ts", - "test:file": "TS_NODE_PROJECT=../../tsconfig.test.json mocha -r ts-node/register --timeout 30000", - "test:coverage": "nyc pnpm test" - }, - "peerDependencies": { - "ethers": ">=6" - }, - "devDependencies": { - "@istanbuljs/nyc-config-typescript": "^1.0.2", - "ethers": "6.13.4", - "nyc": "^15.1.0" - }, - "files": [ - "src", - "dist" - ], - "dependencies": { - "@0xsequence/utils": "workspace:*", - "@0xsequence/abi": "workspace:*" - } -} diff --git a/old/packages/core/src/commons/config.ts b/old/packages/core/src/commons/config.ts deleted file mode 100644 index 6aefb8e8c..000000000 --- a/old/packages/core/src/commons/config.ts +++ /dev/null @@ -1,67 +0,0 @@ -import { ethers } from 'ethers' -import { WalletContext } from './context' -import * as transaction from './transaction' - -export type Config = { - version: number -} - -export type SimpleSigner = { address: string; weight: ethers.BigNumberish } - -export type SimpleConfig = { - threshold: ethers.BigNumberish - checkpoint: ethers.BigNumberish - signers: SimpleSigner[] - subdigests?: string[] -} - -export interface ConfigCoder { - imageHashOf: (config: T) => string - hasSubdigest: (config: T, subdigest: string) => boolean - - isWalletConfig: (config: Config) => config is T - - checkpointOf: (config: T) => bigint - - fromSimple: (config: SimpleConfig) => T - - signersOf: (config: T) => { address: string; weight: number }[] - - toJSON: (config: T) => string - fromJSON: (json: string) => T - - isComplete: (config: T) => boolean - - editConfig: ( - config: T, - action: { - add?: SimpleSigner[] - remove?: string[] - threshold?: ethers.BigNumberish - checkpoint?: ethers.BigNumberish - } - ) => T - - buildStubSignature: (config: T, overrides: Map) => string - - // isValid: (config: T) => boolean - - // TODO: This may not be the best place for this - // maybe it could go in the migration classes? - update: { - isKindUsed: boolean - - buildTransaction: ( - address: string, - config: T, - context: WalletContext, - kind?: 'first' | 'later' | undefined - ) => transaction.TransactionBundle - - decodeTransaction: (tx: transaction.TransactionBundle) => { - address: string - newImageHash: string - kind: 'first' | 'later' | undefined - } - } -} diff --git a/old/packages/core/src/commons/context.ts b/old/packages/core/src/commons/context.ts deleted file mode 100644 index 72feabc0a..000000000 --- a/old/packages/core/src/commons/context.ts +++ /dev/null @@ -1,114 +0,0 @@ -import { ethers } from 'ethers' -import { allVersions } from '..' - -import { DeployedWalletContext as context1 } from '../v1' -import { DeployedWalletContext as context2 } from '../v2' - -export type WalletContext = { - version: number - factory: string - mainModule: string - mainModuleUpgradable: string - guestModule: string - - walletCreationCode: string - - proxyImplementationHook?: string -} - -export function addressOf(context: WalletContext, imageHash: ethers.BytesLike) { - const codeHash = ethers.keccak256( - ethers.solidityPacked(['bytes', 'bytes32'], [context.walletCreationCode, ethers.zeroPadValue(context.mainModule, 32)]) - ) - - const hash = ethers.keccak256( - ethers.solidityPacked(['bytes1', 'address', 'bytes32', 'bytes32'], ['0xff', context.factory, imageHash, codeHash]) - ) - - return ethers.getAddress(ethers.dataSlice(hash, 12)) -} - -export async function isValidCounterfactual( - wallet: string, - digest: ethers.BytesLike, - signature: ethers.BytesLike, - chainId: ethers.BigNumberish, - provider: ethers.Provider, - contexts: { [key: number]: WalletContext } -) { - // We don't know the version of the signature - // so we need to try all of them - const res = await Promise.all( - allVersions.map(async version => { - try { - const decoded = version.signature.SignatureCoder.decode(ethers.hexlify(signature)) - - const recovered1 = await version.signature.SignatureCoder.recover( - decoded as any, - { - address: wallet, - digest: ethers.hexlify(digest), - chainId - }, - provider - ) - - const imageHash = version.config.ConfigCoder.imageHashOf(recovered1.config as any) - const counterfactualAddress = addressOf(contexts[version.version], imageHash) - - if (counterfactualAddress.toLowerCase() === wallet.toLowerCase()) { - return true - } - - // chainId=0 means no chainId, so the signature is valid for all chains - // we need to check that case too - const recovered2 = await version.signature.SignatureCoder.recover( - decoded as any, - { - address: wallet, - digest: ethers.hexlify(digest), - chainId - }, - provider - ) - - const imageHash2 = version.config.ConfigCoder.imageHashOf(recovered2.config as any) - const counterfactualAddress2 = addressOf(contexts[version.version], imageHash2) - - return counterfactualAddress2.toLowerCase() === wallet.toLowerCase() - } catch {} - - // We most likely failed to decode the signature - return false - }) - ) - - return res.some(r => r) -} - -export type VersionedContext = { [key: number]: WalletContext } - -export function isValidVersionedContext(contexts: VersionedContext): boolean { - // number of keys is the number of versions - const versions = Object.keys(contexts).length - - // check that all versions exist and are valid - for (let i = 1; i <= versions; i++) { - const context = contexts[i] - if (!context || context.version !== i) { - return false - } - } - - return true -} - -export function latestContext(contexts: VersionedContext): WalletContext { - const versions = Object.keys(contexts).length - return contexts[versions] -} - -export const defaultContexts: VersionedContext = { - 1: context1, - 2: context2 -} diff --git a/old/packages/core/src/commons/index.ts b/old/packages/core/src/commons/index.ts deleted file mode 100644 index 7bc6db71b..000000000 --- a/old/packages/core/src/commons/index.ts +++ /dev/null @@ -1,10 +0,0 @@ -export * as config from './config' -export * as signature from './signature' -export * as context from './context' -export * as signer from './signer' -export * as EIP1271 from './validateEIP1271' -export * as transaction from './transaction' -export * as reader from './reader' -export * as EIP6492 from './validateEIP6492' - -export * from './orchestrator' diff --git a/old/packages/core/src/commons/orchestrator.ts b/old/packages/core/src/commons/orchestrator.ts deleted file mode 100644 index 60c374450..000000000 --- a/old/packages/core/src/commons/orchestrator.ts +++ /dev/null @@ -1,42 +0,0 @@ -import { ethers } from 'ethers' -import { commons } from '..' -import { Config } from './config' - -/** - * Request metadata, used by the wallet to pass additional information through the orchestrator. - */ -export type WalletSignRequestMetadata = { - address: string - digest: ethers.BytesLike - chainId: ethers.BigNumberish - - config: Config - - parts?: Map - - // TODO: We can add a "percentage" field to the orchestrator to indicate - // how close are we to the threshold. This can be used to display - // a progress bar or something similar. - - message?: ethers.BytesLike - transactions?: commons.transaction.Transaction[] - - // This is used only when a Sequence wallet is nested in another Sequence wallet - // it contains the original metadata of the parent wallet. - parent?: WalletSignRequestMetadata - - decorate?: boolean - cantValidateBehavior?: 'ignore' | 'eip6492' | 'throw' -} - -export function isWalletSignRequestMetadata(obj: any): obj is WalletSignRequestMetadata { - return obj && obj.address && obj.digest && obj.chainId !== undefined && obj.config -} - -/** - * Request metadata, used by the wallet to pass additional information through the orchestrator. - */ -export type WalletDeployMetadata = { - includeChildren?: boolean // Whether to include children in deployment, default false - ignoreDeployed?: boolean // Whether to ignore already deployed wallets, default false -} diff --git a/old/packages/core/src/commons/reader.ts b/old/packages/core/src/commons/reader.ts deleted file mode 100644 index e548833b0..000000000 --- a/old/packages/core/src/commons/reader.ts +++ /dev/null @@ -1,92 +0,0 @@ -import { walletContracts } from '@0xsequence/abi' -import { ethers } from 'ethers' -import { validateEIP6492Offchain } from './validateEIP6492' - -/** - * Provides stateful information about the wallet. - */ -export interface Reader { - isDeployed(wallet: string): Promise - implementation(wallet: string): Promise - imageHash(wallet: string): Promise - nonce(wallet: string, space: ethers.BigNumberish): Promise - isValidSignature(wallet: string, digest: ethers.BytesLike, signature: ethers.BytesLike): Promise -} - -/** - * The OnChainReader class fetches on-chain data from a wallet. - * It is used to understand the "real" state of the wallet contract on-chain. - */ -export class OnChainReader implements Reader { - // Simple cache to avoid re-fetching the same data - private isDeployedCache: Set = new Set() - - constructor(public readonly provider: ethers.Provider) {} - - private module(address: string) { - return new ethers.Contract( - address, - [...walletContracts.mainModuleUpgradable.abi, ...walletContracts.mainModule.abi, ...walletContracts.erc1271.abi], - this.provider - ) - } - - async isDeployed(wallet: string): Promise { - // This is safe to cache because the wallet cannot be undeployed once deployed - if (this.isDeployedCache.has(wallet)) { - return true - } - - const code = await this.provider.getCode(wallet).then(c => ethers.getBytes(c)) - const isDeployed = code.length !== 0 - if (isDeployed) { - this.isDeployedCache.add(wallet) - } - - return isDeployed - } - - async implementation(wallet: string): Promise { - const position = ethers.AbiCoder.defaultAbiCoder().encode(['address'], [wallet]) - const val = await this.provider.getStorage(wallet, position).then(c => ethers.getBytes(c)) - - if (val.length === 20) { - return ethers.getAddress(ethers.hexlify(val)) - } - - if (val.length === 32) { - return ethers.AbiCoder.defaultAbiCoder().decode(['address'], val)[0] - } - - return undefined - } - - async imageHash(wallet: string): Promise { - try { - const imageHash = await this.module(wallet).imageHash() - return imageHash - } catch {} - - return undefined - } - - async nonce(wallet: string, space: ethers.BigNumberish = 0): Promise { - try { - const nonce = await this.module(wallet).readNonce(space) - return nonce - } catch (e) { - if (!(await this.isDeployed(wallet))) { - return 0 - } - - throw e - } - } - - // We use the EIP-6492 validator contract to check the signature - // this means that if the wallet is not deployed, then the signature - // must be prefixed with a transaction that deploys the wallet - async isValidSignature(wallet: string, digest: ethers.BytesLike, signature: ethers.BytesLike): Promise { - return validateEIP6492Offchain(this.provider, wallet, digest, signature) - } -} diff --git a/old/packages/core/src/commons/signature.ts b/old/packages/core/src/commons/signature.ts deleted file mode 100644 index 29a113d6e..000000000 --- a/old/packages/core/src/commons/signature.ts +++ /dev/null @@ -1,71 +0,0 @@ -import { ethers } from 'ethers' -import * as config from './config' - -export type SignaturePart = { - signature: string - isDynamic: boolean -} - -export type Signature = { - version: number - config: T - subdigest: string - payload?: SignedPayload -} - -export type UnrecoveredSignature = { - version: number -} - -export type SignedPayload = { - message?: ethers.BytesLike - digest: string - chainId: ethers.BigNumberish - address: string -} - -export interface SignatureCoder< - Y extends config.Config = config.Config, - T extends Signature = Signature, - Z extends UnrecoveredSignature = UnrecoveredSignature -> { - decode: (data: string) => Z - encode: (data: T | Z | ethers.BytesLike) => string - - trim: (data: string) => Promise - - recover: (data: Z, payload: SignedPayload, provider: ethers.Provider) => Promise - - supportsNoChainId: boolean - - encodeSigners: ( - config: Y, - signatures: Map, - subdigests: string[], - chainId: ethers.BigNumberish - ) => { - encoded: string - weight: bigint - } - - hasEnoughSigningPower: (config: Y, signatures: Map) => boolean - - chainSignatures: (main: T | Z | ethers.BytesLike, suffixes: (T | Z | ethers.BytesLike)[]) => string - - hashSetImageHash: (imageHash: string) => string - - signaturesOf: (config: Y) => { address: string; signature: string }[] - - signaturesOfDecoded: (decoded: Z) => string[] -} - -export function subdigestOf(payload: SignedPayload) { - return ethers.solidityPackedKeccak256( - ['bytes', 'uint256', 'address', 'bytes32'], - ['0x1901', payload.chainId, payload.address, payload.digest] - ) -} - -export function isSignedPayload(payload: any): payload is SignedPayload { - return payload.digest !== undefined && payload.chainId !== undefined && payload.address !== undefined -} diff --git a/old/packages/core/src/commons/signer.ts b/old/packages/core/src/commons/signer.ts deleted file mode 100644 index c570d77f4..000000000 --- a/old/packages/core/src/commons/signer.ts +++ /dev/null @@ -1,73 +0,0 @@ -import { ethers } from 'ethers' -import { isValidEIP1271Signature } from './validateEIP1271' - -export enum SigType { - EIP712 = 1, - ETH_SIGN = 2, - WALLET_BYTES32 = 3 -} - -export function canRecover(signature: ethers.BytesLike) { - const bytes = ethers.getBytes(signature) - const type = bytes[bytes.length - 1] - - return type === SigType.EIP712 || type === SigType.ETH_SIGN -} - -export function recoverSigner(digest: ethers.BytesLike, signature: ethers.BytesLike) { - const bytes = ethers.getBytes(signature) - const digestBytes = ethers.getBytes(digest) - - // type is last byte - const type = bytes[bytes.length - 1] - - // Split r:s:v - const r = ethers.hexlify(bytes.slice(0, 32)) - const s = ethers.hexlify(bytes.slice(32, 64)) - const v = Number(ethers.hexlify(bytes.slice(64, 65))) - - const splitSignature = { r, s, v } - - if (type === SigType.EIP712) { - return ethers.recoverAddress(digestBytes, splitSignature) - } - - if (type === SigType.ETH_SIGN) { - return ethers.recoverAddress(ethers.hashMessage(digestBytes), splitSignature) - } - - throw new Error(`Unsupported signature type: ${type}`) -} - -export function isValidSignature( - address: string, - digest: ethers.BytesLike, - signature: ethers.BytesLike, - provider: ethers.Provider -) { - const bytes = ethers.getBytes(signature) - - // type is last byte - const type = bytes[bytes.length - 1] - - if (type === SigType.EIP712 || type === SigType.ETH_SIGN) { - return address === recoverSigner(digest, signature) - } - - if (type === SigType.WALLET_BYTES32) { - return isValidEIP1271Signature(address, ethers.hexlify(digest), bytes.slice(0, -1), provider) - } - - throw new Error(`Unsupported signature type: ${type}`) -} - -export function tryRecoverSigner(digest: ethers.BytesLike, signature: ethers.BytesLike): string | undefined { - const bytes = ethers.getBytes(signature) - if (bytes.length !== 66) return undefined - - try { - return recoverSigner(digest, bytes) - } catch {} - - return undefined -} diff --git a/old/packages/core/src/commons/transaction.ts b/old/packages/core/src/commons/transaction.ts deleted file mode 100644 index de4f2a57f..000000000 --- a/old/packages/core/src/commons/transaction.ts +++ /dev/null @@ -1,327 +0,0 @@ -import { ethers } from 'ethers' - -import { subdigestOf } from './signature' -import { walletContracts } from '@0xsequence/abi' - -export interface Transaction { - to: string - value?: ethers.BigNumberish - data?: string - gasLimit?: ethers.BigNumberish - delegateCall?: boolean - revertOnError?: boolean -} - -export interface SimulatedTransaction extends Transaction { - succeeded: boolean - executed: boolean - gasUsed: number - gasLimit: number - result?: string - reason?: string -} - -export interface TransactionEncoded { - delegateCall: boolean - revertOnError: boolean - gasLimit: ethers.BigNumberish - target: string - value: ethers.BigNumberish - data: string -} - -export type Transactionish = ethers.TransactionRequest | ethers.TransactionRequest[] | Transaction | Transaction[] - -export interface TransactionResponse extends ethers.TransactionResponse { - receipt?: R -} - -export type TransactionBundle = { - entrypoint: string - transactions: Transaction[] - nonce?: ethers.BigNumberish -} - -export type IntendedTransactionBundle = TransactionBundle & { - chainId: ethers.BigNumberish - intent: { - id: string - wallet: string - } -} - -export type SignedTransactionBundle = IntendedTransactionBundle & { - signature: string - nonce: ethers.BigNumberish -} - -export type RelayReadyTransactionBundle = SignedTransactionBundle | IntendedTransactionBundle - -export const MetaTransactionsType = `tuple( - bool delegateCall, - bool revertOnError, - uint256 gasLimit, - address target, - uint256 value, - bytes data -)[]` - -export function intendTransactionBundle( - bundle: TransactionBundle, - wallet: string, - chainId: ethers.BigNumberish, - id: string -): IntendedTransactionBundle { - return { - ...bundle, - chainId, - intent: { id: id, wallet } - } -} - -export function intendedTransactionID(bundle: IntendedTransactionBundle) { - return ethers.keccak256( - ethers.AbiCoder.defaultAbiCoder().encode( - ['address', 'uint256', 'bytes32'], - [bundle.intent.wallet, bundle.chainId, bundle.intent.id] - ) - ) -} - -export function unpackMetaTransactionsData(data: ethers.BytesLike): [bigint, TransactionEncoded[]] { - const res = ethers.AbiCoder.defaultAbiCoder().decode(['uint256', MetaTransactionsType], data) - if (res.length !== 2 || !res[0] || !res[1]) throw new Error('Invalid meta transaction data') - return [res[0], res[1]] -} - -export function packMetaTransactionsData(nonce: ethers.BigNumberish, txs: Transaction[]): string { - return ethers.AbiCoder.defaultAbiCoder().encode(['uint256', MetaTransactionsType], [nonce, sequenceTxAbiEncode(txs)]) -} - -export function digestOfTransactions(nonce: ethers.BigNumberish, txs: Transaction[]) { - return ethers.keccak256(packMetaTransactionsData(nonce, txs)) -} - -export function subdigestOfTransactions( - address: string, - chainId: ethers.BigNumberish, - nonce: ethers.BigNumberish, - txs: Transaction[] -): string { - return subdigestOf({ address, chainId, digest: digestOfTransactions(nonce, txs) }) -} - -export function subdigestOfGuestModuleTransactions( - guestModule: string, - chainId: ethers.BigNumberish, - txs: Transaction[] -): string { - return subdigestOf({ - address: guestModule, - chainId, - digest: ethers.keccak256( - ethers.AbiCoder.defaultAbiCoder().encode(['string', MetaTransactionsType], ['guest:', sequenceTxAbiEncode(txs)]) - ) - }) -} - -export function toSequenceTransactions( - wallet: string, - txs: ethers.TransactionRequest[] -): { nonce?: ethers.BigNumberish; transaction: Transaction }[] { - return txs.map(tx => toSequenceTransaction(wallet, tx)) -} - -export function toSequenceTransaction( - wallet: string, - tx: ethers.TransactionRequest -): { nonce?: ethers.BigNumberish; transaction: Transaction } { - if (tx.to && tx.to !== ethers.ZeroAddress) { - return { - nonce: !isNullish(tx.nonce) ? BigInt(tx.nonce) : undefined, - transaction: { - delegateCall: false, - revertOnError: false, - gasLimit: !isNullish(tx.gasLimit) ? BigInt(tx.gasLimit) : undefined, - // XXX: `tx.to` could also be ethers Addressable type which returns a getAddress promise - // Keeping this as is for now so we don't have to change everything to async - to: tx.to as string, - value: BigInt(tx.value || 0), - data: tx.data || '0x' - } - } - } else { - const walletInterface = new ethers.Interface(walletContracts.mainModule.abi) - const data = walletInterface.encodeFunctionData(walletInterface.getFunction('createContract')!, [tx.data]) - - return { - nonce: typeof tx.nonce === 'number' ? BigInt(tx.nonce) : undefined, - transaction: { - delegateCall: false, - revertOnError: false, - gasLimit: !isNullish(tx.gasLimit) ? BigInt(tx.gasLimit) : undefined, - to: wallet, - value: BigInt(tx.value || 0), - data - } - } - } -} - -export function isSequenceTransaction(tx: any): tx is Transaction { - return tx.delegateCall !== undefined || tx.revertOnError !== undefined -} - -export function hasSequenceTransactions(txs: any[]): txs is Transaction[] { - return txs.every(isSequenceTransaction) -} - -// TODO: We may be able to remove this if we make Transaction === TransactionEncoded -export function sequenceTxAbiEncode(txs: Transaction[]): TransactionEncoded[] { - return txs.map(tx => ({ - delegateCall: tx.delegateCall === true, - revertOnError: tx.revertOnError === true, - gasLimit: !isNullish(tx.gasLimit) ? BigInt(tx.gasLimit) : 0n, - target: tx.to ?? ethers.ZeroAddress, - value: !isNullish(tx.value) ? tx.value : 0n, - data: tx.data || '0x' - })) -} - -export function fromTxAbiEncode(txs: TransactionEncoded[]): Transaction[] { - return txs.map(tx => ({ - delegateCall: tx.delegateCall, - revertOnError: tx.revertOnError, - gasLimit: tx.gasLimit, - to: tx.target, - value: tx.value, - data: tx.data - })) -} - -// export function appendNonce(txs: Transaction[], nonce: ethers.BigNumberish): Transaction[] { -// return txs.map((t: Transaction) => ({ ...t, nonce })) -// } - -export function encodeNonce(space: ethers.BigNumberish, nonce: ethers.BigNumberish): bigint { - const bspace = BigInt(space) - const bnonce = BigInt(nonce) - - const shl = 2n ** 96n - - if (bnonce / shl !== 0n) { - throw new Error('Space already encoded') - } - - return bnonce + bspace * shl -} - -export function decodeNonce(nonce: ethers.BigNumberish): [bigint, bigint] { - const bnonce = BigInt(nonce) - const shr = 2n ** 96n - - return [bnonce / shr, bnonce % shr] -} - -export function fromTransactionish(wallet: string, transaction: Transactionish): Transaction[] { - if (Array.isArray(transaction)) { - if (hasSequenceTransactions(transaction)) { - return transaction - } else { - const stx = toSequenceTransactions(wallet, transaction) - return stx.map(t => t.transaction) - } - } else if (isSequenceTransaction(transaction)) { - return [transaction] - } else { - return [toSequenceTransaction(wallet, transaction).transaction] - } -} - -export function isTransactionBundle(cand: any): cand is TransactionBundle { - return ( - cand !== undefined && - cand.entrypoint !== undefined && - cand.chainId !== undefined && - cand.transactions !== undefined && - cand.nonce !== undefined && - cand.intent !== undefined && - cand.intent.id !== undefined && - cand.intent.wallet !== undefined && - Array.isArray(cand.transactions) && - (cand).transactions.reduce((p, c) => p && isSequenceTransaction(c), true) - ) -} - -export function isSignedTransactionBundle(cand: any): cand is SignedTransactionBundle { - return cand !== undefined && cand.signature !== undefined && cand.signature !== '' && isTransactionBundle(cand) -} - -export function encodeBundleExecData(bundle: TransactionBundle): string { - const walletInterface = new ethers.Interface(walletContracts.mainModule.abi) - return walletInterface.encodeFunctionData( - walletInterface.getFunction('execute')!, - isSignedTransactionBundle(bundle) - ? [ - // Signed transaction bundle has all 3 parameters - sequenceTxAbiEncode(bundle.transactions), - bundle.nonce, - bundle.signature - ] - : [ - // Unsigned bundle may be a GuestModule call, so signature and nonce are missing - sequenceTxAbiEncode(bundle.transactions), - 0, - new Uint8Array([]) - ] - ) -} - -// TODO: Use Sequence ABI package -export const selfExecuteSelector = '0x61c2926c' -export const selfExecuteAbi = `tuple( - bool delegateCall, - bool revertOnError, - uint256 gasLimit, - address target, - uint256 value, - bytes data -)[]` - -// Splits Sequence batch transactions into individual parts -export const unwind = (wallet: string, transactions: Transaction[]): Transaction[] => { - const unwound: Transaction[] = [] - - const walletInterface = new ethers.Interface(walletContracts.mainModule.abi) - - for (const tx of transactions) { - const txData = ethers.getBytes(tx.data || '0x') - - if (tx.to === wallet && ethers.hexlify(txData.slice(0, 4)) === selfExecuteSelector) { - // Decode as selfExecute call - const data = txData.slice(4) - const decoded = ethers.AbiCoder.defaultAbiCoder().decode([selfExecuteAbi], data)[0] - unwound.push( - ...unwind( - tx.to, - decoded.map((d: TransactionEncoded) => ({ ...d, to: d.target })) - ) - ) - } else { - try { - const innerTransactions = walletInterface.decodeFunctionData('execute', txData)[0] as ethers.Result - const unwoundTransactions = unwind( - wallet, - innerTransactions.map((tx: ethers.Result) => ({ ...tx.toObject(), to: tx.target })) - ) - unwound.push(...unwoundTransactions) - } catch { - unwound.push(tx) - } - } - } - - return unwound -} - -const isNullish = (value: T | null | undefined): value is null | undefined => value === null || value === void 0 diff --git a/old/packages/core/src/commons/validateEIP1271.ts b/old/packages/core/src/commons/validateEIP1271.ts deleted file mode 100644 index fb5fe1031..000000000 --- a/old/packages/core/src/commons/validateEIP1271.ts +++ /dev/null @@ -1,38 +0,0 @@ -import { ethers } from 'ethers' - -const EIP1271_MAGIC_VALUE = '0x1626ba7e' - -const EIP1271_ABI = [ - { - inputs: [ - { - internalType: 'bytes32', - type: 'bytes32' - }, - { - internalType: 'bytes', - type: 'bytes' - } - ], - name: 'isValidSignature', - outputs: [ - { - internalType: 'bytes4', - type: 'bytes4' - } - ], - stateMutability: 'view', - type: 'function' - } -] - -export async function isValidEIP1271Signature( - address: string, - digest: string, - signature: ethers.BytesLike, - provider: ethers.Provider -): Promise { - const contract = new ethers.Contract(address, EIP1271_ABI, provider) - const result = await contract.isValidSignature(digest, signature) - return result === EIP1271_MAGIC_VALUE -} diff --git a/old/packages/core/src/commons/validateEIP6492.ts b/old/packages/core/src/commons/validateEIP6492.ts deleted file mode 100644 index 9f4865242..000000000 --- a/old/packages/core/src/commons/validateEIP6492.ts +++ /dev/null @@ -1,200 +0,0 @@ -import { ethers } from 'ethers' - -/* Source of Offchain EIP-6492 validation: - -// SPDX-License-Identifier: Apache-2.0 -pragma solidity 0.8.18; - - -// As per ERC-1271 -interface IERC1271Wallet { - function isValidSignature(bytes32 hash, bytes calldata signature) external view returns (bytes4 magicValue); -} - -error ERC1271Revert(bytes error); -error ERC6492DeployFailed(bytes error); - -contract UniversalSigValidator { - bytes32 private constant ERC6492_DETECTION_SUFFIX = 0x6492649264926492649264926492649264926492649264926492649264926492; - bytes4 private constant ERC1271_SUCCESS = 0x1626ba7e; - - function isValidSigImpl( - address _signer, - bytes32 _hash, - bytes calldata _signature, - bool allowSideEffects, - bool deployAlreadyDeployed - ) public returns (bool) { - uint contractCodeLen = address(_signer).code.length; - bytes memory sigToValidate; - // The order here is striclty defined in https://eips.ethereum.org/EIPS/eip-6492 - // - ERC-6492 suffix check and verification first, while being permissive in case the contract is already deployed; if the contract is deployed we will check the sig against the deployed version, this allows 6492 signatures to still be validated while taking into account potential key rotation - // - ERC-1271 verification if there's contract code - // - finally, ecrecover - bool isCounterfactual = bytes32(_signature[_signature.length-32:_signature.length]) == ERC6492_DETECTION_SUFFIX; - if (isCounterfactual) { - address create2Factory; - bytes memory factoryCalldata; - (create2Factory, factoryCalldata, sigToValidate) = abi.decode(_signature[0:_signature.length-32], (address, bytes, bytes)); - - if (contractCodeLen == 0 || deployAlreadyDeployed) { - (bool success, bytes memory err) = create2Factory.call(factoryCalldata); - if (!success) revert ERC6492DeployFailed(err); - } - } else { - sigToValidate = _signature; - } - - // Try ERC-1271 verification - if (isCounterfactual || contractCodeLen > 0) { - try IERC1271Wallet(_signer).isValidSignature(_hash, sigToValidate) returns (bytes4 magicValue) { - bool isValid = magicValue == ERC1271_SUCCESS; - - // EXPERIMENTAL: This is not part of the EIP-6492 spec *yet* - // but it may be useful to retry the call making the factory call - // even if the wallet is already deployed, in case the wallet - // needs to perform some sort of migration or onchain key rotation - if (!isValid && !deployAlreadyDeployed && contractCodeLen > 0) { - return isValidSigImpl(_signer, _hash, _signature, allowSideEffects, true); - } - - if (contractCodeLen == 0 && isCounterfactual && !allowSideEffects) { - // if the call had side effects we need to return the - // result using a `revert` (to undo the state changes) - assembly { - mstore(0, isValid) - revert(31, 1) - } - } - - return isValid; - } catch (bytes memory err) { - // EXPERIMENTAL: This is not part of the EIP-6492 spec *yet* - // but it may be useful to retry the call making the factory call - // even if the wallet is already deployed, in case the wallet - // needs to perform some sort of migration or onchain key rotation - if (!deployAlreadyDeployed && contractCodeLen > 0) { - return isValidSigImpl(_signer, _hash, _signature, allowSideEffects, true); - } - - revert ERC1271Revert(err); - } - } - - // ecrecover verification - require(_signature.length == 65, 'SignatureValidator#recoverSigner: invalid signature length'); - bytes32 r = bytes32(_signature[0:32]); - bytes32 s = bytes32(_signature[32:64]); - uint8 v = uint8(_signature[64]); - - if (v != 27 && v != 28) { - revert('SignatureValidator: invalid signature v value'); - } - - return ecrecover(_hash, v, r, s) == _signer; - } - - function isValidSigWithSideEffects( - address _signer, - bytes32 _hash, - bytes calldata _signature - ) external returns (bool) { - return this.isValidSigImpl(_signer, _hash, _signature, true, false); - } - - function isValidSig( - address _signer, - bytes32 _hash, - bytes calldata _signature - ) external returns (bool) { - try this.isValidSigImpl(_signer, _hash, _signature, false, false) returns (bool isValid) { - return isValid; - } catch (bytes memory error) { - // in order to avoid side effects from the contract getting deployed, the entire call will revert with a single byte result - uint len = error.length; - if (len == 1) { - return error[0] == 0x01; - // all other errors are simply forwarded, but in custom formats so that nothing else can revert with a single byte in the call - } else { - assembly { revert(error, len) } - } - } - } - - // NOTICE: These functions aren't part of the standard - // they are helpers that behave like the above functions - // but they don't revert on failure, instead they return false - - function isValidSigNoThrow( - address _signer, - bytes32 _hash, - bytes calldata _signature - ) external returns (bool) { - try this.isValidSigImpl(_signer, _hash, _signature, false, false) returns (bool isValid) { - return isValid; - } catch (bytes memory error) { - // in order to avoid side effects from the contract getting deployed, the entire call will revert with a single byte result - uint len = error.length; - if (len == 1) { - return error[0] == 0x01; - // all other errors are simply forwarded, but in custom formats so that nothing else can revert with a single byte in the call - } else { - // Ignore all other errors and return false - return false; - } - } - } - - function isValidSigWithSideEffectsNoThrow( - address _signer, - bytes32 _hash, - bytes calldata _signature - ) external returns (bool) { - try this.isValidSigImpl(_signer, _hash, _signature, true, false) returns (bool isValid) { - return isValid; - } catch (bytes memory error) { - // Ignore all errors and return false - return false; - } - } -} - -// this is a helper so we can perform validation in a single eth_call without pre-deploying a singleton -contract ValidateSigOffchain { - constructor (address _signer, bytes32 _hash, bytes memory _signature) { - UniversalSigValidator validator = new UniversalSigValidator(); - bool isValidSig = validator.isValidSigWithSideEffects(_signer, _hash, _signature); - assembly { - mstore(0, isValidSig) - return(31, 1) - } - } -} -*/ - -export const EIP_6492_OFFCHAIN_DEPLOY_CODE = - '0x608060405234801561001057600080fd5b5060405161124a38038061124a83398101604081905261002f91610124565b600060405161003d906100dd565b604051809103906000f080158015610059573d6000803e3d6000fd5b5090506000816001600160a01b0316638f0684308686866040518463ffffffff1660e01b815260040161008e939291906101fb565b6020604051808303816000875af11580156100ad573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906100d19190610244565b9050806000526001601ff35b610fdc8061026e83390190565b634e487b7160e01b600052604160045260246000fd5b60005b8381101561011b578181015183820152602001610103565b50506000910152565b60008060006060848603121561013957600080fd5b83516001600160a01b038116811461015057600080fd5b6020850151604086015191945092506001600160401b038082111561017457600080fd5b818601915086601f83011261018857600080fd5b81518181111561019a5761019a6100ea565b604051601f8201601f19908116603f011681019083821181831017156101c2576101c26100ea565b816040528281528960208487010111156101db57600080fd5b6101ec836020830160208801610100565b80955050505050509250925092565b60018060a01b0384168152826020820152606060408201526000825180606084015261022e816080850160208701610100565b601f01601f191691909101608001949350505050565b60006020828403121561025657600080fd5b8151801515811461026657600080fd5b939250505056fe608060405234801561001057600080fd5b50610fbc806100206000396000f3fe608060405234801561001057600080fd5b50600436106100675760003560e01c806376be4cea1161005057806376be4cea146100a65780638f068430146100b957806398ef1ed8146100cc57600080fd5b80631c6453271461006c5780633d787b6314610093575b600080fd5b61007f61007a366004610ad4565b6100df565b604051901515815260200160405180910390f35b61007f6100a1366004610ad4565b61023d565b61007f6100b4366004610b3e565b61031e565b61007f6100c7366004610ad4565b6108e1565b61007f6100da366004610ad4565b61096e565b6040517f76be4cea00000000000000000000000000000000000000000000000000000000815260009030906376be4cea9061012890889088908890889088908190600401610bc3565b6020604051808303816000875af1925050508015610181575060408051601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016820190925261017e91810190610c45565b60015b610232573d8080156101af576040519150601f19603f3d011682016040523d82523d6000602084013e6101b4565b606091505b508051600181900361022757816000815181106101d3576101d3610c69565b6020910101517fff00000000000000000000000000000000000000000000000000000000000000167f0100000000000000000000000000000000000000000000000000000000000000149250610235915050565b600092505050610235565b90505b949350505050565b6040517f76be4cea00000000000000000000000000000000000000000000000000000000815260009030906376be4cea906102879088908890889088906001908990600401610bc3565b6020604051808303816000875af19250505080156102e0575060408051601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01682019092526102dd91810190610c45565b60015b610232573d80801561030e576040519150601f19603f3d011682016040523d82523d6000602084013e610313565b606091505b506000915050610235565b600073ffffffffffffffffffffffffffffffffffffffff87163b6060827f64926492649264926492649264926492649264926492649264926492649264928888610369602082610c98565b610375928b9290610cd8565b61037e91610d02565b1490508015610484576000606089828a610399602082610c98565b926103a693929190610cd8565b8101906103b39190610e18565b955090925090508415806103c45750865b1561047d576000808373ffffffffffffffffffffffffffffffffffffffff16836040516103f19190610eb2565b6000604051808303816000865af19150503d806000811461042e576040519150601f19603f3d011682016040523d82523d6000602084013e610433565b606091505b50915091508161047a57806040517f9d0d6e2d0000000000000000000000000000000000000000000000000000000081526004016104719190610f18565b60405180910390fd5b50505b50506104be565b87878080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509294505050505b80806104ca5750600083115b156106bb576040517f1626ba7e00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8b1690631626ba7e90610523908c908690600401610f2b565b602060405180830381865afa92505050801561057a575060408051601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016820190925261057791810190610f44565b60015b61060f573d8080156105a8576040519150601f19603f3d011682016040523d82523d6000602084013e6105ad565b606091505b50851580156105bc5750600084115b156105db576105d08b8b8b8b8b600161031e565b9450505050506108d7565b806040517f6f2a95990000000000000000000000000000000000000000000000000000000081526004016104719190610f18565b7fffffffff0000000000000000000000000000000000000000000000000000000081167f1626ba7e000000000000000000000000000000000000000000000000000000001480158161065f575086155b801561066b5750600085115b1561068b5761067f8c8c8c8c8c600161031e565b955050505050506108d7565b841580156106965750825b80156106a0575087155b156106af57806000526001601ffd5b94506108d79350505050565b6041871461074b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603a60248201527f5369676e617475726556616c696461746f72237265636f7665725369676e657260448201527f3a20696e76616c6964207369676e6174757265206c656e6774680000000000006064820152608401610471565b600061075a6020828a8c610cd8565b61076391610d02565b90506000610775604060208b8d610cd8565b61077e91610d02565b905060008a8a604081811061079557610795610c69565b919091013560f81c915050601b81148015906107b557508060ff16601c14155b15610842576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602d60248201527f5369676e617475726556616c696461746f723a20696e76616c6964207369676e60448201527f617475726520762076616c7565000000000000000000000000000000000000006064820152608401610471565b6040805160008152602081018083528e905260ff831691810191909152606081018490526080810183905273ffffffffffffffffffffffffffffffffffffffff8e169060019060a0016020604051602081039080840390855afa1580156108ad573d6000803e3d6000fd5b5050506020604051035173ffffffffffffffffffffffffffffffffffffffff161496505050505050505b9695505050505050565b6040517f76be4cea00000000000000000000000000000000000000000000000000000000815260009030906376be4cea9061092b9088908890889088906001908990600401610bc3565b6020604051808303816000875af115801561094a573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102329190610c45565b6040517f76be4cea00000000000000000000000000000000000000000000000000000000815260009030906376be4cea906109b790889088908890889088908190600401610bc3565b6020604051808303816000875af1925050508015610a10575060408051601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0168201909252610a0d91810190610c45565b60015b610232573d808015610a3e576040519150601f19603f3d011682016040523d82523d6000602084013e610a43565b606091505b5080516001819003610a6257816000815181106101d3576101d3610c69565b8082fd5b73ffffffffffffffffffffffffffffffffffffffff81168114610a8857600080fd5b50565b60008083601f840112610a9d57600080fd5b50813567ffffffffffffffff811115610ab557600080fd5b602083019150836020828501011115610acd57600080fd5b9250929050565b60008060008060608587031215610aea57600080fd5b8435610af581610a66565b935060208501359250604085013567ffffffffffffffff811115610b1857600080fd5b610b2487828801610a8b565b95989497509550505050565b8015158114610a8857600080fd5b60008060008060008060a08789031215610b5757600080fd5b8635610b6281610a66565b955060208701359450604087013567ffffffffffffffff811115610b8557600080fd5b610b9189828a01610a8b565b9095509350506060870135610ba581610b30565b91506080870135610bb581610b30565b809150509295509295509295565b73ffffffffffffffffffffffffffffffffffffffff8716815285602082015260a060408201528360a0820152838560c0830137600060c085830181019190915292151560608201529015156080820152601f9092017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016909101019392505050565b600060208284031215610c5757600080fd5b8151610c6281610b30565b9392505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b81810381811115610cd2577f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b92915050565b60008085851115610ce857600080fd5b83861115610cf557600080fd5b5050820193919092039150565b80356020831015610cd2577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff602084900360031b1b1692915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600082601f830112610d7e57600080fd5b813567ffffffffffffffff80821115610d9957610d99610d3e565b604051601f83017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0908116603f01168101908282118183101715610ddf57610ddf610d3e565b81604052838152866020858801011115610df857600080fd5b836020870160208301376000602085830101528094505050505092915050565b600080600060608486031215610e2d57600080fd5b8335610e3881610a66565b9250602084013567ffffffffffffffff80821115610e5557600080fd5b610e6187838801610d6d565b93506040860135915080821115610e7757600080fd5b50610e8486828701610d6d565b9150509250925092565b60005b83811015610ea9578181015183820152602001610e91565b50506000910152565b60008251610ec4818460208701610e8e565b9190910192915050565b60008151808452610ee6816020860160208601610e8e565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b602081526000610c626020830184610ece565b8281526040602082015260006102356040830184610ece565b600060208284031215610f5657600080fd5b81517fffffffff0000000000000000000000000000000000000000000000000000000081168114610c6257600080fdfea26469706673582212201a72aed4b15ffb05b6502997a9bb655992e06590bd26b336dfbb153d7ff6f34b64736f6c63430008120033' -export const EIP_6492_SUFFIX = '0x6492649264926492649264926492649264926492649264926492649264926492' - -// TODO: This is a length payload, we can lower the load by deploying -// the contract on some of the popular chains, and calling the contract -// if the provider is one of those chains -export async function validateEIP6492Offchain( - provider: ethers.Provider, - signer: string, - hash: ethers.BytesLike, - signature: ethers.BytesLike -): Promise { - try { - const result = await provider.call({ - data: ethers.concat([ - EIP_6492_OFFCHAIN_DEPLOY_CODE, - ethers.AbiCoder.defaultAbiCoder().encode(['address', 'bytes32', 'bytes'], [signer, hash, signature]) - ]) - }) - - return result === '0x01' - } catch (err) { - return false - } -} diff --git a/old/packages/core/src/index.ts b/old/packages/core/src/index.ts deleted file mode 100644 index 3d153a1ce..000000000 --- a/old/packages/core/src/index.ts +++ /dev/null @@ -1,11 +0,0 @@ -export * as v1 from './v1' -export * as v2 from './v2' -export * as commons from './commons' -export * as universal from './universal' - -import * as v1 from './v1' -import * as v2 from './v2' - -export { VERSION } from './version' - -export const allVersions = [v1, v2] diff --git a/old/packages/core/src/universal/index.ts b/old/packages/core/src/universal/index.ts deleted file mode 100644 index 54e70287c..000000000 --- a/old/packages/core/src/universal/index.ts +++ /dev/null @@ -1,25 +0,0 @@ -import { commons, v1, v2 } from '..' - -export const ALL_CODERS = [ - { config: v1.config.ConfigCoder, signature: v1.signature.SignatureCoder }, - { config: v2.config.ConfigCoder, signature: v2.signature.SignatureCoder } -] - -export function coderFor(version: number) { - const index = version - 1 - if (index < 0 || index >= ALL_CODERS.length) { - throw new Error(`No coder for version: ${version}`) - } - - return ALL_CODERS[index] -} - -/** - * Same as `coderFor` but returns `generic` coders without versioned types. - */ -export function genericCoderFor(version: number): { - config: commons.config.ConfigCoder - signature: commons.signature.SignatureCoder -} { - return coderFor(version) -} diff --git a/old/packages/core/src/v1/config.ts b/old/packages/core/src/v1/config.ts deleted file mode 100644 index 0c1c10f91..000000000 --- a/old/packages/core/src/v1/config.ts +++ /dev/null @@ -1,221 +0,0 @@ -import { ethers } from 'ethers' -import { walletContracts } from '@0xsequence/abi' -import { commons } from '..' -import { encodeSigners } from './signature' -import { SimpleConfig } from '../commons/config' - -export type AddressMember = { - weight: ethers.BigNumberish - address: string - signature?: string -} - -export type WalletConfig = commons.config.Config & { - threshold: ethers.BigNumberish - signers: AddressMember[] -} - -export const ConfigCoder: commons.config.ConfigCoder = { - isWalletConfig: (config: commons.config.Config): config is WalletConfig => { - return ( - config.version === 1 && (config as WalletConfig).threshold !== undefined && (config as WalletConfig).signers !== undefined - ) - }, - - imageHashOf: (config: WalletConfig): string => { - return config.signers.reduce( - (imageHash, signer) => - ethers.keccak256( - ethers.AbiCoder.defaultAbiCoder().encode(['bytes32', 'uint8', 'address'], [imageHash, signer.weight, signer.address]) - ), - ethers.solidityPacked(['uint256'], [config.threshold]) - ) - }, - - hasSubdigest: (_walletConfig: WalletConfig, _subdigest: string): boolean => { - // v1 does not support explicit subdigests - return false - }, - - isComplete: (_config: WalletConfig): boolean => { - // v1 does not support incomplete configs - return true - }, - - checkpointOf: (_config: WalletConfig): bigint => { - return 0n - }, - - signersOf: (config: WalletConfig): { address: string; weight: number }[] => { - return config.signers.map(s => ({ address: s.address, weight: Number(s.weight) })) - }, - - fromSimple: (config: SimpleConfig): WalletConfig => { - if (BigInt(config.checkpoint) !== 0n) { - throw new Error('v1 wallet config does not support checkpoint') - } - - if (config.subdigests && config.subdigests.length > 0) { - throw new Error('v1 wallet config does not support subdigests') - } - - return { - version: 1, - threshold: config.threshold, - signers: config.signers - } - }, - - update: { - isKindUsed: true, - - buildTransaction: ( - wallet: string, - config: WalletConfig, - context: commons.context.WalletContext, - kind?: 'first' | 'later' | undefined - ): commons.transaction.TransactionBundle => { - const module = new ethers.Interface([...walletContracts.mainModule.abi, ...walletContracts.mainModuleUpgradable.abi]) - - const transactions: commons.transaction.Transaction[] = [] - - if (!kind || kind === 'first') { - transactions.push({ - to: wallet, - data: module.encodeFunctionData(module.getFunction('updateImplementation')!, [context.mainModuleUpgradable]), - gasLimit: 0, - delegateCall: false, - revertOnError: true, - value: 0 - }) - } - - transactions.push({ - to: wallet, - data: module.encodeFunctionData(module.getFunction('updateImageHash')!, [ConfigCoder.imageHashOf(config)]), - gasLimit: 0, - delegateCall: false, - revertOnError: true, - value: 0 - }) - - return { - entrypoint: wallet, - transactions - } - }, - decodeTransaction: function (tx: commons.transaction.TransactionBundle): { - address: string - newImageHash: string - kind: 'first' | 'later' | undefined - } { - throw new Error('Function not implemented.') - } - }, - - toJSON: function (config: WalletConfig): string { - const plainMembers = config.signers.map(signer => { - return { - weight: BigInt(signer.weight).toString(), - address: signer.address - } - }) - - return JSON.stringify({ - version: config.version, - threshold: BigInt(config.threshold).toString(), - signers: plainMembers - }) - }, - - fromJSON: function (json: string): WalletConfig { - const parsed = JSON.parse(json) - - const signers = parsed.signers.map((signer: any) => { - return { - weight: BigInt(signer.weight), - address: signer.address - } - }) - - return { - version: parsed.version, - threshold: BigInt(parsed.threshold), - signers - } - }, - - editConfig: function ( - config: WalletConfig, - action: { - add?: commons.config.SimpleSigner[] - remove?: string[] - threshold?: ethers.BigNumberish - checkpoint?: ethers.BigNumberish - } - ): WalletConfig { - const newSigners = config.signers.slice() - - if (action.checkpoint && BigInt(action.checkpoint) !== 0n) { - throw new Error('v1 wallet config does not support checkpoint') - } - - if (action.add) { - for (const signer of action.add) { - if (newSigners.find(s => s.address === signer.address)) { - continue - } - - newSigners.push({ - weight: signer.weight, - address: signer.address - }) - } - } - - if (action.remove) { - for (const address of action.remove) { - const index = newSigners.findIndex(signer => signer.address === address) - if (index >= 0) { - newSigners.splice(index, 1) - } - } - } - - return { - version: config.version, - threshold: action.threshold ?? config.threshold, - signers: newSigners - } - }, - - buildStubSignature: function (config: WalletConfig, overrides: Map) { - const parts = new Map() - - for (const [signer, signature] of overrides.entries()) { - parts.set(signer, { signature, isDynamic: true }) - - const { encoded, weight } = encodeSigners(config, parts, [], 0) - - if (weight >= BigInt(config.threshold)) { - return encoded - } - } - - const signers = config.signers - - for (const { address } of signers.sort(({ weight: a }, { weight: b }) => Number(a) - Number(b))) { - const signature = - '0x4e82f02f388a12b5f9d29eaf2452dd040c0ee5804b4e504b4dd64e396c6c781f2c7624195acba242dd825bfd25a290912e3c230841fd55c9a734c4de8d9899451b02' - parts.set(address, { signature, isDynamic: false }) - - const { encoded, weight } = encodeSigners(config, parts, [], 0) - - if (weight >= BigInt(config.threshold)) { - return encoded - } - } - - return encodeSigners(config, parts, [], 0).encoded - } -} diff --git a/old/packages/core/src/v1/context.ts b/old/packages/core/src/v1/context.ts deleted file mode 100644 index ef801a86c..000000000 --- a/old/packages/core/src/v1/context.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { WalletContext as BaseContext } from '../commons/context' - -export type WalletContext = BaseContext & { - version: 1 - multiCallUtils: string -} diff --git a/old/packages/core/src/v1/index.ts b/old/packages/core/src/v1/index.ts deleted file mode 100644 index cdb17be00..000000000 --- a/old/packages/core/src/v1/index.ts +++ /dev/null @@ -1,16 +0,0 @@ -import { WalletContext } from '../commons/context' - -export * as config from './config' -export * as context from './context' -export * as signature from './signature' - -export const version = 1 - -export const DeployedWalletContext: WalletContext = { - version: version, - factory: '0xf9D09D634Fb818b05149329C1dcCFAeA53639d96', - guestModule: '0x02390F3E6E5FD1C6786CB78FD3027C117a9955A7', - mainModule: '0xd01F11855bCcb95f88D7A48492F66410d4637313', - mainModuleUpgradable: '0x7EFE6cE415956c5f80C6530cC6cc81b4808F6118', - walletCreationCode: '0x603a600e3d39601a805130553df3363d3d373d3d3d363d30545af43d82803e903d91601857fd5bf3' -} diff --git a/old/packages/core/src/v1/signature.ts b/old/packages/core/src/v1/signature.ts deleted file mode 100644 index 9bd8219dc..000000000 --- a/old/packages/core/src/v1/signature.ts +++ /dev/null @@ -1,258 +0,0 @@ -import { ethers } from 'ethers' -import * as base from '../commons/signature' -import { AddressMember, WalletConfig } from './config' -import { isValidSignature, recoverSigner } from '../commons/signer' - -export enum SignaturePartType { - EOASignature = 0, - Address = 1, - DynamicSignature = 2 -} - -export type Signature = base.Signature - -export type UnrecoveredSignatureMember = { - unrecovered: true - weight: ethers.BigNumberish - signature: string - address?: string - isDynamic: boolean -} - -export type UnrecoveredMember = AddressMember | UnrecoveredSignatureMember - -export type UnrecoveredSignature = base.UnrecoveredSignature & { - threshold: ethers.BigNumberish - signers: UnrecoveredMember[] -} - -export function isAddressMember(member: any): member is AddressMember { - return (member as AddressMember).address !== undefined && !isUnrecoveredSignatureMember(member) -} - -export function isUnrecoveredSignatureMember(member: any): member is UnrecoveredSignatureMember { - return ( - (member as UnrecoveredSignatureMember).signature !== undefined && - (member as UnrecoveredSignatureMember).weight !== undefined && - (member as UnrecoveredSignatureMember).isDynamic !== undefined - ) -} - -export function isUnrecoveredSignature(signature: Signature | UnrecoveredSignature): signature is UnrecoveredSignature { - return (signature as UnrecoveredSignature).threshold !== undefined && (signature as UnrecoveredSignature).signers !== undefined -} - -export function decodeSignature(signature: ethers.BytesLike): UnrecoveredSignature { - const bytes = ethers.getBytes(signature) - - const threshold = (bytes[0] << 8) | bytes[1] - const signers: UnrecoveredMember[] = [] - - for (let i = 2; i < bytes.length; ) { - const type = bytes[i++] - const weight = bytes[i++] - - switch (type) { - case SignaturePartType.EOASignature: - signers.push({ - unrecovered: true, - weight, - signature: ethers.hexlify(bytes.slice(i, i + 66)), - isDynamic: false - }) - i += 66 - break - - case SignaturePartType.Address: - signers.push({ - weight, - address: ethers.getAddress(ethers.hexlify(bytes.slice(i, i + 20))) - }) - i += 20 - break - - case SignaturePartType.DynamicSignature: - const address = ethers.getAddress(ethers.hexlify(bytes.slice(i, i + 20))) - i += 20 - - const size = (bytes[i] << 8) | bytes[i + 1] - i += 2 - - signers.push({ - unrecovered: true, - weight, - signature: ethers.hexlify(bytes.slice(i, i + size)), - address, - isDynamic: true - }) - i += size - break - - default: - throw new Error(`Unknown signature part type: ${type}`) - } - } - - return { version: 1, threshold, signers } -} - -export function encodeSignature(signature: Signature | UnrecoveredSignature | ethers.BytesLike): string { - if (ethers.isBytesLike(signature)) { - return ethers.hexlify(signature) - } - - const { signers, threshold } = isUnrecoveredSignature(signature) ? signature : signature.config - - const encodedSigners = signers.map(s => { - if (isAddressMember(s)) { - return ethers.solidityPacked(['uint8', 'uint8', 'address'], [SignaturePartType.Address, s.weight, s.address]) - } - - if (s.isDynamic) { - const bytes = ethers.getBytes(s.signature) - return ethers.solidityPacked( - ['uint8', 'uint8', 'address', 'uint16', 'bytes'], - [SignaturePartType.DynamicSignature, s.weight, s.address, bytes.length, bytes] - ) - } - - return ethers.solidityPacked(['uint8', 'uint8', 'bytes'], [SignaturePartType.EOASignature, s.weight, s.signature]) - }) - - return ethers.solidityPacked(['uint16', ...new Array(encodedSigners.length).fill('bytes')], [threshold, ...encodedSigners]) -} - -export async function recoverSignature( - data: UnrecoveredSignature, - payload: base.SignedPayload, - provider: ethers.Provider -): Promise { - const subdigest = base.subdigestOf(payload) - const signers = await Promise.all( - data.signers.map(async s => { - if (isAddressMember(s)) { - return s - } - - if (s.isDynamic) { - if (!s.address) throw new Error('Dynamic signature part must have address') - if (!isValidSignature(s.address, subdigest, s.signature, provider)) { - throw new Error(`Invalid dynamic signature part ${s.address}`) - } - - return { address: s.address, weight: s.weight, signature: s.signature } - } else { - const address = recoverSigner(subdigest, s.signature) - return { address, weight: s.weight, signature: s.signature } - } - }) - ) - - return { - version: 1, - payload, - subdigest, - config: { - version: 1, - threshold: data.threshold, - signers - } - } -} - -export function encodeSigners( - config: WalletConfig, - signatures: Map, - subdigests: string[], - _: ethers.BigNumberish -): { encoded: string; weight: bigint } { - if (subdigests.length !== 0) { - throw new Error('Explicit subdigests not supported on v1') - } - - let weight = 0n - const parts = config.signers.map(s => { - if (!signatures.has(s.address)) { - return s - } - - const signature = signatures.get(s.address)! - const bytes = ethers.getBytes(signature.signature) - - weight += BigInt(s.weight) - - if (signature.isDynamic || bytes.length !== 66) { - return { - ...s, - isDynamic: true, - signature: signature.signature, - address: s.address - } - } - - return { - ...s, - isDynamic: false, - signature: signature.signature - } - }) - - const encoded = encodeSignature({ version: 1, threshold: config.threshold, signers: parts }) - return { encoded, weight } -} - -export const SignatureCoder: base.SignatureCoder = { - decode: (data: string): UnrecoveredSignature => { - return decodeSignature(data) - }, - - encode: (data: Signature | UnrecoveredSignature | ethers.BytesLike): string => { - return encodeSignature(data) - }, - - trim: async (data: string): Promise => { - return data - }, - - supportsNoChainId: true, - - recover: (data: UnrecoveredSignature, payload: base.SignedPayload, provider: ethers.Provider): Promise => { - return recoverSignature(data, payload, provider) - }, - - encodeSigners: ( - config: WalletConfig, - signatures: Map, - subdigests: string[], - chainId: ethers.BigNumberish - ): { - encoded: string - weight: bigint - } => { - return encodeSigners(config, signatures, subdigests, chainId) - }, - - hasEnoughSigningPower: (config: WalletConfig, signatures: Map): boolean => { - const { weight } = SignatureCoder.encodeSigners(config, signatures, [], 0) - return weight >= BigInt(config.threshold) - }, - - chainSignatures: ( - _main: Signature | UnrecoveredSignature | ethers.BytesLike, - _suffix: (Signature | UnrecoveredSignature | ethers.BytesLike)[] - ): string => { - throw new Error('Signature chaining not supported on v1') - }, - - hashSetImageHash: function (_imageHash: string): string { - throw new Error('Image hash not supported on v1') - }, - - signaturesOf(config: WalletConfig): { address: string; signature: string }[] { - return config.signers.filter(s => s.signature !== undefined).map(s => ({ address: s.address, signature: s.signature! })) - }, - - signaturesOfDecoded: function (data: UnrecoveredSignature): string[] { - return data.signers.map(s => s.signature).filter(s => s !== undefined) as string[] - } -} diff --git a/old/packages/core/src/v2/chained.ts b/old/packages/core/src/v2/chained.ts deleted file mode 100644 index db2734198..000000000 --- a/old/packages/core/src/v2/chained.ts +++ /dev/null @@ -1,30 +0,0 @@ -import { ethers } from 'ethers' - -// = keccak256("SetImageHash(bytes32 imageHash)") -export const SetImageHashPrefix = '0x8713a7c4465f6fbee2b6e9d6646d1d9f83fec929edfc4baf661f3c865bdd04d1' - -export function hashSetImageHash(imageHash: string): string { - return ethers.keccak256(messageSetImageHash(imageHash)) -} - -export function messageSetImageHash(imageHash: string) { - return ethers.solidityPacked(['bytes32', 'bytes32'], [SetImageHashPrefix, imageHash]) -} - -export function decodeMessageSetImageHash(message: ethers.BytesLike): string | undefined { - const arr = ethers.getBytes(message) - - if (arr.length !== 64) { - return undefined - } - - if (ethers.hexlify(arr.slice(0, 32)) !== SetImageHashPrefix) { - return undefined - } - - return ethers.hexlify(arr.slice(32, 64)) -} - -export function isMessageSetImageHash(message: ethers.BytesLike): boolean { - return decodeMessageSetImageHash(message) !== undefined -} diff --git a/old/packages/core/src/v2/config.ts b/old/packages/core/src/v2/config.ts deleted file mode 100644 index eab339306..000000000 --- a/old/packages/core/src/v2/config.ts +++ /dev/null @@ -1,620 +0,0 @@ -import { ethers } from 'ethers' -import { walletContracts } from '@0xsequence/abi' -import { commons } from '..' -import { encodeSigners } from './signature' -import { SimpleConfig } from '../commons/config' - -// -// Tree typings - leaves -// - -export type SignerLeaf = { - address: string - weight: ethers.BigNumberish - signature?: string -} - -export type SubdigestLeaf = { - subdigest: string -} - -export type NestedLeaf = { - tree: Topology - weight: ethers.BigNumberish - threshold: ethers.BigNumberish -} - -// This is an unknown node -// it means the tree has a branch -// but we don't know what the content -export type NodeLeaf = { - nodeHash: string -} - -export type Leaf = SignerLeaf | SubdigestLeaf | NestedLeaf | NodeLeaf - -export function isSignerLeaf(leaf: any): leaf is SignerLeaf { - return (leaf as SignerLeaf).address !== undefined && (leaf as SignerLeaf).weight !== undefined -} - -export function isSubdigestLeaf(leaf: any): leaf is SubdigestLeaf { - return (leaf as SubdigestLeaf).subdigest !== undefined && (leaf as SignerLeaf).address === undefined -} - -export function topologyToJSON(tree: Topology): string { - if (isNode(tree)) { - return JSON.stringify({ - left: topologyToJSON(tree.left), - right: topologyToJSON(tree.right) - }) - } - - if (isNestedLeaf(tree)) { - return JSON.stringify({ - weight: BigInt(tree.weight).toString(), - threshold: BigInt(tree.threshold).toString(), - tree: topologyToJSON(tree.tree) - }) - } - - if (isSignerLeaf(tree)) { - return JSON.stringify({ - address: tree.address, - weight: BigInt(tree.weight).toString() - }) - } - - return JSON.stringify(tree) -} - -export function topologyFromJSON(json: string | object): Topology { - const parsed = typeof json === 'string' ? JSON.parse(json) : json - - if (parsed.left !== undefined && parsed.right !== undefined) { - return { - left: topologyFromJSON(parsed.left), - right: topologyFromJSON(parsed.right) - } - } - - if (parsed.weight !== undefined && parsed.threshold !== undefined && parsed.tree !== undefined) { - return { - weight: BigInt(parsed.weight), - threshold: BigInt(parsed.threshold), - tree: topologyFromJSON(parsed.tree) - } - } - - if (parsed.address !== undefined && parsed.weight !== undefined) { - return { - address: parsed.address, - weight: BigInt(parsed.weight) - } - } - - return parsed -} - -export function isNestedLeaf(leaf: any): leaf is NestedLeaf { - return ( - (leaf as NestedLeaf).tree !== undefined && - (leaf as NestedLeaf).weight !== undefined && - (leaf as NestedLeaf).threshold !== undefined - ) -} - -export function isNodeLeaf(leaf: any): leaf is NodeLeaf { - return (leaf as NodeLeaf).nodeHash !== undefined -} - -export function isLeaf(leaf: any): leaf is Leaf { - return isSignerLeaf(leaf) || isSubdigestLeaf(leaf) || isNestedLeaf(leaf) || isNodeLeaf(leaf) -} - -// -// Tree typings - nodes -// - -export type Node = { - left: Node | Leaf - right: Node | Leaf -} - -export type Topology = Node | Leaf - -export function isNode(node: any): node is Node { - return (node as Node).left !== undefined && (node as Node).right !== undefined -} - -export function isTopology(topology: any): topology is Topology { - return isNode(topology) || isLeaf(topology) -} - -export function encodeSignerLeaf(leaf: SignerLeaf): string { - return ethers.solidityPacked(['uint96', 'address'], [leaf.weight, leaf.address]) -} - -export function decodeSignerLeaf(encoded: string): SignerLeaf { - const bytes = ethers.getBytes(encoded) - - if (bytes.length !== 32) { - throw new Error('Invalid encoded string length') - } - - const weight = BigInt(ethers.hexlify(bytes.slice(0, 12))) - const address = ethers.getAddress(ethers.hexlify(bytes.slice(12))) - - return { weight, address } -} - -export function isEncodedSignerLeaf(encoded: string): boolean { - const bytes = ethers.getBytes(encoded) - - if (bytes.length !== 32) { - return false - } - - const prefix = bytes.slice(0, 11) - return prefix.every(byte => byte === 0) -} - -export function hashNode(node: Node | Leaf): string { - if (isSignerLeaf(node)) { - return encodeSignerLeaf(node) - } - - if (isSubdigestLeaf(node)) { - return ethers.solidityPackedKeccak256(['string', 'bytes32'], ['Sequence static digest:\n', node.subdigest]) - } - - if (isNestedLeaf(node)) { - const nested = hashNode(node.tree) - return ethers.solidityPackedKeccak256( - ['string', 'bytes32', 'uint256', 'uint256'], - ['Sequence nested config:\n', nested, node.threshold, node.weight] - ) - } - - if (isNodeLeaf(node)) { - return node.nodeHash - } - - return ethers.solidityPackedKeccak256(['bytes32', 'bytes32'], [hashNode(node.left), hashNode(node.right)]) -} - -export function leftFace(topology: Topology): Topology[] { - const stack: Topology[] = [] - - let prev = topology - while (!isLeaf(prev)) { - stack.unshift(prev.right) - prev = prev.left - } - - stack.unshift(prev) - - return stack -} - -// -// Wallet config types -// - -export type WalletConfig = commons.config.Config & { - threshold: ethers.BigNumberish - checkpoint: ethers.BigNumberish - tree: Topology -} - -export function isWalletConfig(config: any): config is WalletConfig { - return ( - (config as WalletConfig).threshold !== undefined && - (config as WalletConfig).checkpoint !== undefined && - (config as WalletConfig).tree !== undefined && - (config as WalletConfig).version !== undefined && - (config as WalletConfig).version === 2 - ) -} - -export function imageHash(config: WalletConfig): string { - return ethers.solidityPackedKeccak256( - ['bytes32', 'uint256'], - [ethers.solidityPackedKeccak256(['bytes32', 'uint256'], [hashNode(config.tree), config.threshold]), config.checkpoint] - ) -} - -// -// Simple wallet config types -// (used for building and reading merkle configs) -// -// dev: `members` is a flat representation of the tree -// it keeps relevant structure like 'nested trees' but -// it ignores the tree structure -// -// - -export type SimpleNestedMember = { - threshold: ethers.BigNumberish - weight: ethers.BigNumberish - members: SimpleConfigMember[] -} - -export type SimpleConfigMember = SubdigestLeaf | SignerLeaf | SimpleNestedMember - -export type SimpleWalletConfig = { - threshold: ethers.BigNumberish - checkpoint: ethers.BigNumberish - members: SimpleConfigMember[] -} - -export function isSimpleNestedMember(member: any): member is SimpleNestedMember { - return ( - (member as SimpleNestedMember).threshold !== undefined && - (member as SimpleNestedMember).weight !== undefined && - (member as SimpleNestedMember).members !== undefined - ) -} - -export function topologyToMembers(tree: Topology): SimpleConfigMember[] { - if (isSignerLeaf(tree) || isSubdigestLeaf(tree)) { - return [tree] - } - - if (isNestedLeaf(tree)) { - return [ - { - threshold: tree.threshold, - weight: tree.weight, - members: topologyToMembers(tree.tree) - } - ] - } - - if (isNodeLeaf(tree)) { - // we don't know the content of this node - // so we omit it - return [] - } - - return [...topologyToMembers(tree.left), ...topologyToMembers(tree.right)] -} - -export function hasUnknownNodes(tree: Topology): boolean { - if (isNodeLeaf(tree)) { - return true - } - - if (isNode(tree)) { - return hasUnknownNodes(tree.left) || hasUnknownNodes(tree.right) - } - - return false -} - -export function toSimpleWalletConfig(config: WalletConfig): SimpleWalletConfig { - return { - threshold: config.threshold, - checkpoint: config.checkpoint, - members: topologyToMembers(config.tree) - } -} - -export type TopologyBuilder = (members: SimpleConfigMember[]) => Topology - -const membersAsTopologies = (members: SimpleConfigMember[], builder: TopologyBuilder): Topology[] => { - return members.map(member => { - if (isSimpleNestedMember(member)) { - return { - tree: builder(member.members), - threshold: member.threshold, - weight: member.weight - } - } - - return member - }) -} - -export function legacyTopologyBuilder(members: SimpleConfigMember[]): Topology { - if (members.length === 0) { - throw new Error('Empty members array') - } - - const asTopologies = membersAsTopologies(members, legacyTopologyBuilder) - return asTopologies.reduce((acc, member) => { - return { - left: acc, - right: member - } - }) -} - -export function merkleTopologyBuilder(members: SimpleConfigMember[]): Topology { - if (members.length === 0) { - throw new Error('Empty members array') - } - - const leaves = membersAsTopologies(members, merkleTopologyBuilder) - for (let s = leaves.length; s > 1; s = s / 2) { - for (let i = 0; i < s / 2; i++) { - const j1 = i * 2 - const j2 = j1 + 1 - - if (j2 >= s) { - leaves[i] = leaves[j1] - } else { - leaves[i] = { - left: leaves[j1], - right: leaves[j2] - } - } - } - } - - return leaves[0] -} - -export function optimized2SignersTopologyBuilder(members: SimpleConfigMember[]): Topology { - if (members.length > 8) { - return merkleTopologyBuilder(members) - } - - return legacyTopologyBuilder(members) -} - -export function toWalletConfig( - simpleWalletConfig: SimpleWalletConfig, - builder: TopologyBuilder = optimized2SignersTopologyBuilder -): WalletConfig { - return { - version: 2, - threshold: simpleWalletConfig.threshold, - checkpoint: simpleWalletConfig.checkpoint, - tree: builder(simpleWalletConfig.members) - } -} - -export function hasSubdigest(tree: Topology, subdigest: string): boolean { - if (isSubdigestLeaf(tree)) { - return tree.subdigest === subdigest - } - - if (isNode(tree)) { - return hasSubdigest(tree.left, subdigest) || hasSubdigest(tree.right, subdigest) - } - - return false -} - -export function signersOf(tree: Topology): { address: string; weight: number }[] { - const stack: Topology[] = [tree] - const signers = new Set<{ address: string; weight: number }>() - - while (stack.length > 0) { - const node = stack.pop() - - if (isNestedLeaf(node)) { - stack.push(node.tree) - } else if (isNode(node)) { - stack.push(node.left) - stack.push(node.right) - } else if (isSignerLeaf(node)) { - signers.add({ address: node.address, weight: Number(node.weight) }) - } - } - - return Array.from(signers) -} - -export function isComplete(tree: Topology): boolean { - if (isNode(tree)) { - return isComplete(tree.left) && isComplete(tree.right) - } - - return !isNodeLeaf(tree) -} - -export const ConfigCoder: commons.config.ConfigCoder = { - isWalletConfig: (config: commons.config.Config): config is WalletConfig => { - return config.version === 2 && (config as WalletConfig).threshold !== undefined && (config as WalletConfig).tree !== undefined - }, - - imageHashOf: (config: WalletConfig): string => { - return imageHash(config) - }, - - hasSubdigest: (config: WalletConfig, subdigest: string): boolean => { - return hasSubdigest(config.tree, subdigest) - }, - - checkpointOf: (config: WalletConfig): bigint => { - return BigInt(config.checkpoint) - }, - - signersOf: (config: WalletConfig): { address: string; weight: number }[] => { - return signersOf(config.tree) - }, - - fromSimple: (config: SimpleConfig): WalletConfig => { - return toWalletConfig({ - ...config, - members: [...config.signers, ...(config.subdigests ?? []).map(subdigest => ({ subdigest }))] - }) - }, - - isComplete: (config: WalletConfig): boolean => { - return isComplete(config.tree) - }, - - // isValid = (config: WalletConfig): boolean {} - /** - * - * Notice: context and kind are ignored because v2 - * doesn't need to manually update the implementation before - * a configuration update, it's automatically done by the contract. - * - */ - update: { - isKindUsed: true, - - buildTransaction: ( - wallet: string, - config: WalletConfig, - _context: commons.context.WalletContext, - _kind?: 'first' | 'later' | undefined - ): commons.transaction.TransactionBundle => { - const module = new ethers.Interface(walletContracts.mainModuleUpgradable.abi) - - return { - entrypoint: wallet, - transactions: [ - { - to: wallet, - data: module.encodeFunctionData(module.getFunction('updateImageHash')!, [ConfigCoder.imageHashOf(config)]), - gasLimit: 0, - delegateCall: false, - revertOnError: true, - value: 0 - } - ] - } - }, - decodeTransaction: function (tx: commons.transaction.TransactionBundle): { - address: string - newImageHash: string - kind: 'first' | 'later' | undefined - } { - const module = new ethers.Interface(walletContracts.mainModuleUpgradable.abi) - - if (tx.transactions.length !== 1) { - throw new Error('Invalid transaction bundle, expected 1 transaction') - } - - const data = tx.transactions[0].data - if (!data) { - throw new Error('Invalid transaction bundle, expected data') - } - - const decoded = module.decodeFunctionData(module.getFunction('updateImageHash')!, data) - if (!decoded) { - throw new Error('Invalid transaction bundle, expected valid data') - } - - if (tx.transactions[0].to !== tx.entrypoint) { - throw new Error('Invalid transaction bundle, expected to be sent to entrypoint') - } - - if (tx.transactions[0].delegateCall) { - throw new Error('Invalid transaction bundle, expected not to be a delegateCall') - } - - if (!tx.transactions[0].revertOnError) { - throw new Error('Invalid transaction bundle, expected revertOnError') - } - - if (BigInt(tx.transactions[0]?.value ?? 0) !== 0n) { - throw new Error('Invalid transaction bundle, expected value to be 0') - } - - if (BigInt(tx.transactions[0]?.gasLimit ?? 0) !== 0n) { - throw new Error('Invalid transaction bundle, expected value to be 0') - } - - return { - address: tx.entrypoint, - newImageHash: decoded[0], - kind: undefined - } - } - }, - - toJSON: function (config: WalletConfig): string { - return JSON.stringify({ - version: config.version, - threshold: BigInt(config.threshold).toString(), - checkpoint: BigInt(config.checkpoint).toString(), - tree: topologyToJSON(config.tree) - }) - }, - - fromJSON: function (json: string): WalletConfig { - const config = JSON.parse(json) - return { - version: config.version, - threshold: BigInt(config.threshold), - checkpoint: BigInt(config.checkpoint), - tree: topologyFromJSON(config.tree) - } - }, - - editConfig: function ( - config: WalletConfig, - action: { - add?: commons.config.SimpleSigner[] - remove?: string[] - threshold?: ethers.BigNumberish - checkpoint?: ethers.BigNumberish - } - ): WalletConfig { - const members = topologyToMembers(config.tree) - - if (action.add) { - for (const signer of action.add) { - if (members.find(s => isSignerLeaf(s) && s.address === signer.address)) { - continue - } - - members.push({ - address: signer.address, - weight: signer.weight - }) - } - } - - if (action.remove) { - for (const address of action.remove) { - const index = members.findIndex(s => isSignerLeaf(s) && s.address === address) - if (index >= 0) { - members.splice(index, 1) - } - } - } - - return { - version: config.version, - threshold: action.threshold ?? config.threshold, - checkpoint: action.checkpoint ?? config.checkpoint, - tree: optimized2SignersTopologyBuilder(members) - } - }, - - buildStubSignature: function (config: WalletConfig, overrides: Map) { - const parts = new Map() - - for (const [signer, signature] of overrides.entries()) { - parts.set(signer, { signature, isDynamic: true }) - - const { encoded, weight } = encodeSigners(config, parts, [], 0) - - if (weight >= BigInt(config.threshold)) { - return encoded - } - } - - const signers = signersOf(config.tree) - - for (const { address } of signers.sort(({ weight: a }, { weight: b }) => a - b)) { - const signature = - '0x4e82f02f388a12b5f9d29eaf2452dd040c0ee5804b4e504b4dd64e396c6c781f2c7624195acba242dd825bfd25a290912e3c230841fd55c9a734c4de8d9899451b02' - parts.set(address, { signature, isDynamic: false }) - - const { encoded, weight } = encodeSigners(config, parts, [], 0) - - if (weight >= BigInt(config.threshold)) { - return encoded - } - } - - return encodeSigners(config, parts, [], 0).encoded - } -} diff --git a/old/packages/core/src/v2/context.ts b/old/packages/core/src/v2/context.ts deleted file mode 100644 index e815e21cc..000000000 --- a/old/packages/core/src/v2/context.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { WalletContext as BaseContext } from '../commons/context' - -export type WalletContext = BaseContext & { - version: 2 - universalSigValidator: string -} diff --git a/old/packages/core/src/v2/index.ts b/old/packages/core/src/v2/index.ts deleted file mode 100644 index d3b534bd6..000000000 --- a/old/packages/core/src/v2/index.ts +++ /dev/null @@ -1,26 +0,0 @@ -import { WalletContext } from '../commons/context' - -export * as config from './config' -export * as signature from './signature' -export * as context from './context' -export * as chained from './chained' - -import { ConfigCoder } from './config' -import { SignatureCoder } from './signature' - -export const coders = { - config: ConfigCoder, - signature: SignatureCoder -} - -export const version = 2 - -export const DeployedWalletContext: WalletContext = { - version: version, - factory: '0xFaA5c0b14d1bED5C888Ca655B9a8A5911F78eF4A', - guestModule: '0xfea230Ee243f88BC698dD8f1aE93F8301B6cdfaE', - mainModule: '0xfBf8f1A5E00034762D928f46d438B947f5d4065d', - mainModuleUpgradable: '0x4222dcA3974E39A8b41c411FeDDE9b09Ae14b911', - walletCreationCode: '0x603a600e3d39601a805130553df3363d3d373d3d3d363d30545af43d82803e903d91601857fd5bf3', - proxyImplementationHook: '0x1f56dbAD5e8319F0DE9a323E24A31b5077dEB1a4' -} diff --git a/old/packages/core/src/v2/signature.ts b/old/packages/core/src/v2/signature.ts deleted file mode 100644 index 33aadd5e1..000000000 --- a/old/packages/core/src/v2/signature.ts +++ /dev/null @@ -1,975 +0,0 @@ -import { ethers } from 'ethers' -import { MAX_UINT_256 } from '@0xsequence/utils' -import { isValidSignature, recoverSigner } from '../commons/signer' -import { - hashNode, - isNestedLeaf, - isNode, - isNodeLeaf, - isSignerLeaf, - isSubdigestLeaf, - Leaf, - WalletConfig, - SignerLeaf, - Topology, - imageHash, - NodeLeaf, - decodeSignerLeaf, - isEncodedSignerLeaf -} from './config' -import * as base from '../commons/signature' -import { hashSetImageHash } from './chained' - -export enum SignatureType { - Legacy = 0, - Dynamic = 1, - NoChainIdDynamic = 2, - Chained = 3 -} - -export enum SignaturePartType { - Signature = 0, - Address = 1, - DynamicSignature = 2, - Node = 3, - Branch = 4, - Subdigest = 5, - Nested = 6 -} - -export const SignaturePartTypeLength = 66 - -export type SignatureLeaf = SignerLeaf & { - signature: string - isDynamic: boolean -} - -export type UnrecoveredSignatureLeaf = Omit & - Pick, 'address'> & { - unrecovered: true - } - -export type UnrecoveredNestedLeaf = { - tree: UnrecoveredTopology - weight: ethers.BigNumberish - threshold: ethers.BigNumberish -} - -export type UnrecoveredLeaf = UnrecoveredNestedLeaf | UnrecoveredSignatureLeaf | Leaf - -export type UnrecoveredNode = { - left: UnrecoveredNode | UnrecoveredLeaf - right: UnrecoveredNode | UnrecoveredLeaf -} - -export type UnrecoveredTopology = UnrecoveredNode | UnrecoveredLeaf - -export function isUnrecoveredNode(node: UnrecoveredTopology): node is UnrecoveredNode { - return (node as UnrecoveredNode).left !== undefined && (node as UnrecoveredNode).right !== undefined -} - -export function isUnrecoveredNestedLeaf(leaf: UnrecoveredTopology): leaf is UnrecoveredNestedLeaf { - return (leaf as UnrecoveredNestedLeaf).tree !== undefined -} - -export function isUnrecoveredSignatureLeaf(leaf: UnrecoveredTopology): leaf is UnrecoveredSignatureLeaf { - return ( - (leaf as UnrecoveredSignatureLeaf).unrecovered && - (leaf as UnrecoveredSignatureLeaf).signature !== undefined && - (leaf as UnrecoveredSignatureLeaf).isDynamic !== undefined - ) -} - -export function decodeSignatureTree(body: ethers.BytesLike): UnrecoveredTopology { - let arr = ethers.getBytes(body) - - let pointer: undefined | (Omit & Pick, 'right'>) - - const append = (prevPointer: typeof pointer, node: UnrecoveredNode | UnrecoveredLeaf): typeof pointer => { - if (!prevPointer) { - return { - left: node - } - } - - if (!prevPointer.right) { - return { - left: prevPointer.left, - right: node - } - } - - return { - left: prevPointer as Required, - right: node - } - } - - while (arr.length > 0) { - const type = arr[0] as SignaturePartType - arr = arr.slice(1) - - switch (type) { - case SignaturePartType.Signature: - { - const weight = arr[0] - const signature = ethers.hexlify(arr.slice(1, SignaturePartTypeLength + 1)) - - pointer = append(pointer, { - signature, - weight, - unrecovered: true, - isDynamic: false - }) - arr = arr.slice(SignaturePartTypeLength + 1) - } - break - - case SignaturePartType.Address: - { - const weight = arr[0] - const address = ethers.getAddress(ethers.hexlify(arr.slice(1, 21))) - - pointer = append(pointer, { - address, - weight - }) - arr = arr.slice(21) - } - break - - case SignaturePartType.DynamicSignature: - { - const weight = arr[0] - const address = ethers.getAddress(ethers.hexlify(arr.slice(1, 21))) - const size = (arr[21] << 16) | (arr[22] << 8) | arr[23] - const signature = ethers.hexlify(arr.slice(24, 24 + size)) - - pointer = append(pointer, { - address, - signature, - weight, - unrecovered: true, - isDynamic: true - }) - arr = arr.slice(24 + size) - } - break - - case SignaturePartType.Node: - { - const nodeHash = ethers.hexlify(arr.slice(0, 32)) - - pointer = append(pointer, { nodeHash }) - arr = arr.slice(32) - } - break - - case SignaturePartType.Branch: - { - const size = (arr[0] << 16) | (arr[1] << 8) | arr[2] - const branch = decodeSignatureTree(arr.slice(3, 3 + size)) - - pointer = append(pointer, branch) - arr = arr.slice(3 + size) - } - break - - case SignaturePartType.Subdigest: - { - const subdigest = ethers.hexlify(arr.slice(0, 32)) - - pointer = append(pointer, { subdigest }) - arr = arr.slice(32) - } - break - - case SignaturePartType.Nested: - { - const weight = arr[0] - const threshold = (arr[1] << 8) | arr[2] - const size = (arr[3] << 16) | (arr[4] << 8) | arr[5] - - const tree = decodeSignatureTree(arr.slice(6, 6 + size)) - - pointer = append(pointer, { - weight, - threshold, - tree - }) - arr = arr.slice(6 + size) - } - break - - default: - throw new Error(`Unknown signature part type: ${type}: ${ethers.hexlify(arr)}`) - } - } - - if (!pointer) { - throw new Error('Empty signature tree') - } - - if (pointer.right) { - return pointer as Required - } - - return pointer.left -} - -export class InvalidSignatureLeafError extends Error { - constructor(public leaf: UnrecoveredLeaf) { - super(`Invalid signature leaf: ${JSON.stringify(leaf)}`) - } -} - -export async function recoverTopology( - unrecovered: UnrecoveredTopology, - subdigest: string, - provider: ethers.Provider -): Promise { - if (isUnrecoveredNode(unrecovered)) { - const [left, right] = await Promise.all([ - recoverTopology(unrecovered.left, subdigest, provider), - recoverTopology(unrecovered.right, subdigest, provider) - ]) - - return { left, right } - } - - if (isUnrecoveredNestedLeaf(unrecovered)) { - return { - weight: unrecovered.weight, - threshold: unrecovered.threshold, - tree: await recoverTopology(unrecovered.tree, subdigest, provider) - } - } - - if (isUnrecoveredSignatureLeaf(unrecovered)) { - if (unrecovered.isDynamic) { - if (!unrecovered.address) { - throw new Error('Dynamic signature leaf without address') - } - - const isValid = await isValidSignature(unrecovered.address, subdigest, unrecovered.signature, provider) - if (!isValid) { - throw new InvalidSignatureLeafError(unrecovered) - } - - return { - weight: unrecovered.weight, - address: unrecovered.address!, - signature: unrecovered.signature, - subdigest - } - } else { - return { - weight: unrecovered.weight, - address: recoverSigner(subdigest, unrecovered.signature), - signature: unrecovered.signature, - subdigest - } - } - } - - return unrecovered -} - -// TODO: It should be possible to re-use encodeSignatureTree -// and avoid duplicating this logic -export const partEncoder = { - concat: (a: ethers.BytesLike, b: ethers.BytesLike) => { - return ethers.solidityPacked(['bytes', 'bytes'], [a, b]) - }, - node: (nodeHash: ethers.BytesLike): string => { - return ethers.solidityPacked(['uint8', 'bytes32'], [SignaturePartType.Node, nodeHash]) - }, - branch: (tree: ethers.BytesLike): string => { - const arr = ethers.getBytes(tree) - return ethers.solidityPacked(['uint8', 'uint24', 'bytes'], [SignaturePartType.Branch, arr.length, arr]) - }, - nested: (weight: ethers.BigNumberish, threshold: ethers.BigNumberish, tree: ethers.BytesLike): string => { - const arr = ethers.getBytes(tree) - return ethers.solidityPacked( - ['uint8', 'uint8', 'uint16', 'uint24', 'bytes'], - [SignaturePartType.Nested, weight, threshold, arr.length, arr] - ) - }, - subdigest: (subdigest: ethers.BytesLike): string => { - return ethers.solidityPacked(['uint8', 'bytes32'], [SignaturePartType.Subdigest, subdigest]) - }, - signature: (weight: ethers.BigNumberish, signature: ethers.BytesLike): string => { - return ethers.solidityPacked(['uint8', 'uint8', 'bytes'], [SignaturePartType.Signature, weight, signature]) - }, - dynamicSignature: (weight: ethers.BigNumberish, address: ethers.BytesLike, signature: ethers.BytesLike): string => { - const arrSignature = ethers.getBytes(signature) - return ethers.solidityPacked( - ['uint8', 'uint8', 'address', 'uint24', 'bytes'], - [SignaturePartType.DynamicSignature, weight, address, arrSignature.length, arrSignature] - ) - }, - address: (weight: ethers.BigNumberish, address: ethers.BytesLike): string => { - return ethers.solidityPacked(['uint8', 'uint8', 'address'], [SignaturePartType.Address, weight, address]) - } -} - -export type EncodingOptions = { - forceDynamicEncoding?: boolean - disableTrim?: boolean -} - -export function encodeSigners( - config: WalletConfig, - parts: Map, - subdigests: string[], - chainId: ethers.BigNumberish, - options: EncodingOptions = {} -): { - encoded: string - weight: bigint -} { - const tree = encodeTree(config.tree, parts, subdigests, options) - - if (BigInt(chainId) === 0n) { - return { - encoded: ethers.solidityPacked( - ['uint8', 'uint16', 'uint32', 'bytes'], - [SignatureType.NoChainIdDynamic, config.threshold, config.checkpoint, tree.encoded] - ), - weight: tree.weight - } - } - - if (BigInt(config.threshold) > 255n) { - return { - encoded: ethers.solidityPacked( - ['uint8', 'uint16', 'uint32', 'bytes'], - [SignatureType.Dynamic, config.threshold, config.checkpoint, tree.encoded] - ), - weight: tree.weight - } - } - - return { - encoded: ethers.solidityPacked( - ['uint8', 'uint8', 'uint32', 'bytes'], - [SignatureType.Legacy, config.threshold, config.checkpoint, tree.encoded] - ), - weight: tree.weight - } -} - -export function encodeTree( - topology: Topology, - parts: Map, - subdigests: string[], - options: EncodingOptions = {} -): { - encoded: string - weight: bigint -} { - const trim = !options.disableTrim - - if (isNode(topology)) { - const left = encodeTree(topology.left, parts, subdigests) - const right = encodeTree(topology.right, parts, subdigests) - - const isLeftSigner = isSignerLeaf(topology.left) - const isRightSigner = isSignerLeaf(topology.right) - - if (trim && left.weight === 0n && right.weight === 0n && !isLeftSigner && !isRightSigner) { - return { - // We don't need to include anything for this node - // just the hash will be enough - encoded: partEncoder.node(hashNode(topology)), - weight: 0n - } - } - - if (trim && right.weight === 0n && !isRightSigner) { - return { - // The right node doesn't have any weight - // but we still need to include the left node encoded - encoded: partEncoder.concat(left.encoded, partEncoder.node(hashNode(topology.right))), - weight: left.weight - } - } - - if (trim && left.weight === 0n && !isLeftSigner) { - return { - // The left node doesn't have any weight - // we can just append its hash, but for the right node - // we need to create a new "branch" - encoded: partEncoder.concat(partEncoder.node(hashNode(topology.left)), partEncoder.branch(right.encoded)), - weight: right.weight - } - } - - return { - // Both nodes have weight, we need to include both - // the right one must be a branch - encoded: partEncoder.concat(left.encoded, partEncoder.branch(right.encoded)), - weight: left.weight + right.weight - } - } - - if (isNestedLeaf(topology)) { - const tree = encodeTree(topology.tree, parts, subdigests) - - if (trim && tree.weight === 0n) { - return { - encoded: partEncoder.node(hashNode(topology)), - weight: 0n - } - } - - return { - encoded: partEncoder.nested(topology.weight, topology.threshold, tree.encoded), - weight: tree.weight - } - } - - if (isNodeLeaf(topology)) { - return { - encoded: partEncoder.node(hashNode(topology)), - weight: 0n - } - } - - if (isSubdigestLeaf(topology)) { - const include = subdigests.includes(topology.subdigest) - return { - encoded: partEncoder.subdigest(topology.subdigest), - weight: include ? MAX_UINT_256 : 0n - } - } - - if (isSignerLeaf(topology)) { - const include = parts.has(topology.address) - - if (include) { - const part = parts.get(topology.address)! - const signature = part.signature - - if (options.forceDynamicEncoding || part.isDynamic) { - return { - encoded: partEncoder.dynamicSignature(topology.weight, topology.address, signature), - weight: BigInt(topology.weight) - } - } else { - return { - encoded: partEncoder.signature(topology.weight, signature), - weight: BigInt(topology.weight) - } - } - } else { - return { - encoded: partEncoder.address(topology.weight, topology.address), - weight: 0n - } - } - } - - throw new Error(`Invalid topology - unknown error: ${JSON.stringify(topology)}`) -} - -export type UnrecoveredConfig = { - tree: UnrecoveredTopology - threshold: ethers.BigNumberish - checkpoint: ethers.BigNumberish -} - -export type UnrecoveredSignature = base.UnrecoveredSignature & { - type: SignatureType - decoded: UnrecoveredConfig -} - -export type Signature = base.Signature & { - type: SignatureType -} - -export type UnrecoveredChainedSignature = UnrecoveredSignature & { - suffix: (UnrecoveredSignature | UnrecoveredChainedSignature)[] -} - -export type ChainedSignature = Signature & { - suffix: (Signature | ChainedSignature)[] -} - -export function deepestConfigOfSignature(signature: Signature | ChainedSignature): WalletConfig { - return isChainedSignature(signature) - ? deepestConfigOfSignature(signature.suffix[signature.suffix.length - 1]) - : signature.config -} - -export function isUnrecoveredSignature(sig: any): sig is UnrecoveredSignature { - return sig.type !== undefined && sig.decoded !== undefined && sig.version !== undefined && sig.version === 2 -} - -export function isUnrecoveredChainedSignature(sig: any): sig is UnrecoveredChainedSignature { - return sig.suffix !== undefined && Array.isArray(sig.suffix) && sig.suffix.every(isUnrecoveredSignature) -} - -export function isSignature(sig: any): sig is Signature { - return ( - sig.type !== undefined && - sig.config !== undefined && - sig.digest !== undefined && - sig.version !== undefined && - sig.version === 2 - ) -} - -export function isChainedSignature(sig: any): sig is ChainedSignature { - return sig.chain !== undefined && Array.isArray(sig.chain) && sig.chain.every(isSignature) -} - -export function decodeSignature(signature: ethers.BytesLike): UnrecoveredSignature | UnrecoveredChainedSignature { - const bytes = ethers.getBytes(signature) - const type = bytes[0] - - switch (type) { - case SignatureType.Legacy: - return { version: 2, type: SignatureType.Legacy, decoded: decodeSignatureBody(bytes) } - - case SignatureType.Dynamic: - return { version: 2, type: SignatureType.Dynamic, decoded: decodeSignatureBody(bytes.slice(1)) } - - case SignatureType.NoChainIdDynamic: - return { version: 2, type: SignatureType.NoChainIdDynamic, decoded: decodeSignatureBody(bytes.slice(1)) } - - case SignatureType.Chained: - return decodeChainedSignature(bytes) - - default: - throw new Error(`Invalid signature type: ${type}`) - } -} - -export function decodeSignatureBody(signature: ethers.BytesLike): UnrecoveredConfig { - const bytes = ethers.getBytes(signature) - - const threshold = (bytes[0] << 8) | bytes[1] - const checkpoint = (bytes[2] << 24) | (bytes[3] << 16) | (bytes[4] << 8) | bytes[5] - - const tree = decodeSignatureTree(bytes.slice(6)) - - return { threshold, checkpoint, tree } -} - -export function decodeChainedSignature(signature: ethers.BytesLike): UnrecoveredChainedSignature { - const arr = ethers.getBytes(signature) - const type = arr[0] - - if (type !== SignatureType.Chained) { - throw new Error(`Expected chained signature type: ${type}`) - } - - const chain: (UnrecoveredSignature | UnrecoveredChainedSignature)[] = [] - let index = 1 - - while (index < arr.length) { - const size = (arr[index] << 16) | (arr[index + 1] << 8) | arr[index + 2] - index += 3 - - const sig = decodeSignature(arr.slice(index, index + size)) - chain.push(sig) - - index += size - } - - const main = chain[0] - if (isUnrecoveredChainedSignature(main)) { - throw new Error(`Expected first link of chained signature to be a simple signature (not chained)`) - } - - const suffix = chain.slice(1) - - return { ...main, suffix } -} - -export function setImageHashStruct(imageHash: string) { - return ethers.solidityPacked( - ['bytes32', 'bytes32'], - [ethers.solidityPackedKeccak256(['string'], ['SetImageHash(bytes32 imageHash)']), imageHash] - ) -} - -export async function recoverSignature( - signature: UnrecoveredSignature | UnrecoveredChainedSignature, - payload: base.SignedPayload | { subdigest: string }, - provider: ethers.Provider -): Promise { - const signedPayload = (payload as { subdigest: string }).subdigest === undefined ? (payload as base.SignedPayload) : undefined - - const isNoChainId = signature.type === SignatureType.NoChainIdDynamic - if (isNoChainId && signedPayload) { - signedPayload.chainId = 0 - } - - const subdigest = signedPayload ? base.subdigestOf(signedPayload) : (payload as { subdigest: string }).subdigest - - if (!isUnrecoveredChainedSignature(signature)) { - const tree = await recoverTopology(signature.decoded.tree, subdigest, provider) - return { version: 2, type: signature.type, subdigest, config: { version: 2, ...signature.decoded, tree } } - } - - if (!base.isSignedPayload(signedPayload)) { - throw new Error(`Chained signature recovery requires detailed signed payload, subdigest is not enough`) - } - - const result: (Signature | ChainedSignature)[] = [] - let mutatedPayload = signedPayload - - // Recover the chain of signatures - // NOTICE: Remove the suffix from the "first" siganture - // otherwise we recurse infinitely - for (const sig of [{ ...signature, suffix: undefined }, ...signature.suffix]) { - const recovered = await recoverSignature(sig, mutatedPayload, provider) - result.unshift(recovered) - - const nextMessage = setImageHashStruct(imageHash(deepestConfigOfSignature(recovered))) - - mutatedPayload = { - ...mutatedPayload, - message: nextMessage, - digest: ethers.keccak256(nextMessage) - } - } - - const main = result[0] - const suffix = result.slice(1) - - return { ...main, suffix } -} - -export function encodeChain(main: ethers.BytesLike, suffix: ethers.BytesLike[]): string { - const allSignatures = [main, ...(suffix || [])] - const encodedMap = allSignatures.map(s => ethers.getBytes(encodeSignature(s))) - - const body = ethers.solidityPacked(encodedMap.map(() => ['uint24', 'bytes']).flat(), encodedMap.map(s => [s.length, s]).flat()) - - return ethers.solidityPacked(['uint8', 'bytes'], [SignatureType.Chained, body]) -} - -export function encodeSignature( - decoded: UnrecoveredChainedSignature | ChainedSignature | UnrecoveredSignature | Signature | ethers.BytesLike -): string { - if (ethers.isBytesLike(decoded)) return ethers.hexlify(decoded) - - if (isUnrecoveredChainedSignature(decoded) || isChainedSignature(decoded)) { - return encodeChain(encodeSignature(decoded), (decoded.suffix || []).map(encodeSignature)) - } - - const body = isUnrecoveredSignature(decoded) ? decoded.decoded : decoded.config - - switch (decoded.type) { - case SignatureType.Legacy: - if (BigInt(body.threshold) > 255n) { - throw new Error(`Legacy signature threshold is too large: ${body.threshold} (max 255)`) - } - - return encodeSignatureBody(body) - - case SignatureType.NoChainIdDynamic: - case SignatureType.Dynamic: - return ethers.solidityPacked(['uint8', 'bytes'], [decoded.type, encodeSignatureBody(body)]) - - case SignatureType.Chained: - throw new Error(`Unreachable code: Chained signature should be handled above`) - - default: - throw new Error(`Invalid signature type: ${decoded.type}`) - } -} - -export function encodeSignatureBody(decoded: WalletConfig | UnrecoveredConfig): string { - return ethers.solidityPacked( - ['uint16', 'uint32', 'bytes'], - [decoded.threshold, decoded.checkpoint, encodeSignatureTree(decoded.tree)] - ) -} - -export function encodeSignatureTree(tree: UnrecoveredTopology | Topology): string { - if (isNode(tree) || isUnrecoveredNode(tree)) { - const encodedRight = ethers.getBytes(encodeSignatureTree(tree.right)) - const encodedLeft = ethers.getBytes(encodeSignatureTree(tree.left)) - const isBranching = isNode(tree.right) || isUnrecoveredNode(tree.right) - - if (isBranching) { - return ethers.solidityPacked( - ['bytes', 'uint8', 'uint24', 'bytes'], - [encodedLeft, SignaturePartType.Branch, encodedRight.length, encodedRight] - ) - } else { - return ethers.solidityPacked(['bytes', 'bytes'], [encodedLeft, encodedRight]) - } - } - - if (isNestedLeaf(tree) || isUnrecoveredNestedLeaf(tree)) { - const nested = ethers.getBytes(encodeSignatureTree(tree.tree)) - - return ethers.solidityPacked( - ['uint8', 'uint8', 'uint16', 'uint24', 'bytes'], - [SignaturePartType.Nested, tree.weight, tree.threshold, nested.length, nested] - ) - } - - if (isUnrecoveredSignatureLeaf(tree) || (isSignerLeaf(tree) && tree.signature !== undefined)) { - const signature = ethers.getBytes(tree.signature!) - - if ((tree as { isDynamic?: boolean }).isDynamic || signature.length !== SignaturePartTypeLength) { - if (!tree.address) throw new Error(`Dynamic signature leaf must have address`) - return ethers.solidityPacked( - ['uint8', 'uint8', 'address', 'uint24', 'bytes'], - [SignaturePartType.DynamicSignature, tree.weight, tree.address, signature.length, signature] - ) - } else { - return ethers.solidityPacked(['uint8', 'uint8', 'bytes'], [SignaturePartType.Signature, tree.weight, signature]) - } - } - - if (isSignerLeaf(tree)) { - return ethers.solidityPacked(['uint8', 'uint8', 'address'], [SignaturePartType.Address, tree.weight, tree.address]) - } - - if (isNodeLeaf(tree)) { - return ethers.solidityPacked(['uint8', 'bytes32'], [SignaturePartType.Node, tree.nodeHash]) - } - - if (isSubdigestLeaf(tree)) { - return ethers.solidityPacked(['uint8', 'bytes32'], [SignaturePartType.Subdigest, tree.subdigest]) - } - - throw new Error(`Unknown signature tree type: ${tree}`) -} - -export function signaturesOf(topology: Topology): { address: string; signature: string }[] { - if (isNode(topology)) { - return [...signaturesOf(topology.left), ...signaturesOf(topology.right)] - } - - if (isNestedLeaf(topology)) { - return signaturesOf(topology.tree) - } - - if (isSignerLeaf(topology) && topology.signature) { - return [{ address: topology.address, signature: topology.signature }] - } - - return [] -} - -export function signaturesOfDecoded(utopology: UnrecoveredTopology): string[] { - if (isUnrecoveredNode(utopology)) { - return [...signaturesOfDecoded(utopology.left), ...signaturesOfDecoded(utopology.right)] - } - - if (isUnrecoveredNestedLeaf(utopology)) { - return signaturesOfDecoded(utopology.tree) - } - - if (isUnrecoveredSignatureLeaf(utopology)) { - return [utopology.signature] - } - - return [] -} - -export function subdigestsOfDecoded(utopology: UnrecoveredTopology): string[] { - if (isUnrecoveredNode(utopology)) { - return [...subdigestsOfDecoded(utopology.left), ...subdigestsOfDecoded(utopology.right)] - } - - if (isUnrecoveredNestedLeaf(utopology)) { - return subdigestsOfDecoded(utopology.tree) - } - - if (isSubdigestLeaf(utopology)) { - return [utopology.subdigest] - } - - return [] -} - -export async function trimSignature(signature: string | UnrecoveredSignature): Promise { - const decoded = typeof signature === 'string' ? decodeSignature(signature) : signature - - if (isUnrecoveredChainedSignature(decoded)) { - // We need to trim every suffix AND the main signature - const trimmed = await Promise.all([ - trimSignature({ ...decoded, suffix: undefined } as UnrecoveredSignature), - ...decoded.suffix.map(s => trimSignature(s)) - ]) - - return encodeChain(trimmed[0], trimmed.slice(1)) - } - - const { trimmed } = await trimUnrecoveredTree(decoded.decoded.tree) - return encodeSignature({ ...decoded, decoded: { ...decoded.decoded, tree: trimmed } }) -} - -export async function trimUnrecoveredTree( - tree: UnrecoveredTopology, - trimStaticDigest: boolean = true -): Promise<{ - weight: number - trimmed: UnrecoveredTopology -}> { - if (isUnrecoveredNode(tree)) { - const [left, right] = await Promise.all([trimUnrecoveredTree(tree.left), trimUnrecoveredTree(tree.right)]) - - if (left.weight === 0 && right.weight === 0) { - try { - // If both weights are 0 then it means we don't have any signatures yet - // because of that, we should be able to "recover" the tree with any subdigest - // and still get the valid node hash (there shouldn't be any signatures to verify) - const recovered = await recoverTopology(tree, ethers.ZeroHash, undefined as any) - - return { - weight: 0, - trimmed: { - nodeHash: hashNode(recovered) - } as NodeLeaf - } - } catch { - // If something fails it's more likely because some signatures have sneaked in - // in that case we should keep this node - } - } else { - return { - weight: left.weight + right.weight, - trimmed: { - left: left.trimmed, - right: right.trimmed - } as UnrecoveredNode - } - } - } - - if (isUnrecoveredNestedLeaf(tree)) { - const trimmed = await trimUnrecoveredTree(tree.tree) - - if (trimmed.weight === 0) { - try { - // If the nested leaf is empty, we can recover it with any subdigest - // and still get the valid node hash (there shouldn't be any signatures to verify) - const recovered = await recoverTopology(tree, ethers.ZeroHash, undefined as any) - - return { - weight: 0, - trimmed: { - nodeHash: hashNode(recovered) - } as NodeLeaf - } - } catch { - // If something fails it's more likely because some signatures have sneaked in - // in that case we should keep this node - } - } - - return { - weight: trimmed.weight, - trimmed: { - weight: tree.weight, - threshold: tree.threshold, - tree: trimmed.trimmed - } as UnrecoveredNestedLeaf - } - } - - // Hash nodes can be encoded as signer leaves if they have a weight below - // 256, most likely the are signer leaves wrongly encoded - if (isNodeLeaf(tree) && isEncodedSignerLeaf(tree.nodeHash)) { - return { - weight: 0, - trimmed: { - ...decodeSignerLeaf(tree.nodeHash) - } as SignerLeaf - } - } - - if (isUnrecoveredSignatureLeaf(tree) || (isSignerLeaf(tree) && tree.signature !== undefined)) { - return { - weight: Number(tree.weight), - trimmed: tree - } - } - - if (!trimStaticDigest && isSubdigestLeaf(tree)) { - return { - weight: +Infinity, - trimmed: tree - } - } - - return { - weight: 0, - trimmed: tree - } -} - -export const SignatureCoder: base.SignatureCoder = { - decode: (data: string): UnrecoveredSignature => { - return decodeSignature(data) - }, - - encode: (data: Signature | UnrecoveredSignature): string => { - return encodeSignature(data) - }, - - trim: (data: string): Promise => { - return trimSignature(data) - }, - - supportsNoChainId: true, - - recover: ( - data: UnrecoveredSignature | UnrecoveredChainedSignature, - payload: base.SignedPayload, - provider: ethers.Provider - ): Promise => { - return recoverSignature(data, payload, provider) - }, - - encodeSigners: ( - config: WalletConfig, - signatures: Map, - subdigests: string[], - chainId: ethers.BigNumberish - ): { - encoded: string - weight: bigint - } => { - return encodeSigners(config, signatures, subdigests, chainId) - }, - - hasEnoughSigningPower: (config: WalletConfig, signatures: Map): boolean => { - const { weight } = SignatureCoder.encodeSigners(config, signatures, [], 0) - return weight >= BigInt(config.threshold) - }, - - chainSignatures: ( - main: Signature | UnrecoveredSignature | UnrecoveredChainedSignature | ethers.BytesLike, - suffix: (Signature | UnrecoveredSignature | UnrecoveredChainedSignature | ethers.BytesLike)[] - ): string => { - // Notice: v2 expects suffix to be reversed - // that being: from signed to current imageHash - const reversed = suffix.reverse() - const mraw = ethers.isBytesLike(main) ? main : encodeSignature(main) - const sraw = reversed.map(s => (ethers.isBytesLike(s) ? s : encodeSignature(s))) - return encodeChain(mraw, sraw) - }, - - hashSetImageHash: function (imageHash: string): string { - return hashSetImageHash(imageHash) - }, - - signaturesOf(config: WalletConfig): { address: string; signature: string }[] { - return signaturesOf(config.tree) - }, - - signaturesOfDecoded: function (data: UnrecoveredSignature): string[] { - return signaturesOfDecoded(data.decoded.tree) - } -} diff --git a/old/packages/core/src/version.ts b/old/packages/core/src/version.ts deleted file mode 100644 index 3d6e7b7f7..000000000 --- a/old/packages/core/src/version.ts +++ /dev/null @@ -1 +0,0 @@ -export const VERSION = '2.3.8' diff --git a/old/packages/core/tests/v2/config.spec.ts b/old/packages/core/tests/v2/config.spec.ts deleted file mode 100644 index c9f88535c..000000000 --- a/old/packages/core/tests/v2/config.spec.ts +++ /dev/null @@ -1,512 +0,0 @@ -import { expect } from 'chai' -import { config } from '../../src/v2' - -const sampleTree1: config.Topology = { - left: { - address: '0x07ab71Fe97F9122a2dBE3797aa441623f5a59DB1', - weight: 2 - }, - right: { - left: { - left: { - subdigest: '0xb374baf809e388014912ca7020c8ef51ad68591db3f010f9e35a77c15d4d6bed' - }, - right: { - subdigest: '0x787c83a19321fc70f8653f8faa39cce60bf26cac51c25df1b0634eb7ddbe0c60' - } - }, - right: { - address: '0xdafea492d9c6733ae3d56b7ed1adb60692c98bc5', - weight: 1 - } - } -} - -const sampleTree2: config.Topology = { - left: { - left: { - left: { - subdigest: '0x0000000000000000000000000000000000000000000000000000000000000000' - }, - right: { - subdigest: '0x0000000000000000000000000000000000000000000000000000000000000001' - } - }, - right: { - left: { - subdigest: '0x0000000000000000000000000000000000000000000000000000000000000002' - }, - right: { - subdigest: '0x0000000000000000000000000000000000000000000000000000000000000003' - } - } - }, - right: { - left: { - left: { - subdigest: '0x0000000000000000000000000000000000000000000000000000000000000004' - }, - right: { - subdigest: '0x0000000000000000000000000000000000000000000000000000000000000005' - } - }, - right: { - left: { - subdigest: '0x0000000000000000000000000000000000000000000000000000000000000006' - }, - right: { - subdigest: '0x0000000000000000000000000000000000000000000000000000000000000007' - } - } - } -} - -const sampleTree3: config.Topology = { - left: { - tree: { - left: { - address: '0x07ab71Fe97F9122a2dBE3797aa441623f5a59DB1', - weight: 2 - }, - right: { - left: { - subdigest: '0x0000000000000000000000000000000000000000000000000000000000000006' - }, - right: { - subdigest: '0x787c83a19321fc70f8653f8faa39cce60bf26cac51c25df10000000000000000' - } - } - }, - weight: 90, - threshold: 2 - }, - right: { - left: { - left: { - subdigest: '0xb374baf809e388014912ca7020c8ef51ad68591db3f010f9e35a77c15d4d6bed' - }, - right: { - subdigest: '0x787c83a19321fc70f8653f8faa39cce60bf26cac51c25df1b0634eb7ddbe0c60' - } - }, - right: { - address: '0xdafea492d9c6733ae3d56b7ed1adb60692c98bc5', - weight: 1 - } - } -} - -describe('v2 config utils', () => { - describe('Detect different leaves', () => { - it('Should detect signer leaf', () => { - const leaf: config.Leaf = { - address: '0x07ab71Fe97F9122a2dBE3797aa441623f5a59DB1', - weight: 2 - } - - expect(config.isLeaf(leaf)).to.be.true - expect(config.isSignerLeaf(leaf)).to.be.true - expect(config.isTopology(leaf)).to.be.true - expect(config.isNode(leaf)).to.be.false - expect(config.isSubdigestLeaf(leaf)).to.be.false - expect(config.isNestedLeaf(leaf)).to.be.false - }) - - it('Should detect subdigest leaf', () => { - const leaf: config.Leaf = { - subdigest: '0x787c83a19321fc70f8653f8faa39cce60bf26cac51c25df1b0634eb7ddbe0c60' - } - - expect(config.isLeaf(leaf)).to.be.true - expect(config.isSubdigestLeaf(leaf)).to.be.true - expect(config.isTopology(leaf)).to.be.true - expect(config.isNode(leaf)).to.be.false - expect(config.isSignerLeaf(leaf)).to.be.false - expect(config.isNestedLeaf(leaf)).to.be.false - }) - - it('Should detect nested leaf', () => { - const leaf: config.Leaf = { - tree: sampleTree1, - weight: 90, - threshold: 2 - } - - expect(config.isLeaf(leaf)).to.be.true - expect(config.isNestedLeaf(leaf)).to.be.true - expect(config.isTopology(leaf)).to.be.true - expect(config.isNode(leaf)).to.be.false - expect(config.isSignerLeaf(leaf)).to.be.false - expect(config.isSubdigestLeaf(leaf)).to.be.false - }) - - it('Should detect node', () => { - expect(config.isTopology(sampleTree1)).to.be.true - expect(config.isNode(sampleTree1)).to.be.true - expect(config.isLeaf(sampleTree1)).to.be.false - expect(config.isNestedLeaf(sampleTree1)).to.be.false - expect(config.isSignerLeaf(sampleTree1)).to.be.false - expect(config.isSubdigestLeaf(sampleTree1)).to.be.false - }) - }) - - describe('Hash leaves', () => { - it('Hash signer leaf', () => { - const hash = config.hashNode({ - address: '0x07ab71Fe97F9122a2dBE3797aa441623f5a59DB1', - weight: 129 - }) - - expect(hash).to.equal(`0x00000000000000000000008107ab71fe97f9122a2dbe3797aa441623f5a59db1`) - }) - - it('Hash subdigest', () => { - const hash = config.hashNode({ - subdigest: '0xb38b3da0ef56c3094675167fed4a263c3346b325dddb6e56a3eb9a10ed7539ed' - }) - - expect(hash).to.equal(`0x7cf15e50f6d44f71912ca6575b7fd911a5c6f19d0195692c7d35a102ad5ae98b`) - }) - - it('Hash nested leaf', () => { - const hash = config.hashNode({ - tree: sampleTree1, - weight: 90, - threshold: 211 - }) - - expect(hash).to.equal(`0x6cca65d12b31379a7b429e43443969524821e57d2c6a7fafae8e30bd31a5295b`) - }) - - it('Hash node', () => { - const tree = { - left: { - address: '0x07ab71Fe97F9122a2dBE3797aa441623f5a59DB1', - weight: 129 - }, - right: { - subdigest: '0x787c83a19321fc70f8653f8faa39cce60bf26cac51c25df1b0634eb7ddbe0c60' - } - } - - const hash = config.hashNode(tree) - expect(hash).to.equal(`0x47dcfac6c5622054a0ac762baa1a5eb10705484ea1e000869bbc11a093bec97e`) - }) - }) - - it('Read left face of tree', () => { - const leftFace1 = config.leftFace(sampleTree1) - expect(leftFace1.length).to.equal(2) - expect(leftFace1[0]).to.deep.equal(sampleTree1['left']) - expect(leftFace1[1]).to.deep.equal(sampleTree1['right']) - - const leftFace2 = config.leftFace(sampleTree2) - expect(leftFace2.length).to.equal(4) - expect(leftFace2[0]).to.deep.equal(sampleTree2['left']['left']['left']) - expect(leftFace2[1]).to.deep.equal(sampleTree2['left']['left']['right']) - expect(leftFace2[2]).to.deep.equal(sampleTree2['left']['right']) - expect(leftFace2[3]).to.deep.equal(sampleTree2['right']) - - const leftFace3 = config.leftFace(sampleTree3) - expect(leftFace3.length).to.equal(2) - expect(leftFace3[0]).to.deep.equal(sampleTree3['left']) - expect(leftFace3[1]).to.deep.equal(sampleTree3['right']) - }) - - describe('Simplify configurations', () => { - it('Should simplify configuration', () => { - const simplifiedConfig1 = config.toSimpleWalletConfig({ - version: 2, - tree: sampleTree1, - threshold: 11, - checkpoint: 999999 - }) - - expect(simplifiedConfig1).to.deep.equal({ - checkpoint: 999999, - threshold: 11, - members: [ - sampleTree1['left'], - sampleTree1['right']['left']['left'], - sampleTree1['right']['left']['right'], - sampleTree1['right']['right'] - ] - }) - - const simplifiedConfig2 = config.toSimpleWalletConfig({ - version: 2, - tree: sampleTree2, - threshold: 1, - checkpoint: 2 - }) - - expect(simplifiedConfig2).to.deep.equal({ - checkpoint: 2, - threshold: 1, - members: [ - sampleTree2['left']['left']['left'], - sampleTree2['left']['left']['right'], - sampleTree2['left']['right']['left'], - sampleTree2['left']['right']['right'], - sampleTree2['right']['left']['left'], - sampleTree2['right']['left']['right'], - sampleTree2['right']['right']['left'], - sampleTree2['right']['right']['right'] - ] - }) - - const simplifiedConfig3 = config.toSimpleWalletConfig({ - version: 2, - tree: sampleTree3, - threshold: 2, - checkpoint: 3 - }) - - expect(simplifiedConfig3).to.deep.equal({ - checkpoint: 3, - threshold: 2, - members: [ - { - threshold: sampleTree3['left']['threshold'], - weight: sampleTree3['left']['weight'], - members: [ - sampleTree3['left']['tree']['left'], - sampleTree3['left']['tree']['right']['left'], - sampleTree3['left']['tree']['right']['right'] - ] - }, - sampleTree3['right']['left']['left'], - sampleTree3['right']['left']['right'], - sampleTree3['right']['right'] - ] - }) - }) - }) - - describe('Build configurations', async () => { - it('Build legacy configuration', () => { - const legacyConfig1 = config.toWalletConfig( - { - members: [ - sampleTree1['left'], - sampleTree1['right']['left']['left'], - sampleTree1['right']['left']['right'], - sampleTree1['right']['right'] - ], - threshold: 11, - checkpoint: 999999 - }, - config.legacyTopologyBuilder - ) - - expect(legacyConfig1).to.deep.equal({ - version: 2, - checkpoint: 999999, - threshold: 11, - tree: { - left: { - left: { - left: sampleTree1['left'], - right: sampleTree1['right']['left']['left'] - }, - right: sampleTree1['right']['left']['right'] - }, - right: sampleTree1['right']['right'] - } - }) - - const legacyConfig2 = config.toWalletConfig({ - members: [ - sampleTree2['left']['left']['left'], - sampleTree2['left']['left']['right'], - sampleTree2['left']['right']['left'], - sampleTree2['left']['right']['right'], - sampleTree2['right']['left']['left'], - sampleTree2['right']['left']['right'], - sampleTree2['right']['right']['left'], - sampleTree2['right']['right']['right'] - ], - threshold: 1, - checkpoint: 2 - }) - - expect(legacyConfig2).to.deep.equal({ - version: 2, - checkpoint: 2, - threshold: 1, - tree: { - left: { - left: { - left: { - left: { - left: { - left: { - left: sampleTree2['left']['left']['left'], - right: sampleTree2['left']['left']['right'] - }, - right: sampleTree2['left']['right']['left'] - }, - right: sampleTree2['left']['right']['right'] - }, - right: sampleTree2['right']['left']['left'] - }, - right: sampleTree2['right']['left']['right'] - }, - right: sampleTree2['right']['right']['left'] - }, - right: sampleTree2['right']['right']['right'] - } - }) - - const legacyConfig3 = config.toWalletConfig({ - members: [ - { - threshold: sampleTree3['left']['threshold'], - weight: sampleTree3['left']['weight'], - members: [ - sampleTree3['left']['tree']['left'], - sampleTree3['left']['tree']['right']['left'], - sampleTree3['left']['tree']['right']['right'] - ] - }, - sampleTree3['right']['left']['left'], - sampleTree3['right']['left']['right'], - sampleTree3['right']['right'] - ], - threshold: 2, - checkpoint: 3 - }) - - expect(legacyConfig3).to.deep.equal({ - version: 2, - checkpoint: 3, - threshold: 2, - tree: { - left: { - left: { - left: { - weight: sampleTree3['left']['weight'], - threshold: sampleTree3['left']['threshold'], - tree: { - left: { - left: sampleTree3['left']['tree']['left'], - right: sampleTree3['left']['tree']['right']['left'] - }, - right: sampleTree3['left']['tree']['right']['right'] - } - }, - right: sampleTree3['right']['left']['left'] - }, - right: sampleTree3['right']['left']['right'] - }, - right: sampleTree3['right']['right'] - } - }) - }) - - it('Build merkle configuration', () => { - const merkleConfig1 = config.toWalletConfig( - { - members: [ - sampleTree1['left'], - sampleTree1['right']['left']['left'], - sampleTree1['right']['left']['right'], - sampleTree1['right']['right'] - ], - threshold: 11, - checkpoint: 999999 - }, - config.merkleTopologyBuilder - ) - - expect(merkleConfig1).to.deep.equal({ - version: 2, - checkpoint: 999999, - threshold: 11, - tree: { - left: { - left: sampleTree1['left'], - right: sampleTree1['right']['left']['left'] - }, - right: { - left: sampleTree1['right']['left']['right'], - right: sampleTree1['right']['right'] - } - } - }) - - const merkleConfig2 = config.toWalletConfig( - { - members: [ - sampleTree2['left']['left']['left'], - sampleTree2['left']['left']['right'], - sampleTree2['left']['right']['left'], - sampleTree2['left']['right']['right'], - sampleTree2['right']['left']['left'], - sampleTree2['right']['left']['right'], - sampleTree2['right']['right']['left'], - sampleTree2['right']['right']['right'] - ], - threshold: 1, - checkpoint: 2 - }, - config.merkleTopologyBuilder - ) - - expect(merkleConfig2).to.deep.equal({ - version: 2, - checkpoint: 2, - threshold: 1, - tree: sampleTree2 - }) - - const merkleConfig3 = config.toWalletConfig( - { - members: [ - { - threshold: sampleTree3['left']['threshold'], - weight: sampleTree3['left']['weight'], - members: [ - sampleTree3['left']['tree']['left'], - sampleTree3['left']['tree']['right']['left'], - sampleTree3['left']['tree']['right']['right'] - ] - }, - sampleTree3['right']['left']['left'], - sampleTree3['right']['left']['right'], - sampleTree3['right']['right'] - ], - threshold: 2, - checkpoint: 3 - }, - config.merkleTopologyBuilder - ) - - expect(merkleConfig3).to.deep.equal({ - version: 2, - checkpoint: 3, - threshold: 2, - tree: { - left: { - left: { - weight: sampleTree3['left']['weight'], - threshold: sampleTree3['left']['threshold'], - tree: { - left: { - left: sampleTree3['left']['tree']['left'], - right: sampleTree3['left']['tree']['right']['left'] - }, - right: sampleTree3['left']['tree']['right']['right'] - } - }, - right: sampleTree3['right']['left']['left'] - }, - right: { - left: sampleTree3['right']['left']['right'], - right: sampleTree3['right']['right'] - } - } - }) - }) - }) -}) diff --git a/old/packages/core/tests/v2/signature.spec.ts b/old/packages/core/tests/v2/signature.spec.ts deleted file mode 100644 index f2c424b58..000000000 --- a/old/packages/core/tests/v2/signature.spec.ts +++ /dev/null @@ -1,603 +0,0 @@ -import { expect } from 'chai' -import { ethers } from 'ethers' -import { decodeSignature, encodeSignature, SignaturePartType, SignatureType } from '../../src/v2/signature' - -const sampleSignature1 = - '0x0001636911b800019fa7b7e8ed25088c413074818ac10ab3bbcddb120bbec85083f3ba254e5547d953fe615a6474fd365326244dedd7afa3911ad39c956ca096d721064d6b29055d1b02' -const sampleSignature2 = - '0x000263691389034a062f86183c9d46e129f0331f2a42f6ba22a3525a46ecd197fa23d177d75f2d040000a0033fce59919d0a4ee44a8066a3b1d0083760d89a06ae89edadf8a58e0e5c5ac5040400007b01016ffeccf6f31e0a469d55dede5651d34a6ecd9fc500017052a0438a13da22242bcd20c219630d839c364cd2b6042add1bee32774c37d72ba2ace8b7a79c95a536d4c0fed3fe05883c6e1188a4191a91623a903e4ec21c1b0203ad5831467806b6edd059ff5ac9809f2bb6e80512ceb5d466a67251ffb842fae1040000c50314b729622595218cdbef06c630daeea028e25e8ca048d97bc170d75feb9066ad0400007f030c8c0bb7e8c5ec8eed444ae25f3a1796597bcfacf5f6b758ae4fadd6fc416f560400005a0001e7618f1b7b012d7fc48f518f498bb6823dc2a8308984287501873cb535b6d5bf526fb91a220297f461ac5a2434d0e8e768c3bf166c329366ddc885bf2e1676271c0201014ef7ec718f66ae3920ea119b9d7ddf39337601f703fdea4c5fb23fb3cc2b2360057abef1ff7e7195acbdc4db555c27cc588a4585a6' -const sampleSignature3 = - '0x0003636916740101a653f5900ef5c538142cd8aef1ce750390b29a3e0101a54e174d851bcffe8c1332c00e23156b4982204d0400002c0101ddfba5791de0b8da80d46b43915ae34c4876c4f80101f50834aa68dec4d9d151b1ff1c509c81431ddc450400008a0101e8e7c96af0d472a8d0e60e86009a97290fbc0f6d010188a175d23b41252823e7fd88297754f5c580c4ff0400005a0101653ca45307922091337376cb305485c0d889a7a10001d9b2a3142267255c50581c8023648916a3e8c3ae7ca50f6752b6874a20e76e496b30c4e1b653691b3ae9fea40a66966f3d1f2a35cedb52fbf07ae09269fb3c8e1b02040001180101a18522682c76e7e4083fcef379839347a533f782010159d7eb9085272adb317893df26e7f39dcfdda1ba0400002c0101c31ee68141cb47d2b260fe5a6e48b37d021d8f190101947ee7254d4de72f7a1b2e70ed3f8e8ae6510d77040000b8000147f646e6d13434b2df65fc1ab9086264bed1030e485e3513ed01686d03d127df510efc468bbeedde677c3af1fda7b0dbffc7186e07203eb09718cc256cf6b5d11b020101ce1977029e9398ec9f45327c81cf7a557f5d30b80400005a01010b6a69349728615d6e1c8d4fd133e49aafd5b91b0001aaac151a6ad4bf7f966db203164551a7c3c3969d15666dd2c75202231623f5ee2059711c84d2f216126bf3dc6cc63223eba079262e73c58da4f97583747c790b1c02' -const sampleSignature4 = - '0x00010000000203f6dc189f16bb65c588ccd5c63aa805bcbeb6e90dd8a049cfba0936050f299087060400020000c3037c989a96925302993812c1ec3924bce3ba2ca0e8f7e3655e30f5b24d965aa18b040000880001a73ce16a9cc7075c18bd2b4fd2649812fecb51460353a55bf62f821bf884443a169e0d0e04113d7ef2c2d15f1ecf46531f291259542065c556f0e721a82b3c581b02000193f1f388009f68763df43632153155960ea6604723bb517e90788822ff21e38722be4387e8f67c0db677b74d9a0c2a804183e6a3eebd2ba53dbfc54432f1a10f1b020101907c144d2490f49838c6499507ee5914f4a22b5b' -const sampleSignature5 = - '0x020001636a2c7d032b4c067647ee1f154214b4ad83bbbe7e57a528ca0df587e34ded382ca7348c100400006703c702696d354063d18d750cc686a1f356e503f85516c54375ef5878250a22758704000042054cd7065b01927d3429db64e0a7ec956fa5506dab23fa37c767eb4375fab7898b032acf6636e813600f741841733e57a7e0cb4131f3c68db7ba7014fb94525f5de20302c10a9634e89b4293346a7408364eeece764491bd465d043f7c826518c2bc9501011a9bd9f98e2c0c81bcf51da26c3a7cfcc18c43b4030c389524f715de03757bcbc7a084f52c5d54def431bb8080a18d0075e26b859c0101379b2a7a384376b420d3d19c5c5717abaad3a969' -const sampleSignature6 = - '0x010002636a33a501012093ec341be249baa0c8afa35fef368a90a483900201cd907cf455a1a00a4ebe37ef5f4bb7abc3770a6900004228230cc5c4ee221c093054fef22c12d534f4d63782bc94a160c2f781cef142e019b84d82070b67cb750ec9ba46ae49e6687591810099f6e58811fbe35ea3db451c0202014bffabff5819087514d8db622543c3d0d89cd64d000042844e002b27098ba6144bc9eb7950cd20a4062d265bdd042bffbb7ec8405caf7f60f1c5bdcd8ea4f4acee17d5ac9eac6bcdb40a20a41796d40a153278ab062b211c020101e8c4a6eb40ece266c7a58670493ee0727be4d20a' - -describe('v2 signature utils', () => { - describe('Decode signatures', () => { - it('Decode simple signature', () => { - const decoded = decodeSignature(sampleSignature1) - - expect(decoded).to.deep.equal({ - version: 2, - type: SignatureType.Legacy, - decoded: { - threshold: 1, - checkpoint: 1667830200, - tree: { - isDynamic: false, - signature: - '0x9fa7b7e8ed25088c413074818ac10ab3bbcddb120bbec85083f3ba254e5547d953fe615a6474fd365326244dedd7afa3911ad39c956ca096d721064d6b29055d1b02', - unrecovered: true, - weight: 1 - } - } - }) - }) - - it('Decode trimmed 2/N with 31 signers', () => { - /** - 0x9ce037be2c62dfec86f2cf5339f773b8fc22da992b9e33ee8ee050676a1fef48', - ├─ 0xcc049b7ee4891eb306511fb4019c104766fb97c73097a6ddd73858c1ba200292', - │ ├─ 0x4a062f86183c9d46e129f0331f2a42f6ba22a3525a46ecd197fa23d177d75f2d', - │ │ ├─ 0xe66f95b2257d7765d2af2a44f85bf9c9ecd220c686943595f4c7b87f42214b78', - │ │ │ ├─ 0xfccac93b8e71891c0647977a42447b037574deaa9d4cf7a6a6e6fd9275b75a5d', - │ │ │ │ ├─ weight: 1 - address: 0x39bc8F324dB1d2356E084b8c504F972f4A774fB2', - │ │ │ │ └─ weight: 1 - address: 0xb2C7368fA82d1Fd633f79FA9BcBE923cB1b84e4f', - │ │ │ └─ 0x85dab8bdc832396fb5f6f3dc3d86e589a6358edde9d5dfb567199ba81328f429', - │ │ │ ├─ weight: 1 - address: 0xAc9a3035638E36300DCd6e89cf7D3861bbb8dd1F', - │ │ │ └─ weight: 1 - address: 0x7Fb579CE8378EbcB953c6b1159cFF1d2DEEb6f74', - │ │ └─ 0xc0a464e50c14c3c9be84fcf19726f39298b1101b62da1ea093d058f574dc4075', - │ │ ├─ 0xa2ba648e377ddd25ccc5d55db2eaf2031d713ea63456cf60dbd88acb4fb9b826', - │ │ │ ├─ weight: 1 - address: 0x5dfc6cA7841DF26872BeF07C68fc18031908480c', - │ │ │ └─ weight: 1 - address: 0xA3B58D5778F59cF331693618f5E11b901029C3DE', - │ │ └─ 0x6ec7200199b3dad7a17e09b5a04df6518bc3eefecd59b6509f47bc478325384b', - │ │ ├─ weight: 1 - address: 0xAD4d6101f2fFda7C39D039d4c496B9005AaDBFaA', - │ │ └─ weight: 1 - address: 0x204De2Fa1FF302345CFd53bE37a5234c606783d8', - │ └─ 0x326e14238f8038db10e675efdf0c7648f8066c6a064738b73ec1db63a904c26c', - │ ├─ 0x3fce59919d0a4ee44a8066a3b1d0083760d89a06ae89edadf8a58e0e5c5ac504', - │ │ ├─ 0xa13a367336b680c598ffcc7738b9b18135000db5be559f35262b28e1701bb9a3', - │ │ │ ├─ weight: 1 - address: 0xD6BE598eD22A999f51BDCFD484454319CCe32b92', - │ │ │ └─ weight: 1 - address: 0x3347821222470CD136bAac735bf59A1734A80B83', - │ │ └─ 0x14b13f254e58655bf2d4dce5c7e3ec0566a4e025a70d1fc0d41a08e675c86358', - │ │ ├─ weight: 1 - address: 0x0aE2D84a35Eb1fD2B78dF00940A84c6a4954B4A6', - │ │ └─ weight: 1 - address: 0x598fD5791971eb873FA8147B1BdF3207068F7E56', - │ └─ 0xa507ba934d99995d74786ac057b7c2cd9e22ac9d4c3aee6739e0cc0d308065db', - │ ├─ 0x1df893b2ba851550922f4c3c6f60608f6c70fbe1f47670eaf9f5c3a6edbcd400', - │ │ ├─ weight: 1 - address: 0x6FFEcCF6F31e0a469D55DEdE5651D34A6ECd9FC5', - │ │ └─ weight: 1 - address: 0xE8D34A3999375ef56CD8eB41AC678f5332F7F223', - │ └─ 0xad5831467806b6edd059ff5ac9809f2bb6e80512ceb5d466a67251ffb842fae1', - │ ├─ weight: 1 - address: 0x103dD4E217C422839F3D4b1897C3b1100184d962', - │ └─ weight: 1 - address: 0x5adDAfA4498f9F54af54B8CD8a86728818Df911f', - └─ 0xb7a09a95298cc9bbeeb3c8fbe1f46d158976de898ca42470d0da75cea7be9b43', - ├─ 0x2ac4cc831b29dd447dc2d95a203a7b146ffbb8b9cf3fd0022d15bd0a490bc557', - │ ├─ 0x14b729622595218cdbef06c630daeea028e25e8ca048d97bc170d75feb9066ad', - │ │ ├─ 0xd08870ce28971831b6320b00d017b4351c75ca68432721c6e50145fc320bd900', - │ │ │ ├─ weight: 1 - address: 0x8881DFDBb650d55A440e7F40c3Fc890D327cE35C', - │ │ │ └─ weight: 1 - address: 0x133BC159421310c81E1045ba1e1f8fac34e2c5bB', - │ │ └─ 0x99a7e698bb471ec55f01f14f21a20d23b2f3c142fabe99b3294c526b50207a13', - │ │ ├─ weight: 1 - address: 0xCA9Ed033CB7E9D905942866cD2E593aEB2e05731', - │ │ └─ weight: 1 - address: 0x96613Fda8926dB718719c3c1CE9DaeeddbC520F1', - │ └─ 0xd508a67420b9138396432c9d6a89735a4f1bddf3800ce175fe54f5f80eea6fc7', - │ ├─ 0x0c8c0bb7e8c5ec8eed444ae25f3a1796597bcfacf5f6b758ae4fadd6fc416f56', - │ │ ├─ weight: 1 - address: 0x6d0fDa7520Bb48B6948f77214EE7411636853f30', - │ │ └─ weight: 1 - address: 0x1252c641DC898449490C7F145598b5A70c6738de', - │ └─ 0xc6eb96ebf4f10c3073d6b680efcb57d636b83fe5bc92912ae7c300d9e9cb232a', - │ ├─ weight: 1 - address: 0x3B69bC115e6D79E8adBD011020676750B169bEDd', - │ └─ weight: 1 - address: 0x4ef7Ec718f66ae3920ea119b9d7DDF39337601f7', - └─ 0xfdea4c5fb23fb3cc2b2360057abef1ff7e7195acbdc4db555c27cc588a4585a6', - ├─ 0x33b6f5aa2e0cc8d120a1ec31e74095d978b88fce7c34030579c1ea1ef372c4ad', - │ ├─ 0x5885c583c79ef1fe29477fcb82c7053518a99bedf73ebbf1948a160bdb8e2c0f', - │ │ ├─ weight: 1 - address: 0x89eD176B654F09024a8EFb0F9576D05f614E6f77', - │ │ └─ weight: 1 - address: 0xe8a3eb4CbEFF970eBd44e862f788C4CDB64009c1', - │ └─ 0x367a80d6704d73c6777aae2c7ed880a0536520df2d3a3f3a3a17d22925842833', - │ ├─ weight: 1 - address: 0x2C170AfE2D6c8489e4A272370DA494856E39BBDb', - │ └─ weight: 1 - address: 0x6c32dd456D1DD14d91739f777D37378D243AfF93', - └─ 0x6b8ac6478e09f9c92bed9532e1bdb2a2eefcfad542a6d5573bb16df0e50f7bdb', - ├─ 0x7206ea506e442d2a7ca309d52e4ebe6f0b8982261dbd45e87490bd86cfe77a2a', - │ ├─ weight: 1 - address: 0x72D0f36D4a0f18E22E7Ffd955C69C55D632d13Ae', - │ └─ weight: 1 - address: 0xfa79D7198d04b384735b8a24dE92014ECD59f777', - └─ weight: 1 - address: 0xFE3de6DF80c5890bAdBC24c1b4256A6c6E311933' - */ - - const decoded = decodeSignature(sampleSignature2) - - expect(decoded).to.deep.equal({ - version: 2, - type: SignatureType.Legacy, - decoded: { - threshold: 2, - checkpoint: 1667830665, - tree: { - left: { - left: { - nodeHash: '0x4a062f86183c9d46e129f0331f2a42f6ba22a3525a46ecd197fa23d177d75f2d' - }, - right: { - left: { - nodeHash: '0x3fce59919d0a4ee44a8066a3b1d0083760d89a06ae89edadf8a58e0e5c5ac504' - }, - right: { - left: { - left: { - address: '0x6FFEcCF6F31e0a469D55DEdE5651D34A6ECd9FC5', - weight: 1 - }, - right: { - // signature for: 0xE8D34A3999375ef56CD8eB41AC678f5332F7F223 - signature: - '0x7052a0438a13da22242bcd20c219630d839c364cd2b6042add1bee32774c37d72ba2ace8b7a79c95a536d4c0fed3fe05883c6e1188a4191a91623a903e4ec21c1b02', - weight: 1, - unrecovered: true, - isDynamic: false - } - }, - right: { - nodeHash: '0xad5831467806b6edd059ff5ac9809f2bb6e80512ceb5d466a67251ffb842fae1' - } - } - } - }, - right: { - left: { - left: { - nodeHash: '0x14b729622595218cdbef06c630daeea028e25e8ca048d97bc170d75feb9066ad' - }, - right: { - left: { - nodeHash: '0x0c8c0bb7e8c5ec8eed444ae25f3a1796597bcfacf5f6b758ae4fadd6fc416f56' - }, - right: { - left: { - // signature for: 0x3B69bC115e6D79E8adBD011020676750B169bEDd - signature: - '0xe7618f1b7b012d7fc48f518f498bb6823dc2a8308984287501873cb535b6d5bf526fb91a220297f461ac5a2434d0e8e768c3bf166c329366ddc885bf2e1676271c02', - weight: 1, - unrecovered: true, - isDynamic: false - }, - right: { - address: '0x4ef7Ec718f66ae3920ea119b9d7DDF39337601f7', - weight: 1 - } - } - } - }, - right: { - nodeHash: '0xfdea4c5fb23fb3cc2b2360057abef1ff7e7195acbdc4db555c27cc588a4585a6' - } - } - } - } - }) - }) - - it('Decode non-trimmed 3/N with 16 signers', () => { - /** - 0x0bd27b4a9a6a160ae92f5dc27a5d20156e81b049e451cc226db03be9454a9dbe', - ├─ 0xa9b9bb8f341ef4cba67d42b2c588d99f700a451f208d1d7ecb23d017ab23c3c5', - │ ├─ 0x24ac1effef0566192cd4ad878bc135c7d649b4989507f284fe5c66dae01117d3', - │ │ ├─ 0x67dff26d956ede906bbd0692a0cd573a78c7e345d54ccc93e2383337b4a46660', - │ │ │ ├─ weight: 1 - address: 0xA653F5900Ef5c538142Cd8Aef1CE750390B29a3E', - │ │ │ └─ weight: 1 - address: 0xA54e174d851bCFFE8C1332C00e23156B4982204D', - │ │ └─ 0x211bbe1253185da2e1f353cfb210c48378521ebfb3e103e18459e6aa9143848f', - │ │ ├─ weight: 1 - address: 0xDdfbA5791dE0b8Da80d46B43915Ae34C4876C4F8', - │ │ └─ weight: 1 - address: 0xF50834aa68DEc4D9D151b1ff1c509C81431DDC45', - │ └─ 0x0888e3e8bb7be34c21de30730e8f9cd91d03222bfea229eeabab03f3aa2183e0', - │ ├─ 0x360fe86d2a78344c383256a5509dac30c5046dd38cf6bfc54a880ac4f7e604ed', - │ │ ├─ weight: 1 - address: 0xe8e7C96aF0D472a8D0E60E86009a97290Fbc0F6d', - │ │ └─ weight: 1 - address: 0x88a175d23b41252823e7fD88297754f5C580c4Ff', - │ └─ 0x1235b94db1f48cebb5ebec7d345033d92801312f13086c1a79d032e703525bea', - │ ├─ weight: 1 - address: 0x653cA45307922091337376Cb305485c0D889A7A1', - │ └─ weight: 1 - address: 0xCf8BF768E2b69953577e1FF16b147c773faEc959', - └─ 0x86c8fbddf975589fecf3e2a5a543a916dedcf80aeb12f32abc26586110449059', - ├─ 0xcb4f6042dd1421bc59313c5a8e806514c2fbad361e706e6ec36a4dd6b815e03a', - │ ├─ 0x63fa3b020293428bfee299769b520e08641c66299922077cc91abd2ff31920f6', - │ │ ├─ weight: 1 - address: 0xa18522682c76e7e4083fCEF379839347a533f782', - │ │ └─ weight: 1 - address: 0x59d7eb9085272AdB317893Df26E7F39dCfdDa1bA', - │ └─ 0x4dc9c2311b9bfddc117ef646088b22d4a9548d9651a93c8246f7ad33acdf9431', - │ ├─ weight: 1 - address: 0xC31Ee68141cB47d2B260fE5A6e48b37d021D8F19', - │ └─ weight: 1 - address: 0x947EE7254D4dE72F7A1B2e70ed3f8E8aE6510D77', - └─ 0x7fe1e93c3a299dd8f6ebc06d4c94e5df6423b4ce919367f83f8c672e5e17cba8', - ├─ 0x8d0659c89c7f8de17801cf0178f4d32550b095187afac0d6b733797af881b41b', - │ ├─ weight: 1 - address: 0xb92E451800D78AA8f8492fFEA1a5afc77774f880', - │ └─ weight: 1 - address: 0xCE1977029e9398Ec9F45327c81cf7a557F5D30b8', - └─ 0xe4eaf15623516afc250692b6f8888be93638077ae5c78d95b01b7bf99b56cb67', - ├─ weight: 1 - address: 0x0b6a69349728615d6e1C8d4FD133e49AafD5b91b', - └─ weight: 1 - address: 0x8245B0c0C4319523c2D2616F86EBd02DaDA2FBD3' - */ - - const decoded = decodeSignature(sampleSignature3) - - expect(decoded).to.deep.equal({ - version: 2, - type: SignatureType.Legacy, - decoded: { - checkpoint: 1667831412, - threshold: 3, - tree: { - left: { - left: { - left: { - left: { - address: '0xA653F5900Ef5c538142Cd8Aef1CE750390B29a3E', - weight: 1 - }, - right: { - address: '0xA54e174d851bCFFE8C1332C00e23156B4982204D', - weight: 1 - } - }, - right: { - left: { - address: '0xDdfbA5791dE0b8Da80d46B43915Ae34C4876C4F8', - weight: 1 - }, - right: { - address: '0xF50834aa68DEc4D9D151b1ff1c509C81431DDC45', - weight: 1 - } - } - }, - right: { - left: { - left: { - address: '0xe8e7C96aF0D472a8D0E60E86009a97290Fbc0F6d', - weight: 1 - }, - right: { - address: '0x88a175d23b41252823e7fD88297754f5C580c4Ff', - weight: 1 - } - }, - right: { - left: { - address: '0x653cA45307922091337376Cb305485c0D889A7A1', - weight: 1 - }, - right: { - // address: '0xCf8BF768E2b69953577e1FF16b147c773faEc959', - signature: - '0xd9b2a3142267255c50581c8023648916a3e8c3ae7ca50f6752b6874a20e76e496b30c4e1b653691b3ae9fea40a66966f3d1f2a35cedb52fbf07ae09269fb3c8e1b02', - isDynamic: false, - unrecovered: true, - weight: 1 - } - } - } - }, - right: { - left: { - left: { - left: { - address: '0xa18522682c76e7e4083fCEF379839347a533f782', - weight: 1 - }, - right: { - address: '0x59d7eb9085272AdB317893Df26E7F39dCfdDa1bA', - weight: 1 - } - }, - right: { - left: { - address: '0xC31Ee68141cB47d2B260fE5A6e48b37d021D8F19', - weight: 1 - }, - right: { - address: '0x947EE7254D4dE72F7A1B2e70ed3f8E8aE6510D77', - weight: 1 - } - } - }, - right: { - left: { - left: { - // address: '0xb92E451800D78AA8f8492fFEA1a5afc77774f880', - signature: - '0x47f646e6d13434b2df65fc1ab9086264bed1030e485e3513ed01686d03d127df510efc468bbeedde677c3af1fda7b0dbffc7186e07203eb09718cc256cf6b5d11b02', - unrecovered: true, - isDynamic: false, - weight: 1 - }, - right: { - address: '0xCE1977029e9398Ec9F45327c81cf7a557F5D30b8', - weight: 1 - } - }, - right: { - left: { - address: '0x0b6a69349728615d6e1C8d4FD133e49AafD5b91b', - weight: 1 - }, - right: { - // address: '0x8245B0c0C4319523c2D2616F86EBd02DaDA2FBD3', - signature: - '0xaaac151a6ad4bf7f966db203164551a7c3c3969d15666dd2c75202231623f5ee2059711c84d2f216126bf3dc6cc63223eba079262e73c58da4f97583747c790b1c02', - unrecovered: true, - isDynamic: false, - weight: 1 - } - } - } - } - } - } - }) - }) - - it('Decode signature with nested trees', () => { - /** - 0xc62c3d8ab0422ccbab7339f13b987179c2583743b8af4728cd49b146c710c5c6', - ├─ 0xf6dc189f16bb65c588ccd5c63aa805bcbeb6e90dd8a049cfba0936050f299087', - │ ├─ 0x59276a9b2f7b735fd033d13fdfcf01391f6c112dc48418107c47faa292cda138', - │ │ ├─ 0x52b68b273da79cbad184ab5dc8e89825b373ab9af6ee97e0c556d3829126ba7c', - │ │ │ ├─ weight: 1 - address: 0xb159d82f98490c5Db1dB71b76bbb2C3a86DEce0C', - │ │ │ └─ weight: 1 - address: 0x29Fc57a0eb82688ad558A572C9E23e94243dB4d3', - │ │ └─ weight: 1 - address: 0x0B2b3abA8538639E6D9c1B1200942FA00148ABCB', - │ └─ weight: 1 - address: 0x3314715F5EE607A8988EC4c43351910CD6c76AE5', - └─ 0xd9b2fcc7c63fceaea59b7423cfda5e01307139ac078c2a1695fef1f9a4d9f50a', - └─ threshold: 2 - weight: 4', - ├─ 0x3c8cb8e47389edeee921bdb2efa8a8e664ef38790cfb4230ee51d5314e3a37d3', - │ ├─ 0x7c989a96925302993812c1ec3924bce3ba2ca0e8f7e3655e30f5b24d965aa18b', - │ │ ├─ weight: 1 - address: 0x711dD9c6D02010ABEfd5a4587298CB6a230d3877', - │ │ └─ weight: 1 - address: 0x05ead11721299d471d4e83b51ebfeB87F24A96c5', - │ └─ 0xfeac20f352af0c03f48d1eaeeacbde8e86b391bf97dd83665c218271da447be2', - │ ├─ weight: 1 - address: 0x4Faade320BBE1B9E31803A8A104305c3B5D5cC7E', - │ └─ weight: 1 - address: 0xE403b05AA84848604B40aFDbfE4977e9Be4ECCa9', - └─ weight: 1 - address: 0x907c144D2490f49838c6499507EE5914f4A22b5B' - */ - - const decoded = decodeSignature(sampleSignature4) - - expect(decoded).to.deep.equal({ - version: 2, - type: SignatureType.Legacy, - decoded: { - threshold: 1, - checkpoint: 2, - tree: { - left: { - nodeHash: '0xf6dc189f16bb65c588ccd5c63aa805bcbeb6e90dd8a049cfba0936050f299087' - }, - right: { - weight: 4, - threshold: 2, - tree: { - left: { - left: { - nodeHash: '0x7c989a96925302993812c1ec3924bce3ba2ca0e8f7e3655e30f5b24d965aa18b' - }, - right: { - left: { - signature: - '0xa73ce16a9cc7075c18bd2b4fd2649812fecb51460353a55bf62f821bf884443a169e0d0e04113d7ef2c2d15f1ecf46531f291259542065c556f0e721a82b3c581b02', - weight: 1, - unrecovered: true, - isDynamic: false - }, - right: { - signature: - '0x93f1f388009f68763df43632153155960ea6604723bb517e90788822ff21e38722be4387e8f67c0db677b74d9a0c2a804183e6a3eebd2ba53dbfc54432f1a10f1b02', - weight: 1, - unrecovered: true, - isDynamic: false - } - } - }, - right: { - address: '0x907c144D2490f49838c6499507EE5914f4A22b5B', - weight: 1 - } - } - } - } - } - }) - }) - - it('Decode static subdigests signature', () => { - /* - 0xd039f8f363eec6e6580c04fba1dfa1a7586827d884cb4d98ed667e131a01c268', - ├─ 0x73c9ee2e965c95b829c86ef4849dbf2f0410f4ac4380d2fc58f9246f9d84d0d0', - │ ├─ 0x73b96511a817fcf95200cd76af547a767c2faea2d52aa9e759f2a8ced75c7c67', - │ │ ├─ 0x9be568b9b969ab8d1012696c56ff89db394dcac9881bef5e361a4ffed446d6f6', - │ │ │ ├─ 0x1915fb45c54b103485bf50f1afb0fa6a70c1546211c48d15480ecc991765ba7f', - │ │ │ │ ├─ X 0x2b4c067647ee1f154214b4ad83bbbe7e57a528ca0df587e34ded382ca7348c10', - │ │ │ │ │ ├─ 0xd82efd7c2419e1ce6ec9de6f51051f6376773cd727c032cd15823755f19e4356', - │ │ │ │ │ │ ├─ subDigest: 0xd151a051d91288c5c5f4688ec5c6f0977f41535747293bcdc6859885e2e3c8f9', - │ │ │ │ │ │ └─ subDigest: 0x746fba99dcf684e2b9eb7dceace9d00b1988c5ad13fb46bb7c6272b8dac15821', - │ │ │ │ │ └─ 0xbff3206ad6a9cb35896c77f154b2aa4f72b709c9f4ec756d0da521163b3bcb61', - │ │ │ │ │ ├─ subDigest: 0xd5f94f3099a2c78c8687c81e7e29a2193a7003383989be621ab864efead521dc', - │ │ │ │ │ └─ subDigest: 0x6f5f1a3fb35d99dbf84a5f23713fd168231dddf6589a990378b83cf03f02d9f0', - │ │ │ │ └─ 0x798573e5ebb023632eafafce765fe8227f302a6db5e4c123a5a997c593471749', - │ │ │ │ ├─ X 0xc702696d354063d18d750cc686a1f356e503f85516c54375ef5878250a227587', - │ │ │ │ │ ├─ subDigest: 0xced8ceaa611754f0824a3066c4e53a1e78113dad5d8c63985b076eba2912bf09', - │ │ │ │ │ └─ subDigest: 0x00b43843c7c77215b123e3471be7532c64180d872e2dd68cd739bb7f1bcca725', - │ │ │ │ └─ 0x47344ce248ff726cf13c68d1e4bb7f2ab3a0b52d0668e240ed0925877ac62a88', - │ │ │ │ ├─ -> subDigest: 0x4cd7065b01927d3429db64e0a7ec956fa5506dab23fa37c767eb4375fab7898b', - │ │ │ │ └─ X (hashed) subDigest: 0xc0b21c4464a6acf6d8451d3a077bb3ebaa3953bd2e01609dec557af47239c012', - │ │ │ └─ X 0x02c10a9634e89b4293346a7408364eeece764491bd465d043f7c826518c2bc95', - │ │ │ ├─ subDigest: 0xae6b3762bab90dcc5eccbb3a8d1f5f8d9d974b2458403779ff998636c99ec15e', - │ │ │ └─ subDigest: 0x5c9de17d821a60f691929cd6d475d155a27e4d3ce0c79b4412a8e5e50c0e4f1e', - │ │ └─ X weight: 1 - address: 0x1A9bD9f98E2C0C81BcF51DA26c3a7CFcC18c43B4', - │ └─ X 0x0c389524f715de03757bcbc7a084f52c5d54def431bb8080a18d0075e26b859c', - │ ├─ weight: 1 - address: 0xEdAE5e1bF8D80e20C9008479A07400e84BC1af9D', - │ └─ weight: 1 - address: 0xBf31A9f466Fc2844CDE7F12c87dc3e6676c8D0b2', - └─ X weight: 1 - address: 0x379b2A7A384376B420D3D19c5c5717ABAaD3a969' - */ - const decoded = decodeSignature(sampleSignature5) - - expect(decoded).to.deep.equal({ - version: 2, - type: SignatureType.NoChainIdDynamic, - decoded: { - threshold: 1, - checkpoint: 1667902589, - tree: { - left: { - left: { - left: { - left: { - left: { - nodeHash: '0x2b4c067647ee1f154214b4ad83bbbe7e57a528ca0df587e34ded382ca7348c10' - }, - right: { - left: { - nodeHash: '0xc702696d354063d18d750cc686a1f356e503f85516c54375ef5878250a227587' - }, - right: { - left: { - subdigest: '0x4cd7065b01927d3429db64e0a7ec956fa5506dab23fa37c767eb4375fab7898b' - }, - right: { - nodeHash: '0x2acf6636e813600f741841733e57a7e0cb4131f3c68db7ba7014fb94525f5de2' - } - } - } - }, - right: { - nodeHash: '0x02c10a9634e89b4293346a7408364eeece764491bd465d043f7c826518c2bc95' - } - }, - right: { - address: '0x1A9bD9f98E2C0C81BcF51DA26c3a7CFcC18c43B4', - weight: 1 - } - }, - right: { - nodeHash: '0x0c389524f715de03757bcbc7a084f52c5d54def431bb8080a18d0075e26b859c' - } - }, - right: { - address: '0x379b2A7A384376B420D3D19c5c5717ABAaD3a969', - weight: 1 - } - } - } - }) - }) - - it('Decode dynamic signatures', () => { - /* - 0xe916ef5f1e4c38acd77f793ab9fe6696272541dce1fc84ffb712e2faccd4be07', - ├─ 0x8554edff027c3cb80d02e3e233a778c85165fbc2c813e8b4148339f8cda1cfd1', - │ ├─ 0xd871650a4a126ee8112934486f91f28f4da3e64474d66c778d1f2bd84b6f9ec7', - │ │ ├─ weight: 1 - address: 0x2093ec341be249BAA0c8aFA35fEF368a90a48390', - │ │ └─ weight: 1 - address: 0xCd907CF455A1A00a4ebE37Ef5F4BB7aBc3770A69', - │ └─ weight: 1 - address: 0x4bfFABff5819087514d8dB622543c3d0d89cD64D', - └─ weight: 1 - address: 0xe8C4a6EB40EcE266C7a58670493eE0727be4D20A' - */ - - const decoded = decodeSignature(sampleSignature6) - - expect(decoded).to.deep.equal({ - version: 2, - type: SignatureType.Dynamic, - decoded: { - threshold: 2, - checkpoint: 1667904421, - tree: { - left: { - left: { - left: { - address: '0x2093ec341be249BAA0c8aFA35fEF368a90a48390', - weight: 1 - }, - right: { - address: '0xCd907CF455A1A00a4ebE37Ef5F4BB7aBc3770A69', - signature: - '0x28230cc5c4ee221c093054fef22c12d534f4d63782bc94a160c2f781cef142e019b84d82070b67cb750ec9ba46ae49e6687591810099f6e58811fbe35ea3db451c02', - weight: 1, - isDynamic: true, - unrecovered: true - } - }, - right: { - address: '0x4bfFABff5819087514d8dB622543c3d0d89cD64D', - signature: - '0x844e002b27098ba6144bc9eb7950cd20a4062d265bdd042bffbb7ec8405caf7f60f1c5bdcd8ea4f4acee17d5ac9eac6bcdb40a20a41796d40a153278ab062b211c02', - weight: 1, - isDynamic: true, - unrecovered: true - } - }, - right: { - address: '0xe8C4a6EB40EcE266C7a58670493eE0727be4D20A', - weight: 1 - } - } - } - }) - }) - - it('Fail to decode invalid signature part type', () => { - const invalidSignature = ethers.solidityPacked( - ['bytes', 'uint8'], - ['0x0001ffffffff', Object.keys(SignaturePartType).length / 2] - ) - - expect(() => decodeSignature(invalidSignature)).to.throw( - `Unknown signature part type: ${Object.keys(SignaturePartType).length / 2}: 0x` - ) - }) - - it('Fail to decode empty tree signature', () => { - const invalidSignature = '0x0001ffffffff' - - expect(() => decodeSignature(invalidSignature)).to.throw('Empty signature tree') - }) - }) - - describe('Encode signatures', () => { - describe('Encode decoded signatures', () => { - it('Re-encode simple signature', () => { - const decoded = decodeSignature(sampleSignature1) - const reEncoded = encodeSignature(decoded) - expect(reEncoded).to.equal(sampleSignature1) - expect(decoded).to.deep.equal(decodeSignature(reEncoded)) - }) - - it('Re-encode trimmed 2/N with 31 signers', () => { - const decoded = decodeSignature(sampleSignature2) - const reEncoded = encodeSignature(decoded) - - expect(decoded).to.deep.equal(decodeSignature(reEncoded)) - expect(reEncoded).to.equal(sampleSignature2) - }) - - it('Re-encode non-trimmed 3/N with 16 signers', () => { - const decoded = decodeSignature(sampleSignature3) - const reEncoded = encodeSignature(decoded) - - expect(decoded).to.deep.equal(decodeSignature(reEncoded)) - expect(reEncoded).to.equal(sampleSignature3) - }) - - it('Re-encode signature with nested trees', () => { - const decoded = decodeSignature(sampleSignature4) - const reEncoded = encodeSignature(decoded) - - expect(decoded).to.deep.equal(decodeSignature(reEncoded)) - expect(reEncoded).to.equal(sampleSignature4) - }) - - it('Re-encode static subdigests signature', () => { - const decoded = decodeSignature(sampleSignature5) - const reEncoded = encodeSignature(decoded) - - expect(decoded).to.deep.equal(decodeSignature(reEncoded)) - expect(reEncoded).to.equal(sampleSignature5) - }) - - it('Re-encode dynamic signatures', () => { - const decoded = decodeSignature(sampleSignature6) - const reEncoded = encodeSignature(decoded) - - expect(decoded).to.deep.equal(decodeSignature(reEncoded)) - expect(reEncoded).to.equal(sampleSignature6) - }) - }) - }) -}) diff --git a/old/packages/deployer/.gitignore b/old/packages/deployer/.gitignore deleted file mode 100644 index b8e5877ec..000000000 --- a/old/packages/deployer/.gitignore +++ /dev/null @@ -1,4 +0,0 @@ -config/PROD.env -cache -artifacts/build-info -artifacts/**/*.dbg.json diff --git a/old/packages/deployer/CHANGELOG.md b/old/packages/deployer/CHANGELOG.md deleted file mode 100644 index fffed2b5b..000000000 --- a/old/packages/deployer/CHANGELOG.md +++ /dev/null @@ -1,2923 +0,0 @@ -# @0xsequence/deployer - -## 2.3.8 - -### Patch Changes - -- indexer: update clients -- Updated dependencies - - @0xsequence/utils@2.3.8 - -## 2.3.7 - -### Patch Changes - -- Metadata updates -- Updated dependencies - - @0xsequence/utils@2.3.7 - -## 2.3.6 - -### Patch Changes - -- New chains -- Updated dependencies - - @0xsequence/utils@2.3.6 - -## 2.3.5 - -### Patch Changes - -- Add Frequency Testnet -- Updated dependencies - - @0xsequence/utils@2.3.5 - -## 2.3.4 - -### Patch Changes - -- metadata: exclude deprecated methods on rpc client -- Updated dependencies - - @0xsequence/utils@2.3.4 - -## 2.3.3 - -### Patch Changes - -- metadata: client update -- Updated dependencies - - @0xsequence/utils@2.3.3 - -## 2.3.2 - -### Patch Changes - -- metadata: update rpc client -- Updated dependencies - - @0xsequence/utils@2.3.2 - -## 2.3.1 - -### Patch Changes - -- indexer: update rpc client -- Updated dependencies - - @0xsequence/utils@2.3.1 - -## 2.3.0 - -### Minor Changes - -- update metadata rpc client - -### Patch Changes - -- Updated dependencies - - @0xsequence/utils@2.3.0 - -## 2.2.15 - -### Patch Changes - -- API updates -- Updated dependencies - - @0xsequence/utils@2.2.15 - -## 2.2.14 - -### Patch Changes - -- Somnia Testnet and Monad Testnet -- Updated dependencies - - @0xsequence/utils@2.2.14 - -## 2.2.13 - -### Patch Changes - -- Add XR1 to all networks -- Updated dependencies - - @0xsequence/utils@2.2.13 - -## 2.2.12 - -### Patch Changes - -- Add XR1 -- Updated dependencies - - @0xsequence/utils@2.2.12 - -## 2.2.11 - -### Patch Changes - -- Relayer updates -- Updated dependencies - - @0xsequence/utils@2.2.11 - -## 2.2.10 - -### Patch Changes - -- Etherlink support -- Updated dependencies - - @0xsequence/utils@2.2.10 - -## 2.2.9 - -### Patch Changes - -- Indexer gateway native token balances -- Updated dependencies - - @0xsequence/utils@2.2.9 - -## 2.2.8 - -### Patch Changes - -- Add Moonbeam and Moonbase Alpha -- Updated dependencies - - @0xsequence/utils@2.2.8 - -## 2.2.7 - -### Patch Changes - -- Update Builder package -- Updated dependencies - - @0xsequence/utils@2.2.7 - -## 2.2.6 - -### Patch Changes - -- Update relayer package -- Updated dependencies - - @0xsequence/utils@2.2.6 - -## 2.2.5 - -### Patch Changes - -- auth: fix sequence indexer gateway url -- account: immutable wallet proxy hook -- Updated dependencies -- Updated dependencies - - @0xsequence/utils@2.2.5 - -## 2.2.4 - -### Patch Changes - -- network: update soneium mainnet block explorer url -- waas: signTypedData intent support -- Updated dependencies -- Updated dependencies - - @0xsequence/utils@2.2.4 - -## 2.2.3 - -### Patch Changes - -- provider: updating initWallet to use connected network configs if they exist -- Updated dependencies - - @0xsequence/utils@2.2.3 - -## 2.2.2 - -### Patch Changes - -- pass projectAccessKey to relayer at all times -- Updated dependencies - - @0xsequence/utils@2.2.2 - -## 2.2.1 - -### Patch Changes - -- waas-ethers: sign typed data -- Updated dependencies - - @0xsequence/utils@2.2.1 - -## 2.2.0 - -### Minor Changes - -- indexer: gateway client -- @0xsequence/builder -- upgrade puppeteer to v23.10.3 - -### Patch Changes - -- Updated dependencies -- Updated dependencies -- Updated dependencies - - @0xsequence/utils@2.2.0 - -## 2.1.8 - -### Patch Changes - -- Add Soneium Mainnet -- Updated dependencies - - @0xsequence/utils@2.1.8 - -## 2.1.7 - -### Patch Changes - -- guard: pass project access key to guard requests -- Updated dependencies - - @0xsequence/utils@2.1.7 - -## 2.1.6 - -### Patch Changes - -- Add LAOS and Telos Testnet chains -- Updated dependencies - - @0xsequence/utils@2.1.6 - -## 2.1.5 - -### Patch Changes - -- account: save presigned configuration with reference chain id 1 -- Updated dependencies - - @0xsequence/utils@2.1.5 - -## 2.1.4 - -### Patch Changes - -- provider: pass projectAccessKey into MuxMessageProvider -- Updated dependencies - - @0xsequence/utils@2.1.4 - -## 2.1.3 - -### Patch Changes - -- waas: time drift date fix due to strange browser quirk -- Updated dependencies - - @0xsequence/utils@2.1.3 - -## 2.1.2 - -### Patch Changes - -- provider: export analytics correctly -- Updated dependencies - - @0xsequence/utils@2.1.2 - -## 2.1.1 - -### Patch Changes - -- Add LAOS chain support -- Updated dependencies - - @0xsequence/utils@2.1.1 - -## 2.1.0 - -### Minor Changes - -- account: forward project access key when estimating fees and sending transactions - -### Patch Changes - -- sessions: save signatures with reference chain id -- Updated dependencies -- Updated dependencies - - @0xsequence/utils@2.1.0 - -## 2.0.26 - -### Patch Changes - -- account: fix chain id comparison -- Updated dependencies - - @0xsequence/utils@2.0.26 - -## 2.0.25 - -### Patch Changes - -- skale-nebula: deploy gas limit = 10m -- Updated dependencies - - @0xsequence/utils@2.0.25 - -## 2.0.24 - -### Patch Changes - -- sessions: arweave: configurable gateway url -- waas: use /status to get time drift before sending any intents -- Updated dependencies -- Updated dependencies - - @0xsequence/utils@2.0.24 - -## 2.0.23 - -### Patch Changes - -- Add The Root Network support -- Updated dependencies - - @0xsequence/utils@2.0.23 - -## 2.0.22 - -### Patch Changes - -- Add SKALE Nebula Mainnet support -- Updated dependencies - - @0xsequence/utils@2.0.22 - -## 2.0.21 - -### Patch Changes - -- account: add publishWitnessFor -- Updated dependencies - - @0xsequence/utils@2.0.21 - -## 2.0.20 - -### Patch Changes - -- upgrade deps, and improve waas session status handling -- Updated dependencies - - @0xsequence/utils@2.0.20 - -## 2.0.19 - -### Patch Changes - -- Add Immutable zkEVM support -- Updated dependencies - - @0xsequence/utils@2.0.19 - -## 2.0.18 - -### Patch Changes - -- waas: new contractCall transaction type -- sessions: add arweave owner -- Updated dependencies -- Updated dependencies - - @0xsequence/utils@2.0.18 - -## 2.0.17 - -### Patch Changes - -- update waas auth to clear session before signIn -- Updated dependencies - - @0xsequence/utils@2.0.17 - -## 2.0.16 - -### Patch Changes - -- Removed Astar chains -- Updated dependencies - - @0xsequence/utils@2.0.16 - -## 2.0.15 - -### Patch Changes - -- indexer: update bindings with token balance additions -- Updated dependencies - - @0xsequence/utils@2.0.15 - -## 2.0.14 - -### Patch Changes - -- sessions: arweave config reader -- network: add b3 and apechain mainnet configs -- Updated dependencies -- Updated dependencies - - @0xsequence/utils@2.0.14 - -## 2.0.13 - -### Patch Changes - -- network: toy-testnet -- Updated dependencies - - @0xsequence/utils@2.0.13 - -## 2.0.12 - -### Patch Changes - -- api: update bindings -- Updated dependencies - - @0xsequence/utils@2.0.12 - -## 2.0.11 - -### Patch Changes - -- waas: intents test fix -- api: update bindings -- Updated dependencies -- Updated dependencies - - @0xsequence/utils@2.0.11 - -## 2.0.10 - -### Patch Changes - -- network: soneium minato testnet -- Updated dependencies - - @0xsequence/utils@2.0.10 - -## 2.0.9 - -### Patch Changes - -- network: fix SKALE network name -- Updated dependencies - - @0xsequence/utils@2.0.9 - -## 2.0.8 - -### Patch Changes - -- metadata: update bindings -- Updated dependencies - - @0xsequence/utils@2.0.8 - -## 2.0.7 - -### Patch Changes - -- wallet request handler fix -- Updated dependencies - - @0xsequence/utils@2.0.7 - -## 2.0.6 - -### Patch Changes - -- network: matic -> pol -- Updated dependencies - - @0xsequence/utils@2.0.6 - -## 2.0.5 - -### Patch Changes - -- provider: update databeat to 0.9.2 -- Updated dependencies - - @0xsequence/utils@2.0.5 - -## 2.0.4 - -### Patch Changes - -- network: add skale-nebula-testnet -- Updated dependencies - - @0xsequence/utils@2.0.4 - -## 2.0.3 - -### Patch Changes - -- waas: check session status in SequenceWaaS.isSignedIn() -- Updated dependencies - - @0xsequence/utils@2.0.3 - -## 2.0.2 - -### Patch Changes - -- sessions: property convert serialized bignumber hex value to bigint -- Updated dependencies - - @0xsequence/utils@2.0.2 - -## 2.0.1 - -### Patch Changes - -- waas: http signature check for authenticator requests -- provider: unwrap legacy json rpc responses -- use json replacer and reviver for bigints -- Updated dependencies -- Updated dependencies -- Updated dependencies - - @0xsequence/utils@2.0.1 - -## 2.0.0 - -### Major Changes - -- ethers v6 - -### Patch Changes - -- Updated dependencies - - @0xsequence/utils@2.0.0 - -## 1.10.15 - -### Patch Changes - -- utils: extractProjectIdFromAccessKey -- Updated dependencies - - @0xsequence/utils@1.10.15 - -## 1.10.14 - -### Patch Changes - -- network: add borne-testnet to allNetworks -- Updated dependencies - - @0xsequence/utils@1.10.14 - -## 1.10.13 - -### Patch Changes - -- network: add borne testnet -- Updated dependencies - - @0xsequence/utils@1.10.13 - -## 1.10.12 - -### Patch Changes - -- api: update bindings -- global/window -> globalThis -- Updated dependencies -- Updated dependencies - - @0xsequence/utils@1.10.12 - -## 1.10.11 - -### Patch Changes - -- waas: updated intent.gen without webrpc types, errors exported from authenticator.gen -- Updated dependencies - - @0xsequence/utils@1.10.11 - -## 1.10.10 - -### Patch Changes - -- metadata: update bindings with new contract collections api -- Updated dependencies - - @0xsequence/utils@1.10.10 - -## 1.10.9 - -### Patch Changes - -- waas minor update -- Updated dependencies - - @0xsequence/utils@1.10.9 - -## 1.10.8 - -### Patch Changes - -- update metadata bindings -- Updated dependencies - - @0xsequence/utils@1.10.8 - -## 1.10.7 - -### Patch Changes - -- minor fixes to waas client -- Updated dependencies - - @0xsequence/utils@1.10.7 - -## 1.10.6 - -### Patch Changes - -- metadata: update bindings -- Updated dependencies - - @0xsequence/utils@1.10.6 - -## 1.10.5 - -### Patch Changes - -- network: ape-chain-testnet -> apechain-testnet -- Updated dependencies - - @0xsequence/utils@1.10.5 - -## 1.10.4 - -### Patch Changes - -- network: add b3-sepolia, ape-chain-testnet, blast, blast-sepolia -- Updated dependencies - - @0xsequence/utils@1.10.4 - -## 1.10.3 - -### Patch Changes - -- typing fix -- Updated dependencies - - @0xsequence/utils@1.10.3 - -## 1.10.2 - -### Patch Changes - -- - waas: add getIdToken method - - indexer: update api client -- Updated dependencies - - @0xsequence/utils@1.10.2 - -## 1.10.1 - -### Patch Changes - -- metadata: update bindings -- Updated dependencies - - @0xsequence/utils@1.10.1 - -## 1.10.0 - -### Minor Changes - -- waas release v1.3.0 - -### Patch Changes - -- Updated dependencies - - @0xsequence/utils@1.10.0 - -## 1.9.37 - -### Patch Changes - -- network: adds nativeToken data to NetworkMetadata constants -- Updated dependencies - - @0xsequence/utils@1.9.37 - -## 1.9.36 - -### Patch Changes - -- guard: export client -- Updated dependencies - - @0xsequence/utils@1.9.36 - -## 1.9.35 - -### Patch Changes - -- guard: update bindings -- Updated dependencies - - @0xsequence/utils@1.9.35 - -## 1.9.34 - -### Patch Changes - -- waas: always use lowercase email -- Updated dependencies - - @0xsequence/utils@1.9.34 - -## 1.9.33 - -### Patch Changes - -- waas: umd build -- Updated dependencies - - @0xsequence/utils@1.9.33 - -## 1.9.32 - -### Patch Changes - -- indexer: update bindings -- Updated dependencies - - @0xsequence/utils@1.9.32 - -## 1.9.31 - -### Patch Changes - -- metadata: token directory changes -- Updated dependencies - - @0xsequence/utils@1.9.31 - -## 1.9.30 - -### Patch Changes - -- update -- Updated dependencies - - @0xsequence/utils@1.9.30 - -## 1.9.29 - -### Patch Changes - -- disable gnosis chain -- Updated dependencies - - @0xsequence/utils@1.9.29 - -## 1.9.28 - -### Patch Changes - -- add utils/merkletree -- Updated dependencies - - @0xsequence/utils@1.9.28 - -## 1.9.27 - -### Patch Changes - -- network: optimistic -> optimism -- waas: remove defaults -- api, sessions: update bindings -- Updated dependencies -- Updated dependencies -- Updated dependencies - - @0xsequence/utils@1.9.27 - -## 1.9.26 - -### Patch Changes - -- - add backend interfaces for pluggable interfaces - - introduce @0xsequence/react-native - - update pnpm to lockfile v9 -- Updated dependencies - - @0xsequence/utils@1.9.26 - -## 1.9.25 - -### Patch Changes - -- update webrpc clients with new error types -- Updated dependencies - - @0xsequence/utils@1.9.25 - -## 1.9.24 - -### Patch Changes - -- waas: add memoryStore backend to localStore -- Updated dependencies - - @0xsequence/utils@1.9.24 - -## 1.9.23 - -### Patch Changes - -- update api client bindings -- Updated dependencies - - @0xsequence/utils@1.9.23 - -## 1.9.22 - -### Patch Changes - -- update metadata client bindings -- Updated dependencies - - @0xsequence/utils@1.9.22 - -## 1.9.21 - -### Patch Changes - -- api client bindings -- Updated dependencies - - @0xsequence/utils@1.9.21 - -## 1.9.20 - -### Patch Changes - -- api client bindings update -- Updated dependencies - - @0xsequence/utils@1.9.20 - -## 1.9.19 - -### Patch Changes - -- waas update -- Updated dependencies - - @0xsequence/utils@1.9.19 - -## 1.9.18 - -### Patch Changes - -- provider: prohibit dangerous functions -- Updated dependencies - - @0xsequence/utils@1.9.18 - -## 1.9.17 - -### Patch Changes - -- network: add xr-sepolia -- Updated dependencies - - @0xsequence/utils@1.9.17 - -## 1.9.16 - -### Patch Changes - -- waas: sequence.feeOptions -- Updated dependencies - - @0xsequence/utils@1.9.16 - -## 1.9.15 - -### Patch Changes - -- metadata: collection external_link field name fix -- Updated dependencies - - @0xsequence/utils@1.9.15 - -## 1.9.14 - -### Patch Changes - -- network: astar-zkatana -> astar-zkyoto -- network: deprecate polygon mumbai network -- network: add xai and polygon amoy -- Updated dependencies -- Updated dependencies -- Updated dependencies - - @0xsequence/utils@1.9.14 - -## 1.9.13 - -### Patch Changes - -- waas: fix @0xsequence/network dependency -- Updated dependencies - - @0xsequence/utils@1.9.13 - -## 1.9.12 - -### Patch Changes - -- indexer: update rpc bindings -- provider: signMessage: Serialize the BytesLike or string message into hexstring before sending -- waas: SessionAuthProof -- Updated dependencies -- Updated dependencies -- Updated dependencies - - @0xsequence/utils@1.9.12 - -## 1.9.11 - -### Patch Changes - -- metdata, update rpc bindings -- Updated dependencies - - @0xsequence/utils@1.9.11 - -## 1.9.10 - -### Patch Changes - -- update metadata rpc bindings -- Updated dependencies - - @0xsequence/utils@1.9.10 - -## 1.9.9 - -### Patch Changes - -- metadata, add SequenceCollections rpc client -- Updated dependencies - - @0xsequence/utils@1.9.9 - -## 1.9.8 - -### Patch Changes - -- waas client update -- Updated dependencies - - @0xsequence/utils@1.9.8 - -## 1.9.7 - -### Patch Changes - -- update rpc client bindings for api, metadata and relayer -- Updated dependencies - - @0xsequence/utils@1.9.7 - -## 1.9.6 - -### Patch Changes - -- waas package update -- Updated dependencies - - @0xsequence/utils@1.9.6 - -## 1.9.5 - -### Patch Changes - -- RpcRelayer prioritize project access key -- Updated dependencies - - @0xsequence/utils@1.9.5 - -## 1.9.4 - -### Patch Changes - -- waas: fix network dependency -- Updated dependencies - - @0xsequence/utils@1.9.4 - -## 1.9.3 - -### Patch Changes - -- provider: don't append access key to RPC url if user has already provided it -- Updated dependencies - - @0xsequence/utils@1.9.3 - -## 1.9.2 - -### Patch Changes - -- network: add xai-sepolia -- Updated dependencies - - @0xsequence/utils@1.9.2 - -## 1.9.1 - -### Patch Changes - -- analytics fix -- Updated dependencies - - @0xsequence/utils@1.9.1 - -## 1.9.0 - -### Minor Changes - -- waas release - -### Patch Changes - -- Updated dependencies - - @0xsequence/utils@1.9.0 - -## 1.8.8 - -### Patch Changes - -- update metadata bindings -- Updated dependencies - - @0xsequence/utils@1.8.8 - -## 1.8.7 - -### Patch Changes - -- provider: update databeat to 0.9.1 -- Updated dependencies - - @0xsequence/utils@1.8.7 - -## 1.8.6 - -### Patch Changes - -- guard: SignedOwnershipProof -- Updated dependencies - - @0xsequence/utils@1.8.6 - -## 1.8.5 - -### Patch Changes - -- guard: signOwnershipProof and isSignedOwnershipProof -- Updated dependencies - - @0xsequence/utils@1.8.5 - -## 1.8.4 - -### Patch Changes - -- network: add homeverse to networks list -- Updated dependencies - - @0xsequence/utils@1.8.4 - -## 1.8.3 - -### Patch Changes - -- api: introduce basic linked wallet support -- Updated dependencies - - @0xsequence/utils@1.8.3 - -## 1.8.2 - -### Patch Changes - -- provider: don't initialize analytics unless explicitly requested -- Updated dependencies - - @0xsequence/utils@1.8.2 - -## 1.8.1 - -### Patch Changes - -- update to analytics provider -- Updated dependencies - - @0xsequence/utils@1.8.1 - -## 1.8.0 - -### Minor Changes - -- provider: project analytics - -### Patch Changes - -- Updated dependencies - - @0xsequence/utils@1.8.0 - -## 1.7.2 - -### Patch Changes - -- 0xsequence: ChainId should not be exported as a type -- account, wallet: fix nonce selection -- Updated dependencies -- Updated dependencies - - @0xsequence/utils@1.7.2 - -## 1.7.1 - -### Patch Changes - -- network: add missing avalanche logoURI -- Updated dependencies - - @0xsequence/utils@1.7.1 - -## 1.7.0 - -### Minor Changes - -- provider: projectAccessKey is now required - -### Patch Changes - -- network: add NetworkMetadata.logoURI property for all networks -- Updated dependencies -- Updated dependencies - - @0xsequence/utils@1.7.0 - -## 1.6.3 - -### Patch Changes - -- network list update -- Updated dependencies - - @0xsequence/utils@1.6.3 - -## 1.6.2 - -### Patch Changes - -- auth: projectAccessKey option -- wallet: use 12 bytes for random space -- Updated dependencies -- Updated dependencies - - @0xsequence/utils@1.6.2 - -## 1.6.1 - -### Patch Changes - -- core: add simple config from subdigest support -- core: fix encode tree with subdigest -- account: implement buildOnChainSignature on Account -- Updated dependencies -- Updated dependencies -- Updated dependencies - - @0xsequence/utils@1.6.1 - -## 1.6.0 - -### Minor Changes - -- account, wallet: parallel transactions by default - -### Patch Changes - -- provider: emit disconnect on sign out -- Updated dependencies -- Updated dependencies - - @0xsequence/utils@1.6.0 - -## 1.5.0 - -### Minor Changes - -- signhub: add 'signing' signer status - -### Patch Changes - -- auth: Session.open: onAccountAddress callback -- account: allow empty transaction bundles -- Updated dependencies -- Updated dependencies -- Updated dependencies - - @0xsequence/utils@1.5.0 - -## 1.4.9 - -### Patch Changes - -- rename SequenceMetadataClient to SequenceMetadata -- Updated dependencies - - @0xsequence/utils@1.4.9 - -## 1.4.8 - -### Patch Changes - -- account: Account.getSigners -- Updated dependencies - - @0xsequence/utils@1.4.8 - -## 1.4.7 - -### Patch Changes - -- update indexer client bindings -- Updated dependencies - - @0xsequence/utils@1.4.7 - -## 1.4.6 - -### Patch Changes - -- - add sepolia networks, mark goerli as deprecated - - update indexer client bindings -- Updated dependencies - - @0xsequence/utils@1.4.6 - -## 1.4.5 - -### Patch Changes - -- indexer/metadata: update client bindings -- auth: selectWallet with new address -- Updated dependencies -- Updated dependencies - - @0xsequence/utils@1.4.5 - -## 1.4.4 - -### Patch Changes - -- indexer: update bindings -- auth: handle jwt expiry -- Updated dependencies -- Updated dependencies - - @0xsequence/utils@1.4.4 - -## 1.4.3 - -### Patch Changes - -- guard: return active status from GuardSigner.getAuthMethods -- Updated dependencies - - @0xsequence/utils@1.4.3 - -## 1.4.2 - -### Patch Changes - -- guard: update bindings -- Updated dependencies - - @0xsequence/utils@1.4.2 - -## 1.4.1 - -### Patch Changes - -- network: remove unused networks -- signhub: orchestrator interface -- guard: auth methods interface -- guard: update bindings for pin and totp -- guard: no more retry logic -- Updated dependencies -- Updated dependencies -- Updated dependencies -- Updated dependencies -- Updated dependencies - - @0xsequence/utils@1.4.1 - -## 1.4.0 - -### Minor Changes - -- project access key support - -### Patch Changes - -- Updated dependencies - - @0xsequence/utils@1.4.0 - -## 1.3.0 - -### Minor Changes - -- signhub: account children - -### Patch Changes - -- guard: do not throw when building deploy transaction -- network: snowtrace.io -> subnets.avax.network/c-chain -- Updated dependencies -- Updated dependencies -- Updated dependencies - - @0xsequence/utils@1.3.0 - -## 1.2.9 - -### Patch Changes - -- account: AccountSigner.sendTransaction simulateForFeeOptions -- relayer: update bindings -- Updated dependencies -- Updated dependencies - - @0xsequence/utils@1.2.9 - -## 1.2.8 - -### Patch Changes - -- rename X-Sequence-Token-Key header to X-Access-Key -- Updated dependencies - - @0xsequence/utils@1.2.8 - -## 1.2.7 - -### Patch Changes - -- add x-sequence-token-key to clients -- Updated dependencies - - @0xsequence/utils@1.2.7 - -## 1.2.6 - -### Patch Changes - -- Fix bind multicall provider -- Updated dependencies - - @0xsequence/utils@1.2.6 - -## 1.2.5 - -### Patch Changes - -- Multicall default configuration fixes -- Updated dependencies - - @0xsequence/utils@1.2.5 - -## 1.2.4 - -### Patch Changes - -- provider: Adding missing payment provider types to PaymentProviderOption -- provider: WalletRequestHandler.notifyChainChanged -- Updated dependencies -- Updated dependencies - - @0xsequence/utils@1.2.4 - -## 1.2.3 - -### Patch Changes - -- auth, provider: connect to accept optional authorizeNonce -- Updated dependencies - - @0xsequence/utils@1.2.3 - -## 1.2.2 - -### Patch Changes - -- provider: allow createContract calls -- core: check for explicit zero address in contract deployments -- Updated dependencies -- Updated dependencies - - @0xsequence/utils@1.2.2 - -## 1.2.1 - -### Patch Changes - -- auth: use sequence api chain id as reference chain id if available -- Updated dependencies - - @0xsequence/utils@1.2.1 - -## 1.2.0 - -### Minor Changes - -- split services from session, better local support - -### Patch Changes - -- Updated dependencies - - @0xsequence/utils@1.2.0 - -## 1.1.15 - -### Patch Changes - -- guard: remove error filtering -- Updated dependencies - - @0xsequence/utils@1.1.15 - -## 1.1.14 - -### Patch Changes - -- guard: add GuardSigner.onError -- Updated dependencies - - @0xsequence/utils@1.1.14 - -## 1.1.13 - -### Patch Changes - -- provider: pass client version with connect options -- provider: removing large from BannerSize -- Updated dependencies -- Updated dependencies - - @0xsequence/utils@1.1.13 - -## 1.1.12 - -### Patch Changes - -- provider: adding bannerSize to ConnectOptions -- Updated dependencies - - @0xsequence/utils@1.1.12 - -## 1.1.11 - -### Patch Changes - -- add homeverse configs -- Updated dependencies - - @0xsequence/utils@1.1.11 - -## 1.1.10 - -### Patch Changes - -- handle default EIP6492 on send -- Updated dependencies - - @0xsequence/utils@1.1.10 - -## 1.1.9 - -### Patch Changes - -- Custom default EIP6492 on client -- Updated dependencies - - @0xsequence/utils@1.1.9 - -## 1.1.8 - -### Patch Changes - -- metadata: searchMetadata: add types filter -- Updated dependencies - - @0xsequence/utils@1.1.8 - -## 1.1.7 - -### Patch Changes - -- adding signInWith connect settings option to allow dapps to automatically login their users with a certain provider optimizing the normal authentication flow -- Updated dependencies - - @0xsequence/utils@1.1.7 - -## 1.1.6 - -### Patch Changes - -- metadata: searchMetadata: add chainID and excludeTokenMetadata filters -- Updated dependencies - - @0xsequence/utils@1.1.6 - -## 1.1.5 - -### Patch Changes - -- account: re-compute meta-transaction id for wallet deployment transactions -- Updated dependencies - - @0xsequence/utils@1.1.5 - -## 1.1.4 - -### Patch Changes - -- network: rename base-mainnet to base -- provider: override isDefaultChain with ConnectOptions.networkId if provided -- Updated dependencies -- Updated dependencies - - @0xsequence/utils@1.1.4 - -## 1.1.3 - -### Patch Changes - -- provider: use network id from transport session -- provider: sign authorization using ConnectOptions.networkId if provided -- Updated dependencies -- Updated dependencies - - @0xsequence/utils@1.1.3 - -## 1.1.2 - -### Patch Changes - -- provider: jsonrpc chain id fixes -- Updated dependencies - - @0xsequence/utils@1.1.2 - -## 1.1.1 - -### Patch Changes - -- network: add base mainnet and sepolia -- provider: reject toxic transaction requests -- Updated dependencies -- Updated dependencies - - @0xsequence/utils@1.1.1 - -## 1.1.0 - -### Minor Changes - -- Refactor dapp facing provider - -### Patch Changes - -- Updated dependencies - - @0xsequence/utils@1.1.0 - -## 1.0.5 - -### Patch Changes - -- network: export network constants -- guard: use the correct global for fetch -- network: nova-explorer.arbitrum.io -> nova.arbiscan.io -- Updated dependencies -- Updated dependencies -- Updated dependencies - - @0xsequence/utils@1.0.5 - -## 1.0.4 - -### Patch Changes - -- provider: accept name or number for networkId -- Updated dependencies - - @0xsequence/utils@1.0.4 - -## 1.0.3 - -### Patch Changes - -- Simpler isValidSignature helpers -- Updated dependencies - - @0xsequence/utils@1.0.3 - -## 1.0.2 - -### Patch Changes - -- add extra signature validation utils methods -- Updated dependencies - - @0xsequence/utils@1.0.2 - -## 1.0.1 - -### Patch Changes - -- add homeverse testnet -- Updated dependencies - - @0xsequence/utils@1.0.1 - -## 1.0.0 - -### Major Changes - -- https://sequence.xyz/blog/sequence-wallet-light-state-sync-full-merkle-wallets - -### Patch Changes - -- Updated dependencies - - @0xsequence/utils@1.0.0 - -## 0.43.34 - -### Patch Changes - -- auth: no jwt for indexer -- Updated dependencies - - @0xsequence/utils@0.43.34 - -## 0.43.33 - -### Patch Changes - -- Adding onConnectOptionsChange handler to WalletRequestHandler -- Updated dependencies - - @0xsequence/utils@0.43.33 - -## 0.43.32 - -### Patch Changes - -- add Base Goerli network -- Updated dependencies - - @0xsequence/utils@0.43.32 - -## 0.43.31 - -### Patch Changes - -- remove AuxDataProvider, add promptSignInConnect -- Updated dependencies - - @0xsequence/utils@0.43.31 - -## 0.43.30 - -### Patch Changes - -- add arbitrum goerli testnet -- Updated dependencies - - @0xsequence/utils@0.43.30 - -## 0.43.29 - -### Patch Changes - -- provider: check availability of window object -- Updated dependencies - - @0xsequence/utils@0.43.29 - -## 0.43.28 - -### Patch Changes - -- update api bindings -- Updated dependencies - - @0xsequence/utils@0.43.28 - -## 0.43.27 - -### Patch Changes - -- Add rpc is sequence method -- Updated dependencies - - @0xsequence/utils@0.43.27 - -## 0.43.26 - -### Patch Changes - -- add zkevm url to enum -- Updated dependencies - - @0xsequence/utils@0.43.26 - -## 0.43.25 - -### Patch Changes - -- added polygon zkevm to mainnet networks -- Updated dependencies - - @0xsequence/utils@0.43.25 - -## 0.43.24 - -### Patch Changes - -- name change from zkevm to polygon-zkevm -- Updated dependencies - - @0xsequence/utils@0.43.24 - -## 0.43.23 - -### Patch Changes - -- update zkEVM name to Polygon zkEVM -- Updated dependencies - - @0xsequence/utils@0.43.23 - -## 0.43.22 - -### Patch Changes - -- add zkevm chain -- Updated dependencies - - @0xsequence/utils@0.43.22 - -## 0.43.21 - -### Patch Changes - -- api: update client bindings -- Updated dependencies - - @0xsequence/utils@0.43.21 - -## 0.43.20 - -### Patch Changes - -- indexer: update bindings -- Updated dependencies - - @0xsequence/utils@0.43.20 - -## 0.43.19 - -### Patch Changes - -- session proof update -- Updated dependencies - - @0xsequence/utils@0.43.19 - -## 0.43.18 - -### Patch Changes - -- rpc client global check, hardening -- Updated dependencies - - @0xsequence/utils@0.43.18 - -## 0.43.17 - -### Patch Changes - -- rpc clients, check of 'global' is defined -- Updated dependencies - - @0xsequence/utils@0.43.17 - -## 0.43.16 - -### Patch Changes - -- ethers peerDep to v5, update rpc client global use -- Updated dependencies - - @0xsequence/utils@0.43.16 - -## 0.43.15 - -### Patch Changes - -- - provider: expand receiver type on some util methods -- Updated dependencies - - @0xsequence/utils@0.43.15 - -## 0.43.14 - -### Patch Changes - -- bump -- Updated dependencies - - @0xsequence/utils@0.43.14 - -## 0.43.13 - -### Patch Changes - -- update rpc bindings -- Updated dependencies - - @0xsequence/utils@0.43.13 - -## 0.43.12 - -### Patch Changes - -- provider: single wallet init, and add new unregisterWallet() method -- Updated dependencies - - @0xsequence/utils@0.43.12 - -## 0.43.11 - -### Patch Changes - -- fix lockfiles -- re-add mocha type deleter -- Updated dependencies -- Updated dependencies - - @0xsequence/utils@0.43.11 - -## 0.43.10 - -### Patch Changes - -- various improvements -- Updated dependencies - - @0xsequence/utils@0.43.10 - -## 0.43.9 - -### Patch Changes - -- update deps -- Updated dependencies - - @0xsequence/utils@0.43.9 - -## 0.43.8 - -### Patch Changes - -- network: JsonRpcProvider with caching -- Updated dependencies - - @0xsequence/utils@0.43.8 - -## 0.43.7 - -### Patch Changes - -- provider: fix wallet network init -- Updated dependencies - - @0xsequence/utils@0.43.7 - -## 0.43.6 - -### Patch Changes - -- metadatata: update rpc bindings -- Updated dependencies - - @0xsequence/utils@0.43.6 - -## 0.43.5 - -### Patch Changes - -- provider: do not set default network for connect messages -- provider: forward missing error message -- Updated dependencies -- Updated dependencies - - @0xsequence/utils@0.43.5 - -## 0.43.4 - -### Patch Changes - -- no-change version bump to fix incorrectly tagged snapshot build -- Updated dependencies - - @0xsequence/utils@0.43.4 - -## 0.43.3 - -### Patch Changes - -- metadata: update bindings -- Updated dependencies - - @0xsequence/utils@0.43.3 - -## 0.43.2 - -### Patch Changes - -- provider: implement connectUnchecked -- Updated dependencies - - @0xsequence/utils@0.43.2 - -## 0.43.1 - -### Patch Changes - -- update to latest ethauth dep -- Updated dependencies - - @0xsequence/utils@0.43.1 - -## 0.43.0 - -### Minor Changes - -- move ethers to a peer dependency - -### Patch Changes - -- Updated dependencies - - @0xsequence/utils@0.43.0 - -## 0.42.10 - -### Patch Changes - -- add auxDataProvider -- Updated dependencies - - @0xsequence/utils@0.42.10 - -## 0.42.9 - -### Patch Changes - -- provider: add eip-191 exceptions -- Updated dependencies - - @0xsequence/utils@0.42.9 - -## 0.42.8 - -### Patch Changes - -- provider: skip setting intent origin if we're unity plugin -- Updated dependencies - - @0xsequence/utils@0.42.8 - -## 0.42.7 - -### Patch Changes - -- Add sign in options to connection settings -- Updated dependencies - - @0xsequence/utils@0.42.7 - -## 0.42.6 - -### Patch Changes - -- api bindings update -- Updated dependencies - - @0xsequence/utils@0.42.6 - -## 0.42.5 - -### Patch Changes - -- relayer: don't treat missing receipt as hard failure -- Updated dependencies - - @0xsequence/utils@0.42.5 - -## 0.42.4 - -### Patch Changes - -- provider: add custom app protocol to connect options -- Updated dependencies - - @0xsequence/utils@0.42.4 - -## 0.42.3 - -### Patch Changes - -- update api bindings -- Updated dependencies - - @0xsequence/utils@0.42.3 - -## 0.42.2 - -### Patch Changes - -- disable rinkeby network -- Updated dependencies - - @0xsequence/utils@0.42.2 - -## 0.42.1 - -### Patch Changes - -- wallet: optional waitForReceipt parameter -- Updated dependencies - - @0xsequence/utils@0.42.1 - -## 0.42.0 - -### Minor Changes - -- relayer: estimateGasLimits -> simulate -- add simulator package - -### Patch Changes - -- transactions: fix flattenAuxTransactions -- provider: only filter nullish values -- provider: re-map transaction 'gas' back to 'gasLimit' -- Updated dependencies -- Updated dependencies -- Updated dependencies -- Updated dependencies -- Updated dependencies - - @0xsequence/utils@0.42.0 - -## 0.41.3 - -### Patch Changes - -- api bindings update -- Updated dependencies - - @0xsequence/utils@0.41.3 - -## 0.41.2 - -### Patch Changes - -- api bindings update -- Updated dependencies - - @0xsequence/utils@0.41.2 - -## 0.41.1 - -### Patch Changes - -- update default networks -- Updated dependencies - - @0xsequence/utils@0.41.1 - -## 0.41.0 - -### Minor Changes - -- relayer: fix Relayer.wait() interface - - The interface for calling Relayer.wait() has changed. Instead of a single optional ill-defined timeout/delay parameter, there are three optional parameters, in order: - - - timeout: the maximum time to wait for the transaction receipt - - delay: the polling interval, i.e. the time to wait between requests - - maxFails: the maximum number of hard failures to tolerate before giving up - - Please update your codebase accordingly. - -- relayer: add optional waitForReceipt parameter to Relayer.relay - - The behaviour of Relayer.relay() was not well-defined with respect to whether or not it waited for a receipt. - This change allows the caller to specify whether to wait or not, with the default behaviour being to wait. - -### Patch Changes - -- relayer: wait receipt retry logic -- fix wrapped object error -- provider: forward delegateCall and revertOnError transaction fields -- Updated dependencies -- Updated dependencies -- Updated dependencies -- Updated dependencies -- Updated dependencies - - @0xsequence/utils@0.41.0 - -## 0.40.6 - -### Patch Changes - -- add arbitrum-nova chain -- Updated dependencies - - @0xsequence/utils@0.40.6 - -## 0.40.5 - -### Patch Changes - -- api: update bindings -- Updated dependencies - - @0xsequence/utils@0.40.5 - -## 0.40.4 - -### Patch Changes - -- add unreal transport -- Updated dependencies - - @0xsequence/utils@0.40.4 - -## 0.40.3 - -### Patch Changes - -- provider: fix MessageToSign message type -- Updated dependencies - - @0xsequence/utils@0.40.3 - -## 0.40.2 - -### Patch Changes - -- Wallet provider, loadSession method -- Updated dependencies - - @0xsequence/utils@0.40.2 - -## 0.40.1 - -### Patch Changes - -- export sequence.initWallet and sequence.getWallet -- Updated dependencies - - @0xsequence/utils@0.40.1 - -## 0.40.0 - -### Minor Changes - -- add sequence.initWallet(network, config) and sequence.getWallet() helper methods - -### Patch Changes - -- Updated dependencies - - @0xsequence/utils@0.40.0 - -## 0.39.6 - -### Patch Changes - -- indexer: update client bindings -- Updated dependencies - - @0xsequence/utils@0.39.6 - -## 0.39.5 - -### Patch Changes - -- provider: fix networkRpcUrl config option -- Updated dependencies - - @0xsequence/utils@0.39.5 - -## 0.39.4 - -### Patch Changes - -- api: update client bindings -- Updated dependencies - - @0xsequence/utils@0.39.4 - -## 0.39.3 - -### Patch Changes - -- add request method on Web3Provider -- Updated dependencies - - @0xsequence/utils@0.39.3 - -## 0.39.2 - -### Patch Changes - -- update umd name -- Updated dependencies - - @0xsequence/utils@0.39.2 - -## 0.39.1 - -### Patch Changes - -- add Aurora network -- add origin info for accountsChanged event to handle it per dapp -- Updated dependencies -- Updated dependencies - - @0xsequence/utils@0.39.1 - -## 0.39.0 - -### Minor Changes - -- abstract window.localStorage to interface type - -### Patch Changes - -- Updated dependencies - - @0xsequence/utils@0.39.0 - -## 0.38.2 - -### Patch Changes - -- provider: add Settings.defaultPurchaseAmount -- Updated dependencies - - @0xsequence/utils@0.38.2 - -## 0.38.1 - -### Patch Changes - -- update api and metadata rpc bindings -- Updated dependencies - - @0xsequence/utils@0.38.1 - -## 0.38.0 - -### Minor Changes - -- api: update bindings, change TokenPrice interface -- bridge: remove @0xsequence/bridge package -- api: update bindings, rename ContractCallArg to TupleComponent - -### Patch Changes - -- Updated dependencies -- Updated dependencies -- Updated dependencies - - @0xsequence/utils@0.38.0 - -## 0.37.1 - -### Patch Changes - -- Add back sortNetworks - Removing sorting was a breaking change for dapps on older versions which directly integrate sequence. -- Updated dependencies - - @0xsequence/utils@0.37.1 - -## 0.37.0 - -### Minor Changes - -- network related fixes and improvements -- api: bindings: exchange rate lookups - -### Patch Changes - -- Updated dependencies -- Updated dependencies - - @0xsequence/utils@0.37.0 - -## 0.36.13 - -### Patch Changes - -- api: update bindings with new price endpoints -- Updated dependencies - - @0xsequence/utils@0.36.13 - -## 0.36.12 - -### Patch Changes - -- wallet: skip remote signers if not needed -- auth: check that signature meets threshold before requesting auth token -- Updated dependencies -- Updated dependencies - - @0xsequence/utils@0.36.12 - -## 0.36.11 - -### Patch Changes - -- Prefix EIP191 message on wallet-request-handler -- Updated dependencies - - @0xsequence/utils@0.36.11 - -## 0.36.10 - -### Patch Changes - -- support bannerUrl on connect -- Updated dependencies - - @0xsequence/utils@0.36.10 - -## 0.36.9 - -### Patch Changes - -- minor dev xp improvements -- Updated dependencies - - @0xsequence/utils@0.36.9 - -## 0.36.8 - -### Patch Changes - -- more connect options (theme, payment providers, funding currencies) -- Updated dependencies - - @0xsequence/utils@0.36.8 - -## 0.36.7 - -### Patch Changes - -- fix missing break -- Updated dependencies - - @0xsequence/utils@0.36.7 - -## 0.36.6 - -### Patch Changes - -- wallet_switchEthereumChain support -- Updated dependencies - - @0xsequence/utils@0.36.6 - -## 0.36.5 - -### Patch Changes - -- auth: bump ethauth to 0.7.0 - network, wallet: don't assume position of auth network in list - api/indexer/metadata: trim trailing slash on hostname, and add endpoint urls - relayer: Allow to specify local relayer transaction parameters like gas price or gas limit -- Updated dependencies - - @0xsequence/utils@0.36.5 - -## 0.36.4 - -### Patch Changes - -- Updating list of chain ids to include other ethereum compatible chains -- Updated dependencies - - @0xsequence/utils@0.36.4 - -## 0.36.3 - -### Patch Changes - -- provider: pass connect options to prompter methods -- Updated dependencies - - @0xsequence/utils@0.36.3 - -## 0.36.2 - -### Patch Changes - -- transactions: Setting target to 0x0 when empty to during SequenceTxAbiEncode -- Updated dependencies - - @0xsequence/utils@0.36.2 - -## 0.36.1 - -### Patch Changes - -- metadata: update client with more fields -- Updated dependencies - - @0xsequence/utils@0.36.1 - -## 0.36.0 - -### Minor Changes - -- relayer, wallet: fee quote support - -### Patch Changes - -- Updated dependencies - - @0xsequence/utils@0.36.0 - -## 0.35.12 - -### Patch Changes - -- provider: rename wallet.commands to wallet.utils -- Updated dependencies - - @0xsequence/utils@0.35.12 - -## 0.35.11 - -### Patch Changes - -- provider/utils: smoother message validation -- Updated dependencies - - @0xsequence/utils@0.35.11 - -## 0.35.10 - -### Patch Changes - -- upgrade deps -- Updated dependencies - - @0xsequence/utils@0.35.10 - -## 0.35.9 - -### Patch Changes - -- provider: window-transport override event handlers with new wallet instance -- Updated dependencies - - @0xsequence/utils@0.35.9 - -## 0.35.8 - -### Patch Changes - -- provider: async wallet sign in improvements -- Updated dependencies - - @0xsequence/utils@0.35.8 - -## 0.35.7 - -### Patch Changes - -- config: cache wallet configs -- Updated dependencies - - @0xsequence/utils@0.35.7 - -## 0.35.6 - -### Patch Changes - -- provider: support async signin of wallet request handler -- Updated dependencies - - @0xsequence/utils@0.35.6 - -## 0.35.5 - -### Patch Changes - -- wallet: skip threshold check during fee estimation -- Updated dependencies - - @0xsequence/utils@0.35.5 - -## 0.35.4 - -### Patch Changes - -- - browser extension mode, center window -- Updated dependencies - - @0xsequence/utils@0.35.4 - -## 0.35.3 - -### Patch Changes - -- - update window position when in browser extension mode -- Updated dependencies - - @0xsequence/utils@0.35.3 - -## 0.35.2 - -### Patch Changes - -- - provider: WindowMessageHandler accept optional windowHref -- Updated dependencies - - @0xsequence/utils@0.35.2 - -## 0.35.1 - -### Patch Changes - -- wallet: update config on undeployed too -- Updated dependencies - - @0xsequence/utils@0.35.1 - -## 0.35.0 - -### Minor Changes - -- - config: add buildStubSignature - - provider: add checks to signing cases for wallet deployment and config statuses - - provider: add prompt for wallet deployment - - relayer: add BaseRelayer.prependWalletDeploy - - relayer: add Relayer.feeOptions - - relayer: account for wallet deployment in fee estimation - - transactions: add fromTransactionish - - wallet: add Account.prependConfigUpdate - - wallet: add Account.getFeeOptions - -### Patch Changes - -- Updated dependencies - - @0xsequence/utils@0.35.0 - -## 0.34.0 - -### Minor Changes - -- - upgrade deps - -### Patch Changes - -- Updated dependencies - - @0xsequence/utils@0.34.0 - -## 0.31.2 - -### Patch Changes - -- remove ora - -## 0.31.0 - -### Minor Changes - -- - upgrading to ethers v5.5 - -### Patch Changes - -- Updated dependencies - - @0xsequence/utils@0.31.0 - -## 0.30.0 - -### Minor Changes - -- - upgrade most deps - -### Patch Changes - -- Updated dependencies - - @0xsequence/utils@0.30.0 - -## 0.29.8 - -### Patch Changes - -- update api -- Updated dependencies [undefined] - - @0xsequence/utils@0.29.8 - -## 0.29.0 - -### Minor Changes - -- major architectural changes in Sequence design - - - only one API instance, API is no longer a per-chain service - - separate per-chain indexer service, API no longer handles indexing - - single contract metadata service, API no longer serves metadata - - chaind package has been removed, indexer and metadata packages have been added - - stronger typing with new explicit ChainId type - - multicall fixes and improvements - - forbid "wait" transactions in sendTransactionBatch calls - -### Patch Changes - -- Updated dependencies [undefined] - - @0xsequence/utils@0.29.0 - -## 0.28.0 - -### Minor Changes - -- extension provider - -### Patch Changes - -- Updated dependencies [undefined] - - @0xsequence/utils@0.28.0 - -## 0.27.0 - -### Minor Changes - -- Add requireFreshSigner lib to sessions - -### Patch Changes - -- Updated dependencies [undefined] - - @0xsequence/utils@0.27.0 - -## 0.25.1 - -### Patch Changes - -- Fix build typescrypt issue -- Updated dependencies [undefined] - - @0xsequence/utils@0.25.1 - -## 0.25.0 - -### Minor Changes - -- 10c8af8: Add estimator package - Fix multicall few calls bug - -### Patch Changes - -- Updated dependencies [10c8af8] - - @0xsequence/utils@0.25.0 - -## 0.23.0 - -### Minor Changes - -- - relayer: offer variety of gas fee options from the relayer service" - -### Patch Changes - -- Updated dependencies [undefined] - - @0xsequence/utils@0.23.0 - -## 0.22.2 - -### Patch Changes - -- e1c109e: Fix authProof on expired sessions -- Updated dependencies [e1c109e] - - @0xsequence/utils@0.22.2 - -## 0.22.1 - -### Patch Changes - -- transport session cache -- Updated dependencies [undefined] - - @0xsequence/utils@0.22.1 - -## 0.22.0 - -### Minor Changes - -- e667b65: Expose all relayer options on networks - -### Patch Changes - -- Updated dependencies [e667b65] - - @0xsequence/utils@0.22.0 - -## 0.21.5 - -### Patch Changes - -- Give priority to metaTxnId returned by relayer -- Updated dependencies [undefined] - - @0xsequence/utils@0.21.5 - -## 0.21.4 - -### Patch Changes - -- Add has enough signers method -- Updated dependencies [undefined] - - @0xsequence/utils@0.21.4 - -## 0.21.3 - -### Patch Changes - -- add window session cache -- Updated dependencies [undefined] - - @0xsequence/utils@0.21.3 - -## 0.21.2 - -### Patch Changes - -- exception handlind in relayer -- Updated dependencies [undefined] - - @0xsequence/utils@0.21.2 - -## 0.21.0 - -### Minor Changes - -- - fix gas estimation on wallets with large number of signers - - update to session handling and wallet config construction upon auth - -### Patch Changes - -- Updated dependencies [undefined] - - @0xsequence/utils@0.21.0 - -## 0.19.3 - -### Patch Changes - -- jwtAuth visibility, package version sync -- Updated dependencies [undefined] - - @0xsequence/utils@0.19.3 - -## 0.19.0 - -### Minor Changes - -- - provider, improve dapp / wallet transport io - -### Patch Changes - -- Updated dependencies [undefined] - - @0xsequence/utils@0.19.0 - -## 0.18.0 - -### Minor Changes - -- relayer improvements and pending transaction handling - -### Patch Changes - -- Updated dependencies [undefined] - - @0xsequence/utils@0.18.0 - -## 0.16.0 - -### Minor Changes - -- relayer as its own service separate from chaind - -### Patch Changes - -- Updated dependencies [undefined] - - @0xsequence/utils@0.16.0 - -## 0.15.1 - -### Patch Changes - -- update api clients -- Updated dependencies [undefined] - - @0xsequence/utils@0.15.1 - -## 0.14.3 - -### Patch Changes - -- Fix 0xSequence relayer dependencies -- Updated dependencies [undefined] - - @0xsequence/utils@0.14.3 - -## 0.14.2 - -### Patch Changes - -- Add debug logs to rpc-relayer -- Updated dependencies [undefined] - - @0xsequence/utils@0.14.2 - -## 0.14.0 - -### Minor Changes - -- update sequence utils finder which includes optimization - -### Patch Changes - -- Updated dependencies [undefined] - - @0xsequence/utils@0.14.0 - -## 0.13.0 - -### Minor Changes - -- Update SequenceUtils deployed contract - -### Patch Changes - -- Updated dependencies [undefined] - - @0xsequence/utils@0.13.0 - -## 0.12.1 - -### Patch Changes - -- npm bump -- Updated dependencies [undefined] - - @0xsequence/utils@0.12.1 - -## 0.12.0 - -### Minor Changes - -- provider: improvements to window transport - -### Patch Changes - -- Updated dependencies [undefined] - - @0xsequence/utils@0.12.0 - -## 0.11.4 - -### Patch Changes - -- update api client -- Updated dependencies [undefined] - - @0xsequence/utils@0.11.4 - -## 0.11.3 - -### Patch Changes - -- improve openWindow state options handling -- Updated dependencies [undefined] - - @0xsequence/utils@0.11.3 - -## 0.11.2 - -### Patch Changes - -- Fix multicall proxy scopes -- Updated dependencies [undefined] - - @0xsequence/utils@0.11.2 - -## 0.11.1 - -### Patch Changes - -- Add support for dynamic and nested signatures -- Updated dependencies [undefined] - - @0xsequence/utils@0.11.1 - -## 0.11.0 - -### Minor Changes - -- Update wallet context to 1.7 contracts - -### Patch Changes - -- Updated dependencies [undefined] - - @0xsequence/utils@0.11.0 - -## 0.10.9 - -### Patch Changes - -- add support for public addresses as signers in session.open -- Updated dependencies [undefined] - - @0xsequence/utils@0.10.9 - -## 0.10.8 - -### Patch Changes - -- Multicall production configuration -- Updated dependencies [undefined] - - @0xsequence/utils@0.10.8 - -## 0.10.7 - -### Patch Changes - -- allow provider transport to force disconnect -- Updated dependencies [undefined] - - @0xsequence/utils@0.10.7 - -## 0.10.6 - -### Patch Changes - -- - fix getWalletState method -- Updated dependencies [undefined] - - @0xsequence/utils@0.10.6 - -## 0.10.5 - -### Patch Changes - -- update relayer gas refund options -- Updated dependencies [undefined] - - @0xsequence/utils@0.10.5 - -## 0.10.4 - -### Patch Changes - -- Update api proto -- Updated dependencies [undefined] - - @0xsequence/utils@0.10.4 - -## 0.10.3 - -### Patch Changes - -- Fix loading config cross-chain -- Updated dependencies [undefined] - - @0xsequence/utils@0.10.3 - -## 0.10.2 - -### Patch Changes - -- - message digest fix -- Updated dependencies [undefined] - - @0xsequence/utils@0.10.2 - -## 0.10.1 - -### Patch Changes - -- upgrade deps -- Updated dependencies [undefined] - - @0xsequence/utils@0.10.1 - -## 0.10.0 - -### Minor Changes - -- Deployed new contracts with ERC1271 signer support - -### Patch Changes - -- Updated dependencies [undefined] - - @0xsequence/utils@0.10.0 - -## 0.9.6 - -### Patch Changes - -- Update ABIs for latest sequence contracts -- Updated dependencies [undefined] - - @0xsequence/utils@0.9.6 - -## 0.9.5 - -### Patch Changes - -- Implemented session class -- Updated dependencies [undefined] - - @0xsequence/utils@0.9.5 - -## 0.9.3 - -### Patch Changes - -- - minor improvements -- Updated dependencies [undefined] - - @0xsequence/utils@0.9.3 - -## 0.9.1 - -### Patch Changes - -- - patch bump -- Updated dependencies [undefined] - - @0xsequence/utils@0.9.1 - -## 0.9.0 - -### Minor Changes - -- - provider transport hardening - -### Patch Changes - -- Updated dependencies [undefined] - - @0xsequence/utils@0.9.0 - -## 0.8.5 - -### Patch Changes - -- - use latest wallet-contracts -- Updated dependencies [undefined] - - @0xsequence/utils@0.8.5 - -## 0.8.4 - -### Patch Changes - -- - minor improvements, name updates and comments -- Updated dependencies [undefined] - - @0xsequence/utils@0.8.4 - -## 0.8.3 - -### Patch Changes - -- - refinements - - - normalize signer address in config - - - provider: getWalletState() method to WalletProvider - -- Updated dependencies [undefined] - - @0xsequence/utils@0.8.3 - -## 0.8.2 - -### Patch Changes - -- - field rename and ethauth dependency bump -- Updated dependencies [undefined] - - @0xsequence/utils@0.8.2 - -## 0.8.1 - -### Patch Changes - -- - variety of optimizations -- Updated dependencies [undefined] - - @0xsequence/utils@0.8.1 - -## 0.8.0 - -### Minor Changes - -- - changeset fix - -### Patch Changes - -- Updated dependencies [undefined] - - @0xsequence/utils@0.8.0 - -## 0.7.2 - -### Patch Changes - -- package.json fix - -## 0.7.0 - -### Patch Changes - -- 6f11ed7: sequence.js, init release -- Updated dependencies [6f11ed7] - - @0xsequence/utils@0.7.0 diff --git a/old/packages/deployer/README.md b/old/packages/deployer/README.md deleted file mode 100644 index fc099e7a4..000000000 --- a/old/packages/deployer/README.md +++ /dev/null @@ -1,59 +0,0 @@ -# @0xsequence/deployer - -Deploy contracts using a universal deployer via CREATE2, allowing contracts to have the same address on any EVM chain. - -UniversalDeployer works in both Web Browsers and Nodejs. - -For more info, see [0xsequence project page](https://github.com/0xsequence/sequence.js). - -# How to use - -1. `yarn add @0xsequence/deployer` -2. Import UniversalDeployer into script -3. Create UniversalDeployer instance -4. Deploy contracts - -An `instance` number can be passed if multiple instance of the same contract need to be deployed on the same chain. The default instance number is 0, if none is passed. - -```typescript -... -import { UniversalDeployer } from '@0xsequence/deployer' - -const provider = new Web3Provider(web3.currentProvider) -const universalDeployer = new UniversalDeployer(network.name, provider) - -const main = async () => { - await universalDeployer.deploy('Factory', FactoryFactory) - await universalDeployer.deploy('MainModuleUpgradable', MainModuleUpgradableFactory) - await universalDeployer.deploy('GuestModule', GuestModuleFactory) - - prompt.start(`writing deployment information to ${network.name}.json`) - await universalDeployer.registerDeployment() - - // or, await universalDeployer.getDeployment() - - prompt.succeed() -} - -main() -``` - -You can also pass transaction parameters explicitly : - -```typescript -... - -const main = async () => { - await universalDeployer.deploy('WalletFactory', FactoryFactory, { gasLimit: 1000000 }) - await universalDeployer.deploy('MainModuleUpgradable', MainModuleUpgradableFactory, { gasPrice: 10n ** 9n }) -} - -``` - ---- - -## License - -[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT) - -Copyright (c) 2018-present Horizon Blockchain Games Inc. diff --git a/old/packages/deployer/artifacts/contracts/NanoUniversalDeployer.sol/NanoUniversalDeployer.json b/old/packages/deployer/artifacts/contracts/NanoUniversalDeployer.sol/NanoUniversalDeployer.json deleted file mode 100644 index 3c7fe11b1..000000000 --- a/old/packages/deployer/artifacts/contracts/NanoUniversalDeployer.sol/NanoUniversalDeployer.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "_format": "hh-sol-artifact-1", - "contractName": "NanoUniversalDeployer", - "sourceName": "contracts/NanoUniversalDeployer.sol", - "abi": [ - { - "anonymous": true, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "_addr", - "type": "address" - } - ], - "name": "Deploy", - "type": "event" - }, - { - "stateMutability": "payable", - "type": "fallback" - } - ], - "bytecode": "0x6080604052348015600f57600080fd5b5060a580601d6000396000f3fe60a06020601f3690810182900490910282016040526080818152600092839283918190838280828437600092018290525084519495509392505060208401905034f56040805173ffffffffffffffffffffffffffffffffffffffff83168152905191935081900360200190a0505000fea26469706673582212207457f4b6f392e3ba295b33e363360d55f06ead85ec96165a406e7b0231ab668464736f6c63430007060033", - "deployedBytecode": "0x60a06020601f3690810182900490910282016040526080818152600092839283918190838280828437600092018290525084519495509392505060208401905034f56040805173ffffffffffffffffffffffffffffffffffffffff83168152905191935081900360200190a0505000fea26469706673582212207457f4b6f392e3ba295b33e363360d55f06ead85ec96165a406e7b0231ab668464736f6c63430007060033", - "linkReferences": {}, - "deployedLinkReferences": {} -} diff --git a/old/packages/deployer/artifacts/contracts/UniversalDeployer2.sol/UniversalDeployer2.json b/old/packages/deployer/artifacts/contracts/UniversalDeployer2.sol/UniversalDeployer2.json deleted file mode 100644 index b56022dc0..000000000 --- a/old/packages/deployer/artifacts/contracts/UniversalDeployer2.sol/UniversalDeployer2.json +++ /dev/null @@ -1,42 +0,0 @@ -{ - "_format": "hh-sol-artifact-1", - "contractName": "UniversalDeployer2", - "sourceName": "contracts/UniversalDeployer2.sol", - "abi": [ - { - "anonymous": true, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "_addr", - "type": "address" - } - ], - "name": "Deploy", - "type": "event" - }, - { - "inputs": [ - { - "internalType": "bytes", - "name": "_creationCode", - "type": "bytes" - }, - { - "internalType": "uint256", - "name": "_instance", - "type": "uint256" - } - ], - "name": "deploy", - "outputs": [], - "stateMutability": "payable", - "type": "function" - } - ], - "bytecode": "0x608060405234801561001057600080fd5b5061013d806100206000396000f3fe60806040526004361061001e5760003560e01c80639c4ae2d014610023575b600080fd5b6100cb6004803603604081101561003957600080fd5b81019060208101813564010000000081111561005457600080fd5b82018360208201111561006657600080fd5b8035906020019184600183028401116401000000008311171561008857600080fd5b91908080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525092955050913592506100cd915050565b005b60008183516020850134f56040805173ffffffffffffffffffffffffffffffffffffffff83168152905191925081900360200190a050505056fea264697066735822122033609f614f03931b92d88c309d698449bb77efcd517328d341fa4f923c5d8c7964736f6c63430007060033", - "deployedBytecode": "0x60806040526004361061001e5760003560e01c80639c4ae2d014610023575b600080fd5b6100cb6004803603604081101561003957600080fd5b81019060208101813564010000000081111561005457600080fd5b82018360208201111561006657600080fd5b8035906020019184600183028401116401000000008311171561008857600080fd5b91908080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525092955050913592506100cd915050565b005b60008183516020850134f56040805173ffffffffffffffffffffffffffffffffffffffff83168152905191925081900360200190a050505056fea264697066735822122033609f614f03931b92d88c309d698449bb77efcd517328d341fa4f923c5d8c7964736f6c63430007060033", - "linkReferences": {}, - "deployedLinkReferences": {} -} diff --git a/old/packages/deployer/config/PROD.env.sample b/old/packages/deployer/config/PROD.env.sample deleted file mode 100644 index f7afe8cd9..000000000 --- a/old/packages/deployer/config/PROD.env.sample +++ /dev/null @@ -1,2 +0,0 @@ -ETH_MNEMONIC="" -INFURA_API_KEY="" diff --git a/old/packages/deployer/contracts/NanoUniversalDeployer.sol b/old/packages/deployer/contracts/NanoUniversalDeployer.sol deleted file mode 100644 index 6419b9168..000000000 --- a/old/packages/deployer/contracts/NanoUniversalDeployer.sol +++ /dev/null @@ -1,12 +0,0 @@ -pragma solidity ^0.7.6; - -contract NanoUniversalDeployer { - event Deploy(address _addr) anonymous; - - fallback() external payable { - address addr; - bytes memory code = msg.data; - assembly { addr := create2(callvalue(), add(code, 32), mload(code), 0) } - emit Deploy(addr); - } -} \ No newline at end of file diff --git a/old/packages/deployer/contracts/UniversalDeployer2.sol b/old/packages/deployer/contracts/UniversalDeployer2.sol deleted file mode 100644 index a25edfeeb..000000000 --- a/old/packages/deployer/contracts/UniversalDeployer2.sol +++ /dev/null @@ -1,16 +0,0 @@ -pragma solidity ^0.7.6; - -contract UniversalDeployer2 { - event Deploy(address _addr) anonymous; - - /** - * @notice will deploy a contract via create2 - * @param _creationCode Creation code of contract to deploy - * @param _instance Instance number of contract to deploy - */ - function deploy(bytes memory _creationCode, uint256 _instance) public payable { - address addr; - assembly { addr := create2(callvalue(), add(_creationCode, 32), mload(_creationCode), _instance) } - emit Deploy(addr); - } -} \ No newline at end of file diff --git a/old/packages/deployer/hardhat.config.ts b/old/packages/deployer/hardhat.config.ts deleted file mode 100644 index 13afd3834..000000000 --- a/old/packages/deployer/hardhat.config.ts +++ /dev/null @@ -1,31 +0,0 @@ -// import '@nomiclabs/hardhat-truffle5' -import { networkConfig } from './src/utils/configLoader' - -const ganacheNetwork = { - url: 'http://127.0.0.1:8545', - blockGasLimit: 6000000000 -} - -module.exports = { - solidity: { - version: '0.7.6', - settings: { - optimizer: { - enabled: true, - runs: 100000, - details: { - yul: true - } - } - } - }, - paths: { - tests: './src/tests' - }, - networks: { - goerli: networkConfig('goerli'), - mumbai: networkConfig('mumbai'), - matic: networkConfig('matic'), - ganache: ganacheNetwork - } -} diff --git a/old/packages/deployer/package.json b/old/packages/deployer/package.json deleted file mode 100644 index 619b8af97..000000000 --- a/old/packages/deployer/package.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "name": "@0xsequence/deployer", - "version": "2.3.8", - "description": "deployer sub-package for Sequence", - "repository": "https://github.com/0xsequence/sequence.js/tree/master/packages/deployer", - "source": "src/index.ts", - "main": "dist/0xsequence-deployer.cjs.js", - "module": "dist/0xsequence-deployer.esm.js", - "author": "Horizon Blockchain Games", - "license": "Apache-2.0", - "scripts": { - "test": "pnpm test:file tests/**/*.spec.ts", - "test:file": "NODE_OPTIONS='--import tsx' mocha --timeout 30000", - "typecheck": "tsc --noEmit", - "build": "rm -rf src/typings && TS_NODE_PROJECT=../../tsconfig.test.json hardhat clean && pnpm compile-contracts && pnpm gen:typings", - "compile-contracts": "TS_NODE_PROJECT=../../tsconfig.test.json hardhat --max-memory 4096 compile", - "gen:typings": "rm -rf ./src/typings/contracts/* && typechain --target ethers-v6 --out-dir src/typings/contracts './artifacts/contracts/!(build-info)/**/*[^dbg].json'" - }, - "peerDependencies": { - "ethers": ">=6" - }, - "dependencies": { - "@0xsequence/utils": "workspace:*" - }, - "devDependencies": { - "dotenv": "^16.0.3", - "ethers": "6.13.4", - "typechain": "^8.1.1" - }, - "files": [ - "src", - "dist" - ] -} diff --git a/old/packages/deployer/src/UniversalDeployer.ts b/old/packages/deployer/src/UniversalDeployer.ts deleted file mode 100644 index 0d121e13e..000000000 --- a/old/packages/deployer/src/UniversalDeployer.ts +++ /dev/null @@ -1,213 +0,0 @@ -import * as fs from 'fs' -import { ethers } from 'ethers' -import { promisify, isNode } from '@0xsequence/utils' -import { UniversalDeployer2__factory } from './typings/contracts' -import { - EOA_UNIVERSAL_DEPLOYER_ADDRESS, - UNIVERSAL_DEPLOYER_ADDRESS, - UNIVERSAL_DEPLOYER_2_ADDRESS, - UNIVERSAL_DEPLOYER_FUNDING, - UNIVERSAL_DEPLOYER_TX, - UNIVERSAL_DEPLOYER_2_BYTECODE -} from './constants' -import { ContractInstance } from './types' -import { createLogger, Logger } from './utils/logger' - -let prompt: Logger -createLogger().then(logger => (prompt = logger)) - -export class UniversalDeployer { - private deployedInstances: ContractInstance[] = [] - private signer: Promise - - constructor( - public networkName: string, - public provider: ethers.JsonRpcProvider, - public signerOverride?: ethers.Signer - ) { - if (signerOverride) { - this.signer = Promise.resolve(signerOverride) - } else { - this.signer = provider.getSigner() - } - } - - deploy = async ( - contractAlias: string, - contractFactory: new (signer: ethers.Signer) => T, - txParams?: ethers.TransactionRequest, - instance?: number | bigint, - ...args: Parameters - ): Promise => { - try { - // Deploy universal deployer 2 if not yet deployed on chain_id - const universalDeployer2Code = await this.provider.getCode(UNIVERSAL_DEPLOYER_2_ADDRESS) - if (universalDeployer2Code === '0x') { - await this.deployUniversalDeployer2(txParams) - } - - // Deploying contract - prompt.start(`Deploying ${contractAlias}`) - const factory = new contractFactory(await this.signer) - const deployTx = await factory.getDeployTransaction(...args) - - // Make sure instance number is specified - const instanceNumber = instance !== undefined ? BigInt(instance) : 0n - - // Verify if contract already deployed - const contractAddress = await this.addressOf(contractFactory, instanceNumber, ...args) - const contractCode = await this.provider.getCode(contractAddress) - - const deployer = UniversalDeployer2__factory.connect(UNIVERSAL_DEPLOYER_2_ADDRESS, await this.signer) - - if (contractCode === '0x') { - // Deploy contract if not already deployed - const tx = await deployer.deploy(deployTx.data!, instanceNumber, txParams!) - await tx.wait() - - // Verify that the deployment was successful since tx won't revert - const postDeployCode = await this.provider.getCode(contractAddress) - if (postDeployCode === '0x') { - prompt.fail(contractAddress) - } else { - prompt.succeed() - } - } else { - prompt.warn(`ALREADY DEPLOYED: ${contractAlias}`) - } - - const contract = factory.attach(contractAddress) - this.deployedInstances.push({ contractAddress, contractAlias, contract }) - - return contract - } catch (error) { - throw new Error(`CONTRACT DEPLOY FAILED: ${error}`) - } - } - - deployUniversalDeployer = async (txParams?: ethers.TransactionRequest) => { - if ((await this.provider.getBalance(EOA_UNIVERSAL_DEPLOYER_ADDRESS)) < UNIVERSAL_DEPLOYER_FUNDING) { - prompt.start("Funding universal deployer's EOA") - - const signer = await this.signer - - const tx = await signer.sendTransaction({ - to: EOA_UNIVERSAL_DEPLOYER_ADDRESS, - value: UNIVERSAL_DEPLOYER_FUNDING, - ...txParams - }) - - const receipt = await tx.wait() - - if (receipt?.status === 1) { - prompt.succeed() - } else { - prompt.fail('txn receipt status failed') - } - } - - prompt.start('Deploying universal deployer contract') - await this.provider.broadcastTransaction(UNIVERSAL_DEPLOYER_TX) - - // const universalDeployerCodeCheck = await this.provider.getCode(UNIVERSAL_DEPLOYER_ADDRESS) - // if (universalDeployerCodeCheck === '0x') { - // prompt.fail(UNIVERSAL_DEPLOYER_ADDRESS) - // } else { - // prompt.succeed() - // } - prompt.succeed() - } - - // Deploy universal deployer via universal deployer 1 - deployUniversalDeployer2 = async (txParams?: ethers.TransactionRequest) => { - const universalDeployerCode = await this.provider.getCode(UNIVERSAL_DEPLOYER_ADDRESS) - if (universalDeployerCode === '0x') { - await this.deployUniversalDeployer(txParams) - } else { - // NOTE: already deployed - // eslint-disable-next-line - ;('ALREADY DEPLOYED') - } - - // NOTE: in case the getCode below fails, double check the UNIVERSAL_DEPLOYER_2_ADDRESS address - // which is emitted from the deployer 1 contract creation logs. This address may change if - // the UNIVERSAL_DEPLOYER_2_BYTECODE changes of the deployer -- which should never really happen. - - const signer = await this.signer - - prompt.start('Deploying universal deployer 2 contract') - const tx = await signer.sendTransaction({ - to: UNIVERSAL_DEPLOYER_ADDRESS, - data: UNIVERSAL_DEPLOYER_2_BYTECODE, - ...txParams - }) - await tx.wait() - - // const universalDeployer2CodeCheck = await this.provider.getCode(UNIVERSAL_DEPLOYER_2_ADDRESS) - // if (universalDeployer2CodeCheck === '0x') { - // prompt.fail(UNIVERSAL_DEPLOYER_2_ADDRESS) - // } else { - // prompt.succeed() - // } - prompt.succeed() - } - - getDeployment = () => { - return this.deployedInstances.reduce( - (list, instance) => { - const { contractAddress, contractAlias } = instance - list[contractAlias] = contractAddress - return list - }, - {} as { [key: string]: string } - ) - } - - getDeploymentList = () => - this.deployedInstances.map(({ contractAddress, contractAlias }) => { - return { - contractName: contractAlias, - contractAddress - } - }) - - registerDeployment = async (filePath?: string) => { - if (!isNode()) { - throw new Error('registerDeployment cannot be run in a browser. Node is required. Try the getDeployment() method.') - } - - return promisify(fs.writeFile)( - filePath ? filePath : `./networks/${this.networkName}.json`, - JSON.stringify(this.getDeployment(), null, 2), - { flag: 'w+' } - ) - } - - manualDeploymentRegistration = (contractAlias: string, contractAddress: string) => { - this.deployedInstances.push({ - contractAlias, - contractAddress - }) - } - - addressOf = async ( - contractFactory: new (signer: ethers.Signer) => T, - contractInstance: number | bigint, - ...args: Parameters - ): Promise => { - const factory = new contractFactory(await this.signer) - const deployTx = await factory.getDeployTransaction(...args) - const deployData = deployTx.data - - const codeHash = ethers.solidityPackedKeccak256(['bytes'], [deployData]) - - const salt = ethers.solidityPacked(['uint256'], [contractInstance]) - - const hash = ethers.solidityPackedKeccak256( - ['bytes1', 'address', 'bytes32', 'bytes32'], - ['0xff', UNIVERSAL_DEPLOYER_2_ADDRESS, salt, codeHash] - ) - - return ethers.getAddress(ethers.dataSlice(hash, 12)) - } -} diff --git a/old/packages/deployer/src/constants.ts b/old/packages/deployer/src/constants.ts deleted file mode 100644 index 44b7c79ab..000000000 --- a/old/packages/deployer/src/constants.ts +++ /dev/null @@ -1,16 +0,0 @@ -export const EOA_UNIVERSAL_DEPLOYER_ADDRESS: string = '0x9c5a87452d4FAC0cbd53BDCA580b20A45526B3AB' -export const UNIVERSAL_DEPLOYER_ADDRESS: string = '0x1b926fbb24a9f78dcdd3272f2d86f5d0660e59c0' -export const UNIVERSAL_DEPLOYER_2_ADDRESS: string = '0x8a5bc19e22d6ad55a2c763b93a75d09f321fe764' -export const UNIVERSAL_DEPLOYER_FUNDING: bigint = 300n * 10n ** 14n -export const UNIVERSAL_DEPLOYER_TX: string = - '0xf9010880852416b84e01830222e08080b8b66080604052348015600f57600080fd5b50609980601d6000396000f3fe60a06020601f369081018290049091028201604052608081815260009260609284918190838280828437600092018290525084519495509392505060208401905034f5604080516001600160a01b0383168152905191935081900360200190a0505000fea26469706673582212205a310755225e3c740b2f013fb6343f4c205e7141fcdf15947f5f0e0e818727fb64736f6c634300060a00331ca01820182018201820182018201820182018201820182018201820182018201820a01820182018201820182018201820182018201820182018201820182018201820' - -// expected bytecode for the universal deployer 2. If this changes for whatever reason then the universal -// deployer's addresses of contracts it's deployed will change, and so will UNIVERSAL_DEPLOYER_2_ADDRESS. -// -// do not change this value. it is here to integrity check within the UniversalDeployer. if you do change -// it however, then make sure to also update UNIVERSAL_DEPLOYER_2_ADDRESS. -// -// this value was originally copied from typings/contracts/factories/UniversalDeployer2__factory.ts -export const UNIVERSAL_DEPLOYER_2_BYTECODE = - '0x608060405234801561001057600080fd5b5061013d806100206000396000f3fe60806040526004361061001e5760003560e01c80639c4ae2d014610023575b600080fd5b6100cb6004803603604081101561003957600080fd5b81019060208101813564010000000081111561005457600080fd5b82018360208201111561006657600080fd5b8035906020019184600183028401116401000000008311171561008857600080fd5b91908080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525092955050913592506100cd915050565b005b60008183516020850134f56040805173ffffffffffffffffffffffffffffffffffffffff83168152905191925081900360200190a050505056fea264697066735822122033609f614f03931b92d88c309d698449bb77efcd517328d341fa4f923c5d8c7964736f6c63430007060033' diff --git a/old/packages/deployer/src/index.ts b/old/packages/deployer/src/index.ts deleted file mode 100644 index 155d24c68..000000000 --- a/old/packages/deployer/src/index.ts +++ /dev/null @@ -1,3 +0,0 @@ -export { UniversalDeployer } from './UniversalDeployer' -export * from './constants' -export * from './types' diff --git a/old/packages/deployer/src/types.ts b/old/packages/deployer/src/types.ts deleted file mode 100644 index f53d0629b..000000000 --- a/old/packages/deployer/src/types.ts +++ /dev/null @@ -1,16 +0,0 @@ -import { ethers } from 'ethers' - -export interface FactoryDeployedContract { - address: string -} - -export interface ContractInstance { - contractAddress: string - contractAlias: string - contract?: ethers.BaseContract -} - -export interface ContractInfo { - contractName: string - contractAlias?: string -} diff --git a/old/packages/deployer/src/typings/contracts/NanoUniversalDeployer.ts b/old/packages/deployer/src/typings/contracts/NanoUniversalDeployer.ts deleted file mode 100644 index dc3bdac00..000000000 --- a/old/packages/deployer/src/typings/contracts/NanoUniversalDeployer.ts +++ /dev/null @@ -1,73 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -import type { - BaseContract, - FunctionFragment, - Interface, - EventFragment, - AddressLike, - ContractRunner, - ContractMethod, - Listener -} from 'ethers' -import type { TypedContractEvent, TypedDeferredTopicFilter, TypedEventLog, TypedLogDescription, TypedListener } from './common' - -export interface NanoUniversalDeployerInterface extends Interface { - getEvent(nameOrSignatureOrTopic: 'Deploy'): EventFragment -} - -export namespace DeployEvent { - export type InputTuple = [_addr: AddressLike] - export type OutputTuple = [_addr: string] - export interface OutputObject { - _addr: string - } - export type Event = TypedContractEvent - export type Filter = TypedDeferredTopicFilter - export type Log = TypedEventLog - export type LogDescription = TypedLogDescription -} - -export interface NanoUniversalDeployer extends BaseContract { - connect(runner?: ContractRunner | null): NanoUniversalDeployer - waitForDeployment(): Promise - - interface: NanoUniversalDeployerInterface - - queryFilter( - event: TCEvent, - fromBlockOrBlockhash?: string | number | undefined, - toBlock?: string | number | undefined - ): Promise>> - queryFilter( - filter: TypedDeferredTopicFilter, - fromBlockOrBlockhash?: string | number | undefined, - toBlock?: string | number | undefined - ): Promise>> - - on(event: TCEvent, listener: TypedListener): Promise - on( - filter: TypedDeferredTopicFilter, - listener: TypedListener - ): Promise - - once(event: TCEvent, listener: TypedListener): Promise - once( - filter: TypedDeferredTopicFilter, - listener: TypedListener - ): Promise - - listeners(event: TCEvent): Promise>> - listeners(eventName?: string): Promise> - removeAllListeners(event?: TCEvent): Promise - - getFunction(key: string | FunctionFragment): T - - getEvent(key: 'Deploy'): TypedContractEvent - - filters: { - 'Deploy(address)': TypedContractEvent - Deploy: TypedContractEvent - } -} diff --git a/old/packages/deployer/src/typings/contracts/UniversalDeployer2.ts b/old/packages/deployer/src/typings/contracts/UniversalDeployer2.ts deleted file mode 100644 index e89a87890..000000000 --- a/old/packages/deployer/src/typings/contracts/UniversalDeployer2.ts +++ /dev/null @@ -1,95 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -import type { - BaseContract, - BigNumberish, - BytesLike, - FunctionFragment, - Result, - Interface, - EventFragment, - AddressLike, - ContractRunner, - ContractMethod, - Listener -} from 'ethers' -import type { - TypedContractEvent, - TypedDeferredTopicFilter, - TypedEventLog, - TypedLogDescription, - TypedListener, - TypedContractMethod -} from './common' - -export interface UniversalDeployer2Interface extends Interface { - getFunction(nameOrSignature: 'deploy'): FunctionFragment - - getEvent(nameOrSignatureOrTopic: 'Deploy'): EventFragment - - encodeFunctionData(functionFragment: 'deploy', values: [BytesLike, BigNumberish]): string - - decodeFunctionResult(functionFragment: 'deploy', data: BytesLike): Result -} - -export namespace DeployEvent { - export type InputTuple = [_addr: AddressLike] - export type OutputTuple = [_addr: string] - export interface OutputObject { - _addr: string - } - export type Event = TypedContractEvent - export type Filter = TypedDeferredTopicFilter - export type Log = TypedEventLog - export type LogDescription = TypedLogDescription -} - -export interface UniversalDeployer2 extends BaseContract { - connect(runner?: ContractRunner | null): UniversalDeployer2 - waitForDeployment(): Promise - - interface: UniversalDeployer2Interface - - queryFilter( - event: TCEvent, - fromBlockOrBlockhash?: string | number | undefined, - toBlock?: string | number | undefined - ): Promise>> - queryFilter( - filter: TypedDeferredTopicFilter, - fromBlockOrBlockhash?: string | number | undefined, - toBlock?: string | number | undefined - ): Promise>> - - on(event: TCEvent, listener: TypedListener): Promise - on( - filter: TypedDeferredTopicFilter, - listener: TypedListener - ): Promise - - once(event: TCEvent, listener: TypedListener): Promise - once( - filter: TypedDeferredTopicFilter, - listener: TypedListener - ): Promise - - listeners(event: TCEvent): Promise>> - listeners(eventName?: string): Promise> - removeAllListeners(event?: TCEvent): Promise - - deploy: TypedContractMethod<[_creationCode: BytesLike, _instance: BigNumberish], [void], 'payable'> - - getFunction(key: string | FunctionFragment): T - - getFunction( - nameOrSignature: 'deploy' - ): TypedContractMethod<[_creationCode: BytesLike, _instance: BigNumberish], [void], 'payable'> - - getEvent(key: 'Deploy'): TypedContractEvent - - filters: { - 'Deploy(address)': TypedContractEvent - Deploy: TypedContractEvent - } -} diff --git a/old/packages/deployer/src/typings/contracts/common.ts b/old/packages/deployer/src/typings/contracts/common.ts deleted file mode 100644 index 65ad08ab5..000000000 --- a/old/packages/deployer/src/typings/contracts/common.ts +++ /dev/null @@ -1,86 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -import type { - FunctionFragment, - Typed, - EventFragment, - ContractTransaction, - ContractTransactionResponse, - DeferredTopicFilter, - EventLog, - TransactionRequest, - LogDescription -} from 'ethers' - -export interface TypedDeferredTopicFilter<_TCEvent extends TypedContractEvent> extends DeferredTopicFilter {} - -export interface TypedContractEvent< - InputTuple extends Array = any, - OutputTuple extends Array = any, - OutputObject = any -> { - (...args: Partial): TypedDeferredTopicFilter> - name: string - fragment: EventFragment - getFragment(...args: Partial): EventFragment -} - -type __TypechainAOutputTuple = T extends TypedContractEvent ? W : never -type __TypechainOutputObject = T extends TypedContractEvent ? V : never - -export interface TypedEventLog extends Omit { - args: __TypechainAOutputTuple & __TypechainOutputObject -} - -export interface TypedLogDescription extends Omit { - args: __TypechainAOutputTuple & __TypechainOutputObject -} - -export type TypedListener = ( - ...listenerArg: [...__TypechainAOutputTuple, TypedEventLog, ...undefined[]] -) => void - -export type MinEthersFactory = { - deploy(...a: ARGS[]): Promise -} - -export type GetContractTypeFromFactory = F extends MinEthersFactory ? C : never -export type GetARGsTypeFromFactory = F extends MinEthersFactory ? Parameters : never - -export type StateMutability = 'nonpayable' | 'payable' | 'view' - -export type BaseOverrides = Omit -export type NonPayableOverrides = Omit -export type PayableOverrides = Omit -export type ViewOverrides = Omit -export type Overrides = S extends 'nonpayable' - ? NonPayableOverrides - : S extends 'payable' - ? PayableOverrides - : ViewOverrides - -export type PostfixOverrides
, S extends StateMutability> = A | [...A, Overrides] -export type ContractMethodArgs, S extends StateMutability> = PostfixOverrides< - { [I in keyof A]-?: A[I] | Typed }, - S -> - -export type DefaultReturnType = R extends Array ? R[0] : R - -// export interface ContractMethod = Array, R = any, D extends R | ContractTransactionResponse = R | ContractTransactionResponse> { -export interface TypedContractMethod = Array, R = any, S extends StateMutability = 'payable'> { - (...args: ContractMethodArgs): S extends 'view' ? Promise> : Promise - - name: string - - fragment: FunctionFragment - - getFragment(...args: ContractMethodArgs): FunctionFragment - - populateTransaction(...args: ContractMethodArgs): Promise - staticCall(...args: ContractMethodArgs): Promise> - send(...args: ContractMethodArgs): Promise - estimateGas(...args: ContractMethodArgs): Promise - staticCallResult(...args: ContractMethodArgs): Promise -} diff --git a/old/packages/deployer/src/typings/contracts/factories/NanoUniversalDeployer__factory.ts b/old/packages/deployer/src/typings/contracts/factories/NanoUniversalDeployer__factory.ts deleted file mode 100644 index 9c4ea940a..000000000 --- a/old/packages/deployer/src/typings/contracts/factories/NanoUniversalDeployer__factory.ts +++ /dev/null @@ -1,68 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -import { Contract, ContractFactory, ContractTransactionResponse, Interface } from 'ethers' -import type { Signer, ContractDeployTransaction, ContractRunner } from 'ethers' -import type { NonPayableOverrides } from '../common' -import type { NanoUniversalDeployer, NanoUniversalDeployerInterface } from '../NanoUniversalDeployer' - -const _abi = [ - { - anonymous: true, - inputs: [ - { - indexed: false, - internalType: 'address', - name: '_addr', - type: 'address' - } - ], - name: 'Deploy', - type: 'event' - }, - { - stateMutability: 'payable', - type: 'fallback' - } -] as const - -const _bytecode = - '0x6080604052348015600f57600080fd5b5060a580601d6000396000f3fe60a06020601f3690810182900490910282016040526080818152600092839283918190838280828437600092018290525084519495509392505060208401905034f56040805173ffffffffffffffffffffffffffffffffffffffff83168152905191935081900360200190a0505000fea26469706673582212207457f4b6f392e3ba295b33e363360d55f06ead85ec96165a406e7b0231ab668464736f6c63430007060033' - -type NanoUniversalDeployerConstructorParams = [signer?: Signer] | ConstructorParameters - -const isSuperArgs = (xs: NanoUniversalDeployerConstructorParams): xs is ConstructorParameters => - xs.length > 1 - -export class NanoUniversalDeployer__factory extends ContractFactory { - constructor(...args: NanoUniversalDeployerConstructorParams) { - if (isSuperArgs(args)) { - super(...args) - } else { - super(_abi, _bytecode, args[0]) - } - } - - override getDeployTransaction(overrides?: NonPayableOverrides & { from?: string }): Promise { - return super.getDeployTransaction(overrides || {}) - } - override deploy(overrides?: NonPayableOverrides & { from?: string }) { - return super.deploy(overrides || {}) as Promise< - NanoUniversalDeployer & { - deploymentTransaction(): ContractTransactionResponse - } - > - } - override connect(runner: ContractRunner | null): NanoUniversalDeployer__factory { - return super.connect(runner) as NanoUniversalDeployer__factory - } - - static readonly bytecode = _bytecode - static readonly abi = _abi - static createInterface(): NanoUniversalDeployerInterface { - return new Interface(_abi) as NanoUniversalDeployerInterface - } - static connect(address: string, runner?: ContractRunner | null): NanoUniversalDeployer { - return new Contract(address, _abi, runner) as unknown as NanoUniversalDeployer - } -} diff --git a/old/packages/deployer/src/typings/contracts/factories/UniversalDeployer2__factory.ts b/old/packages/deployer/src/typings/contracts/factories/UniversalDeployer2__factory.ts deleted file mode 100644 index 3a7619de1..000000000 --- a/old/packages/deployer/src/typings/contracts/factories/UniversalDeployer2__factory.ts +++ /dev/null @@ -1,82 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -import { Contract, ContractFactory, ContractTransactionResponse, Interface } from 'ethers' -import type { Signer, ContractDeployTransaction, ContractRunner } from 'ethers' -import type { NonPayableOverrides } from '../common' -import type { UniversalDeployer2, UniversalDeployer2Interface } from '../UniversalDeployer2' - -const _abi = [ - { - anonymous: true, - inputs: [ - { - indexed: false, - internalType: 'address', - name: '_addr', - type: 'address' - } - ], - name: 'Deploy', - type: 'event' - }, - { - inputs: [ - { - internalType: 'bytes', - name: '_creationCode', - type: 'bytes' - }, - { - internalType: 'uint256', - name: '_instance', - type: 'uint256' - } - ], - name: 'deploy', - outputs: [], - stateMutability: 'payable', - type: 'function' - } -] as const - -const _bytecode = - '0x608060405234801561001057600080fd5b5061013d806100206000396000f3fe60806040526004361061001e5760003560e01c80639c4ae2d014610023575b600080fd5b6100cb6004803603604081101561003957600080fd5b81019060208101813564010000000081111561005457600080fd5b82018360208201111561006657600080fd5b8035906020019184600183028401116401000000008311171561008857600080fd5b91908080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525092955050913592506100cd915050565b005b60008183516020850134f56040805173ffffffffffffffffffffffffffffffffffffffff83168152905191925081900360200190a050505056fea264697066735822122033609f614f03931b92d88c309d698449bb77efcd517328d341fa4f923c5d8c7964736f6c63430007060033' - -type UniversalDeployer2ConstructorParams = [signer?: Signer] | ConstructorParameters - -const isSuperArgs = (xs: UniversalDeployer2ConstructorParams): xs is ConstructorParameters => - xs.length > 1 - -export class UniversalDeployer2__factory extends ContractFactory { - constructor(...args: UniversalDeployer2ConstructorParams) { - if (isSuperArgs(args)) { - super(...args) - } else { - super(_abi, _bytecode, args[0]) - } - } - - override getDeployTransaction(overrides?: NonPayableOverrides & { from?: string }): Promise { - return super.getDeployTransaction(overrides || {}) - } - override deploy(overrides?: NonPayableOverrides & { from?: string }) { - return super.deploy(overrides || {}) as Promise< - UniversalDeployer2 & { - deploymentTransaction(): ContractTransactionResponse - } - > - } - override connect(runner: ContractRunner | null): UniversalDeployer2__factory { - return super.connect(runner) as UniversalDeployer2__factory - } - - static readonly bytecode = _bytecode - static readonly abi = _abi - static createInterface(): UniversalDeployer2Interface { - return new Interface(_abi) as UniversalDeployer2Interface - } - static connect(address: string, runner?: ContractRunner | null): UniversalDeployer2 { - return new Contract(address, _abi, runner) as unknown as UniversalDeployer2 - } -} diff --git a/old/packages/deployer/src/typings/contracts/factories/index.ts b/old/packages/deployer/src/typings/contracts/factories/index.ts deleted file mode 100644 index e460629dd..000000000 --- a/old/packages/deployer/src/typings/contracts/factories/index.ts +++ /dev/null @@ -1,5 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -export { NanoUniversalDeployer__factory } from './NanoUniversalDeployer__factory' -export { UniversalDeployer2__factory } from './UniversalDeployer2__factory' diff --git a/old/packages/deployer/src/typings/contracts/index.ts b/old/packages/deployer/src/typings/contracts/index.ts deleted file mode 100644 index 087a970c9..000000000 --- a/old/packages/deployer/src/typings/contracts/index.ts +++ /dev/null @@ -1,8 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -export type { NanoUniversalDeployer } from './NanoUniversalDeployer' -export type { UniversalDeployer2 } from './UniversalDeployer2' -export * as factories from './factories' -export { NanoUniversalDeployer__factory } from './factories/NanoUniversalDeployer__factory' -export { UniversalDeployer2__factory } from './factories/UniversalDeployer2__factory' diff --git a/old/packages/deployer/src/utils/configLoader.ts b/old/packages/deployer/src/utils/configLoader.ts deleted file mode 100644 index aef2ecf18..000000000 --- a/old/packages/deployer/src/utils/configLoader.ts +++ /dev/null @@ -1,49 +0,0 @@ -import * as dotenv from 'dotenv' -import * as path from 'path' -import { HttpNetworkConfig, HttpNetworkHDAccountsConfig } from 'hardhat/types/config' -import { ethers } from 'ethers' - -type EthereumNetworksTypes = 'rinkeby' | 'ropsten' | 'kovan' | 'goerli' | 'mainnet' | 'mumbai' | 'matic' - -export const getEnvConfig = (env: string) => { - const envFile = path.resolve(__dirname, `../../config/${env}.env`) - const envLoad = dotenv.config({ path: envFile }) - - if (envLoad.error) { - console.warn('No config found, using default') - return { ETH_MNEMONIC: ethers.Wallet.createRandom().mnemonic!.phrase } - } - - return envLoad.parsed || {} -} - -export const networkConfig = (network: EthereumNetworksTypes): HttpNetworkConfig => { - const config = getEnvConfig('PROD') - const networkConfig: HttpNetworkConfig = { - url: (function (network) { - switch (network) { - case 'mumbai': - return 'https://rpc-mumbai.matic.today/' - - case 'matic': - return 'https://rpc-mainnet.matic.network' - - default: - return `https://${network}.infura.io/v3/${config['INFURA_API_KEY']}` - } - })(network), - accounts: { - mnemonic: config['ETH_MNEMONIC'], - initialIndex: 0, - count: 10, - path: `m/44'/60'/0'/0` - } as HttpNetworkHDAccountsConfig, - gas: 'auto', - gasPrice: 'auto', - gasMultiplier: 1, - timeout: 20000, - httpHeaders: {} - } - - return networkConfig -} diff --git a/old/packages/deployer/src/utils/logger.ts b/old/packages/deployer/src/utils/logger.ts deleted file mode 100644 index 17f7f3fd1..000000000 --- a/old/packages/deployer/src/utils/logger.ts +++ /dev/null @@ -1,34 +0,0 @@ -export interface Logger { - start(text?: string): void - stop(): void - succeed(text?: string): void - fail(text?: string): void - warn(text?: string): void - info(text?: string): void -} - -export const createLogger = async (): Promise => { - let startText = '' - return { - start: function (text: string = '') { - startText = text - console.warn(`[start] ${text}`) - }, - stop: function () { - console.warn(`[stop] ${startText}`) - startText = '' - }, - succeed: function (text: string = '') { - console.warn(`[success] ${startText} ${text}`) - }, - fail: function (text: string = '') { - console.warn(`[fail] ${startText} ${text}`) - }, - warn: function (text: string = '') { - console.warn(`[warn] ${startText} ${text}`) - }, - info: function (text: string = '') { - console.warn(`[info] ${startText} ${text}`) - } - } -} diff --git a/old/packages/deployer/tests/mock.spec.ts b/old/packages/deployer/tests/mock.spec.ts deleted file mode 100644 index 9ddc326c8..000000000 --- a/old/packages/deployer/tests/mock.spec.ts +++ /dev/null @@ -1,3 +0,0 @@ -describe('deployer', function () { - it('todo', () => {}) -}) diff --git a/old/packages/guard/CHANGELOG.md b/old/packages/guard/CHANGELOG.md deleted file mode 100644 index 63fd273bc..000000000 --- a/old/packages/guard/CHANGELOG.md +++ /dev/null @@ -1,2943 +0,0 @@ -# @0xsequence/guard - -## 2.3.8 - -### Patch Changes - -- indexer: update clients -- Updated dependencies - - @0xsequence/account@2.3.8 - - @0xsequence/core@2.3.8 - - @0xsequence/signhub@2.3.8 - - @0xsequence/utils@2.3.8 - -## 2.3.7 - -### Patch Changes - -- Metadata updates -- Updated dependencies - - @0xsequence/account@2.3.7 - - @0xsequence/core@2.3.7 - - @0xsequence/signhub@2.3.7 - - @0xsequence/utils@2.3.7 - -## 2.3.6 - -### Patch Changes - -- New chains -- Updated dependencies - - @0xsequence/account@2.3.6 - - @0xsequence/core@2.3.6 - - @0xsequence/signhub@2.3.6 - - @0xsequence/utils@2.3.6 - -## 2.3.5 - -### Patch Changes - -- Add Frequency Testnet -- Updated dependencies - - @0xsequence/account@2.3.5 - - @0xsequence/core@2.3.5 - - @0xsequence/signhub@2.3.5 - - @0xsequence/utils@2.3.5 - -## 2.3.4 - -### Patch Changes - -- metadata: exclude deprecated methods on rpc client -- Updated dependencies - - @0xsequence/account@2.3.4 - - @0xsequence/core@2.3.4 - - @0xsequence/signhub@2.3.4 - - @0xsequence/utils@2.3.4 - -## 2.3.3 - -### Patch Changes - -- metadata: client update -- Updated dependencies - - @0xsequence/account@2.3.3 - - @0xsequence/core@2.3.3 - - @0xsequence/signhub@2.3.3 - - @0xsequence/utils@2.3.3 - -## 2.3.2 - -### Patch Changes - -- metadata: update rpc client -- Updated dependencies - - @0xsequence/account@2.3.2 - - @0xsequence/core@2.3.2 - - @0xsequence/signhub@2.3.2 - - @0xsequence/utils@2.3.2 - -## 2.3.1 - -### Patch Changes - -- indexer: update rpc client -- Updated dependencies - - @0xsequence/account@2.3.1 - - @0xsequence/core@2.3.1 - - @0xsequence/signhub@2.3.1 - - @0xsequence/utils@2.3.1 - -## 2.3.0 - -### Minor Changes - -- update metadata rpc client - -### Patch Changes - -- Updated dependencies - - @0xsequence/account@2.3.0 - - @0xsequence/core@2.3.0 - - @0xsequence/signhub@2.3.0 - - @0xsequence/utils@2.3.0 - -## 2.2.15 - -### Patch Changes - -- API updates -- Updated dependencies - - @0xsequence/account@2.2.15 - - @0xsequence/core@2.2.15 - - @0xsequence/signhub@2.2.15 - - @0xsequence/utils@2.2.15 - -## 2.2.14 - -### Patch Changes - -- Somnia Testnet and Monad Testnet -- Updated dependencies - - @0xsequence/account@2.2.14 - - @0xsequence/core@2.2.14 - - @0xsequence/signhub@2.2.14 - - @0xsequence/utils@2.2.14 - -## 2.2.13 - -### Patch Changes - -- Add XR1 to all networks -- Updated dependencies - - @0xsequence/account@2.2.13 - - @0xsequence/core@2.2.13 - - @0xsequence/signhub@2.2.13 - - @0xsequence/utils@2.2.13 - -## 2.2.12 - -### Patch Changes - -- Add XR1 -- Updated dependencies - - @0xsequence/account@2.2.12 - - @0xsequence/core@2.2.12 - - @0xsequence/signhub@2.2.12 - - @0xsequence/utils@2.2.12 - -## 2.2.11 - -### Patch Changes - -- Relayer updates -- Updated dependencies - - @0xsequence/account@2.2.11 - - @0xsequence/core@2.2.11 - - @0xsequence/signhub@2.2.11 - - @0xsequence/utils@2.2.11 - -## 2.2.10 - -### Patch Changes - -- Etherlink support -- Updated dependencies - - @0xsequence/account@2.2.10 - - @0xsequence/core@2.2.10 - - @0xsequence/signhub@2.2.10 - - @0xsequence/utils@2.2.10 - -## 2.2.9 - -### Patch Changes - -- Indexer gateway native token balances -- Updated dependencies - - @0xsequence/account@2.2.9 - - @0xsequence/core@2.2.9 - - @0xsequence/signhub@2.2.9 - - @0xsequence/utils@2.2.9 - -## 2.2.8 - -### Patch Changes - -- Add Moonbeam and Moonbase Alpha -- Updated dependencies - - @0xsequence/account@2.2.8 - - @0xsequence/core@2.2.8 - - @0xsequence/signhub@2.2.8 - - @0xsequence/utils@2.2.8 - -## 2.2.7 - -### Patch Changes - -- Update Builder package -- Updated dependencies - - @0xsequence/account@2.2.7 - - @0xsequence/core@2.2.7 - - @0xsequence/signhub@2.2.7 - - @0xsequence/utils@2.2.7 - -## 2.2.6 - -### Patch Changes - -- Update relayer package -- Updated dependencies - - @0xsequence/account@2.2.6 - - @0xsequence/core@2.2.6 - - @0xsequence/signhub@2.2.6 - - @0xsequence/utils@2.2.6 - -## 2.2.5 - -### Patch Changes - -- auth: fix sequence indexer gateway url -- account: immutable wallet proxy hook -- Updated dependencies -- Updated dependencies - - @0xsequence/account@2.2.5 - - @0xsequence/core@2.2.5 - - @0xsequence/signhub@2.2.5 - - @0xsequence/utils@2.2.5 - -## 2.2.4 - -### Patch Changes - -- network: update soneium mainnet block explorer url -- waas: signTypedData intent support -- Updated dependencies -- Updated dependencies - - @0xsequence/account@2.2.4 - - @0xsequence/core@2.2.4 - - @0xsequence/signhub@2.2.4 - - @0xsequence/utils@2.2.4 - -## 2.2.3 - -### Patch Changes - -- provider: updating initWallet to use connected network configs if they exist -- Updated dependencies - - @0xsequence/account@2.2.3 - - @0xsequence/core@2.2.3 - - @0xsequence/signhub@2.2.3 - - @0xsequence/utils@2.2.3 - -## 2.2.2 - -### Patch Changes - -- pass projectAccessKey to relayer at all times -- Updated dependencies - - @0xsequence/account@2.2.2 - - @0xsequence/core@2.2.2 - - @0xsequence/signhub@2.2.2 - - @0xsequence/utils@2.2.2 - -## 2.2.1 - -### Patch Changes - -- waas-ethers: sign typed data -- Updated dependencies - - @0xsequence/account@2.2.1 - - @0xsequence/core@2.2.1 - - @0xsequence/signhub@2.2.1 - - @0xsequence/utils@2.2.1 - -## 2.2.0 - -### Minor Changes - -- indexer: gateway client -- @0xsequence/builder -- upgrade puppeteer to v23.10.3 - -### Patch Changes - -- Updated dependencies -- Updated dependencies -- Updated dependencies - - @0xsequence/account@2.2.0 - - @0xsequence/core@2.2.0 - - @0xsequence/signhub@2.2.0 - - @0xsequence/utils@2.2.0 - -## 2.1.8 - -### Patch Changes - -- Add Soneium Mainnet -- Updated dependencies - - @0xsequence/account@2.1.8 - - @0xsequence/core@2.1.8 - - @0xsequence/signhub@2.1.8 - - @0xsequence/utils@2.1.8 - -## 2.1.7 - -### Patch Changes - -- guard: pass project access key to guard requests -- Updated dependencies - - @0xsequence/account@2.1.7 - - @0xsequence/core@2.1.7 - - @0xsequence/signhub@2.1.7 - - @0xsequence/utils@2.1.7 - -## 2.1.6 - -### Patch Changes - -- Add LAOS and Telos Testnet chains -- Updated dependencies - - @0xsequence/account@2.1.6 - - @0xsequence/core@2.1.6 - - @0xsequence/signhub@2.1.6 - - @0xsequence/utils@2.1.6 - -## 2.1.5 - -### Patch Changes - -- account: save presigned configuration with reference chain id 1 -- Updated dependencies - - @0xsequence/account@2.1.5 - - @0xsequence/core@2.1.5 - - @0xsequence/signhub@2.1.5 - - @0xsequence/utils@2.1.5 - -## 2.1.4 - -### Patch Changes - -- provider: pass projectAccessKey into MuxMessageProvider -- Updated dependencies - - @0xsequence/account@2.1.4 - - @0xsequence/core@2.1.4 - - @0xsequence/signhub@2.1.4 - - @0xsequence/utils@2.1.4 - -## 2.1.3 - -### Patch Changes - -- waas: time drift date fix due to strange browser quirk -- Updated dependencies - - @0xsequence/account@2.1.3 - - @0xsequence/core@2.1.3 - - @0xsequence/signhub@2.1.3 - - @0xsequence/utils@2.1.3 - -## 2.1.2 - -### Patch Changes - -- provider: export analytics correctly -- Updated dependencies - - @0xsequence/account@2.1.2 - - @0xsequence/core@2.1.2 - - @0xsequence/signhub@2.1.2 - - @0xsequence/utils@2.1.2 - -## 2.1.1 - -### Patch Changes - -- Add LAOS chain support -- Updated dependencies - - @0xsequence/account@2.1.1 - - @0xsequence/core@2.1.1 - - @0xsequence/signhub@2.1.1 - - @0xsequence/utils@2.1.1 - -## 2.1.0 - -### Minor Changes - -- account: forward project access key when estimating fees and sending transactions - -### Patch Changes - -- sessions: save signatures with reference chain id -- Updated dependencies -- Updated dependencies - - @0xsequence/account@2.1.0 - - @0xsequence/core@2.1.0 - - @0xsequence/signhub@2.1.0 - - @0xsequence/utils@2.1.0 - -## 2.0.26 - -### Patch Changes - -- account: fix chain id comparison -- Updated dependencies - - @0xsequence/account@2.0.26 - - @0xsequence/core@2.0.26 - - @0xsequence/signhub@2.0.26 - - @0xsequence/utils@2.0.26 - -## 2.0.25 - -### Patch Changes - -- skale-nebula: deploy gas limit = 10m -- Updated dependencies - - @0xsequence/account@2.0.25 - - @0xsequence/core@2.0.25 - - @0xsequence/signhub@2.0.25 - - @0xsequence/utils@2.0.25 - -## 2.0.24 - -### Patch Changes - -- sessions: arweave: configurable gateway url -- waas: use /status to get time drift before sending any intents -- Updated dependencies -- Updated dependencies - - @0xsequence/account@2.0.24 - - @0xsequence/core@2.0.24 - - @0xsequence/signhub@2.0.24 - - @0xsequence/utils@2.0.24 - -## 2.0.23 - -### Patch Changes - -- Add The Root Network support -- Updated dependencies - - @0xsequence/account@2.0.23 - - @0xsequence/core@2.0.23 - - @0xsequence/signhub@2.0.23 - - @0xsequence/utils@2.0.23 - -## 2.0.22 - -### Patch Changes - -- Add SKALE Nebula Mainnet support -- Updated dependencies - - @0xsequence/account@2.0.22 - - @0xsequence/core@2.0.22 - - @0xsequence/signhub@2.0.22 - - @0xsequence/utils@2.0.22 - -## 2.0.21 - -### Patch Changes - -- account: add publishWitnessFor -- Updated dependencies - - @0xsequence/account@2.0.21 - - @0xsequence/core@2.0.21 - - @0xsequence/signhub@2.0.21 - - @0xsequence/utils@2.0.21 - -## 2.0.20 - -### Patch Changes - -- upgrade deps, and improve waas session status handling -- Updated dependencies - - @0xsequence/account@2.0.20 - - @0xsequence/core@2.0.20 - - @0xsequence/signhub@2.0.20 - - @0xsequence/utils@2.0.20 - -## 2.0.19 - -### Patch Changes - -- Add Immutable zkEVM support -- Updated dependencies - - @0xsequence/account@2.0.19 - - @0xsequence/core@2.0.19 - - @0xsequence/signhub@2.0.19 - - @0xsequence/utils@2.0.19 - -## 2.0.18 - -### Patch Changes - -- waas: new contractCall transaction type -- sessions: add arweave owner -- Updated dependencies -- Updated dependencies - - @0xsequence/account@2.0.18 - - @0xsequence/core@2.0.18 - - @0xsequence/signhub@2.0.18 - - @0xsequence/utils@2.0.18 - -## 2.0.17 - -### Patch Changes - -- update waas auth to clear session before signIn -- Updated dependencies - - @0xsequence/account@2.0.17 - - @0xsequence/core@2.0.17 - - @0xsequence/signhub@2.0.17 - - @0xsequence/utils@2.0.17 - -## 2.0.16 - -### Patch Changes - -- Removed Astar chains -- Updated dependencies - - @0xsequence/account@2.0.16 - - @0xsequence/core@2.0.16 - - @0xsequence/signhub@2.0.16 - - @0xsequence/utils@2.0.16 - -## 2.0.15 - -### Patch Changes - -- indexer: update bindings with token balance additions -- Updated dependencies - - @0xsequence/account@2.0.15 - - @0xsequence/core@2.0.15 - - @0xsequence/signhub@2.0.15 - - @0xsequence/utils@2.0.15 - -## 2.0.14 - -### Patch Changes - -- sessions: arweave config reader -- network: add b3 and apechain mainnet configs -- Updated dependencies -- Updated dependencies - - @0xsequence/account@2.0.14 - - @0xsequence/core@2.0.14 - - @0xsequence/signhub@2.0.14 - - @0xsequence/utils@2.0.14 - -## 2.0.13 - -### Patch Changes - -- network: toy-testnet -- Updated dependencies - - @0xsequence/account@2.0.13 - - @0xsequence/core@2.0.13 - - @0xsequence/signhub@2.0.13 - - @0xsequence/utils@2.0.13 - -## 2.0.12 - -### Patch Changes - -- api: update bindings -- Updated dependencies - - @0xsequence/account@2.0.12 - - @0xsequence/core@2.0.12 - - @0xsequence/signhub@2.0.12 - - @0xsequence/utils@2.0.12 - -## 2.0.11 - -### Patch Changes - -- waas: intents test fix -- api: update bindings -- Updated dependencies -- Updated dependencies - - @0xsequence/account@2.0.11 - - @0xsequence/core@2.0.11 - - @0xsequence/signhub@2.0.11 - - @0xsequence/utils@2.0.11 - -## 2.0.10 - -### Patch Changes - -- network: soneium minato testnet -- Updated dependencies - - @0xsequence/account@2.0.10 - - @0xsequence/core@2.0.10 - - @0xsequence/signhub@2.0.10 - - @0xsequence/utils@2.0.10 - -## 2.0.9 - -### Patch Changes - -- network: fix SKALE network name -- Updated dependencies - - @0xsequence/account@2.0.9 - - @0xsequence/core@2.0.9 - - @0xsequence/signhub@2.0.9 - - @0xsequence/utils@2.0.9 - -## 2.0.8 - -### Patch Changes - -- metadata: update bindings -- Updated dependencies - - @0xsequence/account@2.0.8 - - @0xsequence/core@2.0.8 - - @0xsequence/signhub@2.0.8 - - @0xsequence/utils@2.0.8 - -## 2.0.7 - -### Patch Changes - -- wallet request handler fix -- Updated dependencies - - @0xsequence/account@2.0.7 - - @0xsequence/core@2.0.7 - - @0xsequence/signhub@2.0.7 - - @0xsequence/utils@2.0.7 - -## 2.0.6 - -### Patch Changes - -- network: matic -> pol -- Updated dependencies - - @0xsequence/account@2.0.6 - - @0xsequence/core@2.0.6 - - @0xsequence/signhub@2.0.6 - - @0xsequence/utils@2.0.6 - -## 2.0.5 - -### Patch Changes - -- provider: update databeat to 0.9.2 -- Updated dependencies - - @0xsequence/account@2.0.5 - - @0xsequence/core@2.0.5 - - @0xsequence/signhub@2.0.5 - - @0xsequence/utils@2.0.5 - -## 2.0.4 - -### Patch Changes - -- network: add skale-nebula-testnet -- Updated dependencies - - @0xsequence/account@2.0.4 - - @0xsequence/core@2.0.4 - - @0xsequence/signhub@2.0.4 - - @0xsequence/utils@2.0.4 - -## 2.0.3 - -### Patch Changes - -- waas: check session status in SequenceWaaS.isSignedIn() -- Updated dependencies - - @0xsequence/account@2.0.3 - - @0xsequence/core@2.0.3 - - @0xsequence/signhub@2.0.3 - - @0xsequence/utils@2.0.3 - -## 2.0.2 - -### Patch Changes - -- sessions: property convert serialized bignumber hex value to bigint -- Updated dependencies - - @0xsequence/account@2.0.2 - - @0xsequence/core@2.0.2 - - @0xsequence/signhub@2.0.2 - - @0xsequence/utils@2.0.2 - -## 2.0.1 - -### Patch Changes - -- waas: http signature check for authenticator requests -- provider: unwrap legacy json rpc responses -- use json replacer and reviver for bigints -- Updated dependencies -- Updated dependencies -- Updated dependencies - - @0xsequence/account@2.0.1 - - @0xsequence/core@2.0.1 - - @0xsequence/signhub@2.0.1 - - @0xsequence/utils@2.0.1 - -## 2.0.0 - -### Major Changes - -- ethers v6 - -### Patch Changes - -- Updated dependencies - - @0xsequence/account@2.0.0 - - @0xsequence/core@2.0.0 - - @0xsequence/signhub@2.0.0 - - @0xsequence/utils@2.0.0 - -## 1.10.15 - -### Patch Changes - -- utils: extractProjectIdFromAccessKey -- Updated dependencies - - @0xsequence/account@1.10.15 - - @0xsequence/core@1.10.15 - - @0xsequence/signhub@1.10.15 - - @0xsequence/utils@1.10.15 - -## 1.10.14 - -### Patch Changes - -- network: add borne-testnet to allNetworks -- Updated dependencies - - @0xsequence/account@1.10.14 - - @0xsequence/core@1.10.14 - - @0xsequence/signhub@1.10.14 - - @0xsequence/utils@1.10.14 - -## 1.10.13 - -### Patch Changes - -- network: add borne testnet -- Updated dependencies - - @0xsequence/account@1.10.13 - - @0xsequence/core@1.10.13 - - @0xsequence/signhub@1.10.13 - - @0xsequence/utils@1.10.13 - -## 1.10.12 - -### Patch Changes - -- api: update bindings -- global/window -> globalThis -- Updated dependencies -- Updated dependencies - - @0xsequence/account@1.10.12 - - @0xsequence/core@1.10.12 - - @0xsequence/signhub@1.10.12 - - @0xsequence/utils@1.10.12 - -## 1.10.11 - -### Patch Changes - -- waas: updated intent.gen without webrpc types, errors exported from authenticator.gen -- Updated dependencies - - @0xsequence/account@1.10.11 - - @0xsequence/core@1.10.11 - - @0xsequence/signhub@1.10.11 - - @0xsequence/utils@1.10.11 - -## 1.10.10 - -### Patch Changes - -- metadata: update bindings with new contract collections api -- Updated dependencies - - @0xsequence/account@1.10.10 - - @0xsequence/core@1.10.10 - - @0xsequence/signhub@1.10.10 - - @0xsequence/utils@1.10.10 - -## 1.10.9 - -### Patch Changes - -- waas minor update -- Updated dependencies - - @0xsequence/account@1.10.9 - - @0xsequence/core@1.10.9 - - @0xsequence/signhub@1.10.9 - - @0xsequence/utils@1.10.9 - -## 1.10.8 - -### Patch Changes - -- update metadata bindings -- Updated dependencies - - @0xsequence/account@1.10.8 - - @0xsequence/core@1.10.8 - - @0xsequence/signhub@1.10.8 - - @0xsequence/utils@1.10.8 - -## 1.10.7 - -### Patch Changes - -- minor fixes to waas client -- Updated dependencies - - @0xsequence/account@1.10.7 - - @0xsequence/core@1.10.7 - - @0xsequence/signhub@1.10.7 - - @0xsequence/utils@1.10.7 - -## 1.10.6 - -### Patch Changes - -- metadata: update bindings -- Updated dependencies - - @0xsequence/account@1.10.6 - - @0xsequence/core@1.10.6 - - @0xsequence/signhub@1.10.6 - - @0xsequence/utils@1.10.6 - -## 1.10.5 - -### Patch Changes - -- network: ape-chain-testnet -> apechain-testnet -- Updated dependencies - - @0xsequence/account@1.10.5 - - @0xsequence/core@1.10.5 - - @0xsequence/signhub@1.10.5 - - @0xsequence/utils@1.10.5 - -## 1.10.4 - -### Patch Changes - -- network: add b3-sepolia, ape-chain-testnet, blast, blast-sepolia -- Updated dependencies - - @0xsequence/account@1.10.4 - - @0xsequence/core@1.10.4 - - @0xsequence/signhub@1.10.4 - - @0xsequence/utils@1.10.4 - -## 1.10.3 - -### Patch Changes - -- typing fix -- Updated dependencies - - @0xsequence/account@1.10.3 - - @0xsequence/core@1.10.3 - - @0xsequence/signhub@1.10.3 - - @0xsequence/utils@1.10.3 - -## 1.10.2 - -### Patch Changes - -- - waas: add getIdToken method - - indexer: update api client -- Updated dependencies - - @0xsequence/account@1.10.2 - - @0xsequence/core@1.10.2 - - @0xsequence/signhub@1.10.2 - - @0xsequence/utils@1.10.2 - -## 1.10.1 - -### Patch Changes - -- metadata: update bindings -- Updated dependencies - - @0xsequence/account@1.10.1 - - @0xsequence/core@1.10.1 - - @0xsequence/signhub@1.10.1 - - @0xsequence/utils@1.10.1 - -## 1.10.0 - -### Minor Changes - -- waas release v1.3.0 - -### Patch Changes - -- Updated dependencies - - @0xsequence/account@1.10.0 - - @0xsequence/core@1.10.0 - - @0xsequence/signhub@1.10.0 - - @0xsequence/utils@1.10.0 - -## 1.9.37 - -### Patch Changes - -- network: adds nativeToken data to NetworkMetadata constants -- Updated dependencies - - @0xsequence/account@1.9.37 - - @0xsequence/core@1.9.37 - - @0xsequence/signhub@1.9.37 - - @0xsequence/utils@1.9.37 - -## 1.9.36 - -### Patch Changes - -- guard: export client -- Updated dependencies - - @0xsequence/account@1.9.36 - - @0xsequence/core@1.9.36 - - @0xsequence/signhub@1.9.36 - - @0xsequence/utils@1.9.36 - -## 1.9.35 - -### Patch Changes - -- guard: update bindings -- Updated dependencies - - @0xsequence/account@1.9.35 - - @0xsequence/core@1.9.35 - - @0xsequence/signhub@1.9.35 - - @0xsequence/utils@1.9.35 - -## 1.9.34 - -### Patch Changes - -- waas: always use lowercase email -- Updated dependencies - - @0xsequence/account@1.9.34 - - @0xsequence/core@1.9.34 - - @0xsequence/signhub@1.9.34 - - @0xsequence/utils@1.9.34 - -## 1.9.33 - -### Patch Changes - -- waas: umd build -- Updated dependencies - - @0xsequence/account@1.9.33 - - @0xsequence/core@1.9.33 - - @0xsequence/signhub@1.9.33 - - @0xsequence/utils@1.9.33 - -## 1.9.32 - -### Patch Changes - -- indexer: update bindings -- Updated dependencies - - @0xsequence/account@1.9.32 - - @0xsequence/core@1.9.32 - - @0xsequence/signhub@1.9.32 - - @0xsequence/utils@1.9.32 - -## 1.9.31 - -### Patch Changes - -- metadata: token directory changes -- Updated dependencies - - @0xsequence/account@1.9.31 - - @0xsequence/core@1.9.31 - - @0xsequence/signhub@1.9.31 - - @0xsequence/utils@1.9.31 - -## 1.9.30 - -### Patch Changes - -- update -- Updated dependencies - - @0xsequence/account@1.9.30 - - @0xsequence/core@1.9.30 - - @0xsequence/signhub@1.9.30 - - @0xsequence/utils@1.9.30 - -## 1.9.29 - -### Patch Changes - -- disable gnosis chain -- Updated dependencies - - @0xsequence/account@1.9.29 - - @0xsequence/core@1.9.29 - - @0xsequence/signhub@1.9.29 - - @0xsequence/utils@1.9.29 - -## 1.9.28 - -### Patch Changes - -- add utils/merkletree -- Updated dependencies - - @0xsequence/account@1.9.28 - - @0xsequence/core@1.9.28 - - @0xsequence/signhub@1.9.28 - - @0xsequence/utils@1.9.28 - -## 1.9.27 - -### Patch Changes - -- network: optimistic -> optimism -- waas: remove defaults -- api, sessions: update bindings -- Updated dependencies -- Updated dependencies -- Updated dependencies - - @0xsequence/account@1.9.27 - - @0xsequence/core@1.9.27 - - @0xsequence/signhub@1.9.27 - - @0xsequence/utils@1.9.27 - -## 1.9.26 - -### Patch Changes - -- - add backend interfaces for pluggable interfaces - - introduce @0xsequence/react-native - - update pnpm to lockfile v9 -- Updated dependencies - - @0xsequence/account@1.9.26 - - @0xsequence/core@1.9.26 - - @0xsequence/signhub@1.9.26 - - @0xsequence/utils@1.9.26 - -## 1.9.25 - -### Patch Changes - -- update webrpc clients with new error types -- Updated dependencies - - @0xsequence/account@1.9.25 - - @0xsequence/core@1.9.25 - - @0xsequence/signhub@1.9.25 - - @0xsequence/utils@1.9.25 - -## 1.9.24 - -### Patch Changes - -- waas: add memoryStore backend to localStore -- Updated dependencies - - @0xsequence/account@1.9.24 - - @0xsequence/core@1.9.24 - - @0xsequence/signhub@1.9.24 - - @0xsequence/utils@1.9.24 - -## 1.9.23 - -### Patch Changes - -- update api client bindings -- Updated dependencies - - @0xsequence/account@1.9.23 - - @0xsequence/core@1.9.23 - - @0xsequence/signhub@1.9.23 - - @0xsequence/utils@1.9.23 - -## 1.9.22 - -### Patch Changes - -- update metadata client bindings -- Updated dependencies - - @0xsequence/account@1.9.22 - - @0xsequence/core@1.9.22 - - @0xsequence/signhub@1.9.22 - - @0xsequence/utils@1.9.22 - -## 1.9.21 - -### Patch Changes - -- api client bindings -- Updated dependencies - - @0xsequence/account@1.9.21 - - @0xsequence/core@1.9.21 - - @0xsequence/signhub@1.9.21 - - @0xsequence/utils@1.9.21 - -## 1.9.20 - -### Patch Changes - -- api client bindings update -- Updated dependencies - - @0xsequence/account@1.9.20 - - @0xsequence/core@1.9.20 - - @0xsequence/signhub@1.9.20 - - @0xsequence/utils@1.9.20 - -## 1.9.19 - -### Patch Changes - -- waas update -- Updated dependencies - - @0xsequence/account@1.9.19 - - @0xsequence/core@1.9.19 - - @0xsequence/signhub@1.9.19 - - @0xsequence/utils@1.9.19 - -## 1.9.18 - -### Patch Changes - -- provider: prohibit dangerous functions -- Updated dependencies - - @0xsequence/account@1.9.18 - - @0xsequence/core@1.9.18 - - @0xsequence/signhub@1.9.18 - - @0xsequence/utils@1.9.18 - -## 1.9.17 - -### Patch Changes - -- network: add xr-sepolia -- Updated dependencies - - @0xsequence/account@1.9.17 - - @0xsequence/core@1.9.17 - - @0xsequence/signhub@1.9.17 - - @0xsequence/utils@1.9.17 - -## 1.9.16 - -### Patch Changes - -- waas: sequence.feeOptions -- Updated dependencies - - @0xsequence/account@1.9.16 - - @0xsequence/core@1.9.16 - - @0xsequence/signhub@1.9.16 - - @0xsequence/utils@1.9.16 - -## 1.9.15 - -### Patch Changes - -- metadata: collection external_link field name fix -- Updated dependencies - - @0xsequence/account@1.9.15 - - @0xsequence/core@1.9.15 - - @0xsequence/signhub@1.9.15 - - @0xsequence/utils@1.9.15 - -## 1.9.14 - -### Patch Changes - -- network: astar-zkatana -> astar-zkyoto -- network: deprecate polygon mumbai network -- network: add xai and polygon amoy -- Updated dependencies -- Updated dependencies -- Updated dependencies - - @0xsequence/account@1.9.14 - - @0xsequence/core@1.9.14 - - @0xsequence/signhub@1.9.14 - - @0xsequence/utils@1.9.14 - -## 1.9.13 - -### Patch Changes - -- waas: fix @0xsequence/network dependency -- Updated dependencies - - @0xsequence/account@1.9.13 - - @0xsequence/core@1.9.13 - - @0xsequence/signhub@1.9.13 - - @0xsequence/utils@1.9.13 - -## 1.9.12 - -### Patch Changes - -- indexer: update rpc bindings -- provider: signMessage: Serialize the BytesLike or string message into hexstring before sending -- waas: SessionAuthProof -- Updated dependencies -- Updated dependencies -- Updated dependencies - - @0xsequence/account@1.9.12 - - @0xsequence/core@1.9.12 - - @0xsequence/signhub@1.9.12 - - @0xsequence/utils@1.9.12 - -## 1.9.11 - -### Patch Changes - -- metdata, update rpc bindings -- Updated dependencies - - @0xsequence/account@1.9.11 - - @0xsequence/core@1.9.11 - - @0xsequence/signhub@1.9.11 - - @0xsequence/utils@1.9.11 - -## 1.9.10 - -### Patch Changes - -- update metadata rpc bindings -- Updated dependencies - - @0xsequence/account@1.9.10 - - @0xsequence/core@1.9.10 - - @0xsequence/signhub@1.9.10 - - @0xsequence/utils@1.9.10 - -## 1.9.9 - -### Patch Changes - -- metadata, add SequenceCollections rpc client -- Updated dependencies - - @0xsequence/account@1.9.9 - - @0xsequence/core@1.9.9 - - @0xsequence/signhub@1.9.9 - - @0xsequence/utils@1.9.9 - -## 1.9.8 - -### Patch Changes - -- waas client update -- Updated dependencies - - @0xsequence/account@1.9.8 - - @0xsequence/core@1.9.8 - - @0xsequence/signhub@1.9.8 - - @0xsequence/utils@1.9.8 - -## 1.9.7 - -### Patch Changes - -- update rpc client bindings for api, metadata and relayer -- Updated dependencies - - @0xsequence/account@1.9.7 - - @0xsequence/core@1.9.7 - - @0xsequence/signhub@1.9.7 - - @0xsequence/utils@1.9.7 - -## 1.9.6 - -### Patch Changes - -- waas package update -- Updated dependencies - - @0xsequence/account@1.9.6 - - @0xsequence/core@1.9.6 - - @0xsequence/signhub@1.9.6 - - @0xsequence/utils@1.9.6 - -## 1.9.5 - -### Patch Changes - -- RpcRelayer prioritize project access key -- Updated dependencies - - @0xsequence/account@1.9.5 - - @0xsequence/core@1.9.5 - - @0xsequence/signhub@1.9.5 - - @0xsequence/utils@1.9.5 - -## 1.9.4 - -### Patch Changes - -- waas: fix network dependency -- Updated dependencies - - @0xsequence/account@1.9.4 - - @0xsequence/core@1.9.4 - - @0xsequence/signhub@1.9.4 - - @0xsequence/utils@1.9.4 - -## 1.9.3 - -### Patch Changes - -- provider: don't append access key to RPC url if user has already provided it -- Updated dependencies - - @0xsequence/account@1.9.3 - - @0xsequence/core@1.9.3 - - @0xsequence/signhub@1.9.3 - - @0xsequence/utils@1.9.3 - -## 1.9.2 - -### Patch Changes - -- network: add xai-sepolia -- Updated dependencies - - @0xsequence/account@1.9.2 - - @0xsequence/core@1.9.2 - - @0xsequence/signhub@1.9.2 - - @0xsequence/utils@1.9.2 - -## 1.9.1 - -### Patch Changes - -- analytics fix -- Updated dependencies - - @0xsequence/account@1.9.1 - - @0xsequence/core@1.9.1 - - @0xsequence/signhub@1.9.1 - - @0xsequence/utils@1.9.1 - -## 1.9.0 - -### Minor Changes - -- waas release - -### Patch Changes - -- Updated dependencies - - @0xsequence/account@1.9.0 - - @0xsequence/core@1.9.0 - - @0xsequence/signhub@1.9.0 - - @0xsequence/utils@1.9.0 - -## 1.8.8 - -### Patch Changes - -- update metadata bindings -- Updated dependencies - - @0xsequence/account@1.8.8 - - @0xsequence/core@1.8.8 - - @0xsequence/signhub@1.8.8 - - @0xsequence/utils@1.8.8 - -## 1.8.7 - -### Patch Changes - -- provider: update databeat to 0.9.1 -- Updated dependencies - - @0xsequence/account@1.8.7 - - @0xsequence/core@1.8.7 - - @0xsequence/signhub@1.8.7 - - @0xsequence/utils@1.8.7 - -## 1.8.6 - -### Patch Changes - -- guard: SignedOwnershipProof -- Updated dependencies - - @0xsequence/account@1.8.6 - - @0xsequence/core@1.8.6 - - @0xsequence/signhub@1.8.6 - - @0xsequence/utils@1.8.6 - -## 1.8.5 - -### Patch Changes - -- guard: signOwnershipProof and isSignedOwnershipProof -- Updated dependencies - - @0xsequence/account@1.8.5 - - @0xsequence/core@1.8.5 - - @0xsequence/signhub@1.8.5 - - @0xsequence/utils@1.8.5 - -## 1.8.4 - -### Patch Changes - -- network: add homeverse to networks list -- Updated dependencies - - @0xsequence/account@1.8.4 - - @0xsequence/core@1.8.4 - - @0xsequence/signhub@1.8.4 - - @0xsequence/utils@1.8.4 - -## 1.8.3 - -### Patch Changes - -- api: introduce basic linked wallet support -- Updated dependencies - - @0xsequence/account@1.8.3 - - @0xsequence/core@1.8.3 - - @0xsequence/signhub@1.8.3 - - @0xsequence/utils@1.8.3 - -## 1.8.2 - -### Patch Changes - -- provider: don't initialize analytics unless explicitly requested -- Updated dependencies - - @0xsequence/account@1.8.2 - - @0xsequence/core@1.8.2 - - @0xsequence/signhub@1.8.2 - - @0xsequence/utils@1.8.2 - -## 1.8.1 - -### Patch Changes - -- update to analytics provider -- Updated dependencies - - @0xsequence/account@1.8.1 - - @0xsequence/core@1.8.1 - - @0xsequence/signhub@1.8.1 - - @0xsequence/utils@1.8.1 - -## 1.8.0 - -### Minor Changes - -- provider: project analytics - -### Patch Changes - -- Updated dependencies - - @0xsequence/account@1.8.0 - - @0xsequence/core@1.8.0 - - @0xsequence/signhub@1.8.0 - - @0xsequence/utils@1.8.0 - -## 1.7.2 - -### Patch Changes - -- 0xsequence: ChainId should not be exported as a type -- account, wallet: fix nonce selection -- Updated dependencies -- Updated dependencies - - @0xsequence/account@1.7.2 - - @0xsequence/core@1.7.2 - - @0xsequence/signhub@1.7.2 - - @0xsequence/utils@1.7.2 - -## 1.7.1 - -### Patch Changes - -- network: add missing avalanche logoURI -- Updated dependencies - - @0xsequence/account@1.7.1 - - @0xsequence/core@1.7.1 - - @0xsequence/signhub@1.7.1 - - @0xsequence/utils@1.7.1 - -## 1.7.0 - -### Minor Changes - -- provider: projectAccessKey is now required - -### Patch Changes - -- network: add NetworkMetadata.logoURI property for all networks -- Updated dependencies -- Updated dependencies - - @0xsequence/account@1.7.0 - - @0xsequence/core@1.7.0 - - @0xsequence/signhub@1.7.0 - - @0xsequence/utils@1.7.0 - -## 1.6.3 - -### Patch Changes - -- network list update -- Updated dependencies - - @0xsequence/account@1.6.3 - - @0xsequence/core@1.6.3 - - @0xsequence/signhub@1.6.3 - - @0xsequence/utils@1.6.3 - -## 1.6.2 - -### Patch Changes - -- auth: projectAccessKey option -- wallet: use 12 bytes for random space -- Updated dependencies -- Updated dependencies - - @0xsequence/account@1.6.2 - - @0xsequence/core@1.6.2 - - @0xsequence/signhub@1.6.2 - - @0xsequence/utils@1.6.2 - -## 1.6.1 - -### Patch Changes - -- core: add simple config from subdigest support -- core: fix encode tree with subdigest -- account: implement buildOnChainSignature on Account -- Updated dependencies -- Updated dependencies -- Updated dependencies - - @0xsequence/account@1.6.1 - - @0xsequence/core@1.6.1 - - @0xsequence/signhub@1.6.1 - - @0xsequence/utils@1.6.1 - -## 1.6.0 - -### Minor Changes - -- account, wallet: parallel transactions by default - -### Patch Changes - -- provider: emit disconnect on sign out -- Updated dependencies -- Updated dependencies - - @0xsequence/account@1.6.0 - - @0xsequence/core@1.6.0 - - @0xsequence/signhub@1.6.0 - - @0xsequence/utils@1.6.0 - -## 1.5.0 - -### Minor Changes - -- signhub: add 'signing' signer status - -### Patch Changes - -- auth: Session.open: onAccountAddress callback -- account: allow empty transaction bundles -- Updated dependencies -- Updated dependencies -- Updated dependencies - - @0xsequence/account@1.5.0 - - @0xsequence/core@1.5.0 - - @0xsequence/signhub@1.5.0 - - @0xsequence/utils@1.5.0 - -## 1.4.9 - -### Patch Changes - -- rename SequenceMetadataClient to SequenceMetadata -- Updated dependencies - - @0xsequence/account@1.4.9 - - @0xsequence/core@1.4.9 - - @0xsequence/signhub@1.4.9 - - @0xsequence/utils@1.4.9 - -## 1.4.8 - -### Patch Changes - -- account: Account.getSigners -- Updated dependencies - - @0xsequence/account@1.4.8 - - @0xsequence/core@1.4.8 - - @0xsequence/signhub@1.4.8 - - @0xsequence/utils@1.4.8 - -## 1.4.7 - -### Patch Changes - -- update indexer client bindings -- Updated dependencies - - @0xsequence/account@1.4.7 - - @0xsequence/core@1.4.7 - - @0xsequence/signhub@1.4.7 - - @0xsequence/utils@1.4.7 - -## 1.4.6 - -### Patch Changes - -- - add sepolia networks, mark goerli as deprecated - - update indexer client bindings -- Updated dependencies - - @0xsequence/account@1.4.6 - - @0xsequence/core@1.4.6 - - @0xsequence/signhub@1.4.6 - - @0xsequence/utils@1.4.6 - -## 1.4.5 - -### Patch Changes - -- indexer/metadata: update client bindings -- auth: selectWallet with new address -- Updated dependencies -- Updated dependencies - - @0xsequence/account@1.4.5 - - @0xsequence/core@1.4.5 - - @0xsequence/signhub@1.4.5 - - @0xsequence/utils@1.4.5 - -## 1.4.4 - -### Patch Changes - -- indexer: update bindings -- auth: handle jwt expiry -- Updated dependencies -- Updated dependencies - - @0xsequence/account@1.4.4 - - @0xsequence/core@1.4.4 - - @0xsequence/signhub@1.4.4 - - @0xsequence/utils@1.4.4 - -## 1.4.3 - -### Patch Changes - -- guard: return active status from GuardSigner.getAuthMethods -- Updated dependencies - - @0xsequence/account@1.4.3 - - @0xsequence/core@1.4.3 - - @0xsequence/signhub@1.4.3 - - @0xsequence/utils@1.4.3 - -## 1.4.2 - -### Patch Changes - -- guard: update bindings -- Updated dependencies - - @0xsequence/account@1.4.2 - - @0xsequence/core@1.4.2 - - @0xsequence/signhub@1.4.2 - - @0xsequence/utils@1.4.2 - -## 1.4.1 - -### Patch Changes - -- network: remove unused networks -- signhub: orchestrator interface -- guard: auth methods interface -- guard: update bindings for pin and totp -- guard: no more retry logic -- Updated dependencies -- Updated dependencies -- Updated dependencies -- Updated dependencies -- Updated dependencies - - @0xsequence/account@1.4.1 - - @0xsequence/core@1.4.1 - - @0xsequence/signhub@1.4.1 - - @0xsequence/utils@1.4.1 - -## 1.4.0 - -### Minor Changes - -- project access key support - -### Patch Changes - -- Updated dependencies - - @0xsequence/core@1.4.0 - - @0xsequence/signhub@1.4.0 - -## 1.3.0 - -### Minor Changes - -- signhub: account children - -### Patch Changes - -- guard: do not throw when building deploy transaction -- network: snowtrace.io -> subnets.avax.network/c-chain -- Updated dependencies -- Updated dependencies -- Updated dependencies - - @0xsequence/core@1.3.0 - - @0xsequence/signhub@1.3.0 - -## 1.2.9 - -### Patch Changes - -- account: AccountSigner.sendTransaction simulateForFeeOptions -- relayer: update bindings -- Updated dependencies -- Updated dependencies - - @0xsequence/core@1.2.9 - - @0xsequence/signhub@1.2.9 - -## 1.2.8 - -### Patch Changes - -- rename X-Sequence-Token-Key header to X-Access-Key -- Updated dependencies - - @0xsequence/core@1.2.8 - - @0xsequence/signhub@1.2.8 - -## 1.2.7 - -### Patch Changes - -- add x-sequence-token-key to clients -- Updated dependencies - - @0xsequence/core@1.2.7 - - @0xsequence/signhub@1.2.7 - -## 1.2.6 - -### Patch Changes - -- Fix bind multicall provider -- Updated dependencies - - @0xsequence/core@1.2.6 - - @0xsequence/signhub@1.2.6 - -## 1.2.5 - -### Patch Changes - -- Multicall default configuration fixes -- Updated dependencies - - @0xsequence/core@1.2.5 - - @0xsequence/signhub@1.2.5 - -## 1.2.4 - -### Patch Changes - -- provider: Adding missing payment provider types to PaymentProviderOption -- provider: WalletRequestHandler.notifyChainChanged -- Updated dependencies -- Updated dependencies - - @0xsequence/core@1.2.4 - - @0xsequence/signhub@1.2.4 - -## 1.2.3 - -### Patch Changes - -- auth, provider: connect to accept optional authorizeNonce -- Updated dependencies - - @0xsequence/core@1.2.3 - - @0xsequence/signhub@1.2.3 - -## 1.2.2 - -### Patch Changes - -- provider: allow createContract calls -- core: check for explicit zero address in contract deployments -- Updated dependencies -- Updated dependencies - - @0xsequence/core@1.2.2 - - @0xsequence/signhub@1.2.2 - -## 1.2.1 - -### Patch Changes - -- auth: use sequence api chain id as reference chain id if available -- Updated dependencies - - @0xsequence/core@1.2.1 - - @0xsequence/signhub@1.2.1 - -## 1.2.0 - -### Minor Changes - -- split services from session, better local support - -### Patch Changes - -- Updated dependencies - - @0xsequence/core@1.2.0 - - @0xsequence/signhub@1.2.0 - -## 1.1.15 - -### Patch Changes - -- guard: remove error filtering -- Updated dependencies - - @0xsequence/core@1.1.15 - - @0xsequence/signhub@1.1.15 - -## 1.1.14 - -### Patch Changes - -- guard: add GuardSigner.onError -- Updated dependencies - - @0xsequence/core@1.1.14 - - @0xsequence/signhub@1.1.14 - -## 1.1.13 - -### Patch Changes - -- provider: pass client version with connect options -- provider: removing large from BannerSize -- Updated dependencies -- Updated dependencies - - @0xsequence/core@1.1.13 - - @0xsequence/signhub@1.1.13 - -## 1.1.12 - -### Patch Changes - -- provider: adding bannerSize to ConnectOptions -- Updated dependencies - - @0xsequence/core@1.1.12 - - @0xsequence/signhub@1.1.12 - -## 1.1.11 - -### Patch Changes - -- add homeverse configs -- Updated dependencies - - @0xsequence/core@1.1.11 - - @0xsequence/signhub@1.1.11 - -## 1.1.10 - -### Patch Changes - -- handle default EIP6492 on send -- Updated dependencies - - @0xsequence/core@1.1.10 - - @0xsequence/signhub@1.1.10 - -## 1.1.9 - -### Patch Changes - -- Custom default EIP6492 on client -- Updated dependencies - - @0xsequence/core@1.1.9 - - @0xsequence/signhub@1.1.9 - -## 1.1.8 - -### Patch Changes - -- metadata: searchMetadata: add types filter -- Updated dependencies - - @0xsequence/core@1.1.8 - - @0xsequence/signhub@1.1.8 - -## 1.1.7 - -### Patch Changes - -- adding signInWith connect settings option to allow dapps to automatically login their users with a certain provider optimizing the normal authentication flow -- Updated dependencies - - @0xsequence/core@1.1.7 - - @0xsequence/signhub@1.1.7 - -## 1.1.6 - -### Patch Changes - -- metadata: searchMetadata: add chainID and excludeTokenMetadata filters -- Updated dependencies - - @0xsequence/core@1.1.6 - - @0xsequence/signhub@1.1.6 - -## 1.1.5 - -### Patch Changes - -- account: re-compute meta-transaction id for wallet deployment transactions -- Updated dependencies - - @0xsequence/core@1.1.5 - - @0xsequence/signhub@1.1.5 - -## 1.1.4 - -### Patch Changes - -- network: rename base-mainnet to base -- provider: override isDefaultChain with ConnectOptions.networkId if provided -- Updated dependencies -- Updated dependencies - - @0xsequence/core@1.1.4 - - @0xsequence/signhub@1.1.4 - -## 1.1.3 - -### Patch Changes - -- provider: use network id from transport session -- provider: sign authorization using ConnectOptions.networkId if provided -- Updated dependencies -- Updated dependencies - - @0xsequence/core@1.1.3 - - @0xsequence/signhub@1.1.3 - -## 1.1.2 - -### Patch Changes - -- provider: jsonrpc chain id fixes -- Updated dependencies - - @0xsequence/core@1.1.2 - - @0xsequence/signhub@1.1.2 - -## 1.1.1 - -### Patch Changes - -- network: add base mainnet and sepolia -- provider: reject toxic transaction requests -- Updated dependencies -- Updated dependencies - - @0xsequence/core@1.1.1 - - @0xsequence/signhub@1.1.1 - -## 1.1.0 - -### Minor Changes - -- Refactor dapp facing provider - -### Patch Changes - -- Updated dependencies - - @0xsequence/core@1.1.0 - - @0xsequence/signhub@1.1.0 - -## 1.0.5 - -### Patch Changes - -- network: export network constants -- guard: use the correct global for fetch -- network: nova-explorer.arbitrum.io -> nova.arbiscan.io -- Updated dependencies -- Updated dependencies -- Updated dependencies - - @0xsequence/core@1.0.5 - - @0xsequence/signhub@1.0.5 - -## 1.0.4 - -### Patch Changes - -- provider: accept name or number for networkId -- Updated dependencies - - @0xsequence/core@1.0.4 - - @0xsequence/signhub@1.0.4 - -## 1.0.3 - -### Patch Changes - -- Simpler isValidSignature helpers -- Updated dependencies - - @0xsequence/core@1.0.3 - - @0xsequence/signhub@1.0.3 - -## 1.0.2 - -### Patch Changes - -- add extra signature validation utils methods -- Updated dependencies - - @0xsequence/core@1.0.2 - - @0xsequence/signhub@1.0.2 - -## 1.0.1 - -### Patch Changes - -- add homeverse testnet -- Updated dependencies - - @0xsequence/core@1.0.1 - - @0xsequence/signhub@1.0.1 - -## 1.0.0 - -### Major Changes - -- https://sequence.xyz/blog/sequence-wallet-light-state-sync-full-merkle-wallets - -### Patch Changes - -- Updated dependencies - - @0xsequence/core@1.0.0 - - @0xsequence/signhub@1.0.0 - -## 0.43.34 - -### Patch Changes - -- auth: no jwt for indexer - -## 0.43.33 - -### Patch Changes - -- Adding onConnectOptionsChange handler to WalletRequestHandler - -## 0.43.32 - -### Patch Changes - -- add Base Goerli network - -## 0.43.31 - -### Patch Changes - -- remove AuxDataProvider, add promptSignInConnect - -## 0.43.30 - -### Patch Changes - -- add arbitrum goerli testnet - -## 0.43.29 - -### Patch Changes - -- provider: check availability of window object - -## 0.43.28 - -### Patch Changes - -- update api bindings - -## 0.43.27 - -### Patch Changes - -- Add rpc is sequence method - -## 0.43.26 - -### Patch Changes - -- add zkevm url to enum - -## 0.43.25 - -### Patch Changes - -- added polygon zkevm to mainnet networks - -## 0.43.24 - -### Patch Changes - -- name change from zkevm to polygon-zkevm - -## 0.43.23 - -### Patch Changes - -- update zkEVM name to Polygon zkEVM - -## 0.43.22 - -### Patch Changes - -- add zkevm chain - -## 0.43.21 - -### Patch Changes - -- api: update client bindings - -## 0.43.20 - -### Patch Changes - -- indexer: update bindings - -## 0.43.19 - -### Patch Changes - -- session proof update - -## 0.43.18 - -### Patch Changes - -- rpc client global check, hardening - -## 0.43.17 - -### Patch Changes - -- rpc clients, check of 'global' is defined - -## 0.43.16 - -### Patch Changes - -- ethers peerDep to v5, update rpc client global use - -## 0.43.15 - -### Patch Changes - -- - provider: expand receiver type on some util methods - -## 0.43.14 - -### Patch Changes - -- bump - -## 0.43.13 - -### Patch Changes - -- update rpc bindings - -## 0.43.12 - -### Patch Changes - -- provider: single wallet init, and add new unregisterWallet() method - -## 0.43.11 - -### Patch Changes - -- fix lockfiles -- re-add mocha type deleter - -## 0.43.10 - -### Patch Changes - -- various improvements - -## 0.43.9 - -### Patch Changes - -- update deps - -## 0.43.8 - -### Patch Changes - -- network: JsonRpcProvider with caching - -## 0.43.7 - -### Patch Changes - -- provider: fix wallet network init - -## 0.43.6 - -### Patch Changes - -- metadatata: update rpc bindings - -## 0.43.5 - -### Patch Changes - -- provider: do not set default network for connect messages -- provider: forward missing error message - -## 0.43.4 - -### Patch Changes - -- no-change version bump to fix incorrectly tagged snapshot build - -## 0.43.3 - -### Patch Changes - -- metadata: update bindings - -## 0.43.2 - -### Patch Changes - -- provider: implement connectUnchecked - -## 0.43.1 - -### Patch Changes - -- update to latest ethauth dep - -## 0.43.0 - -### Minor Changes - -- move ethers to a peer dependency - -## 0.42.10 - -### Patch Changes - -- add auxDataProvider - -## 0.42.9 - -### Patch Changes - -- provider: add eip-191 exceptions - -## 0.42.8 - -### Patch Changes - -- provider: skip setting intent origin if we're unity plugin - -## 0.42.7 - -### Patch Changes - -- Add sign in options to connection settings - -## 0.42.6 - -### Patch Changes - -- api bindings update - -## 0.42.5 - -### Patch Changes - -- relayer: don't treat missing receipt as hard failure - -## 0.42.4 - -### Patch Changes - -- provider: add custom app protocol to connect options - -## 0.42.3 - -### Patch Changes - -- update api bindings - -## 0.42.2 - -### Patch Changes - -- disable rinkeby network - -## 0.42.1 - -### Patch Changes - -- wallet: optional waitForReceipt parameter - -## 0.42.0 - -### Minor Changes - -- relayer: estimateGasLimits -> simulate -- add simulator package - -### Patch Changes - -- transactions: fix flattenAuxTransactions -- provider: only filter nullish values -- provider: re-map transaction 'gas' back to 'gasLimit' - -## 0.41.3 - -### Patch Changes - -- api bindings update - -## 0.41.2 - -### Patch Changes - -- api bindings update - -## 0.41.1 - -### Patch Changes - -- update default networks - -## 0.41.0 - -### Minor Changes - -- relayer: fix Relayer.wait() interface - - The interface for calling Relayer.wait() has changed. Instead of a single optional ill-defined timeout/delay parameter, there are three optional parameters, in order: - - - timeout: the maximum time to wait for the transaction receipt - - delay: the polling interval, i.e. the time to wait between requests - - maxFails: the maximum number of hard failures to tolerate before giving up - - Please update your codebase accordingly. - -- relayer: add optional waitForReceipt parameter to Relayer.relay - - The behaviour of Relayer.relay() was not well-defined with respect to whether or not it waited for a receipt. - This change allows the caller to specify whether to wait or not, with the default behaviour being to wait. - -### Patch Changes - -- relayer: wait receipt retry logic -- fix wrapped object error -- provider: forward delegateCall and revertOnError transaction fields - -## 0.40.6 - -### Patch Changes - -- add arbitrum-nova chain - -## 0.40.5 - -### Patch Changes - -- api: update bindings - -## 0.40.4 - -### Patch Changes - -- add unreal transport - -## 0.40.3 - -### Patch Changes - -- provider: fix MessageToSign message type - -## 0.40.2 - -### Patch Changes - -- Wallet provider, loadSession method - -## 0.40.1 - -### Patch Changes - -- export sequence.initWallet and sequence.getWallet - -## 0.40.0 - -### Minor Changes - -- add sequence.initWallet(network, config) and sequence.getWallet() helper methods - -## 0.39.6 - -### Patch Changes - -- indexer: update client bindings - -## 0.39.5 - -### Patch Changes - -- provider: fix networkRpcUrl config option - -## 0.39.4 - -### Patch Changes - -- api: update client bindings - -## 0.39.3 - -### Patch Changes - -- add request method on Web3Provider - -## 0.39.2 - -### Patch Changes - -- update umd name - -## 0.39.1 - -### Patch Changes - -- add Aurora network -- add origin info for accountsChanged event to handle it per dapp - -## 0.39.0 - -### Minor Changes - -- abstract window.localStorage to interface type - -## 0.38.2 - -### Patch Changes - -- provider: add Settings.defaultPurchaseAmount - -## 0.38.1 - -### Patch Changes - -- update api and metadata rpc bindings - -## 0.38.0 - -### Minor Changes - -- api: update bindings, change TokenPrice interface -- bridge: remove @0xsequence/bridge package -- api: update bindings, rename ContractCallArg to TupleComponent - -## 0.37.1 - -### Patch Changes - -- Add back sortNetworks - Removing sorting was a breaking change for dapps on older versions which directly integrate sequence. - -## 0.37.0 - -### Minor Changes - -- network related fixes and improvements -- api: bindings: exchange rate lookups - -## 0.36.13 - -### Patch Changes - -- api: update bindings with new price endpoints - -## 0.36.12 - -### Patch Changes - -- wallet: skip remote signers if not needed -- auth: check that signature meets threshold before requesting auth token - -## 0.36.11 - -### Patch Changes - -- Prefix EIP191 message on wallet-request-handler - -## 0.36.10 - -### Patch Changes - -- support bannerUrl on connect - -## 0.36.9 - -### Patch Changes - -- minor dev xp improvements - -## 0.36.8 - -### Patch Changes - -- more connect options (theme, payment providers, funding currencies) - -## 0.36.7 - -### Patch Changes - -- fix missing break - -## 0.36.6 - -### Patch Changes - -- wallet_switchEthereumChain support - -## 0.36.5 - -### Patch Changes - -- auth: bump ethauth to 0.7.0 - network, wallet: don't assume position of auth network in list - api/indexer/metadata: trim trailing slash on hostname, and add endpoint urls - relayer: Allow to specify local relayer transaction parameters like gas price or gas limit - -## 0.36.4 - -### Patch Changes - -- Updating list of chain ids to include other ethereum compatible chains - -## 0.36.3 - -### Patch Changes - -- provider: pass connect options to prompter methods - -## 0.36.2 - -### Patch Changes - -- transactions: Setting target to 0x0 when empty to during SequenceTxAbiEncode - -## 0.36.1 - -### Patch Changes - -- metadata: update client with more fields - -## 0.36.0 - -### Minor Changes - -- relayer, wallet: fee quote support - -## 0.35.12 - -### Patch Changes - -- provider: rename wallet.commands to wallet.utils - -## 0.35.11 - -### Patch Changes - -- provider/utils: smoother message validation - -## 0.35.10 - -### Patch Changes - -- upgrade deps - -## 0.35.9 - -### Patch Changes - -- provider: window-transport override event handlers with new wallet instance - -## 0.35.8 - -### Patch Changes - -- provider: async wallet sign in improvements - -## 0.35.7 - -### Patch Changes - -- config: cache wallet configs - -## 0.35.6 - -### Patch Changes - -- provider: support async signin of wallet request handler - -## 0.35.5 - -### Patch Changes - -- wallet: skip threshold check during fee estimation - -## 0.35.4 - -### Patch Changes - -- - browser extension mode, center window - -## 0.35.3 - -### Patch Changes - -- - update window position when in browser extension mode - -## 0.35.2 - -### Patch Changes - -- - provider: WindowMessageHandler accept optional windowHref - -## 0.35.1 - -### Patch Changes - -- wallet: update config on undeployed too - -## 0.35.0 - -### Minor Changes - -- - config: add buildStubSignature - - provider: add checks to signing cases for wallet deployment and config statuses - - provider: add prompt for wallet deployment - - relayer: add BaseRelayer.prependWalletDeploy - - relayer: add Relayer.feeOptions - - relayer: account for wallet deployment in fee estimation - - transactions: add fromTransactionish - - wallet: add Account.prependConfigUpdate - - wallet: add Account.getFeeOptions - -## 0.34.0 - -### Minor Changes - -- - upgrade deps - -## 0.31.0 - -### Minor Changes - -- - upgrading to ethers v5.5 - -## 0.30.0 - -### Minor Changes - -- - upgrade most deps - -## 0.29.8 - -### Patch Changes - -- update api - -## 0.28.0 - -### Minor Changes - -- extension provider - -## 0.27.0 - -### Minor Changes - -- Add requireFreshSigner lib to sessions - -## 0.25.1 - -### Patch Changes - -- Fix build typescrypt issue - -## 0.25.0 - -### Minor Changes - -- 10c8af8: Add estimator package - Fix multicall few calls bug - -## 0.23.0 - -### Minor Changes - -- - relayer: offer variety of gas fee options from the relayer service" - -## 0.22.2 - -### Patch Changes - -- e1c109e: Fix authProof on expired sessions - -## 0.22.1 - -### Patch Changes - -- transport session cache - -## 0.22.0 - -### Minor Changes - -- e667b65: Expose all relayer options on networks - -## 0.21.5 - -### Patch Changes - -- Give priority to metaTxnId returned by relayer - -## 0.21.4 - -### Patch Changes - -- Add has enough signers method - -## 0.21.3 - -### Patch Changes - -- add window session cache - -## 0.21.2 - -### Patch Changes - -- exception handlind in relayer - -## 0.21.0 - -### Minor Changes - -- - fix gas estimation on wallets with large number of signers - - update to session handling and wallet config construction upon auth - -## 0.19.3 - -### Patch Changes - -- jwtAuth visibility, package version sync - -## 0.19.0 - -### Minor Changes - -- - provider, improve dapp / wallet transport io - -## 0.18.0 - -### Minor Changes - -- relayer improvements and pending transaction handling - -## 0.16.0 - -### Minor Changes - -- relayer as its own service separate from chaind - -## 0.15.1 - -### Patch Changes - -- update api clients - -## 0.14.3 - -### Patch Changes - -- Fix 0xSequence relayer dependencies - -## 0.14.2 - -### Patch Changes - -- Add debug logs to rpc-relayer - -## 0.14.0 - -### Minor Changes - -- update sequence utils finder which includes optimization - -## 0.13.0 - -### Minor Changes - -- Update SequenceUtils deployed contract - -## 0.12.1 - -### Patch Changes - -- npm bump - -## 0.12.0 - -### Minor Changes - -- provider: improvements to window transport - -## 0.11.4 - -### Patch Changes - -- update api client - -## 0.11.3 - -### Patch Changes - -- improve openWindow state options handling - -## 0.11.2 - -### Patch Changes - -- Fix multicall proxy scopes - -## 0.11.1 - -### Patch Changes - -- Add support for dynamic and nested signatures - -## 0.11.0 - -### Minor Changes - -- Update wallet context to 1.7 contracts - -## 0.10.9 - -### Patch Changes - -- add support for public addresses as signers in session.open - -## 0.10.8 - -### Patch Changes - -- Multicall production configuration - -## 0.10.7 - -### Patch Changes - -- allow provider transport to force disconnect - -## 0.10.6 - -### Patch Changes - -- - fix getWalletState method - -## 0.10.5 - -### Patch Changes - -- update relayer gas refund options - -## 0.10.4 - -### Patch Changes - -- Update api proto - -## 0.10.3 - -### Patch Changes - -- Fix loading config cross-chain - -## 0.10.2 - -### Patch Changes - -- - message digest fix - -## 0.10.1 - -### Patch Changes - -- upgrade deps - -## 0.10.0 - -### Minor Changes - -- Deployed new contracts with ERC1271 signer support - -## 0.9.6 - -### Patch Changes - -- Update ABIs for latest sequence contracts - -## 0.9.3 - -### Patch Changes - -- - minor improvements - -## 0.9.1 - -### Patch Changes - -- - patch bump - -## 0.9.0 - -### Minor Changes - -- - provider transport hardening - -## 0.8.5 - -### Patch Changes - -- - use latest wallet-contracts - -## 0.8.4 - -### Patch Changes - -- - minor improvements, name updates and comments - -## 0.8.3 - -### Patch Changes - -- - refinements - - - normalize signer address in config - - - provider: getWalletState() method to WalletProvider - -## 0.8.2 - -### Patch Changes - -- - field rename and ethauth dependency bump - -## 0.8.1 - -### Patch Changes - -- - variety of optimizations - -## 0.8.0 - -### Minor Changes - -- - changeset fix - -## 0.7.0 - -### Patch Changes - -- 6f11ed7: sequence.js, init release diff --git a/old/packages/guard/README.md b/old/packages/guard/README.md deleted file mode 100644 index 9da6b41be..000000000 --- a/old/packages/guard/README.md +++ /dev/null @@ -1,4 +0,0 @@ -@0xsequence/guard -================= - -See [0xsequence project page](https://github.com/0xsequence/sequence.js). diff --git a/old/packages/guard/package.json b/old/packages/guard/package.json deleted file mode 100644 index f7184a282..000000000 --- a/old/packages/guard/package.json +++ /dev/null @@ -1,31 +0,0 @@ -{ - "name": "@0xsequence/guard", - "version": "2.3.8", - "description": "guard sub-package for Sequence", - "repository": "https://github.com/0xsequence/sequence.js/tree/master/packages/guard", - "source": "src/index.ts", - "main": "dist/0xsequence-guard.cjs.js", - "module": "dist/0xsequence-guard.esm.js", - "author": "Horizon Blockchain Games", - "license": "Apache-2.0", - "scripts": { - "test": "echo", - "typecheck": "tsc --noEmit" - }, - "peerDependencies": { - "ethers": ">=6" - }, - "dependencies": { - "@0xsequence/account": "workspace:*", - "@0xsequence/core": "workspace:*", - "@0xsequence/signhub": "workspace:*", - "@0xsequence/utils": "workspace:*" - }, - "devDependencies": { - "ethers": "6.13.4" - }, - "files": [ - "src", - "dist" - ] -} diff --git a/old/packages/guard/src/guard.gen.ts b/old/packages/guard/src/guard.gen.ts deleted file mode 100644 index a693ce74c..000000000 --- a/old/packages/guard/src/guard.gen.ts +++ /dev/null @@ -1,1015 +0,0 @@ -/* eslint-disable */ -// sequence-guard v0.4.0 776b307c2145ac7a994eec63240acae042c96067 -// -- -// Code generated by webrpc-gen@v0.25.3 with typescript generator. DO NOT EDIT. -// -// webrpc-gen -schema=guard.ridl -target=typescript -client -out=./clients/guard.gen.ts - -export const WebrpcHeader = 'Webrpc' - -export const WebrpcHeaderValue = 'webrpc@v0.25.3;gen-typescript@v0.17.0;sequence-guard@v0.4.0' - -// WebRPC description and code-gen version -export const WebRPCVersion = 'v1' - -// Schema version of your RIDL schema -export const WebRPCSchemaVersion = 'v0.4.0' - -// Schema hash generated from your RIDL schema -export const WebRPCSchemaHash = '776b307c2145ac7a994eec63240acae042c96067' - -type WebrpcGenVersions = { - webrpcGenVersion: string - codeGenName: string - codeGenVersion: string - schemaName: string - schemaVersion: string -} - -export function VersionFromHeader(headers: Headers): WebrpcGenVersions { - const headerValue = headers.get(WebrpcHeader) - if (!headerValue) { - return { - webrpcGenVersion: '', - codeGenName: '', - codeGenVersion: '', - schemaName: '', - schemaVersion: '' - } - } - - return parseWebrpcGenVersions(headerValue) -} - -function parseWebrpcGenVersions(header: string): WebrpcGenVersions { - const versions = header.split(';') - if (versions.length < 3) { - return { - webrpcGenVersion: '', - codeGenName: '', - codeGenVersion: '', - schemaName: '', - schemaVersion: '' - } - } - - const [_, webrpcGenVersion] = versions[0]!.split('@') - const [codeGenName, codeGenVersion] = versions[1]!.split('@') - const [schemaName, schemaVersion] = versions[2]!.split('@') - - return { - webrpcGenVersion: webrpcGenVersion ?? '', - codeGenName: codeGenName ?? '', - codeGenVersion: codeGenVersion ?? '', - schemaName: schemaName ?? '', - schemaVersion: schemaVersion ?? '' - } -} - -// -// Types -// - -export interface Version { - webrpcVersion: string - schemaVersion: string - schemaHash: string - appVersion: string -} - -export interface RuntimeStatus { - healthOK: boolean - startTime: string - uptime: number - ver: string - branch: string - commitHash: string -} - -export interface WalletConfig { - address: string - content: string -} - -export interface WalletSigner { - address: string - weight: number -} - -export interface SignRequest { - chainId: number - msg: string - auxData: string -} - -export interface OwnershipProof { - wallet: string - timestamp: number - signer: string - signature: string -} - -export interface AuthToken { - id: string - token: string -} - -export interface RecoveryCode { - code: string - used: boolean -} - -export interface Guard { - ping(headers?: object, signal?: AbortSignal): Promise - version(headers?: object, signal?: AbortSignal): Promise - runtimeStatus(headers?: object, signal?: AbortSignal): Promise - getSignerConfig(args: GetSignerConfigArgs, headers?: object, signal?: AbortSignal): Promise - /** - * Called by sequence.app when the user signs in, and signs messages/transactions/migrations. - * Requires a valid 2FA token if enabled. - */ - sign(args: SignArgs, headers?: object, signal?: AbortSignal): Promise - signWith(args: SignWithArgs, headers?: object, signal?: AbortSignal): Promise - /** - * Internal use only. - * Only ever needs to be called once per chain. - * Signs a preconfigured payload that the caller has no control over. - */ - patch(args: PatchArgs, headers?: object, signal?: AbortSignal): Promise - /** - * Called by sequence.app when it needs to check the user's 2FA. - * This happens during sign in, before signing messages and transactions, and when configuring 2FA. - * Requires either a valid JWT or a signature by one of the wallet's signers. - */ - authMethods(args: AuthMethodsArgs, headers?: object, signal?: AbortSignal): Promise - /** - * Not currently called. Requires both a JWT and a wallet signature. - */ - setPIN(args: SetPINArgs, headers?: object, signal?: AbortSignal): Promise - /** - * Not currently called. Requires both a JWT and a wallet signature. - */ - resetPIN(args: ResetPINArgs, headers?: object, signal?: AbortSignal): Promise - /** - * Called by sequence.app when the user configures their 2FA. - * Requires both a JWT and a wallet signature. - */ - createTOTP(args: CreateTOTPArgs, headers?: object, signal?: AbortSignal): Promise - /** - * Called by sequence.app when the user configures their 2FA. - * Requires both a JWT and a wallet signature. - */ - commitTOTP(args: CommitTOTPArgs, headers?: object, signal?: AbortSignal): Promise - /** - * Called by sequence.app when the user configures their 2FA. - * Requires both a JWT and a wallet signature. - */ - resetTOTP(args: ResetTOTPArgs, headers?: object, signal?: AbortSignal): Promise - /** - * Called by sequence.app when the user uses a recovery code. - * Requires either a valid JWT or a signature by one of the wallet's signers. - */ - reset2FA(args: Reset2FAArgs, headers?: object, signal?: AbortSignal): Promise - /** - * Called by sequence.app when the user is viewing their recovery codes. - * Requires both a JWT and a wallet signature. - */ - recoveryCodes(args: RecoveryCodesArgs, headers?: object, signal?: AbortSignal): Promise - /** - * Called by sequence.app when the user is viewing their recovery codes. - * Requires both a JWT and a wallet signature. - */ - resetRecoveryCodes(args: ResetRecoveryCodesArgs, headers?: object, signal?: AbortSignal): Promise -} - -export interface PingArgs {} - -export interface PingReturn { - status: boolean -} -export interface VersionArgs {} - -export interface VersionReturn { - version: Version -} -export interface RuntimeStatusArgs {} - -export interface RuntimeStatusReturn { - status: RuntimeStatus -} -export interface GetSignerConfigArgs { - signer: string -} - -export interface GetSignerConfigReturn { - signerConfig: WalletConfig -} -export interface SignArgs { - request: SignRequest - token?: AuthToken -} - -export interface SignReturn { - sig: string -} -export interface SignWithArgs { - signer: string - request: SignRequest - token?: AuthToken -} - -export interface SignWithReturn { - sig: string -} -export interface PatchArgs { - signer: string - chainId: number - secret: string -} - -export interface PatchReturn { - txs: any -} -export interface AuthMethodsArgs { - proof?: OwnershipProof -} - -export interface AuthMethodsReturn { - methods: Array - active: boolean -} -export interface SetPINArgs { - pin: string - timestamp: number - signature: string -} - -export interface SetPINReturn {} -export interface ResetPINArgs { - timestamp: number - signature: string -} - -export interface ResetPINReturn {} -export interface CreateTOTPArgs { - timestamp: number - signature: string -} - -export interface CreateTOTPReturn { - uri: string -} -export interface CommitTOTPArgs { - token: string -} - -export interface CommitTOTPReturn { - codes: Array -} -export interface ResetTOTPArgs { - timestamp: number - signature: string -} - -export interface ResetTOTPReturn {} -export interface Reset2FAArgs { - code: string - proof?: OwnershipProof -} - -export interface Reset2FAReturn {} -export interface RecoveryCodesArgs { - timestamp: number - signature: string -} - -export interface RecoveryCodesReturn { - codes: Array -} -export interface ResetRecoveryCodesArgs { - timestamp: number - signature: string -} - -export interface ResetRecoveryCodesReturn { - codes: Array -} - -// -// Client -// -export class Guard implements Guard { - protected hostname: string - protected fetch: Fetch - protected path = '/rpc/Guard/' - - constructor(hostname: string, fetch: Fetch) { - this.hostname = hostname.replace(/\/*$/, '') - this.fetch = (input: RequestInfo, init?: RequestInit) => fetch(input, init) - } - - private url(name: string): string { - return this.hostname + this.path + name - } - - ping = (headers?: object, signal?: AbortSignal): Promise => { - return this.fetch(this.url('Ping'), createHTTPRequest({}, headers, signal)).then( - res => { - return buildResponse(res).then(_data => { - return { - status: _data.status - } - }) - }, - error => { - throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) - } - ) - } - - version = (headers?: object, signal?: AbortSignal): Promise => { - return this.fetch(this.url('Version'), createHTTPRequest({}, headers, signal)).then( - res => { - return buildResponse(res).then(_data => { - return { - version: _data.version - } - }) - }, - error => { - throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) - } - ) - } - - runtimeStatus = (headers?: object, signal?: AbortSignal): Promise => { - return this.fetch(this.url('RuntimeStatus'), createHTTPRequest({}, headers, signal)).then( - res => { - return buildResponse(res).then(_data => { - return { - status: _data.status - } - }) - }, - error => { - throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) - } - ) - } - - getSignerConfig = (args: GetSignerConfigArgs, headers?: object, signal?: AbortSignal): Promise => { - return this.fetch(this.url('GetSignerConfig'), createHTTPRequest(args, headers, signal)).then( - res => { - return buildResponse(res).then(_data => { - return { - signerConfig: _data.signerConfig - } - }) - }, - error => { - throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) - } - ) - } - - sign = (args: SignArgs, headers?: object, signal?: AbortSignal): Promise => { - return this.fetch(this.url('Sign'), createHTTPRequest(args, headers, signal)).then( - res => { - return buildResponse(res).then(_data => { - return { - sig: _data.sig - } - }) - }, - error => { - throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) - } - ) - } - - signWith = (args: SignWithArgs, headers?: object, signal?: AbortSignal): Promise => { - return this.fetch(this.url('SignWith'), createHTTPRequest(args, headers, signal)).then( - res => { - return buildResponse(res).then(_data => { - return { - sig: _data.sig - } - }) - }, - error => { - throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) - } - ) - } - - patch = (args: PatchArgs, headers?: object, signal?: AbortSignal): Promise => { - return this.fetch(this.url('Patch'), createHTTPRequest(args, headers, signal)).then( - res => { - return buildResponse(res).then(_data => { - return { - txs: _data.txs - } - }) - }, - error => { - throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) - } - ) - } - - authMethods = (args: AuthMethodsArgs, headers?: object, signal?: AbortSignal): Promise => { - return this.fetch(this.url('AuthMethods'), createHTTPRequest(args, headers, signal)).then( - res => { - return buildResponse(res).then(_data => { - return { - methods: >_data.methods, - active: _data.active - } - }) - }, - error => { - throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) - } - ) - } - - setPIN = (args: SetPINArgs, headers?: object, signal?: AbortSignal): Promise => { - return this.fetch(this.url('SetPIN'), createHTTPRequest(args, headers, signal)).then( - res => { - return buildResponse(res).then(_data => { - return {} - }) - }, - error => { - throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) - } - ) - } - - resetPIN = (args: ResetPINArgs, headers?: object, signal?: AbortSignal): Promise => { - return this.fetch(this.url('ResetPIN'), createHTTPRequest(args, headers, signal)).then( - res => { - return buildResponse(res).then(_data => { - return {} - }) - }, - error => { - throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) - } - ) - } - - createTOTP = (args: CreateTOTPArgs, headers?: object, signal?: AbortSignal): Promise => { - return this.fetch(this.url('CreateTOTP'), createHTTPRequest(args, headers, signal)).then( - res => { - return buildResponse(res).then(_data => { - return { - uri: _data.uri - } - }) - }, - error => { - throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) - } - ) - } - - commitTOTP = (args: CommitTOTPArgs, headers?: object, signal?: AbortSignal): Promise => { - return this.fetch(this.url('CommitTOTP'), createHTTPRequest(args, headers, signal)).then( - res => { - return buildResponse(res).then(_data => { - return { - codes: >_data.codes - } - }) - }, - error => { - throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) - } - ) - } - - resetTOTP = (args: ResetTOTPArgs, headers?: object, signal?: AbortSignal): Promise => { - return this.fetch(this.url('ResetTOTP'), createHTTPRequest(args, headers, signal)).then( - res => { - return buildResponse(res).then(_data => { - return {} - }) - }, - error => { - throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) - } - ) - } - - reset2FA = (args: Reset2FAArgs, headers?: object, signal?: AbortSignal): Promise => { - return this.fetch(this.url('Reset2FA'), createHTTPRequest(args, headers, signal)).then( - res => { - return buildResponse(res).then(_data => { - return {} - }) - }, - error => { - throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) - } - ) - } - - recoveryCodes = (args: RecoveryCodesArgs, headers?: object, signal?: AbortSignal): Promise => { - return this.fetch(this.url('RecoveryCodes'), createHTTPRequest(args, headers, signal)).then( - res => { - return buildResponse(res).then(_data => { - return { - codes: >_data.codes - } - }) - }, - error => { - throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) - } - ) - } - - resetRecoveryCodes = ( - args: ResetRecoveryCodesArgs, - headers?: object, - signal?: AbortSignal - ): Promise => { - return this.fetch(this.url('ResetRecoveryCodes'), createHTTPRequest(args, headers, signal)).then( - res => { - return buildResponse(res).then(_data => { - return { - codes: >_data.codes - } - }) - }, - error => { - throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) - } - ) - } -} - -const createHTTPRequest = (body: object = {}, headers: object = {}, signal: AbortSignal | null = null): object => { - const reqHeaders: { [key: string]: string } = { ...headers, 'Content-Type': 'application/json' } - reqHeaders[WebrpcHeader] = WebrpcHeaderValue - - return { - method: 'POST', - headers: reqHeaders, - body: JSON.stringify(body || {}), - signal - } -} - -const buildResponse = (res: Response): Promise => { - return res.text().then(text => { - let data - try { - data = JSON.parse(text) - } catch (error) { - let message = '' - if (error instanceof Error) { - message = error.message - } - throw WebrpcBadResponseError.new({ - status: res.status, - cause: `JSON.parse(): ${message}: response text: ${text}` - }) - } - if (!res.ok) { - const code: number = typeof data.code === 'number' ? data.code : 0 - throw (webrpcErrorByCode[code] || WebrpcError).new(data) - } - return data - }) -} - -// -// Errors -// - -export class WebrpcError extends Error { - name: string - code: number - message: string - status: number - cause?: string - - /** @deprecated Use message instead of msg. Deprecated in webrpc v0.11.0. */ - msg: string - - constructor(name: string, code: number, message: string, status: number, cause?: string) { - super(message) - this.name = name || 'WebrpcError' - this.code = typeof code === 'number' ? code : 0 - this.message = message || `endpoint error ${this.code}` - this.msg = this.message - this.status = typeof status === 'number' ? status : 0 - this.cause = cause - Object.setPrototypeOf(this, WebrpcError.prototype) - } - - static new(payload: any): WebrpcError { - return new this(payload.error, payload.code, payload.message || payload.msg, payload.status, payload.cause) - } -} - -// Webrpc errors - -export class WebrpcEndpointError extends WebrpcError { - constructor( - name: string = 'WebrpcEndpoint', - code: number = 0, - message: string = `endpoint error`, - status: number = 0, - cause?: string - ) { - super(name, code, message, status, cause) - Object.setPrototypeOf(this, WebrpcEndpointError.prototype) - } -} - -export class WebrpcRequestFailedError extends WebrpcError { - constructor( - name: string = 'WebrpcRequestFailed', - code: number = -1, - message: string = `request failed`, - status: number = 0, - cause?: string - ) { - super(name, code, message, status, cause) - Object.setPrototypeOf(this, WebrpcRequestFailedError.prototype) - } -} - -export class WebrpcBadRouteError extends WebrpcError { - constructor( - name: string = 'WebrpcBadRoute', - code: number = -2, - message: string = `bad route`, - status: number = 0, - cause?: string - ) { - super(name, code, message, status, cause) - Object.setPrototypeOf(this, WebrpcBadRouteError.prototype) - } -} - -export class WebrpcBadMethodError extends WebrpcError { - constructor( - name: string = 'WebrpcBadMethod', - code: number = -3, - message: string = `bad method`, - status: number = 0, - cause?: string - ) { - super(name, code, message, status, cause) - Object.setPrototypeOf(this, WebrpcBadMethodError.prototype) - } -} - -export class WebrpcBadRequestError extends WebrpcError { - constructor( - name: string = 'WebrpcBadRequest', - code: number = -4, - message: string = `bad request`, - status: number = 0, - cause?: string - ) { - super(name, code, message, status, cause) - Object.setPrototypeOf(this, WebrpcBadRequestError.prototype) - } -} - -export class WebrpcBadResponseError extends WebrpcError { - constructor( - name: string = 'WebrpcBadResponse', - code: number = -5, - message: string = `bad response`, - status: number = 0, - cause?: string - ) { - super(name, code, message, status, cause) - Object.setPrototypeOf(this, WebrpcBadResponseError.prototype) - } -} - -export class WebrpcServerPanicError extends WebrpcError { - constructor( - name: string = 'WebrpcServerPanic', - code: number = -6, - message: string = `server panic`, - status: number = 0, - cause?: string - ) { - super(name, code, message, status, cause) - Object.setPrototypeOf(this, WebrpcServerPanicError.prototype) - } -} - -export class WebrpcInternalErrorError extends WebrpcError { - constructor( - name: string = 'WebrpcInternalError', - code: number = -7, - message: string = `internal error`, - status: number = 0, - cause?: string - ) { - super(name, code, message, status, cause) - Object.setPrototypeOf(this, WebrpcInternalErrorError.prototype) - } -} - -export class WebrpcClientDisconnectedError extends WebrpcError { - constructor( - name: string = 'WebrpcClientDisconnected', - code: number = -8, - message: string = `client disconnected`, - status: number = 0, - cause?: string - ) { - super(name, code, message, status, cause) - Object.setPrototypeOf(this, WebrpcClientDisconnectedError.prototype) - } -} - -export class WebrpcStreamLostError extends WebrpcError { - constructor( - name: string = 'WebrpcStreamLost', - code: number = -9, - message: string = `stream lost`, - status: number = 0, - cause?: string - ) { - super(name, code, message, status, cause) - Object.setPrototypeOf(this, WebrpcStreamLostError.prototype) - } -} - -export class WebrpcStreamFinishedError extends WebrpcError { - constructor( - name: string = 'WebrpcStreamFinished', - code: number = -10, - message: string = `stream finished`, - status: number = 0, - cause?: string - ) { - super(name, code, message, status, cause) - Object.setPrototypeOf(this, WebrpcStreamFinishedError.prototype) - } -} - -// Schema errors - -export class UnauthorizedError extends WebrpcError { - constructor( - name: string = 'Unauthorized', - code: number = 1000, - message: string = `Unauthorized access`, - status: number = 0, - cause?: string - ) { - super(name, code, message, status, cause) - Object.setPrototypeOf(this, UnauthorizedError.prototype) - } -} - -export class PermissionDeniedError extends WebrpcError { - constructor( - name: string = 'PermissionDenied', - code: number = 1001, - message: string = `Permission denied`, - status: number = 0, - cause?: string - ) { - super(name, code, message, status, cause) - Object.setPrototypeOf(this, PermissionDeniedError.prototype) - } -} - -export class SessionExpiredError extends WebrpcError { - constructor( - name: string = 'SessionExpired', - code: number = 1002, - message: string = `Session expired`, - status: number = 0, - cause?: string - ) { - super(name, code, message, status, cause) - Object.setPrototypeOf(this, SessionExpiredError.prototype) - } -} - -export class MethodNotFoundError extends WebrpcError { - constructor( - name: string = 'MethodNotFound', - code: number = 1003, - message: string = `Method not found`, - status: number = 0, - cause?: string - ) { - super(name, code, message, status, cause) - Object.setPrototypeOf(this, MethodNotFoundError.prototype) - } -} - -export class RequestConflictError extends WebrpcError { - constructor( - name: string = 'RequestConflict', - code: number = 1004, - message: string = `Conflict with target resource`, - status: number = 0, - cause?: string - ) { - super(name, code, message, status, cause) - Object.setPrototypeOf(this, RequestConflictError.prototype) - } -} - -export class AbortedError extends WebrpcError { - constructor( - name: string = 'Aborted', - code: number = 1005, - message: string = `Request aborted`, - status: number = 0, - cause?: string - ) { - super(name, code, message, status, cause) - Object.setPrototypeOf(this, AbortedError.prototype) - } -} - -export class GeoblockedError extends WebrpcError { - constructor( - name: string = 'Geoblocked', - code: number = 1006, - message: string = `Geoblocked region`, - status: number = 0, - cause?: string - ) { - super(name, code, message, status, cause) - Object.setPrototypeOf(this, GeoblockedError.prototype) - } -} - -export class RateLimitedError extends WebrpcError { - constructor( - name: string = 'RateLimited', - code: number = 1007, - message: string = `Rate-limited. Please slow down.`, - status: number = 0, - cause?: string - ) { - super(name, code, message, status, cause) - Object.setPrototypeOf(this, RateLimitedError.prototype) - } -} - -export class InvalidArgumentError extends WebrpcError { - constructor( - name: string = 'InvalidArgument', - code: number = 2001, - message: string = `Invalid argument`, - status: number = 0, - cause?: string - ) { - super(name, code, message, status, cause) - Object.setPrototypeOf(this, InvalidArgumentError.prototype) - } -} - -export class UnavailableError extends WebrpcError { - constructor( - name: string = 'Unavailable', - code: number = 2002, - message: string = `Unavailable resource`, - status: number = 0, - cause?: string - ) { - super(name, code, message, status, cause) - Object.setPrototypeOf(this, UnavailableError.prototype) - } -} - -export class QueryFailedError extends WebrpcError { - constructor( - name: string = 'QueryFailed', - code: number = 2003, - message: string = `Query failed`, - status: number = 0, - cause?: string - ) { - super(name, code, message, status, cause) - Object.setPrototypeOf(this, QueryFailedError.prototype) - } -} - -export class ValidationFailedError extends WebrpcError { - constructor( - name: string = 'ValidationFailed', - code: number = 2004, - message: string = `Validation Failed`, - status: number = 0, - cause?: string - ) { - super(name, code, message, status, cause) - Object.setPrototypeOf(this, ValidationFailedError.prototype) - } -} - -export class NotFoundError extends WebrpcError { - constructor( - name: string = 'NotFound', - code: number = 3000, - message: string = `Resource not found`, - status: number = 0, - cause?: string - ) { - super(name, code, message, status, cause) - Object.setPrototypeOf(this, NotFoundError.prototype) - } -} - -export enum errors { - WebrpcEndpoint = 'WebrpcEndpoint', - WebrpcRequestFailed = 'WebrpcRequestFailed', - WebrpcBadRoute = 'WebrpcBadRoute', - WebrpcBadMethod = 'WebrpcBadMethod', - WebrpcBadRequest = 'WebrpcBadRequest', - WebrpcBadResponse = 'WebrpcBadResponse', - WebrpcServerPanic = 'WebrpcServerPanic', - WebrpcInternalError = 'WebrpcInternalError', - WebrpcClientDisconnected = 'WebrpcClientDisconnected', - WebrpcStreamLost = 'WebrpcStreamLost', - WebrpcStreamFinished = 'WebrpcStreamFinished', - Unauthorized = 'Unauthorized', - PermissionDenied = 'PermissionDenied', - SessionExpired = 'SessionExpired', - MethodNotFound = 'MethodNotFound', - RequestConflict = 'RequestConflict', - Aborted = 'Aborted', - Geoblocked = 'Geoblocked', - RateLimited = 'RateLimited', - InvalidArgument = 'InvalidArgument', - Unavailable = 'Unavailable', - QueryFailed = 'QueryFailed', - ValidationFailed = 'ValidationFailed', - NotFound = 'NotFound' -} - -export enum WebrpcErrorCodes { - WebrpcEndpoint = 0, - WebrpcRequestFailed = -1, - WebrpcBadRoute = -2, - WebrpcBadMethod = -3, - WebrpcBadRequest = -4, - WebrpcBadResponse = -5, - WebrpcServerPanic = -6, - WebrpcInternalError = -7, - WebrpcClientDisconnected = -8, - WebrpcStreamLost = -9, - WebrpcStreamFinished = -10, - Unauthorized = 1000, - PermissionDenied = 1001, - SessionExpired = 1002, - MethodNotFound = 1003, - RequestConflict = 1004, - Aborted = 1005, - Geoblocked = 1006, - RateLimited = 1007, - InvalidArgument = 2001, - Unavailable = 2002, - QueryFailed = 2003, - ValidationFailed = 2004, - NotFound = 3000 -} - -export const webrpcErrorByCode: { [code: number]: any } = { - [0]: WebrpcEndpointError, - [-1]: WebrpcRequestFailedError, - [-2]: WebrpcBadRouteError, - [-3]: WebrpcBadMethodError, - [-4]: WebrpcBadRequestError, - [-5]: WebrpcBadResponseError, - [-6]: WebrpcServerPanicError, - [-7]: WebrpcInternalErrorError, - [-8]: WebrpcClientDisconnectedError, - [-9]: WebrpcStreamLostError, - [-10]: WebrpcStreamFinishedError, - [1000]: UnauthorizedError, - [1001]: PermissionDeniedError, - [1002]: SessionExpiredError, - [1003]: MethodNotFoundError, - [1004]: RequestConflictError, - [1005]: AbortedError, - [1006]: GeoblockedError, - [1007]: RateLimitedError, - [2001]: InvalidArgumentError, - [2002]: UnavailableError, - [2003]: QueryFailedError, - [2004]: ValidationFailedError, - [3000]: NotFoundError -} - -export type Fetch = (input: RequestInfo, init?: RequestInit) => Promise diff --git a/old/packages/guard/src/index.ts b/old/packages/guard/src/index.ts deleted file mode 100644 index d4a9b72a0..000000000 --- a/old/packages/guard/src/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -export { Guard } from './guard.gen' -export * from './signer' diff --git a/old/packages/guard/src/signer.ts b/old/packages/guard/src/signer.ts deleted file mode 100644 index 48491e575..000000000 --- a/old/packages/guard/src/signer.ts +++ /dev/null @@ -1,308 +0,0 @@ -import { Account } from '@0xsequence/account' -import { commons, universal } from '@0xsequence/core' -import { signers, Status } from '@0xsequence/signhub' -import { encodeTypedDataDigest, TypedData } from '@0xsequence/utils' -import { ethers } from 'ethers' -import { AuthMethodsReturn, Guard, RecoveryCode as GuardRecoveryCode } from './guard.gen' - -export class GuardSigner implements signers.SapientSigner { - private guard: Guard - - constructor( - public readonly address: string, - public readonly url: string, - public readonly appendSuffix: boolean = false, - public readonly projectAccessKey?: string - ) { - this.guard = new Guard(url, this._fetch) - } - - _fetch = (input: RequestInfo, init?: RequestInit): Promise => { - const headers: { [key: string]: any } = {} - - const projectAccessKey = this.projectAccessKey - - if (projectAccessKey && projectAccessKey.length > 0) { - headers['X-Access-Key'] = projectAccessKey - } - - // before the request is made - init!.headers = { ...init!.headers, ...headers } - - return fetch(input, init) - } - - async getAddress(): Promise { - return this.address - } - - async buildDeployTransaction(_metadata: object): Promise { - return undefined - } - - async predecorateSignedTransactions(_metadata: object): Promise { - return [] - } - - async decorateTransactions( - bundle: commons.transaction.IntendedTransactionBundle, - _metadata: object - ): Promise { - return bundle - } - - async sign(message: ethers.BytesLike, metadata: object): Promise { - if (!commons.isWalletSignRequestMetadata(metadata)) { - throw new Error('expected sequence signature request metadata') - } - - const guardTotpCode = (metadata as { guardTotpCode?: string }).guardTotpCode - - // Building auxData, notice: this uses the old v1 format - // TODO: We should update the guard API so we can pass the metadata directly - const coder = universal.genericCoderFor(metadata.config.version) - const { encoded } = coder.signature.encodeSigners(metadata.config, metadata.parts ?? new Map(), [], metadata.chainId) - - return ( - await this.guard.signWith({ - signer: this.address, - request: { - msg: ethers.hexlify(message), - auxData: this.packMsgAndSig(metadata.address, metadata.digest, encoded, metadata.chainId), - chainId: Number(metadata.chainId) - }, - token: guardTotpCode ? { id: AuthMethod.TOTP, token: guardTotpCode } : undefined - }) - ).sig - } - - notifyStatusChange(_id: string, _status: Status, _metadata: object): void {} - - async getAuthMethods(proof: OwnershipProof): Promise<{ methods: AuthMethod[]; active: boolean }> { - let response: AuthMethodsReturn - - if ('jwt' in proof) { - response = await this.guard.authMethods({}, { Authorization: `BEARER ${proof.jwt}` }) - } else { - const signedProof = await signOwnershipProof(proof) - - response = await this.guard.authMethods({ - proof: { - wallet: signedProof.walletAddress, - timestamp: signedProof.timestamp.getTime(), - signer: signedProof.signerAddress, - signature: signedProof.signature - } - }) - } - - return { ...response, methods: response.methods.map(parseAuthMethod) } - } - - async setPin(pin: string | undefined, proof: AuthUpdateProof): Promise { - const signedProof = await signAuthUpdateProof(proof) - - if (pin === undefined) { - await this.guard.resetPIN( - { timestamp: signedProof.timestamp.getTime(), signature: signedProof.signature }, - { Authorization: `BEARER ${proof.jwt}` } - ) - } else { - await this.guard.setPIN( - { pin, timestamp: signedProof.timestamp.getTime(), signature: signedProof.signature }, - { Authorization: `BEARER ${proof.jwt}` } - ) - } - } - - resetPin(proof: AuthUpdateProof): Promise { - return this.setPin(undefined, proof) - } - - async createTotp(proof: AuthUpdateProof): Promise { - const signedProof = await signAuthUpdateProof(proof) - - const { uri } = await this.guard.createTOTP( - { timestamp: signedProof.timestamp.getTime(), signature: signedProof.signature }, - { Authorization: `BEARER ${proof.jwt}` } - ) - - return new URL(uri) - } - - async commitTotp(token: string, jwt: string): Promise { - const { codes } = await this.guard.commitTOTP({ token }, { Authorization: `BEARER ${jwt}` }) - return codes - } - - async resetTotp(proof: AuthUpdateProof): Promise { - const signedProof = await signAuthUpdateProof(proof) - - await this.guard.resetTOTP( - { timestamp: signedProof.timestamp.getTime(), signature: signedProof.signature }, - { Authorization: `BEARER ${proof.jwt}` } - ) - } - - async reset2fa(recoveryCode: string, proof: OwnershipProof): Promise { - if ('jwt' in proof) { - await this.guard.reset2FA({ code: recoveryCode }, { Authorization: `BEARER ${proof.jwt}` }) - } else { - const signedProof = await signOwnershipProof(proof) - - await this.guard.reset2FA({ - code: recoveryCode, - proof: { - wallet: signedProof.walletAddress, - timestamp: signedProof.timestamp.getTime(), - signer: signedProof.signerAddress, - signature: signedProof.signature - } - }) - } - } - - async getRecoveryCodes(proof: AuthUpdateProof): Promise { - const signedProof = await signAuthUpdateProof(proof) - - const { codes } = await this.guard.recoveryCodes( - { timestamp: signedProof.timestamp.getTime(), signature: signedProof.signature }, - { Authorization: `BEARER ${proof.jwt}` } - ) - - return codes - } - - async resetRecoveryCodes(proof: AuthUpdateProof): Promise { - const signedProof = await signAuthUpdateProof(proof) - - const { codes } = await this.guard.resetRecoveryCodes( - { timestamp: signedProof.timestamp.getTime(), signature: signedProof.signature }, - { Authorization: `BEARER ${proof.jwt}` } - ) - - return codes - } - - private packMsgAndSig(address: string, msg: ethers.BytesLike, sig: ethers.BytesLike, chainId: ethers.BigNumberish): string { - return ethers.AbiCoder.defaultAbiCoder().encode(['address', 'uint256', 'bytes', 'bytes'], [address, chainId, msg, sig]) - } - - suffix(): ethers.BytesLike { - return new Uint8Array(this.appendSuffix ? [3] : []) - } -} - -export type RecoveryCode = GuardRecoveryCode - -export enum AuthMethod { - PIN = 'PIN', - TOTP = 'TOTP' -} - -function parseAuthMethod(method: string): AuthMethod { - switch (method) { - case AuthMethod.PIN: - case AuthMethod.TOTP: - return method - default: - throw new Error(`unknown auth method '${method}'`) - } -} - -export type SignedOwnershipProof = { - walletAddress: string - timestamp: Date - signerAddress: string - signature: string -} - -export type OwnershipProof = - | SignedOwnershipProof - | { jwt: string } - | { - walletAddress: string - signer: ethers.Signer | signers.SapientSigner - } - -export function isSignedOwnershipProof(proof: OwnershipProof): proof is SignedOwnershipProof { - return 'signerAddress' in proof && typeof proof.signerAddress === 'string' -} - -export async function signOwnershipProof(proof: Exclude): Promise { - if (isSignedOwnershipProof(proof)) { - return proof - } else { - const signer = signers.isSapientSigner(proof.signer) ? proof.signer : new signers.SignerWrapper(proof.signer) - const signerAddress = await signer.getAddress() - const timestamp = new Date() - const typedData = getOwnershipProofTypedData(proof.walletAddress, timestamp) - const digest = encodeTypedDataDigest(typedData) - - return { - walletAddress: proof.walletAddress, - timestamp, - signerAddress, - signature: ethers.hexlify(await signer.sign(digest, {})) - } - } -} - -export type AuthUpdateProof = { jwt: string } & ({ timestamp: Date; signature: string } | { wallet: Account }) - -async function signAuthUpdateProof(proof: AuthUpdateProof): Promise<{ jwt: string; timestamp: Date; signature: string }> { - if ('wallet' in proof) { - const timestamp = new Date() - const typedData = getAuthUpdateProofTypedData(timestamp) - - const signature = await proof.wallet.signTypedData( - typedData.domain, - typedData.types, - typedData.message, - typedData.domain.chainId ?? 1, - 'eip6492' - ) - - return { jwt: proof.jwt, timestamp, signature } - } else { - return proof - } -} - -export function getOwnershipProofTypedData(wallet: string, timestamp: Date): TypedData { - return { - domain, - types: { - AuthMethods: [ - { name: 'wallet', type: 'address' }, - { name: 'timestamp', type: 'string' } - ] - }, - message: { - wallet: ethers.getAddress(wallet), - timestamp: toUTCString(timestamp) - } - } -} - -export function getAuthUpdateProofTypedData(timestamp: Date): TypedData { - return { - domain, - types: { - AuthUpdate: [{ name: 'timestamp', type: 'string' }] - }, - message: { - timestamp: toUTCString(timestamp) - } - } -} - -const domain: ethers.TypedDataDomain = { - name: 'Sequence Guard', - version: '1', - chainId: 1 -} - -function toUTCString(date: Date): string { - return date.toUTCString().replace('GMT', 'UTC') -} diff --git a/old/packages/indexer/CHANGELOG.md b/old/packages/indexer/CHANGELOG.md deleted file mode 100644 index 6b1ea35be..000000000 --- a/old/packages/indexer/CHANGELOG.md +++ /dev/null @@ -1,1781 +0,0 @@ -# @0xsequence/indexer - -## 2.3.8 - -### Patch Changes - -- indexer: update clients - -## 2.3.7 - -### Patch Changes - -- Metadata updates - -## 2.3.6 - -### Patch Changes - -- New chains - -## 2.3.5 - -### Patch Changes - -- Add Frequency Testnet - -## 2.3.4 - -### Patch Changes - -- metadata: exclude deprecated methods on rpc client - -## 2.3.3 - -### Patch Changes - -- metadata: client update - -## 2.3.2 - -### Patch Changes - -- metadata: update rpc client - -## 2.3.1 - -### Patch Changes - -- indexer: update rpc client - -## 2.3.0 - -### Minor Changes - -- update metadata rpc client - -## 2.2.15 - -### Patch Changes - -- API updates - -## 2.2.14 - -### Patch Changes - -- Somnia Testnet and Monad Testnet - -## 2.2.13 - -### Patch Changes - -- Add XR1 to all networks - -## 2.2.12 - -### Patch Changes - -- Add XR1 - -## 2.2.11 - -### Patch Changes - -- Relayer updates - -## 2.2.10 - -### Patch Changes - -- Etherlink support - -## 2.2.9 - -### Patch Changes - -- Indexer gateway native token balances - -## 2.2.8 - -### Patch Changes - -- Add Moonbeam and Moonbase Alpha - -## 2.2.7 - -### Patch Changes - -- Update Builder package - -## 2.2.6 - -### Patch Changes - -- Update relayer package - -## 2.2.5 - -### Patch Changes - -- auth: fix sequence indexer gateway url -- account: immutable wallet proxy hook - -## 2.2.4 - -### Patch Changes - -- network: update soneium mainnet block explorer url -- waas: signTypedData intent support - -## 2.2.3 - -### Patch Changes - -- provider: updating initWallet to use connected network configs if they exist - -## 2.2.2 - -### Patch Changes - -- pass projectAccessKey to relayer at all times - -## 2.2.1 - -### Patch Changes - -- waas-ethers: sign typed data - -## 2.2.0 - -### Minor Changes - -- indexer: gateway client -- @0xsequence/builder -- upgrade puppeteer to v23.10.3 - -## 2.1.8 - -### Patch Changes - -- Add Soneium Mainnet - -## 2.1.7 - -### Patch Changes - -- guard: pass project access key to guard requests - -## 2.1.6 - -### Patch Changes - -- Add LAOS and Telos Testnet chains - -## 2.1.5 - -### Patch Changes - -- account: save presigned configuration with reference chain id 1 - -## 2.1.4 - -### Patch Changes - -- provider: pass projectAccessKey into MuxMessageProvider - -## 2.1.3 - -### Patch Changes - -- waas: time drift date fix due to strange browser quirk - -## 2.1.2 - -### Patch Changes - -- provider: export analytics correctly - -## 2.1.1 - -### Patch Changes - -- Add LAOS chain support - -## 2.1.0 - -### Minor Changes - -- account: forward project access key when estimating fees and sending transactions - -### Patch Changes - -- sessions: save signatures with reference chain id - -## 2.0.26 - -### Patch Changes - -- account: fix chain id comparison - -## 2.0.25 - -### Patch Changes - -- skale-nebula: deploy gas limit = 10m - -## 2.0.24 - -### Patch Changes - -- sessions: arweave: configurable gateway url -- waas: use /status to get time drift before sending any intents - -## 2.0.23 - -### Patch Changes - -- Add The Root Network support - -## 2.0.22 - -### Patch Changes - -- Add SKALE Nebula Mainnet support - -## 2.0.21 - -### Patch Changes - -- account: add publishWitnessFor - -## 2.0.20 - -### Patch Changes - -- upgrade deps, and improve waas session status handling - -## 2.0.19 - -### Patch Changes - -- Add Immutable zkEVM support - -## 2.0.18 - -### Patch Changes - -- waas: new contractCall transaction type -- sessions: add arweave owner - -## 2.0.17 - -### Patch Changes - -- update waas auth to clear session before signIn - -## 2.0.16 - -### Patch Changes - -- Removed Astar chains - -## 2.0.15 - -### Patch Changes - -- indexer: update bindings with token balance additions - -## 2.0.14 - -### Patch Changes - -- sessions: arweave config reader -- network: add b3 and apechain mainnet configs - -## 2.0.13 - -### Patch Changes - -- network: toy-testnet - -## 2.0.12 - -### Patch Changes - -- api: update bindings - -## 2.0.11 - -### Patch Changes - -- waas: intents test fix -- api: update bindings - -## 2.0.10 - -### Patch Changes - -- network: soneium minato testnet - -## 2.0.9 - -### Patch Changes - -- network: fix SKALE network name - -## 2.0.8 - -### Patch Changes - -- metadata: update bindings - -## 2.0.7 - -### Patch Changes - -- wallet request handler fix - -## 2.0.6 - -### Patch Changes - -- network: matic -> pol - -## 2.0.5 - -### Patch Changes - -- provider: update databeat to 0.9.2 - -## 2.0.4 - -### Patch Changes - -- network: add skale-nebula-testnet - -## 2.0.3 - -### Patch Changes - -- waas: check session status in SequenceWaaS.isSignedIn() - -## 2.0.2 - -### Patch Changes - -- sessions: property convert serialized bignumber hex value to bigint - -## 2.0.1 - -### Patch Changes - -- waas: http signature check for authenticator requests -- provider: unwrap legacy json rpc responses -- use json replacer and reviver for bigints - -## 2.0.0 - -### Major Changes - -- ethers v6 - -## 1.10.15 - -### Patch Changes - -- utils: extractProjectIdFromAccessKey - -## 1.10.14 - -### Patch Changes - -- network: add borne-testnet to allNetworks - -## 1.10.13 - -### Patch Changes - -- network: add borne testnet - -## 1.10.12 - -### Patch Changes - -- api: update bindings -- global/window -> globalThis - -## 1.10.11 - -### Patch Changes - -- waas: updated intent.gen without webrpc types, errors exported from authenticator.gen - -## 1.10.10 - -### Patch Changes - -- metadata: update bindings with new contract collections api - -## 1.10.9 - -### Patch Changes - -- waas minor update - -## 1.10.8 - -### Patch Changes - -- update metadata bindings - -## 1.10.7 - -### Patch Changes - -- minor fixes to waas client - -## 1.10.6 - -### Patch Changes - -- metadata: update bindings - -## 1.10.5 - -### Patch Changes - -- network: ape-chain-testnet -> apechain-testnet - -## 1.10.4 - -### Patch Changes - -- network: add b3-sepolia, ape-chain-testnet, blast, blast-sepolia - -## 1.10.3 - -### Patch Changes - -- typing fix - -## 1.10.2 - -### Patch Changes - -- - waas: add getIdToken method - - indexer: update api client - -## 1.10.1 - -### Patch Changes - -- metadata: update bindings - -## 1.10.0 - -### Minor Changes - -- waas release v1.3.0 - -## 1.9.37 - -### Patch Changes - -- network: adds nativeToken data to NetworkMetadata constants - -## 1.9.36 - -### Patch Changes - -- guard: export client - -## 1.9.35 - -### Patch Changes - -- guard: update bindings - -## 1.9.34 - -### Patch Changes - -- waas: always use lowercase email - -## 1.9.33 - -### Patch Changes - -- waas: umd build - -## 1.9.32 - -### Patch Changes - -- indexer: update bindings - -## 1.9.31 - -### Patch Changes - -- metadata: token directory changes - -## 1.9.30 - -### Patch Changes - -- update - -## 1.9.29 - -### Patch Changes - -- disable gnosis chain - -## 1.9.28 - -### Patch Changes - -- add utils/merkletree - -## 1.9.27 - -### Patch Changes - -- network: optimistic -> optimism -- waas: remove defaults -- api, sessions: update bindings - -## 1.9.26 - -### Patch Changes - -- - add backend interfaces for pluggable interfaces - - introduce @0xsequence/react-native - - update pnpm to lockfile v9 - -## 1.9.25 - -### Patch Changes - -- update webrpc clients with new error types - -## 1.9.24 - -### Patch Changes - -- waas: add memoryStore backend to localStore - -## 1.9.23 - -### Patch Changes - -- update api client bindings - -## 1.9.22 - -### Patch Changes - -- update metadata client bindings - -## 1.9.21 - -### Patch Changes - -- api client bindings - -## 1.9.20 - -### Patch Changes - -- api client bindings update - -## 1.9.19 - -### Patch Changes - -- waas update - -## 1.9.18 - -### Patch Changes - -- provider: prohibit dangerous functions - -## 1.9.17 - -### Patch Changes - -- network: add xr-sepolia - -## 1.9.16 - -### Patch Changes - -- waas: sequence.feeOptions - -## 1.9.15 - -### Patch Changes - -- metadata: collection external_link field name fix - -## 1.9.14 - -### Patch Changes - -- network: astar-zkatana -> astar-zkyoto -- network: deprecate polygon mumbai network -- network: add xai and polygon amoy - -## 1.9.13 - -### Patch Changes - -- waas: fix @0xsequence/network dependency - -## 1.9.12 - -### Patch Changes - -- indexer: update rpc bindings -- provider: signMessage: Serialize the BytesLike or string message into hexstring before sending -- waas: SessionAuthProof - -## 1.9.11 - -### Patch Changes - -- metdata, update rpc bindings - -## 1.9.10 - -### Patch Changes - -- update metadata rpc bindings - -## 1.9.9 - -### Patch Changes - -- metadata, add SequenceCollections rpc client - -## 1.9.8 - -### Patch Changes - -- waas client update - -## 1.9.7 - -### Patch Changes - -- update rpc client bindings for api, metadata and relayer - -## 1.9.6 - -### Patch Changes - -- waas package update - -## 1.9.5 - -### Patch Changes - -- RpcRelayer prioritize project access key - -## 1.9.4 - -### Patch Changes - -- waas: fix network dependency - -## 1.9.3 - -### Patch Changes - -- provider: don't append access key to RPC url if user has already provided it - -## 1.9.2 - -### Patch Changes - -- network: add xai-sepolia - -## 1.9.1 - -### Patch Changes - -- analytics fix - -## 1.9.0 - -### Minor Changes - -- waas release - -## 1.8.8 - -### Patch Changes - -- update metadata bindings - -## 1.8.7 - -### Patch Changes - -- provider: update databeat to 0.9.1 - -## 1.8.6 - -### Patch Changes - -- guard: SignedOwnershipProof - -## 1.8.5 - -### Patch Changes - -- guard: signOwnershipProof and isSignedOwnershipProof - -## 1.8.4 - -### Patch Changes - -- network: add homeverse to networks list - -## 1.8.3 - -### Patch Changes - -- api: introduce basic linked wallet support - -## 1.8.2 - -### Patch Changes - -- provider: don't initialize analytics unless explicitly requested - -## 1.8.1 - -### Patch Changes - -- update to analytics provider - -## 1.8.0 - -### Minor Changes - -- provider: project analytics - -## 1.7.2 - -### Patch Changes - -- 0xsequence: ChainId should not be exported as a type -- account, wallet: fix nonce selection - -## 1.7.1 - -### Patch Changes - -- network: add missing avalanche logoURI - -## 1.7.0 - -### Minor Changes - -- provider: projectAccessKey is now required - -### Patch Changes - -- network: add NetworkMetadata.logoURI property for all networks - -## 1.6.3 - -### Patch Changes - -- network list update - -## 1.6.2 - -### Patch Changes - -- auth: projectAccessKey option -- wallet: use 12 bytes for random space - -## 1.6.1 - -### Patch Changes - -- core: add simple config from subdigest support -- core: fix encode tree with subdigest -- account: implement buildOnChainSignature on Account - -## 1.6.0 - -### Minor Changes - -- account, wallet: parallel transactions by default - -### Patch Changes - -- provider: emit disconnect on sign out - -## 1.5.0 - -### Minor Changes - -- signhub: add 'signing' signer status - -### Patch Changes - -- auth: Session.open: onAccountAddress callback -- account: allow empty transaction bundles - -## 1.4.9 - -### Patch Changes - -- rename SequenceMetadataClient to SequenceMetadata - -## 1.4.8 - -### Patch Changes - -- account: Account.getSigners - -## 1.4.7 - -### Patch Changes - -- update indexer client bindings - -## 1.4.6 - -### Patch Changes - -- - add sepolia networks, mark goerli as deprecated - - update indexer client bindings - -## 1.4.5 - -### Patch Changes - -- indexer/metadata: update client bindings -- auth: selectWallet with new address - -## 1.4.4 - -### Patch Changes - -- indexer: update bindings -- auth: handle jwt expiry - -## 1.4.3 - -### Patch Changes - -- guard: return active status from GuardSigner.getAuthMethods - -## 1.4.2 - -### Patch Changes - -- guard: update bindings - -## 1.4.1 - -### Patch Changes - -- network: remove unused networks -- signhub: orchestrator interface -- guard: auth methods interface -- guard: update bindings for pin and totp -- guard: no more retry logic - -## 1.4.0 - -### Minor Changes - -- project access key support - -## 1.3.0 - -### Minor Changes - -- signhub: account children - -### Patch Changes - -- guard: do not throw when building deploy transaction -- network: snowtrace.io -> subnets.avax.network/c-chain - -## 1.2.9 - -### Patch Changes - -- account: AccountSigner.sendTransaction simulateForFeeOptions -- relayer: update bindings - -## 1.2.8 - -### Patch Changes - -- rename X-Sequence-Token-Key header to X-Access-Key - -## 1.2.7 - -### Patch Changes - -- add x-sequence-token-key to clients - -## 1.2.6 - -### Patch Changes - -- Fix bind multicall provider - -## 1.2.5 - -### Patch Changes - -- Multicall default configuration fixes - -## 1.2.4 - -### Patch Changes - -- provider: Adding missing payment provider types to PaymentProviderOption -- provider: WalletRequestHandler.notifyChainChanged - -## 1.2.3 - -### Patch Changes - -- auth, provider: connect to accept optional authorizeNonce - -## 1.2.2 - -### Patch Changes - -- provider: allow createContract calls -- core: check for explicit zero address in contract deployments - -## 1.2.1 - -### Patch Changes - -- auth: use sequence api chain id as reference chain id if available - -## 1.2.0 - -### Minor Changes - -- split services from session, better local support - -## 1.1.15 - -### Patch Changes - -- guard: remove error filtering - -## 1.1.14 - -### Patch Changes - -- guard: add GuardSigner.onError - -## 1.1.13 - -### Patch Changes - -- provider: pass client version with connect options -- provider: removing large from BannerSize - -## 1.1.12 - -### Patch Changes - -- provider: adding bannerSize to ConnectOptions - -## 1.1.11 - -### Patch Changes - -- add homeverse configs - -## 1.1.10 - -### Patch Changes - -- handle default EIP6492 on send - -## 1.1.9 - -### Patch Changes - -- Custom default EIP6492 on client - -## 1.1.8 - -### Patch Changes - -- metadata: searchMetadata: add types filter - -## 1.1.7 - -### Patch Changes - -- adding signInWith connect settings option to allow dapps to automatically login their users with a certain provider optimizing the normal authentication flow - -## 1.1.6 - -### Patch Changes - -- metadata: searchMetadata: add chainID and excludeTokenMetadata filters - -## 1.1.5 - -### Patch Changes - -- account: re-compute meta-transaction id for wallet deployment transactions - -## 1.1.4 - -### Patch Changes - -- network: rename base-mainnet to base -- provider: override isDefaultChain with ConnectOptions.networkId if provided - -## 1.1.3 - -### Patch Changes - -- provider: use network id from transport session -- provider: sign authorization using ConnectOptions.networkId if provided - -## 1.1.2 - -### Patch Changes - -- provider: jsonrpc chain id fixes - -## 1.1.1 - -### Patch Changes - -- network: add base mainnet and sepolia -- provider: reject toxic transaction requests - -## 1.1.0 - -### Minor Changes - -- Refactor dapp facing provider - -## 1.0.5 - -### Patch Changes - -- network: export network constants -- guard: use the correct global for fetch -- network: nova-explorer.arbitrum.io -> nova.arbiscan.io - -## 1.0.4 - -### Patch Changes - -- provider: accept name or number for networkId - -## 1.0.3 - -### Patch Changes - -- Simpler isValidSignature helpers - -## 1.0.2 - -### Patch Changes - -- add extra signature validation utils methods - -## 1.0.1 - -### Patch Changes - -- add homeverse testnet - -## 1.0.0 - -### Major Changes - -- https://sequence.xyz/blog/sequence-wallet-light-state-sync-full-merkle-wallets - -## 0.43.34 - -### Patch Changes - -- auth: no jwt for indexer - -## 0.43.33 - -### Patch Changes - -- Adding onConnectOptionsChange handler to WalletRequestHandler - -## 0.43.32 - -### Patch Changes - -- add Base Goerli network - -## 0.43.31 - -### Patch Changes - -- remove AuxDataProvider, add promptSignInConnect - -## 0.43.30 - -### Patch Changes - -- add arbitrum goerli testnet - -## 0.43.29 - -### Patch Changes - -- provider: check availability of window object - -## 0.43.28 - -### Patch Changes - -- update api bindings - -## 0.43.27 - -### Patch Changes - -- Add rpc is sequence method - -## 0.43.26 - -### Patch Changes - -- add zkevm url to enum - -## 0.43.25 - -### Patch Changes - -- added polygon zkevm to mainnet networks - -## 0.43.24 - -### Patch Changes - -- name change from zkevm to polygon-zkevm - -## 0.43.23 - -### Patch Changes - -- update zkEVM name to Polygon zkEVM - -## 0.43.22 - -### Patch Changes - -- add zkevm chain - -## 0.43.21 - -### Patch Changes - -- api: update client bindings - -## 0.43.20 - -### Patch Changes - -- indexer: update bindings - -## 0.43.19 - -### Patch Changes - -- session proof update - -## 0.43.18 - -### Patch Changes - -- rpc client global check, hardening - -## 0.43.17 - -### Patch Changes - -- rpc clients, check of 'global' is defined - -## 0.43.16 - -### Patch Changes - -- ethers peerDep to v5, update rpc client global use - -## 0.43.15 - -### Patch Changes - -- - provider: expand receiver type on some util methods - -## 0.43.14 - -### Patch Changes - -- bump - -## 0.43.13 - -### Patch Changes - -- update rpc bindings - -## 0.43.12 - -### Patch Changes - -- provider: single wallet init, and add new unregisterWallet() method - -## 0.43.11 - -### Patch Changes - -- fix lockfiles -- re-add mocha type deleter - -## 0.43.10 - -### Patch Changes - -- various improvements - -## 0.43.9 - -### Patch Changes - -- update deps - -## 0.43.8 - -### Patch Changes - -- network: JsonRpcProvider with caching - -## 0.43.7 - -### Patch Changes - -- provider: fix wallet network init - -## 0.43.6 - -### Patch Changes - -- metadatata: update rpc bindings - -## 0.43.5 - -### Patch Changes - -- provider: do not set default network for connect messages -- provider: forward missing error message - -## 0.43.4 - -### Patch Changes - -- no-change version bump to fix incorrectly tagged snapshot build - -## 0.43.3 - -### Patch Changes - -- metadata: update bindings - -## 0.43.2 - -### Patch Changes - -- provider: implement connectUnchecked - -## 0.43.1 - -### Patch Changes - -- update to latest ethauth dep - -## 0.43.0 - -### Minor Changes - -- move ethers to a peer dependency - -## 0.42.10 - -### Patch Changes - -- add auxDataProvider - -## 0.42.9 - -### Patch Changes - -- provider: add eip-191 exceptions - -## 0.42.8 - -### Patch Changes - -- provider: skip setting intent origin if we're unity plugin - -## 0.42.7 - -### Patch Changes - -- Add sign in options to connection settings - -## 0.42.6 - -### Patch Changes - -- api bindings update - -## 0.42.5 - -### Patch Changes - -- relayer: don't treat missing receipt as hard failure - -## 0.42.4 - -### Patch Changes - -- provider: add custom app protocol to connect options - -## 0.42.3 - -### Patch Changes - -- update api bindings - -## 0.42.2 - -### Patch Changes - -- disable rinkeby network - -## 0.42.1 - -### Patch Changes - -- wallet: optional waitForReceipt parameter - -## 0.42.0 - -### Minor Changes - -- relayer: estimateGasLimits -> simulate -- add simulator package - -### Patch Changes - -- transactions: fix flattenAuxTransactions -- provider: only filter nullish values -- provider: re-map transaction 'gas' back to 'gasLimit' - -## 0.41.3 - -### Patch Changes - -- api bindings update - -## 0.41.2 - -### Patch Changes - -- api bindings update - -## 0.41.1 - -### Patch Changes - -- update default networks - -## 0.41.0 - -### Minor Changes - -- relayer: fix Relayer.wait() interface - - The interface for calling Relayer.wait() has changed. Instead of a single optional ill-defined timeout/delay parameter, there are three optional parameters, in order: - - - timeout: the maximum time to wait for the transaction receipt - - delay: the polling interval, i.e. the time to wait between requests - - maxFails: the maximum number of hard failures to tolerate before giving up - - Please update your codebase accordingly. - -- relayer: add optional waitForReceipt parameter to Relayer.relay - - The behaviour of Relayer.relay() was not well-defined with respect to whether or not it waited for a receipt. - This change allows the caller to specify whether to wait or not, with the default behaviour being to wait. - -### Patch Changes - -- relayer: wait receipt retry logic -- fix wrapped object error -- provider: forward delegateCall and revertOnError transaction fields - -## 0.40.6 - -### Patch Changes - -- add arbitrum-nova chain - -## 0.40.5 - -### Patch Changes - -- api: update bindings - -## 0.40.4 - -### Patch Changes - -- add unreal transport - -## 0.40.3 - -### Patch Changes - -- provider: fix MessageToSign message type - -## 0.40.2 - -### Patch Changes - -- Wallet provider, loadSession method - -## 0.40.1 - -### Patch Changes - -- export sequence.initWallet and sequence.getWallet - -## 0.40.0 - -### Minor Changes - -- add sequence.initWallet(network, config) and sequence.getWallet() helper methods - -## 0.39.6 - -### Patch Changes - -- indexer: update client bindings - -## 0.39.5 - -### Patch Changes - -- provider: fix networkRpcUrl config option - -## 0.39.4 - -### Patch Changes - -- api: update client bindings - -## 0.39.3 - -### Patch Changes - -- add request method on Web3Provider - -## 0.39.2 - -### Patch Changes - -- update umd name - -## 0.39.1 - -### Patch Changes - -- add Aurora network -- add origin info for accountsChanged event to handle it per dapp - -## 0.39.0 - -### Minor Changes - -- abstract window.localStorage to interface type - -## 0.38.2 - -### Patch Changes - -- provider: add Settings.defaultPurchaseAmount - -## 0.38.1 - -### Patch Changes - -- update api and metadata rpc bindings - -## 0.38.0 - -### Minor Changes - -- api: update bindings, change TokenPrice interface -- bridge: remove @0xsequence/bridge package -- api: update bindings, rename ContractCallArg to TupleComponent - -## 0.37.1 - -### Patch Changes - -- Add back sortNetworks - Removing sorting was a breaking change for dapps on older versions which directly integrate sequence. - -## 0.37.0 - -### Minor Changes - -- network related fixes and improvements -- api: bindings: exchange rate lookups - -## 0.36.13 - -### Patch Changes - -- api: update bindings with new price endpoints - -## 0.36.12 - -### Patch Changes - -- wallet: skip remote signers if not needed -- auth: check that signature meets threshold before requesting auth token - -## 0.36.11 - -### Patch Changes - -- Prefix EIP191 message on wallet-request-handler - -## 0.36.10 - -### Patch Changes - -- support bannerUrl on connect - -## 0.36.9 - -### Patch Changes - -- minor dev xp improvements - -## 0.36.8 - -### Patch Changes - -- more connect options (theme, payment providers, funding currencies) - -## 0.36.7 - -### Patch Changes - -- fix missing break - -## 0.36.6 - -### Patch Changes - -- wallet_switchEthereumChain support - -## 0.36.5 - -### Patch Changes - -- auth: bump ethauth to 0.7.0 - network, wallet: don't assume position of auth network in list - api/indexer/metadata: trim trailing slash on hostname, and add endpoint urls - relayer: Allow to specify local relayer transaction parameters like gas price or gas limit - -## 0.36.4 - -### Patch Changes - -- Updating list of chain ids to include other ethereum compatible chains - -## 0.36.3 - -### Patch Changes - -- provider: pass connect options to prompter methods - -## 0.36.2 - -### Patch Changes - -- transactions: Setting target to 0x0 when empty to during SequenceTxAbiEncode - -## 0.36.1 - -### Patch Changes - -- metadata: update client with more fields - -## 0.36.0 - -### Minor Changes - -- relayer, wallet: fee quote support - -## 0.35.12 - -### Patch Changes - -- provider: rename wallet.commands to wallet.utils - -## 0.35.11 - -### Patch Changes - -- provider/utils: smoother message validation - -## 0.35.10 - -### Patch Changes - -- upgrade deps - -## 0.35.9 - -### Patch Changes - -- provider: window-transport override event handlers with new wallet instance - -## 0.35.8 - -### Patch Changes - -- provider: async wallet sign in improvements - -## 0.35.7 - -### Patch Changes - -- config: cache wallet configs - -## 0.35.6 - -### Patch Changes - -- provider: support async signin of wallet request handler - -## 0.35.5 - -### Patch Changes - -- wallet: skip threshold check during fee estimation - -## 0.35.4 - -### Patch Changes - -- - browser extension mode, center window - -## 0.35.3 - -### Patch Changes - -- - update window position when in browser extension mode - -## 0.35.2 - -### Patch Changes - -- - provider: WindowMessageHandler accept optional windowHref - -## 0.35.1 - -### Patch Changes - -- wallet: update config on undeployed too - -## 0.35.0 - -### Minor Changes - -- - config: add buildStubSignature - - provider: add checks to signing cases for wallet deployment and config statuses - - provider: add prompt for wallet deployment - - relayer: add BaseRelayer.prependWalletDeploy - - relayer: add Relayer.feeOptions - - relayer: account for wallet deployment in fee estimation - - transactions: add fromTransactionish - - wallet: add Account.prependConfigUpdate - - wallet: add Account.getFeeOptions - -## 0.34.0 - -### Minor Changes - -- - upgrade deps - -## 0.31.0 - -### Minor Changes - -- - upgrading to ethers v5.5 - -## 0.30.0 - -### Minor Changes - -- - upgrade most deps - -## 0.29.8 - -### Patch Changes - -- update api - -## 0.29.3 - -### Patch Changes - -- indexer: add bridge contract types - -## 0.29.0 - -### Minor Changes - -- major architectural changes in Sequence design - - - only one API instance, API is no longer a per-chain service - - separate per-chain indexer service, API no longer handles indexing - - single contract metadata service, API no longer serves metadata - - chaind package has been removed, indexer and metadata packages have been added - - stronger typing with new explicit ChainId type - - multicall fixes and improvements - - forbid "wait" transactions in sendTransactionBatch calls diff --git a/old/packages/indexer/README.md b/old/packages/indexer/README.md deleted file mode 100644 index dfffc4c7a..000000000 --- a/old/packages/indexer/README.md +++ /dev/null @@ -1,4 +0,0 @@ -@0xsequence/indexer -=================== - -See [0xsequence project page](https://github.com/0xsequence/sequence.js). diff --git a/old/packages/indexer/package.json b/old/packages/indexer/package.json deleted file mode 100644 index 56e31a7ea..000000000 --- a/old/packages/indexer/package.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "name": "@0xsequence/indexer", - "version": "2.3.8", - "description": "indexer sub-package for Sequence", - "repository": "https://github.com/0xsequence/sequence.js/tree/master/packages/indexer", - "source": "src/index.ts", - "main": "dist/0xsequence-indexer.cjs.js", - "module": "dist/0xsequence-indexer.esm.js", - "author": "Horizon Blockchain Games", - "license": "Apache-2.0", - "scripts": { - "test": "echo", - "typecheck": "tsc --noEmit" - }, - "dependencies": {}, - "peerDependencies": {}, - "devDependencies": {}, - "files": [ - "src", - "dist" - ] -} diff --git a/old/packages/indexer/src/index.ts b/old/packages/indexer/src/index.ts deleted file mode 100644 index 0401f38be..000000000 --- a/old/packages/indexer/src/index.ts +++ /dev/null @@ -1,71 +0,0 @@ -export * from './indexer.gen' -export * as IndexerGateway from './indexergw.gen' - -import { Indexer as IndexerRpc } from './indexer.gen' -import { IndexerGateway as IndexerGatewayRpc } from './indexergw.gen' - -export class SequenceIndexer extends IndexerRpc { - constructor( - hostname: string, - public projectAccessKey?: string, - public jwtAuth?: string - ) { - super(hostname.endsWith('/') ? hostname.slice(0, -1) : hostname, fetch) - this.fetch = this._fetch - } - - _fetch = (input: RequestInfo, init?: RequestInit): Promise => { - // automatically include jwt and access key auth header to requests - // if its been set on the api client - const headers: { [key: string]: any } = {} - - const jwtAuth = this.jwtAuth - const projectAccessKey = this.projectAccessKey - - if (jwtAuth && jwtAuth.length > 0) { - headers['Authorization'] = `BEARER ${jwtAuth}` - } - - if (projectAccessKey && projectAccessKey.length > 0) { - headers['X-Access-Key'] = projectAccessKey - } - - // before the request is made - init!.headers = { ...init!.headers, ...headers } - - return fetch(input, init) - } -} - -export class SequenceIndexerGateway extends IndexerGatewayRpc { - constructor( - hostname: string, - public projectAccessKey?: string, - public jwtAuth?: string - ) { - super(hostname.endsWith('/') ? hostname.slice(0, -1) : hostname, fetch) - this.fetch = this._fetch - } - - _fetch = (input: RequestInfo, init?: RequestInit): Promise => { - // automatically include jwt and access key auth header to requests - // if its been set on the api client - const headers: { [key: string]: any } = {} - - const jwtAuth = this.jwtAuth - const projectAccessKey = this.projectAccessKey - - if (jwtAuth && jwtAuth.length > 0) { - headers['Authorization'] = `BEARER ${jwtAuth}` - } - - if (projectAccessKey && projectAccessKey.length > 0) { - headers['X-Access-Key'] = projectAccessKey - } - - // before the request is made - init!.headers = { ...init!.headers, ...headers } - - return fetch(input, init) - } -} diff --git a/old/packages/indexer/src/indexer.gen.ts b/old/packages/indexer/src/indexer.gen.ts deleted file mode 100644 index fe88eab5b..000000000 --- a/old/packages/indexer/src/indexer.gen.ts +++ /dev/null @@ -1,2310 +0,0 @@ -/* eslint-disable */ -// sequence-indexer v0.4.0 546b527de7002f409ffa602ad35b5a3abe979088 -// -- -// Code generated by webrpc-gen@v0.21.1 with typescript generator. DO NOT EDIT. -// -// webrpc-gen -schema=indexer.ridl -service=Indexer -target=typescript -client -out=./clients/indexer.gen.ts - -export const WebrpcHeader = 'Webrpc' - -export const WebrpcHeaderValue = 'webrpc@v0.21.1;gen-typescript@v0.15.1;sequence-indexer@v0.4.0' - -// WebRPC description and code-gen version -export const WebRPCVersion = 'v1' - -// Schema version of your RIDL schema -export const WebRPCSchemaVersion = 'v0.4.0' - -// Schema hash generated from your RIDL schema -export const WebRPCSchemaHash = '546b527de7002f409ffa602ad35b5a3abe979088' - -type WebrpcGenVersions = { - webrpcGenVersion: string - codeGenName: string - codeGenVersion: string - schemaName: string - schemaVersion: string -} - -export function VersionFromHeader(headers: Headers): WebrpcGenVersions { - const headerValue = headers.get(WebrpcHeader) - if (!headerValue) { - return { - webrpcGenVersion: '', - codeGenName: '', - codeGenVersion: '', - schemaName: '', - schemaVersion: '' - } - } - - return parseWebrpcGenVersions(headerValue) -} - -function parseWebrpcGenVersions(header: string): WebrpcGenVersions { - const versions = header.split(';') - if (versions.length < 3) { - return { - webrpcGenVersion: '', - codeGenName: '', - codeGenVersion: '', - schemaName: '', - schemaVersion: '' - } - } - - const [_, webrpcGenVersion] = versions[0].split('@') - const [codeGenName, codeGenVersion] = versions[1].split('@') - const [schemaName, schemaVersion] = versions[2].split('@') - - return { - webrpcGenVersion, - codeGenName, - codeGenVersion, - schemaName, - schemaVersion - } -} - -// -// Types -// - -export enum ResourceStatus { - NOT_AVAILABLE = 'NOT_AVAILABLE', - REFRESHING = 'REFRESHING', - AVAILABLE = 'AVAILABLE' -} - -export interface ContractInfo { - chainId: number - address: string - source: string - name: string - type: string - symbol: string - decimals?: number - logoURI: string - deployed: boolean - bytecodeHash: string - extensions: ContractInfoExtensions - updatedAt: string - queuedAt?: string - status: ResourceStatus -} - -export interface ContractInfoExtensions { - link: string - description: string - categories: Array - ogImage: string - ogName: string - originChainId: number - originAddress: string - blacklist: boolean - verified: boolean - verifiedBy: string - featured: boolean - featureIndex: number -} - -export interface TokenMetadata { - contractAddress?: string - tokenId: string - source: string - name: string - description?: string - image?: string - video?: string - audio?: string - properties?: { [key: string]: any } - attributes: Array<{ [key: string]: any }> - image_data?: string - external_url?: string - background_color?: string - animation_url?: string - decimals?: number - updatedAt?: string - assets?: Array - status: ResourceStatus - queuedAt?: string - lastFetched?: string -} - -export interface Asset { - id: number - collectionId: number - tokenId?: string - url?: string - metadataField: string - name?: string - filesize?: number - mimeType?: string - width?: number - height?: number - updatedAt?: string -} - -export enum ContractType { - UNKNOWN = 'UNKNOWN', - NATIVE = 'NATIVE', - ERC20 = 'ERC20', - ERC721 = 'ERC721', - ERC1155 = 'ERC1155', - SEQUENCE_WALLET = 'SEQUENCE_WALLET', - ERC20_BRIDGE = 'ERC20_BRIDGE', - ERC721_BRIDGE = 'ERC721_BRIDGE', - ERC1155_BRIDGE = 'ERC1155_BRIDGE', - SEQ_MARKETPLACE = 'SEQ_MARKETPLACE' -} - -export enum EventLogType { - UNKNOWN = 'UNKNOWN', - BLOCK_ADDED = 'BLOCK_ADDED', - BLOCK_REMOVED = 'BLOCK_REMOVED' -} - -export enum EventLogDataType { - EVENT = 'EVENT', - TOKEN_TRANSFER = 'TOKEN_TRANSFER', - NATIVE_TOKEN_TRANSFER = 'NATIVE_TOKEN_TRANSFER', - SEQUENCE_TXN = 'SEQUENCE_TXN' -} - -export enum OrderStatus { - OPEN = 'OPEN', - CLOSED = 'CLOSED', - CANCELLED = 'CANCELLED' -} - -export enum TxnTransferType { - UNKNOWN = 'UNKNOWN', - SEND = 'SEND', - RECEIVE = 'RECEIVE' -} - -export enum TransactionStatus { - FAILED = 'FAILED', - SUCCESSFUL = 'SUCCESSFUL' -} - -export enum TransactionType { - LegacyTxnType = 'LegacyTxnType', - AccessListTxnType = 'AccessListTxnType', - DynamicFeeTxnType = 'DynamicFeeTxnType' -} - -export enum SortOrder { - DESC = 'DESC', - ASC = 'ASC' -} - -export enum ContractVerificationStatus { - VERIFIED = 'VERIFIED', - UNVERIFIED = 'UNVERIFIED', - ALL = 'ALL' -} - -export interface Version { - webrpcVersion: string - schemaVersion: string - schemaHash: string - appVersion: string -} - -export interface RuntimeStatus { - healthOK: boolean - indexerEnabled: boolean - startTime: string - uptime: number - ver: string - branch: string - commitHash: string - chainID: number - checks: RuntimeChecks -} - -export interface GatewayBackendResponseTime { - percentiles: { [key: string]: number } - average: number -} - -export interface GatewayBackendRuntimeStatus { - name: string - chainId: number - responseTime: GatewayBackendResponseTime -} - -export interface GatewayRuntimeStatus { - healthOK: boolean - startTime: string - uptime: number - ver: string - branch: string - commitHash: string - backends: Array -} - -export interface WALWriterRuntimeStatus { - healthOK: boolean - startTime: string - uptime: number - ver: string - branch: string - commitHash: string - chainID: number - percentWALWritten: number -} - -export interface RuntimeChecks { - running: boolean - runnables: any - cgoEnabled: boolean - quotaControlEnabled: boolean - syncMode: string - percentIndexed: number - lastBlockNum: number - lastBlockNumWithState: number - bloomStatus: BloomStatus - bond: Bond - diskUsage: DiskUsage -} - -export interface DiskUsage { - humanReadable: string - used: number - size: number - percent: number - dirs: { [key: string]: string } -} - -export interface Bond { - pebble: PebbleMetrics - estimatedDiskUsagePerTable: any - estimatedDiskUsageTotal: string -} - -export interface PebbleMetrics { - compactionCount: number - compactionEstimatedDebt: number - compactionInProgressBytes: number - compactionNumInProgress: number - compactionMarkedFiles: number -} - -export interface BloomStatus { - enabled: boolean - initialized: boolean - bloomInitElapsedTime: string -} - -export interface EtherBalance { - accountAddress: string - balanceWei: string -} - -export interface NativeTokenBalance { - accountAddress: string - chainId: number - balance: string - error: string -} - -export interface IndexState { - chainId: string - lastBlockNum: number - lastBlockHash: string -} - -export interface IndexedBlock { - blockNumber: number - blockShortHash: string -} - -export interface TxnInfo { - from: string - to: string - value: string -} - -export interface EventLog { - id: number - uid: string - type: EventLogType - blockNumber: number - blockHash: string - parentBlockHash: string - contractAddress: string - contractType: ContractType - txnHash: string - txnIndex: number - txnLogIndex: number - logDataType: EventLogDataType - ts: string - txnInfo?: TxnInfo - rawLog?: { [key: string]: any } - event?: EventDecoded -} - -export interface EventDecoded { - topicHash: string - eventSig: string - types: Array - names: Array - values: Array -} - -export interface TokenBalance { - contractType: ContractType - contractAddress: string - accountAddress: string - tokenID?: string - balance: string - blockHash: string - blockNumber: number - chainId: number - uniqueCollectibles: string - isSummary: boolean - contractInfo?: ContractInfo - tokenMetadata?: TokenMetadata -} - -export interface OrderbookOrder { - orderId: string - tokenContract: string - tokenId: string - isListing: boolean - quantity: string - quantityRemaining: string - currencyAddress: string - pricePerToken: string - expiry: string - orderStatus: OrderStatus - createdBy: string - blockNumber: number - orderbookContractAddress: string - createdAt: number -} - -export interface OrderbookOrderFilter { - isListing?: boolean - userAddresses?: Array - tokenIds: Array - excludeUserAddresses?: Array - afterBlockNumber: number - afterCreatedAt: number - beforeExpiry: number - userAddress?: string - excludeUserAddress?: string -} - -export interface TokenHistory { - blockNumber: number - blockHash: string - accountAddress: string - contractAddress: string - contractType: ContractType - fromAddress: string - toAddress: string - txnHash: string - txnIndex: number - txnLogIndex: number - logData: string - tokenIDs: string - Amounts: string - ts: string -} - -export interface TokenSupply { - tokenID: string - supply: string - chainId: number - contractInfo?: ContractInfo - tokenMetadata?: TokenMetadata -} - -export interface Transaction { - txnHash: string - blockNumber: number - blockHash: string - chainId: number - metaTxnID?: string - transfers?: Array - timestamp: string -} - -export interface TxnTransfer { - transferType: TxnTransferType - contractAddress: string - contractType: ContractType - from: string - to: string - tokenIds?: Array - amounts: Array - logIndex: number - contractInfo?: ContractInfo - tokenMetadata?: { [key: string]: TokenMetadata } -} - -export interface TransactionHistoryFilter { - accountAddress?: string - contractAddress?: string - accountAddresses?: Array - contractAddresses?: Array - transactionHashes?: Array - metaTransactionIDs?: Array - fromBlock?: number - toBlock?: number - tokenID?: string -} - -export interface TransactionFilter { - txnHash?: string - from?: string - to?: string - contractAddress?: string - event?: string -} - -export interface TransactionReceipt { - txnHash: string - txnStatus: TransactionStatus - txnIndex: number - txnType: TransactionType - blockHash: string - blockNumber: number - gasUsed: number - effectiveGasPrice: string - from: string - to: string - logs: Array - final: boolean - reorged: boolean -} - -export interface TransactionLog { - contractAddress: string - topics: Array - data: string - index: number -} - -export interface TokenIDRange { - start: string - end: string -} - -export interface Page { - page?: number - column?: string - before?: any - after?: any - sort?: Array - pageSize?: number - more?: boolean -} - -export interface SortBy { - column: string - order: SortOrder -} - -export interface WebhookListener { - id: number - projectID: number - url: string - filters: EventFilter - name: string - updatedAt: string - active: boolean -} - -export interface EventFilter { - events?: Array - contractAddresses?: Array - accounts?: Array - tokenIDs?: Array -} - -export interface TokenBalanceFilter { - contractAddress: string - sinceBlockNumber: number -} - -export interface MetadataOptions { - verifiedOnly?: boolean - unverifiedOnly?: boolean - includeContracts?: Array -} - -export interface TokenBalancesFilter { - accountAddresses: Array - contractStatus?: ContractVerificationStatus - contractTypes?: Array - contractWhitelist?: Array - contractBlacklist?: Array - omitNativeBalances: boolean -} - -export interface TokenBalancesByContractFilter { - contractAddresses: Array - accountAddresses?: Array - contractStatus?: ContractVerificationStatus -} - -export interface GatewayEtherBalance { - chainId: number - error: string - result: EtherBalance -} - -export interface GatewayNativeTokenBalance { - chainId: number - error: string - result: NativeTokenBalance -} - -export interface GatewayNativeTokenBalances { - chainId: number - error: string - results: Array -} - -export interface GatewayTokenBalance { - chainId: number - error: string - results: Array -} - -export interface Indexer { - ping(headers?: object, signal?: AbortSignal): Promise - version(headers?: object, signal?: AbortSignal): Promise - runtimeStatus(headers?: object, signal?: AbortSignal): Promise - getChainID(headers?: object, signal?: AbortSignal): Promise - getEtherBalance(args: GetEtherBalanceArgs, headers?: object, signal?: AbortSignal): Promise - getNativeTokenBalance( - args: GetNativeTokenBalanceArgs, - headers?: object, - signal?: AbortSignal - ): Promise - getTokenBalancesSummary( - args: GetTokenBalancesSummaryArgs, - headers?: object, - signal?: AbortSignal - ): Promise - getTokenBalancesDetails( - args: GetTokenBalancesDetailsArgs, - headers?: object, - signal?: AbortSignal - ): Promise - getTokenBalancesByContract( - args: GetTokenBalancesByContractArgs, - headers?: object, - signal?: AbortSignal - ): Promise - getTokenBalances(args: GetTokenBalancesArgs, headers?: object, signal?: AbortSignal): Promise - getTokenSupplies(args: GetTokenSuppliesArgs, headers?: object, signal?: AbortSignal): Promise - getTokenSuppliesMap(args: GetTokenSuppliesMapArgs, headers?: object, signal?: AbortSignal): Promise - getTokenIDs(args: GetTokenIDsArgs, headers?: object, signal?: AbortSignal): Promise - getTokenIDRanges(args: GetTokenIDRangesArgs, headers?: object, signal?: AbortSignal): Promise - getBalanceUpdates(args: GetBalanceUpdatesArgs, headers?: object, signal?: AbortSignal): Promise - getTransactionHistory( - args: GetTransactionHistoryArgs, - headers?: object, - signal?: AbortSignal - ): Promise - fetchTransactionReceipt( - args: FetchTransactionReceiptArgs, - headers?: object, - signal?: AbortSignal - ): Promise - fetchTransactionReceiptWithFilter( - args: FetchTransactionReceiptWithFilterArgs, - headers?: object, - signal?: AbortSignal - ): Promise - subscribeReceipts(args: SubscribeReceiptsArgs, options: WebrpcStreamOptions): Promise - subscribeEvents(args: SubscribeEventsArgs, options: WebrpcStreamOptions): Promise - subscribeBalanceUpdates( - args: SubscribeBalanceUpdatesArgs, - options: WebrpcStreamOptions - ): Promise - syncBalance(args: SyncBalanceArgs, headers?: object, signal?: AbortSignal): Promise - getAllWebhookListeners( - args: GetAllWebhookListenersArgs, - headers?: object, - signal?: AbortSignal - ): Promise - getWebhookListener(args: GetWebhookListenerArgs, headers?: object, signal?: AbortSignal): Promise - addWebhookListener(args: AddWebhookListenerArgs, headers?: object, signal?: AbortSignal): Promise - updateWebhookListener( - args: UpdateWebhookListenerArgs, - headers?: object, - signal?: AbortSignal - ): Promise - removeWebhookListener( - args: RemoveWebhookListenerArgs, - headers?: object, - signal?: AbortSignal - ): Promise - removeAllWebhookListeners( - args: RemoveAllWebhookListenersArgs, - headers?: object, - signal?: AbortSignal - ): Promise - toggleWebhookListener( - args: ToggleWebhookListenerArgs, - headers?: object, - signal?: AbortSignal - ): Promise - pauseAllWebhookListeners( - args: PauseAllWebhookListenersArgs, - headers?: object, - signal?: AbortSignal - ): Promise - resumeAllWebhookListeners( - args: ResumeAllWebhookListenersArgs, - headers?: object, - signal?: AbortSignal - ): Promise - getOrderbookOrders(args: GetOrderbookOrdersArgs, headers?: object, signal?: AbortSignal): Promise - getTopOrders(args: GetTopOrdersArgs, headers?: object, signal?: AbortSignal): Promise -} - -export interface PingArgs {} - -export interface PingReturn { - status: boolean -} -export interface VersionArgs {} - -export interface VersionReturn { - version: Version -} -export interface RuntimeStatusArgs {} - -export interface RuntimeStatusReturn { - status: RuntimeStatus -} -export interface GetChainIDArgs {} - -export interface GetChainIDReturn { - chainID: number -} -export interface GetEtherBalanceArgs { - accountAddress?: string -} - -export interface GetEtherBalanceReturn { - balance: EtherBalance -} -export interface GetNativeTokenBalanceArgs { - accountAddress?: string -} - -export interface GetNativeTokenBalanceReturn { - balance: NativeTokenBalance -} -export interface GetTokenBalancesSummaryArgs { - filter: TokenBalancesFilter - omitMetadata?: boolean - page?: Page -} - -export interface GetTokenBalancesSummaryReturn { - page: Page - nativeBalances: Array - balances: Array -} -export interface GetTokenBalancesDetailsArgs { - filter: TokenBalancesFilter - omitMetadata?: boolean - page?: Page -} - -export interface GetTokenBalancesDetailsReturn { - page: Page - nativeBalances: Array - balances: Array -} -export interface GetTokenBalancesByContractArgs { - filter: TokenBalancesByContractFilter - omitMetadata?: boolean - page?: Page -} - -export interface GetTokenBalancesByContractReturn { - page: Page - balances: Array -} -export interface GetTokenBalancesArgs { - accountAddress?: string - contractAddress?: string - tokenID?: string - includeMetadata?: boolean - metadataOptions?: MetadataOptions - includeCollectionTokens?: boolean - page?: Page -} - -export interface GetTokenBalancesReturn { - page: Page - balances: Array -} -export interface GetTokenSuppliesArgs { - contractAddress: string - includeMetadata?: boolean - metadataOptions?: MetadataOptions - page?: Page -} - -export interface GetTokenSuppliesReturn { - page: Page - contractType: ContractType - tokenIDs: Array -} -export interface GetTokenSuppliesMapArgs { - tokenMap: { [key: string]: Array } - includeMetadata?: boolean - metadataOptions?: MetadataOptions -} - -export interface GetTokenSuppliesMapReturn { - supplies: { [key: string]: Array } -} -export interface GetTokenIDsArgs { - contractAddress: string - page?: Page -} - -export interface GetTokenIDsReturn { - page: Page - contractType: ContractType - tokenIDs: Array -} -export interface GetTokenIDRangesArgs { - contractAddress: string -} - -export interface GetTokenIDRangesReturn { - contractType: ContractType - tokenIDRanges: Array - moreRanges: boolean -} -export interface GetBalanceUpdatesArgs { - contractAddress: string - lastBlockNumber: number - lastBlockHash?: string - page?: Page -} - -export interface GetBalanceUpdatesReturn { - page: Page - balances: Array -} -export interface GetTransactionHistoryArgs { - filter: TransactionHistoryFilter - page?: Page - includeMetadata?: boolean - metadataOptions?: MetadataOptions -} - -export interface GetTransactionHistoryReturn { - page: Page - transactions: Array -} -export interface FetchTransactionReceiptArgs { - txnHash: string - maxBlockWait?: number -} - -export interface FetchTransactionReceiptReturn { - receipt: TransactionReceipt -} -export interface FetchTransactionReceiptWithFilterArgs { - filter: TransactionFilter - maxBlockWait?: number -} - -export interface FetchTransactionReceiptWithFilterReturn { - receipt: TransactionReceipt -} -export interface SubscribeReceiptsArgs { - filter: TransactionFilter -} - -export interface SubscribeReceiptsReturn { - receipt: TransactionReceipt -} -export interface SubscribeEventsArgs { - filter: EventFilter -} - -export interface SubscribeEventsReturn { - log: EventLog -} -export interface SubscribeBalanceUpdatesArgs { - contractAddress: string -} - -export interface SubscribeBalanceUpdatesReturn { - balance: TokenBalance -} -export interface SyncBalanceArgs { - accountAddress: string - contractAddress: string - tokenID?: string -} - -export interface SyncBalanceReturn {} -export interface GetAllWebhookListenersArgs { - projectId?: number -} - -export interface GetAllWebhookListenersReturn { - listeners: Array -} -export interface GetWebhookListenerArgs { - id: number - projectId?: number -} - -export interface GetWebhookListenerReturn { - listener: WebhookListener -} -export interface AddWebhookListenerArgs { - url: string - filters: EventFilter - projectId?: number -} - -export interface AddWebhookListenerReturn { - status: boolean - listener: WebhookListener -} -export interface UpdateWebhookListenerArgs { - listener: WebhookListener - projectId?: number -} - -export interface UpdateWebhookListenerReturn { - status: boolean -} -export interface RemoveWebhookListenerArgs { - id: number - projectId?: number -} - -export interface RemoveWebhookListenerReturn { - status: boolean -} -export interface RemoveAllWebhookListenersArgs { - projectId?: number -} - -export interface RemoveAllWebhookListenersReturn { - status: boolean -} -export interface ToggleWebhookListenerArgs { - id: number - projectId?: number -} - -export interface ToggleWebhookListenerReturn { - webhookListener: WebhookListener -} -export interface PauseAllWebhookListenersArgs { - projectId?: number -} - -export interface PauseAllWebhookListenersReturn { - status: boolean -} -export interface ResumeAllWebhookListenersArgs { - projectId?: number -} - -export interface ResumeAllWebhookListenersReturn { - status: boolean -} -export interface GetOrderbookOrdersArgs { - page?: Page - orderbookContractAddress: string - collectionAddress: string - currencyAddresses: Array - filter: OrderbookOrderFilter - orderStatuses: Array - filters: Array - beforeExpiryTimestamp: number - blockNumberAfter: number - createdAtAfter: number -} - -export interface GetOrderbookOrdersReturn { - page?: Page - orders: Array -} -export interface GetTopOrdersArgs { - orderbookContractAddress: string - collectionAddress: string - currencyAddresses: Array - tokenIDs: Array - isListing: boolean - priceSort: SortOrder - excludeUser?: string -} - -export interface GetTopOrdersReturn { - orders: Array -} - -// -// Client -// -export class Indexer implements Indexer { - protected hostname: string - protected fetch: Fetch - protected path = '/rpc/Indexer/' - - constructor(hostname: string, fetch: Fetch) { - this.hostname = hostname.replace(/\/*$/, '') - this.fetch = (input: RequestInfo, init?: RequestInit) => fetch(input, init) - } - - private url(name: string): string { - return this.hostname + this.path + name - } - - ping = (headers?: object, signal?: AbortSignal): Promise => { - return this.fetch(this.url('Ping'), createHTTPRequest({}, headers, signal)).then( - res => { - return buildResponse(res).then(_data => { - return { - status: _data.status - } - }) - }, - error => { - throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) - } - ) - } - - version = (headers?: object, signal?: AbortSignal): Promise => { - return this.fetch(this.url('Version'), createHTTPRequest({}, headers, signal)).then( - res => { - return buildResponse(res).then(_data => { - return { - version: _data.version - } - }) - }, - error => { - throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) - } - ) - } - - runtimeStatus = (headers?: object, signal?: AbortSignal): Promise => { - return this.fetch(this.url('RuntimeStatus'), createHTTPRequest({}, headers, signal)).then( - res => { - return buildResponse(res).then(_data => { - return { - status: _data.status - } - }) - }, - error => { - throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) - } - ) - } - - getChainID = (headers?: object, signal?: AbortSignal): Promise => { - return this.fetch(this.url('GetChainID'), createHTTPRequest({}, headers, signal)).then( - res => { - return buildResponse(res).then(_data => { - return { - chainID: _data.chainID - } - }) - }, - error => { - throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) - } - ) - } - - getEtherBalance = (args: GetEtherBalanceArgs, headers?: object, signal?: AbortSignal): Promise => { - return this.fetch(this.url('GetEtherBalance'), createHTTPRequest(args, headers, signal)).then( - res => { - return buildResponse(res).then(_data => { - return { - balance: _data.balance - } - }) - }, - error => { - throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) - } - ) - } - - getNativeTokenBalance = ( - args: GetNativeTokenBalanceArgs, - headers?: object, - signal?: AbortSignal - ): Promise => { - return this.fetch(this.url('GetNativeTokenBalance'), createHTTPRequest(args, headers, signal)).then( - res => { - return buildResponse(res).then(_data => { - return { - balance: _data.balance - } - }) - }, - error => { - throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) - } - ) - } - - getTokenBalancesSummary = ( - args: GetTokenBalancesSummaryArgs, - headers?: object, - signal?: AbortSignal - ): Promise => { - return this.fetch(this.url('GetTokenBalancesSummary'), createHTTPRequest(args, headers, signal)).then( - res => { - return buildResponse(res).then(_data => { - return { - page: _data.page, - nativeBalances: >_data.nativeBalances, - balances: >_data.balances - } - }) - }, - error => { - throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) - } - ) - } - - getTokenBalancesDetails = ( - args: GetTokenBalancesDetailsArgs, - headers?: object, - signal?: AbortSignal - ): Promise => { - return this.fetch(this.url('GetTokenBalancesDetails'), createHTTPRequest(args, headers, signal)).then( - res => { - return buildResponse(res).then(_data => { - return { - page: _data.page, - nativeBalances: >_data.nativeBalances, - balances: >_data.balances - } - }) - }, - error => { - throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) - } - ) - } - - getTokenBalancesByContract = ( - args: GetTokenBalancesByContractArgs, - headers?: object, - signal?: AbortSignal - ): Promise => { - return this.fetch(this.url('GetTokenBalancesByContract'), createHTTPRequest(args, headers, signal)).then( - res => { - return buildResponse(res).then(_data => { - return { - page: _data.page, - balances: >_data.balances - } - }) - }, - error => { - throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) - } - ) - } - - getTokenBalances = (args: GetTokenBalancesArgs, headers?: object, signal?: AbortSignal): Promise => { - return this.fetch(this.url('GetTokenBalances'), createHTTPRequest(args, headers, signal)).then( - res => { - return buildResponse(res).then(_data => { - return { - page: _data.page, - balances: >_data.balances - } - }) - }, - error => { - throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) - } - ) - } - - getTokenSupplies = (args: GetTokenSuppliesArgs, headers?: object, signal?: AbortSignal): Promise => { - return this.fetch(this.url('GetTokenSupplies'), createHTTPRequest(args, headers, signal)).then( - res => { - return buildResponse(res).then(_data => { - return { - page: _data.page, - contractType: _data.contractType, - tokenIDs: >_data.tokenIDs - } - }) - }, - error => { - throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) - } - ) - } - - getTokenSuppliesMap = ( - args: GetTokenSuppliesMapArgs, - headers?: object, - signal?: AbortSignal - ): Promise => { - return this.fetch(this.url('GetTokenSuppliesMap'), createHTTPRequest(args, headers, signal)).then( - res => { - return buildResponse(res).then(_data => { - return { - supplies: <{ [key: string]: Array }>_data.supplies - } - }) - }, - error => { - throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) - } - ) - } - - getTokenIDs = (args: GetTokenIDsArgs, headers?: object, signal?: AbortSignal): Promise => { - return this.fetch(this.url('GetTokenIDs'), createHTTPRequest(args, headers, signal)).then( - res => { - return buildResponse(res).then(_data => { - return { - page: _data.page, - contractType: _data.contractType, - tokenIDs: >_data.tokenIDs - } - }) - }, - error => { - throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) - } - ) - } - - getTokenIDRanges = (args: GetTokenIDRangesArgs, headers?: object, signal?: AbortSignal): Promise => { - return this.fetch(this.url('GetTokenIDRanges'), createHTTPRequest(args, headers, signal)).then( - res => { - return buildResponse(res).then(_data => { - return { - contractType: _data.contractType, - tokenIDRanges: >_data.tokenIDRanges, - moreRanges: _data.moreRanges - } - }) - }, - error => { - throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) - } - ) - } - - getBalanceUpdates = (args: GetBalanceUpdatesArgs, headers?: object, signal?: AbortSignal): Promise => { - return this.fetch(this.url('GetBalanceUpdates'), createHTTPRequest(args, headers, signal)).then( - res => { - return buildResponse(res).then(_data => { - return { - page: _data.page, - balances: >_data.balances - } - }) - }, - error => { - throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) - } - ) - } - - getTransactionHistory = ( - args: GetTransactionHistoryArgs, - headers?: object, - signal?: AbortSignal - ): Promise => { - return this.fetch(this.url('GetTransactionHistory'), createHTTPRequest(args, headers, signal)).then( - res => { - return buildResponse(res).then(_data => { - return { - page: _data.page, - transactions: >_data.transactions - } - }) - }, - error => { - throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) - } - ) - } - - fetchTransactionReceipt = ( - args: FetchTransactionReceiptArgs, - headers?: object, - signal?: AbortSignal - ): Promise => { - return this.fetch(this.url('FetchTransactionReceipt'), createHTTPRequest(args, headers, signal)).then( - res => { - return buildResponse(res).then(_data => { - return { - receipt: _data.receipt - } - }) - }, - error => { - throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) - } - ) - } - - fetchTransactionReceiptWithFilter = ( - args: FetchTransactionReceiptWithFilterArgs, - headers?: object, - signal?: AbortSignal - ): Promise => { - return this.fetch(this.url('FetchTransactionReceiptWithFilter'), createHTTPRequest(args, headers, signal)).then( - res => { - return buildResponse(res).then(_data => { - return { - receipt: _data.receipt - } - }) - }, - error => { - throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) - } - ) - } - - subscribeReceipts = (args: SubscribeReceiptsArgs, options: WebrpcStreamOptions): Promise => { - const _fetch = () => - this.fetch(this.url('SubscribeReceipts'), createHTTPRequest(args, options.headers, options.signal)).then( - async res => { - await sseResponse(res, options, _fetch) - }, - error => { - options.onError(error, _fetch) - } - ) - return _fetch() - } - subscribeEvents = (args: SubscribeEventsArgs, options: WebrpcStreamOptions): Promise => { - const _fetch = () => - this.fetch(this.url('SubscribeEvents'), createHTTPRequest(args, options.headers, options.signal)).then( - async res => { - await sseResponse(res, options, _fetch) - }, - error => { - options.onError(error, _fetch) - } - ) - return _fetch() - } - subscribeBalanceUpdates = ( - args: SubscribeBalanceUpdatesArgs, - options: WebrpcStreamOptions - ): Promise => { - const _fetch = () => - this.fetch(this.url('SubscribeBalanceUpdates'), createHTTPRequest(args, options.headers, options.signal)).then( - async res => { - await sseResponse(res, options, _fetch) - }, - error => { - options.onError(error, _fetch) - } - ) - return _fetch() - } - syncBalance = (args: SyncBalanceArgs, headers?: object, signal?: AbortSignal): Promise => { - return this.fetch(this.url('SyncBalance'), createHTTPRequest(args, headers, signal)).then( - res => { - return buildResponse(res).then(_data => { - return {} - }) - }, - error => { - throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) - } - ) - } - - getAllWebhookListeners = ( - args: GetAllWebhookListenersArgs, - headers?: object, - signal?: AbortSignal - ): Promise => { - return this.fetch(this.url('GetAllWebhookListeners'), createHTTPRequest(args, headers, signal)).then( - res => { - return buildResponse(res).then(_data => { - return { - listeners: >_data.listeners - } - }) - }, - error => { - throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) - } - ) - } - - getWebhookListener = ( - args: GetWebhookListenerArgs, - headers?: object, - signal?: AbortSignal - ): Promise => { - return this.fetch(this.url('GetWebhookListener'), createHTTPRequest(args, headers, signal)).then( - res => { - return buildResponse(res).then(_data => { - return { - listener: _data.listener - } - }) - }, - error => { - throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) - } - ) - } - - addWebhookListener = ( - args: AddWebhookListenerArgs, - headers?: object, - signal?: AbortSignal - ): Promise => { - return this.fetch(this.url('AddWebhookListener'), createHTTPRequest(args, headers, signal)).then( - res => { - return buildResponse(res).then(_data => { - return { - status: _data.status, - listener: _data.listener - } - }) - }, - error => { - throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) - } - ) - } - - updateWebhookListener = ( - args: UpdateWebhookListenerArgs, - headers?: object, - signal?: AbortSignal - ): Promise => { - return this.fetch(this.url('UpdateWebhookListener'), createHTTPRequest(args, headers, signal)).then( - res => { - return buildResponse(res).then(_data => { - return { - status: _data.status - } - }) - }, - error => { - throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) - } - ) - } - - removeWebhookListener = ( - args: RemoveWebhookListenerArgs, - headers?: object, - signal?: AbortSignal - ): Promise => { - return this.fetch(this.url('RemoveWebhookListener'), createHTTPRequest(args, headers, signal)).then( - res => { - return buildResponse(res).then(_data => { - return { - status: _data.status - } - }) - }, - error => { - throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) - } - ) - } - - removeAllWebhookListeners = ( - args: RemoveAllWebhookListenersArgs, - headers?: object, - signal?: AbortSignal - ): Promise => { - return this.fetch(this.url('RemoveAllWebhookListeners'), createHTTPRequest(args, headers, signal)).then( - res => { - return buildResponse(res).then(_data => { - return { - status: _data.status - } - }) - }, - error => { - throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) - } - ) - } - - toggleWebhookListener = ( - args: ToggleWebhookListenerArgs, - headers?: object, - signal?: AbortSignal - ): Promise => { - return this.fetch(this.url('ToggleWebhookListener'), createHTTPRequest(args, headers, signal)).then( - res => { - return buildResponse(res).then(_data => { - return { - webhookListener: _data.webhookListener - } - }) - }, - error => { - throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) - } - ) - } - - pauseAllWebhookListeners = ( - args: PauseAllWebhookListenersArgs, - headers?: object, - signal?: AbortSignal - ): Promise => { - return this.fetch(this.url('PauseAllWebhookListeners'), createHTTPRequest(args, headers, signal)).then( - res => { - return buildResponse(res).then(_data => { - return { - status: _data.status - } - }) - }, - error => { - throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) - } - ) - } - - resumeAllWebhookListeners = ( - args: ResumeAllWebhookListenersArgs, - headers?: object, - signal?: AbortSignal - ): Promise => { - return this.fetch(this.url('ResumeAllWebhookListeners'), createHTTPRequest(args, headers, signal)).then( - res => { - return buildResponse(res).then(_data => { - return { - status: _data.status - } - }) - }, - error => { - throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) - } - ) - } - - getOrderbookOrders = ( - args: GetOrderbookOrdersArgs, - headers?: object, - signal?: AbortSignal - ): Promise => { - return this.fetch(this.url('GetOrderbookOrders'), createHTTPRequest(args, headers, signal)).then( - res => { - return buildResponse(res).then(_data => { - return { - page: _data.page, - orders: >_data.orders - } - }) - }, - error => { - throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) - } - ) - } - - getTopOrders = (args: GetTopOrdersArgs, headers?: object, signal?: AbortSignal): Promise => { - return this.fetch(this.url('GetTopOrders'), createHTTPRequest(args, headers, signal)).then( - res => { - return buildResponse(res).then(_data => { - return { - orders: >_data.orders - } - }) - }, - error => { - throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) - } - ) - } -} - -const sseResponse = async (res: Response, options: WebrpcStreamOptions, retryFetch: () => Promise) => { - const { onMessage, onOpen, onClose, onError } = options - - if (!res.ok) { - try { - await buildResponse(res) - } catch (error) { - // @ts-ignore - onError(error, retryFetch) - } - return - } - - if (!res.body) { - onError( - WebrpcBadResponseError.new({ - status: res.status, - cause: 'Invalid response, missing body' - }), - retryFetch - ) - return - } - - onOpen && onOpen() - - const reader = res.body.getReader() - const decoder = new TextDecoder() - let buffer = '' - let lastReadTime = Date.now() - const timeout = (10 + 1) * 1000 - let timeoutError = false - const intervalId = setInterval(() => { - if (Date.now() - lastReadTime > timeout) { - timeoutError = true - clearInterval(intervalId) - reader.releaseLock() - } - }, timeout) - - while (true) { - let value - let done - try { - ;({ value, done } = await reader.read()) - if (timeoutError) throw new Error('Timeout, no data or heartbeat received') - lastReadTime = Date.now() - buffer += decoder.decode(value, { stream: true }) - } catch (error) { - let message = '' - if (error instanceof Error) { - message = error.message - } - - if (error instanceof DOMException && error.name === 'AbortError') { - onError( - WebrpcRequestFailedError.new({ - message: 'AbortError', - cause: `AbortError: ${message}` - }), - () => { - throw new Error('Abort signal cannot be used to reconnect') - } - ) - } else { - onError( - WebrpcStreamLostError.new({ - cause: `reader.read(): ${message}` - }), - retryFetch - ) - } - return - } - - let lines = buffer.split('\n') - for (let i = 0; i < lines.length - 1; i++) { - if (lines[i].length == 0) { - continue - } - let data: any - try { - data = JSON.parse(lines[i]) - if (data.hasOwnProperty('webrpcError')) { - const error = data.webrpcError - const code: number = typeof error.code === 'number' ? error.code : 0 - onError((webrpcErrorByCode[code] || WebrpcError).new(error), retryFetch) - return - } - } catch (error) { - if (error instanceof Error && error.message === 'Abort signal cannot be used to reconnect') { - throw error - } - onError( - WebrpcBadResponseError.new({ - status: res.status, - // @ts-ignore - cause: `JSON.parse(): ${error.message}` - }), - retryFetch - ) - } - onMessage(data) - } - - if (!done) { - buffer = lines[lines.length - 1] - continue - } - - onClose && onClose() - return - } -} - -const createHTTPRequest = (body: object = {}, headers: object = {}, signal: AbortSignal | null = null): object => { - const reqHeaders: { [key: string]: string } = { ...headers, 'Content-Type': 'application/json' } - reqHeaders[WebrpcHeader] = WebrpcHeaderValue - - return { - method: 'POST', - headers: reqHeaders, - body: JSON.stringify(body || {}), - signal - } -} - -const buildResponse = (res: Response): Promise => { - return res.text().then(text => { - let data - try { - data = JSON.parse(text) - } catch (error) { - let message = '' - if (error instanceof Error) { - message = error.message - } - throw WebrpcBadResponseError.new({ - status: res.status, - cause: `JSON.parse(): ${message}: response text: ${text}` - }) - } - if (!res.ok) { - const code: number = typeof data.code === 'number' ? data.code : 0 - throw (webrpcErrorByCode[code] || WebrpcError).new(data) - } - return data - }) -} - -// -// Errors -// - -export class WebrpcError extends Error { - name: string - code: number - message: string - status: number - cause?: string - - /** @deprecated Use message instead of msg. Deprecated in webrpc v0.11.0. */ - msg: string - - constructor(name: string, code: number, message: string, status: number, cause?: string) { - super(message) - this.name = name || 'WebrpcError' - this.code = typeof code === 'number' ? code : 0 - this.message = message || `endpoint error ${this.code}` - this.msg = this.message - this.status = typeof status === 'number' ? status : 0 - this.cause = cause - Object.setPrototypeOf(this, WebrpcError.prototype) - } - - static new(payload: any): WebrpcError { - return new this(payload.error, payload.code, payload.message || payload.msg, payload.status, payload.cause) - } -} - -// Webrpc errors - -export class WebrpcEndpointError extends WebrpcError { - constructor( - name: string = 'WebrpcEndpoint', - code: number = 0, - message: string = 'endpoint error', - status: number = 0, - cause?: string - ) { - super(name, code, message, status, cause) - Object.setPrototypeOf(this, WebrpcEndpointError.prototype) - } -} - -export class WebrpcRequestFailedError extends WebrpcError { - constructor( - name: string = 'WebrpcRequestFailed', - code: number = -1, - message: string = 'request failed', - status: number = 0, - cause?: string - ) { - super(name, code, message, status, cause) - Object.setPrototypeOf(this, WebrpcRequestFailedError.prototype) - } -} - -export class WebrpcBadRouteError extends WebrpcError { - constructor( - name: string = 'WebrpcBadRoute', - code: number = -2, - message: string = 'bad route', - status: number = 0, - cause?: string - ) { - super(name, code, message, status, cause) - Object.setPrototypeOf(this, WebrpcBadRouteError.prototype) - } -} - -export class WebrpcBadMethodError extends WebrpcError { - constructor( - name: string = 'WebrpcBadMethod', - code: number = -3, - message: string = 'bad method', - status: number = 0, - cause?: string - ) { - super(name, code, message, status, cause) - Object.setPrototypeOf(this, WebrpcBadMethodError.prototype) - } -} - -export class WebrpcBadRequestError extends WebrpcError { - constructor( - name: string = 'WebrpcBadRequest', - code: number = -4, - message: string = 'bad request', - status: number = 0, - cause?: string - ) { - super(name, code, message, status, cause) - Object.setPrototypeOf(this, WebrpcBadRequestError.prototype) - } -} - -export class WebrpcBadResponseError extends WebrpcError { - constructor( - name: string = 'WebrpcBadResponse', - code: number = -5, - message: string = 'bad response', - status: number = 0, - cause?: string - ) { - super(name, code, message, status, cause) - Object.setPrototypeOf(this, WebrpcBadResponseError.prototype) - } -} - -export class WebrpcServerPanicError extends WebrpcError { - constructor( - name: string = 'WebrpcServerPanic', - code: number = -6, - message: string = 'server panic', - status: number = 0, - cause?: string - ) { - super(name, code, message, status, cause) - Object.setPrototypeOf(this, WebrpcServerPanicError.prototype) - } -} - -export class WebrpcInternalErrorError extends WebrpcError { - constructor( - name: string = 'WebrpcInternalError', - code: number = -7, - message: string = 'internal error', - status: number = 0, - cause?: string - ) { - super(name, code, message, status, cause) - Object.setPrototypeOf(this, WebrpcInternalErrorError.prototype) - } -} - -export class WebrpcClientDisconnectedError extends WebrpcError { - constructor( - name: string = 'WebrpcClientDisconnected', - code: number = -8, - message: string = 'client disconnected', - status: number = 0, - cause?: string - ) { - super(name, code, message, status, cause) - Object.setPrototypeOf(this, WebrpcClientDisconnectedError.prototype) - } -} - -export class WebrpcStreamLostError extends WebrpcError { - constructor( - name: string = 'WebrpcStreamLost', - code: number = -9, - message: string = 'stream lost', - status: number = 0, - cause?: string - ) { - super(name, code, message, status, cause) - Object.setPrototypeOf(this, WebrpcStreamLostError.prototype) - } -} - -export class WebrpcStreamFinishedError extends WebrpcError { - constructor( - name: string = 'WebrpcStreamFinished', - code: number = -10, - message: string = 'stream finished', - status: number = 0, - cause?: string - ) { - super(name, code, message, status, cause) - Object.setPrototypeOf(this, WebrpcStreamFinishedError.prototype) - } -} - -// Schema errors - -export class UnauthorizedError extends WebrpcError { - constructor( - name: string = 'Unauthorized', - code: number = 1000, - message: string = 'Unauthorized access', - status: number = 0, - cause?: string - ) { - super(name, code, message, status, cause) - Object.setPrototypeOf(this, UnauthorizedError.prototype) - } -} - -export class PermissionDeniedError extends WebrpcError { - constructor( - name: string = 'PermissionDenied', - code: number = 1001, - message: string = 'Permission denied', - status: number = 0, - cause?: string - ) { - super(name, code, message, status, cause) - Object.setPrototypeOf(this, PermissionDeniedError.prototype) - } -} - -export class SessionExpiredError extends WebrpcError { - constructor( - name: string = 'SessionExpired', - code: number = 1002, - message: string = 'Session expired', - status: number = 0, - cause?: string - ) { - super(name, code, message, status, cause) - Object.setPrototypeOf(this, SessionExpiredError.prototype) - } -} - -export class MethodNotFoundError extends WebrpcError { - constructor( - name: string = 'MethodNotFound', - code: number = 1003, - message: string = 'Method not found', - status: number = 0, - cause?: string - ) { - super(name, code, message, status, cause) - Object.setPrototypeOf(this, MethodNotFoundError.prototype) - } -} - -export class RequestConflictError extends WebrpcError { - constructor( - name: string = 'RequestConflict', - code: number = 1004, - message: string = 'Conflict with target resource', - status: number = 0, - cause?: string - ) { - super(name, code, message, status, cause) - Object.setPrototypeOf(this, RequestConflictError.prototype) - } -} - -export class AbortedError extends WebrpcError { - constructor( - name: string = 'Aborted', - code: number = 1005, - message: string = 'Request aborted', - status: number = 0, - cause?: string - ) { - super(name, code, message, status, cause) - Object.setPrototypeOf(this, AbortedError.prototype) - } -} - -export class GeoblockedError extends WebrpcError { - constructor( - name: string = 'Geoblocked', - code: number = 1006, - message: string = 'Geoblocked region', - status: number = 0, - cause?: string - ) { - super(name, code, message, status, cause) - Object.setPrototypeOf(this, GeoblockedError.prototype) - } -} - -export class RateLimitedError extends WebrpcError { - constructor( - name: string = 'RateLimited', - code: number = 1007, - message: string = 'Rate-limited. Please slow down.', - status: number = 0, - cause?: string - ) { - super(name, code, message, status, cause) - Object.setPrototypeOf(this, RateLimitedError.prototype) - } -} - -export class ProjectNotFoundError extends WebrpcError { - constructor( - name: string = 'ProjectNotFound', - code: number = 1100, - message: string = 'Project not found', - status: number = 0, - cause?: string - ) { - super(name, code, message, status, cause) - Object.setPrototypeOf(this, ProjectNotFoundError.prototype) - } -} - -export class AccessKeyNotFoundError extends WebrpcError { - constructor( - name: string = 'AccessKeyNotFound', - code: number = 1101, - message: string = 'Access key not found', - status: number = 0, - cause?: string - ) { - super(name, code, message, status, cause) - Object.setPrototypeOf(this, AccessKeyNotFoundError.prototype) - } -} - -export class AccessKeyMismatchError extends WebrpcError { - constructor( - name: string = 'AccessKeyMismatch', - code: number = 1102, - message: string = 'Access key mismatch', - status: number = 0, - cause?: string - ) { - super(name, code, message, status, cause) - Object.setPrototypeOf(this, AccessKeyMismatchError.prototype) - } -} - -export class InvalidOriginError extends WebrpcError { - constructor( - name: string = 'InvalidOrigin', - code: number = 1103, - message: string = 'Invalid origin for Access Key', - status: number = 0, - cause?: string - ) { - super(name, code, message, status, cause) - Object.setPrototypeOf(this, InvalidOriginError.prototype) - } -} - -export class InvalidServiceError extends WebrpcError { - constructor( - name: string = 'InvalidService', - code: number = 1104, - message: string = 'Service not enabled for Access key', - status: number = 0, - cause?: string - ) { - super(name, code, message, status, cause) - Object.setPrototypeOf(this, InvalidServiceError.prototype) - } -} - -export class UnauthorizedUserError extends WebrpcError { - constructor( - name: string = 'UnauthorizedUser', - code: number = 1105, - message: string = 'Unauthorized user', - status: number = 0, - cause?: string - ) { - super(name, code, message, status, cause) - Object.setPrototypeOf(this, UnauthorizedUserError.prototype) - } -} - -export class QuotaExceededError extends WebrpcError { - constructor( - name: string = 'QuotaExceeded', - code: number = 1200, - message: string = 'Quota exceeded', - status: number = 0, - cause?: string - ) { - super(name, code, message, status, cause) - Object.setPrototypeOf(this, QuotaExceededError.prototype) - } -} - -export class RateLimitError extends WebrpcError { - constructor( - name: string = 'RateLimit', - code: number = 1201, - message: string = 'Rate limit exceeded', - status: number = 0, - cause?: string - ) { - super(name, code, message, status, cause) - Object.setPrototypeOf(this, RateLimitError.prototype) - } -} - -export class NoDefaultKeyError extends WebrpcError { - constructor( - name: string = 'NoDefaultKey', - code: number = 1300, - message: string = 'No default access key found', - status: number = 0, - cause?: string - ) { - super(name, code, message, status, cause) - Object.setPrototypeOf(this, NoDefaultKeyError.prototype) - } -} - -export class MaxAccessKeysError extends WebrpcError { - constructor( - name: string = 'MaxAccessKeys', - code: number = 1301, - message: string = 'Access keys limit reached', - status: number = 0, - cause?: string - ) { - super(name, code, message, status, cause) - Object.setPrototypeOf(this, MaxAccessKeysError.prototype) - } -} - -export class AtLeastOneKeyError extends WebrpcError { - constructor( - name: string = 'AtLeastOneKey', - code: number = 1302, - message: string = 'You need at least one Access Key', - status: number = 0, - cause?: string - ) { - super(name, code, message, status, cause) - Object.setPrototypeOf(this, AtLeastOneKeyError.prototype) - } -} - -export class TimeoutError extends WebrpcError { - constructor( - name: string = 'Timeout', - code: number = 1900, - message: string = 'Request timed out', - status: number = 0, - cause?: string - ) { - super(name, code, message, status, cause) - Object.setPrototypeOf(this, TimeoutError.prototype) - } -} - -export class InvalidArgumentError extends WebrpcError { - constructor( - name: string = 'InvalidArgument', - code: number = 2001, - message: string = 'Invalid argument', - status: number = 0, - cause?: string - ) { - super(name, code, message, status, cause) - Object.setPrototypeOf(this, InvalidArgumentError.prototype) - } -} - -export class UnavailableError extends WebrpcError { - constructor( - name: string = 'Unavailable', - code: number = 2002, - message: string = 'Unavailable resource', - status: number = 0, - cause?: string - ) { - super(name, code, message, status, cause) - Object.setPrototypeOf(this, UnavailableError.prototype) - } -} - -export class QueryFailedError extends WebrpcError { - constructor( - name: string = 'QueryFailed', - code: number = 2003, - message: string = 'Query failed', - status: number = 0, - cause?: string - ) { - super(name, code, message, status, cause) - Object.setPrototypeOf(this, QueryFailedError.prototype) - } -} - -export class ResourceExhaustedError extends WebrpcError { - constructor( - name: string = 'ResourceExhausted', - code: number = 2004, - message: string = 'Resource exhausted', - status: number = 0, - cause?: string - ) { - super(name, code, message, status, cause) - Object.setPrototypeOf(this, ResourceExhaustedError.prototype) - } -} - -export class NotFoundError extends WebrpcError { - constructor( - name: string = 'NotFound', - code: number = 3000, - message: string = 'Resource not found', - status: number = 0, - cause?: string - ) { - super(name, code, message, status, cause) - Object.setPrototypeOf(this, NotFoundError.prototype) - } -} - -export class MetadataCallFailedError extends WebrpcError { - constructor( - name: string = 'MetadataCallFailed', - code: number = 3003, - message: string = 'Metadata service call failed', - status: number = 0, - cause?: string - ) { - super(name, code, message, status, cause) - Object.setPrototypeOf(this, MetadataCallFailedError.prototype) - } -} - -export enum errors { - WebrpcEndpoint = 'WebrpcEndpoint', - WebrpcRequestFailed = 'WebrpcRequestFailed', - WebrpcBadRoute = 'WebrpcBadRoute', - WebrpcBadMethod = 'WebrpcBadMethod', - WebrpcBadRequest = 'WebrpcBadRequest', - WebrpcBadResponse = 'WebrpcBadResponse', - WebrpcServerPanic = 'WebrpcServerPanic', - WebrpcInternalError = 'WebrpcInternalError', - WebrpcClientDisconnected = 'WebrpcClientDisconnected', - WebrpcStreamLost = 'WebrpcStreamLost', - WebrpcStreamFinished = 'WebrpcStreamFinished', - Unauthorized = 'Unauthorized', - PermissionDenied = 'PermissionDenied', - SessionExpired = 'SessionExpired', - MethodNotFound = 'MethodNotFound', - RequestConflict = 'RequestConflict', - Aborted = 'Aborted', - Geoblocked = 'Geoblocked', - RateLimited = 'RateLimited', - ProjectNotFound = 'ProjectNotFound', - AccessKeyNotFound = 'AccessKeyNotFound', - AccessKeyMismatch = 'AccessKeyMismatch', - InvalidOrigin = 'InvalidOrigin', - InvalidService = 'InvalidService', - UnauthorizedUser = 'UnauthorizedUser', - QuotaExceeded = 'QuotaExceeded', - RateLimit = 'RateLimit', - NoDefaultKey = 'NoDefaultKey', - MaxAccessKeys = 'MaxAccessKeys', - AtLeastOneKey = 'AtLeastOneKey', - Timeout = 'Timeout', - InvalidArgument = 'InvalidArgument', - Unavailable = 'Unavailable', - QueryFailed = 'QueryFailed', - ResourceExhausted = 'ResourceExhausted', - NotFound = 'NotFound', - MetadataCallFailed = 'MetadataCallFailed' -} - -const webrpcErrorByCode: { [code: number]: any } = { - [0]: WebrpcEndpointError, - [-1]: WebrpcRequestFailedError, - [-2]: WebrpcBadRouteError, - [-3]: WebrpcBadMethodError, - [-4]: WebrpcBadRequestError, - [-5]: WebrpcBadResponseError, - [-6]: WebrpcServerPanicError, - [-7]: WebrpcInternalErrorError, - [-8]: WebrpcClientDisconnectedError, - [-9]: WebrpcStreamLostError, - [-10]: WebrpcStreamFinishedError, - [1000]: UnauthorizedError, - [1001]: PermissionDeniedError, - [1002]: SessionExpiredError, - [1003]: MethodNotFoundError, - [1004]: RequestConflictError, - [1005]: AbortedError, - [1006]: GeoblockedError, - [1007]: RateLimitedError, - [1100]: ProjectNotFoundError, - [1101]: AccessKeyNotFoundError, - [1102]: AccessKeyMismatchError, - [1103]: InvalidOriginError, - [1104]: InvalidServiceError, - [1105]: UnauthorizedUserError, - [1200]: QuotaExceededError, - [1201]: RateLimitError, - [1300]: NoDefaultKeyError, - [1301]: MaxAccessKeysError, - [1302]: AtLeastOneKeyError, - [1900]: TimeoutError, - [2001]: InvalidArgumentError, - [2002]: UnavailableError, - [2003]: QueryFailedError, - [2004]: ResourceExhaustedError, - [3000]: NotFoundError, - [3003]: MetadataCallFailedError -} - -export type Fetch = (input: RequestInfo, init?: RequestInit) => Promise - -export interface WebrpcStreamOptions extends WebrpcOptions { - onMessage: (message: T) => void - onError: (error: WebrpcError, reconnect: () => void) => void - onOpen?: () => void - onClose?: () => void -} -export interface WebrpcOptions { - headers?: HeadersInit - signal?: AbortSignal -} diff --git a/old/packages/indexer/src/indexergw.gen.ts b/old/packages/indexer/src/indexergw.gen.ts deleted file mode 100644 index 91928e190..000000000 --- a/old/packages/indexer/src/indexergw.gen.ts +++ /dev/null @@ -1,1511 +0,0 @@ -/* eslint-disable */ -// sequence-indexer v0.4.0 5be4a3e78d9c7e0cc378c675ec01c518e83772e3 -// -- -// Code generated by webrpc-gen@v0.21.1 with typescript generator. DO NOT EDIT. -// -// webrpc-gen -schema=indexer.ridl -service=IndexerGateway -target=typescript -client -out=./clients/indexergw.gen.ts - -export const WebrpcHeader = 'Webrpc' - -export const WebrpcHeaderValue = 'webrpc@v0.21.1;gen-typescript@v0.15.1;sequence-indexer@v0.4.0' - -// WebRPC description and code-gen version -export const WebRPCVersion = 'v1' - -// Schema version of your RIDL schema -export const WebRPCSchemaVersion = 'v0.4.0' - -// Schema hash generated from your RIDL schema -export const WebRPCSchemaHash = '5be4a3e78d9c7e0cc378c675ec01c518e83772e3' - -type WebrpcGenVersions = { - webrpcGenVersion: string - codeGenName: string - codeGenVersion: string - schemaName: string - schemaVersion: string -} - -export function VersionFromHeader(headers: Headers): WebrpcGenVersions { - const headerValue = headers.get(WebrpcHeader) - if (!headerValue) { - return { - webrpcGenVersion: '', - codeGenName: '', - codeGenVersion: '', - schemaName: '', - schemaVersion: '' - } - } - - return parseWebrpcGenVersions(headerValue) -} - -function parseWebrpcGenVersions(header: string): WebrpcGenVersions { - const versions = header.split(';') - if (versions.length < 3) { - return { - webrpcGenVersion: '', - codeGenName: '', - codeGenVersion: '', - schemaName: '', - schemaVersion: '' - } - } - - const [_, webrpcGenVersion] = versions[0].split('@') - const [codeGenName, codeGenVersion] = versions[1].split('@') - const [schemaName, schemaVersion] = versions[2].split('@') - - return { - webrpcGenVersion, - codeGenName, - codeGenVersion, - schemaName, - schemaVersion - } -} - -// -// Types -// - -export enum ResourceStatus { - NOT_AVAILABLE = 'NOT_AVAILABLE', - REFRESHING = 'REFRESHING', - AVAILABLE = 'AVAILABLE' -} - -export interface ContractInfo { - chainId: number - address: string - source: string - name: string - type: string - symbol: string - decimals?: number - logoURI: string - deployed: boolean - bytecodeHash: string - extensions: ContractInfoExtensions - updatedAt: string - queuedAt?: string - status: ResourceStatus -} - -export interface ContractInfoExtensions { - link: string - description: string - categories: Array - ogImage: string - ogName: string - originChainId: number - originAddress: string - blacklist: boolean - verified: boolean - verifiedBy: string - featured: boolean - featureIndex: number -} - -export interface TokenMetadata { - contractAddress?: string - tokenId: string - source: string - name: string - description?: string - image?: string - video?: string - audio?: string - properties?: { [key: string]: any } - attributes: Array<{ [key: string]: any }> - image_data?: string - external_url?: string - background_color?: string - animation_url?: string - decimals?: number - updatedAt?: string - assets?: Array - status: ResourceStatus - queuedAt?: string - lastFetched?: string -} - -export interface Asset { - id: number - collectionId: number - tokenId?: string - url?: string - metadataField: string - name?: string - filesize?: number - mimeType?: string - width?: number - height?: number - updatedAt?: string -} - -export enum ContractType { - UNKNOWN = 'UNKNOWN', - NATIVE = 'NATIVE', - ERC20 = 'ERC20', - ERC721 = 'ERC721', - ERC1155 = 'ERC1155', - SEQUENCE_WALLET = 'SEQUENCE_WALLET', - ERC20_BRIDGE = 'ERC20_BRIDGE', - ERC721_BRIDGE = 'ERC721_BRIDGE', - ERC1155_BRIDGE = 'ERC1155_BRIDGE', - SEQ_MARKETPLACE = 'SEQ_MARKETPLACE' -} - -export enum EventLogType { - UNKNOWN = 'UNKNOWN', - BLOCK_ADDED = 'BLOCK_ADDED', - BLOCK_REMOVED = 'BLOCK_REMOVED' -} - -export enum EventLogDataType { - EVENT = 'EVENT', - TOKEN_TRANSFER = 'TOKEN_TRANSFER', - NATIVE_TOKEN_TRANSFER = 'NATIVE_TOKEN_TRANSFER', - SEQUENCE_TXN = 'SEQUENCE_TXN' -} - -export enum OrderStatus { - OPEN = 'OPEN', - CLOSED = 'CLOSED', - CANCELLED = 'CANCELLED' -} - -export enum TxnTransferType { - UNKNOWN = 'UNKNOWN', - SEND = 'SEND', - RECEIVE = 'RECEIVE' -} - -export enum TransactionStatus { - FAILED = 'FAILED', - SUCCESSFUL = 'SUCCESSFUL' -} - -export enum TransactionType { - LegacyTxnType = 'LegacyTxnType', - AccessListTxnType = 'AccessListTxnType', - DynamicFeeTxnType = 'DynamicFeeTxnType' -} - -export enum SortOrder { - DESC = 'DESC', - ASC = 'ASC' -} - -export enum ContractVerificationStatus { - VERIFIED = 'VERIFIED', - UNVERIFIED = 'UNVERIFIED', - ALL = 'ALL' -} - -export interface Version { - webrpcVersion: string - schemaVersion: string - schemaHash: string - appVersion: string -} - -export interface RuntimeStatus { - healthOK: boolean - indexerEnabled: boolean - startTime: string - uptime: number - ver: string - branch: string - commitHash: string - chainID: number - checks: RuntimeChecks -} - -export interface GatewayBackendResponseTime { - percentiles: { [key: string]: number } - average: number -} - -export interface GatewayBackendRuntimeStatus { - name: string - chainId: number - responseTime: GatewayBackendResponseTime -} - -export interface GatewayRuntimeStatus { - healthOK: boolean - startTime: string - uptime: number - ver: string - branch: string - commitHash: string - backends: Array -} - -export interface WALWriterRuntimeStatus { - healthOK: boolean - startTime: string - uptime: number - ver: string - branch: string - commitHash: string - chainID: number - percentWALWritten: number -} - -export interface RuntimeChecks { - running: boolean - runnables: any - cgoEnabled: boolean - quotaControlEnabled: boolean - syncMode: string - percentIndexed: number - lastBlockNum: number - lastBlockNumWithState: number - bloomStatus: BloomStatus - bond: Bond - diskUsage: DiskUsage -} - -export interface DiskUsage { - humanReadable: string - used: number - size: number - percent: number - dirs: { [key: string]: string } -} - -export interface Bond { - pebble: PebbleMetrics - estimatedDiskUsagePerTable: any - estimatedDiskUsageTotal: string -} - -export interface PebbleMetrics { - compactionCount: number - compactionEstimatedDebt: number - compactionInProgressBytes: number - compactionNumInProgress: number - compactionMarkedFiles: number -} - -export interface BloomStatus { - enabled: boolean - initialized: boolean - bloomInitElapsedTime: string -} - -export interface EtherBalance { - accountAddress: string - balanceWei: string -} - -export interface NativeTokenBalance { - accountAddress: string - chainId: number - balance: string - error: string -} - -export interface IndexState { - chainId: string - lastBlockNum: number - lastBlockHash: string -} - -export interface IndexedBlock { - blockNumber: number - blockShortHash: string -} - -export interface TxnInfo { - from: string - to: string - value: string -} - -export interface EventLog { - id: number - uid: string - type: EventLogType - blockNumber: number - blockHash: string - parentBlockHash: string - contractAddress: string - contractType: ContractType - txnHash: string - txnIndex: number - txnLogIndex: number - logDataType: EventLogDataType - ts: string - txnInfo?: TxnInfo - rawLog?: { [key: string]: any } - event?: EventDecoded -} - -export interface EventDecoded { - topicHash: string - eventSig: string - types: Array - names: Array - values: Array -} - -export interface TokenBalance { - contractType: ContractType - contractAddress: string - accountAddress: string - tokenID?: string - balance: string - blockHash: string - blockNumber: number - chainId: number - uniqueCollectibles: string - isSummary: boolean - contractInfo?: ContractInfo - tokenMetadata?: TokenMetadata -} - -export interface OrderbookOrder { - orderId: string - tokenContract: string - tokenId: string - isListing: boolean - quantity: string - quantityRemaining: string - currencyAddress: string - pricePerToken: string - expiry: string - orderStatus: OrderStatus - createdBy: string - blockNumber: number - orderbookContractAddress: string - createdAt: number -} - -export interface OrderbookOrderFilter { - isListing?: boolean - userAddresses?: Array - tokenIds: Array - excludeUserAddresses?: Array - afterBlockNumber: number - afterCreatedAt: number - beforeExpiry: number - userAddress?: string - excludeUserAddress?: string -} - -export interface TokenHistory { - blockNumber: number - blockHash: string - accountAddress: string - contractAddress: string - contractType: ContractType - fromAddress: string - toAddress: string - txnHash: string - txnIndex: number - txnLogIndex: number - logData: string - tokenIDs: string - Amounts: string - ts: string -} - -export interface TokenSupply { - tokenID: string - supply: string - chainId: number - contractInfo?: ContractInfo - tokenMetadata?: TokenMetadata -} - -export interface Transaction { - txnHash: string - blockNumber: number - blockHash: string - chainId: number - metaTxnID?: string - transfers?: Array - timestamp: string -} - -export interface TxnTransfer { - transferType: TxnTransferType - contractAddress: string - contractType: ContractType - from: string - to: string - tokenIds?: Array - amounts: Array - logIndex: number - contractInfo?: ContractInfo - tokenMetadata?: { [key: string]: TokenMetadata } -} - -export interface TransactionHistoryFilter { - accountAddress?: string - contractAddress?: string - accountAddresses?: Array - contractAddresses?: Array - transactionHashes?: Array - metaTransactionIDs?: Array - fromBlock?: number - toBlock?: number - tokenID?: string -} - -export interface TransactionFilter { - txnHash?: string - from?: string - to?: string - contractAddress?: string - event?: string -} - -export interface TransactionReceipt { - txnHash: string - txnStatus: TransactionStatus - txnIndex: number - txnType: TransactionType - blockHash: string - blockNumber: number - gasUsed: number - effectiveGasPrice: string - from: string - to: string - logs: Array - final: boolean - reorged: boolean -} - -export interface TransactionLog { - contractAddress: string - topics: Array - data: string - index: number -} - -export interface TokenIDRange { - start: string - end: string -} - -export interface Page { - page?: number - column?: string - before?: any - after?: any - sort?: Array - pageSize?: number - more?: boolean -} - -export interface SortBy { - column: string - order: SortOrder -} - -export interface WebhookListener { - id: number - projectID: number - url: string - filters: EventFilter - name: string - updatedAt: string - active: boolean -} - -export interface EventFilter { - events?: Array - contractAddresses?: Array - accounts?: Array - tokenIDs?: Array -} - -export interface TokenBalanceFilter { - contractAddress: string - sinceBlockNumber: number -} - -export interface MetadataOptions { - verifiedOnly?: boolean - unverifiedOnly?: boolean - includeContracts?: Array -} - -export interface TokenBalancesFilter { - accountAddresses: Array - contractStatus?: ContractVerificationStatus - contractTypes?: Array - contractWhitelist?: Array - contractBlacklist?: Array - omitNativeBalances: boolean -} - -export interface TokenBalancesByContractFilter { - contractAddresses: Array - accountAddresses?: Array - contractStatus?: ContractVerificationStatus -} - -export interface GatewayEtherBalance { - chainId: number - error: string - result: EtherBalance -} - -export interface GatewayNativeTokenBalance { - chainId: number - error: string - result: NativeTokenBalance -} - -export interface GatewayNativeTokenBalances { - chainId: number - error: string - results: Array -} - -export interface GatewayTokenBalance { - chainId: number - error: string - results: Array -} - -export interface IndexerGateway { - getNativeTokenBalance( - args: GetNativeTokenBalanceArgs, - headers?: object, - signal?: AbortSignal - ): Promise - getTokenBalances(args: GetTokenBalancesArgs, headers?: object, signal?: AbortSignal): Promise - getTokenBalancesSummary( - args: GetTokenBalancesSummaryArgs, - headers?: object, - signal?: AbortSignal - ): Promise - getTokenBalancesDetails( - args: GetTokenBalancesDetailsArgs, - headers?: object, - signal?: AbortSignal - ): Promise - getTokenBalancesByContract( - args: GetTokenBalancesByContractArgs, - headers?: object, - signal?: AbortSignal - ): Promise - getBalanceUpdates(args: GetBalanceUpdatesArgs, headers?: object, signal?: AbortSignal): Promise - ping(headers?: object, signal?: AbortSignal): Promise - version(headers?: object, signal?: AbortSignal): Promise - runtimeStatus(headers?: object, signal?: AbortSignal): Promise -} - -export interface GetNativeTokenBalanceArgs { - chainIds?: Array - networks?: Array - testnets?: boolean - accountAddress?: string -} - -export interface GetNativeTokenBalanceReturn { - balances: Array -} -export interface GetTokenBalancesArgs { - chainIds?: Array - networks?: Array - testnets?: boolean - accountAddress?: string - contractAddress?: string - tokenID?: string - includeMetadata?: boolean - metadataOptions?: MetadataOptions - includeCollectionTokens?: boolean - page?: Page -} - -export interface GetTokenBalancesReturn { - page: Page - balances: Array -} -export interface GetTokenBalancesSummaryArgs { - chainIds?: Array - networks?: Array - testnets?: boolean - filter: TokenBalancesFilter - omitMetadata?: boolean - page?: Page -} - -export interface GetTokenBalancesSummaryReturn { - page: Page - nativeBalances: Array - balances: Array -} -export interface GetTokenBalancesDetailsArgs { - chainIds?: Array - networks?: Array - testnets?: boolean - filter: TokenBalancesFilter - omitMetadata?: boolean - page?: Page -} - -export interface GetTokenBalancesDetailsReturn { - page: Page - nativeBalances: Array - balances: Array -} -export interface GetTokenBalancesByContractArgs { - chainIds?: Array - networks?: Array - testnets?: boolean - filter: TokenBalancesByContractFilter - omitMetadata?: boolean - page?: Page -} - -export interface GetTokenBalancesByContractReturn { - page: Page - balances: Array -} -export interface GetBalanceUpdatesArgs { - chainIds?: Array - networks?: Array - testnets?: boolean - contractAddress: string - lastBlockNumber: number - lastBlockHash?: string - page?: Page -} - -export interface GetBalanceUpdatesReturn { - page: Page - balances: Array -} -export interface PingArgs {} - -export interface PingReturn { - status: boolean -} -export interface VersionArgs {} - -export interface VersionReturn { - version: Version -} -export interface RuntimeStatusArgs {} - -export interface RuntimeStatusReturn { - status: GatewayRuntimeStatus -} - -// -// Client -// -export class IndexerGateway implements IndexerGateway { - protected hostname: string - protected fetch: Fetch - protected path = '/rpc/IndexerGateway/' - - constructor(hostname: string, fetch: Fetch) { - this.hostname = hostname.replace(/\/*$/, '') - this.fetch = (input: RequestInfo, init?: RequestInit) => fetch(input, init) - } - - private url(name: string): string { - return this.hostname + this.path + name - } - - getNativeTokenBalance = ( - args: GetNativeTokenBalanceArgs, - headers?: object, - signal?: AbortSignal - ): Promise => { - return this.fetch(this.url('GetNativeTokenBalance'), createHTTPRequest(args, headers, signal)).then( - res => { - return buildResponse(res).then(_data => { - return { - balances: >_data.balances - } - }) - }, - error => { - throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) - } - ) - } - - getTokenBalances = (args: GetTokenBalancesArgs, headers?: object, signal?: AbortSignal): Promise => { - return this.fetch(this.url('GetTokenBalances'), createHTTPRequest(args, headers, signal)).then( - res => { - return buildResponse(res).then(_data => { - return { - page: _data.page, - balances: >_data.balances - } - }) - }, - error => { - throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) - } - ) - } - - getTokenBalancesSummary = ( - args: GetTokenBalancesSummaryArgs, - headers?: object, - signal?: AbortSignal - ): Promise => { - return this.fetch(this.url('GetTokenBalancesSummary'), createHTTPRequest(args, headers, signal)).then( - res => { - return buildResponse(res).then(_data => { - return { - page: _data.page, - nativeBalances: >_data.nativeBalances, - balances: >_data.balances - } - }) - }, - error => { - throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) - } - ) - } - - getTokenBalancesDetails = ( - args: GetTokenBalancesDetailsArgs, - headers?: object, - signal?: AbortSignal - ): Promise => { - return this.fetch(this.url('GetTokenBalancesDetails'), createHTTPRequest(args, headers, signal)).then( - res => { - return buildResponse(res).then(_data => { - return { - page: _data.page, - nativeBalances: >_data.nativeBalances, - balances: >_data.balances - } - }) - }, - error => { - throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) - } - ) - } - - getTokenBalancesByContract = ( - args: GetTokenBalancesByContractArgs, - headers?: object, - signal?: AbortSignal - ): Promise => { - return this.fetch(this.url('GetTokenBalancesByContract'), createHTTPRequest(args, headers, signal)).then( - res => { - return buildResponse(res).then(_data => { - return { - page: _data.page, - balances: >_data.balances - } - }) - }, - error => { - throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) - } - ) - } - - getBalanceUpdates = (args: GetBalanceUpdatesArgs, headers?: object, signal?: AbortSignal): Promise => { - return this.fetch(this.url('GetBalanceUpdates'), createHTTPRequest(args, headers, signal)).then( - res => { - return buildResponse(res).then(_data => { - return { - page: _data.page, - balances: >_data.balances - } - }) - }, - error => { - throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) - } - ) - } - - ping = (headers?: object, signal?: AbortSignal): Promise => { - return this.fetch(this.url('Ping'), createHTTPRequest({}, headers, signal)).then( - res => { - return buildResponse(res).then(_data => { - return { - status: _data.status - } - }) - }, - error => { - throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) - } - ) - } - - version = (headers?: object, signal?: AbortSignal): Promise => { - return this.fetch(this.url('Version'), createHTTPRequest({}, headers, signal)).then( - res => { - return buildResponse(res).then(_data => { - return { - version: _data.version - } - }) - }, - error => { - throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) - } - ) - } - - runtimeStatus = (headers?: object, signal?: AbortSignal): Promise => { - return this.fetch(this.url('RuntimeStatus'), createHTTPRequest({}, headers, signal)).then( - res => { - return buildResponse(res).then(_data => { - return { - status: _data.status - } - }) - }, - error => { - throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) - } - ) - } -} - -const createHTTPRequest = (body: object = {}, headers: object = {}, signal: AbortSignal | null = null): object => { - const reqHeaders: { [key: string]: string } = { ...headers, 'Content-Type': 'application/json' } - reqHeaders[WebrpcHeader] = WebrpcHeaderValue - - return { - method: 'POST', - headers: reqHeaders, - body: JSON.stringify(body || {}), - signal - } -} - -const buildResponse = (res: Response): Promise => { - return res.text().then(text => { - let data - try { - data = JSON.parse(text) - } catch (error) { - let message = '' - if (error instanceof Error) { - message = error.message - } - throw WebrpcBadResponseError.new({ - status: res.status, - cause: `JSON.parse(): ${message}: response text: ${text}` - }) - } - if (!res.ok) { - const code: number = typeof data.code === 'number' ? data.code : 0 - throw (webrpcErrorByCode[code] || WebrpcError).new(data) - } - return data - }) -} - -// -// Errors -// - -export class WebrpcError extends Error { - name: string - code: number - message: string - status: number - cause?: string - - /** @deprecated Use message instead of msg. Deprecated in webrpc v0.11.0. */ - msg: string - - constructor(name: string, code: number, message: string, status: number, cause?: string) { - super(message) - this.name = name || 'WebrpcError' - this.code = typeof code === 'number' ? code : 0 - this.message = message || `endpoint error ${this.code}` - this.msg = this.message - this.status = typeof status === 'number' ? status : 0 - this.cause = cause - Object.setPrototypeOf(this, WebrpcError.prototype) - } - - static new(payload: any): WebrpcError { - return new this(payload.error, payload.code, payload.message || payload.msg, payload.status, payload.cause) - } -} - -// Webrpc errors - -export class WebrpcEndpointError extends WebrpcError { - constructor( - name: string = 'WebrpcEndpoint', - code: number = 0, - message: string = 'endpoint error', - status: number = 0, - cause?: string - ) { - super(name, code, message, status, cause) - Object.setPrototypeOf(this, WebrpcEndpointError.prototype) - } -} - -export class WebrpcRequestFailedError extends WebrpcError { - constructor( - name: string = 'WebrpcRequestFailed', - code: number = -1, - message: string = 'request failed', - status: number = 0, - cause?: string - ) { - super(name, code, message, status, cause) - Object.setPrototypeOf(this, WebrpcRequestFailedError.prototype) - } -} - -export class WebrpcBadRouteError extends WebrpcError { - constructor( - name: string = 'WebrpcBadRoute', - code: number = -2, - message: string = 'bad route', - status: number = 0, - cause?: string - ) { - super(name, code, message, status, cause) - Object.setPrototypeOf(this, WebrpcBadRouteError.prototype) - } -} - -export class WebrpcBadMethodError extends WebrpcError { - constructor( - name: string = 'WebrpcBadMethod', - code: number = -3, - message: string = 'bad method', - status: number = 0, - cause?: string - ) { - super(name, code, message, status, cause) - Object.setPrototypeOf(this, WebrpcBadMethodError.prototype) - } -} - -export class WebrpcBadRequestError extends WebrpcError { - constructor( - name: string = 'WebrpcBadRequest', - code: number = -4, - message: string = 'bad request', - status: number = 0, - cause?: string - ) { - super(name, code, message, status, cause) - Object.setPrototypeOf(this, WebrpcBadRequestError.prototype) - } -} - -export class WebrpcBadResponseError extends WebrpcError { - constructor( - name: string = 'WebrpcBadResponse', - code: number = -5, - message: string = 'bad response', - status: number = 0, - cause?: string - ) { - super(name, code, message, status, cause) - Object.setPrototypeOf(this, WebrpcBadResponseError.prototype) - } -} - -export class WebrpcServerPanicError extends WebrpcError { - constructor( - name: string = 'WebrpcServerPanic', - code: number = -6, - message: string = 'server panic', - status: number = 0, - cause?: string - ) { - super(name, code, message, status, cause) - Object.setPrototypeOf(this, WebrpcServerPanicError.prototype) - } -} - -export class WebrpcInternalErrorError extends WebrpcError { - constructor( - name: string = 'WebrpcInternalError', - code: number = -7, - message: string = 'internal error', - status: number = 0, - cause?: string - ) { - super(name, code, message, status, cause) - Object.setPrototypeOf(this, WebrpcInternalErrorError.prototype) - } -} - -export class WebrpcClientDisconnectedError extends WebrpcError { - constructor( - name: string = 'WebrpcClientDisconnected', - code: number = -8, - message: string = 'client disconnected', - status: number = 0, - cause?: string - ) { - super(name, code, message, status, cause) - Object.setPrototypeOf(this, WebrpcClientDisconnectedError.prototype) - } -} - -export class WebrpcStreamLostError extends WebrpcError { - constructor( - name: string = 'WebrpcStreamLost', - code: number = -9, - message: string = 'stream lost', - status: number = 0, - cause?: string - ) { - super(name, code, message, status, cause) - Object.setPrototypeOf(this, WebrpcStreamLostError.prototype) - } -} - -export class WebrpcStreamFinishedError extends WebrpcError { - constructor( - name: string = 'WebrpcStreamFinished', - code: number = -10, - message: string = 'stream finished', - status: number = 0, - cause?: string - ) { - super(name, code, message, status, cause) - Object.setPrototypeOf(this, WebrpcStreamFinishedError.prototype) - } -} - -// Schema errors - -export class UnauthorizedError extends WebrpcError { - constructor( - name: string = 'Unauthorized', - code: number = 1000, - message: string = 'Unauthorized access', - status: number = 0, - cause?: string - ) { - super(name, code, message, status, cause) - Object.setPrototypeOf(this, UnauthorizedError.prototype) - } -} - -export class PermissionDeniedError extends WebrpcError { - constructor( - name: string = 'PermissionDenied', - code: number = 1001, - message: string = 'Permission denied', - status: number = 0, - cause?: string - ) { - super(name, code, message, status, cause) - Object.setPrototypeOf(this, PermissionDeniedError.prototype) - } -} - -export class SessionExpiredError extends WebrpcError { - constructor( - name: string = 'SessionExpired', - code: number = 1002, - message: string = 'Session expired', - status: number = 0, - cause?: string - ) { - super(name, code, message, status, cause) - Object.setPrototypeOf(this, SessionExpiredError.prototype) - } -} - -export class MethodNotFoundError extends WebrpcError { - constructor( - name: string = 'MethodNotFound', - code: number = 1003, - message: string = 'Method not found', - status: number = 0, - cause?: string - ) { - super(name, code, message, status, cause) - Object.setPrototypeOf(this, MethodNotFoundError.prototype) - } -} - -export class RequestConflictError extends WebrpcError { - constructor( - name: string = 'RequestConflict', - code: number = 1004, - message: string = 'Conflict with target resource', - status: number = 0, - cause?: string - ) { - super(name, code, message, status, cause) - Object.setPrototypeOf(this, RequestConflictError.prototype) - } -} - -export class AbortedError extends WebrpcError { - constructor( - name: string = 'Aborted', - code: number = 1005, - message: string = 'Request aborted', - status: number = 0, - cause?: string - ) { - super(name, code, message, status, cause) - Object.setPrototypeOf(this, AbortedError.prototype) - } -} - -export class GeoblockedError extends WebrpcError { - constructor( - name: string = 'Geoblocked', - code: number = 1006, - message: string = 'Geoblocked region', - status: number = 0, - cause?: string - ) { - super(name, code, message, status, cause) - Object.setPrototypeOf(this, GeoblockedError.prototype) - } -} - -export class RateLimitedError extends WebrpcError { - constructor( - name: string = 'RateLimited', - code: number = 1007, - message: string = 'Rate-limited. Please slow down.', - status: number = 0, - cause?: string - ) { - super(name, code, message, status, cause) - Object.setPrototypeOf(this, RateLimitedError.prototype) - } -} - -export class ProjectNotFoundError extends WebrpcError { - constructor( - name: string = 'ProjectNotFound', - code: number = 1100, - message: string = 'Project not found', - status: number = 0, - cause?: string - ) { - super(name, code, message, status, cause) - Object.setPrototypeOf(this, ProjectNotFoundError.prototype) - } -} - -export class AccessKeyNotFoundError extends WebrpcError { - constructor( - name: string = 'AccessKeyNotFound', - code: number = 1101, - message: string = 'Access key not found', - status: number = 0, - cause?: string - ) { - super(name, code, message, status, cause) - Object.setPrototypeOf(this, AccessKeyNotFoundError.prototype) - } -} - -export class AccessKeyMismatchError extends WebrpcError { - constructor( - name: string = 'AccessKeyMismatch', - code: number = 1102, - message: string = 'Access key mismatch', - status: number = 0, - cause?: string - ) { - super(name, code, message, status, cause) - Object.setPrototypeOf(this, AccessKeyMismatchError.prototype) - } -} - -export class InvalidOriginError extends WebrpcError { - constructor( - name: string = 'InvalidOrigin', - code: number = 1103, - message: string = 'Invalid origin for Access Key', - status: number = 0, - cause?: string - ) { - super(name, code, message, status, cause) - Object.setPrototypeOf(this, InvalidOriginError.prototype) - } -} - -export class InvalidServiceError extends WebrpcError { - constructor( - name: string = 'InvalidService', - code: number = 1104, - message: string = 'Service not enabled for Access key', - status: number = 0, - cause?: string - ) { - super(name, code, message, status, cause) - Object.setPrototypeOf(this, InvalidServiceError.prototype) - } -} - -export class UnauthorizedUserError extends WebrpcError { - constructor( - name: string = 'UnauthorizedUser', - code: number = 1105, - message: string = 'Unauthorized user', - status: number = 0, - cause?: string - ) { - super(name, code, message, status, cause) - Object.setPrototypeOf(this, UnauthorizedUserError.prototype) - } -} - -export class QuotaExceededError extends WebrpcError { - constructor( - name: string = 'QuotaExceeded', - code: number = 1200, - message: string = 'Quota exceeded', - status: number = 0, - cause?: string - ) { - super(name, code, message, status, cause) - Object.setPrototypeOf(this, QuotaExceededError.prototype) - } -} - -export class RateLimitError extends WebrpcError { - constructor( - name: string = 'RateLimit', - code: number = 1201, - message: string = 'Rate limit exceeded', - status: number = 0, - cause?: string - ) { - super(name, code, message, status, cause) - Object.setPrototypeOf(this, RateLimitError.prototype) - } -} - -export class NoDefaultKeyError extends WebrpcError { - constructor( - name: string = 'NoDefaultKey', - code: number = 1300, - message: string = 'No default access key found', - status: number = 0, - cause?: string - ) { - super(name, code, message, status, cause) - Object.setPrototypeOf(this, NoDefaultKeyError.prototype) - } -} - -export class MaxAccessKeysError extends WebrpcError { - constructor( - name: string = 'MaxAccessKeys', - code: number = 1301, - message: string = 'Access keys limit reached', - status: number = 0, - cause?: string - ) { - super(name, code, message, status, cause) - Object.setPrototypeOf(this, MaxAccessKeysError.prototype) - } -} - -export class AtLeastOneKeyError extends WebrpcError { - constructor( - name: string = 'AtLeastOneKey', - code: number = 1302, - message: string = 'You need at least one Access Key', - status: number = 0, - cause?: string - ) { - super(name, code, message, status, cause) - Object.setPrototypeOf(this, AtLeastOneKeyError.prototype) - } -} - -export class TimeoutError extends WebrpcError { - constructor( - name: string = 'Timeout', - code: number = 1900, - message: string = 'Request timed out', - status: number = 0, - cause?: string - ) { - super(name, code, message, status, cause) - Object.setPrototypeOf(this, TimeoutError.prototype) - } -} - -export class InvalidArgumentError extends WebrpcError { - constructor( - name: string = 'InvalidArgument', - code: number = 2001, - message: string = 'Invalid argument', - status: number = 0, - cause?: string - ) { - super(name, code, message, status, cause) - Object.setPrototypeOf(this, InvalidArgumentError.prototype) - } -} - -export class UnavailableError extends WebrpcError { - constructor( - name: string = 'Unavailable', - code: number = 2002, - message: string = 'Unavailable resource', - status: number = 0, - cause?: string - ) { - super(name, code, message, status, cause) - Object.setPrototypeOf(this, UnavailableError.prototype) - } -} - -export class QueryFailedError extends WebrpcError { - constructor( - name: string = 'QueryFailed', - code: number = 2003, - message: string = 'Query failed', - status: number = 0, - cause?: string - ) { - super(name, code, message, status, cause) - Object.setPrototypeOf(this, QueryFailedError.prototype) - } -} - -export class ResourceExhaustedError extends WebrpcError { - constructor( - name: string = 'ResourceExhausted', - code: number = 2004, - message: string = 'Resource exhausted', - status: number = 0, - cause?: string - ) { - super(name, code, message, status, cause) - Object.setPrototypeOf(this, ResourceExhaustedError.prototype) - } -} - -export class NotFoundError extends WebrpcError { - constructor( - name: string = 'NotFound', - code: number = 3000, - message: string = 'Resource not found', - status: number = 0, - cause?: string - ) { - super(name, code, message, status, cause) - Object.setPrototypeOf(this, NotFoundError.prototype) - } -} - -export class MetadataCallFailedError extends WebrpcError { - constructor( - name: string = 'MetadataCallFailed', - code: number = 3003, - message: string = 'Metadata service call failed', - status: number = 0, - cause?: string - ) { - super(name, code, message, status, cause) - Object.setPrototypeOf(this, MetadataCallFailedError.prototype) - } -} - -export enum errors { - WebrpcEndpoint = 'WebrpcEndpoint', - WebrpcRequestFailed = 'WebrpcRequestFailed', - WebrpcBadRoute = 'WebrpcBadRoute', - WebrpcBadMethod = 'WebrpcBadMethod', - WebrpcBadRequest = 'WebrpcBadRequest', - WebrpcBadResponse = 'WebrpcBadResponse', - WebrpcServerPanic = 'WebrpcServerPanic', - WebrpcInternalError = 'WebrpcInternalError', - WebrpcClientDisconnected = 'WebrpcClientDisconnected', - WebrpcStreamLost = 'WebrpcStreamLost', - WebrpcStreamFinished = 'WebrpcStreamFinished', - Unauthorized = 'Unauthorized', - PermissionDenied = 'PermissionDenied', - SessionExpired = 'SessionExpired', - MethodNotFound = 'MethodNotFound', - RequestConflict = 'RequestConflict', - Aborted = 'Aborted', - Geoblocked = 'Geoblocked', - RateLimited = 'RateLimited', - ProjectNotFound = 'ProjectNotFound', - AccessKeyNotFound = 'AccessKeyNotFound', - AccessKeyMismatch = 'AccessKeyMismatch', - InvalidOrigin = 'InvalidOrigin', - InvalidService = 'InvalidService', - UnauthorizedUser = 'UnauthorizedUser', - QuotaExceeded = 'QuotaExceeded', - RateLimit = 'RateLimit', - NoDefaultKey = 'NoDefaultKey', - MaxAccessKeys = 'MaxAccessKeys', - AtLeastOneKey = 'AtLeastOneKey', - Timeout = 'Timeout', - InvalidArgument = 'InvalidArgument', - Unavailable = 'Unavailable', - QueryFailed = 'QueryFailed', - ResourceExhausted = 'ResourceExhausted', - NotFound = 'NotFound', - MetadataCallFailed = 'MetadataCallFailed' -} - -const webrpcErrorByCode: { [code: number]: any } = { - [0]: WebrpcEndpointError, - [-1]: WebrpcRequestFailedError, - [-2]: WebrpcBadRouteError, - [-3]: WebrpcBadMethodError, - [-4]: WebrpcBadRequestError, - [-5]: WebrpcBadResponseError, - [-6]: WebrpcServerPanicError, - [-7]: WebrpcInternalErrorError, - [-8]: WebrpcClientDisconnectedError, - [-9]: WebrpcStreamLostError, - [-10]: WebrpcStreamFinishedError, - [1000]: UnauthorizedError, - [1001]: PermissionDeniedError, - [1002]: SessionExpiredError, - [1003]: MethodNotFoundError, - [1004]: RequestConflictError, - [1005]: AbortedError, - [1006]: GeoblockedError, - [1007]: RateLimitedError, - [1100]: ProjectNotFoundError, - [1101]: AccessKeyNotFoundError, - [1102]: AccessKeyMismatchError, - [1103]: InvalidOriginError, - [1104]: InvalidServiceError, - [1105]: UnauthorizedUserError, - [1200]: QuotaExceededError, - [1201]: RateLimitError, - [1300]: NoDefaultKeyError, - [1301]: MaxAccessKeysError, - [1302]: AtLeastOneKeyError, - [1900]: TimeoutError, - [2001]: InvalidArgumentError, - [2002]: UnavailableError, - [2003]: QueryFailedError, - [2004]: ResourceExhaustedError, - [3000]: NotFoundError, - [3003]: MetadataCallFailedError -} - -export type Fetch = (input: RequestInfo, init?: RequestInit) => Promise diff --git a/old/packages/marketplace/CHANGELOG.md b/old/packages/marketplace/CHANGELOG.md deleted file mode 100644 index 6295f3498..000000000 --- a/old/packages/marketplace/CHANGELOG.md +++ /dev/null @@ -1,238 +0,0 @@ -# @0xsequence/marketplace - -## 2.3.8 - -### Patch Changes - -- indexer: update clients - -## 2.3.7 - -### Patch Changes - -- Metadata updates - -## 2.3.6 - -### Patch Changes - -- New chains - -## 2.3.5 - -### Patch Changes - -- Add Frequency Testnet - -## 2.3.4 - -### Patch Changes - -- metadata: exclude deprecated methods on rpc client - -## 2.3.3 - -### Patch Changes - -- metadata: client update - -## 2.3.2 - -### Patch Changes - -- metadata: update rpc client - -## 2.3.1 - -### Patch Changes - -- indexer: update rpc client - -## 2.3.0 - -### Minor Changes - -- update metadata rpc client - -## 2.2.15 - -### Patch Changes - -- API updates - -## 2.2.14 - -### Patch Changes - -- Somnia Testnet and Monad Testnet - -## 2.2.13 - -### Patch Changes - -- Add XR1 to all networks - -## 2.2.12 - -### Patch Changes - -- Add XR1 - -## 2.2.11 - -### Patch Changes - -- Relayer updates - -## 2.2.10 - -### Patch Changes - -- Etherlink support - -## 2.2.9 - -### Patch Changes - -- Indexer gateway native token balances - -## 2.2.8 - -### Patch Changes - -- Add Moonbeam and Moonbase Alpha - -## 2.2.7 - -### Patch Changes - -- Update Builder package - -## 2.2.6 - -### Patch Changes - -- Update relayer package - -## 2.2.5 - -### Patch Changes - -- auth: fix sequence indexer gateway url -- account: immutable wallet proxy hook - -## 2.2.4 - -### Patch Changes - -- network: update soneium mainnet block explorer url -- waas: signTypedData intent support - -## 2.2.3 - -### Patch Changes - -- provider: updating initWallet to use connected network configs if they exist - -## 2.2.2 - -### Patch Changes - -- pass projectAccessKey to relayer at all times - -## 2.2.1 - -### Patch Changes - -- waas-ethers: sign typed data - -## 2.2.0 - -### Minor Changes - -- indexer: gateway client -- @0xsequence/builder -- upgrade puppeteer to v23.10.3 - -## 2.1.8 - -### Patch Changes - -- Add Soneium Mainnet - -## 2.1.7 - -### Patch Changes - -- guard: pass project access key to guard requests - -## 2.1.6 - -### Patch Changes - -- Add LAOS and Telos Testnet chains - -## 2.1.5 - -### Patch Changes - -- account: save presigned configuration with reference chain id 1 - -## 2.1.4 - -### Patch Changes - -- provider: pass projectAccessKey into MuxMessageProvider - -## 2.1.3 - -### Patch Changes - -- waas: time drift date fix due to strange browser quirk - -## 2.1.2 - -### Patch Changes - -- provider: export analytics correctly - -## 2.1.1 - -### Patch Changes - -- Add LAOS chain support - -## 2.1.0 - -### Minor Changes - -- account: forward project access key when estimating fees and sending transactions - -### Patch Changes - -- sessions: save signatures with reference chain id - -## 2.0.26 - -### Patch Changes - -- account: fix chain id comparison - -## 2.0.25 - -### Patch Changes - -- skale-nebula: deploy gas limit = 10m - -## 2.0.24 - -### Patch Changes - -- sessions: arweave: configurable gateway url -- waas: use /status to get time drift before sending any intents - -## 2.0.23 - -### Patch Changes - -- Add The Root Network support diff --git a/old/packages/marketplace/README.md b/old/packages/marketplace/README.md deleted file mode 100644 index aa6a9d87b..000000000 --- a/old/packages/marketplace/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# @0xsequence/marketplace - -See [0xsequence project page](https://github.com/0xsequence/sequence.js). diff --git a/old/packages/marketplace/package.json b/old/packages/marketplace/package.json deleted file mode 100644 index 24fe9f902..000000000 --- a/old/packages/marketplace/package.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "name": "@0xsequence/marketplace", - "version": "2.3.8", - "description": "marketplace sub-package for Sequence", - "repository": "https://github.com/0xsequence/sequence.js/tree/master/packages/marketplace", - "source": "src/index.ts", - "main": "dist/0xsequence-marketplace.cjs.js", - "module": "dist/0xsequence-marketplace.esm.js", - "author": "Horizon Blockchain Games", - "license": "Apache-2.0", - "scripts": { - "test": "echo", - "typecheck": "tsc --noEmit" - }, - "dependencies": {}, - "peerDependencies": {}, - "devDependencies": {}, - "files": [ - "src", - "dist" - ] -} diff --git a/old/packages/marketplace/src/index.ts b/old/packages/marketplace/src/index.ts deleted file mode 100644 index 4f7cc7837..000000000 --- a/old/packages/marketplace/src/index.ts +++ /dev/null @@ -1,36 +0,0 @@ -export * from './marketplace.gen' - -import { Marketplace as MarketplaceRpc } from './marketplace.gen' - -export class MarketplaceIndexer extends MarketplaceRpc { - constructor( - hostname: string, - public projectAccessKey?: string, - public jwtAuth?: string - ) { - super(hostname.endsWith('/') ? hostname.slice(0, -1) : hostname, fetch) - this.fetch = this._fetch - } - - _fetch = (input: RequestInfo, init?: RequestInit): Promise => { - // automatically include jwt and access key auth header to requests - // if its been set on the api client - const headers: { [key: string]: any } = {} - - const jwtAuth = this.jwtAuth - const projectAccessKey = this.projectAccessKey - - if (jwtAuth && jwtAuth.length > 0) { - headers['Authorization'] = `BEARER ${jwtAuth}` - } - - if (projectAccessKey && projectAccessKey.length > 0) { - headers['X-Access-Key'] = projectAccessKey - } - - // before the request is made - init!.headers = { ...init!.headers, ...headers } - - return fetch(input, init) - } -} diff --git a/old/packages/marketplace/src/marketplace.gen.ts b/old/packages/marketplace/src/marketplace.gen.ts deleted file mode 100644 index f521c63fb..000000000 --- a/old/packages/marketplace/src/marketplace.gen.ts +++ /dev/null @@ -1,2435 +0,0 @@ -/* eslint-disable */ -// marketplace-api 7ab3354385f317680dd861e82a18aa351d8579d5 -// -- -// Code generated by webrpc-gen@v0.25.1 with typescript generator. DO NOT EDIT. -// -// webrpc-gen -schema=marketplace.ridl -target=typescript -client -out=./clients/marketplace.gen.ts - -export const WebrpcHeader = 'Webrpc' - -export const WebrpcHeaderValue = - 'webrpc@v0.25.1;gen-typescript@v0.17.0;marketplace-api@v0.0.0-7ab3354385f317680dd861e82a18aa351d8579d5' - -// WebRPC description and code-gen version -export const WebRPCVersion = 'v1' - -// Schema version of your RIDL schema -export const WebRPCSchemaVersion = '' - -// Schema hash generated from your RIDL schema -export const WebRPCSchemaHash = '7ab3354385f317680dd861e82a18aa351d8579d5' - -type WebrpcGenVersions = { - webrpcGenVersion: string - codeGenName: string - codeGenVersion: string - schemaName: string - schemaVersion: string -} - -export function VersionFromHeader(headers: Headers): WebrpcGenVersions { - const headerValue = headers.get(WebrpcHeader) - if (!headerValue) { - return { - webrpcGenVersion: '', - codeGenName: '', - codeGenVersion: '', - schemaName: '', - schemaVersion: '' - } - } - - return parseWebrpcGenVersions(headerValue) -} - -function parseWebrpcGenVersions(header: string): WebrpcGenVersions { - const versions = header.split(';') - if (versions.length < 3) { - return { - webrpcGenVersion: '', - codeGenName: '', - codeGenVersion: '', - schemaName: '', - schemaVersion: '' - } - } - - const [_, webrpcGenVersion] = versions[0]!.split('@') - const [codeGenName, codeGenVersion] = versions[1]!.split('@') - const [schemaName, schemaVersion] = versions[2]!.split('@') - - return { - webrpcGenVersion: webrpcGenVersion ?? '', - codeGenName: codeGenName ?? '', - codeGenVersion: codeGenVersion ?? '', - schemaName: schemaName ?? '', - schemaVersion: schemaVersion ?? '' - } -} - -// -// Types -// - -export interface TokenMetadata { - tokenId: string - name: string - description?: string - image?: string - video?: string - audio?: string - properties?: { [key: string]: any } - attributes: Array<{ [key: string]: any }> - image_data?: string - external_url?: string - background_color?: string - animation_url?: string - decimals?: number - updatedAt?: string - assets?: Array -} - -export interface Asset { - id: number - collectionId: number - tokenId: string - url?: string - metadataField: string - name?: string - filesize?: number - mimeType?: string - width?: number - height?: number - updatedAt?: string -} - -export enum SortOrder { - DESC = 'DESC', - ASC = 'ASC' -} - -export enum PropertyType { - INT = 'INT', - STRING = 'STRING', - ARRAY = 'ARRAY', - GENERIC = 'GENERIC' -} - -export enum MarketplaceKind { - unknown = 'unknown', - sequence_marketplace_v1 = 'sequence_marketplace_v1', - sequence_marketplace_v2 = 'sequence_marketplace_v2', - blur = 'blur', - zerox = 'zerox', - opensea = 'opensea', - looks_rare = 'looks_rare', - x2y2 = 'x2y2', - alienswap = 'alienswap', - payment_processor = 'payment_processor', - mintify = 'mintify' -} - -export enum OrderbookKind { - unknown = 'unknown', - sequence_marketplace_v1 = 'sequence_marketplace_v1', - sequence_marketplace_v2 = 'sequence_marketplace_v2', - blur = 'blur', - opensea = 'opensea', - looks_rare = 'looks_rare', - reservoir = 'reservoir', - x2y2 = 'x2y2' -} - -export enum SourceKind { - unknown = 'unknown', - external = 'external', - sequence_marketplace_v1 = 'sequence_marketplace_v1', - sequence_marketplace_v2 = 'sequence_marketplace_v2' -} - -export enum OrderSide { - unknown = 'unknown', - listing = 'listing', - offer = 'offer' -} - -export enum OrderStatus { - unknown = 'unknown', - active = 'active', - inactive = 'inactive', - expired = 'expired', - cancelled = 'cancelled', - filled = 'filled', - decimals_missing = 'decimals_missing' -} - -export enum ContractType { - UNKNOWN = 'UNKNOWN', - ERC20 = 'ERC20', - ERC721 = 'ERC721', - ERC1155 = 'ERC1155' -} - -export enum CollectionPriority { - unknown = 'unknown', - low = 'low', - normal = 'normal', - high = 'high' -} - -export enum CollectionStatus { - unknown = 'unknown', - created = 'created', - syncing_contract_metadata = 'syncing_contract_metadata', - synced_contract_metadata = 'synced_contract_metadata', - syncing_metadata = 'syncing_metadata', - synced_metadata = 'synced_metadata', - syncing_tokens = 'syncing_tokens', - synced_tokens = 'synced_tokens', - syncing_orders = 'syncing_orders', - active = 'active', - failed = 'failed', - inactive = 'inactive', - incompatible_type = 'incompatible_type' -} - -export enum ProjectStatus { - unknown = 'unknown', - active = 'active', - inactive = 'inactive' -} - -export enum CollectibleStatus { - unknown = 'unknown', - active = 'active', - inactive = 'inactive' -} - -export enum CurrencyStatus { - unknown = 'unknown', - created = 'created', - syncing_metadata = 'syncing_metadata', - active = 'active', - failed = 'failed' -} - -export enum WalletKind { - unknown = 'unknown', - sequence = 'sequence' -} - -export enum StepType { - unknown = 'unknown', - tokenApproval = 'tokenApproval', - buy = 'buy', - sell = 'sell', - createListing = 'createListing', - createOffer = 'createOffer', - signEIP712 = 'signEIP712', - signEIP191 = 'signEIP191', - cancel = 'cancel' -} - -export enum TransactionCrypto { - none = 'none', - partially = 'partially', - all = 'all' -} - -export enum TransactionNFTCheckoutProvider { - unknown = 'unknown', - sardine = 'sardine', - transak = 'transak' -} - -export enum TransactionOnRampProvider { - unknown = 'unknown', - sardine = 'sardine', - transak = 'transak' -} - -export enum TransactionSwapProvider { - unknown = 'unknown', - zerox = 'zerox' -} - -export enum ExecuteType { - unknown = 'unknown', - order = 'order' -} - -export enum ActivityAction { - unknown = 'unknown', - listing = 'listing', - offer = 'offer', - mint = 'mint', - sale = 'sale', - listingCancel = 'listingCancel', - offerCancel = 'offerCancel', - transfer = 'transfer' -} - -export interface Page { - page: number - pageSize: number - more?: boolean - sort?: Array -} - -export interface SortBy { - column: string - order: SortOrder -} - -export interface Filter { - text?: string - properties?: Array -} - -export interface PropertyFilter { - name: string - type: PropertyType - min?: number - max?: number - values?: Array -} - -export interface CollectiblesFilter { - includeEmpty: boolean - searchText?: string - properties?: Array - marketplaces?: Array - inAccounts?: Array - notInAccounts?: Array - ordersCreatedBy?: Array - ordersNotCreatedBy?: Array - inCurrencyAddresses?: Array - notInCurrencyAddresses?: Array -} - -export interface Order { - orderId: string - marketplace: MarketplaceKind - side: OrderSide - status: OrderStatus - chainId: number - originName: string - collectionContractAddress: string - tokenId?: string - createdBy: string - priceAmount: string - priceAmountFormatted: string - priceAmountNet: string - priceAmountNetFormatted: string - priceCurrencyAddress: string - priceDecimals: number - priceUSD: number - priceUSDFormatted: string - quantityInitial: string - quantityInitialFormatted: string - quantityRemaining: string - quantityRemainingFormatted: string - quantityAvailable: string - quantityAvailableFormatted: string - quantityDecimals: number - feeBps: number - feeBreakdown: Array - validFrom: string - validUntil: string - blockNumber: number - orderCreatedAt?: string - orderUpdatedAt?: string - createdAt: string - updatedAt: string - deletedAt?: string -} - -export interface FeeBreakdown { - kind: string - recipientAddress: string - bps: number -} - -export interface CollectibleOrder { - metadata: TokenMetadata - order?: Order - listing?: Order - offer?: Order -} - -export interface OrderFilter { - createdBy?: Array - marketplace?: Array - currencies?: Array -} - -export interface Collection { - status: CollectionStatus - chainId: number - contractAddress: string - contractType: ContractType - priority: CollectionPriority - tokenQuantityDecimals: number - config: CollectionConfig - createdAt: string - updatedAt: string - deletedAt?: string -} - -export interface CollectionConfig { - lastSynced: { [key: string]: CollectionLastSynced } - collectiblesSynced: string - activitiesSynced: string - activitiesSyncedContinuity: string -} - -export interface CollectionLastSynced { - allOrders: string - newOrders: string -} - -export interface Project { - projectId: number - chainId: number - contractAddress: string - status: ProjectStatus - createdAt: string - updatedAt: string - deletedAt?: string -} - -export interface Collectible { - chainId: number - contractAddress: string - status: CollectibleStatus - tokenId: string - decimals: number - createdAt: string - updatedAt: string - deletedAt?: string -} - -export interface Currency { - chainId: number - contractAddress: string - status: CurrencyStatus - name: string - symbol: string - decimals: number - imageUrl: string - exchangeRate: number - defaultChainCurrency: boolean - nativeCurrency: boolean - createdAt: string - updatedAt: string - deletedAt?: string -} - -export interface OrderData { - orderId: string - quantity: string - tokenId?: string -} - -export interface AdditionalFee { - amount: string - receiver: string -} - -export interface Step { - id: StepType - data: string - to: string - value: string - price: string - signature?: Signature - post?: PostRequest - executeType?: ExecuteType -} - -export interface PostRequest { - endpoint: string - method: string - body: any -} - -export interface CreateReq { - tokenId: string - quantity: string - expiry: string - currencyAddress: string - pricePerToken: string -} - -export interface GetOrdersInput { - contractAddress: string - orderId: string - marketplace: MarketplaceKind -} - -export interface Signature { - domain: Domain - types: any - primaryType: string - value: any -} - -export interface Domain { - name: string - version: string - chainId: number - verifyingContract: string -} - -export interface CheckoutOptionsMarketplaceOrder { - contractAddress: string - orderId: string - marketplace: MarketplaceKind -} - -export interface CheckoutOptionsItem { - tokenId: string - quantity: string -} - -export interface CheckoutOptions { - crypto: TransactionCrypto - swap: Array - nftCheckout: Array - onRamp: Array -} - -export interface Activity { - chainId: number - contractAddress: string - tokenId: string - action: ActivityAction - txHash: string - from: string - to?: string - quantity: string - quantityDecimals: number - priceAmount?: string - priceAmountFormatted?: string - priceCurrencyAddress?: string - priceDecimals?: number - activityCreatedAt: string - uniqueHash: string - createdAt: string - updatedAt: string - deletedAt?: string -} - -export interface Admin { - createCollection(args: CreateCollectionArgs, headers?: object, signal?: AbortSignal): Promise - getCollection(args: GetCollectionArgs, headers?: object, signal?: AbortSignal): Promise - updateCollection(args: UpdateCollectionArgs, headers?: object, signal?: AbortSignal): Promise - listCollections(args: ListCollectionsArgs, headers?: object, signal?: AbortSignal): Promise - deleteCollection(args: DeleteCollectionArgs, headers?: object, signal?: AbortSignal): Promise - /** - * determine what should happen here - */ - syncCollection(args: SyncCollectionArgs, headers?: object, signal?: AbortSignal): Promise - createCurrency(args: CreateCurrencyArgs, headers?: object, signal?: AbortSignal): Promise - createCurrencies(args: CreateCurrenciesArgs, headers?: object, signal?: AbortSignal): Promise - updateCurrency(args: UpdateCurrencyArgs, headers?: object, signal?: AbortSignal): Promise - listCurrencies(headers?: object, signal?: AbortSignal): Promise - deleteCurrency(args: DeleteCurrencyArgs, headers?: object, signal?: AbortSignal): Promise -} - -export interface CreateCollectionArgs { - projectId: number - contractAddress: string -} - -export interface CreateCollectionReturn { - collection: Collection -} -export interface GetCollectionArgs { - projectId: number - contractAddress: string -} - -export interface GetCollectionReturn { - collection: Collection -} -export interface UpdateCollectionArgs { - collection: Collection -} - -export interface UpdateCollectionReturn { - collection: Collection -} -export interface ListCollectionsArgs { - projectId: number - page?: Page -} - -export interface ListCollectionsReturn { - collections: Array - page?: Page -} -export interface DeleteCollectionArgs { - projectId: number - contractAddress: string -} - -export interface DeleteCollectionReturn { - collection: Collection -} -export interface SyncCollectionArgs { - projectId: number - contractAddress: string -} - -export interface SyncCollectionReturn { - collection: Collection -} -export interface CreateCurrencyArgs { - currency: Currency -} - -export interface CreateCurrencyReturn { - currency: Currency -} -export interface CreateCurrenciesArgs { - currencies: Array -} - -export interface CreateCurrenciesReturn { - currency: { [key: string]: Currency } -} -export interface UpdateCurrencyArgs { - currency: Currency -} - -export interface UpdateCurrencyReturn { - currency: Currency -} -export interface ListCurrenciesArgs {} - -export interface ListCurrenciesReturn { - currencies: Array -} -export interface DeleteCurrencyArgs { - chainId: number - contractAddress: string -} - -export interface DeleteCurrencyReturn { - currency: Currency -} - -export interface Marketplace { - listCurrencies(headers?: object, signal?: AbortSignal): Promise - getCollectionDetail(args: GetCollectionDetailArgs, headers?: object, signal?: AbortSignal): Promise - getCollectible(args: GetCollectibleArgs, headers?: object, signal?: AbortSignal): Promise - getLowestPriceOfferForCollectible( - args: GetLowestPriceOfferForCollectibleArgs, - headers?: object, - signal?: AbortSignal - ): Promise - getHighestPriceOfferForCollectible( - args: GetHighestPriceOfferForCollectibleArgs, - headers?: object, - signal?: AbortSignal - ): Promise - getLowestPriceListingForCollectible( - args: GetLowestPriceListingForCollectibleArgs, - headers?: object, - signal?: AbortSignal - ): Promise - getHighestPriceListingForCollectible( - args: GetHighestPriceListingForCollectibleArgs, - headers?: object, - signal?: AbortSignal - ): Promise - listListingsForCollectible( - args: ListListingsForCollectibleArgs, - headers?: object, - signal?: AbortSignal - ): Promise - listOffersForCollectible( - args: ListOffersForCollectibleArgs, - headers?: object, - signal?: AbortSignal - ): Promise - getCountOfListingsForCollectible( - args: GetCountOfListingsForCollectibleArgs, - headers?: object, - signal?: AbortSignal - ): Promise - getCountOfOffersForCollectible( - args: GetCountOfOffersForCollectibleArgs, - headers?: object, - signal?: AbortSignal - ): Promise - /** - * @deprecated Please use GetLowestPriceOfferForCollectible instead. - */ - getCollectibleLowestOffer( - args: GetCollectibleLowestOfferArgs, - headers?: object, - signal?: AbortSignal - ): Promise - /** - * @deprecated Please use GetHighestPriceOfferForCollectible instead. - */ - getCollectibleHighestOffer( - args: GetCollectibleHighestOfferArgs, - headers?: object, - signal?: AbortSignal - ): Promise - /** - * @deprecated Please use GetLowestPriceListingForCollectible instead. - */ - getCollectibleLowestListing( - args: GetCollectibleLowestListingArgs, - headers?: object, - signal?: AbortSignal - ): Promise - /** - * @deprecated Please use GetHighestPriceListingForCollectible instead. - */ - getCollectibleHighestListing( - args: GetCollectibleHighestListingArgs, - headers?: object, - signal?: AbortSignal - ): Promise - /** - * @deprecated Please use ListListingsForCollectible instead. - */ - listCollectibleListings( - args: ListCollectibleListingsArgs, - headers?: object, - signal?: AbortSignal - ): Promise - /** - * @deprecated Please use ListOffersForCollectible instead. - */ - listCollectibleOffers( - args: ListCollectibleOffersArgs, - headers?: object, - signal?: AbortSignal - ): Promise - /** - * checkout process - */ - generateBuyTransaction( - args: GenerateBuyTransactionArgs, - headers?: object, - signal?: AbortSignal - ): Promise - generateSellTransaction( - args: GenerateSellTransactionArgs, - headers?: object, - signal?: AbortSignal - ): Promise - generateListingTransaction( - args: GenerateListingTransactionArgs, - headers?: object, - signal?: AbortSignal - ): Promise - generateOfferTransaction( - args: GenerateOfferTransactionArgs, - headers?: object, - signal?: AbortSignal - ): Promise - generateCancelTransaction( - args: GenerateCancelTransactionArgs, - headers?: object, - signal?: AbortSignal - ): Promise - /** - * only used in a case of external transactions ( when we create off-chain transactions ) for instance opensea market - */ - execute(args: ExecuteArgs, headers?: object, signal?: AbortSignal): Promise - /** - * list of collectibles with best order for each collectible, by default this only returns collectibles with an order - */ - listCollectibles(args: ListCollectiblesArgs, headers?: object, signal?: AbortSignal): Promise - getCountOfAllCollectibles( - args: GetCountOfAllCollectiblesArgs, - headers?: object, - signal?: AbortSignal - ): Promise - getCountOfFilteredCollectibles( - args: GetCountOfFilteredCollectiblesArgs, - headers?: object, - signal?: AbortSignal - ): Promise - getFloorOrder(args: GetFloorOrderArgs, headers?: object, signal?: AbortSignal): Promise - listCollectionActivities( - args: ListCollectionActivitiesArgs, - headers?: object, - signal?: AbortSignal - ): Promise - listCollectibleActivities( - args: ListCollectibleActivitiesArgs, - headers?: object, - signal?: AbortSignal - ): Promise - listCollectiblesWithLowestListing( - args: ListCollectiblesWithLowestListingArgs, - headers?: object, - signal?: AbortSignal - ): Promise - listCollectiblesWithHighestOffer( - args: ListCollectiblesWithHighestOfferArgs, - headers?: object, - signal?: AbortSignal - ): Promise - syncOrder(args: SyncOrderArgs, headers?: object, signal?: AbortSignal): Promise - syncOrders(args: SyncOrdersArgs, headers?: object, signal?: AbortSignal): Promise - getOrders(args: GetOrdersArgs, headers?: object, signal?: AbortSignal): Promise - checkoutOptionsMarketplace( - args: CheckoutOptionsMarketplaceArgs, - headers?: object, - signal?: AbortSignal - ): Promise - checkoutOptionsSalesContract( - args: CheckoutOptionsSalesContractArgs, - headers?: object, - signal?: AbortSignal - ): Promise -} - -export interface ListCurrenciesArgs {} - -export interface ListCurrenciesReturn { - currencies: Array -} -export interface GetCollectionDetailArgs { - contractAddress: string -} - -export interface GetCollectionDetailReturn { - collection: Collection -} -export interface GetCollectibleArgs { - contractAddress: string - tokenId: string -} - -export interface GetCollectibleReturn { - metadata: TokenMetadata -} -export interface GetLowestPriceOfferForCollectibleArgs { - contractAddress: string - tokenId: string - filter?: OrderFilter -} - -export interface GetLowestPriceOfferForCollectibleReturn { - order: Order -} -export interface GetHighestPriceOfferForCollectibleArgs { - contractAddress: string - tokenId: string - filter?: OrderFilter -} - -export interface GetHighestPriceOfferForCollectibleReturn { - order: Order -} -export interface GetLowestPriceListingForCollectibleArgs { - contractAddress: string - tokenId: string - filter?: OrderFilter -} - -export interface GetLowestPriceListingForCollectibleReturn { - order: Order -} -export interface GetHighestPriceListingForCollectibleArgs { - contractAddress: string - tokenId: string - filter?: OrderFilter -} - -export interface GetHighestPriceListingForCollectibleReturn { - order: Order -} -export interface ListListingsForCollectibleArgs { - contractAddress: string - tokenId: string - filter?: OrderFilter - page?: Page -} - -export interface ListListingsForCollectibleReturn { - listings: Array - page?: Page -} -export interface ListOffersForCollectibleArgs { - contractAddress: string - tokenId: string - filter?: OrderFilter - page?: Page -} - -export interface ListOffersForCollectibleReturn { - offers: Array - page?: Page -} -export interface GetCountOfListingsForCollectibleArgs { - contractAddress: string - tokenId: string - filter?: OrderFilter -} - -export interface GetCountOfListingsForCollectibleReturn { - count: number -} -export interface GetCountOfOffersForCollectibleArgs { - contractAddress: string - tokenId: string - filter?: OrderFilter -} - -export interface GetCountOfOffersForCollectibleReturn { - count: number -} -export interface GetCollectibleLowestOfferArgs { - contractAddress: string - tokenId: string - filter?: OrderFilter -} - -export interface GetCollectibleLowestOfferReturn { - order?: Order -} -export interface GetCollectibleHighestOfferArgs { - contractAddress: string - tokenId: string - filter?: OrderFilter -} - -export interface GetCollectibleHighestOfferReturn { - order?: Order -} -export interface GetCollectibleLowestListingArgs { - contractAddress: string - tokenId: string - filter?: OrderFilter -} - -export interface GetCollectibleLowestListingReturn { - order?: Order -} -export interface GetCollectibleHighestListingArgs { - contractAddress: string - tokenId: string - filter?: OrderFilter -} - -export interface GetCollectibleHighestListingReturn { - order?: Order -} -export interface ListCollectibleListingsArgs { - contractAddress: string - tokenId: string - filter?: OrderFilter - page?: Page -} - -export interface ListCollectibleListingsReturn { - listings: Array - page?: Page -} -export interface ListCollectibleOffersArgs { - contractAddress: string - tokenId: string - filter?: OrderFilter - page?: Page -} - -export interface ListCollectibleOffersReturn { - offers: Array - page?: Page -} -export interface GenerateBuyTransactionArgs { - collectionAddress: string - buyer: string - marketplace: MarketplaceKind - ordersData: Array - additionalFees: Array - walletType?: WalletKind -} - -export interface GenerateBuyTransactionReturn { - steps: Array -} -export interface GenerateSellTransactionArgs { - collectionAddress: string - seller: string - marketplace: MarketplaceKind - ordersData: Array - additionalFees: Array - walletType?: WalletKind -} - -export interface GenerateSellTransactionReturn { - steps: Array -} -export interface GenerateListingTransactionArgs { - collectionAddress: string - owner: string - contractType: ContractType - orderbook: OrderbookKind - listing: CreateReq - walletType?: WalletKind -} - -export interface GenerateListingTransactionReturn { - steps: Array -} -export interface GenerateOfferTransactionArgs { - collectionAddress: string - maker: string - contractType: ContractType - orderbook: OrderbookKind - offer: CreateReq - walletType?: WalletKind -} - -export interface GenerateOfferTransactionReturn { - steps: Array -} -export interface GenerateCancelTransactionArgs { - collectionAddress: string - maker: string - marketplace: MarketplaceKind - orderId: string -} - -export interface GenerateCancelTransactionReturn { - steps: Array -} -export interface ExecuteArgs { - signature: string - method: string - endpoint: string - executeType: ExecuteType - body: any -} - -export interface ExecuteReturn { - orderId: string -} -export interface ListCollectiblesArgs { - side: OrderSide - contractAddress: string - filter?: CollectiblesFilter - page?: Page -} - -export interface ListCollectiblesReturn { - collectibles: Array - page?: Page -} -export interface GetCountOfAllCollectiblesArgs { - contractAddress: string -} - -export interface GetCountOfAllCollectiblesReturn { - count: number -} -export interface GetCountOfFilteredCollectiblesArgs { - side: OrderSide - contractAddress: string - filter?: CollectiblesFilter -} - -export interface GetCountOfFilteredCollectiblesReturn { - count: number -} -export interface GetFloorOrderArgs { - contractAddress: string - filter?: CollectiblesFilter -} - -export interface GetFloorOrderReturn { - collectible: CollectibleOrder -} -export interface ListCollectionActivitiesArgs { - contractAddress: string - page?: Page -} - -export interface ListCollectionActivitiesReturn { - activities: Array - page?: Page -} -export interface ListCollectibleActivitiesArgs { - contractAddress: string - tokenId: string - page?: Page -} - -export interface ListCollectibleActivitiesReturn { - activities: Array - page?: Page -} -export interface ListCollectiblesWithLowestListingArgs { - contractAddress: string - filter?: CollectiblesFilter - page?: Page -} - -export interface ListCollectiblesWithLowestListingReturn { - collectibles: Array - page?: Page -} -export interface ListCollectiblesWithHighestOfferArgs { - contractAddress: string - filter?: CollectiblesFilter - page?: Page -} - -export interface ListCollectiblesWithHighestOfferReturn { - collectibles: Array - page?: Page -} -export interface SyncOrderArgs { - order: Order -} - -export interface SyncOrderReturn {} -export interface SyncOrdersArgs { - orders: Array -} - -export interface SyncOrdersReturn {} -export interface GetOrdersArgs { - input: Array - page?: Page -} - -export interface GetOrdersReturn { - orders: Array - page?: Page -} -export interface CheckoutOptionsMarketplaceArgs { - wallet: string - orders: Array - additionalFee: number -} - -export interface CheckoutOptionsMarketplaceReturn { - options: CheckoutOptions -} -export interface CheckoutOptionsSalesContractArgs { - wallet: string - contractAddress: string - collectionAddress: string - items: Array -} - -export interface CheckoutOptionsSalesContractReturn { - options: CheckoutOptions -} - -// -// Client -// -export class Admin implements Admin { - protected hostname: string - protected fetch: Fetch - protected path = '/rpc/Admin/' - - constructor(hostname: string, fetch: Fetch) { - this.hostname = hostname.replace(/\/*$/, '') - this.fetch = (input: RequestInfo, init?: RequestInit) => fetch(input, init) - } - - private url(name: string): string { - return this.hostname + this.path + name - } - - createCollection = (args: CreateCollectionArgs, headers?: object, signal?: AbortSignal): Promise => { - return this.fetch(this.url('CreateCollection'), createHTTPRequest(args, headers, signal)).then( - res => { - return buildResponse(res).then(_data => { - return { - collection: _data.collection - } - }) - }, - error => { - throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) - } - ) - } - - getCollection = (args: GetCollectionArgs, headers?: object, signal?: AbortSignal): Promise => { - return this.fetch(this.url('GetCollection'), createHTTPRequest(args, headers, signal)).then( - res => { - return buildResponse(res).then(_data => { - return { - collection: _data.collection - } - }) - }, - error => { - throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) - } - ) - } - - updateCollection = (args: UpdateCollectionArgs, headers?: object, signal?: AbortSignal): Promise => { - return this.fetch(this.url('UpdateCollection'), createHTTPRequest(args, headers, signal)).then( - res => { - return buildResponse(res).then(_data => { - return { - collection: _data.collection - } - }) - }, - error => { - throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) - } - ) - } - - listCollections = (args: ListCollectionsArgs, headers?: object, signal?: AbortSignal): Promise => { - return this.fetch(this.url('ListCollections'), createHTTPRequest(args, headers, signal)).then( - res => { - return buildResponse(res).then(_data => { - return { - collections: >_data.collections, - page: _data.page - } - }) - }, - error => { - throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) - } - ) - } - - deleteCollection = (args: DeleteCollectionArgs, headers?: object, signal?: AbortSignal): Promise => { - return this.fetch(this.url('DeleteCollection'), createHTTPRequest(args, headers, signal)).then( - res => { - return buildResponse(res).then(_data => { - return { - collection: _data.collection - } - }) - }, - error => { - throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) - } - ) - } - - syncCollection = (args: SyncCollectionArgs, headers?: object, signal?: AbortSignal): Promise => { - return this.fetch(this.url('SyncCollection'), createHTTPRequest(args, headers, signal)).then( - res => { - return buildResponse(res).then(_data => { - return { - collection: _data.collection - } - }) - }, - error => { - throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) - } - ) - } - - createCurrency = (args: CreateCurrencyArgs, headers?: object, signal?: AbortSignal): Promise => { - return this.fetch(this.url('CreateCurrency'), createHTTPRequest(args, headers, signal)).then( - res => { - return buildResponse(res).then(_data => { - return { - currency: _data.currency - } - }) - }, - error => { - throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) - } - ) - } - - createCurrencies = (args: CreateCurrenciesArgs, headers?: object, signal?: AbortSignal): Promise => { - return this.fetch(this.url('CreateCurrencies'), createHTTPRequest(args, headers, signal)).then( - res => { - return buildResponse(res).then(_data => { - return { - currency: <{ [key: string]: Currency }>_data.currency - } - }) - }, - error => { - throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) - } - ) - } - - updateCurrency = (args: UpdateCurrencyArgs, headers?: object, signal?: AbortSignal): Promise => { - return this.fetch(this.url('UpdateCurrency'), createHTTPRequest(args, headers, signal)).then( - res => { - return buildResponse(res).then(_data => { - return { - currency: _data.currency - } - }) - }, - error => { - throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) - } - ) - } - - listCurrencies = (headers?: object, signal?: AbortSignal): Promise => { - return this.fetch(this.url('ListCurrencies'), createHTTPRequest({}, headers, signal)).then( - res => { - return buildResponse(res).then(_data => { - return { - currencies: >_data.currencies - } - }) - }, - error => { - throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) - } - ) - } - - deleteCurrency = (args: DeleteCurrencyArgs, headers?: object, signal?: AbortSignal): Promise => { - return this.fetch(this.url('DeleteCurrency'), createHTTPRequest(args, headers, signal)).then( - res => { - return buildResponse(res).then(_data => { - return { - currency: _data.currency - } - }) - }, - error => { - throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) - } - ) - } -} -export class Marketplace implements Marketplace { - protected hostname: string - protected fetch: Fetch - protected path = '/rpc/Marketplace/' - - constructor(hostname: string, fetch: Fetch) { - this.hostname = hostname.replace(/\/*$/, '') - this.fetch = (input: RequestInfo, init?: RequestInit) => fetch(input, init) - } - - private url(name: string): string { - return this.hostname + this.path + name - } - - listCurrencies = (headers?: object, signal?: AbortSignal): Promise => { - return this.fetch(this.url('ListCurrencies'), createHTTPRequest({}, headers, signal)).then( - res => { - return buildResponse(res).then(_data => { - return { - currencies: >_data.currencies - } - }) - }, - error => { - throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) - } - ) - } - - getCollectionDetail = ( - args: GetCollectionDetailArgs, - headers?: object, - signal?: AbortSignal - ): Promise => { - return this.fetch(this.url('GetCollectionDetail'), createHTTPRequest(args, headers, signal)).then( - res => { - return buildResponse(res).then(_data => { - return { - collection: _data.collection - } - }) - }, - error => { - throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) - } - ) - } - - getCollectible = (args: GetCollectibleArgs, headers?: object, signal?: AbortSignal): Promise => { - return this.fetch(this.url('GetCollectible'), createHTTPRequest(args, headers, signal)).then( - res => { - return buildResponse(res).then(_data => { - return { - metadata: _data.metadata - } - }) - }, - error => { - throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) - } - ) - } - - getLowestPriceOfferForCollectible = ( - args: GetLowestPriceOfferForCollectibleArgs, - headers?: object, - signal?: AbortSignal - ): Promise => { - return this.fetch(this.url('GetLowestPriceOfferForCollectible'), createHTTPRequest(args, headers, signal)).then( - res => { - return buildResponse(res).then(_data => { - return { - order: _data.order - } - }) - }, - error => { - throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) - } - ) - } - - getHighestPriceOfferForCollectible = ( - args: GetHighestPriceOfferForCollectibleArgs, - headers?: object, - signal?: AbortSignal - ): Promise => { - return this.fetch(this.url('GetHighestPriceOfferForCollectible'), createHTTPRequest(args, headers, signal)).then( - res => { - return buildResponse(res).then(_data => { - return { - order: _data.order - } - }) - }, - error => { - throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) - } - ) - } - - getLowestPriceListingForCollectible = ( - args: GetLowestPriceListingForCollectibleArgs, - headers?: object, - signal?: AbortSignal - ): Promise => { - return this.fetch(this.url('GetLowestPriceListingForCollectible'), createHTTPRequest(args, headers, signal)).then( - res => { - return buildResponse(res).then(_data => { - return { - order: _data.order - } - }) - }, - error => { - throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) - } - ) - } - - getHighestPriceListingForCollectible = ( - args: GetHighestPriceListingForCollectibleArgs, - headers?: object, - signal?: AbortSignal - ): Promise => { - return this.fetch(this.url('GetHighestPriceListingForCollectible'), createHTTPRequest(args, headers, signal)).then( - res => { - return buildResponse(res).then(_data => { - return { - order: _data.order - } - }) - }, - error => { - throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) - } - ) - } - - listListingsForCollectible = ( - args: ListListingsForCollectibleArgs, - headers?: object, - signal?: AbortSignal - ): Promise => { - return this.fetch(this.url('ListListingsForCollectible'), createHTTPRequest(args, headers, signal)).then( - res => { - return buildResponse(res).then(_data => { - return { - listings: >_data.listings, - page: _data.page - } - }) - }, - error => { - throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) - } - ) - } - - listOffersForCollectible = ( - args: ListOffersForCollectibleArgs, - headers?: object, - signal?: AbortSignal - ): Promise => { - return this.fetch(this.url('ListOffersForCollectible'), createHTTPRequest(args, headers, signal)).then( - res => { - return buildResponse(res).then(_data => { - return { - offers: >_data.offers, - page: _data.page - } - }) - }, - error => { - throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) - } - ) - } - - getCountOfListingsForCollectible = ( - args: GetCountOfListingsForCollectibleArgs, - headers?: object, - signal?: AbortSignal - ): Promise => { - return this.fetch(this.url('GetCountOfListingsForCollectible'), createHTTPRequest(args, headers, signal)).then( - res => { - return buildResponse(res).then(_data => { - return { - count: _data.count - } - }) - }, - error => { - throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) - } - ) - } - - getCountOfOffersForCollectible = ( - args: GetCountOfOffersForCollectibleArgs, - headers?: object, - signal?: AbortSignal - ): Promise => { - return this.fetch(this.url('GetCountOfOffersForCollectible'), createHTTPRequest(args, headers, signal)).then( - res => { - return buildResponse(res).then(_data => { - return { - count: _data.count - } - }) - }, - error => { - throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) - } - ) - } - - getCollectibleLowestOffer = ( - args: GetCollectibleLowestOfferArgs, - headers?: object, - signal?: AbortSignal - ): Promise => { - return this.fetch(this.url('GetCollectibleLowestOffer'), createHTTPRequest(args, headers, signal)).then( - res => { - return buildResponse(res).then(_data => { - return { - order: _data.order - } - }) - }, - error => { - throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) - } - ) - } - - getCollectibleHighestOffer = ( - args: GetCollectibleHighestOfferArgs, - headers?: object, - signal?: AbortSignal - ): Promise => { - return this.fetch(this.url('GetCollectibleHighestOffer'), createHTTPRequest(args, headers, signal)).then( - res => { - return buildResponse(res).then(_data => { - return { - order: _data.order - } - }) - }, - error => { - throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) - } - ) - } - - getCollectibleLowestListing = ( - args: GetCollectibleLowestListingArgs, - headers?: object, - signal?: AbortSignal - ): Promise => { - return this.fetch(this.url('GetCollectibleLowestListing'), createHTTPRequest(args, headers, signal)).then( - res => { - return buildResponse(res).then(_data => { - return { - order: _data.order - } - }) - }, - error => { - throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) - } - ) - } - - getCollectibleHighestListing = ( - args: GetCollectibleHighestListingArgs, - headers?: object, - signal?: AbortSignal - ): Promise => { - return this.fetch(this.url('GetCollectibleHighestListing'), createHTTPRequest(args, headers, signal)).then( - res => { - return buildResponse(res).then(_data => { - return { - order: _data.order - } - }) - }, - error => { - throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) - } - ) - } - - listCollectibleListings = ( - args: ListCollectibleListingsArgs, - headers?: object, - signal?: AbortSignal - ): Promise => { - return this.fetch(this.url('ListCollectibleListings'), createHTTPRequest(args, headers, signal)).then( - res => { - return buildResponse(res).then(_data => { - return { - listings: >_data.listings, - page: _data.page - } - }) - }, - error => { - throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) - } - ) - } - - listCollectibleOffers = ( - args: ListCollectibleOffersArgs, - headers?: object, - signal?: AbortSignal - ): Promise => { - return this.fetch(this.url('ListCollectibleOffers'), createHTTPRequest(args, headers, signal)).then( - res => { - return buildResponse(res).then(_data => { - return { - offers: >_data.offers, - page: _data.page - } - }) - }, - error => { - throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) - } - ) - } - - generateBuyTransaction = ( - args: GenerateBuyTransactionArgs, - headers?: object, - signal?: AbortSignal - ): Promise => { - return this.fetch(this.url('GenerateBuyTransaction'), createHTTPRequest(args, headers, signal)).then( - res => { - return buildResponse(res).then(_data => { - return { - steps: >_data.steps - } - }) - }, - error => { - throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) - } - ) - } - - generateSellTransaction = ( - args: GenerateSellTransactionArgs, - headers?: object, - signal?: AbortSignal - ): Promise => { - return this.fetch(this.url('GenerateSellTransaction'), createHTTPRequest(args, headers, signal)).then( - res => { - return buildResponse(res).then(_data => { - return { - steps: >_data.steps - } - }) - }, - error => { - throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) - } - ) - } - - generateListingTransaction = ( - args: GenerateListingTransactionArgs, - headers?: object, - signal?: AbortSignal - ): Promise => { - return this.fetch(this.url('GenerateListingTransaction'), createHTTPRequest(args, headers, signal)).then( - res => { - return buildResponse(res).then(_data => { - return { - steps: >_data.steps - } - }) - }, - error => { - throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) - } - ) - } - - generateOfferTransaction = ( - args: GenerateOfferTransactionArgs, - headers?: object, - signal?: AbortSignal - ): Promise => { - return this.fetch(this.url('GenerateOfferTransaction'), createHTTPRequest(args, headers, signal)).then( - res => { - return buildResponse(res).then(_data => { - return { - steps: >_data.steps - } - }) - }, - error => { - throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) - } - ) - } - - generateCancelTransaction = ( - args: GenerateCancelTransactionArgs, - headers?: object, - signal?: AbortSignal - ): Promise => { - return this.fetch(this.url('GenerateCancelTransaction'), createHTTPRequest(args, headers, signal)).then( - res => { - return buildResponse(res).then(_data => { - return { - steps: >_data.steps - } - }) - }, - error => { - throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) - } - ) - } - - execute = (args: ExecuteArgs, headers?: object, signal?: AbortSignal): Promise => { - return this.fetch(this.url('Execute'), createHTTPRequest(args, headers, signal)).then( - res => { - return buildResponse(res).then(_data => { - return { - orderId: _data.orderId - } - }) - }, - error => { - throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) - } - ) - } - - listCollectibles = (args: ListCollectiblesArgs, headers?: object, signal?: AbortSignal): Promise => { - return this.fetch(this.url('ListCollectibles'), createHTTPRequest(args, headers, signal)).then( - res => { - return buildResponse(res).then(_data => { - return { - collectibles: >_data.collectibles, - page: _data.page - } - }) - }, - error => { - throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) - } - ) - } - - getCountOfAllCollectibles = ( - args: GetCountOfAllCollectiblesArgs, - headers?: object, - signal?: AbortSignal - ): Promise => { - return this.fetch(this.url('GetCountOfAllCollectibles'), createHTTPRequest(args, headers, signal)).then( - res => { - return buildResponse(res).then(_data => { - return { - count: _data.count - } - }) - }, - error => { - throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) - } - ) - } - - getCountOfFilteredCollectibles = ( - args: GetCountOfFilteredCollectiblesArgs, - headers?: object, - signal?: AbortSignal - ): Promise => { - return this.fetch(this.url('GetCountOfFilteredCollectibles'), createHTTPRequest(args, headers, signal)).then( - res => { - return buildResponse(res).then(_data => { - return { - count: _data.count - } - }) - }, - error => { - throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) - } - ) - } - - getFloorOrder = (args: GetFloorOrderArgs, headers?: object, signal?: AbortSignal): Promise => { - return this.fetch(this.url('GetFloorOrder'), createHTTPRequest(args, headers, signal)).then( - res => { - return buildResponse(res).then(_data => { - return { - collectible: _data.collectible - } - }) - }, - error => { - throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) - } - ) - } - - listCollectionActivities = ( - args: ListCollectionActivitiesArgs, - headers?: object, - signal?: AbortSignal - ): Promise => { - return this.fetch(this.url('ListCollectionActivities'), createHTTPRequest(args, headers, signal)).then( - res => { - return buildResponse(res).then(_data => { - return { - activities: >_data.activities, - page: _data.page - } - }) - }, - error => { - throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) - } - ) - } - - listCollectibleActivities = ( - args: ListCollectibleActivitiesArgs, - headers?: object, - signal?: AbortSignal - ): Promise => { - return this.fetch(this.url('ListCollectibleActivities'), createHTTPRequest(args, headers, signal)).then( - res => { - return buildResponse(res).then(_data => { - return { - activities: >_data.activities, - page: _data.page - } - }) - }, - error => { - throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) - } - ) - } - - listCollectiblesWithLowestListing = ( - args: ListCollectiblesWithLowestListingArgs, - headers?: object, - signal?: AbortSignal - ): Promise => { - return this.fetch(this.url('ListCollectiblesWithLowestListing'), createHTTPRequest(args, headers, signal)).then( - res => { - return buildResponse(res).then(_data => { - return { - collectibles: >_data.collectibles, - page: _data.page - } - }) - }, - error => { - throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) - } - ) - } - - listCollectiblesWithHighestOffer = ( - args: ListCollectiblesWithHighestOfferArgs, - headers?: object, - signal?: AbortSignal - ): Promise => { - return this.fetch(this.url('ListCollectiblesWithHighestOffer'), createHTTPRequest(args, headers, signal)).then( - res => { - return buildResponse(res).then(_data => { - return { - collectibles: >_data.collectibles, - page: _data.page - } - }) - }, - error => { - throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) - } - ) - } - - syncOrder = (args: SyncOrderArgs, headers?: object, signal?: AbortSignal): Promise => { - return this.fetch(this.url('SyncOrder'), createHTTPRequest(args, headers, signal)).then( - res => { - return buildResponse(res).then(_data => { - return {} - }) - }, - error => { - throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) - } - ) - } - - syncOrders = (args: SyncOrdersArgs, headers?: object, signal?: AbortSignal): Promise => { - return this.fetch(this.url('SyncOrders'), createHTTPRequest(args, headers, signal)).then( - res => { - return buildResponse(res).then(_data => { - return {} - }) - }, - error => { - throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) - } - ) - } - - getOrders = (args: GetOrdersArgs, headers?: object, signal?: AbortSignal): Promise => { - return this.fetch(this.url('GetOrders'), createHTTPRequest(args, headers, signal)).then( - res => { - return buildResponse(res).then(_data => { - return { - orders: >_data.orders, - page: _data.page - } - }) - }, - error => { - throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) - } - ) - } - - checkoutOptionsMarketplace = ( - args: CheckoutOptionsMarketplaceArgs, - headers?: object, - signal?: AbortSignal - ): Promise => { - return this.fetch(this.url('CheckoutOptionsMarketplace'), createHTTPRequest(args, headers, signal)).then( - res => { - return buildResponse(res).then(_data => { - return { - options: _data.options - } - }) - }, - error => { - throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) - } - ) - } - - checkoutOptionsSalesContract = ( - args: CheckoutOptionsSalesContractArgs, - headers?: object, - signal?: AbortSignal - ): Promise => { - return this.fetch(this.url('CheckoutOptionsSalesContract'), createHTTPRequest(args, headers, signal)).then( - res => { - return buildResponse(res).then(_data => { - return { - options: _data.options - } - }) - }, - error => { - throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) - } - ) - } -} - -const createHTTPRequest = (body: object = {}, headers: object = {}, signal: AbortSignal | null = null): object => { - const reqHeaders: { [key: string]: string } = { ...headers, 'Content-Type': 'application/json' } - reqHeaders[WebrpcHeader] = WebrpcHeaderValue - - return { - method: 'POST', - headers: reqHeaders, - body: JSON.stringify(body || {}), - signal - } -} - -const buildResponse = (res: Response): Promise => { - return res.text().then(text => { - let data - try { - data = JSON.parse(text) - } catch (error) { - let message = '' - if (error instanceof Error) { - message = error.message - } - throw WebrpcBadResponseError.new({ - status: res.status, - cause: `JSON.parse(): ${message}: response text: ${text}` - }) - } - if (!res.ok) { - const code: number = typeof data.code === 'number' ? data.code : 0 - throw (webrpcErrorByCode[code] || WebrpcError).new(data) - } - return data - }) -} - -// -// Errors -// - -export class WebrpcError extends Error { - name: string - code: number - message: string - status: number - cause?: string - - /** @deprecated Use message instead of msg. Deprecated in webrpc v0.11.0. */ - msg: string - - constructor(name: string, code: number, message: string, status: number, cause?: string) { - super(message) - this.name = name || 'WebrpcError' - this.code = typeof code === 'number' ? code : 0 - this.message = message || `endpoint error ${this.code}` - this.msg = this.message - this.status = typeof status === 'number' ? status : 0 - this.cause = cause - Object.setPrototypeOf(this, WebrpcError.prototype) - } - - static new(payload: any): WebrpcError { - return new this(payload.error, payload.code, payload.message || payload.msg, payload.status, payload.cause) - } -} - -// Webrpc errors - -export class WebrpcEndpointError extends WebrpcError { - constructor( - name: string = 'WebrpcEndpoint', - code: number = 0, - message: string = `endpoint error`, - status: number = 0, - cause?: string - ) { - super(name, code, message, status, cause) - Object.setPrototypeOf(this, WebrpcEndpointError.prototype) - } -} - -export class WebrpcRequestFailedError extends WebrpcError { - constructor( - name: string = 'WebrpcRequestFailed', - code: number = -1, - message: string = `request failed`, - status: number = 0, - cause?: string - ) { - super(name, code, message, status, cause) - Object.setPrototypeOf(this, WebrpcRequestFailedError.prototype) - } -} - -export class WebrpcBadRouteError extends WebrpcError { - constructor( - name: string = 'WebrpcBadRoute', - code: number = -2, - message: string = `bad route`, - status: number = 0, - cause?: string - ) { - super(name, code, message, status, cause) - Object.setPrototypeOf(this, WebrpcBadRouteError.prototype) - } -} - -export class WebrpcBadMethodError extends WebrpcError { - constructor( - name: string = 'WebrpcBadMethod', - code: number = -3, - message: string = `bad method`, - status: number = 0, - cause?: string - ) { - super(name, code, message, status, cause) - Object.setPrototypeOf(this, WebrpcBadMethodError.prototype) - } -} - -export class WebrpcBadRequestError extends WebrpcError { - constructor( - name: string = 'WebrpcBadRequest', - code: number = -4, - message: string = `bad request`, - status: number = 0, - cause?: string - ) { - super(name, code, message, status, cause) - Object.setPrototypeOf(this, WebrpcBadRequestError.prototype) - } -} - -export class WebrpcBadResponseError extends WebrpcError { - constructor( - name: string = 'WebrpcBadResponse', - code: number = -5, - message: string = `bad response`, - status: number = 0, - cause?: string - ) { - super(name, code, message, status, cause) - Object.setPrototypeOf(this, WebrpcBadResponseError.prototype) - } -} - -export class WebrpcServerPanicError extends WebrpcError { - constructor( - name: string = 'WebrpcServerPanic', - code: number = -6, - message: string = `server panic`, - status: number = 0, - cause?: string - ) { - super(name, code, message, status, cause) - Object.setPrototypeOf(this, WebrpcServerPanicError.prototype) - } -} - -export class WebrpcInternalErrorError extends WebrpcError { - constructor( - name: string = 'WebrpcInternalError', - code: number = -7, - message: string = `internal error`, - status: number = 0, - cause?: string - ) { - super(name, code, message, status, cause) - Object.setPrototypeOf(this, WebrpcInternalErrorError.prototype) - } -} - -export class WebrpcClientDisconnectedError extends WebrpcError { - constructor( - name: string = 'WebrpcClientDisconnected', - code: number = -8, - message: string = `client disconnected`, - status: number = 0, - cause?: string - ) { - super(name, code, message, status, cause) - Object.setPrototypeOf(this, WebrpcClientDisconnectedError.prototype) - } -} - -export class WebrpcStreamLostError extends WebrpcError { - constructor( - name: string = 'WebrpcStreamLost', - code: number = -9, - message: string = `stream lost`, - status: number = 0, - cause?: string - ) { - super(name, code, message, status, cause) - Object.setPrototypeOf(this, WebrpcStreamLostError.prototype) - } -} - -export class WebrpcStreamFinishedError extends WebrpcError { - constructor( - name: string = 'WebrpcStreamFinished', - code: number = -10, - message: string = `stream finished`, - status: number = 0, - cause?: string - ) { - super(name, code, message, status, cause) - Object.setPrototypeOf(this, WebrpcStreamFinishedError.prototype) - } -} - -// Schema errors - -export class UnauthorizedError extends WebrpcError { - constructor( - name: string = 'Unauthorized', - code: number = 1000, - message: string = `Unauthorized access`, - status: number = 0, - cause?: string - ) { - super(name, code, message, status, cause) - Object.setPrototypeOf(this, UnauthorizedError.prototype) - } -} - -export class PermissionDeniedError extends WebrpcError { - constructor( - name: string = 'PermissionDenied', - code: number = 1001, - message: string = `Permission denied`, - status: number = 0, - cause?: string - ) { - super(name, code, message, status, cause) - Object.setPrototypeOf(this, PermissionDeniedError.prototype) - } -} - -export class SessionExpiredError extends WebrpcError { - constructor( - name: string = 'SessionExpired', - code: number = 1002, - message: string = `Session expired`, - status: number = 0, - cause?: string - ) { - super(name, code, message, status, cause) - Object.setPrototypeOf(this, SessionExpiredError.prototype) - } -} - -export class MethodNotFoundError extends WebrpcError { - constructor( - name: string = 'MethodNotFound', - code: number = 1003, - message: string = `Method not found`, - status: number = 0, - cause?: string - ) { - super(name, code, message, status, cause) - Object.setPrototypeOf(this, MethodNotFoundError.prototype) - } -} - -export class TimeoutError extends WebrpcError { - constructor( - name: string = 'Timeout', - code: number = 2000, - message: string = `Request timed out`, - status: number = 0, - cause?: string - ) { - super(name, code, message, status, cause) - Object.setPrototypeOf(this, TimeoutError.prototype) - } -} - -export class InvalidArgumentError extends WebrpcError { - constructor( - name: string = 'InvalidArgument', - code: number = 2001, - message: string = `Invalid argument`, - status: number = 0, - cause?: string - ) { - super(name, code, message, status, cause) - Object.setPrototypeOf(this, InvalidArgumentError.prototype) - } -} - -export class NotFoundError extends WebrpcError { - constructor( - name: string = 'NotFound', - code: number = 3000, - message: string = `Resource not found`, - status: number = 0, - cause?: string - ) { - super(name, code, message, status, cause) - Object.setPrototypeOf(this, NotFoundError.prototype) - } -} - -export class UserNotFoundError extends WebrpcError { - constructor( - name: string = 'UserNotFound', - code: number = 3001, - message: string = `User not found`, - status: number = 0, - cause?: string - ) { - super(name, code, message, status, cause) - Object.setPrototypeOf(this, UserNotFoundError.prototype) - } -} - -export class ProjectNotFoundError extends WebrpcError { - constructor( - name: string = 'ProjectNotFound', - code: number = 3002, - message: string = `Project not found`, - status: number = 0, - cause?: string - ) { - super(name, code, message, status, cause) - Object.setPrototypeOf(this, ProjectNotFoundError.prototype) - } -} - -export class InvalidTierError extends WebrpcError { - constructor( - name: string = 'InvalidTier', - code: number = 3003, - message: string = `Invalid subscription tier`, - status: number = 0, - cause?: string - ) { - super(name, code, message, status, cause) - Object.setPrototypeOf(this, InvalidTierError.prototype) - } -} - -export class ProjectLimitReachedError extends WebrpcError { - constructor( - name: string = 'ProjectLimitReached', - code: number = 3005, - message: string = `Project limit reached`, - status: number = 0, - cause?: string - ) { - super(name, code, message, status, cause) - Object.setPrototypeOf(this, ProjectLimitReachedError.prototype) - } -} - -export class NotImplementedError extends WebrpcError { - constructor( - name: string = 'NotImplemented', - code: number = 9999, - message: string = `Not Implemented`, - status: number = 0, - cause?: string - ) { - super(name, code, message, status, cause) - Object.setPrototypeOf(this, NotImplementedError.prototype) - } -} - -export enum errors { - WebrpcEndpoint = 'WebrpcEndpoint', - WebrpcRequestFailed = 'WebrpcRequestFailed', - WebrpcBadRoute = 'WebrpcBadRoute', - WebrpcBadMethod = 'WebrpcBadMethod', - WebrpcBadRequest = 'WebrpcBadRequest', - WebrpcBadResponse = 'WebrpcBadResponse', - WebrpcServerPanic = 'WebrpcServerPanic', - WebrpcInternalError = 'WebrpcInternalError', - WebrpcClientDisconnected = 'WebrpcClientDisconnected', - WebrpcStreamLost = 'WebrpcStreamLost', - WebrpcStreamFinished = 'WebrpcStreamFinished', - Unauthorized = 'Unauthorized', - PermissionDenied = 'PermissionDenied', - SessionExpired = 'SessionExpired', - MethodNotFound = 'MethodNotFound', - Timeout = 'Timeout', - InvalidArgument = 'InvalidArgument', - NotFound = 'NotFound', - UserNotFound = 'UserNotFound', - ProjectNotFound = 'ProjectNotFound', - InvalidTier = 'InvalidTier', - ProjectLimitReached = 'ProjectLimitReached', - NotImplemented = 'NotImplemented' -} - -export enum WebrpcErrorCodes { - WebrpcEndpoint = 0, - WebrpcRequestFailed = -1, - WebrpcBadRoute = -2, - WebrpcBadMethod = -3, - WebrpcBadRequest = -4, - WebrpcBadResponse = -5, - WebrpcServerPanic = -6, - WebrpcInternalError = -7, - WebrpcClientDisconnected = -8, - WebrpcStreamLost = -9, - WebrpcStreamFinished = -10, - Unauthorized = 1000, - PermissionDenied = 1001, - SessionExpired = 1002, - MethodNotFound = 1003, - Timeout = 2000, - InvalidArgument = 2001, - NotFound = 3000, - UserNotFound = 3001, - ProjectNotFound = 3002, - InvalidTier = 3003, - ProjectLimitReached = 3005, - NotImplemented = 9999 -} - -export const webrpcErrorByCode: { [code: number]: any } = { - [0]: WebrpcEndpointError, - [-1]: WebrpcRequestFailedError, - [-2]: WebrpcBadRouteError, - [-3]: WebrpcBadMethodError, - [-4]: WebrpcBadRequestError, - [-5]: WebrpcBadResponseError, - [-6]: WebrpcServerPanicError, - [-7]: WebrpcInternalErrorError, - [-8]: WebrpcClientDisconnectedError, - [-9]: WebrpcStreamLostError, - [-10]: WebrpcStreamFinishedError, - [1000]: UnauthorizedError, - [1001]: PermissionDeniedError, - [1002]: SessionExpiredError, - [1003]: MethodNotFoundError, - [2000]: TimeoutError, - [2001]: InvalidArgumentError, - [3000]: NotFoundError, - [3001]: UserNotFoundError, - [3002]: ProjectNotFoundError, - [3003]: InvalidTierError, - [3005]: ProjectLimitReachedError, - [9999]: NotImplementedError -} - -export type Fetch = (input: RequestInfo, init?: RequestInit) => Promise diff --git a/old/packages/metadata/CHANGELOG.md b/old/packages/metadata/CHANGELOG.md deleted file mode 100644 index b51ee450c..000000000 --- a/old/packages/metadata/CHANGELOG.md +++ /dev/null @@ -1,1789 +0,0 @@ -# @0xsequence/metadata - -## 2.3.8 - -### Patch Changes - -- indexer: update clients - -## 2.3.7 - -### Patch Changes - -- Metadata updates - -## 2.3.6 - -### Patch Changes - -- New chains - -## 2.3.5 - -### Patch Changes - -- Add Frequency Testnet - -## 2.3.4 - -### Patch Changes - -- metadata: exclude deprecated methods on rpc client - -## 2.3.3 - -### Patch Changes - -- metadata: client update - -## 2.3.2 - -### Patch Changes - -- metadata: update rpc client - -## 2.3.1 - -### Patch Changes - -- indexer: update rpc client - -## 2.3.0 - -### Minor Changes - -- update metadata rpc client - -## 2.2.15 - -### Patch Changes - -- API updates - -## 2.2.14 - -### Patch Changes - -- Somnia Testnet and Monad Testnet - -## 2.2.13 - -### Patch Changes - -- Add XR1 to all networks - -## 2.2.12 - -### Patch Changes - -- Add XR1 - -## 2.2.11 - -### Patch Changes - -- Relayer updates - -## 2.2.10 - -### Patch Changes - -- Etherlink support - -## 2.2.9 - -### Patch Changes - -- Indexer gateway native token balances - -## 2.2.8 - -### Patch Changes - -- Add Moonbeam and Moonbase Alpha - -## 2.2.7 - -### Patch Changes - -- Update Builder package - -## 2.2.6 - -### Patch Changes - -- Update relayer package - -## 2.2.5 - -### Patch Changes - -- auth: fix sequence indexer gateway url -- account: immutable wallet proxy hook - -## 2.2.4 - -### Patch Changes - -- network: update soneium mainnet block explorer url -- waas: signTypedData intent support - -## 2.2.3 - -### Patch Changes - -- provider: updating initWallet to use connected network configs if they exist - -## 2.2.2 - -### Patch Changes - -- pass projectAccessKey to relayer at all times - -## 2.2.1 - -### Patch Changes - -- waas-ethers: sign typed data - -## 2.2.0 - -### Minor Changes - -- indexer: gateway client -- @0xsequence/builder -- upgrade puppeteer to v23.10.3 - -## 2.1.8 - -### Patch Changes - -- Add Soneium Mainnet - -## 2.1.7 - -### Patch Changes - -- guard: pass project access key to guard requests - -## 2.1.6 - -### Patch Changes - -- Add LAOS and Telos Testnet chains - -## 2.1.5 - -### Patch Changes - -- account: save presigned configuration with reference chain id 1 - -## 2.1.4 - -### Patch Changes - -- provider: pass projectAccessKey into MuxMessageProvider - -## 2.1.3 - -### Patch Changes - -- waas: time drift date fix due to strange browser quirk - -## 2.1.2 - -### Patch Changes - -- provider: export analytics correctly - -## 2.1.1 - -### Patch Changes - -- Add LAOS chain support - -## 2.1.0 - -### Minor Changes - -- account: forward project access key when estimating fees and sending transactions - -### Patch Changes - -- sessions: save signatures with reference chain id - -## 2.0.26 - -### Patch Changes - -- account: fix chain id comparison - -## 2.0.25 - -### Patch Changes - -- skale-nebula: deploy gas limit = 10m - -## 2.0.24 - -### Patch Changes - -- sessions: arweave: configurable gateway url -- waas: use /status to get time drift before sending any intents - -## 2.0.23 - -### Patch Changes - -- Add The Root Network support - -## 2.0.22 - -### Patch Changes - -- Add SKALE Nebula Mainnet support - -## 2.0.21 - -### Patch Changes - -- account: add publishWitnessFor - -## 2.0.20 - -### Patch Changes - -- upgrade deps, and improve waas session status handling - -## 2.0.19 - -### Patch Changes - -- Add Immutable zkEVM support - -## 2.0.18 - -### Patch Changes - -- waas: new contractCall transaction type -- sessions: add arweave owner - -## 2.0.17 - -### Patch Changes - -- update waas auth to clear session before signIn - -## 2.0.16 - -### Patch Changes - -- Removed Astar chains - -## 2.0.15 - -### Patch Changes - -- indexer: update bindings with token balance additions - -## 2.0.14 - -### Patch Changes - -- sessions: arweave config reader -- network: add b3 and apechain mainnet configs - -## 2.0.13 - -### Patch Changes - -- network: toy-testnet - -## 2.0.12 - -### Patch Changes - -- api: update bindings - -## 2.0.11 - -### Patch Changes - -- waas: intents test fix -- api: update bindings - -## 2.0.10 - -### Patch Changes - -- network: soneium minato testnet - -## 2.0.9 - -### Patch Changes - -- network: fix SKALE network name - -## 2.0.8 - -### Patch Changes - -- metadata: update bindings - -## 2.0.7 - -### Patch Changes - -- wallet request handler fix - -## 2.0.6 - -### Patch Changes - -- network: matic -> pol - -## 2.0.5 - -### Patch Changes - -- provider: update databeat to 0.9.2 - -## 2.0.4 - -### Patch Changes - -- network: add skale-nebula-testnet - -## 2.0.3 - -### Patch Changes - -- waas: check session status in SequenceWaaS.isSignedIn() - -## 2.0.2 - -### Patch Changes - -- sessions: property convert serialized bignumber hex value to bigint - -## 2.0.1 - -### Patch Changes - -- waas: http signature check for authenticator requests -- provider: unwrap legacy json rpc responses -- use json replacer and reviver for bigints - -## 2.0.0 - -### Major Changes - -- ethers v6 - -## 1.10.15 - -### Patch Changes - -- utils: extractProjectIdFromAccessKey - -## 1.10.14 - -### Patch Changes - -- network: add borne-testnet to allNetworks - -## 1.10.13 - -### Patch Changes - -- network: add borne testnet - -## 1.10.12 - -### Patch Changes - -- api: update bindings -- global/window -> globalThis - -## 1.10.11 - -### Patch Changes - -- waas: updated intent.gen without webrpc types, errors exported from authenticator.gen - -## 1.10.10 - -### Patch Changes - -- metadata: update bindings with new contract collections api - -## 1.10.9 - -### Patch Changes - -- waas minor update - -## 1.10.8 - -### Patch Changes - -- update metadata bindings - -## 1.10.7 - -### Patch Changes - -- minor fixes to waas client - -## 1.10.6 - -### Patch Changes - -- metadata: update bindings - -## 1.10.5 - -### Patch Changes - -- network: ape-chain-testnet -> apechain-testnet - -## 1.10.4 - -### Patch Changes - -- network: add b3-sepolia, ape-chain-testnet, blast, blast-sepolia - -## 1.10.3 - -### Patch Changes - -- typing fix - -## 1.10.2 - -### Patch Changes - -- - waas: add getIdToken method - - indexer: update api client - -## 1.10.1 - -### Patch Changes - -- metadata: update bindings - -## 1.10.0 - -### Minor Changes - -- waas release v1.3.0 - -## 1.9.37 - -### Patch Changes - -- network: adds nativeToken data to NetworkMetadata constants - -## 1.9.36 - -### Patch Changes - -- guard: export client - -## 1.9.35 - -### Patch Changes - -- guard: update bindings - -## 1.9.34 - -### Patch Changes - -- waas: always use lowercase email - -## 1.9.33 - -### Patch Changes - -- waas: umd build - -## 1.9.32 - -### Patch Changes - -- indexer: update bindings - -## 1.9.31 - -### Patch Changes - -- metadata: token directory changes - -## 1.9.30 - -### Patch Changes - -- update - -## 1.9.29 - -### Patch Changes - -- disable gnosis chain - -## 1.9.28 - -### Patch Changes - -- add utils/merkletree - -## 1.9.27 - -### Patch Changes - -- network: optimistic -> optimism -- waas: remove defaults -- api, sessions: update bindings - -## 1.9.26 - -### Patch Changes - -- - add backend interfaces for pluggable interfaces - - introduce @0xsequence/react-native - - update pnpm to lockfile v9 - -## 1.9.25 - -### Patch Changes - -- update webrpc clients with new error types - -## 1.9.24 - -### Patch Changes - -- waas: add memoryStore backend to localStore - -## 1.9.23 - -### Patch Changes - -- update api client bindings - -## 1.9.22 - -### Patch Changes - -- update metadata client bindings - -## 1.9.21 - -### Patch Changes - -- api client bindings - -## 1.9.20 - -### Patch Changes - -- api client bindings update - -## 1.9.19 - -### Patch Changes - -- waas update - -## 1.9.18 - -### Patch Changes - -- provider: prohibit dangerous functions - -## 1.9.17 - -### Patch Changes - -- network: add xr-sepolia - -## 1.9.16 - -### Patch Changes - -- waas: sequence.feeOptions - -## 1.9.15 - -### Patch Changes - -- metadata: collection external_link field name fix - -## 1.9.14 - -### Patch Changes - -- network: astar-zkatana -> astar-zkyoto -- network: deprecate polygon mumbai network -- network: add xai and polygon amoy - -## 1.9.13 - -### Patch Changes - -- waas: fix @0xsequence/network dependency - -## 1.9.12 - -### Patch Changes - -- indexer: update rpc bindings -- provider: signMessage: Serialize the BytesLike or string message into hexstring before sending -- waas: SessionAuthProof - -## 1.9.11 - -### Patch Changes - -- metdata, update rpc bindings - -## 1.9.10 - -### Patch Changes - -- update metadata rpc bindings - -## 1.9.9 - -### Patch Changes - -- metadata, add SequenceCollections rpc client - -## 1.9.8 - -### Patch Changes - -- waas client update - -## 1.9.7 - -### Patch Changes - -- update rpc client bindings for api, metadata and relayer - -## 1.9.6 - -### Patch Changes - -- waas package update - -## 1.9.5 - -### Patch Changes - -- RpcRelayer prioritize project access key - -## 1.9.4 - -### Patch Changes - -- waas: fix network dependency - -## 1.9.3 - -### Patch Changes - -- provider: don't append access key to RPC url if user has already provided it - -## 1.9.2 - -### Patch Changes - -- network: add xai-sepolia - -## 1.9.1 - -### Patch Changes - -- analytics fix - -## 1.9.0 - -### Minor Changes - -- waas release - -## 1.8.8 - -### Patch Changes - -- update metadata bindings - -## 1.8.7 - -### Patch Changes - -- provider: update databeat to 0.9.1 - -## 1.8.6 - -### Patch Changes - -- guard: SignedOwnershipProof - -## 1.8.5 - -### Patch Changes - -- guard: signOwnershipProof and isSignedOwnershipProof - -## 1.8.4 - -### Patch Changes - -- network: add homeverse to networks list - -## 1.8.3 - -### Patch Changes - -- api: introduce basic linked wallet support - -## 1.8.2 - -### Patch Changes - -- provider: don't initialize analytics unless explicitly requested - -## 1.8.1 - -### Patch Changes - -- update to analytics provider - -## 1.8.0 - -### Minor Changes - -- provider: project analytics - -## 1.7.2 - -### Patch Changes - -- 0xsequence: ChainId should not be exported as a type -- account, wallet: fix nonce selection - -## 1.7.1 - -### Patch Changes - -- network: add missing avalanche logoURI - -## 1.7.0 - -### Minor Changes - -- provider: projectAccessKey is now required - -### Patch Changes - -- network: add NetworkMetadata.logoURI property for all networks - -## 1.6.3 - -### Patch Changes - -- network list update - -## 1.6.2 - -### Patch Changes - -- auth: projectAccessKey option -- wallet: use 12 bytes for random space - -## 1.6.1 - -### Patch Changes - -- core: add simple config from subdigest support -- core: fix encode tree with subdigest -- account: implement buildOnChainSignature on Account - -## 1.6.0 - -### Minor Changes - -- account, wallet: parallel transactions by default - -### Patch Changes - -- provider: emit disconnect on sign out - -## 1.5.0 - -### Minor Changes - -- signhub: add 'signing' signer status - -### Patch Changes - -- auth: Session.open: onAccountAddress callback -- account: allow empty transaction bundles - -## 1.4.9 - -### Patch Changes - -- rename SequenceMetadataClient to SequenceMetadata - -## 1.4.8 - -### Patch Changes - -- account: Account.getSigners - -## 1.4.7 - -### Patch Changes - -- update indexer client bindings - -## 1.4.6 - -### Patch Changes - -- - add sepolia networks, mark goerli as deprecated - - update indexer client bindings - -## 1.4.5 - -### Patch Changes - -- indexer/metadata: update client bindings -- auth: selectWallet with new address - -## 1.4.4 - -### Patch Changes - -- indexer: update bindings -- auth: handle jwt expiry - -## 1.4.3 - -### Patch Changes - -- guard: return active status from GuardSigner.getAuthMethods - -## 1.4.2 - -### Patch Changes - -- guard: update bindings - -## 1.4.1 - -### Patch Changes - -- network: remove unused networks -- signhub: orchestrator interface -- guard: auth methods interface -- guard: update bindings for pin and totp -- guard: no more retry logic - -## 1.4.0 - -### Minor Changes - -- project access key support - -## 1.3.0 - -### Minor Changes - -- signhub: account children - -### Patch Changes - -- guard: do not throw when building deploy transaction -- network: snowtrace.io -> subnets.avax.network/c-chain - -## 1.2.9 - -### Patch Changes - -- account: AccountSigner.sendTransaction simulateForFeeOptions -- relayer: update bindings - -## 1.2.8 - -### Patch Changes - -- rename X-Sequence-Token-Key header to X-Access-Key - -## 1.2.7 - -### Patch Changes - -- add x-sequence-token-key to clients - -## 1.2.6 - -### Patch Changes - -- Fix bind multicall provider - -## 1.2.5 - -### Patch Changes - -- Multicall default configuration fixes - -## 1.2.4 - -### Patch Changes - -- provider: Adding missing payment provider types to PaymentProviderOption -- provider: WalletRequestHandler.notifyChainChanged - -## 1.2.3 - -### Patch Changes - -- auth, provider: connect to accept optional authorizeNonce - -## 1.2.2 - -### Patch Changes - -- provider: allow createContract calls -- core: check for explicit zero address in contract deployments - -## 1.2.1 - -### Patch Changes - -- auth: use sequence api chain id as reference chain id if available - -## 1.2.0 - -### Minor Changes - -- split services from session, better local support - -## 1.1.15 - -### Patch Changes - -- guard: remove error filtering - -## 1.1.14 - -### Patch Changes - -- guard: add GuardSigner.onError - -## 1.1.13 - -### Patch Changes - -- provider: pass client version with connect options -- provider: removing large from BannerSize - -## 1.1.12 - -### Patch Changes - -- provider: adding bannerSize to ConnectOptions - -## 1.1.11 - -### Patch Changes - -- add homeverse configs - -## 1.1.10 - -### Patch Changes - -- handle default EIP6492 on send - -## 1.1.9 - -### Patch Changes - -- Custom default EIP6492 on client - -## 1.1.8 - -### Patch Changes - -- metadata: searchMetadata: add types filter - -## 1.1.7 - -### Patch Changes - -- adding signInWith connect settings option to allow dapps to automatically login their users with a certain provider optimizing the normal authentication flow - -## 1.1.6 - -### Patch Changes - -- metadata: searchMetadata: add chainID and excludeTokenMetadata filters - -## 1.1.5 - -### Patch Changes - -- account: re-compute meta-transaction id for wallet deployment transactions - -## 1.1.4 - -### Patch Changes - -- network: rename base-mainnet to base -- provider: override isDefaultChain with ConnectOptions.networkId if provided - -## 1.1.3 - -### Patch Changes - -- provider: use network id from transport session -- provider: sign authorization using ConnectOptions.networkId if provided - -## 1.1.2 - -### Patch Changes - -- provider: jsonrpc chain id fixes - -## 1.1.1 - -### Patch Changes - -- network: add base mainnet and sepolia -- provider: reject toxic transaction requests - -## 1.1.0 - -### Minor Changes - -- Refactor dapp facing provider - -## 1.0.5 - -### Patch Changes - -- network: export network constants -- guard: use the correct global for fetch -- network: nova-explorer.arbitrum.io -> nova.arbiscan.io - -## 1.0.4 - -### Patch Changes - -- provider: accept name or number for networkId - -## 1.0.3 - -### Patch Changes - -- Simpler isValidSignature helpers - -## 1.0.2 - -### Patch Changes - -- add extra signature validation utils methods - -## 1.0.1 - -### Patch Changes - -- add homeverse testnet - -## 1.0.0 - -### Major Changes - -- https://sequence.xyz/blog/sequence-wallet-light-state-sync-full-merkle-wallets - -## 0.43.34 - -### Patch Changes - -- auth: no jwt for indexer - -## 0.43.33 - -### Patch Changes - -- Adding onConnectOptionsChange handler to WalletRequestHandler - -## 0.43.32 - -### Patch Changes - -- add Base Goerli network - -## 0.43.31 - -### Patch Changes - -- remove AuxDataProvider, add promptSignInConnect - -## 0.43.30 - -### Patch Changes - -- add arbitrum goerli testnet - -## 0.43.29 - -### Patch Changes - -- provider: check availability of window object - -## 0.43.28 - -### Patch Changes - -- update api bindings - -## 0.43.27 - -### Patch Changes - -- Add rpc is sequence method - -## 0.43.26 - -### Patch Changes - -- add zkevm url to enum - -## 0.43.25 - -### Patch Changes - -- added polygon zkevm to mainnet networks - -## 0.43.24 - -### Patch Changes - -- name change from zkevm to polygon-zkevm - -## 0.43.23 - -### Patch Changes - -- update zkEVM name to Polygon zkEVM - -## 0.43.22 - -### Patch Changes - -- add zkevm chain - -## 0.43.21 - -### Patch Changes - -- api: update client bindings - -## 0.43.20 - -### Patch Changes - -- indexer: update bindings - -## 0.43.19 - -### Patch Changes - -- session proof update - -## 0.43.18 - -### Patch Changes - -- rpc client global check, hardening - -## 0.43.17 - -### Patch Changes - -- rpc clients, check of 'global' is defined - -## 0.43.16 - -### Patch Changes - -- ethers peerDep to v5, update rpc client global use - -## 0.43.15 - -### Patch Changes - -- - provider: expand receiver type on some util methods - -## 0.43.14 - -### Patch Changes - -- bump - -## 0.43.13 - -### Patch Changes - -- update rpc bindings - -## 0.43.12 - -### Patch Changes - -- provider: single wallet init, and add new unregisterWallet() method - -## 0.43.11 - -### Patch Changes - -- fix lockfiles -- re-add mocha type deleter - -## 0.43.10 - -### Patch Changes - -- various improvements - -## 0.43.9 - -### Patch Changes - -- update deps - -## 0.43.8 - -### Patch Changes - -- network: JsonRpcProvider with caching - -## 0.43.7 - -### Patch Changes - -- provider: fix wallet network init - -## 0.43.6 - -### Patch Changes - -- metadatata: update rpc bindings - -## 0.43.5 - -### Patch Changes - -- provider: do not set default network for connect messages -- provider: forward missing error message - -## 0.43.4 - -### Patch Changes - -- no-change version bump to fix incorrectly tagged snapshot build - -## 0.43.3 - -### Patch Changes - -- metadata: update bindings - -## 0.43.2 - -### Patch Changes - -- provider: implement connectUnchecked - -## 0.43.1 - -### Patch Changes - -- update to latest ethauth dep - -## 0.43.0 - -### Minor Changes - -- move ethers to a peer dependency - -## 0.42.10 - -### Patch Changes - -- add auxDataProvider - -## 0.42.9 - -### Patch Changes - -- provider: add eip-191 exceptions - -## 0.42.8 - -### Patch Changes - -- provider: skip setting intent origin if we're unity plugin - -## 0.42.7 - -### Patch Changes - -- Add sign in options to connection settings - -## 0.42.6 - -### Patch Changes - -- api bindings update - -## 0.42.5 - -### Patch Changes - -- relayer: don't treat missing receipt as hard failure - -## 0.42.4 - -### Patch Changes - -- provider: add custom app protocol to connect options - -## 0.42.3 - -### Patch Changes - -- update api bindings - -## 0.42.2 - -### Patch Changes - -- disable rinkeby network - -## 0.42.1 - -### Patch Changes - -- wallet: optional waitForReceipt parameter - -## 0.42.0 - -### Minor Changes - -- relayer: estimateGasLimits -> simulate -- add simulator package - -### Patch Changes - -- transactions: fix flattenAuxTransactions -- provider: only filter nullish values -- provider: re-map transaction 'gas' back to 'gasLimit' - -## 0.41.3 - -### Patch Changes - -- api bindings update - -## 0.41.2 - -### Patch Changes - -- api bindings update - -## 0.41.1 - -### Patch Changes - -- update default networks - -## 0.41.0 - -### Minor Changes - -- relayer: fix Relayer.wait() interface - - The interface for calling Relayer.wait() has changed. Instead of a single optional ill-defined timeout/delay parameter, there are three optional parameters, in order: - - - timeout: the maximum time to wait for the transaction receipt - - delay: the polling interval, i.e. the time to wait between requests - - maxFails: the maximum number of hard failures to tolerate before giving up - - Please update your codebase accordingly. - -- relayer: add optional waitForReceipt parameter to Relayer.relay - - The behaviour of Relayer.relay() was not well-defined with respect to whether or not it waited for a receipt. - This change allows the caller to specify whether to wait or not, with the default behaviour being to wait. - -### Patch Changes - -- relayer: wait receipt retry logic -- fix wrapped object error -- provider: forward delegateCall and revertOnError transaction fields - -## 0.40.6 - -### Patch Changes - -- add arbitrum-nova chain - -## 0.40.5 - -### Patch Changes - -- api: update bindings - -## 0.40.4 - -### Patch Changes - -- add unreal transport - -## 0.40.3 - -### Patch Changes - -- provider: fix MessageToSign message type - -## 0.40.2 - -### Patch Changes - -- Wallet provider, loadSession method - -## 0.40.1 - -### Patch Changes - -- export sequence.initWallet and sequence.getWallet - -## 0.40.0 - -### Minor Changes - -- add sequence.initWallet(network, config) and sequence.getWallet() helper methods - -## 0.39.6 - -### Patch Changes - -- indexer: update client bindings - -## 0.39.5 - -### Patch Changes - -- provider: fix networkRpcUrl config option - -## 0.39.4 - -### Patch Changes - -- api: update client bindings - -## 0.39.3 - -### Patch Changes - -- add request method on Web3Provider - -## 0.39.2 - -### Patch Changes - -- update umd name - -## 0.39.1 - -### Patch Changes - -- add Aurora network -- add origin info for accountsChanged event to handle it per dapp - -## 0.39.0 - -### Minor Changes - -- abstract window.localStorage to interface type - -## 0.38.2 - -### Patch Changes - -- provider: add Settings.defaultPurchaseAmount - -## 0.38.1 - -### Patch Changes - -- update api and metadata rpc bindings - -## 0.38.0 - -### Minor Changes - -- api: update bindings, change TokenPrice interface -- bridge: remove @0xsequence/bridge package -- api: update bindings, rename ContractCallArg to TupleComponent - -## 0.37.1 - -### Patch Changes - -- Add back sortNetworks - Removing sorting was a breaking change for dapps on older versions which directly integrate sequence. - -## 0.37.0 - -### Minor Changes - -- network related fixes and improvements -- api: bindings: exchange rate lookups - -## 0.36.13 - -### Patch Changes - -- api: update bindings with new price endpoints - -## 0.36.12 - -### Patch Changes - -- wallet: skip remote signers if not needed -- auth: check that signature meets threshold before requesting auth token - -## 0.36.11 - -### Patch Changes - -- Prefix EIP191 message on wallet-request-handler - -## 0.36.10 - -### Patch Changes - -- support bannerUrl on connect - -## 0.36.9 - -### Patch Changes - -- minor dev xp improvements - -## 0.36.8 - -### Patch Changes - -- more connect options (theme, payment providers, funding currencies) - -## 0.36.7 - -### Patch Changes - -- fix missing break - -## 0.36.6 - -### Patch Changes - -- wallet_switchEthereumChain support - -## 0.36.5 - -### Patch Changes - -- auth: bump ethauth to 0.7.0 - network, wallet: don't assume position of auth network in list - api/indexer/metadata: trim trailing slash on hostname, and add endpoint urls - relayer: Allow to specify local relayer transaction parameters like gas price or gas limit - -## 0.36.4 - -### Patch Changes - -- Updating list of chain ids to include other ethereum compatible chains - -## 0.36.3 - -### Patch Changes - -- provider: pass connect options to prompter methods - -## 0.36.2 - -### Patch Changes - -- transactions: Setting target to 0x0 when empty to during SequenceTxAbiEncode - -## 0.36.1 - -### Patch Changes - -- metadata: update client with more fields - -## 0.36.0 - -### Minor Changes - -- relayer, wallet: fee quote support - -## 0.35.12 - -### Patch Changes - -- provider: rename wallet.commands to wallet.utils - -## 0.35.11 - -### Patch Changes - -- provider/utils: smoother message validation - -## 0.35.10 - -### Patch Changes - -- upgrade deps - -## 0.35.9 - -### Patch Changes - -- provider: window-transport override event handlers with new wallet instance - -## 0.35.8 - -### Patch Changes - -- provider: async wallet sign in improvements - -## 0.35.7 - -### Patch Changes - -- config: cache wallet configs - -## 0.35.6 - -### Patch Changes - -- provider: support async signin of wallet request handler - -## 0.35.5 - -### Patch Changes - -- wallet: skip threshold check during fee estimation - -## 0.35.4 - -### Patch Changes - -- - browser extension mode, center window - -## 0.35.3 - -### Patch Changes - -- - update window position when in browser extension mode - -## 0.35.2 - -### Patch Changes - -- - provider: WindowMessageHandler accept optional windowHref - -## 0.35.1 - -### Patch Changes - -- wallet: update config on undeployed too - -## 0.35.0 - -### Minor Changes - -- - config: add buildStubSignature - - provider: add checks to signing cases for wallet deployment and config statuses - - provider: add prompt for wallet deployment - - relayer: add BaseRelayer.prependWalletDeploy - - relayer: add Relayer.feeOptions - - relayer: account for wallet deployment in fee estimation - - transactions: add fromTransactionish - - wallet: add Account.prependConfigUpdate - - wallet: add Account.getFeeOptions - -## 0.34.0 - -### Minor Changes - -- - upgrade deps - -## 0.31.3 - -### Patch Changes - -- update metadata bindings - -## 0.31.0 - -### Minor Changes - -- - upgrading to ethers v5.5 - -## 0.30.0 - -### Minor Changes - -- - upgrade most deps - -## 0.29.8 - -### Patch Changes - -- update api - -## 0.29.1 - -### Patch Changes - -- metadata: ContractInfo.decimals is now optional, i.e. may be undefined - - api: new APIs for user storage and isUsingGoogleMail - -## 0.29.0 - -### Minor Changes - -- major architectural changes in Sequence design - - - only one API instance, API is no longer a per-chain service - - separate per-chain indexer service, API no longer handles indexing - - single contract metadata service, API no longer serves metadata - - chaind package has been removed, indexer and metadata packages have been added - - stronger typing with new explicit ChainId type - - multicall fixes and improvements - - forbid "wait" transactions in sendTransactionBatch calls diff --git a/old/packages/metadata/README.md b/old/packages/metadata/README.md deleted file mode 100644 index 9939fb8b1..000000000 --- a/old/packages/metadata/README.md +++ /dev/null @@ -1,4 +0,0 @@ -@0xsequence/metadata -==================== - -See [0xsequence project page](https://github.com/0xsequence/sequence.js). diff --git a/old/packages/metadata/package.json b/old/packages/metadata/package.json deleted file mode 100644 index 243358c97..000000000 --- a/old/packages/metadata/package.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "name": "@0xsequence/metadata", - "version": "2.3.8", - "description": "metadata sub-package for Sequence", - "repository": "https://github.com/0xsequence/sequence.js/tree/master/packages/metadata", - "source": "src/index.ts", - "main": "dist/0xsequence-metadata.cjs.js", - "module": "dist/0xsequence-metadata.esm.js", - "author": "Horizon Blockchain Games", - "license": "Apache-2.0", - "scripts": { - "test": "echo", - "typecheck": "tsc --noEmit" - }, - "dependencies": {}, - "peerDependencies": {}, - "devDependencies": {}, - "files": [ - "src", - "dist" - ] -} diff --git a/old/packages/metadata/src/index.ts b/old/packages/metadata/src/index.ts deleted file mode 100644 index ab01360cd..000000000 --- a/old/packages/metadata/src/index.ts +++ /dev/null @@ -1,66 +0,0 @@ -export * from './metadata.gen' - -import { Metadata as MetadataRpc, Collections as CollectionsRpc } from './metadata.gen' - -export class SequenceMetadata extends MetadataRpc { - constructor( - hostname: string = 'https://metadata.sequence.app', - public projectAccessKey?: string, - public jwtAuth?: string - ) { - super(hostname.endsWith('/') ? hostname.slice(0, -1) : hostname, fetch) - this.fetch = this._fetch - } - - _fetch = (input: RequestInfo, init?: RequestInit): Promise => { - // automatically include jwt and access key auth header to requests - // if its been set on the client - const headers: { [key: string]: any } = {} - - const jwtAuth = this.jwtAuth - const projectAccessKey = this.projectAccessKey - - if (jwtAuth && jwtAuth.length > 0) { - headers['Authorization'] = `BEARER ${jwtAuth}` - } - - if (projectAccessKey && projectAccessKey.length > 0) { - headers['X-Access-Key'] = projectAccessKey - } - - // before the request is made - init!.headers = { ...init!.headers, ...headers } - - return fetch(input, init) - } -} - -export class SequenceCollections extends CollectionsRpc { - constructor( - hostname: string = 'https://metadata.sequence.app', - public jwtAuth?: string - ) { - super(hostname.endsWith('/') ? hostname.slice(0, -1) : hostname, fetch) - this.fetch = this._fetch - } - - _fetch = (input: RequestInfo, init?: RequestInit): Promise => { - // automatically include jwt auth header to requests - // if its been set on the client - const headers: { [key: string]: any } = {} - - const jwtAuth = this.jwtAuth - - if (jwtAuth && jwtAuth.length > 0) { - headers['Authorization'] = `BEARER ${jwtAuth}` - } - - // before the request is made - init!.headers = { ...init!.headers, ...headers } - - return fetch(input, init) - } - - // TODO: add uploadAsset() method similar to, - // https://github.com/0xsequence/go-sequence/blob/master/metadata/collections.go#L52 -} diff --git a/old/packages/metadata/src/metadata.gen.ts b/old/packages/metadata/src/metadata.gen.ts deleted file mode 100644 index 479d59888..000000000 --- a/old/packages/metadata/src/metadata.gen.ts +++ /dev/null @@ -1,2758 +0,0 @@ -/* eslint-disable */ -// sequence-metadata v0.4.0 5cb74ff169ce80c2e42e65d6bbc98b1daaa0945f -// -- -// Code generated by webrpc-gen@v0.25.3 with typescript generator. DO NOT EDIT. -// -// webrpc-gen -schema=metadata.ridl -target=typescript -client -ignore=@deprecated -out=./clients/metadata.gen.ts - -export const WebrpcHeader = 'Webrpc' - -export const WebrpcHeaderValue = 'webrpc@v0.25.3;gen-typescript@v0.17.0;sequence-metadata@v0.4.0' - -// WebRPC description and code-gen version -export const WebRPCVersion = 'v1' - -// Schema version of your RIDL schema -export const WebRPCSchemaVersion = 'v0.4.0' - -// Schema hash generated from your RIDL schema -export const WebRPCSchemaHash = '5cb74ff169ce80c2e42e65d6bbc98b1daaa0945f' - -type WebrpcGenVersions = { - webrpcGenVersion: string - codeGenName: string - codeGenVersion: string - schemaName: string - schemaVersion: string -} - -export function VersionFromHeader(headers: Headers): WebrpcGenVersions { - const headerValue = headers.get(WebrpcHeader) - if (!headerValue) { - return { - webrpcGenVersion: '', - codeGenName: '', - codeGenVersion: '', - schemaName: '', - schemaVersion: '' - } - } - - return parseWebrpcGenVersions(headerValue) -} - -function parseWebrpcGenVersions(header: string): WebrpcGenVersions { - const versions = header.split(';') - if (versions.length < 3) { - return { - webrpcGenVersion: '', - codeGenName: '', - codeGenVersion: '', - schemaName: '', - schemaVersion: '' - } - } - - const [_, webrpcGenVersion] = versions[0]!.split('@') - const [codeGenName, codeGenVersion] = versions[1]!.split('@') - const [schemaName, schemaVersion] = versions[2]!.split('@') - - return { - webrpcGenVersion: webrpcGenVersion ?? '', - codeGenName: codeGenName ?? '', - codeGenVersion: codeGenVersion ?? '', - schemaName: schemaName ?? '', - schemaVersion: schemaVersion ?? '' - } -} - -// -// Types -// - -export enum ContractType { - UNKNOWN = 'UNKNOWN', - ERC20 = 'ERC20', - ERC721 = 'ERC721', - ERC1155 = 'ERC1155', - ERC6909 = 'ERC6909', - MISC = 'MISC' -} - -export enum Source { - UNKNOWN = 'UNKNOWN', - FETCHER = 'FETCHER', - FETCHER_OPENSEA_API = 'FETCHER_OPENSEA_API', - FETCHER_ENS_API = 'FETCHER_ENS_API', - FETCHER_ON_CHAIN_ERC20_INTERFACE = 'FETCHER_ON_CHAIN_ERC20_INTERFACE', - FETCHER_ON_CHAIN_TOKEN_URI = 'FETCHER_ON_CHAIN_TOKEN_URI', - FETCHER_ON_CHAIN_CONTRACT_URI = 'FETCHER_ON_CHAIN_CONTRACT_URI', - FETCHER_TOKEN_DIRECTORY_ADMIN = 'FETCHER_TOKEN_DIRECTORY_ADMIN', - TOKEN_DIRECTORY = 'TOKEN_DIRECTORY', - TOKEN_DIRECTORY_PUBLIC_TOKEN_LIST = 'TOKEN_DIRECTORY_PUBLIC_TOKEN_LIST', - TOKEN_DIRECTORY_3RD_PARTY = 'TOKEN_DIRECTORY_3RD_PARTY', - TOKEN_DIRECTORY_SEQUENCE_GITHUB = 'TOKEN_DIRECTORY_SEQUENCE_GITHUB', - TOKEN_DIRECTORY_SEQUENCE_BUILDER = 'TOKEN_DIRECTORY_SEQUENCE_BUILDER', - SEQUENCE_BUILDER = 'SEQUENCE_BUILDER', - SEQUENCE_BUILDER_DEPLOYED = 'SEQUENCE_BUILDER_DEPLOYED', - SEQUENCE_BUILDER_COLLECTIONS = 'SEQUENCE_BUILDER_COLLECTIONS', - SEQUENCE_BUILDER_ADMIN = 'SEQUENCE_BUILDER_ADMIN' -} - -export enum ResourceStatus { - NOT_AVAILABLE = 'NOT_AVAILABLE', - REFRESHING = 'REFRESHING', - AVAILABLE = 'AVAILABLE' -} - -export enum PropertyType { - INT = 'INT', - STRING = 'STRING', - ARRAY = 'ARRAY', - GENERIC = 'GENERIC' -} - -export enum SwapType { - UNKNOWN = 'UNKNOWN', - BUY = 'BUY', - SELL = 'SELL' -} - -export enum TaskStatus { - QUEUED = 'QUEUED', - PAUSED = 'PAUSED', - FAILED = 'FAILED', - DONE = 'DONE' -} - -export interface Version { - webrpcVersion: string - schemaVersion: string - schemaHash: string - appVersion: string -} - -export interface RuntimeStatus { - healthOK: boolean - startTime: string - uptime: number - uptimeString: string - ver: string - branch: string - commitHash: string - runnable: { [key: string]: RunnableStatus } -} - -export interface RunnableStatus { - running: boolean - restarts: number - startTime: string - endTime?: string - lastError: any -} - -export interface ContractIndex { - chainId: number - address: string - type: ContractType - source: Source - metadata: { [key: string]: any } - contentHash: number - deployed: boolean - bytecodeHash: string - notFound: boolean - updatedAt: string - queuedAt?: string - status: ResourceStatus -} - -export interface TokenIndex { - chainId: number - contractAddress: string - tokenId: string - source: Source - metadata: { [key: string]: any } - notFound?: boolean - lastFetched?: string - fetchCount?: number - updatedAt: string - queuedAt?: string -} - -export interface ContractInfo { - chainId: number - address: string - source: string - name: string - type: string - symbol: string - decimals?: number - logoURI: string - deployed: boolean - bytecodeHash: string - extensions: ContractInfoExtensions - updatedAt: string - queuedAt?: string - status: ResourceStatus -} - -export interface ContractInfoExtensions { - link?: string - description?: string - categories?: Array - bridgeInfo?: { [key: string]: ContractInfoExtensionBridgeInfo } - ogImage?: string - ogName?: string - originChainId?: number - originAddress?: string - blacklist?: boolean - verified?: boolean - verifiedBy?: string - featured?: boolean - featureIndex?: number -} - -export interface ContractInfoExtensionBridgeInfo { - tokenAddress: string -} - -export interface ContractInfoOverride { - name?: string - type?: string - symbol?: string - decimals?: number - logoURI?: string - extensions: ContractInfoExtensionsOverride -} - -export interface ContractInfoExtensionsOverride { - link?: string - description?: string - categories?: Array - ogImage?: string - ogName?: string - originChainId?: number - originAddress?: string - blacklist?: boolean - verified?: boolean - verifiedBy?: string - featureIndex?: number -} - -export interface TokenMetadata { - chainId?: number - contractAddress?: string - tokenId: string - source: string - name: string - description?: string - image?: string - video?: string - audio?: string - properties?: { [key: string]: any } - attributes: Array<{ [key: string]: any }> - image_data?: string - external_url?: string - background_color?: string - animation_url?: string - decimals?: number - updatedAt?: string - assets?: Array - status: ResourceStatus - queuedAt?: string - lastFetched?: string -} - -export interface PropertyFilter { - name: string - type: PropertyType - min?: number - max?: number - values?: Array -} - -export interface Filter { - text?: string - properties?: Array -} - -export interface Collection { - id: number - projectId: number - metadata: CollectionMetadata - private: boolean - revealKey?: string - tokenCount?: number - createdAt?: string - updatedAt?: string - deletedAt?: string - baseURIs?: CollectionBaseURIs - assets?: Array -} - -export interface CollectionMetadata { - name: string - description?: string - image?: string - external_link?: string - properties?: { [key: string]: any } - attributes?: Array<{ [key: string]: any }> -} - -export interface CollectionBaseURIs { - contractMetadataURI: string - tokenMetadataURI: string -} - -export interface ContractCollection { - id: number - chainId: number - contractAddress: string - collectionId: number -} - -export interface Asset { - id: number - collectionId: number - tokenId?: string - url?: string - metadataField: string - name?: string - filesize?: number - mimeType?: string - width?: number - height?: number - updatedAt?: string -} - -export interface Token { - collectionId: number - tokenId: string - metadata: TokenMetadata - private: boolean - updatedAt?: string -} - -export interface GetNiftyswapUnitPricesRequest { - swapType: SwapType - ids: Array - amounts: Array -} - -export interface GetNiftyswapUnitPricesResponse { - unitPrice: string - unitAmount: string - availableAmount: string -} - -export interface Page { - page?: number - column?: string - before?: any - after?: any - pageSize?: number - more?: boolean -} - -export interface Task { - id: number - queue: string - status: TaskStatus - try: number - runAt?: string - lastRanAt?: string - createdAt?: string - payload: Array - result: Array -} - -export interface Metadata { - ping(headers?: object, signal?: AbortSignal): Promise - version(headers?: object, signal?: AbortSignal): Promise - runtimeStatus(headers?: object, signal?: AbortSignal): Promise - getTask(args: GetTaskArgs, headers?: object, signal?: AbortSignal): Promise - getTaskStatus(args: GetTaskStatusArgs, headers?: object, signal?: AbortSignal): Promise - /** - * Contract Info -- returns contract meta-info for contracts found in registered chain's token-lists - */ - getContractInfo(args: GetContractInfoArgs, headers?: object, signal?: AbortSignal): Promise - getContractInfoBatch( - args: GetContractInfoBatchArgs, - headers?: object, - signal?: AbortSignal - ): Promise - /** - * Find Contract Info across all chains token-lists. Similar to GetContractInfo above, - * but it will traverse all chains and results from all. - */ - findContractInfo(args: FindContractInfoArgs, headers?: object, signal?: AbortSignal): Promise - /** - * map of contractAddress :: []ContractInfo - */ - findContractInfoBatch( - args: FindContractInfoBatchArgs, - headers?: object, - signal?: AbortSignal - ): Promise - /** - * Refresh Contract Info -- refresh contract meta-info - */ - refreshContractInfo(args: RefreshContractInfoArgs, headers?: object, signal?: AbortSignal): Promise - refreshContractInfoBatch( - args: RefreshContractInfoBatchArgs, - headers?: object, - signal?: AbortSignal - ): Promise - /** - * Search for contract infos using a query string - */ - searchContractsByQuery( - args: SearchContractsByQueryArgs, - headers?: object, - signal?: AbortSignal - ): Promise - /** - * GetTokenMetadata - fetch token metadata for a particular contract and respective tokenIDs - */ - getTokenMetadata(args: GetTokenMetadataArgs, headers?: object, signal?: AbortSignal): Promise - /** - * GetTokenMetadataBatch allows you to query the token metadata of a batch of contracts and respective tokenIDs - * where map is contractAddress::[]tokenID => contractAddress::[]TokenMetadata - * - * Note, we limit each request to 50 contracts max and 50 tokens max per contract. - */ - getTokenMetadataBatch( - args: GetTokenMetadataBatchArgs, - headers?: object, - signal?: AbortSignal - ): Promise - /** - * RefreshTokenMetadata allows you to refresh a contract metadata for contract-level and token-level metadata. - */ - refreshTokenMetadata( - args: RefreshTokenMetadataArgs, - headers?: object, - signal?: AbortSignal - ): Promise - /** - * Search ERC721 & ERC1155 token metadata by query string 'q' - */ - searchTokenMetadataByQuery( - args: SearchTokenMetadataByQueryArgs, - headers?: object, - signal?: AbortSignal - ): Promise - /** - * Search ERC721 & ERC1155 token metadata by filter object 'filter' - * which allows to search by text or properties. - */ - searchTokenMetadata(args: SearchTokenMetadataArgs, headers?: object, signal?: AbortSignal): Promise - /** - * Search ERC721 & ERC1155 for token IDs by filter object 'filter' - * which allows to search by text or properties. - */ - searchTokenMetadataTokenIDs( - args: SearchTokenMetadataTokenIDsArgs, - headers?: object, - signal?: AbortSignal - ): Promise - /** - * Get token metadata property filters for a contract address - */ - getTokenMetadataPropertyFilters( - args: GetTokenMetadataPropertyFiltersArgs, - headers?: object, - signal?: AbortSignal - ): Promise - /** - * Gets Token Directory supported networks - */ - getTokenDirectoryNetworks( - args: GetTokenDirectoryNetworksArgs, - headers?: object, - signal?: AbortSignal - ): Promise - /** - * Gets Token Directory entries - */ - getTokenDirectory(args: GetTokenDirectoryArgs, headers?: object, signal?: AbortSignal): Promise - /** - * Search in Token Directory - */ - searchTokenDirectory( - args: SearchTokenDirectoryArgs, - headers?: object, - signal?: AbortSignal - ): Promise - /** - * Niftyswap querying data - */ - getNiftyswapTokenQuantity( - args: GetNiftyswapTokenQuantityArgs, - headers?: object, - signal?: AbortSignal - ): Promise - /** - * map of tokenID :: quantity - */ - getNiftyswapUnitPrices( - args: GetNiftyswapUnitPricesArgs, - headers?: object, - signal?: AbortSignal - ): Promise - /** - * map of tokenID :: price - */ - getNiftyswapUnitPricesWithQuantities( - args: GetNiftyswapUnitPricesWithQuantitiesArgs, - headers?: object, - signal?: AbortSignal - ): Promise -} - -export interface PingArgs {} - -export interface PingReturn { - status: boolean -} -export interface VersionArgs {} - -export interface VersionReturn { - version: Version -} -export interface RuntimeStatusArgs {} - -export interface RuntimeStatusReturn { - status: RuntimeStatus -} -export interface GetTaskArgs { - taskId: number -} - -export interface GetTaskReturn { - task: Task -} -export interface GetTaskStatusArgs { - taskId: number -} - -export interface GetTaskStatusReturn { - status?: TaskStatus -} -export interface GetContractInfoArgs { - chainID: string - contractAddress: string -} - -export interface GetContractInfoReturn { - contractInfo: ContractInfo - taskID?: number -} -export interface GetContractInfoBatchArgs { - chainID: string - contractAddresses: Array -} - -export interface GetContractInfoBatchReturn { - contractInfoMap: { [key: string]: ContractInfo } - taskID?: number -} -export interface FindContractInfoArgs { - contractAddress: string -} - -export interface FindContractInfoReturn { - contractInfoList: Array -} -export interface FindContractInfoBatchArgs { - contractAddresses: Array -} - -export interface FindContractInfoBatchReturn { - contractInfoByChain: { [key: string]: Array } -} -export interface RefreshContractInfoArgs { - chainID: string - contractAddress: string -} - -export interface RefreshContractInfoReturn { - taskID?: number -} -export interface RefreshContractInfoBatchArgs { - chainID: string - contractAddresses: Array -} - -export interface RefreshContractInfoBatchReturn { - taskID?: number -} -export interface SearchContractsByQueryArgs { - q: string - chainID?: string - chainIDs?: Array - types?: Array - page?: Page -} - -export interface SearchContractsByQueryReturn { - contractInfo: Array - nextPage: Page -} -export interface GetTokenMetadataArgs { - chainID: string - contractAddress: string - tokenIDs: Array -} - -export interface GetTokenMetadataReturn { - tokenMetadata: Array - taskID?: number -} -export interface GetTokenMetadataBatchArgs { - chainID: string - contractTokenMap: { [key: string]: Array } -} - -export interface GetTokenMetadataBatchReturn { - contractTokenMetadata: { [key: string]: Array } - taskID?: number -} -export interface RefreshTokenMetadataArgs { - chainID: string - contractAddress: string - tokenIDs?: Array - refreshAll?: boolean -} - -export interface RefreshTokenMetadataReturn { - taskID: number -} -export interface SearchTokenMetadataByQueryArgs { - q: string - chainID?: string - contractAddress?: string - page?: Page -} - -export interface SearchTokenMetadataByQueryReturn { - tokenMetadata: Array - nextPage: Page -} -export interface SearchTokenMetadataArgs { - chainID: string - contractAddress: string - filter: Filter - page?: Page -} - -export interface SearchTokenMetadataReturn { - page: Page - tokenMetadata: Array -} -export interface SearchTokenMetadataTokenIDsArgs { - chainID: string - contractAddress: string - filter: Filter - page?: Page -} - -export interface SearchTokenMetadataTokenIDsReturn { - page: Page - tokenIDs: Array -} -export interface GetTokenMetadataPropertyFiltersArgs { - chainID: string - contractAddress: string - excludeProperties: Array - excludePropertyValues?: boolean -} - -export interface GetTokenMetadataPropertyFiltersReturn { - filters: Array -} -export interface GetTokenDirectoryNetworksArgs { - includeTestnets?: boolean - onlyFeatured?: boolean -} - -export interface GetTokenDirectoryNetworksReturn { - chainIDs: Array - networks: Array -} -export interface GetTokenDirectoryArgs { - chainID?: string - includeTestnets?: boolean - onlyFeatured?: boolean - page?: Page -} - -export interface GetTokenDirectoryReturn { - contracts: Array - page: Page -} -export interface SearchTokenDirectoryArgs { - query: string - chainID?: number - includeTestnets?: boolean - onlyFeatured?: boolean - page?: Page -} - -export interface SearchTokenDirectoryReturn { - contracts: Array - page: Page -} -export interface GetNiftyswapTokenQuantityArgs { - chainID: string - contractAddress: string - tokenIDs: Array -} - -export interface GetNiftyswapTokenQuantityReturn { - quantity: { [key: string]: string } -} -export interface GetNiftyswapUnitPricesArgs { - chainID: string - contractAddress: string - req: GetNiftyswapUnitPricesRequest - fresh: boolean -} - -export interface GetNiftyswapUnitPricesReturn { - prices: { [key: string]: string } -} -export interface GetNiftyswapUnitPricesWithQuantitiesArgs { - chainID: string - contractAddress: string - req: GetNiftyswapUnitPricesRequest - fresh: boolean -} - -export interface GetNiftyswapUnitPricesWithQuantitiesReturn { - prices: { [key: string]: GetNiftyswapUnitPricesResponse } -} - -export interface Collections { - createCollection(args: CreateCollectionArgs, headers?: object, signal?: AbortSignal): Promise - getCollection(args: GetCollectionArgs, headers?: object, signal?: AbortSignal): Promise - listCollections(args: ListCollectionsArgs, headers?: object, signal?: AbortSignal): Promise - updateCollection(args: UpdateCollectionArgs, headers?: object, signal?: AbortSignal): Promise - deleteCollection(args: DeleteCollectionArgs, headers?: object, signal?: AbortSignal): Promise - publishCollection(args: PublishCollectionArgs, headers?: object, signal?: AbortSignal): Promise - unpublishCollection(args: UnpublishCollectionArgs, headers?: object, signal?: AbortSignal): Promise - createContractCollection( - args: CreateContractCollectionArgs, - headers?: object, - signal?: AbortSignal - ): Promise - getContractCollection( - args: GetContractCollectionArgs, - headers?: object, - signal?: AbortSignal - ): Promise - listContractCollections( - args: ListContractCollectionsArgs, - headers?: object, - signal?: AbortSignal - ): Promise - updateContractCollection( - args: UpdateContractCollectionArgs, - headers?: object, - signal?: AbortSignal - ): Promise - deleteContractCollection( - args: DeleteContractCollectionArgs, - headers?: object, - signal?: AbortSignal - ): Promise - createToken(args: CreateTokenArgs, headers?: object, signal?: AbortSignal): Promise - getToken(args: GetTokenArgs, headers?: object, signal?: AbortSignal): Promise - listTokens(args: ListTokensArgs, headers?: object, signal?: AbortSignal): Promise - updateToken(args: UpdateTokenArgs, headers?: object, signal?: AbortSignal): Promise - deleteToken(args: DeleteTokenArgs, headers?: object, signal?: AbortSignal): Promise - createAsset(args: CreateAssetArgs, headers?: object, signal?: AbortSignal): Promise - getAsset(args: GetAssetArgs, headers?: object, signal?: AbortSignal): Promise - updateAsset(args: UpdateAssetArgs, headers?: object, signal?: AbortSignal): Promise - deleteAsset(args: DeleteAssetArgs, headers?: object, signal?: AbortSignal): Promise -} - -export interface CreateCollectionArgs { - projectId?: number - collection: Collection -} - -export interface CreateCollectionReturn { - collection: Collection -} -export interface GetCollectionArgs { - projectId?: number - collectionId: number -} - -export interface GetCollectionReturn { - collection: Collection -} -export interface ListCollectionsArgs { - projectId?: number - page?: Page -} - -export interface ListCollectionsReturn { - page: Page - collections: Array -} -export interface UpdateCollectionArgs { - projectId?: number - collection: Collection -} - -export interface UpdateCollectionReturn { - collection: Collection -} -export interface DeleteCollectionArgs { - projectId?: number - collectionId: number -} - -export interface DeleteCollectionReturn { - status: boolean -} -export interface PublishCollectionArgs { - projectId?: number - collectionId: number - recursive?: boolean -} - -export interface PublishCollectionReturn { - collection: Collection -} -export interface UnpublishCollectionArgs { - projectId?: number - collectionId: number -} - -export interface UnpublishCollectionReturn { - collection: Collection -} -export interface CreateContractCollectionArgs { - projectId: number - contractCollection: ContractCollection -} - -export interface CreateContractCollectionReturn { - contractCollection: ContractCollection -} -export interface GetContractCollectionArgs { - projectId: number - chainId: number - contractAddress: string -} - -export interface GetContractCollectionReturn { - contractCollection: ContractCollection -} -export interface ListContractCollectionsArgs { - projectId: number - collectionId?: number - page?: Page -} - -export interface ListContractCollectionsReturn { - contractCollections: Array - collections: Array - page: Page -} -export interface UpdateContractCollectionArgs { - projectId: number - contractCollection: ContractCollection -} - -export interface UpdateContractCollectionReturn { - ok: boolean -} -export interface DeleteContractCollectionArgs { - projectId: number - chainId: number - contractAddress: string -} - -export interface DeleteContractCollectionReturn { - ok: boolean -} -export interface CreateTokenArgs { - projectId?: number - collectionId: number - token: TokenMetadata - private?: boolean -} - -export interface CreateTokenReturn { - token: TokenMetadata - assets: Array -} -export interface GetTokenArgs { - projectId?: number - collectionId: number - tokenId: string -} - -export interface GetTokenReturn { - token: TokenMetadata - assets: Array -} -export interface ListTokensArgs { - projectId?: number - collectionId: number - page?: Page -} - -export interface ListTokensReturn { - page: Page - tokens: Array -} -export interface UpdateTokenArgs { - projectId?: number - collectionId: number - tokenId: string - token: TokenMetadata - private?: boolean -} - -export interface UpdateTokenReturn { - token: TokenMetadata -} -export interface DeleteTokenArgs { - projectId?: number - collectionId: number - tokenId: string -} - -export interface DeleteTokenReturn { - status: boolean -} -export interface CreateAssetArgs { - projectId?: number - asset: Asset -} - -export interface CreateAssetReturn { - asset: Asset -} -export interface GetAssetArgs { - projectId?: number - assetId: number -} - -export interface GetAssetReturn { - asset: Asset -} -export interface UpdateAssetArgs { - projectId?: number - asset: Asset -} - -export interface UpdateAssetReturn { - asset: Asset -} -export interface DeleteAssetArgs { - projectId?: number - assetId: number -} - -export interface DeleteAssetReturn { - status: boolean -} - -export interface Admin { - /** - * ContractInfo - */ - refreshContractInfoUpdatedBefore( - args: RefreshContractInfoUpdatedBeforeArgs, - headers?: object, - signal?: AbortSignal - ): Promise - /** - * TokenMetadata - */ - refreshTokenMetadataUpdatedBefore( - args: RefreshTokenMetadataUpdatedBeforeArgs, - headers?: object, - signal?: AbortSignal - ): Promise - /** - * Contract Info Overrides - */ - getContractInfoOverride( - args: GetContractInfoOverrideArgs, - headers?: object, - signal?: AbortSignal - ): Promise - getContractInfoOverrides( - args: GetContractInfoOverridesArgs, - headers?: object, - signal?: AbortSignal - ): Promise - addContractInfoOverride( - args: AddContractInfoOverrideArgs, - headers?: object, - signal?: AbortSignal - ): Promise - updateContractInfoOverride( - args: UpdateContractInfoOverrideArgs, - headers?: object, - signal?: AbortSignal - ): Promise - removeContractInfoOverride( - args: RemoveContractInfoOverrideArgs, - headers?: object, - signal?: AbortSignal - ): Promise - /** - * Token Directory - */ - isInTokenDirectory(args: IsInTokenDirectoryArgs, headers?: object, signal?: AbortSignal): Promise - setTokenDirectoryFeatureIndex( - args: SetTokenDirectoryFeatureIndexArgs, - headers?: object, - signal?: AbortSignal - ): Promise - addContractToTokenDirectory( - args: AddContractToTokenDirectoryArgs, - headers?: object, - signal?: AbortSignal - ): Promise - removeContractFromTokenDirectory( - args: RemoveContractFromTokenDirectoryArgs, - headers?: object, - signal?: AbortSignal - ): Promise - refreshTokenDirectory(headers?: object, signal?: AbortSignal): Promise -} - -export interface RefreshContractInfoUpdatedBeforeArgs { - before: string - maxContractNumber: number -} - -export interface RefreshContractInfoUpdatedBeforeReturn { - taskIDs: Array -} -export interface RefreshTokenMetadataUpdatedBeforeArgs { - before: string - maxTokenNumber: number -} - -export interface RefreshTokenMetadataUpdatedBeforeReturn { - taskIDs: Array -} -export interface GetContractInfoOverrideArgs { - chainID: string - contractAddress: string -} - -export interface GetContractInfoOverrideReturn { - contractInfoOverride: ContractInfoOverride -} -export interface GetContractInfoOverridesArgs { - chainID?: string - page?: Page -} - -export interface GetContractInfoOverridesReturn { - contractInfoOverrides: Array - page: Page -} -export interface AddContractInfoOverrideArgs { - chainID: string - contractAddress: string - contractInfoOverride: ContractInfoOverride -} - -export interface AddContractInfoOverrideReturn { - ok: boolean -} -export interface UpdateContractInfoOverrideArgs { - chainID: string - contractAddress: string - contractInfoOverride: ContractInfoOverride -} - -export interface UpdateContractInfoOverrideReturn { - ok: boolean -} -export interface RemoveContractInfoOverrideArgs { - chainID: string - contractAddress: string -} - -export interface RemoveContractInfoOverrideReturn { - ok: boolean -} -export interface IsInTokenDirectoryArgs { - chainID: string - contractAddress: string -} - -export interface IsInTokenDirectoryReturn { - ok: boolean - featureIndex: number -} -export interface SetTokenDirectoryFeatureIndexArgs { - chainID: string - contractAddress: string - featureIndex: number -} - -export interface SetTokenDirectoryFeatureIndexReturn { - ok: boolean -} -export interface AddContractToTokenDirectoryArgs { - chainID: string - contractAddress: string -} - -export interface AddContractToTokenDirectoryReturn { - ok: boolean -} -export interface RemoveContractFromTokenDirectoryArgs { - chainID: string - contractAddress: string -} - -export interface RemoveContractFromTokenDirectoryReturn { - ok: boolean -} -export interface RefreshTokenDirectoryArgs {} - -export interface RefreshTokenDirectoryReturn { - taskID: number -} - -// -// Client -// -export class Metadata implements Metadata { - protected hostname: string - protected fetch: Fetch - protected path = '/rpc/Metadata/' - - constructor(hostname: string, fetch: Fetch) { - this.hostname = hostname.replace(/\/*$/, '') - this.fetch = (input: RequestInfo, init?: RequestInit) => fetch(input, init) - } - - private url(name: string): string { - return this.hostname + this.path + name - } - - ping = (headers?: object, signal?: AbortSignal): Promise => { - return this.fetch(this.url('Ping'), createHTTPRequest({}, headers, signal)).then( - res => { - return buildResponse(res).then(_data => { - return { - status: _data.status - } - }) - }, - error => { - throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) - } - ) - } - - version = (headers?: object, signal?: AbortSignal): Promise => { - return this.fetch(this.url('Version'), createHTTPRequest({}, headers, signal)).then( - res => { - return buildResponse(res).then(_data => { - return { - version: _data.version - } - }) - }, - error => { - throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) - } - ) - } - - runtimeStatus = (headers?: object, signal?: AbortSignal): Promise => { - return this.fetch(this.url('RuntimeStatus'), createHTTPRequest({}, headers, signal)).then( - res => { - return buildResponse(res).then(_data => { - return { - status: _data.status - } - }) - }, - error => { - throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) - } - ) - } - - getTask = (args: GetTaskArgs, headers?: object, signal?: AbortSignal): Promise => { - return this.fetch(this.url('GetTask'), createHTTPRequest(args, headers, signal)).then( - res => { - return buildResponse(res).then(_data => { - return { - task: _data.task - } - }) - }, - error => { - throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) - } - ) - } - - getTaskStatus = (args: GetTaskStatusArgs, headers?: object, signal?: AbortSignal): Promise => { - return this.fetch(this.url('GetTaskStatus'), createHTTPRequest(args, headers, signal)).then( - res => { - return buildResponse(res).then(_data => { - return { - status: _data.status - } - }) - }, - error => { - throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) - } - ) - } - - getContractInfo = (args: GetContractInfoArgs, headers?: object, signal?: AbortSignal): Promise => { - return this.fetch(this.url('GetContractInfo'), createHTTPRequest(args, headers, signal)).then( - res => { - return buildResponse(res).then(_data => { - return { - contractInfo: _data.contractInfo, - taskID: _data.taskID - } - }) - }, - error => { - throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) - } - ) - } - - getContractInfoBatch = ( - args: GetContractInfoBatchArgs, - headers?: object, - signal?: AbortSignal - ): Promise => { - return this.fetch(this.url('GetContractInfoBatch'), createHTTPRequest(args, headers, signal)).then( - res => { - return buildResponse(res).then(_data => { - return { - contractInfoMap: <{ [key: string]: ContractInfo }>_data.contractInfoMap, - taskID: _data.taskID - } - }) - }, - error => { - throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) - } - ) - } - - findContractInfo = (args: FindContractInfoArgs, headers?: object, signal?: AbortSignal): Promise => { - return this.fetch(this.url('FindContractInfo'), createHTTPRequest(args, headers, signal)).then( - res => { - return buildResponse(res).then(_data => { - return { - contractInfoList: >_data.contractInfoList - } - }) - }, - error => { - throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) - } - ) - } - - findContractInfoBatch = ( - args: FindContractInfoBatchArgs, - headers?: object, - signal?: AbortSignal - ): Promise => { - return this.fetch(this.url('FindContractInfoBatch'), createHTTPRequest(args, headers, signal)).then( - res => { - return buildResponse(res).then(_data => { - return { - contractInfoByChain: <{ [key: string]: Array }>_data.contractInfoByChain - } - }) - }, - error => { - throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) - } - ) - } - - refreshContractInfo = ( - args: RefreshContractInfoArgs, - headers?: object, - signal?: AbortSignal - ): Promise => { - return this.fetch(this.url('RefreshContractInfo'), createHTTPRequest(args, headers, signal)).then( - res => { - return buildResponse(res).then(_data => { - return { - taskID: _data.taskID - } - }) - }, - error => { - throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) - } - ) - } - - refreshContractInfoBatch = ( - args: RefreshContractInfoBatchArgs, - headers?: object, - signal?: AbortSignal - ): Promise => { - return this.fetch(this.url('RefreshContractInfoBatch'), createHTTPRequest(args, headers, signal)).then( - res => { - return buildResponse(res).then(_data => { - return { - taskID: _data.taskID - } - }) - }, - error => { - throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) - } - ) - } - - searchContractsByQuery = ( - args: SearchContractsByQueryArgs, - headers?: object, - signal?: AbortSignal - ): Promise => { - return this.fetch(this.url('SearchContractsByQuery'), createHTTPRequest(args, headers, signal)).then( - res => { - return buildResponse(res).then(_data => { - return { - contractInfo: >_data.contractInfo, - nextPage: _data.nextPage - } - }) - }, - error => { - throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) - } - ) - } - - getTokenMetadata = (args: GetTokenMetadataArgs, headers?: object, signal?: AbortSignal): Promise => { - return this.fetch(this.url('GetTokenMetadata'), createHTTPRequest(args, headers, signal)).then( - res => { - return buildResponse(res).then(_data => { - return { - tokenMetadata: >_data.tokenMetadata, - taskID: _data.taskID - } - }) - }, - error => { - throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) - } - ) - } - - getTokenMetadataBatch = ( - args: GetTokenMetadataBatchArgs, - headers?: object, - signal?: AbortSignal - ): Promise => { - return this.fetch(this.url('GetTokenMetadataBatch'), createHTTPRequest(args, headers, signal)).then( - res => { - return buildResponse(res).then(_data => { - return { - contractTokenMetadata: <{ [key: string]: Array }>_data.contractTokenMetadata, - taskID: _data.taskID - } - }) - }, - error => { - throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) - } - ) - } - - refreshTokenMetadata = ( - args: RefreshTokenMetadataArgs, - headers?: object, - signal?: AbortSignal - ): Promise => { - return this.fetch(this.url('RefreshTokenMetadata'), createHTTPRequest(args, headers, signal)).then( - res => { - return buildResponse(res).then(_data => { - return { - taskID: _data.taskID - } - }) - }, - error => { - throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) - } - ) - } - - searchTokenMetadataByQuery = ( - args: SearchTokenMetadataByQueryArgs, - headers?: object, - signal?: AbortSignal - ): Promise => { - return this.fetch(this.url('SearchTokenMetadataByQuery'), createHTTPRequest(args, headers, signal)).then( - res => { - return buildResponse(res).then(_data => { - return { - tokenMetadata: >_data.tokenMetadata, - nextPage: _data.nextPage - } - }) - }, - error => { - throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) - } - ) - } - - searchTokenMetadata = ( - args: SearchTokenMetadataArgs, - headers?: object, - signal?: AbortSignal - ): Promise => { - return this.fetch(this.url('SearchTokenMetadata'), createHTTPRequest(args, headers, signal)).then( - res => { - return buildResponse(res).then(_data => { - return { - page: _data.page, - tokenMetadata: >_data.tokenMetadata - } - }) - }, - error => { - throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) - } - ) - } - - searchTokenMetadataTokenIDs = ( - args: SearchTokenMetadataTokenIDsArgs, - headers?: object, - signal?: AbortSignal - ): Promise => { - return this.fetch(this.url('SearchTokenMetadataTokenIDs'), createHTTPRequest(args, headers, signal)).then( - res => { - return buildResponse(res).then(_data => { - return { - page: _data.page, - tokenIDs: >_data.tokenIDs - } - }) - }, - error => { - throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) - } - ) - } - - getTokenMetadataPropertyFilters = ( - args: GetTokenMetadataPropertyFiltersArgs, - headers?: object, - signal?: AbortSignal - ): Promise => { - return this.fetch(this.url('GetTokenMetadataPropertyFilters'), createHTTPRequest(args, headers, signal)).then( - res => { - return buildResponse(res).then(_data => { - return { - filters: >_data.filters - } - }) - }, - error => { - throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) - } - ) - } - - getTokenDirectoryNetworks = ( - args: GetTokenDirectoryNetworksArgs, - headers?: object, - signal?: AbortSignal - ): Promise => { - return this.fetch(this.url('GetTokenDirectoryNetworks'), createHTTPRequest(args, headers, signal)).then( - res => { - return buildResponse(res).then(_data => { - return { - chainIDs: >_data.chainIDs, - networks: >_data.networks - } - }) - }, - error => { - throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) - } - ) - } - - getTokenDirectory = (args: GetTokenDirectoryArgs, headers?: object, signal?: AbortSignal): Promise => { - return this.fetch(this.url('GetTokenDirectory'), createHTTPRequest(args, headers, signal)).then( - res => { - return buildResponse(res).then(_data => { - return { - contracts: >_data.contracts, - page: _data.page - } - }) - }, - error => { - throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) - } - ) - } - - searchTokenDirectory = ( - args: SearchTokenDirectoryArgs, - headers?: object, - signal?: AbortSignal - ): Promise => { - return this.fetch(this.url('SearchTokenDirectory'), createHTTPRequest(args, headers, signal)).then( - res => { - return buildResponse(res).then(_data => { - return { - contracts: >_data.contracts, - page: _data.page - } - }) - }, - error => { - throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) - } - ) - } - - getNiftyswapTokenQuantity = ( - args: GetNiftyswapTokenQuantityArgs, - headers?: object, - signal?: AbortSignal - ): Promise => { - return this.fetch(this.url('GetNiftyswapTokenQuantity'), createHTTPRequest(args, headers, signal)).then( - res => { - return buildResponse(res).then(_data => { - return { - quantity: <{ [key: string]: string }>_data.quantity - } - }) - }, - error => { - throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) - } - ) - } - - getNiftyswapUnitPrices = ( - args: GetNiftyswapUnitPricesArgs, - headers?: object, - signal?: AbortSignal - ): Promise => { - return this.fetch(this.url('GetNiftyswapUnitPrices'), createHTTPRequest(args, headers, signal)).then( - res => { - return buildResponse(res).then(_data => { - return { - prices: <{ [key: string]: string }>_data.prices - } - }) - }, - error => { - throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) - } - ) - } - - getNiftyswapUnitPricesWithQuantities = ( - args: GetNiftyswapUnitPricesWithQuantitiesArgs, - headers?: object, - signal?: AbortSignal - ): Promise => { - return this.fetch(this.url('GetNiftyswapUnitPricesWithQuantities'), createHTTPRequest(args, headers, signal)).then( - res => { - return buildResponse(res).then(_data => { - return { - prices: <{ [key: string]: GetNiftyswapUnitPricesResponse }>_data.prices - } - }) - }, - error => { - throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) - } - ) - } -} -export class Collections implements Collections { - protected hostname: string - protected fetch: Fetch - protected path = '/rpc/Collections/' - - constructor(hostname: string, fetch: Fetch) { - this.hostname = hostname.replace(/\/*$/, '') - this.fetch = (input: RequestInfo, init?: RequestInit) => fetch(input, init) - } - - private url(name: string): string { - return this.hostname + this.path + name - } - - createCollection = (args: CreateCollectionArgs, headers?: object, signal?: AbortSignal): Promise => { - return this.fetch(this.url('CreateCollection'), createHTTPRequest(args, headers, signal)).then( - res => { - return buildResponse(res).then(_data => { - return { - collection: _data.collection - } - }) - }, - error => { - throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) - } - ) - } - - getCollection = (args: GetCollectionArgs, headers?: object, signal?: AbortSignal): Promise => { - return this.fetch(this.url('GetCollection'), createHTTPRequest(args, headers, signal)).then( - res => { - return buildResponse(res).then(_data => { - return { - collection: _data.collection - } - }) - }, - error => { - throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) - } - ) - } - - listCollections = (args: ListCollectionsArgs, headers?: object, signal?: AbortSignal): Promise => { - return this.fetch(this.url('ListCollections'), createHTTPRequest(args, headers, signal)).then( - res => { - return buildResponse(res).then(_data => { - return { - page: _data.page, - collections: >_data.collections - } - }) - }, - error => { - throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) - } - ) - } - - updateCollection = (args: UpdateCollectionArgs, headers?: object, signal?: AbortSignal): Promise => { - return this.fetch(this.url('UpdateCollection'), createHTTPRequest(args, headers, signal)).then( - res => { - return buildResponse(res).then(_data => { - return { - collection: _data.collection - } - }) - }, - error => { - throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) - } - ) - } - - deleteCollection = (args: DeleteCollectionArgs, headers?: object, signal?: AbortSignal): Promise => { - return this.fetch(this.url('DeleteCollection'), createHTTPRequest(args, headers, signal)).then( - res => { - return buildResponse(res).then(_data => { - return { - status: _data.status - } - }) - }, - error => { - throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) - } - ) - } - - publishCollection = (args: PublishCollectionArgs, headers?: object, signal?: AbortSignal): Promise => { - return this.fetch(this.url('PublishCollection'), createHTTPRequest(args, headers, signal)).then( - res => { - return buildResponse(res).then(_data => { - return { - collection: _data.collection - } - }) - }, - error => { - throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) - } - ) - } - - unpublishCollection = ( - args: UnpublishCollectionArgs, - headers?: object, - signal?: AbortSignal - ): Promise => { - return this.fetch(this.url('UnpublishCollection'), createHTTPRequest(args, headers, signal)).then( - res => { - return buildResponse(res).then(_data => { - return { - collection: _data.collection - } - }) - }, - error => { - throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) - } - ) - } - - createContractCollection = ( - args: CreateContractCollectionArgs, - headers?: object, - signal?: AbortSignal - ): Promise => { - return this.fetch(this.url('CreateContractCollection'), createHTTPRequest(args, headers, signal)).then( - res => { - return buildResponse(res).then(_data => { - return { - contractCollection: _data.contractCollection - } - }) - }, - error => { - throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) - } - ) - } - - getContractCollection = ( - args: GetContractCollectionArgs, - headers?: object, - signal?: AbortSignal - ): Promise => { - return this.fetch(this.url('GetContractCollection'), createHTTPRequest(args, headers, signal)).then( - res => { - return buildResponse(res).then(_data => { - return { - contractCollection: _data.contractCollection - } - }) - }, - error => { - throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) - } - ) - } - - listContractCollections = ( - args: ListContractCollectionsArgs, - headers?: object, - signal?: AbortSignal - ): Promise => { - return this.fetch(this.url('ListContractCollections'), createHTTPRequest(args, headers, signal)).then( - res => { - return buildResponse(res).then(_data => { - return { - contractCollections: >_data.contractCollections, - collections: >_data.collections, - page: _data.page - } - }) - }, - error => { - throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) - } - ) - } - - updateContractCollection = ( - args: UpdateContractCollectionArgs, - headers?: object, - signal?: AbortSignal - ): Promise => { - return this.fetch(this.url('UpdateContractCollection'), createHTTPRequest(args, headers, signal)).then( - res => { - return buildResponse(res).then(_data => { - return { - ok: _data.ok - } - }) - }, - error => { - throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) - } - ) - } - - deleteContractCollection = ( - args: DeleteContractCollectionArgs, - headers?: object, - signal?: AbortSignal - ): Promise => { - return this.fetch(this.url('DeleteContractCollection'), createHTTPRequest(args, headers, signal)).then( - res => { - return buildResponse(res).then(_data => { - return { - ok: _data.ok - } - }) - }, - error => { - throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) - } - ) - } - - createToken = (args: CreateTokenArgs, headers?: object, signal?: AbortSignal): Promise => { - return this.fetch(this.url('CreateToken'), createHTTPRequest(args, headers, signal)).then( - res => { - return buildResponse(res).then(_data => { - return { - token: _data.token, - assets: >_data.assets - } - }) - }, - error => { - throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) - } - ) - } - - getToken = (args: GetTokenArgs, headers?: object, signal?: AbortSignal): Promise => { - return this.fetch(this.url('GetToken'), createHTTPRequest(args, headers, signal)).then( - res => { - return buildResponse(res).then(_data => { - return { - token: _data.token, - assets: >_data.assets - } - }) - }, - error => { - throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) - } - ) - } - - listTokens = (args: ListTokensArgs, headers?: object, signal?: AbortSignal): Promise => { - return this.fetch(this.url('ListTokens'), createHTTPRequest(args, headers, signal)).then( - res => { - return buildResponse(res).then(_data => { - return { - page: _data.page, - tokens: >_data.tokens - } - }) - }, - error => { - throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) - } - ) - } - - updateToken = (args: UpdateTokenArgs, headers?: object, signal?: AbortSignal): Promise => { - return this.fetch(this.url('UpdateToken'), createHTTPRequest(args, headers, signal)).then( - res => { - return buildResponse(res).then(_data => { - return { - token: _data.token - } - }) - }, - error => { - throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) - } - ) - } - - deleteToken = (args: DeleteTokenArgs, headers?: object, signal?: AbortSignal): Promise => { - return this.fetch(this.url('DeleteToken'), createHTTPRequest(args, headers, signal)).then( - res => { - return buildResponse(res).then(_data => { - return { - status: _data.status - } - }) - }, - error => { - throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) - } - ) - } - - createAsset = (args: CreateAssetArgs, headers?: object, signal?: AbortSignal): Promise => { - return this.fetch(this.url('CreateAsset'), createHTTPRequest(args, headers, signal)).then( - res => { - return buildResponse(res).then(_data => { - return { - asset: _data.asset - } - }) - }, - error => { - throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) - } - ) - } - - getAsset = (args: GetAssetArgs, headers?: object, signal?: AbortSignal): Promise => { - return this.fetch(this.url('GetAsset'), createHTTPRequest(args, headers, signal)).then( - res => { - return buildResponse(res).then(_data => { - return { - asset: _data.asset - } - }) - }, - error => { - throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) - } - ) - } - - updateAsset = (args: UpdateAssetArgs, headers?: object, signal?: AbortSignal): Promise => { - return this.fetch(this.url('UpdateAsset'), createHTTPRequest(args, headers, signal)).then( - res => { - return buildResponse(res).then(_data => { - return { - asset: _data.asset - } - }) - }, - error => { - throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) - } - ) - } - - deleteAsset = (args: DeleteAssetArgs, headers?: object, signal?: AbortSignal): Promise => { - return this.fetch(this.url('DeleteAsset'), createHTTPRequest(args, headers, signal)).then( - res => { - return buildResponse(res).then(_data => { - return { - status: _data.status - } - }) - }, - error => { - throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) - } - ) - } -} -export class Admin implements Admin { - protected hostname: string - protected fetch: Fetch - protected path = '/rpc/Admin/' - - constructor(hostname: string, fetch: Fetch) { - this.hostname = hostname.replace(/\/*$/, '') - this.fetch = (input: RequestInfo, init?: RequestInit) => fetch(input, init) - } - - private url(name: string): string { - return this.hostname + this.path + name - } - - refreshContractInfoUpdatedBefore = ( - args: RefreshContractInfoUpdatedBeforeArgs, - headers?: object, - signal?: AbortSignal - ): Promise => { - return this.fetch(this.url('RefreshContractInfoUpdatedBefore'), createHTTPRequest(args, headers, signal)).then( - res => { - return buildResponse(res).then(_data => { - return { - taskIDs: >_data.taskIDs - } - }) - }, - error => { - throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) - } - ) - } - - refreshTokenMetadataUpdatedBefore = ( - args: RefreshTokenMetadataUpdatedBeforeArgs, - headers?: object, - signal?: AbortSignal - ): Promise => { - return this.fetch(this.url('RefreshTokenMetadataUpdatedBefore'), createHTTPRequest(args, headers, signal)).then( - res => { - return buildResponse(res).then(_data => { - return { - taskIDs: >_data.taskIDs - } - }) - }, - error => { - throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) - } - ) - } - - getContractInfoOverride = ( - args: GetContractInfoOverrideArgs, - headers?: object, - signal?: AbortSignal - ): Promise => { - return this.fetch(this.url('GetContractInfoOverride'), createHTTPRequest(args, headers, signal)).then( - res => { - return buildResponse(res).then(_data => { - return { - contractInfoOverride: _data.contractInfoOverride - } - }) - }, - error => { - throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) - } - ) - } - - getContractInfoOverrides = ( - args: GetContractInfoOverridesArgs, - headers?: object, - signal?: AbortSignal - ): Promise => { - return this.fetch(this.url('GetContractInfoOverrides'), createHTTPRequest(args, headers, signal)).then( - res => { - return buildResponse(res).then(_data => { - return { - contractInfoOverrides: >_data.contractInfoOverrides, - page: _data.page - } - }) - }, - error => { - throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) - } - ) - } - - addContractInfoOverride = ( - args: AddContractInfoOverrideArgs, - headers?: object, - signal?: AbortSignal - ): Promise => { - return this.fetch(this.url('AddContractInfoOverride'), createHTTPRequest(args, headers, signal)).then( - res => { - return buildResponse(res).then(_data => { - return { - ok: _data.ok - } - }) - }, - error => { - throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) - } - ) - } - - updateContractInfoOverride = ( - args: UpdateContractInfoOverrideArgs, - headers?: object, - signal?: AbortSignal - ): Promise => { - return this.fetch(this.url('UpdateContractInfoOverride'), createHTTPRequest(args, headers, signal)).then( - res => { - return buildResponse(res).then(_data => { - return { - ok: _data.ok - } - }) - }, - error => { - throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) - } - ) - } - - removeContractInfoOverride = ( - args: RemoveContractInfoOverrideArgs, - headers?: object, - signal?: AbortSignal - ): Promise => { - return this.fetch(this.url('RemoveContractInfoOverride'), createHTTPRequest(args, headers, signal)).then( - res => { - return buildResponse(res).then(_data => { - return { - ok: _data.ok - } - }) - }, - error => { - throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) - } - ) - } - - isInTokenDirectory = ( - args: IsInTokenDirectoryArgs, - headers?: object, - signal?: AbortSignal - ): Promise => { - return this.fetch(this.url('IsInTokenDirectory'), createHTTPRequest(args, headers, signal)).then( - res => { - return buildResponse(res).then(_data => { - return { - ok: _data.ok, - featureIndex: _data.featureIndex - } - }) - }, - error => { - throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) - } - ) - } - - setTokenDirectoryFeatureIndex = ( - args: SetTokenDirectoryFeatureIndexArgs, - headers?: object, - signal?: AbortSignal - ): Promise => { - return this.fetch(this.url('SetTokenDirectoryFeatureIndex'), createHTTPRequest(args, headers, signal)).then( - res => { - return buildResponse(res).then(_data => { - return { - ok: _data.ok - } - }) - }, - error => { - throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) - } - ) - } - - addContractToTokenDirectory = ( - args: AddContractToTokenDirectoryArgs, - headers?: object, - signal?: AbortSignal - ): Promise => { - return this.fetch(this.url('AddContractToTokenDirectory'), createHTTPRequest(args, headers, signal)).then( - res => { - return buildResponse(res).then(_data => { - return { - ok: _data.ok - } - }) - }, - error => { - throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) - } - ) - } - - removeContractFromTokenDirectory = ( - args: RemoveContractFromTokenDirectoryArgs, - headers?: object, - signal?: AbortSignal - ): Promise => { - return this.fetch(this.url('RemoveContractFromTokenDirectory'), createHTTPRequest(args, headers, signal)).then( - res => { - return buildResponse(res).then(_data => { - return { - ok: _data.ok - } - }) - }, - error => { - throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) - } - ) - } - - refreshTokenDirectory = (headers?: object, signal?: AbortSignal): Promise => { - return this.fetch(this.url('RefreshTokenDirectory'), createHTTPRequest({}, headers, signal)).then( - res => { - return buildResponse(res).then(_data => { - return { - taskID: _data.taskID - } - }) - }, - error => { - throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) - } - ) - } -} - -const createHTTPRequest = (body: object = {}, headers: object = {}, signal: AbortSignal | null = null): object => { - const reqHeaders: { [key: string]: string } = { ...headers, 'Content-Type': 'application/json' } - reqHeaders[WebrpcHeader] = WebrpcHeaderValue - - return { - method: 'POST', - headers: reqHeaders, - body: JSON.stringify(body || {}), - signal - } -} - -const buildResponse = (res: Response): Promise => { - return res.text().then(text => { - let data - try { - data = JSON.parse(text) - } catch (error) { - let message = '' - if (error instanceof Error) { - message = error.message - } - throw WebrpcBadResponseError.new({ - status: res.status, - cause: `JSON.parse(): ${message}: response text: ${text}` - }) - } - if (!res.ok) { - const code: number = typeof data.code === 'number' ? data.code : 0 - throw (webrpcErrorByCode[code] || WebrpcError).new(data) - } - return data - }) -} - -// -// Errors -// - -export class WebrpcError extends Error { - name: string - code: number - message: string - status: number - cause?: string - - /** @deprecated Use message instead of msg. Deprecated in webrpc v0.11.0. */ - msg: string - - constructor(name: string, code: number, message: string, status: number, cause?: string) { - super(message) - this.name = name || 'WebrpcError' - this.code = typeof code === 'number' ? code : 0 - this.message = message || `endpoint error ${this.code}` - this.msg = this.message - this.status = typeof status === 'number' ? status : 0 - this.cause = cause - Object.setPrototypeOf(this, WebrpcError.prototype) - } - - static new(payload: any): WebrpcError { - return new this(payload.error, payload.code, payload.message || payload.msg, payload.status, payload.cause) - } -} - -// Webrpc errors - -export class WebrpcEndpointError extends WebrpcError { - constructor( - name: string = 'WebrpcEndpoint', - code: number = 0, - message: string = `endpoint error`, - status: number = 0, - cause?: string - ) { - super(name, code, message, status, cause) - Object.setPrototypeOf(this, WebrpcEndpointError.prototype) - } -} - -export class WebrpcRequestFailedError extends WebrpcError { - constructor( - name: string = 'WebrpcRequestFailed', - code: number = -1, - message: string = `request failed`, - status: number = 0, - cause?: string - ) { - super(name, code, message, status, cause) - Object.setPrototypeOf(this, WebrpcRequestFailedError.prototype) - } -} - -export class WebrpcBadRouteError extends WebrpcError { - constructor( - name: string = 'WebrpcBadRoute', - code: number = -2, - message: string = `bad route`, - status: number = 0, - cause?: string - ) { - super(name, code, message, status, cause) - Object.setPrototypeOf(this, WebrpcBadRouteError.prototype) - } -} - -export class WebrpcBadMethodError extends WebrpcError { - constructor( - name: string = 'WebrpcBadMethod', - code: number = -3, - message: string = `bad method`, - status: number = 0, - cause?: string - ) { - super(name, code, message, status, cause) - Object.setPrototypeOf(this, WebrpcBadMethodError.prototype) - } -} - -export class WebrpcBadRequestError extends WebrpcError { - constructor( - name: string = 'WebrpcBadRequest', - code: number = -4, - message: string = `bad request`, - status: number = 0, - cause?: string - ) { - super(name, code, message, status, cause) - Object.setPrototypeOf(this, WebrpcBadRequestError.prototype) - } -} - -export class WebrpcBadResponseError extends WebrpcError { - constructor( - name: string = 'WebrpcBadResponse', - code: number = -5, - message: string = `bad response`, - status: number = 0, - cause?: string - ) { - super(name, code, message, status, cause) - Object.setPrototypeOf(this, WebrpcBadResponseError.prototype) - } -} - -export class WebrpcServerPanicError extends WebrpcError { - constructor( - name: string = 'WebrpcServerPanic', - code: number = -6, - message: string = `server panic`, - status: number = 0, - cause?: string - ) { - super(name, code, message, status, cause) - Object.setPrototypeOf(this, WebrpcServerPanicError.prototype) - } -} - -export class WebrpcInternalErrorError extends WebrpcError { - constructor( - name: string = 'WebrpcInternalError', - code: number = -7, - message: string = `internal error`, - status: number = 0, - cause?: string - ) { - super(name, code, message, status, cause) - Object.setPrototypeOf(this, WebrpcInternalErrorError.prototype) - } -} - -export class WebrpcClientDisconnectedError extends WebrpcError { - constructor( - name: string = 'WebrpcClientDisconnected', - code: number = -8, - message: string = `client disconnected`, - status: number = 0, - cause?: string - ) { - super(name, code, message, status, cause) - Object.setPrototypeOf(this, WebrpcClientDisconnectedError.prototype) - } -} - -export class WebrpcStreamLostError extends WebrpcError { - constructor( - name: string = 'WebrpcStreamLost', - code: number = -9, - message: string = `stream lost`, - status: number = 0, - cause?: string - ) { - super(name, code, message, status, cause) - Object.setPrototypeOf(this, WebrpcStreamLostError.prototype) - } -} - -export class WebrpcStreamFinishedError extends WebrpcError { - constructor( - name: string = 'WebrpcStreamFinished', - code: number = -10, - message: string = `stream finished`, - status: number = 0, - cause?: string - ) { - super(name, code, message, status, cause) - Object.setPrototypeOf(this, WebrpcStreamFinishedError.prototype) - } -} - -// Schema errors - -export class UnauthorizedError extends WebrpcError { - constructor( - name: string = 'Unauthorized', - code: number = 1000, - message: string = `Unauthorized access`, - status: number = 0, - cause?: string - ) { - super(name, code, message, status, cause) - Object.setPrototypeOf(this, UnauthorizedError.prototype) - } -} - -export class PermissionDeniedError extends WebrpcError { - constructor( - name: string = 'PermissionDenied', - code: number = 1001, - message: string = `Permission denied`, - status: number = 0, - cause?: string - ) { - super(name, code, message, status, cause) - Object.setPrototypeOf(this, PermissionDeniedError.prototype) - } -} - -export class SessionExpiredError extends WebrpcError { - constructor( - name: string = 'SessionExpired', - code: number = 1002, - message: string = `Session expired`, - status: number = 0, - cause?: string - ) { - super(name, code, message, status, cause) - Object.setPrototypeOf(this, SessionExpiredError.prototype) - } -} - -export class MethodNotFoundError extends WebrpcError { - constructor( - name: string = 'MethodNotFound', - code: number = 1003, - message: string = `Method not found`, - status: number = 0, - cause?: string - ) { - super(name, code, message, status, cause) - Object.setPrototypeOf(this, MethodNotFoundError.prototype) - } -} - -export class RequestConflictError extends WebrpcError { - constructor( - name: string = 'RequestConflict', - code: number = 1004, - message: string = `Conflict with target resource`, - status: number = 0, - cause?: string - ) { - super(name, code, message, status, cause) - Object.setPrototypeOf(this, RequestConflictError.prototype) - } -} - -export class FailError extends WebrpcError { - constructor( - name: string = 'Fail', - code: number = 1005, - message: string = `Request Failed`, - status: number = 0, - cause?: string - ) { - super(name, code, message, status, cause) - Object.setPrototypeOf(this, FailError.prototype) - } -} - -export class GeoblockedError extends WebrpcError { - constructor( - name: string = 'Geoblocked', - code: number = 1006, - message: string = `Geoblocked region`, - status: number = 0, - cause?: string - ) { - super(name, code, message, status, cause) - Object.setPrototypeOf(this, GeoblockedError.prototype) - } -} - -export class TaskFailedError extends WebrpcError { - constructor( - name: string = 'TaskFailed', - code: number = 1007, - message: string = `Task failed`, - status: number = 0, - cause?: string - ) { - super(name, code, message, status, cause) - Object.setPrototypeOf(this, TaskFailedError.prototype) - } -} - -export class DeprecatedError extends WebrpcError { - constructor( - name: string = 'Deprecated', - code: number = 1008, - message: string = `RPC method is deprecated`, - status: number = 0, - cause?: string - ) { - super(name, code, message, status, cause) - Object.setPrototypeOf(this, DeprecatedError.prototype) - } -} - -export class TimeoutError extends WebrpcError { - constructor( - name: string = 'Timeout', - code: number = 2000, - message: string = `Request timed out`, - status: number = 0, - cause?: string - ) { - super(name, code, message, status, cause) - Object.setPrototypeOf(this, TimeoutError.prototype) - } -} - -export class InvalidArgumentError extends WebrpcError { - constructor( - name: string = 'InvalidArgument', - code: number = 2001, - message: string = `Invalid argument`, - status: number = 0, - cause?: string - ) { - super(name, code, message, status, cause) - Object.setPrototypeOf(this, InvalidArgumentError.prototype) - } -} - -export class RequiredArgumentError extends WebrpcError { - constructor( - name: string = 'RequiredArgument', - code: number = 2002, - message: string = `Required argument missing`, - status: number = 0, - cause?: string - ) { - super(name, code, message, status, cause) - Object.setPrototypeOf(this, RequiredArgumentError.prototype) - } -} - -export class QueryFailedError extends WebrpcError { - constructor( - name: string = 'QueryFailed', - code: number = 2003, - message: string = `Query failed`, - status: number = 0, - cause?: string - ) { - super(name, code, message, status, cause) - Object.setPrototypeOf(this, QueryFailedError.prototype) - } -} - -export class ValidationFailedError extends WebrpcError { - constructor( - name: string = 'ValidationFailed', - code: number = 2004, - message: string = `Validation failed`, - status: number = 0, - cause?: string - ) { - super(name, code, message, status, cause) - Object.setPrototypeOf(this, ValidationFailedError.prototype) - } -} - -export class RateLimitedError extends WebrpcError { - constructor( - name: string = 'RateLimited', - code: number = 2005, - message: string = `Rate limited`, - status: number = 0, - cause?: string - ) { - super(name, code, message, status, cause) - Object.setPrototypeOf(this, RateLimitedError.prototype) - } -} - -export class NotFoundError extends WebrpcError { - constructor( - name: string = 'NotFound', - code: number = 3000, - message: string = `Resource not found`, - status: number = 0, - cause?: string - ) { - super(name, code, message, status, cause) - Object.setPrototypeOf(this, NotFoundError.prototype) - } -} - -export class ProjectNotFoundError extends WebrpcError { - constructor( - name: string = 'ProjectNotFound', - code: number = 3002, - message: string = `Project not found`, - status: number = 0, - cause?: string - ) { - super(name, code, message, status, cause) - Object.setPrototypeOf(this, ProjectNotFoundError.prototype) - } -} - -export class ChainNotFoundError extends WebrpcError { - constructor( - name: string = 'ChainNotFound', - code: number = 3003, - message: string = `Chain not found`, - status: number = 0, - cause?: string - ) { - super(name, code, message, status, cause) - Object.setPrototypeOf(this, ChainNotFoundError.prototype) - } -} - -export class TokenDirectoryDisabledError extends WebrpcError { - constructor( - name: string = 'TokenDirectoryDisabled', - code: number = 4001, - message: string = `Token Directory is disabled`, - status: number = 0, - cause?: string - ) { - super(name, code, message, status, cause) - Object.setPrototypeOf(this, TokenDirectoryDisabledError.prototype) - } -} - -export enum errors { - WebrpcEndpoint = 'WebrpcEndpoint', - WebrpcRequestFailed = 'WebrpcRequestFailed', - WebrpcBadRoute = 'WebrpcBadRoute', - WebrpcBadMethod = 'WebrpcBadMethod', - WebrpcBadRequest = 'WebrpcBadRequest', - WebrpcBadResponse = 'WebrpcBadResponse', - WebrpcServerPanic = 'WebrpcServerPanic', - WebrpcInternalError = 'WebrpcInternalError', - WebrpcClientDisconnected = 'WebrpcClientDisconnected', - WebrpcStreamLost = 'WebrpcStreamLost', - WebrpcStreamFinished = 'WebrpcStreamFinished', - Unauthorized = 'Unauthorized', - PermissionDenied = 'PermissionDenied', - SessionExpired = 'SessionExpired', - MethodNotFound = 'MethodNotFound', - RequestConflict = 'RequestConflict', - Fail = 'Fail', - Geoblocked = 'Geoblocked', - TaskFailed = 'TaskFailed', - Deprecated = 'Deprecated', - Timeout = 'Timeout', - InvalidArgument = 'InvalidArgument', - RequiredArgument = 'RequiredArgument', - QueryFailed = 'QueryFailed', - ValidationFailed = 'ValidationFailed', - RateLimited = 'RateLimited', - NotFound = 'NotFound', - ProjectNotFound = 'ProjectNotFound', - ChainNotFound = 'ChainNotFound', - TokenDirectoryDisabled = 'TokenDirectoryDisabled' -} - -export enum WebrpcErrorCodes { - WebrpcEndpoint = 0, - WebrpcRequestFailed = -1, - WebrpcBadRoute = -2, - WebrpcBadMethod = -3, - WebrpcBadRequest = -4, - WebrpcBadResponse = -5, - WebrpcServerPanic = -6, - WebrpcInternalError = -7, - WebrpcClientDisconnected = -8, - WebrpcStreamLost = -9, - WebrpcStreamFinished = -10, - Unauthorized = 1000, - PermissionDenied = 1001, - SessionExpired = 1002, - MethodNotFound = 1003, - RequestConflict = 1004, - Fail = 1005, - Geoblocked = 1006, - TaskFailed = 1007, - Deprecated = 1008, - Timeout = 2000, - InvalidArgument = 2001, - RequiredArgument = 2002, - QueryFailed = 2003, - ValidationFailed = 2004, - RateLimited = 2005, - NotFound = 3000, - ProjectNotFound = 3002, - ChainNotFound = 3003, - TokenDirectoryDisabled = 4001 -} - -export const webrpcErrorByCode: { [code: number]: any } = { - [0]: WebrpcEndpointError, - [-1]: WebrpcRequestFailedError, - [-2]: WebrpcBadRouteError, - [-3]: WebrpcBadMethodError, - [-4]: WebrpcBadRequestError, - [-5]: WebrpcBadResponseError, - [-6]: WebrpcServerPanicError, - [-7]: WebrpcInternalErrorError, - [-8]: WebrpcClientDisconnectedError, - [-9]: WebrpcStreamLostError, - [-10]: WebrpcStreamFinishedError, - [1000]: UnauthorizedError, - [1001]: PermissionDeniedError, - [1002]: SessionExpiredError, - [1003]: MethodNotFoundError, - [1004]: RequestConflictError, - [1005]: FailError, - [1006]: GeoblockedError, - [1007]: TaskFailedError, - [1008]: DeprecatedError, - [2000]: TimeoutError, - [2001]: InvalidArgumentError, - [2002]: RequiredArgumentError, - [2003]: QueryFailedError, - [2004]: ValidationFailedError, - [2005]: RateLimitedError, - [3000]: NotFoundError, - [3002]: ProjectNotFoundError, - [3003]: ChainNotFoundError, - [4001]: TokenDirectoryDisabledError -} - -export type Fetch = (input: RequestInfo, init?: RequestInit) => Promise diff --git a/old/packages/migration/CHANGELOG.md b/old/packages/migration/CHANGELOG.md deleted file mode 100644 index 6cdf7c3d2..000000000 --- a/old/packages/migration/CHANGELOG.md +++ /dev/null @@ -1,1886 +0,0 @@ -# @0xsequence/migration - -## 2.3.8 - -### Patch Changes - -- indexer: update clients -- Updated dependencies - - @0xsequence/abi@2.3.8 - - @0xsequence/core@2.3.8 - - @0xsequence/wallet@2.3.8 - -## 2.3.7 - -### Patch Changes - -- Metadata updates -- Updated dependencies - - @0xsequence/abi@2.3.7 - - @0xsequence/core@2.3.7 - - @0xsequence/wallet@2.3.7 - -## 2.3.6 - -### Patch Changes - -- New chains -- Updated dependencies - - @0xsequence/abi@2.3.6 - - @0xsequence/core@2.3.6 - - @0xsequence/wallet@2.3.6 - -## 2.3.5 - -### Patch Changes - -- Add Frequency Testnet -- Updated dependencies - - @0xsequence/abi@2.3.5 - - @0xsequence/core@2.3.5 - - @0xsequence/wallet@2.3.5 - -## 2.3.4 - -### Patch Changes - -- metadata: exclude deprecated methods on rpc client -- Updated dependencies - - @0xsequence/abi@2.3.4 - - @0xsequence/core@2.3.4 - - @0xsequence/wallet@2.3.4 - -## 2.3.3 - -### Patch Changes - -- metadata: client update -- Updated dependencies - - @0xsequence/abi@2.3.3 - - @0xsequence/core@2.3.3 - - @0xsequence/wallet@2.3.3 - -## 2.3.2 - -### Patch Changes - -- metadata: update rpc client -- Updated dependencies - - @0xsequence/abi@2.3.2 - - @0xsequence/core@2.3.2 - - @0xsequence/wallet@2.3.2 - -## 2.3.1 - -### Patch Changes - -- indexer: update rpc client -- Updated dependencies - - @0xsequence/abi@2.3.1 - - @0xsequence/core@2.3.1 - - @0xsequence/wallet@2.3.1 - -## 2.3.0 - -### Minor Changes - -- update metadata rpc client - -### Patch Changes - -- Updated dependencies - - @0xsequence/abi@2.3.0 - - @0xsequence/core@2.3.0 - - @0xsequence/wallet@2.3.0 - -## 2.2.15 - -### Patch Changes - -- API updates -- Updated dependencies - - @0xsequence/abi@2.2.15 - - @0xsequence/core@2.2.15 - - @0xsequence/wallet@2.2.15 - -## 2.2.14 - -### Patch Changes - -- Somnia Testnet and Monad Testnet -- Updated dependencies - - @0xsequence/abi@2.2.14 - - @0xsequence/core@2.2.14 - - @0xsequence/wallet@2.2.14 - -## 2.2.13 - -### Patch Changes - -- Add XR1 to all networks -- Updated dependencies - - @0xsequence/abi@2.2.13 - - @0xsequence/core@2.2.13 - - @0xsequence/wallet@2.2.13 - -## 2.2.12 - -### Patch Changes - -- Add XR1 -- Updated dependencies - - @0xsequence/abi@2.2.12 - - @0xsequence/core@2.2.12 - - @0xsequence/wallet@2.2.12 - -## 2.2.11 - -### Patch Changes - -- Relayer updates -- Updated dependencies - - @0xsequence/abi@2.2.11 - - @0xsequence/core@2.2.11 - - @0xsequence/wallet@2.2.11 - -## 2.2.10 - -### Patch Changes - -- Etherlink support -- Updated dependencies - - @0xsequence/abi@2.2.10 - - @0xsequence/core@2.2.10 - - @0xsequence/wallet@2.2.10 - -## 2.2.9 - -### Patch Changes - -- Indexer gateway native token balances -- Updated dependencies - - @0xsequence/abi@2.2.9 - - @0xsequence/core@2.2.9 - - @0xsequence/wallet@2.2.9 - -## 2.2.8 - -### Patch Changes - -- Add Moonbeam and Moonbase Alpha -- Updated dependencies - - @0xsequence/abi@2.2.8 - - @0xsequence/core@2.2.8 - - @0xsequence/wallet@2.2.8 - -## 2.2.7 - -### Patch Changes - -- Update Builder package -- Updated dependencies - - @0xsequence/abi@2.2.7 - - @0xsequence/core@2.2.7 - - @0xsequence/wallet@2.2.7 - -## 2.2.6 - -### Patch Changes - -- Update relayer package -- Updated dependencies - - @0xsequence/abi@2.2.6 - - @0xsequence/core@2.2.6 - - @0xsequence/wallet@2.2.6 - -## 2.2.5 - -### Patch Changes - -- auth: fix sequence indexer gateway url -- account: immutable wallet proxy hook -- Updated dependencies -- Updated dependencies - - @0xsequence/abi@2.2.5 - - @0xsequence/core@2.2.5 - - @0xsequence/wallet@2.2.5 - -## 2.2.4 - -### Patch Changes - -- network: update soneium mainnet block explorer url -- waas: signTypedData intent support -- Updated dependencies -- Updated dependencies - - @0xsequence/abi@2.2.4 - - @0xsequence/core@2.2.4 - - @0xsequence/wallet@2.2.4 - -## 2.2.3 - -### Patch Changes - -- provider: updating initWallet to use connected network configs if they exist -- Updated dependencies - - @0xsequence/abi@2.2.3 - - @0xsequence/core@2.2.3 - - @0xsequence/wallet@2.2.3 - -## 2.2.2 - -### Patch Changes - -- pass projectAccessKey to relayer at all times -- Updated dependencies - - @0xsequence/abi@2.2.2 - - @0xsequence/core@2.2.2 - - @0xsequence/wallet@2.2.2 - -## 2.2.1 - -### Patch Changes - -- waas-ethers: sign typed data -- Updated dependencies - - @0xsequence/abi@2.2.1 - - @0xsequence/core@2.2.1 - - @0xsequence/wallet@2.2.1 - -## 2.2.0 - -### Minor Changes - -- indexer: gateway client -- @0xsequence/builder -- upgrade puppeteer to v23.10.3 - -### Patch Changes - -- Updated dependencies -- Updated dependencies -- Updated dependencies - - @0xsequence/abi@2.2.0 - - @0xsequence/core@2.2.0 - - @0xsequence/wallet@2.2.0 - -## 2.1.8 - -### Patch Changes - -- Add Soneium Mainnet -- Updated dependencies - - @0xsequence/abi@2.1.8 - - @0xsequence/core@2.1.8 - - @0xsequence/wallet@2.1.8 - -## 2.1.7 - -### Patch Changes - -- guard: pass project access key to guard requests -- Updated dependencies - - @0xsequence/abi@2.1.7 - - @0xsequence/core@2.1.7 - - @0xsequence/wallet@2.1.7 - -## 2.1.6 - -### Patch Changes - -- Add LAOS and Telos Testnet chains -- Updated dependencies - - @0xsequence/abi@2.1.6 - - @0xsequence/core@2.1.6 - - @0xsequence/wallet@2.1.6 - -## 2.1.5 - -### Patch Changes - -- account: save presigned configuration with reference chain id 1 -- Updated dependencies - - @0xsequence/abi@2.1.5 - - @0xsequence/core@2.1.5 - - @0xsequence/wallet@2.1.5 - -## 2.1.4 - -### Patch Changes - -- provider: pass projectAccessKey into MuxMessageProvider -- Updated dependencies - - @0xsequence/abi@2.1.4 - - @0xsequence/core@2.1.4 - - @0xsequence/wallet@2.1.4 - -## 2.1.3 - -### Patch Changes - -- waas: time drift date fix due to strange browser quirk -- Updated dependencies - - @0xsequence/abi@2.1.3 - - @0xsequence/core@2.1.3 - - @0xsequence/wallet@2.1.3 - -## 2.1.2 - -### Patch Changes - -- provider: export analytics correctly -- Updated dependencies - - @0xsequence/abi@2.1.2 - - @0xsequence/core@2.1.2 - - @0xsequence/wallet@2.1.2 - -## 2.1.1 - -### Patch Changes - -- Add LAOS chain support -- Updated dependencies - - @0xsequence/abi@2.1.1 - - @0xsequence/core@2.1.1 - - @0xsequence/wallet@2.1.1 - -## 2.1.0 - -### Minor Changes - -- account: forward project access key when estimating fees and sending transactions - -### Patch Changes - -- sessions: save signatures with reference chain id -- Updated dependencies -- Updated dependencies - - @0xsequence/abi@2.1.0 - - @0xsequence/core@2.1.0 - - @0xsequence/wallet@2.1.0 - -## 2.0.26 - -### Patch Changes - -- account: fix chain id comparison -- Updated dependencies - - @0xsequence/abi@2.0.26 - - @0xsequence/core@2.0.26 - - @0xsequence/wallet@2.0.26 - -## 2.0.25 - -### Patch Changes - -- skale-nebula: deploy gas limit = 10m -- Updated dependencies - - @0xsequence/abi@2.0.25 - - @0xsequence/core@2.0.25 - - @0xsequence/wallet@2.0.25 - -## 2.0.24 - -### Patch Changes - -- sessions: arweave: configurable gateway url -- waas: use /status to get time drift before sending any intents -- Updated dependencies -- Updated dependencies - - @0xsequence/abi@2.0.24 - - @0xsequence/core@2.0.24 - - @0xsequence/wallet@2.0.24 - -## 2.0.23 - -### Patch Changes - -- Add The Root Network support -- Updated dependencies - - @0xsequence/abi@2.0.23 - - @0xsequence/core@2.0.23 - - @0xsequence/wallet@2.0.23 - -## 2.0.22 - -### Patch Changes - -- Add SKALE Nebula Mainnet support -- Updated dependencies - - @0xsequence/abi@2.0.22 - - @0xsequence/core@2.0.22 - - @0xsequence/wallet@2.0.22 - -## 2.0.21 - -### Patch Changes - -- account: add publishWitnessFor -- Updated dependencies - - @0xsequence/abi@2.0.21 - - @0xsequence/core@2.0.21 - - @0xsequence/wallet@2.0.21 - -## 2.0.20 - -### Patch Changes - -- upgrade deps, and improve waas session status handling -- Updated dependencies - - @0xsequence/abi@2.0.20 - - @0xsequence/core@2.0.20 - - @0xsequence/wallet@2.0.20 - -## 2.0.19 - -### Patch Changes - -- Add Immutable zkEVM support -- Updated dependencies - - @0xsequence/abi@2.0.19 - - @0xsequence/core@2.0.19 - - @0xsequence/wallet@2.0.19 - -## 2.0.18 - -### Patch Changes - -- waas: new contractCall transaction type -- sessions: add arweave owner -- Updated dependencies -- Updated dependencies - - @0xsequence/abi@2.0.18 - - @0xsequence/core@2.0.18 - - @0xsequence/wallet@2.0.18 - -## 2.0.17 - -### Patch Changes - -- update waas auth to clear session before signIn -- Updated dependencies - - @0xsequence/abi@2.0.17 - - @0xsequence/core@2.0.17 - - @0xsequence/wallet@2.0.17 - -## 2.0.16 - -### Patch Changes - -- Removed Astar chains -- Updated dependencies - - @0xsequence/abi@2.0.16 - - @0xsequence/core@2.0.16 - - @0xsequence/wallet@2.0.16 - -## 2.0.15 - -### Patch Changes - -- indexer: update bindings with token balance additions -- Updated dependencies - - @0xsequence/abi@2.0.15 - - @0xsequence/core@2.0.15 - - @0xsequence/wallet@2.0.15 - -## 2.0.14 - -### Patch Changes - -- sessions: arweave config reader -- network: add b3 and apechain mainnet configs -- Updated dependencies -- Updated dependencies - - @0xsequence/abi@2.0.14 - - @0xsequence/core@2.0.14 - - @0xsequence/wallet@2.0.14 - -## 2.0.13 - -### Patch Changes - -- network: toy-testnet -- Updated dependencies - - @0xsequence/abi@2.0.13 - - @0xsequence/core@2.0.13 - - @0xsequence/wallet@2.0.13 - -## 2.0.12 - -### Patch Changes - -- api: update bindings -- Updated dependencies - - @0xsequence/abi@2.0.12 - - @0xsequence/core@2.0.12 - - @0xsequence/wallet@2.0.12 - -## 2.0.11 - -### Patch Changes - -- waas: intents test fix -- api: update bindings -- Updated dependencies -- Updated dependencies - - @0xsequence/abi@2.0.11 - - @0xsequence/core@2.0.11 - - @0xsequence/wallet@2.0.11 - -## 2.0.10 - -### Patch Changes - -- network: soneium minato testnet -- Updated dependencies - - @0xsequence/abi@2.0.10 - - @0xsequence/core@2.0.10 - - @0xsequence/wallet@2.0.10 - -## 2.0.9 - -### Patch Changes - -- network: fix SKALE network name -- Updated dependencies - - @0xsequence/abi@2.0.9 - - @0xsequence/core@2.0.9 - - @0xsequence/wallet@2.0.9 - -## 2.0.8 - -### Patch Changes - -- metadata: update bindings -- Updated dependencies - - @0xsequence/abi@2.0.8 - - @0xsequence/core@2.0.8 - - @0xsequence/wallet@2.0.8 - -## 2.0.7 - -### Patch Changes - -- wallet request handler fix -- Updated dependencies - - @0xsequence/abi@2.0.7 - - @0xsequence/core@2.0.7 - - @0xsequence/wallet@2.0.7 - -## 2.0.6 - -### Patch Changes - -- network: matic -> pol -- Updated dependencies - - @0xsequence/abi@2.0.6 - - @0xsequence/core@2.0.6 - - @0xsequence/wallet@2.0.6 - -## 2.0.5 - -### Patch Changes - -- provider: update databeat to 0.9.2 -- Updated dependencies - - @0xsequence/abi@2.0.5 - - @0xsequence/core@2.0.5 - - @0xsequence/wallet@2.0.5 - -## 2.0.4 - -### Patch Changes - -- network: add skale-nebula-testnet -- Updated dependencies - - @0xsequence/abi@2.0.4 - - @0xsequence/core@2.0.4 - - @0xsequence/wallet@2.0.4 - -## 2.0.3 - -### Patch Changes - -- waas: check session status in SequenceWaaS.isSignedIn() -- Updated dependencies - - @0xsequence/abi@2.0.3 - - @0xsequence/core@2.0.3 - - @0xsequence/wallet@2.0.3 - -## 2.0.2 - -### Patch Changes - -- sessions: property convert serialized bignumber hex value to bigint -- Updated dependencies - - @0xsequence/abi@2.0.2 - - @0xsequence/core@2.0.2 - - @0xsequence/wallet@2.0.2 - -## 2.0.1 - -### Patch Changes - -- waas: http signature check for authenticator requests -- provider: unwrap legacy json rpc responses -- use json replacer and reviver for bigints -- Updated dependencies -- Updated dependencies -- Updated dependencies - - @0xsequence/abi@2.0.1 - - @0xsequence/core@2.0.1 - - @0xsequence/wallet@2.0.1 - -## 2.0.0 - -### Major Changes - -- ethers v6 - -### Patch Changes - -- Updated dependencies - - @0xsequence/abi@2.0.0 - - @0xsequence/core@2.0.0 - - @0xsequence/wallet@2.0.0 - -## 1.10.15 - -### Patch Changes - -- utils: extractProjectIdFromAccessKey -- Updated dependencies - - @0xsequence/abi@1.10.15 - - @0xsequence/core@1.10.15 - - @0xsequence/wallet@1.10.15 - -## 1.10.14 - -### Patch Changes - -- network: add borne-testnet to allNetworks -- Updated dependencies - - @0xsequence/abi@1.10.14 - - @0xsequence/core@1.10.14 - - @0xsequence/wallet@1.10.14 - -## 1.10.13 - -### Patch Changes - -- network: add borne testnet -- Updated dependencies - - @0xsequence/abi@1.10.13 - - @0xsequence/core@1.10.13 - - @0xsequence/wallet@1.10.13 - -## 1.10.12 - -### Patch Changes - -- api: update bindings -- global/window -> globalThis -- Updated dependencies -- Updated dependencies - - @0xsequence/abi@1.10.12 - - @0xsequence/core@1.10.12 - - @0xsequence/wallet@1.10.12 - -## 1.10.11 - -### Patch Changes - -- waas: updated intent.gen without webrpc types, errors exported from authenticator.gen -- Updated dependencies - - @0xsequence/abi@1.10.11 - - @0xsequence/core@1.10.11 - - @0xsequence/wallet@1.10.11 - -## 1.10.10 - -### Patch Changes - -- metadata: update bindings with new contract collections api -- Updated dependencies - - @0xsequence/abi@1.10.10 - - @0xsequence/core@1.10.10 - - @0xsequence/wallet@1.10.10 - -## 1.10.9 - -### Patch Changes - -- waas minor update -- Updated dependencies - - @0xsequence/abi@1.10.9 - - @0xsequence/core@1.10.9 - - @0xsequence/wallet@1.10.9 - -## 1.10.8 - -### Patch Changes - -- update metadata bindings -- Updated dependencies - - @0xsequence/abi@1.10.8 - - @0xsequence/core@1.10.8 - - @0xsequence/wallet@1.10.8 - -## 1.10.7 - -### Patch Changes - -- minor fixes to waas client -- Updated dependencies - - @0xsequence/abi@1.10.7 - - @0xsequence/core@1.10.7 - - @0xsequence/wallet@1.10.7 - -## 1.10.6 - -### Patch Changes - -- metadata: update bindings -- Updated dependencies - - @0xsequence/abi@1.10.6 - - @0xsequence/core@1.10.6 - - @0xsequence/wallet@1.10.6 - -## 1.10.5 - -### Patch Changes - -- network: ape-chain-testnet -> apechain-testnet -- Updated dependencies - - @0xsequence/abi@1.10.5 - - @0xsequence/core@1.10.5 - - @0xsequence/wallet@1.10.5 - -## 1.10.4 - -### Patch Changes - -- network: add b3-sepolia, ape-chain-testnet, blast, blast-sepolia -- Updated dependencies - - @0xsequence/abi@1.10.4 - - @0xsequence/core@1.10.4 - - @0xsequence/wallet@1.10.4 - -## 1.10.3 - -### Patch Changes - -- typing fix -- Updated dependencies - - @0xsequence/abi@1.10.3 - - @0xsequence/core@1.10.3 - - @0xsequence/wallet@1.10.3 - -## 1.10.2 - -### Patch Changes - -- - waas: add getIdToken method - - indexer: update api client -- Updated dependencies - - @0xsequence/abi@1.10.2 - - @0xsequence/core@1.10.2 - - @0xsequence/wallet@1.10.2 - -## 1.10.1 - -### Patch Changes - -- metadata: update bindings -- Updated dependencies - - @0xsequence/abi@1.10.1 - - @0xsequence/core@1.10.1 - - @0xsequence/wallet@1.10.1 - -## 1.10.0 - -### Minor Changes - -- waas release v1.3.0 - -### Patch Changes - -- Updated dependencies - - @0xsequence/abi@1.10.0 - - @0xsequence/core@1.10.0 - - @0xsequence/wallet@1.10.0 - -## 1.9.37 - -### Patch Changes - -- network: adds nativeToken data to NetworkMetadata constants -- Updated dependencies - - @0xsequence/abi@1.9.37 - - @0xsequence/core@1.9.37 - - @0xsequence/wallet@1.9.37 - -## 1.9.36 - -### Patch Changes - -- guard: export client -- Updated dependencies - - @0xsequence/abi@1.9.36 - - @0xsequence/core@1.9.36 - - @0xsequence/wallet@1.9.36 - -## 1.9.35 - -### Patch Changes - -- guard: update bindings -- Updated dependencies - - @0xsequence/abi@1.9.35 - - @0xsequence/core@1.9.35 - - @0xsequence/wallet@1.9.35 - -## 1.9.34 - -### Patch Changes - -- waas: always use lowercase email -- Updated dependencies - - @0xsequence/abi@1.9.34 - - @0xsequence/core@1.9.34 - - @0xsequence/wallet@1.9.34 - -## 1.9.33 - -### Patch Changes - -- waas: umd build -- Updated dependencies - - @0xsequence/abi@1.9.33 - - @0xsequence/core@1.9.33 - - @0xsequence/wallet@1.9.33 - -## 1.9.32 - -### Patch Changes - -- indexer: update bindings -- Updated dependencies - - @0xsequence/abi@1.9.32 - - @0xsequence/core@1.9.32 - - @0xsequence/wallet@1.9.32 - -## 1.9.31 - -### Patch Changes - -- metadata: token directory changes -- Updated dependencies - - @0xsequence/abi@1.9.31 - - @0xsequence/core@1.9.31 - - @0xsequence/wallet@1.9.31 - -## 1.9.30 - -### Patch Changes - -- update -- Updated dependencies - - @0xsequence/abi@1.9.30 - - @0xsequence/core@1.9.30 - - @0xsequence/wallet@1.9.30 - -## 1.9.29 - -### Patch Changes - -- disable gnosis chain -- Updated dependencies - - @0xsequence/abi@1.9.29 - - @0xsequence/core@1.9.29 - - @0xsequence/wallet@1.9.29 - -## 1.9.28 - -### Patch Changes - -- add utils/merkletree -- Updated dependencies - - @0xsequence/abi@1.9.28 - - @0xsequence/core@1.9.28 - - @0xsequence/wallet@1.9.28 - -## 1.9.27 - -### Patch Changes - -- network: optimistic -> optimism -- waas: remove defaults -- api, sessions: update bindings -- Updated dependencies -- Updated dependencies -- Updated dependencies - - @0xsequence/abi@1.9.27 - - @0xsequence/core@1.9.27 - - @0xsequence/wallet@1.9.27 - -## 1.9.26 - -### Patch Changes - -- - add backend interfaces for pluggable interfaces - - introduce @0xsequence/react-native - - update pnpm to lockfile v9 -- Updated dependencies - - @0xsequence/abi@1.9.26 - - @0xsequence/core@1.9.26 - - @0xsequence/wallet@1.9.26 - -## 1.9.25 - -### Patch Changes - -- update webrpc clients with new error types -- Updated dependencies - - @0xsequence/abi@1.9.25 - - @0xsequence/core@1.9.25 - - @0xsequence/wallet@1.9.25 - -## 1.9.24 - -### Patch Changes - -- waas: add memoryStore backend to localStore -- Updated dependencies - - @0xsequence/abi@1.9.24 - - @0xsequence/core@1.9.24 - - @0xsequence/wallet@1.9.24 - -## 1.9.23 - -### Patch Changes - -- update api client bindings -- Updated dependencies - - @0xsequence/abi@1.9.23 - - @0xsequence/core@1.9.23 - - @0xsequence/wallet@1.9.23 - -## 1.9.22 - -### Patch Changes - -- update metadata client bindings -- Updated dependencies - - @0xsequence/abi@1.9.22 - - @0xsequence/core@1.9.22 - - @0xsequence/wallet@1.9.22 - -## 1.9.21 - -### Patch Changes - -- api client bindings -- Updated dependencies - - @0xsequence/abi@1.9.21 - - @0xsequence/core@1.9.21 - - @0xsequence/wallet@1.9.21 - -## 1.9.20 - -### Patch Changes - -- api client bindings update -- Updated dependencies - - @0xsequence/abi@1.9.20 - - @0xsequence/core@1.9.20 - - @0xsequence/wallet@1.9.20 - -## 1.9.19 - -### Patch Changes - -- waas update -- Updated dependencies - - @0xsequence/abi@1.9.19 - - @0xsequence/core@1.9.19 - - @0xsequence/wallet@1.9.19 - -## 1.9.18 - -### Patch Changes - -- provider: prohibit dangerous functions -- Updated dependencies - - @0xsequence/abi@1.9.18 - - @0xsequence/core@1.9.18 - - @0xsequence/wallet@1.9.18 - -## 1.9.17 - -### Patch Changes - -- network: add xr-sepolia -- Updated dependencies - - @0xsequence/abi@1.9.17 - - @0xsequence/core@1.9.17 - - @0xsequence/wallet@1.9.17 - -## 1.9.16 - -### Patch Changes - -- waas: sequence.feeOptions -- Updated dependencies - - @0xsequence/abi@1.9.16 - - @0xsequence/core@1.9.16 - - @0xsequence/wallet@1.9.16 - -## 1.9.15 - -### Patch Changes - -- metadata: collection external_link field name fix -- Updated dependencies - - @0xsequence/abi@1.9.15 - - @0xsequence/core@1.9.15 - - @0xsequence/wallet@1.9.15 - -## 1.9.14 - -### Patch Changes - -- network: astar-zkatana -> astar-zkyoto -- network: deprecate polygon mumbai network -- network: add xai and polygon amoy -- Updated dependencies -- Updated dependencies -- Updated dependencies - - @0xsequence/abi@1.9.14 - - @0xsequence/core@1.9.14 - - @0xsequence/wallet@1.9.14 - -## 1.9.13 - -### Patch Changes - -- waas: fix @0xsequence/network dependency -- Updated dependencies - - @0xsequence/abi@1.9.13 - - @0xsequence/core@1.9.13 - - @0xsequence/wallet@1.9.13 - -## 1.9.12 - -### Patch Changes - -- indexer: update rpc bindings -- provider: signMessage: Serialize the BytesLike or string message into hexstring before sending -- waas: SessionAuthProof -- Updated dependencies -- Updated dependencies -- Updated dependencies - - @0xsequence/abi@1.9.12 - - @0xsequence/core@1.9.12 - - @0xsequence/wallet@1.9.12 - -## 1.9.11 - -### Patch Changes - -- metdata, update rpc bindings -- Updated dependencies - - @0xsequence/abi@1.9.11 - - @0xsequence/core@1.9.11 - - @0xsequence/wallet@1.9.11 - -## 1.9.10 - -### Patch Changes - -- update metadata rpc bindings -- Updated dependencies - - @0xsequence/abi@1.9.10 - - @0xsequence/core@1.9.10 - - @0xsequence/wallet@1.9.10 - -## 1.9.9 - -### Patch Changes - -- metadata, add SequenceCollections rpc client -- Updated dependencies - - @0xsequence/abi@1.9.9 - - @0xsequence/core@1.9.9 - - @0xsequence/wallet@1.9.9 - -## 1.9.8 - -### Patch Changes - -- waas client update -- Updated dependencies - - @0xsequence/abi@1.9.8 - - @0xsequence/core@1.9.8 - - @0xsequence/wallet@1.9.8 - -## 1.9.7 - -### Patch Changes - -- update rpc client bindings for api, metadata and relayer -- Updated dependencies - - @0xsequence/abi@1.9.7 - - @0xsequence/core@1.9.7 - - @0xsequence/wallet@1.9.7 - -## 1.9.6 - -### Patch Changes - -- waas package update -- Updated dependencies - - @0xsequence/abi@1.9.6 - - @0xsequence/core@1.9.6 - - @0xsequence/wallet@1.9.6 - -## 1.9.5 - -### Patch Changes - -- RpcRelayer prioritize project access key -- Updated dependencies - - @0xsequence/abi@1.9.5 - - @0xsequence/core@1.9.5 - - @0xsequence/wallet@1.9.5 - -## 1.9.4 - -### Patch Changes - -- waas: fix network dependency -- Updated dependencies - - @0xsequence/abi@1.9.4 - - @0xsequence/core@1.9.4 - - @0xsequence/wallet@1.9.4 - -## 1.9.3 - -### Patch Changes - -- provider: don't append access key to RPC url if user has already provided it -- Updated dependencies - - @0xsequence/abi@1.9.3 - - @0xsequence/core@1.9.3 - - @0xsequence/wallet@1.9.3 - -## 1.9.2 - -### Patch Changes - -- network: add xai-sepolia -- Updated dependencies - - @0xsequence/abi@1.9.2 - - @0xsequence/core@1.9.2 - - @0xsequence/wallet@1.9.2 - -## 1.9.1 - -### Patch Changes - -- analytics fix -- Updated dependencies - - @0xsequence/abi@1.9.1 - - @0xsequence/core@1.9.1 - - @0xsequence/wallet@1.9.1 - -## 1.9.0 - -### Minor Changes - -- waas release - -### Patch Changes - -- Updated dependencies - - @0xsequence/abi@1.9.0 - - @0xsequence/core@1.9.0 - - @0xsequence/wallet@1.9.0 - -## 1.8.8 - -### Patch Changes - -- update metadata bindings -- Updated dependencies - - @0xsequence/abi@1.8.8 - - @0xsequence/core@1.8.8 - - @0xsequence/wallet@1.8.8 - -## 1.8.7 - -### Patch Changes - -- provider: update databeat to 0.9.1 -- Updated dependencies - - @0xsequence/abi@1.8.7 - - @0xsequence/core@1.8.7 - - @0xsequence/wallet@1.8.7 - -## 1.8.6 - -### Patch Changes - -- guard: SignedOwnershipProof -- Updated dependencies - - @0xsequence/abi@1.8.6 - - @0xsequence/core@1.8.6 - - @0xsequence/wallet@1.8.6 - -## 1.8.5 - -### Patch Changes - -- guard: signOwnershipProof and isSignedOwnershipProof -- Updated dependencies - - @0xsequence/abi@1.8.5 - - @0xsequence/core@1.8.5 - - @0xsequence/wallet@1.8.5 - -## 1.8.4 - -### Patch Changes - -- network: add homeverse to networks list -- Updated dependencies - - @0xsequence/abi@1.8.4 - - @0xsequence/core@1.8.4 - - @0xsequence/wallet@1.8.4 - -## 1.8.3 - -### Patch Changes - -- api: introduce basic linked wallet support -- Updated dependencies - - @0xsequence/abi@1.8.3 - - @0xsequence/core@1.8.3 - - @0xsequence/wallet@1.8.3 - -## 1.8.2 - -### Patch Changes - -- provider: don't initialize analytics unless explicitly requested -- Updated dependencies - - @0xsequence/abi@1.8.2 - - @0xsequence/core@1.8.2 - - @0xsequence/wallet@1.8.2 - -## 1.8.1 - -### Patch Changes - -- update to analytics provider -- Updated dependencies - - @0xsequence/abi@1.8.1 - - @0xsequence/core@1.8.1 - - @0xsequence/wallet@1.8.1 - -## 1.8.0 - -### Minor Changes - -- provider: project analytics - -### Patch Changes - -- Updated dependencies - - @0xsequence/abi@1.8.0 - - @0xsequence/core@1.8.0 - - @0xsequence/wallet@1.8.0 - -## 1.7.2 - -### Patch Changes - -- 0xsequence: ChainId should not be exported as a type -- account, wallet: fix nonce selection -- Updated dependencies -- Updated dependencies - - @0xsequence/abi@1.7.2 - - @0xsequence/core@1.7.2 - - @0xsequence/wallet@1.7.2 - -## 1.7.1 - -### Patch Changes - -- network: add missing avalanche logoURI -- Updated dependencies - - @0xsequence/abi@1.7.1 - - @0xsequence/core@1.7.1 - - @0xsequence/wallet@1.7.1 - -## 1.7.0 - -### Minor Changes - -- provider: projectAccessKey is now required - -### Patch Changes - -- network: add NetworkMetadata.logoURI property for all networks -- Updated dependencies -- Updated dependencies - - @0xsequence/abi@1.7.0 - - @0xsequence/core@1.7.0 - - @0xsequence/wallet@1.7.0 - -## 1.6.3 - -### Patch Changes - -- network list update -- Updated dependencies - - @0xsequence/abi@1.6.3 - - @0xsequence/core@1.6.3 - - @0xsequence/wallet@1.6.3 - -## 1.6.2 - -### Patch Changes - -- auth: projectAccessKey option -- wallet: use 12 bytes for random space -- Updated dependencies -- Updated dependencies - - @0xsequence/abi@1.6.2 - - @0xsequence/core@1.6.2 - - @0xsequence/wallet@1.6.2 - -## 1.6.1 - -### Patch Changes - -- core: add simple config from subdigest support -- core: fix encode tree with subdigest -- account: implement buildOnChainSignature on Account -- Updated dependencies -- Updated dependencies -- Updated dependencies - - @0xsequence/abi@1.6.1 - - @0xsequence/core@1.6.1 - - @0xsequence/wallet@1.6.1 - -## 1.6.0 - -### Minor Changes - -- account, wallet: parallel transactions by default - -### Patch Changes - -- provider: emit disconnect on sign out -- Updated dependencies -- Updated dependencies - - @0xsequence/abi@1.6.0 - - @0xsequence/core@1.6.0 - - @0xsequence/wallet@1.6.0 - -## 1.5.0 - -### Minor Changes - -- signhub: add 'signing' signer status - -### Patch Changes - -- auth: Session.open: onAccountAddress callback -- account: allow empty transaction bundles -- Updated dependencies -- Updated dependencies -- Updated dependencies - - @0xsequence/abi@1.5.0 - - @0xsequence/core@1.5.0 - - @0xsequence/wallet@1.5.0 - -## 1.4.9 - -### Patch Changes - -- rename SequenceMetadataClient to SequenceMetadata -- Updated dependencies - - @0xsequence/abi@1.4.9 - - @0xsequence/core@1.4.9 - - @0xsequence/wallet@1.4.9 - -## 1.4.8 - -### Patch Changes - -- account: Account.getSigners -- Updated dependencies - - @0xsequence/abi@1.4.8 - - @0xsequence/core@1.4.8 - - @0xsequence/wallet@1.4.8 - -## 1.4.7 - -### Patch Changes - -- update indexer client bindings -- Updated dependencies - - @0xsequence/abi@1.4.7 - - @0xsequence/core@1.4.7 - - @0xsequence/wallet@1.4.7 - -## 1.4.6 - -### Patch Changes - -- - add sepolia networks, mark goerli as deprecated - - update indexer client bindings -- Updated dependencies - - @0xsequence/abi@1.4.6 - - @0xsequence/core@1.4.6 - - @0xsequence/wallet@1.4.6 - -## 1.4.5 - -### Patch Changes - -- indexer/metadata: update client bindings -- auth: selectWallet with new address -- Updated dependencies -- Updated dependencies - - @0xsequence/abi@1.4.5 - - @0xsequence/core@1.4.5 - - @0xsequence/wallet@1.4.5 - -## 1.4.4 - -### Patch Changes - -- indexer: update bindings -- auth: handle jwt expiry -- Updated dependencies -- Updated dependencies - - @0xsequence/abi@1.4.4 - - @0xsequence/core@1.4.4 - - @0xsequence/wallet@1.4.4 - -## 1.4.3 - -### Patch Changes - -- guard: return active status from GuardSigner.getAuthMethods -- Updated dependencies - - @0xsequence/abi@1.4.3 - - @0xsequence/core@1.4.3 - - @0xsequence/wallet@1.4.3 - -## 1.4.2 - -### Patch Changes - -- guard: update bindings -- Updated dependencies - - @0xsequence/abi@1.4.2 - - @0xsequence/core@1.4.2 - - @0xsequence/wallet@1.4.2 - -## 1.4.1 - -### Patch Changes - -- network: remove unused networks -- signhub: orchestrator interface -- guard: auth methods interface -- guard: update bindings for pin and totp -- guard: no more retry logic -- Updated dependencies -- Updated dependencies -- Updated dependencies -- Updated dependencies -- Updated dependencies - - @0xsequence/abi@1.4.1 - - @0xsequence/core@1.4.1 - - @0xsequence/wallet@1.4.1 - -## 1.4.0 - -### Minor Changes - -- project access key support - -### Patch Changes - -- Updated dependencies - - @0xsequence/abi@1.4.0 - - @0xsequence/core@1.4.0 - - @0xsequence/wallet@1.4.0 - -## 1.3.0 - -### Minor Changes - -- signhub: account children - -### Patch Changes - -- guard: do not throw when building deploy transaction -- network: snowtrace.io -> subnets.avax.network/c-chain -- Updated dependencies -- Updated dependencies -- Updated dependencies - - @0xsequence/abi@1.3.0 - - @0xsequence/core@1.3.0 - - @0xsequence/wallet@1.3.0 - -## 1.2.9 - -### Patch Changes - -- account: AccountSigner.sendTransaction simulateForFeeOptions -- relayer: update bindings -- Updated dependencies -- Updated dependencies - - @0xsequence/abi@1.2.9 - - @0xsequence/core@1.2.9 - - @0xsequence/wallet@1.2.9 - -## 1.2.8 - -### Patch Changes - -- rename X-Sequence-Token-Key header to X-Access-Key -- Updated dependencies - - @0xsequence/abi@1.2.8 - - @0xsequence/core@1.2.8 - - @0xsequence/wallet@1.2.8 - -## 1.2.7 - -### Patch Changes - -- add x-sequence-token-key to clients -- Updated dependencies - - @0xsequence/abi@1.2.7 - - @0xsequence/core@1.2.7 - - @0xsequence/wallet@1.2.7 - -## 1.2.6 - -### Patch Changes - -- Fix bind multicall provider -- Updated dependencies - - @0xsequence/abi@1.2.6 - - @0xsequence/core@1.2.6 - - @0xsequence/wallet@1.2.6 - -## 1.2.5 - -### Patch Changes - -- Multicall default configuration fixes -- Updated dependencies - - @0xsequence/abi@1.2.5 - - @0xsequence/core@1.2.5 - - @0xsequence/wallet@1.2.5 - -## 1.2.4 - -### Patch Changes - -- provider: Adding missing payment provider types to PaymentProviderOption -- provider: WalletRequestHandler.notifyChainChanged -- Updated dependencies -- Updated dependencies - - @0xsequence/abi@1.2.4 - - @0xsequence/core@1.2.4 - - @0xsequence/wallet@1.2.4 - -## 1.2.3 - -### Patch Changes - -- auth, provider: connect to accept optional authorizeNonce -- Updated dependencies - - @0xsequence/abi@1.2.3 - - @0xsequence/core@1.2.3 - - @0xsequence/wallet@1.2.3 - -## 1.2.2 - -### Patch Changes - -- provider: allow createContract calls -- core: check for explicit zero address in contract deployments -- Updated dependencies -- Updated dependencies - - @0xsequence/abi@1.2.2 - - @0xsequence/core@1.2.2 - - @0xsequence/wallet@1.2.2 - -## 1.2.1 - -### Patch Changes - -- auth: use sequence api chain id as reference chain id if available -- Updated dependencies - - @0xsequence/abi@1.2.1 - - @0xsequence/core@1.2.1 - - @0xsequence/wallet@1.2.1 - -## 1.2.0 - -### Minor Changes - -- split services from session, better local support - -### Patch Changes - -- Updated dependencies - - @0xsequence/abi@1.2.0 - - @0xsequence/core@1.2.0 - - @0xsequence/wallet@1.2.0 - -## 1.1.15 - -### Patch Changes - -- guard: remove error filtering -- Updated dependencies - - @0xsequence/abi@1.1.15 - - @0xsequence/core@1.1.15 - - @0xsequence/wallet@1.1.15 - -## 1.1.14 - -### Patch Changes - -- guard: add GuardSigner.onError -- Updated dependencies - - @0xsequence/abi@1.1.14 - - @0xsequence/core@1.1.14 - - @0xsequence/wallet@1.1.14 - -## 1.1.13 - -### Patch Changes - -- provider: pass client version with connect options -- provider: removing large from BannerSize -- Updated dependencies -- Updated dependencies - - @0xsequence/abi@1.1.13 - - @0xsequence/core@1.1.13 - - @0xsequence/wallet@1.1.13 - -## 1.1.12 - -### Patch Changes - -- provider: adding bannerSize to ConnectOptions -- Updated dependencies - - @0xsequence/abi@1.1.12 - - @0xsequence/core@1.1.12 - - @0xsequence/wallet@1.1.12 - -## 1.1.11 - -### Patch Changes - -- add homeverse configs -- Updated dependencies - - @0xsequence/abi@1.1.11 - - @0xsequence/core@1.1.11 - - @0xsequence/wallet@1.1.11 - -## 1.1.10 - -### Patch Changes - -- handle default EIP6492 on send -- Updated dependencies - - @0xsequence/abi@1.1.10 - - @0xsequence/core@1.1.10 - - @0xsequence/wallet@1.1.10 - -## 1.1.9 - -### Patch Changes - -- Custom default EIP6492 on client -- Updated dependencies - - @0xsequence/abi@1.1.9 - - @0xsequence/core@1.1.9 - - @0xsequence/wallet@1.1.9 - -## 1.1.8 - -### Patch Changes - -- metadata: searchMetadata: add types filter -- Updated dependencies - - @0xsequence/abi@1.1.8 - - @0xsequence/core@1.1.8 - - @0xsequence/wallet@1.1.8 - -## 1.1.7 - -### Patch Changes - -- adding signInWith connect settings option to allow dapps to automatically login their users with a certain provider optimizing the normal authentication flow -- Updated dependencies - - @0xsequence/abi@1.1.7 - - @0xsequence/core@1.1.7 - - @0xsequence/wallet@1.1.7 - -## 1.1.6 - -### Patch Changes - -- metadata: searchMetadata: add chainID and excludeTokenMetadata filters -- Updated dependencies - - @0xsequence/abi@1.1.6 - - @0xsequence/core@1.1.6 - - @0xsequence/wallet@1.1.6 - -## 1.1.5 - -### Patch Changes - -- account: re-compute meta-transaction id for wallet deployment transactions -- Updated dependencies - - @0xsequence/abi@1.1.5 - - @0xsequence/core@1.1.5 - - @0xsequence/wallet@1.1.5 - -## 1.1.4 - -### Patch Changes - -- network: rename base-mainnet to base -- provider: override isDefaultChain with ConnectOptions.networkId if provided -- Updated dependencies -- Updated dependencies - - @0xsequence/abi@1.1.4 - - @0xsequence/core@1.1.4 - - @0xsequence/wallet@1.1.4 - -## 1.1.3 - -### Patch Changes - -- provider: use network id from transport session -- provider: sign authorization using ConnectOptions.networkId if provided -- Updated dependencies -- Updated dependencies - - @0xsequence/abi@1.1.3 - - @0xsequence/core@1.1.3 - - @0xsequence/wallet@1.1.3 - -## 1.1.2 - -### Patch Changes - -- provider: jsonrpc chain id fixes -- Updated dependencies - - @0xsequence/abi@1.1.2 - - @0xsequence/core@1.1.2 - - @0xsequence/wallet@1.1.2 - -## 1.1.1 - -### Patch Changes - -- network: add base mainnet and sepolia -- provider: reject toxic transaction requests -- Updated dependencies -- Updated dependencies - - @0xsequence/abi@1.1.1 - - @0xsequence/core@1.1.1 - - @0xsequence/wallet@1.1.1 - -## 1.1.0 - -### Minor Changes - -- Refactor dapp facing provider - -### Patch Changes - -- Updated dependencies - - @0xsequence/abi@1.1.0 - - @0xsequence/core@1.1.0 - - @0xsequence/wallet@1.1.0 - -## 1.0.5 - -### Patch Changes - -- network: export network constants -- guard: use the correct global for fetch -- network: nova-explorer.arbitrum.io -> nova.arbiscan.io -- Updated dependencies -- Updated dependencies -- Updated dependencies - - @0xsequence/abi@1.0.5 - - @0xsequence/core@1.0.5 - - @0xsequence/wallet@1.0.5 - -## 1.0.4 - -### Patch Changes - -- provider: accept name or number for networkId -- Updated dependencies - - @0xsequence/abi@1.0.4 - - @0xsequence/core@1.0.4 - - @0xsequence/wallet@1.0.4 - -## 1.0.3 - -### Patch Changes - -- Simpler isValidSignature helpers -- Updated dependencies - - @0xsequence/abi@1.0.3 - - @0xsequence/core@1.0.3 - - @0xsequence/wallet@1.0.3 - -## 1.0.2 - -### Patch Changes - -- add extra signature validation utils methods -- Updated dependencies - - @0xsequence/abi@1.0.2 - - @0xsequence/core@1.0.2 - - @0xsequence/wallet@1.0.2 - -## 1.0.1 - -### Patch Changes - -- add homeverse testnet -- Updated dependencies - - @0xsequence/abi@1.0.1 - - @0xsequence/core@1.0.1 - - @0xsequence/wallet@1.0.1 - -## 1.0.0 - -### Major Changes - -- https://sequence.xyz/blog/sequence-wallet-light-state-sync-full-merkle-wallets - -### Patch Changes - -- Updated dependencies - - @0xsequence/abi@1.0.0 - - @0xsequence/core@1.0.0 - - @0xsequence/wallet@1.0.0 diff --git a/old/packages/migration/package.json b/old/packages/migration/package.json deleted file mode 100644 index d92a8573f..000000000 --- a/old/packages/migration/package.json +++ /dev/null @@ -1,31 +0,0 @@ -{ - "name": "@0xsequence/migration", - "version": "2.3.8", - "description": "tools for migrating sequence wallets to new versions", - "repository": "https://github.com/0xsequence/sequence.js/tree/master/packages/migration", - "source": "src/index.ts", - "main": "dist/0xsequence-migration.cjs.js", - "module": "dist/0xsequence-migration.esm.js", - "author": "Horizon Blockchain Games", - "license": "Apache-2.0", - "scripts": { - "test": "echo 'TODO: Migration tests'" - }, - "peerDependencies": { - "ethers": ">=6" - }, - "dependencies": { - "@0xsequence/abi": "workspace:*", - "@0xsequence/core": "workspace:*", - "@0xsequence/wallet": "workspace:*" - }, - "devDependencies": { - "@istanbuljs/nyc-config-typescript": "^1.0.2", - "ethers": "6.13.4", - "nyc": "^15.1.0" - }, - "files": [ - "src", - "dist" - ] -} diff --git a/old/packages/migration/src/defaults.ts b/old/packages/migration/src/defaults.ts deleted file mode 100644 index ad2078e23..000000000 --- a/old/packages/migration/src/defaults.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { v1v2 } from './migrations' -import { Migrations } from './migrator' - -export const DefaultMigrations: Migrations = { - 1: v1v2 -} diff --git a/old/packages/migration/src/index.ts b/old/packages/migration/src/index.ts deleted file mode 100644 index 6f0c97c5f..000000000 --- a/old/packages/migration/src/index.ts +++ /dev/null @@ -1,4 +0,0 @@ -export * as version from './version' -export * as migration from './migrations' -export * as migrator from './migrator' -export * as defaults from './defaults' diff --git a/old/packages/migration/src/migrations/index.ts b/old/packages/migration/src/migrations/index.ts deleted file mode 100644 index 97b91e601..000000000 --- a/old/packages/migration/src/migrations/index.ts +++ /dev/null @@ -1,25 +0,0 @@ -import { commons } from '@0xsequence/core' -import { UnsignedMigration } from '../migrator' -import { Migration_v1v2 } from './migration_01_02' - -// = uint160(keccak256("org.sequence.sdk.migration.space.nonce")) -export const MIGRATION_NONCE_SPACE = '0xa04263acf755e8bd19c0d7e20eea39a9ff3729eb' - -export interface Migration

{ - version: number - - buildTransaction: (address: string, contexts: commons.context.VersionedContext, newConfig: P | C) => UnsignedMigration - - decodeTransaction: ( - tx: commons.transaction.TransactionBundle, - contexts: commons.context.VersionedContext - ) => { - address: string - newImageHash: string - } - - configCoder: commons.config.ConfigCoder - signatureCoder: commons.signature.SignatureCoder, commons.signature.UnrecoveredSignature> -} - -export const v1v2 = new Migration_v1v2() diff --git a/old/packages/migration/src/migrations/migration_01_02.ts b/old/packages/migration/src/migrations/migration_01_02.ts deleted file mode 100644 index 925d4422e..000000000 --- a/old/packages/migration/src/migrations/migration_01_02.ts +++ /dev/null @@ -1,113 +0,0 @@ -import { commons, v1, v2 } from '@0xsequence/core' -import { ethers } from 'ethers' - -import { Migration, MIGRATION_NONCE_SPACE } from '.' -import { walletContracts } from '@0xsequence/abi' -import { UnsignedMigration } from '../migrator' - -export class Migration_v1v2 implements Migration { - version = 2 - - configCoder = v2.config.ConfigCoder - signatureCoder = v2.signature.SignatureCoder - - buildTransaction( - address: string, - contexts: commons.context.VersionedContext, - newConfig: v1.config.WalletConfig | v2.config.WalletConfig - ): UnsignedMigration { - // If new config is not v2, then we need to convert it to v2 - if (!v2.config.ConfigCoder.isWalletConfig(newConfig)) { - const v2Config = v2.config.toWalletConfig({ - threshold: newConfig.threshold, - members: newConfig.signers, - checkpoint: 0 - }) - - return this.buildTransaction(address, contexts, v2Config) - } - - const context = contexts[2] - const contract = new ethers.Interface(walletContracts.mainModule.abi) - - // WARNING: v1 wallets CAN NOT use v2 configurations so we ALWAYS need to update - // both the implementation and the configuration at the same time - - const updateBundle = v2.config.ConfigCoder.update.buildTransaction(address, newConfig, context, 'first') - - const tx = { - entrypoint: address, - nonce: commons.transaction.encodeNonce(MIGRATION_NONCE_SPACE, 0), - transactions: [ - { - to: address, - value: 0, - gasLimit: 0, - revertOnError: true, - delegateCall: false, - data: contract.encodeFunctionData(contract.getFunction('updateImplementation')!, [context.mainModuleUpgradable]) - }, - ...updateBundle.transactions - ] - } - - return { - tx, - fromVersion: this.version - 1, - toVersion: this.version, - toConfig: newConfig - } - } - - decodeTransaction( - tx: commons.transaction.TransactionBundle, - contexts: commons.context.VersionedContext - ): { - address: string - newImageHash: string - } { - const address = tx.entrypoint - - if (tx.transactions.length < 2) { - throw new Error('Invalid transaction bundle size') - } - - if (!tx.nonce || commons.transaction.encodeNonce(MIGRATION_NONCE_SPACE, 0) !== BigInt(tx.nonce)) { - throw new Error('Invalid transaction bundle nonce') - } - - if ( - tx.transactions[0].to !== address || - tx.transactions[1].to !== address || - tx.transactions[0].delegateCall || - tx.transactions[1].delegateCall || - !tx.transactions[0].revertOnError || - !tx.transactions[1].revertOnError || - (tx.transactions[0].value && BigInt(tx.transactions[0].value) !== 0n) || - (tx.transactions[1].value && BigInt(tx.transactions[1].value) !== 0n) || - (tx.transactions[0].gasLimit && BigInt(tx.transactions[0].gasLimit) !== 0n) || - (tx.transactions[1].gasLimit && BigInt(tx.transactions[1].gasLimit) !== 0n) - ) { - throw new Error('Invalid transaction bundle format') - } - - const context = contexts[2] - const contract = new ethers.Interface(walletContracts.mainModule.abi) - - const data1 = ethers.hexlify(tx.transactions[0].data || new Uint8Array()) - const expectData1 = ethers.hexlify( - contract.encodeFunctionData(contract.getFunction('updateImplementation')!, [context.mainModuleUpgradable]) - ) - - if (data1 !== expectData1) { - throw new Error('Invalid new implementation on transaction') - } - - const decoded2 = v2.config.ConfigCoder.update.decodeTransaction({ entrypoint: address, transactions: [tx.transactions[1]] }) - if (decoded2.address !== address) { - throw new Error('Invalid transaction bundle address') - } - - return decoded2 - } -} diff --git a/old/packages/migration/src/migrator.ts b/old/packages/migration/src/migrator.ts deleted file mode 100644 index 4d00a609d..000000000 --- a/old/packages/migration/src/migrator.ts +++ /dev/null @@ -1,123 +0,0 @@ -import { commons } from '@0xsequence/core' -import { Wallet } from '@0xsequence/wallet' - -import { Migration } from './migrations' -import { ethers } from 'ethers' - -export type UnsignedMigration = { - tx: commons.transaction.TransactionBundle - fromVersion: number - toVersion: number - toConfig: commons.config.Config -} - -export type SignedMigration = Omit & { - tx: commons.transaction.SignedTransactionBundle -} - -export interface PresignedMigrationTracker { - getMigration( - address: string, - fromImageHash: string, - fromVersion: number, - chainId: ethers.BigNumberish - ): Promise - - saveMigration(address: string, signed: SignedMigration, contexts: commons.context.VersionedContext): Promise -} - -export type Migrations = { [version: number]: Migration } - -function validateMigrations(migrations: Migrations) { - for (const [version, migration] of Object.entries(migrations)) { - if (version !== String(migration.version - 1)) { - throw new Error(`Migration with key ${version} has version ${migration.version}, expected version to be key + 1`) - } - } -} - -export class Migrator { - constructor( - public readonly tracker: PresignedMigrationTracker, - public readonly migrations: Migrations, - public readonly contexts: commons.context.VersionedContext - ) { - validateMigrations(migrations) - } - - lastMigration(): Migration { - let last: Migration | undefined - for (const migration of Object.values(this.migrations)) { - if (last === undefined || migration.version > last.version) { - last = migration - } - } - if (last === undefined) { - throw new Error('No migrations') - } - return last - } - - async getAllMigratePresignedTransaction(args: { - address: string - fromImageHash: string - fromVersion: number - chainId: ethers.BigNumberish - }): Promise<{ - lastVersion: number - lastImageHash: string - signedMigrations: SignedMigration[] - missing: boolean - }> { - const { address, fromImageHash, fromVersion, chainId } = args - - let fih = fromImageHash - let fversion = fromVersion - - const versions = Object.values(this.contexts) - const migs: SignedMigration[] = [] - - for (let i = 1; i < versions.length; i++) { - const mig = await this.tracker.getMigration(address, fih, fversion, chainId) - if (!mig) return { signedMigrations: migs, missing: true, lastImageHash: fih, lastVersion: fversion } - - migs.push(mig) - - const migration = this.migrations[fversion] - if (!migration) { - throw new Error(`No migration found for version ${fversion}`) - } - - const decoded = migration.decodeTransaction(mig.tx, this.contexts) - if (decoded.address !== address) { - throw new Error(`Migration transaction address does not match expected address`) - } - - fih = decoded.newImageHash - fversion += 1 - } - - return { signedMigrations: migs, missing: false, lastImageHash: fih, lastVersion: fversion } - } - - async signNextMigration( - address: string, - fromVersion: number, - wallet: Wallet, - nextConfig: commons.config.Config - ): Promise { - const migration = this.migrations[fromVersion] - - if (!migration) { - return undefined - } - - const unsignedMigration = migration.buildTransaction(address, this.contexts, nextConfig) - const signedBundle = await wallet.signTransactionBundle(unsignedMigration.tx) - - return { - ...unsignedMigration, - tx: signedBundle - } - } -} diff --git a/old/packages/migration/src/version.ts b/old/packages/migration/src/version.ts deleted file mode 100644 index b768e7a70..000000000 --- a/old/packages/migration/src/version.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { commons } from '@0xsequence/core' - -export function counterfactualVersion( - address: string, - firstImageHash: string, - versions: commons.context.WalletContext[] -): number { - for (let i = 0; i < versions.length; i++) { - if (commons.context.addressOf(versions[i], firstImageHash) === address) { - return versions[i].version - } - } - - // if we can't find the version then either the address is invalid, - // the version is not in VersionedContext, or the firstImageHash is not correct - throw new Error('Could not find version for counterfactual address') -} - -export interface Version< - C extends commons.config.Config, - S extends commons.signature.Signature, - U extends commons.signature.UnrecoveredSignature -> { - version: number - coders: { - config: commons.config.ConfigCoder - signature: commons.signature.SignatureCoder - } -} diff --git a/old/packages/network/CHANGELOG.md b/old/packages/network/CHANGELOG.md deleted file mode 100644 index 54e341ef4..000000000 --- a/old/packages/network/CHANGELOG.md +++ /dev/null @@ -1,3533 +0,0 @@ -# @0xsequence/network - -## 2.3.8 - -### Patch Changes - -- indexer: update clients -- Updated dependencies - - @0xsequence/core@2.3.8 - - @0xsequence/indexer@2.3.8 - - @0xsequence/relayer@2.3.8 - - @0xsequence/utils@2.3.8 - -## 2.3.7 - -### Patch Changes - -- Metadata updates -- Updated dependencies - - @0xsequence/core@2.3.7 - - @0xsequence/indexer@2.3.7 - - @0xsequence/relayer@2.3.7 - - @0xsequence/utils@2.3.7 - -## 2.3.6 - -### Patch Changes - -- New chains -- Updated dependencies - - @0xsequence/core@2.3.6 - - @0xsequence/indexer@2.3.6 - - @0xsequence/relayer@2.3.6 - - @0xsequence/utils@2.3.6 - -## 2.3.5 - -### Patch Changes - -- Add Frequency Testnet -- Updated dependencies - - @0xsequence/core@2.3.5 - - @0xsequence/indexer@2.3.5 - - @0xsequence/relayer@2.3.5 - - @0xsequence/utils@2.3.5 - -## 2.3.4 - -### Patch Changes - -- metadata: exclude deprecated methods on rpc client -- Updated dependencies - - @0xsequence/core@2.3.4 - - @0xsequence/indexer@2.3.4 - - @0xsequence/relayer@2.3.4 - - @0xsequence/utils@2.3.4 - -## 2.3.3 - -### Patch Changes - -- metadata: client update -- Updated dependencies - - @0xsequence/core@2.3.3 - - @0xsequence/indexer@2.3.3 - - @0xsequence/relayer@2.3.3 - - @0xsequence/utils@2.3.3 - -## 2.3.2 - -### Patch Changes - -- metadata: update rpc client -- Updated dependencies - - @0xsequence/core@2.3.2 - - @0xsequence/indexer@2.3.2 - - @0xsequence/relayer@2.3.2 - - @0xsequence/utils@2.3.2 - -## 2.3.1 - -### Patch Changes - -- indexer: update rpc client -- Updated dependencies - - @0xsequence/core@2.3.1 - - @0xsequence/indexer@2.3.1 - - @0xsequence/relayer@2.3.1 - - @0xsequence/utils@2.3.1 - -## 2.3.0 - -### Minor Changes - -- update metadata rpc client - -### Patch Changes - -- Updated dependencies - - @0xsequence/core@2.3.0 - - @0xsequence/indexer@2.3.0 - - @0xsequence/relayer@2.3.0 - - @0xsequence/utils@2.3.0 - -## 2.2.15 - -### Patch Changes - -- API updates -- Updated dependencies - - @0xsequence/core@2.2.15 - - @0xsequence/indexer@2.2.15 - - @0xsequence/relayer@2.2.15 - - @0xsequence/utils@2.2.15 - -## 2.2.14 - -### Patch Changes - -- Somnia Testnet and Monad Testnet -- Updated dependencies - - @0xsequence/core@2.2.14 - - @0xsequence/indexer@2.2.14 - - @0xsequence/relayer@2.2.14 - - @0xsequence/utils@2.2.14 - -## 2.2.13 - -### Patch Changes - -- Add XR1 to all networks -- Updated dependencies - - @0xsequence/core@2.2.13 - - @0xsequence/indexer@2.2.13 - - @0xsequence/relayer@2.2.13 - - @0xsequence/utils@2.2.13 - -## 2.2.12 - -### Patch Changes - -- Add XR1 -- Updated dependencies - - @0xsequence/core@2.2.12 - - @0xsequence/indexer@2.2.12 - - @0xsequence/relayer@2.2.12 - - @0xsequence/utils@2.2.12 - -## 2.2.11 - -### Patch Changes - -- Relayer updates -- Updated dependencies - - @0xsequence/core@2.2.11 - - @0xsequence/indexer@2.2.11 - - @0xsequence/relayer@2.2.11 - - @0xsequence/utils@2.2.11 - -## 2.2.10 - -### Patch Changes - -- Etherlink support -- Updated dependencies - - @0xsequence/core@2.2.10 - - @0xsequence/indexer@2.2.10 - - @0xsequence/relayer@2.2.10 - - @0xsequence/utils@2.2.10 - -## 2.2.9 - -### Patch Changes - -- Indexer gateway native token balances -- Updated dependencies - - @0xsequence/core@2.2.9 - - @0xsequence/indexer@2.2.9 - - @0xsequence/relayer@2.2.9 - - @0xsequence/utils@2.2.9 - -## 2.2.8 - -### Patch Changes - -- Add Moonbeam and Moonbase Alpha -- Updated dependencies - - @0xsequence/core@2.2.8 - - @0xsequence/indexer@2.2.8 - - @0xsequence/relayer@2.2.8 - - @0xsequence/utils@2.2.8 - -## 2.2.7 - -### Patch Changes - -- Update Builder package -- Updated dependencies - - @0xsequence/core@2.2.7 - - @0xsequence/indexer@2.2.7 - - @0xsequence/relayer@2.2.7 - - @0xsequence/utils@2.2.7 - -## 2.2.6 - -### Patch Changes - -- Update relayer package -- Updated dependencies - - @0xsequence/core@2.2.6 - - @0xsequence/indexer@2.2.6 - - @0xsequence/relayer@2.2.6 - - @0xsequence/utils@2.2.6 - -## 2.2.5 - -### Patch Changes - -- auth: fix sequence indexer gateway url -- account: immutable wallet proxy hook -- Updated dependencies -- Updated dependencies - - @0xsequence/core@2.2.5 - - @0xsequence/indexer@2.2.5 - - @0xsequence/relayer@2.2.5 - - @0xsequence/utils@2.2.5 - -## 2.2.4 - -### Patch Changes - -- network: update soneium mainnet block explorer url -- waas: signTypedData intent support -- Updated dependencies -- Updated dependencies - - @0xsequence/core@2.2.4 - - @0xsequence/indexer@2.2.4 - - @0xsequence/relayer@2.2.4 - - @0xsequence/utils@2.2.4 - -## 2.2.3 - -### Patch Changes - -- provider: updating initWallet to use connected network configs if they exist -- Updated dependencies - - @0xsequence/core@2.2.3 - - @0xsequence/indexer@2.2.3 - - @0xsequence/relayer@2.2.3 - - @0xsequence/utils@2.2.3 - -## 2.2.2 - -### Patch Changes - -- pass projectAccessKey to relayer at all times -- Updated dependencies - - @0xsequence/core@2.2.2 - - @0xsequence/indexer@2.2.2 - - @0xsequence/relayer@2.2.2 - - @0xsequence/utils@2.2.2 - -## 2.2.1 - -### Patch Changes - -- waas-ethers: sign typed data -- Updated dependencies - - @0xsequence/core@2.2.1 - - @0xsequence/indexer@2.2.1 - - @0xsequence/relayer@2.2.1 - - @0xsequence/utils@2.2.1 - -## 2.2.0 - -### Minor Changes - -- indexer: gateway client -- @0xsequence/builder -- upgrade puppeteer to v23.10.3 - -### Patch Changes - -- Updated dependencies -- Updated dependencies -- Updated dependencies - - @0xsequence/core@2.2.0 - - @0xsequence/indexer@2.2.0 - - @0xsequence/relayer@2.2.0 - - @0xsequence/utils@2.2.0 - -## 2.1.8 - -### Patch Changes - -- Add Soneium Mainnet -- Updated dependencies - - @0xsequence/core@2.1.8 - - @0xsequence/indexer@2.1.8 - - @0xsequence/relayer@2.1.8 - - @0xsequence/utils@2.1.8 - -## 2.1.7 - -### Patch Changes - -- guard: pass project access key to guard requests -- Updated dependencies - - @0xsequence/core@2.1.7 - - @0xsequence/indexer@2.1.7 - - @0xsequence/relayer@2.1.7 - - @0xsequence/utils@2.1.7 - -## 2.1.6 - -### Patch Changes - -- Add LAOS and Telos Testnet chains -- Updated dependencies - - @0xsequence/core@2.1.6 - - @0xsequence/indexer@2.1.6 - - @0xsequence/relayer@2.1.6 - - @0xsequence/utils@2.1.6 - -## 2.1.5 - -### Patch Changes - -- account: save presigned configuration with reference chain id 1 -- Updated dependencies - - @0xsequence/core@2.1.5 - - @0xsequence/indexer@2.1.5 - - @0xsequence/relayer@2.1.5 - - @0xsequence/utils@2.1.5 - -## 2.1.4 - -### Patch Changes - -- provider: pass projectAccessKey into MuxMessageProvider -- Updated dependencies - - @0xsequence/core@2.1.4 - - @0xsequence/indexer@2.1.4 - - @0xsequence/relayer@2.1.4 - - @0xsequence/utils@2.1.4 - -## 2.1.3 - -### Patch Changes - -- waas: time drift date fix due to strange browser quirk -- Updated dependencies - - @0xsequence/core@2.1.3 - - @0xsequence/indexer@2.1.3 - - @0xsequence/relayer@2.1.3 - - @0xsequence/utils@2.1.3 - -## 2.1.2 - -### Patch Changes - -- provider: export analytics correctly -- Updated dependencies - - @0xsequence/core@2.1.2 - - @0xsequence/indexer@2.1.2 - - @0xsequence/relayer@2.1.2 - - @0xsequence/utils@2.1.2 - -## 2.1.1 - -### Patch Changes - -- Add LAOS chain support -- Updated dependencies - - @0xsequence/core@2.1.1 - - @0xsequence/indexer@2.1.1 - - @0xsequence/relayer@2.1.1 - - @0xsequence/utils@2.1.1 - -## 2.1.0 - -### Minor Changes - -- account: forward project access key when estimating fees and sending transactions - -### Patch Changes - -- sessions: save signatures with reference chain id -- Updated dependencies -- Updated dependencies - - @0xsequence/core@2.1.0 - - @0xsequence/indexer@2.1.0 - - @0xsequence/relayer@2.1.0 - - @0xsequence/utils@2.1.0 - -## 2.0.26 - -### Patch Changes - -- account: fix chain id comparison -- Updated dependencies - - @0xsequence/core@2.0.26 - - @0xsequence/indexer@2.0.26 - - @0xsequence/relayer@2.0.26 - - @0xsequence/utils@2.0.26 - -## 2.0.25 - -### Patch Changes - -- skale-nebula: deploy gas limit = 10m -- Updated dependencies - - @0xsequence/core@2.0.25 - - @0xsequence/indexer@2.0.25 - - @0xsequence/relayer@2.0.25 - - @0xsequence/utils@2.0.25 - -## 2.0.24 - -### Patch Changes - -- sessions: arweave: configurable gateway url -- waas: use /status to get time drift before sending any intents -- Updated dependencies -- Updated dependencies - - @0xsequence/core@2.0.24 - - @0xsequence/indexer@2.0.24 - - @0xsequence/relayer@2.0.24 - - @0xsequence/utils@2.0.24 - -## 2.0.23 - -### Patch Changes - -- Add The Root Network support -- Updated dependencies - - @0xsequence/core@2.0.23 - - @0xsequence/indexer@2.0.23 - - @0xsequence/relayer@2.0.23 - - @0xsequence/utils@2.0.23 - -## 2.0.22 - -### Patch Changes - -- Add SKALE Nebula Mainnet support -- Updated dependencies - - @0xsequence/core@2.0.22 - - @0xsequence/indexer@2.0.22 - - @0xsequence/relayer@2.0.22 - - @0xsequence/utils@2.0.22 - -## 2.0.21 - -### Patch Changes - -- account: add publishWitnessFor -- Updated dependencies - - @0xsequence/core@2.0.21 - - @0xsequence/indexer@2.0.21 - - @0xsequence/relayer@2.0.21 - - @0xsequence/utils@2.0.21 - -## 2.0.20 - -### Patch Changes - -- upgrade deps, and improve waas session status handling -- Updated dependencies - - @0xsequence/core@2.0.20 - - @0xsequence/indexer@2.0.20 - - @0xsequence/relayer@2.0.20 - - @0xsequence/utils@2.0.20 - -## 2.0.19 - -### Patch Changes - -- Add Immutable zkEVM support -- Updated dependencies - - @0xsequence/core@2.0.19 - - @0xsequence/indexer@2.0.19 - - @0xsequence/relayer@2.0.19 - - @0xsequence/utils@2.0.19 - -## 2.0.18 - -### Patch Changes - -- waas: new contractCall transaction type -- sessions: add arweave owner -- Updated dependencies -- Updated dependencies - - @0xsequence/core@2.0.18 - - @0xsequence/indexer@2.0.18 - - @0xsequence/relayer@2.0.18 - - @0xsequence/utils@2.0.18 - -## 2.0.17 - -### Patch Changes - -- update waas auth to clear session before signIn -- Updated dependencies - - @0xsequence/core@2.0.17 - - @0xsequence/indexer@2.0.17 - - @0xsequence/relayer@2.0.17 - - @0xsequence/utils@2.0.17 - -## 2.0.16 - -### Patch Changes - -- Removed Astar chains -- Updated dependencies - - @0xsequence/core@2.0.16 - - @0xsequence/indexer@2.0.16 - - @0xsequence/relayer@2.0.16 - - @0xsequence/utils@2.0.16 - -## 2.0.15 - -### Patch Changes - -- indexer: update bindings with token balance additions -- Updated dependencies - - @0xsequence/core@2.0.15 - - @0xsequence/indexer@2.0.15 - - @0xsequence/relayer@2.0.15 - - @0xsequence/utils@2.0.15 - -## 2.0.14 - -### Patch Changes - -- sessions: arweave config reader -- network: add b3 and apechain mainnet configs -- Updated dependencies -- Updated dependencies - - @0xsequence/core@2.0.14 - - @0xsequence/indexer@2.0.14 - - @0xsequence/relayer@2.0.14 - - @0xsequence/utils@2.0.14 - -## 2.0.13 - -### Patch Changes - -- network: toy-testnet -- Updated dependencies - - @0xsequence/core@2.0.13 - - @0xsequence/indexer@2.0.13 - - @0xsequence/relayer@2.0.13 - - @0xsequence/utils@2.0.13 - -## 2.0.12 - -### Patch Changes - -- api: update bindings -- Updated dependencies - - @0xsequence/core@2.0.12 - - @0xsequence/indexer@2.0.12 - - @0xsequence/relayer@2.0.12 - - @0xsequence/utils@2.0.12 - -## 2.0.11 - -### Patch Changes - -- waas: intents test fix -- api: update bindings -- Updated dependencies -- Updated dependencies - - @0xsequence/core@2.0.11 - - @0xsequence/indexer@2.0.11 - - @0xsequence/relayer@2.0.11 - - @0xsequence/utils@2.0.11 - -## 2.0.10 - -### Patch Changes - -- network: soneium minato testnet -- Updated dependencies - - @0xsequence/core@2.0.10 - - @0xsequence/indexer@2.0.10 - - @0xsequence/relayer@2.0.10 - - @0xsequence/utils@2.0.10 - -## 2.0.9 - -### Patch Changes - -- network: fix SKALE network name -- Updated dependencies - - @0xsequence/core@2.0.9 - - @0xsequence/indexer@2.0.9 - - @0xsequence/relayer@2.0.9 - - @0xsequence/utils@2.0.9 - -## 2.0.8 - -### Patch Changes - -- metadata: update bindings -- Updated dependencies - - @0xsequence/core@2.0.8 - - @0xsequence/indexer@2.0.8 - - @0xsequence/relayer@2.0.8 - - @0xsequence/utils@2.0.8 - -## 2.0.7 - -### Patch Changes - -- wallet request handler fix -- Updated dependencies - - @0xsequence/core@2.0.7 - - @0xsequence/indexer@2.0.7 - - @0xsequence/relayer@2.0.7 - - @0xsequence/utils@2.0.7 - -## 2.0.6 - -### Patch Changes - -- network: matic -> pol -- Updated dependencies - - @0xsequence/core@2.0.6 - - @0xsequence/indexer@2.0.6 - - @0xsequence/relayer@2.0.6 - - @0xsequence/utils@2.0.6 - -## 2.0.5 - -### Patch Changes - -- provider: update databeat to 0.9.2 -- Updated dependencies - - @0xsequence/core@2.0.5 - - @0xsequence/indexer@2.0.5 - - @0xsequence/relayer@2.0.5 - - @0xsequence/utils@2.0.5 - -## 2.0.4 - -### Patch Changes - -- network: add skale-nebula-testnet -- Updated dependencies - - @0xsequence/core@2.0.4 - - @0xsequence/indexer@2.0.4 - - @0xsequence/relayer@2.0.4 - - @0xsequence/utils@2.0.4 - -## 2.0.3 - -### Patch Changes - -- waas: check session status in SequenceWaaS.isSignedIn() -- Updated dependencies - - @0xsequence/core@2.0.3 - - @0xsequence/indexer@2.0.3 - - @0xsequence/relayer@2.0.3 - - @0xsequence/utils@2.0.3 - -## 2.0.2 - -### Patch Changes - -- sessions: property convert serialized bignumber hex value to bigint -- Updated dependencies - - @0xsequence/core@2.0.2 - - @0xsequence/indexer@2.0.2 - - @0xsequence/relayer@2.0.2 - - @0xsequence/utils@2.0.2 - -## 2.0.1 - -### Patch Changes - -- waas: http signature check for authenticator requests -- provider: unwrap legacy json rpc responses -- use json replacer and reviver for bigints -- Updated dependencies -- Updated dependencies -- Updated dependencies - - @0xsequence/core@2.0.1 - - @0xsequence/indexer@2.0.1 - - @0xsequence/relayer@2.0.1 - - @0xsequence/utils@2.0.1 - -## 2.0.0 - -### Major Changes - -- ethers v6 - -### Patch Changes - -- Updated dependencies - - @0xsequence/core@2.0.0 - - @0xsequence/indexer@2.0.0 - - @0xsequence/relayer@2.0.0 - - @0xsequence/utils@2.0.0 - -## 1.10.15 - -### Patch Changes - -- utils: extractProjectIdFromAccessKey -- Updated dependencies - - @0xsequence/core@1.10.15 - - @0xsequence/indexer@1.10.15 - - @0xsequence/relayer@1.10.15 - - @0xsequence/utils@1.10.15 - -## 1.10.14 - -### Patch Changes - -- network: add borne-testnet to allNetworks -- Updated dependencies - - @0xsequence/core@1.10.14 - - @0xsequence/indexer@1.10.14 - - @0xsequence/relayer@1.10.14 - - @0xsequence/utils@1.10.14 - -## 1.10.13 - -### Patch Changes - -- network: add borne testnet -- Updated dependencies - - @0xsequence/core@1.10.13 - - @0xsequence/indexer@1.10.13 - - @0xsequence/relayer@1.10.13 - - @0xsequence/utils@1.10.13 - -## 1.10.12 - -### Patch Changes - -- api: update bindings -- global/window -> globalThis -- Updated dependencies -- Updated dependencies - - @0xsequence/core@1.10.12 - - @0xsequence/indexer@1.10.12 - - @0xsequence/relayer@1.10.12 - - @0xsequence/utils@1.10.12 - -## 1.10.11 - -### Patch Changes - -- waas: updated intent.gen without webrpc types, errors exported from authenticator.gen -- Updated dependencies - - @0xsequence/core@1.10.11 - - @0xsequence/indexer@1.10.11 - - @0xsequence/relayer@1.10.11 - - @0xsequence/utils@1.10.11 - -## 1.10.10 - -### Patch Changes - -- metadata: update bindings with new contract collections api -- Updated dependencies - - @0xsequence/core@1.10.10 - - @0xsequence/indexer@1.10.10 - - @0xsequence/relayer@1.10.10 - - @0xsequence/utils@1.10.10 - -## 1.10.9 - -### Patch Changes - -- waas minor update -- Updated dependencies - - @0xsequence/core@1.10.9 - - @0xsequence/indexer@1.10.9 - - @0xsequence/relayer@1.10.9 - - @0xsequence/utils@1.10.9 - -## 1.10.8 - -### Patch Changes - -- update metadata bindings -- Updated dependencies - - @0xsequence/core@1.10.8 - - @0xsequence/indexer@1.10.8 - - @0xsequence/relayer@1.10.8 - - @0xsequence/utils@1.10.8 - -## 1.10.7 - -### Patch Changes - -- minor fixes to waas client -- Updated dependencies - - @0xsequence/core@1.10.7 - - @0xsequence/indexer@1.10.7 - - @0xsequence/relayer@1.10.7 - - @0xsequence/utils@1.10.7 - -## 1.10.6 - -### Patch Changes - -- metadata: update bindings -- Updated dependencies - - @0xsequence/core@1.10.6 - - @0xsequence/indexer@1.10.6 - - @0xsequence/relayer@1.10.6 - - @0xsequence/utils@1.10.6 - -## 1.10.5 - -### Patch Changes - -- network: ape-chain-testnet -> apechain-testnet -- Updated dependencies - - @0xsequence/core@1.10.5 - - @0xsequence/indexer@1.10.5 - - @0xsequence/relayer@1.10.5 - - @0xsequence/utils@1.10.5 - -## 1.10.4 - -### Patch Changes - -- network: add b3-sepolia, ape-chain-testnet, blast, blast-sepolia -- Updated dependencies - - @0xsequence/core@1.10.4 - - @0xsequence/indexer@1.10.4 - - @0xsequence/relayer@1.10.4 - - @0xsequence/utils@1.10.4 - -## 1.10.3 - -### Patch Changes - -- typing fix -- Updated dependencies - - @0xsequence/core@1.10.3 - - @0xsequence/indexer@1.10.3 - - @0xsequence/relayer@1.10.3 - - @0xsequence/utils@1.10.3 - -## 1.10.2 - -### Patch Changes - -- - waas: add getIdToken method - - indexer: update api client -- Updated dependencies - - @0xsequence/core@1.10.2 - - @0xsequence/indexer@1.10.2 - - @0xsequence/relayer@1.10.2 - - @0xsequence/utils@1.10.2 - -## 1.10.1 - -### Patch Changes - -- metadata: update bindings -- Updated dependencies - - @0xsequence/core@1.10.1 - - @0xsequence/indexer@1.10.1 - - @0xsequence/relayer@1.10.1 - - @0xsequence/utils@1.10.1 - -## 1.10.0 - -### Minor Changes - -- waas release v1.3.0 - -### Patch Changes - -- Updated dependencies - - @0xsequence/core@1.10.0 - - @0xsequence/indexer@1.10.0 - - @0xsequence/relayer@1.10.0 - - @0xsequence/utils@1.10.0 - -## 1.9.37 - -### Patch Changes - -- network: adds nativeToken data to NetworkMetadata constants -- Updated dependencies - - @0xsequence/core@1.9.37 - - @0xsequence/indexer@1.9.37 - - @0xsequence/relayer@1.9.37 - - @0xsequence/utils@1.9.37 - -## 1.9.36 - -### Patch Changes - -- guard: export client -- Updated dependencies - - @0xsequence/core@1.9.36 - - @0xsequence/indexer@1.9.36 - - @0xsequence/relayer@1.9.36 - - @0xsequence/utils@1.9.36 - -## 1.9.35 - -### Patch Changes - -- guard: update bindings -- Updated dependencies - - @0xsequence/core@1.9.35 - - @0xsequence/indexer@1.9.35 - - @0xsequence/relayer@1.9.35 - - @0xsequence/utils@1.9.35 - -## 1.9.34 - -### Patch Changes - -- waas: always use lowercase email -- Updated dependencies - - @0xsequence/core@1.9.34 - - @0xsequence/indexer@1.9.34 - - @0xsequence/relayer@1.9.34 - - @0xsequence/utils@1.9.34 - -## 1.9.33 - -### Patch Changes - -- waas: umd build -- Updated dependencies - - @0xsequence/core@1.9.33 - - @0xsequence/indexer@1.9.33 - - @0xsequence/relayer@1.9.33 - - @0xsequence/utils@1.9.33 - -## 1.9.32 - -### Patch Changes - -- indexer: update bindings -- Updated dependencies - - @0xsequence/core@1.9.32 - - @0xsequence/indexer@1.9.32 - - @0xsequence/relayer@1.9.32 - - @0xsequence/utils@1.9.32 - -## 1.9.31 - -### Patch Changes - -- metadata: token directory changes -- Updated dependencies - - @0xsequence/core@1.9.31 - - @0xsequence/indexer@1.9.31 - - @0xsequence/relayer@1.9.31 - - @0xsequence/utils@1.9.31 - -## 1.9.30 - -### Patch Changes - -- update -- Updated dependencies - - @0xsequence/core@1.9.30 - - @0xsequence/indexer@1.9.30 - - @0xsequence/relayer@1.9.30 - - @0xsequence/utils@1.9.30 - -## 1.9.29 - -### Patch Changes - -- disable gnosis chain -- Updated dependencies - - @0xsequence/core@1.9.29 - - @0xsequence/indexer@1.9.29 - - @0xsequence/relayer@1.9.29 - - @0xsequence/utils@1.9.29 - -## 1.9.28 - -### Patch Changes - -- add utils/merkletree -- Updated dependencies - - @0xsequence/core@1.9.28 - - @0xsequence/indexer@1.9.28 - - @0xsequence/relayer@1.9.28 - - @0xsequence/utils@1.9.28 - -## 1.9.27 - -### Patch Changes - -- network: optimistic -> optimism -- waas: remove defaults -- api, sessions: update bindings -- Updated dependencies -- Updated dependencies -- Updated dependencies - - @0xsequence/core@1.9.27 - - @0xsequence/indexer@1.9.27 - - @0xsequence/relayer@1.9.27 - - @0xsequence/utils@1.9.27 - -## 1.9.26 - -### Patch Changes - -- - add backend interfaces for pluggable interfaces - - introduce @0xsequence/react-native - - update pnpm to lockfile v9 -- Updated dependencies - - @0xsequence/core@1.9.26 - - @0xsequence/indexer@1.9.26 - - @0xsequence/relayer@1.9.26 - - @0xsequence/utils@1.9.26 - -## 1.9.25 - -### Patch Changes - -- update webrpc clients with new error types -- Updated dependencies - - @0xsequence/core@1.9.25 - - @0xsequence/indexer@1.9.25 - - @0xsequence/relayer@1.9.25 - - @0xsequence/utils@1.9.25 - -## 1.9.24 - -### Patch Changes - -- waas: add memoryStore backend to localStore -- Updated dependencies - - @0xsequence/core@1.9.24 - - @0xsequence/indexer@1.9.24 - - @0xsequence/relayer@1.9.24 - - @0xsequence/utils@1.9.24 - -## 1.9.23 - -### Patch Changes - -- update api client bindings -- Updated dependencies - - @0xsequence/core@1.9.23 - - @0xsequence/indexer@1.9.23 - - @0xsequence/relayer@1.9.23 - - @0xsequence/utils@1.9.23 - -## 1.9.22 - -### Patch Changes - -- update metadata client bindings -- Updated dependencies - - @0xsequence/core@1.9.22 - - @0xsequence/indexer@1.9.22 - - @0xsequence/relayer@1.9.22 - - @0xsequence/utils@1.9.22 - -## 1.9.21 - -### Patch Changes - -- api client bindings -- Updated dependencies - - @0xsequence/core@1.9.21 - - @0xsequence/indexer@1.9.21 - - @0xsequence/relayer@1.9.21 - - @0xsequence/utils@1.9.21 - -## 1.9.20 - -### Patch Changes - -- api client bindings update -- Updated dependencies - - @0xsequence/core@1.9.20 - - @0xsequence/indexer@1.9.20 - - @0xsequence/relayer@1.9.20 - - @0xsequence/utils@1.9.20 - -## 1.9.19 - -### Patch Changes - -- waas update -- Updated dependencies - - @0xsequence/core@1.9.19 - - @0xsequence/indexer@1.9.19 - - @0xsequence/relayer@1.9.19 - - @0xsequence/utils@1.9.19 - -## 1.9.18 - -### Patch Changes - -- provider: prohibit dangerous functions -- Updated dependencies - - @0xsequence/core@1.9.18 - - @0xsequence/indexer@1.9.18 - - @0xsequence/relayer@1.9.18 - - @0xsequence/utils@1.9.18 - -## 1.9.17 - -### Patch Changes - -- network: add xr-sepolia -- Updated dependencies - - @0xsequence/core@1.9.17 - - @0xsequence/indexer@1.9.17 - - @0xsequence/relayer@1.9.17 - - @0xsequence/utils@1.9.17 - -## 1.9.16 - -### Patch Changes - -- waas: sequence.feeOptions -- Updated dependencies - - @0xsequence/core@1.9.16 - - @0xsequence/indexer@1.9.16 - - @0xsequence/relayer@1.9.16 - - @0xsequence/utils@1.9.16 - -## 1.9.15 - -### Patch Changes - -- metadata: collection external_link field name fix -- Updated dependencies - - @0xsequence/core@1.9.15 - - @0xsequence/indexer@1.9.15 - - @0xsequence/relayer@1.9.15 - - @0xsequence/utils@1.9.15 - -## 1.9.14 - -### Patch Changes - -- network: astar-zkatana -> astar-zkyoto -- network: deprecate polygon mumbai network -- network: add xai and polygon amoy -- Updated dependencies -- Updated dependencies -- Updated dependencies - - @0xsequence/core@1.9.14 - - @0xsequence/indexer@1.9.14 - - @0xsequence/relayer@1.9.14 - - @0xsequence/utils@1.9.14 - -## 1.9.13 - -### Patch Changes - -- waas: fix @0xsequence/network dependency -- Updated dependencies - - @0xsequence/core@1.9.13 - - @0xsequence/indexer@1.9.13 - - @0xsequence/relayer@1.9.13 - - @0xsequence/utils@1.9.13 - -## 1.9.12 - -### Patch Changes - -- indexer: update rpc bindings -- provider: signMessage: Serialize the BytesLike or string message into hexstring before sending -- waas: SessionAuthProof -- Updated dependencies -- Updated dependencies -- Updated dependencies - - @0xsequence/core@1.9.12 - - @0xsequence/indexer@1.9.12 - - @0xsequence/relayer@1.9.12 - - @0xsequence/utils@1.9.12 - -## 1.9.11 - -### Patch Changes - -- metdata, update rpc bindings -- Updated dependencies - - @0xsequence/core@1.9.11 - - @0xsequence/indexer@1.9.11 - - @0xsequence/relayer@1.9.11 - - @0xsequence/utils@1.9.11 - -## 1.9.10 - -### Patch Changes - -- update metadata rpc bindings -- Updated dependencies - - @0xsequence/core@1.9.10 - - @0xsequence/indexer@1.9.10 - - @0xsequence/relayer@1.9.10 - - @0xsequence/utils@1.9.10 - -## 1.9.9 - -### Patch Changes - -- metadata, add SequenceCollections rpc client -- Updated dependencies - - @0xsequence/core@1.9.9 - - @0xsequence/indexer@1.9.9 - - @0xsequence/relayer@1.9.9 - - @0xsequence/utils@1.9.9 - -## 1.9.8 - -### Patch Changes - -- waas client update -- Updated dependencies - - @0xsequence/core@1.9.8 - - @0xsequence/indexer@1.9.8 - - @0xsequence/relayer@1.9.8 - - @0xsequence/utils@1.9.8 - -## 1.9.7 - -### Patch Changes - -- update rpc client bindings for api, metadata and relayer -- Updated dependencies - - @0xsequence/core@1.9.7 - - @0xsequence/indexer@1.9.7 - - @0xsequence/relayer@1.9.7 - - @0xsequence/utils@1.9.7 - -## 1.9.6 - -### Patch Changes - -- waas package update -- Updated dependencies - - @0xsequence/core@1.9.6 - - @0xsequence/indexer@1.9.6 - - @0xsequence/relayer@1.9.6 - - @0xsequence/utils@1.9.6 - -## 1.9.5 - -### Patch Changes - -- RpcRelayer prioritize project access key -- Updated dependencies - - @0xsequence/core@1.9.5 - - @0xsequence/indexer@1.9.5 - - @0xsequence/relayer@1.9.5 - - @0xsequence/utils@1.9.5 - -## 1.9.4 - -### Patch Changes - -- waas: fix network dependency -- Updated dependencies - - @0xsequence/core@1.9.4 - - @0xsequence/indexer@1.9.4 - - @0xsequence/relayer@1.9.4 - - @0xsequence/utils@1.9.4 - -## 1.9.3 - -### Patch Changes - -- provider: don't append access key to RPC url if user has already provided it -- Updated dependencies - - @0xsequence/core@1.9.3 - - @0xsequence/indexer@1.9.3 - - @0xsequence/relayer@1.9.3 - - @0xsequence/utils@1.9.3 - -## 1.9.2 - -### Patch Changes - -- network: add xai-sepolia -- Updated dependencies - - @0xsequence/core@1.9.2 - - @0xsequence/indexer@1.9.2 - - @0xsequence/relayer@1.9.2 - - @0xsequence/utils@1.9.2 - -## 1.9.1 - -### Patch Changes - -- analytics fix -- Updated dependencies - - @0xsequence/core@1.9.1 - - @0xsequence/indexer@1.9.1 - - @0xsequence/relayer@1.9.1 - - @0xsequence/utils@1.9.1 - -## 1.9.0 - -### Minor Changes - -- waas release - -### Patch Changes - -- Updated dependencies - - @0xsequence/core@1.9.0 - - @0xsequence/indexer@1.9.0 - - @0xsequence/relayer@1.9.0 - - @0xsequence/utils@1.9.0 - -## 1.8.8 - -### Patch Changes - -- update metadata bindings -- Updated dependencies - - @0xsequence/core@1.8.8 - - @0xsequence/indexer@1.8.8 - - @0xsequence/relayer@1.8.8 - - @0xsequence/utils@1.8.8 - -## 1.8.7 - -### Patch Changes - -- provider: update databeat to 0.9.1 -- Updated dependencies - - @0xsequence/core@1.8.7 - - @0xsequence/indexer@1.8.7 - - @0xsequence/relayer@1.8.7 - - @0xsequence/utils@1.8.7 - -## 1.8.6 - -### Patch Changes - -- guard: SignedOwnershipProof -- Updated dependencies - - @0xsequence/core@1.8.6 - - @0xsequence/indexer@1.8.6 - - @0xsequence/relayer@1.8.6 - - @0xsequence/utils@1.8.6 - -## 1.8.5 - -### Patch Changes - -- guard: signOwnershipProof and isSignedOwnershipProof -- Updated dependencies - - @0xsequence/core@1.8.5 - - @0xsequence/indexer@1.8.5 - - @0xsequence/relayer@1.8.5 - - @0xsequence/utils@1.8.5 - -## 1.8.4 - -### Patch Changes - -- network: add homeverse to networks list -- Updated dependencies - - @0xsequence/core@1.8.4 - - @0xsequence/indexer@1.8.4 - - @0xsequence/relayer@1.8.4 - - @0xsequence/utils@1.8.4 - -## 1.8.3 - -### Patch Changes - -- api: introduce basic linked wallet support -- Updated dependencies - - @0xsequence/core@1.8.3 - - @0xsequence/indexer@1.8.3 - - @0xsequence/relayer@1.8.3 - - @0xsequence/utils@1.8.3 - -## 1.8.2 - -### Patch Changes - -- provider: don't initialize analytics unless explicitly requested -- Updated dependencies - - @0xsequence/core@1.8.2 - - @0xsequence/indexer@1.8.2 - - @0xsequence/relayer@1.8.2 - - @0xsequence/utils@1.8.2 - -## 1.8.1 - -### Patch Changes - -- update to analytics provider -- Updated dependencies - - @0xsequence/core@1.8.1 - - @0xsequence/indexer@1.8.1 - - @0xsequence/relayer@1.8.1 - - @0xsequence/utils@1.8.1 - -## 1.8.0 - -### Minor Changes - -- provider: project analytics - -### Patch Changes - -- Updated dependencies - - @0xsequence/core@1.8.0 - - @0xsequence/indexer@1.8.0 - - @0xsequence/relayer@1.8.0 - - @0xsequence/utils@1.8.0 - -## 1.7.2 - -### Patch Changes - -- 0xsequence: ChainId should not be exported as a type -- account, wallet: fix nonce selection -- Updated dependencies -- Updated dependencies - - @0xsequence/core@1.7.2 - - @0xsequence/indexer@1.7.2 - - @0xsequence/relayer@1.7.2 - - @0xsequence/utils@1.7.2 - -## 1.7.1 - -### Patch Changes - -- network: add missing avalanche logoURI -- Updated dependencies - - @0xsequence/core@1.7.1 - - @0xsequence/indexer@1.7.1 - - @0xsequence/relayer@1.7.1 - - @0xsequence/utils@1.7.1 - -## 1.7.0 - -### Minor Changes - -- provider: projectAccessKey is now required - -### Patch Changes - -- network: add NetworkMetadata.logoURI property for all networks -- Updated dependencies -- Updated dependencies - - @0xsequence/core@1.7.0 - - @0xsequence/indexer@1.7.0 - - @0xsequence/relayer@1.7.0 - - @0xsequence/utils@1.7.0 - -## 1.6.3 - -### Patch Changes - -- network list update -- Updated dependencies - - @0xsequence/core@1.6.3 - - @0xsequence/indexer@1.6.3 - - @0xsequence/relayer@1.6.3 - - @0xsequence/utils@1.6.3 - -## 1.6.2 - -### Patch Changes - -- auth: projectAccessKey option -- wallet: use 12 bytes for random space -- Updated dependencies -- Updated dependencies - - @0xsequence/core@1.6.2 - - @0xsequence/indexer@1.6.2 - - @0xsequence/relayer@1.6.2 - - @0xsequence/utils@1.6.2 - -## 1.6.1 - -### Patch Changes - -- core: add simple config from subdigest support -- core: fix encode tree with subdigest -- account: implement buildOnChainSignature on Account -- Updated dependencies -- Updated dependencies -- Updated dependencies - - @0xsequence/core@1.6.1 - - @0xsequence/indexer@1.6.1 - - @0xsequence/relayer@1.6.1 - - @0xsequence/utils@1.6.1 - -## 1.6.0 - -### Minor Changes - -- account, wallet: parallel transactions by default - -### Patch Changes - -- provider: emit disconnect on sign out -- Updated dependencies -- Updated dependencies - - @0xsequence/core@1.6.0 - - @0xsequence/indexer@1.6.0 - - @0xsequence/relayer@1.6.0 - - @0xsequence/utils@1.6.0 - -## 1.5.0 - -### Minor Changes - -- signhub: add 'signing' signer status - -### Patch Changes - -- auth: Session.open: onAccountAddress callback -- account: allow empty transaction bundles -- Updated dependencies -- Updated dependencies -- Updated dependencies - - @0xsequence/core@1.5.0 - - @0xsequence/indexer@1.5.0 - - @0xsequence/relayer@1.5.0 - - @0xsequence/utils@1.5.0 - -## 1.4.9 - -### Patch Changes - -- rename SequenceMetadataClient to SequenceMetadata -- Updated dependencies - - @0xsequence/core@1.4.9 - - @0xsequence/indexer@1.4.9 - - @0xsequence/relayer@1.4.9 - - @0xsequence/utils@1.4.9 - -## 1.4.8 - -### Patch Changes - -- account: Account.getSigners -- Updated dependencies - - @0xsequence/core@1.4.8 - - @0xsequence/indexer@1.4.8 - - @0xsequence/relayer@1.4.8 - - @0xsequence/utils@1.4.8 - -## 1.4.7 - -### Patch Changes - -- update indexer client bindings -- Updated dependencies - - @0xsequence/core@1.4.7 - - @0xsequence/indexer@1.4.7 - - @0xsequence/relayer@1.4.7 - - @0xsequence/utils@1.4.7 - -## 1.4.6 - -### Patch Changes - -- - add sepolia networks, mark goerli as deprecated - - update indexer client bindings -- Updated dependencies - - @0xsequence/core@1.4.6 - - @0xsequence/indexer@1.4.6 - - @0xsequence/relayer@1.4.6 - - @0xsequence/utils@1.4.6 - -## 1.4.5 - -### Patch Changes - -- indexer/metadata: update client bindings -- auth: selectWallet with new address -- Updated dependencies -- Updated dependencies - - @0xsequence/core@1.4.5 - - @0xsequence/indexer@1.4.5 - - @0xsequence/relayer@1.4.5 - - @0xsequence/utils@1.4.5 - -## 1.4.4 - -### Patch Changes - -- indexer: update bindings -- auth: handle jwt expiry -- Updated dependencies -- Updated dependencies - - @0xsequence/core@1.4.4 - - @0xsequence/indexer@1.4.4 - - @0xsequence/relayer@1.4.4 - - @0xsequence/utils@1.4.4 - -## 1.4.3 - -### Patch Changes - -- guard: return active status from GuardSigner.getAuthMethods -- Updated dependencies - - @0xsequence/core@1.4.3 - - @0xsequence/indexer@1.4.3 - - @0xsequence/relayer@1.4.3 - - @0xsequence/utils@1.4.3 - -## 1.4.2 - -### Patch Changes - -- guard: update bindings -- Updated dependencies - - @0xsequence/core@1.4.2 - - @0xsequence/indexer@1.4.2 - - @0xsequence/relayer@1.4.2 - - @0xsequence/utils@1.4.2 - -## 1.4.1 - -### Patch Changes - -- network: remove unused networks -- signhub: orchestrator interface -- guard: auth methods interface -- guard: update bindings for pin and totp -- guard: no more retry logic -- Updated dependencies -- Updated dependencies -- Updated dependencies -- Updated dependencies -- Updated dependencies - - @0xsequence/core@1.4.1 - - @0xsequence/indexer@1.4.1 - - @0xsequence/relayer@1.4.1 - - @0xsequence/utils@1.4.1 - -## 1.4.0 - -### Minor Changes - -- project access key support - -### Patch Changes - -- Updated dependencies - - @0xsequence/core@1.4.0 - - @0xsequence/indexer@1.4.0 - - @0xsequence/relayer@1.4.0 - - @0xsequence/utils@1.4.0 - -## 1.3.0 - -### Minor Changes - -- signhub: account children - -### Patch Changes - -- guard: do not throw when building deploy transaction -- network: snowtrace.io -> subnets.avax.network/c-chain -- Updated dependencies -- Updated dependencies -- Updated dependencies - - @0xsequence/core@1.3.0 - - @0xsequence/indexer@1.3.0 - - @0xsequence/relayer@1.3.0 - - @0xsequence/utils@1.3.0 - -## 1.2.9 - -### Patch Changes - -- account: AccountSigner.sendTransaction simulateForFeeOptions -- relayer: update bindings -- Updated dependencies -- Updated dependencies - - @0xsequence/core@1.2.9 - - @0xsequence/indexer@1.2.9 - - @0xsequence/relayer@1.2.9 - - @0xsequence/utils@1.2.9 - -## 1.2.8 - -### Patch Changes - -- rename X-Sequence-Token-Key header to X-Access-Key -- Updated dependencies - - @0xsequence/core@1.2.8 - - @0xsequence/indexer@1.2.8 - - @0xsequence/relayer@1.2.8 - - @0xsequence/utils@1.2.8 - -## 1.2.7 - -### Patch Changes - -- add x-sequence-token-key to clients -- Updated dependencies - - @0xsequence/core@1.2.7 - - @0xsequence/indexer@1.2.7 - - @0xsequence/relayer@1.2.7 - - @0xsequence/utils@1.2.7 - -## 1.2.6 - -### Patch Changes - -- Fix bind multicall provider -- Updated dependencies - - @0xsequence/core@1.2.6 - - @0xsequence/indexer@1.2.6 - - @0xsequence/relayer@1.2.6 - - @0xsequence/utils@1.2.6 - -## 1.2.5 - -### Patch Changes - -- Multicall default configuration fixes -- Updated dependencies - - @0xsequence/core@1.2.5 - - @0xsequence/indexer@1.2.5 - - @0xsequence/relayer@1.2.5 - - @0xsequence/utils@1.2.5 - -## 1.2.4 - -### Patch Changes - -- provider: Adding missing payment provider types to PaymentProviderOption -- provider: WalletRequestHandler.notifyChainChanged -- Updated dependencies -- Updated dependencies - - @0xsequence/core@1.2.4 - - @0xsequence/indexer@1.2.4 - - @0xsequence/relayer@1.2.4 - - @0xsequence/utils@1.2.4 - -## 1.2.3 - -### Patch Changes - -- auth, provider: connect to accept optional authorizeNonce -- Updated dependencies - - @0xsequence/core@1.2.3 - - @0xsequence/indexer@1.2.3 - - @0xsequence/relayer@1.2.3 - - @0xsequence/utils@1.2.3 - -## 1.2.2 - -### Patch Changes - -- provider: allow createContract calls -- core: check for explicit zero address in contract deployments -- Updated dependencies -- Updated dependencies - - @0xsequence/core@1.2.2 - - @0xsequence/indexer@1.2.2 - - @0xsequence/relayer@1.2.2 - - @0xsequence/utils@1.2.2 - -## 1.2.1 - -### Patch Changes - -- auth: use sequence api chain id as reference chain id if available -- Updated dependencies - - @0xsequence/core@1.2.1 - - @0xsequence/indexer@1.2.1 - - @0xsequence/relayer@1.2.1 - - @0xsequence/utils@1.2.1 - -## 1.2.0 - -### Minor Changes - -- split services from session, better local support - -### Patch Changes - -- Updated dependencies - - @0xsequence/core@1.2.0 - - @0xsequence/indexer@1.2.0 - - @0xsequence/relayer@1.2.0 - - @0xsequence/utils@1.2.0 - -## 1.1.15 - -### Patch Changes - -- guard: remove error filtering -- Updated dependencies - - @0xsequence/core@1.1.15 - - @0xsequence/indexer@1.1.15 - - @0xsequence/relayer@1.1.15 - - @0xsequence/utils@1.1.15 - -## 1.1.14 - -### Patch Changes - -- guard: add GuardSigner.onError -- Updated dependencies - - @0xsequence/core@1.1.14 - - @0xsequence/indexer@1.1.14 - - @0xsequence/relayer@1.1.14 - - @0xsequence/utils@1.1.14 - -## 1.1.13 - -### Patch Changes - -- provider: pass client version with connect options -- provider: removing large from BannerSize -- Updated dependencies -- Updated dependencies - - @0xsequence/core@1.1.13 - - @0xsequence/indexer@1.1.13 - - @0xsequence/relayer@1.1.13 - - @0xsequence/utils@1.1.13 - -## 1.1.12 - -### Patch Changes - -- provider: adding bannerSize to ConnectOptions -- Updated dependencies - - @0xsequence/core@1.1.12 - - @0xsequence/indexer@1.1.12 - - @0xsequence/relayer@1.1.12 - - @0xsequence/utils@1.1.12 - -## 1.1.11 - -### Patch Changes - -- add homeverse configs -- Updated dependencies - - @0xsequence/core@1.1.11 - - @0xsequence/indexer@1.1.11 - - @0xsequence/relayer@1.1.11 - - @0xsequence/utils@1.1.11 - -## 1.1.10 - -### Patch Changes - -- handle default EIP6492 on send -- Updated dependencies - - @0xsequence/core@1.1.10 - - @0xsequence/indexer@1.1.10 - - @0xsequence/relayer@1.1.10 - - @0xsequence/utils@1.1.10 - -## 1.1.9 - -### Patch Changes - -- Custom default EIP6492 on client -- Updated dependencies - - @0xsequence/core@1.1.9 - - @0xsequence/indexer@1.1.9 - - @0xsequence/relayer@1.1.9 - - @0xsequence/utils@1.1.9 - -## 1.1.8 - -### Patch Changes - -- metadata: searchMetadata: add types filter -- Updated dependencies - - @0xsequence/core@1.1.8 - - @0xsequence/indexer@1.1.8 - - @0xsequence/relayer@1.1.8 - - @0xsequence/utils@1.1.8 - -## 1.1.7 - -### Patch Changes - -- adding signInWith connect settings option to allow dapps to automatically login their users with a certain provider optimizing the normal authentication flow -- Updated dependencies - - @0xsequence/core@1.1.7 - - @0xsequence/indexer@1.1.7 - - @0xsequence/relayer@1.1.7 - - @0xsequence/utils@1.1.7 - -## 1.1.6 - -### Patch Changes - -- metadata: searchMetadata: add chainID and excludeTokenMetadata filters -- Updated dependencies - - @0xsequence/core@1.1.6 - - @0xsequence/indexer@1.1.6 - - @0xsequence/relayer@1.1.6 - - @0xsequence/utils@1.1.6 - -## 1.1.5 - -### Patch Changes - -- account: re-compute meta-transaction id for wallet deployment transactions -- Updated dependencies - - @0xsequence/core@1.1.5 - - @0xsequence/indexer@1.1.5 - - @0xsequence/relayer@1.1.5 - - @0xsequence/utils@1.1.5 - -## 1.1.4 - -### Patch Changes - -- network: rename base-mainnet to base -- provider: override isDefaultChain with ConnectOptions.networkId if provided -- Updated dependencies -- Updated dependencies - - @0xsequence/core@1.1.4 - - @0xsequence/indexer@1.1.4 - - @0xsequence/relayer@1.1.4 - - @0xsequence/utils@1.1.4 - -## 1.1.3 - -### Patch Changes - -- provider: use network id from transport session -- provider: sign authorization using ConnectOptions.networkId if provided -- Updated dependencies -- Updated dependencies - - @0xsequence/core@1.1.3 - - @0xsequence/indexer@1.1.3 - - @0xsequence/relayer@1.1.3 - - @0xsequence/utils@1.1.3 - -## 1.1.2 - -### Patch Changes - -- provider: jsonrpc chain id fixes -- Updated dependencies - - @0xsequence/core@1.1.2 - - @0xsequence/indexer@1.1.2 - - @0xsequence/relayer@1.1.2 - - @0xsequence/utils@1.1.2 - -## 1.1.1 - -### Patch Changes - -- network: add base mainnet and sepolia -- provider: reject toxic transaction requests -- Updated dependencies -- Updated dependencies - - @0xsequence/core@1.1.1 - - @0xsequence/indexer@1.1.1 - - @0xsequence/relayer@1.1.1 - - @0xsequence/utils@1.1.1 - -## 1.1.0 - -### Minor Changes - -- Refactor dapp facing provider - -### Patch Changes - -- Updated dependencies - - @0xsequence/core@1.1.0 - - @0xsequence/indexer@1.1.0 - - @0xsequence/relayer@1.1.0 - - @0xsequence/utils@1.1.0 - -## 1.0.5 - -### Patch Changes - -- network: export network constants -- guard: use the correct global for fetch -- network: nova-explorer.arbitrum.io -> nova.arbiscan.io -- Updated dependencies -- Updated dependencies -- Updated dependencies - - @0xsequence/core@1.0.5 - - @0xsequence/indexer@1.0.5 - - @0xsequence/relayer@1.0.5 - - @0xsequence/utils@1.0.5 - -## 1.0.4 - -### Patch Changes - -- provider: accept name or number for networkId -- Updated dependencies - - @0xsequence/core@1.0.4 - - @0xsequence/indexer@1.0.4 - - @0xsequence/relayer@1.0.4 - - @0xsequence/utils@1.0.4 - -## 1.0.3 - -### Patch Changes - -- Simpler isValidSignature helpers -- Updated dependencies - - @0xsequence/core@1.0.3 - - @0xsequence/indexer@1.0.3 - - @0xsequence/relayer@1.0.3 - - @0xsequence/utils@1.0.3 - -## 1.0.2 - -### Patch Changes - -- add extra signature validation utils methods -- Updated dependencies - - @0xsequence/core@1.0.2 - - @0xsequence/indexer@1.0.2 - - @0xsequence/relayer@1.0.2 - - @0xsequence/utils@1.0.2 - -## 1.0.1 - -### Patch Changes - -- add homeverse testnet -- Updated dependencies - - @0xsequence/core@1.0.1 - - @0xsequence/indexer@1.0.1 - - @0xsequence/relayer@1.0.1 - - @0xsequence/utils@1.0.1 - -## 1.0.0 - -### Major Changes - -- https://sequence.xyz/blog/sequence-wallet-light-state-sync-full-merkle-wallets - -### Patch Changes - -- Updated dependencies - - @0xsequence/core@1.0.0 - - @0xsequence/indexer@1.0.0 - - @0xsequence/relayer@1.0.0 - - @0xsequence/utils@1.0.0 - -## 0.43.34 - -### Patch Changes - -- auth: no jwt for indexer -- Updated dependencies - - @0xsequence/indexer@0.43.34 - - @0xsequence/provider@0.43.34 - - @0xsequence/relayer@0.43.34 - - @0xsequence/utils@0.43.34 - -## 0.43.33 - -### Patch Changes - -- Adding onConnectOptionsChange handler to WalletRequestHandler -- Updated dependencies - - @0xsequence/indexer@0.43.33 - - @0xsequence/provider@0.43.33 - - @0xsequence/relayer@0.43.33 - - @0xsequence/utils@0.43.33 - -## 0.43.32 - -### Patch Changes - -- add Base Goerli network -- Updated dependencies - - @0xsequence/indexer@0.43.32 - - @0xsequence/provider@0.43.32 - - @0xsequence/relayer@0.43.32 - - @0xsequence/utils@0.43.32 - -## 0.43.31 - -### Patch Changes - -- remove AuxDataProvider, add promptSignInConnect -- Updated dependencies - - @0xsequence/indexer@0.43.31 - - @0xsequence/provider@0.43.31 - - @0xsequence/relayer@0.43.31 - - @0xsequence/utils@0.43.31 - -## 0.43.30 - -### Patch Changes - -- add arbitrum goerli testnet -- Updated dependencies - - @0xsequence/indexer@0.43.30 - - @0xsequence/provider@0.43.30 - - @0xsequence/relayer@0.43.30 - - @0xsequence/utils@0.43.30 - -## 0.43.29 - -### Patch Changes - -- provider: check availability of window object -- Updated dependencies - - @0xsequence/indexer@0.43.29 - - @0xsequence/provider@0.43.29 - - @0xsequence/relayer@0.43.29 - - @0xsequence/utils@0.43.29 - -## 0.43.28 - -### Patch Changes - -- update api bindings -- Updated dependencies - - @0xsequence/indexer@0.43.28 - - @0xsequence/provider@0.43.28 - - @0xsequence/relayer@0.43.28 - - @0xsequence/utils@0.43.28 - -## 0.43.27 - -### Patch Changes - -- Add rpc is sequence method -- Updated dependencies - - @0xsequence/indexer@0.43.27 - - @0xsequence/provider@0.43.27 - - @0xsequence/relayer@0.43.27 - - @0xsequence/utils@0.43.27 - -## 0.43.26 - -### Patch Changes - -- add zkevm url to enum -- Updated dependencies - - @0xsequence/indexer@0.43.26 - - @0xsequence/provider@0.43.26 - - @0xsequence/relayer@0.43.26 - - @0xsequence/utils@0.43.26 - -## 0.43.25 - -### Patch Changes - -- added polygon zkevm to mainnet networks -- Updated dependencies - - @0xsequence/indexer@0.43.25 - - @0xsequence/provider@0.43.25 - - @0xsequence/relayer@0.43.25 - - @0xsequence/utils@0.43.25 - -## 0.43.24 - -### Patch Changes - -- name change from zkevm to polygon-zkevm -- Updated dependencies - - @0xsequence/indexer@0.43.24 - - @0xsequence/provider@0.43.24 - - @0xsequence/relayer@0.43.24 - - @0xsequence/utils@0.43.24 - -## 0.43.23 - -### Patch Changes - -- update zkEVM name to Polygon zkEVM -- Updated dependencies - - @0xsequence/indexer@0.43.23 - - @0xsequence/provider@0.43.23 - - @0xsequence/relayer@0.43.23 - - @0xsequence/utils@0.43.23 - -## 0.43.22 - -### Patch Changes - -- add zkevm chain -- Updated dependencies - - @0xsequence/indexer@0.43.22 - - @0xsequence/provider@0.43.22 - - @0xsequence/relayer@0.43.22 - - @0xsequence/utils@0.43.22 - -## 0.43.21 - -### Patch Changes - -- api: update client bindings -- Updated dependencies - - @0xsequence/indexer@0.43.21 - - @0xsequence/provider@0.43.21 - - @0xsequence/relayer@0.43.21 - - @0xsequence/utils@0.43.21 - -## 0.43.20 - -### Patch Changes - -- indexer: update bindings -- Updated dependencies - - @0xsequence/indexer@0.43.20 - - @0xsequence/provider@0.43.20 - - @0xsequence/relayer@0.43.20 - - @0xsequence/utils@0.43.20 - -## 0.43.19 - -### Patch Changes - -- session proof update -- Updated dependencies - - @0xsequence/indexer@0.43.19 - - @0xsequence/provider@0.43.19 - - @0xsequence/relayer@0.43.19 - - @0xsequence/utils@0.43.19 - -## 0.43.18 - -### Patch Changes - -- rpc client global check, hardening -- Updated dependencies - - @0xsequence/indexer@0.43.18 - - @0xsequence/provider@0.43.18 - - @0xsequence/relayer@0.43.18 - - @0xsequence/utils@0.43.18 - -## 0.43.17 - -### Patch Changes - -- rpc clients, check of 'global' is defined -- Updated dependencies - - @0xsequence/indexer@0.43.17 - - @0xsequence/provider@0.43.17 - - @0xsequence/relayer@0.43.17 - - @0xsequence/utils@0.43.17 - -## 0.43.16 - -### Patch Changes - -- ethers peerDep to v5, update rpc client global use -- Updated dependencies - - @0xsequence/indexer@0.43.16 - - @0xsequence/provider@0.43.16 - - @0xsequence/relayer@0.43.16 - - @0xsequence/utils@0.43.16 - -## 0.43.15 - -### Patch Changes - -- - provider: expand receiver type on some util methods -- Updated dependencies - - @0xsequence/indexer@0.43.15 - - @0xsequence/provider@0.43.15 - - @0xsequence/relayer@0.43.15 - - @0xsequence/utils@0.43.15 - -## 0.43.14 - -### Patch Changes - -- bump -- Updated dependencies - - @0xsequence/indexer@0.43.14 - - @0xsequence/provider@0.43.14 - - @0xsequence/relayer@0.43.14 - - @0xsequence/utils@0.43.14 - -## 0.43.13 - -### Patch Changes - -- update rpc bindings -- Updated dependencies - - @0xsequence/indexer@0.43.13 - - @0xsequence/provider@0.43.13 - - @0xsequence/relayer@0.43.13 - - @0xsequence/utils@0.43.13 - -## 0.43.12 - -### Patch Changes - -- provider: single wallet init, and add new unregisterWallet() method -- Updated dependencies - - @0xsequence/indexer@0.43.12 - - @0xsequence/provider@0.43.12 - - @0xsequence/relayer@0.43.12 - - @0xsequence/utils@0.43.12 - -## 0.43.11 - -### Patch Changes - -- fix lockfiles -- re-add mocha type deleter -- Updated dependencies -- Updated dependencies - - @0xsequence/indexer@0.43.11 - - @0xsequence/provider@0.43.11 - - @0xsequence/relayer@0.43.11 - - @0xsequence/utils@0.43.11 - -## 0.43.10 - -### Patch Changes - -- various improvements -- Updated dependencies - - @0xsequence/indexer@0.43.10 - - @0xsequence/provider@0.43.10 - - @0xsequence/relayer@0.43.10 - - @0xsequence/utils@0.43.10 - -## 0.43.9 - -### Patch Changes - -- update deps -- Updated dependencies - - @0xsequence/indexer@0.43.9 - - @0xsequence/provider@0.43.9 - - @0xsequence/relayer@0.43.9 - - @0xsequence/utils@0.43.9 - -## 0.43.8 - -### Patch Changes - -- network: JsonRpcProvider with caching -- Updated dependencies - - @0xsequence/indexer@0.43.8 - - @0xsequence/provider@0.43.8 - - @0xsequence/relayer@0.43.8 - - @0xsequence/utils@0.43.8 - -## 0.43.7 - -### Patch Changes - -- provider: fix wallet network init -- Updated dependencies - - @0xsequence/utils@0.43.7 - -## 0.43.6 - -### Patch Changes - -- metadatata: update rpc bindings -- Updated dependencies - - @0xsequence/utils@0.43.6 - -## 0.43.5 - -### Patch Changes - -- provider: do not set default network for connect messages -- provider: forward missing error message -- Updated dependencies -- Updated dependencies - - @0xsequence/utils@0.43.5 - -## 0.43.4 - -### Patch Changes - -- no-change version bump to fix incorrectly tagged snapshot build -- Updated dependencies - - @0xsequence/utils@0.43.4 - -## 0.43.3 - -### Patch Changes - -- metadata: update bindings -- Updated dependencies - - @0xsequence/utils@0.43.3 - -## 0.43.2 - -### Patch Changes - -- provider: implement connectUnchecked -- Updated dependencies - - @0xsequence/utils@0.43.2 - -## 0.43.1 - -### Patch Changes - -- update to latest ethauth dep -- Updated dependencies - - @0xsequence/utils@0.43.1 - -## 0.43.0 - -### Minor Changes - -- move ethers to a peer dependency - -### Patch Changes - -- Updated dependencies - - @0xsequence/utils@0.43.0 - -## 0.42.10 - -### Patch Changes - -- add auxDataProvider -- Updated dependencies - - @0xsequence/utils@0.42.10 - -## 0.42.9 - -### Patch Changes - -- provider: add eip-191 exceptions -- Updated dependencies - - @0xsequence/utils@0.42.9 - -## 0.42.8 - -### Patch Changes - -- provider: skip setting intent origin if we're unity plugin -- Updated dependencies - - @0xsequence/utils@0.42.8 - -## 0.42.7 - -### Patch Changes - -- Add sign in options to connection settings -- Updated dependencies - - @0xsequence/utils@0.42.7 - -## 0.42.6 - -### Patch Changes - -- api bindings update -- Updated dependencies - - @0xsequence/utils@0.42.6 - -## 0.42.5 - -### Patch Changes - -- relayer: don't treat missing receipt as hard failure -- Updated dependencies - - @0xsequence/utils@0.42.5 - -## 0.42.4 - -### Patch Changes - -- provider: add custom app protocol to connect options -- Updated dependencies - - @0xsequence/utils@0.42.4 - -## 0.42.3 - -### Patch Changes - -- update api bindings -- Updated dependencies - - @0xsequence/utils@0.42.3 - -## 0.42.2 - -### Patch Changes - -- disable rinkeby network -- Updated dependencies - - @0xsequence/utils@0.42.2 - -## 0.42.1 - -### Patch Changes - -- wallet: optional waitForReceipt parameter -- Updated dependencies - - @0xsequence/utils@0.42.1 - -## 0.42.0 - -### Minor Changes - -- relayer: estimateGasLimits -> simulate -- add simulator package - -### Patch Changes - -- transactions: fix flattenAuxTransactions -- provider: only filter nullish values -- provider: re-map transaction 'gas' back to 'gasLimit' -- Updated dependencies -- Updated dependencies -- Updated dependencies -- Updated dependencies -- Updated dependencies - - @0xsequence/utils@0.42.0 - -## 0.41.3 - -### Patch Changes - -- api bindings update -- Updated dependencies - - @0xsequence/utils@0.41.3 - -## 0.41.2 - -### Patch Changes - -- api bindings update -- Updated dependencies - - @0xsequence/utils@0.41.2 - -## 0.41.1 - -### Patch Changes - -- update default networks -- Updated dependencies - - @0xsequence/utils@0.41.1 - -## 0.41.0 - -### Minor Changes - -- relayer: fix Relayer.wait() interface - - The interface for calling Relayer.wait() has changed. Instead of a single optional ill-defined timeout/delay parameter, there are three optional parameters, in order: - - - timeout: the maximum time to wait for the transaction receipt - - delay: the polling interval, i.e. the time to wait between requests - - maxFails: the maximum number of hard failures to tolerate before giving up - - Please update your codebase accordingly. - -- relayer: add optional waitForReceipt parameter to Relayer.relay - - The behaviour of Relayer.relay() was not well-defined with respect to whether or not it waited for a receipt. - This change allows the caller to specify whether to wait or not, with the default behaviour being to wait. - -### Patch Changes - -- relayer: wait receipt retry logic -- fix wrapped object error -- provider: forward delegateCall and revertOnError transaction fields -- Updated dependencies -- Updated dependencies -- Updated dependencies -- Updated dependencies -- Updated dependencies - - @0xsequence/utils@0.41.0 - -## 0.40.6 - -### Patch Changes - -- add arbitrum-nova chain -- Updated dependencies - - @0xsequence/utils@0.40.6 - -## 0.40.5 - -### Patch Changes - -- api: update bindings -- Updated dependencies - - @0xsequence/utils@0.40.5 - -## 0.40.4 - -### Patch Changes - -- add unreal transport -- Updated dependencies - - @0xsequence/utils@0.40.4 - -## 0.40.3 - -### Patch Changes - -- provider: fix MessageToSign message type -- Updated dependencies - - @0xsequence/utils@0.40.3 - -## 0.40.2 - -### Patch Changes - -- Wallet provider, loadSession method -- Updated dependencies - - @0xsequence/utils@0.40.2 - -## 0.40.1 - -### Patch Changes - -- export sequence.initWallet and sequence.getWallet -- Updated dependencies - - @0xsequence/utils@0.40.1 - -## 0.40.0 - -### Minor Changes - -- add sequence.initWallet(network, config) and sequence.getWallet() helper methods - -### Patch Changes - -- Updated dependencies - - @0xsequence/utils@0.40.0 - -## 0.39.6 - -### Patch Changes - -- indexer: update client bindings -- Updated dependencies - - @0xsequence/utils@0.39.6 - -## 0.39.5 - -### Patch Changes - -- provider: fix networkRpcUrl config option -- Updated dependencies - - @0xsequence/utils@0.39.5 - -## 0.39.4 - -### Patch Changes - -- api: update client bindings -- Updated dependencies - - @0xsequence/utils@0.39.4 - -## 0.39.3 - -### Patch Changes - -- add request method on Web3Provider -- Updated dependencies - - @0xsequence/utils@0.39.3 - -## 0.39.2 - -### Patch Changes - -- update umd name -- Updated dependencies - - @0xsequence/utils@0.39.2 - -## 0.39.1 - -### Patch Changes - -- add Aurora network -- add origin info for accountsChanged event to handle it per dapp -- Updated dependencies -- Updated dependencies - - @0xsequence/utils@0.39.1 - -## 0.39.0 - -### Minor Changes - -- abstract window.localStorage to interface type - -### Patch Changes - -- Updated dependencies - - @0xsequence/utils@0.39.0 - -## 0.38.2 - -### Patch Changes - -- provider: add Settings.defaultPurchaseAmount -- Updated dependencies - - @0xsequence/utils@0.38.2 - -## 0.38.1 - -### Patch Changes - -- update api and metadata rpc bindings -- Updated dependencies - - @0xsequence/utils@0.38.1 - -## 0.38.0 - -### Minor Changes - -- api: update bindings, change TokenPrice interface -- bridge: remove @0xsequence/bridge package -- api: update bindings, rename ContractCallArg to TupleComponent - -### Patch Changes - -- Updated dependencies -- Updated dependencies -- Updated dependencies - - @0xsequence/utils@0.38.0 - -## 0.37.1 - -### Patch Changes - -- Add back sortNetworks - Removing sorting was a breaking change for dapps on older versions which directly integrate sequence. -- Updated dependencies - - @0xsequence/utils@0.37.1 - -## 0.37.0 - -### Minor Changes - -- network related fixes and improvements -- api: bindings: exchange rate lookups - -### Patch Changes - -- Updated dependencies -- Updated dependencies - - @0xsequence/utils@0.37.0 - -## 0.36.13 - -### Patch Changes - -- api: update bindings with new price endpoints -- Updated dependencies - - @0xsequence/utils@0.36.13 - -## 0.36.12 - -### Patch Changes - -- wallet: skip remote signers if not needed -- auth: check that signature meets threshold before requesting auth token -- Updated dependencies -- Updated dependencies - - @0xsequence/utils@0.36.12 - -## 0.36.11 - -### Patch Changes - -- Prefix EIP191 message on wallet-request-handler -- Updated dependencies - - @0xsequence/utils@0.36.11 - -## 0.36.10 - -### Patch Changes - -- support bannerUrl on connect -- Updated dependencies - - @0xsequence/utils@0.36.10 - -## 0.36.9 - -### Patch Changes - -- minor dev xp improvements -- Updated dependencies - - @0xsequence/utils@0.36.9 - -## 0.36.8 - -### Patch Changes - -- more connect options (theme, payment providers, funding currencies) -- Updated dependencies - - @0xsequence/utils@0.36.8 - -## 0.36.7 - -### Patch Changes - -- fix missing break -- Updated dependencies - - @0xsequence/utils@0.36.7 - -## 0.36.6 - -### Patch Changes - -- wallet_switchEthereumChain support -- Updated dependencies - - @0xsequence/utils@0.36.6 - -## 0.36.5 - -### Patch Changes - -- auth: bump ethauth to 0.7.0 - network, wallet: don't assume position of auth network in list - api/indexer/metadata: trim trailing slash on hostname, and add endpoint urls - relayer: Allow to specify local relayer transaction parameters like gas price or gas limit -- Updated dependencies - - @0xsequence/utils@0.36.5 - -## 0.36.4 - -### Patch Changes - -- Updating list of chain ids to include other ethereum compatible chains -- Updated dependencies - - @0xsequence/utils@0.36.4 - -## 0.36.3 - -### Patch Changes - -- provider: pass connect options to prompter methods -- Updated dependencies - - @0xsequence/utils@0.36.3 - -## 0.36.2 - -### Patch Changes - -- transactions: Setting target to 0x0 when empty to during SequenceTxAbiEncode -- Updated dependencies - - @0xsequence/utils@0.36.2 - -## 0.36.1 - -### Patch Changes - -- metadata: update client with more fields -- Updated dependencies - - @0xsequence/utils@0.36.1 - -## 0.36.0 - -### Minor Changes - -- relayer, wallet: fee quote support - -### Patch Changes - -- Updated dependencies - - @0xsequence/utils@0.36.0 - -## 0.35.12 - -### Patch Changes - -- provider: rename wallet.commands to wallet.utils -- Updated dependencies - - @0xsequence/utils@0.35.12 - -## 0.35.11 - -### Patch Changes - -- provider/utils: smoother message validation -- Updated dependencies - - @0xsequence/utils@0.35.11 - -## 0.35.10 - -### Patch Changes - -- upgrade deps -- Updated dependencies - - @0xsequence/utils@0.35.10 - -## 0.35.9 - -### Patch Changes - -- provider: window-transport override event handlers with new wallet instance -- Updated dependencies - - @0xsequence/utils@0.35.9 - -## 0.35.8 - -### Patch Changes - -- provider: async wallet sign in improvements -- Updated dependencies - - @0xsequence/utils@0.35.8 - -## 0.35.7 - -### Patch Changes - -- config: cache wallet configs -- Updated dependencies - - @0xsequence/utils@0.35.7 - -## 0.35.6 - -### Patch Changes - -- provider: support async signin of wallet request handler -- Updated dependencies - - @0xsequence/utils@0.35.6 - -## 0.35.5 - -### Patch Changes - -- wallet: skip threshold check during fee estimation -- Updated dependencies - - @0xsequence/utils@0.35.5 - -## 0.35.4 - -### Patch Changes - -- - browser extension mode, center window -- Updated dependencies - - @0xsequence/utils@0.35.4 - -## 0.35.3 - -### Patch Changes - -- - update window position when in browser extension mode -- Updated dependencies - - @0xsequence/utils@0.35.3 - -## 0.35.2 - -### Patch Changes - -- - provider: WindowMessageHandler accept optional windowHref -- Updated dependencies - - @0xsequence/utils@0.35.2 - -## 0.35.1 - -### Patch Changes - -- wallet: update config on undeployed too -- Updated dependencies - - @0xsequence/utils@0.35.1 - -## 0.35.0 - -### Minor Changes - -- - config: add buildStubSignature - - provider: add checks to signing cases for wallet deployment and config statuses - - provider: add prompt for wallet deployment - - relayer: add BaseRelayer.prependWalletDeploy - - relayer: add Relayer.feeOptions - - relayer: account for wallet deployment in fee estimation - - transactions: add fromTransactionish - - wallet: add Account.prependConfigUpdate - - wallet: add Account.getFeeOptions - -### Patch Changes - -- Updated dependencies - - @0xsequence/utils@0.35.0 - -## 0.34.0 - -### Minor Changes - -- - upgrade deps - -### Patch Changes - -- Updated dependencies - - @0xsequence/utils@0.34.0 - -## 0.31.0 - -### Minor Changes - -- - upgrading to ethers v5.5 - -### Patch Changes - -- Updated dependencies - - @0xsequence/utils@0.31.0 - -## 0.30.0 - -### Minor Changes - -- - upgrade most deps - -### Patch Changes - -- Updated dependencies - - @0xsequence/utils@0.30.0 - -## 0.29.8 - -### Patch Changes - -- update api -- Updated dependencies [undefined] - - @0xsequence/utils@0.29.8 - -## 0.29.6 - -### Patch Changes - -- auth: pass testnetMode flag depending on network - -## 0.29.0 - -### Minor Changes - -- major architectural changes in Sequence design - - - only one API instance, API is no longer a per-chain service - - separate per-chain indexer service, API no longer handles indexing - - single contract metadata service, API no longer serves metadata - - chaind package has been removed, indexer and metadata packages have been added - - stronger typing with new explicit ChainId type - - multicall fixes and improvements - - forbid "wait" transactions in sendTransactionBatch calls - -### Patch Changes - -- Updated dependencies [undefined] - - @0xsequence/utils@0.29.0 - -## 0.28.0 - -### Minor Changes - -- extension provider - -### Patch Changes - -- Updated dependencies [undefined] - - @0xsequence/utils@0.28.0 - -## 0.27.0 - -### Minor Changes - -- Add requireFreshSigner lib to sessions - -### Patch Changes - -- Updated dependencies [undefined] - - @0xsequence/utils@0.27.0 - -## 0.25.1 - -### Patch Changes - -- Fix build typescrypt issue -- Updated dependencies [undefined] - - @0xsequence/utils@0.25.1 - -## 0.25.0 - -### Minor Changes - -- 10c8af8: Add estimator package - Fix multicall few calls bug - -### Patch Changes - -- Updated dependencies [10c8af8] - - @0xsequence/utils@0.25.0 - -## 0.23.0 - -### Minor Changes - -- - relayer: offer variety of gas fee options from the relayer service" - -### Patch Changes - -- Updated dependencies [undefined] - - @0xsequence/utils@0.23.0 - -## 0.22.2 - -### Patch Changes - -- e1c109e: Fix authProof on expired sessions -- Updated dependencies [e1c109e] - - @0xsequence/utils@0.22.2 - -## 0.22.1 - -### Patch Changes - -- transport session cache -- Updated dependencies [undefined] - - @0xsequence/utils@0.22.1 - -## 0.22.0 - -### Minor Changes - -- e667b65: Expose all relayer options on networks - -### Patch Changes - -- Updated dependencies [e667b65] - - @0xsequence/utils@0.22.0 - -## 0.21.5 - -### Patch Changes - -- Give priority to metaTxnId returned by relayer -- Updated dependencies [undefined] - - @0xsequence/utils@0.21.5 - -## 0.21.4 - -### Patch Changes - -- Add has enough signers method -- Updated dependencies [undefined] - - @0xsequence/utils@0.21.4 - -## 0.21.3 - -### Patch Changes - -- add window session cache -- Updated dependencies [undefined] - - @0xsequence/utils@0.21.3 - -## 0.21.2 - -### Patch Changes - -- exception handlind in relayer -- Updated dependencies [undefined] - - @0xsequence/utils@0.21.2 - -## 0.21.0 - -### Minor Changes - -- - fix gas estimation on wallets with large number of signers - - update to session handling and wallet config construction upon auth - -### Patch Changes - -- Updated dependencies [undefined] - - @0xsequence/utils@0.21.0 - -## 0.19.3 - -### Patch Changes - -- jwtAuth visibility, package version sync -- Updated dependencies [undefined] - - @0xsequence/utils@0.19.3 - -## 0.19.0 - -### Minor Changes - -- - provider, improve dapp / wallet transport io - -### Patch Changes - -- Updated dependencies [undefined] - - @0xsequence/utils@0.19.0 - -## 0.18.0 - -### Minor Changes - -- relayer improvements and pending transaction handling - -### Patch Changes - -- Updated dependencies [undefined] - - @0xsequence/utils@0.18.0 - -## 0.16.0 - -### Minor Changes - -- relayer as its own service separate from chaind - -### Patch Changes - -- Updated dependencies [undefined] - - @0xsequence/utils@0.16.0 - -## 0.15.1 - -### Patch Changes - -- update api clients -- Updated dependencies [undefined] - - @0xsequence/utils@0.15.1 - -## 0.14.3 - -### Patch Changes - -- Fix 0xSequence relayer dependencies -- Updated dependencies [undefined] - - @0xsequence/utils@0.14.3 - -## 0.14.2 - -### Patch Changes - -- Add debug logs to rpc-relayer -- Updated dependencies [undefined] - - @0xsequence/utils@0.14.2 - -## 0.14.0 - -### Minor Changes - -- update sequence utils finder which includes optimization - -### Patch Changes - -- Updated dependencies [undefined] - - @0xsequence/utils@0.14.0 - -## 0.13.0 - -### Minor Changes - -- Update SequenceUtils deployed contract - -### Patch Changes - -- Updated dependencies [undefined] - - @0xsequence/utils@0.13.0 - -## 0.12.1 - -### Patch Changes - -- npm bump -- Updated dependencies [undefined] - - @0xsequence/utils@0.12.1 - -## 0.12.0 - -### Minor Changes - -- provider: improvements to window transport - -### Patch Changes - -- Updated dependencies [undefined] - - @0xsequence/utils@0.12.0 - -## 0.11.4 - -### Patch Changes - -- update api client -- Updated dependencies [undefined] - - @0xsequence/utils@0.11.4 - -## 0.11.3 - -### Patch Changes - -- improve openWindow state options handling -- Updated dependencies [undefined] - - @0xsequence/utils@0.11.3 - -## 0.11.2 - -### Patch Changes - -- Fix multicall proxy scopes -- Updated dependencies [undefined] - - @0xsequence/utils@0.11.2 - -## 0.11.1 - -### Patch Changes - -- Add support for dynamic and nested signatures -- Updated dependencies [undefined] - - @0xsequence/utils@0.11.1 - -## 0.11.0 - -### Minor Changes - -- Update wallet context to 1.7 contracts - -### Patch Changes - -- Updated dependencies [undefined] - - @0xsequence/utils@0.11.0 - -## 0.10.9 - -### Patch Changes - -- add support for public addresses as signers in session.open -- Updated dependencies [undefined] - - @0xsequence/utils@0.10.9 - -## 0.10.8 - -### Patch Changes - -- Multicall production configuration -- Updated dependencies [undefined] - - @0xsequence/utils@0.10.8 - -## 0.10.7 - -### Patch Changes - -- allow provider transport to force disconnect -- Updated dependencies [undefined] - - @0xsequence/utils@0.10.7 - -## 0.10.6 - -### Patch Changes - -- - fix getWalletState method -- Updated dependencies [undefined] - - @0xsequence/utils@0.10.6 - -## 0.10.5 - -### Patch Changes - -- update relayer gas refund options -- Updated dependencies [undefined] - - @0xsequence/utils@0.10.5 - -## 0.10.4 - -### Patch Changes - -- Update api proto -- Updated dependencies [undefined] - - @0xsequence/utils@0.10.4 - -## 0.10.3 - -### Patch Changes - -- Fix loading config cross-chain -- Updated dependencies [undefined] - - @0xsequence/utils@0.10.3 - -## 0.10.2 - -### Patch Changes - -- - message digest fix -- Updated dependencies [undefined] - - @0xsequence/utils@0.10.2 - -## 0.10.1 - -### Patch Changes - -- upgrade deps -- Updated dependencies [undefined] - - @0xsequence/utils@0.10.1 - -## 0.10.0 - -### Minor Changes - -- Deployed new contracts with ERC1271 signer support - -### Patch Changes - -- Updated dependencies [undefined] - - @0xsequence/utils@0.10.0 - -## 0.9.6 - -### Patch Changes - -- Update ABIs for latest sequence contracts -- Updated dependencies [undefined] - - @0xsequence/utils@0.9.6 - -## 0.9.5 - -### Patch Changes - -- Implemented session class -- Updated dependencies [undefined] - - @0xsequence/utils@0.9.5 - -## 0.9.3 - -### Patch Changes - -- - minor improvements -- Updated dependencies [undefined] - - @0xsequence/utils@0.9.3 - -## 0.9.1 - -### Patch Changes - -- - patch bump -- Updated dependencies [undefined] - - @0xsequence/utils@0.9.1 - -## 0.9.0 - -### Minor Changes - -- - provider transport hardening - -### Patch Changes - -- Updated dependencies [undefined] - - @0xsequence/utils@0.9.0 - -## 0.8.5 - -### Patch Changes - -- - use latest wallet-contracts -- Updated dependencies [undefined] - - @0xsequence/utils@0.8.5 - -## 0.8.4 - -### Patch Changes - -- - minor improvements, name updates and comments -- Updated dependencies [undefined] - - @0xsequence/utils@0.8.4 - -## 0.8.3 - -### Patch Changes - -- - refinements - - - normalize signer address in config - - - provider: getWalletState() method to WalletProvider - -- Updated dependencies [undefined] - - @0xsequence/utils@0.8.3 - -## 0.8.2 - -### Patch Changes - -- - field rename and ethauth dependency bump -- Updated dependencies [undefined] - - @0xsequence/utils@0.8.2 - -## 0.8.1 - -### Patch Changes - -- - variety of optimizations -- Updated dependencies [undefined] - - @0xsequence/utils@0.8.1 - -## 0.8.0 - -### Minor Changes - -- - changeset fix - -### Patch Changes - -- Updated dependencies [undefined] - - @0xsequence/utils@0.8.0 - -## 0.7.1 - -### Patch Changes - -- 02377ab: Minor improvements -- 1fe4379: \* explicitly export types in 0xsequence meta-package - - introduce new `networksIndex` method in network package -- Updated dependencies [02377ab] - - @0xsequence/utils@0.7.1 - -## 0.7.0 - -### Patch Changes - -- 6f11ed7: sequence.js, init release -- Updated dependencies [6f11ed7] - - @0xsequence/utils@0.7.0 diff --git a/old/packages/network/README.md b/old/packages/network/README.md deleted file mode 100644 index d0f9f960a..000000000 --- a/old/packages/network/README.md +++ /dev/null @@ -1,4 +0,0 @@ -@0xsequence/network -=================== - -See [0xsequence project page](https://github.com/0xsequence/sequence.js). diff --git a/old/packages/network/constants/package.json b/old/packages/network/constants/package.json deleted file mode 100644 index 9cbfa6612..000000000 --- a/old/packages/network/constants/package.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "main": "dist/0xsequence-network-constants.cjs.js", - "module": "dist/0xsequence-network-constants.esm.js" -} diff --git a/old/packages/network/networkNames.md b/old/packages/network/networkNames.md deleted file mode 100644 index a4adce70b..000000000 --- a/old/packages/network/networkNames.md +++ /dev/null @@ -1,62 +0,0 @@ -# Network Names - -Though networks have proper full names, we sometimes need to refer to a chain by a name slug. - -A name slug is the name, sometimes simplified, and in kebab-case. This maximizes compatibility in the event that you want to use chain names as url paths, or filenames. - -You can use this file as a reference to look up the correct network name slug a network's full name or its chain ID. - -| Network Name | Chain ID | Name Slug | -| --- | --- | --- | -| Ethereum | 1 | mainnet | -| Optimism | 10 | optimism | -| Telos | 40 | telos | -| Telos Testnet | 41 | telos-testnet | -| BNB Smart Chain | 56 | bsc | -| BNB Smart Chain Testnet | 97 | bsc-testnet | -| Gnosis Chain | 100 | gnosis | -| Polygon | 137 | polygon | -| XR1 | 273 | xr1 | -| Polygon zkEVM | 1101 | polygon-zkevm | -| Moonbeam | 1284 | moonbeam | -| Moonbase Alpha | 1287 | moonbase-alpha | -| Soneium | 1868 | soneium | -| Soneium Minato (Testnet) | 1946 | soneium-minato | -| B3 Sepolia | 1993 | b3-sepolia | -| XR Sepolia | 2730 | xr-sepolia | -| LAOS | 6283 | laos | -| The Root Network | 7668 | rootnet | -| The Root Network Porcini Testnet | 7672 | rootnet-porcini | -| B3 | 8333 | b3 | -| Base (Coinbase) | 8453 | base | -| Monad Testnet | 10143 | monad-testnet | -| Immutable zkEVM | 13371 | immutable-zkevm | -| Immutable zkEVM Testnet | 13473 | immutable-zkevm-testnet | -| Oasys Homeverse | 19011 | homeverse | -| Hardhat (local testnet) | 31337 | hardhat | -| Hardhat (local testnet) | 31338 | hardhat2 | -| APE Chain Testnet | 33111 | apechain-testnet | -| APE Chain | 33139 | apechain | -| Oasys Homeverse Testnet | 40875 | homeverse-testnet | -| Arbitrum One | 42161 | arbitrum | -| Arbitrum Nova | 42170 | arbitrum-nova | -| Etherlink | 42793 | etherlink | -| Avalanche Testnet | 43113 | avalanche-testnet | -| Avalanche | 43114 | avalanche | -| Somnia Testnet | 50312 | somnia-testnet | -| Frequency Testnet | 53716 | frequency-testnet | -| LAOS Sigma Testnet | 62850 | laos-sigma-testnet | -| Polygon Amoy | 80002 | amoy | -| Blast | 81457 | blast | -| Base Sepolia | 84532 | base-sepolia | -| Borne Testnet | 94984 | borne-testnet | -| Etherlink Testnet | 128123 | etherlink-testnet | -| Arbitrum Sepolia | 421614 | arbitrum-sepolia | -| Xai | 660279 | xai | -| Sepolia | 11155111 | sepolia | -| Optimism Sepolia | 11155420 | optimism-sepolia | -| TOY (Testnet) | 21000000 | toy-testnet | -| SKALE Nebula Gaming Hub Testnet | 37084624 | skale-nebula-testnet | -| Blast Sepolia | 168587773 | blast-sepolia | -| SKALE Nebula Gaming Hub | 1482601649 | skale-nebula | -| Xai Sepolia | 37714555429 | xai-sepolia | diff --git a/old/packages/network/networkNames.template.md b/old/packages/network/networkNames.template.md deleted file mode 100644 index de19aadcb..000000000 --- a/old/packages/network/networkNames.template.md +++ /dev/null @@ -1,9 +0,0 @@ -# Network Names - -Though networks have proper full names, we sometimes need to refer to a chain by a name slug. - -A name slug is the name, sometimes simplified, and in kebab-case. This maximizes compatibility in the event that you want to use chain names as url paths, or filenames. - -You can use this file as a reference to look up the correct network name slug a network's full name or its chain ID. - - diff --git a/old/packages/network/package.json b/old/packages/network/package.json deleted file mode 100644 index 18e86db05..000000000 --- a/old/packages/network/package.json +++ /dev/null @@ -1,38 +0,0 @@ -{ - "name": "@0xsequence/network", - "version": "2.3.8", - "description": "network sub-package for Sequence", - "repository": "https://github.com/0xsequence/sequence.js/tree/master/packages/network", - "source": "src/index.ts", - "main": "dist/0xsequence-network.cjs.js", - "module": "dist/0xsequence-network.esm.js", - "author": "Horizon Blockchain Games", - "license": "Apache-2.0", - "scripts": { - "test": "echo", - "typecheck": "tsc --noEmit" - }, - "peerDependencies": { - "ethers": ">=6" - }, - "dependencies": { - "@0xsequence/core": "workspace:*", - "@0xsequence/indexer": "workspace:*", - "@0xsequence/relayer": "workspace:*", - "@0xsequence/utils": "workspace:*" - }, - "devDependencies": { - "ethers": "6.13.4" - }, - "files": [ - "src", - "dist", - "constants" - ], - "preconstruct": { - "entrypoints": [ - "index.ts", - "constants.ts" - ] - } -} diff --git a/old/packages/network/src/config.ts b/old/packages/network/src/config.ts deleted file mode 100644 index aad054aa5..000000000 --- a/old/packages/network/src/config.ts +++ /dev/null @@ -1,148 +0,0 @@ -import { ethers } from 'ethers' -import { Indexer } from '@0xsequence/indexer' -import { Relayer, RpcRelayerOptions } from '@0xsequence/relayer' -import { findNetworkConfig, stringTemplate, validateAndSortNetworks } from './utils' -import { isBigNumberish } from '@0xsequence/utils' -import { ChainId, NetworkMetadata, networks } from './constants' - -export type NetworkConfig = NetworkMetadata & { - rpcUrl: string - provider?: ethers.Provider - indexerUrl?: string - indexer?: Indexer - relayer?: Relayer | RpcRelayerOptions - - // isDefaultChain identifies the default network. For example, a dapp may run on the Polygon - // network and may configure the wallet to use it as its main/default chain. - isDefaultChain?: boolean - - // Disabled / deprecated chain - disabled?: boolean -} - -type LegacyNetworkConfig = NetworkConfig & { isAuthChain?: boolean } - -export const indexerURL = (network: string) => stringTemplate('https://${network}-indexer.sequence.app', { network }) -export const relayerURL = (network: string) => stringTemplate('https://${network}-relayer.sequence.app', { network }) -export const nodesURL = (network: string) => stringTemplate('https://nodes.sequence.app/${network}', { network }) - -export function findSupportedNetwork(chainIdOrName: string | ChainIdLike): NetworkConfig | undefined { - return findNetworkConfig(allNetworks, chainIdOrName) -} - -export type ChainIdLike = NetworkConfig | ethers.BigNumberish - -export function toChainIdNumber(chainIdLike: ChainIdLike): bigint { - if (typeof chainIdLike === 'bigint') { - return chainIdLike - } - - if (isBigNumberish(chainIdLike)) { - return BigInt(chainIdLike) - } - - return BigInt(chainIdLike.chainId) -} - -const createNetworkConfig = (chainId: ChainId, options?: { disabled?: boolean }): NetworkConfig => { - const network = networks[chainId] - - if (!network) { - throw new Error(`Network with chainId ${chainId} not found`) - } - - const rpcUrl = nodesURL(network.name) - - return { - ...network, - rpcUrl, - indexerUrl: indexerURL(network.name), - relayer: { - url: relayerURL(network.name), - provider: { - url: rpcUrl - } - }, - ...options - } -} - -export const hardhatNetworks = [ - { - ...networks[ChainId.HARDHAT], - rpcUrl: 'http://localhost:8545', - relayer: { - url: 'http://localhost:3000', - provider: { - url: 'http://localhost:8545' - } - } - }, - { - ...networks[ChainId.HARDHAT_2], - rpcUrl: 'http://localhost:9545', - relayer: { - url: 'http://localhost:3000', - provider: { - url: 'http://localhost:9545' - } - } - } -] - -export const allNetworks = validateAndSortNetworks([ - { ...createNetworkConfig(ChainId.POLYGON), isDefaultChain: true, isAuthChain: true } as LegacyNetworkConfig, - createNetworkConfig(ChainId.MAINNET), - createNetworkConfig(ChainId.BSC), - createNetworkConfig(ChainId.AVALANCHE), - createNetworkConfig(ChainId.ARBITRUM), - createNetworkConfig(ChainId.ARBITRUM_NOVA), - createNetworkConfig(ChainId.OPTIMISM), - createNetworkConfig(ChainId.OPTIMISM_SEPOLIA), - createNetworkConfig(ChainId.POLYGON_ZKEVM), - createNetworkConfig(ChainId.GNOSIS), - createNetworkConfig(ChainId.RINKEBY, { disabled: true }), - createNetworkConfig(ChainId.GOERLI, { disabled: true }), - createNetworkConfig(ChainId.SEPOLIA), - createNetworkConfig(ChainId.POLYGON_MUMBAI, { disabled: true }), - createNetworkConfig(ChainId.POLYGON_AMOY), - createNetworkConfig(ChainId.BSC_TESTNET), - createNetworkConfig(ChainId.ARBITRUM_SEPOLIA), - createNetworkConfig(ChainId.BASE), - createNetworkConfig(ChainId.BASE_SEPOLIA), - createNetworkConfig(ChainId.HOMEVERSE), - createNetworkConfig(ChainId.HOMEVERSE_TESTNET), - createNetworkConfig(ChainId.XAI), - createNetworkConfig(ChainId.XAI_SEPOLIA), - createNetworkConfig(ChainId.AVALANCHE_TESTNET), - createNetworkConfig(ChainId.XR1), - createNetworkConfig(ChainId.XR_SEPOLIA), - createNetworkConfig(ChainId.B3), - createNetworkConfig(ChainId.B3_SEPOLIA), - createNetworkConfig(ChainId.APECHAIN), - createNetworkConfig(ChainId.APECHAIN_TESTNET), - createNetworkConfig(ChainId.BLAST), - createNetworkConfig(ChainId.BLAST_SEPOLIA), - createNetworkConfig(ChainId.TELOS), - createNetworkConfig(ChainId.TELOS_TESTNET), - createNetworkConfig(ChainId.BORNE_TESTNET), - createNetworkConfig(ChainId.SKALE_NEBULA), - createNetworkConfig(ChainId.SKALE_NEBULA_TESTNET), - createNetworkConfig(ChainId.SONEIUM), - createNetworkConfig(ChainId.SONEIUM_MINATO), - createNetworkConfig(ChainId.TOY_TESTNET), - createNetworkConfig(ChainId.IMMUTABLE_ZKEVM), - createNetworkConfig(ChainId.IMMUTABLE_ZKEVM_TESTNET), - createNetworkConfig(ChainId.ROOT_NETWORK), - createNetworkConfig(ChainId.ROOT_NETWORK_PORCINI), - createNetworkConfig(ChainId.LAOS), - createNetworkConfig(ChainId.LAOS_SIGMA_TESTNET), - createNetworkConfig(ChainId.MOONBEAM), - createNetworkConfig(ChainId.MOONBASE_ALPHA), - createNetworkConfig(ChainId.ETHERLINK), - createNetworkConfig(ChainId.ETHERLINK_TESTNET), - createNetworkConfig(ChainId.SOMNIA_TESTNET), - createNetworkConfig(ChainId.MONAD_TESTNET), - createNetworkConfig(ChainId.FREQUENCY_TESTNET), - ...hardhatNetworks -]) diff --git a/old/packages/network/src/constants.ts b/old/packages/network/src/constants.ts deleted file mode 100644 index 6f9f23f2b..000000000 --- a/old/packages/network/src/constants.ts +++ /dev/null @@ -1,1184 +0,0 @@ -export enum NetworkType { - MAINNET = 'mainnet', - TESTNET = 'testnet' -} - -export type BlockExplorerConfig = { - name?: string - rootUrl: string - addressUrl?: string - txnHashUrl?: string -} - -export interface NetworkMetadata { - chainId: ChainId - type?: NetworkType - name: string - title?: string - logoURI?: string - blockExplorer?: BlockExplorerConfig - ensAddress?: string - testnet?: boolean // Deprecated field, use type instead - deprecated?: boolean // The actual network is deprecated - nativeToken: { - symbol: string - name: string - decimals: number - } -} - -export enum ChainId { - // Ethereum - MAINNET = 1, - ROPSTEN = 3, // network is deprecated - RINKEBY = 4, // network is deprecated - GOERLI = 5, // network is deprecated - KOVAN = 42, // network is deprecated - SEPOLIA = 11155111, - - // Polygon - POLYGON = 137, - POLYGON_MUMBAI = 80001, // network is deprecated - POLYGON_ZKEVM = 1101, - POLYGON_AMOY = 80002, - - // BSC - BSC = 56, - BSC_TESTNET = 97, - - // Optimism - OPTIMISM = 10, - OPTIMISM_KOVAN = 69, // network is deprecated - OPTIMISM_GOERLI = 420, // network is deprecated - OPTIMISM_SEPOLIA = 11155420, - - // Arbitrum One - ARBITRUM = 42161, - ARBITRUM_GOERLI = 421613, // network is deprecated - ARBITRUM_SEPOLIA = 421614, - - // Arbitrum Nova - ARBITRUM_NOVA = 42170, - - // Avalanche - AVALANCHE = 43114, - AVALANCHE_TESTNET = 43113, - - // Gnosis Chain (XDAI) - GNOSIS = 100, - - // BASE - BASE = 8453, - BASE_GOERLI = 84531, // network is deprecated - BASE_SEPOLIA = 84532, - - // HOMEVERSE - HOMEVERSE_TESTNET = 40875, - HOMEVERSE = 19011, - - // Xai - XAI = 660279, - XAI_SEPOLIA = 37714555429, - - // XR - XR1 = 273, - XR_SEPOLIA = 2730, - - // TELOS - TELOS = 40, - TELOS_TESTNET = 41, - - // B3 Sepolia - B3 = 8333, - B3_SEPOLIA = 1993, - - // APE Chain - APECHAIN = 33139, - APECHAIN_TESTNET = 33111, - - // Blast - BLAST = 81457, - BLAST_SEPOLIA = 168587773, - - // Borne - BORNE_TESTNET = 94984, - - // SKALE Nebula - SKALE_NEBULA = 1482601649, - SKALE_NEBULA_TESTNET = 37084624, - - // Soneium Minato - SONEIUM_MINATO = 1946, - SONEIUM = 1868, - - // TOY Testnet - TOY_TESTNET = 21000000, - - // Immutable zkEVM - IMMUTABLE_ZKEVM = 13371, - IMMUTABLE_ZKEVM_TESTNET = 13473, - - // The Root Network - ROOT_NETWORK = 7668, - ROOT_NETWORK_PORCINI = 7672, - - // HARDHAT TESTNETS - HARDHAT = 31337, - HARDHAT_2 = 31338, - - // LAOS - LAOS = 6283, - LAOS_SIGMA_TESTNET = 62850, - - //ETHERLINK - ETHERLINK = 42793, - ETHERLINK_TESTNET = 128123, - - // MOONBEAM - MOONBEAM = 1284, - MOONBASE_ALPHA = 1287, - - //MONAD_TESTNET - MONAD_TESTNET = 10143, - - //SOMNIA_TESTNET - SOMNIA_TESTNET = 50312, - - //FREQUENCY_TESTNET - FREQUENCY_TESTNET = 53716 -} - -export const networks: Record = { - [ChainId.MAINNET]: { - chainId: ChainId.MAINNET, - type: NetworkType.MAINNET, - name: 'mainnet', - title: 'Ethereum', - logoURI: `https://assets.sequence.info/images/networks/medium/${ChainId.MAINNET}.webp`, - blockExplorer: { - name: 'Etherscan', - rootUrl: 'https://etherscan.io/' - }, - nativeToken: { - symbol: 'ETH', - name: 'Ether', - decimals: 18 - }, - ensAddress: '0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e' - }, - [ChainId.ROPSTEN]: { - chainId: ChainId.ROPSTEN, - type: NetworkType.TESTNET, - name: 'ropsten', - title: 'Ropsten', - logoURI: `https://assets.sequence.info/images/networks/medium/${ChainId.ROPSTEN}.webp`, - testnet: true, - blockExplorer: { - name: 'Etherscan (Ropsten)', - rootUrl: 'https://ropsten.etherscan.io/' - }, - nativeToken: { - symbol: 'roETH', - name: 'Ropsten Ether', - decimals: 18 - }, - ensAddress: '0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e', - deprecated: true - }, - [ChainId.RINKEBY]: { - chainId: ChainId.RINKEBY, - type: NetworkType.TESTNET, - name: 'rinkeby', - title: 'Rinkeby', - logoURI: `https://assets.sequence.info/images/networks/medium/${ChainId.RINKEBY}.webp`, - testnet: true, - blockExplorer: { - name: 'Etherscan (Rinkeby)', - rootUrl: 'https://rinkeby.etherscan.io/' - }, - nativeToken: { - symbol: 'rETH', - name: 'Rinkeby Ether', - decimals: 18 - }, - ensAddress: '0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e', - deprecated: true - }, - [ChainId.GOERLI]: { - chainId: ChainId.GOERLI, - type: NetworkType.TESTNET, - name: 'goerli', - title: 'Goerli', - logoURI: `https://assets.sequence.info/images/networks/medium/${ChainId.GOERLI}.webp`, - testnet: true, - blockExplorer: { - name: 'Etherscan (Goerli)', - rootUrl: 'https://goerli.etherscan.io/' - }, - nativeToken: { - symbol: 'gETH', - name: 'Goerli Ether', - decimals: 18 - }, - ensAddress: '0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e', - deprecated: true - }, - [ChainId.KOVAN]: { - chainId: ChainId.KOVAN, - type: NetworkType.TESTNET, - name: 'kovan', - title: 'Kovan', - logoURI: `https://assets.sequence.info/images/networks/medium/${ChainId.KOVAN}.webp`, - testnet: true, - blockExplorer: { - name: 'Etherscan (Kovan)', - rootUrl: 'https://kovan.etherscan.io/' - }, - nativeToken: { - symbol: 'kETH', - name: 'Kovan Ether', - decimals: 18 - }, - deprecated: true - }, - [ChainId.SEPOLIA]: { - chainId: ChainId.SEPOLIA, - type: NetworkType.TESTNET, - name: 'sepolia', - title: 'Sepolia', - logoURI: `https://assets.sequence.info/images/networks/medium/${ChainId.SEPOLIA}.webp`, - testnet: true, - blockExplorer: { - name: 'Etherscan (Sepolia)', - rootUrl: 'https://sepolia.etherscan.io/' - }, - nativeToken: { - symbol: 'sETH', - name: 'Sepolia Ether', - decimals: 18 - } - }, - [ChainId.POLYGON]: { - chainId: ChainId.POLYGON, - type: NetworkType.MAINNET, - name: 'polygon', - title: 'Polygon', - logoURI: `https://assets.sequence.info/images/networks/medium/${ChainId.POLYGON}.webp`, - blockExplorer: { - name: 'Polygonscan', - rootUrl: 'https://polygonscan.com/' - }, - nativeToken: { - symbol: 'POL', - name: 'POL', - decimals: 18 - } - }, - [ChainId.POLYGON_MUMBAI]: { - chainId: ChainId.POLYGON_MUMBAI, - type: NetworkType.TESTNET, - name: 'mumbai', - title: 'Polygon Mumbai', - logoURI: `https://assets.sequence.info/images/networks/medium/${ChainId.POLYGON_MUMBAI}.webp`, - testnet: true, - blockExplorer: { - name: 'Polygonscan (Mumbai)', - rootUrl: 'https://mumbai.polygonscan.com/' - }, - nativeToken: { - symbol: 'mMATIC', - name: 'Mumbai Polygon', - decimals: 18 - }, - deprecated: true - }, - [ChainId.POLYGON_AMOY]: { - chainId: ChainId.POLYGON_AMOY, - type: NetworkType.TESTNET, - name: 'amoy', - title: 'Polygon Amoy', - logoURI: `https://assets.sequence.info/images/networks/medium/${ChainId.POLYGON_AMOY}.webp`, - testnet: true, - blockExplorer: { - name: 'OKLink (Amoy)', - rootUrl: 'https://www.oklink.com/amoy/' - }, - nativeToken: { - symbol: 'aPOL', - name: 'Amoy POL', - decimals: 18 - } - }, - [ChainId.POLYGON_ZKEVM]: { - chainId: ChainId.POLYGON_ZKEVM, - type: NetworkType.MAINNET, - name: 'polygon-zkevm', - title: 'Polygon zkEVM', - logoURI: `https://assets.sequence.info/images/networks/medium/${ChainId.POLYGON_ZKEVM}.webp`, - blockExplorer: { - name: 'Polygonscan (zkEVM)', - rootUrl: 'https://zkevm.polygonscan.com/' - }, - nativeToken: { - symbol: 'ETH', - name: 'Ether', - decimals: 18 - } - }, - [ChainId.BSC]: { - chainId: ChainId.BSC, - type: NetworkType.MAINNET, - name: 'bsc', - title: 'BNB Smart Chain', - logoURI: `https://assets.sequence.info/images/networks/medium/${ChainId.BSC}.webp`, - blockExplorer: { - name: 'BSCScan', - rootUrl: 'https://bscscan.com/' - }, - nativeToken: { - symbol: 'BNB', - name: 'BNB', - decimals: 18 - } - }, - [ChainId.BSC_TESTNET]: { - chainId: ChainId.BSC_TESTNET, - type: NetworkType.TESTNET, - name: 'bsc-testnet', - title: 'BNB Smart Chain Testnet', - logoURI: `https://assets.sequence.info/images/networks/medium/${ChainId.BSC_TESTNET}.webp`, - testnet: true, - blockExplorer: { - name: 'BSCScan (Testnet)', - rootUrl: 'https://testnet.bscscan.com/' - }, - nativeToken: { - symbol: 'tBNB', - name: 'Testnet BNB', - decimals: 18 - } - }, - [ChainId.OPTIMISM]: { - chainId: ChainId.OPTIMISM, - type: NetworkType.MAINNET, - name: 'optimism', - title: 'Optimism', - logoURI: `https://assets.sequence.info/images/networks/medium/${ChainId.OPTIMISM}.webp`, - blockExplorer: { - name: 'Etherscan (Optimism)', - rootUrl: 'https://optimistic.etherscan.io/' - }, - nativeToken: { - symbol: 'ETH', - name: 'Ether', - decimals: 18 - } - }, - [ChainId.OPTIMISM_KOVAN]: { - chainId: ChainId.OPTIMISM_KOVAN, - type: NetworkType.TESTNET, - name: 'optimism-kovan', - title: 'Optimism Kovan', - logoURI: `https://assets.sequence.info/images/networks/medium/${ChainId.OPTIMISM_KOVAN}.webp`, - testnet: true, - blockExplorer: { - name: 'Etherscan (Optimism Kovan)', - rootUrl: 'https://kovan-optimistic.etherscan.io/' - }, - nativeToken: { - symbol: 'kETH', - name: 'Kovan Ether', - decimals: 18 - }, - deprecated: true - }, - [ChainId.OPTIMISM_GOERLI]: { - chainId: ChainId.OPTIMISM_GOERLI, - type: NetworkType.TESTNET, - name: 'optimism-goerli', - title: 'Optimism Goerli', - logoURI: `https://assets.sequence.info/images/networks/medium/${ChainId.OPTIMISM_GOERLI}.webp`, - testnet: true, - blockExplorer: { - name: 'Etherscan (Optimism Goerli)', - rootUrl: 'https://goerli-optimistic.etherscan.io/' - }, - nativeToken: { - symbol: 'gETH', - name: 'Goerli Ether', - decimals: 18 - }, - deprecated: true - }, - [ChainId.OPTIMISM_SEPOLIA]: { - chainId: ChainId.OPTIMISM_SEPOLIA, - type: NetworkType.TESTNET, - name: 'optimism-sepolia', - title: 'Optimism Sepolia', - logoURI: `https://assets.sequence.info/images/networks/medium/${ChainId.OPTIMISM_SEPOLIA}.webp`, - testnet: true, - blockExplorer: { - name: 'Etherscan (Optimism Sepolia)', - rootUrl: 'https://sepolia-optimistic.etherscan.io/' - }, - nativeToken: { - symbol: 'sETH', - name: 'Sepolia Ether', - decimals: 18 - } - }, - [ChainId.ARBITRUM]: { - chainId: ChainId.ARBITRUM, - type: NetworkType.MAINNET, - name: 'arbitrum', - title: 'Arbitrum One', - logoURI: `https://assets.sequence.info/images/networks/medium/${ChainId.ARBITRUM}.webp`, - blockExplorer: { - name: 'Arbiscan', - rootUrl: 'https://arbiscan.io/' - }, - nativeToken: { - symbol: 'ETH', - name: 'Ether', - decimals: 18 - } - }, - [ChainId.ARBITRUM_GOERLI]: { - chainId: ChainId.ARBITRUM_GOERLI, - type: NetworkType.TESTNET, - name: 'arbitrum-goerli', - title: 'Arbitrum Goerli', - logoURI: `https://assets.sequence.info/images/networks/medium/${ChainId.ARBITRUM_GOERLI}.webp`, - testnet: true, - blockExplorer: { - name: 'Arbiscan (Goerli Testnet)', - rootUrl: 'https://testnet.arbiscan.io/' - }, - nativeToken: { - symbol: 'gETH', - name: 'Goerli Ether', - decimals: 18 - }, - deprecated: true - }, - [ChainId.ARBITRUM_SEPOLIA]: { - chainId: ChainId.ARBITRUM_SEPOLIA, - type: NetworkType.TESTNET, - name: 'arbitrum-sepolia', - title: 'Arbitrum Sepolia', - logoURI: `https://assets.sequence.info/images/networks/medium/${ChainId.ARBITRUM_SEPOLIA}.webp`, - testnet: true, - blockExplorer: { - name: 'Arbiscan (Sepolia Testnet)', - rootUrl: 'https://sepolia.arbiscan.io/' - }, - nativeToken: { - symbol: 'sETH', - name: 'Sepolia Ether', - decimals: 18 - } - }, - [ChainId.ARBITRUM_NOVA]: { - chainId: ChainId.ARBITRUM_NOVA, - type: NetworkType.MAINNET, - name: 'arbitrum-nova', - title: 'Arbitrum Nova', - logoURI: `https://assets.sequence.info/images/networks/medium/${ChainId.ARBITRUM_NOVA}.webp`, - blockExplorer: { - name: 'Arbiscan Nova', - rootUrl: 'https://nova.arbiscan.io/' - }, - nativeToken: { - symbol: 'ETH', - name: 'Ether', - decimals: 18 - } - }, - [ChainId.AVALANCHE]: { - chainId: ChainId.AVALANCHE, - type: NetworkType.MAINNET, - name: 'avalanche', - title: 'Avalanche', - logoURI: `https://assets.sequence.info/images/networks/medium/${ChainId.AVALANCHE}.webp`, - blockExplorer: { - name: 'Snowtrace', - rootUrl: 'https://subnets.avax.network/c-chain/' - }, - nativeToken: { - symbol: 'AVAX', - name: 'AVAX', - decimals: 18 - } - }, - [ChainId.AVALANCHE_TESTNET]: { - chainId: ChainId.AVALANCHE_TESTNET, - type: NetworkType.TESTNET, - name: 'avalanche-testnet', - title: 'Avalanche Testnet', - logoURI: `https://assets.sequence.info/images/networks/medium/${ChainId.AVALANCHE_TESTNET}.webp`, - testnet: true, - blockExplorer: { - name: 'Snowtrace (Testnet)', - rootUrl: 'https://subnets-test.avax.network/c-chain/' - }, - nativeToken: { - symbol: 'tAVAX', - name: 'Testnet AVAX', - decimals: 18 - } - }, - [ChainId.GNOSIS]: { - chainId: ChainId.GNOSIS, - type: NetworkType.MAINNET, - name: 'gnosis', - title: 'Gnosis Chain', - logoURI: `https://assets.sequence.info/images/networks/medium/${ChainId.GNOSIS}.webp`, - blockExplorer: { - name: 'Gnosis Chain Explorer', - rootUrl: 'https://blockscout.com/xdai/mainnet/' - }, - nativeToken: { - symbol: 'XDAI', - name: 'XDAI', - decimals: 18 - } - }, - [ChainId.BASE]: { - chainId: ChainId.BASE, - type: NetworkType.MAINNET, - name: 'base', - title: 'Base (Coinbase)', - logoURI: `https://assets.sequence.info/images/networks/medium/${ChainId.BASE}.webp`, - blockExplorer: { - name: 'Base Explorer', - rootUrl: 'https://basescan.org/' - }, - nativeToken: { - symbol: 'ETH', - name: 'Ether', - decimals: 18 - } - }, - [ChainId.BASE_GOERLI]: { - chainId: ChainId.BASE_GOERLI, - type: NetworkType.TESTNET, - name: 'base-goerli', - title: 'Base Goerli', - logoURI: `https://assets.sequence.info/images/networks/medium/${ChainId.BASE_GOERLI}.webp`, - testnet: true, - blockExplorer: { - name: 'Base Goerli Explorer', - rootUrl: 'https://goerli.basescan.org/' - }, - nativeToken: { - symbol: 'gETH', - name: 'Goerli Ether', - decimals: 18 - }, - deprecated: true - }, - [ChainId.BASE_SEPOLIA]: { - chainId: ChainId.BASE_SEPOLIA, - type: NetworkType.TESTNET, - name: 'base-sepolia', - title: 'Base Sepolia', - logoURI: `https://assets.sequence.info/images/networks/medium/${ChainId.BASE_SEPOLIA}.webp`, - testnet: true, - blockExplorer: { - name: 'Base Sepolia Explorer', - rootUrl: 'https://base-sepolia.blockscout.com/' - }, - nativeToken: { - symbol: 'sETH', - name: 'Sepolia Ether', - decimals: 18 - } - }, - [ChainId.HOMEVERSE]: { - chainId: ChainId.HOMEVERSE, - type: NetworkType.MAINNET, - name: 'homeverse', - title: 'Oasys Homeverse', - logoURI: `https://assets.sequence.info/images/networks/medium/${ChainId.HOMEVERSE}.webp`, - blockExplorer: { - name: 'Oasys Homeverse Explorer', - rootUrl: 'https://explorer.oasys.homeverse.games/' - }, - nativeToken: { - symbol: 'OAS', - name: 'OAS', - decimals: 18 - } - }, - [ChainId.HOMEVERSE_TESTNET]: { - chainId: ChainId.HOMEVERSE_TESTNET, - type: NetworkType.TESTNET, - name: 'homeverse-testnet', - title: 'Oasys Homeverse Testnet', - logoURI: `https://assets.sequence.info/images/networks/medium/${ChainId.HOMEVERSE_TESTNET}.webp`, - testnet: true, - blockExplorer: { - name: 'Oasys Homeverse Explorer (Testnet)', - rootUrl: 'https://explorer.testnet.oasys.homeverse.games/' - }, - nativeToken: { - symbol: 'tOAS', - name: 'Testnet OAS', - decimals: 18 - } - }, - [ChainId.XAI]: { - chainId: ChainId.XAI, - type: NetworkType.MAINNET, - name: 'xai', - title: 'Xai', - logoURI: `https://assets.sequence.info/images/networks/medium/${ChainId.XAI}.webp`, - blockExplorer: { - name: 'Xai Explorer', - rootUrl: 'https://explorer.xai-chain.net/' - }, - nativeToken: { - symbol: 'XAI', - name: 'XAI', - decimals: 18 - } - }, - [ChainId.XAI_SEPOLIA]: { - chainId: ChainId.XAI_SEPOLIA, - type: NetworkType.TESTNET, - name: 'xai-sepolia', - title: 'Xai Sepolia', - logoURI: `https://assets.sequence.info/images/networks/medium/${ChainId.XAI_SEPOLIA}.webp`, - testnet: true, - blockExplorer: { - name: 'Xai Sepolia Explorer', - rootUrl: 'https://testnet-explorer-v2.xai-chain.net/' - }, - nativeToken: { - symbol: 'sXAI', - name: 'Sepolia XAI', - decimals: 18 - } - }, - [ChainId.XR1]: { - chainId: ChainId.XR1, - type: NetworkType.MAINNET, - name: 'xr1', - title: 'XR1', - logoURI: `https://assets.sequence.info/images/networks/medium/${ChainId.XR1}.webp`, - testnet: true, - blockExplorer: { - name: 'XR1 Explorer', - rootUrl: 'https://xr1.calderaexplorer.xyz/' - }, - nativeToken: { - symbol: 'XR1', - name: 'XR1', - decimals: 18 - } - }, - [ChainId.XR_SEPOLIA]: { - chainId: ChainId.XR_SEPOLIA, - type: NetworkType.TESTNET, - name: 'xr-sepolia', - title: 'XR Sepolia', - logoURI: `https://assets.sequence.info/images/networks/medium/${ChainId.XR_SEPOLIA}.webp`, - testnet: true, - blockExplorer: { - name: 'XR Sepolia Explorer', - rootUrl: 'https://xr-sepolia-testnet.explorer.caldera.xyz/' - }, - nativeToken: { - symbol: 'tXR', - name: 'Sepolia XR', - decimals: 18 - } - }, - [ChainId.B3]: { - chainId: ChainId.B3, - type: NetworkType.MAINNET, - name: 'b3', - title: 'B3', - logoURI: `https://assets.sequence.info/images/networks/medium/${ChainId.B3}.webp`, - testnet: false, - blockExplorer: { - name: 'B3 Explorer', - rootUrl: 'https://explorer.b3.fun/' - }, - nativeToken: { - symbol: 'ETH', - name: 'Ether', - decimals: 18 - } - }, - [ChainId.B3_SEPOLIA]: { - chainId: ChainId.B3_SEPOLIA, - type: NetworkType.TESTNET, - name: 'b3-sepolia', - title: 'B3 Sepolia', - logoURI: `https://assets.sequence.info/images/networks/medium/${ChainId.B3_SEPOLIA}.webp`, - testnet: true, - blockExplorer: { - name: 'B3 Sepolia Explorer', - rootUrl: 'https://sepolia.explorer.b3.fun/' - }, - nativeToken: { - symbol: 'ETH', - name: 'Ether', - decimals: 18 - } - }, - [ChainId.APECHAIN]: { - chainId: ChainId.APECHAIN, - type: NetworkType.MAINNET, - name: 'apechain', - title: 'APE Chain', - logoURI: `https://assets.sequence.info/images/networks/medium/${ChainId.APECHAIN}.webp`, - testnet: false, - blockExplorer: { - name: 'APE Chain Explorer', - rootUrl: 'https://apechain.calderaexplorer.xyz/' - }, - nativeToken: { - symbol: 'APE', - name: 'ApeCoin', - decimals: 18 - } - }, - [ChainId.APECHAIN_TESTNET]: { - chainId: ChainId.APECHAIN_TESTNET, - type: NetworkType.TESTNET, - name: 'apechain-testnet', - title: 'APE Chain Testnet', - logoURI: `https://assets.sequence.info/images/networks/medium/${ChainId.APECHAIN_TESTNET}.webp`, - testnet: true, - blockExplorer: { - name: 'APE Chain Explorer', - rootUrl: 'https://curtis.explorer.caldera.xyz/' - }, - nativeToken: { - symbol: 'APE', - name: 'ApeCoin', - decimals: 18 - } - }, - [ChainId.BLAST]: { - chainId: ChainId.BLAST, - type: NetworkType.MAINNET, - name: 'blast', - title: 'Blast', - logoURI: `https://assets.sequence.info/images/networks/medium/${ChainId.BLAST}.webp`, - blockExplorer: { - name: 'Blast Explorer', - rootUrl: 'https://blastscan.io/' - }, - nativeToken: { - symbol: 'ETH', - name: 'Ether', - decimals: 18 - } - }, - [ChainId.BLAST_SEPOLIA]: { - chainId: ChainId.BLAST_SEPOLIA, - type: NetworkType.TESTNET, - name: 'blast-sepolia', - title: 'Blast Sepolia', - logoURI: `https://assets.sequence.info/images/networks/medium/${ChainId.BLAST_SEPOLIA}.webp`, - testnet: true, - blockExplorer: { - name: 'Blast Sepolia Explorer', - rootUrl: 'https://sepolia.blastexplorer.io/' - }, - nativeToken: { - symbol: 'ETH', - name: 'Ether', - decimals: 18 - } - }, - [ChainId.TELOS]: { - chainId: ChainId.TELOS, - type: NetworkType.MAINNET, - name: 'telos', - title: 'Telos', - logoURI: `https://assets.sequence.info/images/networks/medium/${ChainId.TELOS}.webp`, - blockExplorer: { - name: 'Telos Explorer', - rootUrl: 'https://explorer.telos.net/network/' - }, - nativeToken: { - symbol: 'TLOS', - name: 'TLOS', - decimals: 18 - } - }, - [ChainId.TELOS_TESTNET]: { - chainId: ChainId.TELOS_TESTNET, - type: NetworkType.TESTNET, - name: 'telos-testnet', - title: 'Telos Testnet', - logoURI: `https://assets.sequence.info/images/networks/medium/${ChainId.TELOS_TESTNET}.webp`, - blockExplorer: { - name: 'Telos Testnet Explorer', - rootUrl: 'https://explorer-test.telos.net/network' - }, - nativeToken: { - symbol: 'TLOS', - name: 'TLOS', - decimals: 18 - } - }, - [ChainId.BORNE_TESTNET]: { - chainId: ChainId.BORNE_TESTNET, - type: NetworkType.TESTNET, - name: 'borne-testnet', - title: 'Borne Testnet', - logoURI: `https://assets.sequence.info/images/networks/medium/${ChainId.BORNE_TESTNET}.webp`, - testnet: true, - blockExplorer: { - name: 'Borne Testnet Explorer', - rootUrl: 'https://subnets-test.avax.network/bornegfdn' - }, - nativeToken: { - symbol: 'BORNE', - name: 'BORNE', - decimals: 18 - } - }, - [ChainId.SKALE_NEBULA]: { - chainId: ChainId.SKALE_NEBULA, - type: NetworkType.MAINNET, - name: 'skale-nebula', - title: 'SKALE Nebula Gaming Hub', - logoURI: `https://assets.sequence.info/images/networks/medium/${ChainId.SKALE_NEBULA}.webp`, - testnet: false, - blockExplorer: { - name: 'SKALE Nebula Gaming Hub Explorer', - rootUrl: 'https://green-giddy-denebola.explorer.mainnet.skalenodes.com/' - }, - nativeToken: { - symbol: 'sFUEL', - name: 'SKALE Fuel', - decimals: 18 - } - }, - [ChainId.SKALE_NEBULA_TESTNET]: { - chainId: ChainId.SKALE_NEBULA_TESTNET, - type: NetworkType.TESTNET, - name: 'skale-nebula-testnet', - title: 'SKALE Nebula Gaming Hub Testnet', - logoURI: `https://assets.sequence.info/images/networks/medium/${ChainId.SKALE_NEBULA_TESTNET}.webp`, - testnet: true, - blockExplorer: { - name: 'SKALE Nebula Gaming Hub Testnet Explorer', - rootUrl: 'https://lanky-ill-funny-testnet.explorer.testnet.skalenodes.com/' - }, - nativeToken: { - symbol: 'sFUEL', - name: 'SKALE Fuel', - decimals: 18 - } - }, - [ChainId.SONEIUM]: { - chainId: ChainId.SONEIUM, - type: NetworkType.MAINNET, - name: 'soneium', - title: 'Soneium', - logoURI: `https://assets.sequence.info/images/networks/medium/${ChainId.SONEIUM}.webp`, - testnet: false, - blockExplorer: { - name: 'Soneium Explorer', - rootUrl: 'https://soneium.blockscout.com/' - }, - nativeToken: { - symbol: 'ETH', - name: 'Ether', - decimals: 18 - } - }, - [ChainId.SONEIUM_MINATO]: { - chainId: ChainId.SONEIUM_MINATO, - type: NetworkType.TESTNET, - name: 'soneium-minato', - title: 'Soneium Minato (Testnet)', - logoURI: `https://assets.sequence.info/images/networks/medium/${ChainId.SONEIUM_MINATO}.webp`, - testnet: true, - blockExplorer: { - name: 'Soneium Minato Explorer', - rootUrl: 'https://explorer-testnet.soneium.org/' - }, - nativeToken: { - symbol: 'ETH', - name: 'Ether', - decimals: 18 - } - }, - [ChainId.TOY_TESTNET]: { - chainId: ChainId.TOY_TESTNET, - type: NetworkType.TESTNET, - name: 'toy-testnet', - title: 'TOY (Testnet)', - logoURI: `https://assets.sequence.info/images/networks/medium/${ChainId.TOY_TESTNET}.webp`, - testnet: true, - blockExplorer: { - name: 'TOY Testnet Explorer', - rootUrl: 'https://toy-chain-testnet.explorer.caldera.xyz/' - }, - nativeToken: { - symbol: 'TOY', - name: 'TOY', - decimals: 18 - } - }, - [ChainId.IMMUTABLE_ZKEVM]: { - chainId: ChainId.IMMUTABLE_ZKEVM, - type: NetworkType.MAINNET, - name: 'immutable-zkevm', - title: 'Immutable zkEVM', - logoURI: `https://assets.sequence.info/images/networks/medium/${ChainId.IMMUTABLE_ZKEVM}.webp`, - testnet: false, - blockExplorer: { - name: 'Immutable zkEVM Explorer', - rootUrl: 'https://explorer.immutable.com/' - }, - nativeToken: { - symbol: 'IMX', - name: 'IMX', - decimals: 18 - } - }, - [ChainId.IMMUTABLE_ZKEVM_TESTNET]: { - chainId: ChainId.IMMUTABLE_ZKEVM_TESTNET, - type: NetworkType.TESTNET, - name: 'immutable-zkevm-testnet', - title: 'Immutable zkEVM Testnet', - logoURI: `https://assets.sequence.info/images/networks/medium/${ChainId.IMMUTABLE_ZKEVM_TESTNET}.webp`, - testnet: true, - blockExplorer: { - name: 'Immutable zkEVM Testnet Explorer', - rootUrl: 'https://explorer.testnet.immutable.com/' - }, - nativeToken: { - symbol: 'IMX', - name: 'IMX', - decimals: 18 - } - }, - [ChainId.ROOT_NETWORK]: { - chainId: ChainId.ROOT_NETWORK, - type: NetworkType.MAINNET, - name: 'rootnet', - title: 'The Root Network', - logoURI: `https://assets.sequence.info/images/networks/medium/${ChainId.ROOT_NETWORK}.webp`, - testnet: false, - blockExplorer: { - name: 'The Root Network Explorer', - rootUrl: 'https://rootscan.io/' - }, - nativeToken: { - symbol: 'XRP', - name: 'XRP', - decimals: 18 - } - }, - [ChainId.ROOT_NETWORK_PORCINI]: { - chainId: ChainId.ROOT_NETWORK_PORCINI, - type: NetworkType.TESTNET, - name: 'rootnet-porcini', - title: 'The Root Network Porcini Testnet', - logoURI: `https://assets.sequence.info/images/networks/medium/${ChainId.ROOT_NETWORK_PORCINI}.webp`, - testnet: true, - blockExplorer: { - name: 'The Root Network Porcini Testnet Explorer', - rootUrl: 'https://porcini.rootscan.io/' - }, - nativeToken: { - symbol: 'XRP', - name: 'XRP', - decimals: 18 - } - }, - [ChainId.HARDHAT]: { - chainId: ChainId.HARDHAT, - name: 'hardhat', - title: 'Hardhat (local testnet)', - nativeToken: { - symbol: 'ETH', - name: 'Ether', - decimals: 18 - } - }, - [ChainId.HARDHAT_2]: { - chainId: ChainId.HARDHAT_2, - name: 'hardhat2', - title: 'Hardhat (local testnet)', - nativeToken: { - symbol: 'ETH', - name: 'Ether', - decimals: 18 - } - }, - [ChainId.LAOS]: { - chainId: ChainId.LAOS, - type: NetworkType.MAINNET, - name: 'laos', - title: 'LAOS', - logoURI: `https://assets.sequence.info/images/networks/medium/${ChainId.LAOS}.webp`, - testnet: false, - blockExplorer: { - name: 'LAOS Explorer', - rootUrl: 'https://blockscout.laos.laosfoundation.io/' - }, - nativeToken: { - symbol: 'LAOS', - name: 'LAOS', - decimals: 18 - } - }, - [ChainId.LAOS_SIGMA_TESTNET]: { - chainId: ChainId.LAOS_SIGMA_TESTNET, - type: NetworkType.TESTNET, - name: 'laos-sigma-testnet', - title: 'LAOS Sigma Testnet', - logoURI: `https://assets.sequence.info/images/networks/medium/${ChainId.LAOS_SIGMA_TESTNET}.webp`, - testnet: true, - blockExplorer: { - name: 'LAOS Sigma Testnet Explorer', - rootUrl: 'https://sigma.explorer.laosnetwork.io/' - }, - nativeToken: { - symbol: 'SIGMA', - name: 'SIGMA', - decimals: 18 - } - }, - [ChainId.MOONBEAM]: { - chainId: ChainId.MOONBEAM, - type: NetworkType.MAINNET, - name: 'moonbeam', - title: 'Moonbeam', - logoURI: `https://assets.sequence.info/images/networks/medium/${ChainId.MOONBEAM}.webp`, - testnet: false, - blockExplorer: { - name: 'Moonscan', - rootUrl: 'https://moonscan.io/' - }, - nativeToken: { - symbol: 'GLMR', - name: 'GLMR', - decimals: 18 - } - }, - [ChainId.MOONBASE_ALPHA]: { - chainId: ChainId.MOONBASE_ALPHA, - type: NetworkType.TESTNET, - name: 'moonbase-alpha', - title: 'Moonbase Alpha', - logoURI: `https://assets.sequence.info/images/networks/medium/${ChainId.MOONBASE_ALPHA}.webp`, - testnet: true, - blockExplorer: { - name: 'Moonscan (Moonbase Alpha)', - rootUrl: 'https://moonbase.moonscan.io/' - }, - nativeToken: { - symbol: 'GLMR', - name: 'GLMR', - decimals: 18 - } - }, - [ChainId.ETHERLINK]: { - chainId: ChainId.ETHERLINK, - type: NetworkType.MAINNET, - name: 'etherlink', - title: 'Etherlink', - logoURI: `https://assets.sequence.info/images/networks/medium/${ChainId.ETHERLINK}.webp`, - testnet: false, - blockExplorer: { - name: 'Etherlink Explorer', - rootUrl: 'https://explorer.etherlink.com/' - }, - nativeToken: { - symbol: 'XTZ', - name: 'Tez', - decimals: 18 - } - }, - [ChainId.ETHERLINK_TESTNET]: { - chainId: ChainId.ETHERLINK_TESTNET, - type: NetworkType.TESTNET, - name: 'etherlink-testnet', - title: 'Etherlink Testnet', - logoURI: `https://assets.sequence.info/images/networks/medium/${ChainId.ETHERLINK_TESTNET}.webp`, - testnet: true, - blockExplorer: { - name: 'Etherlink Testnet Explorer', - rootUrl: 'https://testnet.explorer.etherlink.com/' - }, - nativeToken: { - symbol: 'XTZ', - name: 'Tez', - decimals: 18 - } - }, - [ChainId.MONAD_TESTNET]: { - chainId: ChainId.MONAD_TESTNET, - type: NetworkType.TESTNET, - name: 'monad-testnet', - title: 'Monad Testnet', - logoURI: `https://assets.sequence.info/images/networks/medium/${ChainId.MONAD_TESTNET}.webp`, - testnet: true, - blockExplorer: { - name: 'Monad Testnet Explorer', - rootUrl: 'https://testnet.monadexplorer.com/' - }, - nativeToken: { - symbol: 'MON', - name: 'MON', - decimals: 18 - } - }, - - [ChainId.SOMNIA_TESTNET]: { - chainId: ChainId.SOMNIA_TESTNET, - type: NetworkType.TESTNET, - name: 'somnia-testnet', - title: 'Somnia Testnet', - logoURI: `https://assets.sequence.info/images/networks/medium/${ChainId.SOMNIA_TESTNET}.webp`, - testnet: true, - blockExplorer: { - name: 'Somnia Testnet Explorer', - rootUrl: 'https://somnia-testnet.socialscan.io/' - }, - nativeToken: { - symbol: 'STT', - name: 'STT', - decimals: 18 - } - }, - - [ChainId.FREQUENCY_TESTNET]: { - chainId: ChainId.FREQUENCY_TESTNET, - type: NetworkType.TESTNET, - name: 'frequency-testnet', - title: 'Frequency Testnet', - logoURI: `https://assets.sequence.info/images/networks/medium/${ChainId.FREQUENCY_TESTNET}.webp`, - testnet: true, - blockExplorer: { - name: 'Frequency Testnet Explorer', - rootUrl: 'https://explorer.frequency.zeeve.net/' - }, - nativeToken: { - symbol: 'BERA', - name: 'BERA', - decimals: 18 - } - } -} - -export function getChainIdFromNetwork(networkName: string): ChainId { - for (const [chainId, network] of Object.entries(networks)) { - if (network.name === networkName) { - return Number(chainId) as ChainId - } - } - throw new Error(`Unknown network name: ${networkName}`) -} diff --git a/old/packages/network/src/index.ts b/old/packages/network/src/index.ts deleted file mode 100644 index c042b0908..000000000 --- a/old/packages/network/src/index.ts +++ /dev/null @@ -1,5 +0,0 @@ -export * from './constants' -export * from './config' -export * from './json-rpc' -export * from './json-rpc-provider' -export * from './utils' diff --git a/old/packages/network/src/json-rpc-provider.ts b/old/packages/network/src/json-rpc-provider.ts deleted file mode 100644 index 9695f26da..000000000 --- a/old/packages/network/src/json-rpc-provider.ts +++ /dev/null @@ -1,150 +0,0 @@ -import { ethers } from 'ethers' -import { - JsonRpcRouter, - EagerProvider, - SingleflightMiddleware, - CachedProvider, - JsonRpcMiddleware, - JsonRpcMiddlewareHandler, - JsonRpcHandler, - EIP1193Provider, - JsonRpcSender, - JsonRpcRequest -} from './json-rpc' -import { ChainId, networks } from './constants' - -export interface JsonRpcProviderOptions { - // .. - chainId?: number - - // .. - middlewares?: Array - - // .. - blockCache?: boolean | string[] -} - -// JsonRpcProvider with a middleware stack. By default it will use a simple caching middleware. -export class JsonRpcProvider extends ethers.JsonRpcProvider implements EIP1193Provider, JsonRpcSender { - #chainId?: number - #nextId: number = 1 - #sender: EIP1193Provider - - constructor( - public url: string | ethers.FetchRequest | undefined, - options?: JsonRpcProviderOptions, - jsonRpcApiProviderOptions?: ethers.JsonRpcApiProviderOptions - ) { - super(url, options?.chainId, jsonRpcApiProviderOptions) - - const chainId = options?.chainId - const middlewares = options?.middlewares - const blockCache = options?.blockCache - - this.#chainId = chainId - - // NOTE: it will either use the middleware stack passed to the constructor - // or it will use the default caching middleware provider. It does not concat them, - // so if you set middlewares, make sure you set the caching middleware yourself if you'd - // like to keep using it. - const router = new JsonRpcRouter( - middlewares ?? [ - // loggingProviderMiddleware, - new EagerProvider({ chainId }), - new SingleflightMiddleware(), - new CachedProvider({ defaultChainId: chainId, blockCache: blockCache }) - ], - new JsonRpcHandler(this.fetch, chainId) - ) - - this.#sender = router - } - - async request(request: { method: string; params?: any[]; chainId?: number }): Promise { - return this.#sender.request(request) - } - - async send(method: string, params?: any[] | Record, chainId?: number): Promise { - return this.request({ method, params: params as any, chainId }) - } - - async getNetwork(): Promise { - const chainId = this.#chainId - if (chainId) { - const network = networks[chainId as ChainId] - const name = network?.name || '' - const ensAddress = network?.ensAddress - return ethers.Network.from({ - name, - chainId, - ensAddress - }) - } else { - const chainIdHex = await this.send('eth_chainId', []) - this.#chainId = Number(chainIdHex) - return this.getNetwork() - } - } - - private fetch = async (request: { method: string; params?: any[]; chainId?: number }): Promise => { - if (this.url === undefined) { - throw new Error('missing provider URL') - } - - const { method, params } = request - - const jsonRpcRequest: JsonRpcRequest = { - method, - params, - id: this.#nextId++, - jsonrpc: '2.0' - } - - // const result = ethers.fetchJson(this.connection, JSON.stringify(request), getResult).then( - // result => { - // return result - // }, - // error => { - // throw error - // } - // ) - - const fetchRequest = typeof this.url === 'string' ? new ethers.FetchRequest(this.url) : this.url - fetchRequest.body = JSON.stringify(jsonRpcRequest) - - // TODOXXX: what about headers, etc..? - // we probably need these in the options of the construtor, etc.. - - try { - const res = await fetchRequest.send() - - if (res.body) { - try { - const result = JSON.parse(ethers.toUtf8String(res.body)) - - // TODO: Process result - - return getResult(result) - } catch (err) { - throw new Error('invalid JSON response') - } - } - - return null - } catch (err) { - // TODO - error handling - throw err - } - } -} - -function getResult(payload: { error?: { code?: number; data?: any; message?: string }; result?: any }): any { - if (payload.error) { - // @TODO: not any - const error: any = new Error(payload.error.message) - error.code = payload.error.code - error.data = payload.error.data - throw error - } - return payload.result -} diff --git a/old/packages/network/src/json-rpc/handler.ts b/old/packages/network/src/json-rpc/handler.ts deleted file mode 100644 index 8d3b961f1..000000000 --- a/old/packages/network/src/json-rpc/handler.ts +++ /dev/null @@ -1,40 +0,0 @@ -import { ethers } from 'ethers' -import { EIP1193Provider, EIP1193ProviderFunc, JsonRpcSender } from './types' - -import { isJsonRpcSender, isJsonRpcProvider } from './utils' - -export class JsonRpcHandler implements EIP1193Provider, JsonRpcSender { - private provider: EIP1193ProviderFunc - private defaultChainId?: number - - constructor(provider: EIP1193ProviderFunc | JsonRpcSender | ethers.JsonRpcProvider, defaultChainId?: number) { - if (isJsonRpcSender(provider)) { - this.provider = (request: { method: string; params?: any[]; chainId?: number }): Promise => { - return provider.send(request.method, request.params, request.chainId) - } - } else if (isJsonRpcProvider(provider)) { - this.provider = (request: { method: string; params?: any[]; chainId?: number }): Promise => { - return provider.send(request.method, request.params || []) - } - } else { - this.provider = provider - } - this.defaultChainId = defaultChainId - } - - request = (request: { method: string; params?: any[]; chainId?: number }): Promise => { - if (!request.chainId) { - request.chainId = this.defaultChainId - } - return this.provider(request) - } - - send(method: string, params?: any[], chainId?: number): Promise { - const request = { - method, - params, - chainId - } - return this.request(request) - } -} diff --git a/old/packages/network/src/json-rpc/index.ts b/old/packages/network/src/json-rpc/index.ts deleted file mode 100644 index 3f25c5690..000000000 --- a/old/packages/network/src/json-rpc/index.ts +++ /dev/null @@ -1,5 +0,0 @@ -export * from './types' -export * from './router' -export * from './handler' -export * from './middleware' -export * from './utils' diff --git a/old/packages/network/src/json-rpc/middleware/allow-provider.ts b/old/packages/network/src/json-rpc/middleware/allow-provider.ts deleted file mode 100644 index 6be8b2791..000000000 --- a/old/packages/network/src/json-rpc/middleware/allow-provider.ts +++ /dev/null @@ -1,36 +0,0 @@ -import { JsonRpcRequest, EIP1193ProviderFunc, JsonRpcMiddleware, JsonRpcMiddlewareHandler } from '../types' - -export class AllowProvider implements JsonRpcMiddlewareHandler { - requestHandler: JsonRpcMiddleware - - private isAllowedFunc: (request: JsonRpcRequest) => boolean - - constructor(isAllowedFunc?: (request: JsonRpcRequest) => boolean) { - if (isAllowedFunc) { - this.isAllowedFunc = isAllowedFunc - } else { - this.isAllowedFunc = (request: JsonRpcRequest): boolean => true - } - - this.requestHandler = allowProviderMiddleware(this.isAllowedFunc) - } - - setIsAllowedFunc(fn: (request: JsonRpcRequest) => boolean) { - this.isAllowedFunc = fn - this.requestHandler = allowProviderMiddleware(this.isAllowedFunc) - } -} - -export const allowProviderMiddleware = - (isAllowed: (request: JsonRpcRequest) => boolean): JsonRpcMiddleware => - (next: EIP1193ProviderFunc) => { - return (request: JsonRpcRequest): Promise => { - // ensure precondition is met or do not allow the request to continue - if (!isAllowed(request)) { - throw new Error('allowProvider middleware precondition is unmet.') - } - - // request is allowed. keep going.. - return next(request) - } - } diff --git a/old/packages/network/src/json-rpc/middleware/cached-provider.ts b/old/packages/network/src/json-rpc/middleware/cached-provider.ts deleted file mode 100644 index 2aa01f211..000000000 --- a/old/packages/network/src/json-rpc/middleware/cached-provider.ts +++ /dev/null @@ -1,165 +0,0 @@ -import { EIP1193ProviderFunc, JsonRpcRequest, JsonRpcMiddlewareHandler } from '../types' - -export interface CachedProviderOptions { - // defaultChainId passes a chainId to provider handler if one isn't passed. - // This is used in multi-chain mode - defaultChainId?: number - - // blockCache toggle, with option to pass specific set of methods to use with - // the block cache. - blockCache?: boolean | string[] -} - -export class CachedProvider implements JsonRpcMiddlewareHandler { - // cachableJsonRpcMethods which can be permanently cached for lifetime - // of the provider. - private cachableJsonRpcMethods = [ - 'net_version', - 'eth_chainId', - 'eth_accounts', - 'sequence_getWalletContext', - 'sequence_getNetworks' - ] - - // cachableJsonRpcMethodsByBlock which can be temporarily cached for a short - // period of time, essentially by block time. As we support chains fast blocks, - // we keep the values here cachable only for 1.5 seconds. This is still useful to - // memoize the calls within app-code that calls out to fetch these values within - // a short period of time. - private cachableJsonRpcMethodsByBlock: string[] = ['eth_call', 'eth_getCode'] - - // cache for life-time of provider (unless explicitly cleared) - private cache: { [key: string]: any } - - // cache by block, simulated by using a 1 second life-time - private cacheByBlock: { [key: string]: any } - private cacheByBlockResetLock: boolean = false - - // onUpdateCallback callback to be notified when cache values are set. - private onUpdateCallback?: (key?: string, value?: any) => void - - // defaultChainId is used for default chain select with used with multi-chain provider - readonly defaultChainId?: number - - constructor(options?: CachedProviderOptions) { - this.cache = {} - this.cacheByBlock = {} - this.defaultChainId = options?.defaultChainId - if (!options?.blockCache) { - this.cachableJsonRpcMethodsByBlock = [] - } else if (options?.blockCache !== true) { - this.cachableJsonRpcMethodsByBlock = options?.blockCache - } - } - - requestHandler = (next: EIP1193ProviderFunc) => { - return async (request: JsonRpcRequest): Promise => { - // Respond early with cached result - if (this.cachableJsonRpcMethods.includes(request.method) || this.cachableJsonRpcMethodsByBlock.includes(request.method)) { - const key = this.cacheKey(request.method, request.params! as any[], request.chainId || this.defaultChainId) - const result = this.getCacheValue(key) - if (result && result !== '') { - return { - id: request.id!, - result - } - } - } - - // Continue down the handler chain - const result = await next(request) - - // Store result in cache and continue - if (this.cachableJsonRpcMethods.includes(request.method) || this.cachableJsonRpcMethodsByBlock.includes(request.method)) { - if (result && this.shouldCacheResponse(request, result)) { - // cache the value - const key = this.cacheKey(request.method, request.params! as any[], request.chainId || this.defaultChainId) - - if (this.cachableJsonRpcMethods.includes(request.method)) { - this.setCacheValue(key, result) - } else { - this.setCacheByBlockValue(key, result) - } - } - } - - return result - } - } - - cacheKey = (method: string, params: any[], chainId?: number) => { - let key = '' - if (chainId) { - key = `${chainId}:${method}:` - } else { - key = `:${method}:` - } - if (!params || params.length === 0) { - return key + '[]' - } - return key + JSON.stringify(params) - } - - getCache = () => this.cache - - setCache = (cache: { [key: string]: any }) => { - this.cache = cache - if (this.onUpdateCallback) { - this.onUpdateCallback() - } - } - - getCacheValue = (key: string): any => { - if (this.cache[key]) { - return this.cache[key] - } - if (this.cacheByBlock[key]) { - return this.cacheByBlock[key] - } - return undefined - } - - setCacheValue = (key: string, value: any) => { - this.cache[key] = value - if (this.onUpdateCallback) { - this.onUpdateCallback(key, value) - } - } - - setCacheByBlockValue = (key: string, value: any) => { - this.cacheByBlock[key] = value - - // clear the cacheByBlock once every X period of time - if (!this.cacheByBlockResetLock) { - this.cacheByBlockResetLock = true - setTimeout(() => { - this.cacheByBlockResetLock = false - this.cacheByBlock = {} - }, 1500) // 1.5 second cache lifetime - } - } - - shouldCacheResponse = (request: JsonRpcRequest, result?: any): boolean => { - // skip if we do not have response result - if (!result) { - return false - } - - // skip caching eth_getCode where resposne value is '0x' or empty - if (request.method === 'eth_getCode' && result.length <= 2) { - return false - } - - // all good -- signal to cache the result - return true - } - - onUpdate(callback: (key?: string, value?: any) => void) { - this.onUpdateCallback = callback - } - - clearCache = () => { - this.cache = {} - this.cacheByBlock = {} - } -} diff --git a/old/packages/network/src/json-rpc/middleware/eager-provider.ts b/old/packages/network/src/json-rpc/middleware/eager-provider.ts deleted file mode 100644 index 22793e9ec..000000000 --- a/old/packages/network/src/json-rpc/middleware/eager-provider.ts +++ /dev/null @@ -1,56 +0,0 @@ -import { commons } from '@0xsequence/core' -import { ethers } from 'ethers' -import { EIP1193ProviderFunc, JsonRpcMiddlewareHandler, JsonRpcRequest } from '../types' - -// EagerProvider will eagerly respond to a provider request from pre-initialized data values. -// -// This is useful for saving a few remote calls for responses we're already expecting when -// communicating to a specific network provider. - -export type EagerProviderOptions = { - accountAddress?: string - chainId?: number - walletContext?: commons.context.VersionedContext -} - -export class EagerProvider implements JsonRpcMiddlewareHandler { - readonly options: EagerProviderOptions - - constructor(options: EagerProviderOptions) { - this.options = options - } - - requestHandler = (next: EIP1193ProviderFunc) => { - return async (request: JsonRpcRequest): Promise => { - switch (request.method) { - case 'net_version': - if (this.options.chainId) { - return `${this.options.chainId}` - } - break - - case 'eth_chainId': - if (this.options.chainId) { - return ethers.toQuantity(this.options.chainId) - } - break - - case 'eth_accounts': - if (this.options.accountAddress) { - return [ethers.getAddress(this.options.accountAddress)] - } - break - - case 'sequence_getWalletContext': - if (this.options.walletContext) { - return this.options.walletContext - } - break - - default: - } - - return next(request) - } - } -} diff --git a/old/packages/network/src/json-rpc/middleware/exception-provider.ts b/old/packages/network/src/json-rpc/middleware/exception-provider.ts deleted file mode 100644 index e33674392..000000000 --- a/old/packages/network/src/json-rpc/middleware/exception-provider.ts +++ /dev/null @@ -1,15 +0,0 @@ -import { EIP1193ProviderFunc, JsonRpcMiddleware } from '../types' - -export const exceptionProviderMiddleware: JsonRpcMiddleware = (next: EIP1193ProviderFunc) => { - return async (request: { method: string; params?: any[]; chainId?: number }): Promise => { - try { - return await next(request) - } catch (error) { - if (typeof error === 'string') { - throw new Error(error) - } else { - throw new Error(error.message) - } - } - } -} diff --git a/old/packages/network/src/json-rpc/middleware/index.ts b/old/packages/network/src/json-rpc/middleware/index.ts deleted file mode 100644 index 2f292adab..000000000 --- a/old/packages/network/src/json-rpc/middleware/index.ts +++ /dev/null @@ -1,9 +0,0 @@ -export { AllowProvider, allowProviderMiddleware } from './allow-provider' -export { CachedProvider } from './cached-provider' -export { EagerProvider } from './eager-provider' -export { exceptionProviderMiddleware } from './exception-provider' -export { loggingProviderMiddleware } from './logging-provider' -export { networkProviderMiddleware } from './network-provider' -export { PublicProvider } from './public-provider' -export { SigningProvider } from './signing-provider' -export { SingleflightMiddleware } from './singleflight' diff --git a/old/packages/network/src/json-rpc/middleware/logging-provider.ts b/old/packages/network/src/json-rpc/middleware/logging-provider.ts deleted file mode 100644 index d933681bf..000000000 --- a/old/packages/network/src/json-rpc/middleware/logging-provider.ts +++ /dev/null @@ -1,30 +0,0 @@ -import { EIP1193ProviderFunc, JsonRpcMiddleware, JsonRpcRequest } from '../types' -import { logger } from '@0xsequence/utils' - -// TODO: rename to loggerMiddleware -export const loggingProviderMiddleware: JsonRpcMiddleware = (next: EIP1193ProviderFunc) => { - return async (request: JsonRpcRequest): Promise => { - const chainIdLabel = request.chainId ? ` chainId:${request.chainId}` : '' - logger.info(`[provider request]${chainIdLabel} id:${request.id} method:${request.method} params:`, request.params) - - try { - const result = await next(request) - - logger.info( - `[provider response]${chainIdLabel} id:${request.id} method:${request.method} params:`, - request.params, - `result:`, - result - ) - - return result - } catch (error) { - logger.warn( - `[provider response]${chainIdLabel} id:${request.id} method:${request.method} params:`, - request.params, - `error:`, - error - ) - } - } -} diff --git a/old/packages/network/src/json-rpc/middleware/network-provider.ts b/old/packages/network/src/json-rpc/middleware/network-provider.ts deleted file mode 100644 index b4404c11c..000000000 --- a/old/packages/network/src/json-rpc/middleware/network-provider.ts +++ /dev/null @@ -1,23 +0,0 @@ -import { ethers } from 'ethers' -import { EIP1193ProviderFunc, JsonRpcRequest, JsonRpcMiddleware } from '../types' - -export const networkProviderMiddleware = - (getChainId: (request: JsonRpcRequest) => number): JsonRpcMiddleware => - (next: EIP1193ProviderFunc) => { - return async (request: JsonRpcRequest): Promise => { - const networkChainId = getChainId(request) - - switch (request.method) { - case 'net_version': { - return `${networkChainId}` - } - - case 'eth_chainId': { - return ethers.toQuantity(networkChainId) - } - } - - // request is allowed. keep going.. - return next(request) - } - } diff --git a/old/packages/network/src/json-rpc/middleware/public-provider.ts b/old/packages/network/src/json-rpc/middleware/public-provider.ts deleted file mode 100644 index e8a9bd77e..000000000 --- a/old/packages/network/src/json-rpc/middleware/public-provider.ts +++ /dev/null @@ -1,46 +0,0 @@ -import { ethers } from 'ethers' -import { EIP1193ProviderFunc, JsonRpcMiddlewareHandler, JsonRpcRequest } from '../types' -import { SignerJsonRpcMethods } from './signing-provider' -import { logger } from '@0xsequence/utils' - -export class PublicProvider implements JsonRpcMiddlewareHandler { - private privateJsonRpcMethods = ['net_version', 'eth_chainId', 'eth_accounts', ...SignerJsonRpcMethods] - - private provider?: ethers.JsonRpcProvider - private rpcUrl?: string - - constructor(rpcUrl?: string) { - if (rpcUrl) { - this.setRpcUrl(rpcUrl) - } - } - - requestHandler = (next: EIP1193ProviderFunc) => { - return (request: JsonRpcRequest): Promise => { - // When provider is configured, send non-private methods to our local public provider - if (this.provider && !this.privateJsonRpcMethods.includes(request.method)) { - return this.provider.send(request.method, request.params || []) - } - - // Continue to next handler - logger.debug('[public-provider] sending request to signer window', request.method) - return next(request) - } - } - - getRpcUrl() { - return this.rpcUrl - } - - setRpcUrl(rpcUrl: string) { - if (!rpcUrl || rpcUrl === '') { - this.rpcUrl = undefined - this.provider = undefined - } else { - this.rpcUrl = rpcUrl - // TODO: maybe use @0xsequence/network JsonRpcProvider here instead, - // which supports better caching. - this.provider = new ethers.JsonRpcProvider(rpcUrl) - } - } -} diff --git a/old/packages/network/src/json-rpc/middleware/signing-provider.ts b/old/packages/network/src/json-rpc/middleware/signing-provider.ts deleted file mode 100644 index 47947725b..000000000 --- a/old/packages/network/src/json-rpc/middleware/signing-provider.ts +++ /dev/null @@ -1,50 +0,0 @@ -import { EIP1193Provider, EIP1193ProviderFunc, JsonRpcMiddlewareHandler, JsonRpcRequest } from '../types' - -export const SignerJsonRpcMethods = [ - 'personal_sign', - 'eth_sign', - 'eth_signTypedData', - 'eth_signTypedData_v4', - 'eth_sendTransaction', - 'eth_sendRawTransaction', - 'sequence_sign', // sequence-aware personal_sign - 'sequence_signTypedData_v4', // sequence-aware eth_signTypedData_v4 - - 'sequence_getWalletContext', - 'sequence_getWalletConfig', - 'sequence_getWalletState', - 'sequence_getNetworks', - 'sequence_updateConfig', - 'sequence_publishConfig', - 'sequence_gasRefundOptions', - 'sequence_getNonce', - 'sequence_relay', - - 'eth_decrypt', - 'eth_getEncryptionPublicKey', - 'wallet_addEthereumChain', - 'wallet_switchEthereumChain', - 'wallet_registerOnboarding', - 'wallet_watchAsset', - 'wallet_scanQRCode' -] - -export class SigningProvider implements JsonRpcMiddlewareHandler { - private provider: EIP1193Provider - - constructor(provider: EIP1193Provider) { - this.provider = provider - } - - requestHandler = (next: EIP1193ProviderFunc) => { - return (request: JsonRpcRequest): Promise => { - // Forward signing requests to the signing provider - if (SignerJsonRpcMethods.includes(request.method)) { - return this.provider.request(request) - } - - // Continue to next handler - return next(request) - } - } -} diff --git a/old/packages/network/src/json-rpc/middleware/singleflight.ts b/old/packages/network/src/json-rpc/middleware/singleflight.ts deleted file mode 100644 index 10fb44c93..000000000 --- a/old/packages/network/src/json-rpc/middleware/singleflight.ts +++ /dev/null @@ -1,90 +0,0 @@ -import { EIP1193ProviderFunc, JsonRpcResponseCallback, JsonRpcMiddlewareHandler, JsonRpcRequest } from '../types' - -export class SingleflightMiddleware implements JsonRpcMiddlewareHandler { - private singleflightJsonRpcMethods = [ - 'eth_chainId', - 'net_version', - 'eth_call', - 'eth_getCode', - 'eth_blockNumber', - 'eth_getBalance', - 'eth_getStorageAt', - 'eth_getTransactionCount', - 'eth_getBlockTransactionCountByHash', - 'eth_getBlockTransactionCountByNumber', - 'eth_getUncleCountByBlockHash', - 'eth_getUncleCountByBlockNumber', - 'eth_getBlockByHash', - 'eth_getBlockByNumber', - 'eth_getTransactionByHash', - 'eth_getTransactionByBlockHashAndIndex', - 'eth_getTransactionByBlockNumberAndIndex', - 'eth_getTransactionReceipt', - 'eth_getUncleByBlockHashAndIndex', - 'eth_getUncleByBlockNumberAndIndex', - 'eth_getLogs' - ] - - inflight: { [key: string]: { id: number; callback: JsonRpcResponseCallback }[] } - - constructor() { - this.inflight = {} - } - - requestHandler = (next: EIP1193ProviderFunc) => { - return async (request: JsonRpcRequest): Promise => { - // continue to next handler if method isn't part of methods list - if (!this.singleflightJsonRpcMethods.includes(request.method)) { - return next(request) - } - - const key = this.requestKey(request.method, request.params || [], request.chainId) - - if (!this.inflight[key]) { - // first request -- init the empty list - this.inflight[key] = [] - } else { - // already in-flight, add the callback to the list and return - return new Promise((resolve, reject) => { - this.inflight[key].push({ - id: request.id!, - callback: (error: any, response: any) => { - if (error) { - reject(error) - } else { - resolve(response) - } - } - }) - }) - } - - // Continue down the handler chain - try { - // Exec the handler, and on success resolve all other promises - const response = await next(request) - this.inflight[key].forEach(({ callback }) => callback(undefined, response)) - return response - } catch (error) { - // If the request fails, reject all queued promises. - this.inflight[key].forEach(({ callback }) => callback(error, undefined)) - throw error - } finally { - delete this.inflight[key] - } - } - } - - requestKey = (method: string, params: any[], chainId?: number) => { - let key = '' - if (chainId) { - key = `${chainId}:${method}:` - } else { - key = `:${method}:` - } - if (!params || params.length === 0) { - return key + '[]' - } - return key + JSON.stringify(params) - } -} diff --git a/old/packages/network/src/json-rpc/router.ts b/old/packages/network/src/json-rpc/router.ts deleted file mode 100644 index bcd26d08c..000000000 --- a/old/packages/network/src/json-rpc/router.ts +++ /dev/null @@ -1,43 +0,0 @@ -import { EIP1193Provider, EIP1193ProviderFunc, JsonRpcMiddleware, JsonRpcMiddlewareHandler } from './types' - -export class JsonRpcRouter implements EIP1193Provider { - private sender: EIP1193Provider - private handler: EIP1193Provider - - constructor(middlewares: Array, sender: EIP1193Provider) { - this.sender = sender - if (middlewares) { - this.setMiddleware(middlewares) - } - } - - setMiddleware(middlewares: Array) { - this.handler = createJsonRpcMiddlewareStack(middlewares, this.sender) - } - - request(request: { id?: number; method: string; params?: any[]; chainId?: number }): Promise { - return this.handler.request(request) - } -} - -export const createJsonRpcMiddlewareStack = ( - middlewares: Array, - handler: EIP1193Provider -): EIP1193Provider => { - if (middlewares.length === 0) return handler - - const toMiddleware = (v: any): JsonRpcMiddleware => { - if (v.requestHandler) { - return (v as JsonRpcMiddlewareHandler).requestHandler - } else { - return v - } - } - - let chain: EIP1193ProviderFunc - chain = toMiddleware(middlewares[middlewares.length - 1])(handler.request) - for (let i = middlewares.length - 2; i >= 0; i--) { - chain = toMiddleware(middlewares[i])(chain) - } - return { request: chain } -} diff --git a/old/packages/network/src/json-rpc/types.ts b/old/packages/network/src/json-rpc/types.ts deleted file mode 100644 index f135202a1..000000000 --- a/old/packages/network/src/json-rpc/types.ts +++ /dev/null @@ -1,45 +0,0 @@ -export type JsonRpcRequest = { - jsonrpc?: '2.0' - id?: number - method: string - params?: any[] - - // ... - chainId?: number -} - -export type JsonRpcResponse = { - jsonrpc?: string - id: number - result: any - error?: JsonRpcErrorPayload -} - -export type JsonRpcErrorPayload = { - code: number - message?: string - data?: any -} - -// EIP1193Provider with reponse of R (default any), but in most cases R will be of type JsonRpcResponse. -export interface EIP1193Provider { - request(request: { method: string; params?: any[]; chainId?: number }): Promise -} - -export type EIP1193ProviderFunc = (request: { method: string; params?: any[]; chainId?: number }) => Promise - -export interface JsonRpcSender { - send(method: string, params?: any[], chainId?: number): Promise -} - -export type JsonRpcSendFunc = (method: string, params?: any[], chainId?: number) => Promise - -export type JsonRpcResponseCallback = (error: JsonRpcErrorPayload | undefined, response?: JsonRpcResponse) => void - -export type JsonRpcSendAsyncFunc = (request: JsonRpcRequest, callback: JsonRpcResponseCallback, chainId?: number) => void - -export type JsonRpcMiddleware = (next: EIP1193ProviderFunc) => EIP1193ProviderFunc - -export interface JsonRpcMiddlewareHandler { - requestHandler: JsonRpcMiddleware -} diff --git a/old/packages/network/src/json-rpc/utils.ts b/old/packages/network/src/json-rpc/utils.ts deleted file mode 100644 index db7281c77..000000000 --- a/old/packages/network/src/json-rpc/utils.ts +++ /dev/null @@ -1,18 +0,0 @@ -import { ethers } from 'ethers' -import { JsonRpcSender } from './types' - -// TODOXXX: review.. -export function isJsonRpcProvider(cand: any): cand is ethers.JsonRpcProvider { - return ( - cand !== undefined && - cand.send !== undefined && - cand.constructor.defaultUrl !== undefined && - cand.detectNetwork !== undefined && - cand.getSigner !== undefined && - cand.perform !== undefined - ) -} - -export function isJsonRpcSender(cand: any): cand is JsonRpcSender { - return cand !== undefined && cand.send !== undefined -} diff --git a/old/packages/network/src/utils.ts b/old/packages/network/src/utils.ts deleted file mode 100644 index 7cf445737..000000000 --- a/old/packages/network/src/utils.ts +++ /dev/null @@ -1,210 +0,0 @@ -import { ethers } from 'ethers' -import { ChainIdLike } from '.' -import { NetworkConfig } from './config' - -export function isNetworkConfig(cand: any): cand is NetworkConfig { - return cand && cand.chainId !== undefined && cand.name !== undefined && cand.rpcUrl !== undefined && cand.relayer !== undefined -} - -export const getChainId = (chainId: ChainIdLike): number => { - if (typeof chainId === 'number') { - return chainId - } - if ((chainId).chainId) { - return (chainId).chainId - } - return Number(chainId as ethers.BigNumberish) -} - -export const maybeChainId = (chainId?: ChainIdLike): number | undefined => { - if (!chainId) return undefined - return getChainId(chainId) -} - -export const isValidNetworkConfig = ( - networkConfig: NetworkConfig | NetworkConfig[], - raise: boolean = false, - skipRelayerCheck: boolean = false -): boolean => { - if (!networkConfig) throw new Error(`invalid network config: empty config`) - - const configs: NetworkConfig[] = [] - if (Array.isArray(networkConfig)) { - configs.push(...networkConfig) - } else { - configs.push(networkConfig) - } - - if (configs.length === 0) { - if (raise) throw new Error(`invalid network config: empty config`) - return false - } - - // Ensure distinct chainId configs - const chainIds = configs.map(c => c.chainId).sort() - const dupes = chainIds.filter((c, i) => chainIds.indexOf(c) !== i) - if (dupes.length > 0) { - if (raise) throw new Error(`invalid network config: duplicate chainIds ${dupes}`) - return false - } - - // Downcase all network names - configs.forEach(c => (c.name = c.name.toLowerCase())) - - // Ensure distinct network names - const names = configs.map(c => c.name).sort() - const nameDupes = names.filter((c, i) => names.indexOf(c) !== i) - if (nameDupes.length > 0) { - if (raise) throw new Error(`invalid network config: duplicate network names ${nameDupes}`) - return false - } - - // Ensure rpcUrl or provider is specified - // Ensure relayerUrl or relayer is specified - // Ensure one default chain - // Ensure one auth chain - let defaultChain = false - for (let i = 0; i < configs.length; i++) { - const c = configs[i] - if ((!c.rpcUrl || c.rpcUrl === '') && !c.provider) { - if (raise) throw new Error(`invalid network config for chainId ${c.chainId}: rpcUrl or provider must be provided`) - return false - } - if (!skipRelayerCheck) { - if (!c.relayer) { - if (raise) throw new Error(`invalid network config for chainId ${c.chainId}: relayer must be provided`) - return false - } - } - if (c.isDefaultChain) { - if (defaultChain) { - if (raise) - throw new Error(`invalid network config for chainId ${c.chainId}: DefaultChain is already set by another config`) - return false - } - defaultChain = true - } - } - - if (!defaultChain) { - if (raise) throw new Error(`invalid network config: DefaultChain must be set`) - return false - } - - return true -} - -export const ensureValidNetworks = (networks: NetworkConfig[], skipRelayerCheck: boolean = false): NetworkConfig[] => { - isValidNetworkConfig(networks, true, skipRelayerCheck) - return networks -} - -export const ensureUniqueNetworks = (networks: NetworkConfig[], raise: boolean = true): boolean => { - const chainIds = networks.map(c => c.chainId).sort() - const dupes = chainIds.filter((c, i) => chainIds.indexOf(c) !== i) - if (dupes.length > 0) { - if (raise) throw new Error(`invalid network config: duplicate chainIds ${dupes}`) - return false - } - return true -} - -export const updateNetworkConfig = (src: Partial, dest: NetworkConfig) => { - if (!src || !dest) return - - if (!src.chainId && !src.name) { - throw new Error('failed to update network config: source config is missing chainId or name') - } - if (src.chainId !== dest.chainId && src.name !== dest.name) { - throw new Error('failed to update network config: one of chainId or name must match') - } - - if (src.rpcUrl) { - dest.rpcUrl = src.rpcUrl - dest.provider = undefined - } - if (src.provider) { - dest.provider = src.provider - } - if (src.relayer) { - dest.relayer = src.relayer - } -} - -export const validateAndSortNetworks = (networks: NetworkConfig[]) => { - return ensureValidNetworks(sortNetworks(networks)) -} - -export const findNetworkConfig = (networks: NetworkConfig[], chainId: ChainIdLike): NetworkConfig | undefined => { - if (typeof chainId === 'string') { - if (chainId.startsWith('0x')) { - const id = Number(chainId) - return networks.find(n => n.chainId === id) - } else { - return networks.find(n => n.name === chainId || `${n.chainId}` === chainId) - } - } else if (typeof chainId === 'number') { - return networks.find(n => n.chainId === chainId) - } else if ((chainId).chainId) { - return networks.find(n => n.chainId === (chainId).chainId) - } else if (typeof chainId === 'bigint') { - const id = Number(chainId) - return networks.find(n => n.chainId === id) - } else { - return undefined - } -} - -export const checkNetworkConfig = (network: NetworkConfig, chainId: string | number): boolean => { - if (!network) return false - if (network.name === chainId) return true - if (network.chainId === chainId) return true - return false -} - -export const networksIndex = (networks: NetworkConfig[]): { [key: string]: NetworkConfig } => { - const index: { [key: string]: NetworkConfig } = {} - for (let i = 0; i < networks.length; i++) { - index[networks[i].name] = networks[i] - } - return index -} - -// TODO: we should remove sortNetworks in the future but this is a breaking change for dapp integrations on older versions <-> wallet -// sortNetworks orders the network config list by: defaultChain, authChain, ..rest by chainId ascending numbers -export const sortNetworks = (networks: NetworkConfig[]): NetworkConfig[] => { - if (!networks) { - return [] - } - - const config = networks.sort((a, b) => { - if (a.chainId === b.chainId) return 0 - return a.chainId < b.chainId ? -1 : 1 - }) - - // DefaultChain goes first - const defaultConfigIdx = config.findIndex(c => c.isDefaultChain) - if (defaultConfigIdx > 0) config.splice(0, 0, config.splice(defaultConfigIdx, 1)[0]) - - return config -} - -export const stringTemplate = (sTemplate: string, mData: any) => { - if (typeof sTemplate === 'string') { - mData = mData ? mData : {} - return sTemplate.replace(/\$\{\s*([$#@\-\d\w]+)\s*\}/gim, function (fullMath, grp) { - let val = mData[grp] - if (typeof val === 'function') { - val = val() - } else if (val === null || val === undefined) { - val = '' - } else if (typeof val === 'object' || typeof val === 'symbol') { - val = val.toString() - } else { - val = val.valueOf() - } - return val - }) - } - return '' -} diff --git a/old/packages/provider/CHANGELOG.md b/old/packages/provider/CHANGELOG.md deleted file mode 100644 index ed43c745a..000000000 --- a/old/packages/provider/CHANGELOG.md +++ /dev/null @@ -1,5487 +0,0 @@ -# @0xsequence/provider - -## 2.3.8 - -### Patch Changes - -- indexer: update clients -- Updated dependencies - - @0xsequence/abi@2.3.8 - - @0xsequence/account@2.3.8 - - @0xsequence/auth@2.3.8 - - @0xsequence/core@2.3.8 - - @0xsequence/migration@2.3.8 - - @0xsequence/network@2.3.8 - - @0xsequence/relayer@2.3.8 - - @0xsequence/utils@2.3.8 - - @0xsequence/wallet@2.3.8 - -## 2.3.7 - -### Patch Changes - -- Metadata updates -- Updated dependencies - - @0xsequence/abi@2.3.7 - - @0xsequence/account@2.3.7 - - @0xsequence/auth@2.3.7 - - @0xsequence/core@2.3.7 - - @0xsequence/migration@2.3.7 - - @0xsequence/network@2.3.7 - - @0xsequence/relayer@2.3.7 - - @0xsequence/utils@2.3.7 - - @0xsequence/wallet@2.3.7 - -## 2.3.6 - -### Patch Changes - -- New chains -- Updated dependencies - - @0xsequence/abi@2.3.6 - - @0xsequence/account@2.3.6 - - @0xsequence/auth@2.3.6 - - @0xsequence/core@2.3.6 - - @0xsequence/migration@2.3.6 - - @0xsequence/network@2.3.6 - - @0xsequence/relayer@2.3.6 - - @0xsequence/utils@2.3.6 - - @0xsequence/wallet@2.3.6 - -## 2.3.5 - -### Patch Changes - -- Add Frequency Testnet -- Updated dependencies - - @0xsequence/abi@2.3.5 - - @0xsequence/account@2.3.5 - - @0xsequence/auth@2.3.5 - - @0xsequence/core@2.3.5 - - @0xsequence/migration@2.3.5 - - @0xsequence/network@2.3.5 - - @0xsequence/relayer@2.3.5 - - @0xsequence/utils@2.3.5 - - @0xsequence/wallet@2.3.5 - -## 2.3.4 - -### Patch Changes - -- metadata: exclude deprecated methods on rpc client -- Updated dependencies - - @0xsequence/abi@2.3.4 - - @0xsequence/account@2.3.4 - - @0xsequence/auth@2.3.4 - - @0xsequence/core@2.3.4 - - @0xsequence/migration@2.3.4 - - @0xsequence/network@2.3.4 - - @0xsequence/relayer@2.3.4 - - @0xsequence/utils@2.3.4 - - @0xsequence/wallet@2.3.4 - -## 2.3.3 - -### Patch Changes - -- metadata: client update -- Updated dependencies - - @0xsequence/abi@2.3.3 - - @0xsequence/account@2.3.3 - - @0xsequence/auth@2.3.3 - - @0xsequence/core@2.3.3 - - @0xsequence/migration@2.3.3 - - @0xsequence/network@2.3.3 - - @0xsequence/relayer@2.3.3 - - @0xsequence/utils@2.3.3 - - @0xsequence/wallet@2.3.3 - -## 2.3.2 - -### Patch Changes - -- metadata: update rpc client -- Updated dependencies - - @0xsequence/abi@2.3.2 - - @0xsequence/account@2.3.2 - - @0xsequence/auth@2.3.2 - - @0xsequence/core@2.3.2 - - @0xsequence/migration@2.3.2 - - @0xsequence/network@2.3.2 - - @0xsequence/relayer@2.3.2 - - @0xsequence/utils@2.3.2 - - @0xsequence/wallet@2.3.2 - -## 2.3.1 - -### Patch Changes - -- indexer: update rpc client -- Updated dependencies - - @0xsequence/abi@2.3.1 - - @0xsequence/account@2.3.1 - - @0xsequence/auth@2.3.1 - - @0xsequence/core@2.3.1 - - @0xsequence/migration@2.3.1 - - @0xsequence/network@2.3.1 - - @0xsequence/relayer@2.3.1 - - @0xsequence/utils@2.3.1 - - @0xsequence/wallet@2.3.1 - -## 2.3.0 - -### Minor Changes - -- update metadata rpc client - -### Patch Changes - -- Updated dependencies - - @0xsequence/abi@2.3.0 - - @0xsequence/account@2.3.0 - - @0xsequence/auth@2.3.0 - - @0xsequence/core@2.3.0 - - @0xsequence/migration@2.3.0 - - @0xsequence/network@2.3.0 - - @0xsequence/relayer@2.3.0 - - @0xsequence/utils@2.3.0 - - @0xsequence/wallet@2.3.0 - -## 2.2.15 - -### Patch Changes - -- API updates -- Updated dependencies - - @0xsequence/abi@2.2.15 - - @0xsequence/account@2.2.15 - - @0xsequence/auth@2.2.15 - - @0xsequence/core@2.2.15 - - @0xsequence/migration@2.2.15 - - @0xsequence/network@2.2.15 - - @0xsequence/relayer@2.2.15 - - @0xsequence/utils@2.2.15 - - @0xsequence/wallet@2.2.15 - -## 2.2.14 - -### Patch Changes - -- Somnia Testnet and Monad Testnet -- Updated dependencies - - @0xsequence/abi@2.2.14 - - @0xsequence/account@2.2.14 - - @0xsequence/auth@2.2.14 - - @0xsequence/core@2.2.14 - - @0xsequence/migration@2.2.14 - - @0xsequence/network@2.2.14 - - @0xsequence/relayer@2.2.14 - - @0xsequence/utils@2.2.14 - - @0xsequence/wallet@2.2.14 - -## 2.2.13 - -### Patch Changes - -- Add XR1 to all networks -- Updated dependencies - - @0xsequence/abi@2.2.13 - - @0xsequence/account@2.2.13 - - @0xsequence/auth@2.2.13 - - @0xsequence/core@2.2.13 - - @0xsequence/migration@2.2.13 - - @0xsequence/network@2.2.13 - - @0xsequence/relayer@2.2.13 - - @0xsequence/utils@2.2.13 - - @0xsequence/wallet@2.2.13 - -## 2.2.12 - -### Patch Changes - -- Add XR1 -- Updated dependencies - - @0xsequence/abi@2.2.12 - - @0xsequence/account@2.2.12 - - @0xsequence/auth@2.2.12 - - @0xsequence/core@2.2.12 - - @0xsequence/migration@2.2.12 - - @0xsequence/network@2.2.12 - - @0xsequence/relayer@2.2.12 - - @0xsequence/utils@2.2.12 - - @0xsequence/wallet@2.2.12 - -## 2.2.11 - -### Patch Changes - -- Relayer updates -- Updated dependencies - - @0xsequence/abi@2.2.11 - - @0xsequence/account@2.2.11 - - @0xsequence/auth@2.2.11 - - @0xsequence/core@2.2.11 - - @0xsequence/migration@2.2.11 - - @0xsequence/network@2.2.11 - - @0xsequence/relayer@2.2.11 - - @0xsequence/utils@2.2.11 - - @0xsequence/wallet@2.2.11 - -## 2.2.10 - -### Patch Changes - -- Etherlink support -- Updated dependencies - - @0xsequence/abi@2.2.10 - - @0xsequence/account@2.2.10 - - @0xsequence/auth@2.2.10 - - @0xsequence/core@2.2.10 - - @0xsequence/migration@2.2.10 - - @0xsequence/network@2.2.10 - - @0xsequence/relayer@2.2.10 - - @0xsequence/utils@2.2.10 - - @0xsequence/wallet@2.2.10 - -## 2.2.9 - -### Patch Changes - -- Indexer gateway native token balances -- Updated dependencies - - @0xsequence/abi@2.2.9 - - @0xsequence/account@2.2.9 - - @0xsequence/auth@2.2.9 - - @0xsequence/core@2.2.9 - - @0xsequence/migration@2.2.9 - - @0xsequence/network@2.2.9 - - @0xsequence/relayer@2.2.9 - - @0xsequence/utils@2.2.9 - - @0xsequence/wallet@2.2.9 - -## 2.2.8 - -### Patch Changes - -- Add Moonbeam and Moonbase Alpha -- Updated dependencies - - @0xsequence/abi@2.2.8 - - @0xsequence/account@2.2.8 - - @0xsequence/auth@2.2.8 - - @0xsequence/core@2.2.8 - - @0xsequence/migration@2.2.8 - - @0xsequence/network@2.2.8 - - @0xsequence/relayer@2.2.8 - - @0xsequence/utils@2.2.8 - - @0xsequence/wallet@2.2.8 - -## 2.2.7 - -### Patch Changes - -- Update Builder package -- Updated dependencies - - @0xsequence/abi@2.2.7 - - @0xsequence/account@2.2.7 - - @0xsequence/auth@2.2.7 - - @0xsequence/core@2.2.7 - - @0xsequence/migration@2.2.7 - - @0xsequence/network@2.2.7 - - @0xsequence/relayer@2.2.7 - - @0xsequence/utils@2.2.7 - - @0xsequence/wallet@2.2.7 - -## 2.2.6 - -### Patch Changes - -- Update relayer package -- Updated dependencies - - @0xsequence/abi@2.2.6 - - @0xsequence/account@2.2.6 - - @0xsequence/auth@2.2.6 - - @0xsequence/core@2.2.6 - - @0xsequence/migration@2.2.6 - - @0xsequence/network@2.2.6 - - @0xsequence/relayer@2.2.6 - - @0xsequence/utils@2.2.6 - - @0xsequence/wallet@2.2.6 - -## 2.2.5 - -### Patch Changes - -- auth: fix sequence indexer gateway url -- account: immutable wallet proxy hook -- Updated dependencies -- Updated dependencies - - @0xsequence/abi@2.2.5 - - @0xsequence/account@2.2.5 - - @0xsequence/auth@2.2.5 - - @0xsequence/core@2.2.5 - - @0xsequence/migration@2.2.5 - - @0xsequence/network@2.2.5 - - @0xsequence/relayer@2.2.5 - - @0xsequence/utils@2.2.5 - - @0xsequence/wallet@2.2.5 - -## 2.2.4 - -### Patch Changes - -- network: update soneium mainnet block explorer url -- waas: signTypedData intent support -- Updated dependencies -- Updated dependencies - - @0xsequence/abi@2.2.4 - - @0xsequence/account@2.2.4 - - @0xsequence/auth@2.2.4 - - @0xsequence/core@2.2.4 - - @0xsequence/migration@2.2.4 - - @0xsequence/network@2.2.4 - - @0xsequence/relayer@2.2.4 - - @0xsequence/utils@2.2.4 - - @0xsequence/wallet@2.2.4 - -## 2.2.3 - -### Patch Changes - -- provider: updating initWallet to use connected network configs if they exist -- Updated dependencies - - @0xsequence/abi@2.2.3 - - @0xsequence/account@2.2.3 - - @0xsequence/auth@2.2.3 - - @0xsequence/core@2.2.3 - - @0xsequence/migration@2.2.3 - - @0xsequence/network@2.2.3 - - @0xsequence/relayer@2.2.3 - - @0xsequence/utils@2.2.3 - - @0xsequence/wallet@2.2.3 - -## 2.2.2 - -### Patch Changes - -- pass projectAccessKey to relayer at all times -- Updated dependencies - - @0xsequence/abi@2.2.2 - - @0xsequence/account@2.2.2 - - @0xsequence/auth@2.2.2 - - @0xsequence/core@2.2.2 - - @0xsequence/migration@2.2.2 - - @0xsequence/network@2.2.2 - - @0xsequence/relayer@2.2.2 - - @0xsequence/utils@2.2.2 - - @0xsequence/wallet@2.2.2 - -## 2.2.1 - -### Patch Changes - -- waas-ethers: sign typed data -- Updated dependencies - - @0xsequence/abi@2.2.1 - - @0xsequence/account@2.2.1 - - @0xsequence/auth@2.2.1 - - @0xsequence/core@2.2.1 - - @0xsequence/migration@2.2.1 - - @0xsequence/network@2.2.1 - - @0xsequence/relayer@2.2.1 - - @0xsequence/utils@2.2.1 - - @0xsequence/wallet@2.2.1 - -## 2.2.0 - -### Minor Changes - -- indexer: gateway client -- @0xsequence/builder -- upgrade puppeteer to v23.10.3 - -### Patch Changes - -- Updated dependencies -- Updated dependencies -- Updated dependencies - - @0xsequence/abi@2.2.0 - - @0xsequence/account@2.2.0 - - @0xsequence/auth@2.2.0 - - @0xsequence/core@2.2.0 - - @0xsequence/migration@2.2.0 - - @0xsequence/network@2.2.0 - - @0xsequence/relayer@2.2.0 - - @0xsequence/utils@2.2.0 - - @0xsequence/wallet@2.2.0 - -## 2.1.8 - -### Patch Changes - -- Add Soneium Mainnet -- Updated dependencies - - @0xsequence/abi@2.1.8 - - @0xsequence/account@2.1.8 - - @0xsequence/auth@2.1.8 - - @0xsequence/core@2.1.8 - - @0xsequence/migration@2.1.8 - - @0xsequence/network@2.1.8 - - @0xsequence/relayer@2.1.8 - - @0xsequence/utils@2.1.8 - - @0xsequence/wallet@2.1.8 - -## 2.1.7 - -### Patch Changes - -- guard: pass project access key to guard requests -- Updated dependencies - - @0xsequence/abi@2.1.7 - - @0xsequence/account@2.1.7 - - @0xsequence/auth@2.1.7 - - @0xsequence/core@2.1.7 - - @0xsequence/migration@2.1.7 - - @0xsequence/network@2.1.7 - - @0xsequence/relayer@2.1.7 - - @0xsequence/utils@2.1.7 - - @0xsequence/wallet@2.1.7 - -## 2.1.6 - -### Patch Changes - -- Add LAOS and Telos Testnet chains -- Updated dependencies - - @0xsequence/abi@2.1.6 - - @0xsequence/account@2.1.6 - - @0xsequence/auth@2.1.6 - - @0xsequence/core@2.1.6 - - @0xsequence/migration@2.1.6 - - @0xsequence/network@2.1.6 - - @0xsequence/relayer@2.1.6 - - @0xsequence/utils@2.1.6 - - @0xsequence/wallet@2.1.6 - -## 2.1.5 - -### Patch Changes - -- account: save presigned configuration with reference chain id 1 -- Updated dependencies - - @0xsequence/abi@2.1.5 - - @0xsequence/account@2.1.5 - - @0xsequence/auth@2.1.5 - - @0xsequence/core@2.1.5 - - @0xsequence/migration@2.1.5 - - @0xsequence/network@2.1.5 - - @0xsequence/relayer@2.1.5 - - @0xsequence/utils@2.1.5 - - @0xsequence/wallet@2.1.5 - -## 2.1.4 - -### Patch Changes - -- provider: pass projectAccessKey into MuxMessageProvider -- Updated dependencies - - @0xsequence/abi@2.1.4 - - @0xsequence/account@2.1.4 - - @0xsequence/auth@2.1.4 - - @0xsequence/core@2.1.4 - - @0xsequence/migration@2.1.4 - - @0xsequence/network@2.1.4 - - @0xsequence/relayer@2.1.4 - - @0xsequence/utils@2.1.4 - - @0xsequence/wallet@2.1.4 - -## 2.1.3 - -### Patch Changes - -- waas: time drift date fix due to strange browser quirk -- Updated dependencies - - @0xsequence/abi@2.1.3 - - @0xsequence/account@2.1.3 - - @0xsequence/auth@2.1.3 - - @0xsequence/core@2.1.3 - - @0xsequence/migration@2.1.3 - - @0xsequence/network@2.1.3 - - @0xsequence/relayer@2.1.3 - - @0xsequence/utils@2.1.3 - - @0xsequence/wallet@2.1.3 - -## 2.1.2 - -### Patch Changes - -- provider: export analytics correctly -- Updated dependencies - - @0xsequence/abi@2.1.2 - - @0xsequence/account@2.1.2 - - @0xsequence/auth@2.1.2 - - @0xsequence/core@2.1.2 - - @0xsequence/migration@2.1.2 - - @0xsequence/network@2.1.2 - - @0xsequence/relayer@2.1.2 - - @0xsequence/utils@2.1.2 - - @0xsequence/wallet@2.1.2 - -## 2.1.1 - -### Patch Changes - -- Add LAOS chain support -- Updated dependencies - - @0xsequence/abi@2.1.1 - - @0xsequence/account@2.1.1 - - @0xsequence/auth@2.1.1 - - @0xsequence/core@2.1.1 - - @0xsequence/migration@2.1.1 - - @0xsequence/network@2.1.1 - - @0xsequence/relayer@2.1.1 - - @0xsequence/utils@2.1.1 - - @0xsequence/wallet@2.1.1 - -## 2.1.0 - -### Minor Changes - -- account: forward project access key when estimating fees and sending transactions - -### Patch Changes - -- sessions: save signatures with reference chain id -- Updated dependencies -- Updated dependencies - - @0xsequence/abi@2.1.0 - - @0xsequence/account@2.1.0 - - @0xsequence/auth@2.1.0 - - @0xsequence/core@2.1.0 - - @0xsequence/migration@2.1.0 - - @0xsequence/network@2.1.0 - - @0xsequence/relayer@2.1.0 - - @0xsequence/utils@2.1.0 - - @0xsequence/wallet@2.1.0 - -## 2.0.26 - -### Patch Changes - -- account: fix chain id comparison -- Updated dependencies - - @0xsequence/abi@2.0.26 - - @0xsequence/account@2.0.26 - - @0xsequence/auth@2.0.26 - - @0xsequence/core@2.0.26 - - @0xsequence/migration@2.0.26 - - @0xsequence/network@2.0.26 - - @0xsequence/relayer@2.0.26 - - @0xsequence/utils@2.0.26 - - @0xsequence/wallet@2.0.26 - -## 2.0.25 - -### Patch Changes - -- skale-nebula: deploy gas limit = 10m -- Updated dependencies - - @0xsequence/abi@2.0.25 - - @0xsequence/account@2.0.25 - - @0xsequence/auth@2.0.25 - - @0xsequence/core@2.0.25 - - @0xsequence/migration@2.0.25 - - @0xsequence/network@2.0.25 - - @0xsequence/relayer@2.0.25 - - @0xsequence/utils@2.0.25 - - @0xsequence/wallet@2.0.25 - -## 2.0.24 - -### Patch Changes - -- sessions: arweave: configurable gateway url -- waas: use /status to get time drift before sending any intents -- Updated dependencies -- Updated dependencies - - @0xsequence/abi@2.0.24 - - @0xsequence/account@2.0.24 - - @0xsequence/auth@2.0.24 - - @0xsequence/core@2.0.24 - - @0xsequence/migration@2.0.24 - - @0xsequence/network@2.0.24 - - @0xsequence/relayer@2.0.24 - - @0xsequence/utils@2.0.24 - - @0xsequence/wallet@2.0.24 - -## 2.0.23 - -### Patch Changes - -- Add The Root Network support -- Updated dependencies - - @0xsequence/abi@2.0.23 - - @0xsequence/account@2.0.23 - - @0xsequence/auth@2.0.23 - - @0xsequence/core@2.0.23 - - @0xsequence/migration@2.0.23 - - @0xsequence/network@2.0.23 - - @0xsequence/relayer@2.0.23 - - @0xsequence/utils@2.0.23 - - @0xsequence/wallet@2.0.23 - -## 2.0.22 - -### Patch Changes - -- Add SKALE Nebula Mainnet support -- Updated dependencies - - @0xsequence/abi@2.0.22 - - @0xsequence/account@2.0.22 - - @0xsequence/auth@2.0.22 - - @0xsequence/core@2.0.22 - - @0xsequence/migration@2.0.22 - - @0xsequence/network@2.0.22 - - @0xsequence/relayer@2.0.22 - - @0xsequence/utils@2.0.22 - - @0xsequence/wallet@2.0.22 - -## 2.0.21 - -### Patch Changes - -- account: add publishWitnessFor -- Updated dependencies - - @0xsequence/abi@2.0.21 - - @0xsequence/account@2.0.21 - - @0xsequence/auth@2.0.21 - - @0xsequence/core@2.0.21 - - @0xsequence/migration@2.0.21 - - @0xsequence/network@2.0.21 - - @0xsequence/relayer@2.0.21 - - @0xsequence/utils@2.0.21 - - @0xsequence/wallet@2.0.21 - -## 2.0.20 - -### Patch Changes - -- upgrade deps, and improve waas session status handling -- Updated dependencies - - @0xsequence/abi@2.0.20 - - @0xsequence/account@2.0.20 - - @0xsequence/auth@2.0.20 - - @0xsequence/core@2.0.20 - - @0xsequence/migration@2.0.20 - - @0xsequence/network@2.0.20 - - @0xsequence/relayer@2.0.20 - - @0xsequence/utils@2.0.20 - - @0xsequence/wallet@2.0.20 - -## 2.0.19 - -### Patch Changes - -- Add Immutable zkEVM support -- Updated dependencies - - @0xsequence/abi@2.0.19 - - @0xsequence/account@2.0.19 - - @0xsequence/auth@2.0.19 - - @0xsequence/core@2.0.19 - - @0xsequence/migration@2.0.19 - - @0xsequence/network@2.0.19 - - @0xsequence/relayer@2.0.19 - - @0xsequence/utils@2.0.19 - - @0xsequence/wallet@2.0.19 - -## 2.0.18 - -### Patch Changes - -- waas: new contractCall transaction type -- sessions: add arweave owner -- Updated dependencies -- Updated dependencies - - @0xsequence/abi@2.0.18 - - @0xsequence/account@2.0.18 - - @0xsequence/auth@2.0.18 - - @0xsequence/core@2.0.18 - - @0xsequence/migration@2.0.18 - - @0xsequence/network@2.0.18 - - @0xsequence/relayer@2.0.18 - - @0xsequence/utils@2.0.18 - - @0xsequence/wallet@2.0.18 - -## 2.0.17 - -### Patch Changes - -- update waas auth to clear session before signIn -- Updated dependencies - - @0xsequence/abi@2.0.17 - - @0xsequence/account@2.0.17 - - @0xsequence/auth@2.0.17 - - @0xsequence/core@2.0.17 - - @0xsequence/migration@2.0.17 - - @0xsequence/network@2.0.17 - - @0xsequence/relayer@2.0.17 - - @0xsequence/utils@2.0.17 - - @0xsequence/wallet@2.0.17 - -## 2.0.16 - -### Patch Changes - -- Removed Astar chains -- Updated dependencies - - @0xsequence/abi@2.0.16 - - @0xsequence/account@2.0.16 - - @0xsequence/auth@2.0.16 - - @0xsequence/core@2.0.16 - - @0xsequence/migration@2.0.16 - - @0xsequence/network@2.0.16 - - @0xsequence/relayer@2.0.16 - - @0xsequence/utils@2.0.16 - - @0xsequence/wallet@2.0.16 - -## 2.0.15 - -### Patch Changes - -- indexer: update bindings with token balance additions -- Updated dependencies - - @0xsequence/abi@2.0.15 - - @0xsequence/account@2.0.15 - - @0xsequence/auth@2.0.15 - - @0xsequence/core@2.0.15 - - @0xsequence/migration@2.0.15 - - @0xsequence/network@2.0.15 - - @0xsequence/relayer@2.0.15 - - @0xsequence/utils@2.0.15 - - @0xsequence/wallet@2.0.15 - -## 2.0.14 - -### Patch Changes - -- sessions: arweave config reader -- network: add b3 and apechain mainnet configs -- Updated dependencies -- Updated dependencies - - @0xsequence/abi@2.0.14 - - @0xsequence/account@2.0.14 - - @0xsequence/auth@2.0.14 - - @0xsequence/core@2.0.14 - - @0xsequence/migration@2.0.14 - - @0xsequence/network@2.0.14 - - @0xsequence/relayer@2.0.14 - - @0xsequence/utils@2.0.14 - - @0xsequence/wallet@2.0.14 - -## 2.0.13 - -### Patch Changes - -- network: toy-testnet -- Updated dependencies - - @0xsequence/abi@2.0.13 - - @0xsequence/account@2.0.13 - - @0xsequence/auth@2.0.13 - - @0xsequence/core@2.0.13 - - @0xsequence/migration@2.0.13 - - @0xsequence/network@2.0.13 - - @0xsequence/relayer@2.0.13 - - @0xsequence/utils@2.0.13 - - @0xsequence/wallet@2.0.13 - -## 2.0.12 - -### Patch Changes - -- api: update bindings -- Updated dependencies - - @0xsequence/abi@2.0.12 - - @0xsequence/account@2.0.12 - - @0xsequence/auth@2.0.12 - - @0xsequence/core@2.0.12 - - @0xsequence/migration@2.0.12 - - @0xsequence/network@2.0.12 - - @0xsequence/relayer@2.0.12 - - @0xsequence/utils@2.0.12 - - @0xsequence/wallet@2.0.12 - -## 2.0.11 - -### Patch Changes - -- waas: intents test fix -- api: update bindings -- Updated dependencies -- Updated dependencies - - @0xsequence/abi@2.0.11 - - @0xsequence/account@2.0.11 - - @0xsequence/auth@2.0.11 - - @0xsequence/core@2.0.11 - - @0xsequence/migration@2.0.11 - - @0xsequence/network@2.0.11 - - @0xsequence/relayer@2.0.11 - - @0xsequence/utils@2.0.11 - - @0xsequence/wallet@2.0.11 - -## 2.0.10 - -### Patch Changes - -- network: soneium minato testnet -- Updated dependencies - - @0xsequence/abi@2.0.10 - - @0xsequence/account@2.0.10 - - @0xsequence/auth@2.0.10 - - @0xsequence/core@2.0.10 - - @0xsequence/migration@2.0.10 - - @0xsequence/network@2.0.10 - - @0xsequence/relayer@2.0.10 - - @0xsequence/utils@2.0.10 - - @0xsequence/wallet@2.0.10 - -## 2.0.9 - -### Patch Changes - -- network: fix SKALE network name -- Updated dependencies - - @0xsequence/abi@2.0.9 - - @0xsequence/account@2.0.9 - - @0xsequence/auth@2.0.9 - - @0xsequence/core@2.0.9 - - @0xsequence/migration@2.0.9 - - @0xsequence/network@2.0.9 - - @0xsequence/relayer@2.0.9 - - @0xsequence/utils@2.0.9 - - @0xsequence/wallet@2.0.9 - -## 2.0.8 - -### Patch Changes - -- metadata: update bindings -- Updated dependencies - - @0xsequence/abi@2.0.8 - - @0xsequence/account@2.0.8 - - @0xsequence/auth@2.0.8 - - @0xsequence/core@2.0.8 - - @0xsequence/migration@2.0.8 - - @0xsequence/network@2.0.8 - - @0xsequence/relayer@2.0.8 - - @0xsequence/utils@2.0.8 - - @0xsequence/wallet@2.0.8 - -## 2.0.7 - -### Patch Changes - -- wallet request handler fix -- Updated dependencies - - @0xsequence/abi@2.0.7 - - @0xsequence/account@2.0.7 - - @0xsequence/auth@2.0.7 - - @0xsequence/core@2.0.7 - - @0xsequence/migration@2.0.7 - - @0xsequence/network@2.0.7 - - @0xsequence/relayer@2.0.7 - - @0xsequence/utils@2.0.7 - - @0xsequence/wallet@2.0.7 - -## 2.0.6 - -### Patch Changes - -- network: matic -> pol -- Updated dependencies - - @0xsequence/abi@2.0.6 - - @0xsequence/account@2.0.6 - - @0xsequence/auth@2.0.6 - - @0xsequence/core@2.0.6 - - @0xsequence/migration@2.0.6 - - @0xsequence/network@2.0.6 - - @0xsequence/relayer@2.0.6 - - @0xsequence/utils@2.0.6 - - @0xsequence/wallet@2.0.6 - -## 2.0.5 - -### Patch Changes - -- provider: update databeat to 0.9.2 -- Updated dependencies - - @0xsequence/abi@2.0.5 - - @0xsequence/account@2.0.5 - - @0xsequence/auth@2.0.5 - - @0xsequence/core@2.0.5 - - @0xsequence/migration@2.0.5 - - @0xsequence/network@2.0.5 - - @0xsequence/relayer@2.0.5 - - @0xsequence/utils@2.0.5 - - @0xsequence/wallet@2.0.5 - -## 2.0.4 - -### Patch Changes - -- network: add skale-nebula-testnet -- Updated dependencies - - @0xsequence/abi@2.0.4 - - @0xsequence/account@2.0.4 - - @0xsequence/auth@2.0.4 - - @0xsequence/core@2.0.4 - - @0xsequence/migration@2.0.4 - - @0xsequence/network@2.0.4 - - @0xsequence/relayer@2.0.4 - - @0xsequence/utils@2.0.4 - - @0xsequence/wallet@2.0.4 - -## 2.0.3 - -### Patch Changes - -- waas: check session status in SequenceWaaS.isSignedIn() -- Updated dependencies - - @0xsequence/abi@2.0.3 - - @0xsequence/account@2.0.3 - - @0xsequence/auth@2.0.3 - - @0xsequence/core@2.0.3 - - @0xsequence/migration@2.0.3 - - @0xsequence/network@2.0.3 - - @0xsequence/relayer@2.0.3 - - @0xsequence/utils@2.0.3 - - @0xsequence/wallet@2.0.3 - -## 2.0.2 - -### Patch Changes - -- sessions: property convert serialized bignumber hex value to bigint -- Updated dependencies - - @0xsequence/abi@2.0.2 - - @0xsequence/account@2.0.2 - - @0xsequence/auth@2.0.2 - - @0xsequence/core@2.0.2 - - @0xsequence/migration@2.0.2 - - @0xsequence/network@2.0.2 - - @0xsequence/relayer@2.0.2 - - @0xsequence/utils@2.0.2 - - @0xsequence/wallet@2.0.2 - -## 2.0.1 - -### Patch Changes - -- waas: http signature check for authenticator requests -- provider: unwrap legacy json rpc responses -- use json replacer and reviver for bigints -- Updated dependencies -- Updated dependencies -- Updated dependencies - - @0xsequence/abi@2.0.1 - - @0xsequence/account@2.0.1 - - @0xsequence/auth@2.0.1 - - @0xsequence/core@2.0.1 - - @0xsequence/migration@2.0.1 - - @0xsequence/network@2.0.1 - - @0xsequence/relayer@2.0.1 - - @0xsequence/utils@2.0.1 - - @0xsequence/wallet@2.0.1 - -## 2.0.0 - -### Major Changes - -- ethers v6 - -### Patch Changes - -- Updated dependencies - - @0xsequence/abi@2.0.0 - - @0xsequence/account@2.0.0 - - @0xsequence/auth@2.0.0 - - @0xsequence/core@2.0.0 - - @0xsequence/migration@2.0.0 - - @0xsequence/network@2.0.0 - - @0xsequence/relayer@2.0.0 - - @0xsequence/utils@2.0.0 - - @0xsequence/wallet@2.0.0 - -## 1.10.15 - -### Patch Changes - -- utils: extractProjectIdFromAccessKey -- Updated dependencies - - @0xsequence/abi@1.10.15 - - @0xsequence/account@1.10.15 - - @0xsequence/auth@1.10.15 - - @0xsequence/core@1.10.15 - - @0xsequence/migration@1.10.15 - - @0xsequence/network@1.10.15 - - @0xsequence/relayer@1.10.15 - - @0xsequence/utils@1.10.15 - - @0xsequence/wallet@1.10.15 - -## 1.10.14 - -### Patch Changes - -- network: add borne-testnet to allNetworks -- Updated dependencies - - @0xsequence/abi@1.10.14 - - @0xsequence/account@1.10.14 - - @0xsequence/auth@1.10.14 - - @0xsequence/core@1.10.14 - - @0xsequence/migration@1.10.14 - - @0xsequence/network@1.10.14 - - @0xsequence/relayer@1.10.14 - - @0xsequence/utils@1.10.14 - - @0xsequence/wallet@1.10.14 - -## 1.10.13 - -### Patch Changes - -- network: add borne testnet -- Updated dependencies - - @0xsequence/abi@1.10.13 - - @0xsequence/account@1.10.13 - - @0xsequence/auth@1.10.13 - - @0xsequence/core@1.10.13 - - @0xsequence/migration@1.10.13 - - @0xsequence/network@1.10.13 - - @0xsequence/relayer@1.10.13 - - @0xsequence/utils@1.10.13 - - @0xsequence/wallet@1.10.13 - -## 1.10.12 - -### Patch Changes - -- api: update bindings -- global/window -> globalThis -- Updated dependencies -- Updated dependencies - - @0xsequence/abi@1.10.12 - - @0xsequence/account@1.10.12 - - @0xsequence/auth@1.10.12 - - @0xsequence/core@1.10.12 - - @0xsequence/migration@1.10.12 - - @0xsequence/network@1.10.12 - - @0xsequence/relayer@1.10.12 - - @0xsequence/utils@1.10.12 - - @0xsequence/wallet@1.10.12 - -## 1.10.11 - -### Patch Changes - -- waas: updated intent.gen without webrpc types, errors exported from authenticator.gen -- Updated dependencies - - @0xsequence/abi@1.10.11 - - @0xsequence/account@1.10.11 - - @0xsequence/auth@1.10.11 - - @0xsequence/core@1.10.11 - - @0xsequence/migration@1.10.11 - - @0xsequence/network@1.10.11 - - @0xsequence/relayer@1.10.11 - - @0xsequence/utils@1.10.11 - - @0xsequence/wallet@1.10.11 - -## 1.10.10 - -### Patch Changes - -- metadata: update bindings with new contract collections api -- Updated dependencies - - @0xsequence/abi@1.10.10 - - @0xsequence/account@1.10.10 - - @0xsequence/auth@1.10.10 - - @0xsequence/core@1.10.10 - - @0xsequence/migration@1.10.10 - - @0xsequence/network@1.10.10 - - @0xsequence/relayer@1.10.10 - - @0xsequence/utils@1.10.10 - - @0xsequence/wallet@1.10.10 - -## 1.10.9 - -### Patch Changes - -- waas minor update -- Updated dependencies - - @0xsequence/abi@1.10.9 - - @0xsequence/account@1.10.9 - - @0xsequence/auth@1.10.9 - - @0xsequence/core@1.10.9 - - @0xsequence/migration@1.10.9 - - @0xsequence/network@1.10.9 - - @0xsequence/relayer@1.10.9 - - @0xsequence/utils@1.10.9 - - @0xsequence/wallet@1.10.9 - -## 1.10.8 - -### Patch Changes - -- update metadata bindings -- Updated dependencies - - @0xsequence/abi@1.10.8 - - @0xsequence/account@1.10.8 - - @0xsequence/auth@1.10.8 - - @0xsequence/core@1.10.8 - - @0xsequence/migration@1.10.8 - - @0xsequence/network@1.10.8 - - @0xsequence/relayer@1.10.8 - - @0xsequence/utils@1.10.8 - - @0xsequence/wallet@1.10.8 - -## 1.10.7 - -### Patch Changes - -- minor fixes to waas client -- Updated dependencies - - @0xsequence/abi@1.10.7 - - @0xsequence/account@1.10.7 - - @0xsequence/auth@1.10.7 - - @0xsequence/core@1.10.7 - - @0xsequence/migration@1.10.7 - - @0xsequence/network@1.10.7 - - @0xsequence/relayer@1.10.7 - - @0xsequence/utils@1.10.7 - - @0xsequence/wallet@1.10.7 - -## 1.10.6 - -### Patch Changes - -- metadata: update bindings -- Updated dependencies - - @0xsequence/abi@1.10.6 - - @0xsequence/account@1.10.6 - - @0xsequence/auth@1.10.6 - - @0xsequence/core@1.10.6 - - @0xsequence/migration@1.10.6 - - @0xsequence/network@1.10.6 - - @0xsequence/relayer@1.10.6 - - @0xsequence/utils@1.10.6 - - @0xsequence/wallet@1.10.6 - -## 1.10.5 - -### Patch Changes - -- network: ape-chain-testnet -> apechain-testnet -- Updated dependencies - - @0xsequence/abi@1.10.5 - - @0xsequence/account@1.10.5 - - @0xsequence/auth@1.10.5 - - @0xsequence/core@1.10.5 - - @0xsequence/migration@1.10.5 - - @0xsequence/network@1.10.5 - - @0xsequence/relayer@1.10.5 - - @0xsequence/utils@1.10.5 - - @0xsequence/wallet@1.10.5 - -## 1.10.4 - -### Patch Changes - -- network: add b3-sepolia, ape-chain-testnet, blast, blast-sepolia -- Updated dependencies - - @0xsequence/abi@1.10.4 - - @0xsequence/account@1.10.4 - - @0xsequence/auth@1.10.4 - - @0xsequence/core@1.10.4 - - @0xsequence/migration@1.10.4 - - @0xsequence/network@1.10.4 - - @0xsequence/relayer@1.10.4 - - @0xsequence/utils@1.10.4 - - @0xsequence/wallet@1.10.4 - -## 1.10.3 - -### Patch Changes - -- typing fix -- Updated dependencies - - @0xsequence/abi@1.10.3 - - @0xsequence/account@1.10.3 - - @0xsequence/auth@1.10.3 - - @0xsequence/core@1.10.3 - - @0xsequence/migration@1.10.3 - - @0xsequence/network@1.10.3 - - @0xsequence/relayer@1.10.3 - - @0xsequence/utils@1.10.3 - - @0xsequence/wallet@1.10.3 - -## 1.10.2 - -### Patch Changes - -- - waas: add getIdToken method - - indexer: update api client -- Updated dependencies - - @0xsequence/abi@1.10.2 - - @0xsequence/account@1.10.2 - - @0xsequence/auth@1.10.2 - - @0xsequence/core@1.10.2 - - @0xsequence/migration@1.10.2 - - @0xsequence/network@1.10.2 - - @0xsequence/relayer@1.10.2 - - @0xsequence/utils@1.10.2 - - @0xsequence/wallet@1.10.2 - -## 1.10.1 - -### Patch Changes - -- metadata: update bindings -- Updated dependencies - - @0xsequence/abi@1.10.1 - - @0xsequence/account@1.10.1 - - @0xsequence/auth@1.10.1 - - @0xsequence/core@1.10.1 - - @0xsequence/migration@1.10.1 - - @0xsequence/network@1.10.1 - - @0xsequence/relayer@1.10.1 - - @0xsequence/utils@1.10.1 - - @0xsequence/wallet@1.10.1 - -## 1.10.0 - -### Minor Changes - -- waas release v1.3.0 - -### Patch Changes - -- Updated dependencies - - @0xsequence/abi@1.10.0 - - @0xsequence/account@1.10.0 - - @0xsequence/auth@1.10.0 - - @0xsequence/core@1.10.0 - - @0xsequence/migration@1.10.0 - - @0xsequence/network@1.10.0 - - @0xsequence/relayer@1.10.0 - - @0xsequence/utils@1.10.0 - - @0xsequence/wallet@1.10.0 - -## 1.9.37 - -### Patch Changes - -- network: adds nativeToken data to NetworkMetadata constants -- Updated dependencies - - @0xsequence/abi@1.9.37 - - @0xsequence/account@1.9.37 - - @0xsequence/auth@1.9.37 - - @0xsequence/core@1.9.37 - - @0xsequence/migration@1.9.37 - - @0xsequence/network@1.9.37 - - @0xsequence/relayer@1.9.37 - - @0xsequence/utils@1.9.37 - - @0xsequence/wallet@1.9.37 - -## 1.9.36 - -### Patch Changes - -- guard: export client -- Updated dependencies - - @0xsequence/abi@1.9.36 - - @0xsequence/account@1.9.36 - - @0xsequence/auth@1.9.36 - - @0xsequence/core@1.9.36 - - @0xsequence/migration@1.9.36 - - @0xsequence/network@1.9.36 - - @0xsequence/relayer@1.9.36 - - @0xsequence/utils@1.9.36 - - @0xsequence/wallet@1.9.36 - -## 1.9.35 - -### Patch Changes - -- guard: update bindings -- Updated dependencies - - @0xsequence/abi@1.9.35 - - @0xsequence/account@1.9.35 - - @0xsequence/auth@1.9.35 - - @0xsequence/core@1.9.35 - - @0xsequence/migration@1.9.35 - - @0xsequence/network@1.9.35 - - @0xsequence/relayer@1.9.35 - - @0xsequence/utils@1.9.35 - - @0xsequence/wallet@1.9.35 - -## 1.9.34 - -### Patch Changes - -- waas: always use lowercase email -- Updated dependencies - - @0xsequence/abi@1.9.34 - - @0xsequence/account@1.9.34 - - @0xsequence/auth@1.9.34 - - @0xsequence/core@1.9.34 - - @0xsequence/migration@1.9.34 - - @0xsequence/network@1.9.34 - - @0xsequence/relayer@1.9.34 - - @0xsequence/utils@1.9.34 - - @0xsequence/wallet@1.9.34 - -## 1.9.33 - -### Patch Changes - -- waas: umd build -- Updated dependencies - - @0xsequence/abi@1.9.33 - - @0xsequence/account@1.9.33 - - @0xsequence/auth@1.9.33 - - @0xsequence/core@1.9.33 - - @0xsequence/migration@1.9.33 - - @0xsequence/network@1.9.33 - - @0xsequence/relayer@1.9.33 - - @0xsequence/utils@1.9.33 - - @0xsequence/wallet@1.9.33 - -## 1.9.32 - -### Patch Changes - -- indexer: update bindings -- Updated dependencies - - @0xsequence/abi@1.9.32 - - @0xsequence/account@1.9.32 - - @0xsequence/auth@1.9.32 - - @0xsequence/core@1.9.32 - - @0xsequence/migration@1.9.32 - - @0xsequence/network@1.9.32 - - @0xsequence/relayer@1.9.32 - - @0xsequence/utils@1.9.32 - - @0xsequence/wallet@1.9.32 - -## 1.9.31 - -### Patch Changes - -- metadata: token directory changes -- Updated dependencies - - @0xsequence/abi@1.9.31 - - @0xsequence/account@1.9.31 - - @0xsequence/auth@1.9.31 - - @0xsequence/core@1.9.31 - - @0xsequence/migration@1.9.31 - - @0xsequence/network@1.9.31 - - @0xsequence/relayer@1.9.31 - - @0xsequence/utils@1.9.31 - - @0xsequence/wallet@1.9.31 - -## 1.9.30 - -### Patch Changes - -- update -- Updated dependencies - - @0xsequence/abi@1.9.30 - - @0xsequence/account@1.9.30 - - @0xsequence/auth@1.9.30 - - @0xsequence/core@1.9.30 - - @0xsequence/migration@1.9.30 - - @0xsequence/network@1.9.30 - - @0xsequence/relayer@1.9.30 - - @0xsequence/utils@1.9.30 - - @0xsequence/wallet@1.9.30 - -## 1.9.29 - -### Patch Changes - -- disable gnosis chain -- Updated dependencies - - @0xsequence/abi@1.9.29 - - @0xsequence/account@1.9.29 - - @0xsequence/auth@1.9.29 - - @0xsequence/core@1.9.29 - - @0xsequence/migration@1.9.29 - - @0xsequence/network@1.9.29 - - @0xsequence/relayer@1.9.29 - - @0xsequence/utils@1.9.29 - - @0xsequence/wallet@1.9.29 - -## 1.9.28 - -### Patch Changes - -- add utils/merkletree -- Updated dependencies - - @0xsequence/abi@1.9.28 - - @0xsequence/account@1.9.28 - - @0xsequence/auth@1.9.28 - - @0xsequence/core@1.9.28 - - @0xsequence/migration@1.9.28 - - @0xsequence/network@1.9.28 - - @0xsequence/relayer@1.9.28 - - @0xsequence/utils@1.9.28 - - @0xsequence/wallet@1.9.28 - -## 1.9.27 - -### Patch Changes - -- network: optimistic -> optimism -- waas: remove defaults -- api, sessions: update bindings -- Updated dependencies -- Updated dependencies -- Updated dependencies - - @0xsequence/abi@1.9.27 - - @0xsequence/account@1.9.27 - - @0xsequence/auth@1.9.27 - - @0xsequence/core@1.9.27 - - @0xsequence/migration@1.9.27 - - @0xsequence/network@1.9.27 - - @0xsequence/relayer@1.9.27 - - @0xsequence/utils@1.9.27 - - @0xsequence/wallet@1.9.27 - -## 1.9.26 - -### Patch Changes - -- - add backend interfaces for pluggable interfaces - - introduce @0xsequence/react-native - - update pnpm to lockfile v9 -- Updated dependencies - - @0xsequence/abi@1.9.26 - - @0xsequence/account@1.9.26 - - @0xsequence/auth@1.9.26 - - @0xsequence/core@1.9.26 - - @0xsequence/migration@1.9.26 - - @0xsequence/network@1.9.26 - - @0xsequence/relayer@1.9.26 - - @0xsequence/utils@1.9.26 - - @0xsequence/wallet@1.9.26 - -## 1.9.25 - -### Patch Changes - -- update webrpc clients with new error types -- Updated dependencies - - @0xsequence/abi@1.9.25 - - @0xsequence/account@1.9.25 - - @0xsequence/auth@1.9.25 - - @0xsequence/core@1.9.25 - - @0xsequence/migration@1.9.25 - - @0xsequence/network@1.9.25 - - @0xsequence/relayer@1.9.25 - - @0xsequence/utils@1.9.25 - - @0xsequence/wallet@1.9.25 - -## 1.9.24 - -### Patch Changes - -- waas: add memoryStore backend to localStore -- Updated dependencies - - @0xsequence/abi@1.9.24 - - @0xsequence/account@1.9.24 - - @0xsequence/auth@1.9.24 - - @0xsequence/core@1.9.24 - - @0xsequence/migration@1.9.24 - - @0xsequence/network@1.9.24 - - @0xsequence/relayer@1.9.24 - - @0xsequence/utils@1.9.24 - - @0xsequence/wallet@1.9.24 - -## 1.9.23 - -### Patch Changes - -- update api client bindings -- Updated dependencies - - @0xsequence/abi@1.9.23 - - @0xsequence/account@1.9.23 - - @0xsequence/auth@1.9.23 - - @0xsequence/core@1.9.23 - - @0xsequence/migration@1.9.23 - - @0xsequence/network@1.9.23 - - @0xsequence/relayer@1.9.23 - - @0xsequence/utils@1.9.23 - - @0xsequence/wallet@1.9.23 - -## 1.9.22 - -### Patch Changes - -- update metadata client bindings -- Updated dependencies - - @0xsequence/abi@1.9.22 - - @0xsequence/account@1.9.22 - - @0xsequence/auth@1.9.22 - - @0xsequence/core@1.9.22 - - @0xsequence/migration@1.9.22 - - @0xsequence/network@1.9.22 - - @0xsequence/relayer@1.9.22 - - @0xsequence/utils@1.9.22 - - @0xsequence/wallet@1.9.22 - -## 1.9.21 - -### Patch Changes - -- api client bindings -- Updated dependencies - - @0xsequence/abi@1.9.21 - - @0xsequence/account@1.9.21 - - @0xsequence/auth@1.9.21 - - @0xsequence/core@1.9.21 - - @0xsequence/migration@1.9.21 - - @0xsequence/network@1.9.21 - - @0xsequence/relayer@1.9.21 - - @0xsequence/utils@1.9.21 - - @0xsequence/wallet@1.9.21 - -## 1.9.20 - -### Patch Changes - -- api client bindings update -- Updated dependencies - - @0xsequence/abi@1.9.20 - - @0xsequence/account@1.9.20 - - @0xsequence/auth@1.9.20 - - @0xsequence/core@1.9.20 - - @0xsequence/migration@1.9.20 - - @0xsequence/network@1.9.20 - - @0xsequence/relayer@1.9.20 - - @0xsequence/utils@1.9.20 - - @0xsequence/wallet@1.9.20 - -## 1.9.19 - -### Patch Changes - -- waas update -- Updated dependencies - - @0xsequence/abi@1.9.19 - - @0xsequence/account@1.9.19 - - @0xsequence/auth@1.9.19 - - @0xsequence/core@1.9.19 - - @0xsequence/migration@1.9.19 - - @0xsequence/network@1.9.19 - - @0xsequence/relayer@1.9.19 - - @0xsequence/utils@1.9.19 - - @0xsequence/wallet@1.9.19 - -## 1.9.18 - -### Patch Changes - -- provider: prohibit dangerous functions -- Updated dependencies - - @0xsequence/abi@1.9.18 - - @0xsequence/account@1.9.18 - - @0xsequence/auth@1.9.18 - - @0xsequence/core@1.9.18 - - @0xsequence/migration@1.9.18 - - @0xsequence/network@1.9.18 - - @0xsequence/relayer@1.9.18 - - @0xsequence/utils@1.9.18 - - @0xsequence/wallet@1.9.18 - -## 1.9.17 - -### Patch Changes - -- network: add xr-sepolia -- Updated dependencies - - @0xsequence/network@1.9.17 - - @0xsequence/abi@1.9.17 - - @0xsequence/account@1.9.17 - - @0xsequence/auth@1.9.17 - - @0xsequence/core@1.9.17 - - @0xsequence/migration@1.9.17 - - @0xsequence/relayer@1.9.17 - - @0xsequence/utils@1.9.17 - - @0xsequence/wallet@1.9.17 - -## 1.9.16 - -### Patch Changes - -- waas: sequence.feeOptions -- Updated dependencies - - @0xsequence/abi@1.9.16 - - @0xsequence/account@1.9.16 - - @0xsequence/auth@1.9.16 - - @0xsequence/core@1.9.16 - - @0xsequence/migration@1.9.16 - - @0xsequence/network@1.9.16 - - @0xsequence/relayer@1.9.16 - - @0xsequence/utils@1.9.16 - - @0xsequence/wallet@1.9.16 - -## 1.9.15 - -### Patch Changes - -- metadata: collection external_link field name fix -- Updated dependencies - - @0xsequence/abi@1.9.15 - - @0xsequence/account@1.9.15 - - @0xsequence/auth@1.9.15 - - @0xsequence/core@1.9.15 - - @0xsequence/migration@1.9.15 - - @0xsequence/network@1.9.15 - - @0xsequence/relayer@1.9.15 - - @0xsequence/utils@1.9.15 - - @0xsequence/wallet@1.9.15 - -## 1.9.14 - -### Patch Changes - -- network: astar-zkatana -> astar-zkyoto -- network: deprecate polygon mumbai network -- network: add xai and polygon amoy -- Updated dependencies -- Updated dependencies -- Updated dependencies - - @0xsequence/abi@1.9.14 - - @0xsequence/account@1.9.14 - - @0xsequence/auth@1.9.14 - - @0xsequence/core@1.9.14 - - @0xsequence/migration@1.9.14 - - @0xsequence/network@1.9.14 - - @0xsequence/relayer@1.9.14 - - @0xsequence/utils@1.9.14 - - @0xsequence/wallet@1.9.14 - -## 1.9.13 - -### Patch Changes - -- waas: fix @0xsequence/network dependency -- Updated dependencies - - @0xsequence/abi@1.9.13 - - @0xsequence/account@1.9.13 - - @0xsequence/auth@1.9.13 - - @0xsequence/core@1.9.13 - - @0xsequence/migration@1.9.13 - - @0xsequence/network@1.9.13 - - @0xsequence/relayer@1.9.13 - - @0xsequence/utils@1.9.13 - - @0xsequence/wallet@1.9.13 - -## 1.9.12 - -### Patch Changes - -- indexer: update rpc bindings -- provider: signMessage: Serialize the BytesLike or string message into hexstring before sending -- waas: SessionAuthProof -- Updated dependencies -- Updated dependencies -- Updated dependencies - - @0xsequence/abi@1.9.12 - - @0xsequence/account@1.9.12 - - @0xsequence/auth@1.9.12 - - @0xsequence/core@1.9.12 - - @0xsequence/migration@1.9.12 - - @0xsequence/network@1.9.12 - - @0xsequence/relayer@1.9.12 - - @0xsequence/utils@1.9.12 - - @0xsequence/wallet@1.9.12 - -## 1.9.11 - -### Patch Changes - -- metdata, update rpc bindings -- Updated dependencies - - @0xsequence/abi@1.9.11 - - @0xsequence/account@1.9.11 - - @0xsequence/auth@1.9.11 - - @0xsequence/core@1.9.11 - - @0xsequence/migration@1.9.11 - - @0xsequence/network@1.9.11 - - @0xsequence/relayer@1.9.11 - - @0xsequence/utils@1.9.11 - - @0xsequence/wallet@1.9.11 - -## 1.9.10 - -### Patch Changes - -- update metadata rpc bindings -- Updated dependencies - - @0xsequence/abi@1.9.10 - - @0xsequence/account@1.9.10 - - @0xsequence/auth@1.9.10 - - @0xsequence/core@1.9.10 - - @0xsequence/migration@1.9.10 - - @0xsequence/network@1.9.10 - - @0xsequence/relayer@1.9.10 - - @0xsequence/utils@1.9.10 - - @0xsequence/wallet@1.9.10 - -## 1.9.9 - -### Patch Changes - -- metadata, add SequenceCollections rpc client -- Updated dependencies - - @0xsequence/abi@1.9.9 - - @0xsequence/account@1.9.9 - - @0xsequence/auth@1.9.9 - - @0xsequence/core@1.9.9 - - @0xsequence/migration@1.9.9 - - @0xsequence/network@1.9.9 - - @0xsequence/relayer@1.9.9 - - @0xsequence/utils@1.9.9 - - @0xsequence/wallet@1.9.9 - -## 1.9.8 - -### Patch Changes - -- waas client update -- Updated dependencies - - @0xsequence/abi@1.9.8 - - @0xsequence/account@1.9.8 - - @0xsequence/auth@1.9.8 - - @0xsequence/core@1.9.8 - - @0xsequence/migration@1.9.8 - - @0xsequence/network@1.9.8 - - @0xsequence/relayer@1.9.8 - - @0xsequence/utils@1.9.8 - - @0xsequence/wallet@1.9.8 - -## 1.9.7 - -### Patch Changes - -- update rpc client bindings for api, metadata and relayer -- Updated dependencies - - @0xsequence/abi@1.9.7 - - @0xsequence/account@1.9.7 - - @0xsequence/auth@1.9.7 - - @0xsequence/core@1.9.7 - - @0xsequence/migration@1.9.7 - - @0xsequence/network@1.9.7 - - @0xsequence/relayer@1.9.7 - - @0xsequence/utils@1.9.7 - - @0xsequence/wallet@1.9.7 - -## 1.9.6 - -### Patch Changes - -- waas package update -- Updated dependencies - - @0xsequence/abi@1.9.6 - - @0xsequence/account@1.9.6 - - @0xsequence/auth@1.9.6 - - @0xsequence/core@1.9.6 - - @0xsequence/migration@1.9.6 - - @0xsequence/network@1.9.6 - - @0xsequence/relayer@1.9.6 - - @0xsequence/utils@1.9.6 - - @0xsequence/wallet@1.9.6 - -## 1.9.5 - -### Patch Changes - -- RpcRelayer prioritize project access key -- Updated dependencies - - @0xsequence/abi@1.9.5 - - @0xsequence/account@1.9.5 - - @0xsequence/auth@1.9.5 - - @0xsequence/core@1.9.5 - - @0xsequence/migration@1.9.5 - - @0xsequence/network@1.9.5 - - @0xsequence/relayer@1.9.5 - - @0xsequence/utils@1.9.5 - - @0xsequence/wallet@1.9.5 - -## 1.9.4 - -### Patch Changes - -- waas: fix network dependency -- Updated dependencies - - @0xsequence/abi@1.9.4 - - @0xsequence/account@1.9.4 - - @0xsequence/auth@1.9.4 - - @0xsequence/core@1.9.4 - - @0xsequence/migration@1.9.4 - - @0xsequence/network@1.9.4 - - @0xsequence/relayer@1.9.4 - - @0xsequence/utils@1.9.4 - - @0xsequence/wallet@1.9.4 - -## 1.9.3 - -### Patch Changes - -- provider: don't append access key to RPC url if user has already provided it -- Updated dependencies - - @0xsequence/abi@1.9.3 - - @0xsequence/account@1.9.3 - - @0xsequence/auth@1.9.3 - - @0xsequence/core@1.9.3 - - @0xsequence/migration@1.9.3 - - @0xsequence/network@1.9.3 - - @0xsequence/relayer@1.9.3 - - @0xsequence/utils@1.9.3 - - @0xsequence/wallet@1.9.3 - -## 1.9.2 - -### Patch Changes - -- network: add xai-sepolia -- Updated dependencies - - @0xsequence/abi@1.9.2 - - @0xsequence/account@1.9.2 - - @0xsequence/auth@1.9.2 - - @0xsequence/core@1.9.2 - - @0xsequence/migration@1.9.2 - - @0xsequence/network@1.9.2 - - @0xsequence/relayer@1.9.2 - - @0xsequence/utils@1.9.2 - - @0xsequence/wallet@1.9.2 - -## 1.9.1 - -### Patch Changes - -- analytics fix -- Updated dependencies - - @0xsequence/abi@1.9.1 - - @0xsequence/account@1.9.1 - - @0xsequence/auth@1.9.1 - - @0xsequence/core@1.9.1 - - @0xsequence/migration@1.9.1 - - @0xsequence/network@1.9.1 - - @0xsequence/relayer@1.9.1 - - @0xsequence/utils@1.9.1 - - @0xsequence/wallet@1.9.1 - -## 1.9.0 - -### Minor Changes - -- waas release - -### Patch Changes - -- Updated dependencies - - @0xsequence/abi@1.9.0 - - @0xsequence/account@1.9.0 - - @0xsequence/auth@1.9.0 - - @0xsequence/core@1.9.0 - - @0xsequence/migration@1.9.0 - - @0xsequence/network@1.9.0 - - @0xsequence/relayer@1.9.0 - - @0xsequence/utils@1.9.0 - - @0xsequence/wallet@1.9.0 - -## 1.8.8 - -### Patch Changes - -- update metadata bindings -- Updated dependencies - - @0xsequence/abi@1.8.8 - - @0xsequence/account@1.8.8 - - @0xsequence/auth@1.8.8 - - @0xsequence/core@1.8.8 - - @0xsequence/migration@1.8.8 - - @0xsequence/network@1.8.8 - - @0xsequence/relayer@1.8.8 - - @0xsequence/utils@1.8.8 - - @0xsequence/wallet@1.8.8 - -## 1.8.7 - -### Patch Changes - -- provider: update databeat to 0.9.1 -- Updated dependencies - - @0xsequence/abi@1.8.7 - - @0xsequence/account@1.8.7 - - @0xsequence/auth@1.8.7 - - @0xsequence/core@1.8.7 - - @0xsequence/migration@1.8.7 - - @0xsequence/network@1.8.7 - - @0xsequence/relayer@1.8.7 - - @0xsequence/utils@1.8.7 - - @0xsequence/wallet@1.8.7 - -## 1.8.6 - -### Patch Changes - -- guard: SignedOwnershipProof -- Updated dependencies - - @0xsequence/abi@1.8.6 - - @0xsequence/account@1.8.6 - - @0xsequence/auth@1.8.6 - - @0xsequence/core@1.8.6 - - @0xsequence/migration@1.8.6 - - @0xsequence/network@1.8.6 - - @0xsequence/relayer@1.8.6 - - @0xsequence/utils@1.8.6 - - @0xsequence/wallet@1.8.6 - -## 1.8.5 - -### Patch Changes - -- guard: signOwnershipProof and isSignedOwnershipProof -- Updated dependencies - - @0xsequence/abi@1.8.5 - - @0xsequence/account@1.8.5 - - @0xsequence/auth@1.8.5 - - @0xsequence/core@1.8.5 - - @0xsequence/migration@1.8.5 - - @0xsequence/network@1.8.5 - - @0xsequence/relayer@1.8.5 - - @0xsequence/utils@1.8.5 - - @0xsequence/wallet@1.8.5 - -## 1.8.4 - -### Patch Changes - -- network: add homeverse to networks list -- Updated dependencies - - @0xsequence/abi@1.8.4 - - @0xsequence/account@1.8.4 - - @0xsequence/auth@1.8.4 - - @0xsequence/core@1.8.4 - - @0xsequence/migration@1.8.4 - - @0xsequence/network@1.8.4 - - @0xsequence/relayer@1.8.4 - - @0xsequence/utils@1.8.4 - - @0xsequence/wallet@1.8.4 - -## 1.8.3 - -### Patch Changes - -- api: introduce basic linked wallet support -- Updated dependencies - - @0xsequence/abi@1.8.3 - - @0xsequence/account@1.8.3 - - @0xsequence/auth@1.8.3 - - @0xsequence/core@1.8.3 - - @0xsequence/migration@1.8.3 - - @0xsequence/network@1.8.3 - - @0xsequence/relayer@1.8.3 - - @0xsequence/utils@1.8.3 - - @0xsequence/wallet@1.8.3 - -## 1.8.2 - -### Patch Changes - -- provider: don't initialize analytics unless explicitly requested -- Updated dependencies - - @0xsequence/abi@1.8.2 - - @0xsequence/account@1.8.2 - - @0xsequence/auth@1.8.2 - - @0xsequence/core@1.8.2 - - @0xsequence/migration@1.8.2 - - @0xsequence/network@1.8.2 - - @0xsequence/relayer@1.8.2 - - @0xsequence/utils@1.8.2 - - @0xsequence/wallet@1.8.2 - -## 1.8.1 - -### Patch Changes - -- update to analytics provider -- Updated dependencies - - @0xsequence/abi@1.8.1 - - @0xsequence/account@1.8.1 - - @0xsequence/auth@1.8.1 - - @0xsequence/core@1.8.1 - - @0xsequence/migration@1.8.1 - - @0xsequence/network@1.8.1 - - @0xsequence/relayer@1.8.1 - - @0xsequence/utils@1.8.1 - - @0xsequence/wallet@1.8.1 - -## 1.8.0 - -### Minor Changes - -- provider: project analytics - -### Patch Changes - -- Updated dependencies - - @0xsequence/abi@1.8.0 - - @0xsequence/account@1.8.0 - - @0xsequence/auth@1.8.0 - - @0xsequence/core@1.8.0 - - @0xsequence/migration@1.8.0 - - @0xsequence/network@1.8.0 - - @0xsequence/relayer@1.8.0 - - @0xsequence/utils@1.8.0 - - @0xsequence/wallet@1.8.0 - -## 1.7.2 - -### Patch Changes - -- 0xsequence: ChainId should not be exported as a type -- account, wallet: fix nonce selection -- Updated dependencies -- Updated dependencies - - @0xsequence/abi@1.7.2 - - @0xsequence/account@1.7.2 - - @0xsequence/auth@1.7.2 - - @0xsequence/core@1.7.2 - - @0xsequence/migration@1.7.2 - - @0xsequence/network@1.7.2 - - @0xsequence/relayer@1.7.2 - - @0xsequence/utils@1.7.2 - - @0xsequence/wallet@1.7.2 - -## 1.7.1 - -### Patch Changes - -- network: add missing avalanche logoURI -- Updated dependencies - - @0xsequence/abi@1.7.1 - - @0xsequence/account@1.7.1 - - @0xsequence/auth@1.7.1 - - @0xsequence/core@1.7.1 - - @0xsequence/migration@1.7.1 - - @0xsequence/network@1.7.1 - - @0xsequence/relayer@1.7.1 - - @0xsequence/utils@1.7.1 - - @0xsequence/wallet@1.7.1 - -## 1.7.0 - -### Minor Changes - -- provider: projectAccessKey is now required - -### Patch Changes - -- network: add NetworkMetadata.logoURI property for all networks -- Updated dependencies -- Updated dependencies - - @0xsequence/abi@1.7.0 - - @0xsequence/account@1.7.0 - - @0xsequence/auth@1.7.0 - - @0xsequence/core@1.7.0 - - @0xsequence/migration@1.7.0 - - @0xsequence/network@1.7.0 - - @0xsequence/relayer@1.7.0 - - @0xsequence/utils@1.7.0 - - @0xsequence/wallet@1.7.0 - -## 1.6.3 - -### Patch Changes - -- network list update -- Updated dependencies - - @0xsequence/abi@1.6.3 - - @0xsequence/account@1.6.3 - - @0xsequence/auth@1.6.3 - - @0xsequence/core@1.6.3 - - @0xsequence/migration@1.6.3 - - @0xsequence/network@1.6.3 - - @0xsequence/relayer@1.6.3 - - @0xsequence/utils@1.6.3 - - @0xsequence/wallet@1.6.3 - -## 1.6.2 - -### Patch Changes - -- auth: projectAccessKey option -- wallet: use 12 bytes for random space -- Updated dependencies -- Updated dependencies - - @0xsequence/abi@1.6.2 - - @0xsequence/account@1.6.2 - - @0xsequence/auth@1.6.2 - - @0xsequence/core@1.6.2 - - @0xsequence/migration@1.6.2 - - @0xsequence/network@1.6.2 - - @0xsequence/relayer@1.6.2 - - @0xsequence/utils@1.6.2 - - @0xsequence/wallet@1.6.2 - -## 1.6.1 - -### Patch Changes - -- core: add simple config from subdigest support -- core: fix encode tree with subdigest -- account: implement buildOnChainSignature on Account -- Updated dependencies -- Updated dependencies -- Updated dependencies - - @0xsequence/abi@1.6.1 - - @0xsequence/account@1.6.1 - - @0xsequence/auth@1.6.1 - - @0xsequence/core@1.6.1 - - @0xsequence/migration@1.6.1 - - @0xsequence/network@1.6.1 - - @0xsequence/relayer@1.6.1 - - @0xsequence/utils@1.6.1 - - @0xsequence/wallet@1.6.1 - -## 1.6.0 - -### Minor Changes - -- account, wallet: parallel transactions by default - -### Patch Changes - -- provider: emit disconnect on sign out -- Updated dependencies -- Updated dependencies - - @0xsequence/abi@1.6.0 - - @0xsequence/account@1.6.0 - - @0xsequence/auth@1.6.0 - - @0xsequence/core@1.6.0 - - @0xsequence/migration@1.6.0 - - @0xsequence/network@1.6.0 - - @0xsequence/relayer@1.6.0 - - @0xsequence/utils@1.6.0 - - @0xsequence/wallet@1.6.0 - -## 1.5.0 - -### Minor Changes - -- signhub: add 'signing' signer status - -### Patch Changes - -- auth: Session.open: onAccountAddress callback -- account: allow empty transaction bundles -- Updated dependencies -- Updated dependencies -- Updated dependencies - - @0xsequence/abi@1.5.0 - - @0xsequence/account@1.5.0 - - @0xsequence/auth@1.5.0 - - @0xsequence/core@1.5.0 - - @0xsequence/migration@1.5.0 - - @0xsequence/network@1.5.0 - - @0xsequence/relayer@1.5.0 - - @0xsequence/utils@1.5.0 - - @0xsequence/wallet@1.5.0 - -## 1.4.9 - -### Patch Changes - -- rename SequenceMetadataClient to SequenceMetadata -- Updated dependencies - - @0xsequence/abi@1.4.9 - - @0xsequence/account@1.4.9 - - @0xsequence/auth@1.4.9 - - @0xsequence/core@1.4.9 - - @0xsequence/migration@1.4.9 - - @0xsequence/network@1.4.9 - - @0xsequence/relayer@1.4.9 - - @0xsequence/utils@1.4.9 - - @0xsequence/wallet@1.4.9 - -## 1.4.8 - -### Patch Changes - -- account: Account.getSigners -- Updated dependencies - - @0xsequence/abi@1.4.8 - - @0xsequence/account@1.4.8 - - @0xsequence/auth@1.4.8 - - @0xsequence/core@1.4.8 - - @0xsequence/migration@1.4.8 - - @0xsequence/network@1.4.8 - - @0xsequence/relayer@1.4.8 - - @0xsequence/utils@1.4.8 - - @0xsequence/wallet@1.4.8 - -## 1.4.7 - -### Patch Changes - -- update indexer client bindings -- Updated dependencies - - @0xsequence/abi@1.4.7 - - @0xsequence/account@1.4.7 - - @0xsequence/auth@1.4.7 - - @0xsequence/core@1.4.7 - - @0xsequence/migration@1.4.7 - - @0xsequence/network@1.4.7 - - @0xsequence/relayer@1.4.7 - - @0xsequence/utils@1.4.7 - - @0xsequence/wallet@1.4.7 - -## 1.4.6 - -### Patch Changes - -- - add sepolia networks, mark goerli as deprecated - - update indexer client bindings -- Updated dependencies - - @0xsequence/abi@1.4.6 - - @0xsequence/account@1.4.6 - - @0xsequence/auth@1.4.6 - - @0xsequence/core@1.4.6 - - @0xsequence/migration@1.4.6 - - @0xsequence/network@1.4.6 - - @0xsequence/relayer@1.4.6 - - @0xsequence/utils@1.4.6 - - @0xsequence/wallet@1.4.6 - -## 1.4.5 - -### Patch Changes - -- indexer/metadata: update client bindings -- auth: selectWallet with new address -- Updated dependencies -- Updated dependencies - - @0xsequence/abi@1.4.5 - - @0xsequence/account@1.4.5 - - @0xsequence/auth@1.4.5 - - @0xsequence/core@1.4.5 - - @0xsequence/migration@1.4.5 - - @0xsequence/network@1.4.5 - - @0xsequence/relayer@1.4.5 - - @0xsequence/utils@1.4.5 - - @0xsequence/wallet@1.4.5 - -## 1.4.4 - -### Patch Changes - -- indexer: update bindings -- auth: handle jwt expiry -- Updated dependencies -- Updated dependencies - - @0xsequence/abi@1.4.4 - - @0xsequence/account@1.4.4 - - @0xsequence/auth@1.4.4 - - @0xsequence/core@1.4.4 - - @0xsequence/migration@1.4.4 - - @0xsequence/network@1.4.4 - - @0xsequence/relayer@1.4.4 - - @0xsequence/utils@1.4.4 - - @0xsequence/wallet@1.4.4 - -## 1.4.3 - -### Patch Changes - -- guard: return active status from GuardSigner.getAuthMethods -- Updated dependencies - - @0xsequence/abi@1.4.3 - - @0xsequence/account@1.4.3 - - @0xsequence/auth@1.4.3 - - @0xsequence/core@1.4.3 - - @0xsequence/migration@1.4.3 - - @0xsequence/network@1.4.3 - - @0xsequence/relayer@1.4.3 - - @0xsequence/utils@1.4.3 - - @0xsequence/wallet@1.4.3 - -## 1.4.2 - -### Patch Changes - -- guard: update bindings -- Updated dependencies - - @0xsequence/abi@1.4.2 - - @0xsequence/account@1.4.2 - - @0xsequence/auth@1.4.2 - - @0xsequence/core@1.4.2 - - @0xsequence/migration@1.4.2 - - @0xsequence/network@1.4.2 - - @0xsequence/relayer@1.4.2 - - @0xsequence/utils@1.4.2 - - @0xsequence/wallet@1.4.2 - -## 1.4.1 - -### Patch Changes - -- network: remove unused networks -- signhub: orchestrator interface -- guard: auth methods interface -- guard: update bindings for pin and totp -- guard: no more retry logic -- Updated dependencies -- Updated dependencies -- Updated dependencies -- Updated dependencies -- Updated dependencies - - @0xsequence/abi@1.4.1 - - @0xsequence/account@1.4.1 - - @0xsequence/auth@1.4.1 - - @0xsequence/core@1.4.1 - - @0xsequence/migration@1.4.1 - - @0xsequence/network@1.4.1 - - @0xsequence/relayer@1.4.1 - - @0xsequence/utils@1.4.1 - - @0xsequence/wallet@1.4.1 - -## 1.4.0 - -### Minor Changes - -- project access key support - -### Patch Changes - -- Updated dependencies - - @0xsequence/abi@1.4.0 - - @0xsequence/account@1.4.0 - - @0xsequence/auth@1.4.0 - - @0xsequence/core@1.4.0 - - @0xsequence/migration@1.4.0 - - @0xsequence/network@1.4.0 - - @0xsequence/relayer@1.4.0 - - @0xsequence/utils@1.4.0 - - @0xsequence/wallet@1.4.0 - -## 1.3.0 - -### Minor Changes - -- signhub: account children - -### Patch Changes - -- guard: do not throw when building deploy transaction -- network: snowtrace.io -> subnets.avax.network/c-chain -- Updated dependencies -- Updated dependencies -- Updated dependencies - - @0xsequence/abi@1.3.0 - - @0xsequence/account@1.3.0 - - @0xsequence/auth@1.3.0 - - @0xsequence/core@1.3.0 - - @0xsequence/migration@1.3.0 - - @0xsequence/network@1.3.0 - - @0xsequence/relayer@1.3.0 - - @0xsequence/utils@1.3.0 - - @0xsequence/wallet@1.3.0 - -## 1.2.9 - -### Patch Changes - -- account: AccountSigner.sendTransaction simulateForFeeOptions -- relayer: update bindings -- Updated dependencies -- Updated dependencies - - @0xsequence/abi@1.2.9 - - @0xsequence/account@1.2.9 - - @0xsequence/auth@1.2.9 - - @0xsequence/core@1.2.9 - - @0xsequence/migration@1.2.9 - - @0xsequence/network@1.2.9 - - @0xsequence/relayer@1.2.9 - - @0xsequence/utils@1.2.9 - - @0xsequence/wallet@1.2.9 - -## 1.2.8 - -### Patch Changes - -- rename X-Sequence-Token-Key header to X-Access-Key -- Updated dependencies - - @0xsequence/abi@1.2.8 - - @0xsequence/account@1.2.8 - - @0xsequence/auth@1.2.8 - - @0xsequence/core@1.2.8 - - @0xsequence/migration@1.2.8 - - @0xsequence/network@1.2.8 - - @0xsequence/relayer@1.2.8 - - @0xsequence/utils@1.2.8 - - @0xsequence/wallet@1.2.8 - -## 1.2.7 - -### Patch Changes - -- add x-sequence-token-key to clients -- Updated dependencies - - @0xsequence/abi@1.2.7 - - @0xsequence/account@1.2.7 - - @0xsequence/auth@1.2.7 - - @0xsequence/core@1.2.7 - - @0xsequence/migration@1.2.7 - - @0xsequence/network@1.2.7 - - @0xsequence/relayer@1.2.7 - - @0xsequence/utils@1.2.7 - - @0xsequence/wallet@1.2.7 - -## 1.2.6 - -### Patch Changes - -- Fix bind multicall provider -- Updated dependencies - - @0xsequence/abi@1.2.6 - - @0xsequence/account@1.2.6 - - @0xsequence/auth@1.2.6 - - @0xsequence/core@1.2.6 - - @0xsequence/migration@1.2.6 - - @0xsequence/network@1.2.6 - - @0xsequence/relayer@1.2.6 - - @0xsequence/utils@1.2.6 - - @0xsequence/wallet@1.2.6 - -## 1.2.5 - -### Patch Changes - -- Multicall default configuration fixes -- Updated dependencies - - @0xsequence/abi@1.2.5 - - @0xsequence/account@1.2.5 - - @0xsequence/auth@1.2.5 - - @0xsequence/core@1.2.5 - - @0xsequence/migration@1.2.5 - - @0xsequence/network@1.2.5 - - @0xsequence/relayer@1.2.5 - - @0xsequence/utils@1.2.5 - - @0xsequence/wallet@1.2.5 - -## 1.2.4 - -### Patch Changes - -- provider: Adding missing payment provider types to PaymentProviderOption -- provider: WalletRequestHandler.notifyChainChanged -- Updated dependencies -- Updated dependencies - - @0xsequence/abi@1.2.4 - - @0xsequence/account@1.2.4 - - @0xsequence/auth@1.2.4 - - @0xsequence/core@1.2.4 - - @0xsequence/migration@1.2.4 - - @0xsequence/network@1.2.4 - - @0xsequence/relayer@1.2.4 - - @0xsequence/utils@1.2.4 - - @0xsequence/wallet@1.2.4 - -## 1.2.3 - -### Patch Changes - -- auth, provider: connect to accept optional authorizeNonce -- Updated dependencies - - @0xsequence/abi@1.2.3 - - @0xsequence/account@1.2.3 - - @0xsequence/auth@1.2.3 - - @0xsequence/core@1.2.3 - - @0xsequence/migration@1.2.3 - - @0xsequence/network@1.2.3 - - @0xsequence/relayer@1.2.3 - - @0xsequence/utils@1.2.3 - - @0xsequence/wallet@1.2.3 - -## 1.2.2 - -### Patch Changes - -- provider: allow createContract calls -- core: check for explicit zero address in contract deployments -- Updated dependencies -- Updated dependencies - - @0xsequence/abi@1.2.2 - - @0xsequence/account@1.2.2 - - @0xsequence/auth@1.2.2 - - @0xsequence/core@1.2.2 - - @0xsequence/migration@1.2.2 - - @0xsequence/network@1.2.2 - - @0xsequence/relayer@1.2.2 - - @0xsequence/utils@1.2.2 - - @0xsequence/wallet@1.2.2 - -## 1.2.1 - -### Patch Changes - -- auth: use sequence api chain id as reference chain id if available -- Updated dependencies - - @0xsequence/abi@1.2.1 - - @0xsequence/account@1.2.1 - - @0xsequence/auth@1.2.1 - - @0xsequence/core@1.2.1 - - @0xsequence/migration@1.2.1 - - @0xsequence/network@1.2.1 - - @0xsequence/relayer@1.2.1 - - @0xsequence/utils@1.2.1 - - @0xsequence/wallet@1.2.1 - -## 1.2.0 - -### Minor Changes - -- split services from session, better local support - -### Patch Changes - -- Updated dependencies - - @0xsequence/abi@1.2.0 - - @0xsequence/account@1.2.0 - - @0xsequence/auth@1.2.0 - - @0xsequence/core@1.2.0 - - @0xsequence/migration@1.2.0 - - @0xsequence/network@1.2.0 - - @0xsequence/relayer@1.2.0 - - @0xsequence/utils@1.2.0 - - @0xsequence/wallet@1.2.0 - -## 1.1.15 - -### Patch Changes - -- guard: remove error filtering -- Updated dependencies - - @0xsequence/abi@1.1.15 - - @0xsequence/account@1.1.15 - - @0xsequence/auth@1.1.15 - - @0xsequence/core@1.1.15 - - @0xsequence/migration@1.1.15 - - @0xsequence/network@1.1.15 - - @0xsequence/relayer@1.1.15 - - @0xsequence/utils@1.1.15 - - @0xsequence/wallet@1.1.15 - -## 1.1.14 - -### Patch Changes - -- guard: add GuardSigner.onError -- Updated dependencies - - @0xsequence/abi@1.1.14 - - @0xsequence/account@1.1.14 - - @0xsequence/auth@1.1.14 - - @0xsequence/core@1.1.14 - - @0xsequence/migration@1.1.14 - - @0xsequence/network@1.1.14 - - @0xsequence/relayer@1.1.14 - - @0xsequence/utils@1.1.14 - - @0xsequence/wallet@1.1.14 - -## 1.1.13 - -### Patch Changes - -- provider: pass client version with connect options -- provider: removing large from BannerSize -- Updated dependencies -- Updated dependencies - - @0xsequence/abi@1.1.13 - - @0xsequence/account@1.1.13 - - @0xsequence/auth@1.1.13 - - @0xsequence/core@1.1.13 - - @0xsequence/migration@1.1.13 - - @0xsequence/network@1.1.13 - - @0xsequence/relayer@1.1.13 - - @0xsequence/utils@1.1.13 - - @0xsequence/wallet@1.1.13 - -## 1.1.12 - -### Patch Changes - -- provider: adding bannerSize to ConnectOptions -- Updated dependencies - - @0xsequence/abi@1.1.12 - - @0xsequence/account@1.1.12 - - @0xsequence/auth@1.1.12 - - @0xsequence/core@1.1.12 - - @0xsequence/migration@1.1.12 - - @0xsequence/network@1.1.12 - - @0xsequence/relayer@1.1.12 - - @0xsequence/utils@1.1.12 - - @0xsequence/wallet@1.1.12 - -## 1.1.11 - -### Patch Changes - -- add homeverse configs -- Updated dependencies - - @0xsequence/abi@1.1.11 - - @0xsequence/account@1.1.11 - - @0xsequence/auth@1.1.11 - - @0xsequence/core@1.1.11 - - @0xsequence/migration@1.1.11 - - @0xsequence/network@1.1.11 - - @0xsequence/relayer@1.1.11 - - @0xsequence/utils@1.1.11 - - @0xsequence/wallet@1.1.11 - -## 1.1.10 - -### Patch Changes - -- handle default EIP6492 on send -- Updated dependencies - - @0xsequence/abi@1.1.10 - - @0xsequence/account@1.1.10 - - @0xsequence/auth@1.1.10 - - @0xsequence/core@1.1.10 - - @0xsequence/migration@1.1.10 - - @0xsequence/network@1.1.10 - - @0xsequence/relayer@1.1.10 - - @0xsequence/utils@1.1.10 - - @0xsequence/wallet@1.1.10 - -## 1.1.9 - -### Patch Changes - -- Custom default EIP6492 on client -- Updated dependencies - - @0xsequence/abi@1.1.9 - - @0xsequence/account@1.1.9 - - @0xsequence/auth@1.1.9 - - @0xsequence/core@1.1.9 - - @0xsequence/migration@1.1.9 - - @0xsequence/network@1.1.9 - - @0xsequence/relayer@1.1.9 - - @0xsequence/utils@1.1.9 - - @0xsequence/wallet@1.1.9 - -## 1.1.8 - -### Patch Changes - -- metadata: searchMetadata: add types filter -- Updated dependencies - - @0xsequence/abi@1.1.8 - - @0xsequence/account@1.1.8 - - @0xsequence/auth@1.1.8 - - @0xsequence/core@1.1.8 - - @0xsequence/migration@1.1.8 - - @0xsequence/network@1.1.8 - - @0xsequence/relayer@1.1.8 - - @0xsequence/utils@1.1.8 - - @0xsequence/wallet@1.1.8 - -## 1.1.7 - -### Patch Changes - -- adding signInWith connect settings option to allow dapps to automatically login their users with a certain provider optimizing the normal authentication flow -- Updated dependencies - - @0xsequence/abi@1.1.7 - - @0xsequence/account@1.1.7 - - @0xsequence/auth@1.1.7 - - @0xsequence/core@1.1.7 - - @0xsequence/migration@1.1.7 - - @0xsequence/network@1.1.7 - - @0xsequence/relayer@1.1.7 - - @0xsequence/utils@1.1.7 - - @0xsequence/wallet@1.1.7 - -## 1.1.6 - -### Patch Changes - -- metadata: searchMetadata: add chainID and excludeTokenMetadata filters -- Updated dependencies - - @0xsequence/abi@1.1.6 - - @0xsequence/account@1.1.6 - - @0xsequence/auth@1.1.6 - - @0xsequence/core@1.1.6 - - @0xsequence/migration@1.1.6 - - @0xsequence/network@1.1.6 - - @0xsequence/relayer@1.1.6 - - @0xsequence/utils@1.1.6 - - @0xsequence/wallet@1.1.6 - -## 1.1.5 - -### Patch Changes - -- account: re-compute meta-transaction id for wallet deployment transactions -- Updated dependencies - - @0xsequence/abi@1.1.5 - - @0xsequence/account@1.1.5 - - @0xsequence/auth@1.1.5 - - @0xsequence/core@1.1.5 - - @0xsequence/migration@1.1.5 - - @0xsequence/network@1.1.5 - - @0xsequence/relayer@1.1.5 - - @0xsequence/utils@1.1.5 - - @0xsequence/wallet@1.1.5 - -## 1.1.4 - -### Patch Changes - -- network: rename base-mainnet to base -- provider: override isDefaultChain with ConnectOptions.networkId if provided -- Updated dependencies -- Updated dependencies - - @0xsequence/abi@1.1.4 - - @0xsequence/account@1.1.4 - - @0xsequence/auth@1.1.4 - - @0xsequence/core@1.1.4 - - @0xsequence/migration@1.1.4 - - @0xsequence/network@1.1.4 - - @0xsequence/relayer@1.1.4 - - @0xsequence/utils@1.1.4 - - @0xsequence/wallet@1.1.4 - -## 1.1.3 - -### Patch Changes - -- provider: use network id from transport session -- provider: sign authorization using ConnectOptions.networkId if provided -- Updated dependencies -- Updated dependencies - - @0xsequence/abi@1.1.3 - - @0xsequence/account@1.1.3 - - @0xsequence/auth@1.1.3 - - @0xsequence/core@1.1.3 - - @0xsequence/migration@1.1.3 - - @0xsequence/network@1.1.3 - - @0xsequence/relayer@1.1.3 - - @0xsequence/utils@1.1.3 - - @0xsequence/wallet@1.1.3 - -## 1.1.2 - -### Patch Changes - -- provider: jsonrpc chain id fixes -- Updated dependencies - - @0xsequence/abi@1.1.2 - - @0xsequence/account@1.1.2 - - @0xsequence/auth@1.1.2 - - @0xsequence/core@1.1.2 - - @0xsequence/migration@1.1.2 - - @0xsequence/network@1.1.2 - - @0xsequence/relayer@1.1.2 - - @0xsequence/utils@1.1.2 - - @0xsequence/wallet@1.1.2 - -## 1.1.1 - -### Patch Changes - -- network: add base mainnet and sepolia -- provider: reject toxic transaction requests -- Updated dependencies -- Updated dependencies - - @0xsequence/abi@1.1.1 - - @0xsequence/account@1.1.1 - - @0xsequence/auth@1.1.1 - - @0xsequence/core@1.1.1 - - @0xsequence/migration@1.1.1 - - @0xsequence/network@1.1.1 - - @0xsequence/relayer@1.1.1 - - @0xsequence/utils@1.1.1 - - @0xsequence/wallet@1.1.1 - -## 1.1.0 - -### Minor Changes - -- Refactor dapp facing provider - -### Patch Changes - -- Updated dependencies - - @0xsequence/abi@1.1.0 - - @0xsequence/account@1.1.0 - - @0xsequence/auth@1.1.0 - - @0xsequence/core@1.1.0 - - @0xsequence/migration@1.1.0 - - @0xsequence/network@1.1.0 - - @0xsequence/relayer@1.1.0 - - @0xsequence/utils@1.1.0 - - @0xsequence/wallet@1.1.0 - -## 1.0.5 - -### Patch Changes - -- network: export network constants -- guard: use the correct global for fetch -- network: nova-explorer.arbitrum.io -> nova.arbiscan.io -- Updated dependencies -- Updated dependencies -- Updated dependencies - - @0xsequence/abi@1.0.5 - - @0xsequence/account@1.0.5 - - @0xsequence/auth@1.0.5 - - @0xsequence/core@1.0.5 - - @0xsequence/migration@1.0.5 - - @0xsequence/network@1.0.5 - - @0xsequence/relayer@1.0.5 - - @0xsequence/utils@1.0.5 - - @0xsequence/wallet@1.0.5 - -## 1.0.4 - -### Patch Changes - -- provider: accept name or number for networkId -- Updated dependencies - - @0xsequence/abi@1.0.4 - - @0xsequence/account@1.0.4 - - @0xsequence/auth@1.0.4 - - @0xsequence/core@1.0.4 - - @0xsequence/migration@1.0.4 - - @0xsequence/network@1.0.4 - - @0xsequence/relayer@1.0.4 - - @0xsequence/utils@1.0.4 - - @0xsequence/wallet@1.0.4 - -## 1.0.3 - -### Patch Changes - -- Simpler isValidSignature helpers -- Updated dependencies - - @0xsequence/abi@1.0.3 - - @0xsequence/account@1.0.3 - - @0xsequence/auth@1.0.3 - - @0xsequence/core@1.0.3 - - @0xsequence/migration@1.0.3 - - @0xsequence/network@1.0.3 - - @0xsequence/relayer@1.0.3 - - @0xsequence/utils@1.0.3 - - @0xsequence/wallet@1.0.3 - -## 1.0.2 - -### Patch Changes - -- add extra signature validation utils methods -- Updated dependencies - - @0xsequence/abi@1.0.2 - - @0xsequence/account@1.0.2 - - @0xsequence/auth@1.0.2 - - @0xsequence/core@1.0.2 - - @0xsequence/migration@1.0.2 - - @0xsequence/network@1.0.2 - - @0xsequence/relayer@1.0.2 - - @0xsequence/utils@1.0.2 - - @0xsequence/wallet@1.0.2 - -## 1.0.1 - -### Patch Changes - -- add homeverse testnet -- Updated dependencies - - @0xsequence/abi@1.0.1 - - @0xsequence/account@1.0.1 - - @0xsequence/auth@1.0.1 - - @0xsequence/core@1.0.1 - - @0xsequence/migration@1.0.1 - - @0xsequence/network@1.0.1 - - @0xsequence/relayer@1.0.1 - - @0xsequence/utils@1.0.1 - - @0xsequence/wallet@1.0.1 - -## 1.0.0 - -### Major Changes - -- https://sequence.xyz/blog/sequence-wallet-light-state-sync-full-merkle-wallets - -### Patch Changes - -- Updated dependencies - - @0xsequence/abi@1.0.0 - - @0xsequence/account@1.0.0 - - @0xsequence/auth@1.0.0 - - @0xsequence/core@1.0.0 - - @0xsequence/migration@1.0.0 - - @0xsequence/network@1.0.0 - - @0xsequence/relayer@1.0.0 - - @0xsequence/utils@1.0.0 - - @0xsequence/wallet@1.0.0 - -## 0.43.34 - -### Patch Changes - -- auth: no jwt for indexer -- Updated dependencies - - @0xsequence/abi@0.43.34 - - @0xsequence/auth@0.43.34 - - @0xsequence/config@0.43.34 - - @0xsequence/network@0.43.34 - - @0xsequence/relayer@0.43.34 - - @0xsequence/transactions@0.43.34 - - @0xsequence/utils@0.43.34 - - @0xsequence/wallet@0.43.34 - -## 0.43.33 - -### Patch Changes - -- Adding onConnectOptionsChange handler to WalletRequestHandler -- Updated dependencies - - @0xsequence/abi@0.43.33 - - @0xsequence/auth@0.43.33 - - @0xsequence/config@0.43.33 - - @0xsequence/network@0.43.33 - - @0xsequence/relayer@0.43.33 - - @0xsequence/transactions@0.43.33 - - @0xsequence/utils@0.43.33 - - @0xsequence/wallet@0.43.33 - -## 0.43.32 - -### Patch Changes - -- add Base Goerli network -- Updated dependencies - - @0xsequence/abi@0.43.32 - - @0xsequence/auth@0.43.32 - - @0xsequence/config@0.43.32 - - @0xsequence/network@0.43.32 - - @0xsequence/relayer@0.43.32 - - @0xsequence/transactions@0.43.32 - - @0xsequence/utils@0.43.32 - - @0xsequence/wallet@0.43.32 - -## 0.43.31 - -### Patch Changes - -- remove AuxDataProvider, add promptSignInConnect -- Updated dependencies - - @0xsequence/abi@0.43.31 - - @0xsequence/auth@0.43.31 - - @0xsequence/config@0.43.31 - - @0xsequence/network@0.43.31 - - @0xsequence/relayer@0.43.31 - - @0xsequence/transactions@0.43.31 - - @0xsequence/utils@0.43.31 - - @0xsequence/wallet@0.43.31 - -## 0.43.30 - -### Patch Changes - -- add arbitrum goerli testnet -- Updated dependencies - - @0xsequence/abi@0.43.30 - - @0xsequence/auth@0.43.30 - - @0xsequence/config@0.43.30 - - @0xsequence/network@0.43.30 - - @0xsequence/relayer@0.43.30 - - @0xsequence/transactions@0.43.30 - - @0xsequence/utils@0.43.30 - - @0xsequence/wallet@0.43.30 - -## 0.43.29 - -### Patch Changes - -- provider: check availability of window object -- Updated dependencies - - @0xsequence/abi@0.43.29 - - @0xsequence/auth@0.43.29 - - @0xsequence/config@0.43.29 - - @0xsequence/network@0.43.29 - - @0xsequence/relayer@0.43.29 - - @0xsequence/transactions@0.43.29 - - @0xsequence/utils@0.43.29 - - @0xsequence/wallet@0.43.29 - -## 0.43.28 - -### Patch Changes - -- update api bindings -- Updated dependencies - - @0xsequence/abi@0.43.28 - - @0xsequence/auth@0.43.28 - - @0xsequence/config@0.43.28 - - @0xsequence/network@0.43.28 - - @0xsequence/relayer@0.43.28 - - @0xsequence/transactions@0.43.28 - - @0xsequence/utils@0.43.28 - - @0xsequence/wallet@0.43.28 - -## 0.43.27 - -### Patch Changes - -- Add rpc is sequence method -- Updated dependencies - - @0xsequence/abi@0.43.27 - - @0xsequence/auth@0.43.27 - - @0xsequence/config@0.43.27 - - @0xsequence/network@0.43.27 - - @0xsequence/relayer@0.43.27 - - @0xsequence/transactions@0.43.27 - - @0xsequence/utils@0.43.27 - - @0xsequence/wallet@0.43.27 - -## 0.43.26 - -### Patch Changes - -- add zkevm url to enum -- Updated dependencies - - @0xsequence/abi@0.43.26 - - @0xsequence/auth@0.43.26 - - @0xsequence/config@0.43.26 - - @0xsequence/network@0.43.26 - - @0xsequence/relayer@0.43.26 - - @0xsequence/transactions@0.43.26 - - @0xsequence/utils@0.43.26 - - @0xsequence/wallet@0.43.26 - -## 0.43.25 - -### Patch Changes - -- added polygon zkevm to mainnet networks -- Updated dependencies - - @0xsequence/abi@0.43.25 - - @0xsequence/auth@0.43.25 - - @0xsequence/config@0.43.25 - - @0xsequence/network@0.43.25 - - @0xsequence/relayer@0.43.25 - - @0xsequence/transactions@0.43.25 - - @0xsequence/utils@0.43.25 - - @0xsequence/wallet@0.43.25 - -## 0.43.24 - -### Patch Changes - -- name change from zkevm to polygon-zkevm -- Updated dependencies - - @0xsequence/abi@0.43.24 - - @0xsequence/auth@0.43.24 - - @0xsequence/config@0.43.24 - - @0xsequence/network@0.43.24 - - @0xsequence/relayer@0.43.24 - - @0xsequence/transactions@0.43.24 - - @0xsequence/utils@0.43.24 - - @0xsequence/wallet@0.43.24 - -## 0.43.23 - -### Patch Changes - -- update zkEVM name to Polygon zkEVM -- Updated dependencies - - @0xsequence/abi@0.43.23 - - @0xsequence/auth@0.43.23 - - @0xsequence/config@0.43.23 - - @0xsequence/network@0.43.23 - - @0xsequence/relayer@0.43.23 - - @0xsequence/transactions@0.43.23 - - @0xsequence/utils@0.43.23 - - @0xsequence/wallet@0.43.23 - -## 0.43.22 - -### Patch Changes - -- add zkevm chain -- Updated dependencies - - @0xsequence/abi@0.43.22 - - @0xsequence/auth@0.43.22 - - @0xsequence/config@0.43.22 - - @0xsequence/network@0.43.22 - - @0xsequence/relayer@0.43.22 - - @0xsequence/transactions@0.43.22 - - @0xsequence/utils@0.43.22 - - @0xsequence/wallet@0.43.22 - -## 0.43.21 - -### Patch Changes - -- api: update client bindings -- Updated dependencies - - @0xsequence/abi@0.43.21 - - @0xsequence/auth@0.43.21 - - @0xsequence/config@0.43.21 - - @0xsequence/network@0.43.21 - - @0xsequence/relayer@0.43.21 - - @0xsequence/transactions@0.43.21 - - @0xsequence/utils@0.43.21 - - @0xsequence/wallet@0.43.21 - -## 0.43.20 - -### Patch Changes - -- indexer: update bindings -- Updated dependencies - - @0xsequence/abi@0.43.20 - - @0xsequence/auth@0.43.20 - - @0xsequence/config@0.43.20 - - @0xsequence/network@0.43.20 - - @0xsequence/relayer@0.43.20 - - @0xsequence/transactions@0.43.20 - - @0xsequence/utils@0.43.20 - - @0xsequence/wallet@0.43.20 - -## 0.43.19 - -### Patch Changes - -- session proof update -- Updated dependencies - - @0xsequence/abi@0.43.19 - - @0xsequence/auth@0.43.19 - - @0xsequence/config@0.43.19 - - @0xsequence/network@0.43.19 - - @0xsequence/relayer@0.43.19 - - @0xsequence/transactions@0.43.19 - - @0xsequence/utils@0.43.19 - - @0xsequence/wallet@0.43.19 - -## 0.43.18 - -### Patch Changes - -- rpc client global check, hardening -- Updated dependencies - - @0xsequence/abi@0.43.18 - - @0xsequence/auth@0.43.18 - - @0xsequence/config@0.43.18 - - @0xsequence/network@0.43.18 - - @0xsequence/relayer@0.43.18 - - @0xsequence/transactions@0.43.18 - - @0xsequence/utils@0.43.18 - - @0xsequence/wallet@0.43.18 - -## 0.43.17 - -### Patch Changes - -- rpc clients, check of 'global' is defined -- Updated dependencies - - @0xsequence/abi@0.43.17 - - @0xsequence/auth@0.43.17 - - @0xsequence/config@0.43.17 - - @0xsequence/network@0.43.17 - - @0xsequence/relayer@0.43.17 - - @0xsequence/transactions@0.43.17 - - @0xsequence/utils@0.43.17 - - @0xsequence/wallet@0.43.17 - -## 0.43.16 - -### Patch Changes - -- ethers peerDep to v5, update rpc client global use -- Updated dependencies - - @0xsequence/abi@0.43.16 - - @0xsequence/auth@0.43.16 - - @0xsequence/config@0.43.16 - - @0xsequence/network@0.43.16 - - @0xsequence/relayer@0.43.16 - - @0xsequence/transactions@0.43.16 - - @0xsequence/utils@0.43.16 - - @0xsequence/wallet@0.43.16 - -## 0.43.15 - -### Patch Changes - -- - provider: expand receiver type on some util methods -- Updated dependencies - - @0xsequence/abi@0.43.15 - - @0xsequence/auth@0.43.15 - - @0xsequence/config@0.43.15 - - @0xsequence/network@0.43.15 - - @0xsequence/relayer@0.43.15 - - @0xsequence/transactions@0.43.15 - - @0xsequence/utils@0.43.15 - - @0xsequence/wallet@0.43.15 - -## 0.43.14 - -### Patch Changes - -- bump -- Updated dependencies - - @0xsequence/abi@0.43.14 - - @0xsequence/auth@0.43.14 - - @0xsequence/config@0.43.14 - - @0xsequence/network@0.43.14 - - @0xsequence/relayer@0.43.14 - - @0xsequence/transactions@0.43.14 - - @0xsequence/utils@0.43.14 - - @0xsequence/wallet@0.43.14 - -## 0.43.13 - -### Patch Changes - -- update rpc bindings -- Updated dependencies - - @0xsequence/abi@0.43.13 - - @0xsequence/auth@0.43.13 - - @0xsequence/config@0.43.13 - - @0xsequence/network@0.43.13 - - @0xsequence/relayer@0.43.13 - - @0xsequence/transactions@0.43.13 - - @0xsequence/utils@0.43.13 - - @0xsequence/wallet@0.43.13 - -## 0.43.12 - -### Patch Changes - -- provider: single wallet init, and add new unregisterWallet() method -- Updated dependencies - - @0xsequence/abi@0.43.12 - - @0xsequence/auth@0.43.12 - - @0xsequence/config@0.43.12 - - @0xsequence/network@0.43.12 - - @0xsequence/relayer@0.43.12 - - @0xsequence/transactions@0.43.12 - - @0xsequence/utils@0.43.12 - - @0xsequence/wallet@0.43.12 - -## 0.43.11 - -### Patch Changes - -- fix lockfiles -- re-add mocha type deleter -- Updated dependencies -- Updated dependencies - - @0xsequence/abi@0.43.11 - - @0xsequence/auth@0.43.11 - - @0xsequence/config@0.43.11 - - @0xsequence/network@0.43.11 - - @0xsequence/relayer@0.43.11 - - @0xsequence/transactions@0.43.11 - - @0xsequence/utils@0.43.11 - - @0xsequence/wallet@0.43.11 - -## 0.43.10 - -### Patch Changes - -- various improvements -- Updated dependencies - - @0xsequence/abi@0.43.10 - - @0xsequence/auth@0.43.10 - - @0xsequence/config@0.43.10 - - @0xsequence/network@0.43.10 - - @0xsequence/relayer@0.43.10 - - @0xsequence/transactions@0.43.10 - - @0xsequence/utils@0.43.10 - - @0xsequence/wallet@0.43.10 - -## 0.43.9 - -### Patch Changes - -- update deps -- Updated dependencies - - @0xsequence/abi@0.43.9 - - @0xsequence/auth@0.43.9 - - @0xsequence/config@0.43.9 - - @0xsequence/network@0.43.9 - - @0xsequence/relayer@0.43.9 - - @0xsequence/transactions@0.43.9 - - @0xsequence/utils@0.43.9 - - @0xsequence/wallet@0.43.9 - -## 0.43.8 - -### Patch Changes - -- network: JsonRpcProvider with caching -- Updated dependencies - - @0xsequence/abi@0.43.8 - - @0xsequence/auth@0.43.8 - - @0xsequence/config@0.43.8 - - @0xsequence/network@0.43.8 - - @0xsequence/relayer@0.43.8 - - @0xsequence/transactions@0.43.8 - - @0xsequence/utils@0.43.8 - - @0xsequence/wallet@0.43.8 - -## 0.43.7 - -### Patch Changes - -- provider: fix wallet network init -- Updated dependencies - - @0xsequence/abi@0.43.7 - - @0xsequence/auth@0.43.7 - - @0xsequence/config@0.43.7 - - @0xsequence/network@0.43.7 - - @0xsequence/transactions@0.43.7 - - @0xsequence/utils@0.43.7 - - @0xsequence/wallet@0.43.7 - -## 0.43.6 - -### Patch Changes - -- metadatata: update rpc bindings -- Updated dependencies - - @0xsequence/abi@0.43.6 - - @0xsequence/auth@0.43.6 - - @0xsequence/config@0.43.6 - - @0xsequence/network@0.43.6 - - @0xsequence/transactions@0.43.6 - - @0xsequence/utils@0.43.6 - - @0xsequence/wallet@0.43.6 - -## 0.43.5 - -### Patch Changes - -- provider: do not set default network for connect messages -- provider: forward missing error message -- Updated dependencies -- Updated dependencies - - @0xsequence/abi@0.43.5 - - @0xsequence/auth@0.43.5 - - @0xsequence/config@0.43.5 - - @0xsequence/network@0.43.5 - - @0xsequence/transactions@0.43.5 - - @0xsequence/utils@0.43.5 - - @0xsequence/wallet@0.43.5 - -## 0.43.4 - -### Patch Changes - -- no-change version bump to fix incorrectly tagged snapshot build -- Updated dependencies - - @0xsequence/abi@0.43.4 - - @0xsequence/auth@0.43.4 - - @0xsequence/config@0.43.4 - - @0xsequence/network@0.43.4 - - @0xsequence/transactions@0.43.4 - - @0xsequence/utils@0.43.4 - - @0xsequence/wallet@0.43.4 - -## 0.43.3 - -### Patch Changes - -- metadata: update bindings -- Updated dependencies - - @0xsequence/abi@0.43.3 - - @0xsequence/auth@0.43.3 - - @0xsequence/config@0.43.3 - - @0xsequence/network@0.43.3 - - @0xsequence/transactions@0.43.3 - - @0xsequence/utils@0.43.3 - - @0xsequence/wallet@0.43.3 - -## 0.43.2 - -### Patch Changes - -- provider: implement connectUnchecked -- Updated dependencies - - @0xsequence/abi@0.43.2 - - @0xsequence/auth@0.43.2 - - @0xsequence/config@0.43.2 - - @0xsequence/network@0.43.2 - - @0xsequence/transactions@0.43.2 - - @0xsequence/utils@0.43.2 - - @0xsequence/wallet@0.43.2 - -## 0.43.1 - -### Patch Changes - -- update to latest ethauth dep -- Updated dependencies - - @0xsequence/abi@0.43.1 - - @0xsequence/auth@0.43.1 - - @0xsequence/config@0.43.1 - - @0xsequence/network@0.43.1 - - @0xsequence/transactions@0.43.1 - - @0xsequence/utils@0.43.1 - - @0xsequence/wallet@0.43.1 - -## 0.43.0 - -### Minor Changes - -- move ethers to a peer dependency - -### Patch Changes - -- Updated dependencies - - @0xsequence/abi@0.43.0 - - @0xsequence/auth@0.43.0 - - @0xsequence/config@0.43.0 - - @0xsequence/network@0.43.0 - - @0xsequence/transactions@0.43.0 - - @0xsequence/utils@0.43.0 - - @0xsequence/wallet@0.43.0 - -## 0.42.10 - -### Patch Changes - -- add auxDataProvider -- Updated dependencies - - @0xsequence/abi@0.42.10 - - @0xsequence/auth@0.42.10 - - @0xsequence/config@0.42.10 - - @0xsequence/network@0.42.10 - - @0xsequence/transactions@0.42.10 - - @0xsequence/utils@0.42.10 - - @0xsequence/wallet@0.42.10 - -## 0.42.9 - -### Patch Changes - -- provider: add eip-191 exceptions -- Updated dependencies - - @0xsequence/abi@0.42.9 - - @0xsequence/auth@0.42.9 - - @0xsequence/config@0.42.9 - - @0xsequence/network@0.42.9 - - @0xsequence/transactions@0.42.9 - - @0xsequence/utils@0.42.9 - - @0xsequence/wallet@0.42.9 - -## 0.42.8 - -### Patch Changes - -- provider: skip setting intent origin if we're unity plugin -- Updated dependencies - - @0xsequence/abi@0.42.8 - - @0xsequence/auth@0.42.8 - - @0xsequence/config@0.42.8 - - @0xsequence/network@0.42.8 - - @0xsequence/transactions@0.42.8 - - @0xsequence/utils@0.42.8 - - @0xsequence/wallet@0.42.8 - -## 0.42.7 - -### Patch Changes - -- Add sign in options to connection settings -- Updated dependencies - - @0xsequence/abi@0.42.7 - - @0xsequence/auth@0.42.7 - - @0xsequence/config@0.42.7 - - @0xsequence/network@0.42.7 - - @0xsequence/transactions@0.42.7 - - @0xsequence/utils@0.42.7 - - @0xsequence/wallet@0.42.7 - -## 0.42.6 - -### Patch Changes - -- api bindings update -- Updated dependencies - - @0xsequence/abi@0.42.6 - - @0xsequence/auth@0.42.6 - - @0xsequence/config@0.42.6 - - @0xsequence/network@0.42.6 - - @0xsequence/transactions@0.42.6 - - @0xsequence/utils@0.42.6 - - @0xsequence/wallet@0.42.6 - -## 0.42.5 - -### Patch Changes - -- relayer: don't treat missing receipt as hard failure -- Updated dependencies - - @0xsequence/abi@0.42.5 - - @0xsequence/auth@0.42.5 - - @0xsequence/config@0.42.5 - - @0xsequence/network@0.42.5 - - @0xsequence/transactions@0.42.5 - - @0xsequence/utils@0.42.5 - - @0xsequence/wallet@0.42.5 - -## 0.42.4 - -### Patch Changes - -- provider: add custom app protocol to connect options -- Updated dependencies - - @0xsequence/abi@0.42.4 - - @0xsequence/auth@0.42.4 - - @0xsequence/config@0.42.4 - - @0xsequence/network@0.42.4 - - @0xsequence/transactions@0.42.4 - - @0xsequence/utils@0.42.4 - - @0xsequence/wallet@0.42.4 - -## 0.42.3 - -### Patch Changes - -- update api bindings -- Updated dependencies - - @0xsequence/abi@0.42.3 - - @0xsequence/auth@0.42.3 - - @0xsequence/config@0.42.3 - - @0xsequence/network@0.42.3 - - @0xsequence/transactions@0.42.3 - - @0xsequence/utils@0.42.3 - - @0xsequence/wallet@0.42.3 - -## 0.42.2 - -### Patch Changes - -- disable rinkeby network -- Updated dependencies - - @0xsequence/abi@0.42.2 - - @0xsequence/auth@0.42.2 - - @0xsequence/config@0.42.2 - - @0xsequence/network@0.42.2 - - @0xsequence/transactions@0.42.2 - - @0xsequence/utils@0.42.2 - - @0xsequence/wallet@0.42.2 - -## 0.42.1 - -### Patch Changes - -- wallet: optional waitForReceipt parameter -- Updated dependencies - - @0xsequence/abi@0.42.1 - - @0xsequence/auth@0.42.1 - - @0xsequence/config@0.42.1 - - @0xsequence/network@0.42.1 - - @0xsequence/transactions@0.42.1 - - @0xsequence/utils@0.42.1 - - @0xsequence/wallet@0.42.1 - -## 0.42.0 - -### Minor Changes - -- relayer: estimateGasLimits -> simulate -- add simulator package - -### Patch Changes - -- transactions: fix flattenAuxTransactions -- provider: only filter nullish values -- provider: re-map transaction 'gas' back to 'gasLimit' -- Updated dependencies -- Updated dependencies -- Updated dependencies -- Updated dependencies -- Updated dependencies - - @0xsequence/abi@0.42.0 - - @0xsequence/auth@0.42.0 - - @0xsequence/config@0.42.0 - - @0xsequence/network@0.42.0 - - @0xsequence/transactions@0.42.0 - - @0xsequence/utils@0.42.0 - - @0xsequence/wallet@0.42.0 - -## 0.41.3 - -### Patch Changes - -- api bindings update -- Updated dependencies - - @0xsequence/abi@0.41.3 - - @0xsequence/auth@0.41.3 - - @0xsequence/config@0.41.3 - - @0xsequence/network@0.41.3 - - @0xsequence/transactions@0.41.3 - - @0xsequence/utils@0.41.3 - - @0xsequence/wallet@0.41.3 - -## 0.41.2 - -### Patch Changes - -- api bindings update -- Updated dependencies - - @0xsequence/abi@0.41.2 - - @0xsequence/auth@0.41.2 - - @0xsequence/config@0.41.2 - - @0xsequence/network@0.41.2 - - @0xsequence/transactions@0.41.2 - - @0xsequence/utils@0.41.2 - - @0xsequence/wallet@0.41.2 - -## 0.41.1 - -### Patch Changes - -- update default networks -- Updated dependencies - - @0xsequence/abi@0.41.1 - - @0xsequence/auth@0.41.1 - - @0xsequence/config@0.41.1 - - @0xsequence/network@0.41.1 - - @0xsequence/transactions@0.41.1 - - @0xsequence/utils@0.41.1 - - @0xsequence/wallet@0.41.1 - -## 0.41.0 - -### Minor Changes - -- relayer: fix Relayer.wait() interface - - The interface for calling Relayer.wait() has changed. Instead of a single optional ill-defined timeout/delay parameter, there are three optional parameters, in order: - - - timeout: the maximum time to wait for the transaction receipt - - delay: the polling interval, i.e. the time to wait between requests - - maxFails: the maximum number of hard failures to tolerate before giving up - - Please update your codebase accordingly. - -- relayer: add optional waitForReceipt parameter to Relayer.relay - - The behaviour of Relayer.relay() was not well-defined with respect to whether or not it waited for a receipt. - This change allows the caller to specify whether to wait or not, with the default behaviour being to wait. - -### Patch Changes - -- relayer: wait receipt retry logic -- fix wrapped object error -- provider: forward delegateCall and revertOnError transaction fields -- Updated dependencies -- Updated dependencies -- Updated dependencies -- Updated dependencies -- Updated dependencies - - @0xsequence/abi@0.41.0 - - @0xsequence/auth@0.41.0 - - @0xsequence/config@0.41.0 - - @0xsequence/network@0.41.0 - - @0xsequence/transactions@0.41.0 - - @0xsequence/utils@0.41.0 - - @0xsequence/wallet@0.41.0 - -## 0.40.6 - -### Patch Changes - -- add arbitrum-nova chain -- Updated dependencies - - @0xsequence/abi@0.40.6 - - @0xsequence/auth@0.40.6 - - @0xsequence/config@0.40.6 - - @0xsequence/network@0.40.6 - - @0xsequence/transactions@0.40.6 - - @0xsequence/utils@0.40.6 - - @0xsequence/wallet@0.40.6 - -## 0.40.5 - -### Patch Changes - -- api: update bindings -- Updated dependencies - - @0xsequence/abi@0.40.5 - - @0xsequence/auth@0.40.5 - - @0xsequence/config@0.40.5 - - @0xsequence/network@0.40.5 - - @0xsequence/transactions@0.40.5 - - @0xsequence/utils@0.40.5 - - @0xsequence/wallet@0.40.5 - -## 0.40.4 - -### Patch Changes - -- add unreal transport -- Updated dependencies - - @0xsequence/abi@0.40.4 - - @0xsequence/auth@0.40.4 - - @0xsequence/config@0.40.4 - - @0xsequence/network@0.40.4 - - @0xsequence/transactions@0.40.4 - - @0xsequence/utils@0.40.4 - - @0xsequence/wallet@0.40.4 - -## 0.40.3 - -### Patch Changes - -- provider: fix MessageToSign message type -- Updated dependencies - - @0xsequence/abi@0.40.3 - - @0xsequence/auth@0.40.3 - - @0xsequence/config@0.40.3 - - @0xsequence/network@0.40.3 - - @0xsequence/transactions@0.40.3 - - @0xsequence/utils@0.40.3 - - @0xsequence/wallet@0.40.3 - -## 0.40.2 - -### Patch Changes - -- Wallet provider, loadSession method -- Updated dependencies - - @0xsequence/abi@0.40.2 - - @0xsequence/auth@0.40.2 - - @0xsequence/config@0.40.2 - - @0xsequence/network@0.40.2 - - @0xsequence/transactions@0.40.2 - - @0xsequence/utils@0.40.2 - - @0xsequence/wallet@0.40.2 - -## 0.40.1 - -### Patch Changes - -- export sequence.initWallet and sequence.getWallet -- Updated dependencies - - @0xsequence/abi@0.40.1 - - @0xsequence/auth@0.40.1 - - @0xsequence/config@0.40.1 - - @0xsequence/network@0.40.1 - - @0xsequence/transactions@0.40.1 - - @0xsequence/utils@0.40.1 - - @0xsequence/wallet@0.40.1 - -## 0.40.0 - -### Minor Changes - -- add sequence.initWallet(network, config) and sequence.getWallet() helper methods - -### Patch Changes - -- Updated dependencies - - @0xsequence/abi@0.40.0 - - @0xsequence/auth@0.40.0 - - @0xsequence/config@0.40.0 - - @0xsequence/network@0.40.0 - - @0xsequence/transactions@0.40.0 - - @0xsequence/utils@0.40.0 - - @0xsequence/wallet@0.40.0 - -## 0.39.6 - -### Patch Changes - -- indexer: update client bindings -- Updated dependencies - - @0xsequence/abi@0.39.6 - - @0xsequence/auth@0.39.6 - - @0xsequence/config@0.39.6 - - @0xsequence/network@0.39.6 - - @0xsequence/transactions@0.39.6 - - @0xsequence/utils@0.39.6 - - @0xsequence/wallet@0.39.6 - -## 0.39.5 - -### Patch Changes - -- provider: fix networkRpcUrl config option -- Updated dependencies - - @0xsequence/abi@0.39.5 - - @0xsequence/auth@0.39.5 - - @0xsequence/config@0.39.5 - - @0xsequence/network@0.39.5 - - @0xsequence/transactions@0.39.5 - - @0xsequence/utils@0.39.5 - - @0xsequence/wallet@0.39.5 - -## 0.39.4 - -### Patch Changes - -- api: update client bindings -- Updated dependencies - - @0xsequence/abi@0.39.4 - - @0xsequence/auth@0.39.4 - - @0xsequence/config@0.39.4 - - @0xsequence/network@0.39.4 - - @0xsequence/transactions@0.39.4 - - @0xsequence/utils@0.39.4 - - @0xsequence/wallet@0.39.4 - -## 0.39.3 - -### Patch Changes - -- add request method on Web3Provider -- Updated dependencies - - @0xsequence/abi@0.39.3 - - @0xsequence/auth@0.39.3 - - @0xsequence/config@0.39.3 - - @0xsequence/network@0.39.3 - - @0xsequence/transactions@0.39.3 - - @0xsequence/utils@0.39.3 - - @0xsequence/wallet@0.39.3 - -## 0.39.2 - -### Patch Changes - -- update umd name -- Updated dependencies - - @0xsequence/abi@0.39.2 - - @0xsequence/auth@0.39.2 - - @0xsequence/config@0.39.2 - - @0xsequence/network@0.39.2 - - @0xsequence/transactions@0.39.2 - - @0xsequence/utils@0.39.2 - - @0xsequence/wallet@0.39.2 - -## 0.39.1 - -### Patch Changes - -- add Aurora network -- add origin info for accountsChanged event to handle it per dapp -- Updated dependencies -- Updated dependencies - - @0xsequence/abi@0.39.1 - - @0xsequence/auth@0.39.1 - - @0xsequence/config@0.39.1 - - @0xsequence/network@0.39.1 - - @0xsequence/transactions@0.39.1 - - @0xsequence/utils@0.39.1 - - @0xsequence/wallet@0.39.1 - -## 0.39.0 - -### Minor Changes - -- abstract window.localStorage to interface type - -### Patch Changes - -- Updated dependencies - - @0xsequence/abi@0.39.0 - - @0xsequence/auth@0.39.0 - - @0xsequence/config@0.39.0 - - @0xsequence/network@0.39.0 - - @0xsequence/transactions@0.39.0 - - @0xsequence/utils@0.39.0 - - @0xsequence/wallet@0.39.0 - -## 0.38.2 - -### Patch Changes - -- provider: add Settings.defaultPurchaseAmount -- Updated dependencies - - @0xsequence/abi@0.38.2 - - @0xsequence/auth@0.38.2 - - @0xsequence/config@0.38.2 - - @0xsequence/network@0.38.2 - - @0xsequence/transactions@0.38.2 - - @0xsequence/utils@0.38.2 - - @0xsequence/wallet@0.38.2 - -## 0.38.1 - -### Patch Changes - -- update api and metadata rpc bindings -- Updated dependencies - - @0xsequence/abi@0.38.1 - - @0xsequence/auth@0.38.1 - - @0xsequence/config@0.38.1 - - @0xsequence/network@0.38.1 - - @0xsequence/transactions@0.38.1 - - @0xsequence/utils@0.38.1 - - @0xsequence/wallet@0.38.1 - -## 0.38.0 - -### Minor Changes - -- api: update bindings, change TokenPrice interface -- bridge: remove @0xsequence/bridge package -- api: update bindings, rename ContractCallArg to TupleComponent - -### Patch Changes - -- Updated dependencies -- Updated dependencies -- Updated dependencies - - @0xsequence/abi@0.38.0 - - @0xsequence/auth@0.38.0 - - @0xsequence/config@0.38.0 - - @0xsequence/network@0.38.0 - - @0xsequence/transactions@0.38.0 - - @0xsequence/utils@0.38.0 - - @0xsequence/wallet@0.38.0 - -## 0.37.1 - -### Patch Changes - -- Add back sortNetworks - Removing sorting was a breaking change for dapps on older versions which directly integrate sequence. -- Updated dependencies - - @0xsequence/abi@0.37.1 - - @0xsequence/auth@0.37.1 - - @0xsequence/config@0.37.1 - - @0xsequence/network@0.37.1 - - @0xsequence/transactions@0.37.1 - - @0xsequence/utils@0.37.1 - - @0xsequence/wallet@0.37.1 - -## 0.37.0 - -### Minor Changes - -- network related fixes and improvements -- api: bindings: exchange rate lookups - -### Patch Changes - -- Updated dependencies -- Updated dependencies - - @0xsequence/abi@0.37.0 - - @0xsequence/auth@0.37.0 - - @0xsequence/config@0.37.0 - - @0xsequence/network@0.37.0 - - @0xsequence/transactions@0.37.0 - - @0xsequence/utils@0.37.0 - - @0xsequence/wallet@0.37.0 - -## 0.36.13 - -### Patch Changes - -- api: update bindings with new price endpoints -- Updated dependencies - - @0xsequence/abi@0.36.13 - - @0xsequence/auth@0.36.13 - - @0xsequence/config@0.36.13 - - @0xsequence/network@0.36.13 - - @0xsequence/transactions@0.36.13 - - @0xsequence/utils@0.36.13 - - @0xsequence/wallet@0.36.13 - -## 0.36.12 - -### Patch Changes - -- wallet: skip remote signers if not needed -- auth: check that signature meets threshold before requesting auth token -- Updated dependencies -- Updated dependencies - - @0xsequence/abi@0.36.12 - - @0xsequence/auth@0.36.12 - - @0xsequence/config@0.36.12 - - @0xsequence/network@0.36.12 - - @0xsequence/transactions@0.36.12 - - @0xsequence/utils@0.36.12 - - @0xsequence/wallet@0.36.12 - -## 0.36.11 - -### Patch Changes - -- Prefix EIP191 message on wallet-request-handler -- Updated dependencies - - @0xsequence/abi@0.36.11 - - @0xsequence/auth@0.36.11 - - @0xsequence/config@0.36.11 - - @0xsequence/network@0.36.11 - - @0xsequence/transactions@0.36.11 - - @0xsequence/utils@0.36.11 - - @0xsequence/wallet@0.36.11 - -## 0.36.10 - -### Patch Changes - -- support bannerUrl on connect -- Updated dependencies - - @0xsequence/abi@0.36.10 - - @0xsequence/auth@0.36.10 - - @0xsequence/config@0.36.10 - - @0xsequence/network@0.36.10 - - @0xsequence/transactions@0.36.10 - - @0xsequence/utils@0.36.10 - - @0xsequence/wallet@0.36.10 - -## 0.36.9 - -### Patch Changes - -- minor dev xp improvements -- Updated dependencies - - @0xsequence/abi@0.36.9 - - @0xsequence/auth@0.36.9 - - @0xsequence/config@0.36.9 - - @0xsequence/network@0.36.9 - - @0xsequence/transactions@0.36.9 - - @0xsequence/utils@0.36.9 - - @0xsequence/wallet@0.36.9 - -## 0.36.8 - -### Patch Changes - -- more connect options (theme, payment providers, funding currencies) -- Updated dependencies - - @0xsequence/abi@0.36.8 - - @0xsequence/auth@0.36.8 - - @0xsequence/config@0.36.8 - - @0xsequence/network@0.36.8 - - @0xsequence/transactions@0.36.8 - - @0xsequence/utils@0.36.8 - - @0xsequence/wallet@0.36.8 - -## 0.36.7 - -### Patch Changes - -- fix missing break -- Updated dependencies - - @0xsequence/abi@0.36.7 - - @0xsequence/auth@0.36.7 - - @0xsequence/config@0.36.7 - - @0xsequence/network@0.36.7 - - @0xsequence/transactions@0.36.7 - - @0xsequence/utils@0.36.7 - - @0xsequence/wallet@0.36.7 - -## 0.36.6 - -### Patch Changes - -- wallet_switchEthereumChain support -- Updated dependencies - - @0xsequence/abi@0.36.6 - - @0xsequence/auth@0.36.6 - - @0xsequence/config@0.36.6 - - @0xsequence/network@0.36.6 - - @0xsequence/transactions@0.36.6 - - @0xsequence/utils@0.36.6 - - @0xsequence/wallet@0.36.6 - -## 0.36.5 - -### Patch Changes - -- auth: bump ethauth to 0.7.0 - network, wallet: don't assume position of auth network in list - api/indexer/metadata: trim trailing slash on hostname, and add endpoint urls - relayer: Allow to specify local relayer transaction parameters like gas price or gas limit -- Updated dependencies - - @0xsequence/abi@0.36.5 - - @0xsequence/auth@0.36.5 - - @0xsequence/config@0.36.5 - - @0xsequence/network@0.36.5 - - @0xsequence/transactions@0.36.5 - - @0xsequence/utils@0.36.5 - - @0xsequence/wallet@0.36.5 - -## 0.36.4 - -### Patch Changes - -- Updating list of chain ids to include other ethereum compatible chains -- Updated dependencies - - @0xsequence/abi@0.36.4 - - @0xsequence/auth@0.36.4 - - @0xsequence/config@0.36.4 - - @0xsequence/network@0.36.4 - - @0xsequence/transactions@0.36.4 - - @0xsequence/utils@0.36.4 - - @0xsequence/wallet@0.36.4 - -## 0.36.3 - -### Patch Changes - -- provider: pass connect options to prompter methods -- Updated dependencies - - @0xsequence/abi@0.36.3 - - @0xsequence/auth@0.36.3 - - @0xsequence/config@0.36.3 - - @0xsequence/network@0.36.3 - - @0xsequence/transactions@0.36.3 - - @0xsequence/utils@0.36.3 - - @0xsequence/wallet@0.36.3 - -## 0.36.2 - -### Patch Changes - -- transactions: Setting target to 0x0 when empty to during SequenceTxAbiEncode -- Updated dependencies - - @0xsequence/abi@0.36.2 - - @0xsequence/auth@0.36.2 - - @0xsequence/config@0.36.2 - - @0xsequence/network@0.36.2 - - @0xsequence/transactions@0.36.2 - - @0xsequence/utils@0.36.2 - - @0xsequence/wallet@0.36.2 - -## 0.36.1 - -### Patch Changes - -- metadata: update client with more fields -- Updated dependencies - - @0xsequence/abi@0.36.1 - - @0xsequence/auth@0.36.1 - - @0xsequence/config@0.36.1 - - @0xsequence/network@0.36.1 - - @0xsequence/transactions@0.36.1 - - @0xsequence/utils@0.36.1 - - @0xsequence/wallet@0.36.1 - -## 0.36.0 - -### Minor Changes - -- relayer, wallet: fee quote support - -### Patch Changes - -- Updated dependencies - - @0xsequence/abi@0.36.0 - - @0xsequence/auth@0.36.0 - - @0xsequence/config@0.36.0 - - @0xsequence/network@0.36.0 - - @0xsequence/transactions@0.36.0 - - @0xsequence/utils@0.36.0 - - @0xsequence/wallet@0.36.0 - -## 0.35.12 - -### Patch Changes - -- provider: rename wallet.commands to wallet.utils -- Updated dependencies - - @0xsequence/abi@0.35.12 - - @0xsequence/auth@0.35.12 - - @0xsequence/config@0.35.12 - - @0xsequence/network@0.35.12 - - @0xsequence/transactions@0.35.12 - - @0xsequence/utils@0.35.12 - - @0xsequence/wallet@0.35.12 - -## 0.35.11 - -### Patch Changes - -- provider/utils: smoother message validation -- Updated dependencies - - @0xsequence/abi@0.35.11 - - @0xsequence/auth@0.35.11 - - @0xsequence/config@0.35.11 - - @0xsequence/network@0.35.11 - - @0xsequence/transactions@0.35.11 - - @0xsequence/utils@0.35.11 - - @0xsequence/wallet@0.35.11 - -## 0.35.10 - -### Patch Changes - -- upgrade deps -- Updated dependencies - - @0xsequence/abi@0.35.10 - - @0xsequence/auth@0.35.10 - - @0xsequence/config@0.35.10 - - @0xsequence/network@0.35.10 - - @0xsequence/transactions@0.35.10 - - @0xsequence/utils@0.35.10 - - @0xsequence/wallet@0.35.10 - -## 0.35.9 - -### Patch Changes - -- provider: window-transport override event handlers with new wallet instance -- Updated dependencies - - @0xsequence/abi@0.35.9 - - @0xsequence/auth@0.35.9 - - @0xsequence/config@0.35.9 - - @0xsequence/network@0.35.9 - - @0xsequence/transactions@0.35.9 - - @0xsequence/utils@0.35.9 - - @0xsequence/wallet@0.35.9 - -## 0.35.8 - -### Patch Changes - -- provider: async wallet sign in improvements -- Updated dependencies - - @0xsequence/abi@0.35.8 - - @0xsequence/auth@0.35.8 - - @0xsequence/config@0.35.8 - - @0xsequence/network@0.35.8 - - @0xsequence/transactions@0.35.8 - - @0xsequence/utils@0.35.8 - - @0xsequence/wallet@0.35.8 - -## 0.35.7 - -### Patch Changes - -- config: cache wallet configs -- Updated dependencies - - @0xsequence/abi@0.35.7 - - @0xsequence/auth@0.35.7 - - @0xsequence/config@0.35.7 - - @0xsequence/network@0.35.7 - - @0xsequence/transactions@0.35.7 - - @0xsequence/utils@0.35.7 - - @0xsequence/wallet@0.35.7 - -## 0.35.6 - -### Patch Changes - -- provider: support async signin of wallet request handler -- Updated dependencies - - @0xsequence/abi@0.35.6 - - @0xsequence/auth@0.35.6 - - @0xsequence/config@0.35.6 - - @0xsequence/network@0.35.6 - - @0xsequence/transactions@0.35.6 - - @0xsequence/utils@0.35.6 - - @0xsequence/wallet@0.35.6 - -## 0.35.5 - -### Patch Changes - -- wallet: skip threshold check during fee estimation -- Updated dependencies - - @0xsequence/abi@0.35.5 - - @0xsequence/auth@0.35.5 - - @0xsequence/config@0.35.5 - - @0xsequence/network@0.35.5 - - @0xsequence/transactions@0.35.5 - - @0xsequence/utils@0.35.5 - - @0xsequence/wallet@0.35.5 - -## 0.35.4 - -### Patch Changes - -- - browser extension mode, center window -- Updated dependencies - - @0xsequence/abi@0.35.4 - - @0xsequence/auth@0.35.4 - - @0xsequence/config@0.35.4 - - @0xsequence/network@0.35.4 - - @0xsequence/transactions@0.35.4 - - @0xsequence/utils@0.35.4 - - @0xsequence/wallet@0.35.4 - -## 0.35.3 - -### Patch Changes - -- - update window position when in browser extension mode -- Updated dependencies - - @0xsequence/abi@0.35.3 - - @0xsequence/auth@0.35.3 - - @0xsequence/config@0.35.3 - - @0xsequence/network@0.35.3 - - @0xsequence/transactions@0.35.3 - - @0xsequence/utils@0.35.3 - - @0xsequence/wallet@0.35.3 - -## 0.35.2 - -### Patch Changes - -- - provider: WindowMessageHandler accept optional windowHref -- Updated dependencies - - @0xsequence/abi@0.35.2 - - @0xsequence/auth@0.35.2 - - @0xsequence/config@0.35.2 - - @0xsequence/network@0.35.2 - - @0xsequence/transactions@0.35.2 - - @0xsequence/utils@0.35.2 - - @0xsequence/wallet@0.35.2 - -## 0.35.1 - -### Patch Changes - -- wallet: update config on undeployed too -- Updated dependencies - - @0xsequence/abi@0.35.1 - - @0xsequence/auth@0.35.1 - - @0xsequence/config@0.35.1 - - @0xsequence/network@0.35.1 - - @0xsequence/transactions@0.35.1 - - @0xsequence/utils@0.35.1 - - @0xsequence/wallet@0.35.1 - -## 0.35.0 - -### Minor Changes - -- - config: add buildStubSignature - - provider: add checks to signing cases for wallet deployment and config statuses - - provider: add prompt for wallet deployment - - relayer: add BaseRelayer.prependWalletDeploy - - relayer: add Relayer.feeOptions - - relayer: account for wallet deployment in fee estimation - - transactions: add fromTransactionish - - wallet: add Account.prependConfigUpdate - - wallet: add Account.getFeeOptions - -### Patch Changes - -- Updated dependencies - - @0xsequence/abi@0.35.0 - - @0xsequence/auth@0.35.0 - - @0xsequence/config@0.35.0 - - @0xsequence/network@0.35.0 - - @0xsequence/transactions@0.35.0 - - @0xsequence/utils@0.35.0 - - @0xsequence/wallet@0.35.0 - -## 0.34.1 - -### Patch Changes - -- Updated dependencies - - @0xsequence/auth@0.34.1 - -## 0.34.0 - -### Minor Changes - -- - upgrade deps - -### Patch Changes - -- Updated dependencies - - @0xsequence/abi@0.34.0 - - @0xsequence/auth@0.34.0 - - @0xsequence/config@0.34.0 - - @0xsequence/network@0.34.0 - - @0xsequence/transactions@0.34.0 - - @0xsequence/utils@0.34.0 - - @0xsequence/wallet@0.34.0 - -## 0.33.3 - -### Patch Changes - -- Updated dependencies - - @0xsequence/wallet@0.33.3 - - @0xsequence/auth@0.33.3 - -## 0.33.2 - -### Patch Changes - -- Updated dependencies - - @0xsequence/transactions@0.33.2 - - @0xsequence/wallet@0.33.2 - - @0xsequence/auth@0.33.2 - -## 0.33.1 - -### Patch Changes - -- @0xsequence/auth@0.33.1 - -## 0.33.0 - -### Patch Changes - -- Updated dependencies - - @0xsequence/auth@0.33.0 - -## 0.31.3 - -### Patch Changes - -- @0xsequence/auth@0.31.3 - -## 0.31.1 - -### Patch Changes - -- @0xsequence/wallet@0.31.1 -- @0xsequence/auth@0.31.1 - -## 0.31.0 - -### Minor Changes - -- - upgrading to ethers v5.5 - -### Patch Changes - -- Updated dependencies - - @0xsequence/abi@0.31.0 - - @0xsequence/auth@0.31.0 - - @0xsequence/config@0.31.0 - - @0xsequence/network@0.31.0 - - @0xsequence/transactions@0.31.0 - - @0xsequence/utils@0.31.0 - - @0xsequence/wallet@0.31.0 - -## 0.30.0 - -### Minor Changes - -- - upgrade most deps - -### Patch Changes - -- Updated dependencies - - @0xsequence/abi@0.30.0 - - @0xsequence/auth@0.30.0 - - @0xsequence/config@0.30.0 - - @0xsequence/network@0.30.0 - - @0xsequence/transactions@0.30.0 - - @0xsequence/utils@0.30.0 - - @0xsequence/wallet@0.30.0 - -## 0.29.9 - -### Patch Changes - -- @0xsequence/auth@0.29.9 - -## 0.29.8 - -### Patch Changes - -- update api -- Updated dependencies [undefined] - - @0xsequence/abi@0.29.8 - - @0xsequence/auth@0.29.8 - - @0xsequence/config@0.29.8 - - @0xsequence/network@0.29.8 - - @0xsequence/transactions@0.29.8 - - @0xsequence/utils@0.29.8 - - @0xsequence/wallet@0.29.8 - -## 0.29.7 - -### Patch Changes - -- Updated dependencies [undefined] - - @0xsequence/wallet@0.29.7 - - @0xsequence/auth@0.29.7 - -## 0.29.6 - -### Patch Changes - -- Updated dependencies [undefined] - - @0xsequence/network@0.29.6 - - @0xsequence/auth@0.29.6 - - @0xsequence/config@0.29.6 - - @0xsequence/transactions@0.29.6 - - @0xsequence/wallet@0.29.6 - -## 0.29.5 - -### Patch Changes - -- Updated dependencies [undefined] - - @0xsequence/auth@0.29.5 - - @0xsequence/config@0.29.5 - - @0xsequence/wallet@0.29.5 - -## 0.29.4 - -### Patch Changes - -- @0xsequence/auth@0.29.4 - -## 0.29.3 - -### Patch Changes - -- @0xsequence/auth@0.29.3 - -## 0.29.2 - -### Patch Changes - -- @0xsequence/wallet@0.29.2 -- @0xsequence/auth@0.29.2 - -## 0.29.1 - -### Patch Changes - -- @0xsequence/auth@0.29.1 - -## 0.29.0 - -### Minor Changes - -- major architectural changes in Sequence design - - - only one API instance, API is no longer a per-chain service - - separate per-chain indexer service, API no longer handles indexing - - single contract metadata service, API no longer serves metadata - - chaind package has been removed, indexer and metadata packages have been added - - stronger typing with new explicit ChainId type - - multicall fixes and improvements - - forbid "wait" transactions in sendTransactionBatch calls - -### Patch Changes - -- Updated dependencies [undefined] - - @0xsequence/auth@0.29.0 - - @0xsequence/config@0.29.0 - - @0xsequence/network@0.29.0 - - @0xsequence/transactions@0.29.0 - - @0xsequence/abi@0.29.0 - - @0xsequence/utils@0.29.0 - - @0xsequence/wallet@0.29.0 - -## 0.28.0 - -### Minor Changes - -- extension provider - -### Patch Changes - -- Updated dependencies [undefined] - - @0xsequence/abi@0.28.0 - - @0xsequence/auth@0.28.0 - - @0xsequence/config@0.28.0 - - @0xsequence/network@0.28.0 - - @0xsequence/transactions@0.28.0 - - @0xsequence/utils@0.28.0 - - @0xsequence/wallet@0.28.0 - -## 0.27.2 - -### Patch Changes - -- Updated dependencies [undefined] - - @0xsequence/wallet@0.27.2 - - @0xsequence/auth@0.27.2 - -## 0.27.1 - -### Patch Changes - -- @0xsequence/wallet@0.27.1 -- @0xsequence/auth@0.27.1 - -## 0.27.0 - -### Minor Changes - -- Add requireFreshSigner lib to sessions - -### Patch Changes - -- Updated dependencies [undefined] - - @0xsequence/abi@0.27.0 - - @0xsequence/auth@0.27.0 - - @0xsequence/config@0.27.0 - - @0xsequence/network@0.27.0 - - @0xsequence/transactions@0.27.0 - - @0xsequence/utils@0.27.0 - - @0xsequence/wallet@0.27.0 - -## 0.26.0 - -### Minor Changes - -- update relayer client bindings - provide the wallet's address for calls to SendMetaTxn - modify the semantics of Relayer.getNonce() to allow relayers to select nonce spaces for clients - -### Patch Changes - -- Updated dependencies [undefined] - - @0xsequence/wallet@0.26.0 - - @0xsequence/auth@0.26.0 - -## 0.25.1 - -### Patch Changes - -- Fix build typescrypt issue -- Updated dependencies [undefined] - - @0xsequence/abi@0.25.1 - - @0xsequence/auth@0.25.1 - - @0xsequence/config@0.25.1 - - @0xsequence/network@0.25.1 - - @0xsequence/transactions@0.25.1 - - @0xsequence/utils@0.25.1 - - @0xsequence/wallet@0.25.1 - -## 0.25.0 - -### Minor Changes - -- 10c8af8: Add estimator package - Fix multicall few calls bug - -### Patch Changes - -- Updated dependencies [10c8af8] - - @0xsequence/abi@0.25.0 - - @0xsequence/auth@0.25.0 - - @0xsequence/config@0.25.0 - - @0xsequence/network@0.25.0 - - @0xsequence/transactions@0.25.0 - - @0xsequence/utils@0.25.0 - - @0xsequence/wallet@0.25.0 - -## 0.24.1 - -### Patch Changes - -- @0xsequence/wallet@0.24.1 -- @0xsequence/auth@0.24.1 - -## 0.24.0 - -### Patch Changes - -- @0xsequence/auth@0.24.0 -- @0xsequence/wallet@0.24.0 - -## 0.23.0 - -### Minor Changes - -- - relayer: offer variety of gas fee options from the relayer service" - -### Patch Changes - -- Updated dependencies [undefined] - - @0xsequence/abi@0.23.0 - - @0xsequence/auth@0.23.0 - - @0xsequence/config@0.23.0 - - @0xsequence/network@0.23.0 - - @0xsequence/transactions@0.23.0 - - @0xsequence/utils@0.23.0 - - @0xsequence/wallet@0.23.0 - -## 0.22.2 - -### Patch Changes - -- e1c109e: Fix authProof on expired sessions -- Updated dependencies [e1c109e] - - @0xsequence/auth@0.22.2 - - @0xsequence/abi@0.22.2 - - @0xsequence/config@0.22.2 - - @0xsequence/network@0.22.2 - - @0xsequence/transactions@0.22.2 - - @0xsequence/utils@0.22.2 - - @0xsequence/wallet@0.22.2 - -## 0.22.1 - -### Patch Changes - -- transport session cache -- Updated dependencies [undefined] - - @0xsequence/abi@0.22.1 - - @0xsequence/auth@0.22.1 - - @0xsequence/config@0.22.1 - - @0xsequence/network@0.22.1 - - @0xsequence/transactions@0.22.1 - - @0xsequence/utils@0.22.1 - - @0xsequence/wallet@0.22.1 - -## 0.22.0 - -### Minor Changes - -- e667b65: Expose all relayer options on networks - -### Patch Changes - -- Updated dependencies [e667b65] - - @0xsequence/abi@0.22.0 - - @0xsequence/network@0.22.0 - - @0xsequence/utils@0.22.0 - - @0xsequence/wallet@0.22.0 - - @0xsequence/auth@0.22.0 - - @0xsequence/config@0.22.0 - - @0xsequence/transactions@0.22.0 - -## 0.21.5 - -### Patch Changes - -- Give priority to metaTxnId returned by relayer -- Updated dependencies [undefined] - - @0xsequence/abi@0.21.5 - - @0xsequence/auth@0.21.5 - - @0xsequence/config@0.21.5 - - @0xsequence/network@0.21.5 - - @0xsequence/transactions@0.21.5 - - @0xsequence/utils@0.21.5 - - @0xsequence/wallet@0.21.5 - -## 0.21.4 - -### Patch Changes - -- Add has enough signers method -- Updated dependencies [undefined] - - @0xsequence/abi@0.21.4 - - @0xsequence/auth@0.21.4 - - @0xsequence/config@0.21.4 - - @0xsequence/network@0.21.4 - - @0xsequence/transactions@0.21.4 - - @0xsequence/utils@0.21.4 - - @0xsequence/wallet@0.21.4 - -## 0.21.3 - -### Patch Changes - -- add window session cache -- Updated dependencies [undefined] - - @0xsequence/abi@0.21.3 - - @0xsequence/auth@0.21.3 - - @0xsequence/config@0.21.3 - - @0xsequence/network@0.21.3 - - @0xsequence/transactions@0.21.3 - - @0xsequence/utils@0.21.3 - - @0xsequence/wallet@0.21.3 - -## 0.21.2 - -### Patch Changes - -- exception handlind in relayer -- Updated dependencies [undefined] - - @0xsequence/abi@0.21.2 - - @0xsequence/auth@0.21.2 - - @0xsequence/config@0.21.2 - - @0xsequence/network@0.21.2 - - @0xsequence/transactions@0.21.2 - - @0xsequence/utils@0.21.2 - - @0xsequence/wallet@0.21.2 - -## 0.21.1 - -### Patch Changes - -- Updated dependencies [undefined] - - @0xsequence/wallet@0.21.1 - - @0xsequence/auth@0.21.1 - -## 0.21.0 - -### Minor Changes - -- - fix gas estimation on wallets with large number of signers - - update to session handling and wallet config construction upon auth - -### Patch Changes - -- Updated dependencies [undefined] - - @0xsequence/abi@0.21.0 - - @0xsequence/auth@0.21.0 - - @0xsequence/config@0.21.0 - - @0xsequence/network@0.21.0 - - @0xsequence/transactions@0.21.0 - - @0xsequence/utils@0.21.0 - - @0xsequence/wallet@0.21.0 - -## 0.20.0 - -### Patch Changes - -- Updated dependencies [undefined] - - @0xsequence/auth@0.20.0 - -## 0.19.3 - -### Patch Changes - -- jwtAuth visibility, package version sync -- Updated dependencies [undefined] - - @0xsequence/abi@0.19.3 - - @0xsequence/auth@0.19.3 - - @0xsequence/config@0.19.3 - - @0xsequence/network@0.19.3 - - @0xsequence/transactions@0.19.3 - - @0xsequence/utils@0.19.3 - - @0xsequence/wallet@0.19.3 - -## 0.19.2 - -### Patch Changes - -- Updated dependencies [undefined] - - @0xsequence/abi@0.19.2 - - @0xsequence/auth@0.19.2 - - @0xsequence/config@0.19.2 - - @0xsequence/transactions@0.19.2 - - @0xsequence/wallet@0.19.2 - -## 0.19.1 - -### Patch Changes - -- add open intent in history state - -## 0.19.0 - -### Minor Changes - -- - provider, improve dapp / wallet transport io - -### Patch Changes - -- Updated dependencies [undefined] - - @0xsequence/abi@0.19.0 - - @0xsequence/auth@0.19.0 - - @0xsequence/config@0.19.0 - - @0xsequence/network@0.19.0 - - @0xsequence/transactions@0.19.0 - - @0xsequence/utils@0.19.0 - - @0xsequence/wallet@0.19.0 - -## 0.18.0 - -### Minor Changes - -- relayer improvements and pending transaction handling - -### Patch Changes - -- Updated dependencies [undefined] - - @0xsequence/abi@0.18.0 - - @0xsequence/auth@0.18.0 - - @0xsequence/config@0.18.0 - - @0xsequence/network@0.18.0 - - @0xsequence/transactions@0.18.0 - - @0xsequence/utils@0.18.0 - - @0xsequence/wallet@0.18.0 - -## 0.17.0 - -### Patch Changes - -- Updated dependencies [undefined] - - @0xsequence/auth@0.17.0 - -## 0.16.1 - -### Patch Changes - -- @0xsequence/auth@0.16.1 - -## 0.16.0 - -### Minor Changes - -- relayer as its own service separate from chaind - -### Patch Changes - -- Updated dependencies [undefined] - - @0xsequence/abi@0.16.0 - - @0xsequence/auth@0.16.0 - - @0xsequence/config@0.16.0 - - @0xsequence/network@0.16.0 - - @0xsequence/transactions@0.16.0 - - @0xsequence/utils@0.16.0 - - @0xsequence/wallet@0.16.0 - -## 0.15.1 - -### Patch Changes - -- update api clients -- Updated dependencies [undefined] - - @0xsequence/abi@0.15.1 - - @0xsequence/auth@0.15.1 - - @0xsequence/config@0.15.1 - - @0xsequence/network@0.15.1 - - @0xsequence/transactions@0.15.1 - - @0xsequence/utils@0.15.1 - - @0xsequence/wallet@0.15.1 - -## 0.15.0 - -### Patch Changes - -- @0xsequence/wallet@0.15.0 -- @0xsequence/auth@0.15.0 -- @0xsequence/transactions@0.15.0 - -## 0.14.3 - -### Patch Changes - -- Fix 0xSequence relayer dependencies -- Updated dependencies [undefined] - - @0xsequence/abi@0.14.3 - - @0xsequence/auth@0.14.3 - - @0xsequence/config@0.14.3 - - @0xsequence/network@0.14.3 - - @0xsequence/transactions@0.14.3 - - @0xsequence/utils@0.14.3 - - @0xsequence/wallet@0.14.3 - -## 0.14.2 - -### Patch Changes - -- Add debug logs to rpc-relayer -- Updated dependencies [undefined] - - @0xsequence/abi@0.14.2 - - @0xsequence/auth@0.14.2 - - @0xsequence/config@0.14.2 - - @0xsequence/network@0.14.2 - - @0xsequence/transactions@0.14.2 - - @0xsequence/utils@0.14.2 - - @0xsequence/wallet@0.14.2 - -## 0.14.0 - -### Minor Changes - -- update sequence utils finder which includes optimization - -### Patch Changes - -- Updated dependencies [undefined] - - @0xsequence/abi@0.14.0 - - @0xsequence/auth@0.14.0 - - @0xsequence/config@0.14.0 - - @0xsequence/network@0.14.0 - - @0xsequence/transactions@0.14.0 - - @0xsequence/utils@0.14.0 - - @0xsequence/wallet@0.14.0 - -## 0.13.0 - -### Minor Changes - -- Update SequenceUtils deployed contract - -### Patch Changes - -- Updated dependencies [undefined] - - @0xsequence/abi@0.13.0 - - @0xsequence/auth@0.13.0 - - @0xsequence/config@0.13.0 - - @0xsequence/network@0.13.0 - - @0xsequence/transactions@0.13.0 - - @0xsequence/utils@0.13.0 - - @0xsequence/wallet@0.13.0 - -## 0.12.4 - -### Patch Changes - -- provider: set timeout to open wallet to 30s - -## 0.12.3 - -### Patch Changes - -- provider: proxy message event support - -## 0.12.2 - -### Patch Changes - -- proxy transport improvements - -## 0.12.1 - -### Patch Changes - -- npm bump -- Updated dependencies [undefined] - - @0xsequence/abi@0.12.1 - - @0xsequence/auth@0.12.1 - - @0xsequence/config@0.12.1 - - @0xsequence/network@0.12.1 - - @0xsequence/transactions@0.12.1 - - @0xsequence/utils@0.12.1 - - @0xsequence/wallet@0.12.1 - -## 0.12.0 - -### Minor Changes - -- provider: improvements to window transport - -### Patch Changes - -- Updated dependencies [undefined] - - @0xsequence/abi@0.12.0 - - @0xsequence/auth@0.12.0 - - @0xsequence/config@0.12.0 - - @0xsequence/network@0.12.0 - - @0xsequence/transactions@0.12.0 - - @0xsequence/utils@0.12.0 - - @0xsequence/wallet@0.12.0 - -## 0.11.4 - -### Patch Changes - -- update api client -- Updated dependencies [undefined] - - @0xsequence/abi@0.11.4 - - @0xsequence/auth@0.11.4 - - @0xsequence/config@0.11.4 - - @0xsequence/network@0.11.4 - - @0xsequence/transactions@0.11.4 - - @0xsequence/utils@0.11.4 - - @0xsequence/wallet@0.11.4 - -## 0.11.3 - -### Patch Changes - -- improve openWindow state options handling -- Updated dependencies [undefined] - - @0xsequence/abi@0.11.3 - - @0xsequence/auth@0.11.3 - - @0xsequence/config@0.11.3 - - @0xsequence/network@0.11.3 - - @0xsequence/transactions@0.11.3 - - @0xsequence/utils@0.11.3 - - @0xsequence/wallet@0.11.3 - -## 0.11.2 - -### Patch Changes - -- Fix multicall proxy scopes -- Updated dependencies [undefined] - - @0xsequence/abi@0.11.2 - - @0xsequence/auth@0.11.2 - - @0xsequence/config@0.11.2 - - @0xsequence/network@0.11.2 - - @0xsequence/transactions@0.11.2 - - @0xsequence/utils@0.11.2 - - @0xsequence/wallet@0.11.2 - -## 0.11.1 - -### Patch Changes - -- Add support for dynamic and nested signatures -- Updated dependencies [undefined] - - @0xsequence/abi@0.11.1 - - @0xsequence/auth@0.11.1 - - @0xsequence/config@0.11.1 - - @0xsequence/network@0.11.1 - - @0xsequence/transactions@0.11.1 - - @0xsequence/utils@0.11.1 - - @0xsequence/wallet@0.11.1 - -## 0.11.0 - -### Minor Changes - -- Update wallet context to 1.7 contracts - -### Patch Changes - -- Updated dependencies [undefined] - - @0xsequence/abi@0.11.0 - - @0xsequence/auth@0.11.0 - - @0xsequence/config@0.11.0 - - @0xsequence/network@0.11.0 - - @0xsequence/transactions@0.11.0 - - @0xsequence/utils@0.11.0 - - @0xsequence/wallet@0.11.0 - -## 0.10.9 - -### Patch Changes - -- add support for public addresses as signers in session.open -- Updated dependencies [undefined] - - @0xsequence/abi@0.10.9 - - @0xsequence/auth@0.10.9 - - @0xsequence/config@0.10.9 - - @0xsequence/network@0.10.9 - - @0xsequence/transactions@0.10.9 - - @0xsequence/utils@0.10.9 - - @0xsequence/wallet@0.10.9 - -## 0.10.8 - -### Patch Changes - -- Multicall production configuration -- Updated dependencies [undefined] - - @0xsequence/abi@0.10.8 - - @0xsequence/auth@0.10.8 - - @0xsequence/config@0.10.8 - - @0xsequence/network@0.10.8 - - @0xsequence/transactions@0.10.8 - - @0xsequence/utils@0.10.8 - - @0xsequence/wallet@0.10.8 - -## 0.10.7 - -### Patch Changes - -- allow provider transport to force disconnect -- Updated dependencies [undefined] - - @0xsequence/abi@0.10.7 - - @0xsequence/auth@0.10.7 - - @0xsequence/config@0.10.7 - - @0xsequence/network@0.10.7 - - @0xsequence/transactions@0.10.7 - - @0xsequence/utils@0.10.7 - - @0xsequence/wallet@0.10.7 - -## 0.10.6 - -### Patch Changes - -- - fix getWalletState method -- Updated dependencies [undefined] - - @0xsequence/abi@0.10.6 - - @0xsequence/auth@0.10.6 - - @0xsequence/config@0.10.6 - - @0xsequence/network@0.10.6 - - @0xsequence/transactions@0.10.6 - - @0xsequence/utils@0.10.6 - - @0xsequence/wallet@0.10.6 - -## 0.10.5 - -### Patch Changes - -- update relayer gas refund options -- Updated dependencies [undefined] - - @0xsequence/abi@0.10.5 - - @0xsequence/auth@0.10.5 - - @0xsequence/config@0.10.5 - - @0xsequence/network@0.10.5 - - @0xsequence/transactions@0.10.5 - - @0xsequence/utils@0.10.5 - - @0xsequence/wallet@0.10.5 - -## 0.10.4 - -### Patch Changes - -- Update api proto -- Updated dependencies [undefined] - - @0xsequence/abi@0.10.4 - - @0xsequence/auth@0.10.4 - - @0xsequence/config@0.10.4 - - @0xsequence/network@0.10.4 - - @0xsequence/transactions@0.10.4 - - @0xsequence/utils@0.10.4 - - @0xsequence/wallet@0.10.4 - -## 0.10.3 - -### Patch Changes - -- Fix loading config cross-chain -- Updated dependencies [undefined] - - @0xsequence/abi@0.10.3 - - @0xsequence/auth@0.10.3 - - @0xsequence/config@0.10.3 - - @0xsequence/network@0.10.3 - - @0xsequence/transactions@0.10.3 - - @0xsequence/utils@0.10.3 - - @0xsequence/wallet@0.10.3 - -## 0.10.2 - -### Patch Changes - -- - message digest fix -- Updated dependencies [undefined] - - @0xsequence/abi@0.10.2 - - @0xsequence/auth@0.10.2 - - @0xsequence/config@0.10.2 - - @0xsequence/network@0.10.2 - - @0xsequence/transactions@0.10.2 - - @0xsequence/utils@0.10.2 - - @0xsequence/wallet@0.10.2 - -## 0.10.1 - -### Patch Changes - -- upgrade deps -- Updated dependencies [undefined] - - @0xsequence/abi@0.10.1 - - @0xsequence/auth@0.10.1 - - @0xsequence/config@0.10.1 - - @0xsequence/network@0.10.1 - - @0xsequence/transactions@0.10.1 - - @0xsequence/utils@0.10.1 - - @0xsequence/wallet@0.10.1 - -## 0.10.0 - -### Minor Changes - -- Deployed new contracts with ERC1271 signer support - -### Patch Changes - -- Updated dependencies [undefined] - - @0xsequence/abi@0.10.0 - - @0xsequence/auth@0.10.0 - - @0xsequence/config@0.10.0 - - @0xsequence/network@0.10.0 - - @0xsequence/transactions@0.10.0 - - @0xsequence/utils@0.10.0 - - @0xsequence/wallet@0.10.0 - -## 0.9.6 - -### Patch Changes - -- Update ABIs for latest sequence contracts -- Updated dependencies [undefined] - - @0xsequence/auth@0.9.6 - - @0xsequence/config@0.9.6 - - @0xsequence/network@0.9.6 - - @0xsequence/transactions@0.9.6 - - @0xsequence/utils@0.9.6 - - @0xsequence/wallet@0.9.6 - - @0xsequence/abi@0.9.6 - -## 0.9.5 - -### Patch Changes - -- Implemented session class -- Updated dependencies [undefined] - - @0xsequence/auth@0.9.5 - - @0xsequence/config@0.9.5 - - @0xsequence/network@0.9.5 - - @0xsequence/transactions@0.9.5 - - @0xsequence/utils@0.9.5 - - @0xsequence/wallet@0.9.5 - -## 0.9.4 - -### Patch Changes - -- - session improvements - -## 0.9.3 - -### Patch Changes - -- - minor improvements -- Updated dependencies [undefined] - - @0xsequence/abi@0.9.3 - - @0xsequence/auth@0.9.3 - - @0xsequence/config@0.9.3 - - @0xsequence/network@0.9.3 - - @0xsequence/transactions@0.9.3 - - @0xsequence/utils@0.9.3 - - @0xsequence/wallet@0.9.3 - -## 0.9.1 - -### Patch Changes - -- - patch bump -- Updated dependencies [undefined] - - @0xsequence/abi@0.9.1 - - @0xsequence/auth@0.9.1 - - @0xsequence/config@0.9.1 - - @0xsequence/network@0.9.1 - - @0xsequence/transactions@0.9.1 - - @0xsequence/utils@0.9.1 - - @0xsequence/wallet@0.9.1 - -## 0.9.0 - -### Minor Changes - -- - provider transport hardening - -### Patch Changes - -- Updated dependencies [undefined] - - @0xsequence/abi@0.9.0 - - @0xsequence/auth@0.9.0 - - @0xsequence/config@0.9.0 - - @0xsequence/network@0.9.0 - - @0xsequence/transactions@0.9.0 - - @0xsequence/utils@0.9.0 - - @0xsequence/wallet@0.9.0 - -## 0.8.5 - -### Patch Changes - -- - use latest wallet-contracts -- Updated dependencies [undefined] - - @0xsequence/abi@0.8.5 - - @0xsequence/auth@0.8.5 - - @0xsequence/config@0.8.5 - - @0xsequence/network@0.8.5 - - @0xsequence/transactions@0.8.5 - - @0xsequence/utils@0.8.5 - - @0xsequence/wallet@0.8.5 - -## 0.8.4 - -### Patch Changes - -- - minor improvements, name updates and comments -- Updated dependencies [undefined] - - @0xsequence/abi@0.8.4 - - @0xsequence/auth@0.8.4 - - @0xsequence/config@0.8.4 - - @0xsequence/network@0.8.4 - - @0xsequence/transactions@0.8.4 - - @0xsequence/utils@0.8.4 - - @0xsequence/wallet@0.8.4 - -## 0.8.3 - -### Patch Changes - -- - refinements - - - normalize signer address in config - - - provider: getWalletState() method to WalletProvider - -- Updated dependencies [undefined] - - @0xsequence/abi@0.8.3 - - @0xsequence/auth@0.8.3 - - @0xsequence/config@0.8.3 - - @0xsequence/network@0.8.3 - - @0xsequence/transactions@0.8.3 - - @0xsequence/utils@0.8.3 - - @0xsequence/wallet@0.8.3 - -## 0.8.2 - -### Patch Changes - -- - field rename and ethauth dependency bump -- Updated dependencies [undefined] - - @0xsequence/abi@0.8.2 - - @0xsequence/auth@0.8.2 - - @0xsequence/config@0.8.2 - - @0xsequence/network@0.8.2 - - @0xsequence/transactions@0.8.2 - - @0xsequence/utils@0.8.2 - - @0xsequence/wallet@0.8.2 - -## 0.8.1 - -### Patch Changes - -- - variety of optimizations -- Updated dependencies [undefined] - - @0xsequence/abi@0.8.1 - - @0xsequence/auth@0.8.1 - - @0xsequence/config@0.8.1 - - @0xsequence/network@0.8.1 - - @0xsequence/transactions@0.8.1 - - @0xsequence/utils@0.8.1 - - @0xsequence/wallet@0.8.1 - -## 0.8.0 - -### Minor Changes - -- - changeset fix - -### Patch Changes - -- Updated dependencies [undefined] - - @0xsequence/abi@0.8.0 - - @0xsequence/auth@0.8.0 - - @0xsequence/network@0.8.0 - - @0xsequence/transactions@0.8.0 - - @0xsequence/utils@0.8.0 - - @0xsequence/wallet@0.8.0 - -## 0.7.1 - -### Patch Changes - -- 02377ab: Minor improvements -- Updated dependencies [02377ab] -- Updated dependencies [1fe4379] - - @0xsequence/network@0.7.1 - - @0xsequence/utils@0.7.1 - - @0xsequence/wallet@0.7.1 - -## 0.7.0 - -### Patch Changes - -- 6f11ed7: sequence.js, init release -- Updated dependencies [6f11ed7] - - @0xsequence/abi@0.7.0 - - @0xsequence/auth@0.7.0 - - @0xsequence/network@0.7.0 - - @0xsequence/transactions@0.7.0 - - @0xsequence/utils@0.7.0 - - @0xsequence/wallet@0.7.0 diff --git a/old/packages/provider/README.md b/old/packages/provider/README.md deleted file mode 100644 index 1145018ae..000000000 --- a/old/packages/provider/README.md +++ /dev/null @@ -1,4 +0,0 @@ -@0xsequence/provider -==================== - -See [0xsequence project page](https://github.com/0xsequence/sequence.js). diff --git a/old/packages/provider/hardhat1.config.cts b/old/packages/provider/hardhat1.config.cts deleted file mode 100644 index bfaf75531..000000000 --- a/old/packages/provider/hardhat1.config.cts +++ /dev/null @@ -1,18 +0,0 @@ -import { HardhatUserConfig } from 'hardhat/config' -import '@nomicfoundation/hardhat-toolbox' - -const config: HardhatUserConfig = { - solidity: '0.7.6', - - networks: { - hardhat: { - initialBaseFeePerGas: 1, - chainId: 31337, - accounts: { - mnemonic: 'ripple axis someone ridge uniform wrist prosper there frog rate olympic knee' - } - } - } -} - -export default config diff --git a/old/packages/provider/hardhat1.config.js b/old/packages/provider/hardhat1.config.js deleted file mode 100644 index e88cf69ac..000000000 --- a/old/packages/provider/hardhat1.config.js +++ /dev/null @@ -1,16 +0,0 @@ -/** - * @type import('hardhat/config').HardhatUserConfig - */ -module.exports = { - solidity: '0.7.6', - - networks: { - hardhat: { - initialBaseFeePerGas: 1, - chainId: 31337, - accounts: { - mnemonic: 'ripple axis someone ridge uniform wrist prosper there frog rate olympic knee' - }, - }, - } -} diff --git a/old/packages/provider/hardhat2.config.cts b/old/packages/provider/hardhat2.config.cts deleted file mode 100644 index 5064eac76..000000000 --- a/old/packages/provider/hardhat2.config.cts +++ /dev/null @@ -1,18 +0,0 @@ -import { HardhatUserConfig } from 'hardhat/config' -import '@nomicfoundation/hardhat-toolbox' - -const config: HardhatUserConfig = { - solidity: '0.7.6', - - networks: { - hardhat: { - initialBaseFeePerGas: 1, - chainId: 31338, - accounts: { - mnemonic: 'ripple axis someone ridge uniform wrist prosper there frog rate olympic knee' - } - } - } -} - -export default config diff --git a/old/packages/provider/hardhat2.config.js b/old/packages/provider/hardhat2.config.js deleted file mode 100644 index 981cb7ce0..000000000 --- a/old/packages/provider/hardhat2.config.js +++ /dev/null @@ -1,16 +0,0 @@ -/** - * @type import('hardhat/config').HardhatUserConfig - */ -module.exports = { - solidity: '0.7.6', - - networks: { - hardhat: { - initialBaseFeePerGas: 1, - chainId: 31338, - accounts: { - mnemonic: 'ripple axis someone ridge uniform wrist prosper there frog rate olympic knee' - }, - }, - } -} diff --git a/old/packages/provider/package.json b/old/packages/provider/package.json deleted file mode 100644 index 9a4dfde31..000000000 --- a/old/packages/provider/package.json +++ /dev/null @@ -1,48 +0,0 @@ -{ - "name": "@0xsequence/provider", - "version": "2.3.8", - "description": "provider sub-package for Sequence", - "repository": "https://github.com/0xsequence/sequence.js/tree/master/packages/provider", - "source": "src/index.ts", - "main": "dist/0xsequence-provider.cjs.js", - "module": "dist/0xsequence-provider.esm.js", - "author": "Horizon Blockchain Games", - "license": "Apache-2.0", - "scripts": { - "test": "pnpm test:concurrently 'pnpm test:run'", - "test:run": "pnpm test:file tests/**/*.spec.ts", - "test:file": "NODE_OPTIONS='--import tsx' mocha --timeout 30000", - "typecheck": "tsc --noEmit", - "test:concurrently": "concurrently -k --success first 'pnpm start:hardhat1' 'pnpm start:hardhat2'", - "start:hardhat1": "pnpm start:hardhat1:verbose > /dev/null 2>&1", - "start:hardhat2": "pnpm start:hardhat2:verbose > /dev/null 2>&1", - "start:hardhat1:verbose": "hardhat node --config hardhat1.config.js --hostname 0.0.0.0 --port 9595", - "start:hardhat2:verbose": "hardhat node --config hardhat2.config.js --hostname 0.0.0.0 --port 8595" - }, - "peerDependencies": { - "ethers": ">=6" - }, - "dependencies": { - "@0xsequence/abi": "workspace:*", - "@0xsequence/account": "workspace:*", - "@0xsequence/auth": "workspace:*", - "@0xsequence/core": "workspace:*", - "@0xsequence/migration": "workspace:*", - "@0xsequence/network": "workspace:*", - "@0xsequence/relayer": "workspace:*", - "@0xsequence/utils": "workspace:*", - "@0xsequence/wallet": "workspace:*", - "@databeat/tracker": "^0.9.3", - "eventemitter2": "^6.4.5", - "webextension-polyfill": "^0.10.0" - }, - "devDependencies": { - "@types/webextension-polyfill": "^0.10.0", - "ethers": "6.13.4", - "hardhat": "^2.22.14" - }, - "files": [ - "src", - "dist" - ] -} diff --git a/old/packages/provider/src/analytics.ts b/old/packages/provider/src/analytics.ts deleted file mode 100644 index 8578c2d22..000000000 --- a/old/packages/provider/src/analytics.ts +++ /dev/null @@ -1,47 +0,0 @@ -import { Databeat, Event as DatabeatEvent, Auth, isBrowser } from '@databeat/tracker' - -export enum AnalyticsEventType { - // Core types part of Databeat - INIT, - VIEW, - - // Provider specific - SIGN_MESSAGE_REQUEST, - SIGN_TYPED_DATA_REQUEST, - SEND_TRANSACTION_REQUEST -} - -export type AnalyticsEventTypes = keyof typeof AnalyticsEventType -export type AnalyticsEvent = DatabeatEvent - -// Analytics sub-class to add some custom helper methods -export class Analytics extends Databeat {} - -// Setup analytics tracker -export const setupAnalytics = (projectAccessKey: string, server?: string) => { - if (!server) { - server = 'https://nodes.sequence.app' - } - - // disable tracking if projectAccessKey is not set - const noop = !projectAccessKey - - // auth - const auth: Auth = {} - if (projectAccessKey) { - auth.headers = { 'X-Access-Key': projectAccessKey } - } - - return new Analytics(server, auth, { - noop: noop, - defaultEnabled: true, - privacy: { userIdHash: true, userAgentSalt: false }, - initProps: () => { - if (!isBrowser()) { - return {} - } else { - return { origin: window.location.origin } - } - } - }) -} diff --git a/old/packages/provider/src/client.ts b/old/packages/provider/src/client.ts deleted file mode 100644 index d2883ec1c..000000000 --- a/old/packages/provider/src/client.ts +++ /dev/null @@ -1,529 +0,0 @@ -import { NetworkConfig } from '@0xsequence/network' -import { - ConnectDetails, - ConnectOptions, - ItemStore, - MuxMessageProvider, - MuxTransportTemplate, - OpenWalletIntent, - OptionalChainId, - OptionalEIP6492, - ProviderTransport, - WalletEventTypes, - WalletSession, - isMuxTransportTemplate, - isProviderTransport, - messageToBytes -} from '.' -import { commons, VERSION } from '@0xsequence/core' -import { TypedData } from '@0xsequence/utils' -import { toExtended } from './extended' -import { Analytics, setupAnalytics } from './analytics' -import { ethers } from 'ethers' - -/** - * This session class is meant to persist the state of the wallet connection - * whitin the dapp. This enables the client to retain the wallet address (and some more) - * even if the user refreshes the page. Otherwise we would have to open the popup again. - */ -export class SequenceClientSession { - static readonly SESSION_LOCALSTORE_KEY = '@sequence.session' - - constructor(private store: ItemStore) {} - - connectedSession(): Required { - const session = this.getSession() - - if (session && session.accountAddress && session.walletContext && session.networks) { - return { - accountAddress: session.accountAddress!, - walletContext: session.walletContext!, - networks: session.networks! - } - } - - throw new Error('Sequence session not connected') - } - - hasSession(): boolean { - return this.getSession()?.accountAddress !== undefined - } - - setSession(session: WalletSession) { - return this.store.setItem(SequenceClientSession.SESSION_LOCALSTORE_KEY, JSON.stringify(session)) - } - - getSession(): WalletSession | undefined { - try { - const session = this.store.getItem(SequenceClientSession.SESSION_LOCALSTORE_KEY) - - if (session) { - return JSON.parse(session) - } - } catch (err) { - console.error('Error parsing session', err) - } - - return undefined - } - - async clearSession() { - return this.store.removeItem(SequenceClientSession.SESSION_LOCALSTORE_KEY) - } -} - -/** - * The wallet webapp doesn't really care what's the "default chain" for the user. - * so we don't even bother to send this information to the wallet. Instead, we - * track it locally using storage, that way the data stays always in sync. - */ -export class DefaultChainIdTracker { - static readonly SESSION_CHAIN_ID_KEY = '@sequence.session.defaultChainId' - - callbacks: ((chainId: number) => void)[] = [] - - constructor( - private store: ItemStore, - private startingChainId: number = 1 - ) { - store.onItemChange(DefaultChainIdTracker.SESSION_CHAIN_ID_KEY, (value: string | null) => { - if (value) { - const chainId = parseInt(value) - this.callbacks.forEach(cb => cb(chainId)) - } - }) - } - - onDefaultChainIdChanged(callback: (chainId: number) => void) { - this.callbacks.push(callback) - return () => { - this.callbacks = this.callbacks.filter(cb => cb !== callback) - } - } - - setDefaultChainId(chainId: number) { - if (chainId !== this.getDefaultChainId()) { - this.store.setItem(DefaultChainIdTracker.SESSION_CHAIN_ID_KEY, chainId.toString()) - } - } - - getDefaultChainId(): number { - const read = this.store.getItem(DefaultChainIdTracker.SESSION_CHAIN_ID_KEY) - - if (!read || read.length === 0) { - return this.startingChainId - } - - return parseInt(read) - } -} - -export type SequenceClientOptions = { - defaultChainId?: number - defaultEIP6492?: boolean - projectAccessKey?: string - analytics?: boolean -} - -/** - * This is a wallet client for sequence wallet-webapp. It connects using *some* transport - * and it allows to perform all sequence specific (or write) operations related to the wallet. - *s - * It doesn't implement a full ethereum Provider, it doesn't include read-only methods. - */ - -// TODO: rename Client to transport.. or something.. like SequenceTransport .. -export class SequenceClient { - private readonly session: SequenceClientSession - private readonly defaultChainId: DefaultChainIdTracker - private readonly callbacks: { [K in keyof WalletEventTypes]?: WalletEventTypes[K][] } = {} - - public readonly transport: ProviderTransport - - public readonly defaultEIP6492: boolean - public readonly projectAccessKey?: string - public readonly analytics?: Analytics - - constructor(transport: ProviderTransport | MuxTransportTemplate, store: ItemStore, options?: SequenceClientOptions) { - if (isMuxTransportTemplate(transport)) { - this.transport = MuxMessageProvider.new(transport, options?.projectAccessKey) - } else if (isProviderTransport(transport)) { - this.transport = transport - } else { - throw new Error('Invalid transport') - } - - const defaultChainId = options?.defaultChainId - this.defaultEIP6492 = options?.defaultEIP6492 ?? false - - this.session = new SequenceClientSession(store) - this.defaultChainId = new DefaultChainIdTracker(store, defaultChainId) - - this.transport.on('accountsChanged', (accounts: string[]) => { - if (accounts.length > 1) { - console.warn('SequenceClient: wallet-webapp returned more than one account') - } - - this.callbacks.accountsChanged?.forEach(cb => cb(accounts)) - }) - - this.transport.on('connect', (response: ConnectDetails) => { - const chainIdHex = ethers.toQuantity(this.getChainId()) - this.callbacks.connect?.forEach(cb => - cb({ - ...response, - // Ignore the full connect response - // use the chainId defined locally - chainId: chainIdHex - }) - ) - }) - - this.transport.on('disconnect', (error, origin) => { - this.callbacks.disconnect?.forEach(cb => cb(error, origin)) - }) - - this.transport.on('networks', networks => { - this.callbacks.networks?.forEach(cb => cb(networks)) - }) - - this.transport.on('walletContext', context => { - this.callbacks.walletContext?.forEach(cb => cb(context)) - }) - - this.transport.on('open', info => { - this.callbacks.open?.forEach(cb => cb(info)) - }) - - this.transport.on('close', () => { - this.callbacks.close?.forEach(cb => cb()) - }) - - this.transport.on('chainChanged', (chainIdHex, origin) => { - this.callbacks.chainChanged?.forEach(cb => cb(chainIdHex, origin)) - }) - - // We don't listen for the transport chainChanged event - // instead we handle it locally, so we listen for changes in the store - this.defaultChainId.onDefaultChainIdChanged((chainId: number) => { - const chainIdHex = ethers.toQuantity(chainId) - this.callbacks.chainChanged?.forEach(cb => cb(chainIdHex)) - }) - - if (options?.projectAccessKey) { - this.projectAccessKey = options.projectAccessKey - } - if (this.projectAccessKey && options?.analytics) { - this.analytics = setupAnalytics(this.projectAccessKey) - } - - if (this.session.getSession()?.accountAddress) { - this.analytics?.identify(this.session.getSession()?.accountAddress?.toLowerCase()) - } - } - - // Callbacks - - registerCallback(eventName: K, callback: WalletEventTypes[K]) { - if (!this.callbacks[eventName]) { - this.callbacks[eventName] = [] - } - - this.callbacks[eventName]!.push(callback) - - return () => { - this.callbacks[eventName] = this.callbacks[eventName]!.filter(c => c !== callback) as any - } - } - - // Individual callbacks lead to more idiomatic code - - onOpen(callback: WalletEventTypes['open']) { - return this.registerCallback('open', callback) - } - - onClose(callback: WalletEventTypes['close']) { - return this.registerCallback('close', callback) - } - - onConnect(callback: WalletEventTypes['connect']) { - return this.registerCallback('connect', callback) - } - - onDisconnect(callback: WalletEventTypes['disconnect']) { - return this.registerCallback('disconnect', callback) - } - - onNetworks(callback: WalletEventTypes['networks']) { - return this.registerCallback('networks', callback) - } - - onAccountsChanged(callback: WalletEventTypes['accountsChanged']) { - return this.registerCallback('accountsChanged', callback) - } - - // @deprecated - onWalletContext(callback: WalletEventTypes['walletContext']) { - return this.registerCallback('walletContext', callback) - } - - onChainChanged(callback: WalletEventTypes['chainChanged']) { - return this.registerCallback('chainChanged', callback) - } - - onDefaultChainIdChanged(callback: WalletEventTypes['chainChanged']) { - return this.registerCallback('chainChanged', callback) - } - - getChainId(): number { - return this.defaultChainId.getDefaultChainId() - } - - setDefaultChainId(chainId: number) { - return this.defaultChainId.setDefaultChainId(chainId) - } - - // Proxy transport methods - - async openWallet(path?: string, intent?: OpenWalletIntent) { - this.transport.openWallet(path, intent, this.getChainId()) - await this.transport.waitUntilOpened() - return this.isOpened() - } - - closeWallet() { - return this.transport.closeWallet() - } - - isOpened(): boolean { - return this.transport.isOpened() - } - - isConnected(): boolean { - return this.session.hasSession() - } - - getSession(): WalletSession | undefined { - return this.session.getSession() - } - - // Basic API - getAddress(): string { - const session = this.session.connectedSession() - return session.accountAddress - } - - async connect(options: ConnectOptions): Promise { - if (options?.authorizeVersion === undefined) { - // Populate default authorize version if not provided - options.authorizeVersion = 2 - } - - if (options?.refresh === true) { - this.disconnect() - } - - options.projectAccessKey = this.projectAccessKey - - if (options) { - if (options.authorize) { - if (!options.app) { - throw new Error(`connecting with 'authorize' option also requires 'app' to be set`) - } - - if (options.authorizeVersion === undefined) { - options.authorizeVersion = 2 - } - } - } - - await this.openWallet(undefined, { - type: 'connect', - options: { ...options, networkId: this.getChainId(), clientVersion: VERSION } - }) - - const connectDetails = await this.transport.waitUntilConnected().catch((error): ConnectDetails => { - if (error instanceof Error) { - return { connected: false, error: error.message } - } else { - return { connected: false, error: JSON.stringify(error) } - } - }) - - // Normalize chainId into a decimal string - // TODO: Remove this once wallet-webapp returns chainId as a string - if (connectDetails.chainId) { - connectDetails.chainId = BigInt(connectDetails.chainId).toString() - } - - if (connectDetails.connected) { - if (!connectDetails.session) { - throw new Error('impossible state, connect response is missing session') - } - - this.session.setSession(connectDetails.session) - - if (connectDetails.session?.accountAddress) { - this.analytics?.identify(connectDetails.session.accountAddress.toLowerCase()) - } - } - - return connectDetails - } - - disconnect() { - if (this.isOpened()) { - this.closeWallet() - } - - this.analytics?.reset() - - return this.session.clearSession() - } - - // Higher level API - - async request(request: { method: string; params?: any[]; chainId?: number }): Promise { - // Internally when sending requests we use `legacy_sign` - // to avoid the default EIP6492 behavior overriding an explicit - // "legacy sign" request, so we map the method here. - request.method = this.mapSignMethod(request.method) - - const result = await this.transport.request(request) - - // We may need to unwrap the response if it's a JSON-RPC response. ie. older universal wallet versions - return unwrapJsonRpcResponse(result) - } - - async getNetworks(pull?: boolean): Promise { - const connectedSession = this.session.connectedSession() - - if (pull) { - connectedSession.networks = await this.request({ method: 'sequence_getNetworks' }) - this.session.setSession(connectedSession) - } - - return connectedSession.networks - } - - // NOTICE: `legacy_sign` will get overriden by `send` - // it is done this way to ensure that: - // - `send` handles `personal_sign` as a request for the default sign method - // - explicit `personal_sign` is not replaced by `sequence_sign` (if default is EI6492) - private signMethod(options?: OptionalEIP6492) { - if (options?.eip6492 === undefined) { - return 'personal_sign' - } - - return options.eip6492 ? 'sequence_sign' : 'legacy_sign' - } - - private signTypedDataMethod(options?: OptionalEIP6492) { - if (options?.eip6492 === undefined) { - return 'eth_signTypedData_v4' - } - - return options.eip6492 ? 'sequence_signTypedData_v4' : 'legacy_signTypedData_v4' - } - - private mapSignMethod(method: string): string { - if (method === 'personal_sign') { - if (this.defaultEIP6492) { - return 'sequence_sign' - } else { - return 'personal_sign' - } - } - - if (method === 'eth_signTypedData_v4') { - if (this.defaultEIP6492) { - return 'sequence_signTypedData_v4' - } else { - return 'eth_signTypedData_v4' - } - } - - if (method === 'legacy_sign') { - return 'personal_sign' - } - - if (method === 'legacy_signTypedData_v4') { - return 'eth_signTypedData_v4' - } - - return method - } - - async signMessage(message: ethers.BytesLike, options?: OptionalEIP6492 & OptionalChainId): Promise { - const method = this.signMethod(options) - - this.analytics?.track({ event: 'SIGN_MESSAGE_REQUEST', props: { chainId: `${options?.chainId || this.getChainId()}` } }) - - message = ethers.hexlify(messageToBytes(message)) - - // Address is ignored by the wallet webapp - return this.request({ - method, - params: [message, this.getAddress()], - chainId: options?.chainId - }) - } - - async signTypedData(typedData: TypedData, options?: OptionalEIP6492 & OptionalChainId): Promise { - const method = this.signTypedDataMethod(options) - - // TODO: Stop using ethers for this, this is the only place where we use it - // and it makes the client depend on ethers. - const encoded = ethers.TypedDataEncoder.getPayload(typedData.domain, typedData.types, typedData.message) - - // The sign typed data will use one of the following chainIds, in order: - // - The one provided in the options - // - The one provided in the typedData.domain.chainId - // - The default chainId - - this.analytics?.track({ event: 'SIGN_TYPED_DATA_REQUEST', props: { chainId: `${options?.chainId || this.getChainId()}` } }) - - return this.request({ - method, - params: [this.getAddress(), encoded], - chainId: options?.chainId || (typedData.domain.chainId && Number(typedData.domain.chainId)) || this.getChainId() - }) - } - - async sendTransaction(tx: ethers.TransactionRequest[] | ethers.TransactionRequest, options?: OptionalChainId): Promise { - const sequenceTxs = Array.isArray(tx) ? tx : [tx] - const extendedTxs = toExtended(sequenceTxs) - - this.analytics?.track({ event: 'SEND_TRANSACTION_REQUEST', props: { chainId: `${options?.chainId || this.getChainId()}` } }) - - return this.request({ method: 'eth_sendTransaction', params: [extendedTxs], chainId: options?.chainId }) - } - - async getWalletContext(): Promise { - return this.request({ method: 'sequence_getWalletContext' }) - } - - async getOnchainWalletConfig(options?: OptionalChainId): Promise { - // NOTICE: sequence_getWalletConfig sends the chainId as a param - const res = await this.request({ - method: 'sequence_getWalletConfig', - params: [options?.chainId || this.getChainId()], - chainId: options?.chainId - }) - return Array.isArray(res) ? res[0] : res - } - - // NOTICE: We are leaving out all the "regular" methods os a tipical - // JSON RPC Provider (eth_getBlockByNumber, eth_call, etc) - // wallet-webapp does implement them, but this client is meant to be - // exclusively used for Sequence specific methods -} - -// Unwrap a JsonRpcResponse result -const unwrapJsonRpcResponse = (response: any): any => { - if (response && typeof response === 'object' && 'jsonrpc' in response && 'result' in response) { - return response.result - } - - return response -} diff --git a/old/packages/provider/src/eip191exceptions.ts b/old/packages/provider/src/eip191exceptions.ts deleted file mode 100644 index 81219852f..000000000 --- a/old/packages/provider/src/eip191exceptions.ts +++ /dev/null @@ -1,137 +0,0 @@ -import { ethers } from 'ethers' - -export function messageIsExemptFromEIP191Prefix(message: Uint8Array): boolean { - return EIP_191_PREFIX_EXCEPTIONS.some(e => e.predicate(message)) -} - -const EIP_191_PREFIX_EXCEPTIONS: Array<{ - name: string - predicate: (message: Uint8Array) => boolean -}> = [ - // NOTE: Decentraland does not support 191 correctly. - { - name: 'Decentraland Exception', - predicate: isDecentralandLoginMessage - }, - - // NOTE: 0x v3 does not support 191 correctly. - // See https://gov.0x.org/t/zeip-proposal-fix-v3-eip-191-non-compliance-when-validating-eip-1271-signatures/3396 for more info. - { name: '0x v3 Exception', predicate: isZeroExV3Order } -] - -const DCL_REGEX = - /^Decentraland Login\nEphemeral address: 0x[a-fA-F0-9]{40}\nExpiration: (\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2}(?:\.\d*)?)((-(\d{2}):(\d{2})|Z)?)$/ -export function isDecentralandLoginMessage(bytes: Uint8Array): boolean { - try { - const stringified = ethers.toUtf8String(bytes) - return DCL_REGEX.test(stringified) - } catch { - return false - } -} - -// try to interpret bytes as abi-encoded 0x v3 OrderWithHash - -// see https://github.com/0xProject/0x-protocol-specification/blob/master/v3/v3-specification.md -export function isZeroExV3Order(bytes: Uint8Array): boolean { - const abi = new ethers.Interface(ZeroXV3EIP1271OrderWithHashAbi) - try { - abi.decodeFunctionData('OrderWithHash', bytes) - return true - } catch (err) { - // failed to decode ABI, so it's not a v3 order. - return false - } -} - -const ZeroXV3EIP1271OrderWithHashAbi = [ - { - inputs: [ - { - components: [ - { - internalType: 'address', - name: 'makerAddress', - type: 'address' - }, - { - internalType: 'address', - name: 'takerAddress', - type: 'address' - }, - { - internalType: 'address', - name: 'feeRecipientAddress', - type: 'address' - }, - { - internalType: 'address', - name: 'senderAddress', - type: 'address' - }, - { - internalType: 'uint256', - name: 'makerAssetAmount', - type: 'uint256' - }, - { - internalType: 'uint256', - name: 'takerAssetAmount', - type: 'uint256' - }, - { - internalType: 'uint256', - name: 'makerFee', - type: 'uint256' - }, - { - internalType: 'uint256', - name: 'takerFee', - type: 'uint256' - }, - { - internalType: 'uint256', - name: 'expirationTimeSeconds', - type: 'uint256' - }, - { - internalType: 'uint256', - name: 'salt', - type: 'uint256' - }, - { - internalType: 'bytes', - name: 'makerAssetData', - type: 'bytes' - }, - { - internalType: 'bytes', - name: 'takerAssetData', - type: 'bytes' - }, - { - internalType: 'bytes', - name: 'makerFeeAssetData', - type: 'bytes' - }, - { - internalType: 'bytes', - name: 'takerFeeAssetData', - type: 'bytes' - } - ], - internalType: 'struct IEIP1271Data.Order', - name: 'order', - type: 'tuple' - }, - { - internalType: 'bytes32', - name: 'orderHash', - type: 'bytes32' - } - ], - name: 'OrderWithHash', - outputs: [], - stateMutability: 'pure', - type: 'function' - } -] diff --git a/old/packages/provider/src/extended.ts b/old/packages/provider/src/extended.ts deleted file mode 100644 index ddbca17d8..000000000 --- a/old/packages/provider/src/extended.ts +++ /dev/null @@ -1,26 +0,0 @@ -import { ethers } from 'ethers' - -export type ExtendedTransactionRequest = ethers.TransactionRequest & { - auxiliary?: ethers.TransactionRequest[] -} - -export function toExtended(transactions: ethers.TransactionRequest[]): ExtendedTransactionRequest { - if (transactions.length === 0) { - throw new Error('No transaction provided') - } - - const [first, ...rest] = transactions - - return { - ...first, - auxiliary: rest - } -} - -export function fromExtended(transaction: ExtendedTransactionRequest): ethers.TransactionRequest[] { - return [transaction, ...(transaction.auxiliary || [])] -} - -export function isExtended(transaction: ethers.TransactionRequest): transaction is ExtendedTransactionRequest { - return (transaction as any).auxiliary !== undefined -} diff --git a/old/packages/provider/src/index.ts b/old/packages/provider/src/index.ts deleted file mode 100644 index 01cfe369b..000000000 --- a/old/packages/provider/src/index.ts +++ /dev/null @@ -1,9 +0,0 @@ -export * from './transactions' -export * from './transports' -export * from './types' -export * from './provider' -export * from './utils' -export * from './client' -export * from './signer' -export * from './init' -export * from './analytics' diff --git a/old/packages/provider/src/init.ts b/old/packages/provider/src/init.ts deleted file mode 100644 index c84ed3e68..000000000 --- a/old/packages/provider/src/init.ts +++ /dev/null @@ -1,191 +0,0 @@ -import { - CachedProvider, - ChainIdLike, - NetworkConfig, - allNetworks, - exceptionProviderMiddleware, - findNetworkConfig, - loggingProviderMiddleware, - JsonRpcProvider -} from '@0xsequence/network' -import { MuxTransportTemplate } from './transports' -import { ItemStore, useBestStore } from './utils' -import { ethers } from 'ethers' -import { SequenceClient } from './client' -import { SequenceProvider } from './provider' - -export interface ProviderConfig { - // The local storage dependency for the wallet provider, defaults to window.localStorage. - // For example, this option should be used when using React Native since window.localStorage is not available. - localStorage?: ItemStore - - // defaultNetwork is the primary network of a dapp and the default network a - // provider will communicate. Note: this setting is also configurable from the - // Wallet constructor's first argument. If both are specified, then they - // need to match - defaultNetwork?: ChainIdLike - - // defaultEIP6492 defines if EIP-6492 is enabled by default when signing messages. - defaultEIP6492?: boolean - - // networks is a configuration list of networks used by the wallet. This list - // is combined with the network list specified by sequence.js. - // notice that this can only replace the rpc urls on the dapp side, - // the networks on wallet-webapp side remain the same. - // - // NOTICE: It's not possible to define networks that aren't already - // defined in sequence.js. - networks?: Partial[] - - // transports for dapp to wallet jron-rpc communication - transports?: MuxTransportTemplate - - // analytics .... (default: true) - analytics?: boolean -} - -export const DefaultProviderConfig = { - transports: { - walletAppURL: 'https://sequence.app', - windowTransport: { enabled: true }, - proxyTransport: { enabled: false } - }, - - defaultNetwork: 1, - analytics: true -} - -let sequenceWalletProvider: SequenceProvider | undefined - -/** - * Initializes a wallet with the provided project access key and optional configuration. - * - * @param projectAccessKey - Access key for the project that can be obtained from Sequence Builder on sequence.build - * @param partialConfig - Optional partial configuration for the wallet. - * @returns The initialized wallet provider. - * @throws Error if projectAccessKey is not provided, empty string or is not string. - */ -export const initWallet = (projectAccessKey: string, partialConfig?: Partial) => { - if (!projectAccessKey || typeof projectAccessKey !== 'string') { - throw new Error('Please pass a projectAccessKey in initWallet.') - } - - if (sequenceWalletProvider) { - return sequenceWalletProvider - } - - // Combine both the provided config and the default config - const config = { - ...DefaultProviderConfig, - ...partialConfig, - transports: { - ...DefaultProviderConfig.transports, - ...partialConfig?.transports - } - } - - let networks: NetworkConfig[] = [] - - const updateNetworks = (connectedNetworks: NetworkConfig[] = []) => { - networks = mergeNetworks(allNetworks, connectedNetworks, config.networks ?? []) - - // Append projectAccessKey to network rpcUrls - networks = networks.map(network => { - // Don't double-append in the case the user has already included their access key in the rpc URL - if (network.rpcUrl.includes(projectAccessKey)) { - return network - } - - // XXX: This will probably break non-sequence RPC provider URLs. - network.rpcUrl = network.rpcUrl + `/${projectAccessKey}` - - return network - }) - } - - updateNetworks() - - // This is the starting default network (as defined by the config) - // it can be later be changed using `wallet_switchEthereumChain` or some - // of the other methods on the provider. - const defaultNetwork = config.defaultNetwork ? findNetworkConfig(networks, config.defaultNetwork)?.chainId : undefined - if (!defaultNetwork && config.defaultNetwork) { - throw new Error(`defaultNetwork not found for chainId: ${config.defaultNetwork}`) - } - - // Generate ItemStore - const itemStore = config.localStorage || useBestStore() - - // Create client, provider and return signer - const client = new SequenceClient(config.transports, itemStore, { - defaultChainId: defaultNetwork, - defaultEIP6492: config.defaultEIP6492, - projectAccessKey: projectAccessKey, - analytics: config.analytics - }) - - updateNetworks(client.getSession()?.networks) - - client.onConnect(ev => { - updateNetworks(ev.session?.networks) - }) - - const rpcProviders: Record = {} - - // This builds a "public rpc" on demand, we build them on demand because we don't want to - // generate a bunch of providers for networks that aren't used. - const providerForChainId = (chainId: number) => { - const network = findNetworkConfig(networks, chainId) - - if (!network) { - throw new Error(`no network config found for chainId: ${chainId}`) - } - - const { rpcUrl } = network - - // Cache providers by rpc url - if (!rpcProviders[rpcUrl]) { - rpcProviders[rpcUrl] = new JsonRpcProvider( - rpcUrl, - { - middlewares: [loggingProviderMiddleware, exceptionProviderMiddleware, new CachedProvider()] - }, - { cacheTimeout: -1 } - ) - } - - return rpcProviders[rpcUrl] - } - - sequenceWalletProvider = new SequenceProvider(client, providerForChainId) - return sequenceWalletProvider -} - -export const unregisterWallet = () => { - if (!sequenceWalletProvider) return - sequenceWalletProvider.client.closeWallet() - sequenceWalletProvider.client.transport.unregister() - sequenceWalletProvider = undefined -} - -export const getWallet = () => { - if (!sequenceWalletProvider) { - throw new Error('Wallet has not been initialized, call sequence.initWallet(config) first.') - } - return sequenceWalletProvider -} - -// allNetworks <- connectedNetworks <- config.networks -const mergeNetworks = (...networks: Partial[][]) => { - const networkMap = new Map() - - for (const network of networks.flat()) { - if (network.chainId && network.rpcUrl) { - const existingNetwork = networkMap.get(network.chainId) - - networkMap.set(network.chainId, { ...existingNetwork, ...network } as NetworkConfig) - } - } - - return Array.from(networkMap.values()) -} diff --git a/old/packages/provider/src/provider.ts b/old/packages/provider/src/provider.ts deleted file mode 100644 index b5070f5ff..000000000 --- a/old/packages/provider/src/provider.ts +++ /dev/null @@ -1,570 +0,0 @@ -import { ethers } from 'ethers' -import { SequenceClient } from './client' -import { EIP1193Provider, ChainIdLike, NetworkConfig, allNetworks, findNetworkConfig } from '@0xsequence/network' -import { ConnectDetails, ConnectOptions, OpenWalletIntent, OptionalChainIdLike, WalletSession } from './types' -import { commons } from '@0xsequence/core' -import { WalletUtils } from './utils/index' -import { SequenceSigner, SingleNetworkSequenceSigner } from './signer' - -export interface ISequenceProvider { - readonly _isSequenceProvider: true - - connect(options?: ConnectOptions): Promise - disconnect(): void - - isConnected(): boolean - getSession(): WalletSession | undefined - - listAccounts(): string[] - - // @deprecated use getSigner().getAddress() instead - getAddress(): string - - getNetworks(): Promise - getChainId(): number - - setDefaultChainId(chainId: ChainIdLike): void - - isOpened(): boolean - openWallet(path?: string, intent?: OpenWalletIntent): Promise - closeWallet(): void - - getProvider(): SequenceProvider - getProvider(chainId: ChainIdLike): SingleNetworkSequenceProvider - getProvider(chainId?: ChainIdLike): SequenceProvider | SingleNetworkSequenceProvider - - getSigner(): SequenceSigner - getSigner(chainId: ChainIdLike): SingleNetworkSequenceSigner - getSigner(chainId?: ChainIdLike): SequenceSigner | SingleNetworkSequenceSigner - - // @deprecated use getSigner().getWalletContext() instead - getWalletContext(): Promise - - // @deprecated use getSigner().getWalletConfig() instead - getWalletConfig(chainId?: ChainIdLike): Promise - - utils: WalletUtils -} - -const EIP1193EventTypes = ['connect', 'disconnect', 'chainChanged', 'accountsChanged'] as const -type EIP1193EventType = (typeof EIP1193EventTypes)[number] - -export class SequenceProvider extends ethers.AbstractProvider implements ISequenceProvider, EIP1193Provider { - private readonly singleNetworkProviders: { [chainId: number]: SingleNetworkSequenceProvider } = {} - - readonly _isSequenceProvider = true - readonly utils: WalletUtils - - readonly signer: SequenceSigner - - readonly eip1193EventListeners = new Map>() - - constructor( - public readonly client: SequenceClient, - private readonly providerFor: (networkId: number) => ethers.JsonRpcProvider, - public readonly networks: NetworkConfig[] = allNetworks, - public readonly options?: ethers.AbstractProviderOptions - ) { - // We support a lot of networks - // but we start with the default one - super(client.getChainId(), options) - - // Emit events as defined by EIP-1193 - client.onConnect(details => { - //this.emit('connect', details) - this.eip1193EventListeners.get('connect')?.forEach(listener => listener(details)) - }) - - client.onDisconnect(error => { - //this.emit('disconnect', error) - this.eip1193EventListeners.get('disconnect')?.forEach(listener => listener(error)) - }) - - client.onDefaultChainIdChanged(chainId => { - //this.emit('chainChanged', chainId) - this.eip1193EventListeners.get('chainChanged')?.forEach(listener => listener(chainId)) - }) - - client.onAccountsChanged(accounts => { - //this.emit('accountsChanged', accounts) - this.eip1193EventListeners.get('accountsChanged')?.forEach(listener => listener(accounts)) - }) - - // NOTICE: We don't emit 'open' and 'close' events - // because these are handled by the library, and they - // are not part of EIP-1193 - - // devs can still access them using - // client.onOpen() - // client.onClose() - - // Create a Sequence signer too - this.signer = new SequenceSigner(this.client, this) - - // Create a utils instance - this.utils = new WalletUtils(this.signer) - } - - async on(event: ethers.ProviderEvent | EIP1193EventType, listener: ethers.Listener): Promise { - if (EIP1193EventTypes.includes(event as EIP1193EventType)) { - const listeners = this.eip1193EventListeners.get(event as EIP1193EventType) || new Set() - listeners.add(listener) - this.eip1193EventListeners.set(event as EIP1193EventType, listeners) - - return this - } - - return super.on(event, listener) as Promise - } - - async off(event: ethers.ProviderEvent | EIP1193EventType, listener?: ethers.Listener | undefined): Promise { - if (EIP1193EventTypes.includes(event as EIP1193EventType)) { - const listeners = this.eip1193EventListeners.get(event as EIP1193EventType) - - if (listeners) { - if (listener) { - listeners.delete(listener) - } else { - listeners.clear() - } - } - - return this - } - - return super.off(event, listener) as Promise - } - - getSigner(): SequenceSigner - getSigner(chainId: ChainIdLike): SingleNetworkSequenceSigner - getSigner(chainId?: ChainIdLike): SequenceSigner | SingleNetworkSequenceSigner - - getSigner(chainId?: ChainIdLike) { - return this.signer.getSigner(chainId) - } - - connect(options: ConnectOptions) { - return this.client.connect(options) - } - - disconnect() { - return this.client.disconnect() - } - - isConnected() { - return this.client.isConnected() - } - - getSession() { - return this.client.getSession() - } - - listAccounts(): string[] { - return [this.client.getAddress()] - } - - // @deprecated use getSigner() instead - getAddress() { - return this.client.getAddress() - } - - getNetworks(): Promise { - return this.client.getNetworks() - } - - getChainId(): number { - return this.client.getChainId() - } - - setDefaultChainId(chainId: ChainIdLike) { - return this.client.setDefaultChainId(this.toChainId(chainId)) - } - - isOpened(): boolean { - return this.client.isOpened() - } - - closeWallet(): void { - return this.client.closeWallet() - } - - getWalletContext(): Promise { - return this.client.getWalletContext() - } - - // @deprecated use getSigner() instead - async getWalletConfig(chainId?: ChainIdLike): Promise { - const useChainId = await this.useChainId(chainId) - return this.client.getOnchainWalletConfig({ chainId: useChainId }) - } - - authorize(options: ConnectOptions) { - // Just an alias for connect with authorize: true - return this.client.connect({ ...options, authorize: true }) - } - - async openWallet(path?: string, intent?: OpenWalletIntent) { - await this.client.openWallet(path, intent) - return true - } - - toChainId(chainId: ChainIdLike): number - toChainId(chainId?: ChainIdLike): number | undefined - - toChainId(chainId?: ChainIdLike) { - if (chainId === undefined) { - return undefined - } - - const resolved = findNetworkConfig(this.networks, chainId as ChainIdLike) - - if (!resolved) { - throw new Error(`Unsupported network ${chainId}`) - } - - return resolved.chainId - } - - /** - * Resolves the chainId to use for the given request. If no chainId is provided, - * it uses the chainId defined by the client (default chainId). This can be - * overriden to build a single-network SequenceProvider. - */ - protected async useChainId(chainId?: ChainIdLike): Promise { - return this.toChainId(chainId) || this.client.getChainId() - } - - /** - * This generates a provider that ONLY works for the given chainId. - * the generated provider can't switch networks, and can't handle requests - * for other networks. - */ - getProvider(): SequenceProvider - getProvider(chainId: ChainIdLike): SingleNetworkSequenceProvider - getProvider(chainId?: ChainIdLike): SequenceProvider | SingleNetworkSequenceProvider - - getProvider(chainId?: ChainIdLike) { - // The provider without a chainId is... this one - if (!chainId) { - return this as SequenceProvider - } - - const useChainId = this.toChainId(chainId) - - if (!this.singleNetworkProviders[useChainId]) { - this.singleNetworkProviders[useChainId] = new SingleNetworkSequenceProvider( - this.client, - this.providerFor, - useChainId, - this.options - ) - } - - return this.singleNetworkProviders[useChainId] - } - - /** - * This returns a subprovider, this is a regular non-sequence provider that - * can be used to fulfill read only requests on a given network. - */ - async _getSubprovider(chainId?: ChainIdLike): Promise { - const useChainId = await this.useChainId(chainId) - - // Whoever implements providerFrom should memoize the generated provider - // otherwise every instance of SequenceProvider will create a new subprovider - const provider = this.providerFor(useChainId) - - if (!provider) { - throw new Error(`Unsupported network ${useChainId}`) - } - - return provider - } - - async _perform(req: ethers.PerformActionRequest): Promise { - const { method, ...args } = req - - const provider = await this._getSubprovider() - const prepared = provider.getRpcRequest(req) ?? { method, args: Object.values(args) } - - if (!prepared) { - throw new Error(`Unsupported method ${req.method}`) - } - - return provider.send(prepared.method, prepared.args) - } - - async perform(method: string, params: any): Promise { - // First we check if the method should be handled by the client - if (method === 'eth_chainId') { - return ethers.toQuantity(await this.useChainId()) - } - - if (method === 'eth_accounts') { - return [this.client.getAddress()] - } - - if (method === 'wallet_switchEthereumChain') { - const args = params[0] as { chainId: string } | number | string - const chainId = normalizeChainId(args) - return this.setDefaultChainId(chainId) - } - - // Usually these methods aren't used by calling the provider - // but to maximize compatibility we support them too. - // The correct way of accessing these methods is by using .getSigner() - if ( - method === 'eth_sendTransaction' || - method === 'eth_sign' || - method === 'eth_signTypedData' || - method === 'eth_signTypedData_v4' || - method === 'personal_sign' || - // These methods will use EIP-6492 - // but this is handled directly by the wallet - method === 'sequence_sign' || - method === 'sequence_signTypedData_v4' - ) { - // We pass the chainId to the client, if we don't pass one - // the client will use its own default chainId - return this.client.request({ method, params, chainId: this.getChainId() }) - } - - return this._perform({ method, ...params }) - } - - send(method: string, params: any): Promise { - return this.perform(method, params) - } - - request(request: { method: string; params?: any[] | undefined }) { - return this.perform(request.method, request.params) - } - - async _detectNetwork(): Promise { - const chainId = this.client.getChainId() - const found = findNetworkConfig(this.networks, chainId) - - if (!found) { - throw new Error(`Unknown network ${chainId}`) - } - - const network = new ethers.Network(found.name, found.chainId) - - return network - } - - async detectNetwork(): Promise { - return this._detectNetwork() - } - - // Override most of the methods, so we add support for an optional chainId - // argument, which is used to select the provider to use. - // - // NOTICE: We could use generics to avoid repeating the same code - // but this would make the code harder to read, and it's not worth it - // since we only have a few methods to override. - - async waitForTransaction(transactionHash: string, confirmations?: number, timeout?: number, optionals?: OptionalChainIdLike) { - const provider = await this._getSubprovider(optionals?.chainId) - return provider.waitForTransaction(transactionHash, confirmations, timeout) - } - - async getBlockNumber(optionals?: OptionalChainIdLike) { - const provider = await this._getSubprovider(optionals?.chainId) - return provider.getBlockNumber() - } - - async getFeeData(optionals?: OptionalChainIdLike) { - const provider = await this._getSubprovider(optionals?.chainId) - return provider.getFeeData() - } - - async getBalance(addressOrName: string | Promise, blockTag?: ethers.BlockTag, optionals?: OptionalChainIdLike) { - const provider = await this._getSubprovider(optionals?.chainId) - return provider.getBalance(addressOrName, blockTag) - } - - async getTransactionCount( - addressOrName: string | Promise, - blockTag?: ethers.BlockTag, - optionals?: OptionalChainIdLike - ) { - const provider = await this._getSubprovider(optionals?.chainId) - return provider.getTransactionCount(addressOrName, blockTag) - } - - async getCode(addressOrName: string | Promise, blockTag?: ethers.BlockTag, optionals?: OptionalChainIdLike) { - const provider = await this._getSubprovider(optionals?.chainId) - return provider.getCode(addressOrName, blockTag) - } - - async getStorage( - addressOrName: string | Promise, - position: ethers.BigNumberish, - blockTag?: ethers.BlockTag, - optionals?: OptionalChainIdLike - ) { - const provider = await this._getSubprovider(optionals?.chainId) - return provider.getStorage(addressOrName, position, blockTag) - } - - async call(transaction: ethers.TransactionRequest, optionals?: OptionalChainIdLike) { - const provider = await this._getSubprovider(optionals?.chainId) - return provider.call(transaction) - } - - async estimateGas(transaction: ethers.TransactionRequest, optionals?: OptionalChainIdLike) { - const provider = await this._getSubprovider(optionals?.chainId) - return provider.estimateGas(transaction) - } - - async getBlock(blockHashOrBlockTag: ethers.BlockTag | string, prefetchTxs?: boolean, optionals?: OptionalChainIdLike) { - const provider = await this._getSubprovider(optionals?.chainId) - return provider.getBlock(blockHashOrBlockTag, prefetchTxs) - } - - async getTransaction(transactionHash: string, optionals?: OptionalChainIdLike) { - const provider = await this._getSubprovider(optionals?.chainId) - return provider.getTransaction(transactionHash) - } - - async getLogs(filter: ethers.Filter, optionals?: OptionalChainIdLike) { - const provider = await this._getSubprovider(optionals?.chainId) - return provider.getLogs(filter) - } - - // ENS methods - - async supportsENS(): Promise { - const networks = await this.getNetworks() - return networks.some(n => n.chainId === 1) - } - - async getResolver(name: string) { - if (!(await this.supportsENS())) { - return null - } - - // Resolver is always on the chainId 1 - const provider = await this._getSubprovider(1) - return provider.getResolver(name) - } - - async resolveName(name: string) { - if (ethers.isAddress(name)) { - return name - } - - if (!(await this.supportsENS())) { - return null - } - - // Resolver is always on the chainId 1 - const provider = await this._getSubprovider(1) - return provider.resolveName(name) - } - - async lookupAddress(address: string) { - if (!(await this.supportsENS())) { - return null - } - - // Resolver is always on the chainId 1 - const provider = await this._getSubprovider(1) - return provider.lookupAddress(address) - } - - async getAvatar(nameOrAddress: string) { - if (!(await this.supportsENS())) { - return null - } - - const provider = await this._getSubprovider(1) - return provider.getAvatar(nameOrAddress) - } - - static is = (provider: any): provider is SequenceProvider => { - return provider && typeof provider === 'object' && provider._isSequenceProvider === true - } -} - -function normalizeChainId(chainId: ethers.BigNumberish | { chainId: string }): number { - if (typeof chainId === 'object') return normalizeChainId(chainId.chainId) - return Number(chainId) -} - -/** - * This is the same provider, but it only allows a single network at a time. - * the network defined by the constructor is the only one that can be used. - * - * Attempting to call any method with a different network will throw an error. - * Attempting to change the network of this provider will throw an error. - * - * NOTICE: These networks won't support ENS unless they are the mainnet. - */ -export class SingleNetworkSequenceProvider extends SequenceProvider { - readonly _isSingleNetworkSequenceProvider = true - - constructor( - client: SequenceClient, - providerFor: (networkId: number) => ethers.JsonRpcProvider, - public readonly chainId: ChainIdLike, - options?: ethers.AbstractProviderOptions - ) { - super(client, providerFor, undefined, options) - } - - private _useChainId(chainId?: ChainIdLike): number { - const provided = this.toChainId(chainId) - - if (provided && provided !== this.chainId) { - throw new Error(`This provider only supports the network ${this.chainId}, but ${provided} was requested.`) - } - - return provided || super.toChainId(this.chainId) - } - - protected useChainId(chainId?: ChainIdLike): Promise { - return Promise.resolve(this._useChainId(chainId)) - } - - getChainId(): number { - return super.toChainId(this.chainId) - } - - async getNetwork(): Promise { - const networks = await this.client.getNetworks() - const found = findNetworkConfig(networks, this.chainId) - - if (!found) { - throw new Error(`Unsupported network ${this.chainId}`) - } - - return new ethers.Network(found.name, found.chainId) - } - - /** - * Override getProvider and getSigner so they always use `useChainId` - * this way they can't return providers and signers that can switch networks, - * or that don't match the chainId of this signer. - */ - getProvider(chainId?: ChainIdLike): SingleNetworkSequenceProvider { - if (this._useChainId(chainId) !== this.chainId) { - throw new Error(`Unreachable code`) - } - - return this - } - - getSigner(chainId?: ChainIdLike): SingleNetworkSequenceSigner { - return super.getSigner(this._useChainId(chainId)) - } - - setDefaultChainId(_chainId: ChainIdLike): void { - throw new Error(`This provider only supports the network ${this.chainId}; use the parent provider to switch networks.`) - } - - static is(cand: any): cand is SingleNetworkSequenceProvider { - return cand && typeof cand === 'object' && cand._isSingleNetworkSequenceProvider === true - } -} diff --git a/old/packages/provider/src/signer.ts b/old/packages/provider/src/signer.ts deleted file mode 100644 index 168b1ddee..000000000 --- a/old/packages/provider/src/signer.ts +++ /dev/null @@ -1,295 +0,0 @@ -import { ethers } from 'ethers' - -import { SequenceProvider, SingleNetworkSequenceProvider } from './provider' -import { SequenceClient } from './client' -import { commons } from '@0xsequence/core' -import { ChainIdLike, NetworkConfig } from '@0xsequence/network' -import { resolveArrayProperties } from './utils' -import { WalletUtils } from './utils/index' -import { OptionalChainIdLike, OptionalEIP6492 } from './types' - -export interface ISequenceSigner extends Omit { - getProvider(): SequenceProvider - getProvider(chainId: ChainIdLike): SingleNetworkSequenceProvider - getProvider(chainId?: ChainIdLike): SequenceProvider | SingleNetworkSequenceProvider - - getSigner(): SequenceSigner - getSigner(chainId: ChainIdLike): SingleNetworkSequenceSigner - getSigner(chainId?: ChainIdLike): SequenceSigner | SingleNetworkSequenceSigner - - getWalletConfig(chainId?: ChainIdLike): Promise - getNetworks(): Promise - - connect: (provider: SequenceProvider) => SequenceSigner - - signMessage(message: ethers.BytesLike, options?: OptionalChainIdLike & OptionalEIP6492): Promise - - signTypedData( - domain: ethers.TypedDataDomain, - types: Record>, - message: Record, - options?: OptionalChainIdLike & OptionalEIP6492 - ): Promise - - // sendTransaction takes an unsigned transaction, or list of unsigned transactions, and then has it signed by - // the signer, and finally sends it to the relayer for submission to an Ethereum network. - // It supports any kind of transaction, including regular ethers transactions, and Sequence transactions. - sendTransaction( - transaction: ethers.TransactionRequest[] | ethers.TransactionRequest, - options?: OptionalChainIdLike - ): Promise - - utils: WalletUtils -} - -export class SequenceSigner implements ISequenceSigner { - private readonly singleNetworkSigners: { [chainId: number]: SingleNetworkSequenceSigner } = {} - - readonly _isSequenceSigner: boolean = true - - get utils(): WalletUtils { - return this.provider.utils - } - - constructor( - public client: SequenceClient, - public provider: SequenceProvider - ) {} - - async getAddress(): Promise { - return this.client.getAddress() - } - - // This method shouldn't be used directly - // it exists to maintain compatibility with ethers.Signer - connect(provider: ethers.Provider): SequenceSigner { - if (!SequenceProvider.is(provider)) { - throw new Error('SequenceSigner can only be connected to a SequenceProvider') - } - - return new SequenceSigner(this.client, provider) - } - - getSigner(): SequenceSigner - getSigner(chainId: ChainIdLike): SingleNetworkSequenceSigner - getSigner(chainId?: ChainIdLike): SingleNetworkSequenceSigner | SequenceSigner - - getSigner(chainId?: ChainIdLike): SingleNetworkSequenceSigner | SequenceSigner { - // The signer for the default network is this signer - if (!chainId) { - return this - } - - const useChainId = this.provider.toChainId(chainId) - - if (!this.singleNetworkSigners[useChainId]) { - this.singleNetworkSigners[useChainId] = new SingleNetworkSequenceSigner(this.client, this.provider, useChainId) - } - - return this.singleNetworkSigners[useChainId] - } - - /** - * Resolves the chainId to use for the given request. If no chainId is provided, - * it uses the chainId defined by the client (default chainId). This can be - * overriden to build a single-network SequenceProvider. - */ - protected useChainId(chainId?: ChainIdLike): number { - return this.provider.toChainId(chainId) || this.client.getChainId() - } - - async signMessage(message: ethers.BytesLike, options?: OptionalChainIdLike & OptionalEIP6492): Promise { - const { eip6492 = true } = options || {} - const chainId = this.useChainId(options?.chainId) - return this.client.signMessage(message, { eip6492, chainId }) - } - - async signTypedData( - domain: ethers.TypedDataDomain, - types: Record>, - message: Record, - options?: OptionalChainIdLike & OptionalEIP6492 - ): Promise { - const { eip6492 = true } = options || {} - const chainId = this.useChainId(options?.chainId) - return this.client.signTypedData({ domain, types, message }, { eip6492, chainId }) - } - - getProvider(): SequenceProvider - getProvider(chainId: ChainIdLike): SingleNetworkSequenceProvider - getProvider(chainId?: ChainIdLike): SingleNetworkSequenceProvider | SequenceProvider - - getProvider(chainId?: ChainIdLike): SingleNetworkSequenceProvider | SequenceProvider { - return this.provider.getProvider(chainId) - } - - async sendTransaction(transaction: ethers.TransactionRequest[] | ethers.TransactionRequest, options?: OptionalChainIdLike) { - const chainId = this.useChainId(options?.chainId) - const resolved = await resolveArrayProperties(transaction) - const txHash = await this.client.sendTransaction(resolved, { chainId }) - const provider = this.getProvider(chainId) - - try { - const result = await new Promise(resolve => { - const check = async () => { - const tx = await provider.getTransaction(txHash) - - if (tx !== null) { - return resolve(tx) - } - - await provider.once('block', check) - } - - check() - }) - - return result - } catch (err) { - err.transactionHash = txHash - throw err - } - } - - async getWalletConfig(chainId?: ChainIdLike | undefined): Promise { - const useChainId = this.useChainId(chainId) - return this.client.getOnchainWalletConfig({ chainId: useChainId }) - } - - getNetworks(): Promise { - return this.client.getNetworks() - } - - async getBalance(blockTag?: ethers.BlockTag | undefined, optionals?: OptionalChainIdLike): Promise { - const provider = this.getProvider(optionals?.chainId) - return provider.getBalance(this.getAddress(), blockTag) - } - - async estimateGas(transaction: ethers.TransactionRequest, optionals?: OptionalChainIdLike): Promise { - return this.getProvider(optionals?.chainId).estimateGas(transaction) - } - - async call(transaction: ethers.TransactionRequest, optionals?: OptionalChainIdLike): Promise { - return this.getProvider(optionals?.chainId).call(transaction) - } - - getChainId(): Promise { - return Promise.resolve(this.client.getChainId()) - } - - async getFeeData(optionals?: OptionalChainIdLike): Promise { - return this.getProvider(optionals?.chainId).getFeeData() - } - - async resolveName(name: string): Promise { - const res = await this.provider.resolveName(name) - - // For some reason ethers.Signer expects this to return `string` - // but ethers.Provider expects this to return `string | null`. - // The signer doesn't have any other source of information, so we'll - // fail if the provider doesn't return a result. - if (res === null) { - throw new Error(`ENS name not found: ${name}`) - } - - return res - } - - _checkProvider(_operation?: string | undefined): void { - // We always have a provider, so this is a noop - } - - getNonce(_blockTag?: ethers.BlockTag): Promise { - throw new Error('SequenceSigner does not support getNonce') - } - - populateCall(_transaction: ethers.TransactionRequest): Promise> { - throw new Error('SequenceSigner does not support populateCall') - } - - populateTransaction(_transaction: ethers.TransactionRequest): Promise> { - throw new Error('SequenceSigner does not support populateTransaction') - } - - checkTransaction(_transaction: ethers.TransactionRequest): ethers.TransactionRequest { - throw new Error('SequenceSigner does not support checkTransaction') - } - - getTransactionCount(_blockTag?: ethers.BlockTag): Promise { - // We could try returning the sequence nonce here - // but we aren't sure how ethers will use this nonce - throw new Error('SequenceSigner does not support getTransactionCount') - } - - signTransaction(_transaction: commons.transaction.Transactionish): Promise { - // We could implement signTransaction/sendTransaction here - // but first we need a way of serializing these signed transactions - // and it could lead to more trouble, because the dapp could try to send this transaction - // using a different provider, which would fail. - throw new Error('SequenceWallet does not support signTransaction, use sendTransaction instead.') - } - - static is(cand: any): cand is SequenceSigner { - return cand && typeof cand === 'object' && cand._isSequenceSigner === true - } -} - -/** - * This is the same provider, but it only allows a single network at a time. - * the network defined by the constructor is the only one that can be used. - * - * Attempting to call any method with a different network will throw an error. - * Attempting to change the network of this provider will throw an error. - * - * NOTICE: These networks won't support ENS unless they are the mainnet. - */ -export class SingleNetworkSequenceSigner extends SequenceSigner { - readonly _isSingleNetworkSequenceSigner = true - - constructor( - client: SequenceClient, - provider: SequenceProvider, - public readonly chainId: ChainIdLike - ) { - super(client, provider.getProvider(chainId)) - } - - private _useChainId(chainId?: ChainIdLike): number { - const provided = this.provider.toChainId(chainId) - - if (provided && provided !== this.chainId) { - throw new Error(`This signer only supports the network ${this.chainId}, but ${provided} was requested.`) - } - - return provided || this.provider.toChainId(this.chainId) - } - - protected useChainId(chainId?: ChainIdLike): number { - return this._useChainId(chainId) - } - - getChainId(): Promise { - return Promise.resolve(this.provider.toChainId(this.chainId)) - } - - /** - * Override getProvider and getSigner so they always use `useChainId` - * this way they can't return providers and signers that can switch networks, - * or that don't match the chainId of this signer. - */ - getProvider(chainId?: ChainIdLike): SingleNetworkSequenceProvider { - return super.getProvider(this._useChainId(chainId)) - } - - getSigner(chainId?: ChainIdLike | undefined): SingleNetworkSequenceSigner { - if (this._useChainId(chainId) !== this.chainId) { - throw new Error(`Unreachable code`) - } - - return this - } - - static is(cand: any): cand is SingleNetworkSequenceSigner { - return cand && typeof cand === 'object' && cand._isSingleNetworkSequenceSigner === true - } -} diff --git a/old/packages/provider/src/transactions.ts b/old/packages/provider/src/transactions.ts deleted file mode 100644 index 4ebe8cdf5..000000000 --- a/old/packages/provider/src/transactions.ts +++ /dev/null @@ -1,57 +0,0 @@ -import { walletContracts } from '@0xsequence/abi' -import { commons } from '@0xsequence/core' -import { ethers } from 'ethers' - -const PROHIBITED_FUNCTIONS = new Map( - [ - 'addHook(bytes4,address)', - 'clearExtraImageHashes(bytes32[])', - 'removeHook(bytes4)', - 'setExtraImageHash(bytes32,uint256)', - 'updateIPFSRoot(bytes32)', - 'updateImageHash(bytes32)', - 'updateImageHashAndIPFS(bytes32,bytes32)', - 'updateImplementation(address)' - ].map(signature => [ethers.id(signature).slice(0, 10), signature]) -) - -export function validateTransactionRequest(wallet: string, transaction: commons.transaction.Transactionish) { - const transactions = commons.transaction.fromTransactionish(wallet, transaction) - const unwound = commons.transaction.unwind(wallet, transactions) - unwound.forEach(transaction => validateTransaction(wallet, transaction)) -} - -function validateTransaction(wallet: string, transaction: commons.transaction.Transaction) { - if (transaction.to.toLowerCase() === wallet.toLowerCase()) { - if (transaction.data) { - const data = ethers.getBytes(transaction.data) - if (data.length >= 4 && !isCreateContractCall(data)) { - throw new Error('self calls are forbidden') - } - } - } - - if (transaction.delegateCall) { - throw new Error('delegate calls are forbidden') - } - - if (transaction.data) { - const data = ethers.hexlify(transaction.data) - const selector = data.slice(0, 10) - const signature = PROHIBITED_FUNCTIONS.get(selector) - if (signature) { - const name = signature.slice(0, signature.indexOf('(')) - throw new Error(`${name} calls are forbidden`) - } - } -} - -function isCreateContractCall(data: ethers.BytesLike): boolean { - const walletInterface = new ethers.Interface(walletContracts.mainModule.abi) - try { - walletInterface.decodeFunctionData('createContract', data) - return true - } catch { - return false - } -} diff --git a/old/packages/provider/src/transports/base-provider-transport.ts b/old/packages/provider/src/transports/base-provider-transport.ts deleted file mode 100644 index 6e0199e0e..000000000 --- a/old/packages/provider/src/transports/base-provider-transport.ts +++ /dev/null @@ -1,416 +0,0 @@ -import { EventEmitter2 as EventEmitter } from 'eventemitter2' - -import { - ProviderTransport, - ProviderMessage, - ProviderMessageRequest, - EventType, - ProviderEventTypes, - ProviderMessageResponse, - ProviderMessageResponseCallback, - OpenState, - OpenWalletIntent, - ConnectDetails, - WalletSession, - ProviderRpcError, - InitState, - TypedEventEmitter -} from '../types' - -import { NetworkConfig } from '@0xsequence/network' -import { logger } from '@0xsequence/utils' -import { ethers } from 'ethers' -import { VERSION, commons } from '@0xsequence/core' - -export const PROVIDER_OPEN_TIMEOUT = 30000 // in ms - -let _messageIdx = 0 - -export const nextMessageIdx = () => ++_messageIdx - -export abstract class BaseProviderTransport implements ProviderTransport { - protected pendingMessageRequests: ProviderMessageRequest[] = [] - protected responseCallbacks = new Map() - - protected state: OpenState - protected confirmationOnly: boolean = false - protected events: TypedEventEmitter = new EventEmitter() as TypedEventEmitter - - protected openPayload: { sessionId?: string; session?: WalletSession } | undefined - protected connectPayload: ConnectDetails | undefined - protected accountsChangedPayload: { accounts: string[]; origin?: string } | undefined - protected networksPayload: NetworkConfig[] | undefined - protected walletContextPayload: commons.context.VersionedContext | undefined - - protected _sessionId?: string - protected _init: InitState - protected _registered: boolean - - readonly projectAccessKey?: string - - constructor(projectAccessKey?: string) { - this.state = OpenState.CLOSED - this._registered = false - this._init = InitState.NIL - - this.projectAccessKey = projectAccessKey - } - - get registered(): boolean { - return this._registered - } - - register() { - throw new Error('abstract method') - } - - unregister() { - throw new Error('abstract method') - } - - openWallet(path?: string, intent?: OpenWalletIntent, networkId?: string | number) { - throw new Error('abstract method') - } - - closeWallet() { - throw new Error('abstract method') - } - - isOpened(): boolean { - return this.registered && this.state === OpenState.OPENED - } - - isConnected(): boolean { - // if we're registered, and we have the account details, then we are connected - const session = this.openPayload?.session - return ( - this.registered && - session !== undefined && - !!session.accountAddress && - session.accountAddress.length === 42 && - !!session.networks && - session.networks.length > 0 - ) - } - - async request(request: { method: string; params?: any[]; chainId?: number }): Promise { - if (this.state === OpenState.CLOSED) { - // flag the wallet to auto-close once user submits input. ie. - // prompting to sign a message or transaction - this.confirmationOnly = true - } - - // open/focus the wallet. - // automatically open the wallet when a provider request makes it here. - // - // NOTE: if we're not signed in, then the provider will fail, users must first connect+sign in. - // - // TODO: how does this behave with a session has expired? - this.openWallet(undefined, { type: 'jsonRpcRequest', method: request.method }, request.chainId) - - if (!this.isOpened()) { - await this.waitUntilOpened() // will throw on timeout - } - - const response = await this.sendMessageRequest({ - idx: nextMessageIdx(), - type: EventType.MESSAGE, - data: request, - chainId: request.chainId, - clientVersion: VERSION, - projectAccessKey: this.projectAccessKey - }) - - return response.data - } - - // handleMessage will handle message received from the remote wallet - handleMessage(message: ProviderMessage) { - // init incoming for initial handshake with transport. - // always respond to INIT messages, e.g. on popup window reload - if (message.type === EventType.INIT) { - logger.debug('MessageProvider, received INIT message', message) - const { nonce } = message.data as { nonce: string } - if (!nonce || nonce.length == 0) { - logger.error('invalid init nonce') - return - } - this._init = InitState.OK - this.sendMessage({ - idx: -1, - type: EventType.INIT, - data: { - sessionId: this._sessionId, - nonce: nonce - }, - clientVersion: VERSION - }) - } - - if (this._init !== InitState.OK) { - // if provider is not init'd, then we drop any received messages. the only - // message we will process is of event type 'init', as our acknowledgement - return - } - - // message is either a notification, or its a ProviderMessageResponse - logger.debug('RECEIVED MESSAGE FROM WALLET', message.idx, message) - - const requestIdx = message.idx - const responseCallback = this.responseCallbacks.get(requestIdx) - if (requestIdx) { - this.responseCallbacks.delete(requestIdx) - } - - // OPEN response - // - // Flip opened flag, and flush the pending queue - if (message.type === EventType.OPEN && !this.isOpened()) { - if (this._sessionId && this._sessionId !== message.data?.sessionId) { - logger.debug('open event received from wallet, but does not match sessionId', this._sessionId) - return - } - - // check if open error occured due to invalid defaultNetworkId - if (message.data?.error) { - const err = new Error(`opening wallet failed: received ${message.data?.error}`) - logger.error(err) - this.close() - throw err - } - - // success! - this.state = OpenState.OPENED - this.openPayload = message.data - this.events.emit('open', this.openPayload!) - - // flush pending requests when connected - if (this.pendingMessageRequests.length !== 0) { - const pendingMessageRequests = this.pendingMessageRequests.splice(0, this.pendingMessageRequests.length) - - pendingMessageRequests.forEach(async pendingMessageRequest => { - this.sendMessage(pendingMessageRequest) - }) - } - - return - } - - // MESSAGE resposne - if (message.type === EventType.MESSAGE) { - // Require user confirmation, bring up wallet to prompt for input then close - // TODO: perhaps apply technique like in multicall to queue messages within - // a period of time, then close the window if responseCallbacks is empty, this is better. - if (this.confirmationOnly) { - setTimeout(() => { - if (this.responseCallbacks.size === 0) { - this.closeWallet() - } - }, 500) // TODO: be smarter about timer as we're processing the response callbacks.. - } - - if (!responseCallback) { - // NOTE: this would occur if 'idx' isn't set, which should never happen - // or when we register two handler, or duplicate messages with the same idx are sent, - // all of which should be prevented prior to getting to this point - throw new Error('impossible state') - } - - // Callback to original caller - if (responseCallback) { - this.events.emit('message', message) - responseCallback((message as ProviderMessageResponse).data.error, message) - return - } - } - - // ACCOUNTS_CHANGED -- when a user logs in or out - if (message.type === EventType.ACCOUNTS_CHANGED) { - this.accountsChangedPayload = { accounts: [] } - if (message.data && message.data.length > 0) { - this.accountsChangedPayload = { - accounts: [ethers.getAddress(message.data[0])], - origin: message.origin - } - this.events.emit('accountsChanged', this.accountsChangedPayload.accounts, this.accountsChangedPayload.origin) - } else { - this.events.emit('accountsChanged', [], message.origin) - } - return - } - - // CHAIN_CHANGED -- when a user changes their default chain - if (message.type === EventType.CHAIN_CHANGED) { - this.events.emit('chainChanged', message.data, message.origin) - return - } - - // NOTIFY NETWORKS -- when a user connects or logs in - if (message.type === EventType.NETWORKS) { - this.networksPayload = message.data - this.events.emit('networks', this.networksPayload!) - return - } - - // NOTIFY WALLET_CONTEXT -- when a user connects or logs in - if (message.type === EventType.WALLET_CONTEXT) { - this.walletContextPayload = message.data - this.events.emit('walletContext', this.walletContextPayload!) - return - } - - // NOTIFY CLOSE -- when wallet instructs to close - if (message.type === EventType.CLOSE) { - if (this.state !== OpenState.CLOSED) { - this.close(message.data) - } - } - - // NOTIFY CONNECT -- when wallet instructs we've connected - if (message.type === EventType.CONNECT) { - this.connectPayload = message.data - this.events.emit('connect', this.connectPayload!) - } - - // NOTIFY DISCONNECT -- when wallet instructs to disconnect - if (message.type === EventType.DISCONNECT) { - if (this.isConnected()) { - this.events.emit('disconnect', message.data, message.origin) - this.close() - } - } - } - - // sendMessageRequest sends a ProviderMessageRequest over the wire to the wallet - sendMessageRequest = async (message: ProviderMessageRequest): Promise => { - return new Promise((resolve, reject) => { - if ((!message.idx || message.idx <= 0) && message.type !== 'init') { - reject(new Error('message idx not set')) - } - - const responseCallback: ProviderMessageResponseCallback = (error: ProviderRpcError, response?: ProviderMessageResponse) => { - if (error) { - reject(error) - } else if (response) { - resolve(response) - } else { - throw new Error('no valid response to return') - } - } - - const idx = message.idx - if (!this.responseCallbacks.get(idx)) { - this.responseCallbacks.set(idx, responseCallback) - } else { - reject(new Error('duplicate message idx, should never happen')) - } - - if (!this.isOpened()) { - logger.debug('pushing to pending requests', message) - this.pendingMessageRequests.push(message) - } else { - this.sendMessage(message) - } - }) - } - - sendMessage(message: ProviderMessage) { - throw new Error('abstract method') - } - - on(event: K, fn: ProviderEventTypes[K]) { - this.events.on(event, fn as any) - } - - once(event: K, fn: ProviderEventTypes[K]) { - this.events.once(event, fn as any) - } - - emit(event: K, ...args: Parameters): boolean { - return this.events.emit(event, ...(args as any)) - } - - waitUntilOpened = async (openTimeout = PROVIDER_OPEN_TIMEOUT): Promise => { - let opened = false - return Promise.race([ - new Promise((_, reject) => { - const timeout = setTimeout(() => { - clearTimeout(timeout) - // only emit close if the timeout wins the race - if (!opened) { - this.state = OpenState.CLOSED - this.events.emit('close', { code: 1005, message: 'opening wallet timed out' } as ProviderRpcError) - } - reject(new Error('opening wallet timed out')) - }, openTimeout) - }), - new Promise(resolve => { - if (this.isOpened()) { - opened = true - resolve(this.openPayload?.session) - return - } - this.events.once('open', (openInfo: { session?: WalletSession }) => { - this.openPayload = openInfo - opened = true - resolve(openInfo.session) - }) - }) - ]) - } - - waitUntilConnected = async (): Promise => { - await this.waitUntilOpened() - - const connect = new Promise(resolve => { - if (this.connectPayload) { - resolve(this.connectPayload) - return - } - - this.events.once('connect', connectDetails => { - this.connectPayload = connectDetails - resolve(connectDetails) - }) - }) - - const closeWallet = new Promise((_, reject) => { - this.events.once('close', error => { - if (error) { - reject(new Error(`wallet closed due to ${JSON.stringify(error)}`)) - } else { - reject(new Error(`user closed the wallet`)) - } - }) - }) - - return Promise.race([connect, closeWallet]) - } - - protected close(error?: ProviderRpcError) { - if (this.state === OpenState.CLOSED) return - - this.state = OpenState.CLOSED - this.confirmationOnly = false - this._sessionId = undefined - logger.info('closing wallet and flushing!') - - // flush pending requests and return error to all callbacks - this.pendingMessageRequests.length = 0 - this.responseCallbacks.forEach(responseCallback => { - responseCallback({ - ...new Error('wallet closed'), - code: 4001 - }) - }) - this.responseCallbacks.clear() - - this.connectPayload = undefined - this.openPayload = undefined - this.accountsChangedPayload = undefined - this.networksPayload = undefined - this.walletContextPayload = undefined - - this.events.emit('close', error) - } -} diff --git a/old/packages/provider/src/transports/base-wallet-transport.ts b/old/packages/provider/src/transports/base-wallet-transport.ts deleted file mode 100644 index 36e2fc825..000000000 --- a/old/packages/provider/src/transports/base-wallet-transport.ts +++ /dev/null @@ -1,484 +0,0 @@ -import { ethers } from 'ethers' -import { - WalletTransport, - ProviderMessage, - ProviderMessageRequest, - EventType, - ProviderMessageResponse, - ProviderRpcError, - InitState, - ConnectDetails, - WalletSession, - TransportSession -} from '../types' - -import { WalletRequestHandler } from './wallet-request-handler' - -import { NetworkConfig, findSupportedNetwork } from '@0xsequence/network' -import { logger, sanitizeAlphanumeric, sanitizeHost, sanitizeNumberString } from '@0xsequence/utils' -import { AuthorizationOptions } from '@0xsequence/auth' - -import { PROVIDER_OPEN_TIMEOUT } from './base-provider-transport' -import { isBrowserExtension, useBestStore } from '../utils' -import { VERSION, commons } from '@0xsequence/core' - -const TRANSPORT_SESSION_LS_KEY = '@sequence.transportSession' - -export abstract class BaseWalletTransport implements WalletTransport { - protected walletRequestHandler: WalletRequestHandler - protected _sessionId: string - protected _registered: boolean - - protected _init: InitState - protected _initNonce: string - protected _initCallback?: (error?: string) => void - - // appOrigin identifies the dapp's origin which opened the app. A transport - // will auto-detect and set this value if it can. This is determined - // as the parent app/window which opened the wallet. - protected appOrigin?: string - - constructor(walletRequestHandler: WalletRequestHandler) { - this.walletRequestHandler = walletRequestHandler - this._init = InitState.NIL - - this.walletRequestHandler.on('connect', (connectDetails: ConnectDetails) => { - if (!this.registered) return - // means user has logged in and wallet is connected to the app - this.notifyConnect(connectDetails) - }) - - this.walletRequestHandler.on('disconnect', (error?: ProviderRpcError, origin?: string) => { - if (!this.registered) return - // means user has logged out the app / disconnected wallet from the app - this.notifyDisconnect(error, origin) - }) - - this.walletRequestHandler.on('accountsChanged', (accounts: string[], origin?: string) => { - if (!this.registered) return - this.notifyAccountsChanged(accounts, origin) - }) - - this.walletRequestHandler.on('networks', (networks: NetworkConfig[]) => { - if (!this.registered) return - this.notifyNetworks(networks) - if (!networks || networks.length === 0) { - this.notifyChainChanged('0x0') - } else { - this.notifyChainChanged(ethers.toQuantity(networks.find(network => network.isDefaultChain)!.chainId)) - } - }) - - this.walletRequestHandler.on('chainChanged', (chainIdHex: string, origin?: string) => { - this.notifyChainChanged(chainIdHex, origin) - }) - - this.walletRequestHandler.on('walletContext', (walletContext: commons.context.VersionedContext) => { - if (!this.registered || !walletContext) return - this.notifyWalletContext(walletContext) - }) - - this.walletRequestHandler.on('close', (error?: ProviderRpcError) => { - if (!this.registered) return - this.notifyClose(error) - }) - } - - get registered(): boolean { - return this._registered - } - - register() { - throw new Error('abstract method') - } - - unregister() { - throw new Error('abstract method') - } - - request(request: { method: string; params?: any[]; chainId?: number }): Promise { - throw new Error('abstract method') - } - - handleMessage = async (message: ProviderMessage) => { - const request = message - - // ensure initial handshake is complete before accepting - // other kinds of messages. - if (this._init !== InitState.OK) { - if (request.type === EventType.INIT) { - if (this.isValidInitAck(message)) { - // successful init - if (this._initCallback) this._initCallback() - } else { - // failed init - if (this._initCallback) this._initCallback('invalid init') - return - } - } else { - // we expect init message first. do nothing here. - } - return - } - - // ensure signer is ready to handle requests - // if (this.walletRequestHandler.getSigner() === undefined) { - // await this.walletRequestHandler.signerReady() - // } - - // handle request - switch (request.type) { - case EventType.OPEN: { - if (this._init !== InitState.OK) return - const session: TransportSession = { - sessionId: request.data.sessionId, - intent: request.data.intent, - networkId: request.data.networkId - } - await this.open(session) - return - } - - case EventType.CLOSE: { - if (this._init !== InitState.OK) return - // noop. just here to capture the message so event emitters may be notified - return - } - - case EventType.MESSAGE: { - const response = await this.walletRequestHandler.sendMessageRequest(request) - this.sendMessage(response) - - if (response.data.error) { - // TODO: for certain errors, whenever we want to render something to the UI - // we should throw - } - return - } - - default: { - logger.error(`unexpected payload type ${request.type}`) - } - } - } - - // sendMessageRequest sends a ProviderMessageRequest to the wallet post-message transport - sendMessageRequest = async (message: ProviderMessageRequest): Promise => { - return this.walletRequestHandler.sendMessageRequest(message) - } - - sendMessage(message: ProviderMessage) { - throw new Error('abstract method') - } - - notifyOpen(openInfo: { chainId?: string; sessionId?: string; session?: WalletSession; error?: string }) { - const { chainId, sessionId, session, error } = openInfo - this.sendMessage({ - idx: -1, - type: EventType.OPEN, - data: { - chainId, - sessionId, - session, - error - }, - clientVersion: VERSION - }) - } - - notifyClose(error?: ProviderRpcError) { - this.sendMessage({ - idx: -1, - type: EventType.CLOSE, - data: error ? { error } : null, - clientVersion: VERSION - }) - } - - notifyConnect(connectDetails: ConnectDetails) { - this.sendMessage({ - idx: -1, - type: EventType.CONNECT, - data: connectDetails, - clientVersion: VERSION - }) - } - - notifyDisconnect(error?: ProviderRpcError, origin?: string) { - this.sendMessage({ - idx: -1, - type: EventType.DISCONNECT, - data: error ? { error } : null, - origin, - clientVersion: VERSION - }) - } - - notifyAccountsChanged(accounts: string[], origin?: string) { - this.sendMessage({ - idx: -1, - type: EventType.ACCOUNTS_CHANGED, - data: accounts, - origin, - clientVersion: VERSION - }) - } - - notifyChainChanged(chainIdHex: string, origin?: string) { - this.sendMessage({ - idx: -1, - type: EventType.CHAIN_CHANGED, - data: chainIdHex, - origin, - clientVersion: VERSION - }) - } - - notifyNetworks(networks: NetworkConfig[]) { - this.sendMessage({ - idx: -1, - type: EventType.NETWORKS, - data: networks, - clientVersion: VERSION - }) - } - - notifyWalletContext(walletContext: commons.context.VersionedContext) { - this.sendMessage({ - idx: -1, - type: EventType.WALLET_CONTEXT, - data: walletContext, - clientVersion: VERSION - }) - } - - protected isValidInitAck(message: ProviderMessage): boolean { - if (this._init === InitState.OK) { - // we're already in init state, we shouldn't handle this message - logger.warn("isValidInitAck, already in init'd state, so inquiry is invalid.") - return false - } - if (message.type !== EventType.INIT) { - logger.warn('isValidInitAck, invalid message type, expecting init') - return false - } - - const { sessionId, nonce } = message.data as any as { sessionId: string; nonce: string } - if (!sessionId || sessionId.length === 0 || !nonce || nonce.length === 0) { - logger.error('invalid init ack') - return false - } - if (sessionId !== this._sessionId || nonce !== this._initNonce) { - logger.error('invalid init ack match') - return false - } - - // all checks pass, its true - return true - } - - private init(): Promise { - return new Promise((resolve, reject) => { - // avoid re-init`ing, or if there is a transport which doesn't require - // it, then it may set this._init to OK in its constructor. - if (this._init === InitState.OK) { - resolve() - return - } - if (this._init !== InitState.NIL || this._initCallback) { - reject('transport init is in progress') - return - } - - // start init timeout, if we don't receive confirmation - // from provider within this amount of time, then we timeout - const initTimeout = setTimeout(() => { - logger.warn('transport init timed out') - if (this._initCallback) { - this._initCallback('transport init timed out') - } - }, PROVIDER_OPEN_TIMEOUT / 2) - - // setup callback as we receive the init message async in the handleMessage function - this._initCallback = (error?: string) => { - this._initCallback = undefined // reset - clearTimeout(initTimeout) - if (error) { - reject(error) - } else { - this._init = InitState.OK - resolve() - } - } - - // send init request with random nonce to the provider, where we expect - // for the provider to echo it back to us as complete handshake - this._initNonce = `${performance.now()}` - this.sendMessage({ - idx: -1, - type: EventType.INIT, - data: { nonce: this._initNonce }, - clientVersion: VERSION - }) - this._init = InitState.SENT_NONCE - - // NOTE: the promise will resolve in the _initCallback method - // which will be called from either handleMessage or the initTimeout - }) - } - - protected open = async ({ sessionId, intent, networkId }: TransportSession): Promise => { - if (sessionId) { - this._sessionId = sanitizeNumberString(sessionId) - // persist transport session in localstorage for restoring after redirect/reload - this.saveTransportSession({ sessionId, intent, networkId }) - } - - this.walletRequestHandler.setOpenIntent(intent) - - // init handshake for certain transports, before we can open the communication. - // - // for example, with the window-transport, we have to exchange messages to determine the - // origin host of the dapp. - await this.init() - - // determine chainId from networkId (string or number) - let chainId: number | undefined = undefined - try { - if (networkId) { - const network = findSupportedNetwork(networkId) - if (network) { - chainId = network.chainId - } else { - throw new Error(`unknown network ${networkId}`) - } - } else { - // if not provided, use defaultChainId - chainId = this.walletRequestHandler.defaultChainId() - } - } catch (err) { - console.error(err) - } - - // Prepare connect options from intent - if (intent && intent.type === 'connect' && intent.options) { - const connectOptions = intent.options - const authorizeOptions: AuthorizationOptions = connectOptions // overlapping types - - // Sanity/integrity check the intent payload, and set authorization origin - // if its been determined as part of the init handshake from earlier. - if (this.appOrigin && authorizeOptions?.origin) { - if (!isBrowserExtension()) { - if (authorizeOptions.origin !== this.appOrigin) { - throw new Error('origin is invalid') - } else { - // request origin and derived origins match, lets carry on - } - } - } else if (!this.appOrigin && authorizeOptions?.origin) { - // ie. when we can't determine the origin in our transport, but dapp provides it to us. - // we just sanitize the origin host. - connectOptions.origin = sanitizeHost(authorizeOptions.origin) - } else if (this.appOrigin) { - // ie. when we auto-determine the origin such as in window-transport - connectOptions.origin = this.appOrigin - } - if (connectOptions.app) { - connectOptions.app = sanitizeAlphanumeric(connectOptions.app) - } - - if (connectOptions.networkId) { - networkId = connectOptions.networkId - } else if (networkId) { - connectOptions.networkId = networkId - } - - // Set connect options on the walletRequestHandler as our primary - // wallet controller, and fall back to networkId if necessary - this.walletRequestHandler.setConnectOptions(connectOptions) - } else { - this.walletRequestHandler.setConnectOptions(undefined) - } - - // ensure signer is ready - await this.walletRequestHandler.getAccount() - - // Notify open and proceed to prompt for connection if intended - if (!(await this.walletRequestHandler.isSignedIn())) { - // open wallet without a specific connected chainId, as the user is not signed in - this.notifyOpen({ - sessionId: this._sessionId - }) - return true - } else { - // prompt user with a connect request. the options will be used as previously set above. - // upon success, the walletRequestHandler will notify the dapp with the ConnectDetails. - // upon cancellation by user, the walletRequestHandler will throw an error - - if (intent && intent.type === 'connect') { - // Failed to set default network on open - // Fail silently here so we can continue with connect flow and ask - // user to connect on a different network if necessary - if (!chainId || chainId <= 0) { - console.log('Failed to set default network on open') - } - - // notify wallet is opened, without session details - this.notifyOpen({ - sessionId: this._sessionId - }) - - try { - const connectDetails = await this.walletRequestHandler.promptConnect(intent.options) - if (connectDetails.connected) { - this.walletRequestHandler.notifyConnect(connectDetails) - } - } catch (err) { - logger.warn('promptConnect not connected:', err) - } finally { - // auto-close by default, unless intent is to keep open - if (!intent.options || intent.options.keepWalletOpened !== true) { - this.notifyClose() - } - } - } else { - // Using default network - - // Failed to set default network on open -- quit + close - if (!chainId || chainId <= 0) { - this.notifyOpen({ - sessionId: this._sessionId, - error: `failed to open wallet on network ${networkId}` - }) - return false - } - - // user is already connected, notify session details. - // TODO: in future, keep list if 'connected' dapps / sessions in the session - // controller, and only sync with allowed apps - this.notifyOpen({ - sessionId: this._sessionId, - chainId: `${chainId}`, - session: await this.walletRequestHandler.walletSession(chainId) - }) - } - } - - return true - } - - private saveTransportSession = (session: TransportSession) => { - useBestStore().setItem(TRANSPORT_SESSION_LS_KEY, JSON.stringify(session)) - } - - protected getCachedTransportSession = async (): Promise => { - const session = useBestStore().getItem(TRANSPORT_SESSION_LS_KEY) - - try { - return session ? (JSON.parse(session) as TransportSession) : null - } catch (err) { - console.error(`unable to parse transport session: ${session}`) - return null - } - } -} diff --git a/old/packages/provider/src/transports/extension-transport/base-injected-transport.ts b/old/packages/provider/src/transports/extension-transport/base-injected-transport.ts deleted file mode 100644 index 94d734dbb..000000000 --- a/old/packages/provider/src/transports/extension-transport/base-injected-transport.ts +++ /dev/null @@ -1,101 +0,0 @@ -import { JsonRpcRequest, JsonRpcResponse } from '@0xsequence/network' -import { logger } from '@0xsequence/utils' -import { EventEmitter2 as EventEmitter } from 'eventemitter2' -import { - ProviderMessageResponseCallback, - ProviderMessage, - EventType, - ProviderMessageRequest, - ProviderMessageResponse -} from '../../types' - -export interface Stream { - on(ev: string | symbol, fn: (...args: any[]) => void): void - writable: boolean - write(chunk: any, cb?: (error: Error | null | undefined) => void): boolean -} - -// to be used on injected window.ethereum EIP1193 proxy -export abstract class BaseInjectedTransport extends EventEmitter { - protected responseCallbacks = new Map() - - private _messageIdx = 0 - protected nextMessageIdx = () => ++this._messageIdx - - constructor(private stream: Stream) { - super() - - this.stream.on('data', this.handleMessage) - } - - private handleMessage = (message: ProviderMessage) => { - if (!message.type || !message.data) { - return - } - - logger.info('[received message]', message) - - const requestIdx = message.idx - const responseCallback = this.responseCallbacks.get(requestIdx) - if (requestIdx) { - this.responseCallbacks.delete(requestIdx) - } - - switch (message.type) { - case EventType.MESSAGE: - if (responseCallback) { - this.emit(EventType.MESSAGE, message) - responseCallback(message.data.error, message) - } else { - // NOTE: this would occur if 'idx' isn't set, which should never happen - // or when we register two handler, or duplicate messages with the same idx are sent, - // all of which should be prevented prior to getting to this point - throw new Error('impossible state') - } - break - case EventType.DISCONNECT: - case EventType.ACCOUNTS_CHANGED: - case EventType.CHAIN_CHANGED: - this.emit(message.type, message.data) - break - default: - console.error('unknown message type', message) - break - } - } - - protected sendMessageRequest = async (message: ProviderMessageRequest): Promise => { - return new Promise((resolve, reject) => { - if (!message.idx || message.idx <= 0) { - reject(new Error('message idx not set')) - } - - const responseCallback: ProviderMessageResponseCallback = (error: any, response?: ProviderMessageResponse) => { - if (error) { - reject(error) - } else if (response) { - resolve(response) - } else { - throw new Error('no valid response to return') - } - } - - const { idx } = message - if (!this.responseCallbacks.get(idx)) { - this.responseCallbacks.set(idx, responseCallback) - } else { - reject(new Error('duplicate message idx, should never happen')) - } - - this.sendMessage(message) - }) - } - - private sendMessage(message: ProviderMessage) { - if (!this.stream.writable) { - console.error('window post message stream is not writable') - } - - this.stream.write(message) - } -} diff --git a/old/packages/provider/src/transports/extension-transport/extension-message-handler.ts b/old/packages/provider/src/transports/extension-transport/extension-message-handler.ts deleted file mode 100644 index 88449b564..000000000 --- a/old/packages/provider/src/transports/extension-transport/extension-message-handler.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { WalletRequestHandler } from '../wallet-request-handler' -import { BaseWalletTransport } from '../base-wallet-transport' -import { InitState, ProviderMessage } from '../../types' -import { Runtime } from 'webextension-polyfill' -import { logger } from '@0xsequence/utils' - -export const CHANNEL_ID = 'sequence-extension-message-handler' - -export class ExtensionMessageHandler extends BaseWalletTransport { - private port: any - - constructor( - walletRequestHandler: WalletRequestHandler, - public runtime: Runtime.Static - ) { - super(walletRequestHandler) - this._init = InitState.OK - } - - register() { - this._registered = true - this.port = this.runtime.connect({ name: CHANNEL_ID }) - } - - sendMessage(message: ProviderMessage) { - logger.info('[ExtensionMessageHandler send]', message) - this.port.postMessage(message) - } -} diff --git a/old/packages/provider/src/transports/extension-transport/extension-message-provider.ts b/old/packages/provider/src/transports/extension-transport/extension-message-provider.ts deleted file mode 100644 index a65f214b0..000000000 --- a/old/packages/provider/src/transports/extension-transport/extension-message-provider.ts +++ /dev/null @@ -1,41 +0,0 @@ -import { InitState, OpenWalletIntent, ProviderMessage } from '../../types' -import { BaseProviderTransport } from '../base-provider-transport' -import { CHANNEL_ID } from './extension-message-handler' - -import { Runtime } from 'webextension-polyfill' - -export class ExtensionMessageProvider extends BaseProviderTransport { - constructor(runtime: Runtime.Static) { - super() - - runtime.onConnect.addListener(port => { - if (port.name === CHANNEL_ID) { - this._init = InitState.OK - - port.onMessage.addListener((message: ProviderMessage) => { - this.handleMessage(message) - }) - } - }) - } - - register = () => { - this._registered = true - } - - sendMessage(message: ProviderMessage) { - //noop - } - - unregister() { - //noop - } - - openWallet(path?: string, intent?: OpenWalletIntent, networkId?: string | number) { - //noop - } - - closeWallet() { - //noop - } -} diff --git a/old/packages/provider/src/transports/extension-transport/index.ts b/old/packages/provider/src/transports/extension-transport/index.ts deleted file mode 100644 index af015cdc0..000000000 --- a/old/packages/provider/src/transports/extension-transport/index.ts +++ /dev/null @@ -1,3 +0,0 @@ -export * from './extension-message-handler' -export * from './extension-message-provider' -export * from './base-injected-transport' diff --git a/old/packages/provider/src/transports/index.ts b/old/packages/provider/src/transports/index.ts deleted file mode 100644 index 35f06a3af..000000000 --- a/old/packages/provider/src/transports/index.ts +++ /dev/null @@ -1,8 +0,0 @@ -export * from './base-provider-transport' -export * from './base-wallet-transport' -export * from './proxy-transport' -export * from './mux-transport' -export * from './window-transport' -export * from './wallet-request-handler' -export * from './extension-transport' -export * from './unreal-transport' diff --git a/old/packages/provider/src/transports/mux-transport/index.ts b/old/packages/provider/src/transports/mux-transport/index.ts deleted file mode 100644 index 6a69b9e8d..000000000 --- a/old/packages/provider/src/transports/mux-transport/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './mux-message-provider' diff --git a/old/packages/provider/src/transports/mux-transport/mux-message-provider.ts b/old/packages/provider/src/transports/mux-transport/mux-message-provider.ts deleted file mode 100644 index e9b43e8d7..000000000 --- a/old/packages/provider/src/transports/mux-transport/mux-message-provider.ts +++ /dev/null @@ -1,248 +0,0 @@ -import { - ProviderMessage, - ProviderTransport, - ProviderEventTypes, - ProviderMessageRequest, - ProviderMessageResponse, - WalletSession, - OpenWalletIntent, - ConnectDetails -} from '../../types' - -import { ProxyMessageChannelPort, ProxyMessageProvider } from '../proxy-transport' -import { Runtime } from 'webextension-polyfill' -import { UnrealMessageProvider } from '../unreal-transport' -import { ExtensionMessageProvider } from '../extension-transport' -import { WindowMessageProvider } from '../window-transport' -import { JsonRpcResponse } from '@0xsequence/network' - -export type MuxTransportTemplate = { - walletAppURL?: string - - // WindowMessage transport (optional) - windowTransport?: { - enabled: boolean - } - - // ProxyMessage transport (optional) - proxyTransport?: { - enabled: boolean - appPort?: ProxyMessageChannelPort - } - - // Extension transport (optional) - extensionTransport?: { - enabled: boolean - runtime: Runtime.Static - } - - // Unreal Engine transport (optional) - unrealTransport?: { - enabled: boolean - } -} - -export function isMuxTransportTemplate(obj: any): obj is MuxTransportTemplate { - return ( - obj && - typeof obj === 'object' && - ((obj.windowTransport && typeof obj.windowTransport === 'object') || - (obj.proxyTransport && typeof obj.proxyTransport === 'object') || - (obj.extensionTransport && typeof obj.extensionTransport === 'object') || - (obj.unrealTransport && typeof obj.unrealTransport === 'object')) && - // One of the transports must be enabled - ((obj.windowTransport && obj.windowTransport.enabled) || - (obj.proxyTransport && obj.proxyTransport.enabled) || - (obj.extensionTransport && obj.extensionTransport.enabled) || - (obj.unrealTransport && obj.unrealTransport.enabled)) - ) -} - -export class MuxMessageProvider implements ProviderTransport { - private messageProviders: ProviderTransport[] - private provider: ProviderTransport | undefined - - constructor(messageProviders: ProviderTransport[] = []) { - this.messageProviders = messageProviders - this.provider = undefined - } - - static new(template: MuxTransportTemplate, projectAccessKey?: string): MuxMessageProvider { - const muxMessageProvider = new MuxMessageProvider() - - if (template.windowTransport?.enabled && typeof window === 'object' && template.walletAppURL) { - const windowMessageProvider = new WindowMessageProvider(template.walletAppURL, projectAccessKey) - muxMessageProvider.add(windowMessageProvider) - } - - if (template.proxyTransport?.enabled) { - const proxyMessageProvider = new ProxyMessageProvider(template.proxyTransport.appPort!) - muxMessageProvider.add(proxyMessageProvider) - } - - if (template.extensionTransport?.enabled) { - const extensionMessageProvider = new ExtensionMessageProvider(template.extensionTransport.runtime) - muxMessageProvider.add(extensionMessageProvider) - - // NOTE/REVIEW: see note in mux-message-provider - // - // We don't add the extensionMessageProvider here because we don't send requests to it anyways, we seem to - // send all requests to the WindowMessageProvider anyways. By allowing it, if browser restarts, it will break - // the entire extension because messageProvider.provider will be undefined. So this is a hack to fix it. - } - - if (template.unrealTransport?.enabled && template.windowTransport && template.walletAppURL) { - const unrealMessageProvider = new UnrealMessageProvider(template.walletAppURL) - muxMessageProvider.add(unrealMessageProvider) - } - - muxMessageProvider.register() - - return muxMessageProvider - } - - add(...messageProviders: ProviderTransport[]) { - this.messageProviders.push(...messageProviders) - } - - register = () => { - if (this.messageProviders.length === 1) { - this.provider = this.messageProviders[0] - this.provider.register() - return - } - - // REVIEW/NOTE: ........ this method does not work for the chrome-extension. The issue becomes - // when the browser quits or restarts, the "open" event is never triggered. Perhaps the code here is fine, - // or maybe its not. What should happen is when a dapp makes a request, it will call openWallet - // below, in which case one of the events will register. So perhaps this is fine. - this.messageProviders.forEach(m => { - m.register() - - m.once('open', () => { - // the first one to open is the winner, and others will be unregistered - if (!this.provider) { - this.provider = m - - // unregister other providers - this.messageProviders.forEach(m => { - if (this.provider !== m) { - m.unregister() - } - }) - } - }) - }) - } - - unregister = () => { - this.messageProviders.forEach(m => m.unregister()) - this.provider = undefined - } - - openWallet = (path?: string, intent?: OpenWalletIntent, networkId?: string | number): void => { - if (this.provider) { - this.provider.openWallet(path, intent, networkId) - return - } - this.messageProviders.forEach(m => m.openWallet(path, intent, networkId)) - } - - closeWallet() { - if (this.provider) { - this.provider.closeWallet() - } - } - - isOpened(): boolean { - if (this.provider) { - return this.provider.isOpened() - } - return false - } - - isConnected(): boolean { - if (this.provider) { - return this.provider.isConnected() - } - return false - } - - on(event: K, fn: ProviderEventTypes[K]) { - if (this.provider) { - this.provider.on(event, fn) - return - } - this.messageProviders.forEach(m => { - m.on(event, fn) - }) - } - - once(event: K, fn: ProviderEventTypes[K]) { - if (this.provider) { - this.provider.once(event, fn) - return - } - this.messageProviders.forEach(m => { - m.once(event, fn) - }) - } - - emit(event: K, ...args: Parameters): boolean { - if (this.provider) { - return this.provider.emit(event, ...args) - } - for (let i = 0; i < this.messageProviders.length; i++) { - this.messageProviders[i].emit(event, ...args) - } - return true - } - - request(request: { method: string; params?: any[]; chainId?: number }): Promise { - if (!this.provider) { - throw new Error('impossible state, wallet must be opened first') - } - return this.provider.request(request) - } - - sendMessage(message: ProviderMessage) { - if (!message.idx || message.idx <= 0) { - throw new Error('message idx is empty') - } - - if (this.provider) { - this.provider.sendMessage(message) - } else { - throw new Error('impossible state, wallet must be opened first') - } - } - - sendMessageRequest = async (message: ProviderMessageRequest): Promise => { - if (this.provider) { - return this.provider.sendMessageRequest(message) - } - throw new Error('impossible state, wallet must be opened first') - } - - handleMessage(message: ProviderMessage): void { - if (this.provider) { - this.provider.handleMessage(message) - return - } - throw new Error('impossible state, wallet must be opened first') - } - - waitUntilOpened = async (): Promise => { - if (this.provider) { - return this.provider.waitUntilOpened() - } - return Promise.race(this.messageProviders.map(p => p.waitUntilOpened())) - } - - waitUntilConnected = async (): Promise => { - if (this.provider) { - return this.provider.waitUntilConnected() - } - throw new Error('impossible state, wallet must be opened first') - } -} diff --git a/old/packages/provider/src/transports/proxy-transport/index.ts b/old/packages/provider/src/transports/proxy-transport/index.ts deleted file mode 100644 index dd0a69332..000000000 --- a/old/packages/provider/src/transports/proxy-transport/index.ts +++ /dev/null @@ -1,3 +0,0 @@ -export * from './proxy-message-channel' -export * from './proxy-message-provider' -export * from './proxy-message-handler' diff --git a/old/packages/provider/src/transports/proxy-transport/proxy-message-channel.ts b/old/packages/provider/src/transports/proxy-transport/proxy-message-channel.ts deleted file mode 100644 index 33f585797..000000000 --- a/old/packages/provider/src/transports/proxy-transport/proxy-message-channel.ts +++ /dev/null @@ -1,57 +0,0 @@ -import { EventEmitter2 as EventEmitter } from 'eventemitter2' -import { ProviderMessage, ProviderMessageTransport, ProviderEventTypes, TypedEventEmitter } from '../../types' - -export class ProxyMessageChannel { - app: ProxyMessageChannelPort - wallet: ProxyMessageChannelPort - - constructor() { - const port1 = new ProxyMessageChannelPort() - const port2 = new ProxyMessageChannelPort() - - port1.conn = port2 - port2.conn = port1 - - this.app = port1 - this.wallet = port2 - } -} - -export class ProxyMessageChannelPort implements ProviderMessageTransport { - conn: ProviderMessageTransport - events: TypedEventEmitter = new EventEmitter() as TypedEventEmitter - - // handle messages which hit this port - handleMessage = (message: ProviderMessage): void => { - throw new Error('ProxyMessageChannelPort is not registered') - } - - // send messages to the connected port - sendMessage = (message: ProviderMessage): void => { - this.conn.handleMessage(message) - - // trigger events - if (message.type === 'open') { - this.events.emit('open', message as any) - } - if (message.type === 'close') { - this.events.emit('close', message as any) - } - if (message.type === 'connect') { - this.events.emit('connect', message as any) - } - if (message.type === 'disconnect') { - this.events.emit('disconnect', message as any) - } - } - - on(event: K, fn: ProxyEventTypes[K]) { - this.events.on(event, fn as any) - } - - once(event: K, fn: ProxyEventTypes[K]) { - this.events.once(event, fn as any) - } -} - -export type ProxyEventTypes = Pick diff --git a/old/packages/provider/src/transports/proxy-transport/proxy-message-handler.ts b/old/packages/provider/src/transports/proxy-transport/proxy-message-handler.ts deleted file mode 100644 index 68d2e3982..000000000 --- a/old/packages/provider/src/transports/proxy-transport/proxy-message-handler.ts +++ /dev/null @@ -1,44 +0,0 @@ -import { BaseWalletTransport } from '../base-wallet-transport' -import { WalletRequestHandler } from '../wallet-request-handler' -import { InitState, ProviderMessage } from '../../types' -import { ProxyMessageChannelPort } from './proxy-message-channel' - -export class ProxyMessageHandler extends BaseWalletTransport { - private port: ProxyMessageChannelPort - - constructor(walletRequestHandler: WalletRequestHandler, port: ProxyMessageChannelPort) { - super(walletRequestHandler) - this.port = port - this._init = InitState.OK - } - - register() { - this.port.handleMessage = (message: ProviderMessage): void => { - this.handleMessage(message) - } - this._registered = true - } - - // note: we can't decide whether to restore the session within register(), because session info is - // received asyncronously via EventType.OPEN after register() is executed. - // And in the case of a redirect/reload, EventType.OPEN is not sent at all, - // because the wallet is already open. - // - // call this method from wallet redirect hander when a session restore is needed - async restoreSession() { - const cachedSession = await this.getCachedTransportSession() - if (cachedSession) { - this.open(cachedSession) - } - } - - unregister() { - // @ts-ignore - this.port.handleMessage = undefined - this._registered = false - } - - sendMessage(message: ProviderMessage) { - this.port.sendMessage(message) - } -} diff --git a/old/packages/provider/src/transports/proxy-transport/proxy-message-provider.ts b/old/packages/provider/src/transports/proxy-transport/proxy-message-provider.ts deleted file mode 100644 index c69d7c8e8..000000000 --- a/old/packages/provider/src/transports/proxy-transport/proxy-message-provider.ts +++ /dev/null @@ -1,88 +0,0 @@ -import { BaseProviderTransport } from '../base-provider-transport' - -import { ProviderMessage, OpenState, OpenWalletIntent, EventType, InitState } from '../../types' - -import { ProxyMessageChannelPort, ProxyEventTypes } from './proxy-message-channel' -import { VERSION } from '@0xsequence/core' - -export class ProxyMessageProvider extends BaseProviderTransport { - private port: ProxyMessageChannelPort - - constructor(port: ProxyMessageChannelPort) { - super() - this.state = OpenState.CLOSED - this.port = port - if (!port) { - throw new Error('port argument cannot be empty') - } - - // disable init handshake for proxy-transport, we set it to OK, to - // consider it in completed state. - this._init = InitState.OK - } - - register = () => { - this.port.handleMessage = (message: ProviderMessage): void => { - this.handleMessage(message) - } - - this.on('open', (...args: Parameters) => { - this.port.events.emit('open', ...args) - }) - this.on('close', (...args: Parameters) => { - this.port.events.emit('close', ...args) - }) - this.on('connect', (...args: Parameters) => { - this.port.events.emit('connect', ...args) - }) - this.on('disconnect', (...args: Parameters) => { - this.port.events.emit('disconnect', ...args) - }) - - this._registered = true - } - - unregister = () => { - this._registered = false - this.closeWallet() - this.events.removeAllListeners() - // @ts-ignore - this.port.handleMessage = undefined - } - - openWallet = (path?: string, intent?: OpenWalletIntent, networkId?: string | number): void => { - if (this.state === OpenState.CLOSED) { - this.state = OpenState.OPENING - const sessionId = `${performance.now()}` - this._sessionId = sessionId - this.sendMessage({ - idx: -1, - type: EventType.OPEN, - data: { - path, - intent, - networkId, - sessionId - }, - clientVersion: VERSION - }) - } - } - - closeWallet() { - this.sendMessage({ - idx: -1, - type: EventType.CLOSE, - data: null, - clientVersion: VERSION - }) - this.close() - } - - sendMessage(message: ProviderMessage) { - if (!message.idx) { - throw new Error('message idx is empty') - } - this.port.sendMessage(message) - } -} diff --git a/old/packages/provider/src/transports/unreal-transport/index.ts b/old/packages/provider/src/transports/unreal-transport/index.ts deleted file mode 100644 index 460b0a9f0..000000000 --- a/old/packages/provider/src/transports/unreal-transport/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -export * from './unreal-message-provider' -export * from './unreal-message-handler' diff --git a/old/packages/provider/src/transports/unreal-transport/overridelogs.ts b/old/packages/provider/src/transports/unreal-transport/overridelogs.ts deleted file mode 100644 index 40676823f..000000000 --- a/old/packages/provider/src/transports/unreal-transport/overridelogs.ts +++ /dev/null @@ -1,38 +0,0 @@ -import { bigintReplacer } from '@0xsequence/utils' - -interface UnrealInjectedWindow { - ue?: { - sequencewallettransport?: { - logfromjs: (message: string) => void - warnfromjs: (message: string) => void - errorfromjs: (message: string) => void - } - } - logsOverriddenForUnreal?: boolean -} -declare const window: Window & typeof globalThis & UnrealInjectedWindow - -/** - * This will redirect console logs from Sequence.js & the wallet to the Unreal console, for debugging purposes. - */ -export function overrideLogs(side: 'dapp' | 'wallet') { - if (window.ue?.sequencewallettransport && !window.logsOverriddenForUnreal) { - const t = window.ue?.sequencewallettransport - console.log = (...args: unknown[]) => { - t.logfromjs(`${side}: ${stringify(args)}`) - } - console.warn = (...args: unknown[]) => { - t.warnfromjs(`${side}: ${stringify(args)}`) - } - console.error = (...args: unknown[]) => { - t.errorfromjs(`${side}: ${stringify(args)}`) - } - window.logsOverriddenForUnreal = true - } -} - -function stringify(things: unknown[]): string { - return things - .map(a => (typeof a === 'object' ? (a instanceof Error ? a.message : JSON.stringify(a, bigintReplacer)) : String(a))) - .join(' ') -} diff --git a/old/packages/provider/src/transports/unreal-transport/unreal-message-handler.ts b/old/packages/provider/src/transports/unreal-transport/unreal-message-handler.ts deleted file mode 100644 index 9d74c72ed..000000000 --- a/old/packages/provider/src/transports/unreal-transport/unreal-message-handler.ts +++ /dev/null @@ -1,121 +0,0 @@ -import { - ProviderMessageRequest, - ProviderMessage, - EventType, - InitState, - WindowSessionParams, - OpenWalletIntent, - ProviderRpcError, - TransportSession -} from '../../types' -import { WalletRequestHandler } from '../wallet-request-handler' -import { BaseWalletTransport } from '../base-wallet-transport' -import { logger, base64DecodeObject, bigintReplacer } from '@0xsequence/utils' -import { overrideLogs } from './overridelogs' - -// all lowercase is an annoying limitation of Unreal CEF BindUObject -interface UnrealInjectedWalletWindow { - ue?: { - sequencewallettransport?: { - onmessagefromsequencejs?: (message: ProviderMessageRequest) => void - sendmessagetosequencejs: (message: string) => void - } - } -} -declare const window: Window & typeof globalThis & UnrealInjectedWalletWindow - -/** - * Initialized on Wallet side - */ -export class UnrealMessageHandler extends BaseWalletTransport { - constructor(walletRequestHandler: WalletRequestHandler) { - super(walletRequestHandler) - this._init = InitState.NIL - } - - async register(windowHref?: string | URL) { - if (window.ue?.sequencewallettransport === undefined) { - return - } - overrideLogs('wallet') - - // record open details (sessionId + default network) from the window url - const { search: rawParams } = new URL(windowHref || window.location.href) - - let session: TransportSession | null = this.getUnrealTransportSession(rawParams) - - // provider should always include sid when opening a new window - const isNewWindowSession = !!session.sessionId - - // attempt to restore previous session in the case of a redirect or window reload - if (!isNewWindowSession) { - session = await this.getCachedTransportSession() - } - - if (!session) { - logger.error('unreal session is undefined') - return - } - - // listen for window-transport requests - window.ue.sequencewallettransport.onmessagefromsequencejs = this.onMessageFromUnreal - this._registered = true - - // send open event to the app which opened us - this.open(session) - .then(opened => { - if (!opened) { - const err = `failed to open to network ${session?.networkId}` - logger.error(err) - this.notifyClose({ message: err } as ProviderRpcError) - window.close() - } - }) - .catch(e => { - const err = `failed to open to network ${session?.networkId}, due to: ${e}` - logger.error(err) - this.notifyClose({ message: err } as ProviderRpcError) - window.close() - }) - } - - unregister() { - if (window.ue?.sequencewallettransport?.onmessagefromsequencejs === this.onMessageFromUnreal) { - delete window.ue.sequencewallettransport.onmessagefromsequencejs - } - this._registered = false - } - - // onmessage is called when (the wallet) receives request messages from the dapp - // over the unreal json-messaging transport - private onMessageFromUnreal = (request: ProviderMessageRequest) => { - // Wallet always expects json-rpc request messages from a dapp - - logger.debug('RECEIVED MESSAGE', request) - - // Handle message via the base transport - this.handleMessage(request) - } - - // sendMessage sends message to the dapp window - sendMessage(message: ProviderMessage) { - if (message.type !== EventType.INIT && this._init !== InitState.OK) { - logger.error('impossible state, should not be calling postMessage until inited') - return - } - // prepare payload - const payload = JSON.stringify(message, bigintReplacer) - - // post-message to app. - window.ue?.sequencewallettransport?.sendmessagetosequencejs(payload) - } - - private getUnrealTransportSession = (windowParams: string | undefined): TransportSession => { - const params = new WindowSessionParams(windowParams) - return { - sessionId: params.get('sid'), - networkId: params.get('net'), - intent: base64DecodeObject(params.get('intent')) - } - } -} diff --git a/old/packages/provider/src/transports/unreal-transport/unreal-message-provider.ts b/old/packages/provider/src/transports/unreal-transport/unreal-message-provider.ts deleted file mode 100644 index 3b1170e07..000000000 --- a/old/packages/provider/src/transports/unreal-transport/unreal-message-provider.ts +++ /dev/null @@ -1,121 +0,0 @@ -import { OpenWalletIntent, ProviderMessage, InitState, WindowSessionParams } from '../../types' -import { BaseProviderTransport } from '../base-provider-transport' -import { base64EncodeObject, bigintReplacer } from '@0xsequence/utils' -import { overrideLogs } from './overridelogs' - -let registeredUnrealMessageProvider: UnrealMessageProvider | undefined - -// all lowercase is an annoying limitation of Unreal CEF BindUObject -interface UnrealInjectedSequenceJSWindow { - ue?: { - sequencewallettransport?: { - onmessagefromwallet?: (message: ProviderMessage) => void - sendmessagetowallet: (message: string) => void - } - } -} - -declare const window: Window & typeof globalThis & UnrealInjectedSequenceJSWindow - -/** - * Initialized on dApp side - */ -export class UnrealMessageProvider extends BaseProviderTransport { - private walletURL: URL - - constructor(walletAppURL: string) { - super() - this.walletURL = new URL(walletAppURL) - } - - register = () => { - overrideLogs('dapp') - if (registeredUnrealMessageProvider) { - // overriding the registered message provider - registeredUnrealMessageProvider.unregister() - registeredUnrealMessageProvider = this - } - - // listen for incoming messages from wallet - if (window.ue?.sequencewallettransport) { - window.ue.sequencewallettransport.onmessagefromwallet = this.onUnrealCallback - } - registeredUnrealMessageProvider = this - - this._registered = true - console.log('registering transport!') - } - - unregister = () => { - this._registered = false - this.closeWallet() - - // disable message listener - if (registeredUnrealMessageProvider === this) { - registeredUnrealMessageProvider = undefined - } - if (window.ue?.sequencewallettransport?.onmessagefromwallet === this.onUnrealCallback) { - delete window.ue.sequencewallettransport.onmessagefromwallet - } - - // clear event listeners - this.events.removeAllListeners() - } - - openWallet = (path?: string, intent?: OpenWalletIntent, networkId?: string | number): void => { - if (this.isOpened()) { - // TODO focus wallet - console.log('wallet already open!') - return - } - - console.log('opening wallet!') - // Instantiate new walletURL for this call - const walletURL = new URL(this.walletURL.href) - const windowSessionParams = new WindowSessionParams() - - if (path) { - walletURL.pathname = path.toLowerCase() - } - - // Set session, intent and network id on walletURL - this._init = InitState.NIL - this._sessionId = `${performance.now()}` - windowSessionParams.set('sid', this._sessionId) - - if (intent) { - // encode intent as base64 url-encoded param - windowSessionParams.set('intent', base64EncodeObject(intent)) - } - if (networkId) { - windowSessionParams.set('net', `${networkId}`) - } - // serialize params - walletURL.search = windowSessionParams.toString() - - console.log('opening wallet to', walletURL.href) - - window.open(walletURL.href) - } - - closeWallet() { - this.close() - } - - // onmessage, receives ProviderMessageResponse from the wallet unreal transport - private onUnrealCallback = (message: ProviderMessage) => { - if (!message) { - throw new Error('ProviderMessage object is empty') - } - - // handle message with base message provider - this.handleMessage(message) - } - - // all lowercase is an annoying limitation of Unreal CEF BindUObject - sendMessage(message: ProviderMessage) { - const postedMessage = typeof message !== 'string' ? JSON.stringify(message, bigintReplacer) : message - console.log('Sending message to wallet:', postedMessage) - window.ue?.sequencewallettransport?.sendmessagetowallet(postedMessage) - } -} diff --git a/old/packages/provider/src/transports/wallet-request-handler.ts b/old/packages/provider/src/transports/wallet-request-handler.ts deleted file mode 100644 index 911e9c089..000000000 --- a/old/packages/provider/src/transports/wallet-request-handler.ts +++ /dev/null @@ -1,941 +0,0 @@ -import { Account, AccountStatus } from '@0xsequence/account' -import { signAuthorization, AuthorizationOptions } from '@0xsequence/auth' -import { commons } from '@0xsequence/core' -import { - ChainId, - ChainIdLike, - findNetworkConfig, - findSupportedNetwork, - NetworkConfig, - EIP1193Provider, - JsonRpcResponse -} from '@0xsequence/network' -import { logger, toHexString, TypedData } from '@0xsequence/utils' -import { ethers } from 'ethers' -import { EventEmitter2 as EventEmitter } from 'eventemitter2' - -import { fromExtended } from '../extended' -import { validateTransactionRequest } from '../transactions' -import { - ConnectDetails, - ConnectOptions, - ErrSignedInRequired, - MessageToSign, - NetworkedConnectOptions, - OpenWalletIntent, - PromptConnectDetails, - ProviderEventTypes, - ProviderMessageRequest, - ProviderMessageRequestHandler, - ProviderMessageResponse, - ProviderRpcError, - TypedEventEmitter, - WalletSession -} from '../types' -import { prefixEIP191Message } from '../utils' - -const SIGNER_READY_TIMEOUT = 10000 - -export interface WalletSignInOptions { - connect?: boolean - defaultNetworkId?: number -} - -export class WalletRequestHandler implements EIP1193Provider, ProviderMessageRequestHandler { - // signer interface of the wallet. A null value means there is no signer (ie. user not signed in). An undefined - // value means the signer state is unknown, usually meaning the wallet app is booting up and initializing. Of course - // a Signer value is the actually interface to a signed-in account - private account: Account | null | undefined - private signerReadyCallbacks: Array<() => void> = [] - - private prompter: WalletUserPrompter | null - private networks: NetworkConfig[] - - private _openIntent?: OpenWalletIntent - private _connectOptions?: ConnectOptions - - private events: TypedEventEmitter = new EventEmitter() as TypedEventEmitter - - onConnectOptionsChange: ((connectOptions: ConnectOptions | undefined) => void) | undefined = undefined - - constructor(account: Account | null | undefined, prompter: WalletUserPrompter | null, networks: NetworkConfig[]) { - this.account = account - this.prompter = prompter - this.networks = networks - } - - defaultChainId(): number { - return this.prompter?.getDefaultChainId() ?? this.networks[0].chainId - } - - async signIn(account: Account | null, options: WalletSignInOptions = {}) { - this.setAccount(account) - - const { connect, defaultNetworkId } = options - - // Optionally, connect the dapp and wallet. In case connectOptions are provided, we will perform - // necessary auth request, and then notify the dapp of the 'connect' details. - // - // NOTE: if a user is signing into a dapp from a fresh state, and and auth request is made - // we don't trigger the promptConnect flow, as we consider the user just authenticated - // for this dapp, so its safe to authorize in the promptSignInConnect() which will directly - // connect after signing in. - // - // NOTE: signIn can optionally connect and notify dapp at this time for new signIn flows - if (connect) { - const connectOptions = this._connectOptions - - let connectDetails: ConnectDetails | PromptConnectDetails - - if (this.prompter !== null) { - connectDetails = await this.prompter?.promptSignInConnect(connectOptions) - } else { - connectDetails = await this.connect(connectOptions) - } - - this.notifyConnect(connectDetails) - - if (!connectOptions || connectOptions.keepWalletOpened !== true) { - this.notifyClose() - } - } - - if (defaultNetworkId && this.defaultChainId() !== defaultNetworkId) { - await this.prompter?.promptChangeNetwork(defaultNetworkId) - } - } - - signOut() { - if (this.account) { - this.notifyDisconnect() - } - - // signed out state - this.setAccount(null) - } - - signerReset() { - // resetting signer puts the wallet in an uninitialized state, which requires the app to - // re-initiatize and set the signer either as "null" (ie. no signer) or "Signer" (ie. signed in). - this.account = undefined - } - - signerReady(timeout: number = SIGNER_READY_TIMEOUT): Promise { - return new Promise((resolve, reject) => { - if (this.account !== undefined) { - resolve() - } else { - setTimeout(() => { - if (this.account === undefined) { - this.signerReadyCallbacks = [] - reject(`signerReady timed out`) - } - }, timeout) - this.signerReadyCallbacks.push(resolve) - } - }) - } - - async connect(options?: NetworkedConnectOptions): Promise { - if (!this.account) { - return { - connected: false, - chainId: '0x0', - error: 'unable to connect without signed in account' - } - } - - const networkId = options?.networkId ?? this.defaultChainId() ?? ChainId.MAINNET - const chainId = findSupportedNetwork(networkId)!.chainId - - const connectDetails: ConnectDetails = { - connected: true, - chainId: ethers.toQuantity(chainId) - } - - if (options && options.authorize) { - // Perform ethauth eip712 request and construct the ConnectDetails response - // including the auth proof - const authOptions: AuthorizationOptions = { - app: options.app, - origin: options.origin, - expiry: options.expiry, - nonce: options.authorizeNonce - } - // if (typeof(options.authorize) === 'object') { - // authOptions = { ...authOptions, ...options.authorize } - // } - - try { - // TODO: Either implement account as a signer, or change signAuthorization to accept an account - connectDetails.proof = await signAuthorization(this.account, chainId, authOptions) - } catch (err) { - logger.warn(`connect, signAuthorization failed for options: ${JSON.stringify(options)}, due to: ${err.message}`) - return { - connected: false, - chainId: '0x0', - error: `signAuthorization failed: ${err.message}` - } - } - } - - // Build session response for connect details - connectDetails.session = this.walletSession(chainId) - - return connectDetails - } - - promptConnect = async (options?: NetworkedConnectOptions): Promise => { - if (!options && !this._connectOptions) { - // this is an unexpected state and should not happen - throw new Error('prompter connect options are empty') - } - - if (!this.prompter) { - // if prompter is null, we'll auto connect - return this.connect(options) - } - - const promptConnectDetails = await this.prompter.promptConnect(options || this._connectOptions).catch(_ => { - return { connected: false } as ConnectDetails - }) - - const connectDetails: ConnectDetails = promptConnectDetails - if (connectDetails.connected && !connectDetails.session) { - connectDetails.session = await this.walletSession(options?.networkId) - } - - return promptConnectDetails - } - - // sendMessageRequest will unwrap the ProviderMessageRequest and send it to the JsonRpcHandler - // (aka, the signer in this instance) and then responds with a wrapped response of - // ProviderMessageResponse to be sent over the transport - async sendMessageRequest(message: ProviderMessageRequest): Promise { - // Older versions of the client require the response to be jsonrpc wrapped - const majorVersion = Number(message.clientVersion?.split('.')[0] || '0') - const isJsonRpcResponse = majorVersion < 2 - const jsonRpcResponse: JsonRpcResponse = { - id: message.data.id!, - jsonrpc: '2.0', - result: null, - error: undefined - } - - try { - const result = await this.request({ - method: message.data.method, - params: message.data.params, - chainId: message.chainId, - origin: message.origin, - projectAccessKey: message.projectAccessKey - }) - - return { - ...message, - data: isJsonRpcResponse ? { ...jsonRpcResponse, result } : result - } - } catch (error) { - return { - ...message, - data: isJsonRpcResponse ? { ...jsonRpcResponse, error } : { error } - } - } - } - - async request(request: { - method: string - params?: any[] - chainId?: number - origin?: string - projectAccessKey?: string - }): Promise { - await this.getAccount() - - try { - // only allow public json rpc method to the provider when user is not logged in, aka signer is not set - if ((!this.account || this.account === null) && !permittedJsonRpcMethods.includes(request.method)) { - // throw new Error(`not logged in. ${request.method} is unavailable`) - throw ErrSignedInRequired - } - - // wallet account - const account = this.account - if (!account) { - throw new Error('WalletRequestHandler: wallet account is not configured') - } - - // fetch the provider for the specific chain, or undefined will select defaultChain - const provider = this.account?.providerFor(request.chainId ?? this.defaultChainId()) - if (!provider) { - throw new Error(`WalletRequestHandler: wallet provider is not configured for chainId ${request.chainId}`) - } - - // NOTE: we cannot use `instanceof ethers.JsonRpcProvider` because despite that we know - // its the proper type, its not resolving properly at runtime during the pupeteer e2e tests. - // Switching to the type guard function below is safer and more reliable. - // - // const jsonRpcProvider = provider instanceof ethers.JsonRpcProvider ? provider : undefined - const jsonRpcProvider = isJsonRpcProvider(provider) ? provider : undefined - - switch (request.method) { - case 'net_version': { - if (!jsonRpcProvider) { - throw new Error(`Account provider doesn't support send method`) - } - - return await jsonRpcProvider.send('net_version', []) - } - - case 'eth_chainId': { - if (!jsonRpcProvider) { - throw new Error(`Account provider doesn't support send method`) - } - - return await jsonRpcProvider.send('eth_chainId', []) - } - - case 'eth_accounts': { - return [account.address] - } - - case 'eth_getBalance': { - const [accountAddress, blockTag] = request.params! - const walletBalance = await provider.getBalance(accountAddress, blockTag) - return toHexString(walletBalance) - } - - case 'sequence_sign': - case 'personal_sign': - case 'eth_sign': { - // note: message from json-rpc input is in hex format - let message: any - - // there is a difference in the order of the params: - // sequence_sign, personal_sign: [data, address] - // eth_sign: [address, data] - switch (request.method) { - case 'sequence_sign': - case 'personal_sign': { - const [data, _address] = request.params! - message = data - break - } - case 'eth_sign': { - const [_address, data] = request.params! - message = data - break - } - } - - let sig = '' - - // Message must be prefixed with "\x19Ethereum Signed Message:\n" - // as defined by EIP-191 - const prefixedMessage = prefixEIP191Message(message) - - // TODO: - // if (process.env.TEST_MODE === 'true' && this.prompter === null) { - const sequenceVerified = request.method === 'sequence_sign' - - if (this.prompter === null) { - // prompter is null, so we'll sign from here - sig = await account.signMessage( - prefixedMessage, - request.chainId ?? this.defaultChainId(), - sequenceVerified ? 'eip6492' : 'ignore' - ) - } else { - sig = await this.prompter.promptSignMessage( - { - chainId: request.chainId, - message: ethers.getBytes(prefixedMessage), - eip6492: sequenceVerified - }, - request.origin, - request.projectAccessKey - ) - } - - if (sig && sig.length > 0) { - return sig - } else { - // The user has declined the request when value is null - throw new Error('declined by user') - } - } - - case 'sequence_signTypedData_v4': - case 'eth_signTypedData': - case 'eth_signTypedData_v4': { - // note: signingAddress from json-rpc input is in hex format, and typedDataObject - // should be an object, but in some instances may be double string encoded - const [signingAddress, typedDataObject] = request.params! - - let typedData: TypedData | undefined = undefined - if (typeof typedDataObject === 'string') { - try { - typedData = JSON.parse(typedDataObject) - } catch (e) { - console.warn('walletRequestHandler: error parsing typedData', e) - } - } else { - typedData = typedDataObject - } - - if (!typedData || !typedData.domain || !typedData.types || !typedData.message) { - throw new Error('invalid typedData object') - } - - let sig = '' - - const sequenceVerified = request.method === 'sequence_signTypedData_v4' - if (this.prompter === null) { - // prompter is null, so we'll sign from here - sig = await account.signTypedData( - typedData.domain, - typedData.types, - typedData.message, - request.chainId ?? this.defaultChainId(), - sequenceVerified ? 'eip6492' : 'ignore' - ) - } else { - sig = await this.prompter.promptSignMessage( - { - chainId: request.chainId, - typedData: typedData, - eip6492: sequenceVerified - }, - request.origin, - request.projectAccessKey - ) - } - - if (sig && sig.length > 0) { - return sig - } else { - // The user has declined the request when value is null - throw new Error('declined by user') - } - } - - case 'eth_sendTransaction': { - // https://eth.wiki/json-rpc/API#eth_sendtransaction - const transactionParams = fromExtended(request.params![0]).map(tx => { - // eth_sendTransaction uses 'gas' - // ethers and sequence use 'gasLimit' - if ('gas' in tx && tx.gasLimit === undefined) { - tx.gasLimit = tx.gas as any - delete tx.gas - } - - return tx - }) - - validateTransactionRequest(account.address, transactionParams) - - let txnHash = '' - if (this.prompter === null) { - // prompter is null, so we'll send from here - const txnResponse = await account.sendTransaction(transactionParams, request.chainId ?? this.defaultChainId()) - txnHash = txnResponse?.hash ?? '' - } else { - // prompt user to provide the response - txnHash = await this.prompter.promptSendTransaction( - transactionParams, - request.chainId, - request.origin, - request.projectAccessKey - ) - } - - if (txnHash) { - return txnHash - } else { - // The user has declined the request when value is null - throw new Error('declined by user') - } - } - - case 'eth_signTransaction': { - // https://eth.wiki/json-rpc/API#eth_signTransaction - const [transaction] = request.params! - const sender = ethers.getAddress(transaction.from) - - if (sender !== account.address) { - throw new Error('sender address does not match wallet') - } - - validateTransactionRequest(account.address, transaction) - - if (this.prompter === null) { - // The eth_signTransaction method expects a `string` return value we instead return a `SignedTransactions` object, - // this can only be broadcasted using an RPC provider with support for signed Sequence transactions, like this one. - // - // TODO: verify serializing / transporting the SignedTransaction object works as expected, most likely however - // we will want to resolveProperties the big number values to hex strings - return await account.signTransactions(transaction, request.chainId ?? this.defaultChainId()) - } else { - return await this.prompter.promptSignTransaction( - transaction, - request.chainId, - request.origin, - request.projectAccessKey - ) - } - } - - case 'eth_sendRawTransaction': { - // NOTE: we're not using a prompter here as the transaction is already signed - // and would have prompted the user upon signing. - - // https://eth.wiki/json-rpc/API#eth_sendRawTransaction - if (commons.transaction.isSignedTransactionBundle(request.params![0])) { - const txChainId = Number(request.params![0].chainId) - const tx = await account.relayer(txChainId)!.relay(request.params![0]) - return tx.hash - } else { - const tx = await provider.broadcastTransaction(request.params![0]) - return tx.hash - } - } - - case 'eth_getTransactionCount': { - const address = ethers.getAddress(request.params![0] as string) - const tag = request.params![1] - - // TODO: Maybe we should fetch this data from the relayer or from the reader - // but for now we keep it simple and just use the provider - - const count = await provider.getTransactionCount(address, tag) - return toHexString(BigInt(count)) - } - - case 'eth_blockNumber': { - return await provider.getBlockNumber() - } - - case 'eth_getBlockByNumber': { - return await provider.getBlock(request.params![0] /* , jsonRpcRequest.params[1] */) - } - - case 'eth_getBlockByHash': { - return await provider.getBlock(request.params![0] /* , jsonRpcRequest.params[1] */) - } - - case 'eth_getTransactionByHash': { - return await provider.getTransaction(request.params![0]) - } - - case 'eth_call': { - const [transactionObject, blockTag] = request.params! - return await provider.call({ ...transactionObject, blockTag }) - } - - case 'eth_getCode': { - const [contractAddress, blockTag] = request.params! - return await provider.getCode(contractAddress, blockTag) - } - - case 'eth_estimateGas': { - const [transactionObject] = request.params! - return await provider.estimateGas(transactionObject) - } - - case 'eth_gasPrice': { - const feeData = await provider.getFeeData() - return feeData.gasPrice === null ? null : toHexString(feeData.gasPrice) - } - - case 'wallet_switchEthereumChain': { - const [switchParams] = request.params! - if (!switchParams.chainId || switchParams.chainId.length === 0) { - throw new Error('invalid chainId') - } - - const chainId = BigInt(switchParams.chainId) - - this.setDefaultChainId(Number(chainId)) - - return null // success - } - - // smart wallet method - case 'sequence_getWalletContext': { - return account.contexts - } - - // smart wallet method - case 'sequence_getWalletConfig': { - const [chainId] = request.params! - if (chainId) { - return [(await account.status(chainId)).onChain.config] - } else { - return await Promise.all( - account.networks.map(async network => { - const status = await account.status(network.chainId) - return status.onChain.config - }) - ) - } - } - - // smart wallet method - case 'sequence_getWalletState': { - const [chainId] = request.params! - // TODO: Add getWalletState to the Signer interface - if (chainId) { - return [getLegacyWalletState(chainId, await account.status(chainId))] - } else { - return await Promise.all( - account.networks.map(async network => { - const status = await account.status(network.chainId) - return getLegacyWalletState(network.chainId, status) - }) - ) - } - } - - // smart wallet method - case 'sequence_getNetworks': { - // NOTE: must ensure that the response result below returns clean serialized data, which is to omit - // the provider and relayer objects and only return the urls so can be reinstantiated on dapp side. - // This is handled by this.getNetworks() but noted here for future readers. - return await this.getNetworks(true) - } - - case 'sequence_isSequence': { - return true - } - - // smart wallet method - case 'sequence_updateConfig': { - throw new Error('sequence_updateConfig method is not allowed from a dapp') - // NOTE: method is disabled as we don't need a dapp to request to update a config. - // However, if we ever want this, we can enable it but must also use the prompter - // for confirmation. - // - // const [newConfig] = request.params - // return await signer.updateConfig(newConfig) - } - - // smart wallet method - case 'sequence_publishConfig': { - throw new Error('sequence_publishConfig method is not allowed from a dapp') - } - - // relayer method - case 'sequence_gasRefundOptions': { - // TODO - break - } - - // relayer method - case 'sequence_getNonce': { - // TODO - break - } - - // relayer method - case 'sequence_relay': { - // TODO - break - } - - // set default network of wallet - case 'sequence_setDefaultNetwork': { - const [defaultChainId] = request.params! - - if (!defaultChainId) { - throw new Error('invalid request, method argument defaultChainId cannot be empty') - } - - this.setDefaultChainId(defaultChainId) - return await this.getNetworks(true) - } - - default: { - if (!jsonRpcProvider) { - throw new Error(`Account provider doesn't support send method`) - } - - // NOTE: provider here will be chain-bound if chainId is provided - return await jsonRpcProvider.send(request.method, request.params!) - } - } - } catch (err) { - logger.error(err) - throw { message: typeof err == 'string' ? err : err?.message || 'unkown error', code: 4001 } as ProviderRpcError - } - } - - on(event: K, fn: ProviderEventTypes[K]) { - this.events.on(event, fn as any) - } - - once(event: K, fn: ProviderEventTypes[K]) { - this.events.once(event, fn as any) - } - - async getAddress(): Promise { - return this.account?.address ?? '' - } - - get openIntent(): OpenWalletIntent | undefined { - return this._openIntent - } - - setOpenIntent(intent: OpenWalletIntent | undefined) { - this._openIntent = intent - } - - get connectOptions(): ConnectOptions | undefined { - return this._connectOptions - } - - setConnectOptions(options: ConnectOptions | undefined) { - this._connectOptions = options - this.onConnectOptionsChange?.(options) - } - - async setDefaultChainId(chainId: number): Promise { - await this.prompter?.promptChangeNetwork(chainId) - return this.defaultChainId() - } - - async getNetworks(jsonRpcResponse?: boolean): Promise { - if (!this.account) { - logger.warn('signer not set: getNetworks is returning an empty list') - return [] - } - - if (jsonRpcResponse) { - // omit provider and relayer objects as they are not serializable - return this.account.networks.map(n => { - const network: NetworkConfig = { ...n } - network.provider = undefined - network.relayer = undefined - return network - }) - } else { - return this.account.networks - } - } - - walletSession(networkId?: ChainIdLike): WalletSession | undefined { - if (!this.account) { - return undefined - } - - const session = { - walletContext: this.account.contexts, - accountAddress: this.account.address, - // The dapp shouldn't access the relayer directly, and the provider (as an object) is not serializable. - networks: this.account.networks.map(n => ({ ...n, provider: undefined, relayer: undefined })) - } - - if (networkId) { - const network = findNetworkConfig(session.networks, networkId) - - if (network) { - // Delete the isDefaultChain property from the session network - session.networks?.forEach(n => delete n.isDefaultChain) - - // Add the isDefaultChain property to the network with the given networkId - network.isDefaultChain = true - } - } - - return session - } - - notifyConnect(connectDetails: ConnectDetails, origin?: string) { - console.log('emit connect', connectDetails) - this.events.emit('connect', connectDetails) - if (connectDetails.session?.accountAddress) { - this.events.emit('accountsChanged', [connectDetails.session?.accountAddress], origin) - } - } - - notifyDisconnect(origin?: string) { - this.events.emit('accountsChanged', [], origin) - this.events.emit('disconnect', undefined, origin) - } - - notifyChainChanged(chainId: number, origin?: string) { - this.events.emit('chainChanged', ethers.toQuantity(chainId), origin) - } - - async notifyNetworks(networks?: NetworkConfig[]) { - const n = networks || (await this.getNetworks(true)) - this.events.emit('networks', n) - if (n.length > 0) { - const defaultNetwork = n.find(network => network.chainId === this.defaultChainId()) - if (defaultNetwork) { - this.events.emit('chainChanged', ethers.toQuantity(defaultNetwork.chainId)) - } - } else { - this.events.emit('chainChanged', '0x0') - } - } - - async notifyWalletContext() { - if (!this.account) { - logger.warn('signer not set: skipping to notify wallet context') - return - } - const walletContext = this.account.contexts - this.events.emit('walletContext', walletContext) - } - - notifyClose(error?: ProviderRpcError) { - this.events.emit('close', error) - } - - isSignedIn = async (): Promise => { - await this.signerReady() - return !!this.account - } - - getAccount = async (): Promise => { - await this.signerReady() - if (this.account === undefined) { - throw new Error('signerReady failed resolve') - } - return this.account - } - - setAccount(account: Account | null | undefined) { - this.account = account - - if (account !== undefined) { - for (let i = 0; i < this.signerReadyCallbacks.length; i++) { - this.signerReadyCallbacks[i]() - } - this.signerReadyCallbacks = [] - } - } - - private async handleConfirmWalletDeployPrompt( - prompter: WalletUserPrompter, - account: Account, - sequenceVerified: boolean, - chainId?: number, - origin?: string - ): Promise { - // check if wallet is deployed and up to date, if not, prompt user to deploy - // if no chainId is provided, we'll assume the wallet is auth chain wallet and is up to date - if (!chainId) { - return true - } - - const skipsDeploy = (status: AccountStatus) => { - return status.canOnchainValidate || (status.original.version === 2 && sequenceVerified) - } - - const status = await account.status(chainId) - if (skipsDeploy(status)) { - return true - } - - const promptResult = await prompter.promptConfirmWalletDeploy(chainId, origin) - - // if client returned true, check again to make sure wallet is deployed and up to date - if (promptResult) { - const status2 = await account.status(chainId) - - if (skipsDeploy(status2)) { - return true - } else { - logger.error('WalletRequestHandler: result for promptConfirmWalletDeploy is not correct') - return false - } - } - - return false - } -} - -export interface WalletUserPrompter { - getDefaultChainId(): number - promptConnect(connectOptions?: ConnectOptions): Promise - promptSignInConnect(connectOptions?: ConnectOptions): Promise - promptSignMessage(message: MessageToSign, origin?: string, projectAccessKey?: string): Promise - promptSignTransaction( - txn: commons.transaction.Transactionish, - chainId?: number, - origin?: string, - projectAccessKey?: string - ): Promise - promptSendTransaction( - txn: commons.transaction.Transactionish, - chainId?: number, - origin?: string, - projectAccessKey?: string - ): Promise - promptConfirmWalletDeploy(chainId: number, origin?: string): Promise - promptChangeNetwork(chainId: number): Promise -} - -interface LegacyWalletState { - context: commons.context.WalletContext - config?: commons.config.Config - - // the wallet address - address: string - - // the chainId of the network - chainId: number - - // whether the wallet has been ever deployed - deployed: boolean - - // the imageHash of the `config` WalletConfig - imageHash: string - - // the last imageHash of a WalletConfig, stored on-chain - lastImageHash?: string - - // whether the WalletConfig object itself has been published to logs - published?: boolean - - status: AccountStatus -} - -function getLegacyWalletState(chainId: number, status: AccountStatus): LegacyWalletState { - return { - context: status.original.context, - config: status.onChain.config, - address: commons.context.addressOf(status.original.context, status.original.imageHash), - chainId, - deployed: status.onChain.deployed, - imageHash: status.imageHash, - lastImageHash: status.onChain.imageHash, - published: true, - status - } -} - -const permittedJsonRpcMethods = [ - 'net_version', - 'eth_chainId', - 'eth_getBalance', - 'eth_getTransactionCount', - 'eth_blockNumber', - 'eth_getBlockByNumber', - 'eth_getBlockByHash', - 'eth_getTransactionByHash', - 'eth_getCode', - 'eth_estimateGas', - 'eth_gasPrice', - - 'sequence_getWalletContext', - 'sequence_getNetworks', - 'sequence_setDefaultNetwork' -] - -function isJsonRpcProvider(provider: any): provider is ethers.JsonRpcProvider { - return ( - provider && typeof provider === 'object' && typeof provider.send === 'function' && typeof provider.getNetwork === 'function' - ) -} diff --git a/old/packages/provider/src/transports/window-transport/index.ts b/old/packages/provider/src/transports/window-transport/index.ts deleted file mode 100644 index c286e86a5..000000000 --- a/old/packages/provider/src/transports/window-transport/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -export * from './window-message-provider' -export * from './window-message-handler' diff --git a/old/packages/provider/src/transports/window-transport/window-message-handler.ts b/old/packages/provider/src/transports/window-transport/window-message-handler.ts deleted file mode 100644 index dd7bf38f9..000000000 --- a/old/packages/provider/src/transports/window-transport/window-message-handler.ts +++ /dev/null @@ -1,167 +0,0 @@ -import { - ProviderMessageRequest, - ProviderMessage, - EventType, - InitState, - WindowSessionParams, - OpenWalletIntent, - ProviderRpcError, - TransportSession -} from '../../types' -import { WalletRequestHandler } from '../wallet-request-handler' -import { BaseWalletTransport } from '../base-wallet-transport' -import { logger, base64DecodeObject, bigintReviver, bigintReplacer } from '@0xsequence/utils' -import { ethers } from 'ethers' - -export class WindowMessageHandler extends BaseWalletTransport { - protected parentWindow: Window - - private _isPopup: boolean = false - - constructor(walletRequestHandler: WalletRequestHandler) { - super(walletRequestHandler) - this._init = InitState.NIL - } - - async register(windowHref?: any) { - const isPopup = parent.window.opener !== null - this._isPopup = isPopup - if (isPopup !== true) { - return - } - - // record open details (sessionId + default network) from the window url - const { search: rawParams } = new URL(windowHref || window.location.href) - - let session: TransportSession | null = this.getWindowTransportSession(rawParams) - - // provider should always include sid when opening a new window - const isNewWindowSession = !!session.sessionId - - // attempt to restore previous session in the case of a redirect or window reload - if (!isNewWindowSession) { - session = await this.getCachedTransportSession() - } - - if (!session) { - logger.error('window session is undefined') - return - } - - // record parent window instance for communication - this.parentWindow = parent.window.opener - - // listen for window-transport requests - window.addEventListener('message', this.onWindowEvent, false) - this._registered = true - - // send open event to the app which opened us - this.open(session) - .then(opened => { - if (!opened) { - const err = `failed to open to network ${session?.networkId}` - logger.error(err) - this.notifyClose({ message: err } as ProviderRpcError) - window.close() - } - }) - .catch(e => { - const err = `failed to open to network ${session?.networkId}, due to: ${e}` - logger.error(err) - this.notifyClose({ message: err } as ProviderRpcError) - window.close() - }) - } - - unregister() { - window.removeEventListener('message', this.onWindowEvent) - this._registered = false - } - - // onmessage is called when (the wallet) receives request messages from the dapp - // over the window post-messaging transport - private onWindowEvent = async (event: MessageEvent) => { - if (!event.origin || event.origin === '') { - // skip same-origin or when event.origin is empty/undefined - return - } - if (this.appOrigin && event.origin !== this.appOrigin) { - // skip message as not from expected app origin - return - } - - // Wallet always expects json-rpc request messages from a dapp - let request: ProviderMessageRequest - try { - request = JSON.parse(event.data, bigintReviver) - } catch (err) { - // event is not a ProviderMessage JSON object, skip - return - } - - // Set the origin on the request - request.origin ??= event.origin - - logger.debug('RECEIVED MESSAGE', request) - - // Record event origin for valid init ack - if (this._init !== InitState.OK && this.isValidInitAck(request)) { - this.appOrigin = event.origin - } - if (this._init === InitState.OK && (!this.appOrigin || this.appOrigin.length < 8)) { - // impossible state - logger.error('impossible state, init.OK and appOrigin required') - return - } - - // Handle message via the base transport - this.handleMessage(request) - } - - // postMessage sends message to the dapp window - sendMessage(message: ProviderMessage) { - // prepare payload - const payload = JSON.stringify(message, bigintReplacer) - - // post-message to app. - // only for init requests, we send to '*' origin - if (message.type === EventType.INIT) { - this.postMessage(payload, true) - } else { - this.postMessage(payload) - } - } - - get isPopup(): boolean { - return this._isPopup - } - - private postMessage(message: any, init = false) { - if (init !== true && this._init !== InitState.OK) { - logger.error('impossible state, should not be calling postMessage until inited') - return - } - - if (init) { - // init message transmission to global target -- for 'init' payloads only - this.parentWindow.postMessage(message, '*') - } else { - // open message transmission - if (this.appOrigin && this.appOrigin.length > 4) { - // just above '.com' - this.parentWindow.postMessage(message, this.appOrigin) - } else { - logger.error('unable to postMessage as parentOrigin is invalid') - } - } - } - - private getWindowTransportSession = (windowParams: string | undefined): TransportSession => { - const params = new WindowSessionParams(windowParams) - return { - sessionId: params.get('sid'), - networkId: params.get('net'), - intent: base64DecodeObject(params.get('intent')) - } - } -} diff --git a/old/packages/provider/src/transports/window-transport/window-message-provider.ts b/old/packages/provider/src/transports/window-transport/window-message-provider.ts deleted file mode 100644 index 17923bfb0..000000000 --- a/old/packages/provider/src/transports/window-transport/window-message-provider.ts +++ /dev/null @@ -1,197 +0,0 @@ -import { OpenWalletIntent, ProviderMessage, InitState, WindowSessionParams } from '../../types' -import { BaseProviderTransport } from '../base-provider-transport' -import { logger, base64EncodeObject, bigintReplacer, bigintReviver } from '@0xsequence/utils' -import { isBrowserExtension, isUnityPlugin } from '../../utils' - -// .. -let registeredWindowMessageProvider: WindowMessageProvider | undefined - -export class WindowMessageProvider extends BaseProviderTransport { - private walletURL: URL - private walletWindow: Window | null - - constructor(walletAppURL: string, projectAccessKey?: string) { - super(projectAccessKey) - this.walletURL = new URL(walletAppURL) - } - - register = () => { - if (registeredWindowMessageProvider) { - // overriding the registered message provider - registeredWindowMessageProvider.unregister() - registeredWindowMessageProvider = this - } - - // listen for incoming messages from wallet - window.addEventListener('message', this.onWindowEvent) - registeredWindowMessageProvider = this - - // open heartbeat - this.on('open', () => { - // Heartbeat to track if window closed - const popup = this.walletWindow - const interval = setInterval(() => { - if (popup && popup.closed) { - clearInterval(interval) - this.close() - } - }, 500) - }) - - // close clean up - this.on('close', () => { - if (this.walletWindow) { - this.walletWindow.close() - this.walletWindow = null - } - }) - - this._registered = true - } - - unregister = () => { - this._registered = false - this.closeWallet() - - // disable message listener - if (registeredWindowMessageProvider === this) { - registeredWindowMessageProvider = undefined - } - window.removeEventListener('message', this.onWindowEvent) - - // clear event listeners - this.events.removeAllListeners() - } - - openWallet = (path?: string, intent?: OpenWalletIntent, networkId?: string | number): void => { - if (this.walletWindow && this.isOpened()) { - // TODO: update the location of window to path - this.walletWindow.focus() - return - } - - // Instantiate new walletURL for this call - const walletURL = new URL(this.walletURL.href) - const windowSessionParams = new WindowSessionParams() - - if (path && path !== '') { - walletURL.pathname = path.toLowerCase() - } - - // Set session, intent and network id on walletURL - this._init = InitState.NIL - this._sessionId = `${performance.now()}` - windowSessionParams.set('sid', this._sessionId) - - if (intent) { - // for the window-transport, we eagerly/optimistically set the origin host - // when connecting to the wallet, however, this will be verified and enforced - // on the wallet-side, so if a dapp provides the wrong origin, it will be dropped. - if (intent.type === 'connect') { - if (!intent.options) - intent.options = { - app: window.location.origin - } - - // skip setting origin host if we're in an browser extension execution context - // allow origin that is passed in - if (!isBrowserExtension() && !isUnityPlugin() && intent.options) { - intent.options.origin = window.location.origin - } - } - // encode intent as base64 url-encoded param - windowSessionParams.set('intent', base64EncodeObject(intent)) - } - if (networkId) { - windowSessionParams.set('net', `${networkId}`) - } - - // Open popup window on center of the app window - let windowSize: number[] - let windowPos: number[] - - if (isBrowserExtension()) { - windowSize = [450, 750] - windowPos = [Math.abs(window.screen.width / 2 - windowSize[0] / 2), Math.abs(window.screen.height / 2 - windowSize[1] / 2)] - } else { - windowSize = [450, 750] - windowPos = [ - Math.abs(window.screenX + window.innerWidth / 2 - windowSize[0] / 2), - Math.abs(window.screenY + window.innerHeight / 2 - windowSize[1] / 2) - ] - } - - const windowFeatures = - `toolbar=0,location=0,menubar=0,scrollbars=yes,status=yes` + - `,width=${windowSize[0]},height=${windowSize[1]}` + - `,left=${windowPos[0]},top=${windowPos[1]}` - - // serialize params - walletURL.search = windowSessionParams.toString() - - this.walletWindow = window.open(walletURL.href, 'sequence.app', windowFeatures) - - // TODO: move this somewhere else - // TODO: perhaps we trigger a .on('openTimeout') event..? maybe.. could help. - - // Popup blocking detection and notice - // let warned = false - // const warnPopupBlocked = () => { - // if (warned) return - // warned = true - // // alert('popup is blocked! hey yo') // NOTE: for debug purposes only - // throw new Error('popup is blocked') - // } - - // const popupCheck = setTimeout(() => { - // if (!popup || popup.closed || typeof popup.closed === 'undefined') { - // // popup is definitely blocked if we reach here. - // warnPopupBlocked() - // } - // }, 1000) - - // const popupBlocked = popup === null || popup === undefined - // if (popupBlocked) { - // warnPopupBlocked() - // return - // } - } - - closeWallet() { - this.close() - this.walletWindow?.close() - } - - // onmessage, receives ProviderMessageResponse from the wallet post-message transport - private onWindowEvent = (event: MessageEvent) => { - // Security check, ensure message is coming from wallet origin url - if (event.origin !== this.walletURL.origin) { - // Safetly can skip events not from the wallet - return - } - - let message: ProviderMessage - try { - message = JSON.parse(event.data, bigintReviver) - } catch (err) { - // event is not a ProviderMessage JSON object, skip - return - } - - if (!message) { - throw new Error('ProviderMessage object is empty') - } - - // handle message with base message provider - this.handleMessage(message) - } - - sendMessage(message: ProviderMessage) { - if (!this.walletWindow) { - logger.warn('WindowMessageProvider: sendMessage failed as walletWindow is unavailable') - return - } - const postedMessage = typeof message !== 'string' ? JSON.stringify(message, bigintReplacer) : message - this.walletWindow.postMessage(postedMessage, this.walletURL.origin) - } -} diff --git a/old/packages/provider/src/types.ts b/old/packages/provider/src/types.ts deleted file mode 100644 index eca311c16..000000000 --- a/old/packages/provider/src/types.ts +++ /dev/null @@ -1,380 +0,0 @@ -import { ETHAuthProof as AuthETHAuthProof } from '@0xsequence/auth' -import { commons } from '@0xsequence/core' -import { - ChainIdLike, - EIP1193Provider, - JsonRpcRequest, - JsonRpcResponse, - NetworkConfig, - JsonRpcErrorPayload -} from '@0xsequence/network' -import { TypedData } from '@0xsequence/utils' - -export interface ProviderTransport extends EIP1193Provider, ProviderMessageTransport, ProviderMessageRequestHandler { - register(): void - unregister(): void - - openWallet(path?: string, intent?: OpenWalletIntent, networkId?: string | number): void - closeWallet(): void - - isOpened(): boolean - isConnected(): boolean - - on(event: K, fn: ProviderEventTypes[K]): void - once(event: K, fn: ProviderEventTypes[K]): void - emit(event: K, ...args: Parameters): boolean - - waitUntilOpened(): Promise - waitUntilConnected(): Promise -} - -export function isProviderTransport(transport: any): transport is ProviderTransport { - return ( - transport && - typeof transport === 'object' && - typeof transport.register === 'function' && - typeof transport.unregister === 'function' && - typeof transport.openWallet === 'function' && - typeof transport.closeWallet === 'function' && - typeof transport.isOpened === 'function' && - typeof transport.isConnected === 'function' && - typeof transport.on === 'function' - ) -} - -export interface WalletTransport extends EIP1193Provider, ProviderMessageTransport, ProviderMessageRequestHandler { - register(): void - unregister(): void - - notifyOpen(openInfo: { chainId?: string; sessionId?: string; session?: WalletSession; error?: string }): void - notifyClose(error?: ProviderRpcError): void - - notifyConnect(connectDetails: ConnectDetails): void - notifyAccountsChanged(accounts: string[]): void - notifyChainChanged(chainIdHex: string): void - notifyNetworks(networks: NetworkConfig[]): void -} - -export interface ProviderMessage { - idx: number // message id number - type: string // message type - data: T // the ethereum json-rpc payload - chainId?: number // chain id which the message is intended - origin?: string // origin of the message - clientVersion: string // client version of the message - projectAccessKey?: string // project access key -} - -export type ProviderMessageRequest = ProviderMessage - -// Older versions of sequence.js will require a JsonRpcResponse result type, but newer versions use raw EIP1193 results -export type ProviderMessageResponse = ProviderMessage - -// ProviderMessageCallback is used to respond to ProviderMessage requests. The error -// argument is for exceptions during the execution, and response is the response payload -// which may contain the result or an error payload from the wallet. -export type ProviderMessageResponseCallback = (error?: ProviderRpcError, response?: ProviderMessageResponse) => void - -export type ProviderRpcError = JsonRpcErrorPayload - -export interface ProviderMessageRequestHandler { - // sendMessageRequest sends a ProviderMessageRequest over the wire to the wallet. - // This method is similar to `sendMessage`, but it expects a response to this message. - sendMessageRequest(message: ProviderMessageRequest): Promise -} - -export interface ProviderMessageTransport { - // handleMessage will handle a message received from the remote wallet - handleMessage(message: ProviderMessage): void - - // sendMessage will send the provider message over the wire - sendMessage(message: ProviderMessage): void -} - -export type WindowSessionParam = 'sid' | 'net' | 'intent' - -// eslint-disable-next-line @typescript-eslint/no-unsafe-declaration-merging -export interface WindowSessionParams extends URLSearchParams { - get(name: WindowSessionParam): string | null - set(name: WindowSessionParam, value: string): void -} - -// eslint-disable-next-line @typescript-eslint/no-unsafe-declaration-merging -export class WindowSessionParams extends URLSearchParams { - static new(init?: Record | string) { - return new URLSearchParams(init) as WindowSessionParams - } -} - -export interface TransportSession { - sessionId?: string | null - networkId?: string | number | null - intent?: OpenWalletIntent -} - -export enum EventType { - OPEN = 'open', - CLOSE = 'close', - - MESSAGE = 'message', - CONNECT = 'connect', - DISCONNECT = 'disconnect', - ACCOUNTS_CHANGED = 'accountsChanged', - CHAIN_CHANGED = 'chainChanged', - - NETWORKS = 'networks', - WALLET_CONTEXT = 'walletContext', - - INIT = 'init', - DEBUG = '_debug' -} - -export interface WalletEventTypes { - open: (openInfo: { chainId?: string; sessionId?: string; session?: WalletSession; error?: string }) => void - close: (error?: ProviderRpcError) => void - - connect: (connectDetails: ConnectDetails) => void - disconnect: (error?: ProviderRpcError, origin?: string) => void - - accountsChanged: (accounts: string[], origin?: string) => void - chainChanged: (chainIdHex: string, origin?: string) => void - - networks: (networks: NetworkConfig[]) => void - walletContext: (walletContext: commons.context.VersionedContext) => void -} - -export interface ProviderEventTypes extends WalletEventTypes { - message: (message: ProviderMessageResponse) => void -} - -export enum OpenState { - CLOSED = 0, - OPENING = 1, - OPENED = 2 -} - -export enum InitState { - NIL = 0, - SENT_NONCE = 1, - OK = 2 -} - -export interface ConnectOptions { - /** app name of the dapp which will be announced to user on connect screen */ - app: string - - /** custom protocol for auth redirect (unity/unreal) */ - appProtocol?: string - - /** origin hint of the dapp's host opening the wallet. This value will automatically - * be determined and verified for integrity, and can be omitted. */ - origin?: string - - /** access key for the project that can be obtained from Sequence Builder on sequence.build. - * This value will be automatically populated using the key passed in initWallet. */ - projectAccessKey?: string - - /** expiry number (in seconds) that is used for ETHAuth proof. Default is 1 week in seconds. */ - expiry?: number - - /** authorize will perform an ETHAuth eip712 signing and return the proof to the dapp. */ - authorize?: boolean - - /** authorizeNonce is an optional number to be passed as ETHAuth's nonce claim for replay protection. **/ - authorizeNonce?: number - - /** authorizeVersion is the version of the SDK that will validate the ETHAuth proof. */ - authorizeVersion?: number - - /** askForEmail will prompt to give permission to the dapp to access email address */ - askForEmail?: boolean - - /** refresh flag will force a full re-connect (ie. disconnect then connect again) */ - refresh?: boolean - - /** keepWalletOpened will keep the wallet window opened after connecting. The default - * is to automatically close the wallet after connecting. */ - keepWalletOpened?: boolean - - /** clientVersion is the sequence.js version of the dapp client. */ - clientVersion?: string - - /** Options to further customize the wallet experience. */ - settings?: Settings -} - -export interface NetworkedConnectOptions extends ConnectOptions { - /** chainId is the chainId to connect to. If not specified, the default chainId - * will be used. This does not define a default chain id, it is only used for the connect - * authorization signature. */ - networkId?: string | number -} - -/** Options to further customize the wallet experience. */ -export interface Settings { - /** Specify a wallet theme. `light` and `dark` are the main themes, to use other available - * themes, you can use the camel case version of the theme names in the wallet settings. - * For example: "Blue Dark" on wallet UI can be passed as "blueDark". - * Note that this setting will not be persisted, use wallet.open with 'openWithOptions' intent - * to set when you open the wallet for user. */ - theme?: ThemeOption - - /** Specify a banner image. This image, if provided, will be displayed on the wallet during - * the connect/authorize process */ - bannerUrl?: string - - bannerSize?: BannerSize - - /** Specify payment providers to use. If not specified, - * all available payment providers will be enabled. - * Note that this setting will not be persisted, use wallet.open with 'openWithOptions' intent - * to set when you open the wallet for user. */ - includedPaymentProviders?: PaymentProviderOption[] - - /** Specify a default currency to use with payment providers. - * If not specified, the default is USDC. - * Note that this setting will not be persisted, use wallet.open with 'openWithOptions' intent - * to set when you open the wallet for user. */ - defaultFundingCurrency?: CurrencyOption - - /** Specify default purchase amount as an integer, for prefilling the funding amount. - * If not specified, the default is 100. - * Note that this setting will not be persisted, use wallet.open with 'openWithOptions' intent - * to set when you open the wallet for user. */ - defaultPurchaseAmount?: number - - /** If true, lockFundingCurrencyToDefault disables picking any currency provided by payment - * providers other than the defaultFundingCurrency. - * If false, it allows picking any currency provided by payment providers. - * The default is true. - * Note that this setting will not be persisted, use wallet.open with 'openWithOptions' intent - * to set when you open the wallet for user. */ - lockFundingCurrencyToDefault?: boolean - - /** Specify an auth provider to allow dapp to specify ahead of time which auth method to redirect to. - * Will be ignored if user is already signed in. - */ - signInWith?: SignInOption - - /** Specify an email address to allow user automatically sign in with the email option. - * Will be ignored if user is already signed in. - */ - signInWithEmail?: string - - /** Specify which sign in options are allowed. - * Will be ignored if user is already signed in. - */ - signInOptions?: SignInOption[] - - /** Specify auxiliary data - */ - aux?: any -} - -/** light and dark are the main themes, to use other themes in wallet settings, - * you can use the camel case version of the name in the wallet settings. - * For example: "Blue Dark" on wallet UI can be passed as "blueDark" */ -export type ThemeOption = 'light' | 'dark' | string -export type PaymentProviderOption = 'ramp' | 'moonpay' | 'transak' | 'onmeta' | 'paytrie' | 'sardine' -export type CurrencyOption = 'usdc' | 'eth' | 'matic' -export type SignInOption = 'email' | 'google' | 'apple' | 'facebook' | 'discord' | 'twitch' -export type BannerSize = 'small' | 'medium' // | 'large' - -export interface ConnectDetails { - // chainId (in hex) and error are defined by EIP-1193 expected fields - chainId?: string - error?: string - - // connected flag denotes user-accepted the connect request - connected: boolean - - // session include account and network information needed by the dapp wallet provider. - session?: WalletSession - - // proof is a signed typedData (EIP-712) payload using ETHAuth domain. - // NOTE: the proof is signed to the `authChainId`, as the canonical auth chain. - proof?: ETHAuthProof - - // email address provided from wallet to the dapp, as request + accepted - // by a user during a connect request - email?: string -} - -export type PromptConnectDetails = Pick - -export type OpenWalletIntent = - | { type: 'connect'; options?: NetworkedConnectOptions } - | { type: 'openWithOptions'; options?: ConnectOptions } - | { type: 'jsonRpcRequest'; method: string } - -export interface MessageToSign { - message?: Uint8Array - typedData?: TypedData - chainId?: number - - eip6492?: boolean -} - -export type ETHAuthProof = AuthETHAuthProof - -export interface WalletSession { - // Wallet context - walletContext?: commons.context.VersionedContext - - // Account address of the wallet - accountAddress?: string - - // Networks in use for the session. The default/dapp network will show - // up as the first one in the list as the "main chain" - networks?: NetworkConfig[] -} - -export class ProviderError extends Error { - constructor(message?: string) { - super(message) - this.name = 'ProviderError' - } -} - -export const ErrSignedInRequired = new ProviderError('Wallet is not signed in. Connect a wallet and try again.') - -// TODO: lets build some nice error handling tools, prob in /utils ... - -export interface TypedEventEmitter { - addListener(event: E, listener: Events[E]): this - on(event: E, listener: Events[E]): this - once(event: E, listener: Events[E]): this - prependListener(event: E, listener: Events[E]): this - prependOnceListener(event: E, listener: Events[E]): this - - off(event: E, listener: Events[E]): this - removeAllListeners(event?: E): this - removeListener(event: E, listener: Events[E]): this - - emit(event: E, ...args: Arguments): boolean - eventNames(): (keyof Events | string | symbol)[] - - // eslint-disable-next-line - listeners(event: E): Function[] - listenerCount(event: E): number -} - -type Arguments = [T] extends [(...args: infer U) => any] ? U : [T] extends [void] ? [] : [T] - -export type OptionalChainIdLike = - | { - chainId?: ChainIdLike - } - | undefined - -export type OptionalChainId = - | { - chainId?: number - } - | undefined - -export type OptionalEIP6492 = - | { - eip6492?: boolean - } - | undefined diff --git a/old/packages/provider/src/utils.ts b/old/packages/provider/src/utils.ts deleted file mode 100644 index d1d67c7b8..000000000 --- a/old/packages/provider/src/utils.ts +++ /dev/null @@ -1,210 +0,0 @@ -import { ethers } from 'ethers' -import { messageIsExemptFromEIP191Prefix } from './eip191exceptions' -import { AccountStatus } from '@0xsequence/account' -import { commons } from '@0xsequence/core' -import { encodeMessageDigest, TypedData, encodeTypedDataDigest } from '@0xsequence/utils' - -const eip191prefix = ethers.toUtf8Bytes('\x19Ethereum Signed Message:\n') - -export const messageToBytes = (message: ethers.BytesLike): Uint8Array => { - if (ethers.isBytesLike(message)) { - return ethers.getBytes(message) - } - - return ethers.toUtf8Bytes(message) -} - -export const prefixEIP191Message = (message: ethers.BytesLike): Uint8Array => { - const messageBytes = messageToBytes(message) - if (messageIsExemptFromEIP191Prefix(messageBytes)) { - return messageBytes - } else { - return ethers.getBytes(ethers.concat([eip191prefix, ethers.toUtf8Bytes(String(messageBytes.length)), messageBytes])) - } -} - -export const trimEIP191Prefix = (prefixedMessage: Uint8Array): Uint8Array => { - // If the message is not prefixed, we return the message as is. - if (JSON.stringify(prefixedMessage.slice(0, eip191prefix.length)) !== JSON.stringify(eip191prefix)) { - return prefixedMessage - } - - // We have two parts to remove. - // First is the EIP-191 prefix. - const ethereumSignedMessagePartSlicedArray = prefixedMessage.slice(eip191prefix.length) - - // Second is the digits added which represent length of the message without the prefix - // and we need to find the prefix that will match this. - // Here first we take the max prefix char length, and check if as a number it is bigger - // than the length of the message (since prefix is added to represent length of original message), - // if it is we remove 1 from char length, if not we keep the max prefix char length. - // As an example for the case where , if the message is 123456789, the expected prefix char is 9, with starting value 9123456789 - // the char length of the total message with the prefix is 10, so the max prefix char length we start is 2 from [1,0], and as a number 10, it is longer - // than the length of the message after removing prefix (10 - 2 = 8), so we slice 1 char less, which is 9, and we get the correct prefix. - const maxPrefixCharLength = String(ethereumSignedMessagePartSlicedArray.length).length - - let prefixCharLenght: number - let prefixAsNumber: number - - try { - prefixAsNumber = Number(ethers.toUtf8String(ethereumSignedMessagePartSlicedArray.slice(0, maxPrefixCharLength))) - } catch { - prefixAsNumber = Number(ethers.hexlify(ethereumSignedMessagePartSlicedArray.slice(0, maxPrefixCharLength))) - } - - if (prefixAsNumber > ethereumSignedMessagePartSlicedArray.length || !Number.isInteger(prefixAsNumber)) { - prefixCharLenght = maxPrefixCharLength - 1 - } else { - prefixCharLenght = maxPrefixCharLength - } - - const prefixRevertedMessage = ethereumSignedMessagePartSlicedArray.slice(prefixCharLenght) - - return prefixRevertedMessage -} - -export const isValidSignature = async ( - address: string, - digest: Uint8Array, - sig: string, - provider: ethers.Provider -): Promise => { - const reader = new commons.reader.OnChainReader(provider) - return reader.isValidSignature(address, digest, sig) -} - -// Verify message signature -export const isValidMessageSignature = async ( - address: string, - message: string | Uint8Array, - signature: string, - provider: ethers.Provider -): Promise => { - const prefixed = prefixEIP191Message(message) - const digest = encodeMessageDigest(prefixed) - return isValidSignature(address, digest, signature, provider) -} - -// Verify typedData signature -export const isValidTypedDataSignature = ( - address: string, - typedData: TypedData, - signature: string, - provider: ethers.Provider -): Promise => { - return isValidSignature(address, encodeTypedDataDigest(typedData), signature, provider) -} - -export const isBrowserExtension = (): boolean => - window.location.protocol === 'chrome-extension:' || window.location.protocol === 'moz-extension:' - -export const isUnityPlugin = (): boolean => !!navigator.userAgent.match(/UnitySequence/i) - -// /** -// * Returns the status of a signer's wallet on given chain by checking wallet deployment and config status -// * -// * @param {Status} of the wallet -// */ -export const isWalletUpToDate = (status: AccountStatus): boolean => { - return status.onChain.deployed && status.fullyMigrated -} - -export interface ItemStore { - getItem(key: string): string | null - setItem(key: string, value: string): void - - removeItem(key: string): void - - onItemChange(key: string, cb: (value: string | null) => void): () => void -} - -export class MemoryItemStore implements ItemStore { - private callbacks: { key: string; cb: (value: string | null) => void }[] = [] - private store: Record = {} - - getItem(key: string): string | null { - return this.store[key] || null - } - - setItem(key: string, value: string): void { - this.store[key] = value - this.callbacks.filter(c => c.key === key).forEach(c => c.cb(value)) - } - - removeItem(key: string): void { - delete this.store[key] - } - - onItemChange(key: string, cb: (value: string | null) => void): () => void { - this.callbacks.push({ key, cb }) - - return () => { - this.callbacks = this.callbacks.filter(c => c.cb !== cb) - } - } -} - -export class LocalStorage implements ItemStore { - private callbacks: { key: string; cb: (value: string | null) => void }[] = [] - - static isAvailable(): boolean { - return typeof window === 'object' && typeof window.localStorage === 'object' - } - - constructor() { - if (!LocalStorage.isAvailable()) { - throw new Error('LocalStorage is not available') - } - - window.addEventListener('storage', e => { - const { key } = e - const cb = this.callbacks.filter(c => c.key === key) - cb.forEach(c => c.cb(this.getItem(key!))) - }) - } - - getItem(key: string): string | null { - return window.localStorage.getItem(key) - } - - setItem(key: string, value: string): void { - window.localStorage.setItem(key, value) - - // Trigger callbacks - // NOTICE: the event is not triggered on the same window - this.callbacks.filter(c => c.key === key).forEach(c => c.cb(value)) - } - - removeItem(key: string): void { - window.localStorage.removeItem(key) - - // Trigger callbacks - // NOTICE: the event is not triggered on the same window - this.callbacks.filter(c => c.key === key).forEach(c => c.cb(null)) - } - - onItemChange(key: string, cb: (value: string | null) => void): () => void { - this.callbacks.push({ key, cb }) - - return () => { - this.callbacks = this.callbacks.filter(c => c.cb !== cb) - } - } -} - -export function useBestStore(): ItemStore { - if (LocalStorage.isAvailable()) { - return new LocalStorage() - } - - return new MemoryItemStore() -} - -export async function resolveArrayProperties(object: Readonly | Readonly[]): Promise { - if (Array.isArray(object)) { - // T must include array type - return Promise.all(object.map(o => ethers.resolveProperties(o))) as any - } - - return ethers.resolveProperties(object) -} diff --git a/old/packages/provider/src/utils/index.ts b/old/packages/provider/src/utils/index.ts deleted file mode 100644 index 256dbadbb..000000000 --- a/old/packages/provider/src/utils/index.ts +++ /dev/null @@ -1,75 +0,0 @@ -import { ethers } from 'ethers' -import { ChainIdLike } from '@0xsequence/network' -import { encodeMessageDigest, TypedData, encodeTypedDataDigest } from '@0xsequence/utils' -import { isValidSignature, prefixEIP191Message } from '../utils' -import { SequenceSigner, SingleNetworkSequenceSigner } from '../signer' - -/** - * This class is redundant with the SequenceSigner class, but it is here for now to - * maintain compatibility with the old wallet API. Eventually we should move these - * methods to the SequenceSigner class and deprecate this class. - */ -export class WalletUtils { - constructor(public signer: SequenceSigner) { - if (SingleNetworkSequenceSigner.is(signer)) { - throw new Error('WalletUtils does not support SingleNetworkSequenceSigner') - } - } - - // Sign message on a specified chain, or DefaultChain by default - signMessage(message: ethers.BytesLike, chainId?: ChainIdLike, eip6492?: boolean): Promise { - return this.signer.signMessage(message, { chainId, eip6492 }) - } - - // Sign EIP-712 TypedData on a specified chain, or DefaultChain by default - signTypedData( - domain: ethers.TypedDataDomain, - types: Record>, - message: Record, - chainId?: ChainIdLike, - eip6492?: boolean - ): Promise { - return this.signer.signTypedData(domain, types, message, { chainId, eip6492 }) - } - - // Verify signature of a digest, one of a message, typedData or other - async isValidSignature(address: string, digest: Uint8Array, signature: string, chainId: number): Promise { - return isValidSignature(address, digest, signature, this.signer.getProvider(chainId)) - } - - // Verify message signature - async isValidMessageSignature( - address: string, - message: string | Uint8Array, - signature: string, - chainId: number - ): Promise { - const provider = this.signer.getProvider(chainId) - const prefixed = prefixEIP191Message(message) - const digest = encodeMessageDigest(prefixed) - return isValidSignature(address, digest, signature, provider) - } - - // Verify typedData signature - isValidTypedDataSignature(address: string, typedData: TypedData, signature: string, chainId: number): Promise { - return this.isValidSignature(address, encodeTypedDataDigest(typedData), signature, chainId) - } - - // sendTransaction() - // sendTransactions() - - // sendETH() - // sendToken() - // sendCoin() -- sugar for sendToken() - // sendCollectible() -- sugar for sendToken() - // callContract() - - // transactionHistory() - // getReceipt() - // getLogs() - // // .. - - // validateSignature() - // recoverWalletConfig() - // recoverAddress() -} diff --git a/old/packages/provider/tests/client.spec.ts b/old/packages/provider/tests/client.spec.ts deleted file mode 100644 index 94e43467f..000000000 --- a/old/packages/provider/tests/client.spec.ts +++ /dev/null @@ -1,1679 +0,0 @@ -import { expect } from 'chai' -import { - OpenWalletIntent, - ProviderEventTypes, - ProviderTransport, - SequenceClient, - TypedEventEmitter, - messageToBytes, - useBestStore -} from '../src' -import { JsonRpcRequest, JsonRpcResponse, JsonRpcResponseCallback, allNetworks } from '@0xsequence/network' -import EventEmitter from 'events' -import { commons, v1, v2, VERSION } from '@0xsequence/core' -import { ethers } from 'ethers' -import { TypedData, parseEther } from '@0xsequence/utils' -import { ExtendedTransactionRequest } from '../src/extended' - -const basicMockTransport = { - on: () => {}, - register: () => {}, - unregister: () => {}, - openWallet: () => {}, - closeWallet: () => {}, - isOpened: () => false, - isConnected: () => false -} as unknown as ProviderTransport - -const sampleContext = { - [1]: { - version: 1, - factory: '0x1234', - mainModule: '0x5678', - mainModuleUpgradable: '0x213123', - guestModule: '0x634123', - - walletCreationCode: '0x112233' - }, - [4]: { - version: 4, - factory: '0x99283', - mainModule: '0x1234', - mainModuleUpgradable: '0x5678', - guestModule: '0x213123', - - walletCreationCode: '0x112233' - } -} as commons.context.VersionedContext - -describe('SequenceClient', () => { - describe('callbacks', () => { - const callbacks: TypedEventEmitter = new EventEmitter() as TypedEventEmitter - let client: SequenceClient - - beforeEach(() => { - const mockTransport = { - ...basicMockTransport, - on(event: K, fn: ProviderEventTypes[K]): void { - callbacks.on(event, fn) - } - } - - client = new SequenceClient(mockTransport as unknown as ProviderTransport, useBestStore()) - }) - - it('shoud emit open event', async () => { - let called = false - - client.onOpen(() => { - called = true - }) - - callbacks.emit('open', {}) - expect(called).to.be.true - }) - - it('should emit networks event', async () => { - let called = false - - client.onNetworks(networks => { - expect(networks).to.deep.equal(allNetworks) - called = true - }) - - callbacks.emit('networks', JSON.parse(JSON.stringify(allNetworks))) - expect(called).to.be.true - }) - - it('should emit accounts changed event', async () => { - let called = false - - client.onAccountsChanged(accounts => { - expect(accounts).to.deep.equal(['0x1234', '0x5678']) - called = true - }) - - callbacks.emit('accountsChanged', ['0x1234', '0x5678']) - expect(called).to.be.true - }) - - it('should emit wallet context event', async () => { - let called = false - - client.onWalletContext(context => { - expect(context).to.deep.equal(sampleContext) - called = true - }) - - callbacks.emit('walletContext', sampleContext) - expect(called).to.be.true - }) - - it('should emit default chain id changed event', async () => { - // NOTICE: This is not handled by the transport - // this is because network switching is done client-side - // and transport is never aware of it. - let calls = 0 - - client.onDefaultChainIdChanged(chainId => { - expect(chainId).to.equal(calls === 0 ? '0x2' : '0x1') - calls++ - }) - - client.setDefaultChainId(2) - client.setDefaultChainId(1) - // Second call should not trigger event - client.setDefaultChainId(1) - - expect(calls).to.equal(2) - }) - - it('should emit close event', async () => { - let called = false - - client.onClose(() => { - called = true - }) - - callbacks.emit('close') - expect(called).to.be.true - }) - - it('should unregister callback', async () => { - let called = false - - const unregister = client.onClose(() => { - called = true - }) - - unregister() - - callbacks.emit('close') - expect(called).to.be.false - }) - - it('should emit connect event', async () => { - let callsToConnect = 0 - - client.onConnect(details => { - callsToConnect++ - expect(details).to.deep.equal({ - connected: true, - chainId: '0x1', - session: { - accountAddress: '0x1234' - }, - email: 'test@sequence.app' - }) - }) - - callbacks.emit('connect', { - connected: true, - chainId: '0x1', - session: { - accountAddress: '0x1234' - }, - email: 'test@sequence.app' - }) - - expect(callsToConnect).to.equal(1) - }) - - it('should use default chain id during connect event', async () => { - let callsToConnect = 0 - - client.onConnect(details => { - callsToConnect++ - expect(details).to.deep.equal({ - connected: true, - chainId: '0x2', - session: { - accountAddress: '0x1234' - }, - email: 'test@sequence.app' - }) - }) - - client.setDefaultChainId(2) - - callbacks.emit('connect', { - connected: true, - // This should be ignored - chainId: '0xa', - session: { - accountAddress: '0x1234' - }, - email: 'test@sequence.app' - }) - - expect(callsToConnect).to.equal(1) - }) - - it('should emit disconnect event', async () => { - let callsToDisconnect = 0 - - client.onDisconnect(details => { - callsToDisconnect++ - expect(details).to.deep.equal({ - code: 9999 - }) - }) - - callbacks.emit('disconnect', { - code: 9999 - } as any) - - expect(callsToDisconnect).to.equal(1) - }) - }) - - it('should open wallet', async () => { - let calledOpenWallet = 0 - let calledWaitUntilOpened = 0 - let calledIsOpened = 0 - - const path = 'this/is/a/test/path' - const intent = { - type: 'connect' - } as OpenWalletIntent - - const client = new SequenceClient( - { - ...basicMockTransport, - openWallet: (path: string, intent: OpenWalletIntent, chainId?: number) => { - calledOpenWallet++ - expect(path).to.equal(path) - expect(intent).to.equal(intent) - expect(chainId).to.equal(2) - return Promise.resolve(true) - }, - waitUntilOpened: async () => { - calledWaitUntilOpened++ - // delay a bit - await new Promise(resolve => setTimeout(resolve, 500)) - return { - accountAddress: ethers.Wallet.createRandom().address - } - }, - isOpened: () => { - calledIsOpened++ - return false - } - }, - useBestStore(), - { - defaultChainId: 2 - } - ) - - const result = await client.openWallet(path, intent) - expect(result).to.equal(false) - expect(calledOpenWallet).to.equal(1) - expect(calledWaitUntilOpened).to.equal(1) - expect(calledIsOpened).to.equal(1) - }) - - it('should open wallet on default chain id', async () => { - let calledOpenWallet = 0 - let calledWaitUntilOpened = 0 - let calledIsOpened = 0 - - const path = 'this/is/a/test/path' - const intent = { - type: 'connect' - } as OpenWalletIntent - - const client = new SequenceClient( - { - ...basicMockTransport, - openWallet: (path: string, intent: OpenWalletIntent, chainId?: number) => { - calledOpenWallet++ - expect(path).to.equal(path) - expect(intent).to.equal(intent) - expect(chainId).to.equal(3) - return Promise.resolve(true) - }, - waitUntilOpened: async () => { - calledWaitUntilOpened++ - // delay a bit - await new Promise(resolve => setTimeout(resolve, 500)) - return { - accountAddress: ethers.Wallet.createRandom().address - } - }, - isOpened: () => { - calledIsOpened++ - return false - } - }, - useBestStore(), - { - defaultChainId: 2 - } - ) - - client.setDefaultChainId(3) - const result = await client.openWallet(path, intent) - expect(result).to.equal(false) - expect(calledOpenWallet).to.equal(1) - expect(calledWaitUntilOpened).to.equal(1) - expect(calledIsOpened).to.equal(1) - }) - - it('should close wallet', async () => { - let calledCloseWallet = 0 - - const client = new SequenceClient( - { - ...basicMockTransport, - closeWallet: () => { - calledCloseWallet++ - } - }, - useBestStore(), - { - defaultChainId: 2 - } - ) - - client.closeWallet() - expect(calledCloseWallet).to.equal(1) - }) - - it('should handle isOpened', async () => { - let calledIsOpened = 0 - - const client = new SequenceClient( - { - ...basicMockTransport, - isOpened: () => { - calledIsOpened++ - return calledIsOpened === 1 - } - }, - useBestStore(), - { - defaultChainId: 2 - } - ) - - const result1 = client.isOpened() - expect(result1).to.equal(true) - expect(calledIsOpened).to.equal(1) - - const result2 = client.isOpened() - expect(result2).to.equal(false) - expect(calledIsOpened).to.equal(2) - }) - - it('should handle connect, isConnected and disconnect', async () => { - let calledIsOpened = 0 - let calledOpenWallet = 0 - let calledCloseWallet = 0 - let calledWaitUntilOpened = 0 - let calledWaitUntilConnected = 0 - - const session = { - accountAddress: ethers.Wallet.createRandom().address - } - - const client = new SequenceClient( - { - ...basicMockTransport, - openWallet: (path?: string, intent?: OpenWalletIntent) => { - expect(path).to.equal(undefined) - expect(intent).to.deep.equal({ - type: 'connect', - options: { - app: 'This is a test', - authorizeVersion: 2, - networkId: 2, - clientVersion: VERSION, - projectAccessKey: undefined - } - }) - - calledOpenWallet++ - return Promise.resolve(true) - }, - waitUntilOpened: async () => { - calledWaitUntilOpened++ - return session - }, - waitUntilConnected: async () => { - calledWaitUntilConnected++ - return { connected: true, chainId: '0xa', session } - }, - isOpened: () => { - calledIsOpened++ - return true - }, - closeWallet: () => { - calledCloseWallet++ - } - }, - useBestStore(), - { - defaultChainId: 2 - } - ) - - const result1 = client.isConnected() - expect(result1).to.equal(false) - - const result2 = await client.connect({ app: 'This is a test' }) - expect(result2.chainId).to.equal('10') - expect(result2.connected).to.equal(true) - expect(result2.session).to.equal(session) - - const result3 = client.isConnected() - expect(result3).to.equal(true) - - await client.disconnect() - - const result4 = client.isConnected() - expect(result4).to.equal(false) - - expect(calledIsOpened).to.equal(2, 'isOpened') - expect(calledOpenWallet).to.equal(1, 'openWallet') - expect(calledWaitUntilOpened).to.equal(1, 'waitUntilOpened') - expect(calledWaitUntilConnected).to.equal(1, 'waitUntilConnected') - expect(calledCloseWallet).to.equal(1, 'closeWallet') - }) - - it('should handle fail to connect', async () => { - const client = new SequenceClient( - { - ...basicMockTransport, - openWallet: () => Promise.resolve(true), - waitUntilOpened: async () => { - return { - accountAddress: ethers.Wallet.createRandom().address - } - }, - waitUntilConnected: async () => { - throw new Error('Failed to connect') - }, - isOpened: () => true - }, - useBestStore(), - { - defaultChainId: 2 - } - ) - - const result = await client.connect({ app: 'This is a test' }) - expect(result.connected).to.equal(false) - expect(result.session).to.equal(undefined) - expect(result.error).to.equal('Failed to connect') - expect(client.isConnected()).to.equal(false) - }) - - it('should handle reject connect', async () => { - const client = new SequenceClient( - { - ...basicMockTransport, - openWallet: () => Promise.resolve(true), - waitUntilOpened: async () => { - return { - accountAddress: ethers.Wallet.createRandom().address - } - }, - waitUntilConnected: async () => { - return { connected: false } - }, - isOpened: () => true - }, - useBestStore(), - { - defaultChainId: 2 - } - ) - - const result = await client.connect({ app: 'This is a test' }) - expect(result.connected).to.equal(false) - expect(result.session).to.equal(undefined) - expect(result.error).to.equal(undefined) - expect(client.isConnected()).to.equal(false) - }) - - it('should handle arbitrary send', async () => { - let calledSendAsync = 0 - - const commands: { req: JsonRpcRequest; res: any }[] = [ - { req: { method: 'eth_chainId', params: [], chainId: 2 }, res: '0x1' }, - { req: { method: 'eth_accounts', params: [], chainId: 2 }, res: '0x12345' }, - { req: { method: 'eth_sendTransaction', params: [{ to: '0x1234' }], chainId: 5 }, res: '0x000' }, - { req: { method: 'non-standard', params: [{ a: 23123, b: true }], chainId: 9 }, res: '0x99' } - ] - - const client = new SequenceClient( - { - ...basicMockTransport, - request(request: JsonRpcRequest): Promise { - calledSendAsync++ - const command = commands.shift() - - if (!request.chainId) { - request.chainId = client.getChainId() - } - - expect(request).to.deep.equal(command?.req) - - return Promise.resolve(command?.res) - } - }, - useBestStore(), - { - defaultChainId: 2 - } - ) - - expect(calledSendAsync).to.equal(0) - - const result1 = await client.request({ method: 'eth_chainId', params: [] }) - - expect(result1).to.equal('0x1') - expect(calledSendAsync).to.equal(1) - - const result2 = await client.request({ method: 'eth_accounts', params: [], chainId: 2 }) - expect(result2).to.equal('0x12345') - expect(calledSendAsync).to.equal(2) - - const result3 = await client.request({ method: 'eth_sendTransaction', params: [{ to: '0x1234' }], chainId: 5 }) - expect(result3).to.equal('0x000') - expect(calledSendAsync).to.equal(3) - - // Changing the default chainId - // should change the chainId of the request - client.setDefaultChainId(9) - - const result4 = await client.request({ method: 'non-standard', params: [{ a: 23123, b: true }] }) - expect(result4).to.equal('0x99') - expect(calledSendAsync).to.equal(4) - }) - - it('should handle error during arbitrary send', async () => { - const client = new SequenceClient( - { - ...basicMockTransport, - request(request: JsonRpcRequest): Promise { - return Promise.reject(new Error('Failed to send')) - } - }, - useBestStore(), - { - defaultChainId: 2 - } - ) - - const result = client.request({ method: 'eth_chainId', params: [] }) - await expect(result).to.be.rejectedWith('Failed to send') - }) - - it('should handle json rpc wrapped results', async () => { - const client = new SequenceClient( - { - ...basicMockTransport, - request(request: JsonRpcRequest): Promise { - return Promise.resolve({ jsonrpc: '2.0', result: '0x1234', id: request.id }) - } - }, - useBestStore(), - { - defaultChainId: 2 - } - ) - - const result = await client.request({ method: 'eth_chainId', params: [] }) - expect(result).to.equal('0x1234') - }) - - // XXX: Request is not rejected if response is empty - // it('should fail if response is empty', async () => { - // const client = new SequenceClient( - // { - // ...basicMockTransport, - // request(request: JsonRpcRequest): Promise { - // return Promise.resolve(undefined) - // } - // }, - // useBestStore(), - // { - // defaultChainId: 2 - // } - // ) - - // const request = { method: 'eth_chainId', params: [] } - // const result = client.request(request) - - // await expect(result).to.be.rejectedWith(`Got undefined response for request: ${request}`) - // }) - - it('shound handle getNetworks', async () => { - // Networks are fetched once (during connect) and cached - let calledSendAsync = 0 - - const session = { - accountAddress: ethers.Wallet.createRandom().address, - networks: allNetworks, - walletContext: sampleContext - } - - const client = new SequenceClient( - { - ...basicMockTransport, - request(request: JsonRpcRequest): Promise { - calledSendAsync++ - expect(request).to.deep.equal({ method: 'sequence_getNetworks' }) - return Promise.resolve([ - { - chainId: 5, - name: 'test' - } - ]) - }, - openWallet: () => { - return Promise.resolve(true) - }, - waitUntilOpened: async () => { - return session - }, - waitUntilConnected: async () => { - return { connected: true, session } - }, - isOpened: () => { - return true - } - }, - useBestStore(), - { - defaultChainId: 2 - } - ) - - const result1 = client.getNetworks() - await expect(result1).to.be.rejectedWith('Sequence session not connected') - - await client.connect({ app: 'This is a test' }) - - const result2 = await client.getNetworks() - expect(result2).to.deep.equal(allNetworks) - // We fetched this data on the connect call - expect(calledSendAsync).to.equal(0) - - const result3 = await client.getNetworks() - expect(result3).to.deep.equal(allNetworks) - // We cached the data - expect(calledSendAsync).to.equal(0) - - const result4 = await client.getNetworks(true) - expect(result4).to.deep.equal([ - { - chainId: 5, - name: 'test' - } - ]) - // We forced a fetch - expect(calledSendAsync).to.equal(1) - }) - - it('should return address and accounts', async () => { - const session = { - accountAddress: ethers.Wallet.createRandom().address, - networks: allNetworks, - walletContext: sampleContext - } - - const client = new SequenceClient( - { - ...basicMockTransport, - openWallet: () => { - return Promise.resolve(true) - }, - waitUntilOpened: async () => { - return session - }, - waitUntilConnected: async () => { - return { connected: true, session } - }, - isOpened: () => { - return true - }, - closeWallet: () => {} - }, - useBestStore(), - { - defaultChainId: 2 - } - ) - - const result1 = new Promise(() => client.getAddress()) - await expect(result1).to.be.rejectedWith('Sequence session not connected') - - await client.connect({ app: 'This is a test' }) - - const result3 = client.getAddress() - expect(result3).to.equal(session.accountAddress) - - await client.disconnect() - - const result5 = new Promise(() => client.getAddress()) - await expect(result5).to.be.rejectedWith('Sequence session not connected') - }) - - it('should call sign message', async () => { - const session = { - accountAddress: ethers.Wallet.createRandom().address, - networks: allNetworks, - walletContext: sampleContext - } - - let calledSendAsync = 0 - - const requests: { eip6492: boolean; chainId: number; message: ethers.BytesLike; result: string }[] = [ - { eip6492: false, chainId: 2, message: '0x1234', result: '0x0000' }, - { eip6492: true, chainId: 2, message: new Uint8Array([4, 2, 9, 1]), result: '0x1111' }, - { eip6492: false, chainId: 5, message: '0x9993212', result: '0x2222' }, - { eip6492: true, chainId: 6, message: new Uint8Array([4, 2, 9, 1]), result: '0x3333' } - ] - - const client = new SequenceClient( - { - ...basicMockTransport, - request(request: JsonRpcRequest): Promise { - calledSendAsync++ - const req = requests.shift() - - if (!req) { - throw new Error('Could not get test request for comparison') - } - - if (!request.chainId) { - request.chainId = client.getChainId() - } - - const message = ethers.hexlify(messageToBytes(req.message)) - - expect(request).to.deep.equal({ - method: req.eip6492 ? 'sequence_sign' : 'personal_sign', - params: [message, session.accountAddress], - chainId: req.chainId - }) - expect(request.chainId).to.equal(req.chainId) - return Promise.resolve(req?.result) - }, - openWallet: () => { - return Promise.resolve(true) - }, - waitUntilOpened: async () => { - return session - }, - waitUntilConnected: async () => { - return { connected: true, session } - }, - isOpened: () => { - return true - }, - closeWallet: () => {} - }, - useBestStore(), - { - defaultChainId: 2 - } - ) - - const result1 = client.signMessage('0x1234') - await expect(result1).to.be.rejectedWith('Sequence session not connected') - - await client.connect({ app: 'This is a test' }) - - const result2 = await client.signMessage('0x1234') - expect(result2).to.equal('0x0000') - - const result3 = await client.signMessage(new Uint8Array([4, 2, 9, 1]), { eip6492: true, chainId: 2 }) - expect(result3).to.equal('0x1111') - - client.setDefaultChainId(5) - - const result4 = await client.signMessage('0x9993212') - expect(result4).to.equal('0x2222') - - const result5 = await client.signMessage(new Uint8Array([4, 2, 9, 1]), { eip6492: true, chainId: 6 }) - expect(result5).to.equal('0x3333') - - expect(calledSendAsync).to.equal(4) - }) - - it('should call sign typed message', async () => { - const session = { - accountAddress: ethers.Wallet.createRandom().address, - networks: allNetworks, - walletContext: sampleContext - } - - let calledSendAsync = 0 - - const requests = [ - { - eip6492: false, - chainId: 2, - data: { - domain: { - name: 'App1', - version: '1', - chainId: 2, - verifyingContract: ethers.Wallet.createRandom().address - }, - types: { - Person: [ - { name: 'name', type: 'string' }, - { name: 'age', type: 'uint256' } - ] - }, - message: { - name: 'Alice', - age: '28' - } - }, - result: '0x0000' - }, - { - eip6492: true, - chainId: 2, - data: { - domain: { - name: 'App2', - version: '1.1', - chainId: 2, - verifyingContract: ethers.Wallet.createRandom().address - }, - types: { - Payment: [ - { name: 'receiver', type: 'address' }, - { name: 'amount', type: 'uint256' } - ] - }, - message: { - receiver: ethers.Wallet.createRandom().address, - amount: '100' - } - }, - result: '0x1111' - }, - { - eip6492: false, - chainId: 5, - data: { - domain: { - name: 'App3', - version: '2', - chainId: 5, - verifyingContract: ethers.Wallet.createRandom().address - }, - types: { - Agreement: [ - { name: 'firstParty', type: 'address' }, - { name: 'secondParty', type: 'address' }, - { name: 'terms', type: 'string' } - ] - }, - message: { - firstParty: ethers.Wallet.createRandom().address, - secondParty: ethers.Wallet.createRandom().address, - terms: 'Terms of the agreement here.' - } - }, - result: '0x2222' - }, - { - eip6492: true, - chainId: 6, - data: { - domain: { - name: 'App4', - version: '2.1', - chainId: 7, // This is ignored because option takes precedence - verifyingContract: ethers.Wallet.createRandom().address - }, - types: { - Sale: [ - { name: 'item', type: 'string' }, - { name: 'price', type: 'uint256' } - ] - }, - message: { - item: 'Laptop', - price: '1500' - } - }, - result: '0x3333' - }, - { - eip6492: true, - chainId: 99, - data: { - domain: { - name: 'App4', - version: '2.1', - chainId: 99, - verifyingContract: ethers.Wallet.createRandom().address - }, - types: { - Sale: [ - { name: 'item', type: 'string' }, - { name: 'price', type: 'uint256' } - ] - }, - message: { - item: 'Laptop', - price: '1500' - } - }, - result: '0x5555' - } - ] as { eip6492: boolean; chainId: number; data: TypedData; result: string }[] - - const client = new SequenceClient( - { - ...basicMockTransport, - request(request: JsonRpcRequest): Promise { - const req = requests[calledSendAsync] - calledSendAsync++ - - const encoded = ethers.TypedDataEncoder.getPayload(req!.data.domain, req!.data.types, req!.data.message) - - if (!request.chainId) { - request.chainId = client.getChainId() - } - - expect(request).to.deep.equal({ - method: req?.eip6492 ? 'sequence_signTypedData_v4' : 'eth_signTypedData_v4', - params: [session.accountAddress, encoded], - chainId: req.chainId - }) - - expect(request.chainId).to.equal(req?.chainId) - return Promise.resolve(req?.result) - }, - openWallet: () => { - return Promise.resolve(true) - }, - waitUntilOpened: async () => { - return session - }, - waitUntilConnected: async () => { - return { connected: true, session } - }, - isOpened: () => { - return true - }, - closeWallet: () => {} - }, - useBestStore(), - { - defaultChainId: 2 - } - ) - - const result1 = client.signTypedData(requests[0].data) - await expect(result1).to.be.rejectedWith('Sequence session not connected') - - await client.connect({ app: 'This is a test' }) - - const result2 = await client.signTypedData(requests[0].data) - expect(result2).to.equal('0x0000') - - const result3 = await client.signTypedData(requests[1].data, { eip6492: true, chainId: 2 }) - expect(result3).to.equal('0x1111') - - client.setDefaultChainId(5) - - const result4 = await client.signTypedData(requests[2].data) - expect(result4).to.equal('0x2222') - - const result5 = await client.signTypedData(requests[3].data, { eip6492: true, chainId: 6 }) - expect(result5).to.equal('0x3333') - - expect(calledSendAsync).to.equal(4) - - // Should use chainId provided by typed data - const result6 = await client.signTypedData(requests[4].data, { eip6492: true }) - expect(result6).to.equal('0x5555') - }) - - it('should call send transaction', async () => { - let calledSendAsync = 0 - - const requests = [ - { - chainId: 2, - tx: { - to: '0x88E1627e95071d140Abaec34574ee4AC991295fC', - value: parseEther('1.0'), - auxiliary: [] - }, - result: '0x0000' - }, - { - chainId: 2, - tx: { - to: '0xD20bC67fD6feFad616Ed6B29d6d15884E08b6D86', - value: 0, - gasLimit: 90000, - data: '0x8fe62083b9bc53178597a5a6bf55a565f1889b177607a3713bd1299aa2d4eac5458b279c87b7f85eb4e8', - auxiliary: [] - }, - result: '0x1111' - }, - { - chainId: 5, - tx: { - to: '0xf0B654137245894CAb26e56230403651B053D2Dd', - auxiliary: [] - }, - result: '0x2222' - }, - { - chainId: 6, - tx: { - to: '0x88E1627e95071d140Abaec34574ee4AC991295fC', - value: parseEther('1.0'), - auxiliary: [ - { - to: '0xD20bC67fD6feFad616Ed6B29d6d15884E08b6D86', - data: '0xefc57b05025168af33d34948ddbad8bd32a2eb8857468aa492ef94de07451c4b3423080f028edebab979' - }, - { - to: '0xf0B654137245894CAb26e56230403651B053D2Dd', - value: 1 - } - ] - }, - result: '0x3333' - } - ] as { chainId: number; tx: ExtendedTransactionRequest; result: string }[] - - const client = new SequenceClient( - { - ...basicMockTransport, - request(request: JsonRpcRequest): Promise { - calledSendAsync++ - const req = requests.shift() - - if (!request.chainId) { - request.chainId = client.getChainId() - } - - expect(request).to.deep.equal({ - method: 'eth_sendTransaction', - params: [req?.tx], - chainId: req?.chainId - }) - expect(request.chainId).to.equal(req?.chainId) - return Promise.resolve(req?.result) - } - }, - useBestStore(), - { - defaultChainId: 2 - } - ) - - // NOTICE: eth_sendTransaction doesn't require the address, so we don't attempt - // to get the address, thus we don't need to connect to the wallet - // we could add an extra check, but better to avoid client-side access control - // and let the wallet handle it, so we don't have a false sense of security. - // - // const result1 = client.sendTransaction({ - // to: '0x88E1627e95071d140Abaec34574ee4AC991295fC', - // value: parseEther('1.0'), - // }) - - // await expect(result1).to.be.rejectedWith('Sequence session not connected') - // await client.connect({ app: 'This is a test' }) - - const result2 = await client.sendTransaction({ - to: '0x88E1627e95071d140Abaec34574ee4AC991295fC', - value: parseEther('1.0') - }) - - expect(result2).to.equal('0x0000') - - const result3 = await client.sendTransaction( - { - to: '0xD20bC67fD6feFad616Ed6B29d6d15884E08b6D86', - value: 0, - data: '0x8fe62083b9bc53178597a5a6bf55a565f1889b177607a3713bd1299aa2d4eac5458b279c87b7f85eb4e8', - gasLimit: 90000 - }, - { chainId: 2 } - ) - - expect(result3).to.equal('0x1111') - - client.setDefaultChainId(5) - - const result4 = await client.sendTransaction({ - to: '0xf0B654137245894CAb26e56230403651B053D2Dd' - }) - - expect(result4).to.equal('0x2222') - - const result5 = await client.sendTransaction( - [ - { - to: '0x88E1627e95071d140Abaec34574ee4AC991295fC', - value: parseEther('1.0') - }, - { - to: '0xD20bC67fD6feFad616Ed6B29d6d15884E08b6D86', - data: '0xefc57b05025168af33d34948ddbad8bd32a2eb8857468aa492ef94de07451c4b3423080f028edebab979' - }, - { - to: '0xf0B654137245894CAb26e56230403651B053D2Dd', - value: 1 - } - ], - { chainId: 6 } - ) - - expect(result5).to.equal('0x3333') - - expect(calledSendAsync).to.equal(4) - }) - - it('should call getWalletContext', async () => { - let calledSendAsync = 0 - - const client = new SequenceClient( - { - ...basicMockTransport, - request(request: JsonRpcRequest): Promise { - calledSendAsync++ - expect(request).to.deep.equal({ - method: 'sequence_getWalletContext' - }) - return Promise.resolve(sampleContext) - } - }, - useBestStore(), - { - defaultChainId: 2 - } - ) - - const result = await client.getWalletContext() - expect(result).to.deep.equal(sampleContext) - expect(calledSendAsync).to.equal(1) - }) - - it('should call getOnchainWalletConfig', async () => { - let calledSendAsync = 0 - - const results = [ - { - chainId: 2, - result: v2.config.ConfigCoder.fromSimple({ - threshold: 2, - checkpoint: 0, - signers: [ - { weight: 1, address: ethers.Wallet.createRandom().address }, - { weight: 1, address: ethers.Wallet.createRandom().address } - ] - }) - }, - { - chainId: 2, - result: v2.config.ConfigCoder.fromSimple({ - threshold: 1, - checkpoint: 10, - signers: [{ weight: 1, address: ethers.Wallet.createRandom().address }] - }) - }, - { - chainId: 5, - result: v1.config.ConfigCoder.fromSimple({ - threshold: 1, - checkpoint: 0, - signers: [ - { weight: 3, address: ethers.Wallet.createRandom().address }, - { weight: 2, address: ethers.Wallet.createRandom().address }, - { weight: 3, address: ethers.Wallet.createRandom().address } - ] - }) - }, - { - chainId: 6, - result: v1.config.ConfigCoder.fromSimple({ - threshold: 1, - checkpoint: 0, - signers: [{ weight: 1, address: ethers.Wallet.createRandom().address }] - }) - } - ] as { chainId: number; result: commons.config.Config }[] - - const client = new SequenceClient( - { - ...basicMockTransport, - request(request: JsonRpcRequest): Promise { - const req = results[calledSendAsync] - calledSendAsync++ - - if (!request.chainId) { - request.chainId = client.getChainId() - } - - expect(request).to.deep.equal({ - method: 'sequence_getWalletConfig', - params: [req?.chainId], - chainId: req?.chainId - }) - expect(request.chainId).to.be.equal(req?.chainId) - return Promise.resolve(req?.result) - } - }, - useBestStore(), - { - defaultChainId: 2 - } - ) - - // NOTICE: sequence_getWalletConfig doesn't require the address, so we don't attempt - // to get the address, thus we don't need to connect to the wallet - // we could add an extra check, but better to avoid client-side access control - // and let the wallet handle it, so we don't have a false sense of security. - - const result1 = await client.getOnchainWalletConfig() - expect(result1).to.deep.equal(results[0].result) - - const result2 = await client.getOnchainWalletConfig({ chainId: 2 }) - expect(result2).to.deep.equal(results[1].result) - - client.setDefaultChainId(5) - - const result3 = await client.getOnchainWalletConfig() - expect(result3).to.deep.equal(results[2].result) - - const result4 = await client.getOnchainWalletConfig({ chainId: 6 }) - expect(result4).to.deep.equal(results[3].result) - }) - - describe('Network changes', async () => { - it('should react to default chainId change', async () => { - const store = useBestStore() - - const client1 = new SequenceClient(basicMockTransport, store, { defaultChainId: 2 }) - const client2 = new SequenceClient(basicMockTransport, store, { defaultChainId: 2 }) - - expect(client1.getChainId()).to.equal(2) - expect(client2.getChainId()).to.equal(2) - - client1.setDefaultChainId(5) - - expect(client1.getChainId()).to.equal(5) - expect(client2.getChainId()).to.equal(5) - }) - - it('should converge after default chainId change (different initial chain ids)', async () => { - const store = useBestStore() - - const client1 = new SequenceClient(basicMockTransport, store, { defaultChainId: 2 }) - const client2 = new SequenceClient(basicMockTransport, store, { defaultChainId: 5 }) - - expect(client1.getChainId()).to.equal(2) - expect(client2.getChainId()).to.equal(5) - - client1.setDefaultChainId(10) - - expect(client1.getChainId()).to.equal(10) - expect(client2.getChainId()).to.equal(10) - }) - - it('should emit an event when default chainId changes', async () => { - const store = useBestStore() - - const client1 = new SequenceClient(basicMockTransport, store, { defaultChainId: 2 }) - const client2 = new SequenceClient(basicMockTransport, store, { defaultChainId: 2 }) - - let called1 = 0 - client1.onDefaultChainIdChanged(chainId => { - called1++ - expect(chainId).to.equal('0xa') - }) - - let called2 = 0 - client2.onDefaultChainIdChanged(chainId => { - called2++ - expect(chainId).to.equal('0xa') - }) - - client1.setDefaultChainId(10) - - expect(called1).to.equal(1) - expect(called2).to.equal(1) - }) - }) - - describe('Default EIP6492', () => { - it('should default to legacy signatures', async () => { - let requests: number = 0 - - const data = { - domain: { - name: 'App1', - version: '1', - chainId: 2, - verifyingContract: ethers.Wallet.createRandom().address - }, - types: { - Person: [ - { name: 'name', type: 'string' }, - { name: 'age', type: 'uint256' } - ] - }, - message: { - name: 'Alice', - age: '28' - } - } - - const session = { - accountAddress: ethers.Wallet.createRandom().address, - networks: allNetworks, - walletContext: sampleContext - } - - const client = new SequenceClient( - { - ...basicMockTransport, - request(request: JsonRpcRequest): Promise { - if (requests === 0) { - expect(request.method).to.equal('personal_sign') - requests++ - return Promise.resolve('0x445566') - } else if (requests === 1) { - expect(request.method).to.equal('eth_signTypedData_v4') - requests++ - return Promise.resolve('0x112233') - } else { - expect.fail('Should not have called request') - } - }, - openWallet: () => { - return Promise.resolve(true) - }, - waitUntilOpened: async () => { - return session - }, - waitUntilConnected: async () => { - return { connected: true, session } - }, - isOpened: () => { - return true - }, - closeWallet: () => {} - }, - useBestStore() - ) - - await client.connect({ app: 'This is a test' }) - - expect(client.defaultEIP6492).to.be.false - - const result1 = await client.signMessage('0x112233') - expect(result1).to.equal('0x445566') - - const result2 = await client.signTypedData(data) - expect(result2).to.equal('0x112233') - }) - - it('should default to EIP6492 signatures', async () => { - let requests: number = 0 - - const data = { - domain: { - name: 'App1', - version: '1', - chainId: 2, - verifyingContract: ethers.Wallet.createRandom().address - }, - types: { - Person: [ - { name: 'name', type: 'string' }, - { name: 'age', type: 'uint256' } - ] - }, - message: { - name: 'Alice', - age: '28' - } - } - - const session = { - accountAddress: ethers.Wallet.createRandom().address, - networks: allNetworks, - walletContext: sampleContext - } - - const client = new SequenceClient( - { - ...basicMockTransport, - request(request: JsonRpcRequest): Promise { - if (requests === 0) { - expect(request.method).to.equal('sequence_sign') - requests++ - return Promise.resolve('0x445566') - } else if (requests === 1) { - expect(request.method).to.equal('sequence_signTypedData_v4') - requests++ - return Promise.resolve('0x112233') - } else { - expect.fail('Should not have called request') - } - }, - openWallet: () => { - return Promise.resolve(true) - }, - waitUntilOpened: async () => { - return session - }, - waitUntilConnected: async () => { - return { connected: true, session } - }, - isOpened: () => { - return true - }, - closeWallet: () => {} - }, - useBestStore(), - { defaultEIP6492: true } - ) - - await client.connect({ app: 'This is a test' }) - - expect(client.defaultEIP6492).to.be.true - - const result1 = await client.signMessage('0x112233') - expect(result1).to.equal('0x445566') - - const result2 = await client.signTypedData(data) - expect(result2).to.equal('0x112233') - }) - - it('should default to legacy when calling send', async () => { - let requests: number = 0 - - const data = { - domain: { - name: 'App1', - version: '1', - chainId: 2, - verifyingContract: ethers.Wallet.createRandom().address - }, - types: { - Person: [ - { name: 'name', type: 'string' }, - { name: 'age', type: 'uint256' } - ] - }, - message: { - name: 'Alice', - age: '28' - } - } - - const session = { - accountAddress: ethers.Wallet.createRandom().address, - networks: allNetworks, - walletContext: sampleContext - } - - const client = new SequenceClient( - { - ...basicMockTransport, - request(request: JsonRpcRequest): Promise { - if (requests === 0) { - expect(request.method).to.equal('personal_sign') - requests++ - return Promise.resolve('0x445566') - } else if (requests === 1) { - expect(request.method).to.equal('eth_signTypedData_v4') - requests++ - return Promise.resolve('0x112233') - } else { - expect.fail('Should not have called request') - } - }, - openWallet: () => { - return Promise.resolve(true) - }, - waitUntilOpened: async () => { - return session - }, - waitUntilConnected: async () => { - return { connected: true, session } - }, - isOpened: () => { - return true - }, - closeWallet: () => {} - }, - useBestStore() - ) - - await client.connect({ app: 'This is a test' }) - - expect(client.defaultEIP6492).to.be.false - - const result1 = await client.request({ method: 'personal_sign', params: ['0x112233'] }) - expect(result1).to.equal('0x445566') - - const result2 = await client.request({ method: 'eth_signTypedData_v4', params: [data] }) - expect(result2).to.equal('0x112233') - }) - - it('should default to EIP6492 when calling send', async () => { - let requests: number = 0 - - const data = { - domain: { - name: 'App1', - version: '1', - chainId: 2, - verifyingContract: ethers.Wallet.createRandom().address - }, - types: { - Person: [ - { name: 'name', type: 'string' }, - { name: 'age', type: 'uint256' } - ] - }, - message: { - name: 'Alice', - age: '28' - } - } - - const session = { - accountAddress: ethers.Wallet.createRandom().address, - networks: allNetworks, - walletContext: sampleContext - } - - const client = new SequenceClient( - { - ...basicMockTransport, - request(request: JsonRpcRequest): Promise { - if (requests === 0) { - expect(request.method).to.equal('sequence_sign') - requests++ - return Promise.resolve('0x445566') - } else if (requests === 1) { - expect(request.method).to.equal('sequence_signTypedData_v4') - requests++ - return Promise.resolve('0x112233') - } else { - expect.fail('Should not have called request') - } - }, - openWallet: () => { - return Promise.resolve(true) - }, - waitUntilOpened: async () => { - return session - }, - waitUntilConnected: async () => { - return { connected: true, session } - }, - isOpened: () => { - return true - }, - closeWallet: () => {} - }, - useBestStore(), - { defaultEIP6492: true } - ) - - await client.connect({ app: 'This is a test' }) - - expect(client.defaultEIP6492).to.be.true - - const result1 = await client.request({ method: 'personal_sign', params: ['0x112233'] }) - expect(result1).to.equal('0x445566') - - const result2 = await client.request({ method: 'eth_signTypedData_v4', params: [data] }) - expect(result2).to.equal('0x112233') - }) - - it('should not override method if default is not set', async () => { - let requests: number = 0 - - const data = { - domain: { - name: 'App1', - version: '1', - chainId: 2, - verifyingContract: ethers.Wallet.createRandom().address - }, - types: { - Person: [ - { name: 'name', type: 'string' }, - { name: 'age', type: 'uint256' } - ] - }, - message: { - name: 'Alice', - age: '28' - } - } - - const session = { - accountAddress: ethers.Wallet.createRandom().address, - networks: allNetworks, - walletContext: sampleContext - } - - const client = new SequenceClient( - { - ...basicMockTransport, - request(request: JsonRpcRequest): Promise { - if (requests === 0) { - expect(request.method).to.equal('sequence_sign') - requests++ - return Promise.resolve('0x445566') - } else if (requests === 1) { - expect(request.method).to.equal('sequence_signTypedData_v4') - requests++ - return Promise.resolve('0x112233') - } else { - expect.fail('Should not have called request') - } - }, - openWallet: () => { - return Promise.resolve(true) - }, - waitUntilOpened: async () => { - return session - }, - waitUntilConnected: async () => { - return { connected: true, session } - }, - isOpened: () => { - return true - }, - closeWallet: () => {} - }, - useBestStore() - ) - - await client.connect({ app: 'This is a test' }) - - const result1 = await client.request({ method: 'sequence_sign', params: ['0x112233'] }) - expect(result1).to.equal('0x445566') - - const result2 = await client.request({ method: 'sequence_signTypedData_v4', params: [data] }) - expect(result2).to.equal('0x112233') - }) - }) -}) diff --git a/old/packages/provider/tests/eip191prefix.spec.ts b/old/packages/provider/tests/eip191prefix.spec.ts deleted file mode 100644 index c8434bd68..000000000 --- a/old/packages/provider/tests/eip191prefix.spec.ts +++ /dev/null @@ -1,22 +0,0 @@ -import chaiAsPromised from 'chai-as-promised' -import * as chai from 'chai' - -import { messageIsExemptFromEIP191Prefix } from '../src/eip191exceptions' -import { dclLogin, message1, zeroExV3Order } from './messages' -const { expect } = chai.use(chaiAsPromised) - -describe('191 prefix exceptions', () => { - it('decentraland is exempt', () => { - expect(messageIsExemptFromEIP191Prefix(dclLogin)).equal(true) - }) - - it('should strip 191 prefix from 0x v3 orders', () => { - expect(messageIsExemptFromEIP191Prefix(zeroExV3Order)).equal(true) - }) - - it('should not strip 191 prefix from other messages', () => { - expect(messageIsExemptFromEIP191Prefix(message1)).equal(false) - expect(messageIsExemptFromEIP191Prefix(zeroExV3Order.slice(0, -10))).equal(false) - expect(messageIsExemptFromEIP191Prefix(dclLogin.slice(0, -10))).equal(false) - }) -}) diff --git a/old/packages/provider/tests/messages.ts b/old/packages/provider/tests/messages.ts deleted file mode 100644 index 4b49060bf..000000000 --- a/old/packages/provider/tests/messages.ts +++ /dev/null @@ -1,93 +0,0 @@ -import { ethers } from 'ethers' -import { prefixEIP191Message } from '../src/utils' - -// Ethereum personal sign: Hello, World! -export const message1 = new Uint8Array([ - 25, 69, 116, 104, 101, 114, 101, 117, 109, 32, 83, 105, 103, 110, 101, 100, 32, 77, 101, 115, 115, 97, 103, 101, 58, 10, 49, 51, - 72, 101, 108, 108, 111, 44, 32, 87, 111, 114, 108, 100, 33 -]) - -const dclText = `Decentraland Login -Ephemeral address: 0xe1bCF3CAc83534a055f7254C1FD88B21159fCc67 -Expiration: 2022-10-27T16:03:29.191Z` - -export const dclLogin = ethers.toUtf8Bytes(dclText) - -// Ethereum personal sign 0x v3 order -export const zeroExV3Order = new Uint8Array([ - 62, 254, 80, 200, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 64, 3, 153, 144, - 71, 27, 241, 205, 119, 186, 5, 60, 99, 148, 99, 19, 201, 174, 101, 93, 86, 211, 104, 110, 31, 232, 176, 9, 52, 53, 122, 24, 41, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 191, 3, 19, 123, 56, 230, 5, 28, 73, 127, 92, 7, 29, 45, 29, 189, 8, 190, 24, 26, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 32, 55, 18, 71, 48, 244, 210, 213, 18, 72, 210, 192, 93, 42, 229, 203, 210, 136, 237, 103, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 188, 192, 42, 21, 92, 55, 66, 99, 50, 17, 85, 85, 92, 207, 65, 7, 0, 23, 100, 158, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 150, 122, 103, 240, 255, 23, 36, 169, 85, 88, 7, 31, 44, 217, 97, 21, 252, 202, 109, 69, 32, 114, - 145, 27, 10, 160, 236, 62, 181, 81, 143, 220, 202, 36, 172, 69, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 192, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, - 32, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 128, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 160, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 36, 148, 207, 205, 215, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 128, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 13, 224, 182, 179, 167, 100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 32, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 36, 244, 114, 97, 176, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 190, 65, 193, 52, 252, 53, 23, 203, 14, 201, 75, 110, 234, 251, 102, 207, 153, 152, 120, 47, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, - 36, 148, 207, 205, 215, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 64, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 13, 224, 182, 179, 167, 100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 32, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 36, 244, 114, 97, 176, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 170, 165, 185, 230, 197, 137, 100, 47, 152, 161, 205, 169, 155, 157, 2, 75, 132, 7, 40, 90, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 -]) - -// Messages for testing trim-eip191prefix - -export const trimEIP191Prefix_test1_raw = `1915 Robert Frost -The Road Not Taken - -Two roads diverged in a yellow wood, -And sorry I could not travel both -And be one traveler, long I stood -And looked down one as far as I could -To where it bent in the undergrowth - -Then took the other, as just as fair, -And having perhaps the better claim, -Because it was grassy and wanted wear -Though as for that the passing there -Had worn them really about the same, - -And both that morning equally lay -In leaves no step had trodden black. -Oh, I kept the first for another day! -Yet knowing how way leads on to way, -I doubted if I should ever come back. - -I shall be telling this with a sigh -Somewhere ages and ages hence: -Two roads diverged in a wood, and I— -I took the one less traveled by, -And that has made all the difference. - -\u2601 \u2600 \u2602` -export const trimEIP191Prefix_test2_raw = dclText -export const trimEIP191Prefix_test3_raw = '1915 Robe' // 9 chars -export const trimEIP191Prefix_test4_raw = - '123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789' // 99 chars -export const trimEIP191Prefix_test5_raw = 'Robe 1915' - -export const trimEIP191Prefix_test1_prefixed = prefixEIP191Message(trimEIP191Prefix_test1_raw) -export const trimEIP191Prefix_test2_prefixed = prefixEIP191Message(dclText) -export const trimEIP191Prefix_test3_prefixed = prefixEIP191Message(trimEIP191Prefix_test3_raw) -export const trimEIP191Prefix_test4_prefixed = prefixEIP191Message(trimEIP191Prefix_test4_raw) -export const trimEIP191Prefix_test5_prefixed = prefixEIP191Message(trimEIP191Prefix_test5_raw) diff --git a/old/packages/provider/tests/provider.spec.ts b/old/packages/provider/tests/provider.spec.ts deleted file mode 100644 index 5a27ab239..000000000 --- a/old/packages/provider/tests/provider.spec.ts +++ /dev/null @@ -1,1768 +0,0 @@ -import { ethers } from 'ethers' -import { - ConnectOptions, - OpenWalletIntent, - OptionalChainId, - SequenceClient, - SequenceProvider, - SingleNetworkSequenceProvider, - WalletEventTypes -} from '../src' -import { expect } from 'chai' -import { ChainId, JsonRpcRequest, JsonRpcResponse, allNetworks } from '@0xsequence/network' -import { ExtendedTransactionRequest } from '../src/extended' - -const hardhat1Provider = new ethers.JsonRpcProvider('http://127.0.0.1:9595', undefined, { cacheTimeout: -1 }) -const hardhat2Provider = new ethers.JsonRpcProvider('http://127.0.0.1:8595', undefined, { cacheTimeout: -1 }) - -const providerFor = (chainId: number) => { - if (chainId === 31337) { - return hardhat1Provider - } - - if (chainId === 31338) { - return hardhat2Provider - } - - throw new Error(`No provider for chainId ${chainId}`) -} - -let defaultChainId: number - -let callback: (chainId: number) => void - -const onDefaultChainIdChanged = (cb: (chainId: number) => void) => { - callback = cb -} - -const setDefaultChainId = (chainId: number) => { - defaultChainId = chainId - callback(chainId) -} - -const basicMockClient = { - getChainId: () => defaultChainId, - onDefaultChainIdChanged, - setDefaultChainId, - // EIP-1193 - onConnect: () => {}, - onDisconnect: () => {}, - onAccountsChanged: () => {} -} as unknown as SequenceClient - -async function waitUntilNoFail(provider: ethers.Provider, timeout = 20000): Promise { - const start = Date.now() - while (Date.now() - start < timeout) { - try { - await provider.getBlockNumber() - return - } catch (e) { - await new Promise(resolve => setTimeout(resolve, 100)) - } - } - console.warn('waitUntilNoFail timed out') -} - -describe('SequenceProvider', () => { - before(async () => { - // Wait for both providers to be ready - await Promise.all([waitUntilNoFail(hardhat1Provider), waitUntilNoFail(hardhat2Provider)]) - }) - - beforeEach(() => { - defaultChainId = 31337 - }) - - describe('client proxy methods', () => { - it('should call connect', async () => { - let callsToConnect = 0 - - const provider = new SequenceProvider( - { - ...basicMockClient, - connect: async (transport: ConnectOptions) => { - expect(transport).to.deep.equal({ app: 'test' }) - callsToConnect++ - return { connected: true } - } - } as unknown as SequenceClient, - providerFor - ) - - const res = await provider.connect({ app: 'test' }) - expect(res).to.deep.equal({ connected: true }) - expect(callsToConnect).to.equal(1) - }) - - it('should call disconnect', async () => { - let callsToDisconnect = 0 - - const provider = new SequenceProvider( - { - ...basicMockClient, - disconnect: async () => { - callsToDisconnect++ - } - } as unknown as SequenceClient, - providerFor - ) - - await provider.disconnect() - expect(callsToDisconnect).to.equal(1) - }) - - it('should call isConnected', async () => { - let callsToIsConnected = 0 - - const provider = new SequenceProvider( - { - ...basicMockClient, - isConnected: () => { - callsToIsConnected++ - return true - } - } as unknown as SequenceClient, - providerFor - ) - - const res = provider.isConnected() - expect(res).to.equal(true) - expect(callsToIsConnected).to.equal(1) - }) - - it('should call getSession', async () => { - let callsToGetSession = 0 - - const provider = new SequenceProvider( - { - ...basicMockClient, - getSession: () => { - callsToGetSession++ - return { session: 'test' } - } - } as unknown as SequenceClient, - providerFor - ) - - const res = provider.getSession() - expect(res).to.deep.equal({ session: 'test' }) - expect(callsToGetSession).to.equal(1) - }) - - it('should call getAddress', async () => { - let callsToGetAddress = 0 - - const provider = new SequenceProvider( - { - ...basicMockClient, - getAddress: () => { - callsToGetAddress++ - return '0x123' - } - } as unknown as SequenceClient, - providerFor - ) - - const res = provider.getAddress() - expect(res).to.equal('0x123') - expect(callsToGetAddress).to.equal(1) - }) - - it('should call getNetworks', async () => { - let callsToGetNetworks = 0 - - const provider = new SequenceProvider( - { - ...basicMockClient, - getNetworks: async () => { - callsToGetNetworks++ - return [{ chainId: 31337 }, { chainId: 31338 }] - } - } as unknown as SequenceClient, - providerFor - ) - - const res = await provider.getNetworks() - expect(res).to.deep.equal([{ chainId: 31337 }, { chainId: 31338 }]) - expect(callsToGetNetworks).to.equal(1) - }) - - it('should call getChainId', async () => { - let callsToGetChainId = 0 - - const provider = new SequenceProvider( - { - ...basicMockClient, - getChainId: () => { - callsToGetChainId++ - return 31337 - } - } as unknown as SequenceClient, - providerFor - ) - - const res = provider.getChainId() - expect(res).to.equal(31337) - - // This method is also called by the constructor - expect(callsToGetChainId).to.equal(2) - }) - - it('should call setDefaultChainId', async () => { - let callsToSetDefaultChainId = 0 - - const provider = new SequenceProvider( - { - ...basicMockClient, - setDefaultChainId: (chainId: number) => { - callsToSetDefaultChainId++ - expect(chainId).to.equal(31338) - } - } as unknown as SequenceClient, - providerFor - ) - - provider.setDefaultChainId(31338) - expect(callsToSetDefaultChainId).to.equal(1) - }) - - it('should call isOpened', async () => { - let callsToIsOpened = 0 - - const provider = new SequenceProvider( - { - ...basicMockClient, - isOpened: () => { - callsToIsOpened++ - return true - } - } as unknown as SequenceClient, - providerFor - ) - - const res = provider.isOpened() - expect(res).to.equal(true) - expect(callsToIsOpened).to.equal(1) - }) - - it('should call closeWallet', async () => { - let callsToCloseWallet = 0 - - const provider = new SequenceProvider( - { - ...basicMockClient, - closeWallet: async () => { - callsToCloseWallet++ - } - } as unknown as SequenceClient, - providerFor - ) - - provider.closeWallet() - expect(callsToCloseWallet).to.equal(1) - }) - - it('should call getWalletContext', async () => { - let callsToGetWalletContext = 0 - - const provider = new SequenceProvider( - { - ...basicMockClient, - getWalletContext: async () => { - callsToGetWalletContext++ - return { walletContext: 'test' } - } - } as unknown as SequenceClient, - providerFor - ) - - const res = await provider.getWalletContext() - expect(res).to.deep.equal({ walletContext: 'test' }) - expect(callsToGetWalletContext).to.equal(1) - }) - - it('should call getWalletConfig', async () => { - let callsToGetWalletConfig = 0 - - const provider = new SequenceProvider( - { - ...basicMockClient, - getOnchainWalletConfig: async (options?: OptionalChainId) => { - expect(options).to.deep.equal({ chainId: 31338 }) - callsToGetWalletConfig++ - return { walletConfig: 'test' } - } - } as unknown as SequenceClient, - providerFor - ) - - const res = await provider.getWalletConfig('hardhat2') - expect(res).to.deep.equal({ walletConfig: 'test' }) - expect(callsToGetWalletConfig).to.equal(1) - }) - - it('should call connect + authorize', async () => { - let callsToConnect = 0 - - const provider = new SequenceProvider( - { - ...basicMockClient, - connect: async (transport: ConnectOptions) => { - expect(transport).to.deep.equal({ app: 'test', authorize: true }) - callsToConnect++ - return { connected: true } - } - } as unknown as SequenceClient, - providerFor - ) - - const res = await provider.authorize({ app: 'test' }) - expect(res).to.deep.equal({ connected: true }) - expect(callsToConnect).to.equal(1) - }) - - it('should call openWallet', async () => { - let callsToOpenWallet = 0 - - const provider = new SequenceProvider( - { - ...basicMockClient, - openWallet: (path: string, intent: OpenWalletIntent) => { - expect(path).to.equal('/test') - expect(intent).to.deep.equal({ type: 'connect' }) - callsToOpenWallet++ - } - } as unknown as SequenceClient, - providerFor - ) - - await provider.openWallet('/test', { type: 'connect' }) - expect(callsToOpenWallet).to.equal(1) - }) - }) - - describe('provider events', () => { - let provider: SequenceProvider - - const callbacks: { [event in keyof WalletEventTypes]: (data: any) => any } = {} as any - - beforeEach(() => { - const registerCallback = (name: K, cb: WalletEventTypes[K]) => { - callbacks[name] = cb - return () => {} - } - - // When SequenceProvider is instantiated it will register callbacks on the client which emit events - // We capture these callbacks and call them manually to simulate the events - provider = new SequenceProvider( - { - ...basicMockClient, - onConnect: (cb: WalletEventTypes['connect']) => registerCallback('connect', cb), - onDisconnect: (cb: WalletEventTypes['disconnect']) => registerCallback('disconnect', cb), - onDefaultChainIdChanged: (cb: WalletEventTypes['chainChanged']) => registerCallback('chainChanged', cb), - onAccountsChanged: (cb: WalletEventTypes['accountsChanged']) => registerCallback('accountsChanged', cb) - } as unknown as SequenceClient, - providerFor - ) - }) - - it('should call onConnect', async () => { - let callsToOnConnect = 0 - - provider.on('connect', (data: any) => { - callsToOnConnect++ - expect(data).to.deep.equal({ - connected: true, - chainId: '0x112233' - }) - }) - - callbacks['connect']({ - connected: true, - chainId: '0x112233' - }) - - await new Promise(resolve => setTimeout(resolve, 100)) - expect(callsToOnConnect).to.equal(1) - }) - - it('should call onDisconnect', async () => { - let callsToOnDisconnect = 0 - - provider.on('disconnect', (data: any) => { - callsToOnDisconnect++ - expect(data).to.deep.equal({ - connected: false, - error: 1000 - }) - }) - - callbacks['disconnect']({ - connected: false, - error: 1000 - }) - - await new Promise(resolve => setTimeout(resolve, 100)) - expect(callsToOnDisconnect).to.equal(1) - }) - - it('should call onDefaultChainIdChanged', async () => { - let callsToOnDefaultChainIdChanged = 0 - - provider.on('chainChanged', (data: any) => { - callsToOnDefaultChainIdChanged++ - expect(data).to.equal(31338) - }) - - callbacks['chainChanged'](31338) - - await new Promise(resolve => setTimeout(resolve, 100)) - expect(callsToOnDefaultChainIdChanged).to.equal(1) - }) - - it('should call onAccountsChanged', async () => { - let callsToOnAccountsChanged = 0 - - provider.on('accountsChanged', (data: any) => { - callsToOnAccountsChanged++ - expect(data).to.deep.equal(['0x123']) - }) - - callbacks['accountsChanged'](['0x123']) - - await new Promise(resolve => setTimeout(resolve, 100)) - expect(callsToOnAccountsChanged).to.equal(1) - }) - }) - - // This converts from "any kind" of chainId to a number - describe('toChainId', () => { - let provider: SequenceProvider - - const defaultChainId: number = 31337 - - beforeEach(() => { - provider = new SequenceProvider( - { - ...basicMockClient, - onDefaultChainIdChanged, - getChainId: () => defaultChainId - } as unknown as SequenceClient, - providerFor - ) - }) - - it('should work for numbers', () => { - expect(provider.toChainId(1)).to.equal(1) - expect(provider.toChainId(31337)).to.equal(31337) - expect(provider.toChainId(31338)).to.equal(31338) - }) - - it('should fail if network is not supported', () => { - expect(() => provider.toChainId(99999)).to.throw('Unsupported network 99999') - }) - - it('should work for number strings', () => { - expect(provider.toChainId('1')).to.equal(1) - expect(provider.toChainId('31337')).to.equal(31337) - expect(provider.toChainId('31338')).to.equal(31338) - }) - - it('should work for hex strings', () => { - expect(provider.toChainId('0x1')).to.equal(1) - expect(provider.toChainId('0x7a69')).to.equal(31337) - expect(provider.toChainId('0x7a6a')).to.equal(31338) - }) - - it('should fail if network is not supported - number string', () => { - expect(() => provider.toChainId('99999')).to.throw('Unsupported network 99999') - }) - - it('should fail if network is not supported - hex string', () => { - expect(() => provider.toChainId('0x99999')).to.throw('Unsupported network 0x99999') - }) - - it('should work for network names', () => { - expect(provider.toChainId('mainnet')).to.equal(1) - expect(provider.toChainId('rinkeby')).to.equal(4) - expect(provider.toChainId('goerli')).to.equal(5) - expect(provider.toChainId('polygon')).to.equal(137) - expect(provider.toChainId('mumbai')).to.equal(80001) - expect(provider.toChainId('polygon-zkevm')).to.equal(1101) - expect(provider.toChainId('bsc')).to.equal(56) - expect(provider.toChainId('bsc-testnet')).to.equal(97) - expect(provider.toChainId('optimism')).to.equal(10) - expect(provider.toChainId('arbitrum')).to.equal(42161) - expect(provider.toChainId('arbitrum-sepolia')).to.equal(421614) - expect(provider.toChainId('arbitrum-nova')).to.equal(42170) - expect(provider.toChainId('avalanche')).to.equal(43114) - }) - - it('should fail if network is not supported - network name', () => { - expect(() => provider.toChainId('notreallyachain')).to.throw('Unsupported network notreallyachain') - }) - - it('should work when passing a full network config', () => { - expect(provider.toChainId(allNetworks.find(n => n.chainId === 1))).to.equal(1) - expect(provider.toChainId(allNetworks.find(n => n.chainId === 31337))).to.equal(31337) - }) - - it('should fail if the passed network config doesnt exist on the provider', () => { - const fakeNetwork = { - chainId: 99999, - name: 'fake', - rpcUrl: 'http://127.0.0.1:99999', - nativeToken: { symbol: 'ETH', name: 'Ether', decimals: 18 } - } - expect(() => provider.toChainId(fakeNetwork)).to.throw(`Unsupported network ${fakeNetwork}`) - }) - - it('should work when passing a BigInt', () => { - expect(provider.toChainId(1n)).to.equal(1) - expect(provider.toChainId(31337n)).to.equal(31337) - expect(provider.toChainId(31338n)).to.equal(31338) - }) - - it('should fail if network is not supported - BigInt', () => { - expect(() => provider.toChainId(99999n)).to.throw('Unsupported network 99999') - }) - - it('should return undefined if passed undefined', () => { - expect(provider.toChainId(undefined)).to.equal(undefined) - }) - }) - - describe('getProvider (single network)', () => { - let provider: SequenceProvider - - beforeEach(() => { - provider = new SequenceProvider(basicMockClient, providerFor) - }) - - it('should return self if asked for no specific chain', () => { - expect(provider.getProvider()).to.equal(provider) - }) - - it('should not return self if asked for the current default chain', () => { - expect(provider.getProvider(provider.getChainId())).to.not.equal(provider) - }) - - it('should return specific provider if asked for a specific chain', () => { - expect(provider.getProvider(31337).getChainId()).to.equal(31337) - expect(provider.getProvider(31338).getChainId()).to.equal(31338) - }) - - it('specific provider should not be parent provider', () => { - expect(provider.getProvider(31337)).to.not.equal(provider) - }) - - it('should return same provider if asked for specific chain twice', () => { - const provider1 = provider.getProvider(31337) - const provider2 = provider.getProvider(31337) - expect(provider1).to.equal(provider2) - - const provider3 = provider.getProvider(31338) - const provider4 = provider.getProvider(31338) - expect(provider3).to.equal(provider4) - - expect(provider1).to.not.equal(provider3) - }) - - it('should fail to return provider for different chain from a specific provider', () => { - const provider1 = provider.getProvider(31337) - expect(() => provider1.getProvider(31338)).to.throw( - 'This provider only supports the network 31337, but 31338 was requested.' - ) - - const provider2 = provider.getProvider(31338) - expect(() => provider2.getProvider(31337)).to.throw( - 'This provider only supports the network 31338, but 31337 was requested.' - ) - }) - - it('specific provider should return self if asked for no specific chain', () => { - const provider1 = provider.getProvider(31337) - expect(provider1.getProvider()).to.equal(provider1) - expect(provider1).to.not.equal(provider) - expect(provider1.getProvider()).to.not.equal(provider) - }) - - it('specific provider should return self if asked for the provider of its own chain', () => { - const provider1 = provider.getProvider(31338) - expect(provider1.getProvider(31338)).to.equal(provider1) - }) - - it('should return isSingleNetworkSequenceProvider', async () => { - const main = provider.getProvider() - const single = provider.getProvider(31337) - - expect(SequenceProvider.is(main)).to.equal(true) - expect(SequenceProvider.is(single)).to.equal(true) - expect(SingleNetworkSequenceProvider.is(main)).to.equal(false) - expect(SingleNetworkSequenceProvider.is(single)).to.equal(true) - }) - }) - - describe('getSigner (single network)', () => { - let provider: SequenceProvider - - beforeEach(() => { - provider = new SequenceProvider(basicMockClient, providerFor) - }) - - it('should get signer for default chain', async () => { - const signer = provider.getSigner() - expect(await signer.getChainId()).to.equal(31337) - }) - - it('should not get same signer for default and specific chain', async () => { - const signer1 = provider.getSigner() - const signer2 = provider.getSigner(31337) - expect(signer1).to.not.equal(signer2) - }) - - it('should get signer for specific chain', async () => { - const signer = provider.getSigner(31338) - expect(await signer.getChainId()).to.equal(31338) - }) - - it('should get signer for specific chain from specific provider', async () => { - const signer = provider.getProvider(31338).getSigner() - expect(await signer.getChainId()).to.equal(31338) - }) - - it('should get signer for specific chain from specific provider (using chainid(', async () => { - const signer = provider.getProvider(31338).getSigner(31338) - expect(await signer.getChainId()).to.equal(31338) - }) - - it('should fail to get signer for different chain from a specific provider', async () => { - expect(() => provider.getProvider(31338).getSigner(31337)).to.throw( - 'This provider only supports the network 31338, but 31337 was requested.' - ) - }) - }) - - describe('subproviders (public rpc methods)', () => { - let provider: SequenceProvider - - beforeEach(() => { - provider = new SequenceProvider(basicMockClient, providerFor) - }) - - it('should return hardhat1 subprovider for chain 31337', async () => { - expect(await provider._getSubprovider('hardhat')).to.equal(hardhat1Provider) - }) - - it('should return hardhat2 subprovider for chain 31338', async () => { - expect(await provider._getSubprovider('hardhat2')).to.equal(hardhat2Provider) - }) - - it('should fail to return subprovider if providerFor doesnt return a provider', async () => { - await expect(provider._getSubprovider(1)).to.be.rejectedWith('No provider for chainId 1') - }) - - it('should return hardhat1 subprovider for default chain', async () => { - expect(await provider._getSubprovider()).to.equal(hardhat1Provider) - }) - - it('should return hardat2 if default chain is changed', async () => { - provider.setDefaultChainId(31338) - expect(await provider._getSubprovider()).to.equal(hardhat2Provider) - }) - - describe('forward methods to subprovider', () => { - const testAccounts = [ - new ethers.Wallet('0xcd0434442164a4a6ef9bb677da8dc326fddf412cad4df65e1a3f2555aee5e2b3').connect(hardhat1Provider), - new ethers.Wallet('0xcd0434442164a4a6ef9bb677da8dc326fddf412cad4df65e1a3f2555aee5e2b3').connect(hardhat2Provider) - ] - - describe('forward getBlockNumber', () => { - let bn1: number - let bn2: number - - beforeEach(async () => { - bn1 = await hardhat1Provider.getBlockNumber() - bn2 = await hardhat2Provider.getBlockNumber() - - if (bn1 === bn2) { - await hardhat2Provider.send('evm_mine', []) - - bn2 = await hardhat2Provider.getBlockNumber() - } - - expect(bn1).to.not.equal(bn2) - }) - - it('forward getBlockNumber - default', async () => { - const provider = new SequenceProvider(basicMockClient, providerFor) - expect(await provider.getBlockNumber()).to.equal(bn1, 'default chain') - - provider.setDefaultChainId(31338) - expect(await provider.getBlockNumber()).to.equal(bn2, 'new default chain') - }) - - it('forward getBlockNumber - specific chain', async () => { - const provider = new SequenceProvider(basicMockClient, providerFor) - expect(await provider.getBlockNumber({ chainId: 31337 })).to.equal(bn1) - expect(await provider.getBlockNumber({ chainId: 31338 })).to.equal(bn2) - }) - - it('forward getBlockNumber - static network provider', async () => { - const provider = new SequenceProvider(basicMockClient, providerFor) - expect(await provider.getProvider('hardhat').getBlockNumber()).to.equal(bn1) - expect(await provider.getProvider('hardhat2').getBlockNumber()).to.equal(bn2) - }) - - it('fail to forward getBlockNumber - static network provider for different chain', async () => { - const provider = new SequenceProvider(basicMockClient, providerFor) - await expect(provider.getProvider('hardhat2').getBlockNumber({ chainId: 31337 })).to.be.rejectedWith( - 'This provider only supports the network 31338, but 31337 was requested.' - ) - }) - }) - - describe('forward getFeeData', () => { - let provider: SequenceProvider - - beforeEach(() => { - // NOTICE: We need to path the hardhat providers so they return different gas prices - provider = new SequenceProvider(basicMockClient, (chainId: number) => { - if (chainId === 31337) { - return { - ...hardhat1Provider, - getFeeData: async () => ({ gasPrice: 1n }) - } as unknown as ethers.JsonRpcProvider - } - - if (chainId === 31338) { - return { - ...hardhat2Provider, - getFeeData: async () => ({ gasPrice: 2n }) - } as unknown as ethers.JsonRpcProvider - } - - throw new Error(`No provider for chainId ${chainId}`) - }) - }) - - it('forward getFeeData - default', async () => { - expect((await provider.getFeeData()).gasPrice).to.equal(1n) - - provider.setDefaultChainId(31338) - expect((await provider.getFeeData()).gasPrice).to.equal(2n) - }) - - it('forward getFeeData - specific chain', async () => { - expect((await provider.getFeeData({ chainId: 31337 })).gasPrice).to.equal(1n) - expect((await provider.getFeeData({ chainId: 31338 })).gasPrice).to.equal(2n) - }) - - it('forward getFeeData - static network provider', async () => { - expect((await provider.getProvider('hardhat').getFeeData()).gasPrice).to.equal(1n) - expect((await provider.getProvider(31338).getFeeData()).gasPrice).to.equal(2n) - }) - - it('fail to forward getFeeData - static network provider for different chain', async () => { - await expect(provider.getProvider('hardhat').getFeeData({ chainId: 31338 })).to.be.rejectedWith( - 'This provider only supports the network 31337, but 31338 was requested.' - ) - }) - }) - - describe('forward getBalance', () => { - let b1: bigint - let b2: bigint - - beforeEach(async () => { - b1 = await hardhat1Provider.getBalance(testAccounts[0].address) - b2 = await hardhat2Provider.getBalance(testAccounts[1].address) - - if (b1 === b2) { - await testAccounts[1].sendTransaction({ - to: ethers.Wallet.createRandom().address, - value: 1 - }) - - b2 = await hardhat2Provider.getBalance(testAccounts[1].address) - } - - expect(b1).to.not.equal(b2) - }) - - it('forward getBalance - default', async () => { - const provider = new SequenceProvider(basicMockClient, providerFor) - expect(await provider.getBalance(testAccounts[0].address)).to.equal(b1) - - provider.setDefaultChainId(31338) - expect(await provider.getBalance(testAccounts[1].address)).to.equal(b2) - }) - - it('forward getBalance - specific chain', async () => { - const provider = new SequenceProvider(basicMockClient, providerFor) - expect(await provider.getBalance(testAccounts[0].address, undefined, { chainId: 31337 })).to.equal(b1) - expect(await provider.getBalance(testAccounts[1].address, undefined, { chainId: 31338 })).to.equal(b2) - }) - - it('forward getBalance - static network provider', async () => { - const provider = new SequenceProvider(basicMockClient, providerFor) - expect(await provider.getProvider('hardhat').getBalance(testAccounts[0].address)).to.equal(b1) - expect(await provider.getProvider('hardhat2').getBalance(testAccounts[1].address)).to.equal(b2) - }) - - it('fail to forward getBalance - static network provider for different chain', async () => { - const provider = new SequenceProvider(basicMockClient, providerFor) - await expect( - provider.getProvider('hardhat2').getBalance(testAccounts[0].address, undefined, { chainId: 31337 }) - ).to.be.rejectedWith('This provider only supports the network 31338, but 31337 was requested.') - }) - }) - - describe('forward getTransactionCount', () => { - let txc1: number - let txc2: number - - beforeEach(async () => { - txc1 = await hardhat1Provider.getTransactionCount(testAccounts[0].address) - txc2 = await hardhat2Provider.getTransactionCount(testAccounts[1].address) - - if (txc1 === txc2) { - await testAccounts[1].sendTransaction({ - to: testAccounts[0].address - }) - - txc2 = await hardhat2Provider.getTransactionCount(testAccounts[1].address) - } - - expect(txc1).to.not.equal(txc2) - }) - - it('forward getTransactionCount - default', async () => { - const provider = new SequenceProvider(basicMockClient, providerFor) - expect(await provider.getTransactionCount(testAccounts[0].address)).to.equal(txc1) - - provider.setDefaultChainId(31338) - expect(await provider.getTransactionCount(testAccounts[1].address)).to.equal(txc2) - }) - - it('forward getTransactionCount - specific chain', async () => { - const provider = new SequenceProvider(basicMockClient, providerFor) - expect(await provider.getTransactionCount(testAccounts[0].address, undefined, { chainId: 31337 })).to.equal(txc1) - expect(await provider.getTransactionCount(testAccounts[1].address, undefined, { chainId: 31338 })).to.equal(txc2) - }) - - it('forward getTransactionCount - static network provider', async () => { - const provider = new SequenceProvider(basicMockClient, providerFor) - expect(await provider.getProvider('hardhat').getTransactionCount(testAccounts[0].address)).to.equal(txc1) - expect(await provider.getProvider('hardhat2').getTransactionCount(testAccounts[1].address)).to.equal(txc2) - }) - - it('fail to forward getTransactionCount - static network provider for different chain', async () => { - const provider = new SequenceProvider(basicMockClient, providerFor) - await expect( - provider.getProvider('hardhat2').getTransactionCount(testAccounts[0].address, undefined, { chainId: 31337 }) - ).to.be.rejectedWith('This provider only supports the network 31338, but 31337 was requested.') - }) - }) - - describe('forward getCode', () => { - let addr: string - - beforeEach(async () => { - // deploy a "contract" with code 0x112233 - const res = await testAccounts[0] - .sendTransaction({ - data: '0x621122336000526003601df3' - }) - .then(r => r.wait()) - - if (!res?.contractAddress) { - throw new Error('Could not get transaction receipt') - } - - addr = res.contractAddress - - expect(await hardhat1Provider.getCode(addr)).to.equal('0x112233') - expect(await hardhat2Provider.getCode(addr)).to.equal('0x') - }) - - it('forward getCode - default', async () => { - const provider = new SequenceProvider(basicMockClient, providerFor) - expect(await provider.getCode(addr)).to.equal('0x112233') - - provider.setDefaultChainId(31338) - expect(await provider.getCode(addr)).to.equal('0x') - }) - - it('forward getCode - specific chain', async () => { - const provider = new SequenceProvider(basicMockClient, providerFor) - expect(await provider.getCode(addr, undefined, { chainId: 31337 })).to.equal('0x112233') - expect(await provider.getCode(addr, undefined, { chainId: 31338 })).to.equal('0x') - }) - - it('forward getCode - static network provider', async () => { - const provider = new SequenceProvider(basicMockClient, providerFor) - expect(await provider.getProvider('hardhat').getCode(addr)).to.equal('0x112233') - expect(await provider.getProvider('hardhat2').getCode(addr)).to.equal('0x') - }) - - it('fail to forward getCode - static network provider for different chain', async () => { - const provider = new SequenceProvider(basicMockClient, providerFor) - await expect(provider.getProvider('hardhat2').getCode(addr, undefined, { chainId: 31337 })).to.be.rejectedWith( - 'This provider only supports the network 31338, but 31337 was requested.' - ) - }) - }) - - describe('forward getStorage', () => { - const expected = '0x0000000000000000000000000000000000000000000000000000000000112233' - const empty = '0x0000000000000000000000000000000000000000000000000000000000000000' - - let addr: string - - beforeEach(async () => { - // deploy a "contract" that writes 0x112233 to storage slot 0x445566 - const res = await testAccounts[0] - .sendTransaction({ - data: '0x621122336244556655' - }) - .then(r => r.wait()) - - if (!res?.contractAddress) { - throw new Error('Could not get transaction receipt') - } - - addr = res.contractAddress - - expect(await hardhat1Provider.getStorage(addr, '0x445566')).to.equal(expected) - expect(await hardhat2Provider.getStorage(addr, '0x445566')).to.equal(empty) - }) - - it('forward getStorage - default', async () => { - const provider = new SequenceProvider(basicMockClient, providerFor) - expect(await provider.getStorage(addr, '0x445566')).to.equal(expected) - - provider.setDefaultChainId(31338) - expect(await provider.getStorage(addr, '0x445566')).to.equal(empty) - }) - - it('forward getStorage - specific chain', async () => { - const provider = new SequenceProvider(basicMockClient, providerFor) - expect(await provider.getStorage(addr, '0x445566', undefined, { chainId: 31337 })).to.equal(expected) - expect(await provider.getStorage(addr, '0x445566', undefined, { chainId: 31338 })).to.equal(empty) - }) - - it('forward getStorage - static network provider', async () => { - const provider = new SequenceProvider(basicMockClient, providerFor) - expect(await provider.getProvider('hardhat').getStorage(addr, '0x445566')).to.equal(expected) - expect(await provider.getProvider('hardhat2').getStorage(addr, '0x445566')).to.equal(empty) - }) - - it('fail to forward getStorage - static network provider for different chain', async () => { - const provider = new SequenceProvider(basicMockClient, providerFor) - await expect( - provider.getProvider('hardhat2').getStorage(addr, '0x445566', undefined, { chainId: 31337 }) - ).to.be.rejectedWith('This provider only supports the network 31338, but 31337 was requested.') - }) - }) - - describe('forward call', () => { - let addr: string - - beforeEach(async () => { - // deploy a "contract" that when called returns 0x112233 - const res = await testAccounts[0] - .sendTransaction({ - data: '0x6b621122336000526003601df3600052600c6014f3' - }) - .then(r => r.wait()) - - if (!res?.contractAddress) { - throw new Error('Could not get transaction receipt') - } - - addr = res.contractAddress - - expect(await hardhat1Provider.call({ to: addr })).to.equal('0x112233') - expect(await hardhat2Provider.call({ to: addr })).to.equal('0x') - }) - - it('forward call - default', async () => { - const provider = new SequenceProvider(basicMockClient, providerFor) - expect(await provider.call({ to: addr })).to.equal('0x112233') - - provider.setDefaultChainId(31338) - expect(await provider.call({ to: addr })).to.equal('0x') - }) - - it('forward call - specific chain', async () => { - const provider = new SequenceProvider(basicMockClient, providerFor) - expect(await provider.call({ to: addr }, { chainId: 31337 })).to.equal('0x112233') - expect(await provider.call({ to: addr }, { chainId: 31338 })).to.equal('0x') - }) - - it('forward call - static network provider', async () => { - const provider = new SequenceProvider(basicMockClient, providerFor) - expect(await provider.getProvider('hardhat').call({ to: addr })).to.equal('0x112233') - expect(await provider.getProvider('hardhat2').call({ to: addr })).to.equal('0x') - }) - - it('fail to forward call - static network provider for different chain', async () => { - const provider = new SequenceProvider(basicMockClient, providerFor) - await expect(provider.getProvider('hardhat2').call({ to: addr }, { chainId: 31337 })).to.be.rejectedWith( - 'This provider only supports the network 31338, but 31337 was requested.' - ) - }) - }) - - describe('forward estimateGas', () => { - let eg1: bigint - let eg2: bigint - - let addr: string - - beforeEach(async () => { - // deploy a "contract" that when called returns 0x112233 - // (this uses a bit of gas that we can measure) - const res = await testAccounts[0] - .sendTransaction({ - data: '0x6b621122336000526003601df3600052600c6014f3' - }) - .then(r => r.wait()) - - if (!res?.contractAddress) { - throw new Error('Could not get transaction receipt') - } - - addr = res.contractAddress - - eg1 = await hardhat1Provider.estimateGas({ to: addr }) - eg2 = await hardhat2Provider.estimateGas({ to: addr }) - - expect(eg1).to.not.equal(eg2) - }) - - it('forward estimateGas - default', async () => { - const provider = new SequenceProvider(basicMockClient, providerFor) - expect(await provider.estimateGas({ to: addr })).to.equal(eg1) - - provider.setDefaultChainId(31338) - expect(await provider.estimateGas({ to: addr })).to.equal(eg2) - }) - - it('forward estimateGas - specific chain', async () => { - const provider = new SequenceProvider(basicMockClient, providerFor) - expect(await provider.estimateGas({ to: addr }, { chainId: 31337 })).to.equal(eg1) - expect(await provider.estimateGas({ to: addr }, { chainId: 31338 })).to.equal(eg2) - }) - - it('forward estimateGas - static network provider', async () => { - const provider = new SequenceProvider(basicMockClient, providerFor) - expect(await provider.getProvider('hardhat').estimateGas({ to: addr })).to.equal(eg1) - expect(await provider.getProvider('hardhat2').estimateGas({ to: addr })).to.equal(eg2) - }) - - it('fail to forward estimateGas - static network provider for different chain', async () => { - const provider = new SequenceProvider(basicMockClient, providerFor) - await expect(provider.getProvider('hardhat2').estimateGas({ to: addr }, { chainId: 31337 })).to.be.rejectedWith( - 'This provider only supports the network 31338, but 31337 was requested.' - ) - }) - }) - - describe('forward getBlock', () => { - let b1: ethers.Block | null - let b2: ethers.Block | null - - beforeEach(async () => { - b1 = await hardhat1Provider.getBlock(1) - b2 = await hardhat2Provider.getBlock(1) - - expect(b1).to.not.deep.equal(b2) - }) - - it('forward getBlock - default', async () => { - const provider = new SequenceProvider(basicMockClient, providerFor) - expect(await provider.getBlock(1)).to.deep.equal(b1) - - provider.setDefaultChainId(31338) - expect(await provider.getBlock(1)).to.deep.equal(b2) - }) - - it('forward getBlock - specific chain', async () => { - const provider = new SequenceProvider(basicMockClient, providerFor) - expect(await provider.getBlock(1, undefined, { chainId: 31337 })).to.deep.equal(b1) - expect(await provider.getBlock(1, undefined, { chainId: 31338 })).to.deep.equal(b2) - }) - - it('forward getBlock - static network provider', async () => { - const provider = new SequenceProvider(basicMockClient, providerFor) - expect(await provider.getProvider('hardhat').getBlock(1)).to.deep.equal(b1) - expect(await provider.getProvider('hardhat2').getBlock(1)).to.deep.equal(b2) - }) - - it('fail to forward getBlock - static network provider for different chain', async () => { - const provider = new SequenceProvider(basicMockClient, providerFor) - await expect(provider.getProvider('hardhat2').getBlock(0, undefined, { chainId: 31337 })).to.be.rejectedWith( - 'This provider only supports the network 31338, but 31337 was requested.' - ) - }) - }) - - describe('forward getTransaction', () => { - let t1: string - - beforeEach(async () => { - // We can't create a transaction that exists on both chains - const res = await testAccounts[0].sendTransaction({ - to: ethers.Wallet.createRandom().address - }) - - t1 = res.hash - await res.wait() - }) - - it('forward getTransaction - default', async () => { - const provider = new SequenceProvider(basicMockClient, providerFor) - expect(await provider.getTransaction(t1).then(r => r?.hash)).to.equal(t1) - - provider.setDefaultChainId(31338) - expect(await provider.getTransaction(t1)).to.be.null - }) - - it('forward getTransaction - specific chain', async () => { - const provider = new SequenceProvider(basicMockClient, providerFor) - expect(await provider.getTransaction(t1, { chainId: 31337 }).then(r => r?.hash)).to.equal(t1) - expect(await provider.getTransaction(t1, { chainId: 31338 })).to.be.null - }) - - it('forward getTransaction - static network provider', async () => { - const provider = new SequenceProvider(basicMockClient, providerFor) - expect( - await provider - .getProvider('hardhat') - .getTransaction(t1) - .then(r => r?.hash) - ).to.equal(t1) - expect(await provider.getProvider('hardhat2').getTransaction(t1)).to.be.null - }) - - it('fail to forward getTransaction - static network provider for different chain', async () => { - const provider = new SequenceProvider(basicMockClient, providerFor) - await expect(provider.getProvider('hardhat2').getTransaction(t1, { chainId: 31337 })).to.be.rejectedWith( - 'This provider only supports the network 31338, but 31337 was requested.' - ) - }) - }) - - describe('forward getLogs', () => { - let t1: string - - let r1: Array - let r2: Array - - beforeEach(async () => { - // Deploy a contract that emits a single LOG0 event (during deployment) - const res = await testAccounts[0] - .sendTransaction({ - data: '0x60006000a0' - }) - .then(r => r.wait()) - - if (!res?.contractAddress) { - throw new Error('Could not get transaction receipt') - } - - t1 = res.contractAddress - - r1 = await hardhat1Provider.getLogs({ address: t1 }) - r2 = await hardhat2Provider.getLogs({ address: t1 }) - - expect(r1).to.not.deep.equal(r2) - }) - - it('forward getLogs - default', async () => { - const provider = new SequenceProvider(basicMockClient, providerFor) - expect(await provider.getLogs({ address: t1 })).to.deep.equal(r1) - - provider.setDefaultChainId(31338) - expect(await provider.getLogs({ address: t1 })).to.deep.equal(r2) - }) - - it('forward getLogs - specific chain', async () => { - const provider = new SequenceProvider(basicMockClient, providerFor) - expect(await provider.getLogs({ address: t1 }, { chainId: 31337 })).to.deep.equal(r1) - expect(await provider.getLogs({ address: t1 }, { chainId: 31338 })).to.deep.equal(r2) - }) - - it('forward getLogs - static network provider', async () => { - const provider = new SequenceProvider(basicMockClient, providerFor) - expect(await provider.getProvider('hardhat').getLogs({ address: t1 })).to.deep.equal(r1) - expect(await provider.getProvider('hardhat2').getLogs({ address: t1 })).to.deep.equal(r2) - }) - - it('fail to forward getLogs - static network provider for different chain', async () => { - const provider = new SequenceProvider(basicMockClient, providerFor) - await expect(provider.getProvider('hardhat2').getLogs({ address: t1 }, { chainId: 31337 })).to.be.rejectedWith( - 'This provider only supports the network 31338, but 31337 was requested.' - ) - }) - }) - - describe('forward waitForTransaction', () => { - let t1: string - - beforeEach(async () => { - t1 = await testAccounts[0] - .sendTransaction({ - to: ethers.Wallet.createRandom().address - }) - .then(r => r!.hash) - }) - - it('forward waitForTransaction - default', async () => { - const provider = new SequenceProvider(basicMockClient, providerFor) - expect(await provider.waitForTransaction(t1, undefined, 250).then(r => r?.hash)).to.equal(t1) - - provider.setDefaultChainId(31338) - await expect(provider.waitForTransaction(t1, undefined, 250)).to.be.rejected - }) - - it('forward waitForTransaction - specific chain', async () => { - const provider = new SequenceProvider(basicMockClient, providerFor) - expect(await provider.waitForTransaction(t1, undefined, 250, { chainId: 31337 }).then(r => r?.hash)).to.equal(t1) - await expect(provider.waitForTransaction(t1, undefined, 250, { chainId: 31338 })).to.be.rejected - }) - - it('forward waitForTransaction - static network provider', async () => { - const provider = new SequenceProvider(basicMockClient, providerFor) - expect( - await provider - .getProvider('hardhat') - .waitForTransaction(t1, undefined, 250) - .then(r => r?.hash) - ).to.equal(t1) - await expect(provider.getProvider('hardhat2').waitForTransaction(t1, undefined, 250)).to.be.rejected - }) - - it('fail to forward waitForTransaction - static network provider for different chain', async () => { - const provider = new SequenceProvider(basicMockClient, providerFor) - await expect( - provider.getProvider('hardhat2').waitForTransaction(t1, undefined, 250, { chainId: 31337 }) - ).to.be.rejectedWith('This provider only supports the network 31338, but 31337 was requested.') - }) - }) - - // NOTICE: These tests may be a bit fragile, as they rely - // on using the sequence mainnet provider - describe('forward ENS methods', () => { - let provider: SequenceProvider - let mainnetProvider: ethers.JsonRpcProvider - - let vitalikAddr: string | null - - before(async () => { - mainnetProvider = new ethers.JsonRpcProvider('https://nodes.sequence.app/mainnet') - vitalikAddr = await mainnetProvider.resolveName('vitalik.eth') - }) - - beforeEach(() => { - provider = new SequenceProvider( - { - ...basicMockClient, - getNetworks: async () => allNetworks - } as unknown as SequenceClient, - (chainId: number) => { - if (chainId === 1) { - return mainnetProvider - } - - return providerFor(chainId) - } - ) - }) - - it('resolve normal address', async () => { - const addr = ethers.Wallet.createRandom().address - expect(await provider.resolveName(addr)).to.equal(addr) - }) - - it('forward resolveName on primary provider', async () => { - expect(await provider.resolveName('vitalik.eth')).to.equal(vitalikAddr) - }) - - it('forward resolveName on single network (mainnet) provider', async () => { - expect(await provider.getProvider('mainnet').resolveName('vitalik.eth')).to.equal(vitalikAddr) - }) - - it('fail to forward resolveName on single network (hardhat) provider', async () => { - await expect(provider.getProvider('hardhat').resolveName('vitalik.eth')).to.be.rejectedWith( - 'This provider only supports the network 31337, but 1 was requested.' - ) - }) - }) - }) - - describe('perform implementation', () => { - describe('perform eth_chainId', async () => { - it('should return initial default chainId', async () => { - const provider = new SequenceProvider(basicMockClient, providerFor) - expect(await provider.perform('eth_chainId', [])).to.equal(ethers.toQuantity(31337)) - }) - - it('should return new default chainId', async () => { - const provider = new SequenceProvider(basicMockClient, providerFor) - provider.setDefaultChainId(31338) - expect(await provider.perform('eth_chainId', [])).to.equal(ethers.toQuantity(31338)) - }) - - it('should return static chainId', async () => { - const provider = new SequenceProvider(basicMockClient, providerFor) - expect(await provider.getProvider(31337).perform('eth_chainId', [])).to.equal(ethers.toQuantity(31337)) - expect(await provider.getProvider(31338).perform('eth_chainId', [])).to.equal(ethers.toQuantity(31338)) - }) - - it('should return chainId using request', async () => { - const provider = new SequenceProvider(basicMockClient, providerFor) - expect(await provider.request({ method: 'eth_chainId' })).to.equal(ethers.toQuantity(31337)) - }) - }) - - describe('perform eth_accounts', async () => { - let provider: SequenceProvider - let address: string - - beforeEach(async () => { - address = ethers.Wallet.createRandom().address - provider = new SequenceProvider( - { - ...basicMockClient, - getAddress: () => address - } as unknown as SequenceClient, - providerFor - ) - }) - - it('should return accounts on main provider', async () => { - expect(await provider.perform('eth_accounts', [])).to.deep.equal([address]) - }) - - it('should return accounts on single network provider', async () => { - expect(await provider.getProvider(31337).perform('eth_accounts', [])).to.deep.equal([address]) - expect(await provider.getProvider(31338).perform('eth_accounts', [])).to.deep.equal([address]) - }) - - it('should return accounts using request', async () => { - expect(await provider.request({ method: 'eth_accounts' })).to.deep.equal([address]) - }) - }) - - describe('perform wallet_switchEthereumChain', async () => { - it('should switch default chainId using request', async () => { - const provider = new SequenceProvider(basicMockClient, providerFor) - expect(await provider.request({ method: 'eth_chainId' })).to.equal(ethers.toQuantity(31337)) - - await provider.request({ method: 'wallet_switchEthereumChain', params: [{ chainId: '0x7a6a' }] }) - expect(defaultChainId).to.equal(31338) - }) - - it('should switch default chainId using object', async () => { - const provider = new SequenceProvider(basicMockClient, providerFor) - expect(await provider.perform('eth_chainId', [])).to.equal(ethers.toQuantity(31337)) - - await provider.perform('wallet_switchEthereumChain', [{ chainId: '0x7a6a' }]) - expect(defaultChainId).to.equal(31338) - expect(await provider.perform('eth_chainId', [])).to.equal(ethers.toQuantity(31338)) - }) - - it('should switch default chainId using hex string', async () => { - const provider = new SequenceProvider(basicMockClient, providerFor) - expect(await provider.perform('eth_chainId', [])).to.equal(ethers.toQuantity(31337)) - - await provider.perform('wallet_switchEthereumChain', ['0x7a6a']) - expect(defaultChainId).to.equal(31338) - expect(await provider.perform('eth_chainId', [])).to.equal(ethers.toQuantity(31338)) - }) - - it('should switch default chainId using number', async () => { - const provider = new SequenceProvider(basicMockClient, providerFor) - expect(await provider.perform('eth_chainId', [])).to.equal(ethers.toQuantity(31337)) - - await provider.perform('wallet_switchEthereumChain', [31338]) - expect(defaultChainId).to.equal(31338) - expect(await provider.perform('eth_chainId', [])).to.equal(ethers.toQuantity(31338)) - }) - - it('should switch default chainId using string', async () => { - const provider = new SequenceProvider(basicMockClient, providerFor) - expect(await provider.perform('eth_chainId', [])).to.equal(ethers.toQuantity(31337)) - - await provider.perform('wallet_switchEthereumChain', ['31338']) - expect(defaultChainId).to.equal(31338) - expect(await provider.perform('eth_chainId', [])).to.equal(ethers.toQuantity(31338)) - }) - - it('should fail to switch default chainId on static network provider', async () => { - const provider = new SequenceProvider(basicMockClient, providerFor) - await expect(provider.getProvider(31337).perform('wallet_switchEthereumChain', ['31337'])).to.be.rejectedWith( - 'This provider only supports the network 31337; use the parent provider to switch networks.' - ) - }) - - describe('using the setDefaultChainId method', async () => { - it('should switch default chainId using name', async () => { - const provider = new SequenceProvider(basicMockClient, providerFor) - expect(await provider.perform('eth_chainId', [])).to.equal(ethers.toQuantity(31337)) - - provider.setDefaultChainId('hardhat2') - expect(defaultChainId).to.equal(31338) - expect(await provider.perform('eth_chainId', [])).to.equal(ethers.toQuantity(31338)) - }) - - it('should switch default chainId using number', async () => { - const provider = new SequenceProvider(basicMockClient, providerFor) - expect(await provider.perform('eth_chainId', [])).to.equal(ethers.toQuantity(31337)) - - provider.setDefaultChainId(31338) - expect(defaultChainId).to.equal(31338) - expect(await provider.perform('eth_chainId', [])).to.equal(ethers.toQuantity(31338)) - }) - - it('should switch default chainId using string', async () => { - const provider = new SequenceProvider(basicMockClient, providerFor) - expect(await provider.perform('eth_chainId', [])).to.equal(ethers.toQuantity(31337)) - - provider.setDefaultChainId('31338') - expect(defaultChainId).to.equal(31338) - expect(await provider.perform('eth_chainId', [])).to.equal(ethers.toQuantity(31338)) - }) - - it('should switch default chainId using hex string', async () => { - const provider = new SequenceProvider(basicMockClient, providerFor) - expect(await provider.perform('eth_chainId', [])).to.equal(ethers.toQuantity(31337)) - - provider.setDefaultChainId('0x7a6a') - expect(defaultChainId).to.equal(31338) - expect(await provider.perform('eth_chainId', [])).to.equal(ethers.toQuantity(31338)) - }) - - it('should fail to switch default chainId on static network provider', async () => { - const provider = new SequenceProvider(basicMockClient, providerFor) - expect(() => provider.getProvider(31337).setDefaultChainId(31338)).to.throw( - 'This provider only supports the network 31337; use the parent provider to switch networks.' - ) - }) - - it('should fail to switch default chainId (to same chainId) on static network provider', async () => { - const provider = new SequenceProvider(basicMockClient, providerFor) - expect(() => provider.getProvider(31337).setDefaultChainId(31337)).to.throw( - 'This provider only supports the network 31337; use the parent provider to switch networks.' - ) - }) - }) - }) - - describe('sequence client methods', () => { - describe('perform eth_sendTransaction', async () => { - const expectedResult = ethers.hexlify(ethers.randomBytes(32)) - - let provider: SequenceProvider - let calledCount: number - - let expectedChainId: number - let expectedTx: ethers.TransactionRequest - - beforeEach(async () => { - calledCount = 0 - provider = new SequenceProvider( - { - ...basicMockClient, - request(request: JsonRpcRequest): Promise { - expect(request.chainId).to.equal(expectedChainId) - expect(request.method).to.equal('eth_sendTransaction') - expect(request.params).to.deep.equal([expectedTx]) - calledCount++ - return Promise.resolve(expectedResult) - } - } as unknown as SequenceClient, - providerFor - ) - - expectedTx = { - to: ethers.Wallet.createRandom().address, - value: '9000', - data: ethers.hexlify(ethers.randomBytes(66)) - } - }) - - it('should call sendTransaction on main provider', async () => { - expectedChainId = 31337 - const res = await provider.perform('eth_sendTransaction', [expectedTx]) - expect(calledCount).to.equal(1) - expect(res).to.equal(expectedResult) - }) - - it('should call sendTransaction after switching default chainId', async () => { - expectedChainId = 31338 - provider.setDefaultChainId(31338) - const res = await provider.perform('eth_sendTransaction', [expectedTx]) - expect(calledCount).to.equal(1) - expect(res).to.equal(expectedResult) - }) - - it('should call sendTransaction on single network provider', async () => { - expectedChainId = 31338 - const res = await provider.getProvider(31338).perform('eth_sendTransaction', [expectedTx]) - expect(calledCount).to.equal(1) - expect(res).to.equal(expectedResult) - }) - - it('should call sendTransaction with aux data', async () => { - expectedTx = { - ...expectedTx, - auxiliary: [{ to: ethers.Wallet.createRandom().address }] - } as ExtendedTransactionRequest - expectedChainId = 31338 - const res = await provider.getProvider(31338).perform('eth_sendTransaction', [expectedTx]) - expect(calledCount).to.equal(1) - expect(res).to.equal(expectedResult) - }) - - it('should call sendTransaction using request', async () => { - expectedChainId = 31337 - const res = await provider.request({ method: 'eth_sendTransaction', params: [expectedTx] }) - expect(calledCount).to.equal(1) - expect(res).to.equal(expectedResult) - }) - }) - ;['eth_sign', 'personal_sign', 'sequence_sign'].forEach(method => { - describe(`perform ${method}`, async () => { - const expectedResult = ethers.hexlify(ethers.randomBytes(120)) - - let provider: SequenceProvider - let calledCount: number - - let expectedChainId: number - let expectedAddress: string - let expectedMessage: string - - beforeEach(async () => { - calledCount = 0 - provider = new SequenceProvider( - { - ...basicMockClient, - request(request: JsonRpcRequest): Promise { - expect(request.chainId).to.equal(expectedChainId) - expect(request.method).to.equal(method) - expect(request.params).to.deep.equal([expectedAddress, expectedMessage]) - calledCount++ - return Promise.resolve(expectedResult) - } - } as unknown as SequenceClient, - providerFor - ) - - expectedAddress = ethers.Wallet.createRandom().address - expectedMessage = ethers.hexlify(ethers.randomBytes(66)) - }) - - it('should call sign on main provider', async () => { - expectedChainId = 31337 - const res = await provider.perform(method, [expectedAddress, expectedMessage]) - expect(calledCount).to.equal(1) - expect(res).to.equal(expectedResult) - }) - - it('should call sign after switching default chainId', async () => { - expectedChainId = 31338 - provider.setDefaultChainId(31338) - const res = await provider.perform(method, [expectedAddress, expectedMessage]) - expect(calledCount).to.equal(1) - expect(res).to.equal(expectedResult) - }) - - it('should call sign on single network provider', async () => { - expectedChainId = 31338 - const res = await provider.getProvider(31338).perform(method, [expectedAddress, expectedMessage]) - expect(calledCount).to.equal(1) - expect(res).to.equal(expectedResult) - }) - - it('should call sign using request', async () => { - expectedChainId = 31337 - const res = await provider.request({ method, params: [expectedAddress, expectedMessage] }) - expect(calledCount).to.equal(1) - expect(res).to.equal(expectedResult) - }) - }) - }) - ;['eth_signTypedData', 'eth_signTypedData_v4', 'sequence_signTypedData_v4'].forEach(method => { - describe(`perform ${method}`, async () => { - const expectedResult = ethers.hexlify(ethers.randomBytes(121)) - - let provider: SequenceProvider - let calledCount: number - - let expectedChainId: number - let expectedAddress: string - let expectedMessage: Array - - beforeEach(async () => { - calledCount = 0 - provider = new SequenceProvider( - { - ...basicMockClient, - request(request: JsonRpcRequest): Promise { - expect(request.chainId).to.equal(expectedChainId) - expect(request.method).to.equal(method) - expect(request.params).to.deep.equal([expectedAddress, expectedMessage]) - calledCount++ - return Promise.resolve(expectedResult) - } - } as unknown as SequenceClient, - providerFor - ) - - expectedAddress = ethers.Wallet.createRandom().address - expectedMessage = [{ thisisjustdata: ethers.hexlify(ethers.randomBytes(66)), sure: 'yes' }] - }) - - it('should call sign on main provider', async () => { - expectedChainId = 31337 - const res = await provider.perform(method, [expectedAddress, expectedMessage]) - expect(calledCount).to.equal(1) - expect(res).to.equal(expectedResult) - }) - - it('should call sign after switching default chainId', async () => { - expectedChainId = 31338 - provider.setDefaultChainId(31338) - const res = await provider.perform(method, [expectedAddress, expectedMessage]) - expect(calledCount).to.equal(1) - expect(res).to.equal(expectedResult) - }) - - it('should call sign on single network provider', async () => { - expectedChainId = 31338 - const res = await provider.getProvider(31338).perform(method, [expectedAddress, expectedMessage]) - expect(calledCount).to.equal(1) - expect(res).to.equal(expectedResult) - }) - - it('should call sign using request', async () => { - expectedChainId = 31337 - const res = await provider.request({ method, params: [expectedAddress, expectedMessage] }) - expect(calledCount).to.equal(1) - expect(res).to.equal(expectedResult) - }) - }) - }) - }) - - describe('misc public rpc methods', () => { - let provider: SequenceProvider - let b1: number - let b2: number - - beforeEach(async () => { - provider = new SequenceProvider(basicMockClient, providerFor) - b1 = await hardhat1Provider.getBlockNumber() - b2 = await hardhat2Provider.getBlockNumber() - }) - - it('should forward random method to main provider', async () => { - await provider.perform('evm_mine', []) - expect(await hardhat1Provider.getBlockNumber()).to.equal(b1 + 1) - expect(await hardhat2Provider.getBlockNumber()).to.equal(b2) - }) - - it('should forward random method after switching default chain', async () => { - provider.setDefaultChainId(31338) - await provider.perform('evm_mine', []) - expect(await hardhat1Provider.getBlockNumber()).to.equal(b1) - expect(await hardhat2Provider.getBlockNumber()).to.equal(b2 + 1) - }) - - it('should forward random method to single network provider', async () => { - await provider.getProvider(31338).perform('evm_mine', []) - expect(await hardhat1Provider.getBlockNumber()).to.equal(b1) - expect(await hardhat2Provider.getBlockNumber()).to.equal(b2 + 1) - }) - - it('should forward method with parameters', async () => { - await provider.perform('evm_mine', []) - await provider.perform('evm_mine', []) - const block1 = await hardhat1Provider.getBlock(2).then(t => t?.hash) - expect(await provider.perform('eth_getBlockByNumber', ['0x2', false]).then(t => t.hash)).to.equal(block1) - }) - - it('should forward method using request', async () => { - await provider.request({ method: 'evm_mine', params: [] }) - await provider.request({ method: 'evm_mine', params: [] }) - const block1 = await hardhat1Provider.getBlock(2).then(t => t?.hash) - expect(await provider.request({ method: 'eth_getBlockByNumber', params: ['0x2', false] }).then(t => t.hash)).to.equal( - block1 - ) - }) - }) - }) - }) - - it('should return true to isSequenceProvider', () => { - const provider = new SequenceProvider(basicMockClient, providerFor) - expect(SequenceProvider.is(provider)).to.equal(true) - }) - - describe('network switching', () => { - it('should emit chainChanged when default chain is changed', async () => { - const provider = new SequenceProvider(basicMockClient, providerFor) - - let emittedCount = 0 - provider.on('chainChanged', chainId => { - expect(chainId).to.equal(31338) - emittedCount++ - }) - - provider.setDefaultChainId(31338) - - await new Promise(resolve => setTimeout(resolve, 100)) - expect(emittedCount).to.equal(1) - }) - - it('should detect network', async () => { - const provider = new SequenceProvider(basicMockClient, providerFor) - const initialNetwork = await provider.detectNetwork() - - expect(initialNetwork.chainId).to.equal(31337n, 'initial network') - - provider.setDefaultChainId(31338) - - await new Promise(resolve => setTimeout(resolve, 100)) - const newNetwork = await provider.detectNetwork() - expect(newNetwork.chainId).to.equal(31338n, '2nd network') - }) - - it('should update polling block number', async () => { - const provider = new SequenceProvider(basicMockClient, providerFor) - - const b1 = await hardhat1Provider.getBlockNumber() - const b2 = await hardhat2Provider.getBlockNumber() - - if (b1 === b2) { - await hardhat2Provider.send('evm_mine', []) - } - - expect(b1).to.not.equal(b2) - - await new Promise(resolve => setTimeout(resolve, 250)) - const initialBlockNumber = await provider.getBlockNumber() - - provider.setDefaultChainId(31338) - - await new Promise(resolve => setTimeout(resolve, 250)) - const newBlockNumber = await provider.getBlockNumber() - - expect(initialBlockNumber).to.not.equal(newBlockNumber) - }) - }) -}) diff --git a/old/packages/provider/tests/remove-eip191prefix.spec.ts b/old/packages/provider/tests/remove-eip191prefix.spec.ts deleted file mode 100644 index f0a839f93..000000000 --- a/old/packages/provider/tests/remove-eip191prefix.spec.ts +++ /dev/null @@ -1,34 +0,0 @@ -import chaiAsPromised from 'chai-as-promised' -import * as chai from 'chai' - -import { - trimEIP191Prefix_test1_prefixed, - trimEIP191Prefix_test1_raw, - trimEIP191Prefix_test2_prefixed, - trimEIP191Prefix_test2_raw, - trimEIP191Prefix_test3_prefixed, - trimEIP191Prefix_test3_raw, - trimEIP191Prefix_test4_prefixed, - trimEIP191Prefix_test4_raw, - trimEIP191Prefix_test5_prefixed, - trimEIP191Prefix_test5_raw -} from './messages' -import { trimEIP191Prefix } from '../src/utils' -import { ethers } from 'ethers' -const { expect } = chai.use(chaiAsPromised) - -describe('trimming eip191prefix', () => { - it('should trim prefix', () => { - expect(ethers.toUtf8String(trimEIP191Prefix(trimEIP191Prefix_test1_prefixed))).equal(trimEIP191Prefix_test1_raw) - }) - - it('should handle eip191 exempt messages (by returning early)', () => { - expect(ethers.toUtf8String(trimEIP191Prefix(trimEIP191Prefix_test2_prefixed))).equal(trimEIP191Prefix_test2_raw) - }) - - it('should trim prefix for case where max prefix char as number is bigger than the length of the message', () => { - expect(ethers.toUtf8String(trimEIP191Prefix(trimEIP191Prefix_test3_prefixed))).equal(trimEIP191Prefix_test3_raw) - expect(ethers.toUtf8String(trimEIP191Prefix(trimEIP191Prefix_test4_prefixed))).equal(trimEIP191Prefix_test4_raw) - expect(ethers.toUtf8String(trimEIP191Prefix(trimEIP191Prefix_test5_prefixed))).equal(trimEIP191Prefix_test5_raw) - }) -}) diff --git a/old/packages/provider/tests/signer.spec.ts b/old/packages/provider/tests/signer.spec.ts deleted file mode 100644 index bf0a86825..000000000 --- a/old/packages/provider/tests/signer.spec.ts +++ /dev/null @@ -1,1000 +0,0 @@ -import { ethers } from 'ethers' -import { - ConnectOptions, - OpenWalletIntent, - OptionalChainId, - OptionalChainIdLike, - OptionalEIP6492, - SequenceClient, - SequenceProvider, - SequenceSigner, - SingleNetworkSequenceProvider, - SingleNetworkSequenceSigner -} from '../src' -import { expect } from 'chai' -import { JsonRpcRequest, JsonRpcResponse, allNetworks } from '@0xsequence/network' -import { TypedData, parseEther } from '@0xsequence/utils' - -const hardhat1Provider = new ethers.JsonRpcProvider('http://127.0.0.1:9595') -const hardhat2Provider = new ethers.JsonRpcProvider('http://127.0.0.1:8595') - -const testAccounts = [ - new ethers.Wallet('0xcd0434442164a4a6ef9bb677da8dc326fddf412cad4df65e1a3f2555aee5e2b3').connect(hardhat1Provider), - new ethers.Wallet('0xcd0434442164a4a6ef9bb677da8dc326fddf412cad4df65e1a3f2555aee5e2b3').connect(hardhat2Provider) -] - -const providerFor = (chainId: number) => { - if (chainId === 31337) { - return hardhat1Provider - } - - if (chainId === 31338) { - return hardhat2Provider - } - - throw new Error(`No provider for chainId ${chainId}`) -} - -let defaultChainId: number - -let callback: (chainId: number) => void - -const onDefaultChainIdChanged = (cb: (chainId: number) => void) => { - callback = cb -} - -const setDefaultChainId = (chainId: number) => { - defaultChainId = chainId - callback(chainId) -} - -const basicMockClient = { - getChainId: () => defaultChainId, - onDefaultChainIdChanged, - setDefaultChainId, - // EIP-1193 - onConnect: () => {}, - onDisconnect: () => {}, - onAccountsChanged: () => {} -} as unknown as SequenceClient - -async function waitUntilNoFail(provider: ethers.Provider, timeout = 20000): Promise { - const start = Date.now() - while (Date.now() - start < timeout) { - try { - await provider.getBlockNumber() - return - } catch (e) { - await new Promise(resolve => setTimeout(resolve, 100)) - } - } - console.warn('waitUntilNoFail timed out') -} - -describe('SequenceSigner', () => { - before(async () => { - // Wait for both providers to be ready - await Promise.all([waitUntilNoFail(hardhat1Provider), waitUntilNoFail(hardhat2Provider)]) - }) - - beforeEach(() => { - defaultChainId = 31337 - }) - - describe('client proxy methods', () => { - describe('getWalletConfig', () => { - const returnWalletConfig = { - version: 1, - threshold: 5, - signers: [ - { - weight: 1, - addr: ethers.Wallet.createRandom().address - } - ] - } - - let expectedChainId: number - let signer: SequenceSigner - let callsToGetWalletConfig: number - - beforeEach(() => { - callsToGetWalletConfig = 0 - signer = new SequenceProvider( - { - ...basicMockClient, - getOnchainWalletConfig: async (args: { chainId: number }) => { - expect(args.chainId).to.equal(expectedChainId) - callsToGetWalletConfig++ - return returnWalletConfig - } - } as unknown as SequenceClient, - providerFor - ).getSigner() - }) - - it('should return the wallet config', async () => { - expectedChainId = 31337 - const walletConfig = await signer.getWalletConfig() - expect(walletConfig).to.deep.equal(returnWalletConfig) - expect(callsToGetWalletConfig).to.equal(1) - }) - - it('should return the wallet config for a different chainId', async () => { - expectedChainId = 31338 - signer.provider.setDefaultChainId(31338) - const walletConfig = await signer.getWalletConfig() - expect(walletConfig).to.deep.equal(returnWalletConfig) - expect(callsToGetWalletConfig).to.equal(1) - }) - - it('should return the wallet config on a specific network signer', async () => { - const signer1 = signer.getSigner(31337) - const signer2 = signer.getSigner(31338) - - expectedChainId = 31337 - const walletConfig1 = await signer1.getWalletConfig() - expect(walletConfig1).to.deep.equal(returnWalletConfig) - expect(callsToGetWalletConfig).to.equal(1) - - expectedChainId = 31338 - const walletConfig2 = await signer2.getWalletConfig() - expect(walletConfig2).to.deep.equal(returnWalletConfig) - expect(callsToGetWalletConfig).to.equal(2) - }) - }) - - it('getNetworks', async () => { - let callsToGetNetworks = 0 - const signer = new SequenceProvider( - { - ...basicMockClient, - getNetworks: async () => { - callsToGetNetworks++ - return allNetworks - } - } as unknown as SequenceClient, - providerFor - ).getSigner() - - expect(await signer.getNetworks()).to.deep.equal(allNetworks) - expect(callsToGetNetworks).to.equal(1) - - expect(await signer.getSigner(31337).getNetworks()).to.deep.equal(allNetworks) - expect(callsToGetNetworks).to.equal(2) - - expect(await signer.getSigner('hardhat2').getNetworks()).to.deep.equal(allNetworks) - expect(callsToGetNetworks).to.equal(3) - }) - - describe('getChainId', () => { - it('should return the default chainId', async () => { - const signer = new SequenceProvider(basicMockClient, providerFor).getSigner() - expect(await signer.getChainId()).to.equal(31337) - }) - - it('should return the chainId for a specific signer', async () => { - const signer = new SequenceProvider(basicMockClient, providerFor).getSigner() - expect(await signer.getSigner(31338).getChainId()).to.equal(31338) - }) - - it('should return the chainId for a specific signer by name', async () => { - const signer = new SequenceProvider(basicMockClient, providerFor).getSigner() - expect(await signer.getSigner('hardhat2').getChainId()).to.equal(31338) - }) - - it('should return the chainId after the default chainId changes', async () => { - const signer = new SequenceProvider(basicMockClient, providerFor).getSigner() - expect(await signer.getChainId()).to.equal(31337) - signer.provider.setDefaultChainId(31338) - expect(await signer.getChainId()).to.equal(31338) - }) - }) - - describe('getAddress', () => { - let callsToGetAddress: number - let signer: SequenceSigner - let address: string - - beforeEach(() => { - callsToGetAddress = 0 - address = ethers.Wallet.createRandom().address - signer = new SequenceProvider( - { - ...basicMockClient, - getAddress: () => { - callsToGetAddress++ - return address - } - } as unknown as SequenceClient, - providerFor - ).getSigner() - }) - - it('should return the address', async () => { - expect(await signer.getAddress()).to.equal(address) - expect(callsToGetAddress).to.equal(1) - }) - - it('should return the address for a specific signer', async () => { - expect(await signer.getSigner(31338).getAddress()).to.equal(address) - expect(callsToGetAddress).to.equal(1) - }) - - it('getAddress should not be memoized', async () => { - expect(await signer.getAddress()).to.equal(address) - expect(callsToGetAddress).to.equal(1) - expect(await signer.getAddress()).to.equal(address) - expect(callsToGetAddress).to.equal(2) - }) - }) - }) - - describe('provider proxy methods', () => { - describe('getBalance', () => { - let signer: SequenceSigner - let address: string - - beforeEach(async () => { - address = ethers.Wallet.createRandom().address - - signer = new SequenceProvider( - { - ...basicMockClient, - getAddress: () => address - } as unknown as SequenceClient, - providerFor - ).getSigner() - - // Send 10 wei in hardhat1 and 20 wei in hardhat2 - await testAccounts[0] - .sendTransaction({ - to: address, - value: 10 - }) - .then(tx => tx.wait()) - - await testAccounts[1] - .sendTransaction({ - to: address, - value: 20 - }) - .then(tx => tx.wait()) - }) - - it('should return the balance on default chain', async () => { - expect(await signer.getBalance()).to.equal(10n) - }) - - it('should return the balance on default chain after switching networks', async () => { - signer.provider.setDefaultChainId(31338) - expect(await signer.getBalance()).to.equal(20n) - }) - - it('should return the balance on specific chain', async () => { - expect(await signer.getBalance(undefined, { chainId: 31337 })).to.equal(10n) - expect(await signer.getBalance(undefined, { chainId: 31338 })).to.equal(20n) - }) - - it('should return the balance on specific chain using string network name', async () => { - expect(await signer.getBalance(undefined, { chainId: 'hardhat' })).to.equal(10n) - expect(await signer.getBalance(undefined, { chainId: 'hardhat2' })).to.equal(20n) - }) - - it('should return the balance on static network signer', async () => { - expect(await signer.getSigner(31337).getBalance()).to.equal(10n) - expect(await signer.getSigner(31338).getBalance()).to.equal(20n) - }) - - it('should return the balance on static network signer using string network name', async () => { - expect(await signer.getSigner('hardhat').getBalance()).to.equal(10n) - expect(await signer.getSigner('hardhat2').getBalance()).to.equal(20n) - }) - - it('should return balance on specific chain when passing chainId', async () => { - expect(await signer.getSigner('hardhat').getBalance(undefined, { chainId: 31337 })).to.equal(10n) - expect(await signer.getSigner('hardhat2').getBalance(undefined, { chainId: 31338 })).to.equal(20n) - }) - - it('should fail to return balance on specific chain when passing different chainId', async () => { - await expect(signer.getSigner('hardhat').getBalance(undefined, { chainId: 31338 })).to.be.rejectedWith( - 'This signer only supports the network 31337, but 31338 was requested.' - ) - }) - }) - - describe('estimate gas', () => { - let signer: SequenceSigner - - let eg1: bigint - let eg2: bigint - - let addr: string - - beforeEach(async () => { - // deploy a "contract" that when called returns 0x112233 - // (this uses a bit of gas that we can measure) - const res = await testAccounts[0] - .sendTransaction({ - data: '0x6b621122336000526003601df3600052600c6014f3' - }) - .then(r => r.wait()) - - if (!res?.contractAddress) { - throw new Error('Could not get transaction receipt') - } - - addr = res.contractAddress - - eg1 = await hardhat1Provider.estimateGas({ to: addr }) - eg2 = await hardhat2Provider.estimateGas({ to: addr }) - - expect(eg1).to.not.equal(eg2) - - signer = new SequenceProvider(basicMockClient, providerFor).getSigner() - }) - - it('forward estimateGas - default', async () => { - expect(await signer.estimateGas({ to: addr })).to.equal(eg1) - - signer.provider.setDefaultChainId(31338) - expect(await signer.estimateGas({ to: addr })).to.equal(eg2) - }) - - it('forward estimateGas - specific chain', async () => { - expect(await signer.estimateGas({ to: addr }, { chainId: 31337 })).to.equal(eg1) - expect(await signer.estimateGas({ to: addr }, { chainId: 31338 })).to.equal(eg2) - }) - - it('forward estimateGas - static network provider', async () => { - expect(await signer.getSigner('hardhat').estimateGas({ to: addr })).to.equal(eg1) - expect(await signer.getSigner('hardhat2').estimateGas({ to: addr })).to.equal(eg2) - }) - - it('fail to forward estimateGas - static network provider for different chain', async () => { - await expect(signer.getSigner('hardhat2').estimateGas({ to: addr }, { chainId: 31337 })).to.be.rejectedWith( - 'This signer only supports the network 31338, but 31337 was requested.' - ) - }) - }) - - describe('call', () => { - let signer: SequenceSigner - let addr: string - - beforeEach(async () => { - // deploy a "contract" that when called returns 0x112233 - const res = await testAccounts[0] - .sendTransaction({ - data: '0x6b621122336000526003601df3600052600c6014f3' - }) - .then(r => r.wait()) - - if (!res?.contractAddress) { - throw new Error('Could not get transaction receipt') - } - - addr = res.contractAddress - - expect(await hardhat1Provider.call({ to: addr })).to.equal('0x112233') - expect(await hardhat2Provider.call({ to: addr })).to.equal('0x') - signer = new SequenceProvider(basicMockClient, providerFor).getSigner() - }) - - it('forward call - default', async () => { - expect(await signer.call({ to: addr })).to.equal('0x112233') - - signer.provider.setDefaultChainId(31338) - expect(await signer.call({ to: addr })).to.equal('0x') - }) - - it('forward call - specific chain', async () => { - expect(await signer.call({ to: addr }, { chainId: 31337 })).to.equal('0x112233') - expect(await signer.call({ to: addr }, { chainId: 31338 })).to.equal('0x') - }) - - it('forward call - static network provider', async () => { - expect(await signer.getSigner(31337).call({ to: addr })).to.equal('0x112233') - expect(await signer.getSigner(31338).call({ to: addr })).to.equal('0x') - }) - - it('fail to forward call - static network provider for different chain', async () => { - await expect(signer.getSigner('hardhat2').call({ to: addr }, { chainId: 31337 })).to.be.rejectedWith( - 'This signer only supports the network 31338, but 31337 was requested.' - ) - }) - }) - - describe('getFeeData', () => { - let signer: SequenceSigner - - beforeEach(() => { - // NOTICE: We need to path the hardhat providers so they return different gas prices - signer = new SequenceProvider(basicMockClient, (chainId: number) => { - if (chainId === 31337) { - return { - ...hardhat1Provider, - getFeeData: async () => ({ gasPrice: 1n }) - } as unknown as ethers.JsonRpcProvider - } - - if (chainId === 31338) { - return { - ...hardhat2Provider, - getFeeData: async () => ({ gasPrice: 2n }) - } as unknown as ethers.JsonRpcProvider - } - - throw new Error(`No provider for chainId ${chainId}`) - }).getSigner() - }) - - it('forward getFeeData - default', async () => { - expect((await signer.getFeeData()).gasPrice).to.equal(1n) - - signer.provider.setDefaultChainId(31338) - expect((await signer.getFeeData()).gasPrice).to.equal(2n) - }) - - it('forward getFeeData - specific chain', async () => { - expect((await signer.getFeeData({ chainId: 31337 })).gasPrice).to.equal(1n) - expect((await signer.getFeeData({ chainId: 31338 })).gasPrice).to.equal(2n) - }) - - it('forward getFeeData - static network provider', async () => { - expect((await signer.getSigner('hardhat').getFeeData()).gasPrice).to.equal(1n) - expect((await signer.getSigner(31338).getFeeData()).gasPrice).to.equal(2n) - }) - - it('fail to forward getFeeData - static network provider for different chain', async () => { - await expect(signer.getSigner('hardhat').getFeeData({ chainId: 31338 })).to.be.rejectedWith( - 'This signer only supports the network 31337, but 31338 was requested.' - ) - }) - }) - - describe('ENS', () => { - let signer: SequenceSigner - let mainnetProvider: ethers.JsonRpcProvider - - let vitalikAddr: string | null - - before(async () => { - mainnetProvider = new ethers.JsonRpcProvider('https://nodes.sequence.app/mainnet') - vitalikAddr = await mainnetProvider.resolveName('vitalik.eth') - }) - - beforeEach(() => { - signer = new SequenceProvider( - { - ...basicMockClient, - getNetworks: async () => allNetworks - } as unknown as SequenceClient, - (chainId: number) => { - if (chainId === 1) { - return mainnetProvider - } - - return providerFor(chainId) - } - ).getSigner() - }) - - it('resolve normal address', async () => { - const addr = ethers.Wallet.createRandom().address - expect(await signer.resolveName(addr)).to.equal(addr) - }) - - it('forward resolveName on primary provider', async () => { - expect(await signer.resolveName('vitalik.eth')).to.equal(vitalikAddr) - }) - - it('forward resolveName on single network (mainnet) provider', async () => { - expect(await signer.getSigner('mainnet').resolveName('vitalik.eth')).to.equal(vitalikAddr) - }) - - it('fail to forward resolveName on single network (hardhat) provider', async () => { - await expect(signer.getSigner('hardhat').resolveName('vitalik.eth')).to.be.rejectedWith( - 'This provider only supports the network 31337, but 1 was requested.' - ) - }) - - it('shuld fail if the name is not resolved', async () => { - await expect(signer.resolveName('pleasedontregisterthisorelsethistestwillfail.eth')).to.be.rejectedWith( - 'ENS name not found: pleasedontregisterthisorelsethistestwillfail.eth' - ) - }) - }) - }) - - describe('connect', () => { - it('should connect to new sequence provider', () => { - const signer = new SequenceProvider(basicMockClient, providerFor).getSigner() - const newProvider = new SequenceProvider(basicMockClient, providerFor) - - expect(signer.provider).to.not.equal(newProvider) - const newSigner = signer.connect(newProvider) - - expect(signer).to.not.equal(newSigner) - expect(newSigner.provider).to.equal(newProvider) - }) - - it('should fail to connect to non-sequence provider', () => { - const signer = new SequenceProvider(basicMockClient, providerFor).getSigner() - expect(() => signer.connect(hardhat1Provider)).to.throw('SequenceSigner can only be connected to a SequenceProvider') - }) - }) - - describe('single networks signer', () => { - it('default chainId signer should return this', () => { - const signer = new SequenceProvider(basicMockClient, providerFor).getSigner() - expect(signer.getSigner()).to.equal(signer) - }) - - it('static network matching default chainId should not return this', () => { - const signer = new SequenceProvider(basicMockClient, providerFor).getSigner() - expect(signer.getSigner(31337)).to.not.equal(signer) - }) - - it('static network should be memoized', () => { - const signer = new SequenceProvider(basicMockClient, providerFor).getSigner() - expect(signer.getSigner(31337)).to.equal(signer.getSigner('hardhat')) - }) - - it('static network should math the one provided by the provider', () => { - const provider = new SequenceProvider(basicMockClient, providerFor) - const signer = provider.getSigner() - expect(signer.getSigner(31337).provider).to.equal(provider.getSigner(31337).provider) - }) - - it('static network provider should return static network signer', () => { - const provider = new SequenceProvider(basicMockClient, providerFor) - const staticProvider = provider.getProvider(31337) - const signer = staticProvider.getSigner() - expect(SingleNetworkSequenceSigner.is(signer)).to.be.true - }) - - it('static network provider should return static network signer when asking for the same chainId', () => { - const provider = new SequenceProvider(basicMockClient, providerFor) - const staticProvider = provider.getProvider(31337) - const signer = staticProvider.getSigner(31337) - expect(SingleNetworkSequenceSigner.is(signer)).to.be.true - expect(signer).to.equal(staticProvider.getSigner()) - }) - - it('static network provider should fail to return signer for different chainId', () => { - const provider = new SequenceProvider(basicMockClient, providerFor) - const staticProvider = provider.getProvider(31337) - expect(() => staticProvider.getSigner(31338)).to.throw( - 'This provider only supports the network 31337, but 31338 was requested.' - ) - }) - - it('static network signer should return static chainId', async () => { - const signer = new SequenceProvider(basicMockClient, providerFor).getSigner(31337) - expect(await signer.getChainId()).to.equal(31337) - }) - - it('static network signer should return self when asking for the same chainId', () => { - const signer = new SequenceProvider(basicMockClient, providerFor).getSigner() - const snetwork = signer.getSigner(31337) - expect(snetwork.getSigner(31337)).to.equal(snetwork) - }) - - it('static network signer should return self when asked for a signer without chainId', () => { - const signer = new SequenceProvider(basicMockClient, providerFor).getSigner() - const snetwork = signer.getSigner(31337) - expect(snetwork.getSigner()).to.equal(snetwork) - }) - - it('static network signer should fail to return signer for a different chainId', () => { - const signer = new SequenceProvider(basicMockClient, providerFor).getSigner(31337) - expect(() => signer.getSigner(31338)).to.throw('This signer only supports the network 31337, but 31338 was requested.') - }) - - it('static network signer should return static network provider', () => { - const signer = new SequenceProvider(basicMockClient, providerFor).getSigner(31337) - const provider = signer.getProvider() - expect(SingleNetworkSequenceProvider.is(provider)).to.be.true - }) - - it('static network signer should return static network provider when asked for same chainId', () => { - const signer = new SequenceProvider(basicMockClient, providerFor).getSigner(31337) - const provider = signer.getProvider(31337) - expect(SingleNetworkSequenceProvider.is(provider)).to.be.true - expect(provider).to.equal(signer.getProvider()) - }) - - it('static network signer should fail to return provider for different chainId', () => { - const signer = new SequenceProvider(basicMockClient, providerFor).getSigner(31337) - expect(() => signer.getProvider(31338)).to.throw('This signer only supports the network 31337, but 31338 was requested.') - }) - - it('signer getProvider should return main provider', () => { - const signer = new SequenceProvider(basicMockClient, providerFor).getSigner(31337) - expect(signer.getProvider()).to.equal(signer.provider) - }) - }) - - describe('signMessage', () => { - let signer: SequenceSigner - - let callsToSignMessage: number - let expectedSignMessage: ethers.BytesLike - let expectedOptions: OptionalEIP6492 & OptionalChainId - let returnValue: string - - beforeEach(() => { - callsToSignMessage = 0 - expectedSignMessage = ethers.hexlify(ethers.randomBytes(64)) - expectedOptions = {} - returnValue = ethers.hexlify(ethers.randomBytes(99)) - - signer = new SequenceProvider( - { - ...basicMockClient, - signMessage: async (message: string, options: OptionalEIP6492 & OptionalChainId) => { - expect(message).to.equal(expectedSignMessage) - expect(options).to.deep.equal(expectedOptions) - callsToSignMessage++ - return returnValue - } - } as unknown as SequenceClient, - providerFor - ).getSigner() - }) - - it('should sign message on default chain', async () => { - expectedOptions = { chainId: 31337, eip6492: true } - expect(await signer.signMessage(expectedSignMessage)).to.equal(returnValue) - expect(callsToSignMessage).to.equal(1) - }) - - it('should sign message on default chain without using eip6492', async () => { - expectedOptions = { chainId: 31337, eip6492: false } - expect(await signer.signMessage(expectedSignMessage, { eip6492: false })).to.equal(returnValue) - expect(callsToSignMessage).to.equal(1) - }) - - it('should sign message on default chain after switching networks', async () => { - expectedOptions = { chainId: 31338, eip6492: true } - signer.provider.setDefaultChainId(31338) - expect(await signer.signMessage(expectedSignMessage)).to.equal(returnValue) - expect(callsToSignMessage).to.equal(1) - }) - - it('should sign message on default chain after switching networks without using eip6492', async () => { - expectedOptions = { chainId: 31338, eip6492: false } - signer.provider.setDefaultChainId(31338) - expect(await signer.signMessage(expectedSignMessage, { eip6492: false })).to.equal(returnValue) - expect(callsToSignMessage).to.equal(1) - }) - - it('should sign message on specific chain', async () => { - expectedOptions = { chainId: 31338, eip6492: true } - expect(await signer.signMessage(expectedSignMessage, { chainId: 31338 })).to.equal(returnValue) - expect(callsToSignMessage).to.equal(1) - }) - - it('should sign message on specific chain without using eip6492', async () => { - expectedOptions = { chainId: 31338, eip6492: false } - expect(await signer.signMessage(expectedSignMessage, { chainId: 31338, eip6492: false })).to.equal(returnValue) - expect(callsToSignMessage).to.equal(1) - }) - - it('should sign message on specific chain using string network name', async () => { - expectedOptions = { chainId: 31338, eip6492: true } - expect(await signer.signMessage(expectedSignMessage, { chainId: 'hardhat2' })).to.equal(returnValue) - expect(callsToSignMessage).to.equal(1) - }) - - it('should sign message on specific chain using string network name without using eip6492', async () => { - expectedOptions = { chainId: 31338, eip6492: false } - expect(await signer.signMessage(expectedSignMessage, { chainId: 'hardhat2', eip6492: false })).to.equal(returnValue) - expect(callsToSignMessage).to.equal(1) - }) - - it('should sign message on static network signer', async () => { - expectedOptions = { chainId: 31338, eip6492: true } - expect(await signer.getSigner(31338).signMessage(expectedSignMessage)).to.equal(returnValue) - expect(callsToSignMessage).to.equal(1) - }) - - it('should sign message on static network signer without using eip6492', async () => { - expectedOptions = { chainId: 31338, eip6492: false } - expect(await signer.getSigner(31338).signMessage(expectedSignMessage, { eip6492: false })).to.equal(returnValue) - expect(callsToSignMessage).to.equal(1) - }) - - it('should sign message on static network signer if passing chainId', async () => { - expectedOptions = { chainId: 31338, eip6492: true } - expect(await signer.getSigner(31338).signMessage(expectedSignMessage, { chainId: 31338 })).to.equal(returnValue) - expect(callsToSignMessage).to.equal(1) - }) - - it('should fail to sign message on static network signer if passing different chainId', async () => { - await expect(signer.getSigner(31338).signMessage(expectedSignMessage, { chainId: 31337 })).to.be.rejectedWith( - 'This signer only supports the network 31338, but 31337 was requested.' - ) - }) - - it('should pass array instead of string', async () => { - expectedSignMessage = ethers.randomBytes(199) - expectedOptions = { chainId: 31337, eip6492: true } - expect(await signer.signMessage(expectedSignMessage)).to.equal(returnValue) - }) - }) - - describe('signTypedData', () => { - let signer: SequenceSigner - - let callsToSignTypedData: number - let expectedDomain: ethers.TypedDataDomain - let expectedTypes: Record> - let expectedMessage: Record - let expectedOptions: OptionalEIP6492 & OptionalChainId - let returnValue: string - - beforeEach(() => { - callsToSignTypedData = 0 - expectedDomain = { - name: 'Sequence', - version: '1', - chainId: 31337, - verifyingContract: ethers.hexlify(ethers.randomBytes(12)) - } - expectedTypes = { - EIP712Domain: [ - { name: 'name', type: 'string' }, - { name: 'version', type: 'string' }, - { name: 'chainId', type: 'uint256' }, - { name: 'verifyingContract', type: 'address' } - ], - MetaTransaction: [ - { name: 'nonce', type: 'uint256' }, - { name: 'from', type: 'address' }, - { name: 'to', type: 'address' }, - { name: 'data', type: 'bytes' } - ] - } - expectedMessage = { - nonce: 1, - from: ethers.hexlify(ethers.randomBytes(12)), - to: ethers.hexlify(ethers.randomBytes(20)), - data: ethers.hexlify(ethers.randomBytes(32)) - } - expectedOptions = {} - returnValue = ethers.hexlify(ethers.randomBytes(99)) - - signer = new SequenceProvider( - { - ...basicMockClient, - signTypedData: async (typedData: TypedData, options: OptionalEIP6492 & OptionalChainId) => { - expect(typedData.domain).to.deep.equal(expectedDomain) - expect(typedData.types).to.deep.equal(expectedTypes) - expect(typedData.message).to.deep.equal(expectedMessage) - expect(options).to.deep.equal(expectedOptions) - callsToSignTypedData++ - return returnValue - } - } as unknown as SequenceClient, - providerFor - ).getSigner() - }) - - it('should sign typed data on default chain', async () => { - expectedOptions = { chainId: 31337, eip6492: true } - expect(await signer.signTypedData(expectedDomain, expectedTypes, expectedMessage)).to.equal(returnValue) - expect(callsToSignTypedData).to.equal(1) - }) - - it('should sign typed data on default chain without using eip6492', async () => { - expectedOptions = { chainId: 31337, eip6492: false } - expect(await signer.signTypedData(expectedDomain, expectedTypes, expectedMessage, { eip6492: false })).to.equal(returnValue) - expect(callsToSignTypedData).to.equal(1) - }) - - it('should sign typed data on default chain after switching networks', async () => { - expectedOptions = { chainId: 31338, eip6492: true } - signer.provider.setDefaultChainId(31338) - expect(await signer.signTypedData(expectedDomain, expectedTypes, expectedMessage)).to.equal(returnValue) - expect(callsToSignTypedData).to.equal(1) - }) - - it('should sign typed data on default chain after switching networks without using eip6492', async () => { - expectedOptions = { chainId: 31338, eip6492: false } - signer.provider.setDefaultChainId(31338) - expect(await signer.signTypedData(expectedDomain, expectedTypes, expectedMessage, { eip6492: false })).to.equal(returnValue) - expect(callsToSignTypedData).to.equal(1) - }) - - it('should sign typed data on specific chain', async () => { - expectedOptions = { chainId: 31338, eip6492: true } - expect(await signer.signTypedData(expectedDomain, expectedTypes, expectedMessage, { chainId: 31338 })).to.equal(returnValue) - expect(callsToSignTypedData).to.equal(1) - }) - - it('should sign typed data on specific chain without using eip6492', async () => { - expectedOptions = { chainId: 31338, eip6492: false } - expect( - await signer.signTypedData(expectedDomain, expectedTypes, expectedMessage, { chainId: 31338, eip6492: false }) - ).to.equal(returnValue) - expect(callsToSignTypedData).to.equal(1) - }) - - it('should sign typed data on specific chain using string network name', async () => { - expectedOptions = { chainId: 31338, eip6492: true } - expect( - await signer.signTypedData(expectedDomain, expectedTypes, expectedMessage, { - chainId: 'hardhat2' - }) - ).to.equal(returnValue) - expect(callsToSignTypedData).to.equal(1) - }) - - it('should sign typed data on specific chain using string network name without using eip6492', async () => { - expectedOptions = { chainId: 31338, eip6492: false } - expect( - await signer.signTypedData(expectedDomain, expectedTypes, expectedMessage, { - chainId: 'hardhat2', - eip6492: false - }) - ).to.equal(returnValue) - expect(callsToSignTypedData).to.equal(1) - }) - - it('should sign typed data on static network signer', async () => { - expectedOptions = { chainId: 31338, eip6492: true } - expect(await signer.getSigner(31338).signTypedData(expectedDomain, expectedTypes, expectedMessage)).to.equal(returnValue) - expect(callsToSignTypedData).to.equal(1) - }) - - it('should sign typed data on static network signer without using eip6492', async () => { - expectedOptions = { chainId: 31338, eip6492: false } - expect( - await signer.getSigner(31338).signTypedData(expectedDomain, expectedTypes, expectedMessage, { eip6492: false }) - ).to.equal(returnValue) - expect(callsToSignTypedData).to.equal(1) - }) - - it('should sign typed data on static network signer if passing chainId', async () => { - expectedOptions = { chainId: 31338, eip6492: true } - expect( - await signer.getSigner(31338).signTypedData(expectedDomain, expectedTypes, expectedMessage, { chainId: 31338 }) - ).to.equal(returnValue) - expect(callsToSignTypedData).to.equal(1) - }) - - it('should fail to sign typed data on static network signer if passing different chainId', async () => { - await expect( - signer.getSigner(31338).signTypedData(expectedDomain, expectedTypes, expectedMessage, { chainId: 31337 }) - ).to.be.rejectedWith('This signer only supports the network 31338, but 31337 was requested.') - }) - }) - - describe('sendTransaction', () => { - let callsToSendTransaction: number - let expectedTransactionRequest: ethers.TransactionRequest[] | ethers.TransactionRequest - - let expectedOptions: OptionalChainIdLike - - let signer: SequenceSigner - - beforeEach(() => { - callsToSendTransaction = 0 - - expectedTransactionRequest = { - to: ethers.hexlify(ethers.randomBytes(12)), - value: parseEther('1.0'), - data: ethers.hexlify(ethers.randomBytes(55)), - gasLimit: 40000 - } - - expectedOptions = {} - - signer = new SequenceProvider( - { - ...basicMockClient, - sendTransaction: async ( - transactionRequest: ethers.TransactionRequest[] | ethers.TransactionRequest, - options: OptionalChainIdLike - ) => { - expect(transactionRequest).to.deep.equal(expectedTransactionRequest) - expect(options).to.deep.equal(expectedOptions) - callsToSendTransaction++ - - // Send a random transaction on the expected chainId - // so we can return some "hash", otherwise the provider - // will throw an error - const subsig = testAccounts[(options?.chainId ?? 31337) === 31337 ? 0 : 1] - const tx = await subsig.sendTransaction({ - to: ethers.Wallet.createRandom().address - }) - - return tx.hash - } - } as unknown as SequenceClient, - providerFor - ).getSigner() - }) - - it('should send transaction on default chain', async () => { - expectedOptions = { chainId: 31337 } - const tx = await signer.sendTransaction(expectedTransactionRequest).then(tx => tx.wait()) - expect(ethers.getBytes(tx!.hash)).to.have.lengthOf(32) - expect(callsToSendTransaction).to.equal(1) - }) - - it('should send transaction on default chain after switching networks', async () => { - expectedOptions = { chainId: 31338 } - signer.provider.setDefaultChainId(31338) - const tx = await signer.sendTransaction(expectedTransactionRequest).then(tx => tx.wait()) - expect(ethers.getBytes(tx!.hash)).to.have.lengthOf(32) - expect(callsToSendTransaction).to.equal(1) - }) - - it('should send transaction on specific chain', async () => { - expectedOptions = { chainId: 31338 } - const tx = await signer.sendTransaction(expectedTransactionRequest, { chainId: 31338 }).then(tx => tx.wait()) - expect(ethers.getBytes(tx!.hash)).to.have.lengthOf(32) - expect(callsToSendTransaction).to.equal(1) - }) - - it('should send transaction on specific chain using string network name', async () => { - expectedOptions = { chainId: 31338 } - const tx = await signer.sendTransaction(expectedTransactionRequest, { chainId: 'hardhat2' }).then(tx => tx.wait()) - expect(ethers.getBytes(tx!.hash)).to.have.lengthOf(32) - expect(callsToSendTransaction).to.equal(1) - }) - - it('should send transaction on static network signer', async () => { - expectedOptions = { chainId: 31338 } - const tx = await signer - .getSigner(31338) - .sendTransaction(expectedTransactionRequest) - .then(tx => tx.wait()) - expect(ethers.getBytes(tx!.hash)).to.have.lengthOf(32) - expect(callsToSendTransaction).to.equal(1) - }) - - it('should send transaction on static network signer if passing chainId', async () => { - expectedOptions = { chainId: 31338 } - const tx = await signer - .getSigner(31338) - .sendTransaction(expectedTransactionRequest, { chainId: 'hardhat2' }) - .then(tx => tx.wait()) - expect(ethers.getBytes(tx!.hash)).to.have.lengthOf(32) - expect(callsToSendTransaction).to.equal(1) - }) - - it('should fail to send transaction on static network signer if passing different chainId', async () => { - await expect(signer.getSigner(31338).sendTransaction(expectedTransactionRequest, { chainId: 31337 })).to.be.rejectedWith( - 'This signer only supports the network 31338, but 31337 was requested.' - ) - }) - - it('should send batch transaction', async () => { - expectedOptions = { chainId: 31338 } - expectedTransactionRequest = [ - { - to: ethers.hexlify(ethers.randomBytes(12)), - value: parseEther('1.0'), - data: ethers.hexlify(ethers.randomBytes(55)) - }, - { - to: ethers.hexlify(ethers.randomBytes(12)), - data: ethers.hexlify(ethers.randomBytes(1)) - }, - { - to: ethers.hexlify(ethers.randomBytes(12)), - value: 2 - } - ] - - const tx = await signer.sendTransaction(expectedTransactionRequest, { chainId: 31338 }) - expect(tx.wait()).to.be.fulfilled - expect(ethers.getBytes(tx.hash)).to.have.lengthOf(32) - expect(callsToSendTransaction).to.equal(1) - }) - }) -}) diff --git a/old/packages/provider/tests/transactions.spec.ts b/old/packages/provider/tests/transactions.spec.ts deleted file mode 100644 index ad89d9f81..000000000 --- a/old/packages/provider/tests/transactions.spec.ts +++ /dev/null @@ -1,109 +0,0 @@ -import { commons } from '@0xsequence/core' -import { expect } from 'chai' -import { validateTransactionRequest } from '../src/transactions' - -const self = '0x5e1f5e1f5e1f5e1f5e1f5e1f5e1f5e1f5e1f5e1f' -const to = '0x0123456789012345678901234567890123456789' - -describe('validating transaction requests', () => { - it('should throw an error when a transaction does a self call', () => { - const transaction = { - to, - data: commons.transaction.encodeBundleExecData({ - entrypoint: to, - transactions: [ - { - to: self, - data: '0x12345678' - } - ] - }) - } - - expect(() => validateTransactionRequest(self, transaction)).to.throw() - }) - - it('should throw an error when a transaction does a deep self call', () => { - const transaction = { - to, - data: commons.transaction.encodeBundleExecData({ - entrypoint: to, - transactions: [ - { - to: self, - data: commons.transaction.encodeBundleExecData({ - entrypoint: self, - transactions: [ - { - to: self, - data: '0x12345678' - } - ] - }) - } - ] - }) - } - - expect(() => validateTransactionRequest(self, transaction)).to.throw() - }) - - it('should throw an error when a transaction does a delegate call', () => { - const transaction = { - to, - data: commons.transaction.encodeBundleExecData({ - entrypoint: to, - transactions: [ - { - to, - delegateCall: true - } - ] - }) - } - - expect(() => validateTransactionRequest(self, transaction)).to.throw() - }) - - it('should throw an error when a transaction does a deep delegate call', () => { - const transaction = { - to, - data: commons.transaction.encodeBundleExecData({ - entrypoint: to, - transactions: [ - { - to: self, - data: commons.transaction.encodeBundleExecData({ - entrypoint: self, - transactions: [ - { - to: self, - delegateCall: true - } - ] - }) - } - ] - }) - } - - expect(() => validateTransactionRequest(self, transaction)).to.throw() - }) - - it('should not throw an error in general', () => { - const transaction = { - to, - data: commons.transaction.encodeBundleExecData({ - entrypoint: to, - transactions: [ - { - to: self, // self without data is ok - value: '1000000000000000000' - } - ] - }) - } - - expect(() => validateTransactionRequest(self, transaction)).to.not.throw() - }) -}) diff --git a/old/packages/provider/tests/zeroxv3.spec.ts b/old/packages/provider/tests/zeroxv3.spec.ts deleted file mode 100644 index ee65442e2..000000000 --- a/old/packages/provider/tests/zeroxv3.spec.ts +++ /dev/null @@ -1,14 +0,0 @@ -import chaiAsPromised from 'chai-as-promised' -import * as chai from 'chai' - -import { isZeroExV3Order } from '../src/eip191exceptions' -import { message1, zeroExV3Order } from './messages' -const { expect } = chai.use(chaiAsPromised) - -describe('Utils / 0xv3', () => { - it('should detect 0x v3 order', () => { - expect(isZeroExV3Order(message1)).equals(false) - expect(isZeroExV3Order(zeroExV3Order.slice(0, -1))).equals(false) - expect(isZeroExV3Order(zeroExV3Order)).equals(true) - }) -}) diff --git a/old/packages/react-native/CHANGELOG.md b/old/packages/react-native/CHANGELOG.md deleted file mode 100644 index 438cccf29..000000000 --- a/old/packages/react-native/CHANGELOG.md +++ /dev/null @@ -1,759 +0,0 @@ -# @0xsequence/react-native - -## 2.3.8 - -### Patch Changes - -- indexer: update clients -- Updated dependencies - - @0xsequence/waas@2.3.8 - -## 2.3.7 - -### Patch Changes - -- Metadata updates -- Updated dependencies - - @0xsequence/waas@2.3.7 - -## 2.3.6 - -### Patch Changes - -- New chains -- Updated dependencies - - @0xsequence/waas@2.3.6 - -## 2.3.5 - -### Patch Changes - -- Add Frequency Testnet -- Updated dependencies - - @0xsequence/waas@2.3.5 - -## 2.3.4 - -### Patch Changes - -- metadata: exclude deprecated methods on rpc client -- Updated dependencies - - @0xsequence/waas@2.3.4 - -## 2.3.3 - -### Patch Changes - -- metadata: client update -- Updated dependencies - - @0xsequence/waas@2.3.3 - -## 2.3.2 - -### Patch Changes - -- metadata: update rpc client -- Updated dependencies - - @0xsequence/waas@2.3.2 - -## 2.3.1 - -### Patch Changes - -- indexer: update rpc client -- Updated dependencies - - @0xsequence/waas@2.3.1 - -## 2.3.0 - -### Minor Changes - -- update metadata rpc client - -### Patch Changes - -- Updated dependencies - - @0xsequence/waas@2.3.0 - -## 2.2.15 - -### Patch Changes - -- API updates -- Updated dependencies - - @0xsequence/waas@2.2.15 - -## 2.2.14 - -### Patch Changes - -- Somnia Testnet and Monad Testnet -- Updated dependencies - - @0xsequence/waas@2.2.14 - -## 2.2.13 - -### Patch Changes - -- Add XR1 to all networks -- Updated dependencies - - @0xsequence/waas@2.2.13 - -## 2.2.12 - -### Patch Changes - -- Add XR1 -- Updated dependencies - - @0xsequence/waas@2.2.12 - -## 2.2.11 - -### Patch Changes - -- Relayer updates -- Updated dependencies - - @0xsequence/waas@2.2.11 - -## 2.2.10 - -### Patch Changes - -- Etherlink support -- Updated dependencies - - @0xsequence/waas@2.2.10 - -## 2.2.9 - -### Patch Changes - -- Indexer gateway native token balances -- Updated dependencies - - @0xsequence/waas@2.2.9 - -## 2.2.8 - -### Patch Changes - -- Add Moonbeam and Moonbase Alpha -- Updated dependencies - - @0xsequence/waas@2.2.8 - -## 2.2.7 - -### Patch Changes - -- Update Builder package -- Updated dependencies - - @0xsequence/waas@2.2.7 - -## 2.2.6 - -### Patch Changes - -- Update relayer package -- Updated dependencies - - @0xsequence/waas@2.2.6 - -## 2.2.5 - -### Patch Changes - -- auth: fix sequence indexer gateway url -- account: immutable wallet proxy hook -- Updated dependencies -- Updated dependencies - - @0xsequence/waas@2.2.5 - -## 2.2.4 - -### Patch Changes - -- network: update soneium mainnet block explorer url -- waas: signTypedData intent support -- Updated dependencies -- Updated dependencies - - @0xsequence/waas@2.2.4 - -## 2.2.3 - -### Patch Changes - -- provider: updating initWallet to use connected network configs if they exist -- Updated dependencies - - @0xsequence/waas@2.2.3 - -## 2.2.2 - -### Patch Changes - -- pass projectAccessKey to relayer at all times -- Updated dependencies - - @0xsequence/waas@2.2.2 - -## 2.2.1 - -### Patch Changes - -- waas-ethers: sign typed data -- Updated dependencies - - @0xsequence/waas@2.2.1 - -## 2.2.0 - -### Minor Changes - -- indexer: gateway client -- @0xsequence/builder -- upgrade puppeteer to v23.10.3 - -### Patch Changes - -- Updated dependencies -- Updated dependencies -- Updated dependencies - - @0xsequence/waas@2.2.0 - -## 2.1.8 - -### Patch Changes - -- Add Soneium Mainnet -- Updated dependencies - - @0xsequence/waas@2.1.8 - -## 2.1.7 - -### Patch Changes - -- guard: pass project access key to guard requests -- Updated dependencies - - @0xsequence/waas@2.1.7 - -## 2.1.6 - -### Patch Changes - -- Add LAOS and Telos Testnet chains -- Updated dependencies - - @0xsequence/waas@2.1.6 - -## 2.1.5 - -### Patch Changes - -- account: save presigned configuration with reference chain id 1 -- Updated dependencies - - @0xsequence/waas@2.1.5 - -## 2.1.4 - -### Patch Changes - -- provider: pass projectAccessKey into MuxMessageProvider -- Updated dependencies - - @0xsequence/waas@2.1.4 - -## 2.1.3 - -### Patch Changes - -- waas: time drift date fix due to strange browser quirk -- Updated dependencies - - @0xsequence/waas@2.1.3 - -## 2.1.2 - -### Patch Changes - -- provider: export analytics correctly -- Updated dependencies - - @0xsequence/waas@2.1.2 - -## 2.1.1 - -### Patch Changes - -- Add LAOS chain support -- Updated dependencies - - @0xsequence/waas@2.1.1 - -## 2.1.0 - -### Minor Changes - -- account: forward project access key when estimating fees and sending transactions - -### Patch Changes - -- sessions: save signatures with reference chain id -- Updated dependencies -- Updated dependencies - - @0xsequence/waas@2.1.0 - -## 2.0.26 - -### Patch Changes - -- account: fix chain id comparison -- Updated dependencies - - @0xsequence/waas@2.0.26 - -## 2.0.25 - -### Patch Changes - -- skale-nebula: deploy gas limit = 10m -- Updated dependencies - - @0xsequence/waas@2.0.25 - -## 2.0.24 - -### Patch Changes - -- sessions: arweave: configurable gateway url -- waas: use /status to get time drift before sending any intents -- Updated dependencies -- Updated dependencies - - @0xsequence/waas@2.0.24 - -## 2.0.23 - -### Patch Changes - -- Add The Root Network support -- Updated dependencies - - @0xsequence/waas@2.0.23 - -## 2.0.22 - -### Patch Changes - -- Add SKALE Nebula Mainnet support -- Updated dependencies - - @0xsequence/waas@2.0.22 - -## 2.0.21 - -### Patch Changes - -- account: add publishWitnessFor -- Updated dependencies - - @0xsequence/waas@2.0.21 - -## 2.0.20 - -### Patch Changes - -- upgrade deps, and improve waas session status handling -- Updated dependencies - - @0xsequence/waas@2.0.20 - -## 2.0.19 - -### Patch Changes - -- Add Immutable zkEVM support -- Updated dependencies - - @0xsequence/waas@2.0.19 - -## 2.0.18 - -### Patch Changes - -- waas: new contractCall transaction type -- sessions: add arweave owner -- Updated dependencies -- Updated dependencies - - @0xsequence/waas@2.0.18 - -## 2.0.17 - -### Patch Changes - -- update waas auth to clear session before signIn -- Updated dependencies - - @0xsequence/waas@2.0.17 - -## 2.0.16 - -### Patch Changes - -- Removed Astar chains -- Updated dependencies - - @0xsequence/waas@2.0.16 - -## 2.0.15 - -### Patch Changes - -- indexer: update bindings with token balance additions -- Updated dependencies - - @0xsequence/waas@2.0.15 - -## 2.0.14 - -### Patch Changes - -- sessions: arweave config reader -- network: add b3 and apechain mainnet configs -- Updated dependencies -- Updated dependencies - - @0xsequence/waas@2.0.14 - -## 2.0.13 - -### Patch Changes - -- network: toy-testnet -- Updated dependencies - - @0xsequence/waas@2.0.13 - -## 2.0.12 - -### Patch Changes - -- api: update bindings -- Updated dependencies - - @0xsequence/waas@2.0.12 - -## 2.0.11 - -### Patch Changes - -- waas: intents test fix -- api: update bindings -- Updated dependencies -- Updated dependencies - - @0xsequence/waas@2.0.11 - -## 2.0.10 - -### Patch Changes - -- network: soneium minato testnet -- Updated dependencies - - @0xsequence/waas@2.0.10 - -## 2.0.9 - -### Patch Changes - -- network: fix SKALE network name -- Updated dependencies - - @0xsequence/waas@2.0.9 - -## 2.0.8 - -### Patch Changes - -- metadata: update bindings -- Updated dependencies - - @0xsequence/waas@2.0.8 - -## 2.0.7 - -### Patch Changes - -- wallet request handler fix -- Updated dependencies - - @0xsequence/waas@2.0.7 - -## 2.0.6 - -### Patch Changes - -- network: matic -> pol -- Updated dependencies - - @0xsequence/waas@2.0.6 - -## 2.0.5 - -### Patch Changes - -- provider: update databeat to 0.9.2 -- Updated dependencies - - @0xsequence/waas@2.0.5 - -## 2.0.4 - -### Patch Changes - -- network: add skale-nebula-testnet -- Updated dependencies - - @0xsequence/waas@2.0.4 - -## 2.0.3 - -### Patch Changes - -- waas: check session status in SequenceWaaS.isSignedIn() -- Updated dependencies - - @0xsequence/waas@2.0.3 - -## 2.0.2 - -### Patch Changes - -- sessions: property convert serialized bignumber hex value to bigint -- Updated dependencies - - @0xsequence/waas@2.0.2 - -## 2.0.1 - -### Patch Changes - -- waas: http signature check for authenticator requests -- provider: unwrap legacy json rpc responses -- use json replacer and reviver for bigints -- Updated dependencies -- Updated dependencies -- Updated dependencies - - @0xsequence/waas@2.0.1 - -## 2.0.0 - -### Major Changes - -- ethers v6 - -### Patch Changes - -- Updated dependencies - - @0xsequence/waas@2.0.0 - -## 1.10.15 - -### Patch Changes - -- utils: extractProjectIdFromAccessKey -- Updated dependencies - - @0xsequence/waas@1.10.15 - -## 1.10.14 - -### Patch Changes - -- network: add borne-testnet to allNetworks -- Updated dependencies - - @0xsequence/waas@1.10.14 - -## 1.10.13 - -### Patch Changes - -- network: add borne testnet -- Updated dependencies - - @0xsequence/waas@1.10.13 - -## 1.10.12 - -### Patch Changes - -- api: update bindings -- global/window -> globalThis -- Updated dependencies -- Updated dependencies - - @0xsequence/waas@1.10.12 - -## 1.10.11 - -### Patch Changes - -- waas: updated intent.gen without webrpc types, errors exported from authenticator.gen -- Updated dependencies - - @0xsequence/waas@1.10.11 - -## 1.10.10 - -### Patch Changes - -- metadata: update bindings with new contract collections api -- Updated dependencies - - @0xsequence/waas@1.10.10 - -## 1.10.9 - -### Patch Changes - -- waas minor update -- Updated dependencies - - @0xsequence/waas@1.10.9 - -## 1.10.8 - -### Patch Changes - -- update metadata bindings -- Updated dependencies - - @0xsequence/waas@1.10.8 - -## 1.10.7 - -### Patch Changes - -- minor fixes to waas client -- Updated dependencies - - @0xsequence/waas@1.10.7 - -## 1.10.6 - -### Patch Changes - -- metadata: update bindings -- Updated dependencies - - @0xsequence/waas@1.10.6 - -## 1.10.5 - -### Patch Changes - -- network: ape-chain-testnet -> apechain-testnet -- Updated dependencies - - @0xsequence/waas@1.10.5 - -## 1.10.4 - -### Patch Changes - -- network: add b3-sepolia, ape-chain-testnet, blast, blast-sepolia -- Updated dependencies - - @0xsequence/waas@1.10.4 - -## 1.10.3 - -### Patch Changes - -- typing fix -- Updated dependencies - - @0xsequence/waas@1.10.3 - -## 1.10.2 - -### Patch Changes - -- - waas: add getIdToken method - - indexer: update api client -- Updated dependencies - - @0xsequence/waas@1.10.2 - -## 1.10.1 - -### Patch Changes - -- metadata: update bindings -- Updated dependencies - - @0xsequence/waas@1.10.1 - -## 1.10.0 - -### Minor Changes - -- waas release v1.3.0 - -### Patch Changes - -- Updated dependencies - - @0xsequence/waas@1.10.0 - -## 1.9.37 - -### Patch Changes - -- network: adds nativeToken data to NetworkMetadata constants -- Updated dependencies - - @0xsequence/waas@1.9.37 - -## 1.9.36 - -### Patch Changes - -- guard: export client -- Updated dependencies - - @0xsequence/waas@1.9.36 - -## 1.9.35 - -### Patch Changes - -- guard: update bindings -- Updated dependencies - - @0xsequence/waas@1.9.35 - -## 1.9.34 - -### Patch Changes - -- waas: always use lowercase email -- Updated dependencies - - @0xsequence/waas@1.9.34 - -## 1.9.33 - -### Patch Changes - -- waas: umd build -- Updated dependencies - - @0xsequence/waas@1.9.33 - -## 1.9.32 - -### Patch Changes - -- indexer: update bindings -- Updated dependencies - - @0xsequence/waas@1.9.32 - -## 1.9.31 - -### Patch Changes - -- metadata: token directory changes -- Updated dependencies - - @0xsequence/waas@1.9.31 - -## 1.9.30 - -### Patch Changes - -- update -- Updated dependencies - - @0xsequence/waas@1.9.30 - -## 1.9.29 - -### Patch Changes - -- disable gnosis chain -- Updated dependencies - - @0xsequence/waas@1.9.29 - -## 1.9.28 - -### Patch Changes - -- add utils/merkletree -- Updated dependencies - - @0xsequence/waas@1.9.28 - -## 1.9.27 - -### Patch Changes - -- network: optimistic -> optimism -- waas: remove defaults -- api, sessions: update bindings -- Updated dependencies -- Updated dependencies -- Updated dependencies - - @0xsequence/waas@1.9.27 - -## 1.9.26 - -### Patch Changes - -- - add backend interfaces for pluggable interfaces - - introduce @0xsequence/react-native - - update pnpm to lockfile v9 -- Updated dependencies - - @0xsequence/waas@1.9.26 diff --git a/old/packages/react-native/package.json b/old/packages/react-native/package.json deleted file mode 100644 index 65eeeb809..000000000 --- a/old/packages/react-native/package.json +++ /dev/null @@ -1,25 +0,0 @@ -{ - "name": "@0xsequence/react-native", - "version": "2.3.8", - "description": "react-native compat-lib sub-package for Sequence", - "repository": "https://github.com/0xsequence/sequence.js/tree/master/packages/react-native", - "source": "src/index.ts", - "main": "dist/0xsequence-react-native.cjs.js", - "module": "dist/0xsequence-react-native.esm.js", - "author": "Horizon Blockchain Games", - "license": "Apache-2.0", - "scripts": { - "test": "echo", - "typecheck": "tsc --noEmit" - }, - "dependencies": { - "@0xsequence/waas": "workspace:*", - "react-native-keychain": "^8.2.0" - }, - "peerDependencies": {}, - "devDependencies": {}, - "files": [ - "src", - "dist" - ] -} diff --git a/old/packages/react-native/src/index.ts b/old/packages/react-native/src/index.ts deleted file mode 100644 index c05c347fe..000000000 --- a/old/packages/react-native/src/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './keychain-store' diff --git a/old/packages/react-native/src/keychain-store.ts b/old/packages/react-native/src/keychain-store.ts deleted file mode 100644 index 9a5a5bbfc..000000000 --- a/old/packages/react-native/src/keychain-store.ts +++ /dev/null @@ -1,30 +0,0 @@ -import { SecureStoreBackend } from '@0xsequence/waas' - -import { getGenericPassword, setGenericPassword, resetGenericPassword } from 'react-native-keychain' - -export class KeychainSecureStoreBackend implements SecureStoreBackend { - constructor() { - // no-op - } - - async get(dbName: string, dbStoreName: string, key: string): Promise { - const credentials = await getGenericPassword({ service: dbStoreName }) - if (credentials) { - return credentials.password - } else { - return null - } - } - - async set(dbName: string, dbStoreName: string, key: string, value: any): Promise { - if (typeof value !== 'string') { - throw new Error('Value must be a string') - } - await setGenericPassword(key, value, { service: dbStoreName }) - return true - } - - async delete(dbName: string, dbStoreName: string, key: string): Promise { - return resetGenericPassword({ service: dbStoreName }) - } -} diff --git a/old/packages/relayer/CHANGELOG.md b/old/packages/relayer/CHANGELOG.md deleted file mode 100644 index c35614659..000000000 --- a/old/packages/relayer/CHANGELOG.md +++ /dev/null @@ -1,3848 +0,0 @@ -# @0xsequence/relayer - -## 2.3.8 - -### Patch Changes - -- indexer: update clients -- Updated dependencies - - @0xsequence/abi@2.3.8 - - @0xsequence/core@2.3.8 - - @0xsequence/utils@2.3.8 - -## 2.3.7 - -### Patch Changes - -- Metadata updates -- Updated dependencies - - @0xsequence/abi@2.3.7 - - @0xsequence/core@2.3.7 - - @0xsequence/utils@2.3.7 - -## 2.3.6 - -### Patch Changes - -- New chains -- Updated dependencies - - @0xsequence/abi@2.3.6 - - @0xsequence/core@2.3.6 - - @0xsequence/utils@2.3.6 - -## 2.3.5 - -### Patch Changes - -- Add Frequency Testnet -- Updated dependencies - - @0xsequence/abi@2.3.5 - - @0xsequence/core@2.3.5 - - @0xsequence/utils@2.3.5 - -## 2.3.4 - -### Patch Changes - -- metadata: exclude deprecated methods on rpc client -- Updated dependencies - - @0xsequence/abi@2.3.4 - - @0xsequence/core@2.3.4 - - @0xsequence/utils@2.3.4 - -## 2.3.3 - -### Patch Changes - -- metadata: client update -- Updated dependencies - - @0xsequence/abi@2.3.3 - - @0xsequence/core@2.3.3 - - @0xsequence/utils@2.3.3 - -## 2.3.2 - -### Patch Changes - -- metadata: update rpc client -- Updated dependencies - - @0xsequence/abi@2.3.2 - - @0xsequence/core@2.3.2 - - @0xsequence/utils@2.3.2 - -## 2.3.1 - -### Patch Changes - -- indexer: update rpc client -- Updated dependencies - - @0xsequence/abi@2.3.1 - - @0xsequence/core@2.3.1 - - @0xsequence/utils@2.3.1 - -## 2.3.0 - -### Minor Changes - -- update metadata rpc client - -### Patch Changes - -- Updated dependencies - - @0xsequence/abi@2.3.0 - - @0xsequence/core@2.3.0 - - @0xsequence/utils@2.3.0 - -## 2.2.15 - -### Patch Changes - -- API updates -- Updated dependencies - - @0xsequence/abi@2.2.15 - - @0xsequence/core@2.2.15 - - @0xsequence/utils@2.2.15 - -## 2.2.14 - -### Patch Changes - -- Somnia Testnet and Monad Testnet -- Updated dependencies - - @0xsequence/abi@2.2.14 - - @0xsequence/core@2.2.14 - - @0xsequence/utils@2.2.14 - -## 2.2.13 - -### Patch Changes - -- Add XR1 to all networks -- Updated dependencies - - @0xsequence/abi@2.2.13 - - @0xsequence/core@2.2.13 - - @0xsequence/utils@2.2.13 - -## 2.2.12 - -### Patch Changes - -- Add XR1 -- Updated dependencies - - @0xsequence/abi@2.2.12 - - @0xsequence/core@2.2.12 - - @0xsequence/utils@2.2.12 - -## 2.2.11 - -### Patch Changes - -- Relayer updates -- Updated dependencies - - @0xsequence/abi@2.2.11 - - @0xsequence/core@2.2.11 - - @0xsequence/utils@2.2.11 - -## 2.2.10 - -### Patch Changes - -- Etherlink support -- Updated dependencies - - @0xsequence/abi@2.2.10 - - @0xsequence/core@2.2.10 - - @0xsequence/utils@2.2.10 - -## 2.2.9 - -### Patch Changes - -- Indexer gateway native token balances -- Updated dependencies - - @0xsequence/abi@2.2.9 - - @0xsequence/core@2.2.9 - - @0xsequence/utils@2.2.9 - -## 2.2.8 - -### Patch Changes - -- Add Moonbeam and Moonbase Alpha -- Updated dependencies - - @0xsequence/abi@2.2.8 - - @0xsequence/core@2.2.8 - - @0xsequence/utils@2.2.8 - -## 2.2.7 - -### Patch Changes - -- Update Builder package -- Updated dependencies - - @0xsequence/abi@2.2.7 - - @0xsequence/core@2.2.7 - - @0xsequence/utils@2.2.7 - -## 2.2.6 - -### Patch Changes - -- Update relayer package -- Updated dependencies - - @0xsequence/abi@2.2.6 - - @0xsequence/core@2.2.6 - - @0xsequence/utils@2.2.6 - -## 2.2.5 - -### Patch Changes - -- auth: fix sequence indexer gateway url -- account: immutable wallet proxy hook -- Updated dependencies -- Updated dependencies - - @0xsequence/abi@2.2.5 - - @0xsequence/core@2.2.5 - - @0xsequence/utils@2.2.5 - -## 2.2.4 - -### Patch Changes - -- network: update soneium mainnet block explorer url -- waas: signTypedData intent support -- Updated dependencies -- Updated dependencies - - @0xsequence/abi@2.2.4 - - @0xsequence/core@2.2.4 - - @0xsequence/utils@2.2.4 - -## 2.2.3 - -### Patch Changes - -- provider: updating initWallet to use connected network configs if they exist -- Updated dependencies - - @0xsequence/abi@2.2.3 - - @0xsequence/core@2.2.3 - - @0xsequence/utils@2.2.3 - -## 2.2.2 - -### Patch Changes - -- pass projectAccessKey to relayer at all times -- Updated dependencies - - @0xsequence/abi@2.2.2 - - @0xsequence/core@2.2.2 - - @0xsequence/utils@2.2.2 - -## 2.2.1 - -### Patch Changes - -- waas-ethers: sign typed data -- Updated dependencies - - @0xsequence/abi@2.2.1 - - @0xsequence/core@2.2.1 - - @0xsequence/utils@2.2.1 - -## 2.2.0 - -### Minor Changes - -- indexer: gateway client -- @0xsequence/builder -- upgrade puppeteer to v23.10.3 - -### Patch Changes - -- Updated dependencies -- Updated dependencies -- Updated dependencies - - @0xsequence/abi@2.2.0 - - @0xsequence/core@2.2.0 - - @0xsequence/utils@2.2.0 - -## 2.1.8 - -### Patch Changes - -- Add Soneium Mainnet -- Updated dependencies - - @0xsequence/abi@2.1.8 - - @0xsequence/core@2.1.8 - - @0xsequence/utils@2.1.8 - -## 2.1.7 - -### Patch Changes - -- guard: pass project access key to guard requests -- Updated dependencies - - @0xsequence/abi@2.1.7 - - @0xsequence/core@2.1.7 - - @0xsequence/utils@2.1.7 - -## 2.1.6 - -### Patch Changes - -- Add LAOS and Telos Testnet chains -- Updated dependencies - - @0xsequence/abi@2.1.6 - - @0xsequence/core@2.1.6 - - @0xsequence/utils@2.1.6 - -## 2.1.5 - -### Patch Changes - -- account: save presigned configuration with reference chain id 1 -- Updated dependencies - - @0xsequence/abi@2.1.5 - - @0xsequence/core@2.1.5 - - @0xsequence/utils@2.1.5 - -## 2.1.4 - -### Patch Changes - -- provider: pass projectAccessKey into MuxMessageProvider -- Updated dependencies - - @0xsequence/abi@2.1.4 - - @0xsequence/core@2.1.4 - - @0xsequence/utils@2.1.4 - -## 2.1.3 - -### Patch Changes - -- waas: time drift date fix due to strange browser quirk -- Updated dependencies - - @0xsequence/abi@2.1.3 - - @0xsequence/core@2.1.3 - - @0xsequence/utils@2.1.3 - -## 2.1.2 - -### Patch Changes - -- provider: export analytics correctly -- Updated dependencies - - @0xsequence/abi@2.1.2 - - @0xsequence/core@2.1.2 - - @0xsequence/utils@2.1.2 - -## 2.1.1 - -### Patch Changes - -- Add LAOS chain support -- Updated dependencies - - @0xsequence/abi@2.1.1 - - @0xsequence/core@2.1.1 - - @0xsequence/utils@2.1.1 - -## 2.1.0 - -### Minor Changes - -- account: forward project access key when estimating fees and sending transactions - -### Patch Changes - -- sessions: save signatures with reference chain id -- Updated dependencies -- Updated dependencies - - @0xsequence/abi@2.1.0 - - @0xsequence/core@2.1.0 - - @0xsequence/utils@2.1.0 - -## 2.0.26 - -### Patch Changes - -- account: fix chain id comparison -- Updated dependencies - - @0xsequence/abi@2.0.26 - - @0xsequence/core@2.0.26 - - @0xsequence/utils@2.0.26 - -## 2.0.25 - -### Patch Changes - -- skale-nebula: deploy gas limit = 10m -- Updated dependencies - - @0xsequence/abi@2.0.25 - - @0xsequence/core@2.0.25 - - @0xsequence/utils@2.0.25 - -## 2.0.24 - -### Patch Changes - -- sessions: arweave: configurable gateway url -- waas: use /status to get time drift before sending any intents -- Updated dependencies -- Updated dependencies - - @0xsequence/abi@2.0.24 - - @0xsequence/core@2.0.24 - - @0xsequence/utils@2.0.24 - -## 2.0.23 - -### Patch Changes - -- Add The Root Network support -- Updated dependencies - - @0xsequence/abi@2.0.23 - - @0xsequence/core@2.0.23 - - @0xsequence/utils@2.0.23 - -## 2.0.22 - -### Patch Changes - -- Add SKALE Nebula Mainnet support -- Updated dependencies - - @0xsequence/abi@2.0.22 - - @0xsequence/core@2.0.22 - - @0xsequence/utils@2.0.22 - -## 2.0.21 - -### Patch Changes - -- account: add publishWitnessFor -- Updated dependencies - - @0xsequence/abi@2.0.21 - - @0xsequence/core@2.0.21 - - @0xsequence/utils@2.0.21 - -## 2.0.20 - -### Patch Changes - -- upgrade deps, and improve waas session status handling -- Updated dependencies - - @0xsequence/abi@2.0.20 - - @0xsequence/core@2.0.20 - - @0xsequence/utils@2.0.20 - -## 2.0.19 - -### Patch Changes - -- Add Immutable zkEVM support -- Updated dependencies - - @0xsequence/abi@2.0.19 - - @0xsequence/core@2.0.19 - - @0xsequence/utils@2.0.19 - -## 2.0.18 - -### Patch Changes - -- waas: new contractCall transaction type -- sessions: add arweave owner -- Updated dependencies -- Updated dependencies - - @0xsequence/abi@2.0.18 - - @0xsequence/core@2.0.18 - - @0xsequence/utils@2.0.18 - -## 2.0.17 - -### Patch Changes - -- update waas auth to clear session before signIn -- Updated dependencies - - @0xsequence/abi@2.0.17 - - @0xsequence/core@2.0.17 - - @0xsequence/utils@2.0.17 - -## 2.0.16 - -### Patch Changes - -- Removed Astar chains -- Updated dependencies - - @0xsequence/abi@2.0.16 - - @0xsequence/core@2.0.16 - - @0xsequence/utils@2.0.16 - -## 2.0.15 - -### Patch Changes - -- indexer: update bindings with token balance additions -- Updated dependencies - - @0xsequence/abi@2.0.15 - - @0xsequence/core@2.0.15 - - @0xsequence/utils@2.0.15 - -## 2.0.14 - -### Patch Changes - -- sessions: arweave config reader -- network: add b3 and apechain mainnet configs -- Updated dependencies -- Updated dependencies - - @0xsequence/abi@2.0.14 - - @0xsequence/core@2.0.14 - - @0xsequence/utils@2.0.14 - -## 2.0.13 - -### Patch Changes - -- network: toy-testnet -- Updated dependencies - - @0xsequence/abi@2.0.13 - - @0xsequence/core@2.0.13 - - @0xsequence/utils@2.0.13 - -## 2.0.12 - -### Patch Changes - -- api: update bindings -- Updated dependencies - - @0xsequence/abi@2.0.12 - - @0xsequence/core@2.0.12 - - @0xsequence/utils@2.0.12 - -## 2.0.11 - -### Patch Changes - -- waas: intents test fix -- api: update bindings -- Updated dependencies -- Updated dependencies - - @0xsequence/abi@2.0.11 - - @0xsequence/core@2.0.11 - - @0xsequence/utils@2.0.11 - -## 2.0.10 - -### Patch Changes - -- network: soneium minato testnet -- Updated dependencies - - @0xsequence/abi@2.0.10 - - @0xsequence/core@2.0.10 - - @0xsequence/utils@2.0.10 - -## 2.0.9 - -### Patch Changes - -- network: fix SKALE network name -- Updated dependencies - - @0xsequence/abi@2.0.9 - - @0xsequence/core@2.0.9 - - @0xsequence/utils@2.0.9 - -## 2.0.8 - -### Patch Changes - -- metadata: update bindings -- Updated dependencies - - @0xsequence/abi@2.0.8 - - @0xsequence/core@2.0.8 - - @0xsequence/utils@2.0.8 - -## 2.0.7 - -### Patch Changes - -- wallet request handler fix -- Updated dependencies - - @0xsequence/abi@2.0.7 - - @0xsequence/core@2.0.7 - - @0xsequence/utils@2.0.7 - -## 2.0.6 - -### Patch Changes - -- network: matic -> pol -- Updated dependencies - - @0xsequence/abi@2.0.6 - - @0xsequence/core@2.0.6 - - @0xsequence/utils@2.0.6 - -## 2.0.5 - -### Patch Changes - -- provider: update databeat to 0.9.2 -- Updated dependencies - - @0xsequence/abi@2.0.5 - - @0xsequence/core@2.0.5 - - @0xsequence/utils@2.0.5 - -## 2.0.4 - -### Patch Changes - -- network: add skale-nebula-testnet -- Updated dependencies - - @0xsequence/abi@2.0.4 - - @0xsequence/core@2.0.4 - - @0xsequence/utils@2.0.4 - -## 2.0.3 - -### Patch Changes - -- waas: check session status in SequenceWaaS.isSignedIn() -- Updated dependencies - - @0xsequence/abi@2.0.3 - - @0xsequence/core@2.0.3 - - @0xsequence/utils@2.0.3 - -## 2.0.2 - -### Patch Changes - -- sessions: property convert serialized bignumber hex value to bigint -- Updated dependencies - - @0xsequence/abi@2.0.2 - - @0xsequence/core@2.0.2 - - @0xsequence/utils@2.0.2 - -## 2.0.1 - -### Patch Changes - -- waas: http signature check for authenticator requests -- provider: unwrap legacy json rpc responses -- use json replacer and reviver for bigints -- Updated dependencies -- Updated dependencies -- Updated dependencies - - @0xsequence/abi@2.0.1 - - @0xsequence/core@2.0.1 - - @0xsequence/utils@2.0.1 - -## 2.0.0 - -### Major Changes - -- ethers v6 - -### Patch Changes - -- Updated dependencies - - @0xsequence/abi@2.0.0 - - @0xsequence/core@2.0.0 - - @0xsequence/utils@2.0.0 - -## 1.10.15 - -### Patch Changes - -- utils: extractProjectIdFromAccessKey -- Updated dependencies - - @0xsequence/abi@1.10.15 - - @0xsequence/core@1.10.15 - - @0xsequence/utils@1.10.15 - -## 1.10.14 - -### Patch Changes - -- network: add borne-testnet to allNetworks -- Updated dependencies - - @0xsequence/abi@1.10.14 - - @0xsequence/core@1.10.14 - - @0xsequence/utils@1.10.14 - -## 1.10.13 - -### Patch Changes - -- network: add borne testnet -- Updated dependencies - - @0xsequence/abi@1.10.13 - - @0xsequence/core@1.10.13 - - @0xsequence/utils@1.10.13 - -## 1.10.12 - -### Patch Changes - -- api: update bindings -- global/window -> globalThis -- Updated dependencies -- Updated dependencies - - @0xsequence/abi@1.10.12 - - @0xsequence/core@1.10.12 - - @0xsequence/utils@1.10.12 - -## 1.10.11 - -### Patch Changes - -- waas: updated intent.gen without webrpc types, errors exported from authenticator.gen -- Updated dependencies - - @0xsequence/abi@1.10.11 - - @0xsequence/core@1.10.11 - - @0xsequence/utils@1.10.11 - -## 1.10.10 - -### Patch Changes - -- metadata: update bindings with new contract collections api -- Updated dependencies - - @0xsequence/abi@1.10.10 - - @0xsequence/core@1.10.10 - - @0xsequence/utils@1.10.10 - -## 1.10.9 - -### Patch Changes - -- waas minor update -- Updated dependencies - - @0xsequence/abi@1.10.9 - - @0xsequence/core@1.10.9 - - @0xsequence/utils@1.10.9 - -## 1.10.8 - -### Patch Changes - -- update metadata bindings -- Updated dependencies - - @0xsequence/abi@1.10.8 - - @0xsequence/core@1.10.8 - - @0xsequence/utils@1.10.8 - -## 1.10.7 - -### Patch Changes - -- minor fixes to waas client -- Updated dependencies - - @0xsequence/abi@1.10.7 - - @0xsequence/core@1.10.7 - - @0xsequence/utils@1.10.7 - -## 1.10.6 - -### Patch Changes - -- metadata: update bindings -- Updated dependencies - - @0xsequence/abi@1.10.6 - - @0xsequence/core@1.10.6 - - @0xsequence/utils@1.10.6 - -## 1.10.5 - -### Patch Changes - -- network: ape-chain-testnet -> apechain-testnet -- Updated dependencies - - @0xsequence/abi@1.10.5 - - @0xsequence/core@1.10.5 - - @0xsequence/utils@1.10.5 - -## 1.10.4 - -### Patch Changes - -- network: add b3-sepolia, ape-chain-testnet, blast, blast-sepolia -- Updated dependencies - - @0xsequence/abi@1.10.4 - - @0xsequence/core@1.10.4 - - @0xsequence/utils@1.10.4 - -## 1.10.3 - -### Patch Changes - -- typing fix -- Updated dependencies - - @0xsequence/abi@1.10.3 - - @0xsequence/core@1.10.3 - - @0xsequence/utils@1.10.3 - -## 1.10.2 - -### Patch Changes - -- - waas: add getIdToken method - - indexer: update api client -- Updated dependencies - - @0xsequence/abi@1.10.2 - - @0xsequence/core@1.10.2 - - @0xsequence/utils@1.10.2 - -## 1.10.1 - -### Patch Changes - -- metadata: update bindings -- Updated dependencies - - @0xsequence/abi@1.10.1 - - @0xsequence/core@1.10.1 - - @0xsequence/utils@1.10.1 - -## 1.10.0 - -### Minor Changes - -- waas release v1.3.0 - -### Patch Changes - -- Updated dependencies - - @0xsequence/abi@1.10.0 - - @0xsequence/core@1.10.0 - - @0xsequence/utils@1.10.0 - -## 1.9.37 - -### Patch Changes - -- network: adds nativeToken data to NetworkMetadata constants -- Updated dependencies - - @0xsequence/abi@1.9.37 - - @0xsequence/core@1.9.37 - - @0xsequence/utils@1.9.37 - -## 1.9.36 - -### Patch Changes - -- guard: export client -- Updated dependencies - - @0xsequence/abi@1.9.36 - - @0xsequence/core@1.9.36 - - @0xsequence/utils@1.9.36 - -## 1.9.35 - -### Patch Changes - -- guard: update bindings -- Updated dependencies - - @0xsequence/abi@1.9.35 - - @0xsequence/core@1.9.35 - - @0xsequence/utils@1.9.35 - -## 1.9.34 - -### Patch Changes - -- waas: always use lowercase email -- Updated dependencies - - @0xsequence/abi@1.9.34 - - @0xsequence/core@1.9.34 - - @0xsequence/utils@1.9.34 - -## 1.9.33 - -### Patch Changes - -- waas: umd build -- Updated dependencies - - @0xsequence/abi@1.9.33 - - @0xsequence/core@1.9.33 - - @0xsequence/utils@1.9.33 - -## 1.9.32 - -### Patch Changes - -- indexer: update bindings -- Updated dependencies - - @0xsequence/abi@1.9.32 - - @0xsequence/core@1.9.32 - - @0xsequence/utils@1.9.32 - -## 1.9.31 - -### Patch Changes - -- metadata: token directory changes -- Updated dependencies - - @0xsequence/abi@1.9.31 - - @0xsequence/core@1.9.31 - - @0xsequence/utils@1.9.31 - -## 1.9.30 - -### Patch Changes - -- update -- Updated dependencies - - @0xsequence/abi@1.9.30 - - @0xsequence/core@1.9.30 - - @0xsequence/utils@1.9.30 - -## 1.9.29 - -### Patch Changes - -- disable gnosis chain -- Updated dependencies - - @0xsequence/abi@1.9.29 - - @0xsequence/core@1.9.29 - - @0xsequence/utils@1.9.29 - -## 1.9.28 - -### Patch Changes - -- add utils/merkletree -- Updated dependencies - - @0xsequence/abi@1.9.28 - - @0xsequence/core@1.9.28 - - @0xsequence/utils@1.9.28 - -## 1.9.27 - -### Patch Changes - -- network: optimistic -> optimism -- waas: remove defaults -- api, sessions: update bindings -- Updated dependencies -- Updated dependencies -- Updated dependencies - - @0xsequence/abi@1.9.27 - - @0xsequence/core@1.9.27 - - @0xsequence/utils@1.9.27 - -## 1.9.26 - -### Patch Changes - -- - add backend interfaces for pluggable interfaces - - introduce @0xsequence/react-native - - update pnpm to lockfile v9 -- Updated dependencies - - @0xsequence/abi@1.9.26 - - @0xsequence/core@1.9.26 - - @0xsequence/utils@1.9.26 - -## 1.9.25 - -### Patch Changes - -- update webrpc clients with new error types -- Updated dependencies - - @0xsequence/abi@1.9.25 - - @0xsequence/core@1.9.25 - - @0xsequence/utils@1.9.25 - -## 1.9.24 - -### Patch Changes - -- waas: add memoryStore backend to localStore -- Updated dependencies - - @0xsequence/abi@1.9.24 - - @0xsequence/core@1.9.24 - - @0xsequence/utils@1.9.24 - -## 1.9.23 - -### Patch Changes - -- update api client bindings -- Updated dependencies - - @0xsequence/abi@1.9.23 - - @0xsequence/core@1.9.23 - - @0xsequence/utils@1.9.23 - -## 1.9.22 - -### Patch Changes - -- update metadata client bindings -- Updated dependencies - - @0xsequence/abi@1.9.22 - - @0xsequence/core@1.9.22 - - @0xsequence/utils@1.9.22 - -## 1.9.21 - -### Patch Changes - -- api client bindings -- Updated dependencies - - @0xsequence/abi@1.9.21 - - @0xsequence/core@1.9.21 - - @0xsequence/utils@1.9.21 - -## 1.9.20 - -### Patch Changes - -- api client bindings update -- Updated dependencies - - @0xsequence/abi@1.9.20 - - @0xsequence/core@1.9.20 - - @0xsequence/utils@1.9.20 - -## 1.9.19 - -### Patch Changes - -- waas update -- Updated dependencies - - @0xsequence/abi@1.9.19 - - @0xsequence/core@1.9.19 - - @0xsequence/utils@1.9.19 - -## 1.9.18 - -### Patch Changes - -- provider: prohibit dangerous functions -- Updated dependencies - - @0xsequence/abi@1.9.18 - - @0xsequence/core@1.9.18 - - @0xsequence/utils@1.9.18 - -## 1.9.17 - -### Patch Changes - -- network: add xr-sepolia -- Updated dependencies - - @0xsequence/abi@1.9.17 - - @0xsequence/core@1.9.17 - - @0xsequence/utils@1.9.17 - -## 1.9.16 - -### Patch Changes - -- waas: sequence.feeOptions -- Updated dependencies - - @0xsequence/abi@1.9.16 - - @0xsequence/core@1.9.16 - - @0xsequence/utils@1.9.16 - -## 1.9.15 - -### Patch Changes - -- metadata: collection external_link field name fix -- Updated dependencies - - @0xsequence/abi@1.9.15 - - @0xsequence/core@1.9.15 - - @0xsequence/utils@1.9.15 - -## 1.9.14 - -### Patch Changes - -- network: astar-zkatana -> astar-zkyoto -- network: deprecate polygon mumbai network -- network: add xai and polygon amoy -- Updated dependencies -- Updated dependencies -- Updated dependencies - - @0xsequence/abi@1.9.14 - - @0xsequence/core@1.9.14 - - @0xsequence/utils@1.9.14 - -## 1.9.13 - -### Patch Changes - -- waas: fix @0xsequence/network dependency -- Updated dependencies - - @0xsequence/abi@1.9.13 - - @0xsequence/core@1.9.13 - - @0xsequence/utils@1.9.13 - -## 1.9.12 - -### Patch Changes - -- indexer: update rpc bindings -- provider: signMessage: Serialize the BytesLike or string message into hexstring before sending -- waas: SessionAuthProof -- Updated dependencies -- Updated dependencies -- Updated dependencies - - @0xsequence/abi@1.9.12 - - @0xsequence/core@1.9.12 - - @0xsequence/utils@1.9.12 - -## 1.9.11 - -### Patch Changes - -- metdata, update rpc bindings -- Updated dependencies - - @0xsequence/abi@1.9.11 - - @0xsequence/core@1.9.11 - - @0xsequence/utils@1.9.11 - -## 1.9.10 - -### Patch Changes - -- update metadata rpc bindings -- Updated dependencies - - @0xsequence/abi@1.9.10 - - @0xsequence/core@1.9.10 - - @0xsequence/utils@1.9.10 - -## 1.9.9 - -### Patch Changes - -- metadata, add SequenceCollections rpc client -- Updated dependencies - - @0xsequence/abi@1.9.9 - - @0xsequence/core@1.9.9 - - @0xsequence/utils@1.9.9 - -## 1.9.8 - -### Patch Changes - -- waas client update -- Updated dependencies - - @0xsequence/abi@1.9.8 - - @0xsequence/core@1.9.8 - - @0xsequence/utils@1.9.8 - -## 1.9.7 - -### Patch Changes - -- update rpc client bindings for api, metadata and relayer -- Updated dependencies - - @0xsequence/abi@1.9.7 - - @0xsequence/core@1.9.7 - - @0xsequence/utils@1.9.7 - -## 1.9.6 - -### Patch Changes - -- waas package update -- Updated dependencies - - @0xsequence/abi@1.9.6 - - @0xsequence/core@1.9.6 - - @0xsequence/utils@1.9.6 - -## 1.9.5 - -### Patch Changes - -- RpcRelayer prioritize project access key -- Updated dependencies - - @0xsequence/abi@1.9.5 - - @0xsequence/core@1.9.5 - - @0xsequence/utils@1.9.5 - -## 1.9.4 - -### Patch Changes - -- waas: fix network dependency -- Updated dependencies - - @0xsequence/abi@1.9.4 - - @0xsequence/core@1.9.4 - - @0xsequence/utils@1.9.4 - -## 1.9.3 - -### Patch Changes - -- provider: don't append access key to RPC url if user has already provided it -- Updated dependencies - - @0xsequence/abi@1.9.3 - - @0xsequence/core@1.9.3 - - @0xsequence/utils@1.9.3 - -## 1.9.2 - -### Patch Changes - -- network: add xai-sepolia -- Updated dependencies - - @0xsequence/abi@1.9.2 - - @0xsequence/core@1.9.2 - - @0xsequence/utils@1.9.2 - -## 1.9.1 - -### Patch Changes - -- analytics fix -- Updated dependencies - - @0xsequence/abi@1.9.1 - - @0xsequence/core@1.9.1 - - @0xsequence/utils@1.9.1 - -## 1.9.0 - -### Minor Changes - -- waas release - -### Patch Changes - -- Updated dependencies - - @0xsequence/abi@1.9.0 - - @0xsequence/core@1.9.0 - - @0xsequence/utils@1.9.0 - -## 1.8.8 - -### Patch Changes - -- update metadata bindings -- Updated dependencies - - @0xsequence/abi@1.8.8 - - @0xsequence/core@1.8.8 - - @0xsequence/utils@1.8.8 - -## 1.8.7 - -### Patch Changes - -- provider: update databeat to 0.9.1 -- Updated dependencies - - @0xsequence/abi@1.8.7 - - @0xsequence/core@1.8.7 - - @0xsequence/utils@1.8.7 - -## 1.8.6 - -### Patch Changes - -- guard: SignedOwnershipProof -- Updated dependencies - - @0xsequence/abi@1.8.6 - - @0xsequence/core@1.8.6 - - @0xsequence/utils@1.8.6 - -## 1.8.5 - -### Patch Changes - -- guard: signOwnershipProof and isSignedOwnershipProof -- Updated dependencies - - @0xsequence/abi@1.8.5 - - @0xsequence/core@1.8.5 - - @0xsequence/utils@1.8.5 - -## 1.8.4 - -### Patch Changes - -- network: add homeverse to networks list -- Updated dependencies - - @0xsequence/abi@1.8.4 - - @0xsequence/core@1.8.4 - - @0xsequence/utils@1.8.4 - -## 1.8.3 - -### Patch Changes - -- api: introduce basic linked wallet support -- Updated dependencies - - @0xsequence/abi@1.8.3 - - @0xsequence/core@1.8.3 - - @0xsequence/utils@1.8.3 - -## 1.8.2 - -### Patch Changes - -- provider: don't initialize analytics unless explicitly requested -- Updated dependencies - - @0xsequence/abi@1.8.2 - - @0xsequence/core@1.8.2 - - @0xsequence/utils@1.8.2 - -## 1.8.1 - -### Patch Changes - -- update to analytics provider -- Updated dependencies - - @0xsequence/abi@1.8.1 - - @0xsequence/core@1.8.1 - - @0xsequence/utils@1.8.1 - -## 1.8.0 - -### Minor Changes - -- provider: project analytics - -### Patch Changes - -- Updated dependencies - - @0xsequence/abi@1.8.0 - - @0xsequence/core@1.8.0 - - @0xsequence/utils@1.8.0 - -## 1.7.2 - -### Patch Changes - -- 0xsequence: ChainId should not be exported as a type -- account, wallet: fix nonce selection -- Updated dependencies -- Updated dependencies - - @0xsequence/abi@1.7.2 - - @0xsequence/core@1.7.2 - - @0xsequence/utils@1.7.2 - -## 1.7.1 - -### Patch Changes - -- network: add missing avalanche logoURI -- Updated dependencies - - @0xsequence/abi@1.7.1 - - @0xsequence/core@1.7.1 - - @0xsequence/utils@1.7.1 - -## 1.7.0 - -### Minor Changes - -- provider: projectAccessKey is now required - -### Patch Changes - -- network: add NetworkMetadata.logoURI property for all networks -- Updated dependencies -- Updated dependencies - - @0xsequence/abi@1.7.0 - - @0xsequence/core@1.7.0 - - @0xsequence/utils@1.7.0 - -## 1.6.3 - -### Patch Changes - -- network list update -- Updated dependencies - - @0xsequence/abi@1.6.3 - - @0xsequence/core@1.6.3 - - @0xsequence/utils@1.6.3 - -## 1.6.2 - -### Patch Changes - -- auth: projectAccessKey option -- wallet: use 12 bytes for random space -- Updated dependencies -- Updated dependencies - - @0xsequence/abi@1.6.2 - - @0xsequence/core@1.6.2 - - @0xsequence/utils@1.6.2 - -## 1.6.1 - -### Patch Changes - -- core: add simple config from subdigest support -- core: fix encode tree with subdigest -- account: implement buildOnChainSignature on Account -- Updated dependencies -- Updated dependencies -- Updated dependencies - - @0xsequence/abi@1.6.1 - - @0xsequence/core@1.6.1 - - @0xsequence/utils@1.6.1 - -## 1.6.0 - -### Minor Changes - -- account, wallet: parallel transactions by default - -### Patch Changes - -- provider: emit disconnect on sign out -- Updated dependencies -- Updated dependencies - - @0xsequence/abi@1.6.0 - - @0xsequence/core@1.6.0 - - @0xsequence/utils@1.6.0 - -## 1.5.0 - -### Minor Changes - -- signhub: add 'signing' signer status - -### Patch Changes - -- auth: Session.open: onAccountAddress callback -- account: allow empty transaction bundles -- Updated dependencies -- Updated dependencies -- Updated dependencies - - @0xsequence/abi@1.5.0 - - @0xsequence/core@1.5.0 - - @0xsequence/utils@1.5.0 - -## 1.4.9 - -### Patch Changes - -- rename SequenceMetadataClient to SequenceMetadata -- Updated dependencies - - @0xsequence/abi@1.4.9 - - @0xsequence/core@1.4.9 - - @0xsequence/utils@1.4.9 - -## 1.4.8 - -### Patch Changes - -- account: Account.getSigners -- Updated dependencies - - @0xsequence/abi@1.4.8 - - @0xsequence/core@1.4.8 - - @0xsequence/utils@1.4.8 - -## 1.4.7 - -### Patch Changes - -- update indexer client bindings -- Updated dependencies - - @0xsequence/abi@1.4.7 - - @0xsequence/core@1.4.7 - - @0xsequence/utils@1.4.7 - -## 1.4.6 - -### Patch Changes - -- - add sepolia networks, mark goerli as deprecated - - update indexer client bindings -- Updated dependencies - - @0xsequence/abi@1.4.6 - - @0xsequence/core@1.4.6 - - @0xsequence/utils@1.4.6 - -## 1.4.5 - -### Patch Changes - -- indexer/metadata: update client bindings -- auth: selectWallet with new address -- Updated dependencies -- Updated dependencies - - @0xsequence/abi@1.4.5 - - @0xsequence/core@1.4.5 - - @0xsequence/utils@1.4.5 - -## 1.4.4 - -### Patch Changes - -- indexer: update bindings -- auth: handle jwt expiry -- Updated dependencies -- Updated dependencies - - @0xsequence/abi@1.4.4 - - @0xsequence/core@1.4.4 - - @0xsequence/utils@1.4.4 - -## 1.4.3 - -### Patch Changes - -- guard: return active status from GuardSigner.getAuthMethods -- Updated dependencies - - @0xsequence/abi@1.4.3 - - @0xsequence/core@1.4.3 - - @0xsequence/utils@1.4.3 - -## 1.4.2 - -### Patch Changes - -- guard: update bindings -- Updated dependencies - - @0xsequence/abi@1.4.2 - - @0xsequence/core@1.4.2 - - @0xsequence/utils@1.4.2 - -## 1.4.1 - -### Patch Changes - -- network: remove unused networks -- signhub: orchestrator interface -- guard: auth methods interface -- guard: update bindings for pin and totp -- guard: no more retry logic -- Updated dependencies -- Updated dependencies -- Updated dependencies -- Updated dependencies -- Updated dependencies - - @0xsequence/abi@1.4.1 - - @0xsequence/core@1.4.1 - - @0xsequence/utils@1.4.1 - -## 1.4.0 - -### Minor Changes - -- project access key support - -### Patch Changes - -- Updated dependencies - - @0xsequence/abi@1.4.0 - - @0xsequence/core@1.4.0 - - @0xsequence/utils@1.4.0 - -## 1.3.0 - -### Minor Changes - -- signhub: account children - -### Patch Changes - -- guard: do not throw when building deploy transaction -- network: snowtrace.io -> subnets.avax.network/c-chain -- Updated dependencies -- Updated dependencies -- Updated dependencies - - @0xsequence/abi@1.3.0 - - @0xsequence/core@1.3.0 - - @0xsequence/utils@1.3.0 - -## 1.2.9 - -### Patch Changes - -- account: AccountSigner.sendTransaction simulateForFeeOptions -- relayer: update bindings -- Updated dependencies -- Updated dependencies - - @0xsequence/abi@1.2.9 - - @0xsequence/core@1.2.9 - - @0xsequence/utils@1.2.9 - -## 1.2.8 - -### Patch Changes - -- rename X-Sequence-Token-Key header to X-Access-Key -- Updated dependencies - - @0xsequence/abi@1.2.8 - - @0xsequence/core@1.2.8 - - @0xsequence/utils@1.2.8 - -## 1.2.7 - -### Patch Changes - -- add x-sequence-token-key to clients -- Updated dependencies - - @0xsequence/abi@1.2.7 - - @0xsequence/core@1.2.7 - - @0xsequence/utils@1.2.7 - -## 1.2.6 - -### Patch Changes - -- Fix bind multicall provider -- Updated dependencies - - @0xsequence/abi@1.2.6 - - @0xsequence/core@1.2.6 - - @0xsequence/utils@1.2.6 - -## 1.2.5 - -### Patch Changes - -- Multicall default configuration fixes -- Updated dependencies - - @0xsequence/abi@1.2.5 - - @0xsequence/core@1.2.5 - - @0xsequence/utils@1.2.5 - -## 1.2.4 - -### Patch Changes - -- provider: Adding missing payment provider types to PaymentProviderOption -- provider: WalletRequestHandler.notifyChainChanged -- Updated dependencies -- Updated dependencies - - @0xsequence/abi@1.2.4 - - @0xsequence/core@1.2.4 - - @0xsequence/utils@1.2.4 - -## 1.2.3 - -### Patch Changes - -- auth, provider: connect to accept optional authorizeNonce -- Updated dependencies - - @0xsequence/abi@1.2.3 - - @0xsequence/core@1.2.3 - - @0xsequence/utils@1.2.3 - -## 1.2.2 - -### Patch Changes - -- provider: allow createContract calls -- core: check for explicit zero address in contract deployments -- Updated dependencies -- Updated dependencies - - @0xsequence/abi@1.2.2 - - @0xsequence/core@1.2.2 - - @0xsequence/utils@1.2.2 - -## 1.2.1 - -### Patch Changes - -- auth: use sequence api chain id as reference chain id if available -- Updated dependencies - - @0xsequence/abi@1.2.1 - - @0xsequence/core@1.2.1 - - @0xsequence/utils@1.2.1 - -## 1.2.0 - -### Minor Changes - -- split services from session, better local support - -### Patch Changes - -- Updated dependencies - - @0xsequence/abi@1.2.0 - - @0xsequence/core@1.2.0 - - @0xsequence/utils@1.2.0 - -## 1.1.15 - -### Patch Changes - -- guard: remove error filtering -- Updated dependencies - - @0xsequence/abi@1.1.15 - - @0xsequence/core@1.1.15 - - @0xsequence/utils@1.1.15 - -## 1.1.14 - -### Patch Changes - -- guard: add GuardSigner.onError -- Updated dependencies - - @0xsequence/abi@1.1.14 - - @0xsequence/core@1.1.14 - - @0xsequence/utils@1.1.14 - -## 1.1.13 - -### Patch Changes - -- provider: pass client version with connect options -- provider: removing large from BannerSize -- Updated dependencies -- Updated dependencies - - @0xsequence/abi@1.1.13 - - @0xsequence/core@1.1.13 - - @0xsequence/utils@1.1.13 - -## 1.1.12 - -### Patch Changes - -- provider: adding bannerSize to ConnectOptions -- Updated dependencies - - @0xsequence/abi@1.1.12 - - @0xsequence/core@1.1.12 - - @0xsequence/utils@1.1.12 - -## 1.1.11 - -### Patch Changes - -- add homeverse configs -- Updated dependencies - - @0xsequence/abi@1.1.11 - - @0xsequence/core@1.1.11 - - @0xsequence/utils@1.1.11 - -## 1.1.10 - -### Patch Changes - -- handle default EIP6492 on send -- Updated dependencies - - @0xsequence/abi@1.1.10 - - @0xsequence/core@1.1.10 - - @0xsequence/utils@1.1.10 - -## 1.1.9 - -### Patch Changes - -- Custom default EIP6492 on client -- Updated dependencies - - @0xsequence/abi@1.1.9 - - @0xsequence/core@1.1.9 - - @0xsequence/utils@1.1.9 - -## 1.1.8 - -### Patch Changes - -- metadata: searchMetadata: add types filter -- Updated dependencies - - @0xsequence/abi@1.1.8 - - @0xsequence/core@1.1.8 - - @0xsequence/utils@1.1.8 - -## 1.1.7 - -### Patch Changes - -- adding signInWith connect settings option to allow dapps to automatically login their users with a certain provider optimizing the normal authentication flow -- Updated dependencies - - @0xsequence/abi@1.1.7 - - @0xsequence/core@1.1.7 - - @0xsequence/utils@1.1.7 - -## 1.1.6 - -### Patch Changes - -- metadata: searchMetadata: add chainID and excludeTokenMetadata filters -- Updated dependencies - - @0xsequence/abi@1.1.6 - - @0xsequence/core@1.1.6 - - @0xsequence/utils@1.1.6 - -## 1.1.5 - -### Patch Changes - -- account: re-compute meta-transaction id for wallet deployment transactions -- Updated dependencies - - @0xsequence/abi@1.1.5 - - @0xsequence/core@1.1.5 - - @0xsequence/utils@1.1.5 - -## 1.1.4 - -### Patch Changes - -- network: rename base-mainnet to base -- provider: override isDefaultChain with ConnectOptions.networkId if provided -- Updated dependencies -- Updated dependencies - - @0xsequence/abi@1.1.4 - - @0xsequence/core@1.1.4 - - @0xsequence/utils@1.1.4 - -## 1.1.3 - -### Patch Changes - -- provider: use network id from transport session -- provider: sign authorization using ConnectOptions.networkId if provided -- Updated dependencies -- Updated dependencies - - @0xsequence/abi@1.1.3 - - @0xsequence/core@1.1.3 - - @0xsequence/utils@1.1.3 - -## 1.1.2 - -### Patch Changes - -- provider: jsonrpc chain id fixes -- Updated dependencies - - @0xsequence/abi@1.1.2 - - @0xsequence/core@1.1.2 - - @0xsequence/utils@1.1.2 - -## 1.1.1 - -### Patch Changes - -- network: add base mainnet and sepolia -- provider: reject toxic transaction requests -- Updated dependencies -- Updated dependencies - - @0xsequence/abi@1.1.1 - - @0xsequence/core@1.1.1 - - @0xsequence/utils@1.1.1 - -## 1.1.0 - -### Minor Changes - -- Refactor dapp facing provider - -### Patch Changes - -- Updated dependencies - - @0xsequence/abi@1.1.0 - - @0xsequence/core@1.1.0 - - @0xsequence/utils@1.1.0 - -## 1.0.5 - -### Patch Changes - -- network: export network constants -- guard: use the correct global for fetch -- network: nova-explorer.arbitrum.io -> nova.arbiscan.io -- Updated dependencies -- Updated dependencies -- Updated dependencies - - @0xsequence/abi@1.0.5 - - @0xsequence/core@1.0.5 - - @0xsequence/utils@1.0.5 - -## 1.0.4 - -### Patch Changes - -- provider: accept name or number for networkId -- Updated dependencies - - @0xsequence/abi@1.0.4 - - @0xsequence/core@1.0.4 - - @0xsequence/utils@1.0.4 - -## 1.0.3 - -### Patch Changes - -- Simpler isValidSignature helpers -- Updated dependencies - - @0xsequence/abi@1.0.3 - - @0xsequence/core@1.0.3 - - @0xsequence/utils@1.0.3 - -## 1.0.2 - -### Patch Changes - -- add extra signature validation utils methods -- Updated dependencies - - @0xsequence/abi@1.0.2 - - @0xsequence/core@1.0.2 - - @0xsequence/utils@1.0.2 - -## 1.0.1 - -### Patch Changes - -- add homeverse testnet -- Updated dependencies - - @0xsequence/abi@1.0.1 - - @0xsequence/core@1.0.1 - - @0xsequence/utils@1.0.1 - -## 1.0.0 - -### Major Changes - -- https://sequence.xyz/blog/sequence-wallet-light-state-sync-full-merkle-wallets - -### Patch Changes - -- Updated dependencies - - @0xsequence/abi@1.0.0 - - @0xsequence/core@1.0.0 - - @0xsequence/utils@1.0.0 - -## 0.43.34 - -### Patch Changes - -- auth: no jwt for indexer -- Updated dependencies - - @0xsequence/abi@0.43.34 - - @0xsequence/config@0.43.34 - - @0xsequence/network@0.43.34 - - @0xsequence/transactions@0.43.34 - - @0xsequence/utils@0.43.34 - -## 0.43.33 - -### Patch Changes - -- Adding onConnectOptionsChange handler to WalletRequestHandler -- Updated dependencies - - @0xsequence/abi@0.43.33 - - @0xsequence/config@0.43.33 - - @0xsequence/network@0.43.33 - - @0xsequence/transactions@0.43.33 - - @0xsequence/utils@0.43.33 - -## 0.43.32 - -### Patch Changes - -- add Base Goerli network -- Updated dependencies - - @0xsequence/abi@0.43.32 - - @0xsequence/config@0.43.32 - - @0xsequence/network@0.43.32 - - @0xsequence/transactions@0.43.32 - - @0xsequence/utils@0.43.32 - -## 0.43.31 - -### Patch Changes - -- remove AuxDataProvider, add promptSignInConnect -- Updated dependencies - - @0xsequence/abi@0.43.31 - - @0xsequence/config@0.43.31 - - @0xsequence/network@0.43.31 - - @0xsequence/transactions@0.43.31 - - @0xsequence/utils@0.43.31 - -## 0.43.30 - -### Patch Changes - -- add arbitrum goerli testnet -- Updated dependencies - - @0xsequence/abi@0.43.30 - - @0xsequence/config@0.43.30 - - @0xsequence/network@0.43.30 - - @0xsequence/transactions@0.43.30 - - @0xsequence/utils@0.43.30 - -## 0.43.29 - -### Patch Changes - -- provider: check availability of window object -- Updated dependencies - - @0xsequence/abi@0.43.29 - - @0xsequence/config@0.43.29 - - @0xsequence/network@0.43.29 - - @0xsequence/transactions@0.43.29 - - @0xsequence/utils@0.43.29 - -## 0.43.28 - -### Patch Changes - -- update api bindings -- Updated dependencies - - @0xsequence/abi@0.43.28 - - @0xsequence/config@0.43.28 - - @0xsequence/network@0.43.28 - - @0xsequence/transactions@0.43.28 - - @0xsequence/utils@0.43.28 - -## 0.43.27 - -### Patch Changes - -- Add rpc is sequence method -- Updated dependencies - - @0xsequence/abi@0.43.27 - - @0xsequence/config@0.43.27 - - @0xsequence/network@0.43.27 - - @0xsequence/transactions@0.43.27 - - @0xsequence/utils@0.43.27 - -## 0.43.26 - -### Patch Changes - -- add zkevm url to enum -- Updated dependencies - - @0xsequence/abi@0.43.26 - - @0xsequence/config@0.43.26 - - @0xsequence/network@0.43.26 - - @0xsequence/transactions@0.43.26 - - @0xsequence/utils@0.43.26 - -## 0.43.25 - -### Patch Changes - -- added polygon zkevm to mainnet networks -- Updated dependencies - - @0xsequence/abi@0.43.25 - - @0xsequence/config@0.43.25 - - @0xsequence/network@0.43.25 - - @0xsequence/transactions@0.43.25 - - @0xsequence/utils@0.43.25 - -## 0.43.24 - -### Patch Changes - -- name change from zkevm to polygon-zkevm -- Updated dependencies - - @0xsequence/abi@0.43.24 - - @0xsequence/config@0.43.24 - - @0xsequence/network@0.43.24 - - @0xsequence/transactions@0.43.24 - - @0xsequence/utils@0.43.24 - -## 0.43.23 - -### Patch Changes - -- update zkEVM name to Polygon zkEVM -- Updated dependencies - - @0xsequence/abi@0.43.23 - - @0xsequence/config@0.43.23 - - @0xsequence/network@0.43.23 - - @0xsequence/transactions@0.43.23 - - @0xsequence/utils@0.43.23 - -## 0.43.22 - -### Patch Changes - -- add zkevm chain -- Updated dependencies - - @0xsequence/abi@0.43.22 - - @0xsequence/config@0.43.22 - - @0xsequence/network@0.43.22 - - @0xsequence/transactions@0.43.22 - - @0xsequence/utils@0.43.22 - -## 0.43.21 - -### Patch Changes - -- api: update client bindings -- Updated dependencies - - @0xsequence/abi@0.43.21 - - @0xsequence/config@0.43.21 - - @0xsequence/network@0.43.21 - - @0xsequence/transactions@0.43.21 - - @0xsequence/utils@0.43.21 - -## 0.43.20 - -### Patch Changes - -- indexer: update bindings -- Updated dependencies - - @0xsequence/abi@0.43.20 - - @0xsequence/config@0.43.20 - - @0xsequence/network@0.43.20 - - @0xsequence/transactions@0.43.20 - - @0xsequence/utils@0.43.20 - -## 0.43.19 - -### Patch Changes - -- session proof update -- Updated dependencies - - @0xsequence/abi@0.43.19 - - @0xsequence/config@0.43.19 - - @0xsequence/network@0.43.19 - - @0xsequence/transactions@0.43.19 - - @0xsequence/utils@0.43.19 - -## 0.43.18 - -### Patch Changes - -- rpc client global check, hardening -- Updated dependencies - - @0xsequence/abi@0.43.18 - - @0xsequence/config@0.43.18 - - @0xsequence/network@0.43.18 - - @0xsequence/transactions@0.43.18 - - @0xsequence/utils@0.43.18 - -## 0.43.17 - -### Patch Changes - -- rpc clients, check of 'global' is defined -- Updated dependencies - - @0xsequence/abi@0.43.17 - - @0xsequence/config@0.43.17 - - @0xsequence/network@0.43.17 - - @0xsequence/transactions@0.43.17 - - @0xsequence/utils@0.43.17 - -## 0.43.16 - -### Patch Changes - -- ethers peerDep to v5, update rpc client global use -- Updated dependencies - - @0xsequence/abi@0.43.16 - - @0xsequence/config@0.43.16 - - @0xsequence/network@0.43.16 - - @0xsequence/transactions@0.43.16 - - @0xsequence/utils@0.43.16 - -## 0.43.15 - -### Patch Changes - -- - provider: expand receiver type on some util methods -- Updated dependencies - - @0xsequence/abi@0.43.15 - - @0xsequence/config@0.43.15 - - @0xsequence/network@0.43.15 - - @0xsequence/transactions@0.43.15 - - @0xsequence/utils@0.43.15 - -## 0.43.14 - -### Patch Changes - -- bump -- Updated dependencies - - @0xsequence/abi@0.43.14 - - @0xsequence/config@0.43.14 - - @0xsequence/network@0.43.14 - - @0xsequence/transactions@0.43.14 - - @0xsequence/utils@0.43.14 - -## 0.43.13 - -### Patch Changes - -- update rpc bindings -- Updated dependencies - - @0xsequence/abi@0.43.13 - - @0xsequence/config@0.43.13 - - @0xsequence/network@0.43.13 - - @0xsequence/transactions@0.43.13 - - @0xsequence/utils@0.43.13 - -## 0.43.12 - -### Patch Changes - -- provider: single wallet init, and add new unregisterWallet() method -- Updated dependencies - - @0xsequence/abi@0.43.12 - - @0xsequence/config@0.43.12 - - @0xsequence/network@0.43.12 - - @0xsequence/transactions@0.43.12 - - @0xsequence/utils@0.43.12 - -## 0.43.11 - -### Patch Changes - -- fix lockfiles -- re-add mocha type deleter -- Updated dependencies -- Updated dependencies - - @0xsequence/abi@0.43.11 - - @0xsequence/config@0.43.11 - - @0xsequence/network@0.43.11 - - @0xsequence/transactions@0.43.11 - - @0xsequence/utils@0.43.11 - -## 0.43.10 - -### Patch Changes - -- various improvements -- Updated dependencies - - @0xsequence/abi@0.43.10 - - @0xsequence/config@0.43.10 - - @0xsequence/network@0.43.10 - - @0xsequence/transactions@0.43.10 - - @0xsequence/utils@0.43.10 - -## 0.43.9 - -### Patch Changes - -- update deps -- Updated dependencies - - @0xsequence/abi@0.43.9 - - @0xsequence/config@0.43.9 - - @0xsequence/network@0.43.9 - - @0xsequence/transactions@0.43.9 - - @0xsequence/utils@0.43.9 - -## 0.43.8 - -### Patch Changes - -- network: JsonRpcProvider with caching -- Updated dependencies - - @0xsequence/abi@0.43.8 - - @0xsequence/config@0.43.8 - - @0xsequence/network@0.43.8 - - @0xsequence/transactions@0.43.8 - - @0xsequence/utils@0.43.8 - -## 0.43.7 - -### Patch Changes - -- provider: fix wallet network init -- Updated dependencies - - @0xsequence/abi@0.43.7 - - @0xsequence/config@0.43.7 - - @0xsequence/transactions@0.43.7 - - @0xsequence/utils@0.43.7 - -## 0.43.6 - -### Patch Changes - -- metadatata: update rpc bindings -- Updated dependencies - - @0xsequence/abi@0.43.6 - - @0xsequence/config@0.43.6 - - @0xsequence/transactions@0.43.6 - - @0xsequence/utils@0.43.6 - -## 0.43.5 - -### Patch Changes - -- provider: do not set default network for connect messages -- provider: forward missing error message -- Updated dependencies -- Updated dependencies - - @0xsequence/abi@0.43.5 - - @0xsequence/config@0.43.5 - - @0xsequence/transactions@0.43.5 - - @0xsequence/utils@0.43.5 - -## 0.43.4 - -### Patch Changes - -- no-change version bump to fix incorrectly tagged snapshot build -- Updated dependencies - - @0xsequence/abi@0.43.4 - - @0xsequence/config@0.43.4 - - @0xsequence/transactions@0.43.4 - - @0xsequence/utils@0.43.4 - -## 0.43.3 - -### Patch Changes - -- metadata: update bindings -- Updated dependencies - - @0xsequence/abi@0.43.3 - - @0xsequence/config@0.43.3 - - @0xsequence/transactions@0.43.3 - - @0xsequence/utils@0.43.3 - -## 0.43.2 - -### Patch Changes - -- provider: implement connectUnchecked -- Updated dependencies - - @0xsequence/abi@0.43.2 - - @0xsequence/config@0.43.2 - - @0xsequence/transactions@0.43.2 - - @0xsequence/utils@0.43.2 - -## 0.43.1 - -### Patch Changes - -- update to latest ethauth dep -- Updated dependencies - - @0xsequence/abi@0.43.1 - - @0xsequence/config@0.43.1 - - @0xsequence/transactions@0.43.1 - - @0xsequence/utils@0.43.1 - -## 0.43.0 - -### Minor Changes - -- move ethers to a peer dependency - -### Patch Changes - -- Updated dependencies - - @0xsequence/abi@0.43.0 - - @0xsequence/config@0.43.0 - - @0xsequence/transactions@0.43.0 - - @0xsequence/utils@0.43.0 - -## 0.42.10 - -### Patch Changes - -- add auxDataProvider -- Updated dependencies - - @0xsequence/abi@0.42.10 - - @0xsequence/config@0.42.10 - - @0xsequence/transactions@0.42.10 - - @0xsequence/utils@0.42.10 - -## 0.42.9 - -### Patch Changes - -- provider: add eip-191 exceptions -- Updated dependencies - - @0xsequence/abi@0.42.9 - - @0xsequence/config@0.42.9 - - @0xsequence/transactions@0.42.9 - - @0xsequence/utils@0.42.9 - -## 0.42.8 - -### Patch Changes - -- provider: skip setting intent origin if we're unity plugin -- Updated dependencies - - @0xsequence/abi@0.42.8 - - @0xsequence/config@0.42.8 - - @0xsequence/transactions@0.42.8 - - @0xsequence/utils@0.42.8 - -## 0.42.7 - -### Patch Changes - -- Add sign in options to connection settings -- Updated dependencies - - @0xsequence/abi@0.42.7 - - @0xsequence/config@0.42.7 - - @0xsequence/transactions@0.42.7 - - @0xsequence/utils@0.42.7 - -## 0.42.6 - -### Patch Changes - -- api bindings update -- Updated dependencies - - @0xsequence/abi@0.42.6 - - @0xsequence/config@0.42.6 - - @0xsequence/transactions@0.42.6 - - @0xsequence/utils@0.42.6 - -## 0.42.5 - -### Patch Changes - -- relayer: don't treat missing receipt as hard failure -- Updated dependencies - - @0xsequence/abi@0.42.5 - - @0xsequence/config@0.42.5 - - @0xsequence/transactions@0.42.5 - - @0xsequence/utils@0.42.5 - -## 0.42.4 - -### Patch Changes - -- provider: add custom app protocol to connect options -- Updated dependencies - - @0xsequence/abi@0.42.4 - - @0xsequence/config@0.42.4 - - @0xsequence/transactions@0.42.4 - - @0xsequence/utils@0.42.4 - -## 0.42.3 - -### Patch Changes - -- update api bindings -- Updated dependencies - - @0xsequence/abi@0.42.3 - - @0xsequence/config@0.42.3 - - @0xsequence/transactions@0.42.3 - - @0xsequence/utils@0.42.3 - -## 0.42.2 - -### Patch Changes - -- disable rinkeby network -- Updated dependencies - - @0xsequence/abi@0.42.2 - - @0xsequence/config@0.42.2 - - @0xsequence/transactions@0.42.2 - - @0xsequence/utils@0.42.2 - -## 0.42.1 - -### Patch Changes - -- wallet: optional waitForReceipt parameter -- Updated dependencies - - @0xsequence/abi@0.42.1 - - @0xsequence/config@0.42.1 - - @0xsequence/transactions@0.42.1 - - @0xsequence/utils@0.42.1 - -## 0.42.0 - -### Minor Changes - -- relayer: estimateGasLimits -> simulate -- add simulator package - -### Patch Changes - -- transactions: fix flattenAuxTransactions -- provider: only filter nullish values -- provider: re-map transaction 'gas' back to 'gasLimit' -- Updated dependencies -- Updated dependencies -- Updated dependencies -- Updated dependencies -- Updated dependencies - - @0xsequence/abi@0.42.0 - - @0xsequence/config@0.42.0 - - @0xsequence/transactions@0.42.0 - - @0xsequence/utils@0.42.0 - -## 0.41.3 - -### Patch Changes - -- api bindings update -- Updated dependencies - - @0xsequence/abi@0.41.3 - - @0xsequence/config@0.41.3 - - @0xsequence/transactions@0.41.3 - - @0xsequence/utils@0.41.3 - -## 0.41.2 - -### Patch Changes - -- api bindings update -- Updated dependencies - - @0xsequence/abi@0.41.2 - - @0xsequence/config@0.41.2 - - @0xsequence/transactions@0.41.2 - - @0xsequence/utils@0.41.2 - -## 0.41.1 - -### Patch Changes - -- update default networks -- Updated dependencies - - @0xsequence/abi@0.41.1 - - @0xsequence/config@0.41.1 - - @0xsequence/transactions@0.41.1 - - @0xsequence/utils@0.41.1 - -## 0.41.0 - -### Minor Changes - -- relayer: fix Relayer.wait() interface - - The interface for calling Relayer.wait() has changed. Instead of a single optional ill-defined timeout/delay parameter, there are three optional parameters, in order: - - - timeout: the maximum time to wait for the transaction receipt - - delay: the polling interval, i.e. the time to wait between requests - - maxFails: the maximum number of hard failures to tolerate before giving up - - Please update your codebase accordingly. - -- relayer: add optional waitForReceipt parameter to Relayer.relay - - The behaviour of Relayer.relay() was not well-defined with respect to whether or not it waited for a receipt. - This change allows the caller to specify whether to wait or not, with the default behaviour being to wait. - -### Patch Changes - -- relayer: wait receipt retry logic -- fix wrapped object error -- provider: forward delegateCall and revertOnError transaction fields -- Updated dependencies -- Updated dependencies -- Updated dependencies -- Updated dependencies -- Updated dependencies - - @0xsequence/abi@0.41.0 - - @0xsequence/config@0.41.0 - - @0xsequence/transactions@0.41.0 - - @0xsequence/utils@0.41.0 - -## 0.40.6 - -### Patch Changes - -- add arbitrum-nova chain -- Updated dependencies - - @0xsequence/abi@0.40.6 - - @0xsequence/config@0.40.6 - - @0xsequence/transactions@0.40.6 - - @0xsequence/utils@0.40.6 - -## 0.40.5 - -### Patch Changes - -- api: update bindings -- Updated dependencies - - @0xsequence/abi@0.40.5 - - @0xsequence/config@0.40.5 - - @0xsequence/transactions@0.40.5 - - @0xsequence/utils@0.40.5 - -## 0.40.4 - -### Patch Changes - -- add unreal transport -- Updated dependencies - - @0xsequence/abi@0.40.4 - - @0xsequence/config@0.40.4 - - @0xsequence/transactions@0.40.4 - - @0xsequence/utils@0.40.4 - -## 0.40.3 - -### Patch Changes - -- provider: fix MessageToSign message type -- Updated dependencies - - @0xsequence/abi@0.40.3 - - @0xsequence/config@0.40.3 - - @0xsequence/transactions@0.40.3 - - @0xsequence/utils@0.40.3 - -## 0.40.2 - -### Patch Changes - -- Wallet provider, loadSession method -- Updated dependencies - - @0xsequence/abi@0.40.2 - - @0xsequence/config@0.40.2 - - @0xsequence/transactions@0.40.2 - - @0xsequence/utils@0.40.2 - -## 0.40.1 - -### Patch Changes - -- export sequence.initWallet and sequence.getWallet -- Updated dependencies - - @0xsequence/abi@0.40.1 - - @0xsequence/config@0.40.1 - - @0xsequence/transactions@0.40.1 - - @0xsequence/utils@0.40.1 - -## 0.40.0 - -### Minor Changes - -- add sequence.initWallet(network, config) and sequence.getWallet() helper methods - -### Patch Changes - -- Updated dependencies - - @0xsequence/abi@0.40.0 - - @0xsequence/config@0.40.0 - - @0xsequence/transactions@0.40.0 - - @0xsequence/utils@0.40.0 - -## 0.39.6 - -### Patch Changes - -- indexer: update client bindings -- Updated dependencies - - @0xsequence/abi@0.39.6 - - @0xsequence/config@0.39.6 - - @0xsequence/transactions@0.39.6 - - @0xsequence/utils@0.39.6 - -## 0.39.5 - -### Patch Changes - -- provider: fix networkRpcUrl config option -- Updated dependencies - - @0xsequence/abi@0.39.5 - - @0xsequence/config@0.39.5 - - @0xsequence/transactions@0.39.5 - - @0xsequence/utils@0.39.5 - -## 0.39.4 - -### Patch Changes - -- api: update client bindings -- Updated dependencies - - @0xsequence/abi@0.39.4 - - @0xsequence/config@0.39.4 - - @0xsequence/transactions@0.39.4 - - @0xsequence/utils@0.39.4 - -## 0.39.3 - -### Patch Changes - -- add request method on Web3Provider -- Updated dependencies - - @0xsequence/abi@0.39.3 - - @0xsequence/config@0.39.3 - - @0xsequence/transactions@0.39.3 - - @0xsequence/utils@0.39.3 - -## 0.39.2 - -### Patch Changes - -- update umd name -- Updated dependencies - - @0xsequence/abi@0.39.2 - - @0xsequence/config@0.39.2 - - @0xsequence/transactions@0.39.2 - - @0xsequence/utils@0.39.2 - -## 0.39.1 - -### Patch Changes - -- add Aurora network -- add origin info for accountsChanged event to handle it per dapp -- Updated dependencies -- Updated dependencies - - @0xsequence/abi@0.39.1 - - @0xsequence/config@0.39.1 - - @0xsequence/transactions@0.39.1 - - @0xsequence/utils@0.39.1 - -## 0.39.0 - -### Minor Changes - -- abstract window.localStorage to interface type - -### Patch Changes - -- Updated dependencies - - @0xsequence/abi@0.39.0 - - @0xsequence/config@0.39.0 - - @0xsequence/transactions@0.39.0 - - @0xsequence/utils@0.39.0 - -## 0.38.2 - -### Patch Changes - -- provider: add Settings.defaultPurchaseAmount -- Updated dependencies - - @0xsequence/abi@0.38.2 - - @0xsequence/config@0.38.2 - - @0xsequence/transactions@0.38.2 - - @0xsequence/utils@0.38.2 - -## 0.38.1 - -### Patch Changes - -- update api and metadata rpc bindings -- Updated dependencies - - @0xsequence/abi@0.38.1 - - @0xsequence/config@0.38.1 - - @0xsequence/transactions@0.38.1 - - @0xsequence/utils@0.38.1 - -## 0.38.0 - -### Minor Changes - -- api: update bindings, change TokenPrice interface -- bridge: remove @0xsequence/bridge package -- api: update bindings, rename ContractCallArg to TupleComponent - -### Patch Changes - -- Updated dependencies -- Updated dependencies -- Updated dependencies - - @0xsequence/abi@0.38.0 - - @0xsequence/config@0.38.0 - - @0xsequence/transactions@0.38.0 - - @0xsequence/utils@0.38.0 - -## 0.37.1 - -### Patch Changes - -- Add back sortNetworks - Removing sorting was a breaking change for dapps on older versions which directly integrate sequence. -- Updated dependencies - - @0xsequence/abi@0.37.1 - - @0xsequence/config@0.37.1 - - @0xsequence/transactions@0.37.1 - - @0xsequence/utils@0.37.1 - -## 0.37.0 - -### Minor Changes - -- network related fixes and improvements -- api: bindings: exchange rate lookups - -### Patch Changes - -- Updated dependencies -- Updated dependencies - - @0xsequence/abi@0.37.0 - - @0xsequence/config@0.37.0 - - @0xsequence/transactions@0.37.0 - - @0xsequence/utils@0.37.0 - -## 0.36.13 - -### Patch Changes - -- api: update bindings with new price endpoints -- Updated dependencies - - @0xsequence/abi@0.36.13 - - @0xsequence/config@0.36.13 - - @0xsequence/transactions@0.36.13 - - @0xsequence/utils@0.36.13 - -## 0.36.12 - -### Patch Changes - -- wallet: skip remote signers if not needed -- auth: check that signature meets threshold before requesting auth token -- Updated dependencies -- Updated dependencies - - @0xsequence/abi@0.36.12 - - @0xsequence/config@0.36.12 - - @0xsequence/transactions@0.36.12 - - @0xsequence/utils@0.36.12 - -## 0.36.11 - -### Patch Changes - -- Prefix EIP191 message on wallet-request-handler -- Updated dependencies - - @0xsequence/abi@0.36.11 - - @0xsequence/config@0.36.11 - - @0xsequence/transactions@0.36.11 - - @0xsequence/utils@0.36.11 - -## 0.36.10 - -### Patch Changes - -- support bannerUrl on connect -- Updated dependencies - - @0xsequence/abi@0.36.10 - - @0xsequence/config@0.36.10 - - @0xsequence/transactions@0.36.10 - - @0xsequence/utils@0.36.10 - -## 0.36.9 - -### Patch Changes - -- minor dev xp improvements -- Updated dependencies - - @0xsequence/abi@0.36.9 - - @0xsequence/config@0.36.9 - - @0xsequence/transactions@0.36.9 - - @0xsequence/utils@0.36.9 - -## 0.36.8 - -### Patch Changes - -- more connect options (theme, payment providers, funding currencies) -- Updated dependencies - - @0xsequence/abi@0.36.8 - - @0xsequence/config@0.36.8 - - @0xsequence/transactions@0.36.8 - - @0xsequence/utils@0.36.8 - -## 0.36.7 - -### Patch Changes - -- fix missing break -- Updated dependencies - - @0xsequence/abi@0.36.7 - - @0xsequence/config@0.36.7 - - @0xsequence/transactions@0.36.7 - - @0xsequence/utils@0.36.7 - -## 0.36.6 - -### Patch Changes - -- wallet_switchEthereumChain support -- Updated dependencies - - @0xsequence/abi@0.36.6 - - @0xsequence/config@0.36.6 - - @0xsequence/transactions@0.36.6 - - @0xsequence/utils@0.36.6 - -## 0.36.5 - -### Patch Changes - -- auth: bump ethauth to 0.7.0 - network, wallet: don't assume position of auth network in list - api/indexer/metadata: trim trailing slash on hostname, and add endpoint urls - relayer: Allow to specify local relayer transaction parameters like gas price or gas limit -- Updated dependencies - - @0xsequence/abi@0.36.5 - - @0xsequence/config@0.36.5 - - @0xsequence/transactions@0.36.5 - - @0xsequence/utils@0.36.5 - -## 0.36.4 - -### Patch Changes - -- Updating list of chain ids to include other ethereum compatible chains -- Updated dependencies - - @0xsequence/abi@0.36.4 - - @0xsequence/config@0.36.4 - - @0xsequence/transactions@0.36.4 - - @0xsequence/utils@0.36.4 - -## 0.36.3 - -### Patch Changes - -- provider: pass connect options to prompter methods -- Updated dependencies - - @0xsequence/abi@0.36.3 - - @0xsequence/config@0.36.3 - - @0xsequence/transactions@0.36.3 - - @0xsequence/utils@0.36.3 - -## 0.36.2 - -### Patch Changes - -- transactions: Setting target to 0x0 when empty to during SequenceTxAbiEncode -- Updated dependencies - - @0xsequence/abi@0.36.2 - - @0xsequence/config@0.36.2 - - @0xsequence/transactions@0.36.2 - - @0xsequence/utils@0.36.2 - -## 0.36.1 - -### Patch Changes - -- metadata: update client with more fields -- Updated dependencies - - @0xsequence/abi@0.36.1 - - @0xsequence/config@0.36.1 - - @0xsequence/transactions@0.36.1 - - @0xsequence/utils@0.36.1 - -## 0.36.0 - -### Minor Changes - -- relayer, wallet: fee quote support - -### Patch Changes - -- Updated dependencies - - @0xsequence/abi@0.36.0 - - @0xsequence/config@0.36.0 - - @0xsequence/transactions@0.36.0 - - @0xsequence/utils@0.36.0 - -## 0.35.12 - -### Patch Changes - -- provider: rename wallet.commands to wallet.utils -- Updated dependencies - - @0xsequence/abi@0.35.12 - - @0xsequence/config@0.35.12 - - @0xsequence/transactions@0.35.12 - - @0xsequence/utils@0.35.12 - -## 0.35.11 - -### Patch Changes - -- provider/utils: smoother message validation -- Updated dependencies - - @0xsequence/abi@0.35.11 - - @0xsequence/config@0.35.11 - - @0xsequence/transactions@0.35.11 - - @0xsequence/utils@0.35.11 - -## 0.35.10 - -### Patch Changes - -- upgrade deps -- Updated dependencies - - @0xsequence/abi@0.35.10 - - @0xsequence/config@0.35.10 - - @0xsequence/transactions@0.35.10 - - @0xsequence/utils@0.35.10 - -## 0.35.9 - -### Patch Changes - -- provider: window-transport override event handlers with new wallet instance -- Updated dependencies - - @0xsequence/abi@0.35.9 - - @0xsequence/config@0.35.9 - - @0xsequence/transactions@0.35.9 - - @0xsequence/utils@0.35.9 - -## 0.35.8 - -### Patch Changes - -- provider: async wallet sign in improvements -- Updated dependencies - - @0xsequence/abi@0.35.8 - - @0xsequence/config@0.35.8 - - @0xsequence/transactions@0.35.8 - - @0xsequence/utils@0.35.8 - -## 0.35.7 - -### Patch Changes - -- config: cache wallet configs -- Updated dependencies - - @0xsequence/abi@0.35.7 - - @0xsequence/config@0.35.7 - - @0xsequence/transactions@0.35.7 - - @0xsequence/utils@0.35.7 - -## 0.35.6 - -### Patch Changes - -- provider: support async signin of wallet request handler -- Updated dependencies - - @0xsequence/abi@0.35.6 - - @0xsequence/config@0.35.6 - - @0xsequence/transactions@0.35.6 - - @0xsequence/utils@0.35.6 - -## 0.35.5 - -### Patch Changes - -- wallet: skip threshold check during fee estimation -- Updated dependencies - - @0xsequence/abi@0.35.5 - - @0xsequence/config@0.35.5 - - @0xsequence/transactions@0.35.5 - - @0xsequence/utils@0.35.5 - -## 0.35.4 - -### Patch Changes - -- - browser extension mode, center window -- Updated dependencies - - @0xsequence/abi@0.35.4 - - @0xsequence/config@0.35.4 - - @0xsequence/transactions@0.35.4 - - @0xsequence/utils@0.35.4 - -## 0.35.3 - -### Patch Changes - -- - update window position when in browser extension mode -- Updated dependencies - - @0xsequence/abi@0.35.3 - - @0xsequence/config@0.35.3 - - @0xsequence/transactions@0.35.3 - - @0xsequence/utils@0.35.3 - -## 0.35.2 - -### Patch Changes - -- - provider: WindowMessageHandler accept optional windowHref -- Updated dependencies - - @0xsequence/abi@0.35.2 - - @0xsequence/config@0.35.2 - - @0xsequence/transactions@0.35.2 - - @0xsequence/utils@0.35.2 - -## 0.35.1 - -### Patch Changes - -- wallet: update config on undeployed too -- Updated dependencies - - @0xsequence/abi@0.35.1 - - @0xsequence/config@0.35.1 - - @0xsequence/transactions@0.35.1 - - @0xsequence/utils@0.35.1 - -## 0.35.0 - -### Minor Changes - -- - config: add buildStubSignature - - provider: add checks to signing cases for wallet deployment and config statuses - - provider: add prompt for wallet deployment - - relayer: add BaseRelayer.prependWalletDeploy - - relayer: add Relayer.feeOptions - - relayer: account for wallet deployment in fee estimation - - transactions: add fromTransactionish - - wallet: add Account.prependConfigUpdate - - wallet: add Account.getFeeOptions - -### Patch Changes - -- Updated dependencies - - @0xsequence/abi@0.35.0 - - @0xsequence/config@0.35.0 - - @0xsequence/transactions@0.35.0 - - @0xsequence/utils@0.35.0 - -## 0.34.0 - -### Minor Changes - -- - upgrade deps - -### Patch Changes - -- Updated dependencies - - @0xsequence/abi@0.34.0 - - @0xsequence/config@0.34.0 - - @0xsequence/transactions@0.34.0 - - @0xsequence/utils@0.34.0 - -## 0.33.2 - -### Patch Changes - -- Updated dependencies - - @0xsequence/transactions@0.33.2 - -## 0.31.1 - -### Patch Changes - -- relayer: add Relayer.simulate - -## 0.31.0 - -### Minor Changes - -- - upgrading to ethers v5.5 - -### Patch Changes - -- Updated dependencies - - @0xsequence/abi@0.31.0 - - @0xsequence/config@0.31.0 - - @0xsequence/transactions@0.31.0 - - @0xsequence/utils@0.31.0 - -## 0.30.0 - -### Minor Changes - -- - upgrade most deps - -### Patch Changes - -- Updated dependencies - - @0xsequence/abi@0.30.0 - - @0xsequence/config@0.30.0 - - @0xsequence/transactions@0.30.0 - - @0xsequence/utils@0.30.0 - -## 0.29.8 - -### Patch Changes - -- update api -- Updated dependencies [undefined] - - @0xsequence/abi@0.29.8 - - @0xsequence/config@0.29.8 - - @0xsequence/transactions@0.29.8 - - @0xsequence/utils@0.29.8 - -## 0.29.6 - -### Patch Changes - -- @0xsequence/config@0.29.6 -- @0xsequence/transactions@0.29.6 - -## 0.29.5 - -### Patch Changes - -- Updated dependencies [undefined] - - @0xsequence/config@0.29.5 - -## 0.29.2 - -### Patch Changes - -- relayer: don't pass nonce to GetMetaTxnNetworkFeeOptions - -## 0.29.0 - -### Minor Changes - -- major architectural changes in Sequence design - - - only one API instance, API is no longer a per-chain service - - separate per-chain indexer service, API no longer handles indexing - - single contract metadata service, API no longer serves metadata - - chaind package has been removed, indexer and metadata packages have been added - - stronger typing with new explicit ChainId type - - multicall fixes and improvements - - forbid "wait" transactions in sendTransactionBatch calls - -### Patch Changes - -- Updated dependencies [undefined] - - @0xsequence/config@0.29.0 - - @0xsequence/transactions@0.29.0 - - @0xsequence/abi@0.29.0 - - @0xsequence/utils@0.29.0 - -## 0.28.0 - -### Minor Changes - -- extension provider - -### Patch Changes - -- Updated dependencies [undefined] - - @0xsequence/abi@0.28.0 - - @0xsequence/chaind@0.28.0 - - @0xsequence/config@0.28.0 - - @0xsequence/transactions@0.28.0 - - @0xsequence/utils@0.28.0 - -## 0.27.1 - -### Patch Changes - -- fix waitReceipt polling logic - -## 0.27.0 - -### Minor Changes - -- Add requireFreshSigner lib to sessions - -### Patch Changes - -- Updated dependencies [undefined] - - @0xsequence/abi@0.27.0 - - @0xsequence/chaind@0.27.0 - - @0xsequence/config@0.27.0 - - @0xsequence/transactions@0.27.0 - - @0xsequence/utils@0.27.0 - -## 0.26.0 - -### Minor Changes - -- update relayer client bindings - provide the wallet's address for calls to SendMetaTxn - modify the semantics of Relayer.getNonce() to allow relayers to select nonce spaces for clients - -## 0.25.1 - -### Patch Changes - -- Fix build typescrypt issue -- Updated dependencies [undefined] - - @0xsequence/abi@0.25.1 - - @0xsequence/chaind@0.25.1 - - @0xsequence/config@0.25.1 - - @0xsequence/transactions@0.25.1 - - @0xsequence/utils@0.25.1 - -## 0.25.0 - -### Minor Changes - -- 10c8af8: Add estimator package - Fix multicall few calls bug - -### Patch Changes - -- Updated dependencies [10c8af8] - - @0xsequence/abi@0.25.0 - - @0xsequence/chaind@0.25.0 - - @0xsequence/config@0.25.0 - - @0xsequence/transactions@0.25.0 - - @0xsequence/utils@0.25.0 - -## 0.24.1 - -### Patch Changes - -- relayer: wait for queued status instead of unknown - -## 0.24.0 - -### Minor Changes - -- pass wallet config and nonce to GetMetaTxnNetworkFeeOptions - -## 0.23.0 - -### Minor Changes - -- - relayer: offer variety of gas fee options from the relayer service" - -### Patch Changes - -- Updated dependencies [undefined] - - @0xsequence/abi@0.23.0 - - @0xsequence/chaind@0.23.0 - - @0xsequence/config@0.23.0 - - @0xsequence/transactions@0.23.0 - - @0xsequence/utils@0.23.0 - -## 0.22.2 - -### Patch Changes - -- e1c109e: Fix authProof on expired sessions -- Updated dependencies [e1c109e] - - @0xsequence/abi@0.22.2 - - @0xsequence/chaind@0.22.2 - - @0xsequence/config@0.22.2 - - @0xsequence/transactions@0.22.2 - - @0xsequence/utils@0.22.2 - -## 0.22.1 - -### Patch Changes - -- transport session cache -- Updated dependencies [undefined] - - @0xsequence/abi@0.22.1 - - @0xsequence/chaind@0.22.1 - - @0xsequence/config@0.22.1 - - @0xsequence/transactions@0.22.1 - - @0xsequence/utils@0.22.1 - -## 0.22.0 - -### Minor Changes - -- e667b65: Expose all relayer options on networks - -### Patch Changes - -- Updated dependencies [e667b65] - - @0xsequence/abi@0.22.0 - - @0xsequence/utils@0.22.0 - - @0xsequence/chaind@0.22.0 - - @0xsequence/config@0.22.0 - - @0xsequence/transactions@0.22.0 - -## 0.21.5 - -### Patch Changes - -- Give priority to metaTxnId returned by relayer -- Updated dependencies [undefined] - - @0xsequence/abi@0.21.5 - - @0xsequence/chaind@0.21.5 - - @0xsequence/config@0.21.5 - - @0xsequence/transactions@0.21.5 - - @0xsequence/utils@0.21.5 - -## 0.21.4 - -### Patch Changes - -- Add has enough signers method -- Updated dependencies [undefined] - - @0xsequence/abi@0.21.4 - - @0xsequence/chaind@0.21.4 - - @0xsequence/config@0.21.4 - - @0xsequence/transactions@0.21.4 - - @0xsequence/utils@0.21.4 - -## 0.21.3 - -### Patch Changes - -- add window session cache -- Updated dependencies [undefined] - - @0xsequence/abi@0.21.3 - - @0xsequence/chaind@0.21.3 - - @0xsequence/config@0.21.3 - - @0xsequence/transactions@0.21.3 - - @0xsequence/utils@0.21.3 - -## 0.21.2 - -### Patch Changes - -- exception handlind in relayer -- Updated dependencies [undefined] - - @0xsequence/abi@0.21.2 - - @0xsequence/chaind@0.21.2 - - @0xsequence/config@0.21.2 - - @0xsequence/transactions@0.21.2 - - @0xsequence/utils@0.21.2 - -## 0.21.0 - -### Minor Changes - -- - fix gas estimation on wallets with large number of signers - - update to session handling and wallet config construction upon auth - -### Patch Changes - -- Updated dependencies [undefined] - - @0xsequence/abi@0.21.0 - - @0xsequence/chaind@0.21.0 - - @0xsequence/config@0.21.0 - - @0xsequence/transactions@0.21.0 - - @0xsequence/utils@0.21.0 - -## 0.19.3 - -### Patch Changes - -- jwtAuth visibility, package version sync -- Updated dependencies [undefined] - - @0xsequence/abi@0.19.3 - - @0xsequence/chaind@0.19.3 - - @0xsequence/config@0.19.3 - - @0xsequence/transactions@0.19.3 - - @0xsequence/utils@0.19.3 - -## 0.19.2 - -### Patch Changes - -- Updated dependencies [undefined] - - @0xsequence/abi@0.19.2 - - @0xsequence/config@0.19.2 - - @0xsequence/transactions@0.19.2 - -## 0.19.0 - -### Minor Changes - -- - provider, improve dapp / wallet transport io - -### Patch Changes - -- Updated dependencies [undefined] - - @0xsequence/abi@0.19.0 - - @0xsequence/chaind@0.19.0 - - @0xsequence/config@0.19.0 - - @0xsequence/transactions@0.19.0 - - @0xsequence/utils@0.19.0 - -## 0.18.0 - -### Minor Changes - -- relayer improvements and pending transaction handling - -### Patch Changes - -- Updated dependencies [undefined] - - @0xsequence/abi@0.18.0 - - @0xsequence/chaind@0.18.0 - - @0xsequence/config@0.18.0 - - @0xsequence/transactions@0.18.0 - - @0xsequence/utils@0.18.0 - -## 0.16.0 - -### Minor Changes - -- relayer as its own service separate from chaind - -### Patch Changes - -- Updated dependencies [undefined] - - @0xsequence/abi@0.16.0 - - @0xsequence/chaind@0.16.0 - - @0xsequence/config@0.16.0 - - @0xsequence/transactions@0.16.0 - - @0xsequence/utils@0.16.0 - -## 0.15.1 - -### Patch Changes - -- update api clients -- Updated dependencies [undefined] - - @0xsequence/abi@0.15.1 - - @0xsequence/chaind@0.15.1 - - @0xsequence/config@0.15.1 - - @0xsequence/transactions@0.15.1 - - @0xsequence/utils@0.15.1 - -## 0.15.0 - -### Minor Changes - -- - update chaind and api bindings - - replace EstimateMetaTxnGasReceipt with UpdateMetaTxnGasLimits and GetMetaTxnNetworkFeeOptions - -### Patch Changes - -- Updated dependencies [undefined] - - @0xsequence/chaind@0.15.0 - - @0xsequence/transactions@0.15.0 - -## 0.14.3 - -### Patch Changes - -- Fix 0xSequence relayer dependencies -- Updated dependencies [undefined] - - @0xsequence/abi@0.14.3 - - @0xsequence/chaind@0.14.3 - - @0xsequence/config@0.14.3 - - @0xsequence/transactions@0.14.3 - - @0xsequence/utils@0.14.3 - -## 0.14.2 - -### Patch Changes - -- Add debug logs to rpc-relayer -- Updated dependencies [undefined] - - @0xsequence/abi@0.14.2 - - @0xsequence/chaind@0.14.2 - - @0xsequence/config@0.14.2 - - @0xsequence/transactions@0.14.2 - -## 0.14.0 - -### Minor Changes - -- update sequence utils finder which includes optimization - -### Patch Changes - -- Updated dependencies [undefined] - - @0xsequence/abi@0.14.0 - - @0xsequence/chaind@0.14.0 - - @0xsequence/config@0.14.0 - - @0xsequence/transactions@0.14.0 - -## 0.13.0 - -### Minor Changes - -- Update SequenceUtils deployed contract - -### Patch Changes - -- Updated dependencies [undefined] - - @0xsequence/abi@0.13.0 - - @0xsequence/chaind@0.13.0 - - @0xsequence/config@0.13.0 - - @0xsequence/transactions@0.13.0 - -## 0.12.1 - -### Patch Changes - -- npm bump -- Updated dependencies [undefined] - - @0xsequence/abi@0.12.1 - - @0xsequence/chaind@0.12.1 - - @0xsequence/config@0.12.1 - - @0xsequence/transactions@0.12.1 - -## 0.12.0 - -### Minor Changes - -- provider: improvements to window transport - -### Patch Changes - -- Updated dependencies [undefined] - - @0xsequence/abi@0.12.0 - - @0xsequence/chaind@0.12.0 - - @0xsequence/config@0.12.0 - - @0xsequence/transactions@0.12.0 - -## 0.11.4 - -### Patch Changes - -- update api client -- Updated dependencies [undefined] - - @0xsequence/abi@0.11.4 - - @0xsequence/chaind@0.11.4 - - @0xsequence/config@0.11.4 - - @0xsequence/transactions@0.11.4 - -## 0.11.3 - -### Patch Changes - -- improve openWindow state options handling -- Updated dependencies [undefined] - - @0xsequence/abi@0.11.3 - - @0xsequence/chaind@0.11.3 - - @0xsequence/config@0.11.3 - - @0xsequence/transactions@0.11.3 - -## 0.11.2 - -### Patch Changes - -- Fix multicall proxy scopes -- Updated dependencies [undefined] - - @0xsequence/abi@0.11.2 - - @0xsequence/chaind@0.11.2 - - @0xsequence/config@0.11.2 - - @0xsequence/transactions@0.11.2 - -## 0.11.1 - -### Patch Changes - -- Add support for dynamic and nested signatures -- Updated dependencies [undefined] - - @0xsequence/abi@0.11.1 - - @0xsequence/chaind@0.11.1 - - @0xsequence/config@0.11.1 - - @0xsequence/transactions@0.11.1 - -## 0.11.0 - -### Minor Changes - -- Update wallet context to 1.7 contracts - -### Patch Changes - -- Updated dependencies [undefined] - - @0xsequence/abi@0.11.0 - - @0xsequence/chaind@0.11.0 - - @0xsequence/config@0.11.0 - - @0xsequence/transactions@0.11.0 - -## 0.10.9 - -### Patch Changes - -- add support for public addresses as signers in session.open -- Updated dependencies [undefined] - - @0xsequence/abi@0.10.9 - - @0xsequence/chaind@0.10.9 - - @0xsequence/config@0.10.9 - - @0xsequence/transactions@0.10.9 - -## 0.10.8 - -### Patch Changes - -- Multicall production configuration -- Updated dependencies [undefined] - - @0xsequence/abi@0.10.8 - - @0xsequence/chaind@0.10.8 - - @0xsequence/config@0.10.8 - - @0xsequence/transactions@0.10.8 - -## 0.10.7 - -### Patch Changes - -- allow provider transport to force disconnect -- Updated dependencies [undefined] - - @0xsequence/abi@0.10.7 - - @0xsequence/chaind@0.10.7 - - @0xsequence/config@0.10.7 - - @0xsequence/transactions@0.10.7 - -## 0.10.6 - -### Patch Changes - -- - fix getWalletState method -- Updated dependencies [undefined] - - @0xsequence/abi@0.10.6 - - @0xsequence/chaind@0.10.6 - - @0xsequence/config@0.10.6 - - @0xsequence/transactions@0.10.6 - -## 0.10.5 - -### Patch Changes - -- update relayer gas refund options -- Updated dependencies [undefined] - - @0xsequence/abi@0.10.5 - - @0xsequence/chaind@0.10.5 - - @0xsequence/config@0.10.5 - - @0xsequence/transactions@0.10.5 - -## 0.10.4 - -### Patch Changes - -- Update api proto -- Updated dependencies [undefined] - - @0xsequence/abi@0.10.4 - - @0xsequence/chaind@0.10.4 - - @0xsequence/config@0.10.4 - - @0xsequence/transactions@0.10.4 - -## 0.10.3 - -### Patch Changes - -- Fix loading config cross-chain -- Updated dependencies [undefined] - - @0xsequence/abi@0.10.3 - - @0xsequence/chaind@0.10.3 - - @0xsequence/config@0.10.3 - - @0xsequence/transactions@0.10.3 - -## 0.10.2 - -### Patch Changes - -- - message digest fix -- Updated dependencies [undefined] - - @0xsequence/abi@0.10.2 - - @0xsequence/chaind@0.10.2 - - @0xsequence/config@0.10.2 - - @0xsequence/transactions@0.10.2 - -## 0.10.1 - -### Patch Changes - -- upgrade deps -- Updated dependencies [undefined] - - @0xsequence/abi@0.10.1 - - @0xsequence/chaind@0.10.1 - - @0xsequence/config@0.10.1 - - @0xsequence/transactions@0.10.1 - -## 0.10.0 - -### Minor Changes - -- Deployed new contracts with ERC1271 signer support - -### Patch Changes - -- Updated dependencies [undefined] - - @0xsequence/abi@0.10.0 - - @0xsequence/chaind@0.10.0 - - @0xsequence/config@0.10.0 - - @0xsequence/transactions@0.10.0 - -## 0.9.6 - -### Patch Changes - -- Update ABIs for latest sequence contracts -- Updated dependencies [undefined] - - @0xsequence/config@0.9.6 - - @0xsequence/transactions@0.9.6 - - @0xsequence/abi@0.9.6 - - @0xsequence/chaind@0.9.6 - -## 0.9.5 - -### Patch Changes - -- Implemented session class -- Updated dependencies [undefined] - - @0xsequence/config@0.9.5 - - @0xsequence/transactions@0.9.5 - -## 0.9.3 - -### Patch Changes - -- - minor improvements -- Updated dependencies [undefined] - - @0xsequence/abi@0.9.3 - - @0xsequence/chaind@0.9.3 - - @0xsequence/config@0.9.3 - - @0xsequence/transactions@0.9.3 - -## 0.9.1 - -### Patch Changes - -- - patch bump -- Updated dependencies [undefined] - - @0xsequence/abi@0.9.1 - - @0xsequence/chaind@0.9.1 - - @0xsequence/config@0.9.1 - - @0xsequence/transactions@0.9.1 - -## 0.9.0 - -### Minor Changes - -- - provider transport hardening - -### Patch Changes - -- Updated dependencies [undefined] - - @0xsequence/abi@0.9.0 - - @0xsequence/chaind@0.9.0 - - @0xsequence/config@0.9.0 - - @0xsequence/transactions@0.9.0 - -## 0.8.5 - -### Patch Changes - -- - use latest wallet-contracts -- Updated dependencies [undefined] - - @0xsequence/abi@0.8.5 - - @0xsequence/chaind@0.8.5 - - @0xsequence/config@0.8.5 - - @0xsequence/transactions@0.8.5 - -## 0.8.4 - -### Patch Changes - -- - minor improvements, name updates and comments -- Updated dependencies [undefined] - - @0xsequence/abi@0.8.4 - - @0xsequence/chaind@0.8.4 - - @0xsequence/config@0.8.4 - - @0xsequence/transactions@0.8.4 - -## 0.8.3 - -### Patch Changes - -- - refinements - - - normalize signer address in config - - - provider: getWalletState() method to WalletProvider - -- Updated dependencies [undefined] - - @0xsequence/abi@0.8.3 - - @0xsequence/chaind@0.8.3 - - @0xsequence/config@0.8.3 - - @0xsequence/transactions@0.8.3 - -## 0.8.2 - -### Patch Changes - -- - field rename and ethauth dependency bump -- Updated dependencies [undefined] - - @0xsequence/abi@0.8.2 - - @0xsequence/chaind@0.8.2 - - @0xsequence/config@0.8.2 - - @0xsequence/transactions@0.8.2 - -## 0.8.1 - -### Patch Changes - -- - variety of optimizations -- Updated dependencies [undefined] - - @0xsequence/abi@0.8.1 - - @0xsequence/chaind@0.8.1 - - @0xsequence/config@0.8.1 - - @0xsequence/transactions@0.8.1 - -## 0.8.0 - -### Minor Changes - -- - changeset fix - -### Patch Changes - -- Updated dependencies [undefined] - - @0xsequence/abi@0.8.0 - - @0xsequence/chaind@0.8.0 - - @0xsequence/config@0.8.0 - - @0xsequence/transactions@0.8.0 - -## 0.7.1 - -### Patch Changes - -- 02377ab: Minor improvements - -## 0.7.0 - -### Patch Changes - -- 6f11ed7: sequence.js, init release -- Updated dependencies [6f11ed7] - - @0xsequence/abi@0.7.0 - - @0xsequence/chaind@0.7.0 - - @0xsequence/config@0.7.0 - - @0xsequence/transactions@0.7.0 diff --git a/old/packages/relayer/README.md b/old/packages/relayer/README.md deleted file mode 100644 index 71c808fd0..000000000 --- a/old/packages/relayer/README.md +++ /dev/null @@ -1,4 +0,0 @@ -@0xsequence/relayer -=================== - -See [0xsequence project page](https://github.com/0xsequence/sequence.js). diff --git a/old/packages/relayer/hardhat.config.js b/old/packages/relayer/hardhat.config.js deleted file mode 100644 index eaca50531..000000000 --- a/old/packages/relayer/hardhat.config.js +++ /dev/null @@ -1,15 +0,0 @@ -/** - * @type import('hardhat/config').HardhatUserConfig - */ -module.exports = { - solidity: '0.7.6', - - networks: { - hardhat: { - chainId: 31337, - accounts: { - mnemonic: 'ripple axis someone ridge uniform wrist prosper there frog rate olympic knee' - } - } - } -} diff --git a/old/packages/relayer/package.json b/old/packages/relayer/package.json deleted file mode 100644 index 1bc5aba20..000000000 --- a/old/packages/relayer/package.json +++ /dev/null @@ -1,37 +0,0 @@ -{ - "name": "@0xsequence/relayer", - "version": "2.3.8", - "description": "relayer sub-package for Sequence", - "repository": "https://github.com/0xsequence/sequence.js/tree/master/packages/relayer", - "source": "src/index.ts", - "main": "dist/0xsequence-relayer.cjs.js", - "module": "dist/0xsequence-relayer.esm.js", - "author": "Horizon Blockchain Games", - "license": "Apache-2.0", - "scripts": { - "test": "pnpm test:concurrently 'pnpm test:run'", - "test:run": "pnpm test:file tests/**/*.spec.ts", - "test:file": "NODE_OPTIONS='--import tsx' mocha --timeout 60000", - "test:concurrently": "concurrently -k --success first 'pnpm start:hardhat > /dev/null' ", - "start:hardhat": "pnpm hardhat node --port 9547", - "typecheck": "tsc --noEmit" - }, - "peerDependencies": { - "ethers": ">=6" - }, - "dependencies": { - "@0xsequence/abi": "workspace:*", - "@0xsequence/core": "workspace:*", - "@0xsequence/utils": "workspace:*" - }, - "devDependencies": { - "@0xsequence/signhub": "workspace:*", - "@0xsequence/tests": "workspace:*", - "@0xsequence/wallet-contracts": "^3.0.1", - "ethers": "6.13.4" - }, - "files": [ - "src", - "dist" - ] -} diff --git a/old/packages/relayer/src/index.ts b/old/packages/relayer/src/index.ts deleted file mode 100644 index f43d3e33f..000000000 --- a/old/packages/relayer/src/index.ts +++ /dev/null @@ -1,111 +0,0 @@ -import { ethers } from 'ethers' -import { proto } from './rpc-relayer' - -import { commons } from '@0xsequence/core' - -export interface Relayer { - // simulate returns the execution results for a list of transactions. - simulate(wallet: string, ...transactions: commons.transaction.Transaction[]): Promise - - // getFeeOptions returns the fee options that the relayer will accept as payment. - // If a quote is returned, it may be passed back to the relayer for dispatch. - getFeeOptions( - address: string, - ...transactions: commons.transaction.Transaction[] - ): Promise<{ options: FeeOption[]; quote?: FeeQuote }> - - // getFeeOptionsRaw returns the fee options that the relayer will accept as payment. - // If a quote is returned, it may be passed back to the relayer for dispatch. - // It doesn't make any assumptions about the transaction format. - getFeeOptionsRaw( - entrypoint: string, - data: ethers.BytesLike, - options?: { - simulate?: boolean - } - ): Promise<{ options: FeeOption[]; quote?: FeeQuote }> - - // gasRefundOptions returns the transactions which can be included to refund a - // relayer for submitting your transaction to a network. - gasRefundOptions(address: string, ...transactions: commons.transaction.Transaction[]): Promise - - // Gas tank sponsorship management - listGasSponsors(args: proto.ListGasSponsorsArgs): Promise - addGasSponsor(args: proto.AddGasSponsorArgs): Promise - updateGasSponsor(args: proto.UpdateGasSponsorArgs): Promise - removeGasSponsor(args: proto.RemoveGasSponsorArgs): Promise - - // getNonce returns the transaction count/nonce for a wallet, encoded with nonce space. - // If space is undefined, the relayer can choose a nonce space to encode the result with. - // Otherwise, the relayer must return a nonce encoded for the given nonce space. - getNonce(address: string, space?: ethers.BigNumberish, blockTag?: ethers.BlockTag): Promise - - // relayer will submit the transaction(s) to the network and return the transaction response. - // The quote should be the one returned from getFeeOptions, if any. - // waitForReceipt must default to true. - relay( - signedTxs: commons.transaction.IntendedTransactionBundle, - quote?: FeeQuote, - waitForReceipt?: boolean, - projectAccessKey?: string - ): Promise - - // wait for transaction confirmation - // timeout is the maximum time to wait for the transaction response - // delay is the polling interval, i.e. the time to wait between requests - // maxFails is the maximum number of hard failures to tolerate before giving up - wait( - metaTxnId: string | commons.transaction.SignedTransactionBundle, - timeout?: number, - delay?: number, - maxFails?: number - ): Promise - - // getMetaTransactions returns a list of meta transactions for a given project and gas tank - getMetaTransactions( - projectId: number, - page?: proto.Page - ): Promise<{ - page: proto.Page - transactions: proto.MetaTxnLog[] - }> - - // getTransactionCost returns the used fee cost for gas tank during a given period - getTransactionCost( - projectId: number, - from: string, - to: string - ): Promise<{ - cost: number - }> -} - -export * from './local-relayer' -export * from './provider-relayer' -export * from './rpc-relayer' -export { proto as RpcRelayerProto } from './rpc-relayer' -export type SimulateResult = proto.SimulateResult -export type FeeOption = proto.FeeOption - -// A fee quote is simply an opaque value that can be obtained via Relayer.getFeeOptions(), and -// returned back to the same relayer via Relayer.relay(). Fee quotes should be treated as an -// implementation detail of the relayer that produces them. -// -// This interface exists for type-safety purposes to protect against passing non-FeeQuotes to -// Relayer.relay(), or any other functions that call it indirectly (e.g. Account.sendTransaction). -export interface FeeQuote { - _tag: 'FeeQuote' - _quote: unknown -} - -export function isRelayer(cand: any): cand is Relayer { - return ( - typeof cand === 'object' && - typeof cand.simulate === 'function' && - typeof cand.getFeeOptions === 'function' && - typeof cand.gasRefundOptions === 'function' && - typeof cand.getNonce === 'function' && - typeof cand.relay === 'function' && - typeof cand.wait === 'function' - ) -} diff --git a/old/packages/relayer/src/local-relayer.ts b/old/packages/relayer/src/local-relayer.ts deleted file mode 100644 index f53fdde52..000000000 --- a/old/packages/relayer/src/local-relayer.ts +++ /dev/null @@ -1,125 +0,0 @@ -import { ethers } from 'ethers' -import { logger } from '@0xsequence/utils' -import { FeeOption, FeeQuote, proto, Relayer } from '.' -import { ProviderRelayer, ProviderRelayerOptions } from './provider-relayer' -import { commons } from '@0xsequence/core' - -export type LocalRelayerOptions = Omit & { - signer: ethers.Signer -} - -export function isLocalRelayerOptions(obj: any): obj is LocalRelayerOptions { - return typeof obj === 'object' && isAbstractSigner(obj.signer) -} - -export class LocalRelayer extends ProviderRelayer implements Relayer { - private signer: ethers.Signer - private txnOptions: ethers.TransactionRequest - - constructor(options: LocalRelayerOptions | ethers.AbstractSigner) { - super(isAbstractSigner(options) ? { provider: options.provider! } : { ...options, provider: options.signer.provider! }) - this.signer = isAbstractSigner(options) ? options : options.signer - if (!this.signer.provider) throw new Error('Signer must have a provider') - } - - async getFeeOptions(_address: string, ..._transactions: commons.transaction.Transaction[]): Promise<{ options: FeeOption[] }> { - return { options: [] } - } - - async getFeeOptionsRaw( - _entrypoint: string, - _data: ethers.BytesLike, - _options?: { - simulate?: boolean - } - ): Promise<{ options: FeeOption[] }> { - return { options: [] } - } - - async gasRefundOptions(address: string, ...transactions: commons.transaction.Transaction[]): Promise { - const { options } = await this.getFeeOptions(address, ...transactions) - return options - } - - setTransactionOptions(transactionRequest: ethers.TransactionRequest) { - this.txnOptions = transactionRequest - } - - async relay( - signedTxs: commons.transaction.IntendedTransactionBundle, - quote?: FeeQuote, - waitForReceipt: boolean = true - ): Promise> { - if (quote !== undefined) { - logger.warn(`LocalRelayer doesn't accept fee quotes`) - } - - const data = commons.transaction.encodeBundleExecData(signedTxs) - - // TODO: think about computing gas limit individually, summing together and passing across - // NOTE: we expect that all txns have set their gasLimit ahead of time through proper estimation - // const gasLimit = signedTxs.transactions.reduce((sum, tx) => sum + tx.gasLimit, 0n) - // txRequest.gasLimit = gasLimit - - const responsePromise = this.signer.sendTransaction({ - to: signedTxs.entrypoint, - data, - ...this.txnOptions, - gasLimit: 9000000 - }) - - if (waitForReceipt) { - const response: commons.transaction.TransactionResponse = await responsePromise - response.receipt = await response.wait() - return response - } else { - return responsePromise - } - } - - async getMetaTransactions( - projectId: number, - page?: proto.Page - ): Promise<{ - page: proto.Page - transactions: proto.MetaTxnLog[] - }> { - return { page: { page: 0, pageSize: 100 }, transactions: [] } - } - - async getTransactionCost( - projectId: number, - from: string, - to: string - ): Promise<{ - cost: number - }> { - return { cost: 0 } - } - - async listGasSponsors(args: proto.ListGasSponsorsArgs): Promise { - return { page: { page: 0, pageSize: 100 }, gasSponsors: [] } - } - - async addGasSponsor(args: proto.AddGasSponsorArgs): Promise { - return { status: true, gasSponsor: {} as proto.GasSponsor } - } - - async updateGasSponsor(args: proto.UpdateGasSponsorArgs): Promise { - return { status: true, gasSponsor: {} as proto.GasSponsor } - } - - async removeGasSponsor(args: proto.RemoveGasSponsorArgs): Promise { - return { status: true } - } -} - -function isAbstractSigner(signer: any): signer is ethers.AbstractSigner { - return ( - signer && - typeof signer === 'object' && - typeof signer.provider === 'object' && - typeof signer.getAddress === 'function' && - typeof signer.connect === 'function' - ) -} diff --git a/old/packages/relayer/src/provider-relayer.ts b/old/packages/relayer/src/provider-relayer.ts deleted file mode 100644 index 3d82139ca..000000000 --- a/old/packages/relayer/src/provider-relayer.ts +++ /dev/null @@ -1,284 +0,0 @@ -import { ethers } from 'ethers' -import { walletContracts } from '@0xsequence/abi' -import { FeeOption, FeeQuote, proto, Relayer, SimulateResult } from '.' -import { logger, Optionals } from '@0xsequence/utils' -import { commons } from '@0xsequence/core' - -const DEFAULT_GAS_LIMIT = 800000n - -export interface ProviderRelayerOptions { - provider: ethers.Provider - waitPollRate?: number - deltaBlocksLog?: number - fromBlockLog?: number -} - -export const ProviderRelayerDefaults: Required> = { - waitPollRate: 1000, - deltaBlocksLog: 12, - fromBlockLog: -1024 -} - -export function isProviderRelayerOptions(obj: any): obj is ProviderRelayerOptions { - return typeof obj === 'object' && isAbstractProvider(obj.provider) -} - -export abstract class ProviderRelayer implements Relayer { - public provider: ethers.Provider - public waitPollRate: number - public deltaBlocksLog: number - public fromBlockLog: number - - constructor(options: ProviderRelayerOptions) { - const opts = { ...ProviderRelayerDefaults, ...options } - - this.provider = opts.provider - this.waitPollRate = opts.waitPollRate - this.deltaBlocksLog = opts.deltaBlocksLog - this.fromBlockLog = opts.fromBlockLog - } - - abstract getFeeOptions( - address: string, - ...transactions: commons.transaction.Transaction[] - ): Promise<{ options: FeeOption[]; quote?: FeeQuote }> - - abstract getFeeOptionsRaw( - entrypoint: string, - data: ethers.BytesLike, - options?: { - simulate?: boolean - } - ): Promise<{ options: FeeOption[]; quote?: FeeQuote }> - - abstract gasRefundOptions(address: string, ...transactions: commons.transaction.Transaction[]): Promise - - abstract relay( - signedTxs: commons.transaction.IntendedTransactionBundle, - quote?: FeeQuote, - waitForReceipt?: boolean - ): Promise - - abstract getTransactionCost( - projectId: number, - from: string, - to: string - ): Promise<{ - cost: number - }> - - abstract getMetaTransactions( - projectId: number, - page?: proto.Page - ): Promise<{ - page: proto.Page - transactions: proto.MetaTxnLog[] - }> - - abstract listGasSponsors(args: proto.ListGasSponsorsArgs): Promise - - abstract addGasSponsor(args: proto.AddGasSponsorArgs): Promise - - abstract updateGasSponsor(args: proto.UpdateGasSponsorArgs): Promise - - abstract removeGasSponsor(args: proto.RemoveGasSponsorArgs): Promise - - async simulate(wallet: string, ...transactions: commons.transaction.Transaction[]): Promise { - return ( - await Promise.all( - transactions.map(async tx => { - // Respect gasLimit request of the transaction (as long as its not 0) - if (tx.gasLimit && BigInt(tx.gasLimit || 0) !== 0n) { - return tx.gasLimit - } - - // Fee can't be estimated locally for delegateCalls - if (tx.delegateCall) { - return DEFAULT_GAS_LIMIT - } - - // Fee can't be estimated for self-called if wallet hasn't been deployed - if (tx.to === wallet && (await this.provider.getCode(wallet).then(code => ethers.getBytes(code).length === 0))) { - return DEFAULT_GAS_LIMIT - } - - if (!this.provider) { - throw new Error('signer.provider is not set, but is required') - } - - // TODO: If the wallet address has been deployed, gas limits can be - // estimated with more accurately by using self-calls with the batch transactions one by one - return this.provider.estimateGas({ - from: wallet, - to: tx.to, - data: tx.data, - value: tx.value - }) - }) - ) - ).map(gasLimit => ({ - executed: true, - succeeded: true, - gasUsed: Number(gasLimit), - gasLimit: Number(gasLimit) - })) - } - - async getNonce(address: string, space?: ethers.BigNumberish, blockTag?: ethers.BlockTag): Promise { - if (!this.provider) { - throw new Error('provider is not set') - } - - if ((await this.provider.getCode(address)) === '0x') { - return 0 - } - - if (space === undefined) { - space = 0 - } - - const module = new ethers.Contract(address, walletContracts.mainModule.abi, this.provider) - const nonce = await module.readNonce(space, { blockTag: blockTag }) - return commons.transaction.encodeNonce(space, nonce) - } - - async wait( - metaTxnId: string | commons.transaction.SignedTransactionBundle, - timeoutDuration?: number, - delay: number = this.waitPollRate, - maxFails: number = 5 - ): Promise { - if (typeof metaTxnId !== 'string') { - metaTxnId = commons.transaction.intendedTransactionID(metaTxnId) - } - - let timedOut = false - - const retry = async (f: () => Promise, errorMessage: string): Promise => { - let fails = 0 - - while (!timedOut) { - try { - return await f() - } catch (error) { - fails++ - - if (maxFails !== undefined && fails >= maxFails) { - logger.error(`giving up after ${fails} failed attempts${errorMessage ? `: ${errorMessage}` : ''}`, error) - throw error - } else { - logger.warn(`attempt #${fails} failed${errorMessage ? `: ${errorMessage}` : ''}`, error) - } - } - - if (delay > 0) { - await new Promise(resolve => setTimeout(resolve, delay)) - } - } - - throw new Error(`timed out after ${fails} failed attempts${errorMessage ? `: ${errorMessage}` : ''}`) - } - - const waitReceipt = async (): Promise => { - // Transactions can only get executed on nonce change - // get all nonce changes and look for metaTxnIds in between logs - let lastBlock: number = this.fromBlockLog - - if (lastBlock < 0) { - const block = await retry(() => this.provider.getBlockNumber(), 'unable to get latest block number') - lastBlock = block + lastBlock - } - - if (typeof metaTxnId !== 'string') { - throw new Error('impossible') - } - - const normalMetaTxnId = metaTxnId.replace('0x', '') - - while (!timedOut) { - const block = await retry(() => this.provider.getBlockNumber(), 'unable to get latest block number') - - const logs = await retry( - () => - this.provider.getLogs({ - fromBlock: Math.max(0, lastBlock - this.deltaBlocksLog), - toBlock: block, - // Nonce change event topic - topics: ['0x1f180c27086c7a39ea2a7b25239d1ab92348f07ca7bb59d1438fcf527568f881'] - }), - `unable to get NonceChange logs for blocks ${Math.max(0, lastBlock - this.deltaBlocksLog)} to ${block}` - ) - - lastBlock = block - - // Get receipts of all transactions - const txs = await Promise.all( - logs.map(l => - retry( - () => this.provider.getTransactionReceipt(l.transactionHash), - `unable to get receipt for transaction ${l.transactionHash}` - ) - ) - ) - - // Find a transaction with a TxExecuted log - const found = txs.find(tx => - tx?.logs.find( - l => - (l.topics.length === 0 && l.data.replace('0x', '') === normalMetaTxnId) || - (l.topics.length === 1 && - // TxFailed event topic - l.topics[0] === '0x3dbd1590ea96dd3253a91f24e64e3a502e1225d602a5731357bc12643070ccd7' && - l.data.length >= 64 && - l.data.replace('0x', '').startsWith(normalMetaTxnId)) - ) - ) - - // If found return that - if (found) { - const response = await retry(() => this.provider.getTransaction(found.hash), `unable to get transaction ${found.hash}`) - if (!response) { - throw new Error(`Transaction response not found for ${metaTxnId}`) - } - - // NOTE: we have to do this, because ethers-v6 uses private fields - // and we can't just extend the class and override the method, so - // we just modify the response object directly by adding the receipt to it. - const out: any = response - out.receipt = found - return out - } - - // Otherwise wait and try again - if (!timedOut) { - await new Promise(r => setTimeout(r, delay)) - } - } - - throw new Error(`Timeout waiting for transaction receipt ${metaTxnId}`) - } - - if (timeoutDuration !== undefined) { - return Promise.race([ - waitReceipt(), - new Promise((_, reject) => - setTimeout(() => { - timedOut = true - reject(`Timeout waiting for transaction receipt ${metaTxnId}`) - }, timeoutDuration) - ) - ]) - } else { - return waitReceipt() - } - } -} - -function isAbstractProvider(provider: any): provider is ethers.AbstractProvider { - return ( - provider && - typeof provider === 'object' && - typeof provider.getNetwork === 'function' && - typeof provider.getBlockNumber === 'function' - ) -} diff --git a/old/packages/relayer/src/rpc-relayer/index.ts b/old/packages/relayer/src/rpc-relayer/index.ts deleted file mode 100644 index a5172ceaf..000000000 --- a/old/packages/relayer/src/rpc-relayer/index.ts +++ /dev/null @@ -1,380 +0,0 @@ -import { ethers } from 'ethers' -import { FeeOption, FeeQuote, Relayer, SimulateResult } from '..' -import * as proto from './relayer.gen' -import { commons } from '@0xsequence/core' -import { bigintReplacer, getFetchRequest, logger, toHexString } from '@0xsequence/utils' - -export { proto } - -const FINAL_STATUSES = [ - proto.ETHTxnStatus.DROPPED, - proto.ETHTxnStatus.SUCCEEDED, - proto.ETHTxnStatus.PARTIALLY_FAILED, - proto.ETHTxnStatus.FAILED -] - -const FAILED_STATUSES = [proto.ETHTxnStatus.DROPPED, proto.ETHTxnStatus.PARTIALLY_FAILED, proto.ETHTxnStatus.FAILED] - -export interface RpcRelayerOptions { - provider: ethers.AbstractProvider | { url: string } - url: string - projectAccessKey?: string - jwtAuth?: string -} - -export function isRpcRelayerOptions(obj: any): obj is RpcRelayerOptions { - return obj.url !== undefined && typeof obj.url === 'string' && obj.provider !== undefined && isAbstractProvider(obj.provider) -} - -// TODO: rename to SequenceRelayer -export class RpcRelayer implements Relayer { - private readonly service: proto.Relayer - public readonly provider: ethers.Provider - - constructor(public options: RpcRelayerOptions) { - this.service = new proto.Relayer(options.url, this._fetch) - - if (isAbstractProvider(options.provider)) { - this.provider = options.provider - } else { - const { jwtAuth, projectAccessKey } = this.options - const fetchRequest = getFetchRequest(options.provider.url, projectAccessKey, jwtAuth) - this.provider = new ethers.JsonRpcProvider(fetchRequest, undefined, { staticNetwork: true }) - } - } - - _fetch = (input: RequestInfo, init?: RequestInit): Promise => { - // automatically include jwt and access key auth header to requests - // if its been set on the api client - const headers: { [key: string]: any } = {} - - const { jwtAuth, projectAccessKey } = this.options - - if (jwtAuth && jwtAuth.length > 0) { - headers['Authorization'] = `BEARER ${jwtAuth}` - } - - if (projectAccessKey && projectAccessKey.length > 0) { - headers['X-Access-Key'] = projectAccessKey - } - - // before the request is made - init!.headers = { ...headers, ...init!.headers } - - return fetch(input, init) - } - - async waitReceipt( - metaTxnId: string | commons.transaction.SignedTransactionBundle, - delay: number = 1000, - maxFails: number = 5, - isCancelled?: () => boolean - ): Promise { - if (typeof metaTxnId !== 'string') { - metaTxnId = commons.transaction.intendedTransactionID(metaTxnId) - } - - logger.info(`[rpc-relayer/waitReceipt] waiting for ${metaTxnId}`) - - let fails = 0 - - while (isCancelled === undefined || !isCancelled()) { - try { - const { receipt } = await this.service.getMetaTxnReceipt({ metaTxID: metaTxnId }) - - if ( - receipt && - receipt.txnReceipt && - receipt.txnReceipt !== 'null' && - FINAL_STATUSES.includes(receipt.status as proto.ETHTxnStatus) - ) { - return { receipt } - } - } catch (e) { - fails++ - - if (fails === maxFails) { - throw e - } - } - - if (isCancelled === undefined || !isCancelled()) { - await new Promise(resolve => setTimeout(resolve, delay)) - } - } - - throw new Error(`Cancelled waiting for transaction receipt ${metaTxnId}`) - } - - async simulate(wallet: string, ...transactions: commons.transaction.Transaction[]): Promise { - const coder = ethers.AbiCoder.defaultAbiCoder() - const encoded = coder.encode( - [commons.transaction.MetaTransactionsType], - [commons.transaction.sequenceTxAbiEncode(transactions)] - ) - return (await this.service.simulate({ wallet, transactions: encoded })).results - } - - async getFeeOptions( - address: string, - ...transactions: commons.transaction.Transaction[] - ): Promise<{ options: FeeOption[]; quote?: FeeQuote }> { - // NOTE/TODO: for a given `service` the feeTokens will not change between execution, so we should memoize this value - // for a short-period of time, perhaps for 1 day or in memory. Perhaps one day we can make this happen automatically - // with http cache response for this endpoint and service-worker.. lots of approaches - const feeTokens = await this.service.feeTokens() - - if (feeTokens.isFeeRequired) { - const symbols = feeTokens.tokens.map(token => token.symbol).join(', ') - logger.info(`[rpc-relayer/getFeeOptions] relayer fees are required, accepted tokens are ${symbols}`) - - const nonce = await this.getNonce(address) - - if (!this.provider) { - logger.warn(`[rpc-relayer/getFeeOptions] provider not set, needed for stub signature`) - throw new Error('provider is not set') - } - - const { options, quote } = await this.service.feeOptions({ - wallet: address, - to: address, - data: commons.transaction.encodeBundleExecData({ - entrypoint: address, - transactions, - nonce - }) - }) - - logger.info(`[rpc-relayer/getFeeOptions] got refund options ${JSON.stringify(options, bigintReplacer)}`) - return { options, quote: { _tag: 'FeeQuote', _quote: quote } } - } else { - logger.info(`[rpc-relayer/getFeeOptions] relayer fees are not required`) - return { options: [] } - } - } - - async getFeeOptionsRaw( - entrypoint: string, - data: ethers.BytesLike, - options?: { - simulate?: boolean - projectAccessKey?: string - } - ): Promise<{ options: FeeOption[]; quote?: FeeQuote }> { - const { options: feeOptions, quote } = await this.service.feeOptions( - { - wallet: entrypoint, - to: entrypoint, - data: ethers.hexlify(data), - simulate: options?.simulate - }, - { ...(options?.projectAccessKey ? { 'X-Access-Key': options.projectAccessKey } : undefined) } - ) - - return { options: feeOptions, quote: { _tag: 'FeeQuote', _quote: quote } } - } - - async gasRefundOptions(address: string, ...transactions: commons.transaction.Transaction[]): Promise { - const { options } = await this.getFeeOptions(address, ...transactions) - return options - } - - async getNonce(address: string, space?: ethers.BigNumberish): Promise { - logger.info(`[rpc-relayer/getNonce] get nonce for wallet ${address} space: ${space}`) - const encodedNonce = space !== undefined ? toHexString(BigInt(space)) : undefined - const resp = await this.service.getMetaTxnNonce({ walletContractAddress: address, space: encodedNonce }) - const nonce = BigInt(resp.nonce) - const [decodedSpace, decodedNonce] = commons.transaction.decodeNonce(nonce) - logger.info(`[rpc-relayer/getNonce] got next nonce for wallet ${address} ${decodedNonce} space: ${decodedSpace}`) - return nonce - } - - async relay( - signedTxs: commons.transaction.IntendedTransactionBundle, - quote?: FeeQuote, - waitForReceipt: boolean = true, - projectAccessKey?: string - ): Promise> { - logger.info( - `[rpc-relayer/relay] relaying signed meta-transactions ${JSON.stringify(signedTxs, bigintReplacer)} with quote ${JSON.stringify(quote, bigintReplacer)}` - ) - - let typecheckedQuote: string | undefined - if (quote !== undefined) { - if (typeof quote._quote === 'string') { - typecheckedQuote = quote._quote - } else { - logger.warn('[rpc-relayer/relay] ignoring invalid fee quote') - } - } - - if (!this.provider) { - logger.warn(`[rpc-relayer/relay] provider not set, failed relay`) - throw new Error('provider is not set') - } - - const data = commons.transaction.encodeBundleExecData(signedTxs) - const metaTxn = await this.service.sendMetaTxn( - { - call: { - walletAddress: signedTxs.intent.wallet, - contract: signedTxs.entrypoint, - input: data - }, - quote: typecheckedQuote - }, - { ...(projectAccessKey ? { 'X-Access-Key': projectAccessKey } : undefined) } - ) - - logger.info(`[rpc-relayer/relay] got relay result ${JSON.stringify(metaTxn, bigintReplacer)}`) - - if (waitForReceipt) { - return this.wait(signedTxs.intent.id) - } else { - const response = { - hash: signedTxs.intent.id, - confirmations: 0, - from: signedTxs.intent.wallet, - wait: (_confirmations?: number): Promise => Promise.reject(new Error('impossible')) - } - - const wait = async (confirmations?: number): Promise => { - if (!this.provider) { - throw new Error('cannot wait for receipt, relayer has no provider set') - } - - const waitResponse = await this.wait(signedTxs.intent.id) - const transactionHash = waitResponse.receipt?.transactionHash - - if (!transactionHash) { - throw new Error('cannot wait for receipt, unknown native transaction hash') - } - - Object.assign(response, waitResponse) - - return this.provider.waitForTransaction(transactionHash, confirmations) - } - - response.wait = wait - - // NOTE: we just ignore these errors which come from the private fields - // of ethers-v6 .. but, we should probably rework this instead.. - // @ts-ignore - return response as commons.transaction.TransactionResponse - } - } - - async wait( - metaTxnId: string | commons.transaction.SignedTransactionBundle, - timeout?: number, - delay: number = 1000, - maxFails: number = 5 - ): Promise> { - let timedOut = false - - const { receipt } = await (timeout !== undefined - ? Promise.race([ - this.waitReceipt(metaTxnId, delay, maxFails, () => timedOut), - new Promise((_, reject) => - setTimeout(() => { - timedOut = true - reject(`Timeout waiting for transaction receipt ${metaTxnId}`) - }, timeout) - ) - ]) - : this.waitReceipt(metaTxnId, delay, maxFails)) - - if (!receipt.txnReceipt || FAILED_STATUSES.includes(receipt.status as proto.ETHTxnStatus)) { - throw new MetaTransactionResponseException(receipt) - } - - const txReceipt = JSON.parse(receipt.txnReceipt) as RelayerTxReceipt - - // NOTE: we just ignore these errors which come from the private fields - // of ethers-v6 .. but, we should probably rework this instead.. - // @ts-ignore - return { - blockHash: txReceipt.blockHash, - blockNumber: Number(txReceipt.blockNumber), - confirmations: 1, - from: typeof metaTxnId === 'string' ? undefined : metaTxnId.intent.wallet, - hash: txReceipt.transactionHash, - raw: receipt.txnReceipt, - receipt: txReceipt, // extended type which is Sequence-specific. Contains the decoded metaTxReceipt - wait: async (confirmations?: number) => this.provider!.waitForTransaction(txReceipt.transactionHash, confirmations) - } as commons.transaction.TransactionResponse - } - - async getMetaTransactions( - projectId: number, - page?: proto.Page - ): Promise<{ - page: proto.Page - transactions: proto.MetaTxnLog[] - }> { - return this.service.getMetaTransactions({ projectId, page }) - } - - async getTransactionCost( - projectId: number, - from: string, - to: string - ): Promise<{ - cost: number - }> { - return this.service.getTransactionCost({ projectId, from, to }) - } - - async listGasSponsors(args: proto.ListGasSponsorsArgs): Promise { - return this.service.listGasSponsors(args) - } - - async addGasSponsor(args: proto.AddGasSponsorArgs): Promise { - return this.service.addGasSponsor(args) - } - - async updateGasSponsor(args: proto.UpdateGasSponsorArgs): Promise { - return this.service.updateGasSponsor(args) - } - - async removeGasSponsor(args: proto.RemoveGasSponsorArgs): Promise { - return this.service.removeGasSponsor(args) - } -} - -class MetaTransactionResponseException { - constructor(public receipt: proto.MetaTxnReceipt) {} -} - -export type RelayerTxReceipt = { - blockHash: string - blockNumber: string - contractAddress: string - cumulativeGasUsed: string - gasUsed: string - logs: { - address: string - blockHash: string - blockNumber: string - data: string - logIndex: string - removed: boolean - topics: string[] - transactionHash: string - transactionIndex: string - }[] - logsBloom: string - root: string - status: string - transactionHash: string - transactionIndex: string -} - -function isAbstractProvider(provider: any): provider is ethers.AbstractProvider { - return ( - provider && - typeof provider === 'object' && - typeof provider.getNetwork === 'function' && - typeof provider.getBlockNumber === 'function' - ) -} diff --git a/old/packages/relayer/src/rpc-relayer/relayer.gen.ts b/old/packages/relayer/src/rpc-relayer/relayer.gen.ts deleted file mode 100644 index c01105444..000000000 --- a/old/packages/relayer/src/rpc-relayer/relayer.gen.ts +++ /dev/null @@ -1,1849 +0,0 @@ -/* eslint-disable */ -// sequence-relayer v0.4.1 da20208d66be29ad86d2662ca38c4425bc5910f8 -// -- -// Code generated by webrpc-gen@v0.24.0 with typescript generator. DO NOT EDIT. -// -// webrpc-gen -schema=relayer.ridl -target=typescript -client -out=./clients/relayer.gen.ts - -export const WebrpcHeader = 'Webrpc' - -export const WebrpcHeaderValue = 'webrpc@v0.24.0;gen-typescript@v0.16.3;sequence-relayer@v0.4.1' - -// WebRPC description and code-gen version -export const WebRPCVersion = 'v1' - -// Schema version of your RIDL schema -export const WebRPCSchemaVersion = 'v0.4.1' - -// Schema hash generated from your RIDL schema -export const WebRPCSchemaHash = 'da20208d66be29ad86d2662ca38c4425bc5910f8' - -type WebrpcGenVersions = { - webrpcGenVersion: string - codeGenName: string - codeGenVersion: string - schemaName: string - schemaVersion: string -} - -export function VersionFromHeader(headers: Headers): WebrpcGenVersions { - const headerValue = headers.get(WebrpcHeader) - if (!headerValue) { - return { - webrpcGenVersion: '', - codeGenName: '', - codeGenVersion: '', - schemaName: '', - schemaVersion: '' - } - } - - return parseWebrpcGenVersions(headerValue) -} - -function parseWebrpcGenVersions(header: string): WebrpcGenVersions { - const versions = header.split(';') - if (versions.length < 3) { - return { - webrpcGenVersion: '', - codeGenName: '', - codeGenVersion: '', - schemaName: '', - schemaVersion: '' - } - } - - const [_, webrpcGenVersion] = versions[0]!.split('@') - const [codeGenName, codeGenVersion] = versions[1]!.split('@') - const [schemaName, schemaVersion] = versions[2]!.split('@') - - return { - webrpcGenVersion: webrpcGenVersion ?? '', - codeGenName: codeGenName ?? '', - codeGenVersion: codeGenVersion ?? '', - schemaName: schemaName ?? '', - schemaVersion: schemaVersion ?? '' - } -} - -// -// Types -// - -export enum ETHTxnStatus { - UNKNOWN = 'UNKNOWN', - DROPPED = 'DROPPED', - QUEUED = 'QUEUED', - SENT = 'SENT', - SUCCEEDED = 'SUCCEEDED', - PARTIALLY_FAILED = 'PARTIALLY_FAILED', - FAILED = 'FAILED' -} - -export enum TransferType { - SEND = 'SEND', - RECEIVE = 'RECEIVE', - BRIDGE_DEPOSIT = 'BRIDGE_DEPOSIT', - BRIDGE_WITHDRAW = 'BRIDGE_WITHDRAW', - BURN = 'BURN', - UNKNOWN = 'UNKNOWN' -} - -export enum FeeTokenType { - UNKNOWN = 'UNKNOWN', - ERC20_TOKEN = 'ERC20_TOKEN', - ERC1155_TOKEN = 'ERC1155_TOKEN' -} - -export enum SortOrder { - DESC = 'DESC', - ASC = 'ASC' -} - -export interface Version { - webrpcVersion: string - schemaVersion: string - schemaHash: string - appVersion: string -} - -export interface RuntimeStatus { - healthOK: boolean - startTime: string - uptime: number - ver: string - branch: string - commitHash: string - chainID: number - useEIP1559: boolean - senders: Array - checks: RuntimeChecks -} - -export interface SenderStatus { - index: number - address: string - etherBalance: number - active: boolean -} - -export interface RuntimeChecks {} - -export interface SequenceContext { - factory: string - mainModule: string - mainModuleUpgradable: string - guestModule: string - utils: string -} - -export interface GasTank { - id: number - chainId: number - name: string - currentBalance: number - unlimited: boolean - feeMarkupFactor: number - updatedAt: string - createdAt: string -} - -export interface GasTankBalanceAdjustment { - gasTankId: number - nonce: number - amount: number - totalBalance: number - balanceTimestamp: string - createdAt: string -} - -export interface GasSponsor { - id: number - gasTankId: number - projectId: number - chainId: number - address: string - name: string - active: boolean - updatedAt: string - createdAt: string - deletedAt: string -} - -export interface GasSponsorUsage { - name: string - id: number - totalGasUsed: number - totalTxnFees: number - totalTxnFeesUsd: number - avgGasPrice: number - totalTxns: number - startTime: string - endTime: string -} - -export interface MetaTxn { - walletAddress: string - contract: string - input: string -} - -export interface MetaTxnLog { - id: number - chainId: number - projectId: number - txnHash: string - txnNonce: string - metaTxnID?: string - txnStatus: ETHTxnStatus - txnRevertReason: string - requeues: number - queuedAt: string - sentAt: string - minedAt: string - target: string - input: string - txnArgs: { [key: string]: any } - txnReceipt?: { [key: string]: any } - walletAddress: string - metaTxnNonce: string - gasLimit: number - gasPrice: string - gasUsed: number - gasEstimated: number - gasFeeMarkup?: number - usdRate: string - creditsUsed: number - cost: string - isWhitelisted: boolean - gasSponsor?: number - gasTank?: number - updatedAt: string - createdAt: string -} - -export interface MetaTxnReceipt { - id: string - status: string - revertReason?: string - index: number - logs: Array - receipts: Array - txnReceipt: string -} - -export interface MetaTxnReceiptLog { - address: string - topics: Array - data: string -} - -export interface Transaction { - txnHash?: string - blockNumber: number - chainId: number - metaTxnID?: string - transfers?: Array - users?: { [key: string]: TxnLogUser } - timestamp: string -} - -export interface TxnLogUser { - username: string -} - -export interface TxnLogTransfer { - transferType: TransferType - contractAddress: string - from: string - to: string - ids: Array - amounts: Array -} - -export interface SentTransactionsFilter { - pending?: boolean - failed?: boolean -} - -export interface SimulateResult { - executed: boolean - succeeded: boolean - result?: string - reason?: string - gasUsed: number - gasLimit: number -} - -export interface FeeOption { - token: FeeToken - to: string - value: string - gasLimit: number -} - -export interface FeeToken { - chainId: number - name: string - symbol: string - type: FeeTokenType - decimals?: number - logoURL: string - contractAddress?: string - tokenID?: string -} - -export interface Page { - pageSize?: number - page?: number - more?: boolean - totalRecords?: number - column?: string - before?: any - after?: any - sort?: Array -} - -export interface SortBy { - column: string - order: SortOrder -} - -export interface Relayer { - ping(headers?: object, signal?: AbortSignal): Promise - version(headers?: object, signal?: AbortSignal): Promise - runtimeStatus(headers?: object, signal?: AbortSignal): Promise - getSequenceContext(headers?: object, signal?: AbortSignal): Promise - getChainID(headers?: object, signal?: AbortSignal): Promise - sendMetaTxn(args: SendMetaTxnArgs, headers?: object, signal?: AbortSignal): Promise - getMetaTxnNonce(args: GetMetaTxnNonceArgs, headers?: object, signal?: AbortSignal): Promise - getMetaTxnReceipt(args: GetMetaTxnReceiptArgs, headers?: object, signal?: AbortSignal): Promise - simulate(args: SimulateArgs, headers?: object, signal?: AbortSignal): Promise - updateMetaTxnGasLimits( - args: UpdateMetaTxnGasLimitsArgs, - headers?: object, - signal?: AbortSignal - ): Promise - feeTokens(headers?: object, signal?: AbortSignal): Promise - feeOptions(args: FeeOptionsArgs, headers?: object, signal?: AbortSignal): Promise - getMetaTxnNetworkFeeOptions( - args: GetMetaTxnNetworkFeeOptionsArgs, - headers?: object, - signal?: AbortSignal - ): Promise - getMetaTransactions(args: GetMetaTransactionsArgs, headers?: object, signal?: AbortSignal): Promise - getTransactionCost(args: GetTransactionCostArgs, headers?: object, signal?: AbortSignal): Promise - sentTransactions(args: SentTransactionsArgs, headers?: object, signal?: AbortSignal): Promise - pendingTransactions(args: PendingTransactionsArgs, headers?: object, signal?: AbortSignal): Promise - getGasTank(args: GetGasTankArgs, headers?: object, signal?: AbortSignal): Promise - addGasTank(args: AddGasTankArgs, headers?: object, signal?: AbortSignal): Promise - updateGasTank(args: UpdateGasTankArgs, headers?: object, signal?: AbortSignal): Promise - nextGasTankBalanceAdjustmentNonce( - args: NextGasTankBalanceAdjustmentNonceArgs, - headers?: object, - signal?: AbortSignal - ): Promise - adjustGasTankBalance( - args: AdjustGasTankBalanceArgs, - headers?: object, - signal?: AbortSignal - ): Promise - getGasTankBalanceAdjustment( - args: GetGasTankBalanceAdjustmentArgs, - headers?: object, - signal?: AbortSignal - ): Promise - listGasTankBalanceAdjustments( - args: ListGasTankBalanceAdjustmentsArgs, - headers?: object, - signal?: AbortSignal - ): Promise - listGasSponsors(args: ListGasSponsorsArgs, headers?: object, signal?: AbortSignal): Promise - getGasSponsor(args: GetGasSponsorArgs, headers?: object, signal?: AbortSignal): Promise - addGasSponsor(args: AddGasSponsorArgs, headers?: object, signal?: AbortSignal): Promise - updateGasSponsor(args: UpdateGasSponsorArgs, headers?: object, signal?: AbortSignal): Promise - removeGasSponsor(args: RemoveGasSponsorArgs, headers?: object, signal?: AbortSignal): Promise - addressGasSponsors(args: AddressGasSponsorsArgs, headers?: object, signal?: AbortSignal): Promise - getProjectBalance(args: GetProjectBalanceArgs, headers?: object, signal?: AbortSignal): Promise - adjustProjectBalance( - args: AdjustProjectBalanceArgs, - headers?: object, - signal?: AbortSignal - ): Promise -} - -export interface PingArgs {} - -export interface PingReturn { - status: boolean -} -export interface VersionArgs {} - -export interface VersionReturn { - version: Version -} -export interface RuntimeStatusArgs {} - -export interface RuntimeStatusReturn { - status: RuntimeStatus -} -export interface GetSequenceContextArgs {} - -export interface GetSequenceContextReturn { - data: SequenceContext -} -export interface GetChainIDArgs {} - -export interface GetChainIDReturn { - chainID: number -} -export interface SendMetaTxnArgs { - call: MetaTxn - quote?: string - projectID?: number -} - -export interface SendMetaTxnReturn { - status: boolean - txnHash: string -} -export interface GetMetaTxnNonceArgs { - walletContractAddress: string - space?: string -} - -export interface GetMetaTxnNonceReturn { - nonce: string -} -export interface GetMetaTxnReceiptArgs { - metaTxID: string -} - -export interface GetMetaTxnReceiptReturn { - receipt: MetaTxnReceipt -} -export interface SimulateArgs { - wallet: string - transactions: string -} - -export interface SimulateReturn { - results: Array -} -export interface UpdateMetaTxnGasLimitsArgs { - walletAddress: string - walletConfig: any - payload: string -} - -export interface UpdateMetaTxnGasLimitsReturn { - payload: string -} -export interface FeeTokensArgs {} - -export interface FeeTokensReturn { - isFeeRequired: boolean - tokens: Array -} -export interface FeeOptionsArgs { - wallet: string - to: string - data: string - simulate?: boolean -} - -export interface FeeOptionsReturn { - options: Array - sponsored: boolean - quote?: string -} -export interface GetMetaTxnNetworkFeeOptionsArgs { - walletConfig: any - payload: string -} - -export interface GetMetaTxnNetworkFeeOptionsReturn { - options: Array -} -export interface GetMetaTransactionsArgs { - projectId: number - page?: Page -} - -export interface GetMetaTransactionsReturn { - page: Page - transactions: Array -} -export interface GetTransactionCostArgs { - projectId: number - from: string - to: string -} - -export interface GetTransactionCostReturn { - cost: number -} -export interface SentTransactionsArgs { - filter?: SentTransactionsFilter - page?: Page -} - -export interface SentTransactionsReturn { - page: Page - transactions: Array -} -export interface PendingTransactionsArgs { - page?: Page -} - -export interface PendingTransactionsReturn { - page: Page - transactions: Array -} -export interface GetGasTankArgs { - id: number -} - -export interface GetGasTankReturn { - gasTank: GasTank -} -export interface AddGasTankArgs { - name: string - feeMarkupFactor: number - unlimited?: boolean -} - -export interface AddGasTankReturn { - status: boolean - gasTank: GasTank -} -export interface UpdateGasTankArgs { - id: number - name?: string - feeMarkupFactor?: number - unlimited?: boolean -} - -export interface UpdateGasTankReturn { - status: boolean - gasTank: GasTank -} -export interface NextGasTankBalanceAdjustmentNonceArgs { - id: number -} - -export interface NextGasTankBalanceAdjustmentNonceReturn { - nonce: number -} -export interface AdjustGasTankBalanceArgs { - id: number - nonce: number - amount: number -} - -export interface AdjustGasTankBalanceReturn { - status: boolean - adjustment: GasTankBalanceAdjustment -} -export interface GetGasTankBalanceAdjustmentArgs { - id: number - nonce: number -} - -export interface GetGasTankBalanceAdjustmentReturn { - adjustment: GasTankBalanceAdjustment -} -export interface ListGasTankBalanceAdjustmentsArgs { - id: number - page?: Page -} - -export interface ListGasTankBalanceAdjustmentsReturn { - page: Page - adjustments: Array -} -export interface ListGasSponsorsArgs { - projectId: number - page?: Page -} - -export interface ListGasSponsorsReturn { - page: Page - gasSponsors: Array -} -export interface GetGasSponsorArgs { - projectId: number - id: number -} - -export interface GetGasSponsorReturn { - gasSponsor: GasSponsor -} -export interface AddGasSponsorArgs { - projectId: number - address: string - name?: string - active?: boolean -} - -export interface AddGasSponsorReturn { - status: boolean - gasSponsor: GasSponsor -} -export interface UpdateGasSponsorArgs { - projectId: number - id: number - name?: string - active?: boolean -} - -export interface UpdateGasSponsorReturn { - status: boolean - gasSponsor: GasSponsor -} -export interface RemoveGasSponsorArgs { - projectId: number - id: number -} - -export interface RemoveGasSponsorReturn { - status: boolean -} -export interface AddressGasSponsorsArgs { - address: string - page?: Page -} - -export interface AddressGasSponsorsReturn { - page: Page - gasSponsors: Array -} -export interface GetProjectBalanceArgs { - projectId: number -} - -export interface GetProjectBalanceReturn { - balance: number -} -export interface AdjustProjectBalanceArgs { - projectId: number - amount: number - identifier: string -} - -export interface AdjustProjectBalanceReturn { - balance: number -} - -// -// Client -// -export class Relayer implements Relayer { - protected hostname: string - protected fetch: Fetch - protected path = '/rpc/Relayer/' - - constructor(hostname: string, fetch: Fetch) { - this.hostname = hostname.replace(/\/*$/, '') - this.fetch = (input: RequestInfo, init?: RequestInit) => fetch(input, init) - } - - private url(name: string): string { - return this.hostname + this.path + name - } - - ping = (headers?: object, signal?: AbortSignal): Promise => { - return this.fetch(this.url('Ping'), createHTTPRequest({}, headers, signal)).then( - res => { - return buildResponse(res).then(_data => { - return { - status: _data.status - } - }) - }, - error => { - throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) - } - ) - } - - version = (headers?: object, signal?: AbortSignal): Promise => { - return this.fetch(this.url('Version'), createHTTPRequest({}, headers, signal)).then( - res => { - return buildResponse(res).then(_data => { - return { - version: _data.version - } - }) - }, - error => { - throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) - } - ) - } - - runtimeStatus = (headers?: object, signal?: AbortSignal): Promise => { - return this.fetch(this.url('RuntimeStatus'), createHTTPRequest({}, headers, signal)).then( - res => { - return buildResponse(res).then(_data => { - return { - status: _data.status - } - }) - }, - error => { - throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) - } - ) - } - - getSequenceContext = (headers?: object, signal?: AbortSignal): Promise => { - return this.fetch(this.url('GetSequenceContext'), createHTTPRequest({}, headers, signal)).then( - res => { - return buildResponse(res).then(_data => { - return { - data: _data.data - } - }) - }, - error => { - throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) - } - ) - } - - getChainID = (headers?: object, signal?: AbortSignal): Promise => { - return this.fetch(this.url('GetChainID'), createHTTPRequest({}, headers, signal)).then( - res => { - return buildResponse(res).then(_data => { - return { - chainID: _data.chainID - } - }) - }, - error => { - throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) - } - ) - } - - sendMetaTxn = (args: SendMetaTxnArgs, headers?: object, signal?: AbortSignal): Promise => { - return this.fetch(this.url('SendMetaTxn'), createHTTPRequest(args, headers, signal)).then( - res => { - return buildResponse(res).then(_data => { - return { - status: _data.status, - txnHash: _data.txnHash - } - }) - }, - error => { - throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) - } - ) - } - - getMetaTxnNonce = (args: GetMetaTxnNonceArgs, headers?: object, signal?: AbortSignal): Promise => { - return this.fetch(this.url('GetMetaTxnNonce'), createHTTPRequest(args, headers, signal)).then( - res => { - return buildResponse(res).then(_data => { - return { - nonce: _data.nonce - } - }) - }, - error => { - throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) - } - ) - } - - getMetaTxnReceipt = (args: GetMetaTxnReceiptArgs, headers?: object, signal?: AbortSignal): Promise => { - return this.fetch(this.url('GetMetaTxnReceipt'), createHTTPRequest(args, headers, signal)).then( - res => { - return buildResponse(res).then(_data => { - return { - receipt: _data.receipt - } - }) - }, - error => { - throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) - } - ) - } - - simulate = (args: SimulateArgs, headers?: object, signal?: AbortSignal): Promise => { - return this.fetch(this.url('Simulate'), createHTTPRequest(args, headers, signal)).then( - res => { - return buildResponse(res).then(_data => { - return { - results: >_data.results - } - }) - }, - error => { - throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) - } - ) - } - - updateMetaTxnGasLimits = ( - args: UpdateMetaTxnGasLimitsArgs, - headers?: object, - signal?: AbortSignal - ): Promise => { - return this.fetch(this.url('UpdateMetaTxnGasLimits'), createHTTPRequest(args, headers, signal)).then( - res => { - return buildResponse(res).then(_data => { - return { - payload: _data.payload - } - }) - }, - error => { - throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) - } - ) - } - - feeTokens = (headers?: object, signal?: AbortSignal): Promise => { - return this.fetch(this.url('FeeTokens'), createHTTPRequest({}, headers, signal)).then( - res => { - return buildResponse(res).then(_data => { - return { - isFeeRequired: _data.isFeeRequired, - tokens: >_data.tokens - } - }) - }, - error => { - throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) - } - ) - } - - feeOptions = (args: FeeOptionsArgs, headers?: object, signal?: AbortSignal): Promise => { - return this.fetch(this.url('FeeOptions'), createHTTPRequest(args, headers, signal)).then( - res => { - return buildResponse(res).then(_data => { - return { - options: >_data.options, - sponsored: _data.sponsored, - quote: _data.quote - } - }) - }, - error => { - throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) - } - ) - } - - getMetaTxnNetworkFeeOptions = ( - args: GetMetaTxnNetworkFeeOptionsArgs, - headers?: object, - signal?: AbortSignal - ): Promise => { - return this.fetch(this.url('GetMetaTxnNetworkFeeOptions'), createHTTPRequest(args, headers, signal)).then( - res => { - return buildResponse(res).then(_data => { - return { - options: >_data.options - } - }) - }, - error => { - throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) - } - ) - } - - getMetaTransactions = ( - args: GetMetaTransactionsArgs, - headers?: object, - signal?: AbortSignal - ): Promise => { - return this.fetch(this.url('GetMetaTransactions'), createHTTPRequest(args, headers, signal)).then( - res => { - return buildResponse(res).then(_data => { - return { - page: _data.page, - transactions: >_data.transactions - } - }) - }, - error => { - throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) - } - ) - } - - getTransactionCost = ( - args: GetTransactionCostArgs, - headers?: object, - signal?: AbortSignal - ): Promise => { - return this.fetch(this.url('GetTransactionCost'), createHTTPRequest(args, headers, signal)).then( - res => { - return buildResponse(res).then(_data => { - return { - cost: _data.cost - } - }) - }, - error => { - throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) - } - ) - } - - sentTransactions = (args: SentTransactionsArgs, headers?: object, signal?: AbortSignal): Promise => { - return this.fetch(this.url('SentTransactions'), createHTTPRequest(args, headers, signal)).then( - res => { - return buildResponse(res).then(_data => { - return { - page: _data.page, - transactions: >_data.transactions - } - }) - }, - error => { - throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) - } - ) - } - - pendingTransactions = ( - args: PendingTransactionsArgs, - headers?: object, - signal?: AbortSignal - ): Promise => { - return this.fetch(this.url('PendingTransactions'), createHTTPRequest(args, headers, signal)).then( - res => { - return buildResponse(res).then(_data => { - return { - page: _data.page, - transactions: >_data.transactions - } - }) - }, - error => { - throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) - } - ) - } - - getGasTank = (args: GetGasTankArgs, headers?: object, signal?: AbortSignal): Promise => { - return this.fetch(this.url('GetGasTank'), createHTTPRequest(args, headers, signal)).then( - res => { - return buildResponse(res).then(_data => { - return { - gasTank: _data.gasTank - } - }) - }, - error => { - throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) - } - ) - } - - addGasTank = (args: AddGasTankArgs, headers?: object, signal?: AbortSignal): Promise => { - return this.fetch(this.url('AddGasTank'), createHTTPRequest(args, headers, signal)).then( - res => { - return buildResponse(res).then(_data => { - return { - status: _data.status, - gasTank: _data.gasTank - } - }) - }, - error => { - throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) - } - ) - } - - updateGasTank = (args: UpdateGasTankArgs, headers?: object, signal?: AbortSignal): Promise => { - return this.fetch(this.url('UpdateGasTank'), createHTTPRequest(args, headers, signal)).then( - res => { - return buildResponse(res).then(_data => { - return { - status: _data.status, - gasTank: _data.gasTank - } - }) - }, - error => { - throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) - } - ) - } - - nextGasTankBalanceAdjustmentNonce = ( - args: NextGasTankBalanceAdjustmentNonceArgs, - headers?: object, - signal?: AbortSignal - ): Promise => { - return this.fetch(this.url('NextGasTankBalanceAdjustmentNonce'), createHTTPRequest(args, headers, signal)).then( - res => { - return buildResponse(res).then(_data => { - return { - nonce: _data.nonce - } - }) - }, - error => { - throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) - } - ) - } - - adjustGasTankBalance = ( - args: AdjustGasTankBalanceArgs, - headers?: object, - signal?: AbortSignal - ): Promise => { - return this.fetch(this.url('AdjustGasTankBalance'), createHTTPRequest(args, headers, signal)).then( - res => { - return buildResponse(res).then(_data => { - return { - status: _data.status, - adjustment: _data.adjustment - } - }) - }, - error => { - throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) - } - ) - } - - getGasTankBalanceAdjustment = ( - args: GetGasTankBalanceAdjustmentArgs, - headers?: object, - signal?: AbortSignal - ): Promise => { - return this.fetch(this.url('GetGasTankBalanceAdjustment'), createHTTPRequest(args, headers, signal)).then( - res => { - return buildResponse(res).then(_data => { - return { - adjustment: _data.adjustment - } - }) - }, - error => { - throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) - } - ) - } - - listGasTankBalanceAdjustments = ( - args: ListGasTankBalanceAdjustmentsArgs, - headers?: object, - signal?: AbortSignal - ): Promise => { - return this.fetch(this.url('ListGasTankBalanceAdjustments'), createHTTPRequest(args, headers, signal)).then( - res => { - return buildResponse(res).then(_data => { - return { - page: _data.page, - adjustments: >_data.adjustments - } - }) - }, - error => { - throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) - } - ) - } - - listGasSponsors = (args: ListGasSponsorsArgs, headers?: object, signal?: AbortSignal): Promise => { - return this.fetch(this.url('ListGasSponsors'), createHTTPRequest(args, headers, signal)).then( - res => { - return buildResponse(res).then(_data => { - return { - page: _data.page, - gasSponsors: >_data.gasSponsors - } - }) - }, - error => { - throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) - } - ) - } - - getGasSponsor = (args: GetGasSponsorArgs, headers?: object, signal?: AbortSignal): Promise => { - return this.fetch(this.url('GetGasSponsor'), createHTTPRequest(args, headers, signal)).then( - res => { - return buildResponse(res).then(_data => { - return { - gasSponsor: _data.gasSponsor - } - }) - }, - error => { - throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) - } - ) - } - - addGasSponsor = (args: AddGasSponsorArgs, headers?: object, signal?: AbortSignal): Promise => { - return this.fetch(this.url('AddGasSponsor'), createHTTPRequest(args, headers, signal)).then( - res => { - return buildResponse(res).then(_data => { - return { - status: _data.status, - gasSponsor: _data.gasSponsor - } - }) - }, - error => { - throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) - } - ) - } - - updateGasSponsor = (args: UpdateGasSponsorArgs, headers?: object, signal?: AbortSignal): Promise => { - return this.fetch(this.url('UpdateGasSponsor'), createHTTPRequest(args, headers, signal)).then( - res => { - return buildResponse(res).then(_data => { - return { - status: _data.status, - gasSponsor: _data.gasSponsor - } - }) - }, - error => { - throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) - } - ) - } - - removeGasSponsor = (args: RemoveGasSponsorArgs, headers?: object, signal?: AbortSignal): Promise => { - return this.fetch(this.url('RemoveGasSponsor'), createHTTPRequest(args, headers, signal)).then( - res => { - return buildResponse(res).then(_data => { - return { - status: _data.status - } - }) - }, - error => { - throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) - } - ) - } - - addressGasSponsors = ( - args: AddressGasSponsorsArgs, - headers?: object, - signal?: AbortSignal - ): Promise => { - return this.fetch(this.url('AddressGasSponsors'), createHTTPRequest(args, headers, signal)).then( - res => { - return buildResponse(res).then(_data => { - return { - page: _data.page, - gasSponsors: >_data.gasSponsors - } - }) - }, - error => { - throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) - } - ) - } - - getProjectBalance = (args: GetProjectBalanceArgs, headers?: object, signal?: AbortSignal): Promise => { - return this.fetch(this.url('GetProjectBalance'), createHTTPRequest(args, headers, signal)).then( - res => { - return buildResponse(res).then(_data => { - return { - balance: _data.balance - } - }) - }, - error => { - throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) - } - ) - } - - adjustProjectBalance = ( - args: AdjustProjectBalanceArgs, - headers?: object, - signal?: AbortSignal - ): Promise => { - return this.fetch(this.url('AdjustProjectBalance'), createHTTPRequest(args, headers, signal)).then( - res => { - return buildResponse(res).then(_data => { - return { - balance: _data.balance - } - }) - }, - error => { - throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) - } - ) - } -} - -const createHTTPRequest = (body: object = {}, headers: object = {}, signal: AbortSignal | null = null): object => { - const reqHeaders: { [key: string]: string } = { ...headers, 'Content-Type': 'application/json' } - reqHeaders[WebrpcHeader] = WebrpcHeaderValue - - return { - method: 'POST', - headers: reqHeaders, - body: JSON.stringify(body || {}), - signal - } -} - -const buildResponse = (res: Response): Promise => { - return res.text().then(text => { - let data - try { - data = JSON.parse(text) - } catch (error) { - let message = '' - if (error instanceof Error) { - message = error.message - } - throw WebrpcBadResponseError.new({ - status: res.status, - cause: `JSON.parse(): ${message}: response text: ${text}` - }) - } - if (!res.ok) { - const code: number = typeof data.code === 'number' ? data.code : 0 - throw (webrpcErrorByCode[code] || WebrpcError).new(data) - } - return data - }) -} - -// -// Errors -// - -export class WebrpcError extends Error { - name: string - code: number - message: string - status: number - cause?: string - - /** @deprecated Use message instead of msg. Deprecated in webrpc v0.11.0. */ - msg: string - - constructor(name: string, code: number, message: string, status: number, cause?: string) { - super(message) - this.name = name || 'WebrpcError' - this.code = typeof code === 'number' ? code : 0 - this.message = message || `endpoint error ${this.code}` - this.msg = this.message - this.status = typeof status === 'number' ? status : 0 - this.cause = cause - Object.setPrototypeOf(this, WebrpcError.prototype) - } - - static new(payload: any): WebrpcError { - return new this(payload.error, payload.code, payload.message || payload.msg, payload.status, payload.cause) - } -} - -// Webrpc errors - -export class WebrpcEndpointError extends WebrpcError { - constructor( - name: string = 'WebrpcEndpoint', - code: number = 0, - message: string = `endpoint error`, - status: number = 0, - cause?: string - ) { - super(name, code, message, status, cause) - Object.setPrototypeOf(this, WebrpcEndpointError.prototype) - } -} - -export class WebrpcRequestFailedError extends WebrpcError { - constructor( - name: string = 'WebrpcRequestFailed', - code: number = -1, - message: string = `request failed`, - status: number = 0, - cause?: string - ) { - super(name, code, message, status, cause) - Object.setPrototypeOf(this, WebrpcRequestFailedError.prototype) - } -} - -export class WebrpcBadRouteError extends WebrpcError { - constructor( - name: string = 'WebrpcBadRoute', - code: number = -2, - message: string = `bad route`, - status: number = 0, - cause?: string - ) { - super(name, code, message, status, cause) - Object.setPrototypeOf(this, WebrpcBadRouteError.prototype) - } -} - -export class WebrpcBadMethodError extends WebrpcError { - constructor( - name: string = 'WebrpcBadMethod', - code: number = -3, - message: string = `bad method`, - status: number = 0, - cause?: string - ) { - super(name, code, message, status, cause) - Object.setPrototypeOf(this, WebrpcBadMethodError.prototype) - } -} - -export class WebrpcBadRequestError extends WebrpcError { - constructor( - name: string = 'WebrpcBadRequest', - code: number = -4, - message: string = `bad request`, - status: number = 0, - cause?: string - ) { - super(name, code, message, status, cause) - Object.setPrototypeOf(this, WebrpcBadRequestError.prototype) - } -} - -export class WebrpcBadResponseError extends WebrpcError { - constructor( - name: string = 'WebrpcBadResponse', - code: number = -5, - message: string = `bad response`, - status: number = 0, - cause?: string - ) { - super(name, code, message, status, cause) - Object.setPrototypeOf(this, WebrpcBadResponseError.prototype) - } -} - -export class WebrpcServerPanicError extends WebrpcError { - constructor( - name: string = 'WebrpcServerPanic', - code: number = -6, - message: string = `server panic`, - status: number = 0, - cause?: string - ) { - super(name, code, message, status, cause) - Object.setPrototypeOf(this, WebrpcServerPanicError.prototype) - } -} - -export class WebrpcInternalErrorError extends WebrpcError { - constructor( - name: string = 'WebrpcInternalError', - code: number = -7, - message: string = `internal error`, - status: number = 0, - cause?: string - ) { - super(name, code, message, status, cause) - Object.setPrototypeOf(this, WebrpcInternalErrorError.prototype) - } -} - -export class WebrpcClientDisconnectedError extends WebrpcError { - constructor( - name: string = 'WebrpcClientDisconnected', - code: number = -8, - message: string = `client disconnected`, - status: number = 0, - cause?: string - ) { - super(name, code, message, status, cause) - Object.setPrototypeOf(this, WebrpcClientDisconnectedError.prototype) - } -} - -export class WebrpcStreamLostError extends WebrpcError { - constructor( - name: string = 'WebrpcStreamLost', - code: number = -9, - message: string = `stream lost`, - status: number = 0, - cause?: string - ) { - super(name, code, message, status, cause) - Object.setPrototypeOf(this, WebrpcStreamLostError.prototype) - } -} - -export class WebrpcStreamFinishedError extends WebrpcError { - constructor( - name: string = 'WebrpcStreamFinished', - code: number = -10, - message: string = `stream finished`, - status: number = 0, - cause?: string - ) { - super(name, code, message, status, cause) - Object.setPrototypeOf(this, WebrpcStreamFinishedError.prototype) - } -} - -// Schema errors - -export class UnauthorizedError extends WebrpcError { - constructor( - name: string = 'Unauthorized', - code: number = 1000, - message: string = `Unauthorized access`, - status: number = 0, - cause?: string - ) { - super(name, code, message, status, cause) - Object.setPrototypeOf(this, UnauthorizedError.prototype) - } -} - -export class PermissionDeniedError extends WebrpcError { - constructor( - name: string = 'PermissionDenied', - code: number = 1001, - message: string = `Permission denied`, - status: number = 0, - cause?: string - ) { - super(name, code, message, status, cause) - Object.setPrototypeOf(this, PermissionDeniedError.prototype) - } -} - -export class SessionExpiredError extends WebrpcError { - constructor( - name: string = 'SessionExpired', - code: number = 1002, - message: string = `Session expired`, - status: number = 0, - cause?: string - ) { - super(name, code, message, status, cause) - Object.setPrototypeOf(this, SessionExpiredError.prototype) - } -} - -export class MethodNotFoundError extends WebrpcError { - constructor( - name: string = 'MethodNotFound', - code: number = 1003, - message: string = `Method not found`, - status: number = 0, - cause?: string - ) { - super(name, code, message, status, cause) - Object.setPrototypeOf(this, MethodNotFoundError.prototype) - } -} - -export class RequestConflictError extends WebrpcError { - constructor( - name: string = 'RequestConflict', - code: number = 1004, - message: string = `Conflict with target resource`, - status: number = 0, - cause?: string - ) { - super(name, code, message, status, cause) - Object.setPrototypeOf(this, RequestConflictError.prototype) - } -} - -export class AbortedError extends WebrpcError { - constructor( - name: string = 'Aborted', - code: number = 1005, - message: string = `Request aborted`, - status: number = 0, - cause?: string - ) { - super(name, code, message, status, cause) - Object.setPrototypeOf(this, AbortedError.prototype) - } -} - -export class GeoblockedError extends WebrpcError { - constructor( - name: string = 'Geoblocked', - code: number = 1006, - message: string = `Geoblocked region`, - status: number = 0, - cause?: string - ) { - super(name, code, message, status, cause) - Object.setPrototypeOf(this, GeoblockedError.prototype) - } -} - -export class RateLimitedError extends WebrpcError { - constructor( - name: string = 'RateLimited', - code: number = 1007, - message: string = `Rate-limited. Please slow down.`, - status: number = 0, - cause?: string - ) { - super(name, code, message, status, cause) - Object.setPrototypeOf(this, RateLimitedError.prototype) - } -} - -export class ProjectNotFoundError extends WebrpcError { - constructor( - name: string = 'ProjectNotFound', - code: number = 1008, - message: string = `Project not found`, - status: number = 0, - cause?: string - ) { - super(name, code, message, status, cause) - Object.setPrototypeOf(this, ProjectNotFoundError.prototype) - } -} - -export class AccessKeyNotFoundError extends WebrpcError { - constructor( - name: string = 'AccessKeyNotFound', - code: number = 1101, - message: string = `Access key not found`, - status: number = 0, - cause?: string - ) { - super(name, code, message, status, cause) - Object.setPrototypeOf(this, AccessKeyNotFoundError.prototype) - } -} - -export class AccessKeyMismatchError extends WebrpcError { - constructor( - name: string = 'AccessKeyMismatch', - code: number = 1102, - message: string = `Access key mismatch`, - status: number = 0, - cause?: string - ) { - super(name, code, message, status, cause) - Object.setPrototypeOf(this, AccessKeyMismatchError.prototype) - } -} - -export class InvalidOriginError extends WebrpcError { - constructor( - name: string = 'InvalidOrigin', - code: number = 1103, - message: string = `Invalid origin for Access Key`, - status: number = 0, - cause?: string - ) { - super(name, code, message, status, cause) - Object.setPrototypeOf(this, InvalidOriginError.prototype) - } -} - -export class InvalidServiceError extends WebrpcError { - constructor( - name: string = 'InvalidService', - code: number = 1104, - message: string = `Service not enabled for Access key`, - status: number = 0, - cause?: string - ) { - super(name, code, message, status, cause) - Object.setPrototypeOf(this, InvalidServiceError.prototype) - } -} - -export class UnauthorizedUserError extends WebrpcError { - constructor( - name: string = 'UnauthorizedUser', - code: number = 1105, - message: string = `Unauthorized user`, - status: number = 0, - cause?: string - ) { - super(name, code, message, status, cause) - Object.setPrototypeOf(this, UnauthorizedUserError.prototype) - } -} - -export class QuotaExceededError extends WebrpcError { - constructor( - name: string = 'QuotaExceeded', - code: number = 1200, - message: string = `Quota request exceeded`, - status: number = 0, - cause?: string - ) { - super(name, code, message, status, cause) - Object.setPrototypeOf(this, QuotaExceededError.prototype) - } -} - -export class QuotaRateLimitError extends WebrpcError { - constructor( - name: string = 'QuotaRateLimit', - code: number = 1201, - message: string = `Quota rate limit exceeded`, - status: number = 0, - cause?: string - ) { - super(name, code, message, status, cause) - Object.setPrototypeOf(this, QuotaRateLimitError.prototype) - } -} - -export class NoDefaultKeyError extends WebrpcError { - constructor( - name: string = 'NoDefaultKey', - code: number = 1300, - message: string = `No default access key found`, - status: number = 0, - cause?: string - ) { - super(name, code, message, status, cause) - Object.setPrototypeOf(this, NoDefaultKeyError.prototype) - } -} - -export class MaxAccessKeysError extends WebrpcError { - constructor( - name: string = 'MaxAccessKeys', - code: number = 1301, - message: string = `Access keys limit reached`, - status: number = 0, - cause?: string - ) { - super(name, code, message, status, cause) - Object.setPrototypeOf(this, MaxAccessKeysError.prototype) - } -} - -export class AtLeastOneKeyError extends WebrpcError { - constructor( - name: string = 'AtLeastOneKey', - code: number = 1302, - message: string = `You need at least one Access Key`, - status: number = 0, - cause?: string - ) { - super(name, code, message, status, cause) - Object.setPrototypeOf(this, AtLeastOneKeyError.prototype) - } -} - -export class TimeoutError extends WebrpcError { - constructor( - name: string = 'Timeout', - code: number = 1900, - message: string = `Request timed out`, - status: number = 0, - cause?: string - ) { - super(name, code, message, status, cause) - Object.setPrototypeOf(this, TimeoutError.prototype) - } -} - -export class InvalidArgumentError extends WebrpcError { - constructor( - name: string = 'InvalidArgument', - code: number = 2001, - message: string = `Invalid argument`, - status: number = 0, - cause?: string - ) { - super(name, code, message, status, cause) - Object.setPrototypeOf(this, InvalidArgumentError.prototype) - } -} - -export class UnavailableError extends WebrpcError { - constructor( - name: string = 'Unavailable', - code: number = 2002, - message: string = `Unavailable resource`, - status: number = 0, - cause?: string - ) { - super(name, code, message, status, cause) - Object.setPrototypeOf(this, UnavailableError.prototype) - } -} - -export class QueryFailedError extends WebrpcError { - constructor( - name: string = 'QueryFailed', - code: number = 2003, - message: string = `Query failed`, - status: number = 0, - cause?: string - ) { - super(name, code, message, status, cause) - Object.setPrototypeOf(this, QueryFailedError.prototype) - } -} - -export class NotFoundError extends WebrpcError { - constructor( - name: string = 'NotFound', - code: number = 3000, - message: string = `Resource not found`, - status: number = 0, - cause?: string - ) { - super(name, code, message, status, cause) - Object.setPrototypeOf(this, NotFoundError.prototype) - } -} - -export class InsufficientFeeError extends WebrpcError { - constructor( - name: string = 'InsufficientFee', - code: number = 3004, - message: string = `Insufficient fee`, - status: number = 0, - cause?: string - ) { - super(name, code, message, status, cause) - Object.setPrototypeOf(this, InsufficientFeeError.prototype) - } -} - -export enum errors { - WebrpcEndpoint = 'WebrpcEndpoint', - WebrpcRequestFailed = 'WebrpcRequestFailed', - WebrpcBadRoute = 'WebrpcBadRoute', - WebrpcBadMethod = 'WebrpcBadMethod', - WebrpcBadRequest = 'WebrpcBadRequest', - WebrpcBadResponse = 'WebrpcBadResponse', - WebrpcServerPanic = 'WebrpcServerPanic', - WebrpcInternalError = 'WebrpcInternalError', - WebrpcClientDisconnected = 'WebrpcClientDisconnected', - WebrpcStreamLost = 'WebrpcStreamLost', - WebrpcStreamFinished = 'WebrpcStreamFinished', - Unauthorized = 'Unauthorized', - PermissionDenied = 'PermissionDenied', - SessionExpired = 'SessionExpired', - MethodNotFound = 'MethodNotFound', - RequestConflict = 'RequestConflict', - Aborted = 'Aborted', - Geoblocked = 'Geoblocked', - RateLimited = 'RateLimited', - ProjectNotFound = 'ProjectNotFound', - AccessKeyNotFound = 'AccessKeyNotFound', - AccessKeyMismatch = 'AccessKeyMismatch', - InvalidOrigin = 'InvalidOrigin', - InvalidService = 'InvalidService', - UnauthorizedUser = 'UnauthorizedUser', - QuotaExceeded = 'QuotaExceeded', - QuotaRateLimit = 'QuotaRateLimit', - NoDefaultKey = 'NoDefaultKey', - MaxAccessKeys = 'MaxAccessKeys', - AtLeastOneKey = 'AtLeastOneKey', - Timeout = 'Timeout', - InvalidArgument = 'InvalidArgument', - Unavailable = 'Unavailable', - QueryFailed = 'QueryFailed', - NotFound = 'NotFound', - InsufficientFee = 'InsufficientFee' -} - -export enum WebrpcErrorCodes { - WebrpcEndpoint = 0, - WebrpcRequestFailed = -1, - WebrpcBadRoute = -2, - WebrpcBadMethod = -3, - WebrpcBadRequest = -4, - WebrpcBadResponse = -5, - WebrpcServerPanic = -6, - WebrpcInternalError = -7, - WebrpcClientDisconnected = -8, - WebrpcStreamLost = -9, - WebrpcStreamFinished = -10, - Unauthorized = 1000, - PermissionDenied = 1001, - SessionExpired = 1002, - MethodNotFound = 1003, - RequestConflict = 1004, - Aborted = 1005, - Geoblocked = 1006, - RateLimited = 1007, - ProjectNotFound = 1008, - AccessKeyNotFound = 1101, - AccessKeyMismatch = 1102, - InvalidOrigin = 1103, - InvalidService = 1104, - UnauthorizedUser = 1105, - QuotaExceeded = 1200, - QuotaRateLimit = 1201, - NoDefaultKey = 1300, - MaxAccessKeys = 1301, - AtLeastOneKey = 1302, - Timeout = 1900, - InvalidArgument = 2001, - Unavailable = 2002, - QueryFailed = 2003, - NotFound = 3000, - InsufficientFee = 3004 -} - -export const webrpcErrorByCode: { [code: number]: any } = { - [0]: WebrpcEndpointError, - [-1]: WebrpcRequestFailedError, - [-2]: WebrpcBadRouteError, - [-3]: WebrpcBadMethodError, - [-4]: WebrpcBadRequestError, - [-5]: WebrpcBadResponseError, - [-6]: WebrpcServerPanicError, - [-7]: WebrpcInternalErrorError, - [-8]: WebrpcClientDisconnectedError, - [-9]: WebrpcStreamLostError, - [-10]: WebrpcStreamFinishedError, - [1000]: UnauthorizedError, - [1001]: PermissionDeniedError, - [1002]: SessionExpiredError, - [1003]: MethodNotFoundError, - [1004]: RequestConflictError, - [1005]: AbortedError, - [1006]: GeoblockedError, - [1007]: RateLimitedError, - [1008]: ProjectNotFoundError, - [1101]: AccessKeyNotFoundError, - [1102]: AccessKeyMismatchError, - [1103]: InvalidOriginError, - [1104]: InvalidServiceError, - [1105]: UnauthorizedUserError, - [1200]: QuotaExceededError, - [1201]: QuotaRateLimitError, - [1300]: NoDefaultKeyError, - [1301]: MaxAccessKeysError, - [1302]: AtLeastOneKeyError, - [1900]: TimeoutError, - [2001]: InvalidArgumentError, - [2002]: UnavailableError, - [2003]: QueryFailedError, - [3000]: NotFoundError, - [3004]: InsufficientFeeError -} - -export type Fetch = (input: RequestInfo, init?: RequestInit) => Promise diff --git a/old/packages/relayer/tests/provider-relayer.spec.ts b/old/packages/relayer/tests/provider-relayer.spec.ts deleted file mode 100644 index 041bb58c1..000000000 --- a/old/packages/relayer/tests/provider-relayer.spec.ts +++ /dev/null @@ -1,543 +0,0 @@ -import { commons, v2 } from '@0xsequence/core' -import { Orchestrator } from '@0xsequence/signhub' -import { context } from '@0xsequence/tests' -import { Wallet, WalletV2 } from '@0xsequence/wallet' -import { CallReceiverMock, HookCallerMock } from '@0xsequence/wallet-contracts' -import * as chai from 'chai' -import chaiAsPromised from 'chai-as-promised' -import { ethers } from 'ethers' -import hardhat from 'hardhat' -import { LocalRelayer } from '../src' - -const CallReceiverMockArtifact = require('@0xsequence/wallet-contracts/artifacts/contracts/mocks/CallReceiverMock.sol/CallReceiverMock.json') -const HookCallerMockArtifact = require('@0xsequence/wallet-contracts/artifacts/contracts/mocks/HookCallerMock.sol/HookCallerMock.json') - -const { expect } = chai.use(chaiAsPromised) - -describe('Wallet integration', function () { - let relayer: LocalRelayer - let callReceiver: CallReceiverMock - let hookCaller: HookCallerMock - - let contexts: Awaited> - let provider: ethers.BrowserProvider - let signers: ethers.Signer[] - - before(async () => { - provider = new ethers.BrowserProvider(hardhat.network.provider, undefined, { cacheTimeout: -1 }) - signers = await Promise.all(new Array(8).fill(0).map((_, i) => provider.getSigner(i))) - contexts = await context.deploySequenceContexts(signers[0]) - relayer = new LocalRelayer(signers[1]) - - // Deploy call receiver mock - callReceiver = (await new ethers.ContractFactory(CallReceiverMockArtifact.abi, CallReceiverMockArtifact.bytecode, signers[0]) - .deploy() - .then(tx => tx.waitForDeployment())) as CallReceiverMock - - // Deploy hook caller mock - hookCaller = (await new ethers.ContractFactory(HookCallerMockArtifact.abi, HookCallerMockArtifact.bytecode, signers[0]) - .deploy() - .then(tx => tx.waitForDeployment())) as HookCallerMock - }) - - describe('Waiting for receipts', () => { - ;[ - { - name: 'deployed', - deployed: true - }, - { - name: 'undeployed', - deployed: false - } - ].map(c => { - let wallet: WalletV2 - - beforeEach(async () => { - const signer = ethers.Wallet.createRandom() - const orchestrator = new Orchestrator([signer]) - - const network = await provider.getNetwork() - - const config = v2.config.ConfigCoder.fromSimple({ - threshold: 1, - checkpoint: 0, - signers: [ - { - address: signer.address, - weight: 1 - } - ] - }) - - wallet = Wallet.newWallet({ - coders: v2.coders, - context: contexts[2], - config, - orchestrator, - chainId: network.chainId, - provider, - relayer - }) - - if (c.deployed) await wallet.deploy() - - expect(await wallet.reader().isDeployed(wallet.address)).to.equal(c.deployed) - }) - - describe(`For ${c.name} wallet`, () => { - it('Should get receipt of success transaction', async () => { - const txn: commons.transaction.Transaction = { - to: ethers.Wallet.createRandom().address, - data: ethers.hexlify(ethers.randomBytes(43)), - delegateCall: false, - revertOnError: false, - gasLimit: 140000, - value: 0 - } - - const network = await provider.getNetwork() - - const id = commons.transaction.subdigestOfTransactions(wallet.address, network.chainId, 0, [txn]) - - const receiptPromise = relayer.wait(id, 10000) - await new Promise(r => setTimeout(r, 1000)) - - const ogtx = await wallet.sendTransaction(txn, { serial: true }) - const receipt = await receiptPromise - - expect(receipt).to.not.be.undefined - expect(receipt.hash).to.equal(ogtx.hash) - }) - - it('Should get receipt of success batch transaction', async () => { - const txns: commons.transaction.Transaction[] = [ - { - to: ethers.Wallet.createRandom().address, - data: ethers.hexlify(ethers.randomBytes(43)), - delegateCall: false, - revertOnError: false, - gasLimit: 140000, - value: 0 - // nonce: 0 - }, - { - to: ethers.Wallet.createRandom().address, - data: ethers.hexlify(ethers.randomBytes(43)), - delegateCall: false, - revertOnError: false, - gasLimit: 140000, - value: 0 - // nonce: 0 - } - ] - - const network = await provider.getNetwork() - - const nonce = 0 //wallet.randomNonce() - const id = commons.transaction.subdigestOfTransactions(wallet.address, network.chainId, nonce, txns) - - const receiptPromise = relayer.wait(id, 10000) - await new Promise(r => setTimeout(r, 1000)) - - const ogtx = await wallet.sendTransaction(txns, { nonce }) - const receipt = await receiptPromise - - expect(receipt).to.not.be.undefined - expect(receipt.hash).to.equal(ogtx.hash) - }) - - it('Should get receipt of batch transaction with failed meta-txs', async () => { - const txns: commons.transaction.Transaction[] = [ - { - to: ethers.Wallet.createRandom().address, - data: ethers.hexlify(ethers.randomBytes(43)), - delegateCall: false, - revertOnError: false, - gasLimit: 140000, - value: 0 - // nonce: 0 - }, - { - to: contexts[2].factory, - // 0xff not a valid factory method - data: '0xffffffffffff', - delegateCall: false, - revertOnError: false, - gasLimit: 140000, - value: 0 - // nonce: 0 - } - ] - - const network = await provider.getNetwork() - const nonce = wallet.randomNonce() - const id = commons.transaction.subdigestOfTransactions(wallet.address, network.chainId, nonce, txns) - - const receiptPromise = relayer.wait(id, 10000) - await new Promise(r => setTimeout(r, 1000)) - - const ogtx = await wallet.sendTransaction(txns, { nonce }) - const receipt = await receiptPromise - - expect(receipt).to.not.be.undefined - expect(receipt.hash).to.equal(ogtx.hash) - }) - - it('Should get receipt of failed transaction', async () => { - const txn: commons.transaction.Transaction = { - to: contexts[1].factory, - // 0xff not a valid factory method - data: '0xffffffffffff', - delegateCall: false, - revertOnError: false, - gasLimit: 140000, - value: 0 - // nonce: 0 - } - - const network = await provider.getNetwork() - const id = commons.transaction.subdigestOfTransactions(wallet.address, network.chainId, 0, [txn]) - - const receiptPromise = relayer.wait(id, 10000) - await new Promise(r => setTimeout(r, 1000)) - - const ogtx = await wallet.sendTransaction(txn, { serial: true }) - const receipt = await receiptPromise - - expect(receipt).to.not.be.undefined - expect(receipt.hash).to.equal(ogtx.hash) - }) - - it('Find correct receipt between multiple other transactions', async () => { - const altSigner = ethers.Wallet.createRandom() - const orchestrator = new Orchestrator([altSigner]) - const network = await provider.getNetwork() - - const config = v2.config.ConfigCoder.fromSimple({ - threshold: 1, - checkpoint: 0, - signers: [ - { - address: altSigner.address, - weight: 1 - } - ] - }) - - const altWallet = Wallet.newWallet({ - coders: v2.coders, - context: contexts[2], - config, - provider, - relayer, - orchestrator, - chainId: network.chainId - }) - - await altWallet.deploy() - - expect(await altWallet.reader().isDeployed(altWallet.address)).to.be.true - - await Promise.all( - new Array(8).fill(0).map(async (_, i) => { - await altWallet.sendTransaction( - { - to: ethers.Wallet.createRandom().address, - data: ethers.hexlify(ethers.randomBytes(43)), - delegateCall: false, - revertOnError: false, - gasLimit: 140000, - value: 0 - }, - { nonce: commons.transaction.encodeNonce(i, 0) } - ) - }) - ) - - const txn: commons.transaction.Transaction = { - to: ethers.Wallet.createRandom().address, - data: ethers.hexlify(ethers.randomBytes(43)), - delegateCall: false, - revertOnError: false, - gasLimit: 140000, - value: 0 - // nonce: 0 - } - - const id = commons.transaction.subdigestOfTransactions(wallet.address, network.chainId, 0, [txn]) - - const receiptPromise = relayer.wait(id, 10000) - await new Promise(r => setTimeout(r, 1000)) - - const ogtx = await wallet.sendTransaction(txn, { serial: true }) - - // Post-txs - await Promise.all( - new Array(8).fill(0).map(async (_, i) => { - await altWallet.sendTransaction( - { - to: ethers.Wallet.createRandom().address, - data: ethers.hexlify(ethers.randomBytes(43)), - delegateCall: false, - revertOnError: false, - gasLimit: 140000, - value: 0 - }, - { nonce: commons.transaction.encodeNonce(i + 1000, 0) } - ) - }) - ) - - const receipt = await receiptPromise - - expect(receipt).to.not.be.undefined - expect(receipt.hash).to.equal(ogtx.hash) - }) - - it('Find correct receipt between multiple other failed transactions', async () => { - // Pre-txs - const altSigner = ethers.Wallet.createRandom() - const orchestrator = new Orchestrator([altSigner]) - const network = await provider.getNetwork() - - const config = v2.config.ConfigCoder.fromSimple({ - threshold: 1, - checkpoint: 0, - signers: [ - { - address: altSigner.address, - weight: 1 - } - ] - }) - - const altWallet = Wallet.newWallet({ - coders: v2.coders, - context: contexts[2], - config, - provider, - relayer, - orchestrator, - chainId: network.chainId - }) - - await Promise.all( - new Array(8).fill(0).map(async (_, i) => { - await altWallet.sendTransaction( - { - to: ethers.Wallet.createRandom().address, - data: ethers.hexlify(ethers.randomBytes(43)), - delegateCall: false, - revertOnError: false, - gasLimit: 140000, - value: 0 - }, - { nonce: commons.transaction.encodeNonce(i, 0) } - ) - }) - ) - - await Promise.all( - new Array(8).fill(0).map(async (_, i) => { - await altWallet.sendTransaction( - { - to: contexts[2].factory, - // 0xff not a valid factory method - data: '0xffffffffffff', - delegateCall: false, - revertOnError: false, - gasLimit: 140000, - value: 0 - }, - { nonce: commons.transaction.encodeNonce(i + 1000, 0) } - ) - }) - ) - - const txn: commons.transaction.Transaction = { - to: ethers.Wallet.createRandom().address, - data: ethers.hexlify(ethers.randomBytes(43)), - delegateCall: false, - revertOnError: false, - gasLimit: 140000, - value: 0 - // nonce: 0 - } - - const id = commons.transaction.subdigestOfTransactions(wallet.address, network.chainId, 0, [txn]) - - const receiptPromise = relayer.wait(id, 10000) - await new Promise(r => setTimeout(r, 1000)) - - const ogtx = await wallet.sendTransaction(txn, { serial: true }) - - const receipt = await receiptPromise - - expect(receipt).to.not.be.undefined - expect(receipt.hash).to.equal(ogtx.hash) - }) - - it('Find failed tx receipt between multiple other failed transactions', async () => { - // Pre-txs - const altSigner = ethers.Wallet.createRandom() - const orchestrator = new Orchestrator([altSigner]) - const network = await provider.getNetwork() - - const config = v2.config.ConfigCoder.fromSimple({ - threshold: 1, - checkpoint: 0, - signers: [ - { - address: altSigner.address, - weight: 1 - } - ] - }) - - const altWallet = Wallet.newWallet({ - coders: v2.coders, - context: contexts[2], - config, - provider, - relayer, - orchestrator, - chainId: network.chainId - }) - - await Promise.all( - new Array(8).fill(0).map(async (_, i) => { - await altWallet.sendTransaction( - { - to: ethers.Wallet.createRandom().address, - data: ethers.hexlify(ethers.randomBytes(43)), - delegateCall: false, - revertOnError: false, - gasLimit: 140000 - }, - { nonce: commons.transaction.encodeNonce(i, 0) } - ) - }) - ) - - await Promise.all( - new Array(8).fill(0).map(async (_, i) => { - await altWallet.sendTransaction( - { - to: contexts[1].factory, - // 0xff not a valid factory method - data: '0xffffffffffff', - delegateCall: false, - revertOnError: false, - gasLimit: 140000 - }, - { nonce: commons.transaction.encodeNonce(i + 1000, 0) } - ) - }) - ) - - const txn: commons.transaction.Transaction = { - to: contexts[2].factory, - // 0xff not a valid factory method - data: '0xffffffffffff', - delegateCall: false, - revertOnError: false, - gasLimit: 140000, - value: 0 - // nonce: 0 - } - - const id = commons.transaction.subdigestOfTransactions(wallet.address, network.chainId, 0, [txn]) - - const receiptPromise = relayer.wait(id, 10000) - await new Promise(r => setTimeout(r, 1000)) - - const ogtx = await wallet.sendTransaction(txn, { serial: true }) - const receipt = await receiptPromise - - expect(receipt).to.not.be.undefined - expect(receipt.hash).to.equal(ogtx.hash) - }) - - it('Should timeout receipt if transaction is never sent', async () => { - const txn: commons.transaction.Transaction = { - to: ethers.Wallet.createRandom().address, - data: ethers.hexlify(ethers.randomBytes(43)), - delegateCall: false, - revertOnError: false, - gasLimit: 140000, - value: 0 - // nonce: 0 - } - - const network = await provider.getNetwork() - - const id = commons.transaction.subdigestOfTransactions(wallet.address, network.chainId, 0, [txn]) - const receiptPromise = relayer.wait(id, 2000) - - await expect(receiptPromise).to.be.rejectedWith(`Timeout waiting for transaction receipt ${id}`) - }) - - if (c.deployed) { - it('Find correct receipt between multiple other failed transactions of the same wallet', async () => { - // Pre-txs - await Promise.all( - new Array(8).fill(0).map(async (_, i) => { - await wallet.sendTransaction( - { - to: ethers.Wallet.createRandom().address, - data: ethers.hexlify(ethers.randomBytes(43)), - delegateCall: false, - revertOnError: false, - gasLimit: 140000, - value: 0 - }, - { nonce: commons.transaction.encodeNonce(i + 1000, 0) } - ) - }) - ) - - await Promise.all( - new Array(8).fill(0).map(async (_, i) => { - await wallet.sendTransaction( - { - to: contexts[1].factory, - // 0xff not a valid factory method - data: '0xffffffffffff', - delegateCall: false, - revertOnError: false, - gasLimit: 140000, - value: 0 - }, - { nonce: commons.transaction.encodeNonce(i + 2000, 0) } - ) - }) - ) - - const txn: commons.transaction.Transaction = { - to: ethers.Wallet.createRandom().address, - data: ethers.hexlify(ethers.randomBytes(43)), - delegateCall: false, - revertOnError: false, - gasLimit: 140000 - } - - const network = await provider.getNetwork() - - const id = commons.transaction.subdigestOfTransactions(wallet.address, network.chainId, 0, [txn]) - - const receiptPromise = relayer.wait(id, 10000) - await new Promise(r => setTimeout(r, 1000)) - - const ogtx = await wallet.sendTransaction(txn, { serial: true }) - - const receipt = await receiptPromise - - expect(receipt).to.not.be.undefined - expect(receipt.hash).to.equal(ogtx.hash) - }) - } - }) - }) - }) -}) diff --git a/old/packages/replacer/CHANGELOG.md b/old/packages/replacer/CHANGELOG.md deleted file mode 100644 index 99cd4280d..000000000 --- a/old/packages/replacer/CHANGELOG.md +++ /dev/null @@ -1,1711 +0,0 @@ -# @0xsequence/replacer - -## 2.3.8 - -### Patch Changes - -- indexer: update clients -- Updated dependencies - - @0xsequence/abi@2.3.8 - - @0xsequence/core@2.3.8 - -## 2.3.7 - -### Patch Changes - -- Metadata updates -- Updated dependencies - - @0xsequence/abi@2.3.7 - - @0xsequence/core@2.3.7 - -## 2.3.6 - -### Patch Changes - -- New chains -- Updated dependencies - - @0xsequence/abi@2.3.6 - - @0xsequence/core@2.3.6 - -## 2.3.5 - -### Patch Changes - -- Add Frequency Testnet -- Updated dependencies - - @0xsequence/abi@2.3.5 - - @0xsequence/core@2.3.5 - -## 2.3.4 - -### Patch Changes - -- metadata: exclude deprecated methods on rpc client -- Updated dependencies - - @0xsequence/abi@2.3.4 - - @0xsequence/core@2.3.4 - -## 2.3.3 - -### Patch Changes - -- metadata: client update -- Updated dependencies - - @0xsequence/abi@2.3.3 - - @0xsequence/core@2.3.3 - -## 2.3.2 - -### Patch Changes - -- metadata: update rpc client -- Updated dependencies - - @0xsequence/abi@2.3.2 - - @0xsequence/core@2.3.2 - -## 2.3.1 - -### Patch Changes - -- indexer: update rpc client -- Updated dependencies - - @0xsequence/abi@2.3.1 - - @0xsequence/core@2.3.1 - -## 2.3.0 - -### Minor Changes - -- update metadata rpc client - -### Patch Changes - -- Updated dependencies - - @0xsequence/abi@2.3.0 - - @0xsequence/core@2.3.0 - -## 2.2.15 - -### Patch Changes - -- API updates -- Updated dependencies - - @0xsequence/abi@2.2.15 - - @0xsequence/core@2.2.15 - -## 2.2.14 - -### Patch Changes - -- Somnia Testnet and Monad Testnet -- Updated dependencies - - @0xsequence/abi@2.2.14 - - @0xsequence/core@2.2.14 - -## 2.2.13 - -### Patch Changes - -- Add XR1 to all networks -- Updated dependencies - - @0xsequence/abi@2.2.13 - - @0xsequence/core@2.2.13 - -## 2.2.12 - -### Patch Changes - -- Add XR1 -- Updated dependencies - - @0xsequence/abi@2.2.12 - - @0xsequence/core@2.2.12 - -## 2.2.11 - -### Patch Changes - -- Relayer updates -- Updated dependencies - - @0xsequence/abi@2.2.11 - - @0xsequence/core@2.2.11 - -## 2.2.10 - -### Patch Changes - -- Etherlink support -- Updated dependencies - - @0xsequence/abi@2.2.10 - - @0xsequence/core@2.2.10 - -## 2.2.9 - -### Patch Changes - -- Indexer gateway native token balances -- Updated dependencies - - @0xsequence/abi@2.2.9 - - @0xsequence/core@2.2.9 - -## 2.2.8 - -### Patch Changes - -- Add Moonbeam and Moonbase Alpha -- Updated dependencies - - @0xsequence/abi@2.2.8 - - @0xsequence/core@2.2.8 - -## 2.2.7 - -### Patch Changes - -- Update Builder package -- Updated dependencies - - @0xsequence/abi@2.2.7 - - @0xsequence/core@2.2.7 - -## 2.2.6 - -### Patch Changes - -- Update relayer package -- Updated dependencies - - @0xsequence/abi@2.2.6 - - @0xsequence/core@2.2.6 - -## 2.2.5 - -### Patch Changes - -- auth: fix sequence indexer gateway url -- account: immutable wallet proxy hook -- Updated dependencies -- Updated dependencies - - @0xsequence/abi@2.2.5 - - @0xsequence/core@2.2.5 - -## 2.2.4 - -### Patch Changes - -- network: update soneium mainnet block explorer url -- waas: signTypedData intent support -- Updated dependencies -- Updated dependencies - - @0xsequence/abi@2.2.4 - - @0xsequence/core@2.2.4 - -## 2.2.3 - -### Patch Changes - -- provider: updating initWallet to use connected network configs if they exist -- Updated dependencies - - @0xsequence/abi@2.2.3 - - @0xsequence/core@2.2.3 - -## 2.2.2 - -### Patch Changes - -- pass projectAccessKey to relayer at all times -- Updated dependencies - - @0xsequence/abi@2.2.2 - - @0xsequence/core@2.2.2 - -## 2.2.1 - -### Patch Changes - -- waas-ethers: sign typed data -- Updated dependencies - - @0xsequence/abi@2.2.1 - - @0xsequence/core@2.2.1 - -## 2.2.0 - -### Minor Changes - -- indexer: gateway client -- @0xsequence/builder -- upgrade puppeteer to v23.10.3 - -### Patch Changes - -- Updated dependencies -- Updated dependencies -- Updated dependencies - - @0xsequence/abi@2.2.0 - - @0xsequence/core@2.2.0 - -## 2.1.8 - -### Patch Changes - -- Add Soneium Mainnet -- Updated dependencies - - @0xsequence/abi@2.1.8 - - @0xsequence/core@2.1.8 - -## 2.1.7 - -### Patch Changes - -- guard: pass project access key to guard requests -- Updated dependencies - - @0xsequence/abi@2.1.7 - - @0xsequence/core@2.1.7 - -## 2.1.6 - -### Patch Changes - -- Add LAOS and Telos Testnet chains -- Updated dependencies - - @0xsequence/abi@2.1.6 - - @0xsequence/core@2.1.6 - -## 2.1.5 - -### Patch Changes - -- account: save presigned configuration with reference chain id 1 -- Updated dependencies - - @0xsequence/abi@2.1.5 - - @0xsequence/core@2.1.5 - -## 2.1.4 - -### Patch Changes - -- provider: pass projectAccessKey into MuxMessageProvider -- Updated dependencies - - @0xsequence/abi@2.1.4 - - @0xsequence/core@2.1.4 - -## 2.1.3 - -### Patch Changes - -- waas: time drift date fix due to strange browser quirk -- Updated dependencies - - @0xsequence/abi@2.1.3 - - @0xsequence/core@2.1.3 - -## 2.1.2 - -### Patch Changes - -- provider: export analytics correctly -- Updated dependencies - - @0xsequence/abi@2.1.2 - - @0xsequence/core@2.1.2 - -## 2.1.1 - -### Patch Changes - -- Add LAOS chain support -- Updated dependencies - - @0xsequence/abi@2.1.1 - - @0xsequence/core@2.1.1 - -## 2.1.0 - -### Minor Changes - -- account: forward project access key when estimating fees and sending transactions - -### Patch Changes - -- sessions: save signatures with reference chain id -- Updated dependencies -- Updated dependencies - - @0xsequence/abi@2.1.0 - - @0xsequence/core@2.1.0 - -## 2.0.26 - -### Patch Changes - -- account: fix chain id comparison -- Updated dependencies - - @0xsequence/abi@2.0.26 - - @0xsequence/core@2.0.26 - -## 2.0.25 - -### Patch Changes - -- skale-nebula: deploy gas limit = 10m -- Updated dependencies - - @0xsequence/abi@2.0.25 - - @0xsequence/core@2.0.25 - -## 2.0.24 - -### Patch Changes - -- sessions: arweave: configurable gateway url -- waas: use /status to get time drift before sending any intents -- Updated dependencies -- Updated dependencies - - @0xsequence/abi@2.0.24 - - @0xsequence/core@2.0.24 - -## 2.0.23 - -### Patch Changes - -- Add The Root Network support -- Updated dependencies - - @0xsequence/abi@2.0.23 - - @0xsequence/core@2.0.23 - -## 2.0.22 - -### Patch Changes - -- Add SKALE Nebula Mainnet support -- Updated dependencies - - @0xsequence/abi@2.0.22 - - @0xsequence/core@2.0.22 - -## 2.0.21 - -### Patch Changes - -- account: add publishWitnessFor -- Updated dependencies - - @0xsequence/abi@2.0.21 - - @0xsequence/core@2.0.21 - -## 2.0.20 - -### Patch Changes - -- upgrade deps, and improve waas session status handling -- Updated dependencies - - @0xsequence/abi@2.0.20 - - @0xsequence/core@2.0.20 - -## 2.0.19 - -### Patch Changes - -- Add Immutable zkEVM support -- Updated dependencies - - @0xsequence/abi@2.0.19 - - @0xsequence/core@2.0.19 - -## 2.0.18 - -### Patch Changes - -- waas: new contractCall transaction type -- sessions: add arweave owner -- Updated dependencies -- Updated dependencies - - @0xsequence/abi@2.0.18 - - @0xsequence/core@2.0.18 - -## 2.0.17 - -### Patch Changes - -- update waas auth to clear session before signIn -- Updated dependencies - - @0xsequence/abi@2.0.17 - - @0xsequence/core@2.0.17 - -## 2.0.16 - -### Patch Changes - -- Removed Astar chains -- Updated dependencies - - @0xsequence/abi@2.0.16 - - @0xsequence/core@2.0.16 - -## 2.0.15 - -### Patch Changes - -- indexer: update bindings with token balance additions -- Updated dependencies - - @0xsequence/abi@2.0.15 - - @0xsequence/core@2.0.15 - -## 2.0.14 - -### Patch Changes - -- sessions: arweave config reader -- network: add b3 and apechain mainnet configs -- Updated dependencies -- Updated dependencies - - @0xsequence/abi@2.0.14 - - @0xsequence/core@2.0.14 - -## 2.0.13 - -### Patch Changes - -- network: toy-testnet -- Updated dependencies - - @0xsequence/abi@2.0.13 - - @0xsequence/core@2.0.13 - -## 2.0.12 - -### Patch Changes - -- api: update bindings -- Updated dependencies - - @0xsequence/abi@2.0.12 - - @0xsequence/core@2.0.12 - -## 2.0.11 - -### Patch Changes - -- waas: intents test fix -- api: update bindings -- Updated dependencies -- Updated dependencies - - @0xsequence/abi@2.0.11 - - @0xsequence/core@2.0.11 - -## 2.0.10 - -### Patch Changes - -- network: soneium minato testnet -- Updated dependencies - - @0xsequence/abi@2.0.10 - - @0xsequence/core@2.0.10 - -## 2.0.9 - -### Patch Changes - -- network: fix SKALE network name -- Updated dependencies - - @0xsequence/abi@2.0.9 - - @0xsequence/core@2.0.9 - -## 2.0.8 - -### Patch Changes - -- metadata: update bindings -- Updated dependencies - - @0xsequence/abi@2.0.8 - - @0xsequence/core@2.0.8 - -## 2.0.7 - -### Patch Changes - -- wallet request handler fix -- Updated dependencies - - @0xsequence/abi@2.0.7 - - @0xsequence/core@2.0.7 - -## 2.0.6 - -### Patch Changes - -- network: matic -> pol -- Updated dependencies - - @0xsequence/abi@2.0.6 - - @0xsequence/core@2.0.6 - -## 2.0.5 - -### Patch Changes - -- provider: update databeat to 0.9.2 -- Updated dependencies - - @0xsequence/abi@2.0.5 - - @0xsequence/core@2.0.5 - -## 2.0.4 - -### Patch Changes - -- network: add skale-nebula-testnet -- Updated dependencies - - @0xsequence/abi@2.0.4 - - @0xsequence/core@2.0.4 - -## 2.0.3 - -### Patch Changes - -- waas: check session status in SequenceWaaS.isSignedIn() -- Updated dependencies - - @0xsequence/abi@2.0.3 - - @0xsequence/core@2.0.3 - -## 2.0.2 - -### Patch Changes - -- sessions: property convert serialized bignumber hex value to bigint -- Updated dependencies - - @0xsequence/abi@2.0.2 - - @0xsequence/core@2.0.2 - -## 2.0.1 - -### Patch Changes - -- waas: http signature check for authenticator requests -- provider: unwrap legacy json rpc responses -- use json replacer and reviver for bigints -- Updated dependencies -- Updated dependencies -- Updated dependencies - - @0xsequence/abi@2.0.1 - - @0xsequence/core@2.0.1 - -## 2.0.0 - -### Major Changes - -- ethers v6 - -### Patch Changes - -- Updated dependencies - - @0xsequence/abi@2.0.0 - - @0xsequence/core@2.0.0 - -## 1.10.15 - -### Patch Changes - -- utils: extractProjectIdFromAccessKey -- Updated dependencies - - @0xsequence/abi@1.10.15 - - @0xsequence/core@1.10.15 - -## 1.10.14 - -### Patch Changes - -- network: add borne-testnet to allNetworks -- Updated dependencies - - @0xsequence/abi@1.10.14 - - @0xsequence/core@1.10.14 - -## 1.10.13 - -### Patch Changes - -- network: add borne testnet -- Updated dependencies - - @0xsequence/abi@1.10.13 - - @0xsequence/core@1.10.13 - -## 1.10.12 - -### Patch Changes - -- api: update bindings -- global/window -> globalThis -- Updated dependencies -- Updated dependencies - - @0xsequence/abi@1.10.12 - - @0xsequence/core@1.10.12 - -## 1.10.11 - -### Patch Changes - -- waas: updated intent.gen without webrpc types, errors exported from authenticator.gen -- Updated dependencies - - @0xsequence/abi@1.10.11 - - @0xsequence/core@1.10.11 - -## 1.10.10 - -### Patch Changes - -- metadata: update bindings with new contract collections api -- Updated dependencies - - @0xsequence/abi@1.10.10 - - @0xsequence/core@1.10.10 - -## 1.10.9 - -### Patch Changes - -- waas minor update -- Updated dependencies - - @0xsequence/abi@1.10.9 - - @0xsequence/core@1.10.9 - -## 1.10.8 - -### Patch Changes - -- update metadata bindings -- Updated dependencies - - @0xsequence/abi@1.10.8 - - @0xsequence/core@1.10.8 - -## 1.10.7 - -### Patch Changes - -- minor fixes to waas client -- Updated dependencies - - @0xsequence/abi@1.10.7 - - @0xsequence/core@1.10.7 - -## 1.10.6 - -### Patch Changes - -- metadata: update bindings -- Updated dependencies - - @0xsequence/abi@1.10.6 - - @0xsequence/core@1.10.6 - -## 1.10.5 - -### Patch Changes - -- network: ape-chain-testnet -> apechain-testnet -- Updated dependencies - - @0xsequence/abi@1.10.5 - - @0xsequence/core@1.10.5 - -## 1.10.4 - -### Patch Changes - -- network: add b3-sepolia, ape-chain-testnet, blast, blast-sepolia -- Updated dependencies - - @0xsequence/abi@1.10.4 - - @0xsequence/core@1.10.4 - -## 1.10.3 - -### Patch Changes - -- typing fix -- Updated dependencies - - @0xsequence/abi@1.10.3 - - @0xsequence/core@1.10.3 - -## 1.10.2 - -### Patch Changes - -- - waas: add getIdToken method - - indexer: update api client -- Updated dependencies - - @0xsequence/abi@1.10.2 - - @0xsequence/core@1.10.2 - -## 1.10.1 - -### Patch Changes - -- metadata: update bindings -- Updated dependencies - - @0xsequence/abi@1.10.1 - - @0xsequence/core@1.10.1 - -## 1.10.0 - -### Minor Changes - -- waas release v1.3.0 - -### Patch Changes - -- Updated dependencies - - @0xsequence/abi@1.10.0 - - @0xsequence/core@1.10.0 - -## 1.9.37 - -### Patch Changes - -- network: adds nativeToken data to NetworkMetadata constants -- Updated dependencies - - @0xsequence/abi@1.9.37 - - @0xsequence/core@1.9.37 - -## 1.9.36 - -### Patch Changes - -- guard: export client -- Updated dependencies - - @0xsequence/abi@1.9.36 - - @0xsequence/core@1.9.36 - -## 1.9.35 - -### Patch Changes - -- guard: update bindings -- Updated dependencies - - @0xsequence/abi@1.9.35 - - @0xsequence/core@1.9.35 - -## 1.9.34 - -### Patch Changes - -- waas: always use lowercase email -- Updated dependencies - - @0xsequence/abi@1.9.34 - - @0xsequence/core@1.9.34 - -## 1.9.33 - -### Patch Changes - -- waas: umd build -- Updated dependencies - - @0xsequence/abi@1.9.33 - - @0xsequence/core@1.9.33 - -## 1.9.32 - -### Patch Changes - -- indexer: update bindings -- Updated dependencies - - @0xsequence/abi@1.9.32 - - @0xsequence/core@1.9.32 - -## 1.9.31 - -### Patch Changes - -- metadata: token directory changes -- Updated dependencies - - @0xsequence/abi@1.9.31 - - @0xsequence/core@1.9.31 - -## 1.9.30 - -### Patch Changes - -- update -- Updated dependencies - - @0xsequence/abi@1.9.30 - - @0xsequence/core@1.9.30 - -## 1.9.29 - -### Patch Changes - -- disable gnosis chain -- Updated dependencies - - @0xsequence/abi@1.9.29 - - @0xsequence/core@1.9.29 - -## 1.9.28 - -### Patch Changes - -- add utils/merkletree -- Updated dependencies - - @0xsequence/abi@1.9.28 - - @0xsequence/core@1.9.28 - -## 1.9.27 - -### Patch Changes - -- network: optimistic -> optimism -- waas: remove defaults -- api, sessions: update bindings -- Updated dependencies -- Updated dependencies -- Updated dependencies - - @0xsequence/abi@1.9.27 - - @0xsequence/core@1.9.27 - -## 1.9.26 - -### Patch Changes - -- - add backend interfaces for pluggable interfaces - - introduce @0xsequence/react-native - - update pnpm to lockfile v9 -- Updated dependencies - - @0xsequence/abi@1.9.26 - - @0xsequence/core@1.9.26 - -## 1.9.25 - -### Patch Changes - -- update webrpc clients with new error types -- Updated dependencies - - @0xsequence/abi@1.9.25 - - @0xsequence/core@1.9.25 - -## 1.9.24 - -### Patch Changes - -- waas: add memoryStore backend to localStore -- Updated dependencies - - @0xsequence/abi@1.9.24 - - @0xsequence/core@1.9.24 - -## 1.9.23 - -### Patch Changes - -- update api client bindings -- Updated dependencies - - @0xsequence/abi@1.9.23 - - @0xsequence/core@1.9.23 - -## 1.9.22 - -### Patch Changes - -- update metadata client bindings -- Updated dependencies - - @0xsequence/abi@1.9.22 - - @0xsequence/core@1.9.22 - -## 1.9.21 - -### Patch Changes - -- api client bindings -- Updated dependencies - - @0xsequence/abi@1.9.21 - - @0xsequence/core@1.9.21 - -## 1.9.20 - -### Patch Changes - -- api client bindings update -- Updated dependencies - - @0xsequence/abi@1.9.20 - - @0xsequence/core@1.9.20 - -## 1.9.19 - -### Patch Changes - -- waas update -- Updated dependencies - - @0xsequence/abi@1.9.19 - - @0xsequence/core@1.9.19 - -## 1.9.18 - -### Patch Changes - -- provider: prohibit dangerous functions -- Updated dependencies - - @0xsequence/abi@1.9.18 - - @0xsequence/core@1.9.18 - -## 1.9.17 - -### Patch Changes - -- network: add xr-sepolia -- Updated dependencies - - @0xsequence/abi@1.9.17 - - @0xsequence/core@1.9.17 - -## 1.9.16 - -### Patch Changes - -- waas: sequence.feeOptions -- Updated dependencies - - @0xsequence/abi@1.9.16 - - @0xsequence/core@1.9.16 - -## 1.9.15 - -### Patch Changes - -- metadata: collection external_link field name fix -- Updated dependencies - - @0xsequence/abi@1.9.15 - - @0xsequence/core@1.9.15 - -## 1.9.14 - -### Patch Changes - -- network: astar-zkatana -> astar-zkyoto -- network: deprecate polygon mumbai network -- network: add xai and polygon amoy -- Updated dependencies -- Updated dependencies -- Updated dependencies - - @0xsequence/abi@1.9.14 - - @0xsequence/core@1.9.14 - -## 1.9.13 - -### Patch Changes - -- waas: fix @0xsequence/network dependency -- Updated dependencies - - @0xsequence/abi@1.9.13 - - @0xsequence/core@1.9.13 - -## 1.9.12 - -### Patch Changes - -- indexer: update rpc bindings -- provider: signMessage: Serialize the BytesLike or string message into hexstring before sending -- waas: SessionAuthProof -- Updated dependencies -- Updated dependencies -- Updated dependencies - - @0xsequence/abi@1.9.12 - - @0xsequence/core@1.9.12 - -## 1.9.11 - -### Patch Changes - -- metdata, update rpc bindings -- Updated dependencies - - @0xsequence/abi@1.9.11 - - @0xsequence/core@1.9.11 - -## 1.9.10 - -### Patch Changes - -- update metadata rpc bindings -- Updated dependencies - - @0xsequence/abi@1.9.10 - - @0xsequence/core@1.9.10 - -## 1.9.9 - -### Patch Changes - -- metadata, add SequenceCollections rpc client -- Updated dependencies - - @0xsequence/abi@1.9.9 - - @0xsequence/core@1.9.9 - -## 1.9.8 - -### Patch Changes - -- waas client update -- Updated dependencies - - @0xsequence/abi@1.9.8 - - @0xsequence/core@1.9.8 - -## 1.9.7 - -### Patch Changes - -- update rpc client bindings for api, metadata and relayer -- Updated dependencies - - @0xsequence/abi@1.9.7 - - @0xsequence/core@1.9.7 - -## 1.9.6 - -### Patch Changes - -- waas package update -- Updated dependencies - - @0xsequence/abi@1.9.6 - - @0xsequence/core@1.9.6 - -## 1.9.5 - -### Patch Changes - -- RpcRelayer prioritize project access key -- Updated dependencies - - @0xsequence/abi@1.9.5 - - @0xsequence/core@1.9.5 - -## 1.9.4 - -### Patch Changes - -- waas: fix network dependency -- Updated dependencies - - @0xsequence/abi@1.9.4 - - @0xsequence/core@1.9.4 - -## 1.9.3 - -### Patch Changes - -- provider: don't append access key to RPC url if user has already provided it -- Updated dependencies - - @0xsequence/abi@1.9.3 - - @0xsequence/core@1.9.3 - -## 1.9.2 - -### Patch Changes - -- network: add xai-sepolia -- Updated dependencies - - @0xsequence/abi@1.9.2 - - @0xsequence/core@1.9.2 - -## 1.9.1 - -### Patch Changes - -- analytics fix -- Updated dependencies - - @0xsequence/abi@1.9.1 - - @0xsequence/core@1.9.1 - -## 1.9.0 - -### Minor Changes - -- waas release - -### Patch Changes - -- Updated dependencies - - @0xsequence/abi@1.9.0 - - @0xsequence/core@1.9.0 - -## 1.8.8 - -### Patch Changes - -- update metadata bindings -- Updated dependencies - - @0xsequence/abi@1.8.8 - - @0xsequence/core@1.8.8 - -## 1.8.7 - -### Patch Changes - -- provider: update databeat to 0.9.1 -- Updated dependencies - - @0xsequence/abi@1.8.7 - - @0xsequence/core@1.8.7 - -## 1.8.6 - -### Patch Changes - -- guard: SignedOwnershipProof -- Updated dependencies - - @0xsequence/abi@1.8.6 - - @0xsequence/core@1.8.6 - -## 1.8.5 - -### Patch Changes - -- guard: signOwnershipProof and isSignedOwnershipProof -- Updated dependencies - - @0xsequence/abi@1.8.5 - - @0xsequence/core@1.8.5 - -## 1.8.4 - -### Patch Changes - -- network: add homeverse to networks list -- Updated dependencies - - @0xsequence/abi@1.8.4 - - @0xsequence/core@1.8.4 - -## 1.8.3 - -### Patch Changes - -- api: introduce basic linked wallet support -- Updated dependencies - - @0xsequence/abi@1.8.3 - - @0xsequence/core@1.8.3 - -## 1.8.2 - -### Patch Changes - -- provider: don't initialize analytics unless explicitly requested -- Updated dependencies - - @0xsequence/abi@1.8.2 - - @0xsequence/core@1.8.2 - -## 1.8.1 - -### Patch Changes - -- update to analytics provider -- Updated dependencies - - @0xsequence/abi@1.8.1 - - @0xsequence/core@1.8.1 - -## 1.8.0 - -### Minor Changes - -- provider: project analytics - -### Patch Changes - -- Updated dependencies - - @0xsequence/abi@1.8.0 - - @0xsequence/core@1.8.0 - -## 1.7.2 - -### Patch Changes - -- 0xsequence: ChainId should not be exported as a type -- account, wallet: fix nonce selection -- Updated dependencies -- Updated dependencies - - @0xsequence/abi@1.7.2 - - @0xsequence/core@1.7.2 - -## 1.7.1 - -### Patch Changes - -- network: add missing avalanche logoURI -- Updated dependencies - - @0xsequence/abi@1.7.1 - - @0xsequence/core@1.7.1 - -## 1.7.0 - -### Minor Changes - -- provider: projectAccessKey is now required - -### Patch Changes - -- network: add NetworkMetadata.logoURI property for all networks -- Updated dependencies -- Updated dependencies - - @0xsequence/abi@1.7.0 - - @0xsequence/core@1.7.0 - -## 1.6.3 - -### Patch Changes - -- network list update -- Updated dependencies - - @0xsequence/abi@1.6.3 - - @0xsequence/core@1.6.3 - -## 1.6.2 - -### Patch Changes - -- auth: projectAccessKey option -- wallet: use 12 bytes for random space -- Updated dependencies -- Updated dependencies - - @0xsequence/abi@1.6.2 - - @0xsequence/core@1.6.2 - -## 1.6.1 - -### Patch Changes - -- core: add simple config from subdigest support -- core: fix encode tree with subdigest -- account: implement buildOnChainSignature on Account -- Updated dependencies -- Updated dependencies -- Updated dependencies - - @0xsequence/abi@1.6.1 - - @0xsequence/core@1.6.1 - -## 1.6.0 - -### Minor Changes - -- account, wallet: parallel transactions by default - -### Patch Changes - -- provider: emit disconnect on sign out -- Updated dependencies -- Updated dependencies - - @0xsequence/abi@1.6.0 - - @0xsequence/core@1.6.0 - -## 1.5.0 - -### Minor Changes - -- signhub: add 'signing' signer status - -### Patch Changes - -- auth: Session.open: onAccountAddress callback -- account: allow empty transaction bundles -- Updated dependencies -- Updated dependencies -- Updated dependencies - - @0xsequence/abi@1.5.0 - - @0xsequence/core@1.5.0 - -## 1.4.9 - -### Patch Changes - -- rename SequenceMetadataClient to SequenceMetadata -- Updated dependencies - - @0xsequence/abi@1.4.9 - - @0xsequence/core@1.4.9 - -## 1.4.8 - -### Patch Changes - -- account: Account.getSigners -- Updated dependencies - - @0xsequence/abi@1.4.8 - - @0xsequence/core@1.4.8 - -## 1.4.7 - -### Patch Changes - -- update indexer client bindings -- Updated dependencies - - @0xsequence/abi@1.4.7 - - @0xsequence/core@1.4.7 - -## 1.4.6 - -### Patch Changes - -- - add sepolia networks, mark goerli as deprecated - - update indexer client bindings -- Updated dependencies - - @0xsequence/abi@1.4.6 - - @0xsequence/core@1.4.6 - -## 1.4.5 - -### Patch Changes - -- indexer/metadata: update client bindings -- auth: selectWallet with new address -- Updated dependencies -- Updated dependencies - - @0xsequence/abi@1.4.5 - - @0xsequence/core@1.4.5 - -## 1.4.4 - -### Patch Changes - -- indexer: update bindings -- auth: handle jwt expiry -- Updated dependencies -- Updated dependencies - - @0xsequence/abi@1.4.4 - - @0xsequence/core@1.4.4 - -## 1.4.3 - -### Patch Changes - -- guard: return active status from GuardSigner.getAuthMethods -- Updated dependencies - - @0xsequence/abi@1.4.3 - - @0xsequence/core@1.4.3 - -## 1.4.2 - -### Patch Changes - -- guard: update bindings -- Updated dependencies - - @0xsequence/abi@1.4.2 - - @0xsequence/core@1.4.2 - -## 1.4.1 - -### Patch Changes - -- network: remove unused networks -- signhub: orchestrator interface -- guard: auth methods interface -- guard: update bindings for pin and totp -- guard: no more retry logic -- Updated dependencies -- Updated dependencies -- Updated dependencies -- Updated dependencies -- Updated dependencies - - @0xsequence/abi@1.4.1 - - @0xsequence/core@1.4.1 - -## 1.4.0 - -### Minor Changes - -- project access key support - -### Patch Changes - -- Updated dependencies - - @0xsequence/abi@1.4.0 - - @0xsequence/core@1.4.0 - -## 1.3.0 - -### Minor Changes - -- signhub: account children - -### Patch Changes - -- guard: do not throw when building deploy transaction -- network: snowtrace.io -> subnets.avax.network/c-chain -- Updated dependencies -- Updated dependencies -- Updated dependencies - - @0xsequence/abi@1.3.0 - - @0xsequence/core@1.3.0 - -## 1.2.9 - -### Patch Changes - -- account: AccountSigner.sendTransaction simulateForFeeOptions -- relayer: update bindings -- Updated dependencies -- Updated dependencies - - @0xsequence/abi@1.2.9 - - @0xsequence/core@1.2.9 - -## 1.2.8 - -### Patch Changes - -- rename X-Sequence-Token-Key header to X-Access-Key -- Updated dependencies - - @0xsequence/abi@1.2.8 - - @0xsequence/core@1.2.8 - -## 1.2.7 - -### Patch Changes - -- add x-sequence-token-key to clients -- Updated dependencies - - @0xsequence/abi@1.2.7 - - @0xsequence/core@1.2.7 - -## 1.2.6 - -### Patch Changes - -- Fix bind multicall provider -- Updated dependencies - - @0xsequence/abi@1.2.6 - - @0xsequence/core@1.2.6 - -## 1.2.5 - -### Patch Changes - -- Multicall default configuration fixes -- Updated dependencies - - @0xsequence/abi@1.2.5 - - @0xsequence/core@1.2.5 - -## 1.2.4 - -### Patch Changes - -- provider: Adding missing payment provider types to PaymentProviderOption -- provider: WalletRequestHandler.notifyChainChanged -- Updated dependencies -- Updated dependencies - - @0xsequence/abi@1.2.4 - - @0xsequence/core@1.2.4 - -## 1.2.3 - -### Patch Changes - -- auth, provider: connect to accept optional authorizeNonce -- Updated dependencies - - @0xsequence/abi@1.2.3 - - @0xsequence/core@1.2.3 - -## 1.2.2 - -### Patch Changes - -- provider: allow createContract calls -- core: check for explicit zero address in contract deployments -- Updated dependencies -- Updated dependencies - - @0xsequence/abi@1.2.2 - - @0xsequence/core@1.2.2 - -## 1.2.1 - -### Patch Changes - -- auth: use sequence api chain id as reference chain id if available -- Updated dependencies - - @0xsequence/abi@1.2.1 - - @0xsequence/core@1.2.1 - -## 1.2.0 - -### Minor Changes - -- split services from session, better local support - -### Patch Changes - -- Updated dependencies - - @0xsequence/abi@1.2.0 - - @0xsequence/core@1.2.0 - -## 1.1.15 - -### Patch Changes - -- guard: remove error filtering -- Updated dependencies - - @0xsequence/abi@1.1.15 - - @0xsequence/core@1.1.15 - -## 1.1.14 - -### Patch Changes - -- guard: add GuardSigner.onError -- Updated dependencies - - @0xsequence/abi@1.1.14 - - @0xsequence/core@1.1.14 - -## 1.1.13 - -### Patch Changes - -- provider: pass client version with connect options -- provider: removing large from BannerSize -- Updated dependencies -- Updated dependencies - - @0xsequence/abi@1.1.13 - - @0xsequence/core@1.1.13 - -## 1.1.12 - -### Patch Changes - -- provider: adding bannerSize to ConnectOptions -- Updated dependencies - - @0xsequence/abi@1.1.12 - - @0xsequence/core@1.1.12 - -## 1.1.11 - -### Patch Changes - -- add homeverse configs -- Updated dependencies - - @0xsequence/abi@1.1.11 - - @0xsequence/core@1.1.11 - -## 1.1.10 - -### Patch Changes - -- handle default EIP6492 on send -- Updated dependencies - - @0xsequence/abi@1.1.10 - - @0xsequence/core@1.1.10 - -## 1.1.9 - -### Patch Changes - -- Custom default EIP6492 on client -- Updated dependencies - - @0xsequence/abi@1.1.9 - - @0xsequence/core@1.1.9 - -## 1.1.8 - -### Patch Changes - -- metadata: searchMetadata: add types filter -- Updated dependencies - - @0xsequence/abi@1.1.8 - - @0xsequence/core@1.1.8 - -## 1.1.7 - -### Patch Changes - -- adding signInWith connect settings option to allow dapps to automatically login their users with a certain provider optimizing the normal authentication flow -- Updated dependencies - - @0xsequence/abi@1.1.7 - - @0xsequence/core@1.1.7 - -## 1.1.6 - -### Patch Changes - -- metadata: searchMetadata: add chainID and excludeTokenMetadata filters -- Updated dependencies - - @0xsequence/abi@1.1.6 - - @0xsequence/core@1.1.6 - -## 1.1.5 - -### Patch Changes - -- account: re-compute meta-transaction id for wallet deployment transactions -- Updated dependencies - - @0xsequence/abi@1.1.5 - - @0xsequence/core@1.1.5 - -## 1.1.4 - -### Patch Changes - -- network: rename base-mainnet to base -- provider: override isDefaultChain with ConnectOptions.networkId if provided -- Updated dependencies -- Updated dependencies - - @0xsequence/abi@1.1.4 - - @0xsequence/core@1.1.4 - -## 1.1.3 - -### Patch Changes - -- provider: use network id from transport session -- provider: sign authorization using ConnectOptions.networkId if provided -- Updated dependencies -- Updated dependencies - - @0xsequence/abi@1.1.3 - - @0xsequence/core@1.1.3 - -## 1.1.2 - -### Patch Changes - -- provider: jsonrpc chain id fixes -- Updated dependencies - - @0xsequence/abi@1.1.2 - - @0xsequence/core@1.1.2 - -## 1.1.1 - -### Patch Changes - -- network: add base mainnet and sepolia -- provider: reject toxic transaction requests -- Updated dependencies -- Updated dependencies - - @0xsequence/abi@1.1.1 - - @0xsequence/core@1.1.1 - -## 1.1.0 - -### Minor Changes - -- Refactor dapp facing provider - -### Patch Changes - -- Updated dependencies - - @0xsequence/abi@1.1.0 - - @0xsequence/core@1.1.0 - -## 1.0.5 - -### Patch Changes - -- network: export network constants -- guard: use the correct global for fetch -- network: nova-explorer.arbitrum.io -> nova.arbiscan.io -- Updated dependencies -- Updated dependencies -- Updated dependencies - - @0xsequence/abi@1.0.5 - - @0xsequence/core@1.0.5 - -## 1.0.4 - -### Patch Changes - -- provider: accept name or number for networkId -- Updated dependencies - - @0xsequence/abi@1.0.4 - - @0xsequence/core@1.0.4 - -## 1.0.3 - -### Patch Changes - -- Simpler isValidSignature helpers -- Updated dependencies - - @0xsequence/abi@1.0.3 - - @0xsequence/core@1.0.3 - -## 1.0.2 - -### Patch Changes - -- add extra signature validation utils methods -- Updated dependencies - - @0xsequence/abi@1.0.2 - - @0xsequence/core@1.0.2 - -## 1.0.1 - -### Patch Changes - -- add homeverse testnet -- Updated dependencies - - @0xsequence/abi@1.0.1 - - @0xsequence/core@1.0.1 - -## 1.0.0 - -### Major Changes - -- https://sequence.xyz/blog/sequence-wallet-light-state-sync-full-merkle-wallets - -### Patch Changes - -- Updated dependencies - - @0xsequence/abi@1.0.0 - - @0xsequence/core@1.0.0 diff --git a/old/packages/replacer/package.json b/old/packages/replacer/package.json deleted file mode 100644 index 379b33558..000000000 --- a/old/packages/replacer/package.json +++ /dev/null @@ -1,26 +0,0 @@ -{ - "name": "@0xsequence/replacer", - "version": "2.3.8", - "description": "EIP-5719 client implementation", - "repository": "https://github.com/0xsequence/sequence.js/tree/master/packages/replacer", - "source": "src/index.ts", - "main": "dist/0xsequence-replacer.cjs.js", - "module": "dist/0xsequence-replacer.esm.js", - "author": "Horizon Blockchain Games", - "license": "Apache-2.0", - "scripts": { - "test": "echo 'TODO: replacer tests'" - }, - "peerDependencies": { - "ethers": ">=6" - }, - "dependencies": { - "@0xsequence/abi": "workspace:*", - "@0xsequence/core": "workspace:*" - }, - "devDependencies": {}, - "files": [ - "src", - "dist" - ] -} diff --git a/old/packages/replacer/src/cached.ts b/old/packages/replacer/src/cached.ts deleted file mode 100644 index 96e8043fe..000000000 --- a/old/packages/replacer/src/cached.ts +++ /dev/null @@ -1,31 +0,0 @@ -import { ethers } from 'ethers' -import { runByEIP5719, URISolver } from '.' - -export class CachedEIP5719 { - constructor( - public provider: ethers.Provider, - public solver?: URISolver, - public window: number = 1000 - ) {} - - private pending: Map< - string, - { - timestamp: number - promise: Promise - } - > = new Map() - - async runByEIP5719(address: string, digest: ethers.BytesLike, signature: ethers.BytesLike): Promise { - const key = `${address}-${digest}-${signature}` - const now = Date.now() - - if (this.pending.has(key) && now - this.pending.get(key)!.timestamp < this.window) { - return this.pending.get(key)!.promise - } - - const promise = runByEIP5719(address, this.provider, digest, signature, this.solver) - this.pending.set(key, { timestamp: now, promise }) - return promise - } -} diff --git a/old/packages/replacer/src/index.ts b/old/packages/replacer/src/index.ts deleted file mode 100644 index 9811b0001..000000000 --- a/old/packages/replacer/src/index.ts +++ /dev/null @@ -1,119 +0,0 @@ -import { ethers } from 'ethers' -import { walletContracts } from '@0xsequence/abi' -import { isIPFS, useGateway } from './ipfs' -import { commons } from '@0xsequence/core' - -export * from './cached' - -export function eip5719Contract(address: string, provider: ethers.Provider): ethers.Contract { - // TODO: for some reason walletContracts is not being loaded from local - // remove this code once fixed - const abi = [ - { - inputs: [ - { - internalType: 'bytes32', - type: 'bytes32' - } - ], - name: 'getAlternativeSignature', - outputs: [ - { - internalType: 'string', - type: 'string' - } - ], - stateMutability: 'view', - type: 'function' - } - ] - - return new ethers.Contract(address, abi, provider) -} - -export function eip1271Contract(address: string, provider: ethers.Provider): ethers.Contract { - return new ethers.Contract(address, walletContracts.erc1271.abi, provider) -} - -export async function isValidSignature( - address: string, - provider: ethers.Provider, - digest: ethers.BytesLike, - signature: ethers.BytesLike -): Promise { - // First we try to validate the signature using Ethers - try { - const addr = ethers.recoverAddress(digest, ethers.hexlify(signature)) - if (addr.toLowerCase() === address.toLowerCase()) return true - } catch {} - - // Then we try to validate the signature using EIP1271 - try { - const contract = eip1271Contract(address, provider) - const value = await contract.isValidSignature(digest, signature) - if (value === walletContracts.erc1271.returns) return true - } catch {} - - // If all else fails, we return false - return false -} - -export interface URISolver { - resolve: (uri: string) => Promise -} - -async function tryAwait(promise: Promise): Promise { - try { - return await promise - } catch { - return undefined - } -} - -export async function runByEIP5719( - address: string, - provider: ethers.Provider, - digest: ethers.BytesLike, - signature: ethers.BytesLike, - solver?: URISolver, - tries: number = 0 -): Promise { - if (tries > 10) throw new Error('EIP5719 - Too many tries') - - if (commons.signer.canRecover(signature)) { - const recoveredAddr = commons.signer.recoverSigner(digest, signature) - if (recoveredAddr && recoveredAddr.toLowerCase() === address.toLowerCase()) return signature - } - - try { - if (await commons.signer.isValidSignature(address, digest, signature, provider)) { - return signature - } - } catch {} - - const altUri = await tryAwait(eip5719Contract(address, provider).getAlternativeSignature(digest) as Promise) - if (!altUri || altUri === '') throw new Error('EIP5719 - Invalid signature and no alternative signature') - - const altSignature = ethers.hexlify(await (solver || new URISolverIPFS()).resolve(altUri)) - if (!altSignature || altSignature === '') throw new Error('EIP5719 - Empty alternative signature') - if (altSignature === ethers.hexlify(signature)) { - throw new Error('EIP5719 - Alternative signature is invalid or the same') - } - return runByEIP5719(address, provider, digest, altSignature, solver, tries + 1) -} - -export class URISolverIPFS implements URISolver { - constructor(public gateway: string = 'https://cloudflare-ipfs.com/ipfs/') {} - - uri = (uri: string): string => { - if (isIPFS(uri)) return useGateway(uri, this.gateway) - return uri - } - - resolve = async (uri: string): Promise => { - const url = this.uri(uri) - const res = await fetch(url) - if (!res.ok) throw new Error(`URISolverIPFS - Failed to fetch ${url}`) - return await res.text() - } -} diff --git a/old/packages/replacer/src/ipfs.ts b/old/packages/replacer/src/ipfs.ts deleted file mode 100644 index 2e6c64ddc..000000000 --- a/old/packages/replacer/src/ipfs.ts +++ /dev/null @@ -1,9 +0,0 @@ -export function useGateway(uri: string, gateway: string) { - const clean = uri.replace('ipfs://ipfs/', '').replace('ipfs://', '') - if (uri.startsWith('ipfs://')) return `${gateway}${clean}` - return uri -} - -export function isIPFS(uri: string): boolean { - return uri.startsWith('ipfs://') -} diff --git a/old/packages/sessions/CHANGELOG.md b/old/packages/sessions/CHANGELOG.md deleted file mode 100644 index 0c32ce2af..000000000 --- a/old/packages/sessions/CHANGELOG.md +++ /dev/null @@ -1,1946 +0,0 @@ -# @0xsequence/sessions - -## 2.3.8 - -### Patch Changes - -- indexer: update clients -- Updated dependencies - - @0xsequence/core@2.3.8 - - @0xsequence/migration@2.3.8 - - @0xsequence/replacer@2.3.8 - - @0xsequence/utils@2.3.8 - -## 2.3.7 - -### Patch Changes - -- Metadata updates -- Updated dependencies - - @0xsequence/core@2.3.7 - - @0xsequence/migration@2.3.7 - - @0xsequence/replacer@2.3.7 - - @0xsequence/utils@2.3.7 - -## 2.3.6 - -### Patch Changes - -- New chains -- Updated dependencies - - @0xsequence/core@2.3.6 - - @0xsequence/migration@2.3.6 - - @0xsequence/replacer@2.3.6 - - @0xsequence/utils@2.3.6 - -## 2.3.5 - -### Patch Changes - -- Add Frequency Testnet -- Updated dependencies - - @0xsequence/core@2.3.5 - - @0xsequence/migration@2.3.5 - - @0xsequence/replacer@2.3.5 - - @0xsequence/utils@2.3.5 - -## 2.3.4 - -### Patch Changes - -- metadata: exclude deprecated methods on rpc client -- Updated dependencies - - @0xsequence/core@2.3.4 - - @0xsequence/migration@2.3.4 - - @0xsequence/replacer@2.3.4 - - @0xsequence/utils@2.3.4 - -## 2.3.3 - -### Patch Changes - -- metadata: client update -- Updated dependencies - - @0xsequence/core@2.3.3 - - @0xsequence/migration@2.3.3 - - @0xsequence/replacer@2.3.3 - - @0xsequence/utils@2.3.3 - -## 2.3.2 - -### Patch Changes - -- metadata: update rpc client -- Updated dependencies - - @0xsequence/core@2.3.2 - - @0xsequence/migration@2.3.2 - - @0xsequence/replacer@2.3.2 - - @0xsequence/utils@2.3.2 - -## 2.3.1 - -### Patch Changes - -- indexer: update rpc client -- Updated dependencies - - @0xsequence/core@2.3.1 - - @0xsequence/migration@2.3.1 - - @0xsequence/replacer@2.3.1 - - @0xsequence/utils@2.3.1 - -## 2.3.0 - -### Minor Changes - -- update metadata rpc client - -### Patch Changes - -- Updated dependencies - - @0xsequence/core@2.3.0 - - @0xsequence/migration@2.3.0 - - @0xsequence/replacer@2.3.0 - - @0xsequence/utils@2.3.0 - -## 2.2.15 - -### Patch Changes - -- API updates -- Updated dependencies - - @0xsequence/core@2.2.15 - - @0xsequence/migration@2.2.15 - - @0xsequence/replacer@2.2.15 - - @0xsequence/utils@2.2.15 - -## 2.2.14 - -### Patch Changes - -- Somnia Testnet and Monad Testnet -- Updated dependencies - - @0xsequence/core@2.2.14 - - @0xsequence/migration@2.2.14 - - @0xsequence/replacer@2.2.14 - - @0xsequence/utils@2.2.14 - -## 2.2.13 - -### Patch Changes - -- Add XR1 to all networks -- Updated dependencies - - @0xsequence/core@2.2.13 - - @0xsequence/migration@2.2.13 - - @0xsequence/replacer@2.2.13 - - @0xsequence/utils@2.2.13 - -## 2.2.12 - -### Patch Changes - -- Add XR1 -- Updated dependencies - - @0xsequence/core@2.2.12 - - @0xsequence/migration@2.2.12 - - @0xsequence/replacer@2.2.12 - - @0xsequence/utils@2.2.12 - -## 2.2.11 - -### Patch Changes - -- Relayer updates -- Updated dependencies - - @0xsequence/core@2.2.11 - - @0xsequence/migration@2.2.11 - - @0xsequence/replacer@2.2.11 - - @0xsequence/utils@2.2.11 - -## 2.2.10 - -### Patch Changes - -- Etherlink support -- Updated dependencies - - @0xsequence/core@2.2.10 - - @0xsequence/migration@2.2.10 - - @0xsequence/replacer@2.2.10 - - @0xsequence/utils@2.2.10 - -## 2.2.9 - -### Patch Changes - -- Indexer gateway native token balances -- Updated dependencies - - @0xsequence/core@2.2.9 - - @0xsequence/migration@2.2.9 - - @0xsequence/replacer@2.2.9 - - @0xsequence/utils@2.2.9 - -## 2.2.8 - -### Patch Changes - -- Add Moonbeam and Moonbase Alpha -- Updated dependencies - - @0xsequence/core@2.2.8 - - @0xsequence/migration@2.2.8 - - @0xsequence/replacer@2.2.8 - - @0xsequence/utils@2.2.8 - -## 2.2.7 - -### Patch Changes - -- Update Builder package -- Updated dependencies - - @0xsequence/core@2.2.7 - - @0xsequence/migration@2.2.7 - - @0xsequence/replacer@2.2.7 - - @0xsequence/utils@2.2.7 - -## 2.2.6 - -### Patch Changes - -- Update relayer package -- Updated dependencies - - @0xsequence/core@2.2.6 - - @0xsequence/migration@2.2.6 - - @0xsequence/replacer@2.2.6 - - @0xsequence/utils@2.2.6 - -## 2.2.5 - -### Patch Changes - -- auth: fix sequence indexer gateway url -- account: immutable wallet proxy hook -- Updated dependencies -- Updated dependencies - - @0xsequence/core@2.2.5 - - @0xsequence/migration@2.2.5 - - @0xsequence/replacer@2.2.5 - - @0xsequence/utils@2.2.5 - -## 2.2.4 - -### Patch Changes - -- network: update soneium mainnet block explorer url -- waas: signTypedData intent support -- Updated dependencies -- Updated dependencies - - @0xsequence/core@2.2.4 - - @0xsequence/migration@2.2.4 - - @0xsequence/replacer@2.2.4 - - @0xsequence/utils@2.2.4 - -## 2.2.3 - -### Patch Changes - -- provider: updating initWallet to use connected network configs if they exist -- Updated dependencies - - @0xsequence/core@2.2.3 - - @0xsequence/migration@2.2.3 - - @0xsequence/replacer@2.2.3 - - @0xsequence/utils@2.2.3 - -## 2.2.2 - -### Patch Changes - -- pass projectAccessKey to relayer at all times -- Updated dependencies - - @0xsequence/core@2.2.2 - - @0xsequence/migration@2.2.2 - - @0xsequence/replacer@2.2.2 - - @0xsequence/utils@2.2.2 - -## 2.2.1 - -### Patch Changes - -- waas-ethers: sign typed data -- Updated dependencies - - @0xsequence/core@2.2.1 - - @0xsequence/migration@2.2.1 - - @0xsequence/replacer@2.2.1 - - @0xsequence/utils@2.2.1 - -## 2.2.0 - -### Minor Changes - -- indexer: gateway client -- @0xsequence/builder -- upgrade puppeteer to v23.10.3 - -### Patch Changes - -- Updated dependencies -- Updated dependencies -- Updated dependencies - - @0xsequence/core@2.2.0 - - @0xsequence/migration@2.2.0 - - @0xsequence/replacer@2.2.0 - - @0xsequence/utils@2.2.0 - -## 2.1.8 - -### Patch Changes - -- Add Soneium Mainnet -- Updated dependencies - - @0xsequence/core@2.1.8 - - @0xsequence/migration@2.1.8 - - @0xsequence/replacer@2.1.8 - - @0xsequence/utils@2.1.8 - -## 2.1.7 - -### Patch Changes - -- guard: pass project access key to guard requests -- Updated dependencies - - @0xsequence/core@2.1.7 - - @0xsequence/migration@2.1.7 - - @0xsequence/replacer@2.1.7 - - @0xsequence/utils@2.1.7 - -## 2.1.6 - -### Patch Changes - -- Add LAOS and Telos Testnet chains -- Updated dependencies - - @0xsequence/core@2.1.6 - - @0xsequence/migration@2.1.6 - - @0xsequence/replacer@2.1.6 - - @0xsequence/utils@2.1.6 - -## 2.1.5 - -### Patch Changes - -- account: save presigned configuration with reference chain id 1 -- Updated dependencies - - @0xsequence/core@2.1.5 - - @0xsequence/migration@2.1.5 - - @0xsequence/replacer@2.1.5 - - @0xsequence/utils@2.1.5 - -## 2.1.4 - -### Patch Changes - -- provider: pass projectAccessKey into MuxMessageProvider -- Updated dependencies - - @0xsequence/core@2.1.4 - - @0xsequence/migration@2.1.4 - - @0xsequence/replacer@2.1.4 - - @0xsequence/utils@2.1.4 - -## 2.1.3 - -### Patch Changes - -- waas: time drift date fix due to strange browser quirk -- Updated dependencies - - @0xsequence/core@2.1.3 - - @0xsequence/migration@2.1.3 - - @0xsequence/replacer@2.1.3 - - @0xsequence/utils@2.1.3 - -## 2.1.2 - -### Patch Changes - -- provider: export analytics correctly -- Updated dependencies - - @0xsequence/core@2.1.2 - - @0xsequence/migration@2.1.2 - - @0xsequence/replacer@2.1.2 - - @0xsequence/utils@2.1.2 - -## 2.1.1 - -### Patch Changes - -- Add LAOS chain support -- Updated dependencies - - @0xsequence/core@2.1.1 - - @0xsequence/migration@2.1.1 - - @0xsequence/replacer@2.1.1 - - @0xsequence/utils@2.1.1 - -## 2.1.0 - -### Minor Changes - -- account: forward project access key when estimating fees and sending transactions - -### Patch Changes - -- sessions: save signatures with reference chain id -- Updated dependencies -- Updated dependencies - - @0xsequence/core@2.1.0 - - @0xsequence/migration@2.1.0 - - @0xsequence/replacer@2.1.0 - - @0xsequence/utils@2.1.0 - -## 2.0.26 - -### Patch Changes - -- account: fix chain id comparison -- Updated dependencies - - @0xsequence/core@2.0.26 - - @0xsequence/migration@2.0.26 - - @0xsequence/replacer@2.0.26 - - @0xsequence/utils@2.0.26 - -## 2.0.25 - -### Patch Changes - -- skale-nebula: deploy gas limit = 10m -- Updated dependencies - - @0xsequence/core@2.0.25 - - @0xsequence/migration@2.0.25 - - @0xsequence/replacer@2.0.25 - - @0xsequence/utils@2.0.25 - -## 2.0.24 - -### Patch Changes - -- sessions: arweave: configurable gateway url -- waas: use /status to get time drift before sending any intents -- Updated dependencies -- Updated dependencies - - @0xsequence/core@2.0.24 - - @0xsequence/migration@2.0.24 - - @0xsequence/replacer@2.0.24 - - @0xsequence/utils@2.0.24 - -## 2.0.23 - -### Patch Changes - -- Add The Root Network support -- Updated dependencies - - @0xsequence/core@2.0.23 - - @0xsequence/migration@2.0.23 - - @0xsequence/replacer@2.0.23 - - @0xsequence/utils@2.0.23 - -## 2.0.22 - -### Patch Changes - -- Add SKALE Nebula Mainnet support -- Updated dependencies - - @0xsequence/core@2.0.22 - - @0xsequence/migration@2.0.22 - - @0xsequence/replacer@2.0.22 - - @0xsequence/utils@2.0.22 - -## 2.0.21 - -### Patch Changes - -- account: add publishWitnessFor -- Updated dependencies - - @0xsequence/core@2.0.21 - - @0xsequence/migration@2.0.21 - - @0xsequence/replacer@2.0.21 - - @0xsequence/utils@2.0.21 - -## 2.0.20 - -### Patch Changes - -- upgrade deps, and improve waas session status handling -- Updated dependencies - - @0xsequence/core@2.0.20 - - @0xsequence/migration@2.0.20 - - @0xsequence/replacer@2.0.20 - - @0xsequence/utils@2.0.20 - -## 2.0.19 - -### Patch Changes - -- Add Immutable zkEVM support -- Updated dependencies - - @0xsequence/core@2.0.19 - - @0xsequence/migration@2.0.19 - - @0xsequence/replacer@2.0.19 - - @0xsequence/utils@2.0.19 - -## 2.0.18 - -### Patch Changes - -- waas: new contractCall transaction type -- sessions: add arweave owner -- Updated dependencies -- Updated dependencies - - @0xsequence/core@2.0.18 - - @0xsequence/migration@2.0.18 - - @0xsequence/replacer@2.0.18 - - @0xsequence/utils@2.0.18 - -## 2.0.17 - -### Patch Changes - -- update waas auth to clear session before signIn -- Updated dependencies - - @0xsequence/core@2.0.17 - - @0xsequence/migration@2.0.17 - - @0xsequence/replacer@2.0.17 - - @0xsequence/utils@2.0.17 - -## 2.0.16 - -### Patch Changes - -- Removed Astar chains -- Updated dependencies - - @0xsequence/core@2.0.16 - - @0xsequence/migration@2.0.16 - - @0xsequence/replacer@2.0.16 - - @0xsequence/utils@2.0.16 - -## 2.0.15 - -### Patch Changes - -- indexer: update bindings with token balance additions -- Updated dependencies - - @0xsequence/core@2.0.15 - - @0xsequence/migration@2.0.15 - - @0xsequence/replacer@2.0.15 - - @0xsequence/utils@2.0.15 - -## 2.0.14 - -### Patch Changes - -- sessions: arweave config reader -- network: add b3 and apechain mainnet configs -- Updated dependencies -- Updated dependencies - - @0xsequence/core@2.0.14 - - @0xsequence/migration@2.0.14 - - @0xsequence/replacer@2.0.14 - - @0xsequence/utils@2.0.14 - -## 2.0.13 - -### Patch Changes - -- network: toy-testnet -- Updated dependencies - - @0xsequence/core@2.0.13 - - @0xsequence/migration@2.0.13 - - @0xsequence/replacer@2.0.13 - - @0xsequence/utils@2.0.13 - -## 2.0.12 - -### Patch Changes - -- api: update bindings -- Updated dependencies - - @0xsequence/core@2.0.12 - - @0xsequence/migration@2.0.12 - - @0xsequence/replacer@2.0.12 - - @0xsequence/utils@2.0.12 - -## 2.0.11 - -### Patch Changes - -- waas: intents test fix -- api: update bindings -- Updated dependencies -- Updated dependencies - - @0xsequence/core@2.0.11 - - @0xsequence/migration@2.0.11 - - @0xsequence/replacer@2.0.11 - - @0xsequence/utils@2.0.11 - -## 2.0.10 - -### Patch Changes - -- network: soneium minato testnet -- Updated dependencies - - @0xsequence/core@2.0.10 - - @0xsequence/migration@2.0.10 - - @0xsequence/replacer@2.0.10 - - @0xsequence/utils@2.0.10 - -## 2.0.9 - -### Patch Changes - -- network: fix SKALE network name -- Updated dependencies - - @0xsequence/core@2.0.9 - - @0xsequence/migration@2.0.9 - - @0xsequence/replacer@2.0.9 - - @0xsequence/utils@2.0.9 - -## 2.0.8 - -### Patch Changes - -- metadata: update bindings -- Updated dependencies - - @0xsequence/core@2.0.8 - - @0xsequence/migration@2.0.8 - - @0xsequence/replacer@2.0.8 - - @0xsequence/utils@2.0.8 - -## 2.0.7 - -### Patch Changes - -- wallet request handler fix -- Updated dependencies - - @0xsequence/core@2.0.7 - - @0xsequence/migration@2.0.7 - - @0xsequence/replacer@2.0.7 - - @0xsequence/utils@2.0.7 - -## 2.0.6 - -### Patch Changes - -- network: matic -> pol -- Updated dependencies - - @0xsequence/core@2.0.6 - - @0xsequence/migration@2.0.6 - - @0xsequence/replacer@2.0.6 - - @0xsequence/utils@2.0.6 - -## 2.0.5 - -### Patch Changes - -- provider: update databeat to 0.9.2 -- Updated dependencies - - @0xsequence/core@2.0.5 - - @0xsequence/migration@2.0.5 - - @0xsequence/replacer@2.0.5 - - @0xsequence/utils@2.0.5 - -## 2.0.4 - -### Patch Changes - -- network: add skale-nebula-testnet -- Updated dependencies - - @0xsequence/core@2.0.4 - - @0xsequence/migration@2.0.4 - - @0xsequence/replacer@2.0.4 - - @0xsequence/utils@2.0.4 - -## 2.0.3 - -### Patch Changes - -- waas: check session status in SequenceWaaS.isSignedIn() -- Updated dependencies - - @0xsequence/core@2.0.3 - - @0xsequence/migration@2.0.3 - - @0xsequence/replacer@2.0.3 - - @0xsequence/utils@2.0.3 - -## 2.0.2 - -### Patch Changes - -- sessions: property convert serialized bignumber hex value to bigint -- Updated dependencies - - @0xsequence/core@2.0.2 - - @0xsequence/migration@2.0.2 - - @0xsequence/replacer@2.0.2 - - @0xsequence/utils@2.0.2 - -## 2.0.1 - -### Patch Changes - -- waas: http signature check for authenticator requests -- provider: unwrap legacy json rpc responses -- use json replacer and reviver for bigints -- Updated dependencies -- Updated dependencies -- Updated dependencies - - @0xsequence/core@2.0.1 - - @0xsequence/migration@2.0.1 - - @0xsequence/replacer@2.0.1 - - @0xsequence/utils@2.0.1 - -## 2.0.0 - -### Major Changes - -- ethers v6 - -### Patch Changes - -- Updated dependencies - - @0xsequence/core@2.0.0 - - @0xsequence/migration@2.0.0 - - @0xsequence/replacer@2.0.0 - -## 1.10.15 - -### Patch Changes - -- utils: extractProjectIdFromAccessKey -- Updated dependencies - - @0xsequence/core@1.10.15 - - @0xsequence/migration@1.10.15 - - @0xsequence/replacer@1.10.15 - -## 1.10.14 - -### Patch Changes - -- network: add borne-testnet to allNetworks -- Updated dependencies - - @0xsequence/core@1.10.14 - - @0xsequence/migration@1.10.14 - - @0xsequence/replacer@1.10.14 - -## 1.10.13 - -### Patch Changes - -- network: add borne testnet -- Updated dependencies - - @0xsequence/core@1.10.13 - - @0xsequence/migration@1.10.13 - - @0xsequence/replacer@1.10.13 - -## 1.10.12 - -### Patch Changes - -- api: update bindings -- global/window -> globalThis -- Updated dependencies -- Updated dependencies - - @0xsequence/core@1.10.12 - - @0xsequence/migration@1.10.12 - - @0xsequence/replacer@1.10.12 - -## 1.10.11 - -### Patch Changes - -- waas: updated intent.gen without webrpc types, errors exported from authenticator.gen -- Updated dependencies - - @0xsequence/core@1.10.11 - - @0xsequence/migration@1.10.11 - - @0xsequence/replacer@1.10.11 - -## 1.10.10 - -### Patch Changes - -- metadata: update bindings with new contract collections api -- Updated dependencies - - @0xsequence/core@1.10.10 - - @0xsequence/migration@1.10.10 - - @0xsequence/replacer@1.10.10 - -## 1.10.9 - -### Patch Changes - -- waas minor update -- Updated dependencies - - @0xsequence/core@1.10.9 - - @0xsequence/migration@1.10.9 - - @0xsequence/replacer@1.10.9 - -## 1.10.8 - -### Patch Changes - -- update metadata bindings -- Updated dependencies - - @0xsequence/core@1.10.8 - - @0xsequence/migration@1.10.8 - - @0xsequence/replacer@1.10.8 - -## 1.10.7 - -### Patch Changes - -- minor fixes to waas client -- Updated dependencies - - @0xsequence/core@1.10.7 - - @0xsequence/migration@1.10.7 - - @0xsequence/replacer@1.10.7 - -## 1.10.6 - -### Patch Changes - -- metadata: update bindings -- Updated dependencies - - @0xsequence/core@1.10.6 - - @0xsequence/migration@1.10.6 - - @0xsequence/replacer@1.10.6 - -## 1.10.5 - -### Patch Changes - -- network: ape-chain-testnet -> apechain-testnet -- Updated dependencies - - @0xsequence/core@1.10.5 - - @0xsequence/migration@1.10.5 - - @0xsequence/replacer@1.10.5 - -## 1.10.4 - -### Patch Changes - -- network: add b3-sepolia, ape-chain-testnet, blast, blast-sepolia -- Updated dependencies - - @0xsequence/core@1.10.4 - - @0xsequence/migration@1.10.4 - - @0xsequence/replacer@1.10.4 - -## 1.10.3 - -### Patch Changes - -- typing fix -- Updated dependencies - - @0xsequence/core@1.10.3 - - @0xsequence/migration@1.10.3 - - @0xsequence/replacer@1.10.3 - -## 1.10.2 - -### Patch Changes - -- - waas: add getIdToken method - - indexer: update api client -- Updated dependencies - - @0xsequence/core@1.10.2 - - @0xsequence/migration@1.10.2 - - @0xsequence/replacer@1.10.2 - -## 1.10.1 - -### Patch Changes - -- metadata: update bindings -- Updated dependencies - - @0xsequence/core@1.10.1 - - @0xsequence/migration@1.10.1 - - @0xsequence/replacer@1.10.1 - -## 1.10.0 - -### Minor Changes - -- waas release v1.3.0 - -### Patch Changes - -- Updated dependencies - - @0xsequence/core@1.10.0 - - @0xsequence/migration@1.10.0 - - @0xsequence/replacer@1.10.0 - -## 1.9.37 - -### Patch Changes - -- network: adds nativeToken data to NetworkMetadata constants -- Updated dependencies - - @0xsequence/core@1.9.37 - - @0xsequence/migration@1.9.37 - - @0xsequence/replacer@1.9.37 - -## 1.9.36 - -### Patch Changes - -- guard: export client -- Updated dependencies - - @0xsequence/core@1.9.36 - - @0xsequence/migration@1.9.36 - - @0xsequence/replacer@1.9.36 - -## 1.9.35 - -### Patch Changes - -- guard: update bindings -- Updated dependencies - - @0xsequence/core@1.9.35 - - @0xsequence/migration@1.9.35 - - @0xsequence/replacer@1.9.35 - -## 1.9.34 - -### Patch Changes - -- waas: always use lowercase email -- Updated dependencies - - @0xsequence/core@1.9.34 - - @0xsequence/migration@1.9.34 - - @0xsequence/replacer@1.9.34 - -## 1.9.33 - -### Patch Changes - -- waas: umd build -- Updated dependencies - - @0xsequence/core@1.9.33 - - @0xsequence/migration@1.9.33 - - @0xsequence/replacer@1.9.33 - -## 1.9.32 - -### Patch Changes - -- indexer: update bindings -- Updated dependencies - - @0xsequence/core@1.9.32 - - @0xsequence/migration@1.9.32 - - @0xsequence/replacer@1.9.32 - -## 1.9.31 - -### Patch Changes - -- metadata: token directory changes -- Updated dependencies - - @0xsequence/core@1.9.31 - - @0xsequence/migration@1.9.31 - - @0xsequence/replacer@1.9.31 - -## 1.9.30 - -### Patch Changes - -- update -- Updated dependencies - - @0xsequence/core@1.9.30 - - @0xsequence/migration@1.9.30 - - @0xsequence/replacer@1.9.30 - -## 1.9.29 - -### Patch Changes - -- disable gnosis chain -- Updated dependencies - - @0xsequence/core@1.9.29 - - @0xsequence/migration@1.9.29 - - @0xsequence/replacer@1.9.29 - -## 1.9.28 - -### Patch Changes - -- add utils/merkletree -- Updated dependencies - - @0xsequence/core@1.9.28 - - @0xsequence/migration@1.9.28 - - @0xsequence/replacer@1.9.28 - -## 1.9.27 - -### Patch Changes - -- network: optimistic -> optimism -- waas: remove defaults -- api, sessions: update bindings -- Updated dependencies -- Updated dependencies -- Updated dependencies - - @0xsequence/core@1.9.27 - - @0xsequence/migration@1.9.27 - - @0xsequence/replacer@1.9.27 - -## 1.9.26 - -### Patch Changes - -- - add backend interfaces for pluggable interfaces - - introduce @0xsequence/react-native - - update pnpm to lockfile v9 -- Updated dependencies - - @0xsequence/core@1.9.26 - - @0xsequence/migration@1.9.26 - - @0xsequence/replacer@1.9.26 - -## 1.9.25 - -### Patch Changes - -- update webrpc clients with new error types -- Updated dependencies - - @0xsequence/core@1.9.25 - - @0xsequence/migration@1.9.25 - - @0xsequence/replacer@1.9.25 - -## 1.9.24 - -### Patch Changes - -- waas: add memoryStore backend to localStore -- Updated dependencies - - @0xsequence/core@1.9.24 - - @0xsequence/migration@1.9.24 - - @0xsequence/replacer@1.9.24 - -## 1.9.23 - -### Patch Changes - -- update api client bindings -- Updated dependencies - - @0xsequence/core@1.9.23 - - @0xsequence/migration@1.9.23 - - @0xsequence/replacer@1.9.23 - -## 1.9.22 - -### Patch Changes - -- update metadata client bindings -- Updated dependencies - - @0xsequence/core@1.9.22 - - @0xsequence/migration@1.9.22 - - @0xsequence/replacer@1.9.22 - -## 1.9.21 - -### Patch Changes - -- api client bindings -- Updated dependencies - - @0xsequence/core@1.9.21 - - @0xsequence/migration@1.9.21 - - @0xsequence/replacer@1.9.21 - -## 1.9.20 - -### Patch Changes - -- api client bindings update -- Updated dependencies - - @0xsequence/core@1.9.20 - - @0xsequence/migration@1.9.20 - - @0xsequence/replacer@1.9.20 - -## 1.9.19 - -### Patch Changes - -- waas update -- Updated dependencies - - @0xsequence/core@1.9.19 - - @0xsequence/migration@1.9.19 - - @0xsequence/replacer@1.9.19 - -## 1.9.18 - -### Patch Changes - -- provider: prohibit dangerous functions -- Updated dependencies - - @0xsequence/core@1.9.18 - - @0xsequence/migration@1.9.18 - - @0xsequence/replacer@1.9.18 - -## 1.9.17 - -### Patch Changes - -- network: add xr-sepolia -- Updated dependencies - - @0xsequence/core@1.9.17 - - @0xsequence/migration@1.9.17 - - @0xsequence/replacer@1.9.17 - -## 1.9.16 - -### Patch Changes - -- waas: sequence.feeOptions -- Updated dependencies - - @0xsequence/core@1.9.16 - - @0xsequence/migration@1.9.16 - - @0xsequence/replacer@1.9.16 - -## 1.9.15 - -### Patch Changes - -- metadata: collection external_link field name fix -- Updated dependencies - - @0xsequence/core@1.9.15 - - @0xsequence/migration@1.9.15 - - @0xsequence/replacer@1.9.15 - -## 1.9.14 - -### Patch Changes - -- network: astar-zkatana -> astar-zkyoto -- network: deprecate polygon mumbai network -- network: add xai and polygon amoy -- Updated dependencies -- Updated dependencies -- Updated dependencies - - @0xsequence/core@1.9.14 - - @0xsequence/migration@1.9.14 - - @0xsequence/replacer@1.9.14 - -## 1.9.13 - -### Patch Changes - -- waas: fix @0xsequence/network dependency -- Updated dependencies - - @0xsequence/core@1.9.13 - - @0xsequence/migration@1.9.13 - - @0xsequence/replacer@1.9.13 - -## 1.9.12 - -### Patch Changes - -- indexer: update rpc bindings -- provider: signMessage: Serialize the BytesLike or string message into hexstring before sending -- waas: SessionAuthProof -- Updated dependencies -- Updated dependencies -- Updated dependencies - - @0xsequence/core@1.9.12 - - @0xsequence/migration@1.9.12 - - @0xsequence/replacer@1.9.12 - -## 1.9.11 - -### Patch Changes - -- metdata, update rpc bindings -- Updated dependencies - - @0xsequence/core@1.9.11 - - @0xsequence/migration@1.9.11 - - @0xsequence/replacer@1.9.11 - -## 1.9.10 - -### Patch Changes - -- update metadata rpc bindings -- Updated dependencies - - @0xsequence/core@1.9.10 - - @0xsequence/migration@1.9.10 - - @0xsequence/replacer@1.9.10 - -## 1.9.9 - -### Patch Changes - -- metadata, add SequenceCollections rpc client -- Updated dependencies - - @0xsequence/core@1.9.9 - - @0xsequence/migration@1.9.9 - - @0xsequence/replacer@1.9.9 - -## 1.9.8 - -### Patch Changes - -- waas client update -- Updated dependencies - - @0xsequence/core@1.9.8 - - @0xsequence/migration@1.9.8 - - @0xsequence/replacer@1.9.8 - -## 1.9.7 - -### Patch Changes - -- update rpc client bindings for api, metadata and relayer -- Updated dependencies - - @0xsequence/core@1.9.7 - - @0xsequence/migration@1.9.7 - - @0xsequence/replacer@1.9.7 - -## 1.9.6 - -### Patch Changes - -- waas package update -- Updated dependencies - - @0xsequence/core@1.9.6 - - @0xsequence/migration@1.9.6 - - @0xsequence/replacer@1.9.6 - -## 1.9.5 - -### Patch Changes - -- RpcRelayer prioritize project access key -- Updated dependencies - - @0xsequence/core@1.9.5 - - @0xsequence/migration@1.9.5 - - @0xsequence/replacer@1.9.5 - -## 1.9.4 - -### Patch Changes - -- waas: fix network dependency -- Updated dependencies - - @0xsequence/core@1.9.4 - - @0xsequence/migration@1.9.4 - - @0xsequence/replacer@1.9.4 - -## 1.9.3 - -### Patch Changes - -- provider: don't append access key to RPC url if user has already provided it -- Updated dependencies - - @0xsequence/core@1.9.3 - - @0xsequence/migration@1.9.3 - - @0xsequence/replacer@1.9.3 - -## 1.9.2 - -### Patch Changes - -- network: add xai-sepolia -- Updated dependencies - - @0xsequence/core@1.9.2 - - @0xsequence/migration@1.9.2 - - @0xsequence/replacer@1.9.2 - -## 1.9.1 - -### Patch Changes - -- analytics fix -- Updated dependencies - - @0xsequence/core@1.9.1 - - @0xsequence/migration@1.9.1 - - @0xsequence/replacer@1.9.1 - -## 1.9.0 - -### Minor Changes - -- waas release - -### Patch Changes - -- Updated dependencies - - @0xsequence/core@1.9.0 - - @0xsequence/migration@1.9.0 - - @0xsequence/replacer@1.9.0 - -## 1.8.8 - -### Patch Changes - -- update metadata bindings -- Updated dependencies - - @0xsequence/core@1.8.8 - - @0xsequence/migration@1.8.8 - - @0xsequence/replacer@1.8.8 - -## 1.8.7 - -### Patch Changes - -- provider: update databeat to 0.9.1 -- Updated dependencies - - @0xsequence/core@1.8.7 - - @0xsequence/migration@1.8.7 - - @0xsequence/replacer@1.8.7 - -## 1.8.6 - -### Patch Changes - -- guard: SignedOwnershipProof -- Updated dependencies - - @0xsequence/core@1.8.6 - - @0xsequence/migration@1.8.6 - - @0xsequence/replacer@1.8.6 - -## 1.8.5 - -### Patch Changes - -- guard: signOwnershipProof and isSignedOwnershipProof -- Updated dependencies - - @0xsequence/core@1.8.5 - - @0xsequence/migration@1.8.5 - - @0xsequence/replacer@1.8.5 - -## 1.8.4 - -### Patch Changes - -- network: add homeverse to networks list -- Updated dependencies - - @0xsequence/core@1.8.4 - - @0xsequence/migration@1.8.4 - - @0xsequence/replacer@1.8.4 - -## 1.8.3 - -### Patch Changes - -- api: introduce basic linked wallet support -- Updated dependencies - - @0xsequence/core@1.8.3 - - @0xsequence/migration@1.8.3 - - @0xsequence/replacer@1.8.3 - -## 1.8.2 - -### Patch Changes - -- provider: don't initialize analytics unless explicitly requested -- Updated dependencies - - @0xsequence/core@1.8.2 - - @0xsequence/migration@1.8.2 - - @0xsequence/replacer@1.8.2 - -## 1.8.1 - -### Patch Changes - -- update to analytics provider -- Updated dependencies - - @0xsequence/core@1.8.1 - - @0xsequence/migration@1.8.1 - - @0xsequence/replacer@1.8.1 - -## 1.8.0 - -### Minor Changes - -- provider: project analytics - -### Patch Changes - -- Updated dependencies - - @0xsequence/core@1.8.0 - - @0xsequence/migration@1.8.0 - - @0xsequence/replacer@1.8.0 - -## 1.7.2 - -### Patch Changes - -- 0xsequence: ChainId should not be exported as a type -- account, wallet: fix nonce selection -- Updated dependencies -- Updated dependencies - - @0xsequence/core@1.7.2 - - @0xsequence/migration@1.7.2 - - @0xsequence/replacer@1.7.2 - -## 1.7.1 - -### Patch Changes - -- network: add missing avalanche logoURI -- Updated dependencies - - @0xsequence/core@1.7.1 - - @0xsequence/migration@1.7.1 - - @0xsequence/replacer@1.7.1 - -## 1.7.0 - -### Minor Changes - -- provider: projectAccessKey is now required - -### Patch Changes - -- network: add NetworkMetadata.logoURI property for all networks -- Updated dependencies -- Updated dependencies - - @0xsequence/core@1.7.0 - - @0xsequence/migration@1.7.0 - - @0xsequence/replacer@1.7.0 - -## 1.6.3 - -### Patch Changes - -- network list update -- Updated dependencies - - @0xsequence/core@1.6.3 - - @0xsequence/migration@1.6.3 - - @0xsequence/replacer@1.6.3 - -## 1.6.2 - -### Patch Changes - -- auth: projectAccessKey option -- wallet: use 12 bytes for random space -- Updated dependencies -- Updated dependencies - - @0xsequence/core@1.6.2 - - @0xsequence/migration@1.6.2 - - @0xsequence/replacer@1.6.2 - -## 1.6.1 - -### Patch Changes - -- core: add simple config from subdigest support -- core: fix encode tree with subdigest -- account: implement buildOnChainSignature on Account -- Updated dependencies -- Updated dependencies -- Updated dependencies - - @0xsequence/core@1.6.1 - - @0xsequence/migration@1.6.1 - - @0xsequence/replacer@1.6.1 - -## 1.6.0 - -### Minor Changes - -- account, wallet: parallel transactions by default - -### Patch Changes - -- provider: emit disconnect on sign out -- Updated dependencies -- Updated dependencies - - @0xsequence/core@1.6.0 - - @0xsequence/migration@1.6.0 - - @0xsequence/replacer@1.6.0 - -## 1.5.0 - -### Minor Changes - -- signhub: add 'signing' signer status - -### Patch Changes - -- auth: Session.open: onAccountAddress callback -- account: allow empty transaction bundles -- Updated dependencies -- Updated dependencies -- Updated dependencies - - @0xsequence/core@1.5.0 - - @0xsequence/migration@1.5.0 - - @0xsequence/replacer@1.5.0 - -## 1.4.9 - -### Patch Changes - -- rename SequenceMetadataClient to SequenceMetadata -- Updated dependencies - - @0xsequence/core@1.4.9 - - @0xsequence/migration@1.4.9 - - @0xsequence/replacer@1.4.9 - -## 1.4.8 - -### Patch Changes - -- account: Account.getSigners -- Updated dependencies - - @0xsequence/core@1.4.8 - - @0xsequence/migration@1.4.8 - - @0xsequence/replacer@1.4.8 - -## 1.4.7 - -### Patch Changes - -- update indexer client bindings -- Updated dependencies - - @0xsequence/core@1.4.7 - - @0xsequence/migration@1.4.7 - - @0xsequence/replacer@1.4.7 - -## 1.4.6 - -### Patch Changes - -- - add sepolia networks, mark goerli as deprecated - - update indexer client bindings -- Updated dependencies - - @0xsequence/core@1.4.6 - - @0xsequence/migration@1.4.6 - - @0xsequence/replacer@1.4.6 - -## 1.4.5 - -### Patch Changes - -- indexer/metadata: update client bindings -- auth: selectWallet with new address -- Updated dependencies -- Updated dependencies - - @0xsequence/core@1.4.5 - - @0xsequence/migration@1.4.5 - - @0xsequence/replacer@1.4.5 - -## 1.4.4 - -### Patch Changes - -- indexer: update bindings -- auth: handle jwt expiry -- Updated dependencies -- Updated dependencies - - @0xsequence/core@1.4.4 - - @0xsequence/migration@1.4.4 - - @0xsequence/replacer@1.4.4 - -## 1.4.3 - -### Patch Changes - -- guard: return active status from GuardSigner.getAuthMethods -- Updated dependencies - - @0xsequence/core@1.4.3 - - @0xsequence/migration@1.4.3 - - @0xsequence/replacer@1.4.3 - -## 1.4.2 - -### Patch Changes - -- guard: update bindings -- Updated dependencies - - @0xsequence/core@1.4.2 - - @0xsequence/migration@1.4.2 - - @0xsequence/replacer@1.4.2 - -## 1.4.1 - -### Patch Changes - -- network: remove unused networks -- signhub: orchestrator interface -- guard: auth methods interface -- guard: update bindings for pin and totp -- guard: no more retry logic -- Updated dependencies -- Updated dependencies -- Updated dependencies -- Updated dependencies -- Updated dependencies - - @0xsequence/core@1.4.1 - - @0xsequence/migration@1.4.1 - - @0xsequence/replacer@1.4.1 - -## 1.4.0 - -### Minor Changes - -- project access key support - -### Patch Changes - -- Updated dependencies - - @0xsequence/core@1.4.0 - - @0xsequence/migration@1.4.0 - - @0xsequence/replacer@1.4.0 - -## 1.3.0 - -### Minor Changes - -- signhub: account children - -### Patch Changes - -- guard: do not throw when building deploy transaction -- network: snowtrace.io -> subnets.avax.network/c-chain -- Updated dependencies -- Updated dependencies -- Updated dependencies - - @0xsequence/core@1.3.0 - - @0xsequence/migration@1.3.0 - - @0xsequence/replacer@1.3.0 - -## 1.2.9 - -### Patch Changes - -- account: AccountSigner.sendTransaction simulateForFeeOptions -- relayer: update bindings -- Updated dependencies -- Updated dependencies - - @0xsequence/core@1.2.9 - - @0xsequence/migration@1.2.9 - - @0xsequence/replacer@1.2.9 - -## 1.2.8 - -### Patch Changes - -- rename X-Sequence-Token-Key header to X-Access-Key -- Updated dependencies - - @0xsequence/core@1.2.8 - - @0xsequence/migration@1.2.8 - - @0xsequence/replacer@1.2.8 - -## 1.2.7 - -### Patch Changes - -- add x-sequence-token-key to clients -- Updated dependencies - - @0xsequence/core@1.2.7 - - @0xsequence/migration@1.2.7 - - @0xsequence/replacer@1.2.7 - -## 1.2.6 - -### Patch Changes - -- Fix bind multicall provider -- Updated dependencies - - @0xsequence/core@1.2.6 - - @0xsequence/migration@1.2.6 - - @0xsequence/replacer@1.2.6 - -## 1.2.5 - -### Patch Changes - -- Multicall default configuration fixes -- Updated dependencies - - @0xsequence/core@1.2.5 - - @0xsequence/migration@1.2.5 - - @0xsequence/replacer@1.2.5 - -## 1.2.4 - -### Patch Changes - -- provider: Adding missing payment provider types to PaymentProviderOption -- provider: WalletRequestHandler.notifyChainChanged -- Updated dependencies -- Updated dependencies - - @0xsequence/core@1.2.4 - - @0xsequence/migration@1.2.4 - - @0xsequence/replacer@1.2.4 - -## 1.2.3 - -### Patch Changes - -- auth, provider: connect to accept optional authorizeNonce -- Updated dependencies - - @0xsequence/core@1.2.3 - - @0xsequence/migration@1.2.3 - - @0xsequence/replacer@1.2.3 - -## 1.2.2 - -### Patch Changes - -- provider: allow createContract calls -- core: check for explicit zero address in contract deployments -- Updated dependencies -- Updated dependencies - - @0xsequence/core@1.2.2 - - @0xsequence/migration@1.2.2 - - @0xsequence/replacer@1.2.2 - -## 1.2.1 - -### Patch Changes - -- auth: use sequence api chain id as reference chain id if available -- Updated dependencies - - @0xsequence/core@1.2.1 - - @0xsequence/migration@1.2.1 - - @0xsequence/replacer@1.2.1 - -## 1.2.0 - -### Minor Changes - -- split services from session, better local support - -### Patch Changes - -- Updated dependencies - - @0xsequence/core@1.2.0 - - @0xsequence/migration@1.2.0 - - @0xsequence/replacer@1.2.0 - -## 1.1.15 - -### Patch Changes - -- guard: remove error filtering -- Updated dependencies - - @0xsequence/core@1.1.15 - - @0xsequence/migration@1.1.15 - - @0xsequence/replacer@1.1.15 - -## 1.1.14 - -### Patch Changes - -- guard: add GuardSigner.onError -- Updated dependencies - - @0xsequence/core@1.1.14 - - @0xsequence/migration@1.1.14 - - @0xsequence/replacer@1.1.14 - -## 1.1.13 - -### Patch Changes - -- provider: pass client version with connect options -- provider: removing large from BannerSize -- Updated dependencies -- Updated dependencies - - @0xsequence/core@1.1.13 - - @0xsequence/migration@1.1.13 - - @0xsequence/replacer@1.1.13 - -## 1.1.12 - -### Patch Changes - -- provider: adding bannerSize to ConnectOptions -- Updated dependencies - - @0xsequence/core@1.1.12 - - @0xsequence/migration@1.1.12 - - @0xsequence/replacer@1.1.12 - -## 1.1.11 - -### Patch Changes - -- add homeverse configs -- Updated dependencies - - @0xsequence/core@1.1.11 - - @0xsequence/migration@1.1.11 - - @0xsequence/replacer@1.1.11 - -## 1.1.10 - -### Patch Changes - -- handle default EIP6492 on send -- Updated dependencies - - @0xsequence/core@1.1.10 - - @0xsequence/migration@1.1.10 - - @0xsequence/replacer@1.1.10 - -## 1.1.9 - -### Patch Changes - -- Custom default EIP6492 on client -- Updated dependencies - - @0xsequence/core@1.1.9 - - @0xsequence/migration@1.1.9 - - @0xsequence/replacer@1.1.9 - -## 1.1.8 - -### Patch Changes - -- metadata: searchMetadata: add types filter -- Updated dependencies - - @0xsequence/core@1.1.8 - - @0xsequence/migration@1.1.8 - - @0xsequence/replacer@1.1.8 - -## 1.1.7 - -### Patch Changes - -- adding signInWith connect settings option to allow dapps to automatically login their users with a certain provider optimizing the normal authentication flow -- Updated dependencies - - @0xsequence/core@1.1.7 - - @0xsequence/migration@1.1.7 - - @0xsequence/replacer@1.1.7 - -## 1.1.6 - -### Patch Changes - -- metadata: searchMetadata: add chainID and excludeTokenMetadata filters -- Updated dependencies - - @0xsequence/core@1.1.6 - - @0xsequence/migration@1.1.6 - - @0xsequence/replacer@1.1.6 - -## 1.1.5 - -### Patch Changes - -- account: re-compute meta-transaction id for wallet deployment transactions -- Updated dependencies - - @0xsequence/core@1.1.5 - - @0xsequence/migration@1.1.5 - - @0xsequence/replacer@1.1.5 - -## 1.1.4 - -### Patch Changes - -- network: rename base-mainnet to base -- provider: override isDefaultChain with ConnectOptions.networkId if provided -- Updated dependencies -- Updated dependencies - - @0xsequence/core@1.1.4 - - @0xsequence/migration@1.1.4 - - @0xsequence/replacer@1.1.4 - -## 1.1.3 - -### Patch Changes - -- provider: use network id from transport session -- provider: sign authorization using ConnectOptions.networkId if provided -- Updated dependencies -- Updated dependencies - - @0xsequence/core@1.1.3 - - @0xsequence/migration@1.1.3 - - @0xsequence/replacer@1.1.3 - -## 1.1.2 - -### Patch Changes - -- provider: jsonrpc chain id fixes -- Updated dependencies - - @0xsequence/core@1.1.2 - - @0xsequence/migration@1.1.2 - - @0xsequence/replacer@1.1.2 - -## 1.1.1 - -### Patch Changes - -- network: add base mainnet and sepolia -- provider: reject toxic transaction requests -- Updated dependencies -- Updated dependencies - - @0xsequence/core@1.1.1 - - @0xsequence/migration@1.1.1 - - @0xsequence/replacer@1.1.1 - -## 1.1.0 - -### Minor Changes - -- Refactor dapp facing provider - -### Patch Changes - -- Updated dependencies - - @0xsequence/core@1.1.0 - - @0xsequence/migration@1.1.0 - - @0xsequence/replacer@1.1.0 - -## 1.0.5 - -### Patch Changes - -- network: export network constants -- guard: use the correct global for fetch -- network: nova-explorer.arbitrum.io -> nova.arbiscan.io -- Updated dependencies -- Updated dependencies -- Updated dependencies - - @0xsequence/core@1.0.5 - - @0xsequence/migration@1.0.5 - - @0xsequence/replacer@1.0.5 - -## 1.0.4 - -### Patch Changes - -- provider: accept name or number for networkId -- Updated dependencies - - @0xsequence/core@1.0.4 - - @0xsequence/migration@1.0.4 - - @0xsequence/replacer@1.0.4 - -## 1.0.3 - -### Patch Changes - -- Simpler isValidSignature helpers -- Updated dependencies - - @0xsequence/core@1.0.3 - - @0xsequence/migration@1.0.3 - - @0xsequence/replacer@1.0.3 - -## 1.0.2 - -### Patch Changes - -- add extra signature validation utils methods -- Updated dependencies - - @0xsequence/core@1.0.2 - - @0xsequence/migration@1.0.2 - - @0xsequence/replacer@1.0.2 - -## 1.0.1 - -### Patch Changes - -- add homeverse testnet -- Updated dependencies - - @0xsequence/core@1.0.1 - - @0xsequence/migration@1.0.1 - - @0xsequence/replacer@1.0.1 - -## 1.0.0 - -### Major Changes - -- https://sequence.xyz/blog/sequence-wallet-light-state-sync-full-merkle-wallets - -### Patch Changes - -- Updated dependencies - - @0xsequence/core@1.0.0 - - @0xsequence/migration@1.0.0 - - @0xsequence/replacer@1.0.0 diff --git a/old/packages/sessions/hardhat.config.js b/old/packages/sessions/hardhat.config.js deleted file mode 100644 index 51bc6d710..000000000 --- a/old/packages/sessions/hardhat.config.js +++ /dev/null @@ -1,11 +0,0 @@ - -module.exports = { - networks: { - hardhat: { - chainId: 31337, - accounts: { - mnemonic: 'ripple axis someone ridge uniform wrist prosper there frog rate olympic knee' - }, - }, - } -} diff --git a/old/packages/sessions/package.json b/old/packages/sessions/package.json deleted file mode 100644 index 5522c48ba..000000000 --- a/old/packages/sessions/package.json +++ /dev/null @@ -1,38 +0,0 @@ -{ - "name": "@0xsequence/sessions", - "version": "2.3.8", - "description": "tools for migrating sequence wallets to new versions", - "repository": "https://github.com/0xsequence/sequence.js/tree/master/packages/sessions", - "source": "src/index.ts", - "main": "dist/0xsequence-sessions.cjs.js", - "module": "dist/0xsequence-sessions.esm.js", - "author": "Horizon Blockchain Games", - "license": "Apache-2.0", - "scripts": { - "test": "pnpm test:file tests/**/*.spec.ts", - "test:file": "TS_NODE_PROJECT=../../tsconfig.test.json mocha -r ts-node/register --timeout 60000", - "test:coverage": "nyc pnpm test" - }, - "peerDependencies": { - "ethers": ">=6" - }, - "dependencies": { - "@0xsequence/core": "workspace:*", - "@0xsequence/migration": "workspace:*", - "@0xsequence/replacer": "workspace:*", - "@0xsequence/utils": "workspace:*", - "idb": "^7.1.1" - }, - "devDependencies": { - "@0xsequence/signhub": "workspace:*", - "@0xsequence/tests": "workspace:*", - "@istanbuljs/nyc-config-typescript": "^1.0.2", - "ethers": "6.13.4", - "fake-indexeddb": "^4.0.1", - "nyc": "^15.1.0" - }, - "files": [ - "src", - "dist" - ] -} diff --git a/old/packages/sessions/src/index.ts b/old/packages/sessions/src/index.ts deleted file mode 100644 index 76ee95e53..000000000 --- a/old/packages/sessions/src/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -export * as tracker from './tracker' -export * as trackers from './trackers' diff --git a/old/packages/sessions/src/tracker.ts b/old/packages/sessions/src/tracker.ts deleted file mode 100644 index 3542045ab..000000000 --- a/old/packages/sessions/src/tracker.ts +++ /dev/null @@ -1,57 +0,0 @@ -import { commons } from '@0xsequence/core' -import { ethers } from 'ethers' - -export type PresignedConfig = { - wallet: string - nextConfig: commons.config.Config - signature: string - referenceChainId?: ethers.BigNumberish -} - -export type PresignedConfigLink = Omit & { nextImageHash: string } - -export type ConfigDataDump = { - configurations: commons.config.Config[] - wallets: { - imageHash: string - context: commons.context.WalletContext - }[] - presignedTransactions: PresignedConfigLink[] -} - -export interface ConfigTracker { - loadPresignedConfiguration: (args: { - wallet: string - fromImageHash: string - longestPath?: boolean - }) => Promise - - savePresignedConfiguration: (args: PresignedConfig) => Promise - - saveWitnesses: (args: { wallet: string; digest: string; chainId: ethers.BigNumberish; signatures: string[] }) => Promise - - configOfImageHash: (args: { imageHash: string; noCache?: boolean }) => Promise - - saveWalletConfig: (args: { config: commons.config.Config }) => Promise - - imageHashOfCounterfactualWallet: (args: { wallet: string; noCache?: boolean }) => Promise< - | { - imageHash: string - context: commons.context.WalletContext - } - | undefined - > - - saveCounterfactualWallet: (args: { config: commons.config.Config; context: commons.context.WalletContext[] }) => Promise - - walletsOfSigner: (args: { signer: string; noCache?: boolean }) => Promise< - { - wallet: string - proof: { - digest: string - chainId: bigint - signature: string - } - }[] - > -} diff --git a/old/packages/sessions/src/trackers/arweave.ts b/old/packages/sessions/src/trackers/arweave.ts deleted file mode 100644 index d0919964c..000000000 --- a/old/packages/sessions/src/trackers/arweave.ts +++ /dev/null @@ -1,642 +0,0 @@ -import { commons, universal, v2 } from '@0xsequence/core' -import { migrator } from '@0xsequence/migration' -import { CachedEIP5719 } from '@0xsequence/replacer' -import { ethers } from 'ethers' -import { ConfigTracker, PresignedConfig, PresignedConfigLink } from '../tracker' - -// depending on @0xsequence/abi breaks 0xsequence's proxy-transport-channel integration test -const MAIN_MODULE_ABI = [ - 'function execute((bool delegateCall, bool revertOnError, uint256 gasLimit, address target, uint256 value, bytes data)[] calldata transactions, uint256 nonce, bytes calldata signature)' -] - -export interface Options { - readonly namespace?: string - readonly owners?: string[] - readonly arweaveUrl?: string - readonly graphqlUrl?: string - readonly eip5719Provider?: ethers.Provider - readonly rateLimitRetryDelayMs?: number -} - -export const defaults = { - namespace: 'Sequence-Sessions', - owners: ['AZ6R2mG8zxW9q7--iZXGrBknjegHoPzmG5IG-nxvMaM'], - arweaveUrl: 'https://arweave.net', - graphqlUrl: 'https://arweave.net/graphql', - eip5719Provider: undefined, - rateLimitRetryDelayMs: 5 * 60 * 1000 -} - -export class ArweaveReader implements ConfigTracker, migrator.PresignedMigrationTracker { - private readonly configs: Map> = new Map() - private readonly eip5719?: CachedEIP5719 - - constructor(readonly options: Options = defaults) { - if (options.eip5719Provider) { - this.eip5719 = new CachedEIP5719(options.eip5719Provider) - } - } - - async loadPresignedConfiguration(args: { - wallet: string - fromImageHash: string - longestPath?: boolean - }): Promise { - const wallet = ethers.getAddress(args.wallet) - - const fromConfig = await this.configOfImageHash({ imageHash: args.fromImageHash }) - if (!fromConfig) { - throw new Error(`unable to find from config ${args.fromImageHash}`) - } - if (!v2.config.isWalletConfig(fromConfig)) { - throw new Error(`from config ${args.fromImageHash} is not v2`) - } - const fromCheckpoint = BigInt(fromConfig.checkpoint) - - const items = Object.entries(await findItems({ Type: 'config update', Wallet: wallet }, this.options)).flatMap( - ([id, tags]) => { - try { - const { Signer: signer, Subdigest: subdigest, Digest: digest, 'To-Config': toImageHash } = tags - - let signatureType: 'eip-712' | 'eth_sign' | 'erc-1271' - switch (tags['Signature-Type']) { - case 'eip-712': - case 'eth_sign': - case 'erc-1271': - signatureType = tags['Signature-Type'] - break - default: - throw new Error(`unknown signature type ${tags['Signature-Type']}`) - } - - let toCheckpoint: bigint - try { - toCheckpoint = BigInt(tags['To-Checkpoint']) - } catch { - throw new Error(`to checkpoint is not a number: ${tags['To-Checkpoint']}`) - } - if (toCheckpoint <= fromCheckpoint) { - return [] - } - - if (!ethers.isAddress(signer)) { - throw new Error(`signer is not an address: ${signer}`) - } - - if (!ethers.isHexString(subdigest, 32)) { - throw new Error(`subdigest is not a hash: ${subdigest}`) - } - - if (!ethers.isHexString(digest, 32)) { - throw new Error(`digest is not a hash: ${digest}`) - } - - let chainId: bigint - try { - chainId = BigInt(tags['Chain-ID']) - } catch { - throw new Error(`chain id is not a number: ${tags['Chain-ID']}`) - } - - if (!ethers.isHexString(toImageHash, 32)) { - throw new Error(`to config is not a hash: ${toImageHash}`) - } - - return [{ id, signatureType, signer, subdigest, digest, chainId, toImageHash, toCheckpoint }] - } catch (error) { - console.warn(`invalid wallet ${wallet} config update ${id}:`, error) - return [] - } - } - ) - - const signatures: Map> = new Map() - let candidates: typeof items = [] - - for (const item of items) { - let imageHashSignatures = signatures.get(item.toImageHash) - if (!imageHashSignatures) { - imageHashSignatures = new Map() - signatures.set(item.toImageHash, imageHashSignatures) - candidates.push(item) - } - imageHashSignatures.set(item.signer, item) - } - - if (args.longestPath) { - candidates.sort(({ toCheckpoint: a }, { toCheckpoint: b }) => (a === b ? 0 : a < b ? -1 : 1)) - } else { - candidates.sort(({ toCheckpoint: a }, { toCheckpoint: b }) => (a === b ? 0 : a < b ? 1 : -1)) - } - - const updates: PresignedConfigLink[] = [] - - for (let currentConfig = fromConfig; candidates.length; ) { - const currentImageHash = v2.config.imageHash(currentConfig) - - let nextCandidate: (typeof candidates)[number] | undefined - let nextCandidateItems: Map - let nextCandidateSigners: string[] = [] - - for (const candidate of candidates) { - nextCandidateItems = signatures.get(candidate.toImageHash)! - nextCandidateSigners = Array.from(nextCandidateItems.keys()) - - const { weight } = v2.signature.encodeSigners( - currentConfig, - new Map(nextCandidateSigners.map(signer => [signer, { signature: '0x', isDynamic: false }])), - [], - 0 - ) - - if (weight >= BigInt(currentConfig.threshold)) { - nextCandidate = candidate - break - } - } - - if (!nextCandidate) { - console.warn(`unreachable configs with checkpoint > ${currentConfig.checkpoint} from config ${currentImageHash}`) - break - } - - const nextImageHash = nextCandidate.toImageHash - - try { - const nextConfig = await this.configOfImageHash({ imageHash: nextImageHash }) - if (!nextConfig) { - throw new Error(`unable to find config ${nextImageHash}`) - } - if (!v2.config.isWalletConfig(nextConfig)) { - throw new Error(`config ${nextImageHash} is not v2`) - } - - const nextCandidateSignatures = new Map( - ( - await Promise.all( - nextCandidateSigners.map(async signer => { - const { id, subdigest, signatureType } = nextCandidateItems.get(signer)! - try { - let signature = await (await fetchItem(id, this.options.rateLimitRetryDelayMs, this.options.arweaveUrl)).text() - switch (signatureType) { - case 'eip-712': - signature += '01' - break - case 'eth_sign': - signature += '02' - break - case 'erc-1271': - signature += '03' - break - } - if (this.eip5719) { - try { - signature = ethers.hexlify(await this.eip5719.runByEIP5719(signer, subdigest, signature)) - } catch (error) { - console.warn(`unable to run eip-5719 on config update ${id}`) - } - } - const recovered = commons.signer.tryRecoverSigner(subdigest, signature) - return [[signer, { signature, isDynamic: recovered !== signer }] as const] - } catch (error) { - console.warn(`unable to fetch signer ${signer} config update ${id}:`, error) - return [] - } - }) - ) - ).flat() - ) - - const { encoded: signature, weight } = v2.signature.encodeSigners(currentConfig, nextCandidateSignatures, [], 0) - if (weight < BigInt(currentConfig.threshold)) { - throw new Error(`insufficient signing power ${weight.toString()} < ${currentConfig.threshold}`) - } - updates.push({ wallet, signature, nextImageHash }) - - currentConfig = nextConfig - candidates = candidates.filter(({ toCheckpoint }) => toCheckpoint > BigInt(currentConfig.checkpoint)) - } catch (error) { - console.warn( - `unable to reconstruct wallet ${wallet} update from config ${currentImageHash} to config ${nextImageHash}:`, - error - ) - candidates = candidates.filter(({ toImageHash }) => toImageHash !== nextImageHash) - } - } - - return updates - } - - savePresignedConfiguration(_args: PresignedConfig): Promise { - throw new Error('arweave backend does not support saving config updates') - } - - saveWitnesses(_args: { wallet: string; digest: string; chainId: ethers.BigNumberish; signatures: string[] }): Promise { - throw new Error('arweave backend does not support saving signatures') - } - - async configOfImageHash(args: { imageHash: string; noCache?: boolean }): Promise { - if (!args.noCache) { - const config = this.configs.get(args.imageHash) - if (config) { - try { - return await config - } catch { - const config = this.configs.get(args.imageHash) - if (config) { - return config - } - } - } - } - - const config = (async (imageHash: string): Promise => { - const items = Object.entries(await findItems({ Type: 'config', Config: imageHash }, this.options)).flatMap(([id, tags]) => { - try { - const version = Number(tags.Version) - if (!version) { - throw new Error(`invalid version: ${tags.Version}`) - } - - return [{ id, version }] - } catch (error) { - console.warn(`config ${imageHash} at ${id} invalid:`, error) - return [] - } - }) - - switch (items.length) { - case 0: - this.configs.set(imageHash, Promise.resolve(undefined)) - return - case 1: - break - default: - console.warn(`multiple configs ${imageHash} at ${items.map(({ id }) => id).join(', ')}`) - break - } - - for (const { id, version } of items) { - try { - const config = { - ...(await (await fetchItem(id, this.options.rateLimitRetryDelayMs, this.options.arweaveUrl)).json()), - version - } - if (config.tree) { - config.tree = toTopology(config.tree) - } - - const actual = universal.coderFor(version).config.imageHashOf(config) - if (actual !== imageHash) { - throw new Error(`image hash is ${actual}, expected ${imageHash}`) - } - - this.configs.set(imageHash, Promise.resolve(config)) - return config - } catch (error) { - console.warn(`config at ${id} invalid:`, error) - } - } - - this.configs.set(imageHash, Promise.resolve(undefined)) - return - })(args.imageHash) - - if (!args.noCache) { - this.configs.set(args.imageHash, config) - } - - return config - } - - saveWalletConfig(_args: { config: commons.config.Config }): Promise { - throw new Error('arweave backend does not support saving configs') - } - - async imageHashOfCounterfactualWallet(args: { - wallet: string - noCache?: boolean - }): Promise<{ imageHash: string; context: commons.context.WalletContext } | undefined> { - const wallet = ethers.getAddress(args.wallet) - - const items = Object.entries(await findItems({ Type: 'wallet', Wallet: wallet }, this.options)).flatMap(([id, tags]) => { - try { - const { 'Deploy-Config': imageHash } = tags - - const version = Number(tags['Deploy-Version']) - if (!version) { - throw new Error(`invalid version: ${tags['Deploy-Version']}`) - } - - if (!imageHash) { - throw new Error('no deploy config') - } - - const context = commons.context.defaultContexts[version] - if (!context) { - throw new Error(`unknown version: ${version}`) - } - - if (commons.context.addressOf(context, imageHash) !== wallet) { - throw new Error(`incorrect v${version} deploy config: ${imageHash}`) - } - - return [{ id, imageHash, context }] - } catch (error) { - console.warn(`wallet ${wallet} at ${id} invalid:`, error) - return [] - } - }) - - switch (items.length) { - case 0: - return - case 1: - break - default: - console.warn(`multiple deploy configs for wallet ${wallet} at ${items.map(({ id }) => id).join(', ')}, using first`) - break - } - - return items[0] - } - - saveCounterfactualWallet(_args: { config: commons.config.Config; context: commons.context.WalletContext[] }): Promise { - throw new Error('arweave backend does not support saving wallets') - } - - async walletsOfSigner(args: { - signer: string - noCache?: boolean - allSignatures?: boolean - }): Promise> { - const signer = ethers.getAddress(args.signer) - - const proofs: Map }> = new Map() - - for (const [id, tags] of Object.entries( - await findItems( - { Type: ['signature', 'config update'], Signer: signer, Witness: args.allSignatures ? undefined : 'true' }, - this.options - ) - )) { - const { Wallet: wallet, Subdigest: subdigest, Digest: digest, 'Chain-ID': chainId } = tags - - try { - if (proofs.has(wallet)) { - continue - } - - let signatureType: '01' | '02' | '03' - switch (tags['Signature-Type']) { - case 'eip-712': - signatureType = '01' - break - case 'eth_sign': - signatureType = '02' - break - case 'erc-1271': - signatureType = '03' - break - default: - throw new Error(`unknown signature type ${tags['Signature-Type']}`) - } - - if (subdigest !== commons.signature.subdigestOf({ digest, chainId, address: wallet })) { - throw new Error('incorrect subdigest') - } - - const signature = fetchItem(id, this.options.rateLimitRetryDelayMs, this.options.arweaveUrl).then(async response => { - const signature = (await response.text()) + signatureType - if (this.eip5719) { - try { - return ethers.hexlify(await this.eip5719.runByEIP5719(signer, subdigest, signature)) - } catch (error) { - console.warn(`unable to run eip-5719 on signature ${id}`) - } - } - return signature - }) - - proofs.set(wallet, { digest, chainId: BigInt(chainId), signature }) - } catch (error) { - console.warn(`signer ${signer} signature ${id} of wallet ${wallet} invalid:`, error) - } - } - - return Promise.all( - [...proofs.entries()].map(async ([wallet, { digest, chainId, signature }]) => ({ - wallet, - proof: { digest, chainId, signature: await signature } - })) - ) - } - - async getMigration( - address: string, - fromImageHash: string, - fromVersion: number, - chainId: ethers.BigNumberish - ): Promise { - const wallet = ethers.getAddress(address) - - const items = Object.entries( - await findItems( - { - Type: 'migration', - Migration: wallet, - 'Chain-ID': BigInt(chainId).toString(), - 'From-Version': `${fromVersion}`, - 'From-Config': fromImageHash - }, - this.options - ) - ).flatMap(([id, tags]) => { - try { - const { 'To-Config': toImageHash, Executor: executor } = tags - - const toVersion = Number(tags['To-Version']) - if (!toVersion) { - throw new Error(`invalid version: ${tags['To-Version']}`) - } - - if (!ethers.isHexString(toImageHash, 32)) { - throw new Error(`to config is not a hash: ${toImageHash}`) - } - - if (!ethers.isAddress(executor)) { - throw new Error(`executor is not an address: ${executor}`) - } - - return { id, toVersion, toImageHash, executor } - } catch (error) { - console.warn( - `chain ${chainId} migration ${id} for v${fromVersion} wallet ${wallet} from config ${fromImageHash} invalid:`, - error - ) - return [] - } - }) - - switch (items.length) { - case 0: - return - case 1: - break - default: - console.warn( - `multiple chain ${chainId} migrations for v${fromVersion} wallet ${wallet} from config ${fromImageHash} at ${items.map(({ id }) => id).join(', ')}, using first` - ) - break - } - - const { id, toVersion, toImageHash, executor } = items[0] - - const [data, toConfig] = await Promise.all([ - fetchItem(id, this.options.rateLimitRetryDelayMs, this.options.arweaveUrl).then(response => response.text()), - this.configOfImageHash({ imageHash: toImageHash }) - ]) - - if (!toConfig) { - throw new Error(`unable to find to config ${toImageHash} for migration`) - } - - const mainModule = new ethers.Interface(MAIN_MODULE_ABI) - const [encoded, nonce, signature] = mainModule.decodeFunctionData('execute', data) - const transactions = commons.transaction.fromTxAbiEncode(encoded) - const subdigest = commons.transaction.subdigestOfTransactions(wallet, chainId, nonce, transactions) - - return { - tx: { entrypoint: executor, transactions, nonce, chainId, intent: { id: subdigest, wallet }, signature }, - fromVersion, - toVersion: Number(toVersion), - toConfig - } - } - - saveMigration(_address: string, _signed: migrator.SignedMigration, _contexts: commons.context.VersionedContext): Promise { - throw new Error('arweave backend does not support saving migrations') - } -} - -async function findItems( - filter: { [name: string]: undefined | string | string[] }, - options?: Options & { pageSize?: number; maxResults?: number } -): Promise<{ [id: string]: { [tag: string]: string } }> { - const namespace = options?.namespace ?? defaults.namespace - const owners = options?.owners - const graphqlUrl = options?.graphqlUrl ?? defaults.graphqlUrl - const rateLimitRetryDelayMs = options?.rateLimitRetryDelayMs ?? defaults.rateLimitRetryDelayMs - const pageSize = options?.pageSize ?? 100 - const maxResults = options?.maxResults - - const tags = Object.entries(filter).flatMap(([name, values]) => - values === undefined - ? [] - : [ - `{ name: "${namespace ? `${namespace}-${name}` : name}", values: [${typeof values === 'string' ? `"${values}"` : values.map(value => `"${value}"`).join(', ')}] }` - ] - ) - - const edges: Array<{ cursor: string; node: { id: string; tags: Array<{ name: string; value: string }> } }> = [] - - for (let hasNextPage = true; hasNextPage && (maxResults === undefined || edges.length < maxResults); ) { - const query = ` - query { - transactions(sort: HEIGHT_DESC, ${edges.length ? `first: ${pageSize}, after: "${edges[edges.length - 1].cursor}"` : `first: ${pageSize}`}, tags: [${tags.join(', ')}]${owners === undefined ? '' : `, owners: [${owners.map(owner => `"${owner}"`).join(', ')}]`}) { - pageInfo { - hasNextPage - } - edges { - cursor - node { - id - tags { - name - value - } - } - } - } - } - ` - - let response: Response - while (true) { - response = await fetch(graphqlUrl, { - method: 'POST', - headers: { 'Content-Type': 'application/json' }, - body: JSON.stringify({ query }), - redirect: 'follow' - }) - if (response.status !== 429) { - break - } - console.warn( - `rate limited by ${graphqlUrl}, trying again in ${rateLimitRetryDelayMs / 1000} seconds at ${new Date(Date.now() + rateLimitRetryDelayMs).toLocaleTimeString()}` - ) - await new Promise(resolve => setTimeout(resolve, rateLimitRetryDelayMs)) - } - - const { - data: { transactions } - } = await response.json() - - edges.push(...transactions.edges) - - hasNextPage = transactions.pageInfo.hasNextPage - } - - return Object.fromEntries( - edges.map(({ node: { id, tags } }) => [ - id, - Object.fromEntries( - tags.map(({ name, value }) => [ - namespace && name.startsWith(`${namespace}-`) ? name.slice(namespace.length + 1) : name, - value - ]) - ) - ]) - ) -} - -async function fetchItem( - id: string, - rateLimitRetryDelayMs = defaults.rateLimitRetryDelayMs, - arweaveUrl = defaults.arweaveUrl -): Promise { - while (true) { - const response = await fetch(`${arweaveUrl}/${id}`, { redirect: 'follow' }) - if (response.status !== 429) { - return response - } - console.warn( - `rate limited by ${arweaveUrl}, trying again in ${rateLimitRetryDelayMs / 1000} seconds at ${new Date(Date.now() + rateLimitRetryDelayMs).toLocaleTimeString()}` - ) - await new Promise(resolve => setTimeout(resolve, rateLimitRetryDelayMs)) - } -} - -function toTopology(topology: any): v2.config.Topology { - if (typeof topology === 'string') { - return { nodeHash: topology } - } - - if (typeof topology === 'object' && topology?.node !== undefined) { - return { nodeHash: topology.node } - } - - if (topology instanceof Array && topology.length === 2) { - return { left: toTopology(topology[0]), right: toTopology(topology[1]) } - } - - if (v2.config.isNode(topology)) { - return { left: toTopology(topology.left), right: toTopology(topology.right) } - } - - if (v2.config.isNestedLeaf(topology)) { - return { ...topology, tree: toTopology(topology.tree) } - } - - return topology -} diff --git a/old/packages/sessions/src/trackers/cached.ts b/old/packages/sessions/src/trackers/cached.ts deleted file mode 100644 index 54f36a8ea..000000000 --- a/old/packages/sessions/src/trackers/cached.ts +++ /dev/null @@ -1,186 +0,0 @@ -import { commons, universal } from '@0xsequence/core' -import { migrator } from '@0xsequence/migration' -import { ConfigTracker, PresignedConfig, PresignedConfigLink } from '../tracker' -import { ethers } from 'ethers' - -export class CachedTracker implements migrator.PresignedMigrationTracker, ConfigTracker { - constructor( - private readonly tracker: migrator.PresignedMigrationTracker & ConfigTracker, - private readonly cache: migrator.PresignedMigrationTracker & ConfigTracker, - public readonly contexts: commons.context.VersionedContext - ) {} - - async loadPresignedConfiguration(args: { - wallet: string - fromImageHash: string - longestPath?: boolean | undefined - }): Promise { - // We need to check both, and return the one with the highest checkpoint - // eventually we could try to combine them, but for now we'll just return - // the one with the highest checkpoint - const results = [this.tracker.loadPresignedConfiguration(args), this.cache.loadPresignedConfiguration(args)] - - let best: PresignedConfigLink[] - - // If both results end with the same image hash, we can just return the longest/shortest one - const [result1, result2] = await Promise.all(results) - if ( - result1.length > 0 && - result2.length > 0 && - result1[result1.length - 1].nextImageHash === result2[result2.length - 1].nextImageHash - ) { - best = - args.longestPath === true - ? result1.length > result2.length - ? result1 - : result2 - : result1.length < result2.length - ? result1 - : result2 - } else { - // Otherwise we need to check the checkpoints - // this requires us to fetch the config for each image hash - const checkpoints = await Promise.all( - results.map(async result => { - const r = await result - const last = r[r.length - 1] - if (!last) return undefined - - // TODO: This will fire a lot of requests, optimize it - const config = await this.configOfImageHash({ imageHash: last.nextImageHash }) - if (!config) return undefined - - return { checkpoint: universal.genericCoderFor(config.version).config.checkpointOf(config), result: r } - }) - ) - - best = - checkpoints.reduce((acc, val) => { - if (!val) return acc - if (!acc) return val - if (val.checkpoint > acc.checkpoint) return val - return acc - })?.result ?? [] - } - - if (!best) return [] - - return best - } - - async savePresignedConfiguration(args: PresignedConfig): Promise { - await Promise.all([this.tracker.savePresignedConfiguration(args), this.cache.savePresignedConfiguration(args)]) - } - - async configOfImageHash(args: { imageHash: string; noCache?: boolean }): Promise { - // We first check the cache, if it's not there, we check the tracker - // and then we save it to the cache - if (args.noCache !== true) { - const config = await this.cache.configOfImageHash(args) - if (config) return config - } - - const config2 = await this.tracker.configOfImageHash(args) - if (config2) { - await this.cache.saveWalletConfig({ config: config2 }) - } - - return config2 - } - - async saveWalletConfig(args: { config: commons.config.Config }): Promise { - await Promise.all([this.tracker.saveWalletConfig(args), this.cache.saveWalletConfig(args)]) - } - - async imageHashOfCounterfactualWallet(args: { - wallet: string - noCache?: boolean - }): Promise<{ imageHash: string; context: commons.context.WalletContext } | undefined> { - // We first check the cache, if it's not there, we check the tracker - // and then we save it to the cache - if (args.noCache !== true) { - const result1 = await this.cache.imageHashOfCounterfactualWallet(args) - if (result1) return result1 - } - - const result2 = await this.tracker.imageHashOfCounterfactualWallet(args) - if (result2) { - // TODO: We shouldn't need to get the config to save the counterfactual wallet - const config = await this.configOfImageHash({ imageHash: result2.imageHash }) - if (config) { - await this.cache.saveCounterfactualWallet({ config, context: [result2.context] }) - } - } - - return result2 - } - - async saveCounterfactualWallet(args: { - config: commons.config.Config - context: commons.context.WalletContext[] - }): Promise { - await Promise.all([this.tracker.saveCounterfactualWallet(args), this.cache.saveCounterfactualWallet(args)]) - } - - async walletsOfSigner(args: { - signer: string - noCache?: boolean - }): Promise<{ wallet: string; proof: { digest: string; chainId: bigint; signature: string } }[]> { - if (args.noCache) { - return this.tracker.walletsOfSigner(args) - } - - // In this case we need to both aggregate the results from the cache and the tracker - // and then dedupe the results - const results = await Promise.all([this.tracker.walletsOfSigner(args), this.cache.walletsOfSigner(args)]) - const wallets = new Map() - - for (const result of results) { - for (const wallet of result) { - wallets.set(wallet.wallet, wallet) - } - } - - return Array.from(wallets.values()) - } - - async saveWitnesses(args: { - wallet: string - digest: string - chainId: ethers.BigNumberish - signatures: string[] - }): Promise { - await Promise.all([this.tracker.saveWitnesses(args), this.cache.saveWitnesses(args)]) - } - - async getMigration( - address: string, - fromImageHash: string, - fromVersion: number, - chainId: ethers.BigNumberish - ): Promise { - // We first check the cache, if it's not there, we check the tracker - // NOTICE: we could eventually try to combine the two, but now we just have 1 migration - // so it's not worth it. - const migration1 = await this.cache.getMigration(address, fromImageHash, fromVersion, chainId) - if (migration1) return migration1 - - const migration2 = await this.tracker.getMigration(address, fromImageHash, fromVersion, chainId) - if (migration2) { - await this.cache.saveMigration(address, migration2, this.contexts) - } - - return migration2 - } - - async saveMigration( - address: string, - signed: migrator.SignedMigration, - contexts: commons.context.VersionedContext - ): Promise { - await Promise.all([ - this.tracker.saveMigration(address, signed, contexts), - this.cache.saveMigration(address, signed, contexts) - ]) - } -} diff --git a/old/packages/sessions/src/trackers/debug.ts b/old/packages/sessions/src/trackers/debug.ts deleted file mode 100644 index 99937fd05..000000000 --- a/old/packages/sessions/src/trackers/debug.ts +++ /dev/null @@ -1,97 +0,0 @@ -import { commons } from '@0xsequence/core' -import { migrator } from '@0xsequence/migration' -import { ConfigTracker, PresignedConfig, PresignedConfigLink } from '../tracker' -import { ethers } from 'ethers' -import { bigintReplacer } from '@0xsequence/utils' - -export class DebugConfigTracker implements ConfigTracker, migrator.PresignedMigrationTracker { - constructor(private readonly tracker: ConfigTracker & migrator.PresignedMigrationTracker) {} - - async loadPresignedConfiguration(args: { - wallet: string - fromImageHash: string - longestPath?: boolean - }): Promise { - console.debug('? loadPresignedConfiguration') - debug(args, '? ') - return debug(await this.tracker.loadPresignedConfiguration(args), '! ') - } - - savePresignedConfiguration(args: PresignedConfig): Promise { - console.debug('? savePresignedConfiguration') - debug(args, '? ') - return this.tracker.savePresignedConfiguration(args) - } - - saveWitnesses(args: { wallet: string; digest: string; chainId: ethers.BigNumberish; signatures: string[] }): Promise { - console.debug('? saveWitnesses') - debug(args, '? ') - return this.tracker.saveWitnesses(args) - } - - async configOfImageHash(args: { imageHash: string }): Promise { - console.debug('? configOfImageHash') - debug(args, '? ') - return debug(await this.tracker.configOfImageHash(args), '! ') - } - - saveWalletConfig(args: { config: commons.config.Config }): Promise { - console.debug('? saveWalletConfig') - debug(args, '? ') - return this.tracker.saveWalletConfig(args) - } - - async imageHashOfCounterfactualWallet(args: { - wallet: string - }): Promise<{ imageHash: string; context: commons.context.WalletContext } | undefined> { - console.debug('? imageHashOfCounterfactualWallet') - debug(args, '? ') - return debug(await this.tracker.imageHashOfCounterfactualWallet(args), '! ') - } - - saveCounterfactualWallet(args: { config: commons.config.Config; context: commons.context.WalletContext[] }): Promise { - console.debug('? saveCounterfactualWallet') - debug(args, '? ') - return this.tracker.saveCounterfactualWallet(args) - } - - async walletsOfSigner(args: { - signer: string - }): Promise<{ wallet: string; proof: { digest: string; chainId: bigint; signature: string } }[]> { - console.debug('? walletsOfSigner') - debug(args, '? ') - return debug(await this.tracker.walletsOfSigner(args), '! ') - } - - async getMigration( - address: string, - fromImageHash: string, - fromVersion: number, - chainId: ethers.BigNumberish - ): Promise { - console.debug('? getMigration') - debug({ address, fromImageHash, fromVersion, chainId }, '? ') - return debug(await this.tracker.getMigration(address, fromImageHash, fromVersion, chainId), '! ') - } - - saveMigration(address: string, signed: migrator.SignedMigration, contexts: commons.context.VersionedContext): Promise { - console.debug('? saveMigration') - debug({ address, signed, contexts }, '? ') - return this.tracker.saveMigration(address, signed, contexts) - } -} - -function debug(value: T, prefix: string = ''): T { - switch (value) { - case undefined: - console.debug(prefix + 'undefined') - break - default: - JSON.stringify(value, bigintReplacer, 2) - .split('\n') - .map(line => prefix + line) - .forEach(line => console.debug(line)) - break - } - return value -} diff --git a/old/packages/sessions/src/trackers/deduped.ts b/old/packages/sessions/src/trackers/deduped.ts deleted file mode 100644 index 4a06680d3..000000000 --- a/old/packages/sessions/src/trackers/deduped.ts +++ /dev/null @@ -1,100 +0,0 @@ -import { commons } from '@0xsequence/core' -import { migrator } from '@0xsequence/migration' - -import { ethers } from 'ethers' -import { ConfigTracker, PresignedConfig, PresignedConfigLink } from '../tracker' -import { PromiseCache } from './promise-cache' -import { LocalConfigTracker } from './local' - -export function isDedupedTracker(tracker: any): tracker is DedupedTracker { - return tracker instanceof DedupedTracker -} - -// This tracks wraps another tracker and dedupes calls to it, so in any calls -// are sent in short succession, only the first call is forwarded to the -// underlying tracker, and the rest are ignored. -export class DedupedTracker implements migrator.PresignedMigrationTracker, ConfigTracker { - private cache: PromiseCache = new PromiseCache() - - constructor( - private readonly tracker: migrator.PresignedMigrationTracker & ConfigTracker, - public readonly window = 50, - public verbose = false - ) {} - - invalidateCache() { - this.cache = new PromiseCache() - } - - configOfImageHash(args: { imageHash: string }): Promise { - return this.cache.do('configOfImageHash', this.window, args => this.tracker.configOfImageHash(args), args) - } - - getMigration( - address: string, - fromImageHash: string, - fromVersion: number, - chainId: ethers.BigNumberish - ): Promise { - return this.cache.do( - 'getMigration', - this.window, - (...args) => this.tracker.getMigration(...args), - address, - fromImageHash, - fromVersion, - chainId - ) - } - - saveMigration(address: string, signed: migrator.SignedMigration, contexts: commons.context.VersionedContext): Promise { - return this.cache.do('saveMigration', undefined, (...args) => this.tracker.saveMigration(...args), address, signed, contexts) - } - - loadPresignedConfiguration(args: { - wallet: string - fromImageHash: string - longestPath?: boolean | undefined - }): Promise { - return this.cache.do('loadPresignedConfiguration', this.window, args => this.tracker.loadPresignedConfiguration(args), args) - } - - savePresignedConfiguration(args: PresignedConfig): Promise { - return this.cache.do('savePresignedConfiguration', undefined, args => this.tracker.savePresignedConfiguration(args), args) - } - - saveWitnesses(args: { wallet: string; digest: string; chainId: ethers.BigNumberish; signatures: string[] }): Promise { - return this.cache.do('saveWitnesses', undefined, args => this.tracker.saveWitnesses(args), args) - } - - saveWalletConfig(args: { config: commons.config.Config }): Promise { - return this.cache.do('saveWalletConfig', undefined, args => this.tracker.saveWalletConfig(args), args) - } - - imageHashOfCounterfactualWallet(args: { - wallet: string - }): Promise<{ imageHash: string; context: commons.context.WalletContext } | undefined> { - return this.cache.do( - 'imageHashOfCounterfactualWallet', - undefined, - args => this.tracker.imageHashOfCounterfactualWallet(args), - args - ) - } - - saveCounterfactualWallet(args: { config: commons.config.Config; context: commons.context.WalletContext[] }): Promise { - return this.cache.do('saveCounterfactualWallet', undefined, args => this.tracker.saveCounterfactualWallet(args), args) - } - - walletsOfSigner(args: { - signer: string - }): Promise<{ wallet: string; proof: { digest: string; chainId: bigint; signature: string } }[]> { - return this.cache.do('walletsOfSigner', this.window, args => this.tracker.walletsOfSigner(args), args) - } - - updateProvider(provider: ethers.Provider) { - if (this.tracker instanceof LocalConfigTracker) { - this.tracker.updateProvider(provider) - } - } -} diff --git a/old/packages/sessions/src/trackers/index.ts b/old/packages/sessions/src/trackers/index.ts deleted file mode 100644 index a26c0c789..000000000 --- a/old/packages/sessions/src/trackers/index.ts +++ /dev/null @@ -1,8 +0,0 @@ -export * as arweave from './arweave' -export * as debug from './debug' -export * as local from './local' -export * as remote from './remote' -export * as stores from './stores' -export * from './multiple' -export * from './cached' -export * from './deduped' diff --git a/old/packages/sessions/src/trackers/local.ts b/old/packages/sessions/src/trackers/local.ts deleted file mode 100644 index a04d02af5..000000000 --- a/old/packages/sessions/src/trackers/local.ts +++ /dev/null @@ -1,594 +0,0 @@ -import { commons, universal, v1, v2 } from '@0xsequence/core' -import { migration, migrator } from '@0xsequence/migration' -import { ethers } from 'ethers' -import { CachedEIP5719 } from '@0xsequence/replacer' -import { ConfigTracker, PresignedConfig, PresignedConfigLink } from '../tracker' -import { isPlainNested, isPlainNode, isPlainV2Config, MemoryTrackerStore, PlainNested, PlainNode, TrackerStore } from './stores' - -export class LocalConfigTracker implements ConfigTracker, migrator.PresignedMigrationTracker { - private cachedEIP5719: CachedEIP5719 - - constructor( - // TODO: The provider is only used to determine that EIP1271 signatures have *some* validity - // but when reconstructing a presigned transaction we should do the replacement once per chain. - // For now, it's recommended to use Mainnet as the provider. - public provider: ethers.Provider, - private store: TrackerStore = new MemoryTrackerStore(), - public useEIP5719: boolean = false - ) { - this.cachedEIP5719 = new CachedEIP5719(provider) - } - - private loadTopology = async (hash: string): Promise => { - const node = await this.store.loadV2Node(hash) - if (!node) return { nodeHash: hash } - - if (isPlainNode(node)) { - const [left, right] = await Promise.all([this.loadTopology(node.left), this.loadTopology(node.right)]) - return { left, right } - } - - if (isPlainNested(node)) { - return { - weight: BigInt(node.weight), - threshold: BigInt(node.threshold), - tree: await this.loadTopology(node.tree) - } - } - - return node - } - - private saveTopology = async (node: v2.config.Topology): Promise => { - if (v2.config.isNodeLeaf(node)) { - return // Nothing to do, this is a dead-end - } - - const hash = v2.config.hashNode(node) - - if (v2.config.isNode(node)) { - const saveLeft = this.saveTopology(node.left) - const saveRight = this.saveTopology(node.right) - const saveThis = this.store.saveV2Node(hash, { - left: v2.config.hashNode(node.left), - right: v2.config.hashNode(node.right) - } as PlainNode) - - await Promise.all([saveLeft, saveRight, saveThis]) - - return - } - - if (v2.config.isNestedLeaf(node)) { - const saveTree = this.saveTopology(node.tree) - const saveThis = this.store.saveV2Node(hash, { - weight: BigInt(node.weight).toString(), - threshold: BigInt(node.threshold).toString(), - tree: v2.config.hashNode(node.tree) - } as PlainNested) - - await Promise.all([saveTree, saveThis]) - - return - } - - // If it's a normal leaf, then we just store it - if (v2.config.isSignerLeaf(node)) { - return this.store.saveV2Node(hash, { - address: node.address, - weight: node.weight - }) - } - - if (v2.config.isSubdigestLeaf(node)) { - return this.store.saveV2Node(hash, { - subdigest: node.subdigest - }) - } - - throw new Error(`Unknown topology type: ${node}`) - } - - saveWalletConfig = async (args: { config: commons.config.Config }): Promise => { - const { config } = args - if (v1.config.ConfigCoder.isWalletConfig(config)) { - // We can store the configuration as-is - const imageHash = v1.config.ConfigCoder.imageHashOf(config) - return this.store.saveConfig(imageHash, config) - } - - if (v2.config.ConfigCoder.isWalletConfig(config)) { - // We split the configuration in a list of nodes, and store them individually - // then we can reconstruct it. This also means we can combine multiple configurations - // if they share information - const imageHash = v2.config.ConfigCoder.imageHashOf(config) - - // This is an optimization, it allows us to avoid splitting the tree if it's already complete - if (v2.config.isComplete(config.tree)) { - return this.store.saveConfig(imageHash, config) - } - - // TODO: Re-enable storing partial v2 configs once - // we have more performant code to reconstructing them - // in the meantime, rely on the remote tracker - - // const storeTree = this.saveTopology(config.tree) - // const storeConfig = this.store.saveConfig(imageHash, { - // version: 2, - // threshold: BigInt(config.threshold).toString(), - // checkpoint: BigInt(config.checkpoint).toString(), - // tree: v2.config.hashNode(config.tree) - // }) - - // await Promise.all([storeTree, storeConfig]) - } - - return - } - - private configOfImageHashCache = {} as { [key: string]: commons.config.Config } - - configOfImageHash = async (args: { imageHash: string }): Promise => { - const { imageHash } = args - - if (this.configOfImageHashCache[args.imageHash]) { - return this.configOfImageHashCache[args.imageHash] - } - - const config = await this.store.loadConfig(imageHash) - if (!config) { - return undefined - } - - if (config.version === 1 || (config.version === 2 && !isPlainV2Config(config))) { - this.configOfImageHashCache[args.imageHash] = config - return config - } - - if (isPlainV2Config(config)) { - const fullConfig = { - version: 2, - threshold: BigInt(config.threshold), - checkpoint: BigInt(config.checkpoint), - tree: await this.loadTopology(config.tree) - } as v2.config.WalletConfig - this.configOfImageHashCache[args.imageHash] = fullConfig - return fullConfig - } - - throw new Error(`Unknown config type: ${config}`) - } - - saveCounterfactualWallet = async (args: { - config: commons.config.Config - context: commons.context.WalletContext[] - }): Promise => { - const { config, context } = args - const imageHash = universal.genericCoderFor(config.version).config.imageHashOf(config) - await Promise.all([ - this.saveWalletConfig({ config }), - ...context.map(ctx => { - const address = commons.context.addressOf(ctx, imageHash) - return this.store.saveCounterfactualWallet(address, imageHash, ctx) - }) - ]) - } - - imageHashOfCounterfactualWallet = async (args: { - wallet: string - }): Promise< - | { - imageHash: string - context: commons.context.WalletContext - } - | undefined - > => { - const { wallet } = args - const result = await this.store.loadCounterfactualWallet(wallet) - - if (!result) return undefined - - return { - imageHash: result.imageHash, - context: result.context - } - } - - savePayload = async (args: { payload: commons.signature.SignedPayload }): Promise => { - const { payload } = args - - const subdigest = commons.signature.subdigestOf(payload) - await this.store.savePayloadOfSubdigest(subdigest, payload) - } - - private payloadOfSubdigestCache = {} as { [key: string]: commons.signature.SignedPayload } - - payloadOfSubdigest = async (args: { subdigest: string }): Promise => { - if (this.payloadOfSubdigestCache[args.subdigest]) { - return this.payloadOfSubdigestCache[args.subdigest] - } - - const { subdigest } = args - const res = await this.store.loadPayloadOfSubdigest(subdigest) - - if (res) { - this.payloadOfSubdigestCache[subdigest] = res - } - - return res - } - - savePresignedConfiguration = async (args: PresignedConfig): Promise => { - // Presigned configurations only work with v2 (for now) - // so we can assume that the signature is for a v2 configuration - const decoded = v2.signature.SignatureCoder.decode(args.signature) - const nextImageHash = universal.genericCoderFor(args.nextConfig.version).config.imageHashOf(args.nextConfig) - const message = v2.chained.messageSetImageHash(nextImageHash) - const digest = ethers.keccak256(message) - const payload = { - message, - address: args.wallet, - chainId: 0, - digest - } - - const savePayload = this.savePayload({ payload }) - const saveNextConfig = this.saveWalletConfig({ config: args.nextConfig }) - - const recovered = await v2.signature.SignatureCoder.recover(decoded, payload, this.provider) - - // Save the recovered configuration and all signature parts - const signatures = v2.signature.signaturesOf(recovered.config.tree) - await Promise.all([ - savePayload, - saveNextConfig, - this.saveWalletConfig({ config: recovered.config }), - ...signatures.map(sig => this.store.saveSignatureOfSubdigest(sig.address, recovered.subdigest, sig.signature)) - ]) - } - - loadPresignedConfiguration = async (args: { - wallet: string - fromImageHash: string - longestPath?: boolean - }): Promise => { - const { wallet, fromImageHash, longestPath } = args - - const fromConfig = await this.configOfImageHash({ imageHash: fromImageHash }) - if (!fromConfig || !v2.config.ConfigCoder.isWalletConfig(fromConfig)) { - return [] - } - - // Get all subdigests for the config members - const signers = v2.config.signersOf(fromConfig.tree).map(s => s.address) - const subdigestsOfSigner = await Promise.all(signers.map(s => this.store.loadSubdigestsOfSigner(s))) - const subdigests = [...new Set(subdigestsOfSigner.flat())] - - // Get all unique payloads - const payloads = await Promise.all( - [...new Set(subdigests)].map(async s => ({ ...(await this.payloadOfSubdigest({ subdigest: s })), subdigest: s })) - ) - - // Get all possible next imageHashes based on the payloads - const nextImageHashes = payloads - .filter(p => p?.message && p?.address && p.address === wallet) - .map(p => ({ payload: p, nextImageHash: v2.chained.decodeMessageSetImageHash(p!.message!) })) - .filter(p => p?.nextImageHash) as { - payload: commons.signature.SignedPayload & { subdigest: string } - nextImageHash: string - }[] - - // Build a signature for each next imageHash - // and filter out the ones that don't have enough weight - let bestCandidate: - | { - nextImageHash: string - checkpoint: bigint - signature: string - } - | undefined - - const nextConfigsAndCheckpoints = await Promise.all( - nextImageHashes.map(async ({ nextImageHash, payload }) => { - const nextConfig = await this.configOfImageHash({ imageHash: nextImageHash }) - if (!nextConfig || !v2.config.isWalletConfig(nextConfig)) return undefined - const nextCheckpoint = BigInt(nextConfig.checkpoint) - return { nextConfig, nextCheckpoint, nextImageHash, payload } - }) - ) - - const sortedNextConfigsAndCheckpoints = nextConfigsAndCheckpoints - .filter(c => c !== undefined) - .filter(c => c!.nextCheckpoint > BigInt(fromConfig.checkpoint)) - .sort((a, b) => - // If we are looking for the longest path, sort by ascending checkpoint - // because we want to find the smalles jump, and we should start with the - // closest one. If we are not looking for the longest path, sort by - // descending checkpoint, because we want to find the largest jump. - // - // We don't have a guarantee that all "next configs" will be valid - // so worst case scenario we will need to try all of them. - // But we can try to optimize for the most common case. - a!.nextCheckpoint > b!.nextCheckpoint ? (longestPath ? 1 : -1) : longestPath ? -1 : 1 - ) - - for (const entry of sortedNextConfigsAndCheckpoints) { - const { nextConfig, nextCheckpoint, nextImageHash, payload } = entry! - - if (bestCandidate) { - const bestCheckpoint = bestCandidate.checkpoint - if (longestPath) { - // Only consider candidates earlier than our current best - if (nextCheckpoint >= bestCheckpoint) continue - } else { - // Only consider candidates later than our current best - if (nextCheckpoint <= bestCheckpoint) continue - } - } - - // Get all signatures (for all signers) for this subdigest - const signatures = new Map( - ( - await Promise.all( - signers.map(async signer => { - const signature = await this.store.loadSignatureOfSubdigest(signer, payload.subdigest) - if (!signature) { - return [signer, undefined] - } - - const replacedSignature = ethers.hexlify( - this.useEIP5719 ? await this.cachedEIP5719.runByEIP5719(signer, payload.subdigest, signature) : signature - ) - - const isDynamic = commons.signer.tryRecoverSigner(payload.subdigest, replacedSignature) !== signer - - return [signer, { isDynamic, signature: replacedSignature }] - }) - ) - ).filter((signature): signature is [string, commons.signature.SignaturePart] => Boolean(signature[1])) - ) - - // Skip if we don't have ANY signatures (it can never reach the threshold) - if (signatures.size === 0) continue - - // Encode the full signature (to see if it has enough weight) - const encoded = v2.signature.SignatureCoder.encodeSigners(fromConfig, signatures, [], 0) - if (encoded.weight < BigInt(fromConfig.threshold)) continue - - // Save the new best candidate - bestCandidate = { - nextImageHash, - checkpoint: BigInt(nextConfig.checkpoint), - signature: encoded.encoded - } - } - - if (!bestCandidate) { - return [] - } - - // Get the next step - const nextStep = await this.loadPresignedConfiguration({ - wallet, - fromImageHash: bestCandidate.nextImageHash, - longestPath - }) - - return [ - { - wallet, - nextImageHash: bestCandidate.nextImageHash, - signature: bestCandidate.signature - }, - ...nextStep - ] - } - - saveWitnesses = async (args: { - wallet: string - digest: string - chainId: ethers.BigNumberish - signatures: string[] - }): Promise => { - const payload = { - digest: args.digest, - address: args.wallet, - chainId: args.chainId - } - - const subdigest = commons.signature.subdigestOf(payload) - - await Promise.all([ - this.savePayload({ payload }), - ...args.signatures - .filter(signature => { - // We don't support saving witnesses for non-recoverable signatures - // we could change this eventually, but the issue is that the witness may become invalid - return commons.signer.canRecover(signature) - }) - .map(signature => { - const signer = commons.signer.recoverSigner(subdigest, signature) - return this.store.saveSignatureOfSubdigest(signer, subdigest, signature) - }) - ]) - } - - walletsOfSigner = async (args: { - signer: string - }): Promise< - { - wallet: string - proof: { - digest: string - chainId: bigint - signature: string - } - }[] - > => { - const subdigests = await this.store.loadSubdigestsOfSigner(args.signer) - const payloads = await Promise.all(subdigests.map(s => this.payloadOfSubdigest({ subdigest: s }))).then( - p => p.filter(p => p !== undefined) as commons.signature.SignedPayload[] - ) - - // filter unique wallets, and provide a proof for each wallet - const result: { - wallet: string - proof: { - digest: string - chainId: bigint - signature: string - } - }[] = [] - - for (const payload of payloads) { - const wallet = payload.address - if (result.find(r => r.wallet === wallet)) continue - - const subdigest = commons.signature.subdigestOf(payload) - const signature = await this.store.loadSignatureOfSubdigest(args.signer, subdigest) - if (!signature) continue - - result.push({ - wallet, - proof: { - digest: payload.digest, - chainId: BigInt(payload.chainId), - signature: ethers.hexlify(signature) - } - }) - } - - return result - } - - async saveMigration( - address: string, - signed: migrator.SignedMigration, - contexts: commons.context.VersionedContext - ): Promise { - const fromVersion = signed.fromVersion - if (fromVersion !== 1) throw new Error('Migration not supported') - if (!v2.config.isWalletConfig(signed.toConfig)) throw new Error('Invalid to config') - - // Validate migration transaction - const { newImageHash, address: decodedAddress } = migration.v1v2.decodeTransaction(signed.tx, contexts) - if (decodedAddress !== address) throw new Error('Invalid migration transaction - address') - if (v2.config.ConfigCoder.imageHashOf(signed.toConfig) != newImageHash) - throw new Error('Invalid migration transaction - config') - - // Split signature and save each part - const message = commons.transaction.packMetaTransactionsData(signed.tx.nonce, signed.tx.transactions) - const digest = ethers.keccak256(message) - const payload = { chainId: signed.tx.chainId, message, address, digest } - const subdigest = commons.signature.subdigestOf(payload) - - const savePayload = this.savePayload({ payload }) - const saveToConfig = this.saveWalletConfig({ config: signed.toConfig }) - - const decoded = v1.signature.SignatureCoder.decode(signed.tx.signature) - const recovered = await v1.signature.SignatureCoder.recover(decoded, payload, this.provider) - - // Save the recovered config, the migrate transaction, and all signature parts - const signatures = v1.signature.SignatureCoder.signaturesOf(recovered.config) - - await Promise.all([ - savePayload, - saveToConfig, - this.saveWalletConfig({ config: recovered.config }), - this.store.saveMigrationsSubdigest(address, fromVersion, fromVersion + 1, subdigest, newImageHash), - ...signatures.map(sig => this.store.saveSignatureOfSubdigest(sig.address, recovered.subdigest, sig.signature)) - ]) - } - - async getMigration( - address: string, - fromImageHash: string, - fromVersion: number, - chainId: ethers.BigNumberish - ): Promise { - // Get the current config and all possible migration payloads - const [currentConfig, txs] = await Promise.all([ - this.configOfImageHash({ imageHash: fromImageHash }), - this.store.loadMigrationsSubdigest(address, fromVersion, fromVersion + 1) - ]) - - const coder = universal.coderFor(fromVersion) - if (!currentConfig) { - // We may not be able to find the config, because the migration is still not copied locally - // in that case we consider as we don't have any migration - return undefined - } - - if (!coder.config.isWalletConfig(currentConfig)) { - // throw new Error("Invalid from config - version") - // better to not fail here, some other tracker may be able to handle this migration - return undefined - } - - // We need to process every migration candidate individually - // and see which one has enough signers to be valid (for the current config) - const candidates = await Promise.all( - txs.map(async tx => { - const { subdigest, toImageHash } = tx - const payload = await this.payloadOfSubdigest({ subdigest }) - if (!payload || !payload.message) return undefined - if (BigInt(chainId) !== BigInt(payload.chainId)) return undefined - - const signers = coder.config.signersOf(currentConfig as any).map(s => s.address) - - // Get all signatures (for all signers) for this subdigest - const signatures = new Map( - ( - await Promise.all( - signers.map(async signer => { - const signature = await this.store.loadSignatureOfSubdigest(signer, subdigest) - if (!signature) { - return [signer, undefined] - } - - const replacedSignature = ethers.hexlify( - this.useEIP5719 ? await this.cachedEIP5719.runByEIP5719(signer, subdigest, signature) : signature - ) - - const isDynamic = commons.signer.tryRecoverSigner(subdigest, replacedSignature) !== signer - - return [signer, { isDynamic, signature: replacedSignature }] - }) - ) - ).filter((signature): signature is [string, commons.signature.SignaturePart] => Boolean(signature[1])) - ) - - // Encode signature parts into a single signature - const encoded = coder.signature.encodeSigners(currentConfig as any, signatures, [], chainId) - if (!encoded || encoded.weight < BigInt(currentConfig.threshold)) return undefined - - // Unpack payload (it should have transactions) - const [nonce, transactions] = commons.transaction.unpackMetaTransactionsData(payload.message) - - return { - tx: { - entrypoint: address, - transactions: commons.transaction.fromTxAbiEncode(transactions), - chainId: chainId, - nonce: nonce, - signature: encoded.encoded, - intent: { - id: subdigest, - wallet: address - } - }, - toConfig: await this.configOfImageHash({ imageHash: toImageHash }), - fromVersion, - toVersion: fromVersion + 1 - } as migrator.SignedMigration - }) - ).then(c => c.filter(c => c !== undefined)) - - // Return the first valid candidate - return candidates[0] - } - - updateProvider(provider: ethers.Provider) { - this.provider = provider - } -} diff --git a/old/packages/sessions/src/trackers/multiple.ts b/old/packages/sessions/src/trackers/multiple.ts deleted file mode 100644 index f6bdced6f..000000000 --- a/old/packages/sessions/src/trackers/multiple.ts +++ /dev/null @@ -1,236 +0,0 @@ -import { ConfigTracker, PresignedConfig, PresignedConfigLink } from '../tracker' -import { migrator } from '@0xsequence/migration' - -import { commons, universal } from '@0xsequence/core' -import { LocalConfigTracker } from './local' -import { ethers } from 'ethers' - -export function raceUntil(promises: Promise[], fallback: T, evalRes: (val: T) => boolean): Promise { - return new Promise(resolve => { - let count = 0 - - promises.forEach(p => - p - .then((val: T) => { - if (evalRes(val)) { - resolve(val) - } else { - count++ - if (count === promises.length) { - resolve(fallback) - } - } - }) - .catch(() => { - // Ignore - count++ - if (count === promises.length) { - resolve(fallback) - } - }) - ) - }) -} - -export async function allSafe(promises: Promise[], fallback: T): Promise { - return Promise.all(promises.map(promise => promise.catch(() => fallback))) -} - -export class MultipleTracker implements migrator.PresignedMigrationTracker, ConfigTracker { - constructor(private trackers: (migrator.PresignedMigrationTracker & ConfigTracker)[]) {} - - async configOfImageHash(args: { imageHash: string }): Promise { - const requests = this.trackers.map(async (t, i) => ({ res: await t.configOfImageHash(args), i })) - - // We try to find a complete configuration, we race so that we don't wait for all trackers to respond - const result1 = await raceUntil(requests, undefined, val => { - if (val?.res === undefined) return false - return universal.genericCoderFor(val.res.version).config.isComplete(val.res) - }) - - if (result1?.res) { - // Skip saving the config to the tracker that returned the result - this.saveWalletConfig({ config: result1.res, skipTracker: result1.i }) - return result1.res - } - - // If we haven't found a complete configuration yet, it either means that the configuration is not complete - // (and thus we need to combine all results) or that the configuration is not found at all - // but we try to combine all results anyway - const tmptracker = new LocalConfigTracker(undefined as any) // TODO: Fix this, provider not needed anyway - - const results = await allSafe(requests, undefined) - - for (const r of results) { - if (r?.res) await tmptracker.saveWalletConfig({ config: r.res }) - } - - const result2 = await tmptracker.configOfImageHash(args) - if (result2) this.saveWalletConfig({ config: result2 }) - return result2 - } - - async saveWalletConfig(args: { config: commons.config.Config; skipTracker?: number }): Promise { - await Promise.all( - this.trackers.map((t, i) => { - if (i === args.skipTracker) return - return t.saveWalletConfig(args) - }) - ) - } - - async imageHashOfCounterfactualWallet(args: { - wallet: string - }): Promise<{ imageHash: string; context: commons.context.WalletContext } | undefined> { - const imageHash = await raceUntil( - this.trackers.map(t => t.imageHashOfCounterfactualWallet(args)), - undefined, - result => Boolean(result) - ) - - if (imageHash) { - this.configOfImageHash({ imageHash: imageHash.imageHash }).then(config => { - if (config) { - this.saveCounterfactualWallet({ config, context: [imageHash.context] }) - } - }) - } - - return imageHash - } - - async saveCounterfactualWallet(args: { - config: commons.config.Config - context: commons.context.WalletContext[] - skipTracker?: number - }): Promise { - await Promise.all( - this.trackers.map((t, i) => { - if (i === args.skipTracker) return - return t.saveCounterfactualWallet(args) - }) - ) - } - - async walletsOfSigner(args: { - signer: string - }): Promise<{ wallet: string; proof: { digest: string; chainId: bigint; signature: string } }[]> { - // We can't race here, because there is no "correct" response - // we just return the union of all results, skipping duplicates - const results = await allSafe( - this.trackers.map(t => t.walletsOfSigner(args)), - [] - ).then(r => r.flat()) - - const wallets: { [wallet: string]: { digest: string; chainId: bigint; signature: string } } = {} - for (const r of results) { - wallets[r.wallet] = r.proof - } - - // TODO: This will send redundant information back to the trackers - // consider optimizing this for better performance during login - - const result = Object.keys(wallets).map(w => ({ wallet: w, proof: wallets[w] })) - - const witnesses = new Map() - result.forEach(({ wallet, proof: { digest, chainId, signature } }) => { - const key = `${wallet}-${digest}-${chainId}` - let signatures = witnesses.get(key) - if (!signatures) { - signatures = { wallet, digest, chainId, signatures: [] } - witnesses.set(key, signatures) - } - signatures.signatures.push(signature) - }) - witnesses.forEach(witnesses => this.saveWitnesses(witnesses)) - - return result - } - - async saveWitnesses(args: { - wallet: string - digest: string - chainId: ethers.BigNumberish - signatures: string[] - }): Promise { - await Promise.all(this.trackers.map(t => t.saveWitnesses(args))) - } - - async loadPresignedConfiguration(args: { - wallet: string - fromImageHash: string - longestPath?: boolean | undefined - }): Promise { - // We can't race here, because any of the trackers could have a new "link" in the chain - const results = await allSafe( - this.trackers.map(t => t.loadPresignedConfiguration(args)), - [] - ) - - // The "best" result is the one with the highest checkpoint - const checkpoints = await allSafe( - results.map(async r => { - const last = r[r.length - 1] - - // TODO: This will fire a lot of requests, optimize it - const config = await this.configOfImageHash({ imageHash: last.nextImageHash }) - if (!config) return undefined - - return { checkpoint: universal.genericCoderFor(config.version).config.checkpointOf(config), result: r } - }), - undefined - ) - - const best = checkpoints.reduce((acc, val) => { - if (!val) return acc - if (!acc) return val - if (val.checkpoint > acc.checkpoint) return val - return acc - }) - - if (!best) return [] - - const configs = new Map>() - const config = (imageHash: string): Promise => { - if (!configs.has(imageHash)) { - configs.set(imageHash, this.configOfImageHash({ imageHash })) - } - return configs.get(imageHash)! - } - best.result.forEach(async res => { - const nextConfig = await config(res.nextImageHash) - if (nextConfig) { - this.savePresignedConfiguration({ - wallet: args.wallet, - nextConfig, - signature: res.signature - }) - } - }) - - return best.result - } - - async savePresignedConfiguration(args: PresignedConfig): Promise { - await Promise.all(this.trackers.map(t => t.savePresignedConfiguration(args))) - } - - async getMigration( - address: string, - fromImageHash: string, - fromVersion: number, - chainId: ethers.BigNumberish - ): Promise { - // TODO: Backfeed migration results to other trackers - const results = await Promise.all(this.trackers.map(t => t.getMigration(address, fromImageHash, fromVersion, chainId))) - return results.find(r => !!r) - } - - async saveMigration( - address: string, - signed: migrator.SignedMigration, - contexts: commons.context.VersionedContext - ): Promise { - await Promise.all(this.trackers.map(t => t.saveMigration(address, signed, contexts))) - } -} diff --git a/old/packages/sessions/src/trackers/promise-cache.ts b/old/packages/sessions/src/trackers/promise-cache.ts deleted file mode 100644 index 53c1f735d..000000000 --- a/old/packages/sessions/src/trackers/promise-cache.ts +++ /dev/null @@ -1,60 +0,0 @@ -import { ethers } from 'ethers' - -export class PromiseCache { - private readonly cache: Map - - constructor() { - this.cache = new Map() - } - - do, T>( - key: string, - validMilliseconds: number | undefined, - task: (...args: S) => Promise, - ...args: S - ): Promise { - key = `${key}:${ethers.id(JSON.stringify(args, deterministically))}` - - let entry = this.cache.get(key) - - if (entry) { - if (entry.expiration) { - if (new Date() >= entry.expiration) { - entry = undefined - this.cache.delete(key) - } - } - } - - if (!entry) { - const entry_: Entry = { promise: task(...args) } - - if (validMilliseconds !== undefined) { - entry_.promise = entry_.promise.then(result => { - entry_.expiration = new Date(Date.now() + validMilliseconds) - return result - }) - } - - entry = entry_ - this.cache.set(key, entry) - } - - return entry.promise as Promise - } -} - -type Entry = { - promise: Promise - expiration?: Date -} - -function deterministically(_key: string, value: any): any { - if (typeof value === 'object' && value !== null && !Array.isArray(value)) { - return Object.fromEntries(Object.entries(value).sort()) - } else if (typeof value === 'bigint') { - return value.toString() - } - - return value -} diff --git a/old/packages/sessions/src/trackers/remote/index.ts b/old/packages/sessions/src/trackers/remote/index.ts deleted file mode 100644 index ba9c51b3d..000000000 --- a/old/packages/sessions/src/trackers/remote/index.ts +++ /dev/null @@ -1,360 +0,0 @@ -import { commons, universal, v1, v2 } from '@0xsequence/core' -import { migrator } from '@0xsequence/migration' -import { ethers } from 'ethers' -import { ConfigTracker, PresignedConfig, PresignedConfigLink } from '../../tracker' -import { Sessions, SignatureType, Transaction } from './sessions.gen' - -export class RemoteConfigTracker implements ConfigTracker, migrator.PresignedMigrationTracker { - private readonly sessions: Sessions - - constructor( - hostname: string, - public readonly onlyRecoverable: boolean = true - ) { - this.sessions = new Sessions(hostname, fetch) - } - - async loadPresignedConfiguration(args: { - wallet: string - fromImageHash: string - longestPath?: boolean - }): Promise { - try { - const { updates } = await this.sessions.configUpdates({ - wallet: args.wallet, - fromImageHash: args.fromImageHash, - allUpdates: args.longestPath - }) - - return updates.map(({ toImageHash, signature }) => ({ wallet: args.wallet, nextImageHash: toImageHash, signature })) - } catch (error) { - if (is404NotFound(error)) { - return [] - } else { - throw error - } - } - } - - async savePresignedConfiguration(args: PresignedConfig): Promise { - const config = args.nextConfig - const imageHash = universal.genericCoderFor(config.version).config.imageHashOf(config) - const message = v2.signature.setImageHashStruct(imageHash) - const digest = ethers.keccak256(message) - - await this.sessions.saveSignature({ - wallet: args.wallet, - digest, - chainID: '0', - signature: args.signature, - toConfig: encodeConfig(config), - referenceChainID: args.referenceChainId !== undefined ? BigInt(args.referenceChainId).toString() : undefined - }) - } - - async saveWitnesses(args: { - wallet: string - digest: string - chainId: ethers.BigNumberish - signatures: string[] - }): Promise { - let filteredSignatures = args.signatures - if (this.onlyRecoverable) { - filteredSignatures = filteredSignatures.filter(signature => { - return commons.signer.canRecover(signature) - }) - } - - await this.sessions.saveSignerSignatures({ - wallet: args.wallet, - digest: args.digest, - chainID: numberString(args.chainId), - signatures: filteredSignatures - }) - } - - async configOfImageHash(args: { imageHash: string }): Promise { - try { - const { version, config } = await this.sessions.config(args) - return decodeConfig(version, config) - } catch (error) { - if (is404NotFound(error)) { - return - } else { - throw error - } - } - } - - async saveWalletConfig(args: { config: commons.config.Config }): Promise { - const config = encodeConfig(args.config) - await this.sessions.saveConfig({ version: args.config.version, config }) - } - - async imageHashOfCounterfactualWallet(args: { - wallet: string - }): Promise<{ imageHash: string; context: commons.context.WalletContext } | undefined> { - try { - const { deployHash, context } = await this.sessions.deployHash(args) - return { imageHash: deployHash, context } - } catch (error) { - if (is404NotFound(error)) { - return - } else { - throw error - } - } - } - - async saveCounterfactualWallet(args: { - config: commons.config.Config - context: commons.context.WalletContext[] - }): Promise { - const deployConfig = encodeConfig(args.config) - await this.sessions.saveWallet({ version: args.config.version, deployConfig }) - } - - async walletsOfSigner(args: { - signer: string - }): Promise<{ wallet: string; proof: { digest: string; chainId: bigint; signature: string } }[]> { - const { wallets } = await this.sessions.wallets(args) - return Object.entries(wallets).map(([wallet, { digest, chainID, type, signature }]) => { - switch (type) { - case SignatureType.EIP712: - signature += ethers.toBeHex(commons.signer.SigType.EIP712).slice(2) - break - case SignatureType.EthSign: - signature += ethers.toBeHex(commons.signer.SigType.ETH_SIGN).slice(2) - break - case SignatureType.EIP1271: - signature += ethers.toBeHex(commons.signer.SigType.WALLET_BYTES32).slice(2) - break - } - - return { - wallet, - proof: { - digest, - signature, - chainId: BigInt(chainID) - } - } - }) - } - - async getMigration( - wallet: string, - fromImageHash: string, - fromVersion: number, - chainId: ethers.BigNumberish - ): Promise { - const chainIdString = numberString(chainId) - const { migrations } = await this.sessions.migrations({ wallet, fromVersion, fromImageHash, chainID: chainIdString }) - - const chooseMigration = async (chainId: string): Promise => { - const migrations_ = migrations[chainId] - if (migrations_) { - const toVersions = Object.keys(migrations_) - .map(Number) - .sort((a: number, b: number) => b - a) - - for (const toVersion of toVersions) { - for (const [toHash, transactions] of Object.entries(migrations_[toVersion])) { - try { - const toConfig = await this.configOfImageHash({ imageHash: toHash }) - if (toConfig) { - return { - fromVersion, - toVersion, - toConfig, - tx: { - entrypoint: transactions.executor, - transactions: transactions.transactions, - nonce: transactions.nonce, - signature: transactions.signature, - chainId, - intent: { - id: commons.transaction.subdigestOfTransactions( - wallet, - chainId, - transactions.nonce, - transactions.transactions - ), - wallet - } - } - } - } - } catch (error) { - console.error(error) - } - } - } - } - return - } - - const migration = await chooseMigration(chainIdString) - if (migration) { - return migration - } - - for (const chainId in migrations) { - if (chainId !== chainIdString) { - const migration = await chooseMigration(chainId) - if (migration) { - return migration - } - } - } - - return - } - - async saveMigration( - wallet: string, - signed: migrator.SignedMigration, - _contexts: commons.context.VersionedContext - ): Promise { - await this.sessions.saveMigration({ - wallet, - fromVersion: signed.fromVersion, - toVersion: signed.toVersion, - toConfig: encodeConfig(signed.toConfig), - executor: signed.tx.entrypoint, - transactions: signed.tx.transactions.map(encodeTransaction), - nonce: numberString(signed.tx.nonce), - signature: signed.tx.signature, - chainID: numberString(signed.tx.chainId) - }) - } -} - -type SessionsConfig = { - 1: { threshold: number; signers: Array<{ weight: number; address: string }> } - 2: { threshold: number; checkpoint: number; tree: V2SessionsConfigTree } -} - -type V2SessionsConfigTree = - | { left: V2SessionsConfigTree; right: V2SessionsConfigTree } - | { weight: number; address: string } - | { node: string } - | { weight: number; threshold: number; tree: V2SessionsConfigTree } - | { subdigest: string } - -function encodeConfig(config: commons.config.Config): SessionsConfig[1 | 2] { - switch (config.version) { - case 1: - if (v1.config.ConfigCoder.isWalletConfig(config)) { - return { - threshold: numberNumber(config.threshold), - signers: config.signers.map(({ weight, address }) => ({ weight: numberNumber(weight), address })) - } - } else { - throw new Error(`not a v${config.version} config: ${config}`) - } - - case 2: - if (v2.config.ConfigCoder.isWalletConfig(config)) { - return { - threshold: numberNumber(config.threshold), - checkpoint: numberNumber(config.checkpoint), - tree: encodeV2ConfigTree(config.tree) - } - } else { - throw new Error(`not a v${config.version} config: ${config}`) - } - - default: - throw new Error(`unknown version ${config.version}`) - } -} - -function encodeV2ConfigTree(tree: v2.config.Topology): V2SessionsConfigTree { - if (v2.config.isNode(tree)) { - return { - left: encodeV2ConfigTree(tree.left), - right: encodeV2ConfigTree(tree.right) - } - } else if (v2.config.isSignerLeaf(tree)) { - return { - weight: numberNumber(tree.weight), - address: tree.address - } - } else if (v2.config.isNestedLeaf(tree)) { - return { - weight: numberNumber(tree.weight), - threshold: numberNumber(tree.threshold), - tree: encodeV2ConfigTree(tree.tree) - } - } else if (v2.config.isNodeLeaf(tree)) { - return { node: tree.nodeHash } - } else { - return { ...tree } - } -} - -function decodeConfig(version: number, config: any): commons.config.Config { - switch (version) { - case 1: - return { ...config, version } - - case 2: - return { ...config, version, tree: decodeV2ConfigTree(config.tree) } - - default: - throw new Error(`unknown version ${version}`) - } -} - -function decodeV2ConfigTree(tree: any): v2.config.Topology { - switch (typeof tree) { - case 'object': - const tree_ = { ...tree } - - if (tree_.left !== undefined) { - tree_.left = decodeV2ConfigTree(tree_.left) - } - - if (tree_.right !== undefined) { - tree_.right = decodeV2ConfigTree(tree_.right) - } - - if (tree_.tree !== undefined) { - tree_.tree = decodeV2ConfigTree(tree_.tree) - } - - if (tree_.node !== undefined) { - tree_.nodeHash = tree_.node - delete tree_.node - } - - return tree_ - - default: - throw new Error(`v2 config tree ${tree} is not an object`) - } -} - -function encodeTransaction(transaction: commons.transaction.Transaction): Transaction { - return { - to: transaction.to, - value: transaction.value !== undefined ? numberString(transaction.value) : undefined, - data: transaction.data !== undefined ? ethers.hexlify(transaction.data) : undefined, - gasLimit: transaction.gasLimit !== undefined ? numberString(transaction.gasLimit) : undefined, - delegateCall: transaction.delegateCall, - revertOnError: transaction.revertOnError - } -} - -function numberNumber(n: ethers.BigNumberish): number { - return Number(n) -} - -function numberString(n: ethers.BigNumberish): string { - return BigInt(n).toString() -} - -function is404NotFound(error: any): boolean { - return typeof error === 'object' && error.status === 404 -} diff --git a/old/packages/sessions/src/trackers/remote/sessions.gen.ts b/old/packages/sessions/src/trackers/remote/sessions.gen.ts deleted file mode 100644 index 3322c1e90..000000000 --- a/old/packages/sessions/src/trackers/remote/sessions.gen.ts +++ /dev/null @@ -1,808 +0,0 @@ -/* eslint-disable */ -// sessions v0.0.1 48681273e3b0249c5feb593b9af1b59dc6a14869 -// -- -// Code generated by webrpc-gen@v0.22.1 with typescript generator. DO NOT EDIT. -// -// webrpc-gen -schema=sessions.ridl -target=typescript -client -out=./clients/sessions.gen.ts - -export const WebrpcHeader = 'Webrpc' - -export const WebrpcHeaderValue = 'webrpc@v0.22.1;gen-typescript@v0.16.2;sessions@v0.0.1' - -// WebRPC description and code-gen version -export const WebRPCVersion = 'v1' - -// Schema version of your RIDL schema -export const WebRPCSchemaVersion = 'v0.0.1' - -// Schema hash generated from your RIDL schema -export const WebRPCSchemaHash = '48681273e3b0249c5feb593b9af1b59dc6a14869' - -type WebrpcGenVersions = { - webrpcGenVersion: string - codeGenName: string - codeGenVersion: string - schemaName: string - schemaVersion: string -} - -export function VersionFromHeader(headers: Headers): WebrpcGenVersions { - const headerValue = headers.get(WebrpcHeader) - if (!headerValue) { - return { - webrpcGenVersion: '', - codeGenName: '', - codeGenVersion: '', - schemaName: '', - schemaVersion: '' - } - } - - return parseWebrpcGenVersions(headerValue) -} - -function parseWebrpcGenVersions(header: string): WebrpcGenVersions { - const versions = header.split(';') - if (versions.length < 3) { - return { - webrpcGenVersion: '', - codeGenName: '', - codeGenVersion: '', - schemaName: '', - schemaVersion: '' - } - } - - const [_, webrpcGenVersion] = versions[0].split('@') - const [codeGenName, codeGenVersion] = versions[1].split('@') - const [schemaName, schemaVersion] = versions[2].split('@') - - return { - webrpcGenVersion, - codeGenName, - codeGenVersion, - schemaName, - schemaVersion - } -} - -// -// Types -// - -export enum SignatureType { - EIP712 = 'EIP712', - EthSign = 'EthSign', - EIP1271 = 'EIP1271' -} - -export interface RuntimeStatus { - healthy: boolean - started: string - uptime: number - version: string - branch: string - commit: string - arweave: ArweaveStatus -} - -export interface ArweaveStatus { - nodeURL: string - namespace: string - sender: string - signer: string - flushInterval: string - bundleDelay: string - bundleLimit: number - confirmations: number - lockTTL: string - healthy: boolean - lastFlush?: string - lastFlushSeconds?: number -} - -export interface Info { - wallets: { [key: string]: number } - configs: { [key: string]: number } - configTrees: number - migrations: { [key: string]: number } - signatures: number - digests: number - recorder: RecorderInfo - arweave: ArweaveInfo -} - -export interface RecorderInfo { - requests: number - buffer: number - lastFlush?: string - lastFlushSeconds?: number - endpoints: { [key: string]: number } -} - -export interface ArweaveInfo { - nodeURL: string - namespace: string - sender: ArweaveSenderInfo - signer: string - flushInterval: string - bundleDelay: string - bundleLimit: number - confirmations: number - lockTTL: string - healthy: boolean - lastFlush?: string - lastFlushSeconds?: number - bundles: number - pending: ArweavePendingInfo -} - -export interface ArweaveSenderInfo { - address: string - balance: string -} - -export interface ArweavePendingInfo { - wallets: number - configs: number - migrations: number - signatures: number - bundles: Array -} - -export interface ArweaveBundleInfo { - transaction: string - block: number - items: number - sentAt: string - confirmations: number -} - -export interface Context { - version: number - factory: string - mainModule: string - mainModuleUpgradable: string - guestModule: string - walletCreationCode: string -} - -export interface Signature { - digest: string - toImageHash?: string - chainID: string - type: SignatureType - signature: string - validOnChain?: string - validOnBlock?: string - validOnBlockHash?: string -} - -export interface SignerSignature { - signer?: string - signature: string - referenceChainID?: string -} - -export interface ConfigUpdate { - toImageHash: string - signature: string -} - -export interface Transaction { - to: string - value?: string - data?: string - gasLimit?: string - delegateCall?: boolean - revertOnError?: boolean -} - -export interface TransactionBundle { - executor: string - transactions: Array - nonce: string - signature: string -} - -export interface Sessions { - ping(headers?: object, signal?: AbortSignal): Promise - config(args: ConfigArgs, headers?: object, signal?: AbortSignal): Promise - wallets(args: WalletsArgs, headers?: object, signal?: AbortSignal): Promise - deployHash(args: DeployHashArgs, headers?: object, signal?: AbortSignal): Promise - configUpdates(args: ConfigUpdatesArgs, headers?: object, signal?: AbortSignal): Promise - migrations(args: MigrationsArgs, headers?: object, signal?: AbortSignal): Promise - saveConfig(args: SaveConfigArgs, headers?: object, signal?: AbortSignal): Promise - saveWallet(args: SaveWalletArgs, headers?: object, signal?: AbortSignal): Promise - saveSignature(args: SaveSignatureArgs, headers?: object, signal?: AbortSignal): Promise - saveSignerSignatures( - args: SaveSignerSignaturesArgs, - headers?: object, - signal?: AbortSignal - ): Promise - saveSignerSignatures2( - args: SaveSignerSignatures2Args, - headers?: object, - signal?: AbortSignal - ): Promise - saveMigration(args: SaveMigrationArgs, headers?: object, signal?: AbortSignal): Promise -} - -export interface PingArgs {} - -export interface PingReturn {} -export interface ConfigArgs { - imageHash: string -} - -export interface ConfigReturn { - version: number - config: any -} -export interface WalletsArgs { - signer: string - cursor?: number - limit?: number -} - -export interface WalletsReturn { - wallets: { [key: string]: Signature } - cursor: number -} -export interface DeployHashArgs { - wallet: string -} - -export interface DeployHashReturn { - deployHash: string - context: Context -} -export interface ConfigUpdatesArgs { - wallet: string - fromImageHash: string - allUpdates?: boolean -} - -export interface ConfigUpdatesReturn { - updates: Array -} -export interface MigrationsArgs { - wallet: string - fromVersion: number - fromImageHash: string - chainID?: string -} - -export interface MigrationsReturn { - migrations: { [key: string]: { [key: number]: { [key: string]: TransactionBundle } } } -} -export interface SaveConfigArgs { - version: number - config: any -} - -export interface SaveConfigReturn {} -export interface SaveWalletArgs { - version: number - deployConfig: any -} - -export interface SaveWalletReturn {} -export interface SaveSignatureArgs { - wallet: string - digest: string - chainID: string - signature: string - toConfig?: any - referenceChainID?: string -} - -export interface SaveSignatureReturn {} -export interface SaveSignerSignaturesArgs { - wallet: string - digest: string - chainID: string - signatures: Array - toConfig?: any -} - -export interface SaveSignerSignaturesReturn {} -export interface SaveSignerSignatures2Args { - wallet: string - digest: string - chainID: string - signatures: Array - toConfig?: any -} - -export interface SaveSignerSignatures2Return {} -export interface SaveMigrationArgs { - wallet: string - fromVersion: number - toVersion: number - toConfig: any - executor: string - transactions: Array - nonce: string - signature: string - chainID?: string -} - -export interface SaveMigrationReturn {} - -// -// Client -// -export class Sessions implements Sessions { - protected hostname: string - protected fetch: Fetch - protected path = '/rpc/Sessions/' - - constructor(hostname: string, fetch: Fetch) { - this.hostname = hostname.replace(/\/*$/, '') - this.fetch = (input: RequestInfo, init?: RequestInit) => fetch(input, init) - } - - private url(name: string): string { - return this.hostname + this.path + name - } - - ping = (headers?: object, signal?: AbortSignal): Promise => { - return this.fetch(this.url('Ping'), createHTTPRequest({}, headers, signal)).then( - res => { - return buildResponse(res).then(_data => { - return {} - }) - }, - error => { - throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) - } - ) - } - - config = (args: ConfigArgs, headers?: object, signal?: AbortSignal): Promise => { - return this.fetch(this.url('Config'), createHTTPRequest(args, headers, signal)).then( - res => { - return buildResponse(res).then(_data => { - return { - version: _data.version, - config: _data.config - } - }) - }, - error => { - throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) - } - ) - } - - wallets = (args: WalletsArgs, headers?: object, signal?: AbortSignal): Promise => { - return this.fetch(this.url('Wallets'), createHTTPRequest(args, headers, signal)).then( - res => { - return buildResponse(res).then(_data => { - return { - wallets: <{ [key: string]: Signature }>_data.wallets, - cursor: _data.cursor - } - }) - }, - error => { - throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) - } - ) - } - - deployHash = (args: DeployHashArgs, headers?: object, signal?: AbortSignal): Promise => { - return this.fetch(this.url('DeployHash'), createHTTPRequest(args, headers, signal)).then( - res => { - return buildResponse(res).then(_data => { - return { - deployHash: _data.deployHash, - context: _data.context - } - }) - }, - error => { - throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) - } - ) - } - - configUpdates = (args: ConfigUpdatesArgs, headers?: object, signal?: AbortSignal): Promise => { - return this.fetch(this.url('ConfigUpdates'), createHTTPRequest(args, headers, signal)).then( - res => { - return buildResponse(res).then(_data => { - return { - updates: >_data.updates - } - }) - }, - error => { - throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) - } - ) - } - - migrations = (args: MigrationsArgs, headers?: object, signal?: AbortSignal): Promise => { - return this.fetch(this.url('Migrations'), createHTTPRequest(args, headers, signal)).then( - res => { - return buildResponse(res).then(_data => { - return { - migrations: <{ [key: string]: { [key: number]: { [key: string]: TransactionBundle } } }>_data.migrations - } - }) - }, - error => { - throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) - } - ) - } - - saveConfig = (args: SaveConfigArgs, headers?: object, signal?: AbortSignal): Promise => { - return this.fetch(this.url('SaveConfig'), createHTTPRequest(args, headers, signal)).then( - res => { - return buildResponse(res).then(_data => { - return {} - }) - }, - error => { - throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) - } - ) - } - - saveWallet = (args: SaveWalletArgs, headers?: object, signal?: AbortSignal): Promise => { - return this.fetch(this.url('SaveWallet'), createHTTPRequest(args, headers, signal)).then( - res => { - return buildResponse(res).then(_data => { - return {} - }) - }, - error => { - throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) - } - ) - } - - saveSignature = (args: SaveSignatureArgs, headers?: object, signal?: AbortSignal): Promise => { - return this.fetch(this.url('SaveSignature'), createHTTPRequest(args, headers, signal)).then( - res => { - return buildResponse(res).then(_data => { - return {} - }) - }, - error => { - throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) - } - ) - } - - saveSignerSignatures = ( - args: SaveSignerSignaturesArgs, - headers?: object, - signal?: AbortSignal - ): Promise => { - return this.fetch(this.url('SaveSignerSignatures'), createHTTPRequest(args, headers, signal)).then( - res => { - return buildResponse(res).then(_data => { - return {} - }) - }, - error => { - throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) - } - ) - } - - saveSignerSignatures2 = ( - args: SaveSignerSignatures2Args, - headers?: object, - signal?: AbortSignal - ): Promise => { - return this.fetch(this.url('SaveSignerSignatures2'), createHTTPRequest(args, headers, signal)).then( - res => { - return buildResponse(res).then(_data => { - return {} - }) - }, - error => { - throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) - } - ) - } - - saveMigration = (args: SaveMigrationArgs, headers?: object, signal?: AbortSignal): Promise => { - return this.fetch(this.url('SaveMigration'), createHTTPRequest(args, headers, signal)).then( - res => { - return buildResponse(res).then(_data => { - return {} - }) - }, - error => { - throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) - } - ) - } -} - -const createHTTPRequest = (body: object = {}, headers: object = {}, signal: AbortSignal | null = null): object => { - const reqHeaders: { [key: string]: string } = { ...headers, 'Content-Type': 'application/json' } - reqHeaders[WebrpcHeader] = WebrpcHeaderValue - - return { - method: 'POST', - headers: reqHeaders, - body: JSON.stringify(body || {}), - signal - } -} - -const buildResponse = (res: Response): Promise => { - return res.text().then(text => { - let data - try { - data = JSON.parse(text) - } catch (error) { - let message = '' - if (error instanceof Error) { - message = error.message - } - throw WebrpcBadResponseError.new({ - status: res.status, - cause: `JSON.parse(): ${message}: response text: ${text}` - }) - } - if (!res.ok) { - const code: number = typeof data.code === 'number' ? data.code : 0 - throw (webrpcErrorByCode[code] || WebrpcError).new(data) - } - return data - }) -} - -// -// Errors -// - -export class WebrpcError extends Error { - name: string - code: number - message: string - status: number - cause?: string - - /** @deprecated Use message instead of msg. Deprecated in webrpc v0.11.0. */ - msg: string - - constructor(name: string, code: number, message: string, status: number, cause?: string) { - super(message) - this.name = name || 'WebrpcError' - this.code = typeof code === 'number' ? code : 0 - this.message = message || `endpoint error ${this.code}` - this.msg = this.message - this.status = typeof status === 'number' ? status : 0 - this.cause = cause - Object.setPrototypeOf(this, WebrpcError.prototype) - } - - static new(payload: any): WebrpcError { - return new this(payload.error, payload.code, payload.message || payload.msg, payload.status, payload.cause) - } -} - -// Webrpc errors - -export class WebrpcEndpointError extends WebrpcError { - constructor( - name: string = 'WebrpcEndpoint', - code: number = 0, - message: string = `endpoint error`, - status: number = 0, - cause?: string - ) { - super(name, code, message, status, cause) - Object.setPrototypeOf(this, WebrpcEndpointError.prototype) - } -} - -export class WebrpcRequestFailedError extends WebrpcError { - constructor( - name: string = 'WebrpcRequestFailed', - code: number = -1, - message: string = `request failed`, - status: number = 0, - cause?: string - ) { - super(name, code, message, status, cause) - Object.setPrototypeOf(this, WebrpcRequestFailedError.prototype) - } -} - -export class WebrpcBadRouteError extends WebrpcError { - constructor( - name: string = 'WebrpcBadRoute', - code: number = -2, - message: string = `bad route`, - status: number = 0, - cause?: string - ) { - super(name, code, message, status, cause) - Object.setPrototypeOf(this, WebrpcBadRouteError.prototype) - } -} - -export class WebrpcBadMethodError extends WebrpcError { - constructor( - name: string = 'WebrpcBadMethod', - code: number = -3, - message: string = `bad method`, - status: number = 0, - cause?: string - ) { - super(name, code, message, status, cause) - Object.setPrototypeOf(this, WebrpcBadMethodError.prototype) - } -} - -export class WebrpcBadRequestError extends WebrpcError { - constructor( - name: string = 'WebrpcBadRequest', - code: number = -4, - message: string = `bad request`, - status: number = 0, - cause?: string - ) { - super(name, code, message, status, cause) - Object.setPrototypeOf(this, WebrpcBadRequestError.prototype) - } -} - -export class WebrpcBadResponseError extends WebrpcError { - constructor( - name: string = 'WebrpcBadResponse', - code: number = -5, - message: string = `bad response`, - status: number = 0, - cause?: string - ) { - super(name, code, message, status, cause) - Object.setPrototypeOf(this, WebrpcBadResponseError.prototype) - } -} - -export class WebrpcServerPanicError extends WebrpcError { - constructor( - name: string = 'WebrpcServerPanic', - code: number = -6, - message: string = `server panic`, - status: number = 0, - cause?: string - ) { - super(name, code, message, status, cause) - Object.setPrototypeOf(this, WebrpcServerPanicError.prototype) - } -} - -export class WebrpcInternalErrorError extends WebrpcError { - constructor( - name: string = 'WebrpcInternalError', - code: number = -7, - message: string = `internal error`, - status: number = 0, - cause?: string - ) { - super(name, code, message, status, cause) - Object.setPrototypeOf(this, WebrpcInternalErrorError.prototype) - } -} - -export class WebrpcClientDisconnectedError extends WebrpcError { - constructor( - name: string = 'WebrpcClientDisconnected', - code: number = -8, - message: string = `client disconnected`, - status: number = 0, - cause?: string - ) { - super(name, code, message, status, cause) - Object.setPrototypeOf(this, WebrpcClientDisconnectedError.prototype) - } -} - -export class WebrpcStreamLostError extends WebrpcError { - constructor( - name: string = 'WebrpcStreamLost', - code: number = -9, - message: string = `stream lost`, - status: number = 0, - cause?: string - ) { - super(name, code, message, status, cause) - Object.setPrototypeOf(this, WebrpcStreamLostError.prototype) - } -} - -export class WebrpcStreamFinishedError extends WebrpcError { - constructor( - name: string = 'WebrpcStreamFinished', - code: number = -10, - message: string = `stream finished`, - status: number = 0, - cause?: string - ) { - super(name, code, message, status, cause) - Object.setPrototypeOf(this, WebrpcStreamFinishedError.prototype) - } -} - -// Schema errors - -export class InvalidArgumentError extends WebrpcError { - constructor( - name: string = 'InvalidArgument', - code: number = 1, - message: string = `invalid argument`, - status: number = 0, - cause?: string - ) { - super(name, code, message, status, cause) - Object.setPrototypeOf(this, InvalidArgumentError.prototype) - } -} - -export class NotFoundError extends WebrpcError { - constructor(name: string = 'NotFound', code: number = 2, message: string = `not found`, status: number = 0, cause?: string) { - super(name, code, message, status, cause) - Object.setPrototypeOf(this, NotFoundError.prototype) - } -} - -export enum errors { - WebrpcEndpoint = 'WebrpcEndpoint', - WebrpcRequestFailed = 'WebrpcRequestFailed', - WebrpcBadRoute = 'WebrpcBadRoute', - WebrpcBadMethod = 'WebrpcBadMethod', - WebrpcBadRequest = 'WebrpcBadRequest', - WebrpcBadResponse = 'WebrpcBadResponse', - WebrpcServerPanic = 'WebrpcServerPanic', - WebrpcInternalError = 'WebrpcInternalError', - WebrpcClientDisconnected = 'WebrpcClientDisconnected', - WebrpcStreamLost = 'WebrpcStreamLost', - WebrpcStreamFinished = 'WebrpcStreamFinished', - InvalidArgument = 'InvalidArgument', - NotFound = 'NotFound' -} - -export enum WebrpcErrorCodes { - WebrpcEndpoint = 0, - WebrpcRequestFailed = -1, - WebrpcBadRoute = -2, - WebrpcBadMethod = -3, - WebrpcBadRequest = -4, - WebrpcBadResponse = -5, - WebrpcServerPanic = -6, - WebrpcInternalError = -7, - WebrpcClientDisconnected = -8, - WebrpcStreamLost = -9, - WebrpcStreamFinished = -10, - InvalidArgument = 1, - NotFound = 2 -} - -export const webrpcErrorByCode: { [code: number]: any } = { - [0]: WebrpcEndpointError, - [-1]: WebrpcRequestFailedError, - [-2]: WebrpcBadRouteError, - [-3]: WebrpcBadMethodError, - [-4]: WebrpcBadRequestError, - [-5]: WebrpcBadResponseError, - [-6]: WebrpcServerPanicError, - [-7]: WebrpcInternalErrorError, - [-8]: WebrpcClientDisconnectedError, - [-9]: WebrpcStreamLostError, - [-10]: WebrpcStreamFinishedError, - [1]: InvalidArgumentError, - [2]: NotFoundError -} - -export type Fetch = (input: RequestInfo, init?: RequestInit) => Promise diff --git a/old/packages/sessions/src/trackers/stores/index.ts b/old/packages/sessions/src/trackers/stores/index.ts deleted file mode 100644 index b067048d0..000000000 --- a/old/packages/sessions/src/trackers/stores/index.ts +++ /dev/null @@ -1,78 +0,0 @@ -import { commons, v1, v2 } from '@0xsequence/core' -import { ethers } from 'ethers' - -export type PlainNode = { - left: string - right: string -} - -export type PlainNested = { - weight: string - threshold: string - tree: string -} - -export type PlainV2Config = { - version: 2 - threshold: string - checkpoint: string - tree: string -} - -export function isPlainNode(node: any): node is PlainNode { - return node.left !== undefined && node.right !== undefined -} - -export function isPlainNested(node: any): node is PlainNested { - return node.weight !== undefined && node.threshold !== undefined && node.tree !== undefined -} - -export function isPlainV2Config(config: any): config is PlainV2Config { - return ( - config.version === 2 && - config.threshold !== undefined && - config.checkpoint !== undefined && - config.tree !== undefined && - typeof config.tree === 'string' - ) -} - -export interface TrackerStore { - // top level configurations store - loadConfig: (imageHash: string) => Promise - saveConfig: (imageHash: string, config: v1.config.WalletConfig | PlainV2Config | v2.config.WalletConfig) => Promise - - // v2 configurations store - loadV2Node: (nodeHash: string) => Promise - saveV2Node: (nodeHash: string, node: PlainNode | PlainNested | v2.config.Topology) => Promise - - // counterfactual wallets - loadCounterfactualWallet: (wallet: string) => Promise<{ imageHash: string; context: commons.context.WalletContext } | undefined> - saveCounterfactualWallet: (wallet: string, imageHash: string, context: commons.context.WalletContext) => Promise - - // payloads - loadPayloadOfSubdigest: (subdigest: string) => Promise - savePayloadOfSubdigest: (subdigest: string, payload: commons.signature.SignedPayload) => Promise - - // signatures - loadSubdigestsOfSigner: (signer: string) => Promise - loadSignatureOfSubdigest: (signer: string, subdigest: string) => Promise - saveSignatureOfSubdigest: (signer: string, subdigest: string, payload: ethers.BytesLike) => Promise - - // migrations - loadMigrationsSubdigest: ( - wallet: string, - fromVersion: number, - toVersion: number - ) => Promise<{ subdigest: string; toImageHash: string }[]> - saveMigrationsSubdigest: ( - wallet: string, - fromVersion: number, - toVersion: number, - subdigest: string, - toImageHash: string - ) => Promise -} - -export * from './memoryStore' -export * from './indexedDBStore' diff --git a/old/packages/sessions/src/trackers/stores/indexedDBStore.ts b/old/packages/sessions/src/trackers/stores/indexedDBStore.ts deleted file mode 100644 index 12c834e40..000000000 --- a/old/packages/sessions/src/trackers/stores/indexedDBStore.ts +++ /dev/null @@ -1,191 +0,0 @@ -import { commons, v1, v2 } from '@0xsequence/core' -import { ethers } from 'ethers' -import { PlainNested, PlainNode, PlainV2Config, TrackerStore } from '.' - -import { DBSchema, IDBPDatabase, openDB } from 'idb' - -export interface LocalTrackerDBSchema extends DBSchema { - configs: { - key: string - value: v1.config.WalletConfig | v2.config.WalletConfig | PlainV2Config - } - v2Nodes: { - key: string - value: v2.config.Topology | PlainNode | PlainNested - } - counterfactualWallets: { - key: string - value: { - imageHash: string - context: commons.context.WalletContext - } - } - payloads: { - key: string - value: commons.signature.SignedPayload - } - signatures: { - key: string // `${signer}-${subdigest}` - value: { - signature: ethers.BytesLike - signer: string - } - indexes: { - signer: string - } - } - migrations: { - key: string - value: { - wallet: string - fromVersion: number - toVersion: number - subdigest: string - toImageHash: string - } - indexes: { - jump: string // '${wallet}-${fromVersion}-${toVersion} - } - } -} - -export function recreateBigNumbers(object: T): T | undefined { - if (object === undefined) return undefined - - const result = {} as any - - for (const key of Object.keys(object)) { - const val = (object as any)[key as string] - - if (val._isBigNumber === true && val._hex !== undefined && typeof val._hex === 'string' && val._hex.length !== '') { - // Entry is a big number - result[key] = BigInt(val._hex) - } else if (Array.isArray(val)) { - // Entry is an array, recurse - result[key] = val.map(v => recreateBigNumbers(v)) - } else if (typeof val === 'object' && val !== null) { - // Entry is another object, recurse - result[key] = recreateBigNumbers(val) - } else { - // Entry is a primitive, just copy - result[key] = val - } - } - - return result -} - -export class IndexedDBStore implements TrackerStore { - private _lazyDb: IDBPDatabase | undefined - - constructor(public dbName: string) {} - - async getDb() { - if (this._lazyDb) return this._lazyDb - - const dbName = this.dbName - this._lazyDb = await openDB(dbName, 1, { - upgrade(db, oldVersion, newVersion, transaction) { - console.log(`upgrading ${dbName} from ${oldVersion} to ${newVersion} - ${transaction}`) - if (oldVersion === 0) { - db.createObjectStore('configs') - db.createObjectStore('v2Nodes') - db.createObjectStore('counterfactualWallets') - db.createObjectStore('payloads') - - const signatures = db.createObjectStore('signatures') - signatures.createIndex('signer', 'signer', { unique: false }) - - const migrations = db.createObjectStore('migrations') - migrations.createIndex('jump', ['wallet', 'fromVersion', 'toVersion']) - } - } - }) - return this._lazyDb - } - - loadConfig = async ( - imageHash: string - ): Promise => { - const db = await this.getDb() - return db.get('configs', imageHash).then(c => recreateBigNumbers(c)) - } - - saveConfig = async ( - imageHash: string, - config: v1.config.WalletConfig | v2.config.WalletConfig | PlainV2Config - ): Promise => { - const db = await this.getDb() - await db.put('configs', config, imageHash) - } - - loadV2Node = async (nodeHash: string): Promise => { - const db = await this.getDb() - return db.get('v2Nodes', nodeHash).then(c => recreateBigNumbers(c)) - } - - saveV2Node = async (nodeHash: string, node: v2.config.Topology | PlainNode | PlainNested): Promise => { - const db = await this.getDb() - await db.put('v2Nodes', node, nodeHash) - } - - loadCounterfactualWallet = async ( - wallet: string - ): Promise<{ imageHash: string; context: commons.context.WalletContext } | undefined> => { - const db = await this.getDb() - return db.get('counterfactualWallets', wallet) - } - - saveCounterfactualWallet = async (wallet: string, imageHash: string, context: commons.context.WalletContext): Promise => { - const db = await this.getDb() - await db.put('counterfactualWallets', { imageHash, context }, wallet) - } - - loadPayloadOfSubdigest = async (subdigest: string): Promise => { - const db = await this.getDb() - return db.get('payloads', subdigest).then(c => recreateBigNumbers(c)) - } - - savePayloadOfSubdigest = async (subdigest: string, payload: commons.signature.SignedPayload): Promise => { - const db = await this.getDb() - await db.put('payloads', payload, subdigest) - } - - loadSubdigestsOfSigner = async (signer: string): Promise => { - const db = await this.getDb() - const index = await db.getAllKeysFromIndex('signatures', 'signer', IDBKeyRange.only(signer)) - return index.map(key => key.split('-')[0]) - } - - loadSignatureOfSubdigest = async (signer: string, subdigest: string): Promise => { - const db = await this.getDb() - const signature = await db.get('signatures', [subdigest, signer].join('-')) - return signature?.signature - } - - saveSignatureOfSubdigest = async (signer: string, subdigest: string, payload: ethers.BytesLike): Promise => { - const db = await this.getDb() - await db.put('signatures', { signature: payload, signer }, [subdigest, signer].join('-')) - } - - loadMigrationsSubdigest = async ( - wallet: string, - fromVersion: number, - toVersion: number - ): Promise<{ subdigest: string; toImageHash: string }[]> => { - const db = await this.getDb() - const index = await db.getAllFromIndex('migrations', 'jump', IDBKeyRange.only([wallet, fromVersion, toVersion])) - return index.map(key => ({ subdigest: key.subdigest, toImageHash: key.toImageHash })) - } - - saveMigrationsSubdigest = async ( - wallet: string, - fromVersion: number, - toVersion: number, - subdigest: string, - toImageHash: string - ): Promise => { - const db = await this.getDb() - await db.put('migrations', { wallet, fromVersion, toVersion, subdigest, toImageHash }, subdigest) - } -} diff --git a/old/packages/sessions/src/trackers/stores/memoryStore.ts b/old/packages/sessions/src/trackers/stores/memoryStore.ts deleted file mode 100644 index f7a10ae23..000000000 --- a/old/packages/sessions/src/trackers/stores/memoryStore.ts +++ /dev/null @@ -1,88 +0,0 @@ -import { commons, v1, v2 } from '@0xsequence/core' -import { ethers } from 'ethers' -import { PlainNested, PlainNode, PlainV2Config, TrackerStore } from '.' - -export class MemoryTrackerStore implements TrackerStore { - private configs: { [imageHash: string]: v1.config.WalletConfig | v2.config.WalletConfig | PlainV2Config } = {} - private v2Nodes: { [nodeHash: string]: PlainNode | PlainNested | v2.config.Topology } = {} - private counterfactualWallets: { [wallet: string]: { imageHash: string; context: commons.context.WalletContext } } = {} - private payloads: { [subdigest: string]: commons.signature.SignedPayload } = {} - private signatures: { [signer: string]: { [subdigest: string]: ethers.BytesLike } } = {} - private migrations: { - [wallet: string]: { [fromVersion: number]: { [toVersion: number]: { subdigest: string; toImageHash: string }[] } } - } = {} - - loadConfig = (imageHash: string): Promise => { - return Promise.resolve(this.configs[imageHash]) - } - - saveConfig = (imageHash: string, config: v1.config.WalletConfig | v2.config.WalletConfig | PlainV2Config): Promise => { - this.configs[imageHash] = config - return Promise.resolve() - } - - loadV2Node = (nodeHash: string): Promise => { - return Promise.resolve(this.v2Nodes[nodeHash]) - } - - saveV2Node = (nodeHash: string, node: v2.config.Topology | PlainNode | PlainNested): Promise => { - this.v2Nodes[nodeHash] = node - return Promise.resolve() - } - - loadCounterfactualWallet = ( - wallet: string - ): Promise<{ imageHash: string; context: commons.context.WalletContext } | undefined> => { - return Promise.resolve(this.counterfactualWallets[wallet]) - } - - saveCounterfactualWallet = (wallet: string, imageHash: string, context: commons.context.WalletContext): Promise => { - this.counterfactualWallets[wallet] = { imageHash, context } - return Promise.resolve() - } - - loadPayloadOfSubdigest = (subdigest: string): Promise => { - return Promise.resolve(this.payloads[subdigest]) - } - - savePayloadOfSubdigest = (subdigest: string, payload: commons.signature.SignedPayload): Promise => { - this.payloads[subdigest] = payload - return Promise.resolve() - } - - loadSubdigestsOfSigner = (signer: string): Promise => { - return Promise.resolve(Object.keys(this.signatures[signer] || {})) - } - - loadSignatureOfSubdigest = (signer: string, subdigest: string): Promise => { - return Promise.resolve(this.signatures[signer]?.[subdigest]) - } - - saveSignatureOfSubdigest = (signer: string, subdigest: string, payload: ethers.BytesLike): Promise => { - if (!this.signatures[signer]) this.signatures[signer] = {} - this.signatures[signer][subdigest] = payload - return Promise.resolve() - } - - loadMigrationsSubdigest = ( - wallet: string, - fromVersion: number, - toVersion: number - ): Promise<{ subdigest: string; toImageHash: string }[]> => { - return Promise.resolve(this.migrations[wallet]?.[fromVersion]?.[toVersion] || []) - } - - saveMigrationsSubdigest = ( - wallet: string, - fromVersion: number, - toVersion: number, - subdigest: string, - toImageHash: string - ): Promise => { - if (!this.migrations[wallet]) this.migrations[wallet] = {} - if (!this.migrations[wallet][fromVersion]) this.migrations[wallet][fromVersion] = {} - if (!this.migrations[wallet][fromVersion][toVersion]) this.migrations[wallet][fromVersion][toVersion] = [] - this.migrations[wallet][fromVersion][toVersion].push({ subdigest, toImageHash }) - return Promise.resolve() - } -} diff --git a/old/packages/sessions/tests/arweave.spec.ts b/old/packages/sessions/tests/arweave.spec.ts deleted file mode 100644 index 44bc4692b..000000000 --- a/old/packages/sessions/tests/arweave.spec.ts +++ /dev/null @@ -1,433 +0,0 @@ -import { commons, universal, v2 } from '@0xsequence/core' -import { expect } from 'chai' -import { ethers } from 'ethers' - -import { trackers } from '../src' - -class MockProvider extends ethers.AbstractProvider { - _detectNetwork(): Promise { - return Promise.resolve(new ethers.Network('', 0)) - } - - _perform(_req: ethers.PerformActionRequest): Promise { - return Promise.resolve('0x1626ba7e00000000000000000000000000000000000000000000000000000000' as any) - } -} - -describe('Arweave config reader', () => { - const options = { namespace: 'xOovxYFkIwBpEwSi', owners: ['lJYCA4xBPJeZSgr9AF_4pHp4HVGvTOa4NYKJRoMBP5c'] } - const arweave = new trackers.arweave.ArweaveReader(options) - const sessions = new trackers.remote.RemoteConfigTracker('http://localhost:5555') - const provider = new MockProvider() - - it('Should find the config for an image hash', async () => { - const imageHash = '0x8073858470016c4fdee9d3ad7c929e81cb19668a73fde061f00645228676e8dd' - - const config = await arweave.configOfImageHash({ imageHash }) - if (!config) { - throw new Error('config not found') - } - - const coder = universal.genericCoderFor(config.version) - expect(coder.config.imageHashOf(config)).to.equal(imageHash) - }) - - it('Should find the deploy hash for a wallet', async () => { - const address = '0x801DC9A5F00f781cA0f1ca56dbA68DA69fB07cdC' - - const wallet = await arweave.imageHashOfCounterfactualWallet({ wallet: address }) - if (!wallet) { - throw new Error('wallet not found') - } - - expect(commons.context.addressOf(wallet.context, wallet.imageHash)).to.equal(address) - }) - - it('Should find the wallets for a signer', async () => { - const signer = '0x8151D1B52dEb93eF2300884fC4CcddDDFf8C6BdA' - - const wallets = await arweave.walletsOfSigner({ signer }) - - expect(wallets.some(({ wallet }) => wallet === '0x213400e26b4aA36885Bcb29A8B7D67caeB0348EC')).to.be.true - - expect( - wallets.every( - ({ wallet, proof: { digest, chainId, signature } }) => - commons.signer.recoverSigner(commons.signature.subdigestOf({ digest, chainId, address: wallet }), signature) === signer - ) - ).to.be.true - }) - - it('Should find the shortest sequence of config updates from a config', async () => { - const wallet = '0x36f8D1327F738608e275226A6De2D1720AF5C896' - const fromImageHash = '0xacbf7d62011d908d4cdfc96651be39b77d56f8e8048e993a57470724eb6049be' - - const updates = await arweave.loadPresignedConfiguration({ wallet, fromImageHash }) - - expect(updates.every(update => update.wallet === wallet)).to.be.true - - expect(updates.map(({ nextImageHash }) => nextImageHash)).to.deep.equal([ - '0x08b597e0fc694da132d38db2b9e6c598ea85d786aba1c9830def5df0fec6da67', - '0xea570311d302ef75c4efe9da8041011a43b398682b5461bc3edfd5632fe36199' - ]) - - let imageHash = fromImageHash - - for (const { nextImageHash, signature } of updates) { - const digest = v2.chained.hashSetImageHash(nextImageHash) - const decoded = v2.signature.decodeSignature(signature) - const recovered = await v2.signature.recoverSignature(decoded, { digest, chainId: 0, address: wallet }, provider) - expect(v2.config.imageHash(recovered.config)).to.equal(imageHash) - imageHash = nextImageHash - } - }) - - it('Should find the longest sequence of config updates from a config', async () => { - const wallet = '0x36f8D1327F738608e275226A6De2D1720AF5C896' - const fromImageHash = '0xacbf7d62011d908d4cdfc96651be39b77d56f8e8048e993a57470724eb6049be' - - const updates = await arweave.loadPresignedConfiguration({ wallet, fromImageHash, longestPath: true }) - - expect(updates.every(update => update.wallet === wallet)).to.be.true - - expect(updates.map(({ nextImageHash }) => nextImageHash)).to.deep.equal([ - '0x8230d5841133b06eeeba92494fcf28d4c7ca50ae59f092d630dbee0d07c5e4f5', - '0x08b597e0fc694da132d38db2b9e6c598ea85d786aba1c9830def5df0fec6da67', - '0xea570311d302ef75c4efe9da8041011a43b398682b5461bc3edfd5632fe36199' - ]) - - let imageHash = fromImageHash - - for (const { nextImageHash, signature } of updates) { - const digest = v2.chained.hashSetImageHash(nextImageHash) - const decoded = v2.signature.decodeSignature(signature) - const recovered = await v2.signature.recoverSignature(decoded, { digest, chainId: 0, address: wallet }, provider) - expect(v2.config.imageHash(recovered.config)).to.equal(imageHash) - imageHash = nextImageHash - } - }) - - it('Should find a migration', async () => { - const address = '0x9efB45F2e6Bd007Bb47D94CcB461d0b88a1fc6d6' - const fromVersion = 1 - const fromImageHash = '0xb0c9bf9b74e670cd5245ac196261e16c092b701ea769269aeb0b1507bb96f961' - const toVersion = 2 - const toImageHash = '0xc289ea81fb71c62b4eb247c2e83b6897e1274e2ecd09d0cb780619cf4a4f204a' - const chainId = 1 - - const migration = await arweave.getMigration(address, fromImageHash, fromVersion, chainId) - if (!migration) { - throw new Error('migration not found') - } - - expect(migration.tx.intent.wallet).to.equal(address) - expect(BigInt(migration.tx.chainId)).to.equal(BigInt(chainId)) - expect(migration.fromVersion).to.equal(fromVersion) - expect(migration.toVersion).to.equal(toVersion) - expect(migration.toConfig.version).to.equal(toVersion) - - const toCoder = universal.genericCoderFor(migration.toVersion) - expect(toCoder.config.imageHashOf(migration.toConfig)).to.equal(toImageHash) - - const fromCoder = universal.genericCoderFor(migration.fromVersion) - const decoded = fromCoder.signature.decode(migration.tx.signature) - const digest = commons.transaction.digestOfTransactions(migration.tx.nonce, migration.tx.transactions) - const recovered = await fromCoder.signature.recover(decoded, { digest, chainId, address }, provider) - expect(fromCoder.config.imageHashOf(recovered.config)).to.equal(fromImageHash) - }) - - it.skip('Should find the same configs as Sequence Sessions', async () => { - const imageHashes = [ - '0x002f295ccfaf604ff09f200ad3282710f8b156811a03065dba66cf0902fff629', - '0x015cadeea08b6f9ed3181b1560a1f801e58c02f4bb0d33d01b0c1ab7b07b7bb1', - '0x042e86a1fe7f541e287b9053c483e21d059380b56d4baaa4161b0302cc55f22e', - '0x08b597e0fc694da132d38db2b9e6c598ea85d786aba1c9830def5df0fec6da67', - '0x08f915b8325e25003cc47e16fe144103655cda5e1cf43030345640c293feca98', - '0x105823726957bbef0932076d4209de8e0198fd5da59042221583c6ba26ef2637', - '0x1a13a8a34d18946b00b9368cf02f1cba3219eff2a18e76e4951d678824b34bdb', - '0x1d018d98154312f501d1794ed77abd2e544a0a7c035638e965be846c0c347f37', - '0x24f30c67a1f6228c2aa380e77999269a6203eab9ef60f3785ccd7a15ce199827', - '0x2513cf57aca274bc40c2bd6492a1499e8b781d128e39b8dd85659b75687beb47', - '0xeb718fb634b9f5e3a722825a25d4b48d3bbfe106d04efcbba6504fbf4539beed', - '0xecc51be6a1c52bb41183df18c5df0185e20014ffafa04096d9da1148525e476e', - '0xedfd70427e797f3865228c24d53903b0b529c544bf788000653070205e9548f2', - '0xef028a928c04ec9759be984c2f0f72e0aa578efc2f402dbb6ca4893e981bbf41', - '0xf148aa32b0cbd54c95610c8fb423b0506dd642ff659418a9ef64cfa50ef97489', - '0xf2e32da98766f93d86284e029565d814954163c15d681013e53b11b66e13bb0f', - '0xf4e8f9efa633938f6fbc02088074a9ee466178d59ff7ed8eb579ed7f14583dc5', - '0xf54e5829545147e687b7fe39e078de34dbd60dd24096a2deea1bb8dd86d93936', - '0xf5c2d2e6666cd2f04962df167eeeee5d217f731787a7d698b57142bb0da131d3', - '0xff9a2779f55740f1f4011a6a00fee48e717cd51b75e32dd6a7db97e33a7b3d07' - ] - - for (const imageHash of imageHashes) { - const [arweaveConfig, sessionsConfig] = await Promise.all([ - arweave.configOfImageHash({ imageHash }), - sessions.configOfImageHash({ imageHash }) - ]) - - expect(arweaveConfig).to.deep.equal(sessionsConfig) - } - }) - - it.skip('Should find the same deploy hashes as Sequence Sessions', async () => { - const wallets = [ - '0x1982D04a8473d391d4D4cA0312420F13Bb8dE26e', - '0x1dc2DA033d412d5E0D92f97a3157177dF41381D6', - '0x213400e26b4aA36885Bcb29A8B7D67caeB0348EC', - '0x329bD174c721bFa3A664Bde815dB33A7AA8b14a8', - '0x36f8D1327F738608e275226A6De2D1720AF5C896', - '0x41a0D39EFbB9a642c589abf2D501757D2f403470', - '0x55Cfd699C5E105180473c5A0403a3b491c82fb22', - '0x59756e67CFab5e1dFa1c7bCf7f5B04AbCAeb0B0F', - '0x6B7CE863DfcCeAbc6bDbC3f73f6def0de81dfe27', - '0x6Ce4229189988358073de1cd8AE7edFDf979635a', - '0xCa9A0F02c0589D550f06F78AfF604A5405b90448', - '0xD38A7FB85e76681cB409705622e877D11C7Cfe54', - '0xd5b1C31f7626A8Bd206D744128dFE6401dd7D7F6', - '0xDf29fF6EE710c4042dfE71bEeC1971Fca1F6A6F5', - '0xEf87203423cA064A44CE2661Daf93051e2F423a2', - '0xf3Da03EbBda88D28981c63Bd5ddA38d3eCff400a', - '0xf563fbB21208C7c915ea7d28014D36B1F9acACa9', - '0xFAE677fc10bDb6bF3C69Bb9DEEc6752cC7e06224', - '0xfBF80a987857e6dcAF790B297fC9a4f97DbbfBB0', - '0xfc9Adc5cd71F77e46a956F94df0fd5b0dF6Eef12' - ] - - for (const wallet of wallets) { - const [arweaveWallet, sessionsWallet] = await Promise.all([ - arweave.imageHashOfCounterfactualWallet({ wallet }), - sessions.imageHashOfCounterfactualWallet({ wallet }) - ]) - - expect(arweaveWallet?.imageHash).to.equal(sessionsWallet?.imageHash) - expect(arweaveWallet?.context).to.deep.equal(sessionsWallet?.context) - } - }) - - it.skip('Should find the same wallets as Sequence Sessions', async () => { - const signers = [ - '0x079cc5A64Fa4Bdd928bbF0EaBaf7BE91D633abf5', - '0x18510092ee248b1A2BBaB66C5d223EBa784693BA', - '0x1BA6a414d3C45a8E21FBEf451882170d0f6807F7', - '0x1Cd69D558cbD121F6C4DdF11db2CaCC142705a20', - '0x24270586957918c5C075E970A208387C888C4dD8', - '0x289cF67aeF2000DEcafb525103d8aDE044996D45', - '0x37Fd684c78b74b633CA43Ca5418f6f80827fB0fD', - '0x5373B3264EbbF0471FE4CC8B63f30446Cc03F6ad', - '0x553390e8B3dd2694Ea50bE9972C0D66b320bBa27', - '0x58AF1d8567BE0629A9961d8B3e06234B0f731187', - '0xb478671F3705cC2a3A1F47326F2Ef93853b79cf2', - '0xbb8FAEc13852b263644e75fd568B422055A8e8DC', - '0xbcB1EFB67f277cBbBeB886D6248ab222f3ef2195', - '0xc37c114B99242D1F83fFD964236f45042eD8c162', - '0xCa968ebc798feaeE466e73C872f085C3A2c9b7D9', - '0xcD2C0E8b8372FfF16caa0a29F9336F4dFB4D2EA1', - '0xd4c04c7392617D85b6FF33E203714C6Fd46336b4', - '0xe7D97e2d43900297a7537B0eD3B6C27306f6aDC0', - '0xea5dE55520f4cca364AB9Ed5613a11aa1e5C977E', - '0xFf6bEB351a06f35BFD6074d6Cfe34fcb8734F675' - ] - - for (const signer of signers) { - const [arweaveWallets, sessionsWallets] = await Promise.all([ - arweave.walletsOfSigner({ signer }), - sessions.walletsOfSigner({ signer }) - ]) - - expect(Object.fromEntries(arweaveWallets.map(({ wallet, proof }) => [wallet, proof]))).to.deep.equal( - Object.fromEntries(sessionsWallets.map(({ wallet, proof }) => [wallet, proof])) - ) - } - }) - - it.skip('Should find the same config updates as Sequence Sessions', async () => { - const updates = [ - { - wallet: '0x1982D04a8473d391d4D4cA0312420F13Bb8dE26e', - fromImageHash: '0x8073858470016c4fdee9d3ad7c929e81cb19668a73fde061f00645228676e8dd' - }, - { - wallet: '0x213400e26b4aA36885Bcb29A8B7D67caeB0348EC', - fromImageHash: '0x653ad79e81e77bbf9aeca4740a12dbe260e17abde4114c4a4056d7c8ab605270' - }, - { - wallet: '0x329bD174c721bFa3A664Bde815dB33A7AA8b14a8', - fromImageHash: '0x47eb2d6796c08e627d886ce5dd88f4aefbda5ab6209a5e35ded2f5ea95a5f05a' - }, - { - wallet: '0x36f8D1327F738608e275226A6De2D1720AF5C896', - fromImageHash: '0xacbf7d62011d908d4cdfc96651be39b77d56f8e8048e993a57470724eb6049be' - }, - { - wallet: '0x41a0D39EFbB9a642c589abf2D501757D2f403470', - fromImageHash: '0x9cd23aa8bf0945ec412aa2c815ffbb77341a869a0c3d031af0bb0b82faa1fc75' - }, - { - wallet: '0x55Cfd699C5E105180473c5A0403a3b491c82fb22', - fromImageHash: '0xf54e5829545147e687b7fe39e078de34dbd60dd24096a2deea1bb8dd86d93936' - }, - { - wallet: '0x59756e67CFab5e1dFa1c7bCf7f5B04AbCAeb0B0F', - fromImageHash: '0x2a0b27a28d39ec7b4ad61edc83b55d9b8375252ad48c838252d937a7f4afcf89' - }, - { - wallet: '0x6B7CE863DfcCeAbc6bDbC3f73f6def0de81dfe27', - fromImageHash: '0x08f915b8325e25003cc47e16fe144103655cda5e1cf43030345640c293feca98' - }, - { - wallet: '0x6Ce4229189988358073de1cd8AE7edFDf979635a', - fromImageHash: '0xf4e8f9efa633938f6fbc02088074a9ee466178d59ff7ed8eb579ed7f14583dc5' - }, - { - wallet: '0x801DC9A5F00f781cA0f1ca56dbA68DA69fB07cdC', - fromImageHash: '0xab5e99dc4fc094955f547bce2b8e0991845aa17f4fab47e3d212131474982fd6' - }, - { - wallet: '0x82B772b0fDb7Efb31B7DDD8d06C7C10fa1Dca383', - fromImageHash: '0x99da13df61af5b72011ab2e81aea9c4960c58344f7e536a5db27ce887acf0799' - }, - { - wallet: '0x84ac87bc06De4e1456B9df2C2496bF9a12b86C10', - fromImageHash: '0xc36416d54ec63920066c441686788888ee5505cd9137a006e14419940d53222d' - }, - { - wallet: '0x8af66F10b45AE8eba55C819a702344c407fD97fE', - fromImageHash: '0x890364a08ba76febfc67d63507a362c00c71cf4cf67b88e68f6952a9b8b95c66' - }, - { - wallet: '0x8e17D9C9dF4271C9a3cb0D7635004257f9805A6F', - fromImageHash: '0x4aade79c43aa094d77d98f5e2f70efb28cc4670614ff5894713c3bb11d32d9cf' - }, - { - wallet: '0x93fe4617B114F4018eaCfBB7eAb00A06f8C54E2D', - fromImageHash: '0xe9ab45294e8e22a456ff493201bd6f3329a6875193a2b1afc2e357c813ce0842' - }, - { - wallet: '0x9876DD582d28a527586fee03311B4a57461fE4c7', - fromImageHash: '0x7bf4d1c4443f505e86495c4b1666e9484b9636ec53ef166695a6caf3ed03b3d6' - }, - { - wallet: '0x9A203aBD53719C04ad7E1A5e587ea636368A6ed1', - fromImageHash: '0xef028a928c04ec9759be984c2f0f72e0aa578efc2f402dbb6ca4893e981bbf41' - }, - { - wallet: '0x9BdD9F17370d5690230Ba6CdfCE6D40c0dE7Fb49', - fromImageHash: '0xd0fdc647d1fc584cb53bb2798abfd887e61aab0b038caa201b96bebd39e7565f' - }, - { - wallet: '0x9efB45F2e6Bd007Bb47D94CcB461d0b88a1fc6d6', - fromImageHash: '0x2693f1f40c73d0c1f361f472cd1ec4fac9daa2d5232ff5f5b87ec56c1d3e7e20' - }, - { - wallet: '0xa53f6C371539F53Bb4DbcA0f1351eA7AA7F488c5', - fromImageHash: '0x1d018d98154312f501d1794ed77abd2e544a0a7c035638e965be846c0c347f37' - } - ] - - for (const longestPath of [false, true]) { - for (const update of updates) { - const [arweaveUpdates, sessionsUpdates] = await Promise.all([ - arweave.loadPresignedConfiguration({ ...update, longestPath }), - sessions.loadPresignedConfiguration({ ...update, longestPath }) - ]) - - let imageHash = update.fromImageHash - - for (const i in arweaveUpdates) { - const arweaveUpdate = arweaveUpdates[i] - const sessionsUpdate = sessionsUpdates[i] - - expect(arweaveUpdate.wallet).to.equal(update.wallet) - expect(sessionsUpdate.wallet).to.equal(update.wallet) - expect(arweaveUpdate.nextImageHash).to.equal(sessionsUpdate.nextImageHash) - - const nextImageHash = arweaveUpdate.nextImageHash - - const arweaveSignature = v2.signature.decodeSignature(arweaveUpdate.signature) - const sessionsSignature = v2.signature.decodeSignature(sessionsUpdate.signature) - - const digest = v2.chained.hashSetImageHash(nextImageHash) - - const { config: arweaveConfig } = await v2.signature.recoverSignature( - arweaveSignature, - { digest, chainId: 0, address: update.wallet }, - provider - ) - - const { config: sessionsConfig } = await v2.signature.recoverSignature( - sessionsSignature, - { digest, chainId: 0, address: update.wallet }, - provider - ) - - expect(v2.config.imageHash(arweaveConfig)).to.equal(v2.config.imageHash(sessionsConfig)) - - imageHash = nextImageHash - } - } - } - }) - - it.skip('Should find the same migrations as Sequence Sessions', async () => { - const migrations = [ - { - address: '0x1dc2DA033d412d5E0D92f97a3157177dF41381D6', - fromVersion: 1, - fromImageHash: '0xd0cca2788f80d85e93a0b3dd2af2e5962979d162931ec9c4537318be0c8ca312', - chainId: 1 - }, - { - address: '0x213400e26b4aA36885Bcb29A8B7D67caeB0348EC', - fromVersion: 1, - fromImageHash: '0xd94d8b1eaeaa3e2053b3421898e7925ebeef760881d9866c0096a3f97ed78f59', - chainId: 1 - }, - { - address: '0x9efB45F2e6Bd007Bb47D94CcB461d0b88a1fc6d6', - fromVersion: 1, - fromImageHash: '0xb0c9bf9b74e670cd5245ac196261e16c092b701ea769269aeb0b1507bb96f961', - chainId: 1 - }, - { - address: '0xb0E931FB27cc7149Ce0B8585739414Bf0866E0d2', - fromVersion: 1, - fromImageHash: '0x784e8115d0da9724aabe8ce4b6c27a2750ca3bc0ce51f4404c0aee8a2856859d', - chainId: 1 - }, - { - address: '0xc3527Da8b07E49CA6cCCC773C8D032bd4a77D464', - fromVersion: 1, - fromImageHash: '0xa88c665c0507894572288103cb88eea73e791f686b9eb2a4c80b1ca552cd1650', - chainId: 1 - }, - { - address: '0xCa9A0F02c0589D550f06F78AfF604A5405b90448', - fromVersion: 1, - fromImageHash: '0xbaf93699b3cb6214742cd6cccae0a6d1a0240ca4e03bf491b15707cdf46eca24', - chainId: 1 - }, - { - address: '0xd5b1C31f7626A8Bd206D744128dFE6401dd7D7F6', - fromVersion: 1, - fromImageHash: '0xcf813d102720b67781e784e852e624f86a5bb92a9a37234e2a89390b0b814480', - chainId: 1 - }, - { - address: '0xEf87203423cA064A44CE2661Daf93051e2F423a2', - fromVersion: 1, - fromImageHash: '0x338a2e6e1533e902f698e4623afc9b78f7c1b955f1e9c99ff4a4ee914dbbb401', - chainId: 1 - } - ] - - for (const { address, fromVersion, fromImageHash, chainId } of migrations) { - const [arweaveMigration, sessionsMigration] = await Promise.all([ - arweave.getMigration(address, fromImageHash, fromVersion, chainId), - sessions.getMigration(address, fromImageHash, fromVersion, chainId) - ]) - - expect(arweaveMigration).to.deep.equal(sessionsMigration) - } - }) -}) diff --git a/old/packages/sessions/tests/local.spec.ts b/old/packages/sessions/tests/local.spec.ts deleted file mode 100644 index b8fce5b12..000000000 --- a/old/packages/sessions/tests/local.spec.ts +++ /dev/null @@ -1,1192 +0,0 @@ -import hardhat from 'hardhat' -import * as chai from 'chai' -import * as utils from '@0xsequence/tests' - -import { trackers, tracker } from '../src/index' -import { commons, universal, v2 } from '@0xsequence/core' -import { ethers } from 'ethers' -import { Wallet } from '@0xsequence/wallet' -import { Orchestrator } from '@0xsequence/signhub' - -// This is a hack to get around the fact that indexedDB is not available in nodejs -import 'fake-indexeddb/auto' - -const { expect } = chai - -const ConfigCases = [ - { - name: 'v1, random', - config: () => utils.configs.random.genRandomV1Config() - }, - { - name: 'v1, no signers', - config: () => utils.configs.random.genRandomV1Config(undefined, 0) - }, - { - name: 'v1, 1 signer', - config: () => utils.configs.random.genRandomV1Config(undefined, 1) - }, - { - name: 'v1, 2 signers', - config: () => utils.configs.random.genRandomV1Config(undefined, 2) - }, - { - name: 'v1, 3 signers', - config: () => utils.configs.random.genRandomV1Config(undefined, 3) - }, - { - name: 'v1, 4 signers', - config: () => utils.configs.random.genRandomV1Config(undefined, 4) - }, - { - name: 'v1, 100 signers', - config: () => utils.configs.random.genRandomV1Config(undefined, 100) - }, - { - name: 'v1, 101 signers', - config: () => utils.configs.random.genRandomV1Config(undefined, 101) - }, - { - name: 'v2 (random)', - config: () => utils.configs.random.genRandomV2Config() - }, - { - name: 'v2, 1 signer', - config: () => utils.configs.random.genRandomV2Config(undefined, undefined, 1, 0) - }, - { - name: 'v2, 2 signers', - config: () => utils.configs.random.genRandomV2Config(undefined, undefined, 2, 0) - }, - { - name: 'v2, 3 signers', - config: () => utils.configs.random.genRandomV2Config(undefined, undefined, 3, 0) - }, - { - name: 'v2, 4 signers', - config: () => utils.configs.random.genRandomV2Config(undefined, undefined, 4, 0) - }, - { - name: 'v2, 5 signers', - config: () => utils.configs.random.genRandomV2Config(undefined, undefined, 5, 0) - }, - { - name: 'v2, 59 signers', - config: () => utils.configs.random.genRandomV2Config(undefined, undefined, 59, 0) - }, - { - name: 'v2, 5 signers (merkle)', - config: () => utils.configs.random.genRandomV2Config(undefined, undefined, 5, 0, true) - }, - { - name: 'v2, 11 signers (merkle)', - config: () => utils.configs.random.genRandomV2Config(undefined, undefined, 11, 0, true) - }, - { - name: 'v2, 101 signers (merkle)', - config: () => utils.configs.random.genRandomV2Config(undefined, undefined, 101, 0, true) - }, - { - name: 'v2, 1 subdigest', - config: () => utils.configs.random.genRandomV2Config(undefined, undefined, 0, 1) - }, - { - name: 'v2, 10 subdigest (merkle)', - config: () => utils.configs.random.genRandomV2Config(undefined, undefined, 0, 10, true) - }, - { - name: 'v2, 12 signers, 55 subdigest (merkle)', - config: () => utils.configs.random.genRandomV2Config(undefined, undefined, 12, 55, true) - }, - { - name: 'v2, random nested configs', - config: () => { - const nested1 = utils.configs.random.genRandomV2Config(undefined, undefined, 11, 10, true) - const nested2 = utils.configs.random.genRandomV2Config() - - return { - version: 2, - threshold: 2n, - checkpoint: 392919n, - tree: { - left: { - subdigest: ethers.hexlify(ethers.randomBytes(32)) - }, - right: { - left: { - weight: 1n, - threshold: 99n, - tree: nested1.tree - }, - right: { - weight: 99n, - threshold: 1n, - tree: nested2.tree - } - } - } - } as v2.config.WalletConfig - } - } -] - -const randomContext = () => { - return { - version: Math.floor(Math.random() * 10) + 1, - factory: ethers.Wallet.createRandom().address, - mainModule: ethers.Wallet.createRandom().address, - mainModuleUpgradable: ethers.Wallet.createRandom().address, - guestModule: ethers.Wallet.createRandom().address, - - walletCreationCode: ethers.hexlify(ethers.randomBytes(32)) - } -} - -const wait = (ms: number) => new Promise(resolve => setTimeout(resolve, ms)) - -describe('Local config tracker', () => { - let provider: ethers.BrowserProvider - - before(async () => { - provider = new ethers.BrowserProvider(hardhat.network.provider, undefined, { cacheTimeout: -1 }) - }) - ;[ - { - name: 'Using memory store', - getTracker: () => new trackers.local.LocalConfigTracker(provider, new trackers.stores.MemoryTrackerStore()) - }, - { - name: 'Using IndexedDB store', - getTracker: () => new trackers.local.LocalConfigTracker(provider, new trackers.stores.IndexedDBStore('test')) - }, - { - name: 'Using multiple trackers (2)', - getTracker: () => { - const tracker1 = new trackers.local.LocalConfigTracker(provider, new trackers.stores.MemoryTrackerStore()) - const tracker2 = new trackers.local.LocalConfigTracker(provider, new trackers.stores.MemoryTrackerStore()) - - return new trackers.MultipleTracker([tracker1, tracker2]) - } - }, - { - name: 'Using multiple trackers (3)', - getTracker: () => { - const tracker1 = new trackers.local.LocalConfigTracker(provider, new trackers.stores.MemoryTrackerStore()) - const tracker2 = new trackers.local.LocalConfigTracker(provider, new trackers.stores.MemoryTrackerStore()) - const tracker3 = new trackers.local.LocalConfigTracker(provider, new trackers.stores.IndexedDBStore('test-2')) - - return new trackers.MultipleTracker([tracker1, tracker2, tracker3]) - } - }, - { - name: 'Using a cached tracker', - getTracker: () => { - const tracker = new trackers.local.LocalConfigTracker(provider, new trackers.stores.MemoryTrackerStore()) - const cache = new trackers.local.LocalConfigTracker(provider, new trackers.stores.MemoryTrackerStore()) - return new trackers.CachedTracker(tracker, cache, {}) - } - }, - { - name: 'Using a deduped tracker', - getTracker: () => { - const tracker = new trackers.local.LocalConfigTracker(provider, new trackers.stores.MemoryTrackerStore()) - return new trackers.DedupedTracker(tracker, 50) - } - } - ].map(({ name, getTracker }) => { - describe(name, () => { - let tracker: tracker.ConfigTracker - - beforeEach(() => { - tracker = getTracker() - }) - - describe('Configuration', () => { - ConfigCases.map(o => { - it(`Should be able to set and get ${o.name}`, async () => { - const config = o.config() - - await tracker.saveWalletConfig({ config }) - - const imageHash = universal.genericCoderFor(config.version).config.imageHashOf(config) - const getConfig = await tracker.configOfImageHash({ imageHash }) - - expect(normalize(getConfig)).to.deep.equal(normalize(config)) - }) - }) - - it('Should handle all cases at once', async () => { - const shuffled = ConfigCases.sort(() => Math.random() - 0.5) - const configs = shuffled.map(o => o.config()) - - for (const config of configs) { - await tracker.saveWalletConfig({ config }) - - const imageHash = universal.genericCoderFor(config.version).config.imageHashOf(config) - const getConfig = await tracker.configOfImageHash({ imageHash }) - - expect(normalize(getConfig)).to.deep.equal(normalize(config)) - } - - for (const config of configs) { - const imageHash = universal.genericCoderFor(config.version).config.imageHashOf(config) - const getConfig = await tracker.configOfImageHash({ imageHash }) - - expect(normalize(getConfig)).to.deep.equal(normalize(config)) - } - - // Adding the configs again should not change anything - for (const config of configs) { - await tracker.saveWalletConfig({ config }) - - const imageHash = universal.genericCoderFor(config.version).config.imageHashOf(config) - const getConfig = await tracker.configOfImageHash({ imageHash }) - - expect(normalize(getConfig)).to.deep.equal(normalize(config)) - } - }) - - it.skip('Should combine two different v2 configurations', async () => { - const config1 = utils.configs.random.genRandomV2Config(undefined, undefined, 25, 15, true) - const config2 = utils.configs.random.genRandomV2Config(undefined, undefined, 2, 1, false) - - const ih1 = v2.config.imageHash(config1) - const ih2 = v2.config.imageHash(config2) - - const emptyConfig = { - version: 2, - threshold: 2n, - checkpoint: 0n, - tree: { - left: { nodeHash: v2.config.hashNode(config1.tree) }, - right: { nodeHash: v2.config.hashNode(config2.tree) } - } - } - - const imageHash = v2.config.imageHash(emptyConfig) - - await tracker.saveWalletConfig({ config: emptyConfig }) - expect(normalize(await tracker.configOfImageHash({ imageHash }))).to.deep.equal(normalize(emptyConfig)) - - // Add the first config - // should reveal the left branch - await tracker.saveWalletConfig({ config: config1 }) - - // The deduped tracker may cache the result a bit, so if we see a window - // we apply a small delay - if ((tracker as any).window) { - await new Promise(resolve => setTimeout(resolve, 100)) - } - - expect(normalize(await tracker.configOfImageHash({ imageHash: ih1 }))).to.deep.equal(normalize(config1)) - expect(normalize(await tracker.configOfImageHash({ imageHash }))).to.deep.equal( - normalize({ - version: 2, - threshold: 2n, - checkpoint: 0n, - tree: { - left: config1.tree, - right: { nodeHash: v2.config.hashNode(config2.tree) } - } - }) - ) - - // Add the second config - // should reveal the whole tree - await tracker.saveWalletConfig({ config: config2 }) - - if ((tracker as any).window) { - await new Promise(resolve => setTimeout(resolve, 100)) - } - - expect(normalize(await tracker.configOfImageHash({ imageHash: ih2 }))).to.deep.equal(normalize(config2)) - expect(normalize(await tracker.configOfImageHash({ imageHash }))).to.deep.equal( - normalize({ - version: 2, - threshold: 2n, - checkpoint: 0n, - tree: { - left: config1.tree, - right: config2.tree - } - }) - ) - }) - - it('Should return undefined for unknown imageHash', async () => { - const imageHash = ethers.hexlify(ethers.randomBytes(32)) - expect(await tracker.configOfImageHash({ imageHash })).to.be.undefined - }) - - it('Should handle the same request multiple times', async () => { - const config = utils.configs.random.genRandomV1Config() - const imageHash = universal.genericCoderFor(config.version).config.imageHashOf(config) - - await Promise.all(new Array(10).fill(0).map(async () => tracker.saveWalletConfig({ config }))) - const results = await Promise.all(new Array(10).fill(0).map(async () => tracker.configOfImageHash({ imageHash }))) - - expect(results).to.deep.equal(new Array(10).fill(config)) - }) - }) - - describe('Counterfactual address', () => { - it('Should set and get address', async () => { - const context = randomContext() - const config = utils.configs.random.genRandomV1Config() - const imageHash = universal.genericCoderFor(config.version).config.imageHashOf(config) - - const wallet = commons.context.addressOf(context, imageHash) - await tracker.saveCounterfactualWallet({ config, context: [context] }) - const res = await tracker.imageHashOfCounterfactualWallet({ wallet }) - - expect(res).to.deep.equal({ imageHash, context }) - }) - - it('Should set address for multiple configs', async () => { - const contexts = new Array(5).fill(0).map(() => randomContext()) - const config = utils.configs.random.genRandomV1Config() - const imageHash = universal.genericCoderFor(config.version).config.imageHashOf(config) - - const wallets = contexts.map(c => commons.context.addressOf(c, imageHash)) - await tracker.saveCounterfactualWallet({ config, context: contexts }) - - for (let i = 0; i < wallets.length; i++) { - const res = await tracker.imageHashOfCounterfactualWallet({ wallet: wallets[i] }) - expect(res).to.deep.equal({ imageHash, context: contexts[i] }) - } - }) - - it('Should return undefined for unknown wallet', async () => { - const wallet = ethers.Wallet.createRandom().address - expect(await tracker.imageHashOfCounterfactualWallet({ wallet })).to.be.undefined - }) - - it('Should handle the same request multiple times', async () => { - const context = randomContext() - const config = utils.configs.random.genRandomV1Config() - const imageHash = universal.genericCoderFor(config.version).config.imageHashOf(config) - - const wallet = commons.context.addressOf(context, imageHash) - await Promise.all( - new Array(10).fill(0).map(async () => tracker.saveCounterfactualWallet({ config, context: [context] })) - ) - - const results = await Promise.all( - new Array(10).fill(0).map(async () => tracker.imageHashOfCounterfactualWallet({ wallet })) - ) - expect(results).to.deep.equal(new Array(10).fill({ imageHash, context })) - }) - }) - - describe('Chained configurations', () => { - let context: commons.context.WalletContext - - before(async () => { - context = await utils.context.deploySequenceContexts(await provider.getSigner(0)).then(c => c[2]) - }) - - it('Should return return empty chained configuration if config is not known', async () => { - const imageHash = ethers.hexlify(ethers.randomBytes(32)) - const res = await tracker.loadPresignedConfiguration({ - wallet: ethers.Wallet.createRandom().address, - fromImageHash: imageHash - }) - expect(res).to.deep.equal([]) - }) - - it('Should return no chained configuration if no presigned transactions', async () => { - const config = utils.configs.random.genRandomV2Config() - const imageHash = v2.config.imageHash(config) - await tracker.saveWalletConfig({ config }) - const res = await tracker.loadPresignedConfiguration({ - wallet: ethers.Wallet.createRandom().address, - fromImageHash: imageHash - }) - expect(res).to.deep.equal([]) - }) - - it('Should return single presigned step', async () => { - const signer = ethers.Wallet.createRandom() - const config = { version: 2, threshold: 1, checkpoint: 0, tree: { address: signer.address, weight: 1 } } - const imageHash = v2.config.imageHash(config) - const address = commons.context.addressOf(context, imageHash) - const wallet = new Wallet({ - config, - chainId: 0, - coders: v2.coders, - address, - context, - orchestrator: new Orchestrator([signer]) - }) - - const nextConfig = utils.configs.random.genRandomV2Config() - const nextImageHash = v2.config.imageHash(nextConfig) - - const digest = v2.chained.hashSetImageHash(nextImageHash) - const signature = await wallet.signDigest(digest) - - await tracker.saveWalletConfig({ config }) - await tracker.saveWalletConfig({ config: nextConfig }) - await tracker.savePresignedConfiguration({ wallet: address, nextConfig, signature }) - - const res = await tracker.loadPresignedConfiguration({ wallet: address, fromImageHash: imageHash }) - expect(res.length).to.equal(1) - expect(res[0].nextImageHash).to.equal(nextImageHash) - expect(res[0].wallet).to.equal(wallet.address) - expect(res[0].signature).to.equal(signature) - }) - - it('Should return empty for wrong wallet', async () => { - const signer = ethers.Wallet.createRandom() - const config = { version: 2, threshold: 1, checkpoint: 0, tree: { address: signer.address, weight: 1 } } - const imageHash = v2.config.imageHash(config) - const address = commons.context.addressOf(context, imageHash) - const wallet = new Wallet({ - config, - chainId: 0, - coders: v2.coders, - address, - context, - orchestrator: new Orchestrator([signer]) - }) - - const nextConfig = utils.configs.random.genRandomV2Config() - const nextImageHash = v2.config.imageHash(nextConfig) - - const digest = v2.chained.hashSetImageHash(nextImageHash) - const signature = await wallet.signDigest(digest) - - await tracker.saveWalletConfig({ config }) - await tracker.saveWalletConfig({ config: nextConfig }) - await tracker.savePresignedConfiguration({ wallet: address, nextConfig, signature }) - - const wrongWallet = ethers.Wallet.createRandom().address - const res = await tracker.loadPresignedConfiguration({ wallet: wrongWallet, fromImageHash: imageHash }) - expect(res.length).to.equal(0) - }) - - it('Should return two steps', async () => { - // Step 1 - const signer = ethers.Wallet.createRandom() - const config = { version: 2, threshold: 1, checkpoint: 0, tree: { address: signer.address, weight: 1 } } - const imageHash = v2.config.imageHash(config) - - const address = commons.context.addressOf(context, imageHash) - const wallet1 = new Wallet({ - config, - chainId: 0, - coders: v2.coders, - address, - context, - orchestrator: new Orchestrator([signer]) - }) - - const signer2a = ethers.Wallet.createRandom() - const signer2b = ethers.Wallet.createRandom() - const nextConfig1 = { - version: 2, - threshold: 6, - checkpoint: 2, - tree: { - right: { - address: signer2a.address, - weight: 3 - }, - left: { - address: signer2b.address, - weight: 3 - } - } - } - - const nextImageHash1 = v2.config.imageHash(nextConfig1) - - const digest1 = v2.chained.hashSetImageHash(nextImageHash1) - const signature1 = await wallet1.signDigest(digest1) - - // Step 2 - const nextConfig2 = { ...utils.configs.random.genRandomV2Config(), checkpoint: 3 } - const nextImageHash2 = v2.config.imageHash(nextConfig2) - - const digest2 = v2.chained.hashSetImageHash(nextImageHash2) - const wallet2 = new Wallet({ - config: nextConfig1, - chainId: 0, - coders: v2.coders, - address, - context, - orchestrator: new Orchestrator([signer2a, signer2b]) - }) - - const signature2 = await wallet2.signDigest(digest2) - - // Saving only signature2 should lead to empty path - // because there is no route from initial config to config1 - await tracker.saveWalletConfig({ config }) - await tracker.saveWalletConfig({ config: nextConfig1 }) - await tracker.saveWalletConfig({ config: nextConfig2 }) - await tracker.savePresignedConfiguration({ - wallet: address, - nextConfig: nextConfig2, - signature: signature2 - }) - - const route0_2a = await tracker.loadPresignedConfiguration({ - wallet: address, - fromImageHash: imageHash - }) - - expect(route0_2a.length).to.equal(0) - - // But starting from imageHash1 should give us a link - const result1_2a = await tracker.loadPresignedConfiguration({ - wallet: address, - fromImageHash: nextImageHash1 - }) - - expect(result1_2a.length).to.equal(1) - expect(result1_2a[0].nextImageHash).to.equal(nextImageHash2) - expect(result1_2a[0].signature).to.equal(signature2) - expect(result1_2a[0].wallet).to.equal(address) - - // Adding the 0_1 step should give us a full chain to 2 - await tracker.savePresignedConfiguration({ - wallet: address, - nextConfig: nextConfig1, - signature: signature1 - }) - - if ((tracker as any).window) { - await new Promise(resolve => setTimeout(resolve, 100)) - } - - const result0_2b = await tracker.loadPresignedConfiguration({ - wallet: address, - fromImageHash: imageHash - }) - - expect(result0_2b.length).to.equal(2) - expect(result0_2b[0].wallet).to.equal(address) - expect(result0_2b[1].wallet).to.equal(address) - expect(result0_2b[0].nextImageHash).to.equal(nextImageHash1) - expect(result0_2b[1].nextImageHash).to.equal(nextImageHash2) - expect(result0_2b[0].signature).to.equal(signature1) - expect(result0_2b[1].signature).to.equal(signature2) - }) - - it('Should skip step if it uses the same signers', async () => { - const signer1 = ethers.Wallet.createRandom() - const config1 = { version: 2, threshold: 1, checkpoint: 0, tree: { address: signer1.address, weight: 1 } } - const imageHash1 = v2.config.imageHash(config1) - const address = commons.context.addressOf(context, imageHash1) - const wallet = new Wallet({ - config: config1, - chainId: 0, - coders: v2.coders, - address, - context, - orchestrator: new Orchestrator([signer1]) - }) - - const signer2 = ethers.Wallet.createRandom() - const config2 = { - version: 2, - threshold: 3, - checkpoint: 1, - tree: { - left: { - address: signer1.address, - weight: 3 - }, - right: { - address: signer2.address, - weight: 4 - } - } - } - - const imageHash2 = v2.config.imageHash(config2) - - const digest1 = v2.chained.hashSetImageHash(imageHash2) - const signature1 = await wallet.signDigest(digest1) - - const config3 = utils.configs.random.genRandomV2Config() - const imageHash3 = v2.config.imageHash(config3) - - const digest2 = v2.chained.hashSetImageHash(imageHash3) - const wallet2 = new Wallet({ - config: config2, - chainId: 0, - coders: v2.coders, - address, - context, - orchestrator: new Orchestrator([signer1, signer2]) - }) - - const signature2 = await wallet2.signDigest(digest2) - - await tracker.saveWalletConfig({ config: config1 }) - await tracker.saveWalletConfig({ config: config2 }) - await tracker.saveWalletConfig({ config: config3 }) - await tracker.savePresignedConfiguration({ wallet: address, nextConfig: config2, signature: signature1 }) - await tracker.savePresignedConfiguration({ wallet: address, nextConfig: config3, signature: signature2 }) - - // Going from 1 to 3 should give us 1 jump - const resa = await tracker.loadPresignedConfiguration({ - wallet: address, - fromImageHash: imageHash1 - }) - - expect(resa.length).to.equal(1) - expect(resa[0].wallet).to.equal(address) - expect(resa[0].nextImageHash).to.equal(imageHash3) - // This is equivalent to having signed the update - // with only signer1 (because that's what we have in imageHash1) - expect(resa[0].signature).to.equal(await wallet.signDigest(digest2)) - - // Unless we ask for the longest path, then we should find - // both jumps - const resb = await tracker.loadPresignedConfiguration({ - wallet: address, - fromImageHash: imageHash1, - longestPath: true - }) - - expect(resb.length).to.equal(2) - expect(resb[0].wallet).to.equal(address) - expect(resb[1].wallet).to.equal(address) - expect(resb[0].nextImageHash).to.equal(imageHash2) - expect(resb[1].nextImageHash).to.equal(imageHash3) - expect(resb[0].signature).to.equal(signature1) - expect(resb[1].signature).to.equal(signature2) - - // Should return wallets of signer1 and signer2 - const wallets1 = await tracker.walletsOfSigner({ signer: signer1.address }) - expect(wallets1.length).to.equal(1) - expect(wallets1[0].wallet).to.equal(address) - - const wallets2 = await tracker.walletsOfSigner({ signer: signer2.address }) - expect(wallets2.length).to.equal(1) - expect(wallets2[0].wallet).to.equal(address) - }) - }) - - describe('Handle witnesses', async () => { - let context: commons.context.WalletContext - - before(async () => { - context = await utils.context.deploySequenceContexts(await provider.getSigner(0)).then(c => c[2]) - }) - - it('Should retrieve no witness for never used signer', async () => { - const signer = ethers.Wallet.createRandom().address - const witness = await tracker.walletsOfSigner({ signer }) - expect(witness.length).to.equal(0) - }) - - it('Should save a witness for a signer', async () => { - const signer = ethers.Wallet.createRandom() - const config = { version: 2, threshold: 1, checkpoint: 0, tree: { address: signer.address, weight: 1 } } - const imageHash = v2.config.imageHash(config) - const address = commons.context.addressOf(context, imageHash) - const wallet = new Wallet({ - config, - chainId: 1, - coders: v2.coders, - address, - context, - orchestrator: new Orchestrator([signer]) - }) - - const digest = ethers.hexlify(ethers.randomBytes(32)) - const signature = await wallet.signDigest(digest) - - const decoded = v2.signature.SignatureCoder.decode(signature) - await tracker.saveWitnesses({ - wallet: address, - digest, - chainId: 1, - signatures: [(decoded.decoded.tree as v2.signature.SignatureLeaf).signature] - }) - - const witness = await tracker.walletsOfSigner({ signer: signer.address }) - expect(witness.length).to.equal(1) - expect(witness[0].wallet).to.equal(address) - expect(witness[0].proof.chainId).to.equal(1n) - expect(witness[0].proof.digest).to.equal(digest) - expect(witness[0].proof.signature).to.equal((decoded.decoded.tree as v2.signature.SignatureLeaf).signature) - - // Adding a second witness should not change anything - const digest2 = ethers.hexlify(ethers.randomBytes(32)) - const signature2 = await wallet.signDigest(digest2) - const decoded2 = v2.signature.SignatureCoder.decode(signature2) - await tracker.saveWitnesses({ - wallet: address, - digest: digest2, - chainId: 1, - signatures: [(decoded2.decoded.tree as v2.signature.SignatureLeaf).signature] - }) - - const witness2 = await tracker.walletsOfSigner({ signer: signer.address }) - expect(witness2.length).to.equal(1) - - // Adding a witness for a different chain should not change anything - const digest3 = ethers.hexlify(ethers.randomBytes(32)) - const wallet2 = new Wallet({ - config, - chainId: 2, - coders: v2.coders, - address, - context, - orchestrator: new Orchestrator([signer]) - }) - const signature3 = await wallet2.signDigest(digest3) - const decoded3 = v2.signature.SignatureCoder.decode(signature3) - await tracker.saveWitnesses({ - wallet: address, - digest: digest3, - chainId: 2, - signatures: [(decoded3.decoded.tree as v2.signature.SignatureLeaf).signature] - }) - - const witness3 = await tracker.walletsOfSigner({ signer: signer.address }) - expect(witness3.length).to.equal(1) - }) - - it('It should save witnesses for multiple wallets', async () => { - const signer = ethers.Wallet.createRandom() - const config = { version: 2, threshold: 1, checkpoint: 0, tree: { address: signer.address, weight: 1 } } - const imageHash = v2.config.imageHash(config) - const address = commons.context.addressOf(context, imageHash) - const wallet = new Wallet({ - config, - chainId: 1, - coders: v2.coders, - address, - context, - orchestrator: new Orchestrator([signer]) - }) - - const digest = ethers.hexlify(ethers.randomBytes(32)) - const signature = await wallet.signDigest(digest) - - const decoded = v2.signature.SignatureCoder.decode(signature) - await tracker.saveWitnesses({ - wallet: address, - digest, - chainId: 1, - signatures: [(decoded.decoded.tree as v2.signature.SignatureLeaf).signature] - }) - - const config2 = { version: 2, threshold: 2, checkpoint: 0, tree: { address: signer.address, weight: 2 } } - const imageHash2 = v2.config.imageHash(config2) - const address2 = commons.context.addressOf(context, imageHash2) - const wallet2 = new Wallet({ - config: config2, - chainId: 1, - coders: v2.coders, - address: address2, - context, - orchestrator: new Orchestrator([signer]) - }) - - const digest2 = ethers.hexlify(ethers.randomBytes(32)) - const signature2 = await wallet2.signDigest(digest2) - - const decoded2 = v2.signature.SignatureCoder.decode(signature2) - await tracker.saveWitnesses({ - wallet: address2, - digest: digest2, - chainId: 1, - signatures: [(decoded2.decoded.tree as v2.signature.SignatureLeaf).signature] - }) - - const witness = await tracker.walletsOfSigner({ signer: signer.address }) - expect(witness.length).to.equal(2) - - const wallet1Result = witness.find(w => w.wallet === address) - const wallet2Result = witness.find(w => w.wallet === address2) - expect(wallet1Result).to.not.be.undefined - expect(wallet2Result).to.not.be.undefined - - expect(wallet1Result?.proof.chainId).to.equal(1n) - expect(wallet1Result?.proof.digest).to.equal(digest) - expect(wallet1Result?.proof.signature).to.equal((decoded.decoded.tree as v2.signature.SignatureLeaf).signature) - - expect(wallet2Result?.proof.chainId).to.equal(1n) - expect(wallet2Result?.proof.digest).to.equal(digest2) - expect(wallet2Result?.proof.signature).to.equal((decoded2.decoded.tree as v2.signature.SignatureLeaf).signature) - }) - }) - }) - }) - - describe('Multiple config trackers', () => { - let tracker1: trackers.local.LocalConfigTracker - let tracker2: trackers.local.LocalConfigTracker - - let combined: trackers.MultipleTracker - - beforeEach(async () => { - tracker1 = new trackers.local.LocalConfigTracker(provider) - tracker2 = new trackers.local.LocalConfigTracker(provider) - - combined = new trackers.MultipleTracker([tracker1, tracker2]) - }) - - describe('Config', () => { - it('Storing a config should store it in both', async () => { - const config = { - version: 2, - threshold: 1n, - checkpoint: 0n, - tree: { - address: ethers.Wallet.createRandom().address, - weight: 1n - } - } - - const imageHash = v2.config.imageHash(config) - - await combined.saveWalletConfig({ config }) - - const config1 = await tracker1.configOfImageHash({ imageHash }) - const config2 = await tracker2.configOfImageHash({ imageHash }) - - expect(config1).to.deep.equal(config) - expect(config2).to.deep.equal(config) - }) - - it('Retrieving a config from tracker1, should mirror to tracker2', async () => { - const config = { - version: 2, - threshold: 1n, - checkpoint: 0n, - tree: { - address: ethers.Wallet.createRandom().address, - weight: 1n - } - } - - const imageHash = v2.config.imageHash(config) - - await tracker1.saveWalletConfig({ config }) - - const config1 = await combined.configOfImageHash({ imageHash }) - - await wait(500) - - const config2 = await tracker2.configOfImageHash({ imageHash }) - - expect(config1).to.deep.equal(config) - expect(config2).to.deep.equal(config) - }) - - it.skip('Should combine 2 different sources', async () => { - const node1 = { - address: ethers.Wallet.createRandom().address, - weight: 1n - } - - const node2 = { - address: ethers.Wallet.createRandom().address, - weight: 1n - } - - const config1 = { - version: 2, - threshold: 1n, - checkpoint: 1234n, - tree: { - left: { - nodeHash: v2.config.hashNode(node1) - }, - right: node2 - } - } - - const config2 = { - version: 2, - threshold: 1n, - checkpoint: 1234n, - tree: { - left: node1, - right: { - nodeHash: v2.config.hashNode(node2) - } - } - } - - const configAll = { - version: 2, - threshold: 1n, - checkpoint: 1234n, - tree: { - left: node1, - right: node2 - } - } - - await tracker1.saveWalletConfig({ config: config1 }) - await tracker2.saveWalletConfig({ config: config2 }) - - const imageHash = v2.config.imageHash(config2) - const res1 = await combined.configOfImageHash({ imageHash }) - const res2 = await tracker1.configOfImageHash({ imageHash }) - const res3 = await tracker2.configOfImageHash({ imageHash }) - - expect(res1).to.deep.equal(configAll) - expect(res2).to.deep.equal(configAll) - expect(res3).to.deep.equal(configAll) - }) - }) - - describe('Counterfactual addresses', () => { - it('Should store counterfactual address in both', async () => { - const context = randomContext() - const config = utils.configs.random.genRandomV1Config() - const imageHash = universal.genericCoderFor(config.version).config.imageHashOf(config) - - const wallet = commons.context.addressOf(context, imageHash) - await combined.saveCounterfactualWallet({ config, context: [context] }) - - const res1 = await combined.imageHashOfCounterfactualWallet({ wallet }) - const res2 = await tracker1.imageHashOfCounterfactualWallet({ wallet }) - const res3 = await tracker2.imageHashOfCounterfactualWallet({ wallet }) - - expect(res1).to.deep.equal({ imageHash, context }) - expect(res2).to.deep.equal({ imageHash, context }) - expect(res3).to.deep.equal({ imageHash, context }) - }) - - it('Should mirror counterfactual address from tracker1', async () => { - const context = randomContext() - const config = utils.configs.random.genRandomV1Config() - const imageHash = universal.genericCoderFor(config.version).config.imageHashOf(config) - - const wallet = commons.context.addressOf(context, imageHash) - await tracker1.saveCounterfactualWallet({ config, context: [context] }) - - const res1 = await combined.imageHashOfCounterfactualWallet({ wallet }) - - await wait(500) - - const res2 = await tracker1.imageHashOfCounterfactualWallet({ wallet }) - const res3 = await tracker2.imageHashOfCounterfactualWallet({ wallet }) - - expect(res1).to.deep.equal({ imageHash, context }) - expect(res2).to.deep.equal({ imageHash, context }) - expect(res3).to.deep.equal({ imageHash, context }) - }) - }) - - describe('Chained configurations', () => { - let context: commons.context.WalletContext - - before(async () => { - context = await utils.context.deploySequenceContexts(await provider.getSigner(0)).then(c => c[2]) - }) - - it('Should store chained config in both', async () => { - const signer = ethers.Wallet.createRandom() - const config = { version: 2, threshold: 1, checkpoint: 0, tree: { address: signer.address, weight: 1 } } - const imageHash = v2.config.imageHash(config) - const address = commons.context.addressOf(context, imageHash) - const wallet = new Wallet({ - config, - chainId: 0, - coders: v2.coders, - address, - context, - orchestrator: new Orchestrator([signer]) - }) - - const nextConfig = utils.configs.random.genRandomV2Config() - const nextImageHash = v2.config.imageHash(nextConfig) - - const digest = v2.chained.hashSetImageHash(nextImageHash) - const signature = await wallet.signDigest(digest) - - await combined.saveWalletConfig({ config }) - await combined.saveWalletConfig({ config: nextConfig }) - await combined.savePresignedConfiguration({ wallet: address, nextConfig, signature }) - - const res2 = await tracker1.loadPresignedConfiguration({ wallet: address, fromImageHash: imageHash }) - const res3 = await tracker2.loadPresignedConfiguration({ wallet: address, fromImageHash: imageHash }) - const res1 = await combined.loadPresignedConfiguration({ wallet: address, fromImageHash: imageHash }) - - expect(res1.length).to.equal(1) - expect(res1[0].nextImageHash).to.equal(nextImageHash) - expect(res1[0].wallet).to.equal(wallet.address) - expect(res1[0].signature).to.equal(signature) - - expect(res2.length).to.equal(1) - expect(res2[0].nextImageHash).to.equal(nextImageHash) - expect(res2[0].wallet).to.equal(wallet.address) - expect(res2[0].signature).to.equal(signature) - - expect(res3.length).to.equal(1) - expect(res3[0].nextImageHash).to.equal(nextImageHash) - expect(res3[0].wallet).to.equal(wallet.address) - expect(res3[0].signature).to.equal(signature) - }) - - it('Should mirror chained config from tracker2', async () => { - const signer = ethers.Wallet.createRandom() - const config = { version: 2, threshold: 1, checkpoint: 0, tree: { address: signer.address, weight: 1 } } - const imageHash = v2.config.imageHash(config) - const address = commons.context.addressOf(context, imageHash) - const wallet = new Wallet({ - config, - chainId: 0, - coders: v2.coders, - address, - context, - orchestrator: new Orchestrator([signer]) - }) - - const nextConfig = utils.configs.random.genRandomV2Config() - const nextImageHash = v2.config.imageHash(nextConfig) - - const digest = v2.chained.hashSetImageHash(nextImageHash) - const signature = await wallet.signDigest(digest) - - await tracker2.saveWalletConfig({ config }) - await tracker2.saveWalletConfig({ config: nextConfig }) - await tracker2.savePresignedConfiguration({ wallet: address, nextConfig, signature }) - - const res1 = await combined.loadPresignedConfiguration({ wallet: address, fromImageHash: imageHash }) - - await wait(500) - - const res2 = await tracker1.loadPresignedConfiguration({ wallet: address, fromImageHash: imageHash }) - const res3 = await tracker2.loadPresignedConfiguration({ wallet: address, fromImageHash: imageHash }) - - expect(res1.length).to.equal(1) - expect(res1[0].nextImageHash).to.equal(nextImageHash) - expect(res1[0].wallet).to.equal(wallet.address) - expect(res1[0].signature).to.equal(signature) - - expect(res2.length).to.equal(1) - expect(res2[0].nextImageHash).to.equal(nextImageHash) - expect(res2[0].wallet).to.equal(wallet.address) - expect(res2[0].signature).to.equal(signature) - - expect(res3.length).to.equal(1) - expect(res3[0].nextImageHash).to.equal(nextImageHash) - expect(res3[0].wallet).to.equal(wallet.address) - expect(res3[0].signature).to.equal(signature) - }) - - it('Should return highest checkpoint chain (and then mirror)', async () => { - // Step 1 - const signer = ethers.Wallet.createRandom() - const config = { version: 2, threshold: 1, checkpoint: 0, tree: { address: signer.address, weight: 1 } } - const imageHash = v2.config.imageHash(config) - - const address = commons.context.addressOf(context, imageHash) - const wallet1 = new Wallet({ - config, - chainId: 0, - coders: v2.coders, - address, - context, - orchestrator: new Orchestrator([signer]) - }) - - const signer2a = ethers.Wallet.createRandom() - const signer2b = ethers.Wallet.createRandom() - const nextConfig1 = { - version: 2, - threshold: 6, - checkpoint: 2, - tree: { - right: { - address: signer2a.address, - weight: 3 - }, - left: { - address: signer2b.address, - weight: 3 - } - } - } - - const nextImageHash1 = v2.config.imageHash(nextConfig1) - - const digest1 = v2.chained.hashSetImageHash(nextImageHash1) - const signature1 = await wallet1.signDigest(digest1) - - // Step 2 - const nextConfig2 = { ...utils.configs.random.genRandomV2Config(), checkpoint: 3 } - const nextImageHash2 = v2.config.imageHash(nextConfig2) - - const digest2 = v2.chained.hashSetImageHash(nextImageHash2) - const wallet2 = new Wallet({ - config: nextConfig1, - chainId: 0, - coders: v2.coders, - address, - context, - orchestrator: new Orchestrator([signer2a, signer2b]) - }) - - const signature2 = await wallet2.signDigest(digest2) - - // Saving only signature1 on tracker 1 - await tracker1.saveWalletConfig({ config }) - await tracker1.saveWalletConfig({ config: nextConfig1 }) - await tracker1.savePresignedConfiguration({ - wallet: address, - nextConfig: nextConfig1, - signature: signature1 - }) - - // Saving both signatures on tracker 2 - await tracker2.saveWalletConfig({ config }) - await tracker2.saveWalletConfig({ config: nextConfig1 }) - await tracker2.saveWalletConfig({ config: nextConfig2 }) - await tracker2.savePresignedConfiguration({ - wallet: address, - nextConfig: nextConfig1, - signature: signature1 - }) - await tracker2.savePresignedConfiguration({ - wallet: address, - nextConfig: nextConfig2, - signature: signature2 - }) - - // Now the combined tracker should return the highest checkpoint - const res1 = await combined.loadPresignedConfiguration({ wallet: address, fromImageHash: imageHash }) - - await wait(500) - - const res2 = await tracker1.loadPresignedConfiguration({ wallet: address, fromImageHash: imageHash }) - const res3 = await tracker2.loadPresignedConfiguration({ wallet: address, fromImageHash: imageHash }) - - expect(res1.length).to.equal(2) - expect(res1[0].wallet).to.equal(address) - expect(res1[1].wallet).to.equal(address) - expect(res1[0].nextImageHash).to.equal(nextImageHash1) - expect(res1[1].nextImageHash).to.equal(nextImageHash2) - expect(res1[0].signature).to.equal(signature1) - expect(res1[1].signature).to.equal(signature2) - - expect(res2).to.deep.equal(res1) - expect(res3).to.deep.equal(res1) - }) - }) - }) -}) - -function normalize(value: any): any { - switch (typeof value) { - case 'object': - return Object.fromEntries(Object.entries(value).map(([key, value]) => [key, normalize(value)])) - case 'number': - return BigInt(value) - default: - return value - } -} diff --git a/old/packages/signhub/CHANGELOG.md b/old/packages/signhub/CHANGELOG.md deleted file mode 100644 index 18dacda50..000000000 --- a/old/packages/signhub/CHANGELOG.md +++ /dev/null @@ -1,1454 +0,0 @@ -# @0xsequence/signhub - -## 2.3.8 - -### Patch Changes - -- indexer: update clients -- Updated dependencies - - @0xsequence/core@2.3.8 - -## 2.3.7 - -### Patch Changes - -- Metadata updates -- Updated dependencies - - @0xsequence/core@2.3.7 - -## 2.3.6 - -### Patch Changes - -- New chains -- Updated dependencies - - @0xsequence/core@2.3.6 - -## 2.3.5 - -### Patch Changes - -- Add Frequency Testnet -- Updated dependencies - - @0xsequence/core@2.3.5 - -## 2.3.4 - -### Patch Changes - -- metadata: exclude deprecated methods on rpc client -- Updated dependencies - - @0xsequence/core@2.3.4 - -## 2.3.3 - -### Patch Changes - -- metadata: client update -- Updated dependencies - - @0xsequence/core@2.3.3 - -## 2.3.2 - -### Patch Changes - -- metadata: update rpc client -- Updated dependencies - - @0xsequence/core@2.3.2 - -## 2.3.1 - -### Patch Changes - -- indexer: update rpc client -- Updated dependencies - - @0xsequence/core@2.3.1 - -## 2.3.0 - -### Minor Changes - -- update metadata rpc client - -### Patch Changes - -- Updated dependencies - - @0xsequence/core@2.3.0 - -## 2.2.15 - -### Patch Changes - -- API updates -- Updated dependencies - - @0xsequence/core@2.2.15 - -## 2.2.14 - -### Patch Changes - -- Somnia Testnet and Monad Testnet -- Updated dependencies - - @0xsequence/core@2.2.14 - -## 2.2.13 - -### Patch Changes - -- Add XR1 to all networks -- Updated dependencies - - @0xsequence/core@2.2.13 - -## 2.2.12 - -### Patch Changes - -- Add XR1 -- Updated dependencies - - @0xsequence/core@2.2.12 - -## 2.2.11 - -### Patch Changes - -- Relayer updates -- Updated dependencies - - @0xsequence/core@2.2.11 - -## 2.2.10 - -### Patch Changes - -- Etherlink support -- Updated dependencies - - @0xsequence/core@2.2.10 - -## 2.2.9 - -### Patch Changes - -- Indexer gateway native token balances -- Updated dependencies - - @0xsequence/core@2.2.9 - -## 2.2.8 - -### Patch Changes - -- Add Moonbeam and Moonbase Alpha -- Updated dependencies - - @0xsequence/core@2.2.8 - -## 2.2.7 - -### Patch Changes - -- Update Builder package -- Updated dependencies - - @0xsequence/core@2.2.7 - -## 2.2.6 - -### Patch Changes - -- Update relayer package -- Updated dependencies - - @0xsequence/core@2.2.6 - -## 2.2.5 - -### Patch Changes - -- auth: fix sequence indexer gateway url -- account: immutable wallet proxy hook -- Updated dependencies -- Updated dependencies - - @0xsequence/core@2.2.5 - -## 2.2.4 - -### Patch Changes - -- network: update soneium mainnet block explorer url -- waas: signTypedData intent support -- Updated dependencies -- Updated dependencies - - @0xsequence/core@2.2.4 - -## 2.2.3 - -### Patch Changes - -- provider: updating initWallet to use connected network configs if they exist -- Updated dependencies - - @0xsequence/core@2.2.3 - -## 2.2.2 - -### Patch Changes - -- pass projectAccessKey to relayer at all times -- Updated dependencies - - @0xsequence/core@2.2.2 - -## 2.2.1 - -### Patch Changes - -- waas-ethers: sign typed data -- Updated dependencies - - @0xsequence/core@2.2.1 - -## 2.2.0 - -### Minor Changes - -- indexer: gateway client -- @0xsequence/builder -- upgrade puppeteer to v23.10.3 - -### Patch Changes - -- Updated dependencies -- Updated dependencies -- Updated dependencies - - @0xsequence/core@2.2.0 - -## 2.1.8 - -### Patch Changes - -- Add Soneium Mainnet -- Updated dependencies - - @0xsequence/core@2.1.8 - -## 2.1.7 - -### Patch Changes - -- guard: pass project access key to guard requests -- Updated dependencies - - @0xsequence/core@2.1.7 - -## 2.1.6 - -### Patch Changes - -- Add LAOS and Telos Testnet chains -- Updated dependencies - - @0xsequence/core@2.1.6 - -## 2.1.5 - -### Patch Changes - -- account: save presigned configuration with reference chain id 1 -- Updated dependencies - - @0xsequence/core@2.1.5 - -## 2.1.4 - -### Patch Changes - -- provider: pass projectAccessKey into MuxMessageProvider -- Updated dependencies - - @0xsequence/core@2.1.4 - -## 2.1.3 - -### Patch Changes - -- waas: time drift date fix due to strange browser quirk -- Updated dependencies - - @0xsequence/core@2.1.3 - -## 2.1.2 - -### Patch Changes - -- provider: export analytics correctly -- Updated dependencies - - @0xsequence/core@2.1.2 - -## 2.1.1 - -### Patch Changes - -- Add LAOS chain support -- Updated dependencies - - @0xsequence/core@2.1.1 - -## 2.1.0 - -### Minor Changes - -- account: forward project access key when estimating fees and sending transactions - -### Patch Changes - -- sessions: save signatures with reference chain id -- Updated dependencies -- Updated dependencies - - @0xsequence/core@2.1.0 - -## 2.0.26 - -### Patch Changes - -- account: fix chain id comparison -- Updated dependencies - - @0xsequence/core@2.0.26 - -## 2.0.25 - -### Patch Changes - -- skale-nebula: deploy gas limit = 10m -- Updated dependencies - - @0xsequence/core@2.0.25 - -## 2.0.24 - -### Patch Changes - -- sessions: arweave: configurable gateway url -- waas: use /status to get time drift before sending any intents -- Updated dependencies -- Updated dependencies - - @0xsequence/core@2.0.24 - -## 2.0.23 - -### Patch Changes - -- Add The Root Network support -- Updated dependencies - - @0xsequence/core@2.0.23 - -## 2.0.22 - -### Patch Changes - -- Add SKALE Nebula Mainnet support -- Updated dependencies - - @0xsequence/core@2.0.22 - -## 2.0.21 - -### Patch Changes - -- account: add publishWitnessFor -- Updated dependencies - - @0xsequence/core@2.0.21 - -## 2.0.20 - -### Patch Changes - -- upgrade deps, and improve waas session status handling -- Updated dependencies - - @0xsequence/core@2.0.20 - -## 2.0.19 - -### Patch Changes - -- Add Immutable zkEVM support -- Updated dependencies - - @0xsequence/core@2.0.19 - -## 2.0.18 - -### Patch Changes - -- waas: new contractCall transaction type -- sessions: add arweave owner -- Updated dependencies -- Updated dependencies - - @0xsequence/core@2.0.18 - -## 2.0.17 - -### Patch Changes - -- update waas auth to clear session before signIn -- Updated dependencies - - @0xsequence/core@2.0.17 - -## 2.0.16 - -### Patch Changes - -- Removed Astar chains -- Updated dependencies - - @0xsequence/core@2.0.16 - -## 2.0.15 - -### Patch Changes - -- indexer: update bindings with token balance additions -- Updated dependencies - - @0xsequence/core@2.0.15 - -## 2.0.14 - -### Patch Changes - -- sessions: arweave config reader -- network: add b3 and apechain mainnet configs -- Updated dependencies -- Updated dependencies - - @0xsequence/core@2.0.14 - -## 2.0.13 - -### Patch Changes - -- network: toy-testnet -- Updated dependencies - - @0xsequence/core@2.0.13 - -## 2.0.12 - -### Patch Changes - -- api: update bindings -- Updated dependencies - - @0xsequence/core@2.0.12 - -## 2.0.11 - -### Patch Changes - -- waas: intents test fix -- api: update bindings -- Updated dependencies -- Updated dependencies - - @0xsequence/core@2.0.11 - -## 2.0.10 - -### Patch Changes - -- network: soneium minato testnet -- Updated dependencies - - @0xsequence/core@2.0.10 - -## 2.0.9 - -### Patch Changes - -- network: fix SKALE network name -- Updated dependencies - - @0xsequence/core@2.0.9 - -## 2.0.8 - -### Patch Changes - -- metadata: update bindings -- Updated dependencies - - @0xsequence/core@2.0.8 - -## 2.0.7 - -### Patch Changes - -- wallet request handler fix -- Updated dependencies - - @0xsequence/core@2.0.7 - -## 2.0.6 - -### Patch Changes - -- network: matic -> pol -- Updated dependencies - - @0xsequence/core@2.0.6 - -## 2.0.5 - -### Patch Changes - -- provider: update databeat to 0.9.2 -- Updated dependencies - - @0xsequence/core@2.0.5 - -## 2.0.4 - -### Patch Changes - -- network: add skale-nebula-testnet -- Updated dependencies - - @0xsequence/core@2.0.4 - -## 2.0.3 - -### Patch Changes - -- waas: check session status in SequenceWaaS.isSignedIn() -- Updated dependencies - - @0xsequence/core@2.0.3 - -## 2.0.2 - -### Patch Changes - -- sessions: property convert serialized bignumber hex value to bigint -- Updated dependencies - - @0xsequence/core@2.0.2 - -## 2.0.1 - -### Patch Changes - -- waas: http signature check for authenticator requests -- provider: unwrap legacy json rpc responses -- use json replacer and reviver for bigints -- Updated dependencies -- Updated dependencies -- Updated dependencies - - @0xsequence/core@2.0.1 - -## 2.0.0 - -### Major Changes - -- ethers v6 - -### Patch Changes - -- Updated dependencies - - @0xsequence/core@2.0.0 - -## 1.10.15 - -### Patch Changes - -- utils: extractProjectIdFromAccessKey -- Updated dependencies - - @0xsequence/core@1.10.15 - -## 1.10.14 - -### Patch Changes - -- network: add borne-testnet to allNetworks -- Updated dependencies - - @0xsequence/core@1.10.14 - -## 1.10.13 - -### Patch Changes - -- network: add borne testnet -- Updated dependencies - - @0xsequence/core@1.10.13 - -## 1.10.12 - -### Patch Changes - -- api: update bindings -- global/window -> globalThis -- Updated dependencies -- Updated dependencies - - @0xsequence/core@1.10.12 - -## 1.10.11 - -### Patch Changes - -- waas: updated intent.gen without webrpc types, errors exported from authenticator.gen -- Updated dependencies - - @0xsequence/core@1.10.11 - -## 1.10.10 - -### Patch Changes - -- metadata: update bindings with new contract collections api -- Updated dependencies - - @0xsequence/core@1.10.10 - -## 1.10.9 - -### Patch Changes - -- waas minor update -- Updated dependencies - - @0xsequence/core@1.10.9 - -## 1.10.8 - -### Patch Changes - -- update metadata bindings -- Updated dependencies - - @0xsequence/core@1.10.8 - -## 1.10.7 - -### Patch Changes - -- minor fixes to waas client -- Updated dependencies - - @0xsequence/core@1.10.7 - -## 1.10.6 - -### Patch Changes - -- metadata: update bindings -- Updated dependencies - - @0xsequence/core@1.10.6 - -## 1.10.5 - -### Patch Changes - -- network: ape-chain-testnet -> apechain-testnet -- Updated dependencies - - @0xsequence/core@1.10.5 - -## 1.10.4 - -### Patch Changes - -- network: add b3-sepolia, ape-chain-testnet, blast, blast-sepolia -- Updated dependencies - - @0xsequence/core@1.10.4 - -## 1.10.3 - -### Patch Changes - -- typing fix -- Updated dependencies - - @0xsequence/core@1.10.3 - -## 1.10.2 - -### Patch Changes - -- - waas: add getIdToken method - - indexer: update api client -- Updated dependencies - - @0xsequence/core@1.10.2 - -## 1.10.1 - -### Patch Changes - -- metadata: update bindings -- Updated dependencies - - @0xsequence/core@1.10.1 - -## 1.10.0 - -### Minor Changes - -- waas release v1.3.0 - -### Patch Changes - -- Updated dependencies - - @0xsequence/core@1.10.0 - -## 1.9.37 - -### Patch Changes - -- network: adds nativeToken data to NetworkMetadata constants -- Updated dependencies - - @0xsequence/core@1.9.37 - -## 1.9.36 - -### Patch Changes - -- guard: export client -- Updated dependencies - - @0xsequence/core@1.9.36 - -## 1.9.35 - -### Patch Changes - -- guard: update bindings -- Updated dependencies - - @0xsequence/core@1.9.35 - -## 1.9.34 - -### Patch Changes - -- waas: always use lowercase email -- Updated dependencies - - @0xsequence/core@1.9.34 - -## 1.9.33 - -### Patch Changes - -- waas: umd build -- Updated dependencies - - @0xsequence/core@1.9.33 - -## 1.9.32 - -### Patch Changes - -- indexer: update bindings -- Updated dependencies - - @0xsequence/core@1.9.32 - -## 1.9.31 - -### Patch Changes - -- metadata: token directory changes -- Updated dependencies - - @0xsequence/core@1.9.31 - -## 1.9.30 - -### Patch Changes - -- update -- Updated dependencies - - @0xsequence/core@1.9.30 - -## 1.9.29 - -### Patch Changes - -- disable gnosis chain -- Updated dependencies - - @0xsequence/core@1.9.29 - -## 1.9.28 - -### Patch Changes - -- add utils/merkletree -- Updated dependencies - - @0xsequence/core@1.9.28 - -## 1.9.27 - -### Patch Changes - -- network: optimistic -> optimism -- waas: remove defaults -- api, sessions: update bindings -- Updated dependencies -- Updated dependencies -- Updated dependencies - - @0xsequence/core@1.9.27 - -## 1.9.26 - -### Patch Changes - -- - add backend interfaces for pluggable interfaces - - introduce @0xsequence/react-native - - update pnpm to lockfile v9 -- Updated dependencies - - @0xsequence/core@1.9.26 - -## 1.9.25 - -### Patch Changes - -- update webrpc clients with new error types -- Updated dependencies - - @0xsequence/core@1.9.25 - -## 1.9.24 - -### Patch Changes - -- waas: add memoryStore backend to localStore -- Updated dependencies - - @0xsequence/core@1.9.24 - -## 1.9.23 - -### Patch Changes - -- update api client bindings -- Updated dependencies - - @0xsequence/core@1.9.23 - -## 1.9.22 - -### Patch Changes - -- update metadata client bindings -- Updated dependencies - - @0xsequence/core@1.9.22 - -## 1.9.21 - -### Patch Changes - -- api client bindings -- Updated dependencies - - @0xsequence/core@1.9.21 - -## 1.9.20 - -### Patch Changes - -- api client bindings update -- Updated dependencies - - @0xsequence/core@1.9.20 - -## 1.9.19 - -### Patch Changes - -- waas update -- Updated dependencies - - @0xsequence/core@1.9.19 - -## 1.9.18 - -### Patch Changes - -- provider: prohibit dangerous functions -- Updated dependencies - - @0xsequence/core@1.9.18 - -## 1.9.17 - -### Patch Changes - -- network: add xr-sepolia -- Updated dependencies - - @0xsequence/core@1.9.17 - -## 1.9.16 - -### Patch Changes - -- waas: sequence.feeOptions -- Updated dependencies - - @0xsequence/core@1.9.16 - -## 1.9.15 - -### Patch Changes - -- metadata: collection external_link field name fix -- Updated dependencies - - @0xsequence/core@1.9.15 - -## 1.9.14 - -### Patch Changes - -- network: astar-zkatana -> astar-zkyoto -- network: deprecate polygon mumbai network -- network: add xai and polygon amoy -- Updated dependencies -- Updated dependencies -- Updated dependencies - - @0xsequence/core@1.9.14 - -## 1.9.13 - -### Patch Changes - -- waas: fix @0xsequence/network dependency -- Updated dependencies - - @0xsequence/core@1.9.13 - -## 1.9.12 - -### Patch Changes - -- indexer: update rpc bindings -- provider: signMessage: Serialize the BytesLike or string message into hexstring before sending -- waas: SessionAuthProof -- Updated dependencies -- Updated dependencies -- Updated dependencies - - @0xsequence/core@1.9.12 - -## 1.9.11 - -### Patch Changes - -- metdata, update rpc bindings -- Updated dependencies - - @0xsequence/core@1.9.11 - -## 1.9.10 - -### Patch Changes - -- update metadata rpc bindings -- Updated dependencies - - @0xsequence/core@1.9.10 - -## 1.9.9 - -### Patch Changes - -- metadata, add SequenceCollections rpc client -- Updated dependencies - - @0xsequence/core@1.9.9 - -## 1.9.8 - -### Patch Changes - -- waas client update -- Updated dependencies - - @0xsequence/core@1.9.8 - -## 1.9.7 - -### Patch Changes - -- update rpc client bindings for api, metadata and relayer -- Updated dependencies - - @0xsequence/core@1.9.7 - -## 1.9.6 - -### Patch Changes - -- waas package update -- Updated dependencies - - @0xsequence/core@1.9.6 - -## 1.9.5 - -### Patch Changes - -- RpcRelayer prioritize project access key -- Updated dependencies - - @0xsequence/core@1.9.5 - -## 1.9.4 - -### Patch Changes - -- waas: fix network dependency -- Updated dependencies - - @0xsequence/core@1.9.4 - -## 1.9.3 - -### Patch Changes - -- provider: don't append access key to RPC url if user has already provided it -- Updated dependencies - - @0xsequence/core@1.9.3 - -## 1.9.2 - -### Patch Changes - -- network: add xai-sepolia -- Updated dependencies - - @0xsequence/core@1.9.2 - -## 1.9.1 - -### Patch Changes - -- analytics fix -- Updated dependencies - - @0xsequence/core@1.9.1 - -## 1.9.0 - -### Minor Changes - -- waas release - -### Patch Changes - -- Updated dependencies - - @0xsequence/core@1.9.0 - -## 1.8.8 - -### Patch Changes - -- update metadata bindings -- Updated dependencies - - @0xsequence/core@1.8.8 - -## 1.8.7 - -### Patch Changes - -- provider: update databeat to 0.9.1 -- Updated dependencies - - @0xsequence/core@1.8.7 - -## 1.8.6 - -### Patch Changes - -- guard: SignedOwnershipProof -- Updated dependencies - - @0xsequence/core@1.8.6 - -## 1.8.5 - -### Patch Changes - -- guard: signOwnershipProof and isSignedOwnershipProof -- Updated dependencies - - @0xsequence/core@1.8.5 - -## 1.8.4 - -### Patch Changes - -- network: add homeverse to networks list -- Updated dependencies - - @0xsequence/core@1.8.4 - -## 1.8.3 - -### Patch Changes - -- api: introduce basic linked wallet support -- Updated dependencies - - @0xsequence/core@1.8.3 - -## 1.8.2 - -### Patch Changes - -- provider: don't initialize analytics unless explicitly requested -- Updated dependencies - - @0xsequence/core@1.8.2 - -## 1.8.1 - -### Patch Changes - -- update to analytics provider -- Updated dependencies - - @0xsequence/core@1.8.1 - -## 1.8.0 - -### Minor Changes - -- provider: project analytics - -### Patch Changes - -- Updated dependencies - - @0xsequence/core@1.8.0 - -## 1.7.2 - -### Patch Changes - -- 0xsequence: ChainId should not be exported as a type -- account, wallet: fix nonce selection -- Updated dependencies -- Updated dependencies - - @0xsequence/core@1.7.2 - -## 1.7.1 - -### Patch Changes - -- network: add missing avalanche logoURI -- Updated dependencies - - @0xsequence/core@1.7.1 - -## 1.7.0 - -### Minor Changes - -- provider: projectAccessKey is now required - -### Patch Changes - -- network: add NetworkMetadata.logoURI property for all networks -- Updated dependencies -- Updated dependencies - - @0xsequence/core@1.7.0 - -## 1.6.3 - -### Patch Changes - -- network list update -- Updated dependencies - - @0xsequence/core@1.6.3 - -## 1.6.2 - -### Patch Changes - -- auth: projectAccessKey option -- wallet: use 12 bytes for random space -- Updated dependencies -- Updated dependencies - - @0xsequence/core@1.6.2 - -## 1.6.1 - -### Patch Changes - -- core: add simple config from subdigest support -- core: fix encode tree with subdigest -- account: implement buildOnChainSignature on Account -- Updated dependencies -- Updated dependencies -- Updated dependencies - - @0xsequence/core@1.6.1 - -## 1.6.0 - -### Minor Changes - -- account, wallet: parallel transactions by default - -### Patch Changes - -- provider: emit disconnect on sign out -- Updated dependencies -- Updated dependencies - - @0xsequence/core@1.6.0 - -## 1.5.0 - -### Minor Changes - -- signhub: add 'signing' signer status - -### Patch Changes - -- auth: Session.open: onAccountAddress callback -- account: allow empty transaction bundles -- Updated dependencies -- Updated dependencies -- Updated dependencies - - @0xsequence/core@1.5.0 - -## 1.4.9 - -### Patch Changes - -- rename SequenceMetadataClient to SequenceMetadata -- Updated dependencies - - @0xsequence/core@1.4.9 - -## 1.4.8 - -### Patch Changes - -- account: Account.getSigners -- Updated dependencies - - @0xsequence/core@1.4.8 - -## 1.4.7 - -### Patch Changes - -- update indexer client bindings -- Updated dependencies - - @0xsequence/core@1.4.7 - -## 1.4.6 - -### Patch Changes - -- - add sepolia networks, mark goerli as deprecated - - update indexer client bindings -- Updated dependencies - - @0xsequence/core@1.4.6 - -## 1.4.5 - -### Patch Changes - -- indexer/metadata: update client bindings -- auth: selectWallet with new address -- Updated dependencies -- Updated dependencies - - @0xsequence/core@1.4.5 - -## 1.4.4 - -### Patch Changes - -- indexer: update bindings -- auth: handle jwt expiry -- Updated dependencies -- Updated dependencies - - @0xsequence/core@1.4.4 - -## 1.4.3 - -### Patch Changes - -- guard: return active status from GuardSigner.getAuthMethods -- Updated dependencies - - @0xsequence/core@1.4.3 - -## 1.4.2 - -### Patch Changes - -- guard: update bindings -- Updated dependencies - - @0xsequence/core@1.4.2 - -## 1.4.1 - -### Patch Changes - -- network: remove unused networks -- signhub: orchestrator interface -- guard: auth methods interface -- guard: update bindings for pin and totp -- guard: no more retry logic -- Updated dependencies -- Updated dependencies -- Updated dependencies -- Updated dependencies -- Updated dependencies - - @0xsequence/core@1.4.1 - -## 1.4.0 - -### Minor Changes - -- project access key support - -### Patch Changes - -- Updated dependencies - - @0xsequence/core@1.4.0 - -## 1.3.0 - -### Minor Changes - -- signhub: account children - -### Patch Changes - -- guard: do not throw when building deploy transaction -- network: snowtrace.io -> subnets.avax.network/c-chain -- Updated dependencies -- Updated dependencies -- Updated dependencies - - @0xsequence/core@1.3.0 - -## 1.2.9 - -### Patch Changes - -- account: AccountSigner.sendTransaction simulateForFeeOptions -- relayer: update bindings - -## 1.2.8 - -### Patch Changes - -- rename X-Sequence-Token-Key header to X-Access-Key - -## 1.2.7 - -### Patch Changes - -- add x-sequence-token-key to clients - -## 1.2.6 - -### Patch Changes - -- Fix bind multicall provider - -## 1.2.5 - -### Patch Changes - -- Multicall default configuration fixes - -## 1.2.4 - -### Patch Changes - -- provider: Adding missing payment provider types to PaymentProviderOption -- provider: WalletRequestHandler.notifyChainChanged - -## 1.2.3 - -### Patch Changes - -- auth, provider: connect to accept optional authorizeNonce - -## 1.2.2 - -### Patch Changes - -- provider: allow createContract calls -- core: check for explicit zero address in contract deployments - -## 1.2.1 - -### Patch Changes - -- auth: use sequence api chain id as reference chain id if available - -## 1.2.0 - -### Minor Changes - -- split services from session, better local support - -## 1.1.15 - -### Patch Changes - -- guard: remove error filtering - -## 1.1.14 - -### Patch Changes - -- guard: add GuardSigner.onError - -## 1.1.13 - -### Patch Changes - -- provider: pass client version with connect options -- provider: removing large from BannerSize - -## 1.1.12 - -### Patch Changes - -- provider: adding bannerSize to ConnectOptions - -## 1.1.11 - -### Patch Changes - -- add homeverse configs - -## 1.1.10 - -### Patch Changes - -- handle default EIP6492 on send - -## 1.1.9 - -### Patch Changes - -- Custom default EIP6492 on client - -## 1.1.8 - -### Patch Changes - -- metadata: searchMetadata: add types filter - -## 1.1.7 - -### Patch Changes - -- adding signInWith connect settings option to allow dapps to automatically login their users with a certain provider optimizing the normal authentication flow - -## 1.1.6 - -### Patch Changes - -- metadata: searchMetadata: add chainID and excludeTokenMetadata filters - -## 1.1.5 - -### Patch Changes - -- account: re-compute meta-transaction id for wallet deployment transactions - -## 1.1.4 - -### Patch Changes - -- network: rename base-mainnet to base -- provider: override isDefaultChain with ConnectOptions.networkId if provided - -## 1.1.3 - -### Patch Changes - -- provider: use network id from transport session -- provider: sign authorization using ConnectOptions.networkId if provided - -## 1.1.2 - -### Patch Changes - -- provider: jsonrpc chain id fixes - -## 1.1.1 - -### Patch Changes - -- network: add base mainnet and sepolia -- provider: reject toxic transaction requests - -## 1.1.0 - -### Minor Changes - -- Refactor dapp facing provider - -## 1.0.5 - -### Patch Changes - -- network: export network constants -- guard: use the correct global for fetch -- network: nova-explorer.arbitrum.io -> nova.arbiscan.io - -## 1.0.4 - -### Patch Changes - -- provider: accept name or number for networkId - -## 1.0.3 - -### Patch Changes - -- Simpler isValidSignature helpers - -## 1.0.2 - -### Patch Changes - -- add extra signature validation utils methods - -## 1.0.1 - -### Patch Changes - -- add homeverse testnet - -## 1.0.0 - -### Major Changes - -- https://sequence.xyz/blog/sequence-wallet-light-state-sync-full-merkle-wallets diff --git a/old/packages/signhub/package.json b/old/packages/signhub/package.json deleted file mode 100644 index faee04567..000000000 --- a/old/packages/signhub/package.json +++ /dev/null @@ -1,31 +0,0 @@ -{ - "name": "@0xsequence/signhub", - "version": "2.3.8", - "description": "orchestrates a series of signers, provides visibility into the signing process, and to the signers themselves", - "repository": "https://github.com/0xsequence/sequence.js/tree/master/packages/signhub", - "source": "src/index.ts", - "main": "dist/0xsequence-signhub.cjs.js", - "module": "dist/0xsequence-signhub.esm.js", - "author": "Horizon Blockchain Games", - "license": "Apache-2.0", - "scripts": { - "test": "pnpm test:file tests/**/*.spec.ts", - "test:file": "TS_NODE_PROJECT=../../tsconfig.test.json mocha -r ts-node/register --timeout 30000", - "test:coverage": "nyc pnpm test" - }, - "peerDependencies": { - "ethers": ">=6" - }, - "dependencies": { - "@0xsequence/core": "workspace:*" - }, - "devDependencies": { - "@istanbuljs/nyc-config-typescript": "^1.0.2", - "ethers": "6.13.4", - "nyc": "^15.1.0" - }, - "files": [ - "src", - "dist" - ] -} diff --git a/old/packages/signhub/src/index.ts b/old/packages/signhub/src/index.ts deleted file mode 100644 index 22f52a644..000000000 --- a/old/packages/signhub/src/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -export * as signers from './signers' -export * from './orchestrator' diff --git a/old/packages/signhub/src/orchestrator.ts b/old/packages/signhub/src/orchestrator.ts deleted file mode 100644 index 45b672f45..000000000 --- a/old/packages/signhub/src/orchestrator.ts +++ /dev/null @@ -1,218 +0,0 @@ -import { ethers } from 'ethers' -import { commons } from '@0xsequence/core' -import { isSapientSigner, SapientSigner } from './signers/signer' -import { SignerWrapper } from './signers/wrapper' - -export type Status = { - ended: boolean - message: ethers.BytesLike - signers: { [signer: string]: SignerStatus } -} - -export enum SignerState { - INITIAL, - SIGNING, - SIGNED, - ERROR -} - -export type SignerStatus = - | { state: SignerState.INITIAL } - | { state: SignerState.SIGNING; request: Promise } - | { state: SignerState.SIGNED; signature: ethers.BytesLike; suffix: ethers.BytesLike } - | { state: SignerState.ERROR; error: any } - -export function isSignerStatusPending( - status?: SignerStatus -): status is undefined | { state: SignerState.INITIAL } | { state: SignerState.SIGNING; request: Promise } { - return status === undefined || status.state === SignerState.INITIAL || status.state === SignerState.SIGNING -} - -export interface SignatureOrchestrator { - getSigners(): Promise - - signMessage(args: { - candidates: string[] - message: ethers.BytesLike - metadata: object - callback: (status: Status, onNewMetadata: (metadata: object) => void) => boolean - }): Promise - - buildDeployTransaction(metadata: object): Promise - - predecorateSignedTransactions(metadata?: object): Promise - - decorateTransactions( - bundle: commons.transaction.IntendedTransactionBundle, - metadata?: object - ): Promise -} - -/** - * Orchestrates actions of collective signers. - * This includes the signing of a single digests and transactions by multiple signers. - * It can provide internal visibility of the signing process, and it also - * provides the internal signers with additional information about the - * message being signed. Transaction decoration can be used to ensure on-chain state - * is correctly managed during the signing process. - */ -export class Orchestrator { - private observers: ((status: Status, metadata: object) => void)[] = [] - private signers: SapientSigner[] = [] - - private count = 0 - - constructor( - signers: (ethers.Signer | SapientSigner)[], - public tag: string = Orchestrator.randomTag() - ) { - this.setSigners(signers) - } - - private static randomTag(): string { - return `default-${ethers.hexlify(ethers.randomBytes(8)).slice(2)}` - } - - private pullId(): string { - return `${this.tag}-${this.count++}` - } - - setSigners(signers: (ethers.Signer | SapientSigner)[]) { - this.signers = signers.map(s => (isSapientSigner(s) ? s : new SignerWrapper(s))) - } - - async getSigners(): Promise { - return Promise.all(this.signers.map(async s => s.getAddress())) - } - - subscribe(observer: (status: Status, metadata: object) => void): () => void { - this.observers.push(observer) - return () => { - this.observers = this.observers.filter(o => o !== observer) - } - } - - private async notifyObservers(id: string, status: Status, metadata: object) { - await Promise.all([ - ...this.signers.map(async signer => signer.notifyStatusChange(id, status, metadata)), - ...this.observers.map(async observer => observer(status, metadata)) - ]) - } - - async buildDeployTransaction(metadata: object): Promise { - let bundle: commons.transaction.TransactionBundle | undefined - for (const signer of this.signers) { - const newBundle = await signer.buildDeployTransaction(metadata) - if (bundle === undefined) { - // Use first bundle as base - bundle = newBundle - } else if (newBundle?.transactions) { - // Combine deploy transactions - bundle.transactions = newBundle.transactions.concat(bundle.transactions) - } - } - return bundle - } - - async predecorateSignedTransactions(metadata?: object): Promise { - const output: commons.transaction.SignedTransactionBundle[] = [] - for (const signer of this.signers) { - output.push(...(await signer.predecorateSignedTransactions(metadata ?? {}))) - } - return output - } - - async decorateTransactions( - bundle: commons.transaction.IntendedTransactionBundle, - metadata?: object - ): Promise { - for (const signer of this.signers) { - bundle = await signer.decorateTransactions(bundle, metadata ?? {}) - } - return bundle - } - - signMessage(args: { - candidates?: string[] - message: ethers.BytesLike - metadata?: object - callback?: (status: Status, onNewMetadata: (metadata: object) => void) => boolean - }): Promise { - const id = this.pullId() - - return new Promise(async resolve => { - const { message, metadata, callback, candidates } = args - const status: Status = { ended: false, message, signers: {} } - let lastMetadata = metadata ?? {} - - const onNewMetadata = (newMetadata: object) => { - lastMetadata = newMetadata - this.notifyObservers(id, status, lastMetadata) - } - - const onStatusUpdate = () => { - try { - this.notifyObservers(id, status, lastMetadata) - - const pending = Object.entries(status.signers).filter(([_, s]) => isSignerStatusPending(s)) - if ((callback && callback(status, onNewMetadata)) || pending.length === 0) { - status.ended = true - resolve(status) - this.notifyObservers(id, status, lastMetadata) - return - } - } catch (e) { - console.error('Error while notifying observers', e) - } - } - - // we only call signers that are found in `candidates` - // if `candidates` is undefined, we call all signers - let signers = this.signers - if (candidates) { - const addresses = await Promise.all(this.signers.map(async s => s.getAddress())) - signers = this.signers.filter((_, i) => candidates.includes(addresses[i])) - } - - // build callbacks object - const accepted = await Promise.allSettled( - signers.map(async s => { - const saddr = await s.getAddress() - - status.signers[saddr] = { - state: SignerState.SIGNING, - request: s - .sign(message, metadata ?? {}) - .then(signature => { - const suffix = s.suffix() - status.signers[saddr] = { state: SignerState.SIGNED, signature, suffix } - onStatusUpdate() - return signature - }) - .catch(error => { - status.signers[saddr] = { state: SignerState.ERROR, error } - onStatusUpdate() - throw error - }) - } - }) - ) - - for (let i = 0; i < accepted.length; i++) { - const signer = this.signers[i] - const promise = accepted[i] - - if (promise.status === 'rejected') { - const address = await signer.getAddress() - console.warn(`signer ${address} rejected the request: ${promise.reason}`) - status.signers[address] = { - state: SignerState.ERROR, - error: new Error(`signer ${address} rejected the request: ${promise.reason}`) - } - } - } - - onStatusUpdate() - }) - } -} diff --git a/old/packages/signhub/src/signers/index.ts b/old/packages/signhub/src/signers/index.ts deleted file mode 100644 index 2ea68121a..000000000 --- a/old/packages/signhub/src/signers/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -export * from './signer' -export * from './wrapper' diff --git a/old/packages/signhub/src/signers/signer.ts b/old/packages/signhub/src/signers/signer.ts deleted file mode 100644 index 7bf3fec54..000000000 --- a/old/packages/signhub/src/signers/signer.ts +++ /dev/null @@ -1,45 +0,0 @@ -import { ethers } from 'ethers' -import { commons } from '@0xsequence/core' -import { Status } from '../orchestrator' - -export interface SapientSigner { - getAddress(): Promise - - buildDeployTransaction(metadata: object): Promise - - /** - * Get signed transactions to be included in the next request. - */ - predecorateSignedTransactions(metadata: object): Promise - - /** - * Modify the transaction bundle before it is sent. - */ - decorateTransactions( - bundle: commons.transaction.IntendedTransactionBundle, - metadata: object - ): Promise - - /** - * Request a signature from the signer. - */ - sign(message: ethers.BytesLike, metadata: object): Promise - - /** - * Notify the signer of a status change. - */ - notifyStatusChange(id: string, status: Status, metadata: object): void - - suffix(): ethers.BytesLike -} - -export function isSapientSigner(signer: ethers.Signer | SapientSigner): signer is SapientSigner { - return ( - (signer as SapientSigner).getAddress !== undefined && - (signer as SapientSigner).buildDeployTransaction !== undefined && - (signer as SapientSigner).predecorateSignedTransactions !== undefined && - (signer as SapientSigner).decorateTransactions !== undefined && - (signer as SapientSigner).sign !== undefined && - (signer as SapientSigner).notifyStatusChange !== undefined - ) -} diff --git a/old/packages/signhub/src/signers/wrapper.ts b/old/packages/signhub/src/signers/wrapper.ts deleted file mode 100644 index 77fbd9bda..000000000 --- a/old/packages/signhub/src/signers/wrapper.ts +++ /dev/null @@ -1,41 +0,0 @@ -import { ethers } from 'ethers' -import { commons } from '@0xsequence/core' -import { Status } from '../orchestrator' -import { SapientSigner } from './signer' - -export class SignerWrapper implements SapientSigner { - constructor( - public signer: ethers.Signer, - public eoa: boolean = true - ) {} - - getAddress(): Promise { - return this.signer.getAddress() - } - - async buildDeployTransaction(_metadata: object): Promise { - // Wrapped signers don't require deployment - return - } - - async predecorateSignedTransactions(_metadata: object): Promise { - return [] - } - - async decorateTransactions( - bundle: commons.transaction.IntendedTransactionBundle, - _metadata: object - ): Promise { - return bundle - } - - sign(message: ethers.BytesLike): Promise { - return this.signer.signMessage(message) - } - - notifyStatusChange(_i: string, _s: Status, _m: object): void {} - - suffix(): ethers.BytesLike { - return new Uint8Array([2]) - } -} diff --git a/old/packages/signhub/tests/orchestrator.spec.ts b/old/packages/signhub/tests/orchestrator.spec.ts deleted file mode 100644 index 8e4041795..000000000 --- a/old/packages/signhub/tests/orchestrator.spec.ts +++ /dev/null @@ -1,551 +0,0 @@ -import * as chai from 'chai' -import { ethers } from 'ethers' -import { commons } from '@0xsequence/core' -import { isSignerStatusPending, Orchestrator, SignerState, Status } from '../src' -import { SapientSigner } from '../src/signers' - -const { expect } = chai - -describe('Orchestrator', () => { - describe('signMessage', () => { - it('Should call all signers', async () => { - const signers = [ethers.Wallet.createRandom(), ethers.Wallet.createRandom(), ethers.Wallet.createRandom()] - - const orchestrator = new Orchestrator(signers) - const signature = await orchestrator.signMessage({ message: '0x1234' }) - - expect(Object.keys(signature.signers)).to.have.lengthOf(signers.length) - - for (const signer of signers) { - expect(signature.signers).to.have.property(signer.address) - } - }) - - it('Should call callback with status updates', async () => { - const signers = [ethers.Wallet.createRandom(), ethers.Wallet.createRandom(), ethers.Wallet.createRandom()] - - const orchestrator = new Orchestrator(signers) - - let callbackCallsA = 0 - orchestrator.subscribe((status, metadata) => { - // Status should have all signers - let numErrors = 0 - let numSignatures = 0 - let numPending = 0 - expect(Object.keys(status.signers)).to.have.lengthOf(signers.length, 'Should have all signers') - for (const signer of signers) { - expect(status.signers).to.have.property(signer.address) - const signerStatus = status.signers[signer.address] - - if (signerStatus.state === SignerState.ERROR) { - numErrors++ - } - - if (isSignerStatusPending(signerStatus)) { - numPending++ - } - - if (signerStatus.state === SignerState.SIGNED) { - numSignatures++ - } - } - - callbackCallsA++ - - expect(numErrors).to.be.equal(0, 'No errors should be present') - expect(numSignatures).to.be.equal(Math.max(callbackCallsA, 3), 'Should have max 3 signatures') - expect(numPending).to.be.equal(Math.min(signers.length - callbackCallsA, 0), 'Should have 0 pending') - }) - - let callbackCallsB = 0 - await orchestrator.signMessage({ - message: '0x1234', - callback: () => { - callbackCallsB++ - return false - } - }) - - // 3 updates + 1 final - expect(callbackCallsA).to.be.equal(4) - - // only the 3 updates - expect(callbackCallsB).to.be.equal(3) - }) - - it('getSigners should return all signers', async () => { - const signers = new Array(10).fill(0).map(() => ethers.Wallet.createRandom()) - const orchestrator = new Orchestrator(signers) - const result = await orchestrator.getSigners() - expect(result).to.have.lengthOf(signers.length) - for (const signer of signers) { - expect(result).to.include(signer.address) - } - }) - - it('setSigners should update the signers', async () => { - const signers = new Array(10).fill(0).map(() => ethers.Wallet.createRandom()) - const orchestrator = new Orchestrator(signers) - - const newSigners = new Array(22).fill(0).map(() => ethers.Wallet.createRandom()) - orchestrator.setSigners(newSigners) - const result = await orchestrator.getSigners() - expect(result).to.have.lengthOf(newSigners.length) - for (const signer of newSigners) { - expect(result).to.include(signer.address) - } - }) - - it('exception on signer should be interpreted as error', async () => { - const brokenSignerEOA = ethers.Wallet.createRandom() - const brokenSigner: SapientSigner = { - getAddress: async function (): Promise { - return brokenSignerEOA.address - }, - buildDeployTransaction(metadata) { - throw new Error('This is a broken signer.') - }, - async predecorateSignedTransactions(_metadata: object): Promise { - throw new Error('This is a broken signer.') - }, - decorateTransactions( - bundle: commons.transaction.IntendedTransactionBundle, - metadata: object - ): Promise { - throw new Error('This is a broken signer.') - }, - sign(_message, _metadata) { - throw new Error('This is a broken signer.') - }, - notifyStatusChange: function (id: string, status: Status): void {}, - suffix: function () { - return new Uint8Array([2]) - } - } - - const signers = [ethers.Wallet.createRandom(), brokenSigner, ethers.Wallet.createRandom()] - - const orchestrator = new Orchestrator(signers) - - let callbackCallsA = 0 - orchestrator.subscribe(async status => { - // Status should have all signers - let numErrors = 0 - let numSignatures = 0 - let numPending = 0 - - expect(Object.keys(status.signers)).to.have.lengthOf(signers.length) - - for (const signer of signers) { - expect(status.signers).to.have.property(await signer.getAddress()) - const signerStatus = status.signers[await signer.getAddress()] - - if (signerStatus.state === SignerState.ERROR) { - numErrors++ - } - - if (isSignerStatusPending(signerStatus)) { - numPending++ - } - - if (signerStatus.state === SignerState.SIGNED) { - numSignatures++ - } - } - - callbackCallsA++ - - expect(numErrors).to.be.equal(1) - expect(numSignatures).to.be.equal(2) - expect(numPending).to.be.equal(0) - }) - - const signature = await orchestrator.signMessage({ message: '0x1234' }) - expect(Object.keys(signature.signers)).to.have.lengthOf(2) - - for (const signer of signers) { - const address = await signer.getAddress() - const status = signature.signers[address] - - if (address === (await brokenSigner.getAddress())) { - if (status.state === SignerState.ERROR) { - expect(status.error.message).to.contain('This is a broken signer.') - } else { - expect.fail('Signer should be rejected') - } - } else { - expect(status.state === SignerState.SIGNED).to.be.true - } - } - }) - - it('Should manually reject a request', async () => { - const rejectSignerEOA = ethers.Wallet.createRandom() - const rejectSigner: SapientSigner = { - getAddress: async function (): Promise { - return rejectSignerEOA.address - }, - buildDeployTransaction(metadata) { - throw new Error('This is a reject signer.') - }, - async predecorateSignedTransactions(_metadata: object): Promise { - throw new Error('This is a reject signer.') - }, - decorateTransactions( - bundle: commons.transaction.IntendedTransactionBundle, - metadata: object - ): Promise { - throw new Error('This is a rejected signer.') - }, - async sign(_message, _metadata) { - throw new Error('This is a rejected signer.') - }, - notifyStatusChange: function (id: string, status: Status): void {}, - suffix: function () { - return new Uint8Array([2]) - } - } - - const signers = [ethers.Wallet.createRandom(), rejectSigner] - - const orchestrator = new Orchestrator(signers) - - let callbackCallsA = 0 - orchestrator.subscribe(() => { - callbackCallsA++ - }) - - const signature = await orchestrator.signMessage({ message: '0x1234' }) - expect(Object.keys(signature.signers)).to.have.lengthOf(signers.length) - - for (const signer of signers) { - const address = await signer.getAddress() - const status = signature.signers[address] - - if (address === (await rejectSigner.getAddress())) { - if (status.state === SignerState.ERROR) { - expect(status.error.message).to.contain('This is a rejected signer.') - } else { - expect.fail('Signer should be rejected') - } - } else { - expect(status.state === SignerState.SIGNED).to.be.true - } - } - }) - - it('Should pass the correct message to the signer', async () => { - const ogMessage = ethers.randomBytes(99) - const signer: SapientSigner = { - getAddress: async function (): Promise { - return '0x1234' - }, - buildDeployTransaction(metadata) { - return Promise.resolve(undefined) - }, - predecorateSignedTransactions(_metadata: object): Promise { - return Promise.resolve([]) - }, - decorateTransactions( - bundle: commons.transaction.IntendedTransactionBundle, - metadata: object - ): Promise { - return Promise.resolve(bundle) - }, - async sign(message, _metadata) { - expect(message).to.be.equal(ogMessage) - return '0x5678' - }, - notifyStatusChange: function (id: string, status: Status): void {}, - suffix: function () { - return new Uint8Array([2]) - } - } - - const orchestrator = new Orchestrator([signer]) - const signature = await orchestrator.signMessage({ message: ogMessage }) - - expect((signature.signers['0x1234'] as any).signature).to.be.equal('0x5678') - }) - - it('Should pass metadata to signer', async () => { - const ogMessage = ethers.randomBytes(99) - const signer: SapientSigner = { - getAddress: async function (): Promise { - return '0x1234' - }, - buildDeployTransaction(metadata) { - return Promise.resolve(undefined) - }, - predecorateSignedTransactions(_metadata: object): Promise { - return Promise.resolve([]) - }, - decorateTransactions( - bundle: commons.transaction.IntendedTransactionBundle, - metadata: object - ): Promise { - return Promise.resolve(bundle) - }, - async sign(_message, metadata) { - expect(metadata).to.be.deep.equal({ test: 'test' }) - return '0x5678' - }, - notifyStatusChange: function (id: string, status: Status): void {}, - suffix: function () { - return new Uint8Array([2]) - } - } - - const orchestrator = new Orchestrator([signer]) - const signature = await orchestrator.signMessage({ message: ogMessage, metadata: { test: 'test' } }) - - expect((signature.signers['0x1234'] as any).signature).to.be.equal('0x5678') - }) - - it('Should pass updated metadata to signer', async () => { - const ogMessage = ethers.randomBytes(99) - - let firstCall = true - let errorOnNotify: any = undefined - - const signer1: SapientSigner = { - getAddress: async function (): Promise { - return '0x1234' - }, - buildDeployTransaction(metadata) { - return Promise.resolve(undefined) - }, - predecorateSignedTransactions(_metadata: object): Promise { - return Promise.resolve([]) - }, - decorateTransactions( - bundle: commons.transaction.IntendedTransactionBundle, - metadata: object - ): Promise { - return Promise.resolve(bundle) - }, - async sign(_message, metadata) { - expect(metadata).to.be.deep.equal({ test: 'test' }) - return '0x5678' - }, - notifyStatusChange: function (id: string, status: Status, metadata: object): void { - try { - if (firstCall) { - expect(metadata).to.be.deep.equal({ test: 'test' }) - } else { - expect(metadata).to.be.deep.equal({ hello: 'world' }) - } - } catch (e) { - errorOnNotify = e - } - }, - suffix: function () { - return new Uint8Array([2]) - } - } - - const signer2: SapientSigner = { - getAddress: async function (): Promise { - return '0x5678' - }, - buildDeployTransaction(metadata) { - return Promise.resolve(undefined) - }, - predecorateSignedTransactions(_metadata: object): Promise { - return Promise.resolve([]) - }, - decorateTransactions( - bundle: commons.transaction.IntendedTransactionBundle, - metadata: object - ): Promise { - return Promise.resolve(bundle) - }, - async sign(_message, metadata) { - expect(metadata).to.be.deep.equal({ test: 'test' }) - return '0x9012' - }, - notifyStatusChange: function (id: string, status: Status, metadata: object): void { - try { - if (firstCall) { - expect(metadata).to.be.deep.equal({ test: 'test' }) - } else { - expect(metadata).to.be.deep.equal({ hello: 'world' }) - } - } catch (e) { - errorOnNotify = e - } - }, - suffix: function () { - return new Uint8Array([2]) - } - } - - const orchestrator = new Orchestrator([signer1, signer2]) - const signature = await orchestrator.signMessage({ - message: ogMessage, - metadata: { test: 'test' }, - callback: (s: Status, onNewMetadata: (metadata: object) => void) => { - if (firstCall) { - firstCall = false - onNewMetadata({ hello: 'world' }) - return false - } - - return true - } - }) - - expect((signature.signers['0x1234'] as any).signature).to.be.equal('0x5678') - expect((signature.signers['0x5678'] as any).signature).to.be.equal('0x9012') - if (errorOnNotify) throw errorOnNotify - }) - - it('Should auto-generate random tag', () => { - const orchestrator1 = new Orchestrator([]) - const orchestrator2 = new Orchestrator([]) - - expect(orchestrator1.tag).to.not.be.equal(orchestrator2.tag) - }) - - it('Should only sign with candidates', async () => { - const message = ethers.randomBytes(99) - - const signer1 = ethers.Wallet.createRandom() - const signer2 = ethers.Wallet.createRandom() - const signer3 = ethers.Wallet.createRandom() - const signer4 = ethers.Wallet.createRandom() - - const orchestrator = new Orchestrator([signer1, signer2, signer3, signer4]) - - const result = await orchestrator.signMessage({ - message: message, - candidates: [signer1.address, signer3.address] - }) - - expect(result.signers[signer1.address]).to.not.be.undefined - expect(result.signers[signer2.address]).to.be.undefined - expect(result.signers[signer3.address]).to.not.be.undefined - expect(result.signers[signer4.address]).to.be.undefined - }) - }) - describe('decorateTransactions', () => { - it('Repeatedly decorate a bundle', async () => { - const signer: SapientSigner = { - getAddress: async function (): Promise { - return '0x1' - }, - async buildDeployTransaction(metadata: object) { - return undefined - }, - async predecorateSignedTransactions(_metadata: object): Promise { - return [] - }, - async decorateTransactions( - bundle: commons.transaction.IntendedTransactionBundle, - metadata: object - ): Promise { - // Add a transaction on each call - bundle.transactions.push({ - to: 'to' - }) - return bundle - }, - sign(_message, _metadata) { - throw new Error('unreachable') - }, - notifyStatusChange: function (id: string, status: Status): void {}, - suffix: function () { - return new Uint8Array([0]) - } - } - - const orchestrator = new Orchestrator([signer, signer, signer]) - const bundle: commons.transaction.IntendedTransactionBundle = { - intent: { - id: '', - wallet: '' - }, - chainId: 0, - transactions: [], - entrypoint: '' - } - - const output = await orchestrator.decorateTransactions(bundle) - - expect(output?.transactions.length).to.be.equal(3) - }) - }) - - describe('buildDeployTransaction', () => { - it('Should create a combined bundle', async () => { - const signer1: SapientSigner = { - getAddress: async function (): Promise { - return '0x1' - }, - async buildDeployTransaction(metadata: object) { - return { - entrypoint: 'entrypoint1', - transactions: [ - { - to: 'to1', - data: 'data1' - } - ] - } - }, - async predecorateSignedTransactions(_metadata: object): Promise { - return [] - }, - async decorateTransactions( - bundle: commons.transaction.IntendedTransactionBundle, - metadata: object - ): Promise { - return bundle - }, - sign(_message, _metadata) { - throw new Error('unreachable') - }, - notifyStatusChange: function (id: string, status: Status): void {}, - suffix: function () { - return new Uint8Array([0]) - } - } - const signer2: SapientSigner = { - getAddress: async function (): Promise { - return '0x2' - }, - async buildDeployTransaction(metadata: object) { - return { - entrypoint: 'entrypoint2', - transactions: [ - { - to: 'to2', - data: 'data2' - } - ] - } - }, - async predecorateSignedTransactions(_metadata: object): Promise { - return [] - }, - async decorateTransactions( - bundle: commons.transaction.IntendedTransactionBundle - ): Promise { - return bundle - }, - sign(_message, _metadata) { - throw new Error('unreachable') - }, - notifyStatusChange: function (id: string, status: Status): void {}, - suffix: function () { - return new Uint8Array([0]) - } - } - - const orchestrator = new Orchestrator([signer1, signer2]) - const bundle = await orchestrator.buildDeployTransaction({}) - - expect(bundle?.transactions.length).to.be.equal(2) - }) - }) -}) diff --git a/old/packages/tests/CHANGELOG.md b/old/packages/tests/CHANGELOG.md deleted file mode 100644 index e22cc3843..000000000 --- a/old/packages/tests/CHANGELOG.md +++ /dev/null @@ -1,1597 +0,0 @@ -# @0xsequence/tests - -## 2.3.8 - -### Patch Changes - -- indexer: update clients -- Updated dependencies - - @0xsequence/core@2.3.8 - - @0xsequence/utils@2.3.8 - -## 2.3.7 - -### Patch Changes - -- Metadata updates -- Updated dependencies - - @0xsequence/core@2.3.7 - - @0xsequence/utils@2.3.7 - -## 2.3.6 - -### Patch Changes - -- New chains -- Updated dependencies - - @0xsequence/core@2.3.6 - - @0xsequence/utils@2.3.6 - -## 2.3.5 - -### Patch Changes - -- Add Frequency Testnet -- Updated dependencies - - @0xsequence/core@2.3.5 - - @0xsequence/utils@2.3.5 - -## 2.3.4 - -### Patch Changes - -- metadata: exclude deprecated methods on rpc client -- Updated dependencies - - @0xsequence/core@2.3.4 - - @0xsequence/utils@2.3.4 - -## 2.3.3 - -### Patch Changes - -- metadata: client update -- Updated dependencies - - @0xsequence/core@2.3.3 - - @0xsequence/utils@2.3.3 - -## 2.3.2 - -### Patch Changes - -- metadata: update rpc client -- Updated dependencies - - @0xsequence/core@2.3.2 - - @0xsequence/utils@2.3.2 - -## 2.3.1 - -### Patch Changes - -- indexer: update rpc client -- Updated dependencies - - @0xsequence/core@2.3.1 - - @0xsequence/utils@2.3.1 - -## 2.3.0 - -### Minor Changes - -- update metadata rpc client - -### Patch Changes - -- Updated dependencies - - @0xsequence/core@2.3.0 - - @0xsequence/utils@2.3.0 - -## 2.2.15 - -### Patch Changes - -- API updates -- Updated dependencies - - @0xsequence/core@2.2.15 - - @0xsequence/utils@2.2.15 - -## 2.2.14 - -### Patch Changes - -- Somnia Testnet and Monad Testnet -- Updated dependencies - - @0xsequence/core@2.2.14 - - @0xsequence/utils@2.2.14 - -## 2.2.13 - -### Patch Changes - -- Add XR1 to all networks -- Updated dependencies - - @0xsequence/core@2.2.13 - - @0xsequence/utils@2.2.13 - -## 2.2.12 - -### Patch Changes - -- Add XR1 -- Updated dependencies - - @0xsequence/core@2.2.12 - - @0xsequence/utils@2.2.12 - -## 2.2.11 - -### Patch Changes - -- Relayer updates -- Updated dependencies - - @0xsequence/core@2.2.11 - - @0xsequence/utils@2.2.11 - -## 2.2.10 - -### Patch Changes - -- Etherlink support -- Updated dependencies - - @0xsequence/core@2.2.10 - - @0xsequence/utils@2.2.10 - -## 2.2.9 - -### Patch Changes - -- Indexer gateway native token balances -- Updated dependencies - - @0xsequence/core@2.2.9 - - @0xsequence/utils@2.2.9 - -## 2.2.8 - -### Patch Changes - -- Add Moonbeam and Moonbase Alpha -- Updated dependencies - - @0xsequence/core@2.2.8 - - @0xsequence/utils@2.2.8 - -## 2.2.7 - -### Patch Changes - -- Update Builder package -- Updated dependencies - - @0xsequence/core@2.2.7 - - @0xsequence/utils@2.2.7 - -## 2.2.6 - -### Patch Changes - -- Update relayer package -- Updated dependencies - - @0xsequence/core@2.2.6 - - @0xsequence/utils@2.2.6 - -## 2.2.5 - -### Patch Changes - -- auth: fix sequence indexer gateway url -- account: immutable wallet proxy hook -- Updated dependencies -- Updated dependencies - - @0xsequence/core@2.2.5 - - @0xsequence/utils@2.2.5 - -## 2.2.4 - -### Patch Changes - -- network: update soneium mainnet block explorer url -- waas: signTypedData intent support -- Updated dependencies -- Updated dependencies - - @0xsequence/core@2.2.4 - - @0xsequence/utils@2.2.4 - -## 2.2.3 - -### Patch Changes - -- provider: updating initWallet to use connected network configs if they exist -- Updated dependencies - - @0xsequence/core@2.2.3 - - @0xsequence/utils@2.2.3 - -## 2.2.2 - -### Patch Changes - -- pass projectAccessKey to relayer at all times -- Updated dependencies - - @0xsequence/core@2.2.2 - - @0xsequence/utils@2.2.2 - -## 2.2.1 - -### Patch Changes - -- waas-ethers: sign typed data -- Updated dependencies - - @0xsequence/core@2.2.1 - - @0xsequence/utils@2.2.1 - -## 2.2.0 - -### Minor Changes - -- indexer: gateway client -- @0xsequence/builder -- upgrade puppeteer to v23.10.3 - -### Patch Changes - -- Updated dependencies -- Updated dependencies -- Updated dependencies - - @0xsequence/core@2.2.0 - - @0xsequence/utils@2.2.0 - -## 2.1.8 - -### Patch Changes - -- Add Soneium Mainnet -- Updated dependencies - - @0xsequence/core@2.1.8 - - @0xsequence/utils@2.1.8 - -## 2.1.7 - -### Patch Changes - -- guard: pass project access key to guard requests -- Updated dependencies - - @0xsequence/core@2.1.7 - - @0xsequence/utils@2.1.7 - -## 2.1.6 - -### Patch Changes - -- Add LAOS and Telos Testnet chains -- Updated dependencies - - @0xsequence/core@2.1.6 - - @0xsequence/utils@2.1.6 - -## 2.1.5 - -### Patch Changes - -- account: save presigned configuration with reference chain id 1 -- Updated dependencies - - @0xsequence/core@2.1.5 - - @0xsequence/utils@2.1.5 - -## 2.1.4 - -### Patch Changes - -- provider: pass projectAccessKey into MuxMessageProvider -- Updated dependencies - - @0xsequence/core@2.1.4 - - @0xsequence/utils@2.1.4 - -## 2.1.3 - -### Patch Changes - -- waas: time drift date fix due to strange browser quirk -- Updated dependencies - - @0xsequence/core@2.1.3 - - @0xsequence/utils@2.1.3 - -## 2.1.2 - -### Patch Changes - -- provider: export analytics correctly -- Updated dependencies - - @0xsequence/core@2.1.2 - - @0xsequence/utils@2.1.2 - -## 2.1.1 - -### Patch Changes - -- Add LAOS chain support -- Updated dependencies - - @0xsequence/core@2.1.1 - - @0xsequence/utils@2.1.1 - -## 2.1.0 - -### Minor Changes - -- account: forward project access key when estimating fees and sending transactions - -### Patch Changes - -- sessions: save signatures with reference chain id -- Updated dependencies -- Updated dependencies - - @0xsequence/core@2.1.0 - - @0xsequence/utils@2.1.0 - -## 2.0.26 - -### Patch Changes - -- account: fix chain id comparison -- Updated dependencies - - @0xsequence/core@2.0.26 - - @0xsequence/utils@2.0.26 - -## 2.0.25 - -### Patch Changes - -- skale-nebula: deploy gas limit = 10m -- Updated dependencies - - @0xsequence/core@2.0.25 - - @0xsequence/utils@2.0.25 - -## 2.0.24 - -### Patch Changes - -- sessions: arweave: configurable gateway url -- waas: use /status to get time drift before sending any intents -- Updated dependencies -- Updated dependencies - - @0xsequence/core@2.0.24 - - @0xsequence/utils@2.0.24 - -## 2.0.23 - -### Patch Changes - -- Add The Root Network support -- Updated dependencies - - @0xsequence/core@2.0.23 - - @0xsequence/utils@2.0.23 - -## 2.0.22 - -### Patch Changes - -- Add SKALE Nebula Mainnet support -- Updated dependencies - - @0xsequence/core@2.0.22 - - @0xsequence/utils@2.0.22 - -## 2.0.21 - -### Patch Changes - -- account: add publishWitnessFor -- Updated dependencies - - @0xsequence/core@2.0.21 - - @0xsequence/utils@2.0.21 - -## 2.0.20 - -### Patch Changes - -- upgrade deps, and improve waas session status handling -- Updated dependencies - - @0xsequence/core@2.0.20 - - @0xsequence/utils@2.0.20 - -## 2.0.19 - -### Patch Changes - -- Add Immutable zkEVM support -- Updated dependencies - - @0xsequence/core@2.0.19 - - @0xsequence/utils@2.0.19 - -## 2.0.18 - -### Patch Changes - -- waas: new contractCall transaction type -- sessions: add arweave owner -- Updated dependencies -- Updated dependencies - - @0xsequence/core@2.0.18 - - @0xsequence/utils@2.0.18 - -## 2.0.17 - -### Patch Changes - -- update waas auth to clear session before signIn -- Updated dependencies - - @0xsequence/core@2.0.17 - - @0xsequence/utils@2.0.17 - -## 2.0.16 - -### Patch Changes - -- Removed Astar chains -- Updated dependencies - - @0xsequence/core@2.0.16 - - @0xsequence/utils@2.0.16 - -## 2.0.15 - -### Patch Changes - -- indexer: update bindings with token balance additions -- Updated dependencies - - @0xsequence/core@2.0.15 - - @0xsequence/utils@2.0.15 - -## 2.0.14 - -### Patch Changes - -- sessions: arweave config reader -- network: add b3 and apechain mainnet configs -- Updated dependencies -- Updated dependencies - - @0xsequence/core@2.0.14 - - @0xsequence/utils@2.0.14 - -## 2.0.13 - -### Patch Changes - -- network: toy-testnet -- Updated dependencies - - @0xsequence/core@2.0.13 - - @0xsequence/utils@2.0.13 - -## 2.0.12 - -### Patch Changes - -- api: update bindings -- Updated dependencies - - @0xsequence/core@2.0.12 - - @0xsequence/utils@2.0.12 - -## 2.0.11 - -### Patch Changes - -- waas: intents test fix -- api: update bindings -- Updated dependencies -- Updated dependencies - - @0xsequence/core@2.0.11 - - @0xsequence/utils@2.0.11 - -## 2.0.10 - -### Patch Changes - -- network: soneium minato testnet -- Updated dependencies - - @0xsequence/core@2.0.10 - - @0xsequence/utils@2.0.10 - -## 2.0.9 - -### Patch Changes - -- network: fix SKALE network name -- Updated dependencies - - @0xsequence/core@2.0.9 - - @0xsequence/utils@2.0.9 - -## 2.0.8 - -### Patch Changes - -- metadata: update bindings -- Updated dependencies - - @0xsequence/core@2.0.8 - - @0xsequence/utils@2.0.8 - -## 2.0.7 - -### Patch Changes - -- wallet request handler fix -- Updated dependencies - - @0xsequence/core@2.0.7 - - @0xsequence/utils@2.0.7 - -## 2.0.6 - -### Patch Changes - -- network: matic -> pol -- Updated dependencies - - @0xsequence/core@2.0.6 - - @0xsequence/utils@2.0.6 - -## 2.0.5 - -### Patch Changes - -- provider: update databeat to 0.9.2 -- Updated dependencies - - @0xsequence/core@2.0.5 - - @0xsequence/utils@2.0.5 - -## 2.0.4 - -### Patch Changes - -- network: add skale-nebula-testnet -- Updated dependencies - - @0xsequence/core@2.0.4 - - @0xsequence/utils@2.0.4 - -## 2.0.3 - -### Patch Changes - -- waas: check session status in SequenceWaaS.isSignedIn() -- Updated dependencies - - @0xsequence/core@2.0.3 - - @0xsequence/utils@2.0.3 - -## 2.0.2 - -### Patch Changes - -- sessions: property convert serialized bignumber hex value to bigint -- Updated dependencies - - @0xsequence/core@2.0.2 - - @0xsequence/utils@2.0.2 - -## 2.0.1 - -### Patch Changes - -- waas: http signature check for authenticator requests -- provider: unwrap legacy json rpc responses -- use json replacer and reviver for bigints -- Updated dependencies -- Updated dependencies -- Updated dependencies - - @0xsequence/core@2.0.1 - - @0xsequence/utils@2.0.1 - -## 2.0.0 - -### Major Changes - -- ethers v6 - -### Patch Changes - -- Updated dependencies - - @0xsequence/core@2.0.0 - - @0xsequence/utils@2.0.0 - -## 1.10.15 - -### Patch Changes - -- utils: extractProjectIdFromAccessKey -- Updated dependencies - - @0xsequence/core@1.10.15 - -## 1.10.14 - -### Patch Changes - -- network: add borne-testnet to allNetworks -- Updated dependencies - - @0xsequence/core@1.10.14 - -## 1.10.13 - -### Patch Changes - -- network: add borne testnet -- Updated dependencies - - @0xsequence/core@1.10.13 - -## 1.10.12 - -### Patch Changes - -- api: update bindings -- global/window -> globalThis -- Updated dependencies -- Updated dependencies - - @0xsequence/core@1.10.12 - -## 1.10.11 - -### Patch Changes - -- waas: updated intent.gen without webrpc types, errors exported from authenticator.gen -- Updated dependencies - - @0xsequence/core@1.10.11 - -## 1.10.10 - -### Patch Changes - -- metadata: update bindings with new contract collections api -- Updated dependencies - - @0xsequence/core@1.10.10 - -## 1.10.9 - -### Patch Changes - -- waas minor update -- Updated dependencies - - @0xsequence/core@1.10.9 - -## 1.10.8 - -### Patch Changes - -- update metadata bindings -- Updated dependencies - - @0xsequence/core@1.10.8 - -## 1.10.7 - -### Patch Changes - -- minor fixes to waas client -- Updated dependencies - - @0xsequence/core@1.10.7 - -## 1.10.6 - -### Patch Changes - -- metadata: update bindings -- Updated dependencies - - @0xsequence/core@1.10.6 - -## 1.10.5 - -### Patch Changes - -- network: ape-chain-testnet -> apechain-testnet -- Updated dependencies - - @0xsequence/core@1.10.5 - -## 1.10.4 - -### Patch Changes - -- network: add b3-sepolia, ape-chain-testnet, blast, blast-sepolia -- Updated dependencies - - @0xsequence/core@1.10.4 - -## 1.10.3 - -### Patch Changes - -- typing fix -- Updated dependencies - - @0xsequence/core@1.10.3 - -## 1.10.2 - -### Patch Changes - -- - waas: add getIdToken method - - indexer: update api client -- Updated dependencies - - @0xsequence/core@1.10.2 - -## 1.10.1 - -### Patch Changes - -- metadata: update bindings -- Updated dependencies - - @0xsequence/core@1.10.1 - -## 1.10.0 - -### Minor Changes - -- waas release v1.3.0 - -### Patch Changes - -- Updated dependencies - - @0xsequence/core@1.10.0 - -## 1.9.37 - -### Patch Changes - -- network: adds nativeToken data to NetworkMetadata constants -- Updated dependencies - - @0xsequence/core@1.9.37 - -## 1.9.36 - -### Patch Changes - -- guard: export client -- Updated dependencies - - @0xsequence/core@1.9.36 - -## 1.9.35 - -### Patch Changes - -- guard: update bindings -- Updated dependencies - - @0xsequence/core@1.9.35 - -## 1.9.34 - -### Patch Changes - -- waas: always use lowercase email -- Updated dependencies - - @0xsequence/core@1.9.34 - -## 1.9.33 - -### Patch Changes - -- waas: umd build -- Updated dependencies - - @0xsequence/core@1.9.33 - -## 1.9.32 - -### Patch Changes - -- indexer: update bindings -- Updated dependencies - - @0xsequence/core@1.9.32 - -## 1.9.31 - -### Patch Changes - -- metadata: token directory changes -- Updated dependencies - - @0xsequence/core@1.9.31 - -## 1.9.30 - -### Patch Changes - -- update -- Updated dependencies - - @0xsequence/core@1.9.30 - -## 1.9.29 - -### Patch Changes - -- disable gnosis chain -- Updated dependencies - - @0xsequence/core@1.9.29 - -## 1.9.28 - -### Patch Changes - -- add utils/merkletree -- Updated dependencies - - @0xsequence/core@1.9.28 - -## 1.9.27 - -### Patch Changes - -- network: optimistic -> optimism -- waas: remove defaults -- api, sessions: update bindings -- Updated dependencies -- Updated dependencies -- Updated dependencies - - @0xsequence/core@1.9.27 - -## 1.9.26 - -### Patch Changes - -- - add backend interfaces for pluggable interfaces - - introduce @0xsequence/react-native - - update pnpm to lockfile v9 -- Updated dependencies - - @0xsequence/core@1.9.26 - -## 1.9.25 - -### Patch Changes - -- update webrpc clients with new error types -- Updated dependencies - - @0xsequence/core@1.9.25 - -## 1.9.24 - -### Patch Changes - -- waas: add memoryStore backend to localStore -- Updated dependencies - - @0xsequence/core@1.9.24 - -## 1.9.23 - -### Patch Changes - -- update api client bindings -- Updated dependencies - - @0xsequence/core@1.9.23 - -## 1.9.22 - -### Patch Changes - -- update metadata client bindings -- Updated dependencies - - @0xsequence/core@1.9.22 - -## 1.9.21 - -### Patch Changes - -- api client bindings -- Updated dependencies - - @0xsequence/core@1.9.21 - -## 1.9.20 - -### Patch Changes - -- api client bindings update -- Updated dependencies - - @0xsequence/core@1.9.20 - -## 1.9.19 - -### Patch Changes - -- waas update -- Updated dependencies - - @0xsequence/core@1.9.19 - -## 1.9.18 - -### Patch Changes - -- provider: prohibit dangerous functions -- Updated dependencies - - @0xsequence/core@1.9.18 - -## 1.9.17 - -### Patch Changes - -- network: add xr-sepolia -- Updated dependencies - - @0xsequence/core@1.9.17 - -## 1.9.16 - -### Patch Changes - -- waas: sequence.feeOptions -- Updated dependencies - - @0xsequence/core@1.9.16 - -## 1.9.15 - -### Patch Changes - -- metadata: collection external_link field name fix -- Updated dependencies - - @0xsequence/core@1.9.15 - -## 1.9.14 - -### Patch Changes - -- network: astar-zkatana -> astar-zkyoto -- network: deprecate polygon mumbai network -- network: add xai and polygon amoy -- Updated dependencies -- Updated dependencies -- Updated dependencies - - @0xsequence/core@1.9.14 - -## 1.9.13 - -### Patch Changes - -- waas: fix @0xsequence/network dependency -- Updated dependencies - - @0xsequence/core@1.9.13 - -## 1.9.12 - -### Patch Changes - -- indexer: update rpc bindings -- provider: signMessage: Serialize the BytesLike or string message into hexstring before sending -- waas: SessionAuthProof -- Updated dependencies -- Updated dependencies -- Updated dependencies - - @0xsequence/core@1.9.12 - -## 1.9.11 - -### Patch Changes - -- metdata, update rpc bindings -- Updated dependencies - - @0xsequence/core@1.9.11 - -## 1.9.10 - -### Patch Changes - -- update metadata rpc bindings -- Updated dependencies - - @0xsequence/core@1.9.10 - -## 1.9.9 - -### Patch Changes - -- metadata, add SequenceCollections rpc client -- Updated dependencies - - @0xsequence/core@1.9.9 - -## 1.9.8 - -### Patch Changes - -- waas client update -- Updated dependencies - - @0xsequence/core@1.9.8 - -## 1.9.7 - -### Patch Changes - -- update rpc client bindings for api, metadata and relayer -- Updated dependencies - - @0xsequence/core@1.9.7 - -## 1.9.6 - -### Patch Changes - -- waas package update -- Updated dependencies - - @0xsequence/core@1.9.6 - -## 1.9.5 - -### Patch Changes - -- RpcRelayer prioritize project access key -- Updated dependencies - - @0xsequence/core@1.9.5 - -## 1.9.4 - -### Patch Changes - -- waas: fix network dependency -- Updated dependencies - - @0xsequence/core@1.9.4 - -## 1.9.3 - -### Patch Changes - -- provider: don't append access key to RPC url if user has already provided it -- Updated dependencies - - @0xsequence/core@1.9.3 - -## 1.9.2 - -### Patch Changes - -- network: add xai-sepolia -- Updated dependencies - - @0xsequence/core@1.9.2 - -## 1.9.1 - -### Patch Changes - -- analytics fix -- Updated dependencies - - @0xsequence/core@1.9.1 - -## 1.9.0 - -### Minor Changes - -- waas release - -### Patch Changes - -- Updated dependencies - - @0xsequence/core@1.9.0 - -## 1.8.8 - -### Patch Changes - -- update metadata bindings -- Updated dependencies - - @0xsequence/core@1.8.8 - -## 1.8.7 - -### Patch Changes - -- provider: update databeat to 0.9.1 -- Updated dependencies - - @0xsequence/core@1.8.7 - -## 1.8.6 - -### Patch Changes - -- guard: SignedOwnershipProof -- Updated dependencies - - @0xsequence/core@1.8.6 - -## 1.8.5 - -### Patch Changes - -- guard: signOwnershipProof and isSignedOwnershipProof -- Updated dependencies - - @0xsequence/core@1.8.5 - -## 1.8.4 - -### Patch Changes - -- network: add homeverse to networks list -- Updated dependencies - - @0xsequence/core@1.8.4 - -## 1.8.3 - -### Patch Changes - -- api: introduce basic linked wallet support -- Updated dependencies - - @0xsequence/core@1.8.3 - -## 1.8.2 - -### Patch Changes - -- provider: don't initialize analytics unless explicitly requested -- Updated dependencies - - @0xsequence/core@1.8.2 - -## 1.8.1 - -### Patch Changes - -- update to analytics provider -- Updated dependencies - - @0xsequence/core@1.8.1 - -## 1.8.0 - -### Minor Changes - -- provider: project analytics - -### Patch Changes - -- Updated dependencies - - @0xsequence/core@1.8.0 - -## 1.7.2 - -### Patch Changes - -- 0xsequence: ChainId should not be exported as a type -- account, wallet: fix nonce selection -- Updated dependencies -- Updated dependencies - - @0xsequence/core@1.7.2 - -## 1.7.1 - -### Patch Changes - -- network: add missing avalanche logoURI -- Updated dependencies - - @0xsequence/core@1.7.1 - -## 1.7.0 - -### Minor Changes - -- provider: projectAccessKey is now required - -### Patch Changes - -- network: add NetworkMetadata.logoURI property for all networks -- Updated dependencies -- Updated dependencies - - @0xsequence/core@1.7.0 - -## 1.6.3 - -### Patch Changes - -- network list update -- Updated dependencies - - @0xsequence/core@1.6.3 - -## 1.6.2 - -### Patch Changes - -- auth: projectAccessKey option -- wallet: use 12 bytes for random space -- Updated dependencies -- Updated dependencies - - @0xsequence/core@1.6.2 - -## 1.6.1 - -### Patch Changes - -- core: add simple config from subdigest support -- core: fix encode tree with subdigest -- account: implement buildOnChainSignature on Account -- Updated dependencies -- Updated dependencies -- Updated dependencies - - @0xsequence/core@1.6.1 - -## 1.6.0 - -### Minor Changes - -- account, wallet: parallel transactions by default - -### Patch Changes - -- provider: emit disconnect on sign out -- Updated dependencies -- Updated dependencies - - @0xsequence/core@1.6.0 - -## 1.5.0 - -### Minor Changes - -- signhub: add 'signing' signer status - -### Patch Changes - -- auth: Session.open: onAccountAddress callback -- account: allow empty transaction bundles -- Updated dependencies -- Updated dependencies -- Updated dependencies - - @0xsequence/core@1.5.0 - -## 1.4.9 - -### Patch Changes - -- rename SequenceMetadataClient to SequenceMetadata -- Updated dependencies - - @0xsequence/core@1.4.9 - -## 1.4.8 - -### Patch Changes - -- account: Account.getSigners -- Updated dependencies - - @0xsequence/core@1.4.8 - -## 1.4.7 - -### Patch Changes - -- update indexer client bindings -- Updated dependencies - - @0xsequence/core@1.4.7 - -## 1.4.6 - -### Patch Changes - -- - add sepolia networks, mark goerli as deprecated - - update indexer client bindings -- Updated dependencies - - @0xsequence/core@1.4.6 - -## 1.4.5 - -### Patch Changes - -- indexer/metadata: update client bindings -- auth: selectWallet with new address -- Updated dependencies -- Updated dependencies - - @0xsequence/core@1.4.5 - -## 1.4.4 - -### Patch Changes - -- indexer: update bindings -- auth: handle jwt expiry -- Updated dependencies -- Updated dependencies - - @0xsequence/core@1.4.4 - -## 1.4.3 - -### Patch Changes - -- guard: return active status from GuardSigner.getAuthMethods -- Updated dependencies - - @0xsequence/core@1.4.3 - -## 1.4.2 - -### Patch Changes - -- guard: update bindings -- Updated dependencies - - @0xsequence/core@1.4.2 - -## 1.4.1 - -### Patch Changes - -- network: remove unused networks -- signhub: orchestrator interface -- guard: auth methods interface -- guard: update bindings for pin and totp -- guard: no more retry logic -- Updated dependencies -- Updated dependencies -- Updated dependencies -- Updated dependencies -- Updated dependencies - - @0xsequence/core@1.4.1 - -## 1.4.0 - -### Minor Changes - -- project access key support - -### Patch Changes - -- Updated dependencies - - @0xsequence/core@1.4.0 - -## 1.3.0 - -### Minor Changes - -- signhub: account children - -### Patch Changes - -- guard: do not throw when building deploy transaction -- network: snowtrace.io -> subnets.avax.network/c-chain -- Updated dependencies -- Updated dependencies -- Updated dependencies - - @0xsequence/core@1.3.0 - -## 1.2.9 - -### Patch Changes - -- account: AccountSigner.sendTransaction simulateForFeeOptions -- relayer: update bindings -- Updated dependencies -- Updated dependencies - - @0xsequence/core@1.2.9 - -## 1.2.8 - -### Patch Changes - -- rename X-Sequence-Token-Key header to X-Access-Key -- Updated dependencies - - @0xsequence/core@1.2.8 - -## 1.2.7 - -### Patch Changes - -- add x-sequence-token-key to clients -- Updated dependencies - - @0xsequence/core@1.2.7 - -## 1.2.6 - -### Patch Changes - -- Fix bind multicall provider -- Updated dependencies - - @0xsequence/core@1.2.6 - -## 1.2.5 - -### Patch Changes - -- Multicall default configuration fixes -- Updated dependencies - - @0xsequence/core@1.2.5 - -## 1.2.4 - -### Patch Changes - -- provider: Adding missing payment provider types to PaymentProviderOption -- provider: WalletRequestHandler.notifyChainChanged -- Updated dependencies -- Updated dependencies - - @0xsequence/core@1.2.4 - -## 1.2.3 - -### Patch Changes - -- auth, provider: connect to accept optional authorizeNonce -- Updated dependencies - - @0xsequence/core@1.2.3 - -## 1.2.2 - -### Patch Changes - -- provider: allow createContract calls -- core: check for explicit zero address in contract deployments -- Updated dependencies -- Updated dependencies - - @0xsequence/core@1.2.2 - -## 1.2.1 - -### Patch Changes - -- auth: use sequence api chain id as reference chain id if available -- Updated dependencies - - @0xsequence/core@1.2.1 - -## 1.2.0 - -### Minor Changes - -- split services from session, better local support - -### Patch Changes - -- Updated dependencies - - @0xsequence/core@1.2.0 - -## 1.1.15 - -### Patch Changes - -- guard: remove error filtering -- Updated dependencies - - @0xsequence/core@1.1.15 - -## 1.1.14 - -### Patch Changes - -- guard: add GuardSigner.onError -- Updated dependencies - - @0xsequence/core@1.1.14 - -## 1.1.13 - -### Patch Changes - -- provider: pass client version with connect options -- provider: removing large from BannerSize -- Updated dependencies -- Updated dependencies - - @0xsequence/core@1.1.13 - -## 1.1.12 - -### Patch Changes - -- provider: adding bannerSize to ConnectOptions -- Updated dependencies - - @0xsequence/core@1.1.12 - -## 1.1.11 - -### Patch Changes - -- add homeverse configs -- Updated dependencies - - @0xsequence/core@1.1.11 - -## 1.1.10 - -### Patch Changes - -- handle default EIP6492 on send -- Updated dependencies - - @0xsequence/core@1.1.10 - -## 1.1.9 - -### Patch Changes - -- Custom default EIP6492 on client -- Updated dependencies - - @0xsequence/core@1.1.9 - -## 1.1.8 - -### Patch Changes - -- metadata: searchMetadata: add types filter -- Updated dependencies - - @0xsequence/core@1.1.8 - -## 1.1.7 - -### Patch Changes - -- adding signInWith connect settings option to allow dapps to automatically login their users with a certain provider optimizing the normal authentication flow -- Updated dependencies - - @0xsequence/core@1.1.7 - -## 1.1.6 - -### Patch Changes - -- metadata: searchMetadata: add chainID and excludeTokenMetadata filters -- Updated dependencies - - @0xsequence/core@1.1.6 - -## 1.1.5 - -### Patch Changes - -- account: re-compute meta-transaction id for wallet deployment transactions -- Updated dependencies - - @0xsequence/core@1.1.5 - -## 1.1.4 - -### Patch Changes - -- network: rename base-mainnet to base -- provider: override isDefaultChain with ConnectOptions.networkId if provided -- Updated dependencies -- Updated dependencies - - @0xsequence/core@1.1.4 - -## 1.1.3 - -### Patch Changes - -- provider: use network id from transport session -- provider: sign authorization using ConnectOptions.networkId if provided -- Updated dependencies -- Updated dependencies - - @0xsequence/core@1.1.3 - -## 1.1.2 - -### Patch Changes - -- provider: jsonrpc chain id fixes -- Updated dependencies - - @0xsequence/core@1.1.2 - -## 1.1.1 - -### Patch Changes - -- network: add base mainnet and sepolia -- provider: reject toxic transaction requests -- Updated dependencies -- Updated dependencies - - @0xsequence/core@1.1.1 - -## 1.1.0 - -### Minor Changes - -- Refactor dapp facing provider - -### Patch Changes - -- Updated dependencies - - @0xsequence/core@1.1.0 - -## 1.0.5 - -### Patch Changes - -- network: export network constants -- guard: use the correct global for fetch -- network: nova-explorer.arbitrum.io -> nova.arbiscan.io -- Updated dependencies -- Updated dependencies -- Updated dependencies - - @0xsequence/core@1.0.5 - -## 1.0.4 - -### Patch Changes - -- provider: accept name or number for networkId -- Updated dependencies - - @0xsequence/core@1.0.4 - -## 1.0.3 - -### Patch Changes - -- Simpler isValidSignature helpers -- Updated dependencies - - @0xsequence/core@1.0.3 - -## 1.0.2 - -### Patch Changes - -- add extra signature validation utils methods -- Updated dependencies - - @0xsequence/core@1.0.2 - -## 1.0.1 - -### Patch Changes - -- add homeverse testnet -- Updated dependencies - - @0xsequence/core@1.0.1 - -## 1.0.0 - -### Major Changes - -- https://sequence.xyz/blog/sequence-wallet-light-state-sync-full-merkle-wallets - -### Patch Changes - -- Updated dependencies - - @0xsequence/core@1.0.0 diff --git a/old/packages/tests/package.json b/old/packages/tests/package.json deleted file mode 100644 index d9eba77ce..000000000 --- a/old/packages/tests/package.json +++ /dev/null @@ -1,30 +0,0 @@ -{ - "name": "@0xsequence/tests", - "version": "2.3.8", - "description": "test tools for sequence.js", - "repository": "https://github.com/0xsequence/sequence.js/tree/master/packages/tests", - "source": "src/index.ts", - "main": "dist/0xsequence-tests.cjs.js", - "module": "dist/0xsequence-tests.esm.js", - "author": "Horizon Blockchain Games", - "license": "Apache-2.0", - "scripts": { - "test": "echo 'no tests for test tools'" - }, - "peerDependencies": { - "ethers": ">=6" - }, - "dependencies": { - "@0xsequence/core": "workspace:*", - "@0xsequence/utils": "workspace:*" - }, - "devDependencies": { - "@istanbuljs/nyc-config-typescript": "^1.0.1", - "ethers": "6.13.4", - "web3": "^1.8.1" - }, - "files": [ - "src", - "dist" - ] -} diff --git a/old/packages/tests/src/builds/artifact.ts b/old/packages/tests/src/builds/artifact.ts deleted file mode 100644 index bb210f5e7..000000000 --- a/old/packages/tests/src/builds/artifact.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { ethers } from 'ethers' - -export type Artifact = { - contractName: string - sourceName: string - abi: ethers.InterfaceAbi - bytecode: string - deployedBytecode: string -} diff --git a/old/packages/tests/src/builds/index.ts b/old/packages/tests/src/builds/index.ts deleted file mode 100644 index 53e4b6eec..000000000 --- a/old/packages/tests/src/builds/index.ts +++ /dev/null @@ -1,4 +0,0 @@ -export * as v1 from './v1' -export * as v2 from './v2' - -export * from './artifact' diff --git a/old/packages/tests/src/builds/v1/artifacts/Factory.ts b/old/packages/tests/src/builds/v1/artifacts/Factory.ts deleted file mode 100644 index e776e8c41..000000000 --- a/old/packages/tests/src/builds/v1/artifacts/Factory.ts +++ /dev/null @@ -1,37 +0,0 @@ -export const factory = { - _format: 'hh-sol-artifact-1', - contractName: 'Factory', - sourceName: 'contracts/Factory.sol', - abi: [ - { - inputs: [ - { - internalType: 'address', - name: '_mainModule', - type: 'address' - }, - { - internalType: 'bytes32', - name: '_salt', - type: 'bytes32' - } - ], - name: 'deploy', - outputs: [ - { - internalType: 'address', - name: '_contract', - type: 'address' - } - ], - stateMutability: 'payable', - type: 'function' - } - ], - bytecode: - '0x608060405234801561001057600080fd5b506101c8806100206000396000f3fe60806040526004361061001e5760003560e01c806332c02a1414610023575b600080fd5b61005c6004803603604081101561003957600080fd5b5073ffffffffffffffffffffffffffffffffffffffff8135169060200135610085565b6040805173ffffffffffffffffffffffffffffffffffffffff9092168252519081900360200190f35b60008060405180606001604052806028815260200161016b602891398473ffffffffffffffffffffffffffffffffffffffff166040516020018083805190602001908083835b6020831061010857805182527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe090920191602091820191016100cb565b51815160209384036101000a7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0180199092169116179052920193845250604080518085038152938201905282519294508693508401905034f594935050505056fe603a600e3d39601a805130553df3363d3d373d3d3d363d30545af43d82803e903d91601857fd5bf3a26469706673582212209b0bce93afab3297b9ebf4e58fa642ef123d74bcbd3bdb4e48b662eb12b430ca64736f6c63430007060033', - deployedBytecode: - '0x60806040526004361061001e5760003560e01c806332c02a1414610023575b600080fd5b61005c6004803603604081101561003957600080fd5b5073ffffffffffffffffffffffffffffffffffffffff8135169060200135610085565b6040805173ffffffffffffffffffffffffffffffffffffffff9092168252519081900360200190f35b60008060405180606001604052806028815260200161016b602891398473ffffffffffffffffffffffffffffffffffffffff166040516020018083805190602001908083835b6020831061010857805182527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe090920191602091820191016100cb565b51815160209384036101000a7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0180199092169116179052920193845250604080518085038152938201905282519294508693508401905034f594935050505056fe603a600e3d39601a805130553df3363d3d373d3d3d363d30545af43d82803e903d91601857fd5bf3a26469706673582212209b0bce93afab3297b9ebf4e58fa642ef123d74bcbd3bdb4e48b662eb12b430ca64736f6c63430007060033', - linkReferences: {}, - deployedLinkReferences: {} -} diff --git a/old/packages/tests/src/builds/v1/artifacts/GuestModule.ts b/old/packages/tests/src/builds/v1/artifacts/GuestModule.ts deleted file mode 100644 index d6bccbbe4..000000000 --- a/old/packages/tests/src/builds/v1/artifacts/GuestModule.ts +++ /dev/null @@ -1,295 +0,0 @@ -export const guestModule = { - _format: 'hh-sol-artifact-1', - contractName: 'GuestModule', - sourceName: 'contracts/modules/GuestModule.sol', - abi: [ - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: 'address', - name: '_contract', - type: 'address' - } - ], - name: 'CreatedContract', - type: 'event' - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: 'uint256', - name: '_space', - type: 'uint256' - }, - { - indexed: false, - internalType: 'uint256', - name: '_newNonce', - type: 'uint256' - } - ], - name: 'NonceChange', - type: 'event' - }, - { - anonymous: true, - inputs: [ - { - indexed: false, - internalType: 'bytes32', - name: '_tx', - type: 'bytes32' - } - ], - name: 'TxExecuted', - type: 'event' - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: 'bytes32', - name: '_tx', - type: 'bytes32' - }, - { - indexed: false, - internalType: 'bytes', - name: '_reason', - type: 'bytes' - } - ], - name: 'TxFailed', - type: 'event' - }, - { - inputs: [ - { - internalType: 'bytes', - name: '_code', - type: 'bytes' - } - ], - name: 'createContract', - outputs: [ - { - internalType: 'address', - name: 'addr', - type: 'address' - } - ], - stateMutability: 'payable', - type: 'function' - }, - { - inputs: [ - { - components: [ - { - internalType: 'bool', - name: 'delegateCall', - type: 'bool' - }, - { - internalType: 'bool', - name: 'revertOnError', - type: 'bool' - }, - { - internalType: 'uint256', - name: 'gasLimit', - type: 'uint256' - }, - { - internalType: 'address', - name: 'target', - type: 'address' - }, - { - internalType: 'uint256', - name: 'value', - type: 'uint256' - }, - { - internalType: 'bytes', - name: 'data', - type: 'bytes' - } - ], - internalType: 'struct IModuleCalls.Transaction[]', - name: '_txs', - type: 'tuple[]' - }, - { - internalType: 'uint256', - name: '', - type: 'uint256' - }, - { - internalType: 'bytes', - name: '', - type: 'bytes' - } - ], - name: 'execute', - outputs: [], - stateMutability: 'nonpayable', - type: 'function' - }, - { - inputs: [ - { - internalType: 'bytes32', - name: '_hash', - type: 'bytes32' - }, - { - internalType: 'bytes', - name: '_signatures', - type: 'bytes' - } - ], - name: 'isValidSignature', - outputs: [ - { - internalType: 'bytes4', - name: '', - type: 'bytes4' - } - ], - stateMutability: 'view', - type: 'function' - }, - { - inputs: [ - { - internalType: 'bytes', - name: '_data', - type: 'bytes' - }, - { - internalType: 'bytes', - name: '_signatures', - type: 'bytes' - } - ], - name: 'isValidSignature', - outputs: [ - { - internalType: 'bytes4', - name: '', - type: 'bytes4' - } - ], - stateMutability: 'view', - type: 'function' - }, - { - inputs: [], - name: 'nonce', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256' - } - ], - stateMutability: 'view', - type: 'function' - }, - { - inputs: [ - { - internalType: 'uint256', - name: '_space', - type: 'uint256' - } - ], - name: 'readNonce', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256' - } - ], - stateMutability: 'view', - type: 'function' - }, - { - inputs: [ - { - components: [ - { - internalType: 'bool', - name: 'delegateCall', - type: 'bool' - }, - { - internalType: 'bool', - name: 'revertOnError', - type: 'bool' - }, - { - internalType: 'uint256', - name: 'gasLimit', - type: 'uint256' - }, - { - internalType: 'address', - name: 'target', - type: 'address' - }, - { - internalType: 'uint256', - name: 'value', - type: 'uint256' - }, - { - internalType: 'bytes', - name: 'data', - type: 'bytes' - } - ], - internalType: 'struct IModuleCalls.Transaction[]', - name: '_txs', - type: 'tuple[]' - } - ], - name: 'selfExecute', - outputs: [], - stateMutability: 'nonpayable', - type: 'function' - }, - { - inputs: [ - { - internalType: 'bytes4', - name: '_interfaceID', - type: 'bytes4' - } - ], - name: 'supportsInterface', - outputs: [ - { - internalType: 'bool', - name: '', - type: 'bool' - } - ], - stateMutability: 'pure', - type: 'function' - } - ], - bytecode: - '0x608060405234801561001057600080fd5b50611ddc806100206000396000f3fe60806040526004361061007b5760003560e01c80637a9a16281161004e5780637a9a1628146101255780638c3f55631461014557806390042baf14610172578063affed0e0146101925761007b565b806301ffc9a7146100805780631626ba7e146100b657806320c13b0b146100e357806361c2926c14610103575b600080fd5b34801561008c57600080fd5b506100a061009b366004611677565b6101a7565b6040516100ad91906118be565b60405180910390f35b3480156100c257600080fd5b506100d66100d136600461162d565b6101ba565b6040516100ad91906118eb565b3480156100ef57600080fd5b506100d66100fe3660046116b7565b610233565b34801561010f57600080fd5b5061012361011e366004611590565b61028d565b005b34801561013157600080fd5b506101236101403660046115c3565b6102ce565b34801561015157600080fd5b50610165610160366004611753565b6102f6565b6040516100ad91906118c9565b610185610180366004611720565b610322565b6040516100ad919061189d565b34801561019e57600080fd5b506101656103d6565b60006101b2826103e7565b90505b919050565b60006102046101c885610444565b84848080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152506104a492505050565b1561022c57507f1626ba7e000000000000000000000000000000000000000000000000000000005b9392505050565b600061025d6101c88686604051808383808284376040519201829003909120935061044492505050565b1561028557507f20c13b0b000000000000000000000000000000000000000000000000000000005b949350505050565b60006102be826040516020016102a39190611a19565b60405160208183030381529060405280519060200120610444565b90506102ca818361069c565b5050565b60006102e4846040516020016102a39190611975565b90506102f0818561069c565b50505050565b60006101b27f8d0bf1fd623d628c741362c1289948e57b3e2905218c676d3e69abee36d6ae2e83610817565b600033301461037c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526027815260200180611d806027913960400191505060405180910390fd5b81516020830134f06040805173ffffffffffffffffffffffffffffffffffffffff8316815290519192507fa506ad4e7f05eceba62a023c3219e5bd98a615f4fa87e2afb08a2da5cf62bf0c919081900360200190a1919050565b60006103e260006102f6565b905090565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f90042baf00000000000000000000000000000000000000000000000000000000141561043b575060016101b5565b6101b282610844565b604080517f19010000000000000000000000000000000000000000000000000000000000006020808301919091524660228301523060601b6042830152605680830194909452825180830390940184526076909101909152815191012090565b60008060006104b2846108a1565b909250905061ffff821660005b855183101561067957600080806104d6898761090f565b975060ff918216945016915060018314156104fe576104f58987610990565b96509050610622565b8261052a57606061050f8a88610a08565b9750905061051d8b82610ab9565b9150828501945050610622565b60028314156105d15761053d8987610990565b96509050600061054d8a88610e43565b975061ffff16905060606105628b8984610eb4565b985090506105718c8483610fa3565b6105c6576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526032815260200180611c0b6032913960400191505060405180910390fd5b505092810192610622565b6040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602c815260200180611b28602c913960400191505060405180910390fd5b848282604051602001808481526020018381526020018273ffffffffffffffffffffffffffffffffffffffff16815260200193505050506040516020818303038152906040528051906020012094505050506104bf565b8361ffff1681101580156106915750610691826111eb565b979650505050505050565b60005b81518110156108125760008282815181106106b657fe5b6020026020010151905060006060826000015115610709576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610700906119bc565b60405180910390fd5b82604001515a1015610747576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161070090611918565b826060015173ffffffffffffffffffffffffffffffffffffffff168360800151846040015160001461077d57846040015161077f565b5a5b908560a001516040516107929190611881565b600060405180830381858888f193505050503d80600081146107d0576040519150601f19603f3d011682016040523d82523d6000602084013e6107d5565b606091505b50909250905081156107fc57856040516107ef91906118c9565b60405180910390a0610807565b6108078387836111f1565b50505060010161069f565b505050565b60408051602080820194909452808201929092528051808303820181526060909201905280519101205490565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f389901c7000000000000000000000000000000000000000000000000000000001415610898575060016101b5565b6101b282611241565b6020810151815160f09190911c9060029081111561090a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526027815260200180611b776027913960400191505060405180910390fd5b915091565b8082016020015160f881901c9060f01c60ff166002830183811161092f57fe5b8451811115610989576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526026815260200180611cdb6026913960400191505060405180910390fd5b9250925092565b8082016020015160601c601482018281116109a757fe5b8351811115610a01576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526023815260200180611b546023913960400191505060405180910390fd5b9250929050565b604080516042808252608082019092526060916000919060208201818036833701905050915082840160200180516020840152602081015160408401526022810151604284015250604283019050828111610a5f57fe5b8351811115610a01576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526023815260200180611c7c6023913960400191505060405180910390fd5b60008151604214610b15576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252603a815260200180611aee603a913960400191505060405180910390fd5b600082600184510381518110610b2757fe5b602001015160f81c60f81b60f81c60ff169050600083604081518110610b4957fe5b016020015160f81c90506000610b5f85826112c9565b90506000610b6e8660206112c9565b90507f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0811115610be9576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252603d815260200180611ab1603d913960400191505060405180910390fd5b8260ff16601b14158015610c0157508260ff16601c14155b15610c57576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252603d815260200180611b9e603d913960400191505060405180910390fd5b6001841415610ccb5760018784848460405160008152602001604052604051808581526020018460ff1681526020018381526020018281526020019450505050506020604051602081039080840390855afa158015610cba573d6000803e3d6000fd5b505050602060405103519450610dcd565b6002841415610d7c5760018760405160200180807f19457468657265756d205369676e6564204d6573736167653a0a333200000000815250601c018281526020019150506040516020818303038152906040528051906020012084848460405160008152602001604052604051808581526020018460ff1681526020018381526020018281526020019450505050506020604051602081039080840390855afa158015610cba573d6000803e3d6000fd5b6040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252603c815260200180611c9f603c913960400191505060405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff8516610e39576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526030815260200180611bdb6030913960400191505060405180910390fd5b5050505092915050565b8082016020015160f01c60028201828111610e5a57fe5b8351811115610a01576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526022815260200180611d226022913960400191505060405180910390fd5b606060008267ffffffffffffffff81118015610ecf57600080fd5b506040519080825280601f01601f191660200182016040528015610efa576020820181803683370190505b509150838501602001600060205b85811015610f2157908201518482015260208101610f08565b8486016020018051939092015190850152525082820183811015610f4157fe5b8451811115610f9b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526021815260200180611d016021913960400191505060405180910390fd5b935093915050565b60008082600184510381518110610fb657fe5b016020015160f81c90506001811480610fcf5750600281145b15611013578373ffffffffffffffffffffffffffffffffffffffff16610ff58685610ab9565b73ffffffffffffffffffffffffffffffffffffffff161491506111e3565b60038114156111925782517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff81018452604080517f1626ba7e000000000000000000000000000000000000000000000000000000008152600481018881526024820192835286516044830152865173ffffffffffffffffffffffffffffffffffffffff891693631626ba7e938b938a9390929160640190602085019080838360005b838110156110cd5781810151838201526020016110b5565b50505050905090810190601f1680156110fa5780820380516001836020036101000a031916815260200191505b50935050505060206040518083038186803b15801561111857600080fd5b505afa15801561112c573d6000803e3d6000fd5b505050506040513d602081101561114257600080fd5b50519084527fffffffff00000000000000000000000000000000000000000000000000000000167f1626ba7e000000000000000000000000000000000000000000000000000000001491506111e3565b6040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252603f815260200180611c3d603f913960400191505060405180910390fd5b509392505050565b50600190565b82602001511561120357805160208201fd5b7f3dbd1590ea96dd3253a91f24e64e3a502e1225d602a5731357bc12643070ccd782826040516112349291906118d2565b60405180910390a1505050565b60007fffffffff00000000000000000000000000000000000000000000000000000000821615806112b357507fffffffff0000000000000000000000000000000000000000000000000000000082167f36e7817500000000000000000000000000000000000000000000000000000000145b156112c0575060016101b5565b6101b282611331565b60008160200183511015611328576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252603c815260200180611d44603c913960400191505060405180910390fd5b50016020015190565b7fffffffff0000000000000000000000000000000000000000000000000000000081167f01ffc9a70000000000000000000000000000000000000000000000000000000014919050565b803573ffffffffffffffffffffffffffffffffffffffff811681146101b557600080fd5b600082601f8301126113af578081fd5b8135602067ffffffffffffffff808311156113c657fe5b6113d38283850201611a60565b83815282810190868401865b868110156114af578135890160c0807fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0838e0301121561141d57898afd5b604080518281018181108a8211171561143257fe5b825261143f848b016114bd565b815261144c8285016114bd565b8a820152606080850135838301526080925061146983860161137b565b9082015260a08481013583830152928401359289841115611488578c8dfd5b6114968f8c8688010161150d565b90820152875250505092850192908501906001016113df565b509098975050505050505050565b803580151581146101b557600080fd5b60008083601f8401126114de578182fd5b50813567ffffffffffffffff8111156114f5578182fd5b602083019150836020828501011115610a0157600080fd5b600082601f83011261151d578081fd5b813567ffffffffffffffff81111561153157fe5b61156260207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f84011601611a60565b818152846020838601011115611576578283fd5b816020850160208301379081016020019190915292915050565b6000602082840312156115a1578081fd5b813567ffffffffffffffff8111156115b7578182fd5b6102858482850161139f565b6000806000606084860312156115d7578182fd5b833567ffffffffffffffff808211156115ee578384fd5b6115fa8783880161139f565b9450602086013593506040860135915080821115611616578283fd5b506116238682870161150d565b9150509250925092565b600080600060408486031215611641578283fd5b83359250602084013567ffffffffffffffff81111561165e578283fd5b61166a868287016114cd565b9497909650939450505050565b600060208284031215611688578081fd5b81357fffffffff000000000000000000000000000000000000000000000000000000008116811461022c578182fd5b600080600080604085870312156116cc578081fd5b843567ffffffffffffffff808211156116e3578283fd5b6116ef888389016114cd565b90965094506020870135915080821115611707578283fd5b50611714878288016114cd565b95989497509550505050565b600060208284031215611731578081fd5b813567ffffffffffffffff811115611747578182fd5b6102858482850161150d565b600060208284031215611764578081fd5b5035919050565b60008282518085526020808601955080818302840101818601855b8481101561182a578583037fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe00189528151805115158452848101511515858501526040808201519085015260608082015173ffffffffffffffffffffffffffffffffffffffff16908501526080808201519085015260a09081015160c09185018290529061181681860183611837565b9a86019a9450505090830190600101611786565b5090979650505050505050565b6000815180845261184f816020860160208601611a84565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b60008251611893818460208701611a84565b9190910192915050565b73ffffffffffffffffffffffffffffffffffffffff91909116815260200190565b901515815260200190565b90815260200190565b6000838252604060208301526102856040830184611837565b7fffffffff0000000000000000000000000000000000000000000000000000000091909116815260200190565b60208082526029908201527f47756573744d6f64756c65235f6578656375746547756573743a204e4f545f4560408201527f4e4f5547485f4741530000000000000000000000000000000000000000000000606082015260800190565b600060408252600660408301527f67756573743a000000000000000000000000000000000000000000000000000060608301526080602083015261022c608083018461176b565b60208082526033908201527f47756573744d6f64756c65235f6578656375746547756573743a2064656c656760408201527f61746543616c6c206e6f7420616c6c6f77656400000000000000000000000000606082015260800190565b600060408252600560408301527f73656c663a00000000000000000000000000000000000000000000000000000060608301526080602083015261022c608083018461176b565b60405181810167ffffffffffffffff81118282101715611a7c57fe5b604052919050565b60005b83811015611a9f578181015183820152602001611a87565b838111156102f0575050600091015256fe5369676e617475726556616c696461746f72237265636f7665725369676e65723a20696e76616c6964207369676e6174757265202773272076616c75655369676e617475726556616c696461746f72237265636f7665725369676e65723a20696e76616c6964207369676e6174757265206c656e6774684d6f64756c6541757468235f7369676e617475726556616c69646174696f6e20494e56414c49445f464c41474c696242797465732372656164416464726573733a204f55545f4f465f424f554e44534c696242797465732372656164466972737455696e7431363a204f55545f4f465f424f554e44535369676e617475726556616c696461746f72237265636f7665725369676e65723a20696e76616c6964207369676e6174757265202776272076616c75655369676e617475726556616c696461746f72237265636f7665725369676e65723a20494e56414c49445f5349474e45524d6f64756c6541757468235f7369676e617475726556616c69646174696f6e3a20494e56414c49445f5349474e41545552455369676e617475726556616c696461746f7223697356616c69645369676e61747572653a20554e535550504f525445445f5349474e41545552455f545950454c696242797465732372656164427974657336363a204f55545f4f465f424f554e44535369676e617475726556616c696461746f72237265636f7665725369676e65723a20554e535550504f525445445f5349474e41545552455f545950454c69624279746573237265616455696e743855696e74383a204f55545f4f465f424f554e44534c69624279746573237265616442797465733a204f55545f4f465f424f554e44534c69624279746573237265616455696e7431363a204f55545f4f465f424f554e44534c696242797465732372656164427974657333323a20475245415445525f4f525f455155414c5f544f5f33325f4c454e4754485f52455155495245444d6f64756c6553656c6641757468236f6e6c7953656c663a204e4f545f415554484f52495a4544a2646970667358221220f5a1de0b650baa2ee828e8766bc6dbd0c74da0cc4735a143852d24f868e4b62464736f6c63430007060033', - deployedBytecode: - '0x60806040526004361061007b5760003560e01c80637a9a16281161004e5780637a9a1628146101255780638c3f55631461014557806390042baf14610172578063affed0e0146101925761007b565b806301ffc9a7146100805780631626ba7e146100b657806320c13b0b146100e357806361c2926c14610103575b600080fd5b34801561008c57600080fd5b506100a061009b366004611677565b6101a7565b6040516100ad91906118be565b60405180910390f35b3480156100c257600080fd5b506100d66100d136600461162d565b6101ba565b6040516100ad91906118eb565b3480156100ef57600080fd5b506100d66100fe3660046116b7565b610233565b34801561010f57600080fd5b5061012361011e366004611590565b61028d565b005b34801561013157600080fd5b506101236101403660046115c3565b6102ce565b34801561015157600080fd5b50610165610160366004611753565b6102f6565b6040516100ad91906118c9565b610185610180366004611720565b610322565b6040516100ad919061189d565b34801561019e57600080fd5b506101656103d6565b60006101b2826103e7565b90505b919050565b60006102046101c885610444565b84848080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152506104a492505050565b1561022c57507f1626ba7e000000000000000000000000000000000000000000000000000000005b9392505050565b600061025d6101c88686604051808383808284376040519201829003909120935061044492505050565b1561028557507f20c13b0b000000000000000000000000000000000000000000000000000000005b949350505050565b60006102be826040516020016102a39190611a19565b60405160208183030381529060405280519060200120610444565b90506102ca818361069c565b5050565b60006102e4846040516020016102a39190611975565b90506102f0818561069c565b50505050565b60006101b27f8d0bf1fd623d628c741362c1289948e57b3e2905218c676d3e69abee36d6ae2e83610817565b600033301461037c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526027815260200180611d806027913960400191505060405180910390fd5b81516020830134f06040805173ffffffffffffffffffffffffffffffffffffffff8316815290519192507fa506ad4e7f05eceba62a023c3219e5bd98a615f4fa87e2afb08a2da5cf62bf0c919081900360200190a1919050565b60006103e260006102f6565b905090565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f90042baf00000000000000000000000000000000000000000000000000000000141561043b575060016101b5565b6101b282610844565b604080517f19010000000000000000000000000000000000000000000000000000000000006020808301919091524660228301523060601b6042830152605680830194909452825180830390940184526076909101909152815191012090565b60008060006104b2846108a1565b909250905061ffff821660005b855183101561067957600080806104d6898761090f565b975060ff918216945016915060018314156104fe576104f58987610990565b96509050610622565b8261052a57606061050f8a88610a08565b9750905061051d8b82610ab9565b9150828501945050610622565b60028314156105d15761053d8987610990565b96509050600061054d8a88610e43565b975061ffff16905060606105628b8984610eb4565b985090506105718c8483610fa3565b6105c6576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526032815260200180611c0b6032913960400191505060405180910390fd5b505092810192610622565b6040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602c815260200180611b28602c913960400191505060405180910390fd5b848282604051602001808481526020018381526020018273ffffffffffffffffffffffffffffffffffffffff16815260200193505050506040516020818303038152906040528051906020012094505050506104bf565b8361ffff1681101580156106915750610691826111eb565b979650505050505050565b60005b81518110156108125760008282815181106106b657fe5b6020026020010151905060006060826000015115610709576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610700906119bc565b60405180910390fd5b82604001515a1015610747576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161070090611918565b826060015173ffffffffffffffffffffffffffffffffffffffff168360800151846040015160001461077d57846040015161077f565b5a5b908560a001516040516107929190611881565b600060405180830381858888f193505050503d80600081146107d0576040519150601f19603f3d011682016040523d82523d6000602084013e6107d5565b606091505b50909250905081156107fc57856040516107ef91906118c9565b60405180910390a0610807565b6108078387836111f1565b50505060010161069f565b505050565b60408051602080820194909452808201929092528051808303820181526060909201905280519101205490565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f389901c7000000000000000000000000000000000000000000000000000000001415610898575060016101b5565b6101b282611241565b6020810151815160f09190911c9060029081111561090a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526027815260200180611b776027913960400191505060405180910390fd5b915091565b8082016020015160f881901c9060f01c60ff166002830183811161092f57fe5b8451811115610989576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526026815260200180611cdb6026913960400191505060405180910390fd5b9250925092565b8082016020015160601c601482018281116109a757fe5b8351811115610a01576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526023815260200180611b546023913960400191505060405180910390fd5b9250929050565b604080516042808252608082019092526060916000919060208201818036833701905050915082840160200180516020840152602081015160408401526022810151604284015250604283019050828111610a5f57fe5b8351811115610a01576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526023815260200180611c7c6023913960400191505060405180910390fd5b60008151604214610b15576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252603a815260200180611aee603a913960400191505060405180910390fd5b600082600184510381518110610b2757fe5b602001015160f81c60f81b60f81c60ff169050600083604081518110610b4957fe5b016020015160f81c90506000610b5f85826112c9565b90506000610b6e8660206112c9565b90507f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0811115610be9576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252603d815260200180611ab1603d913960400191505060405180910390fd5b8260ff16601b14158015610c0157508260ff16601c14155b15610c57576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252603d815260200180611b9e603d913960400191505060405180910390fd5b6001841415610ccb5760018784848460405160008152602001604052604051808581526020018460ff1681526020018381526020018281526020019450505050506020604051602081039080840390855afa158015610cba573d6000803e3d6000fd5b505050602060405103519450610dcd565b6002841415610d7c5760018760405160200180807f19457468657265756d205369676e6564204d6573736167653a0a333200000000815250601c018281526020019150506040516020818303038152906040528051906020012084848460405160008152602001604052604051808581526020018460ff1681526020018381526020018281526020019450505050506020604051602081039080840390855afa158015610cba573d6000803e3d6000fd5b6040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252603c815260200180611c9f603c913960400191505060405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff8516610e39576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526030815260200180611bdb6030913960400191505060405180910390fd5b5050505092915050565b8082016020015160f01c60028201828111610e5a57fe5b8351811115610a01576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526022815260200180611d226022913960400191505060405180910390fd5b606060008267ffffffffffffffff81118015610ecf57600080fd5b506040519080825280601f01601f191660200182016040528015610efa576020820181803683370190505b509150838501602001600060205b85811015610f2157908201518482015260208101610f08565b8486016020018051939092015190850152525082820183811015610f4157fe5b8451811115610f9b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526021815260200180611d016021913960400191505060405180910390fd5b935093915050565b60008082600184510381518110610fb657fe5b016020015160f81c90506001811480610fcf5750600281145b15611013578373ffffffffffffffffffffffffffffffffffffffff16610ff58685610ab9565b73ffffffffffffffffffffffffffffffffffffffff161491506111e3565b60038114156111925782517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff81018452604080517f1626ba7e000000000000000000000000000000000000000000000000000000008152600481018881526024820192835286516044830152865173ffffffffffffffffffffffffffffffffffffffff891693631626ba7e938b938a9390929160640190602085019080838360005b838110156110cd5781810151838201526020016110b5565b50505050905090810190601f1680156110fa5780820380516001836020036101000a031916815260200191505b50935050505060206040518083038186803b15801561111857600080fd5b505afa15801561112c573d6000803e3d6000fd5b505050506040513d602081101561114257600080fd5b50519084527fffffffff00000000000000000000000000000000000000000000000000000000167f1626ba7e000000000000000000000000000000000000000000000000000000001491506111e3565b6040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252603f815260200180611c3d603f913960400191505060405180910390fd5b509392505050565b50600190565b82602001511561120357805160208201fd5b7f3dbd1590ea96dd3253a91f24e64e3a502e1225d602a5731357bc12643070ccd782826040516112349291906118d2565b60405180910390a1505050565b60007fffffffff00000000000000000000000000000000000000000000000000000000821615806112b357507fffffffff0000000000000000000000000000000000000000000000000000000082167f36e7817500000000000000000000000000000000000000000000000000000000145b156112c0575060016101b5565b6101b282611331565b60008160200183511015611328576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252603c815260200180611d44603c913960400191505060405180910390fd5b50016020015190565b7fffffffff0000000000000000000000000000000000000000000000000000000081167f01ffc9a70000000000000000000000000000000000000000000000000000000014919050565b803573ffffffffffffffffffffffffffffffffffffffff811681146101b557600080fd5b600082601f8301126113af578081fd5b8135602067ffffffffffffffff808311156113c657fe5b6113d38283850201611a60565b83815282810190868401865b868110156114af578135890160c0807fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0838e0301121561141d57898afd5b604080518281018181108a8211171561143257fe5b825261143f848b016114bd565b815261144c8285016114bd565b8a820152606080850135838301526080925061146983860161137b565b9082015260a08481013583830152928401359289841115611488578c8dfd5b6114968f8c8688010161150d565b90820152875250505092850192908501906001016113df565b509098975050505050505050565b803580151581146101b557600080fd5b60008083601f8401126114de578182fd5b50813567ffffffffffffffff8111156114f5578182fd5b602083019150836020828501011115610a0157600080fd5b600082601f83011261151d578081fd5b813567ffffffffffffffff81111561153157fe5b61156260207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f84011601611a60565b818152846020838601011115611576578283fd5b816020850160208301379081016020019190915292915050565b6000602082840312156115a1578081fd5b813567ffffffffffffffff8111156115b7578182fd5b6102858482850161139f565b6000806000606084860312156115d7578182fd5b833567ffffffffffffffff808211156115ee578384fd5b6115fa8783880161139f565b9450602086013593506040860135915080821115611616578283fd5b506116238682870161150d565b9150509250925092565b600080600060408486031215611641578283fd5b83359250602084013567ffffffffffffffff81111561165e578283fd5b61166a868287016114cd565b9497909650939450505050565b600060208284031215611688578081fd5b81357fffffffff000000000000000000000000000000000000000000000000000000008116811461022c578182fd5b600080600080604085870312156116cc578081fd5b843567ffffffffffffffff808211156116e3578283fd5b6116ef888389016114cd565b90965094506020870135915080821115611707578283fd5b50611714878288016114cd565b95989497509550505050565b600060208284031215611731578081fd5b813567ffffffffffffffff811115611747578182fd5b6102858482850161150d565b600060208284031215611764578081fd5b5035919050565b60008282518085526020808601955080818302840101818601855b8481101561182a578583037fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe00189528151805115158452848101511515858501526040808201519085015260608082015173ffffffffffffffffffffffffffffffffffffffff16908501526080808201519085015260a09081015160c09185018290529061181681860183611837565b9a86019a9450505090830190600101611786565b5090979650505050505050565b6000815180845261184f816020860160208601611a84565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b60008251611893818460208701611a84565b9190910192915050565b73ffffffffffffffffffffffffffffffffffffffff91909116815260200190565b901515815260200190565b90815260200190565b6000838252604060208301526102856040830184611837565b7fffffffff0000000000000000000000000000000000000000000000000000000091909116815260200190565b60208082526029908201527f47756573744d6f64756c65235f6578656375746547756573743a204e4f545f4560408201527f4e4f5547485f4741530000000000000000000000000000000000000000000000606082015260800190565b600060408252600660408301527f67756573743a000000000000000000000000000000000000000000000000000060608301526080602083015261022c608083018461176b565b60208082526033908201527f47756573744d6f64756c65235f6578656375746547756573743a2064656c656760408201527f61746543616c6c206e6f7420616c6c6f77656400000000000000000000000000606082015260800190565b600060408252600560408301527f73656c663a00000000000000000000000000000000000000000000000000000060608301526080602083015261022c608083018461176b565b60405181810167ffffffffffffffff81118282101715611a7c57fe5b604052919050565b60005b83811015611a9f578181015183820152602001611a87565b838111156102f0575050600091015256fe5369676e617475726556616c696461746f72237265636f7665725369676e65723a20696e76616c6964207369676e6174757265202773272076616c75655369676e617475726556616c696461746f72237265636f7665725369676e65723a20696e76616c6964207369676e6174757265206c656e6774684d6f64756c6541757468235f7369676e617475726556616c69646174696f6e20494e56414c49445f464c41474c696242797465732372656164416464726573733a204f55545f4f465f424f554e44534c696242797465732372656164466972737455696e7431363a204f55545f4f465f424f554e44535369676e617475726556616c696461746f72237265636f7665725369676e65723a20696e76616c6964207369676e6174757265202776272076616c75655369676e617475726556616c696461746f72237265636f7665725369676e65723a20494e56414c49445f5349474e45524d6f64756c6541757468235f7369676e617475726556616c69646174696f6e3a20494e56414c49445f5349474e41545552455369676e617475726556616c696461746f7223697356616c69645369676e61747572653a20554e535550504f525445445f5349474e41545552455f545950454c696242797465732372656164427974657336363a204f55545f4f465f424f554e44535369676e617475726556616c696461746f72237265636f7665725369676e65723a20554e535550504f525445445f5349474e41545552455f545950454c69624279746573237265616455696e743855696e74383a204f55545f4f465f424f554e44534c69624279746573237265616442797465733a204f55545f4f465f424f554e44534c69624279746573237265616455696e7431363a204f55545f4f465f424f554e44534c696242797465732372656164427974657333323a20475245415445525f4f525f455155414c5f544f5f33325f4c454e4754485f52455155495245444d6f64756c6553656c6641757468236f6e6c7953656c663a204e4f545f415554484f52495a4544a2646970667358221220f5a1de0b650baa2ee828e8766bc6dbd0c74da0cc4735a143852d24f868e4b62464736f6c63430007060033', - linkReferences: {}, - deployedLinkReferences: {} -} diff --git a/old/packages/tests/src/builds/v1/artifacts/MainModule.ts b/old/packages/tests/src/builds/v1/artifacts/MainModule.ts deleted file mode 100644 index 89c3c4dd4..000000000 --- a/old/packages/tests/src/builds/v1/artifacts/MainModule.ts +++ /dev/null @@ -1,528 +0,0 @@ -export const mainModule = { - _format: 'hh-sol-artifact-1', - contractName: 'MainModule', - sourceName: 'contracts/modules/MainModule.sol', - abi: [ - { - inputs: [ - { - internalType: 'address', - name: '_factory', - type: 'address' - } - ], - stateMutability: 'nonpayable', - type: 'constructor' - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: 'address', - name: '_contract', - type: 'address' - } - ], - name: 'CreatedContract', - type: 'event' - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: 'address', - name: 'newImplementation', - type: 'address' - } - ], - name: 'ImplementationUpdated', - type: 'event' - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: 'uint256', - name: '_space', - type: 'uint256' - }, - { - indexed: false, - internalType: 'uint256', - name: '_newNonce', - type: 'uint256' - } - ], - name: 'NonceChange', - type: 'event' - }, - { - anonymous: true, - inputs: [ - { - indexed: false, - internalType: 'bytes32', - name: '_tx', - type: 'bytes32' - } - ], - name: 'TxExecuted', - type: 'event' - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: 'bytes32', - name: '_tx', - type: 'bytes32' - }, - { - indexed: false, - internalType: 'bytes', - name: '_reason', - type: 'bytes' - } - ], - name: 'TxFailed', - type: 'event' - }, - { - stateMutability: 'payable', - type: 'fallback' - }, - { - inputs: [], - name: 'FACTORY', - outputs: [ - { - internalType: 'address', - name: '', - type: 'address' - } - ], - stateMutability: 'view', - type: 'function' - }, - { - inputs: [], - name: 'INIT_CODE_HASH', - outputs: [ - { - internalType: 'bytes32', - name: '', - type: 'bytes32' - } - ], - stateMutability: 'view', - type: 'function' - }, - { - inputs: [ - { - internalType: 'bytes4', - name: '_signature', - type: 'bytes4' - }, - { - internalType: 'address', - name: '_implementation', - type: 'address' - } - ], - name: 'addHook', - outputs: [], - stateMutability: 'nonpayable', - type: 'function' - }, - { - inputs: [ - { - internalType: 'bytes', - name: '_code', - type: 'bytes' - } - ], - name: 'createContract', - outputs: [ - { - internalType: 'address', - name: 'addr', - type: 'address' - } - ], - stateMutability: 'payable', - type: 'function' - }, - { - inputs: [ - { - components: [ - { - internalType: 'bool', - name: 'delegateCall', - type: 'bool' - }, - { - internalType: 'bool', - name: 'revertOnError', - type: 'bool' - }, - { - internalType: 'uint256', - name: 'gasLimit', - type: 'uint256' - }, - { - internalType: 'address', - name: 'target', - type: 'address' - }, - { - internalType: 'uint256', - name: 'value', - type: 'uint256' - }, - { - internalType: 'bytes', - name: 'data', - type: 'bytes' - } - ], - internalType: 'struct IModuleCalls.Transaction[]', - name: '_txs', - type: 'tuple[]' - }, - { - internalType: 'uint256', - name: '_nonce', - type: 'uint256' - }, - { - internalType: 'bytes', - name: '_signature', - type: 'bytes' - } - ], - name: 'execute', - outputs: [], - stateMutability: 'nonpayable', - type: 'function' - }, - { - inputs: [ - { - internalType: 'bytes32', - name: '_hash', - type: 'bytes32' - }, - { - internalType: 'bytes', - name: '_signatures', - type: 'bytes' - } - ], - name: 'isValidSignature', - outputs: [ - { - internalType: 'bytes4', - name: '', - type: 'bytes4' - } - ], - stateMutability: 'view', - type: 'function' - }, - { - inputs: [ - { - internalType: 'bytes', - name: '_data', - type: 'bytes' - }, - { - internalType: 'bytes', - name: '_signatures', - type: 'bytes' - } - ], - name: 'isValidSignature', - outputs: [ - { - internalType: 'bytes4', - name: '', - type: 'bytes4' - } - ], - stateMutability: 'view', - type: 'function' - }, - { - inputs: [], - name: 'nonce', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256' - } - ], - stateMutability: 'view', - type: 'function' - }, - { - inputs: [ - { - internalType: 'address', - name: '', - type: 'address' - }, - { - internalType: 'address', - name: '', - type: 'address' - }, - { - internalType: 'uint256[]', - name: '', - type: 'uint256[]' - }, - { - internalType: 'uint256[]', - name: '', - type: 'uint256[]' - }, - { - internalType: 'bytes', - name: '', - type: 'bytes' - } - ], - name: 'onERC1155BatchReceived', - outputs: [ - { - internalType: 'bytes4', - name: '', - type: 'bytes4' - } - ], - stateMutability: 'nonpayable', - type: 'function' - }, - { - inputs: [ - { - internalType: 'address', - name: '', - type: 'address' - }, - { - internalType: 'address', - name: '', - type: 'address' - }, - { - internalType: 'uint256', - name: '', - type: 'uint256' - }, - { - internalType: 'uint256', - name: '', - type: 'uint256' - }, - { - internalType: 'bytes', - name: '', - type: 'bytes' - } - ], - name: 'onERC1155Received', - outputs: [ - { - internalType: 'bytes4', - name: '', - type: 'bytes4' - } - ], - stateMutability: 'nonpayable', - type: 'function' - }, - { - inputs: [ - { - internalType: 'address', - name: '', - type: 'address' - }, - { - internalType: 'address', - name: '', - type: 'address' - }, - { - internalType: 'uint256', - name: '', - type: 'uint256' - }, - { - internalType: 'bytes', - name: '', - type: 'bytes' - } - ], - name: 'onERC721Received', - outputs: [ - { - internalType: 'bytes4', - name: '', - type: 'bytes4' - } - ], - stateMutability: 'nonpayable', - type: 'function' - }, - { - inputs: [ - { - internalType: 'bytes4', - name: '_signature', - type: 'bytes4' - } - ], - name: 'readHook', - outputs: [ - { - internalType: 'address', - name: '', - type: 'address' - } - ], - stateMutability: 'view', - type: 'function' - }, - { - inputs: [ - { - internalType: 'uint256', - name: '_space', - type: 'uint256' - } - ], - name: 'readNonce', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256' - } - ], - stateMutability: 'view', - type: 'function' - }, - { - inputs: [ - { - internalType: 'bytes4', - name: '_signature', - type: 'bytes4' - } - ], - name: 'removeHook', - outputs: [], - stateMutability: 'nonpayable', - type: 'function' - }, - { - inputs: [ - { - components: [ - { - internalType: 'bool', - name: 'delegateCall', - type: 'bool' - }, - { - internalType: 'bool', - name: 'revertOnError', - type: 'bool' - }, - { - internalType: 'uint256', - name: 'gasLimit', - type: 'uint256' - }, - { - internalType: 'address', - name: 'target', - type: 'address' - }, - { - internalType: 'uint256', - name: 'value', - type: 'uint256' - }, - { - internalType: 'bytes', - name: 'data', - type: 'bytes' - } - ], - internalType: 'struct IModuleCalls.Transaction[]', - name: '_txs', - type: 'tuple[]' - } - ], - name: 'selfExecute', - outputs: [], - stateMutability: 'nonpayable', - type: 'function' - }, - { - inputs: [ - { - internalType: 'bytes4', - name: '_interfaceID', - type: 'bytes4' - } - ], - name: 'supportsInterface', - outputs: [ - { - internalType: 'bool', - name: '', - type: 'bool' - } - ], - stateMutability: 'pure', - type: 'function' - }, - { - inputs: [ - { - internalType: 'address', - name: '_implementation', - type: 'address' - } - ], - name: 'updateImplementation', - outputs: [], - stateMutability: 'nonpayable', - type: 'function' - }, - { - stateMutability: 'payable', - type: 'receive' - } - ], - bytecode: - '0x60c06040523480156200001157600080fd5b5060405162002d6338038062002d638339810160408190526200003491620000e2565b80600060405180606001604052806028815260200162002d3b60289139306001600160a01b03166040516020018083805190602001908083835b602083106200008f5780518252601f1990920191602091820191016200006e565b51815160209384036101000a60001901801990921691161790529201938452506040805180850381529382019052825192019190912060805250505060601b6001600160601b03191660a0525062000112565b600060208284031215620000f4578081fd5b81516001600160a01b03811681146200010b578182fd5b9392505050565b60805160a05160601c612bf862000143600039806106d55280611baa5250806106b15280611bdb5250612bf86000f3fe6080604052600436106101125760003560e01c80634fcf3eca116100a557806390042baf11610074578063b93ea7ad11610059578063b93ea7ad146103c5578063bc197c81146103e5578063f23a6e611461040557610119565b806390042baf1461039d578063affed0e0146103b057610119565b80634fcf3eca1461031d57806361c2926c1461033d5780637a9a16281461035d5780638c3f55631461037d57610119565b80631a9b2337116100e15780631a9b23371461029957806320c13b0b146102c6578063257671f5146102e65780632dd310001461030857610119565b806301ffc9a7146101f4578063025b22bc1461022a578063150b7a021461024c5780631626ba7e1461027957610119565b3661011957005b60006101486000357fffffffff0000000000000000000000000000000000000000000000000000000016610425565b905073ffffffffffffffffffffffffffffffffffffffff8116156101f1576000808273ffffffffffffffffffffffffffffffffffffffff166000366040518083838082843760405192019450600093509091505080830381855af49150503d80600081146101d2576040519150601f19603f3d011682016040523d82523d6000602084013e6101d7565b606091505b5091509150816101e957805160208201fd5b805160208201f35b50005b34801561020057600080fd5b5061021461020f366004612401565b61047b565b6040516102219190612633565b60405180910390f35b34801561023657600080fd5b5061024a610245366004612166565b610486565b005b34801561025857600080fd5b5061026c610267366004612237565b6105a7565b6040516102219190612660565b34801561028557600080fd5b5061026c6102943660046123b7565b6105d1565b3480156102a557600080fd5b506102b96102b4366004612401565b61064a565b6040516102219190612612565b3480156102d257600080fd5b5061026c6102e136600461244d565b610655565b3480156102f257600080fd5b506102fb6106af565b604051610221919061263e565b34801561031457600080fd5b506102b96106d3565b34801561032957600080fd5b5061024a610338366004612401565b6106f7565b34801561034957600080fd5b5061024a61035836600461231a565b6107d5565b34801561036957600080fd5b5061024a61037836600461234d565b61086e565b34801561038957600080fd5b506102fb6103983660046124e9565b6108ea565b6102b96103ab3660046124b6565b610916565b3480156103bc57600080fd5b506102fb6109ca565b3480156103d157600080fd5b5061024a6103e036600461241b565b6109db565b3480156103f157600080fd5b5061026c610400366004612180565b610ab4565b34801561041157600080fd5b5061026c6104203660046122a4565b610ae1565b60006104737fbe27a319efc8734e89e26ba4bc95f5c788584163b959f03fa04e2d7ab4b9a1207fffffffff000000000000000000000000000000000000000000000000000000008416610b0c565b90505b919050565b600061047382610b39565b3330146104de576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526027815260200180612b9c6027913960400191505060405180910390fd5b6104fd8173ffffffffffffffffffffffffffffffffffffffff16610b96565b610552576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526039815260200180612a826039913960400191505060405180910390fd5b61055b81610b9c565b6040805173ffffffffffffffffffffffffffffffffffffffff8316815290517f310ba5f1d2ed074b51e2eccd052a47ae9ab7c6b800d1fca3db3999d6a592ca039181900360200190a150565b7f150b7a020000000000000000000000000000000000000000000000000000000095945050505050565b600061061b6105df85610ba0565b84848080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250610c0092505050565b1561064357507f1626ba7e000000000000000000000000000000000000000000000000000000005b9392505050565b600061047382610425565b600061067f6105df86866040518083838082843760405192018290039091209350610ba092505050565b156106a757507f20c13b0b000000000000000000000000000000000000000000000000000000005b949350505050565b7f000000000000000000000000000000000000000000000000000000000000000081565b7f000000000000000000000000000000000000000000000000000000000000000081565b33301461074f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526027815260200180612b9c6027913960400191505060405180910390fd5b600061075a82610425565b73ffffffffffffffffffffffffffffffffffffffff1614156107c7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602b8152602001806128e0602b913960400191505060405180910390fd5b6107d2816000610df8565b50565b33301461082d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526027815260200180612b9c6027913960400191505060405180910390fd5b600061085e82604051602001610843919061277e565b60405160208183030381529060405280519060200120610ba0565b905061086a8183610e5b565b5050565b6108778261102a565b600061088f83856040516020016108439291906127c5565b905061089b8183610c00565b6108da576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016108d190612721565b60405180910390fd5b6108e48185610e5b565b50505050565b60006104737f8d0bf1fd623d628c741362c1289948e57b3e2905218c676d3e69abee36d6ae2e83610b0c565b6000333014610970576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526027815260200180612b9c6027913960400191505060405180910390fd5b81516020830134f06040805173ffffffffffffffffffffffffffffffffffffffff8316815290519192507fa506ad4e7f05eceba62a023c3219e5bd98a615f4fa87e2afb08a2da5cf62bf0c919081900360200190a1919050565b60006109d660006108ea565b905090565b333014610a33576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526027815260200180612b9c6027913960400191505060405180910390fd5b6000610a3e83610425565b73ffffffffffffffffffffffffffffffffffffffff1614610aaa576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602c8152602001806129f4602c913960400191505060405180910390fd5b61086a8282610df8565b7fbc197c810000000000000000000000000000000000000000000000000000000098975050505050505050565b7ff23a6e61000000000000000000000000000000000000000000000000000000009695505050505050565b60408051602080820194909452808201929092528051808303820181526060909201905280519101205490565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f90042baf000000000000000000000000000000000000000000000000000000001415610b8d57506001610476565b610473826110ce565b3b151590565b3055565b604080517f19010000000000000000000000000000000000000000000000000000000000006020808301919091524660228301523060601b6042830152605680830194909452825180830390940184526076909101909152815191012090565b6000806000610c0e8461120f565b909250905061ffff821660005b8551831015610dd55760008080610c32898761127d565b975060ff91821694501691506001831415610c5a57610c5189876112fe565b96509050610d7e565b82610c86576060610c6b8a88611376565b97509050610c798b82611427565b9150828501945050610d7e565b6002831415610d2d57610c9989876112fe565b965090506000610ca98a886117b1565b975061ffff1690506060610cbe8b8984611822565b98509050610ccd8c8483611911565b610d22576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260328152602001806129c26032913960400191505060405180910390fd5b505092810192610d7e565b6040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602c8152602001806128b4602c913960400191505060405180910390fd5b848282604051602001808481526020018381526020018273ffffffffffffffffffffffffffffffffffffffff1681526020019350505050604051602081830303815290604052805190602001209450505050610c1b565b8361ffff168110158015610ded5750610ded82611b59565b979650505050505050565b61086a7fbe27a319efc8734e89e26ba4bc95f5c788584163b959f03fa04e2d7ab4b9a1207fffffffff00000000000000000000000000000000000000000000000000000000841673ffffffffffffffffffffffffffffffffffffffff8416611c37565b60005b8151811015611025576000828281518110610e7557fe5b602002602001015190506000606082604001515a1015610ec1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016108d1906126c4565b825115610f5957826060015173ffffffffffffffffffffffffffffffffffffffff168360400151600014610ef9578360400151610efb565b5a5b8460a00151604051610f0d91906125f6565b6000604051808303818686f4925050503d8060008114610f49576040519150601f19603f3d011682016040523d82523d6000602084013e610f4e565b606091505b509092509050610fee565b826060015173ffffffffffffffffffffffffffffffffffffffff1683608001518460400151600014610f8f578460400151610f91565b5a5b908560a00151604051610fa491906125f6565b600060405180830381858888f193505050503d8060008114610fe2576040519150601f19603f3d011682016040523d82523d6000602084013e610fe7565b606091505b5090925090505b811561100f5785604051611002919061263e565b60405180910390a061101a565b61101a838783611c65565b505050600101610e5e565b505050565b60008061103683611cb5565b915091506000611045836108ea565b9050808214611080576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016108d19061268d565b6001820161108e8482611cce565b7f1f180c27086c7a39ea2a7b25239d1ab92348f07ca7bb59d1438fcf527568f88184826040516110bf9291906127de565b60405180910390a15050505050565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167fec6aba5000000000000000000000000000000000000000000000000000000000148061116157507fffffffff0000000000000000000000000000000000000000000000000000000082167f4e2312e000000000000000000000000000000000000000000000000000000000145b806111ad57507fffffffff0000000000000000000000000000000000000000000000000000000082167f150b7a0200000000000000000000000000000000000000000000000000000000145b806111f957507fffffffff0000000000000000000000000000000000000000000000000000000082167fc0ee0b8a00000000000000000000000000000000000000000000000000000000145b1561120657506001610476565b61047382611cf9565b6020810151815160f09190911c90600290811115611278576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602781526020018061292e6027913960400191505060405180910390fd5b915091565b8082016020015160f881901c9060f01c60ff166002830183811161129d57fe5b84518111156112f7576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526026815260200180612af76026913960400191505060405180910390fd5b9250925092565b8082016020015160601c6014820182811161131557fe5b835181111561136f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602381526020018061290b6023913960400191505060405180910390fd5b9250929050565b6040805160428082526080820190925260609160009190602082018180368337019050509150828401602001805160208401526020810151604084015260228101516042840152506042830190508281116113cd57fe5b835181111561136f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526023815260200180612a5f6023913960400191505060405180910390fd5b60008151604214611483576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252603a81526020018061287a603a913960400191505060405180910390fd5b60008260018451038151811061149557fe5b602001015160f81c60f81b60f81c60ff1690506000836040815181106114b757fe5b016020015160f81c905060006114cd8582611d56565b905060006114dc866020611d56565b90507f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0811115611557576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252603d81526020018061283d603d913960400191505060405180910390fd5b8260ff16601b1415801561156f57508260ff16601c14155b156115c5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252603d815260200180612955603d913960400191505060405180910390fd5b60018414156116395760018784848460405160008152602001604052604051808581526020018460ff1681526020018381526020018281526020019450505050506020604051602081039080840390855afa158015611628573d6000803e3d6000fd5b50505060206040510351945061173b565b60028414156116ea5760018760405160200180807f19457468657265756d205369676e6564204d6573736167653a0a333200000000815250601c018281526020019150506040516020818303038152906040528051906020012084848460405160008152602001604052604051808581526020018460ff1681526020018381526020018281526020019450505050506020604051602081039080840390855afa158015611628573d6000803e3d6000fd5b6040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252603c815260200180612abb603c913960400191505060405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff85166117a7576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260308152602001806129926030913960400191505060405180910390fd5b5050505092915050565b8082016020015160f01c600282018281116117c857fe5b835181111561136f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526022815260200180612b3e6022913960400191505060405180910390fd5b606060008267ffffffffffffffff8111801561183d57600080fd5b506040519080825280601f01601f191660200182016040528015611868576020820181803683370190505b509150838501602001600060205b8581101561188f57908201518482015260208101611876565b84860160200180519390920151908501525250828201838110156118af57fe5b8451811115611909576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526021815260200180612b1d6021913960400191505060405180910390fd5b935093915050565b6000808260018451038151811061192457fe5b016020015160f81c9050600181148061193d5750600281145b15611981578373ffffffffffffffffffffffffffffffffffffffff166119638685611427565b73ffffffffffffffffffffffffffffffffffffffff16149150611b51565b6003811415611b005782517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff81018452604080517f1626ba7e000000000000000000000000000000000000000000000000000000008152600481018881526024820192835286516044830152865173ffffffffffffffffffffffffffffffffffffffff891693631626ba7e938b938a9390929160640190602085019080838360005b83811015611a3b578181015183820152602001611a23565b50505050905090810190601f168015611a685780820380516001836020036101000a031916815260200191505b50935050505060206040518083038186803b158015611a8657600080fd5b505afa158015611a9a573d6000803e3d6000fd5b505050506040513d6020811015611ab057600080fd5b50519084527fffffffff00000000000000000000000000000000000000000000000000000000167f1626ba7e00000000000000000000000000000000000000000000000000000000149150611b51565b6040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252603f815260200180612a20603f913960400191505060405180910390fd5b509392505050565b604080517fff000000000000000000000000000000000000000000000000000000000000006020808301919091527fffffffffffffffffffffffffffffffffffffffff0000000000000000000000007f000000000000000000000000000000000000000000000000000000000000000060601b166021830152603582018490527f0000000000000000000000000000000000000000000000000000000000000000605580840191909152835180840390910181526075909201909252805191012073ffffffffffffffffffffffffffffffffffffffff163014919050565b6040805160208082019590955280820193909352805180840382018152606090930190528151919092012055565b826020015115611c7757805160208201fd5b7f3dbd1590ea96dd3253a91f24e64e3a502e1225d602a5731357bc12643070ccd78282604051611ca8929190612647565b60405180910390a1505050565b606081901c916bffffffffffffffffffffffff90911690565b61086a7f8d0bf1fd623d628c741362c1289948e57b3e2905218c676d3e69abee36d6ae2e8383611c37565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f025b22bc000000000000000000000000000000000000000000000000000000001415611d4d57506001610476565b61047382611dbe565b60008160200183511015611db5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252603c815260200180612b60603c913960400191505060405180910390fd5b50016020015190565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f389901c7000000000000000000000000000000000000000000000000000000001415611e1257506001610476565b6104738260007fffffffff0000000000000000000000000000000000000000000000000000000082161580611e8857507fffffffff0000000000000000000000000000000000000000000000000000000082167f36e7817500000000000000000000000000000000000000000000000000000000145b15611e9557506001610476565b7f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff00000000000000000000000000000000000000000000000000000000831614610473565b803573ffffffffffffffffffffffffffffffffffffffff8116811461047657600080fd5b600082601f830112611f13578081fd5b8135602067ffffffffffffffff80831115611f2a57fe5b611f3782838502016127ec565b83815282810190868401865b86811015612013578135890160c0807fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0838e03011215611f8157898afd5b604080518281018181108a82111715611f9657fe5b8252611fa3848b01612063565b8152611fb0828501612063565b8a8201526060808501358383015260809250611fcd838601611edf565b9082015260a08481013583830152928401359289841115611fec578c8dfd5b611ffa8f8c868801016120e3565b9082015287525050509285019290850190600101611f43565b509098975050505050505050565b60008083601f840112612032578182fd5b50813567ffffffffffffffff811115612049578182fd5b602083019150836020808302850101111561136f57600080fd5b8035801515811461047657600080fd5b80357fffffffff000000000000000000000000000000000000000000000000000000008116811461047657600080fd5b60008083601f8401126120b4578182fd5b50813567ffffffffffffffff8111156120cb578182fd5b60208301915083602082850101111561136f57600080fd5b600082601f8301126120f3578081fd5b813567ffffffffffffffff81111561210757fe5b61213860207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f840116016127ec565b81815284602083860101111561214c578283fd5b816020850160208301379081016020019190915292915050565b600060208284031215612177578081fd5b61064382611edf565b60008060008060008060008060a0898b03121561219b578384fd5b6121a489611edf565b97506121b260208a01611edf565b9650604089013567ffffffffffffffff808211156121ce578586fd5b6121da8c838d01612021565b909850965060608b01359150808211156121f2578586fd5b6121fe8c838d01612021565b909650945060808b0135915080821115612216578384fd5b506122238b828c016120a3565b999c989b5096995094979396929594505050565b60008060008060006080868803121561224e578081fd5b61225786611edf565b945061226560208701611edf565b935060408601359250606086013567ffffffffffffffff811115612287578182fd5b612293888289016120a3565b969995985093965092949392505050565b60008060008060008060a087890312156122bc578182fd5b6122c587611edf565b95506122d360208801611edf565b94506040870135935060608701359250608087013567ffffffffffffffff8111156122fc578283fd5b61230889828a016120a3565b979a9699509497509295939492505050565b60006020828403121561232b578081fd5b813567ffffffffffffffff811115612341578182fd5b6106a784828501611f03565b600080600060608486031215612361578283fd5b833567ffffffffffffffff80821115612378578485fd5b61238487838801611f03565b94506020860135935060408601359150808211156123a0578283fd5b506123ad868287016120e3565b9150509250925092565b6000806000604084860312156123cb578283fd5b83359250602084013567ffffffffffffffff8111156123e8578283fd5b6123f4868287016120a3565b9497909650939450505050565b600060208284031215612412578081fd5b61064382612073565b6000806040838503121561242d578182fd5b61243683612073565b915061244460208401611edf565b90509250929050565b60008060008060408587031215612462578182fd5b843567ffffffffffffffff80821115612479578384fd5b612485888389016120a3565b9096509450602087013591508082111561249d578384fd5b506124aa878288016120a3565b95989497509550505050565b6000602082840312156124c7578081fd5b813567ffffffffffffffff8111156124dd578182fd5b6106a7848285016120e3565b6000602082840312156124fa578081fd5b5035919050565b6000815180845260208085018081965082840281019150828601855b8581101561259f5782840389528151805115158552858101511515868601526040808201519086015260608082015173ffffffffffffffffffffffffffffffffffffffff16908601526080808201519086015260a09081015160c09186018290529061258b818701836125ac565b9a87019a955050509084019060010161251d565b5091979650505050505050565b600081518084526125c4816020860160208601612810565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b60008251612608818460208701612810565b9190910192915050565b73ffffffffffffffffffffffffffffffffffffffff91909116815260200190565b901515815260200190565b90815260200190565b6000838252604060208301526106a760408301846125ac565b7fffffffff0000000000000000000000000000000000000000000000000000000091909116815260200190565b6020808252601f908201527f4d61696e4d6f64756c65235f617574683a20494e56414c49445f4e4f4e434500604082015260600190565b60208082526024908201527f4d6f64756c6543616c6c73235f657865637574653a204e4f545f454e4f55474860408201527f5f47415300000000000000000000000000000000000000000000000000000000606082015260800190565b60208082526026908201527f4d6f64756c6543616c6c7323657865637574653a20494e56414c49445f53494760408201527f4e41545552450000000000000000000000000000000000000000000000000000606082015260800190565b600060408252600560408301527f73656c663a0000000000000000000000000000000000000000000000000000006060830152608060208301526106436080830184612501565b6000838252604060208301526106a76040830184612501565b918252602082015260400190565b60405181810167ffffffffffffffff8111828210171561280857fe5b604052919050565b60005b8381101561282b578181015183820152602001612813565b838111156108e4575050600091015256fe5369676e617475726556616c696461746f72237265636f7665725369676e65723a20696e76616c6964207369676e6174757265202773272076616c75655369676e617475726556616c696461746f72237265636f7665725369676e65723a20696e76616c6964207369676e6174757265206c656e6774684d6f64756c6541757468235f7369676e617475726556616c69646174696f6e20494e56414c49445f464c41474d6f64756c65486f6f6b732372656d6f7665486f6f6b3a20484f4f4b5f4e4f545f524547495354455245444c696242797465732372656164416464726573733a204f55545f4f465f424f554e44534c696242797465732372656164466972737455696e7431363a204f55545f4f465f424f554e44535369676e617475726556616c696461746f72237265636f7665725369676e65723a20696e76616c6964207369676e6174757265202776272076616c75655369676e617475726556616c696461746f72237265636f7665725369676e65723a20494e56414c49445f5349474e45524d6f64756c6541757468235f7369676e617475726556616c69646174696f6e3a20494e56414c49445f5349474e41545552454d6f64756c65486f6f6b7323616464486f6f6b3a20484f4f4b5f414c52454144595f524547495354455245445369676e617475726556616c696461746f7223697356616c69645369676e61747572653a20554e535550504f525445445f5349474e41545552455f545950454c696242797465732372656164427974657336363a204f55545f4f465f424f554e44534d6f64756c6555706461746523757064617465496d706c656d656e746174696f6e3a20494e56414c49445f494d504c454d454e544154494f4e5369676e617475726556616c696461746f72237265636f7665725369676e65723a20554e535550504f525445445f5349474e41545552455f545950454c69624279746573237265616455696e743855696e74383a204f55545f4f465f424f554e44534c69624279746573237265616442797465733a204f55545f4f465f424f554e44534c69624279746573237265616455696e7431363a204f55545f4f465f424f554e44534c696242797465732372656164427974657333323a20475245415445525f4f525f455155414c5f544f5f33325f4c454e4754485f52455155495245444d6f64756c6553656c6641757468236f6e6c7953656c663a204e4f545f415554484f52495a4544a2646970667358221220b34deca9dd75815e4ef8a9279e45750ec5554b22c673e160bdba849d80f5888564736f6c63430007060033603a600e3d39601a805130553df3363d3d373d3d3d363d30545af43d82803e903d91601857fd5bf3', - deployedBytecode: - '0x6080604052600436106101125760003560e01c80634fcf3eca116100a557806390042baf11610074578063b93ea7ad11610059578063b93ea7ad146103c5578063bc197c81146103e5578063f23a6e611461040557610119565b806390042baf1461039d578063affed0e0146103b057610119565b80634fcf3eca1461031d57806361c2926c1461033d5780637a9a16281461035d5780638c3f55631461037d57610119565b80631a9b2337116100e15780631a9b23371461029957806320c13b0b146102c6578063257671f5146102e65780632dd310001461030857610119565b806301ffc9a7146101f4578063025b22bc1461022a578063150b7a021461024c5780631626ba7e1461027957610119565b3661011957005b60006101486000357fffffffff0000000000000000000000000000000000000000000000000000000016610425565b905073ffffffffffffffffffffffffffffffffffffffff8116156101f1576000808273ffffffffffffffffffffffffffffffffffffffff166000366040518083838082843760405192019450600093509091505080830381855af49150503d80600081146101d2576040519150601f19603f3d011682016040523d82523d6000602084013e6101d7565b606091505b5091509150816101e957805160208201fd5b805160208201f35b50005b34801561020057600080fd5b5061021461020f366004612401565b61047b565b6040516102219190612633565b60405180910390f35b34801561023657600080fd5b5061024a610245366004612166565b610486565b005b34801561025857600080fd5b5061026c610267366004612237565b6105a7565b6040516102219190612660565b34801561028557600080fd5b5061026c6102943660046123b7565b6105d1565b3480156102a557600080fd5b506102b96102b4366004612401565b61064a565b6040516102219190612612565b3480156102d257600080fd5b5061026c6102e136600461244d565b610655565b3480156102f257600080fd5b506102fb6106af565b604051610221919061263e565b34801561031457600080fd5b506102b96106d3565b34801561032957600080fd5b5061024a610338366004612401565b6106f7565b34801561034957600080fd5b5061024a61035836600461231a565b6107d5565b34801561036957600080fd5b5061024a61037836600461234d565b61086e565b34801561038957600080fd5b506102fb6103983660046124e9565b6108ea565b6102b96103ab3660046124b6565b610916565b3480156103bc57600080fd5b506102fb6109ca565b3480156103d157600080fd5b5061024a6103e036600461241b565b6109db565b3480156103f157600080fd5b5061026c610400366004612180565b610ab4565b34801561041157600080fd5b5061026c6104203660046122a4565b610ae1565b60006104737fbe27a319efc8734e89e26ba4bc95f5c788584163b959f03fa04e2d7ab4b9a1207fffffffff000000000000000000000000000000000000000000000000000000008416610b0c565b90505b919050565b600061047382610b39565b3330146104de576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526027815260200180612b9c6027913960400191505060405180910390fd5b6104fd8173ffffffffffffffffffffffffffffffffffffffff16610b96565b610552576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526039815260200180612a826039913960400191505060405180910390fd5b61055b81610b9c565b6040805173ffffffffffffffffffffffffffffffffffffffff8316815290517f310ba5f1d2ed074b51e2eccd052a47ae9ab7c6b800d1fca3db3999d6a592ca039181900360200190a150565b7f150b7a020000000000000000000000000000000000000000000000000000000095945050505050565b600061061b6105df85610ba0565b84848080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250610c0092505050565b1561064357507f1626ba7e000000000000000000000000000000000000000000000000000000005b9392505050565b600061047382610425565b600061067f6105df86866040518083838082843760405192018290039091209350610ba092505050565b156106a757507f20c13b0b000000000000000000000000000000000000000000000000000000005b949350505050565b7f000000000000000000000000000000000000000000000000000000000000000081565b7f000000000000000000000000000000000000000000000000000000000000000081565b33301461074f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526027815260200180612b9c6027913960400191505060405180910390fd5b600061075a82610425565b73ffffffffffffffffffffffffffffffffffffffff1614156107c7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602b8152602001806128e0602b913960400191505060405180910390fd5b6107d2816000610df8565b50565b33301461082d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526027815260200180612b9c6027913960400191505060405180910390fd5b600061085e82604051602001610843919061277e565b60405160208183030381529060405280519060200120610ba0565b905061086a8183610e5b565b5050565b6108778261102a565b600061088f83856040516020016108439291906127c5565b905061089b8183610c00565b6108da576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016108d190612721565b60405180910390fd5b6108e48185610e5b565b50505050565b60006104737f8d0bf1fd623d628c741362c1289948e57b3e2905218c676d3e69abee36d6ae2e83610b0c565b6000333014610970576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526027815260200180612b9c6027913960400191505060405180910390fd5b81516020830134f06040805173ffffffffffffffffffffffffffffffffffffffff8316815290519192507fa506ad4e7f05eceba62a023c3219e5bd98a615f4fa87e2afb08a2da5cf62bf0c919081900360200190a1919050565b60006109d660006108ea565b905090565b333014610a33576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526027815260200180612b9c6027913960400191505060405180910390fd5b6000610a3e83610425565b73ffffffffffffffffffffffffffffffffffffffff1614610aaa576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602c8152602001806129f4602c913960400191505060405180910390fd5b61086a8282610df8565b7fbc197c810000000000000000000000000000000000000000000000000000000098975050505050505050565b7ff23a6e61000000000000000000000000000000000000000000000000000000009695505050505050565b60408051602080820194909452808201929092528051808303820181526060909201905280519101205490565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f90042baf000000000000000000000000000000000000000000000000000000001415610b8d57506001610476565b610473826110ce565b3b151590565b3055565b604080517f19010000000000000000000000000000000000000000000000000000000000006020808301919091524660228301523060601b6042830152605680830194909452825180830390940184526076909101909152815191012090565b6000806000610c0e8461120f565b909250905061ffff821660005b8551831015610dd55760008080610c32898761127d565b975060ff91821694501691506001831415610c5a57610c5189876112fe565b96509050610d7e565b82610c86576060610c6b8a88611376565b97509050610c798b82611427565b9150828501945050610d7e565b6002831415610d2d57610c9989876112fe565b965090506000610ca98a886117b1565b975061ffff1690506060610cbe8b8984611822565b98509050610ccd8c8483611911565b610d22576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260328152602001806129c26032913960400191505060405180910390fd5b505092810192610d7e565b6040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602c8152602001806128b4602c913960400191505060405180910390fd5b848282604051602001808481526020018381526020018273ffffffffffffffffffffffffffffffffffffffff1681526020019350505050604051602081830303815290604052805190602001209450505050610c1b565b8361ffff168110158015610ded5750610ded82611b59565b979650505050505050565b61086a7fbe27a319efc8734e89e26ba4bc95f5c788584163b959f03fa04e2d7ab4b9a1207fffffffff00000000000000000000000000000000000000000000000000000000841673ffffffffffffffffffffffffffffffffffffffff8416611c37565b60005b8151811015611025576000828281518110610e7557fe5b602002602001015190506000606082604001515a1015610ec1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016108d1906126c4565b825115610f5957826060015173ffffffffffffffffffffffffffffffffffffffff168360400151600014610ef9578360400151610efb565b5a5b8460a00151604051610f0d91906125f6565b6000604051808303818686f4925050503d8060008114610f49576040519150601f19603f3d011682016040523d82523d6000602084013e610f4e565b606091505b509092509050610fee565b826060015173ffffffffffffffffffffffffffffffffffffffff1683608001518460400151600014610f8f578460400151610f91565b5a5b908560a00151604051610fa491906125f6565b600060405180830381858888f193505050503d8060008114610fe2576040519150601f19603f3d011682016040523d82523d6000602084013e610fe7565b606091505b5090925090505b811561100f5785604051611002919061263e565b60405180910390a061101a565b61101a838783611c65565b505050600101610e5e565b505050565b60008061103683611cb5565b915091506000611045836108ea565b9050808214611080576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016108d19061268d565b6001820161108e8482611cce565b7f1f180c27086c7a39ea2a7b25239d1ab92348f07ca7bb59d1438fcf527568f88184826040516110bf9291906127de565b60405180910390a15050505050565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167fec6aba5000000000000000000000000000000000000000000000000000000000148061116157507fffffffff0000000000000000000000000000000000000000000000000000000082167f4e2312e000000000000000000000000000000000000000000000000000000000145b806111ad57507fffffffff0000000000000000000000000000000000000000000000000000000082167f150b7a0200000000000000000000000000000000000000000000000000000000145b806111f957507fffffffff0000000000000000000000000000000000000000000000000000000082167fc0ee0b8a00000000000000000000000000000000000000000000000000000000145b1561120657506001610476565b61047382611cf9565b6020810151815160f09190911c90600290811115611278576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602781526020018061292e6027913960400191505060405180910390fd5b915091565b8082016020015160f881901c9060f01c60ff166002830183811161129d57fe5b84518111156112f7576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526026815260200180612af76026913960400191505060405180910390fd5b9250925092565b8082016020015160601c6014820182811161131557fe5b835181111561136f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602381526020018061290b6023913960400191505060405180910390fd5b9250929050565b6040805160428082526080820190925260609160009190602082018180368337019050509150828401602001805160208401526020810151604084015260228101516042840152506042830190508281116113cd57fe5b835181111561136f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526023815260200180612a5f6023913960400191505060405180910390fd5b60008151604214611483576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252603a81526020018061287a603a913960400191505060405180910390fd5b60008260018451038151811061149557fe5b602001015160f81c60f81b60f81c60ff1690506000836040815181106114b757fe5b016020015160f81c905060006114cd8582611d56565b905060006114dc866020611d56565b90507f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0811115611557576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252603d81526020018061283d603d913960400191505060405180910390fd5b8260ff16601b1415801561156f57508260ff16601c14155b156115c5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252603d815260200180612955603d913960400191505060405180910390fd5b60018414156116395760018784848460405160008152602001604052604051808581526020018460ff1681526020018381526020018281526020019450505050506020604051602081039080840390855afa158015611628573d6000803e3d6000fd5b50505060206040510351945061173b565b60028414156116ea5760018760405160200180807f19457468657265756d205369676e6564204d6573736167653a0a333200000000815250601c018281526020019150506040516020818303038152906040528051906020012084848460405160008152602001604052604051808581526020018460ff1681526020018381526020018281526020019450505050506020604051602081039080840390855afa158015611628573d6000803e3d6000fd5b6040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252603c815260200180612abb603c913960400191505060405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff85166117a7576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260308152602001806129926030913960400191505060405180910390fd5b5050505092915050565b8082016020015160f01c600282018281116117c857fe5b835181111561136f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526022815260200180612b3e6022913960400191505060405180910390fd5b606060008267ffffffffffffffff8111801561183d57600080fd5b506040519080825280601f01601f191660200182016040528015611868576020820181803683370190505b509150838501602001600060205b8581101561188f57908201518482015260208101611876565b84860160200180519390920151908501525250828201838110156118af57fe5b8451811115611909576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526021815260200180612b1d6021913960400191505060405180910390fd5b935093915050565b6000808260018451038151811061192457fe5b016020015160f81c9050600181148061193d5750600281145b15611981578373ffffffffffffffffffffffffffffffffffffffff166119638685611427565b73ffffffffffffffffffffffffffffffffffffffff16149150611b51565b6003811415611b005782517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff81018452604080517f1626ba7e000000000000000000000000000000000000000000000000000000008152600481018881526024820192835286516044830152865173ffffffffffffffffffffffffffffffffffffffff891693631626ba7e938b938a9390929160640190602085019080838360005b83811015611a3b578181015183820152602001611a23565b50505050905090810190601f168015611a685780820380516001836020036101000a031916815260200191505b50935050505060206040518083038186803b158015611a8657600080fd5b505afa158015611a9a573d6000803e3d6000fd5b505050506040513d6020811015611ab057600080fd5b50519084527fffffffff00000000000000000000000000000000000000000000000000000000167f1626ba7e00000000000000000000000000000000000000000000000000000000149150611b51565b6040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252603f815260200180612a20603f913960400191505060405180910390fd5b509392505050565b604080517fff000000000000000000000000000000000000000000000000000000000000006020808301919091527fffffffffffffffffffffffffffffffffffffffff0000000000000000000000007f000000000000000000000000000000000000000000000000000000000000000060601b166021830152603582018490527f0000000000000000000000000000000000000000000000000000000000000000605580840191909152835180840390910181526075909201909252805191012073ffffffffffffffffffffffffffffffffffffffff163014919050565b6040805160208082019590955280820193909352805180840382018152606090930190528151919092012055565b826020015115611c7757805160208201fd5b7f3dbd1590ea96dd3253a91f24e64e3a502e1225d602a5731357bc12643070ccd78282604051611ca8929190612647565b60405180910390a1505050565b606081901c916bffffffffffffffffffffffff90911690565b61086a7f8d0bf1fd623d628c741362c1289948e57b3e2905218c676d3e69abee36d6ae2e8383611c37565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f025b22bc000000000000000000000000000000000000000000000000000000001415611d4d57506001610476565b61047382611dbe565b60008160200183511015611db5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252603c815260200180612b60603c913960400191505060405180910390fd5b50016020015190565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f389901c7000000000000000000000000000000000000000000000000000000001415611e1257506001610476565b6104738260007fffffffff0000000000000000000000000000000000000000000000000000000082161580611e8857507fffffffff0000000000000000000000000000000000000000000000000000000082167f36e7817500000000000000000000000000000000000000000000000000000000145b15611e9557506001610476565b7f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff00000000000000000000000000000000000000000000000000000000831614610473565b803573ffffffffffffffffffffffffffffffffffffffff8116811461047657600080fd5b600082601f830112611f13578081fd5b8135602067ffffffffffffffff80831115611f2a57fe5b611f3782838502016127ec565b83815282810190868401865b86811015612013578135890160c0807fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0838e03011215611f8157898afd5b604080518281018181108a82111715611f9657fe5b8252611fa3848b01612063565b8152611fb0828501612063565b8a8201526060808501358383015260809250611fcd838601611edf565b9082015260a08481013583830152928401359289841115611fec578c8dfd5b611ffa8f8c868801016120e3565b9082015287525050509285019290850190600101611f43565b509098975050505050505050565b60008083601f840112612032578182fd5b50813567ffffffffffffffff811115612049578182fd5b602083019150836020808302850101111561136f57600080fd5b8035801515811461047657600080fd5b80357fffffffff000000000000000000000000000000000000000000000000000000008116811461047657600080fd5b60008083601f8401126120b4578182fd5b50813567ffffffffffffffff8111156120cb578182fd5b60208301915083602082850101111561136f57600080fd5b600082601f8301126120f3578081fd5b813567ffffffffffffffff81111561210757fe5b61213860207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f840116016127ec565b81815284602083860101111561214c578283fd5b816020850160208301379081016020019190915292915050565b600060208284031215612177578081fd5b61064382611edf565b60008060008060008060008060a0898b03121561219b578384fd5b6121a489611edf565b97506121b260208a01611edf565b9650604089013567ffffffffffffffff808211156121ce578586fd5b6121da8c838d01612021565b909850965060608b01359150808211156121f2578586fd5b6121fe8c838d01612021565b909650945060808b0135915080821115612216578384fd5b506122238b828c016120a3565b999c989b5096995094979396929594505050565b60008060008060006080868803121561224e578081fd5b61225786611edf565b945061226560208701611edf565b935060408601359250606086013567ffffffffffffffff811115612287578182fd5b612293888289016120a3565b969995985093965092949392505050565b60008060008060008060a087890312156122bc578182fd5b6122c587611edf565b95506122d360208801611edf565b94506040870135935060608701359250608087013567ffffffffffffffff8111156122fc578283fd5b61230889828a016120a3565b979a9699509497509295939492505050565b60006020828403121561232b578081fd5b813567ffffffffffffffff811115612341578182fd5b6106a784828501611f03565b600080600060608486031215612361578283fd5b833567ffffffffffffffff80821115612378578485fd5b61238487838801611f03565b94506020860135935060408601359150808211156123a0578283fd5b506123ad868287016120e3565b9150509250925092565b6000806000604084860312156123cb578283fd5b83359250602084013567ffffffffffffffff8111156123e8578283fd5b6123f4868287016120a3565b9497909650939450505050565b600060208284031215612412578081fd5b61064382612073565b6000806040838503121561242d578182fd5b61243683612073565b915061244460208401611edf565b90509250929050565b60008060008060408587031215612462578182fd5b843567ffffffffffffffff80821115612479578384fd5b612485888389016120a3565b9096509450602087013591508082111561249d578384fd5b506124aa878288016120a3565b95989497509550505050565b6000602082840312156124c7578081fd5b813567ffffffffffffffff8111156124dd578182fd5b6106a7848285016120e3565b6000602082840312156124fa578081fd5b5035919050565b6000815180845260208085018081965082840281019150828601855b8581101561259f5782840389528151805115158552858101511515868601526040808201519086015260608082015173ffffffffffffffffffffffffffffffffffffffff16908601526080808201519086015260a09081015160c09186018290529061258b818701836125ac565b9a87019a955050509084019060010161251d565b5091979650505050505050565b600081518084526125c4816020860160208601612810565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b60008251612608818460208701612810565b9190910192915050565b73ffffffffffffffffffffffffffffffffffffffff91909116815260200190565b901515815260200190565b90815260200190565b6000838252604060208301526106a760408301846125ac565b7fffffffff0000000000000000000000000000000000000000000000000000000091909116815260200190565b6020808252601f908201527f4d61696e4d6f64756c65235f617574683a20494e56414c49445f4e4f4e434500604082015260600190565b60208082526024908201527f4d6f64756c6543616c6c73235f657865637574653a204e4f545f454e4f55474860408201527f5f47415300000000000000000000000000000000000000000000000000000000606082015260800190565b60208082526026908201527f4d6f64756c6543616c6c7323657865637574653a20494e56414c49445f53494760408201527f4e41545552450000000000000000000000000000000000000000000000000000606082015260800190565b600060408252600560408301527f73656c663a0000000000000000000000000000000000000000000000000000006060830152608060208301526106436080830184612501565b6000838252604060208301526106a76040830184612501565b918252602082015260400190565b60405181810167ffffffffffffffff8111828210171561280857fe5b604052919050565b60005b8381101561282b578181015183820152602001612813565b838111156108e4575050600091015256fe5369676e617475726556616c696461746f72237265636f7665725369676e65723a20696e76616c6964207369676e6174757265202773272076616c75655369676e617475726556616c696461746f72237265636f7665725369676e65723a20696e76616c6964207369676e6174757265206c656e6774684d6f64756c6541757468235f7369676e617475726556616c69646174696f6e20494e56414c49445f464c41474d6f64756c65486f6f6b732372656d6f7665486f6f6b3a20484f4f4b5f4e4f545f524547495354455245444c696242797465732372656164416464726573733a204f55545f4f465f424f554e44534c696242797465732372656164466972737455696e7431363a204f55545f4f465f424f554e44535369676e617475726556616c696461746f72237265636f7665725369676e65723a20696e76616c6964207369676e6174757265202776272076616c75655369676e617475726556616c696461746f72237265636f7665725369676e65723a20494e56414c49445f5349474e45524d6f64756c6541757468235f7369676e617475726556616c69646174696f6e3a20494e56414c49445f5349474e41545552454d6f64756c65486f6f6b7323616464486f6f6b3a20484f4f4b5f414c52454144595f524547495354455245445369676e617475726556616c696461746f7223697356616c69645369676e61747572653a20554e535550504f525445445f5349474e41545552455f545950454c696242797465732372656164427974657336363a204f55545f4f465f424f554e44534d6f64756c6555706461746523757064617465496d706c656d656e746174696f6e3a20494e56414c49445f494d504c454d454e544154494f4e5369676e617475726556616c696461746f72237265636f7665725369676e65723a20554e535550504f525445445f5349474e41545552455f545950454c69624279746573237265616455696e743855696e74383a204f55545f4f465f424f554e44534c69624279746573237265616442797465733a204f55545f4f465f424f554e44534c69624279746573237265616455696e7431363a204f55545f4f465f424f554e44534c696242797465732372656164427974657333323a20475245415445525f4f525f455155414c5f544f5f33325f4c454e4754485f52455155495245444d6f64756c6553656c6641757468236f6e6c7953656c663a204e4f545f415554484f52495a4544a2646970667358221220b34deca9dd75815e4ef8a9279e45750ec5554b22c673e160bdba849d80f5888564736f6c63430007060033', - linkReferences: {}, - deployedLinkReferences: {} -} diff --git a/old/packages/tests/src/builds/v1/artifacts/MainModuleUpgradable.ts b/old/packages/tests/src/builds/v1/artifacts/MainModuleUpgradable.ts deleted file mode 100644 index 2a9d12243..000000000 --- a/old/packages/tests/src/builds/v1/artifacts/MainModuleUpgradable.ts +++ /dev/null @@ -1,530 +0,0 @@ -export const mainModuleUpgradable = { - _format: 'hh-sol-artifact-1', - contractName: 'MainModuleUpgradable', - sourceName: 'contracts/modules/MainModuleUpgradable.sol', - abi: [ - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: 'address', - name: '_contract', - type: 'address' - } - ], - name: 'CreatedContract', - type: 'event' - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: 'bytes32', - name: 'newImageHash', - type: 'bytes32' - } - ], - name: 'ImageHashUpdated', - type: 'event' - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: 'address', - name: 'newImplementation', - type: 'address' - } - ], - name: 'ImplementationUpdated', - type: 'event' - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: 'uint256', - name: '_space', - type: 'uint256' - }, - { - indexed: false, - internalType: 'uint256', - name: '_newNonce', - type: 'uint256' - } - ], - name: 'NonceChange', - type: 'event' - }, - { - anonymous: true, - inputs: [ - { - indexed: false, - internalType: 'bytes32', - name: '_tx', - type: 'bytes32' - } - ], - name: 'TxExecuted', - type: 'event' - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: 'bytes32', - name: '_tx', - type: 'bytes32' - }, - { - indexed: false, - internalType: 'bytes', - name: '_reason', - type: 'bytes' - } - ], - name: 'TxFailed', - type: 'event' - }, - { - stateMutability: 'payable', - type: 'fallback' - }, - { - inputs: [ - { - internalType: 'bytes4', - name: '_signature', - type: 'bytes4' - }, - { - internalType: 'address', - name: '_implementation', - type: 'address' - } - ], - name: 'addHook', - outputs: [], - stateMutability: 'nonpayable', - type: 'function' - }, - { - inputs: [ - { - internalType: 'bytes', - name: '_code', - type: 'bytes' - } - ], - name: 'createContract', - outputs: [ - { - internalType: 'address', - name: 'addr', - type: 'address' - } - ], - stateMutability: 'payable', - type: 'function' - }, - { - inputs: [ - { - components: [ - { - internalType: 'bool', - name: 'delegateCall', - type: 'bool' - }, - { - internalType: 'bool', - name: 'revertOnError', - type: 'bool' - }, - { - internalType: 'uint256', - name: 'gasLimit', - type: 'uint256' - }, - { - internalType: 'address', - name: 'target', - type: 'address' - }, - { - internalType: 'uint256', - name: 'value', - type: 'uint256' - }, - { - internalType: 'bytes', - name: 'data', - type: 'bytes' - } - ], - internalType: 'struct IModuleCalls.Transaction[]', - name: '_txs', - type: 'tuple[]' - }, - { - internalType: 'uint256', - name: '_nonce', - type: 'uint256' - }, - { - internalType: 'bytes', - name: '_signature', - type: 'bytes' - } - ], - name: 'execute', - outputs: [], - stateMutability: 'nonpayable', - type: 'function' - }, - { - inputs: [], - name: 'imageHash', - outputs: [ - { - internalType: 'bytes32', - name: '', - type: 'bytes32' - } - ], - stateMutability: 'view', - type: 'function' - }, - { - inputs: [ - { - internalType: 'bytes32', - name: '_hash', - type: 'bytes32' - }, - { - internalType: 'bytes', - name: '_signatures', - type: 'bytes' - } - ], - name: 'isValidSignature', - outputs: [ - { - internalType: 'bytes4', - name: '', - type: 'bytes4' - } - ], - stateMutability: 'view', - type: 'function' - }, - { - inputs: [ - { - internalType: 'bytes', - name: '_data', - type: 'bytes' - }, - { - internalType: 'bytes', - name: '_signatures', - type: 'bytes' - } - ], - name: 'isValidSignature', - outputs: [ - { - internalType: 'bytes4', - name: '', - type: 'bytes4' - } - ], - stateMutability: 'view', - type: 'function' - }, - { - inputs: [], - name: 'nonce', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256' - } - ], - stateMutability: 'view', - type: 'function' - }, - { - inputs: [ - { - internalType: 'address', - name: '', - type: 'address' - }, - { - internalType: 'address', - name: '', - type: 'address' - }, - { - internalType: 'uint256[]', - name: '', - type: 'uint256[]' - }, - { - internalType: 'uint256[]', - name: '', - type: 'uint256[]' - }, - { - internalType: 'bytes', - name: '', - type: 'bytes' - } - ], - name: 'onERC1155BatchReceived', - outputs: [ - { - internalType: 'bytes4', - name: '', - type: 'bytes4' - } - ], - stateMutability: 'nonpayable', - type: 'function' - }, - { - inputs: [ - { - internalType: 'address', - name: '', - type: 'address' - }, - { - internalType: 'address', - name: '', - type: 'address' - }, - { - internalType: 'uint256', - name: '', - type: 'uint256' - }, - { - internalType: 'uint256', - name: '', - type: 'uint256' - }, - { - internalType: 'bytes', - name: '', - type: 'bytes' - } - ], - name: 'onERC1155Received', - outputs: [ - { - internalType: 'bytes4', - name: '', - type: 'bytes4' - } - ], - stateMutability: 'nonpayable', - type: 'function' - }, - { - inputs: [ - { - internalType: 'address', - name: '', - type: 'address' - }, - { - internalType: 'address', - name: '', - type: 'address' - }, - { - internalType: 'uint256', - name: '', - type: 'uint256' - }, - { - internalType: 'bytes', - name: '', - type: 'bytes' - } - ], - name: 'onERC721Received', - outputs: [ - { - internalType: 'bytes4', - name: '', - type: 'bytes4' - } - ], - stateMutability: 'nonpayable', - type: 'function' - }, - { - inputs: [ - { - internalType: 'bytes4', - name: '_signature', - type: 'bytes4' - } - ], - name: 'readHook', - outputs: [ - { - internalType: 'address', - name: '', - type: 'address' - } - ], - stateMutability: 'view', - type: 'function' - }, - { - inputs: [ - { - internalType: 'uint256', - name: '_space', - type: 'uint256' - } - ], - name: 'readNonce', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256' - } - ], - stateMutability: 'view', - type: 'function' - }, - { - inputs: [ - { - internalType: 'bytes4', - name: '_signature', - type: 'bytes4' - } - ], - name: 'removeHook', - outputs: [], - stateMutability: 'nonpayable', - type: 'function' - }, - { - inputs: [ - { - components: [ - { - internalType: 'bool', - name: 'delegateCall', - type: 'bool' - }, - { - internalType: 'bool', - name: 'revertOnError', - type: 'bool' - }, - { - internalType: 'uint256', - name: 'gasLimit', - type: 'uint256' - }, - { - internalType: 'address', - name: 'target', - type: 'address' - }, - { - internalType: 'uint256', - name: 'value', - type: 'uint256' - }, - { - internalType: 'bytes', - name: 'data', - type: 'bytes' - } - ], - internalType: 'struct IModuleCalls.Transaction[]', - name: '_txs', - type: 'tuple[]' - } - ], - name: 'selfExecute', - outputs: [], - stateMutability: 'nonpayable', - type: 'function' - }, - { - inputs: [ - { - internalType: 'bytes4', - name: '_interfaceID', - type: 'bytes4' - } - ], - name: 'supportsInterface', - outputs: [ - { - internalType: 'bool', - name: '', - type: 'bool' - } - ], - stateMutability: 'pure', - type: 'function' - }, - { - inputs: [ - { - internalType: 'bytes32', - name: '_imageHash', - type: 'bytes32' - } - ], - name: 'updateImageHash', - outputs: [], - stateMutability: 'nonpayable', - type: 'function' - }, - { - inputs: [ - { - internalType: 'address', - name: '_implementation', - type: 'address' - } - ], - name: 'updateImplementation', - outputs: [], - stateMutability: 'nonpayable', - type: 'function' - }, - { - stateMutability: 'payable', - type: 'receive' - } - ], - bytecode: - '0x608060405234801561001057600080fd5b50612ce7806100206000396000f3fe6080604052600436106101125760003560e01c806351605d80116100a557806390042baf11610074578063b93ea7ad11610059578063b93ea7ad146103d0578063bc197c81146103f0578063f23a6e611461041057610119565b806390042baf146103a8578063affed0e0146103bb57610119565b806351605d801461032657806361c2926c146103485780637a9a1628146103685780638c3f55631461038857610119565b80631a9b2337116100e15780631a9b23371461029957806320c13b0b146102c657806329561426146102e65780634fcf3eca1461030657610119565b806301ffc9a7146101f4578063025b22bc1461022a578063150b7a021461024c5780631626ba7e1461027957610119565b3661011957005b60006101486000357fffffffff0000000000000000000000000000000000000000000000000000000016610430565b905073ffffffffffffffffffffffffffffffffffffffff8116156101f1576000808273ffffffffffffffffffffffffffffffffffffffff166000366040518083838082843760405192019450600093509091505080830381855af49150503d80600081146101d2576040519150601f19603f3d011682016040523d82523d6000602084013e6101d7565b606091505b5091509150816101e957805160208201fd5b805160208201f35b50005b34801561020057600080fd5b5061021461020f3660046124d4565b610486565b60405161022191906126eb565b60405180910390f35b34801561023657600080fd5b5061024a610245366004612221565b610491565b005b34801561025857600080fd5b5061026c6102673660046122f2565b6105b2565b6040516102219190612718565b34801561028557600080fd5b5061026c61029436600461248a565b6105dc565b3480156102a557600080fd5b506102b96102b43660046124d4565b610655565b60405161022191906126ca565b3480156102d257600080fd5b5061026c6102e1366004612520565b610660565b3480156102f257600080fd5b5061024a610301366004612472565b6106ba565b34801561031257600080fd5b5061024a6103213660046124d4565b6107c8565b34801561033257600080fd5b5061033b6108a6565b60405161022191906126f6565b34801561035457600080fd5b5061024a6103633660046123d5565b6108d6565b34801561037457600080fd5b5061024a610383366004612408565b61096f565b34801561039457600080fd5b5061033b6103a3366004612472565b6109eb565b6102b96103b6366004612589565b610a17565b3480156103c757600080fd5b5061033b610acb565b3480156103dc57600080fd5b5061024a6103eb3660046124ee565b610ad7565b3480156103fc57600080fd5b5061026c61040b36600461223b565b610bb0565b34801561041c57600080fd5b5061026c61042b36600461235f565b610bdd565b600061047e7fbe27a319efc8734e89e26ba4bc95f5c788584163b959f03fa04e2d7ab4b9a1207fffffffff000000000000000000000000000000000000000000000000000000008416610c08565b90505b919050565b600061047e82610c35565b3330146104e9576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526027815260200180612c8b6027913960400191505060405180910390fd5b6105088173ffffffffffffffffffffffffffffffffffffffff16610c92565b61055d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526039815260200180612b716039913960400191505060405180910390fd5b61056681610c98565b6040805173ffffffffffffffffffffffffffffffffffffffff8316815290517f310ba5f1d2ed074b51e2eccd052a47ae9ab7c6b800d1fca3db3999d6a592ca039181900360200190a150565b7f150b7a020000000000000000000000000000000000000000000000000000000095945050505050565b60006106266105ea85610c9c565b84848080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250610cfc92505050565b1561064e57507f1626ba7e000000000000000000000000000000000000000000000000000000005b9392505050565b600061047e82610430565b600061068a6105ea86866040518083838082843760405192018290039091209350610c9c92505050565b156106b257507f20c13b0b000000000000000000000000000000000000000000000000000000005b949350505050565b333014610712576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526027815260200180612c8b6027913960400191505060405180910390fd5b80610768576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260378152602001806129986037913960400191505060405180910390fd5b6107927fea7157fa25e3aa17d0ae2d5280fa4e24d421c61842aa85e45194e1145aa72bf882610ef4565b6040805182815290517f307ed6bd941ee9fc80f369c94af5fa11e25bab5102a6140191756c5474a30bfa9181900360200190a150565b333014610820576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526027815260200180612c8b6027913960400191505060405180910390fd5b600061082b82610430565b73ffffffffffffffffffffffffffffffffffffffff161415610898576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602b8152602001806129cf602b913960400191505060405180910390fd5b6108a3816000610ef8565b50565b60006108d17fea7157fa25e3aa17d0ae2d5280fa4e24d421c61842aa85e45194e1145aa72bf8610f5b565b905090565b33301461092e576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526027815260200180612c8b6027913960400191505060405180910390fd5b600061095f826040516020016109449190612836565b60405160208183030381529060405280519060200120610c9c565b905061096b8183610f5f565b5050565b6109788261112e565b6000610990838560405160200161094492919061287d565b905061099c8183610cfc565b6109db576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016109d2906127d9565b60405180910390fd5b6109e58185610f5f565b50505050565b600061047e7f8d0bf1fd623d628c741362c1289948e57b3e2905218c676d3e69abee36d6ae2e83610c08565b6000333014610a71576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526027815260200180612c8b6027913960400191505060405180910390fd5b81516020830134f06040805173ffffffffffffffffffffffffffffffffffffffff8316815290519192507fa506ad4e7f05eceba62a023c3219e5bd98a615f4fa87e2afb08a2da5cf62bf0c919081900360200190a1919050565b60006108d160006109eb565b333014610b2f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526027815260200180612c8b6027913960400191505060405180910390fd5b6000610b3a83610430565b73ffffffffffffffffffffffffffffffffffffffff1614610ba6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602c815260200180612ae3602c913960400191505060405180910390fd5b61096b8282610ef8565b7fbc197c810000000000000000000000000000000000000000000000000000000098975050505050505050565b7ff23a6e61000000000000000000000000000000000000000000000000000000009695505050505050565b60408051602080820194909452808201929092528051808303820181526060909201905280519101205490565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f90042baf000000000000000000000000000000000000000000000000000000001415610c8957506001610481565b61047e826111d2565b3b151590565b3055565b604080517f19010000000000000000000000000000000000000000000000000000000000006020808301919091524660228301523060601b6042830152605680830194909452825180830390940184526076909101909152815191012090565b6000806000610d0a84611313565b909250905061ffff821660005b8551831015610ed15760008080610d2e8987611381565b975060ff91821694501691506001831415610d5657610d4d8987611402565b96509050610e7a565b82610d82576060610d678a8861147a565b97509050610d758b8261152b565b9150828501945050610e7a565b6002831415610e2957610d958987611402565b965090506000610da58a886118b5565b975061ffff1690506060610dba8b8984611926565b98509050610dc98c8483611a15565b610e1e576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526032815260200180612ab16032913960400191505060405180910390fd5b505092810192610e7a565b6040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602c81526020018061296c602c913960400191505060405180910390fd5b848282604051602001808481526020018381526020018273ffffffffffffffffffffffffffffffffffffffff1681526020019350505050604051602081830303815290604052805190602001209450505050610d17565b8361ffff168110158015610ee95750610ee982611c5d565b979650505050505050565b9055565b61096b7fbe27a319efc8734e89e26ba4bc95f5c788584163b959f03fa04e2d7ab4b9a1207fffffffff00000000000000000000000000000000000000000000000000000000841673ffffffffffffffffffffffffffffffffffffffff8416611c9a565b5490565b60005b8151811015611129576000828281518110610f7957fe5b602002602001015190506000606082604001515a1015610fc5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016109d29061277c565b82511561105d57826060015173ffffffffffffffffffffffffffffffffffffffff168360400151600014610ffd578360400151610fff565b5a5b8460a0015160405161101191906126ae565b6000604051808303818686f4925050503d806000811461104d576040519150601f19603f3d011682016040523d82523d6000602084013e611052565b606091505b5090925090506110f2565b826060015173ffffffffffffffffffffffffffffffffffffffff1683608001518460400151600014611093578460400151611095565b5a5b908560a001516040516110a891906126ae565b600060405180830381858888f193505050503d80600081146110e6576040519150601f19603f3d011682016040523d82523d6000602084013e6110eb565b606091505b5090925090505b8115611113578560405161110691906126f6565b60405180910390a061111e565b61111e838783611cc8565b505050600101610f62565b505050565b60008061113a83611d18565b915091506000611149836109eb565b9050808214611184576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016109d290612745565b600182016111928482611d31565b7f1f180c27086c7a39ea2a7b25239d1ab92348f07ca7bb59d1438fcf527568f88184826040516111c3929190612896565b60405180910390a15050505050565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167fec6aba5000000000000000000000000000000000000000000000000000000000148061126557507fffffffff0000000000000000000000000000000000000000000000000000000082167f4e2312e000000000000000000000000000000000000000000000000000000000145b806112b157507fffffffff0000000000000000000000000000000000000000000000000000000082167f150b7a0200000000000000000000000000000000000000000000000000000000145b806112fd57507fffffffff0000000000000000000000000000000000000000000000000000000082167fc0ee0b8a00000000000000000000000000000000000000000000000000000000145b1561130a57506001610481565b61047e82611d5c565b6020810151815160f09190911c9060029081111561137c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526027815260200180612a1d6027913960400191505060405180910390fd5b915091565b8082016020015160f881901c9060f01c60ff16600283018381116113a157fe5b84518111156113fb576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526026815260200180612be66026913960400191505060405180910390fd5b9250925092565b8082016020015160601c6014820182811161141957fe5b8351811115611473576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260238152602001806129fa6023913960400191505060405180910390fd5b9250929050565b6040805160428082526080820190925260609160009190602082018180368337019050509150828401602001805160208401526020810151604084015260228101516042840152506042830190508281116114d157fe5b8351811115611473576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526023815260200180612b4e6023913960400191505060405180910390fd5b60008151604214611587576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252603a815260200180612932603a913960400191505060405180910390fd5b60008260018451038151811061159957fe5b602001015160f81c60f81b60f81c60ff1690506000836040815181106115bb57fe5b016020015160f81c905060006115d18582611db9565b905060006115e0866020611db9565b90507f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a081111561165b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252603d8152602001806128f5603d913960400191505060405180910390fd5b8260ff16601b1415801561167357508260ff16601c14155b156116c9576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252603d815260200180612a44603d913960400191505060405180910390fd5b600184141561173d5760018784848460405160008152602001604052604051808581526020018460ff1681526020018381526020018281526020019450505050506020604051602081039080840390855afa15801561172c573d6000803e3d6000fd5b50505060206040510351945061183f565b60028414156117ee5760018760405160200180807f19457468657265756d205369676e6564204d6573736167653a0a333200000000815250601c018281526020019150506040516020818303038152906040528051906020012084848460405160008152602001604052604051808581526020018460ff1681526020018381526020018281526020019450505050506020604051602081039080840390855afa15801561172c573d6000803e3d6000fd5b6040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252603c815260200180612baa603c913960400191505060405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff85166118ab576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526030815260200180612a816030913960400191505060405180910390fd5b5050505092915050565b8082016020015160f01c600282018281116118cc57fe5b8351811115611473576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526022815260200180612c2d6022913960400191505060405180910390fd5b606060008267ffffffffffffffff8111801561194157600080fd5b506040519080825280601f01601f19166020018201604052801561196c576020820181803683370190505b509150838501602001600060205b858110156119935790820151848201526020810161197a565b84860160200180519390920151908501525250828201838110156119b357fe5b8451811115611a0d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526021815260200180612c0c6021913960400191505060405180910390fd5b935093915050565b60008082600184510381518110611a2857fe5b016020015160f81c90506001811480611a415750600281145b15611a85578373ffffffffffffffffffffffffffffffffffffffff16611a67868561152b565b73ffffffffffffffffffffffffffffffffffffffff16149150611c55565b6003811415611c045782517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff81018452604080517f1626ba7e000000000000000000000000000000000000000000000000000000008152600481018881526024820192835286516044830152865173ffffffffffffffffffffffffffffffffffffffff891693631626ba7e938b938a9390929160640190602085019080838360005b83811015611b3f578181015183820152602001611b27565b50505050905090810190601f168015611b6c5780820380516001836020036101000a031916815260200191505b50935050505060206040518083038186803b158015611b8a57600080fd5b505afa158015611b9e573d6000803e3d6000fd5b505050506040513d6020811015611bb457600080fd5b50519084527fffffffff00000000000000000000000000000000000000000000000000000000167f1626ba7e00000000000000000000000000000000000000000000000000000000149150611c55565b6040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252603f815260200180612b0f603f913960400191505060405180910390fd5b509392505050565b6000811580159061047e5750611c927fea7157fa25e3aa17d0ae2d5280fa4e24d421c61842aa85e45194e1145aa72bf8610f5b565b909114919050565b6040805160208082019590955280820193909352805180840382018152606090930190528151919092012055565b826020015115611cda57805160208201fd5b7f3dbd1590ea96dd3253a91f24e64e3a502e1225d602a5731357bc12643070ccd78282604051611d0b9291906126ff565b60405180910390a1505050565b606081901c916bffffffffffffffffffffffff90911690565b61096b7f8d0bf1fd623d628c741362c1289948e57b3e2905218c676d3e69abee36d6ae2e8383611c9a565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f025b22bc000000000000000000000000000000000000000000000000000000001415611db057506001610481565b61047e82611e21565b60008160200183511015611e18576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252603c815260200180612c4f603c913960400191505060405180910390fd5b50016020015190565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f389901c7000000000000000000000000000000000000000000000000000000001415611e7557506001610481565b61047e8260007fffffffff0000000000000000000000000000000000000000000000000000000082167f783649a6000000000000000000000000000000000000000000000000000000001415611ecd57506001610481565b61047e8260007fffffffff0000000000000000000000000000000000000000000000000000000082161580611f4357507fffffffff0000000000000000000000000000000000000000000000000000000082167f36e7817500000000000000000000000000000000000000000000000000000000145b15611f5057506001610481565b7f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff0000000000000000000000000000000000000000000000000000000083161461047e565b803573ffffffffffffffffffffffffffffffffffffffff8116811461048157600080fd5b600082601f830112611fce578081fd5b8135602067ffffffffffffffff80831115611fe557fe5b611ff282838502016128a4565b83815282810190868401865b868110156120ce578135890160c0807fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0838e0301121561203c57898afd5b604080518281018181108a8211171561205157fe5b825261205e848b0161211e565b815261206b82850161211e565b8a8201526060808501358383015260809250612088838601611f9a565b9082015260a084810135838301529284013592898411156120a7578c8dfd5b6120b58f8c8688010161219e565b9082015287525050509285019290850190600101611ffe565b509098975050505050505050565b60008083601f8401126120ed578182fd5b50813567ffffffffffffffff811115612104578182fd5b602083019150836020808302850101111561147357600080fd5b8035801515811461048157600080fd5b80357fffffffff000000000000000000000000000000000000000000000000000000008116811461048157600080fd5b60008083601f84011261216f578182fd5b50813567ffffffffffffffff811115612186578182fd5b60208301915083602082850101111561147357600080fd5b600082601f8301126121ae578081fd5b813567ffffffffffffffff8111156121c257fe5b6121f360207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f840116016128a4565b818152846020838601011115612207578283fd5b816020850160208301379081016020019190915292915050565b600060208284031215612232578081fd5b61064e82611f9a565b60008060008060008060008060a0898b031215612256578384fd5b61225f89611f9a565b975061226d60208a01611f9a565b9650604089013567ffffffffffffffff80821115612289578586fd5b6122958c838d016120dc565b909850965060608b01359150808211156122ad578586fd5b6122b98c838d016120dc565b909650945060808b01359150808211156122d1578384fd5b506122de8b828c0161215e565b999c989b5096995094979396929594505050565b600080600080600060808688031215612309578081fd5b61231286611f9a565b945061232060208701611f9a565b935060408601359250606086013567ffffffffffffffff811115612342578182fd5b61234e8882890161215e565b969995985093965092949392505050565b60008060008060008060a08789031215612377578182fd5b61238087611f9a565b955061238e60208801611f9a565b94506040870135935060608701359250608087013567ffffffffffffffff8111156123b7578283fd5b6123c389828a0161215e565b979a9699509497509295939492505050565b6000602082840312156123e6578081fd5b813567ffffffffffffffff8111156123fc578182fd5b6106b284828501611fbe565b60008060006060848603121561241c578283fd5b833567ffffffffffffffff80821115612433578485fd5b61243f87838801611fbe565b945060208601359350604086013591508082111561245b578283fd5b506124688682870161219e565b9150509250925092565b600060208284031215612483578081fd5b5035919050565b60008060006040848603121561249e578283fd5b83359250602084013567ffffffffffffffff8111156124bb578283fd5b6124c78682870161215e565b9497909650939450505050565b6000602082840312156124e5578081fd5b61064e8261212e565b60008060408385031215612500578182fd5b6125098361212e565b915061251760208401611f9a565b90509250929050565b60008060008060408587031215612535578182fd5b843567ffffffffffffffff8082111561254c578384fd5b6125588883890161215e565b90965094506020870135915080821115612570578384fd5b5061257d8782880161215e565b95989497509550505050565b60006020828403121561259a578081fd5b813567ffffffffffffffff8111156125b0578182fd5b6106b28482850161219e565b6000815180845260208085019450848183028601828601855b858110156126575783830389528151805115158452858101511515868501526040808201519085015260608082015173ffffffffffffffffffffffffffffffffffffffff16908501526080808201519085015260a09081015160c09185018290529061264381860183612664565b9a87019a94505050908401906001016125d5565b5090979650505050505050565b6000815180845261267c8160208601602086016128c8565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b600082516126c08184602087016128c8565b9190910192915050565b73ffffffffffffffffffffffffffffffffffffffff91909116815260200190565b901515815260200190565b90815260200190565b6000838252604060208301526106b26040830184612664565b7fffffffff0000000000000000000000000000000000000000000000000000000091909116815260200190565b6020808252601f908201527f4d61696e4d6f64756c65235f617574683a20494e56414c49445f4e4f4e434500604082015260600190565b60208082526024908201527f4d6f64756c6543616c6c73235f657865637574653a204e4f545f454e4f55474860408201527f5f47415300000000000000000000000000000000000000000000000000000000606082015260800190565b60208082526026908201527f4d6f64756c6543616c6c7323657865637574653a20494e56414c49445f53494760408201527f4e41545552450000000000000000000000000000000000000000000000000000606082015260800190565b600060408252600560408301527f73656c663a00000000000000000000000000000000000000000000000000000060608301526080602083015261064e60808301846125bc565b6000838252604060208301526106b260408301846125bc565b918252602082015260400190565b60405181810167ffffffffffffffff811182821017156128c057fe5b604052919050565b60005b838110156128e35781810151838201526020016128cb565b838111156109e5575050600091015256fe5369676e617475726556616c696461746f72237265636f7665725369676e65723a20696e76616c6964207369676e6174757265202773272076616c75655369676e617475726556616c696461746f72237265636f7665725369676e65723a20696e76616c6964207369676e6174757265206c656e6774684d6f64756c6541757468235f7369676e617475726556616c69646174696f6e20494e56414c49445f464c41474d6f64756c654175746855706772616461626c6523757064617465496d6167654861736820494e56414c49445f494d4147455f484153484d6f64756c65486f6f6b732372656d6f7665486f6f6b3a20484f4f4b5f4e4f545f524547495354455245444c696242797465732372656164416464726573733a204f55545f4f465f424f554e44534c696242797465732372656164466972737455696e7431363a204f55545f4f465f424f554e44535369676e617475726556616c696461746f72237265636f7665725369676e65723a20696e76616c6964207369676e6174757265202776272076616c75655369676e617475726556616c696461746f72237265636f7665725369676e65723a20494e56414c49445f5349474e45524d6f64756c6541757468235f7369676e617475726556616c69646174696f6e3a20494e56414c49445f5349474e41545552454d6f64756c65486f6f6b7323616464486f6f6b3a20484f4f4b5f414c52454144595f524547495354455245445369676e617475726556616c696461746f7223697356616c69645369676e61747572653a20554e535550504f525445445f5349474e41545552455f545950454c696242797465732372656164427974657336363a204f55545f4f465f424f554e44534d6f64756c6555706461746523757064617465496d706c656d656e746174696f6e3a20494e56414c49445f494d504c454d454e544154494f4e5369676e617475726556616c696461746f72237265636f7665725369676e65723a20554e535550504f525445445f5349474e41545552455f545950454c69624279746573237265616455696e743855696e74383a204f55545f4f465f424f554e44534c69624279746573237265616442797465733a204f55545f4f465f424f554e44534c69624279746573237265616455696e7431363a204f55545f4f465f424f554e44534c696242797465732372656164427974657333323a20475245415445525f4f525f455155414c5f544f5f33325f4c454e4754485f52455155495245444d6f64756c6553656c6641757468236f6e6c7953656c663a204e4f545f415554484f52495a4544a2646970667358221220aebb8d931ef86555b6441c416b208bb9fe8fe0974c5733ebbccce548296c37ce64736f6c63430007060033', - deployedBytecode: - '0x6080604052600436106101125760003560e01c806351605d80116100a557806390042baf11610074578063b93ea7ad11610059578063b93ea7ad146103d0578063bc197c81146103f0578063f23a6e611461041057610119565b806390042baf146103a8578063affed0e0146103bb57610119565b806351605d801461032657806361c2926c146103485780637a9a1628146103685780638c3f55631461038857610119565b80631a9b2337116100e15780631a9b23371461029957806320c13b0b146102c657806329561426146102e65780634fcf3eca1461030657610119565b806301ffc9a7146101f4578063025b22bc1461022a578063150b7a021461024c5780631626ba7e1461027957610119565b3661011957005b60006101486000357fffffffff0000000000000000000000000000000000000000000000000000000016610430565b905073ffffffffffffffffffffffffffffffffffffffff8116156101f1576000808273ffffffffffffffffffffffffffffffffffffffff166000366040518083838082843760405192019450600093509091505080830381855af49150503d80600081146101d2576040519150601f19603f3d011682016040523d82523d6000602084013e6101d7565b606091505b5091509150816101e957805160208201fd5b805160208201f35b50005b34801561020057600080fd5b5061021461020f3660046124d4565b610486565b60405161022191906126eb565b60405180910390f35b34801561023657600080fd5b5061024a610245366004612221565b610491565b005b34801561025857600080fd5b5061026c6102673660046122f2565b6105b2565b6040516102219190612718565b34801561028557600080fd5b5061026c61029436600461248a565b6105dc565b3480156102a557600080fd5b506102b96102b43660046124d4565b610655565b60405161022191906126ca565b3480156102d257600080fd5b5061026c6102e1366004612520565b610660565b3480156102f257600080fd5b5061024a610301366004612472565b6106ba565b34801561031257600080fd5b5061024a6103213660046124d4565b6107c8565b34801561033257600080fd5b5061033b6108a6565b60405161022191906126f6565b34801561035457600080fd5b5061024a6103633660046123d5565b6108d6565b34801561037457600080fd5b5061024a610383366004612408565b61096f565b34801561039457600080fd5b5061033b6103a3366004612472565b6109eb565b6102b96103b6366004612589565b610a17565b3480156103c757600080fd5b5061033b610acb565b3480156103dc57600080fd5b5061024a6103eb3660046124ee565b610ad7565b3480156103fc57600080fd5b5061026c61040b36600461223b565b610bb0565b34801561041c57600080fd5b5061026c61042b36600461235f565b610bdd565b600061047e7fbe27a319efc8734e89e26ba4bc95f5c788584163b959f03fa04e2d7ab4b9a1207fffffffff000000000000000000000000000000000000000000000000000000008416610c08565b90505b919050565b600061047e82610c35565b3330146104e9576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526027815260200180612c8b6027913960400191505060405180910390fd5b6105088173ffffffffffffffffffffffffffffffffffffffff16610c92565b61055d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526039815260200180612b716039913960400191505060405180910390fd5b61056681610c98565b6040805173ffffffffffffffffffffffffffffffffffffffff8316815290517f310ba5f1d2ed074b51e2eccd052a47ae9ab7c6b800d1fca3db3999d6a592ca039181900360200190a150565b7f150b7a020000000000000000000000000000000000000000000000000000000095945050505050565b60006106266105ea85610c9c565b84848080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250610cfc92505050565b1561064e57507f1626ba7e000000000000000000000000000000000000000000000000000000005b9392505050565b600061047e82610430565b600061068a6105ea86866040518083838082843760405192018290039091209350610c9c92505050565b156106b257507f20c13b0b000000000000000000000000000000000000000000000000000000005b949350505050565b333014610712576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526027815260200180612c8b6027913960400191505060405180910390fd5b80610768576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260378152602001806129986037913960400191505060405180910390fd5b6107927fea7157fa25e3aa17d0ae2d5280fa4e24d421c61842aa85e45194e1145aa72bf882610ef4565b6040805182815290517f307ed6bd941ee9fc80f369c94af5fa11e25bab5102a6140191756c5474a30bfa9181900360200190a150565b333014610820576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526027815260200180612c8b6027913960400191505060405180910390fd5b600061082b82610430565b73ffffffffffffffffffffffffffffffffffffffff161415610898576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602b8152602001806129cf602b913960400191505060405180910390fd5b6108a3816000610ef8565b50565b60006108d17fea7157fa25e3aa17d0ae2d5280fa4e24d421c61842aa85e45194e1145aa72bf8610f5b565b905090565b33301461092e576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526027815260200180612c8b6027913960400191505060405180910390fd5b600061095f826040516020016109449190612836565b60405160208183030381529060405280519060200120610c9c565b905061096b8183610f5f565b5050565b6109788261112e565b6000610990838560405160200161094492919061287d565b905061099c8183610cfc565b6109db576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016109d2906127d9565b60405180910390fd5b6109e58185610f5f565b50505050565b600061047e7f8d0bf1fd623d628c741362c1289948e57b3e2905218c676d3e69abee36d6ae2e83610c08565b6000333014610a71576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526027815260200180612c8b6027913960400191505060405180910390fd5b81516020830134f06040805173ffffffffffffffffffffffffffffffffffffffff8316815290519192507fa506ad4e7f05eceba62a023c3219e5bd98a615f4fa87e2afb08a2da5cf62bf0c919081900360200190a1919050565b60006108d160006109eb565b333014610b2f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526027815260200180612c8b6027913960400191505060405180910390fd5b6000610b3a83610430565b73ffffffffffffffffffffffffffffffffffffffff1614610ba6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602c815260200180612ae3602c913960400191505060405180910390fd5b61096b8282610ef8565b7fbc197c810000000000000000000000000000000000000000000000000000000098975050505050505050565b7ff23a6e61000000000000000000000000000000000000000000000000000000009695505050505050565b60408051602080820194909452808201929092528051808303820181526060909201905280519101205490565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f90042baf000000000000000000000000000000000000000000000000000000001415610c8957506001610481565b61047e826111d2565b3b151590565b3055565b604080517f19010000000000000000000000000000000000000000000000000000000000006020808301919091524660228301523060601b6042830152605680830194909452825180830390940184526076909101909152815191012090565b6000806000610d0a84611313565b909250905061ffff821660005b8551831015610ed15760008080610d2e8987611381565b975060ff91821694501691506001831415610d5657610d4d8987611402565b96509050610e7a565b82610d82576060610d678a8861147a565b97509050610d758b8261152b565b9150828501945050610e7a565b6002831415610e2957610d958987611402565b965090506000610da58a886118b5565b975061ffff1690506060610dba8b8984611926565b98509050610dc98c8483611a15565b610e1e576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526032815260200180612ab16032913960400191505060405180910390fd5b505092810192610e7a565b6040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602c81526020018061296c602c913960400191505060405180910390fd5b848282604051602001808481526020018381526020018273ffffffffffffffffffffffffffffffffffffffff1681526020019350505050604051602081830303815290604052805190602001209450505050610d17565b8361ffff168110158015610ee95750610ee982611c5d565b979650505050505050565b9055565b61096b7fbe27a319efc8734e89e26ba4bc95f5c788584163b959f03fa04e2d7ab4b9a1207fffffffff00000000000000000000000000000000000000000000000000000000841673ffffffffffffffffffffffffffffffffffffffff8416611c9a565b5490565b60005b8151811015611129576000828281518110610f7957fe5b602002602001015190506000606082604001515a1015610fc5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016109d29061277c565b82511561105d57826060015173ffffffffffffffffffffffffffffffffffffffff168360400151600014610ffd578360400151610fff565b5a5b8460a0015160405161101191906126ae565b6000604051808303818686f4925050503d806000811461104d576040519150601f19603f3d011682016040523d82523d6000602084013e611052565b606091505b5090925090506110f2565b826060015173ffffffffffffffffffffffffffffffffffffffff1683608001518460400151600014611093578460400151611095565b5a5b908560a001516040516110a891906126ae565b600060405180830381858888f193505050503d80600081146110e6576040519150601f19603f3d011682016040523d82523d6000602084013e6110eb565b606091505b5090925090505b8115611113578560405161110691906126f6565b60405180910390a061111e565b61111e838783611cc8565b505050600101610f62565b505050565b60008061113a83611d18565b915091506000611149836109eb565b9050808214611184576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016109d290612745565b600182016111928482611d31565b7f1f180c27086c7a39ea2a7b25239d1ab92348f07ca7bb59d1438fcf527568f88184826040516111c3929190612896565b60405180910390a15050505050565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167fec6aba5000000000000000000000000000000000000000000000000000000000148061126557507fffffffff0000000000000000000000000000000000000000000000000000000082167f4e2312e000000000000000000000000000000000000000000000000000000000145b806112b157507fffffffff0000000000000000000000000000000000000000000000000000000082167f150b7a0200000000000000000000000000000000000000000000000000000000145b806112fd57507fffffffff0000000000000000000000000000000000000000000000000000000082167fc0ee0b8a00000000000000000000000000000000000000000000000000000000145b1561130a57506001610481565b61047e82611d5c565b6020810151815160f09190911c9060029081111561137c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526027815260200180612a1d6027913960400191505060405180910390fd5b915091565b8082016020015160f881901c9060f01c60ff16600283018381116113a157fe5b84518111156113fb576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526026815260200180612be66026913960400191505060405180910390fd5b9250925092565b8082016020015160601c6014820182811161141957fe5b8351811115611473576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260238152602001806129fa6023913960400191505060405180910390fd5b9250929050565b6040805160428082526080820190925260609160009190602082018180368337019050509150828401602001805160208401526020810151604084015260228101516042840152506042830190508281116114d157fe5b8351811115611473576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526023815260200180612b4e6023913960400191505060405180910390fd5b60008151604214611587576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252603a815260200180612932603a913960400191505060405180910390fd5b60008260018451038151811061159957fe5b602001015160f81c60f81b60f81c60ff1690506000836040815181106115bb57fe5b016020015160f81c905060006115d18582611db9565b905060006115e0866020611db9565b90507f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a081111561165b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252603d8152602001806128f5603d913960400191505060405180910390fd5b8260ff16601b1415801561167357508260ff16601c14155b156116c9576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252603d815260200180612a44603d913960400191505060405180910390fd5b600184141561173d5760018784848460405160008152602001604052604051808581526020018460ff1681526020018381526020018281526020019450505050506020604051602081039080840390855afa15801561172c573d6000803e3d6000fd5b50505060206040510351945061183f565b60028414156117ee5760018760405160200180807f19457468657265756d205369676e6564204d6573736167653a0a333200000000815250601c018281526020019150506040516020818303038152906040528051906020012084848460405160008152602001604052604051808581526020018460ff1681526020018381526020018281526020019450505050506020604051602081039080840390855afa15801561172c573d6000803e3d6000fd5b6040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252603c815260200180612baa603c913960400191505060405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff85166118ab576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526030815260200180612a816030913960400191505060405180910390fd5b5050505092915050565b8082016020015160f01c600282018281116118cc57fe5b8351811115611473576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526022815260200180612c2d6022913960400191505060405180910390fd5b606060008267ffffffffffffffff8111801561194157600080fd5b506040519080825280601f01601f19166020018201604052801561196c576020820181803683370190505b509150838501602001600060205b858110156119935790820151848201526020810161197a565b84860160200180519390920151908501525250828201838110156119b357fe5b8451811115611a0d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526021815260200180612c0c6021913960400191505060405180910390fd5b935093915050565b60008082600184510381518110611a2857fe5b016020015160f81c90506001811480611a415750600281145b15611a85578373ffffffffffffffffffffffffffffffffffffffff16611a67868561152b565b73ffffffffffffffffffffffffffffffffffffffff16149150611c55565b6003811415611c045782517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff81018452604080517f1626ba7e000000000000000000000000000000000000000000000000000000008152600481018881526024820192835286516044830152865173ffffffffffffffffffffffffffffffffffffffff891693631626ba7e938b938a9390929160640190602085019080838360005b83811015611b3f578181015183820152602001611b27565b50505050905090810190601f168015611b6c5780820380516001836020036101000a031916815260200191505b50935050505060206040518083038186803b158015611b8a57600080fd5b505afa158015611b9e573d6000803e3d6000fd5b505050506040513d6020811015611bb457600080fd5b50519084527fffffffff00000000000000000000000000000000000000000000000000000000167f1626ba7e00000000000000000000000000000000000000000000000000000000149150611c55565b6040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252603f815260200180612b0f603f913960400191505060405180910390fd5b509392505050565b6000811580159061047e5750611c927fea7157fa25e3aa17d0ae2d5280fa4e24d421c61842aa85e45194e1145aa72bf8610f5b565b909114919050565b6040805160208082019590955280820193909352805180840382018152606090930190528151919092012055565b826020015115611cda57805160208201fd5b7f3dbd1590ea96dd3253a91f24e64e3a502e1225d602a5731357bc12643070ccd78282604051611d0b9291906126ff565b60405180910390a1505050565b606081901c916bffffffffffffffffffffffff90911690565b61096b7f8d0bf1fd623d628c741362c1289948e57b3e2905218c676d3e69abee36d6ae2e8383611c9a565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f025b22bc000000000000000000000000000000000000000000000000000000001415611db057506001610481565b61047e82611e21565b60008160200183511015611e18576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252603c815260200180612c4f603c913960400191505060405180910390fd5b50016020015190565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f389901c7000000000000000000000000000000000000000000000000000000001415611e7557506001610481565b61047e8260007fffffffff0000000000000000000000000000000000000000000000000000000082167f783649a6000000000000000000000000000000000000000000000000000000001415611ecd57506001610481565b61047e8260007fffffffff0000000000000000000000000000000000000000000000000000000082161580611f4357507fffffffff0000000000000000000000000000000000000000000000000000000082167f36e7817500000000000000000000000000000000000000000000000000000000145b15611f5057506001610481565b7f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff0000000000000000000000000000000000000000000000000000000083161461047e565b803573ffffffffffffffffffffffffffffffffffffffff8116811461048157600080fd5b600082601f830112611fce578081fd5b8135602067ffffffffffffffff80831115611fe557fe5b611ff282838502016128a4565b83815282810190868401865b868110156120ce578135890160c0807fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0838e0301121561203c57898afd5b604080518281018181108a8211171561205157fe5b825261205e848b0161211e565b815261206b82850161211e565b8a8201526060808501358383015260809250612088838601611f9a565b9082015260a084810135838301529284013592898411156120a7578c8dfd5b6120b58f8c8688010161219e565b9082015287525050509285019290850190600101611ffe565b509098975050505050505050565b60008083601f8401126120ed578182fd5b50813567ffffffffffffffff811115612104578182fd5b602083019150836020808302850101111561147357600080fd5b8035801515811461048157600080fd5b80357fffffffff000000000000000000000000000000000000000000000000000000008116811461048157600080fd5b60008083601f84011261216f578182fd5b50813567ffffffffffffffff811115612186578182fd5b60208301915083602082850101111561147357600080fd5b600082601f8301126121ae578081fd5b813567ffffffffffffffff8111156121c257fe5b6121f360207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f840116016128a4565b818152846020838601011115612207578283fd5b816020850160208301379081016020019190915292915050565b600060208284031215612232578081fd5b61064e82611f9a565b60008060008060008060008060a0898b031215612256578384fd5b61225f89611f9a565b975061226d60208a01611f9a565b9650604089013567ffffffffffffffff80821115612289578586fd5b6122958c838d016120dc565b909850965060608b01359150808211156122ad578586fd5b6122b98c838d016120dc565b909650945060808b01359150808211156122d1578384fd5b506122de8b828c0161215e565b999c989b5096995094979396929594505050565b600080600080600060808688031215612309578081fd5b61231286611f9a565b945061232060208701611f9a565b935060408601359250606086013567ffffffffffffffff811115612342578182fd5b61234e8882890161215e565b969995985093965092949392505050565b60008060008060008060a08789031215612377578182fd5b61238087611f9a565b955061238e60208801611f9a565b94506040870135935060608701359250608087013567ffffffffffffffff8111156123b7578283fd5b6123c389828a0161215e565b979a9699509497509295939492505050565b6000602082840312156123e6578081fd5b813567ffffffffffffffff8111156123fc578182fd5b6106b284828501611fbe565b60008060006060848603121561241c578283fd5b833567ffffffffffffffff80821115612433578485fd5b61243f87838801611fbe565b945060208601359350604086013591508082111561245b578283fd5b506124688682870161219e565b9150509250925092565b600060208284031215612483578081fd5b5035919050565b60008060006040848603121561249e578283fd5b83359250602084013567ffffffffffffffff8111156124bb578283fd5b6124c78682870161215e565b9497909650939450505050565b6000602082840312156124e5578081fd5b61064e8261212e565b60008060408385031215612500578182fd5b6125098361212e565b915061251760208401611f9a565b90509250929050565b60008060008060408587031215612535578182fd5b843567ffffffffffffffff8082111561254c578384fd5b6125588883890161215e565b90965094506020870135915080821115612570578384fd5b5061257d8782880161215e565b95989497509550505050565b60006020828403121561259a578081fd5b813567ffffffffffffffff8111156125b0578182fd5b6106b28482850161219e565b6000815180845260208085019450848183028601828601855b858110156126575783830389528151805115158452858101511515868501526040808201519085015260608082015173ffffffffffffffffffffffffffffffffffffffff16908501526080808201519085015260a09081015160c09185018290529061264381860183612664565b9a87019a94505050908401906001016125d5565b5090979650505050505050565b6000815180845261267c8160208601602086016128c8565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b600082516126c08184602087016128c8565b9190910192915050565b73ffffffffffffffffffffffffffffffffffffffff91909116815260200190565b901515815260200190565b90815260200190565b6000838252604060208301526106b26040830184612664565b7fffffffff0000000000000000000000000000000000000000000000000000000091909116815260200190565b6020808252601f908201527f4d61696e4d6f64756c65235f617574683a20494e56414c49445f4e4f4e434500604082015260600190565b60208082526024908201527f4d6f64756c6543616c6c73235f657865637574653a204e4f545f454e4f55474860408201527f5f47415300000000000000000000000000000000000000000000000000000000606082015260800190565b60208082526026908201527f4d6f64756c6543616c6c7323657865637574653a20494e56414c49445f53494760408201527f4e41545552450000000000000000000000000000000000000000000000000000606082015260800190565b600060408252600560408301527f73656c663a00000000000000000000000000000000000000000000000000000060608301526080602083015261064e60808301846125bc565b6000838252604060208301526106b260408301846125bc565b918252602082015260400190565b60405181810167ffffffffffffffff811182821017156128c057fe5b604052919050565b60005b838110156128e35781810151838201526020016128cb565b838111156109e5575050600091015256fe5369676e617475726556616c696461746f72237265636f7665725369676e65723a20696e76616c6964207369676e6174757265202773272076616c75655369676e617475726556616c696461746f72237265636f7665725369676e65723a20696e76616c6964207369676e6174757265206c656e6774684d6f64756c6541757468235f7369676e617475726556616c69646174696f6e20494e56414c49445f464c41474d6f64756c654175746855706772616461626c6523757064617465496d6167654861736820494e56414c49445f494d4147455f484153484d6f64756c65486f6f6b732372656d6f7665486f6f6b3a20484f4f4b5f4e4f545f524547495354455245444c696242797465732372656164416464726573733a204f55545f4f465f424f554e44534c696242797465732372656164466972737455696e7431363a204f55545f4f465f424f554e44535369676e617475726556616c696461746f72237265636f7665725369676e65723a20696e76616c6964207369676e6174757265202776272076616c75655369676e617475726556616c696461746f72237265636f7665725369676e65723a20494e56414c49445f5349474e45524d6f64756c6541757468235f7369676e617475726556616c69646174696f6e3a20494e56414c49445f5349474e41545552454d6f64756c65486f6f6b7323616464486f6f6b3a20484f4f4b5f414c52454144595f524547495354455245445369676e617475726556616c696461746f7223697356616c69645369676e61747572653a20554e535550504f525445445f5349474e41545552455f545950454c696242797465732372656164427974657336363a204f55545f4f465f424f554e44534d6f64756c6555706461746523757064617465496d706c656d656e746174696f6e3a20494e56414c49445f494d504c454d454e544154494f4e5369676e617475726556616c696461746f72237265636f7665725369676e65723a20554e535550504f525445445f5349474e41545552455f545950454c69624279746573237265616455696e743855696e74383a204f55545f4f465f424f554e44534c69624279746573237265616442797465733a204f55545f4f465f424f554e44534c69624279746573237265616455696e7431363a204f55545f4f465f424f554e44534c696242797465732372656164427974657333323a20475245415445525f4f525f455155414c5f544f5f33325f4c454e4754485f52455155495245444d6f64756c6553656c6641757468236f6e6c7953656c663a204e4f545f415554484f52495a4544a2646970667358221220aebb8d931ef86555b6441c416b208bb9fe8fe0974c5733ebbccce548296c37ce64736f6c63430007060033', - linkReferences: {}, - deployedLinkReferences: {} -} diff --git a/old/packages/tests/src/builds/v1/artifacts/MultiCallUtils.ts b/old/packages/tests/src/builds/v1/artifacts/MultiCallUtils.ts deleted file mode 100644 index 6d9f1ced3..000000000 --- a/old/packages/tests/src/builds/v1/artifacts/MultiCallUtils.ts +++ /dev/null @@ -1,281 +0,0 @@ -export const multiCallUtils = { - _format: 'hh-sol-artifact-1', - contractName: 'MultiCallUtils', - sourceName: 'contracts/modules/utils/MultiCallUtils.sol', - abi: [ - { - inputs: [ - { - internalType: 'address', - name: '_addr', - type: 'address' - } - ], - name: 'callBalanceOf', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256' - } - ], - stateMutability: 'view', - type: 'function' - }, - { - inputs: [], - name: 'callBlockNumber', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256' - } - ], - stateMutability: 'view', - type: 'function' - }, - { - inputs: [ - { - internalType: 'uint256', - name: '_i', - type: 'uint256' - } - ], - name: 'callBlockhash', - outputs: [ - { - internalType: 'bytes32', - name: '', - type: 'bytes32' - } - ], - stateMutability: 'view', - type: 'function' - }, - { - inputs: [], - name: 'callChainId', - outputs: [ - { - internalType: 'uint256', - name: 'id', - type: 'uint256' - } - ], - stateMutability: 'pure', - type: 'function' - }, - { - inputs: [ - { - internalType: 'address', - name: '_addr', - type: 'address' - } - ], - name: 'callCode', - outputs: [ - { - internalType: 'bytes', - name: 'code', - type: 'bytes' - } - ], - stateMutability: 'view', - type: 'function' - }, - { - inputs: [ - { - internalType: 'address', - name: '_addr', - type: 'address' - } - ], - name: 'callCodeHash', - outputs: [ - { - internalType: 'bytes32', - name: 'codeHash', - type: 'bytes32' - } - ], - stateMutability: 'view', - type: 'function' - }, - { - inputs: [ - { - internalType: 'address', - name: '_addr', - type: 'address' - } - ], - name: 'callCodeSize', - outputs: [ - { - internalType: 'uint256', - name: 'size', - type: 'uint256' - } - ], - stateMutability: 'view', - type: 'function' - }, - { - inputs: [], - name: 'callCoinbase', - outputs: [ - { - internalType: 'address', - name: '', - type: 'address' - } - ], - stateMutability: 'view', - type: 'function' - }, - { - inputs: [], - name: 'callDifficulty', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256' - } - ], - stateMutability: 'view', - type: 'function' - }, - { - inputs: [], - name: 'callGasLeft', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256' - } - ], - stateMutability: 'view', - type: 'function' - }, - { - inputs: [], - name: 'callGasLimit', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256' - } - ], - stateMutability: 'view', - type: 'function' - }, - { - inputs: [], - name: 'callGasPrice', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256' - } - ], - stateMutability: 'view', - type: 'function' - }, - { - inputs: [], - name: 'callOrigin', - outputs: [ - { - internalType: 'address', - name: '', - type: 'address' - } - ], - stateMutability: 'view', - type: 'function' - }, - { - inputs: [], - name: 'callTimestamp', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256' - } - ], - stateMutability: 'view', - type: 'function' - }, - { - inputs: [ - { - components: [ - { - internalType: 'bool', - name: 'delegateCall', - type: 'bool' - }, - { - internalType: 'bool', - name: 'revertOnError', - type: 'bool' - }, - { - internalType: 'uint256', - name: 'gasLimit', - type: 'uint256' - }, - { - internalType: 'address', - name: 'target', - type: 'address' - }, - { - internalType: 'uint256', - name: 'value', - type: 'uint256' - }, - { - internalType: 'bytes', - name: 'data', - type: 'bytes' - } - ], - internalType: 'struct IModuleCalls.Transaction[]', - name: '_txs', - type: 'tuple[]' - } - ], - name: 'multiCall', - outputs: [ - { - internalType: 'bool[]', - name: '_successes', - type: 'bool[]' - }, - { - internalType: 'bytes[]', - name: '_results', - type: 'bytes[]' - } - ], - stateMutability: 'payable', - type: 'function' - } - ], - bytecode: - '0x608060405234801561001057600080fd5b50610aac806100206000396000f3fe6080604052600436106100e85760003560e01c8063c272d5c31161008a578063d5b5337f11610059578063d5b5337f14610230578063e90f13e71461021b578063f209883a14610250578063ffd7d74114610265576100e8565b8063c272d5c3146101b9578063c39f2d5c146101ce578063c66764e1146101ee578063d1db39071461021b576100e8565b8063543196eb116100c6578063543196eb1461014d578063984395bc1461016d57806398f9fbc41461018f578063aeea5fb5146101a4576100e8565b80630fdecfac146100ed57806343d9c9351461011857806348acd29f1461012d575b600080fd5b3480156100f957600080fd5b50610102610286565b60405161010f91906108ef565b60405180910390f35b34801561012457600080fd5b5061010261028a565b34801561013957600080fd5b50610102610148366004610649565b610292565b34801561015957600080fd5b50610102610168366004610649565b6102b0565b34801561017957600080fd5b506101826102b4565b60405161010f9190610828565b34801561019b57600080fd5b506101826102b8565b3480156101b057600080fd5b506101026102bc565b3480156101c557600080fd5b506101026102c0565b3480156101da57600080fd5b506101026101e9366004610649565b6102c4565b3480156101fa57600080fd5b5061020e610209366004610649565b6102c8565b60405161010f91906108f8565b34801561022757600080fd5b5061010261030d565b34801561023c57600080fd5b5061010261024b3660046107aa565b610311565b34801561025c57600080fd5b50610102610315565b61027861027336600461066a565b610319565b60405161010f929190610849565b4690565b60005a905090565b73ffffffffffffffffffffffffffffffffffffffff8116315b919050565b3f90565b3290565b4190565b4490565b3a90565b3b90565b60408051603f833b9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01682019092528181529080600060208401853c50919050565b4590565b4090565b4290565b606080825167ffffffffffffffff8111801561033457600080fd5b5060405190808252806020026020018201604052801561035e578160200160208202803683370190505b509150825167ffffffffffffffff8111801561037957600080fd5b506040519080825280602002602001820160405280156103ad57816020015b60608152602001906001900390816103985790505b50905060005b835181101561058c5760008482815181106103ca57fe5b60200260200101519050806000015115610419576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610410906109c5565b60405180910390fd5b80604001515a1015610457576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161041090610968565b806060015173ffffffffffffffffffffffffffffffffffffffff168160800151826040015160001461048d57826040015161048f565b5a5b908360a001516040516104a2919061080c565b600060405180830381858888f193505050503d80600081146104e0576040519150601f19603f3d011682016040523d82523d6000602084013e6104e5565b606091505b508584815181106104f257fe5b6020026020010185858151811061050557fe5b602002602001018290528215151515815250505083828151811061052557fe5b60200260200101518061054d575084828151811061053f57fe5b602002602001015160200151155b610583576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016104109061090b565b506001016103b3565b50915091565b803573ffffffffffffffffffffffffffffffffffffffff811681146102ab57600080fd5b803580151581146102ab57600080fd5b600082601f8301126105d6578081fd5b813567ffffffffffffffff8111156105ea57fe5b61061b60207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f84011601610a22565b81815284602083860101111561062f578283fd5b816020850160208301379081016020019190915292915050565b60006020828403121561065a578081fd5b61066382610592565b9392505050565b6000602080838503121561067c578182fd5b823567ffffffffffffffff80821115610693578384fd5b818501915085601f8301126106a6578384fd5b8135818111156106b257fe5b6106bf8485830201610a22565b81815284810190848601875b8481101561079b578135870160c0807fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0838f03011215610709578a8bfd5b604080518281018181108b8211171561071e57fe5b825261072b848d016105b6565b81526107388285016105b6565b8c8201526060808501358383015260809250610755838601610592565b9082015260a084013582820152918301359189831115610773578c8dfd5b6107818f8d858701016105c6565b60a0820152875250505092870192908701906001016106cb565b50909998505050505050505050565b6000602082840312156107bb578081fd5b5035919050565b600081518084526107da816020860160208601610a46565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b6000825161081e818460208701610a46565b9190910192915050565b73ffffffffffffffffffffffffffffffffffffffff91909116815260200190565b604080825283519082018190526000906020906060840190828701845b82811015610884578151151584529284019290840190600101610866565b5050508381038285015284518082528282019080840283018401878501865b8381101561079b577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08684030185526108dd8383516107c2565b948701949250908601906001016108a3565b90815260200190565b60006020825261066360208301846107c2565b60208082526027908201527f4d756c746943616c6c5574696c73236d756c746943616c6c3a2043414c4c5f5260408201527f4556455254454400000000000000000000000000000000000000000000000000606082015260800190565b60208082526028908201527f4d756c746943616c6c5574696c73236d756c746943616c6c3a204e4f545f454e60408201527f4f5547485f474153000000000000000000000000000000000000000000000000606082015260800190565b60208082526032908201527f4d756c746943616c6c5574696c73236d756c746943616c6c3a2064656c65676160408201527f746543616c6c206e6f7420616c6c6f7765640000000000000000000000000000606082015260800190565b60405181810167ffffffffffffffff81118282101715610a3e57fe5b604052919050565b60005b83811015610a61578181015183820152602001610a49565b83811115610a70576000848401525b5050505056fea26469706673582212209bcbc4408d83c4567da8d51b96a29d3d2cf56395e5ac84eee40917a48945daaf64736f6c63430007060033', - deployedBytecode: - '0x6080604052600436106100e85760003560e01c8063c272d5c31161008a578063d5b5337f11610059578063d5b5337f14610230578063e90f13e71461021b578063f209883a14610250578063ffd7d74114610265576100e8565b8063c272d5c3146101b9578063c39f2d5c146101ce578063c66764e1146101ee578063d1db39071461021b576100e8565b8063543196eb116100c6578063543196eb1461014d578063984395bc1461016d57806398f9fbc41461018f578063aeea5fb5146101a4576100e8565b80630fdecfac146100ed57806343d9c9351461011857806348acd29f1461012d575b600080fd5b3480156100f957600080fd5b50610102610286565b60405161010f91906108ef565b60405180910390f35b34801561012457600080fd5b5061010261028a565b34801561013957600080fd5b50610102610148366004610649565b610292565b34801561015957600080fd5b50610102610168366004610649565b6102b0565b34801561017957600080fd5b506101826102b4565b60405161010f9190610828565b34801561019b57600080fd5b506101826102b8565b3480156101b057600080fd5b506101026102bc565b3480156101c557600080fd5b506101026102c0565b3480156101da57600080fd5b506101026101e9366004610649565b6102c4565b3480156101fa57600080fd5b5061020e610209366004610649565b6102c8565b60405161010f91906108f8565b34801561022757600080fd5b5061010261030d565b34801561023c57600080fd5b5061010261024b3660046107aa565b610311565b34801561025c57600080fd5b50610102610315565b61027861027336600461066a565b610319565b60405161010f929190610849565b4690565b60005a905090565b73ffffffffffffffffffffffffffffffffffffffff8116315b919050565b3f90565b3290565b4190565b4490565b3a90565b3b90565b60408051603f833b9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01682019092528181529080600060208401853c50919050565b4590565b4090565b4290565b606080825167ffffffffffffffff8111801561033457600080fd5b5060405190808252806020026020018201604052801561035e578160200160208202803683370190505b509150825167ffffffffffffffff8111801561037957600080fd5b506040519080825280602002602001820160405280156103ad57816020015b60608152602001906001900390816103985790505b50905060005b835181101561058c5760008482815181106103ca57fe5b60200260200101519050806000015115610419576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610410906109c5565b60405180910390fd5b80604001515a1015610457576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161041090610968565b806060015173ffffffffffffffffffffffffffffffffffffffff168160800151826040015160001461048d57826040015161048f565b5a5b908360a001516040516104a2919061080c565b600060405180830381858888f193505050503d80600081146104e0576040519150601f19603f3d011682016040523d82523d6000602084013e6104e5565b606091505b508584815181106104f257fe5b6020026020010185858151811061050557fe5b602002602001018290528215151515815250505083828151811061052557fe5b60200260200101518061054d575084828151811061053f57fe5b602002602001015160200151155b610583576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016104109061090b565b506001016103b3565b50915091565b803573ffffffffffffffffffffffffffffffffffffffff811681146102ab57600080fd5b803580151581146102ab57600080fd5b600082601f8301126105d6578081fd5b813567ffffffffffffffff8111156105ea57fe5b61061b60207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f84011601610a22565b81815284602083860101111561062f578283fd5b816020850160208301379081016020019190915292915050565b60006020828403121561065a578081fd5b61066382610592565b9392505050565b6000602080838503121561067c578182fd5b823567ffffffffffffffff80821115610693578384fd5b818501915085601f8301126106a6578384fd5b8135818111156106b257fe5b6106bf8485830201610a22565b81815284810190848601875b8481101561079b578135870160c0807fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0838f03011215610709578a8bfd5b604080518281018181108b8211171561071e57fe5b825261072b848d016105b6565b81526107388285016105b6565b8c8201526060808501358383015260809250610755838601610592565b9082015260a084013582820152918301359189831115610773578c8dfd5b6107818f8d858701016105c6565b60a0820152875250505092870192908701906001016106cb565b50909998505050505050505050565b6000602082840312156107bb578081fd5b5035919050565b600081518084526107da816020860160208601610a46565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b6000825161081e818460208701610a46565b9190910192915050565b73ffffffffffffffffffffffffffffffffffffffff91909116815260200190565b604080825283519082018190526000906020906060840190828701845b82811015610884578151151584529284019290840190600101610866565b5050508381038285015284518082528282019080840283018401878501865b8381101561079b577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08684030185526108dd8383516107c2565b948701949250908601906001016108a3565b90815260200190565b60006020825261066360208301846107c2565b60208082526027908201527f4d756c746943616c6c5574696c73236d756c746943616c6c3a2043414c4c5f5260408201527f4556455254454400000000000000000000000000000000000000000000000000606082015260800190565b60208082526028908201527f4d756c746943616c6c5574696c73236d756c746943616c6c3a204e4f545f454e60408201527f4f5547485f474153000000000000000000000000000000000000000000000000606082015260800190565b60208082526032908201527f4d756c746943616c6c5574696c73236d756c746943616c6c3a2064656c65676160408201527f746543616c6c206e6f7420616c6c6f7765640000000000000000000000000000606082015260800190565b60405181810167ffffffffffffffff81118282101715610a3e57fe5b604052919050565b60005b83811015610a61578181015183820152602001610a49565b83811115610a70576000848401525b5050505056fea26469706673582212209bcbc4408d83c4567da8d51b96a29d3d2cf56395e5ac84eee40917a48945daaf64736f6c63430007060033', - linkReferences: {}, - deployedLinkReferences: {} -} diff --git a/old/packages/tests/src/builds/v1/artifacts/SequenceUtils.ts b/old/packages/tests/src/builds/v1/artifacts/SequenceUtils.ts deleted file mode 100644 index dfeb06755..000000000 --- a/old/packages/tests/src/builds/v1/artifacts/SequenceUtils.ts +++ /dev/null @@ -1,527 +0,0 @@ -export const sequenceUtils = { - _format: 'hh-sol-artifact-1', - contractName: 'SequenceUtils', - sourceName: 'contracts/modules/utils/SequenceUtils.sol', - abi: [ - { - inputs: [ - { - internalType: 'address', - name: '_factory', - type: 'address' - }, - { - internalType: 'address', - name: '_mainModule', - type: 'address' - } - ], - stateMutability: 'nonpayable', - type: 'constructor' - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'address', - name: '_wallet', - type: 'address' - }, - { - indexed: true, - internalType: 'bytes32', - name: '_imageHash', - type: 'bytes32' - }, - { - indexed: false, - internalType: 'uint256', - name: '_threshold', - type: 'uint256' - }, - { - indexed: false, - internalType: 'bytes', - name: '_signers', - type: 'bytes' - } - ], - name: 'RequiredConfig', - type: 'event' - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'address', - name: '_wallet', - type: 'address' - }, - { - indexed: true, - internalType: 'address', - name: '_signer', - type: 'address' - } - ], - name: 'RequiredSigner', - type: 'event' - }, - { - inputs: [ - { - internalType: 'address', - name: '_addr', - type: 'address' - } - ], - name: 'callBalanceOf', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256' - } - ], - stateMutability: 'view', - type: 'function' - }, - { - inputs: [], - name: 'callBlockNumber', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256' - } - ], - stateMutability: 'view', - type: 'function' - }, - { - inputs: [ - { - internalType: 'uint256', - name: '_i', - type: 'uint256' - } - ], - name: 'callBlockhash', - outputs: [ - { - internalType: 'bytes32', - name: '', - type: 'bytes32' - } - ], - stateMutability: 'view', - type: 'function' - }, - { - inputs: [], - name: 'callChainId', - outputs: [ - { - internalType: 'uint256', - name: 'id', - type: 'uint256' - } - ], - stateMutability: 'pure', - type: 'function' - }, - { - inputs: [ - { - internalType: 'address', - name: '_addr', - type: 'address' - } - ], - name: 'callCode', - outputs: [ - { - internalType: 'bytes', - name: 'code', - type: 'bytes' - } - ], - stateMutability: 'view', - type: 'function' - }, - { - inputs: [ - { - internalType: 'address', - name: '_addr', - type: 'address' - } - ], - name: 'callCodeHash', - outputs: [ - { - internalType: 'bytes32', - name: 'codeHash', - type: 'bytes32' - } - ], - stateMutability: 'view', - type: 'function' - }, - { - inputs: [ - { - internalType: 'address', - name: '_addr', - type: 'address' - } - ], - name: 'callCodeSize', - outputs: [ - { - internalType: 'uint256', - name: 'size', - type: 'uint256' - } - ], - stateMutability: 'view', - type: 'function' - }, - { - inputs: [], - name: 'callCoinbase', - outputs: [ - { - internalType: 'address', - name: '', - type: 'address' - } - ], - stateMutability: 'view', - type: 'function' - }, - { - inputs: [], - name: 'callDifficulty', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256' - } - ], - stateMutability: 'view', - type: 'function' - }, - { - inputs: [], - name: 'callGasLeft', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256' - } - ], - stateMutability: 'view', - type: 'function' - }, - { - inputs: [], - name: 'callGasLimit', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256' - } - ], - stateMutability: 'view', - type: 'function' - }, - { - inputs: [], - name: 'callGasPrice', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256' - } - ], - stateMutability: 'view', - type: 'function' - }, - { - inputs: [], - name: 'callOrigin', - outputs: [ - { - internalType: 'address', - name: '', - type: 'address' - } - ], - stateMutability: 'view', - type: 'function' - }, - { - inputs: [], - name: 'callTimestamp', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256' - } - ], - stateMutability: 'view', - type: 'function' - }, - { - inputs: [ - { - internalType: 'address', - name: '', - type: 'address' - } - ], - name: 'knownImageHashes', - outputs: [ - { - internalType: 'bytes32', - name: '', - type: 'bytes32' - } - ], - stateMutability: 'view', - type: 'function' - }, - { - inputs: [ - { - internalType: 'bytes32', - name: '', - type: 'bytes32' - } - ], - name: 'lastImageHashUpdate', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256' - } - ], - stateMutability: 'view', - type: 'function' - }, - { - inputs: [ - { - internalType: 'address', - name: '', - type: 'address' - } - ], - name: 'lastSignerUpdate', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256' - } - ], - stateMutability: 'view', - type: 'function' - }, - { - inputs: [ - { - internalType: 'address', - name: '', - type: 'address' - } - ], - name: 'lastWalletUpdate', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256' - } - ], - stateMutability: 'view', - type: 'function' - }, - { - inputs: [ - { - components: [ - { - internalType: 'bool', - name: 'delegateCall', - type: 'bool' - }, - { - internalType: 'bool', - name: 'revertOnError', - type: 'bool' - }, - { - internalType: 'uint256', - name: 'gasLimit', - type: 'uint256' - }, - { - internalType: 'address', - name: 'target', - type: 'address' - }, - { - internalType: 'uint256', - name: 'value', - type: 'uint256' - }, - { - internalType: 'bytes', - name: 'data', - type: 'bytes' - } - ], - internalType: 'struct IModuleCalls.Transaction[]', - name: '_txs', - type: 'tuple[]' - } - ], - name: 'multiCall', - outputs: [ - { - internalType: 'bool[]', - name: '_successes', - type: 'bool[]' - }, - { - internalType: 'bytes[]', - name: '_results', - type: 'bytes[]' - } - ], - stateMutability: 'payable', - type: 'function' - }, - { - inputs: [ - { - internalType: 'address', - name: '_wallet', - type: 'address' - }, - { - internalType: 'uint256', - name: '_threshold', - type: 'uint256' - }, - { - components: [ - { - internalType: 'uint256', - name: 'weight', - type: 'uint256' - }, - { - internalType: 'address', - name: 'signer', - type: 'address' - } - ], - internalType: 'struct RequireUtils.Member[]', - name: '_members', - type: 'tuple[]' - }, - { - internalType: 'bool', - name: '_index', - type: 'bool' - } - ], - name: 'publishConfig', - outputs: [], - stateMutability: 'nonpayable', - type: 'function' - }, - { - inputs: [ - { - internalType: 'address', - name: '_wallet', - type: 'address' - }, - { - internalType: 'bytes32', - name: '_hash', - type: 'bytes32' - }, - { - internalType: 'uint256', - name: '_sizeMembers', - type: 'uint256' - }, - { - internalType: 'bytes', - name: '_signature', - type: 'bytes' - }, - { - internalType: 'bool', - name: '_index', - type: 'bool' - } - ], - name: 'publishInitialSigners', - outputs: [], - stateMutability: 'nonpayable', - type: 'function' - }, - { - inputs: [ - { - internalType: 'address', - name: '_wallet', - type: 'address' - }, - { - internalType: 'uint256', - name: '_nonce', - type: 'uint256' - } - ], - name: 'requireMinNonce', - outputs: [], - stateMutability: 'view', - type: 'function' - }, - { - inputs: [ - { - internalType: 'uint256', - name: '_expiration', - type: 'uint256' - } - ], - name: 'requireNonExpired', - outputs: [], - stateMutability: 'view', - type: 'function' - } - ], - bytecode: - '0x60c06040523480156200001157600080fd5b5060405162002ad638038062002ad68339810160408190526200003491620000cd565b8181816001600160a01b031660a0816001600160a01b031660601b8152505060405180606001604052806028815260200162002aae60289139816001600160a01b03166040516020016200008a92919062000104565b60408051601f198184030181529190528051602090910120608052506200014692505050565b80516001600160a01b0381168114620000c857600080fd5b919050565b60008060408385031215620000e0578182fd5b620000eb83620000b0565b9150620000fb60208401620000b0565b90509250929050565b60008351815b818110156200012657602081870181015185830152016200010a565b81811115620001355782828501525b509190910191825250602001919050565b60805160a05160601c61293762000177600039806106515280610b1b5250806106755280610b3f52506129376000f3fe6080604052600436106101805760003560e01c806398f9fbc4116100d6578063d1db39071161007f578063e90f13e711610059578063e90f13e714610395578063f209883a146103ea578063ffd7d741146103ff57610180565b8063d1db390714610395578063d5b5337f146103aa578063e717aba9146103ca57610180565b8063c272d5c3116100b0578063c272d5c314610333578063c39f2d5c14610348578063c66764e11461036857610180565b806398f9fbc4146102e9578063aeea5fb5146102fe578063b472f0a21461031357610180565b806348acd29f116101385780637ae99638116101125780637ae99638146102875780637f29d538146102a7578063984395bc146102c757610180565b806348acd29f14610227578063543196eb146102475780637082503b1461026757610180565b80631cd05dc4116101695780631cd05dc4146101d057806343d9c935146101f057806344d466c21461020557610180565b80630fdecfac146101855780631551f0ab146101b0575b600080fd5b34801561019157600080fd5b5061019a610420565b6040516101a79190612190565b60405180910390f35b3480156101bc57600080fd5b5061019a6101cb366004611e76565b610424565b3480156101dc57600080fd5b5061019a6101eb366004611bea565b610436565b3480156101fc57600080fd5b5061019a610448565b34801561021157600080fd5b50610225610220366004611ca4565b610450565b005b34801561023357600080fd5b5061019a610242366004611bea565b61080a565b34801561025357600080fd5b5061019a610262366004611bea565b610828565b34801561027357600080fd5b50610225610282366004611c0b565b61082c565b34801561029357600080fd5b5061019a6102a2366004611bea565b610cb0565b3480156102b357600080fd5b506102256102c2366004611e76565b610cc2565b3480156102d357600080fd5b506102dc610cfe565b6040516101a79190612000565b3480156102f557600080fd5b506102dc610d02565b34801561030a57600080fd5b5061019a610d06565b34801561031f57600080fd5b5061022561032e366004611c7b565b610d0a565b34801561033f57600080fd5b5061019a610de8565b34801561035457600080fd5b5061019a610363366004611bea565b610dec565b34801561037457600080fd5b50610388610383366004611bea565b610df0565b6040516101a791906121c5565b3480156103a157600080fd5b5061019a610e35565b3480156103b657600080fd5b5061019a6103c5366004611e76565b610e39565b3480156103d657600080fd5b5061019a6103e5366004611bea565b610e3d565b3480156103f657600080fd5b5061019a610e4f565b61041261040d366004611d34565b610e53565b6040516101a7929190612021565b4690565b60036020526000908152604090205481565b60006020819052908152604090205481565b60005a905090565b8360005b838110156104e9578185858381811061046957fe5b9050604002016000013586868481811061047f57fe5b90506040020160200160208101906104979190611bea565b6040516020016104a993929190612199565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe081840301815291905280516020909101209150600101610454565b506000808773ffffffffffffffffffffffffffffffffffffffff166351605d8060e01b60405160200161051c9190611f54565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529082905261055491611f81565b6000604051808303816000865af19150503d8060008114610591576040519150601f19603f3d011682016040523d82523d6000602084013e610596565b606091505b50915091508180156105a9575080516020145b1561060e576000818060200190518101906105c49190611e8e565b9050838114610608576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105ff90612543565b60405180910390fd5b50610732565b60405173ffffffffffffffffffffffffffffffffffffffff89169061069d907fff00000000000000000000000000000000000000000000000000000000000000907f00000000000000000000000000000000000000000000000000000000000000009087907f000000000000000000000000000000000000000000000000000000000000000090602001611ef0565b6040516020818303038152906040528051906020012060001c73ffffffffffffffffffffffffffffffffffffffff1614610703576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105ff906125a0565b83156107325773ffffffffffffffffffffffffffffffffffffffff881660009081526002602052604090208390555b828873ffffffffffffffffffffffffffffffffffffffff167fb502b7446ca079086188acf3abef47c2f464f2ee9a72fcdf05ffcb74dcc17cee89898960405160200161077f9291906120c7565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0818403018152908290526107b89291612623565b60405180910390a383156108005773ffffffffffffffffffffffffffffffffffffffff8816600090815260016020908152604080832043908190558684526003909252909120555b5050505050505050565b73ffffffffffffffffffffffffffffffffffffffff8116315b919050565b3f90565b600080610838846110c3565b9150915060008046905080898960405160200161085793929190611f9d565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0818403018152919052805160209091012091505061ffff831660008767ffffffffffffffff811180156108ae57600080fd5b506040519080825280602002602001820160405280156108e857816020015b6108d5611b1c565b8152602001906001900390816108cd5790505b50905060005b8751851015610a9f57600080806109058b89611131565b995060ff9182169450169150600183141561092d576109248b896111b2565b98509050610a20565b8261095f57606061093e8c8a61122a565b9950905061094c88826112db565b91506109598f838d611665565b50610a20565b60028314156109ee576109728b896111b2565b9850905060006109828c8a6116f3565b995061ffff16905060606109978d8b84611764565b9a5090506109a6898483611853565b6109dc576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105ff9061242c565b50506109e98e828c611665565b610a20565b6040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105ff906121d8565b60405180604001604052808381526020018273ffffffffffffffffffffffffffffffffffffffff16815250858581518110610a5757fe5b60200260200101819052508380600101945050858282604051602001610a7f93929190612199565b6040516020818303038152906040528051906020012095505050506108ee565b888114610ad8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105ff906124e6565b60405173ffffffffffffffffffffffffffffffffffffffff8c1690610b67907fff00000000000000000000000000000000000000000000000000000000000000907f00000000000000000000000000000000000000000000000000000000000000009087907f000000000000000000000000000000000000000000000000000000000000000090602001611ef0565b6040516020818303038152906040528051906020012060001c73ffffffffffffffffffffffffffffffffffffffff1614610bcd576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105ff906123a9565b828b73ffffffffffffffffffffffffffffffffffffffff167fb502b7446ca079086188acf3abef47c2f464f2ee9a72fcdf05ffcb74dcc17cee8885604051602001610c18919061212b565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe081840301815290829052610c5192916125fe565b60405180910390a38615610ca35773ffffffffffffffffffffffffffffffffffffffff8b1660008181526001602090815260408083204390819055878452600383528184205592825260029052208390555b5050505050505050505050565b60026020526000908152604090205481565b804210610cfb576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105ff9061234c565b50565b3290565b4190565b4490565b600080610d1683611a9b565b9150915060008473ffffffffffffffffffffffffffffffffffffffff16638c3f5563846040518263ffffffff1660e01b8152600401610d559190612190565b60206040518083038186803b158015610d6d57600080fd5b505afa158015610d81573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610da59190611e8e565b905081811015610de1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105ff906122ef565b5050505050565b3a90565b3b90565b60408051603f833b9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01682019092528181529080600060208401853c50919050565b4590565b4090565b60016020526000908152604090205481565b4290565b606080825167ffffffffffffffff81118015610e6e57600080fd5b50604051908082528060200260200182016040528015610e98578160200160208202803683370190505b509150825167ffffffffffffffff81118015610eb357600080fd5b50604051908082528060200260200182016040528015610ee757816020015b6060815260200190600190039081610ed25790505b50905060005b83518110156110bd576000848281518110610f0457fe5b60200260200101519050806000015115610f4a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105ff90612489565b80604001515a1015610f88576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105ff90612292565b806060015173ffffffffffffffffffffffffffffffffffffffff1681608001518260400151600014610fbe578260400151610fc0565b5a5b908360a00151604051610fd39190611f81565b600060405180830381858888f193505050503d8060008114611011576040519150601f19603f3d011682016040523d82523d6000602084013e611016565b606091505b5085848151811061102357fe5b6020026020010185858151811061103657fe5b602002602001018290528215151515815250505083828151811061105657fe5b60200260200101518061107e575084828151811061107057fe5b602002602001015160200151155b6110b4576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105ff90612235565b50600101610eed565b50915091565b6020810151815160f09190911c9060029081111561112c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602781526020018061272b6027913960400191505060405180910390fd5b915091565b8082016020015160f881901c9060f01c60ff166002830183811161115157fe5b84518111156111ab576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602681526020018061285d6026913960400191505060405180910390fd5b9250925092565b8082016020015160601c601482018281116111c957fe5b8351811115611223576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260238152602001806127086023913960400191505060405180910390fd5b9250929050565b60408051604280825260808201909252606091600091906020820181803683370190505091508284016020018051602084015260208101516040840152602281015160428401525060428301905082811161128157fe5b8351811115611223576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260238152602001806127fe6023913960400191505060405180910390fd5b60008151604214611337576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252603a8152602001806126ce603a913960400191505060405180910390fd5b60008260018451038151811061134957fe5b602001015160f81c60f81b60f81c60ff16905060008360408151811061136b57fe5b016020015160f81c905060006113818582611ab4565b90506000611390866020611ab4565b90507f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a081111561140b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252603d815260200180612691603d913960400191505060405180910390fd5b8260ff16601b1415801561142357508260ff16601c14155b15611479576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252603d815260200180612752603d913960400191505060405180910390fd5b60018414156114ed5760018784848460405160008152602001604052604051808581526020018460ff1681526020018381526020018281526020019450505050506020604051602081039080840390855afa1580156114dc573d6000803e3d6000fd5b5050506020604051035194506115ef565b600284141561159e5760018760405160200180807f19457468657265756d205369676e6564204d6573736167653a0a333200000000815250601c018281526020019150506040516020818303038152906040528051906020012084848460405160008152602001604052604051808581526020018460ff1681526020018381526020018281526020019450505050506020604051602081039080840390855afa1580156114dc573d6000803e3d6000fd5b6040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252603c815260200180612821603c913960400191505060405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff851661165b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252603081526020018061278f6030913960400191505060405180910390fd5b5050505092915050565b8173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f600ba597427f042bcd559a0d06fa1732cc104d6dd43cbe8845b5a0e804b2b39f60405160405180910390a380156116ee5773ffffffffffffffffffffffffffffffffffffffff821660009081526020819052604090204390555b505050565b8082016020015160f01c6002820182811161170a57fe5b8351811115611223576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260228152602001806128a46022913960400191505060405180910390fd5b606060008267ffffffffffffffff8111801561177f57600080fd5b506040519080825280601f01601f1916602001820160405280156117aa576020820181803683370190505b509150838501602001600060205b858110156117d1579082015184820152602081016117b8565b84860160200180519390920151908501525250828201838110156117f157fe5b845181111561184b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260218152602001806128836021913960400191505060405180910390fd5b935093915050565b6000808260018451038151811061186657fe5b016020015160f81c9050600181148061187f5750600281145b156118c3578373ffffffffffffffffffffffffffffffffffffffff166118a586856112db565b73ffffffffffffffffffffffffffffffffffffffff16149150611a93565b6003811415611a425782517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff81018452604080517f1626ba7e000000000000000000000000000000000000000000000000000000008152600481018881526024820192835286516044830152865173ffffffffffffffffffffffffffffffffffffffff891693631626ba7e938b938a9390929160640190602085019080838360005b8381101561197d578181015183820152602001611965565b50505050905090810190601f1680156119aa5780820380516001836020036101000a031916815260200191505b50935050505060206040518083038186803b1580156119c857600080fd5b505afa1580156119dc573d6000803e3d6000fd5b505050506040513d60208110156119f257600080fd5b50519084527fffffffff00000000000000000000000000000000000000000000000000000000167f1626ba7e00000000000000000000000000000000000000000000000000000000149150611a93565b6040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252603f8152602001806127bf603f913960400191505060405180910390fd5b509392505050565b606081901c916bffffffffffffffffffffffff90911690565b60008160200183511015611b13576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252603c8152602001806128c6603c913960400191505060405180910390fd5b50016020015190565b604080518082019091526000808252602082015290565b803573ffffffffffffffffffffffffffffffffffffffff8116811461082357600080fd5b8035801515811461082357600080fd5b600082601f830112611b77578081fd5b813567ffffffffffffffff811115611b8b57fe5b611bbc60207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f8401160161263c565b818152846020838601011115611bd0578283fd5b816020850160208301379081016020019190915292915050565b600060208284031215611bfb578081fd5b611c0482611b33565b9392505050565b600080600080600060a08688031215611c22578081fd5b611c2b86611b33565b94506020860135935060408601359250606086013567ffffffffffffffff811115611c54578182fd5b611c6088828901611b67565b925050611c6f60808701611b57565b90509295509295909350565b60008060408385031215611c8d578182fd5b611c9683611b33565b946020939093013593505050565b600080600080600060808688031215611cbb578081fd5b611cc486611b33565b945060208601359350604086013567ffffffffffffffff80821115611ce7578283fd5b818801915088601f830112611cfa578283fd5b813581811115611d08578384fd5b896020604083028501011115611d1c578384fd5b602083019550809450505050611c6f60608701611b57565b60006020808385031215611d46578182fd5b823567ffffffffffffffff80821115611d5d578384fd5b818501915085601f830112611d70578384fd5b813581811115611d7c57fe5b611d89848583020161263c565b81815284810190848601875b84811015611e67578135870160c0807fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0838f03011215611dd3578a8bfd5b604080518281018181108b82111715611de857fe5b8252611df5848d01611b57565b8152611e02828501611b57565b8c82015260608085013583830152611e1c60808601611b33565b9082015260a08481013560808301529284013592915089831115611e3e578c8dfd5b611e4c8f8d85870101611b67565b91810191909152865250509287019290870190600101611d95565b50909998505050505050505050565b600060208284031215611e87578081fd5b5035919050565b600060208284031215611e9f578081fd5b5051919050565b60008151808452611ebe816020860160208601612660565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b7fff0000000000000000000000000000000000000000000000000000000000000094909416845260609290921b7fffffffffffffffffffffffffffffffffffffffff0000000000000000000000001660018401526015830152603582015260550190565b7fffffffff0000000000000000000000000000000000000000000000000000000091909116815260040190565b60008251611f93818460208701612660565b9190910192915050565b7f19010000000000000000000000000000000000000000000000000000000000008152600281019390935260609190911b7fffffffffffffffffffffffffffffffffffffffff000000000000000000000000166022830152603682015260560190565b73ffffffffffffffffffffffffffffffffffffffff91909116815260200190565b604080825283519082018190526000906020906060840190828701845b8281101561205c57815115158452928401929084019060010161203e565b5050508381038285015284518082528282019080840283018401878501865b83811015611e67577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08684030185526120b5838351611ea6565b9487019492509086019060010161207b565b6020808252818101839052600090604080840186845b8781101561211e578135835273ffffffffffffffffffffffffffffffffffffffff612109868401611b33565b168386015291830191908301906001016120dd565b5090979650505050505050565b602080825282518282018190526000919060409081850190868401855b828110156121835781518051855286015173ffffffffffffffffffffffffffffffffffffffff16868501529284019290850190600101612148565b5091979650505050505050565b90815260200190565b928352602083019190915273ffffffffffffffffffffffffffffffffffffffff16604082015260600190565b600060208252611c046020830184611ea6565b6020808252603a908201527f526571756972655574696c73237075626c697368496e697469616c5369676e6560408201527f72733a20494e56414c49445f5349474e41545552455f464c4147000000000000606082015260800190565b60208082526027908201527f4d756c746943616c6c5574696c73236d756c746943616c6c3a2043414c4c5f5260408201527f4556455254454400000000000000000000000000000000000000000000000000606082015260800190565b60208082526028908201527f4d756c746943616c6c5574696c73236d756c746943616c6c3a204e4f545f454e60408201527f4f5547485f474153000000000000000000000000000000000000000000000000606082015260800190565b60208082526032908201527f526571756972655574696c7323726571756972654d696e4e6f6e63653a204e4f60408201527f4e43455f42454c4f575f52455155495245440000000000000000000000000000606082015260800190565b60208082526027908201527f526571756972655574696c7323726571756972654e6f6e457870697265643a2060408201527f4558504952454400000000000000000000000000000000000000000000000000606082015260800190565b60208082526048908201527f526571756972655574696c73237075626c697368496e697469616c5369676e6560408201527f72733a20554e45585045435445445f434f554e5445524641435455414c5f494d60608201527f4147455f48415348000000000000000000000000000000000000000000000000608082015260a00190565b60208082526032908201527f4d6f64756c6541757468235f7369676e617475726556616c69646174696f6e3a60408201527f20494e56414c49445f5349474e41545552450000000000000000000000000000606082015260800190565b60208082526032908201527f4d756c746943616c6c5574696c73236d756c746943616c6c3a2064656c65676160408201527f746543616c6c206e6f7420616c6c6f7765640000000000000000000000000000606082015260800190565b60208082526039908201527f526571756972655574696c73237075626c697368496e697469616c5369676e6560408201527f72733a20494e56414c49445f4d454d424552535f434f554e5400000000000000606082015260800190565b60208082526031908201527f526571756972655574696c73237075626c697368436f6e6669673a20554e455860408201527f5045435445445f494d4147455f48415348000000000000000000000000000000606082015260800190565b602080825260409082018190527f526571756972655574696c73237075626c697368436f6e6669673a20554e4558908201527f5045435445445f434f554e5445524641435455414c5f494d4147455f48415348606082015260800190565b600061ffff841682526040602083015261261b6040830184611ea6565b949350505050565b60008382526040602083015261261b6040830184611ea6565b60405181810167ffffffffffffffff8111828210171561265857fe5b604052919050565b60005b8381101561267b578181015183820152602001612663565b8381111561268a576000848401525b5050505056fe5369676e617475726556616c696461746f72237265636f7665725369676e65723a20696e76616c6964207369676e6174757265202773272076616c75655369676e617475726556616c696461746f72237265636f7665725369676e65723a20696e76616c6964207369676e6174757265206c656e6774684c696242797465732372656164416464726573733a204f55545f4f465f424f554e44534c696242797465732372656164466972737455696e7431363a204f55545f4f465f424f554e44535369676e617475726556616c696461746f72237265636f7665725369676e65723a20696e76616c6964207369676e6174757265202776272076616c75655369676e617475726556616c696461746f72237265636f7665725369676e65723a20494e56414c49445f5349474e45525369676e617475726556616c696461746f7223697356616c69645369676e61747572653a20554e535550504f525445445f5349474e41545552455f545950454c696242797465732372656164427974657336363a204f55545f4f465f424f554e44535369676e617475726556616c696461746f72237265636f7665725369676e65723a20554e535550504f525445445f5349474e41545552455f545950454c69624279746573237265616455696e743855696e74383a204f55545f4f465f424f554e44534c69624279746573237265616442797465733a204f55545f4f465f424f554e44534c69624279746573237265616455696e7431363a204f55545f4f465f424f554e44534c696242797465732372656164427974657333323a20475245415445525f4f525f455155414c5f544f5f33325f4c454e4754485f5245515549524544a26469706673582212200abb842b6eea58df953f048e3a9aa7589fd3ce15ca086e43b61cdb0c0c42723564736f6c63430007060033603a600e3d39601a805130553df3363d3d373d3d3d363d30545af43d82803e903d91601857fd5bf3', - deployedBytecode: - '0x6080604052600436106101805760003560e01c806398f9fbc4116100d6578063d1db39071161007f578063e90f13e711610059578063e90f13e714610395578063f209883a146103ea578063ffd7d741146103ff57610180565b8063d1db390714610395578063d5b5337f146103aa578063e717aba9146103ca57610180565b8063c272d5c3116100b0578063c272d5c314610333578063c39f2d5c14610348578063c66764e11461036857610180565b806398f9fbc4146102e9578063aeea5fb5146102fe578063b472f0a21461031357610180565b806348acd29f116101385780637ae99638116101125780637ae99638146102875780637f29d538146102a7578063984395bc146102c757610180565b806348acd29f14610227578063543196eb146102475780637082503b1461026757610180565b80631cd05dc4116101695780631cd05dc4146101d057806343d9c935146101f057806344d466c21461020557610180565b80630fdecfac146101855780631551f0ab146101b0575b600080fd5b34801561019157600080fd5b5061019a610420565b6040516101a79190612190565b60405180910390f35b3480156101bc57600080fd5b5061019a6101cb366004611e76565b610424565b3480156101dc57600080fd5b5061019a6101eb366004611bea565b610436565b3480156101fc57600080fd5b5061019a610448565b34801561021157600080fd5b50610225610220366004611ca4565b610450565b005b34801561023357600080fd5b5061019a610242366004611bea565b61080a565b34801561025357600080fd5b5061019a610262366004611bea565b610828565b34801561027357600080fd5b50610225610282366004611c0b565b61082c565b34801561029357600080fd5b5061019a6102a2366004611bea565b610cb0565b3480156102b357600080fd5b506102256102c2366004611e76565b610cc2565b3480156102d357600080fd5b506102dc610cfe565b6040516101a79190612000565b3480156102f557600080fd5b506102dc610d02565b34801561030a57600080fd5b5061019a610d06565b34801561031f57600080fd5b5061022561032e366004611c7b565b610d0a565b34801561033f57600080fd5b5061019a610de8565b34801561035457600080fd5b5061019a610363366004611bea565b610dec565b34801561037457600080fd5b50610388610383366004611bea565b610df0565b6040516101a791906121c5565b3480156103a157600080fd5b5061019a610e35565b3480156103b657600080fd5b5061019a6103c5366004611e76565b610e39565b3480156103d657600080fd5b5061019a6103e5366004611bea565b610e3d565b3480156103f657600080fd5b5061019a610e4f565b61041261040d366004611d34565b610e53565b6040516101a7929190612021565b4690565b60036020526000908152604090205481565b60006020819052908152604090205481565b60005a905090565b8360005b838110156104e9578185858381811061046957fe5b9050604002016000013586868481811061047f57fe5b90506040020160200160208101906104979190611bea565b6040516020016104a993929190612199565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe081840301815291905280516020909101209150600101610454565b506000808773ffffffffffffffffffffffffffffffffffffffff166351605d8060e01b60405160200161051c9190611f54565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529082905261055491611f81565b6000604051808303816000865af19150503d8060008114610591576040519150601f19603f3d011682016040523d82523d6000602084013e610596565b606091505b50915091508180156105a9575080516020145b1561060e576000818060200190518101906105c49190611e8e565b9050838114610608576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105ff90612543565b60405180910390fd5b50610732565b60405173ffffffffffffffffffffffffffffffffffffffff89169061069d907fff00000000000000000000000000000000000000000000000000000000000000907f00000000000000000000000000000000000000000000000000000000000000009087907f000000000000000000000000000000000000000000000000000000000000000090602001611ef0565b6040516020818303038152906040528051906020012060001c73ffffffffffffffffffffffffffffffffffffffff1614610703576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105ff906125a0565b83156107325773ffffffffffffffffffffffffffffffffffffffff881660009081526002602052604090208390555b828873ffffffffffffffffffffffffffffffffffffffff167fb502b7446ca079086188acf3abef47c2f464f2ee9a72fcdf05ffcb74dcc17cee89898960405160200161077f9291906120c7565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0818403018152908290526107b89291612623565b60405180910390a383156108005773ffffffffffffffffffffffffffffffffffffffff8816600090815260016020908152604080832043908190558684526003909252909120555b5050505050505050565b73ffffffffffffffffffffffffffffffffffffffff8116315b919050565b3f90565b600080610838846110c3565b9150915060008046905080898960405160200161085793929190611f9d565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0818403018152919052805160209091012091505061ffff831660008767ffffffffffffffff811180156108ae57600080fd5b506040519080825280602002602001820160405280156108e857816020015b6108d5611b1c565b8152602001906001900390816108cd5790505b50905060005b8751851015610a9f57600080806109058b89611131565b995060ff9182169450169150600183141561092d576109248b896111b2565b98509050610a20565b8261095f57606061093e8c8a61122a565b9950905061094c88826112db565b91506109598f838d611665565b50610a20565b60028314156109ee576109728b896111b2565b9850905060006109828c8a6116f3565b995061ffff16905060606109978d8b84611764565b9a5090506109a6898483611853565b6109dc576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105ff9061242c565b50506109e98e828c611665565b610a20565b6040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105ff906121d8565b60405180604001604052808381526020018273ffffffffffffffffffffffffffffffffffffffff16815250858581518110610a5757fe5b60200260200101819052508380600101945050858282604051602001610a7f93929190612199565b6040516020818303038152906040528051906020012095505050506108ee565b888114610ad8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105ff906124e6565b60405173ffffffffffffffffffffffffffffffffffffffff8c1690610b67907fff00000000000000000000000000000000000000000000000000000000000000907f00000000000000000000000000000000000000000000000000000000000000009087907f000000000000000000000000000000000000000000000000000000000000000090602001611ef0565b6040516020818303038152906040528051906020012060001c73ffffffffffffffffffffffffffffffffffffffff1614610bcd576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105ff906123a9565b828b73ffffffffffffffffffffffffffffffffffffffff167fb502b7446ca079086188acf3abef47c2f464f2ee9a72fcdf05ffcb74dcc17cee8885604051602001610c18919061212b565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe081840301815290829052610c5192916125fe565b60405180910390a38615610ca35773ffffffffffffffffffffffffffffffffffffffff8b1660008181526001602090815260408083204390819055878452600383528184205592825260029052208390555b5050505050505050505050565b60026020526000908152604090205481565b804210610cfb576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105ff9061234c565b50565b3290565b4190565b4490565b600080610d1683611a9b565b9150915060008473ffffffffffffffffffffffffffffffffffffffff16638c3f5563846040518263ffffffff1660e01b8152600401610d559190612190565b60206040518083038186803b158015610d6d57600080fd5b505afa158015610d81573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610da59190611e8e565b905081811015610de1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105ff906122ef565b5050505050565b3a90565b3b90565b60408051603f833b9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01682019092528181529080600060208401853c50919050565b4590565b4090565b60016020526000908152604090205481565b4290565b606080825167ffffffffffffffff81118015610e6e57600080fd5b50604051908082528060200260200182016040528015610e98578160200160208202803683370190505b509150825167ffffffffffffffff81118015610eb357600080fd5b50604051908082528060200260200182016040528015610ee757816020015b6060815260200190600190039081610ed25790505b50905060005b83518110156110bd576000848281518110610f0457fe5b60200260200101519050806000015115610f4a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105ff90612489565b80604001515a1015610f88576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105ff90612292565b806060015173ffffffffffffffffffffffffffffffffffffffff1681608001518260400151600014610fbe578260400151610fc0565b5a5b908360a00151604051610fd39190611f81565b600060405180830381858888f193505050503d8060008114611011576040519150601f19603f3d011682016040523d82523d6000602084013e611016565b606091505b5085848151811061102357fe5b6020026020010185858151811061103657fe5b602002602001018290528215151515815250505083828151811061105657fe5b60200260200101518061107e575084828151811061107057fe5b602002602001015160200151155b6110b4576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105ff90612235565b50600101610eed565b50915091565b6020810151815160f09190911c9060029081111561112c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602781526020018061272b6027913960400191505060405180910390fd5b915091565b8082016020015160f881901c9060f01c60ff166002830183811161115157fe5b84518111156111ab576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602681526020018061285d6026913960400191505060405180910390fd5b9250925092565b8082016020015160601c601482018281116111c957fe5b8351811115611223576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260238152602001806127086023913960400191505060405180910390fd5b9250929050565b60408051604280825260808201909252606091600091906020820181803683370190505091508284016020018051602084015260208101516040840152602281015160428401525060428301905082811161128157fe5b8351811115611223576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260238152602001806127fe6023913960400191505060405180910390fd5b60008151604214611337576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252603a8152602001806126ce603a913960400191505060405180910390fd5b60008260018451038151811061134957fe5b602001015160f81c60f81b60f81c60ff16905060008360408151811061136b57fe5b016020015160f81c905060006113818582611ab4565b90506000611390866020611ab4565b90507f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a081111561140b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252603d815260200180612691603d913960400191505060405180910390fd5b8260ff16601b1415801561142357508260ff16601c14155b15611479576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252603d815260200180612752603d913960400191505060405180910390fd5b60018414156114ed5760018784848460405160008152602001604052604051808581526020018460ff1681526020018381526020018281526020019450505050506020604051602081039080840390855afa1580156114dc573d6000803e3d6000fd5b5050506020604051035194506115ef565b600284141561159e5760018760405160200180807f19457468657265756d205369676e6564204d6573736167653a0a333200000000815250601c018281526020019150506040516020818303038152906040528051906020012084848460405160008152602001604052604051808581526020018460ff1681526020018381526020018281526020019450505050506020604051602081039080840390855afa1580156114dc573d6000803e3d6000fd5b6040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252603c815260200180612821603c913960400191505060405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff851661165b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252603081526020018061278f6030913960400191505060405180910390fd5b5050505092915050565b8173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f600ba597427f042bcd559a0d06fa1732cc104d6dd43cbe8845b5a0e804b2b39f60405160405180910390a380156116ee5773ffffffffffffffffffffffffffffffffffffffff821660009081526020819052604090204390555b505050565b8082016020015160f01c6002820182811161170a57fe5b8351811115611223576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260228152602001806128a46022913960400191505060405180910390fd5b606060008267ffffffffffffffff8111801561177f57600080fd5b506040519080825280601f01601f1916602001820160405280156117aa576020820181803683370190505b509150838501602001600060205b858110156117d1579082015184820152602081016117b8565b84860160200180519390920151908501525250828201838110156117f157fe5b845181111561184b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260218152602001806128836021913960400191505060405180910390fd5b935093915050565b6000808260018451038151811061186657fe5b016020015160f81c9050600181148061187f5750600281145b156118c3578373ffffffffffffffffffffffffffffffffffffffff166118a586856112db565b73ffffffffffffffffffffffffffffffffffffffff16149150611a93565b6003811415611a425782517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff81018452604080517f1626ba7e000000000000000000000000000000000000000000000000000000008152600481018881526024820192835286516044830152865173ffffffffffffffffffffffffffffffffffffffff891693631626ba7e938b938a9390929160640190602085019080838360005b8381101561197d578181015183820152602001611965565b50505050905090810190601f1680156119aa5780820380516001836020036101000a031916815260200191505b50935050505060206040518083038186803b1580156119c857600080fd5b505afa1580156119dc573d6000803e3d6000fd5b505050506040513d60208110156119f257600080fd5b50519084527fffffffff00000000000000000000000000000000000000000000000000000000167f1626ba7e00000000000000000000000000000000000000000000000000000000149150611a93565b6040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252603f8152602001806127bf603f913960400191505060405180910390fd5b509392505050565b606081901c916bffffffffffffffffffffffff90911690565b60008160200183511015611b13576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252603c8152602001806128c6603c913960400191505060405180910390fd5b50016020015190565b604080518082019091526000808252602082015290565b803573ffffffffffffffffffffffffffffffffffffffff8116811461082357600080fd5b8035801515811461082357600080fd5b600082601f830112611b77578081fd5b813567ffffffffffffffff811115611b8b57fe5b611bbc60207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f8401160161263c565b818152846020838601011115611bd0578283fd5b816020850160208301379081016020019190915292915050565b600060208284031215611bfb578081fd5b611c0482611b33565b9392505050565b600080600080600060a08688031215611c22578081fd5b611c2b86611b33565b94506020860135935060408601359250606086013567ffffffffffffffff811115611c54578182fd5b611c6088828901611b67565b925050611c6f60808701611b57565b90509295509295909350565b60008060408385031215611c8d578182fd5b611c9683611b33565b946020939093013593505050565b600080600080600060808688031215611cbb578081fd5b611cc486611b33565b945060208601359350604086013567ffffffffffffffff80821115611ce7578283fd5b818801915088601f830112611cfa578283fd5b813581811115611d08578384fd5b896020604083028501011115611d1c578384fd5b602083019550809450505050611c6f60608701611b57565b60006020808385031215611d46578182fd5b823567ffffffffffffffff80821115611d5d578384fd5b818501915085601f830112611d70578384fd5b813581811115611d7c57fe5b611d89848583020161263c565b81815284810190848601875b84811015611e67578135870160c0807fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0838f03011215611dd3578a8bfd5b604080518281018181108b82111715611de857fe5b8252611df5848d01611b57565b8152611e02828501611b57565b8c82015260608085013583830152611e1c60808601611b33565b9082015260a08481013560808301529284013592915089831115611e3e578c8dfd5b611e4c8f8d85870101611b67565b91810191909152865250509287019290870190600101611d95565b50909998505050505050505050565b600060208284031215611e87578081fd5b5035919050565b600060208284031215611e9f578081fd5b5051919050565b60008151808452611ebe816020860160208601612660565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b7fff0000000000000000000000000000000000000000000000000000000000000094909416845260609290921b7fffffffffffffffffffffffffffffffffffffffff0000000000000000000000001660018401526015830152603582015260550190565b7fffffffff0000000000000000000000000000000000000000000000000000000091909116815260040190565b60008251611f93818460208701612660565b9190910192915050565b7f19010000000000000000000000000000000000000000000000000000000000008152600281019390935260609190911b7fffffffffffffffffffffffffffffffffffffffff000000000000000000000000166022830152603682015260560190565b73ffffffffffffffffffffffffffffffffffffffff91909116815260200190565b604080825283519082018190526000906020906060840190828701845b8281101561205c57815115158452928401929084019060010161203e565b5050508381038285015284518082528282019080840283018401878501865b83811015611e67577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08684030185526120b5838351611ea6565b9487019492509086019060010161207b565b6020808252818101839052600090604080840186845b8781101561211e578135835273ffffffffffffffffffffffffffffffffffffffff612109868401611b33565b168386015291830191908301906001016120dd565b5090979650505050505050565b602080825282518282018190526000919060409081850190868401855b828110156121835781518051855286015173ffffffffffffffffffffffffffffffffffffffff16868501529284019290850190600101612148565b5091979650505050505050565b90815260200190565b928352602083019190915273ffffffffffffffffffffffffffffffffffffffff16604082015260600190565b600060208252611c046020830184611ea6565b6020808252603a908201527f526571756972655574696c73237075626c697368496e697469616c5369676e6560408201527f72733a20494e56414c49445f5349474e41545552455f464c4147000000000000606082015260800190565b60208082526027908201527f4d756c746943616c6c5574696c73236d756c746943616c6c3a2043414c4c5f5260408201527f4556455254454400000000000000000000000000000000000000000000000000606082015260800190565b60208082526028908201527f4d756c746943616c6c5574696c73236d756c746943616c6c3a204e4f545f454e60408201527f4f5547485f474153000000000000000000000000000000000000000000000000606082015260800190565b60208082526032908201527f526571756972655574696c7323726571756972654d696e4e6f6e63653a204e4f60408201527f4e43455f42454c4f575f52455155495245440000000000000000000000000000606082015260800190565b60208082526027908201527f526571756972655574696c7323726571756972654e6f6e457870697265643a2060408201527f4558504952454400000000000000000000000000000000000000000000000000606082015260800190565b60208082526048908201527f526571756972655574696c73237075626c697368496e697469616c5369676e6560408201527f72733a20554e45585045435445445f434f554e5445524641435455414c5f494d60608201527f4147455f48415348000000000000000000000000000000000000000000000000608082015260a00190565b60208082526032908201527f4d6f64756c6541757468235f7369676e617475726556616c69646174696f6e3a60408201527f20494e56414c49445f5349474e41545552450000000000000000000000000000606082015260800190565b60208082526032908201527f4d756c746943616c6c5574696c73236d756c746943616c6c3a2064656c65676160408201527f746543616c6c206e6f7420616c6c6f7765640000000000000000000000000000606082015260800190565b60208082526039908201527f526571756972655574696c73237075626c697368496e697469616c5369676e6560408201527f72733a20494e56414c49445f4d454d424552535f434f554e5400000000000000606082015260800190565b60208082526031908201527f526571756972655574696c73237075626c697368436f6e6669673a20554e455860408201527f5045435445445f494d4147455f48415348000000000000000000000000000000606082015260800190565b602080825260409082018190527f526571756972655574696c73237075626c697368436f6e6669673a20554e4558908201527f5045435445445f434f554e5445524641435455414c5f494d4147455f48415348606082015260800190565b600061ffff841682526040602083015261261b6040830184611ea6565b949350505050565b60008382526040602083015261261b6040830184611ea6565b60405181810167ffffffffffffffff8111828210171561265857fe5b604052919050565b60005b8381101561267b578181015183820152602001612663565b8381111561268a576000848401525b5050505056fe5369676e617475726556616c696461746f72237265636f7665725369676e65723a20696e76616c6964207369676e6174757265202773272076616c75655369676e617475726556616c696461746f72237265636f7665725369676e65723a20696e76616c6964207369676e6174757265206c656e6774684c696242797465732372656164416464726573733a204f55545f4f465f424f554e44534c696242797465732372656164466972737455696e7431363a204f55545f4f465f424f554e44535369676e617475726556616c696461746f72237265636f7665725369676e65723a20696e76616c6964207369676e6174757265202776272076616c75655369676e617475726556616c696461746f72237265636f7665725369676e65723a20494e56414c49445f5349474e45525369676e617475726556616c696461746f7223697356616c69645369676e61747572653a20554e535550504f525445445f5349474e41545552455f545950454c696242797465732372656164427974657336363a204f55545f4f465f424f554e44535369676e617475726556616c696461746f72237265636f7665725369676e65723a20554e535550504f525445445f5349474e41545552455f545950454c69624279746573237265616455696e743855696e74383a204f55545f4f465f424f554e44534c69624279746573237265616442797465733a204f55545f4f465f424f554e44534c69624279746573237265616455696e7431363a204f55545f4f465f424f554e44534c696242797465732372656164427974657333323a20475245415445525f4f525f455155414c5f544f5f33325f4c454e4754485f5245515549524544a26469706673582212200abb842b6eea58df953f048e3a9aa7589fd3ce15ca086e43b61cdb0c0c42723564736f6c63430007060033', - linkReferences: {}, - deployedLinkReferences: {} -} diff --git a/old/packages/tests/src/builds/v1/index.ts b/old/packages/tests/src/builds/v1/index.ts deleted file mode 100644 index a4c3cd41a..000000000 --- a/old/packages/tests/src/builds/v1/index.ts +++ /dev/null @@ -1,6 +0,0 @@ -export { factory } from './artifacts/Factory' -export { guestModule } from './artifacts/GuestModule' -export { mainModule } from './artifacts/MainModule' -export { mainModuleUpgradable } from './artifacts/MainModuleUpgradable' -export { multiCallUtils } from './artifacts/MultiCallUtils' -export { sequenceUtils } from './artifacts/SequenceUtils' diff --git a/old/packages/tests/src/builds/v2/artifacts/Factory.ts b/old/packages/tests/src/builds/v2/artifacts/Factory.ts deleted file mode 100644 index ff1a54fc2..000000000 --- a/old/packages/tests/src/builds/v2/artifacts/Factory.ts +++ /dev/null @@ -1,37 +0,0 @@ -export const factory = { - _format: 'hh-sol-artifact-1', - contractName: 'Factory', - sourceName: 'contracts/Factory.sol', - abi: [ - { - inputs: [ - { - internalType: 'address', - name: '_mainModule', - type: 'address' - }, - { - internalType: 'bytes32', - name: '_salt', - type: 'bytes32' - } - ], - name: 'deploy', - outputs: [ - { - internalType: 'address', - name: '_contract', - type: 'address' - } - ], - stateMutability: 'payable', - type: 'function' - } - ], - bytecode: - '0x608060405234801561001057600080fd5b5061019a806100206000396000f3fe60806040526004361061001e5760003560e01c806332c02a1414610023575b600080fd5b6100366100313660046100c5565b61005f565b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200160405180910390f35b60008060405180606001604052806028815260200161013d602891398473ffffffffffffffffffffffffffffffffffffffff166040516020016100a392919061010a565b60405160208183030381529060405290508281516020830134f5949350505050565b600080604083850312156100d857600080fd5b823573ffffffffffffffffffffffffffffffffffffffff811681146100fc57600080fd5b946020939093013593505050565b6000835160005b8181101561012b5760208187018101518583015201610111565b50919091019182525060200191905056fe603a600e3d39601a805130553df3363d3d373d3d3d363d30545af43d82803e903d91601857fd5bf3a264697066735822122043a67ce1dd84e0676792a0fadb81e020ae20ed22debbddf46c2790ea0338256464736f6c63430008110033', - deployedBytecode: - '0x60806040526004361061001e5760003560e01c806332c02a1414610023575b600080fd5b6100366100313660046100c5565b61005f565b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200160405180910390f35b60008060405180606001604052806028815260200161013d602891398473ffffffffffffffffffffffffffffffffffffffff166040516020016100a392919061010a565b60405160208183030381529060405290508281516020830134f5949350505050565b600080604083850312156100d857600080fd5b823573ffffffffffffffffffffffffffffffffffffffff811681146100fc57600080fd5b946020939093013593505050565b6000835160005b8181101561012b5760208187018101518583015201610111565b50919091019182525060200191905056fe603a600e3d39601a805130553df3363d3d373d3d3d363d30545af43d82803e903d91601857fd5bf3a264697066735822122043a67ce1dd84e0676792a0fadb81e020ae20ed22debbddf46c2790ea0338256464736f6c63430008110033', - linkReferences: {}, - deployedLinkReferences: {} -} diff --git a/old/packages/tests/src/builds/v2/artifacts/GuestModule.ts b/old/packages/tests/src/builds/v2/artifacts/GuestModule.ts deleted file mode 100644 index 9e0e81e75..000000000 --- a/old/packages/tests/src/builds/v2/artifacts/GuestModule.ts +++ /dev/null @@ -1,628 +0,0 @@ -export const guestModule = { - _format: 'hh-sol-artifact-1', - contractName: 'GuestModule', - sourceName: 'contracts/modules/GuestModule.sol', - abi: [ - { - inputs: [ - { - internalType: 'uint256', - name: '_space', - type: 'uint256' - }, - { - internalType: 'uint256', - name: '_provided', - type: 'uint256' - }, - { - internalType: 'uint256', - name: '_current', - type: 'uint256' - } - ], - name: 'BadNonce', - type: 'error' - }, - { - inputs: [ - { - internalType: 'uint256', - name: '_index', - type: 'uint256' - } - ], - name: 'DelegateCallNotAllowed', - type: 'error' - }, - { - inputs: [], - name: 'ImageHashIsZero', - type: 'error' - }, - { - inputs: [ - { - internalType: 'bytes32', - name: '_hash', - type: 'bytes32' - }, - { - internalType: 'address', - name: '_addr', - type: 'address' - }, - { - internalType: 'bytes', - name: '_signature', - type: 'bytes' - } - ], - name: 'InvalidNestedSignature', - type: 'error' - }, - { - inputs: [ - { - internalType: 'bytes', - name: '_signature', - type: 'bytes' - }, - { - internalType: 'bytes32', - name: '_s', - type: 'bytes32' - } - ], - name: 'InvalidSValue', - type: 'error' - }, - { - inputs: [ - { - internalType: 'bytes32', - name: '_hash', - type: 'bytes32' - }, - { - internalType: 'bytes', - name: '_signature', - type: 'bytes' - } - ], - name: 'InvalidSignature', - type: 'error' - }, - { - inputs: [ - { - internalType: 'uint256', - name: '_flag', - type: 'uint256' - } - ], - name: 'InvalidSignatureFlag', - type: 'error' - }, - { - inputs: [ - { - internalType: 'bytes', - name: '_signature', - type: 'bytes' - } - ], - name: 'InvalidSignatureLength', - type: 'error' - }, - { - inputs: [ - { - internalType: 'bytes1', - name: '_type', - type: 'bytes1' - } - ], - name: 'InvalidSignatureType', - type: 'error' - }, - { - inputs: [ - { - internalType: 'bytes', - name: '_signature', - type: 'bytes' - }, - { - internalType: 'uint256', - name: '_v', - type: 'uint256' - } - ], - name: 'InvalidVValue', - type: 'error' - }, - { - inputs: [ - { - internalType: 'bytes', - name: '_signature', - type: 'bytes' - }, - { - internalType: 'uint256', - name: 'threshold', - type: 'uint256' - }, - { - internalType: 'uint256', - name: '_weight', - type: 'uint256' - } - ], - name: 'LowWeightChainedSignature', - type: 'error' - }, - { - inputs: [ - { - internalType: 'uint256', - name: '_index', - type: 'uint256' - }, - { - internalType: 'uint256', - name: '_requested', - type: 'uint256' - }, - { - internalType: 'uint256', - name: '_available', - type: 'uint256' - } - ], - name: 'NotEnoughGas', - type: 'error' - }, - { - inputs: [], - name: 'NotSupported', - type: 'error' - }, - { - inputs: [ - { - internalType: 'address', - name: '_sender', - type: 'address' - }, - { - internalType: 'address', - name: '_self', - type: 'address' - } - ], - name: 'OnlySelfAuth', - type: 'error' - }, - { - inputs: [ - { - internalType: 'bytes', - name: '_signature', - type: 'bytes' - } - ], - name: 'SignerIsAddress0', - type: 'error' - }, - { - inputs: [ - { - internalType: 'bytes', - name: '_signature', - type: 'bytes' - }, - { - internalType: 'uint256', - name: '_type', - type: 'uint256' - }, - { - internalType: 'bool', - name: '_recoverMode', - type: 'bool' - } - ], - name: 'UnsupportedSignatureType', - type: 'error' - }, - { - inputs: [ - { - internalType: 'uint256', - name: '_current', - type: 'uint256' - }, - { - internalType: 'uint256', - name: '_prev', - type: 'uint256' - } - ], - name: 'WrongChainedCheckpointOrder', - type: 'error' - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: 'address', - name: '_contract', - type: 'address' - } - ], - name: 'CreatedContract', - type: 'event' - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: 'bytes32', - name: 'newImageHash', - type: 'bytes32' - } - ], - name: 'ImageHashUpdated', - type: 'event' - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: 'uint256', - name: '_space', - type: 'uint256' - }, - { - indexed: false, - internalType: 'uint256', - name: '_newNonce', - type: 'uint256' - } - ], - name: 'NonceChange', - type: 'event' - }, - { - anonymous: true, - inputs: [ - { - indexed: false, - internalType: 'bytes32', - name: '_tx', - type: 'bytes32' - } - ], - name: 'TxExecuted', - type: 'event' - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: 'bytes32', - name: '_tx', - type: 'bytes32' - }, - { - indexed: false, - internalType: 'bytes', - name: '_reason', - type: 'bytes' - } - ], - name: 'TxFailed', - type: 'event' - }, - { - inputs: [], - name: 'SET_IMAGE_HASH_TYPE_HASH', - outputs: [ - { - internalType: 'bytes32', - name: '', - type: 'bytes32' - } - ], - stateMutability: 'view', - type: 'function' - }, - { - inputs: [ - { - internalType: 'bytes', - name: '_code', - type: 'bytes' - } - ], - name: 'createContract', - outputs: [ - { - internalType: 'address', - name: 'addr', - type: 'address' - } - ], - stateMutability: 'payable', - type: 'function' - }, - { - inputs: [ - { - components: [ - { - internalType: 'bool', - name: 'delegateCall', - type: 'bool' - }, - { - internalType: 'bool', - name: 'revertOnError', - type: 'bool' - }, - { - internalType: 'uint256', - name: 'gasLimit', - type: 'uint256' - }, - { - internalType: 'address', - name: 'target', - type: 'address' - }, - { - internalType: 'uint256', - name: 'value', - type: 'uint256' - }, - { - internalType: 'bytes', - name: 'data', - type: 'bytes' - } - ], - internalType: 'struct IModuleCalls.Transaction[]', - name: '_txs', - type: 'tuple[]' - }, - { - internalType: 'uint256', - name: '', - type: 'uint256' - }, - { - internalType: 'bytes', - name: '', - type: 'bytes' - } - ], - name: 'execute', - outputs: [], - stateMutability: 'nonpayable', - type: 'function' - }, - { - inputs: [ - { - internalType: 'bytes32', - name: '_hash', - type: 'bytes32' - }, - { - internalType: 'bytes', - name: '_signatures', - type: 'bytes' - } - ], - name: 'isValidSignature', - outputs: [ - { - internalType: 'bytes4', - name: '', - type: 'bytes4' - } - ], - stateMutability: 'view', - type: 'function' - }, - { - inputs: [ - { - internalType: 'bytes', - name: '_data', - type: 'bytes' - }, - { - internalType: 'bytes', - name: '_signatures', - type: 'bytes' - } - ], - name: 'isValidSignature', - outputs: [ - { - internalType: 'bytes4', - name: '', - type: 'bytes4' - } - ], - stateMutability: 'view', - type: 'function' - }, - { - inputs: [], - name: 'nonce', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256' - } - ], - stateMutability: 'view', - type: 'function' - }, - { - inputs: [ - { - internalType: 'uint256', - name: '_space', - type: 'uint256' - } - ], - name: 'readNonce', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256' - } - ], - stateMutability: 'view', - type: 'function' - }, - { - inputs: [ - { - components: [ - { - internalType: 'bool', - name: 'delegateCall', - type: 'bool' - }, - { - internalType: 'bool', - name: 'revertOnError', - type: 'bool' - }, - { - internalType: 'uint256', - name: 'gasLimit', - type: 'uint256' - }, - { - internalType: 'address', - name: 'target', - type: 'address' - }, - { - internalType: 'uint256', - name: 'value', - type: 'uint256' - }, - { - internalType: 'bytes', - name: 'data', - type: 'bytes' - } - ], - internalType: 'struct IModuleCalls.Transaction[]', - name: '_txs', - type: 'tuple[]' - } - ], - name: 'selfExecute', - outputs: [], - stateMutability: 'nonpayable', - type: 'function' - }, - { - inputs: [ - { - internalType: 'bytes32', - name: '_digest', - type: 'bytes32' - }, - { - internalType: 'bytes', - name: '_signature', - type: 'bytes' - } - ], - name: 'signatureRecovery', - outputs: [ - { - internalType: 'uint256', - name: 'threshold', - type: 'uint256' - }, - { - internalType: 'uint256', - name: 'weight', - type: 'uint256' - }, - { - internalType: 'bytes32', - name: 'imageHash', - type: 'bytes32' - }, - { - internalType: 'bytes32', - name: 'subDigest', - type: 'bytes32' - }, - { - internalType: 'uint256', - name: 'checkpoint', - type: 'uint256' - } - ], - stateMutability: 'view', - type: 'function' - }, - { - inputs: [ - { - internalType: 'bytes4', - name: '_interfaceID', - type: 'bytes4' - } - ], - name: 'supportsInterface', - outputs: [ - { - internalType: 'bool', - name: '', - type: 'bool' - } - ], - stateMutability: 'pure', - type: 'function' - }, - { - inputs: [ - { - internalType: 'bytes32', - name: '_imageHash', - type: 'bytes32' - } - ], - name: 'updateImageHash', - outputs: [], - stateMutability: 'nonpayable', - type: 'function' - } - ], - bytecode: - '0x608060405234801561001057600080fd5b5061210b806100206000396000f3fe6080604052600436106100bc5760003560e01c806361c2926c116100745780638c3f55631161004e5780638c3f55631461025357806390042baf14610273578063affed0e0146102ab57600080fd5b806361c2926c146101cb5780637a9a1628146101eb578063853c50681461020b57600080fd5b806320c13b0b116100a557806320c13b0b14610147578063295614261461016757806357c56d6b1461018957600080fd5b806301ffc9a7146100c15780631626ba7e146100f6575b600080fd5b3480156100cd57600080fd5b506100e16100dc3660046117cc565b6102c0565b60405190151581526020015b60405180910390f35b34801561010257600080fd5b50610116610111366004611832565b6102d1565b6040517fffffffff0000000000000000000000000000000000000000000000000000000090911681526020016100ed565b34801561015357600080fd5b5061011661016236600461187e565b61031e565b34801561017357600080fd5b506101876101823660046118ea565b610383565b005b34801561019557600080fd5b506101bd7f8713a7c4465f6fbee2b6e9d6646d1d9f83fec929edfc4baf661f3c865bdd04d181565b6040519081526020016100ed565b3480156101d757600080fd5b506101876101e6366004611948565b6103d5565b3480156101f757600080fd5b5061018761020636600461198a565b61041a565b34801561021757600080fd5b5061022b610226366004611832565b610447565b604080519586526020860194909452928401919091526060830152608082015260a0016100ed565b34801561025f57600080fd5b506101bd61026e3660046118ea565b61060f565b610286610281366004611a33565b61063b565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020016100ed565b3480156102b757600080fd5b506101bd6106d7565b60006102cb826106e8565b92915050565b6000806102df858585610744565b509050801561031157507f1626ba7e000000000000000000000000000000000000000000000000000000009050610317565b50600090505b9392505050565b6000806103438686604051610334929190611b02565b60405180910390208585610744565b509050801561037557507f20c13b0b00000000000000000000000000000000000000000000000000000000905061037b565b50600090505b949350505050565b3330146103c9576040517fe12588940000000000000000000000000000000000000000000000000000000081523360048201523060248201526044015b60405180910390fd5b6103d28161077c565b50565b600061040883836040516020016103ed929190611ce0565b604051602081830303815290604052805190602001206107ae565b9050610415818484610833565b505050565b600061043286866040516020016103ed929190611d28565b905061043f818787610833565b505050505050565b6000806000806000808787600081811061046357610463611d70565b909101357fff000000000000000000000000000000000000000000000000000000000000001691508190506104b95761049b896107ae565b92506104a8838989610996565b929850909650945091506106049050565b7fff00000000000000000000000000000000000000000000000000000000000000818116016104f8576104eb896107ae565b92506104a88389896109e7565b7ffe000000000000000000000000000000000000000000000000000000000000007fff0000000000000000000000000000000000000000000000000000000000000082160161054a576104eb89610a13565b7ffd000000000000000000000000000000000000000000000000000000000000007fff000000000000000000000000000000000000000000000000000000000000008216016105ae5761059e898989610a80565b9550955095509550955050610604565b6040517f6085cd820000000000000000000000000000000000000000000000000000000081527fff00000000000000000000000000000000000000000000000000000000000000821660048201526024016103c0565b939792965093509350565b60006102cb7f8d0bf1fd623d628c741362c1289948e57b3e2905218c676d3e69abee36d6ae2e83610bfd565b600033301461067e576040517fe12588940000000000000000000000000000000000000000000000000000000081523360048201523060248201526044016103c0565b81516020830134f060405173ffffffffffffffffffffffffffffffffffffffff821681529091507fa506ad4e7f05eceba62a023c3219e5bd98a615f4fa87e2afb08a2da5cf62bf0c9060200160405180910390a1919050565b60006106e3600061060f565b905090565b60007f6ffbd451000000000000000000000000000000000000000000000000000000007fffffffff0000000000000000000000000000000000000000000000000000000083160161073b57506001919050565b6102cb82610c5b565b6000806000806000610757888888610447565b5096509194509250905082821080159061076f575060015b9450505050935093915050565b6040517fa038794000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6040517f190100000000000000000000000000000000000000000000000000000000000060208201524660228201527fffffffffffffffffffffffffffffffffffffffff0000000000000000000000003060601b166042820152605681018290526000906076015b604051602081830303815290604052805190602001209050919050565b8060005b8181101561098f573684848381811061085257610852611d70565b90506020028101906108649190611d9f565b90506108736020820182611ddd565b156108ad576040517f230d1ccc000000000000000000000000000000000000000000000000000000008152600481018390526024016103c0565b6040810135805a10156109005782815a6040517f2bb3e3ba0000000000000000000000000000000000000000000000000000000081526004810193909352602483019190915260448201526064016103c0565b600061093a6109156080850160608601611df8565b608085013584156109265784610928565b5a5b61093560a0880188611e13565b610cb7565b905080156109585760405188815260200160405180910390a0610979565b61097961096b6040850160208601611ddd565b89610974610cd4565b610cf3565b505050808061098790611ea7565b915050610837565b5050505050565b60008080806109b1876109ac876006818b611edf565b610d3f565b6000908152873560f01c6020818152604080842084526002909a013560e01c908190529890912090999198509695509350505050565b6000808080610a02876109fd876001818b611edf565b610996565b935093509350935093509350935093565b6040517f190100000000000000000000000000000000000000000000000000000000000060208201526000602282018190527fffffffffffffffffffffffffffffffffffffffff0000000000000000000000003060601b1660428301526056820183905290607601610816565b6000808080806004600188013560e81c82610a9b8383611f09565b9050610aad8b61022683868d8f611edf565b939b5091995097509550935087871015610b0557610acd81848b8d611edf565b89896040517fb006aba00000000000000000000000000000000000000000000000000000000081526004016103c09493929190611f1c565b8092505b88831015610bef5760038301928a013560e81c9150610b288383611f09565b90506000610b4a610b38886111d5565b8c8c8790869261022693929190611edf565b939c50919a5098509091505088881015610ba257610b6a82858c8e611edf565b8a8a6040517fb006aba00000000000000000000000000000000000000000000000000000000081526004016103c09493929190611f1c565b848110610be5576040517f37daf62b00000000000000000000000000000000000000000000000000000000815260048101829052602481018690526044016103c0565b9350915081610b09565b505050939792965093509350565b6000808383604051602001610c1c929190918252602082015260400190565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0818403018152919052805160209091012054949350505050565b60007fe4a77bbc000000000000000000000000000000000000000000000000000000007fffffffff00000000000000000000000000000000000000000000000000000000831601610cae57506001919050565b6102cb82611209565b6000604051828482376000808483898b8af1979650505050505050565b60603d604051915060208201818101604052818352816000823e505090565b8215610d0157805160208201fd5b7f3dbd1590ea96dd3253a91f24e64e3a502e1225d602a5731357bc12643070ccd78282604051610d32929190611f43565b60405180910390a1505050565b60008060005b838110156111cc57600181019085013560f81c7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8101610de657601582019186013560f881901c9060581c73ffffffffffffffffffffffffffffffffffffffff81169074ff000000000000000000000000000000000000000016811785610dcc5780610ddb565b60008681526020829052604090205b955050505050610d45565b80610e7c5760018201918681013560f81c906043016000610e128a610e0d84888c8e611edf565b6112f3565b60ff841697909701969194508491905060a083901b74ff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff82161786610e615780610e70565b60008781526020829052604090205b96505050505050610d45565b60028103610fa4576000808784013560f881901c9060581c73ffffffffffffffffffffffffffffffffffffffff16601586019550909250905060008885013560e81c600386018162ffffff169150809650819250505060008186019050610ef58b848c8c8a908692610ef093929190611edf565b6115b6565b610f3d578a83610f0783898d8f611edf565b6040517f9a9462320000000000000000000000000000000000000000000000000000000081526004016103c09493929190611fb7565b60ff8416979097019694508460a084901b74ff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff84161787610f885780610f97565b60008881526020829052604090205b9750505050505050610d45565b60038103610fd757602082019186013583610fbf5780610fce565b60008481526020829052604090205b93505050610d45565b60048103611023576003808301928781013560e81c91908201016000806110048b6109ac85898d8f611edf565b60009889526020526040909720969097019650909350610d4592505050565b6006810361112b5760008287013560f81c60018401935060ff16905060008784013560f01c60028501945061ffff16905060008885013560e81c600386018162ffffff1691508096508192505050600081860190506000806110918d8d8d8b9087926109ac93929190611edf565b939850889390925090508482106110a757988501985b604080517f53657175656e6365206e657374656420636f6e6669673a0a0000000000000000602080830191909152603882018490526058820188905260788083018a905283518084039091018152609890920190925280519101208961110d578061111c565b60008a81526020829052604090205b99505050505050505050610d45565b60058103611197576020820191860135878103611166577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff94505b600061117182611763565b90508461117e578061118d565b60008581526020829052604090205b9450505050610d45565b6040517fb2505f7c000000000000000000000000000000000000000000000000000000008152600481018290526024016103c0565b50935093915050565b7f8713a7c4465f6fbee2b6e9d6646d1d9f83fec929edfc4baf661f3c865bdd04d160009081526020829052604081206102cb565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167fac6a444e00000000000000000000000000000000000000000000000000000000148061129c57507fffffffff0000000000000000000000000000000000000000000000000000000082167f36e7817500000000000000000000000000000000000000000000000000000000145b156112a957506001919050565b7f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316146102cb565b6000604282146113335782826040517f2ee17a3d0000000000000000000000000000000000000000000000000000000081526004016103c0929190611ff7565b600061134c61134360018561200b565b85013560f81c90565b60ff169050604084013560f81c843560208601357f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a08111156113c0578686826040517fad4aac760000000000000000000000000000000000000000000000000000000081526004016103c09392919061201e565b8260ff16601b141580156113d857508260ff16601c14155b15611415578686846040517fe578897e0000000000000000000000000000000000000000000000000000000081526004016103c093929190612042565b60018403611482576040805160008152602081018083528a905260ff851691810191909152606081018390526080810182905260019060a0015b6020604051602081039080840390855afa158015611471573d6000803e3d6000fd5b50505060206040510351945061155a565b6002840361151f576040517f19457468657265756d205369676e6564204d6573736167653a0a3332000000006020820152603c8101899052600190605c01604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181528282528051602091820120600084529083018083525260ff861690820152606081018490526080810183905260a00161144f565b86868560016040517f9dfba8520000000000000000000000000000000000000000000000000000000081526004016103c09493929190612069565b73ffffffffffffffffffffffffffffffffffffffff85166115ab5786866040517f6c1719d20000000000000000000000000000000000000000000000000000000081526004016103c0929190611ff7565b505050509392505050565b60008083836115c660018261200b565b8181106115d5576115d5611d70565b919091013560f81c91505060018114806115ef5750600281145b15611634578473ffffffffffffffffffffffffffffffffffffffff166116168786866112f3565b73ffffffffffffffffffffffffffffffffffffffff1614915061175a565b6003810361171f5773ffffffffffffffffffffffffffffffffffffffff8516631626ba7e878660008761166860018261200b565b9261167593929190611edf565b6040518463ffffffff1660e01b815260040161169393929190612095565b602060405180830381865afa1580156116b0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116d491906120b8565b7fffffffff00000000000000000000000000000000000000000000000000000000167f1626ba7e0000000000000000000000000000000000000000000000000000000014915061175a565b83838260006040517f9dfba8520000000000000000000000000000000000000000000000000000000081526004016103c09493929190612069565b50949350505050565b6040517f53657175656e636520737461746963206469676573743a0a0000000000000000602082015260388101829052600090605801610816565b7fffffffff00000000000000000000000000000000000000000000000000000000811681146103d257600080fd5b6000602082840312156117de57600080fd5b81356103178161179e565b60008083601f8401126117fb57600080fd5b50813567ffffffffffffffff81111561181357600080fd5b60208301915083602082850101111561182b57600080fd5b9250929050565b60008060006040848603121561184757600080fd5b83359250602084013567ffffffffffffffff81111561186557600080fd5b611871868287016117e9565b9497909650939450505050565b6000806000806040858703121561189457600080fd5b843567ffffffffffffffff808211156118ac57600080fd5b6118b8888389016117e9565b909650945060208701359150808211156118d157600080fd5b506118de878288016117e9565b95989497509550505050565b6000602082840312156118fc57600080fd5b5035919050565b60008083601f84011261191557600080fd5b50813567ffffffffffffffff81111561192d57600080fd5b6020830191508360208260051b850101111561182b57600080fd5b6000806020838503121561195b57600080fd5b823567ffffffffffffffff81111561197257600080fd5b61197e85828601611903565b90969095509350505050565b6000806000806000606086880312156119a257600080fd5b853567ffffffffffffffff808211156119ba57600080fd5b6119c689838a01611903565b90975095506020880135945060408801359150808211156119e657600080fd5b506119f3888289016117e9565b969995985093965092949392505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600060208284031215611a4557600080fd5b813567ffffffffffffffff80821115611a5d57600080fd5b818401915084601f830112611a7157600080fd5b813581811115611a8357611a83611a04565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0908116603f01168101908382118183101715611ac957611ac9611a04565b81604052828152876020848701011115611ae257600080fd5b826020860160208301376000928101602001929092525095945050505050565b8183823760009101908152919050565b80358015158114611b2257600080fd5b919050565b803573ffffffffffffffffffffffffffffffffffffffff81168114611b2257600080fd5b8183528181602085013750600060208284010152600060207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f840116840101905092915050565b818352600060208085019450848460051b86018460005b87811015611cd357838303895281357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff41883603018112611bea57600080fd5b870160c0611bf782611b12565b15158552611c06878301611b12565b15158588015260408281013590860152606073ffffffffffffffffffffffffffffffffffffffff611c38828501611b27565b16908601526080828101359086015260a080830135368490037fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe1018112611c7e57600080fd5b90920187810192903567ffffffffffffffff811115611c9c57600080fd5b803603841315611cab57600080fd5b8282880152611cbd8388018286611b4b565b9c89019c96505050928601925050600101611bab565b5090979650505050505050565b60408152600560408201527f73656c663a000000000000000000000000000000000000000000000000000000606082015260806020820152600061037b608083018486611b94565b60408152600660408201527f67756573743a0000000000000000000000000000000000000000000000000000606082015260806020820152600061037b608083018486611b94565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b600082357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff41833603018112611dd357600080fd5b9190910192915050565b600060208284031215611def57600080fd5b61031782611b12565b600060208284031215611e0a57600080fd5b61031782611b27565b60008083357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe1843603018112611e4857600080fd5b83018035915067ffffffffffffffff821115611e6357600080fd5b60200191503681900382131561182b57600080fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203611ed857611ed8611e78565b5060010190565b60008085851115611eef57600080fd5b83861115611efc57600080fd5b5050820193919092039150565b808201808211156102cb576102cb611e78565b606081526000611f30606083018688611b4b565b6020830194909452506040015292915050565b82815260006020604081840152835180604085015260005b81811015611f7757858101830151858201606001528201611f5b565b5060006060828601015260607fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f830116850101925050509392505050565b84815273ffffffffffffffffffffffffffffffffffffffff84166020820152606060408201526000611fed606083018486611b4b565b9695505050505050565b60208152600061037b602083018486611b4b565b818103818111156102cb576102cb611e78565b604081526000612032604083018587611b4b565b9050826020830152949350505050565b604081526000612056604083018587611b4b565b905060ff83166020830152949350505050565b60608152600061207d606083018688611b4b565b60208301949094525090151560409091015292915050565b8381526040602082015260006120af604083018486611b4b565b95945050505050565b6000602082840312156120ca57600080fd5b81516103178161179e56fea264697066735822122075ce1ed9c453c8c833ec89aa2911db2e9a1e07c0a29fc3ed180acba619d449be64736f6c63430008110033', - deployedBytecode: - '0x6080604052600436106100bc5760003560e01c806361c2926c116100745780638c3f55631161004e5780638c3f55631461025357806390042baf14610273578063affed0e0146102ab57600080fd5b806361c2926c146101cb5780637a9a1628146101eb578063853c50681461020b57600080fd5b806320c13b0b116100a557806320c13b0b14610147578063295614261461016757806357c56d6b1461018957600080fd5b806301ffc9a7146100c15780631626ba7e146100f6575b600080fd5b3480156100cd57600080fd5b506100e16100dc3660046117cc565b6102c0565b60405190151581526020015b60405180910390f35b34801561010257600080fd5b50610116610111366004611832565b6102d1565b6040517fffffffff0000000000000000000000000000000000000000000000000000000090911681526020016100ed565b34801561015357600080fd5b5061011661016236600461187e565b61031e565b34801561017357600080fd5b506101876101823660046118ea565b610383565b005b34801561019557600080fd5b506101bd7f8713a7c4465f6fbee2b6e9d6646d1d9f83fec929edfc4baf661f3c865bdd04d181565b6040519081526020016100ed565b3480156101d757600080fd5b506101876101e6366004611948565b6103d5565b3480156101f757600080fd5b5061018761020636600461198a565b61041a565b34801561021757600080fd5b5061022b610226366004611832565b610447565b604080519586526020860194909452928401919091526060830152608082015260a0016100ed565b34801561025f57600080fd5b506101bd61026e3660046118ea565b61060f565b610286610281366004611a33565b61063b565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020016100ed565b3480156102b757600080fd5b506101bd6106d7565b60006102cb826106e8565b92915050565b6000806102df858585610744565b509050801561031157507f1626ba7e000000000000000000000000000000000000000000000000000000009050610317565b50600090505b9392505050565b6000806103438686604051610334929190611b02565b60405180910390208585610744565b509050801561037557507f20c13b0b00000000000000000000000000000000000000000000000000000000905061037b565b50600090505b949350505050565b3330146103c9576040517fe12588940000000000000000000000000000000000000000000000000000000081523360048201523060248201526044015b60405180910390fd5b6103d28161077c565b50565b600061040883836040516020016103ed929190611ce0565b604051602081830303815290604052805190602001206107ae565b9050610415818484610833565b505050565b600061043286866040516020016103ed929190611d28565b905061043f818787610833565b505050505050565b6000806000806000808787600081811061046357610463611d70565b909101357fff000000000000000000000000000000000000000000000000000000000000001691508190506104b95761049b896107ae565b92506104a8838989610996565b929850909650945091506106049050565b7fff00000000000000000000000000000000000000000000000000000000000000818116016104f8576104eb896107ae565b92506104a88389896109e7565b7ffe000000000000000000000000000000000000000000000000000000000000007fff0000000000000000000000000000000000000000000000000000000000000082160161054a576104eb89610a13565b7ffd000000000000000000000000000000000000000000000000000000000000007fff000000000000000000000000000000000000000000000000000000000000008216016105ae5761059e898989610a80565b9550955095509550955050610604565b6040517f6085cd820000000000000000000000000000000000000000000000000000000081527fff00000000000000000000000000000000000000000000000000000000000000821660048201526024016103c0565b939792965093509350565b60006102cb7f8d0bf1fd623d628c741362c1289948e57b3e2905218c676d3e69abee36d6ae2e83610bfd565b600033301461067e576040517fe12588940000000000000000000000000000000000000000000000000000000081523360048201523060248201526044016103c0565b81516020830134f060405173ffffffffffffffffffffffffffffffffffffffff821681529091507fa506ad4e7f05eceba62a023c3219e5bd98a615f4fa87e2afb08a2da5cf62bf0c9060200160405180910390a1919050565b60006106e3600061060f565b905090565b60007f6ffbd451000000000000000000000000000000000000000000000000000000007fffffffff0000000000000000000000000000000000000000000000000000000083160161073b57506001919050565b6102cb82610c5b565b6000806000806000610757888888610447565b5096509194509250905082821080159061076f575060015b9450505050935093915050565b6040517fa038794000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6040517f190100000000000000000000000000000000000000000000000000000000000060208201524660228201527fffffffffffffffffffffffffffffffffffffffff0000000000000000000000003060601b166042820152605681018290526000906076015b604051602081830303815290604052805190602001209050919050565b8060005b8181101561098f573684848381811061085257610852611d70565b90506020028101906108649190611d9f565b90506108736020820182611ddd565b156108ad576040517f230d1ccc000000000000000000000000000000000000000000000000000000008152600481018390526024016103c0565b6040810135805a10156109005782815a6040517f2bb3e3ba0000000000000000000000000000000000000000000000000000000081526004810193909352602483019190915260448201526064016103c0565b600061093a6109156080850160608601611df8565b608085013584156109265784610928565b5a5b61093560a0880188611e13565b610cb7565b905080156109585760405188815260200160405180910390a0610979565b61097961096b6040850160208601611ddd565b89610974610cd4565b610cf3565b505050808061098790611ea7565b915050610837565b5050505050565b60008080806109b1876109ac876006818b611edf565b610d3f565b6000908152873560f01c6020818152604080842084526002909a013560e01c908190529890912090999198509695509350505050565b6000808080610a02876109fd876001818b611edf565b610996565b935093509350935093509350935093565b6040517f190100000000000000000000000000000000000000000000000000000000000060208201526000602282018190527fffffffffffffffffffffffffffffffffffffffff0000000000000000000000003060601b1660428301526056820183905290607601610816565b6000808080806004600188013560e81c82610a9b8383611f09565b9050610aad8b61022683868d8f611edf565b939b5091995097509550935087871015610b0557610acd81848b8d611edf565b89896040517fb006aba00000000000000000000000000000000000000000000000000000000081526004016103c09493929190611f1c565b8092505b88831015610bef5760038301928a013560e81c9150610b288383611f09565b90506000610b4a610b38886111d5565b8c8c8790869261022693929190611edf565b939c50919a5098509091505088881015610ba257610b6a82858c8e611edf565b8a8a6040517fb006aba00000000000000000000000000000000000000000000000000000000081526004016103c09493929190611f1c565b848110610be5576040517f37daf62b00000000000000000000000000000000000000000000000000000000815260048101829052602481018690526044016103c0565b9350915081610b09565b505050939792965093509350565b6000808383604051602001610c1c929190918252602082015260400190565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0818403018152919052805160209091012054949350505050565b60007fe4a77bbc000000000000000000000000000000000000000000000000000000007fffffffff00000000000000000000000000000000000000000000000000000000831601610cae57506001919050565b6102cb82611209565b6000604051828482376000808483898b8af1979650505050505050565b60603d604051915060208201818101604052818352816000823e505090565b8215610d0157805160208201fd5b7f3dbd1590ea96dd3253a91f24e64e3a502e1225d602a5731357bc12643070ccd78282604051610d32929190611f43565b60405180910390a1505050565b60008060005b838110156111cc57600181019085013560f81c7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8101610de657601582019186013560f881901c9060581c73ffffffffffffffffffffffffffffffffffffffff81169074ff000000000000000000000000000000000000000016811785610dcc5780610ddb565b60008681526020829052604090205b955050505050610d45565b80610e7c5760018201918681013560f81c906043016000610e128a610e0d84888c8e611edf565b6112f3565b60ff841697909701969194508491905060a083901b74ff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff82161786610e615780610e70565b60008781526020829052604090205b96505050505050610d45565b60028103610fa4576000808784013560f881901c9060581c73ffffffffffffffffffffffffffffffffffffffff16601586019550909250905060008885013560e81c600386018162ffffff169150809650819250505060008186019050610ef58b848c8c8a908692610ef093929190611edf565b6115b6565b610f3d578a83610f0783898d8f611edf565b6040517f9a9462320000000000000000000000000000000000000000000000000000000081526004016103c09493929190611fb7565b60ff8416979097019694508460a084901b74ff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff84161787610f885780610f97565b60008881526020829052604090205b9750505050505050610d45565b60038103610fd757602082019186013583610fbf5780610fce565b60008481526020829052604090205b93505050610d45565b60048103611023576003808301928781013560e81c91908201016000806110048b6109ac85898d8f611edf565b60009889526020526040909720969097019650909350610d4592505050565b6006810361112b5760008287013560f81c60018401935060ff16905060008784013560f01c60028501945061ffff16905060008885013560e81c600386018162ffffff1691508096508192505050600081860190506000806110918d8d8d8b9087926109ac93929190611edf565b939850889390925090508482106110a757988501985b604080517f53657175656e6365206e657374656420636f6e6669673a0a0000000000000000602080830191909152603882018490526058820188905260788083018a905283518084039091018152609890920190925280519101208961110d578061111c565b60008a81526020829052604090205b99505050505050505050610d45565b60058103611197576020820191860135878103611166577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff94505b600061117182611763565b90508461117e578061118d565b60008581526020829052604090205b9450505050610d45565b6040517fb2505f7c000000000000000000000000000000000000000000000000000000008152600481018290526024016103c0565b50935093915050565b7f8713a7c4465f6fbee2b6e9d6646d1d9f83fec929edfc4baf661f3c865bdd04d160009081526020829052604081206102cb565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167fac6a444e00000000000000000000000000000000000000000000000000000000148061129c57507fffffffff0000000000000000000000000000000000000000000000000000000082167f36e7817500000000000000000000000000000000000000000000000000000000145b156112a957506001919050565b7f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316146102cb565b6000604282146113335782826040517f2ee17a3d0000000000000000000000000000000000000000000000000000000081526004016103c0929190611ff7565b600061134c61134360018561200b565b85013560f81c90565b60ff169050604084013560f81c843560208601357f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a08111156113c0578686826040517fad4aac760000000000000000000000000000000000000000000000000000000081526004016103c09392919061201e565b8260ff16601b141580156113d857508260ff16601c14155b15611415578686846040517fe578897e0000000000000000000000000000000000000000000000000000000081526004016103c093929190612042565b60018403611482576040805160008152602081018083528a905260ff851691810191909152606081018390526080810182905260019060a0015b6020604051602081039080840390855afa158015611471573d6000803e3d6000fd5b50505060206040510351945061155a565b6002840361151f576040517f19457468657265756d205369676e6564204d6573736167653a0a3332000000006020820152603c8101899052600190605c01604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181528282528051602091820120600084529083018083525260ff861690820152606081018490526080810183905260a00161144f565b86868560016040517f9dfba8520000000000000000000000000000000000000000000000000000000081526004016103c09493929190612069565b73ffffffffffffffffffffffffffffffffffffffff85166115ab5786866040517f6c1719d20000000000000000000000000000000000000000000000000000000081526004016103c0929190611ff7565b505050509392505050565b60008083836115c660018261200b565b8181106115d5576115d5611d70565b919091013560f81c91505060018114806115ef5750600281145b15611634578473ffffffffffffffffffffffffffffffffffffffff166116168786866112f3565b73ffffffffffffffffffffffffffffffffffffffff1614915061175a565b6003810361171f5773ffffffffffffffffffffffffffffffffffffffff8516631626ba7e878660008761166860018261200b565b9261167593929190611edf565b6040518463ffffffff1660e01b815260040161169393929190612095565b602060405180830381865afa1580156116b0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116d491906120b8565b7fffffffff00000000000000000000000000000000000000000000000000000000167f1626ba7e0000000000000000000000000000000000000000000000000000000014915061175a565b83838260006040517f9dfba8520000000000000000000000000000000000000000000000000000000081526004016103c09493929190612069565b50949350505050565b6040517f53657175656e636520737461746963206469676573743a0a0000000000000000602082015260388101829052600090605801610816565b7fffffffff00000000000000000000000000000000000000000000000000000000811681146103d257600080fd5b6000602082840312156117de57600080fd5b81356103178161179e565b60008083601f8401126117fb57600080fd5b50813567ffffffffffffffff81111561181357600080fd5b60208301915083602082850101111561182b57600080fd5b9250929050565b60008060006040848603121561184757600080fd5b83359250602084013567ffffffffffffffff81111561186557600080fd5b611871868287016117e9565b9497909650939450505050565b6000806000806040858703121561189457600080fd5b843567ffffffffffffffff808211156118ac57600080fd5b6118b8888389016117e9565b909650945060208701359150808211156118d157600080fd5b506118de878288016117e9565b95989497509550505050565b6000602082840312156118fc57600080fd5b5035919050565b60008083601f84011261191557600080fd5b50813567ffffffffffffffff81111561192d57600080fd5b6020830191508360208260051b850101111561182b57600080fd5b6000806020838503121561195b57600080fd5b823567ffffffffffffffff81111561197257600080fd5b61197e85828601611903565b90969095509350505050565b6000806000806000606086880312156119a257600080fd5b853567ffffffffffffffff808211156119ba57600080fd5b6119c689838a01611903565b90975095506020880135945060408801359150808211156119e657600080fd5b506119f3888289016117e9565b969995985093965092949392505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600060208284031215611a4557600080fd5b813567ffffffffffffffff80821115611a5d57600080fd5b818401915084601f830112611a7157600080fd5b813581811115611a8357611a83611a04565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0908116603f01168101908382118183101715611ac957611ac9611a04565b81604052828152876020848701011115611ae257600080fd5b826020860160208301376000928101602001929092525095945050505050565b8183823760009101908152919050565b80358015158114611b2257600080fd5b919050565b803573ffffffffffffffffffffffffffffffffffffffff81168114611b2257600080fd5b8183528181602085013750600060208284010152600060207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f840116840101905092915050565b818352600060208085019450848460051b86018460005b87811015611cd357838303895281357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff41883603018112611bea57600080fd5b870160c0611bf782611b12565b15158552611c06878301611b12565b15158588015260408281013590860152606073ffffffffffffffffffffffffffffffffffffffff611c38828501611b27565b16908601526080828101359086015260a080830135368490037fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe1018112611c7e57600080fd5b90920187810192903567ffffffffffffffff811115611c9c57600080fd5b803603841315611cab57600080fd5b8282880152611cbd8388018286611b4b565b9c89019c96505050928601925050600101611bab565b5090979650505050505050565b60408152600560408201527f73656c663a000000000000000000000000000000000000000000000000000000606082015260806020820152600061037b608083018486611b94565b60408152600660408201527f67756573743a0000000000000000000000000000000000000000000000000000606082015260806020820152600061037b608083018486611b94565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b600082357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff41833603018112611dd357600080fd5b9190910192915050565b600060208284031215611def57600080fd5b61031782611b12565b600060208284031215611e0a57600080fd5b61031782611b27565b60008083357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe1843603018112611e4857600080fd5b83018035915067ffffffffffffffff821115611e6357600080fd5b60200191503681900382131561182b57600080fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203611ed857611ed8611e78565b5060010190565b60008085851115611eef57600080fd5b83861115611efc57600080fd5b5050820193919092039150565b808201808211156102cb576102cb611e78565b606081526000611f30606083018688611b4b565b6020830194909452506040015292915050565b82815260006020604081840152835180604085015260005b81811015611f7757858101830151858201606001528201611f5b565b5060006060828601015260607fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f830116850101925050509392505050565b84815273ffffffffffffffffffffffffffffffffffffffff84166020820152606060408201526000611fed606083018486611b4b565b9695505050505050565b60208152600061037b602083018486611b4b565b818103818111156102cb576102cb611e78565b604081526000612032604083018587611b4b565b9050826020830152949350505050565b604081526000612056604083018587611b4b565b905060ff83166020830152949350505050565b60608152600061207d606083018688611b4b565b60208301949094525090151560409091015292915050565b8381526040602082015260006120af604083018486611b4b565b95945050505050565b6000602082840312156120ca57600080fd5b81516103178161179e56fea264697066735822122075ce1ed9c453c8c833ec89aa2911db2e9a1e07c0a29fc3ed180acba619d449be64736f6c63430008110033', - linkReferences: {}, - deployedLinkReferences: {} -} diff --git a/old/packages/tests/src/builds/v2/artifacts/MainModule.ts b/old/packages/tests/src/builds/v2/artifacts/MainModule.ts deleted file mode 100644 index 52602897d..000000000 --- a/old/packages/tests/src/builds/v2/artifacts/MainModule.ts +++ /dev/null @@ -1,1104 +0,0 @@ -export const mainModule = { - _format: 'hh-sol-artifact-1', - contractName: 'MainModule', - sourceName: 'contracts/modules/MainModule.sol', - abi: [ - { - inputs: [ - { - internalType: 'address', - name: '_factory', - type: 'address' - }, - { - internalType: 'address', - name: '_mainModuleUpgradable', - type: 'address' - } - ], - stateMutability: 'nonpayable', - type: 'constructor' - }, - { - inputs: [ - { - internalType: 'uint256', - name: '_space', - type: 'uint256' - }, - { - internalType: 'uint256', - name: '_provided', - type: 'uint256' - }, - { - internalType: 'uint256', - name: '_current', - type: 'uint256' - } - ], - name: 'BadNonce', - type: 'error' - }, - { - inputs: [ - { - internalType: 'bytes4', - name: '_signature', - type: 'bytes4' - } - ], - name: 'HookAlreadyExists', - type: 'error' - }, - { - inputs: [ - { - internalType: 'bytes4', - name: '_signature', - type: 'bytes4' - } - ], - name: 'HookDoesNotExist', - type: 'error' - }, - { - inputs: [], - name: 'ImageHashIsZero', - type: 'error' - }, - { - inputs: [ - { - internalType: 'address', - name: '_implementation', - type: 'address' - } - ], - name: 'InvalidImplementation', - type: 'error' - }, - { - inputs: [ - { - internalType: 'bytes32', - name: '_hash', - type: 'bytes32' - }, - { - internalType: 'address', - name: '_addr', - type: 'address' - }, - { - internalType: 'bytes', - name: '_signature', - type: 'bytes' - } - ], - name: 'InvalidNestedSignature', - type: 'error' - }, - { - inputs: [ - { - internalType: 'bytes', - name: '_signature', - type: 'bytes' - }, - { - internalType: 'bytes32', - name: '_s', - type: 'bytes32' - } - ], - name: 'InvalidSValue', - type: 'error' - }, - { - inputs: [ - { - internalType: 'bytes32', - name: '_hash', - type: 'bytes32' - }, - { - internalType: 'bytes', - name: '_signature', - type: 'bytes' - } - ], - name: 'InvalidSignature', - type: 'error' - }, - { - inputs: [ - { - internalType: 'uint256', - name: '_flag', - type: 'uint256' - } - ], - name: 'InvalidSignatureFlag', - type: 'error' - }, - { - inputs: [ - { - internalType: 'bytes', - name: '_signature', - type: 'bytes' - } - ], - name: 'InvalidSignatureLength', - type: 'error' - }, - { - inputs: [ - { - internalType: 'bytes1', - name: '_type', - type: 'bytes1' - } - ], - name: 'InvalidSignatureType', - type: 'error' - }, - { - inputs: [ - { - internalType: 'bytes', - name: '_signature', - type: 'bytes' - }, - { - internalType: 'uint256', - name: '_v', - type: 'uint256' - } - ], - name: 'InvalidVValue', - type: 'error' - }, - { - inputs: [ - { - internalType: 'bytes', - name: '_signature', - type: 'bytes' - }, - { - internalType: 'uint256', - name: 'threshold', - type: 'uint256' - }, - { - internalType: 'uint256', - name: '_weight', - type: 'uint256' - } - ], - name: 'LowWeightChainedSignature', - type: 'error' - }, - { - inputs: [ - { - internalType: 'uint256', - name: '_index', - type: 'uint256' - }, - { - internalType: 'uint256', - name: '_requested', - type: 'uint256' - }, - { - internalType: 'uint256', - name: '_available', - type: 'uint256' - } - ], - name: 'NotEnoughGas', - type: 'error' - }, - { - inputs: [ - { - internalType: 'address', - name: '_sender', - type: 'address' - }, - { - internalType: 'address', - name: '_self', - type: 'address' - } - ], - name: 'OnlySelfAuth', - type: 'error' - }, - { - inputs: [ - { - internalType: 'bytes', - name: '_signature', - type: 'bytes' - } - ], - name: 'SignerIsAddress0', - type: 'error' - }, - { - inputs: [ - { - internalType: 'bytes', - name: '_signature', - type: 'bytes' - }, - { - internalType: 'uint256', - name: '_type', - type: 'uint256' - }, - { - internalType: 'bool', - name: '_recoverMode', - type: 'bool' - } - ], - name: 'UnsupportedSignatureType', - type: 'error' - }, - { - inputs: [ - { - internalType: 'uint256', - name: '_current', - type: 'uint256' - }, - { - internalType: 'uint256', - name: '_prev', - type: 'uint256' - } - ], - name: 'WrongChainedCheckpointOrder', - type: 'error' - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: 'address', - name: '_contract', - type: 'address' - } - ], - name: 'CreatedContract', - type: 'event' - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: 'bytes32', - name: '_hash', - type: 'bytes32' - } - ], - name: 'IPFSRootUpdated', - type: 'event' - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: 'bytes32', - name: 'newImageHash', - type: 'bytes32' - } - ], - name: 'ImageHashUpdated', - type: 'event' - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: 'address', - name: 'newImplementation', - type: 'address' - } - ], - name: 'ImplementationUpdated', - type: 'event' - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: 'uint256', - name: '_space', - type: 'uint256' - }, - { - indexed: false, - internalType: 'uint256', - name: '_newNonce', - type: 'uint256' - } - ], - name: 'NonceChange', - type: 'event' - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'bytes32', - name: '_imageHash', - type: 'bytes32' - }, - { - indexed: false, - internalType: 'uint256', - name: '_expiration', - type: 'uint256' - } - ], - name: 'SetExtraImageHash', - type: 'event' - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'bytes32', - name: '_digest', - type: 'bytes32' - }, - { - indexed: false, - internalType: 'uint256', - name: '_expiration', - type: 'uint256' - } - ], - name: 'SetStaticDigest', - type: 'event' - }, - { - anonymous: true, - inputs: [ - { - indexed: false, - internalType: 'bytes32', - name: '_tx', - type: 'bytes32' - } - ], - name: 'TxExecuted', - type: 'event' - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: 'bytes32', - name: '_tx', - type: 'bytes32' - }, - { - indexed: false, - internalType: 'bytes', - name: '_reason', - type: 'bytes' - } - ], - name: 'TxFailed', - type: 'event' - }, - { - stateMutability: 'payable', - type: 'fallback' - }, - { - inputs: [], - name: 'FACTORY', - outputs: [ - { - internalType: 'address', - name: '', - type: 'address' - } - ], - stateMutability: 'view', - type: 'function' - }, - { - inputs: [], - name: 'INIT_CODE_HASH', - outputs: [ - { - internalType: 'bytes32', - name: '', - type: 'bytes32' - } - ], - stateMutability: 'view', - type: 'function' - }, - { - inputs: [], - name: 'SET_IMAGE_HASH_TYPE_HASH', - outputs: [ - { - internalType: 'bytes32', - name: '', - type: 'bytes32' - } - ], - stateMutability: 'view', - type: 'function' - }, - { - inputs: [], - name: 'UPGRADEABLE_IMPLEMENTATION', - outputs: [ - { - internalType: 'address', - name: '', - type: 'address' - } - ], - stateMutability: 'view', - type: 'function' - }, - { - inputs: [ - { - internalType: 'bytes4', - name: '_signature', - type: 'bytes4' - }, - { - internalType: 'address', - name: '_implementation', - type: 'address' - } - ], - name: 'addHook', - outputs: [], - stateMutability: 'nonpayable', - type: 'function' - }, - { - inputs: [ - { - internalType: 'bytes32[]', - name: '_digests', - type: 'bytes32[]' - } - ], - name: 'addStaticDigests', - outputs: [], - stateMutability: 'nonpayable', - type: 'function' - }, - { - inputs: [ - { - internalType: 'bytes32[]', - name: '_imageHashes', - type: 'bytes32[]' - } - ], - name: 'clearExtraImageHashes', - outputs: [], - stateMutability: 'nonpayable', - type: 'function' - }, - { - inputs: [ - { - internalType: 'bytes', - name: '_code', - type: 'bytes' - } - ], - name: 'createContract', - outputs: [ - { - internalType: 'address', - name: 'addr', - type: 'address' - } - ], - stateMutability: 'payable', - type: 'function' - }, - { - inputs: [ - { - components: [ - { - internalType: 'bool', - name: 'delegateCall', - type: 'bool' - }, - { - internalType: 'bool', - name: 'revertOnError', - type: 'bool' - }, - { - internalType: 'uint256', - name: 'gasLimit', - type: 'uint256' - }, - { - internalType: 'address', - name: 'target', - type: 'address' - }, - { - internalType: 'uint256', - name: 'value', - type: 'uint256' - }, - { - internalType: 'bytes', - name: 'data', - type: 'bytes' - } - ], - internalType: 'struct IModuleCalls.Transaction[]', - name: '_txs', - type: 'tuple[]' - }, - { - internalType: 'uint256', - name: '_nonce', - type: 'uint256' - }, - { - internalType: 'bytes', - name: '_signature', - type: 'bytes' - } - ], - name: 'execute', - outputs: [], - stateMutability: 'nonpayable', - type: 'function' - }, - { - inputs: [ - { - internalType: 'bytes32', - name: '_imageHash', - type: 'bytes32' - } - ], - name: 'extraImageHash', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256' - } - ], - stateMutability: 'view', - type: 'function' - }, - { - inputs: [], - name: 'ipfsRoot', - outputs: [ - { - internalType: 'string', - name: '', - type: 'string' - } - ], - stateMutability: 'view', - type: 'function' - }, - { - inputs: [], - name: 'ipfsRootBytes32', - outputs: [ - { - internalType: 'bytes32', - name: '', - type: 'bytes32' - } - ], - stateMutability: 'view', - type: 'function' - }, - { - inputs: [ - { - internalType: 'bytes32', - name: '_hash', - type: 'bytes32' - }, - { - internalType: 'bytes', - name: '_signatures', - type: 'bytes' - } - ], - name: 'isValidSignature', - outputs: [ - { - internalType: 'bytes4', - name: '', - type: 'bytes4' - } - ], - stateMutability: 'view', - type: 'function' - }, - { - inputs: [ - { - internalType: 'bytes', - name: '_data', - type: 'bytes' - }, - { - internalType: 'bytes', - name: '_signatures', - type: 'bytes' - } - ], - name: 'isValidSignature', - outputs: [ - { - internalType: 'bytes4', - name: '', - type: 'bytes4' - } - ], - stateMutability: 'view', - type: 'function' - }, - { - inputs: [], - name: 'nonce', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256' - } - ], - stateMutability: 'view', - type: 'function' - }, - { - inputs: [ - { - internalType: 'address', - name: '', - type: 'address' - }, - { - internalType: 'address', - name: '', - type: 'address' - }, - { - internalType: 'uint256[]', - name: '', - type: 'uint256[]' - }, - { - internalType: 'uint256[]', - name: '', - type: 'uint256[]' - }, - { - internalType: 'bytes', - name: '', - type: 'bytes' - } - ], - name: 'onERC1155BatchReceived', - outputs: [ - { - internalType: 'bytes4', - name: '', - type: 'bytes4' - } - ], - stateMutability: 'nonpayable', - type: 'function' - }, - { - inputs: [ - { - internalType: 'address', - name: '', - type: 'address' - }, - { - internalType: 'address', - name: '', - type: 'address' - }, - { - internalType: 'uint256', - name: '', - type: 'uint256' - }, - { - internalType: 'uint256', - name: '', - type: 'uint256' - }, - { - internalType: 'bytes', - name: '', - type: 'bytes' - } - ], - name: 'onERC1155Received', - outputs: [ - { - internalType: 'bytes4', - name: '', - type: 'bytes4' - } - ], - stateMutability: 'nonpayable', - type: 'function' - }, - { - inputs: [ - { - internalType: 'address', - name: '', - type: 'address' - }, - { - internalType: 'address', - name: '', - type: 'address' - }, - { - internalType: 'uint256', - name: '', - type: 'uint256' - }, - { - internalType: 'bytes', - name: '', - type: 'bytes' - } - ], - name: 'onERC721Received', - outputs: [ - { - internalType: 'bytes4', - name: '', - type: 'bytes4' - } - ], - stateMutability: 'nonpayable', - type: 'function' - }, - { - inputs: [ - { - internalType: 'bytes4', - name: '_signature', - type: 'bytes4' - } - ], - name: 'readHook', - outputs: [ - { - internalType: 'address', - name: '', - type: 'address' - } - ], - stateMutability: 'view', - type: 'function' - }, - { - inputs: [ - { - internalType: 'uint256', - name: '_space', - type: 'uint256' - } - ], - name: 'readNonce', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256' - } - ], - stateMutability: 'view', - type: 'function' - }, - { - inputs: [ - { - internalType: 'bytes4', - name: '_signature', - type: 'bytes4' - } - ], - name: 'removeHook', - outputs: [], - stateMutability: 'nonpayable', - type: 'function' - }, - { - inputs: [ - { - components: [ - { - internalType: 'bool', - name: 'delegateCall', - type: 'bool' - }, - { - internalType: 'bool', - name: 'revertOnError', - type: 'bool' - }, - { - internalType: 'uint256', - name: 'gasLimit', - type: 'uint256' - }, - { - internalType: 'address', - name: 'target', - type: 'address' - }, - { - internalType: 'uint256', - name: 'value', - type: 'uint256' - }, - { - internalType: 'bytes', - name: 'data', - type: 'bytes' - } - ], - internalType: 'struct IModuleCalls.Transaction[]', - name: '_txs', - type: 'tuple[]' - } - ], - name: 'selfExecute', - outputs: [], - stateMutability: 'nonpayable', - type: 'function' - }, - { - inputs: [ - { - internalType: 'bytes32', - name: '_imageHash', - type: 'bytes32' - }, - { - internalType: 'uint256', - name: '_expiration', - type: 'uint256' - } - ], - name: 'setExtraImageHash', - outputs: [], - stateMutability: 'nonpayable', - type: 'function' - }, - { - inputs: [ - { - internalType: 'bytes32', - name: '_digest', - type: 'bytes32' - }, - { - internalType: 'uint256', - name: '_expiration', - type: 'uint256' - } - ], - name: 'setStaticDigest', - outputs: [], - stateMutability: 'nonpayable', - type: 'function' - }, - { - inputs: [ - { - internalType: 'bytes32', - name: '_digest', - type: 'bytes32' - }, - { - internalType: 'bytes', - name: '_signature', - type: 'bytes' - } - ], - name: 'signatureRecovery', - outputs: [ - { - internalType: 'uint256', - name: 'threshold', - type: 'uint256' - }, - { - internalType: 'uint256', - name: 'weight', - type: 'uint256' - }, - { - internalType: 'bytes32', - name: 'imageHash', - type: 'bytes32' - }, - { - internalType: 'bytes32', - name: 'subDigest', - type: 'bytes32' - }, - { - internalType: 'uint256', - name: 'checkpoint', - type: 'uint256' - } - ], - stateMutability: 'view', - type: 'function' - }, - { - inputs: [ - { - internalType: 'bytes32', - name: '_digest', - type: 'bytes32' - } - ], - name: 'staticDigest', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256' - } - ], - stateMutability: 'view', - type: 'function' - }, - { - inputs: [ - { - internalType: 'bytes4', - name: '_interfaceID', - type: 'bytes4' - } - ], - name: 'supportsInterface', - outputs: [ - { - internalType: 'bool', - name: '', - type: 'bool' - } - ], - stateMutability: 'pure', - type: 'function' - }, - { - inputs: [ - { - internalType: 'bytes32', - name: '_hash', - type: 'bytes32' - } - ], - name: 'updateIPFSRoot', - outputs: [], - stateMutability: 'nonpayable', - type: 'function' - }, - { - inputs: [ - { - internalType: 'bytes32', - name: '_imageHash', - type: 'bytes32' - } - ], - name: 'updateImageHash', - outputs: [], - stateMutability: 'nonpayable', - type: 'function' - }, - { - inputs: [ - { - internalType: 'bytes32', - name: '_imageHash', - type: 'bytes32' - }, - { - internalType: 'bytes32', - name: '_ipfsRoot', - type: 'bytes32' - } - ], - name: 'updateImageHashAndIPFS', - outputs: [], - stateMutability: 'nonpayable', - type: 'function' - }, - { - inputs: [ - { - internalType: 'address', - name: '_implementation', - type: 'address' - } - ], - name: 'updateImplementation', - outputs: [], - stateMutability: 'nonpayable', - type: 'function' - }, - { - stateMutability: 'payable', - type: 'receive' - } - ], - bytecode: - '0x60e06040523480156200001157600080fd5b5060405162003b9e38038062003b9e8339810160408190526200003491620000ba565b8181600060405180606001604052806028815260200162003b76602891396040516200006691903090602001620000f2565b60408051601f198184030181529190528051602090910120608052506001600160a01b0391821660a0521660c05250620001269050565b80516001600160a01b0381168114620000b557600080fd5b919050565b60008060408385031215620000ce57600080fd5b620000d9836200009d565b9150620000e9602084016200009d565b90509250929050565b6000835160005b81811015620001155760208187018101518583015201620000f9565b509190910191825250602001919050565b60805160a05160c051613a0b6200016b6000396000818161060b015261171f01526000818161049b0152612ca30152600081816104390152612cd40152613a0b6000f3fe6080604052600436106101dc5760003560e01c806379e472c911610102578063a4ab5f9f11610095578063c71f1f9611610064578063c71f1f961461073f578063d0748f7114610754578063d59f788514610774578063f23a6e6114610794576101e3565b8063a4ab5f9f146106a2578063affed0e0146106c2578063b93ea7ad146106d7578063bc197c81146106f7576101e3565b80638c3f5563116100d15780638c3f55631461062d5780638efa64411461064d57806390042baf1461066f578063a38cef1914610682576101e3565b806379e472c9146105715780637a9a162814610591578063853c5068146105b1578063888eeec6146105f9576101e3565b8063257671f51161017a5780634598154f116101495780634598154f146104dd5780634fcf3eca146104fd57806357c56d6b1461051d57806361c2926c14610551576101e3565b8063257671f51461042757806329561426146104695780632dd310001461048957806341ea0302146104bd576101e3565b8063150b7a02116101b6578063150b7a021461032c5780631626ba7e146103a25780631a9b2337146103c257806320c13b0b14610407576101e3565b806301ffc9a7146102b7578063025b22bc146102ec578063038dbaac1461030c576101e3565b366101e357005b60006102126000357fffffffff00000000000000000000000000000000000000000000000000000000166107da565b905073ffffffffffffffffffffffffffffffffffffffff8116156102b5576000808273ffffffffffffffffffffffffffffffffffffffff1660003660405161025b929190612e69565b600060405180830381855af49150503d8060008114610296576040519150601f19603f3d011682016040523d82523d6000602084013e61029b565b606091505b5091509150816102ad57805160208201fd5b805160208201f35b005b3480156102c357600080fd5b506102d76102d2366004612ea7565b61082e565b60405190151581526020015b60405180910390f35b3480156102f857600080fd5b506102b5610307366004612eed565b610839565b34801561031857600080fd5b506102b5610327366004612f54565b61088b565b34801561033857600080fd5b50610371610347366004612fd8565b7f150b7a020000000000000000000000000000000000000000000000000000000095945050505050565b6040517fffffffff0000000000000000000000000000000000000000000000000000000090911681526020016102e3565b3480156103ae57600080fd5b506103716103bd366004613047565b610996565b3480156103ce57600080fd5b506103e26103dd366004612ea7565b6109e3565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020016102e3565b34801561041357600080fd5b50610371610422366004613093565b6109ee565b34801561043357600080fd5b5061045b7f000000000000000000000000000000000000000000000000000000000000000081565b6040519081526020016102e3565b34801561047557600080fd5b506102b56104843660046130ff565b610a53565b34801561049557600080fd5b506103e27f000000000000000000000000000000000000000000000000000000000000000081565b3480156104c957600080fd5b5061045b6104d83660046130ff565b610a9d565b3480156104e957600080fd5b506102b56104f8366004613118565b610aa8565b34801561050957600080fd5b506102b5610518366004612ea7565b610b6e565b34801561052957600080fd5b5061045b7f8713a7c4465f6fbee2b6e9d6646d1d9f83fec929edfc4baf661f3c865bdd04d181565b34801561055d57600080fd5b506102b561056c366004612f54565b610c9d565b34801561057d57600080fd5b506102b561058c366004613118565b610d23565b34801561059d57600080fd5b506102b56105ac36600461313a565b610de1565b3480156105bd57600080fd5b506105d16105cc366004613047565b610e77565b604080519586526020860194909452928401919091526060830152608082015260a0016102e3565b34801561060557600080fd5b506103e27f000000000000000000000000000000000000000000000000000000000000000081565b34801561063957600080fd5b5061045b6106483660046130ff565b61103f565b34801561065957600080fd5b5061066261106b565b6040516102e39190613211565b6103e261067d366004613253565b6110ec565b34801561068e57600080fd5b506102b561069d3660046130ff565b611188565b3480156106ae57600080fd5b5061045b6106bd3660046130ff565b6111d2565b3480156106ce57600080fd5b5061045b6111dd565b3480156106e357600080fd5b506102b56106f2366004613322565b6111ee565b34801561070357600080fd5b50610371610712366004613357565b7fbc197c810000000000000000000000000000000000000000000000000000000098975050505050505050565b34801561074b57600080fd5b5061045b611337565b34801561076057600080fd5b506102b561076f366004613118565b611361565b34801561078057600080fd5b506102b561078f366004612f54565b6113b4565b3480156107a057600080fd5b506103716107af366004613412565b7ff23a6e61000000000000000000000000000000000000000000000000000000009695505050505050565b60006108287fbe27a319efc8734e89e26ba4bc95f5c788584163b959f03fa04e2d7ab4b9a1207fffffffff0000000000000000000000000000000000000000000000000000000084166114f7565b92915050565b600061082882611555565b33301461087f576040517fe12588940000000000000000000000000000000000000000000000000000000081523360048201523060248201526044015b60405180910390fd5b610888816115b1565b50565b3330146108cc576040517fe1258894000000000000000000000000000000000000000000000000000000008152336004820152306024820152604401610876565b8060005b818110156109905760008484838181106108ec576108ec61348a565b90506020020135905061094c816000604080517f849e7bdc245db17e50b9f43086f1914d70eb4dab6dd89af4d541d53353ad97de602080830191909152818301859052825180830384018152606090920190925280519101208190555050565b807f804f6171d6008d9e16ee3aa0561fec328397f4ba2827a6605db388cfdefa3b0c600060405161097f91815260200190565b60405180910390a2506001016108d0565b50505050565b6000806109a485858561166c565b50905080156109d657507f1626ba7e0000000000000000000000000000000000000000000000000000000090506109dc565b50600090505b9392505050565b6000610828826107da565b600080610a138686604051610a04929190612e69565b6040518091039020858561166c565b5090508015610a4557507f20c13b0b000000000000000000000000000000000000000000000000000000009050610a4b565b50600090505b949350505050565b333014610a94576040517fe1258894000000000000000000000000000000000000000000000000000000008152336004820152306024820152604401610876565b61088881611687565b600061082882611743565b333014610ae9576040517fe1258894000000000000000000000000000000000000000000000000000000008152336004820152306024820152604401610876565b604080517f849e7bdc245db17e50b9f43086f1914d70eb4dab6dd89af4d541d53353ad97de602080830191909152818301859052825180830384018152606083019384905280519101208390559082905282907f804f6171d6008d9e16ee3aa0561fec328397f4ba2827a6605db388cfdefa3b0c906080015b60405180910390a25050565b333014610baf576040517fe1258894000000000000000000000000000000000000000000000000000000008152336004820152306024820152604401610876565b6000610bba826107da565b73ffffffffffffffffffffffffffffffffffffffff1603610c2b576040517f1c3812cc0000000000000000000000000000000000000000000000000000000081527fffffffff0000000000000000000000000000000000000000000000000000000082166004820152602401610876565b604080517fbe27a319efc8734e89e26ba4bc95f5c788584163b959f03fa04e2d7ab4b9a1206020808301919091527fffffffff00000000000000000000000000000000000000000000000000000000841682840152825180830384018152606090920190925280519101206000905550565b333014610cde576040517fe1258894000000000000000000000000000000000000000000000000000000008152336004820152306024820152604401610876565b6000610d118383604051602001610cf6929190613661565b6040516020818303038152906040528051906020012061176f565b9050610d1e8184846117f4565b505050565b333014610d64576040517fe1258894000000000000000000000000000000000000000000000000000000008152336004820152306024820152604401610876565b604080517f7f25a23abc421d10864063e9a8ae5fd3fbd5116e156f148428b6a3a02ffd9454602080830191909152818301859052825180830384018152606083019384905280519101208390559082905282907f180e56184e3025975e8449fab79ff135cc5c3b3fe517a19bf8f111d69b33d2e290608001610b62565b610dea83611952565b600080610e22858888604051602001610e05939291906136a9565b60405160208183030381529060405280519060200120858561166c565b9150915081610e63578084846040517f8f4a234f000000000000000000000000000000000000000000000000000000008152600401610876939291906136cc565b610e6e8188886117f4565b50505050505050565b60008060008060008087876000818110610e9357610e9361348a565b909101357fff00000000000000000000000000000000000000000000000000000000000000169150819050610ee957610ecb8961176f565b9250610ed8838989611a4f565b929850909650945091506110349050565b7fff0000000000000000000000000000000000000000000000000000000000000081811601610f2857610f1b8961176f565b9250610ed8838989611aa0565b7ffe000000000000000000000000000000000000000000000000000000000000007fff00000000000000000000000000000000000000000000000000000000000000821601610f7a57610f1b89611acc565b7ffd000000000000000000000000000000000000000000000000000000000000007fff00000000000000000000000000000000000000000000000000000000000000821601610fde57610fce898989611b39565b9550955095509550955050611034565b6040517f6085cd820000000000000000000000000000000000000000000000000000000081527fff0000000000000000000000000000000000000000000000000000000000000082166004820152602401610876565b939792965093509350565b60006108287f8d0bf1fd623d628c741362c1289948e57b3e2905218c676d3e69abee36d6ae2e836114f7565b60606110c86110c361107b611337565b6040517f017012200000000000000000000000000000000000000000000000000000000060208201526024810191909152604401604051602081830303815290604052611cb6565b611ecf565b6040516020016110d891906136e6565b604051602081830303815290604052905090565b600033301461112f576040517fe1258894000000000000000000000000000000000000000000000000000000008152336004820152306024820152604401610876565b81516020830134f060405173ffffffffffffffffffffffffffffffffffffffff821681529091507fa506ad4e7f05eceba62a023c3219e5bd98a615f4fa87e2afb08a2da5cf62bf0c9060200160405180910390a1919050565b3330146111c9576040517fe1258894000000000000000000000000000000000000000000000000000000008152336004820152306024820152604401610876565b61088881611ef8565b600061082882611f51565b60006111e9600061103f565b905090565b33301461122f576040517fe1258894000000000000000000000000000000000000000000000000000000008152336004820152306024820152604401610876565b600061123a836107da565b73ffffffffffffffffffffffffffffffffffffffff16146112ab576040517f5b4d6d6a0000000000000000000000000000000000000000000000000000000081527fffffffff0000000000000000000000000000000000000000000000000000000083166004820152602401610876565b604080517fbe27a319efc8734e89e26ba4bc95f5c788584163b959f03fa04e2d7ab4b9a1206020808301919091527fffffffff000000000000000000000000000000000000000000000000000000008516828401528251808303840181526060909201909252805191012073ffffffffffffffffffffffffffffffffffffffff821690555050565b5050565b60006111e97f0eecac93ced8722d209199364cda3bc33da3bc3a23daef6be49ebd780511d0335490565b3330146113a2576040517fe1258894000000000000000000000000000000000000000000000000000000008152336004820152306024820152604401610876565b6113ab82611687565b61133381611ef8565b3330146113f5576040517fe1258894000000000000000000000000000000000000000000000000000000008152336004820152306024820152604401610876565b8060005b818110156109905760008484838181106114155761141561348a565b905060200201359050611494817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff604080517f7f25a23abc421d10864063e9a8ae5fd3fbd5116e156f148428b6a3a02ffd9454602080830191909152818301859052825180830384018152606090920190925280519101208190555050565b807f180e56184e3025975e8449fab79ff135cc5c3b3fe517a19bf8f111d69b33d2e27fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040516114e691815260200190565b60405180910390a2506001016113f9565b6000808383604051602001611516929190918252602082015260400190565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0818403018152919052805160209091012054949350505050565b60007f6ffbd451000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316016115a857506001919050565b61082882611f7d565b73ffffffffffffffffffffffffffffffffffffffff81163b611617576040517f0c76093700000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff82166004820152602401610876565b61161f813055565b60405173ffffffffffffffffffffffffffffffffffffffff821681527f310ba5f1d2ed074b51e2eccd052a47ae9ab7c6b800d1fca3db3999d6a592ca03906020015b60405180910390a150565b60008061167a8585856120be565b915091505b935093915050565b806116be576040517f4294d12700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6116e77fea7157fa25e3aa17d0ae2d5280fa4e24d421c61842aa85e45194e1145aa72bf8829055565b6040518181527f307ed6bd941ee9fc80f369c94af5fa11e25bab5102a6140191756c5474a30bfa9060200160405180910390a16108887f00000000000000000000000000000000000000000000000000000000000000006115b1565b60006108287f7f25a23abc421d10864063e9a8ae5fd3fbd5116e156f148428b6a3a02ffd9454836114f7565b6040517f190100000000000000000000000000000000000000000000000000000000000060208201524660228201527fffffffffffffffffffffffffffffffffffffffff0000000000000000000000003060601b166042820152605681018290526000906076015b604051602081830303815290604052805190602001209050919050565b8060005b8181101561194b57368484838181106118135761181361348a565b9050602002810190611825919061372b565b90506040810135805a101561187a5782815a6040517f2bb3e3ba000000000000000000000000000000000000000000000000000000008152600481019390935260248301919091526044820152606401610876565b60006118896020840184613769565b156118c8576118c16118a16080850160608601612eed565b83156118ad57836118af565b5a5b6118bc60a0870187613784565b6120f2565b9050611903565b6119006118db6080850160608601612eed565b608085013584156118ec57846118ee565b5a5b6118fb60a0880188613784565b61210d565b90505b801561191f5760405188815260200160405180910390a0611940565b6119406119326040850160208601613769565b8961193b61212a565b612149565b5050506001016117f8565b5050505050565b606081901c6bffffffffffffffffffffffff821660006119718361103f565b90508181146119bd576040517f9b6514f4000000000000000000000000000000000000000000000000000000008152600481018490526024810183905260448101829052606401610876565b604080517f8d0bf1fd623d628c741362c1289948e57b3e2905218c676d3e69abee36d6ae2e60208083019190915281830186905282518083038401815260609092019092528051910120600183019081905560408051858152602081018390527f1f180c27086c7a39ea2a7b25239d1ab92348f07ca7bb59d1438fcf527568f881910160405180910390a15050505050565b6000808080611a6a87611a65876006818b6137e9565b612195565b6000908152873560f01c6020818152604080842084526002909a013560e01c908190529890912090999198509695509350505050565b6000808080611abb87611ab6876001818b6137e9565b611a4f565b935093509350935093509350935093565b6040517f190100000000000000000000000000000000000000000000000000000000000060208201526000602282018190527fffffffffffffffffffffffffffffffffffffffff0000000000000000000000003060601b16604283015260568201839052906076016117d7565b6000808080806004600188013560e81c82611b548383613842565b9050611b668b6105cc83868d8f6137e9565b939b5091995097509550935087871015611bbe57611b8681848b8d6137e9565b89896040517fb006aba00000000000000000000000000000000000000000000000000000000081526004016108769493929190613855565b8092505b88831015611ca85760038301928a013560e81c9150611be18383613842565b90506000611c03611bf18861262b565b8c8c879086926105cc939291906137e9565b939c50919a5098509091505088881015611c5b57611c2382858c8e6137e9565b8a8a6040517fb006aba00000000000000000000000000000000000000000000000000000000081526004016108769493929190613855565b848110611c9e576040517f37daf62b0000000000000000000000000000000000000000000000000000000081526004810182905260248101869052604401610876565b9350915081611bc2565b505050939792965093509350565b8051606090600381901b60006005600483010467ffffffffffffffff811115611ce157611ce1613224565b6040519080825280601f01601f191660200182016040528015611d0b576020820181803683370190505b5090506000806000805b86811015611e1f57888181518110611d2f57611d2f61348a565b01602001516008948501949390931b60f89390931c92909217915b60058410611e17576040805180820190915260208082527f6162636465666768696a6b6c6d6e6f707172737475767778797a323334353637818301527ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffb90950194601f85871c16908110611dc057611dc061348a565b602001015160f81c60f81b858381518110611ddd57611ddd61348a565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350600190910190611d4a565b600101611d15565b508215611ec3576040518060400160405280602081526020017f6162636465666768696a6b6c6d6e6f707172737475767778797a3233343536378152508360050383901b601f1681518110611e7657611e7661348a565b602001015160f81c60f81b848281518110611e9357611e9361348a565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053505b50919695505050505050565b606081604051602001611ee2919061387c565b6040516020818303038152906040529050919050565b611f217f0eecac93ced8722d209199364cda3bc33da3bc3a23daef6be49ebd780511d033829055565b6040518181527f20d3ef1b5738a9f6d7beae515432206e7a8e2740ca6dcf46a952190ad01bcb5190602001611661565b60006108287f849e7bdc245db17e50b9f43086f1914d70eb4dab6dd89af4d541d53353ad97de836114f7565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167fec6aba5000000000000000000000000000000000000000000000000000000000148061201057507fffffffff0000000000000000000000000000000000000000000000000000000082167f4e2312e000000000000000000000000000000000000000000000000000000000145b8061205c57507fffffffff0000000000000000000000000000000000000000000000000000000082167f150b7a0200000000000000000000000000000000000000000000000000000000145b806120a857507fffffffff0000000000000000000000000000000000000000000000000000000082167fc0ee0b8a00000000000000000000000000000000000000000000000000000000145b156120b557506001919050565b6108288261265f565b600080426120cb86611743565b11915081156120e757816120de866126bb565b9150915061167f565b61167a8585856126f6565b60006040518284823760008084838989f49695505050505050565b6000604051828482376000808483898b8af1979650505050505050565b60603d604051915060208201818101604052818352816000823e505090565b821561215757805160208201fd5b7f3dbd1590ea96dd3253a91f24e64e3a502e1225d602a5731357bc12643070ccd782826040516121889291906138c1565b60405180910390a1505050565b60008060005b8381101561262257600181019085013560f81c7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff810161223c57601582019186013560f881901c9060581c73ffffffffffffffffffffffffffffffffffffffff81169074ff0000000000000000000000000000000000000000168117856122225780612231565b60008681526020829052604090205b95505050505061219b565b806122d25760018201918681013560f81c9060430160006122688a61226384888c8e6137e9565b612734565b60ff841697909701969194508491905060a083901b74ff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff821617866122b757806122c6565b60008781526020829052604090205b9650505050505061219b565b600281036123fa576000808784013560f881901c9060581c73ffffffffffffffffffffffffffffffffffffffff16601586019550909250905060008885013560e81c600386018162ffffff16915080965081925050506000818601905061234b8b848c8c8a908692612346939291906137e9565b6129f7565b612393578a8361235d83898d8f6137e9565b6040517f9a94623200000000000000000000000000000000000000000000000000000000815260040161087694939291906138da565b60ff8416979097019694508460a084901b74ff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff841617876123de57806123ed565b60008881526020829052604090205b975050505050505061219b565b6003810361242d576020820191860135836124155780612424565b60008481526020829052604090205b9350505061219b565b60048103612479576003808301928781013560e81c919082010160008061245a8b611a6585898d8f6137e9565b6000988952602052604090972096909701965090935061219b92505050565b600681036125815760008287013560f81c60018401935060ff16905060008784013560f01c60028501945061ffff16905060008885013560e81c600386018162ffffff1691508096508192505050600081860190506000806124e78d8d8d8b908792611a65939291906137e9565b939850889390925090508482106124fd57988501985b604080517f53657175656e6365206e657374656420636f6e6669673a0a0000000000000000602080830191909152603882018490526058820188905260788083018a90528351808403909101815260989092019092528051910120896125635780612572565b60008a81526020829052604090205b9950505050505050505061219b565b600581036125ed5760208201918601358781036125bc577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff94505b60006125c782612ba4565b9050846125d457806125e3565b60008581526020829052604090205b945050505061219b565b6040517fb2505f7c00000000000000000000000000000000000000000000000000000000815260048101829052602401610876565b50935093915050565b7f8713a7c4465f6fbee2b6e9d6646d1d9f83fec929edfc4baf661f3c865bdd04d16000908152602082905260408120610828565b60007fe4a77bbc000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316016126b257506001919050565b61082882612bdf565b604080517f7f25a23abc421d10864063e9a8ae5fd3fbd5116e156f148428b6a3a02ffd945460208201529081018290526000906060016117d7565b6000806000806000612709888888610e77565b50965091945092509050828210801590612727575061272781612bea565b9450505050935093915050565b6000604282146127745782826040517f2ee17a3d00000000000000000000000000000000000000000000000000000000815260040161087692919061391a565b600061278d61278460018561392e565b85013560f81c90565b60ff169050604084013560f81c843560208601357f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0811115612801578686826040517fad4aac7600000000000000000000000000000000000000000000000000000000815260040161087693929190613941565b8260ff16601b1415801561281957508260ff16601c14155b15612856578686846040517fe578897e00000000000000000000000000000000000000000000000000000000815260040161087693929190613965565b600184036128c3576040805160008152602081018083528a905260ff851691810191909152606081018390526080810182905260019060a0015b6020604051602081039080840390855afa1580156128b2573d6000803e3d6000fd5b50505060206040510351945061299b565b60028403612960576040517f19457468657265756d205369676e6564204d6573736167653a0a3332000000006020820152603c8101899052600190605c01604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181528282528051602091820120600084529083018083525260ff861690820152606081018490526080810183905260a001612890565b86868560016040517f9dfba852000000000000000000000000000000000000000000000000000000008152600401610876949392919061398c565b73ffffffffffffffffffffffffffffffffffffffff85166129ec5786866040517f6c1719d200000000000000000000000000000000000000000000000000000000815260040161087692919061391a565b505050509392505050565b6000808383612a0760018261392e565b818110612a1657612a1661348a565b919091013560f81c9150506001811480612a305750600281145b15612a75578473ffffffffffffffffffffffffffffffffffffffff16612a57878686612734565b73ffffffffffffffffffffffffffffffffffffffff16149150612b9b565b60038103612b605773ffffffffffffffffffffffffffffffffffffffff8516631626ba7e8786600087612aa960018261392e565b92612ab6939291906137e9565b6040518463ffffffff1660e01b8152600401612ad4939291906136cc565b602060405180830381865afa158015612af1573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612b1591906139b8565b7fffffffff00000000000000000000000000000000000000000000000000000000167f1626ba7e00000000000000000000000000000000000000000000000000000000149150612b9b565b83838260006040517f9dfba852000000000000000000000000000000000000000000000000000000008152600401610876949392919061398c565b50949350505050565b6040517f53657175656e636520737461746963206469676573743a0a00000000000000006020820152603881018290526000906058016117d7565b600061082882612bf5565b600061082882612c51565b60007ffda4dd44000000000000000000000000000000000000000000000000000000007fffffffff00000000000000000000000000000000000000000000000000000000831601612c4857506001919050565b61082882612d7f565b6000612d53826040517fff0000000000000000000000000000000000000000000000000000000000000060208201527fffffffffffffffffffffffffffffffffffffffff0000000000000000000000007f000000000000000000000000000000000000000000000000000000000000000060601b166021820152603581018290527f000000000000000000000000000000000000000000000000000000000000000060558201526000903090607501604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0818403018152919052805160209091012073ffffffffffffffffffffffffffffffffffffffff161492915050565b15612d6057506001919050565b6000612d6b83611f51565b905080158015906109dc5750421092915050565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167fac6a444e000000000000000000000000000000000000000000000000000000001480612e1257507fffffffff0000000000000000000000000000000000000000000000000000000082167f36e7817500000000000000000000000000000000000000000000000000000000145b15612e1f57506001919050565b7f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff00000000000000000000000000000000000000000000000000000000831614610828565b8183823760009101908152919050565b7fffffffff000000000000000000000000000000000000000000000000000000008116811461088857600080fd5b600060208284031215612eb957600080fd5b81356109dc81612e79565b803573ffffffffffffffffffffffffffffffffffffffff81168114612ee857600080fd5b919050565b600060208284031215612eff57600080fd5b6109dc82612ec4565b60008083601f840112612f1a57600080fd5b50813567ffffffffffffffff811115612f3257600080fd5b6020830191508360208260051b8501011115612f4d57600080fd5b9250929050565b60008060208385031215612f6757600080fd5b823567ffffffffffffffff811115612f7e57600080fd5b612f8a85828601612f08565b90969095509350505050565b60008083601f840112612fa857600080fd5b50813567ffffffffffffffff811115612fc057600080fd5b602083019150836020828501011115612f4d57600080fd5b600080600080600060808688031215612ff057600080fd5b612ff986612ec4565b945061300760208701612ec4565b935060408601359250606086013567ffffffffffffffff81111561302a57600080fd5b61303688828901612f96565b969995985093965092949392505050565b60008060006040848603121561305c57600080fd5b83359250602084013567ffffffffffffffff81111561307a57600080fd5b61308686828701612f96565b9497909650939450505050565b600080600080604085870312156130a957600080fd5b843567ffffffffffffffff808211156130c157600080fd5b6130cd88838901612f96565b909650945060208701359150808211156130e657600080fd5b506130f387828801612f96565b95989497509550505050565b60006020828403121561311157600080fd5b5035919050565b6000806040838503121561312b57600080fd5b50508035926020909101359150565b60008060008060006060868803121561315257600080fd5b853567ffffffffffffffff8082111561316a57600080fd5b61317689838a01612f08565b909750955060208801359450604088013591508082111561319657600080fd5b5061303688828901612f96565b60005b838110156131be5781810151838201526020016131a6565b50506000910152565b600081518084526131df8160208601602086016131a3565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b6020815260006109dc60208301846131c7565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b60006020828403121561326557600080fd5b813567ffffffffffffffff8082111561327d57600080fd5b818401915084601f83011261329157600080fd5b8135818111156132a3576132a3613224565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0908116603f011681019083821181831017156132e9576132e9613224565b8160405282815287602084870101111561330257600080fd5b826020860160208301376000928101602001929092525095945050505050565b6000806040838503121561333557600080fd5b823561334081612e79565b915061334e60208401612ec4565b90509250929050565b60008060008060008060008060a0898b03121561337357600080fd5b61337c89612ec4565b975061338a60208a01612ec4565b9650604089013567ffffffffffffffff808211156133a757600080fd5b6133b38c838d01612f08565b909850965060608b01359150808211156133cc57600080fd5b6133d88c838d01612f08565b909650945060808b01359150808211156133f157600080fd5b506133fe8b828c01612f96565b999c989b5096995094979396929594505050565b60008060008060008060a0878903121561342b57600080fd5b61343487612ec4565b955061344260208801612ec4565b94506040870135935060608701359250608087013567ffffffffffffffff81111561346c57600080fd5b61347889828a01612f96565b979a9699509497509295939492505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b80358015158114612ee857600080fd5b8183528181602085013750600060208284010152600060207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f840116840101905092915050565b81835260006020808501808196508560051b810191508460005b8781101561365457828403895281357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff4188360301811261356b57600080fd5b870160c0613578826134b9565b151586526135878783016134b9565b15158688015260408281013590870152606073ffffffffffffffffffffffffffffffffffffffff6135b9828501612ec4565b16908701526080828101359087015260a080830135368490037fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe10181126135ff57600080fd5b90920187810192903567ffffffffffffffff81111561361d57600080fd5b80360384131561362c57600080fd5b828289015261363e83890182866134c9565b9c89019c9750505092860192505060010161352c565b5091979650505050505050565b60408152600560408201527f73656c663a0000000000000000000000000000000000000000000000000000006060820152608060208201526000610a4b608083018486613512565b8381526040602082015260006136c3604083018486613512565b95945050505050565b8381526040602082015260006136c36040830184866134c9565b7f697066733a2f2f0000000000000000000000000000000000000000000000000081526000825161371e8160078501602087016131a3565b9190910160070192915050565b600082357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff4183360301811261375f57600080fd5b9190910192915050565b60006020828403121561377b57600080fd5b6109dc826134b9565b60008083357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe18436030181126137b957600080fd5b83018035915067ffffffffffffffff8211156137d457600080fd5b602001915036819003821315612f4d57600080fd5b600080858511156137f957600080fd5b8386111561380657600080fd5b5050820193919092039150565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b8082018082111561082857610828613813565b6060815260006138696060830186886134c9565b6020830194909452506040015292915050565b7f62000000000000000000000000000000000000000000000000000000000000008152600082516138b48160018501602087016131a3565b9190910160010192915050565b828152604060208201526000610a4b60408301846131c7565b84815273ffffffffffffffffffffffffffffffffffffffff841660208201526060604082015260006139106060830184866134c9565b9695505050505050565b602081526000610a4b6020830184866134c9565b8181038181111561082857610828613813565b6040815260006139556040830185876134c9565b9050826020830152949350505050565b6040815260006139796040830185876134c9565b905060ff83166020830152949350505050565b6060815260006139a06060830186886134c9565b60208301949094525090151560409091015292915050565b6000602082840312156139ca57600080fd5b81516109dc81612e7956fea2646970667358221220e6905b82ca2ea91a0c6cc4a371ce0a85eb88794fb3bc7734ed5414f524c47c4264736f6c63430008110033603a600e3d39601a805130553df3363d3d373d3d3d363d30545af43d82803e903d91601857fd5bf3', - deployedBytecode: - '0x6080604052600436106101dc5760003560e01c806379e472c911610102578063a4ab5f9f11610095578063c71f1f9611610064578063c71f1f961461073f578063d0748f7114610754578063d59f788514610774578063f23a6e6114610794576101e3565b8063a4ab5f9f146106a2578063affed0e0146106c2578063b93ea7ad146106d7578063bc197c81146106f7576101e3565b80638c3f5563116100d15780638c3f55631461062d5780638efa64411461064d57806390042baf1461066f578063a38cef1914610682576101e3565b806379e472c9146105715780637a9a162814610591578063853c5068146105b1578063888eeec6146105f9576101e3565b8063257671f51161017a5780634598154f116101495780634598154f146104dd5780634fcf3eca146104fd57806357c56d6b1461051d57806361c2926c14610551576101e3565b8063257671f51461042757806329561426146104695780632dd310001461048957806341ea0302146104bd576101e3565b8063150b7a02116101b6578063150b7a021461032c5780631626ba7e146103a25780631a9b2337146103c257806320c13b0b14610407576101e3565b806301ffc9a7146102b7578063025b22bc146102ec578063038dbaac1461030c576101e3565b366101e357005b60006102126000357fffffffff00000000000000000000000000000000000000000000000000000000166107da565b905073ffffffffffffffffffffffffffffffffffffffff8116156102b5576000808273ffffffffffffffffffffffffffffffffffffffff1660003660405161025b929190612e69565b600060405180830381855af49150503d8060008114610296576040519150601f19603f3d011682016040523d82523d6000602084013e61029b565b606091505b5091509150816102ad57805160208201fd5b805160208201f35b005b3480156102c357600080fd5b506102d76102d2366004612ea7565b61082e565b60405190151581526020015b60405180910390f35b3480156102f857600080fd5b506102b5610307366004612eed565b610839565b34801561031857600080fd5b506102b5610327366004612f54565b61088b565b34801561033857600080fd5b50610371610347366004612fd8565b7f150b7a020000000000000000000000000000000000000000000000000000000095945050505050565b6040517fffffffff0000000000000000000000000000000000000000000000000000000090911681526020016102e3565b3480156103ae57600080fd5b506103716103bd366004613047565b610996565b3480156103ce57600080fd5b506103e26103dd366004612ea7565b6109e3565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020016102e3565b34801561041357600080fd5b50610371610422366004613093565b6109ee565b34801561043357600080fd5b5061045b7f000000000000000000000000000000000000000000000000000000000000000081565b6040519081526020016102e3565b34801561047557600080fd5b506102b56104843660046130ff565b610a53565b34801561049557600080fd5b506103e27f000000000000000000000000000000000000000000000000000000000000000081565b3480156104c957600080fd5b5061045b6104d83660046130ff565b610a9d565b3480156104e957600080fd5b506102b56104f8366004613118565b610aa8565b34801561050957600080fd5b506102b5610518366004612ea7565b610b6e565b34801561052957600080fd5b5061045b7f8713a7c4465f6fbee2b6e9d6646d1d9f83fec929edfc4baf661f3c865bdd04d181565b34801561055d57600080fd5b506102b561056c366004612f54565b610c9d565b34801561057d57600080fd5b506102b561058c366004613118565b610d23565b34801561059d57600080fd5b506102b56105ac36600461313a565b610de1565b3480156105bd57600080fd5b506105d16105cc366004613047565b610e77565b604080519586526020860194909452928401919091526060830152608082015260a0016102e3565b34801561060557600080fd5b506103e27f000000000000000000000000000000000000000000000000000000000000000081565b34801561063957600080fd5b5061045b6106483660046130ff565b61103f565b34801561065957600080fd5b5061066261106b565b6040516102e39190613211565b6103e261067d366004613253565b6110ec565b34801561068e57600080fd5b506102b561069d3660046130ff565b611188565b3480156106ae57600080fd5b5061045b6106bd3660046130ff565b6111d2565b3480156106ce57600080fd5b5061045b6111dd565b3480156106e357600080fd5b506102b56106f2366004613322565b6111ee565b34801561070357600080fd5b50610371610712366004613357565b7fbc197c810000000000000000000000000000000000000000000000000000000098975050505050505050565b34801561074b57600080fd5b5061045b611337565b34801561076057600080fd5b506102b561076f366004613118565b611361565b34801561078057600080fd5b506102b561078f366004612f54565b6113b4565b3480156107a057600080fd5b506103716107af366004613412565b7ff23a6e61000000000000000000000000000000000000000000000000000000009695505050505050565b60006108287fbe27a319efc8734e89e26ba4bc95f5c788584163b959f03fa04e2d7ab4b9a1207fffffffff0000000000000000000000000000000000000000000000000000000084166114f7565b92915050565b600061082882611555565b33301461087f576040517fe12588940000000000000000000000000000000000000000000000000000000081523360048201523060248201526044015b60405180910390fd5b610888816115b1565b50565b3330146108cc576040517fe1258894000000000000000000000000000000000000000000000000000000008152336004820152306024820152604401610876565b8060005b818110156109905760008484838181106108ec576108ec61348a565b90506020020135905061094c816000604080517f849e7bdc245db17e50b9f43086f1914d70eb4dab6dd89af4d541d53353ad97de602080830191909152818301859052825180830384018152606090920190925280519101208190555050565b807f804f6171d6008d9e16ee3aa0561fec328397f4ba2827a6605db388cfdefa3b0c600060405161097f91815260200190565b60405180910390a2506001016108d0565b50505050565b6000806109a485858561166c565b50905080156109d657507f1626ba7e0000000000000000000000000000000000000000000000000000000090506109dc565b50600090505b9392505050565b6000610828826107da565b600080610a138686604051610a04929190612e69565b6040518091039020858561166c565b5090508015610a4557507f20c13b0b000000000000000000000000000000000000000000000000000000009050610a4b565b50600090505b949350505050565b333014610a94576040517fe1258894000000000000000000000000000000000000000000000000000000008152336004820152306024820152604401610876565b61088881611687565b600061082882611743565b333014610ae9576040517fe1258894000000000000000000000000000000000000000000000000000000008152336004820152306024820152604401610876565b604080517f849e7bdc245db17e50b9f43086f1914d70eb4dab6dd89af4d541d53353ad97de602080830191909152818301859052825180830384018152606083019384905280519101208390559082905282907f804f6171d6008d9e16ee3aa0561fec328397f4ba2827a6605db388cfdefa3b0c906080015b60405180910390a25050565b333014610baf576040517fe1258894000000000000000000000000000000000000000000000000000000008152336004820152306024820152604401610876565b6000610bba826107da565b73ffffffffffffffffffffffffffffffffffffffff1603610c2b576040517f1c3812cc0000000000000000000000000000000000000000000000000000000081527fffffffff0000000000000000000000000000000000000000000000000000000082166004820152602401610876565b604080517fbe27a319efc8734e89e26ba4bc95f5c788584163b959f03fa04e2d7ab4b9a1206020808301919091527fffffffff00000000000000000000000000000000000000000000000000000000841682840152825180830384018152606090920190925280519101206000905550565b333014610cde576040517fe1258894000000000000000000000000000000000000000000000000000000008152336004820152306024820152604401610876565b6000610d118383604051602001610cf6929190613661565b6040516020818303038152906040528051906020012061176f565b9050610d1e8184846117f4565b505050565b333014610d64576040517fe1258894000000000000000000000000000000000000000000000000000000008152336004820152306024820152604401610876565b604080517f7f25a23abc421d10864063e9a8ae5fd3fbd5116e156f148428b6a3a02ffd9454602080830191909152818301859052825180830384018152606083019384905280519101208390559082905282907f180e56184e3025975e8449fab79ff135cc5c3b3fe517a19bf8f111d69b33d2e290608001610b62565b610dea83611952565b600080610e22858888604051602001610e05939291906136a9565b60405160208183030381529060405280519060200120858561166c565b9150915081610e63578084846040517f8f4a234f000000000000000000000000000000000000000000000000000000008152600401610876939291906136cc565b610e6e8188886117f4565b50505050505050565b60008060008060008087876000818110610e9357610e9361348a565b909101357fff00000000000000000000000000000000000000000000000000000000000000169150819050610ee957610ecb8961176f565b9250610ed8838989611a4f565b929850909650945091506110349050565b7fff0000000000000000000000000000000000000000000000000000000000000081811601610f2857610f1b8961176f565b9250610ed8838989611aa0565b7ffe000000000000000000000000000000000000000000000000000000000000007fff00000000000000000000000000000000000000000000000000000000000000821601610f7a57610f1b89611acc565b7ffd000000000000000000000000000000000000000000000000000000000000007fff00000000000000000000000000000000000000000000000000000000000000821601610fde57610fce898989611b39565b9550955095509550955050611034565b6040517f6085cd820000000000000000000000000000000000000000000000000000000081527fff0000000000000000000000000000000000000000000000000000000000000082166004820152602401610876565b939792965093509350565b60006108287f8d0bf1fd623d628c741362c1289948e57b3e2905218c676d3e69abee36d6ae2e836114f7565b60606110c86110c361107b611337565b6040517f017012200000000000000000000000000000000000000000000000000000000060208201526024810191909152604401604051602081830303815290604052611cb6565b611ecf565b6040516020016110d891906136e6565b604051602081830303815290604052905090565b600033301461112f576040517fe1258894000000000000000000000000000000000000000000000000000000008152336004820152306024820152604401610876565b81516020830134f060405173ffffffffffffffffffffffffffffffffffffffff821681529091507fa506ad4e7f05eceba62a023c3219e5bd98a615f4fa87e2afb08a2da5cf62bf0c9060200160405180910390a1919050565b3330146111c9576040517fe1258894000000000000000000000000000000000000000000000000000000008152336004820152306024820152604401610876565b61088881611ef8565b600061082882611f51565b60006111e9600061103f565b905090565b33301461122f576040517fe1258894000000000000000000000000000000000000000000000000000000008152336004820152306024820152604401610876565b600061123a836107da565b73ffffffffffffffffffffffffffffffffffffffff16146112ab576040517f5b4d6d6a0000000000000000000000000000000000000000000000000000000081527fffffffff0000000000000000000000000000000000000000000000000000000083166004820152602401610876565b604080517fbe27a319efc8734e89e26ba4bc95f5c788584163b959f03fa04e2d7ab4b9a1206020808301919091527fffffffff000000000000000000000000000000000000000000000000000000008516828401528251808303840181526060909201909252805191012073ffffffffffffffffffffffffffffffffffffffff821690555050565b5050565b60006111e97f0eecac93ced8722d209199364cda3bc33da3bc3a23daef6be49ebd780511d0335490565b3330146113a2576040517fe1258894000000000000000000000000000000000000000000000000000000008152336004820152306024820152604401610876565b6113ab82611687565b61133381611ef8565b3330146113f5576040517fe1258894000000000000000000000000000000000000000000000000000000008152336004820152306024820152604401610876565b8060005b818110156109905760008484838181106114155761141561348a565b905060200201359050611494817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff604080517f7f25a23abc421d10864063e9a8ae5fd3fbd5116e156f148428b6a3a02ffd9454602080830191909152818301859052825180830384018152606090920190925280519101208190555050565b807f180e56184e3025975e8449fab79ff135cc5c3b3fe517a19bf8f111d69b33d2e27fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040516114e691815260200190565b60405180910390a2506001016113f9565b6000808383604051602001611516929190918252602082015260400190565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0818403018152919052805160209091012054949350505050565b60007f6ffbd451000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316016115a857506001919050565b61082882611f7d565b73ffffffffffffffffffffffffffffffffffffffff81163b611617576040517f0c76093700000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff82166004820152602401610876565b61161f813055565b60405173ffffffffffffffffffffffffffffffffffffffff821681527f310ba5f1d2ed074b51e2eccd052a47ae9ab7c6b800d1fca3db3999d6a592ca03906020015b60405180910390a150565b60008061167a8585856120be565b915091505b935093915050565b806116be576040517f4294d12700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6116e77fea7157fa25e3aa17d0ae2d5280fa4e24d421c61842aa85e45194e1145aa72bf8829055565b6040518181527f307ed6bd941ee9fc80f369c94af5fa11e25bab5102a6140191756c5474a30bfa9060200160405180910390a16108887f00000000000000000000000000000000000000000000000000000000000000006115b1565b60006108287f7f25a23abc421d10864063e9a8ae5fd3fbd5116e156f148428b6a3a02ffd9454836114f7565b6040517f190100000000000000000000000000000000000000000000000000000000000060208201524660228201527fffffffffffffffffffffffffffffffffffffffff0000000000000000000000003060601b166042820152605681018290526000906076015b604051602081830303815290604052805190602001209050919050565b8060005b8181101561194b57368484838181106118135761181361348a565b9050602002810190611825919061372b565b90506040810135805a101561187a5782815a6040517f2bb3e3ba000000000000000000000000000000000000000000000000000000008152600481019390935260248301919091526044820152606401610876565b60006118896020840184613769565b156118c8576118c16118a16080850160608601612eed565b83156118ad57836118af565b5a5b6118bc60a0870187613784565b6120f2565b9050611903565b6119006118db6080850160608601612eed565b608085013584156118ec57846118ee565b5a5b6118fb60a0880188613784565b61210d565b90505b801561191f5760405188815260200160405180910390a0611940565b6119406119326040850160208601613769565b8961193b61212a565b612149565b5050506001016117f8565b5050505050565b606081901c6bffffffffffffffffffffffff821660006119718361103f565b90508181146119bd576040517f9b6514f4000000000000000000000000000000000000000000000000000000008152600481018490526024810183905260448101829052606401610876565b604080517f8d0bf1fd623d628c741362c1289948e57b3e2905218c676d3e69abee36d6ae2e60208083019190915281830186905282518083038401815260609092019092528051910120600183019081905560408051858152602081018390527f1f180c27086c7a39ea2a7b25239d1ab92348f07ca7bb59d1438fcf527568f881910160405180910390a15050505050565b6000808080611a6a87611a65876006818b6137e9565b612195565b6000908152873560f01c6020818152604080842084526002909a013560e01c908190529890912090999198509695509350505050565b6000808080611abb87611ab6876001818b6137e9565b611a4f565b935093509350935093509350935093565b6040517f190100000000000000000000000000000000000000000000000000000000000060208201526000602282018190527fffffffffffffffffffffffffffffffffffffffff0000000000000000000000003060601b16604283015260568201839052906076016117d7565b6000808080806004600188013560e81c82611b548383613842565b9050611b668b6105cc83868d8f6137e9565b939b5091995097509550935087871015611bbe57611b8681848b8d6137e9565b89896040517fb006aba00000000000000000000000000000000000000000000000000000000081526004016108769493929190613855565b8092505b88831015611ca85760038301928a013560e81c9150611be18383613842565b90506000611c03611bf18861262b565b8c8c879086926105cc939291906137e9565b939c50919a5098509091505088881015611c5b57611c2382858c8e6137e9565b8a8a6040517fb006aba00000000000000000000000000000000000000000000000000000000081526004016108769493929190613855565b848110611c9e576040517f37daf62b0000000000000000000000000000000000000000000000000000000081526004810182905260248101869052604401610876565b9350915081611bc2565b505050939792965093509350565b8051606090600381901b60006005600483010467ffffffffffffffff811115611ce157611ce1613224565b6040519080825280601f01601f191660200182016040528015611d0b576020820181803683370190505b5090506000806000805b86811015611e1f57888181518110611d2f57611d2f61348a565b01602001516008948501949390931b60f89390931c92909217915b60058410611e17576040805180820190915260208082527f6162636465666768696a6b6c6d6e6f707172737475767778797a323334353637818301527ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffb90950194601f85871c16908110611dc057611dc061348a565b602001015160f81c60f81b858381518110611ddd57611ddd61348a565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350600190910190611d4a565b600101611d15565b508215611ec3576040518060400160405280602081526020017f6162636465666768696a6b6c6d6e6f707172737475767778797a3233343536378152508360050383901b601f1681518110611e7657611e7661348a565b602001015160f81c60f81b848281518110611e9357611e9361348a565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053505b50919695505050505050565b606081604051602001611ee2919061387c565b6040516020818303038152906040529050919050565b611f217f0eecac93ced8722d209199364cda3bc33da3bc3a23daef6be49ebd780511d033829055565b6040518181527f20d3ef1b5738a9f6d7beae515432206e7a8e2740ca6dcf46a952190ad01bcb5190602001611661565b60006108287f849e7bdc245db17e50b9f43086f1914d70eb4dab6dd89af4d541d53353ad97de836114f7565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167fec6aba5000000000000000000000000000000000000000000000000000000000148061201057507fffffffff0000000000000000000000000000000000000000000000000000000082167f4e2312e000000000000000000000000000000000000000000000000000000000145b8061205c57507fffffffff0000000000000000000000000000000000000000000000000000000082167f150b7a0200000000000000000000000000000000000000000000000000000000145b806120a857507fffffffff0000000000000000000000000000000000000000000000000000000082167fc0ee0b8a00000000000000000000000000000000000000000000000000000000145b156120b557506001919050565b6108288261265f565b600080426120cb86611743565b11915081156120e757816120de866126bb565b9150915061167f565b61167a8585856126f6565b60006040518284823760008084838989f49695505050505050565b6000604051828482376000808483898b8af1979650505050505050565b60603d604051915060208201818101604052818352816000823e505090565b821561215757805160208201fd5b7f3dbd1590ea96dd3253a91f24e64e3a502e1225d602a5731357bc12643070ccd782826040516121889291906138c1565b60405180910390a1505050565b60008060005b8381101561262257600181019085013560f81c7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff810161223c57601582019186013560f881901c9060581c73ffffffffffffffffffffffffffffffffffffffff81169074ff0000000000000000000000000000000000000000168117856122225780612231565b60008681526020829052604090205b95505050505061219b565b806122d25760018201918681013560f81c9060430160006122688a61226384888c8e6137e9565b612734565b60ff841697909701969194508491905060a083901b74ff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff821617866122b757806122c6565b60008781526020829052604090205b9650505050505061219b565b600281036123fa576000808784013560f881901c9060581c73ffffffffffffffffffffffffffffffffffffffff16601586019550909250905060008885013560e81c600386018162ffffff16915080965081925050506000818601905061234b8b848c8c8a908692612346939291906137e9565b6129f7565b612393578a8361235d83898d8f6137e9565b6040517f9a94623200000000000000000000000000000000000000000000000000000000815260040161087694939291906138da565b60ff8416979097019694508460a084901b74ff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff841617876123de57806123ed565b60008881526020829052604090205b975050505050505061219b565b6003810361242d576020820191860135836124155780612424565b60008481526020829052604090205b9350505061219b565b60048103612479576003808301928781013560e81c919082010160008061245a8b611a6585898d8f6137e9565b6000988952602052604090972096909701965090935061219b92505050565b600681036125815760008287013560f81c60018401935060ff16905060008784013560f01c60028501945061ffff16905060008885013560e81c600386018162ffffff1691508096508192505050600081860190506000806124e78d8d8d8b908792611a65939291906137e9565b939850889390925090508482106124fd57988501985b604080517f53657175656e6365206e657374656420636f6e6669673a0a0000000000000000602080830191909152603882018490526058820188905260788083018a90528351808403909101815260989092019092528051910120896125635780612572565b60008a81526020829052604090205b9950505050505050505061219b565b600581036125ed5760208201918601358781036125bc577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff94505b60006125c782612ba4565b9050846125d457806125e3565b60008581526020829052604090205b945050505061219b565b6040517fb2505f7c00000000000000000000000000000000000000000000000000000000815260048101829052602401610876565b50935093915050565b7f8713a7c4465f6fbee2b6e9d6646d1d9f83fec929edfc4baf661f3c865bdd04d16000908152602082905260408120610828565b60007fe4a77bbc000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316016126b257506001919050565b61082882612bdf565b604080517f7f25a23abc421d10864063e9a8ae5fd3fbd5116e156f148428b6a3a02ffd945460208201529081018290526000906060016117d7565b6000806000806000612709888888610e77565b50965091945092509050828210801590612727575061272781612bea565b9450505050935093915050565b6000604282146127745782826040517f2ee17a3d00000000000000000000000000000000000000000000000000000000815260040161087692919061391a565b600061278d61278460018561392e565b85013560f81c90565b60ff169050604084013560f81c843560208601357f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0811115612801578686826040517fad4aac7600000000000000000000000000000000000000000000000000000000815260040161087693929190613941565b8260ff16601b1415801561281957508260ff16601c14155b15612856578686846040517fe578897e00000000000000000000000000000000000000000000000000000000815260040161087693929190613965565b600184036128c3576040805160008152602081018083528a905260ff851691810191909152606081018390526080810182905260019060a0015b6020604051602081039080840390855afa1580156128b2573d6000803e3d6000fd5b50505060206040510351945061299b565b60028403612960576040517f19457468657265756d205369676e6564204d6573736167653a0a3332000000006020820152603c8101899052600190605c01604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181528282528051602091820120600084529083018083525260ff861690820152606081018490526080810183905260a001612890565b86868560016040517f9dfba852000000000000000000000000000000000000000000000000000000008152600401610876949392919061398c565b73ffffffffffffffffffffffffffffffffffffffff85166129ec5786866040517f6c1719d200000000000000000000000000000000000000000000000000000000815260040161087692919061391a565b505050509392505050565b6000808383612a0760018261392e565b818110612a1657612a1661348a565b919091013560f81c9150506001811480612a305750600281145b15612a75578473ffffffffffffffffffffffffffffffffffffffff16612a57878686612734565b73ffffffffffffffffffffffffffffffffffffffff16149150612b9b565b60038103612b605773ffffffffffffffffffffffffffffffffffffffff8516631626ba7e8786600087612aa960018261392e565b92612ab6939291906137e9565b6040518463ffffffff1660e01b8152600401612ad4939291906136cc565b602060405180830381865afa158015612af1573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612b1591906139b8565b7fffffffff00000000000000000000000000000000000000000000000000000000167f1626ba7e00000000000000000000000000000000000000000000000000000000149150612b9b565b83838260006040517f9dfba852000000000000000000000000000000000000000000000000000000008152600401610876949392919061398c565b50949350505050565b6040517f53657175656e636520737461746963206469676573743a0a00000000000000006020820152603881018290526000906058016117d7565b600061082882612bf5565b600061082882612c51565b60007ffda4dd44000000000000000000000000000000000000000000000000000000007fffffffff00000000000000000000000000000000000000000000000000000000831601612c4857506001919050565b61082882612d7f565b6000612d53826040517fff0000000000000000000000000000000000000000000000000000000000000060208201527fffffffffffffffffffffffffffffffffffffffff0000000000000000000000007f000000000000000000000000000000000000000000000000000000000000000060601b166021820152603581018290527f000000000000000000000000000000000000000000000000000000000000000060558201526000903090607501604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0818403018152919052805160209091012073ffffffffffffffffffffffffffffffffffffffff161492915050565b15612d6057506001919050565b6000612d6b83611f51565b905080158015906109dc5750421092915050565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167fac6a444e000000000000000000000000000000000000000000000000000000001480612e1257507fffffffff0000000000000000000000000000000000000000000000000000000082167f36e7817500000000000000000000000000000000000000000000000000000000145b15612e1f57506001919050565b7f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff00000000000000000000000000000000000000000000000000000000831614610828565b8183823760009101908152919050565b7fffffffff000000000000000000000000000000000000000000000000000000008116811461088857600080fd5b600060208284031215612eb957600080fd5b81356109dc81612e79565b803573ffffffffffffffffffffffffffffffffffffffff81168114612ee857600080fd5b919050565b600060208284031215612eff57600080fd5b6109dc82612ec4565b60008083601f840112612f1a57600080fd5b50813567ffffffffffffffff811115612f3257600080fd5b6020830191508360208260051b8501011115612f4d57600080fd5b9250929050565b60008060208385031215612f6757600080fd5b823567ffffffffffffffff811115612f7e57600080fd5b612f8a85828601612f08565b90969095509350505050565b60008083601f840112612fa857600080fd5b50813567ffffffffffffffff811115612fc057600080fd5b602083019150836020828501011115612f4d57600080fd5b600080600080600060808688031215612ff057600080fd5b612ff986612ec4565b945061300760208701612ec4565b935060408601359250606086013567ffffffffffffffff81111561302a57600080fd5b61303688828901612f96565b969995985093965092949392505050565b60008060006040848603121561305c57600080fd5b83359250602084013567ffffffffffffffff81111561307a57600080fd5b61308686828701612f96565b9497909650939450505050565b600080600080604085870312156130a957600080fd5b843567ffffffffffffffff808211156130c157600080fd5b6130cd88838901612f96565b909650945060208701359150808211156130e657600080fd5b506130f387828801612f96565b95989497509550505050565b60006020828403121561311157600080fd5b5035919050565b6000806040838503121561312b57600080fd5b50508035926020909101359150565b60008060008060006060868803121561315257600080fd5b853567ffffffffffffffff8082111561316a57600080fd5b61317689838a01612f08565b909750955060208801359450604088013591508082111561319657600080fd5b5061303688828901612f96565b60005b838110156131be5781810151838201526020016131a6565b50506000910152565b600081518084526131df8160208601602086016131a3565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b6020815260006109dc60208301846131c7565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b60006020828403121561326557600080fd5b813567ffffffffffffffff8082111561327d57600080fd5b818401915084601f83011261329157600080fd5b8135818111156132a3576132a3613224565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0908116603f011681019083821181831017156132e9576132e9613224565b8160405282815287602084870101111561330257600080fd5b826020860160208301376000928101602001929092525095945050505050565b6000806040838503121561333557600080fd5b823561334081612e79565b915061334e60208401612ec4565b90509250929050565b60008060008060008060008060a0898b03121561337357600080fd5b61337c89612ec4565b975061338a60208a01612ec4565b9650604089013567ffffffffffffffff808211156133a757600080fd5b6133b38c838d01612f08565b909850965060608b01359150808211156133cc57600080fd5b6133d88c838d01612f08565b909650945060808b01359150808211156133f157600080fd5b506133fe8b828c01612f96565b999c989b5096995094979396929594505050565b60008060008060008060a0878903121561342b57600080fd5b61343487612ec4565b955061344260208801612ec4565b94506040870135935060608701359250608087013567ffffffffffffffff81111561346c57600080fd5b61347889828a01612f96565b979a9699509497509295939492505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b80358015158114612ee857600080fd5b8183528181602085013750600060208284010152600060207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f840116840101905092915050565b81835260006020808501808196508560051b810191508460005b8781101561365457828403895281357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff4188360301811261356b57600080fd5b870160c0613578826134b9565b151586526135878783016134b9565b15158688015260408281013590870152606073ffffffffffffffffffffffffffffffffffffffff6135b9828501612ec4565b16908701526080828101359087015260a080830135368490037fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe10181126135ff57600080fd5b90920187810192903567ffffffffffffffff81111561361d57600080fd5b80360384131561362c57600080fd5b828289015261363e83890182866134c9565b9c89019c9750505092860192505060010161352c565b5091979650505050505050565b60408152600560408201527f73656c663a0000000000000000000000000000000000000000000000000000006060820152608060208201526000610a4b608083018486613512565b8381526040602082015260006136c3604083018486613512565b95945050505050565b8381526040602082015260006136c36040830184866134c9565b7f697066733a2f2f0000000000000000000000000000000000000000000000000081526000825161371e8160078501602087016131a3565b9190910160070192915050565b600082357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff4183360301811261375f57600080fd5b9190910192915050565b60006020828403121561377b57600080fd5b6109dc826134b9565b60008083357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe18436030181126137b957600080fd5b83018035915067ffffffffffffffff8211156137d457600080fd5b602001915036819003821315612f4d57600080fd5b600080858511156137f957600080fd5b8386111561380657600080fd5b5050820193919092039150565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b8082018082111561082857610828613813565b6060815260006138696060830186886134c9565b6020830194909452506040015292915050565b7f62000000000000000000000000000000000000000000000000000000000000008152600082516138b48160018501602087016131a3565b9190910160010192915050565b828152604060208201526000610a4b60408301846131c7565b84815273ffffffffffffffffffffffffffffffffffffffff841660208201526060604082015260006139106060830184866134c9565b9695505050505050565b602081526000610a4b6020830184866134c9565b8181038181111561082857610828613813565b6040815260006139556040830185876134c9565b9050826020830152949350505050565b6040815260006139796040830185876134c9565b905060ff83166020830152949350505050565b6060815260006139a06060830186886134c9565b60208301949094525090151560409091015292915050565b6000602082840312156139ca57600080fd5b81516109dc81612e7956fea2646970667358221220e6905b82ca2ea91a0c6cc4a371ce0a85eb88794fb3bc7734ed5414f524c47c4264736f6c63430008110033', - linkReferences: {}, - deployedLinkReferences: {} -} diff --git a/old/packages/tests/src/builds/v2/artifacts/MainModuleUpgradable.ts b/old/packages/tests/src/builds/v2/artifacts/MainModuleUpgradable.ts deleted file mode 100644 index 6edae5d5e..000000000 --- a/old/packages/tests/src/builds/v2/artifacts/MainModuleUpgradable.ts +++ /dev/null @@ -1,1062 +0,0 @@ -export const mainModuleUpgradable = { - _format: 'hh-sol-artifact-1', - contractName: 'MainModuleUpgradable', - sourceName: 'contracts/modules/MainModuleUpgradable.sol', - abi: [ - { - inputs: [ - { - internalType: 'uint256', - name: '_space', - type: 'uint256' - }, - { - internalType: 'uint256', - name: '_provided', - type: 'uint256' - }, - { - internalType: 'uint256', - name: '_current', - type: 'uint256' - } - ], - name: 'BadNonce', - type: 'error' - }, - { - inputs: [ - { - internalType: 'bytes4', - name: '_signature', - type: 'bytes4' - } - ], - name: 'HookAlreadyExists', - type: 'error' - }, - { - inputs: [ - { - internalType: 'bytes4', - name: '_signature', - type: 'bytes4' - } - ], - name: 'HookDoesNotExist', - type: 'error' - }, - { - inputs: [], - name: 'ImageHashIsZero', - type: 'error' - }, - { - inputs: [ - { - internalType: 'address', - name: '_implementation', - type: 'address' - } - ], - name: 'InvalidImplementation', - type: 'error' - }, - { - inputs: [ - { - internalType: 'bytes32', - name: '_hash', - type: 'bytes32' - }, - { - internalType: 'address', - name: '_addr', - type: 'address' - }, - { - internalType: 'bytes', - name: '_signature', - type: 'bytes' - } - ], - name: 'InvalidNestedSignature', - type: 'error' - }, - { - inputs: [ - { - internalType: 'bytes', - name: '_signature', - type: 'bytes' - }, - { - internalType: 'bytes32', - name: '_s', - type: 'bytes32' - } - ], - name: 'InvalidSValue', - type: 'error' - }, - { - inputs: [ - { - internalType: 'bytes32', - name: '_hash', - type: 'bytes32' - }, - { - internalType: 'bytes', - name: '_signature', - type: 'bytes' - } - ], - name: 'InvalidSignature', - type: 'error' - }, - { - inputs: [ - { - internalType: 'uint256', - name: '_flag', - type: 'uint256' - } - ], - name: 'InvalidSignatureFlag', - type: 'error' - }, - { - inputs: [ - { - internalType: 'bytes', - name: '_signature', - type: 'bytes' - } - ], - name: 'InvalidSignatureLength', - type: 'error' - }, - { - inputs: [ - { - internalType: 'bytes1', - name: '_type', - type: 'bytes1' - } - ], - name: 'InvalidSignatureType', - type: 'error' - }, - { - inputs: [ - { - internalType: 'bytes', - name: '_signature', - type: 'bytes' - }, - { - internalType: 'uint256', - name: '_v', - type: 'uint256' - } - ], - name: 'InvalidVValue', - type: 'error' - }, - { - inputs: [ - { - internalType: 'bytes', - name: '_signature', - type: 'bytes' - }, - { - internalType: 'uint256', - name: 'threshold', - type: 'uint256' - }, - { - internalType: 'uint256', - name: '_weight', - type: 'uint256' - } - ], - name: 'LowWeightChainedSignature', - type: 'error' - }, - { - inputs: [ - { - internalType: 'uint256', - name: '_index', - type: 'uint256' - }, - { - internalType: 'uint256', - name: '_requested', - type: 'uint256' - }, - { - internalType: 'uint256', - name: '_available', - type: 'uint256' - } - ], - name: 'NotEnoughGas', - type: 'error' - }, - { - inputs: [ - { - internalType: 'address', - name: '_sender', - type: 'address' - }, - { - internalType: 'address', - name: '_self', - type: 'address' - } - ], - name: 'OnlySelfAuth', - type: 'error' - }, - { - inputs: [ - { - internalType: 'bytes', - name: '_signature', - type: 'bytes' - } - ], - name: 'SignerIsAddress0', - type: 'error' - }, - { - inputs: [ - { - internalType: 'bytes', - name: '_signature', - type: 'bytes' - }, - { - internalType: 'uint256', - name: '_type', - type: 'uint256' - }, - { - internalType: 'bool', - name: '_recoverMode', - type: 'bool' - } - ], - name: 'UnsupportedSignatureType', - type: 'error' - }, - { - inputs: [ - { - internalType: 'uint256', - name: '_current', - type: 'uint256' - }, - { - internalType: 'uint256', - name: '_prev', - type: 'uint256' - } - ], - name: 'WrongChainedCheckpointOrder', - type: 'error' - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: 'address', - name: '_contract', - type: 'address' - } - ], - name: 'CreatedContract', - type: 'event' - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: 'bytes32', - name: '_hash', - type: 'bytes32' - } - ], - name: 'IPFSRootUpdated', - type: 'event' - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: 'bytes32', - name: 'newImageHash', - type: 'bytes32' - } - ], - name: 'ImageHashUpdated', - type: 'event' - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: 'address', - name: 'newImplementation', - type: 'address' - } - ], - name: 'ImplementationUpdated', - type: 'event' - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: 'uint256', - name: '_space', - type: 'uint256' - }, - { - indexed: false, - internalType: 'uint256', - name: '_newNonce', - type: 'uint256' - } - ], - name: 'NonceChange', - type: 'event' - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'bytes32', - name: '_imageHash', - type: 'bytes32' - }, - { - indexed: false, - internalType: 'uint256', - name: '_expiration', - type: 'uint256' - } - ], - name: 'SetExtraImageHash', - type: 'event' - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'bytes32', - name: '_digest', - type: 'bytes32' - }, - { - indexed: false, - internalType: 'uint256', - name: '_expiration', - type: 'uint256' - } - ], - name: 'SetStaticDigest', - type: 'event' - }, - { - anonymous: true, - inputs: [ - { - indexed: false, - internalType: 'bytes32', - name: '_tx', - type: 'bytes32' - } - ], - name: 'TxExecuted', - type: 'event' - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: 'bytes32', - name: '_tx', - type: 'bytes32' - }, - { - indexed: false, - internalType: 'bytes', - name: '_reason', - type: 'bytes' - } - ], - name: 'TxFailed', - type: 'event' - }, - { - stateMutability: 'payable', - type: 'fallback' - }, - { - inputs: [], - name: 'SET_IMAGE_HASH_TYPE_HASH', - outputs: [ - { - internalType: 'bytes32', - name: '', - type: 'bytes32' - } - ], - stateMutability: 'view', - type: 'function' - }, - { - inputs: [ - { - internalType: 'bytes4', - name: '_signature', - type: 'bytes4' - }, - { - internalType: 'address', - name: '_implementation', - type: 'address' - } - ], - name: 'addHook', - outputs: [], - stateMutability: 'nonpayable', - type: 'function' - }, - { - inputs: [ - { - internalType: 'bytes32[]', - name: '_digests', - type: 'bytes32[]' - } - ], - name: 'addStaticDigests', - outputs: [], - stateMutability: 'nonpayable', - type: 'function' - }, - { - inputs: [ - { - internalType: 'bytes32[]', - name: '_imageHashes', - type: 'bytes32[]' - } - ], - name: 'clearExtraImageHashes', - outputs: [], - stateMutability: 'nonpayable', - type: 'function' - }, - { - inputs: [ - { - internalType: 'bytes', - name: '_code', - type: 'bytes' - } - ], - name: 'createContract', - outputs: [ - { - internalType: 'address', - name: 'addr', - type: 'address' - } - ], - stateMutability: 'payable', - type: 'function' - }, - { - inputs: [ - { - components: [ - { - internalType: 'bool', - name: 'delegateCall', - type: 'bool' - }, - { - internalType: 'bool', - name: 'revertOnError', - type: 'bool' - }, - { - internalType: 'uint256', - name: 'gasLimit', - type: 'uint256' - }, - { - internalType: 'address', - name: 'target', - type: 'address' - }, - { - internalType: 'uint256', - name: 'value', - type: 'uint256' - }, - { - internalType: 'bytes', - name: 'data', - type: 'bytes' - } - ], - internalType: 'struct IModuleCalls.Transaction[]', - name: '_txs', - type: 'tuple[]' - }, - { - internalType: 'uint256', - name: '_nonce', - type: 'uint256' - }, - { - internalType: 'bytes', - name: '_signature', - type: 'bytes' - } - ], - name: 'execute', - outputs: [], - stateMutability: 'nonpayable', - type: 'function' - }, - { - inputs: [ - { - internalType: 'bytes32', - name: '_imageHash', - type: 'bytes32' - } - ], - name: 'extraImageHash', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256' - } - ], - stateMutability: 'view', - type: 'function' - }, - { - inputs: [], - name: 'imageHash', - outputs: [ - { - internalType: 'bytes32', - name: '', - type: 'bytes32' - } - ], - stateMutability: 'view', - type: 'function' - }, - { - inputs: [], - name: 'ipfsRoot', - outputs: [ - { - internalType: 'string', - name: '', - type: 'string' - } - ], - stateMutability: 'view', - type: 'function' - }, - { - inputs: [], - name: 'ipfsRootBytes32', - outputs: [ - { - internalType: 'bytes32', - name: '', - type: 'bytes32' - } - ], - stateMutability: 'view', - type: 'function' - }, - { - inputs: [ - { - internalType: 'bytes32', - name: '_hash', - type: 'bytes32' - }, - { - internalType: 'bytes', - name: '_signatures', - type: 'bytes' - } - ], - name: 'isValidSignature', - outputs: [ - { - internalType: 'bytes4', - name: '', - type: 'bytes4' - } - ], - stateMutability: 'view', - type: 'function' - }, - { - inputs: [ - { - internalType: 'bytes', - name: '_data', - type: 'bytes' - }, - { - internalType: 'bytes', - name: '_signatures', - type: 'bytes' - } - ], - name: 'isValidSignature', - outputs: [ - { - internalType: 'bytes4', - name: '', - type: 'bytes4' - } - ], - stateMutability: 'view', - type: 'function' - }, - { - inputs: [], - name: 'nonce', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256' - } - ], - stateMutability: 'view', - type: 'function' - }, - { - inputs: [ - { - internalType: 'address', - name: '', - type: 'address' - }, - { - internalType: 'address', - name: '', - type: 'address' - }, - { - internalType: 'uint256[]', - name: '', - type: 'uint256[]' - }, - { - internalType: 'uint256[]', - name: '', - type: 'uint256[]' - }, - { - internalType: 'bytes', - name: '', - type: 'bytes' - } - ], - name: 'onERC1155BatchReceived', - outputs: [ - { - internalType: 'bytes4', - name: '', - type: 'bytes4' - } - ], - stateMutability: 'nonpayable', - type: 'function' - }, - { - inputs: [ - { - internalType: 'address', - name: '', - type: 'address' - }, - { - internalType: 'address', - name: '', - type: 'address' - }, - { - internalType: 'uint256', - name: '', - type: 'uint256' - }, - { - internalType: 'uint256', - name: '', - type: 'uint256' - }, - { - internalType: 'bytes', - name: '', - type: 'bytes' - } - ], - name: 'onERC1155Received', - outputs: [ - { - internalType: 'bytes4', - name: '', - type: 'bytes4' - } - ], - stateMutability: 'nonpayable', - type: 'function' - }, - { - inputs: [ - { - internalType: 'address', - name: '', - type: 'address' - }, - { - internalType: 'address', - name: '', - type: 'address' - }, - { - internalType: 'uint256', - name: '', - type: 'uint256' - }, - { - internalType: 'bytes', - name: '', - type: 'bytes' - } - ], - name: 'onERC721Received', - outputs: [ - { - internalType: 'bytes4', - name: '', - type: 'bytes4' - } - ], - stateMutability: 'nonpayable', - type: 'function' - }, - { - inputs: [ - { - internalType: 'bytes4', - name: '_signature', - type: 'bytes4' - } - ], - name: 'readHook', - outputs: [ - { - internalType: 'address', - name: '', - type: 'address' - } - ], - stateMutability: 'view', - type: 'function' - }, - { - inputs: [ - { - internalType: 'uint256', - name: '_space', - type: 'uint256' - } - ], - name: 'readNonce', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256' - } - ], - stateMutability: 'view', - type: 'function' - }, - { - inputs: [ - { - internalType: 'bytes4', - name: '_signature', - type: 'bytes4' - } - ], - name: 'removeHook', - outputs: [], - stateMutability: 'nonpayable', - type: 'function' - }, - { - inputs: [ - { - components: [ - { - internalType: 'bool', - name: 'delegateCall', - type: 'bool' - }, - { - internalType: 'bool', - name: 'revertOnError', - type: 'bool' - }, - { - internalType: 'uint256', - name: 'gasLimit', - type: 'uint256' - }, - { - internalType: 'address', - name: 'target', - type: 'address' - }, - { - internalType: 'uint256', - name: 'value', - type: 'uint256' - }, - { - internalType: 'bytes', - name: 'data', - type: 'bytes' - } - ], - internalType: 'struct IModuleCalls.Transaction[]', - name: '_txs', - type: 'tuple[]' - } - ], - name: 'selfExecute', - outputs: [], - stateMutability: 'nonpayable', - type: 'function' - }, - { - inputs: [ - { - internalType: 'bytes32', - name: '_imageHash', - type: 'bytes32' - }, - { - internalType: 'uint256', - name: '_expiration', - type: 'uint256' - } - ], - name: 'setExtraImageHash', - outputs: [], - stateMutability: 'nonpayable', - type: 'function' - }, - { - inputs: [ - { - internalType: 'bytes32', - name: '_digest', - type: 'bytes32' - }, - { - internalType: 'uint256', - name: '_expiration', - type: 'uint256' - } - ], - name: 'setStaticDigest', - outputs: [], - stateMutability: 'nonpayable', - type: 'function' - }, - { - inputs: [ - { - internalType: 'bytes32', - name: '_digest', - type: 'bytes32' - }, - { - internalType: 'bytes', - name: '_signature', - type: 'bytes' - } - ], - name: 'signatureRecovery', - outputs: [ - { - internalType: 'uint256', - name: 'threshold', - type: 'uint256' - }, - { - internalType: 'uint256', - name: 'weight', - type: 'uint256' - }, - { - internalType: 'bytes32', - name: 'imageHash', - type: 'bytes32' - }, - { - internalType: 'bytes32', - name: 'subDigest', - type: 'bytes32' - }, - { - internalType: 'uint256', - name: 'checkpoint', - type: 'uint256' - } - ], - stateMutability: 'view', - type: 'function' - }, - { - inputs: [ - { - internalType: 'bytes32', - name: '_digest', - type: 'bytes32' - } - ], - name: 'staticDigest', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256' - } - ], - stateMutability: 'view', - type: 'function' - }, - { - inputs: [ - { - internalType: 'bytes4', - name: '_interfaceID', - type: 'bytes4' - } - ], - name: 'supportsInterface', - outputs: [ - { - internalType: 'bool', - name: '', - type: 'bool' - } - ], - stateMutability: 'pure', - type: 'function' - }, - { - inputs: [ - { - internalType: 'bytes32', - name: '_hash', - type: 'bytes32' - } - ], - name: 'updateIPFSRoot', - outputs: [], - stateMutability: 'nonpayable', - type: 'function' - }, - { - inputs: [ - { - internalType: 'bytes32', - name: '_imageHash', - type: 'bytes32' - } - ], - name: 'updateImageHash', - outputs: [], - stateMutability: 'nonpayable', - type: 'function' - }, - { - inputs: [ - { - internalType: 'bytes32', - name: '_imageHash', - type: 'bytes32' - }, - { - internalType: 'bytes32', - name: '_ipfsRoot', - type: 'bytes32' - } - ], - name: 'updateImageHashAndIPFS', - outputs: [], - stateMutability: 'nonpayable', - type: 'function' - }, - { - inputs: [ - { - internalType: 'address', - name: '_implementation', - type: 'address' - } - ], - name: 'updateImplementation', - outputs: [], - stateMutability: 'nonpayable', - type: 'function' - }, - { - stateMutability: 'payable', - type: 'receive' - } - ], - bytecode: - '0x608060405234801561001057600080fd5b506138f9806100206000396000f3fe6080604052600436106101c65760003560e01c806379e472c9116100f7578063a4ab5f9f11610095578063c71f1f9611610064578063c71f1f96146106a2578063d0748f71146106b7578063d59f7885146106d7578063f23a6e61146106f7576101cd565b8063a4ab5f9f14610605578063affed0e014610625578063b93ea7ad1461063a578063bc197c811461065a576101cd565b80638c3f5563116100d15780638c3f5563146105905780638efa6441146105b057806390042baf146105d2578063a38cef19146105e5576101cd565b806379e472c9146105085780637a9a162814610528578063853c506814610548576101cd565b806329561426116101645780634fcf3eca1161013e5780634fcf3eca1461047f57806351605d801461049f57806357c56d6b146104b457806361c2926c146104e8576101cd565b8063295614261461041157806341ea0302146104315780634598154f1461045f576101cd565b8063150b7a02116101a0578063150b7a02146103165780631626ba7e1461038c5780631a9b2337146103ac57806320c13b0b146103f1576101cd565b806301ffc9a7146102a1578063025b22bc146102d6578063038dbaac146102f6576101cd565b366101cd57005b60006101fc6000357fffffffff000000000000000000000000000000000000000000000000000000001661073d565b905073ffffffffffffffffffffffffffffffffffffffff81161561029f576000808273ffffffffffffffffffffffffffffffffffffffff16600036604051610245929190612d57565b600060405180830381855af49150503d8060008114610280576040519150601f19603f3d011682016040523d82523d6000602084013e610285565b606091505b50915091508161029757805160208201fd5b805160208201f35b005b3480156102ad57600080fd5b506102c16102bc366004612d95565b610791565b60405190151581526020015b60405180910390f35b3480156102e257600080fd5b5061029f6102f1366004612ddb565b61079c565b34801561030257600080fd5b5061029f610311366004612e42565b6107ee565b34801561032257600080fd5b5061035b610331366004612ec6565b7f150b7a020000000000000000000000000000000000000000000000000000000095945050505050565b6040517fffffffff0000000000000000000000000000000000000000000000000000000090911681526020016102cd565b34801561039857600080fd5b5061035b6103a7366004612f35565b6108f9565b3480156103b857600080fd5b506103cc6103c7366004612d95565b610946565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020016102cd565b3480156103fd57600080fd5b5061035b61040c366004612f81565b610951565b34801561041d57600080fd5b5061029f61042c366004612fed565b6109b6565b34801561043d57600080fd5b5061045161044c366004612fed565b610a00565b6040519081526020016102cd565b34801561046b57600080fd5b5061029f61047a366004613006565b610a0b565b34801561048b57600080fd5b5061029f61049a366004612d95565b610ad1565b3480156104ab57600080fd5b50610451610c00565b3480156104c057600080fd5b506104517f8713a7c4465f6fbee2b6e9d6646d1d9f83fec929edfc4baf661f3c865bdd04d181565b3480156104f457600080fd5b5061029f610503366004612e42565b610c2f565b34801561051457600080fd5b5061029f610523366004613006565b610cb5565b34801561053457600080fd5b5061029f610543366004613028565b610d73565b34801561055457600080fd5b50610568610563366004612f35565b610e09565b604080519586526020860194909452928401919091526060830152608082015260a0016102cd565b34801561059c57600080fd5b506104516105ab366004612fed565b610fd1565b3480156105bc57600080fd5b506105c5610ffd565b6040516102cd91906130ff565b6103cc6105e0366004613141565b61107e565b3480156105f157600080fd5b5061029f610600366004612fed565b61111a565b34801561061157600080fd5b50610451610620366004612fed565b611164565b34801561063157600080fd5b5061045161116f565b34801561064657600080fd5b5061029f610655366004613210565b61117b565b34801561066657600080fd5b5061035b610675366004613245565b7fbc197c810000000000000000000000000000000000000000000000000000000098975050505050505050565b3480156106ae57600080fd5b506104516112c4565b3480156106c357600080fd5b5061029f6106d2366004613006565b6112ee565b3480156106e357600080fd5b5061029f6106f2366004612e42565b611341565b34801561070357600080fd5b5061035b610712366004613300565b7ff23a6e61000000000000000000000000000000000000000000000000000000009695505050505050565b600061078b7fbe27a319efc8734e89e26ba4bc95f5c788584163b959f03fa04e2d7ab4b9a1207fffffffff000000000000000000000000000000000000000000000000000000008416611484565b92915050565b600061078b826114e2565b3330146107e2576040517fe12588940000000000000000000000000000000000000000000000000000000081523360048201523060248201526044015b60405180910390fd5b6107eb8161153e565b50565b33301461082f576040517fe12588940000000000000000000000000000000000000000000000000000000081523360048201523060248201526044016107d9565b8060005b818110156108f357600084848381811061084f5761084f613378565b9050602002013590506108af816000604080517f849e7bdc245db17e50b9f43086f1914d70eb4dab6dd89af4d541d53353ad97de602080830191909152818301859052825180830384018152606090920190925280519101208190555050565b807f804f6171d6008d9e16ee3aa0561fec328397f4ba2827a6605db388cfdefa3b0c60006040516108e291815260200190565b60405180910390a250600101610833565b50505050565b6000806109078585856115f9565b509050801561093957507f1626ba7e00000000000000000000000000000000000000000000000000000000905061093f565b50600090505b9392505050565b600061078b8261073d565b6000806109768686604051610967929190612d57565b604051809103902085856115f9565b50905080156109a857507f20c13b0b0000000000000000000000000000000000000000000000000000000090506109ae565b50600090505b949350505050565b3330146109f7576040517fe12588940000000000000000000000000000000000000000000000000000000081523360048201523060248201526044016107d9565b6107eb81611614565b600061078b826116a4565b333014610a4c576040517fe12588940000000000000000000000000000000000000000000000000000000081523360048201523060248201526044016107d9565b604080517f849e7bdc245db17e50b9f43086f1914d70eb4dab6dd89af4d541d53353ad97de602080830191909152818301859052825180830384018152606083019384905280519101208390559082905282907f804f6171d6008d9e16ee3aa0561fec328397f4ba2827a6605db388cfdefa3b0c906080015b60405180910390a25050565b333014610b12576040517fe12588940000000000000000000000000000000000000000000000000000000081523360048201523060248201526044016107d9565b6000610b1d8261073d565b73ffffffffffffffffffffffffffffffffffffffff1603610b8e576040517f1c3812cc0000000000000000000000000000000000000000000000000000000081527fffffffff00000000000000000000000000000000000000000000000000000000821660048201526024016107d9565b604080517fbe27a319efc8734e89e26ba4bc95f5c788584163b959f03fa04e2d7ab4b9a1206020808301919091527fffffffff00000000000000000000000000000000000000000000000000000000841682840152825180830384018152606090920190925280519101206000905550565b6000610c2a7fea7157fa25e3aa17d0ae2d5280fa4e24d421c61842aa85e45194e1145aa72bf85490565b905090565b333014610c70576040517fe12588940000000000000000000000000000000000000000000000000000000081523360048201523060248201526044016107d9565b6000610ca38383604051602001610c8892919061354f565b604051602081830303815290604052805190602001206116d0565b9050610cb0818484611755565b505050565b333014610cf6576040517fe12588940000000000000000000000000000000000000000000000000000000081523360048201523060248201526044016107d9565b604080517f7f25a23abc421d10864063e9a8ae5fd3fbd5116e156f148428b6a3a02ffd9454602080830191909152818301859052825180830384018152606083019384905280519101208390559082905282907f180e56184e3025975e8449fab79ff135cc5c3b3fe517a19bf8f111d69b33d2e290608001610ac5565b610d7c836118b3565b600080610db4858888604051602001610d9793929190613597565b6040516020818303038152906040528051906020012085856115f9565b9150915081610df5578084846040517f8f4a234f0000000000000000000000000000000000000000000000000000000081526004016107d9939291906135ba565b610e00818888611755565b50505050505050565b60008060008060008087876000818110610e2557610e25613378565b909101357fff00000000000000000000000000000000000000000000000000000000000000169150819050610e7b57610e5d896116d0565b9250610e6a8389896119b0565b92985090965094509150610fc69050565b7fff0000000000000000000000000000000000000000000000000000000000000081811601610eba57610ead896116d0565b9250610e6a838989611a01565b7ffe000000000000000000000000000000000000000000000000000000000000007fff00000000000000000000000000000000000000000000000000000000000000821601610f0c57610ead89611a2d565b7ffd000000000000000000000000000000000000000000000000000000000000007fff00000000000000000000000000000000000000000000000000000000000000821601610f7057610f60898989611a9a565b9550955095509550955050610fc6565b6040517f6085cd820000000000000000000000000000000000000000000000000000000081527fff00000000000000000000000000000000000000000000000000000000000000821660048201526024016107d9565b939792965093509350565b600061078b7f8d0bf1fd623d628c741362c1289948e57b3e2905218c676d3e69abee36d6ae2e83611484565b606061105a61105561100d6112c4565b6040517f017012200000000000000000000000000000000000000000000000000000000060208201526024810191909152604401604051602081830303815290604052611c17565b611e30565b60405160200161106a91906135d4565b604051602081830303815290604052905090565b60003330146110c1576040517fe12588940000000000000000000000000000000000000000000000000000000081523360048201523060248201526044016107d9565b81516020830134f060405173ffffffffffffffffffffffffffffffffffffffff821681529091507fa506ad4e7f05eceba62a023c3219e5bd98a615f4fa87e2afb08a2da5cf62bf0c9060200160405180910390a1919050565b33301461115b576040517fe12588940000000000000000000000000000000000000000000000000000000081523360048201523060248201526044016107d9565b6107eb81611e59565b600061078b82611eb2565b6000610c2a6000610fd1565b3330146111bc576040517fe12588940000000000000000000000000000000000000000000000000000000081523360048201523060248201526044016107d9565b60006111c78361073d565b73ffffffffffffffffffffffffffffffffffffffff1614611238576040517f5b4d6d6a0000000000000000000000000000000000000000000000000000000081527fffffffff00000000000000000000000000000000000000000000000000000000831660048201526024016107d9565b604080517fbe27a319efc8734e89e26ba4bc95f5c788584163b959f03fa04e2d7ab4b9a1206020808301919091527fffffffff000000000000000000000000000000000000000000000000000000008516828401528251808303840181526060909201909252805191012073ffffffffffffffffffffffffffffffffffffffff821690555050565b5050565b6000610c2a7f0eecac93ced8722d209199364cda3bc33da3bc3a23daef6be49ebd780511d0335490565b33301461132f576040517fe12588940000000000000000000000000000000000000000000000000000000081523360048201523060248201526044016107d9565b61133882611614565b6112c081611e59565b333014611382576040517fe12588940000000000000000000000000000000000000000000000000000000081523360048201523060248201526044016107d9565b8060005b818110156108f35760008484838181106113a2576113a2613378565b905060200201359050611421817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff604080517f7f25a23abc421d10864063e9a8ae5fd3fbd5116e156f148428b6a3a02ffd9454602080830191909152818301859052825180830384018152606090920190925280519101208190555050565b807f180e56184e3025975e8449fab79ff135cc5c3b3fe517a19bf8f111d69b33d2e27fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff60405161147391815260200190565b60405180910390a250600101611386565b60008083836040516020016114a3929190918252602082015260400190565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0818403018152919052805160209091012054949350505050565b60007f6ffbd451000000000000000000000000000000000000000000000000000000007fffffffff0000000000000000000000000000000000000000000000000000000083160161153557506001919050565b61078b82611ede565b73ffffffffffffffffffffffffffffffffffffffff81163b6115a4576040517f0c76093700000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff821660048201526024016107d9565b6115ac813055565b60405173ffffffffffffffffffffffffffffffffffffffff821681527f310ba5f1d2ed074b51e2eccd052a47ae9ab7c6b800d1fca3db3999d6a592ca03906020015b60405180910390a150565b60008061160785858561201f565b915091505b935093915050565b8061164b576040517f4294d12700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6116747fea7157fa25e3aa17d0ae2d5280fa4e24d421c61842aa85e45194e1145aa72bf8829055565b6040518181527f307ed6bd941ee9fc80f369c94af5fa11e25bab5102a6140191756c5474a30bfa906020016115ee565b600061078b7f7f25a23abc421d10864063e9a8ae5fd3fbd5116e156f148428b6a3a02ffd945483611484565b6040517f190100000000000000000000000000000000000000000000000000000000000060208201524660228201527fffffffffffffffffffffffffffffffffffffffff0000000000000000000000003060601b166042820152605681018290526000906076015b604051602081830303815290604052805190602001209050919050565b8060005b818110156118ac573684848381811061177457611774613378565b90506020028101906117869190613619565b90506040810135805a10156117db5782815a6040517f2bb3e3ba0000000000000000000000000000000000000000000000000000000081526004810193909352602483019190915260448201526064016107d9565b60006117ea6020840184613657565b15611829576118226118026080850160608601612ddb565b831561180e5783611810565b5a5b61181d60a0870187613672565b612053565b9050611864565b61186161183c6080850160608601612ddb565b6080850135841561184d578461184f565b5a5b61185c60a0880188613672565b61206e565b90505b80156118805760405188815260200160405180910390a06118a1565b6118a16118936040850160208601613657565b8961189c61208b565b6120aa565b505050600101611759565b5050505050565b606081901c6bffffffffffffffffffffffff821660006118d283610fd1565b905081811461191e576040517f9b6514f40000000000000000000000000000000000000000000000000000000081526004810184905260248101839052604481018290526064016107d9565b604080517f8d0bf1fd623d628c741362c1289948e57b3e2905218c676d3e69abee36d6ae2e60208083019190915281830186905282518083038401815260609092019092528051910120600183019081905560408051858152602081018390527f1f180c27086c7a39ea2a7b25239d1ab92348f07ca7bb59d1438fcf527568f881910160405180910390a15050505050565b60008080806119cb876119c6876006818b6136d7565b6120f6565b6000908152873560f01c6020818152604080842084526002909a013560e01c908190529890912090999198509695509350505050565b6000808080611a1c87611a17876001818b6136d7565b6119b0565b935093509350935093509350935093565b6040517f190100000000000000000000000000000000000000000000000000000000000060208201526000602282018190527fffffffffffffffffffffffffffffffffffffffff0000000000000000000000003060601b1660428301526056820183905290607601611738565b6000808080806004600188013560e81c82611ab58383613730565b9050611ac78b61056383868d8f6136d7565b939b5091995097509550935087871015611b1f57611ae781848b8d6136d7565b89896040517fb006aba00000000000000000000000000000000000000000000000000000000081526004016107d99493929190613743565b8092505b88831015611c095760038301928a013560e81c9150611b428383613730565b90506000611b64611b528861258c565b8c8c87908692610563939291906136d7565b939c50919a5098509091505088881015611bbc57611b8482858c8e6136d7565b8a8a6040517fb006aba00000000000000000000000000000000000000000000000000000000081526004016107d99493929190613743565b848110611bff576040517f37daf62b00000000000000000000000000000000000000000000000000000000815260048101829052602481018690526044016107d9565b9350915081611b23565b505050939792965093509350565b8051606090600381901b60006005600483010467ffffffffffffffff811115611c4257611c42613112565b6040519080825280601f01601f191660200182016040528015611c6c576020820181803683370190505b5090506000806000805b86811015611d8057888181518110611c9057611c90613378565b01602001516008948501949390931b60f89390931c92909217915b60058410611d78576040805180820190915260208082527f6162636465666768696a6b6c6d6e6f707172737475767778797a323334353637818301527ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffb90950194601f85871c16908110611d2157611d21613378565b602001015160f81c60f81b858381518110611d3e57611d3e613378565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350600190910190611cab565b600101611c76565b508215611e24576040518060400160405280602081526020017f6162636465666768696a6b6c6d6e6f707172737475767778797a3233343536378152508360050383901b601f1681518110611dd757611dd7613378565b602001015160f81c60f81b848281518110611df457611df4613378565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053505b50919695505050505050565b606081604051602001611e43919061376a565b6040516020818303038152906040529050919050565b611e827f0eecac93ced8722d209199364cda3bc33da3bc3a23daef6be49ebd780511d033829055565b6040518181527f20d3ef1b5738a9f6d7beae515432206e7a8e2740ca6dcf46a952190ad01bcb51906020016115ee565b600061078b7f849e7bdc245db17e50b9f43086f1914d70eb4dab6dd89af4d541d53353ad97de83611484565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167fec6aba50000000000000000000000000000000000000000000000000000000001480611f7157507fffffffff0000000000000000000000000000000000000000000000000000000082167f4e2312e000000000000000000000000000000000000000000000000000000000145b80611fbd57507fffffffff0000000000000000000000000000000000000000000000000000000082167f150b7a0200000000000000000000000000000000000000000000000000000000145b8061200957507fffffffff0000000000000000000000000000000000000000000000000000000082167fc0ee0b8a00000000000000000000000000000000000000000000000000000000145b1561201657506001919050565b61078b826125c0565b6000804261202c866116a4565b1191508115612048578161203f8661261c565b9150915061160c565b611607858585612657565b60006040518284823760008084838989f49695505050505050565b6000604051828482376000808483898b8af1979650505050505050565b60603d604051915060208201818101604052818352816000823e505090565b82156120b857805160208201fd5b7f3dbd1590ea96dd3253a91f24e64e3a502e1225d602a5731357bc12643070ccd782826040516120e99291906137af565b60405180910390a1505050565b60008060005b8381101561258357600181019085013560f81c7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff810161219d57601582019186013560f881901c9060581c73ffffffffffffffffffffffffffffffffffffffff81169074ff0000000000000000000000000000000000000000168117856121835780612192565b60008681526020829052604090205b9550505050506120fc565b806122335760018201918681013560f81c9060430160006121c98a6121c484888c8e6136d7565b612695565b60ff841697909701969194508491905060a083901b74ff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff821617866122185780612227565b60008781526020829052604090205b965050505050506120fc565b6002810361235b576000808784013560f881901c9060581c73ffffffffffffffffffffffffffffffffffffffff16601586019550909250905060008885013560e81c600386018162ffffff1691508096508192505050600081860190506122ac8b848c8c8a9086926122a7939291906136d7565b612958565b6122f4578a836122be83898d8f6136d7565b6040517f9a9462320000000000000000000000000000000000000000000000000000000081526004016107d994939291906137c8565b60ff8416979097019694508460a084901b74ff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff8416178761233f578061234e565b60008881526020829052604090205b97505050505050506120fc565b6003810361238e576020820191860135836123765780612385565b60008481526020829052604090205b935050506120fc565b600481036123da576003808301928781013560e81c91908201016000806123bb8b6119c685898d8f6136d7565b600098895260205260409097209690970196509093506120fc92505050565b600681036124e25760008287013560f81c60018401935060ff16905060008784013560f01c60028501945061ffff16905060008885013560e81c600386018162ffffff1691508096508192505050600081860190506000806124488d8d8d8b9087926119c6939291906136d7565b9398508893909250905084821061245e57988501985b604080517f53657175656e6365206e657374656420636f6e6669673a0a0000000000000000602080830191909152603882018490526058820188905260788083018a90528351808403909101815260989092019092528051910120896124c457806124d3565b60008a81526020829052604090205b995050505050505050506120fc565b6005810361254e57602082019186013587810361251d577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff94505b600061252882612b05565b9050846125355780612544565b60008581526020829052604090205b94505050506120fc565b6040517fb2505f7c000000000000000000000000000000000000000000000000000000008152600481018290526024016107d9565b50935093915050565b7f8713a7c4465f6fbee2b6e9d6646d1d9f83fec929edfc4baf661f3c865bdd04d1600090815260208290526040812061078b565b60007ffda4dd44000000000000000000000000000000000000000000000000000000007fffffffff0000000000000000000000000000000000000000000000000000000083160161261357506001919050565b61078b82612b40565b604080517f7f25a23abc421d10864063e9a8ae5fd3fbd5116e156f148428b6a3a02ffd94546020820152908101829052600090606001611738565b600080600080600061266a888888610e09565b50965091945092509050828210801590612688575061268881612b9c565b9450505050935093915050565b6000604282146126d55782826040517f2ee17a3d0000000000000000000000000000000000000000000000000000000081526004016107d9929190613808565b60006126ee6126e560018561381c565b85013560f81c90565b60ff169050604084013560f81c843560208601357f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0811115612762578686826040517fad4aac760000000000000000000000000000000000000000000000000000000081526004016107d99392919061382f565b8260ff16601b1415801561277a57508260ff16601c14155b156127b7578686846040517fe578897e0000000000000000000000000000000000000000000000000000000081526004016107d993929190613853565b60018403612824576040805160008152602081018083528a905260ff851691810191909152606081018390526080810182905260019060a0015b6020604051602081039080840390855afa158015612813573d6000803e3d6000fd5b5050506020604051035194506128fc565b600284036128c1576040517f19457468657265756d205369676e6564204d6573736167653a0a3332000000006020820152603c8101899052600190605c01604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181528282528051602091820120600084529083018083525260ff861690820152606081018490526080810183905260a0016127f1565b86868560016040517f9dfba8520000000000000000000000000000000000000000000000000000000081526004016107d9949392919061387a565b73ffffffffffffffffffffffffffffffffffffffff851661294d5786866040517f6c1719d20000000000000000000000000000000000000000000000000000000081526004016107d9929190613808565b505050509392505050565b600080838361296860018261381c565b81811061297757612977613378565b919091013560f81c91505060018114806129915750600281145b156129d6578473ffffffffffffffffffffffffffffffffffffffff166129b8878686612695565b73ffffffffffffffffffffffffffffffffffffffff16149150612afc565b60038103612ac15773ffffffffffffffffffffffffffffffffffffffff8516631626ba7e8786600087612a0a60018261381c565b92612a17939291906136d7565b6040518463ffffffff1660e01b8152600401612a35939291906135ba565b602060405180830381865afa158015612a52573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612a7691906138a6565b7fffffffff00000000000000000000000000000000000000000000000000000000167f1626ba7e00000000000000000000000000000000000000000000000000000000149150612afc565b83838260006040517f9dfba8520000000000000000000000000000000000000000000000000000000081526004016107d9949392919061387a565b50949350505050565b6040517f53657175656e636520737461746963206469676573743a0a0000000000000000602082015260388101829052600090605801611738565b60007fe4a77bbc000000000000000000000000000000000000000000000000000000007fffffffff00000000000000000000000000000000000000000000000000000000831601612b9357506001919050565b61078b82612ba7565b600061078b82612c03565b60007fae9fa280000000000000000000000000000000000000000000000000000000007fffffffff00000000000000000000000000000000000000000000000000000000831601612bfa57506001919050565b61078b82612c3a565b6000612c0e82612d24565b15612c1b57506001919050565b6000612c2683611eb2565b9050801580159061093f5750421092915050565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167fac6a444e000000000000000000000000000000000000000000000000000000001480612ccd57507fffffffff0000000000000000000000000000000000000000000000000000000082167f36e7817500000000000000000000000000000000000000000000000000000000145b15612cda57506001919050565b7f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff0000000000000000000000000000000000000000000000000000000083161461078b565b6000811580159061078b5750507fea7157fa25e3aa17d0ae2d5280fa4e24d421c61842aa85e45194e1145aa72bf8541490565b8183823760009101908152919050565b7fffffffff00000000000000000000000000000000000000000000000000000000811681146107eb57600080fd5b600060208284031215612da757600080fd5b813561093f81612d67565b803573ffffffffffffffffffffffffffffffffffffffff81168114612dd657600080fd5b919050565b600060208284031215612ded57600080fd5b61093f82612db2565b60008083601f840112612e0857600080fd5b50813567ffffffffffffffff811115612e2057600080fd5b6020830191508360208260051b8501011115612e3b57600080fd5b9250929050565b60008060208385031215612e5557600080fd5b823567ffffffffffffffff811115612e6c57600080fd5b612e7885828601612df6565b90969095509350505050565b60008083601f840112612e9657600080fd5b50813567ffffffffffffffff811115612eae57600080fd5b602083019150836020828501011115612e3b57600080fd5b600080600080600060808688031215612ede57600080fd5b612ee786612db2565b9450612ef560208701612db2565b935060408601359250606086013567ffffffffffffffff811115612f1857600080fd5b612f2488828901612e84565b969995985093965092949392505050565b600080600060408486031215612f4a57600080fd5b83359250602084013567ffffffffffffffff811115612f6857600080fd5b612f7486828701612e84565b9497909650939450505050565b60008060008060408587031215612f9757600080fd5b843567ffffffffffffffff80821115612faf57600080fd5b612fbb88838901612e84565b90965094506020870135915080821115612fd457600080fd5b50612fe187828801612e84565b95989497509550505050565b600060208284031215612fff57600080fd5b5035919050565b6000806040838503121561301957600080fd5b50508035926020909101359150565b60008060008060006060868803121561304057600080fd5b853567ffffffffffffffff8082111561305857600080fd5b61306489838a01612df6565b909750955060208801359450604088013591508082111561308457600080fd5b50612f2488828901612e84565b60005b838110156130ac578181015183820152602001613094565b50506000910152565b600081518084526130cd816020860160208601613091565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b60208152600061093f60208301846130b5565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b60006020828403121561315357600080fd5b813567ffffffffffffffff8082111561316b57600080fd5b818401915084601f83011261317f57600080fd5b81358181111561319157613191613112565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0908116603f011681019083821181831017156131d7576131d7613112565b816040528281528760208487010111156131f057600080fd5b826020860160208301376000928101602001929092525095945050505050565b6000806040838503121561322357600080fd5b823561322e81612d67565b915061323c60208401612db2565b90509250929050565b60008060008060008060008060a0898b03121561326157600080fd5b61326a89612db2565b975061327860208a01612db2565b9650604089013567ffffffffffffffff8082111561329557600080fd5b6132a18c838d01612df6565b909850965060608b01359150808211156132ba57600080fd5b6132c68c838d01612df6565b909650945060808b01359150808211156132df57600080fd5b506132ec8b828c01612e84565b999c989b5096995094979396929594505050565b60008060008060008060a0878903121561331957600080fd5b61332287612db2565b955061333060208801612db2565b94506040870135935060608701359250608087013567ffffffffffffffff81111561335a57600080fd5b61336689828a01612e84565b979a9699509497509295939492505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b80358015158114612dd657600080fd5b8183528181602085013750600060208284010152600060207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f840116840101905092915050565b81835260006020808501808196508560051b810191508460005b8781101561354257828403895281357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff4188360301811261345957600080fd5b870160c0613466826133a7565b151586526134758783016133a7565b15158688015260408281013590870152606073ffffffffffffffffffffffffffffffffffffffff6134a7828501612db2565b16908701526080828101359087015260a080830135368490037fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe10181126134ed57600080fd5b90920187810192903567ffffffffffffffff81111561350b57600080fd5b80360384131561351a57600080fd5b828289015261352c83890182866133b7565b9c89019c9750505092860192505060010161341a565b5091979650505050505050565b60408152600560408201527f73656c663a00000000000000000000000000000000000000000000000000000060608201526080602082015260006109ae608083018486613400565b8381526040602082015260006135b1604083018486613400565b95945050505050565b8381526040602082015260006135b16040830184866133b7565b7f697066733a2f2f0000000000000000000000000000000000000000000000000081526000825161360c816007850160208701613091565b9190910160070192915050565b600082357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff4183360301811261364d57600080fd5b9190910192915050565b60006020828403121561366957600080fd5b61093f826133a7565b60008083357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe18436030181126136a757600080fd5b83018035915067ffffffffffffffff8211156136c257600080fd5b602001915036819003821315612e3b57600080fd5b600080858511156136e757600080fd5b838611156136f457600080fd5b5050820193919092039150565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b8082018082111561078b5761078b613701565b6060815260006137576060830186886133b7565b6020830194909452506040015292915050565b7f62000000000000000000000000000000000000000000000000000000000000008152600082516137a2816001850160208701613091565b9190910160010192915050565b8281526040602082015260006109ae60408301846130b5565b84815273ffffffffffffffffffffffffffffffffffffffff841660208201526060604082015260006137fe6060830184866133b7565b9695505050505050565b6020815260006109ae6020830184866133b7565b8181038181111561078b5761078b613701565b6040815260006138436040830185876133b7565b9050826020830152949350505050565b6040815260006138676040830185876133b7565b905060ff83166020830152949350505050565b60608152600061388e6060830186886133b7565b60208301949094525090151560409091015292915050565b6000602082840312156138b857600080fd5b815161093f81612d6756fea264697066735822122030f6a03eecf061513999472455e58728f2693e3a3541e4333a309b089861d90064736f6c63430008110033', - deployedBytecode: - '0x6080604052600436106101c65760003560e01c806379e472c9116100f7578063a4ab5f9f11610095578063c71f1f9611610064578063c71f1f96146106a2578063d0748f71146106b7578063d59f7885146106d7578063f23a6e61146106f7576101cd565b8063a4ab5f9f14610605578063affed0e014610625578063b93ea7ad1461063a578063bc197c811461065a576101cd565b80638c3f5563116100d15780638c3f5563146105905780638efa6441146105b057806390042baf146105d2578063a38cef19146105e5576101cd565b806379e472c9146105085780637a9a162814610528578063853c506814610548576101cd565b806329561426116101645780634fcf3eca1161013e5780634fcf3eca1461047f57806351605d801461049f57806357c56d6b146104b457806361c2926c146104e8576101cd565b8063295614261461041157806341ea0302146104315780634598154f1461045f576101cd565b8063150b7a02116101a0578063150b7a02146103165780631626ba7e1461038c5780631a9b2337146103ac57806320c13b0b146103f1576101cd565b806301ffc9a7146102a1578063025b22bc146102d6578063038dbaac146102f6576101cd565b366101cd57005b60006101fc6000357fffffffff000000000000000000000000000000000000000000000000000000001661073d565b905073ffffffffffffffffffffffffffffffffffffffff81161561029f576000808273ffffffffffffffffffffffffffffffffffffffff16600036604051610245929190612d57565b600060405180830381855af49150503d8060008114610280576040519150601f19603f3d011682016040523d82523d6000602084013e610285565b606091505b50915091508161029757805160208201fd5b805160208201f35b005b3480156102ad57600080fd5b506102c16102bc366004612d95565b610791565b60405190151581526020015b60405180910390f35b3480156102e257600080fd5b5061029f6102f1366004612ddb565b61079c565b34801561030257600080fd5b5061029f610311366004612e42565b6107ee565b34801561032257600080fd5b5061035b610331366004612ec6565b7f150b7a020000000000000000000000000000000000000000000000000000000095945050505050565b6040517fffffffff0000000000000000000000000000000000000000000000000000000090911681526020016102cd565b34801561039857600080fd5b5061035b6103a7366004612f35565b6108f9565b3480156103b857600080fd5b506103cc6103c7366004612d95565b610946565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020016102cd565b3480156103fd57600080fd5b5061035b61040c366004612f81565b610951565b34801561041d57600080fd5b5061029f61042c366004612fed565b6109b6565b34801561043d57600080fd5b5061045161044c366004612fed565b610a00565b6040519081526020016102cd565b34801561046b57600080fd5b5061029f61047a366004613006565b610a0b565b34801561048b57600080fd5b5061029f61049a366004612d95565b610ad1565b3480156104ab57600080fd5b50610451610c00565b3480156104c057600080fd5b506104517f8713a7c4465f6fbee2b6e9d6646d1d9f83fec929edfc4baf661f3c865bdd04d181565b3480156104f457600080fd5b5061029f610503366004612e42565b610c2f565b34801561051457600080fd5b5061029f610523366004613006565b610cb5565b34801561053457600080fd5b5061029f610543366004613028565b610d73565b34801561055457600080fd5b50610568610563366004612f35565b610e09565b604080519586526020860194909452928401919091526060830152608082015260a0016102cd565b34801561059c57600080fd5b506104516105ab366004612fed565b610fd1565b3480156105bc57600080fd5b506105c5610ffd565b6040516102cd91906130ff565b6103cc6105e0366004613141565b61107e565b3480156105f157600080fd5b5061029f610600366004612fed565b61111a565b34801561061157600080fd5b50610451610620366004612fed565b611164565b34801561063157600080fd5b5061045161116f565b34801561064657600080fd5b5061029f610655366004613210565b61117b565b34801561066657600080fd5b5061035b610675366004613245565b7fbc197c810000000000000000000000000000000000000000000000000000000098975050505050505050565b3480156106ae57600080fd5b506104516112c4565b3480156106c357600080fd5b5061029f6106d2366004613006565b6112ee565b3480156106e357600080fd5b5061029f6106f2366004612e42565b611341565b34801561070357600080fd5b5061035b610712366004613300565b7ff23a6e61000000000000000000000000000000000000000000000000000000009695505050505050565b600061078b7fbe27a319efc8734e89e26ba4bc95f5c788584163b959f03fa04e2d7ab4b9a1207fffffffff000000000000000000000000000000000000000000000000000000008416611484565b92915050565b600061078b826114e2565b3330146107e2576040517fe12588940000000000000000000000000000000000000000000000000000000081523360048201523060248201526044015b60405180910390fd5b6107eb8161153e565b50565b33301461082f576040517fe12588940000000000000000000000000000000000000000000000000000000081523360048201523060248201526044016107d9565b8060005b818110156108f357600084848381811061084f5761084f613378565b9050602002013590506108af816000604080517f849e7bdc245db17e50b9f43086f1914d70eb4dab6dd89af4d541d53353ad97de602080830191909152818301859052825180830384018152606090920190925280519101208190555050565b807f804f6171d6008d9e16ee3aa0561fec328397f4ba2827a6605db388cfdefa3b0c60006040516108e291815260200190565b60405180910390a250600101610833565b50505050565b6000806109078585856115f9565b509050801561093957507f1626ba7e00000000000000000000000000000000000000000000000000000000905061093f565b50600090505b9392505050565b600061078b8261073d565b6000806109768686604051610967929190612d57565b604051809103902085856115f9565b50905080156109a857507f20c13b0b0000000000000000000000000000000000000000000000000000000090506109ae565b50600090505b949350505050565b3330146109f7576040517fe12588940000000000000000000000000000000000000000000000000000000081523360048201523060248201526044016107d9565b6107eb81611614565b600061078b826116a4565b333014610a4c576040517fe12588940000000000000000000000000000000000000000000000000000000081523360048201523060248201526044016107d9565b604080517f849e7bdc245db17e50b9f43086f1914d70eb4dab6dd89af4d541d53353ad97de602080830191909152818301859052825180830384018152606083019384905280519101208390559082905282907f804f6171d6008d9e16ee3aa0561fec328397f4ba2827a6605db388cfdefa3b0c906080015b60405180910390a25050565b333014610b12576040517fe12588940000000000000000000000000000000000000000000000000000000081523360048201523060248201526044016107d9565b6000610b1d8261073d565b73ffffffffffffffffffffffffffffffffffffffff1603610b8e576040517f1c3812cc0000000000000000000000000000000000000000000000000000000081527fffffffff00000000000000000000000000000000000000000000000000000000821660048201526024016107d9565b604080517fbe27a319efc8734e89e26ba4bc95f5c788584163b959f03fa04e2d7ab4b9a1206020808301919091527fffffffff00000000000000000000000000000000000000000000000000000000841682840152825180830384018152606090920190925280519101206000905550565b6000610c2a7fea7157fa25e3aa17d0ae2d5280fa4e24d421c61842aa85e45194e1145aa72bf85490565b905090565b333014610c70576040517fe12588940000000000000000000000000000000000000000000000000000000081523360048201523060248201526044016107d9565b6000610ca38383604051602001610c8892919061354f565b604051602081830303815290604052805190602001206116d0565b9050610cb0818484611755565b505050565b333014610cf6576040517fe12588940000000000000000000000000000000000000000000000000000000081523360048201523060248201526044016107d9565b604080517f7f25a23abc421d10864063e9a8ae5fd3fbd5116e156f148428b6a3a02ffd9454602080830191909152818301859052825180830384018152606083019384905280519101208390559082905282907f180e56184e3025975e8449fab79ff135cc5c3b3fe517a19bf8f111d69b33d2e290608001610ac5565b610d7c836118b3565b600080610db4858888604051602001610d9793929190613597565b6040516020818303038152906040528051906020012085856115f9565b9150915081610df5578084846040517f8f4a234f0000000000000000000000000000000000000000000000000000000081526004016107d9939291906135ba565b610e00818888611755565b50505050505050565b60008060008060008087876000818110610e2557610e25613378565b909101357fff00000000000000000000000000000000000000000000000000000000000000169150819050610e7b57610e5d896116d0565b9250610e6a8389896119b0565b92985090965094509150610fc69050565b7fff0000000000000000000000000000000000000000000000000000000000000081811601610eba57610ead896116d0565b9250610e6a838989611a01565b7ffe000000000000000000000000000000000000000000000000000000000000007fff00000000000000000000000000000000000000000000000000000000000000821601610f0c57610ead89611a2d565b7ffd000000000000000000000000000000000000000000000000000000000000007fff00000000000000000000000000000000000000000000000000000000000000821601610f7057610f60898989611a9a565b9550955095509550955050610fc6565b6040517f6085cd820000000000000000000000000000000000000000000000000000000081527fff00000000000000000000000000000000000000000000000000000000000000821660048201526024016107d9565b939792965093509350565b600061078b7f8d0bf1fd623d628c741362c1289948e57b3e2905218c676d3e69abee36d6ae2e83611484565b606061105a61105561100d6112c4565b6040517f017012200000000000000000000000000000000000000000000000000000000060208201526024810191909152604401604051602081830303815290604052611c17565b611e30565b60405160200161106a91906135d4565b604051602081830303815290604052905090565b60003330146110c1576040517fe12588940000000000000000000000000000000000000000000000000000000081523360048201523060248201526044016107d9565b81516020830134f060405173ffffffffffffffffffffffffffffffffffffffff821681529091507fa506ad4e7f05eceba62a023c3219e5bd98a615f4fa87e2afb08a2da5cf62bf0c9060200160405180910390a1919050565b33301461115b576040517fe12588940000000000000000000000000000000000000000000000000000000081523360048201523060248201526044016107d9565b6107eb81611e59565b600061078b82611eb2565b6000610c2a6000610fd1565b3330146111bc576040517fe12588940000000000000000000000000000000000000000000000000000000081523360048201523060248201526044016107d9565b60006111c78361073d565b73ffffffffffffffffffffffffffffffffffffffff1614611238576040517f5b4d6d6a0000000000000000000000000000000000000000000000000000000081527fffffffff00000000000000000000000000000000000000000000000000000000831660048201526024016107d9565b604080517fbe27a319efc8734e89e26ba4bc95f5c788584163b959f03fa04e2d7ab4b9a1206020808301919091527fffffffff000000000000000000000000000000000000000000000000000000008516828401528251808303840181526060909201909252805191012073ffffffffffffffffffffffffffffffffffffffff821690555050565b5050565b6000610c2a7f0eecac93ced8722d209199364cda3bc33da3bc3a23daef6be49ebd780511d0335490565b33301461132f576040517fe12588940000000000000000000000000000000000000000000000000000000081523360048201523060248201526044016107d9565b61133882611614565b6112c081611e59565b333014611382576040517fe12588940000000000000000000000000000000000000000000000000000000081523360048201523060248201526044016107d9565b8060005b818110156108f35760008484838181106113a2576113a2613378565b905060200201359050611421817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff604080517f7f25a23abc421d10864063e9a8ae5fd3fbd5116e156f148428b6a3a02ffd9454602080830191909152818301859052825180830384018152606090920190925280519101208190555050565b807f180e56184e3025975e8449fab79ff135cc5c3b3fe517a19bf8f111d69b33d2e27fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff60405161147391815260200190565b60405180910390a250600101611386565b60008083836040516020016114a3929190918252602082015260400190565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0818403018152919052805160209091012054949350505050565b60007f6ffbd451000000000000000000000000000000000000000000000000000000007fffffffff0000000000000000000000000000000000000000000000000000000083160161153557506001919050565b61078b82611ede565b73ffffffffffffffffffffffffffffffffffffffff81163b6115a4576040517f0c76093700000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff821660048201526024016107d9565b6115ac813055565b60405173ffffffffffffffffffffffffffffffffffffffff821681527f310ba5f1d2ed074b51e2eccd052a47ae9ab7c6b800d1fca3db3999d6a592ca03906020015b60405180910390a150565b60008061160785858561201f565b915091505b935093915050565b8061164b576040517f4294d12700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6116747fea7157fa25e3aa17d0ae2d5280fa4e24d421c61842aa85e45194e1145aa72bf8829055565b6040518181527f307ed6bd941ee9fc80f369c94af5fa11e25bab5102a6140191756c5474a30bfa906020016115ee565b600061078b7f7f25a23abc421d10864063e9a8ae5fd3fbd5116e156f148428b6a3a02ffd945483611484565b6040517f190100000000000000000000000000000000000000000000000000000000000060208201524660228201527fffffffffffffffffffffffffffffffffffffffff0000000000000000000000003060601b166042820152605681018290526000906076015b604051602081830303815290604052805190602001209050919050565b8060005b818110156118ac573684848381811061177457611774613378565b90506020028101906117869190613619565b90506040810135805a10156117db5782815a6040517f2bb3e3ba0000000000000000000000000000000000000000000000000000000081526004810193909352602483019190915260448201526064016107d9565b60006117ea6020840184613657565b15611829576118226118026080850160608601612ddb565b831561180e5783611810565b5a5b61181d60a0870187613672565b612053565b9050611864565b61186161183c6080850160608601612ddb565b6080850135841561184d578461184f565b5a5b61185c60a0880188613672565b61206e565b90505b80156118805760405188815260200160405180910390a06118a1565b6118a16118936040850160208601613657565b8961189c61208b565b6120aa565b505050600101611759565b5050505050565b606081901c6bffffffffffffffffffffffff821660006118d283610fd1565b905081811461191e576040517f9b6514f40000000000000000000000000000000000000000000000000000000081526004810184905260248101839052604481018290526064016107d9565b604080517f8d0bf1fd623d628c741362c1289948e57b3e2905218c676d3e69abee36d6ae2e60208083019190915281830186905282518083038401815260609092019092528051910120600183019081905560408051858152602081018390527f1f180c27086c7a39ea2a7b25239d1ab92348f07ca7bb59d1438fcf527568f881910160405180910390a15050505050565b60008080806119cb876119c6876006818b6136d7565b6120f6565b6000908152873560f01c6020818152604080842084526002909a013560e01c908190529890912090999198509695509350505050565b6000808080611a1c87611a17876001818b6136d7565b6119b0565b935093509350935093509350935093565b6040517f190100000000000000000000000000000000000000000000000000000000000060208201526000602282018190527fffffffffffffffffffffffffffffffffffffffff0000000000000000000000003060601b1660428301526056820183905290607601611738565b6000808080806004600188013560e81c82611ab58383613730565b9050611ac78b61056383868d8f6136d7565b939b5091995097509550935087871015611b1f57611ae781848b8d6136d7565b89896040517fb006aba00000000000000000000000000000000000000000000000000000000081526004016107d99493929190613743565b8092505b88831015611c095760038301928a013560e81c9150611b428383613730565b90506000611b64611b528861258c565b8c8c87908692610563939291906136d7565b939c50919a5098509091505088881015611bbc57611b8482858c8e6136d7565b8a8a6040517fb006aba00000000000000000000000000000000000000000000000000000000081526004016107d99493929190613743565b848110611bff576040517f37daf62b00000000000000000000000000000000000000000000000000000000815260048101829052602481018690526044016107d9565b9350915081611b23565b505050939792965093509350565b8051606090600381901b60006005600483010467ffffffffffffffff811115611c4257611c42613112565b6040519080825280601f01601f191660200182016040528015611c6c576020820181803683370190505b5090506000806000805b86811015611d8057888181518110611c9057611c90613378565b01602001516008948501949390931b60f89390931c92909217915b60058410611d78576040805180820190915260208082527f6162636465666768696a6b6c6d6e6f707172737475767778797a323334353637818301527ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffb90950194601f85871c16908110611d2157611d21613378565b602001015160f81c60f81b858381518110611d3e57611d3e613378565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350600190910190611cab565b600101611c76565b508215611e24576040518060400160405280602081526020017f6162636465666768696a6b6c6d6e6f707172737475767778797a3233343536378152508360050383901b601f1681518110611dd757611dd7613378565b602001015160f81c60f81b848281518110611df457611df4613378565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053505b50919695505050505050565b606081604051602001611e43919061376a565b6040516020818303038152906040529050919050565b611e827f0eecac93ced8722d209199364cda3bc33da3bc3a23daef6be49ebd780511d033829055565b6040518181527f20d3ef1b5738a9f6d7beae515432206e7a8e2740ca6dcf46a952190ad01bcb51906020016115ee565b600061078b7f849e7bdc245db17e50b9f43086f1914d70eb4dab6dd89af4d541d53353ad97de83611484565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167fec6aba50000000000000000000000000000000000000000000000000000000001480611f7157507fffffffff0000000000000000000000000000000000000000000000000000000082167f4e2312e000000000000000000000000000000000000000000000000000000000145b80611fbd57507fffffffff0000000000000000000000000000000000000000000000000000000082167f150b7a0200000000000000000000000000000000000000000000000000000000145b8061200957507fffffffff0000000000000000000000000000000000000000000000000000000082167fc0ee0b8a00000000000000000000000000000000000000000000000000000000145b1561201657506001919050565b61078b826125c0565b6000804261202c866116a4565b1191508115612048578161203f8661261c565b9150915061160c565b611607858585612657565b60006040518284823760008084838989f49695505050505050565b6000604051828482376000808483898b8af1979650505050505050565b60603d604051915060208201818101604052818352816000823e505090565b82156120b857805160208201fd5b7f3dbd1590ea96dd3253a91f24e64e3a502e1225d602a5731357bc12643070ccd782826040516120e99291906137af565b60405180910390a1505050565b60008060005b8381101561258357600181019085013560f81c7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff810161219d57601582019186013560f881901c9060581c73ffffffffffffffffffffffffffffffffffffffff81169074ff0000000000000000000000000000000000000000168117856121835780612192565b60008681526020829052604090205b9550505050506120fc565b806122335760018201918681013560f81c9060430160006121c98a6121c484888c8e6136d7565b612695565b60ff841697909701969194508491905060a083901b74ff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff821617866122185780612227565b60008781526020829052604090205b965050505050506120fc565b6002810361235b576000808784013560f881901c9060581c73ffffffffffffffffffffffffffffffffffffffff16601586019550909250905060008885013560e81c600386018162ffffff1691508096508192505050600081860190506122ac8b848c8c8a9086926122a7939291906136d7565b612958565b6122f4578a836122be83898d8f6136d7565b6040517f9a9462320000000000000000000000000000000000000000000000000000000081526004016107d994939291906137c8565b60ff8416979097019694508460a084901b74ff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff8416178761233f578061234e565b60008881526020829052604090205b97505050505050506120fc565b6003810361238e576020820191860135836123765780612385565b60008481526020829052604090205b935050506120fc565b600481036123da576003808301928781013560e81c91908201016000806123bb8b6119c685898d8f6136d7565b600098895260205260409097209690970196509093506120fc92505050565b600681036124e25760008287013560f81c60018401935060ff16905060008784013560f01c60028501945061ffff16905060008885013560e81c600386018162ffffff1691508096508192505050600081860190506000806124488d8d8d8b9087926119c6939291906136d7565b9398508893909250905084821061245e57988501985b604080517f53657175656e6365206e657374656420636f6e6669673a0a0000000000000000602080830191909152603882018490526058820188905260788083018a90528351808403909101815260989092019092528051910120896124c457806124d3565b60008a81526020829052604090205b995050505050505050506120fc565b6005810361254e57602082019186013587810361251d577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff94505b600061252882612b05565b9050846125355780612544565b60008581526020829052604090205b94505050506120fc565b6040517fb2505f7c000000000000000000000000000000000000000000000000000000008152600481018290526024016107d9565b50935093915050565b7f8713a7c4465f6fbee2b6e9d6646d1d9f83fec929edfc4baf661f3c865bdd04d1600090815260208290526040812061078b565b60007ffda4dd44000000000000000000000000000000000000000000000000000000007fffffffff0000000000000000000000000000000000000000000000000000000083160161261357506001919050565b61078b82612b40565b604080517f7f25a23abc421d10864063e9a8ae5fd3fbd5116e156f148428b6a3a02ffd94546020820152908101829052600090606001611738565b600080600080600061266a888888610e09565b50965091945092509050828210801590612688575061268881612b9c565b9450505050935093915050565b6000604282146126d55782826040517f2ee17a3d0000000000000000000000000000000000000000000000000000000081526004016107d9929190613808565b60006126ee6126e560018561381c565b85013560f81c90565b60ff169050604084013560f81c843560208601357f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0811115612762578686826040517fad4aac760000000000000000000000000000000000000000000000000000000081526004016107d99392919061382f565b8260ff16601b1415801561277a57508260ff16601c14155b156127b7578686846040517fe578897e0000000000000000000000000000000000000000000000000000000081526004016107d993929190613853565b60018403612824576040805160008152602081018083528a905260ff851691810191909152606081018390526080810182905260019060a0015b6020604051602081039080840390855afa158015612813573d6000803e3d6000fd5b5050506020604051035194506128fc565b600284036128c1576040517f19457468657265756d205369676e6564204d6573736167653a0a3332000000006020820152603c8101899052600190605c01604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181528282528051602091820120600084529083018083525260ff861690820152606081018490526080810183905260a0016127f1565b86868560016040517f9dfba8520000000000000000000000000000000000000000000000000000000081526004016107d9949392919061387a565b73ffffffffffffffffffffffffffffffffffffffff851661294d5786866040517f6c1719d20000000000000000000000000000000000000000000000000000000081526004016107d9929190613808565b505050509392505050565b600080838361296860018261381c565b81811061297757612977613378565b919091013560f81c91505060018114806129915750600281145b156129d6578473ffffffffffffffffffffffffffffffffffffffff166129b8878686612695565b73ffffffffffffffffffffffffffffffffffffffff16149150612afc565b60038103612ac15773ffffffffffffffffffffffffffffffffffffffff8516631626ba7e8786600087612a0a60018261381c565b92612a17939291906136d7565b6040518463ffffffff1660e01b8152600401612a35939291906135ba565b602060405180830381865afa158015612a52573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612a7691906138a6565b7fffffffff00000000000000000000000000000000000000000000000000000000167f1626ba7e00000000000000000000000000000000000000000000000000000000149150612afc565b83838260006040517f9dfba8520000000000000000000000000000000000000000000000000000000081526004016107d9949392919061387a565b50949350505050565b6040517f53657175656e636520737461746963206469676573743a0a0000000000000000602082015260388101829052600090605801611738565b60007fe4a77bbc000000000000000000000000000000000000000000000000000000007fffffffff00000000000000000000000000000000000000000000000000000000831601612b9357506001919050565b61078b82612ba7565b600061078b82612c03565b60007fae9fa280000000000000000000000000000000000000000000000000000000007fffffffff00000000000000000000000000000000000000000000000000000000831601612bfa57506001919050565b61078b82612c3a565b6000612c0e82612d24565b15612c1b57506001919050565b6000612c2683611eb2565b9050801580159061093f5750421092915050565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167fac6a444e000000000000000000000000000000000000000000000000000000001480612ccd57507fffffffff0000000000000000000000000000000000000000000000000000000082167f36e7817500000000000000000000000000000000000000000000000000000000145b15612cda57506001919050565b7f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff0000000000000000000000000000000000000000000000000000000083161461078b565b6000811580159061078b5750507fea7157fa25e3aa17d0ae2d5280fa4e24d421c61842aa85e45194e1145aa72bf8541490565b8183823760009101908152919050565b7fffffffff00000000000000000000000000000000000000000000000000000000811681146107eb57600080fd5b600060208284031215612da757600080fd5b813561093f81612d67565b803573ffffffffffffffffffffffffffffffffffffffff81168114612dd657600080fd5b919050565b600060208284031215612ded57600080fd5b61093f82612db2565b60008083601f840112612e0857600080fd5b50813567ffffffffffffffff811115612e2057600080fd5b6020830191508360208260051b8501011115612e3b57600080fd5b9250929050565b60008060208385031215612e5557600080fd5b823567ffffffffffffffff811115612e6c57600080fd5b612e7885828601612df6565b90969095509350505050565b60008083601f840112612e9657600080fd5b50813567ffffffffffffffff811115612eae57600080fd5b602083019150836020828501011115612e3b57600080fd5b600080600080600060808688031215612ede57600080fd5b612ee786612db2565b9450612ef560208701612db2565b935060408601359250606086013567ffffffffffffffff811115612f1857600080fd5b612f2488828901612e84565b969995985093965092949392505050565b600080600060408486031215612f4a57600080fd5b83359250602084013567ffffffffffffffff811115612f6857600080fd5b612f7486828701612e84565b9497909650939450505050565b60008060008060408587031215612f9757600080fd5b843567ffffffffffffffff80821115612faf57600080fd5b612fbb88838901612e84565b90965094506020870135915080821115612fd457600080fd5b50612fe187828801612e84565b95989497509550505050565b600060208284031215612fff57600080fd5b5035919050565b6000806040838503121561301957600080fd5b50508035926020909101359150565b60008060008060006060868803121561304057600080fd5b853567ffffffffffffffff8082111561305857600080fd5b61306489838a01612df6565b909750955060208801359450604088013591508082111561308457600080fd5b50612f2488828901612e84565b60005b838110156130ac578181015183820152602001613094565b50506000910152565b600081518084526130cd816020860160208601613091565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b60208152600061093f60208301846130b5565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b60006020828403121561315357600080fd5b813567ffffffffffffffff8082111561316b57600080fd5b818401915084601f83011261317f57600080fd5b81358181111561319157613191613112565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0908116603f011681019083821181831017156131d7576131d7613112565b816040528281528760208487010111156131f057600080fd5b826020860160208301376000928101602001929092525095945050505050565b6000806040838503121561322357600080fd5b823561322e81612d67565b915061323c60208401612db2565b90509250929050565b60008060008060008060008060a0898b03121561326157600080fd5b61326a89612db2565b975061327860208a01612db2565b9650604089013567ffffffffffffffff8082111561329557600080fd5b6132a18c838d01612df6565b909850965060608b01359150808211156132ba57600080fd5b6132c68c838d01612df6565b909650945060808b01359150808211156132df57600080fd5b506132ec8b828c01612e84565b999c989b5096995094979396929594505050565b60008060008060008060a0878903121561331957600080fd5b61332287612db2565b955061333060208801612db2565b94506040870135935060608701359250608087013567ffffffffffffffff81111561335a57600080fd5b61336689828a01612e84565b979a9699509497509295939492505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b80358015158114612dd657600080fd5b8183528181602085013750600060208284010152600060207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f840116840101905092915050565b81835260006020808501808196508560051b810191508460005b8781101561354257828403895281357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff4188360301811261345957600080fd5b870160c0613466826133a7565b151586526134758783016133a7565b15158688015260408281013590870152606073ffffffffffffffffffffffffffffffffffffffff6134a7828501612db2565b16908701526080828101359087015260a080830135368490037fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe10181126134ed57600080fd5b90920187810192903567ffffffffffffffff81111561350b57600080fd5b80360384131561351a57600080fd5b828289015261352c83890182866133b7565b9c89019c9750505092860192505060010161341a565b5091979650505050505050565b60408152600560408201527f73656c663a00000000000000000000000000000000000000000000000000000060608201526080602082015260006109ae608083018486613400565b8381526040602082015260006135b1604083018486613400565b95945050505050565b8381526040602082015260006135b16040830184866133b7565b7f697066733a2f2f0000000000000000000000000000000000000000000000000081526000825161360c816007850160208701613091565b9190910160070192915050565b600082357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff4183360301811261364d57600080fd5b9190910192915050565b60006020828403121561366957600080fd5b61093f826133a7565b60008083357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe18436030181126136a757600080fd5b83018035915067ffffffffffffffff8211156136c257600080fd5b602001915036819003821315612e3b57600080fd5b600080858511156136e757600080fd5b838611156136f457600080fd5b5050820193919092039150565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b8082018082111561078b5761078b613701565b6060815260006137576060830186886133b7565b6020830194909452506040015292915050565b7f62000000000000000000000000000000000000000000000000000000000000008152600082516137a2816001850160208701613091565b9190910160010192915050565b8281526040602082015260006109ae60408301846130b5565b84815273ffffffffffffffffffffffffffffffffffffffff841660208201526060604082015260006137fe6060830184866133b7565b9695505050505050565b6020815260006109ae6020830184866133b7565b8181038181111561078b5761078b613701565b6040815260006138436040830185876133b7565b9050826020830152949350505050565b6040815260006138676040830185876133b7565b905060ff83166020830152949350505050565b60608152600061388e6060830186886133b7565b60208301949094525090151560409091015292915050565b6000602082840312156138b857600080fd5b815161093f81612d6756fea264697066735822122030f6a03eecf061513999472455e58728f2693e3a3541e4333a309b089861d90064736f6c63430008110033', - linkReferences: {}, - deployedLinkReferences: {} -} diff --git a/old/packages/tests/src/builds/v2/artifacts/UniversalSigValidator.ts b/old/packages/tests/src/builds/v2/artifacts/UniversalSigValidator.ts deleted file mode 100644 index e1e10b087..000000000 --- a/old/packages/tests/src/builds/v2/artifacts/UniversalSigValidator.ts +++ /dev/null @@ -1,190 +0,0 @@ -export const universalSigValidator = { - _format: 'hh-sol-artifact-1', - contractName: 'UniversalSigValidator', - sourceName: 'contracts/EIP6492.sol', - abi: [ - { - inputs: [ - { - internalType: 'bytes', - name: 'error', - type: 'bytes' - } - ], - name: 'ERC1271Revert', - type: 'error' - }, - { - inputs: [ - { - internalType: 'bytes', - name: 'error', - type: 'bytes' - } - ], - name: 'ERC6492DeployFailed', - type: 'error' - }, - { - inputs: [ - { - internalType: 'address', - name: '_signer', - type: 'address' - }, - { - internalType: 'bytes32', - name: '_hash', - type: 'bytes32' - }, - { - internalType: 'bytes', - name: '_signature', - type: 'bytes' - } - ], - name: 'isValidSig', - outputs: [ - { - internalType: 'bool', - name: '', - type: 'bool' - } - ], - stateMutability: 'nonpayable', - type: 'function' - }, - { - inputs: [ - { - internalType: 'address', - name: '_signer', - type: 'address' - }, - { - internalType: 'bytes32', - name: '_hash', - type: 'bytes32' - }, - { - internalType: 'bytes', - name: '_signature', - type: 'bytes' - }, - { - internalType: 'bool', - name: 'allowSideEffects', - type: 'bool' - }, - { - internalType: 'bool', - name: 'deployAlreadyDeployed', - type: 'bool' - } - ], - name: 'isValidSigImpl', - outputs: [ - { - internalType: 'bool', - name: '', - type: 'bool' - } - ], - stateMutability: 'nonpayable', - type: 'function' - }, - { - inputs: [ - { - internalType: 'address', - name: '_signer', - type: 'address' - }, - { - internalType: 'bytes32', - name: '_hash', - type: 'bytes32' - }, - { - internalType: 'bytes', - name: '_signature', - type: 'bytes' - } - ], - name: 'isValidSigNoThrow', - outputs: [ - { - internalType: 'bool', - name: '', - type: 'bool' - } - ], - stateMutability: 'nonpayable', - type: 'function' - }, - { - inputs: [ - { - internalType: 'address', - name: '_signer', - type: 'address' - }, - { - internalType: 'bytes32', - name: '_hash', - type: 'bytes32' - }, - { - internalType: 'bytes', - name: '_signature', - type: 'bytes' - } - ], - name: 'isValidSigWithSideEffects', - outputs: [ - { - internalType: 'bool', - name: '', - type: 'bool' - } - ], - stateMutability: 'nonpayable', - type: 'function' - }, - { - inputs: [ - { - internalType: 'address', - name: '_signer', - type: 'address' - }, - { - internalType: 'bytes32', - name: '_hash', - type: 'bytes32' - }, - { - internalType: 'bytes', - name: '_signature', - type: 'bytes' - } - ], - name: 'isValidSigWithSideEffectsNoThrow', - outputs: [ - { - internalType: 'bool', - name: '', - type: 'bool' - } - ], - stateMutability: 'nonpayable', - type: 'function' - } - ], - bytecode: - '0x608060405234801561001057600080fd5b50610fbc806100206000396000f3fe608060405234801561001057600080fd5b50600436106100675760003560e01c806376be4cea1161005057806376be4cea146100a65780638f068430146100b957806398ef1ed8146100cc57600080fd5b80631c6453271461006c5780633d787b6314610093575b600080fd5b61007f61007a366004610ad4565b6100df565b604051901515815260200160405180910390f35b61007f6100a1366004610ad4565b61023d565b61007f6100b4366004610b3e565b61031e565b61007f6100c7366004610ad4565b6108e1565b61007f6100da366004610ad4565b61096e565b6040517f76be4cea00000000000000000000000000000000000000000000000000000000815260009030906376be4cea9061012890889088908890889088908190600401610bc3565b6020604051808303816000875af1925050508015610181575060408051601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016820190925261017e91810190610c45565b60015b610232573d8080156101af576040519150601f19603f3d011682016040523d82523d6000602084013e6101b4565b606091505b508051600181900361022757816000815181106101d3576101d3610c69565b6020910101517fff00000000000000000000000000000000000000000000000000000000000000167f0100000000000000000000000000000000000000000000000000000000000000149250610235915050565b600092505050610235565b90505b949350505050565b6040517f76be4cea00000000000000000000000000000000000000000000000000000000815260009030906376be4cea906102879088908890889088906001908990600401610bc3565b6020604051808303816000875af19250505080156102e0575060408051601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01682019092526102dd91810190610c45565b60015b610232573d80801561030e576040519150601f19603f3d011682016040523d82523d6000602084013e610313565b606091505b506000915050610235565b600073ffffffffffffffffffffffffffffffffffffffff87163b6060827f64926492649264926492649264926492649264926492649264926492649264928888610369602082610c98565b610375928b9290610cd8565b61037e91610d02565b1490508015610484576000606089828a610399602082610c98565b926103a693929190610cd8565b8101906103b39190610e18565b955090925090508415806103c45750865b1561047d576000808373ffffffffffffffffffffffffffffffffffffffff16836040516103f19190610eb2565b6000604051808303816000865af19150503d806000811461042e576040519150601f19603f3d011682016040523d82523d6000602084013e610433565b606091505b50915091508161047a57806040517f9d0d6e2d0000000000000000000000000000000000000000000000000000000081526004016104719190610f18565b60405180910390fd5b50505b50506104be565b87878080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509294505050505b80806104ca5750600083115b156106bb576040517f1626ba7e00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8b1690631626ba7e90610523908c908690600401610f2b565b602060405180830381865afa92505050801561057a575060408051601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016820190925261057791810190610f44565b60015b61060f573d8080156105a8576040519150601f19603f3d011682016040523d82523d6000602084013e6105ad565b606091505b50851580156105bc5750600084115b156105db576105d08b8b8b8b8b600161031e565b9450505050506108d7565b806040517f6f2a95990000000000000000000000000000000000000000000000000000000081526004016104719190610f18565b7fffffffff0000000000000000000000000000000000000000000000000000000081167f1626ba7e000000000000000000000000000000000000000000000000000000001480158161065f575086155b801561066b5750600085115b1561068b5761067f8c8c8c8c8c600161031e565b955050505050506108d7565b841580156106965750825b80156106a0575087155b156106af57806000526001601ffd5b94506108d79350505050565b6041871461074b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603a60248201527f5369676e617475726556616c696461746f72237265636f7665725369676e657260448201527f3a20696e76616c6964207369676e6174757265206c656e6774680000000000006064820152608401610471565b600061075a6020828a8c610cd8565b61076391610d02565b90506000610775604060208b8d610cd8565b61077e91610d02565b905060008a8a604081811061079557610795610c69565b919091013560f81c915050601b81148015906107b557508060ff16601c14155b15610842576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602d60248201527f5369676e617475726556616c696461746f723a20696e76616c6964207369676e60448201527f617475726520762076616c7565000000000000000000000000000000000000006064820152608401610471565b6040805160008152602081018083528e905260ff831691810191909152606081018490526080810183905273ffffffffffffffffffffffffffffffffffffffff8e169060019060a0016020604051602081039080840390855afa1580156108ad573d6000803e3d6000fd5b5050506020604051035173ffffffffffffffffffffffffffffffffffffffff161496505050505050505b9695505050505050565b6040517f76be4cea00000000000000000000000000000000000000000000000000000000815260009030906376be4cea9061092b9088908890889088906001908990600401610bc3565b6020604051808303816000875af115801561094a573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102329190610c45565b6040517f76be4cea00000000000000000000000000000000000000000000000000000000815260009030906376be4cea906109b790889088908890889088908190600401610bc3565b6020604051808303816000875af1925050508015610a10575060408051601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0168201909252610a0d91810190610c45565b60015b610232573d808015610a3e576040519150601f19603f3d011682016040523d82523d6000602084013e610a43565b606091505b5080516001819003610a6257816000815181106101d3576101d3610c69565b8082fd5b73ffffffffffffffffffffffffffffffffffffffff81168114610a8857600080fd5b50565b60008083601f840112610a9d57600080fd5b50813567ffffffffffffffff811115610ab557600080fd5b602083019150836020828501011115610acd57600080fd5b9250929050565b60008060008060608587031215610aea57600080fd5b8435610af581610a66565b935060208501359250604085013567ffffffffffffffff811115610b1857600080fd5b610b2487828801610a8b565b95989497509550505050565b8015158114610a8857600080fd5b60008060008060008060a08789031215610b5757600080fd5b8635610b6281610a66565b955060208701359450604087013567ffffffffffffffff811115610b8557600080fd5b610b9189828a01610a8b565b9095509350506060870135610ba581610b30565b91506080870135610bb581610b30565b809150509295509295509295565b73ffffffffffffffffffffffffffffffffffffffff8716815285602082015260a060408201528360a0820152838560c0830137600060c085830181019190915292151560608201529015156080820152601f9092017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016909101019392505050565b600060208284031215610c5757600080fd5b8151610c6281610b30565b9392505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b81810381811115610cd2577f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b92915050565b60008085851115610ce857600080fd5b83861115610cf557600080fd5b5050820193919092039150565b80356020831015610cd2577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff602084900360031b1b1692915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600082601f830112610d7e57600080fd5b813567ffffffffffffffff80821115610d9957610d99610d3e565b604051601f83017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0908116603f01168101908282118183101715610ddf57610ddf610d3e565b81604052838152866020858801011115610df857600080fd5b836020870160208301376000602085830101528094505050505092915050565b600080600060608486031215610e2d57600080fd5b8335610e3881610a66565b9250602084013567ffffffffffffffff80821115610e5557600080fd5b610e6187838801610d6d565b93506040860135915080821115610e7757600080fd5b50610e8486828701610d6d565b9150509250925092565b60005b83811015610ea9578181015183820152602001610e91565b50506000910152565b60008251610ec4818460208701610e8e565b9190910192915050565b60008151808452610ee6816020860160208601610e8e565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b602081526000610c626020830184610ece565b8281526040602082015260006102356040830184610ece565b600060208284031215610f5657600080fd5b81517fffffffff0000000000000000000000000000000000000000000000000000000081168114610c6257600080fdfea26469706673582212201a72aed4b15ffb05b6502997a9bb655992e06590bd26b336dfbb153d7ff6f34b64736f6c63430008120033', - deployedBytecode: - '0x608060405234801561001057600080fd5b50600436106100675760003560e01c806376be4cea1161005057806376be4cea146100a65780638f068430146100b957806398ef1ed8146100cc57600080fd5b80631c6453271461006c5780633d787b6314610093575b600080fd5b61007f61007a366004610ad4565b6100df565b604051901515815260200160405180910390f35b61007f6100a1366004610ad4565b61023d565b61007f6100b4366004610b3e565b61031e565b61007f6100c7366004610ad4565b6108e1565b61007f6100da366004610ad4565b61096e565b6040517f76be4cea00000000000000000000000000000000000000000000000000000000815260009030906376be4cea9061012890889088908890889088908190600401610bc3565b6020604051808303816000875af1925050508015610181575060408051601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016820190925261017e91810190610c45565b60015b610232573d8080156101af576040519150601f19603f3d011682016040523d82523d6000602084013e6101b4565b606091505b508051600181900361022757816000815181106101d3576101d3610c69565b6020910101517fff00000000000000000000000000000000000000000000000000000000000000167f0100000000000000000000000000000000000000000000000000000000000000149250610235915050565b600092505050610235565b90505b949350505050565b6040517f76be4cea00000000000000000000000000000000000000000000000000000000815260009030906376be4cea906102879088908890889088906001908990600401610bc3565b6020604051808303816000875af19250505080156102e0575060408051601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01682019092526102dd91810190610c45565b60015b610232573d80801561030e576040519150601f19603f3d011682016040523d82523d6000602084013e610313565b606091505b506000915050610235565b600073ffffffffffffffffffffffffffffffffffffffff87163b6060827f64926492649264926492649264926492649264926492649264926492649264928888610369602082610c98565b610375928b9290610cd8565b61037e91610d02565b1490508015610484576000606089828a610399602082610c98565b926103a693929190610cd8565b8101906103b39190610e18565b955090925090508415806103c45750865b1561047d576000808373ffffffffffffffffffffffffffffffffffffffff16836040516103f19190610eb2565b6000604051808303816000865af19150503d806000811461042e576040519150601f19603f3d011682016040523d82523d6000602084013e610433565b606091505b50915091508161047a57806040517f9d0d6e2d0000000000000000000000000000000000000000000000000000000081526004016104719190610f18565b60405180910390fd5b50505b50506104be565b87878080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509294505050505b80806104ca5750600083115b156106bb576040517f1626ba7e00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8b1690631626ba7e90610523908c908690600401610f2b565b602060405180830381865afa92505050801561057a575060408051601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016820190925261057791810190610f44565b60015b61060f573d8080156105a8576040519150601f19603f3d011682016040523d82523d6000602084013e6105ad565b606091505b50851580156105bc5750600084115b156105db576105d08b8b8b8b8b600161031e565b9450505050506108d7565b806040517f6f2a95990000000000000000000000000000000000000000000000000000000081526004016104719190610f18565b7fffffffff0000000000000000000000000000000000000000000000000000000081167f1626ba7e000000000000000000000000000000000000000000000000000000001480158161065f575086155b801561066b5750600085115b1561068b5761067f8c8c8c8c8c600161031e565b955050505050506108d7565b841580156106965750825b80156106a0575087155b156106af57806000526001601ffd5b94506108d79350505050565b6041871461074b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603a60248201527f5369676e617475726556616c696461746f72237265636f7665725369676e657260448201527f3a20696e76616c6964207369676e6174757265206c656e6774680000000000006064820152608401610471565b600061075a6020828a8c610cd8565b61076391610d02565b90506000610775604060208b8d610cd8565b61077e91610d02565b905060008a8a604081811061079557610795610c69565b919091013560f81c915050601b81148015906107b557508060ff16601c14155b15610842576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602d60248201527f5369676e617475726556616c696461746f723a20696e76616c6964207369676e60448201527f617475726520762076616c7565000000000000000000000000000000000000006064820152608401610471565b6040805160008152602081018083528e905260ff831691810191909152606081018490526080810183905273ffffffffffffffffffffffffffffffffffffffff8e169060019060a0016020604051602081039080840390855afa1580156108ad573d6000803e3d6000fd5b5050506020604051035173ffffffffffffffffffffffffffffffffffffffff161496505050505050505b9695505050505050565b6040517f76be4cea00000000000000000000000000000000000000000000000000000000815260009030906376be4cea9061092b9088908890889088906001908990600401610bc3565b6020604051808303816000875af115801561094a573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102329190610c45565b6040517f76be4cea00000000000000000000000000000000000000000000000000000000815260009030906376be4cea906109b790889088908890889088908190600401610bc3565b6020604051808303816000875af1925050508015610a10575060408051601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0168201909252610a0d91810190610c45565b60015b610232573d808015610a3e576040519150601f19603f3d011682016040523d82523d6000602084013e610a43565b606091505b5080516001819003610a6257816000815181106101d3576101d3610c69565b8082fd5b73ffffffffffffffffffffffffffffffffffffffff81168114610a8857600080fd5b50565b60008083601f840112610a9d57600080fd5b50813567ffffffffffffffff811115610ab557600080fd5b602083019150836020828501011115610acd57600080fd5b9250929050565b60008060008060608587031215610aea57600080fd5b8435610af581610a66565b935060208501359250604085013567ffffffffffffffff811115610b1857600080fd5b610b2487828801610a8b565b95989497509550505050565b8015158114610a8857600080fd5b60008060008060008060a08789031215610b5757600080fd5b8635610b6281610a66565b955060208701359450604087013567ffffffffffffffff811115610b8557600080fd5b610b9189828a01610a8b565b9095509350506060870135610ba581610b30565b91506080870135610bb581610b30565b809150509295509295509295565b73ffffffffffffffffffffffffffffffffffffffff8716815285602082015260a060408201528360a0820152838560c0830137600060c085830181019190915292151560608201529015156080820152601f9092017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016909101019392505050565b600060208284031215610c5757600080fd5b8151610c6281610b30565b9392505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b81810381811115610cd2577f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b92915050565b60008085851115610ce857600080fd5b83861115610cf557600080fd5b5050820193919092039150565b80356020831015610cd2577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff602084900360031b1b1692915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600082601f830112610d7e57600080fd5b813567ffffffffffffffff80821115610d9957610d99610d3e565b604051601f83017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0908116603f01168101908282118183101715610ddf57610ddf610d3e565b81604052838152866020858801011115610df857600080fd5b836020870160208301376000602085830101528094505050505092915050565b600080600060608486031215610e2d57600080fd5b8335610e3881610a66565b9250602084013567ffffffffffffffff80821115610e5557600080fd5b610e6187838801610d6d565b93506040860135915080821115610e7757600080fd5b50610e8486828701610d6d565b9150509250925092565b60005b83811015610ea9578181015183820152602001610e91565b50506000910152565b60008251610ec4818460208701610e8e565b9190910192915050565b60008151808452610ee6816020860160208601610e8e565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b602081526000610c626020830184610ece565b8281526040602082015260006102356040830184610ece565b600060208284031215610f5657600080fd5b81517fffffffff0000000000000000000000000000000000000000000000000000000081168114610c6257600080fdfea26469706673582212201a72aed4b15ffb05b6502997a9bb655992e06590bd26b336dfbb153d7ff6f34b64736f6c63430008120033', - linkReferences: {}, - deployedLinkReferences: {} -} diff --git a/old/packages/tests/src/builds/v2/index.ts b/old/packages/tests/src/builds/v2/index.ts deleted file mode 100644 index 100e9f06b..000000000 --- a/old/packages/tests/src/builds/v2/index.ts +++ /dev/null @@ -1,5 +0,0 @@ -export { factory } from './artifacts/Factory' -export { guestModule } from './artifacts/GuestModule' -export { mainModule } from './artifacts/MainModule' -export { mainModuleUpgradable } from './artifacts/MainModuleUpgradable' -export { universalSigValidator } from './artifacts/UniversalSigValidator' diff --git a/old/packages/tests/src/configs/index.ts b/old/packages/tests/src/configs/index.ts deleted file mode 100644 index 5b1f4b7f7..000000000 --- a/old/packages/tests/src/configs/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * as random from './random' diff --git a/old/packages/tests/src/configs/random.ts b/old/packages/tests/src/configs/random.ts deleted file mode 100644 index 32188e8cd..000000000 --- a/old/packages/tests/src/configs/random.ts +++ /dev/null @@ -1,47 +0,0 @@ -import { v1, v2 } from '@0xsequence/core' -import { ethers } from 'ethers' -import { maxForBits, randomBigInt, randomBool } from '../utils' - -export function genRandomV1Config( - threshold: ethers.BigNumberish = randomBigInt(0, maxForBits(16)), - numSigners: ethers.BigNumberish = randomBigInt(1, 24) -): v1.config.WalletConfig { - const signers: v1.config.AddressMember[] = [] - - for (let i = 0n; i < BigInt(numSigners); i++) { - signers.push({ - address: ethers.Wallet.createRandom().address, - weight: randomBigInt(0, maxForBits(8)) - }) - } - - return { version: 1, threshold, signers } -} - -export function genRandomV2Config( - threshold: ethers.BigNumberish = randomBigInt(0, maxForBits(16)), - checkpoint: ethers.BigNumberish = randomBigInt(0, maxForBits(32)), - numSigners: ethers.BigNumberish = randomBigInt(1, 24), - numSubdigests: ethers.BigNumberish = randomBigInt(0, 24), - useMerkleTopology: boolean = randomBool() -): v2.config.WalletConfig { - const signers: v2.config.SignerLeaf[] = [] - for (let i = 0n; i < BigInt(numSigners); i++) { - signers.push({ - address: ethers.Wallet.createRandom().address, - weight: randomBigInt(0, maxForBits(8)) - }) - } - - const subdigests: v2.config.SubdigestLeaf[] = [] - for (let i = 0n; i < BigInt(numSubdigests); i++) { - subdigests.push({ - subdigest: ethers.hexlify(ethers.randomBytes(32)) - }) - } - - const topologyBuilder = useMerkleTopology ? v2.config.merkleTopologyBuilder : v2.config.legacyTopologyBuilder - const tree = topologyBuilder([...signers, ...subdigests]) - - return { version: 2, threshold, checkpoint, tree } -} diff --git a/old/packages/tests/src/context/index.ts b/old/packages/tests/src/context/index.ts deleted file mode 100644 index b08d1617b..000000000 --- a/old/packages/tests/src/context/index.ts +++ /dev/null @@ -1,22 +0,0 @@ -import { ethers } from 'ethers' - -import { deployV1Context } from './v1' -import { deployV2Context } from './v2' -import { commons } from '@0xsequence/core' - -export async function deploySequenceContexts(signer: ethers.Signer): Promise { - const { chainId } = await signer.provider!.getNetwork() - - console.time(`[${chainId}] [v1]: Finished in`) - const v1 = await deployV1Context(signer) - console.timeEnd(`[${chainId}] [v1]: Finished in`) - - console.time(`[${chainId}] [v2]: Finished in`) - const v2 = await deployV2Context(signer) - console.timeEnd(`[${chainId}] [v2]: Finished in`) - - return { 1: v1, 2: v2 } -} - -export * as v1 from './v1' -export * as v2 from './v2' diff --git a/old/packages/tests/src/context/v1.ts b/old/packages/tests/src/context/v1.ts deleted file mode 100644 index da29503fc..000000000 --- a/old/packages/tests/src/context/v1.ts +++ /dev/null @@ -1,118 +0,0 @@ -import { ethers } from 'ethers' -import { isContract } from '../utils' -import { parseEther } from '@0xsequence/utils' -import { v1 } from '@0xsequence/core' - -// These are the Sequence v1 contracts -// we use them if they are available -const predefinedAddresses = { - factory: '0xf9D09D634Fb818b05149329C1dcCFAeA53639d96', - mainModule: '0xd01F11855bCcb95f88D7A48492F66410d4637313', - mainModuleUpgradable: '0x7EFE6cE415956c5f80C6530cC6cc81b4808F6118', - guestModule: '0x02390F3E6E5FD1C6786CB78FD3027C117a9955A7', - multiCallUtils: '0xd130B43062D875a4B7aF3f8fc036Bc6e9D3E1B3E' -} - -export async function deployV1Context(signer: ethers.Signer): Promise { - const { chainId } = await signer.provider!.getNetwork() - - // See if signer's provider has the contracts already deployed - const provider = signer.provider - if (!provider) { - throw new Error('Signer has no provider') - } - - if ( - await Promise.all(Object.values(predefinedAddresses).map(address => isContract(provider, address))).then(r => r.every(x => x)) - ) { - return { - version: 1, - - factory: predefinedAddresses.factory, - mainModule: predefinedAddresses.mainModule, - mainModuleUpgradable: predefinedAddresses.mainModuleUpgradable, - guestModule: predefinedAddresses.guestModule, - multiCallUtils: predefinedAddresses.multiCallUtils, - - walletCreationCode: '0x603a600e3d39601a805130553df3363d3d373d3d3d363d30545af43d82803e903d91601857fd5bf3' - } - } - - console.log(`[${chainId}] [v1]: Deploying context...`) - - const responses: ethers.TransactionResponse[] = [] - - // Try deploying the v1 contracts using the v1 singleton factory - responses.push( - await signer.sendTransaction({ - to: '0x9c5a87452d4FAC0cbd53BDCA580b20A45526B3AB', - value: parseEther('0.02170000000014'), - gasLimit: 8000000 - }) - ) - - responses.push( - await provider.broadcastTransaction( - '0xf9010880852416b84e01830222e08080b8b66080604052348015600f57600080fd5b50609980601d6000396000f3fe60a06020601f369081018290049091028201604052608081815260009260609284918190838280828437600092018290525084519495509392505060208401905034f5604080516001600160a01b0383168152905191935081900360200190a0505000fea26469706673582212205a310755225e3c740b2f013fb6343f4c205e7141fcdf15947f5f0e0e818727fb64736f6c634300060a00331ca01820182018201820182018201820182018201820182018201820182018201820a01820182018201820182018201820182018201820182018201820182018201820' - ) - ) - - // Deploy universal deployer - responses.push( - await signer.sendTransaction({ - to: '0x1b926fbb24a9f78dcdd3272f2d86f5d0660e59c0', - data: '0x608060405234801561001057600080fd5b5061013d806100206000396000f3fe60806040526004361061001e5760003560e01c80639c4ae2d014610023575b600080fd5b6100cb6004803603604081101561003957600080fd5b81019060208101813564010000000081111561005457600080fd5b82018360208201111561006657600080fd5b8035906020019184600183028401116401000000008311171561008857600080fd5b91908080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525092955050913592506100cd915050565b005b60008183516020850134f56040805173ffffffffffffffffffffffffffffffffffffffff83168152905191925081900360200190a050505056fea264697066735822122033609f614f03931b92d88c309d698449bb77efcd517328d341fa4f923c5d8c7964736f6c63430007060033', - gasLimit: 8000000 - }) - ) - - // Deploy factory - responses.push( - await signer.sendTransaction({ - to: '0x8a5bc19e22d6ad55a2c763b93a75d09f321fe764', - data: '0x9c4ae2d00000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001e8608060405234801561001057600080fd5b506101c8806100206000396000f3fe60806040526004361061001e5760003560e01c806332c02a1414610023575b600080fd5b61005c6004803603604081101561003957600080fd5b5073ffffffffffffffffffffffffffffffffffffffff8135169060200135610085565b6040805173ffffffffffffffffffffffffffffffffffffffff9092168252519081900360200190f35b60008060405180606001604052806028815260200161016b602891398473ffffffffffffffffffffffffffffffffffffffff166040516020018083805190602001908083835b6020831061010857805182527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe090920191602091820191016100cb565b51815160209384036101000a7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0180199092169116179052920193845250604080518085038152938201905282519294508693508401905034f594935050505056fe603a600e3d39601a805130553df3363d3d373d3d3d363d30545af43d82803e903d91601857fd5bf3a26469706673582212209b0bce93afab3297b9ebf4e58fa642ef123d74bcbd3bdb4e48b662eb12b430ca64736f6c63430007060033000000000000000000000000000000000000000000000000', - gasLimit: 8000000 - }) - ) - - // Deploy mainModule - responses.push( - await signer.sendTransaction({ - to: '0x8a5bc19e22d6ad55a2c763b93a75d09f321fe764', - data: '0x9c4ae2d0000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002d8360c06040523480156200001157600080fd5b5060405162002d6338038062002d638339810160408190526200003491620000e2565b80600060405180606001604052806028815260200162002d3b60289139306001600160a01b03166040516020018083805190602001908083835b602083106200008f5780518252601f1990920191602091820191016200006e565b51815160209384036101000a60001901801990921691161790529201938452506040805180850381529382019052825192019190912060805250505060601b6001600160601b03191660a0525062000112565b600060208284031215620000f4578081fd5b81516001600160a01b03811681146200010b578182fd5b9392505050565b60805160a05160601c612bf862000143600039806106d55280611baa5250806106b15280611bdb5250612bf86000f3fe6080604052600436106101125760003560e01c80634fcf3eca116100a557806390042baf11610074578063b93ea7ad11610059578063b93ea7ad146103c5578063bc197c81146103e5578063f23a6e611461040557610119565b806390042baf1461039d578063affed0e0146103b057610119565b80634fcf3eca1461031d57806361c2926c1461033d5780637a9a16281461035d5780638c3f55631461037d57610119565b80631a9b2337116100e15780631a9b23371461029957806320c13b0b146102c6578063257671f5146102e65780632dd310001461030857610119565b806301ffc9a7146101f4578063025b22bc1461022a578063150b7a021461024c5780631626ba7e1461027957610119565b3661011957005b60006101486000357fffffffff0000000000000000000000000000000000000000000000000000000016610425565b905073ffffffffffffffffffffffffffffffffffffffff8116156101f1576000808273ffffffffffffffffffffffffffffffffffffffff166000366040518083838082843760405192019450600093509091505080830381855af49150503d80600081146101d2576040519150601f19603f3d011682016040523d82523d6000602084013e6101d7565b606091505b5091509150816101e957805160208201fd5b805160208201f35b50005b34801561020057600080fd5b5061021461020f366004612401565b61047b565b6040516102219190612633565b60405180910390f35b34801561023657600080fd5b5061024a610245366004612166565b610486565b005b34801561025857600080fd5b5061026c610267366004612237565b6105a7565b6040516102219190612660565b34801561028557600080fd5b5061026c6102943660046123b7565b6105d1565b3480156102a557600080fd5b506102b96102b4366004612401565b61064a565b6040516102219190612612565b3480156102d257600080fd5b5061026c6102e136600461244d565b610655565b3480156102f257600080fd5b506102fb6106af565b604051610221919061263e565b34801561031457600080fd5b506102b96106d3565b34801561032957600080fd5b5061024a610338366004612401565b6106f7565b34801561034957600080fd5b5061024a61035836600461231a565b6107d5565b34801561036957600080fd5b5061024a61037836600461234d565b61086e565b34801561038957600080fd5b506102fb6103983660046124e9565b6108ea565b6102b96103ab3660046124b6565b610916565b3480156103bc57600080fd5b506102fb6109ca565b3480156103d157600080fd5b5061024a6103e036600461241b565b6109db565b3480156103f157600080fd5b5061026c610400366004612180565b610ab4565b34801561041157600080fd5b5061026c6104203660046122a4565b610ae1565b60006104737fbe27a319efc8734e89e26ba4bc95f5c788584163b959f03fa04e2d7ab4b9a1207fffffffff000000000000000000000000000000000000000000000000000000008416610b0c565b90505b919050565b600061047382610b39565b3330146104de576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526027815260200180612b9c6027913960400191505060405180910390fd5b6104fd8173ffffffffffffffffffffffffffffffffffffffff16610b96565b610552576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526039815260200180612a826039913960400191505060405180910390fd5b61055b81610b9c565b6040805173ffffffffffffffffffffffffffffffffffffffff8316815290517f310ba5f1d2ed074b51e2eccd052a47ae9ab7c6b800d1fca3db3999d6a592ca039181900360200190a150565b7f150b7a020000000000000000000000000000000000000000000000000000000095945050505050565b600061061b6105df85610ba0565b84848080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250610c0092505050565b1561064357507f1626ba7e000000000000000000000000000000000000000000000000000000005b9392505050565b600061047382610425565b600061067f6105df86866040518083838082843760405192018290039091209350610ba092505050565b156106a757507f20c13b0b000000000000000000000000000000000000000000000000000000005b949350505050565b7f000000000000000000000000000000000000000000000000000000000000000081565b7f000000000000000000000000000000000000000000000000000000000000000081565b33301461074f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526027815260200180612b9c6027913960400191505060405180910390fd5b600061075a82610425565b73ffffffffffffffffffffffffffffffffffffffff1614156107c7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602b8152602001806128e0602b913960400191505060405180910390fd5b6107d2816000610df8565b50565b33301461082d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526027815260200180612b9c6027913960400191505060405180910390fd5b600061085e82604051602001610843919061277e565b60405160208183030381529060405280519060200120610ba0565b905061086a8183610e5b565b5050565b6108778261102a565b600061088f83856040516020016108439291906127c5565b905061089b8183610c00565b6108da576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016108d190612721565b60405180910390fd5b6108e48185610e5b565b50505050565b60006104737f8d0bf1fd623d628c741362c1289948e57b3e2905218c676d3e69abee36d6ae2e83610b0c565b6000333014610970576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526027815260200180612b9c6027913960400191505060405180910390fd5b81516020830134f06040805173ffffffffffffffffffffffffffffffffffffffff8316815290519192507fa506ad4e7f05eceba62a023c3219e5bd98a615f4fa87e2afb08a2da5cf62bf0c919081900360200190a1919050565b60006109d660006108ea565b905090565b333014610a33576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526027815260200180612b9c6027913960400191505060405180910390fd5b6000610a3e83610425565b73ffffffffffffffffffffffffffffffffffffffff1614610aaa576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602c8152602001806129f4602c913960400191505060405180910390fd5b61086a8282610df8565b7fbc197c810000000000000000000000000000000000000000000000000000000098975050505050505050565b7ff23a6e61000000000000000000000000000000000000000000000000000000009695505050505050565b60408051602080820194909452808201929092528051808303820181526060909201905280519101205490565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f90042baf000000000000000000000000000000000000000000000000000000001415610b8d57506001610476565b610473826110ce565b3b151590565b3055565b604080517f19010000000000000000000000000000000000000000000000000000000000006020808301919091524660228301523060601b6042830152605680830194909452825180830390940184526076909101909152815191012090565b6000806000610c0e8461120f565b909250905061ffff821660005b8551831015610dd55760008080610c32898761127d565b975060ff91821694501691506001831415610c5a57610c5189876112fe565b96509050610d7e565b82610c86576060610c6b8a88611376565b97509050610c798b82611427565b9150828501945050610d7e565b6002831415610d2d57610c9989876112fe565b965090506000610ca98a886117b1565b975061ffff1690506060610cbe8b8984611822565b98509050610ccd8c8483611911565b610d22576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260328152602001806129c26032913960400191505060405180910390fd5b505092810192610d7e565b6040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602c8152602001806128b4602c913960400191505060405180910390fd5b848282604051602001808481526020018381526020018273ffffffffffffffffffffffffffffffffffffffff1681526020019350505050604051602081830303815290604052805190602001209450505050610c1b565b8361ffff168110158015610ded5750610ded82611b59565b979650505050505050565b61086a7fbe27a319efc8734e89e26ba4bc95f5c788584163b959f03fa04e2d7ab4b9a1207fffffffff00000000000000000000000000000000000000000000000000000000841673ffffffffffffffffffffffffffffffffffffffff8416611c37565b60005b8151811015611025576000828281518110610e7557fe5b602002602001015190506000606082604001515a1015610ec1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016108d1906126c4565b825115610f5957826060015173ffffffffffffffffffffffffffffffffffffffff168360400151600014610ef9578360400151610efb565b5a5b8460a00151604051610f0d91906125f6565b6000604051808303818686f4925050503d8060008114610f49576040519150601f19603f3d011682016040523d82523d6000602084013e610f4e565b606091505b509092509050610fee565b826060015173ffffffffffffffffffffffffffffffffffffffff1683608001518460400151600014610f8f578460400151610f91565b5a5b908560a00151604051610fa491906125f6565b600060405180830381858888f193505050503d8060008114610fe2576040519150601f19603f3d011682016040523d82523d6000602084013e610fe7565b606091505b5090925090505b811561100f5785604051611002919061263e565b60405180910390a061101a565b61101a838783611c65565b505050600101610e5e565b505050565b60008061103683611cb5565b915091506000611045836108ea565b9050808214611080576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016108d19061268d565b6001820161108e8482611cce565b7f1f180c27086c7a39ea2a7b25239d1ab92348f07ca7bb59d1438fcf527568f88184826040516110bf9291906127de565b60405180910390a15050505050565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167fec6aba5000000000000000000000000000000000000000000000000000000000148061116157507fffffffff0000000000000000000000000000000000000000000000000000000082167f4e2312e000000000000000000000000000000000000000000000000000000000145b806111ad57507fffffffff0000000000000000000000000000000000000000000000000000000082167f150b7a0200000000000000000000000000000000000000000000000000000000145b806111f957507fffffffff0000000000000000000000000000000000000000000000000000000082167fc0ee0b8a00000000000000000000000000000000000000000000000000000000145b1561120657506001610476565b61047382611cf9565b6020810151815160f09190911c90600290811115611278576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602781526020018061292e6027913960400191505060405180910390fd5b915091565b8082016020015160f881901c9060f01c60ff166002830183811161129d57fe5b84518111156112f7576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526026815260200180612af76026913960400191505060405180910390fd5b9250925092565b8082016020015160601c6014820182811161131557fe5b835181111561136f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602381526020018061290b6023913960400191505060405180910390fd5b9250929050565b6040805160428082526080820190925260609160009190602082018180368337019050509150828401602001805160208401526020810151604084015260228101516042840152506042830190508281116113cd57fe5b835181111561136f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526023815260200180612a5f6023913960400191505060405180910390fd5b60008151604214611483576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252603a81526020018061287a603a913960400191505060405180910390fd5b60008260018451038151811061149557fe5b602001015160f81c60f81b60f81c60ff1690506000836040815181106114b757fe5b016020015160f81c905060006114cd8582611d56565b905060006114dc866020611d56565b90507f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0811115611557576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252603d81526020018061283d603d913960400191505060405180910390fd5b8260ff16601b1415801561156f57508260ff16601c14155b156115c5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252603d815260200180612955603d913960400191505060405180910390fd5b60018414156116395760018784848460405160008152602001604052604051808581526020018460ff1681526020018381526020018281526020019450505050506020604051602081039080840390855afa158015611628573d6000803e3d6000fd5b50505060206040510351945061173b565b60028414156116ea5760018760405160200180807f19457468657265756d205369676e6564204d6573736167653a0a333200000000815250601c018281526020019150506040516020818303038152906040528051906020012084848460405160008152602001604052604051808581526020018460ff1681526020018381526020018281526020019450505050506020604051602081039080840390855afa158015611628573d6000803e3d6000fd5b6040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252603c815260200180612abb603c913960400191505060405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff85166117a7576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260308152602001806129926030913960400191505060405180910390fd5b5050505092915050565b8082016020015160f01c600282018281116117c857fe5b835181111561136f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526022815260200180612b3e6022913960400191505060405180910390fd5b606060008267ffffffffffffffff8111801561183d57600080fd5b506040519080825280601f01601f191660200182016040528015611868576020820181803683370190505b509150838501602001600060205b8581101561188f57908201518482015260208101611876565b84860160200180519390920151908501525250828201838110156118af57fe5b8451811115611909576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526021815260200180612b1d6021913960400191505060405180910390fd5b935093915050565b6000808260018451038151811061192457fe5b016020015160f81c9050600181148061193d5750600281145b15611981578373ffffffffffffffffffffffffffffffffffffffff166119638685611427565b73ffffffffffffffffffffffffffffffffffffffff16149150611b51565b6003811415611b005782517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff81018452604080517f1626ba7e000000000000000000000000000000000000000000000000000000008152600481018881526024820192835286516044830152865173ffffffffffffffffffffffffffffffffffffffff891693631626ba7e938b938a9390929160640190602085019080838360005b83811015611a3b578181015183820152602001611a23565b50505050905090810190601f168015611a685780820380516001836020036101000a031916815260200191505b50935050505060206040518083038186803b158015611a8657600080fd5b505afa158015611a9a573d6000803e3d6000fd5b505050506040513d6020811015611ab057600080fd5b50519084527fffffffff00000000000000000000000000000000000000000000000000000000167f1626ba7e00000000000000000000000000000000000000000000000000000000149150611b51565b6040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252603f815260200180612a20603f913960400191505060405180910390fd5b509392505050565b604080517fff000000000000000000000000000000000000000000000000000000000000006020808301919091527fffffffffffffffffffffffffffffffffffffffff0000000000000000000000007f000000000000000000000000000000000000000000000000000000000000000060601b166021830152603582018490527f0000000000000000000000000000000000000000000000000000000000000000605580840191909152835180840390910181526075909201909252805191012073ffffffffffffffffffffffffffffffffffffffff163014919050565b6040805160208082019590955280820193909352805180840382018152606090930190528151919092012055565b826020015115611c7757805160208201fd5b7f3dbd1590ea96dd3253a91f24e64e3a502e1225d602a5731357bc12643070ccd78282604051611ca8929190612647565b60405180910390a1505050565b606081901c916bffffffffffffffffffffffff90911690565b61086a7f8d0bf1fd623d628c741362c1289948e57b3e2905218c676d3e69abee36d6ae2e8383611c37565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f025b22bc000000000000000000000000000000000000000000000000000000001415611d4d57506001610476565b61047382611dbe565b60008160200183511015611db5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252603c815260200180612b60603c913960400191505060405180910390fd5b50016020015190565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f389901c7000000000000000000000000000000000000000000000000000000001415611e1257506001610476565b6104738260007fffffffff0000000000000000000000000000000000000000000000000000000082161580611e8857507fffffffff0000000000000000000000000000000000000000000000000000000082167f36e7817500000000000000000000000000000000000000000000000000000000145b15611e9557506001610476565b7f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff00000000000000000000000000000000000000000000000000000000831614610473565b803573ffffffffffffffffffffffffffffffffffffffff8116811461047657600080fd5b600082601f830112611f13578081fd5b8135602067ffffffffffffffff80831115611f2a57fe5b611f3782838502016127ec565b83815282810190868401865b86811015612013578135890160c0807fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0838e03011215611f8157898afd5b604080518281018181108a82111715611f9657fe5b8252611fa3848b01612063565b8152611fb0828501612063565b8a8201526060808501358383015260809250611fcd838601611edf565b9082015260a08481013583830152928401359289841115611fec578c8dfd5b611ffa8f8c868801016120e3565b9082015287525050509285019290850190600101611f43565b509098975050505050505050565b60008083601f840112612032578182fd5b50813567ffffffffffffffff811115612049578182fd5b602083019150836020808302850101111561136f57600080fd5b8035801515811461047657600080fd5b80357fffffffff000000000000000000000000000000000000000000000000000000008116811461047657600080fd5b60008083601f8401126120b4578182fd5b50813567ffffffffffffffff8111156120cb578182fd5b60208301915083602082850101111561136f57600080fd5b600082601f8301126120f3578081fd5b813567ffffffffffffffff81111561210757fe5b61213860207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f840116016127ec565b81815284602083860101111561214c578283fd5b816020850160208301379081016020019190915292915050565b600060208284031215612177578081fd5b61064382611edf565b60008060008060008060008060a0898b03121561219b578384fd5b6121a489611edf565b97506121b260208a01611edf565b9650604089013567ffffffffffffffff808211156121ce578586fd5b6121da8c838d01612021565b909850965060608b01359150808211156121f2578586fd5b6121fe8c838d01612021565b909650945060808b0135915080821115612216578384fd5b506122238b828c016120a3565b999c989b5096995094979396929594505050565b60008060008060006080868803121561224e578081fd5b61225786611edf565b945061226560208701611edf565b935060408601359250606086013567ffffffffffffffff811115612287578182fd5b612293888289016120a3565b969995985093965092949392505050565b60008060008060008060a087890312156122bc578182fd5b6122c587611edf565b95506122d360208801611edf565b94506040870135935060608701359250608087013567ffffffffffffffff8111156122fc578283fd5b61230889828a016120a3565b979a9699509497509295939492505050565b60006020828403121561232b578081fd5b813567ffffffffffffffff811115612341578182fd5b6106a784828501611f03565b600080600060608486031215612361578283fd5b833567ffffffffffffffff80821115612378578485fd5b61238487838801611f03565b94506020860135935060408601359150808211156123a0578283fd5b506123ad868287016120e3565b9150509250925092565b6000806000604084860312156123cb578283fd5b83359250602084013567ffffffffffffffff8111156123e8578283fd5b6123f4868287016120a3565b9497909650939450505050565b600060208284031215612412578081fd5b61064382612073565b6000806040838503121561242d578182fd5b61243683612073565b915061244460208401611edf565b90509250929050565b60008060008060408587031215612462578182fd5b843567ffffffffffffffff80821115612479578384fd5b612485888389016120a3565b9096509450602087013591508082111561249d578384fd5b506124aa878288016120a3565b95989497509550505050565b6000602082840312156124c7578081fd5b813567ffffffffffffffff8111156124dd578182fd5b6106a7848285016120e3565b6000602082840312156124fa578081fd5b5035919050565b6000815180845260208085018081965082840281019150828601855b8581101561259f5782840389528151805115158552858101511515868601526040808201519086015260608082015173ffffffffffffffffffffffffffffffffffffffff16908601526080808201519086015260a09081015160c09186018290529061258b818701836125ac565b9a87019a955050509084019060010161251d565b5091979650505050505050565b600081518084526125c4816020860160208601612810565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b60008251612608818460208701612810565b9190910192915050565b73ffffffffffffffffffffffffffffffffffffffff91909116815260200190565b901515815260200190565b90815260200190565b6000838252604060208301526106a760408301846125ac565b7fffffffff0000000000000000000000000000000000000000000000000000000091909116815260200190565b6020808252601f908201527f4d61696e4d6f64756c65235f617574683a20494e56414c49445f4e4f4e434500604082015260600190565b60208082526024908201527f4d6f64756c6543616c6c73235f657865637574653a204e4f545f454e4f55474860408201527f5f47415300000000000000000000000000000000000000000000000000000000606082015260800190565b60208082526026908201527f4d6f64756c6543616c6c7323657865637574653a20494e56414c49445f53494760408201527f4e41545552450000000000000000000000000000000000000000000000000000606082015260800190565b600060408252600560408301527f73656c663a0000000000000000000000000000000000000000000000000000006060830152608060208301526106436080830184612501565b6000838252604060208301526106a76040830184612501565b918252602082015260400190565b60405181810167ffffffffffffffff8111828210171561280857fe5b604052919050565b60005b8381101561282b578181015183820152602001612813565b838111156108e4575050600091015256fe5369676e617475726556616c696461746f72237265636f7665725369676e65723a20696e76616c6964207369676e6174757265202773272076616c75655369676e617475726556616c696461746f72237265636f7665725369676e65723a20696e76616c6964207369676e6174757265206c656e6774684d6f64756c6541757468235f7369676e617475726556616c69646174696f6e20494e56414c49445f464c41474d6f64756c65486f6f6b732372656d6f7665486f6f6b3a20484f4f4b5f4e4f545f524547495354455245444c696242797465732372656164416464726573733a204f55545f4f465f424f554e44534c696242797465732372656164466972737455696e7431363a204f55545f4f465f424f554e44535369676e617475726556616c696461746f72237265636f7665725369676e65723a20696e76616c6964207369676e6174757265202776272076616c75655369676e617475726556616c696461746f72237265636f7665725369676e65723a20494e56414c49445f5349474e45524d6f64756c6541757468235f7369676e617475726556616c69646174696f6e3a20494e56414c49445f5349474e41545552454d6f64756c65486f6f6b7323616464486f6f6b3a20484f4f4b5f414c52454144595f524547495354455245445369676e617475726556616c696461746f7223697356616c69645369676e61747572653a20554e535550504f525445445f5349474e41545552455f545950454c696242797465732372656164427974657336363a204f55545f4f465f424f554e44534d6f64756c6555706461746523757064617465496d706c656d656e746174696f6e3a20494e56414c49445f494d504c454d454e544154494f4e5369676e617475726556616c696461746f72237265636f7665725369676e65723a20554e535550504f525445445f5349474e41545552455f545950454c69624279746573237265616455696e743855696e74383a204f55545f4f465f424f554e44534c69624279746573237265616442797465733a204f55545f4f465f424f554e44534c69624279746573237265616455696e7431363a204f55545f4f465f424f554e44534c696242797465732372656164427974657333323a20475245415445525f4f525f455155414c5f544f5f33325f4c454e4754485f52455155495245444d6f64756c6553656c6641757468236f6e6c7953656c663a204e4f545f415554484f52495a4544a2646970667358221220b34deca9dd75815e4ef8a9279e45750ec5554b22c673e160bdba849d80f5888564736f6c63430007060033603a600e3d39601a805130553df3363d3d373d3d3d363d30545af43d82803e903d91601857fd5bf3000000000000000000000000f9d09d634fb818b05149329c1dccfaea53639d960000000000000000000000000000000000000000000000000000000000', - gasLimit: 8000000 - }) - ) - - // Deploy mainModuleUpgradable - responses.push( - await signer.sendTransaction({ - to: '0x8A5Bc19e22D6aD55a2c763B93A75d09F321fe764', - data: '0x9c4ae2d0000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002d07608060405234801561001057600080fd5b50612ce7806100206000396000f3fe6080604052600436106101125760003560e01c806351605d80116100a557806390042baf11610074578063b93ea7ad11610059578063b93ea7ad146103d0578063bc197c81146103f0578063f23a6e611461041057610119565b806390042baf146103a8578063affed0e0146103bb57610119565b806351605d801461032657806361c2926c146103485780637a9a1628146103685780638c3f55631461038857610119565b80631a9b2337116100e15780631a9b23371461029957806320c13b0b146102c657806329561426146102e65780634fcf3eca1461030657610119565b806301ffc9a7146101f4578063025b22bc1461022a578063150b7a021461024c5780631626ba7e1461027957610119565b3661011957005b60006101486000357fffffffff0000000000000000000000000000000000000000000000000000000016610430565b905073ffffffffffffffffffffffffffffffffffffffff8116156101f1576000808273ffffffffffffffffffffffffffffffffffffffff166000366040518083838082843760405192019450600093509091505080830381855af49150503d80600081146101d2576040519150601f19603f3d011682016040523d82523d6000602084013e6101d7565b606091505b5091509150816101e957805160208201fd5b805160208201f35b50005b34801561020057600080fd5b5061021461020f3660046124d4565b610486565b60405161022191906126eb565b60405180910390f35b34801561023657600080fd5b5061024a610245366004612221565b610491565b005b34801561025857600080fd5b5061026c6102673660046122f2565b6105b2565b6040516102219190612718565b34801561028557600080fd5b5061026c61029436600461248a565b6105dc565b3480156102a557600080fd5b506102b96102b43660046124d4565b610655565b60405161022191906126ca565b3480156102d257600080fd5b5061026c6102e1366004612520565b610660565b3480156102f257600080fd5b5061024a610301366004612472565b6106ba565b34801561031257600080fd5b5061024a6103213660046124d4565b6107c8565b34801561033257600080fd5b5061033b6108a6565b60405161022191906126f6565b34801561035457600080fd5b5061024a6103633660046123d5565b6108d6565b34801561037457600080fd5b5061024a610383366004612408565b61096f565b34801561039457600080fd5b5061033b6103a3366004612472565b6109eb565b6102b96103b6366004612589565b610a17565b3480156103c757600080fd5b5061033b610acb565b3480156103dc57600080fd5b5061024a6103eb3660046124ee565b610ad7565b3480156103fc57600080fd5b5061026c61040b36600461223b565b610bb0565b34801561041c57600080fd5b5061026c61042b36600461235f565b610bdd565b600061047e7fbe27a319efc8734e89e26ba4bc95f5c788584163b959f03fa04e2d7ab4b9a1207fffffffff000000000000000000000000000000000000000000000000000000008416610c08565b90505b919050565b600061047e82610c35565b3330146104e9576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526027815260200180612c8b6027913960400191505060405180910390fd5b6105088173ffffffffffffffffffffffffffffffffffffffff16610c92565b61055d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526039815260200180612b716039913960400191505060405180910390fd5b61056681610c98565b6040805173ffffffffffffffffffffffffffffffffffffffff8316815290517f310ba5f1d2ed074b51e2eccd052a47ae9ab7c6b800d1fca3db3999d6a592ca039181900360200190a150565b7f150b7a020000000000000000000000000000000000000000000000000000000095945050505050565b60006106266105ea85610c9c565b84848080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250610cfc92505050565b1561064e57507f1626ba7e000000000000000000000000000000000000000000000000000000005b9392505050565b600061047e82610430565b600061068a6105ea86866040518083838082843760405192018290039091209350610c9c92505050565b156106b257507f20c13b0b000000000000000000000000000000000000000000000000000000005b949350505050565b333014610712576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526027815260200180612c8b6027913960400191505060405180910390fd5b80610768576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260378152602001806129986037913960400191505060405180910390fd5b6107927fea7157fa25e3aa17d0ae2d5280fa4e24d421c61842aa85e45194e1145aa72bf882610ef4565b6040805182815290517f307ed6bd941ee9fc80f369c94af5fa11e25bab5102a6140191756c5474a30bfa9181900360200190a150565b333014610820576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526027815260200180612c8b6027913960400191505060405180910390fd5b600061082b82610430565b73ffffffffffffffffffffffffffffffffffffffff161415610898576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602b8152602001806129cf602b913960400191505060405180910390fd5b6108a3816000610ef8565b50565b60006108d17fea7157fa25e3aa17d0ae2d5280fa4e24d421c61842aa85e45194e1145aa72bf8610f5b565b905090565b33301461092e576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526027815260200180612c8b6027913960400191505060405180910390fd5b600061095f826040516020016109449190612836565b60405160208183030381529060405280519060200120610c9c565b905061096b8183610f5f565b5050565b6109788261112e565b6000610990838560405160200161094492919061287d565b905061099c8183610cfc565b6109db576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016109d2906127d9565b60405180910390fd5b6109e58185610f5f565b50505050565b600061047e7f8d0bf1fd623d628c741362c1289948e57b3e2905218c676d3e69abee36d6ae2e83610c08565b6000333014610a71576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526027815260200180612c8b6027913960400191505060405180910390fd5b81516020830134f06040805173ffffffffffffffffffffffffffffffffffffffff8316815290519192507fa506ad4e7f05eceba62a023c3219e5bd98a615f4fa87e2afb08a2da5cf62bf0c919081900360200190a1919050565b60006108d160006109eb565b333014610b2f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526027815260200180612c8b6027913960400191505060405180910390fd5b6000610b3a83610430565b73ffffffffffffffffffffffffffffffffffffffff1614610ba6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602c815260200180612ae3602c913960400191505060405180910390fd5b61096b8282610ef8565b7fbc197c810000000000000000000000000000000000000000000000000000000098975050505050505050565b7ff23a6e61000000000000000000000000000000000000000000000000000000009695505050505050565b60408051602080820194909452808201929092528051808303820181526060909201905280519101205490565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f90042baf000000000000000000000000000000000000000000000000000000001415610c8957506001610481565b61047e826111d2565b3b151590565b3055565b604080517f19010000000000000000000000000000000000000000000000000000000000006020808301919091524660228301523060601b6042830152605680830194909452825180830390940184526076909101909152815191012090565b6000806000610d0a84611313565b909250905061ffff821660005b8551831015610ed15760008080610d2e8987611381565b975060ff91821694501691506001831415610d5657610d4d8987611402565b96509050610e7a565b82610d82576060610d678a8861147a565b97509050610d758b8261152b565b9150828501945050610e7a565b6002831415610e2957610d958987611402565b965090506000610da58a886118b5565b975061ffff1690506060610dba8b8984611926565b98509050610dc98c8483611a15565b610e1e576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526032815260200180612ab16032913960400191505060405180910390fd5b505092810192610e7a565b6040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602c81526020018061296c602c913960400191505060405180910390fd5b848282604051602001808481526020018381526020018273ffffffffffffffffffffffffffffffffffffffff1681526020019350505050604051602081830303815290604052805190602001209450505050610d17565b8361ffff168110158015610ee95750610ee982611c5d565b979650505050505050565b9055565b61096b7fbe27a319efc8734e89e26ba4bc95f5c788584163b959f03fa04e2d7ab4b9a1207fffffffff00000000000000000000000000000000000000000000000000000000841673ffffffffffffffffffffffffffffffffffffffff8416611c9a565b5490565b60005b8151811015611129576000828281518110610f7957fe5b602002602001015190506000606082604001515a1015610fc5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016109d29061277c565b82511561105d57826060015173ffffffffffffffffffffffffffffffffffffffff168360400151600014610ffd578360400151610fff565b5a5b8460a0015160405161101191906126ae565b6000604051808303818686f4925050503d806000811461104d576040519150601f19603f3d011682016040523d82523d6000602084013e611052565b606091505b5090925090506110f2565b826060015173ffffffffffffffffffffffffffffffffffffffff1683608001518460400151600014611093578460400151611095565b5a5b908560a001516040516110a891906126ae565b600060405180830381858888f193505050503d80600081146110e6576040519150601f19603f3d011682016040523d82523d6000602084013e6110eb565b606091505b5090925090505b8115611113578560405161110691906126f6565b60405180910390a061111e565b61111e838783611cc8565b505050600101610f62565b505050565b60008061113a83611d18565b915091506000611149836109eb565b9050808214611184576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016109d290612745565b600182016111928482611d31565b7f1f180c27086c7a39ea2a7b25239d1ab92348f07ca7bb59d1438fcf527568f88184826040516111c3929190612896565b60405180910390a15050505050565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167fec6aba5000000000000000000000000000000000000000000000000000000000148061126557507fffffffff0000000000000000000000000000000000000000000000000000000082167f4e2312e000000000000000000000000000000000000000000000000000000000145b806112b157507fffffffff0000000000000000000000000000000000000000000000000000000082167f150b7a0200000000000000000000000000000000000000000000000000000000145b806112fd57507fffffffff0000000000000000000000000000000000000000000000000000000082167fc0ee0b8a00000000000000000000000000000000000000000000000000000000145b1561130a57506001610481565b61047e82611d5c565b6020810151815160f09190911c9060029081111561137c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526027815260200180612a1d6027913960400191505060405180910390fd5b915091565b8082016020015160f881901c9060f01c60ff16600283018381116113a157fe5b84518111156113fb576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526026815260200180612be66026913960400191505060405180910390fd5b9250925092565b8082016020015160601c6014820182811161141957fe5b8351811115611473576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260238152602001806129fa6023913960400191505060405180910390fd5b9250929050565b6040805160428082526080820190925260609160009190602082018180368337019050509150828401602001805160208401526020810151604084015260228101516042840152506042830190508281116114d157fe5b8351811115611473576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526023815260200180612b4e6023913960400191505060405180910390fd5b60008151604214611587576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252603a815260200180612932603a913960400191505060405180910390fd5b60008260018451038151811061159957fe5b602001015160f81c60f81b60f81c60ff1690506000836040815181106115bb57fe5b016020015160f81c905060006115d18582611db9565b905060006115e0866020611db9565b90507f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a081111561165b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252603d8152602001806128f5603d913960400191505060405180910390fd5b8260ff16601b1415801561167357508260ff16601c14155b156116c9576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252603d815260200180612a44603d913960400191505060405180910390fd5b600184141561173d5760018784848460405160008152602001604052604051808581526020018460ff1681526020018381526020018281526020019450505050506020604051602081039080840390855afa15801561172c573d6000803e3d6000fd5b50505060206040510351945061183f565b60028414156117ee5760018760405160200180807f19457468657265756d205369676e6564204d6573736167653a0a333200000000815250601c018281526020019150506040516020818303038152906040528051906020012084848460405160008152602001604052604051808581526020018460ff1681526020018381526020018281526020019450505050506020604051602081039080840390855afa15801561172c573d6000803e3d6000fd5b6040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252603c815260200180612baa603c913960400191505060405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff85166118ab576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526030815260200180612a816030913960400191505060405180910390fd5b5050505092915050565b8082016020015160f01c600282018281116118cc57fe5b8351811115611473576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526022815260200180612c2d6022913960400191505060405180910390fd5b606060008267ffffffffffffffff8111801561194157600080fd5b506040519080825280601f01601f19166020018201604052801561196c576020820181803683370190505b509150838501602001600060205b858110156119935790820151848201526020810161197a565b84860160200180519390920151908501525250828201838110156119b357fe5b8451811115611a0d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526021815260200180612c0c6021913960400191505060405180910390fd5b935093915050565b60008082600184510381518110611a2857fe5b016020015160f81c90506001811480611a415750600281145b15611a85578373ffffffffffffffffffffffffffffffffffffffff16611a67868561152b565b73ffffffffffffffffffffffffffffffffffffffff16149150611c55565b6003811415611c045782517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff81018452604080517f1626ba7e000000000000000000000000000000000000000000000000000000008152600481018881526024820192835286516044830152865173ffffffffffffffffffffffffffffffffffffffff891693631626ba7e938b938a9390929160640190602085019080838360005b83811015611b3f578181015183820152602001611b27565b50505050905090810190601f168015611b6c5780820380516001836020036101000a031916815260200191505b50935050505060206040518083038186803b158015611b8a57600080fd5b505afa158015611b9e573d6000803e3d6000fd5b505050506040513d6020811015611bb457600080fd5b50519084527fffffffff00000000000000000000000000000000000000000000000000000000167f1626ba7e00000000000000000000000000000000000000000000000000000000149150611c55565b6040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252603f815260200180612b0f603f913960400191505060405180910390fd5b509392505050565b6000811580159061047e5750611c927fea7157fa25e3aa17d0ae2d5280fa4e24d421c61842aa85e45194e1145aa72bf8610f5b565b909114919050565b6040805160208082019590955280820193909352805180840382018152606090930190528151919092012055565b826020015115611cda57805160208201fd5b7f3dbd1590ea96dd3253a91f24e64e3a502e1225d602a5731357bc12643070ccd78282604051611d0b9291906126ff565b60405180910390a1505050565b606081901c916bffffffffffffffffffffffff90911690565b61096b7f8d0bf1fd623d628c741362c1289948e57b3e2905218c676d3e69abee36d6ae2e8383611c9a565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f025b22bc000000000000000000000000000000000000000000000000000000001415611db057506001610481565b61047e82611e21565b60008160200183511015611e18576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252603c815260200180612c4f603c913960400191505060405180910390fd5b50016020015190565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f389901c7000000000000000000000000000000000000000000000000000000001415611e7557506001610481565b61047e8260007fffffffff0000000000000000000000000000000000000000000000000000000082167f783649a6000000000000000000000000000000000000000000000000000000001415611ecd57506001610481565b61047e8260007fffffffff0000000000000000000000000000000000000000000000000000000082161580611f4357507fffffffff0000000000000000000000000000000000000000000000000000000082167f36e7817500000000000000000000000000000000000000000000000000000000145b15611f5057506001610481565b7f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff0000000000000000000000000000000000000000000000000000000083161461047e565b803573ffffffffffffffffffffffffffffffffffffffff8116811461048157600080fd5b600082601f830112611fce578081fd5b8135602067ffffffffffffffff80831115611fe557fe5b611ff282838502016128a4565b83815282810190868401865b868110156120ce578135890160c0807fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0838e0301121561203c57898afd5b604080518281018181108a8211171561205157fe5b825261205e848b0161211e565b815261206b82850161211e565b8a8201526060808501358383015260809250612088838601611f9a565b9082015260a084810135838301529284013592898411156120a7578c8dfd5b6120b58f8c8688010161219e565b9082015287525050509285019290850190600101611ffe565b509098975050505050505050565b60008083601f8401126120ed578182fd5b50813567ffffffffffffffff811115612104578182fd5b602083019150836020808302850101111561147357600080fd5b8035801515811461048157600080fd5b80357fffffffff000000000000000000000000000000000000000000000000000000008116811461048157600080fd5b60008083601f84011261216f578182fd5b50813567ffffffffffffffff811115612186578182fd5b60208301915083602082850101111561147357600080fd5b600082601f8301126121ae578081fd5b813567ffffffffffffffff8111156121c257fe5b6121f360207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f840116016128a4565b818152846020838601011115612207578283fd5b816020850160208301379081016020019190915292915050565b600060208284031215612232578081fd5b61064e82611f9a565b60008060008060008060008060a0898b031215612256578384fd5b61225f89611f9a565b975061226d60208a01611f9a565b9650604089013567ffffffffffffffff80821115612289578586fd5b6122958c838d016120dc565b909850965060608b01359150808211156122ad578586fd5b6122b98c838d016120dc565b909650945060808b01359150808211156122d1578384fd5b506122de8b828c0161215e565b999c989b5096995094979396929594505050565b600080600080600060808688031215612309578081fd5b61231286611f9a565b945061232060208701611f9a565b935060408601359250606086013567ffffffffffffffff811115612342578182fd5b61234e8882890161215e565b969995985093965092949392505050565b60008060008060008060a08789031215612377578182fd5b61238087611f9a565b955061238e60208801611f9a565b94506040870135935060608701359250608087013567ffffffffffffffff8111156123b7578283fd5b6123c389828a0161215e565b979a9699509497509295939492505050565b6000602082840312156123e6578081fd5b813567ffffffffffffffff8111156123fc578182fd5b6106b284828501611fbe565b60008060006060848603121561241c578283fd5b833567ffffffffffffffff80821115612433578485fd5b61243f87838801611fbe565b945060208601359350604086013591508082111561245b578283fd5b506124688682870161219e565b9150509250925092565b600060208284031215612483578081fd5b5035919050565b60008060006040848603121561249e578283fd5b83359250602084013567ffffffffffffffff8111156124bb578283fd5b6124c78682870161215e565b9497909650939450505050565b6000602082840312156124e5578081fd5b61064e8261212e565b60008060408385031215612500578182fd5b6125098361212e565b915061251760208401611f9a565b90509250929050565b60008060008060408587031215612535578182fd5b843567ffffffffffffffff8082111561254c578384fd5b6125588883890161215e565b90965094506020870135915080821115612570578384fd5b5061257d8782880161215e565b95989497509550505050565b60006020828403121561259a578081fd5b813567ffffffffffffffff8111156125b0578182fd5b6106b28482850161219e565b6000815180845260208085019450848183028601828601855b858110156126575783830389528151805115158452858101511515868501526040808201519085015260608082015173ffffffffffffffffffffffffffffffffffffffff16908501526080808201519085015260a09081015160c09185018290529061264381860183612664565b9a87019a94505050908401906001016125d5565b5090979650505050505050565b6000815180845261267c8160208601602086016128c8565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b600082516126c08184602087016128c8565b9190910192915050565b73ffffffffffffffffffffffffffffffffffffffff91909116815260200190565b901515815260200190565b90815260200190565b6000838252604060208301526106b26040830184612664565b7fffffffff0000000000000000000000000000000000000000000000000000000091909116815260200190565b6020808252601f908201527f4d61696e4d6f64756c65235f617574683a20494e56414c49445f4e4f4e434500604082015260600190565b60208082526024908201527f4d6f64756c6543616c6c73235f657865637574653a204e4f545f454e4f55474860408201527f5f47415300000000000000000000000000000000000000000000000000000000606082015260800190565b60208082526026908201527f4d6f64756c6543616c6c7323657865637574653a20494e56414c49445f53494760408201527f4e41545552450000000000000000000000000000000000000000000000000000606082015260800190565b600060408252600560408301527f73656c663a00000000000000000000000000000000000000000000000000000060608301526080602083015261064e60808301846125bc565b6000838252604060208301526106b260408301846125bc565b918252602082015260400190565b60405181810167ffffffffffffffff811182821017156128c057fe5b604052919050565b60005b838110156128e35781810151838201526020016128cb565b838111156109e5575050600091015256fe5369676e617475726556616c696461746f72237265636f7665725369676e65723a20696e76616c6964207369676e6174757265202773272076616c75655369676e617475726556616c696461746f72237265636f7665725369676e65723a20696e76616c6964207369676e6174757265206c656e6774684d6f64756c6541757468235f7369676e617475726556616c69646174696f6e20494e56414c49445f464c41474d6f64756c654175746855706772616461626c6523757064617465496d6167654861736820494e56414c49445f494d4147455f484153484d6f64756c65486f6f6b732372656d6f7665486f6f6b3a20484f4f4b5f4e4f545f524547495354455245444c696242797465732372656164416464726573733a204f55545f4f465f424f554e44534c696242797465732372656164466972737455696e7431363a204f55545f4f465f424f554e44535369676e617475726556616c696461746f72237265636f7665725369676e65723a20696e76616c6964207369676e6174757265202776272076616c75655369676e617475726556616c696461746f72237265636f7665725369676e65723a20494e56414c49445f5349474e45524d6f64756c6541757468235f7369676e617475726556616c69646174696f6e3a20494e56414c49445f5349474e41545552454d6f64756c65486f6f6b7323616464486f6f6b3a20484f4f4b5f414c52454144595f524547495354455245445369676e617475726556616c696461746f7223697356616c69645369676e61747572653a20554e535550504f525445445f5349474e41545552455f545950454c696242797465732372656164427974657336363a204f55545f4f465f424f554e44534d6f64756c6555706461746523757064617465496d706c656d656e746174696f6e3a20494e56414c49445f494d504c454d454e544154494f4e5369676e617475726556616c696461746f72237265636f7665725369676e65723a20554e535550504f525445445f5349474e41545552455f545950454c69624279746573237265616455696e743855696e74383a204f55545f4f465f424f554e44534c69624279746573237265616442797465733a204f55545f4f465f424f554e44534c69624279746573237265616455696e7431363a204f55545f4f465f424f554e44534c696242797465732372656164427974657333323a20475245415445525f4f525f455155414c5f544f5f33325f4c454e4754485f52455155495245444d6f64756c6553656c6641757468236f6e6c7953656c663a204e4f545f415554484f52495a4544a2646970667358221220aebb8d931ef86555b6441c416b208bb9fe8fe0974c5733ebbccce548296c37ce64736f6c6343000706003300000000000000000000000000000000000000000000000000', - gasLimit: 8000000 - }) - ) - - // Deploy guestModule - responses.push( - await signer.sendTransaction({ - to: '0x8A5Bc19e22D6aD55a2c763B93A75d09F321fe764', - data: '0x9c4ae2d0000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001dfc608060405234801561001057600080fd5b50611ddc806100206000396000f3fe60806040526004361061007b5760003560e01c80637a9a16281161004e5780637a9a1628146101255780638c3f55631461014557806390042baf14610172578063affed0e0146101925761007b565b806301ffc9a7146100805780631626ba7e146100b657806320c13b0b146100e357806361c2926c14610103575b600080fd5b34801561008c57600080fd5b506100a061009b366004611677565b6101a7565b6040516100ad91906118be565b60405180910390f35b3480156100c257600080fd5b506100d66100d136600461162d565b6101ba565b6040516100ad91906118eb565b3480156100ef57600080fd5b506100d66100fe3660046116b7565b610233565b34801561010f57600080fd5b5061012361011e366004611590565b61028d565b005b34801561013157600080fd5b506101236101403660046115c3565b6102ce565b34801561015157600080fd5b50610165610160366004611753565b6102f6565b6040516100ad91906118c9565b610185610180366004611720565b610322565b6040516100ad919061189d565b34801561019e57600080fd5b506101656103d6565b60006101b2826103e7565b90505b919050565b60006102046101c885610444565b84848080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152506104a492505050565b1561022c57507f1626ba7e000000000000000000000000000000000000000000000000000000005b9392505050565b600061025d6101c88686604051808383808284376040519201829003909120935061044492505050565b1561028557507f20c13b0b000000000000000000000000000000000000000000000000000000005b949350505050565b60006102be826040516020016102a39190611a19565b60405160208183030381529060405280519060200120610444565b90506102ca818361069c565b5050565b60006102e4846040516020016102a39190611975565b90506102f0818561069c565b50505050565b60006101b27f8d0bf1fd623d628c741362c1289948e57b3e2905218c676d3e69abee36d6ae2e83610817565b600033301461037c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526027815260200180611d806027913960400191505060405180910390fd5b81516020830134f06040805173ffffffffffffffffffffffffffffffffffffffff8316815290519192507fa506ad4e7f05eceba62a023c3219e5bd98a615f4fa87e2afb08a2da5cf62bf0c919081900360200190a1919050565b60006103e260006102f6565b905090565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f90042baf00000000000000000000000000000000000000000000000000000000141561043b575060016101b5565b6101b282610844565b604080517f19010000000000000000000000000000000000000000000000000000000000006020808301919091524660228301523060601b6042830152605680830194909452825180830390940184526076909101909152815191012090565b60008060006104b2846108a1565b909250905061ffff821660005b855183101561067957600080806104d6898761090f565b975060ff918216945016915060018314156104fe576104f58987610990565b96509050610622565b8261052a57606061050f8a88610a08565b9750905061051d8b82610ab9565b9150828501945050610622565b60028314156105d15761053d8987610990565b96509050600061054d8a88610e43565b975061ffff16905060606105628b8984610eb4565b985090506105718c8483610fa3565b6105c6576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526032815260200180611c0b6032913960400191505060405180910390fd5b505092810192610622565b6040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602c815260200180611b28602c913960400191505060405180910390fd5b848282604051602001808481526020018381526020018273ffffffffffffffffffffffffffffffffffffffff16815260200193505050506040516020818303038152906040528051906020012094505050506104bf565b8361ffff1681101580156106915750610691826111eb565b979650505050505050565b60005b81518110156108125760008282815181106106b657fe5b6020026020010151905060006060826000015115610709576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610700906119bc565b60405180910390fd5b82604001515a1015610747576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161070090611918565b826060015173ffffffffffffffffffffffffffffffffffffffff168360800151846040015160001461077d57846040015161077f565b5a5b908560a001516040516107929190611881565b600060405180830381858888f193505050503d80600081146107d0576040519150601f19603f3d011682016040523d82523d6000602084013e6107d5565b606091505b50909250905081156107fc57856040516107ef91906118c9565b60405180910390a0610807565b6108078387836111f1565b50505060010161069f565b505050565b60408051602080820194909452808201929092528051808303820181526060909201905280519101205490565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f389901c7000000000000000000000000000000000000000000000000000000001415610898575060016101b5565b6101b282611241565b6020810151815160f09190911c9060029081111561090a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526027815260200180611b776027913960400191505060405180910390fd5b915091565b8082016020015160f881901c9060f01c60ff166002830183811161092f57fe5b8451811115610989576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526026815260200180611cdb6026913960400191505060405180910390fd5b9250925092565b8082016020015160601c601482018281116109a757fe5b8351811115610a01576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526023815260200180611b546023913960400191505060405180910390fd5b9250929050565b604080516042808252608082019092526060916000919060208201818036833701905050915082840160200180516020840152602081015160408401526022810151604284015250604283019050828111610a5f57fe5b8351811115610a01576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526023815260200180611c7c6023913960400191505060405180910390fd5b60008151604214610b15576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252603a815260200180611aee603a913960400191505060405180910390fd5b600082600184510381518110610b2757fe5b602001015160f81c60f81b60f81c60ff169050600083604081518110610b4957fe5b016020015160f81c90506000610b5f85826112c9565b90506000610b6e8660206112c9565b90507f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0811115610be9576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252603d815260200180611ab1603d913960400191505060405180910390fd5b8260ff16601b14158015610c0157508260ff16601c14155b15610c57576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252603d815260200180611b9e603d913960400191505060405180910390fd5b6001841415610ccb5760018784848460405160008152602001604052604051808581526020018460ff1681526020018381526020018281526020019450505050506020604051602081039080840390855afa158015610cba573d6000803e3d6000fd5b505050602060405103519450610dcd565b6002841415610d7c5760018760405160200180807f19457468657265756d205369676e6564204d6573736167653a0a333200000000815250601c018281526020019150506040516020818303038152906040528051906020012084848460405160008152602001604052604051808581526020018460ff1681526020018381526020018281526020019450505050506020604051602081039080840390855afa158015610cba573d6000803e3d6000fd5b6040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252603c815260200180611c9f603c913960400191505060405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff8516610e39576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526030815260200180611bdb6030913960400191505060405180910390fd5b5050505092915050565b8082016020015160f01c60028201828111610e5a57fe5b8351811115610a01576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526022815260200180611d226022913960400191505060405180910390fd5b606060008267ffffffffffffffff81118015610ecf57600080fd5b506040519080825280601f01601f191660200182016040528015610efa576020820181803683370190505b509150838501602001600060205b85811015610f2157908201518482015260208101610f08565b8486016020018051939092015190850152525082820183811015610f4157fe5b8451811115610f9b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526021815260200180611d016021913960400191505060405180910390fd5b935093915050565b60008082600184510381518110610fb657fe5b016020015160f81c90506001811480610fcf5750600281145b15611013578373ffffffffffffffffffffffffffffffffffffffff16610ff58685610ab9565b73ffffffffffffffffffffffffffffffffffffffff161491506111e3565b60038114156111925782517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff81018452604080517f1626ba7e000000000000000000000000000000000000000000000000000000008152600481018881526024820192835286516044830152865173ffffffffffffffffffffffffffffffffffffffff891693631626ba7e938b938a9390929160640190602085019080838360005b838110156110cd5781810151838201526020016110b5565b50505050905090810190601f1680156110fa5780820380516001836020036101000a031916815260200191505b50935050505060206040518083038186803b15801561111857600080fd5b505afa15801561112c573d6000803e3d6000fd5b505050506040513d602081101561114257600080fd5b50519084527fffffffff00000000000000000000000000000000000000000000000000000000167f1626ba7e000000000000000000000000000000000000000000000000000000001491506111e3565b6040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252603f815260200180611c3d603f913960400191505060405180910390fd5b509392505050565b50600190565b82602001511561120357805160208201fd5b7f3dbd1590ea96dd3253a91f24e64e3a502e1225d602a5731357bc12643070ccd782826040516112349291906118d2565b60405180910390a1505050565b60007fffffffff00000000000000000000000000000000000000000000000000000000821615806112b357507fffffffff0000000000000000000000000000000000000000000000000000000082167f36e7817500000000000000000000000000000000000000000000000000000000145b156112c0575060016101b5565b6101b282611331565b60008160200183511015611328576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252603c815260200180611d44603c913960400191505060405180910390fd5b50016020015190565b7fffffffff0000000000000000000000000000000000000000000000000000000081167f01ffc9a70000000000000000000000000000000000000000000000000000000014919050565b803573ffffffffffffffffffffffffffffffffffffffff811681146101b557600080fd5b600082601f8301126113af578081fd5b8135602067ffffffffffffffff808311156113c657fe5b6113d38283850201611a60565b83815282810190868401865b868110156114af578135890160c0807fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0838e0301121561141d57898afd5b604080518281018181108a8211171561143257fe5b825261143f848b016114bd565b815261144c8285016114bd565b8a820152606080850135838301526080925061146983860161137b565b9082015260a08481013583830152928401359289841115611488578c8dfd5b6114968f8c8688010161150d565b90820152875250505092850192908501906001016113df565b509098975050505050505050565b803580151581146101b557600080fd5b60008083601f8401126114de578182fd5b50813567ffffffffffffffff8111156114f5578182fd5b602083019150836020828501011115610a0157600080fd5b600082601f83011261151d578081fd5b813567ffffffffffffffff81111561153157fe5b61156260207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f84011601611a60565b818152846020838601011115611576578283fd5b816020850160208301379081016020019190915292915050565b6000602082840312156115a1578081fd5b813567ffffffffffffffff8111156115b7578182fd5b6102858482850161139f565b6000806000606084860312156115d7578182fd5b833567ffffffffffffffff808211156115ee578384fd5b6115fa8783880161139f565b9450602086013593506040860135915080821115611616578283fd5b506116238682870161150d565b9150509250925092565b600080600060408486031215611641578283fd5b83359250602084013567ffffffffffffffff81111561165e578283fd5b61166a868287016114cd565b9497909650939450505050565b600060208284031215611688578081fd5b81357fffffffff000000000000000000000000000000000000000000000000000000008116811461022c578182fd5b600080600080604085870312156116cc578081fd5b843567ffffffffffffffff808211156116e3578283fd5b6116ef888389016114cd565b90965094506020870135915080821115611707578283fd5b50611714878288016114cd565b95989497509550505050565b600060208284031215611731578081fd5b813567ffffffffffffffff811115611747578182fd5b6102858482850161150d565b600060208284031215611764578081fd5b5035919050565b60008282518085526020808601955080818302840101818601855b8481101561182a578583037fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe00189528151805115158452848101511515858501526040808201519085015260608082015173ffffffffffffffffffffffffffffffffffffffff16908501526080808201519085015260a09081015160c09185018290529061181681860183611837565b9a86019a9450505090830190600101611786565b5090979650505050505050565b6000815180845261184f816020860160208601611a84565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b60008251611893818460208701611a84565b9190910192915050565b73ffffffffffffffffffffffffffffffffffffffff91909116815260200190565b901515815260200190565b90815260200190565b6000838252604060208301526102856040830184611837565b7fffffffff0000000000000000000000000000000000000000000000000000000091909116815260200190565b60208082526029908201527f47756573744d6f64756c65235f6578656375746547756573743a204e4f545f4560408201527f4e4f5547485f4741530000000000000000000000000000000000000000000000606082015260800190565b600060408252600660408301527f67756573743a000000000000000000000000000000000000000000000000000060608301526080602083015261022c608083018461176b565b60208082526033908201527f47756573744d6f64756c65235f6578656375746547756573743a2064656c656760408201527f61746543616c6c206e6f7420616c6c6f77656400000000000000000000000000606082015260800190565b600060408252600560408301527f73656c663a00000000000000000000000000000000000000000000000000000060608301526080602083015261022c608083018461176b565b60405181810167ffffffffffffffff81118282101715611a7c57fe5b604052919050565b60005b83811015611a9f578181015183820152602001611a87565b838111156102f0575050600091015256fe5369676e617475726556616c696461746f72237265636f7665725369676e65723a20696e76616c6964207369676e6174757265202773272076616c75655369676e617475726556616c696461746f72237265636f7665725369676e65723a20696e76616c6964207369676e6174757265206c656e6774684d6f64756c6541757468235f7369676e617475726556616c69646174696f6e20494e56414c49445f464c41474c696242797465732372656164416464726573733a204f55545f4f465f424f554e44534c696242797465732372656164466972737455696e7431363a204f55545f4f465f424f554e44535369676e617475726556616c696461746f72237265636f7665725369676e65723a20696e76616c6964207369676e6174757265202776272076616c75655369676e617475726556616c696461746f72237265636f7665725369676e65723a20494e56414c49445f5349474e45524d6f64756c6541757468235f7369676e617475726556616c69646174696f6e3a20494e56414c49445f5349474e41545552455369676e617475726556616c696461746f7223697356616c69645369676e61747572653a20554e535550504f525445445f5349474e41545552455f545950454c696242797465732372656164427974657336363a204f55545f4f465f424f554e44535369676e617475726556616c696461746f72237265636f7665725369676e65723a20554e535550504f525445445f5349474e41545552455f545950454c69624279746573237265616455696e743855696e74383a204f55545f4f465f424f554e44534c69624279746573237265616442797465733a204f55545f4f465f424f554e44534c69624279746573237265616455696e7431363a204f55545f4f465f424f554e44534c696242797465732372656164427974657333323a20475245415445525f4f525f455155414c5f544f5f33325f4c454e4754485f52455155495245444d6f64756c6553656c6641757468236f6e6c7953656c663a204e4f545f415554484f52495a4544a2646970667358221220f5a1de0b650baa2ee828e8766bc6dbd0c74da0cc4735a143852d24f868e4b62464736f6c6343000706003300000000', - gasLimit: 8000000 - }) - ) - - // Deploy multiCallUtils - responses.push( - await signer.sendTransaction({ - to: '0x8A5Bc19e22D6aD55a2c763B93A75d09F321fe764', - data: '0x9c4ae2d0000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002b1660c06040523480156200001157600080fd5b5060405162002ad638038062002ad68339810160408190526200003491620000cd565b8181816001600160a01b031660a0816001600160a01b031660601b8152505060405180606001604052806028815260200162002aae60289139816001600160a01b03166040516020016200008a92919062000104565b60408051601f198184030181529190528051602090910120608052506200014692505050565b80516001600160a01b0381168114620000c857600080fd5b919050565b60008060408385031215620000e0578182fd5b620000eb83620000b0565b9150620000fb60208401620000b0565b90509250929050565b60008351815b818110156200012657602081870181015185830152016200010a565b81811115620001355782828501525b509190910191825250602001919050565b60805160a05160601c61293762000177600039806106515280610b1b5250806106755280610b3f52506129376000f3fe6080604052600436106101805760003560e01c806398f9fbc4116100d6578063d1db39071161007f578063e90f13e711610059578063e90f13e714610395578063f209883a146103ea578063ffd7d741146103ff57610180565b8063d1db390714610395578063d5b5337f146103aa578063e717aba9146103ca57610180565b8063c272d5c3116100b0578063c272d5c314610333578063c39f2d5c14610348578063c66764e11461036857610180565b806398f9fbc4146102e9578063aeea5fb5146102fe578063b472f0a21461031357610180565b806348acd29f116101385780637ae99638116101125780637ae99638146102875780637f29d538146102a7578063984395bc146102c757610180565b806348acd29f14610227578063543196eb146102475780637082503b1461026757610180565b80631cd05dc4116101695780631cd05dc4146101d057806343d9c935146101f057806344d466c21461020557610180565b80630fdecfac146101855780631551f0ab146101b0575b600080fd5b34801561019157600080fd5b5061019a610420565b6040516101a79190612190565b60405180910390f35b3480156101bc57600080fd5b5061019a6101cb366004611e76565b610424565b3480156101dc57600080fd5b5061019a6101eb366004611bea565b610436565b3480156101fc57600080fd5b5061019a610448565b34801561021157600080fd5b50610225610220366004611ca4565b610450565b005b34801561023357600080fd5b5061019a610242366004611bea565b61080a565b34801561025357600080fd5b5061019a610262366004611bea565b610828565b34801561027357600080fd5b50610225610282366004611c0b565b61082c565b34801561029357600080fd5b5061019a6102a2366004611bea565b610cb0565b3480156102b357600080fd5b506102256102c2366004611e76565b610cc2565b3480156102d357600080fd5b506102dc610cfe565b6040516101a79190612000565b3480156102f557600080fd5b506102dc610d02565b34801561030a57600080fd5b5061019a610d06565b34801561031f57600080fd5b5061022561032e366004611c7b565b610d0a565b34801561033f57600080fd5b5061019a610de8565b34801561035457600080fd5b5061019a610363366004611bea565b610dec565b34801561037457600080fd5b50610388610383366004611bea565b610df0565b6040516101a791906121c5565b3480156103a157600080fd5b5061019a610e35565b3480156103b657600080fd5b5061019a6103c5366004611e76565b610e39565b3480156103d657600080fd5b5061019a6103e5366004611bea565b610e3d565b3480156103f657600080fd5b5061019a610e4f565b61041261040d366004611d34565b610e53565b6040516101a7929190612021565b4690565b60036020526000908152604090205481565b60006020819052908152604090205481565b60005a905090565b8360005b838110156104e9578185858381811061046957fe5b9050604002016000013586868481811061047f57fe5b90506040020160200160208101906104979190611bea565b6040516020016104a993929190612199565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe081840301815291905280516020909101209150600101610454565b506000808773ffffffffffffffffffffffffffffffffffffffff166351605d8060e01b60405160200161051c9190611f54565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529082905261055491611f81565b6000604051808303816000865af19150503d8060008114610591576040519150601f19603f3d011682016040523d82523d6000602084013e610596565b606091505b50915091508180156105a9575080516020145b1561060e576000818060200190518101906105c49190611e8e565b9050838114610608576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105ff90612543565b60405180910390fd5b50610732565b60405173ffffffffffffffffffffffffffffffffffffffff89169061069d907fff00000000000000000000000000000000000000000000000000000000000000907f00000000000000000000000000000000000000000000000000000000000000009087907f000000000000000000000000000000000000000000000000000000000000000090602001611ef0565b6040516020818303038152906040528051906020012060001c73ffffffffffffffffffffffffffffffffffffffff1614610703576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105ff906125a0565b83156107325773ffffffffffffffffffffffffffffffffffffffff881660009081526002602052604090208390555b828873ffffffffffffffffffffffffffffffffffffffff167fb502b7446ca079086188acf3abef47c2f464f2ee9a72fcdf05ffcb74dcc17cee89898960405160200161077f9291906120c7565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0818403018152908290526107b89291612623565b60405180910390a383156108005773ffffffffffffffffffffffffffffffffffffffff8816600090815260016020908152604080832043908190558684526003909252909120555b5050505050505050565b73ffffffffffffffffffffffffffffffffffffffff8116315b919050565b3f90565b600080610838846110c3565b9150915060008046905080898960405160200161085793929190611f9d565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0818403018152919052805160209091012091505061ffff831660008767ffffffffffffffff811180156108ae57600080fd5b506040519080825280602002602001820160405280156108e857816020015b6108d5611b1c565b8152602001906001900390816108cd5790505b50905060005b8751851015610a9f57600080806109058b89611131565b995060ff9182169450169150600183141561092d576109248b896111b2565b98509050610a20565b8261095f57606061093e8c8a61122a565b9950905061094c88826112db565b91506109598f838d611665565b50610a20565b60028314156109ee576109728b896111b2565b9850905060006109828c8a6116f3565b995061ffff16905060606109978d8b84611764565b9a5090506109a6898483611853565b6109dc576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105ff9061242c565b50506109e98e828c611665565b610a20565b6040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105ff906121d8565b60405180604001604052808381526020018273ffffffffffffffffffffffffffffffffffffffff16815250858581518110610a5757fe5b60200260200101819052508380600101945050858282604051602001610a7f93929190612199565b6040516020818303038152906040528051906020012095505050506108ee565b888114610ad8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105ff906124e6565b60405173ffffffffffffffffffffffffffffffffffffffff8c1690610b67907fff00000000000000000000000000000000000000000000000000000000000000907f00000000000000000000000000000000000000000000000000000000000000009087907f000000000000000000000000000000000000000000000000000000000000000090602001611ef0565b6040516020818303038152906040528051906020012060001c73ffffffffffffffffffffffffffffffffffffffff1614610bcd576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105ff906123a9565b828b73ffffffffffffffffffffffffffffffffffffffff167fb502b7446ca079086188acf3abef47c2f464f2ee9a72fcdf05ffcb74dcc17cee8885604051602001610c18919061212b565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe081840301815290829052610c5192916125fe565b60405180910390a38615610ca35773ffffffffffffffffffffffffffffffffffffffff8b1660008181526001602090815260408083204390819055878452600383528184205592825260029052208390555b5050505050505050505050565b60026020526000908152604090205481565b804210610cfb576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105ff9061234c565b50565b3290565b4190565b4490565b600080610d1683611a9b565b9150915060008473ffffffffffffffffffffffffffffffffffffffff16638c3f5563846040518263ffffffff1660e01b8152600401610d559190612190565b60206040518083038186803b158015610d6d57600080fd5b505afa158015610d81573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610da59190611e8e565b905081811015610de1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105ff906122ef565b5050505050565b3a90565b3b90565b60408051603f833b9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01682019092528181529080600060208401853c50919050565b4590565b4090565b60016020526000908152604090205481565b4290565b606080825167ffffffffffffffff81118015610e6e57600080fd5b50604051908082528060200260200182016040528015610e98578160200160208202803683370190505b509150825167ffffffffffffffff81118015610eb357600080fd5b50604051908082528060200260200182016040528015610ee757816020015b6060815260200190600190039081610ed25790505b50905060005b83518110156110bd576000848281518110610f0457fe5b60200260200101519050806000015115610f4a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105ff90612489565b80604001515a1015610f88576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105ff90612292565b806060015173ffffffffffffffffffffffffffffffffffffffff1681608001518260400151600014610fbe578260400151610fc0565b5a5b908360a00151604051610fd39190611f81565b600060405180830381858888f193505050503d8060008114611011576040519150601f19603f3d011682016040523d82523d6000602084013e611016565b606091505b5085848151811061102357fe5b6020026020010185858151811061103657fe5b602002602001018290528215151515815250505083828151811061105657fe5b60200260200101518061107e575084828151811061107057fe5b602002602001015160200151155b6110b4576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105ff90612235565b50600101610eed565b50915091565b6020810151815160f09190911c9060029081111561112c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602781526020018061272b6027913960400191505060405180910390fd5b915091565b8082016020015160f881901c9060f01c60ff166002830183811161115157fe5b84518111156111ab576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602681526020018061285d6026913960400191505060405180910390fd5b9250925092565b8082016020015160601c601482018281116111c957fe5b8351811115611223576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260238152602001806127086023913960400191505060405180910390fd5b9250929050565b60408051604280825260808201909252606091600091906020820181803683370190505091508284016020018051602084015260208101516040840152602281015160428401525060428301905082811161128157fe5b8351811115611223576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260238152602001806127fe6023913960400191505060405180910390fd5b60008151604214611337576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252603a8152602001806126ce603a913960400191505060405180910390fd5b60008260018451038151811061134957fe5b602001015160f81c60f81b60f81c60ff16905060008360408151811061136b57fe5b016020015160f81c905060006113818582611ab4565b90506000611390866020611ab4565b90507f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a081111561140b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252603d815260200180612691603d913960400191505060405180910390fd5b8260ff16601b1415801561142357508260ff16601c14155b15611479576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252603d815260200180612752603d913960400191505060405180910390fd5b60018414156114ed5760018784848460405160008152602001604052604051808581526020018460ff1681526020018381526020018281526020019450505050506020604051602081039080840390855afa1580156114dc573d6000803e3d6000fd5b5050506020604051035194506115ef565b600284141561159e5760018760405160200180807f19457468657265756d205369676e6564204d6573736167653a0a333200000000815250601c018281526020019150506040516020818303038152906040528051906020012084848460405160008152602001604052604051808581526020018460ff1681526020018381526020018281526020019450505050506020604051602081039080840390855afa1580156114dc573d6000803e3d6000fd5b6040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252603c815260200180612821603c913960400191505060405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff851661165b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252603081526020018061278f6030913960400191505060405180910390fd5b5050505092915050565b8173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f600ba597427f042bcd559a0d06fa1732cc104d6dd43cbe8845b5a0e804b2b39f60405160405180910390a380156116ee5773ffffffffffffffffffffffffffffffffffffffff821660009081526020819052604090204390555b505050565b8082016020015160f01c6002820182811161170a57fe5b8351811115611223576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260228152602001806128a46022913960400191505060405180910390fd5b606060008267ffffffffffffffff8111801561177f57600080fd5b506040519080825280601f01601f1916602001820160405280156117aa576020820181803683370190505b509150838501602001600060205b858110156117d1579082015184820152602081016117b8565b84860160200180519390920151908501525250828201838110156117f157fe5b845181111561184b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260218152602001806128836021913960400191505060405180910390fd5b935093915050565b6000808260018451038151811061186657fe5b016020015160f81c9050600181148061187f5750600281145b156118c3578373ffffffffffffffffffffffffffffffffffffffff166118a586856112db565b73ffffffffffffffffffffffffffffffffffffffff16149150611a93565b6003811415611a425782517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff81018452604080517f1626ba7e000000000000000000000000000000000000000000000000000000008152600481018881526024820192835286516044830152865173ffffffffffffffffffffffffffffffffffffffff891693631626ba7e938b938a9390929160640190602085019080838360005b8381101561197d578181015183820152602001611965565b50505050905090810190601f1680156119aa5780820380516001836020036101000a031916815260200191505b50935050505060206040518083038186803b1580156119c857600080fd5b505afa1580156119dc573d6000803e3d6000fd5b505050506040513d60208110156119f257600080fd5b50519084527fffffffff00000000000000000000000000000000000000000000000000000000167f1626ba7e00000000000000000000000000000000000000000000000000000000149150611a93565b6040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252603f8152602001806127bf603f913960400191505060405180910390fd5b509392505050565b606081901c916bffffffffffffffffffffffff90911690565b60008160200183511015611b13576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252603c8152602001806128c6603c913960400191505060405180910390fd5b50016020015190565b604080518082019091526000808252602082015290565b803573ffffffffffffffffffffffffffffffffffffffff8116811461082357600080fd5b8035801515811461082357600080fd5b600082601f830112611b77578081fd5b813567ffffffffffffffff811115611b8b57fe5b611bbc60207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f8401160161263c565b818152846020838601011115611bd0578283fd5b816020850160208301379081016020019190915292915050565b600060208284031215611bfb578081fd5b611c0482611b33565b9392505050565b600080600080600060a08688031215611c22578081fd5b611c2b86611b33565b94506020860135935060408601359250606086013567ffffffffffffffff811115611c54578182fd5b611c6088828901611b67565b925050611c6f60808701611b57565b90509295509295909350565b60008060408385031215611c8d578182fd5b611c9683611b33565b946020939093013593505050565b600080600080600060808688031215611cbb578081fd5b611cc486611b33565b945060208601359350604086013567ffffffffffffffff80821115611ce7578283fd5b818801915088601f830112611cfa578283fd5b813581811115611d08578384fd5b896020604083028501011115611d1c578384fd5b602083019550809450505050611c6f60608701611b57565b60006020808385031215611d46578182fd5b823567ffffffffffffffff80821115611d5d578384fd5b818501915085601f830112611d70578384fd5b813581811115611d7c57fe5b611d89848583020161263c565b81815284810190848601875b84811015611e67578135870160c0807fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0838f03011215611dd3578a8bfd5b604080518281018181108b82111715611de857fe5b8252611df5848d01611b57565b8152611e02828501611b57565b8c82015260608085013583830152611e1c60808601611b33565b9082015260a08481013560808301529284013592915089831115611e3e578c8dfd5b611e4c8f8d85870101611b67565b91810191909152865250509287019290870190600101611d95565b50909998505050505050505050565b600060208284031215611e87578081fd5b5035919050565b600060208284031215611e9f578081fd5b5051919050565b60008151808452611ebe816020860160208601612660565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b7fff0000000000000000000000000000000000000000000000000000000000000094909416845260609290921b7fffffffffffffffffffffffffffffffffffffffff0000000000000000000000001660018401526015830152603582015260550190565b7fffffffff0000000000000000000000000000000000000000000000000000000091909116815260040190565b60008251611f93818460208701612660565b9190910192915050565b7f19010000000000000000000000000000000000000000000000000000000000008152600281019390935260609190911b7fffffffffffffffffffffffffffffffffffffffff000000000000000000000000166022830152603682015260560190565b73ffffffffffffffffffffffffffffffffffffffff91909116815260200190565b604080825283519082018190526000906020906060840190828701845b8281101561205c57815115158452928401929084019060010161203e565b5050508381038285015284518082528282019080840283018401878501865b83811015611e67577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08684030185526120b5838351611ea6565b9487019492509086019060010161207b565b6020808252818101839052600090604080840186845b8781101561211e578135835273ffffffffffffffffffffffffffffffffffffffff612109868401611b33565b168386015291830191908301906001016120dd565b5090979650505050505050565b602080825282518282018190526000919060409081850190868401855b828110156121835781518051855286015173ffffffffffffffffffffffffffffffffffffffff16868501529284019290850190600101612148565b5091979650505050505050565b90815260200190565b928352602083019190915273ffffffffffffffffffffffffffffffffffffffff16604082015260600190565b600060208252611c046020830184611ea6565b6020808252603a908201527f526571756972655574696c73237075626c697368496e697469616c5369676e6560408201527f72733a20494e56414c49445f5349474e41545552455f464c4147000000000000606082015260800190565b60208082526027908201527f4d756c746943616c6c5574696c73236d756c746943616c6c3a2043414c4c5f5260408201527f4556455254454400000000000000000000000000000000000000000000000000606082015260800190565b60208082526028908201527f4d756c746943616c6c5574696c73236d756c746943616c6c3a204e4f545f454e60408201527f4f5547485f474153000000000000000000000000000000000000000000000000606082015260800190565b60208082526032908201527f526571756972655574696c7323726571756972654d696e4e6f6e63653a204e4f60408201527f4e43455f42454c4f575f52455155495245440000000000000000000000000000606082015260800190565b60208082526027908201527f526571756972655574696c7323726571756972654e6f6e457870697265643a2060408201527f4558504952454400000000000000000000000000000000000000000000000000606082015260800190565b60208082526048908201527f526571756972655574696c73237075626c697368496e697469616c5369676e6560408201527f72733a20554e45585045435445445f434f554e5445524641435455414c5f494d60608201527f4147455f48415348000000000000000000000000000000000000000000000000608082015260a00190565b60208082526032908201527f4d6f64756c6541757468235f7369676e617475726556616c69646174696f6e3a60408201527f20494e56414c49445f5349474e41545552450000000000000000000000000000606082015260800190565b60208082526032908201527f4d756c746943616c6c5574696c73236d756c746943616c6c3a2064656c65676160408201527f746543616c6c206e6f7420616c6c6f7765640000000000000000000000000000606082015260800190565b60208082526039908201527f526571756972655574696c73237075626c697368496e697469616c5369676e6560408201527f72733a20494e56414c49445f4d454d424552535f434f554e5400000000000000606082015260800190565b60208082526031908201527f526571756972655574696c73237075626c697368436f6e6669673a20554e455860408201527f5045435445445f494d4147455f48415348000000000000000000000000000000606082015260800190565b602080825260409082018190527f526571756972655574696c73237075626c697368436f6e6669673a20554e4558908201527f5045435445445f434f554e5445524641435455414c5f494d4147455f48415348606082015260800190565b600061ffff841682526040602083015261261b6040830184611ea6565b949350505050565b60008382526040602083015261261b6040830184611ea6565b60405181810167ffffffffffffffff8111828210171561265857fe5b604052919050565b60005b8381101561267b578181015183820152602001612663565b8381111561268a576000848401525b5050505056fe5369676e617475726556616c696461746f72237265636f7665725369676e65723a20696e76616c6964207369676e6174757265202773272076616c75655369676e617475726556616c696461746f72237265636f7665725369676e65723a20696e76616c6964207369676e6174757265206c656e6774684c696242797465732372656164416464726573733a204f55545f4f465f424f554e44534c696242797465732372656164466972737455696e7431363a204f55545f4f465f424f554e44535369676e617475726556616c696461746f72237265636f7665725369676e65723a20696e76616c6964207369676e6174757265202776272076616c75655369676e617475726556616c696461746f72237265636f7665725369676e65723a20494e56414c49445f5349474e45525369676e617475726556616c696461746f7223697356616c69645369676e61747572653a20554e535550504f525445445f5349474e41545552455f545950454c696242797465732372656164427974657336363a204f55545f4f465f424f554e44535369676e617475726556616c696461746f72237265636f7665725369676e65723a20554e535550504f525445445f5349474e41545552455f545950454c69624279746573237265616455696e743855696e74383a204f55545f4f465f424f554e44534c69624279746573237265616442797465733a204f55545f4f465f424f554e44534c69624279746573237265616455696e7431363a204f55545f4f465f424f554e44534c696242797465732372656164427974657333323a20475245415445525f4f525f455155414c5f544f5f33325f4c454e4754485f5245515549524544a26469706673582212200abb842b6eea58df953f048e3a9aa7589fd3ce15ca086e43b61cdb0c0c42723564736f6c63430007060033603a600e3d39601a805130553df3363d3d373d3d3d363d30545af43d82803e903d91601857fd5bf3000000000000000000000000f9d09d634fb818b05149329c1dccfaea53639d96000000000000000000000000d01f11855bccb95f88d7a48492f66410d463731300000000000000000000', - gasLimit: 8000000 - }) - ) - - // Wait for transaction responses to confirm - await Promise.all(responses.map(response => response.wait())) - - return deployV1Context(signer) -} diff --git a/old/packages/tests/src/context/v2.ts b/old/packages/tests/src/context/v2.ts deleted file mode 100644 index 2e06deb4f..000000000 --- a/old/packages/tests/src/context/v2.ts +++ /dev/null @@ -1,49 +0,0 @@ -import { ethers } from 'ethers' -import { v2 } from '../builds' -import { deployContract } from '../singletonFactory' -import { v2 as coreV2 } from '@0xsequence/core' - -export async function deployV2Context(signer: ethers.Signer): Promise { - const { chainId } = await signer.provider!.getNetwork() - console.log(`[${chainId}] [v2]: Deploying context...`) - - // See if signer's provider has the contracts already deployed - - const deploymentResults: boolean[][] = [] - - const [factory, waitForFactoryDeployment] = await deployContract(signer, v2.factory) - const [mainModuleUpgradable, waitForMainModuleUpgradable] = await deployContract(signer, v2.mainModuleUpgradable) - - deploymentResults.push(await Promise.all([waitForFactoryDeployment, waitForMainModuleUpgradable])) - - const [mainModule, waitForMainModule] = await deployContract( - signer, - v2.mainModule, - await factory.getAddress(), - await mainModuleUpgradable.getAddress() - ) - - deploymentResults.push(await Promise.all([waitForMainModule])) - - const [guestModule, waitForGuestModule] = await deployContract(signer, v2.guestModule) - const [universalSigValidator, waitForUniversalSigValidator] = await deployContract(signer, v2.universalSigValidator) - - deploymentResults.push(await Promise.all([waitForGuestModule, waitForUniversalSigValidator])) - - if (deploymentResults.flat().some(r => !r)) { - throw new Error('Failed to deploy V2 context!') - } - - return { - version: 2, - - factory: await factory.getAddress(), - mainModule: await mainModule.getAddress(), - mainModuleUpgradable: await mainModuleUpgradable.getAddress(), - guestModule: await guestModule.getAddress(), - universalSigValidator: await universalSigValidator.getAddress(), - - walletCreationCode: '0x603a600e3d39601a805130553df3363d3d373d3d3d363d30545af43d82803e903d91601857fd5bf3', - proxyImplementationHook: '0x1f56dbAD5e8319F0DE9a323E24A31b5077dEB1a4' - } -} diff --git a/old/packages/tests/src/index.ts b/old/packages/tests/src/index.ts deleted file mode 100644 index 37c060faa..000000000 --- a/old/packages/tests/src/index.ts +++ /dev/null @@ -1,8 +0,0 @@ -export * as context from './context' -export * as builds from './builds' - -export * as utils from './utils' - -export * as configs from './configs' -export * as singleton from './singletonFactory' -export * as erc20 from './tokens/erc20' diff --git a/old/packages/tests/src/networks.ts b/old/packages/tests/src/networks.ts deleted file mode 100644 index b23912279..000000000 --- a/old/packages/tests/src/networks.ts +++ /dev/null @@ -1,52 +0,0 @@ -import { ChainId, NetworkConfig, NetworkMetadata } from '../../network/src' - -export enum HardhatChainId { - HARDHAT = 31337, - HARDHAT_2 = 31338 -} - -export const hardhatNetworks: Record = { - [HardhatChainId.HARDHAT]: { - chainId: HardhatChainId.HARDHAT as any as ChainId, - name: 'hardhat', - title: 'Hardhat (local testnet)', - nativeToken: { - symbol: 'ETH', - name: 'Ether', - decimals: 18 - } - }, - [HardhatChainId.HARDHAT_2]: { - chainId: HardhatChainId.HARDHAT_2 as any as ChainId, - name: 'hardhat2', - title: 'Hardhat (local testnet)', - nativeToken: { - symbol: 'ETH', - name: 'Ether', - decimals: 18 - } - } -} - -export const hardhatNetworkConfigs: NetworkConfig[] = [ - { - ...hardhatNetworks[HardhatChainId.HARDHAT], - rpcUrl: 'http://localhost:8545', - relayer: { - url: 'http://localhost:3000', - provider: { - url: 'http://localhost:8545' - } - } - }, - { - ...hardhatNetworks[HardhatChainId.HARDHAT_2], - rpcUrl: 'http://localhost:9545', - relayer: { - url: 'http://localhost:3000', - provider: { - url: 'http://localhost:9545' - } - } - } -] diff --git a/old/packages/tests/src/singletonFactory.ts b/old/packages/tests/src/singletonFactory.ts deleted file mode 100644 index 9e15ae26f..000000000 --- a/old/packages/tests/src/singletonFactory.ts +++ /dev/null @@ -1,106 +0,0 @@ -import { ethers } from 'ethers' -import { Artifact } from './builds' -import { isContract } from './utils' - -export const deployment = { - tx: '0xf9016c8085174876e8008303c4d88080b90154608060405234801561001057600080fd5b50610134806100206000396000f3fe6080604052348015600f57600080fd5b506004361060285760003560e01c80634af63f0214602d575b600080fd5b60cf60048036036040811015604157600080fd5b810190602081018135640100000000811115605b57600080fd5b820183602082011115606c57600080fd5b80359060200191846001830284011164010000000083111715608d57600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929550509135925060eb915050565b604080516001600160a01b039092168252519081900360200190f35b6000818351602085016000f5939250505056fea26469706673582212206b44f8a82cb6b156bfcc3dc6aadd6df4eefd204bc928a4397fd15dacf6d5320564736f6c634300060200331b83247000822470', - deployer: '0xBb6e024b9cFFACB947A71991E386681B1Cd1477D', - funding: 24700000000000000n -} - -export const address = '0xce0042B868300000d44A59004Da54A005ffdcf9f' - -export const abi = [ - { - constant: false, - inputs: [ - { - internalType: 'bytes', - type: 'bytes' - }, - { - internalType: 'bytes32', - type: 'bytes32' - } - ], - name: 'deploy', - outputs: [ - { - internalType: 'address payable', - type: 'address' - } - ], - payable: false, - stateMutability: 'nonpayable', - type: 'function' - } -] - -export async function mustExistEIP2470(signer: ethers.Signer): Promise { - const provider = signer.provider - if (!provider) throw new Error('signer has no provider') - - if (!(await isContract(provider, address))) { - const balanceDeployer = await provider.getBalance(deployment.deployer) - if (balanceDeployer < deployment.funding) { - await signer - .sendTransaction({ - to: deployment.deployer, - value: deployment.funding - balanceDeployer - }) - .then(tx => tx.wait()) - } - - const res = await provider.broadcastTransaction(deployment.tx) - await res.wait() - - if (!(await isContract(provider, address))) { - throw new Error('EIP2470 deployment failed') - } - } - - return new ethers.Contract(address, abi, signer) -} - -export async function deployContract( - signer: ethers.Signer, - artifact: Artifact, - ...args: any[] -): Promise<[ethers.Contract, Promise]> { - const provider = signer.provider - if (!provider) throw new Error('signer has no provider') - - const singletonFactory = await mustExistEIP2470(signer) - - const factory = new ethers.ContractFactory(artifact.abi, artifact.bytecode) - - const data = (await factory.getDeployTransaction(...args)).data - - if (!data) throw new Error('no deploy data') - - const address = ethers.getAddress( - ethers.dataSlice( - ethers.keccak256( - ethers.solidityPacked( - ['bytes1', 'address', 'bytes32', 'bytes32'], - ['0xff', await singletonFactory.getAddress(), ethers.ZeroHash, ethers.keccak256(data)] - ) - ), - 12 - ) - ) - - if (await isContract(provider, address)) { - return [new ethers.Contract(address, artifact.abi, signer), Promise.resolve(true)] - } - - const maxGasLimit = await provider.getBlock('latest').then(b => (b?.gasLimit ? b.gasLimit / 2n : 0n)) - const tx = await singletonFactory.deploy(data, ethers.ZeroHash, { gasLimit: maxGasLimit }) - - // if (!(await isContract(provider, address))) { - // throw new Error('contract deployment failed') - // } - const waitPromise = tx.wait().then(() => isContract(provider, address)) - - return [new ethers.Contract(address, artifact.abi, signer), waitPromise] -} diff --git a/old/packages/tests/src/tokens/erc20.ts b/old/packages/tests/src/tokens/erc20.ts deleted file mode 100644 index 5b20ebb67..000000000 --- a/old/packages/tests/src/tokens/erc20.ts +++ /dev/null @@ -1,324 +0,0 @@ -/* -// SPDX-License-Identifier: MIT -pragma solidity ^0.8.3; - -contract SimpleERC20 { - mapping(address => uint256) public balanceOf; - mapping(address => mapping(address => uint256)) public allowance; - uint256 public totalSupply; - - string public name; - string public symbol; - uint8 public decimals; - - constructor(string memory _name, string memory _symbol, uint8 _decimals) { - name = _name; - symbol = _symbol; - decimals = _decimals; - } - - function mint(address to, uint256 amount) public { - totalSupply += amount; - balanceOf[to] += amount; - emit Transfer(address(0), to, amount); - } - - function transfer(address to, uint256 value) public returns (bool) { - balanceOf[msg.sender] -= value; - balanceOf[to] += value; - emit Transfer(msg.sender, to, value); - return true; - } - - function approve(address spender, uint256 value) public returns (bool) { - allowance[msg.sender][spender] = value; - emit Approval(msg.sender, spender, value); - return true; - } - - function transferFrom(address from, address to, uint256 value) public returns (bool) { - balanceOf[from] -= value; - balanceOf[to] += value; - allowance[from][msg.sender] -= value; - - emit Transfer(from, to, value); - return true; - } - - event Transfer(address indexed from, address indexed to, uint256 value); - event Approval(address indexed owner, address indexed spender, uint256 value); -} -*/ - -import { ethers } from 'ethers' - -export const TEST_ERC20_ABI = [ - { - inputs: [ - { - internalType: 'string', - name: '_name', - type: 'string' - }, - { - internalType: 'string', - name: '_symbol', - type: 'string' - }, - { - internalType: 'uint8', - name: '_decimals', - type: 'uint8' - } - ], - stateMutability: 'nonpayable', - type: 'constructor' - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'address', - name: 'owner', - type: 'address' - }, - { - indexed: true, - internalType: 'address', - name: 'spender', - type: 'address' - }, - { - indexed: false, - internalType: 'uint256', - name: 'value', - type: 'uint256' - } - ], - name: 'Approval', - type: 'event' - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'address', - name: 'from', - type: 'address' - }, - { - indexed: true, - internalType: 'address', - name: 'to', - type: 'address' - }, - { - indexed: false, - internalType: 'uint256', - name: 'value', - type: 'uint256' - } - ], - name: 'Transfer', - type: 'event' - }, - { - inputs: [ - { - internalType: 'address', - name: '', - type: 'address' - }, - { - internalType: 'address', - name: '', - type: 'address' - } - ], - name: 'allowance', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256' - } - ], - stateMutability: 'view', - type: 'function' - }, - { - inputs: [ - { - internalType: 'address', - name: 'spender', - type: 'address' - }, - { - internalType: 'uint256', - name: 'value', - type: 'uint256' - } - ], - name: 'approve', - outputs: [ - { - internalType: 'bool', - name: '', - type: 'bool' - } - ], - stateMutability: 'nonpayable', - type: 'function' - }, - { - inputs: [ - { - internalType: 'address', - name: '', - type: 'address' - } - ], - name: 'balanceOf', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256' - } - ], - stateMutability: 'view', - type: 'function' - }, - { - inputs: [], - name: 'decimals', - outputs: [ - { - internalType: 'uint8', - name: '', - type: 'uint8' - } - ], - stateMutability: 'view', - type: 'function' - }, - { - inputs: [ - { - internalType: 'address', - name: 'to', - type: 'address' - }, - { - internalType: 'uint256', - name: 'amount', - type: 'uint256' - } - ], - name: 'mint', - outputs: [], - stateMutability: 'nonpayable', - type: 'function' - }, - { - inputs: [], - name: 'name', - outputs: [ - { - internalType: 'string', - name: '', - type: 'string' - } - ], - stateMutability: 'view', - type: 'function' - }, - { - inputs: [], - name: 'symbol', - outputs: [ - { - internalType: 'string', - name: '', - type: 'string' - } - ], - stateMutability: 'view', - type: 'function' - }, - { - inputs: [], - name: 'totalSupply', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256' - } - ], - stateMutability: 'view', - type: 'function' - }, - { - inputs: [ - { - internalType: 'address', - name: 'to', - type: 'address' - }, - { - internalType: 'uint256', - name: 'value', - type: 'uint256' - } - ], - name: 'transfer', - outputs: [ - { - internalType: 'bool', - name: '', - type: 'bool' - } - ], - stateMutability: 'nonpayable', - type: 'function' - }, - { - inputs: [ - { - internalType: 'address', - name: 'from', - type: 'address' - }, - { - internalType: 'address', - name: 'to', - type: 'address' - }, - { - internalType: 'uint256', - name: 'value', - type: 'uint256' - } - ], - name: 'transferFrom', - outputs: [ - { - internalType: 'bool', - name: '', - type: 'bool' - } - ], - stateMutability: 'nonpayable', - type: 'function' - } -] - -export const TEST_ERC20_BYTECODE = - '0x60806040523480156200001157600080fd5b506040516200128b3803806200128b833981810160405281019062000037919062000250565b82600390816200004891906200053b565b5081600490816200005a91906200053b565b5080600560006101000a81548160ff021916908360ff16021790555050505062000622565b6000604051905090565b600080fd5b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b620000e8826200009d565b810181811067ffffffffffffffff821117156200010a5762000109620000ae565b5b80604052505050565b60006200011f6200007f565b90506200012d8282620000dd565b919050565b600067ffffffffffffffff82111562000150576200014f620000ae565b5b6200015b826200009d565b9050602081019050919050565b60005b83811015620001885780820151818401526020810190506200016b565b60008484015250505050565b6000620001ab620001a58462000132565b62000113565b905082815260208101848484011115620001ca57620001c962000098565b5b620001d784828562000168565b509392505050565b600082601f830112620001f757620001f662000093565b5b81516200020984826020860162000194565b91505092915050565b600060ff82169050919050565b6200022a8162000212565b81146200023657600080fd5b50565b6000815190506200024a816200021f565b92915050565b6000806000606084860312156200026c576200026b62000089565b5b600084015167ffffffffffffffff8111156200028d576200028c6200008e565b5b6200029b86828701620001df565b935050602084015167ffffffffffffffff811115620002bf57620002be6200008e565b5b620002cd86828701620001df565b9250506040620002e08682870162000239565b9150509250925092565b600081519050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b600060028204905060018216806200033d57607f821691505b602082108103620003535762000352620002f5565b5b50919050565b60008190508160005260206000209050919050565b60006020601f8301049050919050565b60008160020a8302905092915050565b600060088302620003c07fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff826200037e565b620003cc86836200037e565b95508019841693508086168417925050509392505050565b6000819050919050565b6000819050919050565b600062000419620004136200040d84620003e4565b620003ee565b620003e4565b9050919050565b6000819050919050565b6200043583620003f8565b6200044d620004448262000420565b8484546200038e565b825550505050565b600090565b6200046462000455565b620004718184846200042a565b505050565b5b8181101562000499576200048d6000826200045a565b60018101905062000477565b5050565b601f821115620004e857620004b28162000359565b620004bd846200036e565b81016020851015620004cd578190505b620004e5620004dc856200036e565b83018262000476565b50505b505050565b60008160020a8304905092915050565b60006200051060001984600802620004ed565b1980831691505092915050565b60006200052b8383620004fd565b9150826002028217905092915050565b6200054682620002ea565b67ffffffffffffffff811115620005625762000561620000ae565b5b6200056e825462000324565b6200057b8282856200049d565b600060209050601f831160018114620005b357600084156200059e578287015190505b620005aa85826200051d565b8655506200061a565b601f198416620005c38662000359565b60005b82811015620005ed57848901518255600182019150602085019450602081019050620005c6565b868310156200060d578489015162000609601f891682620004fd565b8355505b6001600288020188555050505b505050505050565b610c5980620006326000396000f3fe608060405234801561001057600080fd5b50600436106100bb576000357c01000000000000000000000000000000000000000000000000000000009004806340c10f191161008357806340c10f191461017a57806370a082311461019657806395d89b41146101c6578063a9059cbb146101e4578063dd62ed3e14610214576100bb565b806306fdde03146100c0578063095ea7b3146100de57806318160ddd1461010e57806323b872dd1461012c578063313ce5671461015c575b600080fd5b6100c8610244565b6040516100d591906108da565b60405180910390f35b6100f860048036038101906100f39190610995565b6102d2565b60405161010591906109f0565b60405180910390f35b6101166103c4565b6040516101239190610a1a565b60405180910390f35b61014660048036038101906101419190610a35565b6103ca565b60405161015391906109f0565b60405180910390f35b610164610579565b6040516101719190610aa4565b60405180910390f35b610194600480360381019061018f9190610995565b61058c565b005b6101b060048036038101906101ab9190610abf565b610664565b6040516101bd9190610a1a565b60405180910390f35b6101ce61067c565b6040516101db91906108da565b60405180910390f35b6101fe60048036038101906101f99190610995565b61070a565b60405161020b91906109f0565b60405180910390f35b61022e60048036038101906102299190610aec565b610825565b60405161023b9190610a1a565b60405180910390f35b6003805461025190610b5b565b80601f016020809104026020016040519081016040528092919081815260200182805461027d90610b5b565b80156102ca5780601f1061029f576101008083540402835291602001916102ca565b820191906000526020600020905b8154815290600101906020018083116102ad57829003601f168201915b505050505081565b600081600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925846040516103b29190610a1a565b60405180910390a36001905092915050565b60025481565b6000816000808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825461041a9190610bbb565b92505081905550816000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825461046f9190610bef565b9250508190555081600160008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282546105029190610bbb565b925050819055508273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040516105669190610a1a565b60405180910390a3600190509392505050565b600560009054906101000a900460ff1681565b806002600082825461059e9190610bef565b92505081905550806000808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282546105f39190610bef565b925050819055508173ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040516106589190610a1a565b60405180910390a35050565b60006020528060005260406000206000915090505481565b6004805461068990610b5b565b80601f01602080910402602001604051908101604052809291908181526020018280546106b590610b5b565b80156107025780601f106106d757610100808354040283529160200191610702565b820191906000526020600020905b8154815290600101906020018083116106e557829003601f168201915b505050505081565b6000816000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825461075a9190610bbb565b92505081905550816000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282546107af9190610bef565b925050819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040516108139190610a1a565b60405180910390a36001905092915050565b6001602052816000526040600020602052806000526040600020600091509150505481565b600081519050919050565b600082825260208201905092915050565b60005b83811015610884578082015181840152602081019050610869565b60008484015250505050565b6000601f19601f8301169050919050565b60006108ac8261084a565b6108b68185610855565b93506108c6818560208601610866565b6108cf81610890565b840191505092915050565b600060208201905081810360008301526108f481846108a1565b905092915050565b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600061092c82610901565b9050919050565b61093c81610921565b811461094757600080fd5b50565b60008135905061095981610933565b92915050565b6000819050919050565b6109728161095f565b811461097d57600080fd5b50565b60008135905061098f81610969565b92915050565b600080604083850312156109ac576109ab6108fc565b5b60006109ba8582860161094a565b92505060206109cb85828601610980565b9150509250929050565b60008115159050919050565b6109ea816109d5565b82525050565b6000602082019050610a0560008301846109e1565b92915050565b610a148161095f565b82525050565b6000602082019050610a2f6000830184610a0b565b92915050565b600080600060608486031215610a4e57610a4d6108fc565b5b6000610a5c8682870161094a565b9350506020610a6d8682870161094a565b9250506040610a7e86828701610980565b9150509250925092565b600060ff82169050919050565b610a9e81610a88565b82525050565b6000602082019050610ab96000830184610a95565b92915050565b600060208284031215610ad557610ad46108fc565b5b6000610ae38482850161094a565b91505092915050565b60008060408385031215610b0357610b026108fc565b5b6000610b118582860161094a565b9250506020610b228582860161094a565b9150509250929050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b60006002820490506001821680610b7357607f821691505b602082108103610b8657610b85610b2c565b5b50919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000610bc68261095f565b9150610bd18361095f565b9250828203905081811115610be957610be8610b8c565b5b92915050565b6000610bfa8261095f565b9150610c058361095f565b9250828201905080821115610c1d57610c1c610b8c565b5b9291505056fea2646970667358221220129f37bd61cdb5c232d63f8cc989264602a3f614c75e0376a02d7d2d2d8910a164736f6c63430008150033' - -export function createERC20(signer: ethers.Signer, name: string, symbol: string, decimals: number) { - return new ethers.ContractFactory(TEST_ERC20_ABI, TEST_ERC20_BYTECODE, signer).deploy(name, symbol, decimals) -} diff --git a/old/packages/tests/src/utils.ts b/old/packages/tests/src/utils.ts deleted file mode 100644 index dcff3bd0e..000000000 --- a/old/packages/tests/src/utils.ts +++ /dev/null @@ -1,35 +0,0 @@ -import { ethers } from 'ethers' -import { Artifact } from './builds' -import { MAX_UINT_256 } from '@0xsequence/utils' - -export function deployContract(signer: ethers.Signer, artifact: Artifact, ...args: any[]) { - const factory = new ethers.ContractFactory(artifact.abi, artifact.bytecode, signer) - return factory.deploy(...args) -} - -export function randomBigInt(min: ethers.BigNumberish = 0, max: ethers.BigNumberish = MAX_UINT_256): bigint { - const randomHex = ethers.hexlify(ethers.randomBytes(32)) - const randomNumber = BigInt(randomHex) - const minNumber = BigInt(min) - const maxNumber = BigInt(max) - const range = maxNumber - minNumber - - if (range <= 0n) { - throw new Error('max must be greater than min') - } - - return (randomNumber % range) + minNumber -} - -export function maxForBits(bits: number): bigint { - return 2n ** BigInt(bits) - 1n -} - -export function randomBool(): boolean { - return Math.random() >= 0.5 -} - -export async function isContract(provider: ethers.Provider, address: string): Promise { - const c = await provider.getCode(address) - return ethers.getBytes(c).length > 0 -} diff --git a/old/packages/utils/CHANGELOG.md b/old/packages/utils/CHANGELOG.md deleted file mode 100644 index 64225f07a..000000000 --- a/old/packages/utils/CHANGELOG.md +++ /dev/null @@ -1,2093 +0,0 @@ -# @0xsequence/utils - -## 2.3.8 - -### Patch Changes - -- indexer: update clients - -## 2.3.7 - -### Patch Changes - -- Metadata updates - -## 2.3.6 - -### Patch Changes - -- New chains - -## 2.3.5 - -### Patch Changes - -- Add Frequency Testnet - -## 2.3.4 - -### Patch Changes - -- metadata: exclude deprecated methods on rpc client - -## 2.3.3 - -### Patch Changes - -- metadata: client update - -## 2.3.2 - -### Patch Changes - -- metadata: update rpc client - -## 2.3.1 - -### Patch Changes - -- indexer: update rpc client - -## 2.3.0 - -### Minor Changes - -- update metadata rpc client - -## 2.2.15 - -### Patch Changes - -- API updates - -## 2.2.14 - -### Patch Changes - -- Somnia Testnet and Monad Testnet - -## 2.2.13 - -### Patch Changes - -- Add XR1 to all networks - -## 2.2.12 - -### Patch Changes - -- Add XR1 - -## 2.2.11 - -### Patch Changes - -- Relayer updates - -## 2.2.10 - -### Patch Changes - -- Etherlink support - -## 2.2.9 - -### Patch Changes - -- Indexer gateway native token balances - -## 2.2.8 - -### Patch Changes - -- Add Moonbeam and Moonbase Alpha - -## 2.2.7 - -### Patch Changes - -- Update Builder package - -## 2.2.6 - -### Patch Changes - -- Update relayer package - -## 2.2.5 - -### Patch Changes - -- auth: fix sequence indexer gateway url -- account: immutable wallet proxy hook - -## 2.2.4 - -### Patch Changes - -- network: update soneium mainnet block explorer url -- waas: signTypedData intent support - -## 2.2.3 - -### Patch Changes - -- provider: updating initWallet to use connected network configs if they exist - -## 2.2.2 - -### Patch Changes - -- pass projectAccessKey to relayer at all times - -## 2.2.1 - -### Patch Changes - -- waas-ethers: sign typed data - -## 2.2.0 - -### Minor Changes - -- indexer: gateway client -- @0xsequence/builder -- upgrade puppeteer to v23.10.3 - -## 2.1.8 - -### Patch Changes - -- Add Soneium Mainnet - -## 2.1.7 - -### Patch Changes - -- guard: pass project access key to guard requests - -## 2.1.6 - -### Patch Changes - -- Add LAOS and Telos Testnet chains - -## 2.1.5 - -### Patch Changes - -- account: save presigned configuration with reference chain id 1 - -## 2.1.4 - -### Patch Changes - -- provider: pass projectAccessKey into MuxMessageProvider - -## 2.1.3 - -### Patch Changes - -- waas: time drift date fix due to strange browser quirk - -## 2.1.2 - -### Patch Changes - -- provider: export analytics correctly - -## 2.1.1 - -### Patch Changes - -- Add LAOS chain support - -## 2.1.0 - -### Minor Changes - -- account: forward project access key when estimating fees and sending transactions - -### Patch Changes - -- sessions: save signatures with reference chain id - -## 2.0.26 - -### Patch Changes - -- account: fix chain id comparison - -## 2.0.25 - -### Patch Changes - -- skale-nebula: deploy gas limit = 10m - -## 2.0.24 - -### Patch Changes - -- sessions: arweave: configurable gateway url -- waas: use /status to get time drift before sending any intents - -## 2.0.23 - -### Patch Changes - -- Add The Root Network support - -## 2.0.22 - -### Patch Changes - -- Add SKALE Nebula Mainnet support - -## 2.0.21 - -### Patch Changes - -- account: add publishWitnessFor - -## 2.0.20 - -### Patch Changes - -- upgrade deps, and improve waas session status handling - -## 2.0.19 - -### Patch Changes - -- Add Immutable zkEVM support - -## 2.0.18 - -### Patch Changes - -- waas: new contractCall transaction type -- sessions: add arweave owner - -## 2.0.17 - -### Patch Changes - -- update waas auth to clear session before signIn - -## 2.0.16 - -### Patch Changes - -- Removed Astar chains - -## 2.0.15 - -### Patch Changes - -- indexer: update bindings with token balance additions - -## 2.0.14 - -### Patch Changes - -- sessions: arweave config reader -- network: add b3 and apechain mainnet configs - -## 2.0.13 - -### Patch Changes - -- network: toy-testnet - -## 2.0.12 - -### Patch Changes - -- api: update bindings - -## 2.0.11 - -### Patch Changes - -- waas: intents test fix -- api: update bindings - -## 2.0.10 - -### Patch Changes - -- network: soneium minato testnet - -## 2.0.9 - -### Patch Changes - -- network: fix SKALE network name - -## 2.0.8 - -### Patch Changes - -- metadata: update bindings - -## 2.0.7 - -### Patch Changes - -- wallet request handler fix - -## 2.0.6 - -### Patch Changes - -- network: matic -> pol - -## 2.0.5 - -### Patch Changes - -- provider: update databeat to 0.9.2 - -## 2.0.4 - -### Patch Changes - -- network: add skale-nebula-testnet - -## 2.0.3 - -### Patch Changes - -- waas: check session status in SequenceWaaS.isSignedIn() - -## 2.0.2 - -### Patch Changes - -- sessions: property convert serialized bignumber hex value to bigint - -## 2.0.1 - -### Patch Changes - -- waas: http signature check for authenticator requests -- provider: unwrap legacy json rpc responses -- use json replacer and reviver for bigints - -## 2.0.0 - -### Major Changes - -- ethers v6 - -## 1.10.15 - -### Patch Changes - -- utils: extractProjectIdFromAccessKey - -## 1.10.14 - -### Patch Changes - -- network: add borne-testnet to allNetworks - -## 1.10.13 - -### Patch Changes - -- network: add borne testnet - -## 1.10.12 - -### Patch Changes - -- api: update bindings -- global/window -> globalThis - -## 1.10.11 - -### Patch Changes - -- waas: updated intent.gen without webrpc types, errors exported from authenticator.gen - -## 1.10.10 - -### Patch Changes - -- metadata: update bindings with new contract collections api - -## 1.10.9 - -### Patch Changes - -- waas minor update - -## 1.10.8 - -### Patch Changes - -- update metadata bindings - -## 1.10.7 - -### Patch Changes - -- minor fixes to waas client - -## 1.10.6 - -### Patch Changes - -- metadata: update bindings - -## 1.10.5 - -### Patch Changes - -- network: ape-chain-testnet -> apechain-testnet - -## 1.10.4 - -### Patch Changes - -- network: add b3-sepolia, ape-chain-testnet, blast, blast-sepolia - -## 1.10.3 - -### Patch Changes - -- typing fix - -## 1.10.2 - -### Patch Changes - -- - waas: add getIdToken method - - indexer: update api client - -## 1.10.1 - -### Patch Changes - -- metadata: update bindings - -## 1.10.0 - -### Minor Changes - -- waas release v1.3.0 - -## 1.9.37 - -### Patch Changes - -- network: adds nativeToken data to NetworkMetadata constants - -## 1.9.36 - -### Patch Changes - -- guard: export client - -## 1.9.35 - -### Patch Changes - -- guard: update bindings - -## 1.9.34 - -### Patch Changes - -- waas: always use lowercase email - -## 1.9.33 - -### Patch Changes - -- waas: umd build - -## 1.9.32 - -### Patch Changes - -- indexer: update bindings - -## 1.9.31 - -### Patch Changes - -- metadata: token directory changes - -## 1.9.30 - -### Patch Changes - -- update - -## 1.9.29 - -### Patch Changes - -- disable gnosis chain - -## 1.9.28 - -### Patch Changes - -- add utils/merkletree - -## 1.9.27 - -### Patch Changes - -- network: optimistic -> optimism -- waas: remove defaults -- api, sessions: update bindings - -## 1.9.26 - -### Patch Changes - -- - add backend interfaces for pluggable interfaces - - introduce @0xsequence/react-native - - update pnpm to lockfile v9 - -## 1.9.25 - -### Patch Changes - -- update webrpc clients with new error types - -## 1.9.24 - -### Patch Changes - -- waas: add memoryStore backend to localStore - -## 1.9.23 - -### Patch Changes - -- update api client bindings - -## 1.9.22 - -### Patch Changes - -- update metadata client bindings - -## 1.9.21 - -### Patch Changes - -- api client bindings - -## 1.9.20 - -### Patch Changes - -- api client bindings update - -## 1.9.19 - -### Patch Changes - -- waas update - -## 1.9.18 - -### Patch Changes - -- provider: prohibit dangerous functions - -## 1.9.17 - -### Patch Changes - -- network: add xr-sepolia - -## 1.9.16 - -### Patch Changes - -- waas: sequence.feeOptions - -## 1.9.15 - -### Patch Changes - -- metadata: collection external_link field name fix - -## 1.9.14 - -### Patch Changes - -- network: astar-zkatana -> astar-zkyoto -- network: deprecate polygon mumbai network -- network: add xai and polygon amoy - -## 1.9.13 - -### Patch Changes - -- waas: fix @0xsequence/network dependency - -## 1.9.12 - -### Patch Changes - -- indexer: update rpc bindings -- provider: signMessage: Serialize the BytesLike or string message into hexstring before sending -- waas: SessionAuthProof - -## 1.9.11 - -### Patch Changes - -- metdata, update rpc bindings - -## 1.9.10 - -### Patch Changes - -- update metadata rpc bindings - -## 1.9.9 - -### Patch Changes - -- metadata, add SequenceCollections rpc client - -## 1.9.8 - -### Patch Changes - -- waas client update - -## 1.9.7 - -### Patch Changes - -- update rpc client bindings for api, metadata and relayer - -## 1.9.6 - -### Patch Changes - -- waas package update - -## 1.9.5 - -### Patch Changes - -- RpcRelayer prioritize project access key - -## 1.9.4 - -### Patch Changes - -- waas: fix network dependency - -## 1.9.3 - -### Patch Changes - -- provider: don't append access key to RPC url if user has already provided it - -## 1.9.2 - -### Patch Changes - -- network: add xai-sepolia - -## 1.9.1 - -### Patch Changes - -- analytics fix - -## 1.9.0 - -### Minor Changes - -- waas release - -## 1.8.8 - -### Patch Changes - -- update metadata bindings - -## 1.8.7 - -### Patch Changes - -- provider: update databeat to 0.9.1 - -## 1.8.6 - -### Patch Changes - -- guard: SignedOwnershipProof - -## 1.8.5 - -### Patch Changes - -- guard: signOwnershipProof and isSignedOwnershipProof - -## 1.8.4 - -### Patch Changes - -- network: add homeverse to networks list - -## 1.8.3 - -### Patch Changes - -- api: introduce basic linked wallet support - -## 1.8.2 - -### Patch Changes - -- provider: don't initialize analytics unless explicitly requested - -## 1.8.1 - -### Patch Changes - -- update to analytics provider - -## 1.8.0 - -### Minor Changes - -- provider: project analytics - -## 1.7.2 - -### Patch Changes - -- 0xsequence: ChainId should not be exported as a type -- account, wallet: fix nonce selection - -## 1.7.1 - -### Patch Changes - -- network: add missing avalanche logoURI - -## 1.7.0 - -### Minor Changes - -- provider: projectAccessKey is now required - -### Patch Changes - -- network: add NetworkMetadata.logoURI property for all networks - -## 1.6.3 - -### Patch Changes - -- network list update - -## 1.6.2 - -### Patch Changes - -- auth: projectAccessKey option -- wallet: use 12 bytes for random space - -## 1.6.1 - -### Patch Changes - -- core: add simple config from subdigest support -- core: fix encode tree with subdigest -- account: implement buildOnChainSignature on Account - -## 1.6.0 - -### Minor Changes - -- account, wallet: parallel transactions by default - -### Patch Changes - -- provider: emit disconnect on sign out - -## 1.5.0 - -### Minor Changes - -- signhub: add 'signing' signer status - -### Patch Changes - -- auth: Session.open: onAccountAddress callback -- account: allow empty transaction bundles - -## 1.4.9 - -### Patch Changes - -- rename SequenceMetadataClient to SequenceMetadata - -## 1.4.8 - -### Patch Changes - -- account: Account.getSigners - -## 1.4.7 - -### Patch Changes - -- update indexer client bindings - -## 1.4.6 - -### Patch Changes - -- - add sepolia networks, mark goerli as deprecated - - update indexer client bindings - -## 1.4.5 - -### Patch Changes - -- indexer/metadata: update client bindings -- auth: selectWallet with new address - -## 1.4.4 - -### Patch Changes - -- indexer: update bindings -- auth: handle jwt expiry - -## 1.4.3 - -### Patch Changes - -- guard: return active status from GuardSigner.getAuthMethods - -## 1.4.2 - -### Patch Changes - -- guard: update bindings - -## 1.4.1 - -### Patch Changes - -- network: remove unused networks -- signhub: orchestrator interface -- guard: auth methods interface -- guard: update bindings for pin and totp -- guard: no more retry logic - -## 1.4.0 - -### Minor Changes - -- project access key support - -## 1.3.0 - -### Minor Changes - -- signhub: account children - -### Patch Changes - -- guard: do not throw when building deploy transaction -- network: snowtrace.io -> subnets.avax.network/c-chain - -## 1.2.9 - -### Patch Changes - -- account: AccountSigner.sendTransaction simulateForFeeOptions -- relayer: update bindings - -## 1.2.8 - -### Patch Changes - -- rename X-Sequence-Token-Key header to X-Access-Key - -## 1.2.7 - -### Patch Changes - -- add x-sequence-token-key to clients - -## 1.2.6 - -### Patch Changes - -- Fix bind multicall provider - -## 1.2.5 - -### Patch Changes - -- Multicall default configuration fixes - -## 1.2.4 - -### Patch Changes - -- provider: Adding missing payment provider types to PaymentProviderOption -- provider: WalletRequestHandler.notifyChainChanged - -## 1.2.3 - -### Patch Changes - -- auth, provider: connect to accept optional authorizeNonce - -## 1.2.2 - -### Patch Changes - -- provider: allow createContract calls -- core: check for explicit zero address in contract deployments - -## 1.2.1 - -### Patch Changes - -- auth: use sequence api chain id as reference chain id if available - -## 1.2.0 - -### Minor Changes - -- split services from session, better local support - -## 1.1.15 - -### Patch Changes - -- guard: remove error filtering - -## 1.1.14 - -### Patch Changes - -- guard: add GuardSigner.onError - -## 1.1.13 - -### Patch Changes - -- provider: pass client version with connect options -- provider: removing large from BannerSize - -## 1.1.12 - -### Patch Changes - -- provider: adding bannerSize to ConnectOptions - -## 1.1.11 - -### Patch Changes - -- add homeverse configs - -## 1.1.10 - -### Patch Changes - -- handle default EIP6492 on send - -## 1.1.9 - -### Patch Changes - -- Custom default EIP6492 on client - -## 1.1.8 - -### Patch Changes - -- metadata: searchMetadata: add types filter - -## 1.1.7 - -### Patch Changes - -- adding signInWith connect settings option to allow dapps to automatically login their users with a certain provider optimizing the normal authentication flow - -## 1.1.6 - -### Patch Changes - -- metadata: searchMetadata: add chainID and excludeTokenMetadata filters - -## 1.1.5 - -### Patch Changes - -- account: re-compute meta-transaction id for wallet deployment transactions - -## 1.1.4 - -### Patch Changes - -- network: rename base-mainnet to base -- provider: override isDefaultChain with ConnectOptions.networkId if provided - -## 1.1.3 - -### Patch Changes - -- provider: use network id from transport session -- provider: sign authorization using ConnectOptions.networkId if provided - -## 1.1.2 - -### Patch Changes - -- provider: jsonrpc chain id fixes - -## 1.1.1 - -### Patch Changes - -- network: add base mainnet and sepolia -- provider: reject toxic transaction requests - -## 1.1.0 - -### Minor Changes - -- Refactor dapp facing provider - -## 1.0.5 - -### Patch Changes - -- network: export network constants -- guard: use the correct global for fetch -- network: nova-explorer.arbitrum.io -> nova.arbiscan.io - -## 1.0.4 - -### Patch Changes - -- provider: accept name or number for networkId - -## 1.0.3 - -### Patch Changes - -- Simpler isValidSignature helpers - -## 1.0.2 - -### Patch Changes - -- add extra signature validation utils methods - -## 1.0.1 - -### Patch Changes - -- add homeverse testnet - -## 1.0.0 - -### Major Changes - -- https://sequence.xyz/blog/sequence-wallet-light-state-sync-full-merkle-wallets - -## 0.43.34 - -### Patch Changes - -- auth: no jwt for indexer - -## 0.43.33 - -### Patch Changes - -- Adding onConnectOptionsChange handler to WalletRequestHandler - -## 0.43.32 - -### Patch Changes - -- add Base Goerli network - -## 0.43.31 - -### Patch Changes - -- remove AuxDataProvider, add promptSignInConnect - -## 0.43.30 - -### Patch Changes - -- add arbitrum goerli testnet - -## 0.43.29 - -### Patch Changes - -- provider: check availability of window object - -## 0.43.28 - -### Patch Changes - -- update api bindings - -## 0.43.27 - -### Patch Changes - -- Add rpc is sequence method - -## 0.43.26 - -### Patch Changes - -- add zkevm url to enum - -## 0.43.25 - -### Patch Changes - -- added polygon zkevm to mainnet networks - -## 0.43.24 - -### Patch Changes - -- name change from zkevm to polygon-zkevm - -## 0.43.23 - -### Patch Changes - -- update zkEVM name to Polygon zkEVM - -## 0.43.22 - -### Patch Changes - -- add zkevm chain - -## 0.43.21 - -### Patch Changes - -- api: update client bindings - -## 0.43.20 - -### Patch Changes - -- indexer: update bindings - -## 0.43.19 - -### Patch Changes - -- session proof update - -## 0.43.18 - -### Patch Changes - -- rpc client global check, hardening - -## 0.43.17 - -### Patch Changes - -- rpc clients, check of 'global' is defined - -## 0.43.16 - -### Patch Changes - -- ethers peerDep to v5, update rpc client global use - -## 0.43.15 - -### Patch Changes - -- - provider: expand receiver type on some util methods - -## 0.43.14 - -### Patch Changes - -- bump - -## 0.43.13 - -### Patch Changes - -- update rpc bindings - -## 0.43.12 - -### Patch Changes - -- provider: single wallet init, and add new unregisterWallet() method - -## 0.43.11 - -### Patch Changes - -- fix lockfiles -- re-add mocha type deleter - -## 0.43.10 - -### Patch Changes - -- various improvements - -## 0.43.9 - -### Patch Changes - -- update deps - -## 0.43.8 - -### Patch Changes - -- network: JsonRpcProvider with caching - -## 0.43.7 - -### Patch Changes - -- provider: fix wallet network init - -## 0.43.6 - -### Patch Changes - -- metadatata: update rpc bindings - -## 0.43.5 - -### Patch Changes - -- provider: do not set default network for connect messages -- provider: forward missing error message - -## 0.43.4 - -### Patch Changes - -- no-change version bump to fix incorrectly tagged snapshot build - -## 0.43.3 - -### Patch Changes - -- metadata: update bindings - -## 0.43.2 - -### Patch Changes - -- provider: implement connectUnchecked - -## 0.43.1 - -### Patch Changes - -- update to latest ethauth dep - -## 0.43.0 - -### Minor Changes - -- move ethers to a peer dependency - -## 0.42.10 - -### Patch Changes - -- add auxDataProvider - -## 0.42.9 - -### Patch Changes - -- provider: add eip-191 exceptions - -## 0.42.8 - -### Patch Changes - -- provider: skip setting intent origin if we're unity plugin - -## 0.42.7 - -### Patch Changes - -- Add sign in options to connection settings - -## 0.42.6 - -### Patch Changes - -- api bindings update - -## 0.42.5 - -### Patch Changes - -- relayer: don't treat missing receipt as hard failure - -## 0.42.4 - -### Patch Changes - -- provider: add custom app protocol to connect options - -## 0.42.3 - -### Patch Changes - -- update api bindings - -## 0.42.2 - -### Patch Changes - -- disable rinkeby network - -## 0.42.1 - -### Patch Changes - -- wallet: optional waitForReceipt parameter - -## 0.42.0 - -### Minor Changes - -- relayer: estimateGasLimits -> simulate -- add simulator package - -### Patch Changes - -- transactions: fix flattenAuxTransactions -- provider: only filter nullish values -- provider: re-map transaction 'gas' back to 'gasLimit' - -## 0.41.3 - -### Patch Changes - -- api bindings update - -## 0.41.2 - -### Patch Changes - -- api bindings update - -## 0.41.1 - -### Patch Changes - -- update default networks - -## 0.41.0 - -### Minor Changes - -- relayer: fix Relayer.wait() interface - - The interface for calling Relayer.wait() has changed. Instead of a single optional ill-defined timeout/delay parameter, there are three optional parameters, in order: - - - timeout: the maximum time to wait for the transaction receipt - - delay: the polling interval, i.e. the time to wait between requests - - maxFails: the maximum number of hard failures to tolerate before giving up - - Please update your codebase accordingly. - -- relayer: add optional waitForReceipt parameter to Relayer.relay - - The behaviour of Relayer.relay() was not well-defined with respect to whether or not it waited for a receipt. - This change allows the caller to specify whether to wait or not, with the default behaviour being to wait. - -### Patch Changes - -- relayer: wait receipt retry logic -- fix wrapped object error -- provider: forward delegateCall and revertOnError transaction fields - -## 0.40.6 - -### Patch Changes - -- add arbitrum-nova chain - -## 0.40.5 - -### Patch Changes - -- api: update bindings - -## 0.40.4 - -### Patch Changes - -- add unreal transport - -## 0.40.3 - -### Patch Changes - -- provider: fix MessageToSign message type - -## 0.40.2 - -### Patch Changes - -- Wallet provider, loadSession method - -## 0.40.1 - -### Patch Changes - -- export sequence.initWallet and sequence.getWallet - -## 0.40.0 - -### Minor Changes - -- add sequence.initWallet(network, config) and sequence.getWallet() helper methods - -## 0.39.6 - -### Patch Changes - -- indexer: update client bindings - -## 0.39.5 - -### Patch Changes - -- provider: fix networkRpcUrl config option - -## 0.39.4 - -### Patch Changes - -- api: update client bindings - -## 0.39.3 - -### Patch Changes - -- add request method on Web3Provider - -## 0.39.2 - -### Patch Changes - -- update umd name - -## 0.39.1 - -### Patch Changes - -- add Aurora network -- add origin info for accountsChanged event to handle it per dapp - -## 0.39.0 - -### Minor Changes - -- abstract window.localStorage to interface type - -## 0.38.2 - -### Patch Changes - -- provider: add Settings.defaultPurchaseAmount - -## 0.38.1 - -### Patch Changes - -- update api and metadata rpc bindings - -## 0.38.0 - -### Minor Changes - -- api: update bindings, change TokenPrice interface -- bridge: remove @0xsequence/bridge package -- api: update bindings, rename ContractCallArg to TupleComponent - -## 0.37.1 - -### Patch Changes - -- Add back sortNetworks - Removing sorting was a breaking change for dapps on older versions which directly integrate sequence. - -## 0.37.0 - -### Minor Changes - -- network related fixes and improvements -- api: bindings: exchange rate lookups - -## 0.36.13 - -### Patch Changes - -- api: update bindings with new price endpoints - -## 0.36.12 - -### Patch Changes - -- wallet: skip remote signers if not needed -- auth: check that signature meets threshold before requesting auth token - -## 0.36.11 - -### Patch Changes - -- Prefix EIP191 message on wallet-request-handler - -## 0.36.10 - -### Patch Changes - -- support bannerUrl on connect - -## 0.36.9 - -### Patch Changes - -- minor dev xp improvements - -## 0.36.8 - -### Patch Changes - -- more connect options (theme, payment providers, funding currencies) - -## 0.36.7 - -### Patch Changes - -- fix missing break - -## 0.36.6 - -### Patch Changes - -- wallet_switchEthereumChain support - -## 0.36.5 - -### Patch Changes - -- auth: bump ethauth to 0.7.0 - network, wallet: don't assume position of auth network in list - api/indexer/metadata: trim trailing slash on hostname, and add endpoint urls - relayer: Allow to specify local relayer transaction parameters like gas price or gas limit - -## 0.36.4 - -### Patch Changes - -- Updating list of chain ids to include other ethereum compatible chains - -## 0.36.3 - -### Patch Changes - -- provider: pass connect options to prompter methods - -## 0.36.2 - -### Patch Changes - -- transactions: Setting target to 0x0 when empty to during SequenceTxAbiEncode - -## 0.36.1 - -### Patch Changes - -- metadata: update client with more fields - -## 0.36.0 - -### Minor Changes - -- relayer, wallet: fee quote support - -## 0.35.12 - -### Patch Changes - -- provider: rename wallet.commands to wallet.utils - -## 0.35.11 - -### Patch Changes - -- provider/utils: smoother message validation - -## 0.35.10 - -### Patch Changes - -- upgrade deps - -## 0.35.9 - -### Patch Changes - -- provider: window-transport override event handlers with new wallet instance - -## 0.35.8 - -### Patch Changes - -- provider: async wallet sign in improvements - -## 0.35.7 - -### Patch Changes - -- config: cache wallet configs - -## 0.35.6 - -### Patch Changes - -- provider: support async signin of wallet request handler - -## 0.35.5 - -### Patch Changes - -- wallet: skip threshold check during fee estimation - -## 0.35.4 - -### Patch Changes - -- - browser extension mode, center window - -## 0.35.3 - -### Patch Changes - -- - update window position when in browser extension mode - -## 0.35.2 - -### Patch Changes - -- - provider: WindowMessageHandler accept optional windowHref - -## 0.35.1 - -### Patch Changes - -- wallet: update config on undeployed too - -## 0.35.0 - -### Minor Changes - -- - config: add buildStubSignature - - provider: add checks to signing cases for wallet deployment and config statuses - - provider: add prompt for wallet deployment - - relayer: add BaseRelayer.prependWalletDeploy - - relayer: add Relayer.feeOptions - - relayer: account for wallet deployment in fee estimation - - transactions: add fromTransactionish - - wallet: add Account.prependConfigUpdate - - wallet: add Account.getFeeOptions - -## 0.34.0 - -### Minor Changes - -- - upgrade deps - -## 0.31.0 - -### Minor Changes - -- - upgrading to ethers v5.5 - -## 0.30.0 - -### Minor Changes - -- - upgrade most deps - -## 0.29.8 - -### Patch Changes - -- update api - -## 0.29.0 - -### Minor Changes - -- major architectural changes in Sequence design - - - only one API instance, API is no longer a per-chain service - - separate per-chain indexer service, API no longer handles indexing - - single contract metadata service, API no longer serves metadata - - chaind package has been removed, indexer and metadata packages have been added - - stronger typing with new explicit ChainId type - - multicall fixes and improvements - - forbid "wait" transactions in sendTransactionBatch calls - -## 0.28.0 - -### Minor Changes - -- extension provider - -## 0.27.0 - -### Minor Changes - -- Add requireFreshSigner lib to sessions - -## 0.25.1 - -### Patch Changes - -- Fix build typescrypt issue - -## 0.25.0 - -### Minor Changes - -- 10c8af8: Add estimator package - Fix multicall few calls bug - -## 0.23.0 - -### Minor Changes - -- - relayer: offer variety of gas fee options from the relayer service" - -## 0.22.2 - -### Patch Changes - -- e1c109e: Fix authProof on expired sessions - -## 0.22.1 - -### Patch Changes - -- transport session cache - -## 0.22.0 - -### Minor Changes - -- e667b65: Expose all relayer options on networks - -## 0.21.5 - -### Patch Changes - -- Give priority to metaTxnId returned by relayer - -## 0.21.4 - -### Patch Changes - -- Add has enough signers method - -## 0.21.3 - -### Patch Changes - -- add window session cache - -## 0.21.2 - -### Patch Changes - -- exception handlind in relayer - -## 0.21.0 - -### Minor Changes - -- - fix gas estimation on wallets with large number of signers - - update to session handling and wallet config construction upon auth - -## 0.19.3 - -### Patch Changes - -- jwtAuth visibility, package version sync - -## 0.19.0 - -### Minor Changes - -- - provider, improve dapp / wallet transport io - -## 0.18.0 - -### Minor Changes - -- relayer improvements and pending transaction handling - -## 0.16.0 - -### Minor Changes - -- relayer as its own service separate from chaind - -## 0.15.1 - -### Patch Changes - -- update api clients - -## 0.14.3 - -### Patch Changes - -- Fix 0xSequence relayer dependencies - -## 0.14.2 - -### Patch Changes - -- Add debug logs to rpc-relayer - -## 0.14.0 - -### Minor Changes - -- update sequence utils finder which includes optimization - -## 0.13.0 - -### Minor Changes - -- Update SequenceUtils deployed contract - -## 0.12.1 - -### Patch Changes - -- npm bump - -## 0.12.0 - -### Minor Changes - -- provider: improvements to window transport - -## 0.11.4 - -### Patch Changes - -- update api client - -## 0.11.3 - -### Patch Changes - -- improve openWindow state options handling - -## 0.11.2 - -### Patch Changes - -- Fix multicall proxy scopes - -## 0.11.1 - -### Patch Changes - -- Add support for dynamic and nested signatures - -## 0.11.0 - -### Minor Changes - -- Update wallet context to 1.7 contracts - -## 0.10.9 - -### Patch Changes - -- add support for public addresses as signers in session.open - -## 0.10.8 - -### Patch Changes - -- Multicall production configuration - -## 0.10.7 - -### Patch Changes - -- allow provider transport to force disconnect - -## 0.10.6 - -### Patch Changes - -- - fix getWalletState method - -## 0.10.5 - -### Patch Changes - -- update relayer gas refund options - -## 0.10.4 - -### Patch Changes - -- Update api proto - -## 0.10.3 - -### Patch Changes - -- Fix loading config cross-chain - -## 0.10.2 - -### Patch Changes - -- - message digest fix - -## 0.10.1 - -### Patch Changes - -- upgrade deps - -## 0.10.0 - -### Minor Changes - -- Deployed new contracts with ERC1271 signer support - -## 0.9.6 - -### Patch Changes - -- Update ABIs for latest sequence contracts - -## 0.9.5 - -### Patch Changes - -- Implemented session class - -## 0.9.3 - -### Patch Changes - -- - minor improvements - -## 0.9.1 - -### Patch Changes - -- - patch bump - -## 0.9.0 - -### Minor Changes - -- - provider transport hardening - -## 0.8.5 - -### Patch Changes - -- - use latest wallet-contracts - -## 0.8.4 - -### Patch Changes - -- - minor improvements, name updates and comments - -## 0.8.3 - -### Patch Changes - -- - refinements - - - normalize signer address in config - - - provider: getWalletState() method to WalletProvider - -## 0.8.2 - -### Patch Changes - -- - field rename and ethauth dependency bump - -## 0.8.1 - -### Patch Changes - -- - variety of optimizations - -## 0.8.0 - -### Minor Changes - -- - changeset fix - -## 0.7.1 - -### Patch Changes - -- 02377ab: Minor improvements - -## 0.7.0 - -### Patch Changes - -- 6f11ed7: sequence.js, init release diff --git a/old/packages/utils/README.md b/old/packages/utils/README.md deleted file mode 100644 index 08d8f2599..000000000 --- a/old/packages/utils/README.md +++ /dev/null @@ -1,4 +0,0 @@ -@0xsequence/utils -================= - -See [0xsequence project page](https://github.com/0xsequence/sequence.js). diff --git a/old/packages/utils/package.json b/old/packages/utils/package.json deleted file mode 100644 index 43b85ee05..000000000 --- a/old/packages/utils/package.json +++ /dev/null @@ -1,29 +0,0 @@ -{ - "name": "@0xsequence/utils", - "version": "2.3.8", - "description": "utils sub-package for Sequence", - "repository": "https://github.com/0xsequence/sequence.js/tree/master/packages/utils", - "source": "src/index.ts", - "main": "dist/0xsequence-utils.cjs.js", - "module": "dist/0xsequence-utils.esm.js", - "author": "Horizon Blockchain Games", - "license": "Apache-2.0", - "scripts": { - "test": "pnpm test:file tests/**/*.spec.ts", - "test:file": "NODE_OPTIONS='--import tsx' mocha --timeout 30000", - "typecheck": "tsc --noEmit" - }, - "peerDependencies": { - "ethers": ">=6" - }, - "dependencies": { - "js-base64": "^3.7.2" - }, - "devDependencies": { - "ethers": "6.13.4" - }, - "files": [ - "src", - "dist" - ] -} diff --git a/old/packages/utils/src/access-key.ts b/old/packages/utils/src/access-key.ts deleted file mode 100644 index 325d51a12..000000000 --- a/old/packages/utils/src/access-key.ts +++ /dev/null @@ -1,30 +0,0 @@ -export const extractProjectIdFromAccessKey = (accessKey: string): number => { - // Convert URL-safe base64 string to standard base64 string - const base64String = accessKey.replace(/-/g, '+').replace(/_/g, '/') - // Decode the base64 string to a binary string - const binaryString = atob(base64String) - - // Convert the binary string to a byte array (Uint8Array) - const byteArray = new Uint8Array(binaryString.length) - for (let i = 0; i < binaryString.length; i++) { - byteArray[i] = binaryString.charCodeAt(i) - } - - if (byteArray[0] !== 1) { - throw new Error('UnsupportedVersion') - } - - // Extract the project ID from bytes 2 to 9 (8 bytes) - const projectIdBytes = byteArray.slice(1, 9) - const projectId = - projectIdBytes[7] | - (projectIdBytes[6] << 8) | - (projectIdBytes[5] << 16) | - (projectIdBytes[4] << 24) | - (projectIdBytes[3] << 32) | - (projectIdBytes[2] << 40) | - (projectIdBytes[1] << 48) | - (projectIdBytes[0] << 56) - - return projectId -} diff --git a/old/packages/utils/src/base64.ts b/old/packages/utils/src/base64.ts deleted file mode 100644 index 63f63ca84..000000000 --- a/old/packages/utils/src/base64.ts +++ /dev/null @@ -1,24 +0,0 @@ -import { Base64 } from 'js-base64' -import { bigintReplacer, bigintReviver } from './bigint' - -export const base64Encode = (val: string): string => { - return Base64.encode(val, true) -} - -export const base64EncodeObject = (obj: any): string => { - return Base64.encode(JSON.stringify(obj, bigintReplacer), true) -} - -export const base64Decode = (encodedString: string): string | undefined => { - if (encodedString === null || encodedString === undefined) { - return undefined - } - return Base64.decode(encodedString) -} - -export const base64DecodeObject = (encodedObject: string | null): T | undefined => { - if (encodedObject === null || encodedObject === undefined) { - return undefined - } - return JSON.parse(Base64.decode(encodedObject), bigintReviver) as T -} diff --git a/old/packages/utils/src/bigint.ts b/old/packages/utils/src/bigint.ts deleted file mode 100644 index bdde5fac9..000000000 --- a/old/packages/utils/src/bigint.ts +++ /dev/null @@ -1,107 +0,0 @@ -import { ethers } from 'ethers' - -export const MAX_UINT_256 = BigInt('0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff') - -// ethers implement this method but doesn't exports it -export const isBigNumberish = (value: any): value is ethers.BigNumberish => { - return ( - value != null && - ((typeof value === 'number' && value % 1 === 0) || - (typeof value === 'string' && !!value.match(/^-?[0-9]+$/)) || - ethers.isHexString(value) || - typeof value === 'bigint') - ) -} - -// Even length zero-padded hex string with 0x prefix -export const toHexString = (value: bigint): string => { - const result = value.toString(16) - - return `${result.length % 2 === 0 ? '0x' : '0x0'}${result}` -} - -export const parseUnits = (value: string, decimals: number = 18): bigint => { - let [integer, fraction = '0'] = value.split('.') - - const negative = integer.startsWith('-') - if (negative) { - integer = integer.slice(1) - } - - // trim trailing zeros. - fraction = fraction.replace(/(0+)$/, '') - - // round off if the fraction is larger than the number of decimals. - if (decimals === 0) { - integer = `${Math.round(Number(`${integer}.${fraction}`))}` - fraction = '' - } else if (fraction.length > decimals) { - const [left, unit, right] = [ - fraction.slice(0, decimals - 1), - fraction.slice(decimals - 1, decimals), - fraction.slice(decimals) - ] - - const rounded = Math.round(Number(`${unit}.${right}`)) - if (rounded > 9) { - fraction = `${BigInt(left) + 1n}0`.padStart(left.length + 1, '0') - } else { - fraction = `${left}${rounded}` - } - - if (fraction.length > decimals) { - fraction = fraction.slice(1) - integer = `${BigInt(integer) + 1n}` - } - - fraction = fraction.slice(0, decimals) - } else { - fraction = fraction.padEnd(decimals, '0') - } - - return BigInt(`${negative ? '-' : ''}${integer}${fraction}`) -} - -export const parseEther = (value: string): bigint => parseUnits(value, 18) - -export const formatUnits = (value: bigint, decimals: number = 18): string => { - let display = value.toString() - - const negative = display.startsWith('-') - if (negative) { - display = display.slice(1) - } - - display = display.padStart(decimals, '0') - - const integer = display.slice(0, display.length - decimals) - let fraction = display.slice(display.length - decimals) - - fraction = fraction.replace(/(0+)$/, '') - return `${negative ? '-' : ''}${integer || '0'}${fraction ? `.${fraction}` : ''}` -} - -export const formatEther = (value: bigint): string => formatUnits(value, 18) - -// JSON.stringify doesn't handle BigInts, so we need to replace them with objects -export const bigintReplacer = (key: string, value: any): any => { - if (typeof value === 'bigint') { - return { $bigint: value.toString() } - } - - return value -} - -// JSON.parse will need to convert our serialized bigints back into BigInt -export const bigintReviver = (key: string, value: any): any => { - if (value !== null && typeof value === 'object' && '$bigint' in value && typeof value.$bigint === 'string') { - return BigInt(value.$bigint) - } - - // BigNumber compatibility with older versions of sequence.js with ethers v5 - if (value !== null && typeof value === 'object' && value.type === 'BigNumber' && ethers.isHexString(value.hex)) { - return BigInt(value.hex) - } - - return value -} diff --git a/old/packages/utils/src/digest.ts b/old/packages/utils/src/digest.ts deleted file mode 100644 index 3f0f95eed..000000000 --- a/old/packages/utils/src/digest.ts +++ /dev/null @@ -1,18 +0,0 @@ -import { ethers } from 'ethers' - -export const encodeMessageDigest = (message: string | ethers.BytesLike) => { - if (typeof message === 'string') { - return ethers.getBytes(ethers.id(message)) - } else { - return ethers.getBytes(ethers.keccak256(message)) - } -} - -// packMessageData encodes the specified data ready for the Sequence Wallet contracts. -export const packMessageData = (walletAddress: string, chainId: ethers.BigNumberish, digest: ethers.BytesLike): string => { - return ethers.solidityPacked(['string', 'uint256', 'address', 'bytes32'], ['\x19\x01', chainId, walletAddress, digest]) -} - -export const subDigestOf = (address: string, chainId: ethers.BigNumberish, digest: ethers.BytesLike): string => { - return ethers.keccak256(packMessageData(address, chainId, digest)) -} diff --git a/old/packages/utils/src/index.ts b/old/packages/utils/src/index.ts deleted file mode 100644 index 35394e9d6..000000000 --- a/old/packages/utils/src/index.ts +++ /dev/null @@ -1,18 +0,0 @@ -export * from './access-key' -export * from './base64' -export * from './bigint' -export * from './digest' -export * from './is-node-or-browser' -export * from './jwt-decode' -export * from './logger' -export * from './merkle' -export * from './network' -export * from './promise-cache' -export * from './promisify' -export * from './query-string' -export * from './rand' -export * from './sanitize' -export * from './sleep' -export * from './typed-data' -export * from './types' -export * from './web' diff --git a/old/packages/utils/src/is-node-or-browser.ts b/old/packages/utils/src/is-node-or-browser.ts deleted file mode 100644 index f84032c78..000000000 --- a/old/packages/utils/src/is-node-or-browser.ts +++ /dev/null @@ -1,9 +0,0 @@ -export const isNode = () => { - if (typeof window === 'undefined' && typeof process === 'object') { - return true - } else { - return false - } -} - -export const isBrowser = () => !isNode() diff --git a/old/packages/utils/src/jwt-decode.ts b/old/packages/utils/src/jwt-decode.ts deleted file mode 100644 index baa862bf1..000000000 --- a/old/packages/utils/src/jwt-decode.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { Base64 } from 'js-base64' - -export const jwtDecodeClaims = (jwt: string) => { - const parts = jwt.split('.') - if (parts.length !== 3) { - throw new Error('invalid jwt') - } - const claims = JSON.parse(Base64.decode(parts[1])) as T - return claims -} diff --git a/old/packages/utils/src/logger.ts b/old/packages/utils/src/logger.ts deleted file mode 100644 index 2da1ebf1f..000000000 --- a/old/packages/utils/src/logger.ts +++ /dev/null @@ -1,98 +0,0 @@ -export type LogLevel = 'DEBUG' | 'INFO' | 'WARN' | 'ERROR' | 'DISABLED' - -enum logLevel { - DEBUG = 1, - INFO = 2, - WARN = 3, - ERROR = 4, - DISABLED = 5 -} - -export interface LoggerConfig { - logLevel: LogLevel - silence?: boolean - - onwarn?: (message: any, ...optionalParams: any[]) => void - onerror?: (message: any, ...optionalParams: any[]) => void -} - -export class Logger { - logLevel: logLevel - - constructor(private config: LoggerConfig) { - this.configure(config) - } - - configure(config: Partial) { - this.config = { ...this.config, ...config } - switch (this.config.logLevel) { - case 'DEBUG': - this.logLevel = logLevel.DEBUG - break - case 'INFO': - this.logLevel = logLevel.INFO - break - case 'WARN': - this.logLevel = logLevel.WARN - break - case 'ERROR': - this.logLevel = logLevel.ERROR - break - case 'DISABLED': - this.logLevel = logLevel.DISABLED - break - default: - this.logLevel = logLevel.INFO - break - } - - // undefined silence value will disable the default silence flag - if (this.config.silence === undefined) { - this.config.silence = false - } - } - - debug(message: any, ...optionalParams: any[]) { - if (this.config.silence === true) return - if (this.logLevel === logLevel.DEBUG) { - console.log(message, ...optionalParams) - } - } - - info(message: any, ...optionalParams: any[]) { - if (this.config.silence === true) return - if (this.logLevel <= logLevel.INFO) { - console.log(message, ...optionalParams) - } - } - - warn(message: any, ...optionalParams: any[]) { - if (this.config.silence === true) return - if (this.logLevel <= logLevel.WARN) { - console.warn(message, ...optionalParams) - if (this.config.onwarn) { - this.config.onwarn(message, optionalParams) - } - } - } - - error(message: any, ...optionalParams: any[]) { - if (this.config.silence === true) return - if (this.logLevel <= logLevel.ERROR) { - console.error(message, ...optionalParams) - if (this.config.onerror) { - this.config.onerror(message, optionalParams) - } - } - } -} - -export const logger = new Logger({ - logLevel: 'INFO', - - // By default we silence the logger. In tests we should call `configureLogger` - // below to set silence: false. - silence: true -}) - -export const configureLogger = (config: Partial) => logger.configure(config) diff --git a/old/packages/utils/src/merkle.ts b/old/packages/utils/src/merkle.ts deleted file mode 100644 index 9e1750d8d..000000000 --- a/old/packages/utils/src/merkle.ts +++ /dev/null @@ -1,49 +0,0 @@ -import { ethers } from 'ethers' -import { MerkleTree } from './merkletree' - -export type ToLeaf = (element: T) => string -export type Proof = string[] - -export class MerkleTreeGenerator { - private elements: T[] - private toLeaf: ToLeaf - private tree: MerkleTree - - constructor(elements: T[], toLeaf: ToLeaf) { - this.elements = elements - this.toLeaf = toLeaf - } - - generateTree(): MerkleTree { - const hashed = this.elements.map(e => this.toLeaf(e)) - return new MerkleTree(hashed, { - sortPairs: true, - sortLeaves: true - }) - } - - generateRoot(): string { - if (!this.tree) this.tree = this.generateTree() - return this.tree.getHexRoot() - } - - generateProof(element: T): Proof { - if (!this.elements.includes(element)) throw new Error('Element not found') - if (!this.tree) this.tree = this.generateTree() - return this.tree.getHexProof(this.toLeaf(element)) - } - - verifyProof(element: T, proof: Proof): boolean { - if (!this.elements.includes(element)) throw new Error('Element not found') - if (!this.tree) this.tree = this.generateTree() - return this.tree.verify(proof, this.toLeaf(element), this.generateRoot()) - } -} - -export type SaleItemsElement = { - address: string - tokenId: ethers.BigNumberish -} - -export const getSaleItemsLeaf: ToLeaf = element => - ethers.solidityPackedKeccak256(['address', 'uint256'], [element.address.toLowerCase(), element.tokenId]) diff --git a/old/packages/utils/src/merkletree/Base.ts b/old/packages/utils/src/merkletree/Base.ts deleted file mode 100644 index 2e172c0ad..000000000 --- a/old/packages/utils/src/merkletree/Base.ts +++ /dev/null @@ -1,107 +0,0 @@ -import { ethers } from 'ethers' - -export class Base { - static bufferIndexOf(array: Uint8Array[], element: Uint8Array, isSorted: boolean = false): number { - if (isSorted) { - return Base.binarySearch(array, element, Base.compare) - } - - const eqChecker = (buffer1: Uint8Array, buffer2: Uint8Array): boolean => { - if (buffer1 === buffer2) { - return true - } - if (buffer1.length !== buffer2.length) { - return false - } - for (let i = 0; i < buffer1.length; i++) { - if (buffer1[i] !== buffer2[i]) { - return false - } - } - return true - } - - return Base.linearSearch(array, element, eqChecker) - } - - static binarySearch( - array: Uint8Array[], - element: Uint8Array, - compareFunction: (a: Uint8Array, b: Uint8Array) => number - ): number { - let start = 0 - let end = array.length - 1 - - // Iterate while start not meets end - while (start <= end) { - // Find the mid index - const mid = Math.floor((start + end) / 2) - - // Check if the mid value is greater than, equal to, or less than search element. - const ordering = compareFunction(array[mid], element) - - // If element is present at mid, start iterating for searching first appearance. - if (ordering === 0) { - // Linear reverse iteration until the first matching item index is found. - for (let i = mid - 1; i >= 0; i--) { - if (compareFunction(array[i], element) === 0) continue - return i + 1 - } - return 0 - } /* Else look in left or right half accordingly */ else if (ordering < 0) { - start = mid + 1 - } else { - end = mid - 1 - } - } - - return -1 - } - - static compare(a: Uint8Array, b: Uint8Array): number { - // Determine the minimum length to compare - const len = Math.min(a.length, b.length) - - // Compare byte by byte - for (let i = 0; i < len; i++) { - if (a[i] !== b[i]) { - return a[i] - b[i] - } - } - - // If all compared bytes are equal, compare lengths - return a.length - b.length - } - - static linearSearch(array: Uint8Array[], element: Uint8Array, eqChecker: (a: Uint8Array, b: Uint8Array) => boolean): number { - for (let i = 0; i < array.length; i++) { - if (eqChecker(array[i], element)) { - return i - } - } - - return -1 - } - - static bufferify(value: Uint8Array | string): Uint8Array { - if (typeof value === 'string') { - return ethers.getBytes(value) - } - return value - } - - static isHexString(v: string): boolean { - return typeof v === 'string' && /^(0x)?[0-9A-Fa-f]*$/.test(v) - } - - static bufferToHex(value: Uint8Array, withPrefix: boolean = true): string { - const prefixed = ethers.hexlify(value) - return withPrefix ? prefixed : prefixed.substring(2) - } - - static bufferifyFn(f: any): any { - return (value: any): Uint8Array => { - return Base.bufferify(f(value)) - } - } -} diff --git a/old/packages/utils/src/merkletree/MerkleTree.ts b/old/packages/utils/src/merkletree/MerkleTree.ts deleted file mode 100644 index 823d57ed8..000000000 --- a/old/packages/utils/src/merkletree/MerkleTree.ts +++ /dev/null @@ -1,186 +0,0 @@ -import { ethers } from 'ethers' -import { Base } from './Base' - -type TValue = string -type TLeaf = Uint8Array -type TLayer = TLeaf[] -type THashFn = (value: TValue | TLeaf) => TLeaf - -export interface Options { - sortLeaves?: boolean - sortPairs?: boolean -} - -export type Proof = { position: 'left' | 'right'; data: Uint8Array }[] - -export class MerkleTree extends Base { - private hashFn: THashFn - private leaves: TLeaf[] = [] - private layers: TLayer[] = [] - private sortLeaves: boolean = false - private sortPairs: boolean = false - - constructor(leaves: any[], options: Options = {}) { - super() - - this.sortLeaves = !!options.sortLeaves - this.sortPairs = !!options.sortPairs - - this.hashFn = Base.bufferifyFn(ethers.keccak256) - this.processLeaves(leaves) - } - - public getOptions() { - return { - sortLeaves: this.sortLeaves, - sortPairs: this.sortPairs - } - } - - private processLeaves(leaves: TLeaf[]) { - this.leaves = leaves.map(Base.bufferify) - if (this.sortLeaves) { - this.leaves = this.leaves.sort(Base.compare) - } - - this.createHashes(this.leaves) - } - - private createHashes(nodes: Uint8Array[]) { - this.layers = [nodes] - while (nodes.length > 1) { - const layerIndex = this.layers.length - - this.layers.push([]) - - const layerLimit = nodes.length - - for (let i = 0; i < nodes.length; i += 2) { - if (i >= layerLimit) { - this.layers[layerIndex].push(...nodes.slice(layerLimit)) - break - } else if (i + 1 === nodes.length) { - if (nodes.length % 2 === 1) { - // push copy of hash and continue iteration - this.layers[layerIndex].push(nodes[i]) - continue - } - } - - const left = nodes[i] - const right = i + 1 === nodes.length ? left : nodes[i + 1] - const combined = [left, right] - - if (this.sortPairs) { - combined.sort(Base.compare) - } - - const hash = this.hashFn(ethers.concat(combined)) - this.layers[layerIndex].push(hash) - } - - nodes = this.layers[layerIndex] - } - } - - getRoot(): Uint8Array { - if (this.layers.length === 0) { - return Uint8Array.from([]) - } - - return this.layers[this.layers.length - 1][0] || Uint8Array.from([]) - } - - getHexRoot(): string { - return Base.bufferToHex(this.getRoot()) - } - - getProof(leaf: Uint8Array | string, index?: number): Proof { - if (typeof leaf === 'undefined') { - throw new Error('leaf is required') - } - leaf = Base.bufferify(leaf) - const proof: Proof = [] - - if (!Number.isInteger(index)) { - index = -1 - - for (let i = 0; i < this.leaves.length; i++) { - if (Base.compare(leaf, this.leaves[i]) === 0) { - index = i - } - } - } - - // Type fix - index = index as number - - if (index <= -1) { - return [] - } - - for (let i = 0; i < this.layers.length; i++) { - const layer = this.layers[i] - const isRightNode = index % 2 - const pairIndex = isRightNode ? index - 1 : index + 1 - - if (pairIndex < layer.length) { - proof.push({ - position: isRightNode ? 'left' : 'right', - data: layer[pairIndex] - }) - } - - // set index to parent index - index = (index / 2) | 0 - } - - return proof - } - - getHexProof(leaf: Uint8Array | string, index?: number): string[] { - return this.getProof(leaf, index).map(item => Base.bufferToHex(item.data)) - } - - verify(proof: Proof | string[], targetNode: Uint8Array | string, root: Uint8Array | string): boolean { - let hash = Base.bufferify(targetNode) - root = Base.bufferify(root) - - if (!Array.isArray(proof) || !targetNode || !root) { - return false - } - - for (let i = 0; i < proof.length; i++) { - const node = proof[i] - let data: Uint8Array - let isLeftNode: boolean - - if (typeof node === 'string') { - data = Base.bufferify(node) - isLeftNode = true - } else if (node instanceof Object) { - data = node.data - isLeftNode = node.position === 'left' - } else { - throw new Error('Expected node to be of type string or object') - } - - const buffers: Uint8Array[] = [] - - if (this.sortPairs) { - if (Base.compare(hash, data) < 0) { - buffers.push(hash, data) - } else { - buffers.push(data, hash) - } - hash = this.hashFn(ethers.concat(buffers)) - } else { - buffers.push(hash) - buffers[isLeftNode ? 'unshift' : 'push'](data) - hash = this.hashFn(ethers.concat(buffers)) - } - } - - return Base.compare(hash, root) === 0 - } -} diff --git a/old/packages/utils/src/merkletree/README.md b/old/packages/utils/src/merkletree/README.md deleted file mode 100644 index 7ad9d73cf..000000000 --- a/old/packages/utils/src/merkletree/README.md +++ /dev/null @@ -1 +0,0 @@ -This folder is a minimal fork of https://github.com/merkletreejs/merkletreejs with dependencies replaced with ethers. diff --git a/old/packages/utils/src/merkletree/index.ts b/old/packages/utils/src/merkletree/index.ts deleted file mode 100644 index 136d7afdc..000000000 --- a/old/packages/utils/src/merkletree/index.ts +++ /dev/null @@ -1 +0,0 @@ -export { MerkleTree } from './MerkleTree' diff --git a/old/packages/utils/src/network.ts b/old/packages/utils/src/network.ts deleted file mode 100644 index f2db0fe47..000000000 --- a/old/packages/utils/src/network.ts +++ /dev/null @@ -1,41 +0,0 @@ -import { ethers } from 'ethers' - -// export const getEthersConnectionInfo = (url: string, projectAccessKey?: string, jwt?: string): ConnectionInfo => { -// const headers: { -// [key: string]: string | number -// } = {} - -// if (jwt && jwt.length > 0) { -// headers['Authorization'] = `BEARER ${jwt}` -// } -// if (projectAccessKey && projectAccessKey.length > 0) { -// headers['X-Access-Key'] = projectAccessKey -// } - -// return { -// url, -// headers, -// skipFetchSetup: true, -// fetchOptions: { -// mode: 'cors', -// cache: 'force-cache', -// credentials: 'same-origin', -// redirect: 'follow', -// referrer: 'client' -// } -// } -// } - -export const getFetchRequest = (url: string, projectAccessKey?: string, jwt?: string): ethers.FetchRequest => { - const req = new ethers.FetchRequest(url) - - if (jwt) { - req.setHeader('Authorization', `BEARER ${jwt}`) - } - - if (projectAccessKey) { - req.setHeader('X-Access-Key', projectAccessKey) - } - - return req -} diff --git a/old/packages/utils/src/promise-cache.ts b/old/packages/utils/src/promise-cache.ts deleted file mode 100644 index 091cabed6..000000000 --- a/old/packages/utils/src/promise-cache.ts +++ /dev/null @@ -1,58 +0,0 @@ -import { ethers } from 'ethers' - -export class PromiseCache { - private readonly cache: Map - - constructor() { - this.cache = new Map() - } - - do, T>( - key: string, - validMilliseconds: number | undefined, - task: (...args: S) => Promise, - ...args: S - ): Promise { - key = `${key}:${ethers.id(JSON.stringify(args, deterministically))}` - - let entry = this.cache.get(key) - - if (entry) { - if (entry.expiration) { - if (new Date() >= entry.expiration) { - entry = undefined - this.cache.delete(key) - } - } - } - - if (!entry) { - const entry_: Entry = { promise: task(...args) } - - if (validMilliseconds !== undefined) { - entry_.promise = entry_.promise.then(result => { - entry_.expiration = new Date(Date.now() + validMilliseconds) - return result - }) - } - - entry = entry_ - this.cache.set(key, entry) - } - - return entry.promise as Promise - } -} - -type Entry = { - promise: Promise - expiration?: Date -} - -function deterministically(_key: string, value: any): any { - if (typeof value === 'object' && value !== null && !Array.isArray(value)) { - return Object.fromEntries(Object.entries(value).sort()) - } - - return value -} diff --git a/old/packages/utils/src/promisify.ts b/old/packages/utils/src/promisify.ts deleted file mode 100644 index 537b3e018..000000000 --- a/old/packages/utils/src/promisify.ts +++ /dev/null @@ -1,32 +0,0 @@ -export function promisify(f: (cb: (err: any, res: T) => void) => void, thisContext?: any): () => Promise -export function promisify(f: (arg: A, cb: (err: any, res: T) => void) => void, thisContext?: any): (arg: A) => Promise -export function promisify( - f: (arg: A, arg2: A2, cb: (err: any, res: T) => void) => void, - thisContext?: any -): (arg: A, arg2: A2) => Promise -export function promisify( - f: (arg: A, arg2: A2, arg3: A3, cb: (err: any, res: T) => void) => void, - thisContext?: any -): (arg: A, arg2: A2, arg3: A3) => Promise -export function promisify( - f: (arg: A, arg2: A2, arg3: A3, arg4: A4, cb: (err: any, res: T) => void) => void, - thisContext?: any -): (arg: A, arg2: A2, arg3: A3, arg4: A4) => Promise -export function promisify( - f: (arg: A, arg2: A2, arg3: A3, arg4: A4, arg5: A5, cb: (err: any, res: T) => void) => void, - thisContext?: any -): (arg: A, arg2: A2, arg3: A3, arg4: A4, arg5: A5) => Promise - -export function promisify(f: any, thisContext?: any) { - return function (...a: any[]) { - const args = Array.prototype.slice.call(a) - return new Promise(async (resolve, reject) => { - try { - args.push((err: any, result: any) => (err ? reject(err) : resolve(result))) - await f.apply(thisContext, args) - } catch (e) { - reject(e) - } - }) - } -} diff --git a/old/packages/utils/src/query-string.ts b/old/packages/utils/src/query-string.ts deleted file mode 100644 index 3980c0e18..000000000 --- a/old/packages/utils/src/query-string.ts +++ /dev/null @@ -1,15 +0,0 @@ -export function queryStringFromObject(name: string, obj: any) { - const k = encodeURIComponent(name) - const v = encodeURIComponent(JSON.stringify(obj)) - return `${k}=${v}` -} - -export function queryStringToObject(qs: string): { [key: string]: any } { - const p = qs.split('&') - const o: { [key: string]: any } = {} - for (const v of p) { - const z = v.split('=') - o[decodeURIComponent(z[0])] = JSON.parse(decodeURIComponent(z[1])) - } - return o -} diff --git a/old/packages/utils/src/rand.ts b/old/packages/utils/src/rand.ts deleted file mode 100644 index 50d4ea6d5..000000000 --- a/old/packages/utils/src/rand.ts +++ /dev/null @@ -1,5 +0,0 @@ -export const getRandomInt = (min: number = 0, max: number = Number.MAX_SAFE_INTEGER): number => { - min = Math.ceil(min) - max = Math.floor(max) - return Math.floor(Math.random() * (max - min + 1)) + min -} diff --git a/old/packages/utils/src/sanitize.ts b/old/packages/utils/src/sanitize.ts deleted file mode 100644 index 7f1044b39..000000000 --- a/old/packages/utils/src/sanitize.ts +++ /dev/null @@ -1,27 +0,0 @@ -// sanitizeNumberString accepts a number string and returns back a clean number string. -// For example, input '1234.5678' will return '1234.5678' but '12javascript:{}etc' will return '12' -export const sanitizeNumberString = (numString: string | null): string => { - if (!numString || typeof numString !== 'string') { - return '' - } - const v = numString.match(/[\d.]+/) - return v && v.length > 0 ? v[0].trim() : '' -} - -// sanitizeAlphanumeric accepts any string and returns alphanumeric contents only -export const sanitizeAlphanumeric = (alphanum: string): string => { - if (!alphanum || typeof alphanum !== 'string') { - return '' - } - const v = alphanum.match(/[\w\s\d]+/) - return v && v.length > 0 ? v[0].trim() : '' -} - -// sanitizeHost accepts any string and returns valid host string -export const sanitizeHost = (host: string): string => { - if (!host || typeof host !== 'string') { - return '' - } - const v = host.match(/[\w\d.\-:\/]+/) - return v && v.length > 0 ? v[0].trim() : '' -} diff --git a/old/packages/utils/src/sleep.ts b/old/packages/utils/src/sleep.ts deleted file mode 100644 index 6120453e0..000000000 --- a/old/packages/utils/src/sleep.ts +++ /dev/null @@ -1,8 +0,0 @@ -export const sleep = (t: number) => { - return new Promise(resolve => { - const timeout = setTimeout(() => { - clearTimeout(timeout) - resolve() - }, t) - }) -} diff --git a/old/packages/utils/src/typed-data.ts b/old/packages/utils/src/typed-data.ts deleted file mode 100644 index df973cbaf..000000000 --- a/old/packages/utils/src/typed-data.ts +++ /dev/null @@ -1,24 +0,0 @@ -import { ethers, TypedDataDomain, TypedDataField } from 'ethers' - -export interface TypedData { - domain: TypedDataDomain - types: Record> - message: Record - primaryType?: string -} - -export type { TypedDataDomain, TypedDataField } - -export const encodeTypedDataHash = (typedData: TypedData): string => { - const types = { ...typedData.types } - - // remove EIP712Domain key from types as ethers will auto-gen it in - // the hash encoder below - delete types['EIP712Domain'] - - return ethers.TypedDataEncoder.hash(typedData.domain, types, typedData.message) -} - -export const encodeTypedDataDigest = (typedData: TypedData): Uint8Array => { - return ethers.getBytes(encodeTypedDataHash(typedData)) -} diff --git a/old/packages/utils/src/types.ts b/old/packages/utils/src/types.ts deleted file mode 100644 index 4ee14d682..000000000 --- a/old/packages/utils/src/types.ts +++ /dev/null @@ -1,21 +0,0 @@ -import { ethers } from 'ethers' - -const { defineProperties, resolveProperties } = ethers - -export { defineProperties, resolveProperties } - -export type Optionals = Omit< - T, - Exclude< - { - [K in keyof T]: T extends Record ? K : never - }[keyof T], - undefined - > -> - -export type Mask = Omit - -export type Forbid = T & { - [P in K]?: never -} diff --git a/old/packages/utils/src/web.ts b/old/packages/utils/src/web.ts deleted file mode 100644 index d8316e978..000000000 --- a/old/packages/utils/src/web.ts +++ /dev/null @@ -1,2 +0,0 @@ -// urlClean removes double slashes from url path -export const urlClean = (url: string) => url.replace(/([^:]\/)\/+/g, '$1') diff --git a/old/packages/utils/tests/access-key.spec.ts b/old/packages/utils/tests/access-key.spec.ts deleted file mode 100644 index 484d5045a..000000000 --- a/old/packages/utils/tests/access-key.spec.ts +++ /dev/null @@ -1,11 +0,0 @@ -import { expect } from 'chai' -import { extractProjectIdFromAccessKey } from '@0xsequence/utils' - -describe('access-key', function () { - it('extractProjectIdFromAccessKey', () => { - const accessKey = 'AQAAAAAAADVH8R2AGuQhwQ1y8NaEf1T7PJM' - - const projectId = extractProjectIdFromAccessKey(accessKey) - expect(projectId).to.equal(13639) - }) -}) diff --git a/old/packages/utils/tests/base64.spec.ts b/old/packages/utils/tests/base64.spec.ts deleted file mode 100644 index d56c24c83..000000000 --- a/old/packages/utils/tests/base64.spec.ts +++ /dev/null @@ -1,49 +0,0 @@ -import { expect } from 'chai' -import { base64EncodeObject, base64DecodeObject } from '@0xsequence/utils' - -describe('base64', function () { - it('encoding, a', () => { - const object = { - a: 1, - b: 2, - c: 'hihi', - d: '1.234' - } - - const encoded = base64EncodeObject(object) - expect(encoded).to.be.equal('eyJhIjoxLCJiIjoyLCJjIjoiaGloaSIsImQiOiIxLjIzNCJ9') - - const o = base64DecodeObject(encoded) - expect(object).to.deep.equal(o) - }) - - it('encoding, b', () => { - const object = { - a: 1, - b: 2, - c: 'hihi', - d: `how do quote's "work+out"?` - } - - const encoded = base64EncodeObject(object) - expect(encoded).to.be.equal('eyJhIjoxLCJiIjoyLCJjIjoiaGloaSIsImQiOiJob3cgZG8gcXVvdGUncyBcIndvcmsrb3V0XCI_In0') - - const o = base64DecodeObject(encoded) - expect(object).to.deep.equal(o) - }) - - it('encoding, c', () => { - const object = { - a: 1, - b: 2, - c: 'hihi', - d: { nest: '123' } - } - - const encoded = base64EncodeObject(object) - expect(encoded).to.be.equal('eyJhIjoxLCJiIjoyLCJjIjoiaGloaSIsImQiOnsibmVzdCI6IjEyMyJ9fQ') - - const o = base64DecodeObject(encoded) - expect(object).to.deep.equal(o) - }) -}) diff --git a/old/packages/utils/tests/bigint.spec.ts b/old/packages/utils/tests/bigint.spec.ts deleted file mode 100644 index eb543da18..000000000 --- a/old/packages/utils/tests/bigint.spec.ts +++ /dev/null @@ -1,57 +0,0 @@ -import { expect } from 'chai' - -import { formatUnits, parseUnits, toHexString, MAX_UINT_256 } from '../src/bigint' -import { bigintReplacer, bigintReviver } from '../dist/0xsequence-utils.cjs' - -describe('bigint', () => { - it('should convert bigint to hex string', () => { - expect(toHexString(0n)).to.equal('0x00') - expect(toHexString(15n)).to.equal('0x0f') - expect(toHexString(16n)).to.equal('0x10') - expect(toHexString(255n)).to.equal('0xff') - expect(toHexString(256n)).to.equal('0x0100') - expect(toHexString(1234n)).to.equal('0x04d2') - expect(toHexString(MAX_UINT_256)).to.equal('0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff') - }) - - it('should parseUnits', () => { - expect(parseUnits('1.234', 3)).to.equal(1234n) - expect(parseUnits('1', 3)).to.equal(1000n) - expect(parseUnits('.123', 3)).to.equal(123n) - expect(parseUnits('1.', 3)).to.equal(1000n) - expect(parseUnits('1.234000', 3)).to.equal(1234n) - expect(parseUnits('-1.234', 3)).to.equal(-1234n) - expect(parseUnits('1.2345', 4)).to.equal(12345n) - expect(parseUnits('1', 18)).to.equal(1000000000000000000n) - - // Test padding decimals - expect(parseUnits('1.2', 4)).to.equal(12000n) - - expect(parseUnits('1.234', 0)).to.equal(1n) - }) - - it('should formatUnits', () => { - expect(formatUnits(1234n, 3)).to.equal('1.234') - - // Test stripping trailing zeros - keeps last - expect(formatUnits(1000n, 3)).to.equal('1') - - expect(formatUnits(123n, 3)).to.equal('0.123') - expect(formatUnits(1234n, 3)).to.equal('1.234') - expect(formatUnits(-1234n, 3)).to.equal('-1.234') - expect(formatUnits(1234n, 0)).to.equal('1234') - expect(formatUnits(1234n, 4)).to.equal('0.1234') - expect(formatUnits(1234n, 5)).to.equal('0.01234') - }) - - it('should serialize and deserialize bigints', () => { - const s = JSON.stringify({ value: 1234n }, bigintReplacer) - const d = JSON.parse(s, bigintReviver) - - expect(s).to.equal('{"value":{"$bigint":"1234"}}') - expect(d).to.deep.equal({ value: 1234n }) - - // BigNumber compatibility with ethers v5 - expect(JSON.parse('{"value":{"type":"BigNumber","hex":"0x04d2"}}', bigintReviver)).to.deep.equal({ value: 1234n }) - }) -}) diff --git a/old/packages/utils/tests/jwt-decode.spec.ts b/old/packages/utils/tests/jwt-decode.spec.ts deleted file mode 100644 index f9af7073d..000000000 --- a/old/packages/utils/tests/jwt-decode.spec.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { expect } from 'chai' -import { jwtDecodeClaims } from '@0xsequence/utils' - -describe('jwt-decode', function () { - it('decode', () => { - const jwt = - 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhY2NvdW50IjoiMHg4ZTNlMzhmZTczNjdkZDNiNTJkMWUyODFlNGU4NDAwNDQ3YzhkOGI5IiwiYXBwIjoiU2VxdWVuY2UgV2FsbGV0IiwiZXhwIjoxNjIyNzY3MTcwLCJpYXQiOjE2MjAxNzUxNzB9.21AuC33BF6GR67_kixfhoRfpSfN-G98fSe1MEvrcgO0' - - const claims = jwtDecodeClaims(jwt) - expect(claims.account).to.equal('0x8e3e38fe7367dd3b52d1e281e4e8400447c8d8b9') - expect(claims.exp).to.equal(1622767170) - }) -}) diff --git a/old/packages/utils/tests/merkle.spec.ts b/old/packages/utils/tests/merkle.spec.ts deleted file mode 100644 index 174bc440d..000000000 --- a/old/packages/utils/tests/merkle.spec.ts +++ /dev/null @@ -1,34 +0,0 @@ -import { expect } from 'chai' -import { MerkleTreeGenerator, SaleItemsElement, getSaleItemsLeaf } from '@0xsequence/utils' -import { ethers } from 'ethers' - -describe('merkle', function () { - const addrs = Array.from({ length: 10 }, () => ethers.Wallet.createRandom().address) - const elements: SaleItemsElement[] = addrs.map(addr => ({ address: addr, tokenId: 1 })) - - it('generates tree, root and proof for custom elements', () => { - const getLeaf = (element: string) => ethers.solidityPackedKeccak256(['address'], [element.toLowerCase()]) - const merkleGenerator = new MerkleTreeGenerator(addrs, getLeaf) - expect(merkleGenerator.generateRoot()).to.be.a('string') - const proof = merkleGenerator.generateProof(addrs[0]) - expect(proof).to.be.an('array') - expect(merkleGenerator.verifyProof(addrs[0], proof)).to.be.true - }) - - it('generates tree, root and proof for sale items', () => { - const merkleGenerator = new MerkleTreeGenerator(elements, getSaleItemsLeaf) - expect(merkleGenerator.generateRoot()).to.be.a('string') - const proof = merkleGenerator.generateProof(elements[0]) - expect(proof).to.be.an('array') - expect(merkleGenerator.verifyProof(elements[0], proof)).to.be.true - }) - - it('errors when invalid element', () => { - const merkleGenerator = new MerkleTreeGenerator(elements, getSaleItemsLeaf) - const invalidElement: SaleItemsElement = { - address: ethers.Wallet.createRandom().address, - tokenId: 0 - } - expect(() => merkleGenerator.generateProof(invalidElement)).to.throw('Element not found') - }) -}) diff --git a/old/packages/utils/tests/query-string.spec.ts b/old/packages/utils/tests/query-string.spec.ts deleted file mode 100644 index 775797c00..000000000 --- a/old/packages/utils/tests/query-string.spec.ts +++ /dev/null @@ -1,51 +0,0 @@ -import { expect } from 'chai' -import { queryStringFromObject, queryStringToObject } from '@0xsequence/utils' - -describe('query-string', function () { - it('encoding, a', () => { - const object = { - a: 1, - b: 2, - c: 'hihi', - d: '1.234' - } - - const qs = queryStringFromObject('k', object) - expect(qs).to.be.equal('k=%7B%22a%22%3A1%2C%22b%22%3A2%2C%22c%22%3A%22hihi%22%2C%22d%22%3A%221.234%22%7D') - - const o = queryStringToObject(qs) - expect({ k: object }).to.deep.equal(o) - }) - - it('encoding, b', () => { - const object = { - a: 1, - b: 2, - c: 'hihi', - d: `how do quote's "work+out"?` - } - - const qs = queryStringFromObject('k', object) - expect(qs).to.be.equal( - "k=%7B%22a%22%3A1%2C%22b%22%3A2%2C%22c%22%3A%22hihi%22%2C%22d%22%3A%22how%20do%20quote's%20%5C%22work%2Bout%5C%22%3F%22%7D" - ) - - const o = queryStringToObject(qs) - expect({ k: object }).to.deep.equal(o) - }) - - it('encoding, c', () => { - const object = { - a: 1, - b: 2, - c: 'hihi', - d: { nest: '123' } - } - - const qs = queryStringFromObject('k', object) - expect(qs).to.be.equal('k=%7B%22a%22%3A1%2C%22b%22%3A2%2C%22c%22%3A%22hihi%22%2C%22d%22%3A%7B%22nest%22%3A%22123%22%7D%7D') - - const o = queryStringToObject(qs) - expect({ k: object }).to.deep.equal(o) - }) -}) diff --git a/old/packages/utils/tests/sanitize.spec.ts b/old/packages/utils/tests/sanitize.spec.ts deleted file mode 100644 index 960113319..000000000 --- a/old/packages/utils/tests/sanitize.spec.ts +++ /dev/null @@ -1,21 +0,0 @@ -import { expect } from 'chai' -import { sanitizeHost } from '@0xsequence/utils' - -describe('sanitize', function () { - it('sanitize host', () => { - const a = 'http://localhost:4000' - expect(sanitizeHost(a)).to.equal('http://localhost:4000') - - const b = 'https://localhost:4000' - expect(sanitizeHost(b)).to.equal('https://localhost:4000') - - const c = 'http://play.skyweaver.net' - expect(sanitizeHost(c)).to.equal('http://play.skyweaver.net') - - const d = 'http://hello123-world4.com' - expect(sanitizeHost(d)).to.equal('http://hello123-world4.com') - - const e = 'http://hello-w(!#@%$#%^@orld.com' - expect(sanitizeHost(e)).to.equal('http://hello-w') - }) -}) diff --git a/old/packages/waas-ethers/CHANGELOG.md b/old/packages/waas-ethers/CHANGELOG.md deleted file mode 100644 index 90030a6a3..000000000 --- a/old/packages/waas-ethers/CHANGELOG.md +++ /dev/null @@ -1,986 +0,0 @@ -# @0xsequence/waas-ethers - -## 2.3.8 - -### Patch Changes - -- indexer: update clients -- Updated dependencies - - @0xsequence/waas@2.3.8 - -## 2.3.7 - -### Patch Changes - -- Metadata updates -- Updated dependencies - - @0xsequence/waas@2.3.7 - -## 2.3.6 - -### Patch Changes - -- New chains -- Updated dependencies - - @0xsequence/waas@2.3.6 - -## 2.3.5 - -### Patch Changes - -- Add Frequency Testnet -- Updated dependencies - - @0xsequence/waas@2.3.5 - -## 2.3.4 - -### Patch Changes - -- metadata: exclude deprecated methods on rpc client -- Updated dependencies - - @0xsequence/waas@2.3.4 - -## 2.3.3 - -### Patch Changes - -- metadata: client update -- Updated dependencies - - @0xsequence/waas@2.3.3 - -## 2.3.2 - -### Patch Changes - -- metadata: update rpc client -- Updated dependencies - - @0xsequence/waas@2.3.2 - -## 2.3.1 - -### Patch Changes - -- indexer: update rpc client -- Updated dependencies - - @0xsequence/waas@2.3.1 - -## 2.3.0 - -### Minor Changes - -- update metadata rpc client - -### Patch Changes - -- Updated dependencies - - @0xsequence/waas@2.3.0 - -## 2.2.15 - -### Patch Changes - -- API updates -- Updated dependencies - - @0xsequence/waas@2.2.15 - -## 2.2.14 - -### Patch Changes - -- Somnia Testnet and Monad Testnet -- Updated dependencies - - @0xsequence/waas@2.2.14 - -## 2.2.13 - -### Patch Changes - -- Add XR1 to all networks -- Updated dependencies - - @0xsequence/waas@2.2.13 - -## 2.2.12 - -### Patch Changes - -- Add XR1 -- Updated dependencies - - @0xsequence/waas@2.2.12 - -## 2.2.11 - -### Patch Changes - -- Relayer updates -- Updated dependencies - - @0xsequence/waas@2.2.11 - -## 2.2.10 - -### Patch Changes - -- Etherlink support -- Updated dependencies - - @0xsequence/waas@2.2.10 - -## 2.2.9 - -### Patch Changes - -- Indexer gateway native token balances -- Updated dependencies - - @0xsequence/waas@2.2.9 - -## 2.2.8 - -### Patch Changes - -- Add Moonbeam and Moonbase Alpha -- Updated dependencies - - @0xsequence/waas@2.2.8 - -## 2.2.7 - -### Patch Changes - -- Update Builder package -- Updated dependencies - - @0xsequence/waas@2.2.7 - -## 2.2.6 - -### Patch Changes - -- Update relayer package -- Updated dependencies - - @0xsequence/waas@2.2.6 - -## 2.2.5 - -### Patch Changes - -- auth: fix sequence indexer gateway url -- account: immutable wallet proxy hook -- Updated dependencies -- Updated dependencies - - @0xsequence/waas@2.2.5 - -## 2.2.4 - -### Patch Changes - -- network: update soneium mainnet block explorer url -- waas: signTypedData intent support -- Updated dependencies -- Updated dependencies - - @0xsequence/waas@2.2.4 - -## 2.2.3 - -### Patch Changes - -- provider: updating initWallet to use connected network configs if they exist -- Updated dependencies - - @0xsequence/waas@2.2.3 - -## 2.2.2 - -### Patch Changes - -- pass projectAccessKey to relayer at all times -- Updated dependencies - - @0xsequence/waas@2.2.2 - -## 2.2.1 - -### Patch Changes - -- waas-ethers: sign typed data -- Updated dependencies - - @0xsequence/waas@2.2.1 - -## 2.2.0 - -### Minor Changes - -- indexer: gateway client -- @0xsequence/builder -- upgrade puppeteer to v23.10.3 - -### Patch Changes - -- Updated dependencies -- Updated dependencies -- Updated dependencies - - @0xsequence/waas@2.2.0 - -## 2.1.8 - -### Patch Changes - -- Add Soneium Mainnet -- Updated dependencies - - @0xsequence/waas@2.1.8 - -## 2.1.7 - -### Patch Changes - -- guard: pass project access key to guard requests -- Updated dependencies - - @0xsequence/waas@2.1.7 - -## 2.1.6 - -### Patch Changes - -- Add LAOS and Telos Testnet chains -- Updated dependencies - - @0xsequence/waas@2.1.6 - -## 2.1.5 - -### Patch Changes - -- account: save presigned configuration with reference chain id 1 -- Updated dependencies - - @0xsequence/waas@2.1.5 - -## 2.1.4 - -### Patch Changes - -- provider: pass projectAccessKey into MuxMessageProvider -- Updated dependencies - - @0xsequence/waas@2.1.4 - -## 2.1.3 - -### Patch Changes - -- waas: time drift date fix due to strange browser quirk -- Updated dependencies - - @0xsequence/waas@2.1.3 - -## 2.1.2 - -### Patch Changes - -- provider: export analytics correctly -- Updated dependencies - - @0xsequence/waas@2.1.2 - -## 2.1.1 - -### Patch Changes - -- Add LAOS chain support -- Updated dependencies - - @0xsequence/waas@2.1.1 - -## 2.1.0 - -### Minor Changes - -- account: forward project access key when estimating fees and sending transactions - -### Patch Changes - -- sessions: save signatures with reference chain id -- Updated dependencies -- Updated dependencies - - @0xsequence/waas@2.1.0 - -## 2.0.26 - -### Patch Changes - -- account: fix chain id comparison -- Updated dependencies - - @0xsequence/waas@2.0.26 - -## 2.0.25 - -### Patch Changes - -- skale-nebula: deploy gas limit = 10m -- Updated dependencies - - @0xsequence/waas@2.0.25 - -## 2.0.24 - -### Patch Changes - -- sessions: arweave: configurable gateway url -- waas: use /status to get time drift before sending any intents -- Updated dependencies -- Updated dependencies - - @0xsequence/waas@2.0.24 - -## 2.0.23 - -### Patch Changes - -- Add The Root Network support -- Updated dependencies - - @0xsequence/waas@2.0.23 - -## 2.0.22 - -### Patch Changes - -- Add SKALE Nebula Mainnet support -- Updated dependencies - - @0xsequence/waas@2.0.22 - -## 2.0.21 - -### Patch Changes - -- account: add publishWitnessFor -- Updated dependencies - - @0xsequence/waas@2.0.21 - -## 2.0.20 - -### Patch Changes - -- upgrade deps, and improve waas session status handling -- Updated dependencies - - @0xsequence/waas@2.0.20 - -## 2.0.19 - -### Patch Changes - -- Add Immutable zkEVM support -- Updated dependencies - - @0xsequence/waas@2.0.19 - -## 2.0.18 - -### Patch Changes - -- waas: new contractCall transaction type -- sessions: add arweave owner -- Updated dependencies -- Updated dependencies - - @0xsequence/waas@2.0.18 - -## 2.0.17 - -### Patch Changes - -- update waas auth to clear session before signIn -- Updated dependencies - - @0xsequence/waas@2.0.17 - -## 2.0.16 - -### Patch Changes - -- Removed Astar chains -- Updated dependencies - - @0xsequence/waas@2.0.16 - -## 2.0.15 - -### Patch Changes - -- indexer: update bindings with token balance additions -- Updated dependencies - - @0xsequence/waas@2.0.15 - -## 2.0.14 - -### Patch Changes - -- sessions: arweave config reader -- network: add b3 and apechain mainnet configs -- Updated dependencies -- Updated dependencies - - @0xsequence/waas@2.0.14 - -## 2.0.13 - -### Patch Changes - -- network: toy-testnet -- Updated dependencies - - @0xsequence/waas@2.0.13 - -## 2.0.12 - -### Patch Changes - -- api: update bindings -- Updated dependencies - - @0xsequence/waas@2.0.12 - -## 2.0.11 - -### Patch Changes - -- waas: intents test fix -- api: update bindings -- Updated dependencies -- Updated dependencies - - @0xsequence/waas@2.0.11 - -## 2.0.10 - -### Patch Changes - -- network: soneium minato testnet -- Updated dependencies - - @0xsequence/waas@2.0.10 - -## 2.0.9 - -### Patch Changes - -- network: fix SKALE network name -- Updated dependencies - - @0xsequence/waas@2.0.9 - -## 2.0.8 - -### Patch Changes - -- metadata: update bindings -- Updated dependencies - - @0xsequence/waas@2.0.8 - -## 2.0.7 - -### Patch Changes - -- wallet request handler fix -- Updated dependencies - - @0xsequence/waas@2.0.7 - -## 2.0.6 - -### Patch Changes - -- network: matic -> pol -- Updated dependencies - - @0xsequence/waas@2.0.6 - -## 2.0.5 - -### Patch Changes - -- provider: update databeat to 0.9.2 -- Updated dependencies - - @0xsequence/waas@2.0.5 - -## 2.0.4 - -### Patch Changes - -- network: add skale-nebula-testnet -- Updated dependencies - - @0xsequence/waas@2.0.4 - -## 2.0.3 - -### Patch Changes - -- waas: check session status in SequenceWaaS.isSignedIn() -- Updated dependencies - - @0xsequence/waas@2.0.3 - -## 2.0.2 - -### Patch Changes - -- sessions: property convert serialized bignumber hex value to bigint -- Updated dependencies - - @0xsequence/waas@2.0.2 - -## 2.0.1 - -### Patch Changes - -- waas: http signature check for authenticator requests -- provider: unwrap legacy json rpc responses -- use json replacer and reviver for bigints -- Updated dependencies -- Updated dependencies -- Updated dependencies - - @0xsequence/waas@2.0.1 - -## 2.0.0 - -### Major Changes - -- ethers v6 - -### Patch Changes - -- Updated dependencies - - @0xsequence/waas@2.0.0 - -## 1.10.15 - -### Patch Changes - -- utils: extractProjectIdFromAccessKey -- Updated dependencies - - @0xsequence/waas@1.10.15 - -## 1.10.14 - -### Patch Changes - -- network: add borne-testnet to allNetworks -- Updated dependencies - - @0xsequence/waas@1.10.14 - -## 1.10.13 - -### Patch Changes - -- network: add borne testnet -- Updated dependencies - - @0xsequence/waas@1.10.13 - -## 1.10.12 - -### Patch Changes - -- api: update bindings -- global/window -> globalThis -- Updated dependencies -- Updated dependencies - - @0xsequence/waas@1.10.12 - -## 1.10.11 - -### Patch Changes - -- waas: updated intent.gen without webrpc types, errors exported from authenticator.gen -- Updated dependencies - - @0xsequence/waas@1.10.11 - -## 1.10.10 - -### Patch Changes - -- metadata: update bindings with new contract collections api -- Updated dependencies - - @0xsequence/waas@1.10.10 - -## 1.10.9 - -### Patch Changes - -- waas minor update -- Updated dependencies - - @0xsequence/waas@1.10.9 - -## 1.10.8 - -### Patch Changes - -- update metadata bindings -- Updated dependencies - - @0xsequence/waas@1.10.8 - -## 1.10.7 - -### Patch Changes - -- minor fixes to waas client -- Updated dependencies - - @0xsequence/waas@1.10.7 - -## 1.10.6 - -### Patch Changes - -- metadata: update bindings -- Updated dependencies - - @0xsequence/waas@1.10.6 - -## 1.10.5 - -### Patch Changes - -- network: ape-chain-testnet -> apechain-testnet -- Updated dependencies - - @0xsequence/waas@1.10.5 - -## 1.10.4 - -### Patch Changes - -- network: add b3-sepolia, ape-chain-testnet, blast, blast-sepolia -- Updated dependencies - - @0xsequence/waas@1.10.4 - -## 1.10.3 - -### Patch Changes - -- typing fix -- Updated dependencies - - @0xsequence/waas@1.10.3 - -## 1.10.2 - -### Patch Changes - -- - waas: add getIdToken method - - indexer: update api client -- Updated dependencies - - @0xsequence/waas@1.10.2 - -## 1.10.1 - -### Patch Changes - -- metadata: update bindings -- Updated dependencies - - @0xsequence/waas@1.10.1 - -## 1.10.0 - -### Minor Changes - -- waas release v1.3.0 - -### Patch Changes - -- Updated dependencies - - @0xsequence/waas@1.10.0 - -## 1.9.37 - -### Patch Changes - -- network: adds nativeToken data to NetworkMetadata constants -- Updated dependencies - - @0xsequence/waas@1.9.37 - -## 1.9.36 - -### Patch Changes - -- guard: export client -- Updated dependencies - - @0xsequence/waas@1.9.36 - -## 1.9.35 - -### Patch Changes - -- guard: update bindings -- Updated dependencies - - @0xsequence/waas@1.9.35 - -## 1.9.34 - -### Patch Changes - -- waas: always use lowercase email -- Updated dependencies - - @0xsequence/waas@1.9.34 - -## 1.9.33 - -### Patch Changes - -- waas: umd build -- Updated dependencies - - @0xsequence/waas@1.9.33 - -## 1.9.32 - -### Patch Changes - -- indexer: update bindings -- Updated dependencies - - @0xsequence/waas@1.9.32 - -## 1.9.31 - -### Patch Changes - -- metadata: token directory changes -- Updated dependencies - - @0xsequence/waas@1.9.31 - -## 1.9.30 - -### Patch Changes - -- update -- Updated dependencies - - @0xsequence/waas@1.9.30 - -## 1.9.29 - -### Patch Changes - -- disable gnosis chain -- Updated dependencies - - @0xsequence/waas@1.9.29 - -## 1.9.28 - -### Patch Changes - -- add utils/merkletree -- Updated dependencies - - @0xsequence/waas@1.9.28 - -## 1.9.27 - -### Patch Changes - -- network: optimistic -> optimism -- waas: remove defaults -- api, sessions: update bindings -- Updated dependencies -- Updated dependencies -- Updated dependencies - - @0xsequence/waas@1.9.27 - -## 1.9.26 - -### Patch Changes - -- - add backend interfaces for pluggable interfaces - - introduce @0xsequence/react-native - - update pnpm to lockfile v9 -- Updated dependencies - - @0xsequence/waas@1.9.26 - -## 1.9.25 - -### Patch Changes - -- update webrpc clients with new error types -- Updated dependencies - - @0xsequence/waas@1.9.25 - -## 1.9.24 - -### Patch Changes - -- waas: add memoryStore backend to localStore -- Updated dependencies - - @0xsequence/waas@1.9.24 - -## 1.9.23 - -### Patch Changes - -- update api client bindings -- Updated dependencies - - @0xsequence/waas@1.9.23 - -## 1.9.22 - -### Patch Changes - -- update metadata client bindings -- Updated dependencies - - @0xsequence/waas@1.9.22 - -## 1.9.21 - -### Patch Changes - -- api client bindings -- Updated dependencies - - @0xsequence/waas@1.9.21 - -## 1.9.20 - -### Patch Changes - -- api client bindings update -- Updated dependencies - - @0xsequence/waas@1.9.20 - -## 1.9.19 - -### Patch Changes - -- waas update -- Updated dependencies - - @0xsequence/waas@1.9.19 - -## 1.9.18 - -### Patch Changes - -- provider: prohibit dangerous functions -- Updated dependencies - - @0xsequence/waas@1.9.18 - -## 1.9.17 - -### Patch Changes - -- network: add xr-sepolia -- Updated dependencies - - @0xsequence/waas@1.9.17 - -## 1.9.16 - -### Patch Changes - -- waas: sequence.feeOptions -- Updated dependencies - - @0xsequence/waas@1.9.16 - -## 1.9.15 - -### Patch Changes - -- metadata: collection external_link field name fix -- Updated dependencies - - @0xsequence/waas@1.9.15 - -## 1.9.14 - -### Patch Changes - -- network: astar-zkatana -> astar-zkyoto -- network: deprecate polygon mumbai network -- network: add xai and polygon amoy -- Updated dependencies -- Updated dependencies -- Updated dependencies - - @0xsequence/waas@1.9.14 - -## 1.9.13 - -### Patch Changes - -- waas: fix @0xsequence/network dependency -- Updated dependencies - - @0xsequence/waas@1.9.13 - -## 1.9.12 - -### Patch Changes - -- indexer: update rpc bindings -- provider: signMessage: Serialize the BytesLike or string message into hexstring before sending -- waas: SessionAuthProof -- Updated dependencies -- Updated dependencies -- Updated dependencies - - @0xsequence/waas@1.9.12 - -## 1.9.11 - -### Patch Changes - -- metdata, update rpc bindings -- Updated dependencies - - @0xsequence/waas@1.9.11 - -## 1.9.10 - -### Patch Changes - -- update metadata rpc bindings -- Updated dependencies - - @0xsequence/waas@1.9.10 - -## 1.9.9 - -### Patch Changes - -- metadata, add SequenceCollections rpc client -- Updated dependencies - - @0xsequence/waas@1.9.9 - -## 1.9.8 - -### Patch Changes - -- waas client update -- Updated dependencies - - @0xsequence/waas@1.9.8 - -## 1.9.7 - -### Patch Changes - -- update rpc client bindings for api, metadata and relayer -- Updated dependencies - - @0xsequence/waas@1.9.7 - -## 1.9.6 - -### Patch Changes - -- waas package update -- Updated dependencies - - @0xsequence/waas@1.9.6 - -## 1.9.5 - -### Patch Changes - -- RpcRelayer prioritize project access key -- Updated dependencies - - @0xsequence/waas@1.9.5 - -## 1.9.4 - -### Patch Changes - -- waas: fix network dependency -- Updated dependencies - - @0xsequence/waas@1.9.4 - -## 1.9.3 - -### Patch Changes - -- provider: don't append access key to RPC url if user has already provided it -- Updated dependencies - - @0xsequence/waas@1.9.3 - -## 1.9.2 - -### Patch Changes - -- network: add xai-sepolia -- Updated dependencies - - @0xsequence/waas@1.9.2 - -## 1.9.1 - -### Patch Changes - -- analytics fix -- Updated dependencies - - @0xsequence/waas@1.9.1 - -## 1.9.0 - -### Minor Changes - -- waas release - -### Patch Changes - -- Updated dependencies - - @0xsequence/waas@1.9.0 - -## 0.0.0-20231129192642 - -### Minor Changes - -- WaaS Ethers signer wrapper -- Updated dependencies - - @0xsequence/waas@0.0.0-20231129192642 diff --git a/old/packages/waas-ethers/README.md b/old/packages/waas-ethers/README.md deleted file mode 100644 index 5fa1f9b1b..000000000 --- a/old/packages/waas-ethers/README.md +++ /dev/null @@ -1,4 +0,0 @@ -@0xsequence/waas-ethers -================= - -See [0xsequence project page](https://github.com/0xsequence/sequence.js). diff --git a/old/packages/waas-ethers/package.json b/old/packages/waas-ethers/package.json deleted file mode 100644 index 626d29605..000000000 --- a/old/packages/waas-ethers/package.json +++ /dev/null @@ -1,29 +0,0 @@ -{ - "name": "@0xsequence/waas-ethers", - "version": "2.3.8", - "description": "waas ethers wrapper", - "repository": "https://github.com/0xsequence/sequence.js/tree/master/packages/waas", - "source": "src/index.ts", - "main": "dist/0xsequence-waas-ethers.cjs.js", - "module": "dist/0xsequence-waas-ethers.esm.js", - "author": "Horizon Blockchain Games", - "license": "Apache-2.0", - "scripts": { - "test": "echo todo", - "test:file": "NODE_OPTIONS='--import tsx' mocha -timeout 300000", - "typecheck": "tsc --noEmit" - }, - "peerDependencies": { - "ethers": ">=6" - }, - "dependencies": { - "@0xsequence/waas": "workspace:*" - }, - "devDependencies": { - "ethers": "6.13.4" - }, - "files": [ - "src", - "dist" - ] -} diff --git a/old/packages/waas-ethers/src/index.ts b/old/packages/waas-ethers/src/index.ts deleted file mode 100644 index eb0b67f6d..000000000 --- a/old/packages/waas-ethers/src/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './signer' diff --git a/old/packages/waas-ethers/src/signer.ts b/old/packages/waas-ethers/src/signer.ts deleted file mode 100644 index fcf5c5b48..000000000 --- a/old/packages/waas-ethers/src/signer.ts +++ /dev/null @@ -1,152 +0,0 @@ -import { ethers } from 'ethers' -import { CommonAuthArgs, ExtendedSequenceConfig, SequenceWaaS, SequenceConfig, networks, store } from '@0xsequence/waas' - -export class SequenceSigner extends ethers.AbstractSigner { - constructor( - private readonly sequence: SequenceWaaS, - readonly provider: ethers.Provider | null = null - ) { - super() - } - - public static fromConfig( - config: SequenceConfig & Partial, - store?: store.Store, - provider: ethers.Provider | null = null - ): SequenceSigner { - return new SequenceSigner(new SequenceWaaS(config, store), provider) - } - - async getAddress(): Promise { - return this.sequence.getAddress() - } - - // Ensure the provider has a sequence supported network - private async _ensureNetworkValid(providerRequired: boolean): Promise { - if (providerRequired && !this.provider) { - throw new Error('Provider is required') - } - if (this.provider && networks.isSimpleNetwork((await this.provider.getNetwork()).chainId)) { - throw new Error('Provider and WaaS configured with different networks') - } - } - - async getSimpleNetwork(): Promise { - if (this.provider) { - return this.provider.getNetwork().then(n => Number(n.chainId)) - } - return undefined - } - - async signMessage(message: ethers.BytesLike, authArgs?: CommonAuthArgs): Promise { - await this._ensureNetworkValid(false) - - const args = { - message: message.toString(), - network: await this.getSimpleNetwork(), - ...authArgs - } - return this.sequence.signMessage(args).then(response => response.data.signature) - } - - async signTypedData( - domain: ethers.TypedDataDomain, - types: Record, - value: Record, - authArgs?: CommonAuthArgs - ): Promise { - await this._ensureNetworkValid(false) - - const args = { - typedData: { - domain, - types, - message: value - }, - network: await this.getSimpleNetwork(), - ...authArgs - } - return this.sequence.signTypedData(args).then(response => response.data.signature) - } - - async signTransaction(_transaction: ethers.TransactionRequest): Promise { - // Not supported. Use sendTransaction or signMessage instead. - throw new Error('SequenceSigner does not support signTransaction') - } - - async sendTransaction(transaction: ethers.TransactionRequest, authArgs?: CommonAuthArgs): Promise { - await this._ensureNetworkValid(true) - - const args = { - transactions: [await ethers.resolveProperties(transaction)], - network: await this.getSimpleNetwork(), - ...authArgs - } - const response = await this.sequence.sendTransaction(args) - - if (response.code === 'transactionFailed') { - // Failed - throw new Error(`Unable to send transaction: ${response.data.error}`) - } - - if (response.code === 'transactionReceipt') { - // Success - const { txHash } = response.data - // eslint-disable-next-line @typescript-eslint/no-extra-non-null-assertion - return this.provider!.getTransaction(txHash) as Promise - } - - // Impossible - throw new Error('Unknown return value') - } - - connect(provider: ethers.Provider, sequence?: SequenceWaaS) { - return new SequenceSigner(sequence ?? this.sequence, provider) - } - - // - // Provider required - // - - async getTransactionCount(_blockTag?: ethers.BlockTag): Promise { - throw new Error('SequenceSigner does not support getTransactionCount') - } - - async estimateGas(transaction: ethers.TransactionRequest): Promise { - await this._ensureNetworkValid(true) - //FIXME This won't be accurate - return super.estimateGas(transaction) - } - - async call(transaction: ethers.TransactionRequest, blockTag?: ethers.BlockTag): Promise { - await this._ensureNetworkValid(true) - return super.call({ ...transaction, blockTag }) - } - - // XXX: These methods are not supported by AbstractProvider - - // async getBalance(blockTag?: ethers.BlockTag): Promise { - // await this._ensureNetworkValid(true) - // return super.getBalance(blockTag) - // } - - // async getChainId(): Promise { - // await this._ensureNetworkValid(true) // Prevent mismatched configurations - // return super.getChainId() - // } - - // async getGasPrice(): Promise { - // await this._ensureNetworkValid(true) - // return super.getGasPrice() - // } - - // async getFeeData(): Promise { - // await this._ensureNetworkValid(true) - // return super.getFeeData() - // } - - async resolveName(name: string): Promise { - await this._ensureNetworkValid(true) - return super.resolveName(name) - } -} diff --git a/old/packages/waas/CHANGELOG.md b/old/packages/waas/CHANGELOG.md deleted file mode 100644 index f07e9fa65..000000000 --- a/old/packages/waas/CHANGELOG.md +++ /dev/null @@ -1,1128 +0,0 @@ -# @0xsequence/waas - -## 2.3.8 - -### Patch Changes - -- indexer: update clients -- Updated dependencies - - @0xsequence/core@2.3.8 - - @0xsequence/network@2.3.8 - - @0xsequence/utils@2.3.8 - -## 2.3.7 - -### Patch Changes - -- Metadata updates -- Updated dependencies - - @0xsequence/core@2.3.7 - - @0xsequence/network@2.3.7 - - @0xsequence/utils@2.3.7 - -## 2.3.6 - -### Patch Changes - -- New chains -- Updated dependencies - - @0xsequence/core@2.3.6 - - @0xsequence/network@2.3.6 - - @0xsequence/utils@2.3.6 - -## 2.3.5 - -### Patch Changes - -- Add Frequency Testnet -- Updated dependencies - - @0xsequence/core@2.3.5 - - @0xsequence/network@2.3.5 - - @0xsequence/utils@2.3.5 - -## 2.3.4 - -### Patch Changes - -- metadata: exclude deprecated methods on rpc client -- Updated dependencies - - @0xsequence/core@2.3.4 - - @0xsequence/network@2.3.4 - - @0xsequence/utils@2.3.4 - -## 2.3.3 - -### Patch Changes - -- metadata: client update -- Updated dependencies - - @0xsequence/core@2.3.3 - - @0xsequence/network@2.3.3 - - @0xsequence/utils@2.3.3 - -## 2.3.2 - -### Patch Changes - -- metadata: update rpc client -- Updated dependencies - - @0xsequence/core@2.3.2 - - @0xsequence/network@2.3.2 - - @0xsequence/utils@2.3.2 - -## 2.3.1 - -### Patch Changes - -- indexer: update rpc client -- Updated dependencies - - @0xsequence/core@2.3.1 - - @0xsequence/network@2.3.1 - - @0xsequence/utils@2.3.1 - -## 2.3.0 - -### Minor Changes - -- update metadata rpc client - -### Patch Changes - -- Updated dependencies - - @0xsequence/core@2.3.0 - - @0xsequence/network@2.3.0 - - @0xsequence/utils@2.3.0 - -## 2.2.15 - -### Patch Changes - -- API updates -- Updated dependencies - - @0xsequence/core@2.2.15 - - @0xsequence/network@2.2.15 - - @0xsequence/utils@2.2.15 - -## 2.2.14 - -### Patch Changes - -- Somnia Testnet and Monad Testnet -- Updated dependencies - - @0xsequence/core@2.2.14 - - @0xsequence/network@2.2.14 - - @0xsequence/utils@2.2.14 - -## 2.2.13 - -### Patch Changes - -- Add XR1 to all networks -- Updated dependencies - - @0xsequence/core@2.2.13 - - @0xsequence/network@2.2.13 - - @0xsequence/utils@2.2.13 - -## 2.2.12 - -### Patch Changes - -- Add XR1 -- Updated dependencies - - @0xsequence/core@2.2.12 - - @0xsequence/network@2.2.12 - - @0xsequence/utils@2.2.12 - -## 2.2.11 - -### Patch Changes - -- Relayer updates -- Updated dependencies - - @0xsequence/core@2.2.11 - - @0xsequence/network@2.2.11 - - @0xsequence/utils@2.2.11 - -## 2.2.10 - -### Patch Changes - -- Etherlink support -- Updated dependencies - - @0xsequence/core@2.2.10 - - @0xsequence/network@2.2.10 - - @0xsequence/utils@2.2.10 - -## 2.2.9 - -### Patch Changes - -- Indexer gateway native token balances -- Updated dependencies - - @0xsequence/core@2.2.9 - - @0xsequence/network@2.2.9 - - @0xsequence/utils@2.2.9 - -## 2.2.8 - -### Patch Changes - -- Add Moonbeam and Moonbase Alpha -- Updated dependencies - - @0xsequence/core@2.2.8 - - @0xsequence/network@2.2.8 - - @0xsequence/utils@2.2.8 - -## 2.2.7 - -### Patch Changes - -- Update Builder package -- Updated dependencies - - @0xsequence/core@2.2.7 - - @0xsequence/network@2.2.7 - - @0xsequence/utils@2.2.7 - -## 2.2.6 - -### Patch Changes - -- Update relayer package -- Updated dependencies - - @0xsequence/core@2.2.6 - - @0xsequence/network@2.2.6 - - @0xsequence/utils@2.2.6 - -## 2.2.5 - -### Patch Changes - -- auth: fix sequence indexer gateway url -- account: immutable wallet proxy hook -- Updated dependencies -- Updated dependencies - - @0xsequence/core@2.2.5 - - @0xsequence/network@2.2.5 - - @0xsequence/utils@2.2.5 - -## 2.2.4 - -### Patch Changes - -- network: update soneium mainnet block explorer url -- waas: signTypedData intent support -- Updated dependencies -- Updated dependencies - - @0xsequence/core@2.2.4 - - @0xsequence/network@2.2.4 - - @0xsequence/utils@2.2.4 - -## 2.2.3 - -### Patch Changes - -- provider: updating initWallet to use connected network configs if they exist -- Updated dependencies - - @0xsequence/core@2.2.3 - - @0xsequence/network@2.2.3 - - @0xsequence/utils@2.2.3 - -## 2.2.2 - -### Patch Changes - -- pass projectAccessKey to relayer at all times -- Updated dependencies - - @0xsequence/core@2.2.2 - - @0xsequence/network@2.2.2 - - @0xsequence/utils@2.2.2 - -## 2.2.1 - -### Patch Changes - -- waas-ethers: sign typed data -- Updated dependencies - - @0xsequence/core@2.2.1 - - @0xsequence/network@2.2.1 - - @0xsequence/utils@2.2.1 - -## 2.2.0 - -### Minor Changes - -- indexer: gateway client -- @0xsequence/builder -- upgrade puppeteer to v23.10.3 - -### Patch Changes - -- Updated dependencies -- Updated dependencies -- Updated dependencies - - @0xsequence/core@2.2.0 - - @0xsequence/network@2.2.0 - - @0xsequence/utils@2.2.0 - -## 2.1.8 - -### Patch Changes - -- Add Soneium Mainnet -- Updated dependencies - - @0xsequence/core@2.1.8 - - @0xsequence/network@2.1.8 - - @0xsequence/utils@2.1.8 - -## 2.1.7 - -### Patch Changes - -- guard: pass project access key to guard requests -- Updated dependencies - - @0xsequence/core@2.1.7 - - @0xsequence/network@2.1.7 - - @0xsequence/utils@2.1.7 - -## 2.1.6 - -### Patch Changes - -- Add LAOS and Telos Testnet chains -- Updated dependencies - - @0xsequence/core@2.1.6 - - @0xsequence/network@2.1.6 - - @0xsequence/utils@2.1.6 - -## 2.1.5 - -### Patch Changes - -- account: save presigned configuration with reference chain id 1 -- Updated dependencies - - @0xsequence/core@2.1.5 - - @0xsequence/network@2.1.5 - - @0xsequence/utils@2.1.5 - -## 2.1.4 - -### Patch Changes - -- provider: pass projectAccessKey into MuxMessageProvider -- Updated dependencies - - @0xsequence/core@2.1.4 - - @0xsequence/network@2.1.4 - - @0xsequence/utils@2.1.4 - -## 2.1.3 - -### Patch Changes - -- waas: time drift date fix due to strange browser quirk -- Updated dependencies - - @0xsequence/core@2.1.3 - - @0xsequence/network@2.1.3 - - @0xsequence/utils@2.1.3 - -## 2.1.2 - -### Patch Changes - -- provider: export analytics correctly -- Updated dependencies - - @0xsequence/core@2.1.2 - - @0xsequence/network@2.1.2 - - @0xsequence/utils@2.1.2 - -## 2.1.1 - -### Patch Changes - -- Add LAOS chain support -- Updated dependencies - - @0xsequence/core@2.1.1 - - @0xsequence/network@2.1.1 - - @0xsequence/utils@2.1.1 - -## 2.1.0 - -### Minor Changes - -- account: forward project access key when estimating fees and sending transactions - -### Patch Changes - -- sessions: save signatures with reference chain id -- Updated dependencies -- Updated dependencies - - @0xsequence/core@2.1.0 - - @0xsequence/network@2.1.0 - - @0xsequence/utils@2.1.0 - -## 2.0.26 - -### Patch Changes - -- account: fix chain id comparison -- Updated dependencies - - @0xsequence/core@2.0.26 - - @0xsequence/network@2.0.26 - - @0xsequence/utils@2.0.26 - -## 2.0.25 - -### Patch Changes - -- skale-nebula: deploy gas limit = 10m -- Updated dependencies - - @0xsequence/core@2.0.25 - - @0xsequence/network@2.0.25 - - @0xsequence/utils@2.0.25 - -## 2.0.24 - -### Patch Changes - -- sessions: arweave: configurable gateway url -- waas: use /status to get time drift before sending any intents -- Updated dependencies -- Updated dependencies - - @0xsequence/core@2.0.24 - - @0xsequence/network@2.0.24 - - @0xsequence/utils@2.0.24 - -## 2.0.23 - -### Patch Changes - -- Add The Root Network support -- Updated dependencies - - @0xsequence/core@2.0.23 - - @0xsequence/network@2.0.23 - - @0xsequence/utils@2.0.23 - -## 2.0.22 - -### Patch Changes - -- Add SKALE Nebula Mainnet support -- Updated dependencies - - @0xsequence/core@2.0.22 - - @0xsequence/network@2.0.22 - - @0xsequence/utils@2.0.22 - -## 2.0.21 - -### Patch Changes - -- account: add publishWitnessFor -- Updated dependencies - - @0xsequence/core@2.0.21 - - @0xsequence/network@2.0.21 - - @0xsequence/utils@2.0.21 - -## 2.0.20 - -### Patch Changes - -- upgrade deps, and improve waas session status handling -- Updated dependencies - - @0xsequence/core@2.0.20 - - @0xsequence/network@2.0.20 - - @0xsequence/utils@2.0.20 - -## 2.0.19 - -### Patch Changes - -- Add Immutable zkEVM support -- Updated dependencies - - @0xsequence/core@2.0.19 - - @0xsequence/network@2.0.19 - - @0xsequence/utils@2.0.19 - -## 2.0.18 - -### Patch Changes - -- waas: new contractCall transaction type -- sessions: add arweave owner -- Updated dependencies -- Updated dependencies - - @0xsequence/core@2.0.18 - - @0xsequence/network@2.0.18 - - @0xsequence/utils@2.0.18 - -## 2.0.17 - -### Patch Changes - -- update waas auth to clear session before signIn -- Updated dependencies - - @0xsequence/core@2.0.17 - - @0xsequence/network@2.0.17 - - @0xsequence/utils@2.0.17 - -## 2.0.16 - -### Patch Changes - -- Removed Astar chains -- Updated dependencies - - @0xsequence/core@2.0.16 - - @0xsequence/network@2.0.16 - - @0xsequence/utils@2.0.16 - -## 2.0.15 - -### Patch Changes - -- indexer: update bindings with token balance additions -- Updated dependencies - - @0xsequence/core@2.0.15 - - @0xsequence/network@2.0.15 - - @0xsequence/utils@2.0.15 - -## 2.0.14 - -### Patch Changes - -- sessions: arweave config reader -- network: add b3 and apechain mainnet configs -- Updated dependencies -- Updated dependencies - - @0xsequence/core@2.0.14 - - @0xsequence/network@2.0.14 - - @0xsequence/utils@2.0.14 - -## 2.0.13 - -### Patch Changes - -- network: toy-testnet -- Updated dependencies - - @0xsequence/core@2.0.13 - - @0xsequence/network@2.0.13 - - @0xsequence/utils@2.0.13 - -## 2.0.12 - -### Patch Changes - -- api: update bindings -- Updated dependencies - - @0xsequence/core@2.0.12 - - @0xsequence/network@2.0.12 - - @0xsequence/utils@2.0.12 - -## 2.0.11 - -### Patch Changes - -- waas: intents test fix -- api: update bindings -- Updated dependencies -- Updated dependencies - - @0xsequence/core@2.0.11 - - @0xsequence/network@2.0.11 - - @0xsequence/utils@2.0.11 - -## 2.0.10 - -### Patch Changes - -- network: soneium minato testnet -- Updated dependencies - - @0xsequence/core@2.0.10 - - @0xsequence/network@2.0.10 - - @0xsequence/utils@2.0.10 - -## 2.0.9 - -### Patch Changes - -- network: fix SKALE network name -- Updated dependencies - - @0xsequence/core@2.0.9 - - @0xsequence/network@2.0.9 - - @0xsequence/utils@2.0.9 - -## 2.0.8 - -### Patch Changes - -- metadata: update bindings -- Updated dependencies - - @0xsequence/core@2.0.8 - - @0xsequence/network@2.0.8 - - @0xsequence/utils@2.0.8 - -## 2.0.7 - -### Patch Changes - -- wallet request handler fix -- Updated dependencies - - @0xsequence/core@2.0.7 - - @0xsequence/network@2.0.7 - - @0xsequence/utils@2.0.7 - -## 2.0.6 - -### Patch Changes - -- network: matic -> pol -- Updated dependencies - - @0xsequence/core@2.0.6 - - @0xsequence/network@2.0.6 - - @0xsequence/utils@2.0.6 - -## 2.0.5 - -### Patch Changes - -- provider: update databeat to 0.9.2 -- Updated dependencies - - @0xsequence/core@2.0.5 - - @0xsequence/network@2.0.5 - - @0xsequence/utils@2.0.5 - -## 2.0.4 - -### Patch Changes - -- network: add skale-nebula-testnet -- Updated dependencies - - @0xsequence/core@2.0.4 - - @0xsequence/network@2.0.4 - - @0xsequence/utils@2.0.4 - -## 2.0.3 - -### Patch Changes - -- waas: check session status in SequenceWaaS.isSignedIn() -- Updated dependencies - - @0xsequence/core@2.0.3 - - @0xsequence/network@2.0.3 - - @0xsequence/utils@2.0.3 - -## 2.0.2 - -### Patch Changes - -- sessions: property convert serialized bignumber hex value to bigint -- Updated dependencies - - @0xsequence/core@2.0.2 - - @0xsequence/network@2.0.2 - - @0xsequence/utils@2.0.2 - -## 2.0.1 - -### Patch Changes - -- waas: http signature check for authenticator requests -- provider: unwrap legacy json rpc responses -- use json replacer and reviver for bigints -- Updated dependencies -- Updated dependencies -- Updated dependencies - - @0xsequence/core@2.0.1 - - @0xsequence/network@2.0.1 - - @0xsequence/utils@2.0.1 - -## 2.0.0 - -### Major Changes - -- ethers v6 - -### Patch Changes - -- Updated dependencies - - @0xsequence/core@2.0.0 - - @0xsequence/network@2.0.0 - - @0xsequence/utils@2.0.0 - -## 1.10.15 - -### Patch Changes - -- utils: extractProjectIdFromAccessKey -- Updated dependencies - - @0xsequence/core@1.10.15 - - @0xsequence/network@1.10.15 - -## 1.10.14 - -### Patch Changes - -- network: add borne-testnet to allNetworks -- Updated dependencies - - @0xsequence/core@1.10.14 - - @0xsequence/network@1.10.14 - -## 1.10.13 - -### Patch Changes - -- network: add borne testnet -- Updated dependencies - - @0xsequence/core@1.10.13 - - @0xsequence/network@1.10.13 - -## 1.10.12 - -### Patch Changes - -- api: update bindings -- global/window -> globalThis -- Updated dependencies -- Updated dependencies - - @0xsequence/core@1.10.12 - - @0xsequence/network@1.10.12 - -## 1.10.11 - -### Patch Changes - -- waas: updated intent.gen without webrpc types, errors exported from authenticator.gen -- Updated dependencies - - @0xsequence/core@1.10.11 - - @0xsequence/network@1.10.11 - -## 1.10.10 - -### Patch Changes - -- metadata: update bindings with new contract collections api -- Updated dependencies - - @0xsequence/core@1.10.10 - - @0xsequence/network@1.10.10 - -## 1.10.9 - -### Patch Changes - -- waas minor update -- Updated dependencies - - @0xsequence/core@1.10.9 - - @0xsequence/network@1.10.9 - -## 1.10.8 - -### Patch Changes - -- update metadata bindings -- Updated dependencies - - @0xsequence/core@1.10.8 - - @0xsequence/network@1.10.8 - -## 1.10.7 - -### Patch Changes - -- minor fixes to waas client -- Updated dependencies - - @0xsequence/core@1.10.7 - - @0xsequence/network@1.10.7 - -## 1.10.6 - -### Patch Changes - -- metadata: update bindings -- Updated dependencies - - @0xsequence/core@1.10.6 - - @0xsequence/network@1.10.6 - -## 1.10.5 - -### Patch Changes - -- network: ape-chain-testnet -> apechain-testnet -- Updated dependencies - - @0xsequence/core@1.10.5 - - @0xsequence/network@1.10.5 - -## 1.10.4 - -### Patch Changes - -- network: add b3-sepolia, ape-chain-testnet, blast, blast-sepolia -- Updated dependencies - - @0xsequence/core@1.10.4 - - @0xsequence/network@1.10.4 - -## 1.10.3 - -### Patch Changes - -- typing fix -- Updated dependencies - - @0xsequence/core@1.10.3 - - @0xsequence/network@1.10.3 - -## 1.10.2 - -### Patch Changes - -- - waas: add getIdToken method - - indexer: update api client -- Updated dependencies - - @0xsequence/core@1.10.2 - - @0xsequence/network@1.10.2 - -## 1.10.1 - -### Patch Changes - -- metadata: update bindings -- Updated dependencies - - @0xsequence/core@1.10.1 - - @0xsequence/network@1.10.1 - -## 1.10.0 - -### Minor Changes - -- waas release v1.3.0 - -### Patch Changes - -- Updated dependencies - - @0xsequence/core@1.10.0 - - @0xsequence/network@1.10.0 - -## 1.9.37 - -### Patch Changes - -- network: adds nativeToken data to NetworkMetadata constants -- Updated dependencies - - @0xsequence/network@1.9.37 - -## 1.9.36 - -### Patch Changes - -- guard: export client -- Updated dependencies - - @0xsequence/network@1.9.36 - -## 1.9.35 - -### Patch Changes - -- guard: update bindings -- Updated dependencies - - @0xsequence/network@1.9.35 - -## 1.9.34 - -### Patch Changes - -- waas: always use lowercase email -- Updated dependencies - - @0xsequence/network@1.9.34 - -## 1.9.33 - -### Patch Changes - -- waas: umd build -- Updated dependencies - - @0xsequence/network@1.9.33 - -## 1.9.32 - -### Patch Changes - -- indexer: update bindings -- Updated dependencies - - @0xsequence/network@1.9.32 - -## 1.9.31 - -### Patch Changes - -- metadata: token directory changes -- Updated dependencies - - @0xsequence/network@1.9.31 - -## 1.9.30 - -### Patch Changes - -- update -- Updated dependencies - - @0xsequence/network@1.9.30 - -## 1.9.29 - -### Patch Changes - -- disable gnosis chain -- Updated dependencies - - @0xsequence/network@1.9.29 - -## 1.9.28 - -### Patch Changes - -- add utils/merkletree -- Updated dependencies - - @0xsequence/network@1.9.28 - -## 1.9.27 - -### Patch Changes - -- network: optimistic -> optimism -- waas: remove defaults -- api, sessions: update bindings -- Updated dependencies -- Updated dependencies -- Updated dependencies - - @0xsequence/network@1.9.27 - -## 1.9.26 - -### Patch Changes - -- - add backend interfaces for pluggable interfaces - - introduce @0xsequence/react-native - - update pnpm to lockfile v9 -- Updated dependencies - - @0xsequence/network@1.9.26 - -## 1.9.25 - -### Patch Changes - -- update webrpc clients with new error types -- Updated dependencies - - @0xsequence/network@1.9.25 - -## 1.9.24 - -### Patch Changes - -- waas: add memoryStore backend to localStore -- Updated dependencies - - @0xsequence/network@1.9.24 - -## 1.9.23 - -### Patch Changes - -- update api client bindings -- Updated dependencies - - @0xsequence/network@1.9.23 - -## 1.9.22 - -### Patch Changes - -- update metadata client bindings -- Updated dependencies - - @0xsequence/network@1.9.22 - -## 1.9.21 - -### Patch Changes - -- api client bindings -- Updated dependencies - - @0xsequence/network@1.9.21 - -## 1.9.20 - -### Patch Changes - -- api client bindings update -- Updated dependencies - - @0xsequence/network@1.9.20 - -## 1.9.19 - -### Patch Changes - -- waas update -- Updated dependencies - - @0xsequence/network@1.9.19 - -## 1.9.18 - -### Patch Changes - -- provider: prohibit dangerous functions -- Updated dependencies - - @0xsequence/network@1.9.18 - -## 1.9.17 - -### Patch Changes - -- network: add xr-sepolia -- Updated dependencies - - @0xsequence/network@1.9.17 - -## 1.9.16 - -### Patch Changes - -- waas: sequence.feeOptions -- Updated dependencies - - @0xsequence/network@1.9.16 - -## 1.9.15 - -### Patch Changes - -- metadata: collection external_link field name fix -- Updated dependencies - - @0xsequence/network@1.9.15 - -## 1.9.14 - -### Patch Changes - -- network: astar-zkatana -> astar-zkyoto -- network: deprecate polygon mumbai network -- network: add xai and polygon amoy -- Updated dependencies -- Updated dependencies -- Updated dependencies - - @0xsequence/network@1.9.14 - -## 1.9.13 - -### Patch Changes - -- waas: fix @0xsequence/network dependency -- Updated dependencies - - @0xsequence/network@1.9.13 - -## 1.9.12 - -### Patch Changes - -- indexer: update rpc bindings -- provider: signMessage: Serialize the BytesLike or string message into hexstring before sending -- waas: SessionAuthProof -- Updated dependencies -- Updated dependencies -- Updated dependencies - - @0xsequence/network@1.9.12 - -## 1.9.11 - -### Patch Changes - -- metdata, update rpc bindings -- Updated dependencies - - @0xsequence/network@1.9.11 - -## 1.9.10 - -### Patch Changes - -- update metadata rpc bindings -- Updated dependencies - - @0xsequence/network@1.9.10 - -## 1.9.9 - -### Patch Changes - -- metadata, add SequenceCollections rpc client -- Updated dependencies - - @0xsequence/network@1.9.9 - -## 1.9.8 - -### Patch Changes - -- waas client update -- Updated dependencies - - @0xsequence/network@1.9.8 - -## 1.9.7 - -### Patch Changes - -- update rpc client bindings for api, metadata and relayer -- Updated dependencies - - @0xsequence/network@1.9.7 - -## 1.9.6 - -### Patch Changes - -- waas package update -- Updated dependencies - - @0xsequence/network@1.9.6 - -## 1.9.5 - -### Patch Changes - -- RpcRelayer prioritize project access key -- Updated dependencies - - @0xsequence/network@1.9.5 - -## 1.9.4 - -### Patch Changes - -- waas: fix network dependency -- Updated dependencies - - @0xsequence/network@1.9.4 - -## 1.9.3 - -### Patch Changes - -- provider: don't append access key to RPC url if user has already provided it -- Updated dependencies - - @0xsequence/network@1.9.3 - -## 1.9.2 - -### Patch Changes - -- network: add xai-sepolia -- Updated dependencies - - @0xsequence/network@1.9.2 - -## 1.9.1 - -### Patch Changes - -- analytics fix -- Updated dependencies - - @0xsequence/network@1.9.1 - -## 1.9.0 - -### Minor Changes - -- waas release - -### Patch Changes - -- Updated dependencies - - @0xsequence/network@1.9.0 - -## 0.0.0-20231129192642 - -### Minor Changes - -- WaaS Ethers signer wrapper - -## 0.0.0-20230922164806 - -### Minor Changes - -- WaaS initial implementatino diff --git a/old/packages/waas/README.md b/old/packages/waas/README.md deleted file mode 100644 index 2811b84f9..000000000 --- a/old/packages/waas/README.md +++ /dev/null @@ -1,4 +0,0 @@ -@0xsequence/waas -================= - -See [0xsequence project page](https://github.com/0xsequence/sequence.js). diff --git a/old/packages/waas/package.json b/old/packages/waas/package.json deleted file mode 100644 index 67c34cb3e..000000000 --- a/old/packages/waas/package.json +++ /dev/null @@ -1,41 +0,0 @@ -{ - "name": "@0xsequence/waas", - "version": "2.3.8", - "description": "waas session client", - "repository": "https://github.com/0xsequence/sequence.js/tree/master/packages/waas", - "source": "src/index.ts", - "main": "dist/0xsequence-waas.cjs.js", - "module": "dist/0xsequence-waas.esm.js", - "umd:main": "dist/0xsequence-waas.umd.min.js", - "author": "Horizon Blockchain Games", - "license": "Apache-2.0", - "scripts": { - "test": "pnpm test:file tests/**/*.spec.ts", - "test:file": "NODE_OPTIONS='--import tsx' mocha --timeout 30000", - "typecheck": "tsc --noEmit" - }, - "dependencies": { - "@0xsequence/core": "workspace:*", - "@0xsequence/network": "workspace:*", - "@0xsequence/utils": "workspace:*", - "@aws-sdk/client-cognito-identity-provider": "^3.445.0", - "idb": "^7.1.1", - "json-canonicalize": "^1.0.6", - "jwt-decode": "^4.0.0" - }, - "files": [ - "src", - "dist" - ], - "peerDependencies": { - "ethers": ">=6" - }, - "devDependencies": { - "@types/jwt-decode": "^3.1.0", - "ethers": "6.13.4", - "fake-indexeddb": "^4.0.1" - }, - "preconstruct": { - "umdName": "sequence-waas" - } -} diff --git a/old/packages/waas/src/auth.ts b/old/packages/waas/src/auth.ts deleted file mode 100644 index 20ede1d45..000000000 --- a/old/packages/waas/src/auth.ts +++ /dev/null @@ -1,897 +0,0 @@ -import { Observer, SequenceWaaSBase } from './base' -import { - Account, - IdentityType, - IntentDataOpenSession, - IntentDataSendTransaction, - IntentResponseIdToken -} from './clients/intent.gen' -import { newSessionFromSessionId } from './session' -import { LocalStore, Store, StoreObj } from './store' -import { - GetTransactionReceiptArgs, - SendContractCallArgs, - SendERC1155Args, - SendERC20Args, - SendERC721Args, - SendTransactionsArgs, - SignedIntent, - SignMessageArgs, - getTimeDrift, - updateTimeDrift, - getLocalTime, - SignTypedDataArgs -} from './intents' -import { - FeeOptionsResponse, - isCloseSessionResponse, - isFeeOptionsResponse, - isFinishValidateSessionResponse, - isGetIdTokenResponse, - isGetSessionResponse, - isInitiateAuthResponse, - isIntentTimeError, - isLinkAccountResponse, - isListAccountsResponse, - isMaySentTransactionResponse, - isSessionAuthProofResponse, - isSignedMessageResponse, - isSignedTypedDataResponse, - isTimedOutTransactionResponse, - isValidationRequiredResponse, - MaySentTransactionResponse, - SignedMessageResponse, - SignedTypedDataResponse -} from './intents/responses' -import { WaasAuthenticator, AnswerIncorrectError, Chain, EmailAlreadyInUseError, Session } from './clients/authenticator.gen' -import { NoPrivateKeyError } from './errors' -import { SimpleNetwork, WithSimpleNetwork } from './networks' -import { EmailAuth } from './email' -import { ethers } from 'ethers' -import { getDefaultSubtleCryptoBackend, SubtleCryptoBackend } from './subtle-crypto' -import { getDefaultSecureStoreBackend, SecureStoreBackend } from './secure-store' -import { Challenge, EmailChallenge, GuestChallenge, IdTokenChallenge, PlayFabChallenge, StytchChallenge } from './challenge' -import { jwtDecode } from 'jwt-decode' - -export type Sessions = (Session & { isThis: boolean })[] -export type { Account } -export { IdentityType } - -export type SequenceConfig = { - projectAccessKey: string - waasConfigKey: string - network?: SimpleNetwork - disableHttpSignatureCheck?: boolean -} - -export type ExtendedSequenceConfig = { - rpcServer: string - emailRegion?: string -} - -export type WaaSConfigKey = { - projectId: number - emailClientId?: string -} - -export type GuestIdentity = { guest: true } -export type IdTokenIdentity = { idToken: string } -export type EmailIdentity = { email: string } -export type PlayFabIdentity = { - playFabTitleId: string - playFabSessionTicket: string -} - -export type Identity = IdTokenIdentity | EmailIdentity | PlayFabIdentity | GuestIdentity - -export type SignInResponse = { - sessionId: string - wallet: string - email?: string -} - -export type ValidationArgs = { - onValidationRequired?: () => boolean -} - -export type CommonAuthArgs = { - validation?: ValidationArgs - identifier?: string -} - -export type Network = Chain - -export type NetworkList = Network[] - -export type EmailConflictInfo = { - type: IdentityType - email: string - issuer: string -} - -export function parseSequenceWaaSConfigKey(key: string): Partial { - return JSON.parse(atob(key)) -} - -export function defaultArgsOrFail( - config: SequenceConfig & Partial -): Required & Required & ExtendedSequenceConfig { - const key = (config as any).waasConfigKey - const keyOverrides = key ? parseSequenceWaaSConfigKey(key) : {} - const preconfig = { ...config, ...keyOverrides } - - if (preconfig.network === undefined) { - preconfig.network = 1 - } - - if (preconfig.projectId === undefined) { - throw new Error('Missing project id') - } - - if (preconfig.projectAccessKey === undefined) { - throw new Error('Missing access key') - } - - return preconfig as Required & Required & ExtendedSequenceConfig -} - -const jwksDev = { - keys: [ - { - alg: 'RS256', - e: 'AQAB', - kid: '9LkLZyHdNq1N2aeHMlC5jw', - kty: 'RSA', - n: 'qllUB_ERsOjbKx4SirGow4XDov05lQyhiF7Duo4sPkH9CwMN11OqhLuIqeIXPq0rPNIXGP99A7riXTcpRNk-5ZNL29zs-Xjj3idp7nZQZLIU1CBQErTcbxbwUYp8Q46k7lJXVlMmwoLQvQAgH8BZLuSe-Xk1tye0mDC-bHvmrMfqm2zmuWeDnZercU3Jg2iYwyPrjKWx7YSBSMTXTKPGndws4m3s3XIEpI2alLcLLWsPQk2UjIlux6I7vLwvjM_BgjFhYHqgg1tgZUPn_Xxt4wvhobF8UIacRVmGcuyYBnhRxKnBQhEClGSBVtnFYYBSvRjTgliOwf3DhFoXdnmyPQ', - use: 'sig' - } - ] -} - -const jwksProd = { - keys: [ - { - alg: 'RS256', - e: 'AQAB', - kid: 'nWh-_3nQ1lnhhI1ZSQTQmw', - kty: 'RSA', - n: 'pECaEq2k0k22J9e7hFLAFmKbzPLlWToUJJmFeWAdEiU4zpW17EUEOyfjRzjgBewc7KFJQEblC3eTD7Vc5bh9-rafPEj8LaKyZzzS5Y9ZATXhlMo5Pnlar3BrTm48XcnT6HnLsvDeJHUVbrYd1JyE1kqeTjUKWvgKX4mgIJiuYhpdzbOC22cPaWb1dYCVhArDVAPHGqaEwRjX7JneETdY5hLJ6JhsAws706W7fwfNKddPQo2mY95S9q8HFxMr5EaXEMmhwxk8nT5k-Ouar2dobMXRMmQiEZSt9fJaGKlK7KWJSnbPOVa2cZud1evs1Rz2SdCSA2bhuZ6NnZCxkqnagw', - use: 'sig' - } - ] -} - -export class SequenceWaaS { - private waas: SequenceWaaSBase - private client: WaasAuthenticator - - private validationRequiredCallback: (() => void)[] = [] - private emailConflictCallback: ((info: EmailConflictInfo, forceCreate: () => Promise) => Promise)[] = [] - private emailAuthCodeRequiredCallback: ((respondWithCode: (code: string) => Promise) => Promise)[] = [] - private validationRequiredSalt: string - - public readonly config: Required & Required & ExtendedSequenceConfig - - private readonly deviceName: StoreObj - - private emailClient: EmailAuth | undefined - - // The last Date header value returned by the server, used for users with desynchronised clocks - private lastDate: Date | undefined - - // Flag for disabling consequent requests if signature verification fails - private signatureVerificationFailed: boolean = false - - constructor( - config: SequenceConfig & Partial, - private readonly store: Store = new LocalStore(), - private readonly cryptoBackend: SubtleCryptoBackend | null = getDefaultSubtleCryptoBackend(), - private readonly secureStoreBackend: SecureStoreBackend | null = getDefaultSecureStoreBackend() - ) { - this.config = defaultArgsOrFail(config) - this.waas = new SequenceWaaSBase({ network: 1, ...config }, this.store, this.cryptoBackend, this.secureStoreBackend) - this.client = new WaasAuthenticator(this.config.rpcServer, this._fetch) - - this.deviceName = new StoreObj(this.store, '@0xsequence.waas.auth.deviceName', undefined) - } - - _fetch = (input: RequestInfo, init?: RequestInit): Promise => { - if (this.signatureVerificationFailed) { - throw new Error('Signature verification failed') - } - - if (this.cryptoBackend && this.config.disableHttpSignatureCheck !== true && init?.headers) { - const headers: { [key: string]: any } = {} - - headers['Accept-Signature'] = 'sig=();alg="rsa-v1_5-sha256"' - - init!.headers = { ...init!.headers, ...headers } - } - - const response = fetch(input, init) - - if (this.cryptoBackend && this.config.disableHttpSignatureCheck !== true) { - response.then(async r => { - try { - const clone = r.clone() - const responseBodyText = await clone.text() - - const contentDigest = r.headers.get('Content-Digest') - const signatureInput = r.headers.get('Signature-Input') - const signature = r.headers.get('Signature') - - if (!contentDigest) { - throw new Error('Content-Digest header not set') - } - if (!signatureInput) { - throw new Error('Signature-Input header not set') - } - if (!signature) { - throw new Error('Signature header not set') - } - - const contentDigestSha = contentDigest.match(':(.*):')?.[1] - - if (!contentDigestSha) { - throw new Error('Content digest not found') - } - - const responseBodyTextUint8Array = new TextEncoder().encode(responseBodyText) - const responseBodyTextDigest = await this.cryptoBackend!.digest('SHA-256', responseBodyTextUint8Array) - const base64EncodedDigest = btoa(String.fromCharCode(...responseBodyTextDigest)) - - if (contentDigestSha !== base64EncodedDigest) { - throw new Error('Digest mismatch') - } - - // we're removing the first 4 characters from signatureInput to trim the sig= prefix - const message = `"content-digest": ${contentDigest}\n"@signature-params": ${signatureInput.substring(4)}` - - const algo = { name: 'RSASSA-PKCS1-v1_5', hash: 'SHA-256' } - - const jwks = r.url.includes('dev-waas') ? jwksDev : jwksProd - - const key = await this.cryptoBackend!.importKey('jwk', jwks.keys[0], algo, false, ['verify']) - - const sig = signature.match(':(.*):')?.[1] - - if (!sig) { - throw new Error('Signature not found') - } - const signatureBuffer = Uint8Array.from(atob(sig), c => c.charCodeAt(0)) - - const verifyResult = await this.cryptoBackend!.verify(algo, key, signatureBuffer, new TextEncoder().encode(message)) - - if (!verifyResult) { - throw new Error('Signature verification failed, consequent requests will fail') - } - } catch (e) { - this.signatureVerificationFailed = true - throw e - } - }) - } - - return response - } - - public get email() { - if (this.emailClient) { - return this.emailClient - } - - if (!this.config.emailRegion) { - throw new Error('Missing emailRegion') - } - - if (!this.config.emailClientId) { - throw new Error('Missing emailClientId') - } - - this.emailClient = new EmailAuth(this.config.emailRegion, this.config.emailClientId) - return this.emailClient - } - - async onValidationRequired(callback: () => void) { - this.validationRequiredCallback.push(callback) - return () => { - this.validationRequiredCallback = this.validationRequiredCallback.filter(c => c !== callback) - } - } - - onEmailConflict(callback: (info: EmailConflictInfo, forceCreate: () => Promise) => Promise) { - this.emailConflictCallback.push(callback) - return () => { - this.emailConflictCallback = this.emailConflictCallback.filter(c => c !== callback) - } - } - - onEmailAuthCodeRequired(callback: (respondWithCode: (code: string) => Promise) => Promise) { - this.emailAuthCodeRequiredCallback.push(callback) - return () => { - this.emailAuthCodeRequiredCallback = this.emailAuthCodeRequiredCallback.filter(c => c !== callback) - } - } - - private async handleValidationRequired({ onValidationRequired }: ValidationArgs = {}): Promise { - const proceed = onValidationRequired ? onValidationRequired() : true - if (!proceed) { - return false - } - - const intent = await this.waas.validateSession({ - deviceMetadata: (await this.deviceName.get()) ?? 'Unknown device' - }) - - const sendIntent = await this.sendIntent(intent) - this.validationRequiredSalt = sendIntent.data.salt - - for (const callback of this.validationRequiredCallback) { - callback() - } - - return this.waitForSessionValid() - } - - private headers() { - return { - 'X-Access-Key': this.config.projectAccessKey - } - } - - private async updateTimeDrift() { - if (getTimeDrift() === undefined) { - const res = await fetch(`${this.config.rpcServer}/status`) - const date = res.headers.get('Date') - if (!date) { - throw new Error('failed to get Date header value from /status') - } - updateTimeDrift(new Date(date)) - } - } - - private async sendIntent(intent: SignedIntent) { - const sessionId = await this.waas.getSessionId() - if (!sessionId) { - throw new Error('session not open') - } - - try { - const res = await this.client.sendIntent({ intent: intent }, this.headers()) - return res.response - } catch (e) { - if (isIntentTimeError(e) && this.lastDate) { - const newIntent = await this.waas.updateIntentTime(intent, this.lastDate) - const res = await this.client.sendIntent({ intent: newIntent }, this.headers()) - return res.response - } - throw e - } - } - - async isSignedIn() { - return this.waas.isSignedIn() - } - - async signIn(creds: Identity, sessionName: string): Promise { - // We clear and drop session regardless of whether it's signed in or not - const currentSessionId = await this.waas.getSessionId() - if (currentSessionId) { - await this.dropSession({ sessionId: currentSessionId, strict: false }) - } - - const isEmailAuth = 'email' in creds - if (isEmailAuth && this.emailAuthCodeRequiredCallback.length == 0) { - return Promise.reject('Missing emailAuthCodeRequired callback') - } - - return new Promise(async (resolve, reject) => { - let challenge: Challenge - try { - challenge = await this.initAuth(creds) - } catch (e) { - return reject(e) - } - - const respondToChallenge = async (answer: string) => { - try { - const res = await this.completeAuth(challenge.withAnswer(answer), { sessionName }) - resolve(res) - } catch (e) { - if (e instanceof AnswerIncorrectError) { - // This will NOT resolve NOR reject the top-level promise returned from signIn, it'll keep being pending - // It allows the caller to retry calling the respondToChallenge callback - throw e - } else if (e instanceof EmailAlreadyInUseError) { - const forceCreate = async () => { - try { - const res = await this.completeAuth(challenge.withAnswer(answer), { sessionName, forceCreateAccount: true }) - resolve(res) - } catch (e) { - reject(e) - } - } - const info: EmailConflictInfo = { - type: IdentityType.None, - email: '', - issuer: '' - } - if (e.cause) { - const parts = e.cause.split('|') - if (parts.length >= 2) { - info.type = parts[0] as IdentityType - info.email = parts[1] - } - if (parts.length >= 3) { - info.issuer = parts[2] - } - } - for (const callback of this.emailConflictCallback) { - callback(info, forceCreate) - } - } else { - reject(e) - } - } - } - - if (isEmailAuth) { - for (const callback of this.emailAuthCodeRequiredCallback) { - callback(respondToChallenge) - } - } else { - respondToChallenge('') - } - }) - } - - async initAuth(identity: Identity): Promise { - await this.updateTimeDrift() - - if ('guest' in identity && identity.guest) { - return this.initGuestAuth() - } else if ('idToken' in identity) { - return this.initIdTokenAuth(identity.idToken) - } else if ('email' in identity) { - return this.initEmailAuth(identity.email) - } else if ('playFabTitleId' in identity) { - return this.initPlayFabAuth(identity.playFabTitleId, identity.playFabSessionTicket) - } - - throw new Error('invalid identity') - } - - private async initGuestAuth() { - const sessionId = await this.waas.getSessionId() - const intent = await this.waas.initiateGuestAuth() - const res = await this.sendIntent(intent) - - if (!isInitiateAuthResponse(res)) { - throw new Error(`Invalid response: ${JSON.stringify(res)}`) - } - return new GuestChallenge(sessionId, res.data.challenge!) - } - - private async initIdTokenAuth(idToken: string) { - const decoded = jwtDecode(idToken) - const isStytch = decoded.iss?.startsWith('stytch.com/') || false - const intent = isStytch - ? await this.waas.initiateStytchAuth(idToken, decoded.exp) - : await this.waas.initiateIdTokenAuth(idToken, decoded.exp) - const res = await this.sendIntent(intent) - - if (!isInitiateAuthResponse(res)) { - throw new Error(`Invalid response: ${JSON.stringify(res)}`) - } - return isStytch ? new StytchChallenge(idToken) : new IdTokenChallenge(idToken) - } - - private async initEmailAuth(email: string) { - const sessionId = await this.waas.getSessionId() - const intent = await this.waas.initiateEmailAuth(email) - const res = await this.sendIntent(intent) - - if (!isInitiateAuthResponse(res)) { - throw new Error(`Invalid response: ${JSON.stringify(res)}`) - } - return new EmailChallenge(email, sessionId, res.data.challenge!) - } - - private async initPlayFabAuth(titleId: string, sessionTicket: string) { - const intent = await this.waas.initiatePlayFabAuth(titleId, sessionTicket) - const res = await this.sendIntent(intent) - - if (!isInitiateAuthResponse(res)) { - throw new Error(`Invalid response: ${JSON.stringify(res)}`) - } - return new PlayFabChallenge(titleId, sessionTicket) - } - - async completeAuth( - challenge: Challenge, - opts?: { sessionName?: string; forceCreateAccount?: boolean } - ): Promise { - await this.updateTimeDrift() - - // initAuth can start while user is already signed in and continue with linkAccount method, - // but it can't be used to completeAuth while user is already signed in. In this - // case we should throw an error. - const isSignedIn = await this.isSignedIn() - if (isSignedIn) { - throw new Error('You are already signed in. Use dropSession to sign out from current session first.') - } - if (!opts) { - opts = {} - } - if (!opts.sessionName) { - opts.sessionName = 'session name' - } - - const intent = await this.waas.completeAuth(challenge.getIntentParams(), { forceCreateAccount: opts.forceCreateAccount }) - try { - const res = await this.registerSession(intent, opts.sessionName) - - await this.waas.completeSignIn({ - code: 'sessionOpened', - data: { - sessionId: res.session.id, - wallet: res.response.data.wallet - } - }) - - return { - sessionId: res.session.id, - wallet: res.response.data.wallet, - email: res.session.identity.email - } - } catch (e) { - if (!(e instanceof EmailAlreadyInUseError) && !(e instanceof AnswerIncorrectError)) { - await this.waas.completeSignOut() - } - throw e - } - } - - private async registerSession(intent: SignedIntent, name: string) { - try { - const res = await this.client.registerSession({ intent, friendlyName: name }, this.headers()) - return res - } catch (e) { - if (isIntentTimeError(e) && this.lastDate) { - const newIntent = await this.waas.updateIntentTime(intent, this.lastDate) - return await this.client.registerSession({ intent: newIntent, friendlyName: name }, this.headers()) - } - throw e - } - } - - private async refreshSession() { - throw new Error('Not implemented') - } - - async getSessionId() { - return this.waas.getSessionId() - } - - async getSessionHash() { - const sessionId = (await this.waas.getSessionId()).toLowerCase() - return ethers.id(sessionId) - } - - async dropSession({ sessionId, strict }: { sessionId?: string; strict?: boolean } = {}) { - await this.updateTimeDrift() - - const thisSessionId = await this.waas.getSessionId() - if (!thisSessionId) { - throw new Error('session not open') - } - - const closeSessionId = sessionId || thisSessionId - - try { - const intent = await this.waas.signOutSession(closeSessionId) - const result = await this.sendIntent(intent) - - if (!isCloseSessionResponse(result)) { - throw new Error(`Invalid response: ${JSON.stringify(result)}`) - } - } catch (e) { - if (strict) { - throw e - } - - console.error(e) - } - - if (closeSessionId === thisSessionId) { - if (!this.secureStoreBackend) { - throw new Error('No secure store available') - } - - try { - const session = await newSessionFromSessionId(thisSessionId, this.cryptoBackend, this.secureStoreBackend) - session.clear() - } catch (error) { - if (error instanceof NoPrivateKeyError) { - // If no private key is found, we can't clear the session properly - // but we can still clean up other session data which will log us out - } else { - throw error - } - } - - await this.waas.completeSignOut() - await this.deviceName.set(undefined) - updateTimeDrift(undefined) - } - } - - async listSessions(): Promise { - await this.updateTimeDrift() - - const sessionId = await this.waas.getSessionId() - if (!sessionId) { - throw new Error('session not open') - } - - const intent = await this.waas.listSessions() - const res = await this.sendIntent(intent) - - return (res.data as Session[]).map(session => ({ - ...session, - isThis: session.id === sessionId - })) - } - - // WaaS specific methods - async getAddress() { - return this.waas.getAddress() - } - - async validateSession(args?: ValidationArgs) { - await this.updateTimeDrift() - - if (await this.isSessionValid()) { - return true - } - - return this.handleValidationRequired(args) - } - - async finishValidateSession(challenge: string): Promise { - await this.updateTimeDrift() - - const intent = await this.waas.finishValidateSession(this.validationRequiredSalt, challenge) - const result = await this.sendIntent(intent) - - if (!isFinishValidateSessionResponse(result)) { - throw new Error(`Invalid response: ${JSON.stringify(result)}`) - } - - this.validationRequiredSalt = '' - return result.data.isValid - } - - async isSessionValid(): Promise { - await this.updateTimeDrift() - - const intent = await this.waas.getSession() - const result = await this.sendIntent(intent) - - if (!isGetSessionResponse(result)) { - throw new Error(`Invalid response: ${JSON.stringify(result)}`) - } - - return result.data.validated - } - - async waitForSessionValid(timeout: number = 600000, pollRate: number = 2000) { - const start = getLocalTime() - - while (getLocalTime() - start < timeout) { - if (await this.isSessionValid()) { - return true - } - - await new Promise(resolve => setTimeout(resolve, pollRate)) - } - - return false - } - - async sessionAuthProof({ nonce, network, validation }: { nonce?: string; network?: string; validation?: ValidationArgs }) { - await this.updateTimeDrift() - - const intent = await this.waas.sessionAuthProof({ nonce, network }) - return await this.trySendIntent({ validation }, intent, isSessionAuthProofResponse) - } - - async listAccounts() { - await this.updateTimeDrift() - - const intent = await this.waas.listAccounts() - const res = await this.sendIntent(intent) - - if (!isListAccountsResponse(res)) { - throw new Error(`Invalid response: ${JSON.stringify(res)}`) - } - - return res.data - } - - async linkAccount(challenge: Challenge) { - await this.updateTimeDrift() - - const intent = await this.waas.linkAccount(challenge.getIntentParams()) - const res = await this.sendIntent(intent) - - if (!isLinkAccountResponse(res)) { - throw new Error(`Invalid response: ${JSON.stringify(res)}`) - } - - return res.data - } - - async removeAccount(accountId: string) { - await this.updateTimeDrift() - - const intent = await this.waas.removeAccount({ accountId }) - await this.sendIntent(intent) - } - - async getIdToken(args?: { nonce?: string }): Promise { - await this.updateTimeDrift() - - const intent = await this.waas.getIdToken({ nonce: args?.nonce }) - const res = await this.sendIntent(intent) - - if (!isGetIdTokenResponse(res)) { - throw new Error(`Invalid response: ${JSON.stringify(res)}`) - } - - return res.data - } - - async useIdentifier(args: T): Promise { - if (args.identifier) { - return args as T & { identifier: string } - } - - // Generate a new identifier - const identifier = `ts-sdk-${Date.now()}-${await this.waas.getSessionId()}` - return { ...args, identifier } as T & { identifier: string } - } - - private async trySendIntent( - args: CommonAuthArgs, - intent: SignedIntent, - isExpectedResponse: (response: any) => response is T - ): Promise { - const response = await this.sendIntent(intent) - - if (isExpectedResponse(response)) { - return response - } - - if (isValidationRequiredResponse(response)) { - const proceed = await this.handleValidationRequired(args.validation) - - if (proceed) { - const response2 = await this.sendIntent(intent) - if (isExpectedResponse(response2)) { - return response2 - } - } - } - - throw new Error(JSON.stringify(response)) - } - - async signMessage(args: WithSimpleNetwork & CommonAuthArgs): Promise { - await this.updateTimeDrift() - - const intent = await this.waas.signMessage(await this.useIdentifier(args)) - return this.trySendIntent(args, intent, isSignedMessageResponse) - } - - async signTypedData(args: WithSimpleNetwork & CommonAuthArgs): Promise { - await this.updateTimeDrift() - - const intent = await this.waas.signTypedData(await this.useIdentifier(args)) - return this.trySendIntent(args, intent, isSignedTypedDataResponse) - } - - private async trySendTransactionIntent( - intent: SignedIntent, - args: CommonAuthArgs - ): Promise { - let result = await this.trySendIntent(args, intent, isMaySentTransactionResponse) - - while (isTimedOutTransactionResponse(result)) { - await new Promise(resolve => setTimeout(resolve, 1000)) - - const receiptArgs: WithSimpleNetwork & CommonAuthArgs = { - metaTxHash: result.data.metaTxHash, - network: intent.data.network, - identifier: intent.data.identifier, - validation: args.validation - } - const receiptIntent = await this.waas.getTransactionReceipt(await this.useIdentifier(receiptArgs)) - result = await this.trySendIntent(receiptArgs, receiptIntent, isMaySentTransactionResponse) - } - - return result - } - - async sendTransaction(args: WithSimpleNetwork & CommonAuthArgs): Promise { - await this.updateTimeDrift() - - const intent = await this.waas.sendTransaction(await this.useIdentifier(args)) - return this.trySendTransactionIntent(intent, args) - } - - async sendERC20(args: WithSimpleNetwork & CommonAuthArgs): Promise { - await this.updateTimeDrift() - - const intent = await this.waas.sendERC20(await this.useIdentifier(args)) - return this.trySendTransactionIntent(intent, args) - } - - async sendERC721(args: WithSimpleNetwork & CommonAuthArgs): Promise { - await this.updateTimeDrift() - - const intent = await this.waas.sendERC721(await this.useIdentifier(args)) - return this.trySendTransactionIntent(intent, args) - } - - async sendERC1155(args: WithSimpleNetwork & CommonAuthArgs): Promise { - await this.updateTimeDrift() - - const intent = await this.waas.sendERC1155(await this.useIdentifier(args)) - return this.trySendTransactionIntent(intent, args) - } - - async callContract(args: WithSimpleNetwork & CommonAuthArgs): Promise { - await this.updateTimeDrift() - - const intent = await this.waas.callContract(await this.useIdentifier(args)) - return this.trySendTransactionIntent(intent, args) - } - - async feeOptions(args: WithSimpleNetwork & CommonAuthArgs): Promise { - await this.updateTimeDrift() - - const intent = await this.waas.feeOptions(await this.useIdentifier(args)) - return this.trySendIntent(args, intent, isFeeOptionsResponse) - } - - async networkList(): Promise { - const networks: NetworkList = [] - const chainList = await this.client.chainList({ - 'X-Access-Key': this.config.projectAccessKey - }) - - for (const chain of chainList.chains) { - networks.push({ - id: chain.id, - name: chain.name, - isEnabled: chain.isEnabled - }) - } - return networks - } - - onSessionStateChanged(callback: Observer) { - return this.waas.onSessionStateChanged(callback) - } - - // Special version of fetch that keeps track of the last seen Date header - async fetch(input: RequestInfo, init?: RequestInit) { - const res = await fetch(input, init) - const headerValue = res.headers.get('date') - if (headerValue) { - this.lastDate = new Date(headerValue) - } - return res - } -} diff --git a/old/packages/waas/src/base.ts b/old/packages/waas/src/base.ts deleted file mode 100644 index f494c7486..000000000 --- a/old/packages/waas/src/base.ts +++ /dev/null @@ -1,647 +0,0 @@ -import { - changeIntentTime, - closeSession, - combineTransactionIntents, - feeOptions, - finishValidateSession, - getIdToken, - getSession, - getTransactionReceipt, - GetTransactionReceiptArgs, - initiateAuth, - Intent, - listSessions, - openSession, - OpenSessionArgs, - sendContractCall, - SendContractCallArgs, - sendERC1155, - SendERC1155Args, - sendERC20, - SendERC20Args, - sendERC721, - SendERC721Args, - sendTransactions, - SendTransactionsArgs, - sessionAuthProof, - SignedIntent, - signIntent, - signMessage, - SignMessageArgs, - signTypedData, - SignTypedDataArgs, - validateSession -} from './intents' -import { LocalStore, Store, StoreObj } from './store' -import { newSession, newSessionFromSessionId } from './session' -import { OpenSessionResponse } from './intents/responses' -import { federateAccount, listAccounts, removeAccount } from './intents/accounts' -import { SimpleNetwork, toNetworkID, WithSimpleNetwork } from './networks' -import { - IdentityType, - IntentDataFederateAccount, - IntentDataFeeOptions, - IntentDataFinishValidateSession, - IntentDataGetSession, - IntentDataGetTransactionReceipt, - IntentDataInitiateAuth, - IntentDataListAccounts, - IntentDataOpenSession, - IntentDataSendTransaction, - IntentDataSignMessage, - IntentDataSignTypedData, - IntentDataValidateSession -} from './clients/intent.gen' -import { getDefaultSubtleCryptoBackend, SubtleCryptoBackend } from './subtle-crypto' -import { getDefaultSecureStoreBackend, SecureStoreBackend } from './secure-store' -import { ethers } from 'ethers' -import { ChallengeIntentParams } from './challenge' -import { NoPrivateKeyError } from './errors' - -type Status = 'pending' | 'signed-in' | 'signed-out' - -const SEQUENCE_WAAS_WALLET_KEY = '@0xsequence.waas.wallet' -const SEQUENCE_WAAS_SESSION_ID_KEY = '@0xsequence.waas.session_id' -const SEQUENCE_WAAS_STATUS_KEY = '@0xsequence.waas.status' - -// 5 minutes of default lifespan -const DEFAULT_LIFESPAN = 5 * 60 - -export type SessionAuthProofArgs = { - nonce?: string -} - -export type ExtraArgs = { - lifespan?: number -} - -export type ExtraTransactionArgs = ExtraArgs & { - identifier: string -} - -export type SequenceBaseConfig = { - network: SimpleNetwork -} - -export type Observer = (value: T | null) => any - -export class SequenceWaaSBase { - private readonly status: StoreObj - private readonly sessionId: StoreObj - private readonly wallet: StoreObj - - private sessionObservers: Observer[] = [] - - constructor( - public readonly config = { network: 1 } as SequenceBaseConfig, - private readonly store: Store = new LocalStore(), - private readonly cryptoBackend: SubtleCryptoBackend | null = getDefaultSubtleCryptoBackend(), - private readonly secureStoreBackend: SecureStoreBackend | null = getDefaultSecureStoreBackend() - ) { - this.status = new StoreObj(this.store, SEQUENCE_WAAS_STATUS_KEY, 'signed-out') - this.sessionId = new StoreObj(this.store, SEQUENCE_WAAS_SESSION_ID_KEY, undefined) - this.wallet = new StoreObj(this.store, SEQUENCE_WAAS_WALLET_KEY, undefined) - } - - async getAddress() { - return this.getWalletAddress() - } - - private async getWalletAddress() { - if (!(await this.isSignedIn())) { - throw new Error('Not signed in') - } - - const wallet = await this.wallet.get() - if (!wallet) { - throw new Error('No wallet') - } - - return wallet - } - - private async commonArgs( - args: T & { - identifier: string - lifespan?: number - network?: SimpleNetwork - } - ): Promise< - T & { - identifier: string - wallet: string - lifespan: number - chainId: number - } - > { - return { - ...args, - identifier: args?.identifier, - wallet: await this.getWalletAddress(), - lifespan: args?.lifespan ?? DEFAULT_LIFESPAN, - chainId: toNetworkID(args.network || this.config.network) - } - } - - /** - * Builds a payload that can be sent to the WaaS API to sign a transaction. - * It automatically signs the payload, and attaches the current wallet address. - * - * @param packet The action already packed into a packet - * @returns A payload that can be sent to the WaaS API - */ - private async signIntent(intent: Intent): Promise> { - const sessionId = await this.getSessionId() - if (sessionId === undefined) { - throw new Error('session not open') - } - - try { - const session = await newSessionFromSessionId(sessionId, this.cryptoBackend, this.secureStoreBackend) - return signIntent(session, intent) - } catch (error) { - if (error instanceof NoPrivateKeyError) { - await this.completeSignOut() - throw new Error('No private key found, logging out') - } - throw error - } - } - - public async signUsingSessionKey(message: string | Uint8Array) { - const sessionId = await this.getSessionId() - if (!sessionId) { - throw new Error('session not open') - } - - try { - const signer = await newSessionFromSessionId(sessionId, this.cryptoBackend, this.secureStoreBackend) - return signer.sign(message) - } catch (error) { - if (error instanceof NoPrivateKeyError) { - await this.completeSignOut() - throw new Error('No private key found, logging out') - } - throw error - } - } - - private gettingSessionIdPromise: Promise | undefined - - /** - * This method will return session id. - * - * @returns an id of the session - */ - public async getSessionId(): Promise { - if (this.gettingSessionIdPromise) { - return this.gettingSessionIdPromise - } - - const promiseGenerator = async () => { - let sessionId = await this.sessionId.get() - if (!sessionId) { - const session = await newSession(this.cryptoBackend, this.secureStoreBackend) - sessionId = await session.sessionId() - await this.sessionId.set(sessionId) - this.signalObservers(this.sessionObservers, sessionId) - } - this.gettingSessionIdPromise = undefined - return sessionId - } - - this.gettingSessionIdPromise = promiseGenerator() - return this.gettingSessionIdPromise - } - - /** - * This method will initiate a sign-in process with the waas API. It must be performed - * when the user wants to sign in to the app, in parallel with the authentication of the - * application's own authentication system. - * - * This method begins the sign-in process, but does not complete it. The returned payload - * must be sent to the waas API to complete the sign-in. The waas API will return a receipt - * that must be sent to the `completeSignIn` method to complete the sign-in. - * - * @param idToken Information about the user that can be used to prove their identity - * @returns a session payload that **must** be sent to the waas API to complete the sign-in - * @throws {Error} If the session is already signed in or there is a pending sign-in - */ - async signInWithIdToken(idToken: string): Promise> { - const status = await this.status.get() - if (status !== 'signed-out') { - await this.completeSignOut() - throw new Error('you are already signed in') // TODO change this awful msg - } - - const sessionId = await this.getSessionId() - const intent = await openSession({ - sessionId, - identityType: IdentityType.None, - idToken, - lifespan: DEFAULT_LIFESPAN - }) - - await this.status.set('pending') - - return this.signIntent(intent) - } - - async initiateGuestAuth(): Promise> { - const sessionId = await this.getSessionId() - const intent = await initiateAuth({ - sessionId, - identityType: IdentityType.Guest, - verifier: sessionId, - lifespan: DEFAULT_LIFESPAN - }) - - return this.signIntent(intent) - } - - async initiateEmailAuth(email: string): Promise> { - const sessionId = await this.getSessionId() - const intent = await initiateAuth({ - sessionId, - identityType: IdentityType.Email, - verifier: `${email};${sessionId}`, - lifespan: DEFAULT_LIFESPAN - }) - - return this.signIntent(intent) - } - - async initiateIdTokenAuth(idToken: string, exp?: number): Promise> { - const sessionId = await this.getSessionId() - const idTokenHash = ethers.id(idToken) - const intent = await initiateAuth({ - sessionId, - identityType: IdentityType.OIDC, - verifier: `${idTokenHash};${exp}`, - lifespan: DEFAULT_LIFESPAN - }) - - return this.signIntent(intent) - } - - async initiateStytchAuth(idToken: string, exp?: number): Promise> { - const sessionId = await this.getSessionId() - const idTokenHash = ethers.id(idToken) - const intent = await initiateAuth({ - sessionId, - identityType: IdentityType.Stytch, - verifier: `${idTokenHash};${exp}`, - lifespan: DEFAULT_LIFESPAN - }) - - return this.signIntent(intent) - } - - async initiatePlayFabAuth(titleId: string, sessionTicket: string): Promise> { - const sessionId = await this.getSessionId() - const ticketHash = ethers.id(sessionTicket) - const intent = await initiateAuth({ - sessionId, - identityType: IdentityType.PlayFab, - verifier: `${titleId}|${ticketHash}`, - lifespan: DEFAULT_LIFESPAN - }) - - return this.signIntent(intent) - } - - async completeAuth(params: ChallengeIntentParams, optParams: Partial) { - const sessionId = await this.getSessionId() - const intent = await openSession({ - ...optParams, - sessionId, - lifespan: DEFAULT_LIFESPAN, - ...params - }) - - await this.status.set('pending') - - return this.signIntent(intent) - } - - onSessionStateChanged(callback: Observer): () => void { - this.sessionObservers.push(callback) - return () => { - this.sessionObservers = this.sessionObservers.filter(o => o != callback) - } - } - - async signOut({ lifespan, sessionId }: { sessionId?: string } & ExtraArgs = {}) { - sessionId = sessionId || (await this.sessionId.get()) - if (!sessionId) { - throw new Error('session not open') - } - - const intent = closeSession({ - lifespan: lifespan || DEFAULT_LIFESPAN, - sessionId: sessionId - }) - - return this.signIntent(intent) - } - - async signOutSession(sessionId: string) { - const intent = closeSession({ - lifespan: DEFAULT_LIFESPAN, - sessionId: sessionId - }) - - return this.signIntent(intent) - } - - async listSessions() { - const intent = listSessions({ - lifespan: DEFAULT_LIFESPAN, - wallet: await this.getWalletAddress() - }) - - return this.signIntent(intent) - } - - async completeSignOut() { - await Promise.all([this.status.set('signed-out'), this.wallet.set(undefined), this.sessionId.set(undefined)]) - this.signalObservers(this.sessionObservers, null) - } - - /** - * This method will complete a sign-in process with the waas API. It must be performed - * after the `signIn` method, when the waas API has returned a receipt. - * - * This method completes the sign-in process by validating the receipt's proof. - * If the proof is invalid or there is no pending sign-in, it will throw an error. - * - * After this method is called, the wallet is ready to be used to sign transactions. - * - * @param receipt The receipt returned by the waas API after the `signIn` method - * @returns The wallet address of the user that signed in - * @throws {Error} If there is no pending sign-in or the receipt is invalid - */ - async completeSignIn(receipt: OpenSessionResponse): Promise { - if ((receipt as any).result) { - return this.completeSignIn((receipt as any).result) - } - - const status = await this.status.get() - - if (receipt.code !== 'sessionOpened') { - throw new Error('Invalid receipt') - } - - if (status !== 'pending') { - throw new Error('No pending sign in') - } - - await Promise.all([this.status.set('signed-in'), this.wallet.set(receipt.data.wallet)]) - - return receipt.data.wallet - } - - async isSignedIn() { - const status = await this.status.get() - return status === 'signed-in' - } - - async sessionAuthProof(args: WithSimpleNetwork & ExtraArgs) { - const packet = sessionAuthProof({ - lifespan: args.lifespan ?? DEFAULT_LIFESPAN, - network: toNetworkID(args.network || this.config.network).toString(), - wallet: await this.getWalletAddress(), - nonce: args.nonce - }) - return this.signIntent(packet) - } - - // - // Signer methods - // - - /** - * This method can be used to sign message using waas API. It can only be used - * after successfully signing in with the `signIn` and `completeSignIn` methods. - * - * The method does not sign the message. It only returns a payload - * that must be sent to the waas API to complete the sign process. - * - * @param chainId The network on which the message will be signed - * @param message The message that will be signed - * @return a payload that must be sent to the waas API to complete sign process - */ - async signMessage(args: WithSimpleNetwork & ExtraArgs): Promise> { - const packet = signMessage({ - chainId: toNetworkID(args.network || this.config.network), - ...args, - lifespan: args.lifespan ?? DEFAULT_LIFESPAN, - wallet: await this.getWalletAddress() - }) - - return this.signIntent(packet) - } - - /** - * This method can be used to sign typed data using waas API. It can only be used - * after successfully signing in with the `signIn` and `completeSignIn` methods. - * - * The method does not sign the typed data. It only returns a payload - * that must be sent to the waas API to complete the sign process. - * - * @param chainId The network on which the typed data will be signed - * @param typedData The typed data that will be signed - * @return a payload that must be sent to the waas API to complete sign process - */ - async signTypedData(args: WithSimpleNetwork & ExtraArgs): Promise> { - const packet = signTypedData({ - chainId: toNetworkID(args.network || this.config.network), - ...args, - lifespan: args.lifespan ?? DEFAULT_LIFESPAN, - wallet: await this.getWalletAddress() - }) - - return this.signIntent(packet) - } - - /** - * This method can be used to send transactions to the waas API. It can only be used - * after successfully signing in with the `signIn` and `completeSignIn` methods. - * - * The method does not send the transactions to the network. It only returns a payload - * that must be sent to the waas API to complete the transaction. - * - * @param transactions The transactions to be sent - * @param chainId The network on which the transactions will be sent - * @returns a payload that must be sent to the waas API to complete the transaction - */ - async sendTransaction( - args: WithSimpleNetwork & ExtraTransactionArgs - ): Promise> { - const intent = sendTransactions(await this.commonArgs(args)) - return this.signIntent(intent) - } - - async getTransactionReceipt( - args: WithSimpleNetwork & ExtraTransactionArgs - ): Promise> { - const intent = getTransactionReceipt(await this.commonArgs(args)) - return this.signIntent(intent) - } - - async sendERC20( - args: WithSimpleNetwork & ExtraTransactionArgs - ): Promise> { - if (args.token.toLowerCase() === args.to.toLowerCase()) { - throw new Error('Cannot burn tokens using sendERC20') - } - - const intent = sendERC20(await this.commonArgs(args)) - return this.signIntent(intent) - } - - async sendERC721( - args: WithSimpleNetwork & ExtraTransactionArgs - ): Promise> { - if (args.token.toLowerCase() === args.to.toLowerCase()) { - throw new Error('Cannot burn tokens using sendERC721') - } - - const intent = sendERC721(await this.commonArgs(args)) - return this.signIntent(intent) - } - - async sendERC1155( - args: WithSimpleNetwork & ExtraTransactionArgs - ): Promise> { - if (args.token.toLowerCase() === args.to.toLowerCase()) { - throw new Error('Cannot burn tokens using sendERC1155') - } - - const intent = sendERC1155(await this.commonArgs(args)) - return this.signIntent(intent) - } - - async callContract( - args: WithSimpleNetwork & ExtraTransactionArgs - ): Promise> { - const intent = sendContractCall(await this.commonArgs(args)) - return this.signIntent(intent) - } - - async feeOptions( - args: WithSimpleNetwork & ExtraTransactionArgs - ): Promise> { - const intent = feeOptions(await this.commonArgs(args)) - return this.signIntent(intent) - } - - async validateSession({ deviceMetadata }: { deviceMetadata: string }): Promise> { - const sessionId = await this.sessionId.get() - if (!sessionId) { - throw new Error('session not open') - } - - const intent = await validateSession({ - lifespan: DEFAULT_LIFESPAN, - sessionId: sessionId, - deviceMetadata, - wallet: await this.getWalletAddress() - }) - - return this.signIntent(intent) - } - - async getSession(): Promise> { - const sessionId = await this.sessionId.get() - if (!sessionId) { - throw new Error('session not open') - } - - const intent = getSession({ - sessionId, - wallet: await this.getWalletAddress(), - lifespan: DEFAULT_LIFESPAN - }) - - return this.signIntent(intent) - } - - async finishValidateSession(salt: string, challenge: string): Promise> { - const sessionId = await this.sessionId.get() - if (!sessionId) { - throw new Error('session not open') - } - - const wallet = await this.getWalletAddress() - const intent = finishValidateSession({ - sessionId, - wallet, - lifespan: DEFAULT_LIFESPAN, - salt, - challenge - }) - return this.signIntent(intent) - } - - async listAccounts(): Promise> { - const intent = listAccounts({ - wallet: await this.getWalletAddress(), - lifespan: DEFAULT_LIFESPAN - }) - return this.signIntent(intent) - } - - async linkAccount(params: ChallengeIntentParams): Promise> { - const sessionId = await this.sessionId.get() - if (!sessionId) { - throw new Error('session not open') - } - - const intent = federateAccount({ - wallet: await this.getWalletAddress(), - lifespan: DEFAULT_LIFESPAN, - sessionId, - ...params - }) - return this.signIntent(intent) - } - - async removeAccount({ accountId }: { accountId: string }) { - const intent = removeAccount({ - wallet: await this.getWalletAddress(), - lifespan: DEFAULT_LIFESPAN, - accountId - }) - return this.signIntent(intent) - } - - async getIdToken({ nonce }: { nonce?: string }) { - const sessionId = await this.sessionId.get() - if (!sessionId) { - throw new Error('session not open') - } - - const intent = getIdToken({ - wallet: await this.getWalletAddress(), - lifespan: DEFAULT_LIFESPAN, - sessionId, - nonce - }) - return this.signIntent(intent) - } - - async batch(intents: Intent[]): Promise> { - const combined = combineTransactionIntents(intents) - return this.signIntent(combined) - } - - private signalObservers(observers: Observer[], value: T | null) { - observers.forEach(observer => observer(value)) - } - - async updateIntentTime(intent: SignedIntent, time: Date): Promise> { - const newIntent = changeIntentTime(intent, time) - return this.signIntent(newIntent) - } -} diff --git a/old/packages/waas/src/challenge.ts b/old/packages/waas/src/challenge.ts deleted file mode 100644 index b23e5ada8..000000000 --- a/old/packages/waas/src/challenge.ts +++ /dev/null @@ -1,121 +0,0 @@ -import { IdentityType } from './clients/intent.gen' -import { ethers } from 'ethers' -import { jwtDecode } from 'jwt-decode' - -export interface ChallengeIntentParams { - identityType: IdentityType - verifier: string - answer?: string -} - -export abstract class Challenge { - public abstract getIntentParams(): ChallengeIntentParams - public abstract withAnswer(answer: string): Challenge -} - -export class GuestChallenge extends Challenge { - constructor( - readonly sessionId: string, - readonly challenge: string - ) { - super() - } - - getIntentParams(): ChallengeIntentParams { - const answer = ethers.id(this.challenge + this.sessionId) - return { - identityType: IdentityType.Guest, - verifier: this.sessionId, - answer - } - } - - withAnswer(answer: string): Challenge { - return this - } -} - -export class EmailChallenge extends Challenge { - private hashedAnswer?: string - - constructor( - readonly email: string, - readonly sessionId: string, - readonly challenge: string - ) { - super() - } - - getIntentParams(): ChallengeIntentParams { - return { - identityType: IdentityType.Email, - verifier: `${this.email};${this.sessionId}`, - answer: this.hashedAnswer - } - } - - setAnswer(answer: string): void { - this.hashedAnswer = ethers.id(this.challenge + answer) - } - - withAnswer(answer: string) { - const challenge = new EmailChallenge(this.email, this.sessionId, this.challenge) - challenge.setAnswer(answer) - return challenge - } -} - -export class IdTokenChallenge extends Challenge { - constructor(readonly idToken: string) { - super() - } - - getIntentParams(): ChallengeIntentParams { - const decoded = jwtDecode(this.idToken) - const idTokenHash = ethers.id(this.idToken) - return { - identityType: IdentityType.OIDC, - verifier: `${idTokenHash};${decoded.exp}`, - answer: this.idToken - } - } - - withAnswer() { - return this - } -} - -export class StytchChallenge extends IdTokenChallenge { - constructor(readonly idToken: string) { - super(idToken) - } - - getIntentParams(): ChallengeIntentParams { - return { - ...super.getIntentParams(), - identityType: IdentityType.Stytch - } - } -} - -export class PlayFabChallenge extends Challenge { - constructor( - readonly titleId: string, - readonly sessionTicket: string - ) { - super() - } - - getIntentParams(): ChallengeIntentParams { - const ticketHash = ethers.id(this.sessionTicket) - return { - identityType: IdentityType.PlayFab, - verifier: `${this.titleId}|${ticketHash}`, - answer: this.sessionTicket - } - } - - withAnswer() { - return this - } -} diff --git a/old/packages/waas/src/clients/authenticator.gen.ts b/old/packages/waas/src/clients/authenticator.gen.ts deleted file mode 100644 index e9d06f9b6..000000000 --- a/old/packages/waas/src/clients/authenticator.gen.ts +++ /dev/null @@ -1,908 +0,0 @@ -/* eslint-disable */ -// sequence-waas-authenticator v0.1.0 562a7e7a15dc77925b3f241a08d83c8c548ba5c3 -// -- -// Code generated by webrpc-gen@v0.19.3 with typescript generator. DO NOT EDIT. -// -// webrpc-gen -schema=authenticator.ridl -target=typescript -client -out=./clients/authenticator.gen.ts - -// WebRPC description and code-gen version -export const WebRPCVersion = 'v1' - -// Schema version of your RIDL schema -export const WebRPCSchemaVersion = 'v0.1.0' - -// Schema hash generated from your RIDL schema -export const WebRPCSchemaHash = '562a7e7a15dc77925b3f241a08d83c8c548ba5c3' - -// -// Types -// - -export enum IntentName { - initiateAuth = 'initiateAuth', - openSession = 'openSession', - closeSession = 'closeSession', - validateSession = 'validateSession', - finishValidateSession = 'finishValidateSession', - listSessions = 'listSessions', - getSession = 'getSession', - sessionAuthProof = 'sessionAuthProof', - feeOptions = 'feeOptions', - signMessage = 'signMessage', - signTypedData = 'signTypedData', - sendTransaction = 'sendTransaction', - getTransactionReceipt = 'getTransactionReceipt', - federateAccount = 'federateAccount', - removeAccount = 'removeAccount', - listAccounts = 'listAccounts', - getIdToken = 'getIdToken', - adoptChildWallet = 'adoptChildWallet', - getAdopter = 'getAdopter', - confirmIntent = 'confirmIntent', - getConfirmationStatus = 'getConfirmationStatus' -} - -export enum IntentResponseCode { - authInitiated = 'authInitiated', - sessionOpened = 'sessionOpened', - sessionClosed = 'sessionClosed', - sessionList = 'sessionList', - validationRequired = 'validationRequired', - validationStarted = 'validationStarted', - validationFinished = 'validationFinished', - sessionAuthProof = 'sessionAuthProof', - signedMessage = 'signedMessage', - signedTypedData = 'signedTypedData', - feeOptions = 'feeOptions', - transactionReceipt = 'transactionReceipt', - transactionFailed = 'transactionFailed', - getSessionResponse = 'getSessionResponse', - accountList = 'accountList', - accountFederated = 'accountFederated', - accountRemoved = 'accountRemoved', - idToken = 'idToken', - adopter = 'adopter', - childWalletAdopted = 'childWalletAdopted', - confirmationRequired = 'confirmationRequired' -} - -export enum IdentityType { - None = 'None', - Guest = 'Guest', - OIDC = 'OIDC', - Email = 'Email', - PlayFab = 'PlayFab', - Stytch = 'Stytch' -} - -export interface Intent { - version: string - name: IntentName - expiresAt: number - issuedAt: number - data: any - signatures: Array -} - -export interface Signature { - sessionId: string - signature: string -} - -export interface IntentResponse { - code: IntentResponseCode - data: any -} - -export enum Migration { - OIDCToStytch = 'OIDCToStytch', - OIDCToEmail = 'OIDCToEmail' -} - -export interface Version { - webrpcVersion: string - schemaVersion: string - schemaHash: string - appVersion: string -} - -export interface RuntimeStatus { - healthOK: boolean - startTime: string - uptime: number - ver: string - pcr0: string -} - -export interface Chain { - id: number - name: string - isEnabled: boolean -} - -export interface Identity { - type: IdentityType - iss: string - sub: string - email: string -} - -export interface OpenIdProvider { - iss: string - aud: Array -} - -export interface AuthEmailConfig { - enabled: boolean -} - -export interface AuthGuestConfig { - enabled: boolean -} - -export interface AuthPlayfabConfig { - enabled: boolean - titleId?: string -} - -export interface AuthStytchConfig { - enabled: boolean - projectId?: string -} - -export interface AuthConfig { - email?: AuthEmailConfig - guest?: AuthGuestConfig - playfab?: AuthPlayfabConfig - stytch?: AuthStytchConfig -} - -export interface Tenant { - projectId: number - version: number - oidcProviders: Array - allowedOrigins: Array - authConfig: AuthConfig - updatedAt: string -} - -export interface TenantData { - projectId: number - privateKey: string - parentAddress: string - userSalt: string - sequenceContext: MiniSequenceContext - upgradeCode: string - waasAccessToken: string - authConfig: AuthConfig - oidcProviders: Array - kmsKeys: Array - allowedOrigins: Array -} - -export interface MiniSequenceContext { - factory: string - mainModule: string -} - -export interface AccountData { - projectId: number - userId: string - identity: string - createdAt: string -} - -export interface Session { - id: string - projectId: number - userId: string - identity: Identity - friendlyName: string - createdAt: string - refreshedAt: string - expiresAt: string -} - -export interface SessionData { - id: string - projectId: number - userId: string - identity: string - createdAt: string - expiresAt: string -} - -export interface VerificationContext { - projectId: number - sessionId: string - identityType: IdentityType - verifier: string - challenge?: string - answer?: string - attempts: number - lastAttemptAt?: string - expiresAt: string -} - -export interface Page { - limit?: number - after?: string -} - -export interface WaasAuthenticator { - registerSession(args: RegisterSessionArgs, headers?: object, signal?: AbortSignal): Promise - sendIntent(args: SendIntentArgs, headers?: object, signal?: AbortSignal): Promise - chainList(headers?: object, signal?: AbortSignal): Promise -} - -export interface RegisterSessionArgs { - intent: Intent - friendlyName: string -} - -export interface RegisterSessionReturn { - session: Session - response: IntentResponse -} -export interface SendIntentArgs { - intent: Intent -} - -export interface SendIntentReturn { - response: IntentResponse -} -export interface ChainListArgs {} - -export interface ChainListReturn { - chains: Array -} - -export interface WaasAuthenticatorAdmin { - version(headers?: object, signal?: AbortSignal): Promise - runtimeStatus(headers?: object, signal?: AbortSignal): Promise - clock(headers?: object, signal?: AbortSignal): Promise - getTenant(args: GetTenantArgs, headers?: object, signal?: AbortSignal): Promise - createTenant(args: CreateTenantArgs, headers?: object, signal?: AbortSignal): Promise - updateTenant(args: UpdateTenantArgs, headers?: object, signal?: AbortSignal): Promise - nextMigrationBatch(args: NextMigrationBatchArgs, headers?: object, signal?: AbortSignal): Promise - processMigrationBatch( - args: ProcessMigrationBatchArgs, - headers?: object, - signal?: AbortSignal - ): Promise -} - -export interface VersionArgs {} - -export interface VersionReturn { - version: Version -} -export interface RuntimeStatusArgs {} - -export interface RuntimeStatusReturn { - status: RuntimeStatus -} -export interface ClockArgs {} - -export interface ClockReturn { - serverTime: string -} -export interface GetTenantArgs { - projectId: number -} - -export interface GetTenantReturn { - tenant: Tenant -} -export interface CreateTenantArgs { - projectId: number - waasAccessToken: string - authConfig: AuthConfig - oidcProviders: Array - allowedOrigins: Array - password?: string -} - -export interface CreateTenantReturn { - tenant: Tenant - upgradeCode: string -} -export interface UpdateTenantArgs { - projectId: number - upgradeCode: string - authConfig: AuthConfig - oidcProviders: Array - allowedOrigins: Array -} - -export interface UpdateTenantReturn { - tenant: Tenant -} -export interface NextMigrationBatchArgs { - migration: Migration - projectId: number - page: Page -} - -export interface NextMigrationBatchReturn { - page: Page - items: Array -} -export interface ProcessMigrationBatchArgs { - migration: Migration - projectId: number - items: Array -} - -export interface ProcessMigrationBatchReturn { - logs: { [key: string]: Array } - errors: { [key: string]: string } -} - -// -// Client -// -export class WaasAuthenticator implements WaasAuthenticator { - protected hostname: string - protected fetch: Fetch - protected path = '/rpc/WaasAuthenticator/' - - constructor(hostname: string, fetch: Fetch) { - this.hostname = hostname - this.fetch = (input: RequestInfo, init?: RequestInit) => fetch(input, init) - } - - private url(name: string): string { - return this.hostname + this.path + name - } - - registerSession = (args: RegisterSessionArgs, headers?: object, signal?: AbortSignal): Promise => { - return this.fetch(this.url('RegisterSession'), createHTTPRequest(args, headers, signal)).then( - res => { - return buildResponse(res).then(_data => { - return { - session: _data.session, - response: _data.response - } - }) - }, - error => { - throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) - } - ) - } - - sendIntent = (args: SendIntentArgs, headers?: object, signal?: AbortSignal): Promise => { - return this.fetch(this.url('SendIntent'), createHTTPRequest(args, headers, signal)).then( - res => { - return buildResponse(res).then(_data => { - return { - response: _data.response - } - }) - }, - error => { - throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) - } - ) - } - - chainList = (headers?: object, signal?: AbortSignal): Promise => { - return this.fetch(this.url('ChainList'), createHTTPRequest({}, headers, signal)).then( - res => { - return buildResponse(res).then(_data => { - return { - chains: >_data.chains - } - }) - }, - error => { - throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) - } - ) - } -} -export class WaasAuthenticatorAdmin implements WaasAuthenticatorAdmin { - protected hostname: string - protected fetch: Fetch - protected path = '/rpc/WaasAuthenticatorAdmin/' - - constructor(hostname: string, fetch: Fetch) { - this.hostname = hostname - this.fetch = (input: RequestInfo, init?: RequestInit) => fetch(input, init) - } - - private url(name: string): string { - return this.hostname + this.path + name - } - - version = (headers?: object, signal?: AbortSignal): Promise => { - return this.fetch(this.url('Version'), createHTTPRequest({}, headers, signal)).then( - res => { - return buildResponse(res).then(_data => { - return { - version: _data.version - } - }) - }, - error => { - throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) - } - ) - } - - runtimeStatus = (headers?: object, signal?: AbortSignal): Promise => { - return this.fetch(this.url('RuntimeStatus'), createHTTPRequest({}, headers, signal)).then( - res => { - return buildResponse(res).then(_data => { - return { - status: _data.status - } - }) - }, - error => { - throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) - } - ) - } - - clock = (headers?: object, signal?: AbortSignal): Promise => { - return this.fetch(this.url('Clock'), createHTTPRequest({}, headers, signal)).then( - res => { - return buildResponse(res).then(_data => { - return { - serverTime: _data.serverTime - } - }) - }, - error => { - throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) - } - ) - } - - getTenant = (args: GetTenantArgs, headers?: object, signal?: AbortSignal): Promise => { - return this.fetch(this.url('GetTenant'), createHTTPRequest(args, headers, signal)).then( - res => { - return buildResponse(res).then(_data => { - return { - tenant: _data.tenant - } - }) - }, - error => { - throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) - } - ) - } - - createTenant = (args: CreateTenantArgs, headers?: object, signal?: AbortSignal): Promise => { - return this.fetch(this.url('CreateTenant'), createHTTPRequest(args, headers, signal)).then( - res => { - return buildResponse(res).then(_data => { - return { - tenant: _data.tenant, - upgradeCode: _data.upgradeCode - } - }) - }, - error => { - throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) - } - ) - } - - updateTenant = (args: UpdateTenantArgs, headers?: object, signal?: AbortSignal): Promise => { - return this.fetch(this.url('UpdateTenant'), createHTTPRequest(args, headers, signal)).then( - res => { - return buildResponse(res).then(_data => { - return { - tenant: _data.tenant - } - }) - }, - error => { - throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) - } - ) - } - - nextMigrationBatch = ( - args: NextMigrationBatchArgs, - headers?: object, - signal?: AbortSignal - ): Promise => { - return this.fetch(this.url('NextMigrationBatch'), createHTTPRequest(args, headers, signal)).then( - res => { - return buildResponse(res).then(_data => { - return { - page: _data.page, - items: >_data.items - } - }) - }, - error => { - throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) - } - ) - } - - processMigrationBatch = ( - args: ProcessMigrationBatchArgs, - headers?: object, - signal?: AbortSignal - ): Promise => { - return this.fetch(this.url('ProcessMigrationBatch'), createHTTPRequest(args, headers, signal)).then( - res => { - return buildResponse(res).then(_data => { - return { - logs: <{ [key: string]: Array }>_data.logs, - errors: <{ [key: string]: string }>_data.errors - } - }) - }, - error => { - throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) - } - ) - } -} - -const createHTTPRequest = (body: object = {}, headers: object = {}, signal: AbortSignal | null = null): object => { - return { - method: 'POST', - headers: { ...headers, 'Content-Type': 'application/json' }, - body: JSON.stringify(body || {}), - signal - } -} - -const buildResponse = (res: Response): Promise => { - return res.text().then(text => { - let data - try { - data = JSON.parse(text) - } catch (error) { - let message = '' - if (error instanceof Error) { - message = error.message - } - throw WebrpcBadResponseError.new({ - status: res.status, - cause: `JSON.parse(): ${message}: response text: ${text}` - }) - } - if (!res.ok) { - const code: number = typeof data.code === 'number' ? data.code : 0 - throw (webrpcErrorByCode[code] || WebrpcError).new(data) - } - return data - }) -} - -// -// Errors -// - -export class WebrpcError extends Error { - name: string - code: number - message: string - status: number - cause?: string - - /** @deprecated Use message instead of msg. Deprecated in webrpc v0.11.0. */ - msg: string - - constructor(name: string, code: number, message: string, status: number, cause?: string) { - super(message) - this.name = name || 'WebrpcError' - this.code = typeof code === 'number' ? code : 0 - this.message = message || `endpoint error ${this.code}` - this.msg = this.message - this.status = typeof status === 'number' ? status : 0 - this.cause = cause - Object.setPrototypeOf(this, WebrpcError.prototype) - } - - static new(payload: any): WebrpcError { - return new this(payload.error, payload.code, payload.message || payload.msg, payload.status, payload.cause) - } -} - -// Webrpc errors - -export class WebrpcEndpointError extends WebrpcError { - constructor( - name: string = 'WebrpcEndpoint', - code: number = 0, - message: string = 'endpoint error', - status: number = 0, - cause?: string - ) { - super(name, code, message, status, cause) - Object.setPrototypeOf(this, WebrpcEndpointError.prototype) - } -} - -export class WebrpcRequestFailedError extends WebrpcError { - constructor( - name: string = 'WebrpcRequestFailed', - code: number = -1, - message: string = 'request failed', - status: number = 0, - cause?: string - ) { - super(name, code, message, status, cause) - Object.setPrototypeOf(this, WebrpcRequestFailedError.prototype) - } -} - -export class WebrpcBadRouteError extends WebrpcError { - constructor( - name: string = 'WebrpcBadRoute', - code: number = -2, - message: string = 'bad route', - status: number = 0, - cause?: string - ) { - super(name, code, message, status, cause) - Object.setPrototypeOf(this, WebrpcBadRouteError.prototype) - } -} - -export class WebrpcBadMethodError extends WebrpcError { - constructor( - name: string = 'WebrpcBadMethod', - code: number = -3, - message: string = 'bad method', - status: number = 0, - cause?: string - ) { - super(name, code, message, status, cause) - Object.setPrototypeOf(this, WebrpcBadMethodError.prototype) - } -} - -export class WebrpcBadRequestError extends WebrpcError { - constructor( - name: string = 'WebrpcBadRequest', - code: number = -4, - message: string = 'bad request', - status: number = 0, - cause?: string - ) { - super(name, code, message, status, cause) - Object.setPrototypeOf(this, WebrpcBadRequestError.prototype) - } -} - -export class WebrpcBadResponseError extends WebrpcError { - constructor( - name: string = 'WebrpcBadResponse', - code: number = -5, - message: string = 'bad response', - status: number = 0, - cause?: string - ) { - super(name, code, message, status, cause) - Object.setPrototypeOf(this, WebrpcBadResponseError.prototype) - } -} - -export class WebrpcServerPanicError extends WebrpcError { - constructor( - name: string = 'WebrpcServerPanic', - code: number = -6, - message: string = 'server panic', - status: number = 0, - cause?: string - ) { - super(name, code, message, status, cause) - Object.setPrototypeOf(this, WebrpcServerPanicError.prototype) - } -} - -export class WebrpcInternalErrorError extends WebrpcError { - constructor( - name: string = 'WebrpcInternalError', - code: number = -7, - message: string = 'internal error', - status: number = 0, - cause?: string - ) { - super(name, code, message, status, cause) - Object.setPrototypeOf(this, WebrpcInternalErrorError.prototype) - } -} - -export class WebrpcClientDisconnectedError extends WebrpcError { - constructor( - name: string = 'WebrpcClientDisconnected', - code: number = -8, - message: string = 'client disconnected', - status: number = 0, - cause?: string - ) { - super(name, code, message, status, cause) - Object.setPrototypeOf(this, WebrpcClientDisconnectedError.prototype) - } -} - -export class WebrpcStreamLostError extends WebrpcError { - constructor( - name: string = 'WebrpcStreamLost', - code: number = -9, - message: string = 'stream lost', - status: number = 0, - cause?: string - ) { - super(name, code, message, status, cause) - Object.setPrototypeOf(this, WebrpcStreamLostError.prototype) - } -} - -export class WebrpcStreamFinishedError extends WebrpcError { - constructor( - name: string = 'WebrpcStreamFinished', - code: number = -10, - message: string = 'stream finished', - status: number = 0, - cause?: string - ) { - super(name, code, message, status, cause) - Object.setPrototypeOf(this, WebrpcStreamFinishedError.prototype) - } -} - -// Schema errors - -export class UnauthorizedError extends WebrpcError { - constructor( - name: string = 'Unauthorized', - code: number = 1000, - message: string = 'Unauthorized access', - status: number = 0, - cause?: string - ) { - super(name, code, message, status, cause) - Object.setPrototypeOf(this, UnauthorizedError.prototype) - } -} - -export class TenantNotFoundError extends WebrpcError { - constructor( - name: string = 'TenantNotFound', - code: number = 1001, - message: string = 'Tenant not found', - status: number = 0, - cause?: string - ) { - super(name, code, message, status, cause) - Object.setPrototypeOf(this, TenantNotFoundError.prototype) - } -} - -export class EmailAlreadyInUseError extends WebrpcError { - constructor( - name: string = 'EmailAlreadyInUse', - code: number = 7000, - message: string = 'Could not create account as the email is already in use', - status: number = 0, - cause?: string - ) { - super(name, code, message, status, cause) - Object.setPrototypeOf(this, EmailAlreadyInUseError.prototype) - } -} - -export class AccountAlreadyLinkedError extends WebrpcError { - constructor( - name: string = 'AccountAlreadyLinked', - code: number = 7001, - message: string = 'Could not link account as it is linked to another wallet', - status: number = 0, - cause?: string - ) { - super(name, code, message, status, cause) - Object.setPrototypeOf(this, AccountAlreadyLinkedError.prototype) - } -} - -export class ProofVerificationFailedError extends WebrpcError { - constructor( - name: string = 'ProofVerificationFailed', - code: number = 7002, - message: string = 'The authentication proof could not be verified', - status: number = 0, - cause?: string - ) { - super(name, code, message, status, cause) - Object.setPrototypeOf(this, ProofVerificationFailedError.prototype) - } -} - -export class AnswerIncorrectError extends WebrpcError { - constructor( - name: string = 'AnswerIncorrect', - code: number = 7003, - message: string = 'The provided answer is incorrect', - status: number = 0, - cause?: string - ) { - super(name, code, message, status, cause) - Object.setPrototypeOf(this, AnswerIncorrectError.prototype) - } -} - -export class ChallengeExpiredError extends WebrpcError { - constructor( - name: string = 'ChallengeExpired', - code: number = 7004, - message: string = 'The challenge has expired', - status: number = 0, - cause?: string - ) { - super(name, code, message, status, cause) - Object.setPrototypeOf(this, ChallengeExpiredError.prototype) - } -} - -export class TooManyAttemptsError extends WebrpcError { - constructor( - name: string = 'TooManyAttempts', - code: number = 7005, - message: string = 'Too many attempts', - status: number = 0, - cause?: string - ) { - super(name, code, message, status, cause) - Object.setPrototypeOf(this, TooManyAttemptsError.prototype) - } -} - -export enum errors { - WebrpcEndpoint = 'WebrpcEndpoint', - WebrpcRequestFailed = 'WebrpcRequestFailed', - WebrpcBadRoute = 'WebrpcBadRoute', - WebrpcBadMethod = 'WebrpcBadMethod', - WebrpcBadRequest = 'WebrpcBadRequest', - WebrpcBadResponse = 'WebrpcBadResponse', - WebrpcServerPanic = 'WebrpcServerPanic', - WebrpcInternalError = 'WebrpcInternalError', - WebrpcClientDisconnected = 'WebrpcClientDisconnected', - WebrpcStreamLost = 'WebrpcStreamLost', - WebrpcStreamFinished = 'WebrpcStreamFinished', - Unauthorized = 'Unauthorized', - TenantNotFound = 'TenantNotFound', - EmailAlreadyInUse = 'EmailAlreadyInUse', - AccountAlreadyLinked = 'AccountAlreadyLinked', - ProofVerificationFailed = 'ProofVerificationFailed', - AnswerIncorrect = 'AnswerIncorrect', - ChallengeExpired = 'ChallengeExpired', - TooManyAttempts = 'TooManyAttempts' -} - -const webrpcErrorByCode: { [code: number]: any } = { - [0]: WebrpcEndpointError, - [-1]: WebrpcRequestFailedError, - [-2]: WebrpcBadRouteError, - [-3]: WebrpcBadMethodError, - [-4]: WebrpcBadRequestError, - [-5]: WebrpcBadResponseError, - [-6]: WebrpcServerPanicError, - [-7]: WebrpcInternalErrorError, - [-8]: WebrpcClientDisconnectedError, - [-9]: WebrpcStreamLostError, - [-10]: WebrpcStreamFinishedError, - [1000]: UnauthorizedError, - [1001]: TenantNotFoundError, - [7000]: EmailAlreadyInUseError, - [7001]: AccountAlreadyLinkedError, - [7002]: ProofVerificationFailedError, - [7003]: AnswerIncorrectError, - [7004]: ChallengeExpiredError, - [7005]: TooManyAttemptsError -} - -export type Fetch = (input: RequestInfo, init?: RequestInit) => Promise diff --git a/old/packages/waas/src/clients/intent.gen.ts b/old/packages/waas/src/clients/intent.gen.ts deleted file mode 100644 index 0cd21e215..000000000 --- a/old/packages/waas/src/clients/intent.gen.ts +++ /dev/null @@ -1,435 +0,0 @@ -/* eslint-disable */ -// sequence-waas-intents v0.1.0 2ceeffac8ca0cebead69d58a1aa7a27d30ecb864 -// -- -// Code generated by webrpc-gen@v0.19.3 with typescript generator. DO NOT EDIT. -// -// webrpc-gen -schema=intent.ridl -target=typescript -out=./intent.gen.ts - -// WebRPC description and code-gen version -export const WebRPCVersion = 'v1' - -// Schema version of your RIDL schema -export const WebRPCSchemaVersion = 'v0.1.0' - -// Schema hash generated from your RIDL schema -export const WebRPCSchemaHash = '2ceeffac8ca0cebead69d58a1aa7a27d30ecb864' - -// -// Types -// - -export enum IntentName { - initiateAuth = 'initiateAuth', - openSession = 'openSession', - closeSession = 'closeSession', - validateSession = 'validateSession', - finishValidateSession = 'finishValidateSession', - listSessions = 'listSessions', - getSession = 'getSession', - sessionAuthProof = 'sessionAuthProof', - feeOptions = 'feeOptions', - signMessage = 'signMessage', - signTypedData = 'signTypedData', - sendTransaction = 'sendTransaction', - getTransactionReceipt = 'getTransactionReceipt', - federateAccount = 'federateAccount', - removeAccount = 'removeAccount', - listAccounts = 'listAccounts', - getIdToken = 'getIdToken', - adoptChildWallet = 'adoptChildWallet', - getAdopter = 'getAdopter', - confirmIntent = 'confirmIntent', - getConfirmationStatus = 'getConfirmationStatus' -} - -export enum TransactionType { - transaction = 'transaction', - erc20send = 'erc20send', - erc721send = 'erc721send', - erc1155send = 'erc1155send', - delayedEncode = 'delayedEncode', - contractCall = 'contractCall' -} - -export enum IntentResponseCode { - authInitiated = 'authInitiated', - sessionOpened = 'sessionOpened', - sessionClosed = 'sessionClosed', - sessionList = 'sessionList', - validationRequired = 'validationRequired', - validationStarted = 'validationStarted', - validationFinished = 'validationFinished', - sessionAuthProof = 'sessionAuthProof', - signedMessage = 'signedMessage', - signedTypedData = 'signedTypedData', - feeOptions = 'feeOptions', - transactionReceipt = 'transactionReceipt', - transactionFailed = 'transactionFailed', - getSessionResponse = 'getSessionResponse', - accountList = 'accountList', - accountFederated = 'accountFederated', - accountRemoved = 'accountRemoved', - idToken = 'idToken', - adopter = 'adopter', - childWalletAdopted = 'childWalletAdopted', - confirmationRequired = 'confirmationRequired' -} - -export enum FeeTokenType { - unknown = 'unknown', - erc20Token = 'erc20Token', - erc1155Token = 'erc1155Token' -} - -export enum IdentityType { - None = 'None', - Guest = 'Guest', - OIDC = 'OIDC', - Email = 'Email', - PlayFab = 'PlayFab', - Stytch = 'Stytch' -} - -export enum ChallengeType { - EmailOTP = 'EmailOTP' -} - -export interface Intent { - version: string - name: IntentName - expiresAt: number - issuedAt: number - data: any - signatures: Array -} - -export interface Signature { - sessionId: string - signature: string -} - -export interface IntentDataInitiateAuth { - sessionId: string - identityType: IdentityType - verifier: string - metadata?: string -} - -export interface IntentDataOpenSession { - sessionId: string - identityType: IdentityType - verifier?: string - answer?: string - forceCreateAccount?: boolean - email?: string - idToken?: string -} - -export interface IntentDataCloseSession { - sessionId: string -} - -export interface IntentDataValidateSession { - sessionId: string - wallet: string - deviceMetadata: string -} - -export interface IntentDataFinishValidateSession { - sessionId: string - wallet: string - salt: string - challenge: string -} - -export interface IntentDataListSessions { - wallet: string -} - -export interface IntentDataGetSession { - sessionId: string - wallet: string -} - -export interface IntentDataSessionAuthProof { - network: string - wallet: string - nonce?: string -} - -export interface IntentDataSignMessage { - network: string - wallet: string - message: string -} - -export interface IntentDataSignTypedData { - network: string - wallet: string - typedData: any -} - -export interface IntentDataFeeOptions { - network: string - wallet: string - identifier: string - transactions: Array -} - -export interface IntentDataSendTransaction { - network: string - wallet: string - identifier: string - transactions: Array - transactionsFeeQuote?: string -} - -export interface IntentDataGetTransactionReceipt { - network: string - wallet: string - metaTxHash: string -} - -export interface IntentDataFederateAccount { - sessionId: string - wallet: string - identityType: IdentityType - verifier?: string - answer?: string -} - -export interface IntentDataListAccounts { - wallet: string -} - -export interface IntentDataRemoveAccount { - wallet: string - accountId: string -} - -export interface IntentDataAdoptChildWallet { - network: string - wallet: string - adopter: string - adopterProof: AdopterProof -} - -export interface AdopterProof { - message: string - signature: string -} - -export interface IntentDataGetIdToken { - sessionId: string - wallet: string - nonce?: string -} - -export interface IntentDataGetAdopter { - wallet: string -} - -export interface IntentDataConfirmIntent { - wallet: string - confirmationID: string - challengeAnswer: string -} - -export interface IntentDataGetConfirmationStatus { - wallet: string - confirmationID: string -} - -export interface TransactionRaw { - type: string - to: string - value?: string - data: string -} - -export interface AbiData { - abi: string - func?: string - args: Array -} - -export interface TransactionERC20 { - type: string - tokenAddress: string - to: string - value: string -} - -export interface TransactionERC721 { - type: string - tokenAddress: string - to: string - id: string - safe?: boolean - data?: string -} - -export interface TransactionERC1155Value { - id: string - amount: string -} - -export interface TransactionDelayedEncode { - type: string - to: string - value: string - data: any -} - -export interface TransactionContractCall { - type: string - to: string - value?: string - data: AbiData -} - -export interface TransactionERC1155 { - type: string - tokenAddress: string - to: string - vals: Array - data?: string -} - -export interface IntentResponse { - code: IntentResponseCode - data: any -} - -export interface IntentResponseAuthInitiated { - sessionId: string - identityType: IdentityType - expiresIn: number - challenge?: string -} - -export interface IntentResponseSessionOpened { - sessionId: string - wallet: string -} - -export interface IntentResponseSessionClosed {} - -export interface IntentResponseValidateSession {} - -export interface IntentResponseValidationRequired { - sessionId: string -} - -export interface IntentResponseValidationStarted { - salt: string -} - -export interface IntentResponseValidationFinished { - isValid: boolean -} - -export interface IntentResponseListSessions { - sessions: Array -} - -export interface IntentResponseGetSession { - sessionId: string - wallet: string - validated: boolean -} - -export interface IntentResponseSessionAuthProof { - sessionId: string - network: string - wallet: string - message: string - signature: string -} - -export interface IntentResponseSignedMessage { - signature: string - message: string -} - -export interface IntentResponseSignedTypedData { - signature: string - encodedTypedData: string -} - -export interface FeeOption { - token: FeeToken - to: string - value: string - gasLimit: number -} - -export interface FeeToken { - chainId: number - name: string - symbol: string - type: FeeTokenType - decimals?: number - logoURL: string - contractAddress?: string - tokenID?: string -} - -export interface IntentResponseFeeOptions { - feeOptions: Array - feeQuote?: string -} - -export interface IntentResponseTransactionReceipt { - request: any - txHash: string - metaTxHash: string - receipt: any - nativeReceipt: any - simulations: any -} - -export interface IntentResponseTransactionFailed { - error: string - request: any - simulations: any -} - -export interface IntentResponseAccountList { - accounts: Array - currentAccountId: string -} - -export interface IntentResponseAccountFederated { - account: Account -} - -export interface IntentResponseAccountRemoved {} - -export interface IntentResponseIdToken { - idToken: string - expiresIn: number -} - -export interface IntentResponseChildWalletAdopted { - adopterAddress: string -} - -export interface IntentResponseAdopter { - adopterAddress: string -} - -export interface IntentResponseConfirmationRequired { - confirmationId: string - salt: string - challengeType: ChallengeType - challengeDestination?: string - expiresIn: number -} - -export interface Account { - id: string - type: IdentityType - issuer?: string - email?: string -} diff --git a/old/packages/waas/src/email.ts b/old/packages/waas/src/email.ts deleted file mode 100644 index 52d970f8d..000000000 --- a/old/packages/waas/src/email.ts +++ /dev/null @@ -1,134 +0,0 @@ -import { - CognitoIdentityProviderClient, - InitiateAuthCommand, - InitiateAuthCommandOutput, - RespondToAuthChallengeCommand, - SignUpCommand, - UserLambdaValidationException -} from '@aws-sdk/client-cognito-identity-provider' - -import { IdTokenIdentity } from './auth' - -export class EmailAuth { - private cognitoMemo: CognitoIdentityProviderClient - - constructor( - public readonly region: string, - public readonly clientId: string - ) {} - - private cognito() { - if (!this.cognitoMemo) { - this.cognitoMemo = new CognitoIdentityProviderClient({ - region: this.region - }) - } - - return this.cognitoMemo - } - - private signUp(email: string) { - email = email.toLowerCase().trim() - return this.cognito().send( - new SignUpCommand({ - ClientId: this.clientId, - Username: email, - Password: 'aB1%' + getRandomString(14), - UserAttributes: [{ Name: 'email', Value: email }] - }) - ) - } - - private signIn(email: string) { - email = email.toLowerCase().trim() - return this.cognito().send( - new InitiateAuthCommand({ - AuthFlow: 'CUSTOM_AUTH', - ClientId: this.clientId, - AuthParameters: { - USERNAME: email - } - }) - ) - } - - public async initiateAuth({ email }: { email: string }): Promise<{ email: string; instance: string }> { - let res: InitiateAuthCommandOutput - email = email.toLowerCase().trim() - - try { - // Try sign in directly first - res = await this.signIn(email) - } catch (e) { - if (e instanceof UserLambdaValidationException && e.message.includes('user not found')) { - // Sign up and sign in - await this.signUp(email) - res = await this.signIn(email) - } else { - throw e - } - } - - if (!res.Session) { - throw new Error('response session is empty') - } - - return { - // Notice: rename session to instance to avoid - // confusion with the native waas session - instance: res.Session, - email: email - } - } - - public async finalizeAuth({ - instance, - email, - answer, - sessionHash - }: { - instance: string - email: string - answer: string - sessionHash: string - }): Promise { - email = email.toLowerCase().trim() - - const res = await this.cognito().send( - new RespondToAuthChallengeCommand({ - ClientId: this.clientId, - Session: instance, - ChallengeName: 'CUSTOM_CHALLENGE', - ChallengeResponses: { USERNAME: email, ANSWER: answer }, - ClientMetadata: { SESSION_HASH: sessionHash } - }) - ) - - if (!res.AuthenticationResult || !res.AuthenticationResult.IdToken) { - throw new Error('AuthenticationResult.IdToken is empty') - } - - return { idToken: res.AuthenticationResult.IdToken } - } -} - -function getRandomString(len: number) { - return Array.from(getRandomValues(len)) - .map(nr => nr.toString(16).padStart(2, '0')) - .join('') -} - -function getRandomValues(len: number) { - const randomValues = new Uint8Array(len) - if (typeof window === 'object' && typeof window.crypto === 'object') { - return window.crypto.getRandomValues(randomValues) - } else { - console.warn('window.crypto.getRandomValues is not available. Falling back to less secure Math.random().') - const randomValues = new Uint8Array(len) - for (let i = 0; i < len; i++) { - const randomInteger = Math.floor(Math.random() * 256) - randomValues[i] = randomInteger - } - return randomValues - } -} diff --git a/old/packages/waas/src/errors.ts b/old/packages/waas/src/errors.ts deleted file mode 100644 index 72bda9328..000000000 --- a/old/packages/waas/src/errors.ts +++ /dev/null @@ -1,6 +0,0 @@ -export class NoPrivateKeyError extends Error { - constructor() { - super('No private key found') - this.name = 'NoPrivateKeyError' - } -} diff --git a/old/packages/waas/src/index.ts b/old/packages/waas/src/index.ts deleted file mode 100644 index ce0c84498..000000000 --- a/old/packages/waas/src/index.ts +++ /dev/null @@ -1,37 +0,0 @@ -export * from './base' -export * from './auth' -export * from './challenge' - -export * as store from './store' -export * as networks from './networks' - -export type { Transaction, ContractCallArguments } from './intents/transactions' -export { erc20, erc721, erc1155, delayedEncode, contractCall } from './intents/transactions' - -export type { SecureStoreBackend } from './secure-store' - -export * from './intents/responses' -export * from './clients/intent.gen' -export { - AccountAlreadyLinkedError, - AnswerIncorrectError, - ChallengeExpiredError, - EmailAlreadyInUseError, - ProofVerificationFailedError, - TenantNotFoundError, - TooManyAttemptsError, - UnauthorizedError, - WebrpcBadMethodError, - WebrpcBadRequestError, - WebrpcBadResponseError, - WebrpcBadRouteError, - WebrpcClientDisconnectedError, - WebrpcEndpointError, - WebrpcError, - WebrpcInternalErrorError, - WebrpcRequestFailedError, - WebrpcServerPanicError, - WebrpcStreamFinishedError, - WebrpcStreamLostError, - errors -} from './clients/authenticator.gen' diff --git a/old/packages/waas/src/intents/accounts.ts b/old/packages/waas/src/intents/accounts.ts deleted file mode 100644 index e790a877e..000000000 --- a/old/packages/waas/src/intents/accounts.ts +++ /dev/null @@ -1,24 +0,0 @@ -import { Intent, makeIntent } from './base' -import { IntentDataFederateAccount, IntentDataListAccounts, IntentDataRemoveAccount, IntentName } from '../clients/intent.gen' - -interface BaseArgs { - lifespan: number -} - -export type ListAccountsArgs = BaseArgs & IntentDataListAccounts - -export function listAccounts({ lifespan, ...data }: ListAccountsArgs): Intent { - return makeIntent(IntentName.listAccounts, lifespan, data) -} - -export type FederateAccountArgs = BaseArgs & IntentDataFederateAccount - -export function federateAccount({ lifespan, ...data }: FederateAccountArgs): Intent { - return makeIntent(IntentName.federateAccount, lifespan, data) -} - -export type RemoveAccountArgs = BaseArgs & IntentDataRemoveAccount - -export function removeAccount({ lifespan, ...data }: RemoveAccountArgs): Intent { - return makeIntent(IntentName.removeAccount, lifespan, data) -} diff --git a/old/packages/waas/src/intents/base.ts b/old/packages/waas/src/intents/base.ts deleted file mode 100644 index 0f9caecbf..000000000 --- a/old/packages/waas/src/intents/base.ts +++ /dev/null @@ -1,91 +0,0 @@ -import { VERSION as PACKAGE_VERSION } from '@0xsequence/core' -import { Intent as RawIntent, IntentName } from '../clients/intent.gen' -import { useLifespan } from './utils' -import { ethers } from 'ethers' -import { canonicalize } from 'json-canonicalize' -import { Session } from '../session' - -export type Intent = Omit & { data: T } -export type SignedIntent = Omit & { data: T } - -const INTENTS_VERSION = 1 -const VERSION = `${INTENTS_VERSION} (Web ${PACKAGE_VERSION})` - -let timeDrift: number | undefined -const timeDriftKey = '@sequence.timeDrift' - -function isSessionStorageAvailable() { - return typeof window === 'object' && typeof window.sessionStorage === 'object' -} - -export function getLocalTime() { - return new Date().getTime() -} - -export function getTimeDrift() { - if (isSessionStorageAvailable()) { - const drift = window.sessionStorage.getItem(timeDriftKey) - if (drift) { - return parseInt(drift, 10) - } - } - return timeDrift -} - -export function updateTimeDrift(serverTime?: Date) { - if (!serverTime) { - timeDrift = undefined - if (isSessionStorageAvailable()) { - window.sessionStorage.removeItem(timeDriftKey) - } - return - } - - timeDrift = (getLocalTime() - serverTime.getTime()) / 1000 - if (isSessionStorageAvailable()) { - window.sessionStorage.setItem(timeDriftKey, timeDrift.toString(10)) - } -} - -export function makeIntent(name: IntentName, lifespan: number, data: T): Intent { - const drift = Math.abs(Math.floor(getTimeDrift() || 0)) - const issuedAt = Math.floor(getLocalTime() / 1000 - drift) - const expiresAt = issuedAt + lifespan + 2 * drift - return { - version: VERSION, - issuedAt, - expiresAt, - name, - data - } -} - -export async function signIntent(session: Session, intent: Intent): Promise> { - const hash = hashIntent(intent) - const signature = await session.sign(new Uint8Array(hash)) - return { - ...intent, - signatures: [ - { - sessionId: await session.sessionId(), - signature - } - ] - } -} - -export function hashIntent(intent: Intent): Uint8Array { - // Discard all fields other than the explicitly listed - const { version, issuedAt, expiresAt, name, data } = intent - const hashableIntent = { version, issuedAt, expiresAt, name, data } - const encoded = ethers.toUtf8Bytes(canonicalize(hashableIntent)) - return ethers.getBytes(ethers.keccak256(encoded)) -} - -export function changeIntentTime(intent: SignedIntent, now: Date): Intent { - const { signatures, ...unsignedIntent } = intent - const lifespan = intent.expiresAt - intent.issuedAt - unsignedIntent.issuedAt = Math.floor(now.getTime() / 1000) - unsignedIntent.expiresAt = unsignedIntent.issuedAt + lifespan - return unsignedIntent -} diff --git a/old/packages/waas/src/intents/index.ts b/old/packages/waas/src/intents/index.ts deleted file mode 100644 index 814a601c5..000000000 --- a/old/packages/waas/src/intents/index.ts +++ /dev/null @@ -1,4 +0,0 @@ -export * from './base' -export * from './messages' -export * from './session' -export * from './transactions' diff --git a/old/packages/waas/src/intents/messages.ts b/old/packages/waas/src/intents/messages.ts deleted file mode 100644 index b8869bf2c..000000000 --- a/old/packages/waas/src/intents/messages.ts +++ /dev/null @@ -1,38 +0,0 @@ -import { ethers } from 'ethers' -import { IntentDataSignMessage, IntentDataSignTypedData, IntentName } from '../clients/intent.gen' -import { Intent, makeIntent } from './base' - -interface BaseArgs { - lifespan: number - wallet: string - chainId: number -} - -export type SignMessageArgs = { - message: string -} - -export function signMessage({ wallet, chainId, message, lifespan }: SignMessageArgs & BaseArgs): Intent { - return makeIntent(IntentName.signMessage, lifespan, { - wallet, - network: chainId.toString(), - message: message.startsWith('0x') ? message : ethers.hexlify(ethers.toUtf8Bytes(message)) - }) -} - -export type SignTypedDataArgs = { - typedData: any -} - -export function signTypedData({ - wallet, - chainId, - typedData, - lifespan -}: SignTypedDataArgs & BaseArgs): Intent { - return makeIntent(IntentName.signTypedData, lifespan, { - wallet, - network: chainId.toString(), - typedData - }) -} diff --git a/old/packages/waas/src/intents/responses.ts b/old/packages/waas/src/intents/responses.ts deleted file mode 100644 index 17d47bf96..000000000 --- a/old/packages/waas/src/intents/responses.ts +++ /dev/null @@ -1,309 +0,0 @@ -import { - FeeOption, - IntentDataSendTransaction, - IntentResponseAccountFederated, - IntentResponseAccountList, - IntentResponseAuthInitiated, - IntentResponseCode, - IntentResponseGetSession, - IntentResponseIdToken, - IntentResponseValidationFinished, - IntentResponseValidationStarted -} from '../clients/intent.gen' -import { WebrpcEndpointError, WebrpcError } from '../clients/authenticator.gen' - -export type PayloadResponse = { - code: string - data: T -} - -export type ValidationRequiredResponse = { - code: 'validationRequired' - data: { - sessionId: string - } -} - -type MetaTxnReceiptLog = { - address: string - topics: string[] - data: string -} - -type MetaTxnReceipt = { - id: string - status: string - revertReason?: string | null - index: number - logs: MetaTxnReceiptLog[] - receipts: MetaTxnReceipt[] - txnReceipt: string -} - -type SimulateResult = { - executed: boolean - succeeded: boolean - result: string | null - reason: string | null - gasUsed: number - gasLimit: number -} - -export type SentTransactionResponse = { - code: 'transactionReceipt' - data: { - txHash: string - metaTxHash: string - request: IntentDataSendTransaction - receipt: MetaTxnReceipt - nativeReceipt?: any | null - simulations?: SimulateResult[] - } -} - -export type TransactionFailedResponse = { - code: 'transactionFailed' - data: { - error: string - request: IntentDataSendTransaction - simulations: SimulateResult[] - } -} - -export type MaySentTransactionResponse = SentTransactionResponse | TransactionFailedResponse - -export type FeeOptionsResponse = { - code: 'feeOptions' - data: { - feeOptions: FeeOption[] - feeQuote?: string - } -} - -export type OpenSessionResponse = { - code: 'sessionOpened' - data: { - sessionId: string - wallet: string - } -} - -export type CloseSessionResponse = { - code: 'sessionClosed' -} - -export type ListSessionsResponse = { - code: 'listSessions' - data: { - sessions: any[] - } -} - -export type SignedMessageResponse = { - code: 'signedMessage' - data: { - message: string - signature: string - } -} - -export type SignedTypedDataResponse = { - code: 'signedTypedData' - data: { - typedData: any - signature: string - } -} - -export type SessionAuthProofResponse = { - code: 'sessionAuthProof' - data: { - sessionId: string - network: string - wallet: string - message: string - signature: string - } -} - -export interface Response { - code: Code - data: Data -} - -export type InitiateAuthResponse = Response -export type ValidateSessionResponse = Response -export type FinishValidateSessionResponse = Response -export type GetSessionResponse = Response -export type LinkAccountResponse = Response -export type ListAccountsResponse = Response -export type IdTokenResponse = Response - -export function isInitiateAuthResponse(receipt: any): receipt is InitiateAuthResponse { - return ( - typeof receipt === 'object' && - receipt.code === IntentResponseCode.authInitiated && - typeof receipt.data === 'object' && - typeof receipt.data.sessionId === 'string' && - typeof receipt.data.identityType === 'string' && - typeof receipt.data.expiresIn === 'number' - ) -} - -export function isOpenSessionResponse(receipt: any): receipt is OpenSessionResponse { - return ( - typeof receipt === 'object' && - typeof receipt.code === 'string' && - receipt.code === 'sessionOpened' && - typeof receipt.data === 'object' && - typeof receipt.data.sessionId === 'string' && - typeof receipt.data.wallet === 'string' - ) -} - -export function isSentTransactionResponse(receipt: any): receipt is SentTransactionResponse { - return ( - typeof receipt === 'object' && - typeof receipt.code === 'string' && - receipt.code === 'transactionReceipt' && - typeof receipt.data === 'object' && - typeof receipt.data.txHash === 'string' && - typeof receipt.data.receipt === 'object' && - typeof receipt.data.request === 'object' - ) -} - -export function isTimedOutTransactionResponse(receipt: any): receipt is SentTransactionResponse { - return ( - typeof receipt === 'object' && - typeof receipt.code === 'string' && - receipt.code === 'transactionReceipt' && - typeof receipt.data === 'object' && - typeof receipt.data.metaTxHash === 'string' && - !receipt.data.txHash && - typeof receipt.data.request === 'object' - ) -} - -export function isFailedTransactionResponse(receipt: any): receipt is TransactionFailedResponse { - return ( - typeof receipt === 'object' && - typeof receipt.code === 'string' && - receipt.code === 'transactionFailed' && - typeof receipt.data === 'object' && - typeof receipt.data.request === 'object' && - Array.isArray(receipt.data.simulations) && - typeof receipt.data.error === 'string' - ) -} - -export function isMaySentTransactionResponse(receipt: any): receipt is MaySentTransactionResponse { - return isSentTransactionResponse(receipt) || isFailedTransactionResponse(receipt) || isTimedOutTransactionResponse(receipt) -} - -export function isSignedMessageResponse(receipt: any): receipt is SignedMessageResponse { - return ( - typeof receipt === 'object' && - typeof receipt.code === 'string' && - receipt.code === 'signedMessage' && - typeof receipt.data === 'object' && - typeof receipt.data.message === 'string' && - typeof receipt.data.signature === 'string' - ) -} - -export function isSignedTypedDataResponse(receipt: any): receipt is SignedTypedDataResponse { - return ( - typeof receipt === 'object' && - typeof receipt.code === 'string' && - receipt.code === 'signedTypedData' && - typeof receipt.data === 'object' && - typeof receipt.data.encodedTypedData === 'string' && - typeof receipt.data.signature === 'string' - ) -} - -export function isSessionAuthProofResponse(receipt: any): receipt is SessionAuthProofResponse { - return ( - typeof receipt === 'object' && - typeof receipt.code === 'string' && - receipt.code === 'sessionAuthProof' && - typeof receipt.data === 'object' && - typeof receipt.data.sessionId === 'string' && - typeof receipt.data.network === 'string' && - typeof receipt.data.wallet === 'string' && - typeof receipt.data.message === 'string' && - typeof receipt.data.signature === 'string' - ) -} - -export function isFeeOptionsResponse(receipt: any): receipt is FeeOptionsResponse { - return ( - typeof receipt === 'object' && - typeof receipt.code === 'string' && - receipt.code === 'feeOptions' && - typeof receipt.data === 'object' && - Array.isArray(receipt.data.feeOptions) - ) -} - -export function isValidationRequiredResponse(receipt: any): receipt is ValidationRequiredResponse { - return ( - typeof receipt === 'object' && - receipt.code === IntentResponseCode.validationRequired && - typeof receipt.data === 'object' && - typeof receipt.data.sessionId === 'string' - ) -} - -export function isValidateSessionResponse(receipt: any): receipt is ValidateSessionResponse { - return typeof receipt === 'object' && receipt.code === IntentResponseCode.validationStarted && typeof receipt.data === 'object' -} - -export function isFinishValidateSessionResponse(receipt: any): receipt is FinishValidateSessionResponse { - return typeof receipt === 'object' && receipt.code === IntentResponseCode.validationFinished && typeof receipt.data === 'object' -} - -export function isCloseSessionResponse(receipt: any): receipt is CloseSessionResponse { - return typeof receipt === 'object' && typeof receipt.code === 'string' && receipt.code === 'sessionClosed' -} - -export function isGetSessionResponse(receipt: any): receipt is GetSessionResponse { - return ( - typeof receipt === 'object' && - typeof receipt.code === 'string' && - receipt.code === 'getSessionResponse' && - typeof receipt.data === 'object' && - typeof receipt.data.session === 'string' && - typeof receipt.data.wallet === 'string' - ) -} - -export function isLinkAccountResponse(receipt: any): receipt is LinkAccountResponse { - return ( - typeof receipt === 'object' && - receipt.code === IntentResponseCode.accountFederated && - typeof receipt.data === 'object' && - typeof receipt.data.account === 'object' - ) -} - -export function isListAccountsResponse(receipt: any): receipt is ListAccountsResponse { - return typeof receipt === 'object' && receipt.code === IntentResponseCode.accountList && typeof receipt.data === 'object' -} -export function isIntentTimeError(error: any): error is WebrpcEndpointError { - return !!( - error instanceof WebrpcError && - (error.cause?.endsWith('intent is invalid: intent expired') || - error.cause?.endsWith('intent is invalid: intent issued in the future')) - ) -} - -export function isGetIdTokenResponse(receipt: any): receipt is IdTokenResponse { - return ( - typeof receipt === 'object' && - receipt.code === IntentResponseCode.idToken && - typeof receipt.data === 'object' && - typeof receipt.data.idToken === 'string' - ) -} diff --git a/old/packages/waas/src/intents/session.ts b/old/packages/waas/src/intents/session.ts deleted file mode 100644 index 74a114580..000000000 --- a/old/packages/waas/src/intents/session.ts +++ /dev/null @@ -1,71 +0,0 @@ -import { Intent, makeIntent } from './base' -import { - IntentDataCloseSession, - IntentDataFinishValidateSession, - IntentDataGetSession, - IntentDataListSessions, - IntentDataOpenSession, - IntentDataValidateSession, - IntentDataSessionAuthProof, - IntentDataInitiateAuth, - IntentDataGetIdToken, - IntentName -} from '../clients/intent.gen' - -interface BaseArgs { - lifespan: number -} - -export type InitiateAuthArgs = BaseArgs & IntentDataInitiateAuth - -export async function initiateAuth({ lifespan, ...data }: InitiateAuthArgs): Promise> { - return makeIntent(IntentName.initiateAuth, lifespan, data) -} - -export type OpenSessionArgs = BaseArgs & IntentDataOpenSession - -export async function openSession({ lifespan, ...data }: OpenSessionArgs): Promise> { - return makeIntent(IntentName.openSession, lifespan, data) -} - -export type ValidateSessionArgs = BaseArgs & IntentDataValidateSession - -export async function validateSession({ lifespan, ...data }: ValidateSessionArgs): Promise> { - return makeIntent(IntentName.validateSession, lifespan, data) -} - -export type FinishValidateSessionArgs = BaseArgs & IntentDataFinishValidateSession - -export function finishValidateSession({ lifespan, ...data }: FinishValidateSessionArgs): Intent { - return makeIntent(IntentName.finishValidateSession, lifespan, data) -} - -export type CloseSessionArgs = BaseArgs & IntentDataCloseSession - -export function closeSession({ lifespan, ...data }: CloseSessionArgs): Intent { - return makeIntent(IntentName.closeSession, lifespan, data) -} - -export type ListSessionsArgs = BaseArgs & IntentDataListSessions - -export function listSessions({ lifespan, ...data }: ListSessionsArgs): Intent { - return makeIntent(IntentName.listSessions, lifespan, data) -} - -export type GetSessionArgs = BaseArgs & IntentDataGetSession - -export function getSession({ lifespan, ...data }: GetSessionArgs): Intent { - return makeIntent(IntentName.getSession, lifespan, data) -} - -export type SessionAuthProof = BaseArgs & IntentDataSessionAuthProof - -export function sessionAuthProof({ lifespan, ...data }: SessionAuthProof): Intent { - return makeIntent(IntentName.sessionAuthProof, lifespan, data) -} - -export type GetIdTokenArgs = BaseArgs & IntentDataGetIdToken - -export function getIdToken({ lifespan, ...data }: GetIdTokenArgs): Intent { - return makeIntent(IntentName.getIdToken, lifespan, data) -} diff --git a/old/packages/waas/src/intents/transactions.ts b/old/packages/waas/src/intents/transactions.ts deleted file mode 100644 index 86bdb8fca..000000000 --- a/old/packages/waas/src/intents/transactions.ts +++ /dev/null @@ -1,453 +0,0 @@ -import { Intent, makeIntent } from './base' -import { - IntentDataGetTransactionReceipt, - IntentDataSendTransaction, - IntentDataFeeOptions, - TransactionContractCall, - TransactionDelayedEncode, - TransactionERC1155, - TransactionERC20, - TransactionERC721, - TransactionRaw, - TransactionERC1155Value, - IntentName, - FeeOption, - FeeTokenType -} from '../clients/intent.gen' -import { ethers } from 'ethers' -import { toHexString } from '@0xsequence/utils' - -interface BaseArgs { - lifespan: number - wallet: string - identifier: string - chainId: number -} - -export type TransactionFeeArgs = { - transactionsFeeQuote?: string - transactionsFeeOption?: FeeOption -} - -export type SendTransactionsArgs = TransactionFeeArgs & { - transactions: Transaction[] -} - -export type SendERC20Args = TransactionFeeArgs & { - chainId: number - token: string - to: string - value: ethers.BigNumberish -} - -export type SendERC721Args = TransactionFeeArgs & { - chainId: number - token: string - to: string - id: string - safe?: boolean - data?: string -} - -export type SendERC1155Args = TransactionFeeArgs & { - chainId: number - token: string - to: string - values: { - id: string - amount: ethers.BigNumberish - }[] - data?: string -} - -export type SendContractCallArgs = TransactionFeeArgs & { - chainId: number - to: string - value?: ethers.BigNumberish - abi: string - func?: string - args: ContractCallArguments[] -} - -export type ContractCallArguments = - | string - | { - abi: string - func?: string - args: ContractCallArguments[] - } - -// Deprecated: please use SendContractCallArgs instead -export type SendDelayedEncodeArgs = TransactionFeeArgs & { - chainId: number - to: string - value: ethers.BigNumberish - abi: string - func: string - args: string[] | { [key: string]: string } -} - -export function feeOptions({ - lifespan, - wallet, - identifier, - chainId, - transactions -}: SendTransactionsArgs & BaseArgs): Intent { - return makeIntent(IntentName.feeOptions, lifespan, { - identifier, - wallet, - network: chainId.toString(), - transactions: transactions.map(tx => { - if (!tx.to || tx.to === ethers.ZeroAddress) { - throw new Error('Contract creation not supported') - } - - if (!isEthersTx(tx)) { - return tx - } - - return { - type: 'transaction', - to: tx.to, - value: toHexString(BigInt(tx.value || 0)), - data: ethers.hexlify(tx.data || '0x') - } - }) - }) -} - -export function sendTransactions({ - lifespan, - wallet, - identifier, - chainId, - transactions, - transactionsFeeQuote, - transactionsFeeOption -}: SendTransactionsArgs & BaseArgs): Intent { - return makeIntent(IntentName.sendTransaction, lifespan, { - identifier, - wallet, - network: chainId.toString(), - transactions: withTransactionFee(transactions, transactionsFeeOption).map(tx => { - if (!tx.to || tx.to === ethers.ZeroAddress) { - throw new Error('Contract creation not supported') - } - - if (!isEthersTx(tx)) { - return tx - } - - return { - type: 'transaction', - to: tx.to, - value: toHexString(BigInt(tx.value || 0)), - data: ethers.hexlify(tx.data || '0x') - } - }), - transactionsFeeQuote - }) -} - -function withTransactionFee(transactions: Transaction[], feeOption?: FeeOption): Transaction[] { - const extendedTransactions = [...transactions] - if (feeOption) { - switch (feeOption.token.type) { - case FeeTokenType.unknown: - extendedTransactions.push({ - to: feeOption.to, - value: feeOption.value - }) - break - case FeeTokenType.erc20Token: - if (!feeOption.token.contractAddress) { - throw new Error('contract address is required') - } - - extendedTransactions.push( - erc20({ - tokenAddress: feeOption.token.contractAddress, - to: feeOption.to, - value: feeOption.value - }) - ) - break - case FeeTokenType.erc1155Token: - if (!feeOption.token.contractAddress) { - throw new Error('contract address is required') - } - - if (!feeOption.token.tokenID) { - throw new Error('token ID is required') - } - - extendedTransactions.push( - erc1155({ - tokenAddress: feeOption.token.contractAddress, - to: feeOption.to, - vals: [{ id: feeOption.token.tokenID, amount: feeOption.value }] - }) - ) - break - } - } - - return extendedTransactions -} - -export type GetTransactionReceiptArgs = { - metaTxHash: string -} - -export function getTransactionReceipt({ - lifespan, - chainId, - wallet, - metaTxHash -}: GetTransactionReceiptArgs & BaseArgs): Intent { - return makeIntent(IntentName.getTransactionReceipt, lifespan, { - wallet, - network: chainId.toString(), - metaTxHash - }) -} - -export function sendERC20({ token, to, value, ...args }: SendERC20Args & BaseArgs): Intent { - return sendTransactions({ - transactions: [erc20({ tokenAddress: token, to, value: value.toString() })], - ...args - }) -} - -export function sendERC721({ token, to, id, safe, data, ...args }: SendERC721Args & BaseArgs): Intent { - return sendTransactions({ - transactions: [erc721({ tokenAddress: token, to, id, data, safe })], - ...args - }) -} - -export function sendERC1155({ token, to, values, data, ...args }: SendERC1155Args & BaseArgs): Intent { - const vals = values.map(v => ({ - id: v.id, - amount: BigInt(v.amount).toString() - })) - - return sendTransactions({ - transactions: [erc1155({ tokenAddress: token, to, vals, data })], - ...args - }) -} - -export function sendContractCall({ - to, - value, - abi, - func, - args, - ...otherArgs -}: SendContractCallArgs & BaseArgs): Intent { - return sendTransactions({ - transactions: [ - contractCall({ - to, - value: BigInt(value || 0).toString(), - data: { abi, func, args } - }) - ], - ...otherArgs - }) -} - -// Deprecated please use sendContractCall instead -export function sendDelayedEncode({ - to, - value, - abi, - func, - args, - ...otherArgs -}: SendDelayedEncodeArgs & BaseArgs): Intent { - return sendTransactions({ - transactions: [ - delayedEncode({ - to, - value: BigInt(value).toString(), - data: { abi, func, args } - }) - ], - ...otherArgs - }) -} - -export type Transaction = - | ethers.TransactionRequest - | TransactionRaw - | TransactionERC20 - | TransactionERC721 - | TransactionERC1155 - | TransactionContractCall - | TransactionDelayedEncode // deprecated TransactionDelayedEncode - -export function transaction(data: Omit): Transaction { - return { type: 'transaction', ...data } -} - -export function erc20(data: Omit | Omit): Transaction { - const sendERC20Args = data as Omit - const transactionERC20 = data as Omit - - if (sendERC20Args.token !== undefined) { - return { - type: 'erc20send', - tokenAddress: sendERC20Args.token, - to: sendERC20Args.to, - value: sendERC20Args.value.toString() - } - } else if (transactionERC20.tokenAddress !== undefined) { - return { type: 'erc20send', ...transactionERC20 } - } else { - throw new Error('Invalid ERC20 transaction') - } -} - -export function erc721(data: Omit | Omit): Transaction { - const sendERC721Args = data as Omit - const transactionERC721 = data as Omit - - if (sendERC721Args.token !== undefined) { - return { - type: 'erc721send', - tokenAddress: sendERC721Args.token, - to: sendERC721Args.to, - id: sendERC721Args.id, - data: sendERC721Args.data, - safe: sendERC721Args.safe - } - } else if (transactionERC721.tokenAddress !== undefined) { - return { type: 'erc721send', ...transactionERC721 } - } else { - throw new Error('Invalid ERC721 transaction') - } -} - -export function erc1155(data: Omit | Omit): Transaction { - const sendERC1155Args = data as Omit - const transactionERC1155 = data as Omit - - if (sendERC1155Args.values !== undefined) { - return { - type: 'erc1155send', - vals: sendERC1155Args.values.map(v => ({ - id: v.id, - amount: v.amount.toString() - })), - tokenAddress: sendERC1155Args.token, - to: sendERC1155Args.to, - data: sendERC1155Args.data - } - } else if (transactionERC1155.vals !== undefined) { - return { - type: 'erc1155send', - vals: transactionERC1155.vals.map(v => ({ - id: v.id, - amount: v.amount - })), - tokenAddress: transactionERC1155.tokenAddress, - to: transactionERC1155.to, - data: transactionERC1155.data - } - } else { - throw new Error('Invalid ERC1155 transaction') - } -} - -export function contractCall(data: Omit | Omit): Transaction { - const sendContractCallArgs = data as Omit - const transactionContractCall = data as Omit - - if (sendContractCallArgs.abi !== undefined) { - return { - type: 'contractCall', - to: sendContractCallArgs.to, - value: toHexString(BigInt(sendContractCallArgs.value || 0)), - data: { - abi: sendContractCallArgs.abi, - func: sendContractCallArgs.func, - args: sendContractCallArgs.args - } - } - } else if (transactionContractCall.data !== undefined) { - return { - type: 'contractCall', - to: transactionContractCall.to, - value: transactionContractCall.value, - data: transactionContractCall.data - } - } else { - throw new Error('Invalid contract transaction') - } -} - -// Deprecated -export function delayedEncode( - data: Omit | Omit -): Transaction { - const sendDelayedEncodeArgs = data as Omit - const transactionDelayedEncode = data as Omit - - if (sendDelayedEncodeArgs.abi !== undefined) { - return { - type: 'delayedEncode', - to: sendDelayedEncodeArgs.to, - value: toHexString(BigInt(sendDelayedEncodeArgs.value)), - data: { - abi: sendDelayedEncodeArgs.abi, - func: sendDelayedEncodeArgs.func, - args: sendDelayedEncodeArgs.args - } - } - } else if (transactionDelayedEncode.data !== undefined) { - return { - type: 'delayedEncode', - to: transactionDelayedEncode.to, - value: transactionDelayedEncode.value, - data: transactionDelayedEncode.data - } - } else { - throw new Error('Invalid delayed encode transaction') - } -} - -export function combineTransactionIntents(intents: Intent[]): Intent { - if (intents.length === 0) { - throw new Error('No packets provided') - } - - // Ensure that all packets are for the same network and wallet - const network = intents[0].data.network - const wallet = intents[0].data.wallet - const lifespan = intents[0].expiresAt - intents[0].issuedAt - const identifier = intents[0].data.identifier - const transactionsFeeQuote = intents[0].data.transactionsFeeQuote - - if (!intents.every(intent => intent.data.network === network)) { - throw new Error('All packets must have the same chainId') - } - - if (!intents.every(intent => intent.data.wallet === wallet)) { - throw new Error('All packets must have the same wallet') - } - - return makeIntent(IntentName.sendTransaction, lifespan, { - network, - wallet, - identifier, - transactions: intents.flatMap(intent => intent.data.transactions), - transactionsFeeQuote - }) -} - -function isEthersTx(tx: Transaction): tx is ethers.TransactionRequest { - return !['transaction', 'erc20send', 'erc721send', 'erc1155send', 'delayedEncode', 'contractCall'].includes(tx.type as any) -} diff --git a/old/packages/waas/src/intents/utils.ts b/old/packages/waas/src/intents/utils.ts deleted file mode 100644 index d92c22f23..000000000 --- a/old/packages/waas/src/intents/utils.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { getLocalTime } from './base' - -export function useLifespan(lifespan: number) { - const issuedAt = Math.floor(getLocalTime() / 1000) - return { - issuedAt, - expiresAt: issuedAt + lifespan - } -} diff --git a/old/packages/waas/src/networks.ts b/old/packages/waas/src/networks.ts deleted file mode 100644 index 058a36865..000000000 --- a/old/packages/waas/src/networks.ts +++ /dev/null @@ -1,49 +0,0 @@ -import { networks, ChainId } from '@0xsequence/network' - -const RPC_BASE = 'https://nodes.sequence.app/' - -const nameToId = Object.entries(networks).reduce( - (acc, [key, value]) => { - acc[value.name] = value.chainId - return acc - }, - {} as { [name: string]: (typeof networks)[ChainId.MAINNET]['chainId'] } -) - -type NameToIdType = typeof nameToId -type IdToNameType = { [K in keyof NameToIdType as NameToIdType[K]]: K } - -const idToName = Object.entries(nameToId).reduce((acc, [key, value]) => { - acc[value] = key as any - return acc -}, {} as IdToNameType) - -export type SimpleNetwork = keyof NameToIdType | keyof IdToNameType - -export function isSimpleNetwork(network: any): network is SimpleNetwork { - return toNetworkID(network) in nameToId -} - -export function toNetworkID(network: SimpleNetwork): keyof IdToNameType { - const networkNumber = typeof network === 'number' ? network : parseInt(network) - if (networkNumber in idToName) { - return networkNumber - } - - const networkLower = network.toString().toLowerCase() - if (networkLower in nameToId) { - return nameToId[networkLower as keyof NameToIdType] - } - - throw new Error(`Unknown network: ${network}`) -} - -export function nameOfNetwork(network: SimpleNetwork): keyof NameToIdType { - return idToName[toNetworkID(network)] -} - -export function rpcNode(network: SimpleNetwork): string { - return RPC_BASE + nameOfNetwork(network) -} - -export type WithSimpleNetwork = Omit & { network?: SimpleNetwork } diff --git a/old/packages/waas/src/secure-store.ts b/old/packages/waas/src/secure-store.ts deleted file mode 100644 index ace34140e..000000000 --- a/old/packages/waas/src/secure-store.ts +++ /dev/null @@ -1,69 +0,0 @@ -import { openDB, IDBPDatabase } from 'idb' - -export interface SecureStoreBackend { - get(dbName: string, dbStoreName: string, key: string): Promise - set(dbName: string, dbStoreName: string, key: string, value: any): Promise - delete(dbName: string, dbStoreName: string, key: string): Promise -} - -export const getDefaultSecureStoreBackend = (): SecureStoreBackend | null => { - if (isIndexedDbAvailable()) { - return new IndexedDbSecureStoreBackend() - } else { - return null - } -} - -export function isIndexedDbAvailable(): boolean { - return typeof indexedDB === 'object' -} - -export class IndexedDbSecureStoreBackend implements SecureStoreBackend { - private db: IDBPDatabase | null - - constructor() { - if (!isIndexedDbAvailable()) { - throw new Error('IndexedDB is not available') - } - - this.db = null - } - - private async openDB(dbName: string, dbStoreName: string, version: number): Promise { - if (this.db) { - return this.db - } - - this.db = await openDB(dbName, 1, { - upgrade(db) { - db.createObjectStore(dbStoreName) - } - }) - - return this.db - } - - async get(dbName: string, dbStoreName: string, key: string): Promise { - const db = await this.openDB(dbName, dbStoreName, 1) - const tx = db.transaction(dbStoreName, 'readonly') - const value = await db.get(dbStoreName, key) - await tx.done - return value - } - - async set(dbName: string, dbStoreName: string, key: string, value: any): Promise { - const db = await this.openDB(dbName, dbStoreName, 1) - const tx = db.transaction(dbStoreName, 'readwrite') - await db.put(dbStoreName, value, key) - await tx.done - return true - } - - async delete(dbName: string, dbStoreName: string, key: string): Promise { - const db = await this.openDB(dbName, dbStoreName, 1) - const tx = db.transaction(dbStoreName, 'readwrite') - await db.delete(dbStoreName, key) - await tx.done - return true - } -} diff --git a/old/packages/waas/src/session/index.ts b/old/packages/waas/src/session/index.ts deleted file mode 100644 index 5e88043c3..000000000 --- a/old/packages/waas/src/session/index.ts +++ /dev/null @@ -1,42 +0,0 @@ -import { newSECP256K1SessionFromSessionId, newSECP256K1Session } from './secp256k1' -import { newSECP256R1SessionFromSessionId, newSECP256R1Session } from './secp256r1' -import { SubtleCryptoBackend } from '../subtle-crypto' -import { SecureStoreBackend } from '../secure-store' - -export type Session = { - sessionId(): Promise - sign(message: string | Uint8Array): Promise - clear(): void -} - -export async function newSessionFromSessionId( - sessionId: string, - cryptoBackend: SubtleCryptoBackend | null, - secureStoreBackend: SecureStoreBackend | null -): Promise { - if (!secureStoreBackend) { - throw new Error('No secure store available') - } - if (cryptoBackend) { - return newSECP256R1SessionFromSessionId(sessionId, cryptoBackend, secureStoreBackend) - } else { - return newSECP256K1SessionFromSessionId(sessionId, secureStoreBackend) - } -} - -export async function newSession( - cryptoBackend: SubtleCryptoBackend | null, - secureStoreBackend: SecureStoreBackend | null -): Promise { - if (!secureStoreBackend) { - throw new Error('No secure store available') - } - if (cryptoBackend) { - return newSECP256R1Session(cryptoBackend, secureStoreBackend) - } else { - return newSECP256K1Session(secureStoreBackend) - } -} - -export * from './secp256r1' -export * from './secp256k1' diff --git a/old/packages/waas/src/session/keyTypes.ts b/old/packages/waas/src/session/keyTypes.ts deleted file mode 100644 index d2296b980..000000000 --- a/old/packages/waas/src/session/keyTypes.ts +++ /dev/null @@ -1,4 +0,0 @@ -export enum KeyTypes { - ECDSAP256K1 = 0, - ECDSAP256R1 = 1 -} diff --git a/old/packages/waas/src/session/secp256k1.ts b/old/packages/waas/src/session/secp256k1.ts deleted file mode 100644 index 3c6e090d6..000000000 --- a/old/packages/waas/src/session/secp256k1.ts +++ /dev/null @@ -1,49 +0,0 @@ -import { ethers } from 'ethers' -import { SecureStoreBackend } from '../secure-store' -import { Session } from './index' -import { NoPrivateKeyError } from '../errors' - -const idbName = 'seq-waas-session-p256k1' -const idbStoreName = 'seq-waas-session' - -export async function newSECP256K1SessionFromSessionId( - sessionId: string, - secureStoreBackend: SecureStoreBackend -): Promise { - const privateKey = await secureStoreBackend.get(idbName, idbStoreName, sessionId) - - if (!privateKey) { - throw new NoPrivateKeyError() - } - - const wallet = new ethers.Wallet(privateKey) - - return { - sessionId(): Promise { - return wallet.getAddress() - }, - sign(message: string | Uint8Array): Promise { - return wallet.signMessage(message) - }, - clear: async () => { - await secureStoreBackend.delete(idbName, idbStoreName, sessionId) - } - } as Session -} - -export async function newSECP256K1SessionFromPrivateKey( - privateKey: string, - secureStoreBackend: SecureStoreBackend -): Promise { - const wallet = new ethers.Wallet(privateKey) - const sessionId = await wallet.getAddress() - - await secureStoreBackend.set(idbName, idbStoreName, sessionId, privateKey) - - return newSECP256K1SessionFromSessionId(sessionId, secureStoreBackend) -} - -export async function newSECP256K1Session(secureStoreBackend: SecureStoreBackend): Promise { - const wallet = ethers.Wallet.createRandom() - return newSECP256K1SessionFromPrivateKey(wallet.privateKey, secureStoreBackend) -} diff --git a/old/packages/waas/src/session/secp256r1.ts b/old/packages/waas/src/session/secp256r1.ts deleted file mode 100644 index 9f910e144..000000000 --- a/old/packages/waas/src/session/secp256r1.ts +++ /dev/null @@ -1,93 +0,0 @@ -import { ethers } from 'ethers' -import { Session } from './index' -import { KeyTypes } from './keyTypes' -import { SubtleCryptoBackend } from '../subtle-crypto' -import { SecureStoreBackend } from '../secure-store' -import { NoPrivateKeyError } from '../errors' - -const idbName = 'seq-waas-session-p256r1' -const idbStoreName = 'seq-waas-session' - -// TODO: We need to update this to use the secure store backend -// Currently it ignores the override and leverages idb -// This is because the CryptoKeyPair is a bit more complicated -// than a simple string that SecureStoreBackend can handle - -export async function newSECP256R1SessionFromSessionId( - sessionId: string, - cryptoBackend: SubtleCryptoBackend, - secureStoreBackend: SecureStoreBackend -): Promise { - const keys = await secureStoreBackend.get(idbName, idbStoreName, sessionId) - - if (!keys || !keys.privateKey) { - throw new NoPrivateKeyError() - } - - const encoder = new TextEncoder() - return { - sessionId: async () => { - const pubKeyRaw = await cryptoBackend.exportKey('raw', keys.publicKey) - const pubKeyTypedRaw = new Uint8Array(pubKeyRaw.byteLength + 1) - - // set the first byte to the key type - pubKeyTypedRaw[0] = KeyTypes.ECDSAP256R1 - pubKeyTypedRaw.set(new Uint8Array(pubKeyRaw), 1) - - return ethers.hexlify(pubKeyTypedRaw) - }, - sign: async (message: string | Uint8Array) => { - if (typeof message === 'string') { - if (message.startsWith('0x')) { - message = message.slice(2) - message = ethers.getBytes(message) - } else { - message = encoder.encode(message) - } - } - const signatureBuff = await cryptoBackend.sign({ name: 'ECDSA', hash: { name: 'SHA-256' } }, keys.privateKey, message) - return ethers.hexlify(new Uint8Array(signatureBuff)) - }, - clear: async () => { - await secureStoreBackend.delete(idbName, idbStoreName, sessionId) - } - } -} - -export async function newSECP256R1SessionFromKeyPair( - keyPair: CryptoKeyPair, - cryptoBackend: SubtleCryptoBackend, - secureStoreBackend: SecureStoreBackend -): Promise { - const sessionId = await pubKeyToSessionId(cryptoBackend, keyPair.publicKey) - - await secureStoreBackend.set(idbName, idbStoreName, sessionId, keyPair) - - return newSECP256R1SessionFromSessionId(sessionId, cryptoBackend, secureStoreBackend) -} - -export async function newSECP256R1Session( - cryptoBackend: SubtleCryptoBackend, - secureStoreBackend: SecureStoreBackend -): Promise { - const generatedKeys = await cryptoBackend.generateKey( - { - name: 'ECDSA', - namedCurve: 'P-256' - }, - false, - ['sign', 'verify'] - ) - return newSECP256R1SessionFromKeyPair(generatedKeys, cryptoBackend, secureStoreBackend) -} - -async function pubKeyToSessionId(cryptoBackend: SubtleCryptoBackend, pubKey: CryptoKey): Promise { - const pubKeyRaw = await cryptoBackend.exportKey('raw', pubKey) - const pubKeyTypedRaw = new Uint8Array(pubKeyRaw.byteLength + 1) - - // set the first byte to the key type - pubKeyTypedRaw[0] = KeyTypes.ECDSAP256R1 - pubKeyTypedRaw.set(new Uint8Array(pubKeyRaw), 1) - - return ethers.hexlify(pubKeyTypedRaw) -} diff --git a/old/packages/waas/src/store.ts b/old/packages/waas/src/store.ts deleted file mode 100644 index a2fb99753..000000000 --- a/old/packages/waas/src/store.ts +++ /dev/null @@ -1,89 +0,0 @@ -export interface Store { - get(key: string): Promise - set(key: string, value: string | null): Promise -} - -export class StoreObj { - constructor( - private readonly store: Store, - private readonly key: string, - private readonly defaultValue: T - ) {} - - async get(): Promise { - const value = await this.store.get(this.key) - return value ? (value as T) : this.defaultValue - } - - async set(value: T): Promise { - if (value) { - await this.store.set(this.key, value) - } else { - await this.store.set(this.key, null) - } - } -} - -export class LocalStore implements Store { - private readonly store: Store - - constructor() { - if (WindowLocalStorage.isAvailable()) { - this.store = new WindowLocalStorage() - } else { - this.store = new MemoryStore() - } - } - - async get(key: string): Promise { - return this.store.get(key) - } - - async set(key: string, value: string | null): Promise { - return this.store.set(key, value) - } -} - -export class WindowLocalStorage implements Store { - static isAvailable(): boolean { - return typeof window === 'object' && typeof window.localStorage === 'object' - } - - constructor() { - if (!WindowLocalStorage.isAvailable()) { - throw new Error('No localStorage') - } - } - - async get(key: string): Promise { - return window.localStorage.getItem(key) - } - - async set(key: string, value: string | null): Promise { - if (!value) { - window.localStorage.removeItem(key) - } else { - window.localStorage.setItem(key, value) - } - } -} - -export class MemoryStore implements Store { - private store: Record = {} - - constructor() { - this.store = {} - } - - async get(key: string): Promise { - return this.store[key] || null - } - - async set(key: string, value: string | null): Promise { - if (value) { - this.store[key] = value - } else { - delete this.store[key] - } - } -} diff --git a/old/packages/waas/src/subtle-crypto.ts b/old/packages/waas/src/subtle-crypto.ts deleted file mode 100644 index a03fc89ab..000000000 --- a/old/packages/waas/src/subtle-crypto.ts +++ /dev/null @@ -1,120 +0,0 @@ -export interface SubtleCryptoBackend { - // generateKey is used to generate a new key pair. NOTE: its important to pass - // `false` to the extractable argument to ensure that the private key contents - // cannot be revealed. Note, that you can still use `extractable:false` and the - // `exportKey(..)` method, because the Browser is smart enough to keep the key - // opaque and only allow it to be exported in a wrapped format without revealing - // the private key contents. - generateKey( - algorithm: RsaHashedKeyGenParams | EcKeyGenParams, - extractable: boolean, - keyUsages: KeyUsage[] - ): Promise - - importKey( - format: 'jwk', - keyData: JsonWebKey, - algorithm: AlgorithmIdentifier | RsaHashedImportParams | EcKeyImportParams | HmacImportParams | AesKeyAlgorithm, - extractable: boolean, - keyUsages: ReadonlyArray - ): Promise - - // exportKey is used to export a key pair. The `format` argument is used to - // specify the format of the exported key. The `key` argument is the key pair - // to export. In general we'll use `format: 'raw'` and `key: `. - // Contents will be opaque when `extractable: false` was passed to `generateKey(..)`. - exportKey(format: Exclude, key: CryptoKey): Promise - - // digest is used to hash a message. The `algorithm` argument is used to specify - // the hash algorithm to use. The `data` argument is the message to hash. - digest(algorithm: AlgorithmIdentifier, data: Uint8Array): Promise - - // sign is used to sign a message. The `algorithm` argument is used to specify - // the signing algorithm to use. The `key` argument is the private key to use - // for signing. The `data` argument is the message to sign. - // - // For our purposes we just care about ECDSA / P-256. - sign(algorithm: AlgorithmIdentifier | RsaPssParams | EcdsaParams, key: CryptoKey, data: Uint8Array): Promise - - // verify is used to verify a signature. The `algorithm` argument is used to - // specify the verification algorithm to use. The `key` argument is the public - // key to use for verification. The `signature` argument is the signature to - // verify. The `data` argument is the message to verify. - verify( - algorithm: AlgorithmIdentifier | RsaPssParams | EcdsaParams, - key: CryptoKey, - signature: Uint8Array, - data: Uint8Array - ): Promise - - // getRandomValues is used to generate random bytes. The `len` argument is the - // number of random bytes to generate. - getRandomValues(len: number): Uint8Array -} - -export const getDefaultSubtleCryptoBackend = (): SubtleCryptoBackend | null => { - if (isWindowSubtleCryptoAvailable()) { - return new WindowSubtleCryptoBackend() - } else { - return null - } -} - -export function isWindowSubtleCryptoAvailable(): boolean { - return typeof window === 'object' && typeof window.crypto === 'object' && typeof window.crypto.subtle === 'object' -} - -export class WindowSubtleCryptoBackend implements SubtleCryptoBackend { - constructor() { - if (!isWindowSubtleCryptoAvailable()) { - throw new Error('window.crypto.subtle is not available') - } - } - - generateKey( - algorithm: RsaHashedKeyGenParams | EcKeyGenParams, - extractable: boolean, - keyUsages: KeyUsage[] - ): Promise { - return window.crypto.subtle.generateKey(algorithm, extractable, keyUsages) - } - - importKey( - format: 'jwk', - keyData: JsonWebKey, - algorithm: AlgorithmIdentifier | RsaHashedImportParams | EcKeyImportParams | HmacImportParams | AesKeyAlgorithm, - extractable: boolean, - keyUsages: ReadonlyArray - ): Promise { - return window.crypto.subtle.importKey(format, keyData, algorithm, extractable, keyUsages) - } - - async exportKey(format: Exclude, key: CryptoKey): Promise { - const keyData = await window.crypto.subtle.exportKey(format, key) - return new Uint8Array(keyData) - } - - async digest(algorithm: AlgorithmIdentifier, data: Uint8Array): Promise { - const digest = await window.crypto.subtle.digest(algorithm, data) - return new Uint8Array(digest) - } - - async sign(algorithm: AlgorithmIdentifier | RsaPssParams | EcdsaParams, key: CryptoKey, data: Uint8Array): Promise { - const signature = await window.crypto.subtle.sign(algorithm, key, data) - return new Uint8Array(signature) - } - - verify( - algorithm: AlgorithmIdentifier | RsaPssParams | EcdsaParams, - key: CryptoKey, - signature: Uint8Array, - data: Uint8Array - ): Promise { - return window.crypto.subtle.verify(algorithm, key, signature, data) - } - - getRandomValues(len: number) { - const randomValues = new Uint8Array(len) - return window.crypto.getRandomValues(randomValues) - } -} diff --git a/old/packages/waas/tests/intents.spec.ts b/old/packages/waas/tests/intents.spec.ts deleted file mode 100644 index 95088cd95..000000000 --- a/old/packages/waas/tests/intents.spec.ts +++ /dev/null @@ -1,165 +0,0 @@ -import * as chai from 'chai' -import { ethers } from 'ethers' - -import { Intent, signIntent } from '../src/intents' -import { IntentName, IntentDataSendTransaction, IntentDataSignMessage } from '../src/clients/intent.gen' -import { newSECP256K1SessionFromPrivateKey } from '../src/session' -import { getDefaultSecureStoreBackend } from '../src/secure-store' - -import 'fake-indexeddb/auto' - -const { expect } = chai - -describe('Payloads', () => { - it('Should sign a payload', async () => { - const intent: Intent = { - version: '1', - name: IntentName.sendTransaction, - issuedAt: 1600000000, - expiresAt: 1600000000 + 86400, - data: { - identifier: 'test-identifier', - wallet: '0xD67FC48b298B09Ed3D03403d930769C527186c4e', - network: '1', - transactions: [ - { - type: 'erc20send', - token: ethers.ZeroAddress, - to: '0x0dc9603d4da53841C1C83f3B550C6143e60e0425', - value: '0' - } - ] - } - } - - const secureStoreBackend = getDefaultSecureStoreBackend() - if (!secureStoreBackend) { - throw new Error('Secure store backend not available') - } - const session = await newSECP256K1SessionFromPrivateKey( - '0xecd39e2cdadc2427255042ca7e0f86368bd7aa6e3c99470444b7d073840c1b51', - secureStoreBackend - ) - const signedIntent = await signIntent(session, intent) - - expect(signedIntent.signatures.length).to.equal(1) - expect(signedIntent.signatures[0].sessionId).to.equal(await session.sessionId()) - expect(signedIntent.signatures[0].signature).to.equal( - '0x0707e5b0a66bc2aa536cd6dfd0ad3f7859ac3a864f9be1d351b450e704b4cf3548b19ffd72f956e1448b0298b862c95489daeb00c0f0686a8c76f22908bf29801b' - ) - }) - - it('Should sign a message payload', async () => { - const intent: Intent = { - version: '1', - name: IntentName.sendTransaction, - issuedAt: 1600000000, - expiresAt: 1600000000 + 86400, - data: { - network: '1', - wallet: '0xD67FC48b298B09Ed3D03403d930769C527186c4e', - message: '0xdeadbeef' - } - } - - const secureStoreBackend = getDefaultSecureStoreBackend() - if (!secureStoreBackend) { - throw new Error('Secure store backend not available') - } - const session = await newSECP256K1SessionFromPrivateKey( - '0xecd39e2cdadc2427255042ca7e0f86368bd7aa6e3c99470444b7d073840c1b51', - secureStoreBackend - ) - const signedIntent = await signIntent(session, intent) - - expect(signedIntent.signatures.length).to.equal(1) - expect(signedIntent.signatures[0].sessionId).to.equal(await session.sessionId()) - expect(signedIntent.signatures[0].signature).to.equal( - '0xf21bd58b31a490895c64eec3848465dc89426a208b2a480013e0f779003474d41be802c900c03841a467e6598785e8e7c29b506ff78ec7d08cdccba2be7ecc8c1c' - ) - }) - - it('Should sign transaction payload', async () => { - const intent: Intent = { - version: '1', - name: IntentName.sendTransaction, - issuedAt: 1600000000, - expiresAt: 1600000000 + 86400, - data: { - identifier: 'test-identifier', - wallet: '0xD67FC48b298B09Ed3D03403d930769C527186c4e', - network: '1', - transactions: [ - { - type: 'transaction', - to: '0x479F6a5b0C1728947318714963a583C56A78366A', - value: '39381', - data: '0x3251ba32' - }, - { - type: 'erc20send', - token: '0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48', - to: '0x7b1Bd3474D789e18e2E329E2c53F819B6E687b4A', - value: '1000' - }, - { - type: 'erc721send', - token: '0xF87E31492Faf9A91B02Ee0dEAAd50d51d56D5d4d', - to: '0x17fFA2d95b58228e1ECb0C6Ac25A6EfD20BA08E4', - id: '7', - safe: true, - data: '0x112233' - }, - { - type: 'erc1155send', - token: '0x631998e91476da5b870d741192fc5cbc55f5a52e', - to: '0x91E8aC543C5fEDf9F3Ef8b9dA1500dB84305681F', - vals: [ - { - id: '2', - amount: '5' - }, - { - id: '500', - amount: '1' - } - ], - data: '0x223344' - }, - { - type: 'contractCall', - to: '0x140d72763D1ce39Ad4E2e73EC6e8FC53E5b73B64', - data: { - abi: 'fillOrKillOrder(uint256 orderId, uint256 maxCost, address[] fees, bytes data)', - args: [ - '48774435471364917511246724398022004900255301025912680232738918790354204737320', - '1000000000000000000', - ['0x8541D65829f98f7D71A4655cCD7B2bB8494673bF'], - { - abi: 'notExpired(uint256,string)', - args: ['1600000000', 'Nov 1st, 2020'] - } - ] - } - } - ] - } - } - - const secureStoreBackend = getDefaultSecureStoreBackend() - if (!secureStoreBackend) { - throw new Error('Secure store backend not available') - } - const session = await newSECP256K1SessionFromPrivateKey( - '0xecd39e2cdadc2427255042ca7e0f86368bd7aa6e3c99470444b7d073840c1b51', - secureStoreBackend - ) - const signedIntent = await signIntent(session, intent) - - expect(signedIntent.signatures.length).to.equal(1) - expect(signedIntent.signatures[0].sessionId).to.equal(await session.sessionId()) - expect(signedIntent.signatures[0].signature).to.equal( - '0x692c5c4c969f54dc96b216e41a80b5366829754e652a5a6b499aa7b4fb3c086664cbf282568c863030c4183ae0c05a2861bfb5de1e76fea94f71796ff6cd1c9f1c' - ) - }) -}) diff --git a/old/packages/wallet/CHANGELOG.md b/old/packages/wallet/CHANGELOG.md deleted file mode 100644 index 5ece354d2..000000000 --- a/old/packages/wallet/CHANGELOG.md +++ /dev/null @@ -1,4836 +0,0 @@ -# @0xsequence/wallet - -## 2.3.8 - -### Patch Changes - -- indexer: update clients -- Updated dependencies - - @0xsequence/abi@2.3.8 - - @0xsequence/core@2.3.8 - - @0xsequence/network@2.3.8 - - @0xsequence/relayer@2.3.8 - - @0xsequence/signhub@2.3.8 - - @0xsequence/utils@2.3.8 - -## 2.3.7 - -### Patch Changes - -- Metadata updates -- Updated dependencies - - @0xsequence/abi@2.3.7 - - @0xsequence/core@2.3.7 - - @0xsequence/network@2.3.7 - - @0xsequence/relayer@2.3.7 - - @0xsequence/signhub@2.3.7 - - @0xsequence/utils@2.3.7 - -## 2.3.6 - -### Patch Changes - -- New chains -- Updated dependencies - - @0xsequence/abi@2.3.6 - - @0xsequence/core@2.3.6 - - @0xsequence/network@2.3.6 - - @0xsequence/relayer@2.3.6 - - @0xsequence/signhub@2.3.6 - - @0xsequence/utils@2.3.6 - -## 2.3.5 - -### Patch Changes - -- Add Frequency Testnet -- Updated dependencies - - @0xsequence/abi@2.3.5 - - @0xsequence/core@2.3.5 - - @0xsequence/network@2.3.5 - - @0xsequence/relayer@2.3.5 - - @0xsequence/signhub@2.3.5 - - @0xsequence/utils@2.3.5 - -## 2.3.4 - -### Patch Changes - -- metadata: exclude deprecated methods on rpc client -- Updated dependencies - - @0xsequence/abi@2.3.4 - - @0xsequence/core@2.3.4 - - @0xsequence/network@2.3.4 - - @0xsequence/relayer@2.3.4 - - @0xsequence/signhub@2.3.4 - - @0xsequence/utils@2.3.4 - -## 2.3.3 - -### Patch Changes - -- metadata: client update -- Updated dependencies - - @0xsequence/abi@2.3.3 - - @0xsequence/core@2.3.3 - - @0xsequence/network@2.3.3 - - @0xsequence/relayer@2.3.3 - - @0xsequence/signhub@2.3.3 - - @0xsequence/utils@2.3.3 - -## 2.3.2 - -### Patch Changes - -- metadata: update rpc client -- Updated dependencies - - @0xsequence/abi@2.3.2 - - @0xsequence/core@2.3.2 - - @0xsequence/network@2.3.2 - - @0xsequence/relayer@2.3.2 - - @0xsequence/signhub@2.3.2 - - @0xsequence/utils@2.3.2 - -## 2.3.1 - -### Patch Changes - -- indexer: update rpc client -- Updated dependencies - - @0xsequence/abi@2.3.1 - - @0xsequence/core@2.3.1 - - @0xsequence/network@2.3.1 - - @0xsequence/relayer@2.3.1 - - @0xsequence/signhub@2.3.1 - - @0xsequence/utils@2.3.1 - -## 2.3.0 - -### Minor Changes - -- update metadata rpc client - -### Patch Changes - -- Updated dependencies - - @0xsequence/abi@2.3.0 - - @0xsequence/core@2.3.0 - - @0xsequence/network@2.3.0 - - @0xsequence/relayer@2.3.0 - - @0xsequence/signhub@2.3.0 - - @0xsequence/utils@2.3.0 - -## 2.2.15 - -### Patch Changes - -- API updates -- Updated dependencies - - @0xsequence/abi@2.2.15 - - @0xsequence/core@2.2.15 - - @0xsequence/network@2.2.15 - - @0xsequence/relayer@2.2.15 - - @0xsequence/signhub@2.2.15 - - @0xsequence/utils@2.2.15 - -## 2.2.14 - -### Patch Changes - -- Somnia Testnet and Monad Testnet -- Updated dependencies - - @0xsequence/abi@2.2.14 - - @0xsequence/core@2.2.14 - - @0xsequence/network@2.2.14 - - @0xsequence/relayer@2.2.14 - - @0xsequence/signhub@2.2.14 - - @0xsequence/utils@2.2.14 - -## 2.2.13 - -### Patch Changes - -- Add XR1 to all networks -- Updated dependencies - - @0xsequence/abi@2.2.13 - - @0xsequence/core@2.2.13 - - @0xsequence/network@2.2.13 - - @0xsequence/relayer@2.2.13 - - @0xsequence/signhub@2.2.13 - - @0xsequence/utils@2.2.13 - -## 2.2.12 - -### Patch Changes - -- Add XR1 -- Updated dependencies - - @0xsequence/abi@2.2.12 - - @0xsequence/core@2.2.12 - - @0xsequence/network@2.2.12 - - @0xsequence/relayer@2.2.12 - - @0xsequence/signhub@2.2.12 - - @0xsequence/utils@2.2.12 - -## 2.2.11 - -### Patch Changes - -- Relayer updates -- Updated dependencies - - @0xsequence/abi@2.2.11 - - @0xsequence/core@2.2.11 - - @0xsequence/network@2.2.11 - - @0xsequence/relayer@2.2.11 - - @0xsequence/signhub@2.2.11 - - @0xsequence/utils@2.2.11 - -## 2.2.10 - -### Patch Changes - -- Etherlink support -- Updated dependencies - - @0xsequence/abi@2.2.10 - - @0xsequence/core@2.2.10 - - @0xsequence/network@2.2.10 - - @0xsequence/relayer@2.2.10 - - @0xsequence/signhub@2.2.10 - - @0xsequence/utils@2.2.10 - -## 2.2.9 - -### Patch Changes - -- Indexer gateway native token balances -- Updated dependencies - - @0xsequence/abi@2.2.9 - - @0xsequence/core@2.2.9 - - @0xsequence/network@2.2.9 - - @0xsequence/relayer@2.2.9 - - @0xsequence/signhub@2.2.9 - - @0xsequence/utils@2.2.9 - -## 2.2.8 - -### Patch Changes - -- Add Moonbeam and Moonbase Alpha -- Updated dependencies - - @0xsequence/abi@2.2.8 - - @0xsequence/core@2.2.8 - - @0xsequence/network@2.2.8 - - @0xsequence/relayer@2.2.8 - - @0xsequence/signhub@2.2.8 - - @0xsequence/utils@2.2.8 - -## 2.2.7 - -### Patch Changes - -- Update Builder package -- Updated dependencies - - @0xsequence/abi@2.2.7 - - @0xsequence/core@2.2.7 - - @0xsequence/network@2.2.7 - - @0xsequence/relayer@2.2.7 - - @0xsequence/signhub@2.2.7 - - @0xsequence/utils@2.2.7 - -## 2.2.6 - -### Patch Changes - -- Update relayer package -- Updated dependencies - - @0xsequence/abi@2.2.6 - - @0xsequence/core@2.2.6 - - @0xsequence/network@2.2.6 - - @0xsequence/relayer@2.2.6 - - @0xsequence/signhub@2.2.6 - - @0xsequence/utils@2.2.6 - -## 2.2.5 - -### Patch Changes - -- auth: fix sequence indexer gateway url -- account: immutable wallet proxy hook -- Updated dependencies -- Updated dependencies - - @0xsequence/abi@2.2.5 - - @0xsequence/core@2.2.5 - - @0xsequence/network@2.2.5 - - @0xsequence/relayer@2.2.5 - - @0xsequence/signhub@2.2.5 - - @0xsequence/utils@2.2.5 - -## 2.2.4 - -### Patch Changes - -- network: update soneium mainnet block explorer url -- waas: signTypedData intent support -- Updated dependencies -- Updated dependencies - - @0xsequence/abi@2.2.4 - - @0xsequence/core@2.2.4 - - @0xsequence/network@2.2.4 - - @0xsequence/relayer@2.2.4 - - @0xsequence/signhub@2.2.4 - - @0xsequence/utils@2.2.4 - -## 2.2.3 - -### Patch Changes - -- provider: updating initWallet to use connected network configs if they exist -- Updated dependencies - - @0xsequence/abi@2.2.3 - - @0xsequence/core@2.2.3 - - @0xsequence/network@2.2.3 - - @0xsequence/relayer@2.2.3 - - @0xsequence/signhub@2.2.3 - - @0xsequence/utils@2.2.3 - -## 2.2.2 - -### Patch Changes - -- pass projectAccessKey to relayer at all times -- Updated dependencies - - @0xsequence/abi@2.2.2 - - @0xsequence/core@2.2.2 - - @0xsequence/network@2.2.2 - - @0xsequence/relayer@2.2.2 - - @0xsequence/signhub@2.2.2 - - @0xsequence/utils@2.2.2 - -## 2.2.1 - -### Patch Changes - -- waas-ethers: sign typed data -- Updated dependencies - - @0xsequence/abi@2.2.1 - - @0xsequence/core@2.2.1 - - @0xsequence/network@2.2.1 - - @0xsequence/relayer@2.2.1 - - @0xsequence/signhub@2.2.1 - - @0xsequence/utils@2.2.1 - -## 2.2.0 - -### Minor Changes - -- indexer: gateway client -- @0xsequence/builder -- upgrade puppeteer to v23.10.3 - -### Patch Changes - -- Updated dependencies -- Updated dependencies -- Updated dependencies - - @0xsequence/abi@2.2.0 - - @0xsequence/core@2.2.0 - - @0xsequence/network@2.2.0 - - @0xsequence/relayer@2.2.0 - - @0xsequence/signhub@2.2.0 - - @0xsequence/utils@2.2.0 - -## 2.1.8 - -### Patch Changes - -- Add Soneium Mainnet -- Updated dependencies - - @0xsequence/abi@2.1.8 - - @0xsequence/core@2.1.8 - - @0xsequence/network@2.1.8 - - @0xsequence/relayer@2.1.8 - - @0xsequence/signhub@2.1.8 - - @0xsequence/utils@2.1.8 - -## 2.1.7 - -### Patch Changes - -- guard: pass project access key to guard requests -- Updated dependencies - - @0xsequence/abi@2.1.7 - - @0xsequence/core@2.1.7 - - @0xsequence/network@2.1.7 - - @0xsequence/relayer@2.1.7 - - @0xsequence/signhub@2.1.7 - - @0xsequence/utils@2.1.7 - -## 2.1.6 - -### Patch Changes - -- Add LAOS and Telos Testnet chains -- Updated dependencies - - @0xsequence/abi@2.1.6 - - @0xsequence/core@2.1.6 - - @0xsequence/network@2.1.6 - - @0xsequence/relayer@2.1.6 - - @0xsequence/signhub@2.1.6 - - @0xsequence/utils@2.1.6 - -## 2.1.5 - -### Patch Changes - -- account: save presigned configuration with reference chain id 1 -- Updated dependencies - - @0xsequence/abi@2.1.5 - - @0xsequence/core@2.1.5 - - @0xsequence/network@2.1.5 - - @0xsequence/relayer@2.1.5 - - @0xsequence/signhub@2.1.5 - - @0xsequence/utils@2.1.5 - -## 2.1.4 - -### Patch Changes - -- provider: pass projectAccessKey into MuxMessageProvider -- Updated dependencies - - @0xsequence/abi@2.1.4 - - @0xsequence/core@2.1.4 - - @0xsequence/network@2.1.4 - - @0xsequence/relayer@2.1.4 - - @0xsequence/signhub@2.1.4 - - @0xsequence/utils@2.1.4 - -## 2.1.3 - -### Patch Changes - -- waas: time drift date fix due to strange browser quirk -- Updated dependencies - - @0xsequence/abi@2.1.3 - - @0xsequence/core@2.1.3 - - @0xsequence/network@2.1.3 - - @0xsequence/relayer@2.1.3 - - @0xsequence/signhub@2.1.3 - - @0xsequence/utils@2.1.3 - -## 2.1.2 - -### Patch Changes - -- provider: export analytics correctly -- Updated dependencies - - @0xsequence/abi@2.1.2 - - @0xsequence/core@2.1.2 - - @0xsequence/network@2.1.2 - - @0xsequence/relayer@2.1.2 - - @0xsequence/signhub@2.1.2 - - @0xsequence/utils@2.1.2 - -## 2.1.1 - -### Patch Changes - -- Add LAOS chain support -- Updated dependencies - - @0xsequence/abi@2.1.1 - - @0xsequence/core@2.1.1 - - @0xsequence/network@2.1.1 - - @0xsequence/relayer@2.1.1 - - @0xsequence/signhub@2.1.1 - - @0xsequence/utils@2.1.1 - -## 2.1.0 - -### Minor Changes - -- account: forward project access key when estimating fees and sending transactions - -### Patch Changes - -- sessions: save signatures with reference chain id -- Updated dependencies -- Updated dependencies - - @0xsequence/abi@2.1.0 - - @0xsequence/core@2.1.0 - - @0xsequence/network@2.1.0 - - @0xsequence/relayer@2.1.0 - - @0xsequence/signhub@2.1.0 - - @0xsequence/utils@2.1.0 - -## 2.0.26 - -### Patch Changes - -- account: fix chain id comparison -- Updated dependencies - - @0xsequence/abi@2.0.26 - - @0xsequence/core@2.0.26 - - @0xsequence/network@2.0.26 - - @0xsequence/relayer@2.0.26 - - @0xsequence/signhub@2.0.26 - - @0xsequence/utils@2.0.26 - -## 2.0.25 - -### Patch Changes - -- skale-nebula: deploy gas limit = 10m -- Updated dependencies - - @0xsequence/abi@2.0.25 - - @0xsequence/core@2.0.25 - - @0xsequence/network@2.0.25 - - @0xsequence/relayer@2.0.25 - - @0xsequence/signhub@2.0.25 - - @0xsequence/utils@2.0.25 - -## 2.0.24 - -### Patch Changes - -- sessions: arweave: configurable gateway url -- waas: use /status to get time drift before sending any intents -- Updated dependencies -- Updated dependencies - - @0xsequence/abi@2.0.24 - - @0xsequence/core@2.0.24 - - @0xsequence/network@2.0.24 - - @0xsequence/relayer@2.0.24 - - @0xsequence/signhub@2.0.24 - - @0xsequence/utils@2.0.24 - -## 2.0.23 - -### Patch Changes - -- Add The Root Network support -- Updated dependencies - - @0xsequence/abi@2.0.23 - - @0xsequence/core@2.0.23 - - @0xsequence/network@2.0.23 - - @0xsequence/relayer@2.0.23 - - @0xsequence/signhub@2.0.23 - - @0xsequence/utils@2.0.23 - -## 2.0.22 - -### Patch Changes - -- Add SKALE Nebula Mainnet support -- Updated dependencies - - @0xsequence/abi@2.0.22 - - @0xsequence/core@2.0.22 - - @0xsequence/network@2.0.22 - - @0xsequence/relayer@2.0.22 - - @0xsequence/signhub@2.0.22 - - @0xsequence/utils@2.0.22 - -## 2.0.21 - -### Patch Changes - -- account: add publishWitnessFor -- Updated dependencies - - @0xsequence/abi@2.0.21 - - @0xsequence/core@2.0.21 - - @0xsequence/network@2.0.21 - - @0xsequence/relayer@2.0.21 - - @0xsequence/signhub@2.0.21 - - @0xsequence/utils@2.0.21 - -## 2.0.20 - -### Patch Changes - -- upgrade deps, and improve waas session status handling -- Updated dependencies - - @0xsequence/abi@2.0.20 - - @0xsequence/core@2.0.20 - - @0xsequence/network@2.0.20 - - @0xsequence/relayer@2.0.20 - - @0xsequence/signhub@2.0.20 - - @0xsequence/utils@2.0.20 - -## 2.0.19 - -### Patch Changes - -- Add Immutable zkEVM support -- Updated dependencies - - @0xsequence/abi@2.0.19 - - @0xsequence/core@2.0.19 - - @0xsequence/network@2.0.19 - - @0xsequence/relayer@2.0.19 - - @0xsequence/signhub@2.0.19 - - @0xsequence/utils@2.0.19 - -## 2.0.18 - -### Patch Changes - -- waas: new contractCall transaction type -- sessions: add arweave owner -- Updated dependencies -- Updated dependencies - - @0xsequence/abi@2.0.18 - - @0xsequence/core@2.0.18 - - @0xsequence/network@2.0.18 - - @0xsequence/relayer@2.0.18 - - @0xsequence/signhub@2.0.18 - - @0xsequence/utils@2.0.18 - -## 2.0.17 - -### Patch Changes - -- update waas auth to clear session before signIn -- Updated dependencies - - @0xsequence/abi@2.0.17 - - @0xsequence/core@2.0.17 - - @0xsequence/network@2.0.17 - - @0xsequence/relayer@2.0.17 - - @0xsequence/signhub@2.0.17 - - @0xsequence/utils@2.0.17 - -## 2.0.16 - -### Patch Changes - -- Removed Astar chains -- Updated dependencies - - @0xsequence/abi@2.0.16 - - @0xsequence/core@2.0.16 - - @0xsequence/network@2.0.16 - - @0xsequence/relayer@2.0.16 - - @0xsequence/signhub@2.0.16 - - @0xsequence/utils@2.0.16 - -## 2.0.15 - -### Patch Changes - -- indexer: update bindings with token balance additions -- Updated dependencies - - @0xsequence/abi@2.0.15 - - @0xsequence/core@2.0.15 - - @0xsequence/network@2.0.15 - - @0xsequence/relayer@2.0.15 - - @0xsequence/signhub@2.0.15 - - @0xsequence/utils@2.0.15 - -## 2.0.14 - -### Patch Changes - -- sessions: arweave config reader -- network: add b3 and apechain mainnet configs -- Updated dependencies -- Updated dependencies - - @0xsequence/abi@2.0.14 - - @0xsequence/core@2.0.14 - - @0xsequence/network@2.0.14 - - @0xsequence/relayer@2.0.14 - - @0xsequence/signhub@2.0.14 - - @0xsequence/utils@2.0.14 - -## 2.0.13 - -### Patch Changes - -- network: toy-testnet -- Updated dependencies - - @0xsequence/abi@2.0.13 - - @0xsequence/core@2.0.13 - - @0xsequence/network@2.0.13 - - @0xsequence/relayer@2.0.13 - - @0xsequence/signhub@2.0.13 - - @0xsequence/utils@2.0.13 - -## 2.0.12 - -### Patch Changes - -- api: update bindings -- Updated dependencies - - @0xsequence/abi@2.0.12 - - @0xsequence/core@2.0.12 - - @0xsequence/network@2.0.12 - - @0xsequence/relayer@2.0.12 - - @0xsequence/signhub@2.0.12 - - @0xsequence/utils@2.0.12 - -## 2.0.11 - -### Patch Changes - -- waas: intents test fix -- api: update bindings -- Updated dependencies -- Updated dependencies - - @0xsequence/abi@2.0.11 - - @0xsequence/core@2.0.11 - - @0xsequence/network@2.0.11 - - @0xsequence/relayer@2.0.11 - - @0xsequence/signhub@2.0.11 - - @0xsequence/utils@2.0.11 - -## 2.0.10 - -### Patch Changes - -- network: soneium minato testnet -- Updated dependencies - - @0xsequence/abi@2.0.10 - - @0xsequence/core@2.0.10 - - @0xsequence/network@2.0.10 - - @0xsequence/relayer@2.0.10 - - @0xsequence/signhub@2.0.10 - - @0xsequence/utils@2.0.10 - -## 2.0.9 - -### Patch Changes - -- network: fix SKALE network name -- Updated dependencies - - @0xsequence/abi@2.0.9 - - @0xsequence/core@2.0.9 - - @0xsequence/network@2.0.9 - - @0xsequence/relayer@2.0.9 - - @0xsequence/signhub@2.0.9 - - @0xsequence/utils@2.0.9 - -## 2.0.8 - -### Patch Changes - -- metadata: update bindings -- Updated dependencies - - @0xsequence/abi@2.0.8 - - @0xsequence/core@2.0.8 - - @0xsequence/network@2.0.8 - - @0xsequence/relayer@2.0.8 - - @0xsequence/signhub@2.0.8 - - @0xsequence/utils@2.0.8 - -## 2.0.7 - -### Patch Changes - -- wallet request handler fix -- Updated dependencies - - @0xsequence/abi@2.0.7 - - @0xsequence/core@2.0.7 - - @0xsequence/network@2.0.7 - - @0xsequence/relayer@2.0.7 - - @0xsequence/signhub@2.0.7 - - @0xsequence/utils@2.0.7 - -## 2.0.6 - -### Patch Changes - -- network: matic -> pol -- Updated dependencies - - @0xsequence/abi@2.0.6 - - @0xsequence/core@2.0.6 - - @0xsequence/network@2.0.6 - - @0xsequence/relayer@2.0.6 - - @0xsequence/signhub@2.0.6 - - @0xsequence/utils@2.0.6 - -## 2.0.5 - -### Patch Changes - -- provider: update databeat to 0.9.2 -- Updated dependencies - - @0xsequence/abi@2.0.5 - - @0xsequence/core@2.0.5 - - @0xsequence/network@2.0.5 - - @0xsequence/relayer@2.0.5 - - @0xsequence/signhub@2.0.5 - - @0xsequence/utils@2.0.5 - -## 2.0.4 - -### Patch Changes - -- network: add skale-nebula-testnet -- Updated dependencies - - @0xsequence/abi@2.0.4 - - @0xsequence/core@2.0.4 - - @0xsequence/network@2.0.4 - - @0xsequence/relayer@2.0.4 - - @0xsequence/signhub@2.0.4 - - @0xsequence/utils@2.0.4 - -## 2.0.3 - -### Patch Changes - -- waas: check session status in SequenceWaaS.isSignedIn() -- Updated dependencies - - @0xsequence/abi@2.0.3 - - @0xsequence/core@2.0.3 - - @0xsequence/network@2.0.3 - - @0xsequence/relayer@2.0.3 - - @0xsequence/signhub@2.0.3 - - @0xsequence/utils@2.0.3 - -## 2.0.2 - -### Patch Changes - -- sessions: property convert serialized bignumber hex value to bigint -- Updated dependencies - - @0xsequence/abi@2.0.2 - - @0xsequence/core@2.0.2 - - @0xsequence/network@2.0.2 - - @0xsequence/relayer@2.0.2 - - @0xsequence/signhub@2.0.2 - - @0xsequence/utils@2.0.2 - -## 2.0.1 - -### Patch Changes - -- waas: http signature check for authenticator requests -- provider: unwrap legacy json rpc responses -- use json replacer and reviver for bigints -- Updated dependencies -- Updated dependencies -- Updated dependencies - - @0xsequence/abi@2.0.1 - - @0xsequence/core@2.0.1 - - @0xsequence/network@2.0.1 - - @0xsequence/relayer@2.0.1 - - @0xsequence/signhub@2.0.1 - - @0xsequence/utils@2.0.1 - -## 2.0.0 - -### Major Changes - -- ethers v6 - -### Patch Changes - -- Updated dependencies - - @0xsequence/abi@2.0.0 - - @0xsequence/core@2.0.0 - - @0xsequence/network@2.0.0 - - @0xsequence/relayer@2.0.0 - - @0xsequence/signhub@2.0.0 - - @0xsequence/utils@2.0.0 - -## 1.10.15 - -### Patch Changes - -- utils: extractProjectIdFromAccessKey -- Updated dependencies - - @0xsequence/abi@1.10.15 - - @0xsequence/core@1.10.15 - - @0xsequence/network@1.10.15 - - @0xsequence/relayer@1.10.15 - - @0xsequence/signhub@1.10.15 - - @0xsequence/utils@1.10.15 - -## 1.10.14 - -### Patch Changes - -- network: add borne-testnet to allNetworks -- Updated dependencies - - @0xsequence/abi@1.10.14 - - @0xsequence/core@1.10.14 - - @0xsequence/network@1.10.14 - - @0xsequence/relayer@1.10.14 - - @0xsequence/signhub@1.10.14 - - @0xsequence/utils@1.10.14 - -## 1.10.13 - -### Patch Changes - -- network: add borne testnet -- Updated dependencies - - @0xsequence/abi@1.10.13 - - @0xsequence/core@1.10.13 - - @0xsequence/network@1.10.13 - - @0xsequence/relayer@1.10.13 - - @0xsequence/signhub@1.10.13 - - @0xsequence/utils@1.10.13 - -## 1.10.12 - -### Patch Changes - -- api: update bindings -- global/window -> globalThis -- Updated dependencies -- Updated dependencies - - @0xsequence/abi@1.10.12 - - @0xsequence/core@1.10.12 - - @0xsequence/network@1.10.12 - - @0xsequence/relayer@1.10.12 - - @0xsequence/signhub@1.10.12 - - @0xsequence/utils@1.10.12 - -## 1.10.11 - -### Patch Changes - -- waas: updated intent.gen without webrpc types, errors exported from authenticator.gen -- Updated dependencies - - @0xsequence/abi@1.10.11 - - @0xsequence/core@1.10.11 - - @0xsequence/network@1.10.11 - - @0xsequence/relayer@1.10.11 - - @0xsequence/signhub@1.10.11 - - @0xsequence/utils@1.10.11 - -## 1.10.10 - -### Patch Changes - -- metadata: update bindings with new contract collections api -- Updated dependencies - - @0xsequence/abi@1.10.10 - - @0xsequence/core@1.10.10 - - @0xsequence/network@1.10.10 - - @0xsequence/relayer@1.10.10 - - @0xsequence/signhub@1.10.10 - - @0xsequence/utils@1.10.10 - -## 1.10.9 - -### Patch Changes - -- waas minor update -- Updated dependencies - - @0xsequence/abi@1.10.9 - - @0xsequence/core@1.10.9 - - @0xsequence/network@1.10.9 - - @0xsequence/relayer@1.10.9 - - @0xsequence/signhub@1.10.9 - - @0xsequence/utils@1.10.9 - -## 1.10.8 - -### Patch Changes - -- update metadata bindings -- Updated dependencies - - @0xsequence/abi@1.10.8 - - @0xsequence/core@1.10.8 - - @0xsequence/network@1.10.8 - - @0xsequence/relayer@1.10.8 - - @0xsequence/signhub@1.10.8 - - @0xsequence/utils@1.10.8 - -## 1.10.7 - -### Patch Changes - -- minor fixes to waas client -- Updated dependencies - - @0xsequence/abi@1.10.7 - - @0xsequence/core@1.10.7 - - @0xsequence/network@1.10.7 - - @0xsequence/relayer@1.10.7 - - @0xsequence/signhub@1.10.7 - - @0xsequence/utils@1.10.7 - -## 1.10.6 - -### Patch Changes - -- metadata: update bindings -- Updated dependencies - - @0xsequence/abi@1.10.6 - - @0xsequence/core@1.10.6 - - @0xsequence/network@1.10.6 - - @0xsequence/relayer@1.10.6 - - @0xsequence/signhub@1.10.6 - - @0xsequence/utils@1.10.6 - -## 1.10.5 - -### Patch Changes - -- network: ape-chain-testnet -> apechain-testnet -- Updated dependencies - - @0xsequence/abi@1.10.5 - - @0xsequence/core@1.10.5 - - @0xsequence/network@1.10.5 - - @0xsequence/relayer@1.10.5 - - @0xsequence/signhub@1.10.5 - - @0xsequence/utils@1.10.5 - -## 1.10.4 - -### Patch Changes - -- network: add b3-sepolia, ape-chain-testnet, blast, blast-sepolia -- Updated dependencies - - @0xsequence/abi@1.10.4 - - @0xsequence/core@1.10.4 - - @0xsequence/network@1.10.4 - - @0xsequence/relayer@1.10.4 - - @0xsequence/signhub@1.10.4 - - @0xsequence/utils@1.10.4 - -## 1.10.3 - -### Patch Changes - -- typing fix -- Updated dependencies - - @0xsequence/abi@1.10.3 - - @0xsequence/core@1.10.3 - - @0xsequence/network@1.10.3 - - @0xsequence/relayer@1.10.3 - - @0xsequence/signhub@1.10.3 - - @0xsequence/utils@1.10.3 - -## 1.10.2 - -### Patch Changes - -- - waas: add getIdToken method - - indexer: update api client -- Updated dependencies - - @0xsequence/abi@1.10.2 - - @0xsequence/core@1.10.2 - - @0xsequence/network@1.10.2 - - @0xsequence/relayer@1.10.2 - - @0xsequence/signhub@1.10.2 - - @0xsequence/utils@1.10.2 - -## 1.10.1 - -### Patch Changes - -- metadata: update bindings -- Updated dependencies - - @0xsequence/abi@1.10.1 - - @0xsequence/core@1.10.1 - - @0xsequence/network@1.10.1 - - @0xsequence/relayer@1.10.1 - - @0xsequence/signhub@1.10.1 - - @0xsequence/utils@1.10.1 - -## 1.10.0 - -### Minor Changes - -- waas release v1.3.0 - -### Patch Changes - -- Updated dependencies - - @0xsequence/abi@1.10.0 - - @0xsequence/core@1.10.0 - - @0xsequence/network@1.10.0 - - @0xsequence/relayer@1.10.0 - - @0xsequence/signhub@1.10.0 - - @0xsequence/utils@1.10.0 - -## 1.9.37 - -### Patch Changes - -- network: adds nativeToken data to NetworkMetadata constants -- Updated dependencies - - @0xsequence/abi@1.9.37 - - @0xsequence/core@1.9.37 - - @0xsequence/network@1.9.37 - - @0xsequence/relayer@1.9.37 - - @0xsequence/signhub@1.9.37 - - @0xsequence/utils@1.9.37 - -## 1.9.36 - -### Patch Changes - -- guard: export client -- Updated dependencies - - @0xsequence/abi@1.9.36 - - @0xsequence/core@1.9.36 - - @0xsequence/network@1.9.36 - - @0xsequence/relayer@1.9.36 - - @0xsequence/signhub@1.9.36 - - @0xsequence/utils@1.9.36 - -## 1.9.35 - -### Patch Changes - -- guard: update bindings -- Updated dependencies - - @0xsequence/abi@1.9.35 - - @0xsequence/core@1.9.35 - - @0xsequence/network@1.9.35 - - @0xsequence/relayer@1.9.35 - - @0xsequence/signhub@1.9.35 - - @0xsequence/utils@1.9.35 - -## 1.9.34 - -### Patch Changes - -- waas: always use lowercase email -- Updated dependencies - - @0xsequence/abi@1.9.34 - - @0xsequence/core@1.9.34 - - @0xsequence/network@1.9.34 - - @0xsequence/relayer@1.9.34 - - @0xsequence/signhub@1.9.34 - - @0xsequence/utils@1.9.34 - -## 1.9.33 - -### Patch Changes - -- waas: umd build -- Updated dependencies - - @0xsequence/abi@1.9.33 - - @0xsequence/core@1.9.33 - - @0xsequence/network@1.9.33 - - @0xsequence/relayer@1.9.33 - - @0xsequence/signhub@1.9.33 - - @0xsequence/utils@1.9.33 - -## 1.9.32 - -### Patch Changes - -- indexer: update bindings -- Updated dependencies - - @0xsequence/abi@1.9.32 - - @0xsequence/core@1.9.32 - - @0xsequence/network@1.9.32 - - @0xsequence/relayer@1.9.32 - - @0xsequence/signhub@1.9.32 - - @0xsequence/utils@1.9.32 - -## 1.9.31 - -### Patch Changes - -- metadata: token directory changes -- Updated dependencies - - @0xsequence/abi@1.9.31 - - @0xsequence/core@1.9.31 - - @0xsequence/network@1.9.31 - - @0xsequence/relayer@1.9.31 - - @0xsequence/signhub@1.9.31 - - @0xsequence/utils@1.9.31 - -## 1.9.30 - -### Patch Changes - -- update -- Updated dependencies - - @0xsequence/abi@1.9.30 - - @0xsequence/core@1.9.30 - - @0xsequence/network@1.9.30 - - @0xsequence/relayer@1.9.30 - - @0xsequence/signhub@1.9.30 - - @0xsequence/utils@1.9.30 - -## 1.9.29 - -### Patch Changes - -- disable gnosis chain -- Updated dependencies - - @0xsequence/abi@1.9.29 - - @0xsequence/core@1.9.29 - - @0xsequence/network@1.9.29 - - @0xsequence/relayer@1.9.29 - - @0xsequence/signhub@1.9.29 - - @0xsequence/utils@1.9.29 - -## 1.9.28 - -### Patch Changes - -- add utils/merkletree -- Updated dependencies - - @0xsequence/abi@1.9.28 - - @0xsequence/core@1.9.28 - - @0xsequence/network@1.9.28 - - @0xsequence/relayer@1.9.28 - - @0xsequence/signhub@1.9.28 - - @0xsequence/utils@1.9.28 - -## 1.9.27 - -### Patch Changes - -- network: optimistic -> optimism -- waas: remove defaults -- api, sessions: update bindings -- Updated dependencies -- Updated dependencies -- Updated dependencies - - @0xsequence/abi@1.9.27 - - @0xsequence/core@1.9.27 - - @0xsequence/network@1.9.27 - - @0xsequence/relayer@1.9.27 - - @0xsequence/signhub@1.9.27 - - @0xsequence/utils@1.9.27 - -## 1.9.26 - -### Patch Changes - -- - add backend interfaces for pluggable interfaces - - introduce @0xsequence/react-native - - update pnpm to lockfile v9 -- Updated dependencies - - @0xsequence/abi@1.9.26 - - @0xsequence/core@1.9.26 - - @0xsequence/network@1.9.26 - - @0xsequence/relayer@1.9.26 - - @0xsequence/signhub@1.9.26 - - @0xsequence/utils@1.9.26 - -## 1.9.25 - -### Patch Changes - -- update webrpc clients with new error types -- Updated dependencies - - @0xsequence/abi@1.9.25 - - @0xsequence/core@1.9.25 - - @0xsequence/network@1.9.25 - - @0xsequence/relayer@1.9.25 - - @0xsequence/signhub@1.9.25 - - @0xsequence/utils@1.9.25 - -## 1.9.24 - -### Patch Changes - -- waas: add memoryStore backend to localStore -- Updated dependencies - - @0xsequence/abi@1.9.24 - - @0xsequence/core@1.9.24 - - @0xsequence/network@1.9.24 - - @0xsequence/relayer@1.9.24 - - @0xsequence/signhub@1.9.24 - - @0xsequence/utils@1.9.24 - -## 1.9.23 - -### Patch Changes - -- update api client bindings -- Updated dependencies - - @0xsequence/abi@1.9.23 - - @0xsequence/core@1.9.23 - - @0xsequence/network@1.9.23 - - @0xsequence/relayer@1.9.23 - - @0xsequence/signhub@1.9.23 - - @0xsequence/utils@1.9.23 - -## 1.9.22 - -### Patch Changes - -- update metadata client bindings -- Updated dependencies - - @0xsequence/abi@1.9.22 - - @0xsequence/core@1.9.22 - - @0xsequence/network@1.9.22 - - @0xsequence/relayer@1.9.22 - - @0xsequence/signhub@1.9.22 - - @0xsequence/utils@1.9.22 - -## 1.9.21 - -### Patch Changes - -- api client bindings -- Updated dependencies - - @0xsequence/abi@1.9.21 - - @0xsequence/core@1.9.21 - - @0xsequence/network@1.9.21 - - @0xsequence/relayer@1.9.21 - - @0xsequence/signhub@1.9.21 - - @0xsequence/utils@1.9.21 - -## 1.9.20 - -### Patch Changes - -- api client bindings update -- Updated dependencies - - @0xsequence/abi@1.9.20 - - @0xsequence/core@1.9.20 - - @0xsequence/network@1.9.20 - - @0xsequence/relayer@1.9.20 - - @0xsequence/signhub@1.9.20 - - @0xsequence/utils@1.9.20 - -## 1.9.19 - -### Patch Changes - -- waas update -- Updated dependencies - - @0xsequence/abi@1.9.19 - - @0xsequence/core@1.9.19 - - @0xsequence/network@1.9.19 - - @0xsequence/relayer@1.9.19 - - @0xsequence/signhub@1.9.19 - - @0xsequence/utils@1.9.19 - -## 1.9.18 - -### Patch Changes - -- provider: prohibit dangerous functions -- Updated dependencies - - @0xsequence/abi@1.9.18 - - @0xsequence/core@1.9.18 - - @0xsequence/network@1.9.18 - - @0xsequence/relayer@1.9.18 - - @0xsequence/signhub@1.9.18 - - @0xsequence/utils@1.9.18 - -## 1.9.17 - -### Patch Changes - -- network: add xr-sepolia -- Updated dependencies - - @0xsequence/network@1.9.17 - - @0xsequence/abi@1.9.17 - - @0xsequence/core@1.9.17 - - @0xsequence/relayer@1.9.17 - - @0xsequence/signhub@1.9.17 - - @0xsequence/utils@1.9.17 - -## 1.9.16 - -### Patch Changes - -- waas: sequence.feeOptions -- Updated dependencies - - @0xsequence/abi@1.9.16 - - @0xsequence/core@1.9.16 - - @0xsequence/network@1.9.16 - - @0xsequence/relayer@1.9.16 - - @0xsequence/signhub@1.9.16 - - @0xsequence/utils@1.9.16 - -## 1.9.15 - -### Patch Changes - -- metadata: collection external_link field name fix -- Updated dependencies - - @0xsequence/abi@1.9.15 - - @0xsequence/core@1.9.15 - - @0xsequence/network@1.9.15 - - @0xsequence/relayer@1.9.15 - - @0xsequence/signhub@1.9.15 - - @0xsequence/utils@1.9.15 - -## 1.9.14 - -### Patch Changes - -- network: astar-zkatana -> astar-zkyoto -- network: deprecate polygon mumbai network -- network: add xai and polygon amoy -- Updated dependencies -- Updated dependencies -- Updated dependencies - - @0xsequence/abi@1.9.14 - - @0xsequence/core@1.9.14 - - @0xsequence/network@1.9.14 - - @0xsequence/relayer@1.9.14 - - @0xsequence/signhub@1.9.14 - - @0xsequence/utils@1.9.14 - -## 1.9.13 - -### Patch Changes - -- waas: fix @0xsequence/network dependency -- Updated dependencies - - @0xsequence/abi@1.9.13 - - @0xsequence/core@1.9.13 - - @0xsequence/network@1.9.13 - - @0xsequence/relayer@1.9.13 - - @0xsequence/signhub@1.9.13 - - @0xsequence/utils@1.9.13 - -## 1.9.12 - -### Patch Changes - -- indexer: update rpc bindings -- provider: signMessage: Serialize the BytesLike or string message into hexstring before sending -- waas: SessionAuthProof -- Updated dependencies -- Updated dependencies -- Updated dependencies - - @0xsequence/abi@1.9.12 - - @0xsequence/core@1.9.12 - - @0xsequence/network@1.9.12 - - @0xsequence/relayer@1.9.12 - - @0xsequence/signhub@1.9.12 - - @0xsequence/utils@1.9.12 - -## 1.9.11 - -### Patch Changes - -- metdata, update rpc bindings -- Updated dependencies - - @0xsequence/abi@1.9.11 - - @0xsequence/core@1.9.11 - - @0xsequence/network@1.9.11 - - @0xsequence/relayer@1.9.11 - - @0xsequence/signhub@1.9.11 - - @0xsequence/utils@1.9.11 - -## 1.9.10 - -### Patch Changes - -- update metadata rpc bindings -- Updated dependencies - - @0xsequence/abi@1.9.10 - - @0xsequence/core@1.9.10 - - @0xsequence/network@1.9.10 - - @0xsequence/relayer@1.9.10 - - @0xsequence/signhub@1.9.10 - - @0xsequence/utils@1.9.10 - -## 1.9.9 - -### Patch Changes - -- metadata, add SequenceCollections rpc client -- Updated dependencies - - @0xsequence/abi@1.9.9 - - @0xsequence/core@1.9.9 - - @0xsequence/network@1.9.9 - - @0xsequence/relayer@1.9.9 - - @0xsequence/signhub@1.9.9 - - @0xsequence/utils@1.9.9 - -## 1.9.8 - -### Patch Changes - -- waas client update -- Updated dependencies - - @0xsequence/abi@1.9.8 - - @0xsequence/core@1.9.8 - - @0xsequence/network@1.9.8 - - @0xsequence/relayer@1.9.8 - - @0xsequence/signhub@1.9.8 - - @0xsequence/utils@1.9.8 - -## 1.9.7 - -### Patch Changes - -- update rpc client bindings for api, metadata and relayer -- Updated dependencies - - @0xsequence/abi@1.9.7 - - @0xsequence/core@1.9.7 - - @0xsequence/network@1.9.7 - - @0xsequence/relayer@1.9.7 - - @0xsequence/signhub@1.9.7 - - @0xsequence/utils@1.9.7 - -## 1.9.6 - -### Patch Changes - -- waas package update -- Updated dependencies - - @0xsequence/abi@1.9.6 - - @0xsequence/core@1.9.6 - - @0xsequence/network@1.9.6 - - @0xsequence/relayer@1.9.6 - - @0xsequence/signhub@1.9.6 - - @0xsequence/utils@1.9.6 - -## 1.9.5 - -### Patch Changes - -- RpcRelayer prioritize project access key -- Updated dependencies - - @0xsequence/abi@1.9.5 - - @0xsequence/core@1.9.5 - - @0xsequence/network@1.9.5 - - @0xsequence/relayer@1.9.5 - - @0xsequence/signhub@1.9.5 - - @0xsequence/utils@1.9.5 - -## 1.9.4 - -### Patch Changes - -- waas: fix network dependency -- Updated dependencies - - @0xsequence/abi@1.9.4 - - @0xsequence/core@1.9.4 - - @0xsequence/network@1.9.4 - - @0xsequence/relayer@1.9.4 - - @0xsequence/signhub@1.9.4 - - @0xsequence/utils@1.9.4 - -## 1.9.3 - -### Patch Changes - -- provider: don't append access key to RPC url if user has already provided it -- Updated dependencies - - @0xsequence/abi@1.9.3 - - @0xsequence/core@1.9.3 - - @0xsequence/network@1.9.3 - - @0xsequence/relayer@1.9.3 - - @0xsequence/signhub@1.9.3 - - @0xsequence/utils@1.9.3 - -## 1.9.2 - -### Patch Changes - -- network: add xai-sepolia -- Updated dependencies - - @0xsequence/abi@1.9.2 - - @0xsequence/core@1.9.2 - - @0xsequence/network@1.9.2 - - @0xsequence/relayer@1.9.2 - - @0xsequence/signhub@1.9.2 - - @0xsequence/utils@1.9.2 - -## 1.9.1 - -### Patch Changes - -- analytics fix -- Updated dependencies - - @0xsequence/abi@1.9.1 - - @0xsequence/core@1.9.1 - - @0xsequence/network@1.9.1 - - @0xsequence/relayer@1.9.1 - - @0xsequence/signhub@1.9.1 - - @0xsequence/utils@1.9.1 - -## 1.9.0 - -### Minor Changes - -- waas release - -### Patch Changes - -- Updated dependencies - - @0xsequence/abi@1.9.0 - - @0xsequence/core@1.9.0 - - @0xsequence/network@1.9.0 - - @0xsequence/relayer@1.9.0 - - @0xsequence/signhub@1.9.0 - - @0xsequence/utils@1.9.0 - -## 1.8.8 - -### Patch Changes - -- update metadata bindings -- Updated dependencies - - @0xsequence/abi@1.8.8 - - @0xsequence/core@1.8.8 - - @0xsequence/network@1.8.8 - - @0xsequence/relayer@1.8.8 - - @0xsequence/signhub@1.8.8 - - @0xsequence/utils@1.8.8 - -## 1.8.7 - -### Patch Changes - -- provider: update databeat to 0.9.1 -- Updated dependencies - - @0xsequence/abi@1.8.7 - - @0xsequence/core@1.8.7 - - @0xsequence/network@1.8.7 - - @0xsequence/relayer@1.8.7 - - @0xsequence/signhub@1.8.7 - - @0xsequence/utils@1.8.7 - -## 1.8.6 - -### Patch Changes - -- guard: SignedOwnershipProof -- Updated dependencies - - @0xsequence/abi@1.8.6 - - @0xsequence/core@1.8.6 - - @0xsequence/network@1.8.6 - - @0xsequence/relayer@1.8.6 - - @0xsequence/signhub@1.8.6 - - @0xsequence/utils@1.8.6 - -## 1.8.5 - -### Patch Changes - -- guard: signOwnershipProof and isSignedOwnershipProof -- Updated dependencies - - @0xsequence/abi@1.8.5 - - @0xsequence/core@1.8.5 - - @0xsequence/network@1.8.5 - - @0xsequence/relayer@1.8.5 - - @0xsequence/signhub@1.8.5 - - @0xsequence/utils@1.8.5 - -## 1.8.4 - -### Patch Changes - -- network: add homeverse to networks list -- Updated dependencies - - @0xsequence/abi@1.8.4 - - @0xsequence/core@1.8.4 - - @0xsequence/network@1.8.4 - - @0xsequence/relayer@1.8.4 - - @0xsequence/signhub@1.8.4 - - @0xsequence/utils@1.8.4 - -## 1.8.3 - -### Patch Changes - -- api: introduce basic linked wallet support -- Updated dependencies - - @0xsequence/abi@1.8.3 - - @0xsequence/core@1.8.3 - - @0xsequence/network@1.8.3 - - @0xsequence/relayer@1.8.3 - - @0xsequence/signhub@1.8.3 - - @0xsequence/utils@1.8.3 - -## 1.8.2 - -### Patch Changes - -- provider: don't initialize analytics unless explicitly requested -- Updated dependencies - - @0xsequence/abi@1.8.2 - - @0xsequence/core@1.8.2 - - @0xsequence/network@1.8.2 - - @0xsequence/relayer@1.8.2 - - @0xsequence/signhub@1.8.2 - - @0xsequence/utils@1.8.2 - -## 1.8.1 - -### Patch Changes - -- update to analytics provider -- Updated dependencies - - @0xsequence/abi@1.8.1 - - @0xsequence/core@1.8.1 - - @0xsequence/network@1.8.1 - - @0xsequence/relayer@1.8.1 - - @0xsequence/signhub@1.8.1 - - @0xsequence/utils@1.8.1 - -## 1.8.0 - -### Minor Changes - -- provider: project analytics - -### Patch Changes - -- Updated dependencies - - @0xsequence/abi@1.8.0 - - @0xsequence/core@1.8.0 - - @0xsequence/network@1.8.0 - - @0xsequence/relayer@1.8.0 - - @0xsequence/signhub@1.8.0 - - @0xsequence/utils@1.8.0 - -## 1.7.2 - -### Patch Changes - -- 0xsequence: ChainId should not be exported as a type -- account, wallet: fix nonce selection -- Updated dependencies -- Updated dependencies - - @0xsequence/abi@1.7.2 - - @0xsequence/core@1.7.2 - - @0xsequence/network@1.7.2 - - @0xsequence/relayer@1.7.2 - - @0xsequence/signhub@1.7.2 - - @0xsequence/utils@1.7.2 - -## 1.7.1 - -### Patch Changes - -- network: add missing avalanche logoURI -- Updated dependencies - - @0xsequence/abi@1.7.1 - - @0xsequence/core@1.7.1 - - @0xsequence/network@1.7.1 - - @0xsequence/relayer@1.7.1 - - @0xsequence/signhub@1.7.1 - - @0xsequence/utils@1.7.1 - -## 1.7.0 - -### Minor Changes - -- provider: projectAccessKey is now required - -### Patch Changes - -- network: add NetworkMetadata.logoURI property for all networks -- Updated dependencies -- Updated dependencies - - @0xsequence/abi@1.7.0 - - @0xsequence/core@1.7.0 - - @0xsequence/network@1.7.0 - - @0xsequence/relayer@1.7.0 - - @0xsequence/signhub@1.7.0 - - @0xsequence/utils@1.7.0 - -## 1.6.3 - -### Patch Changes - -- network list update -- Updated dependencies - - @0xsequence/abi@1.6.3 - - @0xsequence/core@1.6.3 - - @0xsequence/network@1.6.3 - - @0xsequence/relayer@1.6.3 - - @0xsequence/signhub@1.6.3 - - @0xsequence/utils@1.6.3 - -## 1.6.2 - -### Patch Changes - -- auth: projectAccessKey option -- wallet: use 12 bytes for random space -- Updated dependencies -- Updated dependencies - - @0xsequence/abi@1.6.2 - - @0xsequence/core@1.6.2 - - @0xsequence/network@1.6.2 - - @0xsequence/relayer@1.6.2 - - @0xsequence/signhub@1.6.2 - - @0xsequence/utils@1.6.2 - -## 1.6.1 - -### Patch Changes - -- core: add simple config from subdigest support -- core: fix encode tree with subdigest -- account: implement buildOnChainSignature on Account -- Updated dependencies -- Updated dependencies -- Updated dependencies - - @0xsequence/abi@1.6.1 - - @0xsequence/core@1.6.1 - - @0xsequence/network@1.6.1 - - @0xsequence/relayer@1.6.1 - - @0xsequence/signhub@1.6.1 - - @0xsequence/utils@1.6.1 - -## 1.6.0 - -### Minor Changes - -- account, wallet: parallel transactions by default - -### Patch Changes - -- provider: emit disconnect on sign out -- Updated dependencies -- Updated dependencies - - @0xsequence/abi@1.6.0 - - @0xsequence/core@1.6.0 - - @0xsequence/network@1.6.0 - - @0xsequence/relayer@1.6.0 - - @0xsequence/signhub@1.6.0 - - @0xsequence/utils@1.6.0 - -## 1.5.0 - -### Minor Changes - -- signhub: add 'signing' signer status - -### Patch Changes - -- auth: Session.open: onAccountAddress callback -- account: allow empty transaction bundles -- Updated dependencies -- Updated dependencies -- Updated dependencies - - @0xsequence/abi@1.5.0 - - @0xsequence/core@1.5.0 - - @0xsequence/network@1.5.0 - - @0xsequence/relayer@1.5.0 - - @0xsequence/signhub@1.5.0 - - @0xsequence/utils@1.5.0 - -## 1.4.9 - -### Patch Changes - -- rename SequenceMetadataClient to SequenceMetadata -- Updated dependencies - - @0xsequence/abi@1.4.9 - - @0xsequence/core@1.4.9 - - @0xsequence/network@1.4.9 - - @0xsequence/relayer@1.4.9 - - @0xsequence/signhub@1.4.9 - - @0xsequence/utils@1.4.9 - -## 1.4.8 - -### Patch Changes - -- account: Account.getSigners -- Updated dependencies - - @0xsequence/abi@1.4.8 - - @0xsequence/core@1.4.8 - - @0xsequence/network@1.4.8 - - @0xsequence/relayer@1.4.8 - - @0xsequence/signhub@1.4.8 - - @0xsequence/utils@1.4.8 - -## 1.4.7 - -### Patch Changes - -- update indexer client bindings -- Updated dependencies - - @0xsequence/abi@1.4.7 - - @0xsequence/core@1.4.7 - - @0xsequence/network@1.4.7 - - @0xsequence/relayer@1.4.7 - - @0xsequence/signhub@1.4.7 - - @0xsequence/utils@1.4.7 - -## 1.4.6 - -### Patch Changes - -- - add sepolia networks, mark goerli as deprecated - - update indexer client bindings -- Updated dependencies - - @0xsequence/abi@1.4.6 - - @0xsequence/core@1.4.6 - - @0xsequence/network@1.4.6 - - @0xsequence/relayer@1.4.6 - - @0xsequence/signhub@1.4.6 - - @0xsequence/utils@1.4.6 - -## 1.4.5 - -### Patch Changes - -- indexer/metadata: update client bindings -- auth: selectWallet with new address -- Updated dependencies -- Updated dependencies - - @0xsequence/abi@1.4.5 - - @0xsequence/core@1.4.5 - - @0xsequence/network@1.4.5 - - @0xsequence/relayer@1.4.5 - - @0xsequence/signhub@1.4.5 - - @0xsequence/utils@1.4.5 - -## 1.4.4 - -### Patch Changes - -- indexer: update bindings -- auth: handle jwt expiry -- Updated dependencies -- Updated dependencies - - @0xsequence/abi@1.4.4 - - @0xsequence/core@1.4.4 - - @0xsequence/network@1.4.4 - - @0xsequence/relayer@1.4.4 - - @0xsequence/signhub@1.4.4 - - @0xsequence/utils@1.4.4 - -## 1.4.3 - -### Patch Changes - -- guard: return active status from GuardSigner.getAuthMethods -- Updated dependencies - - @0xsequence/abi@1.4.3 - - @0xsequence/core@1.4.3 - - @0xsequence/network@1.4.3 - - @0xsequence/relayer@1.4.3 - - @0xsequence/signhub@1.4.3 - - @0xsequence/utils@1.4.3 - -## 1.4.2 - -### Patch Changes - -- guard: update bindings -- Updated dependencies - - @0xsequence/abi@1.4.2 - - @0xsequence/core@1.4.2 - - @0xsequence/network@1.4.2 - - @0xsequence/relayer@1.4.2 - - @0xsequence/signhub@1.4.2 - - @0xsequence/utils@1.4.2 - -## 1.4.1 - -### Patch Changes - -- network: remove unused networks -- signhub: orchestrator interface -- guard: auth methods interface -- guard: update bindings for pin and totp -- guard: no more retry logic -- Updated dependencies -- Updated dependencies -- Updated dependencies -- Updated dependencies -- Updated dependencies - - @0xsequence/abi@1.4.1 - - @0xsequence/core@1.4.1 - - @0xsequence/network@1.4.1 - - @0xsequence/relayer@1.4.1 - - @0xsequence/signhub@1.4.1 - - @0xsequence/utils@1.4.1 - -## 1.4.0 - -### Minor Changes - -- project access key support - -### Patch Changes - -- Updated dependencies - - @0xsequence/abi@1.4.0 - - @0xsequence/core@1.4.0 - - @0xsequence/network@1.4.0 - - @0xsequence/relayer@1.4.0 - - @0xsequence/signhub@1.4.0 - - @0xsequence/utils@1.4.0 - -## 1.3.0 - -### Minor Changes - -- signhub: account children - -### Patch Changes - -- guard: do not throw when building deploy transaction -- network: snowtrace.io -> subnets.avax.network/c-chain -- Updated dependencies -- Updated dependencies -- Updated dependencies - - @0xsequence/abi@1.3.0 - - @0xsequence/core@1.3.0 - - @0xsequence/network@1.3.0 - - @0xsequence/relayer@1.3.0 - - @0xsequence/signhub@1.3.0 - - @0xsequence/utils@1.3.0 - -## 1.2.9 - -### Patch Changes - -- account: AccountSigner.sendTransaction simulateForFeeOptions -- relayer: update bindings -- Updated dependencies -- Updated dependencies - - @0xsequence/abi@1.2.9 - - @0xsequence/core@1.2.9 - - @0xsequence/network@1.2.9 - - @0xsequence/relayer@1.2.9 - - @0xsequence/signhub@1.2.9 - - @0xsequence/utils@1.2.9 - -## 1.2.8 - -### Patch Changes - -- rename X-Sequence-Token-Key header to X-Access-Key -- Updated dependencies - - @0xsequence/abi@1.2.8 - - @0xsequence/core@1.2.8 - - @0xsequence/network@1.2.8 - - @0xsequence/relayer@1.2.8 - - @0xsequence/signhub@1.2.8 - - @0xsequence/utils@1.2.8 - -## 1.2.7 - -### Patch Changes - -- add x-sequence-token-key to clients -- Updated dependencies - - @0xsequence/abi@1.2.7 - - @0xsequence/core@1.2.7 - - @0xsequence/network@1.2.7 - - @0xsequence/relayer@1.2.7 - - @0xsequence/signhub@1.2.7 - - @0xsequence/utils@1.2.7 - -## 1.2.6 - -### Patch Changes - -- Fix bind multicall provider -- Updated dependencies - - @0xsequence/abi@1.2.6 - - @0xsequence/core@1.2.6 - - @0xsequence/network@1.2.6 - - @0xsequence/relayer@1.2.6 - - @0xsequence/signhub@1.2.6 - - @0xsequence/utils@1.2.6 - -## 1.2.5 - -### Patch Changes - -- Multicall default configuration fixes -- Updated dependencies - - @0xsequence/abi@1.2.5 - - @0xsequence/core@1.2.5 - - @0xsequence/network@1.2.5 - - @0xsequence/relayer@1.2.5 - - @0xsequence/signhub@1.2.5 - - @0xsequence/utils@1.2.5 - -## 1.2.4 - -### Patch Changes - -- provider: Adding missing payment provider types to PaymentProviderOption -- provider: WalletRequestHandler.notifyChainChanged -- Updated dependencies -- Updated dependencies - - @0xsequence/abi@1.2.4 - - @0xsequence/core@1.2.4 - - @0xsequence/network@1.2.4 - - @0xsequence/relayer@1.2.4 - - @0xsequence/signhub@1.2.4 - - @0xsequence/utils@1.2.4 - -## 1.2.3 - -### Patch Changes - -- auth, provider: connect to accept optional authorizeNonce -- Updated dependencies - - @0xsequence/abi@1.2.3 - - @0xsequence/core@1.2.3 - - @0xsequence/network@1.2.3 - - @0xsequence/relayer@1.2.3 - - @0xsequence/signhub@1.2.3 - - @0xsequence/utils@1.2.3 - -## 1.2.2 - -### Patch Changes - -- provider: allow createContract calls -- core: check for explicit zero address in contract deployments -- Updated dependencies -- Updated dependencies - - @0xsequence/abi@1.2.2 - - @0xsequence/core@1.2.2 - - @0xsequence/network@1.2.2 - - @0xsequence/relayer@1.2.2 - - @0xsequence/signhub@1.2.2 - - @0xsequence/utils@1.2.2 - -## 1.2.1 - -### Patch Changes - -- auth: use sequence api chain id as reference chain id if available -- Updated dependencies - - @0xsequence/abi@1.2.1 - - @0xsequence/core@1.2.1 - - @0xsequence/network@1.2.1 - - @0xsequence/relayer@1.2.1 - - @0xsequence/signhub@1.2.1 - - @0xsequence/utils@1.2.1 - -## 1.2.0 - -### Minor Changes - -- split services from session, better local support - -### Patch Changes - -- Updated dependencies - - @0xsequence/abi@1.2.0 - - @0xsequence/core@1.2.0 - - @0xsequence/network@1.2.0 - - @0xsequence/relayer@1.2.0 - - @0xsequence/signhub@1.2.0 - - @0xsequence/utils@1.2.0 - -## 1.1.15 - -### Patch Changes - -- guard: remove error filtering -- Updated dependencies - - @0xsequence/abi@1.1.15 - - @0xsequence/core@1.1.15 - - @0xsequence/network@1.1.15 - - @0xsequence/relayer@1.1.15 - - @0xsequence/signhub@1.1.15 - - @0xsequence/utils@1.1.15 - -## 1.1.14 - -### Patch Changes - -- guard: add GuardSigner.onError -- Updated dependencies - - @0xsequence/abi@1.1.14 - - @0xsequence/core@1.1.14 - - @0xsequence/network@1.1.14 - - @0xsequence/relayer@1.1.14 - - @0xsequence/signhub@1.1.14 - - @0xsequence/utils@1.1.14 - -## 1.1.13 - -### Patch Changes - -- provider: pass client version with connect options -- provider: removing large from BannerSize -- Updated dependencies -- Updated dependencies - - @0xsequence/abi@1.1.13 - - @0xsequence/core@1.1.13 - - @0xsequence/network@1.1.13 - - @0xsequence/relayer@1.1.13 - - @0xsequence/signhub@1.1.13 - - @0xsequence/utils@1.1.13 - -## 1.1.12 - -### Patch Changes - -- provider: adding bannerSize to ConnectOptions -- Updated dependencies - - @0xsequence/abi@1.1.12 - - @0xsequence/core@1.1.12 - - @0xsequence/network@1.1.12 - - @0xsequence/relayer@1.1.12 - - @0xsequence/signhub@1.1.12 - - @0xsequence/utils@1.1.12 - -## 1.1.11 - -### Patch Changes - -- add homeverse configs -- Updated dependencies - - @0xsequence/abi@1.1.11 - - @0xsequence/core@1.1.11 - - @0xsequence/network@1.1.11 - - @0xsequence/relayer@1.1.11 - - @0xsequence/signhub@1.1.11 - - @0xsequence/utils@1.1.11 - -## 1.1.10 - -### Patch Changes - -- handle default EIP6492 on send -- Updated dependencies - - @0xsequence/abi@1.1.10 - - @0xsequence/core@1.1.10 - - @0xsequence/network@1.1.10 - - @0xsequence/relayer@1.1.10 - - @0xsequence/signhub@1.1.10 - - @0xsequence/utils@1.1.10 - -## 1.1.9 - -### Patch Changes - -- Custom default EIP6492 on client -- Updated dependencies - - @0xsequence/abi@1.1.9 - - @0xsequence/core@1.1.9 - - @0xsequence/network@1.1.9 - - @0xsequence/relayer@1.1.9 - - @0xsequence/signhub@1.1.9 - - @0xsequence/utils@1.1.9 - -## 1.1.8 - -### Patch Changes - -- metadata: searchMetadata: add types filter -- Updated dependencies - - @0xsequence/abi@1.1.8 - - @0xsequence/core@1.1.8 - - @0xsequence/network@1.1.8 - - @0xsequence/relayer@1.1.8 - - @0xsequence/signhub@1.1.8 - - @0xsequence/utils@1.1.8 - -## 1.1.7 - -### Patch Changes - -- adding signInWith connect settings option to allow dapps to automatically login their users with a certain provider optimizing the normal authentication flow -- Updated dependencies - - @0xsequence/abi@1.1.7 - - @0xsequence/core@1.1.7 - - @0xsequence/network@1.1.7 - - @0xsequence/relayer@1.1.7 - - @0xsequence/signhub@1.1.7 - - @0xsequence/utils@1.1.7 - -## 1.1.6 - -### Patch Changes - -- metadata: searchMetadata: add chainID and excludeTokenMetadata filters -- Updated dependencies - - @0xsequence/abi@1.1.6 - - @0xsequence/core@1.1.6 - - @0xsequence/network@1.1.6 - - @0xsequence/relayer@1.1.6 - - @0xsequence/signhub@1.1.6 - - @0xsequence/utils@1.1.6 - -## 1.1.5 - -### Patch Changes - -- account: re-compute meta-transaction id for wallet deployment transactions -- Updated dependencies - - @0xsequence/abi@1.1.5 - - @0xsequence/core@1.1.5 - - @0xsequence/network@1.1.5 - - @0xsequence/relayer@1.1.5 - - @0xsequence/signhub@1.1.5 - - @0xsequence/utils@1.1.5 - -## 1.1.4 - -### Patch Changes - -- network: rename base-mainnet to base -- provider: override isDefaultChain with ConnectOptions.networkId if provided -- Updated dependencies -- Updated dependencies - - @0xsequence/abi@1.1.4 - - @0xsequence/core@1.1.4 - - @0xsequence/network@1.1.4 - - @0xsequence/relayer@1.1.4 - - @0xsequence/signhub@1.1.4 - - @0xsequence/utils@1.1.4 - -## 1.1.3 - -### Patch Changes - -- provider: use network id from transport session -- provider: sign authorization using ConnectOptions.networkId if provided -- Updated dependencies -- Updated dependencies - - @0xsequence/abi@1.1.3 - - @0xsequence/core@1.1.3 - - @0xsequence/network@1.1.3 - - @0xsequence/relayer@1.1.3 - - @0xsequence/signhub@1.1.3 - - @0xsequence/utils@1.1.3 - -## 1.1.2 - -### Patch Changes - -- provider: jsonrpc chain id fixes -- Updated dependencies - - @0xsequence/abi@1.1.2 - - @0xsequence/core@1.1.2 - - @0xsequence/network@1.1.2 - - @0xsequence/relayer@1.1.2 - - @0xsequence/signhub@1.1.2 - - @0xsequence/utils@1.1.2 - -## 1.1.1 - -### Patch Changes - -- network: add base mainnet and sepolia -- provider: reject toxic transaction requests -- Updated dependencies -- Updated dependencies - - @0xsequence/abi@1.1.1 - - @0xsequence/core@1.1.1 - - @0xsequence/network@1.1.1 - - @0xsequence/relayer@1.1.1 - - @0xsequence/signhub@1.1.1 - - @0xsequence/utils@1.1.1 - -## 1.1.0 - -### Minor Changes - -- Refactor dapp facing provider - -### Patch Changes - -- Updated dependencies - - @0xsequence/abi@1.1.0 - - @0xsequence/core@1.1.0 - - @0xsequence/network@1.1.0 - - @0xsequence/relayer@1.1.0 - - @0xsequence/signhub@1.1.0 - - @0xsequence/utils@1.1.0 - -## 1.0.5 - -### Patch Changes - -- network: export network constants -- guard: use the correct global for fetch -- network: nova-explorer.arbitrum.io -> nova.arbiscan.io -- Updated dependencies -- Updated dependencies -- Updated dependencies - - @0xsequence/abi@1.0.5 - - @0xsequence/core@1.0.5 - - @0xsequence/network@1.0.5 - - @0xsequence/relayer@1.0.5 - - @0xsequence/signhub@1.0.5 - - @0xsequence/utils@1.0.5 - -## 1.0.4 - -### Patch Changes - -- provider: accept name or number for networkId -- Updated dependencies - - @0xsequence/abi@1.0.4 - - @0xsequence/core@1.0.4 - - @0xsequence/guard@1.0.4 - - @0xsequence/network@1.0.4 - - @0xsequence/relayer@1.0.4 - - @0xsequence/signhub@1.0.4 - - @0xsequence/utils@1.0.4 - -## 1.0.3 - -### Patch Changes - -- Simpler isValidSignature helpers -- Updated dependencies - - @0xsequence/abi@1.0.3 - - @0xsequence/core@1.0.3 - - @0xsequence/guard@1.0.3 - - @0xsequence/network@1.0.3 - - @0xsequence/relayer@1.0.3 - - @0xsequence/signhub@1.0.3 - - @0xsequence/utils@1.0.3 - -## 1.0.2 - -### Patch Changes - -- add extra signature validation utils methods -- Updated dependencies - - @0xsequence/abi@1.0.2 - - @0xsequence/core@1.0.2 - - @0xsequence/guard@1.0.2 - - @0xsequence/network@1.0.2 - - @0xsequence/relayer@1.0.2 - - @0xsequence/signhub@1.0.2 - - @0xsequence/utils@1.0.2 - -## 1.0.1 - -### Patch Changes - -- add homeverse testnet -- Updated dependencies - - @0xsequence/abi@1.0.1 - - @0xsequence/core@1.0.1 - - @0xsequence/guard@1.0.1 - - @0xsequence/network@1.0.1 - - @0xsequence/relayer@1.0.1 - - @0xsequence/signhub@1.0.1 - - @0xsequence/utils@1.0.1 - -## 1.0.0 - -### Major Changes - -- https://sequence.xyz/blog/sequence-wallet-light-state-sync-full-merkle-wallets - -### Patch Changes - -- Updated dependencies - - @0xsequence/abi@1.0.0 - - @0xsequence/core@1.0.0 - - @0xsequence/guard@1.0.0 - - @0xsequence/network@1.0.0 - - @0xsequence/relayer@1.0.0 - - @0xsequence/signhub@1.0.0 - - @0xsequence/utils@1.0.0 - -## 0.43.34 - -### Patch Changes - -- auth: no jwt for indexer -- Updated dependencies - - @0xsequence/abi@0.43.34 - - @0xsequence/config@0.43.34 - - @0xsequence/guard@0.43.34 - - @0xsequence/network@0.43.34 - - @0xsequence/relayer@0.43.34 - - @0xsequence/transactions@0.43.34 - - @0xsequence/utils@0.43.34 - -## 0.43.33 - -### Patch Changes - -- Adding onConnectOptionsChange handler to WalletRequestHandler -- Updated dependencies - - @0xsequence/abi@0.43.33 - - @0xsequence/config@0.43.33 - - @0xsequence/guard@0.43.33 - - @0xsequence/network@0.43.33 - - @0xsequence/relayer@0.43.33 - - @0xsequence/transactions@0.43.33 - - @0xsequence/utils@0.43.33 - -## 0.43.32 - -### Patch Changes - -- add Base Goerli network -- Updated dependencies - - @0xsequence/abi@0.43.32 - - @0xsequence/config@0.43.32 - - @0xsequence/guard@0.43.32 - - @0xsequence/network@0.43.32 - - @0xsequence/relayer@0.43.32 - - @0xsequence/transactions@0.43.32 - - @0xsequence/utils@0.43.32 - -## 0.43.31 - -### Patch Changes - -- remove AuxDataProvider, add promptSignInConnect -- Updated dependencies - - @0xsequence/abi@0.43.31 - - @0xsequence/config@0.43.31 - - @0xsequence/guard@0.43.31 - - @0xsequence/network@0.43.31 - - @0xsequence/relayer@0.43.31 - - @0xsequence/transactions@0.43.31 - - @0xsequence/utils@0.43.31 - -## 0.43.30 - -### Patch Changes - -- add arbitrum goerli testnet -- Updated dependencies - - @0xsequence/abi@0.43.30 - - @0xsequence/config@0.43.30 - - @0xsequence/guard@0.43.30 - - @0xsequence/network@0.43.30 - - @0xsequence/relayer@0.43.30 - - @0xsequence/transactions@0.43.30 - - @0xsequence/utils@0.43.30 - -## 0.43.29 - -### Patch Changes - -- provider: check availability of window object -- Updated dependencies - - @0xsequence/abi@0.43.29 - - @0xsequence/config@0.43.29 - - @0xsequence/guard@0.43.29 - - @0xsequence/network@0.43.29 - - @0xsequence/relayer@0.43.29 - - @0xsequence/transactions@0.43.29 - - @0xsequence/utils@0.43.29 - -## 0.43.28 - -### Patch Changes - -- update api bindings -- Updated dependencies - - @0xsequence/abi@0.43.28 - - @0xsequence/config@0.43.28 - - @0xsequence/guard@0.43.28 - - @0xsequence/network@0.43.28 - - @0xsequence/relayer@0.43.28 - - @0xsequence/transactions@0.43.28 - - @0xsequence/utils@0.43.28 - -## 0.43.27 - -### Patch Changes - -- Add rpc is sequence method -- Updated dependencies - - @0xsequence/abi@0.43.27 - - @0xsequence/config@0.43.27 - - @0xsequence/guard@0.43.27 - - @0xsequence/network@0.43.27 - - @0xsequence/relayer@0.43.27 - - @0xsequence/transactions@0.43.27 - - @0xsequence/utils@0.43.27 - -## 0.43.26 - -### Patch Changes - -- add zkevm url to enum -- Updated dependencies - - @0xsequence/abi@0.43.26 - - @0xsequence/config@0.43.26 - - @0xsequence/guard@0.43.26 - - @0xsequence/network@0.43.26 - - @0xsequence/relayer@0.43.26 - - @0xsequence/transactions@0.43.26 - - @0xsequence/utils@0.43.26 - -## 0.43.25 - -### Patch Changes - -- added polygon zkevm to mainnet networks -- Updated dependencies - - @0xsequence/abi@0.43.25 - - @0xsequence/config@0.43.25 - - @0xsequence/guard@0.43.25 - - @0xsequence/network@0.43.25 - - @0xsequence/relayer@0.43.25 - - @0xsequence/transactions@0.43.25 - - @0xsequence/utils@0.43.25 - -## 0.43.24 - -### Patch Changes - -- name change from zkevm to polygon-zkevm -- Updated dependencies - - @0xsequence/abi@0.43.24 - - @0xsequence/config@0.43.24 - - @0xsequence/guard@0.43.24 - - @0xsequence/network@0.43.24 - - @0xsequence/relayer@0.43.24 - - @0xsequence/transactions@0.43.24 - - @0xsequence/utils@0.43.24 - -## 0.43.23 - -### Patch Changes - -- update zkEVM name to Polygon zkEVM -- Updated dependencies - - @0xsequence/abi@0.43.23 - - @0xsequence/config@0.43.23 - - @0xsequence/guard@0.43.23 - - @0xsequence/network@0.43.23 - - @0xsequence/relayer@0.43.23 - - @0xsequence/transactions@0.43.23 - - @0xsequence/utils@0.43.23 - -## 0.43.22 - -### Patch Changes - -- add zkevm chain -- Updated dependencies - - @0xsequence/abi@0.43.22 - - @0xsequence/config@0.43.22 - - @0xsequence/guard@0.43.22 - - @0xsequence/network@0.43.22 - - @0xsequence/relayer@0.43.22 - - @0xsequence/transactions@0.43.22 - - @0xsequence/utils@0.43.22 - -## 0.43.21 - -### Patch Changes - -- api: update client bindings -- Updated dependencies - - @0xsequence/abi@0.43.21 - - @0xsequence/config@0.43.21 - - @0xsequence/guard@0.43.21 - - @0xsequence/network@0.43.21 - - @0xsequence/relayer@0.43.21 - - @0xsequence/transactions@0.43.21 - - @0xsequence/utils@0.43.21 - -## 0.43.20 - -### Patch Changes - -- indexer: update bindings -- Updated dependencies - - @0xsequence/abi@0.43.20 - - @0xsequence/config@0.43.20 - - @0xsequence/guard@0.43.20 - - @0xsequence/network@0.43.20 - - @0xsequence/relayer@0.43.20 - - @0xsequence/transactions@0.43.20 - - @0xsequence/utils@0.43.20 - -## 0.43.19 - -### Patch Changes - -- session proof update -- Updated dependencies - - @0xsequence/abi@0.43.19 - - @0xsequence/config@0.43.19 - - @0xsequence/guard@0.43.19 - - @0xsequence/network@0.43.19 - - @0xsequence/relayer@0.43.19 - - @0xsequence/transactions@0.43.19 - - @0xsequence/utils@0.43.19 - -## 0.43.18 - -### Patch Changes - -- rpc client global check, hardening -- Updated dependencies - - @0xsequence/abi@0.43.18 - - @0xsequence/config@0.43.18 - - @0xsequence/guard@0.43.18 - - @0xsequence/network@0.43.18 - - @0xsequence/relayer@0.43.18 - - @0xsequence/transactions@0.43.18 - - @0xsequence/utils@0.43.18 - -## 0.43.17 - -### Patch Changes - -- rpc clients, check of 'global' is defined -- Updated dependencies - - @0xsequence/abi@0.43.17 - - @0xsequence/config@0.43.17 - - @0xsequence/guard@0.43.17 - - @0xsequence/network@0.43.17 - - @0xsequence/relayer@0.43.17 - - @0xsequence/transactions@0.43.17 - - @0xsequence/utils@0.43.17 - -## 0.43.16 - -### Patch Changes - -- ethers peerDep to v5, update rpc client global use -- Updated dependencies - - @0xsequence/abi@0.43.16 - - @0xsequence/config@0.43.16 - - @0xsequence/guard@0.43.16 - - @0xsequence/network@0.43.16 - - @0xsequence/relayer@0.43.16 - - @0xsequence/transactions@0.43.16 - - @0xsequence/utils@0.43.16 - -## 0.43.15 - -### Patch Changes - -- - provider: expand receiver type on some util methods -- Updated dependencies - - @0xsequence/abi@0.43.15 - - @0xsequence/config@0.43.15 - - @0xsequence/guard@0.43.15 - - @0xsequence/network@0.43.15 - - @0xsequence/relayer@0.43.15 - - @0xsequence/transactions@0.43.15 - - @0xsequence/utils@0.43.15 - -## 0.43.14 - -### Patch Changes - -- bump -- Updated dependencies - - @0xsequence/abi@0.43.14 - - @0xsequence/config@0.43.14 - - @0xsequence/guard@0.43.14 - - @0xsequence/network@0.43.14 - - @0xsequence/relayer@0.43.14 - - @0xsequence/transactions@0.43.14 - - @0xsequence/utils@0.43.14 - -## 0.43.13 - -### Patch Changes - -- update rpc bindings -- Updated dependencies - - @0xsequence/abi@0.43.13 - - @0xsequence/config@0.43.13 - - @0xsequence/guard@0.43.13 - - @0xsequence/network@0.43.13 - - @0xsequence/relayer@0.43.13 - - @0xsequence/transactions@0.43.13 - - @0xsequence/utils@0.43.13 - -## 0.43.12 - -### Patch Changes - -- provider: single wallet init, and add new unregisterWallet() method -- Updated dependencies - - @0xsequence/abi@0.43.12 - - @0xsequence/config@0.43.12 - - @0xsequence/guard@0.43.12 - - @0xsequence/network@0.43.12 - - @0xsequence/relayer@0.43.12 - - @0xsequence/transactions@0.43.12 - - @0xsequence/utils@0.43.12 - -## 0.43.11 - -### Patch Changes - -- fix lockfiles -- re-add mocha type deleter -- Updated dependencies -- Updated dependencies - - @0xsequence/abi@0.43.11 - - @0xsequence/config@0.43.11 - - @0xsequence/guard@0.43.11 - - @0xsequence/network@0.43.11 - - @0xsequence/relayer@0.43.11 - - @0xsequence/transactions@0.43.11 - - @0xsequence/utils@0.43.11 - -## 0.43.10 - -### Patch Changes - -- various improvements -- Updated dependencies - - @0xsequence/abi@0.43.10 - - @0xsequence/config@0.43.10 - - @0xsequence/guard@0.43.10 - - @0xsequence/network@0.43.10 - - @0xsequence/relayer@0.43.10 - - @0xsequence/transactions@0.43.10 - - @0xsequence/utils@0.43.10 - -## 0.43.9 - -### Patch Changes - -- update deps -- Updated dependencies - - @0xsequence/abi@0.43.9 - - @0xsequence/config@0.43.9 - - @0xsequence/guard@0.43.9 - - @0xsequence/network@0.43.9 - - @0xsequence/relayer@0.43.9 - - @0xsequence/transactions@0.43.9 - - @0xsequence/utils@0.43.9 - -## 0.43.8 - -### Patch Changes - -- network: JsonRpcProvider with caching -- Updated dependencies - - @0xsequence/abi@0.43.8 - - @0xsequence/config@0.43.8 - - @0xsequence/guard@0.43.8 - - @0xsequence/network@0.43.8 - - @0xsequence/relayer@0.43.8 - - @0xsequence/transactions@0.43.8 - - @0xsequence/utils@0.43.8 - -## 0.43.7 - -### Patch Changes - -- provider: fix wallet network init -- Updated dependencies - - @0xsequence/abi@0.43.7 - - @0xsequence/config@0.43.7 - - @0xsequence/guard@0.43.7 - - @0xsequence/network@0.43.7 - - @0xsequence/relayer@0.43.7 - - @0xsequence/transactions@0.43.7 - - @0xsequence/utils@0.43.7 - -## 0.43.6 - -### Patch Changes - -- metadatata: update rpc bindings -- Updated dependencies - - @0xsequence/abi@0.43.6 - - @0xsequence/config@0.43.6 - - @0xsequence/guard@0.43.6 - - @0xsequence/network@0.43.6 - - @0xsequence/relayer@0.43.6 - - @0xsequence/transactions@0.43.6 - - @0xsequence/utils@0.43.6 - -## 0.43.5 - -### Patch Changes - -- provider: do not set default network for connect messages -- provider: forward missing error message -- Updated dependencies -- Updated dependencies - - @0xsequence/abi@0.43.5 - - @0xsequence/config@0.43.5 - - @0xsequence/guard@0.43.5 - - @0xsequence/network@0.43.5 - - @0xsequence/relayer@0.43.5 - - @0xsequence/transactions@0.43.5 - - @0xsequence/utils@0.43.5 - -## 0.43.4 - -### Patch Changes - -- no-change version bump to fix incorrectly tagged snapshot build -- Updated dependencies - - @0xsequence/abi@0.43.4 - - @0xsequence/config@0.43.4 - - @0xsequence/guard@0.43.4 - - @0xsequence/network@0.43.4 - - @0xsequence/relayer@0.43.4 - - @0xsequence/transactions@0.43.4 - - @0xsequence/utils@0.43.4 - -## 0.43.3 - -### Patch Changes - -- metadata: update bindings -- Updated dependencies - - @0xsequence/abi@0.43.3 - - @0xsequence/config@0.43.3 - - @0xsequence/guard@0.43.3 - - @0xsequence/network@0.43.3 - - @0xsequence/relayer@0.43.3 - - @0xsequence/transactions@0.43.3 - - @0xsequence/utils@0.43.3 - -## 0.43.2 - -### Patch Changes - -- provider: implement connectUnchecked -- Updated dependencies - - @0xsequence/abi@0.43.2 - - @0xsequence/config@0.43.2 - - @0xsequence/guard@0.43.2 - - @0xsequence/network@0.43.2 - - @0xsequence/relayer@0.43.2 - - @0xsequence/transactions@0.43.2 - - @0xsequence/utils@0.43.2 - -## 0.43.1 - -### Patch Changes - -- update to latest ethauth dep -- Updated dependencies - - @0xsequence/abi@0.43.1 - - @0xsequence/config@0.43.1 - - @0xsequence/guard@0.43.1 - - @0xsequence/network@0.43.1 - - @0xsequence/relayer@0.43.1 - - @0xsequence/transactions@0.43.1 - - @0xsequence/utils@0.43.1 - -## 0.43.0 - -### Minor Changes - -- move ethers to a peer dependency - -### Patch Changes - -- Updated dependencies - - @0xsequence/abi@0.43.0 - - @0xsequence/config@0.43.0 - - @0xsequence/guard@0.43.0 - - @0xsequence/network@0.43.0 - - @0xsequence/relayer@0.43.0 - - @0xsequence/transactions@0.43.0 - - @0xsequence/utils@0.43.0 - -## 0.42.10 - -### Patch Changes - -- add auxDataProvider -- Updated dependencies - - @0xsequence/abi@0.42.10 - - @0xsequence/config@0.42.10 - - @0xsequence/guard@0.42.10 - - @0xsequence/network@0.42.10 - - @0xsequence/relayer@0.42.10 - - @0xsequence/transactions@0.42.10 - - @0xsequence/utils@0.42.10 - -## 0.42.9 - -### Patch Changes - -- provider: add eip-191 exceptions -- Updated dependencies - - @0xsequence/abi@0.42.9 - - @0xsequence/config@0.42.9 - - @0xsequence/guard@0.42.9 - - @0xsequence/network@0.42.9 - - @0xsequence/relayer@0.42.9 - - @0xsequence/transactions@0.42.9 - - @0xsequence/utils@0.42.9 - -## 0.42.8 - -### Patch Changes - -- provider: skip setting intent origin if we're unity plugin -- Updated dependencies - - @0xsequence/abi@0.42.8 - - @0xsequence/config@0.42.8 - - @0xsequence/guard@0.42.8 - - @0xsequence/network@0.42.8 - - @0xsequence/relayer@0.42.8 - - @0xsequence/transactions@0.42.8 - - @0xsequence/utils@0.42.8 - -## 0.42.7 - -### Patch Changes - -- Add sign in options to connection settings -- Updated dependencies - - @0xsequence/abi@0.42.7 - - @0xsequence/config@0.42.7 - - @0xsequence/guard@0.42.7 - - @0xsequence/network@0.42.7 - - @0xsequence/relayer@0.42.7 - - @0xsequence/transactions@0.42.7 - - @0xsequence/utils@0.42.7 - -## 0.42.6 - -### Patch Changes - -- api bindings update -- Updated dependencies - - @0xsequence/abi@0.42.6 - - @0xsequence/config@0.42.6 - - @0xsequence/guard@0.42.6 - - @0xsequence/network@0.42.6 - - @0xsequence/relayer@0.42.6 - - @0xsequence/transactions@0.42.6 - - @0xsequence/utils@0.42.6 - -## 0.42.5 - -### Patch Changes - -- relayer: don't treat missing receipt as hard failure -- Updated dependencies - - @0xsequence/abi@0.42.5 - - @0xsequence/config@0.42.5 - - @0xsequence/guard@0.42.5 - - @0xsequence/network@0.42.5 - - @0xsequence/relayer@0.42.5 - - @0xsequence/transactions@0.42.5 - - @0xsequence/utils@0.42.5 - -## 0.42.4 - -### Patch Changes - -- provider: add custom app protocol to connect options -- Updated dependencies - - @0xsequence/abi@0.42.4 - - @0xsequence/config@0.42.4 - - @0xsequence/guard@0.42.4 - - @0xsequence/network@0.42.4 - - @0xsequence/relayer@0.42.4 - - @0xsequence/transactions@0.42.4 - - @0xsequence/utils@0.42.4 - -## 0.42.3 - -### Patch Changes - -- update api bindings -- Updated dependencies - - @0xsequence/abi@0.42.3 - - @0xsequence/config@0.42.3 - - @0xsequence/guard@0.42.3 - - @0xsequence/network@0.42.3 - - @0xsequence/relayer@0.42.3 - - @0xsequence/transactions@0.42.3 - - @0xsequence/utils@0.42.3 - -## 0.42.2 - -### Patch Changes - -- disable rinkeby network -- Updated dependencies - - @0xsequence/abi@0.42.2 - - @0xsequence/config@0.42.2 - - @0xsequence/guard@0.42.2 - - @0xsequence/network@0.42.2 - - @0xsequence/relayer@0.42.2 - - @0xsequence/transactions@0.42.2 - - @0xsequence/utils@0.42.2 - -## 0.42.1 - -### Patch Changes - -- wallet: optional waitForReceipt parameter -- Updated dependencies - - @0xsequence/abi@0.42.1 - - @0xsequence/config@0.42.1 - - @0xsequence/guard@0.42.1 - - @0xsequence/network@0.42.1 - - @0xsequence/relayer@0.42.1 - - @0xsequence/transactions@0.42.1 - - @0xsequence/utils@0.42.1 - -## 0.42.0 - -### Minor Changes - -- relayer: estimateGasLimits -> simulate -- add simulator package - -### Patch Changes - -- transactions: fix flattenAuxTransactions -- provider: only filter nullish values -- provider: re-map transaction 'gas' back to 'gasLimit' -- Updated dependencies -- Updated dependencies -- Updated dependencies -- Updated dependencies -- Updated dependencies - - @0xsequence/abi@0.42.0 - - @0xsequence/config@0.42.0 - - @0xsequence/guard@0.42.0 - - @0xsequence/network@0.42.0 - - @0xsequence/relayer@0.42.0 - - @0xsequence/transactions@0.42.0 - - @0xsequence/utils@0.42.0 - -## 0.41.3 - -### Patch Changes - -- api bindings update -- Updated dependencies - - @0xsequence/abi@0.41.3 - - @0xsequence/config@0.41.3 - - @0xsequence/guard@0.41.3 - - @0xsequence/network@0.41.3 - - @0xsequence/relayer@0.41.3 - - @0xsequence/transactions@0.41.3 - - @0xsequence/utils@0.41.3 - -## 0.41.2 - -### Patch Changes - -- api bindings update -- Updated dependencies - - @0xsequence/abi@0.41.2 - - @0xsequence/config@0.41.2 - - @0xsequence/guard@0.41.2 - - @0xsequence/network@0.41.2 - - @0xsequence/relayer@0.41.2 - - @0xsequence/transactions@0.41.2 - - @0xsequence/utils@0.41.2 - -## 0.41.1 - -### Patch Changes - -- update default networks -- Updated dependencies - - @0xsequence/abi@0.41.1 - - @0xsequence/config@0.41.1 - - @0xsequence/guard@0.41.1 - - @0xsequence/network@0.41.1 - - @0xsequence/relayer@0.41.1 - - @0xsequence/transactions@0.41.1 - - @0xsequence/utils@0.41.1 - -## 0.41.0 - -### Minor Changes - -- relayer: fix Relayer.wait() interface - - The interface for calling Relayer.wait() has changed. Instead of a single optional ill-defined timeout/delay parameter, there are three optional parameters, in order: - - - timeout: the maximum time to wait for the transaction receipt - - delay: the polling interval, i.e. the time to wait between requests - - maxFails: the maximum number of hard failures to tolerate before giving up - - Please update your codebase accordingly. - -- relayer: add optional waitForReceipt parameter to Relayer.relay - - The behaviour of Relayer.relay() was not well-defined with respect to whether or not it waited for a receipt. - This change allows the caller to specify whether to wait or not, with the default behaviour being to wait. - -### Patch Changes - -- relayer: wait receipt retry logic -- fix wrapped object error -- provider: forward delegateCall and revertOnError transaction fields -- Updated dependencies -- Updated dependencies -- Updated dependencies -- Updated dependencies -- Updated dependencies - - @0xsequence/abi@0.41.0 - - @0xsequence/config@0.41.0 - - @0xsequence/guard@0.41.0 - - @0xsequence/network@0.41.0 - - @0xsequence/relayer@0.41.0 - - @0xsequence/transactions@0.41.0 - - @0xsequence/utils@0.41.0 - -## 0.40.6 - -### Patch Changes - -- add arbitrum-nova chain -- Updated dependencies - - @0xsequence/abi@0.40.6 - - @0xsequence/config@0.40.6 - - @0xsequence/guard@0.40.6 - - @0xsequence/network@0.40.6 - - @0xsequence/relayer@0.40.6 - - @0xsequence/transactions@0.40.6 - - @0xsequence/utils@0.40.6 - -## 0.40.5 - -### Patch Changes - -- api: update bindings -- Updated dependencies - - @0xsequence/abi@0.40.5 - - @0xsequence/config@0.40.5 - - @0xsequence/guard@0.40.5 - - @0xsequence/network@0.40.5 - - @0xsequence/relayer@0.40.5 - - @0xsequence/transactions@0.40.5 - - @0xsequence/utils@0.40.5 - -## 0.40.4 - -### Patch Changes - -- add unreal transport -- Updated dependencies - - @0xsequence/abi@0.40.4 - - @0xsequence/config@0.40.4 - - @0xsequence/guard@0.40.4 - - @0xsequence/network@0.40.4 - - @0xsequence/relayer@0.40.4 - - @0xsequence/transactions@0.40.4 - - @0xsequence/utils@0.40.4 - -## 0.40.3 - -### Patch Changes - -- provider: fix MessageToSign message type -- Updated dependencies - - @0xsequence/abi@0.40.3 - - @0xsequence/config@0.40.3 - - @0xsequence/guard@0.40.3 - - @0xsequence/network@0.40.3 - - @0xsequence/relayer@0.40.3 - - @0xsequence/transactions@0.40.3 - - @0xsequence/utils@0.40.3 - -## 0.40.2 - -### Patch Changes - -- Wallet provider, loadSession method -- Updated dependencies - - @0xsequence/abi@0.40.2 - - @0xsequence/config@0.40.2 - - @0xsequence/guard@0.40.2 - - @0xsequence/network@0.40.2 - - @0xsequence/relayer@0.40.2 - - @0xsequence/transactions@0.40.2 - - @0xsequence/utils@0.40.2 - -## 0.40.1 - -### Patch Changes - -- export sequence.initWallet and sequence.getWallet -- Updated dependencies - - @0xsequence/abi@0.40.1 - - @0xsequence/config@0.40.1 - - @0xsequence/guard@0.40.1 - - @0xsequence/network@0.40.1 - - @0xsequence/relayer@0.40.1 - - @0xsequence/transactions@0.40.1 - - @0xsequence/utils@0.40.1 - -## 0.40.0 - -### Minor Changes - -- add sequence.initWallet(network, config) and sequence.getWallet() helper methods - -### Patch Changes - -- Updated dependencies - - @0xsequence/abi@0.40.0 - - @0xsequence/config@0.40.0 - - @0xsequence/guard@0.40.0 - - @0xsequence/network@0.40.0 - - @0xsequence/relayer@0.40.0 - - @0xsequence/transactions@0.40.0 - - @0xsequence/utils@0.40.0 - -## 0.39.6 - -### Patch Changes - -- indexer: update client bindings -- Updated dependencies - - @0xsequence/abi@0.39.6 - - @0xsequence/config@0.39.6 - - @0xsequence/guard@0.39.6 - - @0xsequence/network@0.39.6 - - @0xsequence/relayer@0.39.6 - - @0xsequence/transactions@0.39.6 - - @0xsequence/utils@0.39.6 - -## 0.39.5 - -### Patch Changes - -- provider: fix networkRpcUrl config option -- Updated dependencies - - @0xsequence/abi@0.39.5 - - @0xsequence/config@0.39.5 - - @0xsequence/guard@0.39.5 - - @0xsequence/network@0.39.5 - - @0xsequence/relayer@0.39.5 - - @0xsequence/transactions@0.39.5 - - @0xsequence/utils@0.39.5 - -## 0.39.4 - -### Patch Changes - -- api: update client bindings -- Updated dependencies - - @0xsequence/abi@0.39.4 - - @0xsequence/config@0.39.4 - - @0xsequence/guard@0.39.4 - - @0xsequence/network@0.39.4 - - @0xsequence/relayer@0.39.4 - - @0xsequence/transactions@0.39.4 - - @0xsequence/utils@0.39.4 - -## 0.39.3 - -### Patch Changes - -- add request method on Web3Provider -- Updated dependencies - - @0xsequence/abi@0.39.3 - - @0xsequence/config@0.39.3 - - @0xsequence/guard@0.39.3 - - @0xsequence/network@0.39.3 - - @0xsequence/relayer@0.39.3 - - @0xsequence/transactions@0.39.3 - - @0xsequence/utils@0.39.3 - -## 0.39.2 - -### Patch Changes - -- update umd name -- Updated dependencies - - @0xsequence/abi@0.39.2 - - @0xsequence/config@0.39.2 - - @0xsequence/guard@0.39.2 - - @0xsequence/network@0.39.2 - - @0xsequence/relayer@0.39.2 - - @0xsequence/transactions@0.39.2 - - @0xsequence/utils@0.39.2 - -## 0.39.1 - -### Patch Changes - -- add Aurora network -- add origin info for accountsChanged event to handle it per dapp -- Updated dependencies -- Updated dependencies - - @0xsequence/abi@0.39.1 - - @0xsequence/config@0.39.1 - - @0xsequence/guard@0.39.1 - - @0xsequence/network@0.39.1 - - @0xsequence/relayer@0.39.1 - - @0xsequence/transactions@0.39.1 - - @0xsequence/utils@0.39.1 - -## 0.39.0 - -### Minor Changes - -- abstract window.localStorage to interface type - -### Patch Changes - -- Updated dependencies - - @0xsequence/abi@0.39.0 - - @0xsequence/config@0.39.0 - - @0xsequence/guard@0.39.0 - - @0xsequence/network@0.39.0 - - @0xsequence/relayer@0.39.0 - - @0xsequence/transactions@0.39.0 - - @0xsequence/utils@0.39.0 - -## 0.38.2 - -### Patch Changes - -- provider: add Settings.defaultPurchaseAmount -- Updated dependencies - - @0xsequence/abi@0.38.2 - - @0xsequence/config@0.38.2 - - @0xsequence/guard@0.38.2 - - @0xsequence/network@0.38.2 - - @0xsequence/relayer@0.38.2 - - @0xsequence/transactions@0.38.2 - - @0xsequence/utils@0.38.2 - -## 0.38.1 - -### Patch Changes - -- update api and metadata rpc bindings -- Updated dependencies - - @0xsequence/abi@0.38.1 - - @0xsequence/config@0.38.1 - - @0xsequence/guard@0.38.1 - - @0xsequence/network@0.38.1 - - @0xsequence/relayer@0.38.1 - - @0xsequence/transactions@0.38.1 - - @0xsequence/utils@0.38.1 - -## 0.38.0 - -### Minor Changes - -- api: update bindings, change TokenPrice interface -- bridge: remove @0xsequence/bridge package -- api: update bindings, rename ContractCallArg to TupleComponent - -### Patch Changes - -- Updated dependencies -- Updated dependencies -- Updated dependencies - - @0xsequence/abi@0.38.0 - - @0xsequence/config@0.38.0 - - @0xsequence/guard@0.38.0 - - @0xsequence/network@0.38.0 - - @0xsequence/relayer@0.38.0 - - @0xsequence/transactions@0.38.0 - - @0xsequence/utils@0.38.0 - -## 0.37.1 - -### Patch Changes - -- Add back sortNetworks - Removing sorting was a breaking change for dapps on older versions which directly integrate sequence. -- Updated dependencies - - @0xsequence/abi@0.37.1 - - @0xsequence/config@0.37.1 - - @0xsequence/guard@0.37.1 - - @0xsequence/network@0.37.1 - - @0xsequence/relayer@0.37.1 - - @0xsequence/transactions@0.37.1 - - @0xsequence/utils@0.37.1 - -## 0.37.0 - -### Minor Changes - -- network related fixes and improvements -- api: bindings: exchange rate lookups - -### Patch Changes - -- Updated dependencies -- Updated dependencies - - @0xsequence/abi@0.37.0 - - @0xsequence/config@0.37.0 - - @0xsequence/guard@0.37.0 - - @0xsequence/network@0.37.0 - - @0xsequence/relayer@0.37.0 - - @0xsequence/transactions@0.37.0 - - @0xsequence/utils@0.37.0 - -## 0.36.13 - -### Patch Changes - -- api: update bindings with new price endpoints -- Updated dependencies - - @0xsequence/abi@0.36.13 - - @0xsequence/config@0.36.13 - - @0xsequence/guard@0.36.13 - - @0xsequence/network@0.36.13 - - @0xsequence/relayer@0.36.13 - - @0xsequence/transactions@0.36.13 - - @0xsequence/utils@0.36.13 - -## 0.36.12 - -### Patch Changes - -- wallet: skip remote signers if not needed -- auth: check that signature meets threshold before requesting auth token -- Updated dependencies -- Updated dependencies - - @0xsequence/abi@0.36.12 - - @0xsequence/config@0.36.12 - - @0xsequence/guard@0.36.12 - - @0xsequence/network@0.36.12 - - @0xsequence/relayer@0.36.12 - - @0xsequence/transactions@0.36.12 - - @0xsequence/utils@0.36.12 - -## 0.36.11 - -### Patch Changes - -- Prefix EIP191 message on wallet-request-handler -- Updated dependencies - - @0xsequence/abi@0.36.11 - - @0xsequence/config@0.36.11 - - @0xsequence/guard@0.36.11 - - @0xsequence/network@0.36.11 - - @0xsequence/relayer@0.36.11 - - @0xsequence/transactions@0.36.11 - - @0xsequence/utils@0.36.11 - -## 0.36.10 - -### Patch Changes - -- support bannerUrl on connect -- Updated dependencies - - @0xsequence/abi@0.36.10 - - @0xsequence/config@0.36.10 - - @0xsequence/guard@0.36.10 - - @0xsequence/network@0.36.10 - - @0xsequence/relayer@0.36.10 - - @0xsequence/transactions@0.36.10 - - @0xsequence/utils@0.36.10 - -## 0.36.9 - -### Patch Changes - -- minor dev xp improvements -- Updated dependencies - - @0xsequence/abi@0.36.9 - - @0xsequence/config@0.36.9 - - @0xsequence/guard@0.36.9 - - @0xsequence/network@0.36.9 - - @0xsequence/relayer@0.36.9 - - @0xsequence/transactions@0.36.9 - - @0xsequence/utils@0.36.9 - -## 0.36.8 - -### Patch Changes - -- more connect options (theme, payment providers, funding currencies) -- Updated dependencies - - @0xsequence/abi@0.36.8 - - @0xsequence/config@0.36.8 - - @0xsequence/guard@0.36.8 - - @0xsequence/network@0.36.8 - - @0xsequence/relayer@0.36.8 - - @0xsequence/transactions@0.36.8 - - @0xsequence/utils@0.36.8 - -## 0.36.7 - -### Patch Changes - -- fix missing break -- Updated dependencies - - @0xsequence/abi@0.36.7 - - @0xsequence/config@0.36.7 - - @0xsequence/guard@0.36.7 - - @0xsequence/network@0.36.7 - - @0xsequence/relayer@0.36.7 - - @0xsequence/transactions@0.36.7 - - @0xsequence/utils@0.36.7 - -## 0.36.6 - -### Patch Changes - -- wallet_switchEthereumChain support -- Updated dependencies - - @0xsequence/abi@0.36.6 - - @0xsequence/config@0.36.6 - - @0xsequence/guard@0.36.6 - - @0xsequence/network@0.36.6 - - @0xsequence/relayer@0.36.6 - - @0xsequence/transactions@0.36.6 - - @0xsequence/utils@0.36.6 - -## 0.36.5 - -### Patch Changes - -- auth: bump ethauth to 0.7.0 - network, wallet: don't assume position of auth network in list - api/indexer/metadata: trim trailing slash on hostname, and add endpoint urls - relayer: Allow to specify local relayer transaction parameters like gas price or gas limit -- Updated dependencies - - @0xsequence/abi@0.36.5 - - @0xsequence/config@0.36.5 - - @0xsequence/guard@0.36.5 - - @0xsequence/network@0.36.5 - - @0xsequence/relayer@0.36.5 - - @0xsequence/transactions@0.36.5 - - @0xsequence/utils@0.36.5 - -## 0.36.4 - -### Patch Changes - -- Updating list of chain ids to include other ethereum compatible chains -- Updated dependencies - - @0xsequence/abi@0.36.4 - - @0xsequence/config@0.36.4 - - @0xsequence/guard@0.36.4 - - @0xsequence/network@0.36.4 - - @0xsequence/relayer@0.36.4 - - @0xsequence/transactions@0.36.4 - - @0xsequence/utils@0.36.4 - -## 0.36.3 - -### Patch Changes - -- provider: pass connect options to prompter methods -- Updated dependencies - - @0xsequence/abi@0.36.3 - - @0xsequence/config@0.36.3 - - @0xsequence/guard@0.36.3 - - @0xsequence/network@0.36.3 - - @0xsequence/relayer@0.36.3 - - @0xsequence/transactions@0.36.3 - - @0xsequence/utils@0.36.3 - -## 0.36.2 - -### Patch Changes - -- transactions: Setting target to 0x0 when empty to during SequenceTxAbiEncode -- Updated dependencies - - @0xsequence/abi@0.36.2 - - @0xsequence/config@0.36.2 - - @0xsequence/guard@0.36.2 - - @0xsequence/network@0.36.2 - - @0xsequence/relayer@0.36.2 - - @0xsequence/transactions@0.36.2 - - @0xsequence/utils@0.36.2 - -## 0.36.1 - -### Patch Changes - -- metadata: update client with more fields -- Updated dependencies - - @0xsequence/abi@0.36.1 - - @0xsequence/config@0.36.1 - - @0xsequence/guard@0.36.1 - - @0xsequence/network@0.36.1 - - @0xsequence/relayer@0.36.1 - - @0xsequence/transactions@0.36.1 - - @0xsequence/utils@0.36.1 - -## 0.36.0 - -### Minor Changes - -- relayer, wallet: fee quote support - -### Patch Changes - -- Updated dependencies - - @0xsequence/abi@0.36.0 - - @0xsequence/config@0.36.0 - - @0xsequence/guard@0.36.0 - - @0xsequence/network@0.36.0 - - @0xsequence/relayer@0.36.0 - - @0xsequence/transactions@0.36.0 - - @0xsequence/utils@0.36.0 - -## 0.35.12 - -### Patch Changes - -- provider: rename wallet.commands to wallet.utils -- Updated dependencies - - @0xsequence/abi@0.35.12 - - @0xsequence/config@0.35.12 - - @0xsequence/guard@0.35.12 - - @0xsequence/network@0.35.12 - - @0xsequence/relayer@0.35.12 - - @0xsequence/transactions@0.35.12 - - @0xsequence/utils@0.35.12 - -## 0.35.11 - -### Patch Changes - -- provider/utils: smoother message validation -- Updated dependencies - - @0xsequence/abi@0.35.11 - - @0xsequence/config@0.35.11 - - @0xsequence/guard@0.35.11 - - @0xsequence/network@0.35.11 - - @0xsequence/relayer@0.35.11 - - @0xsequence/transactions@0.35.11 - - @0xsequence/utils@0.35.11 - -## 0.35.10 - -### Patch Changes - -- upgrade deps -- Updated dependencies - - @0xsequence/abi@0.35.10 - - @0xsequence/config@0.35.10 - - @0xsequence/guard@0.35.10 - - @0xsequence/network@0.35.10 - - @0xsequence/relayer@0.35.10 - - @0xsequence/transactions@0.35.10 - - @0xsequence/utils@0.35.10 - -## 0.35.9 - -### Patch Changes - -- provider: window-transport override event handlers with new wallet instance -- Updated dependencies - - @0xsequence/abi@0.35.9 - - @0xsequence/config@0.35.9 - - @0xsequence/guard@0.35.9 - - @0xsequence/network@0.35.9 - - @0xsequence/relayer@0.35.9 - - @0xsequence/transactions@0.35.9 - - @0xsequence/utils@0.35.9 - -## 0.35.8 - -### Patch Changes - -- provider: async wallet sign in improvements -- Updated dependencies - - @0xsequence/abi@0.35.8 - - @0xsequence/config@0.35.8 - - @0xsequence/guard@0.35.8 - - @0xsequence/network@0.35.8 - - @0xsequence/relayer@0.35.8 - - @0xsequence/transactions@0.35.8 - - @0xsequence/utils@0.35.8 - -## 0.35.7 - -### Patch Changes - -- config: cache wallet configs -- Updated dependencies - - @0xsequence/abi@0.35.7 - - @0xsequence/config@0.35.7 - - @0xsequence/guard@0.35.7 - - @0xsequence/network@0.35.7 - - @0xsequence/relayer@0.35.7 - - @0xsequence/transactions@0.35.7 - - @0xsequence/utils@0.35.7 - -## 0.35.6 - -### Patch Changes - -- provider: support async signin of wallet request handler -- Updated dependencies - - @0xsequence/abi@0.35.6 - - @0xsequence/config@0.35.6 - - @0xsequence/guard@0.35.6 - - @0xsequence/network@0.35.6 - - @0xsequence/relayer@0.35.6 - - @0xsequence/transactions@0.35.6 - - @0xsequence/utils@0.35.6 - -## 0.35.5 - -### Patch Changes - -- wallet: skip threshold check during fee estimation -- Updated dependencies - - @0xsequence/abi@0.35.5 - - @0xsequence/config@0.35.5 - - @0xsequence/guard@0.35.5 - - @0xsequence/network@0.35.5 - - @0xsequence/relayer@0.35.5 - - @0xsequence/transactions@0.35.5 - - @0xsequence/utils@0.35.5 - -## 0.35.4 - -### Patch Changes - -- - browser extension mode, center window -- Updated dependencies - - @0xsequence/abi@0.35.4 - - @0xsequence/config@0.35.4 - - @0xsequence/guard@0.35.4 - - @0xsequence/network@0.35.4 - - @0xsequence/relayer@0.35.4 - - @0xsequence/transactions@0.35.4 - - @0xsequence/utils@0.35.4 - -## 0.35.3 - -### Patch Changes - -- - update window position when in browser extension mode -- Updated dependencies - - @0xsequence/abi@0.35.3 - - @0xsequence/config@0.35.3 - - @0xsequence/guard@0.35.3 - - @0xsequence/network@0.35.3 - - @0xsequence/relayer@0.35.3 - - @0xsequence/transactions@0.35.3 - - @0xsequence/utils@0.35.3 - -## 0.35.2 - -### Patch Changes - -- - provider: WindowMessageHandler accept optional windowHref -- Updated dependencies - - @0xsequence/abi@0.35.2 - - @0xsequence/config@0.35.2 - - @0xsequence/guard@0.35.2 - - @0xsequence/network@0.35.2 - - @0xsequence/relayer@0.35.2 - - @0xsequence/transactions@0.35.2 - - @0xsequence/utils@0.35.2 - -## 0.35.1 - -### Patch Changes - -- wallet: update config on undeployed too -- Updated dependencies - - @0xsequence/abi@0.35.1 - - @0xsequence/config@0.35.1 - - @0xsequence/guard@0.35.1 - - @0xsequence/network@0.35.1 - - @0xsequence/relayer@0.35.1 - - @0xsequence/transactions@0.35.1 - - @0xsequence/utils@0.35.1 - -## 0.35.0 - -### Minor Changes - -- - config: add buildStubSignature - - provider: add checks to signing cases for wallet deployment and config statuses - - provider: add prompt for wallet deployment - - relayer: add BaseRelayer.prependWalletDeploy - - relayer: add Relayer.feeOptions - - relayer: account for wallet deployment in fee estimation - - transactions: add fromTransactionish - - wallet: add Account.prependConfigUpdate - - wallet: add Account.getFeeOptions - -### Patch Changes - -- Updated dependencies - - @0xsequence/abi@0.35.0 - - @0xsequence/config@0.35.0 - - @0xsequence/guard@0.35.0 - - @0xsequence/network@0.35.0 - - @0xsequence/relayer@0.35.0 - - @0xsequence/transactions@0.35.0 - - @0xsequence/utils@0.35.0 - -## 0.34.0 - -### Minor Changes - -- - upgrade deps - -### Patch Changes - -- Updated dependencies - - @0xsequence/abi@0.34.0 - - @0xsequence/config@0.34.0 - - @0xsequence/guard@0.34.0 - - @0xsequence/network@0.34.0 - - @0xsequence/relayer@0.34.0 - - @0xsequence/transactions@0.34.0 - - @0xsequence/utils@0.34.0 - -## 0.33.3 - -### Patch Changes - -- wallet: fix Account.signTransactions - -## 0.33.2 - -### Patch Changes - -- Updated dependencies - - @0xsequence/transactions@0.33.2 - - @0xsequence/relayer@0.33.2 - -## 0.31.1 - -### Patch Changes - -- Updated dependencies - - @0xsequence/relayer@0.31.1 - -## 0.31.0 - -### Minor Changes - -- - upgrading to ethers v5.5 - -### Patch Changes - -- Updated dependencies - - @0xsequence/abi@0.31.0 - - @0xsequence/config@0.31.0 - - @0xsequence/guard@0.31.0 - - @0xsequence/network@0.31.0 - - @0xsequence/relayer@0.31.0 - - @0xsequence/transactions@0.31.0 - - @0xsequence/utils@0.31.0 - -## 0.30.0 - -### Minor Changes - -- - upgrade most deps - -### Patch Changes - -- Updated dependencies - - @0xsequence/abi@0.30.0 - - @0xsequence/config@0.30.0 - - @0xsequence/guard@0.30.0 - - @0xsequence/network@0.30.0 - - @0xsequence/relayer@0.30.0 - - @0xsequence/transactions@0.30.0 - - @0xsequence/utils@0.30.0 - -## 0.29.8 - -### Patch Changes - -- update api -- Updated dependencies [undefined] - - @0xsequence/abi@0.29.8 - - @0xsequence/config@0.29.8 - - @0xsequence/guard@0.29.8 - - @0xsequence/network@0.29.8 - - @0xsequence/relayer@0.29.8 - - @0xsequence/transactions@0.29.8 - - @0xsequence/utils@0.29.8 - -## 0.29.7 - -### Patch Changes - -- override ethers getChainId method - -## 0.29.6 - -### Patch Changes - -- Updated dependencies [undefined] - - @0xsequence/network@0.29.6 - - @0xsequence/config@0.29.6 - - @0xsequence/transactions@0.29.6 - - @0xsequence/relayer@0.29.6 - -## 0.29.5 - -### Patch Changes - -- Updated dependencies [undefined] - - @0xsequence/config@0.29.5 - - @0xsequence/relayer@0.29.5 - -## 0.29.2 - -### Patch Changes - -- Updated dependencies [undefined] - - @0xsequence/relayer@0.29.2 - -## 0.29.0 - -### Minor Changes - -- major architectural changes in Sequence design - - - only one API instance, API is no longer a per-chain service - - separate per-chain indexer service, API no longer handles indexing - - single contract metadata service, API no longer serves metadata - - chaind package has been removed, indexer and metadata packages have been added - - stronger typing with new explicit ChainId type - - multicall fixes and improvements - - forbid "wait" transactions in sendTransactionBatch calls - -### Patch Changes - -- Updated dependencies [undefined] - - @0xsequence/config@0.29.0 - - @0xsequence/network@0.29.0 - - @0xsequence/relayer@0.29.0 - - @0xsequence/transactions@0.29.0 - - @0xsequence/abi@0.29.0 - - @0xsequence/utils@0.29.0 - -## 0.28.0 - -### Minor Changes - -- extension provider - -### Patch Changes - -- Updated dependencies [undefined] - - @0xsequence/abi@0.28.0 - - @0xsequence/config@0.28.0 - - @0xsequence/guard@0.28.0 - - @0xsequence/network@0.28.0 - - @0xsequence/relayer@0.28.0 - - @0xsequence/transactions@0.28.0 - - @0xsequence/utils@0.28.0 - -## 0.27.2 - -### Patch Changes - -- add SignedTransactionsCallback - -## 0.27.1 - -### Patch Changes - -- Updated dependencies [undefined] - - @0xsequence/relayer@0.27.1 - -## 0.27.0 - -### Minor Changes - -- Add requireFreshSigner lib to sessions - -### Patch Changes - -- Updated dependencies [undefined] - - @0xsequence/abi@0.27.0 - - @0xsequence/config@0.27.0 - - @0xsequence/guard@0.27.0 - - @0xsequence/network@0.27.0 - - @0xsequence/relayer@0.27.0 - - @0xsequence/transactions@0.27.0 - - @0xsequence/utils@0.27.0 - -## 0.26.0 - -### Minor Changes - -- update relayer client bindings - provide the wallet's address for calls to SendMetaTxn - modify the semantics of Relayer.getNonce() to allow relayers to select nonce spaces for clients - -### Patch Changes - -- Updated dependencies [undefined] - - @0xsequence/relayer@0.26.0 - -## 0.25.1 - -### Patch Changes - -- Fix build typescrypt issue -- Updated dependencies [undefined] - - @0xsequence/abi@0.25.1 - - @0xsequence/config@0.25.1 - - @0xsequence/guard@0.25.1 - - @0xsequence/network@0.25.1 - - @0xsequence/relayer@0.25.1 - - @0xsequence/transactions@0.25.1 - - @0xsequence/utils@0.25.1 - -## 0.25.0 - -### Minor Changes - -- 10c8af8: Add estimator package - Fix multicall few calls bug - -### Patch Changes - -- Updated dependencies [10c8af8] - - @0xsequence/abi@0.25.0 - - @0xsequence/config@0.25.0 - - @0xsequence/guard@0.25.0 - - @0xsequence/network@0.25.0 - - @0xsequence/relayer@0.25.0 - - @0xsequence/transactions@0.25.0 - - @0xsequence/utils@0.25.0 - -## 0.24.1 - -### Patch Changes - -- Updated dependencies [undefined] - - @0xsequence/relayer@0.24.1 - -## 0.24.0 - -### Patch Changes - -- Updated dependencies [undefined] - - @0xsequence/relayer@0.24.0 - -## 0.23.0 - -### Minor Changes - -- - relayer: offer variety of gas fee options from the relayer service" - -### Patch Changes - -- Updated dependencies [undefined] - - @0xsequence/abi@0.23.0 - - @0xsequence/config@0.23.0 - - @0xsequence/guard@0.23.0 - - @0xsequence/network@0.23.0 - - @0xsequence/relayer@0.23.0 - - @0xsequence/transactions@0.23.0 - - @0xsequence/utils@0.23.0 - -## 0.22.2 - -### Patch Changes - -- e1c109e: Fix authProof on expired sessions -- Updated dependencies [e1c109e] - - @0xsequence/abi@0.22.2 - - @0xsequence/config@0.22.2 - - @0xsequence/guard@0.22.2 - - @0xsequence/network@0.22.2 - - @0xsequence/relayer@0.22.2 - - @0xsequence/transactions@0.22.2 - - @0xsequence/utils@0.22.2 - -## 0.22.1 - -### Patch Changes - -- transport session cache -- Updated dependencies [undefined] - - @0xsequence/abi@0.22.1 - - @0xsequence/config@0.22.1 - - @0xsequence/guard@0.22.1 - - @0xsequence/network@0.22.1 - - @0xsequence/relayer@0.22.1 - - @0xsequence/transactions@0.22.1 - - @0xsequence/utils@0.22.1 - -## 0.22.0 - -### Minor Changes - -- e667b65: Expose all relayer options on networks - -### Patch Changes - -- Updated dependencies [e667b65] - - @0xsequence/abi@0.22.0 - - @0xsequence/network@0.22.0 - - @0xsequence/relayer@0.22.0 - - @0xsequence/utils@0.22.0 - - @0xsequence/config@0.22.0 - - @0xsequence/guard@0.22.0 - - @0xsequence/transactions@0.22.0 - -## 0.21.5 - -### Patch Changes - -- Give priority to metaTxnId returned by relayer -- Updated dependencies [undefined] - - @0xsequence/abi@0.21.5 - - @0xsequence/config@0.21.5 - - @0xsequence/guard@0.21.5 - - @0xsequence/network@0.21.5 - - @0xsequence/relayer@0.21.5 - - @0xsequence/transactions@0.21.5 - - @0xsequence/utils@0.21.5 - -## 0.21.4 - -### Patch Changes - -- Add has enough signers method -- Updated dependencies [undefined] - - @0xsequence/abi@0.21.4 - - @0xsequence/config@0.21.4 - - @0xsequence/guard@0.21.4 - - @0xsequence/network@0.21.4 - - @0xsequence/relayer@0.21.4 - - @0xsequence/transactions@0.21.4 - - @0xsequence/utils@0.21.4 - -## 0.21.3 - -### Patch Changes - -- add window session cache -- Updated dependencies [undefined] - - @0xsequence/abi@0.21.3 - - @0xsequence/config@0.21.3 - - @0xsequence/guard@0.21.3 - - @0xsequence/network@0.21.3 - - @0xsequence/relayer@0.21.3 - - @0xsequence/transactions@0.21.3 - - @0xsequence/utils@0.21.3 - -## 0.21.2 - -### Patch Changes - -- exception handlind in relayer -- Updated dependencies [undefined] - - @0xsequence/abi@0.21.2 - - @0xsequence/config@0.21.2 - - @0xsequence/guard@0.21.2 - - @0xsequence/network@0.21.2 - - @0xsequence/relayer@0.21.2 - - @0xsequence/transactions@0.21.2 - - @0xsequence/utils@0.21.2 - -## 0.21.1 - -### Patch Changes - -- config updates must not be revertOnError - -## 0.21.0 - -### Minor Changes - -- - fix gas estimation on wallets with large number of signers - - update to session handling and wallet config construction upon auth - -### Patch Changes - -- Updated dependencies [undefined] - - @0xsequence/abi@0.21.0 - - @0xsequence/config@0.21.0 - - @0xsequence/guard@0.21.0 - - @0xsequence/network@0.21.0 - - @0xsequence/relayer@0.21.0 - - @0xsequence/transactions@0.21.0 - - @0xsequence/utils@0.21.0 - -## 0.19.3 - -### Patch Changes - -- jwtAuth visibility, package version sync -- Updated dependencies [undefined] - - @0xsequence/abi@0.19.3 - - @0xsequence/config@0.19.3 - - @0xsequence/guard@0.19.3 - - @0xsequence/network@0.19.3 - - @0xsequence/relayer@0.19.3 - - @0xsequence/transactions@0.19.3 - - @0xsequence/utils@0.19.3 - -## 0.19.2 - -### Patch Changes - -- Updated dependencies [undefined] - - @0xsequence/abi@0.19.2 - - @0xsequence/config@0.19.2 - - @0xsequence/relayer@0.19.2 - - @0xsequence/transactions@0.19.2 - -## 0.19.0 - -### Minor Changes - -- - provider, improve dapp / wallet transport io - -### Patch Changes - -- Updated dependencies [undefined] - - @0xsequence/abi@0.19.0 - - @0xsequence/config@0.19.0 - - @0xsequence/guard@0.19.0 - - @0xsequence/network@0.19.0 - - @0xsequence/relayer@0.19.0 - - @0xsequence/transactions@0.19.0 - - @0xsequence/utils@0.19.0 - -## 0.18.0 - -### Minor Changes - -- relayer improvements and pending transaction handling - -### Patch Changes - -- Updated dependencies [undefined] - - @0xsequence/abi@0.18.0 - - @0xsequence/config@0.18.0 - - @0xsequence/guard@0.18.0 - - @0xsequence/network@0.18.0 - - @0xsequence/relayer@0.18.0 - - @0xsequence/transactions@0.18.0 - - @0xsequence/utils@0.18.0 - -## 0.16.0 - -### Minor Changes - -- relayer as its own service separate from chaind - -### Patch Changes - -- Updated dependencies [undefined] - - @0xsequence/abi@0.16.0 - - @0xsequence/config@0.16.0 - - @0xsequence/guard@0.16.0 - - @0xsequence/network@0.16.0 - - @0xsequence/relayer@0.16.0 - - @0xsequence/transactions@0.16.0 - - @0xsequence/utils@0.16.0 - -## 0.15.1 - -### Patch Changes - -- update api clients -- Updated dependencies [undefined] - - @0xsequence/abi@0.15.1 - - @0xsequence/config@0.15.1 - - @0xsequence/guard@0.15.1 - - @0xsequence/network@0.15.1 - - @0xsequence/relayer@0.15.1 - - @0xsequence/transactions@0.15.1 - - @0xsequence/utils@0.15.1 - -## 0.15.0 - -### Patch Changes - -- Updated dependencies [undefined] - - @0xsequence/relayer@0.15.0 - - @0xsequence/transactions@0.15.0 - -## 0.14.3 - -### Patch Changes - -- Fix 0xSequence relayer dependencies -- Updated dependencies [undefined] - - @0xsequence/abi@0.14.3 - - @0xsequence/config@0.14.3 - - @0xsequence/guard@0.14.3 - - @0xsequence/network@0.14.3 - - @0xsequence/relayer@0.14.3 - - @0xsequence/transactions@0.14.3 - - @0xsequence/utils@0.14.3 - -## 0.14.2 - -### Patch Changes - -- Add debug logs to rpc-relayer -- Updated dependencies [undefined] - - @0xsequence/abi@0.14.2 - - @0xsequence/config@0.14.2 - - @0xsequence/guard@0.14.2 - - @0xsequence/network@0.14.2 - - @0xsequence/relayer@0.14.2 - - @0xsequence/transactions@0.14.2 - - @0xsequence/utils@0.14.2 - -## 0.14.0 - -### Minor Changes - -- update sequence utils finder which includes optimization - -### Patch Changes - -- Updated dependencies [undefined] - - @0xsequence/abi@0.14.0 - - @0xsequence/config@0.14.0 - - @0xsequence/guard@0.14.0 - - @0xsequence/network@0.14.0 - - @0xsequence/relayer@0.14.0 - - @0xsequence/transactions@0.14.0 - - @0xsequence/utils@0.14.0 - -## 0.13.0 - -### Minor Changes - -- Update SequenceUtils deployed contract - -### Patch Changes - -- Updated dependencies [undefined] - - @0xsequence/abi@0.13.0 - - @0xsequence/config@0.13.0 - - @0xsequence/guard@0.13.0 - - @0xsequence/network@0.13.0 - - @0xsequence/relayer@0.13.0 - - @0xsequence/transactions@0.13.0 - - @0xsequence/utils@0.13.0 - -## 0.12.1 - -### Patch Changes - -- npm bump -- Updated dependencies [undefined] - - @0xsequence/abi@0.12.1 - - @0xsequence/config@0.12.1 - - @0xsequence/guard@0.12.1 - - @0xsequence/network@0.12.1 - - @0xsequence/relayer@0.12.1 - - @0xsequence/transactions@0.12.1 - - @0xsequence/utils@0.12.1 - -## 0.12.0 - -### Minor Changes - -- provider: improvements to window transport - -### Patch Changes - -- Updated dependencies [undefined] - - @0xsequence/abi@0.12.0 - - @0xsequence/config@0.12.0 - - @0xsequence/guard@0.12.0 - - @0xsequence/network@0.12.0 - - @0xsequence/relayer@0.12.0 - - @0xsequence/transactions@0.12.0 - - @0xsequence/utils@0.12.0 - -## 0.11.4 - -### Patch Changes - -- update api client -- Updated dependencies [undefined] - - @0xsequence/abi@0.11.4 - - @0xsequence/config@0.11.4 - - @0xsequence/guard@0.11.4 - - @0xsequence/network@0.11.4 - - @0xsequence/relayer@0.11.4 - - @0xsequence/transactions@0.11.4 - - @0xsequence/utils@0.11.4 - -## 0.11.3 - -### Patch Changes - -- improve openWindow state options handling -- Updated dependencies [undefined] - - @0xsequence/abi@0.11.3 - - @0xsequence/config@0.11.3 - - @0xsequence/guard@0.11.3 - - @0xsequence/network@0.11.3 - - @0xsequence/relayer@0.11.3 - - @0xsequence/transactions@0.11.3 - - @0xsequence/utils@0.11.3 - -## 0.11.2 - -### Patch Changes - -- Fix multicall proxy scopes -- Updated dependencies [undefined] - - @0xsequence/abi@0.11.2 - - @0xsequence/config@0.11.2 - - @0xsequence/guard@0.11.2 - - @0xsequence/network@0.11.2 - - @0xsequence/relayer@0.11.2 - - @0xsequence/transactions@0.11.2 - - @0xsequence/utils@0.11.2 - -## 0.11.1 - -### Patch Changes - -- Add support for dynamic and nested signatures -- Updated dependencies [undefined] - - @0xsequence/abi@0.11.1 - - @0xsequence/config@0.11.1 - - @0xsequence/guard@0.11.1 - - @0xsequence/network@0.11.1 - - @0xsequence/relayer@0.11.1 - - @0xsequence/transactions@0.11.1 - - @0xsequence/utils@0.11.1 - -## 0.11.0 - -### Minor Changes - -- Update wallet context to 1.7 contracts - -### Patch Changes - -- Updated dependencies [undefined] - - @0xsequence/abi@0.11.0 - - @0xsequence/config@0.11.0 - - @0xsequence/guard@0.11.0 - - @0xsequence/network@0.11.0 - - @0xsequence/relayer@0.11.0 - - @0xsequence/transactions@0.11.0 - - @0xsequence/utils@0.11.0 - -## 0.10.9 - -### Patch Changes - -- add support for public addresses as signers in session.open -- Updated dependencies [undefined] - - @0xsequence/abi@0.10.9 - - @0xsequence/config@0.10.9 - - @0xsequence/guard@0.10.9 - - @0xsequence/network@0.10.9 - - @0xsequence/relayer@0.10.9 - - @0xsequence/transactions@0.10.9 - - @0xsequence/utils@0.10.9 - -## 0.10.8 - -### Patch Changes - -- Multicall production configuration -- Updated dependencies [undefined] - - @0xsequence/abi@0.10.8 - - @0xsequence/config@0.10.8 - - @0xsequence/guard@0.10.8 - - @0xsequence/network@0.10.8 - - @0xsequence/relayer@0.10.8 - - @0xsequence/transactions@0.10.8 - - @0xsequence/utils@0.10.8 - -## 0.10.7 - -### Patch Changes - -- allow provider transport to force disconnect -- Updated dependencies [undefined] - - @0xsequence/abi@0.10.7 - - @0xsequence/config@0.10.7 - - @0xsequence/guard@0.10.7 - - @0xsequence/network@0.10.7 - - @0xsequence/relayer@0.10.7 - - @0xsequence/transactions@0.10.7 - - @0xsequence/utils@0.10.7 - -## 0.10.6 - -### Patch Changes - -- - fix getWalletState method -- Updated dependencies [undefined] - - @0xsequence/abi@0.10.6 - - @0xsequence/config@0.10.6 - - @0xsequence/guard@0.10.6 - - @0xsequence/network@0.10.6 - - @0xsequence/relayer@0.10.6 - - @0xsequence/transactions@0.10.6 - - @0xsequence/utils@0.10.6 - -## 0.10.5 - -### Patch Changes - -- update relayer gas refund options -- Updated dependencies [undefined] - - @0xsequence/abi@0.10.5 - - @0xsequence/config@0.10.5 - - @0xsequence/guard@0.10.5 - - @0xsequence/network@0.10.5 - - @0xsequence/relayer@0.10.5 - - @0xsequence/transactions@0.10.5 - - @0xsequence/utils@0.10.5 - -## 0.10.4 - -### Patch Changes - -- Update api proto -- Updated dependencies [undefined] - - @0xsequence/abi@0.10.4 - - @0xsequence/config@0.10.4 - - @0xsequence/guard@0.10.4 - - @0xsequence/network@0.10.4 - - @0xsequence/relayer@0.10.4 - - @0xsequence/transactions@0.10.4 - - @0xsequence/utils@0.10.4 - -## 0.10.3 - -### Patch Changes - -- Fix loading config cross-chain -- Updated dependencies [undefined] - - @0xsequence/abi@0.10.3 - - @0xsequence/config@0.10.3 - - @0xsequence/guard@0.10.3 - - @0xsequence/network@0.10.3 - - @0xsequence/relayer@0.10.3 - - @0xsequence/transactions@0.10.3 - - @0xsequence/utils@0.10.3 - -## 0.10.2 - -### Patch Changes - -- - message digest fix -- Updated dependencies [undefined] - - @0xsequence/abi@0.10.2 - - @0xsequence/config@0.10.2 - - @0xsequence/guard@0.10.2 - - @0xsequence/network@0.10.2 - - @0xsequence/relayer@0.10.2 - - @0xsequence/transactions@0.10.2 - - @0xsequence/utils@0.10.2 - -## 0.10.1 - -### Patch Changes - -- upgrade deps -- Updated dependencies [undefined] - - @0xsequence/abi@0.10.1 - - @0xsequence/config@0.10.1 - - @0xsequence/guard@0.10.1 - - @0xsequence/network@0.10.1 - - @0xsequence/relayer@0.10.1 - - @0xsequence/transactions@0.10.1 - - @0xsequence/utils@0.10.1 - -## 0.10.0 - -### Minor Changes - -- Deployed new contracts with ERC1271 signer support - -### Patch Changes - -- Updated dependencies [undefined] - - @0xsequence/abi@0.10.0 - - @0xsequence/config@0.10.0 - - @0xsequence/guard@0.10.0 - - @0xsequence/network@0.10.0 - - @0xsequence/relayer@0.10.0 - - @0xsequence/transactions@0.10.0 - - @0xsequence/utils@0.10.0 - -## 0.9.6 - -### Patch Changes - -- Update ABIs for latest sequence contracts -- Updated dependencies [undefined] - - @0xsequence/config@0.9.6 - - @0xsequence/network@0.9.6 - - @0xsequence/relayer@0.9.6 - - @0xsequence/transactions@0.9.6 - - @0xsequence/utils@0.9.6 - - @0xsequence/abi@0.9.6 - - @0xsequence/guard@0.9.6 - -## 0.9.5 - -### Patch Changes - -- Implemented session class -- Updated dependencies [undefined] - - @0xsequence/config@0.9.5 - - @0xsequence/network@0.9.5 - - @0xsequence/relayer@0.9.5 - - @0xsequence/transactions@0.9.5 - - @0xsequence/utils@0.9.5 - -## 0.9.3 - -### Patch Changes - -- - minor improvements -- Updated dependencies [undefined] - - @0xsequence/abi@0.9.3 - - @0xsequence/config@0.9.3 - - @0xsequence/guard@0.9.3 - - @0xsequence/network@0.9.3 - - @0xsequence/relayer@0.9.3 - - @0xsequence/transactions@0.9.3 - - @0xsequence/utils@0.9.3 - -## 0.9.1 - -### Patch Changes - -- - patch bump -- Updated dependencies [undefined] - - @0xsequence/abi@0.9.1 - - @0xsequence/api@0.9.1 - - @0xsequence/config@0.9.1 - - @0xsequence/guard@0.9.1 - - @0xsequence/network@0.9.1 - - @0xsequence/relayer@0.9.1 - - @0xsequence/transactions@0.9.1 - - @0xsequence/utils@0.9.1 - -## 0.9.0 - -### Minor Changes - -- - provider transport hardening - -### Patch Changes - -- Updated dependencies [undefined] - - @0xsequence/api@0.9.0 - - @0xsequence/abi@0.9.0 - - @0xsequence/config@0.9.0 - - @0xsequence/guard@0.9.0 - - @0xsequence/network@0.9.0 - - @0xsequence/relayer@0.9.0 - - @0xsequence/transactions@0.9.0 - - @0xsequence/utils@0.9.0 - -## 0.8.5 - -### Patch Changes - -- - use latest wallet-contracts -- Updated dependencies [undefined] - - @0xsequence/abi@0.8.5 - - @0xsequence/api@0.8.5 - - @0xsequence/config@0.8.5 - - @0xsequence/guard@0.8.5 - - @0xsequence/network@0.8.5 - - @0xsequence/relayer@0.8.5 - - @0xsequence/transactions@0.8.5 - - @0xsequence/utils@0.8.5 - -## 0.8.4 - -### Patch Changes - -- - minor improvements, name updates and comments -- Updated dependencies [undefined] - - @0xsequence/abi@0.8.4 - - @0xsequence/api@0.8.4 - - @0xsequence/config@0.8.4 - - @0xsequence/guard@0.8.4 - - @0xsequence/network@0.8.4 - - @0xsequence/relayer@0.8.4 - - @0xsequence/transactions@0.8.4 - - @0xsequence/utils@0.8.4 - -## 0.8.3 - -### Patch Changes - -- - refinements - - - normalize signer address in config - - - provider: getWalletState() method to WalletProvider - -- Updated dependencies [undefined] - - @0xsequence/abi@0.8.3 - - @0xsequence/api@0.8.3 - - @0xsequence/config@0.8.3 - - @0xsequence/guard@0.8.3 - - @0xsequence/network@0.8.3 - - @0xsequence/relayer@0.8.3 - - @0xsequence/transactions@0.8.3 - - @0xsequence/utils@0.8.3 - -## 0.8.2 - -### Patch Changes - -- - field rename and ethauth dependency bump -- Updated dependencies [undefined] - - @0xsequence/abi@0.8.2 - - @0xsequence/api@0.8.2 - - @0xsequence/config@0.8.2 - - @0xsequence/guard@0.8.2 - - @0xsequence/network@0.8.2 - - @0xsequence/relayer@0.8.2 - - @0xsequence/transactions@0.8.2 - - @0xsequence/utils@0.8.2 - -## 0.8.1 - -### Patch Changes - -- - variety of optimizations -- Updated dependencies [undefined] - - @0xsequence/abi@0.8.1 - - @0xsequence/api@0.8.1 - - @0xsequence/config@0.8.1 - - @0xsequence/guard@0.8.1 - - @0xsequence/network@0.8.1 - - @0xsequence/relayer@0.8.1 - - @0xsequence/transactions@0.8.1 - - @0xsequence/utils@0.8.1 - -## 0.8.0 - -### Minor Changes - -- - changeset fix - -### Patch Changes - -- Updated dependencies [undefined] - - @0xsequence/abi@0.8.0 - - @0xsequence/api@0.8.0 - - @0xsequence/config@0.8.0 - - @0xsequence/guard@0.8.0 - - @0xsequence/network@0.8.0 - - @0xsequence/relayer@0.8.0 - - @0xsequence/transactions@0.8.0 - - @0xsequence/utils@0.8.0 - -## 0.7.1 - -### Patch Changes - -- 02377ab: Minor improvements -- Updated dependencies [02377ab] -- Updated dependencies [1fe4379] - - @0xsequence/network@0.7.1 - - @0xsequence/relayer@0.7.1 - - @0xsequence/utils@0.7.1 - -## 0.7.0 - -### Patch Changes - -- 6f11ed7: sequence.js, init release -- Updated dependencies [6f11ed7] - - @0xsequence/abi@0.7.0 - - @0xsequence/api@0.7.0 - - @0xsequence/config@0.7.0 - - @0xsequence/guard@0.7.0 - - @0xsequence/network@0.7.0 - - @0xsequence/relayer@0.7.0 - - @0xsequence/transactions@0.7.0 - - @0xsequence/utils@0.7.0 diff --git a/old/packages/wallet/README.md b/old/packages/wallet/README.md deleted file mode 100644 index 19321e9f2..000000000 --- a/old/packages/wallet/README.md +++ /dev/null @@ -1,4 +0,0 @@ -@0xsequence/wallet -================== - -See [0xsequence project page](https://github.com/0xsequence/sequence.js). diff --git a/old/packages/wallet/hardhat.config.js b/old/packages/wallet/hardhat.config.js deleted file mode 100644 index 65a997e19..000000000 --- a/old/packages/wallet/hardhat.config.js +++ /dev/null @@ -1,11 +0,0 @@ - -module.exports = { - networks: { - hardhat: { - chainId: 31337, - accounts: { - mnemonic: 'ripple axis someone ridge uniform wrist prosper there frog rate olympic knee' - } - }, - } -} diff --git a/old/packages/wallet/hardhat2.config.js b/old/packages/wallet/hardhat2.config.js deleted file mode 100644 index e984fc2e7..000000000 --- a/old/packages/wallet/hardhat2.config.js +++ /dev/null @@ -1,11 +0,0 @@ - -module.exports = { - networks: { - hardhat: { - chainId: 31338, - accounts: { - mnemonic: 'ripple axis someone ridge uniform wrist prosper there frog rate olympic knee' - } - } - } -} diff --git a/old/packages/wallet/package.json b/old/packages/wallet/package.json deleted file mode 100644 index f95677b69..000000000 --- a/old/packages/wallet/package.json +++ /dev/null @@ -1,42 +0,0 @@ -{ - "name": "@0xsequence/wallet", - "version": "2.3.8", - "description": "wallet sub-package for Sequence", - "repository": "https://github.com/0xsequence/sequence.js/tree/master/packages/wallet", - "source": "src/index.ts", - "main": "dist/0xsequence-wallet.cjs.js", - "module": "dist/0xsequence-wallet.esm.js", - "author": "Horizon Blockchain Games", - "license": "Apache-2.0", - "scripts": { - "test": "pnpm test:concurrently 'pnpm test:run'", - "test:run": "pnpm test:file tests/**/*.spec.ts", - "test:file": "NODE_OPTIONS='--import tsx' mocha -timeout 300000", - "test:concurrently": "concurrently -k --success first 'pnpm start:hardhat2 > /dev/null'", - "start:hardhat2": "hardhat node --hostname 0.0.0.0 --port 7047 --config ./hardhat2.config.js", - "typecheck": "tsc --noEmit" - }, - "peerDependencies": { - "ethers": ">=6" - }, - "dependencies": { - "@0xsequence/abi": "workspace:*", - "@0xsequence/core": "workspace:*", - "@0xsequence/network": "workspace:*", - "@0xsequence/signhub": "workspace:*", - "@0xsequence/relayer": "workspace:*", - "@0xsequence/utils": "workspace:*" - }, - "devDependencies": { - "@0xsequence/ethauth": "^1.0.0", - "@0xsequence/tests": "workspace:*", - "@0xsequence/wallet-contracts": "^3.0.1", - "@istanbuljs/nyc-config-typescript": "^1.0.1", - "ethers": "6.13.4", - "web3": "^1.8.1" - }, - "files": [ - "src", - "dist" - ] -} diff --git a/old/packages/wallet/src/index.ts b/old/packages/wallet/src/index.ts deleted file mode 100644 index e40a936c0..000000000 --- a/old/packages/wallet/src/index.ts +++ /dev/null @@ -1,5 +0,0 @@ -export * from './signer' -export * from './utils' -export * from './wallet' - -export * from './orchestrator/wrapper' diff --git a/old/packages/wallet/src/orchestrator/wrapper.ts b/old/packages/wallet/src/orchestrator/wrapper.ts deleted file mode 100644 index db4cdfa33..000000000 --- a/old/packages/wallet/src/orchestrator/wrapper.ts +++ /dev/null @@ -1,46 +0,0 @@ -import { commons } from '@0xsequence/core' -import { signers, Status } from '@0xsequence/signhub' -import { ethers } from 'ethers' -import { Wallet } from '../wallet' - -// Implements a wrapper for using Sequence wallets as nested signers -// in the signhub orchestrator. It only works for nested signatures. -export class SequenceOrchestratorWrapper implements signers.SapientSigner { - constructor(public wallet: Wallet) {} - - async getAddress(): Promise { - return this.wallet.address - } - - async buildDeployTransaction(metadata: object): Promise { - return this.wallet.buildDeployTransaction(metadata as commons.WalletDeployMetadata | undefined) - } - - async predecorateSignedTransactions(_metadata: object): Promise { - // Wallets do not predecorate as they have no off chain knowledge - return [] - } - - async decorateTransactions( - bundle: commons.transaction.IntendedTransactionBundle, - _metadata: object - ): Promise { - return this.wallet.decorateTransactions(bundle) - } - - sign(message: ethers.BytesLike, metadata: object): Promise { - if (!commons.isWalletSignRequestMetadata(metadata)) { - throw new Error('SequenceOrchestratorWrapper only supports nested Sequence signatures') - } - - // For Sequence nested signatures we must use `signDigest` and not `signMessage` - // otherwise the wallet will hash the digest and the signature will be invalid. - return this.wallet.signDigest(message, { nested: metadata }) - } - - notifyStatusChange(_i: string, _s: Status, _m: object): void {} - - suffix(): ethers.BytesLike { - return new Uint8Array([3]) - } -} diff --git a/old/packages/wallet/src/signer.ts b/old/packages/wallet/src/signer.ts deleted file mode 100644 index c30aeee03..000000000 --- a/old/packages/wallet/src/signer.ts +++ /dev/null @@ -1,100 +0,0 @@ -import { ethers } from 'ethers' -import { NetworkConfig, ChainIdLike } from '@0xsequence/network' -import { FeeQuote, Relayer } from '@0xsequence/relayer' -import { commons } from '@0xsequence/core' - -// TODO: Move to account ? -export abstract class Signer extends ethers.AbstractSigner { - static isSequenceSigner(cand: any): cand is Signer { - return isSequenceSigner(cand) - } - - abstract getProvider(chainId?: number): Promise - abstract getRelayer(chainId?: number): Promise - - // abstract getWalletContext(): Promise - abstract getWalletConfig(chainId?: ChainIdLike): Promise - // abstract getWalletState(chainId?: ChainIdLike): Promise - - abstract getNetworks(): Promise - - // getSigners returns a list of available / attached signers to the interface. Note: you need - // enough signers in order to meet the signing threshold that satisfies a wallet config. - abstract getSigners(): Promise - - // signMessage ..... - abstract signMessage( - message: ethers.BytesLike, - chainId?: ChainIdLike, - allSigners?: boolean, - isDigest?: boolean - ): Promise - - // signTypedData .. - abstract signTypedData( - domain: ethers.TypedDataDomain, - types: Record>, - message: Record, - chainId?: ChainIdLike, - allSigners?: boolean - ): Promise - - // sendTransaction takes an unsigned transaction, or list of unsigned transactions, and then has it signed by - // the signer, and finally sends it to the relayer for submission to an Ethereum network. - abstract sendTransaction( - transaction: commons.transaction.Transactionish, - chainId?: ChainIdLike, - allSigners?: boolean, - quote?: FeeQuote - ): Promise - - // sendTransactionBatch provides the ability to send an array/batch of transactions as a single native on-chain transaction. - // This method works identically to sendTransaction but offers a different syntax for convience, readability and type clarity. - abstract sendTransactionBatch( - transactions: ethers.TransactionRequest[] | commons.transaction.Transaction[], - chainId?: ChainIdLike, - allSigners?: boolean, - quote?: FeeQuote - ): Promise - - // Low-level methods to sign and send/relayer signed transactions separately. The combination of these methods - // is like calling just sendTransaction(..) above. Also note that sendSignedTransactions is identical - // to calling getRelayer().relay(signedTxs), but included in this interface for convenience. - abstract signTransactions( - txs: commons.transaction.Transactionish, - chainId?: ChainIdLike, - allSigners?: boolean - ): Promise - abstract sendSignedTransactions( - signedTxs: commons.transaction.SignedTransactionBundle, - chainId?: ChainIdLike, - quote?: FeeQuote - ): Promise - - // updateConfig will update the wallet image hash on-chain, aka deploying a smart wallet config to chain. If - // newConfig argument is undefined, then it will use the existing config. Config contents will also be - // automatically published to the authChain when updating the config image hash. - abstract updateConfig( - newConfig?: commons.config.Config - ): Promise<[commons.config.Config, commons.transaction.TransactionResponse | undefined]> - - // publishConfig will store the raw WalletConfig object on-chain, note: this may be expensive, - // and is only necessary for config data-availability, in case of Account the contents are published - // to the authChain. - abstract publishConfig(): Promise - - // isDeployed .. - abstract isDeployed(chainId?: ChainIdLike): Promise -} - -export type SignedTransactionsCallback = (signedTxs: commons.transaction.SignedTransactionBundle, metaTxnHash: string) => void - -export function isSequenceSigner(signer: any): signer is Signer { - const cand = signer as Signer - return cand && cand.updateConfig !== undefined && cand.publishConfig !== undefined && cand.getWalletConfig !== undefined -} - -// TODO: move to error.ts, along with others.. -export class InvalidSigner extends Error {} - -export class NotEnoughSigners extends Error {} diff --git a/old/packages/wallet/src/utils.ts b/old/packages/wallet/src/utils.ts deleted file mode 100644 index 9f4abf784..000000000 --- a/old/packages/wallet/src/utils.ts +++ /dev/null @@ -1,26 +0,0 @@ -import { ethers } from 'ethers' - -export async function resolveArrayProperties(object: Readonly | Readonly[]): Promise { - if (Array.isArray(object)) { - // T must include array type - return Promise.all(object.map(o => ethers.resolveProperties(o))) as any - } - - return ethers.resolveProperties(object) -} - -export async function findLatestLog(provider: ethers.Provider, filter: ethers.Filter): Promise { - const toBlock = filter.toBlock === 'latest' ? await provider.getBlockNumber() : (filter.toBlock as number) - const fromBlock = filter.fromBlock as number - - try { - const logs = await provider.getLogs({ ...filter, toBlock: toBlock }) - return logs.length === 0 ? undefined : logs[logs.length - 1] - } catch (e) { - // TODO Don't assume all errors are bad - const pivot = Math.floor((toBlock - fromBlock) / 2 + fromBlock) - const nhalf = await findLatestLog(provider, { ...filter, fromBlock: pivot, toBlock: toBlock }) - if (nhalf !== undefined) return nhalf - return findLatestLog(provider, { ...filter, fromBlock: fromBlock, toBlock: pivot }) - } -} diff --git a/old/packages/wallet/src/wallet.ts b/old/packages/wallet/src/wallet.ts deleted file mode 100644 index 554ad292a..000000000 --- a/old/packages/wallet/src/wallet.ts +++ /dev/null @@ -1,470 +0,0 @@ -import { ethers } from 'ethers' -import { commons, v1, v2 } from '@0xsequence/core' -import { ChainId } from '@0xsequence/network' -import { SignatureOrchestrator, SignerState, Status } from '@0xsequence/signhub' -import { encodeTypedDataDigest, subDigestOf } from '@0xsequence/utils' -import { FeeQuote, Relayer } from '@0xsequence/relayer' -import { walletContracts } from '@0xsequence/abi' - -import { resolveArrayProperties } from './utils' - -export type WalletOptions< - T extends commons.signature.Signature, - Y extends commons.config.Config, - Z extends commons.signature.UnrecoveredSignature -> = { - // Sequence version configurator - coders: { - config: commons.config.ConfigCoder - signature: commons.signature.SignatureCoder - } - - context: commons.context.WalletContext - config: Y - - chainId: ethers.BigNumberish - address: string - - orchestrator: SignatureOrchestrator - reader?: commons.reader.Reader - - provider?: ethers.Provider - relayer?: Relayer -} - -const statusToSignatureParts = (status: Status) => { - const parts = new Map() - - for (const signer of Object.keys(status.signers)) { - const value = status.signers[signer] - if (value.state === SignerState.SIGNED) { - const suffix = ethers.getBytes(value.suffix) - const suffixed = ethers.solidityPacked(['bytes', 'bytes'], [value.signature, suffix]) - - parts.set(signer, { signature: suffixed, isDynamic: suffix.length !== 1 || suffix[0] !== 2 }) - } - } - - return parts -} - -export type WalletV2 = Wallet -export type WalletV1 = Wallet - -/** - * The wallet is the minimum interface to interact with a single Sequence wallet/contract. - * it doesn't have any knowledge of any on-chain state, instead it relies solely on the information - * provided by the user. This building block is used to create higher level abstractions. - * - * Wallet can also be used to create Sequence wallets, but it's not recommended to use it directly. - */ -export class Wallet< - Y extends commons.config.Config = commons.config.Config, - T extends commons.signature.Signature = commons.signature.Signature, - Z extends commons.signature.UnrecoveredSignature = commons.signature.UnrecoveredSignature -> extends ethers.AbstractSigner { - public context: commons.context.WalletContext - public config: Y - public address: string - public chainId: bigint - - public relayer?: Relayer - - public coders: { - signature: commons.signature.SignatureCoder - config: commons.config.ConfigCoder - } - - private orchestrator: SignatureOrchestrator - private _reader?: commons.reader.Reader - - constructor(options: WalletOptions) { - const chainId = BigInt(options.chainId) - - if (chainId === 0n && !options.coders.signature.supportsNoChainId) { - throw new Error(`Sequence version ${options.config.version} doesn't support chainId 0`) - } - - super(options.provider ?? null) - - this.context = options.context - this.config = options.config - this.orchestrator = options.orchestrator - this.coders = options.coders - this.address = options.address - this.chainId = chainId - this.relayer = options.relayer - - this._reader = options.reader - } - - static newWallet< - Y extends commons.config.Config = commons.config.Config, - T extends commons.signature.Signature = commons.signature.Signature, - Z extends commons.signature.UnrecoveredSignature = commons.signature.UnrecoveredSignature - >(options: Omit, 'address'>): Wallet { - const address = commons.context.addressOf(options.context, options.coders.config.imageHashOf(options.config)) - return new Wallet({ ...options, address }) - } - - reader(): commons.reader.Reader { - if (this._reader) return this._reader - if (!this.provider) throw new Error('Wallet status provider requires a provider') - return new commons.reader.OnChainReader(this.provider) - } - - setConfig(config: Y) { - this.config = config - } - - setOrchestrator(orchestrator: SignatureOrchestrator) { - this.orchestrator = orchestrator - } - - setAddress(address: string) { - this.address = address - } - - getSigners(): Promise { - return this.orchestrator.getSigners() - } - - async getAddress(): Promise { - return this.address - } - - async decorateTransactions( - bundle: commons.transaction.IntendedTransactionBundle - ): Promise { - // Allow children to decorate - const decorated = await this.orchestrator.decorateTransactions(bundle) - - if (await this.reader().isDeployed(this.address)) { - // Deployed - No decorating at this level - return decorated - } - - const transactions: commons.transaction.Transaction[] = [ - { - to: decorated.entrypoint, - data: commons.transaction.encodeBundleExecData(decorated), - revertOnError: true - } - ] - - // Add deployment tx - const deployTx = await this.buildDeployTransaction() - if (deployTx) { - transactions.unshift(...deployTx.transactions) - } - - // TODO: If entrypoint is guestModule we can flatten the bundle - // and avoid calling guestModule twice - - return { - entrypoint: this.context.guestModule, - chainId: this.chainId, - intent: decorated.intent, - transactions - } - } - - async buildDeployTransaction( - metadata?: commons.WalletDeployMetadata - ): Promise { - if (metadata?.ignoreDeployed && (await this.reader().isDeployed(this.address))) { - return - } - - const imageHash = this.coders.config.imageHashOf(this.config) - - if (commons.context.addressOf(this.context, imageHash) !== this.address) { - throw new Error(`First address of config ${imageHash} doesn't match wallet address ${this.address}`) - } - - let gasLimit: bigint | undefined - switch (this.chainId) { - case BigInt(ChainId.SKALE_NEBULA): - gasLimit = 10000000n - break - } - - const bundle = Wallet.buildDeployTransaction(this.context, imageHash, gasLimit) - if (metadata?.includeChildren) { - const childBundle = await this.orchestrator.buildDeployTransaction(metadata) - if (childBundle) { - // Deploy children first - bundle.transactions = childBundle.transactions.concat(bundle.transactions) - } - } - return bundle - } - - async deploy(metadata?: commons.WalletDeployMetadata): Promise { - const deployTx = await this.buildDeployTransaction(metadata) - if (deployTx === undefined) { - // Already deployed - return - } - if (!this.relayer) throw new Error('Wallet deploy requires a relayer') - return this.relayer.relay({ - ...deployTx, - chainId: this.chainId, - intent: { - id: ethers.hexlify(ethers.randomBytes(32)), - wallet: this.address - } - }) - } - - static buildDeployTransaction( - context: commons.context.WalletContext, - imageHash: string, - gasLimit: ethers.BigNumberish = 100000n - ): commons.transaction.TransactionBundle { - const factoryInterface = new ethers.Interface(walletContracts.factory.abi) - - return { - entrypoint: context.guestModule, - transactions: [ - { - to: context.factory, - data: factoryInterface.encodeFunctionData(factoryInterface.getFunction('deploy')!, [context.mainModule, imageHash]), - gasLimit, - delegateCall: false, - revertOnError: true, - value: 0 - } - ] - } - } - - async buildUpdateConfigurationTransaction(config: Y): Promise { - if (this.coders.config.update.isKindUsed) { - const implementation = await this.reader().implementation(this.address) - const isLaterUpdate = implementation && implementation === this.context.mainModuleUpgradable - return this.coders.config.update.buildTransaction(this.address, config, this.context, isLaterUpdate ? 'later' : 'first') - } - - return this.coders.config.update.buildTransaction(this.address, config, this.context) - } - - async getNonce(space: ethers.BigNumberish = 0): Promise { - const nonce = await this.reader().nonce(this.address, space) - if (nonce === undefined) throw new Error('Unable to determine nonce') - return Number(nonce) - } - - async signDigest(digest: ethers.BytesLike, metadata?: object): Promise { - // The subdigest may be statically defined on the configuration - // in that case we just encode the proof, no need to sign anything - const subdigest = subDigestOf(this.address, this.chainId, digest) - if (this.coders.config.hasSubdigest(this.config, subdigest)) { - return this.coders.signature.encodeSigners(this.config, new Map(), [subdigest], this.chainId).encoded - } - - // We build the metadata object, this contains additional information - // that may be needed to sign the digest (by the other signers, or by the guard) - const childMetadata: commons.WalletSignRequestMetadata = { - ...metadata, // Keep other metadata fields - digest, - chainId: this.chainId, - address: this.address, - config: this.config - } - - // We ask the orchestrator to sign the digest, as soon as we have enough signature parts - // to reach the threshold we returns true, that means the orchestrator will stop asking - // and we can encode the final signature - const subdigestBytes = ethers.getBytes(subdigest) - const signature = await this.orchestrator.signMessage({ - candidates: this.coders.config.signersOf(this.config).map(s => s.address), - message: subdigestBytes, - metadata: childMetadata, - callback: (status: Status, onNewMetadata: (_metadata: object) => void): boolean => { - const parts = statusToSignatureParts(status) - - const newMetadata = { ...childMetadata, parts } - onNewMetadata(newMetadata) - - return this.coders.signature.hasEnoughSigningPower(this.config, parts) - } - }) - - const parts = statusToSignatureParts(signature) - return this.coders.signature.encodeSigners(this.config, parts, [], this.chainId).encoded - } - - signMessage(message: ethers.BytesLike): Promise { - return this.signDigest(ethers.keccak256(message), { message }) - } - - // XXX This method is not implemented in the original code but required by the AbstractSigner interface - signTypedData( - domain: ethers.TypedDataDomain, - types: Record, - value: Record - ): Promise { - const digest = encodeTypedDataDigest({ domain, types, message: value }) - return this.signDigest(digest) - } - - signTransactionBundle(bundle: commons.transaction.TransactionBundle): Promise { - if (bundle.entrypoint !== this.address) { - throw new Error(`Invalid entrypoint: ${bundle.entrypoint} !== ${this.address}`) - } - - return this.signTransactions(bundle.transactions, bundle.nonce) - } - - async fetchNonceOrSpace( - nonce?: ethers.BigNumberish | { space: ethers.BigNumberish } | { serial: boolean } - ): Promise { - let spaceValue - - if (nonce && (nonce as any).space !== undefined) { - // specified nonce "space" - spaceValue = BigInt((nonce as any).space) - } else if (nonce === undefined) { - // default is random, aka parallel - return this.randomNonce() - } else if (nonce && (nonce as any).serial === true) { - // next nonce determined from the chain - spaceValue = 0 - } else { - // specific nonce is used - return nonce as ethers.BigNumberish - } - - const resultNonce = await this.reader().nonce(this.address, spaceValue) - if (resultNonce === undefined) throw new Error('Unable to determine nonce') - return commons.transaction.encodeNonce(spaceValue, resultNonce) - } - - // Generate nonce with random space - randomNonce(): ethers.BigNumberish { - const randomNonceSpace = BigInt(ethers.hexlify(ethers.randomBytes(12))) - const randomNonce = commons.transaction.encodeNonce(randomNonceSpace, 0) - return randomNonce - } - - async signTransactions( - txs: commons.transaction.Transactionish, - nonce?: ethers.BigNumberish | { space: ethers.BigNumberish } | { serial: boolean }, - metadata?: object - ): Promise { - const transaction = await resolveArrayProperties(txs) - const transactions = commons.transaction.fromTransactionish(this.address, transaction) - - // NOTICE: If the `transactions` list is empty, then we add a dummy transaction - // otherwise the `TxExecuted` event will not be emitted, and we won't be able to - // find the transaction hash - if (transactions.length === 0) { - transactions.push({ - to: this.address, - data: '0x', - value: 0, - gasLimit: 0, - delegateCall: false, - revertOnError: true - }) - } - - const defaultedNonce = await this.fetchNonceOrSpace(nonce) - const digest = commons.transaction.digestOfTransactions(defaultedNonce, transactions) - const meta = { - digest, - transactions, - ...metadata - } - const signature = await this.signDigest(digest, meta) - - return { - intent: { - // Maybe is better if signDigest returns the subdigest directly - id: subDigestOf(this.address, this.chainId, digest), - wallet: this.address - }, - chainId: this.chainId, - transactions, - entrypoint: this.address, - nonce: defaultedNonce, - signature - } - } - - async sendSignedTransaction( - signedBundle: commons.transaction.IntendedTransactionBundle, - quote?: FeeQuote - ): Promise { - if (!this.relayer) throw new Error('Wallet sendTransaction requires a relayer') - return this.relayer.relay(signedBundle, quote) - } - - // sendTransaction will dispatch the transaction to the relayer for submission to the network. - // This method is able to send transactions in serial or parallel (default). You can specify - // a specific nonce, or let the wallet determine the next nonce on-chain (serial:true). - // - // By default, nonces are generated randomly and assigned so transactioned can be executed - // in parallel. However, if you'd like to execute serially, pass { serial: true } as an option. - async sendTransaction( - txs: commons.transaction.Transactionish, - options?: { - quote?: FeeQuote - nonce?: ethers.BigNumberish - serial?: boolean - } - ): Promise { - let nonce: ethers.BigNumberish | { serial: boolean } - if (options?.nonce !== undefined) { - // specific nonce is used - nonce = options.nonce - } else if (options?.serial) { - // next nonce on wallet is used and detected on-chain - nonce = { serial: true } - } else { - // default is random, aka parallel - nonce = this.randomNonce() - } - - const signed = await this.signTransactions(txs, nonce) - const decorated = await this.decorateTransactions(signed) - return this.sendSignedTransaction(decorated, options?.quote) - } - - async fillGasLimits(txs: commons.transaction.Transactionish): Promise { - const transaction = await resolveArrayProperties(txs) - const transactions = commons.transaction.fromTransactionish(this.address, transaction) - const relayer = this.relayer - if (!relayer) throw new Error('Wallet fillGasLimits requires a relayer') - - const simulations = await relayer.simulate(this.address, ...transactions) - return transactions.map((tx, i) => { - const gasLimit = tx.gasLimit ? Number(tx.gasLimit) : simulations[i].gasLimit - return { ...tx, ...simulations[i], gasLimit } - }) - } - - connect(provider: ethers.Provider, relayer?: Relayer): Wallet { - return new Wallet({ - // Sequence version configurator - coders: this.coders, - - context: this.context, - config: this.config, - - chainId: this.chainId, - address: this.address, - - orchestrator: this.orchestrator, - reader: this._reader, - - provider, - relayer: relayer ?? this.relayer - }) - } - - signTransaction(transaction: ethers.TransactionRequest): Promise { - throw new Error('Method not implemented.') - } -} diff --git a/old/packages/wallet/tests/utils/deploy-wallet-context.ts b/old/packages/wallet/tests/utils/deploy-wallet-context.ts deleted file mode 100644 index d09ee6160..000000000 --- a/old/packages/wallet/tests/utils/deploy-wallet-context.ts +++ /dev/null @@ -1,50 +0,0 @@ -import { ethers } from 'ethers' - -import { Factory, GuestModule, MainModule, MainModuleUpgradable, SequenceUtils } from '@0xsequence/wallet-contracts' - -const FactoryArtifact = require('@0xsequence/wallet-contracts/artifacts/contracts/Factory.sol/Factory.json') -const GuestModuleArtifact = require('@0xsequence/wallet-contracts/artifacts/contracts/modules/GuestModule.sol/GuestModule.json') -const MainModuleArtifact = require('@0xsequence/wallet-contracts/artifacts/contracts/modules/MainModule.sol/MainModule.json') -const MainModuleUpgradableArtifact = require('@0xsequence/wallet-contracts/artifacts/contracts/modules/MainModuleUpgradable.sol/MainModuleUpgradable.json') -const SequenceUtilsArtifact = require('@0xsequence/wallet-contracts/artifacts/contracts/modules/utils/SequenceUtils.sol/SequenceUtils.json') -const RequireFreshSignerArtifact = require('@0xsequence/wallet-contracts/artifacts/contracts/modules/utils/libs/RequireFreshSigner.sol/RequireFreshSigner.json') - -export async function deployWalletContext( - signer: ethers.Signer -): Promise<[Factory, MainModule, MainModuleUpgradable, GuestModule, SequenceUtils, ethers.BaseContract]> { - const factory = (await new ethers.ContractFactory( - FactoryArtifact.abi, - FactoryArtifact.bytecode, - signer - ).deploy()) as unknown as Factory - - const mainModule = (await new ethers.ContractFactory(MainModuleArtifact.abi, MainModuleArtifact.bytecode, signer).deploy( - factory.address - )) as unknown as MainModule - - const mainModuleUpgradable = (await new ethers.ContractFactory( - MainModuleUpgradableArtifact.abi, - MainModuleUpgradableArtifact.bytecode, - signer - ).deploy()) as unknown as MainModuleUpgradable - - const guestModule = (await new ethers.ContractFactory( - GuestModuleArtifact.abi, - GuestModuleArtifact.bytecode, - signer - ).deploy()) as unknown as GuestModule - - const sequenceUtils = (await new ethers.ContractFactory( - SequenceUtilsArtifact.abi, - SequenceUtilsArtifact.bytecode, - signer - ).deploy(factory.address, mainModule.address)) as unknown as SequenceUtils - - const requireFreshSigner = await new ethers.ContractFactory( - RequireFreshSignerArtifact.abi, - RequireFreshSignerArtifact.bytecode, - signer - ).deploy(sequenceUtils.address) - - return [factory, mainModule, mainModuleUpgradable, guestModule, sequenceUtils, requireFreshSigner] -} diff --git a/old/packages/wallet/tests/utils/get-contract.ts b/old/packages/wallet/tests/utils/get-contract.ts deleted file mode 100644 index e69de29bb..000000000 diff --git a/old/packages/wallet/tests/utils/index.ts b/old/packages/wallet/tests/utils/index.ts deleted file mode 100644 index f2d264926..000000000 --- a/old/packages/wallet/tests/utils/index.ts +++ /dev/null @@ -1,5 +0,0 @@ -import { ethers } from 'ethers' - -export async function encodeData(contract: ethers.Contract, method: string, ...args: any): Promise { - return (await contract[method].populateTransaction(...args)).data! -} diff --git a/old/packages/wallet/tests/wallet.spec.ts b/old/packages/wallet/tests/wallet.spec.ts deleted file mode 100644 index 99b571799..000000000 --- a/old/packages/wallet/tests/wallet.spec.ts +++ /dev/null @@ -1,619 +0,0 @@ -import hardhat from 'hardhat' -import * as chai from 'chai' - -import { walletContracts } from '@0xsequence/abi' -import { commons, v1, v2 } from '@0xsequence/core' -import { context } from '@0xsequence/tests' -import { ethers } from 'ethers' -import { SequenceOrchestratorWrapper, Wallet } from '../src/index' -import { Orchestrator, SignatureOrchestrator, signers as hubsigners } from '@0xsequence/signhub' -import { LocalRelayer } from '@0xsequence/relayer' -import { parseEther } from '@0xsequence/utils' -import { JsonRpcHandler } from '@0xsequence/network' - -const { expect } = chai - -type Coders = { - signature: commons.signature.SignatureCoder - config: commons.config.ConfigCoder -} - -describe('Wallet (primitive)', () => { - let provider: ethers.BrowserProvider - let signers: ethers.Signer[] - - let contexts: Awaited> - let relayer: LocalRelayer - - before(async () => { - // const rpc = new ethers.JsonRpcProvider('http://127.0.0.1:8545') - // provider = new ethers.BrowserProvider(new JsonRpcHandler(rpc)) - provider = new ethers.BrowserProvider(new JsonRpcHandler(hardhat.network.provider), undefined, { cacheTimeout: -1 }) - signers = await Promise.all(new Array(8).fill(0).map((_, i) => provider.getSigner(i))) - contexts = await context.deploySequenceContexts(signers[0]) - relayer = new LocalRelayer(signers[0]) - }) - - const config: { version: keyof typeof contexts; coders: Coders }[] = [ - { - version: 1, - coders: { signature: v1.signature.SignatureCoder, config: v1.config.ConfigCoder } - }, - { - version: 2, - coders: { signature: v2.signature.SignatureCoder, config: v2.config.ConfigCoder } - } - ] - - config.map(({ version, coders }) => { - describe(`Using v${version} version`, () => { - it('Should deploy a new wallet', async () => { - const signer = ethers.Wallet.createRandom() - - const config = coders.config.fromSimple({ - threshold: 1, - checkpoint: 0, - signers: [{ address: signer.address, weight: 1 }] - }) - - const network = await provider.getNetwork() - - const wallet = Wallet.newWallet({ - coders: coders, - context: contexts[version], - config, - orchestrator: new Orchestrator([new hubsigners.SignerWrapper(signer)]), - chainId: network.chainId, - provider, - relayer - }) - - await wallet.deploy() - - expect(await wallet.reader().isDeployed(wallet.address)).to.be.true - }) - - it('Should deploy children', async () => { - const network = await provider.getNetwork() - const nestedSigner = ethers.Wallet.createRandom() - const nestedConfig = coders.config.fromSimple({ - threshold: 1, - checkpoint: 0, - signers: [{ address: nestedSigner.address, weight: 1 }] - }) - const nestedOrchestrator = new Orchestrator([nestedSigner]) - const nestedWallet = Wallet.newWallet({ - coders: coders, - context: contexts[version], - config: nestedConfig, - orchestrator: nestedOrchestrator, - chainId: network.chainId, - provider, - relayer - }) - const config = coders.config.fromSimple({ - threshold: 1, - checkpoint: 0, - signers: [{ address: nestedWallet.address, weight: 1 }] - }) - const orchestrator = new Orchestrator([new SequenceOrchestratorWrapper(nestedWallet)]) - const wallet = Wallet.newWallet({ - coders: coders, - context: contexts[version], - config, - orchestrator, - chainId: network.chainId, - provider, - relayer - }) - - expect(await wallet.reader().isDeployed(wallet.address)).to.be.false - expect(await nestedWallet.reader().isDeployed(nestedWallet.address)).to.be.false - await wallet.deploy({ includeChildren: true, ignoreDeployed: true }) - expect(await wallet.reader().isDeployed(wallet.address)).to.be.true - expect(await nestedWallet.reader().isDeployed(wallet.address)).to.be.true - }) - - describe('Nonce selection', async () => { - let signer: ethers.HDNodeWallet - let wallet: Wallet - - let getNonce: (response: ethers.TransactionResponse) => { space: bigint; nonce: bigint } - - before(async () => { - const mainModule = new ethers.Interface(walletContracts.mainModule.abi) - - getNonce = ({ data }) => { - const [_, encoded] = mainModule.decodeFunctionData('execute', data) - const [space, nonce] = commons.transaction.decodeNonce(encoded) - return { space, nonce } - } - - signer = ethers.Wallet.createRandom() - - const network = await provider.getNetwork() - - wallet = Wallet.newWallet({ - coders, - context: contexts[version], - config: coders.config.fromSimple({ - threshold: 1, - checkpoint: 0, - signers: [{ weight: 1, address: signer.address }] - }), - chainId: network.chainId, - orchestrator: new Orchestrator([signer]), - provider, - relayer - }) - - await wallet.deploy({ includeChildren: true, ignoreDeployed: true }).then(tx => tx!.wait()) - - await signers[0].sendTransaction({ to: wallet.address, value: parseEther('1') }).then(tx => tx.wait()) - }) - - it('Should use explicitly set nonces', async () => { - let response = await wallet.sendTransaction( - { to: signers[0].getAddress(), value: 1 }, - { nonce: commons.transaction.encodeNonce(6492, 0) } - ) - - let { space, nonce } = getNonce(response) - - expect(space).to.equal(6492n) - expect(nonce).to.equal(0n) - - await response.wait() - - response = await wallet.sendTransaction( - { to: signers[0].getAddress(), value: 1 }, - { nonce: commons.transaction.encodeNonce(6492, 1) } - ) - - const encoded = getNonce(response) - space = encoded.space - nonce = encoded.nonce - - await response.wait() - - expect(space).to.equal(6492n) - expect(nonce).to.equal(1n) - }) - - it('Should select random nonces by default', async () => { - let response = await wallet.sendTransaction({ to: signers[0].getAddress(), value: 1 }) - - const { space: firstSpace, nonce: firstNonce } = getNonce(response) - - expect(firstSpace).to.not.equal(0n) - expect(firstNonce).to.equal(0n) - - // not necessary, parallel execution is ok: - // await response.wait() - - response = await wallet.sendTransaction({ to: signers[0].getAddress(), value: 1 }) - - const { space: secondSpace, nonce: secondNonce } = getNonce(response) - - expect(secondSpace).to.not.equal(0n) - expect(secondNonce).to.equal(0n) - - expect(secondSpace).to.not.equal(firstSpace) - }) - - it('Should respect the serial option', async () => { - let response = await wallet.sendTransaction({ to: signers[0].getAddress(), value: 1 }, { serial: true }) - - let { space, nonce } = getNonce(response) - - expect(space).to.equal(0n) - expect(nonce).to.equal(0n) - - await response.wait() - - response = await wallet.sendTransaction({ to: signers[0].getAddress(), value: 1 }, { serial: true }) - - const encoded = getNonce(response) - space = encoded.space - nonce = encoded.nonce - - await response.wait() - - expect(space).to.equal(0n) - expect(nonce).to.equal(1n) - }) - }) - - // - // Run tests using different combinations of signers - // - ;[ - { - name: '1/1 signer', - signers: () => { - const signer = ethers.Wallet.createRandom() - - const config = coders.config.fromSimple({ - threshold: 1, - checkpoint: 0, - signers: [{ address: signer.address, weight: 1 }] - }) - - const orchestrator = new Orchestrator([new hubsigners.SignerWrapper(signer)]) - - return { config, orchestrator } - } - }, - { - name: '1/2 signers', - signers: () => { - const signer = ethers.Wallet.createRandom() - const signers = [ - { - address: signer.address, - weight: 1 - }, - { - address: ethers.Wallet.createRandom().address, - weight: 1 - } - ].sort(() => (Math.random() > 0.5 ? 1 : -1)) - - const config = coders.config.fromSimple({ - threshold: 1, - checkpoint: 0, - signers - }) - - const orchestrator = new Orchestrator([new hubsigners.SignerWrapper(signer)]) - return { config, orchestrator } - } - }, - { - name: '2/4 signers', - signers: () => { - const members = new Array(4).fill(0).map(() => ethers.Wallet.createRandom()) - - const signers = members - .map(m => ({ - address: m.address, - weight: 2 - })) - .sort(() => (Math.random() > 0.5 ? 1 : -1)) - - const config = coders.config.fromSimple({ - threshold: 2, - checkpoint: 0, - signers - }) - - const orchestrator = new Orchestrator(members.slice(0, 2).map(m => new hubsigners.SignerWrapper(m))) - return { config, orchestrator } - } - }, - { - name: '11/90 signers', - signers: () => { - const members = new Array(90).fill(0).map(() => ethers.Wallet.createRandom()) - - const signers = members - .map(m => ({ - address: m.address, - weight: 1 - })) - .sort(() => (Math.random() > 0.5 ? 1 : -1)) - - const config = coders.config.fromSimple({ - threshold: 11, - checkpoint: 0, - signers - }) - - const orchestrator = new Orchestrator(members.slice(0, 11).map(m => new hubsigners.SignerWrapper(m))) - return { config, orchestrator } - } - }, - { - name: '1/1 signer (nested)', - signers: async () => { - const network = await provider.getNetwork() - - const nestedSigner = ethers.Wallet.createRandom() - - const nestedConfig = coders.config.fromSimple({ - threshold: 1, - checkpoint: 0, - signers: [{ address: nestedSigner.address, weight: 1 }] - }) - - const nestedOrchestrator = new Orchestrator([nestedSigner]) - const nestedWallet = Wallet.newWallet({ - coders: coders, - context: contexts[version], - config: nestedConfig, - orchestrator: nestedOrchestrator, - chainId: network.chainId, - provider, - relayer - }) - - await nestedWallet.deploy() - expect(await nestedWallet.reader().isDeployed(nestedWallet.address)).to.be.true - - const config = coders.config.fromSimple({ - threshold: 1, - checkpoint: 0, - signers: [{ address: nestedWallet.address, weight: 1 }] - }) - - const orchestrator = new Orchestrator([new SequenceOrchestratorWrapper(nestedWallet)]) - - return { config, orchestrator } - } - }, - { - name: '1/1 signer (undeployed nested)', - signers: async () => { - const network = await provider.getNetwork() - const nestedSigner = ethers.Wallet.createRandom() - - const nestedConfig = coders.config.fromSimple({ - threshold: 1, - checkpoint: 0, - signers: [{ address: nestedSigner.address, weight: 1 }] - }) - - const nestedOrchestrator = new Orchestrator([nestedSigner]) - const nestedWallet = Wallet.newWallet({ - coders: coders, - context: contexts[version], - config: nestedConfig, - orchestrator: nestedOrchestrator, - chainId: network.chainId, - provider, - relayer - }) - - expect(await nestedWallet.reader().isDeployed(nestedWallet.address)).to.be.false - - const config = coders.config.fromSimple({ - threshold: 1, - checkpoint: 0, - signers: [{ address: nestedWallet.address, weight: 1 }] - }) - - const orchestrator = new Orchestrator([new SequenceOrchestratorWrapper(nestedWallet)]) - - return { config, orchestrator } - } - } - ].map(({ name, signers }) => { - describe(`Using ${name}`, () => { - let orchestrator: SignatureOrchestrator - let config: commons.config.Config - - beforeEach(async () => { - const { config: _config, orchestrator: _orchestrator } = await signers() - config = _config - orchestrator = _orchestrator - }) - - // Skip this as we cannot validate a message with an undeployed nested wallet - if (name !== '1/1 signer (undeployed nested)') { - it('Should sign and validate a message', async () => { - const network = await provider.getNetwork() - const wallet = Wallet.newWallet({ - coders: coders, - context: contexts[version], - config, - orchestrator, - chainId: network.chainId, - provider, - relayer - }) - - await wallet.deploy() - expect(await wallet.reader().isDeployed(wallet.address)).to.be.true - - const message = ethers.toUtf8Bytes(`This is a random message: ${ethers.hexlify(ethers.randomBytes(96))}`) - - const signature = await wallet.signMessage(message) - const digest = ethers.keccak256(message) - - expect(await wallet.reader().isValidSignature(wallet.address, digest, signature)).to.be.true - }) - } - - // - // Run tests for deployed and undeployed wallets - // transactions should be decorated automatically - // - ;[ - { - name: 'After deployment', - setup: async (wallet: Wallet) => { - await wallet.deploy() - }, - deployed: true - }, - { - name: 'Before deployment', - setup: async (_: Wallet) => {}, - deployed: false - } - ].map(({ name, setup, deployed }) => { - describe(name, () => { - let wallet: Wallet - - beforeEach(async () => { - const network = await provider.getNetwork() - - wallet = Wallet.newWallet({ - coders: coders, - context: contexts[version], - config, - orchestrator, - chainId: network.chainId, - provider, - relayer - }) - - await setup(wallet) - }) - - it('Should send an empty list of transactions', async () => { - await wallet.sendTransaction([]).then(tx => tx.wait()) - }) - - it('Should send a transaction with an empty call', async () => { - await wallet - .sendTransaction([ - { - to: ethers.Wallet.createRandom().address - } - ]) - .then(tx => tx.wait()) - }) - - it('Should build and execute a wallet update transaction', async () => { - const newConfig = coders.config.fromSimple({ - threshold: 1, - checkpoint: 0, - signers: [ - { - address: ethers.Wallet.createRandom().address, - weight: 1 - } - ] - }) - - const updateTx = await wallet.buildUpdateConfigurationTransaction(newConfig) - - expect(updateTx.entrypoint).to.equal(wallet.address) - expect(updateTx.transactions[0].to).to.equal(wallet.address) - expect(updateTx.transactions[0].delegateCall).to.equal(false) - expect(updateTx.transactions[0].revertOnError).to.equal(true) - expect(updateTx.transactions[0].gasLimit).to.equal(0) - expect(updateTx.transactions[0].value).to.equal(0) - - if (version === 1) { - expect(updateTx.transactions.length).to.be.equal(2) - expect(updateTx.transactions[1].to).to.equal(wallet.address) - expect(updateTx.transactions[1].delegateCall).to.equal(false) - expect(updateTx.transactions[1].revertOnError).to.equal(true) - expect(updateTx.transactions[1].gasLimit).to.equal(0) - expect(updateTx.transactions[1].value).to.equal(0) - } else if (version === 2) { - expect(updateTx.transactions.length).to.be.equal(1) - } else { - throw new Error('Version not supported in test') - } - - const prevImplentation = await wallet.reader().implementation(wallet.address) - - await wallet.sendTransaction(updateTx.transactions).then(tx => tx.wait()) - - expect(await wallet.reader().imageHash(wallet.address)).to.equal(coders.config.imageHashOf(newConfig)) - expect(await wallet.reader().implementation(wallet.address)).to.not.equal(prevImplentation) - }) - - describe('parallel transactions', async () => { - let testAccount: ethers.JsonRpcSigner - let testAccountAddress: string - let toBalanceBefore: bigint - - beforeEach(async () => { - testAccount = await provider.getSigner(5) - testAccountAddress = await testAccount.getAddress() - - const ethAmount = parseEther('100') - const txResp = await testAccount - .sendTransaction({ - to: await wallet.getAddress(), - value: ethAmount - }) - .then(tx => tx.wait()) - toBalanceBefore = await provider.getBalance(testAccountAddress) - }) - - it('Should send an async transaction', async () => { - const ethAmount = parseEther('1.0') - - const tx: ethers.TransactionRequest = { - to: testAccountAddress, - value: ethAmount - } - - await wallet.sendTransaction(tx).then(tx => tx.wait()) - const toBalanceAfter = await provider.getBalance(testAccountAddress) - const sent = toBalanceAfter - toBalanceBefore - expect(sent).to.be.equal(ethAmount) - }) - - it('Should send two async transactions at once', async () => { - const ethAmount1 = parseEther('1.0') - const ethAmount2 = parseEther('2.0') - const ethAmount3 = parseEther('5.0') - - const tx1: ethers.TransactionRequest = { - to: testAccountAddress, - value: ethAmount1 - } - - const tx2: ethers.TransactionRequest = { - to: testAccountAddress, - value: ethAmount2 - } - - const tx3: ethers.TransactionRequest = { - to: testAccountAddress, - value: ethAmount3 - } - - // Send txns in parallel, but independently - await Promise.all([ - wallet.sendTransaction(tx1).then(tx => tx.wait()), - wallet.sendTransaction(tx2).then(tx => tx.wait()), - wallet.sendTransaction(tx3).then(tx => tx.wait()) - ]) - - const toBalanceAfter = await provider.getBalance(testAccountAddress) - const sent = toBalanceAfter - toBalanceBefore - expect(sent).to.be.equal(ethAmount1 + ethAmount2 + ethAmount3) - }) - - it('Should send multiple async transactions in one batch, async', async () => { - const ethAmount1 = parseEther('1.0') - const ethAmount2 = parseEther('2.0') - const ethAmount3 = parseEther('5.0') - - const tx1: ethers.TransactionRequest = { - to: testAccountAddress, - value: ethAmount1 - } - - const tx2: ethers.TransactionRequest = { - to: testAccountAddress, - value: ethAmount2 - } - - const tx3: ethers.TransactionRequest = { - to: testAccountAddress, - value: ethAmount3 - } - - // Send txns in parallel, but independently - await wallet.sendTransaction([tx1, tx2, tx3]).then(tx => tx.wait()) - - const toBalanceAfter = await provider.getBalance(testAccountAddress) - const sent = toBalanceAfter - toBalanceBefore - expect(sent).to.be.equal(ethAmount1 + ethAmount2 + ethAmount3) - }) - }) - }) - }) - }) - }) - }) - }) -}) diff --git a/old/pnpm-lock.yaml b/old/pnpm-lock.yaml deleted file mode 100644 index 4dac049e9..000000000 --- a/old/pnpm-lock.yaml +++ /dev/null @@ -1,17687 +0,0 @@ -lockfileVersion: '9.0' - -settings: - autoInstallPeers: true - excludeLinksFromLockfile: false - -overrides: - bufferutil: ^4.0.8 - node-forge@<1.0.0: '>=1.0.0' - node-forge@<1.3.0: '>=1.3.0' - got@<11.8.5: '>=11.8.5' - glob-parent@<5.1.2: '>=5.1.2' - -importers: - - .: - devDependencies: - '@0xsequence/abi': - specifier: workspace:* - version: link:packages/abi - '@0xsequence/api': - specifier: workspace:* - version: link:packages/api - '@0xsequence/auth': - specifier: workspace:* - version: link:packages/auth - '@0xsequence/deployer': - specifier: workspace:* - version: link:packages/deployer - '@0xsequence/guard': - specifier: workspace:* - version: link:packages/guard - '@0xsequence/indexer': - specifier: workspace:* - version: link:packages/indexer - '@0xsequence/marketplace': - specifier: workspace:* - version: link:packages/marketplace - '@0xsequence/metadata': - specifier: workspace:* - version: link:packages/metadata - '@0xsequence/network': - specifier: workspace:* - version: link:packages/network - '@0xsequence/provider': - specifier: workspace:* - version: link:packages/provider - '@0xsequence/relayer': - specifier: workspace:* - version: link:packages/relayer - '@0xsequence/utils': - specifier: workspace:* - version: link:packages/utils - '@0xsequence/wallet': - specifier: workspace:* - version: link:packages/wallet - '@babel/core': - specifier: ^7.21.4 - version: 7.25.9 - '@babel/plugin-transform-class-properties': - specifier: ^7.23.3 - version: 7.25.9(@babel/core@7.25.9) - '@babel/preset-env': - specifier: ^7.21.4 - version: 7.25.9(@babel/core@7.25.9) - '@babel/preset-typescript': - specifier: ^7.21.4 - version: 7.25.9(@babel/core@7.25.9) - '@babel/runtime': - specifier: ^7.26.10 - version: 7.26.10 - '@changesets/changelog-github': - specifier: ^0.5.0 - version: 0.5.0 - '@changesets/cli': - specifier: ^2.26.1 - version: 2.27.9 - '@nomicfoundation/hardhat-toolbox': - specifier: ^5.0.0 - version: 5.0.0(akrrydpj7boegc4sfckiephn7m) - '@preconstruct/cli': - specifier: ^2.8.9 - version: 2.8.9 - '@types/chai': - specifier: ^4.3.11 - version: 4.3.20 - '@types/chai-as-promised': - specifier: ^7.1.8 - version: 7.1.8 - '@types/mocha': - specifier: ^10.0.6 - version: 10.0.9 - '@types/node': - specifier: ^22.7.9 - version: 22.7.9 - '@typescript-eslint/eslint-plugin': - specifier: ^8.11.0 - version: 8.11.0(@typescript-eslint/parser@8.11.0(eslint@8.57.1)(typescript@5.6.3))(eslint@8.57.1)(typescript@5.6.3) - '@typescript-eslint/parser': - specifier: ^8.11.0 - version: 8.11.0(eslint@8.57.1)(typescript@5.6.3) - ava: - specifier: ^6.1.3 - version: 6.1.3 - chai: - specifier: ^4.3.10 - version: 4.5.0 - chai-as-promised: - specifier: ^7.1.1 - version: 7.1.2(chai@4.5.0) - concurrently: - specifier: ^9.0.1 - version: 9.0.1 - eslint: - specifier: ^8.39.0 - version: 8.57.1 - eslint-config-prettier: - specifier: ^9.1.0 - version: 9.1.0(eslint@8.57.1) - eslint-plugin-import: - specifier: ^2.27.5 - version: 2.31.0(@typescript-eslint/parser@8.11.0(eslint@8.57.1)(typescript@5.6.3))(eslint@8.57.1) - eslint-plugin-prettier: - specifier: ^5.0.1 - version: 5.2.1(eslint-config-prettier@9.1.0(eslint@8.57.1))(eslint@8.57.1)(prettier@3.3.3) - ethers: - specifier: 6.13.4 - version: 6.13.4(bufferutil@4.0.8)(utf-8-validate@5.0.10) - express: - specifier: ^4.18.2 - version: 4.21.1(supports-color@6.1.0) - hardhat: - specifier: ^2.22.14 - version: 2.22.14(bufferutil@4.0.8)(ts-node@10.9.2(@types/node@22.7.9)(typescript@5.6.3))(typescript@5.6.3)(utf-8-validate@5.0.10) - husky: - specifier: ^8.0.0 - version: 8.0.3 - mocha: - specifier: ^10.1.0 - version: 10.7.3 - nyc: - specifier: ^17.1.0 - version: 17.1.0 - prettier: - specifier: ^3.0.0 - version: 3.3.3 - puppeteer: - specifier: ^23.10.3 - version: 23.10.3(bufferutil@4.0.8)(typescript@5.6.3)(utf-8-validate@5.0.10) - rimraf: - specifier: ^6.0.1 - version: 6.0.1 - ts-node: - specifier: ^10.9.2 - version: 10.9.2(@types/node@22.7.9)(typescript@5.6.3) - tsx: - specifier: ^4.19.1 - version: 4.19.1 - typescript: - specifier: ~5.6.3 - version: 5.6.3 - wait-on: - specifier: ^8.0.1 - version: 8.0.1 - - packages/0xsequence: - dependencies: - '@0xsequence/abi': - specifier: workspace:* - version: link:../abi - '@0xsequence/account': - specifier: workspace:* - version: link:../account - '@0xsequence/api': - specifier: workspace:* - version: link:../api - '@0xsequence/auth': - specifier: workspace:* - version: link:../auth - '@0xsequence/core': - specifier: workspace:* - version: link:../core - '@0xsequence/guard': - specifier: workspace:* - version: link:../guard - '@0xsequence/indexer': - specifier: workspace:* - version: link:../indexer - '@0xsequence/metadata': - specifier: workspace:* - version: link:../metadata - '@0xsequence/migration': - specifier: workspace:* - version: link:../migration - '@0xsequence/network': - specifier: workspace:* - version: link:../network - '@0xsequence/provider': - specifier: workspace:* - version: link:../provider - '@0xsequence/relayer': - specifier: workspace:* - version: link:../relayer - '@0xsequence/sessions': - specifier: workspace:* - version: link:../sessions - '@0xsequence/signhub': - specifier: workspace:* - version: link:../signhub - '@0xsequence/utils': - specifier: workspace:* - version: link:../utils - '@0xsequence/wallet': - specifier: workspace:* - version: link:../wallet - devDependencies: - '@0xsequence/tests': - specifier: workspace:* - version: link:../tests - '@0xsequence/wallet-contracts': - specifier: ^3.0.1 - version: 3.0.1(bufferutil@4.0.8)(typechain@8.3.2(typescript@5.6.3))(typescript@5.6.3)(utf-8-validate@6.0.3) - '@babel/plugin-transform-runtime': - specifier: ^7.19.6 - version: 7.25.9(@babel/core@7.25.9) - babel-loader: - specifier: ^9.1.0 - version: 9.2.1(@babel/core@7.25.9)(webpack@5.95.0) - ethers: - specifier: 6.13.4 - version: 6.13.4(bufferutil@4.0.8)(utf-8-validate@6.0.3) - ganache: - specifier: ^7.5.0 - version: 7.9.2 - hardhat: - specifier: ^2.22.14 - version: 2.22.14(bufferutil@4.0.8)(ts-node@10.9.2(@types/node@22.13.10)(typescript@5.6.3))(typescript@5.6.3)(utf-8-validate@6.0.3) - html-webpack-plugin: - specifier: ^5.3.1 - version: 5.6.3(webpack@5.95.0) - webpack: - specifier: ^5.65.0 - version: 5.95.0(webpack-cli@4.10.0) - webpack-cli: - specifier: ^4.6.0 - version: 4.10.0(webpack-dev-server@3.11.3)(webpack@5.95.0) - webpack-dev-server: - specifier: ^3.11.2 - version: 3.11.3(bufferutil@4.0.8)(utf-8-validate@6.0.3)(webpack-cli@4.10.0)(webpack@5.95.0) - - packages/abi: {} - - packages/account: - dependencies: - '@0xsequence/abi': - specifier: workspace:* - version: link:../abi - '@0xsequence/core': - specifier: workspace:* - version: link:../core - '@0xsequence/migration': - specifier: workspace:* - version: link:../migration - '@0xsequence/network': - specifier: workspace:* - version: link:../network - '@0xsequence/relayer': - specifier: workspace:* - version: link:../relayer - '@0xsequence/sessions': - specifier: workspace:* - version: link:../sessions - '@0xsequence/utils': - specifier: workspace:* - version: link:../utils - '@0xsequence/wallet': - specifier: workspace:* - version: link:../wallet - devDependencies: - '@0xsequence/signhub': - specifier: workspace:* - version: link:../signhub - '@0xsequence/tests': - specifier: workspace:* - version: link:../tests - '@istanbuljs/nyc-config-typescript': - specifier: ^1.0.2 - version: 1.0.2(nyc@15.1.0) - ethers: - specifier: 6.13.4 - version: 6.13.4(bufferutil@4.0.8)(utf-8-validate@6.0.3) - nyc: - specifier: ^15.1.0 - version: 15.1.0 - - packages/api: {} - - packages/auth: - dependencies: - '@0xsequence/abi': - specifier: workspace:* - version: link:../abi - '@0xsequence/account': - specifier: workspace:* - version: link:../account - '@0xsequence/api': - specifier: workspace:* - version: link:../api - '@0xsequence/core': - specifier: workspace:* - version: link:../core - '@0xsequence/ethauth': - specifier: ^1.0.0 - version: 1.0.0(ethers@6.13.4(bufferutil@4.0.8)(utf-8-validate@5.0.10)) - '@0xsequence/indexer': - specifier: workspace:* - version: link:../indexer - '@0xsequence/metadata': - specifier: workspace:* - version: link:../metadata - '@0xsequence/migration': - specifier: workspace:* - version: link:../migration - '@0xsequence/network': - specifier: workspace:* - version: link:../network - '@0xsequence/sessions': - specifier: workspace:* - version: link:../sessions - '@0xsequence/signhub': - specifier: workspace:* - version: link:../signhub - '@0xsequence/utils': - specifier: workspace:* - version: link:../utils - '@0xsequence/wallet': - specifier: workspace:* - version: link:../wallet - devDependencies: - '@0xsequence/tests': - specifier: workspace:* - version: link:../tests - '@0xsequence/wallet-contracts': - specifier: ^3.0.1 - version: 3.0.1(bufferutil@4.0.8)(typechain@8.3.2(typescript@5.6.3))(typescript@5.6.3)(utf-8-validate@5.0.10) - concurrently: - specifier: ^9.0.1 - version: 9.0.1 - ethers: - specifier: 6.13.4 - version: 6.13.4(bufferutil@4.0.8)(utf-8-validate@5.0.10) - hardhat: - specifier: ^2.22.14 - version: 2.22.14(bufferutil@4.0.8)(ts-node@10.9.2(@types/node@22.13.10)(typescript@5.6.3))(typescript@5.6.3)(utf-8-validate@5.0.10) - mockttp: - specifier: ^3.6.0 - version: 3.15.3(bufferutil@4.0.8)(utf-8-validate@5.0.10) - - packages/builder: {} - - packages/core: - dependencies: - '@0xsequence/abi': - specifier: workspace:* - version: link:../abi - '@0xsequence/utils': - specifier: workspace:* - version: link:../utils - devDependencies: - '@istanbuljs/nyc-config-typescript': - specifier: ^1.0.2 - version: 1.0.2(nyc@15.1.0) - ethers: - specifier: 6.13.4 - version: 6.13.4(bufferutil@4.0.8)(utf-8-validate@6.0.3) - nyc: - specifier: ^15.1.0 - version: 15.1.0 - - packages/deployer: - dependencies: - '@0xsequence/utils': - specifier: workspace:* - version: link:../utils - devDependencies: - dotenv: - specifier: ^16.0.3 - version: 16.4.5 - ethers: - specifier: 6.13.4 - version: 6.13.4(bufferutil@4.0.8)(utf-8-validate@6.0.3) - typechain: - specifier: ^8.1.1 - version: 8.3.2(typescript@5.6.3) - - packages/guard: - dependencies: - '@0xsequence/account': - specifier: workspace:* - version: link:../account - '@0xsequence/core': - specifier: workspace:* - version: link:../core - '@0xsequence/signhub': - specifier: workspace:* - version: link:../signhub - '@0xsequence/utils': - specifier: workspace:* - version: link:../utils - devDependencies: - ethers: - specifier: 6.13.4 - version: 6.13.4(bufferutil@4.0.8)(utf-8-validate@6.0.3) - - packages/indexer: {} - - packages/marketplace: {} - - packages/metadata: {} - - packages/migration: - dependencies: - '@0xsequence/abi': - specifier: workspace:* - version: link:../abi - '@0xsequence/core': - specifier: workspace:* - version: link:../core - '@0xsequence/wallet': - specifier: workspace:* - version: link:../wallet - devDependencies: - '@istanbuljs/nyc-config-typescript': - specifier: ^1.0.2 - version: 1.0.2(nyc@15.1.0) - ethers: - specifier: 6.13.4 - version: 6.13.4(bufferutil@4.0.8)(utf-8-validate@6.0.3) - nyc: - specifier: ^15.1.0 - version: 15.1.0 - - packages/network: - dependencies: - '@0xsequence/core': - specifier: workspace:* - version: link:../core - '@0xsequence/indexer': - specifier: workspace:* - version: link:../indexer - '@0xsequence/relayer': - specifier: workspace:* - version: link:../relayer - '@0xsequence/utils': - specifier: workspace:* - version: link:../utils - devDependencies: - ethers: - specifier: 6.13.4 - version: 6.13.4(bufferutil@4.0.8)(utf-8-validate@6.0.3) - - packages/provider: - dependencies: - '@0xsequence/abi': - specifier: workspace:* - version: link:../abi - '@0xsequence/account': - specifier: workspace:* - version: link:../account - '@0xsequence/auth': - specifier: workspace:* - version: link:../auth - '@0xsequence/core': - specifier: workspace:* - version: link:../core - '@0xsequence/migration': - specifier: workspace:* - version: link:../migration - '@0xsequence/network': - specifier: workspace:* - version: link:../network - '@0xsequence/relayer': - specifier: workspace:* - version: link:../relayer - '@0xsequence/utils': - specifier: workspace:* - version: link:../utils - '@0xsequence/wallet': - specifier: workspace:* - version: link:../wallet - '@databeat/tracker': - specifier: ^0.9.3 - version: 0.9.3 - eventemitter2: - specifier: ^6.4.5 - version: 6.4.9 - webextension-polyfill: - specifier: ^0.10.0 - version: 0.10.0 - devDependencies: - '@types/webextension-polyfill': - specifier: ^0.10.0 - version: 0.10.7 - ethers: - specifier: 6.13.4 - version: 6.13.4(bufferutil@4.0.8)(utf-8-validate@5.0.10) - hardhat: - specifier: ^2.22.14 - version: 2.22.14(bufferutil@4.0.8)(ts-node@10.9.2(@types/node@22.13.10)(typescript@5.6.3))(typescript@5.6.3)(utf-8-validate@5.0.10) - - packages/react-native: - dependencies: - '@0xsequence/waas': - specifier: workspace:* - version: link:../waas - react-native-keychain: - specifier: ^8.2.0 - version: 8.2.0 - - packages/relayer: - dependencies: - '@0xsequence/abi': - specifier: workspace:* - version: link:../abi - '@0xsequence/core': - specifier: workspace:* - version: link:../core - '@0xsequence/utils': - specifier: workspace:* - version: link:../utils - devDependencies: - '@0xsequence/signhub': - specifier: workspace:* - version: link:../signhub - '@0xsequence/tests': - specifier: workspace:* - version: link:../tests - '@0xsequence/wallet-contracts': - specifier: ^3.0.1 - version: 3.0.1(bufferutil@4.0.8)(typechain@8.3.2(typescript@5.6.3))(typescript@5.6.3)(utf-8-validate@6.0.3) - ethers: - specifier: 6.13.4 - version: 6.13.4(bufferutil@4.0.8)(utf-8-validate@6.0.3) - - packages/replacer: - dependencies: - '@0xsequence/abi': - specifier: workspace:* - version: link:../abi - '@0xsequence/core': - specifier: workspace:* - version: link:../core - ethers: - specifier: '>=6' - version: 6.13.4(bufferutil@4.0.8)(utf-8-validate@6.0.3) - - packages/sessions: - dependencies: - '@0xsequence/core': - specifier: workspace:* - version: link:../core - '@0xsequence/migration': - specifier: workspace:* - version: link:../migration - '@0xsequence/replacer': - specifier: workspace:* - version: link:../replacer - '@0xsequence/utils': - specifier: workspace:* - version: link:../utils - idb: - specifier: ^7.1.1 - version: 7.1.1 - devDependencies: - '@0xsequence/signhub': - specifier: workspace:* - version: link:../signhub - '@0xsequence/tests': - specifier: workspace:* - version: link:../tests - '@istanbuljs/nyc-config-typescript': - specifier: ^1.0.2 - version: 1.0.2(nyc@15.1.0) - ethers: - specifier: 6.13.4 - version: 6.13.4(bufferutil@4.0.8)(utf-8-validate@6.0.3) - fake-indexeddb: - specifier: ^4.0.1 - version: 4.0.2 - nyc: - specifier: ^15.1.0 - version: 15.1.0 - - packages/signhub: - dependencies: - '@0xsequence/core': - specifier: workspace:* - version: link:../core - devDependencies: - '@istanbuljs/nyc-config-typescript': - specifier: ^1.0.2 - version: 1.0.2(nyc@15.1.0) - ethers: - specifier: 6.13.4 - version: 6.13.4(bufferutil@4.0.8)(utf-8-validate@6.0.3) - nyc: - specifier: ^15.1.0 - version: 15.1.0 - - packages/tests: - dependencies: - '@0xsequence/core': - specifier: workspace:* - version: link:../core - '@0xsequence/utils': - specifier: workspace:* - version: link:../utils - devDependencies: - '@istanbuljs/nyc-config-typescript': - specifier: ^1.0.1 - version: 1.0.2(nyc@17.1.0) - ethers: - specifier: 6.13.4 - version: 6.13.4(bufferutil@4.0.8)(utf-8-validate@5.0.10) - web3: - specifier: ^1.8.1 - version: 1.10.4(bufferutil@4.0.8)(utf-8-validate@5.0.10) - - packages/utils: - dependencies: - js-base64: - specifier: ^3.7.2 - version: 3.7.7 - devDependencies: - ethers: - specifier: 6.13.4 - version: 6.13.4(bufferutil@4.0.8)(utf-8-validate@6.0.3) - - packages/waas: - dependencies: - '@0xsequence/core': - specifier: workspace:* - version: link:../core - '@0xsequence/network': - specifier: workspace:* - version: link:../network - '@0xsequence/utils': - specifier: workspace:* - version: link:../utils - '@aws-sdk/client-cognito-identity-provider': - specifier: ^3.445.0 - version: 3.678.0 - idb: - specifier: ^7.1.1 - version: 7.1.1 - json-canonicalize: - specifier: ^1.0.6 - version: 1.0.6 - jwt-decode: - specifier: ^4.0.0 - version: 4.0.0 - devDependencies: - '@types/jwt-decode': - specifier: ^3.1.0 - version: 3.1.0 - ethers: - specifier: 6.13.4 - version: 6.13.4(bufferutil@4.0.8)(utf-8-validate@6.0.3) - fake-indexeddb: - specifier: ^4.0.1 - version: 4.0.2 - - packages/waas-ethers: - dependencies: - '@0xsequence/waas': - specifier: workspace:* - version: link:../waas - devDependencies: - ethers: - specifier: 6.13.4 - version: 6.13.4(bufferutil@4.0.8)(utf-8-validate@6.0.3) - - packages/wallet: - dependencies: - '@0xsequence/abi': - specifier: workspace:* - version: link:../abi - '@0xsequence/core': - specifier: workspace:* - version: link:../core - '@0xsequence/network': - specifier: workspace:* - version: link:../network - '@0xsequence/relayer': - specifier: workspace:* - version: link:../relayer - '@0xsequence/signhub': - specifier: workspace:* - version: link:../signhub - '@0xsequence/utils': - specifier: workspace:* - version: link:../utils - devDependencies: - '@0xsequence/ethauth': - specifier: ^1.0.0 - version: 1.0.0(ethers@6.13.4(bufferutil@4.0.8)(utf-8-validate@5.0.10)) - '@0xsequence/tests': - specifier: workspace:* - version: link:../tests - '@0xsequence/wallet-contracts': - specifier: ^3.0.1 - version: 3.0.1(bufferutil@4.0.8)(typechain@8.3.2(typescript@5.6.3))(typescript@5.6.3)(utf-8-validate@5.0.10) - '@istanbuljs/nyc-config-typescript': - specifier: ^1.0.1 - version: 1.0.2(nyc@17.1.0) - ethers: - specifier: 6.13.4 - version: 6.13.4(bufferutil@4.0.8)(utf-8-validate@5.0.10) - web3: - specifier: ^1.8.1 - version: 1.10.4(bufferutil@4.0.8)(utf-8-validate@5.0.10) - -packages: - - '@0xsequence/ethauth@1.0.0': - resolution: {integrity: sha512-piihXzbS8Sq7P670a+GyTm3igTJL3Ts6pqjJcC0Sv86yqeK6QD0pzJP4APP+/IQa5k+0s2l1SeZwMjR7gSPtCA==} - peerDependencies: - ethers: '>=6' - - '@0xsequence/wallet-contracts@3.0.1': - resolution: {integrity: sha512-ZvZdXPE1KOYVjl9J6UdN/eBqEmuYHvlO4EUxDxG7VqCgrSiVP9S8k+mEN4aUMzOiYGwKcYY/HIkD211mvxseZQ==} - - '@adraffy/ens-normalize@1.10.1': - resolution: {integrity: sha512-96Z2IP3mYmF1Xg2cDm8f1gWGf/HUVedQ3FMifV4kG/PQ4yEP51xDtRAEfhVNt5f/uzpNkZHwWQuUcu6D6K+Ekw==} - - '@ampproject/remapping@2.3.0': - resolution: {integrity: sha512-30iZtAPgz+LTIYoeivqYo853f02jBYSd5uGnGpkFV0M3xOt9aN73erkgYAmZU43x4VfqcnLxW9Kpg3R5LC4YYw==} - engines: {node: '>=6.0.0'} - - '@aws-crypto/sha256-browser@5.2.0': - resolution: {integrity: sha512-AXfN/lGotSQwu6HNcEsIASo7kWXZ5HYWvfOmSNKDsEqC4OashTp8alTmaz+F7TC2L083SFv5RdB+qU3Vs1kZqw==} - - '@aws-crypto/sha256-js@5.2.0': - resolution: {integrity: sha512-FFQQyu7edu4ufvIZ+OadFpHHOt+eSTBaYaki44c+akjg7qZg9oOQeLlk77F6tSYqjDAFClrHJk9tMf0HdVyOvA==} - engines: {node: '>=16.0.0'} - - '@aws-crypto/supports-web-crypto@5.2.0': - resolution: {integrity: sha512-iAvUotm021kM33eCdNfwIN//F77/IADDSs58i+MDaOqFrVjZo9bAal0NK7HurRuWLLpF1iLX7gbWrjHjeo+YFg==} - - '@aws-crypto/util@5.2.0': - resolution: {integrity: sha512-4RkU9EsI6ZpBve5fseQlGNUWKMa1RLPQ1dnjnQoe07ldfIzcsGb5hC5W0Dm7u423KWzawlrpbjXBrXCEv9zazQ==} - - '@aws-sdk/client-cognito-identity-provider@3.678.0': - resolution: {integrity: sha512-dIfTuBoDvEjoPku043AdEWqcsPHkD6qLOvRUBf0I3YpAcZwdhXVJ1Z76KP16IwKHxLOszVx5U3BYOg0zuTmTag==} - engines: {node: '>=16.0.0'} - - '@aws-sdk/client-sso-oidc@3.678.0': - resolution: {integrity: sha512-sgj9Y4zGiwLePLDjqhGoghoZgseh88JkKkwWH558IIte/cf/ix7ezOvptnA0WUlI5Z/329LtkN6O8TRqSJ7MWw==} - engines: {node: '>=16.0.0'} - peerDependencies: - '@aws-sdk/client-sts': ^3.678.0 - - '@aws-sdk/client-sso@3.678.0': - resolution: {integrity: sha512-5Fg2BkR1En8iBbiZ18STvLDGPK9Re5MyCmX+hfIhQzPsEf1FRkAkOluEXX79aBva8iWn2oCD/xKBUku4x3eusw==} - engines: {node: '>=16.0.0'} - - '@aws-sdk/client-sts@3.678.0': - resolution: {integrity: sha512-oRtDnbqIuTbBq0xd7XlaugDA41EqRFzWLpPNr4uwkH8L7xwtIByfJG/qXx2OtOiFFasAhMWJLu/DDqWZyp819A==} - engines: {node: '>=16.0.0'} - - '@aws-sdk/core@3.678.0': - resolution: {integrity: sha512-ZTzybFZqSaPQymgRkTl08vk6xilaxr8LnJOc0h3KhcHLK4TJmdOcxqPpa6QxrBKcn2rmxzGiPRbAHLGI+BIxBw==} - engines: {node: '>=16.0.0'} - - '@aws-sdk/credential-provider-env@3.678.0': - resolution: {integrity: sha512-29uhXAB7uJqHtvJ2U3pi1YkMfv0WefW9EmSMoFAunjudXXBVktwTlWg0lyCM+KHrGKLkQyfs5UF/A9IelS8tdQ==} - engines: {node: '>=16.0.0'} - - '@aws-sdk/credential-provider-http@3.678.0': - resolution: {integrity: sha512-EvpmP0nc7ddRp0qwJOSu0uBXa+MMk4+OLlyEJcdaHnZI4/BoyVWr5fJUD5eQYZk11LZPZSvnsliYXWwLyVNXHQ==} - engines: {node: '>=16.0.0'} - - '@aws-sdk/credential-provider-ini@3.678.0': - resolution: {integrity: sha512-8kHy7V5rRO73EpBCUclykP9T/QIBVi0SkQsc88ZRxpdh59/JY2N6DT5khMTzrz9+Vvlw3FDMJN4AI/qWjJHhdw==} - engines: {node: '>=16.0.0'} - peerDependencies: - '@aws-sdk/client-sts': ^3.678.0 - - '@aws-sdk/credential-provider-node@3.678.0': - resolution: {integrity: sha512-KGRBVD/oNr/aD+Wy5zc5AjfeSv5b4ahAu5eAUbOz+eGjGpGgrMtjY+R2rDY/3i3wFj9/DvOIfFGeZQMwtDzIuA==} - engines: {node: '>=16.0.0'} - - '@aws-sdk/credential-provider-process@3.678.0': - resolution: {integrity: sha512-5TpzzHKwPOvUJig0bvTt+brtXfLPaSVLwea9re+XGrS5T6Hz65IaX2RL6uY1GQ0UVOqgwQ5nAti1WOfBoSJ5BA==} - engines: {node: '>=16.0.0'} - - '@aws-sdk/credential-provider-sso@3.678.0': - resolution: {integrity: sha512-PXydLUsLYd1rkhZ7zwf0613u5sofxIEhh7C1QGP1MSY3L1jt8bu7pZIcMzubfvmaGZI5k84aHhhjQEiAJUxIMg==} - engines: {node: '>=16.0.0'} - - '@aws-sdk/credential-provider-web-identity@3.678.0': - resolution: {integrity: sha512-fcYZjTTFcef99l+BhcEAhHS4tEK1kE6Xj5Zz5lT4tFA07BkQt3d6kUKRVVfJnsbcHH4RDBUCnLhU8HPfc/kvjA==} - engines: {node: '>=16.0.0'} - peerDependencies: - '@aws-sdk/client-sts': ^3.678.0 - - '@aws-sdk/middleware-host-header@3.667.0': - resolution: {integrity: sha512-Z7fIAMQnPegs7JjAQvlOeWXwpMRfegh5eCoIP6VLJIeR6DLfYKbP35JBtt98R6DXslrN2RsbTogjbxPEDQfw1w==} - engines: {node: '>=16.0.0'} - - '@aws-sdk/middleware-logger@3.667.0': - resolution: {integrity: sha512-PtTRNpNm/5c746jRgZCNg4X9xEJIwggkGJrF0GP9AB1ANg4pc/sF2Fvn1NtqPe9wtQ2stunJprnm5WkCHN7QiA==} - engines: {node: '>=16.0.0'} - - '@aws-sdk/middleware-recursion-detection@3.667.0': - resolution: {integrity: sha512-U5glWD3ehFohzpUpopLtmqAlDurGWo2wRGPNgi4SwhWU7UDt6LS7E/UvJjqC0CUrjlzOw+my2A+Ncf+fisMhxQ==} - engines: {node: '>=16.0.0'} - - '@aws-sdk/middleware-user-agent@3.678.0': - resolution: {integrity: sha512-tg9cC5COgGP0cznD2ys9kxPtVeKUygPZshDWXLAfA/cH/4m2ZUBvoEVv1SxkIbvOjnPwa976rdPLQUwRZvsL0g==} - engines: {node: '>=16.0.0'} - - '@aws-sdk/region-config-resolver@3.667.0': - resolution: {integrity: sha512-iNr+JhhA902JMKHG9IwT9YdaEx6KGl6vjAL5BRNeOjfj4cZYMog6Lz/IlfOAltMtT0w88DAHDEFrBd2uO0l2eg==} - engines: {node: '>=16.0.0'} - - '@aws-sdk/token-providers@3.667.0': - resolution: {integrity: sha512-ZecJlG8p6D4UTYlBHwOWX6nknVtw/OBJ3yPXTSajBjhUlj9lE2xvejI8gl4rqkyLXk7z3bki+KR4tATbMaM9yg==} - engines: {node: '>=16.0.0'} - peerDependencies: - '@aws-sdk/client-sso-oidc': ^3.667.0 - - '@aws-sdk/types@3.667.0': - resolution: {integrity: sha512-gYq0xCsqFfQaSL/yT1Gl1vIUjtsg7d7RhnUfsXaHt8xTxOKRTdH9GjbesBjXOzgOvB0W0vfssfreSNGFlOOMJg==} - engines: {node: '>=16.0.0'} - - '@aws-sdk/util-endpoints@3.667.0': - resolution: {integrity: sha512-X22SYDAuQJWnkF1/q17pkX3nGw5XMD9YEUbmt87vUnRq7iyJ3JOpl6UKOBeUBaL838wA5yzdbinmCITJ/VZ1QA==} - engines: {node: '>=16.0.0'} - - '@aws-sdk/util-locate-window@3.568.0': - resolution: {integrity: sha512-3nh4TINkXYr+H41QaPelCceEB2FXP3fxp93YZXB/kqJvX0U9j0N0Uk45gvsjmEPzG8XxkPEeLIfT2I1M7A6Lig==} - engines: {node: '>=16.0.0'} - - '@aws-sdk/util-user-agent-browser@3.675.0': - resolution: {integrity: sha512-HW4vGfRiX54RLcsYjLuAhcBBJ6lRVEZd7njfGpAwBB9s7BH8t48vrpYbyA5XbbqbTvXfYBnugQCUw9HWjEa1ww==} - - '@aws-sdk/util-user-agent-node@3.678.0': - resolution: {integrity: sha512-bKRemCdHMPAlEYE9KuQiMQG9/b4n8C+9DlJAL/X00Q7Zvm9Gv6h0+i5EZ+Xx8sbHq5oUv9a4W4tb+nkUZ0ltpw==} - engines: {node: '>=16.0.0'} - peerDependencies: - aws-crt: '>=1.0.0' - peerDependenciesMeta: - aws-crt: - optional: true - - '@babel/code-frame@7.25.9': - resolution: {integrity: sha512-z88xeGxnzehn2sqZ8UdGQEvYErF1odv2CftxInpSYJt6uHuPe9YjahKZITGs3l5LeI9d2ROG+obuDAoSlqbNfQ==} - engines: {node: '>=6.9.0'} - - '@babel/compat-data@7.25.9': - resolution: {integrity: sha512-yD+hEuJ/+wAJ4Ox2/rpNv5HIuPG82x3ZlQvYVn8iYCprdxzE7P1udpGF1jyjQVBU4dgznN+k2h103vxZ7NdPyw==} - engines: {node: '>=6.9.0'} - - '@babel/core@7.25.9': - resolution: {integrity: sha512-WYvQviPw+Qyib0v92AwNIrdLISTp7RfDkM7bPqBvpbnhY4wq8HvHBZREVdYDXk98C8BkOIVnHAY3yvj7AVISxQ==} - engines: {node: '>=6.9.0'} - - '@babel/generator@7.25.9': - resolution: {integrity: sha512-omlUGkr5EaoIJrhLf9CJ0TvjBRpd9+AXRG//0GEQ9THSo8wPiTlbpy1/Ow8ZTrbXpjd9FHXfbFQx32I04ht0FA==} - engines: {node: '>=6.9.0'} - - '@babel/helper-annotate-as-pure@7.25.9': - resolution: {integrity: sha512-gv7320KBUFJz1RnylIg5WWYPRXKZ884AGkYpgpWW02TH66Dl+HaC1t1CKd0z3R4b6hdYEcmrNZHUmfCP+1u3/g==} - engines: {node: '>=6.9.0'} - - '@babel/helper-builder-binary-assignment-operator-visitor@7.25.9': - resolution: {integrity: sha512-C47lC7LIDCnz0h4vai/tpNOI95tCd5ZT3iBt/DBH5lXKHZsyNQv18yf1wIIg2ntiQNgmAvA+DgZ82iW8Qdym8g==} - engines: {node: '>=6.9.0'} - - '@babel/helper-compilation-targets@7.25.9': - resolution: {integrity: sha512-j9Db8Suy6yV/VHa4qzrj9yZfZxhLWQdVnRlXxmKLYlhWUVB1sB2G5sxuWYXk/whHD9iW76PmNzxZ4UCnTQTVEQ==} - engines: {node: '>=6.9.0'} - - '@babel/helper-create-class-features-plugin@7.25.9': - resolution: {integrity: sha512-UTZQMvt0d/rSz6KI+qdu7GQze5TIajwTS++GUozlw8VBJDEOAqSXwm1WvmYEZwqdqSGQshRocPDqrt4HBZB3fQ==} - engines: {node: '>=6.9.0'} - peerDependencies: - '@babel/core': ^7.0.0 - - '@babel/helper-create-regexp-features-plugin@7.25.9': - resolution: {integrity: sha512-ORPNZ3h6ZRkOyAa/SaHU+XsLZr0UQzRwuDQ0cczIA17nAzZ+85G5cVkOJIj7QavLZGSe8QXUmNFxSZzjcZF9bw==} - engines: {node: '>=6.9.0'} - peerDependencies: - '@babel/core': ^7.0.0 - - '@babel/helper-define-polyfill-provider@0.6.2': - resolution: {integrity: sha512-LV76g+C502biUK6AyZ3LK10vDpDyCzZnhZFXkH1L75zHPj68+qc8Zfpx2th+gzwA2MzyK+1g/3EPl62yFnVttQ==} - peerDependencies: - '@babel/core': ^7.4.0 || ^8.0.0-0 <8.0.0 - - '@babel/helper-member-expression-to-functions@7.25.9': - resolution: {integrity: sha512-wbfdZ9w5vk0C0oyHqAJbc62+vet5prjj01jjJ8sKn3j9h3MQQlflEdXYvuqRWjHnM12coDEqiC1IRCi0U/EKwQ==} - engines: {node: '>=6.9.0'} - - '@babel/helper-module-imports@7.25.9': - resolution: {integrity: sha512-tnUA4RsrmflIM6W6RFTLFSXITtl0wKjgpnLgXyowocVPrbYrLUXSBXDgTs8BlbmIzIdlBySRQjINYs2BAkiLtw==} - engines: {node: '>=6.9.0'} - - '@babel/helper-module-transforms@7.25.9': - resolution: {integrity: sha512-TvLZY/F3+GvdRYFZFyxMvnsKi+4oJdgZzU3BoGN9Uc2d9C6zfNwJcKKhjqLAhK8i46mv93jsO74fDh3ih6rpHA==} - engines: {node: '>=6.9.0'} - peerDependencies: - '@babel/core': ^7.0.0 - - '@babel/helper-optimise-call-expression@7.25.9': - resolution: {integrity: sha512-FIpuNaz5ow8VyrYcnXQTDRGvV6tTjkNtCK/RYNDXGSLlUD6cBuQTSw43CShGxjvfBTfcUA/r6UhUCbtYqkhcuQ==} - engines: {node: '>=6.9.0'} - - '@babel/helper-plugin-utils@7.25.9': - resolution: {integrity: sha512-kSMlyUVdWe25rEsRGviIgOWnoT/nfABVWlqt9N19/dIPWViAOW2s9wznP5tURbs/IDuNk4gPy3YdYRgH3uxhBw==} - engines: {node: '>=6.9.0'} - - '@babel/helper-remap-async-to-generator@7.25.9': - resolution: {integrity: sha512-IZtukuUeBbhgOcaW2s06OXTzVNJR0ybm4W5xC1opWFFJMZbwRj5LCk+ByYH7WdZPZTt8KnFwA8pvjN2yqcPlgw==} - engines: {node: '>=6.9.0'} - peerDependencies: - '@babel/core': ^7.0.0 - - '@babel/helper-replace-supers@7.25.9': - resolution: {integrity: sha512-IiDqTOTBQy0sWyeXyGSC5TBJpGFXBkRynjBeXsvbhQFKj2viwJC76Epz35YLU1fpe/Am6Vppb7W7zM4fPQzLsQ==} - engines: {node: '>=6.9.0'} - peerDependencies: - '@babel/core': ^7.0.0 - - '@babel/helper-simple-access@7.25.9': - resolution: {integrity: sha512-c6WHXuiaRsJTyHYLJV75t9IqsmTbItYfdj99PnzYGQZkYKvan5/2jKJ7gu31J3/BJ/A18grImSPModuyG/Eo0Q==} - engines: {node: '>=6.9.0'} - - '@babel/helper-skip-transparent-expression-wrappers@7.25.9': - resolution: {integrity: sha512-K4Du3BFa3gvyhzgPcntrkDgZzQaq6uozzcpGbOO1OEJaI+EJdqWIMTLgFgQf6lrfiDFo5FU+BxKepI9RmZqahA==} - engines: {node: '>=6.9.0'} - - '@babel/helper-string-parser@7.25.9': - resolution: {integrity: sha512-4A/SCr/2KLd5jrtOMFzaKjVtAei3+2r/NChoBNoZ3EyP/+GlhoaEGoWOZUmFmoITP7zOJyHIMm+DYRd8o3PvHA==} - engines: {node: '>=6.9.0'} - - '@babel/helper-validator-identifier@7.25.9': - resolution: {integrity: sha512-Ed61U6XJc3CVRfkERJWDz4dJwKe7iLmmJsbOGu9wSloNSFttHV0I8g6UAgb7qnK5ly5bGLPd4oXZlxCdANBOWQ==} - engines: {node: '>=6.9.0'} - - '@babel/helper-validator-option@7.25.9': - resolution: {integrity: sha512-e/zv1co8pp55dNdEcCynfj9X7nyUKUXoUEwfXqaZt0omVOmDe9oOTdKStH4GmAw6zxMFs50ZayuMfHDKlO7Tfw==} - engines: {node: '>=6.9.0'} - - '@babel/helper-wrap-function@7.25.9': - resolution: {integrity: sha512-ETzz9UTjQSTmw39GboatdymDq4XIQbR8ySgVrylRhPOFpsd+JrKHIuF0de7GCWmem+T4uC5z7EZguod7Wj4A4g==} - engines: {node: '>=6.9.0'} - - '@babel/helpers@7.25.9': - resolution: {integrity: sha512-oKWp3+usOJSzDZOucZUAMayhPz/xVjzymyDzUN8dk0Wd3RWMlGLXi07UCQ/CgQVb8LvXx3XBajJH4XGgkt7H7g==} - engines: {node: '>=6.9.0'} - - '@babel/highlight@7.25.9': - resolution: {integrity: sha512-llL88JShoCsth8fF8R4SJnIn+WLvR6ccFxu1H3FlMhDontdcmZWf2HgIZ7AIqV3Xcck1idlohrN4EUBQz6klbw==} - engines: {node: '>=6.9.0'} - - '@babel/parser@7.25.9': - resolution: {integrity: sha512-aI3jjAAO1fh7vY/pBGsn1i9LDbRP43+asrRlkPuTXW5yHXtd1NgTEMudbBoDDxrf1daEEfPJqR+JBMakzrR4Dg==} - engines: {node: '>=6.0.0'} - hasBin: true - - '@babel/plugin-bugfix-firefox-class-in-computed-class-key@7.25.9': - resolution: {integrity: sha512-ZkRyVkThtxQ/J6nv3JFYv1RYY+JT5BvU0y3k5bWrmuG4woXypRa4PXmm9RhOwodRkYFWqC0C0cqcJ4OqR7kW+g==} - engines: {node: '>=6.9.0'} - peerDependencies: - '@babel/core': ^7.0.0 - - '@babel/plugin-bugfix-safari-class-field-initializer-scope@7.25.9': - resolution: {integrity: sha512-MrGRLZxLD/Zjj0gdU15dfs+HH/OXvnw/U4jJD8vpcP2CJQapPEv1IWwjc/qMg7ItBlPwSv1hRBbb7LeuANdcnw==} - engines: {node: '>=6.9.0'} - peerDependencies: - '@babel/core': ^7.0.0 - - '@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression@7.25.9': - resolution: {integrity: sha512-2qUwwfAFpJLZqxd02YW9btUCZHl+RFvdDkNfZwaIJrvB8Tesjsk8pEQkTvGwZXLqXUx/2oyY3ySRhm6HOXuCug==} - engines: {node: '>=6.9.0'} - peerDependencies: - '@babel/core': ^7.0.0 - - '@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining@7.25.9': - resolution: {integrity: sha512-6xWgLZTJXwilVjlnV7ospI3xi+sl8lN8rXXbBD6vYn3UYDlGsag8wrZkKcSI8G6KgqKP7vNFaDgeDnfAABq61g==} - engines: {node: '>=6.9.0'} - peerDependencies: - '@babel/core': ^7.13.0 - - '@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly@7.25.9': - resolution: {integrity: sha512-aLnMXYPnzwwqhYSCyXfKkIkYgJ8zv9RK+roo9DkTXz38ynIhd9XCbN08s3MGvqL2MYGVUGdRQLL/JqBIeJhJBg==} - engines: {node: '>=6.9.0'} - peerDependencies: - '@babel/core': ^7.0.0 - - '@babel/plugin-proposal-private-property-in-object@7.21.0-placeholder-for-preset-env.2': - resolution: {integrity: sha512-SOSkfJDddaM7mak6cPEpswyTRnuRltl429hMraQEglW+OkovnCzsiszTmsrlY//qLFjCpQDFRvjdm2wA5pPm9w==} - engines: {node: '>=6.9.0'} - peerDependencies: - '@babel/core': ^7.0.0-0 - - '@babel/plugin-syntax-import-assertions@7.25.9': - resolution: {integrity: sha512-4GHX5uzr5QMOOuzV0an9MFju4hKlm0OyePl/lHhcsTVae5t/IKVHnb8W67Vr6FuLlk5lPqLB7n7O+K5R46emYg==} - engines: {node: '>=6.9.0'} - peerDependencies: - '@babel/core': ^7.0.0-0 - - '@babel/plugin-syntax-import-attributes@7.25.9': - resolution: {integrity: sha512-u3EN9ub8LyYvgTnrgp8gboElouayiwPdnM7x5tcnW3iSt09/lQYPwMNK40I9IUxo7QOZhAsPHCmmuO7EPdruqg==} - engines: {node: '>=6.9.0'} - peerDependencies: - '@babel/core': ^7.0.0-0 - - '@babel/plugin-syntax-jsx@7.25.9': - resolution: {integrity: sha512-ld6oezHQMZsZfp6pWtbjaNDF2tiiCYYDqQszHt5VV437lewP9aSi2Of99CK0D0XB21k7FLgnLcmQKyKzynfeAA==} - engines: {node: '>=6.9.0'} - peerDependencies: - '@babel/core': ^7.0.0-0 - - '@babel/plugin-syntax-typescript@7.25.9': - resolution: {integrity: sha512-hjMgRy5hb8uJJjUcdWunWVcoi9bGpJp8p5Ol1229PoN6aytsLwNMgmdftO23wnCLMfVmTwZDWMPNq/D1SY60JQ==} - engines: {node: '>=6.9.0'} - peerDependencies: - '@babel/core': ^7.0.0-0 - - '@babel/plugin-syntax-unicode-sets-regex@7.18.6': - resolution: {integrity: sha512-727YkEAPwSIQTv5im8QHz3upqp92JTWhidIC81Tdx4VJYIte/VndKf1qKrfnnhPLiPghStWfvC/iFaMCQu7Nqg==} - engines: {node: '>=6.9.0'} - peerDependencies: - '@babel/core': ^7.0.0 - - '@babel/plugin-transform-arrow-functions@7.25.9': - resolution: {integrity: sha512-6jmooXYIwn9ca5/RylZADJ+EnSxVUS5sjeJ9UPk6RWRzXCmOJCy6dqItPJFpw2cuCangPK4OYr5uhGKcmrm5Qg==} - engines: {node: '>=6.9.0'} - peerDependencies: - '@babel/core': ^7.0.0-0 - - '@babel/plugin-transform-async-generator-functions@7.25.9': - resolution: {integrity: sha512-RXV6QAzTBbhDMO9fWwOmwwTuYaiPbggWQ9INdZqAYeSHyG7FzQ+nOZaUUjNwKv9pV3aE4WFqFm1Hnbci5tBCAw==} - engines: {node: '>=6.9.0'} - peerDependencies: - '@babel/core': ^7.0.0-0 - - '@babel/plugin-transform-async-to-generator@7.25.9': - resolution: {integrity: sha512-NT7Ejn7Z/LjUH0Gv5KsBCxh7BH3fbLTV0ptHvpeMvrt3cPThHfJfst9Wrb7S8EvJ7vRTFI7z+VAvFVEQn/m5zQ==} - engines: {node: '>=6.9.0'} - peerDependencies: - '@babel/core': ^7.0.0-0 - - '@babel/plugin-transform-block-scoped-functions@7.25.9': - resolution: {integrity: sha512-toHc9fzab0ZfenFpsyYinOX0J/5dgJVA2fm64xPewu7CoYHWEivIWKxkK2rMi4r3yQqLnVmheMXRdG+k239CgA==} - engines: {node: '>=6.9.0'} - peerDependencies: - '@babel/core': ^7.0.0-0 - - '@babel/plugin-transform-block-scoping@7.25.9': - resolution: {integrity: sha512-1F05O7AYjymAtqbsFETboN1NvBdcnzMerO+zlMyJBEz6WkMdejvGWw9p05iTSjC85RLlBseHHQpYaM4gzJkBGg==} - engines: {node: '>=6.9.0'} - peerDependencies: - '@babel/core': ^7.0.0-0 - - '@babel/plugin-transform-class-properties@7.25.9': - resolution: {integrity: sha512-bbMAII8GRSkcd0h0b4X+36GksxuheLFjP65ul9w6C3KgAamI3JqErNgSrosX6ZPj+Mpim5VvEbawXxJCyEUV3Q==} - engines: {node: '>=6.9.0'} - peerDependencies: - '@babel/core': ^7.0.0-0 - - '@babel/plugin-transform-class-static-block@7.25.9': - resolution: {integrity: sha512-UIf+72C7YJ+PJ685/PpATbCz00XqiFEzHX5iysRwfvNT0Ko+FaXSvRgLytFSp8xUItrG9pFM/KoBBZDrY/cYyg==} - engines: {node: '>=6.9.0'} - peerDependencies: - '@babel/core': ^7.12.0 - - '@babel/plugin-transform-classes@7.25.9': - resolution: {integrity: sha512-mD8APIXmseE7oZvZgGABDyM34GUmK45Um2TXiBUt7PnuAxrgoSVf123qUzPxEr/+/BHrRn5NMZCdE2m/1F8DGg==} - engines: {node: '>=6.9.0'} - peerDependencies: - '@babel/core': ^7.0.0-0 - - '@babel/plugin-transform-computed-properties@7.25.9': - resolution: {integrity: sha512-HnBegGqXZR12xbcTHlJ9HGxw1OniltT26J5YpfruGqtUHlz/xKf/G2ak9e+t0rVqrjXa9WOhvYPz1ERfMj23AA==} - engines: {node: '>=6.9.0'} - peerDependencies: - '@babel/core': ^7.0.0-0 - - '@babel/plugin-transform-destructuring@7.25.9': - resolution: {integrity: sha512-WkCGb/3ZxXepmMiX101nnGiU+1CAdut8oHyEOHxkKuS1qKpU2SMXE2uSvfz8PBuLd49V6LEsbtyPhWC7fnkgvQ==} - engines: {node: '>=6.9.0'} - peerDependencies: - '@babel/core': ^7.0.0-0 - - '@babel/plugin-transform-dotall-regex@7.25.9': - resolution: {integrity: sha512-t7ZQ7g5trIgSRYhI9pIJtRl64KHotutUJsh4Eze5l7olJv+mRSg4/MmbZ0tv1eeqRbdvo/+trvJD/Oc5DmW2cA==} - engines: {node: '>=6.9.0'} - peerDependencies: - '@babel/core': ^7.0.0-0 - - '@babel/plugin-transform-duplicate-keys@7.25.9': - resolution: {integrity: sha512-LZxhJ6dvBb/f3x8xwWIuyiAHy56nrRG3PeYTpBkkzkYRRQ6tJLu68lEF5VIqMUZiAV7a8+Tb78nEoMCMcqjXBw==} - engines: {node: '>=6.9.0'} - peerDependencies: - '@babel/core': ^7.0.0-0 - - '@babel/plugin-transform-duplicate-named-capturing-groups-regex@7.25.9': - resolution: {integrity: sha512-0UfuJS0EsXbRvKnwcLjFtJy/Sxc5J5jhLHnFhy7u4zih97Hz6tJkLU+O+FMMrNZrosUPxDi6sYxJ/EA8jDiAog==} - engines: {node: '>=6.9.0'} - peerDependencies: - '@babel/core': ^7.0.0 - - '@babel/plugin-transform-dynamic-import@7.25.9': - resolution: {integrity: sha512-GCggjexbmSLaFhqsojeugBpeaRIgWNTcgKVq/0qIteFEqY2A+b9QidYadrWlnbWQUrW5fn+mCvf3tr7OeBFTyg==} - engines: {node: '>=6.9.0'} - peerDependencies: - '@babel/core': ^7.0.0-0 - - '@babel/plugin-transform-exponentiation-operator@7.25.9': - resolution: {integrity: sha512-KRhdhlVk2nObA5AYa7QMgTMTVJdfHprfpAk4DjZVtllqRg9qarilstTKEhpVjyt+Npi8ThRyiV8176Am3CodPA==} - engines: {node: '>=6.9.0'} - peerDependencies: - '@babel/core': ^7.0.0-0 - - '@babel/plugin-transform-export-namespace-from@7.25.9': - resolution: {integrity: sha512-2NsEz+CxzJIVOPx2o9UsW1rXLqtChtLoVnwYHHiB04wS5sgn7mrV45fWMBX0Kk+ub9uXytVYfNP2HjbVbCB3Ww==} - engines: {node: '>=6.9.0'} - peerDependencies: - '@babel/core': ^7.0.0-0 - - '@babel/plugin-transform-for-of@7.25.9': - resolution: {integrity: sha512-LqHxduHoaGELJl2uhImHwRQudhCM50pT46rIBNvtT/Oql3nqiS3wOwP+5ten7NpYSXrrVLgtZU3DZmPtWZo16A==} - engines: {node: '>=6.9.0'} - peerDependencies: - '@babel/core': ^7.0.0-0 - - '@babel/plugin-transform-function-name@7.25.9': - resolution: {integrity: sha512-8lP+Yxjv14Vc5MuWBpJsoUCd3hD6V9DgBon2FVYL4jJgbnVQ9fTgYmonchzZJOVNgzEgbxp4OwAf6xz6M/14XA==} - engines: {node: '>=6.9.0'} - peerDependencies: - '@babel/core': ^7.0.0-0 - - '@babel/plugin-transform-json-strings@7.25.9': - resolution: {integrity: sha512-xoTMk0WXceiiIvsaquQQUaLLXSW1KJ159KP87VilruQm0LNNGxWzahxSS6T6i4Zg3ezp4vA4zuwiNUR53qmQAw==} - engines: {node: '>=6.9.0'} - peerDependencies: - '@babel/core': ^7.0.0-0 - - '@babel/plugin-transform-literals@7.25.9': - resolution: {integrity: sha512-9N7+2lFziW8W9pBl2TzaNht3+pgMIRP74zizeCSrtnSKVdUl8mAjjOP2OOVQAfZ881P2cNjDj1uAMEdeD50nuQ==} - engines: {node: '>=6.9.0'} - peerDependencies: - '@babel/core': ^7.0.0-0 - - '@babel/plugin-transform-logical-assignment-operators@7.25.9': - resolution: {integrity: sha512-wI4wRAzGko551Y8eVf6iOY9EouIDTtPb0ByZx+ktDGHwv6bHFimrgJM/2T021txPZ2s4c7bqvHbd+vXG6K948Q==} - engines: {node: '>=6.9.0'} - peerDependencies: - '@babel/core': ^7.0.0-0 - - '@babel/plugin-transform-member-expression-literals@7.25.9': - resolution: {integrity: sha512-PYazBVfofCQkkMzh2P6IdIUaCEWni3iYEerAsRWuVd8+jlM1S9S9cz1dF9hIzyoZ8IA3+OwVYIp9v9e+GbgZhA==} - engines: {node: '>=6.9.0'} - peerDependencies: - '@babel/core': ^7.0.0-0 - - '@babel/plugin-transform-modules-amd@7.25.9': - resolution: {integrity: sha512-g5T11tnI36jVClQlMlt4qKDLlWnG5pP9CSM4GhdRciTNMRgkfpo5cR6b4rGIOYPgRRuFAvwjPQ/Yk+ql4dyhbw==} - engines: {node: '>=6.9.0'} - peerDependencies: - '@babel/core': ^7.0.0-0 - - '@babel/plugin-transform-modules-commonjs@7.25.9': - resolution: {integrity: sha512-dwh2Ol1jWwL2MgkCzUSOvfmKElqQcuswAZypBSUsScMXvgdT8Ekq5YA6TtqpTVWH+4903NmboMuH1o9i8Rxlyg==} - engines: {node: '>=6.9.0'} - peerDependencies: - '@babel/core': ^7.0.0-0 - - '@babel/plugin-transform-modules-systemjs@7.25.9': - resolution: {integrity: sha512-hyss7iIlH/zLHaehT+xwiymtPOpsiwIIRlCAOwBB04ta5Tt+lNItADdlXw3jAWZ96VJ2jlhl/c+PNIQPKNfvcA==} - engines: {node: '>=6.9.0'} - peerDependencies: - '@babel/core': ^7.0.0-0 - - '@babel/plugin-transform-modules-umd@7.25.9': - resolution: {integrity: sha512-bS9MVObUgE7ww36HEfwe6g9WakQ0KF07mQF74uuXdkoziUPfKyu/nIm663kz//e5O1nPInPFx36z7WJmJ4yNEw==} - engines: {node: '>=6.9.0'} - peerDependencies: - '@babel/core': ^7.0.0-0 - - '@babel/plugin-transform-named-capturing-groups-regex@7.25.9': - resolution: {integrity: sha512-oqB6WHdKTGl3q/ItQhpLSnWWOpjUJLsOCLVyeFgeTktkBSCiurvPOsyt93gibI9CmuKvTUEtWmG5VhZD+5T/KA==} - engines: {node: '>=6.9.0'} - peerDependencies: - '@babel/core': ^7.0.0 - - '@babel/plugin-transform-new-target@7.25.9': - resolution: {integrity: sha512-U/3p8X1yCSoKyUj2eOBIx3FOn6pElFOKvAAGf8HTtItuPyB+ZeOqfn+mvTtg9ZlOAjsPdK3ayQEjqHjU/yLeVQ==} - engines: {node: '>=6.9.0'} - peerDependencies: - '@babel/core': ^7.0.0-0 - - '@babel/plugin-transform-nullish-coalescing-operator@7.25.9': - resolution: {integrity: sha512-ENfftpLZw5EItALAD4WsY/KUWvhUlZndm5GC7G3evUsVeSJB6p0pBeLQUnRnBCBx7zV0RKQjR9kCuwrsIrjWog==} - engines: {node: '>=6.9.0'} - peerDependencies: - '@babel/core': ^7.0.0-0 - - '@babel/plugin-transform-numeric-separator@7.25.9': - resolution: {integrity: sha512-TlprrJ1GBZ3r6s96Yq8gEQv82s8/5HnCVHtEJScUj90thHQbwe+E5MLhi2bbNHBEJuzrvltXSru+BUxHDoog7Q==} - engines: {node: '>=6.9.0'} - peerDependencies: - '@babel/core': ^7.0.0-0 - - '@babel/plugin-transform-object-rest-spread@7.25.9': - resolution: {integrity: sha512-fSaXafEE9CVHPweLYw4J0emp1t8zYTXyzN3UuG+lylqkvYd7RMrsOQ8TYx5RF231be0vqtFC6jnx3UmpJmKBYg==} - engines: {node: '>=6.9.0'} - peerDependencies: - '@babel/core': ^7.0.0-0 - - '@babel/plugin-transform-object-super@7.25.9': - resolution: {integrity: sha512-Kj/Gh+Rw2RNLbCK1VAWj2U48yxxqL2x0k10nPtSdRa0O2xnHXalD0s+o1A6a0W43gJ00ANo38jxkQreckOzv5A==} - engines: {node: '>=6.9.0'} - peerDependencies: - '@babel/core': ^7.0.0-0 - - '@babel/plugin-transform-optional-catch-binding@7.25.9': - resolution: {integrity: sha512-qM/6m6hQZzDcZF3onzIhZeDHDO43bkNNlOX0i8n3lR6zLbu0GN2d8qfM/IERJZYauhAHSLHy39NF0Ctdvcid7g==} - engines: {node: '>=6.9.0'} - peerDependencies: - '@babel/core': ^7.0.0-0 - - '@babel/plugin-transform-optional-chaining@7.25.9': - resolution: {integrity: sha512-6AvV0FsLULbpnXeBjrY4dmWF8F7gf8QnvTEoO/wX/5xm/xE1Xo8oPuD3MPS+KS9f9XBEAWN7X1aWr4z9HdOr7A==} - engines: {node: '>=6.9.0'} - peerDependencies: - '@babel/core': ^7.0.0-0 - - '@babel/plugin-transform-parameters@7.25.9': - resolution: {integrity: sha512-wzz6MKwpnshBAiRmn4jR8LYz/g8Ksg0o80XmwZDlordjwEk9SxBzTWC7F5ef1jhbrbOW2DJ5J6ayRukrJmnr0g==} - engines: {node: '>=6.9.0'} - peerDependencies: - '@babel/core': ^7.0.0-0 - - '@babel/plugin-transform-private-methods@7.25.9': - resolution: {integrity: sha512-D/JUozNpQLAPUVusvqMxyvjzllRaF8/nSrP1s2YGQT/W4LHK4xxsMcHjhOGTS01mp9Hda8nswb+FblLdJornQw==} - engines: {node: '>=6.9.0'} - peerDependencies: - '@babel/core': ^7.0.0-0 - - '@babel/plugin-transform-private-property-in-object@7.25.9': - resolution: {integrity: sha512-Evf3kcMqzXA3xfYJmZ9Pg1OvKdtqsDMSWBDzZOPLvHiTt36E75jLDQo5w1gtRU95Q4E5PDttrTf25Fw8d/uWLw==} - engines: {node: '>=6.9.0'} - peerDependencies: - '@babel/core': ^7.0.0-0 - - '@babel/plugin-transform-property-literals@7.25.9': - resolution: {integrity: sha512-IvIUeV5KrS/VPavfSM/Iu+RE6llrHrYIKY1yfCzyO/lMXHQ+p7uGhonmGVisv6tSBSVgWzMBohTcvkC9vQcQFA==} - engines: {node: '>=6.9.0'} - peerDependencies: - '@babel/core': ^7.0.0-0 - - '@babel/plugin-transform-regenerator@7.25.9': - resolution: {integrity: sha512-vwDcDNsgMPDGP0nMqzahDWE5/MLcX8sv96+wfX7as7LoF/kr97Bo/7fI00lXY4wUXYfVmwIIyG80fGZ1uvt2qg==} - engines: {node: '>=6.9.0'} - peerDependencies: - '@babel/core': ^7.0.0-0 - - '@babel/plugin-transform-reserved-words@7.25.9': - resolution: {integrity: sha512-7DL7DKYjn5Su++4RXu8puKZm2XBPHyjWLUidaPEkCUBbE7IPcsrkRHggAOOKydH1dASWdcUBxrkOGNxUv5P3Jg==} - engines: {node: '>=6.9.0'} - peerDependencies: - '@babel/core': ^7.0.0-0 - - '@babel/plugin-transform-runtime@7.25.9': - resolution: {integrity: sha512-nZp7GlEl+yULJrClz0SwHPqir3lc0zsPrDHQUcxGspSL7AKrexNSEfTbfqnDNJUO13bgKyfuOLMF8Xqtu8j3YQ==} - engines: {node: '>=6.9.0'} - peerDependencies: - '@babel/core': ^7.0.0-0 - - '@babel/plugin-transform-shorthand-properties@7.25.9': - resolution: {integrity: sha512-MUv6t0FhO5qHnS/W8XCbHmiRWOphNufpE1IVxhK5kuN3Td9FT1x4rx4K42s3RYdMXCXpfWkGSbCSd0Z64xA7Ng==} - engines: {node: '>=6.9.0'} - peerDependencies: - '@babel/core': ^7.0.0-0 - - '@babel/plugin-transform-spread@7.25.9': - resolution: {integrity: sha512-oNknIB0TbURU5pqJFVbOOFspVlrpVwo2H1+HUIsVDvp5VauGGDP1ZEvO8Nn5xyMEs3dakajOxlmkNW7kNgSm6A==} - engines: {node: '>=6.9.0'} - peerDependencies: - '@babel/core': ^7.0.0-0 - - '@babel/plugin-transform-sticky-regex@7.25.9': - resolution: {integrity: sha512-WqBUSgeVwucYDP9U/xNRQam7xV8W5Zf+6Eo7T2SRVUFlhRiMNFdFz58u0KZmCVVqs2i7SHgpRnAhzRNmKfi2uA==} - engines: {node: '>=6.9.0'} - peerDependencies: - '@babel/core': ^7.0.0-0 - - '@babel/plugin-transform-template-literals@7.25.9': - resolution: {integrity: sha512-o97AE4syN71M/lxrCtQByzphAdlYluKPDBzDVzMmfCobUjjhAryZV0AIpRPrxN0eAkxXO6ZLEScmt+PNhj2OTw==} - engines: {node: '>=6.9.0'} - peerDependencies: - '@babel/core': ^7.0.0-0 - - '@babel/plugin-transform-typeof-symbol@7.25.9': - resolution: {integrity: sha512-v61XqUMiueJROUv66BVIOi0Fv/CUuZuZMl5NkRoCVxLAnMexZ0A3kMe7vvZ0nulxMuMp0Mk6S5hNh48yki08ZA==} - engines: {node: '>=6.9.0'} - peerDependencies: - '@babel/core': ^7.0.0-0 - - '@babel/plugin-transform-typescript@7.25.9': - resolution: {integrity: sha512-7PbZQZP50tzv2KGGnhh82GSyMB01yKY9scIjf1a+GfZCtInOWqUH5+1EBU4t9fyR5Oykkkc9vFTs4OHrhHXljQ==} - engines: {node: '>=6.9.0'} - peerDependencies: - '@babel/core': ^7.0.0-0 - - '@babel/plugin-transform-unicode-escapes@7.25.9': - resolution: {integrity: sha512-s5EDrE6bW97LtxOcGj1Khcx5AaXwiMmi4toFWRDP9/y0Woo6pXC+iyPu/KuhKtfSrNFd7jJB+/fkOtZy6aIC6Q==} - engines: {node: '>=6.9.0'} - peerDependencies: - '@babel/core': ^7.0.0-0 - - '@babel/plugin-transform-unicode-property-regex@7.25.9': - resolution: {integrity: sha512-Jt2d8Ga+QwRluxRQ307Vlxa6dMrYEMZCgGxoPR8V52rxPyldHu3hdlHspxaqYmE7oID5+kB+UKUB/eWS+DkkWg==} - engines: {node: '>=6.9.0'} - peerDependencies: - '@babel/core': ^7.0.0-0 - - '@babel/plugin-transform-unicode-regex@7.25.9': - resolution: {integrity: sha512-yoxstj7Rg9dlNn9UQxzk4fcNivwv4nUYz7fYXBaKxvw/lnmPuOm/ikoELygbYq68Bls3D/D+NBPHiLwZdZZ4HA==} - engines: {node: '>=6.9.0'} - peerDependencies: - '@babel/core': ^7.0.0-0 - - '@babel/plugin-transform-unicode-sets-regex@7.25.9': - resolution: {integrity: sha512-8BYqO3GeVNHtx69fdPshN3fnzUNLrWdHhk/icSwigksJGczKSizZ+Z6SBCxTs723Fr5VSNorTIK7a+R2tISvwQ==} - engines: {node: '>=6.9.0'} - peerDependencies: - '@babel/core': ^7.0.0 - - '@babel/preset-env@7.25.9': - resolution: {integrity: sha512-XqDEt+hfsQukahSX9JOBDHhpUHDhj2zGSxoqWQFCMajOSBnbhBdgON/bU/5PkBA1yX5tqW6tTzuIPVsZTQ7h5Q==} - engines: {node: '>=6.9.0'} - peerDependencies: - '@babel/core': ^7.0.0-0 - - '@babel/preset-modules@0.1.6-no-external-plugins': - resolution: {integrity: sha512-HrcgcIESLm9aIR842yhJ5RWan/gebQUJ6E/E5+rf0y9o6oj7w0Br+sWuL6kEQ/o/AdfvR1Je9jG18/gnpwjEyA==} - peerDependencies: - '@babel/core': ^7.0.0-0 || ^8.0.0-0 <8.0.0 - - '@babel/preset-typescript@7.25.9': - resolution: {integrity: sha512-XWxw1AcKk36kgxf4C//fl0ikjLeqGUWn062/Fd8GtpTfDJOX6Ud95FK+4JlDA36BX4bNGndXi3a6Vr4Jo5/61A==} - engines: {node: '>=6.9.0'} - peerDependencies: - '@babel/core': ^7.0.0-0 - - '@babel/runtime@7.26.10': - resolution: {integrity: sha512-2WJMeRQPHKSPemqk/awGrAiuFfzBmOIPXKizAsVhWH9YJqLZ0H+HS4c8loHGgW6utJ3E/ejXQUsiGaQy2NZ9Fw==} - engines: {node: '>=6.9.0'} - - '@babel/template@7.25.9': - resolution: {integrity: sha512-9DGttpmPvIxBb/2uwpVo3dqJ+O6RooAFOS+lB+xDqoE2PVCE8nfoHMdZLpfCQRLwvohzXISPZcgxt80xLfsuwg==} - engines: {node: '>=6.9.0'} - - '@babel/traverse@7.25.9': - resolution: {integrity: sha512-ZCuvfwOwlz/bawvAuvcj8rrithP2/N55Tzz342AkTvq4qaWbGfmCk/tKhNaV2cthijKrPAA8SRJV5WWe7IBMJw==} - engines: {node: '>=6.9.0'} - - '@babel/types@7.25.9': - resolution: {integrity: sha512-OwS2CM5KocvQ/k7dFJa8i5bNGJP0hXWfVCfDkqRFP1IreH1JDC7wG6eCYCi0+McbfT8OR/kNqsI0UU0xP9H6PQ==} - engines: {node: '>=6.9.0'} - - '@changesets/apply-release-plan@7.0.5': - resolution: {integrity: sha512-1cWCk+ZshEkSVEZrm2fSj1Gz8sYvxgUL4Q78+1ZZqeqfuevPTPk033/yUZ3df8BKMohkqqHfzj0HOOrG0KtXTw==} - - '@changesets/assemble-release-plan@6.0.4': - resolution: {integrity: sha512-nqICnvmrwWj4w2x0fOhVj2QEGdlUuwVAwESrUo5HLzWMI1rE5SWfsr9ln+rDqWB6RQ2ZyaMZHUcU7/IRaUJS+Q==} - - '@changesets/changelog-git@0.2.0': - resolution: {integrity: sha512-bHOx97iFI4OClIT35Lok3sJAwM31VbUM++gnMBV16fdbtBhgYu4dxsphBF/0AZZsyAHMrnM0yFcj5gZM1py6uQ==} - - '@changesets/changelog-github@0.5.0': - resolution: {integrity: sha512-zoeq2LJJVcPJcIotHRJEEA2qCqX0AQIeFE+L21L8sRLPVqDhSXY8ZWAt2sohtBpFZkBwu+LUwMSKRr2lMy3LJA==} - - '@changesets/cli@2.27.9': - resolution: {integrity: sha512-q42a/ZbDnxPpCb5Wkm6tMVIxgeI9C/bexntzTeCFBrQEdpisQqk8kCHllYZMDjYtEc1ZzumbMJAG8H0Z4rdvjg==} - hasBin: true - - '@changesets/config@3.0.3': - resolution: {integrity: sha512-vqgQZMyIcuIpw9nqFIpTSNyc/wgm/Lu1zKN5vECy74u95Qx/Wa9g27HdgO4NkVAaq+BGA8wUc/qvbvVNs93n6A==} - - '@changesets/errors@0.2.0': - resolution: {integrity: sha512-6BLOQUscTpZeGljvyQXlWOItQyU71kCdGz7Pi8H8zdw6BI0g3m43iL4xKUVPWtG+qrrL9DTjpdn8eYuCQSRpow==} - - '@changesets/get-dependents-graph@2.1.2': - resolution: {integrity: sha512-sgcHRkiBY9i4zWYBwlVyAjEM9sAzs4wYVwJUdnbDLnVG3QwAaia1Mk5P8M7kraTOZN+vBET7n8KyB0YXCbFRLQ==} - - '@changesets/get-github-info@0.6.0': - resolution: {integrity: sha512-v/TSnFVXI8vzX9/w3DU2Ol+UlTZcu3m0kXTjTT4KlAdwSvwutcByYwyYn9hwerPWfPkT2JfpoX0KgvCEi8Q/SA==} - - '@changesets/get-release-plan@4.0.4': - resolution: {integrity: sha512-SicG/S67JmPTrdcc9Vpu0wSQt7IiuN0dc8iR5VScnnTVPfIaLvKmEGRvIaF0kcn8u5ZqLbormZNTO77bCEvyWw==} - - '@changesets/get-version-range-type@0.4.0': - resolution: {integrity: sha512-hwawtob9DryoGTpixy1D3ZXbGgJu1Rhr+ySH2PvTLHvkZuQ7sRT4oQwMh0hbqZH1weAooedEjRsbrWcGLCeyVQ==} - - '@changesets/git@3.0.1': - resolution: {integrity: sha512-pdgHcYBLCPcLd82aRcuO0kxCDbw/yISlOtkmwmE8Odo1L6hSiZrBOsRl84eYG7DRCab/iHnOkWqExqc4wxk2LQ==} - - '@changesets/logger@0.1.1': - resolution: {integrity: sha512-OQtR36ZlnuTxKqoW4Sv6x5YIhOmClRd5pWsjZsddYxpWs517R0HkyiefQPIytCVh4ZcC5x9XaG8KTdd5iRQUfg==} - - '@changesets/parse@0.4.0': - resolution: {integrity: sha512-TS/9KG2CdGXS27S+QxbZXgr8uPsP4yNJYb4BC2/NeFUj80Rni3TeD2qwWmabymxmrLo7JEsytXH1FbpKTbvivw==} - - '@changesets/pre@2.0.1': - resolution: {integrity: sha512-vvBJ/If4jKM4tPz9JdY2kGOgWmCowUYOi5Ycv8dyLnEE8FgpYYUo1mgJZxcdtGGP3aG8rAQulGLyyXGSLkIMTQ==} - - '@changesets/read@0.6.1': - resolution: {integrity: sha512-jYMbyXQk3nwP25nRzQQGa1nKLY0KfoOV7VLgwucI0bUO8t8ZLCr6LZmgjXsiKuRDc+5A6doKPr9w2d+FEJ55zQ==} - - '@changesets/should-skip-package@0.1.1': - resolution: {integrity: sha512-H9LjLbF6mMHLtJIc/eHR9Na+MifJ3VxtgP/Y+XLn4BF7tDTEN1HNYtH6QMcjP1uxp9sjaFYmW8xqloaCi/ckTg==} - - '@changesets/types@4.1.0': - resolution: {integrity: sha512-LDQvVDv5Kb50ny2s25Fhm3d9QSZimsoUGBsUioj6MC3qbMUCuC8GPIvk/M6IvXx3lYhAs0lwWUQLb+VIEUCECw==} - - '@changesets/types@6.0.0': - resolution: {integrity: sha512-b1UkfNulgKoWfqyHtzKS5fOZYSJO+77adgL7DLRDr+/7jhChN+QcHnbjiQVOz/U+Ts3PGNySq7diAItzDgugfQ==} - - '@changesets/write@0.3.2': - resolution: {integrity: sha512-kDxDrPNpUgsjDbWBvUo27PzKX4gqeKOlhibaOXDJA6kuBisGqNHv/HwGJrAu8U/dSf8ZEFIeHIPtvSlZI1kULw==} - - '@cspotcode/source-map-support@0.8.1': - resolution: {integrity: sha512-IchNf6dN4tHoMFIn/7OE8LWZ19Y6q/67Bmf6vnGREv8RSbBVb9LPJxEcnwrcwX6ixSvaiGoomAUvu4YSxXrVgw==} - engines: {node: '>=12'} - - '@databeat/tracker@0.9.3': - resolution: {integrity: sha512-eGsiNU/CRFujcNtUUqvBiqveCs6S6SiAhalXPDodbk74d3FzvLqHDn5k6WfOEJIhrP3CbYgfMXL0nk51s/rQsg==} - - '@discoveryjs/json-ext@0.5.7': - resolution: {integrity: sha512-dBVuXR082gk3jsFp7Rd/JI4kytwGHecnCoTtXFb7DB6CNHp4rg5k1bhg0nWdLGLnOV71lmDzGQaLMy8iPLY0pw==} - engines: {node: '>=10.0.0'} - - '@esbuild/aix-ppc64@0.23.1': - resolution: {integrity: sha512-6VhYk1diRqrhBAqpJEdjASR/+WVRtfjpqKuNw11cLiaWpAT/Uu+nokB+UJnevzy/P9C/ty6AOe0dwueMrGh/iQ==} - engines: {node: '>=18'} - cpu: [ppc64] - os: [aix] - - '@esbuild/android-arm64@0.23.1': - resolution: {integrity: sha512-xw50ipykXcLstLeWH7WRdQuysJqejuAGPd30vd1i5zSyKK3WE+ijzHmLKxdiCMtH1pHz78rOg0BKSYOSB/2Khw==} - engines: {node: '>=18'} - cpu: [arm64] - os: [android] - - '@esbuild/android-arm@0.23.1': - resolution: {integrity: sha512-uz6/tEy2IFm9RYOyvKl88zdzZfwEfKZmnX9Cj1BHjeSGNuGLuMD1kR8y5bteYmwqKm1tj8m4cb/aKEorr6fHWQ==} - engines: {node: '>=18'} - cpu: [arm] - os: [android] - - '@esbuild/android-x64@0.23.1': - resolution: {integrity: sha512-nlN9B69St9BwUoB+jkyU090bru8L0NA3yFvAd7k8dNsVH8bi9a8cUAUSEcEEgTp2z3dbEDGJGfP6VUnkQnlReg==} - engines: {node: '>=18'} - cpu: [x64] - os: [android] - - '@esbuild/darwin-arm64@0.23.1': - resolution: {integrity: sha512-YsS2e3Wtgnw7Wq53XXBLcV6JhRsEq8hkfg91ESVadIrzr9wO6jJDMZnCQbHm1Guc5t/CdDiFSSfWP58FNuvT3Q==} - engines: {node: '>=18'} - cpu: [arm64] - os: [darwin] - - '@esbuild/darwin-x64@0.23.1': - resolution: {integrity: sha512-aClqdgTDVPSEGgoCS8QDG37Gu8yc9lTHNAQlsztQ6ENetKEO//b8y31MMu2ZaPbn4kVsIABzVLXYLhCGekGDqw==} - engines: {node: '>=18'} - cpu: [x64] - os: [darwin] - - '@esbuild/freebsd-arm64@0.23.1': - resolution: {integrity: sha512-h1k6yS8/pN/NHlMl5+v4XPfikhJulk4G+tKGFIOwURBSFzE8bixw1ebjluLOjfwtLqY0kewfjLSrO6tN2MgIhA==} - engines: {node: '>=18'} - cpu: [arm64] - os: [freebsd] - - '@esbuild/freebsd-x64@0.23.1': - resolution: {integrity: sha512-lK1eJeyk1ZX8UklqFd/3A60UuZ/6UVfGT2LuGo3Wp4/z7eRTRYY+0xOu2kpClP+vMTi9wKOfXi2vjUpO1Ro76g==} - engines: {node: '>=18'} - cpu: [x64] - os: [freebsd] - - '@esbuild/linux-arm64@0.23.1': - resolution: {integrity: sha512-/93bf2yxencYDnItMYV/v116zff6UyTjo4EtEQjUBeGiVpMmffDNUyD9UN2zV+V3LRV3/on4xdZ26NKzn6754g==} - engines: {node: '>=18'} - cpu: [arm64] - os: [linux] - - '@esbuild/linux-arm@0.23.1': - resolution: {integrity: sha512-CXXkzgn+dXAPs3WBwE+Kvnrf4WECwBdfjfeYHpMeVxWE0EceB6vhWGShs6wi0IYEqMSIzdOF1XjQ/Mkm5d7ZdQ==} - engines: {node: '>=18'} - cpu: [arm] - os: [linux] - - '@esbuild/linux-ia32@0.23.1': - resolution: {integrity: sha512-VTN4EuOHwXEkXzX5nTvVY4s7E/Krz7COC8xkftbbKRYAl96vPiUssGkeMELQMOnLOJ8k3BY1+ZY52tttZnHcXQ==} - engines: {node: '>=18'} - cpu: [ia32] - os: [linux] - - '@esbuild/linux-loong64@0.23.1': - resolution: {integrity: sha512-Vx09LzEoBa5zDnieH8LSMRToj7ir/Jeq0Gu6qJ/1GcBq9GkfoEAoXvLiW1U9J1qE/Y/Oyaq33w5p2ZWrNNHNEw==} - engines: {node: '>=18'} - cpu: [loong64] - os: [linux] - - '@esbuild/linux-mips64el@0.23.1': - resolution: {integrity: sha512-nrFzzMQ7W4WRLNUOU5dlWAqa6yVeI0P78WKGUo7lg2HShq/yx+UYkeNSE0SSfSure0SqgnsxPvmAUu/vu0E+3Q==} - engines: {node: '>=18'} - cpu: [mips64el] - os: [linux] - - '@esbuild/linux-ppc64@0.23.1': - resolution: {integrity: sha512-dKN8fgVqd0vUIjxuJI6P/9SSSe/mB9rvA98CSH2sJnlZ/OCZWO1DJvxj8jvKTfYUdGfcq2dDxoKaC6bHuTlgcw==} - engines: {node: '>=18'} - cpu: [ppc64] - os: [linux] - - '@esbuild/linux-riscv64@0.23.1': - resolution: {integrity: sha512-5AV4Pzp80fhHL83JM6LoA6pTQVWgB1HovMBsLQ9OZWLDqVY8MVobBXNSmAJi//Csh6tcY7e7Lny2Hg1tElMjIA==} - engines: {node: '>=18'} - cpu: [riscv64] - os: [linux] - - '@esbuild/linux-s390x@0.23.1': - resolution: {integrity: sha512-9ygs73tuFCe6f6m/Tb+9LtYxWR4c9yg7zjt2cYkjDbDpV/xVn+68cQxMXCjUpYwEkze2RcU/rMnfIXNRFmSoDw==} - engines: {node: '>=18'} - cpu: [s390x] - os: [linux] - - '@esbuild/linux-x64@0.23.1': - resolution: {integrity: sha512-EV6+ovTsEXCPAp58g2dD68LxoP/wK5pRvgy0J/HxPGB009omFPv3Yet0HiaqvrIrgPTBuC6wCH1LTOY91EO5hQ==} - engines: {node: '>=18'} - cpu: [x64] - os: [linux] - - '@esbuild/netbsd-x64@0.23.1': - resolution: {integrity: sha512-aevEkCNu7KlPRpYLjwmdcuNz6bDFiE7Z8XC4CPqExjTvrHugh28QzUXVOZtiYghciKUacNktqxdpymplil1beA==} - engines: {node: '>=18'} - cpu: [x64] - os: [netbsd] - - '@esbuild/openbsd-arm64@0.23.1': - resolution: {integrity: sha512-3x37szhLexNA4bXhLrCC/LImN/YtWis6WXr1VESlfVtVeoFJBRINPJ3f0a/6LV8zpikqoUg4hyXw0sFBt5Cr+Q==} - engines: {node: '>=18'} - cpu: [arm64] - os: [openbsd] - - '@esbuild/openbsd-x64@0.23.1': - resolution: {integrity: sha512-aY2gMmKmPhxfU+0EdnN+XNtGbjfQgwZj43k8G3fyrDM/UdZww6xrWxmDkuz2eCZchqVeABjV5BpildOrUbBTqA==} - engines: {node: '>=18'} - cpu: [x64] - os: [openbsd] - - '@esbuild/sunos-x64@0.23.1': - resolution: {integrity: sha512-RBRT2gqEl0IKQABT4XTj78tpk9v7ehp+mazn2HbUeZl1YMdaGAQqhapjGTCe7uw7y0frDi4gS0uHzhvpFuI1sA==} - engines: {node: '>=18'} - cpu: [x64] - os: [sunos] - - '@esbuild/win32-arm64@0.23.1': - resolution: {integrity: sha512-4O+gPR5rEBe2FpKOVyiJ7wNDPA8nGzDuJ6gN4okSA1gEOYZ67N8JPk58tkWtdtPeLz7lBnY6I5L3jdsr3S+A6A==} - engines: {node: '>=18'} - cpu: [arm64] - os: [win32] - - '@esbuild/win32-ia32@0.23.1': - resolution: {integrity: sha512-BcaL0Vn6QwCwre3Y717nVHZbAa4UBEigzFm6VdsVdT/MbZ38xoj1X9HPkZhbmaBGUD1W8vxAfffbDe8bA6AKnQ==} - engines: {node: '>=18'} - cpu: [ia32] - os: [win32] - - '@esbuild/win32-x64@0.23.1': - resolution: {integrity: sha512-BHpFFeslkWrXWyUPnbKm+xYYVYruCinGcftSBaa8zoF9hZO4BcSCFUvHVTtzpIY6YzUnYtuEhZ+C9iEXjxnasg==} - engines: {node: '>=18'} - cpu: [x64] - os: [win32] - - '@eslint-community/eslint-utils@4.4.0': - resolution: {integrity: sha512-1/sA4dwrzBAyeUoQ6oxahHKmrZvsnLCg4RfxW3ZFGGmQkSNQPFNLV9CUEFQP1x9EYXHTo5p6xdhZM1Ne9p/AfA==} - engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} - peerDependencies: - eslint: ^6.0.0 || ^7.0.0 || >=8.0.0 - - '@eslint-community/regexpp@4.11.1': - resolution: {integrity: sha512-m4DVN9ZqskZoLU5GlWZadwDnYo3vAEydiUayB9widCl9ffWx2IvPnp6n3on5rJmziJSw9Bv+Z3ChDVdMwXCY8Q==} - engines: {node: ^12.0.0 || ^14.0.0 || >=16.0.0} - - '@eslint/eslintrc@2.1.4': - resolution: {integrity: sha512-269Z39MS6wVJtsoUl10L60WdkhJVdPG24Q4eZTH3nnF6lpvSShEK3wQjDX9JRWAUPvPh7COouPpU9IrqaZFvtQ==} - engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} - - '@eslint/js@8.57.1': - resolution: {integrity: sha512-d9zaMRSTIKDLhctzH12MtXvJKSSUhaHcjV+2Z+GK+EEY7XKpP5yR4x+N3TAcHTcu963nIr+TMcCb4DBCYX1z6Q==} - engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} - - '@ethereumjs/common@2.6.5': - resolution: {integrity: sha512-lRyVQOeCDaIVtgfbowla32pzeDv2Obr8oR8Put5RdUBNRGr1VGPGQNGP6elWIpgK3YdpzqTOh4GyUGOureVeeA==} - - '@ethereumjs/rlp@4.0.1': - resolution: {integrity: sha512-tqsQiBQDQdmPWE1xkkBq4rlSW5QZpLOUJ5RJh2/9fug+q9tnUhuZoVLk7s0scUIKTOzEtR72DFBXI4WiZcMpvw==} - engines: {node: '>=14'} - hasBin: true - - '@ethereumjs/tx@3.5.2': - resolution: {integrity: sha512-gQDNJWKrSDGu2w7w0PzVXVBNMzb7wwdDOmOqczmhNjqFxFuIbhVJDwiGEnxFNC2/b8ifcZzY7MLcluizohRzNw==} - - '@ethereumjs/util@8.1.0': - resolution: {integrity: sha512-zQ0IqbdX8FZ9aw11vP+dZkKDkS+kgIvQPHnSAXzP9pLu+Rfu3D3XEeLbicvoXJTYnhZiPmsZUxgdzXwNKxRPbA==} - engines: {node: '>=14'} - - '@ethersproject/abi@5.7.0': - resolution: {integrity: sha512-351ktp42TiRcYB3H1OP8yajPeAQstMW/yCFokj/AthP9bLHzQFPlOrxOcwYEDkUAICmOHljvN4K39OMTMUa9RA==} - - '@ethersproject/abi@5.8.0': - resolution: {integrity: sha512-b9YS/43ObplgyV6SlyQsG53/vkSal0MNA1fskSC4mbnCMi8R+NkcH8K9FPYNESf6jUefBUniE4SOKms0E/KK1Q==} - - '@ethersproject/abstract-provider@5.7.0': - resolution: {integrity: sha512-R41c9UkchKCpAqStMYUpdunjo3pkEvZC3FAwZn5S5MGbXoMQOHIdHItezTETxAO5bevtMApSyEhn9+CHcDsWBw==} - - '@ethersproject/abstract-provider@5.8.0': - resolution: {integrity: sha512-wC9SFcmh4UK0oKuLJQItoQdzS/qZ51EJegK6EmAWlh+OptpQ/npECOR3QqECd8iGHC0RJb4WKbVdSfif4ammrg==} - - '@ethersproject/abstract-signer@5.7.0': - resolution: {integrity: sha512-a16V8bq1/Cz+TGCkE2OPMTOUDLS3grCpdjoJCYNnVBbdYEMSgKrU0+B90s8b6H+ByYTBZN7a3g76jdIJi7UfKQ==} - - '@ethersproject/abstract-signer@5.8.0': - resolution: {integrity: sha512-N0XhZTswXcmIZQdYtUnd79VJzvEwXQw6PK0dTl9VoYrEBxxCPXqS0Eod7q5TNKRxe1/5WUMuR0u0nqTF/avdCA==} - - '@ethersproject/address@5.6.1': - resolution: {integrity: sha512-uOgF0kS5MJv9ZvCz7x6T2EXJSzotiybApn4XlOgoTX0xdtyVIJ7pF+6cGPxiEq/dpBiTfMiw7Yc81JcwhSYA0Q==} - - '@ethersproject/address@5.7.0': - resolution: {integrity: sha512-9wYhYt7aghVGo758POM5nqcOMaE168Q6aRLJZwUmiqSrAungkG74gSSeKEIR7ukixesdRZGPgVqme6vmxs1fkA==} - - '@ethersproject/address@5.8.0': - resolution: {integrity: sha512-GhH/abcC46LJwshoN+uBNoKVFPxUuZm6dA257z0vZkKmU1+t8xTn8oK7B9qrj8W2rFRMch4gbJl6PmVxjxBEBA==} - - '@ethersproject/base64@5.7.0': - resolution: {integrity: sha512-Dr8tcHt2mEbsZr/mwTPIQAf3Ai0Bks/7gTw9dSqk1mQvhW3XvRlmDJr/4n+wg1JmCl16NZue17CDh8xb/vZ0sQ==} - - '@ethersproject/base64@5.8.0': - resolution: {integrity: sha512-lN0oIwfkYj9LbPx4xEkie6rAMJtySbpOAFXSDVQaBnAzYfB4X2Qr+FXJGxMoc3Bxp2Sm8OwvzMrywxyw0gLjIQ==} - - '@ethersproject/basex@5.8.0': - resolution: {integrity: sha512-PIgTszMlDRmNwW9nhS6iqtVfdTAKosA7llYXNmGPw4YAI1PUyMv28988wAb41/gHF/WqGdoLv0erHaRcHRKW2Q==} - - '@ethersproject/bignumber@5.7.0': - resolution: {integrity: sha512-n1CAdIHRWjSucQO3MC1zPSVgV/6dy/fjL9pMrPP9peL+QxEg9wOsVqwD4+818B6LUEtaXzVHQiuivzRoxPxUGw==} - - '@ethersproject/bignumber@5.8.0': - resolution: {integrity: sha512-ZyaT24bHaSeJon2tGPKIiHszWjD/54Sz8t57Toch475lCLljC6MgPmxk7Gtzz+ddNN5LuHea9qhAe0x3D+uYPA==} - - '@ethersproject/bytes@5.7.0': - resolution: {integrity: sha512-nsbxwgFXWh9NyYWo+U8atvmMsSdKJprTcICAkvbBffT75qDocbuggBU0SJiVK2MuTrp0q+xvLkTnGMPK1+uA9A==} - - '@ethersproject/bytes@5.8.0': - resolution: {integrity: sha512-vTkeohgJVCPVHu5c25XWaWQOZ4v+DkGoC42/TS2ond+PARCxTJvgTFUNDZovyQ/uAQ4EcpqqowKydcdmRKjg7A==} - - '@ethersproject/constants@5.7.0': - resolution: {integrity: sha512-DHI+y5dBNvkpYUMiRQyxRBYBefZkJfo70VUkUAsRjcPs47muV9evftfZ0PJVCXYbAiCgght0DtcF9srFQmIgWA==} - - '@ethersproject/constants@5.8.0': - resolution: {integrity: sha512-wigX4lrf5Vu+axVTIvNsuL6YrV4O5AXl5ubcURKMEME5TnWBouUh0CDTWxZ2GpnRn1kcCgE7l8O5+VbV9QTTcg==} - - '@ethersproject/contracts@5.8.0': - resolution: {integrity: sha512-0eFjGz9GtuAi6MZwhb4uvUM216F38xiuR0yYCjKJpNfSEy4HUM8hvqqBj9Jmm0IUz8l0xKEhWwLIhPgxNY0yvQ==} - - '@ethersproject/hash@5.7.0': - resolution: {integrity: sha512-qX5WrQfnah1EFnO5zJv1v46a8HW0+E5xuBBDTwMFZLuVTx0tbU2kkx15NqdjxecrLGatQN9FGQKpb1FKdHCt+g==} - - '@ethersproject/hash@5.8.0': - resolution: {integrity: sha512-ac/lBcTbEWW/VGJij0CNSw/wPcw9bSRgCB0AIBz8CvED/jfvDoV9hsIIiWfvWmFEi8RcXtlNwp2jv6ozWOsooA==} - - '@ethersproject/hdnode@5.8.0': - resolution: {integrity: sha512-4bK1VF6E83/3/Im0ERnnUeWOY3P1BZml4ZD3wcH8Ys0/d1h1xaFt6Zc+Dh9zXf9TapGro0T4wvO71UTCp3/uoA==} - - '@ethersproject/json-wallets@5.8.0': - resolution: {integrity: sha512-HxblNck8FVUtNxS3VTEYJAcwiKYsBIF77W15HufqlBF9gGfhmYOJtYZp8fSDZtn9y5EaXTE87zDwzxRoTFk11w==} - - '@ethersproject/keccak256@5.7.0': - resolution: {integrity: sha512-2UcPboeL/iW+pSg6vZ6ydF8tCnv3Iu/8tUmLLzWWGzxWKFFqOBQFLo6uLUv6BDrLgCDfN28RJ/wtByx+jZ4KBg==} - - '@ethersproject/keccak256@5.8.0': - resolution: {integrity: sha512-A1pkKLZSz8pDaQ1ftutZoaN46I6+jvuqugx5KYNeQOPqq+JZ0Txm7dlWesCHB5cndJSu5vP2VKptKf7cksERng==} - - '@ethersproject/logger@5.7.0': - resolution: {integrity: sha512-0odtFdXu/XHtjQXJYA3u9G0G8btm0ND5Cu8M7i5vhEcE8/HmF4Lbdqanwyv4uQTr2tx6b7fQRmgLrsnpQlmnig==} - - '@ethersproject/logger@5.8.0': - resolution: {integrity: sha512-Qe6knGmY+zPPWTC+wQrpitodgBfH7XoceCGL5bJVejmH+yCS3R8jJm8iiWuvWbG76RUmyEG53oqv6GMVWqunjA==} - - '@ethersproject/networks@5.7.1': - resolution: {integrity: sha512-n/MufjFYv3yFcUyfhnXotyDlNdFb7onmkSy8aQERi2PjNcnWQ66xXxa3XlS8nCcA8aJKJjIIMNJTC7tu80GwpQ==} - - '@ethersproject/networks@5.8.0': - resolution: {integrity: sha512-egPJh3aPVAzbHwq8DD7Po53J4OUSsA1MjQp8Vf/OZPav5rlmWUaFLiq8cvQiGK0Z5K6LYzm29+VA/p4RL1FzNg==} - - '@ethersproject/pbkdf2@5.8.0': - resolution: {integrity: sha512-wuHiv97BrzCmfEaPbUFpMjlVg/IDkZThp9Ri88BpjRleg4iePJaj2SW8AIyE8cXn5V1tuAaMj6lzvsGJkGWskg==} - - '@ethersproject/properties@5.7.0': - resolution: {integrity: sha512-J87jy8suntrAkIZtecpxEPxY//szqr1mlBaYlQ0r4RCaiD2hjheqF9s1LVE8vVuJCXisjIP+JgtK/Do54ej4Sw==} - - '@ethersproject/properties@5.8.0': - resolution: {integrity: sha512-PYuiEoQ+FMaZZNGrStmN7+lWjlsoufGIHdww7454FIaGdbe/p5rnaCXTr5MtBYl3NkeoVhHZuyzChPeGeKIpQw==} - - '@ethersproject/providers@5.8.0': - resolution: {integrity: sha512-3Il3oTzEx3o6kzcg9ZzbE+oCZYyY+3Zh83sKkn4s1DZfTUjIegHnN2Cm0kbn9YFy45FDVcuCLLONhU7ny0SsCw==} - - '@ethersproject/random@5.8.0': - resolution: {integrity: sha512-E4I5TDl7SVqyg4/kkA/qTfuLWAQGXmSOgYyO01So8hLfwgKvYK5snIlzxJMk72IFdG/7oh8yuSqY2KX7MMwg+A==} - - '@ethersproject/rlp@5.7.0': - resolution: {integrity: sha512-rBxzX2vK8mVF7b0Tol44t5Tb8gomOHkj5guL+HhzQ1yBh/ydjGnpw6at+X6Iw0Kp3OzzzkcKp8N9r0W4kYSs9w==} - - '@ethersproject/rlp@5.8.0': - resolution: {integrity: sha512-LqZgAznqDbiEunaUvykH2JAoXTT9NV0Atqk8rQN9nx9SEgThA/WMx5DnW8a9FOufo//6FZOCHZ+XiClzgbqV9Q==} - - '@ethersproject/sha2@5.8.0': - resolution: {integrity: sha512-dDOUrXr9wF/YFltgTBYS0tKslPEKr6AekjqDW2dbn1L1xmjGR+9GiKu4ajxovnrDbwxAKdHjW8jNcwfz8PAz4A==} - - '@ethersproject/signing-key@5.7.0': - resolution: {integrity: sha512-MZdy2nL3wO0u7gkB4nA/pEf8lu1TlFswPNmy8AiYkfKTdO6eXBJyUdmHO/ehm/htHw9K/qF8ujnTyUAD+Ry54Q==} - - '@ethersproject/signing-key@5.8.0': - resolution: {integrity: sha512-LrPW2ZxoigFi6U6aVkFN/fa9Yx/+4AtIUe4/HACTvKJdhm0eeb107EVCIQcrLZkxaSIgc/eCrX8Q1GtbH+9n3w==} - - '@ethersproject/solidity@5.8.0': - resolution: {integrity: sha512-4CxFeCgmIWamOHwYN9d+QWGxye9qQLilpgTU0XhYs1OahkclF+ewO+3V1U0mvpiuQxm5EHHmv8f7ClVII8EHsA==} - - '@ethersproject/strings@5.7.0': - resolution: {integrity: sha512-/9nu+lj0YswRNSH0NXYqrh8775XNyEdUQAuf3f+SmOrnVewcJ5SBNAjF7lpgehKi4abvNNXyf+HX86czCdJ8Mg==} - - '@ethersproject/strings@5.8.0': - resolution: {integrity: sha512-qWEAk0MAvl0LszjdfnZ2uC8xbR2wdv4cDabyHiBh3Cldq/T8dPH3V4BbBsAYJUeonwD+8afVXld274Ls+Y1xXg==} - - '@ethersproject/transactions@5.7.0': - resolution: {integrity: sha512-kmcNicCp1lp8qanMTC3RIikGgoJ80ztTyvtsFvCYpSCfkjhD0jZ2LOrnbcuxuToLIUYYf+4XwD1rP+B/erDIhQ==} - - '@ethersproject/transactions@5.8.0': - resolution: {integrity: sha512-UglxSDjByHG0TuU17bDfCemZ3AnKO2vYrL5/2n2oXvKzvb7Cz+W9gOWXKARjp2URVwcWlQlPOEQyAviKwT4AHg==} - - '@ethersproject/units@5.8.0': - resolution: {integrity: sha512-lxq0CAnc5kMGIiWW4Mr041VT8IhNM+Pn5T3haO74XZWFulk7wH1Gv64HqE96hT4a7iiNMdOCFEBgaxWuk8ETKQ==} - - '@ethersproject/wallet@5.8.0': - resolution: {integrity: sha512-G+jnzmgg6UxurVKRKvw27h0kvG75YKXZKdlLYmAHeF32TGUzHkOFd7Zn6QHOTYRFWnfjtSSFjBowKo7vfrXzPA==} - - '@ethersproject/web@5.7.1': - resolution: {integrity: sha512-Gueu8lSvyjBWL4cYsWsjh6MtMwM0+H4HvqFPZfB6dV8ctbP9zFAO73VG1cMWae0FLPCtz0peKPpZY8/ugJJX2w==} - - '@ethersproject/web@5.8.0': - resolution: {integrity: sha512-j7+Ksi/9KfGviws6Qtf9Q7KCqRhpwrYKQPs+JBA/rKVFF/yaWLHJEH3zfVP2plVu+eys0d2DlFmhoQJayFewcw==} - - '@ethersproject/wordlists@5.8.0': - resolution: {integrity: sha512-2df9bbXicZws2Sb5S6ET493uJ0Z84Fjr3pC4tu/qlnZERibZCeUVuqdtt+7Tv9xxhUxHoIekIA7avrKUWHrezg==} - - '@fastify/busboy@2.1.1': - resolution: {integrity: sha512-vBZP4NlzfOlerQTnba4aqZoMhE/a9HY7HRqoOPaETQcSQuWEIyZMHGfVu6w9wGtGK5fED5qRs2DteVCjOH60sA==} - engines: {node: '>=14'} - - '@graphql-tools/merge@8.3.1': - resolution: {integrity: sha512-BMm99mqdNZbEYeTPK3it9r9S6rsZsQKtlqJsSBknAclXq2pGEfOxjcIZi+kBSkHZKPKCRrYDd5vY0+rUmIHVLg==} - peerDependencies: - graphql: ^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0 - - '@graphql-tools/schema@8.5.1': - resolution: {integrity: sha512-0Esilsh0P/qYcB5DKQpiKeQs/jevzIadNTaT0jeWklPMwNbT7yMX4EqZany7mbeRRlSRwMzNzL5olyFdffHBZg==} - peerDependencies: - graphql: ^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0 - - '@graphql-tools/utils@8.13.1': - resolution: {integrity: sha512-qIh9yYpdUFmctVqovwMdheVNJqFh+DQNWIhX87FJStfXYnmweBUDATok9fWPleKeFwxnW8IapKmY8m8toJEkAw==} - peerDependencies: - graphql: ^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0 - - '@graphql-tools/utils@8.9.0': - resolution: {integrity: sha512-pjJIWH0XOVnYGXCqej8g/u/tsfV4LvLlj0eATKQu5zwnxd/TiTHq7Cg313qUPTFFHZ3PP5wJ15chYVtLDwaymg==} - peerDependencies: - graphql: ^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0 - - '@hapi/hoek@9.3.0': - resolution: {integrity: sha512-/c6rf4UJlmHlC9b5BaNvzAcFv7HZ2QHaV0D4/HNlBdvFnvQq8RI4kYdhyPCl7Xj+oWvTWQ8ujhqS53LIgAe6KQ==} - - '@hapi/topo@5.1.0': - resolution: {integrity: sha512-foQZKJig7Ob0BMAYBfcJk8d77QtOe7Wo4ox7ff1lQYoNNAb6jwcY1ncdoy2e9wQZzvNy7ODZCYJkK8kzmcAnAg==} - - '@httptoolkit/httpolyglot@2.2.2': - resolution: {integrity: sha512-Mm75bidN/jrUsuhBjHAMoQbmR52zQYi8xr/+0mQYGW+dQelg+sdJR/kGRKKZGeAoPgp/1rrZWJqdohZP0xm18g==} - engines: {node: '>=12.0.0'} - - '@httptoolkit/subscriptions-transport-ws@0.11.2': - resolution: {integrity: sha512-YB+gYYVjgYUeJrGkfS91ABeNWCFU7EVcn9Cflf2UXjsIiPJEI6yPxujPcjKv9wIJpM+33KQW/qVEmc+BdIDK2w==} - peerDependencies: - graphql: ^15.7.2 || ^16.0.0 - - '@httptoolkit/websocket-stream@6.0.1': - resolution: {integrity: sha512-A0NOZI+Glp3Xgcz6Na7i7o09+/+xm2m0UCU8gdtM2nIv6/cjLmhMZMqehSpTlgbx9omtLmV8LVqOskPEyWnmZQ==} - - '@humanwhocodes/config-array@0.13.0': - resolution: {integrity: sha512-DZLEEqFWQFiyK6h5YIeynKx7JlvCYWL0cImfSRXZ9l4Sg2efkFGTuFf6vzXjK1cq6IYkU+Eg/JizXw+TD2vRNw==} - engines: {node: '>=10.10.0'} - deprecated: Use @eslint/config-array instead - - '@humanwhocodes/module-importer@1.0.1': - resolution: {integrity: sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==} - engines: {node: '>=12.22'} - - '@humanwhocodes/object-schema@2.0.3': - resolution: {integrity: sha512-93zYdMES/c1D69yZiKDBj0V24vqNzB/koF26KPaagAfd3P/4gUlh3Dys5ogAK+Exi9QyzlD8x/08Zt7wIKcDcA==} - deprecated: Use @eslint/object-schema instead - - '@isaacs/cliui@8.0.2': - resolution: {integrity: sha512-O8jcjabXaleOG9DQ0+ARXWZBTfnP4WNAqzuiJK7ll44AmxGKv/J2M4TPjxjY3znBCfvBXFzucm1twdyFybFqEA==} - engines: {node: '>=12'} - - '@istanbuljs/load-nyc-config@1.1.0': - resolution: {integrity: sha512-VjeHSlIzpv/NyD3N0YuHfXOPDIixcA1q2ZV98wsMqcYlPmv2n3Yb2lYP9XMElnaFVXg5A7YLTeLu6V84uQDjmQ==} - engines: {node: '>=8'} - - '@istanbuljs/nyc-config-typescript@1.0.2': - resolution: {integrity: sha512-iKGIyMoyJuFnJRSVTZ78POIRvNnwZaWIf8vG4ZS3rQq58MMDrqEX2nnzx0R28V2X8JvmKYiqY9FP2hlJsm8A0w==} - engines: {node: '>=8'} - peerDependencies: - nyc: '>=15' - - '@istanbuljs/schema@0.1.3': - resolution: {integrity: sha512-ZXRY4jNvVgSVQ8DL3LTcakaAtXwTVUxE81hslsyD2AtoXW/wVob10HkOJ1X/pAlcI7D+2YoZKg5do8G/w6RYgA==} - engines: {node: '>=8'} - - '@jridgewell/gen-mapping@0.3.5': - resolution: {integrity: sha512-IzL8ZoEDIBRWEzlCcRhOaCupYyN5gdIK+Q6fbFdPDg6HqX6jpkItn7DFIpW9LQzXG6Df9sA7+OKnq0qlz/GaQg==} - engines: {node: '>=6.0.0'} - - '@jridgewell/resolve-uri@3.1.2': - resolution: {integrity: sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==} - engines: {node: '>=6.0.0'} - - '@jridgewell/set-array@1.2.1': - resolution: {integrity: sha512-R8gLRTZeyp03ymzP/6Lil/28tGeGEzhx1q2k703KGWRAI1VdvPIXdG70VJc2pAMw3NA6JKL5hhFu1sJX0Mnn/A==} - engines: {node: '>=6.0.0'} - - '@jridgewell/source-map@0.3.6': - resolution: {integrity: sha512-1ZJTZebgqllO79ue2bm3rIGud/bOe0pP5BjSRCRxxYkEZS8STV7zN84UBbiYu7jy+eCKSnVIUgoWWE/tt+shMQ==} - - '@jridgewell/sourcemap-codec@1.5.0': - resolution: {integrity: sha512-gv3ZRaISU3fjPAgNsriBRqGWQL6quFx04YMPW/zD8XMLsU32mhCCbfbO6KZFLjvYpCZ8zyDEgqsgf+PwPaM7GQ==} - - '@jridgewell/trace-mapping@0.3.25': - resolution: {integrity: sha512-vNk6aEwybGtawWmy/PzwnGDOjCkLWSD2wqvjGGAgOAwCGWySYXfYoxt00IJkTF+8Lb57DwOb3Aa0o9CApepiYQ==} - - '@jridgewell/trace-mapping@0.3.9': - resolution: {integrity: sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ==} - - '@manypkg/find-root@1.1.0': - resolution: {integrity: sha512-mki5uBvhHzO8kYYix/WRy2WX8S3B5wdVSc9D6KcU5lQNglP2yt58/VfLuAK49glRXChosY8ap2oJ1qgma3GUVA==} - - '@manypkg/get-packages@1.1.3': - resolution: {integrity: sha512-fo+QhuU3qE/2TQMQmbVMqaQ6EWbMhi4ABWP+O4AM1NqPBuy0OrApV5LO6BrrgnhtAHS2NH6RrVk9OL181tTi8A==} - - '@mapbox/node-pre-gyp@1.0.11': - resolution: {integrity: sha512-Yhlar6v9WQgUp/He7BdgzOz8lqMQ8sU+jkCq7Wx8Myc5YFJLbEe7lgui/V7G1qB1DJykHSGwreceSaD60Y0PUQ==} - hasBin: true - - '@metamask/eth-sig-util@4.0.1': - resolution: {integrity: sha512-tghyZKLHZjcdlDqCA3gNZmLeR0XvOE9U1qoQO9ohyAZT6Pya+H9vkBPcsyXytmYLNgVoin7CKCmweo/R43V+tQ==} - engines: {node: '>=12.0.0'} - - '@noble/curves@1.2.0': - resolution: {integrity: sha512-oYclrNgRaM9SsBUBVbb8M6DTV7ZHRTKugureoYEncY5c65HOmRzvSiTE3y5CYaPYJA/GVkrhXEoF0M3Ya9PMnw==} - - '@noble/curves@1.4.2': - resolution: {integrity: sha512-TavHr8qycMChk8UwMld0ZDRvatedkzWfH8IiaeGCfymOP5i0hSCozz9vHOL0nkwk7HRMlFnAiKpS2jrUmSybcw==} - - '@noble/hashes@1.2.0': - resolution: {integrity: sha512-FZfhjEDbT5GRswV3C6uvLPHMiVD6lQBmpoX5+eSiPaMTXte/IKqI5dykDxzZB/WBeK/CDuQRBWarPdi3FNY2zQ==} - - '@noble/hashes@1.3.2': - resolution: {integrity: sha512-MVC8EAQp7MvEcm30KWENFjgR+Mkmf+D189XJTkFIlwohU5hcBbn1ZkKq7KVTi2Hme3PMGF390DaL52beVrIihQ==} - engines: {node: '>= 16'} - - '@noble/hashes@1.4.0': - resolution: {integrity: sha512-V1JJ1WTRUqHHrOSh597hURcMqVKVGL/ea3kv0gSnEdsEZ0/+VyPghM1lMNGc00z7CIQorSvbKpuJkxvuHbvdbg==} - engines: {node: '>= 16'} - - '@noble/hashes@1.5.0': - resolution: {integrity: sha512-1j6kQFb7QRru7eKN3ZDvRcP13rugwdxZqCjbiAVZfIJwgj2A65UmT4TgARXGlXgnRkORLTDTrO19ZErt7+QXgA==} - engines: {node: ^14.21.3 || >=16} - - '@noble/secp256k1@1.7.1': - resolution: {integrity: sha512-hOUk6AyBFmqVrv7k5WAw/LpszxVbj9gGN4JRkIX52fdFAj1UA61KXmZDvqVEm+pOyec3+fIeZB02LYa/pWOArw==} - - '@nodelib/fs.scandir@2.1.5': - resolution: {integrity: sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==} - engines: {node: '>= 8'} - - '@nodelib/fs.stat@2.0.5': - resolution: {integrity: sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==} - engines: {node: '>= 8'} - - '@nodelib/fs.walk@1.2.8': - resolution: {integrity: sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==} - engines: {node: '>= 8'} - - '@nomicfoundation/edr-darwin-arm64@0.6.4': - resolution: {integrity: sha512-QNQErISLgssV9+qia8sIjRANqtbW8snSDvjspixT/kSQ5ZSGxxctTg7x72wPSrcu8+EBEveIe5uqENIp5GH8HQ==} - engines: {node: '>= 18'} - - '@nomicfoundation/edr-darwin-x64@0.6.4': - resolution: {integrity: sha512-cjVmREiwByyc9+oGfvAh49IAw+oVJHF9WWYRD+Tm/ZlSpnEVWxrGNBak2bd/JSYjn+mZE7gmWS4SMRi4nKaLUg==} - engines: {node: '>= 18'} - - '@nomicfoundation/edr-linux-arm64-gnu@0.6.4': - resolution: {integrity: sha512-96o9kRIVD6W5VkgKvUOGpWyUGInVQ5BRlME2Fa36YoNsRQMaKtmYJEU0ACosYES6ZTpYC8U5sjMulvPtVoEfOA==} - engines: {node: '>= 18'} - - '@nomicfoundation/edr-linux-arm64-musl@0.6.4': - resolution: {integrity: sha512-+JVEW9e5plHrUfQlSgkEj/UONrIU6rADTEk+Yp9pbe+mzNkJdfJYhs5JYiLQRP4OjxH4QOrXI97bKU6FcEbt5Q==} - engines: {node: '>= 18'} - - '@nomicfoundation/edr-linux-x64-gnu@0.6.4': - resolution: {integrity: sha512-nzYWW+fO3EZItOeP4CrdMgDXfaGBIBkKg0Y/7ySpUxLqzut40O4Mb0/+quqLAFkacUSWMlFp8nsmypJfOH5zoA==} - engines: {node: '>= 18'} - - '@nomicfoundation/edr-linux-x64-musl@0.6.4': - resolution: {integrity: sha512-QFRoE9qSQ2boRrVeQ1HdzU+XN7NUgwZ1SIy5DQt4d7jCP+5qTNsq8LBNcqhRBOATgO63nsweNUhxX/Suj5r1Sw==} - engines: {node: '>= 18'} - - '@nomicfoundation/edr-win32-x64-msvc@0.6.4': - resolution: {integrity: sha512-2yopjelNkkCvIjUgBGhrn153IBPLwnsDeNiq6oA0WkeM8tGmQi4td+PGi9jAriUDAkc59Yoi2q9hYA6efiY7Zw==} - engines: {node: '>= 18'} - - '@nomicfoundation/edr@0.6.4': - resolution: {integrity: sha512-YgrSuT3yo5ZQkbvBGqQ7hG+RDvz3YygSkddg4tb1Z0Y6pLXFzwrcEwWaJCFAVeeZxdxGfCgGMUYgRVneK+WXkw==} - engines: {node: '>= 18'} - - '@nomicfoundation/ethereumjs-common@4.0.4': - resolution: {integrity: sha512-9Rgb658lcWsjiicr5GzNCjI1llow/7r0k50dLL95OJ+6iZJcVbi15r3Y0xh2cIO+zgX0WIHcbzIu6FeQf9KPrg==} - - '@nomicfoundation/ethereumjs-rlp@5.0.4': - resolution: {integrity: sha512-8H1S3s8F6QueOc/X92SdrA4RDenpiAEqMg5vJH99kcQaCy/a3Q6fgseo75mgWlbanGJXSlAPtnCeG9jvfTYXlw==} - engines: {node: '>=18'} - hasBin: true - - '@nomicfoundation/ethereumjs-tx@5.0.4': - resolution: {integrity: sha512-Xjv8wAKJGMrP1f0n2PeyfFCCojHd7iS3s/Ab7qzF1S64kxZ8Z22LCMynArYsVqiFx6rzYy548HNVEyI+AYN/kw==} - engines: {node: '>=18'} - peerDependencies: - c-kzg: ^2.1.2 - peerDependenciesMeta: - c-kzg: - optional: true - - '@nomicfoundation/ethereumjs-util@9.0.4': - resolution: {integrity: sha512-sLOzjnSrlx9Bb9EFNtHzK/FJFsfg2re6bsGqinFinH1gCqVfz9YYlXiMWwDM4C/L4ywuHFCYwfKTVr/QHQcU0Q==} - engines: {node: '>=18'} - peerDependencies: - c-kzg: ^2.1.2 - peerDependenciesMeta: - c-kzg: - optional: true - - '@nomicfoundation/hardhat-chai-matchers@2.0.8': - resolution: {integrity: sha512-Z5PiCXH4xhNLASROlSUOADfhfpfhYO6D7Hn9xp8PddmHey0jq704cr6kfU8TRrQ4PUZbpfsZadPj+pCfZdjPIg==} - peerDependencies: - '@nomicfoundation/hardhat-ethers': ^3.0.0 - chai: ^4.2.0 - ethers: ^6.1.0 - hardhat: ^2.9.4 - - '@nomicfoundation/hardhat-ethers@3.0.8': - resolution: {integrity: sha512-zhOZ4hdRORls31DTOqg+GmEZM0ujly8GGIuRY7t7szEk2zW/arY1qDug/py8AEktT00v5K+b6RvbVog+va51IA==} - peerDependencies: - ethers: ^6.1.0 - hardhat: ^2.0.0 - - '@nomicfoundation/hardhat-ignition-ethers@0.15.6': - resolution: {integrity: sha512-+jXDGWdfkuIGm0W+aFEZ9SLQz2MIj7Cf4j7ANTXUIIbK8sUkvnVOhTTAQEdqa0KgGEb45XS88BPg0w8fixwrXQ==} - peerDependencies: - '@nomicfoundation/hardhat-ethers': ^3.0.4 - '@nomicfoundation/hardhat-ignition': ^0.15.6 - '@nomicfoundation/ignition-core': ^0.15.6 - ethers: ^6.7.0 - hardhat: ^2.18.0 - - '@nomicfoundation/hardhat-ignition@0.15.6': - resolution: {integrity: sha512-PcMf4xlYvwHYej2jcuOd/rBNNMM5FO11vh9c+MF8+m7NxV4b6NOameL3uscoD7ghg0H2GNgnGXgQ67ryRqtdIQ==} - peerDependencies: - '@nomicfoundation/hardhat-verify': ^2.0.1 - hardhat: ^2.18.0 - - '@nomicfoundation/hardhat-network-helpers@1.0.12': - resolution: {integrity: sha512-xTNQNI/9xkHvjmCJnJOTyqDSl8uq1rKb2WOVmixQxFtRd7Oa3ecO8zM0cyC2YmOK+jHB9WPZ+F/ijkHg1CoORA==} - peerDependencies: - hardhat: ^2.9.5 - - '@nomicfoundation/hardhat-toolbox@5.0.0': - resolution: {integrity: sha512-FnUtUC5PsakCbwiVNsqlXVIWG5JIb5CEZoSXbJUsEBun22Bivx2jhF1/q9iQbzuaGpJKFQyOhemPB2+XlEE6pQ==} - peerDependencies: - '@nomicfoundation/hardhat-chai-matchers': ^2.0.0 - '@nomicfoundation/hardhat-ethers': ^3.0.0 - '@nomicfoundation/hardhat-ignition-ethers': ^0.15.0 - '@nomicfoundation/hardhat-network-helpers': ^1.0.0 - '@nomicfoundation/hardhat-verify': ^2.0.0 - '@typechain/ethers-v6': ^0.5.0 - '@typechain/hardhat': ^9.0.0 - '@types/chai': ^4.2.0 - '@types/mocha': '>=9.1.0' - '@types/node': '>=18.0.0' - chai: ^4.2.0 - ethers: ^6.4.0 - hardhat: ^2.11.0 - hardhat-gas-reporter: ^1.0.8 - solidity-coverage: ^0.8.1 - ts-node: '>=8.0.0' - typechain: ^8.3.0 - typescript: '>=4.5.0' - - '@nomicfoundation/hardhat-verify@2.0.11': - resolution: {integrity: sha512-lGIo4dNjVQFdsiEgZp3KP6ntLiF7xJEJsbNHfSyIiFCyI0Yv0518ElsFtMC5uCuHEChiBBMrib9jWQvHHT+X3Q==} - peerDependencies: - hardhat: ^2.0.4 - - '@nomicfoundation/ignition-core@0.15.6': - resolution: {integrity: sha512-9eD1NJ2G4vh7IleRNmCz/3bGVoNEPYrRVPqx0uvWzG2xD226GGQcTgtK+NovyxsQOE/AcLF1xjX3/+8kNc1sSg==} - - '@nomicfoundation/ignition-ui@0.15.10': - resolution: {integrity: sha512-82XQPF+1fvxTimDUPgDVwpTjHjfjFgFs84rERbBiMLQbz6sPtgTlV8HHrlbMx8tT/JKCI/SCU4gxV8xA4CPfcg==} - - '@nomicfoundation/solidity-analyzer-darwin-arm64@0.1.2': - resolution: {integrity: sha512-JaqcWPDZENCvm++lFFGjrDd8mxtf+CtLd2MiXvMNTBD33dContTZ9TWETwNFwg7JTJT5Q9HEecH7FA+HTSsIUw==} - engines: {node: '>= 12'} - - '@nomicfoundation/solidity-analyzer-darwin-x64@0.1.2': - resolution: {integrity: sha512-fZNmVztrSXC03e9RONBT+CiksSeYcxI1wlzqyr0L7hsQlK1fzV+f04g2JtQ1c/Fe74ZwdV6aQBdd6Uwl1052sw==} - engines: {node: '>= 12'} - - '@nomicfoundation/solidity-analyzer-linux-arm64-gnu@0.1.2': - resolution: {integrity: sha512-3d54oc+9ZVBuB6nbp8wHylk4xh0N0Gc+bk+/uJae+rUgbOBwQSfuGIbAZt1wBXs5REkSmynEGcqx6DutoK0tPA==} - engines: {node: '>= 12'} - - '@nomicfoundation/solidity-analyzer-linux-arm64-musl@0.1.2': - resolution: {integrity: sha512-iDJfR2qf55vgsg7BtJa7iPiFAsYf2d0Tv/0B+vhtnI16+wfQeTbP7teookbGvAo0eJo7aLLm0xfS/GTkvHIucA==} - engines: {node: '>= 12'} - - '@nomicfoundation/solidity-analyzer-linux-x64-gnu@0.1.2': - resolution: {integrity: sha512-9dlHMAt5/2cpWyuJ9fQNOUXFB/vgSFORg1jpjX1Mh9hJ/MfZXlDdHQ+DpFCs32Zk5pxRBb07yGvSHk9/fezL+g==} - engines: {node: '>= 12'} - - '@nomicfoundation/solidity-analyzer-linux-x64-musl@0.1.2': - resolution: {integrity: sha512-GzzVeeJob3lfrSlDKQw2bRJ8rBf6mEYaWY+gW0JnTDHINA0s2gPR4km5RLIj1xeZZOYz4zRw+AEeYgLRqB2NXg==} - engines: {node: '>= 12'} - - '@nomicfoundation/solidity-analyzer-win32-x64-msvc@0.1.2': - resolution: {integrity: sha512-Fdjli4DCcFHb4Zgsz0uEJXZ2K7VEO+w5KVv7HmT7WO10iODdU9csC2az4jrhEsRtiR9Gfd74FlG0NYlw1BMdyA==} - engines: {node: '>= 12'} - - '@nomicfoundation/solidity-analyzer@0.1.2': - resolution: {integrity: sha512-q4n32/FNKIhQ3zQGGw5CvPF6GTvDCpYwIf7bEY/dZTZbgfDsHyjJwURxUJf3VQuuJj+fDIFl4+KkBVbw4Ef6jA==} - engines: {node: '>= 12'} - - '@pkgr/core@0.1.1': - resolution: {integrity: sha512-cq8o4cWH0ibXh9VGi5P20Tu9XF/0fFXl9EUinr9QfTM7a7p0oTA4iJRCQWppXR1Pg8dSM0UCItCkPwsk9qWWYA==} - engines: {node: ^12.20.0 || ^14.18.0 || >=16.0.0} - - '@preconstruct/cli@2.8.9': - resolution: {integrity: sha512-Psk/pgeWCFnJWddVtsarcNRZbZ+35AtNCEfOjDANrfLxyGm3Smt00rm1w8RiMiwqZryUkt9XaSHriWQBFKechQ==} - hasBin: true - - '@preconstruct/hook@0.4.0': - resolution: {integrity: sha512-a7mrlPTM3tAFJyz43qb4pPVpUx8j8TzZBFsNFqcKcE/sEakNXRlQAuCT4RGZRf9dQiiUnBahzSIWawU4rENl+Q==} - - '@puppeteer/browsers@2.6.1': - resolution: {integrity: sha512-aBSREisdsGH890S2rQqK82qmQYU3uFpSH8wcZWHgHzl3LfzsxAKbLNiAG9mO8v1Y0UICBeClICxPJvyr0rcuxg==} - engines: {node: '>=18'} - hasBin: true - - '@rollup/plugin-alias@3.1.9': - resolution: {integrity: sha512-QI5fsEvm9bDzt32k39wpOwZhVzRcL5ydcffUHMyLVaVaLeC70I8TJZ17F1z1eMoLu4E/UOcH9BWVkKpIKdrfiw==} - engines: {node: '>=8.0.0'} - peerDependencies: - rollup: ^1.20.0||^2.0.0 - - '@rollup/plugin-commonjs@15.1.0': - resolution: {integrity: sha512-xCQqz4z/o0h2syQ7d9LskIMvBSH4PX5PjYdpSSvgS+pQik3WahkQVNWg3D8XJeYjZoVWnIUQYDghuEMRGrmQYQ==} - engines: {node: '>= 8.0.0'} - peerDependencies: - rollup: ^2.22.0 - - '@rollup/plugin-json@4.1.0': - resolution: {integrity: sha512-yfLbTdNS6amI/2OpmbiBoW12vngr5NW2jCJVZSBEz+H5KfUJZ2M7sDjk0U6GOOdCWFVScShte29o9NezJ53TPw==} - peerDependencies: - rollup: ^1.20.0 || ^2.0.0 - - '@rollup/plugin-node-resolve@11.2.1': - resolution: {integrity: sha512-yc2n43jcqVyGE2sqV5/YCmocy9ArjVAP/BeXyTtADTBBX6V0e5UMqwO8CdQ0kzjb6zu5P1qMzsScCMRvE9OlVg==} - engines: {node: '>= 10.0.0'} - peerDependencies: - rollup: ^1.20.0||^2.0.0 - - '@rollup/plugin-replace@2.4.2': - resolution: {integrity: sha512-IGcu+cydlUMZ5En85jxHH4qj2hta/11BHq95iHEyb2sbgiN0eCdzvUcHw5gt9pBL5lTi4JDYJ1acCoMGpTvEZg==} - peerDependencies: - rollup: ^1.20.0 || ^2.0.0 - - '@rollup/pluginutils@3.1.0': - resolution: {integrity: sha512-GksZ6pr6TpIjHm8h9lSQ8pi8BE9VeubNT0OMJ3B5uZJ8pz73NPiqOtCog/x2/QzM1ENChPKxMDhiQuRHsqc+lg==} - engines: {node: '>= 8.0.0'} - peerDependencies: - rollup: ^1.20.0||^2.0.0 - - '@rollup/pluginutils@4.2.1': - resolution: {integrity: sha512-iKnFXr7NkdZAIHiIWE+BX5ULi/ucVFYWD6TbAV+rZctiRTY2PL6tsIKhoIOaoskiWAkgu+VsbXgUVDNLHf+InQ==} - engines: {node: '>= 8.0.0'} - - '@rtsao/scc@1.1.0': - resolution: {integrity: sha512-zt6OdqaDoOnJ1ZYsCYGt9YmWzDXl4vQdKTyJev62gFhRGKdx7mcT54V9KIjg+d2wi9EXsPvAPKe7i7WjfVWB8g==} - - '@scure/base@1.1.9': - resolution: {integrity: sha512-8YKhl8GHiNI/pU2VMaofa2Tor7PJRAjwQLBBuilkJ9L5+13yVbC7JO/wS7piioAvPSwR3JKM1IJ/u4xQzbcXKg==} - - '@scure/bip32@1.1.5': - resolution: {integrity: sha512-XyNh1rB0SkEqd3tXcXMi+Xe1fvg+kUIcoRIEujP1Jgv7DqW2r9lg3Ah0NkFaCs9sTkQAQA8kw7xiRXzENi9Rtw==} - - '@scure/bip32@1.4.0': - resolution: {integrity: sha512-sVUpc0Vq3tXCkDGYVWGIZTRfnvu8LoTDaev7vbwh0omSvVORONr960MQWdKqJDCReIEmTj3PAr73O3aoxz7OPg==} - - '@scure/bip39@1.1.1': - resolution: {integrity: sha512-t+wDck2rVkh65Hmv280fYdVdY25J9YeEUIgn2LG1WM6gxFkGzcksoDiUkWVpVp3Oex9xGC68JU2dSbUfwZ2jPg==} - - '@scure/bip39@1.3.0': - resolution: {integrity: sha512-disdg7gHuTDZtY+ZdkmLpPCk7fxZSu3gBiEGuoC1XYxv9cGx3Z6cpTggCgW6odSOOIXCiDjuGejW+aJKCY/pIQ==} - - '@sentry/core@5.30.0': - resolution: {integrity: sha512-TmfrII8w1PQZSZgPpUESqjB+jC6MvZJZdLtE/0hZ+SrnKhW3x5WlYLvTXZpcWePYBku7rl2wn1RZu6uT0qCTeg==} - engines: {node: '>=6'} - - '@sentry/hub@5.30.0': - resolution: {integrity: sha512-2tYrGnzb1gKz2EkMDQcfLrDTvmGcQPuWxLnJKXJvYTQDGLlEvi2tWz1VIHjunmOvJrB5aIQLhm+dcMRwFZDCqQ==} - engines: {node: '>=6'} - - '@sentry/minimal@5.30.0': - resolution: {integrity: sha512-BwWb/owZKtkDX+Sc4zCSTNcvZUq7YcH3uAVlmh/gtR9rmUvbzAA3ewLuB3myi4wWRAMEtny6+J/FN/x+2wn9Xw==} - engines: {node: '>=6'} - - '@sentry/node@5.30.0': - resolution: {integrity: sha512-Br5oyVBF0fZo6ZS9bxbJZG4ApAjRqAnqFFurMVJJdunNb80brh7a5Qva2kjhm+U6r9NJAB5OmDyPkA1Qnt+QVg==} - engines: {node: '>=6'} - - '@sentry/tracing@5.30.0': - resolution: {integrity: sha512-dUFowCr0AIMwiLD7Fs314Mdzcug+gBVo/+NCMyDw8tFxJkwWAKl7Qa2OZxLQ0ZHjakcj1hNKfCQJ9rhyfOl4Aw==} - engines: {node: '>=6'} - - '@sentry/types@5.30.0': - resolution: {integrity: sha512-R8xOqlSTZ+htqrfteCWU5Nk0CDN5ApUTvrlvBuiH1DyP6czDZ4ktbZB0hAgBlVcK0U+qpD3ag3Tqqpa5Q67rPw==} - engines: {node: '>=6'} - - '@sentry/utils@5.30.0': - resolution: {integrity: sha512-zaYmoH0NWWtvnJjC9/CBseXMtKHm/tm40sz3YfJRxeQjyzRqNQPgivpd9R/oDJCYj999mzdW382p/qi2ypjLww==} - engines: {node: '>=6'} - - '@sideway/address@4.1.5': - resolution: {integrity: sha512-IqO/DUQHUkPeixNQ8n0JA6102hT9CmaljNTPmQ1u8MEhBo/R4Q8eKLN/vGZxuebwOroDB4cbpjheD4+/sKFK4Q==} - - '@sideway/formula@3.0.1': - resolution: {integrity: sha512-/poHZJJVjx3L+zVD6g9KgHfYnb443oi7wLu/XKojDviHy6HOEOA6z1Trk5aR1dGcmPenJEgb2sK2I80LeS3MIg==} - - '@sideway/pinpoint@2.0.0': - resolution: {integrity: sha512-RNiOoTPkptFtSVzQevY/yWtZwf/RxyVnPy/OcA9HBM3MlGDnBEYL5B41H0MTn0Uec8Hi+2qUtTfG2WWZBmMejQ==} - - '@sindresorhus/is@4.6.0': - resolution: {integrity: sha512-t09vSN3MdfsyCHoFcTRCH/iUtG7OJ0CsjzB8cjAmKc/va/kIgeDI/TxsigdncE/4be734m0cvIYwNaV4i2XqAw==} - engines: {node: '>=10'} - - '@sindresorhus/merge-streams@2.3.0': - resolution: {integrity: sha512-LtoMMhxAlorcGhmFYI+LhPgbPZCkgP6ra1YL604EeF6U98pLlQ3iWIGMdWSC+vWmPBWBNgmDBAhnAobLROJmwg==} - engines: {node: '>=18'} - - '@smithy/abort-controller@3.1.6': - resolution: {integrity: sha512-0XuhuHQlEqbNQZp7QxxrFTdVWdwxch4vjxYgfInF91hZFkPxf9QDrdQka0KfxFMPqLNzSw0b95uGTrLliQUavQ==} - engines: {node: '>=16.0.0'} - - '@smithy/config-resolver@3.0.10': - resolution: {integrity: sha512-Uh0Sz9gdUuz538nvkPiyv1DZRX9+D15EKDtnQP5rYVAzM/dnYk3P8cg73jcxyOitPgT3mE3OVj7ky7sibzHWkw==} - engines: {node: '>=16.0.0'} - - '@smithy/core@2.5.1': - resolution: {integrity: sha512-DujtuDA7BGEKExJ05W5OdxCoyekcKT3Rhg1ZGeiUWaz2BJIWXjZmsG/DIP4W48GHno7AQwRsaCb8NcBgH3QZpg==} - engines: {node: '>=16.0.0'} - - '@smithy/credential-provider-imds@3.2.5': - resolution: {integrity: sha512-4FTQGAsuwqTzVMmiRVTn0RR9GrbRfkP0wfu/tXWVHd2LgNpTY0uglQpIScXK4NaEyXbB3JmZt8gfVqO50lP8wg==} - engines: {node: '>=16.0.0'} - - '@smithy/fetch-http-handler@3.2.9': - resolution: {integrity: sha512-hYNVQOqhFQ6vOpenifFME546f0GfJn2OiQ3M0FDmuUu8V/Uiwy2wej7ZXxFBNqdx0R5DZAqWM1l6VRhGz8oE6A==} - - '@smithy/fetch-http-handler@4.0.0': - resolution: {integrity: sha512-MLb1f5tbBO2X6K4lMEKJvxeLooyg7guq48C2zKr4qM7F2Gpkz4dc+hdSgu77pCJ76jVqFBjZczHYAs6dp15N+g==} - - '@smithy/hash-node@3.0.8': - resolution: {integrity: sha512-tlNQYbfpWXHimHqrvgo14DrMAgUBua/cNoz9fMYcDmYej7MAmUcjav/QKQbFc3NrcPxeJ7QClER4tWZmfwoPng==} - engines: {node: '>=16.0.0'} - - '@smithy/invalid-dependency@3.0.8': - resolution: {integrity: sha512-7Qynk6NWtTQhnGTTZwks++nJhQ1O54Mzi7fz4PqZOiYXb4Z1Flpb2yRvdALoggTS8xjtohWUM+RygOtB30YL3Q==} - - '@smithy/is-array-buffer@2.2.0': - resolution: {integrity: sha512-GGP3O9QFD24uGeAXYUjwSTXARoqpZykHadOmA8G5vfJPK0/DC67qa//0qvqrJzL1xc8WQWX7/yc7fwudjPHPhA==} - engines: {node: '>=14.0.0'} - - '@smithy/is-array-buffer@3.0.0': - resolution: {integrity: sha512-+Fsu6Q6C4RSJiy81Y8eApjEB5gVtM+oFKTffg+jSuwtvomJJrhUJBu2zS8wjXSgH/g1MKEWrzyChTBe6clb5FQ==} - engines: {node: '>=16.0.0'} - - '@smithy/middleware-content-length@3.0.10': - resolution: {integrity: sha512-T4dIdCs1d/+/qMpwhJ1DzOhxCZjZHbHazEPJWdB4GDi2HjIZllVzeBEcdJUN0fomV8DURsgOyrbEUzg3vzTaOg==} - engines: {node: '>=16.0.0'} - - '@smithy/middleware-endpoint@3.2.1': - resolution: {integrity: sha512-wWO3xYmFm6WRW8VsEJ5oU6h7aosFXfszlz3Dj176pTij6o21oZnzkCLzShfmRaaCHDkBXWBdO0c4sQAvLFP6zA==} - engines: {node: '>=16.0.0'} - - '@smithy/middleware-retry@3.0.25': - resolution: {integrity: sha512-m1F70cPaMBML4HiTgCw5I+jFNtjgz5z5UdGnUbG37vw6kh4UvizFYjqJGHvicfgKMkDL6mXwyPp5mhZg02g5sg==} - engines: {node: '>=16.0.0'} - - '@smithy/middleware-serde@3.0.8': - resolution: {integrity: sha512-Xg2jK9Wc/1g/MBMP/EUn2DLspN8LNt+GMe7cgF+Ty3vl+Zvu+VeZU5nmhveU+H8pxyTsjrAkci8NqY6OuvZnjA==} - engines: {node: '>=16.0.0'} - - '@smithy/middleware-stack@3.0.8': - resolution: {integrity: sha512-d7ZuwvYgp1+3682Nx0MD3D/HtkmZd49N3JUndYWQXfRZrYEnCWYc8BHcNmVsPAp9gKvlurdg/mubE6b/rPS9MA==} - engines: {node: '>=16.0.0'} - - '@smithy/node-config-provider@3.1.9': - resolution: {integrity: sha512-qRHoah49QJ71eemjuS/WhUXB+mpNtwHRWQr77J/m40ewBVVwvo52kYAmb7iuaECgGTTcYxHS4Wmewfwy++ueew==} - engines: {node: '>=16.0.0'} - - '@smithy/node-http-handler@3.2.5': - resolution: {integrity: sha512-PkOwPNeKdvX/jCpn0A8n9/TyoxjGZB8WVoJmm9YzsnAgggTj4CrjpRHlTQw7dlLZ320n1mY1y+nTRUDViKi/3w==} - engines: {node: '>=16.0.0'} - - '@smithy/property-provider@3.1.8': - resolution: {integrity: sha512-ukNUyo6rHmusG64lmkjFeXemwYuKge1BJ8CtpVKmrxQxc6rhUX0vebcptFA9MmrGsnLhwnnqeH83VTU9hwOpjA==} - engines: {node: '>=16.0.0'} - - '@smithy/protocol-http@4.1.5': - resolution: {integrity: sha512-hsjtwpIemmCkm3ZV5fd/T0bPIugW1gJXwZ/hpuVubt2hEUApIoUTrf6qIdh9MAWlw0vjMrA1ztJLAwtNaZogvg==} - engines: {node: '>=16.0.0'} - - '@smithy/querystring-builder@3.0.8': - resolution: {integrity: sha512-btYxGVqFUARbUrN6VhL9c3dnSviIwBYD9Rz1jHuN1hgh28Fpv2xjU1HeCeDJX68xctz7r4l1PBnFhGg1WBBPuA==} - engines: {node: '>=16.0.0'} - - '@smithy/querystring-parser@3.0.8': - resolution: {integrity: sha512-BtEk3FG7Ks64GAbt+JnKqwuobJNX8VmFLBsKIwWr1D60T426fGrV2L3YS5siOcUhhp6/Y6yhBw1PSPxA5p7qGg==} - engines: {node: '>=16.0.0'} - - '@smithy/service-error-classification@3.0.8': - resolution: {integrity: sha512-uEC/kCCFto83bz5ZzapcrgGqHOh/0r69sZ2ZuHlgoD5kYgXJEThCoTuw/y1Ub3cE7aaKdznb+jD9xRPIfIwD7g==} - engines: {node: '>=16.0.0'} - - '@smithy/shared-ini-file-loader@3.1.9': - resolution: {integrity: sha512-/+OsJRNtoRbtsX0UpSgWVxFZLsJHo/4sTr+kBg/J78sr7iC+tHeOvOJrS5hCpVQ6sWBbhWLp1UNiuMyZhE6pmA==} - engines: {node: '>=16.0.0'} - - '@smithy/signature-v4@4.2.1': - resolution: {integrity: sha512-NsV1jF4EvmO5wqmaSzlnTVetemBS3FZHdyc5CExbDljcyJCEEkJr8ANu2JvtNbVg/9MvKAWV44kTrGS+Pi4INg==} - engines: {node: '>=16.0.0'} - - '@smithy/smithy-client@3.4.2': - resolution: {integrity: sha512-dxw1BDxJiY9/zI3cBqfVrInij6ShjpV4fmGHesGZZUiP9OSE/EVfdwdRz0PgvkEvrZHpsj2htRaHJfftE8giBA==} - engines: {node: '>=16.0.0'} - - '@smithy/types@3.6.0': - resolution: {integrity: sha512-8VXK/KzOHefoC65yRgCn5vG1cysPJjHnOVt9d0ybFQSmJgQj152vMn4EkYhGuaOmnnZvCPav/KnYyE6/KsNZ2w==} - engines: {node: '>=16.0.0'} - - '@smithy/url-parser@3.0.8': - resolution: {integrity: sha512-4FdOhwpTW7jtSFWm7SpfLGKIBC9ZaTKG5nBF0wK24aoQKQyDIKUw3+KFWCQ9maMzrgTJIuOvOnsV2lLGW5XjTg==} - - '@smithy/util-base64@3.0.0': - resolution: {integrity: sha512-Kxvoh5Qtt0CDsfajiZOCpJxgtPHXOKwmM+Zy4waD43UoEMA+qPxxa98aE/7ZhdnBFZFXMOiBR5xbcaMhLtznQQ==} - engines: {node: '>=16.0.0'} - - '@smithy/util-body-length-browser@3.0.0': - resolution: {integrity: sha512-cbjJs2A1mLYmqmyVl80uoLTJhAcfzMOyPgjwAYusWKMdLeNtzmMz9YxNl3/jRLoxSS3wkqkf0jwNdtXWtyEBaQ==} - - '@smithy/util-body-length-node@3.0.0': - resolution: {integrity: sha512-Tj7pZ4bUloNUP6PzwhN7K386tmSmEET9QtQg0TgdNOnxhZvCssHji+oZTUIuzxECRfG8rdm2PMw2WCFs6eIYkA==} - engines: {node: '>=16.0.0'} - - '@smithy/util-buffer-from@2.2.0': - resolution: {integrity: sha512-IJdWBbTcMQ6DA0gdNhh/BwrLkDR+ADW5Kr1aZmd4k3DIF6ezMV4R2NIAmT08wQJ3yUK82thHWmC/TnK/wpMMIA==} - engines: {node: '>=14.0.0'} - - '@smithy/util-buffer-from@3.0.0': - resolution: {integrity: sha512-aEOHCgq5RWFbP+UDPvPot26EJHjOC+bRgse5A8V3FSShqd5E5UN4qc7zkwsvJPPAVsf73QwYcHN1/gt/rtLwQA==} - engines: {node: '>=16.0.0'} - - '@smithy/util-config-provider@3.0.0': - resolution: {integrity: sha512-pbjk4s0fwq3Di/ANL+rCvJMKM5bzAQdE5S/6RL5NXgMExFAi6UgQMPOm5yPaIWPpr+EOXKXRonJ3FoxKf4mCJQ==} - engines: {node: '>=16.0.0'} - - '@smithy/util-defaults-mode-browser@3.0.25': - resolution: {integrity: sha512-fRw7zymjIDt6XxIsLwfJfYUfbGoO9CmCJk6rjJ/X5cd20+d2Is7xjU5Kt/AiDt6hX8DAf5dztmfP5O82gR9emA==} - engines: {node: '>= 10.0.0'} - - '@smithy/util-defaults-mode-node@3.0.25': - resolution: {integrity: sha512-H3BSZdBDiVZGzt8TG51Pd2FvFO0PAx/A0mJ0EH8a13KJ6iUCdYnw/Dk/MdC1kTd0eUuUGisDFaxXVXo4HHFL1g==} - engines: {node: '>= 10.0.0'} - - '@smithy/util-endpoints@2.1.4': - resolution: {integrity: sha512-kPt8j4emm7rdMWQyL0F89o92q10gvCUa6sBkBtDJ7nV2+P7wpXczzOfoDJ49CKXe5CCqb8dc1W+ZdLlrKzSAnQ==} - engines: {node: '>=16.0.0'} - - '@smithy/util-hex-encoding@3.0.0': - resolution: {integrity: sha512-eFndh1WEK5YMUYvy3lPlVmYY/fZcQE1D8oSf41Id2vCeIkKJXPcYDCZD+4+xViI6b1XSd7tE+s5AmXzz5ilabQ==} - engines: {node: '>=16.0.0'} - - '@smithy/util-middleware@3.0.8': - resolution: {integrity: sha512-p7iYAPaQjoeM+AKABpYWeDdtwQNxasr4aXQEA/OmbOaug9V0odRVDy3Wx4ci8soljE/JXQo+abV0qZpW8NX0yA==} - engines: {node: '>=16.0.0'} - - '@smithy/util-retry@3.0.8': - resolution: {integrity: sha512-TCEhLnY581YJ+g1x0hapPz13JFqzmh/pMWL2KEFASC51qCfw3+Y47MrTmea4bUE5vsdxQ4F6/KFbUeSz22Q1ow==} - engines: {node: '>=16.0.0'} - - '@smithy/util-stream@3.2.1': - resolution: {integrity: sha512-R3ufuzJRxSJbE58K9AEnL/uSZyVdHzud9wLS8tIbXclxKzoe09CRohj2xV8wpx5tj7ZbiJaKYcutMm1eYgz/0A==} - engines: {node: '>=16.0.0'} - - '@smithy/util-uri-escape@3.0.0': - resolution: {integrity: sha512-LqR7qYLgZTD7nWLBecUi4aqolw8Mhza9ArpNEQ881MJJIU2sE5iHCK6TdyqqzcDLy0OPe10IY4T8ctVdtynubg==} - engines: {node: '>=16.0.0'} - - '@smithy/util-utf8@2.3.0': - resolution: {integrity: sha512-R8Rdn8Hy72KKcebgLiv8jQcQkXoLMOGGv5uI1/k0l+snqkOzQ1R0ChUBCxWMlBsFMekWjq0wRudIweFs7sKT5A==} - engines: {node: '>=14.0.0'} - - '@smithy/util-utf8@3.0.0': - resolution: {integrity: sha512-rUeT12bxFnplYDe815GXbq/oixEGHfRFFtcTF3YdDi/JaENIM6aSYYLJydG83UNzLXeRI5K8abYd/8Sp/QM0kA==} - engines: {node: '>=16.0.0'} - - '@solidity-parser/parser@0.14.5': - resolution: {integrity: sha512-6dKnHZn7fg/iQATVEzqyUOyEidbn05q7YA2mQ9hC0MMXhhV3/JrsxmFSYZAcr7j1yUP700LLhTruvJ3MiQmjJg==} - - '@solidity-parser/parser@0.18.0': - resolution: {integrity: sha512-yfORGUIPgLck41qyN7nbwJRAx17/jAIXCTanHOJZhB6PJ1iAk/84b/xlsVKFSyNyLXIj0dhppoE0+CRws7wlzA==} - - '@szmarczak/http-timer@4.0.6': - resolution: {integrity: sha512-4BAffykYOgO+5nzBWYwE3W90sBgLJoUPRWWcL8wlyiM8IB8ipJz3UMJ9KXQd1RKQXpKp8Tutn80HZtWsu2u76w==} - engines: {node: '>=10'} - - '@szmarczak/http-timer@5.0.1': - resolution: {integrity: sha512-+PmQX0PiAYPMeVYe237LJAYvOMYW1j2rH5YROyS3b4CTVJum34HfRvKvAzozHAQG0TnHNdUfY9nCeUyRAs//cw==} - engines: {node: '>=14.16'} - - '@tootallnate/quickjs-emscripten@0.23.0': - resolution: {integrity: sha512-C5Mc6rdnsaJDjO3UpGW/CQTHtCKaYlScZTly4JIu97Jxo/odCiH0ITnDXSJPTOrEKk/ycSZ0AOgTmkDtkOsvIA==} - - '@trufflesuite/uws-js-unofficial@20.30.0-unofficial.0': - resolution: {integrity: sha512-r5X0aOQcuT6pLwTRLD+mPnAM/nlKtvIK4Z+My++A8tTOR0qTjNRx8UB8jzRj3D+p9PMAp5LnpCUUGmz7/TppwA==} - - '@tsconfig/node10@1.0.11': - resolution: {integrity: sha512-DcRjDCujK/kCk/cUe8Xz8ZSpm8mS3mNNpta+jGCA6USEDfktlNvm1+IuZ9eTcDbNk41BHwpHHeW+N1lKCz4zOw==} - - '@tsconfig/node12@1.0.11': - resolution: {integrity: sha512-cqefuRsh12pWyGsIoBKJA9luFu3mRxCA+ORZvA4ktLSzIuCUtWVxGIuXigEwO5/ywWFMZ2QEGKWvkZG1zDMTag==} - - '@tsconfig/node14@1.0.3': - resolution: {integrity: sha512-ysT8mhdixWK6Hw3i1V2AeRqZ5WfXg1G43mqoYlM2nc6388Fq5jcXyr5mRsqViLx/GJYdoL0bfXD8nmF+Zn/Iow==} - - '@tsconfig/node16@1.0.4': - resolution: {integrity: sha512-vxhUy4J8lyeyinH7Azl1pdd43GJhZH/tP2weN8TntQblOY+A0XbT8DJk1/oCPuOOyg/Ja757rG0CgHcWC8OfMA==} - - '@typechain/ethers-v6@0.5.1': - resolution: {integrity: sha512-F+GklO8jBWlsaVV+9oHaPh5NJdd6rAKN4tklGfInX1Q7h0xPgVLP39Jl3eCulPB5qexI71ZFHwbljx4ZXNfouA==} - peerDependencies: - ethers: 6.x - typechain: ^8.3.2 - typescript: '>=4.7.0' - - '@typechain/hardhat@9.1.0': - resolution: {integrity: sha512-mtaUlzLlkqTlfPwB3FORdejqBskSnh+Jl8AIJGjXNAQfRQ4ofHADPl1+oU7Z3pAJzmZbUXII8MhOLQltcHgKnA==} - peerDependencies: - '@typechain/ethers-v6': ^0.5.1 - ethers: ^6.1.0 - hardhat: ^2.9.9 - typechain: ^8.3.2 - - '@types/bn.js@4.11.6': - resolution: {integrity: sha512-pqr857jrp2kPuO9uRjZ3PwnJTjoQy+fcdxvBTvHm6dkmEL9q+hDD/2j/0ELOBPtPnS8LjCX0gI9nbl8lVkadpg==} - - '@types/bn.js@5.1.6': - resolution: {integrity: sha512-Xh8vSwUeMKeYYrj3cX4lGQgFSF/N03r+tv4AiLl1SucqV+uTQpxRcnM8AkXKHwYP9ZPXOYXRr2KPXpVlIvqh9w==} - - '@types/cacheable-request@6.0.3': - resolution: {integrity: sha512-IQ3EbTzGxIigb1I3qPZc1rWJnH0BmSKv5QYTalEwweFvyBDLSAe24zP0le/hyi7ecGfZVlIVAg4BZqb8WBwKqw==} - - '@types/chai-as-promised@7.1.8': - resolution: {integrity: sha512-ThlRVIJhr69FLlh6IctTXFkmhtP3NpMZ2QGq69StYLyKZFp/HOp1VdKZj7RvfNWYYcJ1xlbLGLLWj1UvP5u/Gw==} - - '@types/chai@4.3.20': - resolution: {integrity: sha512-/pC9HAB5I/xMlc5FP77qjCnI16ChlJfW0tGa0IUcFn38VJrTV6DeZ60NU5KZBtaOZqjdpwTWohz5HU1RrhiYxQ==} - - '@types/concat-stream@1.6.1': - resolution: {integrity: sha512-eHE4cQPoj6ngxBZMvVf6Hw7Mh4jMW4U9lpGmS5GBPB9RYxlFg+CHaVN7ErNY4W9XfLIEn20b4VDYaIrbq0q4uA==} - - '@types/cors@2.8.17': - resolution: {integrity: sha512-8CGDvrBj1zgo2qE+oS3pOCyYNqCPryMWY2bGfwA0dcfopWGgxs+78df0Rs3rc9THP4JkOhLsAa+15VdpAqkcUA==} - - '@types/estree@0.0.39': - resolution: {integrity: sha512-EYNwp3bU+98cpU4lAWYYL7Zz+2gryWH1qbdDTidVd6hkiR6weksdbMadyXKXNPEkQFhXM+hVO9ZygomHXp+AIw==} - - '@types/estree@1.0.6': - resolution: {integrity: sha512-AYnb1nQyY49te+VRAVgmzfcgjYS91mY5P0TKUDCLEM+gNnA+3T6rWITXRLYCpahpqSQbN5cE+gHpnPyXjHWxcw==} - - '@types/form-data@0.0.33': - resolution: {integrity: sha512-8BSvG1kGm83cyJITQMZSulnl6QV8jqAGreJsc5tPu1Jq0vTSOiY/k24Wx82JRpWwZSqrala6sd5rWi6aNXvqcw==} - - '@types/glob@7.2.0': - resolution: {integrity: sha512-ZUxbzKl0IfJILTS6t7ip5fQQM/J3TJYubDm3nMbgubNNYS62eXeUpoLUC8/7fJNiFYHTrGPQn7hspDUzIHX3UA==} - - '@types/html-minifier-terser@6.1.0': - resolution: {integrity: sha512-oh/6byDPnL1zeNXFrDXFLyZjkr1MsBG667IM792caf1L2UPOOMf65NFzjUH/ltyfwjAGfs1rsX1eftK0jC/KIg==} - - '@types/http-cache-semantics@4.0.4': - resolution: {integrity: sha512-1m0bIFVc7eJWyve9S0RnuRgcQqF/Xd5QsUZAZeQFr1Q3/p9JWoQQEqmVy+DPTNpGXwhgIetAoYF8JSc33q29QA==} - - '@types/json-schema@7.0.15': - resolution: {integrity: sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==} - - '@types/json5@0.0.29': - resolution: {integrity: sha512-dRLjCWHYg4oaA77cxO64oO+7JwCwnIzkZPdrrC71jQmQtlhM556pwKo5bUzqvZndkVbeFLIIi+9TC40JNF5hNQ==} - - '@types/jwt-decode@3.1.0': - resolution: {integrity: sha512-tthwik7TKkou3mVnBnvVuHnHElbjtdbM63pdBCbZTirCt3WAdM73Y79mOri7+ljsS99ZVwUFZHLMxJuJnv/z1w==} - deprecated: This is a stub types definition. jwt-decode provides its own type definitions, so you do not need this installed. - - '@types/keyv@3.1.4': - resolution: {integrity: sha512-BQ5aZNSCpj7D6K2ksrRCTmKRLEpnPvWDiLPfoGyhZ++8YtiK9d/3DBKPJgry359X/P1PfruyYwvnvwFjuEiEIg==} - - '@types/lru-cache@5.1.1': - resolution: {integrity: sha512-ssE3Vlrys7sdIzs5LOxCzTVMsU7i9oa/IaW92wF32JFb3CVczqOkru2xspuKczHEbG3nvmPY7IFqVmGGHdNbYw==} - - '@types/minimatch@5.1.2': - resolution: {integrity: sha512-K0VQKziLUWkVKiRVrx4a40iPaxTUefQmjtkQofBkYRcoaaL/8rhwDWww9qWbrgicNOgnpIsMxyNIUM4+n6dUIA==} - - '@types/mocha@10.0.9': - resolution: {integrity: sha512-sicdRoWtYevwxjOHNMPTl3vSfJM6oyW8o1wXeI7uww6b6xHg8eBznQDNSGBCDJmsE8UMxP05JgZRtsKbTqt//Q==} - - '@types/node@10.17.60': - resolution: {integrity: sha512-F0KIgDJfy2nA3zMLmWGKxcH2ZVEtCZXHHdOQs2gSaQ27+lNeEfGxzkIw90aXswATX7AZ33tahPbzy6KAfUreVw==} - - '@types/node@12.20.55': - resolution: {integrity: sha512-J8xLz7q2OFulZ2cyGTLE1TbbZcjpno7FaN6zdJNrgAdrJ+DZzh/uFR6YrTb4C+nXakvud8Q4+rbhoIWlYQbUFQ==} - - '@types/node@22.13.10': - resolution: {integrity: sha512-I6LPUvlRH+O6VRUqYOcMudhaIdUVWfsjnZavnsraHvpBwaEyMN29ry+0UVJhImYL16xsscu0aske3yA+uPOWfw==} - - '@types/node@22.7.5': - resolution: {integrity: sha512-jML7s2NAzMWc//QSJ1a3prpk78cOPchGvXJsC3C6R6PSMoooztvRVQEz89gmBTBY1SPMaqo5teB4uNHPdetShQ==} - - '@types/node@22.7.9': - resolution: {integrity: sha512-jrTfRC7FM6nChvU7X2KqcrgquofrWLFDeYC1hKfwNWomVvrn7JIksqf344WN2X/y8xrgqBd2dJATZV4GbatBfg==} - - '@types/node@8.10.66': - resolution: {integrity: sha512-tktOkFUA4kXx2hhhrB8bIFb5TbwzS4uOhKEmwiD+NoiL0qtP2OQ9mFldbgD4dV1djrlBYP6eBuQZiWjuHUpqFw==} - - '@types/pbkdf2@3.1.2': - resolution: {integrity: sha512-uRwJqmiXmh9++aSu1VNEn3iIxWOhd8AHXNSdlaLfdAAdSTY9jYVeGWnzejM3dvrkbqE3/hyQkQQ29IFATEGlew==} - - '@types/prettier@2.7.3': - resolution: {integrity: sha512-+68kP9yzs4LMp7VNh8gdzMSPZFL44MLGqiHWvttYJe+6qnuVr4Ek9wSBQoveqY/r+LwjCcU29kNVkidwim+kYA==} - - '@types/qs@6.9.18': - resolution: {integrity: sha512-kK7dgTYDyGqS+e2Q4aK9X3D7q234CIZ1Bv0q/7Z5IwRDoADNU81xXJK/YVyLbLTZCoIwUoDoffFeF+p/eIklAA==} - - '@types/resolve@1.17.1': - resolution: {integrity: sha512-yy7HuzQhj0dhGpD8RLXSZWEkLsV9ibvxvi6EiJ3bkqLAO1RGo0WbkWQiwpRlSFymTJRz0d3k5LM3kkx8ArDbLw==} - - '@types/responselike@1.0.3': - resolution: {integrity: sha512-H/+L+UkTV33uf49PH5pCAUBVPNj2nDBXTN+qS1dOwyyg24l3CcicicCA7ca+HMvJBZcFgl5r8e+RR6elsb4Lyw==} - - '@types/secp256k1@4.0.6': - resolution: {integrity: sha512-hHxJU6PAEUn0TP4S/ZOzuTUvJWuZ6eIKeNKb5RBpODvSl6hp1Wrw4s7ATY50rklRCScUDpHzVA/DQdSjJ3UoYQ==} - - '@types/seedrandom@3.0.1': - resolution: {integrity: sha512-giB9gzDeiCeloIXDgzFBCgjj1k4WxcDrZtGl6h1IqmUPlxF+Nx8Ve+96QCyDZ/HseB/uvDsKbpib9hU5cU53pw==} - - '@types/webextension-polyfill@0.10.7': - resolution: {integrity: sha512-10ql7A0qzBmFB+F+qAke/nP1PIonS0TXZAOMVOxEUsm+lGSW6uwVcISFNa0I4Oyj0884TZVWGGMIWeXOVSNFHw==} - - '@types/ws@8.5.12': - resolution: {integrity: sha512-3tPRkv1EtkDpzlgyKyI8pGsGZAGPEaXeu0DOj5DI25Ja91bdAYddYHbADRYVrZMRbfW+1l5YwXVDKohDJNQxkQ==} - - '@types/yauzl@2.10.3': - resolution: {integrity: sha512-oJoftv0LSuaDZE3Le4DbKX+KS9G36NzOeSap90UIK0yMA/NhKJhqlSGtNDORNRaIbQfzjXDrQa0ytJ6mNRGz/Q==} - - '@typescript-eslint/eslint-plugin@8.11.0': - resolution: {integrity: sha512-KhGn2LjW1PJT2A/GfDpiyOfS4a8xHQv2myUagTM5+zsormOmBlYsnQ6pobJ8XxJmh6hnHwa2Mbe3fPrDJoDhbA==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - peerDependencies: - '@typescript-eslint/parser': ^8.0.0 || ^8.0.0-alpha.0 - eslint: ^8.57.0 || ^9.0.0 - typescript: '*' - peerDependenciesMeta: - typescript: - optional: true - - '@typescript-eslint/parser@8.11.0': - resolution: {integrity: sha512-lmt73NeHdy1Q/2ul295Qy3uninSqi6wQI18XwSpm8w0ZbQXUpjCAWP1Vlv/obudoBiIjJVjlztjQ+d/Md98Yxg==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - peerDependencies: - eslint: ^8.57.0 || ^9.0.0 - typescript: '*' - peerDependenciesMeta: - typescript: - optional: true - - '@typescript-eslint/scope-manager@8.11.0': - resolution: {integrity: sha512-Uholz7tWhXmA4r6epo+vaeV7yjdKy5QFCERMjs1kMVsLRKIrSdM6o21W2He9ftp5PP6aWOVpD5zvrvuHZC0bMQ==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - - '@typescript-eslint/type-utils@8.11.0': - resolution: {integrity: sha512-ItiMfJS6pQU0NIKAaybBKkuVzo6IdnAhPFZA/2Mba/uBjuPQPet/8+zh5GtLHwmuFRShZx+8lhIs7/QeDHflOg==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - peerDependencies: - typescript: '*' - peerDependenciesMeta: - typescript: - optional: true - - '@typescript-eslint/types@8.11.0': - resolution: {integrity: sha512-tn6sNMHf6EBAYMvmPUaKaVeYvhUsrE6x+bXQTxjQRp360h1giATU0WvgeEys1spbvb5R+VpNOZ+XJmjD8wOUHw==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - - '@typescript-eslint/typescript-estree@8.11.0': - resolution: {integrity: sha512-yHC3s1z1RCHoCz5t06gf7jH24rr3vns08XXhfEqzYpd6Hll3z/3g23JRi0jM8A47UFKNc3u/y5KIMx8Ynbjohg==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - peerDependencies: - typescript: '*' - peerDependenciesMeta: - typescript: - optional: true - - '@typescript-eslint/utils@8.11.0': - resolution: {integrity: sha512-CYiX6WZcbXNJV7UNB4PLDIBtSdRmRI/nb0FMyqHPTQD1rMjA0foPLaPUV39C/MxkTd/QKSeX+Gb34PPsDVC35g==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - peerDependencies: - eslint: ^8.57.0 || ^9.0.0 - - '@typescript-eslint/visitor-keys@8.11.0': - resolution: {integrity: sha512-EaewX6lxSjRJnc+99+dqzTeoDZUfyrA52d2/HRrkI830kgovWsmIiTfmr0NZorzqic7ga+1bS60lRBUgR3n/Bw==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - - '@ungap/structured-clone@1.2.0': - resolution: {integrity: sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ==} - - '@vercel/nft@0.26.5': - resolution: {integrity: sha512-NHxohEqad6Ra/r4lGknO52uc/GrWILXAMs1BB4401GTqww0fw1bAqzpG1XHuDO+dprg4GvsD9ZLLSsdo78p9hQ==} - engines: {node: '>=16'} - hasBin: true - - '@webassemblyjs/ast@1.12.1': - resolution: {integrity: sha512-EKfMUOPRRUTy5UII4qJDGPpqfwjOmZ5jeGFwid9mnoqIFK+e0vqoi1qH56JpmZSzEL53jKnNzScdmftJyG5xWg==} - - '@webassemblyjs/floating-point-hex-parser@1.11.6': - resolution: {integrity: sha512-ejAj9hfRJ2XMsNHk/v6Fu2dGS+i4UaXBXGemOfQ/JfQ6mdQg/WXtwleQRLLS4OvfDhv8rYnVwH27YJLMyYsxhw==} - - '@webassemblyjs/helper-api-error@1.11.6': - resolution: {integrity: sha512-o0YkoP4pVu4rN8aTJgAyj9hC2Sv5UlkzCHhxqWj8butaLvnpdc2jOwh4ewE6CX0txSfLn/UYaV/pheS2Txg//Q==} - - '@webassemblyjs/helper-buffer@1.12.1': - resolution: {integrity: sha512-nzJwQw99DNDKr9BVCOZcLuJJUlqkJh+kVzVl6Fmq/tI5ZtEyWT1KZMyOXltXLZJmDtvLCDgwsyrkohEtopTXCw==} - - '@webassemblyjs/helper-numbers@1.11.6': - resolution: {integrity: sha512-vUIhZ8LZoIWHBohiEObxVm6hwP034jwmc9kuq5GdHZH0wiLVLIPcMCdpJzG4C11cHoQ25TFIQj9kaVADVX7N3g==} - - '@webassemblyjs/helper-wasm-bytecode@1.11.6': - resolution: {integrity: sha512-sFFHKwcmBprO9e7Icf0+gddyWYDViL8bpPjJJl0WHxCdETktXdmtWLGVzoHbqUcY4Be1LkNfwTmXOJUFZYSJdA==} - - '@webassemblyjs/helper-wasm-section@1.12.1': - resolution: {integrity: sha512-Jif4vfB6FJlUlSbgEMHUyk1j234GTNG9dBJ4XJdOySoj518Xj0oGsNi59cUQF4RRMS9ouBUxDDdyBVfPTypa5g==} - - '@webassemblyjs/ieee754@1.11.6': - resolution: {integrity: sha512-LM4p2csPNvbij6U1f19v6WR56QZ8JcHg3QIJTlSwzFcmx6WSORicYj6I63f9yU1kEUtrpG+kjkiIAkevHpDXrg==} - - '@webassemblyjs/leb128@1.11.6': - resolution: {integrity: sha512-m7a0FhE67DQXgouf1tbN5XQcdWoNgaAuoULHIfGFIEVKA6tu/edls6XnIlkmS6FrXAquJRPni3ZZKjw6FSPjPQ==} - - '@webassemblyjs/utf8@1.11.6': - resolution: {integrity: sha512-vtXf2wTQ3+up9Zsg8sa2yWiQpzSsMyXj0qViVP6xKGCUT8p8YJ6HqI7l5eCnWx1T/FYdsv07HQs2wTFbbof/RA==} - - '@webassemblyjs/wasm-edit@1.12.1': - resolution: {integrity: sha512-1DuwbVvADvS5mGnXbE+c9NfA8QRcZ6iKquqjjmR10k6o+zzsRVesil54DKexiowcFCPdr/Q0qaMgB01+SQ1u6g==} - - '@webassemblyjs/wasm-gen@1.12.1': - resolution: {integrity: sha512-TDq4Ojh9fcohAw6OIMXqiIcTq5KUXTGRkVxbSo1hQnSy6lAM5GSdfwWeSxpAo0YzgsgF182E/U0mDNhuA0tW7w==} - - '@webassemblyjs/wasm-opt@1.12.1': - resolution: {integrity: sha512-Jg99j/2gG2iaz3hijw857AVYekZe2SAskcqlWIZXjji5WStnOpVoat3gQfT/Q5tb2djnCjBtMocY/Su1GfxPBg==} - - '@webassemblyjs/wasm-parser@1.12.1': - resolution: {integrity: sha512-xikIi7c2FHXysxXe3COrVUPSheuBtpcfhbpFj4gmu7KRLYOzANztwUU0IbsqvMqzuNK2+glRGWCEqZo1WCLyAQ==} - - '@webassemblyjs/wast-printer@1.12.1': - resolution: {integrity: sha512-+X4WAlOisVWQMikjbcvY2e0rwPsKQ9F688lksZhBcPycBBuii3O7m8FACbDMWDojpAqvjIncrG8J0XHKyQfVeA==} - - '@webpack-cli/configtest@1.2.0': - resolution: {integrity: sha512-4FB8Tj6xyVkyqjj1OaTqCjXYULB9FMkqQ8yGrZjRDrYh0nOE+7Lhs45WioWQQMV+ceFlE368Ukhe6xdvJM9Egg==} - peerDependencies: - webpack: 4.x.x || 5.x.x - webpack-cli: 4.x.x - - '@webpack-cli/info@1.5.0': - resolution: {integrity: sha512-e8tSXZpw2hPl2uMJY6fsMswaok5FdlGNRTktvFk2sD8RjH0hE2+XistawJx1vmKteh4NmGmNUrp+Tb2w+udPcQ==} - peerDependencies: - webpack-cli: 4.x.x - - '@webpack-cli/serve@1.7.0': - resolution: {integrity: sha512-oxnCNGj88fL+xzV+dacXs44HcDwf1ovs3AuEzvP7mqXw7fQntqIhQ1BRmynh4qEKQSSSRSWVyXRjmTbZIX9V2Q==} - peerDependencies: - webpack-cli: 4.x.x - webpack-dev-server: '*' - peerDependenciesMeta: - webpack-dev-server: - optional: true - - '@xtuc/ieee754@1.2.0': - resolution: {integrity: sha512-DX8nKgqcGwsc0eJSqYt5lwP4DH5FlHnmuWWBRy7X0NcaGR0ZtuyeESgMwTYVEtxmsNGY+qit4QYT/MIYTOTPeA==} - - '@xtuc/long@4.2.2': - resolution: {integrity: sha512-NuHqBY1PB/D8xU6s/thBgOAiAP7HOYDQ32+BFZILJ8ivkUkAHQnWfn6WhL79Owj1qmUnoN/YPhktdIoucipkAQ==} - - abbrev@1.0.9: - resolution: {integrity: sha512-LEyx4aLEC3x6T0UguF6YILf+ntvmOaWsVfENmIW0E9H09vKlLDGelMjjSm0jkDHALj8A8quZ/HapKNigzwge+Q==} - - abbrev@1.1.1: - resolution: {integrity: sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==} - - abortcontroller-polyfill@1.7.5: - resolution: {integrity: sha512-JMJ5soJWP18htbbxJjG7bG6yuI6pRhgJ0scHHTfkUjf6wjP912xZWvM+A4sJK3gqd9E8fcPbDnOefbA9Th/FIQ==} - - abstract-level@1.0.3: - resolution: {integrity: sha512-t6jv+xHy+VYwc4xqZMn2Pa9DjcdzvzZmQGRjTFc8spIbRGHgBrEKbPq+rYXc7CCo0lxgYvSgKVg9qZAhpVQSjA==} - engines: {node: '>=12'} - - abstract-leveldown@7.2.0: - resolution: {integrity: sha512-DnhQwcFEaYsvYDnACLZhMmCWd3rkOeEvglpa4q5i/5Jlm3UIsWaxVzuXvDLFCSCWRO3yy2/+V/G7FusFgejnfQ==} - engines: {node: '>=10'} - deprecated: Superseded by abstract-level (https://github.com/Level/community#faq) - - accepts@1.3.8: - resolution: {integrity: sha512-PYAthTa2m2VKxuvSD3DPC/Gy+U+sOA1LAuT8mkmRuvw+NACSaeXEQ+NHcVF7rONl6qcaxV3Uuemwawk+7+SJLw==} - engines: {node: '>= 0.6'} - - acorn-import-attributes@1.9.5: - resolution: {integrity: sha512-n02Vykv5uA3eHGM/Z2dQrcD56kL8TyDb2p1+0P83PClMnC/nc+anbQRhIOWnSq4Ke/KvDPrY3C9hDtC/A3eHnQ==} - peerDependencies: - acorn: ^8 - - acorn-jsx@5.3.2: - resolution: {integrity: sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==} - peerDependencies: - acorn: ^6.0.0 || ^7.0.0 || ^8.0.0 - - acorn-walk@8.3.4: - resolution: {integrity: sha512-ueEepnujpqee2o5aIYnvHU6C0A42MNdsIDeqy5BydrkuC5R1ZuUFnm27EeFJGoEHJQgn3uleRvmTXaJgfXbt4g==} - engines: {node: '>=0.4.0'} - - acorn@8.13.0: - resolution: {integrity: sha512-8zSiw54Oxrdym50NlZ9sUusyO1Z1ZchgRLWRaK6c86XJFClyCgFKetdowBg5bKxyp/u+CDBJG4Mpp0m3HLZl9w==} - engines: {node: '>=0.4.0'} - hasBin: true - - adm-zip@0.4.16: - resolution: {integrity: sha512-TFi4HBKSGfIKsK5YCkKaaFG2m4PEDyViZmEwof3MTIgzimHLto6muaHVpbrljdIvIrFZzEq/p4nafOeLcYegrg==} - engines: {node: '>=0.3.0'} - - aes-js@3.0.0: - resolution: {integrity: sha512-H7wUZRn8WpTq9jocdxQ2c8x2sKo9ZVmzfRE13GiNJXfp7NcKYEdvl3vspKjXox6RIG2VtaRe4JFvxG4rqp2Zuw==} - - aes-js@4.0.0-beta.5: - resolution: {integrity: sha512-G965FqalsNyrPqgEGON7nIx1e/OVENSgiEIzyC63haUMuvNnwIgIjMs52hlTCKhkBny7A2ORNlfY9Zu+jmGk1Q==} - - agent-base@6.0.2: - resolution: {integrity: sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==} - engines: {node: '>= 6.0.0'} - - agent-base@7.1.1: - resolution: {integrity: sha512-H0TSyFNDMomMNJQBn8wFV5YC/2eJ+VXECwOadZJT554xP6cODZHPX3H9QMQECxvrgiSOP1pHjy1sMWQVYJOUOA==} - engines: {node: '>= 14'} - - agent-base@7.1.3: - resolution: {integrity: sha512-jRR5wdylq8CkOe6hei19GGZnxM6rBGwFl3Bg0YItGDimvjGtAvdZk4Pu6Cl4u4Igsws4a1fd1Vq3ezrhn4KmFw==} - engines: {node: '>= 14'} - - aggregate-error@3.1.0: - resolution: {integrity: sha512-4I7Td01quW/RpocfNayFdFVk1qSuoh0E7JrbRJ16nH01HhKFQ88INq9Sd+nd72zqRySlr9BmDA8xlEJ6vJMrYA==} - engines: {node: '>=8'} - - ajv-errors@1.0.1: - resolution: {integrity: sha512-DCRfO/4nQ+89p/RK43i8Ezd41EqdGIU4ld7nGF8OQ14oc/we5rEntLCUa7+jrn3nn83BosfwZA0wb4pon2o8iQ==} - peerDependencies: - ajv: '>=5.0.0' - - ajv-formats@2.1.1: - resolution: {integrity: sha512-Wx0Kx52hxE7C18hkMEggYlEifqWZtYaRgouJor+WMdPnQyEK13vgEWyVNup7SoeeoLMsr4kf5h6dOW11I15MUA==} - peerDependencies: - ajv: ^8.0.0 - peerDependenciesMeta: - ajv: - optional: true - - ajv-keywords@3.5.2: - resolution: {integrity: sha512-5p6WTN0DdTGVQk6VjcEju19IgaHudalcfabD7yhDGeA6bcQnmL+CpveLJq/3hvfwd1aof6L386Ougkx6RfyMIQ==} - peerDependencies: - ajv: ^6.9.1 - - ajv-keywords@5.1.0: - resolution: {integrity: sha512-YCS/JNFAUyr5vAuhk1DWm1CBxRHW9LbJ2ozWeemrIqpbsqKjHVxYPyi5GC0rjZIT5JxJ3virVTS8wk4i/Z+krw==} - peerDependencies: - ajv: ^8.8.2 - - ajv@6.12.6: - resolution: {integrity: sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==} - - ajv@8.17.1: - resolution: {integrity: sha512-B/gBuNg5SiMTrPkC+A2+cW0RszwxYmn6VYxB/inlBStS5nx6xHIt/ehKRhIMhqusl7a8LjQoZnjCs5vhwxOQ1g==} - - amdefine@1.0.1: - resolution: {integrity: sha512-S2Hw0TtNkMJhIabBwIojKL9YHO5T0n5eNqWJ7Lrlel/zDbftQpxpapi8tZs3X1HWa+u+QeydGmzzNU0m09+Rcg==} - engines: {node: '>=0.4.2'} - - ansi-align@3.0.1: - resolution: {integrity: sha512-IOfwwBF5iczOjp/WeY4YxyjqAFMQoZufdQWDd19SEExbVLNXqvpzSJ/M7Za4/sCPmQ0+GRquoA7bGcINcxew6w==} - - ansi-colors@3.2.4: - resolution: {integrity: sha512-hHUXGagefjN2iRrID63xckIvotOXOojhQKWIPUZ4mNUZ9nLZW+7FMNoE1lOkEhNWYsx/7ysGIuJYCiMAA9FnrA==} - engines: {node: '>=6'} - - ansi-colors@4.1.3: - resolution: {integrity: sha512-/6w/C21Pm1A7aZitlI5Ni/2J6FFQN8i1Cvz3kHABAAbw93v/NlvKdVOqz7CCWz/3iv/JplRSEEZ83XION15ovw==} - engines: {node: '>=6'} - - ansi-escapes@4.3.2: - resolution: {integrity: sha512-gKXj5ALrKWQLsYG9jlTRmR/xKluxHV+Z9QEwNIgCfM1/uwPMCuzVVnh5mwTd+OuBZcwSIMbqssNWRm1lE51QaQ==} - engines: {node: '>=8'} - - ansi-html-community@0.0.8: - resolution: {integrity: sha512-1APHAyr3+PCamwNw3bXCPp4HFLONZt/yIH0sZp0/469KWNTEy+qN5jQ3GVX6DMZ1UXAi34yVwtTeaG/HpBuuzw==} - engines: {'0': node >= 0.8.0} - hasBin: true - - ansi-regex@2.1.1: - resolution: {integrity: sha512-TIGnTpdo+E3+pCyAluZvtED5p5wCqLdezCyhPZzKPcxvFplEt4i+W7OONCKgeZFT3+y5NZZfOOS/Bdcanm1MYA==} - engines: {node: '>=0.10.0'} - - ansi-regex@3.0.1: - resolution: {integrity: sha512-+O9Jct8wf++lXxxFc4hc8LsjaSq0HFzzL7cVsw8pRDIPdjKD2mT4ytDZlLuSBZ4cLKZFXIrMGO7DbQCtMJJMKw==} - engines: {node: '>=4'} - - ansi-regex@4.1.1: - resolution: {integrity: sha512-ILlv4k/3f6vfQ4OoP2AGvirOktlQ98ZEL1k9FaQjxa3L1abBgbuTDAdPOpvbGncC0BTVQrl+OM8xZGK6tWXt7g==} - engines: {node: '>=6'} - - ansi-regex@5.0.1: - resolution: {integrity: sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==} - engines: {node: '>=8'} - - ansi-regex@6.1.0: - resolution: {integrity: sha512-7HSX4QQb4CspciLpVFwyRe79O3xsIZDDLER21kERQ71oaPodF8jL725AgJMFAYbooIqolJoRLuM81SpeUkpkvA==} - engines: {node: '>=12'} - - ansi-styles@3.2.1: - resolution: {integrity: sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==} - engines: {node: '>=4'} - - ansi-styles@4.3.0: - resolution: {integrity: sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==} - engines: {node: '>=8'} - - ansi-styles@6.2.1: - resolution: {integrity: sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==} - engines: {node: '>=12'} - - antlr4ts@0.5.0-alpha.4: - resolution: {integrity: sha512-WPQDt1B74OfPv/IMS2ekXAKkTZIHl88uMetg6q3OTqgFxZ/dxDXI0EWLyZid/1Pe6hTftyg5N7gel5wNAGxXyQ==} - - anymatch@2.0.0: - resolution: {integrity: sha512-5teOsQWABXHHBFP9y3skS5P3d/WfWXpv3FUpy+LorMrNYaT9pI4oLMQX7jzQ2KklNpGpWHzdCXTDT2Y3XGlZBw==} - - anymatch@3.1.3: - resolution: {integrity: sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==} - engines: {node: '>= 8'} - - append-transform@2.0.0: - resolution: {integrity: sha512-7yeyCEurROLQJFv5Xj4lEGTy0borxepjFv1g22oAdqFu//SrAlDl1O1Nxx15SH1RoliUml6p8dwJW9jvZughhg==} - engines: {node: '>=8'} - - aproba@2.0.0: - resolution: {integrity: sha512-lYe4Gx7QT+MKGbDsA+Z+he/Wtef0BiwDOlK/XkBrdfsh9J/jPPXbX0tE9x9cl27Tmu5gg3QUbUrQYa/y+KOHPQ==} - - archy@1.0.0: - resolution: {integrity: sha512-Xg+9RwCg/0p32teKdGMPTPnVXKD0w3DfHnFTficozsAgsvq2XenPJq/MYpzzQ/v8zrOyJn6Ds39VA4JIDwFfqw==} - - are-we-there-yet@2.0.0: - resolution: {integrity: sha512-Ci/qENmwHnsYo9xKIcUJN5LeDKdJ6R1Z1j9V/J5wyq8nh/mYPEpIKJbBZXtZjG04HiK7zV/p6Vs9952MrMeUIw==} - engines: {node: '>=10'} - deprecated: This package is no longer supported. - - arg@4.1.3: - resolution: {integrity: sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA==} - - argparse@1.0.10: - resolution: {integrity: sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==} - - argparse@2.0.1: - resolution: {integrity: sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==} - - arr-diff@4.0.0: - resolution: {integrity: sha512-YVIQ82gZPGBebQV/a8dar4AitzCQs0jjXwMPZllpXMaGjXPYVUawSxQrRsjhjupyVxEvbHgUmIhKVlND+j02kA==} - engines: {node: '>=0.10.0'} - - arr-flatten@1.1.0: - resolution: {integrity: sha512-L3hKV5R/p5o81R7O02IGnwpDmkp6E982XhtbuwSe3O4qOtMMMtodicASA1Cny2U+aCXcNpml+m4dPsvsJ3jatg==} - engines: {node: '>=0.10.0'} - - arr-union@3.1.0: - resolution: {integrity: sha512-sKpyeERZ02v1FeCZT8lrfJq5u6goHCtpTAzPwJYe7c8SPFOboNjNg1vz2L4VTn9T4PQxEx13TbXLmYUcS6Ug7Q==} - engines: {node: '>=0.10.0'} - - array-back@3.1.0: - resolution: {integrity: sha512-TkuxA4UCOvxuDK6NZYXCalszEzj+TLszyASooky+i742l9TqsOdYCMJJupxRic61hwquNtppB3hgcuq9SVSH1Q==} - engines: {node: '>=6'} - - array-back@4.0.2: - resolution: {integrity: sha512-NbdMezxqf94cnNfWLL7V/im0Ub+Anbb0IoZhvzie8+4HJ4nMQuzHuy49FkGYCJK2yAloZ3meiB6AVMClbrI1vg==} - engines: {node: '>=8'} - - array-buffer-byte-length@1.0.1: - resolution: {integrity: sha512-ahC5W1xgou+KTXix4sAO8Ki12Q+jf4i0+tmk3sC+zgcynshkHxzpXdImBehiUYKKKDwvfFiJl1tZt6ewscS1Mg==} - engines: {node: '>= 0.4'} - - array-find-index@1.0.2: - resolution: {integrity: sha512-M1HQyIXcBGtVywBt8WVdim+lrNaK7VHp99Qt5pSNziXznKHViIBbXWtfRTpEFpF/c4FdfxNAsCCwPp5phBYJtw==} - engines: {node: '>=0.10.0'} - - array-flatten@1.1.1: - resolution: {integrity: sha512-PCVAQswWemu6UdxsDFFX/+gVeYqKAod3D3UVm91jHwynguOwAvYPhx8nNlM++NqRcK6CxxpUafjmhIdKiHibqg==} - - array-flatten@2.1.2: - resolution: {integrity: sha512-hNfzcOV8W4NdualtqBFPyVO+54DSJuZGY9qT4pRroB6S9e3iiido2ISIC5h9R2sPJ8H3FHCIiEnsv1lPXO3KtQ==} - - array-includes@3.1.8: - resolution: {integrity: sha512-itaWrbYbqpGXkGhZPGUulwnhVf5Hpy1xiCFsGqyIGglbBxmG5vSjxQen3/WGOjPpNEv1RtBLKxbmVXm8HpJStQ==} - engines: {node: '>= 0.4'} - - array-union@1.0.2: - resolution: {integrity: sha512-Dxr6QJj/RdU/hCaBjOfxW+q6lyuVE6JFWIrAUpuOOhoJJoQ99cUn3igRaHVB5P9WrgFVN0FfArM3x0cueOU8ng==} - engines: {node: '>=0.10.0'} - - array-union@2.1.0: - resolution: {integrity: sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==} - engines: {node: '>=8'} - - array-uniq@1.0.3: - resolution: {integrity: sha512-MNha4BWQ6JbwhFhj03YK552f7cb3AzoE8SzeljgChvL1dl3IcvggXVz1DilzySZkCja+CXuZbdW7yATchWn8/Q==} - engines: {node: '>=0.10.0'} - - array-unique@0.3.2: - resolution: {integrity: sha512-SleRWjh9JUud2wH1hPs9rZBZ33H6T9HOiL0uwGnGx9FpE6wKGyfWugmbkEOIs6qWrZhg0LWeLziLrEwQJhs5mQ==} - engines: {node: '>=0.10.0'} - - array.prototype.findlastindex@1.2.5: - resolution: {integrity: sha512-zfETvRFA8o7EiNn++N5f/kaCw221hrpGsDmcpndVupkPzEc1Wuf3VgC0qby1BbHs7f5DVYjgtEU2LLh5bqeGfQ==} - engines: {node: '>= 0.4'} - - array.prototype.flat@1.3.2: - resolution: {integrity: sha512-djYB+Zx2vLewY8RWlNCUdHjDXs2XOgm602S9E7P/UpHgfeHL00cRiIF+IN/G/aUJ7kGPb6yO/ErDI5V2s8iycA==} - engines: {node: '>= 0.4'} - - array.prototype.flatmap@1.3.2: - resolution: {integrity: sha512-Ewyx0c9PmpcsByhSW4r+9zDU7sGjFc86qf/kKtuSCRdhfbk0SNLLkaT5qvcHnRGgc5NP/ly/y+qkXkqONX54CQ==} - engines: {node: '>= 0.4'} - - arraybuffer.prototype.slice@1.0.3: - resolution: {integrity: sha512-bMxMKAjg13EBSVscxTaYA4mRc5t1UAXa2kXiGTNfZ079HIWXEkKmkgFrh/nJqamaLSrXO5H4WFFkPEaLJWbs3A==} - engines: {node: '>= 0.4'} - - arrgv@1.0.2: - resolution: {integrity: sha512-a4eg4yhp7mmruZDQFqVMlxNRFGi/i1r87pt8SDHy0/I8PqSXoUTlWZRdAZo0VXgvEARcujbtTk8kiZRi1uDGRw==} - engines: {node: '>=8.0.0'} - - arrify@3.0.0: - resolution: {integrity: sha512-tLkvA81vQG/XqE2mjDkGQHoOINtMHtysSnemrmoGe6PydDPMRbVugqyk4A6V/WDWEfm3l+0d8anA9r8cv/5Jaw==} - engines: {node: '>=12'} - - asap@2.0.6: - resolution: {integrity: sha512-BSHWgDSAiKs50o2Re8ppvp3seVHXSRM44cdSsT9FfNEUUZLOGWVCsiWaRPWM1Znn+mqZ1OfVZ3z3DWEzSp7hRA==} - - asn1@0.2.6: - resolution: {integrity: sha512-ix/FxPn0MDjeyJ7i/yoHGFt/EX6LyNbxSEhPPXODPL+KB0VPk86UYfL0lMdy+KCnv+fmvIzySwaK5COwqVbWTQ==} - - assert-plus@1.0.0: - resolution: {integrity: sha512-NfJ4UzBCcQGLDlQq7nHxH+tv3kyZ0hHQqF5BO6J7tNJeP5do1llPr8dZ8zHonfhAu0PHAdMkSo+8o0wxg9lZWw==} - engines: {node: '>=0.8'} - - assertion-error@1.1.0: - resolution: {integrity: sha512-jgsaNduz+ndvGyFt3uSuWqvy4lCnIJiovtouQN5JZHOKCS2QuhEdbcQHFhVksz2N2U9hXJo8odG7ETyWlEeuDw==} - - assign-symbols@1.0.0: - resolution: {integrity: sha512-Q+JC7Whu8HhmTdBph/Tq59IoRtoy6KAm5zzPv00WdujX82lbAL8K7WVjne7vdCsAmbF4AYaDOPyO3k0kl8qIrw==} - engines: {node: '>=0.10.0'} - - ast-types@0.13.4: - resolution: {integrity: sha512-x1FCFnFifvYDDzTaLII71vG5uvDwgtmDTEVWAxrgeiR8VjMONcCXJx7E+USjDtHlwFmt9MysbqgF9b9Vjr6w+w==} - engines: {node: '>=4'} - - astral-regex@2.0.0: - resolution: {integrity: sha512-Z7tMw1ytTXt5jqMcOP+OQteU1VuNK9Y02uuJtKQ1Sv69jXQKKg5cibLwGJow8yzZP+eAc18EmLGPal0bp36rvQ==} - engines: {node: '>=8'} - - async-each@1.0.6: - resolution: {integrity: sha512-c646jH1avxr+aVpndVMeAfYw7wAa6idufrlN3LPA4PmKS0QEGp6PIC9nwz0WQkkvBGAMEki3pFdtxaF39J9vvg==} - - async-eventemitter@0.2.4: - resolution: {integrity: sha512-pd20BwL7Yt1zwDFy+8MX8F1+WCT8aQeKj0kQnTrH9WaeRETlRamVhD0JtRPmrV4GfOJ2F9CvdQkZeZhnh2TuHw==} - - async-limiter@1.0.1: - resolution: {integrity: sha512-csOlWGAcRFJaI6m+F2WKdnMKr4HhdhFVBk0H/QbJFMCr+uO2kwohwXQPxw/9OCxp05r5ghVBFSyioixx3gfkNQ==} - - async-mutex@0.5.0: - resolution: {integrity: sha512-1A94B18jkJ3DYq284ohPxoXbfTA5HsQ7/Mf4DEhcyLx3Bz27Rh59iScbB6EPiP+B+joue6YCxcMXSbFC1tZKwA==} - - async-sema@3.1.1: - resolution: {integrity: sha512-tLRNUXati5MFePdAk8dw7Qt7DpxPB60ofAgn8WRhW6a2rcimZnYBP9oxHiv0OHy+Wz7kPMG+t4LGdt31+4EmGg==} - - async@1.5.2: - resolution: {integrity: sha512-nSVgobk4rv61R9PUSDtYt7mPVB2olxNR5RWJcAsH676/ef11bUZwvu7+RGYrYauVdDPcO519v68wRhXQtxsV9w==} - - async@2.6.4: - resolution: {integrity: sha512-mzo5dfJYwAn29PeiJ0zvwTo04zj8HDJj0Mn8TD7sno7q12prdbnasKJHhkm2c1LgrhlJ0teaea8860oxi51mGA==} - - asynckit@0.4.0: - resolution: {integrity: sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==} - - at-least-node@1.0.0: - resolution: {integrity: sha512-+q/t7Ekv1EDY2l6Gda6LLiX14rU9TV20Wa3ofeQmwPFZbOMo9DXrLbOjFaaclkXKWidIaopwAObQDqwWtGUjqg==} - engines: {node: '>= 4.0.0'} - - atob@2.1.2: - resolution: {integrity: sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg==} - engines: {node: '>= 4.5.0'} - hasBin: true - - ava@6.1.3: - resolution: {integrity: sha512-tkKbpF1pIiC+q09wNU9OfyTDYZa8yuWvU2up3+lFJ3lr1RmnYh2GBpPwzYUEB0wvTPIUysGjcZLNZr7STDviRA==} - engines: {node: ^18.18 || ^20.8 || ^21 || ^22} - hasBin: true - peerDependencies: - '@ava/typescript': '*' - peerDependenciesMeta: - '@ava/typescript': - optional: true - - available-typed-arrays@1.0.7: - resolution: {integrity: sha512-wvUjBtSGN7+7SjNpq/9M2Tg350UZD3q62IFZLbRAR1bSMlCo1ZaeW+BJ+D090e4hIIZLBcTDWe4Mh4jvUDajzQ==} - engines: {node: '>= 0.4'} - - aws-sign2@0.7.0: - resolution: {integrity: sha512-08kcGqnYf/YmjoRhfxyu+CLxBjUtHLXLXX/vUfx9l2LYzG3c1m61nrpyFUZI6zeS+Li/wWMMidD9KgrqtGq3mA==} - - aws4@1.13.2: - resolution: {integrity: sha512-lHe62zvbTB5eEABUVi/AwVh0ZKY9rMMDhmm+eeyuuUQbQ3+J+fONVQOZyj+DdrvD4BY33uYniyRJ4UJIaSKAfw==} - - axios@1.7.7: - resolution: {integrity: sha512-S4kL7XrjgBmvdGut0sN3yJxqYzrDOnivkBiN0OFs6hLiUam3UPvswUo0kqGyhqUZGEOytHyumEdXsAkgCOUf3Q==} - - axios@1.8.3: - resolution: {integrity: sha512-iP4DebzoNlP/YN2dpwCgb8zoCmhtkajzS48JvwmkSkXvPI3DHc7m+XYL5tGnSlJtR6nImXZmdCuN5aP8dh1d8A==} - - b4a@1.6.7: - resolution: {integrity: sha512-OnAYlL5b7LEkALw87fUVafQw5rVR9RjwGd4KUwNQ6DrrNmaVaUCgLipfVlzrPQ4tWOR9P0IXGNOx50jYCCdSJg==} - - babel-loader@9.2.1: - resolution: {integrity: sha512-fqe8naHt46e0yIdkjUZYqddSXfej3AHajX+CSO5X7oy0EmPc6o5Xh+RClNoHjnieWz9AW4kZxW9yyFMhVB1QLA==} - engines: {node: '>= 14.15.0'} - peerDependencies: - '@babel/core': ^7.12.0 - webpack: '>=5' - - babel-plugin-polyfill-corejs2@0.4.11: - resolution: {integrity: sha512-sMEJ27L0gRHShOh5G54uAAPaiCOygY/5ratXuiyb2G46FmlSpc9eFCzYVyDiPxfNbwzA7mYahmjQc5q+CZQ09Q==} - peerDependencies: - '@babel/core': ^7.4.0 || ^8.0.0-0 <8.0.0 - - babel-plugin-polyfill-corejs3@0.10.6: - resolution: {integrity: sha512-b37+KR2i/khY5sKmWNVQAnitvquQbNdWy6lJdsr0kmquCKEEUgMKK4SboVM3HtfnZilfjr4MMQ7vY58FVWDtIA==} - peerDependencies: - '@babel/core': ^7.4.0 || ^8.0.0-0 <8.0.0 - - babel-plugin-polyfill-regenerator@0.6.2: - resolution: {integrity: sha512-2R25rQZWP63nGwaAswvDazbPXfrM3HwVoBXK6HcqeKrSrL/JqcC/rDcf95l4r7LXLyxDXc8uQDa064GubtCABg==} - peerDependencies: - '@babel/core': ^7.4.0 || ^8.0.0-0 <8.0.0 - - backo2@1.0.2: - resolution: {integrity: sha512-zj6Z6M7Eq+PBZ7PQxl5NT665MvJdAkzp0f60nAJ+sLaSCBPMwVak5ZegFbgVCzFcCJTKFoMizvM5Ld7+JrRJHA==} - - balanced-match@1.0.2: - resolution: {integrity: sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==} - - bare-events@2.5.0: - resolution: {integrity: sha512-/E8dDe9dsbLyh2qrZ64PEPadOQ0F4gbl1sUJOrmph7xOiIxfY8vwab/4bFLh4Y88/Hk/ujKcrQKc+ps0mv873A==} - - bare-fs@2.3.5: - resolution: {integrity: sha512-SlE9eTxifPDJrT6YgemQ1WGFleevzwY+XAP1Xqgl56HtcrisC2CHCZ2tq6dBpcH2TnNxwUEUGhweo+lrQtYuiw==} - - bare-os@2.4.4: - resolution: {integrity: sha512-z3UiI2yi1mK0sXeRdc4O1Kk8aOa/e+FNWZcTiPB/dfTWyLypuE99LibgRaQki914Jq//yAWylcAt+mknKdixRQ==} - - bare-path@2.1.3: - resolution: {integrity: sha512-lh/eITfU8hrj9Ru5quUp0Io1kJWIk1bTjzo7JH1P5dWmQ2EL4hFUlfI8FonAhSlgIfhn63p84CDY/x+PisgcXA==} - - bare-stream@2.3.2: - resolution: {integrity: sha512-EFZHSIBkDgSHIwj2l2QZfP4U5OcD4xFAOwhSb/vlr9PIqyGJGvB/nfClJbcnh3EY4jtPE4zsb5ztae96bVF79A==} - - base-x@3.0.10: - resolution: {integrity: sha512-7d0s06rR9rYaIWHkpfLIFICM/tkSVdoPC9qYAQRpxn9DdKNWNsKC0uk++akckyLq16Tx2WIinnZ6WRriAt6njQ==} - - base64-arraybuffer-es6@0.7.0: - resolution: {integrity: sha512-ESyU/U1CFZDJUdr+neHRhNozeCv72Y7Vm0m1DCbjX3KBjT6eYocvAJlSk6+8+HkVwXlT1FNxhGW6q3UKAlCvvw==} - engines: {node: '>=6.0.0'} - - base64-arraybuffer@0.1.5: - resolution: {integrity: sha512-437oANT9tP582zZMwSvZGy2nmSeAb8DW2me3y+Uv1Wp2Rulr8Mqlyrv3E7MLxmsiaPSMMDmiDVzgE+e8zlMx9g==} - engines: {node: '>= 0.6.0'} - - base64-js@1.5.1: - resolution: {integrity: sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==} - - base@0.11.2: - resolution: {integrity: sha512-5T6P4xPgpp0YDFvSWwEZ4NoE3aM4QBQXDzmVbraCkFj8zHM+mba8SyqB5DbZWyR7mYHo6Y7BdQo3MoA4m0TeQg==} - engines: {node: '>=0.10.0'} - - basic-ftp@5.0.5: - resolution: {integrity: sha512-4Bcg1P8xhUuqcii/S0Z9wiHIrQVPMermM1any+MX5GeGD7faD3/msQUDGLol9wOcz4/jbg/WJnGqoJF6LiBdtg==} - engines: {node: '>=10.0.0'} - - batch@0.6.1: - resolution: {integrity: sha512-x+VAiMRL6UPkx+kudNvxTl6hB2XNNCG2r+7wixVfIYwu/2HKRXimwQyaumLjMveWvT2Hkd/cAJw+QBMfJ/EKVw==} - - bcrypt-pbkdf@1.0.2: - resolution: {integrity: sha512-qeFIXtP4MSoi6NLqO12WfqARWWuCKi2Rn/9hJLEmtB5yTNr9DqFWkJRCf2qShWzPeAMRnOgCrq0sg/KLv5ES9w==} - - bech32@1.1.4: - resolution: {integrity: sha512-s0IrSOzLlbvX7yp4WBfPITzpAU8sqQcpsmwXDiKwrG4r491vwCO/XpejasRNl0piBMe/DvP4Tz0mIS/X1DPJBQ==} - - better-path-resolve@1.0.0: - resolution: {integrity: sha512-pbnl5XzGBdrFU/wT4jqmJVPn2B6UHPBOhzMQkY/SPUPB6QtUXtmBHBIwCbXJol93mOpGMnQyP/+BB19q04xj7g==} - engines: {node: '>=4'} - - bignumber.js@9.1.2: - resolution: {integrity: sha512-2/mKyZH9K85bzOEfhXDBFZTGd1CTs+5IHpeFQo9luiBG7hghdC851Pj2WAhb6E3R6b9tZj/XKhbg4fum+Kepug==} - - binary-extensions@1.13.1: - resolution: {integrity: sha512-Un7MIEDdUC5gNpcGDV97op1Ywk748MpHcFTHoYs6qnj1Z3j7I53VG3nwZhKzoBZmbdRNnb6WRdFlwl7tSDuZGw==} - engines: {node: '>=0.10.0'} - - binary-extensions@2.3.0: - resolution: {integrity: sha512-Ceh+7ox5qe7LJuLHoY0feh3pHuUDHAcRUeyL2VYghZwfpkNIy/+8Ocg0a3UuSoYzavmylwuLWQOf3hl0jjMMIw==} - engines: {node: '>=8'} - - bindings@1.5.0: - resolution: {integrity: sha512-p2q/t/mhvuOj/UeLlV6566GD/guowlr0hHxClI0W9m7MWYkL1F0hLo+0Aexs9HSPCtR1SXQ0TD3MMKrXZajbiQ==} - - blakejs@1.2.1: - resolution: {integrity: sha512-QXUSXI3QVc/gJME0dBpXrag1kbzOqCjCX8/b54ntNyW6sjtoqxqRk3LTmXzaJoh71zMsDCjM+47jS7XiwN/+fQ==} - - bluebird@3.7.2: - resolution: {integrity: sha512-XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg==} - - blueimp-md5@2.19.0: - resolution: {integrity: sha512-DRQrD6gJyy8FbiE4s+bDoXS9hiW3Vbx5uCdwvcCf3zLHL+Iv7LtGHLpr+GZV8rHG8tK766FGYBwRbu8pELTt+w==} - - bn.js@4.11.6: - resolution: {integrity: sha512-XWwnNNFCuuSQ0m3r3C4LE3EiORltHd9M05pq6FOlVeiophzRbMo50Sbz1ehl8K3Z+jw9+vmgnXefY1hz8X+2wA==} - - bn.js@4.12.0: - resolution: {integrity: sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==} - - bn.js@4.12.1: - resolution: {integrity: sha512-k8TVBiPkPJT9uHLdOKfFpqcfprwBFOAAXXozRubr7R7PfIuKvQlzcI4M0pALeqXN09vdaMbUdUj+pass+uULAg==} - - bn.js@5.2.1: - resolution: {integrity: sha512-eXRvHzWyYPBuB4NBy0cmYQjGitUrtqwbvlzP3G6VFnNRbsZQIxQ10PbKKHt8gZ/HW/D/747aDl+QkDqg3KQLMQ==} - - body-parser@1.20.3: - resolution: {integrity: sha512-7rAxByjUMqQ3/bHJy7D6OGXvx/MMc4IqBn/X0fcM1QUcAItpZrBEYhWGem+tzXH90c+G01ypMcYJBO9Y30203g==} - engines: {node: '>= 0.8', npm: 1.2.8000 || >= 1.4.16} - - bonjour@3.5.0: - resolution: {integrity: sha512-RaVTblr+OnEli0r/ud8InrU7D+G0y6aJhlxaLa6Pwty4+xoxboF1BsUI45tujvRpbj9dQVoglChqonGAsjEBYg==} - - boolbase@1.0.0: - resolution: {integrity: sha512-JZOSA7Mo9sNGB8+UjSgzdLtokWAky1zbztM3WRLCbZ70/3cTANmQmOdR7y2g+J0e2WXywy1yS468tY+IruqEww==} - - bowser@2.11.0: - resolution: {integrity: sha512-AlcaJBi/pqqJBIQ8U9Mcpc9i8Aqxn88Skv5d+xBX006BY5u8N3mGLHa5Lgppa7L/HfwgwLgZ6NYs+Ag6uUmJRA==} - - boxen@5.1.2: - resolution: {integrity: sha512-9gYgQKXx+1nP8mP7CzFyaUARhg7D3n1dF/FnErWmu9l6JvGpNUN278h0aSb+QjoiKSWG+iZ3uHrcqk0qrY9RQQ==} - engines: {node: '>=10'} - - brace-expansion@1.1.11: - resolution: {integrity: sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==} - - brace-expansion@2.0.1: - resolution: {integrity: sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==} - - braces@2.3.2: - resolution: {integrity: sha512-aNdbnj9P8PjdXU4ybaWLK2IF3jc/EoDYbC7AazW6to3TRsfXxscC9UXOB5iDiEQrkyIbWp2SLQda4+QAa7nc3w==} - engines: {node: '>=0.10.0'} - - braces@3.0.3: - resolution: {integrity: sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==} - engines: {node: '>=8'} - - brorand@1.1.0: - resolution: {integrity: sha512-cKV8tMCEpQs4hK/ik71d6LrPOnpkpGBR0wzxqr68g2m/LB2GxVYQroAjMJZRVM1Y4BCjCKc3vAamxSzOY2RP+w==} - - brotli-wasm@3.0.1: - resolution: {integrity: sha512-U3K72/JAi3jITpdhZBqzSUq+DUY697tLxOuFXB+FpAE/Ug+5C3VZrv4uA674EUZHxNAuQ9wETXNqQkxZD6oL4A==} - engines: {node: '>=v18.0.0'} - - browser-stdout@1.3.1: - resolution: {integrity: sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw==} - - browserify-aes@1.2.0: - resolution: {integrity: sha512-+7CHXqGuspUn/Sl5aO7Ea0xWGAtETPXNSAjHo48JfLdPWcMng33Xe4znFvQweqc/uzk5zSOI3H52CYnjCfb5hA==} - - browserslist@4.24.2: - resolution: {integrity: sha512-ZIc+Q62revdMcqC6aChtW4jz3My3klmCO1fEmINZY/8J3EpBg5/A/D0AKmBveUh6pgoeycoMkVMko84tuYS+Gg==} - engines: {node: ^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7} - hasBin: true - - bs58@4.0.1: - resolution: {integrity: sha512-Ok3Wdf5vOIlBrgCvTq96gBkJw+JUEzdBgyaza5HLtPm7yTHkjRy8+JzNyHF7BHa0bNWOQIp3m5YF0nnFcOIKLw==} - - bs58check@2.1.2: - resolution: {integrity: sha512-0TS1jicxdU09dwJMNZtVAfzPi6Q6QeN0pM1Fkzrjn+XYHvzMKPU3pHVpva+769iNVSfIYWf7LJ6WR+BuuMf8cA==} - - buffer-crc32@0.2.13: - resolution: {integrity: sha512-VO9Ht/+p3SN7SKWqcrgEzjGbRSJYTx+Q1pTQC0wrWqHx0vpJraQ6GtHx8tvcg1rlK1byhU5gccxgOgj7B0TDkQ==} - - buffer-from@1.1.2: - resolution: {integrity: sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==} - - buffer-indexof@1.1.1: - resolution: {integrity: sha512-4/rOEg86jivtPTeOUUT61jJO1Ya1TrR/OkqCSZDyq84WJh3LuuiphBYJN+fm5xufIk4XAFcEwte/8WzC8If/1g==} - - buffer-to-arraybuffer@0.0.5: - resolution: {integrity: sha512-3dthu5CYiVB1DEJp61FtApNnNndTckcqe4pFcLdvHtrpG+kcyekCJKg4MRiDcFW7A6AODnXB9U4dwQiCW5kzJQ==} - - buffer-xor@1.0.3: - resolution: {integrity: sha512-571s0T7nZWK6vB67HI5dyUF7wXiNcfaPPPTl6zYCNApANjIvYJTg7hlud/+cJpdAhS7dVzqMLmfhfHR3rAcOjQ==} - - buffer@5.7.1: - resolution: {integrity: sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==} - - buffer@6.0.3: - resolution: {integrity: sha512-FTiCpNxtwiZZHEZbcbTIcZjERVICn9yq/pDFkTl95/AxzD1naBctN7YO68riM/gLSDY7sdrMby8hofADYuuqOA==} - - bufferutil@4.0.8: - resolution: {integrity: sha512-4T53u4PdgsXqKaIctwF8ifXlRTTmEPJ8iEPWFdGZvcf7sbwYo6FKFEX9eNNAnzFZ7EzJAQ3CJeOtCRA4rDp7Pw==} - engines: {node: '>=6.14.2'} - - builtin-modules@3.3.0: - resolution: {integrity: sha512-zhaCDicdLuWN5UbN5IMnFqNMhNfo919sH85y2/ea+5Yg9TsTkeZxpL+JLbp6cgYFS4sRLp3YV4S6yDuqVWHYOw==} - engines: {node: '>=6'} - - bytes@3.0.0: - resolution: {integrity: sha512-pMhOfFDPiv9t5jjIXkHosWmkSyQbvsgEVNkz0ERHbuLh2T/7j4Mqqpz523Fe8MVY89KC6Sh/QfS2sM+SjgFDcw==} - engines: {node: '>= 0.8'} - - bytes@3.1.2: - resolution: {integrity: sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg==} - engines: {node: '>= 0.8'} - - cache-base@1.0.1: - resolution: {integrity: sha512-AKcdTnFSWATd5/GCPRxr2ChwIJ85CeyrEyjRHlKxQ56d4XJMGym0uAiKn0xbLOGOl3+yRpOTi484dVCEc5AUzQ==} - engines: {node: '>=0.10.0'} - - cacheable-lookup@5.0.4: - resolution: {integrity: sha512-2/kNscPhpcxrOigMZzbiWF7dz8ilhb/nIHU3EyZiXWXpeq/au8qJ8VhdftMkty3n7Gj6HIGalQG8oiBNB3AJgA==} - engines: {node: '>=10.6.0'} - - cacheable-lookup@6.1.0: - resolution: {integrity: sha512-KJ/Dmo1lDDhmW2XDPMo+9oiy/CeqosPguPCrgcVzKyZrL6pM1gU2GmPY/xo6OQPTUaA/c0kwHuywB4E6nmT9ww==} - engines: {node: '>=10.6.0'} - - cacheable-request@7.0.4: - resolution: {integrity: sha512-v+p6ongsrp0yTGbJXjgxPow2+DL93DASP4kXCDKb8/bwRtt9OEF3whggkkDkGNzgcWy2XaF4a8nZglC7uElscg==} - engines: {node: '>=8'} - - caching-transform@4.0.0: - resolution: {integrity: sha512-kpqOvwXnjjN44D89K5ccQC+RUrsy7jB/XLlRrx0D7/2HNcTPqzsb6XgYoErwko6QsV184CA2YgS1fxDiiDZMWA==} - engines: {node: '>=8'} - - call-bind-apply-helpers@1.0.2: - resolution: {integrity: sha512-Sp1ablJ0ivDkSzjcaJdxEunN5/XvksFJ2sMBFfq6x0ryhQV/2b/KwFe21cMpmHtPOSij8K99/wSfoEuTObmuMQ==} - engines: {node: '>= 0.4'} - - call-bind@1.0.7: - resolution: {integrity: sha512-GHTSNSYICQ7scH7sZ+M2rFopRoLh8t2bLSW6BbgrtLsahOIB5iyAVJf9GjWK3cYTDaMj4XdBpM1cA6pIS0Kv2w==} - engines: {node: '>= 0.4'} - - call-bound@1.0.4: - resolution: {integrity: sha512-+ys997U96po4Kx/ABpBCqhA9EuxJaQWDQg7295H4hBphv3IZg0boBKuwYpt4YXp6MZ5AmZQnU/tyMTlRpaSejg==} - engines: {node: '>= 0.4'} - - callsites@3.1.0: - resolution: {integrity: sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==} - engines: {node: '>=6'} - - callsites@4.2.0: - resolution: {integrity: sha512-kfzR4zzQtAE9PC7CzZsjl3aBNbXWuXiSeOCdLcPpBfGW8YuCqQHcRPFDbr/BPVmd3EEPVpuFzLyuT/cUhPr4OQ==} - engines: {node: '>=12.20'} - - camel-case@4.1.2: - resolution: {integrity: sha512-gxGWBrTT1JuMx6R+o5PTXMmUnhnVzLQ9SNutD4YqKtI6ap897t3tKECYla6gCWEkplXnlNybEkZg9GEGxKFCgw==} - - camelcase@5.3.1: - resolution: {integrity: sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==} - engines: {node: '>=6'} - - camelcase@6.3.0: - resolution: {integrity: sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==} - engines: {node: '>=10'} - - caniuse-lite@1.0.30001669: - resolution: {integrity: sha512-DlWzFDJqstqtIVx1zeSpIMLjunf5SmwOw0N2Ck/QSQdS8PLS4+9HrLaYei4w8BIAL7IB/UEDu889d8vhCTPA0w==} - - caseless@0.12.0: - resolution: {integrity: sha512-4tYFyifaFfGacoiObjJegolkwSU4xQNGbVgUiNYVUxbQ2x2lUsFvY4hVgVzGiIe6WLOPqycWXA40l+PWsxthUw==} - - catering@2.1.1: - resolution: {integrity: sha512-K7Qy8O9p76sL3/3m7/zLKbRkyOlSZAgzEaLhyj2mXS8PsCud2Eo4hAb8aLtZqHh0QGqLcb9dlJSu6lHRVENm1w==} - engines: {node: '>=6'} - - cbor@8.1.0: - resolution: {integrity: sha512-DwGjNW9omn6EwP70aXsn7FQJx5kO12tX0bZkaTjzdVFM6/7nhA4t0EENocKGx6D2Bch9PE2KzCUf5SceBdeijg==} - engines: {node: '>=12.19'} - - cbor@9.0.2: - resolution: {integrity: sha512-JPypkxsB10s9QOWwa6zwPzqE1Md3vqpPc+cai4sAecuCsRyAtAl/pMyhPlMbT/xtPnm2dznJZYRLui57qiRhaQ==} - engines: {node: '>=16'} - - chai-as-promised@7.1.2: - resolution: {integrity: sha512-aBDHZxRzYnUYuIAIPBH2s511DjlKPzXNlXSGFC8CwmroWQLfrW0LtE1nK3MAwwNhJPa9raEjNCmRoFpG0Hurdw==} - peerDependencies: - chai: '>= 2.1.2 < 6' - - chai@4.5.0: - resolution: {integrity: sha512-RITGBfijLkBddZvnn8jdqoTypxvqbOLYQkGGxXzeFjVHvudaPw0HNFD9x928/eUwYWd2dPCugVqspGALTZZQKw==} - engines: {node: '>=4'} - - chalk@2.4.2: - resolution: {integrity: sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==} - engines: {node: '>=4'} - - chalk@4.1.2: - resolution: {integrity: sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==} - engines: {node: '>=10'} - - chalk@5.3.0: - resolution: {integrity: sha512-dLitG79d+GV1Nb/VYcCDFivJeK1hiukt9QjRNVOsUtTy1rR1YJsmpGGTZ3qJos+uw7WmWF4wUwBd9jxjocFC2w==} - engines: {node: ^12.17.0 || ^14.13 || >=16.0.0} - - chardet@0.7.0: - resolution: {integrity: sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA==} - - charenc@0.0.2: - resolution: {integrity: sha512-yrLQ/yVUFXkzg7EDQsPieE/53+0RlaWTs+wBrvW36cyilJ2SaDWfl4Yj7MtLTXleV9uEKefbAGUPv2/iWSooRA==} - - check-error@1.0.3: - resolution: {integrity: sha512-iKEoDYaRmd1mxM90a2OEfWhjsjPpYPuQ+lMYsoxB126+t8fw7ySEO48nmDg5COTjxDI65/Y2OWpeEHk3ZOe8zg==} - - chokidar@2.1.8: - resolution: {integrity: sha512-ZmZUazfOzf0Nve7duiCKD23PFSCs4JPoYyccjUFF3aQkQadqBhfzhjkwBH2mNOG9cTBwhamM37EIsIkZw3nRgg==} - - chokidar@3.6.0: - resolution: {integrity: sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw==} - engines: {node: '>= 8.10.0'} - - chokidar@4.0.1: - resolution: {integrity: sha512-n8enUVCED/KVRQlab1hr3MVpcVMvxtZjmEa956u+4YijlmQED223XMSYj2tLuKvr4jcCTzNNMpQDUer72MMmzA==} - engines: {node: '>= 14.16.0'} - - chownr@1.1.4: - resolution: {integrity: sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg==} - - chownr@2.0.0: - resolution: {integrity: sha512-bIomtDF5KGpdogkLd9VspvFzk9KfpyyGlS8YFVZl7TGPBHL5snIOnxeshwVgPteQ9b4Eydl+pVbIyE1DcvCWgQ==} - engines: {node: '>=10'} - - chrome-trace-event@1.0.4: - resolution: {integrity: sha512-rNjApaLzuwaOTjCiT8lSDdGN1APCiqkChLMJxJPWLunPAt5fy8xgU9/jNOchV84wfIxrA0lRQB7oCT8jrn/wrQ==} - engines: {node: '>=6.0'} - - chromium-bidi@0.8.0: - resolution: {integrity: sha512-uJydbGdTw0DEUjhoogGveneJVWX/9YuqkWePzMmkBYwtdAqo5d3J/ovNKFr+/2hWXYmYCr6it8mSSTIj6SS6Ug==} - peerDependencies: - devtools-protocol: '*' - - chunkd@2.0.1: - resolution: {integrity: sha512-7d58XsFmOq0j6el67Ug9mHf9ELUXsQXYJBkyxhH/k+6Ke0qXRnv0kbemx+Twc6fRJ07C49lcbdgm9FL1Ei/6SQ==} - - ci-info@2.0.0: - resolution: {integrity: sha512-5tK7EtrZ0N+OLFMthtqOj4fI2Jeb88C4CAZPu25LDVUgXJ0A3Js4PMGqrn0JU1W0Mh1/Z8wZzYPxqUrXeBboCQ==} - - ci-info@3.9.0: - resolution: {integrity: sha512-NIxF55hv4nSqQswkAeiOi1r83xy8JldOFDTWiug55KBu9Jnblncd2U6ViHmYgHf01TPZS77NJBhBMKdWj9HQMQ==} - engines: {node: '>=8'} - - ci-info@4.0.0: - resolution: {integrity: sha512-TdHqgGf9odd8SXNuxtUBVx8Nv+qZOejE6qyqiy5NtbYYQOeFa6zmHkxlPzmaLxWWHsU6nJmB7AETdVPi+2NBUg==} - engines: {node: '>=8'} - - ci-parallel-vars@1.0.1: - resolution: {integrity: sha512-uvzpYrpmidaoxvIQHM+rKSrigjOe9feHYbw4uOI2gdfe1C3xIlxO+kVXq83WQWNniTf8bAxVpy+cQeFQsMERKg==} - - cids@0.7.5: - resolution: {integrity: sha512-zT7mPeghoWAu+ppn8+BS1tQ5qGmbMfB4AregnQjA/qHY3GC1m1ptI9GkWNlgeu38r7CuRdXB47uY2XgAYt6QVA==} - engines: {node: '>=4.0.0', npm: '>=3.0.0'} - deprecated: This module has been superseded by the multiformats module - - cipher-base@1.0.4: - resolution: {integrity: sha512-Kkht5ye6ZGmwv40uUDZztayT2ThLQGfnj/T71N/XzeZeo3nf8foyW7zGTsPYkEya3m5f3cAypH+qe7YOrM1U2Q==} - - class-is@1.1.0: - resolution: {integrity: sha512-rhjH9AG1fvabIDoGRVH587413LPjTZgmDF9fOFCbFJQV4yuocX1mHxxvXI4g3cGwbVY9wAYIoKlg1N79frJKQw==} - - class-utils@0.3.6: - resolution: {integrity: sha512-qOhPa/Fj7s6TY8H8esGu5QNpMMQxz79h+urzrNYN6mn+9BnxlDGf5QZ+XeCDsxSjPqsSR56XOZOJmpeurnLMeg==} - engines: {node: '>=0.10.0'} - - clean-css@5.3.3: - resolution: {integrity: sha512-D5J+kHaVb/wKSFcyyV75uCn8fiY4sV38XJoe4CUyGQ+mOU/fMVYUdH1hJC+CJQ5uY3EnW27SbJYS4X8BiLrAFg==} - engines: {node: '>= 10.0'} - - clean-stack@2.2.0: - resolution: {integrity: sha512-4diC9HaTE+KRAMWhDhrGOECgWZxoevMc5TlkObMqNSsVU62PYzXZ/SMTjzyGAFF1YusgxGcSWTEXBhp0CPwQ1A==} - engines: {node: '>=6'} - - cli-boxes@2.2.1: - resolution: {integrity: sha512-y4coMcylgSCdVinjiDBuR8PCC2bLjyGTwEmPb9NHR/QaNU6EUOXcTY/s6VjGMD6ENSEaeQYHCY0GNGS5jfMwPw==} - engines: {node: '>=6'} - - cli-table3@0.5.1: - resolution: {integrity: sha512-7Qg2Jrep1S/+Q3EceiZtQcDPWxhAvBw+ERf1162v4sikJrvojMHFqXt8QIVha8UlH9rgU0BeWPytZ9/TzYqlUw==} - engines: {node: '>=6'} - - cli-truncate@4.0.0: - resolution: {integrity: sha512-nPdaFdQ0h/GEigbPClz11D0v/ZJEwxmeVZGeMo3Z5StPtUTkA9o1lD6QwoirYiSDzbcwn2XcjwmCp68W1IS4TA==} - engines: {node: '>=18'} - - cliui@5.0.0: - resolution: {integrity: sha512-PYeGSEmmHM6zvoef2w8TPzlrnNpXIjTipYK780YswmIP9vjxmd6Y2a3CB2Ks6/AU8NHjZugXvo8w3oWM2qnwXA==} - - cliui@6.0.0: - resolution: {integrity: sha512-t6wbgtoCXvAzst7QgXxJYqPt0usEfbgQdftEPbLL/cvv6HPE5VgvqCuAIDR0NgU52ds6rFwqrgakNLrHEjCbrQ==} - - cliui@7.0.4: - resolution: {integrity: sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==} - - cliui@8.0.1: - resolution: {integrity: sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==} - engines: {node: '>=12'} - - clone-deep@4.0.1: - resolution: {integrity: sha512-neHB9xuzh/wk0dIHweyAXv2aPGZIVk3pLMe+/RNzINf17fe0OG96QroktYAUm7SM1PBnzTabaLboqqxDyMU+SQ==} - engines: {node: '>=6'} - - clone-response@1.0.3: - resolution: {integrity: sha512-ROoL94jJH2dUVML2Y/5PEDNaSHgeOdSDicUyS7izcF63G6sTc/FTjLub4b8Il9S8S0beOfYt0TaA5qvFK+w0wA==} - - code-excerpt@4.0.0: - resolution: {integrity: sha512-xxodCmBen3iy2i0WtAK8FlFNrRzjUqjRsMfho58xT/wvZU1YTM3fCnRjcy1gJPMepaRlgm/0e6w8SpWHpn3/cA==} - engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} - - collection-visit@1.0.0: - resolution: {integrity: sha512-lNkKvzEeMBBjUGHZ+q6z9pSJla0KWAQPvtzhEV9+iGyQYG+pBpl7xKDhxoNSOZH2hhv0v5k0y2yAM4o4SjoSkw==} - engines: {node: '>=0.10.0'} - - color-convert@1.9.3: - resolution: {integrity: sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==} - - color-convert@2.0.1: - resolution: {integrity: sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==} - engines: {node: '>=7.0.0'} - - color-name@1.1.3: - resolution: {integrity: sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==} - - color-name@1.1.4: - resolution: {integrity: sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==} - - color-support@1.1.3: - resolution: {integrity: sha512-qiBjkpbMLO/HL68y+lh4q0/O1MZFj2RX6X/KmMa3+gJD3z+WwI1ZzDHysvqHGS3mP6mznPckpXmw1nI9cJjyRg==} - hasBin: true - - colorette@2.0.20: - resolution: {integrity: sha512-IfEDxwoWIjkeXL1eXcDiow4UbKjhLdq6/EuSVR9GMN7KVH3r9gQ83e73hsz1Nd1T3ijd5xv1wcWRYO+D6kCI2w==} - - colors@1.4.0: - resolution: {integrity: sha512-a+UqTh4kgZg/SlGvfbzDHpgRu7AAQOmmqRHJnxhRZICKFUT91brVhNNt58CMWU9PsBbv3PDCZUHbVxuDiH2mtA==} - engines: {node: '>=0.1.90'} - - combined-stream@1.0.8: - resolution: {integrity: sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==} - engines: {node: '>= 0.8'} - - command-exists@1.2.9: - resolution: {integrity: sha512-LTQ/SGc+s0Xc0Fu5WaKnR0YiygZkm9eKFvyS+fRsU7/ZWFF8ykFM6Pc9aCVf1+xasOOZpO3BAVgVrKvsqKHV7w==} - - command-line-args@5.2.1: - resolution: {integrity: sha512-H4UfQhZyakIjC74I9d34fGYDwk3XpSr17QhEd0Q3I9Xq1CETHo4Hcuo87WyWHpAF1aSLjLRf5lD9ZGX2qStUvg==} - engines: {node: '>=4.0.0'} - - command-line-usage@6.1.3: - resolution: {integrity: sha512-sH5ZSPr+7UStsloltmDh7Ce5fb8XPlHyoPzTpyyMuYCtervL65+ubVZ6Q61cFtFl62UyJlc8/JwERRbAFPUqgw==} - engines: {node: '>=8.0.0'} - - commander@2.20.3: - resolution: {integrity: sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==} - - commander@7.2.0: - resolution: {integrity: sha512-QrWXB+ZQSVPmIWIhtEO9H+gwHaMGYiF5ChvoJ+K9ZGHG/sVsa6yiesAD1GC/x46sET00Xlwo1u49RVVVzvcSkw==} - engines: {node: '>= 10'} - - commander@8.3.0: - resolution: {integrity: sha512-OkTL9umf+He2DZkUq8f8J9of7yL6RJKI24dVITBmNfZBmri9zYZQrKkuXiKhyfPSu8tUhnVBB1iKXevvnlR4Ww==} - engines: {node: '>= 12'} - - common-path-prefix@3.0.0: - resolution: {integrity: sha512-QE33hToZseCH3jS0qN96O/bSh3kaw/h+Tq7ngyY9eWDUnTlTNUyqfqvCXioLe5Na5jFsL78ra/wuBU4iuEgd4w==} - - common-tags@1.8.2: - resolution: {integrity: sha512-gk/Z852D2Wtb//0I+kRFNKKE9dIIVirjoqPoA1wJU+XePVXZfGeBpk45+A1rKO4Q43prqWBNY/MiIeRLbPWUaA==} - engines: {node: '>=4.0.0'} - - commondir@1.0.1: - resolution: {integrity: sha512-W9pAhw0ja1Edb5GVdIF1mjZw/ASI0AlShXM83UUGe2DVr5TdAPEA1OA8m/g8zWp9x6On7gqufY+FatDbC3MDQg==} - - component-emitter@1.3.1: - resolution: {integrity: sha512-T0+barUSQRTUQASh8bx02dl+DhF54GtIDY13Y3m9oWTklKbb3Wv974meRpeZ3lp1JpLVECWWNHC4vaG2XHXouQ==} - - compressible@2.0.18: - resolution: {integrity: sha512-AF3r7P5dWxL8MxyITRMlORQNaOA2IkAFaTr4k7BUumjPtRpGDTZpl0Pb1XCO6JeDCBdp126Cgs9sMxqSjgYyRg==} - engines: {node: '>= 0.6'} - - compression@1.7.4: - resolution: {integrity: sha512-jaSIDzP9pZVS4ZfQ+TzvtiWhdpFhE2RDHz8QJkpX9SIpLq88VueF5jJw6t+6CUQcAoA6t+x89MLrWAqpfDE8iQ==} - engines: {node: '>= 0.8.0'} - - concat-map@0.0.1: - resolution: {integrity: sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==} - - concat-stream@1.6.2: - resolution: {integrity: sha512-27HBghJxjiZtIk3Ycvn/4kbJk/1uZuJFfuPEns6LaEvpvG1f0hTea8lilrouyo9mVc2GWdcEZ8OLoGmSADlrCw==} - engines: {'0': node >= 0.8} - - concordance@5.0.4: - resolution: {integrity: sha512-OAcsnTEYu1ARJqWVGwf4zh4JDfHZEaSNlNccFmt8YjB2l/n19/PF2viLINHc57vO4FKIAFl2FWASIGZZWZ2Kxw==} - engines: {node: '>=10.18.0 <11 || >=12.14.0 <13 || >=14'} - - concurrently@9.0.1: - resolution: {integrity: sha512-wYKvCd/f54sTXJMSfV6Ln/B8UrfLBKOYa+lzc6CHay3Qek+LorVSBdMVfyewFhRbH0Rbabsk4D+3PL/VjQ5gzg==} - engines: {node: '>=18'} - hasBin: true - - connect-history-api-fallback@1.6.0: - resolution: {integrity: sha512-e54B99q/OUoH64zYYRf3HBP5z24G38h5D3qXu23JGRoigpX5Ss4r9ZnDk3g0Z8uQC2x2lPaJ+UlWBc1ZWBWdLg==} - engines: {node: '>=0.8'} - - connect@3.7.0: - resolution: {integrity: sha512-ZqRXc+tZukToSNmh5C2iWMSoV3X1YUcPbqEM4DkEG5tNQXrQUZCNVGGv3IuicnkMtPfGf3Xtp8WCXs295iQ1pQ==} - engines: {node: '>= 0.10.0'} - - console-control-strings@1.1.0: - resolution: {integrity: sha512-ty/fTekppD2fIwRvnZAVdeOiGd1c7YXEixbgJTNzqcxJWKQnjJ/V1bNEEE6hygpM3WjwHFUVK6HTjWSzV4a8sQ==} - - content-disposition@0.5.4: - resolution: {integrity: sha512-FveZTNuGw04cxlAiWbzi6zTAL/lhehaWbTtgluJh4/E95DqMwTmha3KZN1aAWA8cFIhHzMZUvLevkw5Rqk+tSQ==} - engines: {node: '>= 0.6'} - - content-hash@2.5.2: - resolution: {integrity: sha512-FvIQKy0S1JaWV10sMsA7TRx8bpU+pqPkhbsfvOJAdjRXvYxEckAwQWGwtRjiaJfh+E0DvcWUGqcdjwMGFjsSdw==} - - content-type@1.0.5: - resolution: {integrity: sha512-nTjqfcBFEipKdXCv4YDQWCfmcLZKm81ldF0pAopTvyrFGVbcR6P/VAAd5G7N+0tTr8QqiU0tFadD6FK4NtJwOA==} - engines: {node: '>= 0.6'} - - convert-source-map@1.9.0: - resolution: {integrity: sha512-ASFBup0Mz1uyiIjANan1jzLQami9z1PoYSZCiiYW2FczPbenXc45FZdBZLzOT+r6+iciuEModtmCti+hjaAk0A==} - - convert-source-map@2.0.0: - resolution: {integrity: sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==} - - convert-to-spaces@2.0.1: - resolution: {integrity: sha512-rcQ1bsQO9799wq24uE5AM2tAILy4gXGIK/njFWcVQkGNZ96edlpY+A7bjwvzjYvLDyzmG1MmMLZhpcsb+klNMQ==} - engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} - - cookie-signature@1.0.6: - resolution: {integrity: sha512-QADzlaHc8icV8I7vbaJXJwod9HWYp8uCqf1xa4OfNu1T7JVxQIrUgOWtHdNDtPiywmFbiS12VjotIXLrKM3orQ==} - - cookie@0.4.2: - resolution: {integrity: sha512-aSWTXFzaKWkvHO1Ny/s+ePFpvKsPnjc551iI41v3ny/ow6tBG5Vd+FuqGNhh1LxOmVzOlGUriIlOaokOvhaStA==} - engines: {node: '>= 0.6'} - - cookie@0.7.1: - resolution: {integrity: sha512-6DnInpx7SJ2AK3+CTUE/ZM0vWTUboZCegxhC2xiIydHR9jNuTAASBrfEpHhiGOZw/nX51bHt6YQl8jsGo4y/0w==} - engines: {node: '>= 0.6'} - - copy-descriptor@0.1.1: - resolution: {integrity: sha512-XgZ0pFcakEUlbwQEVNg3+QAis1FyTL3Qel9FYy8pSkQqoG3PNoT0bOCQtOXcOkur21r2Eq2kI+IE+gsmAEVlYw==} - engines: {node: '>=0.10.0'} - - core-js-compat@3.38.1: - resolution: {integrity: sha512-JRH6gfXxGmrzF3tZ57lFx97YARxCXPaMzPo6jELZhv88pBH5VXpQ+y0znKGlFnzuaihqhLbefxSJxWJMPtfDzw==} - - core-util-is@1.0.2: - resolution: {integrity: sha512-3lqz5YjWTYnW6dlDa5TLaTCcShfar1e40rmcJVwCBJC6mWlFuj0eCHIElmG1g5kyuJ/GD+8Wn4FFCcz4gJPfaQ==} - - core-util-is@1.0.3: - resolution: {integrity: sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==} - - cors-gate@1.1.3: - resolution: {integrity: sha512-RFqvbbpj02lqKDhqasBEkgzmT3RseCH3DKy5sT2W9S1mhctABKQP3ktKcnKN0h8t4pJ2SneI3hPl3TGNi/VmZA==} - - cors@2.8.5: - resolution: {integrity: sha512-KIHbLJqu73RGr/hnbrO9uBeixNGuvSQjul/jdFvS/KFSIH1hWVd1ng7zOHx+YrEfInLG7q4n6GHQ9cDtxv/P6g==} - engines: {node: '>= 0.10'} - - cosmiconfig@9.0.0: - resolution: {integrity: sha512-itvL5h8RETACmOTFc4UfIyB2RfEHi71Ax6E/PivVxq9NseKbOWpeyHEOIbmAw1rs8Ak0VursQNww7lf7YtUwzg==} - engines: {node: '>=14'} - peerDependencies: - typescript: '>=4.9.5' - peerDependenciesMeta: - typescript: - optional: true - - crc-32@1.2.2: - resolution: {integrity: sha512-ROmzCKrTnOwybPcJApAA6WBWij23HVfGVNKqqrZpuyZOHqK2CwHSvpGuyt/UNNvaIjEd8X5IFGp4Mh+Ie1IHJQ==} - engines: {node: '>=0.8'} - hasBin: true - - create-hash@1.2.0: - resolution: {integrity: sha512-z00bCGNHDG8mHAkP7CtT1qVu+bFQUPjYq/4Iv3C3kWjTFV10zIjfSoeqXo9Asws8gwSHDGj/hl2u4OGIjapeCg==} - - create-hmac@1.1.7: - resolution: {integrity: sha512-MJG9liiZ+ogc4TzUwuvbER1JRdgvUFSB5+VR/g5h82fGaIRWMWddtKBHi7/sVhfjQZ6SehlyhvQYrcYkaUIpLg==} - - create-require@1.1.1: - resolution: {integrity: sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ==} - - cross-fetch@3.1.8: - resolution: {integrity: sha512-cvA+JwZoU0Xq+h6WkMvAUqPEYy92Obet6UdKLfW60qn99ftItKjB5T+BkyWOFWe2pUyfQ+IJHmpOTznqk1M6Kg==} - - cross-fetch@4.0.0: - resolution: {integrity: sha512-e4a5N8lVvuLgAWgnCrLr2PP0YyDOTHa9H/Rj54dirp61qXnNq46m82bRhNqIA5VccJtWBvPTFRV3TtvHUKPB1g==} - - cross-spawn@5.1.0: - resolution: {integrity: sha512-pTgQJ5KC0d2hcY8eyL1IzlBPYjTkyH72XRZPnLyKus2mBfNjQs3klqbJU2VILqZryAZUt9JOb3h/mWMy23/f5A==} - - cross-spawn@6.0.5: - resolution: {integrity: sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==} - engines: {node: '>=4.8'} - - cross-spawn@7.0.3: - resolution: {integrity: sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==} - engines: {node: '>= 8'} - - crypt@0.0.2: - resolution: {integrity: sha512-mCxBlsHFYh9C+HVpiEacem8FEBnMXgU9gy4zmNC+SXAZNB/1idgp/aulFJ4FgCi7GPEVbfyng092GqL2k2rmow==} - - css-select@4.3.0: - resolution: {integrity: sha512-wPpOYtnsVontu2mODhA19JrqWxNsfdatRKd64kmpRbQgh1KtItko5sTnEpPdpSaJszTOhEMlF/RPz28qj4HqhQ==} - - css-what@6.1.0: - resolution: {integrity: sha512-HTUrgRJ7r4dsZKU6GjmpfRK1O76h97Z8MfS1G0FozR+oF2kG6Vfe8JE6zwrkbxigziPHinCJ+gCPjA9EaBDtRw==} - engines: {node: '>= 6'} - - currently-unhandled@0.4.1: - resolution: {integrity: sha512-/fITjgjGU50vjQ4FH6eUoYu+iUoUKIXws2hL15JJpIR+BbTxaXQsMuuyjtNh2WqsSBS5nsaZHFsFecyw5CCAng==} - engines: {node: '>=0.10.0'} - - d@1.0.2: - resolution: {integrity: sha512-MOqHvMWF9/9MX6nza0KgvFH4HpMU0EF5uUDXqX/BtxtU8NfB0QzRtJ8Oe/6SuS4kbhyzVJwjd97EA4PKrzJ8bw==} - engines: {node: '>=0.12'} - - dashdash@1.14.1: - resolution: {integrity: sha512-jRFi8UDGo6j+odZiEpjazZaWqEal3w/basFjQHQEwVtZJGDpxbH1MeYluwCS8Xq5wmLJooDlMgvVarmWfGM44g==} - engines: {node: '>=0.10'} - - data-uri-to-buffer@6.0.2: - resolution: {integrity: sha512-7hvf7/GW8e86rW0ptuwS3OcBGDjIi6SZva7hCyWC0yYry2cOPmLIjXAUHI6DK2HsnwJd9ifmt57i8eV2n4YNpw==} - engines: {node: '>= 14'} - - data-view-buffer@1.0.1: - resolution: {integrity: sha512-0lht7OugA5x3iJLOWFhWK/5ehONdprk0ISXqVFn/NFrDu+cuc8iADFrGQz5BnRK7LLU3JmkbXSxaqX+/mXYtUA==} - engines: {node: '>= 0.4'} - - data-view-byte-length@1.0.1: - resolution: {integrity: sha512-4J7wRJD3ABAzr8wP+OcIcqq2dlUKp4DVflx++hs5h5ZKydWMI6/D/fAot+yh6g2tHh8fLFTvNOaVN357NvSrOQ==} - engines: {node: '>= 0.4'} - - data-view-byte-offset@1.0.0: - resolution: {integrity: sha512-t/Ygsytq+R995EJ5PZlD4Cu56sWa8InXySaViRzw9apusqsOO2bQP+SbYzAhR0pFKoB+43lYy8rWban9JSuXnA==} - engines: {node: '>= 0.4'} - - dataloader@1.4.0: - resolution: {integrity: sha512-68s5jYdlvasItOJnCuI2Q9s4q98g0pCyL3HrcKJu8KNugUl8ahgmZYg38ysLTgQjjXX3H8CJLkAvWrclWfcalw==} - - dataloader@2.2.2: - resolution: {integrity: sha512-8YnDaaf7N3k/q5HnTJVuzSyLETjoZjVmHc4AeKAzOvKHEFQKcn64OKBfzHYtE9zGjctNM7V9I0MfnUVLpi7M5g==} - - date-time@3.1.0: - resolution: {integrity: sha512-uqCUKXE5q1PNBXjPqvwhwJf9SwMoAHBgWJ6DcrnS5o+W2JOiIILl0JEdVD8SGujrNS02GGxgwAg2PN2zONgtjg==} - engines: {node: '>=6'} - - death@1.1.0: - resolution: {integrity: sha512-vsV6S4KVHvTGxbEcij7hkWRv0It+sGGWVOM67dQde/o5Xjnr+KmLjxWJii2uEObIrt1CcM9w0Yaovx+iOlIL+w==} - - debug@2.6.9: - resolution: {integrity: sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==} - peerDependencies: - supports-color: '*' - peerDependenciesMeta: - supports-color: - optional: true - - debug@3.2.7: - resolution: {integrity: sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==} - peerDependencies: - supports-color: '*' - peerDependenciesMeta: - supports-color: - optional: true - - debug@4.3.7: - resolution: {integrity: sha512-Er2nc/H7RrMXZBFCEim6TCmMk02Z8vLC2Rbi1KEBggpo0fS6l0S1nnapwmIi3yW/+GOJap1Krg4w0Hg80oCqgQ==} - engines: {node: '>=6.0'} - peerDependencies: - supports-color: '*' - peerDependenciesMeta: - supports-color: - optional: true - - debug@4.4.0: - resolution: {integrity: sha512-6WTZ/IxCY/T6BALoZHaE4ctp9xm+Z5kY/pzYaCHRFeyVhojxlrm+46y68HA6hr0TcwEssoxNiDEUJQjfPZ/RYA==} - engines: {node: '>=6.0'} - peerDependencies: - supports-color: '*' - peerDependenciesMeta: - supports-color: - optional: true - - decamelize@1.2.0: - resolution: {integrity: sha512-z2S+W9X73hAUUki+N+9Za2lBlun89zigOyGrsax+KUQ6wKW4ZoWpEYBkGhQjwAjjDCkWxhY0VKEhk8wzY7F5cA==} - engines: {node: '>=0.10.0'} - - decamelize@4.0.0: - resolution: {integrity: sha512-9iE1PgSik9HeIIw2JO94IidnE3eBoQrFJ3w7sFuzSX4DpmZ3v5sZpUiV5Swcf6mQEF+Y0ru8Neo+p+nyh2J+hQ==} - engines: {node: '>=10'} - - decode-uri-component@0.2.2: - resolution: {integrity: sha512-FqUYQ+8o158GyGTrMFJms9qh3CqTKvAqgqsTnkLI8sKu0028orqBhxNMFkFen0zGyg6epACD32pjVk58ngIErQ==} - engines: {node: '>=0.10'} - - decompress-response@3.3.0: - resolution: {integrity: sha512-BzRPQuY1ip+qDonAOz42gRm/pg9F768C+npV/4JOsxRC2sq+Rlk+Q4ZCAsOhnIaMrgarILY+RMUIvMmmX1qAEA==} - engines: {node: '>=4'} - - decompress-response@6.0.0: - resolution: {integrity: sha512-aW35yZM6Bb/4oJlZncMH2LCoZtJXTRxES17vE3hoRiowU2kWHaJKFkSBDnDR+cm9J+9QhXmREyIfv0pji9ejCQ==} - engines: {node: '>=10'} - - deep-eql@4.1.4: - resolution: {integrity: sha512-SUwdGfqdKOwxCPeVYjwSyRpJ7Z+fhpwIAtmCUdZIWZ/YP5R9WAsyuSgpLVDi9bjWoN2LXHNss/dk3urXtdQxGg==} - engines: {node: '>=6'} - - deep-equal@1.1.2: - resolution: {integrity: sha512-5tdhKF6DbU7iIzrIOa1AOUt39ZRm13cmL1cGEh//aqR8x9+tNfbywRf0n5FD/18OKMdo7DNEtrX2t22ZAkI+eg==} - engines: {node: '>= 0.4'} - - deep-extend@0.6.0: - resolution: {integrity: sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==} - engines: {node: '>=4.0.0'} - - deep-is@0.1.4: - resolution: {integrity: sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==} - - deepmerge@4.3.1: - resolution: {integrity: sha512-3sUqbMEc77XqpdNO7FRyRog+eW3ph+GYCbj+rK+uYyRMuwsVy0rMiVtPn+QJlKFvWP/1PYpapqYn0Me2knFn+A==} - engines: {node: '>=0.10.0'} - - default-gateway@4.2.0: - resolution: {integrity: sha512-h6sMrVB1VMWVrW13mSc6ia/DwYYw5MN6+exNu1OaJeFac5aSAvwM7lZ0NVfTABuSkQelr4h5oebg3KB1XPdjgA==} - engines: {node: '>=6'} - - default-require-extensions@3.0.1: - resolution: {integrity: sha512-eXTJmRbm2TIt9MgWTsOH1wEuhew6XGZcMeGKCtLedIg/NCsg1iBePXkceTdK4Fii7pzmN9tGsZhKzZ4h7O/fxw==} - engines: {node: '>=8'} - - defer-to-connect@2.0.1: - resolution: {integrity: sha512-4tvttepXG1VaYGrRibk5EwJd1t4udunSOVMdLSAL6mId1ix438oPwPZMALY41FCijukO1L0twNcGsdzS7dHgDg==} - engines: {node: '>=10'} - - define-data-property@1.1.4: - resolution: {integrity: sha512-rBMvIzlpA8v6E+SJZoo++HAYqsLrkg7MSfIinMPFhmkorw7X+dOXVJQs+QT69zGkzMyfDnIMN2Wid1+NbL3T+A==} - engines: {node: '>= 0.4'} - - define-properties@1.2.1: - resolution: {integrity: sha512-8QmQKqEASLd5nx0U1B1okLElbUuuttJ/AnYmRXbbbGDWh6uS208EjD4Xqq/I9wK7u0v6O08XhTWnt5XtEbR6Dg==} - engines: {node: '>= 0.4'} - - define-property@0.2.5: - resolution: {integrity: sha512-Rr7ADjQZenceVOAKop6ALkkRAmH1A4Gx9hV/7ZujPUN2rkATqFO0JZLZInbAjpZYoJ1gUx8MRMQVkYemcbMSTA==} - engines: {node: '>=0.10.0'} - - define-property@1.0.0: - resolution: {integrity: sha512-cZTYKFWspt9jZsMscWo8sc/5lbPC9Q0N5nBLgb+Yd915iL3udB1uFgS3B8YCx66UVHq018DAVFoee7x+gxggeA==} - engines: {node: '>=0.10.0'} - - define-property@2.0.2: - resolution: {integrity: sha512-jwK2UV4cnPpbcG7+VRARKTZPUWowwXA8bzH5NP6ud0oeAxyYPuGZUAC7hMugpCdz4BeSZl2Dl9k66CHJ/46ZYQ==} - engines: {node: '>=0.10.0'} - - degenerator@5.0.1: - resolution: {integrity: sha512-TllpMR/t0M5sqCXfj85i4XaAzxmS5tVA16dqvdkMwGmzI+dXLXnw3J+3Vdv7VKw+ThlTMboK6i9rnZ6Nntj5CQ==} - engines: {node: '>= 14'} - - del@4.1.1: - resolution: {integrity: sha512-QwGuEUouP2kVwQenAsOof5Fv8K9t3D8Ca8NxcXKrIpEHjTXK5J2nXLdP+ALI1cgv8wj7KuwBhTwBkOZSJKM5XQ==} - engines: {node: '>=6'} - - delayed-stream@1.0.0: - resolution: {integrity: sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==} - engines: {node: '>=0.4.0'} - - delegates@1.0.0: - resolution: {integrity: sha512-bd2L678uiWATM6m5Z1VzNCErI3jiGzt6HGY8OVICs40JQq/HALfbyNJmp0UDakEY4pMMaN0Ly5om/B1VI/+xfQ==} - - depd@1.1.2: - resolution: {integrity: sha512-7emPTl6Dpo6JRXOXjLRxck+FlLRX5847cLKEn00PLAgc3g2hTZZgr+e4c2v6QpSmLeFP3n5yUo7ft6avBK/5jQ==} - engines: {node: '>= 0.6'} - - depd@2.0.0: - resolution: {integrity: sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==} - engines: {node: '>= 0.8'} - - destroy@1.2.0: - resolution: {integrity: sha512-2sJGJTaXIIaR1w4iJSNoN0hnMY7Gpc/n8D4qSCJw8QqFWXf7cuAgnEHxBpweaVcPevC2l3KpjYCx3NypQQgaJg==} - engines: {node: '>= 0.8', npm: 1.2.8000 || >= 1.4.16} - - destroyable-server@1.0.2: - resolution: {integrity: sha512-Ln7ZKRq+7kr/3e4FCI8+jAjRbqbdaET8/ZBoUVvn+sDSAD7zDZA5mykkPRcrjBcaGy+LOM4ntMlIp1NMj1kMxw==} - engines: {node: '>=12.0.0'} - - detect-indent@6.1.0: - resolution: {integrity: sha512-reYkTUJAZb9gUuZ2RvVCNhVHdg62RHnJ7WJl8ftMi4diZ6NWlciOzQN88pUhSELEwflJht4oQDv0F0BMlwaYtA==} - engines: {node: '>=8'} - - detect-libc@2.0.3: - resolution: {integrity: sha512-bwy0MGW55bG41VqxxypOsdSdGqLwXPI/focwgTYCFMbdUiBAxLg9CFzG08sz2aqzknwiX7Hkl0bQENjg8iLByw==} - engines: {node: '>=8'} - - detect-node@2.1.0: - resolution: {integrity: sha512-T0NIuQpnTvFDATNuHN5roPwSBG83rFsuO+MXXH9/3N1eFbn4wcPjttvjMLEPWJ0RGUYgQE7cGgS3tNxbqCGM7g==} - - devtools-protocol@0.0.1367902: - resolution: {integrity: sha512-XxtPuC3PGakY6PD7dG66/o8KwJ/LkH2/EKe19Dcw58w53dv4/vSQEkn/SzuyhHE2q4zPgCkxQBxus3VV4ql+Pg==} - - diff@4.0.2: - resolution: {integrity: sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==} - engines: {node: '>=0.3.1'} - - diff@5.2.0: - resolution: {integrity: sha512-uIFDxqpRZGZ6ThOk84hEfqWoHx2devRFvpTZcTHur85vImfaxUbTW9Ryh4CpCuDnToOP1CEtXKIgytHBPVff5A==} - engines: {node: '>=0.3.1'} - - difflib@0.2.4: - resolution: {integrity: sha512-9YVwmMb0wQHQNr5J9m6BSj6fk4pfGITGQOOs+D9Fl+INODWFOfvhIU1hNv6GgR1RBoC/9NJcwu77zShxV0kT7w==} - - dir-glob@3.0.1: - resolution: {integrity: sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==} - engines: {node: '>=8'} - - dns-equal@1.0.0: - resolution: {integrity: sha512-z+paD6YUQsk+AbGCEM4PrOXSss5gd66QfcVBFTKR/HpFL9jCqikS94HYwKww6fQyO7IxrIIyUu+g0Ka9tUS2Cg==} - - dns-packet@1.3.4: - resolution: {integrity: sha512-BQ6F4vycLXBvdrJZ6S3gZewt6rcrks9KBgM9vrhW+knGRqc8uEdT7fuCwloc7nny5xNoMJ17HGH0R/6fpo8ECA==} - - dns-txt@2.0.2: - resolution: {integrity: sha512-Ix5PrWjphuSoUXV/Zv5gaFHjnaJtb02F2+Si3Ht9dyJ87+Z/lMmy+dpNHtTGraNK958ndXq2i+GLkWsWHcKaBQ==} - - doctrine@2.1.0: - resolution: {integrity: sha512-35mSku4ZXK0vfCuHEDAwt55dg2jNajHZ1odvF+8SSr82EsZY4QmXfuWso8oEd8zRhVObSN18aM0CjSdoBX7zIw==} - engines: {node: '>=0.10.0'} - - doctrine@3.0.0: - resolution: {integrity: sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==} - engines: {node: '>=6.0.0'} - - dom-converter@0.2.0: - resolution: {integrity: sha512-gd3ypIPfOMr9h5jIKq8E3sHOTCjeirnl0WK5ZdS1AW0Odt0b1PaWaHdJ4Qk4klv+YB9aJBS7mESXjFoDQPu6DA==} - - dom-serializer@1.4.1: - resolution: {integrity: sha512-VHwB3KfrcOOkelEG2ZOfxqLZdfkil8PtJi4P8N2MMXucZq2yLp75ClViUlOVwyoHEDjYU433Aq+5zWP61+RGag==} - - dom-walk@0.1.2: - resolution: {integrity: sha512-6QvTW9mrGeIegrFXdtQi9pk7O/nSK6lSdXW2eqUspN5LWD7UTji2Fqw5V2YLjBpHEoU9Xl/eUWNpDeZvoyOv2w==} - - domelementtype@2.3.0: - resolution: {integrity: sha512-OLETBj6w0OsagBwdXnPdN0cnMfF9opN69co+7ZrbfPGrdpPVNBUj02spi6B1N7wChLQiPn4CSH/zJvXw56gmHw==} - - domexception@1.0.1: - resolution: {integrity: sha512-raigMkn7CJNNo6Ihro1fzG7wr3fHuYVytzquZKX5n0yizGsTcYgzdIUwj1X9pK0VvjeihV+XiclP+DjwbsSKug==} - deprecated: Use your platform's native DOMException instead - - domhandler@4.3.1: - resolution: {integrity: sha512-GrwoxYN+uWlzO8uhUXRl0P+kHE4GtVPfYzVLcUxPL7KNdHKj66vvlhiweIHqYYXWlw+T8iLMp42Lm67ghw4WMQ==} - engines: {node: '>= 4'} - - domutils@2.8.0: - resolution: {integrity: sha512-w96Cjofp72M5IIhpjgobBimYEfoPjx1Vx0BSX9P30WBdZW2WIKU0T1Bd0kz2eNZ9ikjKgHbEyKx8BB6H1L3h3A==} - - dot-case@3.0.4: - resolution: {integrity: sha512-Kv5nKlh6yRrdrGvxeJ2e5y2eRUpkUosIW4A2AS38zwSz27zu7ufDwQPi5Jhs3XAlGNetl3bmnGhQsMtkKJnj3w==} - - dotenv@16.4.5: - resolution: {integrity: sha512-ZmdL2rui+eB2YwhsWzjInR8LldtZHGDoQ1ugH85ppHKwpUHL7j7rN0Ti9NCnGiQbhaZ11FpR+7ao1dNsmduNUg==} - engines: {node: '>=12'} - - dotenv@8.6.0: - resolution: {integrity: sha512-IrPdXQsk2BbzvCBGBOTmmSH5SodmqZNt4ERAZDmW4CT+tL8VtvinqywuANaFu4bOMWki16nqf0e4oC0QIaDr/g==} - engines: {node: '>=10'} - - dunder-proto@1.0.1: - resolution: {integrity: sha512-KIN/nDJBQRcXw0MLVhZE9iQHmG68qAVIBg9CqmUYjmQIhgij9U5MFvrqkUL5FbtyyzZuOeOt0zdeRe4UY7ct+A==} - engines: {node: '>= 0.4'} - - duplexify@3.7.1: - resolution: {integrity: sha512-07z8uv2wMyS51kKhD1KsdXJg5WQ6t93RneqRxUHnskXVtlYYkLqM0gqStQZ3pj073g687jPCHrqNfCzawLYh5g==} - - eastasianwidth@0.2.0: - resolution: {integrity: sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==} - - ecc-jsbn@0.1.2: - resolution: {integrity: sha512-eh9O+hwRHNbG4BLTjEl3nw044CkGm5X6LoaCf7LPp7UU8Qrt47JYNi6nPX8xjW97TKGKm1ouctg0QSpZe9qrnw==} - - ee-first@1.1.1: - resolution: {integrity: sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==} - - electron-to-chromium@1.5.45: - resolution: {integrity: sha512-vOzZS6uZwhhbkZbcRyiy99Wg+pYFV5hk+5YaECvx0+Z31NR3Tt5zS6dze2OepT6PCTzVzT0dIJItti+uAW5zmw==} - - elliptic@6.5.4: - resolution: {integrity: sha512-iLhC6ULemrljPZb+QutR5TQGB+pdW6KGD5RSegS+8sorOZT+rdQFbsQFJgvN3eRqNALqJer4oQ16YvJHlU8hzQ==} - - elliptic@6.5.7: - resolution: {integrity: sha512-ESVCtTwiA+XhY3wyh24QqRGBoP3rEdDUl3EDUUo9tft074fi19IrdpH7hLCMMP3CIj7jb3W96rn8lt/BqIlt5Q==} - - elliptic@6.6.1: - resolution: {integrity: sha512-RaddvvMatK2LJHqFJ+YA4WysVN5Ita9E35botqIYspQ4TkRAlCicdzKOjlyv/1Za5RyTNn7di//eEV0uTAfe3g==} - - emittery@0.10.0: - resolution: {integrity: sha512-AGvFfs+d0JKCJQ4o01ASQLGPmSCxgfU9RFXvzPvZdjKK8oscynksuJhWrSTSw7j7Ep/sZct5b5ZhYCi8S/t0HQ==} - engines: {node: '>=12'} - - emittery@1.0.3: - resolution: {integrity: sha512-tJdCJitoy2lrC2ldJcqN4vkqJ00lT+tOWNT1hBJjO/3FDMJa5TTIiYGCKGkn/WfCyOzUMObeohbVTj00fhiLiA==} - engines: {node: '>=14.16'} - - emoji-regex@10.4.0: - resolution: {integrity: sha512-EC+0oUMY1Rqm4O6LLrgjtYDvcVYTy7chDnM4Q7030tP4Kwj3u/pR6gP9ygnp2CJMK5Gq+9Q2oqmrFJAz01DXjw==} - - emoji-regex@7.0.3: - resolution: {integrity: sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==} - - emoji-regex@8.0.0: - resolution: {integrity: sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==} - - emoji-regex@9.2.2: - resolution: {integrity: sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==} - - encodeurl@1.0.2: - resolution: {integrity: sha512-TPJXq8JqFaVYm2CWmPvnP2Iyo4ZSM7/QKcSmuMLDObfpH5fi7RUGmd/rTDf+rut/saiDiQEeVTNgAmJEdAOx0w==} - engines: {node: '>= 0.8'} - - encodeurl@2.0.0: - resolution: {integrity: sha512-Q0n9HRi4m6JuGIV1eFlmvJB7ZEVxu93IrMyiMsGC0lrMJMWzRgx6WGquyfQgZVb31vhGgXnfmPNNXmxnOkRBrg==} - engines: {node: '>= 0.8'} - - end-of-stream@1.4.4: - resolution: {integrity: sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==} - - enhanced-resolve@5.17.1: - resolution: {integrity: sha512-LMHl3dXhTcfv8gM4kEzIUeTQ+7fpdA0l2tUf34BddXPkz2A5xJ5L/Pchd5BL6rdccM9QGvu0sWZzK1Z1t4wwyg==} - engines: {node: '>=10.13.0'} - - enquirer@2.4.1: - resolution: {integrity: sha512-rRqJg/6gd538VHvR3PSrdRBb/1Vy2YfzHqzvbhGIQpDRKIa4FgV/54b5Q1xYSxOOwKvjXweS26E0Q+nAMwp2pQ==} - engines: {node: '>=8.6'} - - entities@2.2.0: - resolution: {integrity: sha512-p92if5Nz619I0w+akJrLZH0MX0Pb5DX39XOwQTtXSdQQOaYH03S1uIQp4mhOZtAXrxq4ViO67YTiLBo2638o9A==} - - env-paths@2.2.1: - resolution: {integrity: sha512-+h1lkLKhZMTYjog1VEpJNG7NZJWcuc2DDk/qsqSTRRCOXiLjeQ1d1/udrUGhqMxUgAlwKNZ0cf2uqan5GLuS2A==} - engines: {node: '>=6'} - - envinfo@7.14.0: - resolution: {integrity: sha512-CO40UI41xDQzhLB1hWyqUKgFhs250pNcGbyGKe1l/e4FSaI/+YE4IMG76GDt0In67WLPACIITC+sOi08x4wIvg==} - engines: {node: '>=4'} - hasBin: true - - errno@0.1.8: - resolution: {integrity: sha512-dJ6oBr5SQ1VSd9qkk7ByRgb/1SH4JZjCHSW/mr63/QcXO9zLVxvJ6Oy13nio03rxpSnVDDjFor75SjVeZWPW/A==} - hasBin: true - - error-ex@1.3.2: - resolution: {integrity: sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==} - - es-abstract@1.23.3: - resolution: {integrity: sha512-e+HfNH61Bj1X9/jLc5v1owaLYuHdeHHSQlkhCBiTK8rBvKaULl/beGMxwrMXjpYrv4pz22BlY570vVePA2ho4A==} - engines: {node: '>= 0.4'} - - es-define-property@1.0.0: - resolution: {integrity: sha512-jxayLKShrEqqzJ0eumQbVhTYQM27CfT1T35+gCgDFoL82JLsXqTJ76zv6A0YLOgEnLUMvLzsDsGIrl8NFpT2gQ==} - engines: {node: '>= 0.4'} - - es-define-property@1.0.1: - resolution: {integrity: sha512-e3nRfgfUZ4rNGL232gUgX06QNyyez04KdjFrF+LTRoOXmrOgFKDg4BCdsjW8EnT69eqdYGmRpJwiPVYNrCaW3g==} - engines: {node: '>= 0.4'} - - es-errors@1.3.0: - resolution: {integrity: sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==} - engines: {node: '>= 0.4'} - - es-module-lexer@1.5.4: - resolution: {integrity: sha512-MVNK56NiMrOwitFB7cqDwq0CQutbw+0BvLshJSse0MUNU+y1FC3bUS/AQg7oUng+/wKrrki7JfmwtVHkVfPLlw==} - - es-object-atoms@1.0.0: - resolution: {integrity: sha512-MZ4iQ6JwHOBQjahnjwaC1ZtIBH+2ohjamzAO3oaHcXYup7qxjF2fixyH+Q71voWHeOkI2q/TnJao/KfXYIZWbw==} - engines: {node: '>= 0.4'} - - es-object-atoms@1.1.1: - resolution: {integrity: sha512-FGgH2h8zKNim9ljj7dankFPcICIK9Cp5bm+c2gQSYePhpaG5+esrLODihIorn+Pe6FGJzWhXQotPv73jTaldXA==} - engines: {node: '>= 0.4'} - - es-set-tostringtag@2.0.3: - resolution: {integrity: sha512-3T8uNMC3OQTHkFUsFq8r/BwAXLHvU/9O9mE0fBc/MY5iq/8H7ncvO947LmYA6ldWw9Uh8Yhf25zu6n7nML5QWQ==} - engines: {node: '>= 0.4'} - - es-set-tostringtag@2.1.0: - resolution: {integrity: sha512-j6vWzfrGVfyXxge+O0x5sh6cvxAog0a/4Rdd2K36zCMV5eJ+/+tOAngRO8cODMNWbVRdVlmGZQL2YS3yR8bIUA==} - engines: {node: '>= 0.4'} - - es-shim-unscopables@1.0.2: - resolution: {integrity: sha512-J3yBRXCzDu4ULnQwxyToo/OjdMx6akgVC7K6few0a7F/0wLtmKKN7I73AH5T2836UuXRqN7Qg+IIUw/+YJksRw==} - - es-to-primitive@1.2.1: - resolution: {integrity: sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA==} - engines: {node: '>= 0.4'} - - es5-ext@0.10.64: - resolution: {integrity: sha512-p2snDhiLaXe6dahss1LddxqEm+SkuDvV8dnIQG0MWjyHpcMNfXKPE+/Cc0y+PhxJX3A4xGNeFCj5oc0BUh6deg==} - engines: {node: '>=0.10'} - - es6-error@4.1.1: - resolution: {integrity: sha512-Um/+FxMr9CISWh0bi5Zv0iOD+4cFh5qLeks1qhAopKVAJw3drgKbKySikp7wGhDL0HPeaja0P5ULZrxLkniUVg==} - - es6-iterator@2.0.3: - resolution: {integrity: sha512-zw4SRzoUkd+cl+ZoE15A9o1oQd920Bb0iOJMQkQhl3jNc03YqVjAhG7scf9C5KWRU/R13Orf588uCC6525o02g==} - - es6-promise@4.2.8: - resolution: {integrity: sha512-HJDGx5daxeIvxdBxvG2cb9g4tEvwIk3i8+nhX0yGrYmZUzbkdg8QbDevheDB8gd0//uPj4c1EQua8Q+MViT0/w==} - - es6-symbol@3.1.4: - resolution: {integrity: sha512-U9bFFjX8tFiATgtkJ1zg25+KviIXpgRvRHS8sau3GfhVzThRQrOeksPeT0BWW2MNZs1OEWJ1DPXOQMn0KKRkvg==} - engines: {node: '>=0.12'} - - esbuild@0.23.1: - resolution: {integrity: sha512-VVNz/9Sa0bs5SELtn3f7qhJCDPCF5oMEl5cO9/SSinpE9hbPVvxbd572HH5AKiP7WD8INO53GgfDDhRjkylHEg==} - engines: {node: '>=18'} - hasBin: true - - escalade@3.2.0: - resolution: {integrity: sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==} - engines: {node: '>=6'} - - escape-html@1.0.3: - resolution: {integrity: sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow==} - - escape-string-regexp@1.0.5: - resolution: {integrity: sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==} - engines: {node: '>=0.8.0'} - - escape-string-regexp@2.0.0: - resolution: {integrity: sha512-UpzcLCXolUWcNu5HtVMHYdXJjArjsF9C0aNnquZYY4uW/Vu0miy5YoWvbV345HauVvcAUnpRuhMMcqTcGOY2+w==} - engines: {node: '>=8'} - - escape-string-regexp@4.0.0: - resolution: {integrity: sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==} - engines: {node: '>=10'} - - escape-string-regexp@5.0.0: - resolution: {integrity: sha512-/veY75JbMK4j1yjvuUxuVsiS/hr/4iHs9FTT6cgTexxdE0Ly/glccBAkloH/DofkjRbZU3bnoj38mOmhkZ0lHw==} - engines: {node: '>=12'} - - escodegen@1.8.1: - resolution: {integrity: sha512-yhi5S+mNTOuRvyW4gWlg5W1byMaQGWWSYHXsuFZ7GBo7tpyOwi2EdzMP/QWxh9hwkD2m+wDVHJsxhRIj+v/b/A==} - engines: {node: '>=0.12.0'} - hasBin: true - - escodegen@2.1.0: - resolution: {integrity: sha512-2NlIDTwUWJN0mRPQOdtQBzbUHvdGY2P1VXSyU83Q3xKxM7WHX2Ql8dKq782Q9TgQUNOLEzEYu9bzLNj1q88I5w==} - engines: {node: '>=6.0'} - hasBin: true - - eslint-config-prettier@9.1.0: - resolution: {integrity: sha512-NSWl5BFQWEPi1j4TjVNItzYV7dZXZ+wP6I6ZhrBGpChQhZRUaElihE9uRRkcbRnNb76UMKDF3r+WTmNcGPKsqw==} - hasBin: true - peerDependencies: - eslint: '>=7.0.0' - - eslint-import-resolver-node@0.3.9: - resolution: {integrity: sha512-WFj2isz22JahUv+B788TlO3N6zL3nNJGU8CcZbPZvVEkBPaJdCV4vy5wyghty5ROFbCRnm132v8BScu5/1BQ8g==} - - eslint-module-utils@2.12.0: - resolution: {integrity: sha512-wALZ0HFoytlyh/1+4wuZ9FJCD/leWHQzzrxJ8+rebyReSLk7LApMyd3WJaLVoN+D5+WIdJyDK1c6JnE65V4Zyg==} - engines: {node: '>=4'} - peerDependencies: - '@typescript-eslint/parser': '*' - eslint: '*' - eslint-import-resolver-node: '*' - eslint-import-resolver-typescript: '*' - eslint-import-resolver-webpack: '*' - peerDependenciesMeta: - '@typescript-eslint/parser': - optional: true - eslint: - optional: true - eslint-import-resolver-node: - optional: true - eslint-import-resolver-typescript: - optional: true - eslint-import-resolver-webpack: - optional: true - - eslint-plugin-import@2.31.0: - resolution: {integrity: sha512-ixmkI62Rbc2/w8Vfxyh1jQRTdRTF52VxwRVHl/ykPAmqG+Nb7/kNn+byLP0LxPgI7zWA16Jt82SybJInmMia3A==} - engines: {node: '>=4'} - peerDependencies: - '@typescript-eslint/parser': '*' - eslint: ^2 || ^3 || ^4 || ^5 || ^6 || ^7.2.0 || ^8 || ^9 - peerDependenciesMeta: - '@typescript-eslint/parser': - optional: true - - eslint-plugin-prettier@5.2.1: - resolution: {integrity: sha512-gH3iR3g4JfF+yYPaJYkN7jEl9QbweL/YfkoRlNnuIEHEz1vHVlCmWOS+eGGiRuzHQXdJFCOTxRgvju9b8VUmrw==} - engines: {node: ^14.18.0 || >=16.0.0} - peerDependencies: - '@types/eslint': '>=8.0.0' - eslint: '>=8.0.0' - eslint-config-prettier: '*' - prettier: '>=3.0.0' - peerDependenciesMeta: - '@types/eslint': - optional: true - eslint-config-prettier: - optional: true - - eslint-scope@5.1.1: - resolution: {integrity: sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==} - engines: {node: '>=8.0.0'} - - eslint-scope@7.2.2: - resolution: {integrity: sha512-dOt21O7lTMhDM+X9mB4GX+DZrZtCUJPL/wlcTqxyrx5IvO0IYtILdtrQGQp+8n5S0gwSVmOf9NQrjMOgfQZlIg==} - engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} - - eslint-visitor-keys@3.4.3: - resolution: {integrity: sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==} - engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} - - eslint@8.57.1: - resolution: {integrity: sha512-ypowyDxpVSYpkXr9WPv2PAZCtNip1Mv5KTW0SCurXv/9iOpcrH9PaqUElksqEB6pChqHGDRCFTyrZlGhnLNGiA==} - engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} - deprecated: This version is no longer supported. Please see https://eslint.org/version-support for other options. - hasBin: true - - esniff@2.0.1: - resolution: {integrity: sha512-kTUIGKQ/mDPFoJ0oVfcmyJn4iBDRptjNVIzwIFR7tqWXdVI9xfA2RMwY/gbSpJG3lkdWNEjLap/NqVHZiJsdfg==} - engines: {node: '>=0.10'} - - espree@9.6.1: - resolution: {integrity: sha512-oruZaFkjorTpF32kDSI5/75ViwGeZginGGy2NoOSg3Q9bnwlnmDm4HLnkl0RE3n+njDXR037aY1+x58Z/zFdwQ==} - engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} - - esprima@2.7.3: - resolution: {integrity: sha512-OarPfz0lFCiW4/AV2Oy1Rp9qu0iusTKqykwTspGCZtPxmF81JR4MmIebvF1F9+UOKth2ZubLQ4XGGaU+hSn99A==} - engines: {node: '>=0.10.0'} - hasBin: true - - esprima@4.0.1: - resolution: {integrity: sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==} - engines: {node: '>=4'} - hasBin: true - - esquery@1.6.0: - resolution: {integrity: sha512-ca9pw9fomFcKPvFLXhBKUK90ZvGibiGOvRJNbjljY7s7uq/5YO4BOzcYtJqExdx99rF6aAcnRxHmcUHcz6sQsg==} - engines: {node: '>=0.10'} - - esrecurse@4.3.0: - resolution: {integrity: sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==} - engines: {node: '>=4.0'} - - estraverse@1.9.3: - resolution: {integrity: sha512-25w1fMXQrGdoquWnScXZGckOv+Wes+JDnuN/+7ex3SauFRS72r2lFDec0EKPt2YD1wUJ/IrfEex+9yp4hfSOJA==} - engines: {node: '>=0.10.0'} - - estraverse@4.3.0: - resolution: {integrity: sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==} - engines: {node: '>=4.0'} - - estraverse@5.3.0: - resolution: {integrity: sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==} - engines: {node: '>=4.0'} - - estree-walker@1.0.1: - resolution: {integrity: sha512-1fMXF3YP4pZZVozF8j/ZLfvnR8NSIljt56UhbZ5PeeDmmGHpgpdwQt7ITlGvYaQukCvuBRMLEiKiYC+oeIg4cg==} - - estree-walker@2.0.2: - resolution: {integrity: sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w==} - - esutils@2.0.3: - resolution: {integrity: sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==} - engines: {node: '>=0.10.0'} - - etag@1.8.1: - resolution: {integrity: sha512-aIL5Fx7mawVa300al2BnEE4iNvo1qETxLrPI/o05L7z6go7fCw1J6EQmbK4FmJ2AS7kgVF/KEZWufBfdClMcPg==} - engines: {node: '>= 0.6'} - - eth-ens-namehash@2.0.8: - resolution: {integrity: sha512-VWEI1+KJfz4Km//dadyvBBoBeSQ0MHTXPvr8UIXiLW6IanxvAV+DmlZAijZwAyggqGUfwQBeHf7tc9wzc1piSw==} - - eth-gas-reporter@0.2.27: - resolution: {integrity: sha512-femhvoAM7wL0GcI8ozTdxfuBtBFJ9qsyIAsmKVjlWAHUbdnnXHt+lKzz/kmldM5lA9jLuNHGwuIxorNpLbR1Zw==} - peerDependencies: - '@codechecks/client': ^0.1.0 - peerDependenciesMeta: - '@codechecks/client': - optional: true - - eth-lib@0.1.29: - resolution: {integrity: sha512-bfttrr3/7gG4E02HoWTDUcDDslN003OlOoBxk9virpAZQ1ja/jDgwkWB8QfJF7ojuEowrqy+lzp9VcJG7/k5bQ==} - - eth-lib@0.2.8: - resolution: {integrity: sha512-ArJ7x1WcWOlSpzdoTBX8vkwlkSQ85CjjifSZtV4co64vWxSV8geWfPI9x4SVYu3DSxnX4yWFVTtGL+j9DUFLNw==} - - ethereum-bloom-filters@1.2.0: - resolution: {integrity: sha512-28hyiE7HVsWubqhpVLVmZXFd4ITeHi+BUu05o9isf0GUpMtzBUi+8/gFrGaGYzvGAJQmJ3JKj77Mk9G98T84rA==} - - ethereum-cryptography@0.1.3: - resolution: {integrity: sha512-w8/4x1SGGzc+tO97TASLja6SLd3fRIK2tLVcV2Gx4IB21hE19atll5Cq9o3d0ZmAYC/8aw0ipieTSiekAea4SQ==} - - ethereum-cryptography@1.2.0: - resolution: {integrity: sha512-6yFQC9b5ug6/17CQpCyE3k9eKBMdhyVjzUy1WkiuY/E4vj/SXDBbCw8QEIaXqf0Mf2SnY6RmpDcwlUmBSS0EJw==} - - ethereum-cryptography@2.2.1: - resolution: {integrity: sha512-r/W8lkHSiTLxUxW8Rf3u4HGB0xQweG2RyETjywylKZSzLWoWAijRz8WCuOtJ6wah+avllXBqZuk29HCCvhEIRg==} - - ethereumjs-abi@0.6.8: - resolution: {integrity: sha512-Tx0r/iXI6r+lRsdvkFDlut0N08jWMnKRZ6Gkq+Nmw75lZe4e6o3EkSnkaBP5NF6+m5PTGAr9JP43N3LyeoglsA==} - deprecated: This library has been deprecated and usage is discouraged. - - ethereumjs-util@6.2.1: - resolution: {integrity: sha512-W2Ktez4L01Vexijrm5EB6w7dg4n/TgpoYU4avuT5T3Vmnw/eCRtiBrJfQYS/DCSvDIOLn2k57GcHdeBcgVxAqw==} - - ethereumjs-util@7.1.5: - resolution: {integrity: sha512-SDl5kKrQAudFBUe5OJM9Ac6WmMyYmXX/6sTmLZ3ffG2eY6ZIGBes3pEDxNN6V72WyOw4CPD5RomKdsa8DAAwLg==} - engines: {node: '>=10.0.0'} - - ethers@5.8.0: - resolution: {integrity: sha512-DUq+7fHrCg1aPDFCHx6UIPb3nmt2XMpM7Y/g2gLhsl3lIBqeAfOJIl1qEvRf2uq3BiKxmh6Fh5pfp2ieyek7Kg==} - - ethers@6.13.4: - resolution: {integrity: sha512-21YtnZVg4/zKkCQPjrDj38B1r4nQvTZLopUGMLQ1ePU2zV/joCfDC3t3iKQjWRzjjjbzR+mdAIoikeBRNkdllA==} - engines: {node: '>=14.0.0'} - - ethjs-unit@0.1.6: - resolution: {integrity: sha512-/Sn9Y0oKl0uqQuvgFk/zQgR7aw1g36qX/jzSQ5lSwlO0GigPymk4eGQfeNTD03w1dPOqfz8V77Cy43jH56pagw==} - engines: {node: '>=6.5.0', npm: '>=3'} - - ethjs-util@0.1.6: - resolution: {integrity: sha512-CUnVOQq7gSpDHZVVrQW8ExxUETWrnrvXYvYz55wOU8Uj4VCgw56XC2B/fVqQN+f7gmrnRHSLVnFAwsCuNwji8w==} - engines: {node: '>=6.5.0', npm: '>=3'} - - event-emitter@0.3.5: - resolution: {integrity: sha512-D9rRn9y7kLPnJ+hMq7S/nhvoKwwvVJahBi2BPmx3bvbsEdK3W9ii8cBSGjP+72/LnM4n6fo3+dkCX5FeTQruXA==} - - eventemitter2@6.4.9: - resolution: {integrity: sha512-JEPTiaOt9f04oa6NOkc4aH+nVp5I3wEjpHbIPqfgCdD5v5bUzy7xQqwcVO2aDQgOWhI28da57HksMrzK9HlRxg==} - - eventemitter3@3.1.2: - resolution: {integrity: sha512-tvtQIeLVHjDkJYnzf2dgVMxfuSGJeM/7UCG17TT4EumTfNtF+0nebF/4zWOIkCreAbtNqhGEboB6BWrwqNaw4Q==} - - eventemitter3@4.0.4: - resolution: {integrity: sha512-rlaVLnVxtxvoyLsQQFBx53YmXHDxRIzzTLbdfxqi4yocpSjAxXwkU0cScM5JgSKMqEhrZpnvQ2D9gjylR0AimQ==} - - eventemitter3@4.0.7: - resolution: {integrity: sha512-8guHBZCwKnFhYdHr2ysuRWErTwhoN2X8XELRlrRwpmfeY2jjuUN4taQMsULKUVo1K4DvZl+0pgfyoysHxvmvEw==} - - events@3.3.0: - resolution: {integrity: sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q==} - engines: {node: '>=0.8.x'} - - eventsource@2.0.2: - resolution: {integrity: sha512-IzUmBGPR3+oUG9dUeXynyNmf91/3zUSJg1lCktzKw47OXuhco54U3r9B7O4XX+Rb1Itm9OZ2b0RkTs10bICOxA==} - engines: {node: '>=12.0.0'} - - evp_bytestokey@1.0.3: - resolution: {integrity: sha512-/f2Go4TognH/KvCISP7OUsHn85hT9nUkxxA9BEWxFn+Oj9o8ZNLm/40hdlgSLyuOimsrTKLUMEorQexp/aPQeA==} - - execa@1.0.0: - resolution: {integrity: sha512-adbxcyWV46qiHyvSp50TKt05tB4tK3HcmF7/nxfAdhnox83seTDbwnaqKO4sXRy7roHAIFqJP/Rw/AuEbX61LA==} - engines: {node: '>=6'} - - expand-brackets@2.1.4: - resolution: {integrity: sha512-w/ozOKR9Obk3qoWeY/WDi6MFta9AoMR+zud60mdnbniMcBxRuFJyDt2LdX/14A1UABeqk+Uk+LDfUpvoGKppZA==} - engines: {node: '>=0.10.0'} - - express@4.21.1: - resolution: {integrity: sha512-YSFlK1Ee0/GC8QaO91tHcDxJiE/X4FbpAyQWkxAvG6AXCuR65YzK8ua6D9hvi/TzUfZMpc+BwuM1IPw8fmQBiQ==} - engines: {node: '>= 0.10.0'} - - ext@1.7.0: - resolution: {integrity: sha512-6hxeJYaL110a9b5TEJSj0gojyHQAmA2ch5Os+ySCiA1QGdS697XWY1pzsrSjqA9LDEEgdB/KypIlR59RcLuHYw==} - - extend-shallow@2.0.1: - resolution: {integrity: sha512-zCnTtlxNoAiDc3gqY2aYAWFx7XWWiasuF2K8Me5WbN8otHKTUKBwjPtNpRs/rbUZm7KxWAaNj7P1a/p52GbVug==} - engines: {node: '>=0.10.0'} - - extend-shallow@3.0.2: - resolution: {integrity: sha512-BwY5b5Ql4+qZoefgMj2NUmx+tehVTH/Kf4k1ZEtOHNFcm2wSxMRo992l6X3TIgni2eZVTZ85xMOjF31fwZAj6Q==} - engines: {node: '>=0.10.0'} - - extend@3.0.2: - resolution: {integrity: sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==} - - extendable-error@0.1.7: - resolution: {integrity: sha512-UOiS2in6/Q0FK0R0q6UY9vYpQ21mr/Qn1KOnte7vsACuNJf514WvCCUHSRCPcgjPT2bAhNIJdlE6bVap1GKmeg==} - - external-editor@3.1.0: - resolution: {integrity: sha512-hMQ4CX1p1izmuLYyZqLMO/qGNw10wSv9QDCPfzXfyFrOaCSSoRfqE1Kf1s5an66J5JZC62NewG+mK49jOCtQew==} - engines: {node: '>=4'} - - extglob@2.0.4: - resolution: {integrity: sha512-Nmb6QXkELsuBr24CJSkilo6UHHgbekK5UiZgfE6UHD3Eb27YC6oD+bhcT+tJ6cl8dmsgdQxnWlcry8ksBIBLpw==} - engines: {node: '>=0.10.0'} - - extract-zip@2.0.1: - resolution: {integrity: sha512-GDhU9ntwuKyGXdZBUgTIe+vXnWj0fppUEtMDL0+idd5Sta8TGpHssn/eusA9mrPr9qNDym6SxAYZjNvCn/9RBg==} - engines: {node: '>= 10.17.0'} - hasBin: true - - extsprintf@1.3.0: - resolution: {integrity: sha512-11Ndz7Nv+mvAC1j0ktTa7fAb0vLyGGX+rMHNBYQviQDGU0Hw7lhctJANqbPhu9nV9/izT/IntTgZ7Im/9LJs9g==} - engines: {'0': node >=0.6.0} - - fake-indexeddb@4.0.2: - resolution: {integrity: sha512-SdTwEhnakbgazc7W3WUXOJfGmhH0YfG4d+dRPOFoYDRTL6U5t8tvrmkf2W/C3W1jk2ylV7Wrnj44RASqpX/lEw==} - - fast-deep-equal@2.0.1: - resolution: {integrity: sha512-bCK/2Z4zLidyB4ReuIsvALH6w31YfAQDmXMqMx6FyfHqvBxtjC0eRumeSu4Bs3XtXwpyIywtSTrVT99BxY1f9w==} - - fast-deep-equal@3.1.3: - resolution: {integrity: sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==} - - fast-diff@1.3.0: - resolution: {integrity: sha512-VxPP4NqbUjj6MaAOafWeUn2cXWLcCtljklUtZf0Ind4XQ+QPtmA0b18zZy0jIQx+ExRVCR/ZQpBmik5lXshNsw==} - - fast-fifo@1.3.2: - resolution: {integrity: sha512-/d9sfos4yxzpwkDkuN7k2SqFKtYNmCTzgfEpz82x34IM9/zc8KGxQoXg1liNC/izpRM/MBdt44Nmx41ZWqk+FQ==} - - fast-glob@3.3.2: - resolution: {integrity: sha512-oX2ruAFQwf/Orj8m737Y5adxDQO0LAB7/S5MnxCdTNDd4p6BsyIVsv9JQsATbTSq8KHRpLwIHbVlUNatxd+1Ow==} - engines: {node: '>=8.6.0'} - - fast-glob@3.3.3: - resolution: {integrity: sha512-7MptL8U0cqcFdzIzwOTHoilX9x5BrNqye7Z/LuC7kCMRio1EMSyqRK3BEAUD7sXRq4iT4AzTVuZdhgQ2TCvYLg==} - engines: {node: '>=8.6.0'} - - fast-json-patch@3.1.1: - resolution: {integrity: sha512-vf6IHUX2SBcA+5/+4883dsIjpBTqmfBjmYiWK1savxQmFk4JfBMLa7ynTYOs1Rolp/T1betJxHiGD3g1Mn8lUQ==} - - fast-json-stable-stringify@2.1.0: - resolution: {integrity: sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==} - - fast-levenshtein@2.0.6: - resolution: {integrity: sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==} - - fast-uri@3.0.3: - resolution: {integrity: sha512-aLrHthzCjH5He4Z2H9YZ+v6Ujb9ocRuW6ZzkJQOrTxleEijANq4v1TsaPaVG1PZcuurEzrLcWRyYBYXD5cEiaw==} - - fast-xml-parser@4.4.1: - resolution: {integrity: sha512-xkjOecfnKGkSsOwtZ5Pz7Us/T6mrbPQrq0nh+aCO5V9nk5NLWmasAHumTKjiPJPWANe+kAZ84Jc8ooJkzZ88Sw==} - hasBin: true - - fastest-levenshtein@1.0.16: - resolution: {integrity: sha512-eRnCtTTtGZFpQCwhJiUOuxPQWRXVKYDn0b2PeHfXL6/Zi53SLAzAHfVhVWK2AryC/WH05kGfxhFIPvTF0SXQzg==} - engines: {node: '>= 4.9.1'} - - fastq@1.17.1: - resolution: {integrity: sha512-sRVD3lWVIXWg6By68ZN7vho9a1pQcN/WBFaAAsDDFzlJjvoGx0P8z7V1t72grFJfJhu3YPZBuu25f7Kaw2jN1w==} - - faye-websocket@0.11.4: - resolution: {integrity: sha512-CzbClwlXAuiRQAlUyfqPgvPoNKTckTPGfwZV4ZdAhVcP2lh9KUxJg2b5GkE7XbjKQ3YJnQ9z6D9ntLAlB+tP8g==} - engines: {node: '>=0.8.0'} - - fd-slicer@1.1.0: - resolution: {integrity: sha512-cE1qsB/VwyQozZ+q1dGxR8LBYNZeofhEdUNGSMbQD3Gw2lAzX9Zb3uIU6Ebc/Fmyjo9AWWfnn0AUCHqtevs/8g==} - - figures@6.1.0: - resolution: {integrity: sha512-d+l3qxjSesT4V7v2fh+QnmFnUWv9lSpjarhShNTgBOfA0ttejbQUAlHLitbjkoRiDulW0OPoQPYIGhIC8ohejg==} - engines: {node: '>=18'} - - file-entry-cache@6.0.1: - resolution: {integrity: sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==} - engines: {node: ^10.12.0 || >=12.0.0} - - file-uri-to-path@1.0.0: - resolution: {integrity: sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw==} - - fill-range@4.0.0: - resolution: {integrity: sha512-VcpLTWqWDiTerugjj8e3+esbg+skS3M9e54UuR3iCeIDMXCLTsAH8hTSzDQU/X6/6t3eYkOKoZSef2PlU6U1XQ==} - engines: {node: '>=0.10.0'} - - fill-range@7.1.1: - resolution: {integrity: sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==} - engines: {node: '>=8'} - - finalhandler@1.1.2: - resolution: {integrity: sha512-aAWcW57uxVNrQZqFXjITpW3sIUQmHGG3qSb9mUah9MgMC4NeWhNOlNjXEYq3HjRAvL6arUviZGGJsBg6z0zsWA==} - engines: {node: '>= 0.8'} - - finalhandler@1.3.1: - resolution: {integrity: sha512-6BN9trH7bp3qvnrRyzsBz+g3lZxTNZTbVO2EV1CS0WIcDbawYVdYvGflME/9QP0h0pYlCDBCTjYa9nZzMDpyxQ==} - engines: {node: '>= 0.8'} - - find-cache-dir@3.3.2: - resolution: {integrity: sha512-wXZV5emFEjrridIgED11OoUKLxiYjAcqot/NJdAkOhlJ+vGzwhOAfcG5OX1jP+S0PcjEn8bdMJv+g2jwQ3Onig==} - engines: {node: '>=8'} - - find-cache-dir@4.0.0: - resolution: {integrity: sha512-9ZonPT4ZAK4a+1pUPVPZJapbi7O5qbbJPdYw/NOQWZZbVLdDTYM3A4R9z/DpAM08IDaFGsvPgiGZ82WEwUDWjg==} - engines: {node: '>=14.16'} - - find-replace@3.0.0: - resolution: {integrity: sha512-6Tb2myMioCAgv5kfvP5/PkZZ/ntTpVK39fHY7WkWBgvbeE+VHd/tZuZ4mrC+bxh4cfOZeYKVPaJIZtZXV7GNCQ==} - engines: {node: '>=4.0.0'} - - find-up-simple@1.0.0: - resolution: {integrity: sha512-q7Us7kcjj2VMePAa02hDAF6d+MzsdsAWEwYyOpwUtlerRBkOEPBCRZrAV4XfcSN8fHAgaD0hP7miwoay6DCprw==} - engines: {node: '>=18'} - - find-up@2.1.0: - resolution: {integrity: sha512-NWzkk0jSJtTt08+FBFMvXoeZnOJD+jTtsRmBYbAIzJdX6l7dLgR7CTubCM5/eDdPUBvLCeVasP1brfVR/9/EZQ==} - engines: {node: '>=4'} - - find-up@3.0.0: - resolution: {integrity: sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==} - engines: {node: '>=6'} - - find-up@4.1.0: - resolution: {integrity: sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==} - engines: {node: '>=8'} - - find-up@5.0.0: - resolution: {integrity: sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==} - engines: {node: '>=10'} - - find-up@6.3.0: - resolution: {integrity: sha512-v2ZsoEuVHYy8ZIlYqwPe/39Cy+cFDzp4dXPaxNvkEuouymu+2Jbz0PxpKarJHYJTmv2HWT3O382qY8l4jMWthw==} - engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} - - flat-cache@3.2.0: - resolution: {integrity: sha512-CYcENa+FtcUKLmhhqyctpclsq7QF38pKjZHsGNiSQF5r4FtoKDWabFDl3hzaEQMvT1LHEysw5twgLvpYYb4vbw==} - engines: {node: ^10.12.0 || >=12.0.0} - - flat@5.0.2: - resolution: {integrity: sha512-b6suED+5/3rTpUBdG1gupIl8MPFCAMA0QXwmljLhvCUKcUvdE4gWky9zpuGCcXHOsz4J9wPGNWq6OKpmIzz3hQ==} - hasBin: true - - flatted@3.3.1: - resolution: {integrity: sha512-X8cqMLLie7KsNUDSdzeN8FYK9rEt4Dt67OsG/DNGnYTSDBG4uFAJFBnUeiV+zCVAvwFy56IjM9sH51jVaEhNxw==} - - follow-redirects@1.15.9: - resolution: {integrity: sha512-gew4GsXizNgdoRyqmyfMHyAmXsZDk6mHkSxZFCzW9gwlbtOW44CDtYavM+y+72qD/Vq2l550kMF52DT8fOLJqQ==} - engines: {node: '>=4.0'} - peerDependencies: - debug: '*' - peerDependenciesMeta: - debug: - optional: true - - for-each@0.3.3: - resolution: {integrity: sha512-jqYfLp7mo9vIyQf8ykW2v7A+2N4QjeCeI5+Dz9XraiO1ign81wjiH7Fb9vSOWvQfNtmSa4H2RoQTrrXivdUZmw==} - - for-in@1.0.2: - resolution: {integrity: sha512-7EwmXrOjyL+ChxMhmG5lnW9MPt1aIeZEwKhQzoBUdTV0N3zuwWDZYVJatDvZ2OyzPUvdIAZDsCetk3coyMfcnQ==} - engines: {node: '>=0.10.0'} - - foreground-child@2.0.0: - resolution: {integrity: sha512-dCIq9FpEcyQyXKCkyzmlPTFNgrCzPudOe+mhvJU5zAtlBnGVy2yKxtfsxK2tQBThwq225jcvBjpw1Gr40uzZCA==} - engines: {node: '>=8.0.0'} - - foreground-child@3.3.0: - resolution: {integrity: sha512-Ld2g8rrAyMYFXBhEqMz8ZAHBi4J4uS1i/CxGMDnjyFWddMXLVcDp051DZfu+t7+ab7Wv6SMqpWmyFIj5UbfFvg==} - engines: {node: '>=14'} - - forever-agent@0.6.1: - resolution: {integrity: sha512-j0KLYPhm6zeac4lz3oJ3o65qvgQCcPubiyotZrXqEaG4hNagNYO8qdlUrX5vwqv9ohqeT/Z3j6+yW067yWWdUw==} - - form-data-encoder@1.7.1: - resolution: {integrity: sha512-EFRDrsMm/kyqbTQocNvRXMLjc7Es2Vk+IQFx/YW7hkUH1eBl4J1fqiP34l74Yt0pFLCNpc06fkbVk00008mzjg==} - - form-data@2.3.3: - resolution: {integrity: sha512-1lLKB2Mu3aGP1Q/2eCOx0fNbRMe7XdwktwOruhfqqd0rIJWwN4Dh+E3hrPSlDCXnSR7UtZ1N38rVXm+6+MEhJQ==} - engines: {node: '>= 0.12'} - - form-data@2.5.3: - resolution: {integrity: sha512-XHIrMD0NpDrNM/Ckf7XJiBbLl57KEhT3+i3yY+eWm+cqYZJQTZrKo8Y8AWKnuV5GT4scfuUGt9LzNoIx3dU1nQ==} - engines: {node: '>= 0.12'} - - form-data@4.0.1: - resolution: {integrity: sha512-tzN8e4TX8+kkxGPK8D5u0FNmjPUjw3lwC9lSLxxoB/+GtsJG91CO8bSWy73APlgAZzZbXEYZJuxjkHH2w+Ezhw==} - engines: {node: '>= 6'} - - form-data@4.0.2: - resolution: {integrity: sha512-hGfm/slu0ZabnNt4oaRZ6uREyfCj6P4fT/n6A1rGV+Z0VdGXjfOhVUpkn6qVQONHGIFwmveGXyDs75+nr6FM8w==} - engines: {node: '>= 6'} - - forwarded@0.2.0: - resolution: {integrity: sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow==} - engines: {node: '>= 0.6'} - - fp-ts@1.19.3: - resolution: {integrity: sha512-H5KQDspykdHuztLTg+ajGN0Z2qUjcEf3Ybxc6hLt0k7/zPkn29XnKnxlBPyW2XIddWrGaJBzBl4VLYOtk39yZg==} - - fragment-cache@0.2.1: - resolution: {integrity: sha512-GMBAbW9antB8iZRHLoGw0b3HANt57diZYFO/HL1JGIC1MjKrdmhxvrJbupnVvpys0zsz7yBApXdQyfepKly2kA==} - engines: {node: '>=0.10.0'} - - fresh@0.5.2: - resolution: {integrity: sha512-zJ2mQYM18rEFOudeV4GShTGIQ7RbzA7ozbU9I/XBpm7kqgMywgmylMwXHxZJmkVoYkna9d2pVXVXPdYTP9ej8Q==} - engines: {node: '>= 0.6'} - - fromentries@1.3.2: - resolution: {integrity: sha512-cHEpEQHUg0f8XdtZCc2ZAhrHzKzT0MrFUTcvx+hfxYu7rGMDc5SKoXFh+n4YigxsHXRzc6OrCshdR1bWH6HHyg==} - - fs-extra@10.1.0: - resolution: {integrity: sha512-oRXApq54ETRj4eMiFzGnHWGy+zo5raudjuxN0b8H7s/RU2oW0Wvsx9O0ACRN/kRq9E8Vu/ReskGB5o3ji+FzHQ==} - engines: {node: '>=12'} - - fs-extra@11.2.0: - resolution: {integrity: sha512-PmDi3uwK5nFuXh7XDTlVnS17xJS7vW36is2+w3xcv8SVxiB4NyATf4ctkVY5bkSjX0Y4nbvZCq1/EjtEyr9ktw==} - engines: {node: '>=14.14'} - - fs-extra@4.0.3: - resolution: {integrity: sha512-q6rbdDd1o2mAnQreO7YADIxf/Whx4AHBiRf6d+/cVT8h44ss+lHgxf1FemcqDnQt9X3ct4McHr+JMGlYSsK7Cg==} - - fs-extra@7.0.1: - resolution: {integrity: sha512-YJDaCJZEnBmcbw13fvdAM9AwNOJwOzrE4pqMqBq5nFiEqXUqHwlK4B+3pUw6JNvfSPtX05xFHtYy/1ni01eGCw==} - engines: {node: '>=6 <7 || >=8'} - - fs-extra@8.1.0: - resolution: {integrity: sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g==} - engines: {node: '>=6 <7 || >=8'} - - fs-extra@9.1.0: - resolution: {integrity: sha512-hcg3ZmepS30/7BSFqRvoo3DOMQu7IjqxO5nCDt+zM9XWjb33Wg7ziNT+Qvqbuc3+gWpzO02JubVyk2G4Zvo1OQ==} - engines: {node: '>=10'} - - fs-minipass@1.2.7: - resolution: {integrity: sha512-GWSSJGFy4e9GUeCcbIkED+bgAoFyj7XF1mV8rma3QW4NIqX9Kyx79N/PF61H5udOV3aY1IaMLs6pGbH71nlCTA==} - - fs-minipass@2.1.0: - resolution: {integrity: sha512-V/JgOLFCS+R6Vcq0slCuaeWEdNC3ouDlJMNIsacH2VtALiu9mV4LPrHc5cDl8k5aw6J8jwgWWpiTo5RYhmIzvg==} - engines: {node: '>= 8'} - - fs-readdir-recursive@1.1.0: - resolution: {integrity: sha512-GNanXlVr2pf02+sPN40XN8HG+ePaNcvM0q5mZBd668Obwb0yD5GiUbZOFgwn8kGMY6I3mdyDJzieUy3PTYyTRA==} - - fs.realpath@1.0.0: - resolution: {integrity: sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==} - - fsevents@1.2.13: - resolution: {integrity: sha512-oWb1Z6mkHIskLzEJ/XWX0srkpkTQ7vaopMQkyaEIoq0fmtFVxOthb8cCxeT+p3ynTdkk/RZwbgG4brR5BeWECw==} - engines: {node: '>= 4.0'} - os: [darwin] - deprecated: Upgrade to fsevents v2 to mitigate potential security issues - - fsevents@2.3.3: - resolution: {integrity: sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==} - engines: {node: ^8.16.0 || ^10.6.0 || >=11.0.0} - os: [darwin] - - function-bind@1.1.2: - resolution: {integrity: sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==} - - function.prototype.name@1.1.6: - resolution: {integrity: sha512-Z5kx79swU5P27WEayXM1tBi5Ze/lbIyiNgU3qyXUOf9b2rgXYyF9Dy9Cx+IQv/Lc8WCG6L82zwUPpSS9hGehIg==} - engines: {node: '>= 0.4'} - - functions-have-names@1.2.3: - resolution: {integrity: sha512-xckBUXyTIqT97tq2x2AMb+g163b5JFysYk0x4qxNFwbfQkmNZoiRHb6sPzI9/QV33WeuvVYBUIiD4NzNIyqaRQ==} - - ganache@7.9.2: - resolution: {integrity: sha512-7gsVVDpO9AhrFyDMWWl7SpMsPpqGcnAzjxz3k32LheIPNd64p2XsY9GYRdhWmKuryb60W1iaWPZWDkFKlbRWHA==} - hasBin: true - bundledDependencies: - - '@trufflesuite/bigint-buffer' - - keccak - - leveldown - - secp256k1 - - gauge@3.0.2: - resolution: {integrity: sha512-+5J6MS/5XksCuXq++uFRsnUd7Ovu1XenbeuIuNRJxYWjgQbPuFhT14lAvsWfqfAmnwluf1OwMjz39HjfLPci0Q==} - engines: {node: '>=10'} - deprecated: This package is no longer supported. - - gensync@1.0.0-beta.2: - resolution: {integrity: sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==} - engines: {node: '>=6.9.0'} - - get-caller-file@2.0.5: - resolution: {integrity: sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==} - engines: {node: 6.* || 8.* || >= 10.*} - - get-east-asian-width@1.3.0: - resolution: {integrity: sha512-vpeMIQKxczTD/0s2CdEWHcb0eeJe6TFjxb+J5xgX7hScxqrGuyjmv4c1D4A/gelKfyox0gJJwIHF+fLjeaM8kQ==} - engines: {node: '>=18'} - - get-func-name@2.0.2: - resolution: {integrity: sha512-8vXOvuE167CtIc3OyItco7N/dpRtBbYOsPsXCz7X/PMnlGjYjSGuZJgM1Y7mmew7BKf9BqvLX2tnOVy1BBUsxQ==} - - get-intrinsic@1.2.4: - resolution: {integrity: sha512-5uYhsJH8VJBTv7oslg4BznJYhDoRI6waYCxMmCdnTrcCrHA/fCFKoTFz2JKKE0HdDFUF7/oQuhzumXJK7paBRQ==} - engines: {node: '>= 0.4'} - - get-intrinsic@1.3.0: - resolution: {integrity: sha512-9fSjSaos/fRIVIp+xSJlE6lfwhES7LNtKaCBIamHsjr2na1BiABJPo0mOjjz8GJDURarmCPGqaiVg5mfjb98CQ==} - engines: {node: '>= 0.4'} - - get-package-type@0.1.0: - resolution: {integrity: sha512-pjzuKtY64GYfWizNAJ0fr9VqttZkNiK2iS430LtIHzjBEr6bX8Am2zm4sW4Ro5wjWW5cAlRL1qAMTcXbjNAO2Q==} - engines: {node: '>=8.0.0'} - - get-port@3.2.0: - resolution: {integrity: sha512-x5UJKlgeUiNT8nyo/AcnwLnZuZNcSjSw0kogRB+Whd1fjjFq4B1hySFxSFWWSn4mIBzg3sRNUDFYc4g5gjPoLg==} - engines: {node: '>=4'} - - get-proto@1.0.1: - resolution: {integrity: sha512-sTSfBjoXBp89JvIKIefqw7U2CCebsc74kiY6awiGogKtoSGbgjYE/G/+l9sF3MWFPNc9IcoOC4ODfKHfxFmp0g==} - engines: {node: '>= 0.4'} - - get-stream@4.1.0: - resolution: {integrity: sha512-GMat4EJ5161kIy2HevLlr4luNjBgvmj413KaQA7jt4V8B4RDsfpHk7WQ9GVqfYyyx8OS/L66Kox+rJRNklLK7w==} - engines: {node: '>=6'} - - get-stream@5.2.0: - resolution: {integrity: sha512-nBF+F1rAZVCu/p7rjzgA+Yb4lfYXrpl7a6VmJrU8wF9I1CKvP/QwPNZHnOlwbTkY6dvtFIzFMSyQXbLoTQPRpA==} - engines: {node: '>=8'} - - get-stream@6.0.1: - resolution: {integrity: sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==} - engines: {node: '>=10'} - - get-symbol-description@1.0.2: - resolution: {integrity: sha512-g0QYk1dZBxGwk+Ngc+ltRH2IBp2f7zBkBMBJZCDerh6EhlhSR6+9irMCuT/09zD6qkarHUSn529sK/yL4S27mg==} - engines: {node: '>= 0.4'} - - get-tsconfig@4.8.1: - resolution: {integrity: sha512-k9PN+cFBmaLWtVz29SkUoqU5O0slLuHJXt/2P+tMVFT+phsSGXGkp9t3rQIqdz0e+06EHNGs3oM6ZX1s2zHxRg==} - - get-uri@6.0.3: - resolution: {integrity: sha512-BzUrJBS9EcUb4cFol8r4W3v1cPsSyajLSthNkz5BxbpDcHN5tIrM10E2eNvfnvBn3DaT3DUgx0OpsBKkaOpanw==} - engines: {node: '>= 14'} - - get-value@2.0.6: - resolution: {integrity: sha512-Ln0UQDlxH1BapMu3GPtf7CuYNwRZf2gwCuPqbyG6pB8WfmFpzqcy4xtAaAMUhnNqjMKTiCPZG2oMT3YSx8U2NA==} - engines: {node: '>=0.10.0'} - - getpass@0.1.7: - resolution: {integrity: sha512-0fzj9JxOLfJ+XGLhR8ze3unN0KZCgZwiSSDz168VERjK8Wl8kVSdcu2kspd4s4wtAa1y/qrVRiAA0WclVsu0ng==} - - ghost-testrpc@0.0.2: - resolution: {integrity: sha512-i08dAEgJ2g8z5buJIrCTduwPIhih3DP+hOCTyyryikfV8T0bNvHnGXO67i0DD1H4GBDETTclPy9njZbfluQYrQ==} - hasBin: true - - glob-base@0.3.0: - resolution: {integrity: sha512-ab1S1g1EbO7YzauaJLkgLp7DZVAqj9M/dvKlTt8DkXA2tiOIcSMrlVI2J1RZyB5iJVccEscjGn+kpOG9788MHA==} - engines: {node: '>=0.10.0'} - - glob-parent@5.1.2: - resolution: {integrity: sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==} - engines: {node: '>= 6'} - - glob-parent@6.0.2: - resolution: {integrity: sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==} - engines: {node: '>=10.13.0'} - - glob-to-regexp@0.4.1: - resolution: {integrity: sha512-lkX1HJXwyMcprw/5YUZc2s7DrpAiHB21/V+E1rHUrVNokkvB6bqMzT0VfV6/86ZNabt1k14YOIaT7nDvOX3Iiw==} - - glob@11.0.0: - resolution: {integrity: sha512-9UiX/Bl6J2yaBbxKoEBRm4Cipxgok8kQYcOPEhScPwebu2I0HoQOuYdIO6S3hLuWoZgpDpwQZMzTFxgpkyT76g==} - engines: {node: 20 || >=22} - hasBin: true - - glob@5.0.15: - resolution: {integrity: sha512-c9IPMazfRITpmAAKi22dK1VKxGDX9ehhqfABDriL/lzO92xcUKEJPQHrVA/2YHSNFB4iFlykVmWvwo48nr3OxA==} - deprecated: Glob versions prior to v9 are no longer supported - - glob@7.1.7: - resolution: {integrity: sha512-OvD9ENzPLbegENnYP5UUfJIirTg4+XwMWGaQfQTY0JenxNvvIKP3U3/tAQSPIu/lHxXYSZmpXlUHeqAIdKzBLQ==} - deprecated: Glob versions prior to v9 are no longer supported - - glob@7.2.0: - resolution: {integrity: sha512-lmLf6gtyrPq8tTjSmrO94wBeQbFR3HbLHbuyD69wuyQkImp2hWqMGB47OX65FBkPffO641IP9jWa1z4ivqG26Q==} - deprecated: Glob versions prior to v9 are no longer supported - - glob@7.2.3: - resolution: {integrity: sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==} - deprecated: Glob versions prior to v9 are no longer supported - - glob@8.1.0: - resolution: {integrity: sha512-r8hpEjiQEYlF2QU0df3dS+nxxSIreXQS1qRhMJM0Q5NDdR386C7jb7Hwwod8Fgiuex+k0GFjgft18yvxm5XoCQ==} - engines: {node: '>=12'} - deprecated: Glob versions prior to v9 are no longer supported - - global-modules@2.0.0: - resolution: {integrity: sha512-NGbfmJBp9x8IxyJSd1P+otYK8vonoJactOogrVfFRIAEY1ukil8RSKDz2Yo7wh1oihl51l/r6W4epkeKJHqL8A==} - engines: {node: '>=6'} - - global-prefix@3.0.0: - resolution: {integrity: sha512-awConJSVCHVGND6x3tmMaKcQvwXLhjdkmomy2W+Goaui8YPgYgXJZewhg3fWC+DlfqqQuWg8AwqjGTD2nAPVWg==} - engines: {node: '>=6'} - - global@4.4.0: - resolution: {integrity: sha512-wv/LAoHdRE3BeTGz53FAamhGlPLhlssK45usmGFThIi4XqnBmjKQ16u+RNbP7WvigRZDxUsM0J3gcQ5yicaL0w==} - - globals@11.12.0: - resolution: {integrity: sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==} - engines: {node: '>=4'} - - globals@13.24.0: - resolution: {integrity: sha512-AhO5QUcj8llrbG09iWhPU2B204J1xnPeL8kQmVorSsy+Sjj1sk8gIyh6cUocGmH4L0UuhAJy+hJMRA4mgA4mFQ==} - engines: {node: '>=8'} - - globalthis@1.0.4: - resolution: {integrity: sha512-DpLKbNU4WylpxJykQujfCcwYWiV/Jhm50Goo0wrVILAv5jOr9d+H+UR3PhSCD2rCCEIg0uc+G+muBTwD54JhDQ==} - engines: {node: '>= 0.4'} - - globby@10.0.2: - resolution: {integrity: sha512-7dUi7RvCoT/xast/o/dLN53oqND4yk0nsHkhRgn9w65C4PofCLOoJ39iSOg+qVDdWQPIEj+eszMHQ+aLVwwQSg==} - engines: {node: '>=8'} - - globby@11.1.0: - resolution: {integrity: sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==} - engines: {node: '>=10'} - - globby@14.0.2: - resolution: {integrity: sha512-s3Fq41ZVh7vbbe2PN3nrW7yC7U7MFVc5c98/iTl9c2GawNMKx/J648KQRW6WKkuU8GIbbh2IXfIRQjOZnXcTnw==} - engines: {node: '>=18'} - - globby@6.1.0: - resolution: {integrity: sha512-KVbFv2TQtbzCoxAnfD6JcHZTYCzyliEaaeM/gH8qQdkKr5s0OP9scEgvdcngyk7AVdY6YVW/TJHd+lQ/Df3Daw==} - engines: {node: '>=0.10.0'} - - gopd@1.0.1: - resolution: {integrity: sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==} - - gopd@1.2.0: - resolution: {integrity: sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg==} - engines: {node: '>= 0.4'} - - got@11.8.6: - resolution: {integrity: sha512-6tfZ91bOr7bOXnK7PRDCGBLa1H4U080YHNaAQ2KsMGlLEzRbk44nsZF2E1IeRc3vtJHPVbKCYgdFbaGO2ljd8g==} - engines: {node: '>=10.19.0'} - - got@12.1.0: - resolution: {integrity: sha512-hBv2ty9QN2RdbJJMK3hesmSkFTjVIHyIDDbssCKnSmq62edGgImJWD10Eb1k77TiV1bxloxqcFAVK8+9pkhOig==} - engines: {node: '>=14.16'} - - graceful-fs@4.2.11: - resolution: {integrity: sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==} - - graphemer@1.4.0: - resolution: {integrity: sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==} - - graphql-http@1.22.1: - resolution: {integrity: sha512-4Jor+LRbA7SfSaw7dfDUs2UBzvWg3cKrykfHRgKsOIvQaLuf+QOcG2t3Mx5N9GzSNJcuqMqJWz0ta5+BryEmXg==} - engines: {node: '>=12'} - peerDependencies: - graphql: '>=0.11 <=16' - - graphql-subscriptions@1.2.1: - resolution: {integrity: sha512-95yD/tKi24q8xYa7Q9rhQN16AYj5wPbrb8tmHGM3WRc9EBmWrG/0kkMl+tQG8wcEuE9ibR4zyOM31p5Sdr2v4g==} - peerDependencies: - graphql: ^0.10.5 || ^0.11.3 || ^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0 - - graphql-tag@2.12.6: - resolution: {integrity: sha512-FdSNcu2QQcWnM2VNvSCCDCVS5PpPqpzgFT8+GXzqJuoDd0CBncxCY278u4mhRO7tMgo2JjgJA5aZ+nWSQ/Z+xg==} - engines: {node: '>=10'} - peerDependencies: - graphql: ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0 || ^16.0.0 - - graphql@15.9.0: - resolution: {integrity: sha512-GCOQdvm7XxV1S4U4CGrsdlEN37245eC8P9zaYCMr6K1BG0IPGy5lUwmJsEOGyl1GD6HXjOtl2keCP9asRBwNvA==} - engines: {node: '>= 10.x'} - - handle-thing@2.0.1: - resolution: {integrity: sha512-9Qn4yBxelxoh2Ow62nP+Ka/kMnOXRi8BXnRaUwezLNhqelnN49xKz4F/dPP8OYLxLxq6JDtZb2i9XznUQbNPTg==} - - handlebars@4.7.8: - resolution: {integrity: sha512-vafaFqs8MZkRrSX7sFVUdo3ap/eNiLnb4IakshzvP56X5Nr1iGKAIqdX6tMlm6HcNRIkr6AxO5jFEoJzzpT8aQ==} - engines: {node: '>=0.4.7'} - hasBin: true - - har-schema@2.0.0: - resolution: {integrity: sha512-Oqluz6zhGX8cyRaTQlFMPw80bSJVG2x/cFb8ZPhUILGgHka9SsokCCOQgpveePerqidZOrT14ipqfJb7ILcW5Q==} - engines: {node: '>=4'} - - har-validator@5.1.5: - resolution: {integrity: sha512-nmT2T0lljbxdQZfspsno9hgrG3Uir6Ks5afism62poxqBM6sDnMEuPmzTq8XN0OEwqKLLdh1jQI3qyE66Nzb3w==} - engines: {node: '>=6'} - deprecated: this library is no longer supported - - hardhat-gas-reporter@1.0.10: - resolution: {integrity: sha512-02N4+So/fZrzJ88ci54GqwVA3Zrf0C9duuTyGt0CFRIh/CdNwbnTgkXkRfojOMLBQ+6t+lBIkgbsOtqMvNwikA==} - peerDependencies: - hardhat: ^2.0.2 - - hardhat@2.22.14: - resolution: {integrity: sha512-sD8vHtS9l5QQVHzyPPe3auwZDJyZ0fG3Z9YENVa4oOqVEefCuHcPzdU736rei3zUKTqkX0zPIHkSMHpu02Fq1A==} - hasBin: true - peerDependencies: - ts-node: '*' - typescript: '*' - peerDependenciesMeta: - ts-node: - optional: true - typescript: - optional: true - - has-bigints@1.0.2: - resolution: {integrity: sha512-tSvCKtBr9lkF0Ex0aQiP9N+OpV4zi2r/Nee5VkRDbaqv35RLYMzbwQfFSZZH0kR+Rd6302UJZ2p/bJCEoR3VoQ==} - - has-flag@1.0.0: - resolution: {integrity: sha512-DyYHfIYwAJmjAjSSPKANxI8bFY9YtFrgkAfinBojQ8YJTOuOuav64tMUJv584SES4xl74PmuaevIyaLESHdTAA==} - engines: {node: '>=0.10.0'} - - has-flag@3.0.0: - resolution: {integrity: sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==} - engines: {node: '>=4'} - - has-flag@4.0.0: - resolution: {integrity: sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==} - engines: {node: '>=8'} - - has-property-descriptors@1.0.2: - resolution: {integrity: sha512-55JNKuIW+vq4Ke1BjOTjM2YctQIvCT7GFzHwmfZPGo5wnrgkid0YQtnAleFSqumZm4az3n2BS+erby5ipJdgrg==} - - has-proto@1.0.3: - resolution: {integrity: sha512-SJ1amZAJUiZS+PhsVLf5tGydlaVB8EdFpaSO4gmiUKUOxk8qzn5AIy4ZeJUmh22znIdk/uMAUT2pl3FxzVUH+Q==} - engines: {node: '>= 0.4'} - - has-symbols@1.0.3: - resolution: {integrity: sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==} - engines: {node: '>= 0.4'} - - has-symbols@1.1.0: - resolution: {integrity: sha512-1cDNdwJ2Jaohmb3sg4OmKaMBwuC48sYni5HUw2DvsC8LjGTLK9h+eb1X6RyuOHe4hT0ULCW68iomhjUoKUqlPQ==} - engines: {node: '>= 0.4'} - - has-tostringtag@1.0.2: - resolution: {integrity: sha512-NqADB8VjPFLM2V0VvHUewwwsw0ZWBaIdgo+ieHtK3hasLz4qeCRjYcqfB6AQrBggRKppKF8L52/VqdVsO47Dlw==} - engines: {node: '>= 0.4'} - - has-unicode@2.0.1: - resolution: {integrity: sha512-8Rf9Y83NBReMnx0gFzA8JImQACstCYWUplepDa9xprwwtmgEZUF0h/i5xSA625zB/I37EtrswSST6OXxwaaIJQ==} - - has-value@0.3.1: - resolution: {integrity: sha512-gpG936j8/MzaeID5Yif+577c17TxaDmhuyVgSwtnL/q8UUTySg8Mecb+8Cf1otgLoD7DDH75axp86ER7LFsf3Q==} - engines: {node: '>=0.10.0'} - - has-value@1.0.0: - resolution: {integrity: sha512-IBXk4GTsLYdQ7Rvt+GRBrFSVEkmuOUy4re0Xjd9kJSUQpnTrWR4/y9RpfexN9vkAPMFuQoeWKwqzPozRTlasGw==} - engines: {node: '>=0.10.0'} - - has-values@0.1.4: - resolution: {integrity: sha512-J8S0cEdWuQbqD9//tlZxiMuMNmxB8PlEwvYwuxsTmR1G5RXUePEX/SJn7aD0GMLieuZYSwNH0cQuJGwnYunXRQ==} - engines: {node: '>=0.10.0'} - - has-values@1.0.0: - resolution: {integrity: sha512-ODYZC64uqzmtfGMEAX/FvZiRyWLpAC3vYnNunURUnkGVTS+mI0smVsWaPydRBsE3g+ok7h960jChO8mFcWlHaQ==} - engines: {node: '>=0.10.0'} - - hash-base@3.1.0: - resolution: {integrity: sha512-1nmYp/rhMDiE7AYkDw+lLwlAzz0AntGIe51F3RfFfEqyQ3feY2eI/NcwC6umIQVOASPMsWJLJScWKSSvzL9IVA==} - engines: {node: '>=4'} - - hash.js@1.1.7: - resolution: {integrity: sha512-taOaskGt4z4SOANNseOviYDvjEJinIkRgmp7LbKP2YTTmVxWBl87s/uzK9r+44BclBSp2X7K1hqeNfz9JbBeXA==} - - hasha@5.2.2: - resolution: {integrity: sha512-Hrp5vIK/xr5SkeN2onO32H0MgNZ0f17HRNH39WfL0SYUNOTZ5Lz1TJ8Pajo/87dYGEFlLMm7mIc/k/s6Bvz9HQ==} - engines: {node: '>=8'} - - hasown@2.0.2: - resolution: {integrity: sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==} - engines: {node: '>= 0.4'} - - he@1.2.0: - resolution: {integrity: sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==} - hasBin: true - - heap@0.2.7: - resolution: {integrity: sha512-2bsegYkkHO+h/9MGbn6KWcE45cHZgPANo5LXF7EvWdT0yT2EguSVO1nDgU5c8+ZOPwp2vMNa7YFsJhVcDR9Sdg==} - - hmac-drbg@1.0.1: - resolution: {integrity: sha512-Tti3gMqLdZfhOQY1Mzf/AanLiqh1WTiJgEj26ZuYQ9fbkLomzGchCws4FyrSd4VkpBfiNhaE1On+lOz894jvXg==} - - hpack.js@2.1.6: - resolution: {integrity: sha512-zJxVehUdMGIKsRaNt7apO2Gqp0BdqW5yaiGHXXmbpvxgBYVZnAql+BJb4RO5ad2MgpbZKn5G6nMnegrH1FcNYQ==} - - html-entities@1.4.0: - resolution: {integrity: sha512-8nxjcBcd8wovbeKx7h3wTji4e6+rhaVuPNpMqwWgnHh+N9ToqsCs6XztWRBPQ+UtzsoMAdKZtUENoVzU/EMtZA==} - - html-escaper@2.0.2: - resolution: {integrity: sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg==} - - html-minifier-terser@6.1.0: - resolution: {integrity: sha512-YXxSlJBZTP7RS3tWnQw74ooKa6L9b9i9QYXY21eUEvhZ3u9XLfv6OnFsQq6RxkhHygsaUMvYsZRV5rU/OVNZxw==} - engines: {node: '>=12'} - hasBin: true - - html-webpack-plugin@5.6.3: - resolution: {integrity: sha512-QSf1yjtSAsmf7rYBV7XX86uua4W/vkhIt0xNXKbsi2foEeW7vjJQz4bhnpL3xH+l1ryl1680uNv968Z+X6jSYg==} - engines: {node: '>=10.13.0'} - peerDependencies: - '@rspack/core': 0.x || 1.x - webpack: ^5.20.0 - peerDependenciesMeta: - '@rspack/core': - optional: true - webpack: - optional: true - - htmlparser2@6.1.0: - resolution: {integrity: sha512-gyyPk6rgonLFEDGoeRgQNaEUvdJ4ktTmmUh/h2t7s+M8oPpIPxgNACWa+6ESR57kXstwqPiCut0V8NRpcwgU7A==} - - http-basic@8.1.3: - resolution: {integrity: sha512-/EcDMwJZh3mABI2NhGfHOGOeOZITqfkEO4p/xK+l3NpyncIHUQBoMvCSF/b5GqvKtySC2srL/GGG3+EtlqlmCw==} - engines: {node: '>=6.0.0'} - - http-cache-semantics@4.1.1: - resolution: {integrity: sha512-er295DKPVsV82j5kw1Gjt+ADA/XYHsajl82cGNQG2eyoPkvgUhX+nDIyelzhIWbbsXP39EHcI6l5tYs2FYqYXQ==} - - http-deceiver@1.2.7: - resolution: {integrity: sha512-LmpOGxTfbpgtGVxJrj5k7asXHCgNZp5nLfp+hWc8QQRqtb7fUy6kRY3BO1h9ddF6yIPYUARgxGOwB42DnxIaNw==} - - http-encoding@2.0.1: - resolution: {integrity: sha512-vqe8NzlqqvDgcrwI2JTPAiB/6Zs1zTEVZNnTZBJeBhaejLGSpXQtNf87ifumq/P4X82G9E4WWfJMNmwb6vsuGw==} - engines: {node: '>=v18.0.0'} - - http-errors@1.6.3: - resolution: {integrity: sha512-lks+lVC8dgGyh97jxvxeYTWQFvh4uw4yC12gVl63Cg30sjPX4wuGcdkICVXDAESr6OJGjqGA8Iz5mkeN6zlD7A==} - engines: {node: '>= 0.6'} - - http-errors@2.0.0: - resolution: {integrity: sha512-FtwrG/euBzaEjYeRqOgly7G0qviiXoJWnvEH2Z1plBdXgbyjv34pHTSb9zoeHMyDy33+DWy5Wt9Wo+TURtOYSQ==} - engines: {node: '>= 0.8'} - - http-https@1.0.0: - resolution: {integrity: sha512-o0PWwVCSp3O0wS6FvNr6xfBCHgt0m1tvPLFOCc2iFDKTRAXhB7m8klDf7ErowFH8POa6dVdGatKU5I1YYwzUyg==} - - http-parser-js@0.5.8: - resolution: {integrity: sha512-SGeBX54F94Wgu5RH3X5jsDtf4eHyRogWX1XGT3b4HuW3tQPM4AaBzoUji/4AAJNXCEOWZ5O0DgZmJw1947gD5Q==} - - http-proxy-agent@7.0.2: - resolution: {integrity: sha512-T1gkAiYYDWYx3V5Bmyu7HcfcvL7mUrTWiM6yOfa3PIphViJ/gFPbvidQ+veqSOHci/PxBcDabeUNCzpOODJZig==} - engines: {node: '>= 14'} - - http-proxy-middleware@0.19.1: - resolution: {integrity: sha512-yHYTgWMQO8VvwNS22eLLloAkvungsKdKTLO8AJlftYIKNfJr3GK3zK0ZCfzDDGUBttdGc8xFy1mCitvNKQtC3Q==} - engines: {node: '>=4.0.0'} - - http-proxy@1.18.1: - resolution: {integrity: sha512-7mz/721AbnJwIVbnaSv1Cz3Am0ZLT/UBwkC92VlxhXv/k/BBQfM2fXElQNC27BVGr0uwUpplYPQM9LnaBMR5NQ==} - engines: {node: '>=8.0.0'} - - http-response-object@3.0.2: - resolution: {integrity: sha512-bqX0XTF6fnXSQcEJ2Iuyr75yVakyjIDCqroJQ/aHfSdlM743Cwqoi2nDYMzLGWUcuTWGWy8AAvOKXTfiv6q9RA==} - - http-signature@1.2.0: - resolution: {integrity: sha512-CAbnr6Rz4CYQkLYUtSNXxQPUH2gK8f3iWexVlsnMeD+GjlsQ0Xsy1cOX+mN3dtxYomRy21CiOzU8Uhw6OwncEQ==} - engines: {node: '>=0.8', npm: '>=1.3.7'} - - http2-wrapper@1.0.3: - resolution: {integrity: sha512-V+23sDMr12Wnz7iTcDeJr3O6AIxlnvT/bmaAAAP/Xda35C90p9599p0F1eHR/N1KILWSoWVAiOMFjBBXaXSMxg==} - engines: {node: '>=10.19.0'} - - http2-wrapper@2.2.1: - resolution: {integrity: sha512-V5nVw1PAOgfI3Lmeaj2Exmeg7fenjhRUgz1lPSezy1CuhPYbgQtbQj4jZfEAEMlaL+vupsvhjqCyjzob0yxsmQ==} - engines: {node: '>=10.19.0'} - - https-proxy-agent@5.0.1: - resolution: {integrity: sha512-dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA==} - engines: {node: '>= 6'} - - https-proxy-agent@7.0.5: - resolution: {integrity: sha512-1e4Wqeblerz+tMKPIq2EMGiiWW1dIjZOksyHWSUm1rmuvw/how9hBHZ38lAGj5ID4Ik6EdkOw7NmWPy6LAwalw==} - engines: {node: '>= 14'} - - https-proxy-agent@7.0.6: - resolution: {integrity: sha512-vK9P5/iUfdl95AI+JVyUuIcVtd4ofvtrOr3HNtM2yxC9bnMbEdp3x01OhQNnjb8IJYi38VlTE3mBXwcfvywuSw==} - engines: {node: '>= 14'} - - human-id@1.0.2: - resolution: {integrity: sha512-UNopramDEhHJD+VR+ehk8rOslwSfByxPIZyJRfV739NDhN5LF1fa1MqnzKm2lGTQRjNrjK19Q5fhkgIfjlVUKw==} - - husky@8.0.3: - resolution: {integrity: sha512-+dQSyqPh4x1hlO1swXBiNb2HzTDN1I2IGLQx1GrBuiqFJfoMrnZWwVmatvSiO+Iz8fBUnf+lekwNo4c2LlXItg==} - engines: {node: '>=14'} - hasBin: true - - iconv-lite@0.4.24: - resolution: {integrity: sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==} - engines: {node: '>=0.10.0'} - - idb@7.1.1: - resolution: {integrity: sha512-gchesWBzyvGHRO9W8tzUWFDycow5gwjvFKfyV9FF32Y7F50yZMp7mP+T2mJIWFx49zicqyC4uefHM17o6xKIVQ==} - - idna-uts46-hx@2.3.1: - resolution: {integrity: sha512-PWoF9Keq6laYdIRwwCdhTPl60xRqAloYNMQLiyUnG42VjT53oW07BXIRM+NK7eQjzXjAk2gUvX9caRxlnF9TAA==} - engines: {node: '>=4.0.0'} - - ieee754@1.2.1: - resolution: {integrity: sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==} - - ignore-by-default@2.1.0: - resolution: {integrity: sha512-yiWd4GVmJp0Q6ghmM2B/V3oZGRmjrKLXvHR3TE1nfoXsmoggllfZUQe74EN0fJdPFZu2NIvNdrMMLm3OsV7Ohw==} - engines: {node: '>=10 <11 || >=12 <13 || >=14'} - - ignore-walk@3.0.4: - resolution: {integrity: sha512-PY6Ii8o1jMRA1z4F2hRkH/xN59ox43DavKvD3oDpfurRlOJyAHpifIwpbdv1n4jt4ov0jSpw3kQ4GhJnpBL6WQ==} - - ignore@5.3.2: - resolution: {integrity: sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g==} - engines: {node: '>= 4'} - - immer@10.0.2: - resolution: {integrity: sha512-Rx3CqeqQ19sxUtYV9CU911Vhy8/721wRFnJv3REVGWUmoAcIwzifTsdmJte/MV+0/XpM35LZdQMBGkRIoLPwQA==} - - immutable@4.3.7: - resolution: {integrity: sha512-1hqclzwYwjRDFLjcFxOM5AYkkG0rpFPpr1RLPMEuGczoS7YA8gLhy8SWXYRAA/XwfEHpfo3cw5JGioS32fnMRw==} - - import-fresh@3.3.0: - resolution: {integrity: sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==} - engines: {node: '>=6'} - - import-local@2.0.0: - resolution: {integrity: sha512-b6s04m3O+s3CGSbqDIyP4R6aAwAeYlVq9+WUWep6iHa8ETRf9yei1U48C5MmfJmV9AiLYYBKPMq/W+/WRpQmCQ==} - engines: {node: '>=6'} - hasBin: true - - import-local@3.2.0: - resolution: {integrity: sha512-2SPlun1JUPWoM6t3F0dw0FkCF/jWY8kttcY4f599GLTSjh2OCuuhdTkJQsEcZzBqbXZGKMK2OqW1oZsjtf/gQA==} - engines: {node: '>=8'} - hasBin: true - - imurmurhash@0.1.4: - resolution: {integrity: sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==} - engines: {node: '>=0.8.19'} - - indent-string@4.0.0: - resolution: {integrity: sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg==} - engines: {node: '>=8'} - - indent-string@5.0.0: - resolution: {integrity: sha512-m6FAo/spmsW2Ab2fU35JTYwtOKa2yAwXSwgjSv1TJzh4Mh7mC3lzAOVLBprb72XsTrgkEIsl7YrFNAiDiRhIGg==} - engines: {node: '>=12'} - - inflight@1.0.6: - resolution: {integrity: sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==} - deprecated: This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful. - - inherits@2.0.3: - resolution: {integrity: sha512-x00IRNXNy63jwGkJmzPigoySHbaqpNuzKbBOmzK+g2OdZpQ9w+sxCN+VSB3ja7IAge2OP2qpfxTjeNcyjmW1uw==} - - inherits@2.0.4: - resolution: {integrity: sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==} - - ini@1.3.8: - resolution: {integrity: sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==} - - internal-ip@4.3.0: - resolution: {integrity: sha512-S1zBo1D6zcsyuC6PMmY5+55YMILQ9av8lotMx447Bq6SAgo/sDK6y6uUKmuYhW7eacnIhFfsPmCNYdDzsnnDCg==} - engines: {node: '>=6'} - - internal-slot@1.0.7: - resolution: {integrity: sha512-NGnrKwXzSms2qUUih/ILZ5JBqNTSa1+ZmP6flaIp6KmSElgE9qdndzS3cqjrDovwFdmwsGsLdeFgB6suw+1e9g==} - engines: {node: '>= 0.4'} - - interpret@1.4.0: - resolution: {integrity: sha512-agE4QfB2Lkp9uICn7BAqoscw4SZP9kTE2hxiFI3jBPmXJfdqiahTbUuKGsMoN2GtqL9AxhYioAcVvgsb1HvRbA==} - engines: {node: '>= 0.10'} - - interpret@2.2.0: - resolution: {integrity: sha512-Ju0Bz/cEia55xDwUWEa8+olFpCiQoypjnQySseKtmjNrnps3P+xfpUmGr90T7yjlVJmOtybRvPXhKMbHr+fWnw==} - engines: {node: '>= 0.10'} - - io-ts@1.10.4: - resolution: {integrity: sha512-b23PteSnYXSONJ6JQXRAlvJhuw8KOtkqa87W4wDtvMrud/DTJd5X+NpOOI+O/zZwVq6v0VLAaJ+1EDViKEuN9g==} - - ip-address@9.0.5: - resolution: {integrity: sha512-zHtQzGojZXTwZTHQqra+ETKd4Sn3vgi7uBmlPoXVWZqYvuKmtI0l/VZTjqGmJY9x88GGOaZ9+G9ES8hC4T4X8g==} - engines: {node: '>= 12'} - - ip-regex@2.1.0: - resolution: {integrity: sha512-58yWmlHpp7VYfcdTwMTvwMmqx/Elfxjd9RXTDyMsbL7lLWmhMylLEqiYVLKuLzOZqVgiWXD9MfR62Vv89VRxkw==} - engines: {node: '>=4'} - - ip@1.1.9: - resolution: {integrity: sha512-cyRxvOEpNHNtchU3Ln9KC/auJgup87llfQpQ+t5ghoC/UhL16SWzbueiCsdTnWmqAWl7LadfuwhlqmtOaqMHdQ==} - - ipaddr.js@1.9.1: - resolution: {integrity: sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g==} - engines: {node: '>= 0.10'} - - irregular-plurals@3.5.0: - resolution: {integrity: sha512-1ANGLZ+Nkv1ptFb2pa8oG8Lem4krflKuX/gINiHJHjJUKaJHk/SXk5x6K3J+39/p0h1RQ2saROclJJ+QLvETCQ==} - engines: {node: '>=8'} - - is-absolute-url@3.0.3: - resolution: {integrity: sha512-opmNIX7uFnS96NtPmhWQgQx6/NYFgsUXYMllcfzwWKUMwfo8kku1TvE6hkNcH+Q1ts5cMVrsY7j0bxXQDciu9Q==} - engines: {node: '>=8'} - - is-accessor-descriptor@1.0.1: - resolution: {integrity: sha512-YBUanLI8Yoihw923YeFUS5fs0fF2f5TSFTNiYAAzhhDscDa3lEqYuz1pDOEP5KvX94I9ey3vsqjJcLVFVU+3QA==} - engines: {node: '>= 0.10'} - - is-arguments@1.1.1: - resolution: {integrity: sha512-8Q7EARjzEnKpt/PCD7e1cgUS0a6X8u5tdSiMqXhojOdoV9TsMsiO+9VLC5vAmO8N7/GmXn7yjR8qnA6bVAEzfA==} - engines: {node: '>= 0.4'} - - is-array-buffer@3.0.4: - resolution: {integrity: sha512-wcjaerHw0ydZwfhiKbXJWLDY8A7yV7KhjQOpb83hGgGfId/aQa4TOvwyzn2PuswW2gPCYEL/nEAiSVpdOj1lXw==} - engines: {node: '>= 0.4'} - - is-arrayish@0.2.1: - resolution: {integrity: sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg==} - - is-bigint@1.0.4: - resolution: {integrity: sha512-zB9CruMamjym81i2JZ3UMn54PKGsQzsJeo6xvN3HJJ4CAsQNB6iRutp2To77OfCNuoxspsIhzaPoO1zyCEhFOg==} - - is-binary-path@1.0.1: - resolution: {integrity: sha512-9fRVlXc0uCxEDj1nQzaWONSpbTfx0FmJfzHF7pwlI8DkWGoHBBea4Pg5Ky0ojwwxQmnSifgbKkI06Qv0Ljgj+Q==} - engines: {node: '>=0.10.0'} - - is-binary-path@2.1.0: - resolution: {integrity: sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==} - engines: {node: '>=8'} - - is-boolean-object@1.1.2: - resolution: {integrity: sha512-gDYaKHJmnj4aWxyj6YHyXVpdQawtVLHU5cb+eztPGczf6cjuTdwve5ZIEfgXqH4e57An1D1AKf8CZ3kYrQRqYA==} - engines: {node: '>= 0.4'} - - is-buffer@1.1.6: - resolution: {integrity: sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==} - - is-buffer@2.0.5: - resolution: {integrity: sha512-i2R6zNFDwgEHJyQUtJEk0XFi1i0dPFn/oqjK3/vPCcDeJvW5NQ83V8QbicfF1SupOaB0h8ntgBC2YiE7dfyctQ==} - engines: {node: '>=4'} - - is-callable@1.2.7: - resolution: {integrity: sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA==} - engines: {node: '>= 0.4'} - - is-core-module@2.15.1: - resolution: {integrity: sha512-z0vtXSwucUJtANQWldhbtbt7BnL0vxiFjIdDLAatwhDYty2bad6s+rijD6Ri4YuYJubLzIJLUidCh09e1djEVQ==} - engines: {node: '>= 0.4'} - - is-core-module@2.16.1: - resolution: {integrity: sha512-UfoeMA6fIJ8wTYFEUjelnaGI67v6+N7qXJEvQuIGa99l4xsCruSYOVSQ0uPANn4dAzm8lkYPaKLrrijLq7x23w==} - engines: {node: '>= 0.4'} - - is-data-descriptor@1.0.1: - resolution: {integrity: sha512-bc4NlCDiCr28U4aEsQ3Qs2491gVq4V8G7MQyws968ImqjKuYtTJXrl7Vq7jsN7Ly/C3xj5KWFrY7sHNeDkAzXw==} - engines: {node: '>= 0.4'} - - is-data-view@1.0.1: - resolution: {integrity: sha512-AHkaJrsUVW6wq6JS8y3JnM/GJF/9cf+k20+iDzlSaJrinEo5+7vRiteOSwBhHRiAyQATN1AmY4hwzxJKPmYf+w==} - engines: {node: '>= 0.4'} - - is-date-object@1.0.5: - resolution: {integrity: sha512-9YQaSxsAiSwcvS33MBk3wTCVnWK+HhF8VZR2jRxehM16QcVOdHqPn4VPHmRK4lSr38n9JriurInLcP90xsYNfQ==} - engines: {node: '>= 0.4'} - - is-descriptor@0.1.7: - resolution: {integrity: sha512-C3grZTvObeN1xud4cRWl366OMXZTj0+HGyk4hvfpx4ZHt1Pb60ANSXqCK7pdOTeUQpRzECBSTphqvD7U+l22Eg==} - engines: {node: '>= 0.4'} - - is-descriptor@1.0.3: - resolution: {integrity: sha512-JCNNGbwWZEVaSPtS45mdtrneRWJFp07LLmykxeFV5F6oBvNF8vHSfJuJgoT472pSfk+Mf8VnlrspaFBHWM8JAw==} - engines: {node: '>= 0.4'} - - is-dotfile@1.0.3: - resolution: {integrity: sha512-9YclgOGtN/f8zx0Pr4FQYMdibBiTaH3sn52vjYip4ZSf6C4/6RfTEZ+MR4GvKhCxdPh21Bg42/WL55f6KSnKpg==} - engines: {node: '>=0.10.0'} - - is-extendable@0.1.1: - resolution: {integrity: sha512-5BMULNob1vgFX6EjQw5izWDxrecWK9AM72rugNr0TFldMOi0fj6Jk+zeKIt0xGj4cEfQIJth4w3OKWOJ4f+AFw==} - engines: {node: '>=0.10.0'} - - is-extendable@1.0.1: - resolution: {integrity: sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==} - engines: {node: '>=0.10.0'} - - is-extglob@1.0.0: - resolution: {integrity: sha512-7Q+VbVafe6x2T+Tu6NcOf6sRklazEPmBoB3IWk3WdGZM2iGUwU/Oe3Wtq5lSEkDTTlpp8yx+5t4pzO/i9Ty1ww==} - engines: {node: '>=0.10.0'} - - is-extglob@2.1.1: - resolution: {integrity: sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==} - engines: {node: '>=0.10.0'} - - is-fullwidth-code-point@2.0.0: - resolution: {integrity: sha512-VHskAKYM8RfSFXwee5t5cbN5PZeq1Wrh6qd5bkyiXIf6UQcN6w/A0eXM9r6t8d+GYOh+o6ZhiEnb88LN/Y8m2w==} - engines: {node: '>=4'} - - is-fullwidth-code-point@3.0.0: - resolution: {integrity: sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==} - engines: {node: '>=8'} - - is-fullwidth-code-point@4.0.0: - resolution: {integrity: sha512-O4L094N2/dZ7xqVdrXhh9r1KODPJpFms8B5sGdJLPy664AgvXsreZUyCQQNItZRDlYug4xStLjNp/sz3HvBowQ==} - engines: {node: '>=12'} - - is-function@1.0.2: - resolution: {integrity: sha512-lw7DUp0aWXYg+CBCN+JKkcE0Q2RayZnSvnZBlwgxHBQhqt5pZNVy4Ri7H9GmmXkdu7LUthszM+Tor1u/2iBcpQ==} - - is-generator-function@1.0.10: - resolution: {integrity: sha512-jsEjy9l3yiXEQ+PsXdmBwEPcOxaXWLspKdplFUVI9vq1iZgIekeC0L167qeu86czQaxed3q/Uzuw0swL0irL8A==} - engines: {node: '>= 0.4'} - - is-glob@2.0.1: - resolution: {integrity: sha512-a1dBeB19NXsf/E0+FHqkagizel/LQw2DjSQpvQrj3zT+jYPpaUCryPnrQajXKFLCMuf4I6FhRpaGtw4lPrG6Eg==} - engines: {node: '>=0.10.0'} - - is-glob@4.0.3: - resolution: {integrity: sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==} - engines: {node: '>=0.10.0'} - - is-hex-prefixed@1.0.0: - resolution: {integrity: sha512-WvtOiug1VFrE9v1Cydwm+FnXd3+w9GaeVUss5W4v/SLy3UW00vP+6iNF2SdnfiBoLy4bTqVdkftNGTUeOFVsbA==} - engines: {node: '>=6.5.0', npm: '>=3'} - - is-module@1.0.0: - resolution: {integrity: sha512-51ypPSPCoTEIN9dy5Oy+h4pShgJmPCygKfyRCISBI+JoWT/2oJvK8QPxmwv7b/p239jXrm9M1mlQbyKJ5A152g==} - - is-negative-zero@2.0.3: - resolution: {integrity: sha512-5KoIu2Ngpyek75jXodFvnafB6DJgr3u8uuK0LEZJjrU19DrMD3EVERaR8sjz8CCGgpZvxPl9SuE1GMVPFHx1mw==} - engines: {node: '>= 0.4'} - - is-number-object@1.0.7: - resolution: {integrity: sha512-k1U0IRzLMo7ZlYIfzRu23Oh6MiIFasgpb9X76eqfFZAqwH44UI4KTBvBYIZ1dSL9ZzChTB9ShHfLkR4pdW5krQ==} - engines: {node: '>= 0.4'} - - is-number@3.0.0: - resolution: {integrity: sha512-4cboCqIpliH+mAvFNegjZQ4kgKc3ZUhQVr3HvWbSh5q3WH2v82ct+T2Y1hdU5Gdtorx/cLifQjqCbL7bpznLTg==} - engines: {node: '>=0.10.0'} - - is-number@7.0.0: - resolution: {integrity: sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==} - engines: {node: '>=0.12.0'} - - is-path-cwd@2.2.0: - resolution: {integrity: sha512-w942bTcih8fdJPJmQHFzkS76NEP8Kzzvmw92cXsazb8intwLqPibPPdXf4ANdKV3rYMuuQYGIWtvz9JilB3NFQ==} - engines: {node: '>=6'} - - is-path-in-cwd@2.1.0: - resolution: {integrity: sha512-rNocXHgipO+rvnP6dk3zI20RpOtrAM/kzbB258Uw5BWr3TpXi861yzjo16Dn4hUox07iw5AyeMLHWsujkjzvRQ==} - engines: {node: '>=6'} - - is-path-inside@2.1.0: - resolution: {integrity: sha512-wiyhTzfDWsvwAW53OBWF5zuvaOGlZ6PwYxAbPVDhpm+gM09xKQGjBq/8uYN12aDvMxnAnq3dxTyoSoRNmg5YFg==} - engines: {node: '>=6'} - - is-path-inside@3.0.3: - resolution: {integrity: sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ==} - engines: {node: '>=8'} - - is-plain-obj@2.1.0: - resolution: {integrity: sha512-YWnfyRwxL/+SsrWYfOpUtz5b3YD+nyfkHvjbcanzk8zgyO4ASD67uVMRt8k5bM4lLMDnXfriRhOpemw+NfT1eA==} - engines: {node: '>=8'} - - is-plain-object@2.0.4: - resolution: {integrity: sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==} - engines: {node: '>=0.10.0'} - - is-plain-object@5.0.0: - resolution: {integrity: sha512-VRSzKkbMm5jMDoKLbltAkFQ5Qr7VDiTFGXxYFXXowVj387GeGNOCsOH6Msy00SGZ3Fp84b1Naa1psqgcCIEP5Q==} - engines: {node: '>=0.10.0'} - - is-promise@4.0.0: - resolution: {integrity: sha512-hvpoI6korhJMnej285dSg6nu1+e6uxs7zG3BYAm5byqDsgJNWwxzM6z6iZiAgQR4TJ30JmBTOwqZUw3WlyH3AQ==} - - is-reference@1.2.1: - resolution: {integrity: sha512-U82MsXXiFIrjCK4otLT+o2NA2Cd2g5MLoOVXUZjIOhLurrRxpEXzI8O0KZHr3IjLvlAH1kTPYSuqer5T9ZVBKQ==} - - is-regex@1.1.4: - resolution: {integrity: sha512-kvRdxDsxZjhzUX07ZnLydzS1TU/TJlTUHHY4YLL87e37oUA49DfkLqgy+VjFocowy29cKvcSiu+kIv728jTTVg==} - engines: {node: '>= 0.4'} - - is-shared-array-buffer@1.0.3: - resolution: {integrity: sha512-nA2hv5XIhLR3uVzDDfCIknerhx8XUKnstuOERPNNIinXG7v9u+ohXF67vxm4TPTEPU6lm61ZkwP3c9PCB97rhg==} - engines: {node: '>= 0.4'} - - is-stream@1.1.0: - resolution: {integrity: sha512-uQPm8kcs47jx38atAcWTVxyltQYoPT68y9aWYdV6yWXSyW8mzSat0TL6CiWdZeCdF3KrAvpVtnHbTv4RN+rqdQ==} - engines: {node: '>=0.10.0'} - - is-stream@2.0.1: - resolution: {integrity: sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==} - engines: {node: '>=8'} - - is-string@1.0.7: - resolution: {integrity: sha512-tE2UXzivje6ofPW7l23cjDOMa09gb7xlAqG6jG5ej6uPV32TlWP3NKPigtaGeHNu9fohccRYvIiZMfOOnOYUtg==} - engines: {node: '>= 0.4'} - - is-subdir@1.2.0: - resolution: {integrity: sha512-2AT6j+gXe/1ueqbW6fLZJiIw3F8iXGJtt0yDrZaBhAZEG1raiTxKWU+IPqMCzQAXOUCKdA4UDMgacKH25XG2Cw==} - engines: {node: '>=4'} - - is-symbol@1.0.4: - resolution: {integrity: sha512-C/CPBqKWnvdcxqIARxyOh4v1UUEOCHpgDa0WYgpKDFMszcrPcffg5uhwSgPCLD2WWxmq6isisz87tzT01tuGhg==} - engines: {node: '>= 0.4'} - - is-typed-array@1.1.13: - resolution: {integrity: sha512-uZ25/bUAlUY5fR4OKT4rZQEBrzQWYV9ZJYGGsUmEJ6thodVJ1HX64ePQ6Z0qPWP+m+Uq6e9UugrE38jeYsDSMw==} - engines: {node: '>= 0.4'} - - is-typedarray@1.0.0: - resolution: {integrity: sha512-cyA56iCMHAh5CdzjJIa4aohJyeO1YbwLi3Jc35MmRU6poroFjIGZzUzupGiRPOjgHg9TLu43xbpwXk523fMxKA==} - - is-unicode-supported@0.1.0: - resolution: {integrity: sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw==} - engines: {node: '>=10'} - - is-unicode-supported@2.1.0: - resolution: {integrity: sha512-mE00Gnza5EEB3Ds0HfMyllZzbBrmLOX3vfWoj9A9PEnTfratQ/BcaJOuMhnkhjXvb2+FkY3VuHqtAGpTPmglFQ==} - engines: {node: '>=18'} - - is-weakref@1.0.2: - resolution: {integrity: sha512-qctsuLZmIQ0+vSSMfoVvyFe2+GSEvnmZ2ezTup1SBse9+twCCeial6EEi3Nc2KFcf6+qz2FBPnjXsk8xhKSaPQ==} - - is-windows@1.0.2: - resolution: {integrity: sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA==} - engines: {node: '>=0.10.0'} - - is-wsl@1.1.0: - resolution: {integrity: sha512-gfygJYZ2gLTDlmbWMI0CE2MwnFzSN/2SZfkMlItC4K/JBlsWVDB0bO6XhqcY13YXE7iMcAJnzTCJjPiTeJJ0Mw==} - engines: {node: '>=4'} - - isarray@1.0.0: - resolution: {integrity: sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ==} - - isarray@2.0.5: - resolution: {integrity: sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==} - - isexe@2.0.0: - resolution: {integrity: sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==} - - isobject@2.1.0: - resolution: {integrity: sha512-+OUdGJlgjOBZDfxnDjYYG6zp487z0JGNQq3cYQYg5f5hKR+syHMsaztzGeml/4kGG55CSpKSpWTY+jYGgsHLgA==} - engines: {node: '>=0.10.0'} - - isobject@3.0.1: - resolution: {integrity: sha512-WhB9zCku7EGTj/HQQRz5aUQEUeoQZH2bWcltRErOpymJ4boYE6wL9Tbr23krRPSZ+C5zqNSrSw+Cc7sZZ4b7vg==} - engines: {node: '>=0.10.0'} - - isomorphic-ws@4.0.1: - resolution: {integrity: sha512-BhBvN2MBpWTaSHdWRb/bwdZJ1WaehQ2L1KngkCkfLUGF0mAWAT1sQUQacEmQ0jXkFw/czDXPNQSL5u2/Krsz1w==} - peerDependencies: - ws: '*' - - isstream@0.1.2: - resolution: {integrity: sha512-Yljz7ffyPbrLpLngrMtZ7NduUgVvi6wG9RJ9IUcyCd59YQ911PBJphODUcbOVbqYfxe1wuYf/LJ8PauMRwsM/g==} - - istanbul-lib-coverage@3.2.2: - resolution: {integrity: sha512-O8dpsF+r0WV/8MNRKfnmrtCWhuKjxrq2w+jpzBL5UZKTi2LeVWnWOmWRxFlesJONmc+wLAGvKQZEOanko0LFTg==} - engines: {node: '>=8'} - - istanbul-lib-hook@3.0.0: - resolution: {integrity: sha512-Pt/uge1Q9s+5VAZ+pCo16TYMWPBIl+oaNIjgLQxcX0itS6ueeaA+pEfThZpH8WxhFgCiEb8sAJY6MdUKgiIWaQ==} - engines: {node: '>=8'} - - istanbul-lib-instrument@4.0.3: - resolution: {integrity: sha512-BXgQl9kf4WTCPCCpmFGoJkz/+uhvm7h7PFKUYxh7qarQd3ER33vHG//qaE8eN25l07YqZPpHXU9I09l/RD5aGQ==} - engines: {node: '>=8'} - - istanbul-lib-instrument@6.0.3: - resolution: {integrity: sha512-Vtgk7L/R2JHyyGW07spoFlB8/lpjiOLTjMdms6AFMraYt3BaJauod/NGrfnVG/y4Ix1JEuMRPDPEj2ua+zz1/Q==} - engines: {node: '>=10'} - - istanbul-lib-processinfo@2.0.3: - resolution: {integrity: sha512-NkwHbo3E00oybX6NGJi6ar0B29vxyvNwoC7eJ4G4Yq28UfY758Hgn/heV8VRFhevPED4LXfFz0DQ8z/0kw9zMg==} - engines: {node: '>=8'} - - istanbul-lib-report@3.0.1: - resolution: {integrity: sha512-GCfE1mtsHGOELCU8e/Z7YWzpmybrx/+dSTfLrvY8qRmaY6zXTKWn6WQIjaAFw069icm6GVMNkgu0NzI4iPZUNw==} - engines: {node: '>=10'} - - istanbul-lib-source-maps@4.0.1: - resolution: {integrity: sha512-n3s8EwkdFIJCG3BPKBYvskgXGoy88ARzvegkitk60NxRdwltLOTaH7CUiMRXvwYorl0Q712iEjcWB+fK/MrWVw==} - engines: {node: '>=10'} - - istanbul-reports@3.1.7: - resolution: {integrity: sha512-BewmUXImeuRk2YY0PVbxgKAysvhRPUQE0h5QRM++nVWyubKGV0l8qQ5op8+B2DOmwSe63Jivj0BjkPQVf8fP5g==} - engines: {node: '>=8'} - - iterall@1.3.0: - resolution: {integrity: sha512-QZ9qOMdF+QLHxy1QIpUHUU1D5pS2CG2P69LF6L6CPjPYA/XMOmKV3PZpawHoAjHNyB0swdVTRxdYT4tbBbxqwg==} - - jackspeak@4.0.2: - resolution: {integrity: sha512-bZsjR/iRjl1Nk1UkjGpAzLNfQtzuijhn2g+pbZb98HQ1Gk8vM9hfbxeMBP+M2/UUdwj0RqGG3mlvk2MsAqwvEw==} - engines: {node: 20 || >=22} - - jest-worker@26.6.2: - resolution: {integrity: sha512-KWYVV1c4i+jbMpaBC+U++4Va0cp8OisU185o73T1vo99hqi7w8tSJfUXYswwqqrjzwxa6KpRK54WhPvwf5w6PQ==} - engines: {node: '>= 10.13.0'} - - jest-worker@27.5.1: - resolution: {integrity: sha512-7vuh85V5cdDofPyxn58nrPjBktZo0u9x1g8WtjQol+jZDaE+fhN+cIvTj11GndBnMnyfrUOG1sZQxCdjKh+DKg==} - engines: {node: '>= 10.13.0'} - - joi@17.13.3: - resolution: {integrity: sha512-otDA4ldcIx+ZXsKHWmp0YizCweVRZG96J10b0FevjfuncLO1oX59THoAmHkNubYJ+9gWsYsp5k8v4ib6oDv1fA==} - - js-base64@3.7.7: - resolution: {integrity: sha512-7rCnleh0z2CkXhH67J8K1Ytz0b2Y+yxTPL+/KOJoa20hfnVQ/3/T6W/KflYI4bRHRagNeXeU2bkNGI3v1oS/lw==} - - js-sha3@0.5.7: - resolution: {integrity: sha512-GII20kjaPX0zJ8wzkTbNDYMY7msuZcTWk8S5UOh6806Jq/wz1J8/bnr8uGU0DAUmYDjj2Mr4X1cW8v/GLYnR+g==} - - js-sha3@0.8.0: - resolution: {integrity: sha512-gF1cRrHhIzNfToc802P800N8PpXS+evLLXfsVpowqmAFR9uwbi89WvXg2QspOmXL8QL86J4T1EpFu+yUkwJY3Q==} - - js-string-escape@1.0.1: - resolution: {integrity: sha512-Smw4xcfIQ5LVjAOuJCvN/zIodzA/BBSsluuoSykP+lUvScIi4U6RJLfwHet5cxFnCswUjISV8oAXaqaJDY3chg==} - engines: {node: '>= 0.8'} - - js-tokens@4.0.0: - resolution: {integrity: sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==} - - js-yaml@3.14.1: - resolution: {integrity: sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==} - hasBin: true - - js-yaml@4.1.0: - resolution: {integrity: sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==} - hasBin: true - - jsbn@0.1.1: - resolution: {integrity: sha512-UVU9dibq2JcFWxQPA6KCqj5O42VOmAY3zQUfEKxU0KpTGXwNoCjkX1e13eHNvw/xPynt6pU0rZ1htjWTNTSXsg==} - - jsbn@1.1.0: - resolution: {integrity: sha512-4bYVV3aAMtDTTu4+xsDYa6sy9GyJ69/amsu9sYF2zqjiEoZA5xJi3BrfX3uY+/IekIu7MwdObdbDWpoZdBv3/A==} - - jsesc@3.0.2: - resolution: {integrity: sha512-xKqzzWXDttJuOcawBt4KnKHHIf5oQ/Cxax+0PWFG+DFDgHNAdi+TXECADI+RYiFUMmx8792xsMbbgXj4CwnP4g==} - engines: {node: '>=6'} - hasBin: true - - json-buffer@3.0.1: - resolution: {integrity: sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==} - - json-canonicalize@1.0.6: - resolution: {integrity: sha512-kP2iYpOS5SZHYhIaR1t9oG80d4uTY3jPoaBj+nimy3njtJk8+sRsVatN8pyJRDRtk9Su3+6XqA2U8k0dByJBUQ==} - - json-parse-even-better-errors@2.3.1: - resolution: {integrity: sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==} - - json-schema-traverse@0.4.1: - resolution: {integrity: sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==} - - json-schema-traverse@1.0.0: - resolution: {integrity: sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==} - - json-schema@0.4.0: - resolution: {integrity: sha512-es94M3nTIfsEPisRafak+HDLfHXnKBhV3vU5eqPcS3flIWqcxJWgXHXiey3YrpaNsanY5ei1VoYEbOzijuq9BA==} - - json-stable-stringify-without-jsonify@1.0.1: - resolution: {integrity: sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==} - - json-stream-stringify@3.1.6: - resolution: {integrity: sha512-x7fpwxOkbhFCaJDJ8vb1fBY3DdSa4AlITaz+HHILQJzdPMnHEFjxPwVUi1ALIbcIxDE0PNe/0i7frnY8QnBQog==} - engines: {node: '>=7.10.1'} - - json-stringify-safe@5.0.1: - resolution: {integrity: sha512-ZClg6AaYvamvYEE82d3Iyd3vSSIjQ+odgjaTzRuO3s7toCdFKczob2i0zCh7JE8kWn17yvAWhUVxvqGwUalsRA==} - - json5@1.0.2: - resolution: {integrity: sha512-g1MWMLBiz8FKi1e4w0UyVL3w+iJceWAFBAaBnnGKOpNa5f8TLktkbre1+s6oICydWAm+HRUGTmI+//xv2hvXYA==} - hasBin: true - - json5@2.2.3: - resolution: {integrity: sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==} - engines: {node: '>=6'} - hasBin: true - - jsonfile@4.0.0: - resolution: {integrity: sha512-m6F1R3z8jjlf2imQHS2Qez5sjKWQzbuuhuJ/FKYFRZvPE3PuHcSMVZzfsLhGVOkfd20obL5SWEBew5ShlquNxg==} - - jsonfile@6.1.0: - resolution: {integrity: sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==} - - jsonschema@1.5.0: - resolution: {integrity: sha512-K+A9hhqbn0f3pJX17Q/7H6yQfD/5OXgdrR5UE12gMXCiN9D5Xq2o5mddV2QEcX/bjla99ASsAAQUyMCCRWAEhw==} - - jsprim@1.4.2: - resolution: {integrity: sha512-P2bSOMAc/ciLz6DzgjVlGJP9+BrJWu5UDGK70C2iweC5QBIeFf0ZXRvGjEj2uYgrY2MkAAhsSWHDWlFtEroZWw==} - engines: {node: '>=0.6.0'} - - jwt-decode@4.0.0: - resolution: {integrity: sha512-+KJGIyHgkGuIq3IEBNftfhW/LfWhXUIY6OmyVWjliu5KH1y0fw7VQ8YndE2O4qZdMSd9SqbnC8GOcZEy0Om7sA==} - engines: {node: '>=18'} - - keccak256@1.0.6: - resolution: {integrity: sha512-8GLiM01PkdJVGUhR1e6M/AvWnSqYS0HaERI+K/QtStGDGlSTx2B1zTqZk4Zlqu5TxHJNTxWAdP9Y+WI50OApUw==} - - keccak@3.0.4: - resolution: {integrity: sha512-3vKuW0jV8J3XNTzvfyicFR5qvxrSAGl7KIhvgOu5cmWwM7tZRj3fMbj/pfIf4be7aznbc+prBWGjywox/g2Y6Q==} - engines: {node: '>=10.0.0'} - - keyv@4.5.4: - resolution: {integrity: sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw==} - - killable@1.0.1: - resolution: {integrity: sha512-LzqtLKlUwirEUyl/nicirVmNiPvYs7l5n8wOPP7fyJVpUPkvCnW/vuiXGpylGUlnPDnB7311rARzAt3Mhswpjg==} - - kind-of@3.2.2: - resolution: {integrity: sha512-NOW9QQXMoZGg/oqnVNoNTTIFEIid1627WCffUBJEdMxYApq7mNE7CpzucIPc+ZQg25Phej7IJSmX3hO+oblOtQ==} - engines: {node: '>=0.10.0'} - - kind-of@4.0.0: - resolution: {integrity: sha512-24XsCxmEbRwEDbz/qz3stgin8TTzZ1ESR56OMCN0ujYg+vRutNSiOj9bHH9u85DKgXguraugV5sFuvbD4FW/hw==} - engines: {node: '>=0.10.0'} - - kind-of@6.0.3: - resolution: {integrity: sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==} - engines: {node: '>=0.10.0'} - - kleur@3.0.3: - resolution: {integrity: sha512-eTIzlVOSUR+JxdDFepEYcBMtZ9Qqdef+rnzWdRZuMbOywu5tO2w2N7rqjoANZ5k9vywhL6Br1VRjUIgTQx4E8w==} - engines: {node: '>=6'} - - level-concat-iterator@3.1.0: - resolution: {integrity: sha512-BWRCMHBxbIqPxJ8vHOvKUsaO0v1sLYZtjN3K2iZJsRBYtp+ONsY6Jfi6hy9K3+zolgQRryhIn2NRZjZnWJ9NmQ==} - engines: {node: '>=10'} - deprecated: Superseded by abstract-level (https://github.com/Level/community#faq) - - level-supports@2.1.0: - resolution: {integrity: sha512-E486g1NCjW5cF78KGPrMDRBYzPuueMZ6VBXHT6gC7A8UYWGiM14fGgp+s/L1oFfDWSPV/+SFkYCmZ0SiESkRKA==} - engines: {node: '>=10'} - - level-supports@4.0.1: - resolution: {integrity: sha512-PbXpve8rKeNcZ9C1mUicC9auIYFyGpkV9/i6g76tLgANwWhtG2v7I4xNBUlkn3lE2/dZF3Pi0ygYGtLc4RXXdA==} - engines: {node: '>=12'} - - level-transcoder@1.0.1: - resolution: {integrity: sha512-t7bFwFtsQeD8cl8NIoQ2iwxA0CL/9IFw7/9gAjOonH0PWTTiRfY7Hq+Ejbsxh86tXobDQ6IOiddjNYIfOBs06w==} - engines: {node: '>=12'} - - levn@0.3.0: - resolution: {integrity: sha512-0OO4y2iOHix2W6ujICbKIaEQXvFQHue65vUG3pb5EUomzPI90z9hsA1VsO/dbIIpC53J8gxM9Q4Oho0jrCM/yA==} - engines: {node: '>= 0.8.0'} - - levn@0.4.1: - resolution: {integrity: sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==} - engines: {node: '>= 0.8.0'} - - lines-and-columns@1.2.4: - resolution: {integrity: sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==} - - load-json-file@7.0.1: - resolution: {integrity: sha512-Gnxj3ev3mB5TkVBGad0JM6dmLiQL+o0t23JPBZ9sd+yvSLk05mFoqKBw5N8gbbkU4TNXyqCgIrl/VM17OgUIgQ==} - engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} - - loader-runner@4.3.0: - resolution: {integrity: sha512-3R/1M+yS3j5ou80Me59j7F9IMs4PXs3VqRrm0TU3AbKPxlmpoY1TNscJV/oGJXo8qCatFGTfDbY6W6ipGOYXfg==} - engines: {node: '>=6.11.5'} - - locate-path@2.0.0: - resolution: {integrity: sha512-NCI2kiDkyR7VeEKm27Kda/iQHyKJe1Bu0FlTbYp3CqJu+9IFe9bLyAjMxf5ZDDbEg+iMPzB5zYyUTSm8wVTKmA==} - engines: {node: '>=4'} - - locate-path@3.0.0: - resolution: {integrity: sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==} - engines: {node: '>=6'} - - locate-path@5.0.0: - resolution: {integrity: sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==} - engines: {node: '>=8'} - - locate-path@6.0.0: - resolution: {integrity: sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==} - engines: {node: '>=10'} - - locate-path@7.2.0: - resolution: {integrity: sha512-gvVijfZvn7R+2qyPX8mAuKcFGDf6Nc61GdvGafQsHL0sBIxfKzA+usWn4GFC/bk+QdwPUD4kWFJLhElipq+0VA==} - engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} - - lodash.camelcase@4.3.0: - resolution: {integrity: sha512-TwuEnCnxbc3rAvhf/LbG7tJUDzhqXyFnv3dtzLOPgCG/hODL7WFnsbwktkD7yUV0RrreP/l1PALq/YSg6VvjlA==} - - lodash.clonedeep@4.5.0: - resolution: {integrity: sha512-H5ZhCF25riFd9uB5UCkVKo61m3S/xZk1x4wA6yp/L3RFP6Z/eHH1ymQcGLo7J3GMPfm0V/7m1tryHuGVxpqEBQ==} - - lodash.debounce@4.0.8: - resolution: {integrity: sha512-FT1yDzDYEoYWhnSGnpE/4Kj1fLZkDFyqRb7fNt6FdYOSxlUWAtp42Eh6Wb0rGIv/m9Bgo7x4GhQbm5Ys4SG5ow==} - - lodash.flattendeep@4.4.0: - resolution: {integrity: sha512-uHaJFihxmJcEX3kT4I23ABqKKalJ/zDrDg0lsFtc1h+3uw49SIJ5beyhx5ExVRti3AvKoOJngIj7xz3oylPdWQ==} - - lodash.isequal@4.5.0: - resolution: {integrity: sha512-pDo3lu8Jhfjqls6GkMgpahsF9kCyayhgykjyLMNFTKWrpVdAQtYyB4muAMWozBB4ig/dtWAmsMxLEI8wuz+DYQ==} - deprecated: This package is deprecated. Use require('node:util').isDeepStrictEqual instead. - - lodash.merge@4.6.2: - resolution: {integrity: sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==} - - lodash.startcase@4.4.0: - resolution: {integrity: sha512-+WKqsK294HMSc2jEbNgpHpd0JfIBhp7rEV4aqXWqFr6AlXov+SlcgB1Fv01y2kGe3Gc8nMW7VA0SrGuSkRfIEg==} - - lodash.truncate@4.4.2: - resolution: {integrity: sha512-jttmRe7bRse52OsWIMDLaXxWqRAmtIUccAQ3garviCqJjafXOfNMO0yMfNpdD6zbGaTU0P5Nz7e7gAT6cKmJRw==} - - lodash@4.17.21: - resolution: {integrity: sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==} - - log-symbols@4.1.0: - resolution: {integrity: sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg==} - engines: {node: '>=10'} - - loglevel@1.9.2: - resolution: {integrity: sha512-HgMmCqIJSAKqo68l0rS2AanEWfkxaZ5wNiEFb5ggm08lDs9Xl2KxBlX3PTcaD2chBM1gXAYf491/M2Rv8Jwayg==} - engines: {node: '>= 0.6.0'} - - loupe@2.3.7: - resolution: {integrity: sha512-zSMINGVYkdpYSOBmLi0D1Uo7JU9nVdQKrHxC8eYlV+9YKK9WePqAlL7lSlorG/U2Fw1w0hTBmaa/jrQ3UbPHtA==} - - lower-case@2.0.2: - resolution: {integrity: sha512-7fm3l3NAF9WfN6W3JOmf5drwpVqX78JtoGJ3A6W0a6ZnldM41w2fV5D490psKFTpMds8TJse/eHLFFsNHHjHgg==} - - lowercase-keys@2.0.0: - resolution: {integrity: sha512-tqNXrS78oMOE73NMxK4EMLQsQowWf8jKooH9g7xPavRT706R6bkQJ6DY2Te7QukaZsulxa30wQ7bk0pm4XiHmA==} - engines: {node: '>=8'} - - lowercase-keys@3.0.0: - resolution: {integrity: sha512-ozCC6gdQ+glXOQsveKD0YsDy8DSQFjDTz4zyzEHNV5+JP5D62LmfDZ6o1cycFx9ouG940M5dE8C8CTewdj2YWQ==} - engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} - - lru-cache@11.0.1: - resolution: {integrity: sha512-CgeuL5uom6j/ZVrg7G/+1IXqRY8JXX4Hghfy5YE0EhoYQWvndP1kufu58cmZLNIDKnRhZrXfdS9urVWx98AipQ==} - engines: {node: 20 || >=22} - - lru-cache@4.1.5: - resolution: {integrity: sha512-sWZlbEP2OsHNkXrMl5GYk/jKk70MBng6UU4YI/qGDYbgf6YbP4EvmqISbXCoJiRKs+1bSpFHVgQxvJ17F2li5g==} - - lru-cache@5.1.1: - resolution: {integrity: sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==} - - lru-cache@7.18.3: - resolution: {integrity: sha512-jumlc0BIUrS3qJGgIkWZsyfAM7NCWiBcCDhnd+3NNM5KbBmLTgHVfWBcg6W+rLUsIpzpERPsvwUP7CckAQSOoA==} - engines: {node: '>=12'} - - lru_map@0.3.3: - resolution: {integrity: sha512-Pn9cox5CsMYngeDbmChANltQl+5pi6XmTrraMSzhPmMBbmgcxmqWry0U3PGapCU1yB4/LqCcom7qhHZiF/jGfQ==} - - magic-string@0.25.9: - resolution: {integrity: sha512-RmF0AsMzgt25qzqqLc1+MbHmhdx0ojF2Fvs4XnOqz2ZOBXzzkEwc/dJQZCYHAn7v1jbVOjAZfK8msRn4BxO4VQ==} - - magic-string@0.30.12: - resolution: {integrity: sha512-Ea8I3sQMVXr8JhN4z+H/d8zwo+tYDgHE9+5G4Wnrwhs0gaK9fXTKx0Tw5Xwsd/bCPTTZNRAdpyzvoeORe9LYpw==} - - make-dir@3.1.0: - resolution: {integrity: sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw==} - engines: {node: '>=8'} - - make-dir@4.0.0: - resolution: {integrity: sha512-hXdUTZYIVOt1Ex//jAQi+wTZZpUpwBj/0QsOzqegb3rGMMeJiSEu5xLHnYfBrRV4RH2+OCSOO95Is/7x1WJ4bw==} - engines: {node: '>=10'} - - make-error@1.3.6: - resolution: {integrity: sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==} - - map-cache@0.2.2: - resolution: {integrity: sha512-8y/eV9QQZCiyn1SprXSrCmqJN0yNRATe+PO8ztwqrvrbdRLA3eYJF0yaR0YayLWkMbsQSKWS9N2gPcGEc4UsZg==} - engines: {node: '>=0.10.0'} - - map-visit@1.0.0: - resolution: {integrity: sha512-4y7uGv8bd2WdM9vpQsiQNo41Ln1NvhvDRuVt0k2JZQ+ezN2uaQes7lZeZ+QQUHOLQAtDaBJ+7wCbi+ab/KFs+w==} - engines: {node: '>=0.10.0'} - - markdown-table@1.1.3: - resolution: {integrity: sha512-1RUZVgQlpJSPWYbFSpmudq5nHY1doEIv89gBtF0s4gW1GF2XorxcA/70M5vq7rLv0a6mhOUccRsqkwhwLCIQ2Q==} - - matcher@5.0.0: - resolution: {integrity: sha512-s2EMBOWtXFc8dgqvoAzKJXxNHibcdJMV0gwqKUaw9E2JBJuGUK7DrNKrA6g/i+v72TT16+6sVm5mS3thaMLQUw==} - engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} - - math-intrinsics@1.1.0: - resolution: {integrity: sha512-/IXtbwEk5HTPyEwyKX6hGkYXxM9nbj64B+ilVJnC/R6B0pH5G4V3b0pVbL7DBj4tkhBAppbQUlf6F6Xl9LHu1g==} - engines: {node: '>= 0.4'} - - md5-hex@3.0.1: - resolution: {integrity: sha512-BUiRtTtV39LIJwinWBjqVsU9xhdnz7/i889V859IBFpuqGAj6LuOvHv5XLbgZ2R7ptJoJaEcxkv88/h25T7Ciw==} - engines: {node: '>=8'} - - md5.js@1.3.5: - resolution: {integrity: sha512-xitP+WxNPcTTOgnTJcrhM0xvdPepipPSf3I8EIpGKeFLjt3PlJLIDG3u8EX53ZIubkb+5U2+3rELYpEhHhzdkg==} - - media-typer@0.3.0: - resolution: {integrity: sha512-dq+qelQ9akHpcOl/gUVRTxVIOkAJ1wR3QAvb4RsVjS8oVoFjDGTc679wJYmUmknUF5HwMLOgb5O+a3KxfWapPQ==} - engines: {node: '>= 0.6'} - - memoize@10.0.0: - resolution: {integrity: sha512-H6cBLgsi6vMWOcCpvVCdFFnl3kerEXbrYh9q+lY6VXvQSmM6CkmV08VOwT+WE2tzIEqRPFfAq3fm4v/UIW6mSA==} - engines: {node: '>=18'} - - memory-fs@0.4.1: - resolution: {integrity: sha512-cda4JKCxReDXFXRqOHPQscuIYg1PvxbE2S2GP45rnwfEK+vZaXC8C1OFvdHIbgw0DLzowXGVoxLaAmlgRy14GQ==} - - memorystream@0.3.1: - resolution: {integrity: sha512-S3UwM3yj5mtUSEfP41UZmt/0SCoVYUcU1rkXv+BQ5Ig8ndL4sPoJNBUJERafdPb5jjHJGuMgytgKvKIf58XNBw==} - engines: {node: '>= 0.10.0'} - - merge-descriptors@1.0.3: - resolution: {integrity: sha512-gaNvAS7TZ897/rVaZ0nMtAyxNyi/pdbjbAwUpFQpN70GqnVfOiXpeUUMKRBmzXaSQ8DdTX4/0ms62r2K+hE6mQ==} - - merge-stream@2.0.0: - resolution: {integrity: sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==} - - merge2@1.4.1: - resolution: {integrity: sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==} - engines: {node: '>= 8'} - - methods@1.1.2: - resolution: {integrity: sha512-iclAHeNqNm68zFtnZ0e+1L2yUIdvzNoauKU4WBA3VvH/vPFieF7qfRlwUZU+DA9P9bPXIS90ulxoUoCH23sV2w==} - engines: {node: '>= 0.6'} - - micro-ftch@0.3.1: - resolution: {integrity: sha512-/0LLxhzP0tfiR5hcQebtudP56gUurs2CLkGarnCiB/OqEyUFQ6U3paQi/tgLv0hBJYt2rnr9MNpxz4fiiugstg==} - - micromatch@3.1.10: - resolution: {integrity: sha512-MWikgl9n9M3w+bpsY3He8L+w9eF9338xRl8IAO5viDizwSzziFEyUzo2xrrloB64ADbTf8uA8vRqqttDTOmccg==} - engines: {node: '>=0.10.0'} - - micromatch@4.0.8: - resolution: {integrity: sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==} - engines: {node: '>=8.6'} - - mime-db@1.52.0: - resolution: {integrity: sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==} - engines: {node: '>= 0.6'} - - mime-db@1.53.0: - resolution: {integrity: sha512-oHlN/w+3MQ3rba9rqFr6V/ypF10LSkdwUysQL7GkXoTgIWeV+tcXGA852TBxH+gsh8UWoyhR1hKcoMJTuWflpg==} - engines: {node: '>= 0.6'} - - mime-types@2.1.35: - resolution: {integrity: sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==} - engines: {node: '>= 0.6'} - - mime@1.6.0: - resolution: {integrity: sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==} - engines: {node: '>=4'} - hasBin: true - - mime@2.6.0: - resolution: {integrity: sha512-USPkMeET31rOMiarsBNIHZKLGgvKc/LrjofAnBlOttf5ajRvqiRA8QsenbcooctK6d6Ts6aqZXBA+XbkKthiQg==} - engines: {node: '>=4.0.0'} - hasBin: true - - mimic-function@5.0.1: - resolution: {integrity: sha512-VP79XUPxV2CigYP3jWwAUFSku2aKqBH7uTAapFWCBqutsbmDo96KY5o8uh6U+/YSIn5OxJnXp73beVkpqMIGhA==} - engines: {node: '>=18'} - - mimic-response@1.0.1: - resolution: {integrity: sha512-j5EctnkH7amfV/q5Hgmoal1g2QHFJRraOtmx0JpIqkxhBhI/lJSl1nMpQ45hVarwNETOoWEimndZ4QK0RHxuxQ==} - engines: {node: '>=4'} - - mimic-response@3.1.0: - resolution: {integrity: sha512-z0yWI+4FDrrweS8Zmt4Ej5HdJmky15+L2e6Wgn3+iK5fWzb6T3fhNFq2+MeTRb064c6Wr4N/wv0DzQTjNzHNGQ==} - engines: {node: '>=10'} - - min-document@2.19.0: - resolution: {integrity: sha512-9Wy1B3m3f66bPPmU5hdA4DR4PB2OfDU/+GS3yAB7IQozE3tqXaVv2zOjgla7MEGSRv95+ILmOuvhLkOK6wJtCQ==} - - minimalistic-assert@1.0.1: - resolution: {integrity: sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A==} - - minimalistic-crypto-utils@1.0.1: - resolution: {integrity: sha512-JIYlbt6g8i5jKfJ3xz7rF0LXmv2TkDxBLUkiBeZ7bAx4GnnNMr8xFpGnOxn6GhTEHx3SjRrZEoU+j04prX1ktg==} - - minimatch@10.0.1: - resolution: {integrity: sha512-ethXTt3SGGR+95gudmqJ1eNhRO7eGEGIgYA9vnPatK4/etz2MEVDno5GMCibdMTuBMyElzIlgxMna3K94XDIDQ==} - engines: {node: 20 || >=22} - - minimatch@3.1.2: - resolution: {integrity: sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==} - - minimatch@5.1.6: - resolution: {integrity: sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==} - engines: {node: '>=10'} - - minimatch@9.0.5: - resolution: {integrity: sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==} - engines: {node: '>=16 || 14 >=14.17'} - - minimist@1.2.8: - resolution: {integrity: sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==} - - minipass@2.9.0: - resolution: {integrity: sha512-wxfUjg9WebH+CUDX/CdbRlh5SmfZiy/hpkxaRI16Y9W56Pa75sWgd/rvFilSgrauD9NyFymP/+JFV3KwzIsJeg==} - - minipass@3.3.6: - resolution: {integrity: sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==} - engines: {node: '>=8'} - - minipass@5.0.0: - resolution: {integrity: sha512-3FnjYuehv9k6ovOEbyOswadCDPX1piCfhV8ncmYtHOjuPwylVWsghTLo7rabjC3Rx5xD4HDx8Wm1xnMF7S5qFQ==} - engines: {node: '>=8'} - - minipass@7.1.2: - resolution: {integrity: sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw==} - engines: {node: '>=16 || 14 >=14.17'} - - minizlib@1.3.3: - resolution: {integrity: sha512-6ZYMOEnmVsdCeTJVE0W9ZD+pVnE8h9Hma/iOwwRDsdQoePpoX56/8B6z3P9VNwppJuBKNRuFDRNRqRWexT9G9Q==} - - minizlib@2.1.2: - resolution: {integrity: sha512-bAxsR8BVfj60DWXHE3u30oHzfl4G7khkSuPW+qvpd7jFRHm7dLxOjUk1EHACJ/hxLY8phGJ0YhYHZo7jil7Qdg==} - engines: {node: '>= 8'} - - mitt@3.0.1: - resolution: {integrity: sha512-vKivATfr97l2/QBCYAkXYDbrIWPM2IIKEl7YPhjCvKlG3kE2gm+uBo6nEXK3M5/Ffh/FLpKExzOQ3JJoJGFKBw==} - - mixin-deep@1.3.2: - resolution: {integrity: sha512-WRoDn//mXBiJ1H40rqa3vH0toePwSsGb45iInWlTySa+Uu4k3tYUSxa2v1KqAiLtvlrSzaExqS1gtk96A9zvEA==} - engines: {node: '>=0.10.0'} - - mkdirp-promise@5.0.1: - resolution: {integrity: sha512-Hepn5kb1lJPtVW84RFT40YG1OddBNTOVUZR2bzQUHc+Z03en8/3uX0+060JDhcEzyO08HmipsN9DcnFMxhIL9w==} - engines: {node: '>=4'} - deprecated: This package is broken and no longer maintained. 'mkdirp' itself supports promises now, please switch to that. - - mkdirp@0.5.6: - resolution: {integrity: sha512-FP+p8RB8OWpF3YZBCrP5gtADmtXApB5AMLn+vdyA+PyxCjrCs00mjyUozssO33cwDeT3wNGdLxJ5M//YqtHAJw==} - hasBin: true - - mkdirp@1.0.4: - resolution: {integrity: sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==} - engines: {node: '>=10'} - hasBin: true - - mkdirp@3.0.1: - resolution: {integrity: sha512-+NsyUUAZDmo6YVHzL/stxSu3t9YS1iljliy3BSDrXJ/dkn1KYdmtZODGGjLcc9XLgVVpH4KshHB8XmZgMhaBXg==} - engines: {node: '>=10'} - hasBin: true - - mnemonist@0.38.5: - resolution: {integrity: sha512-bZTFT5rrPKtPJxj8KSV0WkPyNxl72vQepqqVUAW2ARUpUSF2qXMB6jZj7hW5/k7C1rtpzqbD/IIbJwLXUjCHeg==} - - mocha@10.7.3: - resolution: {integrity: sha512-uQWxAu44wwiACGqjbPYmjo7Lg8sFrS3dQe7PP2FQI+woptP4vZXSMcfMyFL/e1yFEeEpV4RtyTpZROOKmxis+A==} - engines: {node: '>= 14.0.0'} - hasBin: true - - mocha@10.8.2: - resolution: {integrity: sha512-VZlYo/WE8t1tstuRmqgeyBgCbJc/lEdopaa+axcKzTBJ+UIdlAB9XnmvTCAH4pwR4ElNInaedhEBmZD8iCSVEg==} - engines: {node: '>= 14.0.0'} - hasBin: true - - mock-fs@4.14.0: - resolution: {integrity: sha512-qYvlv/exQ4+svI3UOvPUpLDF0OMX5euvUH0Ny4N5QyRyhNdgAgUrVH3iUINSzEPLvx0kbo/Bp28GJKIqvE7URw==} - - mockttp@3.15.3: - resolution: {integrity: sha512-UW8IkPttmGZuJf8A5ahMqB8c8MngSgtCAxEbWaCqvZqnINfoZackkSWO/sU25iyvH+UBZRBRTdkm4ItJriVBmw==} - engines: {node: '>=14.14.0'} - hasBin: true - - module-error@1.0.2: - resolution: {integrity: sha512-0yuvsqSCv8LbaOKhnsQ/T5JhyFlCYLPXK3U2sgV10zoKQwzs/MyfuQUOZQ1V/6OCOJsK/TRgNVrPuPDqtdMFtA==} - engines: {node: '>=10'} - - mri@1.2.0: - resolution: {integrity: sha512-tzzskb3bG8LvYGFF/mDTpq3jpI6Q9wc3LEmBaghu+DdCssd1FakN7Bc0hVNmEyGq1bq3RgfkCb3cmQLpNPOroA==} - engines: {node: '>=4'} - - ms@2.0.0: - resolution: {integrity: sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==} - - ms@2.1.3: - resolution: {integrity: sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==} - - multibase@0.6.1: - resolution: {integrity: sha512-pFfAwyTjbbQgNc3G7D48JkJxWtoJoBMaR4xQUOuB8RnCgRqaYmWNFeJTTvrJ2w51bjLq2zTby6Rqj9TQ9elSUw==} - deprecated: This module has been superseded by the multiformats module - - multibase@0.7.0: - resolution: {integrity: sha512-TW8q03O0f6PNFTQDvh3xxH03c8CjGaaYrjkl9UQPG6rz53TQzzxJVCIWVjzcbN/Q5Y53Zd0IBQBMVktVgNx4Fg==} - deprecated: This module has been superseded by the multiformats module - - multicast-dns-service-types@1.1.0: - resolution: {integrity: sha512-cnAsSVxIDsYt0v7HmC0hWZFwwXSh+E6PgCrREDuN/EsjgLwA5XRmlMHhSiDPrt6HxY1gTivEa/Zh7GtODoLevQ==} - - multicast-dns@6.2.3: - resolution: {integrity: sha512-ji6J5enbMyGRHIAkAOu3WdV8nggqviKCEKtXcOqfphZZtQrmHKycfynJ2V7eVPUA4NhJ6V7Wf4TmGbTwKE9B6g==} - hasBin: true - - multicodec@0.5.7: - resolution: {integrity: sha512-PscoRxm3f+88fAtELwUnZxGDkduE2HD9Q6GHUOywQLjOGT/HAdhjLDYNZ1e7VR0s0TP0EwZ16LNUTFpoBGivOA==} - deprecated: This module has been superseded by the multiformats module - - multicodec@1.0.4: - resolution: {integrity: sha512-NDd7FeS3QamVtbgfvu5h7fd1IlbaC4EQ0/pgU4zqE2vdHCmBGsUa0TiM8/TdSeG6BMPC92OOCf8F1ocE/Wkrrg==} - deprecated: This module has been superseded by the multiformats module - - multihashes@0.4.21: - resolution: {integrity: sha512-uVSvmeCWf36pU2nB4/1kzYZjsXD9vofZKpgudqkceYY5g2aZZXJ5r9lxuzoRLl1OAp28XljXsEJ/X/85ZsKmKw==} - - nan@2.22.0: - resolution: {integrity: sha512-nbajikzWTMwsW+eSsNm3QwlOs7het9gGJU5dDZzRTQGk03vyBOauxgI4VakDzE0PtsGTmXPsXTbbjVhRwR5mpw==} - - nano-json-stream-parser@0.1.2: - resolution: {integrity: sha512-9MqxMH/BSJC7dnLsEMPyfN5Dvoo49IsPFYMcHw3Bcfc2kN0lpHRBSzlMSVx4HGyJ7s9B31CyBTVehWJoQ8Ctew==} - - nanomatch@1.2.13: - resolution: {integrity: sha512-fpoe2T0RbHwBTBUOftAfBPaDEi06ufaUai0mE6Yn1kacc3SnTErfb/h+X94VXzI64rKFHYImXSvdwGGCmwOqCA==} - engines: {node: '>=0.10.0'} - - native-duplexpair@1.0.0: - resolution: {integrity: sha512-E7QQoM+3jvNtlmyfqRZ0/U75VFgCls+fSkbml2MpgWkWyz3ox8Y58gNhfuziuQYGNNQAbFZJQck55LHCnCK6CA==} - - natural-compare@1.4.0: - resolution: {integrity: sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==} - - ndjson@2.0.0: - resolution: {integrity: sha512-nGl7LRGrzugTtaFcJMhLbpzJM6XdivmbkdlaGcrk/LXg2KL/YBC6z1g70xh0/al+oFuVFP8N8kiWRucmeEH/qQ==} - engines: {node: '>=10'} - hasBin: true - - negotiator@0.6.3: - resolution: {integrity: sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg==} - engines: {node: '>= 0.6'} - - neo-async@2.6.2: - resolution: {integrity: sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==} - - netmask@2.0.2: - resolution: {integrity: sha512-dBpDMdxv9Irdq66304OLfEmQ9tbNRFnFTuZiLo+bD+r332bBmMJ8GBLXklIXXgxd3+v9+KUnZaUR5PJMa75Gsg==} - engines: {node: '>= 0.4.0'} - - next-tick@1.1.0: - resolution: {integrity: sha512-CXdUiJembsNjuToQvxayPZF9Vqht7hewsvy2sOWafLvi2awflj9mOC6bHIg50orX8IJvWKY9wYQ/zB2kogPslQ==} - - nice-try@1.0.5: - resolution: {integrity: sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ==} - - no-case@3.0.4: - resolution: {integrity: sha512-fgAN3jGAh+RoxUGZHTSOLJIqUc2wmoBwGR4tbpNAKmmovFoWq0OdRkb0VkldReO2a2iBT/OEulG9XSUc10r3zg==} - - node-addon-api@2.0.2: - resolution: {integrity: sha512-Ntyt4AIXyaLIuMHF6IOoTakB3K+RWxwtsHNRxllEoA6vPwP9o4866g6YWDLUdnucilZhmkxiHwHr11gAENw+QA==} - - node-addon-api@5.1.0: - resolution: {integrity: sha512-eh0GgfEkpnoWDq+VY8OyvYhFEzBk6jIYbRKdIlyTiAXIVJ8PyBaKb0rp7oDtoddbdoHWhq8wwr+XZ81F1rpNdA==} - - node-emoji@1.11.0: - resolution: {integrity: sha512-wo2DpQkQp7Sjm2A0cq+sN7EHKO6Sl0ctXeBdFZrL9T9+UywORbufTcTZxom8YqpLQt/FqNMUkOpkZrJVYSKD3A==} - - node-fetch@2.7.0: - resolution: {integrity: sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A==} - engines: {node: 4.x || >=6.0.0} - peerDependencies: - encoding: ^0.1.0 - peerDependenciesMeta: - encoding: - optional: true - - node-forge@1.3.1: - resolution: {integrity: sha512-dPEtOeMvF9VMcYV/1Wb8CPoVAXtp6MKMlcbAt4ddqmGqUJ6fQZFXkNZNkNlfevtNkGtaSoXf/vNNNSvgrdXwtA==} - engines: {node: '>= 6.13.0'} - - node-gyp-build@4.8.2: - resolution: {integrity: sha512-IRUxE4BVsHWXkV/SFOut4qTlagw2aM8T5/vnTsmrHJvVoKueJHRc/JaFND7QDDc61kLYUJ6qlZM3sqTSyx2dTw==} - hasBin: true - - node-preload@0.2.1: - resolution: {integrity: sha512-RM5oyBy45cLEoHqCeh+MNuFAxO0vTFBLskvQbOKnEE7YTTSN4tbN8QWDIPQ6L+WvKsB/qLEGpYe2ZZ9d4W9OIQ==} - engines: {node: '>=8'} - - node-releases@2.0.18: - resolution: {integrity: sha512-d9VeXT4SJ7ZeOqGX6R5EM022wpL+eWPooLI+5UpWn2jCT1aosUQEhQP214x33Wkwx3JQMvIm+tIoVOdodFS40g==} - - nofilter@3.1.0: - resolution: {integrity: sha512-l2NNj07e9afPnhAhvgVrCD/oy2Ai1yfLpuo3EpiO1jFTsB4sFz6oIfAfSZyQzVpkZQ9xS8ZS5g1jCBgq4Hwo0g==} - engines: {node: '>=12.19'} - - nopt@3.0.6: - resolution: {integrity: sha512-4GUt3kSEYmk4ITxzB/b9vaIDfUVWN/Ml1Fwl11IlnIG2iaJ9O6WXZ9SrYM9NLI8OCBieN2Y8SWC2oJV0RQ7qYg==} - hasBin: true - - nopt@5.0.0: - resolution: {integrity: sha512-Tbj67rffqceeLpcRXrT7vKAN8CwfPeIBgM7E6iBkmKLV7bEMwpGgYLGv0jACUsECaa/vuxP0IjEont6umdMgtQ==} - engines: {node: '>=6'} - hasBin: true - - normalize-path@2.1.1: - resolution: {integrity: sha512-3pKJwH184Xo/lnH6oyP1q2pMd7HcypqqmRs91/6/i2CGtWwIKGCkOOMTm/zXbgTEWHw1uNpNi/igc3ePOYHb6w==} - engines: {node: '>=0.10.0'} - - normalize-path@3.0.0: - resolution: {integrity: sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==} - engines: {node: '>=0.10.0'} - - normalize-url@6.1.0: - resolution: {integrity: sha512-DlL+XwOy3NxAQ8xuC0okPgK46iuVNAK01YN7RueYBqqFeGsBjV9XmCAzAdgt+667bCl5kPh9EqKKDwnaPG1I7A==} - engines: {node: '>=10'} - - npm-bundled@1.1.2: - resolution: {integrity: sha512-x5DHup0SuyQcmL3s7Rx/YQ8sbw/Hzg0rj48eN0dV7hf5cmQq5PXIeioroH3raV1QC1yh3uTYuMThvEQF3iKgGQ==} - - npm-normalize-package-bin@1.0.1: - resolution: {integrity: sha512-EPfafl6JL5/rU+ot6P3gRSCpPDW5VmIzX959Ob1+ySFUuuYHWHekXpwdUZcKP5C+DS4GEtdJluwBjnsNDl+fSA==} - - npm-packlist@2.2.2: - resolution: {integrity: sha512-Jt01acDvJRhJGthnUJVF/w6gumWOZxO7IkpY/lsX9//zqQgnF7OJaxgQXcerd4uQOLu7W5bkb4mChL9mdfm+Zg==} - engines: {node: '>=10'} - hasBin: true - - npm-run-path@2.0.2: - resolution: {integrity: sha512-lJxZYlT4DW/bRUtFh1MQIWqmLwQfAxnqWG4HhEdjMlkrJYnJn0Jrr2u3mgxqaWsdiBc76TYkTG/mhrnYTuzfHw==} - engines: {node: '>=4'} - - npmlog@5.0.1: - resolution: {integrity: sha512-AqZtDUWOMKs1G/8lwylVjrdYgqA4d9nu8hc+0gzRxlDb1I10+FHBGMXs6aiQHFdCUUlqH99MUMuLfzWDNDtfxw==} - deprecated: This package is no longer supported. - - nth-check@2.1.1: - resolution: {integrity: sha512-lqjrjmaOoAnWfMmBPL+XNnynZh2+swxiX3WUE0s4yEHI6m+AwrK2UZOimIRl3X/4QctVqS8AiZjFqyOGrMXb/w==} - - number-to-bn@1.7.0: - resolution: {integrity: sha512-wsJ9gfSz1/s4ZsJN01lyonwuxA1tml6X1yBDnfpMglypcBRFZZkus26EdPSlqS5GJfYddVZa22p3VNb3z5m5Ig==} - engines: {node: '>=6.5.0', npm: '>=3'} - - nyc@15.1.0: - resolution: {integrity: sha512-jMW04n9SxKdKi1ZMGhvUTHBN0EICCRkHemEoE5jm6mTYcqcdas0ATzgUgejlQUHMvpnOZqGB5Xxsv9KxJW1j8A==} - engines: {node: '>=8.9'} - hasBin: true - - nyc@17.1.0: - resolution: {integrity: sha512-U42vQ4czpKa0QdI1hu950XuNhYqgoM+ZF1HT+VuUHL9hPfDPVvNQyltmMqdE9bUHMVa+8yNbc3QKTj8zQhlVxQ==} - engines: {node: '>=18'} - hasBin: true - - oauth-sign@0.9.0: - resolution: {integrity: sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ==} - - object-assign@4.1.1: - resolution: {integrity: sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==} - engines: {node: '>=0.10.0'} - - object-copy@0.1.0: - resolution: {integrity: sha512-79LYn6VAb63zgtmAteVOWo9Vdj71ZVBy3Pbse+VqxDpEP83XuujMrGqHIwAXJ5I/aM0zU7dIyIAhifVTPrNItQ==} - engines: {node: '>=0.10.0'} - - object-inspect@1.13.2: - resolution: {integrity: sha512-IRZSRuzJiynemAXPYtPe5BoI/RESNYR7TYm50MC5Mqbd3Jmw5y790sErYw3V6SryFJD64b74qQQs9wn5Bg/k3g==} - engines: {node: '>= 0.4'} - - object-inspect@1.13.4: - resolution: {integrity: sha512-W67iLl4J2EXEGTbfeHCffrjDfitvLANg0UlX3wFUUSTx92KXRFegMHUVgSqE+wvhAbi4WqjGg9czysTV2Epbew==} - engines: {node: '>= 0.4'} - - object-is@1.1.6: - resolution: {integrity: sha512-F8cZ+KfGlSGi09lJT7/Nd6KJZ9ygtvYC0/UYYLI9nmQKLMnydpB9yvbv9K1uSkEu7FU9vYPmVwLg328tX+ot3Q==} - engines: {node: '>= 0.4'} - - object-keys@1.1.1: - resolution: {integrity: sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==} - engines: {node: '>= 0.4'} - - object-visit@1.0.1: - resolution: {integrity: sha512-GBaMwwAVK9qbQN3Scdo0OyvgPW7l3lnaVMj84uTOZlswkX0KpF6fyDBJhtTthf7pymztoN36/KEr1DyhF96zEA==} - engines: {node: '>=0.10.0'} - - object.assign@4.1.5: - resolution: {integrity: sha512-byy+U7gp+FVwmyzKPYhW2h5l3crpmGsxl7X2s8y43IgxvG4g3QZ6CffDtsNQy1WsmZpQbO+ybo0AlW7TY6DcBQ==} - engines: {node: '>= 0.4'} - - object.fromentries@2.0.8: - resolution: {integrity: sha512-k6E21FzySsSK5a21KRADBd/NGneRegFO5pLHfdQLpRDETUNJueLXs3WCzyQ3tFRDYgbq3KHGXfTbi2bs8WQ6rQ==} - engines: {node: '>= 0.4'} - - object.groupby@1.0.3: - resolution: {integrity: sha512-+Lhy3TQTuzXI5hevh8sBGqbmurHbbIjAi0Z4S63nthVLmLxfbj4T54a4CfZrXIrt9iP4mVAPYMo/v99taj3wjQ==} - engines: {node: '>= 0.4'} - - object.pick@1.3.0: - resolution: {integrity: sha512-tqa/UMy/CCoYmj+H5qc07qvSL9dqcs/WZENZ1JbtWBlATP+iVOe778gE6MSijnyCnORzDuX6hU+LA4SZ09YjFQ==} - engines: {node: '>=0.10.0'} - - object.values@1.2.0: - resolution: {integrity: sha512-yBYjY9QX2hnRmZHAjG/f13MzmBzxzYgQhFrke06TTyKY5zSTEqkOeukBzIdVA3j3ulu8Qa3MbVFShV7T2RmGtQ==} - engines: {node: '>= 0.4'} - - obliterator@2.0.4: - resolution: {integrity: sha512-lgHwxlxV1qIg1Eap7LgIeoBWIMFibOjbrYPIPJZcI1mmGAI2m3lNYpK12Y+GBdPQ0U1hRwSord7GIaawz962qQ==} - - oboe@2.1.5: - resolution: {integrity: sha512-zRFWiF+FoicxEs3jNI/WYUrVEgA7DeET/InK0XQuudGHRg8iIob3cNPrJTKaz4004uaA9Pbe+Dwa8iluhjLZWA==} - - obuf@1.1.2: - resolution: {integrity: sha512-PX1wu0AmAdPqOL1mWhqmlOd8kOIZQwGZw6rh7uby9fTc5lhaOWFLX3I6R1hrF9k3zUY40e6igsLGkDXK92LJNg==} - - on-finished@2.3.0: - resolution: {integrity: sha512-ikqdkGAAyf/X/gPhXGvfgAytDZtDbr+bkNUJ0N9h5MI/dmdgCs3l6hoHrcUv41sRKew3jIwrp4qQDXiK99Utww==} - engines: {node: '>= 0.8'} - - on-finished@2.4.1: - resolution: {integrity: sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg==} - engines: {node: '>= 0.8'} - - on-headers@1.0.2: - resolution: {integrity: sha512-pZAE+FJLoyITytdqK0U5s+FIpjN0JP3OzFi/u8Rx+EV5/W+JTWGXG8xFzevE7AjBfDqHv/8vL8qQsIhHnqRkrA==} - engines: {node: '>= 0.8'} - - once@1.4.0: - resolution: {integrity: sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==} - - opn@5.5.0: - resolution: {integrity: sha512-PqHpggC9bLV0VeWcdKhkpxY+3JTzetLSqTCWL/z/tFIbI6G8JCjondXklT1JinczLz2Xib62sSp0T/gKT4KksA==} - engines: {node: '>=4'} - - optionator@0.8.3: - resolution: {integrity: sha512-+IW9pACdk3XWmmTXG8m3upGUJst5XRGzxMRjXzAuJ1XnIFNvfhjjIuYkDvysnPQ7qzqVzLt78BCruntqRhWQbA==} - engines: {node: '>= 0.8.0'} - - optionator@0.9.4: - resolution: {integrity: sha512-6IpQ7mKUxRcZNLIObR0hz7lxsapSSIYNZJwXPGeF0mTVqGKFIXj1DQcMoT22S3ROcLyY/rz0PWaWZ9ayWmad9g==} - engines: {node: '>= 0.8.0'} - - ordinal@1.0.3: - resolution: {integrity: sha512-cMddMgb2QElm8G7vdaa02jhUNbTSrhsgAGUz1OokD83uJTwSUn+nKoNoKVVaRa08yF6sgfO7Maou1+bgLd9rdQ==} - - os-tmpdir@1.0.2: - resolution: {integrity: sha512-D2FR03Vir7FIu45XBY20mTb+/ZSWB00sjU9jdQXt83gDrI4Ztz5Fs7/yy74g2N5SVQY4xY1qDr4rNddwYRVX0g==} - engines: {node: '>=0.10.0'} - - outdent@0.5.0: - resolution: {integrity: sha512-/jHxFIzoMXdqPzTaCpFzAAWhpkSjZPF4Vsn6jAfNpmbH/ymsmd7Qc6VE9BGn0L6YMj6uwpQLxCECpus4ukKS9Q==} - - p-cancelable@2.1.1: - resolution: {integrity: sha512-BZOr3nRQHOntUjTrH8+Lh54smKHoHyur8We1V8DSMVrl5A2malOOwuJRnKRDjSnkoeBh4at6BwEnb5I7Jl31wg==} - engines: {node: '>=8'} - - p-cancelable@3.0.0: - resolution: {integrity: sha512-mlVgR3PGuzlo0MmTdk4cXqXWlwQDLnONTAg6sm62XkMJEiRxN3GL3SffkYvqwonbkJBcrI7Uvv5Zh9yjvn2iUw==} - engines: {node: '>=12.20'} - - p-filter@2.1.0: - resolution: {integrity: sha512-ZBxxZ5sL2HghephhpGAQdoskxplTwr7ICaehZwLIlfL6acuVgZPm8yBNuRAFBGEqtD/hmUeq9eqLg2ys9Xr/yw==} - engines: {node: '>=8'} - - p-finally@1.0.0: - resolution: {integrity: sha512-LICb2p9CB7FS+0eR1oqWnHhp0FljGLZCWBE9aix0Uye9W8LTQPwMTYVGWQWIw9RdQiDg4+epXQODwIYJtSJaow==} - engines: {node: '>=4'} - - p-limit@1.3.0: - resolution: {integrity: sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q==} - engines: {node: '>=4'} - - p-limit@2.3.0: - resolution: {integrity: sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==} - engines: {node: '>=6'} - - p-limit@3.1.0: - resolution: {integrity: sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==} - engines: {node: '>=10'} - - p-limit@4.0.0: - resolution: {integrity: sha512-5b0R4txpzjPWVw/cXXUResoD4hb6U/x9BH08L7nw+GN1sezDzPdxeRvpc9c433fZhBan/wusjbCsqwqm4EIBIQ==} - engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} - - p-locate@2.0.0: - resolution: {integrity: sha512-nQja7m7gSKuewoVRen45CtVfODR3crN3goVQ0DDZ9N3yHxgpkuBhZqsaiotSQRrADUrne346peY7kT3TSACykg==} - engines: {node: '>=4'} - - p-locate@3.0.0: - resolution: {integrity: sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==} - engines: {node: '>=6'} - - p-locate@4.1.0: - resolution: {integrity: sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==} - engines: {node: '>=8'} - - p-locate@5.0.0: - resolution: {integrity: sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==} - engines: {node: '>=10'} - - p-locate@6.0.0: - resolution: {integrity: sha512-wPrq66Llhl7/4AGC6I+cqxT07LhXvWL08LNXz1fENOw0Ap4sRZZ/gZpTTJ5jpurzzzfS2W/Ge9BY3LgLjCShcw==} - engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} - - p-map@2.1.0: - resolution: {integrity: sha512-y3b8Kpd8OAN444hxfBbFfj1FY/RjtTd8tzYwhUqNYXx0fXx2iX4maP4Qr6qhIKbQXI02wTLAda4fYUbDagTUFw==} - engines: {node: '>=6'} - - p-map@3.0.0: - resolution: {integrity: sha512-d3qXVTF/s+W+CdJ5A29wywV2n8CQQYahlgz2bFiA+4eVNJbHJodPZ+/gXwPGh0bOqA+j8S+6+ckmvLGPk1QpxQ==} - engines: {node: '>=8'} - - p-map@4.0.0: - resolution: {integrity: sha512-/bjOqmgETBYB5BoEeGVea8dmvHb2m9GLy1E9W43yeyfP6QQCZGFNa+XRceJEuDB6zqr+gKpIAmlLebMpykw/MQ==} - engines: {node: '>=10'} - - p-map@7.0.2: - resolution: {integrity: sha512-z4cYYMMdKHzw4O5UkWJImbZynVIo0lSGTXc7bzB1e/rrDqkgGUNysK/o4bTr+0+xKvvLoTyGqYC4Fgljy9qe1Q==} - engines: {node: '>=18'} - - p-retry@3.0.1: - resolution: {integrity: sha512-XE6G4+YTTkT2a0UWb2kjZe8xNwf8bIbnqpc/IS/idOBVhyves0mK5OJgeocjx7q5pvX/6m23xuzVPYT1uGM73w==} - engines: {node: '>=6'} - - p-try@1.0.0: - resolution: {integrity: sha512-U1etNYuMJoIz3ZXSrrySFjsXQTWOx2/jdi86L+2pRvph/qMKL6sbcCYdH23fqsbm8TH2Gn0OybpT4eSFlCVHww==} - engines: {node: '>=4'} - - p-try@2.2.0: - resolution: {integrity: sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==} - engines: {node: '>=6'} - - pac-proxy-agent@7.0.2: - resolution: {integrity: sha512-BFi3vZnO9X5Qt6NRz7ZOaPja3ic0PhlsmCRYLOpN11+mWBCR6XJDqW5RF3j8jm4WGGQZtBA+bTfxYzeKW73eHg==} - engines: {node: '>= 14'} - - pac-proxy-agent@7.1.0: - resolution: {integrity: sha512-Z5FnLVVZSnX7WjBg0mhDtydeRZ1xMcATZThjySQUHqr+0ksP8kqaw23fNKkaaN/Z8gwLUs/W7xdl0I75eP2Xyw==} - engines: {node: '>= 14'} - - pac-resolver@7.0.1: - resolution: {integrity: sha512-5NPgf87AT2STgwa2ntRMr45jTKrYBGkVU36yT0ig/n/GMAa3oPqhZfIQ2kMEimReg0+t9kZViDVZ83qfVUlckg==} - engines: {node: '>= 14'} - - package-config@5.0.0: - resolution: {integrity: sha512-GYTTew2slBcYdvRHqjhwaaydVMvn/qrGC323+nKclYioNSLTDUM/lGgtGTgyHVtYcozb+XkE8CNhwcraOmZ9Mg==} - engines: {node: '>=18'} - - package-hash@4.0.0: - resolution: {integrity: sha512-whdkPIooSu/bASggZ96BWVvZTRMOFxnyUG5PnTSGKoJE2gd5mbVNmR2Nj20QFzxYYgAXpoqC+AiXzl+UMRh7zQ==} - engines: {node: '>=8'} - - package-json-from-dist@1.0.1: - resolution: {integrity: sha512-UEZIS3/by4OC8vL3P2dTXRETpebLI2NiI5vIrjaD/5UtrkFX/tNbwjTSRAGC/+7CAo2pIcBaRgWmcBBHcsaCIw==} - - package-manager-detector@0.2.2: - resolution: {integrity: sha512-VgXbyrSNsml4eHWIvxxG/nTL4wgybMTXCV2Un/+yEc3aDKKU6nQBZjbeP3Pl3qm9Qg92X/1ng4ffvCeD/zwHgg==} - - param-case@3.0.4: - resolution: {integrity: sha512-RXlj7zCYokReqWpOPH9oYivUzLYZ5vAPIfEmCTNViosC78F8F0H9y7T7gG2M39ymgutxF5gcFEsyZQSph9Bp3A==} - - parent-module@1.0.1: - resolution: {integrity: sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==} - engines: {node: '>=6'} - - parse-cache-control@1.0.1: - resolution: {integrity: sha512-60zvsJReQPX5/QP0Kzfd/VrpjScIQ7SHBW6bFCYfEP+fp0Eppr1SHhIO5nd1PjZtvclzSzES9D/p5nFJurwfWg==} - - parse-glob@3.0.4: - resolution: {integrity: sha512-FC5TeK0AwXzq3tUBFtH74naWkPQCEWs4K+xMxWZBlKDWu0bVHXGZa+KKqxKidd7xwhdZ19ZNuF2uO1M/r196HA==} - engines: {node: '>=0.10.0'} - - parse-headers@2.0.5: - resolution: {integrity: sha512-ft3iAoLOB/MlwbNXgzy43SWGP6sQki2jQvAyBg/zDFAgr9bfNWZIUj42Kw2eJIl8kEi4PbgE6U1Zau/HwI75HA==} - - parse-json@5.2.0: - resolution: {integrity: sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg==} - engines: {node: '>=8'} - - parse-ms@4.0.0: - resolution: {integrity: sha512-TXfryirbmq34y8QBwgqCVLi+8oA3oWx2eAnSn62ITyEhEYaWRlVZ2DvMM9eZbMs/RfxPu/PK/aBLyGj4IrqMHw==} - engines: {node: '>=18'} - - parse-multipart-data@1.5.0: - resolution: {integrity: sha512-ck5zaMF0ydjGfejNMnlo5YU2oJ+pT+80Jb1y4ybanT27j+zbVP/jkYmCrUGsEln0Ox/hZmuvgy8Ra7AxbXP2Mw==} - - parseurl@1.3.3: - resolution: {integrity: sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==} - engines: {node: '>= 0.8'} - - pascal-case@3.1.2: - resolution: {integrity: sha512-uWlGT3YSnK9x3BQJaOdcZwrnV6hPpd8jFH1/ucpiLRPh/2zCVJKS19E4GvYHvaCcACn3foXZ0cLB9Wrx1KGe5g==} - - pascalcase@0.1.1: - resolution: {integrity: sha512-XHXfu/yOQRy9vYOtUDVMN60OEJjW013GoObG1o+xwQTpB9eYJX/BjXMsdW13ZDPruFhYYn0AG22w0xgQMwl3Nw==} - engines: {node: '>=0.10.0'} - - path-exists@3.0.0: - resolution: {integrity: sha512-bpC7GYwiDYQ4wYLe+FA8lhRjhQCMcQGuSgGGqDkg/QerRWw9CmGRT0iSOVRSZJ29NMLZgIzqaljJ63oaL4NIJQ==} - engines: {node: '>=4'} - - path-exists@4.0.0: - resolution: {integrity: sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==} - engines: {node: '>=8'} - - path-exists@5.0.0: - resolution: {integrity: sha512-RjhtfwJOxzcFmNOi6ltcbcu4Iu+FL3zEj83dk4kAS+fVpTxXLO1b38RvJgT/0QwvV/L3aY9TAnyv0EOqW4GoMQ==} - engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} - - path-is-absolute@1.0.1: - resolution: {integrity: sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==} - engines: {node: '>=0.10.0'} - - path-is-inside@1.0.2: - resolution: {integrity: sha512-DUWJr3+ULp4zXmol/SZkFf3JGsS9/SIv+Y3Rt93/UjPpDpklB5f1er4O3POIbUuUJ3FXgqte2Q7SrU6zAqwk8w==} - - path-key@2.0.1: - resolution: {integrity: sha512-fEHGKCSmUSDPv4uoj8AlD+joPlq3peND+HRYyxFz4KPw4z926S/b8rIuFs2FYJg3BwsxJf6A9/3eIdLaYC+9Dw==} - engines: {node: '>=4'} - - path-key@3.1.1: - resolution: {integrity: sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==} - engines: {node: '>=8'} - - path-parse@1.0.7: - resolution: {integrity: sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==} - - path-scurry@2.0.0: - resolution: {integrity: sha512-ypGJsmGtdXUOeM5u93TyeIEfEhM6s+ljAhrk5vAvSx8uyY/02OvrZnA0YNGUrPXfpJMgI1ODd3nwz8Npx4O4cg==} - engines: {node: 20 || >=22} - - path-to-regexp@0.1.10: - resolution: {integrity: sha512-7lf7qcQidTku0Gu3YDPc8DJ1q7OOucfa/BSsIwjuh56VU7katFvuM8hULfkwB3Fns/rsVF7PwPKVw1sl5KQS9w==} - - path-type@4.0.0: - resolution: {integrity: sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==} - engines: {node: '>=8'} - - path-type@5.0.0: - resolution: {integrity: sha512-5HviZNaZcfqP95rwpv+1HDgUamezbqdSYTyzjTvwtJSnIH+3vnbmWsItli8OFEndS984VT55M3jduxZbX351gg==} - engines: {node: '>=12'} - - pathval@1.1.1: - resolution: {integrity: sha512-Dp6zGqpTdETdR63lehJYPeIOqpiNBNtc7BpWSLrOje7UaIsE5aY92r/AunQA7rsXvet3lrJ3JnZX29UPTKXyKQ==} - - pbkdf2@3.1.2: - resolution: {integrity: sha512-iuh7L6jA7JEGu2WxDwtQP1ddOpaJNC4KlDEFfdQajSGgGPNi4OyDc2R7QnbY2bR9QjBVGwgvTdNJZoE7RaxUMA==} - engines: {node: '>=0.12'} - - pend@1.2.0: - resolution: {integrity: sha512-F3asv42UuXchdzt+xXqfW1OGlVBe+mxa2mqI0pg5yAHZPvFmY3Y6drSf/GQ1A86WgWEN9Kzh/WrgKa6iGcHXLg==} - - performance-now@2.1.0: - resolution: {integrity: sha512-7EAHlyLHI56VEIdK57uwHdHKIaAGbnXPiw0yWbarQZOKaKpvUIgW0jWRVLiatnM+XXlSwsanIBH/hzGMJulMow==} - - picocolors@1.1.1: - resolution: {integrity: sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==} - - picomatch@2.3.1: - resolution: {integrity: sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==} - engines: {node: '>=8.6'} - - picomatch@3.0.1: - resolution: {integrity: sha512-I3EurrIQMlRc9IaAZnqRR044Phh2DXY+55o7uJ0V+hYZAcQYSuFWsc9q5PvyDHUSCe1Qxn/iBz+78s86zWnGag==} - engines: {node: '>=10'} - - pify@2.3.0: - resolution: {integrity: sha512-udgsAY+fTnvv7kI7aaxbqwWNb0AHiB0qBO89PZKPkoTmGOgdbrHDKD+0B2X4uTfJ/FT1R09r9gTsjUjNJotuog==} - engines: {node: '>=0.10.0'} - - pify@4.0.1: - resolution: {integrity: sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==} - engines: {node: '>=6'} - - pify@5.0.0: - resolution: {integrity: sha512-eW/gHNMlxdSP6dmG6uJip6FXN0EQBwm2clYYd8Wul42Cwu/DK8HEftzsapcNdYe2MfLiIwZqsDk2RDEsTE79hA==} - engines: {node: '>=10'} - - pinkie-promise@2.0.1: - resolution: {integrity: sha512-0Gni6D4UcLTbv9c57DfxDGdr41XfgUjqWZu492f0cIGr16zDU06BWP/RAEvOuo7CQ0CNjHaLlM59YJJFm3NWlw==} - engines: {node: '>=0.10.0'} - - pinkie@2.0.4: - resolution: {integrity: sha512-MnUuEycAemtSaeFSjXKW/aroV7akBbY+Sv+RkyqFjgAe73F+MR0TBWKBRDkmfWq/HiFmdavfZ1G7h4SPZXaCSg==} - engines: {node: '>=0.10.0'} - - pirates@4.0.6: - resolution: {integrity: sha512-saLsH7WeYYPiD25LDuLRRY/i+6HaPYr6G1OUlN39otzkSTxKnubR9RTxS3/Kk50s1g2JTgFwWQDQyplC5/SHZg==} - engines: {node: '>= 6'} - - pkg-dir@3.0.0: - resolution: {integrity: sha512-/E57AYkoeQ25qkxMj5PBOVgF8Kiu/h7cYS30Z5+R7WaiCCBfLq58ZI/dSeaEKb9WVJV5n/03QwrN3IeWIFllvw==} - engines: {node: '>=6'} - - pkg-dir@4.2.0: - resolution: {integrity: sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ==} - engines: {node: '>=8'} - - pkg-dir@7.0.0: - resolution: {integrity: sha512-Ie9z/WINcxxLp27BKOCHGde4ITq9UklYKDzVo1nhk5sqGEXU3FpkwP5GM2voTGJkGd9B3Otl+Q4uwSOeSUtOBA==} - engines: {node: '>=14.16'} - - plur@5.1.0: - resolution: {integrity: sha512-VP/72JeXqak2KiOzjgKtQen5y3IZHn+9GOuLDafPv0eXa47xq0At93XahYBs26MsifCQ4enGKwbjBTKgb9QJXg==} - engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} - - portfinder@1.0.32: - resolution: {integrity: sha512-on2ZJVVDXRADWE6jnQaX0ioEylzgBpQk8r55NE4wjXW1ZxO+BgDlY6DXwj20i0V8eB4SenDQ00WEaxfiIQPcxg==} - engines: {node: '>= 0.12.0'} - - posix-character-classes@0.1.1: - resolution: {integrity: sha512-xTgYBc3fuo7Yt7JbiuFxSYGToMoz8fLoE6TC9Wx1P/u+LfeThMOAqmuyECnlBaaJb+u1m9hHiXUEtwW4OzfUJg==} - engines: {node: '>=0.10.0'} - - possible-typed-array-names@1.0.0: - resolution: {integrity: sha512-d7Uw+eZoloe0EHDIYoe+bQ5WXnGMOpmiZFTuMWCwpjzzkL2nTjcKiAk4hh8TjnGye2TwWOk3UXucZ+3rbmBa8Q==} - engines: {node: '>= 0.4'} - - prelude-ls@1.1.2: - resolution: {integrity: sha512-ESF23V4SKG6lVSGZgYNpbsiaAkdab6ZgOxe52p7+Kid3W3u3bxR4Vfd/o21dmN7jSt0IwgZ4v5MUd26FEtXE9w==} - engines: {node: '>= 0.8.0'} - - prelude-ls@1.2.1: - resolution: {integrity: sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==} - engines: {node: '>= 0.8.0'} - - prettier-linter-helpers@1.0.0: - resolution: {integrity: sha512-GbK2cP9nraSSUF9N2XwUwqfzlAFlMNYYl+ShE/V+H8a9uNl/oUqB1w2EL54Jh0OlyRSd8RfWYJ3coVS4TROP2w==} - engines: {node: '>=6.0.0'} - - prettier@2.8.8: - resolution: {integrity: sha512-tdN8qQGvNjw4CHbY+XXk0JgCXn9QiF21a55rBe5LJAU+kDyC4WQn4+awm2Xfk2lQMk5fKup9XgzTZtGkjBdP9Q==} - engines: {node: '>=10.13.0'} - hasBin: true - - prettier@3.3.3: - resolution: {integrity: sha512-i2tDNA0O5IrMO757lfrdQZCc2jPNDVntV0m/+4whiDfWaTKfMNgR7Qz0NAeGz/nRqF4m5/6CLzbP4/liHt12Ew==} - engines: {node: '>=14'} - hasBin: true - - pretty-error@4.0.0: - resolution: {integrity: sha512-AoJ5YMAcXKYxKhuJGdcvse+Voc6v1RgnsR3nWcYU7q4t6z0Q6T86sv5Zq8VIRbOWWFpvdGE83LtdSMNd+6Y0xw==} - - pretty-ms@9.1.0: - resolution: {integrity: sha512-o1piW0n3tgKIKCwk2vpM/vOV13zjJzvP37Ioze54YlTHE06m4tjEbzg9WsKkvTuyYln2DHjo5pY4qrZGI0otpw==} - engines: {node: '>=18'} - - process-nextick-args@2.0.1: - resolution: {integrity: sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==} - - process-on-spawn@1.0.0: - resolution: {integrity: sha512-1WsPDsUSMmZH5LeMLegqkPDrsGgsWwk1Exipy2hvB0o/F0ASzbpIctSCcZIK1ykJvtTJULEH+20WOFjMvGnCTg==} - engines: {node: '>=8'} - - process@0.11.10: - resolution: {integrity: sha512-cdGef/drWFoydD1JsMzuFf8100nZl+GT+yacc2bEced5f9Rjk4z+WtFUTBu9PhOi9j/jfmBPu0mMEY4wIdAF8A==} - engines: {node: '>= 0.6.0'} - - progress@2.0.3: - resolution: {integrity: sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==} - engines: {node: '>=0.4.0'} - - promise@8.3.0: - resolution: {integrity: sha512-rZPNPKTOYVNEEKFaq1HqTgOwZD+4/YHS5ukLzQCypkj+OkYx7iv0mA91lJlpPPZ8vMau3IIGj5Qlwrx+8iiSmg==} - - prompts@2.4.2: - resolution: {integrity: sha512-NxNv/kLguCA7p3jE8oL2aEBsrJWgAakBpgmgK6lpPWV+WuOmY6r2/zbAVnP+T8bQlA0nzHXSJSJW0Hq7ylaD2Q==} - engines: {node: '>= 6'} - - proxy-addr@2.0.7: - resolution: {integrity: sha512-llQsMLSUDUPT44jdrU/O37qlnifitDP+ZwrmmZcoSKyLKvtZxpyV0n2/bD/N4tBAAZ/gJEdZU7KMraoK1+XYAg==} - engines: {node: '>= 0.10'} - - proxy-agent@6.5.0: - resolution: {integrity: sha512-TmatMXdr2KlRiA2CyDu8GqR8EjahTG3aY3nXjdzFyoZbmB8hrBsTyMezhULIXKnC0jpfjlmiZ3+EaCzoInSu/A==} - engines: {node: '>= 14'} - - proxy-from-env@1.1.0: - resolution: {integrity: sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==} - - prr@1.0.1: - resolution: {integrity: sha512-yPw4Sng1gWghHQWj0B3ZggWUm4qVbPwPFcRG8KyxiU7J2OHFSoEHKS+EZ3fv5l1t9CyCiop6l/ZYeWbrgoQejw==} - - pseudomap@1.0.2: - resolution: {integrity: sha512-b/YwNhb8lk1Zz2+bXXpS/LK9OisiZZ1SNsSLxN1x2OXVEhW2Ckr/7mWE5vrC1ZTiJlD9g19jWszTmJsB+oEpFQ==} - - psl@1.9.0: - resolution: {integrity: sha512-E/ZsdU4HLs/68gYzgGTkMicWTLPdAftJLfJFlLUAAKZGkStNU72sZjT66SnMDVOfOWY/YAoiD7Jxa9iHvngcag==} - - pump@3.0.2: - resolution: {integrity: sha512-tUPXtzlGM8FE3P0ZL6DVs/3P58k9nk8/jZeQCurTJylQA8qFYzHFfhBJkuqyE0FifOsQ0uKWekiZ5g8wtr28cw==} - - punycode@1.4.1: - resolution: {integrity: sha512-jmYNElW7yvO7TV33CjSmvSiE2yco3bV2czu/OzDKdMNVZQWfxCblURLhf+47syQRBntjfLdd/H0egrzIG+oaFQ==} - - punycode@2.1.0: - resolution: {integrity: sha512-Yxz2kRwT90aPiWEMHVYnEf4+rhwF1tBmmZ4KepCP+Wkium9JxtWnUm1nqGwpiAHr/tnTSeHqr3wb++jgSkXjhA==} - engines: {node: '>=6'} - - punycode@2.3.1: - resolution: {integrity: sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==} - engines: {node: '>=6'} - - puppeteer-core@23.10.3: - resolution: {integrity: sha512-7JG8klL2qHLyH8t2pOmM9zgykhaulUf7cxnmmqupjdwGfNMiGaYehQka20iUB9R/fwVyG8mFMZcsmw1FHrgKVw==} - engines: {node: '>=18'} - - puppeteer@23.10.3: - resolution: {integrity: sha512-ODG+L9vCSPkQ1j+yDtNDdkSsWt2NXNrQO5C8MlwkYgE2hYnXdqVRbBpsHnoP7+EULJJKbWyR2Q4BdfohjQor3A==} - engines: {node: '>=18'} - hasBin: true - - qs@6.13.0: - resolution: {integrity: sha512-+38qI9SOr8tfZ4QmJNplMUxqjbe7LKvvZgWdExBOmd+egZTtjLB67Gu0HRX3u/XOq7UU2Nx6nsjvS16Z9uwfpg==} - engines: {node: '>=0.6'} - - qs@6.14.0: - resolution: {integrity: sha512-YWWTjgABSKcvs/nWBi9PycY/JiPJqOD4JA6o9Sej2AtvSGarXxKC3OQSk4pAarbdQlKAh5D4FCQkJNkW+GAn3w==} - engines: {node: '>=0.6'} - - qs@6.5.3: - resolution: {integrity: sha512-qxXIEh4pCGfHICj1mAJQ2/2XVZkjCDTcEgfoSQxc/fYivUZxTkk7L3bDBJSoNrEzXI17oUO5Dp07ktqE5KzczA==} - engines: {node: '>=0.6'} - - query-string@5.1.1: - resolution: {integrity: sha512-gjWOsm2SoGlgLEdAGt7a6slVOk9mGiXmPFMqrEhLQ68rhQuBnpfs3+EmlvqKyxnCo9/PPlF+9MtY02S1aFg+Jw==} - engines: {node: '>=0.10.0'} - - querystringify@2.2.0: - resolution: {integrity: sha512-FIqgj2EUvTa7R50u0rGsyTftzjYmv/a3hO345bZNrqabNqjtgiDMgmo4mkUjd+nzU5oF3dClKqFIPUKybUyqoQ==} - - queue-microtask@1.2.3: - resolution: {integrity: sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==} - - queue-tick@1.0.1: - resolution: {integrity: sha512-kJt5qhMxoszgU/62PLP1CJytzd2NKetjSRnyuj31fDd3Rlcz3fzlFdFLD1SItunPwyqEOkca6GbV612BWfaBag==} - - quick-lru@5.1.1: - resolution: {integrity: sha512-WuyALRjWPDGtt/wzJiadO5AXY+8hZ80hVpe6MyivgraREW751X3SbhRvG3eLKOYN+8VEvqLcf3wdnt44Z4S4SA==} - engines: {node: '>=10'} - - randombytes@2.1.0: - resolution: {integrity: sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==} - - range-parser@1.2.1: - resolution: {integrity: sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==} - engines: {node: '>= 0.6'} - - raw-body@2.5.2: - resolution: {integrity: sha512-8zGqypfENjCIqGhgXToC8aB2r7YrBX+AQAfIPs/Mlk+BtPTztOvTS01NRW/3Eh60J+a48lt8qsCzirQ6loCVfA==} - engines: {node: '>= 0.8'} - - react-native-keychain@8.2.0: - resolution: {integrity: sha512-SkRtd9McIl1Ss2XSWNLorG+KMEbgeVqX+gV+t3u1EAAqT8q2/OpRmRbxpneT2vnb/dMhiU7g6K/pf3nxLUXRvA==} - - read-tls-client-hello@1.0.1: - resolution: {integrity: sha512-OvSzfVv6Y656ekUxB7aDhWkLW7y1ck16ChfLFNJhKNADFNweH2fvyiEZkGmmdtXbOtlNuH2zVXZoFCW349M+GA==} - engines: {node: '>=12.0.0'} - - read-yaml-file@1.1.0: - resolution: {integrity: sha512-VIMnQi/Z4HT2Fxuwg5KrY174U1VdUIASQVWXXyqtNRtxSr9IYkn1rsI6Tb6HsrHCmB7gVpNwX6JxPTHcH6IoTA==} - engines: {node: '>=6'} - - readable-stream@2.3.8: - resolution: {integrity: sha512-8p0AUk4XODgIewSi0l8Epjs+EVnWiK7NoDIEGU0HhE7+ZyY8D1IMY7odu5lRrFXGg71L15KG8QrPmum45RTtdA==} - - readable-stream@3.6.2: - resolution: {integrity: sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==} - engines: {node: '>= 6'} - - readdirp@2.2.1: - resolution: {integrity: sha512-1JU/8q+VgFZyxwrJ+SVIOsh+KywWGpds3NTqikiKpDMZWScmAYyKIgqkO+ARvNWJfXeXR1zxz7aHF4u4CyH6vQ==} - engines: {node: '>=0.10'} - - readdirp@3.6.0: - resolution: {integrity: sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==} - engines: {node: '>=8.10.0'} - - readdirp@4.0.2: - resolution: {integrity: sha512-yDMz9g+VaZkqBYS/ozoBJwaBhTbZo3UNYQHNRw1D3UFQB8oHB4uS/tAODO+ZLjGWmUbKnIlOWO+aaIiAxrUWHA==} - engines: {node: '>= 14.16.0'} - - realistic-structured-clone@3.0.0: - resolution: {integrity: sha512-rOjh4nuWkAqf9PWu6JVpOWD4ndI+JHfgiZeMmujYcPi+fvILUu7g6l26TC1K5aBIp34nV+jE1cDO75EKOfHC5Q==} - - rechoir@0.6.2: - resolution: {integrity: sha512-HFM8rkZ+i3zrV+4LQjwQ0W+ez98pApMGM3HUrN04j3CqzPOzl9nmP15Y8YXNm8QHGv/eacOVEjqhmWpkRV0NAw==} - engines: {node: '>= 0.10'} - - rechoir@0.7.1: - resolution: {integrity: sha512-/njmZ8s1wVeR6pjTZ+0nCnv8SpZNRMT2D1RLOJQESlYFDBvwpTA4KWJpZ+sBJ4+vhjILRcK7JIFdGCdxEAAitg==} - engines: {node: '>= 0.10'} - - recursive-readdir@2.2.3: - resolution: {integrity: sha512-8HrF5ZsXk5FAH9dgsx3BlUer73nIhuj+9OrQwEbLTPOBzGkL1lsFCR01am+v+0m2Cmbs1nP12hLDl5FA7EszKA==} - engines: {node: '>=6.0.0'} - - reduce-flatten@2.0.0: - resolution: {integrity: sha512-EJ4UNY/U1t2P/2k6oqotuX2Cc3T6nxJwsM0N0asT7dhrtH1ltUxDn4NalSYmPE2rCkVpcf/X6R0wDwcFpzhd4w==} - engines: {node: '>=6'} - - regenerate-unicode-properties@10.2.0: - resolution: {integrity: sha512-DqHn3DwbmmPVzeKj9woBadqmXxLvQoQIwu7nopMc72ztvxVmVk2SBhSnx67zuye5TP+lJsb/TBQsjLKhnDf3MA==} - engines: {node: '>=4'} - - regenerate@1.4.2: - resolution: {integrity: sha512-zrceR/XhGYU/d/opr2EKO7aRHUeiBI8qjtfHqADTwZd6Szfy16la6kqD0MIUs5z5hx6AaKa+PixpPrR289+I0A==} - - regenerator-runtime@0.14.1: - resolution: {integrity: sha512-dYnhHh0nJoMfnkZs6GmmhFknAGRrLznOu5nc9ML+EJxGvrx6H7teuevqVqCuPcPK//3eDrrjQhehXVx9cnkGdw==} - - regenerator-transform@0.15.2: - resolution: {integrity: sha512-hfMp2BoF0qOk3uc5V20ALGDS2ddjQaLrdl7xrGXvAIow7qeWRM2VA2HuCHkUKk9slq3VwEwLNK3DFBqDfPGYtg==} - - regex-not@1.0.2: - resolution: {integrity: sha512-J6SDjUgDxQj5NusnOtdFxDwN/+HWykR8GELwctJ7mdqhcyy1xEc4SRFHUXvxTp661YaVKAjfRLZ9cCqS6tn32A==} - engines: {node: '>=0.10.0'} - - regexp.prototype.flags@1.5.3: - resolution: {integrity: sha512-vqlC04+RQoFalODCbCumG2xIOvapzVMHwsyIGM/SIE8fRhFFsXeH8/QQ+s0T0kDAhKc4k30s73/0ydkHQz6HlQ==} - engines: {node: '>= 0.4'} - - regexpu-core@6.1.1: - resolution: {integrity: sha512-k67Nb9jvwJcJmVpw0jPttR1/zVfnKf8Km0IPatrU/zJ5XeG3+Slx0xLXs9HByJSzXzrlz5EDvN6yLNMDc2qdnw==} - engines: {node: '>=4'} - - regjsgen@0.8.0: - resolution: {integrity: sha512-RvwtGe3d7LvWiDQXeQw8p5asZUmfU1G/l6WbUXeHta7Y2PEIvBTwH6E2EfmYUK8pxcxEdEmaomqyp0vZZ7C+3Q==} - - regjsparser@0.11.1: - resolution: {integrity: sha512-1DHODs4B8p/mQHU9kr+jv8+wIC9mtG4eBHxWxIq5mhjE3D5oORhCc6deRKzTjs9DcfRFmj9BHSDguZklqCGFWQ==} - hasBin: true - - relateurl@0.2.7: - resolution: {integrity: sha512-G08Dxvm4iDN3MLM0EsP62EDV9IuhXPR6blNz6Utcp7zyV3tr4HVNINt6MpaRWbxoOHT3Q7YN2P+jaHX8vUbgog==} - engines: {node: '>= 0.10'} - - release-zalgo@1.0.0: - resolution: {integrity: sha512-gUAyHVHPPC5wdqX/LG4LWtRYtgjxyX78oanFNTMMyFEfOqdC54s3eE82imuWKbOeqYht2CrNf64Qb8vgmmtZGA==} - engines: {node: '>=4'} - - remove-trailing-separator@1.1.0: - resolution: {integrity: sha512-/hS+Y0u3aOfIETiaiirUFwDBDzmXPvO+jAfKTitUngIPzdKc6Z0LoFjM/CK5PL4C+eKwHohlHAb6H0VFfmmUsw==} - - renderkid@3.0.0: - resolution: {integrity: sha512-q/7VIQA8lmM1hF+jn+sFSPWGlMkSAeNYcPLmDQx2zzuiDfaLrOmumR8iaUKlenFgh0XRPIUeSPlH3A+AW3Z5pg==} - - repeat-element@1.1.4: - resolution: {integrity: sha512-LFiNfRcSu7KK3evMyYOuCzv3L10TW7yC1G2/+StMjK8Y6Vqd2MG7r/Qjw4ghtuCOjFvlnms/iMmLqpvW/ES/WQ==} - engines: {node: '>=0.10.0'} - - repeat-string@1.6.1: - resolution: {integrity: sha512-PV0dzCYDNfRi1jCDbJzpW7jNNDRuCOG/jI5ctQcGKt/clZD+YcPS3yIlWuTJMmESC8aevCFmWJy5wjAFgNqN6w==} - engines: {node: '>=0.10'} - - req-cwd@2.0.0: - resolution: {integrity: sha512-ueoIoLo1OfB6b05COxAA9UpeoscNpYyM+BqYlA7H6LVF4hKGPXQQSSaD2YmvDVJMkk4UDpAHIeU1zG53IqjvlQ==} - engines: {node: '>=4'} - - req-from@2.0.0: - resolution: {integrity: sha512-LzTfEVDVQHBRfjOUMgNBA+V6DWsSnoeKzf42J7l0xa/B4jyPOuuF5MlNSmomLNGemWTnV2TIdjSSLnEn95fOQA==} - engines: {node: '>=4'} - - request@2.88.2: - resolution: {integrity: sha512-MsvtOrfG9ZcrOwAW+Qi+F6HbD0CWXEh9ou77uOb7FM2WPhwT7smM833PzanhJLsgXjN89Ir6V2PczXNnMpwKhw==} - engines: {node: '>= 6'} - deprecated: request has been deprecated, see https://github.com/request/request/issues/3142 - - require-directory@2.1.1: - resolution: {integrity: sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==} - engines: {node: '>=0.10.0'} - - require-from-string@2.0.2: - resolution: {integrity: sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==} - engines: {node: '>=0.10.0'} - - require-main-filename@2.0.0: - resolution: {integrity: sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg==} - - requires-port@1.0.0: - resolution: {integrity: sha512-KigOCHcocU3XODJxsu8i/j8T9tzT4adHiecwORRQ0ZZFcp7ahwXuRU1m+yuO90C5ZUyGeGfocHDI14M3L3yDAQ==} - - resolve-alpn@1.2.1: - resolution: {integrity: sha512-0a1F4l73/ZFZOakJnQ3FvkJ2+gSTQWz/r2KE5OdDY0TxPm5h4GkqkWWfM47T7HsbnOtcJVEF4epCVy6u7Q3K+g==} - - resolve-cwd@2.0.0: - resolution: {integrity: sha512-ccu8zQTrzVr954472aUVPLEcB3YpKSYR3cg/3lo1okzobPBM+1INXBbBZlDbnI/hbEocnf8j0QVo43hQKrbchg==} - engines: {node: '>=4'} - - resolve-cwd@3.0.0: - resolution: {integrity: sha512-OrZaX2Mb+rJCpH/6CpSqt9xFVpN++x01XnN2ie9g6P5/3xelLAkXWVADpdz1IHD/KFfEXyE6V0U01OQ3UO2rEg==} - engines: {node: '>=8'} - - resolve-from@3.0.0: - resolution: {integrity: sha512-GnlH6vxLymXJNMBo7XP1fJIzBFbdYt49CuTwmB/6N53t+kMPRMFKz783LlQ4tv28XoQfMWinAJX6WCGf2IlaIw==} - engines: {node: '>=4'} - - resolve-from@4.0.0: - resolution: {integrity: sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==} - engines: {node: '>=4'} - - resolve-from@5.0.0: - resolution: {integrity: sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==} - engines: {node: '>=8'} - - resolve-pkg-maps@1.0.0: - resolution: {integrity: sha512-seS2Tj26TBVOC2NIc2rOe2y2ZO7efxITtLZcGSOnHHNOQ7CkiUBfw0Iw2ck6xkIhPwLhKNLS8BO+hEpngQlqzw==} - - resolve-url@0.2.1: - resolution: {integrity: sha512-ZuF55hVUQaaczgOIwqWzkEcEidmlD/xl44x1UZnhOXcYuFN2S6+rcxpG+C1N3So0wvNI3DmJICUFfu2SxhBmvg==} - deprecated: https://github.com/lydell/resolve-url#deprecated - - resolve@1.1.7: - resolution: {integrity: sha512-9znBF0vBcaSN3W2j7wKvdERPwqTxSpCq+if5C0WoTCyV9n24rua28jeuQ2pL/HOf+yUe/Mef+H/5p60K0Id3bg==} - - resolve@1.17.0: - resolution: {integrity: sha512-ic+7JYiV8Vi2yzQGFWOkiZD5Z9z7O2Zhm9XMaTxdJExKasieFCr+yXZ/WmXsckHiKl12ar0y6XiXDx3m4RHn1w==} - - resolve@1.22.10: - resolution: {integrity: sha512-NPRy+/ncIMeDlTAsuqwKIiferiawhefFJtkNSW0qZJEqMEb+qBt/77B/jGeeek+F0uOeN05CDa6HXbbIgtVX4w==} - engines: {node: '>= 0.4'} - hasBin: true - - resolve@1.22.8: - resolution: {integrity: sha512-oKWePCxqpd6FlLvGV1VU0x7bkPmmCNolxzjMf4NczoDnQcIWrAF+cPtZn5i6n+RfD2d9i0tzpKnG6Yk168yIyw==} - hasBin: true - - responselike@2.0.1: - resolution: {integrity: sha512-4gl03wn3hj1HP3yzgdI7d3lCkF95F21Pz4BPGvKHinyQzALR5CapwC8yIi0Rh58DEMQ/SguC03wFj2k0M/mHhw==} - - ret@0.1.15: - resolution: {integrity: sha512-TTlYpa+OL+vMMNG24xSlQGEJ3B/RzEfUlLct7b5G/ytav+wPrplCpVMFuwzXbkecJrb6IYo1iFb0S9v37754mg==} - engines: {node: '>=0.12'} - - retry@0.12.0: - resolution: {integrity: sha512-9LkiTwjUh6rT555DtE9rTX+BKByPfrMzEAtnlEtdEwr3Nkffwiihqe2bWADg+OQRjt9gl6ICdmB/ZFDCGAtSow==} - engines: {node: '>= 4'} - - reusify@1.0.4: - resolution: {integrity: sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==} - engines: {iojs: '>=1.0.0', node: '>=0.10.0'} - - rimraf@2.7.1: - resolution: {integrity: sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w==} - deprecated: Rimraf versions prior to v4 are no longer supported - hasBin: true - - rimraf@3.0.2: - resolution: {integrity: sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==} - deprecated: Rimraf versions prior to v4 are no longer supported - hasBin: true - - rimraf@6.0.1: - resolution: {integrity: sha512-9dkvaxAsk/xNXSJzMgFqqMCuFgt2+KsOFek3TMLfo8NCPfWpBmqwyNn5Y+NX56QUYfCtsyhF3ayiboEoUmJk/A==} - engines: {node: 20 || >=22} - hasBin: true - - ripemd160@2.0.2: - resolution: {integrity: sha512-ii4iagi25WusVoiC4B4lq7pbXfAp3D9v5CwfkY33vffw2+pkDjY1D8GaN7spsxvCSx8dkPqOZCEZyfxcmJG2IA==} - - rlp@2.2.7: - resolution: {integrity: sha512-d5gdPmgQ0Z+AklL2NVXr/IoSjNZFfTVvQWzL/AM2AOcSzYP2xjlb0AC8YyCLc41MSNf6P6QVtjgPdmVtzb+4lQ==} - hasBin: true - - rollup@2.79.2: - resolution: {integrity: sha512-fS6iqSPZDs3dr/y7Od6y5nha8dW1YnbgtsyotCVvoFGKbERG++CVRFv1meyGDE1SNItQA8BrnCw7ScdAhRJ3XQ==} - engines: {node: '>=10.0.0'} - hasBin: true - - run-parallel@1.2.0: - resolution: {integrity: sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==} - - rxjs@7.8.1: - resolution: {integrity: sha512-AA3TVj+0A2iuIoQkWEK/tqFjBq2j+6PO6Y0zJcvzLAFhEFIO3HL0vls9hWLncZbAAbK0mar7oZ4V079I/qPMxg==} - - safe-array-concat@1.1.2: - resolution: {integrity: sha512-vj6RsCsWBCf19jIeHEfkRMw8DPiBb+DMXklQ/1SGDHOMlHdPUkZXFQ2YdplS23zESTijAcurb1aSgJA3AgMu1Q==} - engines: {node: '>=0.4'} - - safe-buffer@5.1.2: - resolution: {integrity: sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==} - - safe-buffer@5.2.1: - resolution: {integrity: sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==} - - safe-regex-test@1.0.3: - resolution: {integrity: sha512-CdASjNJPvRa7roO6Ra/gLYBTzYzzPyyBXxIMdGW3USQLyjWEls2RgW5UBTXaQVp+OrpeCK3bLem8smtmheoRuw==} - engines: {node: '>= 0.4'} - - safe-regex@1.1.0: - resolution: {integrity: sha512-aJXcif4xnaNUzvUuC5gcb46oTS7zvg4jpMTnuqtrEPlR3vFr4pxtdTwaF1Qs3Enjn9HK+ZlwQui+a7z0SywIzg==} - - safer-buffer@2.1.2: - resolution: {integrity: sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==} - - sc-istanbul@0.4.6: - resolution: {integrity: sha512-qJFF/8tW/zJsbyfh/iT/ZM5QNHE3CXxtLJbZsL+CzdJLBsPD7SedJZoUA4d8iAcN2IoMp/Dx80shOOd2x96X/g==} - hasBin: true - - schema-utils@1.0.0: - resolution: {integrity: sha512-i27Mic4KovM/lnGsy8whRCHhc7VicJajAjTrYg11K9zfZXnYIt4k5F+kZkwjnrhKzLic/HLU4j11mjsz2G/75g==} - engines: {node: '>= 4'} - - schema-utils@3.3.0: - resolution: {integrity: sha512-pN/yOAvcC+5rQ5nERGuwrjLlYvLTbCibnZ1I7B1LaiAz9BRBlE9GMgE/eqV30P7aJQUf7Ddimy/RsbYO/GrVGg==} - engines: {node: '>= 10.13.0'} - - schema-utils@4.2.0: - resolution: {integrity: sha512-L0jRsrPpjdckP3oPug3/VxNKt2trR8TcabrM6FOAAlvC/9Phcmm+cuAgTlxBqdBR1WJx7Naj9WHw+aOmheSVbw==} - engines: {node: '>= 12.13.0'} - - scrypt-js@3.0.1: - resolution: {integrity: sha512-cdwTTnqPu0Hyvf5in5asVdZocVDTNRmR7XEcJuIzMjJeSHybHl7vpB66AzwTaIg6CLSbtjcxc8fqcySfnTkccA==} - - secp256k1@4.0.4: - resolution: {integrity: sha512-6JfvwvjUOn8F/jUoBY2Q1v5WY5XS+rj8qSe0v8Y4ezH4InLgTEeOOPQsRll9OV429Pvo6BCHGavIyJfr3TAhsw==} - engines: {node: '>=18.0.0'} - - select-hose@2.0.0: - resolution: {integrity: sha512-mEugaLK+YfkijB4fx0e6kImuJdCIt2LxCRcbEYPqRGCs4F2ogyfZU5IAZRdjCP8JPq2AtdNoC/Dux63d9Kiryg==} - - selfsigned@1.10.14: - resolution: {integrity: sha512-lkjaiAye+wBZDCBsu5BGi0XiLRxeUlsGod5ZP924CRSEoGuZAw/f7y9RKu28rwTfiHVhdavhB0qH0INV6P1lEA==} - - semver@5.7.2: - resolution: {integrity: sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==} - hasBin: true - - semver@6.3.1: - resolution: {integrity: sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==} - hasBin: true - - semver@7.6.3: - resolution: {integrity: sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==} - engines: {node: '>=10'} - hasBin: true - - semver@7.7.1: - resolution: {integrity: sha512-hlq8tAfn0m/61p4BVRcPzIGr6LKiMwo4VM6dGi6pt4qcRkmNzTcWq6eCEjEh+qXjkMDvPlOFFSGwQjoEa6gyMA==} - engines: {node: '>=10'} - hasBin: true - - send@0.19.0: - resolution: {integrity: sha512-dW41u5VfLXu8SJh5bwRmyYUbAoSB3c9uQh6L8h/KtsFREPWpbX1lrljJo186Jc4nmci/sGUZ9a0a0J2zgfq2hw==} - engines: {node: '>= 0.8.0'} - - serialize-error@7.0.1: - resolution: {integrity: sha512-8I8TjW5KMOKsZQTvoxjuSIa7foAwPWGOts+6o7sgjz41/qMD9VQHEDxi6PBvK2l0MXUmqZyNpUK+T2tQaaElvw==} - engines: {node: '>=10'} - - serialize-javascript@6.0.2: - resolution: {integrity: sha512-Saa1xPByTTq2gdeFZYLLo+RFE35NHZkAbqZeWNd3BpzppeVisAqpDjcp8dyf6uIvEqJRd46jemmyA4iFIeVk8g==} - - serve-index@1.9.1: - resolution: {integrity: sha512-pXHfKNP4qujrtteMrSBb0rc8HJ9Ms/GrXwcUtUtD5s4ewDJI8bT3Cz2zTVRMKtri49pLx2e0Ya8ziP5Ya2pZZw==} - engines: {node: '>= 0.8.0'} - - serve-static@1.16.2: - resolution: {integrity: sha512-VqpjJZKadQB/PEbEwvFdO43Ax5dFBZ2UECszz8bQ7pi7wt//PWe1P6MN7eCnjsatYtBT6EuiClbjSWP2WrIoTw==} - engines: {node: '>= 0.8.0'} - - servify@0.1.12: - resolution: {integrity: sha512-/xE6GvsKKqyo1BAY+KxOWXcLpPsUUyji7Qg3bVD7hh1eRze5bR1uYiuDA/k3Gof1s9BTzQZEJK8sNcNGFIzeWw==} - engines: {node: '>=6'} - - set-blocking@2.0.0: - resolution: {integrity: sha512-KiKBS8AnWGEyLzofFfmvKwpdPzqiy16LvQfK3yv/fVH7Bj13/wl3JSR1J+rfgRE9q7xUJK4qvgS8raSOeLUehw==} - - set-function-length@1.2.2: - resolution: {integrity: sha512-pgRc4hJ4/sNjWCSS9AmnS40x3bNMDTknHgL5UaMBTMyJnU90EgWh1Rz+MC9eFu4BuN/UwZjKQuY/1v3rM7HMfg==} - engines: {node: '>= 0.4'} - - set-function-name@2.0.2: - resolution: {integrity: sha512-7PGFlmtwsEADb0WYyvCMa1t+yke6daIG4Wirafur5kcf+MhUnPms1UeR0CKQdTZD81yESwMHbtn+TR+dMviakQ==} - engines: {node: '>= 0.4'} - - set-value@2.0.1: - resolution: {integrity: sha512-JxHc1weCN68wRY0fhCoXpyK55m/XPHafOmK4UWD7m2CI14GMcFypt4w/0+NV5f/ZMby2F6S2wwA7fgynh9gWSw==} - engines: {node: '>=0.10.0'} - - setimmediate@1.0.5: - resolution: {integrity: sha512-MATJdZp8sLqDl/68LfQmbP8zKPLQNV6BIZoIgrscFDQ+RsvK/BxeDQOgyxKKoh0y/8h3BqVFnCqQ/gd+reiIXA==} - - setprototypeof@1.1.0: - resolution: {integrity: sha512-BvE/TwpZX4FXExxOxZyRGQQv651MSwmWKZGqvmPcRIjDqWub67kTKuIMx43cZZrS/cBBzwBcNDWoFxt2XEFIpQ==} - - setprototypeof@1.2.0: - resolution: {integrity: sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==} - - sha.js@2.4.11: - resolution: {integrity: sha512-QMEp5B7cftE7APOjk5Y6xgrbWu+WkLVQwk8JNjZ8nKRciZaByEW6MubieAiToS7+dwvrjGhH8jRXz3MVd0AYqQ==} - hasBin: true - - sha1@1.1.1: - resolution: {integrity: sha512-dZBS6OrMjtgVkopB1Gmo4RQCDKiZsqcpAQpkV/aaj+FCrCg8r4I4qMkDPQjBgLIxlmu9k4nUbWq6ohXahOneYA==} - - shallow-clone@3.0.1: - resolution: {integrity: sha512-/6KqX+GVUdqPuPPd2LxDDxzX6CAbjJehAAOKlNpqqUpAqPM6HeL8f+o3a+JsyGjn2lv0WY8UsTgUJjU9Ok55NA==} - engines: {node: '>=8'} - - shebang-command@1.2.0: - resolution: {integrity: sha512-EV3L1+UQWGor21OmnvojK36mhg+TyIKDh3iFBKBohr5xeXIhNBcx8oWdgkTEEQ+BEFFYdLRuqMfd5L84N1V5Vg==} - engines: {node: '>=0.10.0'} - - shebang-command@2.0.0: - resolution: {integrity: sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==} - engines: {node: '>=8'} - - shebang-regex@1.0.0: - resolution: {integrity: sha512-wpoSFAxys6b2a2wHZ1XpDSgD7N9iVjg29Ph9uV/uaP9Ex/KXlkTZTeddxDPSYQpgvzKLGJke2UU0AzoGCjNIvQ==} - engines: {node: '>=0.10.0'} - - shebang-regex@3.0.0: - resolution: {integrity: sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==} - engines: {node: '>=8'} - - shell-quote@1.8.1: - resolution: {integrity: sha512-6j1W9l1iAs/4xYBI1SYOVZyFcCis9b4KCLQ8fgAGG07QvzaRLVVRQvAy85yNmmZSjYjg4MWh4gNvlPujU/5LpA==} - - shelljs@0.8.5: - resolution: {integrity: sha512-TiwcRcrkhHvbrZbnRcFYMLl30Dfov3HKqzp5tO5b4pt6G/SezKcYhmDg15zXVBswHmctSAQKznqNW2LO5tTDow==} - engines: {node: '>=4'} - hasBin: true - - side-channel-list@1.0.0: - resolution: {integrity: sha512-FCLHtRD/gnpCiCHEiJLOwdmFP+wzCmDEkc9y7NsYxeF4u7Btsn1ZuwgwJGxImImHicJArLP4R0yX4c2KCrMrTA==} - engines: {node: '>= 0.4'} - - side-channel-map@1.0.1: - resolution: {integrity: sha512-VCjCNfgMsby3tTdo02nbjtM/ewra6jPHmpThenkTYh8pG9ucZ/1P8So4u4FGBek/BjpOVsDCMoLA/iuBKIFXRA==} - engines: {node: '>= 0.4'} - - side-channel-weakmap@1.0.2: - resolution: {integrity: sha512-WPS/HvHQTYnHisLo9McqBHOJk2FkHO/tlpvldyrnem4aeQp4hai3gythswg6p01oSoTl58rcpiFAjF2br2Ak2A==} - engines: {node: '>= 0.4'} - - side-channel@1.0.6: - resolution: {integrity: sha512-fDW/EZ6Q9RiO8eFG8Hj+7u/oW+XrPTIChwCOM2+th2A6OblDtYYIpve9m+KvI9Z4C9qSEXlaGR6bTEYHReuglA==} - engines: {node: '>= 0.4'} - - side-channel@1.1.0: - resolution: {integrity: sha512-ZX99e6tRweoUXqR+VBrslhda51Nh5MTQwou5tnUDgbtyM0dBgmhEDtWGP/xbKn6hqfPRHujUNwz5fy/wbbhnpw==} - engines: {node: '>= 0.4'} - - signal-exit@3.0.7: - resolution: {integrity: sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==} - - signal-exit@4.1.0: - resolution: {integrity: sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==} - engines: {node: '>=14'} - - simple-concat@1.0.1: - resolution: {integrity: sha512-cSFtAPtRhljv69IK0hTVZQ+OfE9nePi/rtJmw5UjHeVyVroEqJXP1sFztKUy1qU+xvz3u/sfYJLa947b7nAN2Q==} - - simple-get@2.8.2: - resolution: {integrity: sha512-Ijd/rV5o+mSBBs4F/x9oDPtTx9Zb6X9brmnXvMW4J7IR15ngi9q5xxqWBKU744jTZiaXtxaPL7uHG6vtN8kUkw==} - - sisteransi@1.0.5: - resolution: {integrity: sha512-bLGGlR1QxBcynn2d5YmDX4MGjlZvy2MRBDRNHLJ8VI6l6+9FUiyTFNJ0IveOSP0bcXgVDPRcfGqA0pjaqUpfVg==} - - slash@3.0.0: - resolution: {integrity: sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==} - engines: {node: '>=8'} - - slash@5.1.0: - resolution: {integrity: sha512-ZA6oR3T/pEyuqwMgAKT0/hAv8oAXckzbkmR0UkUosQ+Mc4RxGoJkRmwHgHufaenlyAgE1Mxgpdcrf75y6XcnDg==} - engines: {node: '>=14.16'} - - slice-ansi@4.0.0: - resolution: {integrity: sha512-qMCMfhY040cVHT43K9BFygqYbUPFZKHOg7K73mtTWJRb8pyP3fzf4Ixd5SzdEJQ6MRUg/WBnOLxghZtKKurENQ==} - engines: {node: '>=10'} - - slice-ansi@5.0.0: - resolution: {integrity: sha512-FC+lgizVPfie0kkhqUScwRu1O/lF6NOgJmlCgK+/LYxDCTk8sGelYaHDhFcDN+Sn3Cv+3VSa4Byeo+IMCzpMgQ==} - engines: {node: '>=12'} - - smart-buffer@4.2.0: - resolution: {integrity: sha512-94hK0Hh8rPqQl2xXc3HsaBoOXKV20MToPkcXvwbISWLEs+64sBq5kFgn2kJDHb1Pry9yrP0dxrCI9RRci7RXKg==} - engines: {node: '>= 6.0.0', npm: '>= 3.0.0'} - - snapdragon-node@2.1.1: - resolution: {integrity: sha512-O27l4xaMYt/RSQ5TR3vpWCAB5Kb/czIcqUFOM/C4fYcLnbZUc1PkjTAMjof2pBWaSTwOUd6qUHcFGVGj7aIwnw==} - engines: {node: '>=0.10.0'} - - snapdragon-util@3.0.1: - resolution: {integrity: sha512-mbKkMdQKsjX4BAL4bRYTj21edOf8cN7XHdYUJEe+Zn99hVEYcMvKPct1IqNe7+AZPirn8BCDOQBHQZknqmKlZQ==} - engines: {node: '>=0.10.0'} - - snapdragon@0.8.2: - resolution: {integrity: sha512-FtyOnWN/wCHTVXOMwvSv26d+ko5vWlIDD6zoUJ7LW8vh+ZBC8QdljveRP+crNrtBwioEUWy/4dMtbBjA4ioNlg==} - engines: {node: '>=0.10.0'} - - sockjs-client@1.6.1: - resolution: {integrity: sha512-2g0tjOR+fRs0amxENLi/q5TiJTqY+WXFOzb5UwXndlK6TO3U/mirZznpx6w34HVMoc3g7cY24yC/ZMIYnDlfkw==} - engines: {node: '>=12'} - - sockjs@0.3.24: - resolution: {integrity: sha512-GJgLTZ7vYb/JtPSSZ10hsOYIvEYsjbNU+zPdIHcUaWVNUEPivzxku31865sSSud0Da0W4lEeOPlmw93zLQchuQ==} - - socks-proxy-agent@7.0.0: - resolution: {integrity: sha512-Fgl0YPZ902wEsAyiQ+idGd1A7rSFx/ayC1CQVMw5P+EQx2V0SgpGtf6OKFhVjPflPUl9YMmEOnmfjCdMUsygww==} - engines: {node: '>= 10'} - - socks-proxy-agent@8.0.4: - resolution: {integrity: sha512-GNAq/eg8Udq2x0eNiFkr9gRg5bA7PXEWagQdeRX4cPSG+X/8V38v637gim9bjFptMk1QWsCTr0ttrJEiXbNnRw==} - engines: {node: '>= 14'} - - socks-proxy-agent@8.0.5: - resolution: {integrity: sha512-HehCEsotFqbPW9sJ8WVYB6UbmIMv7kUUORIF2Nncq4VQvBfNBLibW9YZR5dlYCSUhwcD628pRllm7n+E+YTzJw==} - engines: {node: '>= 14'} - - socks@2.8.3: - resolution: {integrity: sha512-l5x7VUUWbjVFbafGLxPWkYsHIhEvmF85tbIeFZWc8ZPtoMyybuEhL7Jye/ooC4/d48FgOjSJXgsF/AJPYCW8Zw==} - engines: {node: '>= 10.0.0', npm: '>= 3.0.0'} - - solc@0.8.26: - resolution: {integrity: sha512-yiPQNVf5rBFHwN6SIf3TUUvVAFKcQqmSUFeq+fb6pNRCo0ZCgpYOZDi3BVoezCPIAcKrVYd/qXlBLUP9wVrZ9g==} - engines: {node: '>=10.0.0'} - hasBin: true - - solidity-coverage@0.8.13: - resolution: {integrity: sha512-RiBoI+kF94V3Rv0+iwOj3HQVSqNzA9qm/qDP1ZDXK5IX0Cvho1qiz8hAXTsAo6KOIUeP73jfscq0KlLqVxzGWA==} - hasBin: true - peerDependencies: - hardhat: ^2.11.0 - - source-map-resolve@0.5.3: - resolution: {integrity: sha512-Htz+RnsXWk5+P2slx5Jh3Q66vhQj1Cllm0zvnaY98+NFx+Dv2CF/f5O/t8x+KaNdrdIAsruNzoh/KpialbqAnw==} - deprecated: See https://github.com/lydell/source-map-resolve#deprecated - - source-map-support@0.5.21: - resolution: {integrity: sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w==} - - source-map-url@0.4.1: - resolution: {integrity: sha512-cPiFOTLUKvJFIg4SKVScy4ilPPW6rFgMgfuZJPNoDuMs3nC1HbMUycBoJw77xFIp6z1UJQJOfx6C9GMH80DiTw==} - deprecated: See https://github.com/lydell/source-map-url#deprecated - - source-map@0.2.0: - resolution: {integrity: sha512-CBdZ2oa/BHhS4xj5DlhjWNHcan57/5YuvfdLf17iVmIpd9KRm+DFLmC6nBNj+6Ua7Kt3TmOjDpQT1aTYOQtoUA==} - engines: {node: '>=0.8.0'} - - source-map@0.5.7: - resolution: {integrity: sha512-LbrmJOMUSdEVxIKvdcJzQC+nQhe8FUZQTXQy6+I75skNgn3OoQ0DZA8YnFa7gp8tqtL3KPf1kmo0R5DoApeSGQ==} - engines: {node: '>=0.10.0'} - - source-map@0.6.1: - resolution: {integrity: sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==} - engines: {node: '>=0.10.0'} - - sourcemap-codec@1.4.8: - resolution: {integrity: sha512-9NykojV5Uih4lgo5So5dtw+f0JgJX30KCNI8gwhz2J9A15wD0Ml6tjHKwf6fTSa6fAdVBdZeNOs9eJ71qCk8vA==} - deprecated: Please use @jridgewell/sourcemap-codec instead - - spawn-wrap@2.0.0: - resolution: {integrity: sha512-EeajNjfN9zMnULLwhZZQU3GWBoFNkbngTUPfaawT4RkMiviTxcX0qfhVbGey39mfctfDHkWtuecgQ8NJcyQWHg==} - engines: {node: '>=8'} - - spawndamnit@2.0.0: - resolution: {integrity: sha512-j4JKEcncSjFlqIwU5L/rp2N5SIPsdxaRsIv678+TZxZ0SRDJTm8JrxJMjE/XuiEZNEir3S8l0Fa3Ke339WI4qA==} - - spdy-transport@3.0.0: - resolution: {integrity: sha512-hsLVFE5SjA6TCisWeJXFKniGGOpBgMLmerfO2aCyCU5s7nJ/rpAepqmFifv/GCbSbueEeAJJnmSQ2rKC/g8Fcw==} - - spdy@4.0.2: - resolution: {integrity: sha512-r46gZQZQV+Kl9oItvl1JZZqJKGr+oEkB08A6BzkiR7593/7IbtuncXHd2YoYeTsG4157ZssMu9KYvUHLcjcDoA==} - engines: {node: '>=6.0.0'} - - split-string@3.1.0: - resolution: {integrity: sha512-NzNVhJDYpwceVVii8/Hu6DKfD2G+NrQHlS/V/qgv763EYudVwEcMQNxd2lh+0VrUByXN/oJkl5grOhYWvQUYiw==} - engines: {node: '>=0.10.0'} - - split2@3.2.2: - resolution: {integrity: sha512-9NThjpgZnifTkJpzTZ7Eue85S49QwpNhZTq6GRJwObb6jnLFNGB7Qm73V5HewTROPyxD0C29xqmaI68bQtV+hg==} - - sprintf-js@1.0.3: - resolution: {integrity: sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==} - - sprintf-js@1.1.3: - resolution: {integrity: sha512-Oo+0REFV59/rz3gfJNKQiBlwfHaSESl1pcGyABQsnnIfWOFt6JNj5gCog2U6MLZ//IGYD+nA8nI+mTShREReaA==} - - sshpk@1.18.0: - resolution: {integrity: sha512-2p2KJZTSqQ/I3+HX42EpYOa2l3f8Erv8MWKsy2I9uf4wA7yFIkXRffYdsx86y6z4vHtV8u7g+pPlr8/4ouAxsQ==} - engines: {node: '>=0.10.0'} - hasBin: true - - stack-utils@2.0.6: - resolution: {integrity: sha512-XlkWvfIm6RmsWtNJx+uqtKLS8eqFbxUg0ZzLXqY0caEy9l7hruX8IpiDnjsLavoBgqCCR71TqWO8MaXYheJ3RQ==} - engines: {node: '>=10'} - - stacktrace-parser@0.1.10: - resolution: {integrity: sha512-KJP1OCML99+8fhOHxwwzyWrlUuVX5GQ0ZpJTd1DFXhdkrvg1szxfHhawXUZ3g9TkXORQd4/WG68jMlQZ2p8wlg==} - engines: {node: '>=6'} - - static-extend@0.1.2: - resolution: {integrity: sha512-72E9+uLc27Mt718pMHt9VMNiAL4LMsmDbBva8mxWUCkT07fSzEGMYUCk0XWY6lp0j6RBAG4cJ3mWuZv2OE3s0g==} - engines: {node: '>=0.10.0'} - - statuses@1.5.0: - resolution: {integrity: sha512-OpZ3zP+jT1PI7I8nemJX4AKmAX070ZkYPVWV/AaKTJl+tXCTGyVdC1a4SL8RUQYEwk/f34ZX8UTykN68FwrqAA==} - engines: {node: '>= 0.6'} - - statuses@2.0.1: - resolution: {integrity: sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ==} - engines: {node: '>= 0.8'} - - stream-shift@1.0.3: - resolution: {integrity: sha512-76ORR0DO1o1hlKwTbi/DM3EXWGf3ZJYO8cXX5RJwnul2DEg2oyoZyjLNoQM8WsvZiFKCRfC1O0J7iCvie3RZmQ==} - - streamx@2.20.1: - resolution: {integrity: sha512-uTa0mU6WUC65iUvzKH4X9hEdvSW7rbPxPtwfWiLMSj3qTdQbAiUboZTxauKfpFuGIGa1C2BYijZ7wgdUXICJhA==} - - strict-uri-encode@1.1.0: - resolution: {integrity: sha512-R3f198pcvnB+5IpnBlRkphuE9n46WyVl8I39W/ZUTZLz4nqSP/oLYUrcnJrw462Ds8he4YKMov2efsTIw1BDGQ==} - engines: {node: '>=0.10.0'} - - string-format@2.0.0: - resolution: {integrity: sha512-bbEs3scLeYNXLecRRuk6uJxdXUSj6le/8rNPHChIJTn2V79aXVTR1EH2OH5zLKKoz0V02fOUKZZcw01pLUShZA==} - - string-width@2.1.1: - resolution: {integrity: sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==} - engines: {node: '>=4'} - - string-width@3.1.0: - resolution: {integrity: sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==} - engines: {node: '>=6'} - - string-width@4.2.3: - resolution: {integrity: sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==} - engines: {node: '>=8'} - - string-width@5.1.2: - resolution: {integrity: sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==} - engines: {node: '>=12'} - - string-width@7.2.0: - resolution: {integrity: sha512-tsaTIkKW9b4N+AEj+SVA+WhJzV7/zMhcSu78mLKWSk7cXMOSHsBKFWUs0fWwq8QyK3MgJBQRX6Gbi4kYbdvGkQ==} - engines: {node: '>=18'} - - string.prototype.trim@1.2.9: - resolution: {integrity: sha512-klHuCNxiMZ8MlsOihJhJEBJAiMVqU3Z2nEXWfWnIqjN0gEFS9J9+IxKozWWtQGcgoa1WUZzLjKPTr4ZHNFTFxw==} - engines: {node: '>= 0.4'} - - string.prototype.trimend@1.0.8: - resolution: {integrity: sha512-p73uL5VCHCO2BZZ6krwwQE3kCzM7NKmis8S//xEC6fQonchbum4eP6kR4DLEjQFO3Wnj3Fuo8NM0kOSjVdHjZQ==} - - string.prototype.trimstart@1.0.8: - resolution: {integrity: sha512-UXSH262CSZY1tfu3G3Secr6uGLCFVPMhIqHjlgCUtCCcgihYc/xKs9djMTMUOb2j1mVSeU8EU6NWc/iQKU6Gfg==} - engines: {node: '>= 0.4'} - - string_decoder@1.1.1: - resolution: {integrity: sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==} - - string_decoder@1.3.0: - resolution: {integrity: sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==} - - strip-ansi@3.0.1: - resolution: {integrity: sha512-VhumSSbBqDTP8p2ZLKj40UjBCV4+v8bUSEpUb4KjRgWk9pbqGF4REFj6KEagidb2f/M6AzC0EmFyDNGaw9OCzg==} - engines: {node: '>=0.10.0'} - - strip-ansi@4.0.0: - resolution: {integrity: sha512-4XaJ2zQdCzROZDivEVIDPkcQn8LMFSa8kj8Gxb/Lnwzv9A8VctNZ+lfivC/sV3ivW8ElJTERXZoPBRrZKkNKow==} - engines: {node: '>=4'} - - strip-ansi@5.2.0: - resolution: {integrity: sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==} - engines: {node: '>=6'} - - strip-ansi@6.0.1: - resolution: {integrity: sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==} - engines: {node: '>=8'} - - strip-ansi@7.1.0: - resolution: {integrity: sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==} - engines: {node: '>=12'} - - strip-bom@3.0.0: - resolution: {integrity: sha512-vavAMRXOgBVNF6nyEEmL3DBK19iRpDcoIwW+swQ+CbGiu7lju6t+JklA1MHweoWtadgt4ISVUsXLyDq34ddcwA==} - engines: {node: '>=4'} - - strip-bom@4.0.0: - resolution: {integrity: sha512-3xurFv5tEgii33Zi8Jtp55wEIILR9eh34FAW00PZf+JnSsTmV/ioewSgQl97JHvgjoRGwPShsWm+IdrxB35d0w==} - engines: {node: '>=8'} - - strip-eof@1.0.0: - resolution: {integrity: sha512-7FCwGGmx8mD5xQd3RPUvnSpUXHM3BWuzjtpD4TXsfcZ9EL4azvVVUscFYwD9nx8Kh+uCBC00XBtAykoMHwTh8Q==} - engines: {node: '>=0.10.0'} - - strip-hex-prefix@1.0.0: - resolution: {integrity: sha512-q8d4ue7JGEiVcypji1bALTos+0pWtyGlivAWyPuTkHzuTCJqrK9sWxYQZUq6Nq3cuyv3bm734IhHvHtGGURU6A==} - engines: {node: '>=6.5.0', npm: '>=3'} - - strip-json-comments@3.1.1: - resolution: {integrity: sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==} - engines: {node: '>=8'} - - strnum@1.0.5: - resolution: {integrity: sha512-J8bbNyKKXl5qYcR36TIO8W3mVGVHrmmxsd5PAItGkmyzwJvybiw2IVq5nqd0i4LSNSkB/sx9VHllbfFdr9k1JA==} - - supertap@3.0.1: - resolution: {integrity: sha512-u1ZpIBCawJnO+0QePsEiOknOfCRq0yERxiAchT0i4li0WHNUJbf0evXXSXOcCAR4M8iMDoajXYmstm/qO81Isw==} - engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} - - supports-color@3.2.3: - resolution: {integrity: sha512-Jds2VIYDrlp5ui7t8abHN2bjAu4LV/q4N2KivFPpGH0lrka0BMq/33AmECUXlKPcHigkNaqfXRENFju+rlcy+A==} - engines: {node: '>=0.8.0'} - - supports-color@5.5.0: - resolution: {integrity: sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==} - engines: {node: '>=4'} - - supports-color@6.1.0: - resolution: {integrity: sha512-qe1jfm1Mg7Nq/NSh6XE24gPXROEVsWHxC1LIx//XNlD9iw7YZQGjZNjYN7xGaEG6iKdA8EtNFW6R0gjnVXp+wQ==} - engines: {node: '>=6'} - - supports-color@7.2.0: - resolution: {integrity: sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==} - engines: {node: '>=8'} - - supports-color@8.1.1: - resolution: {integrity: sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==} - engines: {node: '>=10'} - - supports-preserve-symlinks-flag@1.0.0: - resolution: {integrity: sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==} - engines: {node: '>= 0.4'} - - swarm-js@0.1.42: - resolution: {integrity: sha512-BV7c/dVlA3R6ya1lMlSSNPLYrntt0LUq4YMgy3iwpCIc6rZnS5W2wUoctarZ5pXlpKtxDDf9hNziEkcfrxdhqQ==} - - symbol-observable@1.2.0: - resolution: {integrity: sha512-e900nM8RRtGhlV36KGEU9k65K3mPb1WV70OdjfxlG2EAuM1noi/E/BaW/uMhL7bPEssK8QV57vN3esixjUvcXQ==} - engines: {node: '>=0.10.0'} - - sync-request@6.1.0: - resolution: {integrity: sha512-8fjNkrNlNCrVc/av+Jn+xxqfCjYaBoHqCsDz6mt030UMxJGr+GSfCV1dQt2gRtlL63+VPidwDVLr7V2OcTSdRw==} - engines: {node: '>=8.0.0'} - - sync-rpc@1.3.6: - resolution: {integrity: sha512-J8jTXuZzRlvU7HemDgHi3pGnh/rkoqR/OZSjhTyyZrEkkYQbk7Z33AXp37mkPfPpfdOuj7Ex3H/TJM1z48uPQw==} - - synckit@0.9.2: - resolution: {integrity: sha512-vrozgXDQwYO72vHjUb/HnFbQx1exDjoKzqx23aXEg2a9VIg2TSFZ8FmeZpTjUCFMYw7mpX4BE2SFu8wI7asYsw==} - engines: {node: ^14.18.0 || >=16.0.0} - - table-layout@1.0.2: - resolution: {integrity: sha512-qd/R7n5rQTRFi+Zf2sk5XVVd9UQl6ZkduPFC3S7WEGJAmetDTjY3qPN50eSKzwuzEyQKy5TN2TiZdkIjos2L6A==} - engines: {node: '>=8.0.0'} - - table@6.9.0: - resolution: {integrity: sha512-9kY+CygyYM6j02t5YFHbNz2FN5QmYGv9zAjVp4lCDjlCw7amdckXlEt/bjMhUIfj4ThGRE4gCUH5+yGnNuPo5A==} - engines: {node: '>=10.0.0'} - - tapable@2.2.1: - resolution: {integrity: sha512-GNzQvQTOIP6RyTfE2Qxb8ZVlNmw0n88vp1szwWRimP02mnTsx3Wtn5qRdqY9w2XduFNUgvOwhNnQsjwCp+kqaQ==} - engines: {node: '>=6'} - - tar-fs@3.0.6: - resolution: {integrity: sha512-iokBDQQkUyeXhgPYaZxmczGPhnhXZ0CmrqI+MOb/WFGS9DW5wnfrLgtjUJBvz50vQ3qfRwJ62QVoCFu8mPVu5w==} - - tar-stream@3.1.7: - resolution: {integrity: sha512-qJj60CXt7IU1Ffyc3NJMjh6EkuCFej46zUqJ4J7pqYlThyd9bO0XBTmcOIhSzZJVWfsLks0+nle/j538YAW9RQ==} - - tar@4.4.19: - resolution: {integrity: sha512-a20gEsvHnWe0ygBY8JbxoM4w3SJdhc7ZAuxkLqh+nvNQN2IOt0B5lLgM490X5Hl8FF0dl0tOf2ewFYAlIFgzVA==} - engines: {node: '>=4.5'} - - tar@6.2.1: - resolution: {integrity: sha512-DZ4yORTwrbTj/7MZYq2w+/ZFdI6OZ/f9SFHR+71gIVUZhOQPHzVCLpvRnPgyaMpfWxxk/4ONva3GQSyNIKRv6A==} - engines: {node: '>=10'} - - temp-dir@3.0.0: - resolution: {integrity: sha512-nHc6S/bwIilKHNRgK/3jlhDoIHcp45YgyiwcAk46Tr0LfEqGBVpmiAyuiuxeVE44m3mXnEeVhaipLOEWmH+Njw==} - engines: {node: '>=14.16'} - - term-size@2.2.1: - resolution: {integrity: sha512-wK0Ri4fOGjv/XPy8SBHZChl8CM7uMc5VML7SqiQ0zG7+J5Vr+RMQDoHa2CNT6KHUnTGIXH34UDMkPzAUyapBZg==} - engines: {node: '>=8'} - - terser-webpack-plugin@5.3.10: - resolution: {integrity: sha512-BKFPWlPDndPs+NGGCr1U59t0XScL5317Y0UReNrHaw9/FwhPENlq6bfgs+4yPfyP51vqC1bQ4rp1EfXW5ZSH9w==} - engines: {node: '>= 10.13.0'} - peerDependencies: - '@swc/core': '*' - esbuild: '*' - uglify-js: '*' - webpack: ^5.1.0 - peerDependenciesMeta: - '@swc/core': - optional: true - esbuild: - optional: true - uglify-js: - optional: true - - terser@5.36.0: - resolution: {integrity: sha512-IYV9eNMuFAV4THUspIRXkLakHnV6XO7FEdtKjf/mDyrnqUg9LnlOn6/RwRvM9SZjR4GUq8Nk8zj67FzVARr74w==} - engines: {node: '>=10'} - hasBin: true - - test-exclude@6.0.0: - resolution: {integrity: sha512-cAGWPIyOHU6zlmg88jwm7VRyXnMN7iV68OGAbYDk/Mh/xC/pzVPlQtY6ngoIH/5/tciuhGfvESU8GrHrcxD56w==} - engines: {node: '>=8'} - - text-decoder@1.2.1: - resolution: {integrity: sha512-x9v3H/lTKIJKQQe7RPQkLfKAnc9lUTkWDypIQgTzPJAq+5/GCDHonmshfvlsNSj58yyshbIJJDLmU15qNERrXQ==} - - text-table@0.2.0: - resolution: {integrity: sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==} - - then-request@6.0.2: - resolution: {integrity: sha512-3ZBiG7JvP3wbDzA9iNY5zJQcHL4jn/0BWtXIkagfz7QgOL/LqjCEOBQuJNZfu0XYnv5JhKh+cDxCPM4ILrqruA==} - engines: {node: '>=6.0.0'} - - through2@4.0.2: - resolution: {integrity: sha512-iOqSav00cVxEEICeD7TjLB1sueEL+81Wpzp2bY17uZjZN0pWZPuo4suZ/61VujxmqSGFfgOcNuTZ85QJwNZQpw==} - - through@2.3.8: - resolution: {integrity: sha512-w89qg7PI8wAdvX60bMDP+bFoD5Dvhm9oLheFp5O4a2QF0cSBGsBX4qZmadPMvVqlLJBBci+WqGGOAPvcDeNSVg==} - - thunky@1.1.0: - resolution: {integrity: sha512-eHY7nBftgThBqOyHGVN+l8gF0BucP09fMo0oO/Lb0w1OF80dJv+lDVpXG60WMQvkcxAkNybKsrEIE3ZtKGmPrA==} - - time-zone@1.0.0: - resolution: {integrity: sha512-TIsDdtKo6+XrPtiTm1ssmMngN1sAhyKnTO2kunQWqNPWIVvCm15Wmw4SWInwTVgJ5u/Tr04+8Ei9TNcw4x4ONA==} - engines: {node: '>=4'} - - timed-out@4.0.1: - resolution: {integrity: sha512-G7r3AhovYtr5YKOWQkta8RKAPb+J9IsO4uVmzjl8AZwfhs8UcUwTiD6gcJYSgOtzyjvQKrKYn41syHbUWMkafA==} - engines: {node: '>=0.10.0'} - - tmp@0.0.33: - resolution: {integrity: sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw==} - engines: {node: '>=0.6.0'} - - to-object-path@0.3.0: - resolution: {integrity: sha512-9mWHdnGRuh3onocaHzukyvCZhzvr6tiflAy/JRFXcJX0TjgfWA9pk9t8CMbzmBE4Jfw58pXbkngtBtqYxzNEyg==} - engines: {node: '>=0.10.0'} - - to-regex-range@2.1.1: - resolution: {integrity: sha512-ZZWNfCjUokXXDGXFpZehJIkZqq91BcULFq/Pi7M5i4JnxXdhMKAK682z8bCW3o8Hj1wuuzoKcW3DfVzaP6VuNg==} - engines: {node: '>=0.10.0'} - - to-regex-range@5.0.1: - resolution: {integrity: sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==} - engines: {node: '>=8.0'} - - to-regex@3.0.2: - resolution: {integrity: sha512-FWtleNAtZ/Ki2qtqej2CXTOayOH9bHDQF+Q48VpWyDXjbYxA4Yz8iDB31zXOBUlOHHKidDbqGVrTUvQMPmBGBw==} - engines: {node: '>=0.10.0'} - - toidentifier@1.0.1: - resolution: {integrity: sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA==} - engines: {node: '>=0.6'} - - tough-cookie@2.5.0: - resolution: {integrity: sha512-nlLsUzgm1kfLXSXfRZMc1KLAugd4hqJHDTvc2hDIwS3mZAfMEuMbc03SujMF+GEcpaX/qboeycw6iO8JwVv2+g==} - engines: {node: '>=0.8'} - - tr46@0.0.3: - resolution: {integrity: sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==} - - tr46@2.1.0: - resolution: {integrity: sha512-15Ih7phfcdP5YxqiB+iDtLoaTz4Nd35+IiAv0kQ5FNKHzXgdWqPoTIqEDDJmXceQt4JZk6lVPT8lnDlPpGDppw==} - engines: {node: '>=8'} - - tree-kill@1.2.2: - resolution: {integrity: sha512-L0Orpi8qGpRG//Nd+H90vFB+3iHnue1zSSGmNOOCh1GLJ7rUKVwV2HvijphGQS2UmhUZewS9VgvxYIdgr+fG1A==} - hasBin: true - - ts-api-utils@1.3.0: - resolution: {integrity: sha512-UQMIo7pb8WRomKR1/+MFVLTroIvDVtMX3K6OUir8ynLyzB8Jeriont2bTAtmNPa1ekAgN7YPDyf6V+ygrdU+eQ==} - engines: {node: '>=16'} - peerDependencies: - typescript: '>=4.2.0' - - ts-command-line-args@2.5.1: - resolution: {integrity: sha512-H69ZwTw3rFHb5WYpQya40YAX2/w7Ut75uUECbgBIsLmM+BNuYnxsltfyyLMxy6sEeKxgijLTnQtLd0nKd6+IYw==} - hasBin: true - - ts-essentials@7.0.3: - resolution: {integrity: sha512-8+gr5+lqO3G84KdiTSMRLtuyJ+nTBVRKuCrK4lidMPdVeEp0uqC875uE5NMcaA7YYMN7XsNiFQuMvasF8HT/xQ==} - peerDependencies: - typescript: '>=3.7.0' - - ts-node@10.9.2: - resolution: {integrity: sha512-f0FFpIdcHgn8zcPSbf1dRevwt047YMnaiJM3u2w2RewrB+fob/zePZcrOyQoLMMO7aBIddLcQIEK5dYjkLnGrQ==} - hasBin: true - peerDependencies: - '@swc/core': '>=1.2.50' - '@swc/wasm': '>=1.2.50' - '@types/node': '*' - typescript: '>=2.7' - peerDependenciesMeta: - '@swc/core': - optional: true - '@swc/wasm': - optional: true - - tsconfig-paths@3.15.0: - resolution: {integrity: sha512-2Ac2RgzDe/cn48GvOe3M+o82pEFewD3UPbyoUHHdKasHwJKjds4fLXWf/Ux5kATBKN20oaFGu+jbElp1pos0mg==} - - tslib@1.14.1: - resolution: {integrity: sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==} - - tslib@2.7.0: - resolution: {integrity: sha512-gLXCKdN1/j47AiHiOkJN69hJmcbGTHI0ImLmbYLHykhgeN0jVGola9yVjFgzCUklsZQMW55o+dW7IXv3RCXDzA==} - - tslib@2.8.0: - resolution: {integrity: sha512-jWVzBLplnCmoaTr13V9dYbiQ99wvZRd0vNWaDRg+aVYRcjDF3nDksxFDE/+fkXnKhpnUUkmx5pK/v8mCtLVqZA==} - - tsort@0.0.1: - resolution: {integrity: sha512-Tyrf5mxF8Ofs1tNoxA13lFeZ2Zrbd6cKbuH3V+MQ5sb6DtBj5FjrXVsRWT8YvNAQTqNoz66dz1WsbigI22aEnw==} - - tsx@4.19.1: - resolution: {integrity: sha512-0flMz1lh74BR4wOvBjuh9olbnwqCPc35OOlfyzHba0Dc+QNUeWX/Gq2YTbnwcWPO3BMd8fkzRVrHcsR+a7z7rA==} - engines: {node: '>=18.0.0'} - hasBin: true - - tunnel-agent@0.6.0: - resolution: {integrity: sha512-McnNiV1l8RYeY8tBgEpuodCC1mLUdbSN+CYBL7kJsJNInOP8UjDDEwdk6Mw60vdLLrr5NHKZhMAOSrR2NZuQ+w==} - - tweetnacl-util@0.15.1: - resolution: {integrity: sha512-RKJBIj8lySrShN4w6i/BonWp2Z/uxwC3h4y7xsRrpP59ZboCd0GpEVsOnMDYLMmKBpYhb5TgHzZXy7wTfYFBRw==} - - tweetnacl@0.14.5: - resolution: {integrity: sha512-KXXFFdAbFXY4geFIwoyNK+f5Z1b7swfXABfL7HXCmoIWMKU3dmS26672A4EeQtDzLKy7SXmfBu51JolvEKwtGA==} - - tweetnacl@1.0.3: - resolution: {integrity: sha512-6rt+RN7aOi1nGMyC4Xa5DdYiukl2UWCbcJft7YhxReBGQD7OAM8Pbxw6YMo4r2diNEA8FEmu32YOn9rhaiE5yw==} - - type-check@0.3.2: - resolution: {integrity: sha512-ZCmOJdvOWDBYJlzAoFkC+Q0+bUyEOS1ltgp1MGU03fqHG+dbi9tBFU2Rd9QKiDZFAYrhPh2JUf7rZRIuHRKtOg==} - engines: {node: '>= 0.8.0'} - - type-check@0.4.0: - resolution: {integrity: sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==} - engines: {node: '>= 0.8.0'} - - type-detect@4.1.0: - resolution: {integrity: sha512-Acylog8/luQ8L7il+geoSxhEkazvkslg7PSNKOX59mbB9cOveP5aq9h74Y7YU8yDpJwetzQQrfIwtf4Wp4LKcw==} - engines: {node: '>=4'} - - type-fest@0.13.1: - resolution: {integrity: sha512-34R7HTnG0XIJcBSn5XhDd7nNFPRcXYRZrBB2O2jdKqYODldSzBAqzsWoZYYvduky73toYS/ESqxPvkDf/F0XMg==} - engines: {node: '>=10'} - - type-fest@0.20.2: - resolution: {integrity: sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==} - engines: {node: '>=10'} - - type-fest@0.21.3: - resolution: {integrity: sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w==} - engines: {node: '>=10'} - - type-fest@0.7.1: - resolution: {integrity: sha512-Ne2YiiGN8bmrmJJEuTWTLJR32nh/JdL1+PSicowtNb0WFpn59GK8/lfD61bVtzguz7b3PBt74nxpv/Pw5po5Rg==} - engines: {node: '>=8'} - - type-fest@0.8.1: - resolution: {integrity: sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA==} - engines: {node: '>=8'} - - type-is@1.6.18: - resolution: {integrity: sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g==} - engines: {node: '>= 0.6'} - - type@2.7.3: - resolution: {integrity: sha512-8j+1QmAbPvLZow5Qpi6NCaN8FB60p/6x8/vfNqOk/hC+HuvFZhL4+WfekuhQLiqFZXOgQdrs3B+XxEmCc6b3FQ==} - - typechain@8.3.2: - resolution: {integrity: sha512-x/sQYr5w9K7yv3es7jo4KTX05CLxOf7TRWwoHlrjRh8H82G64g+k7VuWPJlgMo6qrjfCulOdfBjiaDtmhFYD/Q==} - hasBin: true - peerDependencies: - typescript: '>=4.3.0' - - typed-array-buffer@1.0.2: - resolution: {integrity: sha512-gEymJYKZtKXzzBzM4jqa9w6Q1Jjm7x2d+sh19AdsD4wqnMPDYyvwpsIc2Q/835kHuo3BEQ7CjelGhfTsoBb2MQ==} - engines: {node: '>= 0.4'} - - typed-array-byte-length@1.0.1: - resolution: {integrity: sha512-3iMJ9q0ao7WE9tWcaYKIptkNBuOIcZCCT0d4MRvuuH88fEoEH62IuQe0OtraD3ebQEoTRk8XCBoknUNc1Y67pw==} - engines: {node: '>= 0.4'} - - typed-array-byte-offset@1.0.2: - resolution: {integrity: sha512-Ous0vodHa56FviZucS2E63zkgtgrACj7omjwd/8lTEMEPFFyjfixMZ1ZXenpgCFBBt4EC1J2XsyVS2gkG0eTFA==} - engines: {node: '>= 0.4'} - - typed-array-length@1.0.6: - resolution: {integrity: sha512-/OxDN6OtAk5KBpGb28T+HZc2M+ADtvRxXrKKbUwtsLgdoxgX13hyy7ek6bFRl5+aBs2yZzB0c4CnQfAtVypW/g==} - engines: {node: '>= 0.4'} - - typed-error@3.2.2: - resolution: {integrity: sha512-Z48LU67/qJ+vyA7lh3ozELqpTp3pvQoY5RtLi5wQ/UGSrEidBhlVSqhjr8B3iqbGpjqAoJYrtSYXWMDtidWGkA==} - engines: {node: '>=6.0.0', npm: '>=3.0.0'} - - typed-query-selector@2.12.0: - resolution: {integrity: sha512-SbklCd1F0EiZOyPiW192rrHZzZ5sBijB6xM+cpmrwDqObvdtunOHHIk9fCGsoK5JVIYXoyEp4iEdE3upFH3PAg==} - - typedarray-to-buffer@3.1.5: - resolution: {integrity: sha512-zdu8XMNEDepKKR+XYOXAVPtWui0ly0NtohUscw+UmaHiAWT8hrV1rr//H6V+0DvJ3OQ19S979M0laLfX8rm82Q==} - - typedarray@0.0.6: - resolution: {integrity: sha512-/aCDEGatGvZ2BIk+HmLf4ifCJFwvKFNb9/JeZPMulfgFracn9QFcAf5GO8B/mweUjSoblS5In0cWhqpfs/5PQA==} - - typescript@5.6.3: - resolution: {integrity: sha512-hjcS1mhfuyi4WW8IWtjP7brDrG2cuDZukyrYrSauoXGNgx0S7zceP07adYkJycEr56BOUTNPzbInooiN3fn1qw==} - engines: {node: '>=14.17'} - hasBin: true - - typeson-registry@1.0.0-alpha.39: - resolution: {integrity: sha512-NeGDEquhw+yfwNhguLPcZ9Oj0fzbADiX4R0WxvoY8nGhy98IbzQy1sezjoEFWOywOboj/DWehI+/aUlRVrJnnw==} - engines: {node: '>=10.0.0'} - - typeson@6.1.0: - resolution: {integrity: sha512-6FTtyGr8ldU0pfbvW/eOZrEtEkczHRUtduBnA90Jh9kMPCiFNnXIon3vF41N0S4tV1HHQt4Hk1j4srpESziCaA==} - engines: {node: '>=0.1.14'} - - typical@4.0.0: - resolution: {integrity: sha512-VAH4IvQ7BDFYglMd7BPRDfLgxZZX4O4TFcRDA6EN5X7erNJJq+McIEp8np9aVtxrCJ6qx4GTYVfOWNjcqwZgRw==} - engines: {node: '>=8'} - - typical@5.2.0: - resolution: {integrity: sha512-dvdQgNDNJo+8B2uBQoqdb11eUCE1JQXhvjC/CZtgvZseVd5TYMXnq0+vuUemXbd/Se29cTaUuPX3YIc2xgbvIg==} - engines: {node: '>=8'} - - uglify-js@3.19.3: - resolution: {integrity: sha512-v3Xu+yuwBXisp6QYTcH4UbH+xYJXqnq2m/LtQVWKWzYc1iehYnLixoQDN9FH6/j9/oybfd6W9Ghwkl8+UMKTKQ==} - engines: {node: '>=0.8.0'} - hasBin: true - - ultron@1.1.1: - resolution: {integrity: sha512-UIEXBNeYmKptWH6z8ZnqTeS8fV74zG0/eRU9VGkpzz+LIJNs8W/zM/L+7ctCkRrgbNnnR0xxw4bKOr0cW0N0Og==} - - unbox-primitive@1.0.2: - resolution: {integrity: sha512-61pPlCD9h51VoreyJ0BReideM3MDKMKnh6+V9L08331ipq6Q8OFXZYiqP6n/tbHx4s5I9uRhcye6BrbkizkBDw==} - - unbzip2-stream@1.4.3: - resolution: {integrity: sha512-mlExGW4w71ebDJviH16lQLtZS32VKqsSfk80GCfUlwT/4/hNRFsoscrF/c++9xinkMzECL1uL9DDwXqFWkruPg==} - - undici-types@6.19.8: - resolution: {integrity: sha512-ve2KP6f/JnbPBFyobGHuerC9g1FYGn/F8n1LWTwNxCEzd6IfqTwUQcNXgEtmmQ6DlRrC1hrSrBnCZPokRrDHjw==} - - undici-types@6.20.0: - resolution: {integrity: sha512-Ny6QZ2Nju20vw1SRHe3d9jVu6gJ+4e3+MMpqu7pqE5HT6WsTSlce++GQmK5UXS8mzV8DSYHrQH+Xrf2jVcuKNg==} - - undici@5.28.4: - resolution: {integrity: sha512-72RFADWFqKmUb2hmmvNODKL3p9hcB6Gt2DOQMis1SEBaV6a4MH8soBvzg+95CYhCKPFedut2JY9bMfrDl9D23g==} - engines: {node: '>=14.0'} - - undici@5.28.5: - resolution: {integrity: sha512-zICwjrDrcrUE0pyyJc1I2QzBkLM8FINsgOrt6WjA+BgajVq9Nxu2PbFFXUrAggLfDXlZGZBVZYw7WNV5KiBiBA==} - engines: {node: '>=14.0'} - - unicode-canonical-property-names-ecmascript@2.0.1: - resolution: {integrity: sha512-dA8WbNeb2a6oQzAQ55YlT5vQAWGV9WXOsi3SskE3bcCdM0P4SDd+24zS/OCacdRq5BkdsRj9q3Pg6YyQoxIGqg==} - engines: {node: '>=4'} - - unicode-match-property-ecmascript@2.0.0: - resolution: {integrity: sha512-5kaZCrbp5mmbz5ulBkDkbY0SsPOjKqVS35VpL9ulMPfSl0J0Xsm+9Evphv9CoIZFwre7aJoa94AY6seMKGVN5Q==} - engines: {node: '>=4'} - - unicode-match-property-value-ecmascript@2.2.0: - resolution: {integrity: sha512-4IehN3V/+kkr5YeSSDDQG8QLqO26XpL2XP3GQtqwlT/QYSECAwFztxVHjlbh0+gjJ3XmNLS0zDsbgs9jWKExLg==} - engines: {node: '>=4'} - - unicode-property-aliases-ecmascript@2.1.0: - resolution: {integrity: sha512-6t3foTQI9qne+OZoVQB/8x8rk2k1eVy1gRXhV3oFQ5T6R1dqQ1xtin3XqSlx3+ATBkliTaR/hHyJBm+LVPNM8w==} - engines: {node: '>=4'} - - unicorn-magic@0.1.0: - resolution: {integrity: sha512-lRfVq8fE8gz6QMBuDM6a+LO3IAzTi05H6gCVaUpir2E1Rwpo4ZUog45KpNXKC/Mn3Yb9UDuHumeFTo9iV/D9FQ==} - engines: {node: '>=18'} - - union-value@1.0.1: - resolution: {integrity: sha512-tJfXmxMeWYnczCVs7XAEvIV7ieppALdyepWMkHkwciRpZraG/xwT+s2JN8+pr1+8jCRf80FFzvr+MpQeeoF4Xg==} - engines: {node: '>=0.10.0'} - - universalify@0.1.2: - resolution: {integrity: sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==} - engines: {node: '>= 4.0.0'} - - universalify@2.0.1: - resolution: {integrity: sha512-gptHNQghINnc/vTGIk0SOFGFNXw7JVrlRUtConJRlvaw6DuX0wO5Jeko9sWrMBhh+PsYAZ7oXAiOnf/UKogyiw==} - engines: {node: '>= 10.0.0'} - - unpipe@1.0.0: - resolution: {integrity: sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ==} - engines: {node: '>= 0.8'} - - unset-value@1.0.0: - resolution: {integrity: sha512-PcA2tsuGSF9cnySLHTLSh2qrQiJ70mn+r+Glzxv2TWZblxsxCC52BDlZoPCsz7STd9pN7EZetkWZBAvk4cgZdQ==} - engines: {node: '>=0.10.0'} - - upath@1.2.0: - resolution: {integrity: sha512-aZwGpamFO61g3OlfT7OQCHqhGnW43ieH9WZeP7QxN/G/jS4jfqUkZxoryvJgVPEcrl5NL/ggHsSmLMHuH64Lhg==} - engines: {node: '>=4'} - - update-browserslist-db@1.1.1: - resolution: {integrity: sha512-R8UzCaa9Az+38REPiJ1tXlImTJXlVfgHZsglwBD/k6nj76ctsH1E3q4doGrukiLQd3sGQYu56r5+lo5r94l29A==} - hasBin: true - peerDependencies: - browserslist: '>= 4.21.0' - - uri-js@4.4.1: - resolution: {integrity: sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==} - - urix@0.1.0: - resolution: {integrity: sha512-Am1ousAhSLBeB9cG/7k7r2R0zj50uDRlZHPGbazid5s9rlF1F/QKYObEKSIunSjIOkJZqwRRLpvewjEkM7pSqg==} - deprecated: Please see https://github.com/lydell/urix#deprecated - - url-parse@1.5.10: - resolution: {integrity: sha512-WypcfiRhfeUP9vvF0j6rw0J3hrWrw6iZv3+22h6iRMJ/8z1Tj6XfLP4DsUix5MhMPnXpiHDoKyoZ/bdCkwBCiQ==} - - url-set-query@1.0.0: - resolution: {integrity: sha512-3AChu4NiXquPfeckE5R5cGdiHCMWJx1dwCWOmWIL4KHAziJNOFIYJlpGFeKDvwLPHovZRCxK3cYlwzqI9Vp+Gg==} - - url@0.11.4: - resolution: {integrity: sha512-oCwdVC7mTuWiPyjLUz/COz5TLk6wgp0RCsN+wHZ2Ekneac9w8uuV0njcbbie2ME+Vs+d6duwmYuR3HgQXs1fOg==} - engines: {node: '>= 0.4'} - - urlpattern-polyfill@10.0.0: - resolution: {integrity: sha512-H/A06tKD7sS1O1X2SshBVeA5FLycRpjqiBeqGKmBwBDBy28EnRjORxTNe269KSSr5un5qyWi1iL61wLxpd+ZOg==} - - urlpattern-polyfill@8.0.2: - resolution: {integrity: sha512-Qp95D4TPJl1kC9SKigDcqgyM2VDVO4RiJc2d4qe5GrYm+zbIQCWWKAFaJNQ4BhdFeDGwBmAxqJBwWSJDb9T3BQ==} - - use@3.1.1: - resolution: {integrity: sha512-cwESVXlO3url9YWlFW/TA9cshCEhtu7IKJ/p5soJ/gGpj7vbvFrAY/eIioQ6Dw23KjZhYgiIo8HOs1nQ2vr/oQ==} - engines: {node: '>=0.10.0'} - - utf-8-validate@5.0.10: - resolution: {integrity: sha512-Z6czzLq4u8fPOyx7TU6X3dvUZVvoJmxSQ+IcrlmagKhilxlhZgxPK6C5Jqbkw1IDUmFTM+cz9QDnnLTwDz/2gQ==} - engines: {node: '>=6.14.2'} - - utf-8-validate@5.0.7: - resolution: {integrity: sha512-vLt1O5Pp+flcArHGIyKEQq883nBt8nN8tVBcoL0qUXj2XT1n7p70yGIq2VK98I5FdZ1YHc0wk/koOnHjnXWk1Q==} - engines: {node: '>=6.14.2'} - - utf-8-validate@6.0.3: - resolution: {integrity: sha512-uIuGf9TWQ/y+0Lp+KGZCMuJWc3N9BHA+l/UmHd/oUHwJJDeysyTRxNQVkbzsIWfGFbRe3OcgML/i0mvVRPOyDA==} - engines: {node: '>=6.14.2'} - - utf8@3.0.0: - resolution: {integrity: sha512-E8VjFIQ/TyQgp+TZfS6l8yp/xWppSAHzidGiRrqe4bK4XP9pTRyKFgGJpO3SN7zdX4DeomTrwaseCHovfpFcqQ==} - - util-deprecate@1.0.2: - resolution: {integrity: sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==} - - util@0.12.5: - resolution: {integrity: sha512-kZf/K6hEIrWHI6XqOFUiiMa+79wE/D8Q+NCNAWclkyg3b4d2k7s0QGepNjiABc+aR3N1PAyHL7p6UcLY6LmrnA==} - - utila@0.4.0: - resolution: {integrity: sha512-Z0DbgELS9/L/75wZbro8xAnT50pBVFQZ+hUEueGDU5FN51YSCYM+jdxsfCiHjwNP/4LCDD0i/graKpeBnOXKRA==} - - utils-merge@1.0.1: - resolution: {integrity: sha512-pMZTvIkT1d+TFGvDOqodOclx0QWkkgi6Tdoa8gC8ffGAAqz9pzPTZWAybbsHHoED/ztMtkv/VoYTYyShUn81hA==} - engines: {node: '>= 0.4.0'} - - uuid@3.4.0: - resolution: {integrity: sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==} - deprecated: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details. - hasBin: true - - uuid@8.3.2: - resolution: {integrity: sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==} - hasBin: true - - uuid@9.0.1: - resolution: {integrity: sha512-b+1eJOlsR9K8HJpow9Ok3fiWOWSIcIzXodvv0rQjVoOVNpWMpxf1wZNpt4y9h10odCNrqnYp1OBzRktckBe3sA==} - hasBin: true - - v8-compile-cache-lib@3.0.1: - resolution: {integrity: sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg==} - - v8-compile-cache@2.4.0: - resolution: {integrity: sha512-ocyWc3bAHBB/guyqJQVI5o4BZkPhznPYUG2ea80Gond/BgNWpap8TOmLSeeQG7bnh2KMISxskdADG59j7zruhw==} - - value-or-promise@1.0.11: - resolution: {integrity: sha512-41BrgH+dIbCFXClcSapVs5M6GkENd3gQOJpEfPDNa71LsUGMXDL0jMWpI/Rh7WhX+Aalfz2TTS3Zt5pUsbnhLg==} - engines: {node: '>=12'} - - varint@5.0.2: - resolution: {integrity: sha512-lKxKYG6H03yCZUpAGOPOsMcGxd1RHCu1iKvEHYDPmTyq2HueGhD73ssNBqqQWfvYs04G9iUFRvmAVLW20Jw6ow==} - - vary@1.1.2: - resolution: {integrity: sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg==} - engines: {node: '>= 0.8'} - - verror@1.10.0: - resolution: {integrity: sha512-ZZKSmDAEFOijERBLkmYfJ+vmk3w+7hOLYDNkRCuRuMJGEmqYNCNLyBBFwWKVMhfwaEF3WOd0Zlw86U/WC/+nYw==} - engines: {'0': node >=0.6.0} - - wait-on@8.0.1: - resolution: {integrity: sha512-1wWQOyR2LVVtaqrcIL2+OM+x7bkpmzVROa0Nf6FryXkS+er5Sa1kzFGjzZRqLnHa3n1rACFLeTwUqE1ETL9Mig==} - engines: {node: '>=12.0.0'} - hasBin: true - - watchpack@2.4.2: - resolution: {integrity: sha512-TnbFSbcOCcDgjZ4piURLCbJ3nJhznVh9kw6F6iokjiFPl8ONxe9A6nMDVXDiNbrSfLILs6vB07F7wLBrwPYzJw==} - engines: {node: '>=10.13.0'} - - wbuf@1.7.3: - resolution: {integrity: sha512-O84QOnr0icsbFGLS0O3bI5FswxzRr8/gHwWkDlQFskhSPryQXvrTMxjxGP4+iWYoauLoBvfDpkrOauZ+0iZpDA==} - - web3-bzz@1.10.4: - resolution: {integrity: sha512-ZZ/X4sJ0Uh2teU9lAGNS8EjveEppoHNQiKlOXAjedsrdWuaMErBPdLQjXfcrYvN6WM6Su9PMsAxf3FXXZ+HwQw==} - engines: {node: '>=8.0.0'} - - web3-core-helpers@1.10.4: - resolution: {integrity: sha512-r+L5ylA17JlD1vwS8rjhWr0qg7zVoVMDvWhajWA5r5+USdh91jRUYosp19Kd1m2vE034v7Dfqe1xYRoH2zvG0g==} - engines: {node: '>=8.0.0'} - - web3-core-method@1.10.4: - resolution: {integrity: sha512-uZTb7flr+Xl6LaDsyTeE2L1TylokCJwTDrIVfIfnrGmnwLc6bmTWCCrm71sSrQ0hqs6vp/MKbQYIYqUN0J8WyA==} - engines: {node: '>=8.0.0'} - - web3-core-promievent@1.10.4: - resolution: {integrity: sha512-2de5WnJQ72YcIhYwV/jHLc4/cWJnznuoGTJGD29ncFQHAfwW/MItHFSVKPPA5v8AhJe+r6y4Y12EKvZKjQVBvQ==} - engines: {node: '>=8.0.0'} - - web3-core-requestmanager@1.10.4: - resolution: {integrity: sha512-vqP6pKH8RrhT/2MoaU+DY/OsYK9h7HmEBNCdoMj+4ZwujQtw/Mq2JifjwsJ7gits7Q+HWJwx8q6WmQoVZAWugg==} - engines: {node: '>=8.0.0'} - - web3-core-subscriptions@1.10.4: - resolution: {integrity: sha512-o0lSQo/N/f7/L76C0HV63+S54loXiE9fUPfHFcTtpJRQNDBVsSDdWRdePbWwR206XlsBqD5VHApck1//jEafTw==} - engines: {node: '>=8.0.0'} - - web3-core@1.10.4: - resolution: {integrity: sha512-B6elffYm81MYZDTrat7aEhnhdtVE3lDBUZft16Z8awYMZYJDbnykEbJVS+l3mnA7AQTnSDr/1MjWofGDLBJPww==} - engines: {node: '>=8.0.0'} - - web3-eth-abi@1.10.4: - resolution: {integrity: sha512-cZ0q65eJIkd/jyOlQPDjr8X4fU6CRL1eWgdLwbWEpo++MPU/2P4PFk5ZLAdye9T5Sdp+MomePPJ/gHjLMj2VfQ==} - engines: {node: '>=8.0.0'} - - web3-eth-accounts@1.10.4: - resolution: {integrity: sha512-ysy5sVTg9snYS7tJjxVoQAH6DTOTkRGR8emEVCWNGLGiB9txj+qDvSeT0izjurS/g7D5xlMAgrEHLK1Vi6I3yg==} - engines: {node: '>=8.0.0'} - - web3-eth-contract@1.10.4: - resolution: {integrity: sha512-Q8PfolOJ4eV9TvnTj1TGdZ4RarpSLmHnUnzVxZ/6/NiTfe4maJz99R0ISgwZkntLhLRtw0C7LRJuklzGYCNN3A==} - engines: {node: '>=8.0.0'} - - web3-eth-ens@1.10.4: - resolution: {integrity: sha512-LLrvxuFeVooRVZ9e5T6OWKVflHPFgrVjJ/jtisRWcmI7KN/b64+D/wJzXqgmp6CNsMQcE7rpmf4CQmJCrTdsgg==} - engines: {node: '>=8.0.0'} - - web3-eth-iban@1.10.4: - resolution: {integrity: sha512-0gE5iNmOkmtBmbKH2aTodeompnNE8jEyvwFJ6s/AF6jkw9ky9Op9cqfzS56AYAbrqEFuClsqB/AoRves7LDELw==} - engines: {node: '>=8.0.0'} - - web3-eth-personal@1.10.4: - resolution: {integrity: sha512-BRa/hs6jU1hKHz+AC/YkM71RP3f0Yci1dPk4paOic53R4ZZG4MgwKRkJhgt3/GPuPliwS46f/i5A7fEGBT4F9w==} - engines: {node: '>=8.0.0'} - - web3-eth@1.10.4: - resolution: {integrity: sha512-Sql2kYKmgt+T/cgvg7b9ce24uLS7xbFrxE4kuuor1zSCGrjhTJ5rRNG8gTJUkAJGKJc7KgnWmgW+cOfMBPUDSA==} - engines: {node: '>=8.0.0'} - - web3-net@1.10.4: - resolution: {integrity: sha512-mKINnhOOnZ4koA+yV2OT5s5ztVjIx7IY9a03w6s+yao/BUn+Luuty0/keNemZxTr1E8Ehvtn28vbOtW7Ids+Ow==} - engines: {node: '>=8.0.0'} - - web3-providers-http@1.10.4: - resolution: {integrity: sha512-m2P5Idc8hdiO0l60O6DSCPw0kw64Zgi0pMjbEFRmxKIck2Py57RQMu4bxvkxJwkF06SlGaEQF8rFZBmuX7aagQ==} - engines: {node: '>=8.0.0'} - - web3-providers-ipc@1.10.4: - resolution: {integrity: sha512-YRF/bpQk9z3WwjT+A6FI/GmWRCASgd+gC0si7f9zbBWLXjwzYAKG73bQBaFRAHex1hl4CVcM5WUMaQXf3Opeuw==} - engines: {node: '>=8.0.0'} - - web3-providers-ws@1.10.4: - resolution: {integrity: sha512-j3FBMifyuFFmUIPVQR4pj+t5ILhAexAui0opgcpu9R5LxQrLRUZxHSnU+YO25UycSOa/NAX8A+qkqZNpcFAlxA==} - engines: {node: '>=8.0.0'} - - web3-shh@1.10.4: - resolution: {integrity: sha512-cOH6iFFM71lCNwSQrC3niqDXagMqrdfFW85hC9PFUrAr3PUrIem8TNstTc3xna2bwZeWG6OBy99xSIhBvyIACw==} - engines: {node: '>=8.0.0'} - - web3-utils@1.10.4: - resolution: {integrity: sha512-tsu8FiKJLk2PzhDl9fXbGUWTkkVXYhtTA+SmEFkKft+9BgwLxfCRpU96sWv7ICC8zixBNd3JURVoiR3dUXgP8A==} - engines: {node: '>=8.0.0'} - - web3@1.10.4: - resolution: {integrity: sha512-kgJvQZjkmjOEKimx/tJQsqWfRDPTTcBfYPa9XletxuHLpHcXdx67w8EFn5AW3eVxCutE9dTVHgGa9VYe8vgsEA==} - engines: {node: '>=8.0.0'} - - webextension-polyfill@0.10.0: - resolution: {integrity: sha512-c5s35LgVa5tFaHhrZDnr3FpQpjj1BB+RXhLTYUxGqBVN460HkbM8TBtEqdXWbpTKfzwCcjAZVF7zXCYSKtcp9g==} - - webidl-conversions@3.0.1: - resolution: {integrity: sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==} - - webidl-conversions@4.0.2: - resolution: {integrity: sha512-YQ+BmxuTgd6UXZW3+ICGfyqRyHXVlD5GtQr5+qjiNW7bF0cqrzX500HVXPBOvgXb5YnzDd+h0zqyv61KUD7+Sg==} - - webidl-conversions@6.1.0: - resolution: {integrity: sha512-qBIvFLGiBpLjfwmYAaHPXsn+ho5xZnGvyGvsarywGNc8VyQJUMHJ8OBKGGrPER0okBeMDaan4mNBlgBROxuI8w==} - engines: {node: '>=10.4'} - - webpack-cli@4.10.0: - resolution: {integrity: sha512-NLhDfH/h4O6UOy+0LSso42xvYypClINuMNBVVzX4vX98TmTaTUxwRbXdhucbFMd2qLaCTcLq/PdYrvi8onw90w==} - engines: {node: '>=10.13.0'} - hasBin: true - peerDependencies: - '@webpack-cli/generators': '*' - '@webpack-cli/migrate': '*' - webpack: 4.x.x || 5.x.x - webpack-bundle-analyzer: '*' - webpack-dev-server: '*' - peerDependenciesMeta: - '@webpack-cli/generators': - optional: true - '@webpack-cli/migrate': - optional: true - webpack-bundle-analyzer: - optional: true - webpack-dev-server: - optional: true - - webpack-dev-middleware@3.7.3: - resolution: {integrity: sha512-djelc/zGiz9nZj/U7PTBi2ViorGJXEWo/3ltkPbDyxCXhhEXkW0ce99falaok4TPj+AsxLiXJR0EBOb0zh9fKQ==} - engines: {node: '>= 6'} - peerDependencies: - webpack: ^4.0.0 || ^5.0.0 - - webpack-dev-server@3.11.3: - resolution: {integrity: sha512-3x31rjbEQWKMNzacUZRE6wXvUFuGpH7vr0lIEbYpMAG9BOxi0928QU1BBswOAP3kg3H1O4hiS+sq4YyAn6ANnA==} - engines: {node: '>= 6.11.5'} - hasBin: true - peerDependencies: - webpack: ^4.0.0 || ^5.0.0 - webpack-cli: '*' - peerDependenciesMeta: - webpack-cli: - optional: true - - webpack-log@2.0.0: - resolution: {integrity: sha512-cX8G2vR/85UYG59FgkoMamwHUIkSSlV3bBMRsbxVXVUk2j6NleCKjQ/WE9eYg9WY4w25O9w8wKP4rzNZFmUcUg==} - engines: {node: '>= 6'} - - webpack-merge@5.10.0: - resolution: {integrity: sha512-+4zXKdx7UnO+1jaN4l2lHVD+mFvnlZQP/6ljaJVb4SZiwIKeUnrT5l0gkT8z+n4hKpC+jpOv6O9R+gLtag7pSA==} - engines: {node: '>=10.0.0'} - - webpack-sources@3.2.3: - resolution: {integrity: sha512-/DyMEOrDgLKKIG0fmvtz+4dUX/3Ghozwgm6iPp8KRhvn+eQf9+Q7GWxVNMk3+uCPWfdXYC4ExGBckIXdFEfH1w==} - engines: {node: '>=10.13.0'} - - webpack@5.95.0: - resolution: {integrity: sha512-2t3XstrKULz41MNMBF+cJ97TyHdyQ8HCt//pqErqDvNjU9YQBnZxIHa11VXsi7F3mb5/aO2tuDxdeTPdU7xu9Q==} - engines: {node: '>=10.13.0'} - hasBin: true - peerDependencies: - webpack-cli: '*' - peerDependenciesMeta: - webpack-cli: - optional: true - - websocket-driver@0.7.4: - resolution: {integrity: sha512-b17KeDIQVjvb0ssuSDF2cYXSg2iztliJ4B9WdsuB6J952qCPKmnVq4DyW5motImXHDC1cBT/1UezrJVsKw5zjg==} - engines: {node: '>=0.8.0'} - - websocket-extensions@0.1.4: - resolution: {integrity: sha512-OqedPIGOfsDlo31UNwYbCFMSaO9m9G/0faIHj5/dZFDMFqPTcx6UwqyOy3COEaEOg/9VsGIpdqn62W5KhoKSpg==} - engines: {node: '>=0.8.0'} - - websocket@1.0.35: - resolution: {integrity: sha512-/REy6amwPZl44DDzvRCkaI1q1bIiQB0mEFQLUrhz3z2EK91cp3n72rAjUlrTP0zV22HJIUOVHQGPxhFRjxjt+Q==} - engines: {node: '>=4.0.0'} - - well-known-symbols@2.0.0: - resolution: {integrity: sha512-ZMjC3ho+KXo0BfJb7JgtQ5IBuvnShdlACNkKkdsqBmYw3bPAaJfPeYUo6tLUaT5tG/Gkh7xkpBhKRQ9e7pyg9Q==} - engines: {node: '>=6'} - - whatwg-url@5.0.0: - resolution: {integrity: sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==} - - whatwg-url@8.7.0: - resolution: {integrity: sha512-gAojqb/m9Q8a5IV96E3fHJM70AzCkgt4uXYX2O7EmuyOnLrViCQlsEBmF9UQIu3/aeAIp2U17rtbpZWNntQqdg==} - engines: {node: '>=10'} - - which-boxed-primitive@1.0.2: - resolution: {integrity: sha512-bwZdv0AKLpplFY2KZRX6TvyuN7ojjr7lwkg6ml0roIy9YeuSr7JS372qlNW18UQYzgYK9ziGcerWqZOmEn9VNg==} - - which-module@2.0.1: - resolution: {integrity: sha512-iBdZ57RDvnOR9AGBhML2vFZf7h8vmBjhoaZqODJBFWHVtKkDmKuHai3cx5PgVMrX5YDNp27AofYbAwctSS+vhQ==} - - which-typed-array@1.1.15: - resolution: {integrity: sha512-oV0jmFtUky6CXfkqehVvBP/LSWJ2sy4vWMioiENyJLePrBO/yKyV9OyJySfAKosh+RYkIl5zJCNZ8/4JncrpdA==} - engines: {node: '>= 0.4'} - - which@1.3.1: - resolution: {integrity: sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==} - hasBin: true - - which@2.0.2: - resolution: {integrity: sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==} - engines: {node: '>= 8'} - hasBin: true - - wide-align@1.1.5: - resolution: {integrity: sha512-eDMORYaPNZ4sQIuuYPDHdQvf4gyCF9rEEV/yPxGfwPkRodwEgiMUUXTx/dex+Me0wxx53S+NgUHaP7y3MGlDmg==} - - widest-line@3.1.0: - resolution: {integrity: sha512-NsmoXalsWVDMGupxZ5R08ka9flZjjiLvHVAWYOKtiKM8ujtZWr9cRffak+uSE48+Ob8ObalXpwyeUiyDD6QFgg==} - engines: {node: '>=8'} - - wildcard@2.0.1: - resolution: {integrity: sha512-CC1bOL87PIWSBhDcTrdeLo6eGT7mCFtrg0uIJtqJUFyK+eJnzl8A1niH56uu7KMa5XFrtiV+AQuHO3n7DsHnLQ==} - - word-wrap@1.2.5: - resolution: {integrity: sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA==} - engines: {node: '>=0.10.0'} - - wordwrap@1.0.0: - resolution: {integrity: sha512-gvVzJFlPycKc5dZN4yPkP8w7Dc37BtP1yczEneOb4uq34pXZcvrtRTmWV8W+Ume+XCxKgbjM+nevkyFPMybd4Q==} - - wordwrapjs@4.0.1: - resolution: {integrity: sha512-kKlNACbvHrkpIw6oPeYDSmdCTu2hdMHoyXLTcUKala++lx5Y+wjJ/e474Jqv5abnVmwxw08DiTuHmw69lJGksA==} - engines: {node: '>=8.0.0'} - - workerpool@6.5.1: - resolution: {integrity: sha512-Fs4dNYcsdpYSAfVxhnl1L5zTksjvOJxtC5hzMNl+1t9B8hTJTdKDyZ5ju7ztgPy+ft9tBFXoOlDNiOT9WUXZlA==} - - wrap-ansi@5.1.0: - resolution: {integrity: sha512-QC1/iN/2/RPVJ5jYK8BGttj5z83LmSKmvbvrXPNCLZSEb32KKVDJDl/MOt2N01qU2H/FkzEa9PKto1BqDjtd7Q==} - engines: {node: '>=6'} - - wrap-ansi@6.2.0: - resolution: {integrity: sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA==} - engines: {node: '>=8'} - - wrap-ansi@7.0.0: - resolution: {integrity: sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==} - engines: {node: '>=10'} - - wrap-ansi@8.1.0: - resolution: {integrity: sha512-si7QWI6zUMq56bESFvagtmzMdGOtoxfR+Sez11Mobfc7tm+VkUckk9bW2UeffTGVUbOksxmSw0AA2gs8g71NCQ==} - engines: {node: '>=12'} - - wrappy@1.0.2: - resolution: {integrity: sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==} - - write-file-atomic@3.0.3: - resolution: {integrity: sha512-AvHcyZ5JnSfq3ioSyjrBkH9yW4m7Ayk8/9My/DD9onKeu/94fwrMocemO2QAJFAlnnDN+ZDS+ZjAR5ua1/PV/Q==} - - write-file-atomic@5.0.1: - resolution: {integrity: sha512-+QU2zd6OTD8XWIJCbffaiQeH9U73qIqafo1x6V1snCWYGJf6cVE0cDR4D8xRzcEnfI21IFrUPzPGtcPf8AC+Rw==} - engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0} - - ws@3.3.3: - resolution: {integrity: sha512-nnWLa/NwZSt4KQJu51MYlCcSQ5g7INpOrOMt4XV8j4dqTXdmlUmSHQ8/oLC069ckre0fRsgfvsKwbTdtKLCDkA==} - peerDependencies: - bufferutil: ^4.0.8 - utf-8-validate: ^5.0.2 - peerDependenciesMeta: - bufferutil: - optional: true - utf-8-validate: - optional: true - - ws@6.2.3: - resolution: {integrity: sha512-jmTjYU0j60B+vHey6TfR3Z7RD61z/hmxBS3VMSGIrroOWXQEneK1zNuotOUrGyBHQj0yrpsLHPWtigEFd13ndA==} - peerDependencies: - bufferutil: ^4.0.8 - utf-8-validate: ^5.0.2 - peerDependenciesMeta: - bufferutil: - optional: true - utf-8-validate: - optional: true - - ws@7.5.10: - resolution: {integrity: sha512-+dbF1tHwZpXcbOJdVOkzLDxZP1ailvSxM6ZweXTegylPny803bFhA+vqBYw4s31NSAk4S2Qz+AKXK9a4wkdjcQ==} - engines: {node: '>=8.3.0'} - peerDependencies: - bufferutil: ^4.0.8 - utf-8-validate: ^5.0.2 - peerDependenciesMeta: - bufferutil: - optional: true - utf-8-validate: - optional: true - - ws@8.13.0: - resolution: {integrity: sha512-x9vcZYTrFPC7aSIbj7sRCYo7L/Xb8Iy+pW0ng0wt2vCJv7M9HOMy0UoN3rr+IFC7hb7vXoqS+P9ktyLLLhO+LA==} - engines: {node: '>=10.0.0'} - peerDependencies: - bufferutil: ^4.0.8 - utf-8-validate: '>=5.0.2' - peerDependenciesMeta: - bufferutil: - optional: true - utf-8-validate: - optional: true - - ws@8.17.1: - resolution: {integrity: sha512-6XQFvXTkbfUOZOKKILFG1PDK2NDQs4azKQl26T0YS5CxqWLgXajbPZ+h4gZekJyRqFU8pvnbAbbs/3TgRPy+GQ==} - engines: {node: '>=10.0.0'} - peerDependencies: - bufferutil: ^4.0.8 - utf-8-validate: '>=5.0.2' - peerDependenciesMeta: - bufferutil: - optional: true - utf-8-validate: - optional: true - - ws@8.18.0: - resolution: {integrity: sha512-8VbfWfHLbbwu3+N6OKsOMpBdT4kXPDDB9cJk2bJ6mh9ucxdlnNvH1e+roYkKmN9Nxw2yjz7VzeO9oOz2zJ04Pw==} - engines: {node: '>=10.0.0'} - peerDependencies: - bufferutil: ^4.0.8 - utf-8-validate: '>=5.0.2' - peerDependenciesMeta: - bufferutil: - optional: true - utf-8-validate: - optional: true - - xhr-request-promise@0.1.3: - resolution: {integrity: sha512-YUBytBsuwgitWtdRzXDDkWAXzhdGB8bYm0sSzMPZT7Z2MBjMSTHFsyCT1yCRATY+XC69DUrQraRAEgcoCRaIPg==} - - xhr-request@1.1.0: - resolution: {integrity: sha512-Y7qzEaR3FDtL3fP30k9wO/e+FBnBByZeybKOhASsGP30NIkRAAkKD/sCnLvgEfAIEC1rcmK7YG8f4oEnIrrWzA==} - - xhr@2.6.0: - resolution: {integrity: sha512-/eCGLb5rxjx5e3mF1A7s+pLlR6CGyqWN91fv1JgER5mVWg1MZmlhBvy9kjcsOdRk8RrIujotWyJamfyrp+WIcA==} - - xtend@4.0.2: - resolution: {integrity: sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==} - engines: {node: '>=0.4'} - - y18n@4.0.3: - resolution: {integrity: sha512-JKhqTOwSrqNA1NY5lSztJ1GrBiUodLMmIZuLiDaMRJ+itFd+ABVE8XBjOvIWL+rSqNDC74LCSFmlb/U4UZ4hJQ==} - - y18n@5.0.8: - resolution: {integrity: sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==} - engines: {node: '>=10'} - - yaeti@0.0.6: - resolution: {integrity: sha512-MvQa//+KcZCUkBTIC9blM+CU9J2GzuTytsOUwf2lidtvkx/6gnEp1QvJv34t9vdjhFmha/mUiNDbN0D0mJWdug==} - engines: {node: '>=0.10.32'} - deprecated: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info. - - yallist@2.1.2: - resolution: {integrity: sha512-ncTzHV7NvsQZkYe1DW7cbDLm0YpzHmZF5r/iyP3ZnQtMiJ+pjzisCiMNI+Sj+xQF5pXhSHxSB3uDbsBTzY/c2A==} - - yallist@3.1.1: - resolution: {integrity: sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==} - - yallist@4.0.0: - resolution: {integrity: sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==} - - yargs-parser@13.1.2: - resolution: {integrity: sha512-3lbsNRf/j+A4QuSZfDRA7HRSfWrzO0YjqTJd5kjAq37Zep1CEgaYmrH9Q3GwPiB9cHyd1Y1UwggGhJGoxipbzg==} - - yargs-parser@18.1.3: - resolution: {integrity: sha512-o50j0JeToy/4K6OZcaQmW6lyXXKhq7csREXcDwk2omFPJEwUNOVtJKvmDr9EI1fAJZUyZcRF7kxGBWmRXudrCQ==} - engines: {node: '>=6'} - - yargs-parser@20.2.9: - resolution: {integrity: sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w==} - engines: {node: '>=10'} - - yargs-parser@21.1.1: - resolution: {integrity: sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==} - engines: {node: '>=12'} - - yargs-unparser@2.0.0: - resolution: {integrity: sha512-7pRTIA9Qc1caZ0bZ6RYRGbHJthJWuakf+WmHK0rVeLkNrrGhfoabBNdue6kdINI6r4if7ocq9aD/n7xwKOdzOA==} - engines: {node: '>=10'} - - yargs@13.3.2: - resolution: {integrity: sha512-AX3Zw5iPruN5ie6xGRIDgqkT+ZhnRlZMLMHAs8tg7nRruy2Nb+i5o9bwghAogtM08q1dpr2LVoS8KSTMYpWXUw==} - - yargs@15.4.1: - resolution: {integrity: sha512-aePbxDmcYW++PaqBsJ+HYUFwCdv4LVvdnhBy78E57PIor8/OVvhMrADFFEDh8DHDFRv/O9i3lPhsENjO7QX0+A==} - engines: {node: '>=8'} - - yargs@16.2.0: - resolution: {integrity: sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw==} - engines: {node: '>=10'} - - yargs@17.7.2: - resolution: {integrity: sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==} - engines: {node: '>=12'} - - yauzl@2.10.0: - resolution: {integrity: sha512-p4a9I6X6nu6IhoGmBqAcbJy1mlC4j27vEPZX9F4L4/vZT3Lyq1VkFHw/V/PUcB9Buo+DG3iHkT0x3Qya58zc3g==} - - yn@3.1.1: - resolution: {integrity: sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q==} - engines: {node: '>=6'} - - yocto-queue@0.1.0: - resolution: {integrity: sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==} - engines: {node: '>=10'} - - yocto-queue@1.1.1: - resolution: {integrity: sha512-b4JR1PFR10y1mKjhHY9LaGo6tmrgjit7hxVIeAmyMw3jegXR4dhYqLaQF5zMXZxY7tLpMyJeLjr1C4rLmkVe8g==} - engines: {node: '>=12.20'} - - zod@3.23.8: - resolution: {integrity: sha512-XBx9AXhXktjUqnepgTiE5flcKIYWi/rme0Eaj+5Y0lftuGBq+jyRu/md4WnuxqgP1ubdpNCsYEYPxrzVHD8d6g==} - - zstd-codec@0.1.5: - resolution: {integrity: sha512-v3fyjpK8S/dpY/X5WxqTK3IoCnp/ZOLxn144GZVlNUjtwAchzrVo03h+oMATFhCIiJ5KTr4V3vDQQYz4RU684g==} - -snapshots: - - '@0xsequence/ethauth@1.0.0(ethers@6.13.4(bufferutil@4.0.8)(utf-8-validate@5.0.10))': - dependencies: - ethers: 6.13.4(bufferutil@4.0.8)(utf-8-validate@5.0.10) - js-base64: 3.7.7 - - '@0xsequence/wallet-contracts@3.0.1(bufferutil@4.0.8)(typechain@8.3.2(typescript@5.6.3))(typescript@5.6.3)(utf-8-validate@5.0.10)': - dependencies: - '@typechain/ethers-v6': 0.5.1(ethers@6.13.4(bufferutil@4.0.8)(utf-8-validate@5.0.10))(typechain@8.3.2(typescript@5.6.3))(typescript@5.6.3) - ethers: 6.13.4(bufferutil@4.0.8)(utf-8-validate@5.0.10) - keccak256: 1.0.6 - transitivePeerDependencies: - - bufferutil - - typechain - - typescript - - utf-8-validate - - '@0xsequence/wallet-contracts@3.0.1(bufferutil@4.0.8)(typechain@8.3.2(typescript@5.6.3))(typescript@5.6.3)(utf-8-validate@6.0.3)': - dependencies: - '@typechain/ethers-v6': 0.5.1(ethers@6.13.4(bufferutil@4.0.8)(utf-8-validate@6.0.3))(typechain@8.3.2(typescript@5.6.3))(typescript@5.6.3) - ethers: 6.13.4(bufferutil@4.0.8)(utf-8-validate@6.0.3) - keccak256: 1.0.6 - transitivePeerDependencies: - - bufferutil - - typechain - - typescript - - utf-8-validate - - '@adraffy/ens-normalize@1.10.1': {} - - '@ampproject/remapping@2.3.0': - dependencies: - '@jridgewell/gen-mapping': 0.3.5 - '@jridgewell/trace-mapping': 0.3.25 - - '@aws-crypto/sha256-browser@5.2.0': - dependencies: - '@aws-crypto/sha256-js': 5.2.0 - '@aws-crypto/supports-web-crypto': 5.2.0 - '@aws-crypto/util': 5.2.0 - '@aws-sdk/types': 3.667.0 - '@aws-sdk/util-locate-window': 3.568.0 - '@smithy/util-utf8': 2.3.0 - tslib: 2.8.0 - - '@aws-crypto/sha256-js@5.2.0': - dependencies: - '@aws-crypto/util': 5.2.0 - '@aws-sdk/types': 3.667.0 - tslib: 2.8.0 - - '@aws-crypto/supports-web-crypto@5.2.0': - dependencies: - tslib: 2.8.0 - - '@aws-crypto/util@5.2.0': - dependencies: - '@aws-sdk/types': 3.667.0 - '@smithy/util-utf8': 2.3.0 - tslib: 2.8.0 - - '@aws-sdk/client-cognito-identity-provider@3.678.0': - dependencies: - '@aws-crypto/sha256-browser': 5.2.0 - '@aws-crypto/sha256-js': 5.2.0 - '@aws-sdk/client-sso-oidc': 3.678.0(@aws-sdk/client-sts@3.678.0) - '@aws-sdk/client-sts': 3.678.0 - '@aws-sdk/core': 3.678.0 - '@aws-sdk/credential-provider-node': 3.678.0(@aws-sdk/client-sso-oidc@3.678.0(@aws-sdk/client-sts@3.678.0))(@aws-sdk/client-sts@3.678.0) - '@aws-sdk/middleware-host-header': 3.667.0 - '@aws-sdk/middleware-logger': 3.667.0 - '@aws-sdk/middleware-recursion-detection': 3.667.0 - '@aws-sdk/middleware-user-agent': 3.678.0 - '@aws-sdk/region-config-resolver': 3.667.0 - '@aws-sdk/types': 3.667.0 - '@aws-sdk/util-endpoints': 3.667.0 - '@aws-sdk/util-user-agent-browser': 3.675.0 - '@aws-sdk/util-user-agent-node': 3.678.0 - '@smithy/config-resolver': 3.0.10 - '@smithy/core': 2.5.1 - '@smithy/fetch-http-handler': 3.2.9 - '@smithy/hash-node': 3.0.8 - '@smithy/invalid-dependency': 3.0.8 - '@smithy/middleware-content-length': 3.0.10 - '@smithy/middleware-endpoint': 3.2.1 - '@smithy/middleware-retry': 3.0.25 - '@smithy/middleware-serde': 3.0.8 - '@smithy/middleware-stack': 3.0.8 - '@smithy/node-config-provider': 3.1.9 - '@smithy/node-http-handler': 3.2.5 - '@smithy/protocol-http': 4.1.5 - '@smithy/smithy-client': 3.4.2 - '@smithy/types': 3.6.0 - '@smithy/url-parser': 3.0.8 - '@smithy/util-base64': 3.0.0 - '@smithy/util-body-length-browser': 3.0.0 - '@smithy/util-body-length-node': 3.0.0 - '@smithy/util-defaults-mode-browser': 3.0.25 - '@smithy/util-defaults-mode-node': 3.0.25 - '@smithy/util-endpoints': 2.1.4 - '@smithy/util-middleware': 3.0.8 - '@smithy/util-retry': 3.0.8 - '@smithy/util-utf8': 3.0.0 - tslib: 2.8.0 - transitivePeerDependencies: - - aws-crt - - '@aws-sdk/client-sso-oidc@3.678.0(@aws-sdk/client-sts@3.678.0)': - dependencies: - '@aws-crypto/sha256-browser': 5.2.0 - '@aws-crypto/sha256-js': 5.2.0 - '@aws-sdk/client-sts': 3.678.0 - '@aws-sdk/core': 3.678.0 - '@aws-sdk/credential-provider-node': 3.678.0(@aws-sdk/client-sso-oidc@3.678.0(@aws-sdk/client-sts@3.678.0))(@aws-sdk/client-sts@3.678.0) - '@aws-sdk/middleware-host-header': 3.667.0 - '@aws-sdk/middleware-logger': 3.667.0 - '@aws-sdk/middleware-recursion-detection': 3.667.0 - '@aws-sdk/middleware-user-agent': 3.678.0 - '@aws-sdk/region-config-resolver': 3.667.0 - '@aws-sdk/types': 3.667.0 - '@aws-sdk/util-endpoints': 3.667.0 - '@aws-sdk/util-user-agent-browser': 3.675.0 - '@aws-sdk/util-user-agent-node': 3.678.0 - '@smithy/config-resolver': 3.0.10 - '@smithy/core': 2.5.1 - '@smithy/fetch-http-handler': 3.2.9 - '@smithy/hash-node': 3.0.8 - '@smithy/invalid-dependency': 3.0.8 - '@smithy/middleware-content-length': 3.0.10 - '@smithy/middleware-endpoint': 3.2.1 - '@smithy/middleware-retry': 3.0.25 - '@smithy/middleware-serde': 3.0.8 - '@smithy/middleware-stack': 3.0.8 - '@smithy/node-config-provider': 3.1.9 - '@smithy/node-http-handler': 3.2.5 - '@smithy/protocol-http': 4.1.5 - '@smithy/smithy-client': 3.4.2 - '@smithy/types': 3.6.0 - '@smithy/url-parser': 3.0.8 - '@smithy/util-base64': 3.0.0 - '@smithy/util-body-length-browser': 3.0.0 - '@smithy/util-body-length-node': 3.0.0 - '@smithy/util-defaults-mode-browser': 3.0.25 - '@smithy/util-defaults-mode-node': 3.0.25 - '@smithy/util-endpoints': 2.1.4 - '@smithy/util-middleware': 3.0.8 - '@smithy/util-retry': 3.0.8 - '@smithy/util-utf8': 3.0.0 - tslib: 2.8.0 - transitivePeerDependencies: - - aws-crt - - '@aws-sdk/client-sso@3.678.0': - dependencies: - '@aws-crypto/sha256-browser': 5.2.0 - '@aws-crypto/sha256-js': 5.2.0 - '@aws-sdk/core': 3.678.0 - '@aws-sdk/middleware-host-header': 3.667.0 - '@aws-sdk/middleware-logger': 3.667.0 - '@aws-sdk/middleware-recursion-detection': 3.667.0 - '@aws-sdk/middleware-user-agent': 3.678.0 - '@aws-sdk/region-config-resolver': 3.667.0 - '@aws-sdk/types': 3.667.0 - '@aws-sdk/util-endpoints': 3.667.0 - '@aws-sdk/util-user-agent-browser': 3.675.0 - '@aws-sdk/util-user-agent-node': 3.678.0 - '@smithy/config-resolver': 3.0.10 - '@smithy/core': 2.5.1 - '@smithy/fetch-http-handler': 3.2.9 - '@smithy/hash-node': 3.0.8 - '@smithy/invalid-dependency': 3.0.8 - '@smithy/middleware-content-length': 3.0.10 - '@smithy/middleware-endpoint': 3.2.1 - '@smithy/middleware-retry': 3.0.25 - '@smithy/middleware-serde': 3.0.8 - '@smithy/middleware-stack': 3.0.8 - '@smithy/node-config-provider': 3.1.9 - '@smithy/node-http-handler': 3.2.5 - '@smithy/protocol-http': 4.1.5 - '@smithy/smithy-client': 3.4.2 - '@smithy/types': 3.6.0 - '@smithy/url-parser': 3.0.8 - '@smithy/util-base64': 3.0.0 - '@smithy/util-body-length-browser': 3.0.0 - '@smithy/util-body-length-node': 3.0.0 - '@smithy/util-defaults-mode-browser': 3.0.25 - '@smithy/util-defaults-mode-node': 3.0.25 - '@smithy/util-endpoints': 2.1.4 - '@smithy/util-middleware': 3.0.8 - '@smithy/util-retry': 3.0.8 - '@smithy/util-utf8': 3.0.0 - tslib: 2.8.0 - transitivePeerDependencies: - - aws-crt - - '@aws-sdk/client-sts@3.678.0': - dependencies: - '@aws-crypto/sha256-browser': 5.2.0 - '@aws-crypto/sha256-js': 5.2.0 - '@aws-sdk/client-sso-oidc': 3.678.0(@aws-sdk/client-sts@3.678.0) - '@aws-sdk/core': 3.678.0 - '@aws-sdk/credential-provider-node': 3.678.0(@aws-sdk/client-sso-oidc@3.678.0(@aws-sdk/client-sts@3.678.0))(@aws-sdk/client-sts@3.678.0) - '@aws-sdk/middleware-host-header': 3.667.0 - '@aws-sdk/middleware-logger': 3.667.0 - '@aws-sdk/middleware-recursion-detection': 3.667.0 - '@aws-sdk/middleware-user-agent': 3.678.0 - '@aws-sdk/region-config-resolver': 3.667.0 - '@aws-sdk/types': 3.667.0 - '@aws-sdk/util-endpoints': 3.667.0 - '@aws-sdk/util-user-agent-browser': 3.675.0 - '@aws-sdk/util-user-agent-node': 3.678.0 - '@smithy/config-resolver': 3.0.10 - '@smithy/core': 2.5.1 - '@smithy/fetch-http-handler': 3.2.9 - '@smithy/hash-node': 3.0.8 - '@smithy/invalid-dependency': 3.0.8 - '@smithy/middleware-content-length': 3.0.10 - '@smithy/middleware-endpoint': 3.2.1 - '@smithy/middleware-retry': 3.0.25 - '@smithy/middleware-serde': 3.0.8 - '@smithy/middleware-stack': 3.0.8 - '@smithy/node-config-provider': 3.1.9 - '@smithy/node-http-handler': 3.2.5 - '@smithy/protocol-http': 4.1.5 - '@smithy/smithy-client': 3.4.2 - '@smithy/types': 3.6.0 - '@smithy/url-parser': 3.0.8 - '@smithy/util-base64': 3.0.0 - '@smithy/util-body-length-browser': 3.0.0 - '@smithy/util-body-length-node': 3.0.0 - '@smithy/util-defaults-mode-browser': 3.0.25 - '@smithy/util-defaults-mode-node': 3.0.25 - '@smithy/util-endpoints': 2.1.4 - '@smithy/util-middleware': 3.0.8 - '@smithy/util-retry': 3.0.8 - '@smithy/util-utf8': 3.0.0 - tslib: 2.8.0 - transitivePeerDependencies: - - aws-crt - - '@aws-sdk/core@3.678.0': - dependencies: - '@aws-sdk/types': 3.667.0 - '@smithy/core': 2.5.1 - '@smithy/node-config-provider': 3.1.9 - '@smithy/property-provider': 3.1.8 - '@smithy/protocol-http': 4.1.5 - '@smithy/signature-v4': 4.2.1 - '@smithy/smithy-client': 3.4.2 - '@smithy/types': 3.6.0 - '@smithy/util-middleware': 3.0.8 - fast-xml-parser: 4.4.1 - tslib: 2.8.0 - - '@aws-sdk/credential-provider-env@3.678.0': - dependencies: - '@aws-sdk/core': 3.678.0 - '@aws-sdk/types': 3.667.0 - '@smithy/property-provider': 3.1.8 - '@smithy/types': 3.6.0 - tslib: 2.8.0 - - '@aws-sdk/credential-provider-http@3.678.0': - dependencies: - '@aws-sdk/core': 3.678.0 - '@aws-sdk/types': 3.667.0 - '@smithy/fetch-http-handler': 3.2.9 - '@smithy/node-http-handler': 3.2.5 - '@smithy/property-provider': 3.1.8 - '@smithy/protocol-http': 4.1.5 - '@smithy/smithy-client': 3.4.2 - '@smithy/types': 3.6.0 - '@smithy/util-stream': 3.2.1 - tslib: 2.8.0 - - '@aws-sdk/credential-provider-ini@3.678.0(@aws-sdk/client-sso-oidc@3.678.0(@aws-sdk/client-sts@3.678.0))(@aws-sdk/client-sts@3.678.0)': - dependencies: - '@aws-sdk/client-sts': 3.678.0 - '@aws-sdk/core': 3.678.0 - '@aws-sdk/credential-provider-env': 3.678.0 - '@aws-sdk/credential-provider-http': 3.678.0 - '@aws-sdk/credential-provider-process': 3.678.0 - '@aws-sdk/credential-provider-sso': 3.678.0(@aws-sdk/client-sso-oidc@3.678.0(@aws-sdk/client-sts@3.678.0)) - '@aws-sdk/credential-provider-web-identity': 3.678.0(@aws-sdk/client-sts@3.678.0) - '@aws-sdk/types': 3.667.0 - '@smithy/credential-provider-imds': 3.2.5 - '@smithy/property-provider': 3.1.8 - '@smithy/shared-ini-file-loader': 3.1.9 - '@smithy/types': 3.6.0 - tslib: 2.8.0 - transitivePeerDependencies: - - '@aws-sdk/client-sso-oidc' - - aws-crt - - '@aws-sdk/credential-provider-node@3.678.0(@aws-sdk/client-sso-oidc@3.678.0(@aws-sdk/client-sts@3.678.0))(@aws-sdk/client-sts@3.678.0)': - dependencies: - '@aws-sdk/credential-provider-env': 3.678.0 - '@aws-sdk/credential-provider-http': 3.678.0 - '@aws-sdk/credential-provider-ini': 3.678.0(@aws-sdk/client-sso-oidc@3.678.0(@aws-sdk/client-sts@3.678.0))(@aws-sdk/client-sts@3.678.0) - '@aws-sdk/credential-provider-process': 3.678.0 - '@aws-sdk/credential-provider-sso': 3.678.0(@aws-sdk/client-sso-oidc@3.678.0(@aws-sdk/client-sts@3.678.0)) - '@aws-sdk/credential-provider-web-identity': 3.678.0(@aws-sdk/client-sts@3.678.0) - '@aws-sdk/types': 3.667.0 - '@smithy/credential-provider-imds': 3.2.5 - '@smithy/property-provider': 3.1.8 - '@smithy/shared-ini-file-loader': 3.1.9 - '@smithy/types': 3.6.0 - tslib: 2.8.0 - transitivePeerDependencies: - - '@aws-sdk/client-sso-oidc' - - '@aws-sdk/client-sts' - - aws-crt - - '@aws-sdk/credential-provider-process@3.678.0': - dependencies: - '@aws-sdk/core': 3.678.0 - '@aws-sdk/types': 3.667.0 - '@smithy/property-provider': 3.1.8 - '@smithy/shared-ini-file-loader': 3.1.9 - '@smithy/types': 3.6.0 - tslib: 2.8.0 - - '@aws-sdk/credential-provider-sso@3.678.0(@aws-sdk/client-sso-oidc@3.678.0(@aws-sdk/client-sts@3.678.0))': - dependencies: - '@aws-sdk/client-sso': 3.678.0 - '@aws-sdk/core': 3.678.0 - '@aws-sdk/token-providers': 3.667.0(@aws-sdk/client-sso-oidc@3.678.0(@aws-sdk/client-sts@3.678.0)) - '@aws-sdk/types': 3.667.0 - '@smithy/property-provider': 3.1.8 - '@smithy/shared-ini-file-loader': 3.1.9 - '@smithy/types': 3.6.0 - tslib: 2.8.0 - transitivePeerDependencies: - - '@aws-sdk/client-sso-oidc' - - aws-crt - - '@aws-sdk/credential-provider-web-identity@3.678.0(@aws-sdk/client-sts@3.678.0)': - dependencies: - '@aws-sdk/client-sts': 3.678.0 - '@aws-sdk/core': 3.678.0 - '@aws-sdk/types': 3.667.0 - '@smithy/property-provider': 3.1.8 - '@smithy/types': 3.6.0 - tslib: 2.8.0 - - '@aws-sdk/middleware-host-header@3.667.0': - dependencies: - '@aws-sdk/types': 3.667.0 - '@smithy/protocol-http': 4.1.5 - '@smithy/types': 3.6.0 - tslib: 2.8.0 - - '@aws-sdk/middleware-logger@3.667.0': - dependencies: - '@aws-sdk/types': 3.667.0 - '@smithy/types': 3.6.0 - tslib: 2.8.0 - - '@aws-sdk/middleware-recursion-detection@3.667.0': - dependencies: - '@aws-sdk/types': 3.667.0 - '@smithy/protocol-http': 4.1.5 - '@smithy/types': 3.6.0 - tslib: 2.8.0 - - '@aws-sdk/middleware-user-agent@3.678.0': - dependencies: - '@aws-sdk/core': 3.678.0 - '@aws-sdk/types': 3.667.0 - '@aws-sdk/util-endpoints': 3.667.0 - '@smithy/core': 2.5.1 - '@smithy/protocol-http': 4.1.5 - '@smithy/types': 3.6.0 - tslib: 2.8.0 - - '@aws-sdk/region-config-resolver@3.667.0': - dependencies: - '@aws-sdk/types': 3.667.0 - '@smithy/node-config-provider': 3.1.9 - '@smithy/types': 3.6.0 - '@smithy/util-config-provider': 3.0.0 - '@smithy/util-middleware': 3.0.8 - tslib: 2.8.0 - - '@aws-sdk/token-providers@3.667.0(@aws-sdk/client-sso-oidc@3.678.0(@aws-sdk/client-sts@3.678.0))': - dependencies: - '@aws-sdk/client-sso-oidc': 3.678.0(@aws-sdk/client-sts@3.678.0) - '@aws-sdk/types': 3.667.0 - '@smithy/property-provider': 3.1.8 - '@smithy/shared-ini-file-loader': 3.1.9 - '@smithy/types': 3.6.0 - tslib: 2.8.0 - - '@aws-sdk/types@3.667.0': - dependencies: - '@smithy/types': 3.6.0 - tslib: 2.8.0 - - '@aws-sdk/util-endpoints@3.667.0': - dependencies: - '@aws-sdk/types': 3.667.0 - '@smithy/types': 3.6.0 - '@smithy/util-endpoints': 2.1.4 - tslib: 2.8.0 - - '@aws-sdk/util-locate-window@3.568.0': - dependencies: - tslib: 2.8.0 - - '@aws-sdk/util-user-agent-browser@3.675.0': - dependencies: - '@aws-sdk/types': 3.667.0 - '@smithy/types': 3.6.0 - bowser: 2.11.0 - tslib: 2.8.0 - - '@aws-sdk/util-user-agent-node@3.678.0': - dependencies: - '@aws-sdk/middleware-user-agent': 3.678.0 - '@aws-sdk/types': 3.667.0 - '@smithy/node-config-provider': 3.1.9 - '@smithy/types': 3.6.0 - tslib: 2.8.0 - - '@babel/code-frame@7.25.9': - dependencies: - '@babel/highlight': 7.25.9 - picocolors: 1.1.1 - - '@babel/compat-data@7.25.9': {} - - '@babel/core@7.25.9': - dependencies: - '@ampproject/remapping': 2.3.0 - '@babel/code-frame': 7.25.9 - '@babel/generator': 7.25.9 - '@babel/helper-compilation-targets': 7.25.9 - '@babel/helper-module-transforms': 7.25.9(@babel/core@7.25.9) - '@babel/helpers': 7.25.9 - '@babel/parser': 7.25.9 - '@babel/template': 7.25.9 - '@babel/traverse': 7.25.9 - '@babel/types': 7.25.9 - convert-source-map: 2.0.0 - debug: 4.3.7(supports-color@6.1.0) - gensync: 1.0.0-beta.2 - json5: 2.2.3 - semver: 6.3.1 - transitivePeerDependencies: - - supports-color - - '@babel/generator@7.25.9': - dependencies: - '@babel/types': 7.25.9 - '@jridgewell/gen-mapping': 0.3.5 - '@jridgewell/trace-mapping': 0.3.25 - jsesc: 3.0.2 - - '@babel/helper-annotate-as-pure@7.25.9': - dependencies: - '@babel/types': 7.25.9 - - '@babel/helper-builder-binary-assignment-operator-visitor@7.25.9': - dependencies: - '@babel/traverse': 7.25.9 - '@babel/types': 7.25.9 - transitivePeerDependencies: - - supports-color - - '@babel/helper-compilation-targets@7.25.9': - dependencies: - '@babel/compat-data': 7.25.9 - '@babel/helper-validator-option': 7.25.9 - browserslist: 4.24.2 - lru-cache: 5.1.1 - semver: 6.3.1 - - '@babel/helper-create-class-features-plugin@7.25.9(@babel/core@7.25.9)': - dependencies: - '@babel/core': 7.25.9 - '@babel/helper-annotate-as-pure': 7.25.9 - '@babel/helper-member-expression-to-functions': 7.25.9 - '@babel/helper-optimise-call-expression': 7.25.9 - '@babel/helper-replace-supers': 7.25.9(@babel/core@7.25.9) - '@babel/helper-skip-transparent-expression-wrappers': 7.25.9 - '@babel/traverse': 7.25.9 - semver: 6.3.1 - transitivePeerDependencies: - - supports-color - - '@babel/helper-create-regexp-features-plugin@7.25.9(@babel/core@7.25.9)': - dependencies: - '@babel/core': 7.25.9 - '@babel/helper-annotate-as-pure': 7.25.9 - regexpu-core: 6.1.1 - semver: 6.3.1 - - '@babel/helper-define-polyfill-provider@0.6.2(@babel/core@7.25.9)': - dependencies: - '@babel/core': 7.25.9 - '@babel/helper-compilation-targets': 7.25.9 - '@babel/helper-plugin-utils': 7.25.9 - debug: 4.3.7(supports-color@6.1.0) - lodash.debounce: 4.0.8 - resolve: 1.22.8 - transitivePeerDependencies: - - supports-color - - '@babel/helper-member-expression-to-functions@7.25.9': - dependencies: - '@babel/traverse': 7.25.9 - '@babel/types': 7.25.9 - transitivePeerDependencies: - - supports-color - - '@babel/helper-module-imports@7.25.9': - dependencies: - '@babel/traverse': 7.25.9 - '@babel/types': 7.25.9 - transitivePeerDependencies: - - supports-color - - '@babel/helper-module-transforms@7.25.9(@babel/core@7.25.9)': - dependencies: - '@babel/core': 7.25.9 - '@babel/helper-module-imports': 7.25.9 - '@babel/helper-simple-access': 7.25.9 - '@babel/helper-validator-identifier': 7.25.9 - '@babel/traverse': 7.25.9 - transitivePeerDependencies: - - supports-color - - '@babel/helper-optimise-call-expression@7.25.9': - dependencies: - '@babel/types': 7.25.9 - - '@babel/helper-plugin-utils@7.25.9': {} - - '@babel/helper-remap-async-to-generator@7.25.9(@babel/core@7.25.9)': - dependencies: - '@babel/core': 7.25.9 - '@babel/helper-annotate-as-pure': 7.25.9 - '@babel/helper-wrap-function': 7.25.9 - '@babel/traverse': 7.25.9 - transitivePeerDependencies: - - supports-color - - '@babel/helper-replace-supers@7.25.9(@babel/core@7.25.9)': - dependencies: - '@babel/core': 7.25.9 - '@babel/helper-member-expression-to-functions': 7.25.9 - '@babel/helper-optimise-call-expression': 7.25.9 - '@babel/traverse': 7.25.9 - transitivePeerDependencies: - - supports-color - - '@babel/helper-simple-access@7.25.9': - dependencies: - '@babel/traverse': 7.25.9 - '@babel/types': 7.25.9 - transitivePeerDependencies: - - supports-color - - '@babel/helper-skip-transparent-expression-wrappers@7.25.9': - dependencies: - '@babel/traverse': 7.25.9 - '@babel/types': 7.25.9 - transitivePeerDependencies: - - supports-color - - '@babel/helper-string-parser@7.25.9': {} - - '@babel/helper-validator-identifier@7.25.9': {} - - '@babel/helper-validator-option@7.25.9': {} - - '@babel/helper-wrap-function@7.25.9': - dependencies: - '@babel/template': 7.25.9 - '@babel/traverse': 7.25.9 - '@babel/types': 7.25.9 - transitivePeerDependencies: - - supports-color - - '@babel/helpers@7.25.9': - dependencies: - '@babel/template': 7.25.9 - '@babel/types': 7.25.9 - - '@babel/highlight@7.25.9': - dependencies: - '@babel/helper-validator-identifier': 7.25.9 - chalk: 2.4.2 - js-tokens: 4.0.0 - picocolors: 1.1.1 - - '@babel/parser@7.25.9': - dependencies: - '@babel/types': 7.25.9 - - '@babel/plugin-bugfix-firefox-class-in-computed-class-key@7.25.9(@babel/core@7.25.9)': - dependencies: - '@babel/core': 7.25.9 - '@babel/helper-plugin-utils': 7.25.9 - '@babel/traverse': 7.25.9 - transitivePeerDependencies: - - supports-color - - '@babel/plugin-bugfix-safari-class-field-initializer-scope@7.25.9(@babel/core@7.25.9)': - dependencies: - '@babel/core': 7.25.9 - '@babel/helper-plugin-utils': 7.25.9 - - '@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression@7.25.9(@babel/core@7.25.9)': - dependencies: - '@babel/core': 7.25.9 - '@babel/helper-plugin-utils': 7.25.9 - - '@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining@7.25.9(@babel/core@7.25.9)': - dependencies: - '@babel/core': 7.25.9 - '@babel/helper-plugin-utils': 7.25.9 - '@babel/helper-skip-transparent-expression-wrappers': 7.25.9 - '@babel/plugin-transform-optional-chaining': 7.25.9(@babel/core@7.25.9) - transitivePeerDependencies: - - supports-color - - '@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly@7.25.9(@babel/core@7.25.9)': - dependencies: - '@babel/core': 7.25.9 - '@babel/helper-plugin-utils': 7.25.9 - '@babel/traverse': 7.25.9 - transitivePeerDependencies: - - supports-color - - '@babel/plugin-proposal-private-property-in-object@7.21.0-placeholder-for-preset-env.2(@babel/core@7.25.9)': - dependencies: - '@babel/core': 7.25.9 - - '@babel/plugin-syntax-import-assertions@7.25.9(@babel/core@7.25.9)': - dependencies: - '@babel/core': 7.25.9 - '@babel/helper-plugin-utils': 7.25.9 - - '@babel/plugin-syntax-import-attributes@7.25.9(@babel/core@7.25.9)': - dependencies: - '@babel/core': 7.25.9 - '@babel/helper-plugin-utils': 7.25.9 - - '@babel/plugin-syntax-jsx@7.25.9(@babel/core@7.25.9)': - dependencies: - '@babel/core': 7.25.9 - '@babel/helper-plugin-utils': 7.25.9 - - '@babel/plugin-syntax-typescript@7.25.9(@babel/core@7.25.9)': - dependencies: - '@babel/core': 7.25.9 - '@babel/helper-plugin-utils': 7.25.9 - - '@babel/plugin-syntax-unicode-sets-regex@7.18.6(@babel/core@7.25.9)': - dependencies: - '@babel/core': 7.25.9 - '@babel/helper-create-regexp-features-plugin': 7.25.9(@babel/core@7.25.9) - '@babel/helper-plugin-utils': 7.25.9 - - '@babel/plugin-transform-arrow-functions@7.25.9(@babel/core@7.25.9)': - dependencies: - '@babel/core': 7.25.9 - '@babel/helper-plugin-utils': 7.25.9 - - '@babel/plugin-transform-async-generator-functions@7.25.9(@babel/core@7.25.9)': - dependencies: - '@babel/core': 7.25.9 - '@babel/helper-plugin-utils': 7.25.9 - '@babel/helper-remap-async-to-generator': 7.25.9(@babel/core@7.25.9) - '@babel/traverse': 7.25.9 - transitivePeerDependencies: - - supports-color - - '@babel/plugin-transform-async-to-generator@7.25.9(@babel/core@7.25.9)': - dependencies: - '@babel/core': 7.25.9 - '@babel/helper-module-imports': 7.25.9 - '@babel/helper-plugin-utils': 7.25.9 - '@babel/helper-remap-async-to-generator': 7.25.9(@babel/core@7.25.9) - transitivePeerDependencies: - - supports-color - - '@babel/plugin-transform-block-scoped-functions@7.25.9(@babel/core@7.25.9)': - dependencies: - '@babel/core': 7.25.9 - '@babel/helper-plugin-utils': 7.25.9 - - '@babel/plugin-transform-block-scoping@7.25.9(@babel/core@7.25.9)': - dependencies: - '@babel/core': 7.25.9 - '@babel/helper-plugin-utils': 7.25.9 - - '@babel/plugin-transform-class-properties@7.25.9(@babel/core@7.25.9)': - dependencies: - '@babel/core': 7.25.9 - '@babel/helper-create-class-features-plugin': 7.25.9(@babel/core@7.25.9) - '@babel/helper-plugin-utils': 7.25.9 - transitivePeerDependencies: - - supports-color - - '@babel/plugin-transform-class-static-block@7.25.9(@babel/core@7.25.9)': - dependencies: - '@babel/core': 7.25.9 - '@babel/helper-create-class-features-plugin': 7.25.9(@babel/core@7.25.9) - '@babel/helper-plugin-utils': 7.25.9 - transitivePeerDependencies: - - supports-color - - '@babel/plugin-transform-classes@7.25.9(@babel/core@7.25.9)': - dependencies: - '@babel/core': 7.25.9 - '@babel/helper-annotate-as-pure': 7.25.9 - '@babel/helper-compilation-targets': 7.25.9 - '@babel/helper-plugin-utils': 7.25.9 - '@babel/helper-replace-supers': 7.25.9(@babel/core@7.25.9) - '@babel/traverse': 7.25.9 - globals: 11.12.0 - transitivePeerDependencies: - - supports-color - - '@babel/plugin-transform-computed-properties@7.25.9(@babel/core@7.25.9)': - dependencies: - '@babel/core': 7.25.9 - '@babel/helper-plugin-utils': 7.25.9 - '@babel/template': 7.25.9 - - '@babel/plugin-transform-destructuring@7.25.9(@babel/core@7.25.9)': - dependencies: - '@babel/core': 7.25.9 - '@babel/helper-plugin-utils': 7.25.9 - - '@babel/plugin-transform-dotall-regex@7.25.9(@babel/core@7.25.9)': - dependencies: - '@babel/core': 7.25.9 - '@babel/helper-create-regexp-features-plugin': 7.25.9(@babel/core@7.25.9) - '@babel/helper-plugin-utils': 7.25.9 - - '@babel/plugin-transform-duplicate-keys@7.25.9(@babel/core@7.25.9)': - dependencies: - '@babel/core': 7.25.9 - '@babel/helper-plugin-utils': 7.25.9 - - '@babel/plugin-transform-duplicate-named-capturing-groups-regex@7.25.9(@babel/core@7.25.9)': - dependencies: - '@babel/core': 7.25.9 - '@babel/helper-create-regexp-features-plugin': 7.25.9(@babel/core@7.25.9) - '@babel/helper-plugin-utils': 7.25.9 - - '@babel/plugin-transform-dynamic-import@7.25.9(@babel/core@7.25.9)': - dependencies: - '@babel/core': 7.25.9 - '@babel/helper-plugin-utils': 7.25.9 - - '@babel/plugin-transform-exponentiation-operator@7.25.9(@babel/core@7.25.9)': - dependencies: - '@babel/core': 7.25.9 - '@babel/helper-builder-binary-assignment-operator-visitor': 7.25.9 - '@babel/helper-plugin-utils': 7.25.9 - transitivePeerDependencies: - - supports-color - - '@babel/plugin-transform-export-namespace-from@7.25.9(@babel/core@7.25.9)': - dependencies: - '@babel/core': 7.25.9 - '@babel/helper-plugin-utils': 7.25.9 - - '@babel/plugin-transform-for-of@7.25.9(@babel/core@7.25.9)': - dependencies: - '@babel/core': 7.25.9 - '@babel/helper-plugin-utils': 7.25.9 - '@babel/helper-skip-transparent-expression-wrappers': 7.25.9 - transitivePeerDependencies: - - supports-color - - '@babel/plugin-transform-function-name@7.25.9(@babel/core@7.25.9)': - dependencies: - '@babel/core': 7.25.9 - '@babel/helper-compilation-targets': 7.25.9 - '@babel/helper-plugin-utils': 7.25.9 - '@babel/traverse': 7.25.9 - transitivePeerDependencies: - - supports-color - - '@babel/plugin-transform-json-strings@7.25.9(@babel/core@7.25.9)': - dependencies: - '@babel/core': 7.25.9 - '@babel/helper-plugin-utils': 7.25.9 - - '@babel/plugin-transform-literals@7.25.9(@babel/core@7.25.9)': - dependencies: - '@babel/core': 7.25.9 - '@babel/helper-plugin-utils': 7.25.9 - - '@babel/plugin-transform-logical-assignment-operators@7.25.9(@babel/core@7.25.9)': - dependencies: - '@babel/core': 7.25.9 - '@babel/helper-plugin-utils': 7.25.9 - - '@babel/plugin-transform-member-expression-literals@7.25.9(@babel/core@7.25.9)': - dependencies: - '@babel/core': 7.25.9 - '@babel/helper-plugin-utils': 7.25.9 - - '@babel/plugin-transform-modules-amd@7.25.9(@babel/core@7.25.9)': - dependencies: - '@babel/core': 7.25.9 - '@babel/helper-module-transforms': 7.25.9(@babel/core@7.25.9) - '@babel/helper-plugin-utils': 7.25.9 - transitivePeerDependencies: - - supports-color - - '@babel/plugin-transform-modules-commonjs@7.25.9(@babel/core@7.25.9)': - dependencies: - '@babel/core': 7.25.9 - '@babel/helper-module-transforms': 7.25.9(@babel/core@7.25.9) - '@babel/helper-plugin-utils': 7.25.9 - '@babel/helper-simple-access': 7.25.9 - transitivePeerDependencies: - - supports-color - - '@babel/plugin-transform-modules-systemjs@7.25.9(@babel/core@7.25.9)': - dependencies: - '@babel/core': 7.25.9 - '@babel/helper-module-transforms': 7.25.9(@babel/core@7.25.9) - '@babel/helper-plugin-utils': 7.25.9 - '@babel/helper-validator-identifier': 7.25.9 - '@babel/traverse': 7.25.9 - transitivePeerDependencies: - - supports-color - - '@babel/plugin-transform-modules-umd@7.25.9(@babel/core@7.25.9)': - dependencies: - '@babel/core': 7.25.9 - '@babel/helper-module-transforms': 7.25.9(@babel/core@7.25.9) - '@babel/helper-plugin-utils': 7.25.9 - transitivePeerDependencies: - - supports-color - - '@babel/plugin-transform-named-capturing-groups-regex@7.25.9(@babel/core@7.25.9)': - dependencies: - '@babel/core': 7.25.9 - '@babel/helper-create-regexp-features-plugin': 7.25.9(@babel/core@7.25.9) - '@babel/helper-plugin-utils': 7.25.9 - - '@babel/plugin-transform-new-target@7.25.9(@babel/core@7.25.9)': - dependencies: - '@babel/core': 7.25.9 - '@babel/helper-plugin-utils': 7.25.9 - - '@babel/plugin-transform-nullish-coalescing-operator@7.25.9(@babel/core@7.25.9)': - dependencies: - '@babel/core': 7.25.9 - '@babel/helper-plugin-utils': 7.25.9 - - '@babel/plugin-transform-numeric-separator@7.25.9(@babel/core@7.25.9)': - dependencies: - '@babel/core': 7.25.9 - '@babel/helper-plugin-utils': 7.25.9 - - '@babel/plugin-transform-object-rest-spread@7.25.9(@babel/core@7.25.9)': - dependencies: - '@babel/core': 7.25.9 - '@babel/helper-compilation-targets': 7.25.9 - '@babel/helper-plugin-utils': 7.25.9 - '@babel/plugin-transform-parameters': 7.25.9(@babel/core@7.25.9) - - '@babel/plugin-transform-object-super@7.25.9(@babel/core@7.25.9)': - dependencies: - '@babel/core': 7.25.9 - '@babel/helper-plugin-utils': 7.25.9 - '@babel/helper-replace-supers': 7.25.9(@babel/core@7.25.9) - transitivePeerDependencies: - - supports-color - - '@babel/plugin-transform-optional-catch-binding@7.25.9(@babel/core@7.25.9)': - dependencies: - '@babel/core': 7.25.9 - '@babel/helper-plugin-utils': 7.25.9 - - '@babel/plugin-transform-optional-chaining@7.25.9(@babel/core@7.25.9)': - dependencies: - '@babel/core': 7.25.9 - '@babel/helper-plugin-utils': 7.25.9 - '@babel/helper-skip-transparent-expression-wrappers': 7.25.9 - transitivePeerDependencies: - - supports-color - - '@babel/plugin-transform-parameters@7.25.9(@babel/core@7.25.9)': - dependencies: - '@babel/core': 7.25.9 - '@babel/helper-plugin-utils': 7.25.9 - - '@babel/plugin-transform-private-methods@7.25.9(@babel/core@7.25.9)': - dependencies: - '@babel/core': 7.25.9 - '@babel/helper-create-class-features-plugin': 7.25.9(@babel/core@7.25.9) - '@babel/helper-plugin-utils': 7.25.9 - transitivePeerDependencies: - - supports-color - - '@babel/plugin-transform-private-property-in-object@7.25.9(@babel/core@7.25.9)': - dependencies: - '@babel/core': 7.25.9 - '@babel/helper-annotate-as-pure': 7.25.9 - '@babel/helper-create-class-features-plugin': 7.25.9(@babel/core@7.25.9) - '@babel/helper-plugin-utils': 7.25.9 - transitivePeerDependencies: - - supports-color - - '@babel/plugin-transform-property-literals@7.25.9(@babel/core@7.25.9)': - dependencies: - '@babel/core': 7.25.9 - '@babel/helper-plugin-utils': 7.25.9 - - '@babel/plugin-transform-regenerator@7.25.9(@babel/core@7.25.9)': - dependencies: - '@babel/core': 7.25.9 - '@babel/helper-plugin-utils': 7.25.9 - regenerator-transform: 0.15.2 - - '@babel/plugin-transform-reserved-words@7.25.9(@babel/core@7.25.9)': - dependencies: - '@babel/core': 7.25.9 - '@babel/helper-plugin-utils': 7.25.9 - - '@babel/plugin-transform-runtime@7.25.9(@babel/core@7.25.9)': - dependencies: - '@babel/core': 7.25.9 - '@babel/helper-module-imports': 7.25.9 - '@babel/helper-plugin-utils': 7.25.9 - babel-plugin-polyfill-corejs2: 0.4.11(@babel/core@7.25.9) - babel-plugin-polyfill-corejs3: 0.10.6(@babel/core@7.25.9) - babel-plugin-polyfill-regenerator: 0.6.2(@babel/core@7.25.9) - semver: 6.3.1 - transitivePeerDependencies: - - supports-color - - '@babel/plugin-transform-shorthand-properties@7.25.9(@babel/core@7.25.9)': - dependencies: - '@babel/core': 7.25.9 - '@babel/helper-plugin-utils': 7.25.9 - - '@babel/plugin-transform-spread@7.25.9(@babel/core@7.25.9)': - dependencies: - '@babel/core': 7.25.9 - '@babel/helper-plugin-utils': 7.25.9 - '@babel/helper-skip-transparent-expression-wrappers': 7.25.9 - transitivePeerDependencies: - - supports-color - - '@babel/plugin-transform-sticky-regex@7.25.9(@babel/core@7.25.9)': - dependencies: - '@babel/core': 7.25.9 - '@babel/helper-plugin-utils': 7.25.9 - - '@babel/plugin-transform-template-literals@7.25.9(@babel/core@7.25.9)': - dependencies: - '@babel/core': 7.25.9 - '@babel/helper-plugin-utils': 7.25.9 - - '@babel/plugin-transform-typeof-symbol@7.25.9(@babel/core@7.25.9)': - dependencies: - '@babel/core': 7.25.9 - '@babel/helper-plugin-utils': 7.25.9 - - '@babel/plugin-transform-typescript@7.25.9(@babel/core@7.25.9)': - dependencies: - '@babel/core': 7.25.9 - '@babel/helper-annotate-as-pure': 7.25.9 - '@babel/helper-create-class-features-plugin': 7.25.9(@babel/core@7.25.9) - '@babel/helper-plugin-utils': 7.25.9 - '@babel/helper-skip-transparent-expression-wrappers': 7.25.9 - '@babel/plugin-syntax-typescript': 7.25.9(@babel/core@7.25.9) - transitivePeerDependencies: - - supports-color - - '@babel/plugin-transform-unicode-escapes@7.25.9(@babel/core@7.25.9)': - dependencies: - '@babel/core': 7.25.9 - '@babel/helper-plugin-utils': 7.25.9 - - '@babel/plugin-transform-unicode-property-regex@7.25.9(@babel/core@7.25.9)': - dependencies: - '@babel/core': 7.25.9 - '@babel/helper-create-regexp-features-plugin': 7.25.9(@babel/core@7.25.9) - '@babel/helper-plugin-utils': 7.25.9 - - '@babel/plugin-transform-unicode-regex@7.25.9(@babel/core@7.25.9)': - dependencies: - '@babel/core': 7.25.9 - '@babel/helper-create-regexp-features-plugin': 7.25.9(@babel/core@7.25.9) - '@babel/helper-plugin-utils': 7.25.9 - - '@babel/plugin-transform-unicode-sets-regex@7.25.9(@babel/core@7.25.9)': - dependencies: - '@babel/core': 7.25.9 - '@babel/helper-create-regexp-features-plugin': 7.25.9(@babel/core@7.25.9) - '@babel/helper-plugin-utils': 7.25.9 - - '@babel/preset-env@7.25.9(@babel/core@7.25.9)': - dependencies: - '@babel/compat-data': 7.25.9 - '@babel/core': 7.25.9 - '@babel/helper-compilation-targets': 7.25.9 - '@babel/helper-plugin-utils': 7.25.9 - '@babel/helper-validator-option': 7.25.9 - '@babel/plugin-bugfix-firefox-class-in-computed-class-key': 7.25.9(@babel/core@7.25.9) - '@babel/plugin-bugfix-safari-class-field-initializer-scope': 7.25.9(@babel/core@7.25.9) - '@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression': 7.25.9(@babel/core@7.25.9) - '@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining': 7.25.9(@babel/core@7.25.9) - '@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly': 7.25.9(@babel/core@7.25.9) - '@babel/plugin-proposal-private-property-in-object': 7.21.0-placeholder-for-preset-env.2(@babel/core@7.25.9) - '@babel/plugin-syntax-import-assertions': 7.25.9(@babel/core@7.25.9) - '@babel/plugin-syntax-import-attributes': 7.25.9(@babel/core@7.25.9) - '@babel/plugin-syntax-unicode-sets-regex': 7.18.6(@babel/core@7.25.9) - '@babel/plugin-transform-arrow-functions': 7.25.9(@babel/core@7.25.9) - '@babel/plugin-transform-async-generator-functions': 7.25.9(@babel/core@7.25.9) - '@babel/plugin-transform-async-to-generator': 7.25.9(@babel/core@7.25.9) - '@babel/plugin-transform-block-scoped-functions': 7.25.9(@babel/core@7.25.9) - '@babel/plugin-transform-block-scoping': 7.25.9(@babel/core@7.25.9) - '@babel/plugin-transform-class-properties': 7.25.9(@babel/core@7.25.9) - '@babel/plugin-transform-class-static-block': 7.25.9(@babel/core@7.25.9) - '@babel/plugin-transform-classes': 7.25.9(@babel/core@7.25.9) - '@babel/plugin-transform-computed-properties': 7.25.9(@babel/core@7.25.9) - '@babel/plugin-transform-destructuring': 7.25.9(@babel/core@7.25.9) - '@babel/plugin-transform-dotall-regex': 7.25.9(@babel/core@7.25.9) - '@babel/plugin-transform-duplicate-keys': 7.25.9(@babel/core@7.25.9) - '@babel/plugin-transform-duplicate-named-capturing-groups-regex': 7.25.9(@babel/core@7.25.9) - '@babel/plugin-transform-dynamic-import': 7.25.9(@babel/core@7.25.9) - '@babel/plugin-transform-exponentiation-operator': 7.25.9(@babel/core@7.25.9) - '@babel/plugin-transform-export-namespace-from': 7.25.9(@babel/core@7.25.9) - '@babel/plugin-transform-for-of': 7.25.9(@babel/core@7.25.9) - '@babel/plugin-transform-function-name': 7.25.9(@babel/core@7.25.9) - '@babel/plugin-transform-json-strings': 7.25.9(@babel/core@7.25.9) - '@babel/plugin-transform-literals': 7.25.9(@babel/core@7.25.9) - '@babel/plugin-transform-logical-assignment-operators': 7.25.9(@babel/core@7.25.9) - '@babel/plugin-transform-member-expression-literals': 7.25.9(@babel/core@7.25.9) - '@babel/plugin-transform-modules-amd': 7.25.9(@babel/core@7.25.9) - '@babel/plugin-transform-modules-commonjs': 7.25.9(@babel/core@7.25.9) - '@babel/plugin-transform-modules-systemjs': 7.25.9(@babel/core@7.25.9) - '@babel/plugin-transform-modules-umd': 7.25.9(@babel/core@7.25.9) - '@babel/plugin-transform-named-capturing-groups-regex': 7.25.9(@babel/core@7.25.9) - '@babel/plugin-transform-new-target': 7.25.9(@babel/core@7.25.9) - '@babel/plugin-transform-nullish-coalescing-operator': 7.25.9(@babel/core@7.25.9) - '@babel/plugin-transform-numeric-separator': 7.25.9(@babel/core@7.25.9) - '@babel/plugin-transform-object-rest-spread': 7.25.9(@babel/core@7.25.9) - '@babel/plugin-transform-object-super': 7.25.9(@babel/core@7.25.9) - '@babel/plugin-transform-optional-catch-binding': 7.25.9(@babel/core@7.25.9) - '@babel/plugin-transform-optional-chaining': 7.25.9(@babel/core@7.25.9) - '@babel/plugin-transform-parameters': 7.25.9(@babel/core@7.25.9) - '@babel/plugin-transform-private-methods': 7.25.9(@babel/core@7.25.9) - '@babel/plugin-transform-private-property-in-object': 7.25.9(@babel/core@7.25.9) - '@babel/plugin-transform-property-literals': 7.25.9(@babel/core@7.25.9) - '@babel/plugin-transform-regenerator': 7.25.9(@babel/core@7.25.9) - '@babel/plugin-transform-reserved-words': 7.25.9(@babel/core@7.25.9) - '@babel/plugin-transform-shorthand-properties': 7.25.9(@babel/core@7.25.9) - '@babel/plugin-transform-spread': 7.25.9(@babel/core@7.25.9) - '@babel/plugin-transform-sticky-regex': 7.25.9(@babel/core@7.25.9) - '@babel/plugin-transform-template-literals': 7.25.9(@babel/core@7.25.9) - '@babel/plugin-transform-typeof-symbol': 7.25.9(@babel/core@7.25.9) - '@babel/plugin-transform-unicode-escapes': 7.25.9(@babel/core@7.25.9) - '@babel/plugin-transform-unicode-property-regex': 7.25.9(@babel/core@7.25.9) - '@babel/plugin-transform-unicode-regex': 7.25.9(@babel/core@7.25.9) - '@babel/plugin-transform-unicode-sets-regex': 7.25.9(@babel/core@7.25.9) - '@babel/preset-modules': 0.1.6-no-external-plugins(@babel/core@7.25.9) - babel-plugin-polyfill-corejs2: 0.4.11(@babel/core@7.25.9) - babel-plugin-polyfill-corejs3: 0.10.6(@babel/core@7.25.9) - babel-plugin-polyfill-regenerator: 0.6.2(@babel/core@7.25.9) - core-js-compat: 3.38.1 - semver: 6.3.1 - transitivePeerDependencies: - - supports-color - - '@babel/preset-modules@0.1.6-no-external-plugins(@babel/core@7.25.9)': - dependencies: - '@babel/core': 7.25.9 - '@babel/helper-plugin-utils': 7.25.9 - '@babel/types': 7.25.9 - esutils: 2.0.3 - - '@babel/preset-typescript@7.25.9(@babel/core@7.25.9)': - dependencies: - '@babel/core': 7.25.9 - '@babel/helper-plugin-utils': 7.25.9 - '@babel/helper-validator-option': 7.25.9 - '@babel/plugin-syntax-jsx': 7.25.9(@babel/core@7.25.9) - '@babel/plugin-transform-modules-commonjs': 7.25.9(@babel/core@7.25.9) - '@babel/plugin-transform-typescript': 7.25.9(@babel/core@7.25.9) - transitivePeerDependencies: - - supports-color - - '@babel/runtime@7.26.10': - dependencies: - regenerator-runtime: 0.14.1 - - '@babel/template@7.25.9': - dependencies: - '@babel/code-frame': 7.25.9 - '@babel/parser': 7.25.9 - '@babel/types': 7.25.9 - - '@babel/traverse@7.25.9': - dependencies: - '@babel/code-frame': 7.25.9 - '@babel/generator': 7.25.9 - '@babel/parser': 7.25.9 - '@babel/template': 7.25.9 - '@babel/types': 7.25.9 - debug: 4.3.7(supports-color@6.1.0) - globals: 11.12.0 - transitivePeerDependencies: - - supports-color - - '@babel/types@7.25.9': - dependencies: - '@babel/helper-string-parser': 7.25.9 - '@babel/helper-validator-identifier': 7.25.9 - - '@changesets/apply-release-plan@7.0.5': - dependencies: - '@changesets/config': 3.0.3 - '@changesets/get-version-range-type': 0.4.0 - '@changesets/git': 3.0.1 - '@changesets/should-skip-package': 0.1.1 - '@changesets/types': 6.0.0 - '@manypkg/get-packages': 1.1.3 - detect-indent: 6.1.0 - fs-extra: 7.0.1 - lodash.startcase: 4.4.0 - outdent: 0.5.0 - prettier: 2.8.8 - resolve-from: 5.0.0 - semver: 7.6.3 - - '@changesets/assemble-release-plan@6.0.4': - dependencies: - '@changesets/errors': 0.2.0 - '@changesets/get-dependents-graph': 2.1.2 - '@changesets/should-skip-package': 0.1.1 - '@changesets/types': 6.0.0 - '@manypkg/get-packages': 1.1.3 - semver: 7.6.3 - - '@changesets/changelog-git@0.2.0': - dependencies: - '@changesets/types': 6.0.0 - - '@changesets/changelog-github@0.5.0': - dependencies: - '@changesets/get-github-info': 0.6.0 - '@changesets/types': 6.0.0 - dotenv: 8.6.0 - transitivePeerDependencies: - - encoding - - '@changesets/cli@2.27.9': - dependencies: - '@changesets/apply-release-plan': 7.0.5 - '@changesets/assemble-release-plan': 6.0.4 - '@changesets/changelog-git': 0.2.0 - '@changesets/config': 3.0.3 - '@changesets/errors': 0.2.0 - '@changesets/get-dependents-graph': 2.1.2 - '@changesets/get-release-plan': 4.0.4 - '@changesets/git': 3.0.1 - '@changesets/logger': 0.1.1 - '@changesets/pre': 2.0.1 - '@changesets/read': 0.6.1 - '@changesets/should-skip-package': 0.1.1 - '@changesets/types': 6.0.0 - '@changesets/write': 0.3.2 - '@manypkg/get-packages': 1.1.3 - ansi-colors: 4.1.3 - ci-info: 3.9.0 - enquirer: 2.4.1 - external-editor: 3.1.0 - fs-extra: 7.0.1 - mri: 1.2.0 - p-limit: 2.3.0 - package-manager-detector: 0.2.2 - picocolors: 1.1.1 - resolve-from: 5.0.0 - semver: 7.6.3 - spawndamnit: 2.0.0 - term-size: 2.2.1 - - '@changesets/config@3.0.3': - dependencies: - '@changesets/errors': 0.2.0 - '@changesets/get-dependents-graph': 2.1.2 - '@changesets/logger': 0.1.1 - '@changesets/types': 6.0.0 - '@manypkg/get-packages': 1.1.3 - fs-extra: 7.0.1 - micromatch: 4.0.8 - - '@changesets/errors@0.2.0': - dependencies: - extendable-error: 0.1.7 - - '@changesets/get-dependents-graph@2.1.2': - dependencies: - '@changesets/types': 6.0.0 - '@manypkg/get-packages': 1.1.3 - picocolors: 1.1.1 - semver: 7.6.3 - - '@changesets/get-github-info@0.6.0': - dependencies: - dataloader: 1.4.0 - node-fetch: 2.7.0 - transitivePeerDependencies: - - encoding - - '@changesets/get-release-plan@4.0.4': - dependencies: - '@changesets/assemble-release-plan': 6.0.4 - '@changesets/config': 3.0.3 - '@changesets/pre': 2.0.1 - '@changesets/read': 0.6.1 - '@changesets/types': 6.0.0 - '@manypkg/get-packages': 1.1.3 - - '@changesets/get-version-range-type@0.4.0': {} - - '@changesets/git@3.0.1': - dependencies: - '@changesets/errors': 0.2.0 - '@manypkg/get-packages': 1.1.3 - is-subdir: 1.2.0 - micromatch: 4.0.8 - spawndamnit: 2.0.0 - - '@changesets/logger@0.1.1': - dependencies: - picocolors: 1.1.1 - - '@changesets/parse@0.4.0': - dependencies: - '@changesets/types': 6.0.0 - js-yaml: 3.14.1 - - '@changesets/pre@2.0.1': - dependencies: - '@changesets/errors': 0.2.0 - '@changesets/types': 6.0.0 - '@manypkg/get-packages': 1.1.3 - fs-extra: 7.0.1 - - '@changesets/read@0.6.1': - dependencies: - '@changesets/git': 3.0.1 - '@changesets/logger': 0.1.1 - '@changesets/parse': 0.4.0 - '@changesets/types': 6.0.0 - fs-extra: 7.0.1 - p-filter: 2.1.0 - picocolors: 1.1.1 - - '@changesets/should-skip-package@0.1.1': - dependencies: - '@changesets/types': 6.0.0 - '@manypkg/get-packages': 1.1.3 - - '@changesets/types@4.1.0': {} - - '@changesets/types@6.0.0': {} - - '@changesets/write@0.3.2': - dependencies: - '@changesets/types': 6.0.0 - fs-extra: 7.0.1 - human-id: 1.0.2 - prettier: 2.8.8 - - '@cspotcode/source-map-support@0.8.1': - dependencies: - '@jridgewell/trace-mapping': 0.3.9 - - '@databeat/tracker@0.9.3': - dependencies: - '@noble/hashes': 1.5.0 - - '@discoveryjs/json-ext@0.5.7': {} - - '@esbuild/aix-ppc64@0.23.1': - optional: true - - '@esbuild/android-arm64@0.23.1': - optional: true - - '@esbuild/android-arm@0.23.1': - optional: true - - '@esbuild/android-x64@0.23.1': - optional: true - - '@esbuild/darwin-arm64@0.23.1': - optional: true - - '@esbuild/darwin-x64@0.23.1': - optional: true - - '@esbuild/freebsd-arm64@0.23.1': - optional: true - - '@esbuild/freebsd-x64@0.23.1': - optional: true - - '@esbuild/linux-arm64@0.23.1': - optional: true - - '@esbuild/linux-arm@0.23.1': - optional: true - - '@esbuild/linux-ia32@0.23.1': - optional: true - - '@esbuild/linux-loong64@0.23.1': - optional: true - - '@esbuild/linux-mips64el@0.23.1': - optional: true - - '@esbuild/linux-ppc64@0.23.1': - optional: true - - '@esbuild/linux-riscv64@0.23.1': - optional: true - - '@esbuild/linux-s390x@0.23.1': - optional: true - - '@esbuild/linux-x64@0.23.1': - optional: true - - '@esbuild/netbsd-x64@0.23.1': - optional: true - - '@esbuild/openbsd-arm64@0.23.1': - optional: true - - '@esbuild/openbsd-x64@0.23.1': - optional: true - - '@esbuild/sunos-x64@0.23.1': - optional: true - - '@esbuild/win32-arm64@0.23.1': - optional: true - - '@esbuild/win32-ia32@0.23.1': - optional: true - - '@esbuild/win32-x64@0.23.1': - optional: true - - '@eslint-community/eslint-utils@4.4.0(eslint@8.57.1)': - dependencies: - eslint: 8.57.1 - eslint-visitor-keys: 3.4.3 - - '@eslint-community/regexpp@4.11.1': {} - - '@eslint/eslintrc@2.1.4': - dependencies: - ajv: 6.12.6 - debug: 4.3.7(supports-color@6.1.0) - espree: 9.6.1 - globals: 13.24.0 - ignore: 5.3.2 - import-fresh: 3.3.0 - js-yaml: 4.1.0 - minimatch: 3.1.2 - strip-json-comments: 3.1.1 - transitivePeerDependencies: - - supports-color - - '@eslint/js@8.57.1': {} - - '@ethereumjs/common@2.6.5': - dependencies: - crc-32: 1.2.2 - ethereumjs-util: 7.1.5 - - '@ethereumjs/rlp@4.0.1': {} - - '@ethereumjs/tx@3.5.2': - dependencies: - '@ethereumjs/common': 2.6.5 - ethereumjs-util: 7.1.5 - - '@ethereumjs/util@8.1.0': - dependencies: - '@ethereumjs/rlp': 4.0.1 - ethereum-cryptography: 2.2.1 - micro-ftch: 0.3.1 - - '@ethersproject/abi@5.7.0': - dependencies: - '@ethersproject/address': 5.7.0 - '@ethersproject/bignumber': 5.7.0 - '@ethersproject/bytes': 5.7.0 - '@ethersproject/constants': 5.7.0 - '@ethersproject/hash': 5.7.0 - '@ethersproject/keccak256': 5.7.0 - '@ethersproject/logger': 5.7.0 - '@ethersproject/properties': 5.7.0 - '@ethersproject/strings': 5.7.0 - - '@ethersproject/abi@5.8.0': - dependencies: - '@ethersproject/address': 5.8.0 - '@ethersproject/bignumber': 5.8.0 - '@ethersproject/bytes': 5.8.0 - '@ethersproject/constants': 5.8.0 - '@ethersproject/hash': 5.8.0 - '@ethersproject/keccak256': 5.8.0 - '@ethersproject/logger': 5.8.0 - '@ethersproject/properties': 5.8.0 - '@ethersproject/strings': 5.8.0 - - '@ethersproject/abstract-provider@5.7.0': - dependencies: - '@ethersproject/bignumber': 5.7.0 - '@ethersproject/bytes': 5.7.0 - '@ethersproject/logger': 5.7.0 - '@ethersproject/networks': 5.7.1 - '@ethersproject/properties': 5.7.0 - '@ethersproject/transactions': 5.7.0 - '@ethersproject/web': 5.7.1 - - '@ethersproject/abstract-provider@5.8.0': - dependencies: - '@ethersproject/bignumber': 5.8.0 - '@ethersproject/bytes': 5.8.0 - '@ethersproject/logger': 5.8.0 - '@ethersproject/networks': 5.8.0 - '@ethersproject/properties': 5.8.0 - '@ethersproject/transactions': 5.8.0 - '@ethersproject/web': 5.8.0 - - '@ethersproject/abstract-signer@5.7.0': - dependencies: - '@ethersproject/abstract-provider': 5.7.0 - '@ethersproject/bignumber': 5.7.0 - '@ethersproject/bytes': 5.7.0 - '@ethersproject/logger': 5.7.0 - '@ethersproject/properties': 5.7.0 - - '@ethersproject/abstract-signer@5.8.0': - dependencies: - '@ethersproject/abstract-provider': 5.8.0 - '@ethersproject/bignumber': 5.8.0 - '@ethersproject/bytes': 5.8.0 - '@ethersproject/logger': 5.8.0 - '@ethersproject/properties': 5.8.0 - - '@ethersproject/address@5.6.1': - dependencies: - '@ethersproject/bignumber': 5.8.0 - '@ethersproject/bytes': 5.8.0 - '@ethersproject/keccak256': 5.8.0 - '@ethersproject/logger': 5.8.0 - '@ethersproject/rlp': 5.8.0 - - '@ethersproject/address@5.7.0': - dependencies: - '@ethersproject/bignumber': 5.7.0 - '@ethersproject/bytes': 5.7.0 - '@ethersproject/keccak256': 5.7.0 - '@ethersproject/logger': 5.7.0 - '@ethersproject/rlp': 5.7.0 - - '@ethersproject/address@5.8.0': - dependencies: - '@ethersproject/bignumber': 5.8.0 - '@ethersproject/bytes': 5.8.0 - '@ethersproject/keccak256': 5.8.0 - '@ethersproject/logger': 5.8.0 - '@ethersproject/rlp': 5.8.0 - - '@ethersproject/base64@5.7.0': - dependencies: - '@ethersproject/bytes': 5.7.0 - - '@ethersproject/base64@5.8.0': - dependencies: - '@ethersproject/bytes': 5.8.0 - - '@ethersproject/basex@5.8.0': - dependencies: - '@ethersproject/bytes': 5.8.0 - '@ethersproject/properties': 5.8.0 - - '@ethersproject/bignumber@5.7.0': - dependencies: - '@ethersproject/bytes': 5.7.0 - '@ethersproject/logger': 5.7.0 - bn.js: 5.2.1 - - '@ethersproject/bignumber@5.8.0': - dependencies: - '@ethersproject/bytes': 5.8.0 - '@ethersproject/logger': 5.8.0 - bn.js: 5.2.1 - - '@ethersproject/bytes@5.7.0': - dependencies: - '@ethersproject/logger': 5.7.0 - - '@ethersproject/bytes@5.8.0': - dependencies: - '@ethersproject/logger': 5.8.0 - - '@ethersproject/constants@5.7.0': - dependencies: - '@ethersproject/bignumber': 5.7.0 - - '@ethersproject/constants@5.8.0': - dependencies: - '@ethersproject/bignumber': 5.8.0 - - '@ethersproject/contracts@5.8.0': - dependencies: - '@ethersproject/abi': 5.8.0 - '@ethersproject/abstract-provider': 5.8.0 - '@ethersproject/abstract-signer': 5.8.0 - '@ethersproject/address': 5.8.0 - '@ethersproject/bignumber': 5.8.0 - '@ethersproject/bytes': 5.8.0 - '@ethersproject/constants': 5.8.0 - '@ethersproject/logger': 5.8.0 - '@ethersproject/properties': 5.8.0 - '@ethersproject/transactions': 5.8.0 - - '@ethersproject/hash@5.7.0': - dependencies: - '@ethersproject/abstract-signer': 5.7.0 - '@ethersproject/address': 5.7.0 - '@ethersproject/base64': 5.7.0 - '@ethersproject/bignumber': 5.7.0 - '@ethersproject/bytes': 5.7.0 - '@ethersproject/keccak256': 5.7.0 - '@ethersproject/logger': 5.7.0 - '@ethersproject/properties': 5.7.0 - '@ethersproject/strings': 5.7.0 - - '@ethersproject/hash@5.8.0': - dependencies: - '@ethersproject/abstract-signer': 5.8.0 - '@ethersproject/address': 5.8.0 - '@ethersproject/base64': 5.8.0 - '@ethersproject/bignumber': 5.8.0 - '@ethersproject/bytes': 5.8.0 - '@ethersproject/keccak256': 5.8.0 - '@ethersproject/logger': 5.8.0 - '@ethersproject/properties': 5.8.0 - '@ethersproject/strings': 5.8.0 - - '@ethersproject/hdnode@5.8.0': - dependencies: - '@ethersproject/abstract-signer': 5.8.0 - '@ethersproject/basex': 5.8.0 - '@ethersproject/bignumber': 5.8.0 - '@ethersproject/bytes': 5.8.0 - '@ethersproject/logger': 5.8.0 - '@ethersproject/pbkdf2': 5.8.0 - '@ethersproject/properties': 5.8.0 - '@ethersproject/sha2': 5.8.0 - '@ethersproject/signing-key': 5.8.0 - '@ethersproject/strings': 5.8.0 - '@ethersproject/transactions': 5.8.0 - '@ethersproject/wordlists': 5.8.0 - - '@ethersproject/json-wallets@5.8.0': - dependencies: - '@ethersproject/abstract-signer': 5.8.0 - '@ethersproject/address': 5.8.0 - '@ethersproject/bytes': 5.8.0 - '@ethersproject/hdnode': 5.8.0 - '@ethersproject/keccak256': 5.8.0 - '@ethersproject/logger': 5.8.0 - '@ethersproject/pbkdf2': 5.8.0 - '@ethersproject/properties': 5.8.0 - '@ethersproject/random': 5.8.0 - '@ethersproject/strings': 5.8.0 - '@ethersproject/transactions': 5.8.0 - aes-js: 3.0.0 - scrypt-js: 3.0.1 - - '@ethersproject/keccak256@5.7.0': - dependencies: - '@ethersproject/bytes': 5.7.0 - js-sha3: 0.8.0 - - '@ethersproject/keccak256@5.8.0': - dependencies: - '@ethersproject/bytes': 5.8.0 - js-sha3: 0.8.0 - - '@ethersproject/logger@5.7.0': {} - - '@ethersproject/logger@5.8.0': {} - - '@ethersproject/networks@5.7.1': - dependencies: - '@ethersproject/logger': 5.7.0 - - '@ethersproject/networks@5.8.0': - dependencies: - '@ethersproject/logger': 5.8.0 - - '@ethersproject/pbkdf2@5.8.0': - dependencies: - '@ethersproject/bytes': 5.8.0 - '@ethersproject/sha2': 5.8.0 - - '@ethersproject/properties@5.7.0': - dependencies: - '@ethersproject/logger': 5.7.0 - - '@ethersproject/properties@5.8.0': - dependencies: - '@ethersproject/logger': 5.8.0 - - '@ethersproject/providers@5.8.0(bufferutil@4.0.8)(utf-8-validate@5.0.10)': - dependencies: - '@ethersproject/abstract-provider': 5.8.0 - '@ethersproject/abstract-signer': 5.8.0 - '@ethersproject/address': 5.8.0 - '@ethersproject/base64': 5.8.0 - '@ethersproject/basex': 5.8.0 - '@ethersproject/bignumber': 5.8.0 - '@ethersproject/bytes': 5.8.0 - '@ethersproject/constants': 5.8.0 - '@ethersproject/hash': 5.8.0 - '@ethersproject/logger': 5.8.0 - '@ethersproject/networks': 5.8.0 - '@ethersproject/properties': 5.8.0 - '@ethersproject/random': 5.8.0 - '@ethersproject/rlp': 5.8.0 - '@ethersproject/sha2': 5.8.0 - '@ethersproject/strings': 5.8.0 - '@ethersproject/transactions': 5.8.0 - '@ethersproject/web': 5.8.0 - bech32: 1.1.4 - ws: 8.18.0(bufferutil@4.0.8)(utf-8-validate@5.0.10) - transitivePeerDependencies: - - bufferutil - - utf-8-validate - - '@ethersproject/random@5.8.0': - dependencies: - '@ethersproject/bytes': 5.8.0 - '@ethersproject/logger': 5.8.0 - - '@ethersproject/rlp@5.7.0': - dependencies: - '@ethersproject/bytes': 5.7.0 - '@ethersproject/logger': 5.7.0 - - '@ethersproject/rlp@5.8.0': - dependencies: - '@ethersproject/bytes': 5.8.0 - '@ethersproject/logger': 5.8.0 - - '@ethersproject/sha2@5.8.0': - dependencies: - '@ethersproject/bytes': 5.8.0 - '@ethersproject/logger': 5.8.0 - hash.js: 1.1.7 - - '@ethersproject/signing-key@5.7.0': - dependencies: - '@ethersproject/bytes': 5.7.0 - '@ethersproject/logger': 5.7.0 - '@ethersproject/properties': 5.7.0 - bn.js: 5.2.1 - elliptic: 6.5.4 - hash.js: 1.1.7 - - '@ethersproject/signing-key@5.8.0': - dependencies: - '@ethersproject/bytes': 5.8.0 - '@ethersproject/logger': 5.8.0 - '@ethersproject/properties': 5.8.0 - bn.js: 5.2.1 - elliptic: 6.6.1 - hash.js: 1.1.7 - - '@ethersproject/solidity@5.8.0': - dependencies: - '@ethersproject/bignumber': 5.8.0 - '@ethersproject/bytes': 5.8.0 - '@ethersproject/keccak256': 5.8.0 - '@ethersproject/logger': 5.8.0 - '@ethersproject/sha2': 5.8.0 - '@ethersproject/strings': 5.8.0 - - '@ethersproject/strings@5.7.0': - dependencies: - '@ethersproject/bytes': 5.7.0 - '@ethersproject/constants': 5.7.0 - '@ethersproject/logger': 5.7.0 - - '@ethersproject/strings@5.8.0': - dependencies: - '@ethersproject/bytes': 5.8.0 - '@ethersproject/constants': 5.8.0 - '@ethersproject/logger': 5.8.0 - - '@ethersproject/transactions@5.7.0': - dependencies: - '@ethersproject/address': 5.7.0 - '@ethersproject/bignumber': 5.7.0 - '@ethersproject/bytes': 5.7.0 - '@ethersproject/constants': 5.7.0 - '@ethersproject/keccak256': 5.7.0 - '@ethersproject/logger': 5.7.0 - '@ethersproject/properties': 5.7.0 - '@ethersproject/rlp': 5.7.0 - '@ethersproject/signing-key': 5.7.0 - - '@ethersproject/transactions@5.8.0': - dependencies: - '@ethersproject/address': 5.8.0 - '@ethersproject/bignumber': 5.8.0 - '@ethersproject/bytes': 5.8.0 - '@ethersproject/constants': 5.8.0 - '@ethersproject/keccak256': 5.8.0 - '@ethersproject/logger': 5.8.0 - '@ethersproject/properties': 5.8.0 - '@ethersproject/rlp': 5.8.0 - '@ethersproject/signing-key': 5.8.0 - - '@ethersproject/units@5.8.0': - dependencies: - '@ethersproject/bignumber': 5.8.0 - '@ethersproject/constants': 5.8.0 - '@ethersproject/logger': 5.8.0 - - '@ethersproject/wallet@5.8.0': - dependencies: - '@ethersproject/abstract-provider': 5.8.0 - '@ethersproject/abstract-signer': 5.8.0 - '@ethersproject/address': 5.8.0 - '@ethersproject/bignumber': 5.8.0 - '@ethersproject/bytes': 5.8.0 - '@ethersproject/hash': 5.8.0 - '@ethersproject/hdnode': 5.8.0 - '@ethersproject/json-wallets': 5.8.0 - '@ethersproject/keccak256': 5.8.0 - '@ethersproject/logger': 5.8.0 - '@ethersproject/properties': 5.8.0 - '@ethersproject/random': 5.8.0 - '@ethersproject/signing-key': 5.8.0 - '@ethersproject/transactions': 5.8.0 - '@ethersproject/wordlists': 5.8.0 - - '@ethersproject/web@5.7.1': - dependencies: - '@ethersproject/base64': 5.7.0 - '@ethersproject/bytes': 5.7.0 - '@ethersproject/logger': 5.7.0 - '@ethersproject/properties': 5.7.0 - '@ethersproject/strings': 5.7.0 - - '@ethersproject/web@5.8.0': - dependencies: - '@ethersproject/base64': 5.8.0 - '@ethersproject/bytes': 5.8.0 - '@ethersproject/logger': 5.8.0 - '@ethersproject/properties': 5.8.0 - '@ethersproject/strings': 5.8.0 - - '@ethersproject/wordlists@5.8.0': - dependencies: - '@ethersproject/bytes': 5.8.0 - '@ethersproject/hash': 5.8.0 - '@ethersproject/logger': 5.8.0 - '@ethersproject/properties': 5.8.0 - '@ethersproject/strings': 5.8.0 - - '@fastify/busboy@2.1.1': {} - - '@graphql-tools/merge@8.3.1(graphql@15.9.0)': - dependencies: - '@graphql-tools/utils': 8.9.0(graphql@15.9.0) - graphql: 15.9.0 - tslib: 2.8.0 - - '@graphql-tools/schema@8.5.1(graphql@15.9.0)': - dependencies: - '@graphql-tools/merge': 8.3.1(graphql@15.9.0) - '@graphql-tools/utils': 8.9.0(graphql@15.9.0) - graphql: 15.9.0 - tslib: 2.8.0 - value-or-promise: 1.0.11 - - '@graphql-tools/utils@8.13.1(graphql@15.9.0)': - dependencies: - graphql: 15.9.0 - tslib: 2.8.0 - - '@graphql-tools/utils@8.9.0(graphql@15.9.0)': - dependencies: - graphql: 15.9.0 - tslib: 2.8.0 - - '@hapi/hoek@9.3.0': {} - - '@hapi/topo@5.1.0': - dependencies: - '@hapi/hoek': 9.3.0 - - '@httptoolkit/httpolyglot@2.2.2': - dependencies: - '@types/node': 22.7.9 - - '@httptoolkit/subscriptions-transport-ws@0.11.2(bufferutil@4.0.8)(graphql@15.9.0)(utf-8-validate@5.0.10)': - dependencies: - backo2: 1.0.2 - eventemitter3: 3.1.2 - graphql: 15.9.0 - iterall: 1.3.0 - symbol-observable: 1.2.0 - ws: 8.18.0(bufferutil@4.0.8)(utf-8-validate@5.0.10) - transitivePeerDependencies: - - bufferutil - - utf-8-validate - - '@httptoolkit/websocket-stream@6.0.1(bufferutil@4.0.8)(utf-8-validate@5.0.10)': - dependencies: - '@types/ws': 8.5.12 - duplexify: 3.7.1 - inherits: 2.0.4 - isomorphic-ws: 4.0.1(ws@8.18.0(bufferutil@4.0.8)(utf-8-validate@5.0.10)) - readable-stream: 2.3.8 - safe-buffer: 5.2.1 - ws: 8.18.0(bufferutil@4.0.8)(utf-8-validate@5.0.10) - xtend: 4.0.2 - transitivePeerDependencies: - - bufferutil - - utf-8-validate - - '@humanwhocodes/config-array@0.13.0': - dependencies: - '@humanwhocodes/object-schema': 2.0.3 - debug: 4.3.7(supports-color@6.1.0) - minimatch: 3.1.2 - transitivePeerDependencies: - - supports-color - - '@humanwhocodes/module-importer@1.0.1': {} - - '@humanwhocodes/object-schema@2.0.3': {} - - '@isaacs/cliui@8.0.2': - dependencies: - string-width: 5.1.2 - string-width-cjs: string-width@4.2.3 - strip-ansi: 7.1.0 - strip-ansi-cjs: strip-ansi@6.0.1 - wrap-ansi: 8.1.0 - wrap-ansi-cjs: wrap-ansi@7.0.0 - - '@istanbuljs/load-nyc-config@1.1.0': - dependencies: - camelcase: 5.3.1 - find-up: 4.1.0 - get-package-type: 0.1.0 - js-yaml: 3.14.1 - resolve-from: 5.0.0 - - '@istanbuljs/nyc-config-typescript@1.0.2(nyc@15.1.0)': - dependencies: - '@istanbuljs/schema': 0.1.3 - nyc: 15.1.0 - - '@istanbuljs/nyc-config-typescript@1.0.2(nyc@17.1.0)': - dependencies: - '@istanbuljs/schema': 0.1.3 - nyc: 17.1.0 - - '@istanbuljs/schema@0.1.3': {} - - '@jridgewell/gen-mapping@0.3.5': - dependencies: - '@jridgewell/set-array': 1.2.1 - '@jridgewell/sourcemap-codec': 1.5.0 - '@jridgewell/trace-mapping': 0.3.25 - - '@jridgewell/resolve-uri@3.1.2': {} - - '@jridgewell/set-array@1.2.1': {} - - '@jridgewell/source-map@0.3.6': - dependencies: - '@jridgewell/gen-mapping': 0.3.5 - '@jridgewell/trace-mapping': 0.3.25 - - '@jridgewell/sourcemap-codec@1.5.0': {} - - '@jridgewell/trace-mapping@0.3.25': - dependencies: - '@jridgewell/resolve-uri': 3.1.2 - '@jridgewell/sourcemap-codec': 1.5.0 - - '@jridgewell/trace-mapping@0.3.9': - dependencies: - '@jridgewell/resolve-uri': 3.1.2 - '@jridgewell/sourcemap-codec': 1.5.0 - - '@manypkg/find-root@1.1.0': - dependencies: - '@babel/runtime': 7.26.10 - '@types/node': 12.20.55 - find-up: 4.1.0 - fs-extra: 8.1.0 - - '@manypkg/get-packages@1.1.3': - dependencies: - '@babel/runtime': 7.26.10 - '@changesets/types': 4.1.0 - '@manypkg/find-root': 1.1.0 - fs-extra: 8.1.0 - globby: 11.1.0 - read-yaml-file: 1.1.0 - - '@mapbox/node-pre-gyp@1.0.11': - dependencies: - detect-libc: 2.0.3 - https-proxy-agent: 5.0.1 - make-dir: 3.1.0 - node-fetch: 2.7.0 - nopt: 5.0.0 - npmlog: 5.0.1 - rimraf: 3.0.2 - semver: 7.6.3 - tar: 6.2.1 - transitivePeerDependencies: - - encoding - - supports-color - - '@metamask/eth-sig-util@4.0.1': - dependencies: - ethereumjs-abi: 0.6.8 - ethereumjs-util: 6.2.1 - ethjs-util: 0.1.6 - tweetnacl: 1.0.3 - tweetnacl-util: 0.15.1 - - '@noble/curves@1.2.0': - dependencies: - '@noble/hashes': 1.3.2 - - '@noble/curves@1.4.2': - dependencies: - '@noble/hashes': 1.4.0 - - '@noble/hashes@1.2.0': {} - - '@noble/hashes@1.3.2': {} - - '@noble/hashes@1.4.0': {} - - '@noble/hashes@1.5.0': {} - - '@noble/secp256k1@1.7.1': {} - - '@nodelib/fs.scandir@2.1.5': - dependencies: - '@nodelib/fs.stat': 2.0.5 - run-parallel: 1.2.0 - - '@nodelib/fs.stat@2.0.5': {} - - '@nodelib/fs.walk@1.2.8': - dependencies: - '@nodelib/fs.scandir': 2.1.5 - fastq: 1.17.1 - - '@nomicfoundation/edr-darwin-arm64@0.6.4': {} - - '@nomicfoundation/edr-darwin-x64@0.6.4': {} - - '@nomicfoundation/edr-linux-arm64-gnu@0.6.4': {} - - '@nomicfoundation/edr-linux-arm64-musl@0.6.4': {} - - '@nomicfoundation/edr-linux-x64-gnu@0.6.4': {} - - '@nomicfoundation/edr-linux-x64-musl@0.6.4': {} - - '@nomicfoundation/edr-win32-x64-msvc@0.6.4': {} - - '@nomicfoundation/edr@0.6.4': - dependencies: - '@nomicfoundation/edr-darwin-arm64': 0.6.4 - '@nomicfoundation/edr-darwin-x64': 0.6.4 - '@nomicfoundation/edr-linux-arm64-gnu': 0.6.4 - '@nomicfoundation/edr-linux-arm64-musl': 0.6.4 - '@nomicfoundation/edr-linux-x64-gnu': 0.6.4 - '@nomicfoundation/edr-linux-x64-musl': 0.6.4 - '@nomicfoundation/edr-win32-x64-msvc': 0.6.4 - - '@nomicfoundation/ethereumjs-common@4.0.4': - dependencies: - '@nomicfoundation/ethereumjs-util': 9.0.4 - transitivePeerDependencies: - - c-kzg - - '@nomicfoundation/ethereumjs-rlp@5.0.4': {} - - '@nomicfoundation/ethereumjs-tx@5.0.4': - dependencies: - '@nomicfoundation/ethereumjs-common': 4.0.4 - '@nomicfoundation/ethereumjs-rlp': 5.0.4 - '@nomicfoundation/ethereumjs-util': 9.0.4 - ethereum-cryptography: 0.1.3 - - '@nomicfoundation/ethereumjs-util@9.0.4': - dependencies: - '@nomicfoundation/ethereumjs-rlp': 5.0.4 - ethereum-cryptography: 0.1.3 - - '@nomicfoundation/hardhat-chai-matchers@2.0.8(@nomicfoundation/hardhat-ethers@3.0.8(ethers@6.13.4(bufferutil@4.0.8)(utf-8-validate@5.0.10))(hardhat@2.22.14(bufferutil@4.0.8)(ts-node@10.9.2(@types/node@22.7.9)(typescript@5.6.3))(typescript@5.6.3)(utf-8-validate@5.0.10)))(chai@4.5.0)(ethers@6.13.4(bufferutil@4.0.8)(utf-8-validate@5.0.10))(hardhat@2.22.14(bufferutil@4.0.8)(ts-node@10.9.2(@types/node@22.7.9)(typescript@5.6.3))(typescript@5.6.3)(utf-8-validate@5.0.10))': - dependencies: - '@nomicfoundation/hardhat-ethers': 3.0.8(ethers@6.13.4(bufferutil@4.0.8)(utf-8-validate@5.0.10))(hardhat@2.22.14(bufferutil@4.0.8)(ts-node@10.9.2(@types/node@22.7.9)(typescript@5.6.3))(typescript@5.6.3)(utf-8-validate@5.0.10)) - '@types/chai-as-promised': 7.1.8 - chai: 4.5.0 - chai-as-promised: 7.1.2(chai@4.5.0) - deep-eql: 4.1.4 - ethers: 6.13.4(bufferutil@4.0.8)(utf-8-validate@5.0.10) - hardhat: 2.22.14(bufferutil@4.0.8)(ts-node@10.9.2(@types/node@22.7.9)(typescript@5.6.3))(typescript@5.6.3)(utf-8-validate@5.0.10) - ordinal: 1.0.3 - - '@nomicfoundation/hardhat-ethers@3.0.8(ethers@6.13.4(bufferutil@4.0.8)(utf-8-validate@5.0.10))(hardhat@2.22.14(bufferutil@4.0.8)(ts-node@10.9.2(@types/node@22.7.9)(typescript@5.6.3))(typescript@5.6.3)(utf-8-validate@5.0.10))': - dependencies: - debug: 4.4.0(supports-color@8.1.1) - ethers: 6.13.4(bufferutil@4.0.8)(utf-8-validate@5.0.10) - hardhat: 2.22.14(bufferutil@4.0.8)(ts-node@10.9.2(@types/node@22.7.9)(typescript@5.6.3))(typescript@5.6.3)(utf-8-validate@5.0.10) - lodash.isequal: 4.5.0 - transitivePeerDependencies: - - supports-color - - '@nomicfoundation/hardhat-ignition-ethers@0.15.6(@nomicfoundation/hardhat-ethers@3.0.8(ethers@6.13.4(bufferutil@4.0.8)(utf-8-validate@5.0.10))(hardhat@2.22.14(bufferutil@4.0.8)(ts-node@10.9.2(@types/node@22.7.9)(typescript@5.6.3))(typescript@5.6.3)(utf-8-validate@5.0.10)))(@nomicfoundation/hardhat-ignition@0.15.6(@nomicfoundation/hardhat-verify@2.0.11(hardhat@2.22.14(bufferutil@4.0.8)(ts-node@10.9.2(@types/node@22.7.9)(typescript@5.6.3))(typescript@5.6.3)(utf-8-validate@5.0.10)))(bufferutil@4.0.8)(hardhat@2.22.14(bufferutil@4.0.8)(ts-node@10.9.2(@types/node@22.7.9)(typescript@5.6.3))(typescript@5.6.3)(utf-8-validate@5.0.10))(utf-8-validate@5.0.10))(@nomicfoundation/ignition-core@0.15.6(bufferutil@4.0.8)(utf-8-validate@5.0.10))(ethers@6.13.4(bufferutil@4.0.8)(utf-8-validate@5.0.10))(hardhat@2.22.14(bufferutil@4.0.8)(ts-node@10.9.2(@types/node@22.7.9)(typescript@5.6.3))(typescript@5.6.3)(utf-8-validate@5.0.10))': - dependencies: - '@nomicfoundation/hardhat-ethers': 3.0.8(ethers@6.13.4(bufferutil@4.0.8)(utf-8-validate@5.0.10))(hardhat@2.22.14(bufferutil@4.0.8)(ts-node@10.9.2(@types/node@22.7.9)(typescript@5.6.3))(typescript@5.6.3)(utf-8-validate@5.0.10)) - '@nomicfoundation/hardhat-ignition': 0.15.6(@nomicfoundation/hardhat-verify@2.0.11(hardhat@2.22.14(bufferutil@4.0.8)(ts-node@10.9.2(@types/node@22.7.9)(typescript@5.6.3))(typescript@5.6.3)(utf-8-validate@5.0.10)))(bufferutil@4.0.8)(hardhat@2.22.14(bufferutil@4.0.8)(ts-node@10.9.2(@types/node@22.7.9)(typescript@5.6.3))(typescript@5.6.3)(utf-8-validate@5.0.10))(utf-8-validate@5.0.10) - '@nomicfoundation/ignition-core': 0.15.6(bufferutil@4.0.8)(utf-8-validate@5.0.10) - ethers: 6.13.4(bufferutil@4.0.8)(utf-8-validate@5.0.10) - hardhat: 2.22.14(bufferutil@4.0.8)(ts-node@10.9.2(@types/node@22.7.9)(typescript@5.6.3))(typescript@5.6.3)(utf-8-validate@5.0.10) - - '@nomicfoundation/hardhat-ignition@0.15.6(@nomicfoundation/hardhat-verify@2.0.11(hardhat@2.22.14(bufferutil@4.0.8)(ts-node@10.9.2(@types/node@22.7.9)(typescript@5.6.3))(typescript@5.6.3)(utf-8-validate@5.0.10)))(bufferutil@4.0.8)(hardhat@2.22.14(bufferutil@4.0.8)(ts-node@10.9.2(@types/node@22.7.9)(typescript@5.6.3))(typescript@5.6.3)(utf-8-validate@5.0.10))(utf-8-validate@5.0.10)': - dependencies: - '@nomicfoundation/hardhat-verify': 2.0.11(hardhat@2.22.14(bufferutil@4.0.8)(ts-node@10.9.2(@types/node@22.7.9)(typescript@5.6.3))(typescript@5.6.3)(utf-8-validate@5.0.10)) - '@nomicfoundation/ignition-core': 0.15.6(bufferutil@4.0.8)(utf-8-validate@5.0.10) - '@nomicfoundation/ignition-ui': 0.15.10 - chalk: 4.1.2 - debug: 4.4.0(supports-color@8.1.1) - fs-extra: 10.1.0 - hardhat: 2.22.14(bufferutil@4.0.8)(ts-node@10.9.2(@types/node@22.7.9)(typescript@5.6.3))(typescript@5.6.3)(utf-8-validate@5.0.10) - json5: 2.2.3 - prompts: 2.4.2 - transitivePeerDependencies: - - bufferutil - - supports-color - - utf-8-validate - - '@nomicfoundation/hardhat-network-helpers@1.0.12(hardhat@2.22.14(bufferutil@4.0.8)(ts-node@10.9.2(@types/node@22.7.9)(typescript@5.6.3))(typescript@5.6.3)(utf-8-validate@5.0.10))': - dependencies: - ethereumjs-util: 7.1.5 - hardhat: 2.22.14(bufferutil@4.0.8)(ts-node@10.9.2(@types/node@22.7.9)(typescript@5.6.3))(typescript@5.6.3)(utf-8-validate@5.0.10) - - '@nomicfoundation/hardhat-toolbox@5.0.0(akrrydpj7boegc4sfckiephn7m)': - dependencies: - '@nomicfoundation/hardhat-chai-matchers': 2.0.8(@nomicfoundation/hardhat-ethers@3.0.8(ethers@6.13.4(bufferutil@4.0.8)(utf-8-validate@5.0.10))(hardhat@2.22.14(bufferutil@4.0.8)(ts-node@10.9.2(@types/node@22.7.9)(typescript@5.6.3))(typescript@5.6.3)(utf-8-validate@5.0.10)))(chai@4.5.0)(ethers@6.13.4(bufferutil@4.0.8)(utf-8-validate@5.0.10))(hardhat@2.22.14(bufferutil@4.0.8)(ts-node@10.9.2(@types/node@22.7.9)(typescript@5.6.3))(typescript@5.6.3)(utf-8-validate@5.0.10)) - '@nomicfoundation/hardhat-ethers': 3.0.8(ethers@6.13.4(bufferutil@4.0.8)(utf-8-validate@5.0.10))(hardhat@2.22.14(bufferutil@4.0.8)(ts-node@10.9.2(@types/node@22.7.9)(typescript@5.6.3))(typescript@5.6.3)(utf-8-validate@5.0.10)) - '@nomicfoundation/hardhat-ignition-ethers': 0.15.6(@nomicfoundation/hardhat-ethers@3.0.8(ethers@6.13.4(bufferutil@4.0.8)(utf-8-validate@5.0.10))(hardhat@2.22.14(bufferutil@4.0.8)(ts-node@10.9.2(@types/node@22.7.9)(typescript@5.6.3))(typescript@5.6.3)(utf-8-validate@5.0.10)))(@nomicfoundation/hardhat-ignition@0.15.6(@nomicfoundation/hardhat-verify@2.0.11(hardhat@2.22.14(bufferutil@4.0.8)(ts-node@10.9.2(@types/node@22.7.9)(typescript@5.6.3))(typescript@5.6.3)(utf-8-validate@5.0.10)))(bufferutil@4.0.8)(hardhat@2.22.14(bufferutil@4.0.8)(ts-node@10.9.2(@types/node@22.7.9)(typescript@5.6.3))(typescript@5.6.3)(utf-8-validate@5.0.10))(utf-8-validate@5.0.10))(@nomicfoundation/ignition-core@0.15.6(bufferutil@4.0.8)(utf-8-validate@5.0.10))(ethers@6.13.4(bufferutil@4.0.8)(utf-8-validate@5.0.10))(hardhat@2.22.14(bufferutil@4.0.8)(ts-node@10.9.2(@types/node@22.7.9)(typescript@5.6.3))(typescript@5.6.3)(utf-8-validate@5.0.10)) - '@nomicfoundation/hardhat-network-helpers': 1.0.12(hardhat@2.22.14(bufferutil@4.0.8)(ts-node@10.9.2(@types/node@22.7.9)(typescript@5.6.3))(typescript@5.6.3)(utf-8-validate@5.0.10)) - '@nomicfoundation/hardhat-verify': 2.0.11(hardhat@2.22.14(bufferutil@4.0.8)(ts-node@10.9.2(@types/node@22.7.9)(typescript@5.6.3))(typescript@5.6.3)(utf-8-validate@5.0.10)) - '@typechain/ethers-v6': 0.5.1(ethers@6.13.4(bufferutil@4.0.8)(utf-8-validate@5.0.10))(typechain@8.3.2(typescript@5.6.3))(typescript@5.6.3) - '@typechain/hardhat': 9.1.0(@typechain/ethers-v6@0.5.1(ethers@6.13.4(bufferutil@4.0.8)(utf-8-validate@5.0.10))(typechain@8.3.2(typescript@5.6.3))(typescript@5.6.3))(ethers@6.13.4(bufferutil@4.0.8)(utf-8-validate@5.0.10))(hardhat@2.22.14(bufferutil@4.0.8)(ts-node@10.9.2(@types/node@22.7.9)(typescript@5.6.3))(typescript@5.6.3)(utf-8-validate@5.0.10))(typechain@8.3.2(typescript@5.6.3)) - '@types/chai': 4.3.20 - '@types/mocha': 10.0.9 - '@types/node': 22.7.9 - chai: 4.5.0 - ethers: 6.13.4(bufferutil@4.0.8)(utf-8-validate@5.0.10) - hardhat: 2.22.14(bufferutil@4.0.8)(ts-node@10.9.2(@types/node@22.7.9)(typescript@5.6.3))(typescript@5.6.3)(utf-8-validate@5.0.10) - hardhat-gas-reporter: 1.0.10(bufferutil@4.0.8)(hardhat@2.22.14(bufferutil@4.0.8)(ts-node@10.9.2(@types/node@22.7.9)(typescript@5.6.3))(typescript@5.6.3)(utf-8-validate@5.0.10))(utf-8-validate@5.0.10) - solidity-coverage: 0.8.13(hardhat@2.22.14(bufferutil@4.0.8)(ts-node@10.9.2(@types/node@22.7.9)(typescript@5.6.3))(typescript@5.6.3)(utf-8-validate@5.0.10)) - ts-node: 10.9.2(@types/node@22.7.9)(typescript@5.6.3) - typechain: 8.3.2(typescript@5.6.3) - typescript: 5.6.3 - - '@nomicfoundation/hardhat-verify@2.0.11(hardhat@2.22.14(bufferutil@4.0.8)(ts-node@10.9.2(@types/node@22.7.9)(typescript@5.6.3))(typescript@5.6.3)(utf-8-validate@5.0.10))': - dependencies: - '@ethersproject/abi': 5.8.0 - '@ethersproject/address': 5.8.0 - cbor: 8.1.0 - chalk: 2.4.2 - debug: 4.4.0(supports-color@8.1.1) - hardhat: 2.22.14(bufferutil@4.0.8)(ts-node@10.9.2(@types/node@22.7.9)(typescript@5.6.3))(typescript@5.6.3)(utf-8-validate@5.0.10) - lodash.clonedeep: 4.5.0 - semver: 6.3.1 - table: 6.9.0 - undici: 5.28.5 - transitivePeerDependencies: - - supports-color - - '@nomicfoundation/ignition-core@0.15.6(bufferutil@4.0.8)(utf-8-validate@5.0.10)': - dependencies: - '@ethersproject/address': 5.6.1 - '@nomicfoundation/solidity-analyzer': 0.1.2 - cbor: 9.0.2 - debug: 4.4.0(supports-color@8.1.1) - ethers: 6.13.4(bufferutil@4.0.8)(utf-8-validate@5.0.10) - fs-extra: 10.1.0 - immer: 10.0.2 - lodash: 4.17.21 - ndjson: 2.0.0 - transitivePeerDependencies: - - bufferutil - - supports-color - - utf-8-validate - - '@nomicfoundation/ignition-ui@0.15.10': {} - - '@nomicfoundation/solidity-analyzer-darwin-arm64@0.1.2': - optional: true - - '@nomicfoundation/solidity-analyzer-darwin-x64@0.1.2': - optional: true - - '@nomicfoundation/solidity-analyzer-linux-arm64-gnu@0.1.2': - optional: true - - '@nomicfoundation/solidity-analyzer-linux-arm64-musl@0.1.2': - optional: true - - '@nomicfoundation/solidity-analyzer-linux-x64-gnu@0.1.2': - optional: true - - '@nomicfoundation/solidity-analyzer-linux-x64-musl@0.1.2': - optional: true - - '@nomicfoundation/solidity-analyzer-win32-x64-msvc@0.1.2': - optional: true - - '@nomicfoundation/solidity-analyzer@0.1.2': - optionalDependencies: - '@nomicfoundation/solidity-analyzer-darwin-arm64': 0.1.2 - '@nomicfoundation/solidity-analyzer-darwin-x64': 0.1.2 - '@nomicfoundation/solidity-analyzer-linux-arm64-gnu': 0.1.2 - '@nomicfoundation/solidity-analyzer-linux-arm64-musl': 0.1.2 - '@nomicfoundation/solidity-analyzer-linux-x64-gnu': 0.1.2 - '@nomicfoundation/solidity-analyzer-linux-x64-musl': 0.1.2 - '@nomicfoundation/solidity-analyzer-win32-x64-msvc': 0.1.2 - - '@pkgr/core@0.1.1': {} - - '@preconstruct/cli@2.8.9': - dependencies: - '@babel/code-frame': 7.25.9 - '@babel/core': 7.25.9 - '@babel/helper-module-imports': 7.25.9 - '@babel/runtime': 7.26.10 - '@preconstruct/hook': 0.4.0 - '@rollup/plugin-alias': 3.1.9(rollup@2.79.2) - '@rollup/plugin-commonjs': 15.1.0(rollup@2.79.2) - '@rollup/plugin-json': 4.1.0(rollup@2.79.2) - '@rollup/plugin-node-resolve': 11.2.1(rollup@2.79.2) - '@rollup/plugin-replace': 2.4.2(rollup@2.79.2) - builtin-modules: 3.3.0 - chalk: 4.1.2 - ci-info: 3.9.0 - dataloader: 2.2.2 - detect-indent: 6.1.0 - enquirer: 2.4.1 - estree-walker: 2.0.2 - fast-deep-equal: 2.0.1 - fast-glob: 3.3.2 - fs-extra: 9.1.0 - is-reference: 1.2.1 - jest-worker: 26.6.2 - magic-string: 0.30.12 - ms: 2.1.3 - normalize-path: 3.0.0 - npm-packlist: 2.2.2 - p-limit: 3.1.0 - parse-glob: 3.0.4 - parse-json: 5.2.0 - quick-lru: 5.1.1 - resolve-from: 5.0.0 - rollup: 2.79.2 - semver: 7.6.3 - terser: 5.36.0 - v8-compile-cache: 2.4.0 - zod: 3.23.8 - transitivePeerDependencies: - - supports-color - - '@preconstruct/hook@0.4.0': - dependencies: - '@babel/core': 7.25.9 - '@babel/plugin-transform-modules-commonjs': 7.25.9(@babel/core@7.25.9) - pirates: 4.0.6 - source-map-support: 0.5.21 - transitivePeerDependencies: - - supports-color - - '@puppeteer/browsers@2.6.1': - dependencies: - debug: 4.4.0(supports-color@8.1.1) - extract-zip: 2.0.1 - progress: 2.0.3 - proxy-agent: 6.5.0 - semver: 7.6.3 - tar-fs: 3.0.6 - unbzip2-stream: 1.4.3 - yargs: 17.7.2 - transitivePeerDependencies: - - supports-color - - '@rollup/plugin-alias@3.1.9(rollup@2.79.2)': - dependencies: - rollup: 2.79.2 - slash: 3.0.0 - - '@rollup/plugin-commonjs@15.1.0(rollup@2.79.2)': - dependencies: - '@rollup/pluginutils': 3.1.0(rollup@2.79.2) - commondir: 1.0.1 - estree-walker: 2.0.2 - glob: 7.2.3 - is-reference: 1.2.1 - magic-string: 0.25.9 - resolve: 1.22.8 - rollup: 2.79.2 - - '@rollup/plugin-json@4.1.0(rollup@2.79.2)': - dependencies: - '@rollup/pluginutils': 3.1.0(rollup@2.79.2) - rollup: 2.79.2 - - '@rollup/plugin-node-resolve@11.2.1(rollup@2.79.2)': - dependencies: - '@rollup/pluginutils': 3.1.0(rollup@2.79.2) - '@types/resolve': 1.17.1 - builtin-modules: 3.3.0 - deepmerge: 4.3.1 - is-module: 1.0.0 - resolve: 1.22.8 - rollup: 2.79.2 - - '@rollup/plugin-replace@2.4.2(rollup@2.79.2)': - dependencies: - '@rollup/pluginutils': 3.1.0(rollup@2.79.2) - magic-string: 0.25.9 - rollup: 2.79.2 - - '@rollup/pluginutils@3.1.0(rollup@2.79.2)': - dependencies: - '@types/estree': 0.0.39 - estree-walker: 1.0.1 - picomatch: 2.3.1 - rollup: 2.79.2 - - '@rollup/pluginutils@4.2.1': - dependencies: - estree-walker: 2.0.2 - picomatch: 2.3.1 - - '@rtsao/scc@1.1.0': {} - - '@scure/base@1.1.9': {} - - '@scure/bip32@1.1.5': - dependencies: - '@noble/hashes': 1.2.0 - '@noble/secp256k1': 1.7.1 - '@scure/base': 1.1.9 - - '@scure/bip32@1.4.0': - dependencies: - '@noble/curves': 1.4.2 - '@noble/hashes': 1.4.0 - '@scure/base': 1.1.9 - - '@scure/bip39@1.1.1': - dependencies: - '@noble/hashes': 1.2.0 - '@scure/base': 1.1.9 - - '@scure/bip39@1.3.0': - dependencies: - '@noble/hashes': 1.4.0 - '@scure/base': 1.1.9 - - '@sentry/core@5.30.0': - dependencies: - '@sentry/hub': 5.30.0 - '@sentry/minimal': 5.30.0 - '@sentry/types': 5.30.0 - '@sentry/utils': 5.30.0 - tslib: 1.14.1 - - '@sentry/hub@5.30.0': - dependencies: - '@sentry/types': 5.30.0 - '@sentry/utils': 5.30.0 - tslib: 1.14.1 - - '@sentry/minimal@5.30.0': - dependencies: - '@sentry/hub': 5.30.0 - '@sentry/types': 5.30.0 - tslib: 1.14.1 - - '@sentry/node@5.30.0': - dependencies: - '@sentry/core': 5.30.0 - '@sentry/hub': 5.30.0 - '@sentry/tracing': 5.30.0 - '@sentry/types': 5.30.0 - '@sentry/utils': 5.30.0 - cookie: 0.4.2 - https-proxy-agent: 5.0.1 - lru_map: 0.3.3 - tslib: 1.14.1 - transitivePeerDependencies: - - supports-color - - '@sentry/tracing@5.30.0': - dependencies: - '@sentry/hub': 5.30.0 - '@sentry/minimal': 5.30.0 - '@sentry/types': 5.30.0 - '@sentry/utils': 5.30.0 - tslib: 1.14.1 - - '@sentry/types@5.30.0': {} - - '@sentry/utils@5.30.0': - dependencies: - '@sentry/types': 5.30.0 - tslib: 1.14.1 - - '@sideway/address@4.1.5': - dependencies: - '@hapi/hoek': 9.3.0 - - '@sideway/formula@3.0.1': {} - - '@sideway/pinpoint@2.0.0': {} - - '@sindresorhus/is@4.6.0': {} - - '@sindresorhus/merge-streams@2.3.0': {} - - '@smithy/abort-controller@3.1.6': - dependencies: - '@smithy/types': 3.6.0 - tslib: 2.8.0 - - '@smithy/config-resolver@3.0.10': - dependencies: - '@smithy/node-config-provider': 3.1.9 - '@smithy/types': 3.6.0 - '@smithy/util-config-provider': 3.0.0 - '@smithy/util-middleware': 3.0.8 - tslib: 2.8.0 - - '@smithy/core@2.5.1': - dependencies: - '@smithy/middleware-serde': 3.0.8 - '@smithy/protocol-http': 4.1.5 - '@smithy/types': 3.6.0 - '@smithy/util-body-length-browser': 3.0.0 - '@smithy/util-middleware': 3.0.8 - '@smithy/util-stream': 3.2.1 - '@smithy/util-utf8': 3.0.0 - tslib: 2.8.0 - - '@smithy/credential-provider-imds@3.2.5': - dependencies: - '@smithy/node-config-provider': 3.1.9 - '@smithy/property-provider': 3.1.8 - '@smithy/types': 3.6.0 - '@smithy/url-parser': 3.0.8 - tslib: 2.8.0 - - '@smithy/fetch-http-handler@3.2.9': - dependencies: - '@smithy/protocol-http': 4.1.5 - '@smithy/querystring-builder': 3.0.8 - '@smithy/types': 3.6.0 - '@smithy/util-base64': 3.0.0 - tslib: 2.8.0 - - '@smithy/fetch-http-handler@4.0.0': - dependencies: - '@smithy/protocol-http': 4.1.5 - '@smithy/querystring-builder': 3.0.8 - '@smithy/types': 3.6.0 - '@smithy/util-base64': 3.0.0 - tslib: 2.8.0 - - '@smithy/hash-node@3.0.8': - dependencies: - '@smithy/types': 3.6.0 - '@smithy/util-buffer-from': 3.0.0 - '@smithy/util-utf8': 3.0.0 - tslib: 2.8.0 - - '@smithy/invalid-dependency@3.0.8': - dependencies: - '@smithy/types': 3.6.0 - tslib: 2.8.0 - - '@smithy/is-array-buffer@2.2.0': - dependencies: - tslib: 2.8.0 - - '@smithy/is-array-buffer@3.0.0': - dependencies: - tslib: 2.8.0 - - '@smithy/middleware-content-length@3.0.10': - dependencies: - '@smithy/protocol-http': 4.1.5 - '@smithy/types': 3.6.0 - tslib: 2.8.0 - - '@smithy/middleware-endpoint@3.2.1': - dependencies: - '@smithy/core': 2.5.1 - '@smithy/middleware-serde': 3.0.8 - '@smithy/node-config-provider': 3.1.9 - '@smithy/shared-ini-file-loader': 3.1.9 - '@smithy/types': 3.6.0 - '@smithy/url-parser': 3.0.8 - '@smithy/util-middleware': 3.0.8 - tslib: 2.8.0 - - '@smithy/middleware-retry@3.0.25': - dependencies: - '@smithy/node-config-provider': 3.1.9 - '@smithy/protocol-http': 4.1.5 - '@smithy/service-error-classification': 3.0.8 - '@smithy/smithy-client': 3.4.2 - '@smithy/types': 3.6.0 - '@smithy/util-middleware': 3.0.8 - '@smithy/util-retry': 3.0.8 - tslib: 2.8.0 - uuid: 9.0.1 - - '@smithy/middleware-serde@3.0.8': - dependencies: - '@smithy/types': 3.6.0 - tslib: 2.8.0 - - '@smithy/middleware-stack@3.0.8': - dependencies: - '@smithy/types': 3.6.0 - tslib: 2.8.0 - - '@smithy/node-config-provider@3.1.9': - dependencies: - '@smithy/property-provider': 3.1.8 - '@smithy/shared-ini-file-loader': 3.1.9 - '@smithy/types': 3.6.0 - tslib: 2.8.0 - - '@smithy/node-http-handler@3.2.5': - dependencies: - '@smithy/abort-controller': 3.1.6 - '@smithy/protocol-http': 4.1.5 - '@smithy/querystring-builder': 3.0.8 - '@smithy/types': 3.6.0 - tslib: 2.8.0 - - '@smithy/property-provider@3.1.8': - dependencies: - '@smithy/types': 3.6.0 - tslib: 2.8.0 - - '@smithy/protocol-http@4.1.5': - dependencies: - '@smithy/types': 3.6.0 - tslib: 2.8.0 - - '@smithy/querystring-builder@3.0.8': - dependencies: - '@smithy/types': 3.6.0 - '@smithy/util-uri-escape': 3.0.0 - tslib: 2.8.0 - - '@smithy/querystring-parser@3.0.8': - dependencies: - '@smithy/types': 3.6.0 - tslib: 2.8.0 - - '@smithy/service-error-classification@3.0.8': - dependencies: - '@smithy/types': 3.6.0 - - '@smithy/shared-ini-file-loader@3.1.9': - dependencies: - '@smithy/types': 3.6.0 - tslib: 2.8.0 - - '@smithy/signature-v4@4.2.1': - dependencies: - '@smithy/is-array-buffer': 3.0.0 - '@smithy/protocol-http': 4.1.5 - '@smithy/types': 3.6.0 - '@smithy/util-hex-encoding': 3.0.0 - '@smithy/util-middleware': 3.0.8 - '@smithy/util-uri-escape': 3.0.0 - '@smithy/util-utf8': 3.0.0 - tslib: 2.8.0 - - '@smithy/smithy-client@3.4.2': - dependencies: - '@smithy/core': 2.5.1 - '@smithy/middleware-endpoint': 3.2.1 - '@smithy/middleware-stack': 3.0.8 - '@smithy/protocol-http': 4.1.5 - '@smithy/types': 3.6.0 - '@smithy/util-stream': 3.2.1 - tslib: 2.8.0 - - '@smithy/types@3.6.0': - dependencies: - tslib: 2.8.0 - - '@smithy/url-parser@3.0.8': - dependencies: - '@smithy/querystring-parser': 3.0.8 - '@smithy/types': 3.6.0 - tslib: 2.8.0 - - '@smithy/util-base64@3.0.0': - dependencies: - '@smithy/util-buffer-from': 3.0.0 - '@smithy/util-utf8': 3.0.0 - tslib: 2.8.0 - - '@smithy/util-body-length-browser@3.0.0': - dependencies: - tslib: 2.8.0 - - '@smithy/util-body-length-node@3.0.0': - dependencies: - tslib: 2.8.0 - - '@smithy/util-buffer-from@2.2.0': - dependencies: - '@smithy/is-array-buffer': 2.2.0 - tslib: 2.8.0 - - '@smithy/util-buffer-from@3.0.0': - dependencies: - '@smithy/is-array-buffer': 3.0.0 - tslib: 2.8.0 - - '@smithy/util-config-provider@3.0.0': - dependencies: - tslib: 2.8.0 - - '@smithy/util-defaults-mode-browser@3.0.25': - dependencies: - '@smithy/property-provider': 3.1.8 - '@smithy/smithy-client': 3.4.2 - '@smithy/types': 3.6.0 - bowser: 2.11.0 - tslib: 2.8.0 - - '@smithy/util-defaults-mode-node@3.0.25': - dependencies: - '@smithy/config-resolver': 3.0.10 - '@smithy/credential-provider-imds': 3.2.5 - '@smithy/node-config-provider': 3.1.9 - '@smithy/property-provider': 3.1.8 - '@smithy/smithy-client': 3.4.2 - '@smithy/types': 3.6.0 - tslib: 2.8.0 - - '@smithy/util-endpoints@2.1.4': - dependencies: - '@smithy/node-config-provider': 3.1.9 - '@smithy/types': 3.6.0 - tslib: 2.8.0 - - '@smithy/util-hex-encoding@3.0.0': - dependencies: - tslib: 2.8.0 - - '@smithy/util-middleware@3.0.8': - dependencies: - '@smithy/types': 3.6.0 - tslib: 2.8.0 - - '@smithy/util-retry@3.0.8': - dependencies: - '@smithy/service-error-classification': 3.0.8 - '@smithy/types': 3.6.0 - tslib: 2.8.0 - - '@smithy/util-stream@3.2.1': - dependencies: - '@smithy/fetch-http-handler': 4.0.0 - '@smithy/node-http-handler': 3.2.5 - '@smithy/types': 3.6.0 - '@smithy/util-base64': 3.0.0 - '@smithy/util-buffer-from': 3.0.0 - '@smithy/util-hex-encoding': 3.0.0 - '@smithy/util-utf8': 3.0.0 - tslib: 2.8.0 - - '@smithy/util-uri-escape@3.0.0': - dependencies: - tslib: 2.8.0 - - '@smithy/util-utf8@2.3.0': - dependencies: - '@smithy/util-buffer-from': 2.2.0 - tslib: 2.8.0 - - '@smithy/util-utf8@3.0.0': - dependencies: - '@smithy/util-buffer-from': 3.0.0 - tslib: 2.8.0 - - '@solidity-parser/parser@0.14.5': - dependencies: - antlr4ts: 0.5.0-alpha.4 - - '@solidity-parser/parser@0.18.0': {} - - '@szmarczak/http-timer@4.0.6': - dependencies: - defer-to-connect: 2.0.1 - - '@szmarczak/http-timer@5.0.1': - dependencies: - defer-to-connect: 2.0.1 - - '@tootallnate/quickjs-emscripten@0.23.0': {} - - '@trufflesuite/uws-js-unofficial@20.30.0-unofficial.0': - dependencies: - ws: 8.13.0(bufferutil@4.0.8)(utf-8-validate@6.0.3) - optionalDependencies: - bufferutil: 4.0.8 - utf-8-validate: 6.0.3 - - '@tsconfig/node10@1.0.11': {} - - '@tsconfig/node12@1.0.11': {} - - '@tsconfig/node14@1.0.3': {} - - '@tsconfig/node16@1.0.4': {} - - '@typechain/ethers-v6@0.5.1(ethers@6.13.4(bufferutil@4.0.8)(utf-8-validate@5.0.10))(typechain@8.3.2(typescript@5.6.3))(typescript@5.6.3)': - dependencies: - ethers: 6.13.4(bufferutil@4.0.8)(utf-8-validate@5.0.10) - lodash: 4.17.21 - ts-essentials: 7.0.3(typescript@5.6.3) - typechain: 8.3.2(typescript@5.6.3) - typescript: 5.6.3 - - '@typechain/ethers-v6@0.5.1(ethers@6.13.4(bufferutil@4.0.8)(utf-8-validate@6.0.3))(typechain@8.3.2(typescript@5.6.3))(typescript@5.6.3)': - dependencies: - ethers: 6.13.4(bufferutil@4.0.8)(utf-8-validate@6.0.3) - lodash: 4.17.21 - ts-essentials: 7.0.3(typescript@5.6.3) - typechain: 8.3.2(typescript@5.6.3) - typescript: 5.6.3 - - '@typechain/hardhat@9.1.0(@typechain/ethers-v6@0.5.1(ethers@6.13.4(bufferutil@4.0.8)(utf-8-validate@5.0.10))(typechain@8.3.2(typescript@5.6.3))(typescript@5.6.3))(ethers@6.13.4(bufferutil@4.0.8)(utf-8-validate@5.0.10))(hardhat@2.22.14(bufferutil@4.0.8)(ts-node@10.9.2(@types/node@22.7.9)(typescript@5.6.3))(typescript@5.6.3)(utf-8-validate@5.0.10))(typechain@8.3.2(typescript@5.6.3))': - dependencies: - '@typechain/ethers-v6': 0.5.1(ethers@6.13.4(bufferutil@4.0.8)(utf-8-validate@5.0.10))(typechain@8.3.2(typescript@5.6.3))(typescript@5.6.3) - ethers: 6.13.4(bufferutil@4.0.8)(utf-8-validate@5.0.10) - fs-extra: 9.1.0 - hardhat: 2.22.14(bufferutil@4.0.8)(ts-node@10.9.2(@types/node@22.7.9)(typescript@5.6.3))(typescript@5.6.3)(utf-8-validate@5.0.10) - typechain: 8.3.2(typescript@5.6.3) - - '@types/bn.js@4.11.6': - dependencies: - '@types/node': 22.7.9 - - '@types/bn.js@5.1.6': - dependencies: - '@types/node': 22.7.9 - - '@types/cacheable-request@6.0.3': - dependencies: - '@types/http-cache-semantics': 4.0.4 - '@types/keyv': 3.1.4 - '@types/node': 22.7.9 - '@types/responselike': 1.0.3 - - '@types/chai-as-promised@7.1.8': - dependencies: - '@types/chai': 4.3.20 - - '@types/chai@4.3.20': {} - - '@types/concat-stream@1.6.1': - dependencies: - '@types/node': 22.13.10 - - '@types/cors@2.8.17': - dependencies: - '@types/node': 22.7.9 - - '@types/estree@0.0.39': {} - - '@types/estree@1.0.6': {} - - '@types/form-data@0.0.33': - dependencies: - '@types/node': 22.13.10 - - '@types/glob@7.2.0': - dependencies: - '@types/minimatch': 5.1.2 - '@types/node': 22.7.9 - - '@types/html-minifier-terser@6.1.0': {} - - '@types/http-cache-semantics@4.0.4': {} - - '@types/json-schema@7.0.15': {} - - '@types/json5@0.0.29': {} - - '@types/jwt-decode@3.1.0': - dependencies: - jwt-decode: 4.0.0 - - '@types/keyv@3.1.4': - dependencies: - '@types/node': 22.7.9 - - '@types/lru-cache@5.1.1': {} - - '@types/minimatch@5.1.2': {} - - '@types/mocha@10.0.9': {} - - '@types/node@10.17.60': {} - - '@types/node@12.20.55': {} - - '@types/node@22.13.10': - dependencies: - undici-types: 6.20.0 - - '@types/node@22.7.5': - dependencies: - undici-types: 6.19.8 - - '@types/node@22.7.9': - dependencies: - undici-types: 6.19.8 - - '@types/node@8.10.66': {} - - '@types/pbkdf2@3.1.2': - dependencies: - '@types/node': 22.7.9 - - '@types/prettier@2.7.3': {} - - '@types/qs@6.9.18': {} - - '@types/resolve@1.17.1': - dependencies: - '@types/node': 22.7.9 - - '@types/responselike@1.0.3': - dependencies: - '@types/node': 22.7.9 - - '@types/secp256k1@4.0.6': - dependencies: - '@types/node': 22.7.9 - - '@types/seedrandom@3.0.1': {} - - '@types/webextension-polyfill@0.10.7': {} - - '@types/ws@8.5.12': - dependencies: - '@types/node': 22.7.9 - - '@types/yauzl@2.10.3': - dependencies: - '@types/node': 22.7.9 - optional: true - - '@typescript-eslint/eslint-plugin@8.11.0(@typescript-eslint/parser@8.11.0(eslint@8.57.1)(typescript@5.6.3))(eslint@8.57.1)(typescript@5.6.3)': - dependencies: - '@eslint-community/regexpp': 4.11.1 - '@typescript-eslint/parser': 8.11.0(eslint@8.57.1)(typescript@5.6.3) - '@typescript-eslint/scope-manager': 8.11.0 - '@typescript-eslint/type-utils': 8.11.0(eslint@8.57.1)(typescript@5.6.3) - '@typescript-eslint/utils': 8.11.0(eslint@8.57.1)(typescript@5.6.3) - '@typescript-eslint/visitor-keys': 8.11.0 - eslint: 8.57.1 - graphemer: 1.4.0 - ignore: 5.3.2 - natural-compare: 1.4.0 - ts-api-utils: 1.3.0(typescript@5.6.3) - optionalDependencies: - typescript: 5.6.3 - transitivePeerDependencies: - - supports-color - - '@typescript-eslint/parser@8.11.0(eslint@8.57.1)(typescript@5.6.3)': - dependencies: - '@typescript-eslint/scope-manager': 8.11.0 - '@typescript-eslint/types': 8.11.0 - '@typescript-eslint/typescript-estree': 8.11.0(typescript@5.6.3) - '@typescript-eslint/visitor-keys': 8.11.0 - debug: 4.3.7(supports-color@6.1.0) - eslint: 8.57.1 - optionalDependencies: - typescript: 5.6.3 - transitivePeerDependencies: - - supports-color - - '@typescript-eslint/scope-manager@8.11.0': - dependencies: - '@typescript-eslint/types': 8.11.0 - '@typescript-eslint/visitor-keys': 8.11.0 - - '@typescript-eslint/type-utils@8.11.0(eslint@8.57.1)(typescript@5.6.3)': - dependencies: - '@typescript-eslint/typescript-estree': 8.11.0(typescript@5.6.3) - '@typescript-eslint/utils': 8.11.0(eslint@8.57.1)(typescript@5.6.3) - debug: 4.3.7(supports-color@6.1.0) - ts-api-utils: 1.3.0(typescript@5.6.3) - optionalDependencies: - typescript: 5.6.3 - transitivePeerDependencies: - - eslint - - supports-color - - '@typescript-eslint/types@8.11.0': {} - - '@typescript-eslint/typescript-estree@8.11.0(typescript@5.6.3)': - dependencies: - '@typescript-eslint/types': 8.11.0 - '@typescript-eslint/visitor-keys': 8.11.0 - debug: 4.3.7(supports-color@6.1.0) - fast-glob: 3.3.2 - is-glob: 4.0.3 - minimatch: 9.0.5 - semver: 7.6.3 - ts-api-utils: 1.3.0(typescript@5.6.3) - optionalDependencies: - typescript: 5.6.3 - transitivePeerDependencies: - - supports-color - - '@typescript-eslint/utils@8.11.0(eslint@8.57.1)(typescript@5.6.3)': - dependencies: - '@eslint-community/eslint-utils': 4.4.0(eslint@8.57.1) - '@typescript-eslint/scope-manager': 8.11.0 - '@typescript-eslint/types': 8.11.0 - '@typescript-eslint/typescript-estree': 8.11.0(typescript@5.6.3) - eslint: 8.57.1 - transitivePeerDependencies: - - supports-color - - typescript - - '@typescript-eslint/visitor-keys@8.11.0': - dependencies: - '@typescript-eslint/types': 8.11.0 - eslint-visitor-keys: 3.4.3 - - '@ungap/structured-clone@1.2.0': {} - - '@vercel/nft@0.26.5': - dependencies: - '@mapbox/node-pre-gyp': 1.0.11 - '@rollup/pluginutils': 4.2.1 - acorn: 8.13.0 - acorn-import-attributes: 1.9.5(acorn@8.13.0) - async-sema: 3.1.1 - bindings: 1.5.0 - estree-walker: 2.0.2 - glob: 7.2.3 - graceful-fs: 4.2.11 - micromatch: 4.0.8 - node-gyp-build: 4.8.2 - resolve-from: 5.0.0 - transitivePeerDependencies: - - encoding - - supports-color - - '@webassemblyjs/ast@1.12.1': - dependencies: - '@webassemblyjs/helper-numbers': 1.11.6 - '@webassemblyjs/helper-wasm-bytecode': 1.11.6 - - '@webassemblyjs/floating-point-hex-parser@1.11.6': {} - - '@webassemblyjs/helper-api-error@1.11.6': {} - - '@webassemblyjs/helper-buffer@1.12.1': {} - - '@webassemblyjs/helper-numbers@1.11.6': - dependencies: - '@webassemblyjs/floating-point-hex-parser': 1.11.6 - '@webassemblyjs/helper-api-error': 1.11.6 - '@xtuc/long': 4.2.2 - - '@webassemblyjs/helper-wasm-bytecode@1.11.6': {} - - '@webassemblyjs/helper-wasm-section@1.12.1': - dependencies: - '@webassemblyjs/ast': 1.12.1 - '@webassemblyjs/helper-buffer': 1.12.1 - '@webassemblyjs/helper-wasm-bytecode': 1.11.6 - '@webassemblyjs/wasm-gen': 1.12.1 - - '@webassemblyjs/ieee754@1.11.6': - dependencies: - '@xtuc/ieee754': 1.2.0 - - '@webassemblyjs/leb128@1.11.6': - dependencies: - '@xtuc/long': 4.2.2 - - '@webassemblyjs/utf8@1.11.6': {} - - '@webassemblyjs/wasm-edit@1.12.1': - dependencies: - '@webassemblyjs/ast': 1.12.1 - '@webassemblyjs/helper-buffer': 1.12.1 - '@webassemblyjs/helper-wasm-bytecode': 1.11.6 - '@webassemblyjs/helper-wasm-section': 1.12.1 - '@webassemblyjs/wasm-gen': 1.12.1 - '@webassemblyjs/wasm-opt': 1.12.1 - '@webassemblyjs/wasm-parser': 1.12.1 - '@webassemblyjs/wast-printer': 1.12.1 - - '@webassemblyjs/wasm-gen@1.12.1': - dependencies: - '@webassemblyjs/ast': 1.12.1 - '@webassemblyjs/helper-wasm-bytecode': 1.11.6 - '@webassemblyjs/ieee754': 1.11.6 - '@webassemblyjs/leb128': 1.11.6 - '@webassemblyjs/utf8': 1.11.6 - - '@webassemblyjs/wasm-opt@1.12.1': - dependencies: - '@webassemblyjs/ast': 1.12.1 - '@webassemblyjs/helper-buffer': 1.12.1 - '@webassemblyjs/wasm-gen': 1.12.1 - '@webassemblyjs/wasm-parser': 1.12.1 - - '@webassemblyjs/wasm-parser@1.12.1': - dependencies: - '@webassemblyjs/ast': 1.12.1 - '@webassemblyjs/helper-api-error': 1.11.6 - '@webassemblyjs/helper-wasm-bytecode': 1.11.6 - '@webassemblyjs/ieee754': 1.11.6 - '@webassemblyjs/leb128': 1.11.6 - '@webassemblyjs/utf8': 1.11.6 - - '@webassemblyjs/wast-printer@1.12.1': - dependencies: - '@webassemblyjs/ast': 1.12.1 - '@xtuc/long': 4.2.2 - - '@webpack-cli/configtest@1.2.0(webpack-cli@4.10.0)(webpack@5.95.0)': - dependencies: - webpack: 5.95.0(webpack-cli@4.10.0) - webpack-cli: 4.10.0(webpack-dev-server@3.11.3)(webpack@5.95.0) - - '@webpack-cli/info@1.5.0(webpack-cli@4.10.0)': - dependencies: - envinfo: 7.14.0 - webpack-cli: 4.10.0(webpack-dev-server@3.11.3)(webpack@5.95.0) - - '@webpack-cli/serve@1.7.0(webpack-cli@4.10.0)(webpack-dev-server@3.11.3)': - dependencies: - webpack-cli: 4.10.0(webpack-dev-server@3.11.3)(webpack@5.95.0) - optionalDependencies: - webpack-dev-server: 3.11.3(bufferutil@4.0.8)(utf-8-validate@6.0.3)(webpack-cli@4.10.0)(webpack@5.95.0) - - '@xtuc/ieee754@1.2.0': {} - - '@xtuc/long@4.2.2': {} - - abbrev@1.0.9: {} - - abbrev@1.1.1: {} - - abortcontroller-polyfill@1.7.5: {} - - abstract-level@1.0.3: - dependencies: - buffer: 6.0.3 - catering: 2.1.1 - is-buffer: 2.0.5 - level-supports: 4.0.1 - level-transcoder: 1.0.1 - module-error: 1.0.2 - queue-microtask: 1.2.3 - - abstract-leveldown@7.2.0: - dependencies: - buffer: 6.0.3 - catering: 2.1.1 - is-buffer: 2.0.5 - level-concat-iterator: 3.1.0 - level-supports: 2.1.0 - queue-microtask: 1.2.3 - - accepts@1.3.8: - dependencies: - mime-types: 2.1.35 - negotiator: 0.6.3 - - acorn-import-attributes@1.9.5(acorn@8.13.0): - dependencies: - acorn: 8.13.0 - - acorn-jsx@5.3.2(acorn@8.13.0): - dependencies: - acorn: 8.13.0 - - acorn-walk@8.3.4: - dependencies: - acorn: 8.13.0 - - acorn@8.13.0: {} - - adm-zip@0.4.16: {} - - aes-js@3.0.0: {} - - aes-js@4.0.0-beta.5: {} - - agent-base@6.0.2: - dependencies: - debug: 4.3.7(supports-color@6.1.0) - transitivePeerDependencies: - - supports-color - - agent-base@7.1.1: - dependencies: - debug: 4.3.7(supports-color@6.1.0) - transitivePeerDependencies: - - supports-color - - agent-base@7.1.3: {} - - aggregate-error@3.1.0: - dependencies: - clean-stack: 2.2.0 - indent-string: 4.0.0 - - ajv-errors@1.0.1(ajv@6.12.6): - dependencies: - ajv: 6.12.6 - - ajv-formats@2.1.1(ajv@8.17.1): - optionalDependencies: - ajv: 8.17.1 - - ajv-keywords@3.5.2(ajv@6.12.6): - dependencies: - ajv: 6.12.6 - - ajv-keywords@5.1.0(ajv@8.17.1): - dependencies: - ajv: 8.17.1 - fast-deep-equal: 3.1.3 - - ajv@6.12.6: - dependencies: - fast-deep-equal: 3.1.3 - fast-json-stable-stringify: 2.1.0 - json-schema-traverse: 0.4.1 - uri-js: 4.4.1 - - ajv@8.17.1: - dependencies: - fast-deep-equal: 3.1.3 - fast-uri: 3.0.3 - json-schema-traverse: 1.0.0 - require-from-string: 2.0.2 - - amdefine@1.0.1: - optional: true - - ansi-align@3.0.1: - dependencies: - string-width: 4.2.3 - - ansi-colors@3.2.4: {} - - ansi-colors@4.1.3: {} - - ansi-escapes@4.3.2: - dependencies: - type-fest: 0.21.3 - - ansi-html-community@0.0.8: {} - - ansi-regex@2.1.1: {} - - ansi-regex@3.0.1: {} - - ansi-regex@4.1.1: {} - - ansi-regex@5.0.1: {} - - ansi-regex@6.1.0: {} - - ansi-styles@3.2.1: - dependencies: - color-convert: 1.9.3 - - ansi-styles@4.3.0: - dependencies: - color-convert: 2.0.1 - - ansi-styles@6.2.1: {} - - antlr4ts@0.5.0-alpha.4: {} - - anymatch@2.0.0(supports-color@6.1.0): - dependencies: - micromatch: 3.1.10(supports-color@6.1.0) - normalize-path: 2.1.1 - transitivePeerDependencies: - - supports-color - - anymatch@3.1.3: - dependencies: - normalize-path: 3.0.0 - picomatch: 2.3.1 - - append-transform@2.0.0: - dependencies: - default-require-extensions: 3.0.1 - - aproba@2.0.0: {} - - archy@1.0.0: {} - - are-we-there-yet@2.0.0: - dependencies: - delegates: 1.0.0 - readable-stream: 3.6.2 - - arg@4.1.3: {} - - argparse@1.0.10: - dependencies: - sprintf-js: 1.0.3 - - argparse@2.0.1: {} - - arr-diff@4.0.0: {} - - arr-flatten@1.1.0: {} - - arr-union@3.1.0: {} - - array-back@3.1.0: {} - - array-back@4.0.2: {} - - array-buffer-byte-length@1.0.1: - dependencies: - call-bind: 1.0.7 - is-array-buffer: 3.0.4 - - array-find-index@1.0.2: {} - - array-flatten@1.1.1: {} - - array-flatten@2.1.2: {} - - array-includes@3.1.8: - dependencies: - call-bind: 1.0.7 - define-properties: 1.2.1 - es-abstract: 1.23.3 - es-object-atoms: 1.0.0 - get-intrinsic: 1.2.4 - is-string: 1.0.7 - - array-union@1.0.2: - dependencies: - array-uniq: 1.0.3 - - array-union@2.1.0: {} - - array-uniq@1.0.3: {} - - array-unique@0.3.2: {} - - array.prototype.findlastindex@1.2.5: - dependencies: - call-bind: 1.0.7 - define-properties: 1.2.1 - es-abstract: 1.23.3 - es-errors: 1.3.0 - es-object-atoms: 1.0.0 - es-shim-unscopables: 1.0.2 - - array.prototype.flat@1.3.2: - dependencies: - call-bind: 1.0.7 - define-properties: 1.2.1 - es-abstract: 1.23.3 - es-shim-unscopables: 1.0.2 - - array.prototype.flatmap@1.3.2: - dependencies: - call-bind: 1.0.7 - define-properties: 1.2.1 - es-abstract: 1.23.3 - es-shim-unscopables: 1.0.2 - - arraybuffer.prototype.slice@1.0.3: - dependencies: - array-buffer-byte-length: 1.0.1 - call-bind: 1.0.7 - define-properties: 1.2.1 - es-abstract: 1.23.3 - es-errors: 1.3.0 - get-intrinsic: 1.2.4 - is-array-buffer: 3.0.4 - is-shared-array-buffer: 1.0.3 - - arrgv@1.0.2: {} - - arrify@3.0.0: {} - - asap@2.0.6: {} - - asn1@0.2.6: - dependencies: - safer-buffer: 2.1.2 - - assert-plus@1.0.0: {} - - assertion-error@1.1.0: {} - - assign-symbols@1.0.0: {} - - ast-types@0.13.4: - dependencies: - tslib: 2.8.0 - - astral-regex@2.0.0: {} - - async-each@1.0.6: {} - - async-eventemitter@0.2.4: - dependencies: - async: 2.6.4 - - async-limiter@1.0.1: {} - - async-mutex@0.5.0: - dependencies: - tslib: 2.8.0 - - async-sema@3.1.1: {} - - async@1.5.2: {} - - async@2.6.4: - dependencies: - lodash: 4.17.21 - - asynckit@0.4.0: {} - - at-least-node@1.0.0: {} - - atob@2.1.2: {} - - ava@6.1.3: - dependencies: - '@vercel/nft': 0.26.5 - acorn: 8.13.0 - acorn-walk: 8.3.4 - ansi-styles: 6.2.1 - arrgv: 1.0.2 - arrify: 3.0.0 - callsites: 4.2.0 - cbor: 9.0.2 - chalk: 5.3.0 - chunkd: 2.0.1 - ci-info: 4.0.0 - ci-parallel-vars: 1.0.1 - cli-truncate: 4.0.0 - code-excerpt: 4.0.0 - common-path-prefix: 3.0.0 - concordance: 5.0.4 - currently-unhandled: 0.4.1 - debug: 4.3.7(supports-color@6.1.0) - emittery: 1.0.3 - figures: 6.1.0 - globby: 14.0.2 - ignore-by-default: 2.1.0 - indent-string: 5.0.0 - is-plain-object: 5.0.0 - is-promise: 4.0.0 - matcher: 5.0.0 - memoize: 10.0.0 - ms: 2.1.3 - p-map: 7.0.2 - package-config: 5.0.0 - picomatch: 3.0.1 - plur: 5.1.0 - pretty-ms: 9.1.0 - resolve-cwd: 3.0.0 - stack-utils: 2.0.6 - strip-ansi: 7.1.0 - supertap: 3.0.1 - temp-dir: 3.0.0 - write-file-atomic: 5.0.1 - yargs: 17.7.2 - transitivePeerDependencies: - - encoding - - supports-color - - available-typed-arrays@1.0.7: - dependencies: - possible-typed-array-names: 1.0.0 - - aws-sign2@0.7.0: {} - - aws4@1.13.2: {} - - axios@1.7.7: - dependencies: - follow-redirects: 1.15.9(debug@4.3.7(supports-color@6.1.0)) - form-data: 4.0.1 - proxy-from-env: 1.1.0 - transitivePeerDependencies: - - debug - - axios@1.8.3: - dependencies: - follow-redirects: 1.15.9(debug@4.3.7(supports-color@6.1.0)) - form-data: 4.0.2 - proxy-from-env: 1.1.0 - transitivePeerDependencies: - - debug - - b4a@1.6.7: {} - - babel-loader@9.2.1(@babel/core@7.25.9)(webpack@5.95.0): - dependencies: - '@babel/core': 7.25.9 - find-cache-dir: 4.0.0 - schema-utils: 4.2.0 - webpack: 5.95.0(webpack-cli@4.10.0) - - babel-plugin-polyfill-corejs2@0.4.11(@babel/core@7.25.9): - dependencies: - '@babel/compat-data': 7.25.9 - '@babel/core': 7.25.9 - '@babel/helper-define-polyfill-provider': 0.6.2(@babel/core@7.25.9) - semver: 6.3.1 - transitivePeerDependencies: - - supports-color - - babel-plugin-polyfill-corejs3@0.10.6(@babel/core@7.25.9): - dependencies: - '@babel/core': 7.25.9 - '@babel/helper-define-polyfill-provider': 0.6.2(@babel/core@7.25.9) - core-js-compat: 3.38.1 - transitivePeerDependencies: - - supports-color - - babel-plugin-polyfill-regenerator@0.6.2(@babel/core@7.25.9): - dependencies: - '@babel/core': 7.25.9 - '@babel/helper-define-polyfill-provider': 0.6.2(@babel/core@7.25.9) - transitivePeerDependencies: - - supports-color - - backo2@1.0.2: {} - - balanced-match@1.0.2: {} - - bare-events@2.5.0: - optional: true - - bare-fs@2.3.5: - dependencies: - bare-events: 2.5.0 - bare-path: 2.1.3 - bare-stream: 2.3.2 - optional: true - - bare-os@2.4.4: - optional: true - - bare-path@2.1.3: - dependencies: - bare-os: 2.4.4 - optional: true - - bare-stream@2.3.2: - dependencies: - streamx: 2.20.1 - optional: true - - base-x@3.0.10: - dependencies: - safe-buffer: 5.2.1 - - base64-arraybuffer-es6@0.7.0: {} - - base64-arraybuffer@0.1.5: {} - - base64-js@1.5.1: {} - - base@0.11.2: - dependencies: - cache-base: 1.0.1 - class-utils: 0.3.6 - component-emitter: 1.3.1 - define-property: 1.0.0 - isobject: 3.0.1 - mixin-deep: 1.3.2 - pascalcase: 0.1.1 - - basic-ftp@5.0.5: {} - - batch@0.6.1: {} - - bcrypt-pbkdf@1.0.2: - dependencies: - tweetnacl: 0.14.5 - - bech32@1.1.4: {} - - better-path-resolve@1.0.0: - dependencies: - is-windows: 1.0.2 - - bignumber.js@9.1.2: {} - - binary-extensions@1.13.1: {} - - binary-extensions@2.3.0: {} - - bindings@1.5.0: - dependencies: - file-uri-to-path: 1.0.0 - - blakejs@1.2.1: {} - - bluebird@3.7.2: {} - - blueimp-md5@2.19.0: {} - - bn.js@4.11.6: {} - - bn.js@4.12.0: {} - - bn.js@4.12.1: {} - - bn.js@5.2.1: {} - - body-parser@1.20.3(supports-color@6.1.0): - dependencies: - bytes: 3.1.2 - content-type: 1.0.5 - debug: 2.6.9(supports-color@6.1.0) - depd: 2.0.0 - destroy: 1.2.0 - http-errors: 2.0.0 - iconv-lite: 0.4.24 - on-finished: 2.4.1 - qs: 6.13.0 - raw-body: 2.5.2 - type-is: 1.6.18 - unpipe: 1.0.0 - transitivePeerDependencies: - - supports-color - - bonjour@3.5.0: - dependencies: - array-flatten: 2.1.2 - deep-equal: 1.1.2 - dns-equal: 1.0.0 - dns-txt: 2.0.2 - multicast-dns: 6.2.3 - multicast-dns-service-types: 1.1.0 - - boolbase@1.0.0: {} - - bowser@2.11.0: {} - - boxen@5.1.2: - dependencies: - ansi-align: 3.0.1 - camelcase: 6.3.0 - chalk: 4.1.2 - cli-boxes: 2.2.1 - string-width: 4.2.3 - type-fest: 0.20.2 - widest-line: 3.1.0 - wrap-ansi: 7.0.0 - - brace-expansion@1.1.11: - dependencies: - balanced-match: 1.0.2 - concat-map: 0.0.1 - - brace-expansion@2.0.1: - dependencies: - balanced-match: 1.0.2 - - braces@2.3.2(supports-color@6.1.0): - dependencies: - arr-flatten: 1.1.0 - array-unique: 0.3.2 - extend-shallow: 2.0.1 - fill-range: 4.0.0 - isobject: 3.0.1 - repeat-element: 1.1.4 - snapdragon: 0.8.2(supports-color@6.1.0) - snapdragon-node: 2.1.1 - split-string: 3.1.0 - to-regex: 3.0.2 - transitivePeerDependencies: - - supports-color - - braces@3.0.3: - dependencies: - fill-range: 7.1.1 - - brorand@1.1.0: {} - - brotli-wasm@3.0.1: {} - - browser-stdout@1.3.1: {} - - browserify-aes@1.2.0: - dependencies: - buffer-xor: 1.0.3 - cipher-base: 1.0.4 - create-hash: 1.2.0 - evp_bytestokey: 1.0.3 - inherits: 2.0.4 - safe-buffer: 5.2.1 - - browserslist@4.24.2: - dependencies: - caniuse-lite: 1.0.30001669 - electron-to-chromium: 1.5.45 - node-releases: 2.0.18 - update-browserslist-db: 1.1.1(browserslist@4.24.2) - - bs58@4.0.1: - dependencies: - base-x: 3.0.10 - - bs58check@2.1.2: - dependencies: - bs58: 4.0.1 - create-hash: 1.2.0 - safe-buffer: 5.2.1 - - buffer-crc32@0.2.13: {} - - buffer-from@1.1.2: {} - - buffer-indexof@1.1.1: {} - - buffer-to-arraybuffer@0.0.5: {} - - buffer-xor@1.0.3: {} - - buffer@5.7.1: - dependencies: - base64-js: 1.5.1 - ieee754: 1.2.1 - - buffer@6.0.3: - dependencies: - base64-js: 1.5.1 - ieee754: 1.2.1 - - bufferutil@4.0.8: - dependencies: - node-gyp-build: 4.8.2 - - builtin-modules@3.3.0: {} - - bytes@3.0.0: {} - - bytes@3.1.2: {} - - cache-base@1.0.1: - dependencies: - collection-visit: 1.0.0 - component-emitter: 1.3.1 - get-value: 2.0.6 - has-value: 1.0.0 - isobject: 3.0.1 - set-value: 2.0.1 - to-object-path: 0.3.0 - union-value: 1.0.1 - unset-value: 1.0.0 - - cacheable-lookup@5.0.4: {} - - cacheable-lookup@6.1.0: {} - - cacheable-request@7.0.4: - dependencies: - clone-response: 1.0.3 - get-stream: 5.2.0 - http-cache-semantics: 4.1.1 - keyv: 4.5.4 - lowercase-keys: 2.0.0 - normalize-url: 6.1.0 - responselike: 2.0.1 - - caching-transform@4.0.0: - dependencies: - hasha: 5.2.2 - make-dir: 3.1.0 - package-hash: 4.0.0 - write-file-atomic: 3.0.3 - - call-bind-apply-helpers@1.0.2: - dependencies: - es-errors: 1.3.0 - function-bind: 1.1.2 - - call-bind@1.0.7: - dependencies: - es-define-property: 1.0.0 - es-errors: 1.3.0 - function-bind: 1.1.2 - get-intrinsic: 1.2.4 - set-function-length: 1.2.2 - - call-bound@1.0.4: - dependencies: - call-bind-apply-helpers: 1.0.2 - get-intrinsic: 1.3.0 - - callsites@3.1.0: {} - - callsites@4.2.0: {} - - camel-case@4.1.2: - dependencies: - pascal-case: 3.1.2 - tslib: 2.8.0 - - camelcase@5.3.1: {} - - camelcase@6.3.0: {} - - caniuse-lite@1.0.30001669: {} - - caseless@0.12.0: {} - - catering@2.1.1: {} - - cbor@8.1.0: - dependencies: - nofilter: 3.1.0 - - cbor@9.0.2: - dependencies: - nofilter: 3.1.0 - - chai-as-promised@7.1.2(chai@4.5.0): - dependencies: - chai: 4.5.0 - check-error: 1.0.3 - - chai@4.5.0: - dependencies: - assertion-error: 1.1.0 - check-error: 1.0.3 - deep-eql: 4.1.4 - get-func-name: 2.0.2 - loupe: 2.3.7 - pathval: 1.1.1 - type-detect: 4.1.0 - - chalk@2.4.2: - dependencies: - ansi-styles: 3.2.1 - escape-string-regexp: 1.0.5 - supports-color: 5.5.0 - - chalk@4.1.2: - dependencies: - ansi-styles: 4.3.0 - supports-color: 7.2.0 - - chalk@5.3.0: {} - - chardet@0.7.0: {} - - charenc@0.0.2: {} - - check-error@1.0.3: - dependencies: - get-func-name: 2.0.2 - - chokidar@2.1.8(supports-color@6.1.0): - dependencies: - anymatch: 2.0.0(supports-color@6.1.0) - async-each: 1.0.6 - braces: 2.3.2(supports-color@6.1.0) - glob-parent: 6.0.2 - inherits: 2.0.4 - is-binary-path: 1.0.1 - is-glob: 4.0.3 - normalize-path: 3.0.0 - path-is-absolute: 1.0.1 - readdirp: 2.2.1(supports-color@6.1.0) - upath: 1.2.0 - optionalDependencies: - fsevents: 1.2.13 - transitivePeerDependencies: - - supports-color - - chokidar@3.6.0: - dependencies: - anymatch: 3.1.3 - braces: 3.0.3 - glob-parent: 5.1.2 - is-binary-path: 2.1.0 - is-glob: 4.0.3 - normalize-path: 3.0.0 - readdirp: 3.6.0 - optionalDependencies: - fsevents: 2.3.3 - - chokidar@4.0.1: - dependencies: - readdirp: 4.0.2 - - chownr@1.1.4: {} - - chownr@2.0.0: {} - - chrome-trace-event@1.0.4: {} - - chromium-bidi@0.8.0(devtools-protocol@0.0.1367902): - dependencies: - devtools-protocol: 0.0.1367902 - mitt: 3.0.1 - urlpattern-polyfill: 10.0.0 - zod: 3.23.8 - - chunkd@2.0.1: {} - - ci-info@2.0.0: {} - - ci-info@3.9.0: {} - - ci-info@4.0.0: {} - - ci-parallel-vars@1.0.1: {} - - cids@0.7.5: - dependencies: - buffer: 5.7.1 - class-is: 1.1.0 - multibase: 0.6.1 - multicodec: 1.0.4 - multihashes: 0.4.21 - - cipher-base@1.0.4: - dependencies: - inherits: 2.0.4 - safe-buffer: 5.2.1 - - class-is@1.1.0: {} - - class-utils@0.3.6: - dependencies: - arr-union: 3.1.0 - define-property: 0.2.5 - isobject: 3.0.1 - static-extend: 0.1.2 - - clean-css@5.3.3: - dependencies: - source-map: 0.6.1 - - clean-stack@2.2.0: {} - - cli-boxes@2.2.1: {} - - cli-table3@0.5.1: - dependencies: - object-assign: 4.1.1 - string-width: 2.1.1 - optionalDependencies: - colors: 1.4.0 - - cli-truncate@4.0.0: - dependencies: - slice-ansi: 5.0.0 - string-width: 7.2.0 - - cliui@5.0.0: - dependencies: - string-width: 3.1.0 - strip-ansi: 5.2.0 - wrap-ansi: 5.1.0 - - cliui@6.0.0: - dependencies: - string-width: 4.2.3 - strip-ansi: 6.0.1 - wrap-ansi: 6.2.0 - - cliui@7.0.4: - dependencies: - string-width: 4.2.3 - strip-ansi: 6.0.1 - wrap-ansi: 7.0.0 - - cliui@8.0.1: - dependencies: - string-width: 4.2.3 - strip-ansi: 6.0.1 - wrap-ansi: 7.0.0 - - clone-deep@4.0.1: - dependencies: - is-plain-object: 2.0.4 - kind-of: 6.0.3 - shallow-clone: 3.0.1 - - clone-response@1.0.3: - dependencies: - mimic-response: 1.0.1 - - code-excerpt@4.0.0: - dependencies: - convert-to-spaces: 2.0.1 - - collection-visit@1.0.0: - dependencies: - map-visit: 1.0.0 - object-visit: 1.0.1 - - color-convert@1.9.3: - dependencies: - color-name: 1.1.3 - - color-convert@2.0.1: - dependencies: - color-name: 1.1.4 - - color-name@1.1.3: {} - - color-name@1.1.4: {} - - color-support@1.1.3: {} - - colorette@2.0.20: {} - - colors@1.4.0: {} - - combined-stream@1.0.8: - dependencies: - delayed-stream: 1.0.0 - - command-exists@1.2.9: {} - - command-line-args@5.2.1: - dependencies: - array-back: 3.1.0 - find-replace: 3.0.0 - lodash.camelcase: 4.3.0 - typical: 4.0.0 - - command-line-usage@6.1.3: - dependencies: - array-back: 4.0.2 - chalk: 2.4.2 - table-layout: 1.0.2 - typical: 5.2.0 - - commander@2.20.3: {} - - commander@7.2.0: {} - - commander@8.3.0: {} - - common-path-prefix@3.0.0: {} - - common-tags@1.8.2: {} - - commondir@1.0.1: {} - - component-emitter@1.3.1: {} - - compressible@2.0.18: - dependencies: - mime-db: 1.53.0 - - compression@1.7.4(supports-color@6.1.0): - dependencies: - accepts: 1.3.8 - bytes: 3.0.0 - compressible: 2.0.18 - debug: 2.6.9(supports-color@6.1.0) - on-headers: 1.0.2 - safe-buffer: 5.1.2 - vary: 1.1.2 - transitivePeerDependencies: - - supports-color - - concat-map@0.0.1: {} - - concat-stream@1.6.2: - dependencies: - buffer-from: 1.1.2 - inherits: 2.0.4 - readable-stream: 2.3.8 - typedarray: 0.0.6 - - concordance@5.0.4: - dependencies: - date-time: 3.1.0 - esutils: 2.0.3 - fast-diff: 1.3.0 - js-string-escape: 1.0.1 - lodash: 4.17.21 - md5-hex: 3.0.1 - semver: 7.6.3 - well-known-symbols: 2.0.0 - - concurrently@9.0.1: - dependencies: - chalk: 4.1.2 - lodash: 4.17.21 - rxjs: 7.8.1 - shell-quote: 1.8.1 - supports-color: 8.1.1 - tree-kill: 1.2.2 - yargs: 17.7.2 - - connect-history-api-fallback@1.6.0: {} - - connect@3.7.0: - dependencies: - debug: 2.6.9(supports-color@6.1.0) - finalhandler: 1.1.2 - parseurl: 1.3.3 - utils-merge: 1.0.1 - transitivePeerDependencies: - - supports-color - - console-control-strings@1.1.0: {} - - content-disposition@0.5.4: - dependencies: - safe-buffer: 5.2.1 - - content-hash@2.5.2: - dependencies: - cids: 0.7.5 - multicodec: 0.5.7 - multihashes: 0.4.21 - - content-type@1.0.5: {} - - convert-source-map@1.9.0: {} - - convert-source-map@2.0.0: {} - - convert-to-spaces@2.0.1: {} - - cookie-signature@1.0.6: {} - - cookie@0.4.2: {} - - cookie@0.7.1: {} - - copy-descriptor@0.1.1: {} - - core-js-compat@3.38.1: - dependencies: - browserslist: 4.24.2 - - core-util-is@1.0.2: {} - - core-util-is@1.0.3: {} - - cors-gate@1.1.3: {} - - cors@2.8.5: - dependencies: - object-assign: 4.1.1 - vary: 1.1.2 - - cosmiconfig@9.0.0(typescript@5.6.3): - dependencies: - env-paths: 2.2.1 - import-fresh: 3.3.0 - js-yaml: 4.1.0 - parse-json: 5.2.0 - optionalDependencies: - typescript: 5.6.3 - - crc-32@1.2.2: {} - - create-hash@1.2.0: - dependencies: - cipher-base: 1.0.4 - inherits: 2.0.4 - md5.js: 1.3.5 - ripemd160: 2.0.2 - sha.js: 2.4.11 - - create-hmac@1.1.7: - dependencies: - cipher-base: 1.0.4 - create-hash: 1.2.0 - inherits: 2.0.4 - ripemd160: 2.0.2 - safe-buffer: 5.2.1 - sha.js: 2.4.11 - - create-require@1.1.1: {} - - cross-fetch@3.1.8: - dependencies: - node-fetch: 2.7.0 - transitivePeerDependencies: - - encoding - - cross-fetch@4.0.0: - dependencies: - node-fetch: 2.7.0 - transitivePeerDependencies: - - encoding - - cross-spawn@5.1.0: - dependencies: - lru-cache: 4.1.5 - shebang-command: 1.2.0 - which: 1.3.1 - - cross-spawn@6.0.5: - dependencies: - nice-try: 1.0.5 - path-key: 2.0.1 - semver: 5.7.2 - shebang-command: 1.2.0 - which: 1.3.1 - - cross-spawn@7.0.3: - dependencies: - path-key: 3.1.1 - shebang-command: 2.0.0 - which: 2.0.2 - - crypt@0.0.2: {} - - css-select@4.3.0: - dependencies: - boolbase: 1.0.0 - css-what: 6.1.0 - domhandler: 4.3.1 - domutils: 2.8.0 - nth-check: 2.1.1 - - css-what@6.1.0: {} - - currently-unhandled@0.4.1: - dependencies: - array-find-index: 1.0.2 - - d@1.0.2: - dependencies: - es5-ext: 0.10.64 - type: 2.7.3 - - dashdash@1.14.1: - dependencies: - assert-plus: 1.0.0 - - data-uri-to-buffer@6.0.2: {} - - data-view-buffer@1.0.1: - dependencies: - call-bind: 1.0.7 - es-errors: 1.3.0 - is-data-view: 1.0.1 - - data-view-byte-length@1.0.1: - dependencies: - call-bind: 1.0.7 - es-errors: 1.3.0 - is-data-view: 1.0.1 - - data-view-byte-offset@1.0.0: - dependencies: - call-bind: 1.0.7 - es-errors: 1.3.0 - is-data-view: 1.0.1 - - dataloader@1.4.0: {} - - dataloader@2.2.2: {} - - date-time@3.1.0: - dependencies: - time-zone: 1.0.0 - - death@1.1.0: {} - - debug@2.6.9(supports-color@6.1.0): - dependencies: - ms: 2.0.0 - optionalDependencies: - supports-color: 6.1.0 - - debug@3.2.7(supports-color@6.1.0): - dependencies: - ms: 2.1.3 - optionalDependencies: - supports-color: 6.1.0 - - debug@4.3.7(supports-color@6.1.0): - dependencies: - ms: 2.1.3 - optionalDependencies: - supports-color: 6.1.0 - - debug@4.3.7(supports-color@8.1.1): - dependencies: - ms: 2.1.3 - optionalDependencies: - supports-color: 8.1.1 - - debug@4.4.0(supports-color@8.1.1): - dependencies: - ms: 2.1.3 - optionalDependencies: - supports-color: 8.1.1 - - decamelize@1.2.0: {} - - decamelize@4.0.0: {} - - decode-uri-component@0.2.2: {} - - decompress-response@3.3.0: - dependencies: - mimic-response: 1.0.1 - - decompress-response@6.0.0: - dependencies: - mimic-response: 3.1.0 - - deep-eql@4.1.4: - dependencies: - type-detect: 4.1.0 - - deep-equal@1.1.2: - dependencies: - is-arguments: 1.1.1 - is-date-object: 1.0.5 - is-regex: 1.1.4 - object-is: 1.1.6 - object-keys: 1.1.1 - regexp.prototype.flags: 1.5.3 - - deep-extend@0.6.0: {} - - deep-is@0.1.4: {} - - deepmerge@4.3.1: {} - - default-gateway@4.2.0: - dependencies: - execa: 1.0.0 - ip-regex: 2.1.0 - - default-require-extensions@3.0.1: - dependencies: - strip-bom: 4.0.0 - - defer-to-connect@2.0.1: {} - - define-data-property@1.1.4: - dependencies: - es-define-property: 1.0.0 - es-errors: 1.3.0 - gopd: 1.0.1 - - define-properties@1.2.1: - dependencies: - define-data-property: 1.1.4 - has-property-descriptors: 1.0.2 - object-keys: 1.1.1 - - define-property@0.2.5: - dependencies: - is-descriptor: 0.1.7 - - define-property@1.0.0: - dependencies: - is-descriptor: 1.0.3 - - define-property@2.0.2: - dependencies: - is-descriptor: 1.0.3 - isobject: 3.0.1 - - degenerator@5.0.1: - dependencies: - ast-types: 0.13.4 - escodegen: 2.1.0 - esprima: 4.0.1 - - del@4.1.1: - dependencies: - '@types/glob': 7.2.0 - globby: 6.1.0 - is-path-cwd: 2.2.0 - is-path-in-cwd: 2.1.0 - p-map: 2.1.0 - pify: 4.0.1 - rimraf: 2.7.1 - - delayed-stream@1.0.0: {} - - delegates@1.0.0: {} - - depd@1.1.2: {} - - depd@2.0.0: {} - - destroy@1.2.0: {} - - destroyable-server@1.0.2: - dependencies: - '@types/node': 22.7.9 - - detect-indent@6.1.0: {} - - detect-libc@2.0.3: {} - - detect-node@2.1.0: {} - - devtools-protocol@0.0.1367902: {} - - diff@4.0.2: {} - - diff@5.2.0: {} - - difflib@0.2.4: - dependencies: - heap: 0.2.7 - - dir-glob@3.0.1: - dependencies: - path-type: 4.0.0 - - dns-equal@1.0.0: {} - - dns-packet@1.3.4: - dependencies: - ip: 1.1.9 - safe-buffer: 5.2.1 - - dns-txt@2.0.2: - dependencies: - buffer-indexof: 1.1.1 - - doctrine@2.1.0: - dependencies: - esutils: 2.0.3 - - doctrine@3.0.0: - dependencies: - esutils: 2.0.3 - - dom-converter@0.2.0: - dependencies: - utila: 0.4.0 - - dom-serializer@1.4.1: - dependencies: - domelementtype: 2.3.0 - domhandler: 4.3.1 - entities: 2.2.0 - - dom-walk@0.1.2: {} - - domelementtype@2.3.0: {} - - domexception@1.0.1: - dependencies: - webidl-conversions: 4.0.2 - - domhandler@4.3.1: - dependencies: - domelementtype: 2.3.0 - - domutils@2.8.0: - dependencies: - dom-serializer: 1.4.1 - domelementtype: 2.3.0 - domhandler: 4.3.1 - - dot-case@3.0.4: - dependencies: - no-case: 3.0.4 - tslib: 2.8.0 - - dotenv@16.4.5: {} - - dotenv@8.6.0: {} - - dunder-proto@1.0.1: - dependencies: - call-bind-apply-helpers: 1.0.2 - es-errors: 1.3.0 - gopd: 1.2.0 - - duplexify@3.7.1: - dependencies: - end-of-stream: 1.4.4 - inherits: 2.0.4 - readable-stream: 2.3.8 - stream-shift: 1.0.3 - - eastasianwidth@0.2.0: {} - - ecc-jsbn@0.1.2: - dependencies: - jsbn: 0.1.1 - safer-buffer: 2.1.2 - - ee-first@1.1.1: {} - - electron-to-chromium@1.5.45: {} - - elliptic@6.5.4: - dependencies: - bn.js: 4.12.0 - brorand: 1.1.0 - hash.js: 1.1.7 - hmac-drbg: 1.0.1 - inherits: 2.0.4 - minimalistic-assert: 1.0.1 - minimalistic-crypto-utils: 1.0.1 - - elliptic@6.5.7: - dependencies: - bn.js: 4.12.0 - brorand: 1.1.0 - hash.js: 1.1.7 - hmac-drbg: 1.0.1 - inherits: 2.0.4 - minimalistic-assert: 1.0.1 - minimalistic-crypto-utils: 1.0.1 - - elliptic@6.6.1: - dependencies: - bn.js: 4.12.1 - brorand: 1.1.0 - hash.js: 1.1.7 - hmac-drbg: 1.0.1 - inherits: 2.0.4 - minimalistic-assert: 1.0.1 - minimalistic-crypto-utils: 1.0.1 - - emittery@0.10.0: {} - - emittery@1.0.3: {} - - emoji-regex@10.4.0: {} - - emoji-regex@7.0.3: {} - - emoji-regex@8.0.0: {} - - emoji-regex@9.2.2: {} - - encodeurl@1.0.2: {} - - encodeurl@2.0.0: {} - - end-of-stream@1.4.4: - dependencies: - once: 1.4.0 - - enhanced-resolve@5.17.1: - dependencies: - graceful-fs: 4.2.11 - tapable: 2.2.1 - - enquirer@2.4.1: - dependencies: - ansi-colors: 4.1.3 - strip-ansi: 6.0.1 - - entities@2.2.0: {} - - env-paths@2.2.1: {} - - envinfo@7.14.0: {} - - errno@0.1.8: - dependencies: - prr: 1.0.1 - - error-ex@1.3.2: - dependencies: - is-arrayish: 0.2.1 - - es-abstract@1.23.3: - dependencies: - array-buffer-byte-length: 1.0.1 - arraybuffer.prototype.slice: 1.0.3 - available-typed-arrays: 1.0.7 - call-bind: 1.0.7 - data-view-buffer: 1.0.1 - data-view-byte-length: 1.0.1 - data-view-byte-offset: 1.0.0 - es-define-property: 1.0.0 - es-errors: 1.3.0 - es-object-atoms: 1.0.0 - es-set-tostringtag: 2.0.3 - es-to-primitive: 1.2.1 - function.prototype.name: 1.1.6 - get-intrinsic: 1.2.4 - get-symbol-description: 1.0.2 - globalthis: 1.0.4 - gopd: 1.0.1 - has-property-descriptors: 1.0.2 - has-proto: 1.0.3 - has-symbols: 1.0.3 - hasown: 2.0.2 - internal-slot: 1.0.7 - is-array-buffer: 3.0.4 - is-callable: 1.2.7 - is-data-view: 1.0.1 - is-negative-zero: 2.0.3 - is-regex: 1.1.4 - is-shared-array-buffer: 1.0.3 - is-string: 1.0.7 - is-typed-array: 1.1.13 - is-weakref: 1.0.2 - object-inspect: 1.13.2 - object-keys: 1.1.1 - object.assign: 4.1.5 - regexp.prototype.flags: 1.5.3 - safe-array-concat: 1.1.2 - safe-regex-test: 1.0.3 - string.prototype.trim: 1.2.9 - string.prototype.trimend: 1.0.8 - string.prototype.trimstart: 1.0.8 - typed-array-buffer: 1.0.2 - typed-array-byte-length: 1.0.1 - typed-array-byte-offset: 1.0.2 - typed-array-length: 1.0.6 - unbox-primitive: 1.0.2 - which-typed-array: 1.1.15 - - es-define-property@1.0.0: - dependencies: - get-intrinsic: 1.2.4 - - es-define-property@1.0.1: {} - - es-errors@1.3.0: {} - - es-module-lexer@1.5.4: {} - - es-object-atoms@1.0.0: - dependencies: - es-errors: 1.3.0 - - es-object-atoms@1.1.1: - dependencies: - es-errors: 1.3.0 - - es-set-tostringtag@2.0.3: - dependencies: - get-intrinsic: 1.2.4 - has-tostringtag: 1.0.2 - hasown: 2.0.2 - - es-set-tostringtag@2.1.0: - dependencies: - es-errors: 1.3.0 - get-intrinsic: 1.3.0 - has-tostringtag: 1.0.2 - hasown: 2.0.2 - - es-shim-unscopables@1.0.2: - dependencies: - hasown: 2.0.2 - - es-to-primitive@1.2.1: - dependencies: - is-callable: 1.2.7 - is-date-object: 1.0.5 - is-symbol: 1.0.4 - - es5-ext@0.10.64: - dependencies: - es6-iterator: 2.0.3 - es6-symbol: 3.1.4 - esniff: 2.0.1 - next-tick: 1.1.0 - - es6-error@4.1.1: {} - - es6-iterator@2.0.3: - dependencies: - d: 1.0.2 - es5-ext: 0.10.64 - es6-symbol: 3.1.4 - - es6-promise@4.2.8: {} - - es6-symbol@3.1.4: - dependencies: - d: 1.0.2 - ext: 1.7.0 - - esbuild@0.23.1: - optionalDependencies: - '@esbuild/aix-ppc64': 0.23.1 - '@esbuild/android-arm': 0.23.1 - '@esbuild/android-arm64': 0.23.1 - '@esbuild/android-x64': 0.23.1 - '@esbuild/darwin-arm64': 0.23.1 - '@esbuild/darwin-x64': 0.23.1 - '@esbuild/freebsd-arm64': 0.23.1 - '@esbuild/freebsd-x64': 0.23.1 - '@esbuild/linux-arm': 0.23.1 - '@esbuild/linux-arm64': 0.23.1 - '@esbuild/linux-ia32': 0.23.1 - '@esbuild/linux-loong64': 0.23.1 - '@esbuild/linux-mips64el': 0.23.1 - '@esbuild/linux-ppc64': 0.23.1 - '@esbuild/linux-riscv64': 0.23.1 - '@esbuild/linux-s390x': 0.23.1 - '@esbuild/linux-x64': 0.23.1 - '@esbuild/netbsd-x64': 0.23.1 - '@esbuild/openbsd-arm64': 0.23.1 - '@esbuild/openbsd-x64': 0.23.1 - '@esbuild/sunos-x64': 0.23.1 - '@esbuild/win32-arm64': 0.23.1 - '@esbuild/win32-ia32': 0.23.1 - '@esbuild/win32-x64': 0.23.1 - - escalade@3.2.0: {} - - escape-html@1.0.3: {} - - escape-string-regexp@1.0.5: {} - - escape-string-regexp@2.0.0: {} - - escape-string-regexp@4.0.0: {} - - escape-string-regexp@5.0.0: {} - - escodegen@1.8.1: - dependencies: - esprima: 2.7.3 - estraverse: 1.9.3 - esutils: 2.0.3 - optionator: 0.8.3 - optionalDependencies: - source-map: 0.2.0 - - escodegen@2.1.0: - dependencies: - esprima: 4.0.1 - estraverse: 5.3.0 - esutils: 2.0.3 - optionalDependencies: - source-map: 0.6.1 - - eslint-config-prettier@9.1.0(eslint@8.57.1): - dependencies: - eslint: 8.57.1 - - eslint-import-resolver-node@0.3.9: - dependencies: - debug: 3.2.7(supports-color@6.1.0) - is-core-module: 2.15.1 - resolve: 1.22.8 - transitivePeerDependencies: - - supports-color - - eslint-module-utils@2.12.0(@typescript-eslint/parser@8.11.0(eslint@8.57.1)(typescript@5.6.3))(eslint-import-resolver-node@0.3.9)(eslint@8.57.1): - dependencies: - debug: 3.2.7(supports-color@6.1.0) - optionalDependencies: - '@typescript-eslint/parser': 8.11.0(eslint@8.57.1)(typescript@5.6.3) - eslint: 8.57.1 - eslint-import-resolver-node: 0.3.9 - transitivePeerDependencies: - - supports-color - - eslint-plugin-import@2.31.0(@typescript-eslint/parser@8.11.0(eslint@8.57.1)(typescript@5.6.3))(eslint@8.57.1): - dependencies: - '@rtsao/scc': 1.1.0 - array-includes: 3.1.8 - array.prototype.findlastindex: 1.2.5 - array.prototype.flat: 1.3.2 - array.prototype.flatmap: 1.3.2 - debug: 3.2.7(supports-color@6.1.0) - doctrine: 2.1.0 - eslint: 8.57.1 - eslint-import-resolver-node: 0.3.9 - eslint-module-utils: 2.12.0(@typescript-eslint/parser@8.11.0(eslint@8.57.1)(typescript@5.6.3))(eslint-import-resolver-node@0.3.9)(eslint@8.57.1) - hasown: 2.0.2 - is-core-module: 2.15.1 - is-glob: 4.0.3 - minimatch: 3.1.2 - object.fromentries: 2.0.8 - object.groupby: 1.0.3 - object.values: 1.2.0 - semver: 6.3.1 - string.prototype.trimend: 1.0.8 - tsconfig-paths: 3.15.0 - optionalDependencies: - '@typescript-eslint/parser': 8.11.0(eslint@8.57.1)(typescript@5.6.3) - transitivePeerDependencies: - - eslint-import-resolver-typescript - - eslint-import-resolver-webpack - - supports-color - - eslint-plugin-prettier@5.2.1(eslint-config-prettier@9.1.0(eslint@8.57.1))(eslint@8.57.1)(prettier@3.3.3): - dependencies: - eslint: 8.57.1 - prettier: 3.3.3 - prettier-linter-helpers: 1.0.0 - synckit: 0.9.2 - optionalDependencies: - eslint-config-prettier: 9.1.0(eslint@8.57.1) - - eslint-scope@5.1.1: - dependencies: - esrecurse: 4.3.0 - estraverse: 4.3.0 - - eslint-scope@7.2.2: - dependencies: - esrecurse: 4.3.0 - estraverse: 5.3.0 - - eslint-visitor-keys@3.4.3: {} - - eslint@8.57.1: - dependencies: - '@eslint-community/eslint-utils': 4.4.0(eslint@8.57.1) - '@eslint-community/regexpp': 4.11.1 - '@eslint/eslintrc': 2.1.4 - '@eslint/js': 8.57.1 - '@humanwhocodes/config-array': 0.13.0 - '@humanwhocodes/module-importer': 1.0.1 - '@nodelib/fs.walk': 1.2.8 - '@ungap/structured-clone': 1.2.0 - ajv: 6.12.6 - chalk: 4.1.2 - cross-spawn: 7.0.3 - debug: 4.3.7(supports-color@6.1.0) - doctrine: 3.0.0 - escape-string-regexp: 4.0.0 - eslint-scope: 7.2.2 - eslint-visitor-keys: 3.4.3 - espree: 9.6.1 - esquery: 1.6.0 - esutils: 2.0.3 - fast-deep-equal: 3.1.3 - file-entry-cache: 6.0.1 - find-up: 5.0.0 - glob-parent: 6.0.2 - globals: 13.24.0 - graphemer: 1.4.0 - ignore: 5.3.2 - imurmurhash: 0.1.4 - is-glob: 4.0.3 - is-path-inside: 3.0.3 - js-yaml: 4.1.0 - json-stable-stringify-without-jsonify: 1.0.1 - levn: 0.4.1 - lodash.merge: 4.6.2 - minimatch: 3.1.2 - natural-compare: 1.4.0 - optionator: 0.9.4 - strip-ansi: 6.0.1 - text-table: 0.2.0 - transitivePeerDependencies: - - supports-color - - esniff@2.0.1: - dependencies: - d: 1.0.2 - es5-ext: 0.10.64 - event-emitter: 0.3.5 - type: 2.7.3 - - espree@9.6.1: - dependencies: - acorn: 8.13.0 - acorn-jsx: 5.3.2(acorn@8.13.0) - eslint-visitor-keys: 3.4.3 - - esprima@2.7.3: {} - - esprima@4.0.1: {} - - esquery@1.6.0: - dependencies: - estraverse: 5.3.0 - - esrecurse@4.3.0: - dependencies: - estraverse: 5.3.0 - - estraverse@1.9.3: {} - - estraverse@4.3.0: {} - - estraverse@5.3.0: {} - - estree-walker@1.0.1: {} - - estree-walker@2.0.2: {} - - esutils@2.0.3: {} - - etag@1.8.1: {} - - eth-ens-namehash@2.0.8: - dependencies: - idna-uts46-hx: 2.3.1 - js-sha3: 0.5.7 - - eth-gas-reporter@0.2.27(bufferutil@4.0.8)(utf-8-validate@5.0.10): - dependencies: - '@solidity-parser/parser': 0.14.5 - axios: 1.8.3 - cli-table3: 0.5.1 - colors: 1.4.0 - ethereum-cryptography: 1.2.0 - ethers: 5.8.0(bufferutil@4.0.8)(utf-8-validate@5.0.10) - fs-readdir-recursive: 1.1.0 - lodash: 4.17.21 - markdown-table: 1.1.3 - mocha: 10.8.2 - req-cwd: 2.0.0 - sha1: 1.1.1 - sync-request: 6.1.0 - transitivePeerDependencies: - - bufferutil - - debug - - utf-8-validate - - eth-lib@0.1.29(bufferutil@4.0.8)(utf-8-validate@5.0.10): - dependencies: - bn.js: 4.12.0 - elliptic: 6.5.7 - nano-json-stream-parser: 0.1.2 - servify: 0.1.12 - ws: 3.3.3(bufferutil@4.0.8)(utf-8-validate@5.0.10) - xhr-request-promise: 0.1.3 - transitivePeerDependencies: - - bufferutil - - supports-color - - utf-8-validate - - eth-lib@0.2.8: - dependencies: - bn.js: 4.12.0 - elliptic: 6.5.7 - xhr-request-promise: 0.1.3 - - ethereum-bloom-filters@1.2.0: - dependencies: - '@noble/hashes': 1.5.0 - - ethereum-cryptography@0.1.3: - dependencies: - '@types/pbkdf2': 3.1.2 - '@types/secp256k1': 4.0.6 - blakejs: 1.2.1 - browserify-aes: 1.2.0 - bs58check: 2.1.2 - create-hash: 1.2.0 - create-hmac: 1.1.7 - hash.js: 1.1.7 - keccak: 3.0.4 - pbkdf2: 3.1.2 - randombytes: 2.1.0 - safe-buffer: 5.2.1 - scrypt-js: 3.0.1 - secp256k1: 4.0.4 - setimmediate: 1.0.5 - - ethereum-cryptography@1.2.0: - dependencies: - '@noble/hashes': 1.2.0 - '@noble/secp256k1': 1.7.1 - '@scure/bip32': 1.1.5 - '@scure/bip39': 1.1.1 - - ethereum-cryptography@2.2.1: - dependencies: - '@noble/curves': 1.4.2 - '@noble/hashes': 1.4.0 - '@scure/bip32': 1.4.0 - '@scure/bip39': 1.3.0 - - ethereumjs-abi@0.6.8: - dependencies: - bn.js: 4.12.0 - ethereumjs-util: 6.2.1 - - ethereumjs-util@6.2.1: - dependencies: - '@types/bn.js': 4.11.6 - bn.js: 4.12.0 - create-hash: 1.2.0 - elliptic: 6.5.7 - ethereum-cryptography: 0.1.3 - ethjs-util: 0.1.6 - rlp: 2.2.7 - - ethereumjs-util@7.1.5: - dependencies: - '@types/bn.js': 5.1.6 - bn.js: 5.2.1 - create-hash: 1.2.0 - ethereum-cryptography: 0.1.3 - rlp: 2.2.7 - - ethers@5.8.0(bufferutil@4.0.8)(utf-8-validate@5.0.10): - dependencies: - '@ethersproject/abi': 5.8.0 - '@ethersproject/abstract-provider': 5.8.0 - '@ethersproject/abstract-signer': 5.8.0 - '@ethersproject/address': 5.8.0 - '@ethersproject/base64': 5.8.0 - '@ethersproject/basex': 5.8.0 - '@ethersproject/bignumber': 5.8.0 - '@ethersproject/bytes': 5.8.0 - '@ethersproject/constants': 5.8.0 - '@ethersproject/contracts': 5.8.0 - '@ethersproject/hash': 5.8.0 - '@ethersproject/hdnode': 5.8.0 - '@ethersproject/json-wallets': 5.8.0 - '@ethersproject/keccak256': 5.8.0 - '@ethersproject/logger': 5.8.0 - '@ethersproject/networks': 5.8.0 - '@ethersproject/pbkdf2': 5.8.0 - '@ethersproject/properties': 5.8.0 - '@ethersproject/providers': 5.8.0(bufferutil@4.0.8)(utf-8-validate@5.0.10) - '@ethersproject/random': 5.8.0 - '@ethersproject/rlp': 5.8.0 - '@ethersproject/sha2': 5.8.0 - '@ethersproject/signing-key': 5.8.0 - '@ethersproject/solidity': 5.8.0 - '@ethersproject/strings': 5.8.0 - '@ethersproject/transactions': 5.8.0 - '@ethersproject/units': 5.8.0 - '@ethersproject/wallet': 5.8.0 - '@ethersproject/web': 5.8.0 - '@ethersproject/wordlists': 5.8.0 - transitivePeerDependencies: - - bufferutil - - utf-8-validate - - ethers@6.13.4(bufferutil@4.0.8)(utf-8-validate@5.0.10): - dependencies: - '@adraffy/ens-normalize': 1.10.1 - '@noble/curves': 1.2.0 - '@noble/hashes': 1.3.2 - '@types/node': 22.7.5 - aes-js: 4.0.0-beta.5 - tslib: 2.7.0 - ws: 8.17.1(bufferutil@4.0.8)(utf-8-validate@5.0.10) - transitivePeerDependencies: - - bufferutil - - utf-8-validate - - ethers@6.13.4(bufferutil@4.0.8)(utf-8-validate@6.0.3): - dependencies: - '@adraffy/ens-normalize': 1.10.1 - '@noble/curves': 1.2.0 - '@noble/hashes': 1.3.2 - '@types/node': 22.7.5 - aes-js: 4.0.0-beta.5 - tslib: 2.7.0 - ws: 8.17.1(bufferutil@4.0.8)(utf-8-validate@6.0.3) - transitivePeerDependencies: - - bufferutil - - utf-8-validate - - ethjs-unit@0.1.6: - dependencies: - bn.js: 4.11.6 - number-to-bn: 1.7.0 - - ethjs-util@0.1.6: - dependencies: - is-hex-prefixed: 1.0.0 - strip-hex-prefix: 1.0.0 - - event-emitter@0.3.5: - dependencies: - d: 1.0.2 - es5-ext: 0.10.64 - - eventemitter2@6.4.9: {} - - eventemitter3@3.1.2: {} - - eventemitter3@4.0.4: {} - - eventemitter3@4.0.7: {} - - events@3.3.0: {} - - eventsource@2.0.2: {} - - evp_bytestokey@1.0.3: - dependencies: - md5.js: 1.3.5 - safe-buffer: 5.2.1 - - execa@1.0.0: - dependencies: - cross-spawn: 6.0.5 - get-stream: 4.1.0 - is-stream: 1.1.0 - npm-run-path: 2.0.2 - p-finally: 1.0.0 - signal-exit: 3.0.7 - strip-eof: 1.0.0 - - expand-brackets@2.1.4(supports-color@6.1.0): - dependencies: - debug: 2.6.9(supports-color@6.1.0) - define-property: 0.2.5 - extend-shallow: 2.0.1 - posix-character-classes: 0.1.1 - regex-not: 1.0.2 - snapdragon: 0.8.2(supports-color@6.1.0) - to-regex: 3.0.2 - transitivePeerDependencies: - - supports-color - - express@4.21.1(supports-color@6.1.0): - dependencies: - accepts: 1.3.8 - array-flatten: 1.1.1 - body-parser: 1.20.3(supports-color@6.1.0) - content-disposition: 0.5.4 - content-type: 1.0.5 - cookie: 0.7.1 - cookie-signature: 1.0.6 - debug: 2.6.9(supports-color@6.1.0) - depd: 2.0.0 - encodeurl: 2.0.0 - escape-html: 1.0.3 - etag: 1.8.1 - finalhandler: 1.3.1(supports-color@6.1.0) - fresh: 0.5.2 - http-errors: 2.0.0 - merge-descriptors: 1.0.3 - methods: 1.1.2 - on-finished: 2.4.1 - parseurl: 1.3.3 - path-to-regexp: 0.1.10 - proxy-addr: 2.0.7 - qs: 6.13.0 - range-parser: 1.2.1 - safe-buffer: 5.2.1 - send: 0.19.0(supports-color@6.1.0) - serve-static: 1.16.2(supports-color@6.1.0) - setprototypeof: 1.2.0 - statuses: 2.0.1 - type-is: 1.6.18 - utils-merge: 1.0.1 - vary: 1.1.2 - transitivePeerDependencies: - - supports-color - - ext@1.7.0: - dependencies: - type: 2.7.3 - - extend-shallow@2.0.1: - dependencies: - is-extendable: 0.1.1 - - extend-shallow@3.0.2: - dependencies: - assign-symbols: 1.0.0 - is-extendable: 1.0.1 - - extend@3.0.2: {} - - extendable-error@0.1.7: {} - - external-editor@3.1.0: - dependencies: - chardet: 0.7.0 - iconv-lite: 0.4.24 - tmp: 0.0.33 - - extglob@2.0.4(supports-color@6.1.0): - dependencies: - array-unique: 0.3.2 - define-property: 1.0.0 - expand-brackets: 2.1.4(supports-color@6.1.0) - extend-shallow: 2.0.1 - fragment-cache: 0.2.1 - regex-not: 1.0.2 - snapdragon: 0.8.2(supports-color@6.1.0) - to-regex: 3.0.2 - transitivePeerDependencies: - - supports-color - - extract-zip@2.0.1: - dependencies: - debug: 4.4.0(supports-color@8.1.1) - get-stream: 5.2.0 - yauzl: 2.10.0 - optionalDependencies: - '@types/yauzl': 2.10.3 - transitivePeerDependencies: - - supports-color - - extsprintf@1.3.0: {} - - fake-indexeddb@4.0.2: - dependencies: - realistic-structured-clone: 3.0.0 - - fast-deep-equal@2.0.1: {} - - fast-deep-equal@3.1.3: {} - - fast-diff@1.3.0: {} - - fast-fifo@1.3.2: {} - - fast-glob@3.3.2: - dependencies: - '@nodelib/fs.stat': 2.0.5 - '@nodelib/fs.walk': 1.2.8 - glob-parent: 5.1.2 - merge2: 1.4.1 - micromatch: 4.0.8 - - fast-glob@3.3.3: - dependencies: - '@nodelib/fs.stat': 2.0.5 - '@nodelib/fs.walk': 1.2.8 - glob-parent: 5.1.2 - merge2: 1.4.1 - micromatch: 4.0.8 - - fast-json-patch@3.1.1: {} - - fast-json-stable-stringify@2.1.0: {} - - fast-levenshtein@2.0.6: {} - - fast-uri@3.0.3: {} - - fast-xml-parser@4.4.1: - dependencies: - strnum: 1.0.5 - - fastest-levenshtein@1.0.16: {} - - fastq@1.17.1: - dependencies: - reusify: 1.0.4 - - faye-websocket@0.11.4: - dependencies: - websocket-driver: 0.7.4 - - fd-slicer@1.1.0: - dependencies: - pend: 1.2.0 - - figures@6.1.0: - dependencies: - is-unicode-supported: 2.1.0 - - file-entry-cache@6.0.1: - dependencies: - flat-cache: 3.2.0 - - file-uri-to-path@1.0.0: {} - - fill-range@4.0.0: - dependencies: - extend-shallow: 2.0.1 - is-number: 3.0.0 - repeat-string: 1.6.1 - to-regex-range: 2.1.1 - - fill-range@7.1.1: - dependencies: - to-regex-range: 5.0.1 - - finalhandler@1.1.2: - dependencies: - debug: 2.6.9(supports-color@6.1.0) - encodeurl: 1.0.2 - escape-html: 1.0.3 - on-finished: 2.3.0 - parseurl: 1.3.3 - statuses: 1.5.0 - unpipe: 1.0.0 - transitivePeerDependencies: - - supports-color - - finalhandler@1.3.1(supports-color@6.1.0): - dependencies: - debug: 2.6.9(supports-color@6.1.0) - encodeurl: 2.0.0 - escape-html: 1.0.3 - on-finished: 2.4.1 - parseurl: 1.3.3 - statuses: 2.0.1 - unpipe: 1.0.0 - transitivePeerDependencies: - - supports-color - - find-cache-dir@3.3.2: - dependencies: - commondir: 1.0.1 - make-dir: 3.1.0 - pkg-dir: 4.2.0 - - find-cache-dir@4.0.0: - dependencies: - common-path-prefix: 3.0.0 - pkg-dir: 7.0.0 - - find-replace@3.0.0: - dependencies: - array-back: 3.1.0 - - find-up-simple@1.0.0: {} - - find-up@2.1.0: - dependencies: - locate-path: 2.0.0 - - find-up@3.0.0: - dependencies: - locate-path: 3.0.0 - - find-up@4.1.0: - dependencies: - locate-path: 5.0.0 - path-exists: 4.0.0 - - find-up@5.0.0: - dependencies: - locate-path: 6.0.0 - path-exists: 4.0.0 - - find-up@6.3.0: - dependencies: - locate-path: 7.2.0 - path-exists: 5.0.0 - - flat-cache@3.2.0: - dependencies: - flatted: 3.3.1 - keyv: 4.5.4 - rimraf: 3.0.2 - - flat@5.0.2: {} - - flatted@3.3.1: {} - - follow-redirects@1.15.9(debug@4.3.7(supports-color@6.1.0)): - optionalDependencies: - debug: 4.3.7(supports-color@6.1.0) - - follow-redirects@1.15.9(debug@4.3.7): - optionalDependencies: - debug: 4.3.7(supports-color@6.1.0) - - for-each@0.3.3: - dependencies: - is-callable: 1.2.7 - - for-in@1.0.2: {} - - foreground-child@2.0.0: - dependencies: - cross-spawn: 7.0.3 - signal-exit: 3.0.7 - - foreground-child@3.3.0: - dependencies: - cross-spawn: 7.0.3 - signal-exit: 4.1.0 - - forever-agent@0.6.1: {} - - form-data-encoder@1.7.1: {} - - form-data@2.3.3: - dependencies: - asynckit: 0.4.0 - combined-stream: 1.0.8 - mime-types: 2.1.35 - - form-data@2.5.3: - dependencies: - asynckit: 0.4.0 - combined-stream: 1.0.8 - es-set-tostringtag: 2.1.0 - mime-types: 2.1.35 - safe-buffer: 5.2.1 - - form-data@4.0.1: - dependencies: - asynckit: 0.4.0 - combined-stream: 1.0.8 - mime-types: 2.1.35 - - form-data@4.0.2: - dependencies: - asynckit: 0.4.0 - combined-stream: 1.0.8 - es-set-tostringtag: 2.1.0 - mime-types: 2.1.35 - - forwarded@0.2.0: {} - - fp-ts@1.19.3: {} - - fragment-cache@0.2.1: - dependencies: - map-cache: 0.2.2 - - fresh@0.5.2: {} - - fromentries@1.3.2: {} - - fs-extra@10.1.0: - dependencies: - graceful-fs: 4.2.11 - jsonfile: 6.1.0 - universalify: 2.0.1 - - fs-extra@11.2.0: - dependencies: - graceful-fs: 4.2.11 - jsonfile: 6.1.0 - universalify: 2.0.1 - - fs-extra@4.0.3: - dependencies: - graceful-fs: 4.2.11 - jsonfile: 4.0.0 - universalify: 0.1.2 - - fs-extra@7.0.1: - dependencies: - graceful-fs: 4.2.11 - jsonfile: 4.0.0 - universalify: 0.1.2 - - fs-extra@8.1.0: - dependencies: - graceful-fs: 4.2.11 - jsonfile: 4.0.0 - universalify: 0.1.2 - - fs-extra@9.1.0: - dependencies: - at-least-node: 1.0.0 - graceful-fs: 4.2.11 - jsonfile: 6.1.0 - universalify: 2.0.1 - - fs-minipass@1.2.7: - dependencies: - minipass: 2.9.0 - - fs-minipass@2.1.0: - dependencies: - minipass: 3.3.6 - - fs-readdir-recursive@1.1.0: {} - - fs.realpath@1.0.0: {} - - fsevents@1.2.13: - dependencies: - bindings: 1.5.0 - nan: 2.22.0 - optional: true - - fsevents@2.3.3: - optional: true - - function-bind@1.1.2: {} - - function.prototype.name@1.1.6: - dependencies: - call-bind: 1.0.7 - define-properties: 1.2.1 - es-abstract: 1.23.3 - functions-have-names: 1.2.3 - - functions-have-names@1.2.3: {} - - ganache@7.9.2: - dependencies: - '@trufflesuite/uws-js-unofficial': 20.30.0-unofficial.0 - '@types/bn.js': 5.1.6 - '@types/lru-cache': 5.1.1 - '@types/seedrandom': 3.0.1 - abstract-level: 1.0.3 - abstract-leveldown: 7.2.0 - async-eventemitter: 0.2.4 - emittery: 0.10.0 - optionalDependencies: - bufferutil: 4.0.8 - utf-8-validate: 5.0.7 - - gauge@3.0.2: - dependencies: - aproba: 2.0.0 - color-support: 1.1.3 - console-control-strings: 1.1.0 - has-unicode: 2.0.1 - object-assign: 4.1.1 - signal-exit: 3.0.7 - string-width: 4.2.3 - strip-ansi: 6.0.1 - wide-align: 1.1.5 - - gensync@1.0.0-beta.2: {} - - get-caller-file@2.0.5: {} - - get-east-asian-width@1.3.0: {} - - get-func-name@2.0.2: {} - - get-intrinsic@1.2.4: - dependencies: - es-errors: 1.3.0 - function-bind: 1.1.2 - has-proto: 1.0.3 - has-symbols: 1.0.3 - hasown: 2.0.2 - - get-intrinsic@1.3.0: - dependencies: - call-bind-apply-helpers: 1.0.2 - es-define-property: 1.0.1 - es-errors: 1.3.0 - es-object-atoms: 1.1.1 - function-bind: 1.1.2 - get-proto: 1.0.1 - gopd: 1.2.0 - has-symbols: 1.1.0 - hasown: 2.0.2 - math-intrinsics: 1.1.0 - - get-package-type@0.1.0: {} - - get-port@3.2.0: {} - - get-proto@1.0.1: - dependencies: - dunder-proto: 1.0.1 - es-object-atoms: 1.1.1 - - get-stream@4.1.0: - dependencies: - pump: 3.0.2 - - get-stream@5.2.0: - dependencies: - pump: 3.0.2 - - get-stream@6.0.1: {} - - get-symbol-description@1.0.2: - dependencies: - call-bind: 1.0.7 - es-errors: 1.3.0 - get-intrinsic: 1.2.4 - - get-tsconfig@4.8.1: - dependencies: - resolve-pkg-maps: 1.0.0 - - get-uri@6.0.3: - dependencies: - basic-ftp: 5.0.5 - data-uri-to-buffer: 6.0.2 - debug: 4.3.7(supports-color@6.1.0) - fs-extra: 11.2.0 - transitivePeerDependencies: - - supports-color - - get-value@2.0.6: {} - - getpass@0.1.7: - dependencies: - assert-plus: 1.0.0 - - ghost-testrpc@0.0.2: - dependencies: - chalk: 2.4.2 - node-emoji: 1.11.0 - - glob-base@0.3.0: - dependencies: - glob-parent: 6.0.2 - is-glob: 2.0.1 - - glob-parent@5.1.2: - dependencies: - is-glob: 4.0.3 - - glob-parent@6.0.2: - dependencies: - is-glob: 4.0.3 - - glob-to-regexp@0.4.1: {} - - glob@11.0.0: - dependencies: - foreground-child: 3.3.0 - jackspeak: 4.0.2 - minimatch: 10.0.1 - minipass: 7.1.2 - package-json-from-dist: 1.0.1 - path-scurry: 2.0.0 - - glob@5.0.15: - dependencies: - inflight: 1.0.6 - inherits: 2.0.4 - minimatch: 3.1.2 - once: 1.4.0 - path-is-absolute: 1.0.1 - - glob@7.1.7: - dependencies: - fs.realpath: 1.0.0 - inflight: 1.0.6 - inherits: 2.0.4 - minimatch: 3.1.2 - once: 1.4.0 - path-is-absolute: 1.0.1 - - glob@7.2.0: - dependencies: - fs.realpath: 1.0.0 - inflight: 1.0.6 - inherits: 2.0.4 - minimatch: 3.1.2 - once: 1.4.0 - path-is-absolute: 1.0.1 - - glob@7.2.3: - dependencies: - fs.realpath: 1.0.0 - inflight: 1.0.6 - inherits: 2.0.4 - minimatch: 3.1.2 - once: 1.4.0 - path-is-absolute: 1.0.1 - - glob@8.1.0: - dependencies: - fs.realpath: 1.0.0 - inflight: 1.0.6 - inherits: 2.0.4 - minimatch: 5.1.6 - once: 1.4.0 - - global-modules@2.0.0: - dependencies: - global-prefix: 3.0.0 - - global-prefix@3.0.0: - dependencies: - ini: 1.3.8 - kind-of: 6.0.3 - which: 1.3.1 - - global@4.4.0: - dependencies: - min-document: 2.19.0 - process: 0.11.10 - - globals@11.12.0: {} - - globals@13.24.0: - dependencies: - type-fest: 0.20.2 - - globalthis@1.0.4: - dependencies: - define-properties: 1.2.1 - gopd: 1.0.1 - - globby@10.0.2: - dependencies: - '@types/glob': 7.2.0 - array-union: 2.1.0 - dir-glob: 3.0.1 - fast-glob: 3.3.3 - glob: 7.2.3 - ignore: 5.3.2 - merge2: 1.4.1 - slash: 3.0.0 - - globby@11.1.0: - dependencies: - array-union: 2.1.0 - dir-glob: 3.0.1 - fast-glob: 3.3.2 - ignore: 5.3.2 - merge2: 1.4.1 - slash: 3.0.0 - - globby@14.0.2: - dependencies: - '@sindresorhus/merge-streams': 2.3.0 - fast-glob: 3.3.2 - ignore: 5.3.2 - path-type: 5.0.0 - slash: 5.1.0 - unicorn-magic: 0.1.0 - - globby@6.1.0: - dependencies: - array-union: 1.0.2 - glob: 7.2.3 - object-assign: 4.1.1 - pify: 2.3.0 - pinkie-promise: 2.0.1 - - gopd@1.0.1: - dependencies: - get-intrinsic: 1.2.4 - - gopd@1.2.0: {} - - got@11.8.6: - dependencies: - '@sindresorhus/is': 4.6.0 - '@szmarczak/http-timer': 4.0.6 - '@types/cacheable-request': 6.0.3 - '@types/responselike': 1.0.3 - cacheable-lookup: 5.0.4 - cacheable-request: 7.0.4 - decompress-response: 6.0.0 - http2-wrapper: 1.0.3 - lowercase-keys: 2.0.0 - p-cancelable: 2.1.1 - responselike: 2.0.1 - - got@12.1.0: - dependencies: - '@sindresorhus/is': 4.6.0 - '@szmarczak/http-timer': 5.0.1 - '@types/cacheable-request': 6.0.3 - '@types/responselike': 1.0.3 - cacheable-lookup: 6.1.0 - cacheable-request: 7.0.4 - decompress-response: 6.0.0 - form-data-encoder: 1.7.1 - get-stream: 6.0.1 - http2-wrapper: 2.2.1 - lowercase-keys: 3.0.0 - p-cancelable: 3.0.0 - responselike: 2.0.1 - - graceful-fs@4.2.11: {} - - graphemer@1.4.0: {} - - graphql-http@1.22.1(graphql@15.9.0): - dependencies: - graphql: 15.9.0 - - graphql-subscriptions@1.2.1(graphql@15.9.0): - dependencies: - graphql: 15.9.0 - iterall: 1.3.0 - - graphql-tag@2.12.6(graphql@15.9.0): - dependencies: - graphql: 15.9.0 - tslib: 2.8.0 - - graphql@15.9.0: {} - - handle-thing@2.0.1: {} - - handlebars@4.7.8: - dependencies: - minimist: 1.2.8 - neo-async: 2.6.2 - source-map: 0.6.1 - wordwrap: 1.0.0 - optionalDependencies: - uglify-js: 3.19.3 - - har-schema@2.0.0: {} - - har-validator@5.1.5: - dependencies: - ajv: 6.12.6 - har-schema: 2.0.0 - - hardhat-gas-reporter@1.0.10(bufferutil@4.0.8)(hardhat@2.22.14(bufferutil@4.0.8)(ts-node@10.9.2(@types/node@22.7.9)(typescript@5.6.3))(typescript@5.6.3)(utf-8-validate@5.0.10))(utf-8-validate@5.0.10): - dependencies: - array-uniq: 1.0.3 - eth-gas-reporter: 0.2.27(bufferutil@4.0.8)(utf-8-validate@5.0.10) - hardhat: 2.22.14(bufferutil@4.0.8)(ts-node@10.9.2(@types/node@22.7.9)(typescript@5.6.3))(typescript@5.6.3)(utf-8-validate@5.0.10) - sha1: 1.1.1 - transitivePeerDependencies: - - '@codechecks/client' - - bufferutil - - debug - - utf-8-validate - - hardhat@2.22.14(bufferutil@4.0.8)(ts-node@10.9.2(@types/node@22.13.10)(typescript@5.6.3))(typescript@5.6.3)(utf-8-validate@5.0.10): - dependencies: - '@ethersproject/abi': 5.7.0 - '@metamask/eth-sig-util': 4.0.1 - '@nomicfoundation/edr': 0.6.4 - '@nomicfoundation/ethereumjs-common': 4.0.4 - '@nomicfoundation/ethereumjs-tx': 5.0.4 - '@nomicfoundation/ethereumjs-util': 9.0.4 - '@nomicfoundation/solidity-analyzer': 0.1.2 - '@sentry/node': 5.30.0 - '@types/bn.js': 5.1.6 - '@types/lru-cache': 5.1.1 - adm-zip: 0.4.16 - aggregate-error: 3.1.0 - ansi-escapes: 4.3.2 - boxen: 5.1.2 - chalk: 2.4.2 - chokidar: 4.0.1 - ci-info: 2.0.0 - debug: 4.3.7(supports-color@6.1.0) - enquirer: 2.4.1 - env-paths: 2.2.1 - ethereum-cryptography: 1.2.0 - ethereumjs-abi: 0.6.8 - find-up: 2.1.0 - fp-ts: 1.19.3 - fs-extra: 7.0.1 - glob: 7.2.0 - immutable: 4.3.7 - io-ts: 1.10.4 - json-stream-stringify: 3.1.6 - keccak: 3.0.4 - lodash: 4.17.21 - mnemonist: 0.38.5 - mocha: 10.7.3 - p-map: 4.0.0 - raw-body: 2.5.2 - resolve: 1.17.0 - semver: 6.3.1 - solc: 0.8.26(debug@4.3.7) - source-map-support: 0.5.21 - stacktrace-parser: 0.1.10 - tsort: 0.0.1 - undici: 5.28.4 - uuid: 8.3.2 - ws: 7.5.10(bufferutil@4.0.8)(utf-8-validate@5.0.10) - optionalDependencies: - ts-node: 10.9.2(@types/node@22.13.10)(typescript@5.6.3) - typescript: 5.6.3 - transitivePeerDependencies: - - bufferutil - - c-kzg - - supports-color - - utf-8-validate - - hardhat@2.22.14(bufferutil@4.0.8)(ts-node@10.9.2(@types/node@22.13.10)(typescript@5.6.3))(typescript@5.6.3)(utf-8-validate@6.0.3): - dependencies: - '@ethersproject/abi': 5.7.0 - '@metamask/eth-sig-util': 4.0.1 - '@nomicfoundation/edr': 0.6.4 - '@nomicfoundation/ethereumjs-common': 4.0.4 - '@nomicfoundation/ethereumjs-tx': 5.0.4 - '@nomicfoundation/ethereumjs-util': 9.0.4 - '@nomicfoundation/solidity-analyzer': 0.1.2 - '@sentry/node': 5.30.0 - '@types/bn.js': 5.1.6 - '@types/lru-cache': 5.1.1 - adm-zip: 0.4.16 - aggregate-error: 3.1.0 - ansi-escapes: 4.3.2 - boxen: 5.1.2 - chalk: 2.4.2 - chokidar: 4.0.1 - ci-info: 2.0.0 - debug: 4.3.7(supports-color@6.1.0) - enquirer: 2.4.1 - env-paths: 2.2.1 - ethereum-cryptography: 1.2.0 - ethereumjs-abi: 0.6.8 - find-up: 2.1.0 - fp-ts: 1.19.3 - fs-extra: 7.0.1 - glob: 7.2.0 - immutable: 4.3.7 - io-ts: 1.10.4 - json-stream-stringify: 3.1.6 - keccak: 3.0.4 - lodash: 4.17.21 - mnemonist: 0.38.5 - mocha: 10.7.3 - p-map: 4.0.0 - raw-body: 2.5.2 - resolve: 1.17.0 - semver: 6.3.1 - solc: 0.8.26(debug@4.3.7) - source-map-support: 0.5.21 - stacktrace-parser: 0.1.10 - tsort: 0.0.1 - undici: 5.28.4 - uuid: 8.3.2 - ws: 7.5.10(bufferutil@4.0.8)(utf-8-validate@6.0.3) - optionalDependencies: - ts-node: 10.9.2(@types/node@22.13.10)(typescript@5.6.3) - typescript: 5.6.3 - transitivePeerDependencies: - - bufferutil - - c-kzg - - supports-color - - utf-8-validate - - hardhat@2.22.14(bufferutil@4.0.8)(ts-node@10.9.2(@types/node@22.7.9)(typescript@5.6.3))(typescript@5.6.3)(utf-8-validate@5.0.10): - dependencies: - '@ethersproject/abi': 5.7.0 - '@metamask/eth-sig-util': 4.0.1 - '@nomicfoundation/edr': 0.6.4 - '@nomicfoundation/ethereumjs-common': 4.0.4 - '@nomicfoundation/ethereumjs-tx': 5.0.4 - '@nomicfoundation/ethereumjs-util': 9.0.4 - '@nomicfoundation/solidity-analyzer': 0.1.2 - '@sentry/node': 5.30.0 - '@types/bn.js': 5.1.6 - '@types/lru-cache': 5.1.1 - adm-zip: 0.4.16 - aggregate-error: 3.1.0 - ansi-escapes: 4.3.2 - boxen: 5.1.2 - chalk: 2.4.2 - chokidar: 4.0.1 - ci-info: 2.0.0 - debug: 4.3.7(supports-color@6.1.0) - enquirer: 2.4.1 - env-paths: 2.2.1 - ethereum-cryptography: 1.2.0 - ethereumjs-abi: 0.6.8 - find-up: 2.1.0 - fp-ts: 1.19.3 - fs-extra: 7.0.1 - glob: 7.2.0 - immutable: 4.3.7 - io-ts: 1.10.4 - json-stream-stringify: 3.1.6 - keccak: 3.0.4 - lodash: 4.17.21 - mnemonist: 0.38.5 - mocha: 10.7.3 - p-map: 4.0.0 - raw-body: 2.5.2 - resolve: 1.17.0 - semver: 6.3.1 - solc: 0.8.26(debug@4.3.7) - source-map-support: 0.5.21 - stacktrace-parser: 0.1.10 - tsort: 0.0.1 - undici: 5.28.4 - uuid: 8.3.2 - ws: 7.5.10(bufferutil@4.0.8)(utf-8-validate@5.0.10) - optionalDependencies: - ts-node: 10.9.2(@types/node@22.7.9)(typescript@5.6.3) - typescript: 5.6.3 - transitivePeerDependencies: - - bufferutil - - c-kzg - - supports-color - - utf-8-validate - - has-bigints@1.0.2: {} - - has-flag@1.0.0: {} - - has-flag@3.0.0: {} - - has-flag@4.0.0: {} - - has-property-descriptors@1.0.2: - dependencies: - es-define-property: 1.0.0 - - has-proto@1.0.3: {} - - has-symbols@1.0.3: {} - - has-symbols@1.1.0: {} - - has-tostringtag@1.0.2: - dependencies: - has-symbols: 1.0.3 - - has-unicode@2.0.1: {} - - has-value@0.3.1: - dependencies: - get-value: 2.0.6 - has-values: 0.1.4 - isobject: 2.1.0 - - has-value@1.0.0: - dependencies: - get-value: 2.0.6 - has-values: 1.0.0 - isobject: 3.0.1 - - has-values@0.1.4: {} - - has-values@1.0.0: - dependencies: - is-number: 3.0.0 - kind-of: 4.0.0 - - hash-base@3.1.0: - dependencies: - inherits: 2.0.4 - readable-stream: 3.6.2 - safe-buffer: 5.2.1 - - hash.js@1.1.7: - dependencies: - inherits: 2.0.4 - minimalistic-assert: 1.0.1 - - hasha@5.2.2: - dependencies: - is-stream: 2.0.1 - type-fest: 0.8.1 - - hasown@2.0.2: - dependencies: - function-bind: 1.1.2 - - he@1.2.0: {} - - heap@0.2.7: {} - - hmac-drbg@1.0.1: - dependencies: - hash.js: 1.1.7 - minimalistic-assert: 1.0.1 - minimalistic-crypto-utils: 1.0.1 - - hpack.js@2.1.6: - dependencies: - inherits: 2.0.4 - obuf: 1.1.2 - readable-stream: 2.3.8 - wbuf: 1.7.3 - - html-entities@1.4.0: {} - - html-escaper@2.0.2: {} - - html-minifier-terser@6.1.0: - dependencies: - camel-case: 4.1.2 - clean-css: 5.3.3 - commander: 8.3.0 - he: 1.2.0 - param-case: 3.0.4 - relateurl: 0.2.7 - terser: 5.36.0 - - html-webpack-plugin@5.6.3(webpack@5.95.0): - dependencies: - '@types/html-minifier-terser': 6.1.0 - html-minifier-terser: 6.1.0 - lodash: 4.17.21 - pretty-error: 4.0.0 - tapable: 2.2.1 - optionalDependencies: - webpack: 5.95.0(webpack-cli@4.10.0) - - htmlparser2@6.1.0: - dependencies: - domelementtype: 2.3.0 - domhandler: 4.3.1 - domutils: 2.8.0 - entities: 2.2.0 - - http-basic@8.1.3: - dependencies: - caseless: 0.12.0 - concat-stream: 1.6.2 - http-response-object: 3.0.2 - parse-cache-control: 1.0.1 - - http-cache-semantics@4.1.1: {} - - http-deceiver@1.2.7: {} - - http-encoding@2.0.1: - dependencies: - brotli-wasm: 3.0.1 - pify: 5.0.0 - zstd-codec: 0.1.5 - - http-errors@1.6.3: - dependencies: - depd: 1.1.2 - inherits: 2.0.3 - setprototypeof: 1.1.0 - statuses: 1.5.0 - - http-errors@2.0.0: - dependencies: - depd: 2.0.0 - inherits: 2.0.4 - setprototypeof: 1.2.0 - statuses: 2.0.1 - toidentifier: 1.0.1 - - http-https@1.0.0: {} - - http-parser-js@0.5.8: {} - - http-proxy-agent@7.0.2: - dependencies: - agent-base: 7.1.3 - debug: 4.4.0(supports-color@8.1.1) - transitivePeerDependencies: - - supports-color - - http-proxy-middleware@0.19.1(debug@4.3.7(supports-color@6.1.0))(supports-color@6.1.0): - dependencies: - http-proxy: 1.18.1(debug@4.3.7(supports-color@6.1.0)) - is-glob: 4.0.3 - lodash: 4.17.21 - micromatch: 3.1.10(supports-color@6.1.0) - transitivePeerDependencies: - - debug - - supports-color - - http-proxy@1.18.1(debug@4.3.7(supports-color@6.1.0)): - dependencies: - eventemitter3: 4.0.7 - follow-redirects: 1.15.9(debug@4.3.7(supports-color@6.1.0)) - requires-port: 1.0.0 - transitivePeerDependencies: - - debug - - http-response-object@3.0.2: - dependencies: - '@types/node': 10.17.60 - - http-signature@1.2.0: - dependencies: - assert-plus: 1.0.0 - jsprim: 1.4.2 - sshpk: 1.18.0 - - http2-wrapper@1.0.3: - dependencies: - quick-lru: 5.1.1 - resolve-alpn: 1.2.1 - - http2-wrapper@2.2.1: - dependencies: - quick-lru: 5.1.1 - resolve-alpn: 1.2.1 - - https-proxy-agent@5.0.1: - dependencies: - agent-base: 6.0.2 - debug: 4.3.7(supports-color@6.1.0) - transitivePeerDependencies: - - supports-color - - https-proxy-agent@7.0.5: - dependencies: - agent-base: 7.1.1 - debug: 4.3.7(supports-color@6.1.0) - transitivePeerDependencies: - - supports-color - - https-proxy-agent@7.0.6: - dependencies: - agent-base: 7.1.3 - debug: 4.4.0(supports-color@8.1.1) - transitivePeerDependencies: - - supports-color - - human-id@1.0.2: {} - - husky@8.0.3: {} - - iconv-lite@0.4.24: - dependencies: - safer-buffer: 2.1.2 - - idb@7.1.1: {} - - idna-uts46-hx@2.3.1: - dependencies: - punycode: 2.1.0 - - ieee754@1.2.1: {} - - ignore-by-default@2.1.0: {} - - ignore-walk@3.0.4: - dependencies: - minimatch: 3.1.2 - - ignore@5.3.2: {} - - immer@10.0.2: {} - - immutable@4.3.7: {} - - import-fresh@3.3.0: - dependencies: - parent-module: 1.0.1 - resolve-from: 4.0.0 - - import-local@2.0.0: - dependencies: - pkg-dir: 3.0.0 - resolve-cwd: 2.0.0 - - import-local@3.2.0: - dependencies: - pkg-dir: 4.2.0 - resolve-cwd: 3.0.0 - - imurmurhash@0.1.4: {} - - indent-string@4.0.0: {} - - indent-string@5.0.0: {} - - inflight@1.0.6: - dependencies: - once: 1.4.0 - wrappy: 1.0.2 - - inherits@2.0.3: {} - - inherits@2.0.4: {} - - ini@1.3.8: {} - - internal-ip@4.3.0: - dependencies: - default-gateway: 4.2.0 - ipaddr.js: 1.9.1 - - internal-slot@1.0.7: - dependencies: - es-errors: 1.3.0 - hasown: 2.0.2 - side-channel: 1.0.6 - - interpret@1.4.0: {} - - interpret@2.2.0: {} - - io-ts@1.10.4: - dependencies: - fp-ts: 1.19.3 - - ip-address@9.0.5: - dependencies: - jsbn: 1.1.0 - sprintf-js: 1.1.3 - - ip-regex@2.1.0: {} - - ip@1.1.9: {} - - ipaddr.js@1.9.1: {} - - irregular-plurals@3.5.0: {} - - is-absolute-url@3.0.3: {} - - is-accessor-descriptor@1.0.1: - dependencies: - hasown: 2.0.2 - - is-arguments@1.1.1: - dependencies: - call-bind: 1.0.7 - has-tostringtag: 1.0.2 - - is-array-buffer@3.0.4: - dependencies: - call-bind: 1.0.7 - get-intrinsic: 1.2.4 - - is-arrayish@0.2.1: {} - - is-bigint@1.0.4: - dependencies: - has-bigints: 1.0.2 - - is-binary-path@1.0.1: - dependencies: - binary-extensions: 1.13.1 - - is-binary-path@2.1.0: - dependencies: - binary-extensions: 2.3.0 - - is-boolean-object@1.1.2: - dependencies: - call-bind: 1.0.7 - has-tostringtag: 1.0.2 - - is-buffer@1.1.6: {} - - is-buffer@2.0.5: {} - - is-callable@1.2.7: {} - - is-core-module@2.15.1: - dependencies: - hasown: 2.0.2 - - is-core-module@2.16.1: - dependencies: - hasown: 2.0.2 - - is-data-descriptor@1.0.1: - dependencies: - hasown: 2.0.2 - - is-data-view@1.0.1: - dependencies: - is-typed-array: 1.1.13 - - is-date-object@1.0.5: - dependencies: - has-tostringtag: 1.0.2 - - is-descriptor@0.1.7: - dependencies: - is-accessor-descriptor: 1.0.1 - is-data-descriptor: 1.0.1 - - is-descriptor@1.0.3: - dependencies: - is-accessor-descriptor: 1.0.1 - is-data-descriptor: 1.0.1 - - is-dotfile@1.0.3: {} - - is-extendable@0.1.1: {} - - is-extendable@1.0.1: - dependencies: - is-plain-object: 2.0.4 - - is-extglob@1.0.0: {} - - is-extglob@2.1.1: {} - - is-fullwidth-code-point@2.0.0: {} - - is-fullwidth-code-point@3.0.0: {} - - is-fullwidth-code-point@4.0.0: {} - - is-function@1.0.2: {} - - is-generator-function@1.0.10: - dependencies: - has-tostringtag: 1.0.2 - - is-glob@2.0.1: - dependencies: - is-extglob: 1.0.0 - - is-glob@4.0.3: - dependencies: - is-extglob: 2.1.1 - - is-hex-prefixed@1.0.0: {} - - is-module@1.0.0: {} - - is-negative-zero@2.0.3: {} - - is-number-object@1.0.7: - dependencies: - has-tostringtag: 1.0.2 - - is-number@3.0.0: - dependencies: - kind-of: 3.2.2 - - is-number@7.0.0: {} - - is-path-cwd@2.2.0: {} - - is-path-in-cwd@2.1.0: - dependencies: - is-path-inside: 2.1.0 - - is-path-inside@2.1.0: - dependencies: - path-is-inside: 1.0.2 - - is-path-inside@3.0.3: {} - - is-plain-obj@2.1.0: {} - - is-plain-object@2.0.4: - dependencies: - isobject: 3.0.1 - - is-plain-object@5.0.0: {} - - is-promise@4.0.0: {} - - is-reference@1.2.1: - dependencies: - '@types/estree': 1.0.6 - - is-regex@1.1.4: - dependencies: - call-bind: 1.0.7 - has-tostringtag: 1.0.2 - - is-shared-array-buffer@1.0.3: - dependencies: - call-bind: 1.0.7 - - is-stream@1.1.0: {} - - is-stream@2.0.1: {} - - is-string@1.0.7: - dependencies: - has-tostringtag: 1.0.2 - - is-subdir@1.2.0: - dependencies: - better-path-resolve: 1.0.0 - - is-symbol@1.0.4: - dependencies: - has-symbols: 1.0.3 - - is-typed-array@1.1.13: - dependencies: - which-typed-array: 1.1.15 - - is-typedarray@1.0.0: {} - - is-unicode-supported@0.1.0: {} - - is-unicode-supported@2.1.0: {} - - is-weakref@1.0.2: - dependencies: - call-bind: 1.0.7 - - is-windows@1.0.2: {} - - is-wsl@1.1.0: {} - - isarray@1.0.0: {} - - isarray@2.0.5: {} - - isexe@2.0.0: {} - - isobject@2.1.0: - dependencies: - isarray: 1.0.0 - - isobject@3.0.1: {} - - isomorphic-ws@4.0.1(ws@8.18.0(bufferutil@4.0.8)(utf-8-validate@5.0.10)): - dependencies: - ws: 8.18.0(bufferutil@4.0.8)(utf-8-validate@5.0.10) - - isstream@0.1.2: {} - - istanbul-lib-coverage@3.2.2: {} - - istanbul-lib-hook@3.0.0: - dependencies: - append-transform: 2.0.0 - - istanbul-lib-instrument@4.0.3: - dependencies: - '@babel/core': 7.25.9 - '@istanbuljs/schema': 0.1.3 - istanbul-lib-coverage: 3.2.2 - semver: 6.3.1 - transitivePeerDependencies: - - supports-color - - istanbul-lib-instrument@6.0.3: - dependencies: - '@babel/core': 7.25.9 - '@babel/parser': 7.25.9 - '@istanbuljs/schema': 0.1.3 - istanbul-lib-coverage: 3.2.2 - semver: 7.6.3 - transitivePeerDependencies: - - supports-color - - istanbul-lib-processinfo@2.0.3: - dependencies: - archy: 1.0.0 - cross-spawn: 7.0.3 - istanbul-lib-coverage: 3.2.2 - p-map: 3.0.0 - rimraf: 3.0.2 - uuid: 8.3.2 - - istanbul-lib-report@3.0.1: - dependencies: - istanbul-lib-coverage: 3.2.2 - make-dir: 4.0.0 - supports-color: 7.2.0 - - istanbul-lib-source-maps@4.0.1: - dependencies: - debug: 4.3.7(supports-color@6.1.0) - istanbul-lib-coverage: 3.2.2 - source-map: 0.6.1 - transitivePeerDependencies: - - supports-color - - istanbul-reports@3.1.7: - dependencies: - html-escaper: 2.0.2 - istanbul-lib-report: 3.0.1 - - iterall@1.3.0: {} - - jackspeak@4.0.2: - dependencies: - '@isaacs/cliui': 8.0.2 - - jest-worker@26.6.2: - dependencies: - '@types/node': 22.7.9 - merge-stream: 2.0.0 - supports-color: 7.2.0 - - jest-worker@27.5.1: - dependencies: - '@types/node': 22.7.9 - merge-stream: 2.0.0 - supports-color: 8.1.1 - - joi@17.13.3: - dependencies: - '@hapi/hoek': 9.3.0 - '@hapi/topo': 5.1.0 - '@sideway/address': 4.1.5 - '@sideway/formula': 3.0.1 - '@sideway/pinpoint': 2.0.0 - - js-base64@3.7.7: {} - - js-sha3@0.5.7: {} - - js-sha3@0.8.0: {} - - js-string-escape@1.0.1: {} - - js-tokens@4.0.0: {} - - js-yaml@3.14.1: - dependencies: - argparse: 1.0.10 - esprima: 4.0.1 - - js-yaml@4.1.0: - dependencies: - argparse: 2.0.1 - - jsbn@0.1.1: {} - - jsbn@1.1.0: {} - - jsesc@3.0.2: {} - - json-buffer@3.0.1: {} - - json-canonicalize@1.0.6: {} - - json-parse-even-better-errors@2.3.1: {} - - json-schema-traverse@0.4.1: {} - - json-schema-traverse@1.0.0: {} - - json-schema@0.4.0: {} - - json-stable-stringify-without-jsonify@1.0.1: {} - - json-stream-stringify@3.1.6: {} - - json-stringify-safe@5.0.1: {} - - json5@1.0.2: - dependencies: - minimist: 1.2.8 - - json5@2.2.3: {} - - jsonfile@4.0.0: - optionalDependencies: - graceful-fs: 4.2.11 - - jsonfile@6.1.0: - dependencies: - universalify: 2.0.1 - optionalDependencies: - graceful-fs: 4.2.11 - - jsonschema@1.5.0: {} - - jsprim@1.4.2: - dependencies: - assert-plus: 1.0.0 - extsprintf: 1.3.0 - json-schema: 0.4.0 - verror: 1.10.0 - - jwt-decode@4.0.0: {} - - keccak256@1.0.6: - dependencies: - bn.js: 5.2.1 - buffer: 6.0.3 - keccak: 3.0.4 - - keccak@3.0.4: - dependencies: - node-addon-api: 2.0.2 - node-gyp-build: 4.8.2 - readable-stream: 3.6.2 - - keyv@4.5.4: - dependencies: - json-buffer: 3.0.1 - - killable@1.0.1: {} - - kind-of@3.2.2: - dependencies: - is-buffer: 1.1.6 - - kind-of@4.0.0: - dependencies: - is-buffer: 1.1.6 - - kind-of@6.0.3: {} - - kleur@3.0.3: {} - - level-concat-iterator@3.1.0: - dependencies: - catering: 2.1.1 - - level-supports@2.1.0: {} - - level-supports@4.0.1: {} - - level-transcoder@1.0.1: - dependencies: - buffer: 6.0.3 - module-error: 1.0.2 - - levn@0.3.0: - dependencies: - prelude-ls: 1.1.2 - type-check: 0.3.2 - - levn@0.4.1: - dependencies: - prelude-ls: 1.2.1 - type-check: 0.4.0 - - lines-and-columns@1.2.4: {} - - load-json-file@7.0.1: {} - - loader-runner@4.3.0: {} - - locate-path@2.0.0: - dependencies: - p-locate: 2.0.0 - path-exists: 3.0.0 - - locate-path@3.0.0: - dependencies: - p-locate: 3.0.0 - path-exists: 3.0.0 - - locate-path@5.0.0: - dependencies: - p-locate: 4.1.0 - - locate-path@6.0.0: - dependencies: - p-locate: 5.0.0 - - locate-path@7.2.0: - dependencies: - p-locate: 6.0.0 - - lodash.camelcase@4.3.0: {} - - lodash.clonedeep@4.5.0: {} - - lodash.debounce@4.0.8: {} - - lodash.flattendeep@4.4.0: {} - - lodash.isequal@4.5.0: {} - - lodash.merge@4.6.2: {} - - lodash.startcase@4.4.0: {} - - lodash.truncate@4.4.2: {} - - lodash@4.17.21: {} - - log-symbols@4.1.0: - dependencies: - chalk: 4.1.2 - is-unicode-supported: 0.1.0 - - loglevel@1.9.2: {} - - loupe@2.3.7: - dependencies: - get-func-name: 2.0.2 - - lower-case@2.0.2: - dependencies: - tslib: 2.8.0 - - lowercase-keys@2.0.0: {} - - lowercase-keys@3.0.0: {} - - lru-cache@11.0.1: {} - - lru-cache@4.1.5: - dependencies: - pseudomap: 1.0.2 - yallist: 2.1.2 - - lru-cache@5.1.1: - dependencies: - yallist: 3.1.1 - - lru-cache@7.18.3: {} - - lru_map@0.3.3: {} - - magic-string@0.25.9: - dependencies: - sourcemap-codec: 1.4.8 - - magic-string@0.30.12: - dependencies: - '@jridgewell/sourcemap-codec': 1.5.0 - - make-dir@3.1.0: - dependencies: - semver: 6.3.1 - - make-dir@4.0.0: - dependencies: - semver: 7.6.3 - - make-error@1.3.6: {} - - map-cache@0.2.2: {} - - map-visit@1.0.0: - dependencies: - object-visit: 1.0.1 - - markdown-table@1.1.3: {} - - matcher@5.0.0: - dependencies: - escape-string-regexp: 5.0.0 - - math-intrinsics@1.1.0: {} - - md5-hex@3.0.1: - dependencies: - blueimp-md5: 2.19.0 - - md5.js@1.3.5: - dependencies: - hash-base: 3.1.0 - inherits: 2.0.4 - safe-buffer: 5.2.1 - - media-typer@0.3.0: {} - - memoize@10.0.0: - dependencies: - mimic-function: 5.0.1 - - memory-fs@0.4.1: - dependencies: - errno: 0.1.8 - readable-stream: 2.3.8 - - memorystream@0.3.1: {} - - merge-descriptors@1.0.3: {} - - merge-stream@2.0.0: {} - - merge2@1.4.1: {} - - methods@1.1.2: {} - - micro-ftch@0.3.1: {} - - micromatch@3.1.10(supports-color@6.1.0): - dependencies: - arr-diff: 4.0.0 - array-unique: 0.3.2 - braces: 2.3.2(supports-color@6.1.0) - define-property: 2.0.2 - extend-shallow: 3.0.2 - extglob: 2.0.4(supports-color@6.1.0) - fragment-cache: 0.2.1 - kind-of: 6.0.3 - nanomatch: 1.2.13(supports-color@6.1.0) - object.pick: 1.3.0 - regex-not: 1.0.2 - snapdragon: 0.8.2(supports-color@6.1.0) - to-regex: 3.0.2 - transitivePeerDependencies: - - supports-color - - micromatch@4.0.8: - dependencies: - braces: 3.0.3 - picomatch: 2.3.1 - - mime-db@1.52.0: {} - - mime-db@1.53.0: {} - - mime-types@2.1.35: - dependencies: - mime-db: 1.52.0 - - mime@1.6.0: {} - - mime@2.6.0: {} - - mimic-function@5.0.1: {} - - mimic-response@1.0.1: {} - - mimic-response@3.1.0: {} - - min-document@2.19.0: - dependencies: - dom-walk: 0.1.2 - - minimalistic-assert@1.0.1: {} - - minimalistic-crypto-utils@1.0.1: {} - - minimatch@10.0.1: - dependencies: - brace-expansion: 2.0.1 - - minimatch@3.1.2: - dependencies: - brace-expansion: 1.1.11 - - minimatch@5.1.6: - dependencies: - brace-expansion: 2.0.1 - - minimatch@9.0.5: - dependencies: - brace-expansion: 2.0.1 - - minimist@1.2.8: {} - - minipass@2.9.0: - dependencies: - safe-buffer: 5.2.1 - yallist: 3.1.1 - - minipass@3.3.6: - dependencies: - yallist: 4.0.0 - - minipass@5.0.0: {} - - minipass@7.1.2: {} - - minizlib@1.3.3: - dependencies: - minipass: 2.9.0 - - minizlib@2.1.2: - dependencies: - minipass: 3.3.6 - yallist: 4.0.0 - - mitt@3.0.1: {} - - mixin-deep@1.3.2: - dependencies: - for-in: 1.0.2 - is-extendable: 1.0.1 - - mkdirp-promise@5.0.1: - dependencies: - mkdirp: 3.0.1 - - mkdirp@0.5.6: - dependencies: - minimist: 1.2.8 - - mkdirp@1.0.4: {} - - mkdirp@3.0.1: {} - - mnemonist@0.38.5: - dependencies: - obliterator: 2.0.4 - - mocha@10.7.3: - dependencies: - ansi-colors: 4.1.3 - browser-stdout: 1.3.1 - chokidar: 3.6.0 - debug: 4.3.7(supports-color@8.1.1) - diff: 5.2.0 - escape-string-regexp: 4.0.0 - find-up: 5.0.0 - glob: 8.1.0 - he: 1.2.0 - js-yaml: 4.1.0 - log-symbols: 4.1.0 - minimatch: 5.1.6 - ms: 2.1.3 - serialize-javascript: 6.0.2 - strip-json-comments: 3.1.1 - supports-color: 8.1.1 - workerpool: 6.5.1 - yargs: 16.2.0 - yargs-parser: 20.2.9 - yargs-unparser: 2.0.0 - - mocha@10.8.2: - dependencies: - ansi-colors: 4.1.3 - browser-stdout: 1.3.1 - chokidar: 3.6.0 - debug: 4.4.0(supports-color@8.1.1) - diff: 5.2.0 - escape-string-regexp: 4.0.0 - find-up: 5.0.0 - glob: 8.1.0 - he: 1.2.0 - js-yaml: 4.1.0 - log-symbols: 4.1.0 - minimatch: 5.1.6 - ms: 2.1.3 - serialize-javascript: 6.0.2 - strip-json-comments: 3.1.1 - supports-color: 8.1.1 - workerpool: 6.5.1 - yargs: 16.2.0 - yargs-parser: 20.2.9 - yargs-unparser: 2.0.0 - - mock-fs@4.14.0: {} - - mockttp@3.15.3(bufferutil@4.0.8)(utf-8-validate@5.0.10): - dependencies: - '@graphql-tools/schema': 8.5.1(graphql@15.9.0) - '@graphql-tools/utils': 8.13.1(graphql@15.9.0) - '@httptoolkit/httpolyglot': 2.2.2 - '@httptoolkit/subscriptions-transport-ws': 0.11.2(bufferutil@4.0.8)(graphql@15.9.0)(utf-8-validate@5.0.10) - '@httptoolkit/websocket-stream': 6.0.1(bufferutil@4.0.8)(utf-8-validate@5.0.10) - '@types/cors': 2.8.17 - '@types/node': 22.7.9 - async-mutex: 0.5.0 - base64-arraybuffer: 0.1.5 - body-parser: 1.20.3(supports-color@6.1.0) - cacheable-lookup: 6.1.0 - common-tags: 1.8.2 - connect: 3.7.0 - cors: 2.8.5 - cors-gate: 1.1.3 - cross-fetch: 3.1.8 - destroyable-server: 1.0.2 - express: 4.21.1(supports-color@6.1.0) - fast-json-patch: 3.1.1 - graphql: 15.9.0 - graphql-http: 1.22.1(graphql@15.9.0) - graphql-subscriptions: 1.2.1(graphql@15.9.0) - graphql-tag: 2.12.6(graphql@15.9.0) - http-encoding: 2.0.1 - http2-wrapper: 2.2.1 - https-proxy-agent: 5.0.1 - isomorphic-ws: 4.0.1(ws@8.18.0(bufferutil@4.0.8)(utf-8-validate@5.0.10)) - lodash: 4.17.21 - lru-cache: 7.18.3 - native-duplexpair: 1.0.0 - node-forge: 1.3.1 - pac-proxy-agent: 7.0.2 - parse-multipart-data: 1.5.0 - performance-now: 2.1.0 - portfinder: 1.0.32(supports-color@6.1.0) - read-tls-client-hello: 1.0.1 - semver: 7.6.3 - socks-proxy-agent: 7.0.0 - typed-error: 3.2.2 - urlpattern-polyfill: 8.0.2 - uuid: 8.3.2 - ws: 8.18.0(bufferutil@4.0.8)(utf-8-validate@5.0.10) - transitivePeerDependencies: - - bufferutil - - encoding - - supports-color - - utf-8-validate - - module-error@1.0.2: {} - - mri@1.2.0: {} - - ms@2.0.0: {} - - ms@2.1.3: {} - - multibase@0.6.1: - dependencies: - base-x: 3.0.10 - buffer: 5.7.1 - - multibase@0.7.0: - dependencies: - base-x: 3.0.10 - buffer: 5.7.1 - - multicast-dns-service-types@1.1.0: {} - - multicast-dns@6.2.3: - dependencies: - dns-packet: 1.3.4 - thunky: 1.1.0 - - multicodec@0.5.7: - dependencies: - varint: 5.0.2 - - multicodec@1.0.4: - dependencies: - buffer: 5.7.1 - varint: 5.0.2 - - multihashes@0.4.21: - dependencies: - buffer: 5.7.1 - multibase: 0.7.0 - varint: 5.0.2 - - nan@2.22.0: - optional: true - - nano-json-stream-parser@0.1.2: {} - - nanomatch@1.2.13(supports-color@6.1.0): - dependencies: - arr-diff: 4.0.0 - array-unique: 0.3.2 - define-property: 2.0.2 - extend-shallow: 3.0.2 - fragment-cache: 0.2.1 - is-windows: 1.0.2 - kind-of: 6.0.3 - object.pick: 1.3.0 - regex-not: 1.0.2 - snapdragon: 0.8.2(supports-color@6.1.0) - to-regex: 3.0.2 - transitivePeerDependencies: - - supports-color - - native-duplexpair@1.0.0: {} - - natural-compare@1.4.0: {} - - ndjson@2.0.0: - dependencies: - json-stringify-safe: 5.0.1 - minimist: 1.2.8 - readable-stream: 3.6.2 - split2: 3.2.2 - through2: 4.0.2 - - negotiator@0.6.3: {} - - neo-async@2.6.2: {} - - netmask@2.0.2: {} - - next-tick@1.1.0: {} - - nice-try@1.0.5: {} - - no-case@3.0.4: - dependencies: - lower-case: 2.0.2 - tslib: 2.8.0 - - node-addon-api@2.0.2: {} - - node-addon-api@5.1.0: {} - - node-emoji@1.11.0: - dependencies: - lodash: 4.17.21 - - node-fetch@2.7.0: - dependencies: - whatwg-url: 5.0.0 - - node-forge@1.3.1: {} - - node-gyp-build@4.8.2: {} - - node-preload@0.2.1: - dependencies: - process-on-spawn: 1.0.0 - - node-releases@2.0.18: {} - - nofilter@3.1.0: {} - - nopt@3.0.6: - dependencies: - abbrev: 1.1.1 - - nopt@5.0.0: - dependencies: - abbrev: 1.1.1 - - normalize-path@2.1.1: - dependencies: - remove-trailing-separator: 1.1.0 - - normalize-path@3.0.0: {} - - normalize-url@6.1.0: {} - - npm-bundled@1.1.2: - dependencies: - npm-normalize-package-bin: 1.0.1 - - npm-normalize-package-bin@1.0.1: {} - - npm-packlist@2.2.2: - dependencies: - glob: 7.2.3 - ignore-walk: 3.0.4 - npm-bundled: 1.1.2 - npm-normalize-package-bin: 1.0.1 - - npm-run-path@2.0.2: - dependencies: - path-key: 2.0.1 - - npmlog@5.0.1: - dependencies: - are-we-there-yet: 2.0.0 - console-control-strings: 1.1.0 - gauge: 3.0.2 - set-blocking: 2.0.0 - - nth-check@2.1.1: - dependencies: - boolbase: 1.0.0 - - number-to-bn@1.7.0: - dependencies: - bn.js: 4.11.6 - strip-hex-prefix: 1.0.0 - - nyc@15.1.0: - dependencies: - '@istanbuljs/load-nyc-config': 1.1.0 - '@istanbuljs/schema': 0.1.3 - caching-transform: 4.0.0 - convert-source-map: 1.9.0 - decamelize: 1.2.0 - find-cache-dir: 3.3.2 - find-up: 4.1.0 - foreground-child: 2.0.0 - get-package-type: 0.1.0 - glob: 7.2.3 - istanbul-lib-coverage: 3.2.2 - istanbul-lib-hook: 3.0.0 - istanbul-lib-instrument: 4.0.3 - istanbul-lib-processinfo: 2.0.3 - istanbul-lib-report: 3.0.1 - istanbul-lib-source-maps: 4.0.1 - istanbul-reports: 3.1.7 - make-dir: 3.1.0 - node-preload: 0.2.1 - p-map: 3.0.0 - process-on-spawn: 1.0.0 - resolve-from: 5.0.0 - rimraf: 3.0.2 - signal-exit: 3.0.7 - spawn-wrap: 2.0.0 - test-exclude: 6.0.0 - yargs: 15.4.1 - transitivePeerDependencies: - - supports-color - - nyc@17.1.0: - dependencies: - '@istanbuljs/load-nyc-config': 1.1.0 - '@istanbuljs/schema': 0.1.3 - caching-transform: 4.0.0 - convert-source-map: 1.9.0 - decamelize: 1.2.0 - find-cache-dir: 3.3.2 - find-up: 4.1.0 - foreground-child: 3.3.0 - get-package-type: 0.1.0 - glob: 7.2.3 - istanbul-lib-coverage: 3.2.2 - istanbul-lib-hook: 3.0.0 - istanbul-lib-instrument: 6.0.3 - istanbul-lib-processinfo: 2.0.3 - istanbul-lib-report: 3.0.1 - istanbul-lib-source-maps: 4.0.1 - istanbul-reports: 3.1.7 - make-dir: 3.1.0 - node-preload: 0.2.1 - p-map: 3.0.0 - process-on-spawn: 1.0.0 - resolve-from: 5.0.0 - rimraf: 3.0.2 - signal-exit: 3.0.7 - spawn-wrap: 2.0.0 - test-exclude: 6.0.0 - yargs: 15.4.1 - transitivePeerDependencies: - - supports-color - - oauth-sign@0.9.0: {} - - object-assign@4.1.1: {} - - object-copy@0.1.0: - dependencies: - copy-descriptor: 0.1.1 - define-property: 0.2.5 - kind-of: 3.2.2 - - object-inspect@1.13.2: {} - - object-inspect@1.13.4: {} - - object-is@1.1.6: - dependencies: - call-bind: 1.0.7 - define-properties: 1.2.1 - - object-keys@1.1.1: {} - - object-visit@1.0.1: - dependencies: - isobject: 3.0.1 - - object.assign@4.1.5: - dependencies: - call-bind: 1.0.7 - define-properties: 1.2.1 - has-symbols: 1.0.3 - object-keys: 1.1.1 - - object.fromentries@2.0.8: - dependencies: - call-bind: 1.0.7 - define-properties: 1.2.1 - es-abstract: 1.23.3 - es-object-atoms: 1.0.0 - - object.groupby@1.0.3: - dependencies: - call-bind: 1.0.7 - define-properties: 1.2.1 - es-abstract: 1.23.3 - - object.pick@1.3.0: - dependencies: - isobject: 3.0.1 - - object.values@1.2.0: - dependencies: - call-bind: 1.0.7 - define-properties: 1.2.1 - es-object-atoms: 1.0.0 - - obliterator@2.0.4: {} - - oboe@2.1.5: - dependencies: - http-https: 1.0.0 - - obuf@1.1.2: {} - - on-finished@2.3.0: - dependencies: - ee-first: 1.1.1 - - on-finished@2.4.1: - dependencies: - ee-first: 1.1.1 - - on-headers@1.0.2: {} - - once@1.4.0: - dependencies: - wrappy: 1.0.2 - - opn@5.5.0: - dependencies: - is-wsl: 1.1.0 - - optionator@0.8.3: - dependencies: - deep-is: 0.1.4 - fast-levenshtein: 2.0.6 - levn: 0.3.0 - prelude-ls: 1.1.2 - type-check: 0.3.2 - word-wrap: 1.2.5 - - optionator@0.9.4: - dependencies: - deep-is: 0.1.4 - fast-levenshtein: 2.0.6 - levn: 0.4.1 - prelude-ls: 1.2.1 - type-check: 0.4.0 - word-wrap: 1.2.5 - - ordinal@1.0.3: {} - - os-tmpdir@1.0.2: {} - - outdent@0.5.0: {} - - p-cancelable@2.1.1: {} - - p-cancelable@3.0.0: {} - - p-filter@2.1.0: - dependencies: - p-map: 2.1.0 - - p-finally@1.0.0: {} - - p-limit@1.3.0: - dependencies: - p-try: 1.0.0 - - p-limit@2.3.0: - dependencies: - p-try: 2.2.0 - - p-limit@3.1.0: - dependencies: - yocto-queue: 0.1.0 - - p-limit@4.0.0: - dependencies: - yocto-queue: 1.1.1 - - p-locate@2.0.0: - dependencies: - p-limit: 1.3.0 - - p-locate@3.0.0: - dependencies: - p-limit: 2.3.0 - - p-locate@4.1.0: - dependencies: - p-limit: 2.3.0 - - p-locate@5.0.0: - dependencies: - p-limit: 3.1.0 - - p-locate@6.0.0: - dependencies: - p-limit: 4.0.0 - - p-map@2.1.0: {} - - p-map@3.0.0: - dependencies: - aggregate-error: 3.1.0 - - p-map@4.0.0: - dependencies: - aggregate-error: 3.1.0 - - p-map@7.0.2: {} - - p-retry@3.0.1: - dependencies: - retry: 0.12.0 - - p-try@1.0.0: {} - - p-try@2.2.0: {} - - pac-proxy-agent@7.0.2: - dependencies: - '@tootallnate/quickjs-emscripten': 0.23.0 - agent-base: 7.1.1 - debug: 4.3.7(supports-color@6.1.0) - get-uri: 6.0.3 - http-proxy-agent: 7.0.2 - https-proxy-agent: 7.0.5 - pac-resolver: 7.0.1 - socks-proxy-agent: 8.0.4 - transitivePeerDependencies: - - supports-color - - pac-proxy-agent@7.1.0: - dependencies: - '@tootallnate/quickjs-emscripten': 0.23.0 - agent-base: 7.1.3 - debug: 4.4.0(supports-color@8.1.1) - get-uri: 6.0.3 - http-proxy-agent: 7.0.2 - https-proxy-agent: 7.0.6 - pac-resolver: 7.0.1 - socks-proxy-agent: 8.0.5 - transitivePeerDependencies: - - supports-color - - pac-resolver@7.0.1: - dependencies: - degenerator: 5.0.1 - netmask: 2.0.2 - - package-config@5.0.0: - dependencies: - find-up-simple: 1.0.0 - load-json-file: 7.0.1 - - package-hash@4.0.0: - dependencies: - graceful-fs: 4.2.11 - hasha: 5.2.2 - lodash.flattendeep: 4.4.0 - release-zalgo: 1.0.0 - - package-json-from-dist@1.0.1: {} - - package-manager-detector@0.2.2: {} - - param-case@3.0.4: - dependencies: - dot-case: 3.0.4 - tslib: 2.8.0 - - parent-module@1.0.1: - dependencies: - callsites: 3.1.0 - - parse-cache-control@1.0.1: {} - - parse-glob@3.0.4: - dependencies: - glob-base: 0.3.0 - is-dotfile: 1.0.3 - is-extglob: 1.0.0 - is-glob: 2.0.1 - - parse-headers@2.0.5: {} - - parse-json@5.2.0: - dependencies: - '@babel/code-frame': 7.25.9 - error-ex: 1.3.2 - json-parse-even-better-errors: 2.3.1 - lines-and-columns: 1.2.4 - - parse-ms@4.0.0: {} - - parse-multipart-data@1.5.0: {} - - parseurl@1.3.3: {} - - pascal-case@3.1.2: - dependencies: - no-case: 3.0.4 - tslib: 2.8.0 - - pascalcase@0.1.1: {} - - path-exists@3.0.0: {} - - path-exists@4.0.0: {} - - path-exists@5.0.0: {} - - path-is-absolute@1.0.1: {} - - path-is-inside@1.0.2: {} - - path-key@2.0.1: {} - - path-key@3.1.1: {} - - path-parse@1.0.7: {} - - path-scurry@2.0.0: - dependencies: - lru-cache: 11.0.1 - minipass: 7.1.2 - - path-to-regexp@0.1.10: {} - - path-type@4.0.0: {} - - path-type@5.0.0: {} - - pathval@1.1.1: {} - - pbkdf2@3.1.2: - dependencies: - create-hash: 1.2.0 - create-hmac: 1.1.7 - ripemd160: 2.0.2 - safe-buffer: 5.2.1 - sha.js: 2.4.11 - - pend@1.2.0: {} - - performance-now@2.1.0: {} - - picocolors@1.1.1: {} - - picomatch@2.3.1: {} - - picomatch@3.0.1: {} - - pify@2.3.0: {} - - pify@4.0.1: {} - - pify@5.0.0: {} - - pinkie-promise@2.0.1: - dependencies: - pinkie: 2.0.4 - - pinkie@2.0.4: {} - - pirates@4.0.6: {} - - pkg-dir@3.0.0: - dependencies: - find-up: 3.0.0 - - pkg-dir@4.2.0: - dependencies: - find-up: 4.1.0 - - pkg-dir@7.0.0: - dependencies: - find-up: 6.3.0 - - plur@5.1.0: - dependencies: - irregular-plurals: 3.5.0 - - portfinder@1.0.32(supports-color@6.1.0): - dependencies: - async: 2.6.4 - debug: 3.2.7(supports-color@6.1.0) - mkdirp: 0.5.6 - transitivePeerDependencies: - - supports-color - - posix-character-classes@0.1.1: {} - - possible-typed-array-names@1.0.0: {} - - prelude-ls@1.1.2: {} - - prelude-ls@1.2.1: {} - - prettier-linter-helpers@1.0.0: - dependencies: - fast-diff: 1.3.0 - - prettier@2.8.8: {} - - prettier@3.3.3: {} - - pretty-error@4.0.0: - dependencies: - lodash: 4.17.21 - renderkid: 3.0.0 - - pretty-ms@9.1.0: - dependencies: - parse-ms: 4.0.0 - - process-nextick-args@2.0.1: {} - - process-on-spawn@1.0.0: - dependencies: - fromentries: 1.3.2 - - process@0.11.10: {} - - progress@2.0.3: {} - - promise@8.3.0: - dependencies: - asap: 2.0.6 - - prompts@2.4.2: - dependencies: - kleur: 3.0.3 - sisteransi: 1.0.5 - - proxy-addr@2.0.7: - dependencies: - forwarded: 0.2.0 - ipaddr.js: 1.9.1 - - proxy-agent@6.5.0: - dependencies: - agent-base: 7.1.3 - debug: 4.4.0(supports-color@8.1.1) - http-proxy-agent: 7.0.2 - https-proxy-agent: 7.0.6 - lru-cache: 7.18.3 - pac-proxy-agent: 7.1.0 - proxy-from-env: 1.1.0 - socks-proxy-agent: 8.0.5 - transitivePeerDependencies: - - supports-color - - proxy-from-env@1.1.0: {} - - prr@1.0.1: {} - - pseudomap@1.0.2: {} - - psl@1.9.0: {} - - pump@3.0.2: - dependencies: - end-of-stream: 1.4.4 - once: 1.4.0 - - punycode@1.4.1: {} - - punycode@2.1.0: {} - - punycode@2.3.1: {} - - puppeteer-core@23.10.3(bufferutil@4.0.8)(utf-8-validate@5.0.10): - dependencies: - '@puppeteer/browsers': 2.6.1 - chromium-bidi: 0.8.0(devtools-protocol@0.0.1367902) - debug: 4.4.0(supports-color@8.1.1) - devtools-protocol: 0.0.1367902 - typed-query-selector: 2.12.0 - ws: 8.18.0(bufferutil@4.0.8)(utf-8-validate@5.0.10) - transitivePeerDependencies: - - bufferutil - - supports-color - - utf-8-validate - - puppeteer@23.10.3(bufferutil@4.0.8)(typescript@5.6.3)(utf-8-validate@5.0.10): - dependencies: - '@puppeteer/browsers': 2.6.1 - chromium-bidi: 0.8.0(devtools-protocol@0.0.1367902) - cosmiconfig: 9.0.0(typescript@5.6.3) - devtools-protocol: 0.0.1367902 - puppeteer-core: 23.10.3(bufferutil@4.0.8)(utf-8-validate@5.0.10) - typed-query-selector: 2.12.0 - transitivePeerDependencies: - - bufferutil - - supports-color - - typescript - - utf-8-validate - - qs@6.13.0: - dependencies: - side-channel: 1.0.6 - - qs@6.14.0: - dependencies: - side-channel: 1.1.0 - - qs@6.5.3: {} - - query-string@5.1.1: - dependencies: - decode-uri-component: 0.2.2 - object-assign: 4.1.1 - strict-uri-encode: 1.1.0 - - querystringify@2.2.0: {} - - queue-microtask@1.2.3: {} - - queue-tick@1.0.1: {} - - quick-lru@5.1.1: {} - - randombytes@2.1.0: - dependencies: - safe-buffer: 5.2.1 - - range-parser@1.2.1: {} - - raw-body@2.5.2: - dependencies: - bytes: 3.1.2 - http-errors: 2.0.0 - iconv-lite: 0.4.24 - unpipe: 1.0.0 - - react-native-keychain@8.2.0: {} - - read-tls-client-hello@1.0.1: - dependencies: - '@types/node': 22.7.9 - - read-yaml-file@1.1.0: - dependencies: - graceful-fs: 4.2.11 - js-yaml: 3.14.1 - pify: 4.0.1 - strip-bom: 3.0.0 - - readable-stream@2.3.8: - dependencies: - core-util-is: 1.0.3 - inherits: 2.0.4 - isarray: 1.0.0 - process-nextick-args: 2.0.1 - safe-buffer: 5.1.2 - string_decoder: 1.1.1 - util-deprecate: 1.0.2 - - readable-stream@3.6.2: - dependencies: - inherits: 2.0.4 - string_decoder: 1.3.0 - util-deprecate: 1.0.2 - - readdirp@2.2.1(supports-color@6.1.0): - dependencies: - graceful-fs: 4.2.11 - micromatch: 3.1.10(supports-color@6.1.0) - readable-stream: 2.3.8 - transitivePeerDependencies: - - supports-color - - readdirp@3.6.0: - dependencies: - picomatch: 2.3.1 - - readdirp@4.0.2: {} - - realistic-structured-clone@3.0.0: - dependencies: - domexception: 1.0.1 - typeson: 6.1.0 - typeson-registry: 1.0.0-alpha.39 - - rechoir@0.6.2: - dependencies: - resolve: 1.22.10 - - rechoir@0.7.1: - dependencies: - resolve: 1.22.8 - - recursive-readdir@2.2.3: - dependencies: - minimatch: 3.1.2 - - reduce-flatten@2.0.0: {} - - regenerate-unicode-properties@10.2.0: - dependencies: - regenerate: 1.4.2 - - regenerate@1.4.2: {} - - regenerator-runtime@0.14.1: {} - - regenerator-transform@0.15.2: - dependencies: - '@babel/runtime': 7.26.10 - - regex-not@1.0.2: - dependencies: - extend-shallow: 3.0.2 - safe-regex: 1.1.0 - - regexp.prototype.flags@1.5.3: - dependencies: - call-bind: 1.0.7 - define-properties: 1.2.1 - es-errors: 1.3.0 - set-function-name: 2.0.2 - - regexpu-core@6.1.1: - dependencies: - regenerate: 1.4.2 - regenerate-unicode-properties: 10.2.0 - regjsgen: 0.8.0 - regjsparser: 0.11.1 - unicode-match-property-ecmascript: 2.0.0 - unicode-match-property-value-ecmascript: 2.2.0 - - regjsgen@0.8.0: {} - - regjsparser@0.11.1: - dependencies: - jsesc: 3.0.2 - - relateurl@0.2.7: {} - - release-zalgo@1.0.0: - dependencies: - es6-error: 4.1.1 - - remove-trailing-separator@1.1.0: {} - - renderkid@3.0.0: - dependencies: - css-select: 4.3.0 - dom-converter: 0.2.0 - htmlparser2: 6.1.0 - lodash: 4.17.21 - strip-ansi: 6.0.1 - - repeat-element@1.1.4: {} - - repeat-string@1.6.1: {} - - req-cwd@2.0.0: - dependencies: - req-from: 2.0.0 - - req-from@2.0.0: - dependencies: - resolve-from: 3.0.0 - - request@2.88.2: - dependencies: - aws-sign2: 0.7.0 - aws4: 1.13.2 - caseless: 0.12.0 - combined-stream: 1.0.8 - extend: 3.0.2 - forever-agent: 0.6.1 - form-data: 2.3.3 - har-validator: 5.1.5 - http-signature: 1.2.0 - is-typedarray: 1.0.0 - isstream: 0.1.2 - json-stringify-safe: 5.0.1 - mime-types: 2.1.35 - oauth-sign: 0.9.0 - performance-now: 2.1.0 - qs: 6.5.3 - safe-buffer: 5.2.1 - tough-cookie: 2.5.0 - tunnel-agent: 0.6.0 - uuid: 3.4.0 - - require-directory@2.1.1: {} - - require-from-string@2.0.2: {} - - require-main-filename@2.0.0: {} - - requires-port@1.0.0: {} - - resolve-alpn@1.2.1: {} - - resolve-cwd@2.0.0: - dependencies: - resolve-from: 3.0.0 - - resolve-cwd@3.0.0: - dependencies: - resolve-from: 5.0.0 - - resolve-from@3.0.0: {} - - resolve-from@4.0.0: {} - - resolve-from@5.0.0: {} - - resolve-pkg-maps@1.0.0: {} - - resolve-url@0.2.1: {} - - resolve@1.1.7: {} - - resolve@1.17.0: - dependencies: - path-parse: 1.0.7 - - resolve@1.22.10: - dependencies: - is-core-module: 2.16.1 - path-parse: 1.0.7 - supports-preserve-symlinks-flag: 1.0.0 - - resolve@1.22.8: - dependencies: - is-core-module: 2.15.1 - path-parse: 1.0.7 - supports-preserve-symlinks-flag: 1.0.0 - - responselike@2.0.1: - dependencies: - lowercase-keys: 2.0.0 - - ret@0.1.15: {} - - retry@0.12.0: {} - - reusify@1.0.4: {} - - rimraf@2.7.1: - dependencies: - glob: 7.2.3 - - rimraf@3.0.2: - dependencies: - glob: 7.2.3 - - rimraf@6.0.1: - dependencies: - glob: 11.0.0 - package-json-from-dist: 1.0.1 - - ripemd160@2.0.2: - dependencies: - hash-base: 3.1.0 - inherits: 2.0.4 - - rlp@2.2.7: - dependencies: - bn.js: 5.2.1 - - rollup@2.79.2: - optionalDependencies: - fsevents: 2.3.3 - - run-parallel@1.2.0: - dependencies: - queue-microtask: 1.2.3 - - rxjs@7.8.1: - dependencies: - tslib: 2.8.0 - - safe-array-concat@1.1.2: - dependencies: - call-bind: 1.0.7 - get-intrinsic: 1.2.4 - has-symbols: 1.0.3 - isarray: 2.0.5 - - safe-buffer@5.1.2: {} - - safe-buffer@5.2.1: {} - - safe-regex-test@1.0.3: - dependencies: - call-bind: 1.0.7 - es-errors: 1.3.0 - is-regex: 1.1.4 - - safe-regex@1.1.0: - dependencies: - ret: 0.1.15 - - safer-buffer@2.1.2: {} - - sc-istanbul@0.4.6: - dependencies: - abbrev: 1.0.9 - async: 1.5.2 - escodegen: 1.8.1 - esprima: 2.7.3 - glob: 5.0.15 - handlebars: 4.7.8 - js-yaml: 3.14.1 - mkdirp: 0.5.6 - nopt: 3.0.6 - once: 1.4.0 - resolve: 1.1.7 - supports-color: 3.2.3 - which: 1.3.1 - wordwrap: 1.0.0 - - schema-utils@1.0.0: - dependencies: - ajv: 6.12.6 - ajv-errors: 1.0.1(ajv@6.12.6) - ajv-keywords: 3.5.2(ajv@6.12.6) - - schema-utils@3.3.0: - dependencies: - '@types/json-schema': 7.0.15 - ajv: 6.12.6 - ajv-keywords: 3.5.2(ajv@6.12.6) - - schema-utils@4.2.0: - dependencies: - '@types/json-schema': 7.0.15 - ajv: 8.17.1 - ajv-formats: 2.1.1(ajv@8.17.1) - ajv-keywords: 5.1.0(ajv@8.17.1) - - scrypt-js@3.0.1: {} - - secp256k1@4.0.4: - dependencies: - elliptic: 6.5.7 - node-addon-api: 5.1.0 - node-gyp-build: 4.8.2 - - select-hose@2.0.0: {} - - selfsigned@1.10.14: - dependencies: - node-forge: 1.3.1 - - semver@5.7.2: {} - - semver@6.3.1: {} - - semver@7.6.3: {} - - semver@7.7.1: {} - - send@0.19.0(supports-color@6.1.0): - dependencies: - debug: 2.6.9(supports-color@6.1.0) - depd: 2.0.0 - destroy: 1.2.0 - encodeurl: 1.0.2 - escape-html: 1.0.3 - etag: 1.8.1 - fresh: 0.5.2 - http-errors: 2.0.0 - mime: 1.6.0 - ms: 2.1.3 - on-finished: 2.4.1 - range-parser: 1.2.1 - statuses: 2.0.1 - transitivePeerDependencies: - - supports-color - - serialize-error@7.0.1: - dependencies: - type-fest: 0.13.1 - - serialize-javascript@6.0.2: - dependencies: - randombytes: 2.1.0 - - serve-index@1.9.1(supports-color@6.1.0): - dependencies: - accepts: 1.3.8 - batch: 0.6.1 - debug: 2.6.9(supports-color@6.1.0) - escape-html: 1.0.3 - http-errors: 1.6.3 - mime-types: 2.1.35 - parseurl: 1.3.3 - transitivePeerDependencies: - - supports-color - - serve-static@1.16.2(supports-color@6.1.0): - dependencies: - encodeurl: 2.0.0 - escape-html: 1.0.3 - parseurl: 1.3.3 - send: 0.19.0(supports-color@6.1.0) - transitivePeerDependencies: - - supports-color - - servify@0.1.12: - dependencies: - body-parser: 1.20.3(supports-color@6.1.0) - cors: 2.8.5 - express: 4.21.1(supports-color@6.1.0) - request: 2.88.2 - xhr: 2.6.0 - transitivePeerDependencies: - - supports-color - - set-blocking@2.0.0: {} - - set-function-length@1.2.2: - dependencies: - define-data-property: 1.1.4 - es-errors: 1.3.0 - function-bind: 1.1.2 - get-intrinsic: 1.2.4 - gopd: 1.0.1 - has-property-descriptors: 1.0.2 - - set-function-name@2.0.2: - dependencies: - define-data-property: 1.1.4 - es-errors: 1.3.0 - functions-have-names: 1.2.3 - has-property-descriptors: 1.0.2 - - set-value@2.0.1: - dependencies: - extend-shallow: 2.0.1 - is-extendable: 0.1.1 - is-plain-object: 2.0.4 - split-string: 3.1.0 - - setimmediate@1.0.5: {} - - setprototypeof@1.1.0: {} - - setprototypeof@1.2.0: {} - - sha.js@2.4.11: - dependencies: - inherits: 2.0.4 - safe-buffer: 5.2.1 - - sha1@1.1.1: - dependencies: - charenc: 0.0.2 - crypt: 0.0.2 - - shallow-clone@3.0.1: - dependencies: - kind-of: 6.0.3 - - shebang-command@1.2.0: - dependencies: - shebang-regex: 1.0.0 - - shebang-command@2.0.0: - dependencies: - shebang-regex: 3.0.0 - - shebang-regex@1.0.0: {} - - shebang-regex@3.0.0: {} - - shell-quote@1.8.1: {} - - shelljs@0.8.5: - dependencies: - glob: 7.2.3 - interpret: 1.4.0 - rechoir: 0.6.2 - - side-channel-list@1.0.0: - dependencies: - es-errors: 1.3.0 - object-inspect: 1.13.4 - - side-channel-map@1.0.1: - dependencies: - call-bound: 1.0.4 - es-errors: 1.3.0 - get-intrinsic: 1.3.0 - object-inspect: 1.13.4 - - side-channel-weakmap@1.0.2: - dependencies: - call-bound: 1.0.4 - es-errors: 1.3.0 - get-intrinsic: 1.3.0 - object-inspect: 1.13.4 - side-channel-map: 1.0.1 - - side-channel@1.0.6: - dependencies: - call-bind: 1.0.7 - es-errors: 1.3.0 - get-intrinsic: 1.2.4 - object-inspect: 1.13.2 - - side-channel@1.1.0: - dependencies: - es-errors: 1.3.0 - object-inspect: 1.13.4 - side-channel-list: 1.0.0 - side-channel-map: 1.0.1 - side-channel-weakmap: 1.0.2 - - signal-exit@3.0.7: {} - - signal-exit@4.1.0: {} - - simple-concat@1.0.1: {} - - simple-get@2.8.2: - dependencies: - decompress-response: 3.3.0 - once: 1.4.0 - simple-concat: 1.0.1 - - sisteransi@1.0.5: {} - - slash@3.0.0: {} - - slash@5.1.0: {} - - slice-ansi@4.0.0: - dependencies: - ansi-styles: 4.3.0 - astral-regex: 2.0.0 - is-fullwidth-code-point: 3.0.0 - - slice-ansi@5.0.0: - dependencies: - ansi-styles: 6.2.1 - is-fullwidth-code-point: 4.0.0 - - smart-buffer@4.2.0: {} - - snapdragon-node@2.1.1: - dependencies: - define-property: 1.0.0 - isobject: 3.0.1 - snapdragon-util: 3.0.1 - - snapdragon-util@3.0.1: - dependencies: - kind-of: 3.2.2 - - snapdragon@0.8.2(supports-color@6.1.0): - dependencies: - base: 0.11.2 - debug: 2.6.9(supports-color@6.1.0) - define-property: 0.2.5 - extend-shallow: 2.0.1 - map-cache: 0.2.2 - source-map: 0.5.7 - source-map-resolve: 0.5.3 - use: 3.1.1 - transitivePeerDependencies: - - supports-color - - sockjs-client@1.6.1(supports-color@6.1.0): - dependencies: - debug: 3.2.7(supports-color@6.1.0) - eventsource: 2.0.2 - faye-websocket: 0.11.4 - inherits: 2.0.4 - url-parse: 1.5.10 - transitivePeerDependencies: - - supports-color - - sockjs@0.3.24: - dependencies: - faye-websocket: 0.11.4 - uuid: 8.3.2 - websocket-driver: 0.7.4 - - socks-proxy-agent@7.0.0: - dependencies: - agent-base: 6.0.2 - debug: 4.3.7(supports-color@6.1.0) - socks: 2.8.3 - transitivePeerDependencies: - - supports-color - - socks-proxy-agent@8.0.4: - dependencies: - agent-base: 7.1.1 - debug: 4.3.7(supports-color@6.1.0) - socks: 2.8.3 - transitivePeerDependencies: - - supports-color - - socks-proxy-agent@8.0.5: - dependencies: - agent-base: 7.1.3 - debug: 4.4.0(supports-color@8.1.1) - socks: 2.8.3 - transitivePeerDependencies: - - supports-color - - socks@2.8.3: - dependencies: - ip-address: 9.0.5 - smart-buffer: 4.2.0 - - solc@0.8.26(debug@4.3.7): - dependencies: - command-exists: 1.2.9 - commander: 8.3.0 - follow-redirects: 1.15.9(debug@4.3.7) - js-sha3: 0.8.0 - memorystream: 0.3.1 - semver: 5.7.2 - tmp: 0.0.33 - transitivePeerDependencies: - - debug - - solidity-coverage@0.8.13(hardhat@2.22.14(bufferutil@4.0.8)(ts-node@10.9.2(@types/node@22.7.9)(typescript@5.6.3))(typescript@5.6.3)(utf-8-validate@5.0.10)): - dependencies: - '@ethersproject/abi': 5.8.0 - '@solidity-parser/parser': 0.18.0 - chalk: 2.4.2 - death: 1.1.0 - difflib: 0.2.4 - fs-extra: 8.1.0 - ghost-testrpc: 0.0.2 - global-modules: 2.0.0 - globby: 10.0.2 - hardhat: 2.22.14(bufferutil@4.0.8)(ts-node@10.9.2(@types/node@22.7.9)(typescript@5.6.3))(typescript@5.6.3)(utf-8-validate@5.0.10) - jsonschema: 1.5.0 - lodash: 4.17.21 - mocha: 10.8.2 - node-emoji: 1.11.0 - pify: 4.0.1 - recursive-readdir: 2.2.3 - sc-istanbul: 0.4.6 - semver: 7.7.1 - shelljs: 0.8.5 - web3-utils: 1.10.4 - - source-map-resolve@0.5.3: - dependencies: - atob: 2.1.2 - decode-uri-component: 0.2.2 - resolve-url: 0.2.1 - source-map-url: 0.4.1 - urix: 0.1.0 - - source-map-support@0.5.21: - dependencies: - buffer-from: 1.1.2 - source-map: 0.6.1 - - source-map-url@0.4.1: {} - - source-map@0.2.0: - dependencies: - amdefine: 1.0.1 - optional: true - - source-map@0.5.7: {} - - source-map@0.6.1: {} - - sourcemap-codec@1.4.8: {} - - spawn-wrap@2.0.0: - dependencies: - foreground-child: 2.0.0 - is-windows: 1.0.2 - make-dir: 3.1.0 - rimraf: 3.0.2 - signal-exit: 3.0.7 - which: 2.0.2 - - spawndamnit@2.0.0: - dependencies: - cross-spawn: 5.1.0 - signal-exit: 3.0.7 - - spdy-transport@3.0.0(supports-color@6.1.0): - dependencies: - debug: 4.3.7(supports-color@6.1.0) - detect-node: 2.1.0 - hpack.js: 2.1.6 - obuf: 1.1.2 - readable-stream: 3.6.2 - wbuf: 1.7.3 - transitivePeerDependencies: - - supports-color - - spdy@4.0.2(supports-color@6.1.0): - dependencies: - debug: 4.3.7(supports-color@6.1.0) - handle-thing: 2.0.1 - http-deceiver: 1.2.7 - select-hose: 2.0.0 - spdy-transport: 3.0.0(supports-color@6.1.0) - transitivePeerDependencies: - - supports-color - - split-string@3.1.0: - dependencies: - extend-shallow: 3.0.2 - - split2@3.2.2: - dependencies: - readable-stream: 3.6.2 - - sprintf-js@1.0.3: {} - - sprintf-js@1.1.3: {} - - sshpk@1.18.0: - dependencies: - asn1: 0.2.6 - assert-plus: 1.0.0 - bcrypt-pbkdf: 1.0.2 - dashdash: 1.14.1 - ecc-jsbn: 0.1.2 - getpass: 0.1.7 - jsbn: 0.1.1 - safer-buffer: 2.1.2 - tweetnacl: 0.14.5 - - stack-utils@2.0.6: - dependencies: - escape-string-regexp: 2.0.0 - - stacktrace-parser@0.1.10: - dependencies: - type-fest: 0.7.1 - - static-extend@0.1.2: - dependencies: - define-property: 0.2.5 - object-copy: 0.1.0 - - statuses@1.5.0: {} - - statuses@2.0.1: {} - - stream-shift@1.0.3: {} - - streamx@2.20.1: - dependencies: - fast-fifo: 1.3.2 - queue-tick: 1.0.1 - text-decoder: 1.2.1 - optionalDependencies: - bare-events: 2.5.0 - - strict-uri-encode@1.1.0: {} - - string-format@2.0.0: {} - - string-width@2.1.1: - dependencies: - is-fullwidth-code-point: 2.0.0 - strip-ansi: 4.0.0 - - string-width@3.1.0: - dependencies: - emoji-regex: 7.0.3 - is-fullwidth-code-point: 2.0.0 - strip-ansi: 5.2.0 - - string-width@4.2.3: - dependencies: - emoji-regex: 8.0.0 - is-fullwidth-code-point: 3.0.0 - strip-ansi: 6.0.1 - - string-width@5.1.2: - dependencies: - eastasianwidth: 0.2.0 - emoji-regex: 9.2.2 - strip-ansi: 7.1.0 - - string-width@7.2.0: - dependencies: - emoji-regex: 10.4.0 - get-east-asian-width: 1.3.0 - strip-ansi: 7.1.0 - - string.prototype.trim@1.2.9: - dependencies: - call-bind: 1.0.7 - define-properties: 1.2.1 - es-abstract: 1.23.3 - es-object-atoms: 1.0.0 - - string.prototype.trimend@1.0.8: - dependencies: - call-bind: 1.0.7 - define-properties: 1.2.1 - es-object-atoms: 1.0.0 - - string.prototype.trimstart@1.0.8: - dependencies: - call-bind: 1.0.7 - define-properties: 1.2.1 - es-object-atoms: 1.0.0 - - string_decoder@1.1.1: - dependencies: - safe-buffer: 5.1.2 - - string_decoder@1.3.0: - dependencies: - safe-buffer: 5.2.1 - - strip-ansi@3.0.1: - dependencies: - ansi-regex: 2.1.1 - - strip-ansi@4.0.0: - dependencies: - ansi-regex: 3.0.1 - - strip-ansi@5.2.0: - dependencies: - ansi-regex: 4.1.1 - - strip-ansi@6.0.1: - dependencies: - ansi-regex: 5.0.1 - - strip-ansi@7.1.0: - dependencies: - ansi-regex: 6.1.0 - - strip-bom@3.0.0: {} - - strip-bom@4.0.0: {} - - strip-eof@1.0.0: {} - - strip-hex-prefix@1.0.0: - dependencies: - is-hex-prefixed: 1.0.0 - - strip-json-comments@3.1.1: {} - - strnum@1.0.5: {} - - supertap@3.0.1: - dependencies: - indent-string: 5.0.0 - js-yaml: 3.14.1 - serialize-error: 7.0.1 - strip-ansi: 7.1.0 - - supports-color@3.2.3: - dependencies: - has-flag: 1.0.0 - - supports-color@5.5.0: - dependencies: - has-flag: 3.0.0 - - supports-color@6.1.0: - dependencies: - has-flag: 3.0.0 - - supports-color@7.2.0: - dependencies: - has-flag: 4.0.0 - - supports-color@8.1.1: - dependencies: - has-flag: 4.0.0 - - supports-preserve-symlinks-flag@1.0.0: {} - - swarm-js@0.1.42(bufferutil@4.0.8)(utf-8-validate@5.0.10): - dependencies: - bluebird: 3.7.2 - buffer: 5.7.1 - eth-lib: 0.1.29(bufferutil@4.0.8)(utf-8-validate@5.0.10) - fs-extra: 4.0.3 - got: 11.8.6 - mime-types: 2.1.35 - mkdirp-promise: 5.0.1 - mock-fs: 4.14.0 - setimmediate: 1.0.5 - tar: 4.4.19 - xhr-request: 1.1.0 - transitivePeerDependencies: - - bufferutil - - supports-color - - utf-8-validate - - symbol-observable@1.2.0: {} - - sync-request@6.1.0: - dependencies: - http-response-object: 3.0.2 - sync-rpc: 1.3.6 - then-request: 6.0.2 - - sync-rpc@1.3.6: - dependencies: - get-port: 3.2.0 - - synckit@0.9.2: - dependencies: - '@pkgr/core': 0.1.1 - tslib: 2.8.0 - - table-layout@1.0.2: - dependencies: - array-back: 4.0.2 - deep-extend: 0.6.0 - typical: 5.2.0 - wordwrapjs: 4.0.1 - - table@6.9.0: - dependencies: - ajv: 8.17.1 - lodash.truncate: 4.4.2 - slice-ansi: 4.0.0 - string-width: 4.2.3 - strip-ansi: 6.0.1 - - tapable@2.2.1: {} - - tar-fs@3.0.6: - dependencies: - pump: 3.0.2 - tar-stream: 3.1.7 - optionalDependencies: - bare-fs: 2.3.5 - bare-path: 2.1.3 - - tar-stream@3.1.7: - dependencies: - b4a: 1.6.7 - fast-fifo: 1.3.2 - streamx: 2.20.1 - - tar@4.4.19: - dependencies: - chownr: 1.1.4 - fs-minipass: 1.2.7 - minipass: 2.9.0 - minizlib: 1.3.3 - mkdirp: 0.5.6 - safe-buffer: 5.2.1 - yallist: 3.1.1 - - tar@6.2.1: - dependencies: - chownr: 2.0.0 - fs-minipass: 2.1.0 - minipass: 5.0.0 - minizlib: 2.1.2 - mkdirp: 1.0.4 - yallist: 4.0.0 - - temp-dir@3.0.0: {} - - term-size@2.2.1: {} - - terser-webpack-plugin@5.3.10(webpack@5.95.0): - dependencies: - '@jridgewell/trace-mapping': 0.3.25 - jest-worker: 27.5.1 - schema-utils: 3.3.0 - serialize-javascript: 6.0.2 - terser: 5.36.0 - webpack: 5.95.0(webpack-cli@4.10.0) - - terser@5.36.0: - dependencies: - '@jridgewell/source-map': 0.3.6 - acorn: 8.13.0 - commander: 2.20.3 - source-map-support: 0.5.21 - - test-exclude@6.0.0: - dependencies: - '@istanbuljs/schema': 0.1.3 - glob: 7.2.3 - minimatch: 3.1.2 - - text-decoder@1.2.1: {} - - text-table@0.2.0: {} - - then-request@6.0.2: - dependencies: - '@types/concat-stream': 1.6.1 - '@types/form-data': 0.0.33 - '@types/node': 8.10.66 - '@types/qs': 6.9.18 - caseless: 0.12.0 - concat-stream: 1.6.2 - form-data: 2.5.3 - http-basic: 8.1.3 - http-response-object: 3.0.2 - promise: 8.3.0 - qs: 6.14.0 - - through2@4.0.2: - dependencies: - readable-stream: 3.6.2 - - through@2.3.8: {} - - thunky@1.1.0: {} - - time-zone@1.0.0: {} - - timed-out@4.0.1: {} - - tmp@0.0.33: - dependencies: - os-tmpdir: 1.0.2 - - to-object-path@0.3.0: - dependencies: - kind-of: 3.2.2 - - to-regex-range@2.1.1: - dependencies: - is-number: 3.0.0 - repeat-string: 1.6.1 - - to-regex-range@5.0.1: - dependencies: - is-number: 7.0.0 - - to-regex@3.0.2: - dependencies: - define-property: 2.0.2 - extend-shallow: 3.0.2 - regex-not: 1.0.2 - safe-regex: 1.1.0 - - toidentifier@1.0.1: {} - - tough-cookie@2.5.0: - dependencies: - psl: 1.9.0 - punycode: 2.3.1 - - tr46@0.0.3: {} - - tr46@2.1.0: - dependencies: - punycode: 2.3.1 - - tree-kill@1.2.2: {} - - ts-api-utils@1.3.0(typescript@5.6.3): - dependencies: - typescript: 5.6.3 - - ts-command-line-args@2.5.1: - dependencies: - chalk: 4.1.2 - command-line-args: 5.2.1 - command-line-usage: 6.1.3 - string-format: 2.0.0 - - ts-essentials@7.0.3(typescript@5.6.3): - dependencies: - typescript: 5.6.3 - - ts-node@10.9.2(@types/node@22.13.10)(typescript@5.6.3): - dependencies: - '@cspotcode/source-map-support': 0.8.1 - '@tsconfig/node10': 1.0.11 - '@tsconfig/node12': 1.0.11 - '@tsconfig/node14': 1.0.3 - '@tsconfig/node16': 1.0.4 - '@types/node': 22.13.10 - acorn: 8.13.0 - acorn-walk: 8.3.4 - arg: 4.1.3 - create-require: 1.1.1 - diff: 4.0.2 - make-error: 1.3.6 - typescript: 5.6.3 - v8-compile-cache-lib: 3.0.1 - yn: 3.1.1 - optional: true - - ts-node@10.9.2(@types/node@22.7.9)(typescript@5.6.3): - dependencies: - '@cspotcode/source-map-support': 0.8.1 - '@tsconfig/node10': 1.0.11 - '@tsconfig/node12': 1.0.11 - '@tsconfig/node14': 1.0.3 - '@tsconfig/node16': 1.0.4 - '@types/node': 22.7.9 - acorn: 8.13.0 - acorn-walk: 8.3.4 - arg: 4.1.3 - create-require: 1.1.1 - diff: 4.0.2 - make-error: 1.3.6 - typescript: 5.6.3 - v8-compile-cache-lib: 3.0.1 - yn: 3.1.1 - - tsconfig-paths@3.15.0: - dependencies: - '@types/json5': 0.0.29 - json5: 1.0.2 - minimist: 1.2.8 - strip-bom: 3.0.0 - - tslib@1.14.1: {} - - tslib@2.7.0: {} - - tslib@2.8.0: {} - - tsort@0.0.1: {} - - tsx@4.19.1: - dependencies: - esbuild: 0.23.1 - get-tsconfig: 4.8.1 - optionalDependencies: - fsevents: 2.3.3 - - tunnel-agent@0.6.0: - dependencies: - safe-buffer: 5.2.1 - - tweetnacl-util@0.15.1: {} - - tweetnacl@0.14.5: {} - - tweetnacl@1.0.3: {} - - type-check@0.3.2: - dependencies: - prelude-ls: 1.1.2 - - type-check@0.4.0: - dependencies: - prelude-ls: 1.2.1 - - type-detect@4.1.0: {} - - type-fest@0.13.1: {} - - type-fest@0.20.2: {} - - type-fest@0.21.3: {} - - type-fest@0.7.1: {} - - type-fest@0.8.1: {} - - type-is@1.6.18: - dependencies: - media-typer: 0.3.0 - mime-types: 2.1.35 - - type@2.7.3: {} - - typechain@8.3.2(typescript@5.6.3): - dependencies: - '@types/prettier': 2.7.3 - debug: 4.3.7(supports-color@6.1.0) - fs-extra: 7.0.1 - glob: 7.1.7 - js-sha3: 0.8.0 - lodash: 4.17.21 - mkdirp: 1.0.4 - prettier: 2.8.8 - ts-command-line-args: 2.5.1 - ts-essentials: 7.0.3(typescript@5.6.3) - typescript: 5.6.3 - transitivePeerDependencies: - - supports-color - - typed-array-buffer@1.0.2: - dependencies: - call-bind: 1.0.7 - es-errors: 1.3.0 - is-typed-array: 1.1.13 - - typed-array-byte-length@1.0.1: - dependencies: - call-bind: 1.0.7 - for-each: 0.3.3 - gopd: 1.0.1 - has-proto: 1.0.3 - is-typed-array: 1.1.13 - - typed-array-byte-offset@1.0.2: - dependencies: - available-typed-arrays: 1.0.7 - call-bind: 1.0.7 - for-each: 0.3.3 - gopd: 1.0.1 - has-proto: 1.0.3 - is-typed-array: 1.1.13 - - typed-array-length@1.0.6: - dependencies: - call-bind: 1.0.7 - for-each: 0.3.3 - gopd: 1.0.1 - has-proto: 1.0.3 - is-typed-array: 1.1.13 - possible-typed-array-names: 1.0.0 - - typed-error@3.2.2: {} - - typed-query-selector@2.12.0: {} - - typedarray-to-buffer@3.1.5: - dependencies: - is-typedarray: 1.0.0 - - typedarray@0.0.6: {} - - typescript@5.6.3: {} - - typeson-registry@1.0.0-alpha.39: - dependencies: - base64-arraybuffer-es6: 0.7.0 - typeson: 6.1.0 - whatwg-url: 8.7.0 - - typeson@6.1.0: {} - - typical@4.0.0: {} - - typical@5.2.0: {} - - uglify-js@3.19.3: - optional: true - - ultron@1.1.1: {} - - unbox-primitive@1.0.2: - dependencies: - call-bind: 1.0.7 - has-bigints: 1.0.2 - has-symbols: 1.0.3 - which-boxed-primitive: 1.0.2 - - unbzip2-stream@1.4.3: - dependencies: - buffer: 5.7.1 - through: 2.3.8 - - undici-types@6.19.8: {} - - undici-types@6.20.0: {} - - undici@5.28.4: - dependencies: - '@fastify/busboy': 2.1.1 - - undici@5.28.5: - dependencies: - '@fastify/busboy': 2.1.1 - - unicode-canonical-property-names-ecmascript@2.0.1: {} - - unicode-match-property-ecmascript@2.0.0: - dependencies: - unicode-canonical-property-names-ecmascript: 2.0.1 - unicode-property-aliases-ecmascript: 2.1.0 - - unicode-match-property-value-ecmascript@2.2.0: {} - - unicode-property-aliases-ecmascript@2.1.0: {} - - unicorn-magic@0.1.0: {} - - union-value@1.0.1: - dependencies: - arr-union: 3.1.0 - get-value: 2.0.6 - is-extendable: 0.1.1 - set-value: 2.0.1 - - universalify@0.1.2: {} - - universalify@2.0.1: {} - - unpipe@1.0.0: {} - - unset-value@1.0.0: - dependencies: - has-value: 0.3.1 - isobject: 3.0.1 - - upath@1.2.0: {} - - update-browserslist-db@1.1.1(browserslist@4.24.2): - dependencies: - browserslist: 4.24.2 - escalade: 3.2.0 - picocolors: 1.1.1 - - uri-js@4.4.1: - dependencies: - punycode: 2.3.1 - - urix@0.1.0: {} - - url-parse@1.5.10: - dependencies: - querystringify: 2.2.0 - requires-port: 1.0.0 - - url-set-query@1.0.0: {} - - url@0.11.4: - dependencies: - punycode: 1.4.1 - qs: 6.13.0 - - urlpattern-polyfill@10.0.0: {} - - urlpattern-polyfill@8.0.2: {} - - use@3.1.1: {} - - utf-8-validate@5.0.10: - dependencies: - node-gyp-build: 4.8.2 - - utf-8-validate@5.0.7: - dependencies: - node-gyp-build: 4.8.2 - optional: true - - utf-8-validate@6.0.3: - dependencies: - node-gyp-build: 4.8.2 - optional: true - - utf8@3.0.0: {} - - util-deprecate@1.0.2: {} - - util@0.12.5: - dependencies: - inherits: 2.0.4 - is-arguments: 1.1.1 - is-generator-function: 1.0.10 - is-typed-array: 1.1.13 - which-typed-array: 1.1.15 - - utila@0.4.0: {} - - utils-merge@1.0.1: {} - - uuid@3.4.0: {} - - uuid@8.3.2: {} - - uuid@9.0.1: {} - - v8-compile-cache-lib@3.0.1: {} - - v8-compile-cache@2.4.0: {} - - value-or-promise@1.0.11: {} - - varint@5.0.2: {} - - vary@1.1.2: {} - - verror@1.10.0: - dependencies: - assert-plus: 1.0.0 - core-util-is: 1.0.2 - extsprintf: 1.3.0 - - wait-on@8.0.1: - dependencies: - axios: 1.7.7 - joi: 17.13.3 - lodash: 4.17.21 - minimist: 1.2.8 - rxjs: 7.8.1 - transitivePeerDependencies: - - debug - - watchpack@2.4.2: - dependencies: - glob-to-regexp: 0.4.1 - graceful-fs: 4.2.11 - - wbuf@1.7.3: - dependencies: - minimalistic-assert: 1.0.1 - - web3-bzz@1.10.4(bufferutil@4.0.8)(utf-8-validate@5.0.10): - dependencies: - '@types/node': 12.20.55 - got: 12.1.0 - swarm-js: 0.1.42(bufferutil@4.0.8)(utf-8-validate@5.0.10) - transitivePeerDependencies: - - bufferutil - - supports-color - - utf-8-validate - - web3-core-helpers@1.10.4: - dependencies: - web3-eth-iban: 1.10.4 - web3-utils: 1.10.4 - - web3-core-method@1.10.4: - dependencies: - '@ethersproject/transactions': 5.7.0 - web3-core-helpers: 1.10.4 - web3-core-promievent: 1.10.4 - web3-core-subscriptions: 1.10.4 - web3-utils: 1.10.4 - - web3-core-promievent@1.10.4: - dependencies: - eventemitter3: 4.0.4 - - web3-core-requestmanager@1.10.4: - dependencies: - util: 0.12.5 - web3-core-helpers: 1.10.4 - web3-providers-http: 1.10.4 - web3-providers-ipc: 1.10.4 - web3-providers-ws: 1.10.4 - transitivePeerDependencies: - - encoding - - supports-color - - web3-core-subscriptions@1.10.4: - dependencies: - eventemitter3: 4.0.4 - web3-core-helpers: 1.10.4 - - web3-core@1.10.4: - dependencies: - '@types/bn.js': 5.1.6 - '@types/node': 12.20.55 - bignumber.js: 9.1.2 - web3-core-helpers: 1.10.4 - web3-core-method: 1.10.4 - web3-core-requestmanager: 1.10.4 - web3-utils: 1.10.4 - transitivePeerDependencies: - - encoding - - supports-color - - web3-eth-abi@1.10.4: - dependencies: - '@ethersproject/abi': 5.7.0 - web3-utils: 1.10.4 - - web3-eth-accounts@1.10.4: - dependencies: - '@ethereumjs/common': 2.6.5 - '@ethereumjs/tx': 3.5.2 - '@ethereumjs/util': 8.1.0 - eth-lib: 0.2.8 - scrypt-js: 3.0.1 - uuid: 9.0.1 - web3-core: 1.10.4 - web3-core-helpers: 1.10.4 - web3-core-method: 1.10.4 - web3-utils: 1.10.4 - transitivePeerDependencies: - - encoding - - supports-color - - web3-eth-contract@1.10.4: - dependencies: - '@types/bn.js': 5.1.6 - web3-core: 1.10.4 - web3-core-helpers: 1.10.4 - web3-core-method: 1.10.4 - web3-core-promievent: 1.10.4 - web3-core-subscriptions: 1.10.4 - web3-eth-abi: 1.10.4 - web3-utils: 1.10.4 - transitivePeerDependencies: - - encoding - - supports-color - - web3-eth-ens@1.10.4: - dependencies: - content-hash: 2.5.2 - eth-ens-namehash: 2.0.8 - web3-core: 1.10.4 - web3-core-helpers: 1.10.4 - web3-core-promievent: 1.10.4 - web3-eth-abi: 1.10.4 - web3-eth-contract: 1.10.4 - web3-utils: 1.10.4 - transitivePeerDependencies: - - encoding - - supports-color - - web3-eth-iban@1.10.4: - dependencies: - bn.js: 5.2.1 - web3-utils: 1.10.4 - - web3-eth-personal@1.10.4: - dependencies: - '@types/node': 12.20.55 - web3-core: 1.10.4 - web3-core-helpers: 1.10.4 - web3-core-method: 1.10.4 - web3-net: 1.10.4 - web3-utils: 1.10.4 - transitivePeerDependencies: - - encoding - - supports-color - - web3-eth@1.10.4: - dependencies: - web3-core: 1.10.4 - web3-core-helpers: 1.10.4 - web3-core-method: 1.10.4 - web3-core-subscriptions: 1.10.4 - web3-eth-abi: 1.10.4 - web3-eth-accounts: 1.10.4 - web3-eth-contract: 1.10.4 - web3-eth-ens: 1.10.4 - web3-eth-iban: 1.10.4 - web3-eth-personal: 1.10.4 - web3-net: 1.10.4 - web3-utils: 1.10.4 - transitivePeerDependencies: - - encoding - - supports-color - - web3-net@1.10.4: - dependencies: - web3-core: 1.10.4 - web3-core-method: 1.10.4 - web3-utils: 1.10.4 - transitivePeerDependencies: - - encoding - - supports-color - - web3-providers-http@1.10.4: - dependencies: - abortcontroller-polyfill: 1.7.5 - cross-fetch: 4.0.0 - es6-promise: 4.2.8 - web3-core-helpers: 1.10.4 - transitivePeerDependencies: - - encoding - - web3-providers-ipc@1.10.4: - dependencies: - oboe: 2.1.5 - web3-core-helpers: 1.10.4 - - web3-providers-ws@1.10.4: - dependencies: - eventemitter3: 4.0.4 - web3-core-helpers: 1.10.4 - websocket: 1.0.35 - transitivePeerDependencies: - - supports-color - - web3-shh@1.10.4: - dependencies: - web3-core: 1.10.4 - web3-core-method: 1.10.4 - web3-core-subscriptions: 1.10.4 - web3-net: 1.10.4 - transitivePeerDependencies: - - encoding - - supports-color - - web3-utils@1.10.4: - dependencies: - '@ethereumjs/util': 8.1.0 - bn.js: 5.2.1 - ethereum-bloom-filters: 1.2.0 - ethereum-cryptography: 2.2.1 - ethjs-unit: 0.1.6 - number-to-bn: 1.7.0 - randombytes: 2.1.0 - utf8: 3.0.0 - - web3@1.10.4(bufferutil@4.0.8)(utf-8-validate@5.0.10): - dependencies: - web3-bzz: 1.10.4(bufferutil@4.0.8)(utf-8-validate@5.0.10) - web3-core: 1.10.4 - web3-eth: 1.10.4 - web3-eth-personal: 1.10.4 - web3-net: 1.10.4 - web3-shh: 1.10.4 - web3-utils: 1.10.4 - transitivePeerDependencies: - - bufferutil - - encoding - - supports-color - - utf-8-validate - - webextension-polyfill@0.10.0: {} - - webidl-conversions@3.0.1: {} - - webidl-conversions@4.0.2: {} - - webidl-conversions@6.1.0: {} - - webpack-cli@4.10.0(webpack-dev-server@3.11.3)(webpack@5.95.0): - dependencies: - '@discoveryjs/json-ext': 0.5.7 - '@webpack-cli/configtest': 1.2.0(webpack-cli@4.10.0)(webpack@5.95.0) - '@webpack-cli/info': 1.5.0(webpack-cli@4.10.0) - '@webpack-cli/serve': 1.7.0(webpack-cli@4.10.0)(webpack-dev-server@3.11.3) - colorette: 2.0.20 - commander: 7.2.0 - cross-spawn: 7.0.3 - fastest-levenshtein: 1.0.16 - import-local: 3.2.0 - interpret: 2.2.0 - rechoir: 0.7.1 - webpack: 5.95.0(webpack-cli@4.10.0) - webpack-merge: 5.10.0 - optionalDependencies: - webpack-dev-server: 3.11.3(bufferutil@4.0.8)(utf-8-validate@6.0.3)(webpack-cli@4.10.0)(webpack@5.95.0) - - webpack-dev-middleware@3.7.3(webpack@5.95.0): - dependencies: - memory-fs: 0.4.1 - mime: 2.6.0 - mkdirp: 0.5.6 - range-parser: 1.2.1 - webpack: 5.95.0(webpack-cli@4.10.0) - webpack-log: 2.0.0 - - webpack-dev-server@3.11.3(bufferutil@4.0.8)(utf-8-validate@6.0.3)(webpack-cli@4.10.0)(webpack@5.95.0): - dependencies: - ansi-html-community: 0.0.8 - bonjour: 3.5.0 - chokidar: 2.1.8(supports-color@6.1.0) - compression: 1.7.4(supports-color@6.1.0) - connect-history-api-fallback: 1.6.0 - debug: 4.3.7(supports-color@6.1.0) - del: 4.1.1 - express: 4.21.1(supports-color@6.1.0) - html-entities: 1.4.0 - http-proxy-middleware: 0.19.1(debug@4.3.7(supports-color@6.1.0))(supports-color@6.1.0) - import-local: 2.0.0 - internal-ip: 4.3.0 - ip: 1.1.9 - is-absolute-url: 3.0.3 - killable: 1.0.1 - loglevel: 1.9.2 - opn: 5.5.0 - p-retry: 3.0.1 - portfinder: 1.0.32(supports-color@6.1.0) - schema-utils: 1.0.0 - selfsigned: 1.10.14 - semver: 6.3.1 - serve-index: 1.9.1(supports-color@6.1.0) - sockjs: 0.3.24 - sockjs-client: 1.6.1(supports-color@6.1.0) - spdy: 4.0.2(supports-color@6.1.0) - strip-ansi: 3.0.1 - supports-color: 6.1.0 - url: 0.11.4 - webpack: 5.95.0(webpack-cli@4.10.0) - webpack-dev-middleware: 3.7.3(webpack@5.95.0) - webpack-log: 2.0.0 - ws: 6.2.3(bufferutil@4.0.8)(utf-8-validate@6.0.3) - yargs: 13.3.2 - optionalDependencies: - webpack-cli: 4.10.0(webpack-dev-server@3.11.3)(webpack@5.95.0) - transitivePeerDependencies: - - bufferutil - - utf-8-validate - - webpack-log@2.0.0: - dependencies: - ansi-colors: 3.2.4 - uuid: 3.4.0 - - webpack-merge@5.10.0: - dependencies: - clone-deep: 4.0.1 - flat: 5.0.2 - wildcard: 2.0.1 - - webpack-sources@3.2.3: {} - - webpack@5.95.0(webpack-cli@4.10.0): - dependencies: - '@types/estree': 1.0.6 - '@webassemblyjs/ast': 1.12.1 - '@webassemblyjs/wasm-edit': 1.12.1 - '@webassemblyjs/wasm-parser': 1.12.1 - acorn: 8.13.0 - acorn-import-attributes: 1.9.5(acorn@8.13.0) - browserslist: 4.24.2 - chrome-trace-event: 1.0.4 - enhanced-resolve: 5.17.1 - es-module-lexer: 1.5.4 - eslint-scope: 5.1.1 - events: 3.3.0 - glob-to-regexp: 0.4.1 - graceful-fs: 4.2.11 - json-parse-even-better-errors: 2.3.1 - loader-runner: 4.3.0 - mime-types: 2.1.35 - neo-async: 2.6.2 - schema-utils: 3.3.0 - tapable: 2.2.1 - terser-webpack-plugin: 5.3.10(webpack@5.95.0) - watchpack: 2.4.2 - webpack-sources: 3.2.3 - optionalDependencies: - webpack-cli: 4.10.0(webpack-dev-server@3.11.3)(webpack@5.95.0) - transitivePeerDependencies: - - '@swc/core' - - esbuild - - uglify-js - - websocket-driver@0.7.4: - dependencies: - http-parser-js: 0.5.8 - safe-buffer: 5.2.1 - websocket-extensions: 0.1.4 - - websocket-extensions@0.1.4: {} - - websocket@1.0.35: - dependencies: - bufferutil: 4.0.8 - debug: 2.6.9(supports-color@6.1.0) - es5-ext: 0.10.64 - typedarray-to-buffer: 3.1.5 - utf-8-validate: 5.0.10 - yaeti: 0.0.6 - transitivePeerDependencies: - - supports-color - - well-known-symbols@2.0.0: {} - - whatwg-url@5.0.0: - dependencies: - tr46: 0.0.3 - webidl-conversions: 3.0.1 - - whatwg-url@8.7.0: - dependencies: - lodash: 4.17.21 - tr46: 2.1.0 - webidl-conversions: 6.1.0 - - which-boxed-primitive@1.0.2: - dependencies: - is-bigint: 1.0.4 - is-boolean-object: 1.1.2 - is-number-object: 1.0.7 - is-string: 1.0.7 - is-symbol: 1.0.4 - - which-module@2.0.1: {} - - which-typed-array@1.1.15: - dependencies: - available-typed-arrays: 1.0.7 - call-bind: 1.0.7 - for-each: 0.3.3 - gopd: 1.0.1 - has-tostringtag: 1.0.2 - - which@1.3.1: - dependencies: - isexe: 2.0.0 - - which@2.0.2: - dependencies: - isexe: 2.0.0 - - wide-align@1.1.5: - dependencies: - string-width: 4.2.3 - - widest-line@3.1.0: - dependencies: - string-width: 4.2.3 - - wildcard@2.0.1: {} - - word-wrap@1.2.5: {} - - wordwrap@1.0.0: {} - - wordwrapjs@4.0.1: - dependencies: - reduce-flatten: 2.0.0 - typical: 5.2.0 - - workerpool@6.5.1: {} - - wrap-ansi@5.1.0: - dependencies: - ansi-styles: 3.2.1 - string-width: 3.1.0 - strip-ansi: 5.2.0 - - wrap-ansi@6.2.0: - dependencies: - ansi-styles: 4.3.0 - string-width: 4.2.3 - strip-ansi: 6.0.1 - - wrap-ansi@7.0.0: - dependencies: - ansi-styles: 4.3.0 - string-width: 4.2.3 - strip-ansi: 6.0.1 - - wrap-ansi@8.1.0: - dependencies: - ansi-styles: 6.2.1 - string-width: 5.1.2 - strip-ansi: 7.1.0 - - wrappy@1.0.2: {} - - write-file-atomic@3.0.3: - dependencies: - imurmurhash: 0.1.4 - is-typedarray: 1.0.0 - signal-exit: 3.0.7 - typedarray-to-buffer: 3.1.5 - - write-file-atomic@5.0.1: - dependencies: - imurmurhash: 0.1.4 - signal-exit: 4.1.0 - - ws@3.3.3(bufferutil@4.0.8)(utf-8-validate@5.0.10): - dependencies: - async-limiter: 1.0.1 - safe-buffer: 5.1.2 - ultron: 1.1.1 - optionalDependencies: - bufferutil: 4.0.8 - utf-8-validate: 5.0.10 - - ws@6.2.3(bufferutil@4.0.8)(utf-8-validate@6.0.3): - dependencies: - async-limiter: 1.0.1 - optionalDependencies: - bufferutil: 4.0.8 - utf-8-validate: 6.0.3 - - ws@7.5.10(bufferutil@4.0.8)(utf-8-validate@5.0.10): - optionalDependencies: - bufferutil: 4.0.8 - utf-8-validate: 5.0.10 - - ws@7.5.10(bufferutil@4.0.8)(utf-8-validate@6.0.3): - optionalDependencies: - bufferutil: 4.0.8 - utf-8-validate: 6.0.3 - - ws@8.13.0(bufferutil@4.0.8)(utf-8-validate@6.0.3): - optionalDependencies: - bufferutil: 4.0.8 - utf-8-validate: 6.0.3 - - ws@8.17.1(bufferutil@4.0.8)(utf-8-validate@5.0.10): - optionalDependencies: - bufferutil: 4.0.8 - utf-8-validate: 5.0.10 - - ws@8.17.1(bufferutil@4.0.8)(utf-8-validate@6.0.3): - optionalDependencies: - bufferutil: 4.0.8 - utf-8-validate: 6.0.3 - - ws@8.18.0(bufferutil@4.0.8)(utf-8-validate@5.0.10): - optionalDependencies: - bufferutil: 4.0.8 - utf-8-validate: 5.0.10 - - xhr-request-promise@0.1.3: - dependencies: - xhr-request: 1.1.0 - - xhr-request@1.1.0: - dependencies: - buffer-to-arraybuffer: 0.0.5 - object-assign: 4.1.1 - query-string: 5.1.1 - simple-get: 2.8.2 - timed-out: 4.0.1 - url-set-query: 1.0.0 - xhr: 2.6.0 - - xhr@2.6.0: - dependencies: - global: 4.4.0 - is-function: 1.0.2 - parse-headers: 2.0.5 - xtend: 4.0.2 - - xtend@4.0.2: {} - - y18n@4.0.3: {} - - y18n@5.0.8: {} - - yaeti@0.0.6: {} - - yallist@2.1.2: {} - - yallist@3.1.1: {} - - yallist@4.0.0: {} - - yargs-parser@13.1.2: - dependencies: - camelcase: 5.3.1 - decamelize: 1.2.0 - - yargs-parser@18.1.3: - dependencies: - camelcase: 5.3.1 - decamelize: 1.2.0 - - yargs-parser@20.2.9: {} - - yargs-parser@21.1.1: {} - - yargs-unparser@2.0.0: - dependencies: - camelcase: 6.3.0 - decamelize: 4.0.0 - flat: 5.0.2 - is-plain-obj: 2.1.0 - - yargs@13.3.2: - dependencies: - cliui: 5.0.0 - find-up: 3.0.0 - get-caller-file: 2.0.5 - require-directory: 2.1.1 - require-main-filename: 2.0.0 - set-blocking: 2.0.0 - string-width: 3.1.0 - which-module: 2.0.1 - y18n: 4.0.3 - yargs-parser: 13.1.2 - - yargs@15.4.1: - dependencies: - cliui: 6.0.0 - decamelize: 1.2.0 - find-up: 4.1.0 - get-caller-file: 2.0.5 - require-directory: 2.1.1 - require-main-filename: 2.0.0 - set-blocking: 2.0.0 - string-width: 4.2.3 - which-module: 2.0.1 - y18n: 4.0.3 - yargs-parser: 18.1.3 - - yargs@16.2.0: - dependencies: - cliui: 7.0.4 - escalade: 3.2.0 - get-caller-file: 2.0.5 - require-directory: 2.1.1 - string-width: 4.2.3 - y18n: 5.0.8 - yargs-parser: 20.2.9 - - yargs@17.7.2: - dependencies: - cliui: 8.0.1 - escalade: 3.2.0 - get-caller-file: 2.0.5 - require-directory: 2.1.1 - string-width: 4.2.3 - y18n: 5.0.8 - yargs-parser: 21.1.1 - - yauzl@2.10.0: - dependencies: - buffer-crc32: 0.2.13 - fd-slicer: 1.1.0 - - yn@3.1.1: {} - - yocto-queue@0.1.0: {} - - yocto-queue@1.1.1: {} - - zod@3.23.8: {} - - zstd-codec@0.1.5: {} diff --git a/old/pnpm-workspace.yaml b/old/pnpm-workspace.yaml deleted file mode 100644 index 18ec407ef..000000000 --- a/old/pnpm-workspace.yaml +++ /dev/null @@ -1,2 +0,0 @@ -packages: - - 'packages/*' diff --git a/old/scripts/fix-mocha-ref.js b/old/scripts/fix-mocha-ref.js deleted file mode 100644 index 13074cf6d..000000000 --- a/old/scripts/fix-mocha-ref.js +++ /dev/null @@ -1,43 +0,0 @@ -// "mocha" package registers a global type which has proven to be next to impossible -// to exclude. As a result, `` is included in some random -// declarations, causing for applications which depend on our package to require -// @types/mocha package, which is super annoying / ridiculous. This script will -// search through dist/ folder for .d.ts files and remove any references. - -const fs = require('fs') -const path = require('path') - -const root = fs.realpathSync(process.cwd()) - -const getAllFiles = function(dirPath, arrayOfFiles) { - const files = fs.readdirSync(dirPath) - - arrayOfFiles = arrayOfFiles || [] - - files.forEach(function(file) { - if (file === 'node_modules') { - return - } - - if (fs.statSync(dirPath + "/" + file).isDirectory()) { - arrayOfFiles = getAllFiles(dirPath + "/" + file, arrayOfFiles) - } else if (file.endsWith('.d.ts')) { - arrayOfFiles.push(path.join(dirPath, "/", file)) - } - }) - - return arrayOfFiles -} - -const garbage = `/// ` - -const files = getAllFiles(root) - -files.forEach(function(file) { - let data = fs.readFileSync(file, 'utf8') - if (data.indexOf(garbage) < 0) { - return - } - data = data.replace(garbage, '') - fs.writeFileSync(file, data) -}) diff --git a/old/scripts/pnpm-link.sh b/old/scripts/pnpm-link.sh deleted file mode 100755 index baee87dc2..000000000 --- a/old/scripts/pnpm-link.sh +++ /dev/null @@ -1,36 +0,0 @@ -#!/usr/bin/env bash -set -eu - -function usage() { - echo "Usage:" - echo " $0 link" - echo " $0 unlink" - exit 1 -} - -test -z "${1-}" && usage -option="$1" -shift - -case "$option" in - "link") - ;; - "unlink") - ;; - *) - echo "$option: no such option" - usage - ;; -esac - -repo_dir=$(cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && cd .. && pwd) - -packages=($repo_dir/packages/*) -for p in "${packages[@]}" -do - x=$(realpath $p) - echo "$option $x" - pnpm $option $x -done - -exit $? diff --git a/old/scripts/update-network-names-doc.ts b/old/scripts/update-network-names-doc.ts deleted file mode 100644 index b41b465a2..000000000 --- a/old/scripts/update-network-names-doc.ts +++ /dev/null @@ -1,30 +0,0 @@ -const fs = require('fs') -const path = require('path') -const { networks } = require("@0xsequence/network/constants"); - -const networkPath = path.resolve(__dirname, '../packages/network') -const templatePath = path.join(networkPath, 'networkNames.template.md') -const outputPath = path.join(networkPath, 'networkNames.md') -const template = fs.readFileSync(templatePath, 'utf8') - -const networkObjs = Object.values(networks) as Array<{ - deprecated?: boolean, - chainId: number, - name: string, - title?: string -}>; - -const activeNetworkObjs = networkObjs.filter(v => !v.deprecated).sort((a, b) => a.chainId - b.chainId) - -const lines: string[] = []; -lines.push(`| Network Name | Chain ID | Name Slug |`); -lines.push(`| --- | --- | --- |`); -for (const n of activeNetworkObjs) { - lines.push(`| ${n.title} | ${n.chainId} | ${n.name} |`); -} - -const doc = template.replace("", lines.join("\n")); - -fs.writeFileSync(outputPath, doc, 'utf8') - -console.log(`Updated network/networkNames.md`) diff --git a/old/scripts/update-version.js b/old/scripts/update-version.js deleted file mode 100644 index 0397724d1..000000000 --- a/old/scripts/update-version.js +++ /dev/null @@ -1,11 +0,0 @@ -const fs = require('fs') -const path = require('path') - -const rootPath = path.resolve(__dirname, '../packages/core') -const packagePath = path.join(rootPath, 'package.json') -const packageJson = JSON.parse(fs.readFileSync(packagePath, 'utf8')) -const versionPath = path.join(rootPath, 'src', 'version.ts') - -fs.writeFileSync(versionPath, `export const VERSION = '${packageJson.version}'\n`, 'utf8') - -console.log(`Updated version to ${packageJson.version}`) diff --git a/old/tsconfig.json b/old/tsconfig.json deleted file mode 100644 index 57c756154..000000000 --- a/old/tsconfig.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "compilerOptions": { - "target": "es2021", - "module": "esnext", - "moduleResolution": "node", - "declaration": true, - "esModuleInterop": true, - "resolveJsonModule": true, - "allowSyntheticDefaultImports": true, - "allowJs": true, - "strictNullChecks": true, - "noImplicitAny": true, - "noImplicitReturns": true, - "isolatedModules": true, - "typeRoots": ["node_modules/@types"], - "types": ["node"] - }, - "include": ["./packages/**/src/**/*.ts"] -} diff --git a/old/tsconfig.test.json b/old/tsconfig.test.json deleted file mode 100644 index ff2758b41..000000000 --- a/old/tsconfig.test.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "compilerOptions": { - "target": "es2020", - "module": "commonjs", - "declaration": true, - "sourceMap": true, - "allowSyntheticDefaultImports": true, - "strictNullChecks": false, - "esModuleInterop": true, - "resolveJsonModule": true, - "lib": ["dom.iterable", "dom", "es2020"], - "types": ["node", "mocha", "puppeteer"] - }, - "include": ["./src/**/*", "./tests/**/*"] -} diff --git a/packages/core/.env.test b/packages/wallet/core/.env.test similarity index 100% rename from packages/core/.env.test rename to packages/wallet/core/.env.test diff --git a/packages/core/jest.config.ts b/packages/wallet/core/jest.config.ts similarity index 100% rename from packages/core/jest.config.ts rename to packages/wallet/core/jest.config.ts diff --git a/packages/core/package.json b/packages/wallet/core/package.json similarity index 100% rename from packages/core/package.json rename to packages/wallet/core/package.json diff --git a/packages/core/src/envelope.ts b/packages/wallet/core/src/envelope.ts similarity index 100% rename from packages/core/src/envelope.ts rename to packages/wallet/core/src/envelope.ts diff --git a/packages/core/src/index.ts b/packages/wallet/core/src/index.ts similarity index 100% rename from packages/core/src/index.ts rename to packages/wallet/core/src/index.ts diff --git a/packages/core/src/relayer/index.ts b/packages/wallet/core/src/relayer/index.ts similarity index 100% rename from packages/core/src/relayer/index.ts rename to packages/wallet/core/src/relayer/index.ts diff --git a/packages/core/src/relayer/local.ts b/packages/wallet/core/src/relayer/local.ts similarity index 100% rename from packages/core/src/relayer/local.ts rename to packages/wallet/core/src/relayer/local.ts diff --git a/packages/core/src/relayer/relayer.ts b/packages/wallet/core/src/relayer/relayer.ts similarity index 100% rename from packages/core/src/relayer/relayer.ts rename to packages/wallet/core/src/relayer/relayer.ts diff --git a/packages/core/src/signers/index.ts b/packages/wallet/core/src/signers/index.ts similarity index 100% rename from packages/core/src/signers/index.ts rename to packages/wallet/core/src/signers/index.ts diff --git a/packages/core/src/signers/passkey.ts b/packages/wallet/core/src/signers/passkey.ts similarity index 100% rename from packages/core/src/signers/passkey.ts rename to packages/wallet/core/src/signers/passkey.ts diff --git a/packages/core/src/signers/pk/encrypted.ts b/packages/wallet/core/src/signers/pk/encrypted.ts similarity index 100% rename from packages/core/src/signers/pk/encrypted.ts rename to packages/wallet/core/src/signers/pk/encrypted.ts diff --git a/packages/core/src/signers/pk/index.ts b/packages/wallet/core/src/signers/pk/index.ts similarity index 100% rename from packages/core/src/signers/pk/index.ts rename to packages/wallet/core/src/signers/pk/index.ts diff --git a/packages/core/src/signers/session-manager.ts b/packages/wallet/core/src/signers/session-manager.ts similarity index 100% rename from packages/core/src/signers/session-manager.ts rename to packages/wallet/core/src/signers/session-manager.ts diff --git a/packages/core/src/signers/session/explicit.ts b/packages/wallet/core/src/signers/session/explicit.ts similarity index 100% rename from packages/core/src/signers/session/explicit.ts rename to packages/wallet/core/src/signers/session/explicit.ts diff --git a/packages/core/src/signers/session/implicit.ts b/packages/wallet/core/src/signers/session/implicit.ts similarity index 100% rename from packages/core/src/signers/session/implicit.ts rename to packages/wallet/core/src/signers/session/implicit.ts diff --git a/packages/core/src/signers/session/index.ts b/packages/wallet/core/src/signers/session/index.ts similarity index 100% rename from packages/core/src/signers/session/index.ts rename to packages/wallet/core/src/signers/session/index.ts diff --git a/packages/core/src/signers/session/session.ts b/packages/wallet/core/src/signers/session/session.ts similarity index 100% rename from packages/core/src/signers/session/session.ts rename to packages/wallet/core/src/signers/session/session.ts diff --git a/packages/core/src/state/index.ts b/packages/wallet/core/src/state/index.ts similarity index 100% rename from packages/core/src/state/index.ts rename to packages/wallet/core/src/state/index.ts diff --git a/packages/core/src/state/local/index.ts b/packages/wallet/core/src/state/local/index.ts similarity index 100% rename from packages/core/src/state/local/index.ts rename to packages/wallet/core/src/state/local/index.ts diff --git a/packages/core/src/state/local/indexed-db.ts b/packages/wallet/core/src/state/local/indexed-db.ts similarity index 100% rename from packages/core/src/state/local/indexed-db.ts rename to packages/wallet/core/src/state/local/indexed-db.ts diff --git a/packages/core/src/state/local/memory.ts b/packages/wallet/core/src/state/local/memory.ts similarity index 100% rename from packages/core/src/state/local/memory.ts rename to packages/wallet/core/src/state/local/memory.ts diff --git a/packages/core/src/state/utils.ts b/packages/wallet/core/src/state/utils.ts similarity index 100% rename from packages/core/src/state/utils.ts rename to packages/wallet/core/src/state/utils.ts diff --git a/packages/core/src/wallet.ts b/packages/wallet/core/src/wallet.ts similarity index 100% rename from packages/core/src/wallet.ts rename to packages/wallet/core/src/wallet.ts diff --git a/packages/core/test/constants.ts b/packages/wallet/core/test/constants.ts similarity index 100% rename from packages/core/test/constants.ts rename to packages/wallet/core/test/constants.ts diff --git a/packages/core/test/session-manager.test.ts b/packages/wallet/core/test/session-manager.test.ts similarity index 100% rename from packages/core/test/session-manager.test.ts rename to packages/wallet/core/test/session-manager.test.ts diff --git a/packages/core/tsconfig.json b/packages/wallet/core/tsconfig.json similarity index 100% rename from packages/core/tsconfig.json rename to packages/wallet/core/tsconfig.json diff --git a/packages/primitives-cli/eslint.config.mjs b/packages/wallet/primitives-cli/eslint.config.mjs similarity index 100% rename from packages/primitives-cli/eslint.config.mjs rename to packages/wallet/primitives-cli/eslint.config.mjs diff --git a/packages/primitives-cli/package.json b/packages/wallet/primitives-cli/package.json similarity index 100% rename from packages/primitives-cli/package.json rename to packages/wallet/primitives-cli/package.json diff --git a/packages/primitives-cli/src/index.ts b/packages/wallet/primitives-cli/src/index.ts similarity index 100% rename from packages/primitives-cli/src/index.ts rename to packages/wallet/primitives-cli/src/index.ts diff --git a/packages/primitives-cli/src/subcommands/address.ts b/packages/wallet/primitives-cli/src/subcommands/address.ts similarity index 100% rename from packages/primitives-cli/src/subcommands/address.ts rename to packages/wallet/primitives-cli/src/subcommands/address.ts diff --git a/packages/primitives-cli/src/subcommands/config.ts b/packages/wallet/primitives-cli/src/subcommands/config.ts similarity index 100% rename from packages/primitives-cli/src/subcommands/config.ts rename to packages/wallet/primitives-cli/src/subcommands/config.ts diff --git a/packages/primitives-cli/src/subcommands/devTools.ts b/packages/wallet/primitives-cli/src/subcommands/devTools.ts similarity index 100% rename from packages/primitives-cli/src/subcommands/devTools.ts rename to packages/wallet/primitives-cli/src/subcommands/devTools.ts diff --git a/packages/primitives-cli/src/subcommands/passkeys.ts b/packages/wallet/primitives-cli/src/subcommands/passkeys.ts similarity index 100% rename from packages/primitives-cli/src/subcommands/passkeys.ts rename to packages/wallet/primitives-cli/src/subcommands/passkeys.ts diff --git a/packages/primitives-cli/src/subcommands/payload.ts b/packages/wallet/primitives-cli/src/subcommands/payload.ts similarity index 100% rename from packages/primitives-cli/src/subcommands/payload.ts rename to packages/wallet/primitives-cli/src/subcommands/payload.ts diff --git a/packages/primitives-cli/src/subcommands/recovery.ts b/packages/wallet/primitives-cli/src/subcommands/recovery.ts similarity index 100% rename from packages/primitives-cli/src/subcommands/recovery.ts rename to packages/wallet/primitives-cli/src/subcommands/recovery.ts diff --git a/packages/primitives-cli/src/subcommands/server.ts b/packages/wallet/primitives-cli/src/subcommands/server.ts similarity index 100% rename from packages/primitives-cli/src/subcommands/server.ts rename to packages/wallet/primitives-cli/src/subcommands/server.ts diff --git a/packages/primitives-cli/src/subcommands/session.ts b/packages/wallet/primitives-cli/src/subcommands/session.ts similarity index 100% rename from packages/primitives-cli/src/subcommands/session.ts rename to packages/wallet/primitives-cli/src/subcommands/session.ts diff --git a/packages/primitives-cli/src/subcommands/sessionExplicit.ts b/packages/wallet/primitives-cli/src/subcommands/sessionExplicit.ts similarity index 100% rename from packages/primitives-cli/src/subcommands/sessionExplicit.ts rename to packages/wallet/primitives-cli/src/subcommands/sessionExplicit.ts diff --git a/packages/primitives-cli/src/subcommands/sessionImplicit.ts b/packages/wallet/primitives-cli/src/subcommands/sessionImplicit.ts similarity index 100% rename from packages/primitives-cli/src/subcommands/sessionImplicit.ts rename to packages/wallet/primitives-cli/src/subcommands/sessionImplicit.ts diff --git a/packages/primitives-cli/src/subcommands/signature.ts b/packages/wallet/primitives-cli/src/subcommands/signature.ts similarity index 100% rename from packages/primitives-cli/src/subcommands/signature.ts rename to packages/wallet/primitives-cli/src/subcommands/signature.ts diff --git a/packages/primitives-cli/src/utils.ts b/packages/wallet/primitives-cli/src/utils.ts similarity index 100% rename from packages/primitives-cli/src/utils.ts rename to packages/wallet/primitives-cli/src/utils.ts diff --git a/packages/primitives-cli/tsconfig.json b/packages/wallet/primitives-cli/tsconfig.json similarity index 100% rename from packages/primitives-cli/tsconfig.json rename to packages/wallet/primitives-cli/tsconfig.json diff --git a/packages/primitives/eslint.config.mjs b/packages/wallet/primitives/eslint.config.mjs similarity index 100% rename from packages/primitives/eslint.config.mjs rename to packages/wallet/primitives/eslint.config.mjs diff --git a/packages/primitives/package.json b/packages/wallet/primitives/package.json similarity index 100% rename from packages/primitives/package.json rename to packages/wallet/primitives/package.json diff --git a/packages/primitives/src/address.ts b/packages/wallet/primitives/src/address.ts similarity index 100% rename from packages/primitives/src/address.ts rename to packages/wallet/primitives/src/address.ts diff --git a/packages/primitives/src/attestation.ts b/packages/wallet/primitives/src/attestation.ts similarity index 100% rename from packages/primitives/src/attestation.ts rename to packages/wallet/primitives/src/attestation.ts diff --git a/packages/primitives/src/config.ts b/packages/wallet/primitives/src/config.ts similarity index 100% rename from packages/primitives/src/config.ts rename to packages/wallet/primitives/src/config.ts diff --git a/packages/primitives/src/constants.ts b/packages/wallet/primitives/src/constants.ts similarity index 100% rename from packages/primitives/src/constants.ts rename to packages/wallet/primitives/src/constants.ts diff --git a/packages/primitives/src/context.ts b/packages/wallet/primitives/src/context.ts similarity index 100% rename from packages/primitives/src/context.ts rename to packages/wallet/primitives/src/context.ts diff --git a/packages/primitives/src/erc-6492.ts b/packages/wallet/primitives/src/erc-6492.ts similarity index 100% rename from packages/primitives/src/erc-6492.ts rename to packages/wallet/primitives/src/erc-6492.ts diff --git a/packages/primitives/src/extensions/index.ts b/packages/wallet/primitives/src/extensions/index.ts similarity index 100% rename from packages/primitives/src/extensions/index.ts rename to packages/wallet/primitives/src/extensions/index.ts diff --git a/packages/primitives/src/extensions/passkeys.ts b/packages/wallet/primitives/src/extensions/passkeys.ts similarity index 100% rename from packages/primitives/src/extensions/passkeys.ts rename to packages/wallet/primitives/src/extensions/passkeys.ts diff --git a/packages/primitives/src/extensions/recovery.ts b/packages/wallet/primitives/src/extensions/recovery.ts similarity index 100% rename from packages/primitives/src/extensions/recovery.ts rename to packages/wallet/primitives/src/extensions/recovery.ts diff --git a/packages/primitives/src/generic-tree.ts b/packages/wallet/primitives/src/generic-tree.ts similarity index 100% rename from packages/primitives/src/generic-tree.ts rename to packages/wallet/primitives/src/generic-tree.ts diff --git a/packages/primitives/src/index.ts b/packages/wallet/primitives/src/index.ts similarity index 100% rename from packages/primitives/src/index.ts rename to packages/wallet/primitives/src/index.ts diff --git a/packages/primitives/src/network.ts b/packages/wallet/primitives/src/network.ts similarity index 100% rename from packages/primitives/src/network.ts rename to packages/wallet/primitives/src/network.ts diff --git a/packages/primitives/src/payload.ts b/packages/wallet/primitives/src/payload.ts similarity index 100% rename from packages/primitives/src/payload.ts rename to packages/wallet/primitives/src/payload.ts diff --git a/packages/primitives/src/permission.ts b/packages/wallet/primitives/src/permission.ts similarity index 100% rename from packages/primitives/src/permission.ts rename to packages/wallet/primitives/src/permission.ts diff --git a/packages/primitives/src/session-config.ts b/packages/wallet/primitives/src/session-config.ts similarity index 100% rename from packages/primitives/src/session-config.ts rename to packages/wallet/primitives/src/session-config.ts diff --git a/packages/primitives/src/session-signature.ts b/packages/wallet/primitives/src/session-signature.ts similarity index 100% rename from packages/primitives/src/session-signature.ts rename to packages/wallet/primitives/src/session-signature.ts diff --git a/packages/primitives/src/signature.ts b/packages/wallet/primitives/src/signature.ts similarity index 100% rename from packages/primitives/src/signature.ts rename to packages/wallet/primitives/src/signature.ts diff --git a/packages/primitives/src/utils.ts b/packages/wallet/primitives/src/utils.ts similarity index 100% rename from packages/primitives/src/utils.ts rename to packages/wallet/primitives/src/utils.ts diff --git a/packages/primitives/tsconfig.json b/packages/wallet/primitives/tsconfig.json similarity index 100% rename from packages/primitives/tsconfig.json rename to packages/wallet/primitives/tsconfig.json diff --git a/packages/wdk/.env.test b/packages/wallet/wdk/.env.test similarity index 100% rename from packages/wdk/.env.test rename to packages/wallet/wdk/.env.test diff --git a/packages/wdk/jest.config.ts b/packages/wallet/wdk/jest.config.ts similarity index 100% rename from packages/wdk/jest.config.ts rename to packages/wallet/wdk/jest.config.ts diff --git a/packages/wdk/package.json b/packages/wallet/wdk/package.json similarity index 100% rename from packages/wdk/package.json rename to packages/wallet/wdk/package.json diff --git a/packages/wdk/src/dbs/auth-commitments.ts b/packages/wallet/wdk/src/dbs/auth-commitments.ts similarity index 100% rename from packages/wdk/src/dbs/auth-commitments.ts rename to packages/wallet/wdk/src/dbs/auth-commitments.ts diff --git a/packages/wdk/src/dbs/generic.ts b/packages/wallet/wdk/src/dbs/generic.ts similarity index 100% rename from packages/wdk/src/dbs/generic.ts rename to packages/wallet/wdk/src/dbs/generic.ts diff --git a/packages/wdk/src/dbs/index.ts b/packages/wallet/wdk/src/dbs/index.ts similarity index 100% rename from packages/wdk/src/dbs/index.ts rename to packages/wallet/wdk/src/dbs/index.ts diff --git a/packages/wdk/src/dbs/signatures.ts b/packages/wallet/wdk/src/dbs/signatures.ts similarity index 100% rename from packages/wdk/src/dbs/signatures.ts rename to packages/wallet/wdk/src/dbs/signatures.ts diff --git a/packages/wdk/src/dbs/transactions.ts b/packages/wallet/wdk/src/dbs/transactions.ts similarity index 100% rename from packages/wdk/src/dbs/transactions.ts rename to packages/wallet/wdk/src/dbs/transactions.ts diff --git a/packages/wdk/src/dbs/wallets.ts b/packages/wallet/wdk/src/dbs/wallets.ts similarity index 100% rename from packages/wdk/src/dbs/wallets.ts rename to packages/wallet/wdk/src/dbs/wallets.ts diff --git a/packages/wdk/src/identity/authkey.ts b/packages/wallet/wdk/src/identity/authkey.ts similarity index 100% rename from packages/wdk/src/identity/authkey.ts rename to packages/wallet/wdk/src/identity/authkey.ts diff --git a/packages/wdk/src/identity/challenge.ts b/packages/wallet/wdk/src/identity/challenge.ts similarity index 100% rename from packages/wdk/src/identity/challenge.ts rename to packages/wallet/wdk/src/identity/challenge.ts diff --git a/packages/wdk/src/identity/index.ts b/packages/wallet/wdk/src/identity/index.ts similarity index 100% rename from packages/wdk/src/identity/index.ts rename to packages/wallet/wdk/src/identity/index.ts diff --git a/packages/wdk/src/identity/nitro/identity-instrument.gen.ts b/packages/wallet/wdk/src/identity/nitro/identity-instrument.gen.ts similarity index 100% rename from packages/wdk/src/identity/nitro/identity-instrument.gen.ts rename to packages/wallet/wdk/src/identity/nitro/identity-instrument.gen.ts diff --git a/packages/wdk/src/identity/nitro/index.ts b/packages/wallet/wdk/src/identity/nitro/index.ts similarity index 100% rename from packages/wdk/src/identity/nitro/index.ts rename to packages/wallet/wdk/src/identity/nitro/index.ts diff --git a/packages/wdk/src/identity/secure-store.ts b/packages/wallet/wdk/src/identity/secure-store.ts similarity index 100% rename from packages/wdk/src/identity/secure-store.ts rename to packages/wallet/wdk/src/identity/secure-store.ts diff --git a/packages/wdk/src/identity/signer.ts b/packages/wallet/wdk/src/identity/signer.ts similarity index 100% rename from packages/wdk/src/identity/signer.ts rename to packages/wallet/wdk/src/identity/signer.ts diff --git a/packages/wdk/src/identity/subtle-crypto.ts b/packages/wallet/wdk/src/identity/subtle-crypto.ts similarity index 100% rename from packages/wdk/src/identity/subtle-crypto.ts rename to packages/wallet/wdk/src/identity/subtle-crypto.ts diff --git a/packages/wdk/src/identity/wdk.ts b/packages/wallet/wdk/src/identity/wdk.ts similarity index 100% rename from packages/wdk/src/identity/wdk.ts rename to packages/wallet/wdk/src/identity/wdk.ts diff --git a/packages/wdk/src/index.ts b/packages/wallet/wdk/src/index.ts similarity index 100% rename from packages/wdk/src/index.ts rename to packages/wallet/wdk/src/index.ts diff --git a/packages/wdk/src/sequence/devices.ts b/packages/wallet/wdk/src/sequence/devices.ts similarity index 100% rename from packages/wdk/src/sequence/devices.ts rename to packages/wallet/wdk/src/sequence/devices.ts diff --git a/packages/wdk/src/sequence/handlers/authcode-pkce.ts b/packages/wallet/wdk/src/sequence/handlers/authcode-pkce.ts similarity index 100% rename from packages/wdk/src/sequence/handlers/authcode-pkce.ts rename to packages/wallet/wdk/src/sequence/handlers/authcode-pkce.ts diff --git a/packages/wdk/src/sequence/handlers/devices.ts b/packages/wallet/wdk/src/sequence/handlers/devices.ts similarity index 100% rename from packages/wdk/src/sequence/handlers/devices.ts rename to packages/wallet/wdk/src/sequence/handlers/devices.ts diff --git a/packages/wdk/src/sequence/handlers/index.ts b/packages/wallet/wdk/src/sequence/handlers/index.ts similarity index 100% rename from packages/wdk/src/sequence/handlers/index.ts rename to packages/wallet/wdk/src/sequence/handlers/index.ts diff --git a/packages/wdk/src/sequence/handlers/mnemonic.ts b/packages/wallet/wdk/src/sequence/handlers/mnemonic.ts similarity index 100% rename from packages/wdk/src/sequence/handlers/mnemonic.ts rename to packages/wallet/wdk/src/sequence/handlers/mnemonic.ts diff --git a/packages/wdk/src/sequence/handlers/otp.ts b/packages/wallet/wdk/src/sequence/handlers/otp.ts similarity index 100% rename from packages/wdk/src/sequence/handlers/otp.ts rename to packages/wallet/wdk/src/sequence/handlers/otp.ts diff --git a/packages/wdk/src/sequence/handlers/passkeys.ts b/packages/wallet/wdk/src/sequence/handlers/passkeys.ts similarity index 100% rename from packages/wdk/src/sequence/handlers/passkeys.ts rename to packages/wallet/wdk/src/sequence/handlers/passkeys.ts diff --git a/packages/wdk/src/sequence/index.ts b/packages/wallet/wdk/src/sequence/index.ts similarity index 100% rename from packages/wdk/src/sequence/index.ts rename to packages/wallet/wdk/src/sequence/index.ts diff --git a/packages/wdk/src/sequence/logger.ts b/packages/wallet/wdk/src/sequence/logger.ts similarity index 100% rename from packages/wdk/src/sequence/logger.ts rename to packages/wallet/wdk/src/sequence/logger.ts diff --git a/packages/wdk/src/sequence/manager.ts b/packages/wallet/wdk/src/sequence/manager.ts similarity index 100% rename from packages/wdk/src/sequence/manager.ts rename to packages/wallet/wdk/src/sequence/manager.ts diff --git a/packages/wdk/src/sequence/sessions.ts b/packages/wallet/wdk/src/sequence/sessions.ts similarity index 100% rename from packages/wdk/src/sequence/sessions.ts rename to packages/wallet/wdk/src/sequence/sessions.ts diff --git a/packages/wdk/src/sequence/signatures.ts b/packages/wallet/wdk/src/sequence/signatures.ts similarity index 100% rename from packages/wdk/src/sequence/signatures.ts rename to packages/wallet/wdk/src/sequence/signatures.ts diff --git a/packages/wdk/src/sequence/signers.ts b/packages/wallet/wdk/src/sequence/signers.ts similarity index 100% rename from packages/wdk/src/sequence/signers.ts rename to packages/wallet/wdk/src/sequence/signers.ts diff --git a/packages/wdk/src/sequence/transactions.ts b/packages/wallet/wdk/src/sequence/transactions.ts similarity index 100% rename from packages/wdk/src/sequence/transactions.ts rename to packages/wallet/wdk/src/sequence/transactions.ts diff --git a/packages/wdk/src/sequence/types/index.ts b/packages/wallet/wdk/src/sequence/types/index.ts similarity index 100% rename from packages/wdk/src/sequence/types/index.ts rename to packages/wallet/wdk/src/sequence/types/index.ts diff --git a/packages/wdk/src/sequence/types/signatureRequest.ts b/packages/wallet/wdk/src/sequence/types/signatureRequest.ts similarity index 100% rename from packages/wdk/src/sequence/types/signatureRequest.ts rename to packages/wallet/wdk/src/sequence/types/signatureRequest.ts diff --git a/packages/wdk/src/sequence/types/transactionRequest.ts b/packages/wallet/wdk/src/sequence/types/transactionRequest.ts similarity index 100% rename from packages/wdk/src/sequence/types/transactionRequest.ts rename to packages/wallet/wdk/src/sequence/types/transactionRequest.ts diff --git a/packages/wdk/src/sequence/types/wallet.ts b/packages/wallet/wdk/src/sequence/types/wallet.ts similarity index 100% rename from packages/wdk/src/sequence/types/wallet.ts rename to packages/wallet/wdk/src/sequence/types/wallet.ts diff --git a/packages/wdk/src/sequence/wallets.ts b/packages/wallet/wdk/src/sequence/wallets.ts similarity index 100% rename from packages/wdk/src/sequence/wallets.ts rename to packages/wallet/wdk/src/sequence/wallets.ts diff --git a/packages/wdk/src/session/index.ts b/packages/wallet/wdk/src/session/index.ts similarity index 100% rename from packages/wdk/src/session/index.ts rename to packages/wallet/wdk/src/session/index.ts diff --git a/packages/wdk/src/session/session-controller.ts b/packages/wallet/wdk/src/session/session-controller.ts similarity index 100% rename from packages/wdk/src/session/session-controller.ts rename to packages/wallet/wdk/src/session/session-controller.ts diff --git a/packages/wdk/test/constants.ts b/packages/wallet/wdk/test/constants.ts similarity index 100% rename from packages/wdk/test/constants.ts rename to packages/wallet/wdk/test/constants.ts diff --git a/packages/wdk/tsconfig.json b/packages/wallet/wdk/tsconfig.json similarity index 100% rename from packages/wdk/tsconfig.json rename to packages/wallet/wdk/tsconfig.json diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index cc06d37ea..c9e8fad4e 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -132,88 +132,43 @@ importers: specifier: 5.5.4 version: 5.5.4 - packages/core: - dependencies: - '@0xsequence/sequence-primitives': - specifier: workspace:^ - version: link:../primitives - ox: - specifier: ^0.6.7 - version: 0.6.7(typescript@5.7.3) + packages/services/api: devDependencies: '@repo/typescript-config': specifier: workspace:^ - version: link:../../repo/typescript-config - '@types/jest': - specifier: ^29.5.14 - version: 29.5.14 + version: link:../../../repo/typescript-config '@types/node': specifier: ^22.13.9 version: 22.13.9 - dotenv: - specifier: ^16.4.7 - version: 16.4.7 - jest: - specifier: ^29.7.0 - version: 29.7.0(@types/node@22.13.9)(ts-node@10.9.2(@types/node@22.13.9)(typescript@5.7.3)) - ts-jest: - specifier: ^29.2.6 - version: 29.2.6(@babel/core@7.26.9)(@jest/transform@29.7.0)(@jest/types@29.6.3)(babel-jest@29.7.0(@babel/core@7.26.9))(jest@29.7.0(@types/node@22.13.9)(ts-node@10.9.2(@types/node@22.13.9)(typescript@5.7.3)))(typescript@5.7.3) typescript: specifier: ^5.7.3 - version: 5.7.3 + version: 5.8.3 - packages/primitives: - dependencies: - ox: - specifier: ^0.6.7 - version: 0.6.7(typescript@5.7.3) + packages/services/builder: devDependencies: '@repo/typescript-config': specifier: workspace:^ - version: link:../../repo/typescript-config + version: link:../../../repo/typescript-config + '@types/node': + specifier: ^22.13.9 + version: 22.13.9 typescript: specifier: ^5.7.3 - version: 5.7.3 + version: 5.8.3 - packages/primitives-cli: - dependencies: - '@0xsequence/sequence-primitives': - specifier: workspace:^ - version: link:../primitives - ox: - specifier: ^0.6.7 - version: 0.6.7(typescript@5.7.3) - yargs: - specifier: ^17.7.2 - version: 17.7.2 + packages/services/guard: devDependencies: - '@repo/eslint-config': - specifier: workspace:* - version: link:../../repo/eslint-config '@repo/typescript-config': specifier: workspace:^ - version: link:../../repo/typescript-config + version: link:../../../repo/typescript-config '@types/node': - specifier: ^22.10.9 - version: 22.10.9 - '@types/yargs': - specifier: ^17.0.33 - version: 17.0.33 - concurrently: - specifier: ^8.2.2 - version: 8.2.2 - esbuild: - specifier: ^0.24.2 - version: 0.24.2 - nodemon: - specifier: ^3.1.0 - version: 3.1.9 + specifier: ^22.13.9 + version: 22.13.9 typescript: specifier: ^5.7.3 - version: 5.7.3 + version: 5.8.3 - packages/services/api: + packages/services/indexer: devDependencies: '@repo/typescript-config': specifier: workspace:^ @@ -225,7 +180,7 @@ importers: specifier: ^5.7.3 version: 5.8.3 - packages/services/builder: + packages/services/marketplace: devDependencies: '@repo/typescript-config': specifier: workspace:^ @@ -237,7 +192,7 @@ importers: specifier: ^5.7.3 version: 5.8.3 - packages/services/guard: + packages/services/metadata: devDependencies: '@repo/typescript-config': specifier: workspace:^ @@ -249,7 +204,7 @@ importers: specifier: ^5.7.3 version: 5.8.3 - packages/services/indexer: + packages/services/relayer: devDependencies: '@repo/typescript-config': specifier: workspace:^ @@ -261,7 +216,7 @@ importers: specifier: ^5.7.3 version: 5.8.3 - packages/services/marketplace: + packages/utils/abi: devDependencies: '@repo/typescript-config': specifier: workspace:^ @@ -273,43 +228,88 @@ importers: specifier: ^5.7.3 version: 5.8.3 - packages/services/metadata: + packages/wallet/core: + dependencies: + '@0xsequence/sequence-primitives': + specifier: workspace:^ + version: link:../primitives + ox: + specifier: ^0.6.7 + version: 0.6.7(typescript@5.8.3) devDependencies: '@repo/typescript-config': specifier: workspace:^ version: link:../../../repo/typescript-config + '@types/jest': + specifier: ^29.5.14 + version: 29.5.14 '@types/node': specifier: ^22.13.9 version: 22.13.9 + dotenv: + specifier: ^16.4.7 + version: 16.4.7 + jest: + specifier: ^29.7.0 + version: 29.7.0(@types/node@22.13.9)(ts-node@10.9.2(@types/node@22.13.9)(typescript@5.8.3)) + ts-jest: + specifier: ^29.2.6 + version: 29.2.6(@babel/core@7.26.9)(@jest/transform@29.7.0)(@jest/types@29.6.3)(babel-jest@29.7.0(@babel/core@7.26.9))(jest@29.7.0(@types/node@22.13.9)(ts-node@10.9.2(@types/node@22.13.9)(typescript@5.8.3)))(typescript@5.8.3) typescript: specifier: ^5.7.3 version: 5.8.3 - packages/services/relayer: + packages/wallet/primitives: + dependencies: + ox: + specifier: ^0.6.7 + version: 0.6.7(typescript@5.8.3) devDependencies: '@repo/typescript-config': specifier: workspace:^ version: link:../../../repo/typescript-config - '@types/node': - specifier: ^22.13.9 - version: 22.13.9 typescript: specifier: ^5.7.3 version: 5.8.3 - packages/utils/abi: + packages/wallet/primitives-cli: + dependencies: + '@0xsequence/sequence-primitives': + specifier: workspace:^ + version: link:../primitives + ox: + specifier: ^0.6.7 + version: 0.6.7(typescript@5.8.3) + yargs: + specifier: ^17.7.2 + version: 17.7.2 devDependencies: + '@repo/eslint-config': + specifier: workspace:* + version: link:../../../repo/eslint-config '@repo/typescript-config': specifier: workspace:^ version: link:../../../repo/typescript-config '@types/node': - specifier: ^22.13.9 + specifier: ^22.10.9 version: 22.13.9 + '@types/yargs': + specifier: ^17.0.33 + version: 17.0.33 + concurrently: + specifier: ^8.2.2 + version: 8.2.2 + esbuild: + specifier: ^0.24.2 + version: 0.24.2 + nodemon: + specifier: ^3.1.0 + version: 3.1.9 typescript: specifier: ^5.7.3 version: 5.8.3 - packages/wdk: + packages/wallet/wdk: dependencies: '@0xsequence/sequence-core': specifier: workspace:^ @@ -325,14 +325,14 @@ importers: version: 4.0.0 ox: specifier: ^0.6.7 - version: 0.6.7(typescript@5.7.3) + version: 0.6.7(typescript@5.8.3) uuid: specifier: ^11.1.0 version: 11.1.0 devDependencies: '@repo/typescript-config': specifier: workspace:^ - version: link:../../repo/typescript-config + version: link:../../../repo/typescript-config '@types/jest': specifier: ^29.5.14 version: 29.5.14 @@ -344,13 +344,13 @@ importers: version: 16.4.7 jest: specifier: ^29.7.0 - version: 29.7.0(@types/node@22.13.9)(ts-node@10.9.2(@types/node@22.13.9)(typescript@5.7.3)) + version: 29.7.0(@types/node@22.13.9)(ts-node@10.9.2(@types/node@22.13.9)(typescript@5.8.3)) ts-jest: specifier: ^29.2.6 - version: 29.2.6(@babel/core@7.26.9)(@jest/transform@29.7.0)(@jest/types@29.6.3)(babel-jest@29.7.0(@babel/core@7.26.9))(jest@29.7.0(@types/node@22.13.9)(ts-node@10.9.2(@types/node@22.13.9)(typescript@5.7.3)))(typescript@5.7.3) + version: 29.2.6(@babel/core@7.26.9)(@jest/transform@29.7.0)(@jest/types@29.6.3)(babel-jest@29.7.0(@babel/core@7.26.9))(jest@29.7.0(@types/node@22.13.9)(ts-node@10.9.2(@types/node@22.13.9)(typescript@5.8.3)))(typescript@5.8.3) typescript: specifier: ^5.7.3 - version: 5.7.3 + version: 5.8.3 repo/eslint-config: devDependencies: @@ -1244,9 +1244,6 @@ packages: '@types/node@20.17.6': resolution: {integrity: sha512-VEI7OdvK2wP7XHnsuXbAJnEpEkF6NjSN45QJlL4VGqZSXsnicpesdTWsg9RISeSdYd3yeRj/y3k5KGjUXYnFwQ==} - '@types/node@22.10.9': - resolution: {integrity: sha512-Ir6hwgsKyNESl/gLOcEz3krR4CBGgliDqBQ2ma4wIhEx0w+xnoeTq3tdrNw15kU3SxogDjOgv9sqdtLW8mIHaw==} - '@types/node@22.13.9': resolution: {integrity: sha512-acBjXdRJ3A6Pb3tqnw9HZmyR3Fiol3aGxRCK1x3d+6CDAMjl7I649wpSd+yNURCjbOUGu9tqtLKnTGxmK6CyGw==} @@ -3191,11 +3188,6 @@ packages: resolution: {integrity: sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==} hasBin: true - semver@7.6.3: - resolution: {integrity: sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==} - engines: {node: '>=10'} - hasBin: true - semver@7.7.1: resolution: {integrity: sha512-hlq8tAfn0m/61p4BVRcPzIGr6LKiMwo4VM6dGi6pt4qcRkmNzTcWq6eCEjEh+qXjkMDvPlOFFSGwQjoEa6gyMA==} engines: {node: '>=10'} @@ -4271,7 +4263,7 @@ snapshots: jest-util: 29.7.0 slash: 3.0.0 - '@jest/core@29.7.0(ts-node@10.9.2(@types/node@22.13.9)(typescript@5.7.3))': + '@jest/core@29.7.0(ts-node@10.9.2(@types/node@22.13.9)(typescript@5.8.3))': dependencies: '@jest/console': 29.7.0 '@jest/reporters': 29.7.0 @@ -4285,7 +4277,7 @@ snapshots: exit: 0.1.2 graceful-fs: 4.2.11 jest-changed-files: 29.7.0 - jest-config: 29.7.0(@types/node@22.13.9)(ts-node@10.9.2(@types/node@22.13.9)(typescript@5.7.3)) + jest-config: 29.7.0(@types/node@22.13.9)(ts-node@10.9.2(@types/node@22.13.9)(typescript@5.8.3)) jest-haste-map: 29.7.0 jest-message-util: 29.7.0 jest-regex-util: 29.6.3 @@ -4646,10 +4638,6 @@ snapshots: dependencies: undici-types: 6.19.8 - '@types/node@22.10.9': - dependencies: - undici-types: 6.20.0 - '@types/node@22.13.9': dependencies: undici-types: 6.20.0 @@ -4774,9 +4762,9 @@ snapshots: optionalDependencies: typescript: 5.5.4 - abitype@1.0.8(typescript@5.7.3): + abitype@1.0.8(typescript@5.8.3): optionalDependencies: - typescript: 5.7.3 + typescript: 5.8.3 acorn-jsx@5.3.2(acorn@8.14.0): dependencies: @@ -5168,13 +5156,13 @@ snapshots: core-js-pure@3.39.0: {} - create-jest@29.7.0(@types/node@22.13.9)(ts-node@10.9.2(@types/node@22.13.9)(typescript@5.7.3)): + create-jest@29.7.0(@types/node@22.13.9)(ts-node@10.9.2(@types/node@22.13.9)(typescript@5.8.3)): dependencies: '@jest/types': 29.6.3 chalk: 4.1.2 exit: 0.1.2 graceful-fs: 4.2.11 - jest-config: 29.7.0(@types/node@22.13.9)(ts-node@10.9.2(@types/node@22.13.9)(typescript@5.7.3)) + jest-config: 29.7.0(@types/node@22.13.9)(ts-node@10.9.2(@types/node@22.13.9)(typescript@5.8.3)) jest-util: 29.7.0 prompts: 2.4.2 transitivePeerDependencies: @@ -6140,16 +6128,16 @@ snapshots: - babel-plugin-macros - supports-color - jest-cli@29.7.0(@types/node@22.13.9)(ts-node@10.9.2(@types/node@22.13.9)(typescript@5.7.3)): + jest-cli@29.7.0(@types/node@22.13.9)(ts-node@10.9.2(@types/node@22.13.9)(typescript@5.8.3)): dependencies: - '@jest/core': 29.7.0(ts-node@10.9.2(@types/node@22.13.9)(typescript@5.7.3)) + '@jest/core': 29.7.0(ts-node@10.9.2(@types/node@22.13.9)(typescript@5.8.3)) '@jest/test-result': 29.7.0 '@jest/types': 29.6.3 chalk: 4.1.2 - create-jest: 29.7.0(@types/node@22.13.9)(ts-node@10.9.2(@types/node@22.13.9)(typescript@5.7.3)) + create-jest: 29.7.0(@types/node@22.13.9)(ts-node@10.9.2(@types/node@22.13.9)(typescript@5.8.3)) exit: 0.1.2 import-local: 3.2.0 - jest-config: 29.7.0(@types/node@22.13.9)(ts-node@10.9.2(@types/node@22.13.9)(typescript@5.7.3)) + jest-config: 29.7.0(@types/node@22.13.9)(ts-node@10.9.2(@types/node@22.13.9)(typescript@5.8.3)) jest-util: 29.7.0 jest-validate: 29.7.0 yargs: 17.7.2 @@ -6159,7 +6147,7 @@ snapshots: - supports-color - ts-node - jest-config@29.7.0(@types/node@22.13.9)(ts-node@10.9.2(@types/node@22.13.9)(typescript@5.7.3)): + jest-config@29.7.0(@types/node@22.13.9)(ts-node@10.9.2(@types/node@22.13.9)(typescript@5.8.3)): dependencies: '@babel/core': 7.26.9 '@jest/test-sequencer': 29.7.0 @@ -6185,7 +6173,7 @@ snapshots: strip-json-comments: 3.1.1 optionalDependencies: '@types/node': 22.13.9 - ts-node: 10.9.2(@types/node@22.13.9)(typescript@5.7.3) + ts-node: 10.9.2(@types/node@22.13.9)(typescript@5.8.3) transitivePeerDependencies: - babel-plugin-macros - supports-color @@ -6405,12 +6393,12 @@ snapshots: merge-stream: 2.0.0 supports-color: 8.1.1 - jest@29.7.0(@types/node@22.13.9)(ts-node@10.9.2(@types/node@22.13.9)(typescript@5.7.3)): + jest@29.7.0(@types/node@22.13.9)(ts-node@10.9.2(@types/node@22.13.9)(typescript@5.8.3)): dependencies: - '@jest/core': 29.7.0(ts-node@10.9.2(@types/node@22.13.9)(typescript@5.7.3)) + '@jest/core': 29.7.0(ts-node@10.9.2(@types/node@22.13.9)(typescript@5.8.3)) '@jest/types': 29.6.3 import-local: 3.2.0 - jest-cli: 29.7.0(@types/node@22.13.9)(ts-node@10.9.2(@types/node@22.13.9)(typescript@5.7.3)) + jest-cli: 29.7.0(@types/node@22.13.9)(ts-node@10.9.2(@types/node@22.13.9)(typescript@5.8.3)) transitivePeerDependencies: - '@types/node' - babel-plugin-macros @@ -6669,7 +6657,7 @@ snapshots: ignore-by-default: 1.0.1 minimatch: 3.1.2 pstree.remy: 1.1.8 - semver: 7.6.3 + semver: 7.7.1 simple-update-notifier: 2.0.0 supports-color: 5.5.0 touch: 3.1.1 @@ -6771,17 +6759,17 @@ snapshots: transitivePeerDependencies: - zod - ox@0.6.7(typescript@5.7.3): + ox@0.6.7(typescript@5.8.3): dependencies: '@adraffy/ens-normalize': 1.11.0 '@noble/curves': 1.8.1 '@noble/hashes': 1.7.1 '@scure/bip32': 1.6.2 '@scure/bip39': 1.5.4 - abitype: 1.0.8(typescript@5.7.3) + abitype: 1.0.8(typescript@5.8.3) eventemitter3: 5.0.1 optionalDependencies: - typescript: 5.7.3 + typescript: 5.8.3 transitivePeerDependencies: - zod @@ -7066,8 +7054,6 @@ snapshots: semver@6.3.1: {} - semver@7.6.3: {} - semver@7.7.1: {} sentence-case@2.1.1: @@ -7144,7 +7130,7 @@ snapshots: simple-update-notifier@2.0.0: dependencies: - semver: 7.6.3 + semver: 7.7.1 sisteransi@1.0.5: {} @@ -7327,18 +7313,18 @@ snapshots: dependencies: typescript: 5.7.3 - ts-jest@29.2.6(@babel/core@7.26.9)(@jest/transform@29.7.0)(@jest/types@29.6.3)(babel-jest@29.7.0(@babel/core@7.26.9))(jest@29.7.0(@types/node@22.13.9)(ts-node@10.9.2(@types/node@22.13.9)(typescript@5.7.3)))(typescript@5.7.3): + ts-jest@29.2.6(@babel/core@7.26.9)(@jest/transform@29.7.0)(@jest/types@29.6.3)(babel-jest@29.7.0(@babel/core@7.26.9))(jest@29.7.0(@types/node@22.13.9)(ts-node@10.9.2(@types/node@22.13.9)(typescript@5.8.3)))(typescript@5.8.3): dependencies: bs-logger: 0.2.6 ejs: 3.1.10 fast-json-stable-stringify: 2.1.0 - jest: 29.7.0(@types/node@22.13.9)(ts-node@10.9.2(@types/node@22.13.9)(typescript@5.7.3)) + jest: 29.7.0(@types/node@22.13.9)(ts-node@10.9.2(@types/node@22.13.9)(typescript@5.8.3)) jest-util: 29.7.0 json5: 2.2.3 lodash.memoize: 4.1.2 make-error: 1.3.6 semver: 7.7.1 - typescript: 5.7.3 + typescript: 5.8.3 yargs-parser: 21.1.1 optionalDependencies: '@babel/core': 7.26.9 @@ -7364,7 +7350,7 @@ snapshots: v8-compile-cache-lib: 3.0.1 yn: 3.1.1 - ts-node@10.9.2(@types/node@22.13.9)(typescript@5.7.3): + ts-node@10.9.2(@types/node@22.13.9)(typescript@5.8.3): dependencies: '@cspotcode/source-map-support': 0.8.1 '@tsconfig/node10': 1.0.11 @@ -7378,7 +7364,7 @@ snapshots: create-require: 1.1.1 diff: 4.0.2 make-error: 1.3.6 - typescript: 5.7.3 + typescript: 5.8.3 v8-compile-cache-lib: 3.0.1 yn: 3.1.1 optional: true diff --git a/pnpm-workspace.yaml b/pnpm-workspace.yaml index 897621b37..bffc0ae58 100644 --- a/pnpm-workspace.yaml +++ b/pnpm-workspace.yaml @@ -1,7 +1,8 @@ packages: - - apps/* + - extras/* - packages/* - packages/services/* - packages/utils/* + - packages/wallet/* - repo/* - test/* From 16916dae77381fca974304849356c5171796c5cb Mon Sep 17 00:00:00 2001 From: Peter Kieltyka Date: Mon, 14 Apr 2025 18:05:53 -0400 Subject: [PATCH 308/439] rename @0xsequence/sequence-XXX to @0xsequence/wallet-XXX --- README.md | 6 +++--- extras/demo-wallet/app/email-otp/page.tsx | 2 +- .../demo-wallet/app/handlers/auth-code-pkce.tsx | 2 +- extras/demo-wallet/app/handlers/id-token.tsx | 2 +- extras/demo-wallet/app/handlers/otp.tsx | 2 +- extras/demo-wallet/app/lib/attestation.ts | 2 +- extras/demo-wallet/package.json | 2 +- packages/wallet/core/jest.config.ts | 4 ++-- packages/wallet/core/package.json | 4 ++-- packages/wallet/core/src/envelope.ts | 2 +- packages/wallet/core/src/relayer/local.ts | 2 +- packages/wallet/core/src/relayer/relayer.ts | 2 +- packages/wallet/core/src/signers/index.ts | 2 +- packages/wallet/core/src/signers/passkey.ts | 4 ++-- packages/wallet/core/src/signers/pk/index.ts | 4 ++-- .../wallet/core/src/signers/session-manager.ts | 2 +- .../wallet/core/src/signers/session/explicit.ts | 2 +- .../wallet/core/src/signers/session/implicit.ts | 2 +- .../wallet/core/src/signers/session/session.ts | 2 +- packages/wallet/core/src/state/index.ts | 2 +- packages/wallet/core/src/state/local/index.ts | 2 +- .../wallet/core/src/state/local/indexed-db.ts | 2 +- packages/wallet/core/src/state/local/memory.ts | 2 +- packages/wallet/core/src/state/utils.ts | 2 +- packages/wallet/core/src/wallet.ts | 2 +- .../wallet/core/test/session-manager.test.ts | 11 ++--------- packages/wallet/primitives-cli/package.json | 4 ++-- .../primitives-cli/src/subcommands/address.ts | 2 +- .../primitives-cli/src/subcommands/config.ts | 2 +- .../primitives-cli/src/subcommands/devTools.ts | 2 +- .../primitives-cli/src/subcommands/passkeys.ts | 2 +- .../primitives-cli/src/subcommands/payload.ts | 2 +- .../primitives-cli/src/subcommands/recovery.ts | 2 +- .../primitives-cli/src/subcommands/session.ts | 2 +- .../src/subcommands/sessionExplicit.ts | 2 +- .../src/subcommands/sessionImplicit.ts | 2 +- .../primitives-cli/src/subcommands/signature.ts | 4 ++-- packages/wallet/primitives/package.json | 2 +- packages/wallet/wdk/jest.config.ts | 6 +++--- packages/wallet/wdk/package.json | 6 +++--- packages/wallet/wdk/src/dbs/signatures.ts | 4 ++-- packages/wallet/wdk/src/identity/signer.ts | 4 ++-- packages/wallet/wdk/src/sequence/devices.ts | 2 +- .../wallet/wdk/src/sequence/handlers/mnemonic.ts | 2 +- packages/wallet/wdk/src/sequence/handlers/otp.ts | 2 +- .../wallet/wdk/src/sequence/handlers/passkeys.ts | 4 ++-- packages/wallet/wdk/src/sequence/index.ts | 2 +- packages/wallet/wdk/src/sequence/manager.ts | 12 ++---------- packages/wallet/wdk/src/sequence/sessions.ts | 4 ++-- packages/wallet/wdk/src/sequence/signatures.ts | 4 ++-- packages/wallet/wdk/src/sequence/signers.ts | 2 +- packages/wallet/wdk/src/sequence/transactions.ts | 4 ++-- .../wdk/src/sequence/types/signatureRequest.ts | 4 ++-- .../wdk/src/sequence/types/transactionRequest.ts | 4 ++-- packages/wallet/wdk/src/sequence/wallets.ts | 4 ++-- .../wallet/wdk/src/session/session-controller.ts | 4 ++-- pnpm-lock.yaml | 16 ++++++++-------- 57 files changed, 88 insertions(+), 103 deletions(-) diff --git a/README.md b/README.md index 91739ac48..3cc1bbdb7 100644 --- a/README.md +++ b/README.md @@ -2,9 +2,9 @@ ## Packages -- `@0xsequence/sequence-primitives`: stateless low-level utilities specifically for interacting directly with sequence wallet's smart contracts -- `@0xsequence/sequence-core`: higher level utilities for creating and using sequence wallets -- `@0xsequence/sequence-wdk`: all-in-one wallet development kit for building a sequence wallet product +- `@0xsequence/wallet-primitives`: stateless low-level utilities specifically for interacting directly with sequence wallet's smart contracts +- `@0xsequence/wallet-core`: higher level utilities for creating and using sequence wallets +- `@0xsequence/wallet-wdk`: all-in-one wallet development kit for building a sequence wallet product ## Development diff --git a/extras/demo-wallet/app/email-otp/page.tsx b/extras/demo-wallet/app/email-otp/page.tsx index 937035065..d99d37839 100644 --- a/extras/demo-wallet/app/email-otp/page.tsx +++ b/extras/demo-wallet/app/email-otp/page.tsx @@ -2,7 +2,7 @@ import OtpHandler from '../handlers/otp' import { ClientParams } from '../lib/client-params' -import { Identity } from '@0xsequence/sequence-wdk' +import { Identity } from '@0xsequence/wallet-wdk' type EmailParams = ClientParams & { email: string diff --git a/extras/demo-wallet/app/handlers/auth-code-pkce.tsx b/extras/demo-wallet/app/handlers/auth-code-pkce.tsx index a4481976c..e5588eb49 100644 --- a/extras/demo-wallet/app/handlers/auth-code-pkce.tsx +++ b/extras/demo-wallet/app/handlers/auth-code-pkce.tsx @@ -1,7 +1,7 @@ 'use client' import { useEffect } from 'react' -import { Identity } from '@0xsequence/sequence-wdk' +import { Identity } from '@0xsequence/wallet-wdk' import { redirect } from 'next/navigation' import { ClientParams } from '../lib/client-params' import { storeClientParams, getClientParams } from '../lib/session-storage' diff --git a/extras/demo-wallet/app/handlers/id-token.tsx b/extras/demo-wallet/app/handlers/id-token.tsx index f4ceda24a..bca786713 100644 --- a/extras/demo-wallet/app/handlers/id-token.tsx +++ b/extras/demo-wallet/app/handlers/id-token.tsx @@ -2,7 +2,7 @@ import { useEffect } from 'react' import { redirect } from 'next/navigation' -import { Identity } from '@0xsequence/sequence-wdk' +import { Identity } from '@0xsequence/wallet-wdk' import type { ClientParams } from '../lib/client-params' import { Attestation } from '../lib/attestation' diff --git a/extras/demo-wallet/app/handlers/otp.tsx b/extras/demo-wallet/app/handlers/otp.tsx index 4ea828240..f7065137e 100644 --- a/extras/demo-wallet/app/handlers/otp.tsx +++ b/extras/demo-wallet/app/handlers/otp.tsx @@ -2,7 +2,7 @@ import { useEffect, useState } from 'react' import { redirect } from 'next/navigation' -import { Identity } from '@0xsequence/sequence-wdk' +import { Identity } from '@0xsequence/wallet-wdk' import type { ClientParams } from '../lib/client-params' import { Attestation } from '../lib/attestation' diff --git a/extras/demo-wallet/app/lib/attestation.ts b/extras/demo-wallet/app/lib/attestation.ts index 64e4f298c..903204661 100644 --- a/extras/demo-wallet/app/lib/attestation.ts +++ b/extras/demo-wallet/app/lib/attestation.ts @@ -1,5 +1,5 @@ import { Hex, Bytes, Signature, PersonalMessage } from 'ox' -import { Identity } from '@0xsequence/sequence-wdk' +import { Identity } from '@0xsequence/wallet-wdk' export interface AttestationParams { sessionAddress: string diff --git a/extras/demo-wallet/package.json b/extras/demo-wallet/package.json index 9604b89c8..52216e8fa 100644 --- a/extras/demo-wallet/package.json +++ b/extras/demo-wallet/package.json @@ -11,7 +11,7 @@ "check-types": "tsc --noEmit" }, "dependencies": { - "@0xsequence/sequence-wdk": "workspace:../../packages/wdk", + "@0xsequence/wallet-wdk": "workspace:../../packages/wdk", "@repo/ui": "workspace:*", "next": "^15.1.0", "ox": "^0.6.7", diff --git a/packages/wallet/core/jest.config.ts b/packages/wallet/core/jest.config.ts index fca9161b1..f5844e0d0 100644 --- a/packages/wallet/core/jest.config.ts +++ b/packages/wallet/core/jest.config.ts @@ -5,8 +5,8 @@ const config: Config = { testEnvironment: 'node', testMatch: ['**/test/**/*.test.ts'], moduleNameMapper: { - '^@0xsequence/sequence-core$': '/src', - '^@0xsequence/sequence-primitives$': '/../primitives/src', + '^@0xsequence/wallet-core$': '/src', + '^@0xsequence/wallet-primitives$': '/../primitives/src', }, } diff --git a/packages/wallet/core/package.json b/packages/wallet/core/package.json index 067fffc74..b4c01330d 100644 --- a/packages/wallet/core/package.json +++ b/packages/wallet/core/package.json @@ -1,5 +1,5 @@ { - "name": "@0xsequence/sequence-core", + "name": "@0xsequence/wallet-core", "version": "0.0.0", "license": "Apache-2.0", "scripts": { @@ -23,7 +23,7 @@ "typescript": "^5.7.3" }, "dependencies": { - "@0xsequence/sequence-primitives": "workspace:^", + "@0xsequence/wallet-primitives": "workspace:^", "ox": "^0.6.7" } } diff --git a/packages/wallet/core/src/envelope.ts b/packages/wallet/core/src/envelope.ts index fdc0ee860..c9b15820e 100644 --- a/packages/wallet/core/src/envelope.ts +++ b/packages/wallet/core/src/envelope.ts @@ -1,4 +1,4 @@ -import { Config, Payload, Signature } from '@0xsequence/sequence-primitives' +import { Config, Payload, Signature } from '@0xsequence/wallet-primitives' import { Address, Hex } from 'ox' export type Envelope = { diff --git a/packages/wallet/core/src/relayer/local.ts b/packages/wallet/core/src/relayer/local.ts index ee4be3376..1fc1a34c3 100644 --- a/packages/wallet/core/src/relayer/local.ts +++ b/packages/wallet/core/src/relayer/local.ts @@ -1,6 +1,6 @@ import { AbiFunction, Address, Bytes, Hex } from 'ox' import { FeeOption, FeeQuote, OperationStatus, Relayer } from './relayer' -import { Constants, Payload } from '@0xsequence/sequence-primitives' +import { Constants, Payload } from '@0xsequence/wallet-primitives' export interface GenericProvider { sendTransaction(args: { to: string; data: string }): Promise diff --git a/packages/wallet/core/src/relayer/relayer.ts b/packages/wallet/core/src/relayer/relayer.ts index c27d22891..ec20ae559 100644 --- a/packages/wallet/core/src/relayer/relayer.ts +++ b/packages/wallet/core/src/relayer/relayer.ts @@ -1,4 +1,4 @@ -import { Payload } from '@0xsequence/sequence-primitives' +import { Payload } from '@0xsequence/wallet-primitives' import { Address, Bytes, Hex } from 'ox' export interface FeeOption { diff --git a/packages/wallet/core/src/signers/index.ts b/packages/wallet/core/src/signers/index.ts index 81d271134..0cb2ac456 100644 --- a/packages/wallet/core/src/signers/index.ts +++ b/packages/wallet/core/src/signers/index.ts @@ -1,4 +1,4 @@ -import { Config, Payload, Signature } from '@0xsequence/sequence-primitives' +import { Config, Payload, Signature } from '@0xsequence/wallet-primitives' import { Address, Hex } from 'ox' import { State } from '..' diff --git a/packages/wallet/core/src/signers/passkey.ts b/packages/wallet/core/src/signers/passkey.ts index 2d8cb3704..c57efa192 100644 --- a/packages/wallet/core/src/signers/passkey.ts +++ b/packages/wallet/core/src/signers/passkey.ts @@ -1,6 +1,6 @@ import { Hex, Bytes, Address, P256 } from 'ox' -import { Payload, Extensions } from '@0xsequence/sequence-primitives' -import type { Signature as SignatureTypes } from '@0xsequence/sequence-primitives' +import { Payload, Extensions } from '@0xsequence/wallet-primitives' +import type { Signature as SignatureTypes } from '@0xsequence/wallet-primitives' import { WebAuthnP256 } from 'ox' import { State } from '..' import { SapientSigner, Witnessable } from '.' diff --git a/packages/wallet/core/src/signers/pk/index.ts b/packages/wallet/core/src/signers/pk/index.ts index 5738d510c..f7f8da0bb 100644 --- a/packages/wallet/core/src/signers/pk/index.ts +++ b/packages/wallet/core/src/signers/pk/index.ts @@ -1,5 +1,5 @@ -import type { Payload as PayloadTypes, Signature as SignatureTypes } from '@0xsequence/sequence-primitives' -import { Payload } from '@0xsequence/sequence-primitives' +import type { Payload as PayloadTypes, Signature as SignatureTypes } from '@0xsequence/wallet-primitives' +import { Payload } from '@0xsequence/wallet-primitives' import { Address, Bytes, Hex, PublicKey, Secp256k1 } from 'ox' import { Signer as SignerInterface, Witnessable } from '..' import { State } from '../..' diff --git a/packages/wallet/core/src/signers/session-manager.ts b/packages/wallet/core/src/signers/session-manager.ts index 8bbf18f09..cb6d5fbbd 100644 --- a/packages/wallet/core/src/signers/session-manager.ts +++ b/packages/wallet/core/src/signers/session-manager.ts @@ -5,7 +5,7 @@ import { SessionConfig, SessionSignature, Signature as SignatureTypes, -} from '@0xsequence/sequence-primitives' +} from '@0xsequence/wallet-primitives' import { AbiFunction, Address, Bytes, Hex, Provider } from 'ox' import { SapientSigner } from '.' import { Explicit, Implicit } from './session' diff --git a/packages/wallet/core/src/signers/session/explicit.ts b/packages/wallet/core/src/signers/session/explicit.ts index 2f9a85789..481cdf380 100644 --- a/packages/wallet/core/src/signers/session/explicit.ts +++ b/packages/wallet/core/src/signers/session/explicit.ts @@ -1,4 +1,4 @@ -import { Payload, Permission, SessionSignature, Utils } from '@0xsequence/sequence-primitives' +import { Payload, Permission, SessionSignature, Utils } from '@0xsequence/wallet-primitives' import { AbiParameters, Address, Bytes, Hash, Hex, Provider, Secp256k1 } from 'ox' import { SignerInterface } from './session' diff --git a/packages/wallet/core/src/signers/session/implicit.ts b/packages/wallet/core/src/signers/session/implicit.ts index e49f699e7..80333eede 100644 --- a/packages/wallet/core/src/signers/session/implicit.ts +++ b/packages/wallet/core/src/signers/session/implicit.ts @@ -1,4 +1,4 @@ -import { Attestation, Payload, SessionSignature, Signature } from '@0xsequence/sequence-primitives' +import { Attestation, Payload, SessionSignature, Signature } from '@0xsequence/wallet-primitives' import { AbiFunction, Address, Bytes, Hex, Provider, Secp256k1 } from 'ox' import { SignerInterface } from './session' diff --git a/packages/wallet/core/src/signers/session/session.ts b/packages/wallet/core/src/signers/session/session.ts index 3cdc3b5f9..7b2ac7f28 100644 --- a/packages/wallet/core/src/signers/session/session.ts +++ b/packages/wallet/core/src/signers/session/session.ts @@ -1,5 +1,5 @@ import { Address, Provider } from 'ox' -import { Payload, SessionSignature } from '@0xsequence/sequence-primitives' +import { Payload, SessionSignature } from '@0xsequence/wallet-primitives' export interface SignerInterface { /// Check if the signer supports the call diff --git a/packages/wallet/core/src/state/index.ts b/packages/wallet/core/src/state/index.ts index f8b622e5c..a09f1cee9 100644 --- a/packages/wallet/core/src/state/index.ts +++ b/packages/wallet/core/src/state/index.ts @@ -1,5 +1,5 @@ import { Address, Hex } from 'ox' -import { Context, Config, Payload, Signature, GenericTree } from '@0xsequence/sequence-primitives' +import { Context, Config, Payload, Signature, GenericTree } from '@0xsequence/wallet-primitives' export type Provider = Reader & Writer diff --git a/packages/wallet/core/src/state/local/index.ts b/packages/wallet/core/src/state/local/index.ts index 0cee751cd..fd4355f6f 100644 --- a/packages/wallet/core/src/state/local/index.ts +++ b/packages/wallet/core/src/state/local/index.ts @@ -6,7 +6,7 @@ import { Address as SequenceAddress, Extensions, GenericTree, -} from '@0xsequence/sequence-primitives' +} from '@0xsequence/wallet-primitives' import { Address, Bytes, Hex, PersonalMessage, Secp256k1 } from 'ox' import { Provider as ProviderInterface } from '..' import { MemoryStore } from './memory' diff --git a/packages/wallet/core/src/state/local/indexed-db.ts b/packages/wallet/core/src/state/local/indexed-db.ts index d5a48c09c..29b09991a 100644 --- a/packages/wallet/core/src/state/local/indexed-db.ts +++ b/packages/wallet/core/src/state/local/indexed-db.ts @@ -1,4 +1,4 @@ -import { Context, Payload, Signature, Config, GenericTree } from '@0xsequence/sequence-primitives' +import { Context, Payload, Signature, Config, GenericTree } from '@0xsequence/wallet-primitives' import { Address, Hex } from 'ox' import { Store } from './index' diff --git a/packages/wallet/core/src/state/local/memory.ts b/packages/wallet/core/src/state/local/memory.ts index fed7de6d2..62d8c525c 100644 --- a/packages/wallet/core/src/state/local/memory.ts +++ b/packages/wallet/core/src/state/local/memory.ts @@ -1,4 +1,4 @@ -import { Context, Payload, Signature, Config, GenericTree } from '@0xsequence/sequence-primitives' +import { Context, Payload, Signature, Config, GenericTree } from '@0xsequence/wallet-primitives' import { Address, Hex } from 'ox' import { Store } from './index' diff --git a/packages/wallet/core/src/state/utils.ts b/packages/wallet/core/src/state/utils.ts index f06caed23..13acc71fc 100644 --- a/packages/wallet/core/src/state/utils.ts +++ b/packages/wallet/core/src/state/utils.ts @@ -1,4 +1,4 @@ -import { Payload, Signature } from '@0xsequence/sequence-primitives' +import { Payload, Signature } from '@0xsequence/wallet-primitives' import { Address, Hex } from 'ox' import { Reader } from '.' import { isSapientSigner, SapientSigner, Signer } from '../signers' diff --git a/packages/wallet/core/src/wallet.ts b/packages/wallet/core/src/wallet.ts index 1848cf323..3c4c6b724 100644 --- a/packages/wallet/core/src/wallet.ts +++ b/packages/wallet/core/src/wallet.ts @@ -8,7 +8,7 @@ import { Erc6492, Payload, Signature as SequenceSignature, -} from '@0xsequence/sequence-primitives' +} from '@0xsequence/wallet-primitives' import * as Envelope from './envelope' export type WalletOptions = { diff --git a/packages/wallet/core/test/session-manager.test.ts b/packages/wallet/core/test/session-manager.test.ts index 8f0572bf2..74bc4e91e 100644 --- a/packages/wallet/core/test/session-manager.test.ts +++ b/packages/wallet/core/test/session-manager.test.ts @@ -1,12 +1,5 @@ -import { Envelope, Signers, State, Wallet } from '@0xsequence/sequence-core' -import { - Attestation, - Constants, - GenericTree, - Payload, - Permission, - SessionConfig, -} from '@0xsequence/sequence-primitives' +import { Envelope, Signers, State, Wallet } from '@0xsequence/wallet-core' +import { Attestation, Constants, GenericTree, Payload, Permission, SessionConfig } from '@0xsequence/wallet-primitives' import { AbiFunction, Address, Bytes, Hex, Provider, RpcTransport, Secp256k1, TransactionEnvelopeEip1559 } from 'ox' import { CAN_RUN_LIVE, ERC20_IMPLICIT_MINT_CONTRACT, ERC20_MINT_ONCE, PRIVATE_KEY, RPC_URL } from './constants' diff --git a/packages/wallet/primitives-cli/package.json b/packages/wallet/primitives-cli/package.json index 7eddc2cdd..f5a255fc3 100644 --- a/packages/wallet/primitives-cli/package.json +++ b/packages/wallet/primitives-cli/package.json @@ -1,5 +1,5 @@ { - "name": "@0xsequence/sequence-primitives-cli", + "name": "@0xsequence/wallet-primitives-cli", "scripts": { "build": "tsc", "build:esbuild": "esbuild src/index.ts --bundle --platform=node --target=node16 --outfile=dist/index.js", @@ -25,7 +25,7 @@ "typescript": "^5.7.3" }, "dependencies": { - "@0xsequence/sequence-primitives": "workspace:^", + "@0xsequence/wallet-primitives": "workspace:^", "ox": "^0.6.7", "yargs": "^17.7.2" } diff --git a/packages/wallet/primitives-cli/src/subcommands/address.ts b/packages/wallet/primitives-cli/src/subcommands/address.ts index a489ab0dc..8f231cb8f 100644 --- a/packages/wallet/primitives-cli/src/subcommands/address.ts +++ b/packages/wallet/primitives-cli/src/subcommands/address.ts @@ -1,6 +1,6 @@ import { Address, Bytes } from 'ox' import type { CommandModule } from 'yargs' -import { Constants, Address as SequenceAddress } from '@0xsequence/sequence-primitives' +import { Constants, Address as SequenceAddress } from '@0xsequence/wallet-primitives' export async function doCalculateAddress(options: { imageHash: string diff --git a/packages/wallet/primitives-cli/src/subcommands/config.ts b/packages/wallet/primitives-cli/src/subcommands/config.ts index bca714a2d..cb5b1758d 100644 --- a/packages/wallet/primitives-cli/src/subcommands/config.ts +++ b/packages/wallet/primitives-cli/src/subcommands/config.ts @@ -1,7 +1,7 @@ import type { CommandModule } from 'yargs' import { Address, Bytes, Hex } from 'ox' import { fromPosOrStdin } from '../utils' -import { Signature, Config } from '@0xsequence/sequence-primitives' +import { Signature, Config } from '@0xsequence/wallet-primitives' export const PossibleElements = [ { diff --git a/packages/wallet/primitives-cli/src/subcommands/devTools.ts b/packages/wallet/primitives-cli/src/subcommands/devTools.ts index f26444e6a..88951a732 100644 --- a/packages/wallet/primitives-cli/src/subcommands/devTools.ts +++ b/packages/wallet/primitives-cli/src/subcommands/devTools.ts @@ -1,4 +1,4 @@ -import { Permission, SessionConfig, Config } from '@0xsequence/sequence-primitives' +import { Permission, SessionConfig, Config } from '@0xsequence/wallet-primitives' import crypto from 'crypto' import { Bytes } from 'ox' import type { CommandModule } from 'yargs' diff --git a/packages/wallet/primitives-cli/src/subcommands/passkeys.ts b/packages/wallet/primitives-cli/src/subcommands/passkeys.ts index 1556e9c42..6f40aaada 100644 --- a/packages/wallet/primitives-cli/src/subcommands/passkeys.ts +++ b/packages/wallet/primitives-cli/src/subcommands/passkeys.ts @@ -3,7 +3,7 @@ import type { CommandModule } from 'yargs' import { Bytes, Hex } from 'ox' import { fromPosOrStdin } from '../utils' -import { Extensions } from '@0xsequence/sequence-primitives' +import { Extensions } from '@0xsequence/wallet-primitives' // Reusable function for encoding a signature export async function doEncodeSignature(options: { diff --git a/packages/wallet/primitives-cli/src/subcommands/payload.ts b/packages/wallet/primitives-cli/src/subcommands/payload.ts index 5e6500f1b..a1d289913 100644 --- a/packages/wallet/primitives-cli/src/subcommands/payload.ts +++ b/packages/wallet/primitives-cli/src/subcommands/payload.ts @@ -1,6 +1,6 @@ import { AbiParameters, Address, Bytes, Hex } from 'ox' import type { CommandModule } from 'yargs' -import { Payload } from '@0xsequence/sequence-primitives' +import { Payload } from '@0xsequence/wallet-primitives' import { fromPosOrStdin, readStdin } from '../utils' export const KIND_TRANSACTIONS = 0x00 diff --git a/packages/wallet/primitives-cli/src/subcommands/recovery.ts b/packages/wallet/primitives-cli/src/subcommands/recovery.ts index 95643125e..5fee2bc6a 100644 --- a/packages/wallet/primitives-cli/src/subcommands/recovery.ts +++ b/packages/wallet/primitives-cli/src/subcommands/recovery.ts @@ -1,7 +1,7 @@ import { CommandModule } from 'yargs' import { readStdin } from '../utils' import { Address, Bytes, Hex } from 'ox' -import { Extensions } from '@0xsequence/sequence-primitives' +import { Extensions } from '@0xsequence/wallet-primitives' async function parseLeaves(leavesInput: string | string[]): Promise { if (typeof leavesInput === 'string') { diff --git a/packages/wallet/primitives-cli/src/subcommands/session.ts b/packages/wallet/primitives-cli/src/subcommands/session.ts index 6835f911c..b2a8178fb 100644 --- a/packages/wallet/primitives-cli/src/subcommands/session.ts +++ b/packages/wallet/primitives-cli/src/subcommands/session.ts @@ -3,7 +3,7 @@ import { CommandModule } from 'yargs' import sessionExplicitCommand from './sessionExplicit' import sessionImplicitCommand from './sessionImplicit' -import { GenericTree, SessionConfig, SessionSignature, Config } from '@0xsequence/sequence-primitives' +import { GenericTree, SessionConfig, SessionSignature, Config } from '@0xsequence/wallet-primitives' export async function doEmptyTopology(identitySigner: `0x${string}`): Promise { const topology = SessionConfig.emptySessionsTopology(identitySigner) diff --git a/packages/wallet/primitives-cli/src/subcommands/sessionExplicit.ts b/packages/wallet/primitives-cli/src/subcommands/sessionExplicit.ts index 47e932002..d9800e75d 100644 --- a/packages/wallet/primitives-cli/src/subcommands/sessionExplicit.ts +++ b/packages/wallet/primitives-cli/src/subcommands/sessionExplicit.ts @@ -1,6 +1,6 @@ import type { CommandModule } from 'yargs' import { fromPosOrStdin } from '../utils' -import { Permission, SessionConfig } from '@0xsequence/sequence-primitives' +import { Permission, SessionConfig } from '@0xsequence/wallet-primitives' export async function doAddSession(sessionInput: string, topologyInput: string): Promise { const session = Permission.sessionPermissionsFromJson(sessionInput) diff --git a/packages/wallet/primitives-cli/src/subcommands/sessionImplicit.ts b/packages/wallet/primitives-cli/src/subcommands/sessionImplicit.ts index d003367b1..7f7f01d70 100644 --- a/packages/wallet/primitives-cli/src/subcommands/sessionImplicit.ts +++ b/packages/wallet/primitives-cli/src/subcommands/sessionImplicit.ts @@ -1,4 +1,4 @@ -import { SessionConfig } from '@0xsequence/sequence-primitives' +import { SessionConfig } from '@0xsequence/wallet-primitives' import { Address } from 'ox' import type { CommandModule } from 'yargs' import { fromPosOrStdin, requireString } from '../utils' diff --git a/packages/wallet/primitives-cli/src/subcommands/signature.ts b/packages/wallet/primitives-cli/src/subcommands/signature.ts index 3c6cf7f13..623a0d783 100644 --- a/packages/wallet/primitives-cli/src/subcommands/signature.ts +++ b/packages/wallet/primitives-cli/src/subcommands/signature.ts @@ -9,10 +9,10 @@ import { fromPosOrStdin } from '../utils' // isSapientSignerLeaf, // isSignerLeaf, // rawSignatureToJson, -// } from '@0xsequence/sequence-primitives' +// } from '@0xsequence/wallet-primitives' import { PossibleElements } from './config' import { Bytes, Hex, Signature as OxSignature } from 'ox' -import { Signature, Config } from '@0xsequence/sequence-primitives' +import { Signature, Config } from '@0xsequence/wallet-primitives' const SignatureElements = [ { diff --git a/packages/wallet/primitives/package.json b/packages/wallet/primitives/package.json index 3ab4a23a2..3ceb7cd25 100644 --- a/packages/wallet/primitives/package.json +++ b/packages/wallet/primitives/package.json @@ -1,5 +1,5 @@ { - "name": "@0xsequence/sequence-primitives", + "name": "@0xsequence/wallet-primitives", "version": "0.0.0", "license": "Apache-2.0", "scripts": { diff --git a/packages/wallet/wdk/jest.config.ts b/packages/wallet/wdk/jest.config.ts index 20218945f..c762573ad 100644 --- a/packages/wallet/wdk/jest.config.ts +++ b/packages/wallet/wdk/jest.config.ts @@ -5,9 +5,9 @@ const config: Config = { testEnvironment: 'node', testMatch: ['**/test/**/*.test.ts'], moduleNameMapper: { - '^@0xsequence/sequence-wdk$': '/src', - '^@0xsequence/sequence-core$': '/../core/src', - '^@0xsequence/sequence-primitives$': '/../primitives/src', + '^@0xsequence/wallet-wdk$': '/src', + '^@0xsequence/wallet-core$': '/../core/src', + '^@0xsequence/wallet-primitives$': '/../primitives/src', }, } diff --git a/packages/wallet/wdk/package.json b/packages/wallet/wdk/package.json index 2d9016430..95dd80f69 100644 --- a/packages/wallet/wdk/package.json +++ b/packages/wallet/wdk/package.json @@ -1,5 +1,5 @@ { - "name": "@0xsequence/sequence-wdk", + "name": "@0xsequence/wallet-wdk", "version": "0.0.0", "license": "Apache-2.0", "scripts": { @@ -23,8 +23,8 @@ "typescript": "^5.7.3" }, "dependencies": { - "@0xsequence/sequence-core": "workspace:^", - "@0xsequence/sequence-primitives": "workspace:^", + "@0xsequence/wallet-core": "workspace:^", + "@0xsequence/wallet-primitives": "workspace:^", "idb": "^7.1.1", "jwt-decode": "^4.0.0", "ox": "^0.6.7", diff --git a/packages/wallet/wdk/src/dbs/signatures.ts b/packages/wallet/wdk/src/dbs/signatures.ts index 4e737ad5a..eae0b44a5 100644 --- a/packages/wallet/wdk/src/dbs/signatures.ts +++ b/packages/wallet/wdk/src/dbs/signatures.ts @@ -1,6 +1,6 @@ import { Address } from 'ox' -import { Payload } from '@0xsequence/sequence-primitives' -import { Envelope } from '@0xsequence/sequence-core' +import { Payload } from '@0xsequence/wallet-primitives' +import { Envelope } from '@0xsequence/wallet-core' import { Generic } from './generic' export type ActionToPayload = { diff --git a/packages/wallet/wdk/src/identity/signer.ts b/packages/wallet/wdk/src/identity/signer.ts index 6ccd389a9..3bc4c37a1 100644 --- a/packages/wallet/wdk/src/identity/signer.ts +++ b/packages/wallet/wdk/src/identity/signer.ts @@ -1,8 +1,8 @@ import { Address, Signature, Hex, Bytes } from 'ox' -import { Signers, State } from '@0xsequence/sequence-core' +import { Signers, State } from '@0xsequence/wallet-core' import { AuthKey } from './authkey' import { IdentityInstrument } from './nitro' -import { Payload, Signature as SequenceSignature } from '@0xsequence/sequence-primitives' +import { Payload, Signature as SequenceSignature } from '@0xsequence/wallet-primitives' export class IdentitySigner implements Signers.Signer { constructor( diff --git a/packages/wallet/wdk/src/sequence/devices.ts b/packages/wallet/wdk/src/sequence/devices.ts index b6a4c52dc..7bc569e0c 100644 --- a/packages/wallet/wdk/src/sequence/devices.ts +++ b/packages/wallet/wdk/src/sequence/devices.ts @@ -1,4 +1,4 @@ -import { Signers } from '@0xsequence/sequence-core' +import { Signers } from '@0xsequence/wallet-core' import { Address } from 'ox' import { Kinds, WitnessExtraSignerKind } from './signers' import { Shared } from './manager' diff --git a/packages/wallet/wdk/src/sequence/handlers/mnemonic.ts b/packages/wallet/wdk/src/sequence/handlers/mnemonic.ts index 9940c6d71..43ef0eda3 100644 --- a/packages/wallet/wdk/src/sequence/handlers/mnemonic.ts +++ b/packages/wallet/wdk/src/sequence/handlers/mnemonic.ts @@ -1,4 +1,4 @@ -import { Signers } from '@0xsequence/sequence-core' +import { Signers } from '@0xsequence/wallet-core' import { Address, Hex, Mnemonic } from 'ox' import { Handler } from '.' import * as Db from '../../dbs' diff --git a/packages/wallet/wdk/src/sequence/handlers/otp.ts b/packages/wallet/wdk/src/sequence/handlers/otp.ts index d4b71424c..343db3f21 100644 --- a/packages/wallet/wdk/src/sequence/handlers/otp.ts +++ b/packages/wallet/wdk/src/sequence/handlers/otp.ts @@ -1,6 +1,6 @@ import { Hex, Address } from 'ox' import { Handler } from '.' -import { Signers } from '@0xsequence/sequence-core' +import { Signers } from '@0xsequence/wallet-core' import * as Db from '../../dbs' import { Signatures } from '../signatures' import { SignerUnavailable, SignerReady, SignerActionable } from '../types' diff --git a/packages/wallet/wdk/src/sequence/handlers/passkeys.ts b/packages/wallet/wdk/src/sequence/handlers/passkeys.ts index 65c1aa3ce..07338d7e3 100644 --- a/packages/wallet/wdk/src/sequence/handlers/passkeys.ts +++ b/packages/wallet/wdk/src/sequence/handlers/passkeys.ts @@ -1,9 +1,9 @@ -import { Signers, State } from '@0xsequence/sequence-core' +import { Signers, State } from '@0xsequence/wallet-core' import * as Db from '../../dbs' import { Address, Bytes, Hex } from 'ox' import { Kinds } from '../signers' import { Signatures } from '../signatures' -import { Extensions } from '@0xsequence/sequence-primitives' +import { Extensions } from '@0xsequence/wallet-primitives' import { Handler } from '.' import { SignerActionable, SignerUnavailable } from '../types' diff --git a/packages/wallet/wdk/src/sequence/index.ts b/packages/wallet/wdk/src/sequence/index.ts index 1eb715fd8..9c553b6bc 100644 --- a/packages/wallet/wdk/src/sequence/index.ts +++ b/packages/wallet/wdk/src/sequence/index.ts @@ -1,4 +1,4 @@ -import { Network } from '@0xsequence/sequence-primitives' +import { Network } from '@0xsequence/wallet-primitives' export * from './manager' export * from './sessions' diff --git a/packages/wallet/wdk/src/sequence/manager.ts b/packages/wallet/wdk/src/sequence/manager.ts index 28872de13..54739ffef 100644 --- a/packages/wallet/wdk/src/sequence/manager.ts +++ b/packages/wallet/wdk/src/sequence/manager.ts @@ -1,13 +1,5 @@ -import { Signers as CoreSigners, Relayer, State } from '@0xsequence/sequence-core' -import { - Config, - Constants, - Context, - Extensions, - Network, - Payload, - SessionConfig, -} from '@0xsequence/sequence-primitives' +import { Signers as CoreSigners, Relayer, State } from '@0xsequence/wallet-core' +import { Config, Constants, Context, Extensions, Network, Payload, SessionConfig } from '@0xsequence/wallet-primitives' import { Address } from 'ox' import * as Db from '../dbs' import * as Identity from '../identity' diff --git a/packages/wallet/wdk/src/sequence/sessions.ts b/packages/wallet/wdk/src/sequence/sessions.ts index 6cf876c64..77eb81eea 100644 --- a/packages/wallet/wdk/src/sequence/sessions.ts +++ b/packages/wallet/wdk/src/sequence/sessions.ts @@ -1,5 +1,5 @@ -import { Signers as CoreSigners, Envelope, Wallet } from '@0xsequence/sequence-core' -import { Config, Constants, Payload, SessionConfig } from '@0xsequence/sequence-primitives' +import { Signers as CoreSigners, Envelope, Wallet } from '@0xsequence/wallet-core' +import { Config, Constants, Payload, SessionConfig } from '@0xsequence/wallet-primitives' import { Address, Provider, RpcTransport } from 'ox' import { SessionController } from '../session' import { Shared } from './manager' diff --git a/packages/wallet/wdk/src/sequence/signatures.ts b/packages/wallet/wdk/src/sequence/signatures.ts index f8981d60a..ced0db81e 100644 --- a/packages/wallet/wdk/src/sequence/signatures.ts +++ b/packages/wallet/wdk/src/sequence/signatures.ts @@ -1,7 +1,7 @@ import { Address, Bytes, Hex } from 'ox' import * as Db from '../dbs' -import { Config, Payload } from '@0xsequence/sequence-primitives' -import { Envelope } from '@0xsequence/sequence-core' +import { Config, Payload } from '@0xsequence/wallet-primitives' +import { Envelope } from '@0xsequence/wallet-core' import { v7 as uuidv7 } from 'uuid' import { Shared } from './manager' import { Handler } from './handlers' diff --git a/packages/wallet/wdk/src/sequence/signers.ts b/packages/wallet/wdk/src/sequence/signers.ts index b929c35cd..95b988091 100644 --- a/packages/wallet/wdk/src/sequence/signers.ts +++ b/packages/wallet/wdk/src/sequence/signers.ts @@ -1,5 +1,5 @@ import { Address, Bytes, Hex } from 'ox' -import { Payload } from '@0xsequence/sequence-primitives' +import { Payload } from '@0xsequence/wallet-primitives' import { Shared } from './manager' export const Kinds = { diff --git a/packages/wallet/wdk/src/sequence/transactions.ts b/packages/wallet/wdk/src/sequence/transactions.ts index 78c231d1b..172842f73 100644 --- a/packages/wallet/wdk/src/sequence/transactions.ts +++ b/packages/wallet/wdk/src/sequence/transactions.ts @@ -1,5 +1,5 @@ -import { Payload } from '@0xsequence/sequence-primitives' -import { Envelope, Wallet } from '@0xsequence/sequence-core' +import { Payload } from '@0xsequence/wallet-primitives' +import { Envelope, Wallet } from '@0xsequence/wallet-core' import { Address, Provider, RpcTransport } from 'ox' import { v7 as uuidv7 } from 'uuid' import { Shared } from './manager' diff --git a/packages/wallet/wdk/src/sequence/types/signatureRequest.ts b/packages/wallet/wdk/src/sequence/types/signatureRequest.ts index 57fdd8084..a74d047e1 100644 --- a/packages/wallet/wdk/src/sequence/types/signatureRequest.ts +++ b/packages/wallet/wdk/src/sequence/types/signatureRequest.ts @@ -1,5 +1,5 @@ -import { Envelope } from '@0xsequence/sequence-core' -import { Payload } from '@0xsequence/sequence-primitives' +import { Envelope } from '@0xsequence/wallet-core' +import { Payload } from '@0xsequence/wallet-primitives' import { Address, Hex } from 'ox' import { Handler } from '../handlers' diff --git a/packages/wallet/wdk/src/sequence/types/transactionRequest.ts b/packages/wallet/wdk/src/sequence/types/transactionRequest.ts index d5c0f00ee..93128104a 100644 --- a/packages/wallet/wdk/src/sequence/types/transactionRequest.ts +++ b/packages/wallet/wdk/src/sequence/types/transactionRequest.ts @@ -1,5 +1,5 @@ -import { Envelope, Relayer } from '@0xsequence/sequence-core' -import { Payload } from '@0xsequence/sequence-primitives' +import { Envelope, Relayer } from '@0xsequence/wallet-core' +import { Payload } from '@0xsequence/wallet-primitives' import { Address } from 'ox' export type TransactionRequest = { diff --git a/packages/wallet/wdk/src/sequence/wallets.ts b/packages/wallet/wdk/src/sequence/wallets.ts index 711b29930..d585b02ff 100644 --- a/packages/wallet/wdk/src/sequence/wallets.ts +++ b/packages/wallet/wdk/src/sequence/wallets.ts @@ -1,5 +1,5 @@ -import { Wallet as CoreWallet, Envelope, Signers, State } from '@0xsequence/sequence-core' -import { Config, GenericTree, Payload, SessionConfig, Permission } from '@0xsequence/sequence-primitives' +import { Wallet as CoreWallet, Envelope, Signers, State } from '@0xsequence/wallet-core' +import { Config, GenericTree, Payload, SessionConfig, Permission } from '@0xsequence/wallet-primitives' import { Address, Hex } from 'ox' import { AuthCommitment } from '../dbs/auth-commitments' import { AuthCodePkceHandler } from './handlers/authcode-pkce' diff --git a/packages/wallet/wdk/src/session/session-controller.ts b/packages/wallet/wdk/src/session/session-controller.ts index 2c2d4b023..34b363b1e 100644 --- a/packages/wallet/wdk/src/session/session-controller.ts +++ b/packages/wallet/wdk/src/session/session-controller.ts @@ -1,4 +1,4 @@ -import { Envelope, Signers, State, Wallet } from '@0xsequence/sequence-core' +import { Envelope, Signers, State, Wallet } from '@0xsequence/wallet-core' import { Attestation, Config, @@ -6,7 +6,7 @@ import { Payload, Signature as SequenceSignature, SessionConfig, -} from '@0xsequence/sequence-primitives' +} from '@0xsequence/wallet-primitives' import { Address, Hex, Provider } from 'ox' import { IdentitySigner } from '../identity' diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index c9e8fad4e..898aae31a 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -24,9 +24,9 @@ importers: specifier: 5.8.3 version: 5.8.3 - apps/demo-wallet: + extras/demo-wallet: dependencies: - '@0xsequence/sequence-wdk': + '@0xsequence/wallet-wdk': specifier: workspace:../../packages/wdk version: link:../../packages/wdk '@repo/ui': @@ -64,7 +64,7 @@ importers: specifier: 5.5.4 version: 5.5.4 - apps/docs: + extras/docs: dependencies: '@repo/ui': specifier: workspace:* @@ -98,7 +98,7 @@ importers: specifier: 5.5.4 version: 5.5.4 - apps/web: + extras/web: dependencies: '@repo/ui': specifier: workspace:* @@ -230,7 +230,7 @@ importers: packages/wallet/core: dependencies: - '@0xsequence/sequence-primitives': + '@0xsequence/wallet-primitives': specifier: workspace:^ version: link:../primitives ox: @@ -274,7 +274,7 @@ importers: packages/wallet/primitives-cli: dependencies: - '@0xsequence/sequence-primitives': + '@0xsequence/wallet-primitives': specifier: workspace:^ version: link:../primitives ox: @@ -311,10 +311,10 @@ importers: packages/wallet/wdk: dependencies: - '@0xsequence/sequence-core': + '@0xsequence/wallet-core': specifier: workspace:^ version: link:../core - '@0xsequence/sequence-primitives': + '@0xsequence/wallet-primitives': specifier: workspace:^ version: link:../primitives idb: From b5ebdd307bceb4372d3ccadfe8c4dbc48ff9c266 Mon Sep 17 00:00:00 2001 From: Peter Kieltyka Date: Mon, 14 Apr 2025 18:09:30 -0400 Subject: [PATCH 309/439] update path --- extras/demo-wallet/package.json | 2 +- pnpm-lock.yaml | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/extras/demo-wallet/package.json b/extras/demo-wallet/package.json index 52216e8fa..82f69d7a9 100644 --- a/extras/demo-wallet/package.json +++ b/extras/demo-wallet/package.json @@ -11,7 +11,7 @@ "check-types": "tsc --noEmit" }, "dependencies": { - "@0xsequence/wallet-wdk": "workspace:../../packages/wdk", + "@0xsequence/wallet-wdk": "workspace:../../packages/wallet/wdk", "@repo/ui": "workspace:*", "next": "^15.1.0", "ox": "^0.6.7", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 898aae31a..c38affe7e 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -27,8 +27,8 @@ importers: extras/demo-wallet: dependencies: '@0xsequence/wallet-wdk': - specifier: workspace:../../packages/wdk - version: link:../../packages/wdk + specifier: workspace:../../packages/wallet/wdk + version: link:../../packages/wallet/wdk '@repo/ui': specifier: workspace:* version: link:../../repo/ui From 630521943c240c85a4b216497cdd4fa60700382e Mon Sep 17 00:00:00 2001 From: Peter Kieltyka Date: Mon, 14 Apr 2025 21:04:08 -0400 Subject: [PATCH 310/439] various fixes after path change --- .vscode/launch.json | 18 +++++++++--------- package.json | 3 ++- .../primitives-cli/src/subcommands/passkeys.ts | 2 +- pnpm-lock.yaml | 3 +++ 4 files changed, 15 insertions(+), 11 deletions(-) diff --git a/.vscode/launch.json b/.vscode/launch.json index 00f09c3ad..dc22920a8 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -5,23 +5,23 @@ "name": "Launch primitives-cli server", "type": "node", "request": "launch", - "program": "${workspaceFolder}/packages/primitives-cli/dist/index.js", + "program": "${workspaceFolder}/packages/wallet/primitives-cli/dist/index.js", "args": ["server"], "runtimeArgs": ["--enable-source-maps"], "cwd": "${workspaceFolder}", "console": "integratedTerminal", "sourceMaps": true, "outFiles": [ - "${workspaceFolder}/packages/primitives-cli/dist/**/*.js", - "${workspaceFolder}/packages/core/dist/**/*.js", - "${workspaceFolder}/packages/primitives/dist/**/*.js", - "${workspaceFolder}/packages/wdk/dist/**/*.js" + "${workspaceFolder}/packages/wallet/primitives-cli/dist/**/*.js", + "${workspaceFolder}/packages/wallet/core/dist/**/*.js", + "${workspaceFolder}/packages/wallet/primitives/dist/**/*.js", + "${workspaceFolder}/packages/wallet/wdk/dist/**/*.js" ], "sourceMapPathOverrides": { - "../packages/primitives-cli/src/*": "${workspaceFolder}/packages/primitives-cli/src/*", - "../packages/core/src/*": "${workspaceFolder}/packages/core/src/*", - "../packages/primitives/src/*": "${workspaceFolder}/packages/primitives/src/*", - "../packages/wdk/src/*": "${workspaceFolder}/packages/wdk/src/*" + "../packages/wallet/primitives-cli/src/*": "${workspaceFolder}/packages/wallet/primitives-cli/src/*", + "../packages/wallet/core/src/*": "${workspaceFolder}/packages/wallet/core/src/*", + "../packages/wallet/primitives/src/*": "${workspaceFolder}/packages/wallet/primitives/src/*", + "../packages/wallet/wdk/src/*": "${workspaceFolder}/packages/wallet/wdk/src/*" } } ] diff --git a/package.json b/package.json index 961287781..ad34642a7 100644 --- a/package.json +++ b/package.json @@ -11,10 +11,11 @@ "lint": "turbo lint", "format": "prettier --list-different --write \"**/*.{ts,tsx,md}\"", "postinstall": "lefthook install", - "dev:server": "node packages/primitives-cli/dist/index.js server" + "dev:server": "node packages/wallet/primitives-cli/dist/index.js server" }, "devDependencies": { "@changesets/cli": "^2.29.0", + "@types/jest": "^29.5.14", "lefthook": "^1.11.10", "prettier": "^3.5.3", "turbo": "^2.5.0", diff --git a/packages/wallet/primitives-cli/src/subcommands/passkeys.ts b/packages/wallet/primitives-cli/src/subcommands/passkeys.ts index 6f40aaada..ce909b029 100644 --- a/packages/wallet/primitives-cli/src/subcommands/passkeys.ts +++ b/packages/wallet/primitives-cli/src/subcommands/passkeys.ts @@ -1,4 +1,4 @@ -// ./packages/primitives-cli/src/subcommands/passkeys.ts +// ./packages/wallet/primitives-cli/src/subcommands/passkeys.ts import type { CommandModule } from 'yargs' import { Bytes, Hex } from 'ox' diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index c38affe7e..dac9817b8 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -11,6 +11,9 @@ importers: '@changesets/cli': specifier: ^2.29.0 version: 2.29.0 + '@types/jest': + specifier: ^29.5.14 + version: 29.5.14 lefthook: specifier: ^1.11.10 version: 1.11.10 From 98eef3c3659a810aa7796f4bcf2485dfde13310c Mon Sep 17 00:00:00 2001 From: Michael Standen Date: Tue, 15 Apr 2025 13:25:33 +1200 Subject: [PATCH 311/439] Ignore husky. We use lefthook --- .gitignore | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.gitignore b/.gitignore index 96fab4fed..e70ecd7f0 100644 --- a/.gitignore +++ b/.gitignore @@ -36,3 +36,6 @@ yarn-error.log* # Misc .DS_Store *.pem + +# Husky +.husky/ \ No newline at end of file From b1a4fe931e450fe60f7094195059c3045fb975f0 Mon Sep 17 00:00:00 2001 From: Michael Standen Date: Tue, 15 Apr 2025 13:36:08 +1200 Subject: [PATCH 312/439] Fix typecheck --- extras/demo-wallet/package.json | 2 +- extras/docs/package.json | 2 +- extras/web/package.json | 2 +- package.json | 1 + repo/ui/package.json | 2 +- turbo.json | 4 ++-- 6 files changed, 7 insertions(+), 6 deletions(-) diff --git a/extras/demo-wallet/package.json b/extras/demo-wallet/package.json index 82f69d7a9..6eca6a4bc 100644 --- a/extras/demo-wallet/package.json +++ b/extras/demo-wallet/package.json @@ -8,7 +8,7 @@ "build": "next build", "start": "next start", "lint": "next lint --max-warnings 0", - "check-types": "tsc --noEmit" + "typecheck": "tsc --noEmit" }, "dependencies": { "@0xsequence/wallet-wdk": "workspace:../../packages/wallet/wdk", diff --git a/extras/docs/package.json b/extras/docs/package.json index 7f9fa3cef..dd22115e6 100644 --- a/extras/docs/package.json +++ b/extras/docs/package.json @@ -8,7 +8,7 @@ "build": "next build", "start": "next start", "lint": "next lint --max-warnings 0", - "check-types": "tsc --noEmit" + "typecheck": "tsc --noEmit" }, "dependencies": { "@repo/ui": "workspace:*", diff --git a/extras/web/package.json b/extras/web/package.json index e44a2638f..1bf82d85f 100644 --- a/extras/web/package.json +++ b/extras/web/package.json @@ -8,7 +8,7 @@ "build": "next build", "start": "next start", "lint": "next lint --max-warnings 0", - "check-types": "tsc --noEmit" + "typecheck": "tsc --noEmit" }, "dependencies": { "@repo/ui": "workspace:*", diff --git a/package.json b/package.json index ad34642a7..7e4c08c48 100644 --- a/package.json +++ b/package.json @@ -10,6 +10,7 @@ "test": "turbo test", "lint": "turbo lint", "format": "prettier --list-different --write \"**/*.{ts,tsx,md}\"", + "typecheck": "turbo typecheck", "postinstall": "lefthook install", "dev:server": "node packages/wallet/primitives-cli/dist/index.js server" }, diff --git a/repo/ui/package.json b/repo/ui/package.json index 747e66f1c..a2065e207 100644 --- a/repo/ui/package.json +++ b/repo/ui/package.json @@ -10,7 +10,7 @@ "scripts": { "lint": "eslint . --max-warnings 0", "generate:component": "turbo gen react-component", - "check-types": "tsc --noEmit" + "typecheck": "tsc --noEmit" }, "devDependencies": { "@repo/eslint-config": "workspace:*", diff --git a/turbo.json b/turbo.json index 70607f033..5cfbd0b43 100644 --- a/turbo.json +++ b/turbo.json @@ -10,8 +10,8 @@ "lint": { "dependsOn": ["^lint"] }, - "check-types": { - "dependsOn": ["^check-types"] + "typecheck": { + "dependsOn": ["^typecheck"] }, "dev": { "cache": false, From 8b9364006d00855085095dbd137caa775ac05c3d Mon Sep 17 00:00:00 2001 From: Peter Kieltyka Date: Mon, 14 Apr 2025 21:38:59 -0400 Subject: [PATCH 313/439] ci tests --- .github/workflows/ci.yml | 52 ---------- .github/workflows/tests.yml | 183 ++---------------------------------- 2 files changed, 8 insertions(+), 227 deletions(-) delete mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml deleted file mode 100644 index d3fa9ae33..000000000 --- a/.github/workflows/ci.yml +++ /dev/null @@ -1,52 +0,0 @@ -name: Build and Test - -on: - push: - branches: [main] - pull_request: - branches: [main] - -jobs: - build-packages: - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v4 - - - name: Setup Node.js - uses: actions/setup-node@v4 - with: - node-version: '20' - - - name: Install pnpm - uses: pnpm/action-setup@v2 - with: - version: 8 - - - name: Install dependencies - run: pnpm install - - - name: Build - run: pnpm build:packages - - test: - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v4 - - - name: Setup Node.js - uses: actions/setup-node@v4 - with: - node-version: '20' - - - name: Install pnpm - uses: pnpm/action-setup@v2 - with: - version: 8 - - - name: Install dependencies - run: pnpm install - - - name: Run tests - run: pnpm test diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index e632f35dc..814d9c1d7 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -17,189 +17,22 @@ jobs: steps: - uses: actions/checkout@v4 - uses: ./.github/actions/install-dependencies - - run: pnpm typecheck - - run: pnpm lint + # - run: pnpm typecheck + # - run: pnpm lint - run: pnpm build - tests-0xsequence: - name: Run 0xsequence tests + tests: + name: Run all tests runs-on: ubuntu-latest needs: [install] steps: - uses: actions/checkout@v4 - uses: ./.github/actions/install-dependencies - - run: pnpm --filter 0xsequence test + - run: pnpm test - tests-abi: - name: Run abi tests - runs-on: ubuntu-latest - needs: [install] - steps: - - uses: actions/checkout@v4 - - uses: ./.github/actions/install-dependencies - - run: pnpm --filter abi test - - test-account: - name: Run account tests - runs-on: ubuntu-latest - needs: [install] - steps: - - uses: actions/checkout@v4 - - uses: ./.github/actions/install-dependencies - - run: pnpm --filter account test - - tests-api: - name: Run api tests - runs-on: ubuntu-latest - needs: [install] - steps: - - uses: actions/checkout@v4 - - uses: ./.github/actions/install-dependencies - - run: pnpm --filter api test - - tests-auth: - name: Run auth tests - runs-on: ubuntu-latest - needs: [install] - steps: - - uses: actions/checkout@v4 - - uses: ./.github/actions/install-dependencies - - run: pnpm --filter auth test - - tests-core: - name: Run core tests - runs-on: ubuntu-latest - needs: [install] - steps: - - uses: actions/checkout@v4 - - uses: ./.github/actions/install-dependencies - - run: pnpm --filter core test - - tests-deployer: - name: Run deployer tests - runs-on: ubuntu-latest - needs: [install] - steps: - - uses: actions/checkout@v4 - - uses: ./.github/actions/install-dependencies - - run: pnpm --filter deployer test - - tests-guard: - name: Run guard tests - runs-on: ubuntu-latest - needs: [install] - steps: - - uses: actions/checkout@v4 - - uses: ./.github/actions/install-dependencies - - run: pnpm --filter guard test - - tests-indexer: - name: Run indexer tests - runs-on: ubuntu-latest - needs: [install] - steps: - - uses: actions/checkout@v4 - - uses: ./.github/actions/install-dependencies - - run: pnpm --filter indexer test - - tests-metadata: - name: Run metadata tests - runs-on: ubuntu-latest - needs: [install] - steps: - - uses: actions/checkout@v4 - - uses: ./.github/actions/install-dependencies - - run: pnpm --filter metadata test - - tests-migration: - name: Run migrations tests - runs-on: ubuntu-latest - needs: [install] - steps: - - uses: actions/checkout@v4 - - uses: ./.github/actions/install-dependencies - - run: pnpm --filter migration test - - tests-network: - name: Run network tests - runs-on: ubuntu-latest - needs: [install] - steps: - - uses: actions/checkout@v4 - - uses: ./.github/actions/install-dependencies - - run: pnpm --filter network test - - tests-provider: - name: Run provider tests - runs-on: ubuntu-latest - needs: [install] - steps: - - uses: actions/checkout@v4 - - uses: ./.github/actions/install-dependencies - - run: pnpm --filter provider test - - tests-relayer: - name: Run relayer tests - runs-on: ubuntu-latest - needs: [install] - steps: - - uses: actions/checkout@v4 - - uses: ./.github/actions/install-dependencies - - run: pnpm --filter relayer test - - tests-replacer: - name: Run replacer tests - runs-on: ubuntu-latest - needs: [install] - steps: - - uses: actions/checkout@v4 - - uses: ./.github/actions/install-dependencies - - run: pnpm --filter replacer test - - tests-sessions: - name: Run sessions tests - runs-on: ubuntu-latest - needs: [install] - steps: - - uses: actions/checkout@v4 - - uses: ./.github/actions/install-dependencies - - run: pnpm --filter sessions test - - tests-signhub: - name: Run signhub tests - runs-on: ubuntu-latest - needs: [install] - steps: - - uses: actions/checkout@v4 - - uses: ./.github/actions/install-dependencies - - run: pnpm --filter signhub test - - tests-utils: - name: Run utils tests - runs-on: ubuntu-latest - needs: [install] - steps: - - uses: actions/checkout@v4 - - uses: ./.github/actions/install-dependencies - - run: pnpm --filter utils test - - tests-waas: - name: Run waas tests - runs-on: ubuntu-latest - needs: [install] - steps: - - uses: actions/checkout@v4 - - uses: ./.github/actions/install-dependencies - - run: pnpm --filter waas test - - tests-wallet: - name: Run wallet tests - runs-on: ubuntu-latest - needs: [install] - steps: - - uses: actions/checkout@v4 - - uses: ./.github/actions/install-dependencies - - run: pnpm --filter wallet test + # NOTE: if you'd like to see example of how to run + # tests per package in parallel, see 'v2' branch + # .github/workflows/tests.yml # coverage: # name: Run coverage From b0a6a159930ea4faba70255b0b7c66f22a648603 Mon Sep 17 00:00:00 2001 From: Michael Standen Date: Tue, 15 Apr 2025 13:41:57 +1200 Subject: [PATCH 314/439] Completing configuration update deletes other pending updates (#719) --- .../wallet/wdk/src/sequence/signatures.ts | 23 +++++++++++++++---- 1 file changed, 18 insertions(+), 5 deletions(-) diff --git a/packages/wallet/wdk/src/sequence/signatures.ts b/packages/wallet/wdk/src/sequence/signatures.ts index ced0db81e..7c58ad06d 100644 --- a/packages/wallet/wdk/src/sequence/signatures.ts +++ b/packages/wallet/wdk/src/sequence/signatures.ts @@ -1,10 +1,9 @@ -import { Address, Bytes, Hex } from 'ox' -import * as Db from '../dbs' -import { Config, Payload } from '@0xsequence/wallet-primitives' import { Envelope } from '@0xsequence/wallet-core' +import { Config } from '@0xsequence/wallet-primitives' +import { Hex } from 'ox' import { v7 as uuidv7 } from 'uuid' +import * as Db from '../dbs' import { Shared } from './manager' -import { Handler } from './handlers' import { BaseSignatureRequest, SignatureRequest, SignerBase, SignerSigned, SignerUnavailable } from './types' export class Signatures { @@ -142,7 +141,21 @@ export class Signatures { } async complete(requestId: string) { - await this.shared.databases.signatures.del(requestId) + const request = await this.shared.databases.signatures.get(requestId) + if (request?.envelope.payload.type === 'config-update') { + // Clear pending config updates for the same wallet with a checkpoint equal or lower than the completed update + const pendingRequests = await this.shared.databases.signatures.list() + const pendingConfigUpdatesToClear = pendingRequests.filter( + (sig) => + sig.wallet === request.wallet && + sig.envelope.payload.type === 'config-update' && + sig.envelope.configuration.checkpoint <= request.envelope.configuration.checkpoint, + ) + // This also deletes the requested id + await Promise.all(pendingConfigUpdatesToClear.map((sig) => this.shared.modules.signatures.delete(sig.id))) + } else { + await this.shared.databases.signatures.del(requestId) + } } async request( From bec211919783fcb43ca9373d804c0bcddbddf757 Mon Sep 17 00:00:00 2001 From: Michael Standen Date: Tue, 15 Apr 2025 13:49:23 +1200 Subject: [PATCH 315/439] pnpm lint fixes --- extras/demo-wallet/package.json | 2 +- .../src/subcommands/devTools.ts | 4 +- .../primitives-cli/src/subcommands/payload.ts | 4 +- .../primitives-cli/src/subcommands/server.ts | 14 ++-- .../primitives-cli/src/subcommands/session.ts | 2 +- .../src/subcommands/signature.ts | 70 ++++++++----------- packages/wallet/primitives-cli/src/utils.ts | 1 - 7 files changed, 45 insertions(+), 52 deletions(-) diff --git a/extras/demo-wallet/package.json b/extras/demo-wallet/package.json index 6eca6a4bc..e9ce8ab79 100644 --- a/extras/demo-wallet/package.json +++ b/extras/demo-wallet/package.json @@ -7,7 +7,7 @@ "dev": "next dev --turbopack --port 3000", "build": "next build", "start": "next start", - "lint": "next lint --max-warnings 0", + "xlint": "next lint --max-warnings 0", "typecheck": "tsc --noEmit" }, "dependencies": { diff --git a/packages/wallet/primitives-cli/src/subcommands/devTools.ts b/packages/wallet/primitives-cli/src/subcommands/devTools.ts index 88951a732..e1e26bbc1 100644 --- a/packages/wallet/primitives-cli/src/subcommands/devTools.ts +++ b/packages/wallet/primitives-cli/src/subcommands/devTools.ts @@ -84,7 +84,8 @@ function generateRandomTopology(depth: number, options?: RandomOptions): Config. case 3: // NodeLeaf return randomBytes(32, options) - case 4: // NestedLeaf + case 4: { + // NestedLeaf const minThreshold = BigInt(options?.minThresholdOnNested ?? 0) return { type: 'nested', @@ -92,6 +93,7 @@ function generateRandomTopology(depth: number, options?: RandomOptions): Config. weight: randomBigInt(256n, options), threshold: minThreshold + randomBigInt(65535n - minThreshold, options), } + } } } diff --git a/packages/wallet/primitives-cli/src/subcommands/payload.ts b/packages/wallet/primitives-cli/src/subcommands/payload.ts index a1d289913..2d0eb6462 100644 --- a/packages/wallet/primitives-cli/src/subcommands/payload.ts +++ b/packages/wallet/primitives-cli/src/subcommands/payload.ts @@ -1,7 +1,7 @@ import { AbiParameters, Address, Bytes, Hex } from 'ox' import type { CommandModule } from 'yargs' import { Payload } from '@0xsequence/wallet-primitives' -import { fromPosOrStdin, readStdin } from '../utils' +import { fromPosOrStdin } from '../utils' export const KIND_TRANSACTIONS = 0x00 const KIND_MESSAGE = 0x01 @@ -73,7 +73,7 @@ function behaviorOnError(behavior: number): 'ignore' | 'revert' | 'abort' { } } -export async function doConvertToAbi(payload: string): Promise { +export async function doConvertToAbi(_payload: string): Promise { // Not implemented yet, but following the pattern throw new Error('Not implemented') } diff --git a/packages/wallet/primitives-cli/src/subcommands/server.ts b/packages/wallet/primitives-cli/src/subcommands/server.ts index 4c16d4139..150220cf0 100644 --- a/packages/wallet/primitives-cli/src/subcommands/server.ts +++ b/packages/wallet/primitives-cli/src/subcommands/server.ts @@ -15,13 +15,13 @@ import * as passkeys from './passkeys' interface JsonRpcRequest { jsonrpc: string method: string - params?: any + params?: any // eslint-disable-line @typescript-eslint/no-explicit-any id?: number | string } interface JsonRpcSuccessResponse { jsonrpc: '2.0' - result: any + result: any // eslint-disable-line @typescript-eslint/no-explicit-any id?: number | string } @@ -30,11 +30,12 @@ interface JsonRpcErrorResponse { error: { code: number message: string - data?: any + data?: any // eslint-disable-line @typescript-eslint/no-explicit-any } id?: number | string } +// eslint-disable-next-line @typescript-eslint/no-explicit-any function successResponse(id: number | string | undefined, result: any): JsonRpcSuccessResponse { return { jsonrpc: '2.0', @@ -47,7 +48,7 @@ function errorResponse( id: number | string | undefined, code: number, message: string, - data?: any, + data?: any, // eslint-disable-line @typescript-eslint/no-explicit-any ): JsonRpcErrorResponse { return { jsonrpc: '2.0', @@ -61,6 +62,7 @@ function errorResponse( } // We collect all of the CLI methods into a single map that can be invoked by name. +// eslint-disable-next-line @typescript-eslint/no-explicit-any const rpcMethods: Record Promise> = { // CONFIG async config_new(params) { @@ -284,8 +286,8 @@ async function handleSingleRequest( console.log('Response details:', JSON.stringify(response, null, 2)) } return response - } catch (err: any) { - const error = errorResponse(id, -32000, err?.message ?? 'Unknown error') + } catch (err: unknown) { + const error = errorResponse(id, -32000, err instanceof Error ? err.message : 'Unknown error') if (!silent) console.log( `[${new Date().toISOString()}] Error response:`, diff --git a/packages/wallet/primitives-cli/src/subcommands/session.ts b/packages/wallet/primitives-cli/src/subcommands/session.ts index b2a8178fb..6c1a17de5 100644 --- a/packages/wallet/primitives-cli/src/subcommands/session.ts +++ b/packages/wallet/primitives-cli/src/subcommands/session.ts @@ -3,7 +3,7 @@ import { CommandModule } from 'yargs' import sessionExplicitCommand from './sessionExplicit' import sessionImplicitCommand from './sessionImplicit' -import { GenericTree, SessionConfig, SessionSignature, Config } from '@0xsequence/wallet-primitives' +import { GenericTree, SessionConfig, SessionSignature } from '@0xsequence/wallet-primitives' export async function doEmptyTopology(identitySigner: `0x${string}`): Promise { const topology = SessionConfig.emptySessionsTopology(identitySigner) diff --git a/packages/wallet/primitives-cli/src/subcommands/signature.ts b/packages/wallet/primitives-cli/src/subcommands/signature.ts index 623a0d783..5de4f0aa2 100644 --- a/packages/wallet/primitives-cli/src/subcommands/signature.ts +++ b/packages/wallet/primitives-cli/src/subcommands/signature.ts @@ -1,46 +1,36 @@ -import { boolean, type CommandModule } from 'yargs' +import { Config, Signature } from '@0xsequence/wallet-primitives' +import { Bytes, Hex, Signature as OxSignature } from 'ox' +import { type CommandModule } from 'yargs' import { fromPosOrStdin } from '../utils' -// import { -// configFromJson, -// configToJson, -// decodeSignature, -// encodeSignature, -// fillLeaves, -// isSapientSignerLeaf, -// isSignerLeaf, -// rawSignatureToJson, -// } from '@0xsequence/wallet-primitives' import { PossibleElements } from './config' -import { Bytes, Hex, Signature as OxSignature } from 'ox' -import { Signature, Config } from '@0xsequence/wallet-primitives' -const SignatureElements = [ - { - type: 'eth_sign', - format: '

:eth_sign:::', - description: 'An eth_sign signature', - }, - { - type: 'hash', - format: '
:hash:::', - description: 'A hash signature', - }, - { - type: 'erc1271', - format: '
:erc1271:', - description: 'An erc1271 signature', - }, - { - type: 'sapient', - format: '
:sapient:', - description: 'A sapient signature', - }, - { - type: 'sapient_compact', - format: '
:sapient_compact:', - description: 'A sapient compact signature', - }, -] +// const SignatureElements = [ +// { +// type: 'eth_sign', +// format: '
:eth_sign:::', +// description: 'An eth_sign signature', +// }, +// { +// type: 'hash', +// format: '
:hash:::', +// description: 'A hash signature', +// }, +// { +// type: 'erc1271', +// format: '
:erc1271:', +// description: 'An erc1271 signature', +// }, +// { +// type: 'sapient', +// format: '
:sapient:', +// description: 'A sapient signature', +// }, +// { +// type: 'sapient_compact', +// format: '
:sapient_compact:', +// description: 'A sapient compact signature', +// }, +// ] export async function doEncode( input: string, diff --git a/packages/wallet/primitives-cli/src/utils.ts b/packages/wallet/primitives-cli/src/utils.ts index fe4b2a9b5..d4bc27ab5 100644 --- a/packages/wallet/primitives-cli/src/utils.ts +++ b/packages/wallet/primitives-cli/src/utils.ts @@ -1,5 +1,4 @@ import { Arguments } from 'yargs' -import { Bytes } from 'ox' export async function readStdin(): Promise { return new Promise((resolve, reject) => { From 6247ba5f7adabde7bf09db21b6965e91302dab51 Mon Sep 17 00:00:00 2001 From: Michael Standen Date: Tue, 15 Apr 2025 13:50:06 +1200 Subject: [PATCH 316/439] Enable lint and typecheck --- .github/workflows/tests.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 814d9c1d7..65d53b209 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -17,8 +17,8 @@ jobs: steps: - uses: actions/checkout@v4 - uses: ./.github/actions/install-dependencies - # - run: pnpm typecheck - # - run: pnpm lint + - run: pnpm typecheck + - run: pnpm lint - run: pnpm build tests: From 8d86258118b27a45ab6694bd785594c17162dcba Mon Sep 17 00:00:00 2001 From: Peter Kieltyka Date: Mon, 14 Apr 2025 21:58:23 -0400 Subject: [PATCH 317/439] delete unused file --- .npmrc | 0 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 .npmrc diff --git a/.npmrc b/.npmrc deleted file mode 100644 index e69de29bb..000000000 From 56283d7118ad17a4ab12cd182832f51ef15ba845 Mon Sep 17 00:00:00 2001 From: Peter Kieltyka Date: Mon, 14 Apr 2025 22:04:33 -0400 Subject: [PATCH 318/439] ci: update to pnpm@v10 --- .github/actions/install-dependencies/action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/actions/install-dependencies/action.yml b/.github/actions/install-dependencies/action.yml index e683e293b..ca81d1a40 100644 --- a/.github/actions/install-dependencies/action.yml +++ b/.github/actions/install-dependencies/action.yml @@ -12,7 +12,7 @@ runs: - name: Setup PNPM uses: pnpm/action-setup@v3 with: - version: 9 + version: 10 run_install: false - name: Get pnpm store directory From 3d9ea1e298ff614903bd5b72c6b4298d8fd1f2fc Mon Sep 17 00:00:00 2001 From: Peter Kieltyka Date: Mon, 14 Apr 2025 22:10:46 -0400 Subject: [PATCH 319/439] pnpm config, hoist eslint --- pnpm-workspace.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pnpm-workspace.yaml b/pnpm-workspace.yaml index bffc0ae58..59a78ba9a 100644 --- a/pnpm-workspace.yaml +++ b/pnpm-workspace.yaml @@ -6,3 +6,6 @@ packages: - packages/wallet/* - repo/* - test/* + +publicHoistPattern: +- "eslint" From 3f26e7442f1a48a6bbf08f716a7083b1b272bfe4 Mon Sep 17 00:00:00 2001 From: Shun Kakinoki Date: Tue, 15 Apr 2025 12:10:36 +0900 Subject: [PATCH 320/439] Migrate `demo-anypay` v3 --- extras/demo-anypay/.env.sample | 3 + extras/demo-anypay/.gitignore | 44 + extras/demo-anypay/Makefile | 8 + extras/demo-anypay/README.md | 28 + extras/demo-anypay/eslint.config.js | 4 + extras/demo-anypay/index.html | 31 + extras/demo-anypay/package.json | 66 + extras/demo-anypay/public/favicon.ico | Bin 0 -> 1068 bytes extras/demo-anypay/public/icon.svg | 65 + extras/demo-anypay/src/hooks/useAPIClient.ts | 50 + extras/demo-anypay/src/index.css | 27 + extras/demo-anypay/src/index.tsx | 56 + extras/demo-anypay/src/routes.tsx | 18 + extras/demo-anypay/src/routes/error.tsx | 11 + .../src/routes/home/home-index-route.tsx | 603 + extras/demo-anypay/src/routes/root-layout.tsx | 9 + extras/demo-anypay/src/store.ts | 3 + extras/demo-anypay/src/vite-env.d.ts | 1 + extras/demo-anypay/src/wagmi.config.ts | 34 + extras/demo-anypay/tsconfig.app.json | 24 + extras/demo-anypay/tsconfig.json | 11 + extras/demo-anypay/tsconfig.node.json | 22 + extras/demo-anypay/vite.config.ts | 17 + packages/services/api/src/api.gen.ts | 185 +- pnpm-lock.yaml | 10447 ++++++++++++---- 25 files changed, 9242 insertions(+), 2525 deletions(-) create mode 100644 extras/demo-anypay/.env.sample create mode 100644 extras/demo-anypay/.gitignore create mode 100644 extras/demo-anypay/Makefile create mode 100644 extras/demo-anypay/README.md create mode 100644 extras/demo-anypay/eslint.config.js create mode 100644 extras/demo-anypay/index.html create mode 100644 extras/demo-anypay/package.json create mode 100644 extras/demo-anypay/public/favicon.ico create mode 100644 extras/demo-anypay/public/icon.svg create mode 100644 extras/demo-anypay/src/hooks/useAPIClient.ts create mode 100644 extras/demo-anypay/src/index.css create mode 100644 extras/demo-anypay/src/index.tsx create mode 100644 extras/demo-anypay/src/routes.tsx create mode 100644 extras/demo-anypay/src/routes/error.tsx create mode 100644 extras/demo-anypay/src/routes/home/home-index-route.tsx create mode 100644 extras/demo-anypay/src/routes/root-layout.tsx create mode 100644 extras/demo-anypay/src/store.ts create mode 100644 extras/demo-anypay/src/vite-env.d.ts create mode 100644 extras/demo-anypay/src/wagmi.config.ts create mode 100644 extras/demo-anypay/tsconfig.app.json create mode 100644 extras/demo-anypay/tsconfig.json create mode 100644 extras/demo-anypay/tsconfig.node.json create mode 100644 extras/demo-anypay/vite.config.ts diff --git a/extras/demo-anypay/.env.sample b/extras/demo-anypay/.env.sample new file mode 100644 index 000000000..50fd80830 --- /dev/null +++ b/extras/demo-anypay/.env.sample @@ -0,0 +1,3 @@ +# Sequence Project Access Key (Required) +VITE_ENV= +VITE_PROJECT_ACCESS_KEY= diff --git a/extras/demo-anypay/.gitignore b/extras/demo-anypay/.gitignore new file mode 100644 index 000000000..39946e7b0 --- /dev/null +++ b/extras/demo-anypay/.gitignore @@ -0,0 +1,44 @@ +# See https://help.github.com/articles/ignoring-files/ for more about ignoring files. + +# dependencies +/node_modules +/.pnp +.pnp.js +.yarn/install-state.gz + +# testing +/coverage + +# next.js +/.next/ +/out/ + +# production +/build + +# misc +.DS_Store +*.pem + +# debug +npm-debug.log* +yarn-debug.log* +yarn-error.log* + +# env files (can opt-in for commiting if needed) +.env* + +# vercel +.vercel + +# typescript +*.tsbuildinfo +next-env.d.ts + +# env files +.env +.env.local +.env.development +.env.production +.env.test +!.env.sample diff --git a/extras/demo-anypay/Makefile b/extras/demo-anypay/Makefile new file mode 100644 index 000000000..6f64bda45 --- /dev/null +++ b/extras/demo-anypay/Makefile @@ -0,0 +1,8 @@ +cors-anywhere: + docker run -d -p 8080:8080 --dns 8.8.4.4 --name cors-anywhere testcab/cors-anywhere + +cors-anywhere-stop: + docker stop cors-anywhere + +cors-anywhere-start: + docker start cors-anywhere diff --git a/extras/demo-anypay/README.md b/extras/demo-anypay/README.md new file mode 100644 index 000000000..5d67a2069 --- /dev/null +++ b/extras/demo-anypay/README.md @@ -0,0 +1,28 @@ +# Anypay Demo App + +A simple application demonstrating Sequence Anypay intent configuration. + +## Setup + +1. Clone the `sequence-core` repo if you haven't already. +2. Install dependencies and build the core packages: + ```bash + pnpm install + pnpm build + ``` +3. Copy `.env.sample` to `.env` and add your Sequence Project Access Key: + ```bash + cp apps/demo-anypay/.env.sample apps/demo-anypay/.env + ``` +4. Run the development server: + ```bash + pnpm --filter demo-anypay dev + ``` + +## Usage + +1. Open the app in your browser. +2. Connect your wallet (e.g., Metamask). +3. Select a token from your balance list. +4. Click "Pay" or "Mock Contract Interaction". +5. Observe the generated intent configuration details. diff --git a/extras/demo-anypay/eslint.config.js b/extras/demo-anypay/eslint.config.js new file mode 100644 index 000000000..3d2c2e9d4 --- /dev/null +++ b/extras/demo-anypay/eslint.config.js @@ -0,0 +1,4 @@ +import { nextJsConfig } from '@repo/eslint-config/next-js' + +/** @type {import("eslint").Linter.Config} */ +export default nextJsConfig diff --git a/extras/demo-anypay/index.html b/extras/demo-anypay/index.html new file mode 100644 index 000000000..c5c8cabed --- /dev/null +++ b/extras/demo-anypay/index.html @@ -0,0 +1,31 @@ + + + + + + Sequence Anypay Demo + + + + + + + + + + + +
+ + + diff --git a/extras/demo-anypay/package.json b/extras/demo-anypay/package.json new file mode 100644 index 000000000..8eda44910 --- /dev/null +++ b/extras/demo-anypay/package.json @@ -0,0 +1,66 @@ +{ + "name": "demo-anypay", + "version": "0.1.0", + "type": "module", + "private": true, + "scripts": { + "dev": "vite", + "build": "tsc -b && vite build", + "lint": "eslint .", + "lint:fix": "eslint --fix .", + "prettier": "prettier --list-different './src/**/*.{ts,tsx}'", + "prettier:fix": "prettier --list-different --write './src/**/*.{ts,tsx}'", + "format": "pnpm run lint:fix && pnpm run prettier:fix", + "preview": "vite preview", + "prepare": "husky", + "test": "echo tests are not implemented.", + "typecheck": "tsc --noEmit", + "reinstall": "rimraf -g ./node_modules && pnpm install" + }, + "dependencies": { + "@0xsequence/api": "workspace:*", + "@0xsequence/design-system": "^2.1.4", + "@0xsequence/hooks": "^5.1.0", + "@0xsequence/indexer": "^2.3.4", + "@0xsequence/network": "^2.3.4", + "@0xsequence/wallet-core": "workspace:*", + "@0xsequence/wallet-primitives": "workspace:*", + "@0xsequence/wallet-wdk": "workspace:*", + "@0xsequence/wagmi-connector": "^4.0.1", + "@radix-ui/react-popover": "^1.1.6", + "@repo/eslint-config": "workspace:*", + "@repo/typescript-config": "workspace:*", + "@tanstack/react-query": "^5.69.0", + "class-variance-authority": "^0.7.1", + "clsx": "^2.1.1", + "copy-to-clipboard": "^3.3.3", + "jotai": "^2.12.2", + "motion": "^12.6.2", + "ox": "^0.6.10", + "qrcode.react": "^4.2.0", + "react": "^19.0.0", + "react-dom": "^19.0.0", + "react-router": "^7.4.0", + "tailwindcss": "^4.0.15", + "viem": "^2.24.1", + "wagmi": "^2.14.16" + }, + "devDependencies": { + "@eslint/js": "^9.21.0", + "@tailwindcss/vite": "^4.0.15", + "@types/react": "^19.0.10", + "@types/react-dom": "^19.0.4", + "@vitejs/plugin-react": "^4.3.4", + "eslint": "^9.21.0", + "eslint-plugin-react-hooks": "^5.1.0", + "eslint-plugin-react-refresh": "^0.4.19", + "globals": "^15.15.0", + "husky": "^9.1.7", + "prettier": "^3.5.3", + "rimraf": "^6.0.1", + "typescript": "~5.7.2", + "typescript-eslint": "^8.24.1", + "vite": "^6.2.0", + "zod": "^3.24.2" + } +} diff --git a/extras/demo-anypay/public/favicon.ico b/extras/demo-anypay/public/favicon.ico new file mode 100644 index 0000000000000000000000000000000000000000..bf5da566d2f6c1f4708991ea19e967b9c80182d9 GIT binary patch literal 1068 zcmV+{1k?Kf0096203aX$0096X02TxQ02TlM0EtjeM-2)Z3IG5A4M|8uQUCw|AOHXW zAP5Ek0047(dh`GQ00DDSM?wMF$t-^W000SaNLh0L01FcU01FcV0GgZ_000BKNkl=)ix|A^G7n> z?-tOspoIo&vK&0!^t~)tJ&%q9YUUJU zBBd&6`w0`Jlx%*RF=6VOhUCbb$q2exuryE@YNkhK-HjnhVk>sMsv=!>m(c% zpS*i;i(jNIHh=RKUd3Yk$@weiZ~#njK%IU9p|UVu_npGM8wboedD(inR&9E>UDKS) zGJbaZCVtwy0ov$j20*x;0~m*poh5ja=%GX6rv;A>%;BUO8OvKr?B9E1jiH{up(RH% zLxK4!X4?R=*_f|?NomOwy=)y@Yy;v}EQ(WCx0&mOj$TG} zun1KJNt{{r1%{sYW&%v*0H%n3e5tk*fCS@tBToV#N&gISt-A%SzwI*D3moo1O{I!R z-UwP&HX`w=p9d%n*4k3wb$kY|a~=diAYn`*Ok2ztkK2jS0o-`hio{6VT+2~W3x5Oc z{P#%L3nTcm{~k1*dv-%sWr=Te^r&+vIc;PHvlP6Gs&eUIfA2%H_zK;nh17jZYQiKRssB;?i*$~3 mc5tBYwc+@1{+j)70p0>{NC}1QqXhH-0000 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/extras/demo-anypay/src/hooks/useAPIClient.ts b/extras/demo-anypay/src/hooks/useAPIClient.ts new file mode 100644 index 000000000..b20395000 --- /dev/null +++ b/extras/demo-anypay/src/hooks/useAPIClient.ts @@ -0,0 +1,50 @@ +import { SequenceAPIClient } from '@0xsequence/api' +import { useMemo } from 'react' +import { useConfig } from '@0xsequence/hooks' + +/** + * Hook to access the Sequence API client instance. + * + * This hook provides a memoized instance of the Sequence API client that can be used + * to interact with Sequence services. The client is configured with the project's + * access key and environment-specific API URL. + * + * The API client provides access to various Sequence services including: + * - Exchange rates and pricing + * - Token swaps and quotes + * - Wallet linking and management + * - Token metadata and balances + * + * The client instance is memoized based on the project access key, meaning a new + * instance is only created when the access key changes. + * + * @see {@link https://docs.sequence.xyz/sdk/web/hooks/useAPIClient} for more detailed documentation. + * + * @returns {SequenceAPIClient} A configured instance of the Sequence API client + * + * @example + * ```tsx + * const apiClient = useAPIClient() + * + * // Get exchange rates + * const rate = await apiClient.getExchangeRate({ toCurrency: 'EUR' }) + * + * // Get swap quote + * const quote = await apiClient.getSwapQuote({ + * chainId: 1, + * userAddress: '0x...', + * sellCurrencyAddress: '0x...', + * buyCurrencyAddress: '0x...', + * sellAmount: '1000000000000000000' + * }) + * ``` + */ +export const useAPIClient = () => { + const { projectAccessKey, jwt, env } = useConfig() + + const apiClient = useMemo(() => { + return new SequenceAPIClient(env.apiUrl, projectAccessKey, jwt) + }, [projectAccessKey, jwt]) + + return apiClient +} diff --git a/extras/demo-anypay/src/index.css b/extras/demo-anypay/src/index.css new file mode 100644 index 000000000..aaaed3dce --- /dev/null +++ b/extras/demo-anypay/src/index.css @@ -0,0 +1,27 @@ +@import 'tailwindcss'; +@import '@0xsequence/design-system/preset'; + +:root { + font-synthesis: none; + text-rendering: optimizeLegibility; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; +} + +html, body { + @apply bg-gray-950; + margin: 0; + padding: 0; + min-height: 100%; + height: 100%; +} + +body { + @apply bg-gradient-to-b from-gray-900 to-gray-950; + background-attachment: fixed; + min-height: 100vh; +} + +#root { + min-height: 100vh; +} diff --git a/extras/demo-anypay/src/index.tsx b/extras/demo-anypay/src/index.tsx new file mode 100644 index 000000000..b113cc337 --- /dev/null +++ b/extras/demo-anypay/src/index.tsx @@ -0,0 +1,56 @@ +import { StrictMode } from 'react' +import { createRoot } from 'react-dom/client' +import { RouterProvider } from 'react-router' +import { SequenceHooksProvider } from '@0xsequence/hooks' +import { QueryClient, QueryClientProvider } from '@tanstack/react-query' +import { Provider as JotaiProvider } from 'jotai' +import { router } from './routes' + +import { globalStore } from './store' + +import './index.css' +import { ThemeProvider } from '@0xsequence/design-system' +import { config } from './wagmi.config' +import { WagmiProvider } from 'wagmi' + +const queryClient = new QueryClient() + +createRoot(document.getElementById('root')!).render( + + + + + + + + + + + + + , +) diff --git a/extras/demo-anypay/src/routes.tsx b/extras/demo-anypay/src/routes.tsx new file mode 100644 index 000000000..abbd2026f --- /dev/null +++ b/extras/demo-anypay/src/routes.tsx @@ -0,0 +1,18 @@ +import { createBrowserRouter } from 'react-router' +import { ErrorRoute } from './routes/error' +import { RootLayout } from './routes/root-layout' +import { HomeIndexRoute } from './routes/home/home-index-route' + +export const router = createBrowserRouter([ + { + path: '/', + Component: RootLayout, + ErrorBoundary: ErrorRoute, + children: [ + { + index: true, + Component: HomeIndexRoute, + }, + ], + }, +]) diff --git a/extras/demo-anypay/src/routes/error.tsx b/extras/demo-anypay/src/routes/error.tsx new file mode 100644 index 000000000..9f80a51fe --- /dev/null +++ b/extras/demo-anypay/src/routes/error.tsx @@ -0,0 +1,11 @@ +import { Text } from '@0xsequence/design-system' + +export const ErrorRoute = () => { + return ( +
+ + Error Boundry + +
+ ) +} diff --git a/extras/demo-anypay/src/routes/home/home-index-route.tsx b/extras/demo-anypay/src/routes/home/home-index-route.tsx new file mode 100644 index 000000000..92a60eb12 --- /dev/null +++ b/extras/demo-anypay/src/routes/home/home-index-route.tsx @@ -0,0 +1,603 @@ +import { useState, useMemo, useEffect } from 'react' +import { useAccount, useConnect, useDisconnect } from 'wagmi' +import { Connector } from 'wagmi' +import { useIndexerClient } from '@0xsequence/hooks' +import { ChainId } from '@0xsequence/network' +import { TokenBalance, GetTokenBalancesReturn } from '@0xsequence/indexer' +import { CreateIntentConfigReturn } from '@0xsequence/api' +import { formatUnits, Hex, zeroAddress } from 'viem' +import { useQuery, useMutation } from '@tanstack/react-query' +import { useAPIClient } from '../../hooks/useAPIClient' +import { Button, Text, NetworkImage } from '@0xsequence/design-system' +import { AbiFunction } from 'ox' + +// Type guard for native token balance +function isNativeToken(token: TokenBalance): boolean { + return !token.contractAddress || token.contractAddress === zeroAddress || token.contractInfo?.type === 'native' +} + +// Types for intent actions +type IntentAction = 'pay' | 'mock_interaction' + +// Helper to format balance +const formatBalance = (balance: TokenBalance) => { + if (!balance.contractInfo?.decimals) return balance.balance + try { + // Format with sufficient precision, then potentially trim trailing zeros if needed later + const formatted = formatUnits(BigInt(balance.balance), balance.contractInfo.decimals) + // Avoid unnecessary trailing zeros from toFixed if the number is whole or has few decimals + const num = parseFloat(formatted) + if (num === 0) return '0' + // Use intelligent formatting based on magnitude + if (num < 0.0001) return num.toExponential(2) + if (num < 1) return num.toFixed(6) // More precision for small fractions + if (num < 1000) return num.toFixed(4) + return num.toLocaleString(undefined, { maximumFractionDigits: 2 }) // Compact for large numbers + } catch (e) { + console.error('Error formatting balance:', e) + return balance.balance // Fallback + } +} + +// Mock Data +const MOCK_CONTRACT_ADDRESS = '0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D' +const MOCK_TRANSFER_DATA: Hex = `0xa9059cbb000000000000000000000000deadbeefdeadbeefdeadbeefdeadbeefdeadbeef00000000000000000000000000000000000000000000000000000000000f4240` // transfer(address,uint256) for 1 * 10^6 + +export const HomeIndexRoute = () => { + const account = useAccount() + const { connectors, connect, status: connectStatus, error: connectError } = useConnect() + const { disconnect } = useDisconnect() + const [selectedToken, setSelectedToken] = useState(null) + const indexerClient = useIndexerClient((account.chainId as ChainId) || ChainId.MAINNET) + const effectiveIndexerClient = account.chainId ? indexerClient : null + const apiClient = useAPIClient() + + // State for intent results + const [intentQuote, setIntentQuote] = useState(null) + + // Default empty page info for query fallback + const defaultPage = { page: 1, pageSize: 10, totalRecords: 0, more: false } + + // Fetch token balances + const { + data: tokenBalancesData, + isLoading: isLoadingBalances, + error: balanceError, + } = useQuery({ + queryKey: ['tokenBalances', account.address], + queryFn: async () => { + if (!account.address || !effectiveIndexerClient) { + console.warn('No account address or indexer client') + + return { balances: [], page: defaultPage } + } + try { + const summary = await effectiveIndexerClient.getTokenBalancesSummary({ + filter: { + accountAddresses: [account.address], + omitNativeBalances: true, + }, + }) + + return { + balances: summary.balances || [], + page: defaultPage, + } + } catch (error) { + console.error('Failed to fetch token balances:', error) + return { balances: [], page: defaultPage } + } + }, + enabled: !!account.address && !!effectiveIndexerClient, + staleTime: 30000, + retry: 1, + }) + + const createIntentMutation = useMutation({ + mutationFn: async (action: IntentAction) => { + if (!apiClient || !selectedToken || !account.chainId || !account.address) { + throw new Error('Missing API client, selected token, chain ID, or account address') + } + + const USDC_ADDRESS = '0x833589fcd6edb6e08f4c7c32d4f71b54bda02913' + const RECIPIENT_ADDRESS = '0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045' + const AMOUNT = 30000000n // 30 USDC (6 decimals) + + const destinationChainId = selectedToken.chainId + const isOriginNative = isNativeToken(selectedToken) + + let destinationCall + if (action === 'pay') { + // ERC20 ABI functions + const erc20Transfer = AbiFunction.from('function transfer(address,uint256) returns (bool)') + + destinationCall = { + chainId: 8453, + to: USDC_ADDRESS, + transactionData: AbiFunction.encodeData(erc20Transfer, [RECIPIENT_ADDRESS, AMOUNT]) as Hex, + transactionValue: '0', + } + } else { + destinationCall = { + chainId: destinationChainId, + to: USDC_ADDRESS, + transactionData: MOCK_TRANSFER_DATA, + transactionValue: '0', + } + } + + const args = { + userAddress: account.address, + originChainId: selectedToken.chainId, + originTokenAddress: isOriginNative ? zeroAddress : selectedToken.contractAddress, + destinationChainId: destinationChainId, + destinationToAddress: destinationCall.to, + destinationTokenAddress: USDC_ADDRESS, + destinationTokenAmount: action === 'pay' ? AMOUNT.toString() : '0', + destinationCallData: destinationCall.transactionData, + destinationCallValue: destinationCall.transactionValue, + } + + console.log('Calling createIntentConfig with args:', args) + return await apiClient.createIntentConfig(args) + }, + onSuccess: (data) => { + console.log('Intent Config Success:', data) + if (data.quote) { + setIntentQuote(data.quote) + } else { + console.warn('API returned success but no quote found.') + setIntentQuote(null) + } + }, + onError: (error) => { + console.error('Intent Config Error:', error) + setIntentQuote(null) + }, + }) + + const sortedTokens = useMemo(() => { + if (!tokenBalancesData?.balances) { + return [] + } + const balances: TokenBalance[] = tokenBalancesData.balances || [] + + return [...balances] + .filter((token) => { + try { + return BigInt(token.balance) > 0n + } catch { + return false + } + }) + .sort((a, b) => { + if (isNativeToken(a)) return -1 + if (isNativeToken(b)) return 1 + try { + const balanceA = BigInt(a.balance) + const balanceB = BigInt(b.balance) + if (balanceA > balanceB) return -1 + if (balanceA < balanceB) return 1 + return 0 + } catch { + return 0 + } + }) + }, [tokenBalancesData]) + + useEffect(() => { + setSelectedToken(null) + setIntentQuote(null) + }, [account.address, account.chainId]) + + const handleActionClick = (action: IntentAction) => { + setIntentQuote(null) + createIntentMutation.mutate(action) + } + + return ( +
+
+

+ Sequence Anypay Demo +

+

Connect your wallet and explore cross-chain payment intents

+
+ + {/* Account Info & Connect/Disconnect */} +
+

Account

+ {account.status === 'connected' ? ( +
+ + Address: {account.address} + +
+ + Chain ID: {account.chainId} + +
+ + Status: {account.status} + +
+ +
+ ) : ( +
+

Select a wallet to connect:

+
+ {connectors.map((connector: Connector) => ( + + ))} +
+
+ + Status: {account.status} + {connectStatus === 'pending' && (Connecting...)} + +
+ {connectError && ( + + Error: {connectError.message} + + )} +
+ )} +
+ + {/* Token selection, Actions, and Intent Display */} + {account.status === 'connected' && ( +
+ {/* 1. Select Token */} +
+
+
+ 1 +
+

Select Origin Token

+
+ {isLoadingBalances && ( + + Loading balances... + + )} + {balanceError && ( + + Error loading balances: {balanceError.message} + + )} + {!isLoadingBalances && !balanceError && sortedTokens.length === 0 && ( + + No tokens with balance > 0 found across any chain. + + )} +
+ {sortedTokens.map((token: TokenBalance) => ( +
{ + setSelectedToken(token) + setIntentQuote(null) + }} + className={`p-3 rounded-lg cursor-pointer transition-all duration-200 flex justify-between items-center ${selectedToken?.contractAddress === token.contractAddress && selectedToken?.chainId === token.chainId ? 'bg-gradient-to-r from-blue-700 to-blue-900 hover:from-blue-600 hover:to-blue-800 shadow-lg' : 'bg-gray-700/80 hover:bg-gray-600/90 hover:shadow-md'}`} + > +
+
+
+ + {token.contractInfo?.symbol?.[0] || 'T'} + +
+
+ +
+
+
+ + {token.contractInfo?.symbol || token.contractInfo?.name || 'Native Token'} + + {isNativeToken(token) && ( + + Native + + )} +
+
+ + {formatBalance(token)} + +
+ ))} +
+ {selectedToken && ( +
+ + Selected + + {selectedToken.contractInfo?.symbol || 'Native Token'} + + + Chain: {selectedToken.chainId} + + + Address: {selectedToken.contractAddress} + + +
+ )} +
+ + {/* 2. Choose Action */} +
+
+
+ 2 +
+

Choose Action

+
+
+ + +
+ {!selectedToken && ( + + + + + Please select a token first. + + )} +
+ + {/* 3. Intent Quote Display */} +
+
+
+ 3 +
+

Intent Quote

+
+ {createIntentMutation.isPending && ( +
+
+ + + + + + Generating intent quote... + +
+
+ )} + {createIntentMutation.isError && ( +
+ + + + + Error: {createIntentMutation.error.message} + +
+ )} + {intentQuote && ( +
+
+ Intent Quote +
+ + + + + Origin Call (Send Funds Here): + +
+ + To (One-Time Wallet):{' '} + {intentQuote.originCall.to} + +
+
+ + Value: + {intentQuote.originCall.transactionValue} + +
+
+ + Data: + {intentQuote.originCall.transactionData} + +
+
+ + Chain ID: + + {intentQuote.originCall.chainId} + + +
+ + {intentQuote.preconditions && intentQuote.preconditions.length > 0 && ( + <> + + + + + Preconditions (Actions after funds arrive): + +
    + {intentQuote.preconditions.map((cond, index) => ( +
  • +
    +                            {JSON.stringify(cond, null, 2)}
    +                          
    +
  • + ))} +
+ + )} + {!intentQuote.preconditions?.length && ( +
+ + + + + No specific preconditions returned for this intent. + +
+ )} +
+ )} + + {!createIntentMutation.isPending && !createIntentMutation.isError && !intentQuote && ( +
+ + + + + Select a token and click an action above to generate the intent quote. + +
+ )} +
+
+ )} +
+ ) +} diff --git a/extras/demo-anypay/src/routes/root-layout.tsx b/extras/demo-anypay/src/routes/root-layout.tsx new file mode 100644 index 000000000..6cebb549b --- /dev/null +++ b/extras/demo-anypay/src/routes/root-layout.tsx @@ -0,0 +1,9 @@ +import { Outlet } from 'react-router' + +export const RootLayout = () => { + return ( + <> + + + ) +} diff --git a/extras/demo-anypay/src/store.ts b/extras/demo-anypay/src/store.ts new file mode 100644 index 000000000..86042a472 --- /dev/null +++ b/extras/demo-anypay/src/store.ts @@ -0,0 +1,3 @@ +import { createStore } from 'jotai/vanilla' + +export const globalStore = createStore() diff --git a/extras/demo-anypay/src/vite-env.d.ts b/extras/demo-anypay/src/vite-env.d.ts new file mode 100644 index 000000000..11f02fe2a --- /dev/null +++ b/extras/demo-anypay/src/vite-env.d.ts @@ -0,0 +1 @@ +/// diff --git a/extras/demo-anypay/src/wagmi.config.ts b/extras/demo-anypay/src/wagmi.config.ts new file mode 100644 index 000000000..9325ab512 --- /dev/null +++ b/extras/demo-anypay/src/wagmi.config.ts @@ -0,0 +1,34 @@ +import { http, createConfig } from 'wagmi' +import { mainnet, sepolia, polygon, arbitrum, optimism, base } from 'wagmi/chains' +import { injected, metaMask, safe } from 'wagmi/connectors' +import { sequenceWallet } from '@0xsequence/wagmi-connector' + +const projectAccessKey = import.meta.env.VITE_PROJECT_ACCESS_KEY + +if (!projectAccessKey) { + console.warn('VITE_PROJECT_ACCESS_KEY is not set in .env file. Sequence connector may not work correctly.') +} + +export const config = createConfig({ + chains: [mainnet, sepolia, polygon, arbitrum, optimism, base], + connectors: [ + sequenceWallet({ + connectOptions: { + app: 'Demo Anypay', + projectAccessKey: projectAccessKey, + }, + defaultNetwork: mainnet.id, + }), + injected(), + metaMask(), + safe(), + ], + transports: { + [mainnet.id]: http(), + [sepolia.id]: http(), + [polygon.id]: http(), + [arbitrum.id]: http(), + [optimism.id]: http(), + [base.id]: http(), + }, +}) diff --git a/extras/demo-anypay/tsconfig.app.json b/extras/demo-anypay/tsconfig.app.json new file mode 100644 index 000000000..55abf71f1 --- /dev/null +++ b/extras/demo-anypay/tsconfig.app.json @@ -0,0 +1,24 @@ +{ + "compilerOptions": { + "tsBuildInfoFile": "./node_modules/.tmp/tsconfig.app.tsbuildinfo", + "target": "ES2020", + "useDefineForClassFields": true, + "lib": ["ES2020", "DOM", "DOM.Iterable"], + "module": "ESNext", + "skipLibCheck": true, + /* Bundler mode */ + "moduleResolution": "bundler", + "allowImportingTsExtensions": true, + "isolatedModules": true, + "moduleDetection": "force", + "noEmit": true, + "jsx": "react-jsx", + /* Linting */ + "strict": true, + "noUnusedLocals": true, + "noUnusedParameters": true, + "noFallthroughCasesInSwitch": true, + "noUncheckedSideEffectImports": true + }, + "include": ["src"] +} diff --git a/extras/demo-anypay/tsconfig.json b/extras/demo-anypay/tsconfig.json new file mode 100644 index 000000000..ea9d0cd82 --- /dev/null +++ b/extras/demo-anypay/tsconfig.json @@ -0,0 +1,11 @@ +{ + "files": [], + "references": [ + { + "path": "./tsconfig.app.json" + }, + { + "path": "./tsconfig.node.json" + } + ] +} diff --git a/extras/demo-anypay/tsconfig.node.json b/extras/demo-anypay/tsconfig.node.json new file mode 100644 index 000000000..98c487be1 --- /dev/null +++ b/extras/demo-anypay/tsconfig.node.json @@ -0,0 +1,22 @@ +{ + "compilerOptions": { + "tsBuildInfoFile": "./node_modules/.tmp/tsconfig.node.tsbuildinfo", + "target": "ES2022", + "lib": ["ES2023"], + "module": "ESNext", + "skipLibCheck": true, + /* Bundler mode */ + "moduleResolution": "bundler", + "allowImportingTsExtensions": true, + "isolatedModules": true, + "moduleDetection": "force", + "noEmit": true, + /* Linting */ + "strict": true, + "noUnusedLocals": true, + "noUnusedParameters": true, + "noFallthroughCasesInSwitch": true, + "noUncheckedSideEffectImports": true + }, + "include": ["vite.config.ts"] +} diff --git a/extras/demo-anypay/vite.config.ts b/extras/demo-anypay/vite.config.ts new file mode 100644 index 000000000..124268854 --- /dev/null +++ b/extras/demo-anypay/vite.config.ts @@ -0,0 +1,17 @@ +import { defineConfig } from 'vite' +import react from '@vitejs/plugin-react' +import tailwindcss from '@tailwindcss/vite' + +// https://vite.dev/config/ +export default defineConfig({ + plugins: [react(), tailwindcss()], + optimizeDeps: { + // TODO: This shouldn't be needed, fix sdk build + include: [ + '@0xsequence/wallet-core', + '@0xsequence/sequence-primitives', + '@0xsequence/sequence-wdk', + '@0xsequence/api', + ], + }, +}) diff --git a/packages/services/api/src/api.gen.ts b/packages/services/api/src/api.gen.ts index 5366159cb..878a70e83 100644 --- a/packages/services/api/src/api.gen.ts +++ b/packages/services/api/src/api.gen.ts @@ -1,13 +1,13 @@ /* eslint-disable */ -// sequence-api v0.4.0 2409c101bc62a1b7aa797e099d913b1c4046e9f6 +// sequence-api v0.4.0 86a5e757200a00a61a1d87e490640503e6f7ad03 // -- -// Code generated by webrpc-gen@v0.24.0 with typescript generator. DO NOT EDIT. +// Code generated by webrpc-gen@v0.25.3 with typescript generator. DO NOT EDIT. // // webrpc-gen -schema=api.ridl -target=typescript -client -out=./clients/api.gen.ts export const WebrpcHeader = 'Webrpc' -export const WebrpcHeaderValue = 'webrpc@v0.24.0;gen-typescript@v0.16.3;sequence-api@v0.4.0' +export const WebrpcHeaderValue = 'webrpc@v0.25.3;gen-typescript@v0.17.0;sequence-api@v0.4.0' // WebRPC description and code-gen version export const WebRPCVersion = 'v1' @@ -16,7 +16,7 @@ export const WebRPCVersion = 'v1' export const WebRPCSchemaVersion = 'v0.4.0' // Schema hash generated from your RIDL schema -export const WebRPCSchemaHash = '2409c101bc62a1b7aa797e099d913b1c4046e9f6' +export const WebRPCSchemaHash = '86a5e757200a00a61a1d87e490640503e6f7ad03' type WebrpcGenVersions = { webrpcGenVersion: string @@ -174,6 +174,17 @@ export interface Friend { createdAt?: string } +export interface IntentConfig { + id: number + configHash: string + walletAddress: string + signerAddress: string + configData: any + operationsData: any + updatedAt?: string + createdAt?: string +} + export interface InviteCode { usesLeft: number ownerAccount: string @@ -206,6 +217,19 @@ export interface TupleComponent { value: any } +export interface IntentQuote { + intentAddress: string + originCall: OriginCall + preconditions: Array +} + +export interface OriginCall { + chainId: number + to: string + transactionData: string + transactionValue: string +} + export interface IntentPrecondition { type: string chainID: string @@ -703,11 +727,22 @@ export interface TransakChain { } export interface API { + /** + * + * Runtime + * + */ ping(headers?: object, signal?: AbortSignal): Promise version(headers?: object, signal?: AbortSignal): Promise runtimeStatus(headers?: object, signal?: AbortSignal): Promise clock(headers?: object, signal?: AbortSignal): Promise getSequenceContext(headers?: object, signal?: AbortSignal): Promise + /** + * + * Auth + * + * TODO: rename 'ewtString' arg to 'ethauthProof' + */ getAuthToken(args: GetAuthTokenArgs, headers?: object, signal?: AbortSignal): Promise getAuthToken2(args: GetAuthToken2Args, headers?: object, signal?: AbortSignal): Promise sendPasswordlessLink( @@ -721,6 +756,11 @@ export interface API { signal?: AbortSignal, ): Promise getPublicKey(args: GetPublicKeyArgs, headers?: object, signal?: AbortSignal): Promise + /** + * + * Contacts / Friends + * + */ friendList(args: FriendListArgs, headers?: object, signal?: AbortSignal): Promise getFriendByAddress( args: GetFriendByAddressArgs, @@ -735,6 +775,11 @@ export interface API { signal?: AbortSignal, ): Promise removeFriend(args: RemoveFriendArgs, headers?: object, signal?: AbortSignal): Promise + /** + * + * Chain-Utils + * + */ contractCall(args: ContractCallArgs, headers?: object, signal?: AbortSignal): Promise decodeContractCall( args: DecodeContractCallArgs, @@ -746,6 +791,11 @@ export interface API { headers?: object, signal?: AbortSignal, ): Promise + /** + * + * User Storage + * + */ userStorageFetch(args: UserStorageFetchArgs, headers?: object, signal?: AbortSignal): Promise userStorageSave(args: UserStorageSaveArgs, headers?: object, signal?: AbortSignal): Promise userStorageDelete( @@ -758,12 +808,24 @@ export interface API { headers?: object, signal?: AbortSignal, ): Promise + /** + * + * Wallet utils + * + */ getMoonpayLink(args: GetMoonpayLinkArgs, headers?: object, signal?: AbortSignal): Promise + /** + * - IsUsingGoogleMail(domain: string) => (yes: bool) + */ resolveENSAddress( args: ResolveENSAddressArgs, headers?: object, signal?: AbortSignal, ): Promise + /** + * TODO: we can add walletContext optional in the future when we need it + * NOTE: chainId can be either a number or canonical name + */ isValidSignature(args: IsValidSignatureArgs, headers?: object, signal?: AbortSignal): Promise isValidMessageSignature( args: IsValidMessageSignatureArgs, @@ -804,12 +866,21 @@ export interface API { ): Promise sardineGetEnabledTokens(headers?: object, signal?: AbortSignal): Promise sardineGetQuote(args: SardineGetQuoteArgs, headers?: object, signal?: AbortSignal): Promise + /** + * Deprecated. Use SardineGetClientToken() instead. + */ getSardineClientToken(headers?: object, signal?: AbortSignal): Promise + /** + * Deprecated. Use SardineGetNFTCheckoutToken() instead. + */ getSardineNFTCheckoutToken( args: GetSardineNFTCheckoutTokenArgs, headers?: object, signal?: AbortSignal, ): Promise + /** + * Deprecated. Use SardineGetNFTCheckoutOrderStatus() instead. + */ getSardineNFTCheckoutOrderStatus( args: GetSardineNFTCheckoutOrderStatusArgs, headers?: object, @@ -823,16 +894,39 @@ export interface API { headers?: object, signal?: AbortSignal, ): Promise + /** + * + * Price Feed + * + */ getCoinPrices(args: GetCoinPricesArgs, headers?: object, signal?: AbortSignal): Promise getCollectiblePrices( args: GetCollectiblePricesArgs, headers?: object, signal?: AbortSignal, ): Promise + /** + * + * Price Feed utils + * + */ getExchangeRate(args: GetExchangeRateArgs, headers?: object, signal?: AbortSignal): Promise + /** + * + * Util / misc + * + */ memoryStore(args: MemoryStoreArgs, headers?: object, signal?: AbortSignal): Promise memoryLoad(args: MemoryLoadArgs, headers?: object, signal?: AbortSignal): Promise + /** + * + * Legacy + * + */ getInviteInfo(headers?: object, signal?: AbortSignal): Promise + /** + * NOTE: we're still using this from SW-API to Sequence-API to claim invite code + */ isValidAccessCode( args: IsValidAccessCodeArgs, headers?: object, @@ -843,11 +937,20 @@ export interface API { headers?: object, signal?: AbortSignal, ): Promise + /** + * Utils + */ blockNumberAtTime( args: BlockNumberAtTimeArgs, headers?: object, signal?: AbortSignal, ): Promise + /** + * + * Paper + * TODO: deprecate in the future + * + */ paperSessionSecret( args: PaperSessionSecretArgs, headers?: object, @@ -858,6 +961,11 @@ export interface API { headers?: object, signal?: AbortSignal, ): Promise + /** + * + * Linked wallets (v0 -- simple support) + * + */ linkWallet(args: LinkWalletArgs, headers?: object, signal?: AbortSignal): Promise getLinkedWallets(args: GetLinkedWalletsArgs, headers?: object, signal?: AbortSignal): Promise removeLinkedWallet( @@ -865,6 +973,10 @@ export interface API { headers?: object, signal?: AbortSignal, ): Promise + /** + * NOTE: these methods are deprecated, please do not use them. We may resurface them in the future, but just wanted + * to be clear, they are not necessary for our linked wallets. + */ generateWaaSVerificationURL( args: GenerateWaaSVerificationURLArgs, headers?: object, @@ -875,11 +987,22 @@ export interface API { headers?: object, signal?: AbortSignal, ): Promise + /** + * + * + * WaaS child wallet adoption + * + */ listAdoptedWallets( args: ListAdoptedWalletsArgs, headers?: object, signal?: AbortSignal, ): Promise + /** + * + * Currency abstraction + * + */ getSwapPermit2Price( args: GetSwapPermit2PriceArgs, headers?: object, @@ -899,7 +1022,22 @@ export interface API { getSwapPrices(args: GetSwapPricesArgs, headers?: object, signal?: AbortSignal): Promise getSwapQuote(args: GetSwapQuoteArgs, headers?: object, signal?: AbortSignal): Promise getSwapQuoteV2(args: GetSwapQuoteV2Args, headers?: object, signal?: AbortSignal): Promise + /** + * + * Chain abstraction + * + */ + createIntentConfig( + args: CreateIntentConfigArgs, + headers?: object, + signal?: AbortSignal, + ): Promise intentQuery(args: IntentQueryArgs, headers?: object, signal?: AbortSignal): Promise + /** + * + * Inventory, payments and management + * + */ listCurrencyGroups(headers?: object, signal?: AbortSignal): Promise addOffchainInventory( args: AddOffchainInventoryArgs, @@ -936,6 +1074,11 @@ export interface API { headers?: object, signal?: AbortSignal, ): Promise + /** + * + * Packs + * + */ savePack(args: SavePackArgs, headers?: object, signal?: AbortSignal): Promise getPack(args: GetPackArgs, headers?: object, signal?: AbortSignal): Promise deletePack(args: DeletePackArgs, headers?: object, signal?: AbortSignal): Promise @@ -1502,6 +1645,21 @@ export interface GetSwapQuoteV2Args { export interface GetSwapQuoteV2Return { swapQuote: SwapQuote } +export interface CreateIntentConfigArgs { + userAddress: string + destinationChainId: number + destinationTokenAddress: string + destinationTokenAmount: string + destinationToAddress: string + originChainId: number + originTokenAddress: string + destinationCallData?: string + destinationCallValue?: string +} + +export interface CreateIntentConfigReturn { + quote: IntentQuote +} export interface IntentQueryArgs { wallet: string preconditions: Array @@ -2840,6 +2998,25 @@ export class API implements API { ) } + createIntentConfig = ( + args: CreateIntentConfigArgs, + headers?: object, + signal?: AbortSignal, + ): Promise => { + return this.fetch(this.url('CreateIntentConfig'), createHTTPRequest(args, headers, signal)).then( + (res) => { + return buildResponse(res).then((_data) => { + return { + quote: _data.quote, + } + }) + }, + (error) => { + throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) + }, + ) + } + intentQuery = (args: IntentQueryArgs, headers?: object, signal?: AbortSignal): Promise => { return this.fetch(this.url('IntentQuery'), createHTTPRequest(args, headers, signal)).then( (res) => { diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index dac9817b8..2853cf383 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -27,6 +27,136 @@ importers: specifier: 5.8.3 version: 5.8.3 + extras/demo-anypay: + dependencies: + '@0xsequence/api': + specifier: workspace:* + version: link:../../packages/services/api + '@0xsequence/design-system': + specifier: ^2.1.4 + version: 2.1.6(@types/react-dom@19.1.2(@types/react@19.1.2))(@types/react@19.1.2)(motion@12.7.2(react-dom@19.0.0(react@19.0.0))(react@19.0.0))(react-dom@19.0.0(react@19.0.0))(react@19.0.0) + '@0xsequence/hooks': + specifier: ^5.1.0 + version: 5.1.1(@0xsequence/api@packages+services+api)(@0xsequence/indexer@2.3.8)(@0xsequence/metadata@2.3.8)(@0xsequence/network@2.3.8(ethers@6.13.5(bufferutil@4.0.9)(utf-8-validate@5.0.10)))(@tanstack/react-query@5.74.3(react@19.0.0))(react-dom@19.0.0(react@19.0.0))(react@19.0.0)(viem@2.27.0(bufferutil@4.0.9)(typescript@5.7.3)(utf-8-validate@5.0.10)(zod@3.24.2)) + '@0xsequence/indexer': + specifier: ^2.3.4 + version: 2.3.8 + '@0xsequence/network': + specifier: ^2.3.4 + version: 2.3.8(ethers@6.13.5(bufferutil@4.0.9)(utf-8-validate@5.0.10)) + '@0xsequence/wagmi-connector': + specifier: ^4.0.1 + version: 4.0.1(0xsequence@2.3.8(ethers@6.13.5(bufferutil@4.0.9)(utf-8-validate@5.0.10)))(ethers@6.13.5(bufferutil@4.0.9)(utf-8-validate@5.0.10))(viem@2.27.0(bufferutil@4.0.9)(typescript@5.7.3)(utf-8-validate@5.0.10)(zod@3.24.2))(wagmi@2.14.16(@tanstack/query-core@5.74.3)(@tanstack/react-query@5.74.3(react@19.0.0))(@types/react@19.1.2)(bufferutil@4.0.9)(react@19.0.0)(typescript@5.7.3)(utf-8-validate@5.0.10)(viem@2.27.0(bufferutil@4.0.9)(typescript@5.7.3)(utf-8-validate@5.0.10)(zod@3.24.2))(zod@3.24.2)) + '@0xsequence/wallet-core': + specifier: workspace:* + version: link:../../packages/wallet/core + '@0xsequence/wallet-primitives': + specifier: workspace:* + version: link:../../packages/wallet/primitives + '@0xsequence/wallet-wdk': + specifier: workspace:* + version: link:../../packages/wallet/wdk + '@radix-ui/react-popover': + specifier: ^1.1.6 + version: 1.1.7(@types/react-dom@19.1.2(@types/react@19.1.2))(@types/react@19.1.2)(react-dom@19.0.0(react@19.0.0))(react@19.0.0) + '@repo/eslint-config': + specifier: workspace:* + version: link:../../repo/eslint-config + '@repo/typescript-config': + specifier: workspace:* + version: link:../../repo/typescript-config + '@tanstack/react-query': + specifier: ^5.69.0 + version: 5.74.3(react@19.0.0) + class-variance-authority: + specifier: ^0.7.1 + version: 0.7.1 + clsx: + specifier: ^2.1.1 + version: 2.1.1 + copy-to-clipboard: + specifier: ^3.3.3 + version: 3.3.3 + jotai: + specifier: ^2.12.2 + version: 2.12.3(@types/react@19.1.2)(react@19.0.0) + motion: + specifier: ^12.6.2 + version: 12.7.2(react-dom@19.0.0(react@19.0.0))(react@19.0.0) + ox: + specifier: ^0.6.10 + version: 0.6.12(typescript@5.7.3)(zod@3.24.2) + qrcode.react: + specifier: ^4.2.0 + version: 4.2.0(react@19.0.0) + react: + specifier: ^19.0.0 + version: 19.0.0 + react-dom: + specifier: ^19.0.0 + version: 19.0.0(react@19.0.0) + react-router: + specifier: ^7.4.0 + version: 7.5.0(react-dom@19.0.0(react@19.0.0))(react@19.0.0) + tailwindcss: + specifier: ^4.0.15 + version: 4.1.4 + viem: + specifier: ^2.24.1 + version: 2.27.0(bufferutil@4.0.9)(typescript@5.7.3)(utf-8-validate@5.0.10)(zod@3.24.2) + wagmi: + specifier: ^2.14.16 + version: 2.14.16(@tanstack/query-core@5.74.3)(@tanstack/react-query@5.74.3(react@19.0.0))(@types/react@19.1.2)(bufferutil@4.0.9)(react@19.0.0)(typescript@5.7.3)(utf-8-validate@5.0.10)(viem@2.27.0(bufferutil@4.0.9)(typescript@5.7.3)(utf-8-validate@5.0.10)(zod@3.24.2))(zod@3.24.2) + devDependencies: + '@eslint/js': + specifier: ^9.21.0 + version: 9.24.0 + '@tailwindcss/vite': + specifier: ^4.0.15 + version: 4.1.4(vite@6.2.6(@types/node@22.13.9)(jiti@2.4.2)(lightningcss@1.29.2)) + '@types/react': + specifier: ^19.0.10 + version: 19.1.2 + '@types/react-dom': + specifier: ^19.0.4 + version: 19.1.2(@types/react@19.1.2) + '@vitejs/plugin-react': + specifier: ^4.3.4 + version: 4.3.4(vite@6.2.6(@types/node@22.13.9)(jiti@2.4.2)(lightningcss@1.29.2)) + eslint: + specifier: ^9.21.0 + version: 9.24.0(jiti@2.4.2) + eslint-plugin-react-hooks: + specifier: ^5.1.0 + version: 5.2.0(eslint@9.24.0(jiti@2.4.2)) + eslint-plugin-react-refresh: + specifier: ^0.4.19 + version: 0.4.19(eslint@9.24.0(jiti@2.4.2)) + globals: + specifier: ^15.15.0 + version: 15.15.0 + husky: + specifier: ^9.1.7 + version: 9.1.7 + prettier: + specifier: ^3.5.3 + version: 3.5.3 + rimraf: + specifier: ^6.0.1 + version: 6.0.1 + typescript: + specifier: ~5.7.2 + version: 5.7.3 + typescript-eslint: + specifier: ^8.24.1 + version: 8.30.1(eslint@9.24.0(jiti@2.4.2))(typescript@5.7.3) + vite: + specifier: ^6.2.0 + version: 6.2.6(@types/node@22.13.9)(jiti@2.4.2)(lightningcss@1.29.2) + zod: + specifier: ^3.24.2 + version: 3.24.2 + extras/demo-wallet: dependencies: '@0xsequence/wallet-wdk': @@ -40,7 +170,7 @@ importers: version: 15.1.0(react-dom@19.0.0(react@19.0.0))(react@19.0.0) ox: specifier: ^0.6.7 - version: 0.6.7(typescript@5.5.4) + version: 0.6.7(typescript@5.5.4)(zod@3.24.2) react: specifier: ^19.0.0 version: 19.0.0 @@ -238,7 +368,7 @@ importers: version: link:../primitives ox: specifier: ^0.6.7 - version: 0.6.7(typescript@5.8.3) + version: 0.6.7(typescript@5.8.3)(zod@3.24.2) devDependencies: '@repo/typescript-config': specifier: workspace:^ @@ -266,7 +396,7 @@ importers: dependencies: ox: specifier: ^0.6.7 - version: 0.6.7(typescript@5.8.3) + version: 0.6.7(typescript@5.8.3)(zod@3.24.2) devDependencies: '@repo/typescript-config': specifier: workspace:^ @@ -282,7 +412,7 @@ importers: version: link:../primitives ox: specifier: ^0.6.7 - version: 0.6.7(typescript@5.8.3) + version: 0.6.7(typescript@5.8.3)(zod@3.24.2) yargs: specifier: ^17.7.2 version: 17.7.2 @@ -328,7 +458,7 @@ importers: version: 4.0.0 ox: specifier: ^0.6.7 - version: 0.6.7(typescript@5.8.3) + version: 0.6.7(typescript@5.8.3)(zod@3.24.2) uuid: specifier: ^11.1.0 version: 11.1.0 @@ -365,22 +495,22 @@ importers: version: 15.1.0 eslint: specifier: ^9.15.0 - version: 9.15.0 + version: 9.15.0(jiti@2.4.2) eslint-config-prettier: specifier: ^9.1.0 - version: 9.1.0(eslint@9.15.0) + version: 9.1.0(eslint@9.15.0(jiti@2.4.2)) eslint-plugin-only-warn: specifier: ^1.1.0 version: 1.1.0 eslint-plugin-react: specifier: ^7.37.2 - version: 7.37.2(eslint@9.15.0) + version: 7.37.2(eslint@9.15.0(jiti@2.4.2)) eslint-plugin-react-hooks: specifier: ^5.0.0 - version: 5.0.0(eslint@9.15.0) + version: 5.0.0(eslint@9.15.0(jiti@2.4.2)) eslint-plugin-turbo: specifier: ^2.3.0 - version: 2.3.1(eslint@9.15.0) + version: 2.3.1(eslint@9.15.0(jiti@2.4.2)) globals: specifier: ^15.12.0 version: 15.12.0 @@ -389,7 +519,7 @@ importers: version: 5.7.3 typescript-eslint: specifier: ^8.15.0 - version: 8.15.0(eslint@9.15.0)(typescript@5.7.3) + version: 8.15.0(eslint@9.15.0(jiti@2.4.2))(typescript@5.7.3) repo/typescript-config: {} @@ -426,6 +556,123 @@ importers: packages: + 0xsequence@2.3.8: + resolution: {integrity: sha512-7TgkvED+D6WUq2qWnO4oxKxQD0lAzBJs3m7E2Z23isMYVRyeDEDyOa/Igrfw6bfRCk5Mcrv3OG26BC6iHOsxlg==} + peerDependencies: + ethers: '>=6' + + '@0xsequence/abi@2.3.8': + resolution: {integrity: sha512-mk3uWMWJnJZIR79qKAW080JzUfdPfvADrodWhWC//BcAzNPbcG2XlgdRE34tkg858UycV88ToQQux7wQIqe19Q==} + + '@0xsequence/account@2.3.8': + resolution: {integrity: sha512-LCuX2wKHF8IlGSLz/TalPoagMOF9sxFDfmF8fNquBLTz6VPR2nSbjNasX/CtR4Q1Uw9eC7cLCUMrlim+Nh/ekA==} + peerDependencies: + ethers: '>=6' + + '@0xsequence/api@2.3.8': + resolution: {integrity: sha512-KbWoD+IxMAUPabpGlVzFfRXFeFHsvlNVBa5g7P904MLud0BR0TUYN+V14M6paGec2L3WkAEesPF4bqB4Yfygxg==} + + '@0xsequence/auth@2.3.8': + resolution: {integrity: sha512-SbSt9j8gTwOPMD428WwY5vggNOwTQfLQDC7DjnZJtsiQZfkwHxT+qXMNBqlEM3HMzL6vCHgMxX5w3KDvPcojKA==} + peerDependencies: + ethers: '>=6' + + '@0xsequence/core@2.3.8': + resolution: {integrity: sha512-SQ/LLUzm4+VzW2sd8EYhINV8Cq2vvnPvHNwCE0MAR2d1lJBAeSGFbxSL6GC5jZ0hTc60RSgM9JziGjZL9wltyA==} + peerDependencies: + ethers: '>=6' + + '@0xsequence/design-system@2.1.6': + resolution: {integrity: sha512-XRUAKrzKZBSEkWZFBm/OJq8qaMFtfCe6/n3nhnJSefGUWOuThYbM11muKlFzpT3gD/RJhBOMR1fCOVJXsnfvUA==} + peerDependencies: + motion: '>= 12' + react: '>= 17' + react-dom: '>= 17' + + '@0xsequence/ethauth@1.0.0': + resolution: {integrity: sha512-piihXzbS8Sq7P670a+GyTm3igTJL3Ts6pqjJcC0Sv86yqeK6QD0pzJP4APP+/IQa5k+0s2l1SeZwMjR7gSPtCA==} + peerDependencies: + ethers: '>=6' + + '@0xsequence/guard@2.3.8': + resolution: {integrity: sha512-NcCMQnXjIL6n2b+ULJBCbN0uivtcjHOJK07585hcgqVGPnT7sm4NavPHYVGDt//0nnhN7PJ+j6S6i/1MWGataw==} + peerDependencies: + ethers: '>=6' + + '@0xsequence/hooks@5.1.1': + resolution: {integrity: sha512-M+q6g18CSVk5GRHdQbc7PMP0n3uPz/NE06K6Ul2ZhFdGgbZNRaRRINKJFYmDjzUn+6jQ3IjZEK7nYsCiDtAf0Q==} + peerDependencies: + '@0xsequence/api': ^2.3.4 + '@0xsequence/indexer': '>=2.2.13' + '@0xsequence/metadata': '>=2.2.13' + '@0xsequence/network': '>=2.2.13' + '@tanstack/react-query': '>= 5' + react: '>= 17' + react-dom: '>= 17' + viem: '>= 2.0.0' + + '@0xsequence/indexer@2.3.8': + resolution: {integrity: sha512-UtmUwhquwRxWx3+JoR7Ai0luRLWvL/jMIDNuSkE6/A87UFLzJ09GQ1VkSLSkipkYv95q1xcbAUQxjZH58JPxfg==} + + '@0xsequence/metadata@2.3.8': + resolution: {integrity: sha512-ciWx8gHIZbMleFT2vQBHxe+id60wCG5RerPSiPuj4kJZdemrbbZ5+FcHDgyq+4bLkUUtbQ5ejZuArnFM43j0sw==} + + '@0xsequence/migration@2.3.8': + resolution: {integrity: sha512-xoIQb9PRUIJXjkJA+L9pCb99HZlhlWNQgGsJHJPezDkWuB5rtMp5OSmDq4kVM2nx4u7u0klGMeL5JneEfqcsKg==} + peerDependencies: + ethers: '>=6' + + '@0xsequence/network@2.3.8': + resolution: {integrity: sha512-BtI++rAJ1Vn78iRSmAJFcRnNqHmHprqwH1vBOD47xumlsvfHrMdAOTL2nxpw6zB85RNXHRFbzEICNHIB2e4j3g==} + peerDependencies: + ethers: '>=6' + + '@0xsequence/provider@2.3.8': + resolution: {integrity: sha512-Bej2QhHqj4Y8HBK1ZDuKhlH8bcGLeBLVIVk2TU5ElJRjge2ba2adwVaWYWMG1hFBbOGmV1wVQj9ivyA2bBp7QQ==} + peerDependencies: + ethers: '>=6' + + '@0xsequence/relayer@2.3.8': + resolution: {integrity: sha512-Vf5zDj2d/f7C1kyO5fSfUn6LvY+Pv1oi2YQpaZ4mBCfS0kViMteMtDvuAw5PB+mWE6qak/3x2VuvchRZRRtmfQ==} + peerDependencies: + ethers: '>=6' + + '@0xsequence/replacer@2.3.8': + resolution: {integrity: sha512-moHJMgBDPTe3SBtjKanvqOd2JXuId/8KwNM+xBtXjkulv7LDZPKwXHH/dssgKxT22agpPYzabLj7nHo329iIZg==} + peerDependencies: + ethers: '>=6' + + '@0xsequence/sessions@2.3.8': + resolution: {integrity: sha512-1AGXuFLLCXCH/5myQHdSt8NDg0BDndlV5VvL6cS1bYOW/tgBuLS2w8aKVVSKWkDra14mHRtI4ClsKS8+W/kDEg==} + peerDependencies: + ethers: '>=6' + + '@0xsequence/signhub@2.3.8': + resolution: {integrity: sha512-epRJP0vU2Qd1G5Q5gw0Xze9Kc9WerD1WvfHZwNSHCUDtYkbMaYYGdmnJukUDWFR9LXQ5WMQR1TkvThc1N/yFRw==} + peerDependencies: + ethers: '>=6' + + '@0xsequence/utils@2.3.8': + resolution: {integrity: sha512-iXAZju8GouEqFbKgG/TsPIdd/omu8xSUSuY5nQIcmgQcX9v2brRXmwXp2a2kVvHXSbcrKErhsSf5GMFYwNLrrQ==} + peerDependencies: + ethers: '>=6' + + '@0xsequence/wagmi-connector@4.0.1': + resolution: {integrity: sha512-SKAC5Z8/0BkLQ5M2PY2bxQEj0CQlMUsmfIEGIKjqIhvmsNR+xGSDKwLG6SJ79gShEuPRhBQpLCy9ZHfT8COqoQ==} + peerDependencies: + 0xsequence: '>= 2.0.0' + ethers: '>= 6.13.0' + viem: '>= 2.0.0' + wagmi: '>= 2.0.0' + + '@0xsequence/wallet@2.3.8': + resolution: {integrity: sha512-HH4KiO4VYGsmQDc/thtXLrIiYtjHGOKQ+ms/u5F/SZDa8hBw+VwYElli7FEgsbg+tpUYmMlaPeKZz67Buqe9zQ==} + peerDependencies: + ethers: '>=6' + + '@adraffy/ens-normalize@1.10.1': + resolution: {integrity: sha512-96Z2IP3mYmF1Xg2cDm8f1gWGf/HUVedQ3FMifV4kG/PQ4yEP51xDtRAEfhVNt5f/uzpNkZHwWQuUcu6D6K+Ekw==} + '@adraffy/ens-normalize@1.11.0': resolution: {integrity: sha512-/3DDPKHqqIqxUULp8yP4zODUY1i+2xvVWsv8A79xGWdCAG+8sb0hRh0Rk2QyOJUnnbyPUAZYcpBuRe3nS2OIUg==} @@ -579,6 +826,18 @@ packages: peerDependencies: '@babel/core': ^7.0.0-0 + '@babel/plugin-transform-react-jsx-self@7.25.9': + resolution: {integrity: sha512-y8quW6p0WHkEhmErnfe58r7x0A70uKphQm8Sp8cV7tjNQwK56sNVK0M73LK3WuYmsuyrftut4xAkjjgU0twaMg==} + engines: {node: '>=6.9.0'} + peerDependencies: + '@babel/core': ^7.0.0-0 + + '@babel/plugin-transform-react-jsx-source@7.25.9': + resolution: {integrity: sha512-+iqjT8xmXhhYv4/uiYd8FNQsraMFZIfxVSqxxVSZP0WbbSAWvBXAul0m/zu+7Vv4O/3WtApy9pmaTMiumEZgfg==} + engines: {node: '>=6.9.0'} + peerDependencies: + '@babel/core': ^7.0.0-0 + '@babel/runtime-corejs3@7.26.0': resolution: {integrity: sha512-YXHu5lN8kJCb1LOb9PgV6pvak43X2h4HvRApcN5SdWeaItQOzfn1hgP6jasD6KWQyJDBxrVmA9o9OivlnNJK/w==} engines: {node: '>=6.9.0'} @@ -657,10 +916,25 @@ packages: '@changesets/write@0.4.0': resolution: {integrity: sha512-CdTLvIOPiCNuH71pyDu3rA+Q0n65cmAbXnwWH84rKGiFumFzkmHNT8KHTMEchcxN+Kl8I54xGUhJ7l3E7X396Q==} + '@coinbase/wallet-sdk@3.9.3': + resolution: {integrity: sha512-N/A2DRIf0Y3PHc1XAMvbBUu4zisna6qAdqABMZwBMNEfWrXpAwx16pZGkYCLGE+Rvv1edbcB2LYDRnACNcmCiw==} + + '@coinbase/wallet-sdk@4.3.0': + resolution: {integrity: sha512-T3+SNmiCw4HzDm4we9wCHCxlP0pqCiwKe4sOwPH3YAK2KSKjxPRydKu6UQJrdONFVLG7ujXvbd/6ZqmvJb8rkw==} + '@cspotcode/source-map-support@0.8.1': resolution: {integrity: sha512-IchNf6dN4tHoMFIn/7OE8LWZ19Y6q/67Bmf6vnGREv8RSbBVb9LPJxEcnwrcwX6ixSvaiGoomAUvu4YSxXrVgw==} engines: {node: '>=12'} + '@databeat/tracker@0.9.3': + resolution: {integrity: sha512-eGsiNU/CRFujcNtUUqvBiqveCs6S6SiAhalXPDodbk74d3FzvLqHDn5k6WfOEJIhrP3CbYgfMXL0nk51s/rQsg==} + + '@ecies/ciphers@0.2.3': + resolution: {integrity: sha512-tapn6XhOueMwht3E2UzY0ZZjYokdaw9XtL9kEyjhQ/Fb9vL9xTFbOaI+fV0AWvTpYu4BNloC6getKW6NtSg4mA==} + engines: {bun: '>=1', deno: '>=2', node: '>=16'} + peerDependencies: + '@noble/ciphers': ^1.0.0 + '@emnapi/runtime@1.3.1': resolution: {integrity: sha512-kEBmG8KyqtxJZv+ygbEim+KCGtIq1fC22Ms3S4ziXmYKm8uyoLX0MHONVKwp+9opg390VaKRNt4a7A9NwmpNhw==} @@ -670,150 +944,300 @@ packages: cpu: [ppc64] os: [aix] + '@esbuild/aix-ppc64@0.25.2': + resolution: {integrity: sha512-wCIboOL2yXZym2cgm6mlA742s9QeJ8DjGVaL39dLN4rRwrOgOyYSnOaFPhKZGLb2ngj4EyfAFjsNJwPXZvseag==} + engines: {node: '>=18'} + cpu: [ppc64] + os: [aix] + '@esbuild/android-arm64@0.24.2': resolution: {integrity: sha512-cNLgeqCqV8WxfcTIOeL4OAtSmL8JjcN6m09XIgro1Wi7cF4t/THaWEa7eL5CMoMBdjoHOTh/vwTO/o2TRXIyzg==} engines: {node: '>=18'} cpu: [arm64] os: [android] + '@esbuild/android-arm64@0.25.2': + resolution: {integrity: sha512-5ZAX5xOmTligeBaeNEPnPaeEuah53Id2tX4c2CVP3JaROTH+j4fnfHCkr1PjXMd78hMst+TlkfKcW/DlTq0i4w==} + engines: {node: '>=18'} + cpu: [arm64] + os: [android] + '@esbuild/android-arm@0.24.2': resolution: {integrity: sha512-tmwl4hJkCfNHwFB3nBa8z1Uy3ypZpxqxfTQOcHX+xRByyYgunVbZ9MzUUfb0RxaHIMnbHagwAxuTL+tnNM+1/Q==} engines: {node: '>=18'} cpu: [arm] os: [android] + '@esbuild/android-arm@0.25.2': + resolution: {integrity: sha512-NQhH7jFstVY5x8CKbcfa166GoV0EFkaPkCKBQkdPJFvo5u+nGXLEH/ooniLb3QI8Fk58YAx7nsPLozUWfCBOJA==} + engines: {node: '>=18'} + cpu: [arm] + os: [android] + '@esbuild/android-x64@0.24.2': resolution: {integrity: sha512-B6Q0YQDqMx9D7rvIcsXfmJfvUYLoP722bgfBlO5cGvNVb5V/+Y7nhBE3mHV9OpxBf4eAS2S68KZztiPaWq4XYw==} engines: {node: '>=18'} cpu: [x64] os: [android] + '@esbuild/android-x64@0.25.2': + resolution: {integrity: sha512-Ffcx+nnma8Sge4jzddPHCZVRvIfQ0kMsUsCMcJRHkGJ1cDmhe4SsrYIjLUKn1xpHZybmOqCWwB0zQvsjdEHtkg==} + engines: {node: '>=18'} + cpu: [x64] + os: [android] + '@esbuild/darwin-arm64@0.24.2': resolution: {integrity: sha512-kj3AnYWc+CekmZnS5IPu9D+HWtUI49hbnyqk0FLEJDbzCIQt7hg7ucF1SQAilhtYpIujfaHr6O0UHlzzSPdOeA==} engines: {node: '>=18'} cpu: [arm64] os: [darwin] + '@esbuild/darwin-arm64@0.25.2': + resolution: {integrity: sha512-MpM6LUVTXAzOvN4KbjzU/q5smzryuoNjlriAIx+06RpecwCkL9JpenNzpKd2YMzLJFOdPqBpuub6eVRP5IgiSA==} + engines: {node: '>=18'} + cpu: [arm64] + os: [darwin] + '@esbuild/darwin-x64@0.24.2': resolution: {integrity: sha512-WeSrmwwHaPkNR5H3yYfowhZcbriGqooyu3zI/3GGpF8AyUdsrrP0X6KumITGA9WOyiJavnGZUwPGvxvwfWPHIA==} engines: {node: '>=18'} cpu: [x64] os: [darwin] + '@esbuild/darwin-x64@0.25.2': + resolution: {integrity: sha512-5eRPrTX7wFyuWe8FqEFPG2cU0+butQQVNcT4sVipqjLYQjjh8a8+vUTfgBKM88ObB85ahsnTwF7PSIt6PG+QkA==} + engines: {node: '>=18'} + cpu: [x64] + os: [darwin] + '@esbuild/freebsd-arm64@0.24.2': resolution: {integrity: sha512-UN8HXjtJ0k/Mj6a9+5u6+2eZ2ERD7Edt1Q9IZiB5UZAIdPnVKDoG7mdTVGhHJIeEml60JteamR3qhsr1r8gXvg==} engines: {node: '>=18'} cpu: [arm64] os: [freebsd] + '@esbuild/freebsd-arm64@0.25.2': + resolution: {integrity: sha512-mLwm4vXKiQ2UTSX4+ImyiPdiHjiZhIaE9QvC7sw0tZ6HoNMjYAqQpGyui5VRIi5sGd+uWq940gdCbY3VLvsO1w==} + engines: {node: '>=18'} + cpu: [arm64] + os: [freebsd] + '@esbuild/freebsd-x64@0.24.2': resolution: {integrity: sha512-TvW7wE/89PYW+IevEJXZ5sF6gJRDY/14hyIGFXdIucxCsbRmLUcjseQu1SyTko+2idmCw94TgyaEZi9HUSOe3Q==} engines: {node: '>=18'} cpu: [x64] os: [freebsd] + '@esbuild/freebsd-x64@0.25.2': + resolution: {integrity: sha512-6qyyn6TjayJSwGpm8J9QYYGQcRgc90nmfdUb0O7pp1s4lTY+9D0H9O02v5JqGApUyiHOtkz6+1hZNvNtEhbwRQ==} + engines: {node: '>=18'} + cpu: [x64] + os: [freebsd] + '@esbuild/linux-arm64@0.24.2': resolution: {integrity: sha512-7HnAD6074BW43YvvUmE/35Id9/NB7BeX5EoNkK9obndmZBUk8xmJJeU7DwmUeN7tkysslb2eSl6CTrYz6oEMQg==} engines: {node: '>=18'} cpu: [arm64] os: [linux] + '@esbuild/linux-arm64@0.25.2': + resolution: {integrity: sha512-gq/sjLsOyMT19I8obBISvhoYiZIAaGF8JpeXu1u8yPv8BE5HlWYobmlsfijFIZ9hIVGYkbdFhEqC0NvM4kNO0g==} + engines: {node: '>=18'} + cpu: [arm64] + os: [linux] + '@esbuild/linux-arm@0.24.2': resolution: {integrity: sha512-n0WRM/gWIdU29J57hJyUdIsk0WarGd6To0s+Y+LwvlC55wt+GT/OgkwoXCXvIue1i1sSNWblHEig00GBWiJgfA==} engines: {node: '>=18'} cpu: [arm] os: [linux] + '@esbuild/linux-arm@0.25.2': + resolution: {integrity: sha512-UHBRgJcmjJv5oeQF8EpTRZs/1knq6loLxTsjc3nxO9eXAPDLcWW55flrMVc97qFPbmZP31ta1AZVUKQzKTzb0g==} + engines: {node: '>=18'} + cpu: [arm] + os: [linux] + '@esbuild/linux-ia32@0.24.2': resolution: {integrity: sha512-sfv0tGPQhcZOgTKO3oBE9xpHuUqguHvSo4jl+wjnKwFpapx+vUDcawbwPNuBIAYdRAvIDBfZVvXprIj3HA+Ugw==} engines: {node: '>=18'} cpu: [ia32] os: [linux] + '@esbuild/linux-ia32@0.25.2': + resolution: {integrity: sha512-bBYCv9obgW2cBP+2ZWfjYTU+f5cxRoGGQ5SeDbYdFCAZpYWrfjjfYwvUpP8MlKbP0nwZ5gyOU/0aUzZ5HWPuvQ==} + engines: {node: '>=18'} + cpu: [ia32] + os: [linux] + '@esbuild/linux-loong64@0.24.2': resolution: {integrity: sha512-CN9AZr8kEndGooS35ntToZLTQLHEjtVB5n7dl8ZcTZMonJ7CCfStrYhrzF97eAecqVbVJ7APOEe18RPI4KLhwQ==} engines: {node: '>=18'} cpu: [loong64] os: [linux] + '@esbuild/linux-loong64@0.25.2': + resolution: {integrity: sha512-SHNGiKtvnU2dBlM5D8CXRFdd+6etgZ9dXfaPCeJtz+37PIUlixvlIhI23L5khKXs3DIzAn9V8v+qb1TRKrgT5w==} + engines: {node: '>=18'} + cpu: [loong64] + os: [linux] + '@esbuild/linux-mips64el@0.24.2': resolution: {integrity: sha512-iMkk7qr/wl3exJATwkISxI7kTcmHKE+BlymIAbHO8xanq/TjHaaVThFF6ipWzPHryoFsesNQJPE/3wFJw4+huw==} engines: {node: '>=18'} cpu: [mips64el] os: [linux] + '@esbuild/linux-mips64el@0.25.2': + resolution: {integrity: sha512-hDDRlzE6rPeoj+5fsADqdUZl1OzqDYow4TB4Y/3PlKBD0ph1e6uPHzIQcv2Z65u2K0kpeByIyAjCmjn1hJgG0Q==} + engines: {node: '>=18'} + cpu: [mips64el] + os: [linux] + '@esbuild/linux-ppc64@0.24.2': resolution: {integrity: sha512-shsVrgCZ57Vr2L8mm39kO5PPIb+843FStGt7sGGoqiiWYconSxwTiuswC1VJZLCjNiMLAMh34jg4VSEQb+iEbw==} engines: {node: '>=18'} cpu: [ppc64] os: [linux] + '@esbuild/linux-ppc64@0.25.2': + resolution: {integrity: sha512-tsHu2RRSWzipmUi9UBDEzc0nLc4HtpZEI5Ba+Omms5456x5WaNuiG3u7xh5AO6sipnJ9r4cRWQB2tUjPyIkc6g==} + engines: {node: '>=18'} + cpu: [ppc64] + os: [linux] + '@esbuild/linux-riscv64@0.24.2': resolution: {integrity: sha512-4eSFWnU9Hhd68fW16GD0TINewo1L6dRrB+oLNNbYyMUAeOD2yCK5KXGK1GH4qD/kT+bTEXjsyTCiJGHPZ3eM9Q==} engines: {node: '>=18'} cpu: [riscv64] os: [linux] + '@esbuild/linux-riscv64@0.25.2': + resolution: {integrity: sha512-k4LtpgV7NJQOml/10uPU0s4SAXGnowi5qBSjaLWMojNCUICNu7TshqHLAEbkBdAszL5TabfvQ48kK84hyFzjnw==} + engines: {node: '>=18'} + cpu: [riscv64] + os: [linux] + '@esbuild/linux-s390x@0.24.2': resolution: {integrity: sha512-S0Bh0A53b0YHL2XEXC20bHLuGMOhFDO6GN4b3YjRLK//Ep3ql3erpNcPlEFed93hsQAjAQDNsvcK+hV90FubSw==} engines: {node: '>=18'} cpu: [s390x] os: [linux] + '@esbuild/linux-s390x@0.25.2': + resolution: {integrity: sha512-GRa4IshOdvKY7M/rDpRR3gkiTNp34M0eLTaC1a08gNrh4u488aPhuZOCpkF6+2wl3zAN7L7XIpOFBhnaE3/Q8Q==} + engines: {node: '>=18'} + cpu: [s390x] + os: [linux] + '@esbuild/linux-x64@0.24.2': resolution: {integrity: sha512-8Qi4nQcCTbLnK9WoMjdC9NiTG6/E38RNICU6sUNqK0QFxCYgoARqVqxdFmWkdonVsvGqWhmm7MO0jyTqLqwj0Q==} engines: {node: '>=18'} cpu: [x64] os: [linux] + '@esbuild/linux-x64@0.25.2': + resolution: {integrity: sha512-QInHERlqpTTZ4FRB0fROQWXcYRD64lAoiegezDunLpalZMjcUcld3YzZmVJ2H/Cp0wJRZ8Xtjtj0cEHhYc/uUg==} + engines: {node: '>=18'} + cpu: [x64] + os: [linux] + '@esbuild/netbsd-arm64@0.24.2': resolution: {integrity: sha512-wuLK/VztRRpMt9zyHSazyCVdCXlpHkKm34WUyinD2lzK07FAHTq0KQvZZlXikNWkDGoT6x3TD51jKQ7gMVpopw==} engines: {node: '>=18'} cpu: [arm64] os: [netbsd] + '@esbuild/netbsd-arm64@0.25.2': + resolution: {integrity: sha512-talAIBoY5M8vHc6EeI2WW9d/CkiO9MQJ0IOWX8hrLhxGbro/vBXJvaQXefW2cP0z0nQVTdQ/eNyGFV1GSKrxfw==} + engines: {node: '>=18'} + cpu: [arm64] + os: [netbsd] + '@esbuild/netbsd-x64@0.24.2': resolution: {integrity: sha512-VefFaQUc4FMmJuAxmIHgUmfNiLXY438XrL4GDNV1Y1H/RW3qow68xTwjZKfj/+Plp9NANmzbH5R40Meudu8mmw==} engines: {node: '>=18'} cpu: [x64] os: [netbsd] + '@esbuild/netbsd-x64@0.25.2': + resolution: {integrity: sha512-voZT9Z+tpOxrvfKFyfDYPc4DO4rk06qamv1a/fkuzHpiVBMOhpjK+vBmWM8J1eiB3OLSMFYNaOaBNLXGChf5tg==} + engines: {node: '>=18'} + cpu: [x64] + os: [netbsd] + '@esbuild/openbsd-arm64@0.24.2': resolution: {integrity: sha512-YQbi46SBct6iKnszhSvdluqDmxCJA+Pu280Av9WICNwQmMxV7nLRHZfjQzwbPs3jeWnuAhE9Jy0NrnJ12Oz+0A==} engines: {node: '>=18'} cpu: [arm64] os: [openbsd] + '@esbuild/openbsd-arm64@0.25.2': + resolution: {integrity: sha512-dcXYOC6NXOqcykeDlwId9kB6OkPUxOEqU+rkrYVqJbK2hagWOMrsTGsMr8+rW02M+d5Op5NNlgMmjzecaRf7Tg==} + engines: {node: '>=18'} + cpu: [arm64] + os: [openbsd] + '@esbuild/openbsd-x64@0.24.2': resolution: {integrity: sha512-+iDS6zpNM6EnJyWv0bMGLWSWeXGN/HTaF/LXHXHwejGsVi+ooqDfMCCTerNFxEkM3wYVcExkeGXNqshc9iMaOA==} engines: {node: '>=18'} cpu: [x64] os: [openbsd] + '@esbuild/openbsd-x64@0.25.2': + resolution: {integrity: sha512-t/TkWwahkH0Tsgoq1Ju7QfgGhArkGLkF1uYz8nQS/PPFlXbP5YgRpqQR3ARRiC2iXoLTWFxc6DJMSK10dVXluw==} + engines: {node: '>=18'} + cpu: [x64] + os: [openbsd] + '@esbuild/sunos-x64@0.24.2': resolution: {integrity: sha512-hTdsW27jcktEvpwNHJU4ZwWFGkz2zRJUz8pvddmXPtXDzVKTTINmlmga3ZzwcuMpUvLw7JkLy9QLKyGpD2Yxig==} engines: {node: '>=18'} cpu: [x64] os: [sunos] + '@esbuild/sunos-x64@0.25.2': + resolution: {integrity: sha512-cfZH1co2+imVdWCjd+D1gf9NjkchVhhdpgb1q5y6Hcv9TP6Zi9ZG/beI3ig8TvwT9lH9dlxLq5MQBBgwuj4xvA==} + engines: {node: '>=18'} + cpu: [x64] + os: [sunos] + '@esbuild/win32-arm64@0.24.2': resolution: {integrity: sha512-LihEQ2BBKVFLOC9ZItT9iFprsE9tqjDjnbulhHoFxYQtQfai7qfluVODIYxt1PgdoyQkz23+01rzwNwYfutxUQ==} engines: {node: '>=18'} cpu: [arm64] os: [win32] + '@esbuild/win32-arm64@0.25.2': + resolution: {integrity: sha512-7Loyjh+D/Nx/sOTzV8vfbB3GJuHdOQyrOryFdZvPHLf42Tk9ivBU5Aedi7iyX+x6rbn2Mh68T4qq1SDqJBQO5Q==} + engines: {node: '>=18'} + cpu: [arm64] + os: [win32] + '@esbuild/win32-ia32@0.24.2': resolution: {integrity: sha512-q+iGUwfs8tncmFC9pcnD5IvRHAzmbwQ3GPS5/ceCyHdjXubwQWI12MKWSNSMYLJMq23/IUCvJMS76PDqXe1fxA==} engines: {node: '>=18'} cpu: [ia32] os: [win32] + '@esbuild/win32-ia32@0.25.2': + resolution: {integrity: sha512-WRJgsz9un0nqZJ4MfhabxaD9Ft8KioqU3JMinOTvobbX6MOSUigSBlogP8QB3uxpJDsFS6yN+3FDBdqE5lg9kg==} + engines: {node: '>=18'} + cpu: [ia32] + os: [win32] + '@esbuild/win32-x64@0.24.2': resolution: {integrity: sha512-7VTgWzgMGvup6aSqDPLiW5zHaxYJGTO4OokMjIlrCtf+VpEL+cXKtCvg723iguPYI5oaUNdS+/V7OU2gvXVWEg==} engines: {node: '>=18'} cpu: [x64] os: [win32] + '@esbuild/win32-x64@0.25.2': + resolution: {integrity: sha512-kM3HKb16VIXZyIeVrM1ygYmZBKybX8N4p754bw390wGO3Tf2j4L2/WYL+4suWujpgf6GBYs3jv7TyUivdd05JA==} + engines: {node: '>=18'} + cpu: [x64] + os: [win32] + '@eslint-community/eslint-utils@4.4.1': resolution: {integrity: sha512-s3O3waFUrMV8P/XaF/+ZTp1X9XBZW1a4B97ZnjQF2KYWaFD2A8KyFBsrsfSjEmjn3RGWAIuvlneuZm3CUK3jbA==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} @@ -828,6 +1252,22 @@ packages: resolution: {integrity: sha512-zdHg2FPIFNKPdcHWtiNT+jEFCHYVplAXRDlQDyqy0zGx/q2parwh7brGJSiTxRk/TSMkbM//zt/f5CHgyTyaSQ==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + '@eslint/config-array@0.20.0': + resolution: {integrity: sha512-fxlS1kkIjx8+vy2SjuCB94q3htSNrufYTXubwiBFeaQHbH6Ipi43gFJq2zCMt6PHhImH3Xmr0NksKDvchWlpQQ==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + + '@eslint/config-helpers@0.2.1': + resolution: {integrity: sha512-RI17tsD2frtDu/3dmI7QRrD4bedNKPM08ziRYaC5AhkGrzIAJelm9kJU1TznK+apx6V+cqRz8tfpEeG3oIyjxw==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + + '@eslint/core@0.12.0': + resolution: {integrity: sha512-cmrR6pytBuSMTaBweKoGMwu3EiHiEC+DoyupPmlZ0HxBJBtIxwe+j/E4XPIKNx+Q74c8lXKPwYawBf5glsTkHg==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + + '@eslint/core@0.13.0': + resolution: {integrity: sha512-yfkgDw1KR66rkT5A8ci4irzDysN7FRpq3ttJolR88OqQikAWqwA8j5VZyas+vjyBNFIJ7MfybJ9plMILI2UrCw==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + '@eslint/core@0.9.0': resolution: {integrity: sha512-7ATR9F0e4W85D/0w7cU0SNj7qkAexMG+bAHEZOjo9akvGuhHE2m7umzWzfnpa0XAg5Kxc1BWmtPMV67jJ+9VUg==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} @@ -836,6 +1276,10 @@ packages: resolution: {integrity: sha512-grOjVNN8P3hjJn/eIETF1wwd12DdnwFDoyceUJLYYdkpbwq3nLi+4fqrTAONx7XDALqlL220wC/RHSC/QTI/0w==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + '@eslint/eslintrc@3.3.1': + resolution: {integrity: sha512-gtF186CXhIl1p4pJNGZw8Yc6RlshoePRvE0X91oPGb3vZ8pM3qOS9W9NGPat9LziaBV7XrJWGylNQXkGcnM3IQ==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + '@eslint/js@9.15.0': resolution: {integrity: sha512-tMTqrY+EzbXmKJR5ToI8lxu7jaN5EdmrBFJpQk5JmSlyLsx6o4t27r883K5xsLuCYCpfKBCGswMSWXsM+jB7lg==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} @@ -844,14 +1288,57 @@ packages: resolution: {integrity: sha512-Sxc4hqcs1kTu0iID3kcZDW3JHq2a77HO9P8CP6YEA/FpH3Ll8UXE2r/86Rz9YJLKme39S9vU5OWNjC6Xl0Cr3w==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + '@eslint/js@9.24.0': + resolution: {integrity: sha512-uIY/y3z0uvOGX8cp1C2fiC4+ZmBhp6yZWkojtHL1YEMnRt1Y63HB9TM17proGEmeG7HeUY+UP36F0aknKYTpYA==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + '@eslint/object-schema@2.1.4': resolution: {integrity: sha512-BsWiH1yFGjXXS2yvrf5LyuoSIIbPrGUWob917o+BTKuZ7qJdxX8aJLRxs1fS9n6r7vESrq1OUqb68dANcFXuQQ==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + '@eslint/object-schema@2.1.6': + resolution: {integrity: sha512-RBMg5FRL0I0gs51M/guSAj5/e14VQ4tpZnQNWwuDT66P14I43ItmPfIZRhO9fUVIPOAQXU47atlywZ/czoqFPA==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + '@eslint/plugin-kit@0.2.3': resolution: {integrity: sha512-2b/g5hRmpbb1o4GnTZax9N9m0FXzz9OV42ZzI4rDDMDuHUqigAiQCEWChBWCY4ztAGVRjoWT19v0yMmc5/L5kA==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + '@eslint/plugin-kit@0.2.8': + resolution: {integrity: sha512-ZAoA40rNMPwSm+AeHpCq8STiNAwzWLJuP8Xv4CHIc9wv/PSuExjMrmjfYNj682vW0OOiZ1HKxzvjQr9XZIisQA==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + + '@ethereumjs/common@3.2.0': + resolution: {integrity: sha512-pksvzI0VyLgmuEF2FA/JR/4/y6hcPq8OUail3/AvycBaW1d5VSauOZzqGvJ3RTmR4MU35lWE8KseKOsEhrFRBA==} + + '@ethereumjs/rlp@4.0.1': + resolution: {integrity: sha512-tqsQiBQDQdmPWE1xkkBq4rlSW5QZpLOUJ5RJh2/9fug+q9tnUhuZoVLk7s0scUIKTOzEtR72DFBXI4WiZcMpvw==} + engines: {node: '>=14'} + hasBin: true + + '@ethereumjs/tx@4.2.0': + resolution: {integrity: sha512-1nc6VO4jtFd172BbSnTnDQVr9IYBFl1y4xPzZdtkrkKIncBCkdbgfdRV+MiTkJYAtTxvV12GRZLqBFT1PNK6Yw==} + engines: {node: '>=14'} + + '@ethereumjs/util@8.1.0': + resolution: {integrity: sha512-zQ0IqbdX8FZ9aw11vP+dZkKDkS+kgIvQPHnSAXzP9pLu+Rfu3D3XEeLbicvoXJTYnhZiPmsZUxgdzXwNKxRPbA==} + engines: {node: '>=14'} + + '@floating-ui/core@1.6.9': + resolution: {integrity: sha512-uMXCuQ3BItDUbAMhIXw7UPXRfAlOAvZzdK9BWpE60MCn+Svt3aLn9jsPTi/WNGlRUu2uI0v5S7JiIUsbsvh3fw==} + + '@floating-ui/dom@1.6.13': + resolution: {integrity: sha512-umqzocjDgNRGTuO7Q8CU32dkHkECqI8ZdMZ5Swb6QAM0t5rnlrN3lGo1hdpscRd3WS8T6DKYK4ephgIH9iRh3w==} + + '@floating-ui/react-dom@2.1.2': + resolution: {integrity: sha512-06okr5cgPzMNBy+Ycse2A6udMi4bqwW/zgBF/rwjcNqWkyr82Mcg8b0vjX8OJpZFy/FKjJmw6wV7t44kK6kW7A==} + peerDependencies: + react: '>=16.8.0' + react-dom: '>=16.8.0' + + '@floating-ui/utils@0.2.9': + resolution: {integrity: sha512-MDWhGtE+eHw5JW7lq4qhc5yRLS11ERl1c7Z6Xd0a58DozHES6EnNNwUWbMiG4J9Cgj053Bhk8zvlhFYKVhULwg==} + '@humanfs/core@0.19.1': resolution: {integrity: sha512-5DyQ4+1JEUzejeK1JGICcideyfUbGixgS9jNgex5nqkW+cY7WZhxBigmieN5Qnw9ZosSNVC9KQKyb+GUaGyKUA==} engines: {node: '>=18.18.0'} @@ -872,6 +1359,10 @@ packages: resolution: {integrity: sha512-c7hNEllBlenFTHBky65mhq8WD2kbN9Q6gk0bTk8lSBvc554jpXSkST1iePudpt7+A/AQvuHs9EMqjHDXMY1lrA==} engines: {node: '>=18.18'} + '@humanwhocodes/retry@0.4.2': + resolution: {integrity: sha512-xeO57FpIu4p1Ri3Jq/EXq4ClRm86dVF2z/+kvFnyqVYRavTZmaFaUBbWCOuuTh0o/g7DSsk6kc2vrS4Vl5oPOQ==} + engines: {node: '>=18.18'} + '@img/sharp-darwin-arm64@0.33.5': resolution: {integrity: sha512-UT4p+iz/2H4twwAoLCqfA9UH5pI6DggwKEGuaPy7nCVQ8ZsiY5PIcrRvD1DzuY3qYL07NtIQcWnBSY/heikIFQ==} engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0} @@ -977,6 +1468,10 @@ packages: cpu: [x64] os: [win32] + '@isaacs/cliui@8.0.2': + resolution: {integrity: sha512-O8jcjabXaleOG9DQ0+ARXWZBTfnP4WNAqzuiJK7ll44AmxGKv/J2M4TPjxjY3znBCfvBXFzucm1twdyFybFqEA==} + engines: {node: '>=12'} + '@istanbuljs/load-nyc-config@1.1.0': resolution: {integrity: sha512-VjeHSlIzpv/NyD3N0YuHfXOPDIixcA1q2ZV98wsMqcYlPmv2n3Yb2lYP9XMElnaFVXg5A7YLTeLu6V84uQDjmQ==} engines: {node: '>=8'} @@ -1072,3447 +1567,6675 @@ packages: '@jridgewell/trace-mapping@0.3.9': resolution: {integrity: sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ==} + '@lit-labs/ssr-dom-shim@1.3.0': + resolution: {integrity: sha512-nQIWonJ6eFAvUUrSlwyHDm/aE8PBDu5kRpL0vHMg6K8fK3Diq1xdPjTnsJSwxABhaZ+5eBi1btQB5ShUTKo4nQ==} + + '@lit/reactive-element@1.6.3': + resolution: {integrity: sha512-QuTgnG52Poic7uM1AN5yJ09QMe0O28e10XzSvWDz02TJiiKee4stsiownEIadWm8nYzyDAyT+gKzUoZmiWQtsQ==} + '@manypkg/find-root@1.1.0': resolution: {integrity: sha512-mki5uBvhHzO8kYYix/WRy2WX8S3B5wdVSc9D6KcU5lQNglP2yt58/VfLuAK49glRXChosY8ap2oJ1qgma3GUVA==} '@manypkg/get-packages@1.1.3': resolution: {integrity: sha512-fo+QhuU3qE/2TQMQmbVMqaQ6EWbMhi4ABWP+O4AM1NqPBuy0OrApV5LO6BrrgnhtAHS2NH6RrVk9OL181tTi8A==} - '@next/env@15.1.0': - resolution: {integrity: sha512-UcCO481cROsqJuszPPXJnb7GGuLq617ve4xuAyyNG4VSSocJNtMU5Fsx+Lp6mlN8c7W58aZLc5y6D/2xNmaK+w==} + '@metamask/eth-json-rpc-provider@1.0.1': + resolution: {integrity: sha512-whiUMPlAOrVGmX8aKYVPvlKyG4CpQXiNNyt74vE1xb5sPvmx5oA7B/kOi/JdBvhGQq97U1/AVdXEdk2zkP8qyA==} + engines: {node: '>=14.0.0'} - '@next/eslint-plugin-next@15.1.0': - resolution: {integrity: sha512-+jPT0h+nelBT6HC9ZCHGc7DgGVy04cv4shYdAe6tKlEbjQUtwU3LzQhzbDHQyY2m6g39m6B0kOFVuLGBrxxbGg==} + '@metamask/json-rpc-engine@7.3.3': + resolution: {integrity: sha512-dwZPq8wx9yV3IX2caLi9q9xZBw2XeIoYqdyihDDDpuHVCEiqadJLwqM3zy+uwf6F1QYQ65A8aOMQg1Uw7LMLNg==} + engines: {node: '>=16.0.0'} - '@next/swc-darwin-arm64@15.1.0': - resolution: {integrity: sha512-ZU8d7xxpX14uIaFC3nsr4L++5ZS/AkWDm1PzPO6gD9xWhFkOj2hzSbSIxoncsnlJXB1CbLOfGVN4Zk9tg83PUw==} - engines: {node: '>= 10'} - cpu: [arm64] - os: [darwin] + '@metamask/json-rpc-engine@8.0.2': + resolution: {integrity: sha512-IoQPmql8q7ABLruW7i4EYVHWUbF74yrp63bRuXV5Zf9BQwcn5H9Ww1eLtROYvI1bUXwOiHZ6qT5CWTrDc/t/AA==} + engines: {node: '>=16.0.0'} - '@next/swc-darwin-x64@15.1.0': - resolution: {integrity: sha512-DQ3RiUoW2XC9FcSM4ffpfndq1EsLV0fj0/UY33i7eklW5akPUCo6OX2qkcLXZ3jyPdo4sf2flwAED3AAq3Om2Q==} - engines: {node: '>= 10'} - cpu: [x64] - os: [darwin] + '@metamask/json-rpc-middleware-stream@7.0.2': + resolution: {integrity: sha512-yUdzsJK04Ev98Ck4D7lmRNQ8FPioXYhEUZOMS01LXW8qTvPGiRVXmVltj2p4wrLkh0vW7u6nv0mNl5xzC5Qmfg==} + engines: {node: '>=16.0.0'} - '@next/swc-linux-arm64-gnu@15.1.0': - resolution: {integrity: sha512-M+vhTovRS2F//LMx9KtxbkWk627l5Q7AqXWWWrfIzNIaUFiz2/NkOFkxCFyNyGACi5YbA8aekzCLtbDyfF/v5Q==} - engines: {node: '>= 10'} - cpu: [arm64] - os: [linux] + '@metamask/object-multiplex@2.1.0': + resolution: {integrity: sha512-4vKIiv0DQxljcXwfpnbsXcfa5glMj5Zg9mqn4xpIWqkv6uJ2ma5/GtUfLFSxhlxnR8asRMv8dDmWya1Tc1sDFA==} + engines: {node: ^16.20 || ^18.16 || >=20} - '@next/swc-linux-arm64-musl@15.1.0': - resolution: {integrity: sha512-Qn6vOuwaTCx3pNwygpSGtdIu0TfS1KiaYLYXLH5zq1scoTXdwYfdZtwvJTpB1WrLgiQE2Ne2kt8MZok3HlFqmg==} - engines: {node: '>= 10'} - cpu: [arm64] - os: [linux] + '@metamask/onboarding@1.0.1': + resolution: {integrity: sha512-FqHhAsCI+Vacx2qa5mAFcWNSrTcVGMNjzxVgaX8ECSny/BJ9/vgXP9V7WF/8vb9DltPeQkxr+Fnfmm6GHfmdTQ==} - '@next/swc-linux-x64-gnu@15.1.0': - resolution: {integrity: sha512-yeNh9ofMqzOZ5yTOk+2rwncBzucc6a1lyqtg8xZv0rH5znyjxHOWsoUtSq4cUTeeBIiXXX51QOOe+VoCjdXJRw==} - engines: {node: '>= 10'} - cpu: [x64] - os: [linux] + '@metamask/providers@16.1.0': + resolution: {integrity: sha512-znVCvux30+3SaUwcUGaSf+pUckzT5ukPRpcBmy+muBLC0yaWnBcvDqGfcsw6CBIenUdFrVoAFa8B6jsuCY/a+g==} + engines: {node: ^18.18 || >=20} - '@next/swc-linux-x64-musl@15.1.0': - resolution: {integrity: sha512-t9IfNkHQs/uKgPoyEtU912MG6a1j7Had37cSUyLTKx9MnUpjj+ZDKw9OyqTI9OwIIv0wmkr1pkZy+3T5pxhJPg==} - engines: {node: '>= 10'} - cpu: [x64] - os: [linux] - - '@next/swc-win32-arm64-msvc@15.1.0': - resolution: {integrity: sha512-WEAoHyG14t5sTavZa1c6BnOIEukll9iqFRTavqRVPfYmfegOAd5MaZfXgOGG6kGo1RduyGdTHD4+YZQSdsNZXg==} - engines: {node: '>= 10'} - cpu: [arm64] - os: [win32] - - '@next/swc-win32-x64-msvc@15.1.0': - resolution: {integrity: sha512-J1YdKuJv9xcixzXR24Dv+4SaDKc2jj31IVUEMdO5xJivMTXuE6MAdIi4qPjSymHuFG8O5wbfWKnhJUcHHpj5CA==} - engines: {node: '>= 10'} - cpu: [x64] - os: [win32] - - '@noble/curves@1.8.1': - resolution: {integrity: sha512-warwspo+UYUPep0Q+vtdVB4Ugn8GGQj8iyB3gnRWsztmUHTI3S1nhdiWNsPUGL0vud7JlRRk1XEu7Lq1KGTnMQ==} - engines: {node: ^14.21.3 || >=16} - - '@noble/hashes@1.7.1': - resolution: {integrity: sha512-B8XBPsn4vT/KJAGqDzbwztd+6Yte3P4V7iafm24bxgDe/mlRuK6xmWPuCNrKt2vDafZ8MfJLlchDG/vYafQEjQ==} - engines: {node: ^14.21.3 || >=16} - - '@nodelib/fs.scandir@2.1.5': - resolution: {integrity: sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==} - engines: {node: '>= 8'} - - '@nodelib/fs.stat@2.0.5': - resolution: {integrity: sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==} - engines: {node: '>= 8'} - - '@nodelib/fs.walk@1.2.8': - resolution: {integrity: sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==} - engines: {node: '>= 8'} + '@metamask/rpc-errors@6.4.0': + resolution: {integrity: sha512-1ugFO1UoirU2esS3juZanS/Fo8C8XYocCuBpfZI5N7ECtoG+zu0wF+uWZASik6CkO6w9n/Iebt4iI4pT0vptpg==} + engines: {node: '>=16.0.0'} - '@scure/base@1.2.4': - resolution: {integrity: sha512-5Yy9czTO47mqz+/J8GM6GIId4umdCk1wc1q8rKERQulIoc8VP9pzDcghv10Tl2E7R96ZUx/PhND3ESYUQX8NuQ==} + '@metamask/safe-event-emitter@2.0.0': + resolution: {integrity: sha512-/kSXhY692qiV1MXu6EeOZvg5nECLclxNXcKCxJ3cXQgYuRymRHpdx/t7JXfsK+JLjwA1e1c1/SBrlQYpusC29Q==} - '@scure/bip32@1.6.2': - resolution: {integrity: sha512-t96EPDMbtGgtb7onKKqxRLfE5g05k7uHnHRM2xdE6BP/ZmxaLtPek4J4KfVn/90IQNrU1IOAqMgiDtUdtbe3nw==} + '@metamask/safe-event-emitter@3.1.2': + resolution: {integrity: sha512-5yb2gMI1BDm0JybZezeoX/3XhPDOtTbcFvpTXM9kxsoZjPZFh4XciqRbpD6N86HYZqWDhEaKUDuOyR0sQHEjMA==} + engines: {node: '>=12.0.0'} - '@scure/bip39@1.5.4': - resolution: {integrity: sha512-TFM4ni0vKvCfBpohoh+/lY05i9gRbSwXWngAsF4CABQxoaOHijxuaZ2R6cStDQ5CHtHO9aGJTr4ksVJASRRyMA==} + '@metamask/sdk-communication-layer@0.32.0': + resolution: {integrity: sha512-dmj/KFjMi1fsdZGIOtbhxdg3amxhKL/A5BqSU4uh/SyDKPub/OT+x5pX8bGjpTL1WPWY/Q0OIlvFyX3VWnT06Q==} + peerDependencies: + cross-fetch: ^4.0.0 + eciesjs: '*' + eventemitter2: ^6.4.9 + readable-stream: ^3.6.2 + socket.io-client: ^4.5.1 - '@sinclair/typebox@0.27.8': - resolution: {integrity: sha512-+Fj43pSMwJs4KRrH/938Uf+uAELIgVBmQzg/q1YG10djyfA3TnrU8N8XzqCh/okZdszqBQTZf96idMfE5lnwTA==} + '@metamask/sdk-install-modal-web@0.32.0': + resolution: {integrity: sha512-TFoktj0JgfWnQaL3yFkApqNwcaqJ+dw4xcnrJueMP3aXkSNev2Ido+WVNOg4IIMxnmOrfAC9t0UJ0u/dC9MjOQ==} - '@sinonjs/commons@3.0.1': - resolution: {integrity: sha512-K3mCHKQ9sVh8o1C9cxkwxaOmXoAMlDxC1mYyHrjqOWEcBjYr76t96zL2zlj5dUGZ3HSw240X1qgH3Mjf1yJWpQ==} + '@metamask/sdk@0.32.0': + resolution: {integrity: sha512-WmGAlP1oBuD9hk4CsdlG1WJFuPtYJY+dnTHJMeCyohTWD2GgkcLMUUuvu9lO1/NVzuOoSi1OrnjbuY1O/1NZ1g==} - '@sinonjs/fake-timers@10.3.0': - resolution: {integrity: sha512-V4BG07kuYSUkTCSBHG8G8TNhM+F19jXFWnQtzj+we8DrkpSBCee9Z3Ms8yiGer/dlmhe35/Xdgyo3/0rQKg7YA==} + '@metamask/superstruct@3.2.1': + resolution: {integrity: sha512-fLgJnDOXFmuVlB38rUN5SmU7hAFQcCjrg3Vrxz67KTY7YHFnSNEKvX4avmEBdOI0yTCxZjwMCFEqsC8k2+Wd3g==} + engines: {node: '>=16.0.0'} - '@swc/counter@0.1.3': - resolution: {integrity: sha512-e2BR4lsJkkRlKZ/qCHPw9ZaSxc0MVUd7gtbtaB7aMvHeJVYe8sOB8DBZkP2DtISHGSku9sCK6T6cnY0CtXrOCQ==} + '@metamask/utils@5.0.2': + resolution: {integrity: sha512-yfmE79bRQtnMzarnKfX7AEJBwFTxvTyw3nBQlu/5rmGXrjAeAMltoGxO62TFurxrQAFMNa/fEjIHNvungZp0+g==} + engines: {node: '>=14.0.0'} - '@swc/helpers@0.5.15': - resolution: {integrity: sha512-JQ5TuMi45Owi4/BIMAJBoSQoOJu12oOk/gADqlcUL9JEdHB8vyjUSsxqeNXnmXHjYKMi2WcYtezGEEhqUI/E2g==} + '@metamask/utils@8.5.0': + resolution: {integrity: sha512-I6bkduevXb72TIM9q2LRO63JSsF9EXduh3sBr9oybNX2hNNpr/j1tEjXrsG0Uabm4MJ1xkGAQEMwifvKZIkyxQ==} + engines: {node: '>=16.0.0'} - '@tootallnate/quickjs-emscripten@0.23.0': - resolution: {integrity: sha512-C5Mc6rdnsaJDjO3UpGW/CQTHtCKaYlScZTly4JIu97Jxo/odCiH0ITnDXSJPTOrEKk/ycSZ0AOgTmkDtkOsvIA==} + '@metamask/utils@9.3.0': + resolution: {integrity: sha512-w8CVbdkDrVXFJbfBSlDfafDR6BAkpDmv1bC1UJVCoVny5tW2RKAdn9i68Xf7asYT4TnUhl/hN4zfUiKQq9II4g==} + engines: {node: '>=16.0.0'} - '@tsconfig/node10@1.0.11': - resolution: {integrity: sha512-DcRjDCujK/kCk/cUe8Xz8ZSpm8mS3mNNpta+jGCA6USEDfktlNvm1+IuZ9eTcDbNk41BHwpHHeW+N1lKCz4zOw==} + '@motionone/animation@10.18.0': + resolution: {integrity: sha512-9z2p5GFGCm0gBsZbi8rVMOAJCtw1WqBTIPw3ozk06gDvZInBPIsQcHgYogEJ4yuHJ+akuW8g1SEIOpTOvYs8hw==} - '@tsconfig/node12@1.0.11': - resolution: {integrity: sha512-cqefuRsh12pWyGsIoBKJA9luFu3mRxCA+ORZvA4ktLSzIuCUtWVxGIuXigEwO5/ywWFMZ2QEGKWvkZG1zDMTag==} + '@motionone/dom@10.18.0': + resolution: {integrity: sha512-bKLP7E0eyO4B2UaHBBN55tnppwRnaE3KFfh3Ps9HhnAkar3Cb69kUCJY9as8LrccVYKgHA+JY5dOQqJLOPhF5A==} - '@tsconfig/node14@1.0.3': - resolution: {integrity: sha512-ysT8mhdixWK6Hw3i1V2AeRqZ5WfXg1G43mqoYlM2nc6388Fq5jcXyr5mRsqViLx/GJYdoL0bfXD8nmF+Zn/Iow==} + '@motionone/easing@10.18.0': + resolution: {integrity: sha512-VcjByo7XpdLS4o9T8t99JtgxkdMcNWD3yHU/n6CLEz3bkmKDRZyYQ/wmSf6daum8ZXqfUAgFeCZSpJZIMxaCzg==} - '@tsconfig/node16@1.0.4': - resolution: {integrity: sha512-vxhUy4J8lyeyinH7Azl1pdd43GJhZH/tP2weN8TntQblOY+A0XbT8DJk1/oCPuOOyg/Ja757rG0CgHcWC8OfMA==} + '@motionone/generators@10.18.0': + resolution: {integrity: sha512-+qfkC2DtkDj4tHPu+AFKVfR/C30O1vYdvsGYaR13W/1cczPrrcjdvYCj0VLFuRMN+lP1xvpNZHCRNM4fBzn1jg==} - '@turbo/gen@1.13.4': - resolution: {integrity: sha512-PK38N1fHhDUyjLi0mUjv0RbX0xXGwDLQeRSGsIlLcVpP1B5fwodSIwIYXc9vJok26Yne94BX5AGjueYsUT3uUw==} - hasBin: true + '@motionone/svelte@10.16.4': + resolution: {integrity: sha512-zRVqk20lD1xqe+yEDZhMYgftsuHc25+9JSo+r0a0OWUJFocjSV9D/+UGhX4xgJsuwB9acPzXLr20w40VnY2PQA==} - '@turbo/workspaces@1.13.4': - resolution: {integrity: sha512-3uYg2b5TWCiupetbDFMbBFMHl33xQTvp5DNg0fZSYal73Z9AlFH9yWabHWMYw6ywmwM1evkYRpTVA2n7GgqT5A==} - hasBin: true + '@motionone/types@10.17.1': + resolution: {integrity: sha512-KaC4kgiODDz8hswCrS0btrVrzyU2CSQKO7Ps90ibBVSQmjkrt2teqta6/sOG59v7+dPnKMAg13jyqtMKV2yJ7A==} - '@types/babel__core@7.20.5': - resolution: {integrity: sha512-qoQprZvz5wQFJwMDqeseRXWv3rqMvhgpbXFfVyWhbx9X47POIA6i/+dXefEmZKoAgOaTdaIgNSMqMIU61yRyzA==} + '@motionone/utils@10.18.0': + resolution: {integrity: sha512-3XVF7sgyTSI2KWvTf6uLlBJ5iAgRgmvp3bpuOiQJvInd4nZ19ET8lX5unn30SlmRH7hXbBbH+Gxd0m0klJ3Xtw==} - '@types/babel__generator@7.6.8': - resolution: {integrity: sha512-ASsj+tpEDsEiFr1arWrlN6V3mdfjRMZt6LtK/Vp/kreFLnr5QH5+DhvD5nINYZXzwJvXeGq+05iUXcAzVrqWtw==} + '@motionone/vue@10.16.4': + resolution: {integrity: sha512-z10PF9JV6SbjFq+/rYabM+8CVlMokgl8RFGvieSGNTmrkQanfHn+15XBrhG3BgUfvmTeSeyShfOHpG0i9zEdcg==} + deprecated: Motion One for Vue is deprecated. Use Oku Motion instead https://oku-ui.com/motion - '@types/babel__template@7.4.4': - resolution: {integrity: sha512-h/NUaSyG5EyxBIp8YRxo4RMe2/qQgvyowRwVMzhYhBCONbW8PUsg4lkFMrhgZhUe5z3L3MiLDuvyJ/CaPa2A8A==} + '@next/env@15.1.0': + resolution: {integrity: sha512-UcCO481cROsqJuszPPXJnb7GGuLq617ve4xuAyyNG4VSSocJNtMU5Fsx+Lp6mlN8c7W58aZLc5y6D/2xNmaK+w==} - '@types/babel__traverse@7.20.6': - resolution: {integrity: sha512-r1bzfrm0tomOI8g1SzvCaQHo6Lcv6zu0EA+W2kHrt8dyrHQxGzBBL4kdkzIS+jBMV+EYcMAEAqXqYaLJq5rOZg==} + '@next/eslint-plugin-next@15.1.0': + resolution: {integrity: sha512-+jPT0h+nelBT6HC9ZCHGc7DgGVy04cv4shYdAe6tKlEbjQUtwU3LzQhzbDHQyY2m6g39m6B0kOFVuLGBrxxbGg==} - '@types/estree@1.0.6': - resolution: {integrity: sha512-AYnb1nQyY49te+VRAVgmzfcgjYS91mY5P0TKUDCLEM+gNnA+3T6rWITXRLYCpahpqSQbN5cE+gHpnPyXjHWxcw==} + '@next/swc-darwin-arm64@15.1.0': + resolution: {integrity: sha512-ZU8d7xxpX14uIaFC3nsr4L++5ZS/AkWDm1PzPO6gD9xWhFkOj2hzSbSIxoncsnlJXB1CbLOfGVN4Zk9tg83PUw==} + engines: {node: '>= 10'} + cpu: [arm64] + os: [darwin] - '@types/glob@7.2.0': - resolution: {integrity: sha512-ZUxbzKl0IfJILTS6t7ip5fQQM/J3TJYubDm3nMbgubNNYS62eXeUpoLUC8/7fJNiFYHTrGPQn7hspDUzIHX3UA==} + '@next/swc-darwin-x64@15.1.0': + resolution: {integrity: sha512-DQ3RiUoW2XC9FcSM4ffpfndq1EsLV0fj0/UY33i7eklW5akPUCo6OX2qkcLXZ3jyPdo4sf2flwAED3AAq3Om2Q==} + engines: {node: '>= 10'} + cpu: [x64] + os: [darwin] - '@types/graceful-fs@4.1.9': - resolution: {integrity: sha512-olP3sd1qOEe5dXTSaFvQG+02VdRXcdytWLAZsAq1PecU8uqQAhkrnbli7DagjtXKW/Bl7YJbUsa8MPcuc8LHEQ==} + '@next/swc-linux-arm64-gnu@15.1.0': + resolution: {integrity: sha512-M+vhTovRS2F//LMx9KtxbkWk627l5Q7AqXWWWrfIzNIaUFiz2/NkOFkxCFyNyGACi5YbA8aekzCLtbDyfF/v5Q==} + engines: {node: '>= 10'} + cpu: [arm64] + os: [linux] - '@types/inquirer@6.5.0': - resolution: {integrity: sha512-rjaYQ9b9y/VFGOpqBEXRavc3jh0a+e6evAbI31tMda8VlPaSy0AZJfXsvmIe3wklc7W6C3zCSfleuMXR7NOyXw==} + '@next/swc-linux-arm64-musl@15.1.0': + resolution: {integrity: sha512-Qn6vOuwaTCx3pNwygpSGtdIu0TfS1KiaYLYXLH5zq1scoTXdwYfdZtwvJTpB1WrLgiQE2Ne2kt8MZok3HlFqmg==} + engines: {node: '>= 10'} + cpu: [arm64] + os: [linux] - '@types/istanbul-lib-coverage@2.0.6': - resolution: {integrity: sha512-2QF/t/auWm0lsy8XtKVPG19v3sSOQlJe/YHZgfjb/KBBHOGSV+J2q/S671rcq9uTBrLAXmZpqJiaQbMT+zNU1w==} + '@next/swc-linux-x64-gnu@15.1.0': + resolution: {integrity: sha512-yeNh9ofMqzOZ5yTOk+2rwncBzucc6a1lyqtg8xZv0rH5znyjxHOWsoUtSq4cUTeeBIiXXX51QOOe+VoCjdXJRw==} + engines: {node: '>= 10'} + cpu: [x64] + os: [linux] - '@types/istanbul-lib-report@3.0.3': - resolution: {integrity: sha512-NQn7AHQnk/RSLOxrBbGyJM/aVQ+pjj5HCgasFxc0K/KhoATfQ/47AyUl15I2yBUpihjmas+a+VJBOqecrFH+uA==} + '@next/swc-linux-x64-musl@15.1.0': + resolution: {integrity: sha512-t9IfNkHQs/uKgPoyEtU912MG6a1j7Had37cSUyLTKx9MnUpjj+ZDKw9OyqTI9OwIIv0wmkr1pkZy+3T5pxhJPg==} + engines: {node: '>= 10'} + cpu: [x64] + os: [linux] - '@types/istanbul-reports@3.0.4': - resolution: {integrity: sha512-pk2B1NWalF9toCRu6gjBzR69syFjP4Od8WRAX+0mmf9lAjCRicLOWc+ZrxZHx/0XRjotgkF9t6iaMJ+aXcOdZQ==} + '@next/swc-win32-arm64-msvc@15.1.0': + resolution: {integrity: sha512-WEAoHyG14t5sTavZa1c6BnOIEukll9iqFRTavqRVPfYmfegOAd5MaZfXgOGG6kGo1RduyGdTHD4+YZQSdsNZXg==} + engines: {node: '>= 10'} + cpu: [arm64] + os: [win32] - '@types/jest@29.5.14': - resolution: {integrity: sha512-ZN+4sdnLUbo8EVvVc2ao0GFW6oVrQRPn4K2lglySj7APvSrgzxHiNNK99us4WDMi57xxA2yggblIAMNhXOotLQ==} + '@next/swc-win32-x64-msvc@15.1.0': + resolution: {integrity: sha512-J1YdKuJv9xcixzXR24Dv+4SaDKc2jj31IVUEMdO5xJivMTXuE6MAdIi4qPjSymHuFG8O5wbfWKnhJUcHHpj5CA==} + engines: {node: '>= 10'} + cpu: [x64] + os: [win32] - '@types/json-schema@7.0.15': - resolution: {integrity: sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==} + '@noble/ciphers@1.2.1': + resolution: {integrity: sha512-rONPWMC7PeExE077uLE4oqWrZ1IvAfz3oH9LibVAcVCopJiA9R62uavnbEzdkVmJYI6M6Zgkbeb07+tWjlq2XA==} + engines: {node: ^14.21.3 || >=16} - '@types/minimatch@5.1.2': - resolution: {integrity: sha512-K0VQKziLUWkVKiRVrx4a40iPaxTUefQmjtkQofBkYRcoaaL/8rhwDWww9qWbrgicNOgnpIsMxyNIUM4+n6dUIA==} + '@noble/curves@1.2.0': + resolution: {integrity: sha512-oYclrNgRaM9SsBUBVbb8M6DTV7ZHRTKugureoYEncY5c65HOmRzvSiTE3y5CYaPYJA/GVkrhXEoF0M3Ya9PMnw==} - '@types/node@12.20.55': - resolution: {integrity: sha512-J8xLz7q2OFulZ2cyGTLE1TbbZcjpno7FaN6zdJNrgAdrJ+DZzh/uFR6YrTb4C+nXakvud8Q4+rbhoIWlYQbUFQ==} + '@noble/curves@1.4.2': + resolution: {integrity: sha512-TavHr8qycMChk8UwMld0ZDRvatedkzWfH8IiaeGCfymOP5i0hSCozz9vHOL0nkwk7HRMlFnAiKpS2jrUmSybcw==} - '@types/node@20.17.6': - resolution: {integrity: sha512-VEI7OdvK2wP7XHnsuXbAJnEpEkF6NjSN45QJlL4VGqZSXsnicpesdTWsg9RISeSdYd3yeRj/y3k5KGjUXYnFwQ==} + '@noble/curves@1.8.0': + resolution: {integrity: sha512-j84kjAbzEnQHaSIhRPUmB3/eVXu2k3dKPl2LOrR8fSOIL+89U+7lV117EWHtq/GHM3ReGHM46iRBdZfpc4HRUQ==} + engines: {node: ^14.21.3 || >=16} - '@types/node@22.13.9': - resolution: {integrity: sha512-acBjXdRJ3A6Pb3tqnw9HZmyR3Fiol3aGxRCK1x3d+6CDAMjl7I649wpSd+yNURCjbOUGu9tqtLKnTGxmK6CyGw==} + '@noble/curves@1.8.1': + resolution: {integrity: sha512-warwspo+UYUPep0Q+vtdVB4Ugn8GGQj8iyB3gnRWsztmUHTI3S1nhdiWNsPUGL0vud7JlRRk1XEu7Lq1KGTnMQ==} + engines: {node: ^14.21.3 || >=16} - '@types/prop-types@15.7.13': - resolution: {integrity: sha512-hCZTSvwbzWGvhqxp/RqVqwU999pBf2vp7hzIjiYOsl8wqOmUxkQ6ddw1cV3l8811+kdUFus/q4d1Y3E3SyEifA==} + '@noble/hashes@1.3.2': + resolution: {integrity: sha512-MVC8EAQp7MvEcm30KWENFjgR+Mkmf+D189XJTkFIlwohU5hcBbn1ZkKq7KVTi2Hme3PMGF390DaL52beVrIihQ==} + engines: {node: '>= 16'} - '@types/react-dom@18.3.0': - resolution: {integrity: sha512-EhwApuTmMBmXuFOikhQLIBUn6uFg81SwLMOAUgodJF14SOBOCMdU04gDoYi0WOJJHD144TL32z4yDqCW3dnkQg==} + '@noble/hashes@1.4.0': + resolution: {integrity: sha512-V1JJ1WTRUqHHrOSh597hURcMqVKVGL/ea3kv0gSnEdsEZ0/+VyPghM1lMNGc00z7CIQorSvbKpuJkxvuHbvdbg==} + engines: {node: '>= 16'} - '@types/react-dom@18.3.1': - resolution: {integrity: sha512-qW1Mfv8taImTthu4KoXgDfLuk4bydU6Q/TkADnDWWHwi4NX4BR+LWfTp2sVmTqRrsHvyDDTelgelxJ+SsejKKQ==} + '@noble/hashes@1.7.0': + resolution: {integrity: sha512-HXydb0DgzTpDPwbVeDGCG1gIu7X6+AuU6Zl6av/E/KG8LMsvPntvq+w17CHRpKBmN6Ybdrt1eP3k4cj8DJa78w==} + engines: {node: ^14.21.3 || >=16} - '@types/react@18.3.0': - resolution: {integrity: sha512-DiUcKjzE6soLyln8NNZmyhcQjVv+WsUIFSqetMN0p8927OztKT4VTfFTqsbAi5oAGIcgOmOajlfBqyptDDjZRw==} + '@noble/hashes@1.7.1': + resolution: {integrity: sha512-B8XBPsn4vT/KJAGqDzbwztd+6Yte3P4V7iafm24bxgDe/mlRuK6xmWPuCNrKt2vDafZ8MfJLlchDG/vYafQEjQ==} + engines: {node: ^14.21.3 || >=16} - '@types/react@18.3.1': - resolution: {integrity: sha512-V0kuGBX3+prX+DQ/7r2qsv1NsdfnCLnTgnRJ1pYnxykBhGMz+qj+box5lq7XsO5mtZsBqpjwwTu/7wszPfMBcw==} + '@nodelib/fs.scandir@2.1.5': + resolution: {integrity: sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==} + engines: {node: '>= 8'} - '@types/stack-utils@2.0.3': - resolution: {integrity: sha512-9aEbYZ3TbYMznPdcdr3SmIrLXwC/AKZXQeCf9Pgao5CKb8CyHuEX5jzWPTkvregvhRJHcpRO6BFoGW9ycaOkYw==} + '@nodelib/fs.stat@2.0.5': + resolution: {integrity: sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==} + engines: {node: '>= 8'} - '@types/through@0.0.33': - resolution: {integrity: sha512-HsJ+z3QuETzP3cswwtzt2vEIiHBk/dCcHGhbmG5X3ecnwFD/lPrMpliGXxSCg03L9AhrdwA4Oz/qfspkDW+xGQ==} + '@nodelib/fs.walk@1.2.8': + resolution: {integrity: sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==} + engines: {node: '>= 8'} - '@types/tinycolor2@1.4.6': - resolution: {integrity: sha512-iEN8J0BoMnsWBqjVbWH/c0G0Hh7O21lpR2/+PrvAVgWdzL7eexIFm4JN/Wn10PTcmNdtS6U67r499mlWMXOxNw==} + '@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' - '@types/yargs-parser@21.0.3': - resolution: {integrity: sha512-I4q9QU9MQv4oEOz4tAHJtNz1cwuLxn2F3xcc2iV5WdqLPpUnj30aUuxt1mAxYTG+oe8CZMV/+6rU4S4gRDzqtQ==} + '@radix-ui/number@1.1.1': + resolution: {integrity: sha512-MkKCwxlXTgz6CFoJx3pCwn07GKp36+aZyu/u2Ln2VrA5DcdyCZkASEDBTd8x5whTQQL5CiYf4prXKLcgQdv29g==} - '@types/yargs@17.0.33': - resolution: {integrity: sha512-WpxBCKWPLr4xSsHgz511rFJAM+wS28w2zEO1QDNY5zM/S8ok70NNfztH0xwhqKyaK0OHCbN98LDAZuy1ctxDkA==} + '@radix-ui/primitive@1.1.2': + resolution: {integrity: sha512-XnbHrrprsNqZKQhStrSwgRUQzoCI1glLzdw79xiZPoofhGICeZRSQ3dIxAKH1gb3OHfNf4d6f+vAv3kil2eggA==} - '@typescript-eslint/eslint-plugin@8.15.0': - resolution: {integrity: sha512-+zkm9AR1Ds9uLWN3fkoeXgFppaQ+uEVtfOV62dDmsy9QCNqlRHWNEck4yarvRNrvRcHQLGfqBNui3cimoz8XAg==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + '@radix-ui/react-arrow@1.1.3': + resolution: {integrity: sha512-2dvVU4jva0qkNZH6HHWuSz5FN5GeU5tymvCgutF8WaXz9WnD1NgUhy73cqzkjkN4Zkn8lfTPv5JIfrC221W+Nw==} peerDependencies: - '@typescript-eslint/parser': ^8.0.0 || ^8.0.0-alpha.0 - eslint: ^8.57.0 || ^9.0.0 - typescript: '*' + '@types/react': '*' + '@types/react-dom': '*' + react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc + react-dom: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc peerDependenciesMeta: - typescript: + '@types/react': + optional: true + '@types/react-dom': optional: true - '@typescript-eslint/parser@8.15.0': - resolution: {integrity: sha512-7n59qFpghG4uazrF9qtGKBZXn7Oz4sOMm8dwNWDQY96Xlm2oX67eipqcblDj+oY1lLCbf1oltMZFpUso66Kl1A==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + '@radix-ui/react-aspect-ratio@1.1.3': + resolution: {integrity: sha512-yIrYZUc2e/JtRkDpuJCmaR6kj/jzekDfQLcPFdEWzSOygCPy8poR4YcszaHP5A7mh25ncofHEpeTwfhxEuBv8Q==} peerDependencies: - eslint: ^8.57.0 || ^9.0.0 - typescript: '*' + '@types/react': '*' + '@types/react-dom': '*' + react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc + react-dom: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc peerDependenciesMeta: - typescript: + '@types/react': + optional: true + '@types/react-dom': optional: true - '@typescript-eslint/scope-manager@8.15.0': - resolution: {integrity: sha512-QRGy8ADi4J7ii95xz4UoiymmmMd/zuy9azCaamnZ3FM8T5fZcex8UfJcjkiEZjJSztKfEBe3dZ5T/5RHAmw2mA==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - - '@typescript-eslint/type-utils@8.15.0': - resolution: {integrity: sha512-UU6uwXDoI3JGSXmcdnP5d8Fffa2KayOhUUqr/AiBnG1Gl7+7ut/oyagVeSkh7bxQ0zSXV9ptRh/4N15nkCqnpw==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + '@radix-ui/react-checkbox@1.1.5': + resolution: {integrity: sha512-B0gYIVxl77KYDR25AY9EGe/G//ef85RVBIxQvK+m5pxAC7XihAc/8leMHhDvjvhDu02SBSb6BuytlWr/G7F3+g==} peerDependencies: - eslint: ^8.57.0 || ^9.0.0 - typescript: '*' + '@types/react': '*' + '@types/react-dom': '*' + react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc + react-dom: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc peerDependenciesMeta: - typescript: + '@types/react': + optional: true + '@types/react-dom': optional: true - '@typescript-eslint/types@8.15.0': - resolution: {integrity: sha512-n3Gt8Y/KyJNe0S3yDCD2RVKrHBC4gTUcLTebVBXacPy091E6tNspFLKRXlk3hwT4G55nfr1n2AdFqi/XMxzmPQ==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - - '@typescript-eslint/typescript-estree@8.15.0': - resolution: {integrity: sha512-1eMp2JgNec/niZsR7ioFBlsh/Fk0oJbhaqO0jRyQBMgkz7RrFfkqF9lYYmBoGBaSiLnu8TAPQTwoTUiSTUW9dg==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + '@radix-ui/react-collapsible@1.1.4': + resolution: {integrity: sha512-u7LCw1EYInQtBNLGjm9nZ89S/4GcvX1UR5XbekEgnQae2Hkpq39ycJ1OhdeN1/JDfVNG91kWaWoest127TaEKQ==} peerDependencies: - typescript: '*' + '@types/react': '*' + '@types/react-dom': '*' + react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc + react-dom: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc peerDependenciesMeta: - typescript: + '@types/react': + optional: true + '@types/react-dom': optional: true - '@typescript-eslint/utils@8.15.0': - resolution: {integrity: sha512-k82RI9yGhr0QM3Dnq+egEpz9qB6Un+WLYhmoNcvl8ltMEededhh7otBVVIDDsEEttauwdY/hQoSsOv13lxrFzQ==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + '@radix-ui/react-collection@1.1.3': + resolution: {integrity: sha512-mM2pxoQw5HJ49rkzwOs7Y6J4oYH22wS8BfK2/bBxROlI4xuR0c4jEenQP63LlTlDkO6Buj2Vt+QYAYcOgqtrXA==} peerDependencies: - eslint: ^8.57.0 || ^9.0.0 - typescript: '*' + '@types/react': '*' + '@types/react-dom': '*' + react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc + react-dom: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc peerDependenciesMeta: - typescript: + '@types/react': + optional: true + '@types/react-dom': optional: true - '@typescript-eslint/visitor-keys@8.15.0': - resolution: {integrity: sha512-h8vYOulWec9LhpwfAdZf2bjr8xIp0KNKnpgqSz0qqYYKAW/QZKw3ktRndbiAtUz4acH4QLQavwZBYCc0wulA/Q==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - - abitype@1.0.8: - resolution: {integrity: sha512-ZeiI6h3GnW06uYDLx0etQtX/p8E24UaHHBj57RSjK7YBFe7iuVn07EDpOeP451D06sF27VOz9JJPlIKJmXgkEg==} + '@radix-ui/react-compose-refs@1.1.2': + resolution: {integrity: sha512-z4eqJvfiNnFMHIIvXP3CY57y2WJs5g2v3X0zm9mEJkrkNv4rDxu+sg9Jh8EkXyeqBkB7SOcboo9dMVqhyrACIg==} peerDependencies: - typescript: '>=5.0.4' - zod: ^3 >=3.22.0 + '@types/react': '*' + react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc peerDependenciesMeta: - typescript: - optional: true - zod: + '@types/react': optional: true - acorn-jsx@5.3.2: - resolution: {integrity: sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==} + '@radix-ui/react-context@1.1.2': + resolution: {integrity: sha512-jCi/QKUM2r1Ju5a3J64TH2A5SpKAgh0LpknyqdQ4m6DCV0xJ2HG1xARRwNGPQfi1SLdLWZ1OJz6F4OMBBNiGJA==} peerDependencies: - acorn: ^6.0.0 || ^7.0.0 || ^8.0.0 - - acorn-walk@8.3.4: - resolution: {integrity: sha512-ueEepnujpqee2o5aIYnvHU6C0A42MNdsIDeqy5BydrkuC5R1ZuUFnm27EeFJGoEHJQgn3uleRvmTXaJgfXbt4g==} - engines: {node: '>=0.4.0'} + '@types/react': '*' + react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc + peerDependenciesMeta: + '@types/react': + optional: true - acorn@8.14.0: - resolution: {integrity: sha512-cl669nCJTZBsL97OF4kUQm5g5hC2uihk0NxY3WENAC0TYdILVkAyHymAntgxGkl7K+t0cXIrH5siy5S4XkFycA==} - engines: {node: '>=0.4.0'} - hasBin: true + '@radix-ui/react-dialog@1.1.7': + resolution: {integrity: sha512-EIdma8C0C/I6kL6sO02avaCRqi3fmWJpxH6mqbVScorW6nNktzKJT/le7VPho3o/7wCsyRg3z0+Q+Obr0Gy/VQ==} + peerDependencies: + '@types/react': '*' + '@types/react-dom': '*' + react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc + react-dom: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc + peerDependenciesMeta: + '@types/react': + optional: true + '@types/react-dom': + optional: true - agent-base@7.1.1: - resolution: {integrity: sha512-H0TSyFNDMomMNJQBn8wFV5YC/2eJ+VXECwOadZJT554xP6cODZHPX3H9QMQECxvrgiSOP1pHjy1sMWQVYJOUOA==} - engines: {node: '>= 14'} + '@radix-ui/react-direction@1.1.1': + resolution: {integrity: sha512-1UEWRX6jnOA2y4H5WczZ44gOOjTEmlqv1uNW4GAJEO5+bauCBhv8snY65Iw5/VOS/ghKN9gr2KjnLKxrsvoMVw==} + peerDependencies: + '@types/react': '*' + react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc + peerDependenciesMeta: + '@types/react': + optional: true - aggregate-error@3.1.0: - resolution: {integrity: sha512-4I7Td01quW/RpocfNayFdFVk1qSuoh0E7JrbRJ16nH01HhKFQ88INq9Sd+nd72zqRySlr9BmDA8xlEJ6vJMrYA==} - engines: {node: '>=8'} + '@radix-ui/react-dismissable-layer@1.1.6': + resolution: {integrity: sha512-7gpgMT2gyKym9Jz2ZhlRXSg2y6cNQIK8d/cqBZ0RBCaps8pFryCWXiUKI+uHGFrhMrbGUP7U6PWgiXzIxoyF3Q==} + peerDependencies: + '@types/react': '*' + '@types/react-dom': '*' + react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc + react-dom: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc + peerDependenciesMeta: + '@types/react': + optional: true + '@types/react-dom': + optional: true - ajv@6.12.6: - resolution: {integrity: sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==} + '@radix-ui/react-dropdown-menu@2.1.7': + resolution: {integrity: sha512-7/1LiuNZuCQE3IzdicGoHdQOHkS2Q08+7p8w6TXZ6ZjgAULaCI85ZY15yPl4o4FVgoKLRT43/rsfNVN8osClQQ==} + peerDependencies: + '@types/react': '*' + '@types/react-dom': '*' + react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc + react-dom: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc + peerDependenciesMeta: + '@types/react': + optional: true + '@types/react-dom': + optional: true - ansi-colors@4.1.3: - resolution: {integrity: sha512-/6w/C21Pm1A7aZitlI5Ni/2J6FFQN8i1Cvz3kHABAAbw93v/NlvKdVOqz7CCWz/3iv/JplRSEEZ83XION15ovw==} - engines: {node: '>=6'} + '@radix-ui/react-focus-guards@1.1.2': + resolution: {integrity: sha512-fyjAACV62oPV925xFCrH8DR5xWhg9KYtJT4s3u54jxp+L/hbpTY2kIeEFFbFe+a/HCE94zGQMZLIpVTPVZDhaA==} + peerDependencies: + '@types/react': '*' + react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc + peerDependenciesMeta: + '@types/react': + optional: true - ansi-escapes@4.3.2: - resolution: {integrity: sha512-gKXj5ALrKWQLsYG9jlTRmR/xKluxHV+Z9QEwNIgCfM1/uwPMCuzVVnh5mwTd+OuBZcwSIMbqssNWRm1lE51QaQ==} - engines: {node: '>=8'} + '@radix-ui/react-focus-scope@1.1.3': + resolution: {integrity: sha512-4XaDlq0bPt7oJwR+0k0clCiCO/7lO7NKZTAaJBYxDNQT/vj4ig0/UvctrRscZaFREpRvUTkpKR96ov1e6jptQg==} + peerDependencies: + '@types/react': '*' + '@types/react-dom': '*' + react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc + react-dom: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc + peerDependenciesMeta: + '@types/react': + optional: true + '@types/react-dom': + optional: true - ansi-regex@5.0.1: - resolution: {integrity: sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==} - engines: {node: '>=8'} + '@radix-ui/react-id@1.1.1': + resolution: {integrity: sha512-kGkGegYIdQsOb4XjsfM97rXsiHaBwco+hFI66oO4s9LU+PLAC5oJ7khdOVFxkhsmlbpUqDAvXw11CluXP+jkHg==} + peerDependencies: + '@types/react': '*' + react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc + peerDependenciesMeta: + '@types/react': + optional: true - ansi-styles@3.2.1: - resolution: {integrity: sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==} - engines: {node: '>=4'} + '@radix-ui/react-menu@2.1.7': + resolution: {integrity: sha512-tBODsrk68rOi1/iQzbM54toFF+gSw/y+eQgttFflqlGekuSebNqvFNHjJgjqPhiMb4Fw9A0zNFly1QT6ZFdQ+Q==} + peerDependencies: + '@types/react': '*' + '@types/react-dom': '*' + react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc + react-dom: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc + peerDependenciesMeta: + '@types/react': + optional: true + '@types/react-dom': + optional: true - ansi-styles@4.3.0: - resolution: {integrity: sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==} - engines: {node: '>=8'} + '@radix-ui/react-popover@1.1.7': + resolution: {integrity: sha512-I38OYWDmJF2kbO74LX8UsFydSHWOJuQ7LxPnTefjxxvdvPLempvAnmsyX9UsBlywcbSGpRH7oMLfkUf+ij4nrw==} + peerDependencies: + '@types/react': '*' + '@types/react-dom': '*' + react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc + react-dom: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc + peerDependenciesMeta: + '@types/react': + optional: true + '@types/react-dom': + optional: true - ansi-styles@5.2.0: - resolution: {integrity: sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==} - engines: {node: '>=10'} + '@radix-ui/react-popper@1.2.3': + resolution: {integrity: sha512-iNb9LYUMkne9zIahukgQmHlSBp9XWGeQQ7FvUGNk45ywzOb6kQa+Ca38OphXlWDiKvyneo9S+KSJsLfLt8812A==} + peerDependencies: + '@types/react': '*' + '@types/react-dom': '*' + react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc + react-dom: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc + peerDependenciesMeta: + '@types/react': + optional: true + '@types/react-dom': + optional: true - anymatch@3.1.3: - resolution: {integrity: sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==} - engines: {node: '>= 8'} + '@radix-ui/react-portal@1.1.5': + resolution: {integrity: sha512-ps/67ZqsFm+Mb6lSPJpfhRLrVL2i2fntgCmGMqqth4eaGUf+knAuuRtWVJrNjUhExgmdRqftSgzpf0DF0n6yXA==} + peerDependencies: + '@types/react': '*' + '@types/react-dom': '*' + react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc + react-dom: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc + peerDependenciesMeta: + '@types/react': + optional: true + '@types/react-dom': + optional: true - arg@4.1.3: - resolution: {integrity: sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA==} + '@radix-ui/react-presence@1.1.3': + resolution: {integrity: sha512-IrVLIhskYhH3nLvtcBLQFZr61tBG7wx7O3kEmdzcYwRGAEBmBicGGL7ATzNgruYJ3xBTbuzEEq9OXJM3PAX3tA==} + peerDependencies: + '@types/react': '*' + '@types/react-dom': '*' + react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc + react-dom: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc + peerDependenciesMeta: + '@types/react': + optional: true + '@types/react-dom': + optional: true - argparse@1.0.10: - resolution: {integrity: sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==} + '@radix-ui/react-primitive@2.0.3': + resolution: {integrity: sha512-Pf/t/GkndH7CQ8wE2hbkXA+WyZ83fhQQn5DDmwDiDo6AwN/fhaH8oqZ0jRjMrO2iaMhDi6P1HRx6AZwyMinY1g==} + peerDependencies: + '@types/react': '*' + '@types/react-dom': '*' + react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc + react-dom: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc + peerDependenciesMeta: + '@types/react': + optional: true + '@types/react-dom': + optional: true - argparse@2.0.1: - resolution: {integrity: sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==} + '@radix-ui/react-progress@1.1.3': + resolution: {integrity: sha512-F56aZPGTPb4qJQ/vDjnAq63oTu/DRoIG/Asb5XKOWj8rpefNLtUllR969j5QDN2sRrTk9VXIqQDRj5VvAuquaw==} + peerDependencies: + '@types/react': '*' + '@types/react-dom': '*' + react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc + react-dom: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc + peerDependenciesMeta: + '@types/react': + optional: true + '@types/react-dom': + optional: true - array-buffer-byte-length@1.0.1: - resolution: {integrity: sha512-ahC5W1xgou+KTXix4sAO8Ki12Q+jf4i0+tmk3sC+zgcynshkHxzpXdImBehiUYKKKDwvfFiJl1tZt6ewscS1Mg==} - engines: {node: '>= 0.4'} + '@radix-ui/react-radio-group@1.2.4': + resolution: {integrity: sha512-oLz7ATfKgVTUbpr5OBu6Q7hQcnV22uPT306bmG0QwgnKqBStR98RfWfJGCfW/MmhL4ISmrmmBPBW+c77SDwV9g==} + peerDependencies: + '@types/react': '*' + '@types/react-dom': '*' + react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc + react-dom: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc + peerDependenciesMeta: + '@types/react': + optional: true + '@types/react-dom': + optional: true - array-includes@3.1.8: - resolution: {integrity: sha512-itaWrbYbqpGXkGhZPGUulwnhVf5Hpy1xiCFsGqyIGglbBxmG5vSjxQen3/WGOjPpNEv1RtBLKxbmVXm8HpJStQ==} - engines: {node: '>= 0.4'} + '@radix-ui/react-roving-focus@1.1.3': + resolution: {integrity: sha512-ufbpLUjZiOg4iYgb2hQrWXEPYX6jOLBbR27bDyAff5GYMRrCzcze8lukjuXVUQvJ6HZe8+oL+hhswDcjmcgVyg==} + peerDependencies: + '@types/react': '*' + '@types/react-dom': '*' + react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc + react-dom: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc + peerDependenciesMeta: + '@types/react': + optional: true + '@types/react-dom': + optional: true - array-union@2.1.0: - resolution: {integrity: sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==} - engines: {node: '>=8'} + '@radix-ui/react-select@2.1.7': + resolution: {integrity: sha512-exzGIRtc7S8EIM2KjFg+7lJZsH7O7tpaBaJbBNVDnOZNhtoQ2iV+iSNfi2Wth0m6h3trJkMVvzAehB3c6xj/3Q==} + peerDependencies: + '@types/react': '*' + '@types/react-dom': '*' + react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc + react-dom: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc + peerDependenciesMeta: + '@types/react': + optional: true + '@types/react-dom': + optional: true - array.prototype.findlast@1.2.5: - resolution: {integrity: sha512-CVvd6FHg1Z3POpBLxO6E6zr+rSKEQ9L6rZHAaY7lLfhKsWYUBBOuMs0e9o24oopj6H+geRCX0YJ+TJLBK2eHyQ==} - engines: {node: '>= 0.4'} + '@radix-ui/react-slot@1.2.0': + resolution: {integrity: sha512-ujc+V6r0HNDviYqIK3rW4ffgYiZ8g5DEHrGJVk4x7kTlLXRDILnKX9vAUYeIsLOoDpDJ0ujpqMkjH4w2ofuo6w==} + peerDependencies: + '@types/react': '*' + react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc + peerDependenciesMeta: + '@types/react': + optional: true - array.prototype.flat@1.3.2: - resolution: {integrity: sha512-djYB+Zx2vLewY8RWlNCUdHjDXs2XOgm602S9E7P/UpHgfeHL00cRiIF+IN/G/aUJ7kGPb6yO/ErDI5V2s8iycA==} - engines: {node: '>= 0.4'} + '@radix-ui/react-switch@1.1.4': + resolution: {integrity: sha512-zGP6W8plLeogoeGMiTHJ/uvf+TE1C2chVsEwfP8YlvpQKJHktG+iCkUtCLGPAuDV8/qDSmIRPm4NggaTxFMVBQ==} + peerDependencies: + '@types/react': '*' + '@types/react-dom': '*' + react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc + react-dom: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc + peerDependenciesMeta: + '@types/react': + optional: true + '@types/react-dom': + optional: true - array.prototype.flatmap@1.3.2: - resolution: {integrity: sha512-Ewyx0c9PmpcsByhSW4r+9zDU7sGjFc86qf/kKtuSCRdhfbk0SNLLkaT5qvcHnRGgc5NP/ly/y+qkXkqONX54CQ==} - engines: {node: '>= 0.4'} + '@radix-ui/react-tabs@1.1.4': + resolution: {integrity: sha512-fuHMHWSf5SRhXke+DbHXj2wVMo+ghVH30vhX3XVacdXqDl+J4XWafMIGOOER861QpBx1jxgwKXL2dQnfrsd8MQ==} + peerDependencies: + '@types/react': '*' + '@types/react-dom': '*' + react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc + react-dom: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc + peerDependenciesMeta: + '@types/react': + optional: true + '@types/react-dom': + optional: true - array.prototype.tosorted@1.1.4: - resolution: {integrity: sha512-p6Fx8B7b7ZhL/gmUsAy0D15WhvDccw3mnGNbZpi3pmeJdxtWsj2jEaI4Y6oo3XiHfzuSgPwKc04MYt6KgvC/wA==} - engines: {node: '>= 0.4'} + '@radix-ui/react-toast@1.2.7': + resolution: {integrity: sha512-0IWTbAUKvzdpOaWDMZisXZvScXzF0phaQjWspK8RUMEUxjLbli+886mB/kXTIC3F+t5vQ0n0vYn+dsX8s+WdfA==} + peerDependencies: + '@types/react': '*' + '@types/react-dom': '*' + react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc + react-dom: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc + peerDependenciesMeta: + '@types/react': + optional: true + '@types/react-dom': + optional: true - arraybuffer.prototype.slice@1.0.3: - resolution: {integrity: sha512-bMxMKAjg13EBSVscxTaYA4mRc5t1UAXa2kXiGTNfZ079HIWXEkKmkgFrh/nJqamaLSrXO5H4WFFkPEaLJWbs3A==} - engines: {node: '>= 0.4'} + '@radix-ui/react-tooltip@1.2.0': + resolution: {integrity: sha512-b1Sdc75s7zN9B8ONQTGBSHL3XS8+IcjcOIY51fhM4R1Hx8s0YbgqgyNZiri4qcYMVZK8hfCZVBiyCm7N9rs0rw==} + peerDependencies: + '@types/react': '*' + '@types/react-dom': '*' + react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc + react-dom: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc + peerDependenciesMeta: + '@types/react': + optional: true + '@types/react-dom': + optional: true - ast-types@0.13.4: - resolution: {integrity: sha512-x1FCFnFifvYDDzTaLII71vG5uvDwgtmDTEVWAxrgeiR8VjMONcCXJx7E+USjDtHlwFmt9MysbqgF9b9Vjr6w+w==} - engines: {node: '>=4'} + '@radix-ui/react-use-callback-ref@1.1.1': + resolution: {integrity: sha512-FkBMwD+qbGQeMu1cOHnuGB6x4yzPjho8ap5WtbEJ26umhgqVXbhekKUQO+hZEL1vU92a3wHwdp0HAcqAUF5iDg==} + peerDependencies: + '@types/react': '*' + react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc + peerDependenciesMeta: + '@types/react': + optional: true - async@3.2.6: - resolution: {integrity: sha512-htCUDlxyyCLMgaM3xXg0C0LW2xqfuQ6p05pCEIsXuyQ+a1koYKTuBMzRNwmybfLgvJDMd0r1LTn4+E0Ti6C2AA==} + '@radix-ui/react-use-controllable-state@1.1.1': + resolution: {integrity: sha512-YnEXIy8/ga01Y1PN0VfaNH//MhA91JlEGVBDxDzROqwrAtG5Yr2QGEPz8A/rJA3C7ZAHryOYGaUv8fLSW2H/mg==} + peerDependencies: + '@types/react': '*' + react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc + peerDependenciesMeta: + '@types/react': + optional: true - available-typed-arrays@1.0.7: - resolution: {integrity: sha512-wvUjBtSGN7+7SjNpq/9M2Tg350UZD3q62IFZLbRAR1bSMlCo1ZaeW+BJ+D090e4hIIZLBcTDWe4Mh4jvUDajzQ==} - engines: {node: '>= 0.4'} + '@radix-ui/react-use-escape-keydown@1.1.1': + resolution: {integrity: sha512-Il0+boE7w/XebUHyBjroE+DbByORGR9KKmITzbR7MyQ4akpORYP/ZmbhAr0DG7RmmBqoOnZdy2QlvajJ2QA59g==} + peerDependencies: + '@types/react': '*' + react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc + peerDependenciesMeta: + '@types/react': + optional: true - babel-jest@29.7.0: - resolution: {integrity: sha512-BrvGY3xZSwEcCzKvKsCi2GgHqDqsYkOP4/by5xCgIwGXQxIEh+8ew3gmrE1y7XRR6LHZIj6yLYnUi/mm2KXKBg==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + '@radix-ui/react-use-layout-effect@1.1.1': + resolution: {integrity: sha512-RbJRS4UWQFkzHTTwVymMTUv8EqYhOp8dOOviLj2ugtTiXRaRQS7GLGxZTLL1jWhMeoSCf5zmcZkqTl9IiYfXcQ==} peerDependencies: - '@babel/core': ^7.8.0 + '@types/react': '*' + react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc + peerDependenciesMeta: + '@types/react': + optional: true - babel-plugin-istanbul@6.1.1: - resolution: {integrity: sha512-Y1IQok9821cC9onCx5otgFfRm7Lm+I+wwxOx738M/WLPZ9Q42m4IG5W0FNX8WLL2gYMZo3JkuXIH2DOpWM+qwA==} - engines: {node: '>=8'} + '@radix-ui/react-use-previous@1.1.1': + resolution: {integrity: sha512-2dHfToCj/pzca2Ck724OZ5L0EVrr3eHRNsG/b3xQJLA2hZpVCS99bLAX+hm1IHXDEnzU6by5z/5MIY794/a8NQ==} + peerDependencies: + '@types/react': '*' + react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc + peerDependenciesMeta: + '@types/react': + optional: true - babel-plugin-jest-hoist@29.6.3: - resolution: {integrity: sha512-ESAc/RJvGTFEzRwOTT4+lNDk/GNHMkKbNzsvT0qKRfDyyYTskxB5rnU2njIDYVxXCBHHEI1c0YwHob3WaYujOg==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + '@radix-ui/react-use-rect@1.1.1': + resolution: {integrity: sha512-QTYuDesS0VtuHNNvMh+CjlKJ4LJickCMUAqjlE3+j8w+RlRpwyX3apEQKGFzbZGdo7XNG1tXa+bQqIE7HIXT2w==} + peerDependencies: + '@types/react': '*' + react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc + peerDependenciesMeta: + '@types/react': + optional: true - babel-preset-current-node-syntax@1.1.0: - resolution: {integrity: sha512-ldYss8SbBlWva1bs28q78Ju5Zq1F+8BrqBZZ0VFhLBvhh6lCpC2o3gDJi/5DRLs9FgYZCnmPYIVFU4lRXCkyUw==} + '@radix-ui/react-use-size@1.1.1': + resolution: {integrity: sha512-ewrXRDTAqAXlkl6t/fkXWNAhFX9I+CkKlw6zjEwk86RSPKwZr3xpBRso655aqYafwtnbpHLj6toFzmd6xdVptQ==} peerDependencies: - '@babel/core': ^7.0.0 + '@types/react': '*' + react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc + peerDependenciesMeta: + '@types/react': + optional: true - babel-preset-jest@29.6.3: - resolution: {integrity: sha512-0B3bhxR6snWXJZtR/RliHTDPRgn1sNHOR0yVtq/IiQFyuOVjFS+wuio/R4gSNkyYmKmJB4wGZv2NZanmKmTnNA==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + '@radix-ui/react-visually-hidden@1.1.3': + resolution: {integrity: sha512-oXSF3ZQRd5fvomd9hmUCb2EHSZbPp3ZSHAHJJU/DlF9XoFkJBBW8RHU/E8WEH+RbSfJd/QFA0sl8ClJXknBwHQ==} peerDependencies: - '@babel/core': ^7.0.0 + '@types/react': '*' + '@types/react-dom': '*' + react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc + react-dom: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc + peerDependenciesMeta: + '@types/react': + optional: true + '@types/react-dom': + optional: true - balanced-match@1.0.2: - resolution: {integrity: sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==} + '@radix-ui/rect@1.1.1': + resolution: {integrity: sha512-HPwpGIzkl28mWyZqG52jiqDJ12waP11Pa1lGoiyUkIEuMLBP0oeK/C89esbXrxsky5we7dfd8U58nm0SgAWpVw==} - base64-js@1.5.1: - resolution: {integrity: sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==} + '@rollup/rollup-android-arm-eabi@4.40.0': + resolution: {integrity: sha512-+Fbls/diZ0RDerhE8kyC6hjADCXA1K4yVNlH0EYfd2XjyH0UGgzaQ8MlT0pCXAThfxv3QUAczHaL+qSv1E4/Cg==} + cpu: [arm] + os: [android] - basic-ftp@5.0.5: - resolution: {integrity: sha512-4Bcg1P8xhUuqcii/S0Z9wiHIrQVPMermM1any+MX5GeGD7faD3/msQUDGLol9wOcz4/jbg/WJnGqoJF6LiBdtg==} - engines: {node: '>=10.0.0'} + '@rollup/rollup-android-arm64@4.40.0': + resolution: {integrity: sha512-PPA6aEEsTPRz+/4xxAmaoWDqh67N7wFbgFUJGMnanCFs0TV99M0M8QhhaSCks+n6EbQoFvLQgYOGXxlMGQe/6w==} + cpu: [arm64] + os: [android] - better-path-resolve@1.0.0: - resolution: {integrity: sha512-pbnl5XzGBdrFU/wT4jqmJVPn2B6UHPBOhzMQkY/SPUPB6QtUXtmBHBIwCbXJol93mOpGMnQyP/+BB19q04xj7g==} - engines: {node: '>=4'} + '@rollup/rollup-darwin-arm64@4.40.0': + resolution: {integrity: sha512-GwYOcOakYHdfnjjKwqpTGgn5a6cUX7+Ra2HeNj/GdXvO2VJOOXCiYYlRFU4CubFM67EhbmzLOmACKEfvp3J1kQ==} + cpu: [arm64] + os: [darwin] - binary-extensions@2.3.0: - resolution: {integrity: sha512-Ceh+7ox5qe7LJuLHoY0feh3pHuUDHAcRUeyL2VYghZwfpkNIy/+8Ocg0a3UuSoYzavmylwuLWQOf3hl0jjMMIw==} - engines: {node: '>=8'} + '@rollup/rollup-darwin-x64@4.40.0': + resolution: {integrity: sha512-CoLEGJ+2eheqD9KBSxmma6ld01czS52Iw0e2qMZNpPDlf7Z9mj8xmMemxEucinev4LgHalDPczMyxzbq+Q+EtA==} + cpu: [x64] + os: [darwin] - bl@4.1.0: - resolution: {integrity: sha512-1W07cM9gS6DcLperZfFSj+bWLtaPGSOHWhPiGzXmvVJbRLdG82sH/Kn8EtW1VqWVA54AKf2h5k5BbnIbwF3h6w==} + '@rollup/rollup-freebsd-arm64@4.40.0': + resolution: {integrity: sha512-r7yGiS4HN/kibvESzmrOB/PxKMhPTlz+FcGvoUIKYoTyGd5toHp48g1uZy1o1xQvybwwpqpe010JrcGG2s5nkg==} + cpu: [arm64] + os: [freebsd] - brace-expansion@1.1.11: - resolution: {integrity: sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==} + '@rollup/rollup-freebsd-x64@4.40.0': + resolution: {integrity: sha512-mVDxzlf0oLzV3oZOr0SMJ0lSDd3xC4CmnWJ8Val8isp9jRGl5Dq//LLDSPFrasS7pSm6m5xAcKaw3sHXhBjoRw==} + cpu: [x64] + os: [freebsd] - brace-expansion@2.0.1: - resolution: {integrity: sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==} + '@rollup/rollup-linux-arm-gnueabihf@4.40.0': + resolution: {integrity: sha512-y/qUMOpJxBMy8xCXD++jeu8t7kzjlOCkoxxajL58G62PJGBZVl/Gwpm7JK9+YvlB701rcQTzjUZ1JgUoPTnoQA==} + cpu: [arm] + os: [linux] - braces@3.0.3: - resolution: {integrity: sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==} - engines: {node: '>=8'} + '@rollup/rollup-linux-arm-musleabihf@4.40.0': + resolution: {integrity: sha512-GoCsPibtVdJFPv/BOIvBKO/XmwZLwaNWdyD8TKlXuqp0veo2sHE+A/vpMQ5iSArRUz/uaoj4h5S6Pn0+PdhRjg==} + cpu: [arm] + os: [linux] - browserslist@4.24.4: - resolution: {integrity: sha512-KDi1Ny1gSePi1vm0q4oxSF8b4DR44GF4BbmS2YdhPLOEqd8pDviZOGH/GsmRwoWJ2+5Lr085X7naowMwKHDG1A==} - engines: {node: ^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7} - hasBin: true + '@rollup/rollup-linux-arm64-gnu@4.40.0': + resolution: {integrity: sha512-L5ZLphTjjAD9leJzSLI7rr8fNqJMlGDKlazW2tX4IUF9P7R5TMQPElpH82Q7eNIDQnQlAyiNVfRPfP2vM5Avvg==} + cpu: [arm64] + os: [linux] - bs-logger@0.2.6: - resolution: {integrity: sha512-pd8DCoxmbgc7hyPKOvxtqNcjYoOsABPQdcCUjGp3d42VR2CX1ORhk2A87oqqu5R1kk+76nsxZupkmyd+MVtCog==} - engines: {node: '>= 6'} + '@rollup/rollup-linux-arm64-musl@4.40.0': + resolution: {integrity: sha512-ATZvCRGCDtv1Y4gpDIXsS+wfFeFuLwVxyUBSLawjgXK2tRE6fnsQEkE4csQQYWlBlsFztRzCnBvWVfcae/1qxQ==} + cpu: [arm64] + os: [linux] - bser@2.1.1: - resolution: {integrity: sha512-gQxTNE/GAfIIrmHLUE3oJyp5FO6HRBfhjnw4/wMmA63ZGDJnWBmgY/lyQBpnDUkGmAhbSe39tx2d/iTOAfglwQ==} + '@rollup/rollup-linux-loongarch64-gnu@4.40.0': + resolution: {integrity: sha512-wG9e2XtIhd++QugU5MD9i7OnpaVb08ji3P1y/hNbxrQ3sYEelKJOq1UJ5dXczeo6Hj2rfDEL5GdtkMSVLa/AOg==} + cpu: [loong64] + os: [linux] - buffer-from@1.1.2: - resolution: {integrity: sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==} + '@rollup/rollup-linux-powerpc64le-gnu@4.40.0': + resolution: {integrity: sha512-vgXfWmj0f3jAUvC7TZSU/m/cOE558ILWDzS7jBhiCAFpY2WEBn5jqgbqvmzlMjtp8KlLcBlXVD2mkTSEQE6Ixw==} + cpu: [ppc64] + os: [linux] - buffer@5.7.1: - resolution: {integrity: sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==} + '@rollup/rollup-linux-riscv64-gnu@4.40.0': + resolution: {integrity: sha512-uJkYTugqtPZBS3Z136arevt/FsKTF/J9dEMTX/cwR7lsAW4bShzI2R0pJVw+hcBTWF4dxVckYh72Hk3/hWNKvA==} + cpu: [riscv64] + os: [linux] - busboy@1.6.0: - resolution: {integrity: sha512-8SFQbg/0hQ9xy3UNTB0YEnsNBbWfhf7RtnzpL7TkBiTBRfrQ9Fxcnz7VJsleJpyp6rVLvXiuORqjlHi5q+PYuA==} - engines: {node: '>=10.16.0'} + '@rollup/rollup-linux-riscv64-musl@4.40.0': + resolution: {integrity: sha512-rKmSj6EXQRnhSkE22+WvrqOqRtk733x3p5sWpZilhmjnkHkpeCgWsFFo0dGnUGeA+OZjRl3+VYq+HyCOEuwcxQ==} + cpu: [riscv64] + os: [linux] - call-bind@1.0.7: - resolution: {integrity: sha512-GHTSNSYICQ7scH7sZ+M2rFopRoLh8t2bLSW6BbgrtLsahOIB5iyAVJf9GjWK3cYTDaMj4XdBpM1cA6pIS0Kv2w==} - engines: {node: '>= 0.4'} + '@rollup/rollup-linux-s390x-gnu@4.40.0': + resolution: {integrity: sha512-SpnYlAfKPOoVsQqmTFJ0usx0z84bzGOS9anAC0AZ3rdSo3snecihbhFTlJZ8XMwzqAcodjFU4+/SM311dqE5Sw==} + cpu: [s390x] + os: [linux] - callsites@3.1.0: - resolution: {integrity: sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==} - engines: {node: '>=6'} + '@rollup/rollup-linux-x64-gnu@4.40.0': + resolution: {integrity: sha512-RcDGMtqF9EFN8i2RYN2W+64CdHruJ5rPqrlYw+cgM3uOVPSsnAQps7cpjXe9be/yDp8UC7VLoCoKC8J3Kn2FkQ==} + cpu: [x64] + os: [linux] - camel-case@3.0.0: - resolution: {integrity: sha512-+MbKztAYHXPr1jNTSKQF52VpcFjwY5RkR7fxksV8Doo4KAYc5Fl4UJRgthBbTmEx8C54DqahhbLJkDwjI3PI/w==} + '@rollup/rollup-linux-x64-musl@4.40.0': + resolution: {integrity: sha512-HZvjpiUmSNx5zFgwtQAV1GaGazT2RWvqeDi0hV+AtC8unqqDSsaFjPxfsO6qPtKRRg25SisACWnJ37Yio8ttaw==} + cpu: [x64] + os: [linux] - camelcase@5.3.1: - resolution: {integrity: sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==} - engines: {node: '>=6'} + '@rollup/rollup-win32-arm64-msvc@4.40.0': + resolution: {integrity: sha512-UtZQQI5k/b8d7d3i9AZmA/t+Q4tk3hOC0tMOMSq2GlMYOfxbesxG4mJSeDp0EHs30N9bsfwUvs3zF4v/RzOeTQ==} + cpu: [arm64] + os: [win32] - camelcase@6.3.0: - resolution: {integrity: sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==} - engines: {node: '>=10'} + '@rollup/rollup-win32-ia32-msvc@4.40.0': + resolution: {integrity: sha512-+m03kvI2f5syIqHXCZLPVYplP8pQch9JHyXKZ3AGMKlg8dCyr2PKHjwRLiW53LTrN/Nc3EqHOKxUxzoSPdKddA==} + cpu: [ia32] + os: [win32] - caniuse-lite@1.0.30001701: - resolution: {integrity: sha512-faRs/AW3jA9nTwmJBSO1PQ6L/EOgsB5HMQQq4iCu5zhPgVVgO/pZRHlmatwijZKetFw8/Pr4q6dEN8sJuq8qTw==} + '@rollup/rollup-win32-x64-msvc@4.40.0': + resolution: {integrity: sha512-lpPE1cLfP5oPzVjKMx10pgBmKELQnFJXHgvtHCtuJWOv8MxqdEIMNtgHgBFf7Ea2/7EuVwa9fodWUfXAlXZLZQ==} + cpu: [x64] + os: [win32] - chalk@2.4.2: - resolution: {integrity: sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==} - engines: {node: '>=4'} + '@safe-global/safe-apps-provider@0.18.5': + resolution: {integrity: sha512-9v9wjBi3TwLsEJ3C2ujYoexp3pFJ0omDLH/GX91e2QB+uwCKTBYyhxFSrTQ9qzoyQd+bfsk4gjOGW87QcJhf7g==} - chalk@3.0.0: - resolution: {integrity: sha512-4D3B6Wf41KOYRFdszmDqMCGq5VV/uMAB273JILmO+3jAlh8X4qDtdtgCR3fxtbLEMzSx22QdhnDcJvu2u1fVwg==} - engines: {node: '>=8'} + '@safe-global/safe-apps-sdk@9.1.0': + resolution: {integrity: sha512-N5p/ulfnnA2Pi2M3YeWjULeWbjo7ei22JwU/IXnhoHzKq3pYCN6ynL9mJBOlvDVv892EgLPCWCOwQk/uBT2v0Q==} - chalk@4.1.2: - resolution: {integrity: sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==} - engines: {node: '>=10'} + '@safe-global/safe-gateway-typescript-sdk@3.22.9': + resolution: {integrity: sha512-7ojVK/crhOaGowEO8uYWaopZzcr5rR76emgllGIfjCLR70aY4PbASpi9Pbs+7jIRzPDBBkM0RBo+zYx5UduX8Q==} + engines: {node: '>=16'} - change-case@3.1.0: - resolution: {integrity: sha512-2AZp7uJZbYEzRPsFoa+ijKdvp9zsrnnt6+yFokfwEpeJm0xuJDVoxiRCAaTzyJND8GJkofo2IcKWaUZ/OECVzw==} + '@scure/base@1.1.9': + resolution: {integrity: sha512-8YKhl8GHiNI/pU2VMaofa2Tor7PJRAjwQLBBuilkJ9L5+13yVbC7JO/wS7piioAvPSwR3JKM1IJ/u4xQzbcXKg==} - char-regex@1.0.2: - resolution: {integrity: sha512-kWWXztvZ5SBQV+eRgKFeh8q5sLuZY2+8WUIzlxWVTg+oGwY14qylx1KbKzHd8P6ZYkAg0xyIDU9JMHhyJMZ1jw==} - engines: {node: '>=10'} + '@scure/base@1.2.4': + resolution: {integrity: sha512-5Yy9czTO47mqz+/J8GM6GIId4umdCk1wc1q8rKERQulIoc8VP9pzDcghv10Tl2E7R96ZUx/PhND3ESYUQX8NuQ==} - chardet@0.7.0: - resolution: {integrity: sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA==} + '@scure/bip32@1.4.0': + resolution: {integrity: sha512-sVUpc0Vq3tXCkDGYVWGIZTRfnvu8LoTDaev7vbwh0omSvVORONr960MQWdKqJDCReIEmTj3PAr73O3aoxz7OPg==} - chokidar@3.6.0: - resolution: {integrity: sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw==} - engines: {node: '>= 8.10.0'} + '@scure/bip32@1.6.2': + resolution: {integrity: sha512-t96EPDMbtGgtb7onKKqxRLfE5g05k7uHnHRM2xdE6BP/ZmxaLtPek4J4KfVn/90IQNrU1IOAqMgiDtUdtbe3nw==} - ci-info@3.9.0: - resolution: {integrity: sha512-NIxF55hv4nSqQswkAeiOi1r83xy8JldOFDTWiug55KBu9Jnblncd2U6ViHmYgHf01TPZS77NJBhBMKdWj9HQMQ==} - engines: {node: '>=8'} + '@scure/bip39@1.3.0': + resolution: {integrity: sha512-disdg7gHuTDZtY+ZdkmLpPCk7fxZSu3gBiEGuoC1XYxv9cGx3Z6cpTggCgW6odSOOIXCiDjuGejW+aJKCY/pIQ==} - cjs-module-lexer@1.4.3: - resolution: {integrity: sha512-9z8TZaGM1pfswYeXrUpzPrkx8UnWYdhJclsiYMm6x/w5+nN+8Tf/LnAgfLGQCm59qAOxU8WwHEq2vNwF6i4j+Q==} + '@scure/bip39@1.5.4': + resolution: {integrity: sha512-TFM4ni0vKvCfBpohoh+/lY05i9gRbSwXWngAsF4CABQxoaOHijxuaZ2R6cStDQ5CHtHO9aGJTr4ksVJASRRyMA==} - clean-stack@2.2.0: - resolution: {integrity: sha512-4diC9HaTE+KRAMWhDhrGOECgWZxoevMc5TlkObMqNSsVU62PYzXZ/SMTjzyGAFF1YusgxGcSWTEXBhp0CPwQ1A==} - engines: {node: '>=6'} + '@sinclair/typebox@0.27.8': + resolution: {integrity: sha512-+Fj43pSMwJs4KRrH/938Uf+uAELIgVBmQzg/q1YG10djyfA3TnrU8N8XzqCh/okZdszqBQTZf96idMfE5lnwTA==} - cli-cursor@3.1.0: - resolution: {integrity: sha512-I/zHAwsKf9FqGoXM4WWRACob9+SNukZTd94DWF57E4toouRulbCxcUh6RKUEOQlYTHJnzkPMySvPNaaSLNfLZw==} - engines: {node: '>=8'} + '@sinonjs/commons@3.0.1': + resolution: {integrity: sha512-K3mCHKQ9sVh8o1C9cxkwxaOmXoAMlDxC1mYyHrjqOWEcBjYr76t96zL2zlj5dUGZ3HSw240X1qgH3Mjf1yJWpQ==} - cli-spinners@2.9.2: - resolution: {integrity: sha512-ywqV+5MmyL4E7ybXgKys4DugZbX0FC6LnwrhjuykIjnK9k8OQacQ7axGKnjDXWNhns0xot3bZI5h55H8yo9cJg==} - engines: {node: '>=6'} + '@sinonjs/fake-timers@10.3.0': + resolution: {integrity: sha512-V4BG07kuYSUkTCSBHG8G8TNhM+F19jXFWnQtzj+we8DrkpSBCee9Z3Ms8yiGer/dlmhe35/Xdgyo3/0rQKg7YA==} - cli-width@3.0.0: - resolution: {integrity: sha512-FxqpkPPwu1HjuN93Omfm4h8uIanXofW0RxVEW3k5RKx+mJJYSthzNhp32Kzxxy3YAEZ/Dc/EWN1vZRY0+kOhbw==} - engines: {node: '>= 10'} + '@socket.io/component-emitter@3.1.2': + resolution: {integrity: sha512-9BCxFwvbGg/RsZK9tjXd8s4UcwR0MWeFQ1XEKIQVVvAGJyINdrqKMcTRyLoK8Rse1GjzLV9cwjWV1olXRWEXVA==} - client-only@0.0.1: - resolution: {integrity: sha512-IV3Ou0jSMzZrd3pZ48nLkT9DA7Ag1pnPzaiQhpW7c3RbcqqzvzzVu+L8gfqMp/8IM2MQtSiqaCxrrcfu8I8rMA==} + '@swc/counter@0.1.3': + resolution: {integrity: sha512-e2BR4lsJkkRlKZ/qCHPw9ZaSxc0MVUd7gtbtaB7aMvHeJVYe8sOB8DBZkP2DtISHGSku9sCK6T6cnY0CtXrOCQ==} - cliui@8.0.1: - resolution: {integrity: sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==} - engines: {node: '>=12'} + '@swc/helpers@0.5.15': + resolution: {integrity: sha512-JQ5TuMi45Owi4/BIMAJBoSQoOJu12oOk/gADqlcUL9JEdHB8vyjUSsxqeNXnmXHjYKMi2WcYtezGEEhqUI/E2g==} - clone@1.0.4: - resolution: {integrity: sha512-JQHZ2QMW6l3aH/j6xCqQThY/9OH4D/9ls34cgkUBiEeocRTU04tHfKPBsUK1PqZCUQM7GiA0IIXJSuXHI64Kbg==} - engines: {node: '>=0.8'} + '@tailwindcss/node@4.1.4': + resolution: {integrity: sha512-MT5118zaiO6x6hNA04OWInuAiP1YISXql8Z+/Y8iisV5nuhM8VXlyhRuqc2PEviPszcXI66W44bCIk500Oolhw==} - co@4.6.0: - resolution: {integrity: sha512-QVb0dM5HvG+uaxitm8wONl7jltx8dqhfU33DcqtOZcLSVIKSDDLDi7+0LbAKiyI8hD9u42m2YxXSkMGWThaecQ==} - engines: {iojs: '>= 1.0.0', node: '>= 0.12.0'} + '@tailwindcss/oxide-android-arm64@4.1.4': + resolution: {integrity: sha512-xMMAe/SaCN/vHfQYui3fqaBDEXMu22BVwQ33veLc8ep+DNy7CWN52L+TTG9y1K397w9nkzv+Mw+mZWISiqhmlA==} + engines: {node: '>= 10'} + cpu: [arm64] + os: [android] - collect-v8-coverage@1.0.2: - resolution: {integrity: sha512-lHl4d5/ONEbLlJvaJNtsF/Lz+WvB07u2ycqTYbdrq7UypDXailES4valYb2eWiJFxZlVmpGekfqoxQhzyFdT4Q==} + '@tailwindcss/oxide-darwin-arm64@4.1.4': + resolution: {integrity: sha512-JGRj0SYFuDuAGilWFBlshcexev2hOKfNkoX+0QTksKYq2zgF9VY/vVMq9m8IObYnLna0Xlg+ytCi2FN2rOL0Sg==} + engines: {node: '>= 10'} + cpu: [arm64] + os: [darwin] - color-convert@1.9.3: - resolution: {integrity: sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==} + '@tailwindcss/oxide-darwin-x64@4.1.4': + resolution: {integrity: sha512-sdDeLNvs3cYeWsEJ4H1DvjOzaGios4QbBTNLVLVs0XQ0V95bffT3+scptzYGPMjm7xv4+qMhCDrkHwhnUySEzA==} + engines: {node: '>= 10'} + cpu: [x64] + os: [darwin] - color-convert@2.0.1: - resolution: {integrity: sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==} - engines: {node: '>=7.0.0'} + '@tailwindcss/oxide-freebsd-x64@4.1.4': + resolution: {integrity: sha512-VHxAqxqdghM83HslPhRsNhHo91McsxRJaEnShJOMu8mHmEj9Ig7ToHJtDukkuLWLzLboh2XSjq/0zO6wgvykNA==} + engines: {node: '>= 10'} + cpu: [x64] + os: [freebsd] - color-name@1.1.3: - resolution: {integrity: sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==} + '@tailwindcss/oxide-linux-arm-gnueabihf@4.1.4': + resolution: {integrity: sha512-OTU/m/eV4gQKxy9r5acuesqaymyeSCnsx1cFto/I1WhPmi5HDxX1nkzb8KYBiwkHIGg7CTfo/AcGzoXAJBxLfg==} + engines: {node: '>= 10'} + cpu: [arm] + os: [linux] - color-name@1.1.4: - resolution: {integrity: sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==} + '@tailwindcss/oxide-linux-arm64-gnu@4.1.4': + resolution: {integrity: sha512-hKlLNvbmUC6z5g/J4H+Zx7f7w15whSVImokLPmP6ff1QqTVE+TxUM9PGuNsjHvkvlHUtGTdDnOvGNSEUiXI1Ww==} + engines: {node: '>= 10'} + cpu: [arm64] + os: [linux] - color-string@1.9.1: - resolution: {integrity: sha512-shrVawQFojnZv6xM40anx4CkoDP+fZsw/ZerEMsW/pyzsRbElpsL/DBVW7q3ExxwusdNXI3lXpuhEZkzs8p5Eg==} + '@tailwindcss/oxide-linux-arm64-musl@4.1.4': + resolution: {integrity: sha512-X3As2xhtgPTY/m5edUtddmZ8rCruvBvtxYLMw9OsZdH01L2gS2icsHRwxdU0dMItNfVmrBezueXZCHxVeeb7Aw==} + engines: {node: '>= 10'} + cpu: [arm64] + os: [linux] - color@4.2.3: - resolution: {integrity: sha512-1rXeuUUiGGrykh+CeBdu5Ie7OJwinCgQY0bc7GCRxy5xVHy+moaqkpL/jqQq0MtQOeYcrqEz4abc5f0KtU7W4A==} - engines: {node: '>=12.5.0'} + '@tailwindcss/oxide-linux-x64-gnu@4.1.4': + resolution: {integrity: sha512-2VG4DqhGaDSmYIu6C4ua2vSLXnJsb/C9liej7TuSO04NK+JJJgJucDUgmX6sn7Gw3Cs5ZJ9ZLrnI0QRDOjLfNQ==} + engines: {node: '>= 10'} + cpu: [x64] + os: [linux] - commander@10.0.1: - resolution: {integrity: sha512-y4Mg2tXshplEbSGzx7amzPwKKOCGuoSRP/CjEdwwk0FOGlUbq6lKuoyDZTNZkmxHdJtp54hdfY/JUrdL7Xfdug==} - engines: {node: '>=14'} + '@tailwindcss/oxide-linux-x64-musl@4.1.4': + resolution: {integrity: sha512-v+mxVgH2kmur/X5Mdrz9m7TsoVjbdYQT0b4Z+dr+I4RvreCNXyCFELZL/DO0M1RsidZTrm6O1eMnV6zlgEzTMQ==} + engines: {node: '>= 10'} + cpu: [x64] + os: [linux] - concat-map@0.0.1: - resolution: {integrity: sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==} + '@tailwindcss/oxide-wasm32-wasi@4.1.4': + resolution: {integrity: sha512-2TLe9ir+9esCf6Wm+lLWTMbgklIjiF0pbmDnwmhR9MksVOq+e8aP3TSsXySnBDDvTTVd/vKu1aNttEGj3P6l8Q==} + engines: {node: '>=14.0.0'} + cpu: [wasm32] + bundledDependencies: + - '@napi-rs/wasm-runtime' + - '@emnapi/core' + - '@emnapi/runtime' + - '@tybys/wasm-util' + - '@emnapi/wasi-threads' + - tslib + + '@tailwindcss/oxide-win32-arm64-msvc@4.1.4': + resolution: {integrity: sha512-VlnhfilPlO0ltxW9/BgfLI5547PYzqBMPIzRrk4W7uupgCt8z6Trw/tAj6QUtF2om+1MH281Pg+HHUJoLesmng==} + engines: {node: '>= 10'} + cpu: [arm64] + os: [win32] - concurrently@8.2.2: - resolution: {integrity: sha512-1dP4gpXFhei8IOtlXRE/T/4H88ElHgTiUzh71YUmtjTEHMSRS2Z/fgOxHSxxusGHogsRfxNq1vyAwxSC+EVyDg==} - engines: {node: ^14.13.0 || >=16.0.0} - hasBin: true + '@tailwindcss/oxide-win32-x64-msvc@4.1.4': + resolution: {integrity: sha512-+7S63t5zhYjslUGb8NcgLpFXD+Kq1F/zt5Xv5qTv7HaFTG/DHyHD9GA6ieNAxhgyA4IcKa/zy7Xx4Oad2/wuhw==} + engines: {node: '>= 10'} + cpu: [x64] + os: [win32] - constant-case@2.0.0: - resolution: {integrity: sha512-eS0N9WwmjTqrOmR3o83F5vW8Z+9R1HnVz3xmzT2PMFug9ly+Au/fxRWlEBSb6LcZwspSsEn9Xs1uw9YgzAg1EQ==} + '@tailwindcss/oxide@4.1.4': + resolution: {integrity: sha512-p5wOpXyOJx7mKh5MXh5oKk+kqcz8T+bA3z/5VWWeQwFrmuBItGwz8Y2CHk/sJ+dNb9B0nYFfn0rj/cKHZyjahQ==} + engines: {node: '>= 10'} - convert-source-map@2.0.0: - resolution: {integrity: sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==} + '@tailwindcss/vite@4.1.4': + resolution: {integrity: sha512-4UQeMrONbvrsXKXXp/uxmdEN5JIJ9RkH7YVzs6AMxC/KC1+Np7WZBaNIco7TEjlkthqxZbt8pU/ipD+hKjm80A==} + peerDependencies: + vite: ^5.2.0 || ^6 - core-js-pure@3.39.0: - resolution: {integrity: sha512-7fEcWwKI4rJinnK+wLTezeg2smbFFdSBP6E2kQZNbnzM2s1rpKQ6aaRteZSSg7FLU3P0HGGVo/gbpfanU36urg==} + '@tanstack/query-core@5.74.3': + resolution: {integrity: sha512-Mqk+5o3qTuAiZML248XpNH8r2cOzl15+LTbUsZQEwvSvn1GU4VQhvqzAbil36p+MBxpr/58oBSnRzhrBevDhfg==} - create-jest@29.7.0: - resolution: {integrity: sha512-Adz2bdH0Vq3F53KEMJOoftQFutWCukm6J24wbPWRO4k1kMY7gS7ds/uoJkNuV8wDCtWWnuwGcJwpWcih+zEW1Q==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} - hasBin: true + '@tanstack/react-query@5.74.3': + resolution: {integrity: sha512-QrycUn0wxjVPzITvQvOxFRdhlAwIoOQSuav7qWD4SWCoKCdLbyRZ2vji2GuBq/glaxbF4wBx3fqcYRDOt8KDTA==} + peerDependencies: + react: ^18 || ^19 - create-require@1.1.1: - resolution: {integrity: sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ==} + '@tootallnate/quickjs-emscripten@0.23.0': + resolution: {integrity: sha512-C5Mc6rdnsaJDjO3UpGW/CQTHtCKaYlScZTly4JIu97Jxo/odCiH0ITnDXSJPTOrEKk/ycSZ0AOgTmkDtkOsvIA==} - cross-spawn@7.0.6: - resolution: {integrity: sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==} - engines: {node: '>= 8'} + '@tsconfig/node10@1.0.11': + resolution: {integrity: sha512-DcRjDCujK/kCk/cUe8Xz8ZSpm8mS3mNNpta+jGCA6USEDfktlNvm1+IuZ9eTcDbNk41BHwpHHeW+N1lKCz4zOw==} - csstype@3.1.3: - resolution: {integrity: sha512-M1uQkMl8rQK/szD0LNhtqxIPLpimGm8sOBwU7lLnCpSbTyY3yeU1Vc7l4KT5zT4s/yOxHH5O7tIuuLOCnLADRw==} + '@tsconfig/node12@1.0.11': + resolution: {integrity: sha512-cqefuRsh12pWyGsIoBKJA9luFu3mRxCA+ORZvA4ktLSzIuCUtWVxGIuXigEwO5/ywWFMZ2QEGKWvkZG1zDMTag==} - data-uri-to-buffer@6.0.2: - resolution: {integrity: sha512-7hvf7/GW8e86rW0ptuwS3OcBGDjIi6SZva7hCyWC0yYry2cOPmLIjXAUHI6DK2HsnwJd9ifmt57i8eV2n4YNpw==} - engines: {node: '>= 14'} + '@tsconfig/node14@1.0.3': + resolution: {integrity: sha512-ysT8mhdixWK6Hw3i1V2AeRqZ5WfXg1G43mqoYlM2nc6388Fq5jcXyr5mRsqViLx/GJYdoL0bfXD8nmF+Zn/Iow==} - data-view-buffer@1.0.1: - resolution: {integrity: sha512-0lht7OugA5x3iJLOWFhWK/5ehONdprk0ISXqVFn/NFrDu+cuc8iADFrGQz5BnRK7LLU3JmkbXSxaqX+/mXYtUA==} - engines: {node: '>= 0.4'} + '@tsconfig/node16@1.0.4': + resolution: {integrity: sha512-vxhUy4J8lyeyinH7Azl1pdd43GJhZH/tP2weN8TntQblOY+A0XbT8DJk1/oCPuOOyg/Ja757rG0CgHcWC8OfMA==} - data-view-byte-length@1.0.1: - resolution: {integrity: sha512-4J7wRJD3ABAzr8wP+OcIcqq2dlUKp4DVflx++hs5h5ZKydWMI6/D/fAot+yh6g2tHh8fLFTvNOaVN357NvSrOQ==} - engines: {node: '>= 0.4'} + '@turbo/gen@1.13.4': + resolution: {integrity: sha512-PK38N1fHhDUyjLi0mUjv0RbX0xXGwDLQeRSGsIlLcVpP1B5fwodSIwIYXc9vJok26Yne94BX5AGjueYsUT3uUw==} + hasBin: true - data-view-byte-offset@1.0.0: - resolution: {integrity: sha512-t/Ygsytq+R995EJ5PZlD4Cu56sWa8InXySaViRzw9apusqsOO2bQP+SbYzAhR0pFKoB+43lYy8rWban9JSuXnA==} - engines: {node: '>= 0.4'} - - date-fns@2.30.0: - resolution: {integrity: sha512-fnULvOpxnC5/Vg3NCiWelDsLiUc9bRwAPs/+LfTLNvetFCtCTN+yQz15C/fs4AwX1R9K5GLtLfn8QW+dWisaAw==} - engines: {node: '>=0.11'} - - debug@4.3.7: - resolution: {integrity: sha512-Er2nc/H7RrMXZBFCEim6TCmMk02Z8vLC2Rbi1KEBggpo0fS6l0S1nnapwmIi3yW/+GOJap1Krg4w0Hg80oCqgQ==} - engines: {node: '>=6.0'} - peerDependencies: - supports-color: '*' - peerDependenciesMeta: - supports-color: - optional: true - - dedent@1.5.3: - resolution: {integrity: sha512-NHQtfOOW68WD8lgypbLA5oT+Bt0xXJhiYvoR6SmmNXZfpzOGXwdKWmcwG8N7PwVVWV3eF/68nmD9BaJSsTBhyQ==} - peerDependencies: - babel-plugin-macros: ^3.1.0 - peerDependenciesMeta: - babel-plugin-macros: - optional: true - - deep-extend@0.6.0: - resolution: {integrity: sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==} - engines: {node: '>=4.0.0'} - - deep-is@0.1.4: - resolution: {integrity: sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==} - - deepmerge@4.3.1: - resolution: {integrity: sha512-3sUqbMEc77XqpdNO7FRyRog+eW3ph+GYCbj+rK+uYyRMuwsVy0rMiVtPn+QJlKFvWP/1PYpapqYn0Me2knFn+A==} - engines: {node: '>=0.10.0'} + '@turbo/workspaces@1.13.4': + resolution: {integrity: sha512-3uYg2b5TWCiupetbDFMbBFMHl33xQTvp5DNg0fZSYal73Z9AlFH9yWabHWMYw6ywmwM1evkYRpTVA2n7GgqT5A==} + hasBin: true - defaults@1.0.4: - resolution: {integrity: sha512-eFuaLoy/Rxalv2kr+lqMlUnrDWV+3j4pljOIJgLIhI058IQfWJ7vXhyEIHu+HtC738klGALYxOKDO0bQP3tg8A==} + '@types/babel__core@7.20.5': + resolution: {integrity: sha512-qoQprZvz5wQFJwMDqeseRXWv3rqMvhgpbXFfVyWhbx9X47POIA6i/+dXefEmZKoAgOaTdaIgNSMqMIU61yRyzA==} - define-data-property@1.1.4: - resolution: {integrity: sha512-rBMvIzlpA8v6E+SJZoo++HAYqsLrkg7MSfIinMPFhmkorw7X+dOXVJQs+QT69zGkzMyfDnIMN2Wid1+NbL3T+A==} - engines: {node: '>= 0.4'} + '@types/babel__generator@7.6.8': + resolution: {integrity: sha512-ASsj+tpEDsEiFr1arWrlN6V3mdfjRMZt6LtK/Vp/kreFLnr5QH5+DhvD5nINYZXzwJvXeGq+05iUXcAzVrqWtw==} - define-properties@1.2.1: - resolution: {integrity: sha512-8QmQKqEASLd5nx0U1B1okLElbUuuttJ/AnYmRXbbbGDWh6uS208EjD4Xqq/I9wK7u0v6O08XhTWnt5XtEbR6Dg==} - engines: {node: '>= 0.4'} + '@types/babel__template@7.4.4': + resolution: {integrity: sha512-h/NUaSyG5EyxBIp8YRxo4RMe2/qQgvyowRwVMzhYhBCONbW8PUsg4lkFMrhgZhUe5z3L3MiLDuvyJ/CaPa2A8A==} - degenerator@5.0.1: - resolution: {integrity: sha512-TllpMR/t0M5sqCXfj85i4XaAzxmS5tVA16dqvdkMwGmzI+dXLXnw3J+3Vdv7VKw+ThlTMboK6i9rnZ6Nntj5CQ==} - engines: {node: '>= 14'} + '@types/babel__traverse@7.20.6': + resolution: {integrity: sha512-r1bzfrm0tomOI8g1SzvCaQHo6Lcv6zu0EA+W2kHrt8dyrHQxGzBBL4kdkzIS+jBMV+EYcMAEAqXqYaLJq5rOZg==} - del@5.1.0: - resolution: {integrity: sha512-wH9xOVHnczo9jN2IW68BabcecVPxacIA3g/7z6vhSU/4stOKQzeCRK0yD0A24WiAAUJmmVpWqrERcTxnLo3AnA==} - engines: {node: '>=8'} + '@types/cookie@0.6.0': + resolution: {integrity: sha512-4Kh9a6B2bQciAhf7FSuMRRkUWecJgJu9nPnx3yzpsfXX/c50REIqpHY4C82bXP90qrLtXtkDxTZosYO3UpOwlA==} - detect-indent@6.1.0: - resolution: {integrity: sha512-reYkTUJAZb9gUuZ2RvVCNhVHdg62RHnJ7WJl8ftMi4diZ6NWlciOzQN88pUhSELEwflJht4oQDv0F0BMlwaYtA==} - engines: {node: '>=8'} + '@types/debug@4.1.12': + resolution: {integrity: sha512-vIChWdVG3LG1SMxEvI/AK+FWJthlrqlTu7fbrlywTkkaONwk/UAGaULXRlf8vkzFBLVm0zkMdCquhL5aOjhXPQ==} - detect-libc@2.0.3: - resolution: {integrity: sha512-bwy0MGW55bG41VqxxypOsdSdGqLwXPI/focwgTYCFMbdUiBAxLg9CFzG08sz2aqzknwiX7Hkl0bQENjg8iLByw==} - engines: {node: '>=8'} + '@types/estree@1.0.6': + resolution: {integrity: sha512-AYnb1nQyY49te+VRAVgmzfcgjYS91mY5P0TKUDCLEM+gNnA+3T6rWITXRLYCpahpqSQbN5cE+gHpnPyXjHWxcw==} - detect-newline@3.1.0: - resolution: {integrity: sha512-TLz+x/vEXm/Y7P7wn1EJFNLxYpUD4TgMosxY6fAVJUnJMbupHBOncxyWUG9OpTaH9EBD7uFI5LfEgmMOc54DsA==} - engines: {node: '>=8'} + '@types/estree@1.0.7': + resolution: {integrity: sha512-w28IoSUCJpidD/TGviZwwMJckNESJZXFu7NBZ5YJ4mEUnNraUn9Pm8HSZm/jDF1pDWYKspWE7oVphigUPRakIQ==} - diff-sequences@29.6.3: - resolution: {integrity: sha512-EjePK1srD3P08o2j4f0ExnylqRs5B9tJjcp9t1krH2qRi8CCdsYfwe9JgSLurFBWwq4uOlipzfk5fHNvwFKr8Q==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + '@types/glob@7.2.0': + resolution: {integrity: sha512-ZUxbzKl0IfJILTS6t7ip5fQQM/J3TJYubDm3nMbgubNNYS62eXeUpoLUC8/7fJNiFYHTrGPQn7hspDUzIHX3UA==} - diff@4.0.2: - resolution: {integrity: sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==} - engines: {node: '>=0.3.1'} + '@types/graceful-fs@4.1.9': + resolution: {integrity: sha512-olP3sd1qOEe5dXTSaFvQG+02VdRXcdytWLAZsAq1PecU8uqQAhkrnbli7DagjtXKW/Bl7YJbUsa8MPcuc8LHEQ==} - dir-glob@3.0.1: - resolution: {integrity: sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==} - engines: {node: '>=8'} + '@types/inquirer@6.5.0': + resolution: {integrity: sha512-rjaYQ9b9y/VFGOpqBEXRavc3jh0a+e6evAbI31tMda8VlPaSy0AZJfXsvmIe3wklc7W6C3zCSfleuMXR7NOyXw==} - doctrine@2.1.0: - resolution: {integrity: sha512-35mSku4ZXK0vfCuHEDAwt55dg2jNajHZ1odvF+8SSr82EsZY4QmXfuWso8oEd8zRhVObSN18aM0CjSdoBX7zIw==} - engines: {node: '>=0.10.0'} + '@types/istanbul-lib-coverage@2.0.6': + resolution: {integrity: sha512-2QF/t/auWm0lsy8XtKVPG19v3sSOQlJe/YHZgfjb/KBBHOGSV+J2q/S671rcq9uTBrLAXmZpqJiaQbMT+zNU1w==} - dot-case@2.1.1: - resolution: {integrity: sha512-HnM6ZlFqcajLsyudHq7LeeLDr2rFAVYtDv/hV5qchQEidSck8j9OPUsXY9KwJv/lHMtYlX4DjRQqwFYa+0r8Ug==} + '@types/istanbul-lib-report@3.0.3': + resolution: {integrity: sha512-NQn7AHQnk/RSLOxrBbGyJM/aVQ+pjj5HCgasFxc0K/KhoATfQ/47AyUl15I2yBUpihjmas+a+VJBOqecrFH+uA==} - dotenv@16.0.3: - resolution: {integrity: sha512-7GO6HghkA5fYG9TYnNxi14/7K9f5occMlp3zXAuSxn7CKCxt9xbNWG7yF8hTCSUchlfWSe3uLmlPfigevRItzQ==} - engines: {node: '>=12'} + '@types/istanbul-reports@3.0.4': + resolution: {integrity: sha512-pk2B1NWalF9toCRu6gjBzR69syFjP4Od8WRAX+0mmf9lAjCRicLOWc+ZrxZHx/0XRjotgkF9t6iaMJ+aXcOdZQ==} - dotenv@16.4.7: - resolution: {integrity: sha512-47qPchRCykZC03FhkYAhrvwU4xDBFIj1QPqaarj6mdM/hgUzfPHcpkHJOn3mJAufFeeAxAzeGsr5X0M4k6fLZQ==} - engines: {node: '>=12'} + '@types/jest@29.5.14': + resolution: {integrity: sha512-ZN+4sdnLUbo8EVvVc2ao0GFW6oVrQRPn4K2lglySj7APvSrgzxHiNNK99us4WDMi57xxA2yggblIAMNhXOotLQ==} - ejs@3.1.10: - resolution: {integrity: sha512-UeJmFfOrAQS8OJWPZ4qtgHyWExa088/MtK5UEyoJGFH67cDEXkZSviOiKRCZ4Xij0zxI3JECgYs3oKx+AizQBA==} - engines: {node: '>=0.10.0'} - hasBin: true + '@types/json-schema@7.0.15': + resolution: {integrity: sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==} - electron-to-chromium@1.5.108: - resolution: {integrity: sha512-tiGxpQmvXBEzrfU5ertmbCV/nG5yqCkC1G4T1SIKP335Y5rjXzPWmijR6XcoGXZvVoo4dknfdNe4Tl7lcIROLg==} + '@types/minimatch@5.1.2': + resolution: {integrity: sha512-K0VQKziLUWkVKiRVrx4a40iPaxTUefQmjtkQofBkYRcoaaL/8rhwDWww9qWbrgicNOgnpIsMxyNIUM4+n6dUIA==} - emittery@0.13.1: - resolution: {integrity: sha512-DeWwawk6r5yR9jFgnDKYt4sLS0LmHJJi3ZOnb5/JdbYwj3nW+FxQnHIjhBKz8YLC7oRNPVM9NQ47I3CVx34eqQ==} - engines: {node: '>=12'} + '@types/ms@2.1.0': + resolution: {integrity: sha512-GsCCIZDE/p3i96vtEqx+7dBUGXrc7zeSK3wwPHIaRThS+9OhWIXRqzs4d6k1SVU8g91DrNRWxWUGhp5KXQb2VA==} - emoji-regex@8.0.0: - resolution: {integrity: sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==} + '@types/node@12.20.55': + resolution: {integrity: sha512-J8xLz7q2OFulZ2cyGTLE1TbbZcjpno7FaN6zdJNrgAdrJ+DZzh/uFR6YrTb4C+nXakvud8Q4+rbhoIWlYQbUFQ==} - enquirer@2.4.1: - resolution: {integrity: sha512-rRqJg/6gd538VHvR3PSrdRBb/1Vy2YfzHqzvbhGIQpDRKIa4FgV/54b5Q1xYSxOOwKvjXweS26E0Q+nAMwp2pQ==} - engines: {node: '>=8.6'} + '@types/node@20.17.6': + resolution: {integrity: sha512-VEI7OdvK2wP7XHnsuXbAJnEpEkF6NjSN45QJlL4VGqZSXsnicpesdTWsg9RISeSdYd3yeRj/y3k5KGjUXYnFwQ==} - error-ex@1.3.2: - resolution: {integrity: sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==} + '@types/node@22.13.9': + resolution: {integrity: sha512-acBjXdRJ3A6Pb3tqnw9HZmyR3Fiol3aGxRCK1x3d+6CDAMjl7I649wpSd+yNURCjbOUGu9tqtLKnTGxmK6CyGw==} - es-abstract@1.23.5: - resolution: {integrity: sha512-vlmniQ0WNPwXqA0BnmwV3Ng7HxiGlh6r5U6JcTMNx8OilcAGqVJBHJcPjqOMaczU9fRuRK5Px2BdVyPRnKMMVQ==} - engines: {node: '>= 0.4'} + '@types/node@22.7.5': + resolution: {integrity: sha512-jML7s2NAzMWc//QSJ1a3prpk78cOPchGvXJsC3C6R6PSMoooztvRVQEz89gmBTBY1SPMaqo5teB4uNHPdetShQ==} - es-define-property@1.0.0: - resolution: {integrity: sha512-jxayLKShrEqqzJ0eumQbVhTYQM27CfT1T35+gCgDFoL82JLsXqTJ76zv6A0YLOgEnLUMvLzsDsGIrl8NFpT2gQ==} - engines: {node: '>= 0.4'} + '@types/prop-types@15.7.13': + resolution: {integrity: sha512-hCZTSvwbzWGvhqxp/RqVqwU999pBf2vp7hzIjiYOsl8wqOmUxkQ6ddw1cV3l8811+kdUFus/q4d1Y3E3SyEifA==} - es-errors@1.3.0: - resolution: {integrity: sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==} - engines: {node: '>= 0.4'} + '@types/react-dom@18.3.0': + resolution: {integrity: sha512-EhwApuTmMBmXuFOikhQLIBUn6uFg81SwLMOAUgodJF14SOBOCMdU04gDoYi0WOJJHD144TL32z4yDqCW3dnkQg==} - es-iterator-helpers@1.2.0: - resolution: {integrity: sha512-tpxqxncxnpw3c93u8n3VOzACmRFoVmWJqbWXvX/JfKbkhBw1oslgPrUfeSt2psuqyEJFD6N/9lg5i7bsKpoq+Q==} - engines: {node: '>= 0.4'} + '@types/react-dom@18.3.1': + resolution: {integrity: sha512-qW1Mfv8taImTthu4KoXgDfLuk4bydU6Q/TkADnDWWHwi4NX4BR+LWfTp2sVmTqRrsHvyDDTelgelxJ+SsejKKQ==} - es-object-atoms@1.0.0: - resolution: {integrity: sha512-MZ4iQ6JwHOBQjahnjwaC1ZtIBH+2ohjamzAO3oaHcXYup7qxjF2fixyH+Q71voWHeOkI2q/TnJao/KfXYIZWbw==} - engines: {node: '>= 0.4'} + '@types/react-dom@19.1.2': + resolution: {integrity: sha512-XGJkWF41Qq305SKWEILa1O8vzhb3aOo3ogBlSmiqNko/WmRb6QIaweuZCXjKygVDXpzXb5wyxKTSOsmkuqj+Qw==} + peerDependencies: + '@types/react': ^19.0.0 - es-set-tostringtag@2.0.3: - resolution: {integrity: sha512-3T8uNMC3OQTHkFUsFq8r/BwAXLHvU/9O9mE0fBc/MY5iq/8H7ncvO947LmYA6ldWw9Uh8Yhf25zu6n7nML5QWQ==} - engines: {node: '>= 0.4'} + '@types/react@18.3.0': + resolution: {integrity: sha512-DiUcKjzE6soLyln8NNZmyhcQjVv+WsUIFSqetMN0p8927OztKT4VTfFTqsbAi5oAGIcgOmOajlfBqyptDDjZRw==} - es-shim-unscopables@1.0.2: - resolution: {integrity: sha512-J3yBRXCzDu4ULnQwxyToo/OjdMx6akgVC7K6few0a7F/0wLtmKKN7I73AH5T2836UuXRqN7Qg+IIUw/+YJksRw==} + '@types/react@18.3.1': + resolution: {integrity: sha512-V0kuGBX3+prX+DQ/7r2qsv1NsdfnCLnTgnRJ1pYnxykBhGMz+qj+box5lq7XsO5mtZsBqpjwwTu/7wszPfMBcw==} - es-to-primitive@1.2.1: - resolution: {integrity: sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA==} - engines: {node: '>= 0.4'} + '@types/react@19.1.2': + resolution: {integrity: sha512-oxLPMytKchWGbnQM9O7D67uPa9paTNxO7jVoNMXgkkErULBPhPARCfkKL9ytcIJJRGjbsVwW4ugJzyFFvm/Tiw==} - esbuild@0.24.2: - resolution: {integrity: sha512-+9egpBW8I3CD5XPe0n6BfT5fxLzxrlDzqydF3aviG+9ni1lDC/OvMHcxqEFV0+LANZG5R1bFMWfUrjVsdwxJvA==} - engines: {node: '>=18'} - hasBin: true + '@types/stack-utils@2.0.3': + resolution: {integrity: sha512-9aEbYZ3TbYMznPdcdr3SmIrLXwC/AKZXQeCf9Pgao5CKb8CyHuEX5jzWPTkvregvhRJHcpRO6BFoGW9ycaOkYw==} - escalade@3.2.0: - resolution: {integrity: sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==} - engines: {node: '>=6'} + '@types/through@0.0.33': + resolution: {integrity: sha512-HsJ+z3QuETzP3cswwtzt2vEIiHBk/dCcHGhbmG5X3ecnwFD/lPrMpliGXxSCg03L9AhrdwA4Oz/qfspkDW+xGQ==} - escape-string-regexp@1.0.5: - resolution: {integrity: sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==} - engines: {node: '>=0.8.0'} + '@types/tinycolor2@1.4.6': + resolution: {integrity: sha512-iEN8J0BoMnsWBqjVbWH/c0G0Hh7O21lpR2/+PrvAVgWdzL7eexIFm4JN/Wn10PTcmNdtS6U67r499mlWMXOxNw==} - escape-string-regexp@2.0.0: - resolution: {integrity: sha512-UpzcLCXolUWcNu5HtVMHYdXJjArjsF9C0aNnquZYY4uW/Vu0miy5YoWvbV345HauVvcAUnpRuhMMcqTcGOY2+w==} - engines: {node: '>=8'} + '@types/trusted-types@2.0.7': + resolution: {integrity: sha512-ScaPdn1dQczgbl0QFTeTOmVHFULt394XJgOQNoyVhZ6r2vLnMLJfBPd53SB52T/3G36VI1/g2MZaX0cwDuXsfw==} - escape-string-regexp@4.0.0: - resolution: {integrity: sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==} - engines: {node: '>=10'} + '@types/yargs-parser@21.0.3': + resolution: {integrity: sha512-I4q9QU9MQv4oEOz4tAHJtNz1cwuLxn2F3xcc2iV5WdqLPpUnj30aUuxt1mAxYTG+oe8CZMV/+6rU4S4gRDzqtQ==} - escodegen@2.1.0: - resolution: {integrity: sha512-2NlIDTwUWJN0mRPQOdtQBzbUHvdGY2P1VXSyU83Q3xKxM7WHX2Ql8dKq782Q9TgQUNOLEzEYu9bzLNj1q88I5w==} - engines: {node: '>=6.0'} - hasBin: true + '@types/yargs@17.0.33': + resolution: {integrity: sha512-WpxBCKWPLr4xSsHgz511rFJAM+wS28w2zEO1QDNY5zM/S8ok70NNfztH0xwhqKyaK0OHCbN98LDAZuy1ctxDkA==} - eslint-config-prettier@9.1.0: - resolution: {integrity: sha512-NSWl5BFQWEPi1j4TjVNItzYV7dZXZ+wP6I6ZhrBGpChQhZRUaElihE9uRRkcbRnNb76UMKDF3r+WTmNcGPKsqw==} - hasBin: true + '@typescript-eslint/eslint-plugin@8.15.0': + resolution: {integrity: sha512-+zkm9AR1Ds9uLWN3fkoeXgFppaQ+uEVtfOV62dDmsy9QCNqlRHWNEck4yarvRNrvRcHQLGfqBNui3cimoz8XAg==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: - eslint: '>=7.0.0' - - eslint-plugin-only-warn@1.1.0: - resolution: {integrity: sha512-2tktqUAT+Q3hCAU0iSf4xAN1k9zOpjK5WO8104mB0rT/dGhOa09582HN5HlbxNbPRZ0THV7nLGvzugcNOSjzfA==} - engines: {node: '>=6'} + '@typescript-eslint/parser': ^8.0.0 || ^8.0.0-alpha.0 + eslint: ^8.57.0 || ^9.0.0 + typescript: '*' + peerDependenciesMeta: + typescript: + optional: true - eslint-plugin-react-hooks@5.0.0: - resolution: {integrity: sha512-hIOwI+5hYGpJEc4uPRmz2ulCjAGD/N13Lukkh8cLV0i2IRk/bdZDYjgLVHj+U9Z704kLIdIO6iueGvxNur0sgw==} - engines: {node: '>=10'} + '@typescript-eslint/eslint-plugin@8.30.1': + resolution: {integrity: sha512-v+VWphxMjn+1t48/jO4t950D6KR8JaJuNXzi33Ve6P8sEmPr5k6CEXjdGwT6+LodVnEa91EQCtwjWNUCPweo+Q==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: - eslint: ^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0-0 || ^9.0.0 + '@typescript-eslint/parser': ^8.0.0 || ^8.0.0-alpha.0 + eslint: ^8.57.0 || ^9.0.0 + typescript: '>=4.8.4 <5.9.0' - eslint-plugin-react@7.37.2: - resolution: {integrity: sha512-EsTAnj9fLVr/GZleBLFbj/sSuXeWmp1eXIN60ceYnZveqEaUCyW4X+Vh4WTdUhCkW4xutXYqTXCUSyqD4rB75w==} - engines: {node: '>=4'} + '@typescript-eslint/parser@8.15.0': + resolution: {integrity: sha512-7n59qFpghG4uazrF9qtGKBZXn7Oz4sOMm8dwNWDQY96Xlm2oX67eipqcblDj+oY1lLCbf1oltMZFpUso66Kl1A==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: - eslint: ^3 || ^4 || ^5 || ^6 || ^7 || ^8 || ^9.7 + eslint: ^8.57.0 || ^9.0.0 + typescript: '*' + peerDependenciesMeta: + typescript: + optional: true - eslint-plugin-turbo@2.3.1: - resolution: {integrity: sha512-M5MBYBkcQsv11MFHJ+6WpzLpiTBx0OApeUMAHlO4L0eHqQxY03GrmHXjXfozqB+9HwGrW9fqihBzVRllyixJDA==} + '@typescript-eslint/parser@8.30.1': + resolution: {integrity: sha512-H+vqmWwT5xoNrXqWs/fesmssOW70gxFlgcMlYcBaWNPIEWDgLa4W9nkSPmhuOgLnXq9QYgkZ31fhDyLhleCsAg==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: - eslint: '>6.6.0' + eslint: ^8.57.0 || ^9.0.0 + typescript: '>=4.8.4 <5.9.0' - eslint-scope@8.2.0: - resolution: {integrity: sha512-PHlWUfG6lvPc3yvP5A4PNyBL1W8fkDUccmI21JUu/+GKZBoH/W5u6usENXUrWFRsyoW5ACUjFGgAFQp5gUlb/A==} + '@typescript-eslint/scope-manager@8.15.0': + resolution: {integrity: sha512-QRGy8ADi4J7ii95xz4UoiymmmMd/zuy9azCaamnZ3FM8T5fZcex8UfJcjkiEZjJSztKfEBe3dZ5T/5RHAmw2mA==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - eslint-visitor-keys@3.4.3: - resolution: {integrity: sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==} - engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} - - eslint-visitor-keys@4.2.0: - resolution: {integrity: sha512-UyLnSehNt62FFhSwjZlHmeokpRK59rcz29j+F1/aDgbkbRTk7wIc9XzdoasMUbRNKDM0qQt/+BJ4BrpFeABemw==} + '@typescript-eslint/scope-manager@8.30.1': + resolution: {integrity: sha512-+C0B6ChFXZkuaNDl73FJxRYT0G7ufVPOSQkqkpM/U198wUwUFOtgo1k/QzFh1KjpBitaK7R1tgjVz6o9HmsRPg==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - eslint@9.15.0: - resolution: {integrity: sha512-7CrWySmIibCgT1Os28lUU6upBshZ+GxybLOrmRzi08kS8MBuO8QA7pXEgYgY5W8vK3e74xv0lpjo9DbaGU9Rkw==} + '@typescript-eslint/type-utils@8.15.0': + resolution: {integrity: sha512-UU6uwXDoI3JGSXmcdnP5d8Fffa2KayOhUUqr/AiBnG1Gl7+7ut/oyagVeSkh7bxQ0zSXV9ptRh/4N15nkCqnpw==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - hasBin: true peerDependencies: - jiti: '*' + eslint: ^8.57.0 || ^9.0.0 + typescript: '*' peerDependenciesMeta: - jiti: + typescript: optional: true - espree@10.3.0: - resolution: {integrity: sha512-0QYC8b24HWY8zjRnDTL6RiHfDbAWn63qb4LMj1Z4b076A4une81+z03Kg7l7mn/48PUTqoLptSXez8oknU8Clg==} + '@typescript-eslint/type-utils@8.30.1': + resolution: {integrity: sha512-64uBF76bfQiJyHgZISC7vcNz3adqQKIccVoKubyQcOnNcdJBvYOILV1v22Qhsw3tw3VQu5ll8ND6hycgAR5fEA==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + peerDependencies: + eslint: ^8.57.0 || ^9.0.0 + typescript: '>=4.8.4 <5.9.0' - esprima@4.0.1: - resolution: {integrity: sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==} - engines: {node: '>=4'} - hasBin: true - - esquery@1.6.0: - resolution: {integrity: sha512-ca9pw9fomFcKPvFLXhBKUK90ZvGibiGOvRJNbjljY7s7uq/5YO4BOzcYtJqExdx99rF6aAcnRxHmcUHcz6sQsg==} - engines: {node: '>=0.10'} + '@typescript-eslint/types@8.15.0': + resolution: {integrity: sha512-n3Gt8Y/KyJNe0S3yDCD2RVKrHBC4gTUcLTebVBXacPy091E6tNspFLKRXlk3hwT4G55nfr1n2AdFqi/XMxzmPQ==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - esrecurse@4.3.0: - resolution: {integrity: sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==} - engines: {node: '>=4.0'} + '@typescript-eslint/types@8.30.1': + resolution: {integrity: sha512-81KawPfkuulyWo5QdyG/LOKbspyyiW+p4vpn4bYO7DM/hZImlVnFwrpCTnmNMOt8CvLRr5ojI9nU1Ekpw4RcEw==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - estraverse@5.3.0: - resolution: {integrity: sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==} - engines: {node: '>=4.0'} + '@typescript-eslint/typescript-estree@8.15.0': + resolution: {integrity: sha512-1eMp2JgNec/niZsR7ioFBlsh/Fk0oJbhaqO0jRyQBMgkz7RrFfkqF9lYYmBoGBaSiLnu8TAPQTwoTUiSTUW9dg==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + peerDependencies: + typescript: '*' + peerDependenciesMeta: + typescript: + optional: true - esutils@2.0.3: - resolution: {integrity: sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==} - engines: {node: '>=0.10.0'} + '@typescript-eslint/typescript-estree@8.30.1': + resolution: {integrity: sha512-kQQnxymiUy9tTb1F2uep9W6aBiYODgq5EMSk6Nxh4Z+BDUoYUSa029ISs5zTzKBFnexQEh71KqwjKnRz58lusQ==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + peerDependencies: + typescript: '>=4.8.4 <5.9.0' - eventemitter3@5.0.1: - resolution: {integrity: sha512-GWkBvjiSZK87ELrYOSESUYeVIc9mvLLf/nXalMOS5dYrgZq9o5OVkbZAVM06CVxYsCwH9BDZFPlQTlPA1j4ahA==} + '@typescript-eslint/utils@8.15.0': + resolution: {integrity: sha512-k82RI9yGhr0QM3Dnq+egEpz9qB6Un+WLYhmoNcvl8ltMEededhh7otBVVIDDsEEttauwdY/hQoSsOv13lxrFzQ==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + peerDependencies: + eslint: ^8.57.0 || ^9.0.0 + typescript: '*' + peerDependenciesMeta: + typescript: + optional: true - execa@5.1.1: - resolution: {integrity: sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg==} - engines: {node: '>=10'} + '@typescript-eslint/utils@8.30.1': + resolution: {integrity: sha512-T/8q4R9En2tcEsWPQgB5BQ0XJVOtfARcUvOa8yJP3fh9M/mXraLxZrkCfGb6ChrO/V3W+Xbd04RacUEqk1CFEQ==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + peerDependencies: + eslint: ^8.57.0 || ^9.0.0 + typescript: '>=4.8.4 <5.9.0' - exit@0.1.2: - resolution: {integrity: sha512-Zk/eNKV2zbjpKzrsQ+n1G6poVbErQxJ0LBOJXaKZ1EViLzH+hrLu9cdXI4zw9dBQJslwBEpbQ2P1oS7nDxs6jQ==} - engines: {node: '>= 0.8.0'} + '@typescript-eslint/visitor-keys@8.15.0': + resolution: {integrity: sha512-h8vYOulWec9LhpwfAdZf2bjr8xIp0KNKnpgqSz0qqYYKAW/QZKw3ktRndbiAtUz4acH4QLQavwZBYCc0wulA/Q==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - expect@29.7.0: - resolution: {integrity: sha512-2Zks0hf1VLFYI1kbh0I5jP3KHHyCHpkfyHBzsSXRFgl/Bg9mWYfMW8oD+PdMPlEwy5HNsR9JutYy6pMeOh61nw==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + '@typescript-eslint/visitor-keys@8.30.1': + resolution: {integrity: sha512-aEhgas7aJ6vZnNFC7K4/vMGDGyOiqWcYZPpIWrTKuTAlsvDNKy2GFDqh9smL+iq069ZvR0YzEeq0B8NJlLzjFA==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - extendable-error@0.1.7: - resolution: {integrity: sha512-UOiS2in6/Q0FK0R0q6UY9vYpQ21mr/Qn1KOnte7vsACuNJf514WvCCUHSRCPcgjPT2bAhNIJdlE6bVap1GKmeg==} + '@vitejs/plugin-react@4.3.4': + resolution: {integrity: sha512-SCCPBJtYLdE8PX/7ZQAs1QAZ8Jqwih+0VBLum1EGqmCCQal+MIUqLCzj3ZUy8ufbC0cAM4LRlSTm7IQJwWT4ug==} + engines: {node: ^14.18.0 || >=16.0.0} + peerDependencies: + vite: ^4.2.0 || ^5.0.0 || ^6.0.0 - external-editor@3.1.0: - resolution: {integrity: sha512-hMQ4CX1p1izmuLYyZqLMO/qGNw10wSv9QDCPfzXfyFrOaCSSoRfqE1Kf1s5an66J5JZC62NewG+mK49jOCtQew==} - engines: {node: '>=4'} + '@wagmi/connectors@5.7.12': + resolution: {integrity: sha512-pLFuZ1PsLkNyY11mx0+IOrMM7xACWCBRxaulfX17osqixkDFeOAyqFGBjh/XxkvRyrDJUdO4F+QHEeSoOiPpgg==} + peerDependencies: + '@wagmi/core': 2.16.7 + typescript: '>=5.0.4' + viem: 2.x + peerDependenciesMeta: + typescript: + optional: true - fast-deep-equal@3.1.3: - resolution: {integrity: sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==} + '@wagmi/core@2.16.7': + resolution: {integrity: sha512-Kpgrw6OXV0VBhDs4toQVKQ0NK5yUO6uxEqnvRGjNjbO85d93Gbfsp5BlxSLeWq6iVMSBFSitdl5i9W7b1miq1g==} + peerDependencies: + '@tanstack/query-core': '>=5.0.0' + typescript: '>=5.0.4' + viem: 2.x + peerDependenciesMeta: + '@tanstack/query-core': + optional: true + typescript: + optional: true - fast-glob@3.3.1: - resolution: {integrity: sha512-kNFPyjhh5cKjrUltxs+wFx+ZkbRaxxmZ+X0ZU31SOsxCEtP9VPgtq2teZw1DebupL5GmDaNQ6yKMMVcM41iqDg==} - engines: {node: '>=8.6.0'} + '@walletconnect/core@2.19.2': + resolution: {integrity: sha512-iu0mgLj51AXcKpdNj8+4EdNNBd/mkNjLEhZn6UMc/r7BM9WbmpPMEydA39WeRLbdLO4kbpmq4wTbiskI1rg+HA==} + engines: {node: '>=18'} - fast-glob@3.3.2: - resolution: {integrity: sha512-oX2ruAFQwf/Orj8m737Y5adxDQO0LAB7/S5MnxCdTNDd4p6BsyIVsv9JQsATbTSq8KHRpLwIHbVlUNatxd+1Ow==} - engines: {node: '>=8.6.0'} + '@walletconnect/environment@1.0.1': + resolution: {integrity: sha512-T426LLZtHj8e8rYnKfzsw1aG6+M0BT1ZxayMdv/p8yM0MU+eJDISqNY3/bccxRr4LrF9csq02Rhqt08Ibl0VRg==} - fast-json-stable-stringify@2.1.0: - resolution: {integrity: sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==} + '@walletconnect/ethereum-provider@2.19.2': + resolution: {integrity: sha512-NzPzNcjMLqow6ha2nssB1ciMD0cdHZesYcHSQKjCi9waIDMov9Fr2yEJccbiVFE3cxek7f9dCPsoZez2q8ihvg==} - fast-levenshtein@2.0.6: - resolution: {integrity: sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==} + '@walletconnect/events@1.0.1': + resolution: {integrity: sha512-NPTqaoi0oPBVNuLv7qPaJazmGHs5JGyO8eEAk5VGKmJzDR7AHzD4k6ilox5kxk1iwiOnFopBOOMLs86Oa76HpQ==} - fastq@1.17.1: - resolution: {integrity: sha512-sRVD3lWVIXWg6By68ZN7vho9a1pQcN/WBFaAAsDDFzlJjvoGx0P8z7V1t72grFJfJhu3YPZBuu25f7Kaw2jN1w==} + '@walletconnect/heartbeat@1.2.2': + resolution: {integrity: sha512-uASiRmC5MwhuRuf05vq4AT48Pq8RMi876zV8rr8cV969uTOzWdB/k+Lj5yI2PBtB1bGQisGen7MM1GcZlQTBXw==} - fb-watchman@2.0.2: - resolution: {integrity: sha512-p5161BqbuCaSnB8jIbzQHOlpgsPmK5rJVDfDKO91Axs5NC1uu3HRQm6wt9cd9/+GtQQIO53JdGXXoyDpTAsgYA==} + '@walletconnect/jsonrpc-http-connection@1.0.8': + resolution: {integrity: sha512-+B7cRuaxijLeFDJUq5hAzNyef3e3tBDIxyaCNmFtjwnod5AGis3RToNqzFU33vpVcxFhofkpE7Cx+5MYejbMGw==} - figures@3.2.0: - resolution: {integrity: sha512-yaduQFRKLXYOGgEn6AZau90j3ggSOyiqXU0F9JZfeXYhNa+Jk4X+s45A2zg5jns87GAFa34BBm2kXw4XpNcbdg==} - engines: {node: '>=8'} + '@walletconnect/jsonrpc-provider@1.0.14': + resolution: {integrity: sha512-rtsNY1XqHvWj0EtITNeuf8PHMvlCLiS3EjQL+WOkxEOA4KPxsohFnBDeyPYiNm4ZvkQdLnece36opYidmtbmow==} - file-entry-cache@8.0.0: - resolution: {integrity: sha512-XXTUwCvisa5oacNGRP9SfNtYBNAMi+RPwBFmblZEF7N7swHYQS6/Zfk7SRwx4D5j3CH211YNRco1DEMNVfZCnQ==} - engines: {node: '>=16.0.0'} + '@walletconnect/jsonrpc-types@1.0.4': + resolution: {integrity: sha512-P6679fG/M+wuWg9TY8mh6xFSdYnFyFjwFelxyISxMDrlbXokorEVXYOxiqEbrU3x1BmBoCAJJ+vtEaEoMlpCBQ==} - filelist@1.0.4: - resolution: {integrity: sha512-w1cEuf3S+DrLCQL7ET6kz+gmlJdbq9J7yXCSjK/OZCPA+qEN1WyF4ZAf0YYJa4/shHJra2t/d/r8SV4Ji+x+8Q==} + '@walletconnect/jsonrpc-utils@1.0.8': + resolution: {integrity: sha512-vdeb03bD8VzJUL6ZtzRYsFMq1eZQcM3EAzT0a3st59dyLfJ0wq+tKMpmGH7HlB7waD858UWgfIcudbPFsbzVdw==} - fill-range@7.1.1: - resolution: {integrity: sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==} - engines: {node: '>=8'} + '@walletconnect/jsonrpc-ws-connection@1.0.16': + resolution: {integrity: sha512-G81JmsMqh5nJheE1mPst1W0WfVv0SG3N7JggwLLGnI7iuDZJq8cRJvQwLGKHn5H1WTW7DEPCo00zz5w62AbL3Q==} - find-up@4.1.0: - resolution: {integrity: sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==} - engines: {node: '>=8'} + '@walletconnect/keyvaluestorage@1.1.1': + resolution: {integrity: sha512-V7ZQq2+mSxAq7MrRqDxanTzu2RcElfK1PfNYiaVnJgJ7Q7G7hTVwF8voIBx92qsRyGHZihrwNPHuZd1aKkd0rA==} + peerDependencies: + '@react-native-async-storage/async-storage': 1.x + peerDependenciesMeta: + '@react-native-async-storage/async-storage': + optional: true - find-up@5.0.0: - resolution: {integrity: sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==} - engines: {node: '>=10'} + '@walletconnect/logger@2.1.2': + resolution: {integrity: sha512-aAb28I3S6pYXZHQm5ESB+V6rDqIYfsnHaQyzFbwUUBFY4H0OXx/YtTl8lvhUNhMMfb9UxbwEBS253TlXUYJWSw==} - flat-cache@4.0.1: - resolution: {integrity: sha512-f7ccFPK3SXFHpx15UIGyRJ/FJQctuKZ0zVuN3frBo4HnK3cay9VEW0R6yPYFHC0AgqhukPzKjq22t5DmAyqGyw==} - engines: {node: '>=16'} + '@walletconnect/modal-core@2.7.0': + resolution: {integrity: sha512-oyMIfdlNdpyKF2kTJowTixZSo0PGlCJRdssUN/EZdA6H6v03hZnf09JnwpljZNfir2M65Dvjm/15nGrDQnlxSA==} - flatted@3.3.2: - resolution: {integrity: sha512-AiwGJM8YcNOaobumgtng+6NHuOqC3A7MixFeDafM3X9cIUM+xUXoS5Vfgf+OihAYe20fxqNM9yPBXJzRtZ/4eA==} + '@walletconnect/modal-ui@2.7.0': + resolution: {integrity: sha512-gERYvU7D7K1ANCN/8vUgsE0d2hnRemfAFZ2novm9aZBg7TEd/4EgB+AqbJ+1dc7GhOL6dazckVq78TgccHb7mQ==} - for-each@0.3.3: - resolution: {integrity: sha512-jqYfLp7mo9vIyQf8ykW2v7A+2N4QjeCeI5+Dz9XraiO1ign81wjiH7Fb9vSOWvQfNtmSa4H2RoQTrrXivdUZmw==} + '@walletconnect/modal@2.7.0': + resolution: {integrity: sha512-RQVt58oJ+rwqnPcIvRFeMGKuXb9qkgSmwz4noF8JZGUym3gUAzVs+uW2NQ1Owm9XOJAV+sANrtJ+VoVq1ftElw==} - fs-extra@10.1.0: - resolution: {integrity: sha512-oRXApq54ETRj4eMiFzGnHWGy+zo5raudjuxN0b8H7s/RU2oW0Wvsx9O0ACRN/kRq9E8Vu/ReskGB5o3ji+FzHQ==} - engines: {node: '>=12'} + '@walletconnect/relay-api@1.0.11': + resolution: {integrity: sha512-tLPErkze/HmC9aCmdZOhtVmYZq1wKfWTJtygQHoWtgg722Jd4homo54Cs4ak2RUFUZIGO2RsOpIcWipaua5D5Q==} - fs-extra@11.2.0: - resolution: {integrity: sha512-PmDi3uwK5nFuXh7XDTlVnS17xJS7vW36is2+w3xcv8SVxiB4NyATf4ctkVY5bkSjX0Y4nbvZCq1/EjtEyr9ktw==} - engines: {node: '>=14.14'} + '@walletconnect/relay-auth@1.1.0': + resolution: {integrity: sha512-qFw+a9uRz26jRCDgL7Q5TA9qYIgcNY8jpJzI1zAWNZ8i7mQjaijRnWFKsCHAU9CyGjvt6RKrRXyFtFOpWTVmCQ==} - fs-extra@7.0.1: - resolution: {integrity: sha512-YJDaCJZEnBmcbw13fvdAM9AwNOJwOzrE4pqMqBq5nFiEqXUqHwlK4B+3pUw6JNvfSPtX05xFHtYy/1ni01eGCw==} - engines: {node: '>=6 <7 || >=8'} + '@walletconnect/safe-json@1.0.2': + resolution: {integrity: sha512-Ogb7I27kZ3LPC3ibn8ldyUr5544t3/STow9+lzz7Sfo808YD7SBWk7SAsdBFlYgP2zDRy2hS3sKRcuSRM0OTmA==} - fs-extra@8.1.0: - resolution: {integrity: sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g==} - engines: {node: '>=6 <7 || >=8'} + '@walletconnect/sign-client@2.19.2': + resolution: {integrity: sha512-a/K5PRIFPCjfHq5xx3WYKHAAF8Ft2I1LtxloyibqiQOoUtNLfKgFB1r8sdMvXM7/PADNPe4iAw4uSE6PrARrfg==} - fs.realpath@1.0.0: - resolution: {integrity: sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==} + '@walletconnect/time@1.0.2': + resolution: {integrity: sha512-uzdd9woDcJ1AaBZRhqy5rNC9laqWGErfc4dxA9a87mPdKOgWMD85mcFo9dIYIts/Jwocfwn07EC6EzclKubk/g==} - fsevents@2.3.3: - resolution: {integrity: sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==} - engines: {node: ^8.16.0 || ^10.6.0 || >=11.0.0} - os: [darwin] + '@walletconnect/types@2.19.2': + resolution: {integrity: sha512-/LZWhkVCUN+fcTgQUxArxhn2R8DF+LSd/6Wh9FnpjeK/Sdupx1EPS8okWG6WPAqq2f404PRoNAfQytQ82Xdl3g==} - function-bind@1.1.2: - resolution: {integrity: sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==} + '@walletconnect/universal-provider@2.19.2': + resolution: {integrity: sha512-LkKg+EjcSUpPUhhvRANgkjPL38wJPIWumAYD8OK/g4OFuJ4W3lS/XTCKthABQfFqmiNbNbVllmywiyE44KdpQg==} - function.prototype.name@1.1.6: - resolution: {integrity: sha512-Z5kx79swU5P27WEayXM1tBi5Ze/lbIyiNgU3qyXUOf9b2rgXYyF9Dy9Cx+IQv/Lc8WCG6L82zwUPpSS9hGehIg==} - engines: {node: '>= 0.4'} + '@walletconnect/utils@2.19.2': + resolution: {integrity: sha512-VU5CcUF4sZDg8a2/ov29OJzT3KfLuZqJUM0GemW30dlipI5fkpb0VPenZK7TcdLPXc1LN+Q+7eyTqHRoAu/BIA==} - functions-have-names@1.2.3: - resolution: {integrity: sha512-xckBUXyTIqT97tq2x2AMb+g163b5JFysYk0x4qxNFwbfQkmNZoiRHb6sPzI9/QV33WeuvVYBUIiD4NzNIyqaRQ==} + '@walletconnect/window-getters@1.0.1': + resolution: {integrity: sha512-vHp+HqzGxORPAN8gY03qnbTMnhqIwjeRJNOMOAzePRg4xVEEE2WvYsI9G2NMjOknA8hnuYbU3/hwLcKbjhc8+Q==} - gensync@1.0.0-beta.2: - resolution: {integrity: sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==} - engines: {node: '>=6.9.0'} + '@walletconnect/window-metadata@1.0.1': + resolution: {integrity: sha512-9koTqyGrM2cqFRW517BPY/iEtUDx2r1+Pwwu5m7sJ7ka79wi3EyqhqcICk/yDmv6jAS1rjKgTKXlEhanYjijcA==} - get-caller-file@2.0.5: - resolution: {integrity: sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==} - engines: {node: 6.* || 8.* || >= 10.*} + abitype@1.0.8: + resolution: {integrity: sha512-ZeiI6h3GnW06uYDLx0etQtX/p8E24UaHHBj57RSjK7YBFe7iuVn07EDpOeP451D06sF27VOz9JJPlIKJmXgkEg==} + peerDependencies: + typescript: '>=5.0.4' + zod: ^3 >=3.22.0 + peerDependenciesMeta: + typescript: + optional: true + zod: + optional: true - get-intrinsic@1.2.4: - resolution: {integrity: sha512-5uYhsJH8VJBTv7oslg4BznJYhDoRI6waYCxMmCdnTrcCrHA/fCFKoTFz2JKKE0HdDFUF7/oQuhzumXJK7paBRQ==} - engines: {node: '>= 0.4'} + acorn-jsx@5.3.2: + resolution: {integrity: sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==} + peerDependencies: + acorn: ^6.0.0 || ^7.0.0 || ^8.0.0 - get-package-type@0.1.0: - resolution: {integrity: sha512-pjzuKtY64GYfWizNAJ0fr9VqttZkNiK2iS430LtIHzjBEr6bX8Am2zm4sW4Ro5wjWW5cAlRL1qAMTcXbjNAO2Q==} - engines: {node: '>=8.0.0'} + acorn-walk@8.3.4: + resolution: {integrity: sha512-ueEepnujpqee2o5aIYnvHU6C0A42MNdsIDeqy5BydrkuC5R1ZuUFnm27EeFJGoEHJQgn3uleRvmTXaJgfXbt4g==} + engines: {node: '>=0.4.0'} - get-stream@6.0.1: - resolution: {integrity: sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==} - engines: {node: '>=10'} + acorn@8.14.0: + resolution: {integrity: sha512-cl669nCJTZBsL97OF4kUQm5g5hC2uihk0NxY3WENAC0TYdILVkAyHymAntgxGkl7K+t0cXIrH5siy5S4XkFycA==} + engines: {node: '>=0.4.0'} + hasBin: true - get-symbol-description@1.0.2: - resolution: {integrity: sha512-g0QYk1dZBxGwk+Ngc+ltRH2IBp2f7zBkBMBJZCDerh6EhlhSR6+9irMCuT/09zD6qkarHUSn529sK/yL4S27mg==} - engines: {node: '>= 0.4'} + aes-js@4.0.0-beta.5: + resolution: {integrity: sha512-G965FqalsNyrPqgEGON7nIx1e/OVENSgiEIzyC63haUMuvNnwIgIjMs52hlTCKhkBny7A2ORNlfY9Zu+jmGk1Q==} - get-uri@6.0.3: - resolution: {integrity: sha512-BzUrJBS9EcUb4cFol8r4W3v1cPsSyajLSthNkz5BxbpDcHN5tIrM10E2eNvfnvBn3DaT3DUgx0OpsBKkaOpanw==} + agent-base@7.1.1: + resolution: {integrity: sha512-H0TSyFNDMomMNJQBn8wFV5YC/2eJ+VXECwOadZJT554xP6cODZHPX3H9QMQECxvrgiSOP1pHjy1sMWQVYJOUOA==} engines: {node: '>= 14'} - glob-parent@5.1.2: - resolution: {integrity: sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==} - engines: {node: '>= 6'} + aggregate-error@3.1.0: + resolution: {integrity: sha512-4I7Td01quW/RpocfNayFdFVk1qSuoh0E7JrbRJ16nH01HhKFQ88INq9Sd+nd72zqRySlr9BmDA8xlEJ6vJMrYA==} + engines: {node: '>=8'} - glob-parent@6.0.2: - resolution: {integrity: sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==} - engines: {node: '>=10.13.0'} + ajv@6.12.6: + resolution: {integrity: sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==} - glob@7.2.3: - resolution: {integrity: sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==} - deprecated: Glob versions prior to v9 are no longer supported + ansi-colors@4.1.3: + resolution: {integrity: sha512-/6w/C21Pm1A7aZitlI5Ni/2J6FFQN8i1Cvz3kHABAAbw93v/NlvKdVOqz7CCWz/3iv/JplRSEEZ83XION15ovw==} + engines: {node: '>=6'} - globals@11.12.0: - resolution: {integrity: sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==} - engines: {node: '>=4'} + ansi-escapes@4.3.2: + resolution: {integrity: sha512-gKXj5ALrKWQLsYG9jlTRmR/xKluxHV+Z9QEwNIgCfM1/uwPMCuzVVnh5mwTd+OuBZcwSIMbqssNWRm1lE51QaQ==} + engines: {node: '>=8'} - globals@14.0.0: - resolution: {integrity: sha512-oahGvuMGQlPw/ivIYBjVSrWAfWLBeku5tpPE2fOPLi+WHffIWbuh2tCjhyQhTBPMf5E9jDEH4FOmTYgYwbKwtQ==} - engines: {node: '>=18'} + ansi-regex@5.0.1: + resolution: {integrity: sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==} + engines: {node: '>=8'} - globals@15.12.0: - resolution: {integrity: sha512-1+gLErljJFhbOVyaetcwJiJ4+eLe45S2E7P5UiZ9xGfeq3ATQf5DOv9G7MH3gGbKQLkzmNh2DxfZwLdw+j6oTQ==} - engines: {node: '>=18'} + ansi-regex@6.1.0: + resolution: {integrity: sha512-7HSX4QQb4CspciLpVFwyRe79O3xsIZDDLER21kERQ71oaPodF8jL725AgJMFAYbooIqolJoRLuM81SpeUkpkvA==} + engines: {node: '>=12'} - globalthis@1.0.4: - resolution: {integrity: sha512-DpLKbNU4WylpxJykQujfCcwYWiV/Jhm50Goo0wrVILAv5jOr9d+H+UR3PhSCD2rCCEIg0uc+G+muBTwD54JhDQ==} - engines: {node: '>= 0.4'} + ansi-styles@3.2.1: + resolution: {integrity: sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==} + engines: {node: '>=4'} - globby@10.0.2: - resolution: {integrity: sha512-7dUi7RvCoT/xast/o/dLN53oqND4yk0nsHkhRgn9w65C4PofCLOoJ39iSOg+qVDdWQPIEj+eszMHQ+aLVwwQSg==} + ansi-styles@4.3.0: + resolution: {integrity: sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==} engines: {node: '>=8'} - globby@11.1.0: - resolution: {integrity: sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==} + ansi-styles@5.2.0: + resolution: {integrity: sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==} engines: {node: '>=10'} - gopd@1.0.1: - resolution: {integrity: sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==} + ansi-styles@6.2.1: + resolution: {integrity: sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==} + engines: {node: '>=12'} - graceful-fs@4.2.11: - resolution: {integrity: sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==} + anymatch@3.1.3: + resolution: {integrity: sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==} + engines: {node: '>= 8'} - gradient-string@2.0.2: - resolution: {integrity: sha512-rEDCuqUQ4tbD78TpzsMtt5OIf0cBCSDWSJtUDaF6JsAh+k0v9r++NzxNEG87oDZx9ZwGhD8DaezR2L/yrw0Jdw==} - engines: {node: '>=10'} + arg@4.1.3: + resolution: {integrity: sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA==} - graphemer@1.4.0: - resolution: {integrity: sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==} + argparse@1.0.10: + resolution: {integrity: sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==} - handlebars@4.7.8: - resolution: {integrity: sha512-vafaFqs8MZkRrSX7sFVUdo3ap/eNiLnb4IakshzvP56X5Nr1iGKAIqdX6tMlm6HcNRIkr6AxO5jFEoJzzpT8aQ==} - engines: {node: '>=0.4.7'} - hasBin: true + argparse@2.0.1: + resolution: {integrity: sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==} - has-bigints@1.0.2: - resolution: {integrity: sha512-tSvCKtBr9lkF0Ex0aQiP9N+OpV4zi2r/Nee5VkRDbaqv35RLYMzbwQfFSZZH0kR+Rd6302UJZ2p/bJCEoR3VoQ==} + aria-hidden@1.2.4: + resolution: {integrity: sha512-y+CcFFwelSXpLZk/7fMB2mUbGtX9lKycf1MWJ7CaTIERyitVlyQx6C+sxcROU2BAJ24OiZyK+8wj2i8AlBoS3A==} + engines: {node: '>=10'} - has-flag@3.0.0: - resolution: {integrity: sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==} - engines: {node: '>=4'} + array-buffer-byte-length@1.0.1: + resolution: {integrity: sha512-ahC5W1xgou+KTXix4sAO8Ki12Q+jf4i0+tmk3sC+zgcynshkHxzpXdImBehiUYKKKDwvfFiJl1tZt6ewscS1Mg==} + engines: {node: '>= 0.4'} - has-flag@4.0.0: - resolution: {integrity: sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==} + array-includes@3.1.8: + resolution: {integrity: sha512-itaWrbYbqpGXkGhZPGUulwnhVf5Hpy1xiCFsGqyIGglbBxmG5vSjxQen3/WGOjPpNEv1RtBLKxbmVXm8HpJStQ==} + engines: {node: '>= 0.4'} + + array-union@2.1.0: + resolution: {integrity: sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==} engines: {node: '>=8'} - has-property-descriptors@1.0.2: - resolution: {integrity: sha512-55JNKuIW+vq4Ke1BjOTjM2YctQIvCT7GFzHwmfZPGo5wnrgkid0YQtnAleFSqumZm4az3n2BS+erby5ipJdgrg==} + array.prototype.findlast@1.2.5: + resolution: {integrity: sha512-CVvd6FHg1Z3POpBLxO6E6zr+rSKEQ9L6rZHAaY7lLfhKsWYUBBOuMs0e9o24oopj6H+geRCX0YJ+TJLBK2eHyQ==} + engines: {node: '>= 0.4'} - has-proto@1.0.3: - resolution: {integrity: sha512-SJ1amZAJUiZS+PhsVLf5tGydlaVB8EdFpaSO4gmiUKUOxk8qzn5AIy4ZeJUmh22znIdk/uMAUT2pl3FxzVUH+Q==} + array.prototype.flat@1.3.2: + resolution: {integrity: sha512-djYB+Zx2vLewY8RWlNCUdHjDXs2XOgm602S9E7P/UpHgfeHL00cRiIF+IN/G/aUJ7kGPb6yO/ErDI5V2s8iycA==} engines: {node: '>= 0.4'} - has-symbols@1.0.3: - resolution: {integrity: sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==} + array.prototype.flatmap@1.3.2: + resolution: {integrity: sha512-Ewyx0c9PmpcsByhSW4r+9zDU7sGjFc86qf/kKtuSCRdhfbk0SNLLkaT5qvcHnRGgc5NP/ly/y+qkXkqONX54CQ==} engines: {node: '>= 0.4'} - has-tostringtag@1.0.2: - resolution: {integrity: sha512-NqADB8VjPFLM2V0VvHUewwwsw0ZWBaIdgo+ieHtK3hasLz4qeCRjYcqfB6AQrBggRKppKF8L52/VqdVsO47Dlw==} + array.prototype.tosorted@1.1.4: + resolution: {integrity: sha512-p6Fx8B7b7ZhL/gmUsAy0D15WhvDccw3mnGNbZpi3pmeJdxtWsj2jEaI4Y6oo3XiHfzuSgPwKc04MYt6KgvC/wA==} engines: {node: '>= 0.4'} - hasown@2.0.2: - resolution: {integrity: sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==} + arraybuffer.prototype.slice@1.0.3: + resolution: {integrity: sha512-bMxMKAjg13EBSVscxTaYA4mRc5t1UAXa2kXiGTNfZ079HIWXEkKmkgFrh/nJqamaLSrXO5H4WFFkPEaLJWbs3A==} engines: {node: '>= 0.4'} - header-case@1.0.1: - resolution: {integrity: sha512-i0q9mkOeSuhXw6bGgiQCCBgY/jlZuV/7dZXyZ9c6LcBrqwvT8eT719E9uxE5LiZftdl+z81Ugbg/VvXV4OJOeQ==} + ast-types@0.13.4: + resolution: {integrity: sha512-x1FCFnFifvYDDzTaLII71vG5uvDwgtmDTEVWAxrgeiR8VjMONcCXJx7E+USjDtHlwFmt9MysbqgF9b9Vjr6w+w==} + engines: {node: '>=4'} - html-escaper@2.0.2: - resolution: {integrity: sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg==} + async-mutex@0.2.6: + resolution: {integrity: sha512-Hs4R+4SPgamu6rSGW8C7cV9gaWUKEHykfzCCvIRuaVv636Ju10ZdeUbvb4TBEW0INuq2DHZqXbK4Nd3yG4RaRw==} - http-proxy-agent@7.0.2: - resolution: {integrity: sha512-T1gkAiYYDWYx3V5Bmyu7HcfcvL7mUrTWiM6yOfa3PIphViJ/gFPbvidQ+veqSOHci/PxBcDabeUNCzpOODJZig==} - engines: {node: '>= 14'} + async@3.2.6: + resolution: {integrity: sha512-htCUDlxyyCLMgaM3xXg0C0LW2xqfuQ6p05pCEIsXuyQ+a1koYKTuBMzRNwmybfLgvJDMd0r1LTn4+E0Ti6C2AA==} - https-proxy-agent@7.0.5: - resolution: {integrity: sha512-1e4Wqeblerz+tMKPIq2EMGiiWW1dIjZOksyHWSUm1rmuvw/how9hBHZ38lAGj5ID4Ik6EdkOw7NmWPy6LAwalw==} - engines: {node: '>= 14'} + atomic-sleep@1.0.0: + resolution: {integrity: sha512-kNOjDqAh7px0XWNI+4QbzoiR/nTkHAWNud2uvnJquD1/x5a7EQZMJT0AczqK0Qn67oY/TTQ1LbUKajZpp3I9tQ==} + engines: {node: '>=8.0.0'} - human-id@4.1.1: - resolution: {integrity: sha512-3gKm/gCSUipeLsRYZbbdA1BD83lBoWUkZ7G9VFrhWPAU76KwYo5KR8V28bpoPm/ygy0x5/GCbpRQdY7VLYCoIg==} - hasBin: true + available-typed-arrays@1.0.7: + resolution: {integrity: sha512-wvUjBtSGN7+7SjNpq/9M2Tg350UZD3q62IFZLbRAR1bSMlCo1ZaeW+BJ+D090e4hIIZLBcTDWe4Mh4jvUDajzQ==} + engines: {node: '>= 0.4'} - human-signals@2.1.0: - resolution: {integrity: sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw==} - engines: {node: '>=10.17.0'} + babel-jest@29.7.0: + resolution: {integrity: sha512-BrvGY3xZSwEcCzKvKsCi2GgHqDqsYkOP4/by5xCgIwGXQxIEh+8ew3gmrE1y7XRR6LHZIj6yLYnUi/mm2KXKBg==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + peerDependencies: + '@babel/core': ^7.8.0 - iconv-lite@0.4.24: - resolution: {integrity: sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==} - engines: {node: '>=0.10.0'} + babel-plugin-istanbul@6.1.1: + resolution: {integrity: sha512-Y1IQok9821cC9onCx5otgFfRm7Lm+I+wwxOx738M/WLPZ9Q42m4IG5W0FNX8WLL2gYMZo3JkuXIH2DOpWM+qwA==} + engines: {node: '>=8'} - idb@7.1.1: - resolution: {integrity: sha512-gchesWBzyvGHRO9W8tzUWFDycow5gwjvFKfyV9FF32Y7F50yZMp7mP+T2mJIWFx49zicqyC4uefHM17o6xKIVQ==} + babel-plugin-jest-hoist@29.6.3: + resolution: {integrity: sha512-ESAc/RJvGTFEzRwOTT4+lNDk/GNHMkKbNzsvT0qKRfDyyYTskxB5rnU2njIDYVxXCBHHEI1c0YwHob3WaYujOg==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} - ieee754@1.2.1: - resolution: {integrity: sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==} + babel-preset-current-node-syntax@1.1.0: + resolution: {integrity: sha512-ldYss8SbBlWva1bs28q78Ju5Zq1F+8BrqBZZ0VFhLBvhh6lCpC2o3gDJi/5DRLs9FgYZCnmPYIVFU4lRXCkyUw==} + peerDependencies: + '@babel/core': ^7.0.0 - ignore-by-default@1.0.1: - resolution: {integrity: sha512-Ius2VYcGNk7T90CppJqcIkS5ooHUZyIQK+ClZfMfMNFEF9VSE73Fq+906u/CWu92x4gzZMWOwfFYckPObzdEbA==} + babel-preset-jest@29.6.3: + resolution: {integrity: sha512-0B3bhxR6snWXJZtR/RliHTDPRgn1sNHOR0yVtq/IiQFyuOVjFS+wuio/R4gSNkyYmKmJB4wGZv2NZanmKmTnNA==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + peerDependencies: + '@babel/core': ^7.0.0 - ignore@5.3.2: - resolution: {integrity: sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g==} - engines: {node: '>= 4'} + balanced-match@1.0.2: + resolution: {integrity: sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==} - import-fresh@3.3.0: - resolution: {integrity: sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==} - engines: {node: '>=6'} + base-x@5.0.1: + resolution: {integrity: sha512-M7uio8Zt++eg3jPj+rHMfCC+IuygQHHCOU+IYsVtik6FWjuYpVt/+MRKcgsAMHh8mMFAwnB+Bs+mTrFiXjMzKg==} - import-local@3.2.0: - resolution: {integrity: sha512-2SPlun1JUPWoM6t3F0dw0FkCF/jWY8kttcY4f599GLTSjh2OCuuhdTkJQsEcZzBqbXZGKMK2OqW1oZsjtf/gQA==} - engines: {node: '>=8'} - hasBin: true + base64-js@1.5.1: + resolution: {integrity: sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==} - imurmurhash@0.1.4: - resolution: {integrity: sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==} - engines: {node: '>=0.8.19'} + basic-ftp@5.0.5: + resolution: {integrity: sha512-4Bcg1P8xhUuqcii/S0Z9wiHIrQVPMermM1any+MX5GeGD7faD3/msQUDGLol9wOcz4/jbg/WJnGqoJF6LiBdtg==} + engines: {node: '>=10.0.0'} - indent-string@4.0.0: - resolution: {integrity: sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg==} + better-path-resolve@1.0.0: + resolution: {integrity: sha512-pbnl5XzGBdrFU/wT4jqmJVPn2B6UHPBOhzMQkY/SPUPB6QtUXtmBHBIwCbXJol93mOpGMnQyP/+BB19q04xj7g==} + engines: {node: '>=4'} + + binary-extensions@2.3.0: + resolution: {integrity: sha512-Ceh+7ox5qe7LJuLHoY0feh3pHuUDHAcRUeyL2VYghZwfpkNIy/+8Ocg0a3UuSoYzavmylwuLWQOf3hl0jjMMIw==} engines: {node: '>=8'} - inflight@1.0.6: - resolution: {integrity: sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==} - deprecated: This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful. + bl@4.1.0: + resolution: {integrity: sha512-1W07cM9gS6DcLperZfFSj+bWLtaPGSOHWhPiGzXmvVJbRLdG82sH/Kn8EtW1VqWVA54AKf2h5k5BbnIbwF3h6w==} - inherits@2.0.4: - resolution: {integrity: sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==} + bn.js@5.2.1: + resolution: {integrity: sha512-eXRvHzWyYPBuB4NBy0cmYQjGitUrtqwbvlzP3G6VFnNRbsZQIxQ10PbKKHt8gZ/HW/D/747aDl+QkDqg3KQLMQ==} - ini@1.3.8: - resolution: {integrity: sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==} + bowser@2.11.0: + resolution: {integrity: sha512-AlcaJBi/pqqJBIQ8U9Mcpc9i8Aqxn88Skv5d+xBX006BY5u8N3mGLHa5Lgppa7L/HfwgwLgZ6NYs+Ag6uUmJRA==} - inquirer@7.3.3: - resolution: {integrity: sha512-JG3eIAj5V9CwcGvuOmoo6LB9kbAYT8HXffUl6memuszlwDC/qvFAJw49XJ5NROSFNPxp3iQg1GqkFhaY/CR0IA==} - engines: {node: '>=8.0.0'} + brace-expansion@1.1.11: + resolution: {integrity: sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==} - inquirer@8.2.6: - resolution: {integrity: sha512-M1WuAmb7pn9zdFRtQYk26ZBoY043Sse0wVDdk4Bppr+JOXyQYybdtvK+l9wUibhtjdjvtoiNy8tk+EgsYIUqKg==} - engines: {node: '>=12.0.0'} + brace-expansion@2.0.1: + resolution: {integrity: sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==} - internal-slot@1.0.7: - resolution: {integrity: sha512-NGnrKwXzSms2qUUih/ILZ5JBqNTSa1+ZmP6flaIp6KmSElgE9qdndzS3cqjrDovwFdmwsGsLdeFgB6suw+1e9g==} - engines: {node: '>= 0.4'} + braces@3.0.3: + resolution: {integrity: sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==} + engines: {node: '>=8'} - ip-address@9.0.5: - resolution: {integrity: sha512-zHtQzGojZXTwZTHQqra+ETKd4Sn3vgi7uBmlPoXVWZqYvuKmtI0l/VZTjqGmJY9x88GGOaZ9+G9ES8hC4T4X8g==} - engines: {node: '>= 12'} + browserslist@4.24.4: + resolution: {integrity: sha512-KDi1Ny1gSePi1vm0q4oxSF8b4DR44GF4BbmS2YdhPLOEqd8pDviZOGH/GsmRwoWJ2+5Lr085X7naowMwKHDG1A==} + engines: {node: ^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7} + hasBin: true - is-array-buffer@3.0.4: - resolution: {integrity: sha512-wcjaerHw0ydZwfhiKbXJWLDY8A7yV7KhjQOpb83hGgGfId/aQa4TOvwyzn2PuswW2gPCYEL/nEAiSVpdOj1lXw==} - engines: {node: '>= 0.4'} + bs-logger@0.2.6: + resolution: {integrity: sha512-pd8DCoxmbgc7hyPKOvxtqNcjYoOsABPQdcCUjGp3d42VR2CX1ORhk2A87oqqu5R1kk+76nsxZupkmyd+MVtCog==} + engines: {node: '>= 6'} - is-arrayish@0.2.1: - resolution: {integrity: sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg==} + bs58@6.0.0: + resolution: {integrity: sha512-PD0wEnEYg6ijszw/u8s+iI3H17cTymlrwkKhDhPZq+Sokl3AU4htyBFTjAeNAlCCmg0f53g6ih3jATyCKftTfw==} - is-arrayish@0.3.2: - resolution: {integrity: sha512-eVRqCvVlZbuw3GrM63ovNSNAeA1K16kaR/LRY/92w0zxQ5/1YzwblUX652i4Xs9RwAGjW9d9y6X88t8OaAJfWQ==} + bser@2.1.1: + resolution: {integrity: sha512-gQxTNE/GAfIIrmHLUE3oJyp5FO6HRBfhjnw4/wMmA63ZGDJnWBmgY/lyQBpnDUkGmAhbSe39tx2d/iTOAfglwQ==} - is-async-function@2.0.0: - resolution: {integrity: sha512-Y1JXKrfykRJGdlDwdKlLpLyMIiWqWvuSd17TvZk68PLAOGOoF4Xyav1z0Xhoi+gCYjZVeC5SI+hYFOfvXmGRCA==} - engines: {node: '>= 0.4'} + buffer-from@1.1.2: + resolution: {integrity: sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==} - is-bigint@1.0.4: - resolution: {integrity: sha512-zB9CruMamjym81i2JZ3UMn54PKGsQzsJeo6xvN3HJJ4CAsQNB6iRutp2To77OfCNuoxspsIhzaPoO1zyCEhFOg==} + buffer@5.7.1: + resolution: {integrity: sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==} - is-binary-path@2.1.0: - resolution: {integrity: sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==} - engines: {node: '>=8'} + buffer@6.0.3: + resolution: {integrity: sha512-FTiCpNxtwiZZHEZbcbTIcZjERVICn9yq/pDFkTl95/AxzD1naBctN7YO68riM/gLSDY7sdrMby8hofADYuuqOA==} - is-boolean-object@1.1.2: - resolution: {integrity: sha512-gDYaKHJmnj4aWxyj6YHyXVpdQawtVLHU5cb+eztPGczf6cjuTdwve5ZIEfgXqH4e57An1D1AKf8CZ3kYrQRqYA==} - engines: {node: '>= 0.4'} + bufferutil@4.0.9: + resolution: {integrity: sha512-WDtdLmJvAuNNPzByAYpRo2rF1Mmradw6gvWsQKf63476DDXmomT9zUiGypLcG4ibIM67vhAj8jJRdbmEws2Aqw==} + engines: {node: '>=6.14.2'} - is-callable@1.2.7: - resolution: {integrity: sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA==} - engines: {node: '>= 0.4'} + busboy@1.6.0: + resolution: {integrity: sha512-8SFQbg/0hQ9xy3UNTB0YEnsNBbWfhf7RtnzpL7TkBiTBRfrQ9Fxcnz7VJsleJpyp6rVLvXiuORqjlHi5q+PYuA==} + engines: {node: '>=10.16.0'} - is-core-module@2.15.1: - resolution: {integrity: sha512-z0vtXSwucUJtANQWldhbtbt7BnL0vxiFjIdDLAatwhDYty2bad6s+rijD6Ri4YuYJubLzIJLUidCh09e1djEVQ==} + call-bind-apply-helpers@1.0.2: + resolution: {integrity: sha512-Sp1ablJ0ivDkSzjcaJdxEunN5/XvksFJ2sMBFfq6x0ryhQV/2b/KwFe21cMpmHtPOSij8K99/wSfoEuTObmuMQ==} engines: {node: '>= 0.4'} - is-data-view@1.0.1: - resolution: {integrity: sha512-AHkaJrsUVW6wq6JS8y3JnM/GJF/9cf+k20+iDzlSaJrinEo5+7vRiteOSwBhHRiAyQATN1AmY4hwzxJKPmYf+w==} + call-bind@1.0.7: + resolution: {integrity: sha512-GHTSNSYICQ7scH7sZ+M2rFopRoLh8t2bLSW6BbgrtLsahOIB5iyAVJf9GjWK3cYTDaMj4XdBpM1cA6pIS0Kv2w==} engines: {node: '>= 0.4'} - is-date-object@1.0.5: - resolution: {integrity: sha512-9YQaSxsAiSwcvS33MBk3wTCVnWK+HhF8VZR2jRxehM16QcVOdHqPn4VPHmRK4lSr38n9JriurInLcP90xsYNfQ==} + call-bound@1.0.4: + resolution: {integrity: sha512-+ys997U96po4Kx/ABpBCqhA9EuxJaQWDQg7295H4hBphv3IZg0boBKuwYpt4YXp6MZ5AmZQnU/tyMTlRpaSejg==} engines: {node: '>= 0.4'} - is-extglob@2.1.1: - resolution: {integrity: sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==} - engines: {node: '>=0.10.0'} - - is-finalizationregistry@1.0.2: - resolution: {integrity: sha512-0by5vtUJs8iFQb5TYUHHPudOR+qXYIMKtiUzvLIZITZUjknFmziyBJuLhVRc+Ds0dREFlskDNJKYIdIzu/9pfw==} + callsites@3.1.0: + resolution: {integrity: sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==} + engines: {node: '>=6'} - is-fullwidth-code-point@3.0.0: - resolution: {integrity: sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==} - engines: {node: '>=8'} + camel-case@3.0.0: + resolution: {integrity: sha512-+MbKztAYHXPr1jNTSKQF52VpcFjwY5RkR7fxksV8Doo4KAYc5Fl4UJRgthBbTmEx8C54DqahhbLJkDwjI3PI/w==} - is-generator-fn@2.1.0: - resolution: {integrity: sha512-cTIB4yPYL/Grw0EaSzASzg6bBy9gqCofvWN8okThAYIxKJZC+udlRAmGbM0XLeniEJSs8uEgHPGuHSe1XsOLSQ==} + camelcase@5.3.1: + resolution: {integrity: sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==} engines: {node: '>=6'} - is-generator-function@1.0.10: - resolution: {integrity: sha512-jsEjy9l3yiXEQ+PsXdmBwEPcOxaXWLspKdplFUVI9vq1iZgIekeC0L167qeu86czQaxed3q/Uzuw0swL0irL8A==} - engines: {node: '>= 0.4'} + camelcase@6.3.0: + resolution: {integrity: sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==} + engines: {node: '>=10'} - is-glob@4.0.3: - resolution: {integrity: sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==} - engines: {node: '>=0.10.0'} + caniuse-lite@1.0.30001701: + resolution: {integrity: sha512-faRs/AW3jA9nTwmJBSO1PQ6L/EOgsB5HMQQq4iCu5zhPgVVgO/pZRHlmatwijZKetFw8/Pr4q6dEN8sJuq8qTw==} - is-interactive@1.0.0: - resolution: {integrity: sha512-2HvIEKRoqS62guEC+qBjpvRubdX910WCMuJTZ+I9yvqKU2/12eSL549HMwtabb4oupdj2sMP50k+XJfB/8JE6w==} + chalk@2.4.2: + resolution: {integrity: sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==} + engines: {node: '>=4'} + + chalk@3.0.0: + resolution: {integrity: sha512-4D3B6Wf41KOYRFdszmDqMCGq5VV/uMAB273JILmO+3jAlh8X4qDtdtgCR3fxtbLEMzSx22QdhnDcJvu2u1fVwg==} engines: {node: '>=8'} - is-lower-case@1.1.3: - resolution: {integrity: sha512-+5A1e/WJpLLXZEDlgz4G//WYSHyQBD32qa4Jd3Lw06qQlv3fJHnp3YIHjTQSGzHMgzmVKz2ZP3rBxTHkPw/lxA==} + chalk@4.1.2: + resolution: {integrity: sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==} + engines: {node: '>=10'} - is-map@2.0.3: - resolution: {integrity: sha512-1Qed0/Hr2m+YqxnM09CjA2d/i6YZNfF6R2oRAOj36eUdS6qIV/huPJNSEpKbupewFs+ZsJlxsjjPbc0/afW6Lw==} - engines: {node: '>= 0.4'} + change-case@3.1.0: + resolution: {integrity: sha512-2AZp7uJZbYEzRPsFoa+ijKdvp9zsrnnt6+yFokfwEpeJm0xuJDVoxiRCAaTzyJND8GJkofo2IcKWaUZ/OECVzw==} - is-negative-zero@2.0.3: - resolution: {integrity: sha512-5KoIu2Ngpyek75jXodFvnafB6DJgr3u8uuK0LEZJjrU19DrMD3EVERaR8sjz8CCGgpZvxPl9SuE1GMVPFHx1mw==} - engines: {node: '>= 0.4'} + char-regex@1.0.2: + resolution: {integrity: sha512-kWWXztvZ5SBQV+eRgKFeh8q5sLuZY2+8WUIzlxWVTg+oGwY14qylx1KbKzHd8P6ZYkAg0xyIDU9JMHhyJMZ1jw==} + engines: {node: '>=10'} - is-number-object@1.0.7: - resolution: {integrity: sha512-k1U0IRzLMo7ZlYIfzRu23Oh6MiIFasgpb9X76eqfFZAqwH44UI4KTBvBYIZ1dSL9ZzChTB9ShHfLkR4pdW5krQ==} - engines: {node: '>= 0.4'} + chardet@0.7.0: + resolution: {integrity: sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA==} - is-number@7.0.0: - resolution: {integrity: sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==} - engines: {node: '>=0.12.0'} + chokidar@3.6.0: + resolution: {integrity: sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw==} + engines: {node: '>= 8.10.0'} - is-path-cwd@2.2.0: - resolution: {integrity: sha512-w942bTcih8fdJPJmQHFzkS76NEP8Kzzvmw92cXsazb8intwLqPibPPdXf4ANdKV3rYMuuQYGIWtvz9JilB3NFQ==} - engines: {node: '>=6'} + chokidar@4.0.3: + resolution: {integrity: sha512-Qgzu8kfBvo+cA4962jnP1KkS6Dop5NS6g7R5LFYJr4b8Ub94PPQXUksCw9PvXoeXPRRddRNC5C1JQUR2SMGtnA==} + engines: {node: '>= 14.16.0'} - is-path-inside@3.0.3: - resolution: {integrity: sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ==} + ci-info@3.9.0: + resolution: {integrity: sha512-NIxF55hv4nSqQswkAeiOi1r83xy8JldOFDTWiug55KBu9Jnblncd2U6ViHmYgHf01TPZS77NJBhBMKdWj9HQMQ==} engines: {node: '>=8'} - is-regex@1.1.4: - resolution: {integrity: sha512-kvRdxDsxZjhzUX07ZnLydzS1TU/TJlTUHHY4YLL87e37oUA49DfkLqgy+VjFocowy29cKvcSiu+kIv728jTTVg==} - engines: {node: '>= 0.4'} + cjs-module-lexer@1.4.3: + resolution: {integrity: sha512-9z8TZaGM1pfswYeXrUpzPrkx8UnWYdhJclsiYMm6x/w5+nN+8Tf/LnAgfLGQCm59qAOxU8WwHEq2vNwF6i4j+Q==} - is-set@2.0.3: - resolution: {integrity: sha512-iPAjerrse27/ygGLxw+EBR9agv9Y6uLeYVJMu+QNCoouJ1/1ri0mGrcWpfCqFZuzzx3WjtwxG098X+n4OuRkPg==} - engines: {node: '>= 0.4'} + class-variance-authority@0.7.1: + resolution: {integrity: sha512-Ka+9Trutv7G8M6WT6SeiRWz792K5qEqIGEGzXKhAE6xOWAY6pPH8U+9IY3oCMv6kqTmLsv7Xh/2w2RigkePMsg==} - is-shared-array-buffer@1.0.3: - resolution: {integrity: sha512-nA2hv5XIhLR3uVzDDfCIknerhx8XUKnstuOERPNNIinXG7v9u+ohXF67vxm4TPTEPU6lm61ZkwP3c9PCB97rhg==} - engines: {node: '>= 0.4'} + clean-stack@2.2.0: + resolution: {integrity: sha512-4diC9HaTE+KRAMWhDhrGOECgWZxoevMc5TlkObMqNSsVU62PYzXZ/SMTjzyGAFF1YusgxGcSWTEXBhp0CPwQ1A==} + engines: {node: '>=6'} - is-stream@2.0.1: - resolution: {integrity: sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==} + cli-cursor@3.1.0: + resolution: {integrity: sha512-I/zHAwsKf9FqGoXM4WWRACob9+SNukZTd94DWF57E4toouRulbCxcUh6RKUEOQlYTHJnzkPMySvPNaaSLNfLZw==} engines: {node: '>=8'} - is-string@1.0.7: - resolution: {integrity: sha512-tE2UXzivje6ofPW7l23cjDOMa09gb7xlAqG6jG5ej6uPV32TlWP3NKPigtaGeHNu9fohccRYvIiZMfOOnOYUtg==} - engines: {node: '>= 0.4'} + cli-spinners@2.9.2: + resolution: {integrity: sha512-ywqV+5MmyL4E7ybXgKys4DugZbX0FC6LnwrhjuykIjnK9k8OQacQ7axGKnjDXWNhns0xot3bZI5h55H8yo9cJg==} + engines: {node: '>=6'} - is-subdir@1.2.0: - resolution: {integrity: sha512-2AT6j+gXe/1ueqbW6fLZJiIw3F8iXGJtt0yDrZaBhAZEG1raiTxKWU+IPqMCzQAXOUCKdA4UDMgacKH25XG2Cw==} - engines: {node: '>=4'} + cli-width@3.0.0: + resolution: {integrity: sha512-FxqpkPPwu1HjuN93Omfm4h8uIanXofW0RxVEW3k5RKx+mJJYSthzNhp32Kzxxy3YAEZ/Dc/EWN1vZRY0+kOhbw==} + engines: {node: '>= 10'} - is-symbol@1.0.4: - resolution: {integrity: sha512-C/CPBqKWnvdcxqIARxyOh4v1UUEOCHpgDa0WYgpKDFMszcrPcffg5uhwSgPCLD2WWxmq6isisz87tzT01tuGhg==} - engines: {node: '>= 0.4'} + client-only@0.0.1: + resolution: {integrity: sha512-IV3Ou0jSMzZrd3pZ48nLkT9DA7Ag1pnPzaiQhpW7c3RbcqqzvzzVu+L8gfqMp/8IM2MQtSiqaCxrrcfu8I8rMA==} - is-typed-array@1.1.13: - resolution: {integrity: sha512-uZ25/bUAlUY5fR4OKT4rZQEBrzQWYV9ZJYGGsUmEJ6thodVJ1HX64ePQ6Z0qPWP+m+Uq6e9UugrE38jeYsDSMw==} - engines: {node: '>= 0.4'} + cliui@6.0.0: + resolution: {integrity: sha512-t6wbgtoCXvAzst7QgXxJYqPt0usEfbgQdftEPbLL/cvv6HPE5VgvqCuAIDR0NgU52ds6rFwqrgakNLrHEjCbrQ==} - is-unicode-supported@0.1.0: - resolution: {integrity: sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw==} - engines: {node: '>=10'} + cliui@8.0.1: + resolution: {integrity: sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==} + engines: {node: '>=12'} - is-upper-case@1.1.2: - resolution: {integrity: sha512-GQYSJMgfeAmVwh9ixyk888l7OIhNAGKtY6QA+IrWlu9MDTCaXmeozOZ2S9Knj7bQwBO/H6J2kb+pbyTUiMNbsw==} + clone@1.0.4: + resolution: {integrity: sha512-JQHZ2QMW6l3aH/j6xCqQThY/9OH4D/9ls34cgkUBiEeocRTU04tHfKPBsUK1PqZCUQM7GiA0IIXJSuXHI64Kbg==} + engines: {node: '>=0.8'} - is-weakmap@2.0.2: - resolution: {integrity: sha512-K5pXYOm9wqY1RgjpL3YTkF39tni1XajUIkawTLUo9EZEVUFga5gSQJF8nNS7ZwJQ02y+1YCNYcMh+HIf1ZqE+w==} - engines: {node: '>= 0.4'} + clsx@1.2.1: + resolution: {integrity: sha512-EcR6r5a8bj6pu3ycsa/E/cKVGuTgZJZdsyUYHOksG/UHIiKfjxzRxYJpyVBwYaQeOvghal9fcc4PidlgzugAQg==} + engines: {node: '>=6'} - is-weakref@1.0.2: - resolution: {integrity: sha512-qctsuLZmIQ0+vSSMfoVvyFe2+GSEvnmZ2ezTup1SBse9+twCCeial6EEi3Nc2KFcf6+qz2FBPnjXsk8xhKSaPQ==} + clsx@2.1.1: + resolution: {integrity: sha512-eYm0QWBtUrBWZWG0d386OGAw16Z995PiOVo2B7bjWSbHedGl5e0ZWaq65kOGgUSNesEIDkB9ISbTg/JK9dhCZA==} + engines: {node: '>=6'} - is-weakset@2.0.3: - resolution: {integrity: sha512-LvIm3/KWzS9oRFHugab7d+M/GcBXuXX5xZkzPmN+NxihdQlZUQ4dWuSV1xR/sq6upL1TJEDrfBgRepHFdBtSNQ==} - engines: {node: '>= 0.4'} + co@4.6.0: + resolution: {integrity: sha512-QVb0dM5HvG+uaxitm8wONl7jltx8dqhfU33DcqtOZcLSVIKSDDLDi7+0LbAKiyI8hD9u42m2YxXSkMGWThaecQ==} + engines: {iojs: '>= 1.0.0', node: '>= 0.12.0'} - is-windows@1.0.2: - resolution: {integrity: sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA==} - engines: {node: '>=0.10.0'} + collect-v8-coverage@1.0.2: + resolution: {integrity: sha512-lHl4d5/ONEbLlJvaJNtsF/Lz+WvB07u2ycqTYbdrq7UypDXailES4valYb2eWiJFxZlVmpGekfqoxQhzyFdT4Q==} - isarray@2.0.5: - resolution: {integrity: sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==} + color-convert@1.9.3: + resolution: {integrity: sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==} - isbinaryfile@4.0.10: - resolution: {integrity: sha512-iHrqe5shvBUcFbmZq9zOQHBoeOhZJu6RQGrDpBgenUm/Am+F3JM2MgQj+rK3Z601fzrL5gLZWtAPH2OBaSVcyw==} - engines: {node: '>= 8.0.0'} + color-convert@2.0.1: + resolution: {integrity: sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==} + engines: {node: '>=7.0.0'} - isexe@2.0.0: - resolution: {integrity: sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==} + color-name@1.1.3: + resolution: {integrity: sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==} - istanbul-lib-coverage@3.2.2: - resolution: {integrity: sha512-O8dpsF+r0WV/8MNRKfnmrtCWhuKjxrq2w+jpzBL5UZKTi2LeVWnWOmWRxFlesJONmc+wLAGvKQZEOanko0LFTg==} - engines: {node: '>=8'} + color-name@1.1.4: + resolution: {integrity: sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==} - istanbul-lib-instrument@5.2.1: - resolution: {integrity: sha512-pzqtp31nLv/XFOzXGuvhCb8qhjmTVo5vjVk19XE4CRlSWz0KoeJ3bw9XsA7nOp9YBf4qHjwBxkDzKcME/J29Yg==} - engines: {node: '>=8'} + color-string@1.9.1: + resolution: {integrity: sha512-shrVawQFojnZv6xM40anx4CkoDP+fZsw/ZerEMsW/pyzsRbElpsL/DBVW7q3ExxwusdNXI3lXpuhEZkzs8p5Eg==} - istanbul-lib-instrument@6.0.3: - resolution: {integrity: sha512-Vtgk7L/R2JHyyGW07spoFlB8/lpjiOLTjMdms6AFMraYt3BaJauod/NGrfnVG/y4Ix1JEuMRPDPEj2ua+zz1/Q==} - engines: {node: '>=10'} + color@4.2.3: + resolution: {integrity: sha512-1rXeuUUiGGrykh+CeBdu5Ie7OJwinCgQY0bc7GCRxy5xVHy+moaqkpL/jqQq0MtQOeYcrqEz4abc5f0KtU7W4A==} + engines: {node: '>=12.5.0'} - istanbul-lib-report@3.0.1: - resolution: {integrity: sha512-GCfE1mtsHGOELCU8e/Z7YWzpmybrx/+dSTfLrvY8qRmaY6zXTKWn6WQIjaAFw069icm6GVMNkgu0NzI4iPZUNw==} - engines: {node: '>=10'} + commander@10.0.1: + resolution: {integrity: sha512-y4Mg2tXshplEbSGzx7amzPwKKOCGuoSRP/CjEdwwk0FOGlUbq6lKuoyDZTNZkmxHdJtp54hdfY/JUrdL7Xfdug==} + engines: {node: '>=14'} - istanbul-lib-source-maps@4.0.1: - resolution: {integrity: sha512-n3s8EwkdFIJCG3BPKBYvskgXGoy88ARzvegkitk60NxRdwltLOTaH7CUiMRXvwYorl0Q712iEjcWB+fK/MrWVw==} - engines: {node: '>=10'} + concat-map@0.0.1: + resolution: {integrity: sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==} - istanbul-reports@3.1.7: - resolution: {integrity: sha512-BewmUXImeuRk2YY0PVbxgKAysvhRPUQE0h5QRM++nVWyubKGV0l8qQ5op8+B2DOmwSe63Jivj0BjkPQVf8fP5g==} - engines: {node: '>=8'} + concurrently@8.2.2: + resolution: {integrity: sha512-1dP4gpXFhei8IOtlXRE/T/4H88ElHgTiUzh71YUmtjTEHMSRS2Z/fgOxHSxxusGHogsRfxNq1vyAwxSC+EVyDg==} + engines: {node: ^14.13.0 || >=16.0.0} + hasBin: true - iterator.prototype@1.1.3: - resolution: {integrity: sha512-FW5iMbeQ6rBGm/oKgzq2aW4KvAGpxPzYES8N4g4xNXUKpL1mclMvOe+76AcLDTvD+Ze+sOpVhgdAQEKF4L9iGQ==} - engines: {node: '>= 0.4'} + constant-case@2.0.0: + resolution: {integrity: sha512-eS0N9WwmjTqrOmR3o83F5vW8Z+9R1HnVz3xmzT2PMFug9ly+Au/fxRWlEBSb6LcZwspSsEn9Xs1uw9YgzAg1EQ==} - jake@10.9.2: - resolution: {integrity: sha512-2P4SQ0HrLQ+fw6llpLnOaGAvN2Zu6778SJMrCUwns4fOoG9ayrTiZk3VV8sCPkVZF8ab0zksVpS8FDY5pRCNBA==} - engines: {node: '>=10'} - hasBin: true + convert-source-map@2.0.0: + resolution: {integrity: sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==} - jest-changed-files@29.7.0: - resolution: {integrity: sha512-fEArFiwf1BpQ+4bXSprcDc3/x4HSzL4al2tozwVpDFpsxALjLYdyiIK4e5Vz66GQJIbXJ82+35PtysofptNX2w==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + cookie-es@1.2.2: + resolution: {integrity: sha512-+W7VmiVINB+ywl1HGXJXmrqkOhpKrIiVZV6tQuV54ZyQC7MMuBt81Vc336GMLoHBq5hV/F9eXgt5Mnx0Rha5Fg==} - jest-circus@29.7.0: - resolution: {integrity: sha512-3E1nCMgipcTkCocFwM90XXQab9bS+GMsjdpmPrlelaxwD93Ad8iVEjX/vvHPdLPnFf+L40u+5+iutRdA1N9myw==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + cookie@1.0.2: + resolution: {integrity: sha512-9Kr/j4O16ISv8zBBhJoi4bXOYNTkFLOqSL3UDB0njXxCXNezjeyVrJyGOWtgfs/q2km1gwBcfH8q1yEGoMYunA==} + engines: {node: '>=18'} - jest-cli@29.7.0: - resolution: {integrity: sha512-OVVobw2IubN/GSYsxETi+gOe7Ka59EFMR/twOU3Jb2GnKKeMGJB5SGUUrEz3SFVmJASUdZUzy83sLNNQ2gZslg==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + copy-to-clipboard@3.3.3: + resolution: {integrity: sha512-2KV8NhB5JqC3ky0r9PMCAZKbUHSwtEo4CwCs0KXgruG43gX5PMqDEBbVU4OUzw2MuAWUfsuFmWvEKG5QRfSnJA==} + + core-js-pure@3.39.0: + resolution: {integrity: sha512-7fEcWwKI4rJinnK+wLTezeg2smbFFdSBP6E2kQZNbnzM2s1rpKQ6aaRteZSSg7FLU3P0HGGVo/gbpfanU36urg==} + + core-util-is@1.0.3: + resolution: {integrity: sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==} + + crc-32@1.2.2: + resolution: {integrity: sha512-ROmzCKrTnOwybPcJApAA6WBWij23HVfGVNKqqrZpuyZOHqK2CwHSvpGuyt/UNNvaIjEd8X5IFGp4Mh+Ie1IHJQ==} + engines: {node: '>=0.8'} hasBin: true - peerDependencies: - node-notifier: ^8.0.1 || ^9.0.0 || ^10.0.0 - peerDependenciesMeta: - node-notifier: - optional: true - jest-config@29.7.0: - resolution: {integrity: sha512-uXbpfeQ7R6TZBqI3/TxCU4q4ttk3u0PJeC+E0zbfSoSjq6bJ7buBPxzQPL0ifrkY4DNu4JUdk0ImlBUYi840eQ==} + create-jest@29.7.0: + resolution: {integrity: sha512-Adz2bdH0Vq3F53KEMJOoftQFutWCukm6J24wbPWRO4k1kMY7gS7ds/uoJkNuV8wDCtWWnuwGcJwpWcih+zEW1Q==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} - peerDependencies: - '@types/node': '*' - ts-node: '>=9.0.0' - peerDependenciesMeta: - '@types/node': - optional: true - ts-node: - optional: true + hasBin: true - jest-diff@29.7.0: - resolution: {integrity: sha512-LMIgiIrhigmPrs03JHpxUh2yISK3vLFPkAodPeo0+BuF7wA2FoQbkEg1u8gBYBThncu7e1oEDUfIXVuTqLRUjw==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + create-require@1.1.1: + resolution: {integrity: sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ==} - jest-docblock@29.7.0: - resolution: {integrity: sha512-q617Auw3A612guyaFgsbFeYpNP5t2aoUNLwBUbc/0kD1R4t9ixDbyFTHd1nok4epoVFpr7PmeWHrhvuV3XaJ4g==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + cross-fetch@3.2.0: + resolution: {integrity: sha512-Q+xVJLoGOeIMXZmbUK4HYk+69cQH6LudR0Vu/pRm2YlU/hDV9CiS0gKUMaWY5f2NeUH9C1nV3bsTlCo0FsTV1Q==} - jest-each@29.7.0: - resolution: {integrity: sha512-gns+Er14+ZrEoC5fhOfYCY1LOHHr0TI+rQUHZS8Ttw2l7gl+80eHc/gFf2Ktkw0+SIACDTeWvpFcv3B04VembQ==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + cross-fetch@4.1.0: + resolution: {integrity: sha512-uKm5PU+MHTootlWEY+mZ4vvXoCn4fLQxT9dSc1sXVMSFkINTJVN8cAQROpwcKm8bJ/c7rgZVIBWzH5T78sNZZw==} - jest-environment-node@29.7.0: - resolution: {integrity: sha512-DOSwCRqXirTOyheM+4d5YZOrWcdu0LNZ87ewUoywbcb2XR4wKgqiG8vNeYwhjFMbEkfju7wx2GYH0P2gevGvFw==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + cross-spawn@7.0.6: + resolution: {integrity: sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==} + engines: {node: '>= 8'} - jest-get-type@29.6.3: - resolution: {integrity: sha512-zrteXnqYxfQh7l5FHyL38jL39di8H8rHoecLH3JNxH3BwOrBsNeabdap5e0I23lD4HHI8W5VFBZqG4Eaq5LNcw==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + crossws@0.3.4: + resolution: {integrity: sha512-uj0O1ETYX1Bh6uSgktfPvwDiPYGQ3aI4qVsaC/LWpkIzGj1nUYm5FK3K+t11oOlpN01lGbprFCH4wBlKdJjVgw==} - jest-haste-map@29.7.0: - resolution: {integrity: sha512-fP8u2pyfqx0K1rGn1R9pyE0/KTn+G7PxktWidOBTqFPLYX0b9ksaMFkhK5vrS3DVun09pckLdlx90QthlW7AmA==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + csstype@3.1.3: + resolution: {integrity: sha512-M1uQkMl8rQK/szD0LNhtqxIPLpimGm8sOBwU7lLnCpSbTyY3yeU1Vc7l4KT5zT4s/yOxHH5O7tIuuLOCnLADRw==} - jest-leak-detector@29.7.0: - resolution: {integrity: sha512-kYA8IJcSYtST2BY9I+SMC32nDpBT3J2NvWJx8+JCuCdl/CR1I4EKUJROiP8XtCcxqgTTBGJNdbB1A8XRKbTetw==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + data-uri-to-buffer@6.0.2: + resolution: {integrity: sha512-7hvf7/GW8e86rW0ptuwS3OcBGDjIi6SZva7hCyWC0yYry2cOPmLIjXAUHI6DK2HsnwJd9ifmt57i8eV2n4YNpw==} + engines: {node: '>= 14'} - jest-matcher-utils@29.7.0: - resolution: {integrity: sha512-sBkD+Xi9DtcChsI3L3u0+N0opgPYnCRPtGcQYrgXmR+hmt/fYfWAL0xRXYU8eWOdfuLgBe0YCW3AFtnRLagq/g==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + data-view-buffer@1.0.1: + resolution: {integrity: sha512-0lht7OugA5x3iJLOWFhWK/5ehONdprk0ISXqVFn/NFrDu+cuc8iADFrGQz5BnRK7LLU3JmkbXSxaqX+/mXYtUA==} + engines: {node: '>= 0.4'} - jest-message-util@29.7.0: - resolution: {integrity: sha512-GBEV4GRADeP+qtB2+6u61stea8mGcOT4mCtrYISZwfu9/ISHFJ/5zOMXYbpBE9RsS5+Gb63DW4FgmnKJ79Kf6w==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + data-view-byte-length@1.0.1: + resolution: {integrity: sha512-4J7wRJD3ABAzr8wP+OcIcqq2dlUKp4DVflx++hs5h5ZKydWMI6/D/fAot+yh6g2tHh8fLFTvNOaVN357NvSrOQ==} + engines: {node: '>= 0.4'} - jest-mock@29.7.0: - resolution: {integrity: sha512-ITOMZn+UkYS4ZFh83xYAOzWStloNzJFO2s8DWrE4lhtGD+AorgnbkiKERe4wQVBydIGPx059g6riW5Btp6Llnw==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + data-view-byte-offset@1.0.0: + resolution: {integrity: sha512-t/Ygsytq+R995EJ5PZlD4Cu56sWa8InXySaViRzw9apusqsOO2bQP+SbYzAhR0pFKoB+43lYy8rWban9JSuXnA==} + engines: {node: '>= 0.4'} - jest-pnp-resolver@1.2.3: - resolution: {integrity: sha512-+3NpwQEnRoIBtx4fyhblQDPgJI0H1IEIkX7ShLUjPGA7TtUTvI1oiKi3SR4oBR0hQhQR80l4WAe5RrXBwWMA8w==} - engines: {node: '>=6'} + date-fns@2.30.0: + resolution: {integrity: sha512-fnULvOpxnC5/Vg3NCiWelDsLiUc9bRwAPs/+LfTLNvetFCtCTN+yQz15C/fs4AwX1R9K5GLtLfn8QW+dWisaAw==} + engines: {node: '>=0.11'} + + debug@4.3.7: + resolution: {integrity: sha512-Er2nc/H7RrMXZBFCEim6TCmMk02Z8vLC2Rbi1KEBggpo0fS6l0S1nnapwmIi3yW/+GOJap1Krg4w0Hg80oCqgQ==} + engines: {node: '>=6.0'} peerDependencies: - jest-resolve: '*' + supports-color: '*' peerDependenciesMeta: - jest-resolve: + supports-color: optional: true - jest-regex-util@29.6.3: - resolution: {integrity: sha512-KJJBsRCyyLNWCNBOvZyRDnAIfUiRJ8v+hOBQYGn8gDyF3UegwiP4gwRR3/SDa42g1YbVycTidUF3rKjyLFDWbg==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + decamelize@1.2.0: + resolution: {integrity: sha512-z2S+W9X73hAUUki+N+9Za2lBlun89zigOyGrsax+KUQ6wKW4ZoWpEYBkGhQjwAjjDCkWxhY0VKEhk8wzY7F5cA==} + engines: {node: '>=0.10.0'} - jest-resolve-dependencies@29.7.0: - resolution: {integrity: sha512-un0zD/6qxJ+S0et7WxeI3H5XSe9lTBBR7bOHCHXkKR6luG5mwDDlIzVQ0V5cZCuoTgEdcdwzTghYkTWfubi+nA==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + decode-uri-component@0.2.2: + resolution: {integrity: sha512-FqUYQ+8o158GyGTrMFJms9qh3CqTKvAqgqsTnkLI8sKu0028orqBhxNMFkFen0zGyg6epACD32pjVk58ngIErQ==} + engines: {node: '>=0.10'} - jest-resolve@29.7.0: - resolution: {integrity: sha512-IOVhZSrg+UvVAshDSDtHyFCCBUl/Q3AAJv8iZ6ZjnZ74xzvwuzLXid9IIIPgTnY62SJjfuupMKZsZQRsCvxEgA==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + dedent@1.5.3: + resolution: {integrity: sha512-NHQtfOOW68WD8lgypbLA5oT+Bt0xXJhiYvoR6SmmNXZfpzOGXwdKWmcwG8N7PwVVWV3eF/68nmD9BaJSsTBhyQ==} + peerDependencies: + babel-plugin-macros: ^3.1.0 + peerDependenciesMeta: + babel-plugin-macros: + optional: true - jest-runner@29.7.0: - resolution: {integrity: sha512-fsc4N6cPCAahybGBfTRcq5wFR6fpLznMg47sY5aDpsoejOcVYFb07AHuSnR0liMcPTgBsA3ZJL6kFOjPdoNipQ==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + deep-extend@0.6.0: + resolution: {integrity: sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==} + engines: {node: '>=4.0.0'} - jest-runtime@29.7.0: - resolution: {integrity: sha512-gUnLjgwdGqW7B4LvOIkbKs9WGbn+QLqRQQ9juC6HndeDiezIwhDP+mhMwHWCEcfQ5RUXa6OPnFF8BJh5xegwwQ==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + deep-is@0.1.4: + resolution: {integrity: sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==} - jest-snapshot@29.7.0: - resolution: {integrity: sha512-Rm0BMWtxBcioHr1/OX5YCP8Uov4riHvKPknOGs804Zg9JGZgmIBkbtlxJC/7Z4msKYVbIJtfU+tKb8xlYNfdkw==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + deepmerge@4.3.1: + resolution: {integrity: sha512-3sUqbMEc77XqpdNO7FRyRog+eW3ph+GYCbj+rK+uYyRMuwsVy0rMiVtPn+QJlKFvWP/1PYpapqYn0Me2knFn+A==} + engines: {node: '>=0.10.0'} - jest-util@29.7.0: - resolution: {integrity: sha512-z6EbKajIpqGKU56y5KBUgy1dt1ihhQJgWzUlZHArA/+X2ad7Cb5iF+AK1EWVL/Bo7Rz9uurpqw6SiBCefUbCGA==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + defaults@1.0.4: + resolution: {integrity: sha512-eFuaLoy/Rxalv2kr+lqMlUnrDWV+3j4pljOIJgLIhI058IQfWJ7vXhyEIHu+HtC738klGALYxOKDO0bQP3tg8A==} - jest-validate@29.7.0: - resolution: {integrity: sha512-ZB7wHqaRGVw/9hST/OuFUReG7M8vKeq0/J2egIGLdvjHCmYqGARhzXmtgi+gVeZ5uXFF219aOc3Ls2yLg27tkw==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + define-data-property@1.1.4: + resolution: {integrity: sha512-rBMvIzlpA8v6E+SJZoo++HAYqsLrkg7MSfIinMPFhmkorw7X+dOXVJQs+QT69zGkzMyfDnIMN2Wid1+NbL3T+A==} + engines: {node: '>= 0.4'} - jest-watcher@29.7.0: - resolution: {integrity: sha512-49Fg7WXkU3Vl2h6LbLtMQ/HyB6rXSIX7SqvBLQmssRBGN9I0PNvPmAmCWSOY6SOvrjhI/F7/bGAv9RtnsPA03g==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + define-properties@1.2.1: + resolution: {integrity: sha512-8QmQKqEASLd5nx0U1B1okLElbUuuttJ/AnYmRXbbbGDWh6uS208EjD4Xqq/I9wK7u0v6O08XhTWnt5XtEbR6Dg==} + engines: {node: '>= 0.4'} - jest-worker@29.7.0: - resolution: {integrity: sha512-eIz2msL/EzL9UFTFFx7jBTkeZfku0yUAyZZZmJ93H2TYEiroIx2PQjEXcwYtYl8zXCxb+PAmA2hLIt/6ZEkPHw==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + defu@6.1.4: + resolution: {integrity: sha512-mEQCMmwJu317oSz8CwdIOdwf3xMif1ttiM8LTufzc3g6kR+9Pe236twL8j3IYT1F7GfRgGcW6MWxzZjLIkuHIg==} - jest@29.7.0: - resolution: {integrity: sha512-NIy3oAFp9shda19hy4HK0HRTWKtPJmGdnvywu01nOqNC2vZg+Z+fvJDxpMQA88eb2I9EcafcdjYgsDthnYTvGw==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} - hasBin: true - peerDependencies: - node-notifier: ^8.0.1 || ^9.0.0 || ^10.0.0 - peerDependenciesMeta: - node-notifier: - optional: true + degenerator@5.0.1: + resolution: {integrity: sha512-TllpMR/t0M5sqCXfj85i4XaAzxmS5tVA16dqvdkMwGmzI+dXLXnw3J+3Vdv7VKw+ThlTMboK6i9rnZ6Nntj5CQ==} + engines: {node: '>= 14'} - js-tokens@4.0.0: - resolution: {integrity: sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==} + del@5.1.0: + resolution: {integrity: sha512-wH9xOVHnczo9jN2IW68BabcecVPxacIA3g/7z6vhSU/4stOKQzeCRK0yD0A24WiAAUJmmVpWqrERcTxnLo3AnA==} + engines: {node: '>=8'} - js-yaml@3.14.1: - resolution: {integrity: sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==} - hasBin: true + destr@2.0.5: + resolution: {integrity: sha512-ugFTXCtDZunbzasqBxrK93Ik/DRYsO6S/fedkWEMKqt04xZ4csmnmwGDBAb07QWNaGMAmnTIemsYZCksjATwsA==} - js-yaml@4.1.0: - resolution: {integrity: sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==} - hasBin: true + detect-browser@5.3.0: + resolution: {integrity: sha512-53rsFbGdwMwlF7qvCt0ypLM5V5/Mbl0szB7GPN8y9NCcbknYOeVVXdrXEq+90IwAfrrzt6Hd+u2E2ntakICU8w==} - jsbn@1.1.0: - resolution: {integrity: sha512-4bYVV3aAMtDTTu4+xsDYa6sy9GyJ69/amsu9sYF2zqjiEoZA5xJi3BrfX3uY+/IekIu7MwdObdbDWpoZdBv3/A==} + detect-indent@6.1.0: + resolution: {integrity: sha512-reYkTUJAZb9gUuZ2RvVCNhVHdg62RHnJ7WJl8ftMi4diZ6NWlciOzQN88pUhSELEwflJht4oQDv0F0BMlwaYtA==} + engines: {node: '>=8'} - jsesc@3.1.0: - resolution: {integrity: sha512-/sM3dO2FOzXjKQhJuo0Q173wf2KOo8t4I8vHy6lF9poUp7bKT0/NHE8fPX23PwfhnykfqnC2xRxOnVw5XuGIaA==} - engines: {node: '>=6'} - hasBin: true + detect-libc@2.0.3: + resolution: {integrity: sha512-bwy0MGW55bG41VqxxypOsdSdGqLwXPI/focwgTYCFMbdUiBAxLg9CFzG08sz2aqzknwiX7Hkl0bQENjg8iLByw==} + engines: {node: '>=8'} - json-buffer@3.0.1: - resolution: {integrity: sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==} + detect-newline@3.1.0: + resolution: {integrity: sha512-TLz+x/vEXm/Y7P7wn1EJFNLxYpUD4TgMosxY6fAVJUnJMbupHBOncxyWUG9OpTaH9EBD7uFI5LfEgmMOc54DsA==} + engines: {node: '>=8'} - json-parse-even-better-errors@2.3.1: - resolution: {integrity: sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==} + detect-node-es@1.1.0: + resolution: {integrity: sha512-ypdmJU/TbBby2Dxibuv7ZLW3Bs1QEmM7nHjEANfohJLvE0XVujisn1qPJcZxg+qDucsr+bP6fLD1rPS3AhJ7EQ==} - json-schema-traverse@0.4.1: - resolution: {integrity: sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==} + diff-sequences@29.6.3: + resolution: {integrity: sha512-EjePK1srD3P08o2j4f0ExnylqRs5B9tJjcp9t1krH2qRi8CCdsYfwe9JgSLurFBWwq4uOlipzfk5fHNvwFKr8Q==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} - json-stable-stringify-without-jsonify@1.0.1: - resolution: {integrity: sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==} + diff@4.0.2: + resolution: {integrity: sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==} + engines: {node: '>=0.3.1'} - json5@2.2.3: - resolution: {integrity: sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==} - engines: {node: '>=6'} - hasBin: true + dijkstrajs@1.0.3: + resolution: {integrity: sha512-qiSlmBq9+BCdCA/L46dw8Uy93mloxsPSbwnm5yrKn2vMPiy8KyAskTF6zuV/j5BMsmOGZDPs7KjU+mjb670kfA==} - jsonfile@4.0.0: - resolution: {integrity: sha512-m6F1R3z8jjlf2imQHS2Qez5sjKWQzbuuhuJ/FKYFRZvPE3PuHcSMVZzfsLhGVOkfd20obL5SWEBew5ShlquNxg==} + dir-glob@3.0.1: + resolution: {integrity: sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==} + engines: {node: '>=8'} - jsonfile@6.1.0: - resolution: {integrity: sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==} + doctrine@2.1.0: + resolution: {integrity: sha512-35mSku4ZXK0vfCuHEDAwt55dg2jNajHZ1odvF+8SSr82EsZY4QmXfuWso8oEd8zRhVObSN18aM0CjSdoBX7zIw==} + engines: {node: '>=0.10.0'} - jsx-ast-utils@3.3.5: - resolution: {integrity: sha512-ZZow9HBI5O6EPgSJLUb8n2NKgmVWTwCvHGwFuJlMjvLFqlGG6pjirPhtdsseaLZjSibD8eegzmYpUZwoIlj2cQ==} - engines: {node: '>=4.0'} + dot-case@2.1.1: + resolution: {integrity: sha512-HnM6ZlFqcajLsyudHq7LeeLDr2rFAVYtDv/hV5qchQEidSck8j9OPUsXY9KwJv/lHMtYlX4DjRQqwFYa+0r8Ug==} - jwt-decode@4.0.0: - resolution: {integrity: sha512-+KJGIyHgkGuIq3IEBNftfhW/LfWhXUIY6OmyVWjliu5KH1y0fw7VQ8YndE2O4qZdMSd9SqbnC8GOcZEy0Om7sA==} - engines: {node: '>=18'} + dotenv@16.0.3: + resolution: {integrity: sha512-7GO6HghkA5fYG9TYnNxi14/7K9f5occMlp3zXAuSxn7CKCxt9xbNWG7yF8hTCSUchlfWSe3uLmlPfigevRItzQ==} + engines: {node: '>=12'} - keyv@4.5.4: - resolution: {integrity: sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw==} + dotenv@16.4.7: + resolution: {integrity: sha512-47qPchRCykZC03FhkYAhrvwU4xDBFIj1QPqaarj6mdM/hgUzfPHcpkHJOn3mJAufFeeAxAzeGsr5X0M4k6fLZQ==} + engines: {node: '>=12'} - kleur@3.0.3: - resolution: {integrity: sha512-eTIzlVOSUR+JxdDFepEYcBMtZ9Qqdef+rnzWdRZuMbOywu5tO2w2N7rqjoANZ5k9vywhL6Br1VRjUIgTQx4E8w==} - engines: {node: '>=6'} + dunder-proto@1.0.1: + resolution: {integrity: sha512-KIN/nDJBQRcXw0MLVhZE9iQHmG68qAVIBg9CqmUYjmQIhgij9U5MFvrqkUL5FbtyyzZuOeOt0zdeRe4UY7ct+A==} + engines: {node: '>= 0.4'} - lefthook-darwin-arm64@1.11.10: - resolution: {integrity: sha512-Rufl8BRP77GRFtgNwW95/FHPD0VDfu5bRyzASPcyVrFczJiBK1glAHRdYrErBDNqJhEEjkyv9+EkCZS/MnDKPQ==} - cpu: [arm64] - os: [darwin] + duplexify@4.1.3: + resolution: {integrity: sha512-M3BmBhwJRZsSx38lZyhE53Csddgzl5R7xGJNk7CVddZD6CcmwMCH8J+7AprIrQKH7TonKxaCjcv27Qmf+sQ+oA==} - lefthook-darwin-x64@1.11.10: - resolution: {integrity: sha512-3ReMyC103S+RozcYQlej9RVa1tKr9t8/PGqXbCiWcPAgA9To3GywPk8533qzTs7Nz9fYDiqJMYyQoXovX0Q4SA==} - cpu: [x64] - os: [darwin] + eastasianwidth@0.2.0: + resolution: {integrity: sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==} - lefthook-freebsd-arm64@1.11.10: - resolution: {integrity: sha512-UQOdQuvoVEe0HnoVX4Uz8beegndBDKE6Igo5flV3OkrBuO1Cz7dGbTQwzsYg6gBLYUOa8Ecb3Xur80oviQqwnA==} - cpu: [arm64] - os: [freebsd] + eciesjs@0.4.14: + resolution: {integrity: sha512-eJAgf9pdv214Hn98FlUzclRMYWF7WfoLlkS9nWMTm1qcCwn6Ad4EGD9lr9HXMBfSrZhYQujRE+p0adPRkctC6A==} + engines: {bun: '>=1', deno: '>=2', node: '>=16'} - lefthook-freebsd-x64@1.11.10: - resolution: {integrity: sha512-IkoywmTzw9dKDtN34HJ8AZkbY3CGu1XpAVU08pIIvlhv0y7PlLGHYTdmx90SC1d4FhTlTMyiANgXyIaAnXjucw==} - cpu: [x64] - os: [freebsd] + ejs@3.1.10: + resolution: {integrity: sha512-UeJmFfOrAQS8OJWPZ4qtgHyWExa088/MtK5UEyoJGFH67cDEXkZSviOiKRCZ4Xij0zxI3JECgYs3oKx+AizQBA==} + engines: {node: '>=0.10.0'} + hasBin: true - lefthook-linux-arm64@1.11.10: - resolution: {integrity: sha512-l/lH4FSljNSIetcptPKLI5sTBpjS6dJZ4gk9oXoGM0ftvb22AlLcZI4l6NFCC1oLVWM0CbhkbStDGTI5txsVaA==} - cpu: [arm64] - os: [linux] + electron-to-chromium@1.5.108: + resolution: {integrity: sha512-tiGxpQmvXBEzrfU5ertmbCV/nG5yqCkC1G4T1SIKP335Y5rjXzPWmijR6XcoGXZvVoo4dknfdNe4Tl7lcIROLg==} - lefthook-linux-x64@1.11.10: - resolution: {integrity: sha512-yAIIP711p7t0Z9zLfPtdSx1d7pSgtnuVC5B9PANud3I0JOs82aCzmqpc9Q/zp+imWXdI2PpZlFyKx8GLrDW5BQ==} - cpu: [x64] - os: [linux] + emittery@0.13.1: + resolution: {integrity: sha512-DeWwawk6r5yR9jFgnDKYt4sLS0LmHJJi3ZOnb5/JdbYwj3nW+FxQnHIjhBKz8YLC7oRNPVM9NQ47I3CVx34eqQ==} + engines: {node: '>=12'} - lefthook-openbsd-arm64@1.11.10: - resolution: {integrity: sha512-OAqg9BLsTaeioCJduzZrRLupA2dhTOwHOX0GkO4HTSrOD85JuEPqr5RbYoJ7zuzTQcJEXTJYzaeATM2QHjp/aQ==} - cpu: [arm64] - os: [openbsd] + emoji-regex@8.0.0: + resolution: {integrity: sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==} - lefthook-openbsd-x64@1.11.10: - resolution: {integrity: sha512-EiUU3mFvqcUdnj3gt0V0gRpQQp0b70cLDSA0LgZyFMM4UimeMbA7OgNYl72RKJgrHcTPHrQc4Vj7Mowbhb/X5w==} - cpu: [x64] - os: [openbsd] + emoji-regex@9.2.2: + resolution: {integrity: sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==} - lefthook-windows-arm64@1.11.10: - resolution: {integrity: sha512-clKfI95dCpzxJ1zVgcuYWlSl2oNbtAALoMGqYrzJsoy+CAi+vIs54sqJoGOE60+zrVbdk65z8hriCoYNr98SgA==} - cpu: [arm64] - os: [win32] + encode-utf8@1.0.3: + resolution: {integrity: sha512-ucAnuBEhUK4boH2HjVYG5Q2mQyPorvv0u/ocS+zhdw0S8AlHYY+GOFhP1Gio5z4icpP2ivFSvhtFjQi8+T9ppw==} - lefthook-windows-x64@1.11.10: - resolution: {integrity: sha512-zpf/0sG50xsGnwVG/a2giUbmaM/g0uIRqxN5qBbmwKCf0P4PPD2r1xiFZNDb520+tUTC1lWe0RWVoSSwZbBQRA==} - cpu: [x64] - os: [win32] + end-of-stream@1.4.4: + resolution: {integrity: sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==} - lefthook@1.11.10: - resolution: {integrity: sha512-nuiRqBADcRiU6dzwf2H1zBCsdcWGEOsxY8hqoXw5nkEuoTEYN1Bwi2vskHXjIzJ62iCOCo4FZhcHBAzT9gwL5g==} - hasBin: true + engine.io-client@6.6.3: + resolution: {integrity: sha512-T0iLjnyNWahNyv/lcjS2y4oE358tVS/SYQNxYXGAJ9/GLgH4VCvOQ/mhTjqU88mLZCQgiG8RIegFHYCdVC+j5w==} - leven@3.1.0: - resolution: {integrity: sha512-qsda+H8jTaUaN/x5vzW2rzc+8Rw4TAQ/4KjB46IwK5VH+IlVeeeje/EoZRpiXvIqjFgK84QffqPztGI3VBLG1A==} - engines: {node: '>=6'} + engine.io-parser@5.2.3: + resolution: {integrity: sha512-HqD3yTBfnBxIrbnM1DoD6Pcq8NECnh8d4As1Qgh0z5Gg3jRRIqijury0CL3ghu/edArpUYiYqQiDUQBIs4np3Q==} + engines: {node: '>=10.0.0'} - levn@0.4.1: - resolution: {integrity: sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==} - engines: {node: '>= 0.8.0'} + enhanced-resolve@5.18.1: + resolution: {integrity: sha512-ZSW3ma5GkcQBIpwZTSRAI8N71Uuwgs93IezB7mf7R60tC8ZbJideoDNKjHn2O9KIlx6rkGTTEk1xUCK2E1Y2Yg==} + engines: {node: '>=10.13.0'} - lines-and-columns@1.2.4: - resolution: {integrity: sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==} + enquirer@2.4.1: + resolution: {integrity: sha512-rRqJg/6gd538VHvR3PSrdRBb/1Vy2YfzHqzvbhGIQpDRKIa4FgV/54b5Q1xYSxOOwKvjXweS26E0Q+nAMwp2pQ==} + engines: {node: '>=8.6'} - locate-path@5.0.0: - resolution: {integrity: sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==} - engines: {node: '>=8'} + error-ex@1.3.2: + resolution: {integrity: sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==} - locate-path@6.0.0: - resolution: {integrity: sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==} - engines: {node: '>=10'} + es-abstract@1.23.5: + resolution: {integrity: sha512-vlmniQ0WNPwXqA0BnmwV3Ng7HxiGlh6r5U6JcTMNx8OilcAGqVJBHJcPjqOMaczU9fRuRK5Px2BdVyPRnKMMVQ==} + engines: {node: '>= 0.4'} - lodash.get@4.4.2: - resolution: {integrity: sha512-z+Uw/vLuy6gQe8cfaFWD7p0wVv8fJl3mbzXh33RS+0oW2wvUqiRXiQ69gLWSLpgB5/6sU+r6BlQR0MBILadqTQ==} - deprecated: This package is deprecated. Use the optional chaining (?.) operator instead. + es-define-property@1.0.0: + resolution: {integrity: sha512-jxayLKShrEqqzJ0eumQbVhTYQM27CfT1T35+gCgDFoL82JLsXqTJ76zv6A0YLOgEnLUMvLzsDsGIrl8NFpT2gQ==} + engines: {node: '>= 0.4'} - lodash.memoize@4.1.2: - resolution: {integrity: sha512-t7j+NzmgnQzTAYXcsHYLgimltOV1MXHtlOWf6GjL9Kj8GK5FInw5JotxvbOs+IvV1/Dzo04/fCGfLVs7aXb4Ag==} + es-define-property@1.0.1: + resolution: {integrity: sha512-e3nRfgfUZ4rNGL232gUgX06QNyyez04KdjFrF+LTRoOXmrOgFKDg4BCdsjW8EnT69eqdYGmRpJwiPVYNrCaW3g==} + engines: {node: '>= 0.4'} - lodash.merge@4.6.2: - resolution: {integrity: sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==} + es-errors@1.3.0: + resolution: {integrity: sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==} + engines: {node: '>= 0.4'} - lodash.startcase@4.4.0: - resolution: {integrity: sha512-+WKqsK294HMSc2jEbNgpHpd0JfIBhp7rEV4aqXWqFr6AlXov+SlcgB1Fv01y2kGe3Gc8nMW7VA0SrGuSkRfIEg==} + es-iterator-helpers@1.2.0: + resolution: {integrity: sha512-tpxqxncxnpw3c93u8n3VOzACmRFoVmWJqbWXvX/JfKbkhBw1oslgPrUfeSt2psuqyEJFD6N/9lg5i7bsKpoq+Q==} + engines: {node: '>= 0.4'} - lodash@4.17.21: - resolution: {integrity: sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==} + es-object-atoms@1.0.0: + resolution: {integrity: sha512-MZ4iQ6JwHOBQjahnjwaC1ZtIBH+2ohjamzAO3oaHcXYup7qxjF2fixyH+Q71voWHeOkI2q/TnJao/KfXYIZWbw==} + engines: {node: '>= 0.4'} - log-symbols@3.0.0: - resolution: {integrity: sha512-dSkNGuI7iG3mfvDzUuYZyvk5dD9ocYCYzNU6CYDE6+Xqd+gwme6Z00NS3dUh8mq/73HaEtT7m6W+yUPtU6BZnQ==} - engines: {node: '>=8'} + es-object-atoms@1.1.1: + resolution: {integrity: sha512-FGgH2h8zKNim9ljj7dankFPcICIK9Cp5bm+c2gQSYePhpaG5+esrLODihIorn+Pe6FGJzWhXQotPv73jTaldXA==} + engines: {node: '>= 0.4'} - log-symbols@4.1.0: - resolution: {integrity: sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg==} - engines: {node: '>=10'} + es-set-tostringtag@2.0.3: + resolution: {integrity: sha512-3T8uNMC3OQTHkFUsFq8r/BwAXLHvU/9O9mE0fBc/MY5iq/8H7ncvO947LmYA6ldWw9Uh8Yhf25zu6n7nML5QWQ==} + engines: {node: '>= 0.4'} - loose-envify@1.4.0: - resolution: {integrity: sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==} - hasBin: true + es-shim-unscopables@1.0.2: + resolution: {integrity: sha512-J3yBRXCzDu4ULnQwxyToo/OjdMx6akgVC7K6few0a7F/0wLtmKKN7I73AH5T2836UuXRqN7Qg+IIUw/+YJksRw==} - lower-case-first@1.0.2: - resolution: {integrity: sha512-UuxaYakO7XeONbKrZf5FEgkantPf5DUqDayzP5VXZrtRPdH86s4kN47I8B3TW10S4QKiE3ziHNf3kRN//okHjA==} + es-to-primitive@1.2.1: + resolution: {integrity: sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA==} + engines: {node: '>= 0.4'} - lower-case@1.1.4: - resolution: {integrity: sha512-2Fgx1Ycm599x+WGpIYwJOvsjmXFzTSc34IwDWALRA/8AopUKAVPwfJ+h5+f85BCp0PWmmJcWzEpxOpoXycMpdA==} + es-toolkit@1.33.0: + resolution: {integrity: sha512-X13Q/ZSc+vsO1q600bvNK4bxgXMkHcf//RxCmYDaRY5DAcT+eoXjY5hoAPGMdRnWQjvyLEcyauG3b6hz76LNqg==} - lru-cache@5.1.1: - resolution: {integrity: sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==} + esbuild@0.24.2: + resolution: {integrity: sha512-+9egpBW8I3CD5XPe0n6BfT5fxLzxrlDzqydF3aviG+9ni1lDC/OvMHcxqEFV0+LANZG5R1bFMWfUrjVsdwxJvA==} + engines: {node: '>=18'} + hasBin: true - lru-cache@7.18.3: - resolution: {integrity: sha512-jumlc0BIUrS3qJGgIkWZsyfAM7NCWiBcCDhnd+3NNM5KbBmLTgHVfWBcg6W+rLUsIpzpERPsvwUP7CckAQSOoA==} - engines: {node: '>=12'} + esbuild@0.25.2: + resolution: {integrity: sha512-16854zccKPnC+toMywC+uKNeYSv+/eXkevRAfwRD/G9Cleq66m8XFIrigkbvauLLlCfDL45Q2cWegSg53gGBnQ==} + engines: {node: '>=18'} + hasBin: true - make-dir@4.0.0: - resolution: {integrity: sha512-hXdUTZYIVOt1Ex//jAQi+wTZZpUpwBj/0QsOzqegb3rGMMeJiSEu5xLHnYfBrRV4RH2+OCSOO95Is/7x1WJ4bw==} - engines: {node: '>=10'} + escalade@3.2.0: + resolution: {integrity: sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==} + engines: {node: '>=6'} - make-error@1.3.6: - resolution: {integrity: sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==} + escape-string-regexp@1.0.5: + resolution: {integrity: sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==} + engines: {node: '>=0.8.0'} - makeerror@1.0.12: - resolution: {integrity: sha512-JmqCvUhmt43madlpFzG4BQzG2Z3m6tvQDNKdClZnO3VbIudJYmxsT0FNJMeiB2+JTSlTQTSbU8QdesVmwJcmLg==} + escape-string-regexp@2.0.0: + resolution: {integrity: sha512-UpzcLCXolUWcNu5HtVMHYdXJjArjsF9C0aNnquZYY4uW/Vu0miy5YoWvbV345HauVvcAUnpRuhMMcqTcGOY2+w==} + engines: {node: '>=8'} - merge-stream@2.0.0: - resolution: {integrity: sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==} + escape-string-regexp@4.0.0: + resolution: {integrity: sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==} + engines: {node: '>=10'} - merge2@1.4.1: - resolution: {integrity: sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==} - engines: {node: '>= 8'} + escodegen@2.1.0: + resolution: {integrity: sha512-2NlIDTwUWJN0mRPQOdtQBzbUHvdGY2P1VXSyU83Q3xKxM7WHX2Ql8dKq782Q9TgQUNOLEzEYu9bzLNj1q88I5w==} + engines: {node: '>=6.0'} + hasBin: true - micromatch@4.0.8: - resolution: {integrity: sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==} - engines: {node: '>=8.6'} + eslint-config-prettier@9.1.0: + resolution: {integrity: sha512-NSWl5BFQWEPi1j4TjVNItzYV7dZXZ+wP6I6ZhrBGpChQhZRUaElihE9uRRkcbRnNb76UMKDF3r+WTmNcGPKsqw==} + hasBin: true + peerDependencies: + eslint: '>=7.0.0' - mimic-fn@2.1.0: - resolution: {integrity: sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==} + eslint-plugin-only-warn@1.1.0: + resolution: {integrity: sha512-2tktqUAT+Q3hCAU0iSf4xAN1k9zOpjK5WO8104mB0rT/dGhOa09582HN5HlbxNbPRZ0THV7nLGvzugcNOSjzfA==} engines: {node: '>=6'} - minimatch@3.1.2: - resolution: {integrity: sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==} - - minimatch@5.1.6: - resolution: {integrity: sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==} + eslint-plugin-react-hooks@5.0.0: + resolution: {integrity: sha512-hIOwI+5hYGpJEc4uPRmz2ulCjAGD/N13Lukkh8cLV0i2IRk/bdZDYjgLVHj+U9Z704kLIdIO6iueGvxNur0sgw==} engines: {node: '>=10'} + peerDependencies: + eslint: ^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0-0 || ^9.0.0 - minimatch@9.0.5: - resolution: {integrity: sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==} - engines: {node: '>=16 || 14 >=14.17'} - - minimist@1.2.8: - resolution: {integrity: sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==} + eslint-plugin-react-hooks@5.2.0: + resolution: {integrity: sha512-+f15FfK64YQwZdJNELETdn5ibXEUQmW1DZL6KXhNnc2heoy/sg9VJJeT7n8TlMWouzWqSWavFkIhHyIbIAEapg==} + engines: {node: '>=10'} + peerDependencies: + eslint: ^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0-0 || ^9.0.0 - mkdirp@0.5.6: - resolution: {integrity: sha512-FP+p8RB8OWpF3YZBCrP5gtADmtXApB5AMLn+vdyA+PyxCjrCs00mjyUozssO33cwDeT3wNGdLxJ5M//YqtHAJw==} - hasBin: true + eslint-plugin-react-refresh@0.4.19: + resolution: {integrity: sha512-eyy8pcr/YxSYjBoqIFSrlbn9i/xvxUFa8CjzAYo9cFjgGXqq1hyjihcpZvxRLalpaWmueWR81xn7vuKmAFijDQ==} + peerDependencies: + eslint: '>=8.40' - mri@1.2.0: - resolution: {integrity: sha512-tzzskb3bG8LvYGFF/mDTpq3jpI6Q9wc3LEmBaghu+DdCssd1FakN7Bc0hVNmEyGq1bq3RgfkCb3cmQLpNPOroA==} + eslint-plugin-react@7.37.2: + resolution: {integrity: sha512-EsTAnj9fLVr/GZleBLFbj/sSuXeWmp1eXIN60ceYnZveqEaUCyW4X+Vh4WTdUhCkW4xutXYqTXCUSyqD4rB75w==} engines: {node: '>=4'} + peerDependencies: + eslint: ^3 || ^4 || ^5 || ^6 || ^7 || ^8 || ^9.7 - ms@2.1.3: - resolution: {integrity: sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==} - - mute-stream@0.0.8: - resolution: {integrity: sha512-nnbWWOkoWyUsTjKrhgD0dcz22mdkSnpYqbEjIm2nhwhuxlSkpywJmBo8h0ZqJdkp73mb90SssHkN4rsRaBAfAA==} + eslint-plugin-turbo@2.3.1: + resolution: {integrity: sha512-M5MBYBkcQsv11MFHJ+6WpzLpiTBx0OApeUMAHlO4L0eHqQxY03GrmHXjXfozqB+9HwGrW9fqihBzVRllyixJDA==} + peerDependencies: + eslint: '>6.6.0' - nanoid@3.3.7: - resolution: {integrity: sha512-eSRppjcPIatRIMC1U6UngP8XFcz8MQWGQdt1MTBQ7NaAmvXDfvNxbvWV3x2y6CdEUciCSsDHDQZbhYaB8QEo2g==} - engines: {node: ^10 || ^12 || ^13.7 || ^14 || >=15.0.1} - hasBin: true + eslint-scope@8.2.0: + resolution: {integrity: sha512-PHlWUfG6lvPc3yvP5A4PNyBL1W8fkDUccmI21JUu/+GKZBoH/W5u6usENXUrWFRsyoW5ACUjFGgAFQp5gUlb/A==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - natural-compare@1.4.0: - resolution: {integrity: sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==} + eslint-scope@8.3.0: + resolution: {integrity: sha512-pUNxi75F8MJ/GdeKtVLSbYg4ZI34J6C0C7sbL4YOp2exGwen7ZsuBqKzUhXd0qMQ362yET3z+uPwKeg/0C2XCQ==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - neo-async@2.6.2: - resolution: {integrity: sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==} + eslint-visitor-keys@3.4.3: + resolution: {integrity: sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} - netmask@2.0.2: - resolution: {integrity: sha512-dBpDMdxv9Irdq66304OLfEmQ9tbNRFnFTuZiLo+bD+r332bBmMJ8GBLXklIXXgxd3+v9+KUnZaUR5PJMa75Gsg==} - engines: {node: '>= 0.4.0'} + eslint-visitor-keys@4.2.0: + resolution: {integrity: sha512-UyLnSehNt62FFhSwjZlHmeokpRK59rcz29j+F1/aDgbkbRTk7wIc9XzdoasMUbRNKDM0qQt/+BJ4BrpFeABemw==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - next@15.1.0: - resolution: {integrity: sha512-QKhzt6Y8rgLNlj30izdMbxAwjHMFANnLwDwZ+WQh5sMhyt4lEBqDK9QpvWHtIM4rINKPoJ8aiRZKg5ULSybVHw==} - engines: {node: ^18.18.0 || ^19.8.0 || >= 20.0.0} + eslint@9.15.0: + resolution: {integrity: sha512-7CrWySmIibCgT1Os28lUU6upBshZ+GxybLOrmRzi08kS8MBuO8QA7pXEgYgY5W8vK3e74xv0lpjo9DbaGU9Rkw==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} hasBin: true peerDependencies: - '@opentelemetry/api': ^1.1.0 - '@playwright/test': ^1.41.2 - babel-plugin-react-compiler: '*' - react: ^18.2.0 || 19.0.0-rc-de68d2f4-20241204 || ^19.0.0 - react-dom: ^18.2.0 || 19.0.0-rc-de68d2f4-20241204 || ^19.0.0 - sass: ^1.3.0 + jiti: '*' peerDependenciesMeta: - '@opentelemetry/api': - optional: true - '@playwright/test': - optional: true - babel-plugin-react-compiler: + jiti: optional: true - sass: + + eslint@9.24.0: + resolution: {integrity: sha512-eh/jxIEJyZrvbWRe4XuVclLPDYSYYYgLy5zXGGxD6j8zjSAxFEzI2fL/8xNq6O2yKqVt+eF2YhV+hxjV6UKXwQ==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + hasBin: true + peerDependencies: + jiti: '*' + peerDependenciesMeta: + jiti: optional: true - no-case@2.3.2: - resolution: {integrity: sha512-rmTZ9kz+f3rCvK2TD1Ue/oZlns7OGoIWP4fc3llxxRXlOkHKoWPPWJOfFYpITabSow43QJbRIoHQXtt10VldyQ==} + espree@10.3.0: + resolution: {integrity: sha512-0QYC8b24HWY8zjRnDTL6RiHfDbAWn63qb4LMj1Z4b076A4une81+z03Kg7l7mn/48PUTqoLptSXez8oknU8Clg==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - node-int64@0.4.0: - resolution: {integrity: sha512-O5lz91xSOeoXP6DulyHfllpq+Eg00MWitZIbtPfoSEvqIHdl5gfcY6hYzDWnj0qD5tz52PI08u9qUvSVeUBeHw==} + esprima@4.0.1: + resolution: {integrity: sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==} + engines: {node: '>=4'} + hasBin: true - node-plop@0.26.3: - resolution: {integrity: sha512-Cov028YhBZ5aB7MdMWJEmwyBig43aGL5WT4vdoB28Oitau1zZAcHUn8Sgfk9HM33TqhtLJ9PlM/O0Mv+QpV/4Q==} - engines: {node: '>=8.9.4'} + esquery@1.6.0: + resolution: {integrity: sha512-ca9pw9fomFcKPvFLXhBKUK90ZvGibiGOvRJNbjljY7s7uq/5YO4BOzcYtJqExdx99rF6aAcnRxHmcUHcz6sQsg==} + engines: {node: '>=0.10'} - node-releases@2.0.19: - resolution: {integrity: sha512-xxOWJsBKtzAq7DY0J+DTzuz58K8e7sJbdgwkbMWQe8UYB6ekmsQ45q0M/tJDsGaZmbC+l7n57UV8Hl5tHxO9uw==} + esrecurse@4.3.0: + resolution: {integrity: sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==} + engines: {node: '>=4.0'} - nodemon@3.1.9: - resolution: {integrity: sha512-hdr1oIb2p6ZSxu3PB2JWWYS7ZQ0qvaZsc3hK8DR8f02kRzc8rjYmxAIvdz+aYC+8F2IjNaB7HMcSDg8nQpJxyg==} - engines: {node: '>=10'} - hasBin: true + estraverse@5.3.0: + resolution: {integrity: sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==} + engines: {node: '>=4.0'} - normalize-path@3.0.0: - resolution: {integrity: sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==} + esutils@2.0.3: + resolution: {integrity: sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==} engines: {node: '>=0.10.0'} - npm-run-path@4.0.1: - resolution: {integrity: sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw==} - engines: {node: '>=8'} + eth-block-tracker@7.1.0: + resolution: {integrity: sha512-8YdplnuE1IK4xfqpf4iU7oBxnOYAc35934o083G8ao+8WM8QQtt/mVlAY6yIAdY1eMeLqg4Z//PZjJGmWGPMRg==} + engines: {node: '>=14.0.0'} - object-assign@4.1.1: - resolution: {integrity: sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==} - engines: {node: '>=0.10.0'} + eth-json-rpc-filters@6.0.1: + resolution: {integrity: sha512-ITJTvqoCw6OVMLs7pI8f4gG92n/St6x80ACtHodeS+IXmO0w+t1T5OOzfSt7KLSMLRkVUoexV7tztLgDxg+iig==} + engines: {node: '>=14.0.0'} - object-inspect@1.13.3: - resolution: {integrity: sha512-kDCGIbxkDSXE3euJZZXzc6to7fCrKHNI/hSRQnRuQ+BWjFNzZwiFF8fj/6o2t2G9/jTj8PSIYTfCLelLZEeRpA==} - engines: {node: '>= 0.4'} + eth-query@2.1.2: + resolution: {integrity: sha512-srES0ZcvwkR/wd5OQBRA1bIJMww1skfGS0s8wlwK3/oNP4+wnds60krvu5R1QbpRQjMmpG5OMIWro5s7gvDPsA==} - object-keys@1.1.1: - resolution: {integrity: sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==} - engines: {node: '>= 0.4'} + eth-rpc-errors@4.0.3: + resolution: {integrity: sha512-Z3ymjopaoft7JDoxZcEb3pwdGh7yiYMhOwm2doUt6ASXlMavpNlK6Cre0+IMl2VSGyEU9rkiperQhp5iRxn5Pg==} - object.assign@4.1.5: - resolution: {integrity: sha512-byy+U7gp+FVwmyzKPYhW2h5l3crpmGsxl7X2s8y43IgxvG4g3QZ6CffDtsNQy1WsmZpQbO+ybo0AlW7TY6DcBQ==} - engines: {node: '>= 0.4'} + ethereum-cryptography@2.2.1: + resolution: {integrity: sha512-r/W8lkHSiTLxUxW8Rf3u4HGB0xQweG2RyETjywylKZSzLWoWAijRz8WCuOtJ6wah+avllXBqZuk29HCCvhEIRg==} - object.entries@1.1.8: - resolution: {integrity: sha512-cmopxi8VwRIAw/fkijJohSfpef5PdN0pMQJN6VC/ZKvn0LIknWD8KtgY6KlQdEc4tIjcQ3HxSMmnvtzIscdaYQ==} - engines: {node: '>= 0.4'} + ethers@6.13.5: + resolution: {integrity: sha512-+knKNieu5EKRThQJWwqaJ10a6HE9sSehGeqWN65//wE7j47ZpFhKAnHB/JJFibwwg61I/koxaPsXbXpD/skNOQ==} + engines: {node: '>=14.0.0'} - object.fromentries@2.0.8: - resolution: {integrity: sha512-k6E21FzySsSK5a21KRADBd/NGneRegFO5pLHfdQLpRDETUNJueLXs3WCzyQ3tFRDYgbq3KHGXfTbi2bs8WQ6rQ==} - engines: {node: '>= 0.4'} + eventemitter2@6.4.9: + resolution: {integrity: sha512-JEPTiaOt9f04oa6NOkc4aH+nVp5I3wEjpHbIPqfgCdD5v5bUzy7xQqwcVO2aDQgOWhI28da57HksMrzK9HlRxg==} - object.values@1.2.0: - resolution: {integrity: sha512-yBYjY9QX2hnRmZHAjG/f13MzmBzxzYgQhFrke06TTyKY5zSTEqkOeukBzIdVA3j3ulu8Qa3MbVFShV7T2RmGtQ==} - engines: {node: '>= 0.4'} + eventemitter3@5.0.1: + resolution: {integrity: sha512-GWkBvjiSZK87ELrYOSESUYeVIc9mvLLf/nXalMOS5dYrgZq9o5OVkbZAVM06CVxYsCwH9BDZFPlQTlPA1j4ahA==} - once@1.4.0: - resolution: {integrity: sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==} + events@3.3.0: + resolution: {integrity: sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q==} + engines: {node: '>=0.8.x'} - onetime@5.1.2: - resolution: {integrity: sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==} - engines: {node: '>=6'} + execa@5.1.1: + resolution: {integrity: sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg==} + engines: {node: '>=10'} - optionator@0.9.4: - resolution: {integrity: sha512-6IpQ7mKUxRcZNLIObR0hz7lxsapSSIYNZJwXPGeF0mTVqGKFIXj1DQcMoT22S3ROcLyY/rz0PWaWZ9ayWmad9g==} + exit@0.1.2: + resolution: {integrity: sha512-Zk/eNKV2zbjpKzrsQ+n1G6poVbErQxJ0LBOJXaKZ1EViLzH+hrLu9cdXI4zw9dBQJslwBEpbQ2P1oS7nDxs6jQ==} engines: {node: '>= 0.8.0'} - ora@4.1.1: - resolution: {integrity: sha512-sjYP8QyVWBpBZWD6Vr1M/KwknSw6kJOz41tvGMlwWeClHBtYKTbHMki1PsLZnxKpXMPbTKv9b3pjQu3REib96A==} - engines: {node: '>=8'} - - ora@5.4.1: - resolution: {integrity: sha512-5b6Y85tPxZZ7QytO+BQzysW31HJku27cRIlkbAXaNx+BdcVi+LlRFmVXzeF6a7JCwJpyw5c4b+YSVImQIrBpuQ==} - engines: {node: '>=10'} + expect@29.7.0: + resolution: {integrity: sha512-2Zks0hf1VLFYI1kbh0I5jP3KHHyCHpkfyHBzsSXRFgl/Bg9mWYfMW8oD+PdMPlEwy5HNsR9JutYy6pMeOh61nw==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} - os-tmpdir@1.0.2: - resolution: {integrity: sha512-D2FR03Vir7FIu45XBY20mTb+/ZSWB00sjU9jdQXt83gDrI4Ztz5Fs7/yy74g2N5SVQY4xY1qDr4rNddwYRVX0g==} - engines: {node: '>=0.10.0'} + extendable-error@0.1.7: + resolution: {integrity: sha512-UOiS2in6/Q0FK0R0q6UY9vYpQ21mr/Qn1KOnte7vsACuNJf514WvCCUHSRCPcgjPT2bAhNIJdlE6bVap1GKmeg==} - outdent@0.5.0: - resolution: {integrity: sha512-/jHxFIzoMXdqPzTaCpFzAAWhpkSjZPF4Vsn6jAfNpmbH/ymsmd7Qc6VE9BGn0L6YMj6uwpQLxCECpus4ukKS9Q==} + extension-port-stream@3.0.0: + resolution: {integrity: sha512-an2S5quJMiy5bnZKEf6AkfH/7r8CzHvhchU40gxN+OM6HPhe7Z9T1FUychcf2M9PpPOO0Hf7BAEfJkw2TDIBDw==} + engines: {node: '>=12.0.0'} - ox@0.6.7: - resolution: {integrity: sha512-17Gk/eFsFRAZ80p5eKqv89a57uXjd3NgIf1CaXojATPBuujVc/fQSVhBeAU9JCRB+k7J50WQAyWTxK19T9GgbA==} - peerDependencies: - typescript: '>=5.4.0' - peerDependenciesMeta: - typescript: - optional: true + external-editor@3.1.0: + resolution: {integrity: sha512-hMQ4CX1p1izmuLYyZqLMO/qGNw10wSv9QDCPfzXfyFrOaCSSoRfqE1Kf1s5an66J5JZC62NewG+mK49jOCtQew==} + engines: {node: '>=4'} - p-filter@2.1.0: - resolution: {integrity: sha512-ZBxxZ5sL2HghephhpGAQdoskxplTwr7ICaehZwLIlfL6acuVgZPm8yBNuRAFBGEqtD/hmUeq9eqLg2ys9Xr/yw==} - engines: {node: '>=8'} + fast-deep-equal@3.1.3: + resolution: {integrity: sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==} - p-limit@2.3.0: - resolution: {integrity: sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==} - engines: {node: '>=6'} + fast-glob@3.3.1: + resolution: {integrity: sha512-kNFPyjhh5cKjrUltxs+wFx+ZkbRaxxmZ+X0ZU31SOsxCEtP9VPgtq2teZw1DebupL5GmDaNQ6yKMMVcM41iqDg==} + engines: {node: '>=8.6.0'} - p-limit@3.1.0: - resolution: {integrity: sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==} - engines: {node: '>=10'} + fast-glob@3.3.2: + resolution: {integrity: sha512-oX2ruAFQwf/Orj8m737Y5adxDQO0LAB7/S5MnxCdTNDd4p6BsyIVsv9JQsATbTSq8KHRpLwIHbVlUNatxd+1Ow==} + engines: {node: '>=8.6.0'} - p-locate@4.1.0: - resolution: {integrity: sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==} - engines: {node: '>=8'} + fast-json-stable-stringify@2.1.0: + resolution: {integrity: sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==} - p-locate@5.0.0: - resolution: {integrity: sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==} - engines: {node: '>=10'} + fast-levenshtein@2.0.6: + resolution: {integrity: sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==} - p-map@2.1.0: - resolution: {integrity: sha512-y3b8Kpd8OAN444hxfBbFfj1FY/RjtTd8tzYwhUqNYXx0fXx2iX4maP4Qr6qhIKbQXI02wTLAda4fYUbDagTUFw==} + fast-redact@3.5.0: + resolution: {integrity: sha512-dwsoQlS7h9hMeYUq1W++23NDcBLV4KqONnITDV9DjfS3q1SgDGVrBdvvTLUotWtPSD7asWDV9/CmsZPy8Hf70A==} engines: {node: '>=6'} - p-map@3.0.0: - resolution: {integrity: sha512-d3qXVTF/s+W+CdJ5A29wywV2n8CQQYahlgz2bFiA+4eVNJbHJodPZ+/gXwPGh0bOqA+j8S+6+ckmvLGPk1QpxQ==} - engines: {node: '>=8'} + fast-safe-stringify@2.1.1: + resolution: {integrity: sha512-W+KJc2dmILlPplD/H4K9l9LcAHAfPtP6BY84uVLXQ6Evcz9Lcg33Y2z1IVblT6xdY54PXYVHEv+0Wpq8Io6zkA==} - p-try@2.2.0: - resolution: {integrity: sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==} - engines: {node: '>=6'} - - pac-proxy-agent@7.0.2: - resolution: {integrity: sha512-BFi3vZnO9X5Qt6NRz7ZOaPja3ic0PhlsmCRYLOpN11+mWBCR6XJDqW5RF3j8jm4WGGQZtBA+bTfxYzeKW73eHg==} - engines: {node: '>= 14'} - - pac-resolver@7.0.1: - resolution: {integrity: sha512-5NPgf87AT2STgwa2ntRMr45jTKrYBGkVU36yT0ig/n/GMAa3oPqhZfIQ2kMEimReg0+t9kZViDVZ83qfVUlckg==} - engines: {node: '>= 14'} - - package-manager-detector@0.2.8: - resolution: {integrity: sha512-ts9KSdroZisdvKMWVAVCXiKqnqNfXz4+IbrBG8/BWx/TR5le+jfenvoBuIZ6UWM9nz47W7AbD9qYfAwfWMIwzA==} - - param-case@2.1.1: - resolution: {integrity: sha512-eQE845L6ot89sk2N8liD8HAuH4ca6Vvr7VWAWwt7+kvvG5aBcPmmphQ68JsEG2qa9n1TykS2DLeMt363AAH8/w==} + fastq@1.17.1: + resolution: {integrity: sha512-sRVD3lWVIXWg6By68ZN7vho9a1pQcN/WBFaAAsDDFzlJjvoGx0P8z7V1t72grFJfJhu3YPZBuu25f7Kaw2jN1w==} - parent-module@1.0.1: - resolution: {integrity: sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==} - engines: {node: '>=6'} + fb-watchman@2.0.2: + resolution: {integrity: sha512-p5161BqbuCaSnB8jIbzQHOlpgsPmK5rJVDfDKO91Axs5NC1uu3HRQm6wt9cd9/+GtQQIO53JdGXXoyDpTAsgYA==} - parse-json@5.2.0: - resolution: {integrity: sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg==} + figures@3.2.0: + resolution: {integrity: sha512-yaduQFRKLXYOGgEn6AZau90j3ggSOyiqXU0F9JZfeXYhNa+Jk4X+s45A2zg5jns87GAFa34BBm2kXw4XpNcbdg==} engines: {node: '>=8'} - pascal-case@2.0.1: - resolution: {integrity: sha512-qjS4s8rBOJa2Xm0jmxXiyh1+OFf6ekCWOvUaRgAQSktzlTbMotS0nmG9gyYAybCWBcuP4fsBeRCKNwGBnMe2OQ==} + file-entry-cache@8.0.0: + resolution: {integrity: sha512-XXTUwCvisa5oacNGRP9SfNtYBNAMi+RPwBFmblZEF7N7swHYQS6/Zfk7SRwx4D5j3CH211YNRco1DEMNVfZCnQ==} + engines: {node: '>=16.0.0'} - path-case@2.1.1: - resolution: {integrity: sha512-Ou0N05MioItesaLr9q8TtHVWmJ6fxWdqKB2RohFmNWVyJ+2zeKIeDNWAN6B/Pe7wpzWChhZX6nONYmOnMeJQ/Q==} + filelist@1.0.4: + resolution: {integrity: sha512-w1cEuf3S+DrLCQL7ET6kz+gmlJdbq9J7yXCSjK/OZCPA+qEN1WyF4ZAf0YYJa4/shHJra2t/d/r8SV4Ji+x+8Q==} - path-exists@4.0.0: - resolution: {integrity: sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==} + fill-range@7.1.1: + resolution: {integrity: sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==} engines: {node: '>=8'} - path-is-absolute@1.0.1: - resolution: {integrity: sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==} + filter-obj@1.1.0: + resolution: {integrity: sha512-8rXg1ZnX7xzy2NGDVkBVaAy+lSlPNwad13BtgSlLuxfIslyt5Vg64U7tFcCt4WS1R0hvtnQybT/IyCkGZ3DpXQ==} engines: {node: '>=0.10.0'} - path-key@3.1.1: - resolution: {integrity: sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==} + find-up@4.1.0: + resolution: {integrity: sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==} engines: {node: '>=8'} - path-parse@1.0.7: - resolution: {integrity: sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==} + find-up@5.0.0: + resolution: {integrity: sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==} + engines: {node: '>=10'} - path-type@4.0.0: - resolution: {integrity: sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==} - engines: {node: '>=8'} + flat-cache@4.0.1: + resolution: {integrity: sha512-f7ccFPK3SXFHpx15UIGyRJ/FJQctuKZ0zVuN3frBo4HnK3cay9VEW0R6yPYFHC0AgqhukPzKjq22t5DmAyqGyw==} + engines: {node: '>=16'} - picocolors@1.1.1: - resolution: {integrity: sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==} + flatted@3.3.2: + resolution: {integrity: sha512-AiwGJM8YcNOaobumgtng+6NHuOqC3A7MixFeDafM3X9cIUM+xUXoS5Vfgf+OihAYe20fxqNM9yPBXJzRtZ/4eA==} - picomatch@2.3.1: - resolution: {integrity: sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==} - engines: {node: '>=8.6'} + for-each@0.3.3: + resolution: {integrity: sha512-jqYfLp7mo9vIyQf8ykW2v7A+2N4QjeCeI5+Dz9XraiO1ign81wjiH7Fb9vSOWvQfNtmSa4H2RoQTrrXivdUZmw==} - pify@4.0.1: - resolution: {integrity: sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==} - engines: {node: '>=6'} + foreground-child@3.3.1: + resolution: {integrity: sha512-gIXjKqtFuWEgzFRJA9WCQeSJLZDjgJUOMCMzxtvFq/37KojM1BFGufqsCy0r4qSQmYLsZYMeyRqzIWOMup03sw==} + engines: {node: '>=14'} - pirates@4.0.6: - resolution: {integrity: sha512-saLsH7WeYYPiD25LDuLRRY/i+6HaPYr6G1OUlN39otzkSTxKnubR9RTxS3/Kk50s1g2JTgFwWQDQyplC5/SHZg==} - engines: {node: '>= 6'} + framer-motion@12.7.2: + resolution: {integrity: sha512-0vLY/JqYqieojTriuIR+UTCBVbj89eNUxXTkb01Xg8gSiTXDeuscOvoYm8vvgRGLMYGsCuJ31kDsTy081kPKFw==} + peerDependencies: + '@emotion/is-prop-valid': '*' + react: ^18.0.0 || ^19.0.0 + react-dom: ^18.0.0 || ^19.0.0 + peerDependenciesMeta: + '@emotion/is-prop-valid': + optional: true + react: + optional: true + react-dom: + optional: true - pkg-dir@4.2.0: - resolution: {integrity: sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ==} - engines: {node: '>=8'} + fs-extra@10.1.0: + resolution: {integrity: sha512-oRXApq54ETRj4eMiFzGnHWGy+zo5raudjuxN0b8H7s/RU2oW0Wvsx9O0ACRN/kRq9E8Vu/ReskGB5o3ji+FzHQ==} + engines: {node: '>=12'} - possible-typed-array-names@1.0.0: - resolution: {integrity: sha512-d7Uw+eZoloe0EHDIYoe+bQ5WXnGMOpmiZFTuMWCwpjzzkL2nTjcKiAk4hh8TjnGye2TwWOk3UXucZ+3rbmBa8Q==} - engines: {node: '>= 0.4'} + fs-extra@11.2.0: + resolution: {integrity: sha512-PmDi3uwK5nFuXh7XDTlVnS17xJS7vW36is2+w3xcv8SVxiB4NyATf4ctkVY5bkSjX0Y4nbvZCq1/EjtEyr9ktw==} + engines: {node: '>=14.14'} - postcss@8.4.31: - resolution: {integrity: sha512-PS08Iboia9mts/2ygV3eLpY5ghnUcfLV/EXTOW1E2qYxJKGGBUtNjN76FYHnMs36RmARn41bC0AZmn+rR0OVpQ==} - engines: {node: ^10 || ^12 || >=14} + fs-extra@7.0.1: + resolution: {integrity: sha512-YJDaCJZEnBmcbw13fvdAM9AwNOJwOzrE4pqMqBq5nFiEqXUqHwlK4B+3pUw6JNvfSPtX05xFHtYy/1ni01eGCw==} + engines: {node: '>=6 <7 || >=8'} - prelude-ls@1.2.1: - resolution: {integrity: sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==} - engines: {node: '>= 0.8.0'} + fs-extra@8.1.0: + resolution: {integrity: sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g==} + engines: {node: '>=6 <7 || >=8'} - prettier@2.8.8: - resolution: {integrity: sha512-tdN8qQGvNjw4CHbY+XXk0JgCXn9QiF21a55rBe5LJAU+kDyC4WQn4+awm2Xfk2lQMk5fKup9XgzTZtGkjBdP9Q==} - engines: {node: '>=10.13.0'} - hasBin: true + fs.realpath@1.0.0: + resolution: {integrity: sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==} - prettier@3.5.3: - resolution: {integrity: sha512-QQtaxnoDJeAkDvDKWCLiwIXkTgRhwYDEQCghU9Z6q03iyek/rxRh/2lC3HB7P8sWT2xC/y5JDctPLBIGzHKbhw==} - engines: {node: '>=14'} - hasBin: true + fsevents@2.3.3: + resolution: {integrity: sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==} + engines: {node: ^8.16.0 || ^10.6.0 || >=11.0.0} + os: [darwin] - pretty-format@29.7.0: - resolution: {integrity: sha512-Pdlw/oPxN+aXdmM9R00JVC9WVFoCLTKJvDVLgmJ+qAffBMxsV85l/Lu7sNx4zSzPyoL2euImuEwHhOXdEgNFZQ==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + function-bind@1.1.2: + resolution: {integrity: sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==} - prompts@2.4.2: - resolution: {integrity: sha512-NxNv/kLguCA7p3jE8oL2aEBsrJWgAakBpgmgK6lpPWV+WuOmY6r2/zbAVnP+T8bQlA0nzHXSJSJW0Hq7ylaD2Q==} - engines: {node: '>= 6'} + function.prototype.name@1.1.6: + resolution: {integrity: sha512-Z5kx79swU5P27WEayXM1tBi5Ze/lbIyiNgU3qyXUOf9b2rgXYyF9Dy9Cx+IQv/Lc8WCG6L82zwUPpSS9hGehIg==} + engines: {node: '>= 0.4'} - prop-types@15.8.1: - resolution: {integrity: sha512-oj87CgZICdulUohogVAR7AjlC0327U4el4L6eAvOqCeudMDVU0NThNaV+b9Df4dXgSP1gXMTnPdhfe/2qDH5cg==} + functions-have-names@1.2.3: + resolution: {integrity: sha512-xckBUXyTIqT97tq2x2AMb+g163b5JFysYk0x4qxNFwbfQkmNZoiRHb6sPzI9/QV33WeuvVYBUIiD4NzNIyqaRQ==} - proxy-agent@6.4.0: - resolution: {integrity: sha512-u0piLU+nCOHMgGjRbimiXmA9kM/L9EHh3zL81xCdp7m+Y2pHIsnmbdDoEDoAz5geaonNR6q6+yOPQs6n4T6sBQ==} - engines: {node: '>= 14'} + gensync@1.0.0-beta.2: + resolution: {integrity: sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==} + engines: {node: '>=6.9.0'} - proxy-from-env@1.1.0: - resolution: {integrity: sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==} + get-caller-file@2.0.5: + resolution: {integrity: sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==} + engines: {node: 6.* || 8.* || >= 10.*} - pstree.remy@1.1.8: - resolution: {integrity: sha512-77DZwxQmxKnu3aR542U+X8FypNzbfJ+C5XQDk3uWjWxn6151aIMGthWYRXTqT1E5oJvg+ljaa2OJi+VfvCOQ8w==} + get-intrinsic@1.2.4: + resolution: {integrity: sha512-5uYhsJH8VJBTv7oslg4BznJYhDoRI6waYCxMmCdnTrcCrHA/fCFKoTFz2JKKE0HdDFUF7/oQuhzumXJK7paBRQ==} + engines: {node: '>= 0.4'} - punycode@2.3.1: - resolution: {integrity: sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==} + get-intrinsic@1.3.0: + resolution: {integrity: sha512-9fSjSaos/fRIVIp+xSJlE6lfwhES7LNtKaCBIamHsjr2na1BiABJPo0mOjjz8GJDURarmCPGqaiVg5mfjb98CQ==} + engines: {node: '>= 0.4'} + + get-nonce@1.0.1: + resolution: {integrity: sha512-FJhYRoDaiatfEkUK8HKlicmu/3SGFD51q3itKDGoSTysQJBnfOcxU5GxnhE1E6soB76MbT0MBtnKJuXyAx+96Q==} engines: {node: '>=6'} - pure-rand@6.1.0: - resolution: {integrity: sha512-bVWawvoZoBYpp6yIoQtQXHZjmz35RSVHnUOTefl8Vcjr8snTPY1wnpSPMWekcFwbxI6gtmT7rSYPFvz71ldiOA==} + get-package-type@0.1.0: + resolution: {integrity: sha512-pjzuKtY64GYfWizNAJ0fr9VqttZkNiK2iS430LtIHzjBEr6bX8Am2zm4sW4Ro5wjWW5cAlRL1qAMTcXbjNAO2Q==} + engines: {node: '>=8.0.0'} - queue-microtask@1.2.3: - resolution: {integrity: sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==} + get-proto@1.0.1: + resolution: {integrity: sha512-sTSfBjoXBp89JvIKIefqw7U2CCebsc74kiY6awiGogKtoSGbgjYE/G/+l9sF3MWFPNc9IcoOC4ODfKHfxFmp0g==} + engines: {node: '>= 0.4'} - rc@1.2.8: - resolution: {integrity: sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw==} - hasBin: true + get-stream@6.0.1: + resolution: {integrity: sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==} + engines: {node: '>=10'} - react-dom@19.0.0: - resolution: {integrity: sha512-4GV5sHFG0e/0AD4X+ySy6UJd3jVl1iNsNHdpad0qhABJ11twS3TTBnseqsKurKcsNqCEFeGL3uLpVChpIO3QfQ==} - peerDependencies: - react: ^19.0.0 + get-symbol-description@1.0.2: + resolution: {integrity: sha512-g0QYk1dZBxGwk+Ngc+ltRH2IBp2f7zBkBMBJZCDerh6EhlhSR6+9irMCuT/09zD6qkarHUSn529sK/yL4S27mg==} + engines: {node: '>= 0.4'} - react-is@16.13.1: - resolution: {integrity: sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==} + get-uri@6.0.3: + resolution: {integrity: sha512-BzUrJBS9EcUb4cFol8r4W3v1cPsSyajLSthNkz5BxbpDcHN5tIrM10E2eNvfnvBn3DaT3DUgx0OpsBKkaOpanw==} + engines: {node: '>= 14'} - react-is@18.3.1: - resolution: {integrity: sha512-/LLMVyas0ljjAtoYiPqYiL8VWXzUUdThrmU5+n20DZv+a+ClRoevUzw5JxU+Ieh5/c87ytoTBV9G1FiKfNJdmg==} + glob-parent@5.1.2: + resolution: {integrity: sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==} + engines: {node: '>= 6'} - react@19.0.0: - resolution: {integrity: sha512-V8AVnmPIICiWpGfm6GLzCR/W5FXLchHop40W4nXBmdlEceh16rCN8O8LNWm5bh5XUX91fh7KpA+W0TgMKmgTpQ==} - engines: {node: '>=0.10.0'} + glob-parent@6.0.2: + resolution: {integrity: sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==} + engines: {node: '>=10.13.0'} - read-yaml-file@1.1.0: - resolution: {integrity: sha512-VIMnQi/Z4HT2Fxuwg5KrY174U1VdUIASQVWXXyqtNRtxSr9IYkn1rsI6Tb6HsrHCmB7gVpNwX6JxPTHcH6IoTA==} - engines: {node: '>=6'} + glob@11.0.1: + resolution: {integrity: sha512-zrQDm8XPnYEKawJScsnM0QzobJxlT/kHOOlRTio8IH/GrmxRE5fjllkzdaHclIuNjUQTJYH2xHNIGfdpJkDJUw==} + engines: {node: 20 || >=22} + hasBin: true - readable-stream@3.6.2: - resolution: {integrity: sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==} - engines: {node: '>= 6'} + glob@7.2.3: + resolution: {integrity: sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==} + deprecated: Glob versions prior to v9 are no longer supported - readdirp@3.6.0: - resolution: {integrity: sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==} - engines: {node: '>=8.10.0'} + globals@11.12.0: + resolution: {integrity: sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==} + engines: {node: '>=4'} - reflect.getprototypeof@1.0.6: - resolution: {integrity: sha512-fmfw4XgoDke3kdI6h4xcUz1dG8uaiv5q9gcEwLS4Pnth2kxT+GZ7YehS1JTMGBQmtV7Y4GFGbs2re2NqhdozUg==} - engines: {node: '>= 0.4'} + globals@14.0.0: + resolution: {integrity: sha512-oahGvuMGQlPw/ivIYBjVSrWAfWLBeku5tpPE2fOPLi+WHffIWbuh2tCjhyQhTBPMf5E9jDEH4FOmTYgYwbKwtQ==} + engines: {node: '>=18'} - regenerator-runtime@0.14.1: - resolution: {integrity: sha512-dYnhHh0nJoMfnkZs6GmmhFknAGRrLznOu5nc9ML+EJxGvrx6H7teuevqVqCuPcPK//3eDrrjQhehXVx9cnkGdw==} + globals@15.12.0: + resolution: {integrity: sha512-1+gLErljJFhbOVyaetcwJiJ4+eLe45S2E7P5UiZ9xGfeq3ATQf5DOv9G7MH3gGbKQLkzmNh2DxfZwLdw+j6oTQ==} + engines: {node: '>=18'} - regexp.prototype.flags@1.5.3: - resolution: {integrity: sha512-vqlC04+RQoFalODCbCumG2xIOvapzVMHwsyIGM/SIE8fRhFFsXeH8/QQ+s0T0kDAhKc4k30s73/0ydkHQz6HlQ==} - engines: {node: '>= 0.4'} + globals@15.15.0: + resolution: {integrity: sha512-7ACyT3wmyp3I61S4fG682L0VA2RGD9otkqGJIwNUMF1SWUombIIk+af1unuDYgMm082aHYwD+mzJvv9Iu8dsgg==} + engines: {node: '>=18'} - registry-auth-token@3.3.2: - resolution: {integrity: sha512-JL39c60XlzCVgNrO+qq68FoNb56w/m7JYvGR2jT5iR1xBrUA3Mfx5Twk5rqTThPmQKMWydGmq8oFtDlxfrmxnQ==} + globalthis@1.0.4: + resolution: {integrity: sha512-DpLKbNU4WylpxJykQujfCcwYWiV/Jhm50Goo0wrVILAv5jOr9d+H+UR3PhSCD2rCCEIg0uc+G+muBTwD54JhDQ==} + engines: {node: '>= 0.4'} - registry-url@3.1.0: - resolution: {integrity: sha512-ZbgR5aZEdf4UKZVBPYIgaglBmSF2Hi94s2PcIHhRGFjKYu+chjJdYfHn4rt3hB6eCKLJ8giVIIfgMa1ehDfZKA==} - engines: {node: '>=0.10.0'} + globby@10.0.2: + resolution: {integrity: sha512-7dUi7RvCoT/xast/o/dLN53oqND4yk0nsHkhRgn9w65C4PofCLOoJ39iSOg+qVDdWQPIEj+eszMHQ+aLVwwQSg==} + engines: {node: '>=8'} - require-directory@2.1.1: - resolution: {integrity: sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==} - engines: {node: '>=0.10.0'} + globby@11.1.0: + resolution: {integrity: sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==} + engines: {node: '>=10'} - resolve-cwd@3.0.0: - resolution: {integrity: sha512-OrZaX2Mb+rJCpH/6CpSqt9xFVpN++x01XnN2ie9g6P5/3xelLAkXWVADpdz1IHD/KFfEXyE6V0U01OQ3UO2rEg==} - engines: {node: '>=8'} + gopd@1.0.1: + resolution: {integrity: sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==} - resolve-from@4.0.0: - resolution: {integrity: sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==} - engines: {node: '>=4'} + gopd@1.2.0: + resolution: {integrity: sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg==} + engines: {node: '>= 0.4'} - resolve-from@5.0.0: - resolution: {integrity: sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==} - engines: {node: '>=8'} + graceful-fs@4.2.11: + resolution: {integrity: sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==} - resolve.exports@2.0.3: - resolution: {integrity: sha512-OcXjMsGdhL4XnbShKpAcSqPMzQoYkYyhbEaeSko47MjRP9NfEQMhZkXL1DoFlt9LWQn4YttrdnV6X2OiyzBi+A==} + gradient-string@2.0.2: + resolution: {integrity: sha512-rEDCuqUQ4tbD78TpzsMtt5OIf0cBCSDWSJtUDaF6JsAh+k0v9r++NzxNEG87oDZx9ZwGhD8DaezR2L/yrw0Jdw==} engines: {node: '>=10'} - resolve@1.22.8: - resolution: {integrity: sha512-oKWePCxqpd6FlLvGV1VU0x7bkPmmCNolxzjMf4NczoDnQcIWrAF+cPtZn5i6n+RfD2d9i0tzpKnG6Yk168yIyw==} - hasBin: true + graphemer@1.4.0: + resolution: {integrity: sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==} - resolve@2.0.0-next.5: - resolution: {integrity: sha512-U7WjGVG9sH8tvjW5SmGbQuui75FiyjAX72HX15DwBBwF9dNiQZRQAg9nnPhYy+TUnE0+VcrttuvNI8oSxZcocA==} - hasBin: true + h3@1.15.1: + resolution: {integrity: sha512-+ORaOBttdUm1E2Uu/obAyCguiI7MbBvsLTndc3gyK3zU+SYLoZXlyCP9Xgy0gikkGufFLTZXCXD6+4BsufnmHA==} - restore-cursor@3.1.0: - resolution: {integrity: sha512-l+sSefzHpj5qimhFSE5a8nufZYAM3sBSVMAPtYkmC+4EH2anSGaEMXSD0izRQbu9nfyQ9y5JrVmp7E8oZrUjvA==} - engines: {node: '>=8'} + handlebars@4.7.8: + resolution: {integrity: sha512-vafaFqs8MZkRrSX7sFVUdo3ap/eNiLnb4IakshzvP56X5Nr1iGKAIqdX6tMlm6HcNRIkr6AxO5jFEoJzzpT8aQ==} + engines: {node: '>=0.4.7'} + hasBin: true - reusify@1.0.4: - resolution: {integrity: sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==} - engines: {iojs: '>=1.0.0', node: '>=0.10.0'} + has-bigints@1.0.2: + resolution: {integrity: sha512-tSvCKtBr9lkF0Ex0aQiP9N+OpV4zi2r/Nee5VkRDbaqv35RLYMzbwQfFSZZH0kR+Rd6302UJZ2p/bJCEoR3VoQ==} - rimraf@3.0.2: - resolution: {integrity: sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==} - deprecated: Rimraf versions prior to v4 are no longer supported - hasBin: true + has-flag@3.0.0: + resolution: {integrity: sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==} + engines: {node: '>=4'} - run-async@2.4.1: - resolution: {integrity: sha512-tvVnVv01b8c1RrA6Ep7JkStj85Guv/YrMcwqYQnwjsAS2cTmmPGBBjAjpCW7RrSodNSoE2/qg9O4bceNvUuDgQ==} - engines: {node: '>=0.12.0'} + has-flag@4.0.0: + resolution: {integrity: sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==} + engines: {node: '>=8'} - run-parallel@1.2.0: - resolution: {integrity: sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==} + has-property-descriptors@1.0.2: + resolution: {integrity: sha512-55JNKuIW+vq4Ke1BjOTjM2YctQIvCT7GFzHwmfZPGo5wnrgkid0YQtnAleFSqumZm4az3n2BS+erby5ipJdgrg==} - rxjs@6.6.7: - resolution: {integrity: sha512-hTdwr+7yYNIT5n4AMYp85KA6yw2Va0FLa3Rguvbpa4W3I5xynaBZo41cM3XM+4Q6fRMj3sBYIR1VAmZMXYJvRQ==} - engines: {npm: '>=2.0.0'} + has-proto@1.0.3: + resolution: {integrity: sha512-SJ1amZAJUiZS+PhsVLf5tGydlaVB8EdFpaSO4gmiUKUOxk8qzn5AIy4ZeJUmh22znIdk/uMAUT2pl3FxzVUH+Q==} + engines: {node: '>= 0.4'} - rxjs@7.8.1: - resolution: {integrity: sha512-AA3TVj+0A2iuIoQkWEK/tqFjBq2j+6PO6Y0zJcvzLAFhEFIO3HL0vls9hWLncZbAAbK0mar7oZ4V079I/qPMxg==} + has-symbols@1.0.3: + resolution: {integrity: sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==} + engines: {node: '>= 0.4'} - safe-array-concat@1.1.2: - resolution: {integrity: sha512-vj6RsCsWBCf19jIeHEfkRMw8DPiBb+DMXklQ/1SGDHOMlHdPUkZXFQ2YdplS23zESTijAcurb1aSgJA3AgMu1Q==} - engines: {node: '>=0.4'} + has-symbols@1.1.0: + resolution: {integrity: sha512-1cDNdwJ2Jaohmb3sg4OmKaMBwuC48sYni5HUw2DvsC8LjGTLK9h+eb1X6RyuOHe4hT0ULCW68iomhjUoKUqlPQ==} + engines: {node: '>= 0.4'} - safe-buffer@5.2.1: - resolution: {integrity: sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==} + has-tostringtag@1.0.2: + resolution: {integrity: sha512-NqADB8VjPFLM2V0VvHUewwwsw0ZWBaIdgo+ieHtK3hasLz4qeCRjYcqfB6AQrBggRKppKF8L52/VqdVsO47Dlw==} + engines: {node: '>= 0.4'} - safe-regex-test@1.0.3: - resolution: {integrity: sha512-CdASjNJPvRa7roO6Ra/gLYBTzYzzPyyBXxIMdGW3USQLyjWEls2RgW5UBTXaQVp+OrpeCK3bLem8smtmheoRuw==} + hasown@2.0.2: + resolution: {integrity: sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==} engines: {node: '>= 0.4'} - safer-buffer@2.1.2: - resolution: {integrity: sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==} + header-case@1.0.1: + resolution: {integrity: sha512-i0q9mkOeSuhXw6bGgiQCCBgY/jlZuV/7dZXyZ9c6LcBrqwvT8eT719E9uxE5LiZftdl+z81Ugbg/VvXV4OJOeQ==} - scheduler@0.25.0: - resolution: {integrity: sha512-xFVuu11jh+xcO7JOAGJNOXld8/TcEHK/4CituBUeUb5hqxJLj9YuemAEuvm9gQ/+pgXYfbQuqAkiYu+u7YEsNA==} + hey-listen@1.0.8: + resolution: {integrity: sha512-COpmrF2NOg4TBWUJ5UVyaCU2A88wEMkUPK4hNqyCkqHbxT92BbvfjoSozkAIIm6XhicGlJHhFdullInrdhwU8Q==} - semver@6.3.1: - resolution: {integrity: sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==} - hasBin: true + html-escaper@2.0.2: + resolution: {integrity: sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg==} - semver@7.7.1: - resolution: {integrity: sha512-hlq8tAfn0m/61p4BVRcPzIGr6LKiMwo4VM6dGi6pt4qcRkmNzTcWq6eCEjEh+qXjkMDvPlOFFSGwQjoEa6gyMA==} - engines: {node: '>=10'} - hasBin: true + http-proxy-agent@7.0.2: + resolution: {integrity: sha512-T1gkAiYYDWYx3V5Bmyu7HcfcvL7mUrTWiM6yOfa3PIphViJ/gFPbvidQ+veqSOHci/PxBcDabeUNCzpOODJZig==} + engines: {node: '>= 14'} - sentence-case@2.1.1: - resolution: {integrity: sha512-ENl7cYHaK/Ktwk5OTD+aDbQ3uC8IByu/6Bkg+HDv8Mm+XnBnppVNalcfJTNsp1ibstKh030/JKQQWglDvtKwEQ==} + https-proxy-agent@7.0.5: + resolution: {integrity: sha512-1e4Wqeblerz+tMKPIq2EMGiiWW1dIjZOksyHWSUm1rmuvw/how9hBHZ38lAGj5ID4Ik6EdkOw7NmWPy6LAwalw==} + engines: {node: '>= 14'} - set-function-length@1.2.2: - resolution: {integrity: sha512-pgRc4hJ4/sNjWCSS9AmnS40x3bNMDTknHgL5UaMBTMyJnU90EgWh1Rz+MC9eFu4BuN/UwZjKQuY/1v3rM7HMfg==} - engines: {node: '>= 0.4'} + human-id@4.1.1: + resolution: {integrity: sha512-3gKm/gCSUipeLsRYZbbdA1BD83lBoWUkZ7G9VFrhWPAU76KwYo5KR8V28bpoPm/ygy0x5/GCbpRQdY7VLYCoIg==} + hasBin: true - set-function-name@2.0.2: - resolution: {integrity: sha512-7PGFlmtwsEADb0WYyvCMa1t+yke6daIG4Wirafur5kcf+MhUnPms1UeR0CKQdTZD81yESwMHbtn+TR+dMviakQ==} - engines: {node: '>= 0.4'} + human-signals@2.1.0: + resolution: {integrity: sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw==} + engines: {node: '>=10.17.0'} - sharp@0.33.5: - resolution: {integrity: sha512-haPVm1EkS9pgvHrQ/F3Xy+hgcuMV0Wm9vfIBSiwZ05k+xgb0PkBQpGsAA/oWdDobNaZTH5ppvHtzCFbnSEwHVw==} - engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0} + husky@9.1.7: + resolution: {integrity: sha512-5gs5ytaNjBrh5Ow3zrvdUUY+0VxIuWVL4i9irt6friV+BqdCfmV11CQTWMiBYWHbXhco+J1kHfTOUkePhCDvMA==} + engines: {node: '>=18'} + hasBin: true - shebang-command@2.0.0: - resolution: {integrity: sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==} - engines: {node: '>=8'} + iconv-lite@0.4.24: + resolution: {integrity: sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==} + engines: {node: '>=0.10.0'} - shebang-regex@3.0.0: - resolution: {integrity: sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==} - engines: {node: '>=8'} + idb-keyval@6.2.1: + resolution: {integrity: sha512-8Sb3veuYCyrZL+VBt9LJfZjLUPWVvqn8tG28VqYNFCo43KHcKuq+b4EiXGeuaLAQWL2YmyDgMp2aSpH9JHsEQg==} - shell-quote@1.8.2: - resolution: {integrity: sha512-AzqKpGKjrj7EM6rKVQEPpB288oCfnrEIuyoT9cyF4nmGa7V8Zk6f7RRqYisX8X9m+Q7bd632aZW4ky7EhbQztA==} - engines: {node: '>= 0.4'} + idb@7.1.1: + resolution: {integrity: sha512-gchesWBzyvGHRO9W8tzUWFDycow5gwjvFKfyV9FF32Y7F50yZMp7mP+T2mJIWFx49zicqyC4uefHM17o6xKIVQ==} - side-channel@1.0.6: - resolution: {integrity: sha512-fDW/EZ6Q9RiO8eFG8Hj+7u/oW+XrPTIChwCOM2+th2A6OblDtYYIpve9m+KvI9Z4C9qSEXlaGR6bTEYHReuglA==} - engines: {node: '>= 0.4'} + ieee754@1.2.1: + resolution: {integrity: sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==} - signal-exit@3.0.7: - resolution: {integrity: sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==} + ignore-by-default@1.0.1: + resolution: {integrity: sha512-Ius2VYcGNk7T90CppJqcIkS5ooHUZyIQK+ClZfMfMNFEF9VSE73Fq+906u/CWu92x4gzZMWOwfFYckPObzdEbA==} - signal-exit@4.1.0: - resolution: {integrity: sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==} - engines: {node: '>=14'} + ignore@5.3.2: + resolution: {integrity: sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g==} + engines: {node: '>= 4'} - simple-swizzle@0.2.2: - resolution: {integrity: sha512-JA//kQgZtbuY83m+xT+tXJkmJncGMTFT+C+g2h2R9uxkYIrE2yy9sgmcLhCnw57/WSD+Eh3J97FPEDFnbXnDUg==} + import-fresh@3.3.0: + resolution: {integrity: sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==} + engines: {node: '>=6'} - simple-update-notifier@2.0.0: - resolution: {integrity: sha512-a2B9Y0KlNXl9u/vsW6sTIu9vGEpfKu2wRV6l1H3XEas/0gUIzGzBoP/IouTcUQbm9JWZLH3COxyn03TYlFax6w==} - engines: {node: '>=10'} + import-local@3.2.0: + resolution: {integrity: sha512-2SPlun1JUPWoM6t3F0dw0FkCF/jWY8kttcY4f599GLTSjh2OCuuhdTkJQsEcZzBqbXZGKMK2OqW1oZsjtf/gQA==} + engines: {node: '>=8'} + hasBin: true - sisteransi@1.0.5: - resolution: {integrity: sha512-bLGGlR1QxBcynn2d5YmDX4MGjlZvy2MRBDRNHLJ8VI6l6+9FUiyTFNJ0IveOSP0bcXgVDPRcfGqA0pjaqUpfVg==} + imurmurhash@0.1.4: + resolution: {integrity: sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==} + engines: {node: '>=0.8.19'} - slash@3.0.0: - resolution: {integrity: sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==} + indent-string@4.0.0: + resolution: {integrity: sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg==} engines: {node: '>=8'} - smart-buffer@4.2.0: - resolution: {integrity: sha512-94hK0Hh8rPqQl2xXc3HsaBoOXKV20MToPkcXvwbISWLEs+64sBq5kFgn2kJDHb1Pry9yrP0dxrCI9RRci7RXKg==} - engines: {node: '>= 6.0.0', npm: '>= 3.0.0'} + inflight@1.0.6: + resolution: {integrity: sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==} + deprecated: This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful. - snake-case@2.1.0: - resolution: {integrity: sha512-FMR5YoPFwOLuh4rRz92dywJjyKYZNLpMn1R5ujVpIYkbA9p01fq8RMg0FkO4M+Yobt4MjHeLTJVm5xFFBHSV2Q==} + inherits@2.0.4: + resolution: {integrity: sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==} - socks-proxy-agent@8.0.4: - resolution: {integrity: sha512-GNAq/eg8Udq2x0eNiFkr9gRg5bA7PXEWagQdeRX4cPSG+X/8V38v637gim9bjFptMk1QWsCTr0ttrJEiXbNnRw==} - engines: {node: '>= 14'} + ini@1.3.8: + resolution: {integrity: sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==} - socks@2.8.3: - resolution: {integrity: sha512-l5x7VUUWbjVFbafGLxPWkYsHIhEvmF85tbIeFZWc8ZPtoMyybuEhL7Jye/ooC4/d48FgOjSJXgsF/AJPYCW8Zw==} - engines: {node: '>= 10.0.0', npm: '>= 3.0.0'} + inquirer@7.3.3: + resolution: {integrity: sha512-JG3eIAj5V9CwcGvuOmoo6LB9kbAYT8HXffUl6memuszlwDC/qvFAJw49XJ5NROSFNPxp3iQg1GqkFhaY/CR0IA==} + engines: {node: '>=8.0.0'} - source-map-js@1.2.1: - resolution: {integrity: sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA==} - engines: {node: '>=0.10.0'} + inquirer@8.2.6: + resolution: {integrity: sha512-M1WuAmb7pn9zdFRtQYk26ZBoY043Sse0wVDdk4Bppr+JOXyQYybdtvK+l9wUibhtjdjvtoiNy8tk+EgsYIUqKg==} + engines: {node: '>=12.0.0'} - source-map-support@0.5.13: - resolution: {integrity: sha512-SHSKFHadjVA5oR4PPqhtAVdcBWwRYVd6g6cAXnIbRiIwc2EhPrTuKUBdSLvlEKyIP3GCf89fltvcZiP9MMFA1w==} + internal-slot@1.0.7: + resolution: {integrity: sha512-NGnrKwXzSms2qUUih/ILZ5JBqNTSa1+ZmP6flaIp6KmSElgE9qdndzS3cqjrDovwFdmwsGsLdeFgB6suw+1e9g==} + engines: {node: '>= 0.4'} - source-map@0.6.1: - resolution: {integrity: sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==} - engines: {node: '>=0.10.0'} + ip-address@9.0.5: + resolution: {integrity: sha512-zHtQzGojZXTwZTHQqra+ETKd4Sn3vgi7uBmlPoXVWZqYvuKmtI0l/VZTjqGmJY9x88GGOaZ9+G9ES8hC4T4X8g==} + engines: {node: '>= 12'} - spawn-command@0.0.2: - resolution: {integrity: sha512-zC8zGoGkmc8J9ndvml8Xksr1Amk9qBujgbF0JAIWO7kXr43w0h/0GJNM/Vustixu+YE8N/MTrQ7N31FvHUACxQ==} + iron-webcrypto@1.2.1: + resolution: {integrity: sha512-feOM6FaSr6rEABp/eDfVseKyTMDt+KGpeB35SkVn9Tyn0CqvVsY3EwI0v5i8nMHyJnzCIQf7nsy3p41TPkJZhg==} - spawndamnit@3.0.1: - resolution: {integrity: sha512-MmnduQUuHCoFckZoWnXsTg7JaiLBJrKFj9UI2MbRPGaJeVpsLcVBu6P/IGZovziM/YBsellCmsprgNA+w0CzVg==} + is-arguments@1.2.0: + resolution: {integrity: sha512-7bVbi0huj/wrIAOzb8U1aszg9kdi3KN/CyU19CTI7tAoZYEZoL9yCDXpbXN+uPsuWnP02cyug1gleqq+TU+YCA==} + engines: {node: '>= 0.4'} - sprintf-js@1.0.3: - resolution: {integrity: sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==} + is-array-buffer@3.0.4: + resolution: {integrity: sha512-wcjaerHw0ydZwfhiKbXJWLDY8A7yV7KhjQOpb83hGgGfId/aQa4TOvwyzn2PuswW2gPCYEL/nEAiSVpdOj1lXw==} + engines: {node: '>= 0.4'} - sprintf-js@1.1.3: - resolution: {integrity: sha512-Oo+0REFV59/rz3gfJNKQiBlwfHaSESl1pcGyABQsnnIfWOFt6JNj5gCog2U6MLZ//IGYD+nA8nI+mTShREReaA==} + is-arrayish@0.2.1: + resolution: {integrity: sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg==} - stack-utils@2.0.6: - resolution: {integrity: sha512-XlkWvfIm6RmsWtNJx+uqtKLS8eqFbxUg0ZzLXqY0caEy9l7hruX8IpiDnjsLavoBgqCCR71TqWO8MaXYheJ3RQ==} - engines: {node: '>=10'} + is-arrayish@0.3.2: + resolution: {integrity: sha512-eVRqCvVlZbuw3GrM63ovNSNAeA1K16kaR/LRY/92w0zxQ5/1YzwblUX652i4Xs9RwAGjW9d9y6X88t8OaAJfWQ==} - streamsearch@1.1.0: - resolution: {integrity: sha512-Mcc5wHehp9aXz1ax6bZUyY5afg9u2rv5cqQI3mRrYkGC8rW2hM02jWuwjtL++LS5qinSyhj2QfLyNsuc+VsExg==} - engines: {node: '>=10.0.0'} + is-async-function@2.0.0: + resolution: {integrity: sha512-Y1JXKrfykRJGdlDwdKlLpLyMIiWqWvuSd17TvZk68PLAOGOoF4Xyav1z0Xhoi+gCYjZVeC5SI+hYFOfvXmGRCA==} + engines: {node: '>= 0.4'} - string-length@4.0.2: - resolution: {integrity: sha512-+l6rNN5fYHNhZZy41RXsYptCjA2Igmq4EG7kZAYFQI1E1VTXarr6ZPXBg6eq7Y6eK4FEhY6AJlyuFIb/v/S0VQ==} - engines: {node: '>=10'} + is-bigint@1.0.4: + resolution: {integrity: sha512-zB9CruMamjym81i2JZ3UMn54PKGsQzsJeo6xvN3HJJ4CAsQNB6iRutp2To77OfCNuoxspsIhzaPoO1zyCEhFOg==} - string-width@4.2.3: - resolution: {integrity: sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==} + is-binary-path@2.1.0: + resolution: {integrity: sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==} engines: {node: '>=8'} - string.prototype.matchall@4.0.11: - resolution: {integrity: sha512-NUdh0aDavY2og7IbBPenWqR9exH+E26Sv8e0/eTe1tltDGZL+GtBkDAnnyBtmekfK6/Dq3MkcGtzXFEd1LQrtg==} + is-boolean-object@1.1.2: + resolution: {integrity: sha512-gDYaKHJmnj4aWxyj6YHyXVpdQawtVLHU5cb+eztPGczf6cjuTdwve5ZIEfgXqH4e57An1D1AKf8CZ3kYrQRqYA==} engines: {node: '>= 0.4'} - string.prototype.repeat@1.0.0: - resolution: {integrity: sha512-0u/TldDbKD8bFCQ/4f5+mNRrXwZ8hg2w7ZR8wa16e8z9XpePWl3eGEcUD0OXpEH/VJH/2G3gjUtR3ZOiBe2S/w==} + is-callable@1.2.7: + resolution: {integrity: sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA==} + engines: {node: '>= 0.4'} - string.prototype.trim@1.2.9: - resolution: {integrity: sha512-klHuCNxiMZ8MlsOihJhJEBJAiMVqU3Z2nEXWfWnIqjN0gEFS9J9+IxKozWWtQGcgoa1WUZzLjKPTr4ZHNFTFxw==} + is-core-module@2.15.1: + resolution: {integrity: sha512-z0vtXSwucUJtANQWldhbtbt7BnL0vxiFjIdDLAatwhDYty2bad6s+rijD6Ri4YuYJubLzIJLUidCh09e1djEVQ==} engines: {node: '>= 0.4'} - string.prototype.trimend@1.0.8: - resolution: {integrity: sha512-p73uL5VCHCO2BZZ6krwwQE3kCzM7NKmis8S//xEC6fQonchbum4eP6kR4DLEjQFO3Wnj3Fuo8NM0kOSjVdHjZQ==} + is-data-view@1.0.1: + resolution: {integrity: sha512-AHkaJrsUVW6wq6JS8y3JnM/GJF/9cf+k20+iDzlSaJrinEo5+7vRiteOSwBhHRiAyQATN1AmY4hwzxJKPmYf+w==} + engines: {node: '>= 0.4'} - string.prototype.trimstart@1.0.8: - resolution: {integrity: sha512-UXSH262CSZY1tfu3G3Secr6uGLCFVPMhIqHjlgCUtCCcgihYc/xKs9djMTMUOb2j1mVSeU8EU6NWc/iQKU6Gfg==} + is-date-object@1.0.5: + resolution: {integrity: sha512-9YQaSxsAiSwcvS33MBk3wTCVnWK+HhF8VZR2jRxehM16QcVOdHqPn4VPHmRK4lSr38n9JriurInLcP90xsYNfQ==} engines: {node: '>= 0.4'} - string_decoder@1.3.0: - resolution: {integrity: sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==} + is-extglob@2.1.1: + resolution: {integrity: sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==} + engines: {node: '>=0.10.0'} - strip-ansi@6.0.1: - resolution: {integrity: sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==} - engines: {node: '>=8'} + is-finalizationregistry@1.0.2: + resolution: {integrity: sha512-0by5vtUJs8iFQb5TYUHHPudOR+qXYIMKtiUzvLIZITZUjknFmziyBJuLhVRc+Ds0dREFlskDNJKYIdIzu/9pfw==} - strip-bom@3.0.0: - resolution: {integrity: sha512-vavAMRXOgBVNF6nyEEmL3DBK19iRpDcoIwW+swQ+CbGiu7lju6t+JklA1MHweoWtadgt4ISVUsXLyDq34ddcwA==} - engines: {node: '>=4'} - - strip-bom@4.0.0: - resolution: {integrity: sha512-3xurFv5tEgii33Zi8Jtp55wEIILR9eh34FAW00PZf+JnSsTmV/ioewSgQl97JHvgjoRGwPShsWm+IdrxB35d0w==} + is-fullwidth-code-point@3.0.0: + resolution: {integrity: sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==} engines: {node: '>=8'} - strip-final-newline@2.0.0: - resolution: {integrity: sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA==} + is-generator-fn@2.1.0: + resolution: {integrity: sha512-cTIB4yPYL/Grw0EaSzASzg6bBy9gqCofvWN8okThAYIxKJZC+udlRAmGbM0XLeniEJSs8uEgHPGuHSe1XsOLSQ==} engines: {node: '>=6'} - strip-json-comments@2.0.1: - resolution: {integrity: sha512-4gB8na07fecVVkOI6Rs4e7T6NOTki5EmL7TUduTs6bu3EdnSycntVJ4re8kgZA+wx9IueI2Y11bfbgwtzuE0KQ==} + is-generator-function@1.0.10: + resolution: {integrity: sha512-jsEjy9l3yiXEQ+PsXdmBwEPcOxaXWLspKdplFUVI9vq1iZgIekeC0L167qeu86czQaxed3q/Uzuw0swL0irL8A==} + engines: {node: '>= 0.4'} + + is-glob@4.0.3: + resolution: {integrity: sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==} engines: {node: '>=0.10.0'} - strip-json-comments@3.1.1: - resolution: {integrity: sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==} + is-interactive@1.0.0: + resolution: {integrity: sha512-2HvIEKRoqS62guEC+qBjpvRubdX910WCMuJTZ+I9yvqKU2/12eSL549HMwtabb4oupdj2sMP50k+XJfB/8JE6w==} engines: {node: '>=8'} - styled-jsx@5.1.6: - resolution: {integrity: sha512-qSVyDTeMotdvQYoHWLNGwRFJHC+i+ZvdBRYosOFgC+Wg1vx4frN2/RG/NA7SYqqvKNLf39P2LSRA2pu6n0XYZA==} - engines: {node: '>= 12.0.0'} - peerDependencies: - '@babel/core': '*' - babel-plugin-macros: '*' - react: '>= 16.8.0 || 17.x.x || ^18.0.0-0 || ^19.0.0-0' - peerDependenciesMeta: - '@babel/core': - optional: true - babel-plugin-macros: - optional: true + is-lower-case@1.1.3: + resolution: {integrity: sha512-+5A1e/WJpLLXZEDlgz4G//WYSHyQBD32qa4Jd3Lw06qQlv3fJHnp3YIHjTQSGzHMgzmVKz2ZP3rBxTHkPw/lxA==} - supports-color@5.5.0: - resolution: {integrity: sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==} - engines: {node: '>=4'} + is-map@2.0.3: + resolution: {integrity: sha512-1Qed0/Hr2m+YqxnM09CjA2d/i6YZNfF6R2oRAOj36eUdS6qIV/huPJNSEpKbupewFs+ZsJlxsjjPbc0/afW6Lw==} + engines: {node: '>= 0.4'} - supports-color@7.2.0: - resolution: {integrity: sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==} + is-negative-zero@2.0.3: + resolution: {integrity: sha512-5KoIu2Ngpyek75jXodFvnafB6DJgr3u8uuK0LEZJjrU19DrMD3EVERaR8sjz8CCGgpZvxPl9SuE1GMVPFHx1mw==} + engines: {node: '>= 0.4'} + + is-number-object@1.0.7: + resolution: {integrity: sha512-k1U0IRzLMo7ZlYIfzRu23Oh6MiIFasgpb9X76eqfFZAqwH44UI4KTBvBYIZ1dSL9ZzChTB9ShHfLkR4pdW5krQ==} + engines: {node: '>= 0.4'} + + is-number@7.0.0: + resolution: {integrity: sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==} + engines: {node: '>=0.12.0'} + + is-path-cwd@2.2.0: + resolution: {integrity: sha512-w942bTcih8fdJPJmQHFzkS76NEP8Kzzvmw92cXsazb8intwLqPibPPdXf4ANdKV3rYMuuQYGIWtvz9JilB3NFQ==} + engines: {node: '>=6'} + + is-path-inside@3.0.3: + resolution: {integrity: sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ==} engines: {node: '>=8'} - supports-color@8.1.1: - resolution: {integrity: sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==} - engines: {node: '>=10'} + is-regex@1.1.4: + resolution: {integrity: sha512-kvRdxDsxZjhzUX07ZnLydzS1TU/TJlTUHHY4YLL87e37oUA49DfkLqgy+VjFocowy29cKvcSiu+kIv728jTTVg==} + engines: {node: '>= 0.4'} - supports-preserve-symlinks-flag@1.0.0: - resolution: {integrity: sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==} + is-set@2.0.3: + resolution: {integrity: sha512-iPAjerrse27/ygGLxw+EBR9agv9Y6uLeYVJMu+QNCoouJ1/1ri0mGrcWpfCqFZuzzx3WjtwxG098X+n4OuRkPg==} engines: {node: '>= 0.4'} - swap-case@1.1.2: - resolution: {integrity: sha512-BAmWG6/bx8syfc6qXPprof3Mn5vQgf5dwdUNJhsNqU9WdPt5P+ES/wQ5bxfijy8zwZgZZHslC3iAsxsuQMCzJQ==} + is-shared-array-buffer@1.0.3: + resolution: {integrity: sha512-nA2hv5XIhLR3uVzDDfCIknerhx8XUKnstuOERPNNIinXG7v9u+ohXF67vxm4TPTEPU6lm61ZkwP3c9PCB97rhg==} + engines: {node: '>= 0.4'} - term-size@2.2.1: - resolution: {integrity: sha512-wK0Ri4fOGjv/XPy8SBHZChl8CM7uMc5VML7SqiQ0zG7+J5Vr+RMQDoHa2CNT6KHUnTGIXH34UDMkPzAUyapBZg==} + is-stream@2.0.1: + resolution: {integrity: sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==} engines: {node: '>=8'} - test-exclude@6.0.0: - resolution: {integrity: sha512-cAGWPIyOHU6zlmg88jwm7VRyXnMN7iV68OGAbYDk/Mh/xC/pzVPlQtY6ngoIH/5/tciuhGfvESU8GrHrcxD56w==} + is-string@1.0.7: + resolution: {integrity: sha512-tE2UXzivje6ofPW7l23cjDOMa09gb7xlAqG6jG5ej6uPV32TlWP3NKPigtaGeHNu9fohccRYvIiZMfOOnOYUtg==} + engines: {node: '>= 0.4'} + + is-subdir@1.2.0: + resolution: {integrity: sha512-2AT6j+gXe/1ueqbW6fLZJiIw3F8iXGJtt0yDrZaBhAZEG1raiTxKWU+IPqMCzQAXOUCKdA4UDMgacKH25XG2Cw==} + engines: {node: '>=4'} + + is-symbol@1.0.4: + resolution: {integrity: sha512-C/CPBqKWnvdcxqIARxyOh4v1UUEOCHpgDa0WYgpKDFMszcrPcffg5uhwSgPCLD2WWxmq6isisz87tzT01tuGhg==} + engines: {node: '>= 0.4'} + + is-typed-array@1.1.13: + resolution: {integrity: sha512-uZ25/bUAlUY5fR4OKT4rZQEBrzQWYV9ZJYGGsUmEJ6thodVJ1HX64ePQ6Z0qPWP+m+Uq6e9UugrE38jeYsDSMw==} + engines: {node: '>= 0.4'} + + is-unicode-supported@0.1.0: + resolution: {integrity: sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw==} + engines: {node: '>=10'} + + is-upper-case@1.1.2: + resolution: {integrity: sha512-GQYSJMgfeAmVwh9ixyk888l7OIhNAGKtY6QA+IrWlu9MDTCaXmeozOZ2S9Knj7bQwBO/H6J2kb+pbyTUiMNbsw==} + + is-weakmap@2.0.2: + resolution: {integrity: sha512-K5pXYOm9wqY1RgjpL3YTkF39tni1XajUIkawTLUo9EZEVUFga5gSQJF8nNS7ZwJQ02y+1YCNYcMh+HIf1ZqE+w==} + engines: {node: '>= 0.4'} + + is-weakref@1.0.2: + resolution: {integrity: sha512-qctsuLZmIQ0+vSSMfoVvyFe2+GSEvnmZ2ezTup1SBse9+twCCeial6EEi3Nc2KFcf6+qz2FBPnjXsk8xhKSaPQ==} + + is-weakset@2.0.3: + resolution: {integrity: sha512-LvIm3/KWzS9oRFHugab7d+M/GcBXuXX5xZkzPmN+NxihdQlZUQ4dWuSV1xR/sq6upL1TJEDrfBgRepHFdBtSNQ==} + engines: {node: '>= 0.4'} + + is-windows@1.0.2: + resolution: {integrity: sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA==} + engines: {node: '>=0.10.0'} + + isarray@1.0.0: + resolution: {integrity: sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ==} + + isarray@2.0.5: + resolution: {integrity: sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==} + + isbinaryfile@4.0.10: + resolution: {integrity: sha512-iHrqe5shvBUcFbmZq9zOQHBoeOhZJu6RQGrDpBgenUm/Am+F3JM2MgQj+rK3Z601fzrL5gLZWtAPH2OBaSVcyw==} + engines: {node: '>= 8.0.0'} + + isexe@2.0.0: + resolution: {integrity: sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==} + + isows@1.0.6: + resolution: {integrity: sha512-lPHCayd40oW98/I0uvgaHKWCSvkzY27LjWLbtzOm64yQ+G3Q5npjjbdppU65iZXkK1Zt+kH9pfegli0AYfwYYw==} + peerDependencies: + ws: '*' + + istanbul-lib-coverage@3.2.2: + resolution: {integrity: sha512-O8dpsF+r0WV/8MNRKfnmrtCWhuKjxrq2w+jpzBL5UZKTi2LeVWnWOmWRxFlesJONmc+wLAGvKQZEOanko0LFTg==} engines: {node: '>=8'} - through@2.3.8: - resolution: {integrity: sha512-w89qg7PI8wAdvX60bMDP+bFoD5Dvhm9oLheFp5O4a2QF0cSBGsBX4qZmadPMvVqlLJBBci+WqGGOAPvcDeNSVg==} + istanbul-lib-instrument@5.2.1: + resolution: {integrity: sha512-pzqtp31nLv/XFOzXGuvhCb8qhjmTVo5vjVk19XE4CRlSWz0KoeJ3bw9XsA7nOp9YBf4qHjwBxkDzKcME/J29Yg==} + engines: {node: '>=8'} - tinycolor2@1.6.0: - resolution: {integrity: sha512-XPaBkWQJdsf3pLKJV9p4qN/S+fm2Oj8AIPo1BTUhg5oxkvm9+SVEGFdhyOz7tTdUTfvxMiAs4sp6/eZO2Ew+pw==} + istanbul-lib-instrument@6.0.3: + resolution: {integrity: sha512-Vtgk7L/R2JHyyGW07spoFlB8/lpjiOLTjMdms6AFMraYt3BaJauod/NGrfnVG/y4Ix1JEuMRPDPEj2ua+zz1/Q==} + engines: {node: '>=10'} - tinygradient@1.1.5: - resolution: {integrity: sha512-8nIfc2vgQ4TeLnk2lFj4tRLvvJwEfQuabdsmvDdQPT0xlk9TaNtpGd6nNRxXoK6vQhN6RSzj+Cnp5tTQmpxmbw==} + istanbul-lib-report@3.0.1: + resolution: {integrity: sha512-GCfE1mtsHGOELCU8e/Z7YWzpmybrx/+dSTfLrvY8qRmaY6zXTKWn6WQIjaAFw069icm6GVMNkgu0NzI4iPZUNw==} + engines: {node: '>=10'} - title-case@2.1.1: - resolution: {integrity: sha512-EkJoZ2O3zdCz3zJsYCsxyq2OC5hrxR9mfdd5I+w8h/tmFfeOxJ+vvkxsKxdmN0WtS9zLdHEgfgVOiMVgv+Po4Q==} + istanbul-lib-source-maps@4.0.1: + resolution: {integrity: sha512-n3s8EwkdFIJCG3BPKBYvskgXGoy88ARzvegkitk60NxRdwltLOTaH7CUiMRXvwYorl0Q712iEjcWB+fK/MrWVw==} + engines: {node: '>=10'} - tmp@0.0.33: - resolution: {integrity: sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw==} - engines: {node: '>=0.6.0'} + istanbul-reports@3.1.7: + resolution: {integrity: sha512-BewmUXImeuRk2YY0PVbxgKAysvhRPUQE0h5QRM++nVWyubKGV0l8qQ5op8+B2DOmwSe63Jivj0BjkPQVf8fP5g==} + engines: {node: '>=8'} - tmpl@1.0.5: - resolution: {integrity: sha512-3f0uOEAQwIqGuWW2MVzYg8fV/QNnc/IpuJNG837rLuczAaLVHslWHZQj4IGiEl5Hs3kkbhwL9Ab7Hrsmuj+Smw==} + iterator.prototype@1.1.3: + resolution: {integrity: sha512-FW5iMbeQ6rBGm/oKgzq2aW4KvAGpxPzYES8N4g4xNXUKpL1mclMvOe+76AcLDTvD+Ze+sOpVhgdAQEKF4L9iGQ==} + engines: {node: '>= 0.4'} - to-regex-range@5.0.1: - resolution: {integrity: sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==} - engines: {node: '>=8.0'} + jackspeak@4.1.0: + resolution: {integrity: sha512-9DDdhb5j6cpeitCbvLO7n7J4IxnbM6hoF6O1g4HQ5TfhvvKN8ywDM7668ZhMHRqVmxqhps/F6syWK2KcPxYlkw==} + engines: {node: 20 || >=22} - touch@3.1.1: - resolution: {integrity: sha512-r0eojU4bI8MnHr8c5bNo7lJDdI2qXlWWJk6a9EAFG7vbhTjElYhBVS3/miuE0uOuoLdb8Mc/rVfsmm6eo5o9GA==} + jake@10.9.2: + resolution: {integrity: sha512-2P4SQ0HrLQ+fw6llpLnOaGAvN2Zu6778SJMrCUwns4fOoG9ayrTiZk3VV8sCPkVZF8ab0zksVpS8FDY5pRCNBA==} + engines: {node: '>=10'} hasBin: true - tree-kill@1.2.2: - resolution: {integrity: sha512-L0Orpi8qGpRG//Nd+H90vFB+3iHnue1zSSGmNOOCh1GLJ7rUKVwV2HvijphGQS2UmhUZewS9VgvxYIdgr+fG1A==} - hasBin: true + jest-changed-files@29.7.0: + resolution: {integrity: sha512-fEArFiwf1BpQ+4bXSprcDc3/x4HSzL4al2tozwVpDFpsxALjLYdyiIK4e5Vz66GQJIbXJ82+35PtysofptNX2w==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} - ts-api-utils@1.4.0: - resolution: {integrity: sha512-032cPxaEKwM+GT3vA5JXNzIaizx388rhsSW79vGRNGXfRRAdEAn2mvk36PvK5HnOchyWZ7afLEXqYCvPCrzuzQ==} - engines: {node: '>=16'} - peerDependencies: - typescript: '>=4.2.0' + jest-circus@29.7.0: + resolution: {integrity: sha512-3E1nCMgipcTkCocFwM90XXQab9bS+GMsjdpmPrlelaxwD93Ad8iVEjX/vvHPdLPnFf+L40u+5+iutRdA1N9myw==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} - ts-jest@29.2.6: - resolution: {integrity: sha512-yTNZVZqc8lSixm+QGVFcPe6+yj7+TWZwIesuOWvfcn4B9bz5x4NDzVCQQjOs7Hfouu36aEqfEbo9Qpo+gq8dDg==} - engines: {node: ^14.15.0 || ^16.10.0 || ^18.0.0 || >=20.0.0} + jest-cli@29.7.0: + resolution: {integrity: sha512-OVVobw2IubN/GSYsxETi+gOe7Ka59EFMR/twOU3Jb2GnKKeMGJB5SGUUrEz3SFVmJASUdZUzy83sLNNQ2gZslg==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} hasBin: true peerDependencies: - '@babel/core': '>=7.0.0-beta.0 <8' - '@jest/transform': ^29.0.0 - '@jest/types': ^29.0.0 - babel-jest: ^29.0.0 - esbuild: '*' - jest: ^29.0.0 - typescript: '>=4.3 <6' + node-notifier: ^8.0.1 || ^9.0.0 || ^10.0.0 peerDependenciesMeta: - '@babel/core': - optional: true - '@jest/transform': - optional: true - '@jest/types': - optional: true - babel-jest: - optional: true - esbuild: + node-notifier: optional: true - ts-node@10.9.2: - resolution: {integrity: sha512-f0FFpIdcHgn8zcPSbf1dRevwt047YMnaiJM3u2w2RewrB+fob/zePZcrOyQoLMMO7aBIddLcQIEK5dYjkLnGrQ==} - hasBin: true + jest-config@29.7.0: + resolution: {integrity: sha512-uXbpfeQ7R6TZBqI3/TxCU4q4ttk3u0PJeC+E0zbfSoSjq6bJ7buBPxzQPL0ifrkY4DNu4JUdk0ImlBUYi840eQ==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} peerDependencies: - '@swc/core': '>=1.2.50' - '@swc/wasm': '>=1.2.50' '@types/node': '*' - typescript: '>=2.7' + ts-node: '>=9.0.0' peerDependenciesMeta: - '@swc/core': + '@types/node': optional: true - '@swc/wasm': + ts-node: optional: true - tslib@1.14.1: - resolution: {integrity: sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==} + jest-diff@29.7.0: + resolution: {integrity: sha512-LMIgiIrhigmPrs03JHpxUh2yISK3vLFPkAodPeo0+BuF7wA2FoQbkEg1u8gBYBThncu7e1oEDUfIXVuTqLRUjw==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} - tslib@2.8.1: - resolution: {integrity: sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==} + jest-docblock@29.7.0: + resolution: {integrity: sha512-q617Auw3A612guyaFgsbFeYpNP5t2aoUNLwBUbc/0kD1R4t9ixDbyFTHd1nok4epoVFpr7PmeWHrhvuV3XaJ4g==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} - turbo-darwin-64@2.5.0: - resolution: {integrity: sha512-fP1hhI9zY8hv0idym3hAaXdPi80TLovmGmgZFocVAykFtOxF+GlfIgM/l4iLAV9ObIO4SUXPVWHeBZQQ+Hpjag==} - cpu: [x64] - os: [darwin] + jest-each@29.7.0: + resolution: {integrity: sha512-gns+Er14+ZrEoC5fhOfYCY1LOHHr0TI+rQUHZS8Ttw2l7gl+80eHc/gFf2Ktkw0+SIACDTeWvpFcv3B04VembQ==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + + jest-environment-node@29.7.0: + resolution: {integrity: sha512-DOSwCRqXirTOyheM+4d5YZOrWcdu0LNZ87ewUoywbcb2XR4wKgqiG8vNeYwhjFMbEkfju7wx2GYH0P2gevGvFw==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + + jest-get-type@29.6.3: + resolution: {integrity: sha512-zrteXnqYxfQh7l5FHyL38jL39di8H8rHoecLH3JNxH3BwOrBsNeabdap5e0I23lD4HHI8W5VFBZqG4Eaq5LNcw==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + + jest-haste-map@29.7.0: + resolution: {integrity: sha512-fP8u2pyfqx0K1rGn1R9pyE0/KTn+G7PxktWidOBTqFPLYX0b9ksaMFkhK5vrS3DVun09pckLdlx90QthlW7AmA==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + + jest-leak-detector@29.7.0: + resolution: {integrity: sha512-kYA8IJcSYtST2BY9I+SMC32nDpBT3J2NvWJx8+JCuCdl/CR1I4EKUJROiP8XtCcxqgTTBGJNdbB1A8XRKbTetw==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + + jest-matcher-utils@29.7.0: + resolution: {integrity: sha512-sBkD+Xi9DtcChsI3L3u0+N0opgPYnCRPtGcQYrgXmR+hmt/fYfWAL0xRXYU8eWOdfuLgBe0YCW3AFtnRLagq/g==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + + jest-message-util@29.7.0: + resolution: {integrity: sha512-GBEV4GRADeP+qtB2+6u61stea8mGcOT4mCtrYISZwfu9/ISHFJ/5zOMXYbpBE9RsS5+Gb63DW4FgmnKJ79Kf6w==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + + jest-mock@29.7.0: + resolution: {integrity: sha512-ITOMZn+UkYS4ZFh83xYAOzWStloNzJFO2s8DWrE4lhtGD+AorgnbkiKERe4wQVBydIGPx059g6riW5Btp6Llnw==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + + jest-pnp-resolver@1.2.3: + resolution: {integrity: sha512-+3NpwQEnRoIBtx4fyhblQDPgJI0H1IEIkX7ShLUjPGA7TtUTvI1oiKi3SR4oBR0hQhQR80l4WAe5RrXBwWMA8w==} + engines: {node: '>=6'} + peerDependencies: + jest-resolve: '*' + peerDependenciesMeta: + jest-resolve: + optional: true + + jest-regex-util@29.6.3: + resolution: {integrity: sha512-KJJBsRCyyLNWCNBOvZyRDnAIfUiRJ8v+hOBQYGn8gDyF3UegwiP4gwRR3/SDa42g1YbVycTidUF3rKjyLFDWbg==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + + jest-resolve-dependencies@29.7.0: + resolution: {integrity: sha512-un0zD/6qxJ+S0et7WxeI3H5XSe9lTBBR7bOHCHXkKR6luG5mwDDlIzVQ0V5cZCuoTgEdcdwzTghYkTWfubi+nA==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + + jest-resolve@29.7.0: + resolution: {integrity: sha512-IOVhZSrg+UvVAshDSDtHyFCCBUl/Q3AAJv8iZ6ZjnZ74xzvwuzLXid9IIIPgTnY62SJjfuupMKZsZQRsCvxEgA==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + + jest-runner@29.7.0: + resolution: {integrity: sha512-fsc4N6cPCAahybGBfTRcq5wFR6fpLznMg47sY5aDpsoejOcVYFb07AHuSnR0liMcPTgBsA3ZJL6kFOjPdoNipQ==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + + jest-runtime@29.7.0: + resolution: {integrity: sha512-gUnLjgwdGqW7B4LvOIkbKs9WGbn+QLqRQQ9juC6HndeDiezIwhDP+mhMwHWCEcfQ5RUXa6OPnFF8BJh5xegwwQ==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + + jest-snapshot@29.7.0: + resolution: {integrity: sha512-Rm0BMWtxBcioHr1/OX5YCP8Uov4riHvKPknOGs804Zg9JGZgmIBkbtlxJC/7Z4msKYVbIJtfU+tKb8xlYNfdkw==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + + jest-util@29.7.0: + resolution: {integrity: sha512-z6EbKajIpqGKU56y5KBUgy1dt1ihhQJgWzUlZHArA/+X2ad7Cb5iF+AK1EWVL/Bo7Rz9uurpqw6SiBCefUbCGA==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + + jest-validate@29.7.0: + resolution: {integrity: sha512-ZB7wHqaRGVw/9hST/OuFUReG7M8vKeq0/J2egIGLdvjHCmYqGARhzXmtgi+gVeZ5uXFF219aOc3Ls2yLg27tkw==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + + jest-watcher@29.7.0: + resolution: {integrity: sha512-49Fg7WXkU3Vl2h6LbLtMQ/HyB6rXSIX7SqvBLQmssRBGN9I0PNvPmAmCWSOY6SOvrjhI/F7/bGAv9RtnsPA03g==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + + jest-worker@29.7.0: + resolution: {integrity: sha512-eIz2msL/EzL9UFTFFx7jBTkeZfku0yUAyZZZmJ93H2TYEiroIx2PQjEXcwYtYl8zXCxb+PAmA2hLIt/6ZEkPHw==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + + jest@29.7.0: + resolution: {integrity: sha512-NIy3oAFp9shda19hy4HK0HRTWKtPJmGdnvywu01nOqNC2vZg+Z+fvJDxpMQA88eb2I9EcafcdjYgsDthnYTvGw==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + hasBin: true + peerDependencies: + node-notifier: ^8.0.1 || ^9.0.0 || ^10.0.0 + peerDependenciesMeta: + node-notifier: + optional: true + + jiti@2.4.2: + resolution: {integrity: sha512-rg9zJN+G4n2nfJl5MW3BMygZX56zKPNVEYYqq7adpmMh4Jn2QNEwhvQlFy6jPVdcod7txZtKHWnyZiA3a0zP7A==} + hasBin: true + + jotai@2.12.3: + resolution: {integrity: sha512-DpoddSkmPGXMFtdfnoIHfueFeGP643nqYUWC6REjUcME+PG2UkAtYnLbffRDw3OURI9ZUTcRWkRGLsOvxuWMCg==} + engines: {node: '>=12.20.0'} + peerDependencies: + '@types/react': '>=17.0.0' + react: '>=17.0.0' + peerDependenciesMeta: + '@types/react': + optional: true + react: + optional: true + + js-base64@3.7.7: + resolution: {integrity: sha512-7rCnleh0z2CkXhH67J8K1Ytz0b2Y+yxTPL+/KOJoa20hfnVQ/3/T6W/KflYI4bRHRagNeXeU2bkNGI3v1oS/lw==} + + js-tokens@4.0.0: + resolution: {integrity: sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==} + + js-yaml@3.14.1: + resolution: {integrity: sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==} + hasBin: true + + js-yaml@4.1.0: + resolution: {integrity: sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==} + hasBin: true + + jsbn@1.1.0: + resolution: {integrity: sha512-4bYVV3aAMtDTTu4+xsDYa6sy9GyJ69/amsu9sYF2zqjiEoZA5xJi3BrfX3uY+/IekIu7MwdObdbDWpoZdBv3/A==} + + jsesc@3.1.0: + resolution: {integrity: sha512-/sM3dO2FOzXjKQhJuo0Q173wf2KOo8t4I8vHy6lF9poUp7bKT0/NHE8fPX23PwfhnykfqnC2xRxOnVw5XuGIaA==} + engines: {node: '>=6'} + hasBin: true + + json-buffer@3.0.1: + resolution: {integrity: sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==} + + json-parse-even-better-errors@2.3.1: + resolution: {integrity: sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==} + + json-rpc-engine@6.1.0: + resolution: {integrity: sha512-NEdLrtrq1jUZyfjkr9OCz9EzCNhnRyWtt1PAnvnhwy6e8XETS0Dtc+ZNCO2gvuAoKsIn2+vCSowXTYE4CkgnAQ==} + engines: {node: '>=10.0.0'} + + json-rpc-random-id@1.0.1: + resolution: {integrity: sha512-RJ9YYNCkhVDBuP4zN5BBtYAzEl03yq/jIIsyif0JY9qyJuQQZNeDK7anAPKKlyEtLSj2s8h6hNh2F8zO5q7ScA==} + + json-schema-traverse@0.4.1: + resolution: {integrity: sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==} + + json-stable-stringify-without-jsonify@1.0.1: + resolution: {integrity: sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==} + + json5@2.2.3: + resolution: {integrity: sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==} + engines: {node: '>=6'} + hasBin: true + + jsonfile@4.0.0: + resolution: {integrity: sha512-m6F1R3z8jjlf2imQHS2Qez5sjKWQzbuuhuJ/FKYFRZvPE3PuHcSMVZzfsLhGVOkfd20obL5SWEBew5ShlquNxg==} + + jsonfile@6.1.0: + resolution: {integrity: sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==} + + jsx-ast-utils@3.3.5: + resolution: {integrity: sha512-ZZow9HBI5O6EPgSJLUb8n2NKgmVWTwCvHGwFuJlMjvLFqlGG6pjirPhtdsseaLZjSibD8eegzmYpUZwoIlj2cQ==} + engines: {node: '>=4.0'} + + jwt-decode@4.0.0: + resolution: {integrity: sha512-+KJGIyHgkGuIq3IEBNftfhW/LfWhXUIY6OmyVWjliu5KH1y0fw7VQ8YndE2O4qZdMSd9SqbnC8GOcZEy0Om7sA==} + engines: {node: '>=18'} + + keccak@3.0.4: + resolution: {integrity: sha512-3vKuW0jV8J3XNTzvfyicFR5qvxrSAGl7KIhvgOu5cmWwM7tZRj3fMbj/pfIf4be7aznbc+prBWGjywox/g2Y6Q==} + engines: {node: '>=10.0.0'} + + keyv@4.5.4: + resolution: {integrity: sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw==} + + keyvaluestorage-interface@1.0.0: + resolution: {integrity: sha512-8t6Q3TclQ4uZynJY9IGr2+SsIGwK9JHcO6ootkHCGA0CrQCRy+VkouYNO2xicET6b9al7QKzpebNow+gkpCL8g==} + + kleur@3.0.3: + resolution: {integrity: sha512-eTIzlVOSUR+JxdDFepEYcBMtZ9Qqdef+rnzWdRZuMbOywu5tO2w2N7rqjoANZ5k9vywhL6Br1VRjUIgTQx4E8w==} + engines: {node: '>=6'} + + lefthook-darwin-arm64@1.11.10: + resolution: {integrity: sha512-Rufl8BRP77GRFtgNwW95/FHPD0VDfu5bRyzASPcyVrFczJiBK1glAHRdYrErBDNqJhEEjkyv9+EkCZS/MnDKPQ==} + cpu: [arm64] + os: [darwin] + + lefthook-darwin-x64@1.11.10: + resolution: {integrity: sha512-3ReMyC103S+RozcYQlej9RVa1tKr9t8/PGqXbCiWcPAgA9To3GywPk8533qzTs7Nz9fYDiqJMYyQoXovX0Q4SA==} + cpu: [x64] + os: [darwin] + + lefthook-freebsd-arm64@1.11.10: + resolution: {integrity: sha512-UQOdQuvoVEe0HnoVX4Uz8beegndBDKE6Igo5flV3OkrBuO1Cz7dGbTQwzsYg6gBLYUOa8Ecb3Xur80oviQqwnA==} + cpu: [arm64] + os: [freebsd] + + lefthook-freebsd-x64@1.11.10: + resolution: {integrity: sha512-IkoywmTzw9dKDtN34HJ8AZkbY3CGu1XpAVU08pIIvlhv0y7PlLGHYTdmx90SC1d4FhTlTMyiANgXyIaAnXjucw==} + cpu: [x64] + os: [freebsd] + + lefthook-linux-arm64@1.11.10: + resolution: {integrity: sha512-l/lH4FSljNSIetcptPKLI5sTBpjS6dJZ4gk9oXoGM0ftvb22AlLcZI4l6NFCC1oLVWM0CbhkbStDGTI5txsVaA==} + cpu: [arm64] + os: [linux] + + lefthook-linux-x64@1.11.10: + resolution: {integrity: sha512-yAIIP711p7t0Z9zLfPtdSx1d7pSgtnuVC5B9PANud3I0JOs82aCzmqpc9Q/zp+imWXdI2PpZlFyKx8GLrDW5BQ==} + cpu: [x64] + os: [linux] + + lefthook-openbsd-arm64@1.11.10: + resolution: {integrity: sha512-OAqg9BLsTaeioCJduzZrRLupA2dhTOwHOX0GkO4HTSrOD85JuEPqr5RbYoJ7zuzTQcJEXTJYzaeATM2QHjp/aQ==} + cpu: [arm64] + os: [openbsd] + + lefthook-openbsd-x64@1.11.10: + resolution: {integrity: sha512-EiUU3mFvqcUdnj3gt0V0gRpQQp0b70cLDSA0LgZyFMM4UimeMbA7OgNYl72RKJgrHcTPHrQc4Vj7Mowbhb/X5w==} + cpu: [x64] + os: [openbsd] + + lefthook-windows-arm64@1.11.10: + resolution: {integrity: sha512-clKfI95dCpzxJ1zVgcuYWlSl2oNbtAALoMGqYrzJsoy+CAi+vIs54sqJoGOE60+zrVbdk65z8hriCoYNr98SgA==} + cpu: [arm64] + os: [win32] + + lefthook-windows-x64@1.11.10: + resolution: {integrity: sha512-zpf/0sG50xsGnwVG/a2giUbmaM/g0uIRqxN5qBbmwKCf0P4PPD2r1xiFZNDb520+tUTC1lWe0RWVoSSwZbBQRA==} + cpu: [x64] + os: [win32] + + lefthook@1.11.10: + resolution: {integrity: sha512-nuiRqBADcRiU6dzwf2H1zBCsdcWGEOsxY8hqoXw5nkEuoTEYN1Bwi2vskHXjIzJ62iCOCo4FZhcHBAzT9gwL5g==} + hasBin: true + + leven@3.1.0: + resolution: {integrity: sha512-qsda+H8jTaUaN/x5vzW2rzc+8Rw4TAQ/4KjB46IwK5VH+IlVeeeje/EoZRpiXvIqjFgK84QffqPztGI3VBLG1A==} + engines: {node: '>=6'} + + levn@0.4.1: + resolution: {integrity: sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==} + engines: {node: '>= 0.8.0'} + + lightningcss-darwin-arm64@1.29.2: + resolution: {integrity: sha512-cK/eMabSViKn/PG8U/a7aCorpeKLMlK0bQeNHmdb7qUnBkNPnL+oV5DjJUo0kqWsJUapZsM4jCfYItbqBDvlcA==} + engines: {node: '>= 12.0.0'} + cpu: [arm64] + os: [darwin] + + lightningcss-darwin-x64@1.29.2: + resolution: {integrity: sha512-j5qYxamyQw4kDXX5hnnCKMf3mLlHvG44f24Qyi2965/Ycz829MYqjrVg2H8BidybHBp9kom4D7DR5VqCKDXS0w==} + engines: {node: '>= 12.0.0'} + cpu: [x64] + os: [darwin] + + lightningcss-freebsd-x64@1.29.2: + resolution: {integrity: sha512-wDk7M2tM78Ii8ek9YjnY8MjV5f5JN2qNVO+/0BAGZRvXKtQrBC4/cn4ssQIpKIPP44YXw6gFdpUF+Ps+RGsCwg==} + engines: {node: '>= 12.0.0'} + cpu: [x64] + os: [freebsd] + + lightningcss-linux-arm-gnueabihf@1.29.2: + resolution: {integrity: sha512-IRUrOrAF2Z+KExdExe3Rz7NSTuuJ2HvCGlMKoquK5pjvo2JY4Rybr+NrKnq0U0hZnx5AnGsuFHjGnNT14w26sg==} + engines: {node: '>= 12.0.0'} + cpu: [arm] + os: [linux] + + lightningcss-linux-arm64-gnu@1.29.2: + resolution: {integrity: sha512-KKCpOlmhdjvUTX/mBuaKemp0oeDIBBLFiU5Fnqxh1/DZ4JPZi4evEH7TKoSBFOSOV3J7iEmmBaw/8dpiUvRKlQ==} + engines: {node: '>= 12.0.0'} + cpu: [arm64] + os: [linux] + + lightningcss-linux-arm64-musl@1.29.2: + resolution: {integrity: sha512-Q64eM1bPlOOUgxFmoPUefqzY1yV3ctFPE6d/Vt7WzLW4rKTv7MyYNky+FWxRpLkNASTnKQUaiMJ87zNODIrrKQ==} + engines: {node: '>= 12.0.0'} + cpu: [arm64] + os: [linux] + + lightningcss-linux-x64-gnu@1.29.2: + resolution: {integrity: sha512-0v6idDCPG6epLXtBH/RPkHvYx74CVziHo6TMYga8O2EiQApnUPZsbR9nFNrg2cgBzk1AYqEd95TlrsL7nYABQg==} + engines: {node: '>= 12.0.0'} + cpu: [x64] + os: [linux] + + lightningcss-linux-x64-musl@1.29.2: + resolution: {integrity: sha512-rMpz2yawkgGT8RULc5S4WiZopVMOFWjiItBT7aSfDX4NQav6M44rhn5hjtkKzB+wMTRlLLqxkeYEtQ3dd9696w==} + engines: {node: '>= 12.0.0'} + cpu: [x64] + os: [linux] + + lightningcss-win32-arm64-msvc@1.29.2: + resolution: {integrity: sha512-nL7zRW6evGQqYVu/bKGK+zShyz8OVzsCotFgc7judbt6wnB2KbiKKJwBE4SGoDBQ1O94RjW4asrCjQL4i8Fhbw==} + engines: {node: '>= 12.0.0'} + cpu: [arm64] + os: [win32] + + lightningcss-win32-x64-msvc@1.29.2: + resolution: {integrity: sha512-EdIUW3B2vLuHmv7urfzMI/h2fmlnOQBk1xlsDxkN1tCWKjNFjfLhGxYk8C8mzpSfr+A6jFFIi8fU6LbQGsRWjA==} + engines: {node: '>= 12.0.0'} + cpu: [x64] + os: [win32] + + lightningcss@1.29.2: + resolution: {integrity: sha512-6b6gd/RUXKaw5keVdSEtqFVdzWnU5jMxTUjA2bVcMNPLwSQ08Sv/UodBVtETLCn7k4S1Ibxwh7k68IwLZPgKaA==} + engines: {node: '>= 12.0.0'} + + lines-and-columns@1.2.4: + resolution: {integrity: sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==} + + lit-element@3.3.3: + resolution: {integrity: sha512-XbeRxmTHubXENkV4h8RIPyr8lXc+Ff28rkcQzw3G6up2xg5E8Zu1IgOWIwBLEQsu3cOVFqdYwiVi0hv0SlpqUA==} + + lit-html@2.8.0: + resolution: {integrity: sha512-o9t+MQM3P4y7M7yNzqAyjp7z+mQGa4NS4CxiyLqFPyFWyc4O+nodLrkrxSaCTrla6M5YOLaT3RpbbqjszB5g3Q==} + + lit@2.8.0: + resolution: {integrity: sha512-4Sc3OFX9QHOJaHbmTMk28SYgVxLN3ePDjg7hofEft2zWlehFL3LiAuapWc4U/kYwMYJSh2hTCPZ6/LIC7ii0MA==} + + locate-path@5.0.0: + resolution: {integrity: sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==} + engines: {node: '>=8'} + + locate-path@6.0.0: + resolution: {integrity: sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==} + engines: {node: '>=10'} + + lodash.get@4.4.2: + resolution: {integrity: sha512-z+Uw/vLuy6gQe8cfaFWD7p0wVv8fJl3mbzXh33RS+0oW2wvUqiRXiQ69gLWSLpgB5/6sU+r6BlQR0MBILadqTQ==} + deprecated: This package is deprecated. Use the optional chaining (?.) operator instead. + + lodash.memoize@4.1.2: + resolution: {integrity: sha512-t7j+NzmgnQzTAYXcsHYLgimltOV1MXHtlOWf6GjL9Kj8GK5FInw5JotxvbOs+IvV1/Dzo04/fCGfLVs7aXb4Ag==} + + lodash.merge@4.6.2: + resolution: {integrity: sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==} + + lodash.startcase@4.4.0: + resolution: {integrity: sha512-+WKqsK294HMSc2jEbNgpHpd0JfIBhp7rEV4aqXWqFr6AlXov+SlcgB1Fv01y2kGe3Gc8nMW7VA0SrGuSkRfIEg==} + + lodash@4.17.21: + resolution: {integrity: sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==} + + log-symbols@3.0.0: + resolution: {integrity: sha512-dSkNGuI7iG3mfvDzUuYZyvk5dD9ocYCYzNU6CYDE6+Xqd+gwme6Z00NS3dUh8mq/73HaEtT7m6W+yUPtU6BZnQ==} + engines: {node: '>=8'} + + log-symbols@4.1.0: + resolution: {integrity: sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg==} + engines: {node: '>=10'} + + loose-envify@1.4.0: + resolution: {integrity: sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==} + hasBin: true + + lower-case-first@1.0.2: + resolution: {integrity: sha512-UuxaYakO7XeONbKrZf5FEgkantPf5DUqDayzP5VXZrtRPdH86s4kN47I8B3TW10S4QKiE3ziHNf3kRN//okHjA==} + + lower-case@1.1.4: + resolution: {integrity: sha512-2Fgx1Ycm599x+WGpIYwJOvsjmXFzTSc34IwDWALRA/8AopUKAVPwfJ+h5+f85BCp0PWmmJcWzEpxOpoXycMpdA==} + + lru-cache@10.4.3: + resolution: {integrity: sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ==} + + lru-cache@11.1.0: + resolution: {integrity: sha512-QIXZUBJUx+2zHUdQujWejBkcD9+cs94tLn0+YL8UrCh+D5sCXZ4c7LaEH48pNwRY3MLDgqUFyhlCyjJPf1WP0A==} + engines: {node: 20 || >=22} + + lru-cache@5.1.1: + resolution: {integrity: sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==} + + lru-cache@7.18.3: + resolution: {integrity: sha512-jumlc0BIUrS3qJGgIkWZsyfAM7NCWiBcCDhnd+3NNM5KbBmLTgHVfWBcg6W+rLUsIpzpERPsvwUP7CckAQSOoA==} + engines: {node: '>=12'} + + make-dir@4.0.0: + resolution: {integrity: sha512-hXdUTZYIVOt1Ex//jAQi+wTZZpUpwBj/0QsOzqegb3rGMMeJiSEu5xLHnYfBrRV4RH2+OCSOO95Is/7x1WJ4bw==} + engines: {node: '>=10'} + + make-error@1.3.6: + resolution: {integrity: sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==} + + makeerror@1.0.12: + resolution: {integrity: sha512-JmqCvUhmt43madlpFzG4BQzG2Z3m6tvQDNKdClZnO3VbIudJYmxsT0FNJMeiB2+JTSlTQTSbU8QdesVmwJcmLg==} + + math-intrinsics@1.1.0: + resolution: {integrity: sha512-/IXtbwEk5HTPyEwyKX6hGkYXxM9nbj64B+ilVJnC/R6B0pH5G4V3b0pVbL7DBj4tkhBAppbQUlf6F6Xl9LHu1g==} + engines: {node: '>= 0.4'} + + merge-stream@2.0.0: + resolution: {integrity: sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==} + + merge2@1.4.1: + resolution: {integrity: sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==} + engines: {node: '>= 8'} + + micro-ftch@0.3.1: + resolution: {integrity: sha512-/0LLxhzP0tfiR5hcQebtudP56gUurs2CLkGarnCiB/OqEyUFQ6U3paQi/tgLv0hBJYt2rnr9MNpxz4fiiugstg==} + + micromatch@4.0.8: + resolution: {integrity: sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==} + engines: {node: '>=8.6'} + + mimic-fn@2.1.0: + resolution: {integrity: sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==} + engines: {node: '>=6'} + + minimatch@10.0.1: + resolution: {integrity: sha512-ethXTt3SGGR+95gudmqJ1eNhRO7eGEGIgYA9vnPatK4/etz2MEVDno5GMCibdMTuBMyElzIlgxMna3K94XDIDQ==} + engines: {node: 20 || >=22} + + minimatch@3.1.2: + resolution: {integrity: sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==} + + minimatch@5.1.6: + resolution: {integrity: sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==} + engines: {node: '>=10'} + + minimatch@9.0.5: + resolution: {integrity: sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==} + engines: {node: '>=16 || 14 >=14.17'} + + minimist@1.2.8: + resolution: {integrity: sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==} + + minipass@7.1.2: + resolution: {integrity: sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw==} + engines: {node: '>=16 || 14 >=14.17'} + + mipd@0.0.7: + resolution: {integrity: sha512-aAPZPNDQ3uMTdKbuO2YmAw2TxLHO0moa4YKAyETM/DTj5FloZo+a+8tU+iv4GmW+sOxKLSRwcSFuczk+Cpt6fg==} + peerDependencies: + typescript: '>=5.0.4' + peerDependenciesMeta: + typescript: + optional: true + + mkdirp@0.5.6: + resolution: {integrity: sha512-FP+p8RB8OWpF3YZBCrP5gtADmtXApB5AMLn+vdyA+PyxCjrCs00mjyUozssO33cwDeT3wNGdLxJ5M//YqtHAJw==} + hasBin: true + + motion-dom@12.7.2: + resolution: {integrity: sha512-7+sytBQyb9XRRH6lyLRQf+R6y2BE79J2EgTijTSxYgGt+ufpnoRDPgru9KHvA125tTHnbAXDzeTUb9OvscSitA==} + + motion-utils@12.7.2: + resolution: {integrity: sha512-XhZwqctxyJs89oX00zn3OGCuIIpVevbTa+u82usWBC6pSHUd2AoNWiYa7Du8tJxJy9TFbZ82pcn5t7NOm1PHAw==} + + motion@10.16.2: + resolution: {integrity: sha512-p+PurYqfUdcJZvtnmAqu5fJgV2kR0uLFQuBKtLeFVTrYEVllI99tiOTSefVNYuip9ELTEkepIIDftNdze76NAQ==} + + motion@12.7.2: + resolution: {integrity: sha512-ZFzhSCuKJYq0UdvFkEkWB6kWfiP+BjiLUkYh1ev7S48fipH0XdiCVHK1xct/zZU13AN7ESIqtm50pKsSDvRqmg==} + peerDependencies: + '@emotion/is-prop-valid': '*' + react: ^18.0.0 || ^19.0.0 + react-dom: ^18.0.0 || ^19.0.0 + peerDependenciesMeta: + '@emotion/is-prop-valid': + optional: true + react: + optional: true + react-dom: + optional: true + + mri@1.2.0: + resolution: {integrity: sha512-tzzskb3bG8LvYGFF/mDTpq3jpI6Q9wc3LEmBaghu+DdCssd1FakN7Bc0hVNmEyGq1bq3RgfkCb3cmQLpNPOroA==} + engines: {node: '>=4'} + + ms@2.1.3: + resolution: {integrity: sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==} + + multiformats@9.9.0: + resolution: {integrity: sha512-HoMUjhH9T8DDBNT+6xzkrd9ga/XiBI4xLr58LJACwK6G3HTOPeMz4nB4KJs33L2BelrIJa7P0VuNaVF3hMYfjg==} + + mute-stream@0.0.8: + resolution: {integrity: sha512-nnbWWOkoWyUsTjKrhgD0dcz22mdkSnpYqbEjIm2nhwhuxlSkpywJmBo8h0ZqJdkp73mb90SssHkN4rsRaBAfAA==} + + nanoid@3.3.11: + resolution: {integrity: sha512-N8SpfPUnUp1bK+PMYW8qSWdl9U+wwNWI4QKxOYDy9JAro3WMX7p2OeVRF9v+347pnakNevPmiHhNmZ2HbFA76w==} + engines: {node: ^10 || ^12 || ^13.7 || ^14 || >=15.0.1} + hasBin: true + + nanoid@3.3.7: + resolution: {integrity: sha512-eSRppjcPIatRIMC1U6UngP8XFcz8MQWGQdt1MTBQ7NaAmvXDfvNxbvWV3x2y6CdEUciCSsDHDQZbhYaB8QEo2g==} + engines: {node: ^10 || ^12 || ^13.7 || ^14 || >=15.0.1} + hasBin: true + + natural-compare@1.4.0: + resolution: {integrity: sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==} + + neo-async@2.6.2: + resolution: {integrity: sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==} + + netmask@2.0.2: + resolution: {integrity: sha512-dBpDMdxv9Irdq66304OLfEmQ9tbNRFnFTuZiLo+bD+r332bBmMJ8GBLXklIXXgxd3+v9+KUnZaUR5PJMa75Gsg==} + engines: {node: '>= 0.4.0'} + + next@15.1.0: + resolution: {integrity: sha512-QKhzt6Y8rgLNlj30izdMbxAwjHMFANnLwDwZ+WQh5sMhyt4lEBqDK9QpvWHtIM4rINKPoJ8aiRZKg5ULSybVHw==} + engines: {node: ^18.18.0 || ^19.8.0 || >= 20.0.0} + hasBin: true + peerDependencies: + '@opentelemetry/api': ^1.1.0 + '@playwright/test': ^1.41.2 + babel-plugin-react-compiler: '*' + react: ^18.2.0 || 19.0.0-rc-de68d2f4-20241204 || ^19.0.0 + react-dom: ^18.2.0 || 19.0.0-rc-de68d2f4-20241204 || ^19.0.0 + sass: ^1.3.0 + peerDependenciesMeta: + '@opentelemetry/api': + optional: true + '@playwright/test': + optional: true + babel-plugin-react-compiler: + optional: true + sass: + optional: true + + no-case@2.3.2: + resolution: {integrity: sha512-rmTZ9kz+f3rCvK2TD1Ue/oZlns7OGoIWP4fc3llxxRXlOkHKoWPPWJOfFYpITabSow43QJbRIoHQXtt10VldyQ==} + + node-addon-api@2.0.2: + resolution: {integrity: sha512-Ntyt4AIXyaLIuMHF6IOoTakB3K+RWxwtsHNRxllEoA6vPwP9o4866g6YWDLUdnucilZhmkxiHwHr11gAENw+QA==} + + node-fetch-native@1.6.6: + resolution: {integrity: sha512-8Mc2HhqPdlIfedsuZoc3yioPuzp6b+L5jRCRY1QzuWZh2EGJVQrGppC6V6cF0bLdbW0+O2YpqCA25aF/1lvipQ==} + + node-fetch@2.7.0: + resolution: {integrity: sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A==} + engines: {node: 4.x || >=6.0.0} + peerDependencies: + encoding: ^0.1.0 + peerDependenciesMeta: + encoding: + optional: true + + node-gyp-build@4.8.4: + resolution: {integrity: sha512-LA4ZjwlnUblHVgq0oBF3Jl/6h/Nvs5fzBLwdEF4nuxnFdsfajde4WfxtJr3CaiH+F6ewcIB/q4jQ4UzPyid+CQ==} + hasBin: true + + node-int64@0.4.0: + resolution: {integrity: sha512-O5lz91xSOeoXP6DulyHfllpq+Eg00MWitZIbtPfoSEvqIHdl5gfcY6hYzDWnj0qD5tz52PI08u9qUvSVeUBeHw==} + + node-mock-http@1.0.0: + resolution: {integrity: sha512-0uGYQ1WQL1M5kKvGRXWQ3uZCHtLTO8hln3oBjIusM75WoesZ909uQJs/Hb946i2SS+Gsrhkaa6iAO17jRIv6DQ==} + + node-plop@0.26.3: + resolution: {integrity: sha512-Cov028YhBZ5aB7MdMWJEmwyBig43aGL5WT4vdoB28Oitau1zZAcHUn8Sgfk9HM33TqhtLJ9PlM/O0Mv+QpV/4Q==} + engines: {node: '>=8.9.4'} + + node-releases@2.0.19: + resolution: {integrity: sha512-xxOWJsBKtzAq7DY0J+DTzuz58K8e7sJbdgwkbMWQe8UYB6ekmsQ45q0M/tJDsGaZmbC+l7n57UV8Hl5tHxO9uw==} + + nodemon@3.1.9: + resolution: {integrity: sha512-hdr1oIb2p6ZSxu3PB2JWWYS7ZQ0qvaZsc3hK8DR8f02kRzc8rjYmxAIvdz+aYC+8F2IjNaB7HMcSDg8nQpJxyg==} + engines: {node: '>=10'} + hasBin: true + + normalize-path@3.0.0: + resolution: {integrity: sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==} + engines: {node: '>=0.10.0'} + + npm-run-path@4.0.1: + resolution: {integrity: sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw==} + engines: {node: '>=8'} + + obj-multiplex@1.0.0: + resolution: {integrity: sha512-0GNJAOsHoBHeNTvl5Vt6IWnpUEcc3uSRxzBri7EDyIcMgYvnY2JL2qdeV5zTMjWQX5OHcD5amcW2HFfDh0gjIA==} + + object-assign@4.1.1: + resolution: {integrity: sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==} + engines: {node: '>=0.10.0'} + + object-inspect@1.13.3: + resolution: {integrity: sha512-kDCGIbxkDSXE3euJZZXzc6to7fCrKHNI/hSRQnRuQ+BWjFNzZwiFF8fj/6o2t2G9/jTj8PSIYTfCLelLZEeRpA==} + engines: {node: '>= 0.4'} + + object-keys@1.1.1: + resolution: {integrity: sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==} + engines: {node: '>= 0.4'} + + object.assign@4.1.5: + resolution: {integrity: sha512-byy+U7gp+FVwmyzKPYhW2h5l3crpmGsxl7X2s8y43IgxvG4g3QZ6CffDtsNQy1WsmZpQbO+ybo0AlW7TY6DcBQ==} + engines: {node: '>= 0.4'} + + object.entries@1.1.8: + resolution: {integrity: sha512-cmopxi8VwRIAw/fkijJohSfpef5PdN0pMQJN6VC/ZKvn0LIknWD8KtgY6KlQdEc4tIjcQ3HxSMmnvtzIscdaYQ==} + engines: {node: '>= 0.4'} + + object.fromentries@2.0.8: + resolution: {integrity: sha512-k6E21FzySsSK5a21KRADBd/NGneRegFO5pLHfdQLpRDETUNJueLXs3WCzyQ3tFRDYgbq3KHGXfTbi2bs8WQ6rQ==} + engines: {node: '>= 0.4'} + + object.values@1.2.0: + resolution: {integrity: sha512-yBYjY9QX2hnRmZHAjG/f13MzmBzxzYgQhFrke06TTyKY5zSTEqkOeukBzIdVA3j3ulu8Qa3MbVFShV7T2RmGtQ==} + engines: {node: '>= 0.4'} + + ofetch@1.4.1: + resolution: {integrity: sha512-QZj2DfGplQAr2oj9KzceK9Hwz6Whxazmn85yYeVuS3u9XTMOGMRx0kO95MQ+vLsj/S/NwBDMMLU5hpxvI6Tklw==} + + on-exit-leak-free@0.2.0: + resolution: {integrity: sha512-dqaz3u44QbRXQooZLTUKU41ZrzYrcvLISVgbrzbyCMxpmSLJvZ3ZamIJIZ29P6OhZIkNIQKosdeM6t1LYbA9hg==} + + once@1.4.0: + resolution: {integrity: sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==} + + onetime@5.1.2: + resolution: {integrity: sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==} + engines: {node: '>=6'} + + optionator@0.9.4: + resolution: {integrity: sha512-6IpQ7mKUxRcZNLIObR0hz7lxsapSSIYNZJwXPGeF0mTVqGKFIXj1DQcMoT22S3ROcLyY/rz0PWaWZ9ayWmad9g==} + engines: {node: '>= 0.8.0'} + + ora@4.1.1: + resolution: {integrity: sha512-sjYP8QyVWBpBZWD6Vr1M/KwknSw6kJOz41tvGMlwWeClHBtYKTbHMki1PsLZnxKpXMPbTKv9b3pjQu3REib96A==} + engines: {node: '>=8'} + + ora@5.4.1: + resolution: {integrity: sha512-5b6Y85tPxZZ7QytO+BQzysW31HJku27cRIlkbAXaNx+BdcVi+LlRFmVXzeF6a7JCwJpyw5c4b+YSVImQIrBpuQ==} + engines: {node: '>=10'} + + os-tmpdir@1.0.2: + resolution: {integrity: sha512-D2FR03Vir7FIu45XBY20mTb+/ZSWB00sjU9jdQXt83gDrI4Ztz5Fs7/yy74g2N5SVQY4xY1qDr4rNddwYRVX0g==} + engines: {node: '>=0.10.0'} + + outdent@0.5.0: + resolution: {integrity: sha512-/jHxFIzoMXdqPzTaCpFzAAWhpkSjZPF4Vsn6jAfNpmbH/ymsmd7Qc6VE9BGn0L6YMj6uwpQLxCECpus4ukKS9Q==} + + ox@0.6.12: + resolution: {integrity: sha512-78hziRGLj0qTDa0UW4+ynv9tW2Cp1vmCfGokL8D7kiSDh6Y0LAfHL+HaDN4l2a9jcrOG3fexTDtLNtDNkEwLtg==} + peerDependencies: + typescript: '>=5.4.0' + peerDependenciesMeta: + typescript: + optional: true + + ox@0.6.7: + resolution: {integrity: sha512-17Gk/eFsFRAZ80p5eKqv89a57uXjd3NgIf1CaXojATPBuujVc/fQSVhBeAU9JCRB+k7J50WQAyWTxK19T9GgbA==} + peerDependencies: + typescript: '>=5.4.0' + peerDependenciesMeta: + typescript: + optional: true + + ox@0.6.9: + resolution: {integrity: sha512-wi5ShvzE4eOcTwQVsIPdFr+8ycyX+5le/96iAJutaZAvCes1J0+RvpEPg5QDPDiaR0XQQAvZVl7AwqQcINuUug==} + peerDependencies: + typescript: '>=5.4.0' + peerDependenciesMeta: + typescript: + optional: true + + p-filter@2.1.0: + resolution: {integrity: sha512-ZBxxZ5sL2HghephhpGAQdoskxplTwr7ICaehZwLIlfL6acuVgZPm8yBNuRAFBGEqtD/hmUeq9eqLg2ys9Xr/yw==} + engines: {node: '>=8'} + + p-limit@2.3.0: + resolution: {integrity: sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==} + engines: {node: '>=6'} + + p-limit@3.1.0: + resolution: {integrity: sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==} + engines: {node: '>=10'} + + p-locate@4.1.0: + resolution: {integrity: sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==} + engines: {node: '>=8'} + + p-locate@5.0.0: + resolution: {integrity: sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==} + engines: {node: '>=10'} + + p-map@2.1.0: + resolution: {integrity: sha512-y3b8Kpd8OAN444hxfBbFfj1FY/RjtTd8tzYwhUqNYXx0fXx2iX4maP4Qr6qhIKbQXI02wTLAda4fYUbDagTUFw==} + engines: {node: '>=6'} + + p-map@3.0.0: + resolution: {integrity: sha512-d3qXVTF/s+W+CdJ5A29wywV2n8CQQYahlgz2bFiA+4eVNJbHJodPZ+/gXwPGh0bOqA+j8S+6+ckmvLGPk1QpxQ==} + engines: {node: '>=8'} + + p-try@2.2.0: + resolution: {integrity: sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==} + engines: {node: '>=6'} + + pac-proxy-agent@7.0.2: + resolution: {integrity: sha512-BFi3vZnO9X5Qt6NRz7ZOaPja3ic0PhlsmCRYLOpN11+mWBCR6XJDqW5RF3j8jm4WGGQZtBA+bTfxYzeKW73eHg==} + engines: {node: '>= 14'} + + pac-resolver@7.0.1: + resolution: {integrity: sha512-5NPgf87AT2STgwa2ntRMr45jTKrYBGkVU36yT0ig/n/GMAa3oPqhZfIQ2kMEimReg0+t9kZViDVZ83qfVUlckg==} + engines: {node: '>= 14'} + + package-json-from-dist@1.0.1: + resolution: {integrity: sha512-UEZIS3/by4OC8vL3P2dTXRETpebLI2NiI5vIrjaD/5UtrkFX/tNbwjTSRAGC/+7CAo2pIcBaRgWmcBBHcsaCIw==} + + package-manager-detector@0.2.8: + resolution: {integrity: sha512-ts9KSdroZisdvKMWVAVCXiKqnqNfXz4+IbrBG8/BWx/TR5le+jfenvoBuIZ6UWM9nz47W7AbD9qYfAwfWMIwzA==} + + param-case@2.1.1: + resolution: {integrity: sha512-eQE845L6ot89sk2N8liD8HAuH4ca6Vvr7VWAWwt7+kvvG5aBcPmmphQ68JsEG2qa9n1TykS2DLeMt363AAH8/w==} + + parent-module@1.0.1: + resolution: {integrity: sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==} + engines: {node: '>=6'} + + parse-json@5.2.0: + resolution: {integrity: sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg==} + engines: {node: '>=8'} + + pascal-case@2.0.1: + resolution: {integrity: sha512-qjS4s8rBOJa2Xm0jmxXiyh1+OFf6ekCWOvUaRgAQSktzlTbMotS0nmG9gyYAybCWBcuP4fsBeRCKNwGBnMe2OQ==} + + path-case@2.1.1: + resolution: {integrity: sha512-Ou0N05MioItesaLr9q8TtHVWmJ6fxWdqKB2RohFmNWVyJ+2zeKIeDNWAN6B/Pe7wpzWChhZX6nONYmOnMeJQ/Q==} + + path-exists@4.0.0: + resolution: {integrity: sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==} + engines: {node: '>=8'} + + path-is-absolute@1.0.1: + resolution: {integrity: sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==} + engines: {node: '>=0.10.0'} + + path-key@3.1.1: + resolution: {integrity: sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==} + engines: {node: '>=8'} + + path-parse@1.0.7: + resolution: {integrity: sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==} + + path-scurry@2.0.0: + resolution: {integrity: sha512-ypGJsmGtdXUOeM5u93TyeIEfEhM6s+ljAhrk5vAvSx8uyY/02OvrZnA0YNGUrPXfpJMgI1ODd3nwz8Npx4O4cg==} + engines: {node: 20 || >=22} + + path-type@4.0.0: + resolution: {integrity: sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==} + engines: {node: '>=8'} + + picocolors@1.1.1: + resolution: {integrity: sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==} + + picomatch@2.3.1: + resolution: {integrity: sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==} + engines: {node: '>=8.6'} + + pify@3.0.0: + resolution: {integrity: sha512-C3FsVNH1udSEX48gGX1xfvwTWfsYWj5U+8/uK15BGzIGrKoUpghX8hWZwa/OFnakBiiVNmBvemTJR5mcy7iPcg==} + engines: {node: '>=4'} + + pify@4.0.1: + resolution: {integrity: sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==} + engines: {node: '>=6'} + + pify@5.0.0: + resolution: {integrity: sha512-eW/gHNMlxdSP6dmG6uJip6FXN0EQBwm2clYYd8Wul42Cwu/DK8HEftzsapcNdYe2MfLiIwZqsDk2RDEsTE79hA==} + engines: {node: '>=10'} + + pino-abstract-transport@0.5.0: + resolution: {integrity: sha512-+KAgmVeqXYbTtU2FScx1XS3kNyfZ5TrXY07V96QnUSFqo2gAqlvmaxH67Lj7SWazqsMabf+58ctdTcBgnOLUOQ==} + + pino-std-serializers@4.0.0: + resolution: {integrity: sha512-cK0pekc1Kjy5w9V2/n+8MkZwusa6EyyxfeQCB799CQRhRt/CqYKiWs5adeu8Shve2ZNffvfC/7J64A2PJo1W/Q==} + + pino@7.11.0: + resolution: {integrity: sha512-dMACeu63HtRLmCG8VKdy4cShCPKaYDR4youZqoSWLxl5Gu99HUw8bw75thbPv9Nip+H+QYX8o3ZJbTdVZZ2TVg==} + hasBin: true + + pirates@4.0.6: + resolution: {integrity: sha512-saLsH7WeYYPiD25LDuLRRY/i+6HaPYr6G1OUlN39otzkSTxKnubR9RTxS3/Kk50s1g2JTgFwWQDQyplC5/SHZg==} + engines: {node: '>= 6'} + + pkg-dir@4.2.0: + resolution: {integrity: sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ==} + engines: {node: '>=8'} + + pngjs@5.0.0: + resolution: {integrity: sha512-40QW5YalBNfQo5yRYmiw7Yz6TKKVr3h6970B2YE+3fQpsWcrbj1PzJgxeJ19DRQjhMbKPIuMY8rFaXc8moolVw==} + engines: {node: '>=10.13.0'} + + pony-cause@2.1.11: + resolution: {integrity: sha512-M7LhCsdNbNgiLYiP4WjsfLUuFmCfnjdF6jKe2R9NKl4WFN+HZPGHJZ9lnLP7f9ZnKe3U9nuWD0szirmj+migUg==} + engines: {node: '>=12.0.0'} + + possible-typed-array-names@1.0.0: + resolution: {integrity: sha512-d7Uw+eZoloe0EHDIYoe+bQ5WXnGMOpmiZFTuMWCwpjzzkL2nTjcKiAk4hh8TjnGye2TwWOk3UXucZ+3rbmBa8Q==} + engines: {node: '>= 0.4'} + + postcss@8.4.31: + resolution: {integrity: sha512-PS08Iboia9mts/2ygV3eLpY5ghnUcfLV/EXTOW1E2qYxJKGGBUtNjN76FYHnMs36RmARn41bC0AZmn+rR0OVpQ==} + engines: {node: ^10 || ^12 || >=14} + + postcss@8.5.3: + resolution: {integrity: sha512-dle9A3yYxlBSrt8Fu+IpjGT8SY8hN0mlaA6GY8t0P5PjIOZemULz/E2Bnm/2dcUOena75OTNkHI76uZBNUUq3A==} + engines: {node: ^10 || ^12 || >=14} + + preact@10.26.5: + resolution: {integrity: sha512-fmpDkgfGU6JYux9teDWLhj9mKN55tyepwYbxHgQuIxbWQzgFg5vk7Mrrtfx7xRxq798ynkY4DDDxZr235Kk+4w==} + + prelude-ls@1.2.1: + resolution: {integrity: sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==} + engines: {node: '>= 0.8.0'} + + prettier@2.8.8: + resolution: {integrity: sha512-tdN8qQGvNjw4CHbY+XXk0JgCXn9QiF21a55rBe5LJAU+kDyC4WQn4+awm2Xfk2lQMk5fKup9XgzTZtGkjBdP9Q==} + engines: {node: '>=10.13.0'} + hasBin: true + + prettier@3.5.3: + resolution: {integrity: sha512-QQtaxnoDJeAkDvDKWCLiwIXkTgRhwYDEQCghU9Z6q03iyek/rxRh/2lC3HB7P8sWT2xC/y5JDctPLBIGzHKbhw==} + engines: {node: '>=14'} + hasBin: true + + pretty-format@29.7.0: + resolution: {integrity: sha512-Pdlw/oPxN+aXdmM9R00JVC9WVFoCLTKJvDVLgmJ+qAffBMxsV85l/Lu7sNx4zSzPyoL2euImuEwHhOXdEgNFZQ==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + + process-nextick-args@2.0.1: + resolution: {integrity: sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==} + + process-warning@1.0.0: + resolution: {integrity: sha512-du4wfLyj4yCZq1VupnVSZmRsPJsNuxoDQFdCFHLaYiEbFBD7QE0a+I4D7hOxrVnh78QE/YipFAj9lXHiXocV+Q==} + + prompts@2.4.2: + resolution: {integrity: sha512-NxNv/kLguCA7p3jE8oL2aEBsrJWgAakBpgmgK6lpPWV+WuOmY6r2/zbAVnP+T8bQlA0nzHXSJSJW0Hq7ylaD2Q==} + engines: {node: '>= 6'} + + prop-types@15.8.1: + resolution: {integrity: sha512-oj87CgZICdulUohogVAR7AjlC0327U4el4L6eAvOqCeudMDVU0NThNaV+b9Df4dXgSP1gXMTnPdhfe/2qDH5cg==} + + proxy-agent@6.4.0: + resolution: {integrity: sha512-u0piLU+nCOHMgGjRbimiXmA9kM/L9EHh3zL81xCdp7m+Y2pHIsnmbdDoEDoAz5geaonNR6q6+yOPQs6n4T6sBQ==} + engines: {node: '>= 14'} + + proxy-compare@2.5.1: + resolution: {integrity: sha512-oyfc0Tx87Cpwva5ZXezSp5V9vht1c7dZBhvuV/y3ctkgMVUmiAGDVeeB0dKhGSyT0v1ZTEQYpe/RXlBVBNuCLA==} + + proxy-from-env@1.1.0: + resolution: {integrity: sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==} + + pstree.remy@1.1.8: + resolution: {integrity: sha512-77DZwxQmxKnu3aR542U+X8FypNzbfJ+C5XQDk3uWjWxn6151aIMGthWYRXTqT1E5oJvg+ljaa2OJi+VfvCOQ8w==} + + pump@3.0.2: + resolution: {integrity: sha512-tUPXtzlGM8FE3P0ZL6DVs/3P58k9nk8/jZeQCurTJylQA8qFYzHFfhBJkuqyE0FifOsQ0uKWekiZ5g8wtr28cw==} + + punycode@2.3.1: + resolution: {integrity: sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==} + engines: {node: '>=6'} + + pure-rand@6.1.0: + resolution: {integrity: sha512-bVWawvoZoBYpp6yIoQtQXHZjmz35RSVHnUOTefl8Vcjr8snTPY1wnpSPMWekcFwbxI6gtmT7rSYPFvz71ldiOA==} + + qrcode.react@4.2.0: + resolution: {integrity: sha512-QpgqWi8rD9DsS9EP3z7BT+5lY5SFhsqGjpgW5DY/i3mK4M9DTBNz3ErMi8BWYEfI3L0d8GIbGmcdFAS1uIRGjA==} + peerDependencies: + react: ^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0 + + qrcode@1.5.3: + resolution: {integrity: sha512-puyri6ApkEHYiVl4CFzo1tDkAZ+ATcnbJrJ6RiBM1Fhctdn/ix9MTE3hRph33omisEbC/2fcfemsseiKgBPKZg==} + engines: {node: '>=10.13.0'} + hasBin: true + + query-string@7.1.3: + resolution: {integrity: sha512-hh2WYhq4fi8+b+/2Kg9CEge4fDPvHS534aOOvOZeQ3+Vf2mCFsaFBYj0i+iXcAq6I9Vzp5fjMFBlONvayDC1qg==} + engines: {node: '>=6'} + + queue-microtask@1.2.3: + resolution: {integrity: sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==} + + quick-format-unescaped@4.0.4: + resolution: {integrity: sha512-tYC1Q1hgyRuHgloV/YXs2w15unPVh8qfu/qCTfhTYamaw7fyhumKa2yGpdSo87vY32rIclj+4fWYQXUMs9EHvg==} + + radix3@1.1.2: + resolution: {integrity: sha512-b484I/7b8rDEdSDKckSSBA8knMpcdsXudlE/LNL639wFoHKwLbEkQFZHWEYwDC0wa0FKUcCY+GAF73Z7wxNVFA==} + + rc@1.2.8: + resolution: {integrity: sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw==} + hasBin: true + + react-dom@19.0.0: + resolution: {integrity: sha512-4GV5sHFG0e/0AD4X+ySy6UJd3jVl1iNsNHdpad0qhABJ11twS3TTBnseqsKurKcsNqCEFeGL3uLpVChpIO3QfQ==} + peerDependencies: + react: ^19.0.0 + + react-hook-form@7.55.0: + resolution: {integrity: sha512-XRnjsH3GVMQz1moZTW53MxfoWN7aDpUg/GpVNc4A3eXRVNdGXfbzJ4vM4aLQ8g6XCUh1nIbx70aaNCl7kxnjog==} + engines: {node: '>=18.0.0'} + peerDependencies: + react: ^16.8.0 || ^17 || ^18 || ^19 + + react-is@16.13.1: + resolution: {integrity: sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==} + + react-is@18.3.1: + resolution: {integrity: sha512-/LLMVyas0ljjAtoYiPqYiL8VWXzUUdThrmU5+n20DZv+a+ClRoevUzw5JxU+Ieh5/c87ytoTBV9G1FiKfNJdmg==} + + react-refresh@0.14.2: + resolution: {integrity: sha512-jCvmsr+1IUSMUyzOkRcvnVbX3ZYC6g9TDrDbFuFmRDq7PD4yaGbLKNQL6k2jnArV8hjYxh7hVhAZB6s9HDGpZA==} + engines: {node: '>=0.10.0'} + + react-remove-scroll-bar@2.3.8: + resolution: {integrity: sha512-9r+yi9+mgU33AKcj6IbT9oRCO78WriSj6t/cF8DWBZJ9aOGPOTEDvdUDz1FwKim7QXWwmHqtdHnRJfhAxEG46Q==} + engines: {node: '>=10'} + peerDependencies: + '@types/react': '*' + react: ^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0 + peerDependenciesMeta: + '@types/react': + optional: true + + react-remove-scroll@2.6.3: + resolution: {integrity: sha512-pnAi91oOk8g8ABQKGF5/M9qxmmOPxaAnopyTHYfqYEwJhyFrbbBtHuSgtKEoH0jpcxx5o3hXqH1mNd9/Oi+8iQ==} + engines: {node: '>=10'} + peerDependencies: + '@types/react': '*' + react: ^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0 || ^19.0.0-rc + peerDependenciesMeta: + '@types/react': + optional: true + + react-router@7.5.0: + resolution: {integrity: sha512-estOHrRlDMKdlQa6Mj32gIks4J+AxNsYoE0DbTTxiMy2mPzZuWSDU+N85/r1IlNR7kGfznF3VCUlvc5IUO+B9g==} + engines: {node: '>=20.0.0'} + peerDependencies: + react: '>=18' + react-dom: '>=18' + peerDependenciesMeta: + react-dom: + optional: true + + react-style-singleton@2.2.3: + resolution: {integrity: sha512-b6jSvxvVnyptAiLjbkWLE/lOnR4lfTtDAl+eUC7RZy+QQWc6wRzIV2CE6xBuMmDxc2qIihtDCZD5NPOFl7fRBQ==} + engines: {node: '>=10'} + peerDependencies: + '@types/react': '*' + react: ^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0 || ^19.0.0-rc + peerDependenciesMeta: + '@types/react': + optional: true + + react@19.0.0: + resolution: {integrity: sha512-V8AVnmPIICiWpGfm6GLzCR/W5FXLchHop40W4nXBmdlEceh16rCN8O8LNWm5bh5XUX91fh7KpA+W0TgMKmgTpQ==} + engines: {node: '>=0.10.0'} + + read-yaml-file@1.1.0: + resolution: {integrity: sha512-VIMnQi/Z4HT2Fxuwg5KrY174U1VdUIASQVWXXyqtNRtxSr9IYkn1rsI6Tb6HsrHCmB7gVpNwX6JxPTHcH6IoTA==} + engines: {node: '>=6'} + + readable-stream@2.3.8: + resolution: {integrity: sha512-8p0AUk4XODgIewSi0l8Epjs+EVnWiK7NoDIEGU0HhE7+ZyY8D1IMY7odu5lRrFXGg71L15KG8QrPmum45RTtdA==} + + readable-stream@3.6.2: + resolution: {integrity: sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==} + engines: {node: '>= 6'} + + readdirp@3.6.0: + resolution: {integrity: sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==} + engines: {node: '>=8.10.0'} + + readdirp@4.1.2: + resolution: {integrity: sha512-GDhwkLfywWL2s6vEjyhri+eXmfH6j1L7JE27WhqLeYzoh/A3DBaYGEj2H/HFZCn/kMfim73FXxEJTw06WtxQwg==} + engines: {node: '>= 14.18.0'} + + real-require@0.1.0: + resolution: {integrity: sha512-r/H9MzAWtrv8aSVjPCMFpDMl5q66GqtmmRkRjpHTsp4zBAa+snZyiQNlMONiUmEJcsnaw0wCauJ2GWODr/aFkg==} + engines: {node: '>= 12.13.0'} + + reflect.getprototypeof@1.0.6: + resolution: {integrity: sha512-fmfw4XgoDke3kdI6h4xcUz1dG8uaiv5q9gcEwLS4Pnth2kxT+GZ7YehS1JTMGBQmtV7Y4GFGbs2re2NqhdozUg==} + engines: {node: '>= 0.4'} + + regenerator-runtime@0.14.1: + resolution: {integrity: sha512-dYnhHh0nJoMfnkZs6GmmhFknAGRrLznOu5nc9ML+EJxGvrx6H7teuevqVqCuPcPK//3eDrrjQhehXVx9cnkGdw==} + + regexp.prototype.flags@1.5.3: + resolution: {integrity: sha512-vqlC04+RQoFalODCbCumG2xIOvapzVMHwsyIGM/SIE8fRhFFsXeH8/QQ+s0T0kDAhKc4k30s73/0ydkHQz6HlQ==} + engines: {node: '>= 0.4'} + + registry-auth-token@3.3.2: + resolution: {integrity: sha512-JL39c60XlzCVgNrO+qq68FoNb56w/m7JYvGR2jT5iR1xBrUA3Mfx5Twk5rqTThPmQKMWydGmq8oFtDlxfrmxnQ==} + + registry-url@3.1.0: + resolution: {integrity: sha512-ZbgR5aZEdf4UKZVBPYIgaglBmSF2Hi94s2PcIHhRGFjKYu+chjJdYfHn4rt3hB6eCKLJ8giVIIfgMa1ehDfZKA==} + engines: {node: '>=0.10.0'} + + require-directory@2.1.1: + resolution: {integrity: sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==} + engines: {node: '>=0.10.0'} + + require-main-filename@2.0.0: + resolution: {integrity: sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg==} + + resolve-cwd@3.0.0: + resolution: {integrity: sha512-OrZaX2Mb+rJCpH/6CpSqt9xFVpN++x01XnN2ie9g6P5/3xelLAkXWVADpdz1IHD/KFfEXyE6V0U01OQ3UO2rEg==} + engines: {node: '>=8'} + + resolve-from@4.0.0: + resolution: {integrity: sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==} + engines: {node: '>=4'} + + resolve-from@5.0.0: + resolution: {integrity: sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==} + engines: {node: '>=8'} + + resolve.exports@2.0.3: + resolution: {integrity: sha512-OcXjMsGdhL4XnbShKpAcSqPMzQoYkYyhbEaeSko47MjRP9NfEQMhZkXL1DoFlt9LWQn4YttrdnV6X2OiyzBi+A==} + engines: {node: '>=10'} + + resolve@1.22.8: + resolution: {integrity: sha512-oKWePCxqpd6FlLvGV1VU0x7bkPmmCNolxzjMf4NczoDnQcIWrAF+cPtZn5i6n+RfD2d9i0tzpKnG6Yk168yIyw==} + hasBin: true + + resolve@2.0.0-next.5: + resolution: {integrity: sha512-U7WjGVG9sH8tvjW5SmGbQuui75FiyjAX72HX15DwBBwF9dNiQZRQAg9nnPhYy+TUnE0+VcrttuvNI8oSxZcocA==} + hasBin: true + + restore-cursor@3.1.0: + resolution: {integrity: sha512-l+sSefzHpj5qimhFSE5a8nufZYAM3sBSVMAPtYkmC+4EH2anSGaEMXSD0izRQbu9nfyQ9y5JrVmp7E8oZrUjvA==} + engines: {node: '>=8'} + + reusify@1.0.4: + resolution: {integrity: sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==} + engines: {iojs: '>=1.0.0', node: '>=0.10.0'} + + rimraf@3.0.2: + resolution: {integrity: sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==} + deprecated: Rimraf versions prior to v4 are no longer supported + hasBin: true + + rimraf@6.0.1: + resolution: {integrity: sha512-9dkvaxAsk/xNXSJzMgFqqMCuFgt2+KsOFek3TMLfo8NCPfWpBmqwyNn5Y+NX56QUYfCtsyhF3ayiboEoUmJk/A==} + engines: {node: 20 || >=22} + hasBin: true + + rollup@4.40.0: + resolution: {integrity: sha512-Noe455xmA96nnqH5piFtLobsGbCij7Tu+tb3c1vYjNbTkfzGqXqQXG3wJaYXkRZuQ0vEYN4bhwg7QnIrqB5B+w==} + engines: {node: '>=18.0.0', npm: '>=8.0.0'} + hasBin: true + + run-async@2.4.1: + resolution: {integrity: sha512-tvVnVv01b8c1RrA6Ep7JkStj85Guv/YrMcwqYQnwjsAS2cTmmPGBBjAjpCW7RrSodNSoE2/qg9O4bceNvUuDgQ==} + engines: {node: '>=0.12.0'} + + run-parallel@1.2.0: + resolution: {integrity: sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==} + + rxjs@6.6.7: + resolution: {integrity: sha512-hTdwr+7yYNIT5n4AMYp85KA6yw2Va0FLa3Rguvbpa4W3I5xynaBZo41cM3XM+4Q6fRMj3sBYIR1VAmZMXYJvRQ==} + engines: {npm: '>=2.0.0'} + + rxjs@7.8.1: + resolution: {integrity: sha512-AA3TVj+0A2iuIoQkWEK/tqFjBq2j+6PO6Y0zJcvzLAFhEFIO3HL0vls9hWLncZbAAbK0mar7oZ4V079I/qPMxg==} + + safe-array-concat@1.1.2: + resolution: {integrity: sha512-vj6RsCsWBCf19jIeHEfkRMw8DPiBb+DMXklQ/1SGDHOMlHdPUkZXFQ2YdplS23zESTijAcurb1aSgJA3AgMu1Q==} + engines: {node: '>=0.4'} + + safe-buffer@5.1.2: + resolution: {integrity: sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==} + + safe-buffer@5.2.1: + resolution: {integrity: sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==} + + safe-regex-test@1.0.3: + resolution: {integrity: sha512-CdASjNJPvRa7roO6Ra/gLYBTzYzzPyyBXxIMdGW3USQLyjWEls2RgW5UBTXaQVp+OrpeCK3bLem8smtmheoRuw==} + engines: {node: '>= 0.4'} + + safe-stable-stringify@2.5.0: + resolution: {integrity: sha512-b3rppTKm9T+PsVCBEOUR46GWI7fdOs00VKZ1+9c1EWDaDMvjQc6tUwuFyIprgGgTcWoVHSKrU8H31ZHA2e0RHA==} + engines: {node: '>=10'} + + safer-buffer@2.1.2: + resolution: {integrity: sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==} + + scheduler@0.25.0: + resolution: {integrity: sha512-xFVuu11jh+xcO7JOAGJNOXld8/TcEHK/4CituBUeUb5hqxJLj9YuemAEuvm9gQ/+pgXYfbQuqAkiYu+u7YEsNA==} + + semver@6.3.1: + resolution: {integrity: sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==} + hasBin: true + + semver@7.7.1: + resolution: {integrity: sha512-hlq8tAfn0m/61p4BVRcPzIGr6LKiMwo4VM6dGi6pt4qcRkmNzTcWq6eCEjEh+qXjkMDvPlOFFSGwQjoEa6gyMA==} + engines: {node: '>=10'} + hasBin: true + + sentence-case@2.1.1: + resolution: {integrity: sha512-ENl7cYHaK/Ktwk5OTD+aDbQ3uC8IByu/6Bkg+HDv8Mm+XnBnppVNalcfJTNsp1ibstKh030/JKQQWglDvtKwEQ==} + + set-blocking@2.0.0: + resolution: {integrity: sha512-KiKBS8AnWGEyLzofFfmvKwpdPzqiy16LvQfK3yv/fVH7Bj13/wl3JSR1J+rfgRE9q7xUJK4qvgS8raSOeLUehw==} + + set-cookie-parser@2.7.1: + resolution: {integrity: sha512-IOc8uWeOZgnb3ptbCURJWNjWUPcO3ZnTTdzsurqERrP6nPyv+paC55vJM0LpOlT2ne+Ix+9+CRG1MNLlyZ4GjQ==} + + set-function-length@1.2.2: + resolution: {integrity: sha512-pgRc4hJ4/sNjWCSS9AmnS40x3bNMDTknHgL5UaMBTMyJnU90EgWh1Rz+MC9eFu4BuN/UwZjKQuY/1v3rM7HMfg==} + engines: {node: '>= 0.4'} + + set-function-name@2.0.2: + resolution: {integrity: sha512-7PGFlmtwsEADb0WYyvCMa1t+yke6daIG4Wirafur5kcf+MhUnPms1UeR0CKQdTZD81yESwMHbtn+TR+dMviakQ==} + engines: {node: '>= 0.4'} + + sha.js@2.4.11: + resolution: {integrity: sha512-QMEp5B7cftE7APOjk5Y6xgrbWu+WkLVQwk8JNjZ8nKRciZaByEW6MubieAiToS7+dwvrjGhH8jRXz3MVd0AYqQ==} + hasBin: true + + sharp@0.33.5: + resolution: {integrity: sha512-haPVm1EkS9pgvHrQ/F3Xy+hgcuMV0Wm9vfIBSiwZ05k+xgb0PkBQpGsAA/oWdDobNaZTH5ppvHtzCFbnSEwHVw==} + engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0} + + shebang-command@2.0.0: + resolution: {integrity: sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==} + engines: {node: '>=8'} + + shebang-regex@3.0.0: + resolution: {integrity: sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==} + engines: {node: '>=8'} + + shell-quote@1.8.2: + resolution: {integrity: sha512-AzqKpGKjrj7EM6rKVQEPpB288oCfnrEIuyoT9cyF4nmGa7V8Zk6f7RRqYisX8X9m+Q7bd632aZW4ky7EhbQztA==} + engines: {node: '>= 0.4'} + + side-channel@1.0.6: + resolution: {integrity: sha512-fDW/EZ6Q9RiO8eFG8Hj+7u/oW+XrPTIChwCOM2+th2A6OblDtYYIpve9m+KvI9Z4C9qSEXlaGR6bTEYHReuglA==} + engines: {node: '>= 0.4'} + + signal-exit@3.0.7: + resolution: {integrity: sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==} + + signal-exit@4.1.0: + resolution: {integrity: sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==} + engines: {node: '>=14'} + + simple-swizzle@0.2.2: + resolution: {integrity: sha512-JA//kQgZtbuY83m+xT+tXJkmJncGMTFT+C+g2h2R9uxkYIrE2yy9sgmcLhCnw57/WSD+Eh3J97FPEDFnbXnDUg==} + + simple-update-notifier@2.0.0: + resolution: {integrity: sha512-a2B9Y0KlNXl9u/vsW6sTIu9vGEpfKu2wRV6l1H3XEas/0gUIzGzBoP/IouTcUQbm9JWZLH3COxyn03TYlFax6w==} + engines: {node: '>=10'} + + sisteransi@1.0.5: + resolution: {integrity: sha512-bLGGlR1QxBcynn2d5YmDX4MGjlZvy2MRBDRNHLJ8VI6l6+9FUiyTFNJ0IveOSP0bcXgVDPRcfGqA0pjaqUpfVg==} + + slash@3.0.0: + resolution: {integrity: sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==} + engines: {node: '>=8'} + + smart-buffer@4.2.0: + resolution: {integrity: sha512-94hK0Hh8rPqQl2xXc3HsaBoOXKV20MToPkcXvwbISWLEs+64sBq5kFgn2kJDHb1Pry9yrP0dxrCI9RRci7RXKg==} + engines: {node: '>= 6.0.0', npm: '>= 3.0.0'} + + snake-case@2.1.0: + resolution: {integrity: sha512-FMR5YoPFwOLuh4rRz92dywJjyKYZNLpMn1R5ujVpIYkbA9p01fq8RMg0FkO4M+Yobt4MjHeLTJVm5xFFBHSV2Q==} + + socket.io-client@4.8.1: + resolution: {integrity: sha512-hJVXfu3E28NmzGk8o1sHhN3om52tRvwYeidbj7xKy2eIIse5IoKX3USlS6Tqt3BHAtflLIkCQBkzVrEEfWUyYQ==} + engines: {node: '>=10.0.0'} + + socket.io-parser@4.2.4: + resolution: {integrity: sha512-/GbIKmo8ioc+NIWIhwdecY0ge+qVBSMdgxGygevmdHj24bsfgtCmcUUcQ5ZzcylGFHsN3k4HB4Cgkl96KVnuew==} + engines: {node: '>=10.0.0'} + + socks-proxy-agent@8.0.4: + resolution: {integrity: sha512-GNAq/eg8Udq2x0eNiFkr9gRg5bA7PXEWagQdeRX4cPSG+X/8V38v637gim9bjFptMk1QWsCTr0ttrJEiXbNnRw==} + engines: {node: '>= 14'} + + socks@2.8.3: + resolution: {integrity: sha512-l5x7VUUWbjVFbafGLxPWkYsHIhEvmF85tbIeFZWc8ZPtoMyybuEhL7Jye/ooC4/d48FgOjSJXgsF/AJPYCW8Zw==} + engines: {node: '>= 10.0.0', npm: '>= 3.0.0'} + + sonic-boom@2.8.0: + resolution: {integrity: sha512-kuonw1YOYYNOve5iHdSahXPOK49GqwA+LZhI6Wz/l0rP57iKyXXIHaRagOBHAPmGwJC6od2Z9zgvZ5loSgMlVg==} + + source-map-js@1.2.1: + resolution: {integrity: sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA==} + engines: {node: '>=0.10.0'} + + source-map-support@0.5.13: + resolution: {integrity: sha512-SHSKFHadjVA5oR4PPqhtAVdcBWwRYVd6g6cAXnIbRiIwc2EhPrTuKUBdSLvlEKyIP3GCf89fltvcZiP9MMFA1w==} + + source-map@0.6.1: + resolution: {integrity: sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==} + engines: {node: '>=0.10.0'} + + spawn-command@0.0.2: + resolution: {integrity: sha512-zC8zGoGkmc8J9ndvml8Xksr1Amk9qBujgbF0JAIWO7kXr43w0h/0GJNM/Vustixu+YE8N/MTrQ7N31FvHUACxQ==} + + spawndamnit@3.0.1: + resolution: {integrity: sha512-MmnduQUuHCoFckZoWnXsTg7JaiLBJrKFj9UI2MbRPGaJeVpsLcVBu6P/IGZovziM/YBsellCmsprgNA+w0CzVg==} + + split-on-first@1.1.0: + resolution: {integrity: sha512-43ZssAJaMusuKWL8sKUBQXHWOpq8d6CfN/u1p4gUzfJkM05C8rxTmYrkIPTXapZpORA6LkkzcUulJ8FqA7Uudw==} + engines: {node: '>=6'} + + split2@4.2.0: + resolution: {integrity: sha512-UcjcJOWknrNkF6PLX83qcHM6KHgVKNkV62Y8a5uYDVv9ydGQVwAHMKqHdJje1VTWpljG0WYpCDhrCdAOYH4TWg==} + engines: {node: '>= 10.x'} + + sprintf-js@1.0.3: + resolution: {integrity: sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==} + + sprintf-js@1.1.3: + resolution: {integrity: sha512-Oo+0REFV59/rz3gfJNKQiBlwfHaSESl1pcGyABQsnnIfWOFt6JNj5gCog2U6MLZ//IGYD+nA8nI+mTShREReaA==} + + stack-utils@2.0.6: + resolution: {integrity: sha512-XlkWvfIm6RmsWtNJx+uqtKLS8eqFbxUg0ZzLXqY0caEy9l7hruX8IpiDnjsLavoBgqCCR71TqWO8MaXYheJ3RQ==} + engines: {node: '>=10'} + + stream-shift@1.0.3: + resolution: {integrity: sha512-76ORR0DO1o1hlKwTbi/DM3EXWGf3ZJYO8cXX5RJwnul2DEg2oyoZyjLNoQM8WsvZiFKCRfC1O0J7iCvie3RZmQ==} + + streamsearch@1.1.0: + resolution: {integrity: sha512-Mcc5wHehp9aXz1ax6bZUyY5afg9u2rv5cqQI3mRrYkGC8rW2hM02jWuwjtL++LS5qinSyhj2QfLyNsuc+VsExg==} + engines: {node: '>=10.0.0'} + + strict-uri-encode@2.0.0: + resolution: {integrity: sha512-QwiXZgpRcKkhTj2Scnn++4PKtWsH0kpzZ62L2R6c/LUVYv7hVnZqcg2+sMuT6R7Jusu1vviK/MFsu6kNJfWlEQ==} + engines: {node: '>=4'} + + string-length@4.0.2: + resolution: {integrity: sha512-+l6rNN5fYHNhZZy41RXsYptCjA2Igmq4EG7kZAYFQI1E1VTXarr6ZPXBg6eq7Y6eK4FEhY6AJlyuFIb/v/S0VQ==} + engines: {node: '>=10'} + + string-width@4.2.3: + resolution: {integrity: sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==} + engines: {node: '>=8'} + + string-width@5.1.2: + resolution: {integrity: sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==} + engines: {node: '>=12'} + + string.prototype.matchall@4.0.11: + resolution: {integrity: sha512-NUdh0aDavY2og7IbBPenWqR9exH+E26Sv8e0/eTe1tltDGZL+GtBkDAnnyBtmekfK6/Dq3MkcGtzXFEd1LQrtg==} + engines: {node: '>= 0.4'} + + string.prototype.repeat@1.0.0: + resolution: {integrity: sha512-0u/TldDbKD8bFCQ/4f5+mNRrXwZ8hg2w7ZR8wa16e8z9XpePWl3eGEcUD0OXpEH/VJH/2G3gjUtR3ZOiBe2S/w==} + + string.prototype.trim@1.2.9: + resolution: {integrity: sha512-klHuCNxiMZ8MlsOihJhJEBJAiMVqU3Z2nEXWfWnIqjN0gEFS9J9+IxKozWWtQGcgoa1WUZzLjKPTr4ZHNFTFxw==} + engines: {node: '>= 0.4'} + + string.prototype.trimend@1.0.8: + resolution: {integrity: sha512-p73uL5VCHCO2BZZ6krwwQE3kCzM7NKmis8S//xEC6fQonchbum4eP6kR4DLEjQFO3Wnj3Fuo8NM0kOSjVdHjZQ==} + + string.prototype.trimstart@1.0.8: + resolution: {integrity: sha512-UXSH262CSZY1tfu3G3Secr6uGLCFVPMhIqHjlgCUtCCcgihYc/xKs9djMTMUOb2j1mVSeU8EU6NWc/iQKU6Gfg==} + engines: {node: '>= 0.4'} + + string_decoder@1.1.1: + resolution: {integrity: sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==} + + string_decoder@1.3.0: + resolution: {integrity: sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==} + + strip-ansi@6.0.1: + resolution: {integrity: sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==} + engines: {node: '>=8'} + + strip-ansi@7.1.0: + resolution: {integrity: sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==} + engines: {node: '>=12'} + + strip-bom@3.0.0: + resolution: {integrity: sha512-vavAMRXOgBVNF6nyEEmL3DBK19iRpDcoIwW+swQ+CbGiu7lju6t+JklA1MHweoWtadgt4ISVUsXLyDq34ddcwA==} + engines: {node: '>=4'} + + strip-bom@4.0.0: + resolution: {integrity: sha512-3xurFv5tEgii33Zi8Jtp55wEIILR9eh34FAW00PZf+JnSsTmV/ioewSgQl97JHvgjoRGwPShsWm+IdrxB35d0w==} + engines: {node: '>=8'} + + strip-final-newline@2.0.0: + resolution: {integrity: sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA==} + engines: {node: '>=6'} + + strip-json-comments@2.0.1: + resolution: {integrity: sha512-4gB8na07fecVVkOI6Rs4e7T6NOTki5EmL7TUduTs6bu3EdnSycntVJ4re8kgZA+wx9IueI2Y11bfbgwtzuE0KQ==} + engines: {node: '>=0.10.0'} + + strip-json-comments@3.1.1: + resolution: {integrity: sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==} + engines: {node: '>=8'} + + styled-jsx@5.1.6: + resolution: {integrity: sha512-qSVyDTeMotdvQYoHWLNGwRFJHC+i+ZvdBRYosOFgC+Wg1vx4frN2/RG/NA7SYqqvKNLf39P2LSRA2pu6n0XYZA==} + engines: {node: '>= 12.0.0'} + peerDependencies: + '@babel/core': '*' + babel-plugin-macros: '*' + react: '>= 16.8.0 || 17.x.x || ^18.0.0-0 || ^19.0.0-0' + peerDependenciesMeta: + '@babel/core': + optional: true + babel-plugin-macros: + optional: true + + superstruct@1.0.4: + resolution: {integrity: sha512-7JpaAoX2NGyoFlI9NBh66BQXGONc+uE+MRS5i2iOBKuS4e+ccgMDjATgZldkah+33DakBxDHiss9kvUcGAO8UQ==} + engines: {node: '>=14.0.0'} + + supports-color@5.5.0: + resolution: {integrity: sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==} + engines: {node: '>=4'} + + supports-color@7.2.0: + resolution: {integrity: sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==} + engines: {node: '>=8'} + + supports-color@8.1.1: + resolution: {integrity: sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==} + engines: {node: '>=10'} + + supports-preserve-symlinks-flag@1.0.0: + resolution: {integrity: sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==} + engines: {node: '>= 0.4'} + + swap-case@1.1.2: + resolution: {integrity: sha512-BAmWG6/bx8syfc6qXPprof3Mn5vQgf5dwdUNJhsNqU9WdPt5P+ES/wQ5bxfijy8zwZgZZHslC3iAsxsuQMCzJQ==} + + tailwind-merge@3.2.0: + resolution: {integrity: sha512-FQT/OVqCD+7edmmJpsgCsY820RTD5AkBryuG5IUqR5YQZSdj5xlH5nLgH7YPths7WsLPSpSBNneJdM8aS8aeFA==} + + tailwindcss@4.1.4: + resolution: {integrity: sha512-1ZIUqtPITFbv/DxRmDr5/agPqJwF69d24m9qmM1939TJehgY539CtzeZRjbLt5G6fSy/7YqqYsfvoTEw9xUI2A==} + + tapable@2.2.1: + resolution: {integrity: sha512-GNzQvQTOIP6RyTfE2Qxb8ZVlNmw0n88vp1szwWRimP02mnTsx3Wtn5qRdqY9w2XduFNUgvOwhNnQsjwCp+kqaQ==} + engines: {node: '>=6'} + + term-size@2.2.1: + resolution: {integrity: sha512-wK0Ri4fOGjv/XPy8SBHZChl8CM7uMc5VML7SqiQ0zG7+J5Vr+RMQDoHa2CNT6KHUnTGIXH34UDMkPzAUyapBZg==} + engines: {node: '>=8'} + + test-exclude@6.0.0: + resolution: {integrity: sha512-cAGWPIyOHU6zlmg88jwm7VRyXnMN7iV68OGAbYDk/Mh/xC/pzVPlQtY6ngoIH/5/tciuhGfvESU8GrHrcxD56w==} + engines: {node: '>=8'} + + thread-stream@0.15.2: + resolution: {integrity: sha512-UkEhKIg2pD+fjkHQKyJO3yoIvAP3N6RlNFt2dUhcS1FGvCD1cQa1M/PGknCLFIyZdtJOWQjejp7bdNqmN7zwdA==} + + through@2.3.8: + resolution: {integrity: sha512-w89qg7PI8wAdvX60bMDP+bFoD5Dvhm9oLheFp5O4a2QF0cSBGsBX4qZmadPMvVqlLJBBci+WqGGOAPvcDeNSVg==} + + tinycolor2@1.6.0: + resolution: {integrity: sha512-XPaBkWQJdsf3pLKJV9p4qN/S+fm2Oj8AIPo1BTUhg5oxkvm9+SVEGFdhyOz7tTdUTfvxMiAs4sp6/eZO2Ew+pw==} + + tinygradient@1.1.5: + resolution: {integrity: sha512-8nIfc2vgQ4TeLnk2lFj4tRLvvJwEfQuabdsmvDdQPT0xlk9TaNtpGd6nNRxXoK6vQhN6RSzj+Cnp5tTQmpxmbw==} + + title-case@2.1.1: + resolution: {integrity: sha512-EkJoZ2O3zdCz3zJsYCsxyq2OC5hrxR9mfdd5I+w8h/tmFfeOxJ+vvkxsKxdmN0WtS9zLdHEgfgVOiMVgv+Po4Q==} + + tmp@0.0.33: + resolution: {integrity: sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw==} + engines: {node: '>=0.6.0'} + + tmpl@1.0.5: + resolution: {integrity: sha512-3f0uOEAQwIqGuWW2MVzYg8fV/QNnc/IpuJNG837rLuczAaLVHslWHZQj4IGiEl5Hs3kkbhwL9Ab7Hrsmuj+Smw==} + + to-regex-range@5.0.1: + resolution: {integrity: sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==} + engines: {node: '>=8.0'} + + toggle-selection@1.0.6: + resolution: {integrity: sha512-BiZS+C1OS8g/q2RRbJmy59xpyghNBqrr6k5L/uKBGRsTfxmu3ffiRnd8mlGPUVayg8pvfi5urfnu8TU7DVOkLQ==} + + touch@3.1.1: + resolution: {integrity: sha512-r0eojU4bI8MnHr8c5bNo7lJDdI2qXlWWJk6a9EAFG7vbhTjElYhBVS3/miuE0uOuoLdb8Mc/rVfsmm6eo5o9GA==} + hasBin: true + + tr46@0.0.3: + resolution: {integrity: sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==} + + tree-kill@1.2.2: + resolution: {integrity: sha512-L0Orpi8qGpRG//Nd+H90vFB+3iHnue1zSSGmNOOCh1GLJ7rUKVwV2HvijphGQS2UmhUZewS9VgvxYIdgr+fG1A==} + hasBin: true + + ts-api-utils@1.4.0: + resolution: {integrity: sha512-032cPxaEKwM+GT3vA5JXNzIaizx388rhsSW79vGRNGXfRRAdEAn2mvk36PvK5HnOchyWZ7afLEXqYCvPCrzuzQ==} + engines: {node: '>=16'} + peerDependencies: + typescript: '>=4.2.0' + + ts-api-utils@2.1.0: + resolution: {integrity: sha512-CUgTZL1irw8u29bzrOD/nH85jqyc74D6SshFgujOIA7osm2Rz7dYH77agkx7H4FBNxDq7Cjf+IjaX/8zwFW+ZQ==} + engines: {node: '>=18.12'} + peerDependencies: + typescript: '>=4.8.4' + + ts-jest@29.2.6: + resolution: {integrity: sha512-yTNZVZqc8lSixm+QGVFcPe6+yj7+TWZwIesuOWvfcn4B9bz5x4NDzVCQQjOs7Hfouu36aEqfEbo9Qpo+gq8dDg==} + engines: {node: ^14.15.0 || ^16.10.0 || ^18.0.0 || >=20.0.0} + hasBin: true + peerDependencies: + '@babel/core': '>=7.0.0-beta.0 <8' + '@jest/transform': ^29.0.0 + '@jest/types': ^29.0.0 + babel-jest: ^29.0.0 + esbuild: '*' + jest: ^29.0.0 + typescript: '>=4.3 <6' + peerDependenciesMeta: + '@babel/core': + optional: true + '@jest/transform': + optional: true + '@jest/types': + optional: true + babel-jest: + optional: true + esbuild: + optional: true + + ts-node@10.9.2: + resolution: {integrity: sha512-f0FFpIdcHgn8zcPSbf1dRevwt047YMnaiJM3u2w2RewrB+fob/zePZcrOyQoLMMO7aBIddLcQIEK5dYjkLnGrQ==} + hasBin: true + peerDependencies: + '@swc/core': '>=1.2.50' + '@swc/wasm': '>=1.2.50' + '@types/node': '*' + typescript: '>=2.7' + peerDependenciesMeta: + '@swc/core': + optional: true + '@swc/wasm': + optional: true + + tslib@1.14.1: + resolution: {integrity: sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==} + + tslib@2.7.0: + resolution: {integrity: sha512-gLXCKdN1/j47AiHiOkJN69hJmcbGTHI0ImLmbYLHykhgeN0jVGola9yVjFgzCUklsZQMW55o+dW7IXv3RCXDzA==} + + tslib@2.8.1: + resolution: {integrity: sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==} + + turbo-darwin-64@2.5.0: + resolution: {integrity: sha512-fP1hhI9zY8hv0idym3hAaXdPi80TLovmGmgZFocVAykFtOxF+GlfIgM/l4iLAV9ObIO4SUXPVWHeBZQQ+Hpjag==} + cpu: [x64] + os: [darwin] + + turbo-darwin-arm64@2.5.0: + resolution: {integrity: sha512-p9sYq7kXH7qeJwIQE86cOWv/xNqvow846l6c/qWc26Ib1ci5W7V0sI5thsrP3eH+VA0d+SHalTKg5SQXgNQBWA==} + cpu: [arm64] + os: [darwin] + + turbo-linux-64@2.5.0: + resolution: {integrity: sha512-1iEln2GWiF3iPPPS1HQJT6ZCFXynJPd89gs9SkggH2EJsj3eRUSVMmMC8y6d7bBbhBFsiGGazwFIYrI12zs6uQ==} + cpu: [x64] + os: [linux] + + turbo-linux-arm64@2.5.0: + resolution: {integrity: sha512-bKBcbvuQHmsX116KcxHJuAcppiiBOfivOObh2O5aXNER6mce7YDDQJy00xQQNp1DhEfcSV2uOsvb3O3nN2cbcA==} + cpu: [arm64] + os: [linux] + + turbo-stream@2.4.0: + resolution: {integrity: sha512-FHncC10WpBd2eOmGwpmQsWLDoK4cqsA/UT/GqNoaKOQnT8uzhtCbg3EoUDMvqpOSAI0S26mr0rkjzbOO6S3v1g==} + + turbo-windows-64@2.5.0: + resolution: {integrity: sha512-9BCo8oQ7BO7J0K913Czbc3tw8QwLqn2nTe4E47k6aVYkM12ASTScweXPTuaPFP5iYXAT6z5Dsniw704Ixa5eGg==} + cpu: [x64] + os: [win32] + + turbo-windows-arm64@2.5.0: + resolution: {integrity: sha512-OUHCV+ueXa3UzfZ4co/ueIHgeq9B2K48pZwIxKSm5VaLVuv8M13MhM7unukW09g++dpdrrE1w4IOVgxKZ0/exg==} + cpu: [arm64] + os: [win32] + + turbo@2.5.0: + resolution: {integrity: sha512-PvSRruOsitjy6qdqwIIyolv99+fEn57gP6gn4zhsHTEcCYgXPhv6BAxzAjleS8XKpo+Y582vTTA9nuqYDmbRuA==} + hasBin: true + + type-check@0.4.0: + resolution: {integrity: sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==} + engines: {node: '>= 0.8.0'} + + type-detect@4.0.8: + resolution: {integrity: sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==} + engines: {node: '>=4'} + + type-fest@0.21.3: + resolution: {integrity: sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w==} + engines: {node: '>=10'} + + typed-array-buffer@1.0.2: + resolution: {integrity: sha512-gEymJYKZtKXzzBzM4jqa9w6Q1Jjm7x2d+sh19AdsD4wqnMPDYyvwpsIc2Q/835kHuo3BEQ7CjelGhfTsoBb2MQ==} + engines: {node: '>= 0.4'} + + typed-array-byte-length@1.0.1: + resolution: {integrity: sha512-3iMJ9q0ao7WE9tWcaYKIptkNBuOIcZCCT0d4MRvuuH88fEoEH62IuQe0OtraD3ebQEoTRk8XCBoknUNc1Y67pw==} + engines: {node: '>= 0.4'} + + typed-array-byte-offset@1.0.3: + resolution: {integrity: sha512-GsvTyUHTriq6o/bHcTd0vM7OQ9JEdlvluu9YISaA7+KzDzPaIzEeDFNkTfhdE3MYcNhNi0vq/LlegYgIs5yPAw==} + engines: {node: '>= 0.4'} + + typed-array-length@1.0.7: + resolution: {integrity: sha512-3KS2b+kL7fsuk/eJZ7EQdnEmQoaho/r6KUef7hxvltNA5DR8NAUM+8wJMbJyZ4G9/7i3v5zPBIMN5aybAh2/Jg==} + engines: {node: '>= 0.4'} + + typescript-eslint@8.15.0: + resolution: {integrity: sha512-wY4FRGl0ZI+ZU4Jo/yjdBu0lVTSML58pu6PgGtJmCufvzfV565pUF6iACQt092uFOd49iLOTX/sEVmHtbSrS+w==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + peerDependencies: + eslint: ^8.57.0 || ^9.0.0 + typescript: '*' + peerDependenciesMeta: + typescript: + optional: true + + typescript-eslint@8.30.1: + resolution: {integrity: sha512-D7lC0kcehVH7Mb26MRQi64LMyRJsj3dToJxM1+JVTl53DQSV5/7oUGWQLcKl1C1KnoVHxMMU2FNQMffr7F3Row==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + peerDependencies: + eslint: ^8.57.0 || ^9.0.0 + typescript: '>=4.8.4 <5.9.0' + + typescript@5.5.4: + resolution: {integrity: sha512-Mtq29sKDAEYP7aljRgtPOpTvOfbwRWlS6dPRzwjdE+C0R4brX/GUyhHSecbHMFLNBLcJIPt9nl9yG5TZ1weH+Q==} + engines: {node: '>=14.17'} + hasBin: true + + typescript@5.7.3: + resolution: {integrity: sha512-84MVSjMEHP+FQRPy3pX9sTVV/INIex71s9TL2Gm5FG/WG1SqXeKyZ0k7/blY/4FdOzI12CBy1vGc4og/eus0fw==} + engines: {node: '>=14.17'} + hasBin: true + + typescript@5.8.3: + resolution: {integrity: sha512-p1diW6TqL9L07nNxvRMM7hMMw4c5XOo/1ibL4aAIGmSAt9slTE1Xgw5KWuof2uTOvCg9BY7ZRi+GaF+7sfgPeQ==} + engines: {node: '>=14.17'} + hasBin: true + + ufo@1.6.1: + resolution: {integrity: sha512-9a4/uxlTWJ4+a5i0ooc1rU7C7YOw3wT+UGqdeNNHWnOF9qcMBgLRS+4IYUqbczewFx4mLEig6gawh7X6mFlEkA==} + + uglify-js@3.19.3: + resolution: {integrity: sha512-v3Xu+yuwBXisp6QYTcH4UbH+xYJXqnq2m/LtQVWKWzYc1iehYnLixoQDN9FH6/j9/oybfd6W9Ghwkl8+UMKTKQ==} + engines: {node: '>=0.8.0'} + hasBin: true + + uint8arrays@3.1.0: + resolution: {integrity: sha512-ei5rfKtoRO8OyOIor2Rz5fhzjThwIHJZ3uyDPnDHTXbP0aMQ1RN/6AI5B5d9dBxJOU+BvOAk7ZQ1xphsX8Lrog==} + + unbox-primitive@1.0.2: + resolution: {integrity: sha512-61pPlCD9h51VoreyJ0BReideM3MDKMKnh6+V9L08331ipq6Q8OFXZYiqP6n/tbHx4s5I9uRhcye6BrbkizkBDw==} + + uncrypto@0.1.3: + resolution: {integrity: sha512-Ql87qFHB3s/De2ClA9e0gsnS6zXG27SkTiSJwjCc9MebbfapQfuPzumMIUMi38ezPZVNFcHI9sUIepeQfw8J8Q==} + + undefsafe@2.0.5: + resolution: {integrity: sha512-WxONCrssBM8TSPRqN5EmsjVrsv4A8X12J4ArBiiayv3DyyG3ZlIg6yysuuSYdZsVz3TKcTg2fd//Ujd4CHV1iA==} + + undici-types@6.19.8: + resolution: {integrity: sha512-ve2KP6f/JnbPBFyobGHuerC9g1FYGn/F8n1LWTwNxCEzd6IfqTwUQcNXgEtmmQ6DlRrC1hrSrBnCZPokRrDHjw==} + + undici-types@6.20.0: + resolution: {integrity: sha512-Ny6QZ2Nju20vw1SRHe3d9jVu6gJ+4e3+MMpqu7pqE5HT6WsTSlce++GQmK5UXS8mzV8DSYHrQH+Xrf2jVcuKNg==} + + universalify@0.1.2: + resolution: {integrity: sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==} + engines: {node: '>= 4.0.0'} + + universalify@2.0.1: + resolution: {integrity: sha512-gptHNQghINnc/vTGIk0SOFGFNXw7JVrlRUtConJRlvaw6DuX0wO5Jeko9sWrMBhh+PsYAZ7oXAiOnf/UKogyiw==} + engines: {node: '>= 10.0.0'} + + unstorage@1.15.0: + resolution: {integrity: sha512-m40eHdGY/gA6xAPqo8eaxqXgBuzQTlAKfmB1iF7oCKXE1HfwHwzDJBywK+qQGn52dta+bPlZluPF7++yR3p/bg==} + peerDependencies: + '@azure/app-configuration': ^1.8.0 + '@azure/cosmos': ^4.2.0 + '@azure/data-tables': ^13.3.0 + '@azure/identity': ^4.6.0 + '@azure/keyvault-secrets': ^4.9.0 + '@azure/storage-blob': ^12.26.0 + '@capacitor/preferences': ^6.0.3 + '@deno/kv': '>=0.9.0' + '@netlify/blobs': ^6.5.0 || ^7.0.0 || ^8.1.0 + '@planetscale/database': ^1.19.0 + '@upstash/redis': ^1.34.3 + '@vercel/blob': '>=0.27.1' + '@vercel/kv': ^1.0.1 + aws4fetch: ^1.0.20 + db0: '>=0.2.1' + idb-keyval: ^6.2.1 + ioredis: ^5.4.2 + uploadthing: ^7.4.4 + peerDependenciesMeta: + '@azure/app-configuration': + optional: true + '@azure/cosmos': + optional: true + '@azure/data-tables': + optional: true + '@azure/identity': + optional: true + '@azure/keyvault-secrets': + optional: true + '@azure/storage-blob': + optional: true + '@capacitor/preferences': + optional: true + '@deno/kv': + optional: true + '@netlify/blobs': + optional: true + '@planetscale/database': + optional: true + '@upstash/redis': + optional: true + '@vercel/blob': + optional: true + '@vercel/kv': + optional: true + aws4fetch: + optional: true + db0: + optional: true + idb-keyval: + optional: true + ioredis: + optional: true + uploadthing: + optional: true + + update-browserslist-db@1.1.3: + resolution: {integrity: sha512-UxhIZQ+QInVdunkDAaiazvvT/+fXL5Osr0JZlJulepYu6Jd7qJtDZjlur0emRlT71EN3ScPoE7gvsuIKKNavKw==} + hasBin: true + peerDependencies: + browserslist: '>= 4.21.0' + + update-check@1.5.4: + resolution: {integrity: sha512-5YHsflzHP4t1G+8WGPlvKbJEbAJGCgw+Em+dGR1KmBUbr1J36SJBqlHLjR7oob7sco5hWHGQVcr9B2poIVDDTQ==} + + upper-case-first@1.1.2: + resolution: {integrity: sha512-wINKYvI3Db8dtjikdAqoBbZoP6Q+PZUyfMR7pmwHzjC2quzSkUq5DmPrTtPEqHaz8AGtmsB4TqwapMTM1QAQOQ==} + + upper-case@1.1.3: + resolution: {integrity: sha512-WRbjgmYzgXkCV7zNVpy5YgrHgbBv126rMALQQMrmzOVC4GM2waQ9x7xtm8VU+1yF2kWyPzI9zbZ48n4vSxwfSA==} + + uri-js@4.4.1: + resolution: {integrity: sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==} + + use-callback-ref@1.3.3: + resolution: {integrity: sha512-jQL3lRnocaFtu3V00JToYz/4QkNWswxijDaCVNZRiRTO3HQDLsdu1ZtmIUvV4yPp+rvWm5j0y0TG/S61cuijTg==} + engines: {node: '>=10'} + peerDependencies: + '@types/react': '*' + react: ^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0 || ^19.0.0-rc + peerDependenciesMeta: + '@types/react': + optional: true + + use-sidecar@1.1.3: + resolution: {integrity: sha512-Fedw0aZvkhynoPYlA5WXrMCAMm+nSWdZt6lzJQ7Ok8S6Q+VsHmHpRWndVRJ8Be0ZbkfPc5LRYH+5XrzXcEeLRQ==} + engines: {node: '>=10'} + peerDependencies: + '@types/react': '*' + react: ^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0 || ^19.0.0-rc + peerDependenciesMeta: + '@types/react': + optional: true + + use-sync-external-store@1.2.0: + resolution: {integrity: sha512-eEgnFxGQ1Ife9bzYs6VLi8/4X6CObHMw9Qr9tPY43iKwsPw8xE8+EFsf/2cFZ5S3esXgpWgtSCtLNS41F+sKPA==} + peerDependencies: + react: ^16.8.0 || ^17.0.0 || ^18.0.0 + + use-sync-external-store@1.4.0: + resolution: {integrity: sha512-9WXSPC5fMv61vaupRkCKCxsPxBocVnwakBEkMIHHpkTTg6icbJtg6jzgtLDm4bl3cSHAca52rYWih0k4K3PfHw==} + peerDependencies: + react: ^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0 + + utf-8-validate@5.0.10: + resolution: {integrity: sha512-Z6czzLq4u8fPOyx7TU6X3dvUZVvoJmxSQ+IcrlmagKhilxlhZgxPK6C5Jqbkw1IDUmFTM+cz9QDnnLTwDz/2gQ==} + engines: {node: '>=6.14.2'} + + util-deprecate@1.0.2: + resolution: {integrity: sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==} + + util@0.12.5: + resolution: {integrity: sha512-kZf/K6hEIrWHI6XqOFUiiMa+79wE/D8Q+NCNAWclkyg3b4d2k7s0QGepNjiABc+aR3N1PAyHL7p6UcLY6LmrnA==} + + uuid@11.1.0: + resolution: {integrity: sha512-0/A9rDy9P7cJ+8w1c9WD9V//9Wj15Ce2MPz8Ri6032usz+NfePxx5AcN3bN+r6ZL6jEo066/yNYB3tn4pQEx+A==} + hasBin: true + + uuid@8.3.2: + resolution: {integrity: sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==} + hasBin: true + + uuid@9.0.1: + resolution: {integrity: sha512-b+1eJOlsR9K8HJpow9Ok3fiWOWSIcIzXodvv0rQjVoOVNpWMpxf1wZNpt4y9h10odCNrqnYp1OBzRktckBe3sA==} + hasBin: true + + v8-compile-cache-lib@3.0.1: + resolution: {integrity: sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg==} + + v8-to-istanbul@9.3.0: + resolution: {integrity: sha512-kiGUalWN+rgBJ/1OHZsBtU4rXZOfj/7rKQxULKlIzwzQSvMJUUNgPwJEEh7gU6xEVxC0ahoOBvN2YI8GH6FNgA==} + engines: {node: '>=10.12.0'} + + validate-npm-package-name@5.0.1: + resolution: {integrity: sha512-OljLrQ9SQdOUqTaQxqL5dEfZWrXExyyWsozYlAWFawPVNuD83igl7uJD2RTkNMbniIYgt8l81eCJGIdQF7avLQ==} + engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0} + + valtio@1.11.2: + resolution: {integrity: sha512-1XfIxnUXzyswPAPXo1P3Pdx2mq/pIqZICkWN60Hby0d9Iqb+MEIpqgYVlbflvHdrp2YR/q3jyKWRPJJ100yxaw==} + engines: {node: '>=12.20.0'} + peerDependencies: + '@types/react': '>=16.8' + react: '>=16.8' + peerDependenciesMeta: + '@types/react': + optional: true + react: + optional: true + + viem@2.23.2: + resolution: {integrity: sha512-NVmW/E0c5crMOtbEAqMF0e3NmvQykFXhLOc/CkLIXOlzHSA6KXVz3CYVmaKqBF8/xtjsjHAGjdJN3Ru1kFJLaA==} + peerDependencies: + typescript: '>=5.0.4' + peerDependenciesMeta: + typescript: + optional: true + + viem@2.27.0: + resolution: {integrity: sha512-pKw2dcwDi6TaWlTzLHYazOgjO1GgbUpE1zdLsLNSiCjHNrMTpL/teL0wVHnJDLiB2tR5CL19LBqefYNtRUkH5Q==} + peerDependencies: + typescript: '>=5.0.4' + peerDependenciesMeta: + typescript: + optional: true + + vite@6.2.6: + resolution: {integrity: sha512-9xpjNl3kR4rVDZgPNdTL0/c6ao4km69a/2ihNQbcANz8RuCOK3hQBmLSJf3bRKVQjVMda+YvizNE8AwvogcPbw==} + engines: {node: ^18.0.0 || ^20.0.0 || >=22.0.0} + hasBin: true + peerDependencies: + '@types/node': ^18.0.0 || ^20.0.0 || >=22.0.0 + jiti: '>=1.21.0' + less: '*' + lightningcss: ^1.21.0 + sass: '*' + sass-embedded: '*' + stylus: '*' + sugarss: '*' + terser: ^5.16.0 + tsx: ^4.8.1 + yaml: ^2.4.2 + peerDependenciesMeta: + '@types/node': + optional: true + jiti: + optional: true + less: + optional: true + lightningcss: + optional: true + sass: + optional: true + sass-embedded: + optional: true + stylus: + optional: true + sugarss: + optional: true + terser: + optional: true + tsx: + optional: true + yaml: + optional: true + + wagmi@2.14.16: + resolution: {integrity: sha512-njOPvB8L0+jt3m1FTJiVF44T1u+kcjLtVWKvwI0mZnIesZTQZ/xDF0M/NHj3Uljyn3qJw3pyHjJe31NC+VVHMA==} + peerDependencies: + '@tanstack/react-query': '>=5.0.0' + react: '>=18' + typescript: '>=5.0.4' + viem: 2.x + peerDependenciesMeta: + typescript: + optional: true + + walker@1.0.8: + resolution: {integrity: sha512-ts/8E8l5b7kY0vlWLewOkDXMmPdLcVV4GmOQLyxuSswIJsweeFZtAsMF7k1Nszz+TYBQrlYRmzOnr398y1JemQ==} + + wcwidth@1.0.1: + resolution: {integrity: sha512-XHPEwS0q6TaxcvG85+8EYkbiCux2XtWG2mkc47Ng2A77BQu9+DqIOJldST4HgPkuea7dvKSj5VgX3P1d4rW8Tg==} + + webextension-polyfill@0.10.0: + resolution: {integrity: sha512-c5s35LgVa5tFaHhrZDnr3FpQpjj1BB+RXhLTYUxGqBVN460HkbM8TBtEqdXWbpTKfzwCcjAZVF7zXCYSKtcp9g==} + + webidl-conversions@3.0.1: + resolution: {integrity: sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==} + + whatwg-url@5.0.0: + resolution: {integrity: sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==} + + which-boxed-primitive@1.0.2: + resolution: {integrity: sha512-bwZdv0AKLpplFY2KZRX6TvyuN7ojjr7lwkg6ml0roIy9YeuSr7JS372qlNW18UQYzgYK9ziGcerWqZOmEn9VNg==} + + which-builtin-type@1.1.4: + resolution: {integrity: sha512-bppkmBSsHFmIMSl8BO9TbsyzsvGjVoppt8xUiGzwiu/bhDCGxnpOKCxgqj6GuyHE0mINMDecBFPlOm2hzY084w==} + engines: {node: '>= 0.4'} + + which-collection@1.0.2: + resolution: {integrity: sha512-K4jVyjnBdgvc86Y6BkaLZEN933SwYOuBFkdmBu9ZfkcAbdVbpITnDmjvZ/aQjRXQrv5EPkTnD1s39GiiqbngCw==} + engines: {node: '>= 0.4'} + + which-module@2.0.1: + resolution: {integrity: sha512-iBdZ57RDvnOR9AGBhML2vFZf7h8vmBjhoaZqODJBFWHVtKkDmKuHai3cx5PgVMrX5YDNp27AofYbAwctSS+vhQ==} + + which-typed-array@1.1.15: + resolution: {integrity: sha512-oV0jmFtUky6CXfkqehVvBP/LSWJ2sy4vWMioiENyJLePrBO/yKyV9OyJySfAKosh+RYkIl5zJCNZ8/4JncrpdA==} + engines: {node: '>= 0.4'} + + which@2.0.2: + resolution: {integrity: sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==} + engines: {node: '>= 8'} + hasBin: true + + word-wrap@1.2.5: + resolution: {integrity: sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA==} + engines: {node: '>=0.10.0'} + + wordwrap@1.0.0: + resolution: {integrity: sha512-gvVzJFlPycKc5dZN4yPkP8w7Dc37BtP1yczEneOb4uq34pXZcvrtRTmWV8W+Ume+XCxKgbjM+nevkyFPMybd4Q==} + + wrap-ansi@6.2.0: + resolution: {integrity: sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA==} + engines: {node: '>=8'} + + wrap-ansi@7.0.0: + resolution: {integrity: sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==} + engines: {node: '>=10'} + + wrap-ansi@8.1.0: + resolution: {integrity: sha512-si7QWI6zUMq56bESFvagtmzMdGOtoxfR+Sez11Mobfc7tm+VkUckk9bW2UeffTGVUbOksxmSw0AA2gs8g71NCQ==} + engines: {node: '>=12'} + + wrappy@1.0.2: + resolution: {integrity: sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==} + + write-file-atomic@4.0.2: + resolution: {integrity: sha512-7KxauUdBmSdWnmpaGFg+ppNjKF8uNLry8LyzjauQDOVONfFLNKrKvQOxZ/VuTIcS/gge/YNahf5RIIQWTSarlg==} + engines: {node: ^12.13.0 || ^14.15.0 || >=16.0.0} + + ws@7.5.10: + resolution: {integrity: sha512-+dbF1tHwZpXcbOJdVOkzLDxZP1ailvSxM6ZweXTegylPny803bFhA+vqBYw4s31NSAk4S2Qz+AKXK9a4wkdjcQ==} + engines: {node: '>=8.3.0'} + peerDependencies: + bufferutil: ^4.0.1 + utf-8-validate: ^5.0.2 + peerDependenciesMeta: + bufferutil: + optional: true + utf-8-validate: + optional: true + + ws@8.17.1: + resolution: {integrity: sha512-6XQFvXTkbfUOZOKKILFG1PDK2NDQs4azKQl26T0YS5CxqWLgXajbPZ+h4gZekJyRqFU8pvnbAbbs/3TgRPy+GQ==} + engines: {node: '>=10.0.0'} + peerDependencies: + bufferutil: ^4.0.1 + utf-8-validate: '>=5.0.2' + peerDependenciesMeta: + bufferutil: + optional: true + utf-8-validate: + optional: true + + ws@8.18.0: + resolution: {integrity: sha512-8VbfWfHLbbwu3+N6OKsOMpBdT4kXPDDB9cJk2bJ6mh9ucxdlnNvH1e+roYkKmN9Nxw2yjz7VzeO9oOz2zJ04Pw==} + engines: {node: '>=10.0.0'} + peerDependencies: + bufferutil: ^4.0.1 + utf-8-validate: '>=5.0.2' + peerDependenciesMeta: + bufferutil: + optional: true + utf-8-validate: + optional: true + + ws@8.18.1: + resolution: {integrity: sha512-RKW2aJZMXeMxVpnZ6bck+RswznaxmzdULiBr6KY7XkTnW8uvt0iT9H5DkHUChXrc+uurzwa0rVI16n/Xzjdz1w==} + engines: {node: '>=10.0.0'} + peerDependencies: + bufferutil: ^4.0.1 + utf-8-validate: '>=5.0.2' + peerDependenciesMeta: + bufferutil: + optional: true + utf-8-validate: + optional: true + + xmlhttprequest-ssl@2.1.2: + resolution: {integrity: sha512-TEU+nJVUUnA4CYJFLvK5X9AOeH4KvDvhIfm0vV1GaQRtchnG0hgK5p8hw/xjv8cunWYCsiPCSDzObPyhEwq3KQ==} + engines: {node: '>=0.4.0'} + + xtend@4.0.2: + resolution: {integrity: sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==} + engines: {node: '>=0.4'} + + y18n@4.0.3: + resolution: {integrity: sha512-JKhqTOwSrqNA1NY5lSztJ1GrBiUodLMmIZuLiDaMRJ+itFd+ABVE8XBjOvIWL+rSqNDC74LCSFmlb/U4UZ4hJQ==} + + y18n@5.0.8: + resolution: {integrity: sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==} + engines: {node: '>=10'} + + yallist@3.1.1: + resolution: {integrity: sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==} + + yargs-parser@18.1.3: + resolution: {integrity: sha512-o50j0JeToy/4K6OZcaQmW6lyXXKhq7csREXcDwk2omFPJEwUNOVtJKvmDr9EI1fAJZUyZcRF7kxGBWmRXudrCQ==} + engines: {node: '>=6'} + + yargs-parser@21.1.1: + resolution: {integrity: sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==} + engines: {node: '>=12'} + + yargs@15.4.1: + resolution: {integrity: sha512-aePbxDmcYW++PaqBsJ+HYUFwCdv4LVvdnhBy78E57PIor8/OVvhMrADFFEDh8DHDFRv/O9i3lPhsENjO7QX0+A==} + engines: {node: '>=8'} + + yargs@17.7.2: + resolution: {integrity: sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==} + engines: {node: '>=12'} + + yn@3.1.1: + resolution: {integrity: sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q==} + engines: {node: '>=6'} + + yocto-queue@0.1.0: + resolution: {integrity: sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==} + engines: {node: '>=10'} + + zod@3.24.2: + resolution: {integrity: sha512-lY7CDW43ECgW9u1TcT3IoXHflywfVqDYze4waEz812jR/bZ8FHDsl7pFQoSZTz5N+2NqRXs8GBwnAwo3ZNxqhQ==} + + zustand@5.0.0: + resolution: {integrity: sha512-LE+VcmbartOPM+auOjCCLQOsQ05zUTp8RkgwRzefUk+2jISdMMFnxvyTjA4YNWr5ZGXYbVsEMZosttuxUBkojQ==} + engines: {node: '>=12.20.0'} + peerDependencies: + '@types/react': '>=18.0.0' + immer: '>=9.0.6' + react: '>=18.0.0' + use-sync-external-store: '>=1.2.0' + peerDependenciesMeta: + '@types/react': + optional: true + immer: + optional: true + react: + optional: true + use-sync-external-store: + optional: true + +snapshots: + + 0xsequence@2.3.8(ethers@6.13.5(bufferutil@4.0.9)(utf-8-validate@5.0.10)): + dependencies: + '@0xsequence/abi': 2.3.8 + '@0xsequence/account': 2.3.8(ethers@6.13.5(bufferutil@4.0.9)(utf-8-validate@5.0.10)) + '@0xsequence/api': 2.3.8 + '@0xsequence/auth': 2.3.8(ethers@6.13.5(bufferutil@4.0.9)(utf-8-validate@5.0.10)) + '@0xsequence/core': 2.3.8(ethers@6.13.5(bufferutil@4.0.9)(utf-8-validate@5.0.10)) + '@0xsequence/guard': 2.3.8(ethers@6.13.5(bufferutil@4.0.9)(utf-8-validate@5.0.10)) + '@0xsequence/indexer': 2.3.8 + '@0xsequence/metadata': 2.3.8 + '@0xsequence/migration': 2.3.8(ethers@6.13.5(bufferutil@4.0.9)(utf-8-validate@5.0.10)) + '@0xsequence/network': 2.3.8(ethers@6.13.5(bufferutil@4.0.9)(utf-8-validate@5.0.10)) + '@0xsequence/provider': 2.3.8(ethers@6.13.5(bufferutil@4.0.9)(utf-8-validate@5.0.10)) + '@0xsequence/relayer': 2.3.8(ethers@6.13.5(bufferutil@4.0.9)(utf-8-validate@5.0.10)) + '@0xsequence/sessions': 2.3.8(ethers@6.13.5(bufferutil@4.0.9)(utf-8-validate@5.0.10)) + '@0xsequence/signhub': 2.3.8(ethers@6.13.5(bufferutil@4.0.9)(utf-8-validate@5.0.10)) + '@0xsequence/utils': 2.3.8(ethers@6.13.5(bufferutil@4.0.9)(utf-8-validate@5.0.10)) + '@0xsequence/wallet': 2.3.8(ethers@6.13.5(bufferutil@4.0.9)(utf-8-validate@5.0.10)) + ethers: 6.13.5(bufferutil@4.0.9)(utf-8-validate@5.0.10) + + '@0xsequence/abi@2.3.8': {} + + '@0xsequence/account@2.3.8(ethers@6.13.5(bufferutil@4.0.9)(utf-8-validate@5.0.10))': + dependencies: + '@0xsequence/abi': 2.3.8 + '@0xsequence/core': 2.3.8(ethers@6.13.5(bufferutil@4.0.9)(utf-8-validate@5.0.10)) + '@0xsequence/migration': 2.3.8(ethers@6.13.5(bufferutil@4.0.9)(utf-8-validate@5.0.10)) + '@0xsequence/network': 2.3.8(ethers@6.13.5(bufferutil@4.0.9)(utf-8-validate@5.0.10)) + '@0xsequence/relayer': 2.3.8(ethers@6.13.5(bufferutil@4.0.9)(utf-8-validate@5.0.10)) + '@0xsequence/sessions': 2.3.8(ethers@6.13.5(bufferutil@4.0.9)(utf-8-validate@5.0.10)) + '@0xsequence/utils': 2.3.8(ethers@6.13.5(bufferutil@4.0.9)(utf-8-validate@5.0.10)) + '@0xsequence/wallet': 2.3.8(ethers@6.13.5(bufferutil@4.0.9)(utf-8-validate@5.0.10)) + ethers: 6.13.5(bufferutil@4.0.9)(utf-8-validate@5.0.10) + + '@0xsequence/api@2.3.8': {} + + '@0xsequence/auth@2.3.8(ethers@6.13.5(bufferutil@4.0.9)(utf-8-validate@5.0.10))': + dependencies: + '@0xsequence/abi': 2.3.8 + '@0xsequence/account': 2.3.8(ethers@6.13.5(bufferutil@4.0.9)(utf-8-validate@5.0.10)) + '@0xsequence/api': 2.3.8 + '@0xsequence/core': 2.3.8(ethers@6.13.5(bufferutil@4.0.9)(utf-8-validate@5.0.10)) + '@0xsequence/ethauth': 1.0.0(ethers@6.13.5(bufferutil@4.0.9)(utf-8-validate@5.0.10)) + '@0xsequence/indexer': 2.3.8 + '@0xsequence/metadata': 2.3.8 + '@0xsequence/migration': 2.3.8(ethers@6.13.5(bufferutil@4.0.9)(utf-8-validate@5.0.10)) + '@0xsequence/network': 2.3.8(ethers@6.13.5(bufferutil@4.0.9)(utf-8-validate@5.0.10)) + '@0xsequence/sessions': 2.3.8(ethers@6.13.5(bufferutil@4.0.9)(utf-8-validate@5.0.10)) + '@0xsequence/signhub': 2.3.8(ethers@6.13.5(bufferutil@4.0.9)(utf-8-validate@5.0.10)) + '@0xsequence/utils': 2.3.8(ethers@6.13.5(bufferutil@4.0.9)(utf-8-validate@5.0.10)) + '@0xsequence/wallet': 2.3.8(ethers@6.13.5(bufferutil@4.0.9)(utf-8-validate@5.0.10)) + ethers: 6.13.5(bufferutil@4.0.9)(utf-8-validate@5.0.10) + + '@0xsequence/core@2.3.8(ethers@6.13.5(bufferutil@4.0.9)(utf-8-validate@5.0.10))': + dependencies: + '@0xsequence/abi': 2.3.8 + '@0xsequence/utils': 2.3.8(ethers@6.13.5(bufferutil@4.0.9)(utf-8-validate@5.0.10)) + ethers: 6.13.5(bufferutil@4.0.9)(utf-8-validate@5.0.10) + + '@0xsequence/design-system@2.1.6(@types/react-dom@19.1.2(@types/react@19.1.2))(@types/react@19.1.2)(motion@12.7.2(react-dom@19.0.0(react@19.0.0))(react@19.0.0))(react-dom@19.0.0(react@19.0.0))(react@19.0.0)': + dependencies: + '@radix-ui/react-aspect-ratio': 1.1.3(@types/react-dom@19.1.2(@types/react@19.1.2))(@types/react@19.1.2)(react-dom@19.0.0(react@19.0.0))(react@19.0.0) + '@radix-ui/react-checkbox': 1.1.5(@types/react-dom@19.1.2(@types/react@19.1.2))(@types/react@19.1.2)(react-dom@19.0.0(react@19.0.0))(react@19.0.0) + '@radix-ui/react-collapsible': 1.1.4(@types/react-dom@19.1.2(@types/react@19.1.2))(@types/react@19.1.2)(react-dom@19.0.0(react@19.0.0))(react@19.0.0) + '@radix-ui/react-dialog': 1.1.7(@types/react-dom@19.1.2(@types/react@19.1.2))(@types/react@19.1.2)(react-dom@19.0.0(react@19.0.0))(react@19.0.0) + '@radix-ui/react-dropdown-menu': 2.1.7(@types/react-dom@19.1.2(@types/react@19.1.2))(@types/react@19.1.2)(react-dom@19.0.0(react@19.0.0))(react@19.0.0) + '@radix-ui/react-progress': 1.1.3(@types/react-dom@19.1.2(@types/react@19.1.2))(@types/react@19.1.2)(react-dom@19.0.0(react@19.0.0))(react@19.0.0) + '@radix-ui/react-radio-group': 1.2.4(@types/react-dom@19.1.2(@types/react@19.1.2))(@types/react@19.1.2)(react-dom@19.0.0(react@19.0.0))(react@19.0.0) + '@radix-ui/react-select': 2.1.7(@types/react-dom@19.1.2(@types/react@19.1.2))(@types/react@19.1.2)(react-dom@19.0.0(react@19.0.0))(react@19.0.0) + '@radix-ui/react-slot': 1.2.0(@types/react@19.1.2)(react@19.0.0) + '@radix-ui/react-switch': 1.1.4(@types/react-dom@19.1.2(@types/react@19.1.2))(@types/react@19.1.2)(react-dom@19.0.0(react@19.0.0))(react@19.0.0) + '@radix-ui/react-tabs': 1.1.4(@types/react-dom@19.1.2(@types/react@19.1.2))(@types/react@19.1.2)(react-dom@19.0.0(react@19.0.0))(react@19.0.0) + '@radix-ui/react-toast': 1.2.7(@types/react-dom@19.1.2(@types/react@19.1.2))(@types/react@19.1.2)(react-dom@19.0.0(react@19.0.0))(react@19.0.0) + '@radix-ui/react-tooltip': 1.2.0(@types/react-dom@19.1.2(@types/react@19.1.2))(@types/react@19.1.2)(react-dom@19.0.0(react@19.0.0))(react@19.0.0) + '@radix-ui/react-visually-hidden': 1.1.3(@types/react-dom@19.1.2(@types/react@19.1.2))(@types/react@19.1.2)(react-dom@19.0.0(react@19.0.0))(react@19.0.0) + class-variance-authority: 0.7.1 + clsx: 2.1.1 + motion: 12.7.2(react-dom@19.0.0(react@19.0.0))(react@19.0.0) + react: 19.0.0 + react-dom: 19.0.0(react@19.0.0) + react-hook-form: 7.55.0(react@19.0.0) + tailwind-merge: 3.2.0 + transitivePeerDependencies: + - '@types/react' + - '@types/react-dom' + + '@0xsequence/ethauth@1.0.0(ethers@6.13.5(bufferutil@4.0.9)(utf-8-validate@5.0.10))': + dependencies: + ethers: 6.13.5(bufferutil@4.0.9)(utf-8-validate@5.0.10) + js-base64: 3.7.7 + + '@0xsequence/guard@2.3.8(ethers@6.13.5(bufferutil@4.0.9)(utf-8-validate@5.0.10))': + dependencies: + '@0xsequence/account': 2.3.8(ethers@6.13.5(bufferutil@4.0.9)(utf-8-validate@5.0.10)) + '@0xsequence/core': 2.3.8(ethers@6.13.5(bufferutil@4.0.9)(utf-8-validate@5.0.10)) + '@0xsequence/signhub': 2.3.8(ethers@6.13.5(bufferutil@4.0.9)(utf-8-validate@5.0.10)) + '@0xsequence/utils': 2.3.8(ethers@6.13.5(bufferutil@4.0.9)(utf-8-validate@5.0.10)) + ethers: 6.13.5(bufferutil@4.0.9)(utf-8-validate@5.0.10) + + '@0xsequence/hooks@5.1.1(@0xsequence/api@packages+services+api)(@0xsequence/indexer@2.3.8)(@0xsequence/metadata@2.3.8)(@0xsequence/network@2.3.8(ethers@6.13.5(bufferutil@4.0.9)(utf-8-validate@5.0.10)))(@tanstack/react-query@5.74.3(react@19.0.0))(react-dom@19.0.0(react@19.0.0))(react@19.0.0)(viem@2.27.0(bufferutil@4.0.9)(typescript@5.7.3)(utf-8-validate@5.0.10)(zod@3.24.2))': + dependencies: + '@0xsequence/api': link:packages/services/api + '@0xsequence/indexer': 2.3.8 + '@0xsequence/metadata': 2.3.8 + '@0xsequence/network': 2.3.8(ethers@6.13.5(bufferutil@4.0.9)(utf-8-validate@5.0.10)) + '@tanstack/react-query': 5.74.3(react@19.0.0) + react: 19.0.0 + react-dom: 19.0.0(react@19.0.0) + viem: 2.27.0(bufferutil@4.0.9)(typescript@5.7.3)(utf-8-validate@5.0.10)(zod@3.24.2) + + '@0xsequence/indexer@2.3.8': {} + + '@0xsequence/metadata@2.3.8': {} + + '@0xsequence/migration@2.3.8(ethers@6.13.5(bufferutil@4.0.9)(utf-8-validate@5.0.10))': + dependencies: + '@0xsequence/abi': 2.3.8 + '@0xsequence/core': 2.3.8(ethers@6.13.5(bufferutil@4.0.9)(utf-8-validate@5.0.10)) + '@0xsequence/wallet': 2.3.8(ethers@6.13.5(bufferutil@4.0.9)(utf-8-validate@5.0.10)) + ethers: 6.13.5(bufferutil@4.0.9)(utf-8-validate@5.0.10) + + '@0xsequence/network@2.3.8(ethers@6.13.5(bufferutil@4.0.9)(utf-8-validate@5.0.10))': + dependencies: + '@0xsequence/core': 2.3.8(ethers@6.13.5(bufferutil@4.0.9)(utf-8-validate@5.0.10)) + '@0xsequence/indexer': 2.3.8 + '@0xsequence/relayer': 2.3.8(ethers@6.13.5(bufferutil@4.0.9)(utf-8-validate@5.0.10)) + '@0xsequence/utils': 2.3.8(ethers@6.13.5(bufferutil@4.0.9)(utf-8-validate@5.0.10)) + ethers: 6.13.5(bufferutil@4.0.9)(utf-8-validate@5.0.10) + + '@0xsequence/provider@2.3.8(ethers@6.13.5(bufferutil@4.0.9)(utf-8-validate@5.0.10))': + dependencies: + '@0xsequence/abi': 2.3.8 + '@0xsequence/account': 2.3.8(ethers@6.13.5(bufferutil@4.0.9)(utf-8-validate@5.0.10)) + '@0xsequence/auth': 2.3.8(ethers@6.13.5(bufferutil@4.0.9)(utf-8-validate@5.0.10)) + '@0xsequence/core': 2.3.8(ethers@6.13.5(bufferutil@4.0.9)(utf-8-validate@5.0.10)) + '@0xsequence/migration': 2.3.8(ethers@6.13.5(bufferutil@4.0.9)(utf-8-validate@5.0.10)) + '@0xsequence/network': 2.3.8(ethers@6.13.5(bufferutil@4.0.9)(utf-8-validate@5.0.10)) + '@0xsequence/relayer': 2.3.8(ethers@6.13.5(bufferutil@4.0.9)(utf-8-validate@5.0.10)) + '@0xsequence/utils': 2.3.8(ethers@6.13.5(bufferutil@4.0.9)(utf-8-validate@5.0.10)) + '@0xsequence/wallet': 2.3.8(ethers@6.13.5(bufferutil@4.0.9)(utf-8-validate@5.0.10)) + '@databeat/tracker': 0.9.3 + ethers: 6.13.5(bufferutil@4.0.9)(utf-8-validate@5.0.10) + eventemitter2: 6.4.9 + webextension-polyfill: 0.10.0 + + '@0xsequence/relayer@2.3.8(ethers@6.13.5(bufferutil@4.0.9)(utf-8-validate@5.0.10))': + dependencies: + '@0xsequence/abi': 2.3.8 + '@0xsequence/core': 2.3.8(ethers@6.13.5(bufferutil@4.0.9)(utf-8-validate@5.0.10)) + '@0xsequence/utils': 2.3.8(ethers@6.13.5(bufferutil@4.0.9)(utf-8-validate@5.0.10)) + ethers: 6.13.5(bufferutil@4.0.9)(utf-8-validate@5.0.10) + + '@0xsequence/replacer@2.3.8(ethers@6.13.5(bufferutil@4.0.9)(utf-8-validate@5.0.10))': + dependencies: + '@0xsequence/abi': 2.3.8 + '@0xsequence/core': 2.3.8(ethers@6.13.5(bufferutil@4.0.9)(utf-8-validate@5.0.10)) + ethers: 6.13.5(bufferutil@4.0.9)(utf-8-validate@5.0.10) + + '@0xsequence/sessions@2.3.8(ethers@6.13.5(bufferutil@4.0.9)(utf-8-validate@5.0.10))': + dependencies: + '@0xsequence/core': 2.3.8(ethers@6.13.5(bufferutil@4.0.9)(utf-8-validate@5.0.10)) + '@0xsequence/migration': 2.3.8(ethers@6.13.5(bufferutil@4.0.9)(utf-8-validate@5.0.10)) + '@0xsequence/replacer': 2.3.8(ethers@6.13.5(bufferutil@4.0.9)(utf-8-validate@5.0.10)) + '@0xsequence/utils': 2.3.8(ethers@6.13.5(bufferutil@4.0.9)(utf-8-validate@5.0.10)) + ethers: 6.13.5(bufferutil@4.0.9)(utf-8-validate@5.0.10) + idb: 7.1.1 + + '@0xsequence/signhub@2.3.8(ethers@6.13.5(bufferutil@4.0.9)(utf-8-validate@5.0.10))': + dependencies: + '@0xsequence/core': 2.3.8(ethers@6.13.5(bufferutil@4.0.9)(utf-8-validate@5.0.10)) + ethers: 6.13.5(bufferutil@4.0.9)(utf-8-validate@5.0.10) + + '@0xsequence/utils@2.3.8(ethers@6.13.5(bufferutil@4.0.9)(utf-8-validate@5.0.10))': + dependencies: + ethers: 6.13.5(bufferutil@4.0.9)(utf-8-validate@5.0.10) + js-base64: 3.7.7 + + '@0xsequence/wagmi-connector@4.0.1(0xsequence@2.3.8(ethers@6.13.5(bufferutil@4.0.9)(utf-8-validate@5.0.10)))(ethers@6.13.5(bufferutil@4.0.9)(utf-8-validate@5.0.10))(viem@2.27.0(bufferutil@4.0.9)(typescript@5.7.3)(utf-8-validate@5.0.10)(zod@3.24.2))(wagmi@2.14.16(@tanstack/query-core@5.74.3)(@tanstack/react-query@5.74.3(react@19.0.0))(@types/react@19.1.2)(bufferutil@4.0.9)(react@19.0.0)(typescript@5.7.3)(utf-8-validate@5.0.10)(viem@2.27.0(bufferutil@4.0.9)(typescript@5.7.3)(utf-8-validate@5.0.10)(zod@3.24.2))(zod@3.24.2))': + dependencies: + 0xsequence: 2.3.8(ethers@6.13.5(bufferutil@4.0.9)(utf-8-validate@5.0.10)) + ethers: 6.13.5(bufferutil@4.0.9)(utf-8-validate@5.0.10) + viem: 2.27.0(bufferutil@4.0.9)(typescript@5.7.3)(utf-8-validate@5.0.10)(zod@3.24.2) + wagmi: 2.14.16(@tanstack/query-core@5.74.3)(@tanstack/react-query@5.74.3(react@19.0.0))(@types/react@19.1.2)(bufferutil@4.0.9)(react@19.0.0)(typescript@5.7.3)(utf-8-validate@5.0.10)(viem@2.27.0(bufferutil@4.0.9)(typescript@5.7.3)(utf-8-validate@5.0.10)(zod@3.24.2))(zod@3.24.2) + + '@0xsequence/wallet@2.3.8(ethers@6.13.5(bufferutil@4.0.9)(utf-8-validate@5.0.10))': + dependencies: + '@0xsequence/abi': 2.3.8 + '@0xsequence/core': 2.3.8(ethers@6.13.5(bufferutil@4.0.9)(utf-8-validate@5.0.10)) + '@0xsequence/network': 2.3.8(ethers@6.13.5(bufferutil@4.0.9)(utf-8-validate@5.0.10)) + '@0xsequence/relayer': 2.3.8(ethers@6.13.5(bufferutil@4.0.9)(utf-8-validate@5.0.10)) + '@0xsequence/signhub': 2.3.8(ethers@6.13.5(bufferutil@4.0.9)(utf-8-validate@5.0.10)) + '@0xsequence/utils': 2.3.8(ethers@6.13.5(bufferutil@4.0.9)(utf-8-validate@5.0.10)) + ethers: 6.13.5(bufferutil@4.0.9)(utf-8-validate@5.0.10) + + '@adraffy/ens-normalize@1.10.1': {} + + '@adraffy/ens-normalize@1.11.0': {} + + '@ampproject/remapping@2.3.0': + dependencies: + '@jridgewell/gen-mapping': 0.3.8 + '@jridgewell/trace-mapping': 0.3.25 + + '@babel/code-frame@7.26.2': + dependencies: + '@babel/helper-validator-identifier': 7.25.9 + js-tokens: 4.0.0 + picocolors: 1.1.1 + + '@babel/compat-data@7.26.8': {} + + '@babel/core@7.26.9': + dependencies: + '@ampproject/remapping': 2.3.0 + '@babel/code-frame': 7.26.2 + '@babel/generator': 7.26.9 + '@babel/helper-compilation-targets': 7.26.5 + '@babel/helper-module-transforms': 7.26.0(@babel/core@7.26.9) + '@babel/helpers': 7.26.9 + '@babel/parser': 7.26.9 + '@babel/template': 7.26.9 + '@babel/traverse': 7.26.9 + '@babel/types': 7.26.9 + convert-source-map: 2.0.0 + debug: 4.3.7(supports-color@5.5.0) + gensync: 1.0.0-beta.2 + json5: 2.2.3 + semver: 6.3.1 + transitivePeerDependencies: + - supports-color + + '@babel/generator@7.26.9': + dependencies: + '@babel/parser': 7.26.9 + '@babel/types': 7.26.9 + '@jridgewell/gen-mapping': 0.3.8 + '@jridgewell/trace-mapping': 0.3.25 + jsesc: 3.1.0 + + '@babel/helper-compilation-targets@7.26.5': + dependencies: + '@babel/compat-data': 7.26.8 + '@babel/helper-validator-option': 7.25.9 + browserslist: 4.24.4 + lru-cache: 5.1.1 + semver: 6.3.1 + + '@babel/helper-module-imports@7.25.9': + dependencies: + '@babel/traverse': 7.26.9 + '@babel/types': 7.26.9 + transitivePeerDependencies: + - supports-color + + '@babel/helper-module-transforms@7.26.0(@babel/core@7.26.9)': + dependencies: + '@babel/core': 7.26.9 + '@babel/helper-module-imports': 7.25.9 + '@babel/helper-validator-identifier': 7.25.9 + '@babel/traverse': 7.26.9 + transitivePeerDependencies: + - supports-color + + '@babel/helper-plugin-utils@7.26.5': {} + + '@babel/helper-string-parser@7.25.9': {} + + '@babel/helper-validator-identifier@7.25.9': {} + + '@babel/helper-validator-option@7.25.9': {} + + '@babel/helpers@7.26.9': + dependencies: + '@babel/template': 7.26.9 + '@babel/types': 7.26.9 + + '@babel/parser@7.26.9': + dependencies: + '@babel/types': 7.26.9 + + '@babel/plugin-syntax-async-generators@7.8.4(@babel/core@7.26.9)': + dependencies: + '@babel/core': 7.26.9 + '@babel/helper-plugin-utils': 7.26.5 + + '@babel/plugin-syntax-bigint@7.8.3(@babel/core@7.26.9)': + dependencies: + '@babel/core': 7.26.9 + '@babel/helper-plugin-utils': 7.26.5 + + '@babel/plugin-syntax-class-properties@7.12.13(@babel/core@7.26.9)': + dependencies: + '@babel/core': 7.26.9 + '@babel/helper-plugin-utils': 7.26.5 + + '@babel/plugin-syntax-class-static-block@7.14.5(@babel/core@7.26.9)': + dependencies: + '@babel/core': 7.26.9 + '@babel/helper-plugin-utils': 7.26.5 + + '@babel/plugin-syntax-import-attributes@7.26.0(@babel/core@7.26.9)': + dependencies: + '@babel/core': 7.26.9 + '@babel/helper-plugin-utils': 7.26.5 + + '@babel/plugin-syntax-import-meta@7.10.4(@babel/core@7.26.9)': + dependencies: + '@babel/core': 7.26.9 + '@babel/helper-plugin-utils': 7.26.5 + + '@babel/plugin-syntax-json-strings@7.8.3(@babel/core@7.26.9)': + dependencies: + '@babel/core': 7.26.9 + '@babel/helper-plugin-utils': 7.26.5 + + '@babel/plugin-syntax-jsx@7.25.9(@babel/core@7.26.9)': + dependencies: + '@babel/core': 7.26.9 + '@babel/helper-plugin-utils': 7.26.5 + + '@babel/plugin-syntax-logical-assignment-operators@7.10.4(@babel/core@7.26.9)': + dependencies: + '@babel/core': 7.26.9 + '@babel/helper-plugin-utils': 7.26.5 + + '@babel/plugin-syntax-nullish-coalescing-operator@7.8.3(@babel/core@7.26.9)': + dependencies: + '@babel/core': 7.26.9 + '@babel/helper-plugin-utils': 7.26.5 + + '@babel/plugin-syntax-numeric-separator@7.10.4(@babel/core@7.26.9)': + dependencies: + '@babel/core': 7.26.9 + '@babel/helper-plugin-utils': 7.26.5 + + '@babel/plugin-syntax-object-rest-spread@7.8.3(@babel/core@7.26.9)': + dependencies: + '@babel/core': 7.26.9 + '@babel/helper-plugin-utils': 7.26.5 + + '@babel/plugin-syntax-optional-catch-binding@7.8.3(@babel/core@7.26.9)': + dependencies: + '@babel/core': 7.26.9 + '@babel/helper-plugin-utils': 7.26.5 + + '@babel/plugin-syntax-optional-chaining@7.8.3(@babel/core@7.26.9)': + dependencies: + '@babel/core': 7.26.9 + '@babel/helper-plugin-utils': 7.26.5 + + '@babel/plugin-syntax-private-property-in-object@7.14.5(@babel/core@7.26.9)': + dependencies: + '@babel/core': 7.26.9 + '@babel/helper-plugin-utils': 7.26.5 + + '@babel/plugin-syntax-top-level-await@7.14.5(@babel/core@7.26.9)': + dependencies: + '@babel/core': 7.26.9 + '@babel/helper-plugin-utils': 7.26.5 + + '@babel/plugin-syntax-typescript@7.25.9(@babel/core@7.26.9)': + dependencies: + '@babel/core': 7.26.9 + '@babel/helper-plugin-utils': 7.26.5 + + '@babel/plugin-transform-react-jsx-self@7.25.9(@babel/core@7.26.9)': + dependencies: + '@babel/core': 7.26.9 + '@babel/helper-plugin-utils': 7.26.5 + + '@babel/plugin-transform-react-jsx-source@7.25.9(@babel/core@7.26.9)': + dependencies: + '@babel/core': 7.26.9 + '@babel/helper-plugin-utils': 7.26.5 + + '@babel/runtime-corejs3@7.26.0': + dependencies: + core-js-pure: 3.39.0 + regenerator-runtime: 0.14.1 + + '@babel/runtime@7.26.0': + dependencies: + regenerator-runtime: 0.14.1 + + '@babel/template@7.26.9': + dependencies: + '@babel/code-frame': 7.26.2 + '@babel/parser': 7.26.9 + '@babel/types': 7.26.9 + + '@babel/traverse@7.26.9': + dependencies: + '@babel/code-frame': 7.26.2 + '@babel/generator': 7.26.9 + '@babel/parser': 7.26.9 + '@babel/template': 7.26.9 + '@babel/types': 7.26.9 + debug: 4.3.7(supports-color@5.5.0) + globals: 11.12.0 + transitivePeerDependencies: + - supports-color + + '@babel/types@7.26.9': + dependencies: + '@babel/helper-string-parser': 7.25.9 + '@babel/helper-validator-identifier': 7.25.9 + + '@bcoe/v8-coverage@0.2.3': {} + + '@changesets/apply-release-plan@7.0.10': + dependencies: + '@changesets/config': 3.1.1 + '@changesets/get-version-range-type': 0.4.0 + '@changesets/git': 3.0.2 + '@changesets/should-skip-package': 0.1.2 + '@changesets/types': 6.1.0 + '@manypkg/get-packages': 1.1.3 + detect-indent: 6.1.0 + fs-extra: 7.0.1 + lodash.startcase: 4.4.0 + outdent: 0.5.0 + prettier: 2.8.8 + resolve-from: 5.0.0 + semver: 7.7.1 + + '@changesets/assemble-release-plan@6.0.6': + dependencies: + '@changesets/errors': 0.2.0 + '@changesets/get-dependents-graph': 2.1.3 + '@changesets/should-skip-package': 0.1.2 + '@changesets/types': 6.1.0 + '@manypkg/get-packages': 1.1.3 + semver: 7.7.1 + + '@changesets/changelog-git@0.2.1': + dependencies: + '@changesets/types': 6.1.0 + + '@changesets/cli@2.29.0': + dependencies: + '@changesets/apply-release-plan': 7.0.10 + '@changesets/assemble-release-plan': 6.0.6 + '@changesets/changelog-git': 0.2.1 + '@changesets/config': 3.1.1 + '@changesets/errors': 0.2.0 + '@changesets/get-dependents-graph': 2.1.3 + '@changesets/get-release-plan': 4.0.8 + '@changesets/git': 3.0.2 + '@changesets/logger': 0.1.1 + '@changesets/pre': 2.0.2 + '@changesets/read': 0.6.3 + '@changesets/should-skip-package': 0.1.2 + '@changesets/types': 6.1.0 + '@changesets/write': 0.4.0 + '@manypkg/get-packages': 1.1.3 + ansi-colors: 4.1.3 + ci-info: 3.9.0 + enquirer: 2.4.1 + external-editor: 3.1.0 + fs-extra: 7.0.1 + mri: 1.2.0 + p-limit: 2.3.0 + package-manager-detector: 0.2.8 + picocolors: 1.1.1 + resolve-from: 5.0.0 + semver: 7.7.1 + spawndamnit: 3.0.1 + term-size: 2.2.1 + + '@changesets/config@3.1.1': + dependencies: + '@changesets/errors': 0.2.0 + '@changesets/get-dependents-graph': 2.1.3 + '@changesets/logger': 0.1.1 + '@changesets/types': 6.1.0 + '@manypkg/get-packages': 1.1.3 + fs-extra: 7.0.1 + micromatch: 4.0.8 + + '@changesets/errors@0.2.0': + dependencies: + extendable-error: 0.1.7 + + '@changesets/get-dependents-graph@2.1.3': + dependencies: + '@changesets/types': 6.1.0 + '@manypkg/get-packages': 1.1.3 + picocolors: 1.1.1 + semver: 7.7.1 + + '@changesets/get-release-plan@4.0.8': + dependencies: + '@changesets/assemble-release-plan': 6.0.6 + '@changesets/config': 3.1.1 + '@changesets/pre': 2.0.2 + '@changesets/read': 0.6.3 + '@changesets/types': 6.1.0 + '@manypkg/get-packages': 1.1.3 + + '@changesets/get-version-range-type@0.4.0': {} + + '@changesets/git@3.0.2': + dependencies: + '@changesets/errors': 0.2.0 + '@manypkg/get-packages': 1.1.3 + is-subdir: 1.2.0 + micromatch: 4.0.8 + spawndamnit: 3.0.1 + + '@changesets/logger@0.1.1': + dependencies: + picocolors: 1.1.1 + + '@changesets/parse@0.4.1': + dependencies: + '@changesets/types': 6.1.0 + js-yaml: 3.14.1 + + '@changesets/pre@2.0.2': + dependencies: + '@changesets/errors': 0.2.0 + '@changesets/types': 6.1.0 + '@manypkg/get-packages': 1.1.3 + fs-extra: 7.0.1 + + '@changesets/read@0.6.3': + dependencies: + '@changesets/git': 3.0.2 + '@changesets/logger': 0.1.1 + '@changesets/parse': 0.4.1 + '@changesets/types': 6.1.0 + fs-extra: 7.0.1 + p-filter: 2.1.0 + picocolors: 1.1.1 + + '@changesets/should-skip-package@0.1.2': + dependencies: + '@changesets/types': 6.1.0 + '@manypkg/get-packages': 1.1.3 + + '@changesets/types@4.1.0': {} + + '@changesets/types@6.1.0': {} + + '@changesets/write@0.4.0': + dependencies: + '@changesets/types': 6.1.0 + fs-extra: 7.0.1 + human-id: 4.1.1 + prettier: 2.8.8 + + '@coinbase/wallet-sdk@3.9.3': + dependencies: + bn.js: 5.2.1 + buffer: 6.0.3 + clsx: 1.2.1 + eth-block-tracker: 7.1.0 + eth-json-rpc-filters: 6.0.1 + eventemitter3: 5.0.1 + keccak: 3.0.4 + preact: 10.26.5 + sha.js: 2.4.11 + transitivePeerDependencies: + - supports-color - turbo-darwin-arm64@2.5.0: - resolution: {integrity: sha512-p9sYq7kXH7qeJwIQE86cOWv/xNqvow846l6c/qWc26Ib1ci5W7V0sI5thsrP3eH+VA0d+SHalTKg5SQXgNQBWA==} - cpu: [arm64] - os: [darwin] + '@coinbase/wallet-sdk@4.3.0': + dependencies: + '@noble/hashes': 1.7.1 + clsx: 1.2.1 + eventemitter3: 5.0.1 + preact: 10.26.5 - turbo-linux-64@2.5.0: - resolution: {integrity: sha512-1iEln2GWiF3iPPPS1HQJT6ZCFXynJPd89gs9SkggH2EJsj3eRUSVMmMC8y6d7bBbhBFsiGGazwFIYrI12zs6uQ==} - cpu: [x64] - os: [linux] + '@cspotcode/source-map-support@0.8.1': + dependencies: + '@jridgewell/trace-mapping': 0.3.9 - turbo-linux-arm64@2.5.0: - resolution: {integrity: sha512-bKBcbvuQHmsX116KcxHJuAcppiiBOfivOObh2O5aXNER6mce7YDDQJy00xQQNp1DhEfcSV2uOsvb3O3nN2cbcA==} - cpu: [arm64] - os: [linux] + '@databeat/tracker@0.9.3': + dependencies: + '@noble/hashes': 1.7.1 - turbo-windows-64@2.5.0: - resolution: {integrity: sha512-9BCo8oQ7BO7J0K913Czbc3tw8QwLqn2nTe4E47k6aVYkM12ASTScweXPTuaPFP5iYXAT6z5Dsniw704Ixa5eGg==} - cpu: [x64] - os: [win32] + '@ecies/ciphers@0.2.3(@noble/ciphers@1.2.1)': + dependencies: + '@noble/ciphers': 1.2.1 - turbo-windows-arm64@2.5.0: - resolution: {integrity: sha512-OUHCV+ueXa3UzfZ4co/ueIHgeq9B2K48pZwIxKSm5VaLVuv8M13MhM7unukW09g++dpdrrE1w4IOVgxKZ0/exg==} - cpu: [arm64] - os: [win32] + '@emnapi/runtime@1.3.1': + dependencies: + tslib: 2.8.1 + optional: true - turbo@2.5.0: - resolution: {integrity: sha512-PvSRruOsitjy6qdqwIIyolv99+fEn57gP6gn4zhsHTEcCYgXPhv6BAxzAjleS8XKpo+Y582vTTA9nuqYDmbRuA==} - hasBin: true + '@esbuild/aix-ppc64@0.24.2': + optional: true - type-check@0.4.0: - resolution: {integrity: sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==} - engines: {node: '>= 0.8.0'} + '@esbuild/aix-ppc64@0.25.2': + optional: true - type-detect@4.0.8: - resolution: {integrity: sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==} - engines: {node: '>=4'} + '@esbuild/android-arm64@0.24.2': + optional: true - type-fest@0.21.3: - resolution: {integrity: sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w==} - engines: {node: '>=10'} + '@esbuild/android-arm64@0.25.2': + optional: true - typed-array-buffer@1.0.2: - resolution: {integrity: sha512-gEymJYKZtKXzzBzM4jqa9w6Q1Jjm7x2d+sh19AdsD4wqnMPDYyvwpsIc2Q/835kHuo3BEQ7CjelGhfTsoBb2MQ==} - engines: {node: '>= 0.4'} + '@esbuild/android-arm@0.24.2': + optional: true - typed-array-byte-length@1.0.1: - resolution: {integrity: sha512-3iMJ9q0ao7WE9tWcaYKIptkNBuOIcZCCT0d4MRvuuH88fEoEH62IuQe0OtraD3ebQEoTRk8XCBoknUNc1Y67pw==} - engines: {node: '>= 0.4'} + '@esbuild/android-arm@0.25.2': + optional: true - typed-array-byte-offset@1.0.3: - resolution: {integrity: sha512-GsvTyUHTriq6o/bHcTd0vM7OQ9JEdlvluu9YISaA7+KzDzPaIzEeDFNkTfhdE3MYcNhNi0vq/LlegYgIs5yPAw==} - engines: {node: '>= 0.4'} + '@esbuild/android-x64@0.24.2': + optional: true - typed-array-length@1.0.7: - resolution: {integrity: sha512-3KS2b+kL7fsuk/eJZ7EQdnEmQoaho/r6KUef7hxvltNA5DR8NAUM+8wJMbJyZ4G9/7i3v5zPBIMN5aybAh2/Jg==} - engines: {node: '>= 0.4'} + '@esbuild/android-x64@0.25.2': + optional: true - typescript-eslint@8.15.0: - resolution: {integrity: sha512-wY4FRGl0ZI+ZU4Jo/yjdBu0lVTSML58pu6PgGtJmCufvzfV565pUF6iACQt092uFOd49iLOTX/sEVmHtbSrS+w==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - peerDependencies: - eslint: ^8.57.0 || ^9.0.0 - typescript: '*' - peerDependenciesMeta: - typescript: - optional: true + '@esbuild/darwin-arm64@0.24.2': + optional: true - typescript@5.5.4: - resolution: {integrity: sha512-Mtq29sKDAEYP7aljRgtPOpTvOfbwRWlS6dPRzwjdE+C0R4brX/GUyhHSecbHMFLNBLcJIPt9nl9yG5TZ1weH+Q==} - engines: {node: '>=14.17'} - hasBin: true + '@esbuild/darwin-arm64@0.25.2': + optional: true - typescript@5.7.3: - resolution: {integrity: sha512-84MVSjMEHP+FQRPy3pX9sTVV/INIex71s9TL2Gm5FG/WG1SqXeKyZ0k7/blY/4FdOzI12CBy1vGc4og/eus0fw==} - engines: {node: '>=14.17'} - hasBin: true + '@esbuild/darwin-x64@0.24.2': + optional: true - typescript@5.8.3: - resolution: {integrity: sha512-p1diW6TqL9L07nNxvRMM7hMMw4c5XOo/1ibL4aAIGmSAt9slTE1Xgw5KWuof2uTOvCg9BY7ZRi+GaF+7sfgPeQ==} - engines: {node: '>=14.17'} - hasBin: true + '@esbuild/darwin-x64@0.25.2': + optional: true - uglify-js@3.19.3: - resolution: {integrity: sha512-v3Xu+yuwBXisp6QYTcH4UbH+xYJXqnq2m/LtQVWKWzYc1iehYnLixoQDN9FH6/j9/oybfd6W9Ghwkl8+UMKTKQ==} - engines: {node: '>=0.8.0'} - hasBin: true + '@esbuild/freebsd-arm64@0.24.2': + optional: true - unbox-primitive@1.0.2: - resolution: {integrity: sha512-61pPlCD9h51VoreyJ0BReideM3MDKMKnh6+V9L08331ipq6Q8OFXZYiqP6n/tbHx4s5I9uRhcye6BrbkizkBDw==} + '@esbuild/freebsd-arm64@0.25.2': + optional: true - undefsafe@2.0.5: - resolution: {integrity: sha512-WxONCrssBM8TSPRqN5EmsjVrsv4A8X12J4ArBiiayv3DyyG3ZlIg6yysuuSYdZsVz3TKcTg2fd//Ujd4CHV1iA==} + '@esbuild/freebsd-x64@0.24.2': + optional: true - undici-types@6.19.8: - resolution: {integrity: sha512-ve2KP6f/JnbPBFyobGHuerC9g1FYGn/F8n1LWTwNxCEzd6IfqTwUQcNXgEtmmQ6DlRrC1hrSrBnCZPokRrDHjw==} + '@esbuild/freebsd-x64@0.25.2': + optional: true - undici-types@6.20.0: - resolution: {integrity: sha512-Ny6QZ2Nju20vw1SRHe3d9jVu6gJ+4e3+MMpqu7pqE5HT6WsTSlce++GQmK5UXS8mzV8DSYHrQH+Xrf2jVcuKNg==} + '@esbuild/linux-arm64@0.24.2': + optional: true - universalify@0.1.2: - resolution: {integrity: sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==} - engines: {node: '>= 4.0.0'} + '@esbuild/linux-arm64@0.25.2': + optional: true - universalify@2.0.1: - resolution: {integrity: sha512-gptHNQghINnc/vTGIk0SOFGFNXw7JVrlRUtConJRlvaw6DuX0wO5Jeko9sWrMBhh+PsYAZ7oXAiOnf/UKogyiw==} - engines: {node: '>= 10.0.0'} + '@esbuild/linux-arm@0.24.2': + optional: true - update-browserslist-db@1.1.3: - resolution: {integrity: sha512-UxhIZQ+QInVdunkDAaiazvvT/+fXL5Osr0JZlJulepYu6Jd7qJtDZjlur0emRlT71EN3ScPoE7gvsuIKKNavKw==} - hasBin: true - peerDependencies: - browserslist: '>= 4.21.0' + '@esbuild/linux-arm@0.25.2': + optional: true - update-check@1.5.4: - resolution: {integrity: sha512-5YHsflzHP4t1G+8WGPlvKbJEbAJGCgw+Em+dGR1KmBUbr1J36SJBqlHLjR7oob7sco5hWHGQVcr9B2poIVDDTQ==} + '@esbuild/linux-ia32@0.24.2': + optional: true - upper-case-first@1.1.2: - resolution: {integrity: sha512-wINKYvI3Db8dtjikdAqoBbZoP6Q+PZUyfMR7pmwHzjC2quzSkUq5DmPrTtPEqHaz8AGtmsB4TqwapMTM1QAQOQ==} + '@esbuild/linux-ia32@0.25.2': + optional: true - upper-case@1.1.3: - resolution: {integrity: sha512-WRbjgmYzgXkCV7zNVpy5YgrHgbBv126rMALQQMrmzOVC4GM2waQ9x7xtm8VU+1yF2kWyPzI9zbZ48n4vSxwfSA==} + '@esbuild/linux-loong64@0.24.2': + optional: true - uri-js@4.4.1: - resolution: {integrity: sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==} + '@esbuild/linux-loong64@0.25.2': + optional: true - util-deprecate@1.0.2: - resolution: {integrity: sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==} + '@esbuild/linux-mips64el@0.24.2': + optional: true - uuid@11.1.0: - resolution: {integrity: sha512-0/A9rDy9P7cJ+8w1c9WD9V//9Wj15Ce2MPz8Ri6032usz+NfePxx5AcN3bN+r6ZL6jEo066/yNYB3tn4pQEx+A==} - hasBin: true + '@esbuild/linux-mips64el@0.25.2': + optional: true - v8-compile-cache-lib@3.0.1: - resolution: {integrity: sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg==} + '@esbuild/linux-ppc64@0.24.2': + optional: true - v8-to-istanbul@9.3.0: - resolution: {integrity: sha512-kiGUalWN+rgBJ/1OHZsBtU4rXZOfj/7rKQxULKlIzwzQSvMJUUNgPwJEEh7gU6xEVxC0ahoOBvN2YI8GH6FNgA==} - engines: {node: '>=10.12.0'} + '@esbuild/linux-ppc64@0.25.2': + optional: true - validate-npm-package-name@5.0.1: - resolution: {integrity: sha512-OljLrQ9SQdOUqTaQxqL5dEfZWrXExyyWsozYlAWFawPVNuD83igl7uJD2RTkNMbniIYgt8l81eCJGIdQF7avLQ==} - engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0} + '@esbuild/linux-riscv64@0.24.2': + optional: true - walker@1.0.8: - resolution: {integrity: sha512-ts/8E8l5b7kY0vlWLewOkDXMmPdLcVV4GmOQLyxuSswIJsweeFZtAsMF7k1Nszz+TYBQrlYRmzOnr398y1JemQ==} + '@esbuild/linux-riscv64@0.25.2': + optional: true - wcwidth@1.0.1: - resolution: {integrity: sha512-XHPEwS0q6TaxcvG85+8EYkbiCux2XtWG2mkc47Ng2A77BQu9+DqIOJldST4HgPkuea7dvKSj5VgX3P1d4rW8Tg==} + '@esbuild/linux-s390x@0.24.2': + optional: true - which-boxed-primitive@1.0.2: - resolution: {integrity: sha512-bwZdv0AKLpplFY2KZRX6TvyuN7ojjr7lwkg6ml0roIy9YeuSr7JS372qlNW18UQYzgYK9ziGcerWqZOmEn9VNg==} + '@esbuild/linux-s390x@0.25.2': + optional: true - which-builtin-type@1.1.4: - resolution: {integrity: sha512-bppkmBSsHFmIMSl8BO9TbsyzsvGjVoppt8xUiGzwiu/bhDCGxnpOKCxgqj6GuyHE0mINMDecBFPlOm2hzY084w==} - engines: {node: '>= 0.4'} + '@esbuild/linux-x64@0.24.2': + optional: true - which-collection@1.0.2: - resolution: {integrity: sha512-K4jVyjnBdgvc86Y6BkaLZEN933SwYOuBFkdmBu9ZfkcAbdVbpITnDmjvZ/aQjRXQrv5EPkTnD1s39GiiqbngCw==} - engines: {node: '>= 0.4'} + '@esbuild/linux-x64@0.25.2': + optional: true - which-typed-array@1.1.15: - resolution: {integrity: sha512-oV0jmFtUky6CXfkqehVvBP/LSWJ2sy4vWMioiENyJLePrBO/yKyV9OyJySfAKosh+RYkIl5zJCNZ8/4JncrpdA==} - engines: {node: '>= 0.4'} + '@esbuild/netbsd-arm64@0.24.2': + optional: true - which@2.0.2: - resolution: {integrity: sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==} - engines: {node: '>= 8'} - hasBin: true + '@esbuild/netbsd-arm64@0.25.2': + optional: true - word-wrap@1.2.5: - resolution: {integrity: sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA==} - engines: {node: '>=0.10.0'} + '@esbuild/netbsd-x64@0.24.2': + optional: true - wordwrap@1.0.0: - resolution: {integrity: sha512-gvVzJFlPycKc5dZN4yPkP8w7Dc37BtP1yczEneOb4uq34pXZcvrtRTmWV8W+Ume+XCxKgbjM+nevkyFPMybd4Q==} + '@esbuild/netbsd-x64@0.25.2': + optional: true - wrap-ansi@6.2.0: - resolution: {integrity: sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA==} - engines: {node: '>=8'} + '@esbuild/openbsd-arm64@0.24.2': + optional: true - wrap-ansi@7.0.0: - resolution: {integrity: sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==} - engines: {node: '>=10'} + '@esbuild/openbsd-arm64@0.25.2': + optional: true - wrappy@1.0.2: - resolution: {integrity: sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==} + '@esbuild/openbsd-x64@0.24.2': + optional: true - write-file-atomic@4.0.2: - resolution: {integrity: sha512-7KxauUdBmSdWnmpaGFg+ppNjKF8uNLry8LyzjauQDOVONfFLNKrKvQOxZ/VuTIcS/gge/YNahf5RIIQWTSarlg==} - engines: {node: ^12.13.0 || ^14.15.0 || >=16.0.0} + '@esbuild/openbsd-x64@0.25.2': + optional: true - y18n@5.0.8: - resolution: {integrity: sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==} - engines: {node: '>=10'} + '@esbuild/sunos-x64@0.24.2': + optional: true - yallist@3.1.1: - resolution: {integrity: sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==} + '@esbuild/sunos-x64@0.25.2': + optional: true - yargs-parser@21.1.1: - resolution: {integrity: sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==} - engines: {node: '>=12'} + '@esbuild/win32-arm64@0.24.2': + optional: true - yargs@17.7.2: - resolution: {integrity: sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==} - engines: {node: '>=12'} + '@esbuild/win32-arm64@0.25.2': + optional: true - yn@3.1.1: - resolution: {integrity: sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q==} - engines: {node: '>=6'} + '@esbuild/win32-ia32@0.24.2': + optional: true - yocto-queue@0.1.0: - resolution: {integrity: sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==} - engines: {node: '>=10'} + '@esbuild/win32-ia32@0.25.2': + optional: true -snapshots: + '@esbuild/win32-x64@0.24.2': + optional: true - '@adraffy/ens-normalize@1.11.0': {} + '@esbuild/win32-x64@0.25.2': + optional: true - '@ampproject/remapping@2.3.0': + '@eslint-community/eslint-utils@4.4.1(eslint@9.15.0(jiti@2.4.2))': dependencies: - '@jridgewell/gen-mapping': 0.3.8 - '@jridgewell/trace-mapping': 0.3.25 + eslint: 9.15.0(jiti@2.4.2) + eslint-visitor-keys: 3.4.3 - '@babel/code-frame@7.26.2': + '@eslint-community/eslint-utils@4.4.1(eslint@9.24.0(jiti@2.4.2))': dependencies: - '@babel/helper-validator-identifier': 7.25.9 - js-tokens: 4.0.0 - picocolors: 1.1.1 + eslint: 9.24.0(jiti@2.4.2) + eslint-visitor-keys: 3.4.3 - '@babel/compat-data@7.26.8': {} + '@eslint-community/regexpp@4.12.1': {} - '@babel/core@7.26.9': + '@eslint/config-array@0.19.0': dependencies: - '@ampproject/remapping': 2.3.0 - '@babel/code-frame': 7.26.2 - '@babel/generator': 7.26.9 - '@babel/helper-compilation-targets': 7.26.5 - '@babel/helper-module-transforms': 7.26.0(@babel/core@7.26.9) - '@babel/helpers': 7.26.9 - '@babel/parser': 7.26.9 - '@babel/template': 7.26.9 - '@babel/traverse': 7.26.9 - '@babel/types': 7.26.9 - convert-source-map: 2.0.0 + '@eslint/object-schema': 2.1.4 debug: 4.3.7(supports-color@5.5.0) - gensync: 1.0.0-beta.2 - json5: 2.2.3 - semver: 6.3.1 + minimatch: 3.1.2 transitivePeerDependencies: - supports-color - '@babel/generator@7.26.9': + '@eslint/config-array@0.20.0': dependencies: - '@babel/parser': 7.26.9 - '@babel/types': 7.26.9 - '@jridgewell/gen-mapping': 0.3.8 - '@jridgewell/trace-mapping': 0.3.25 - jsesc: 3.1.0 + '@eslint/object-schema': 2.1.6 + debug: 4.3.7(supports-color@5.5.0) + minimatch: 3.1.2 + transitivePeerDependencies: + - supports-color - '@babel/helper-compilation-targets@7.26.5': + '@eslint/config-helpers@0.2.1': {} + + '@eslint/core@0.12.0': dependencies: - '@babel/compat-data': 7.26.8 - '@babel/helper-validator-option': 7.25.9 - browserslist: 4.24.4 - lru-cache: 5.1.1 - semver: 6.3.1 + '@types/json-schema': 7.0.15 - '@babel/helper-module-imports@7.25.9': + '@eslint/core@0.13.0': dependencies: - '@babel/traverse': 7.26.9 - '@babel/types': 7.26.9 + '@types/json-schema': 7.0.15 + + '@eslint/core@0.9.0': {} + + '@eslint/eslintrc@3.2.0': + dependencies: + ajv: 6.12.6 + debug: 4.3.7(supports-color@5.5.0) + espree: 10.3.0 + globals: 14.0.0 + ignore: 5.3.2 + import-fresh: 3.3.0 + js-yaml: 4.1.0 + minimatch: 3.1.2 + strip-json-comments: 3.1.1 transitivePeerDependencies: - supports-color - '@babel/helper-module-transforms@7.26.0(@babel/core@7.26.9)': + '@eslint/eslintrc@3.3.1': dependencies: - '@babel/core': 7.26.9 - '@babel/helper-module-imports': 7.25.9 - '@babel/helper-validator-identifier': 7.25.9 - '@babel/traverse': 7.26.9 + ajv: 6.12.6 + debug: 4.3.7(supports-color@5.5.0) + espree: 10.3.0 + globals: 14.0.0 + ignore: 5.3.2 + import-fresh: 3.3.0 + js-yaml: 4.1.0 + minimatch: 3.1.2 + strip-json-comments: 3.1.1 transitivePeerDependencies: - supports-color - '@babel/helper-plugin-utils@7.26.5': {} + '@eslint/js@9.15.0': {} - '@babel/helper-string-parser@7.25.9': {} + '@eslint/js@9.17.0': {} - '@babel/helper-validator-identifier@7.25.9': {} + '@eslint/js@9.24.0': {} - '@babel/helper-validator-option@7.25.9': {} + '@eslint/object-schema@2.1.4': {} - '@babel/helpers@7.26.9': + '@eslint/object-schema@2.1.6': {} + + '@eslint/plugin-kit@0.2.3': dependencies: - '@babel/template': 7.26.9 - '@babel/types': 7.26.9 + levn: 0.4.1 - '@babel/parser@7.26.9': + '@eslint/plugin-kit@0.2.8': dependencies: - '@babel/types': 7.26.9 + '@eslint/core': 0.13.0 + levn: 0.4.1 - '@babel/plugin-syntax-async-generators@7.8.4(@babel/core@7.26.9)': + '@ethereumjs/common@3.2.0': dependencies: - '@babel/core': 7.26.9 - '@babel/helper-plugin-utils': 7.26.5 + '@ethereumjs/util': 8.1.0 + crc-32: 1.2.2 - '@babel/plugin-syntax-bigint@7.8.3(@babel/core@7.26.9)': + '@ethereumjs/rlp@4.0.1': {} + + '@ethereumjs/tx@4.2.0': dependencies: - '@babel/core': 7.26.9 - '@babel/helper-plugin-utils': 7.26.5 + '@ethereumjs/common': 3.2.0 + '@ethereumjs/rlp': 4.0.1 + '@ethereumjs/util': 8.1.0 + ethereum-cryptography: 2.2.1 - '@babel/plugin-syntax-class-properties@7.12.13(@babel/core@7.26.9)': + '@ethereumjs/util@8.1.0': dependencies: - '@babel/core': 7.26.9 - '@babel/helper-plugin-utils': 7.26.5 + '@ethereumjs/rlp': 4.0.1 + ethereum-cryptography: 2.2.1 + micro-ftch: 0.3.1 - '@babel/plugin-syntax-class-static-block@7.14.5(@babel/core@7.26.9)': + '@floating-ui/core@1.6.9': dependencies: - '@babel/core': 7.26.9 - '@babel/helper-plugin-utils': 7.26.5 + '@floating-ui/utils': 0.2.9 - '@babel/plugin-syntax-import-attributes@7.26.0(@babel/core@7.26.9)': + '@floating-ui/dom@1.6.13': dependencies: - '@babel/core': 7.26.9 - '@babel/helper-plugin-utils': 7.26.5 + '@floating-ui/core': 1.6.9 + '@floating-ui/utils': 0.2.9 - '@babel/plugin-syntax-import-meta@7.10.4(@babel/core@7.26.9)': + '@floating-ui/react-dom@2.1.2(react-dom@19.0.0(react@19.0.0))(react@19.0.0)': dependencies: - '@babel/core': 7.26.9 - '@babel/helper-plugin-utils': 7.26.5 + '@floating-ui/dom': 1.6.13 + react: 19.0.0 + react-dom: 19.0.0(react@19.0.0) - '@babel/plugin-syntax-json-strings@7.8.3(@babel/core@7.26.9)': + '@floating-ui/utils@0.2.9': {} + + '@humanfs/core@0.19.1': {} + + '@humanfs/node@0.16.6': dependencies: - '@babel/core': 7.26.9 - '@babel/helper-plugin-utils': 7.26.5 + '@humanfs/core': 0.19.1 + '@humanwhocodes/retry': 0.3.1 - '@babel/plugin-syntax-jsx@7.25.9(@babel/core@7.26.9)': + '@humanwhocodes/module-importer@1.0.1': {} + + '@humanwhocodes/retry@0.3.1': {} + + '@humanwhocodes/retry@0.4.1': {} + + '@humanwhocodes/retry@0.4.2': {} + + '@img/sharp-darwin-arm64@0.33.5': + optionalDependencies: + '@img/sharp-libvips-darwin-arm64': 1.0.4 + optional: true + + '@img/sharp-darwin-x64@0.33.5': + optionalDependencies: + '@img/sharp-libvips-darwin-x64': 1.0.4 + optional: true + + '@img/sharp-libvips-darwin-arm64@1.0.4': + optional: true + + '@img/sharp-libvips-darwin-x64@1.0.4': + optional: true + + '@img/sharp-libvips-linux-arm64@1.0.4': + optional: true + + '@img/sharp-libvips-linux-arm@1.0.5': + optional: true + + '@img/sharp-libvips-linux-s390x@1.0.4': + optional: true + + '@img/sharp-libvips-linux-x64@1.0.4': + optional: true + + '@img/sharp-libvips-linuxmusl-arm64@1.0.4': + optional: true + + '@img/sharp-libvips-linuxmusl-x64@1.0.4': + optional: true + + '@img/sharp-linux-arm64@0.33.5': + optionalDependencies: + '@img/sharp-libvips-linux-arm64': 1.0.4 + optional: true + + '@img/sharp-linux-arm@0.33.5': + optionalDependencies: + '@img/sharp-libvips-linux-arm': 1.0.5 + optional: true + + '@img/sharp-linux-s390x@0.33.5': + optionalDependencies: + '@img/sharp-libvips-linux-s390x': 1.0.4 + optional: true + + '@img/sharp-linux-x64@0.33.5': + optionalDependencies: + '@img/sharp-libvips-linux-x64': 1.0.4 + optional: true + + '@img/sharp-linuxmusl-arm64@0.33.5': + optionalDependencies: + '@img/sharp-libvips-linuxmusl-arm64': 1.0.4 + optional: true + + '@img/sharp-linuxmusl-x64@0.33.5': + optionalDependencies: + '@img/sharp-libvips-linuxmusl-x64': 1.0.4 + optional: true + + '@img/sharp-wasm32@0.33.5': dependencies: - '@babel/core': 7.26.9 - '@babel/helper-plugin-utils': 7.26.5 + '@emnapi/runtime': 1.3.1 + optional: true - '@babel/plugin-syntax-logical-assignment-operators@7.10.4(@babel/core@7.26.9)': + '@img/sharp-win32-ia32@0.33.5': + optional: true + + '@img/sharp-win32-x64@0.33.5': + optional: true + + '@isaacs/cliui@8.0.2': dependencies: - '@babel/core': 7.26.9 - '@babel/helper-plugin-utils': 7.26.5 + string-width: 5.1.2 + string-width-cjs: string-width@4.2.3 + strip-ansi: 7.1.0 + strip-ansi-cjs: strip-ansi@6.0.1 + wrap-ansi: 8.1.0 + wrap-ansi-cjs: wrap-ansi@7.0.0 - '@babel/plugin-syntax-nullish-coalescing-operator@7.8.3(@babel/core@7.26.9)': + '@istanbuljs/load-nyc-config@1.1.0': dependencies: - '@babel/core': 7.26.9 - '@babel/helper-plugin-utils': 7.26.5 + camelcase: 5.3.1 + find-up: 4.1.0 + get-package-type: 0.1.0 + js-yaml: 3.14.1 + resolve-from: 5.0.0 + + '@istanbuljs/schema@0.1.3': {} + + '@jest/console@29.7.0': + dependencies: + '@jest/types': 29.6.3 + '@types/node': 22.13.9 + chalk: 4.1.2 + jest-message-util: 29.7.0 + jest-util: 29.7.0 + slash: 3.0.0 + + '@jest/core@29.7.0(ts-node@10.9.2(@types/node@22.13.9)(typescript@5.8.3))': + dependencies: + '@jest/console': 29.7.0 + '@jest/reporters': 29.7.0 + '@jest/test-result': 29.7.0 + '@jest/transform': 29.7.0 + '@jest/types': 29.6.3 + '@types/node': 22.13.9 + ansi-escapes: 4.3.2 + chalk: 4.1.2 + ci-info: 3.9.0 + exit: 0.1.2 + graceful-fs: 4.2.11 + jest-changed-files: 29.7.0 + jest-config: 29.7.0(@types/node@22.13.9)(ts-node@10.9.2(@types/node@22.13.9)(typescript@5.8.3)) + jest-haste-map: 29.7.0 + jest-message-util: 29.7.0 + jest-regex-util: 29.6.3 + jest-resolve: 29.7.0 + jest-resolve-dependencies: 29.7.0 + jest-runner: 29.7.0 + jest-runtime: 29.7.0 + jest-snapshot: 29.7.0 + jest-util: 29.7.0 + jest-validate: 29.7.0 + jest-watcher: 29.7.0 + micromatch: 4.0.8 + pretty-format: 29.7.0 + slash: 3.0.0 + strip-ansi: 6.0.1 + transitivePeerDependencies: + - babel-plugin-macros + - supports-color + - ts-node - '@babel/plugin-syntax-numeric-separator@7.10.4(@babel/core@7.26.9)': + '@jest/environment@29.7.0': dependencies: - '@babel/core': 7.26.9 - '@babel/helper-plugin-utils': 7.26.5 + '@jest/fake-timers': 29.7.0 + '@jest/types': 29.6.3 + '@types/node': 22.13.9 + jest-mock: 29.7.0 - '@babel/plugin-syntax-object-rest-spread@7.8.3(@babel/core@7.26.9)': + '@jest/expect-utils@29.7.0': dependencies: - '@babel/core': 7.26.9 - '@babel/helper-plugin-utils': 7.26.5 + jest-get-type: 29.6.3 - '@babel/plugin-syntax-optional-catch-binding@7.8.3(@babel/core@7.26.9)': + '@jest/expect@29.7.0': dependencies: - '@babel/core': 7.26.9 - '@babel/helper-plugin-utils': 7.26.5 + expect: 29.7.0 + jest-snapshot: 29.7.0 + transitivePeerDependencies: + - supports-color - '@babel/plugin-syntax-optional-chaining@7.8.3(@babel/core@7.26.9)': + '@jest/fake-timers@29.7.0': dependencies: - '@babel/core': 7.26.9 - '@babel/helper-plugin-utils': 7.26.5 + '@jest/types': 29.6.3 + '@sinonjs/fake-timers': 10.3.0 + '@types/node': 22.13.9 + jest-message-util: 29.7.0 + jest-mock: 29.7.0 + jest-util: 29.7.0 - '@babel/plugin-syntax-private-property-in-object@7.14.5(@babel/core@7.26.9)': + '@jest/globals@29.7.0': dependencies: - '@babel/core': 7.26.9 - '@babel/helper-plugin-utils': 7.26.5 + '@jest/environment': 29.7.0 + '@jest/expect': 29.7.0 + '@jest/types': 29.6.3 + jest-mock: 29.7.0 + transitivePeerDependencies: + - supports-color - '@babel/plugin-syntax-top-level-await@7.14.5(@babel/core@7.26.9)': + '@jest/reporters@29.7.0': dependencies: - '@babel/core': 7.26.9 - '@babel/helper-plugin-utils': 7.26.5 + '@bcoe/v8-coverage': 0.2.3 + '@jest/console': 29.7.0 + '@jest/test-result': 29.7.0 + '@jest/transform': 29.7.0 + '@jest/types': 29.6.3 + '@jridgewell/trace-mapping': 0.3.25 + '@types/node': 22.13.9 + chalk: 4.1.2 + collect-v8-coverage: 1.0.2 + exit: 0.1.2 + glob: 7.2.3 + graceful-fs: 4.2.11 + istanbul-lib-coverage: 3.2.2 + istanbul-lib-instrument: 6.0.3 + istanbul-lib-report: 3.0.1 + istanbul-lib-source-maps: 4.0.1 + istanbul-reports: 3.1.7 + jest-message-util: 29.7.0 + jest-util: 29.7.0 + jest-worker: 29.7.0 + slash: 3.0.0 + string-length: 4.0.2 + strip-ansi: 6.0.1 + v8-to-istanbul: 9.3.0 + transitivePeerDependencies: + - supports-color - '@babel/plugin-syntax-typescript@7.25.9(@babel/core@7.26.9)': + '@jest/schemas@29.6.3': dependencies: - '@babel/core': 7.26.9 - '@babel/helper-plugin-utils': 7.26.5 + '@sinclair/typebox': 0.27.8 - '@babel/runtime-corejs3@7.26.0': + '@jest/source-map@29.6.3': dependencies: - core-js-pure: 3.39.0 - regenerator-runtime: 0.14.1 + '@jridgewell/trace-mapping': 0.3.25 + callsites: 3.1.0 + graceful-fs: 4.2.11 - '@babel/runtime@7.26.0': + '@jest/test-result@29.7.0': dependencies: - regenerator-runtime: 0.14.1 + '@jest/console': 29.7.0 + '@jest/types': 29.6.3 + '@types/istanbul-lib-coverage': 2.0.6 + collect-v8-coverage: 1.0.2 - '@babel/template@7.26.9': + '@jest/test-sequencer@29.7.0': dependencies: - '@babel/code-frame': 7.26.2 - '@babel/parser': 7.26.9 - '@babel/types': 7.26.9 + '@jest/test-result': 29.7.0 + graceful-fs: 4.2.11 + jest-haste-map: 29.7.0 + slash: 3.0.0 - '@babel/traverse@7.26.9': + '@jest/transform@29.7.0': dependencies: - '@babel/code-frame': 7.26.2 - '@babel/generator': 7.26.9 - '@babel/parser': 7.26.9 - '@babel/template': 7.26.9 - '@babel/types': 7.26.9 - debug: 4.3.7(supports-color@5.5.0) - globals: 11.12.0 + '@babel/core': 7.26.9 + '@jest/types': 29.6.3 + '@jridgewell/trace-mapping': 0.3.25 + babel-plugin-istanbul: 6.1.1 + chalk: 4.1.2 + convert-source-map: 2.0.0 + fast-json-stable-stringify: 2.1.0 + graceful-fs: 4.2.11 + jest-haste-map: 29.7.0 + jest-regex-util: 29.6.3 + jest-util: 29.7.0 + micromatch: 4.0.8 + pirates: 4.0.6 + slash: 3.0.0 + write-file-atomic: 4.0.2 transitivePeerDependencies: - supports-color - '@babel/types@7.26.9': + '@jest/types@29.6.3': dependencies: - '@babel/helper-string-parser': 7.25.9 - '@babel/helper-validator-identifier': 7.25.9 - - '@bcoe/v8-coverage@0.2.3': {} + '@jest/schemas': 29.6.3 + '@types/istanbul-lib-coverage': 2.0.6 + '@types/istanbul-reports': 3.0.4 + '@types/node': 22.13.9 + '@types/yargs': 17.0.33 + chalk: 4.1.2 - '@changesets/apply-release-plan@7.0.10': + '@jridgewell/gen-mapping@0.3.8': dependencies: - '@changesets/config': 3.1.1 - '@changesets/get-version-range-type': 0.4.0 - '@changesets/git': 3.0.2 - '@changesets/should-skip-package': 0.1.2 - '@changesets/types': 6.1.0 - '@manypkg/get-packages': 1.1.3 - detect-indent: 6.1.0 - fs-extra: 7.0.1 - lodash.startcase: 4.4.0 - outdent: 0.5.0 - prettier: 2.8.8 - resolve-from: 5.0.0 - semver: 7.7.1 + '@jridgewell/set-array': 1.2.1 + '@jridgewell/sourcemap-codec': 1.5.0 + '@jridgewell/trace-mapping': 0.3.25 - '@changesets/assemble-release-plan@6.0.6': - dependencies: - '@changesets/errors': 0.2.0 - '@changesets/get-dependents-graph': 2.1.3 - '@changesets/should-skip-package': 0.1.2 - '@changesets/types': 6.1.0 - '@manypkg/get-packages': 1.1.3 - semver: 7.7.1 + '@jridgewell/resolve-uri@3.1.2': {} - '@changesets/changelog-git@0.2.1': - dependencies: - '@changesets/types': 6.1.0 + '@jridgewell/set-array@1.2.1': {} - '@changesets/cli@2.29.0': + '@jridgewell/sourcemap-codec@1.5.0': {} + + '@jridgewell/trace-mapping@0.3.25': dependencies: - '@changesets/apply-release-plan': 7.0.10 - '@changesets/assemble-release-plan': 6.0.6 - '@changesets/changelog-git': 0.2.1 - '@changesets/config': 3.1.1 - '@changesets/errors': 0.2.0 - '@changesets/get-dependents-graph': 2.1.3 - '@changesets/get-release-plan': 4.0.8 - '@changesets/git': 3.0.2 - '@changesets/logger': 0.1.1 - '@changesets/pre': 2.0.2 - '@changesets/read': 0.6.3 - '@changesets/should-skip-package': 0.1.2 - '@changesets/types': 6.1.0 - '@changesets/write': 0.4.0 - '@manypkg/get-packages': 1.1.3 - ansi-colors: 4.1.3 - ci-info: 3.9.0 - enquirer: 2.4.1 - external-editor: 3.1.0 - fs-extra: 7.0.1 - mri: 1.2.0 - p-limit: 2.3.0 - package-manager-detector: 0.2.8 - picocolors: 1.1.1 - resolve-from: 5.0.0 - semver: 7.7.1 - spawndamnit: 3.0.1 - term-size: 2.2.1 + '@jridgewell/resolve-uri': 3.1.2 + '@jridgewell/sourcemap-codec': 1.5.0 - '@changesets/config@3.1.1': + '@jridgewell/trace-mapping@0.3.9': dependencies: - '@changesets/errors': 0.2.0 - '@changesets/get-dependents-graph': 2.1.3 - '@changesets/logger': 0.1.1 - '@changesets/types': 6.1.0 - '@manypkg/get-packages': 1.1.3 - fs-extra: 7.0.1 - micromatch: 4.0.8 + '@jridgewell/resolve-uri': 3.1.2 + '@jridgewell/sourcemap-codec': 1.5.0 - '@changesets/errors@0.2.0': + '@lit-labs/ssr-dom-shim@1.3.0': {} + + '@lit/reactive-element@1.6.3': dependencies: - extendable-error: 0.1.7 + '@lit-labs/ssr-dom-shim': 1.3.0 - '@changesets/get-dependents-graph@2.1.3': + '@manypkg/find-root@1.1.0': dependencies: - '@changesets/types': 6.1.0 - '@manypkg/get-packages': 1.1.3 - picocolors: 1.1.1 - semver: 7.7.1 + '@babel/runtime': 7.26.0 + '@types/node': 12.20.55 + find-up: 4.1.0 + fs-extra: 8.1.0 - '@changesets/get-release-plan@4.0.8': + '@manypkg/get-packages@1.1.3': dependencies: - '@changesets/assemble-release-plan': 6.0.6 - '@changesets/config': 3.1.1 - '@changesets/pre': 2.0.2 - '@changesets/read': 0.6.3 - '@changesets/types': 6.1.0 - '@manypkg/get-packages': 1.1.3 + '@babel/runtime': 7.26.0 + '@changesets/types': 4.1.0 + '@manypkg/find-root': 1.1.0 + fs-extra: 8.1.0 + globby: 11.1.0 + read-yaml-file: 1.1.0 - '@changesets/get-version-range-type@0.4.0': {} + '@metamask/eth-json-rpc-provider@1.0.1': + dependencies: + '@metamask/json-rpc-engine': 7.3.3 + '@metamask/safe-event-emitter': 3.1.2 + '@metamask/utils': 5.0.2 + transitivePeerDependencies: + - supports-color - '@changesets/git@3.0.2': + '@metamask/json-rpc-engine@7.3.3': dependencies: - '@changesets/errors': 0.2.0 - '@manypkg/get-packages': 1.1.3 - is-subdir: 1.2.0 - micromatch: 4.0.8 - spawndamnit: 3.0.1 + '@metamask/rpc-errors': 6.4.0 + '@metamask/safe-event-emitter': 3.1.2 + '@metamask/utils': 8.5.0 + transitivePeerDependencies: + - supports-color - '@changesets/logger@0.1.1': + '@metamask/json-rpc-engine@8.0.2': dependencies: - picocolors: 1.1.1 + '@metamask/rpc-errors': 6.4.0 + '@metamask/safe-event-emitter': 3.1.2 + '@metamask/utils': 8.5.0 + transitivePeerDependencies: + - supports-color - '@changesets/parse@0.4.1': + '@metamask/json-rpc-middleware-stream@7.0.2': dependencies: - '@changesets/types': 6.1.0 - js-yaml: 3.14.1 + '@metamask/json-rpc-engine': 8.0.2 + '@metamask/safe-event-emitter': 3.1.2 + '@metamask/utils': 8.5.0 + readable-stream: 3.6.2 + transitivePeerDependencies: + - supports-color - '@changesets/pre@2.0.2': + '@metamask/object-multiplex@2.1.0': dependencies: - '@changesets/errors': 0.2.0 - '@changesets/types': 6.1.0 - '@manypkg/get-packages': 1.1.3 - fs-extra: 7.0.1 + once: 1.4.0 + readable-stream: 3.6.2 - '@changesets/read@0.6.3': + '@metamask/onboarding@1.0.1': dependencies: - '@changesets/git': 3.0.2 - '@changesets/logger': 0.1.1 - '@changesets/parse': 0.4.1 - '@changesets/types': 6.1.0 - fs-extra: 7.0.1 - p-filter: 2.1.0 - picocolors: 1.1.1 + bowser: 2.11.0 - '@changesets/should-skip-package@0.1.2': + '@metamask/providers@16.1.0': dependencies: - '@changesets/types': 6.1.0 - '@manypkg/get-packages': 1.1.3 + '@metamask/json-rpc-engine': 8.0.2 + '@metamask/json-rpc-middleware-stream': 7.0.2 + '@metamask/object-multiplex': 2.1.0 + '@metamask/rpc-errors': 6.4.0 + '@metamask/safe-event-emitter': 3.1.2 + '@metamask/utils': 8.5.0 + detect-browser: 5.3.0 + extension-port-stream: 3.0.0 + fast-deep-equal: 3.1.3 + is-stream: 2.0.1 + readable-stream: 3.6.2 + webextension-polyfill: 0.10.0 + transitivePeerDependencies: + - supports-color - '@changesets/types@4.1.0': {} + '@metamask/rpc-errors@6.4.0': + dependencies: + '@metamask/utils': 9.3.0 + fast-safe-stringify: 2.1.1 + transitivePeerDependencies: + - supports-color - '@changesets/types@6.1.0': {} + '@metamask/safe-event-emitter@2.0.0': {} - '@changesets/write@0.4.0': + '@metamask/safe-event-emitter@3.1.2': {} + + '@metamask/sdk-communication-layer@0.32.0(cross-fetch@4.1.0)(eciesjs@0.4.14)(eventemitter2@6.4.9)(readable-stream@3.6.2)(socket.io-client@4.8.1(bufferutil@4.0.9)(utf-8-validate@5.0.10))': dependencies: - '@changesets/types': 6.1.0 - fs-extra: 7.0.1 - human-id: 4.1.1 - prettier: 2.8.8 + bufferutil: 4.0.9 + cross-fetch: 4.1.0 + date-fns: 2.30.0 + debug: 4.3.7(supports-color@5.5.0) + eciesjs: 0.4.14 + eventemitter2: 6.4.9 + readable-stream: 3.6.2 + socket.io-client: 4.8.1(bufferutil@4.0.9)(utf-8-validate@5.0.10) + utf-8-validate: 5.0.10 + uuid: 8.3.2 + transitivePeerDependencies: + - supports-color - '@cspotcode/source-map-support@0.8.1': + '@metamask/sdk-install-modal-web@0.32.0': dependencies: - '@jridgewell/trace-mapping': 0.3.9 + '@paulmillr/qr': 0.2.1 - '@emnapi/runtime@1.3.1': + '@metamask/sdk@0.32.0(bufferutil@4.0.9)(utf-8-validate@5.0.10)': dependencies: + '@babel/runtime': 7.26.0 + '@metamask/onboarding': 1.0.1 + '@metamask/providers': 16.1.0 + '@metamask/sdk-communication-layer': 0.32.0(cross-fetch@4.1.0)(eciesjs@0.4.14)(eventemitter2@6.4.9)(readable-stream@3.6.2)(socket.io-client@4.8.1(bufferutil@4.0.9)(utf-8-validate@5.0.10)) + '@metamask/sdk-install-modal-web': 0.32.0 + '@paulmillr/qr': 0.2.1 + bowser: 2.11.0 + cross-fetch: 4.1.0 + debug: 4.3.7(supports-color@5.5.0) + eciesjs: 0.4.14 + eth-rpc-errors: 4.0.3 + eventemitter2: 6.4.9 + obj-multiplex: 1.0.0 + pump: 3.0.2 + readable-stream: 3.6.2 + socket.io-client: 4.8.1(bufferutil@4.0.9)(utf-8-validate@5.0.10) tslib: 2.8.1 - optional: true - - '@esbuild/aix-ppc64@0.24.2': - optional: true - - '@esbuild/android-arm64@0.24.2': - optional: true + util: 0.12.5 + uuid: 8.3.2 + transitivePeerDependencies: + - bufferutil + - encoding + - supports-color + - utf-8-validate - '@esbuild/android-arm@0.24.2': - optional: true + '@metamask/superstruct@3.2.1': {} - '@esbuild/android-x64@0.24.2': - optional: true + '@metamask/utils@5.0.2': + dependencies: + '@ethereumjs/tx': 4.2.0 + '@types/debug': 4.1.12 + debug: 4.3.7(supports-color@5.5.0) + semver: 7.7.1 + superstruct: 1.0.4 + transitivePeerDependencies: + - supports-color - '@esbuild/darwin-arm64@0.24.2': - optional: true + '@metamask/utils@8.5.0': + dependencies: + '@ethereumjs/tx': 4.2.0 + '@metamask/superstruct': 3.2.1 + '@noble/hashes': 1.7.1 + '@scure/base': 1.2.4 + '@types/debug': 4.1.12 + debug: 4.3.7(supports-color@5.5.0) + pony-cause: 2.1.11 + semver: 7.7.1 + uuid: 9.0.1 + transitivePeerDependencies: + - supports-color - '@esbuild/darwin-x64@0.24.2': - optional: true + '@metamask/utils@9.3.0': + dependencies: + '@ethereumjs/tx': 4.2.0 + '@metamask/superstruct': 3.2.1 + '@noble/hashes': 1.7.1 + '@scure/base': 1.2.4 + '@types/debug': 4.1.12 + debug: 4.3.7(supports-color@5.5.0) + pony-cause: 2.1.11 + semver: 7.7.1 + uuid: 9.0.1 + transitivePeerDependencies: + - supports-color - '@esbuild/freebsd-arm64@0.24.2': - optional: true + '@motionone/animation@10.18.0': + dependencies: + '@motionone/easing': 10.18.0 + '@motionone/types': 10.17.1 + '@motionone/utils': 10.18.0 + tslib: 2.8.1 - '@esbuild/freebsd-x64@0.24.2': - optional: true + '@motionone/dom@10.18.0': + dependencies: + '@motionone/animation': 10.18.0 + '@motionone/generators': 10.18.0 + '@motionone/types': 10.17.1 + '@motionone/utils': 10.18.0 + hey-listen: 1.0.8 + tslib: 2.8.1 - '@esbuild/linux-arm64@0.24.2': - optional: true + '@motionone/easing@10.18.0': + dependencies: + '@motionone/utils': 10.18.0 + tslib: 2.8.1 - '@esbuild/linux-arm@0.24.2': - optional: true + '@motionone/generators@10.18.0': + dependencies: + '@motionone/types': 10.17.1 + '@motionone/utils': 10.18.0 + tslib: 2.8.1 - '@esbuild/linux-ia32@0.24.2': - optional: true + '@motionone/svelte@10.16.4': + dependencies: + '@motionone/dom': 10.18.0 + tslib: 2.8.1 - '@esbuild/linux-loong64@0.24.2': - optional: true + '@motionone/types@10.17.1': {} - '@esbuild/linux-mips64el@0.24.2': - optional: true + '@motionone/utils@10.18.0': + dependencies: + '@motionone/types': 10.17.1 + hey-listen: 1.0.8 + tslib: 2.8.1 - '@esbuild/linux-ppc64@0.24.2': - optional: true + '@motionone/vue@10.16.4': + dependencies: + '@motionone/dom': 10.18.0 + tslib: 2.8.1 - '@esbuild/linux-riscv64@0.24.2': - optional: true + '@next/env@15.1.0': {} - '@esbuild/linux-s390x@0.24.2': - optional: true + '@next/eslint-plugin-next@15.1.0': + dependencies: + fast-glob: 3.3.1 - '@esbuild/linux-x64@0.24.2': + '@next/swc-darwin-arm64@15.1.0': optional: true - '@esbuild/netbsd-arm64@0.24.2': + '@next/swc-darwin-x64@15.1.0': optional: true - '@esbuild/netbsd-x64@0.24.2': + '@next/swc-linux-arm64-gnu@15.1.0': optional: true - '@esbuild/openbsd-arm64@0.24.2': + '@next/swc-linux-arm64-musl@15.1.0': optional: true - '@esbuild/openbsd-x64@0.24.2': + '@next/swc-linux-x64-gnu@15.1.0': optional: true - '@esbuild/sunos-x64@0.24.2': + '@next/swc-linux-x64-musl@15.1.0': optional: true - '@esbuild/win32-arm64@0.24.2': + '@next/swc-win32-arm64-msvc@15.1.0': optional: true - '@esbuild/win32-ia32@0.24.2': + '@next/swc-win32-x64-msvc@15.1.0': optional: true - '@esbuild/win32-x64@0.24.2': - optional: true + '@noble/ciphers@1.2.1': {} - '@eslint-community/eslint-utils@4.4.1(eslint@9.15.0)': + '@noble/curves@1.2.0': dependencies: - eslint: 9.15.0 - eslint-visitor-keys: 3.4.3 + '@noble/hashes': 1.3.2 - '@eslint-community/regexpp@4.12.1': {} - - '@eslint/config-array@0.19.0': + '@noble/curves@1.4.2': dependencies: - '@eslint/object-schema': 2.1.4 - debug: 4.3.7(supports-color@5.5.0) - minimatch: 3.1.2 - transitivePeerDependencies: - - supports-color + '@noble/hashes': 1.4.0 - '@eslint/core@0.9.0': {} + '@noble/curves@1.8.0': + dependencies: + '@noble/hashes': 1.7.0 - '@eslint/eslintrc@3.2.0': + '@noble/curves@1.8.1': dependencies: - ajv: 6.12.6 - debug: 4.3.7(supports-color@5.5.0) - espree: 10.3.0 - globals: 14.0.0 - ignore: 5.3.2 - import-fresh: 3.3.0 - js-yaml: 4.1.0 - minimatch: 3.1.2 - strip-json-comments: 3.1.1 - transitivePeerDependencies: - - supports-color + '@noble/hashes': 1.7.1 - '@eslint/js@9.15.0': {} + '@noble/hashes@1.3.2': {} - '@eslint/js@9.17.0': {} + '@noble/hashes@1.4.0': {} - '@eslint/object-schema@2.1.4': {} + '@noble/hashes@1.7.0': {} - '@eslint/plugin-kit@0.2.3': + '@noble/hashes@1.7.1': {} + + '@nodelib/fs.scandir@2.1.5': dependencies: - levn: 0.4.1 + '@nodelib/fs.stat': 2.0.5 + run-parallel: 1.2.0 - '@humanfs/core@0.19.1': {} + '@nodelib/fs.stat@2.0.5': {} - '@humanfs/node@0.16.6': + '@nodelib/fs.walk@1.2.8': dependencies: - '@humanfs/core': 0.19.1 - '@humanwhocodes/retry': 0.3.1 + '@nodelib/fs.scandir': 2.1.5 + fastq: 1.17.1 - '@humanwhocodes/module-importer@1.0.1': {} + '@paulmillr/qr@0.2.1': {} - '@humanwhocodes/retry@0.3.1': {} + '@radix-ui/number@1.1.1': {} - '@humanwhocodes/retry@0.4.1': {} + '@radix-ui/primitive@1.1.2': {} - '@img/sharp-darwin-arm64@0.33.5': + '@radix-ui/react-arrow@1.1.3(@types/react-dom@19.1.2(@types/react@19.1.2))(@types/react@19.1.2)(react-dom@19.0.0(react@19.0.0))(react@19.0.0)': + dependencies: + '@radix-ui/react-primitive': 2.0.3(@types/react-dom@19.1.2(@types/react@19.1.2))(@types/react@19.1.2)(react-dom@19.0.0(react@19.0.0))(react@19.0.0) + react: 19.0.0 + react-dom: 19.0.0(react@19.0.0) optionalDependencies: - '@img/sharp-libvips-darwin-arm64': 1.0.4 - optional: true + '@types/react': 19.1.2 + '@types/react-dom': 19.1.2(@types/react@19.1.2) - '@img/sharp-darwin-x64@0.33.5': + '@radix-ui/react-aspect-ratio@1.1.3(@types/react-dom@19.1.2(@types/react@19.1.2))(@types/react@19.1.2)(react-dom@19.0.0(react@19.0.0))(react@19.0.0)': + dependencies: + '@radix-ui/react-primitive': 2.0.3(@types/react-dom@19.1.2(@types/react@19.1.2))(@types/react@19.1.2)(react-dom@19.0.0(react@19.0.0))(react@19.0.0) + react: 19.0.0 + react-dom: 19.0.0(react@19.0.0) optionalDependencies: - '@img/sharp-libvips-darwin-x64': 1.0.4 - optional: true - - '@img/sharp-libvips-darwin-arm64@1.0.4': - optional: true - - '@img/sharp-libvips-darwin-x64@1.0.4': - optional: true - - '@img/sharp-libvips-linux-arm64@1.0.4': - optional: true - - '@img/sharp-libvips-linux-arm@1.0.5': - optional: true - - '@img/sharp-libvips-linux-s390x@1.0.4': - optional: true + '@types/react': 19.1.2 + '@types/react-dom': 19.1.2(@types/react@19.1.2) + + '@radix-ui/react-checkbox@1.1.5(@types/react-dom@19.1.2(@types/react@19.1.2))(@types/react@19.1.2)(react-dom@19.0.0(react@19.0.0))(react@19.0.0)': + dependencies: + '@radix-ui/primitive': 1.1.2 + '@radix-ui/react-compose-refs': 1.1.2(@types/react@19.1.2)(react@19.0.0) + '@radix-ui/react-context': 1.1.2(@types/react@19.1.2)(react@19.0.0) + '@radix-ui/react-presence': 1.1.3(@types/react-dom@19.1.2(@types/react@19.1.2))(@types/react@19.1.2)(react-dom@19.0.0(react@19.0.0))(react@19.0.0) + '@radix-ui/react-primitive': 2.0.3(@types/react-dom@19.1.2(@types/react@19.1.2))(@types/react@19.1.2)(react-dom@19.0.0(react@19.0.0))(react@19.0.0) + '@radix-ui/react-use-controllable-state': 1.1.1(@types/react@19.1.2)(react@19.0.0) + '@radix-ui/react-use-previous': 1.1.1(@types/react@19.1.2)(react@19.0.0) + '@radix-ui/react-use-size': 1.1.1(@types/react@19.1.2)(react@19.0.0) + react: 19.0.0 + react-dom: 19.0.0(react@19.0.0) + optionalDependencies: + '@types/react': 19.1.2 + '@types/react-dom': 19.1.2(@types/react@19.1.2) + + '@radix-ui/react-collapsible@1.1.4(@types/react-dom@19.1.2(@types/react@19.1.2))(@types/react@19.1.2)(react-dom@19.0.0(react@19.0.0))(react@19.0.0)': + dependencies: + '@radix-ui/primitive': 1.1.2 + '@radix-ui/react-compose-refs': 1.1.2(@types/react@19.1.2)(react@19.0.0) + '@radix-ui/react-context': 1.1.2(@types/react@19.1.2)(react@19.0.0) + '@radix-ui/react-id': 1.1.1(@types/react@19.1.2)(react@19.0.0) + '@radix-ui/react-presence': 1.1.3(@types/react-dom@19.1.2(@types/react@19.1.2))(@types/react@19.1.2)(react-dom@19.0.0(react@19.0.0))(react@19.0.0) + '@radix-ui/react-primitive': 2.0.3(@types/react-dom@19.1.2(@types/react@19.1.2))(@types/react@19.1.2)(react-dom@19.0.0(react@19.0.0))(react@19.0.0) + '@radix-ui/react-use-controllable-state': 1.1.1(@types/react@19.1.2)(react@19.0.0) + '@radix-ui/react-use-layout-effect': 1.1.1(@types/react@19.1.2)(react@19.0.0) + react: 19.0.0 + react-dom: 19.0.0(react@19.0.0) + optionalDependencies: + '@types/react': 19.1.2 + '@types/react-dom': 19.1.2(@types/react@19.1.2) - '@img/sharp-libvips-linux-x64@1.0.4': - optional: true + '@radix-ui/react-collection@1.1.3(@types/react-dom@19.1.2(@types/react@19.1.2))(@types/react@19.1.2)(react-dom@19.0.0(react@19.0.0))(react@19.0.0)': + dependencies: + '@radix-ui/react-compose-refs': 1.1.2(@types/react@19.1.2)(react@19.0.0) + '@radix-ui/react-context': 1.1.2(@types/react@19.1.2)(react@19.0.0) + '@radix-ui/react-primitive': 2.0.3(@types/react-dom@19.1.2(@types/react@19.1.2))(@types/react@19.1.2)(react-dom@19.0.0(react@19.0.0))(react@19.0.0) + '@radix-ui/react-slot': 1.2.0(@types/react@19.1.2)(react@19.0.0) + react: 19.0.0 + react-dom: 19.0.0(react@19.0.0) + optionalDependencies: + '@types/react': 19.1.2 + '@types/react-dom': 19.1.2(@types/react@19.1.2) - '@img/sharp-libvips-linuxmusl-arm64@1.0.4': - optional: true + '@radix-ui/react-compose-refs@1.1.2(@types/react@19.1.2)(react@19.0.0)': + dependencies: + react: 19.0.0 + optionalDependencies: + '@types/react': 19.1.2 - '@img/sharp-libvips-linuxmusl-x64@1.0.4': - optional: true + '@radix-ui/react-context@1.1.2(@types/react@19.1.2)(react@19.0.0)': + dependencies: + react: 19.0.0 + optionalDependencies: + '@types/react': 19.1.2 + + '@radix-ui/react-dialog@1.1.7(@types/react-dom@19.1.2(@types/react@19.1.2))(@types/react@19.1.2)(react-dom@19.0.0(react@19.0.0))(react@19.0.0)': + dependencies: + '@radix-ui/primitive': 1.1.2 + '@radix-ui/react-compose-refs': 1.1.2(@types/react@19.1.2)(react@19.0.0) + '@radix-ui/react-context': 1.1.2(@types/react@19.1.2)(react@19.0.0) + '@radix-ui/react-dismissable-layer': 1.1.6(@types/react-dom@19.1.2(@types/react@19.1.2))(@types/react@19.1.2)(react-dom@19.0.0(react@19.0.0))(react@19.0.0) + '@radix-ui/react-focus-guards': 1.1.2(@types/react@19.1.2)(react@19.0.0) + '@radix-ui/react-focus-scope': 1.1.3(@types/react-dom@19.1.2(@types/react@19.1.2))(@types/react@19.1.2)(react-dom@19.0.0(react@19.0.0))(react@19.0.0) + '@radix-ui/react-id': 1.1.1(@types/react@19.1.2)(react@19.0.0) + '@radix-ui/react-portal': 1.1.5(@types/react-dom@19.1.2(@types/react@19.1.2))(@types/react@19.1.2)(react-dom@19.0.0(react@19.0.0))(react@19.0.0) + '@radix-ui/react-presence': 1.1.3(@types/react-dom@19.1.2(@types/react@19.1.2))(@types/react@19.1.2)(react-dom@19.0.0(react@19.0.0))(react@19.0.0) + '@radix-ui/react-primitive': 2.0.3(@types/react-dom@19.1.2(@types/react@19.1.2))(@types/react@19.1.2)(react-dom@19.0.0(react@19.0.0))(react@19.0.0) + '@radix-ui/react-slot': 1.2.0(@types/react@19.1.2)(react@19.0.0) + '@radix-ui/react-use-controllable-state': 1.1.1(@types/react@19.1.2)(react@19.0.0) + aria-hidden: 1.2.4 + react: 19.0.0 + react-dom: 19.0.0(react@19.0.0) + react-remove-scroll: 2.6.3(@types/react@19.1.2)(react@19.0.0) + optionalDependencies: + '@types/react': 19.1.2 + '@types/react-dom': 19.1.2(@types/react@19.1.2) - '@img/sharp-linux-arm64@0.33.5': + '@radix-ui/react-direction@1.1.1(@types/react@19.1.2)(react@19.0.0)': + dependencies: + react: 19.0.0 optionalDependencies: - '@img/sharp-libvips-linux-arm64': 1.0.4 - optional: true + '@types/react': 19.1.2 - '@img/sharp-linux-arm@0.33.5': + '@radix-ui/react-dismissable-layer@1.1.6(@types/react-dom@19.1.2(@types/react@19.1.2))(@types/react@19.1.2)(react-dom@19.0.0(react@19.0.0))(react@19.0.0)': + dependencies: + '@radix-ui/primitive': 1.1.2 + '@radix-ui/react-compose-refs': 1.1.2(@types/react@19.1.2)(react@19.0.0) + '@radix-ui/react-primitive': 2.0.3(@types/react-dom@19.1.2(@types/react@19.1.2))(@types/react@19.1.2)(react-dom@19.0.0(react@19.0.0))(react@19.0.0) + '@radix-ui/react-use-callback-ref': 1.1.1(@types/react@19.1.2)(react@19.0.0) + '@radix-ui/react-use-escape-keydown': 1.1.1(@types/react@19.1.2)(react@19.0.0) + react: 19.0.0 + react-dom: 19.0.0(react@19.0.0) + optionalDependencies: + '@types/react': 19.1.2 + '@types/react-dom': 19.1.2(@types/react@19.1.2) + + '@radix-ui/react-dropdown-menu@2.1.7(@types/react-dom@19.1.2(@types/react@19.1.2))(@types/react@19.1.2)(react-dom@19.0.0(react@19.0.0))(react@19.0.0)': + dependencies: + '@radix-ui/primitive': 1.1.2 + '@radix-ui/react-compose-refs': 1.1.2(@types/react@19.1.2)(react@19.0.0) + '@radix-ui/react-context': 1.1.2(@types/react@19.1.2)(react@19.0.0) + '@radix-ui/react-id': 1.1.1(@types/react@19.1.2)(react@19.0.0) + '@radix-ui/react-menu': 2.1.7(@types/react-dom@19.1.2(@types/react@19.1.2))(@types/react@19.1.2)(react-dom@19.0.0(react@19.0.0))(react@19.0.0) + '@radix-ui/react-primitive': 2.0.3(@types/react-dom@19.1.2(@types/react@19.1.2))(@types/react@19.1.2)(react-dom@19.0.0(react@19.0.0))(react@19.0.0) + '@radix-ui/react-use-controllable-state': 1.1.1(@types/react@19.1.2)(react@19.0.0) + react: 19.0.0 + react-dom: 19.0.0(react@19.0.0) optionalDependencies: - '@img/sharp-libvips-linux-arm': 1.0.5 - optional: true + '@types/react': 19.1.2 + '@types/react-dom': 19.1.2(@types/react@19.1.2) - '@img/sharp-linux-s390x@0.33.5': + '@radix-ui/react-focus-guards@1.1.2(@types/react@19.1.2)(react@19.0.0)': + dependencies: + react: 19.0.0 optionalDependencies: - '@img/sharp-libvips-linux-s390x': 1.0.4 - optional: true + '@types/react': 19.1.2 - '@img/sharp-linux-x64@0.33.5': + '@radix-ui/react-focus-scope@1.1.3(@types/react-dom@19.1.2(@types/react@19.1.2))(@types/react@19.1.2)(react-dom@19.0.0(react@19.0.0))(react@19.0.0)': + dependencies: + '@radix-ui/react-compose-refs': 1.1.2(@types/react@19.1.2)(react@19.0.0) + '@radix-ui/react-primitive': 2.0.3(@types/react-dom@19.1.2(@types/react@19.1.2))(@types/react@19.1.2)(react-dom@19.0.0(react@19.0.0))(react@19.0.0) + '@radix-ui/react-use-callback-ref': 1.1.1(@types/react@19.1.2)(react@19.0.0) + react: 19.0.0 + react-dom: 19.0.0(react@19.0.0) optionalDependencies: - '@img/sharp-libvips-linux-x64': 1.0.4 - optional: true + '@types/react': 19.1.2 + '@types/react-dom': 19.1.2(@types/react@19.1.2) - '@img/sharp-linuxmusl-arm64@0.33.5': + '@radix-ui/react-id@1.1.1(@types/react@19.1.2)(react@19.0.0)': + dependencies: + '@radix-ui/react-use-layout-effect': 1.1.1(@types/react@19.1.2)(react@19.0.0) + react: 19.0.0 optionalDependencies: - '@img/sharp-libvips-linuxmusl-arm64': 1.0.4 - optional: true - - '@img/sharp-linuxmusl-x64@0.33.5': + '@types/react': 19.1.2 + + '@radix-ui/react-menu@2.1.7(@types/react-dom@19.1.2(@types/react@19.1.2))(@types/react@19.1.2)(react-dom@19.0.0(react@19.0.0))(react@19.0.0)': + dependencies: + '@radix-ui/primitive': 1.1.2 + '@radix-ui/react-collection': 1.1.3(@types/react-dom@19.1.2(@types/react@19.1.2))(@types/react@19.1.2)(react-dom@19.0.0(react@19.0.0))(react@19.0.0) + '@radix-ui/react-compose-refs': 1.1.2(@types/react@19.1.2)(react@19.0.0) + '@radix-ui/react-context': 1.1.2(@types/react@19.1.2)(react@19.0.0) + '@radix-ui/react-direction': 1.1.1(@types/react@19.1.2)(react@19.0.0) + '@radix-ui/react-dismissable-layer': 1.1.6(@types/react-dom@19.1.2(@types/react@19.1.2))(@types/react@19.1.2)(react-dom@19.0.0(react@19.0.0))(react@19.0.0) + '@radix-ui/react-focus-guards': 1.1.2(@types/react@19.1.2)(react@19.0.0) + '@radix-ui/react-focus-scope': 1.1.3(@types/react-dom@19.1.2(@types/react@19.1.2))(@types/react@19.1.2)(react-dom@19.0.0(react@19.0.0))(react@19.0.0) + '@radix-ui/react-id': 1.1.1(@types/react@19.1.2)(react@19.0.0) + '@radix-ui/react-popper': 1.2.3(@types/react-dom@19.1.2(@types/react@19.1.2))(@types/react@19.1.2)(react-dom@19.0.0(react@19.0.0))(react@19.0.0) + '@radix-ui/react-portal': 1.1.5(@types/react-dom@19.1.2(@types/react@19.1.2))(@types/react@19.1.2)(react-dom@19.0.0(react@19.0.0))(react@19.0.0) + '@radix-ui/react-presence': 1.1.3(@types/react-dom@19.1.2(@types/react@19.1.2))(@types/react@19.1.2)(react-dom@19.0.0(react@19.0.0))(react@19.0.0) + '@radix-ui/react-primitive': 2.0.3(@types/react-dom@19.1.2(@types/react@19.1.2))(@types/react@19.1.2)(react-dom@19.0.0(react@19.0.0))(react@19.0.0) + '@radix-ui/react-roving-focus': 1.1.3(@types/react-dom@19.1.2(@types/react@19.1.2))(@types/react@19.1.2)(react-dom@19.0.0(react@19.0.0))(react@19.0.0) + '@radix-ui/react-slot': 1.2.0(@types/react@19.1.2)(react@19.0.0) + '@radix-ui/react-use-callback-ref': 1.1.1(@types/react@19.1.2)(react@19.0.0) + aria-hidden: 1.2.4 + react: 19.0.0 + react-dom: 19.0.0(react@19.0.0) + react-remove-scroll: 2.6.3(@types/react@19.1.2)(react@19.0.0) optionalDependencies: - '@img/sharp-libvips-linuxmusl-x64': 1.0.4 - optional: true + '@types/react': 19.1.2 + '@types/react-dom': 19.1.2(@types/react@19.1.2) + + '@radix-ui/react-popover@1.1.7(@types/react-dom@19.1.2(@types/react@19.1.2))(@types/react@19.1.2)(react-dom@19.0.0(react@19.0.0))(react@19.0.0)': + dependencies: + '@radix-ui/primitive': 1.1.2 + '@radix-ui/react-compose-refs': 1.1.2(@types/react@19.1.2)(react@19.0.0) + '@radix-ui/react-context': 1.1.2(@types/react@19.1.2)(react@19.0.0) + '@radix-ui/react-dismissable-layer': 1.1.6(@types/react-dom@19.1.2(@types/react@19.1.2))(@types/react@19.1.2)(react-dom@19.0.0(react@19.0.0))(react@19.0.0) + '@radix-ui/react-focus-guards': 1.1.2(@types/react@19.1.2)(react@19.0.0) + '@radix-ui/react-focus-scope': 1.1.3(@types/react-dom@19.1.2(@types/react@19.1.2))(@types/react@19.1.2)(react-dom@19.0.0(react@19.0.0))(react@19.0.0) + '@radix-ui/react-id': 1.1.1(@types/react@19.1.2)(react@19.0.0) + '@radix-ui/react-popper': 1.2.3(@types/react-dom@19.1.2(@types/react@19.1.2))(@types/react@19.1.2)(react-dom@19.0.0(react@19.0.0))(react@19.0.0) + '@radix-ui/react-portal': 1.1.5(@types/react-dom@19.1.2(@types/react@19.1.2))(@types/react@19.1.2)(react-dom@19.0.0(react@19.0.0))(react@19.0.0) + '@radix-ui/react-presence': 1.1.3(@types/react-dom@19.1.2(@types/react@19.1.2))(@types/react@19.1.2)(react-dom@19.0.0(react@19.0.0))(react@19.0.0) + '@radix-ui/react-primitive': 2.0.3(@types/react-dom@19.1.2(@types/react@19.1.2))(@types/react@19.1.2)(react-dom@19.0.0(react@19.0.0))(react@19.0.0) + '@radix-ui/react-slot': 1.2.0(@types/react@19.1.2)(react@19.0.0) + '@radix-ui/react-use-controllable-state': 1.1.1(@types/react@19.1.2)(react@19.0.0) + aria-hidden: 1.2.4 + react: 19.0.0 + react-dom: 19.0.0(react@19.0.0) + react-remove-scroll: 2.6.3(@types/react@19.1.2)(react@19.0.0) + optionalDependencies: + '@types/react': 19.1.2 + '@types/react-dom': 19.1.2(@types/react@19.1.2) + + '@radix-ui/react-popper@1.2.3(@types/react-dom@19.1.2(@types/react@19.1.2))(@types/react@19.1.2)(react-dom@19.0.0(react@19.0.0))(react@19.0.0)': + dependencies: + '@floating-ui/react-dom': 2.1.2(react-dom@19.0.0(react@19.0.0))(react@19.0.0) + '@radix-ui/react-arrow': 1.1.3(@types/react-dom@19.1.2(@types/react@19.1.2))(@types/react@19.1.2)(react-dom@19.0.0(react@19.0.0))(react@19.0.0) + '@radix-ui/react-compose-refs': 1.1.2(@types/react@19.1.2)(react@19.0.0) + '@radix-ui/react-context': 1.1.2(@types/react@19.1.2)(react@19.0.0) + '@radix-ui/react-primitive': 2.0.3(@types/react-dom@19.1.2(@types/react@19.1.2))(@types/react@19.1.2)(react-dom@19.0.0(react@19.0.0))(react@19.0.0) + '@radix-ui/react-use-callback-ref': 1.1.1(@types/react@19.1.2)(react@19.0.0) + '@radix-ui/react-use-layout-effect': 1.1.1(@types/react@19.1.2)(react@19.0.0) + '@radix-ui/react-use-rect': 1.1.1(@types/react@19.1.2)(react@19.0.0) + '@radix-ui/react-use-size': 1.1.1(@types/react@19.1.2)(react@19.0.0) + '@radix-ui/rect': 1.1.1 + react: 19.0.0 + react-dom: 19.0.0(react@19.0.0) + optionalDependencies: + '@types/react': 19.1.2 + '@types/react-dom': 19.1.2(@types/react@19.1.2) - '@img/sharp-wasm32@0.33.5': + '@radix-ui/react-portal@1.1.5(@types/react-dom@19.1.2(@types/react@19.1.2))(@types/react@19.1.2)(react-dom@19.0.0(react@19.0.0))(react@19.0.0)': dependencies: - '@emnapi/runtime': 1.3.1 - optional: true - - '@img/sharp-win32-ia32@0.33.5': - optional: true - - '@img/sharp-win32-x64@0.33.5': - optional: true + '@radix-ui/react-primitive': 2.0.3(@types/react-dom@19.1.2(@types/react@19.1.2))(@types/react@19.1.2)(react-dom@19.0.0(react@19.0.0))(react@19.0.0) + '@radix-ui/react-use-layout-effect': 1.1.1(@types/react@19.1.2)(react@19.0.0) + react: 19.0.0 + react-dom: 19.0.0(react@19.0.0) + optionalDependencies: + '@types/react': 19.1.2 + '@types/react-dom': 19.1.2(@types/react@19.1.2) - '@istanbuljs/load-nyc-config@1.1.0': + '@radix-ui/react-presence@1.1.3(@types/react-dom@19.1.2(@types/react@19.1.2))(@types/react@19.1.2)(react-dom@19.0.0(react@19.0.0))(react@19.0.0)': dependencies: - camelcase: 5.3.1 - find-up: 4.1.0 - get-package-type: 0.1.0 - js-yaml: 3.14.1 - resolve-from: 5.0.0 - - '@istanbuljs/schema@0.1.3': {} + '@radix-ui/react-compose-refs': 1.1.2(@types/react@19.1.2)(react@19.0.0) + '@radix-ui/react-use-layout-effect': 1.1.1(@types/react@19.1.2)(react@19.0.0) + react: 19.0.0 + react-dom: 19.0.0(react@19.0.0) + optionalDependencies: + '@types/react': 19.1.2 + '@types/react-dom': 19.1.2(@types/react@19.1.2) - '@jest/console@29.7.0': + '@radix-ui/react-primitive@2.0.3(@types/react-dom@19.1.2(@types/react@19.1.2))(@types/react@19.1.2)(react-dom@19.0.0(react@19.0.0))(react@19.0.0)': dependencies: - '@jest/types': 29.6.3 - '@types/node': 22.13.9 - chalk: 4.1.2 - jest-message-util: 29.7.0 - jest-util: 29.7.0 - slash: 3.0.0 + '@radix-ui/react-slot': 1.2.0(@types/react@19.1.2)(react@19.0.0) + react: 19.0.0 + react-dom: 19.0.0(react@19.0.0) + optionalDependencies: + '@types/react': 19.1.2 + '@types/react-dom': 19.1.2(@types/react@19.1.2) - '@jest/core@29.7.0(ts-node@10.9.2(@types/node@22.13.9)(typescript@5.8.3))': + '@radix-ui/react-progress@1.1.3(@types/react-dom@19.1.2(@types/react@19.1.2))(@types/react@19.1.2)(react-dom@19.0.0(react@19.0.0))(react@19.0.0)': dependencies: - '@jest/console': 29.7.0 - '@jest/reporters': 29.7.0 - '@jest/test-result': 29.7.0 - '@jest/transform': 29.7.0 - '@jest/types': 29.6.3 - '@types/node': 22.13.9 - ansi-escapes: 4.3.2 - chalk: 4.1.2 - ci-info: 3.9.0 - exit: 0.1.2 - graceful-fs: 4.2.11 - jest-changed-files: 29.7.0 - jest-config: 29.7.0(@types/node@22.13.9)(ts-node@10.9.2(@types/node@22.13.9)(typescript@5.8.3)) - jest-haste-map: 29.7.0 - jest-message-util: 29.7.0 - jest-regex-util: 29.6.3 - jest-resolve: 29.7.0 - jest-resolve-dependencies: 29.7.0 - jest-runner: 29.7.0 - jest-runtime: 29.7.0 - jest-snapshot: 29.7.0 - jest-util: 29.7.0 - jest-validate: 29.7.0 - jest-watcher: 29.7.0 - micromatch: 4.0.8 - pretty-format: 29.7.0 - slash: 3.0.0 - strip-ansi: 6.0.1 - transitivePeerDependencies: - - babel-plugin-macros - - supports-color - - ts-node + '@radix-ui/react-context': 1.1.2(@types/react@19.1.2)(react@19.0.0) + '@radix-ui/react-primitive': 2.0.3(@types/react-dom@19.1.2(@types/react@19.1.2))(@types/react@19.1.2)(react-dom@19.0.0(react@19.0.0))(react@19.0.0) + react: 19.0.0 + react-dom: 19.0.0(react@19.0.0) + optionalDependencies: + '@types/react': 19.1.2 + '@types/react-dom': 19.1.2(@types/react@19.1.2) + + '@radix-ui/react-radio-group@1.2.4(@types/react-dom@19.1.2(@types/react@19.1.2))(@types/react@19.1.2)(react-dom@19.0.0(react@19.0.0))(react@19.0.0)': + dependencies: + '@radix-ui/primitive': 1.1.2 + '@radix-ui/react-compose-refs': 1.1.2(@types/react@19.1.2)(react@19.0.0) + '@radix-ui/react-context': 1.1.2(@types/react@19.1.2)(react@19.0.0) + '@radix-ui/react-direction': 1.1.1(@types/react@19.1.2)(react@19.0.0) + '@radix-ui/react-presence': 1.1.3(@types/react-dom@19.1.2(@types/react@19.1.2))(@types/react@19.1.2)(react-dom@19.0.0(react@19.0.0))(react@19.0.0) + '@radix-ui/react-primitive': 2.0.3(@types/react-dom@19.1.2(@types/react@19.1.2))(@types/react@19.1.2)(react-dom@19.0.0(react@19.0.0))(react@19.0.0) + '@radix-ui/react-roving-focus': 1.1.3(@types/react-dom@19.1.2(@types/react@19.1.2))(@types/react@19.1.2)(react-dom@19.0.0(react@19.0.0))(react@19.0.0) + '@radix-ui/react-use-controllable-state': 1.1.1(@types/react@19.1.2)(react@19.0.0) + '@radix-ui/react-use-previous': 1.1.1(@types/react@19.1.2)(react@19.0.0) + '@radix-ui/react-use-size': 1.1.1(@types/react@19.1.2)(react@19.0.0) + react: 19.0.0 + react-dom: 19.0.0(react@19.0.0) + optionalDependencies: + '@types/react': 19.1.2 + '@types/react-dom': 19.1.2(@types/react@19.1.2) + + '@radix-ui/react-roving-focus@1.1.3(@types/react-dom@19.1.2(@types/react@19.1.2))(@types/react@19.1.2)(react-dom@19.0.0(react@19.0.0))(react@19.0.0)': + dependencies: + '@radix-ui/primitive': 1.1.2 + '@radix-ui/react-collection': 1.1.3(@types/react-dom@19.1.2(@types/react@19.1.2))(@types/react@19.1.2)(react-dom@19.0.0(react@19.0.0))(react@19.0.0) + '@radix-ui/react-compose-refs': 1.1.2(@types/react@19.1.2)(react@19.0.0) + '@radix-ui/react-context': 1.1.2(@types/react@19.1.2)(react@19.0.0) + '@radix-ui/react-direction': 1.1.1(@types/react@19.1.2)(react@19.0.0) + '@radix-ui/react-id': 1.1.1(@types/react@19.1.2)(react@19.0.0) + '@radix-ui/react-primitive': 2.0.3(@types/react-dom@19.1.2(@types/react@19.1.2))(@types/react@19.1.2)(react-dom@19.0.0(react@19.0.0))(react@19.0.0) + '@radix-ui/react-use-callback-ref': 1.1.1(@types/react@19.1.2)(react@19.0.0) + '@radix-ui/react-use-controllable-state': 1.1.1(@types/react@19.1.2)(react@19.0.0) + react: 19.0.0 + react-dom: 19.0.0(react@19.0.0) + optionalDependencies: + '@types/react': 19.1.2 + '@types/react-dom': 19.1.2(@types/react@19.1.2) + + '@radix-ui/react-select@2.1.7(@types/react-dom@19.1.2(@types/react@19.1.2))(@types/react@19.1.2)(react-dom@19.0.0(react@19.0.0))(react@19.0.0)': + dependencies: + '@radix-ui/number': 1.1.1 + '@radix-ui/primitive': 1.1.2 + '@radix-ui/react-collection': 1.1.3(@types/react-dom@19.1.2(@types/react@19.1.2))(@types/react@19.1.2)(react-dom@19.0.0(react@19.0.0))(react@19.0.0) + '@radix-ui/react-compose-refs': 1.1.2(@types/react@19.1.2)(react@19.0.0) + '@radix-ui/react-context': 1.1.2(@types/react@19.1.2)(react@19.0.0) + '@radix-ui/react-direction': 1.1.1(@types/react@19.1.2)(react@19.0.0) + '@radix-ui/react-dismissable-layer': 1.1.6(@types/react-dom@19.1.2(@types/react@19.1.2))(@types/react@19.1.2)(react-dom@19.0.0(react@19.0.0))(react@19.0.0) + '@radix-ui/react-focus-guards': 1.1.2(@types/react@19.1.2)(react@19.0.0) + '@radix-ui/react-focus-scope': 1.1.3(@types/react-dom@19.1.2(@types/react@19.1.2))(@types/react@19.1.2)(react-dom@19.0.0(react@19.0.0))(react@19.0.0) + '@radix-ui/react-id': 1.1.1(@types/react@19.1.2)(react@19.0.0) + '@radix-ui/react-popper': 1.2.3(@types/react-dom@19.1.2(@types/react@19.1.2))(@types/react@19.1.2)(react-dom@19.0.0(react@19.0.0))(react@19.0.0) + '@radix-ui/react-portal': 1.1.5(@types/react-dom@19.1.2(@types/react@19.1.2))(@types/react@19.1.2)(react-dom@19.0.0(react@19.0.0))(react@19.0.0) + '@radix-ui/react-primitive': 2.0.3(@types/react-dom@19.1.2(@types/react@19.1.2))(@types/react@19.1.2)(react-dom@19.0.0(react@19.0.0))(react@19.0.0) + '@radix-ui/react-slot': 1.2.0(@types/react@19.1.2)(react@19.0.0) + '@radix-ui/react-use-callback-ref': 1.1.1(@types/react@19.1.2)(react@19.0.0) + '@radix-ui/react-use-controllable-state': 1.1.1(@types/react@19.1.2)(react@19.0.0) + '@radix-ui/react-use-layout-effect': 1.1.1(@types/react@19.1.2)(react@19.0.0) + '@radix-ui/react-use-previous': 1.1.1(@types/react@19.1.2)(react@19.0.0) + '@radix-ui/react-visually-hidden': 1.1.3(@types/react-dom@19.1.2(@types/react@19.1.2))(@types/react@19.1.2)(react-dom@19.0.0(react@19.0.0))(react@19.0.0) + aria-hidden: 1.2.4 + react: 19.0.0 + react-dom: 19.0.0(react@19.0.0) + react-remove-scroll: 2.6.3(@types/react@19.1.2)(react@19.0.0) + optionalDependencies: + '@types/react': 19.1.2 + '@types/react-dom': 19.1.2(@types/react@19.1.2) - '@jest/environment@29.7.0': + '@radix-ui/react-slot@1.2.0(@types/react@19.1.2)(react@19.0.0)': dependencies: - '@jest/fake-timers': 29.7.0 - '@jest/types': 29.6.3 - '@types/node': 22.13.9 - jest-mock: 29.7.0 + '@radix-ui/react-compose-refs': 1.1.2(@types/react@19.1.2)(react@19.0.0) + react: 19.0.0 + optionalDependencies: + '@types/react': 19.1.2 - '@jest/expect-utils@29.7.0': + '@radix-ui/react-switch@1.1.4(@types/react-dom@19.1.2(@types/react@19.1.2))(@types/react@19.1.2)(react-dom@19.0.0(react@19.0.0))(react@19.0.0)': dependencies: - jest-get-type: 29.6.3 + '@radix-ui/primitive': 1.1.2 + '@radix-ui/react-compose-refs': 1.1.2(@types/react@19.1.2)(react@19.0.0) + '@radix-ui/react-context': 1.1.2(@types/react@19.1.2)(react@19.0.0) + '@radix-ui/react-primitive': 2.0.3(@types/react-dom@19.1.2(@types/react@19.1.2))(@types/react@19.1.2)(react-dom@19.0.0(react@19.0.0))(react@19.0.0) + '@radix-ui/react-use-controllable-state': 1.1.1(@types/react@19.1.2)(react@19.0.0) + '@radix-ui/react-use-previous': 1.1.1(@types/react@19.1.2)(react@19.0.0) + '@radix-ui/react-use-size': 1.1.1(@types/react@19.1.2)(react@19.0.0) + react: 19.0.0 + react-dom: 19.0.0(react@19.0.0) + optionalDependencies: + '@types/react': 19.1.2 + '@types/react-dom': 19.1.2(@types/react@19.1.2) + + '@radix-ui/react-tabs@1.1.4(@types/react-dom@19.1.2(@types/react@19.1.2))(@types/react@19.1.2)(react-dom@19.0.0(react@19.0.0))(react@19.0.0)': + dependencies: + '@radix-ui/primitive': 1.1.2 + '@radix-ui/react-context': 1.1.2(@types/react@19.1.2)(react@19.0.0) + '@radix-ui/react-direction': 1.1.1(@types/react@19.1.2)(react@19.0.0) + '@radix-ui/react-id': 1.1.1(@types/react@19.1.2)(react@19.0.0) + '@radix-ui/react-presence': 1.1.3(@types/react-dom@19.1.2(@types/react@19.1.2))(@types/react@19.1.2)(react-dom@19.0.0(react@19.0.0))(react@19.0.0) + '@radix-ui/react-primitive': 2.0.3(@types/react-dom@19.1.2(@types/react@19.1.2))(@types/react@19.1.2)(react-dom@19.0.0(react@19.0.0))(react@19.0.0) + '@radix-ui/react-roving-focus': 1.1.3(@types/react-dom@19.1.2(@types/react@19.1.2))(@types/react@19.1.2)(react-dom@19.0.0(react@19.0.0))(react@19.0.0) + '@radix-ui/react-use-controllable-state': 1.1.1(@types/react@19.1.2)(react@19.0.0) + react: 19.0.0 + react-dom: 19.0.0(react@19.0.0) + optionalDependencies: + '@types/react': 19.1.2 + '@types/react-dom': 19.1.2(@types/react@19.1.2) + + '@radix-ui/react-toast@1.2.7(@types/react-dom@19.1.2(@types/react@19.1.2))(@types/react@19.1.2)(react-dom@19.0.0(react@19.0.0))(react@19.0.0)': + dependencies: + '@radix-ui/primitive': 1.1.2 + '@radix-ui/react-collection': 1.1.3(@types/react-dom@19.1.2(@types/react@19.1.2))(@types/react@19.1.2)(react-dom@19.0.0(react@19.0.0))(react@19.0.0) + '@radix-ui/react-compose-refs': 1.1.2(@types/react@19.1.2)(react@19.0.0) + '@radix-ui/react-context': 1.1.2(@types/react@19.1.2)(react@19.0.0) + '@radix-ui/react-dismissable-layer': 1.1.6(@types/react-dom@19.1.2(@types/react@19.1.2))(@types/react@19.1.2)(react-dom@19.0.0(react@19.0.0))(react@19.0.0) + '@radix-ui/react-portal': 1.1.5(@types/react-dom@19.1.2(@types/react@19.1.2))(@types/react@19.1.2)(react-dom@19.0.0(react@19.0.0))(react@19.0.0) + '@radix-ui/react-presence': 1.1.3(@types/react-dom@19.1.2(@types/react@19.1.2))(@types/react@19.1.2)(react-dom@19.0.0(react@19.0.0))(react@19.0.0) + '@radix-ui/react-primitive': 2.0.3(@types/react-dom@19.1.2(@types/react@19.1.2))(@types/react@19.1.2)(react-dom@19.0.0(react@19.0.0))(react@19.0.0) + '@radix-ui/react-use-callback-ref': 1.1.1(@types/react@19.1.2)(react@19.0.0) + '@radix-ui/react-use-controllable-state': 1.1.1(@types/react@19.1.2)(react@19.0.0) + '@radix-ui/react-use-layout-effect': 1.1.1(@types/react@19.1.2)(react@19.0.0) + '@radix-ui/react-visually-hidden': 1.1.3(@types/react-dom@19.1.2(@types/react@19.1.2))(@types/react@19.1.2)(react-dom@19.0.0(react@19.0.0))(react@19.0.0) + react: 19.0.0 + react-dom: 19.0.0(react@19.0.0) + optionalDependencies: + '@types/react': 19.1.2 + '@types/react-dom': 19.1.2(@types/react@19.1.2) + + '@radix-ui/react-tooltip@1.2.0(@types/react-dom@19.1.2(@types/react@19.1.2))(@types/react@19.1.2)(react-dom@19.0.0(react@19.0.0))(react@19.0.0)': + dependencies: + '@radix-ui/primitive': 1.1.2 + '@radix-ui/react-compose-refs': 1.1.2(@types/react@19.1.2)(react@19.0.0) + '@radix-ui/react-context': 1.1.2(@types/react@19.1.2)(react@19.0.0) + '@radix-ui/react-dismissable-layer': 1.1.6(@types/react-dom@19.1.2(@types/react@19.1.2))(@types/react@19.1.2)(react-dom@19.0.0(react@19.0.0))(react@19.0.0) + '@radix-ui/react-id': 1.1.1(@types/react@19.1.2)(react@19.0.0) + '@radix-ui/react-popper': 1.2.3(@types/react-dom@19.1.2(@types/react@19.1.2))(@types/react@19.1.2)(react-dom@19.0.0(react@19.0.0))(react@19.0.0) + '@radix-ui/react-portal': 1.1.5(@types/react-dom@19.1.2(@types/react@19.1.2))(@types/react@19.1.2)(react-dom@19.0.0(react@19.0.0))(react@19.0.0) + '@radix-ui/react-presence': 1.1.3(@types/react-dom@19.1.2(@types/react@19.1.2))(@types/react@19.1.2)(react-dom@19.0.0(react@19.0.0))(react@19.0.0) + '@radix-ui/react-primitive': 2.0.3(@types/react-dom@19.1.2(@types/react@19.1.2))(@types/react@19.1.2)(react-dom@19.0.0(react@19.0.0))(react@19.0.0) + '@radix-ui/react-slot': 1.2.0(@types/react@19.1.2)(react@19.0.0) + '@radix-ui/react-use-controllable-state': 1.1.1(@types/react@19.1.2)(react@19.0.0) + '@radix-ui/react-visually-hidden': 1.1.3(@types/react-dom@19.1.2(@types/react@19.1.2))(@types/react@19.1.2)(react-dom@19.0.0(react@19.0.0))(react@19.0.0) + react: 19.0.0 + react-dom: 19.0.0(react@19.0.0) + optionalDependencies: + '@types/react': 19.1.2 + '@types/react-dom': 19.1.2(@types/react@19.1.2) - '@jest/expect@29.7.0': + '@radix-ui/react-use-callback-ref@1.1.1(@types/react@19.1.2)(react@19.0.0)': dependencies: - expect: 29.7.0 - jest-snapshot: 29.7.0 - transitivePeerDependencies: - - supports-color + react: 19.0.0 + optionalDependencies: + '@types/react': 19.1.2 - '@jest/fake-timers@29.7.0': + '@radix-ui/react-use-controllable-state@1.1.1(@types/react@19.1.2)(react@19.0.0)': dependencies: - '@jest/types': 29.6.3 - '@sinonjs/fake-timers': 10.3.0 - '@types/node': 22.13.9 - jest-message-util: 29.7.0 - jest-mock: 29.7.0 - jest-util: 29.7.0 + '@radix-ui/react-use-callback-ref': 1.1.1(@types/react@19.1.2)(react@19.0.0) + react: 19.0.0 + optionalDependencies: + '@types/react': 19.1.2 - '@jest/globals@29.7.0': + '@radix-ui/react-use-escape-keydown@1.1.1(@types/react@19.1.2)(react@19.0.0)': dependencies: - '@jest/environment': 29.7.0 - '@jest/expect': 29.7.0 - '@jest/types': 29.6.3 - jest-mock: 29.7.0 - transitivePeerDependencies: - - supports-color + '@radix-ui/react-use-callback-ref': 1.1.1(@types/react@19.1.2)(react@19.0.0) + react: 19.0.0 + optionalDependencies: + '@types/react': 19.1.2 - '@jest/reporters@29.7.0': + '@radix-ui/react-use-layout-effect@1.1.1(@types/react@19.1.2)(react@19.0.0)': dependencies: - '@bcoe/v8-coverage': 0.2.3 - '@jest/console': 29.7.0 - '@jest/test-result': 29.7.0 - '@jest/transform': 29.7.0 - '@jest/types': 29.6.3 - '@jridgewell/trace-mapping': 0.3.25 - '@types/node': 22.13.9 - chalk: 4.1.2 - collect-v8-coverage: 1.0.2 - exit: 0.1.2 - glob: 7.2.3 - graceful-fs: 4.2.11 - istanbul-lib-coverage: 3.2.2 - istanbul-lib-instrument: 6.0.3 - istanbul-lib-report: 3.0.1 - istanbul-lib-source-maps: 4.0.1 - istanbul-reports: 3.1.7 - jest-message-util: 29.7.0 - jest-util: 29.7.0 - jest-worker: 29.7.0 - slash: 3.0.0 - string-length: 4.0.2 - strip-ansi: 6.0.1 - v8-to-istanbul: 9.3.0 - transitivePeerDependencies: - - supports-color + react: 19.0.0 + optionalDependencies: + '@types/react': 19.1.2 - '@jest/schemas@29.6.3': + '@radix-ui/react-use-previous@1.1.1(@types/react@19.1.2)(react@19.0.0)': dependencies: - '@sinclair/typebox': 0.27.8 + react: 19.0.0 + optionalDependencies: + '@types/react': 19.1.2 - '@jest/source-map@29.6.3': + '@radix-ui/react-use-rect@1.1.1(@types/react@19.1.2)(react@19.0.0)': dependencies: - '@jridgewell/trace-mapping': 0.3.25 - callsites: 3.1.0 - graceful-fs: 4.2.11 + '@radix-ui/rect': 1.1.1 + react: 19.0.0 + optionalDependencies: + '@types/react': 19.1.2 - '@jest/test-result@29.7.0': + '@radix-ui/react-use-size@1.1.1(@types/react@19.1.2)(react@19.0.0)': dependencies: - '@jest/console': 29.7.0 - '@jest/types': 29.6.3 - '@types/istanbul-lib-coverage': 2.0.6 - collect-v8-coverage: 1.0.2 + '@radix-ui/react-use-layout-effect': 1.1.1(@types/react@19.1.2)(react@19.0.0) + react: 19.0.0 + optionalDependencies: + '@types/react': 19.1.2 - '@jest/test-sequencer@29.7.0': + '@radix-ui/react-visually-hidden@1.1.3(@types/react-dom@19.1.2(@types/react@19.1.2))(@types/react@19.1.2)(react-dom@19.0.0(react@19.0.0))(react@19.0.0)': dependencies: - '@jest/test-result': 29.7.0 - graceful-fs: 4.2.11 - jest-haste-map: 29.7.0 - slash: 3.0.0 + '@radix-ui/react-primitive': 2.0.3(@types/react-dom@19.1.2(@types/react@19.1.2))(@types/react@19.1.2)(react-dom@19.0.0(react@19.0.0))(react@19.0.0) + react: 19.0.0 + react-dom: 19.0.0(react@19.0.0) + optionalDependencies: + '@types/react': 19.1.2 + '@types/react-dom': 19.1.2(@types/react@19.1.2) - '@jest/transform@29.7.0': - dependencies: - '@babel/core': 7.26.9 - '@jest/types': 29.6.3 - '@jridgewell/trace-mapping': 0.3.25 - babel-plugin-istanbul: 6.1.1 - chalk: 4.1.2 - convert-source-map: 2.0.0 - fast-json-stable-stringify: 2.1.0 - graceful-fs: 4.2.11 - jest-haste-map: 29.7.0 - jest-regex-util: 29.6.3 - jest-util: 29.7.0 - micromatch: 4.0.8 - pirates: 4.0.6 - slash: 3.0.0 - write-file-atomic: 4.0.2 - transitivePeerDependencies: - - supports-color + '@radix-ui/rect@1.1.1': {} - '@jest/types@29.6.3': - dependencies: - '@jest/schemas': 29.6.3 - '@types/istanbul-lib-coverage': 2.0.6 - '@types/istanbul-reports': 3.0.4 - '@types/node': 22.13.9 - '@types/yargs': 17.0.33 - chalk: 4.1.2 + '@rollup/rollup-android-arm-eabi@4.40.0': + optional: true - '@jridgewell/gen-mapping@0.3.8': - dependencies: - '@jridgewell/set-array': 1.2.1 - '@jridgewell/sourcemap-codec': 1.5.0 - '@jridgewell/trace-mapping': 0.3.25 + '@rollup/rollup-android-arm64@4.40.0': + optional: true - '@jridgewell/resolve-uri@3.1.2': {} + '@rollup/rollup-darwin-arm64@4.40.0': + optional: true - '@jridgewell/set-array@1.2.1': {} + '@rollup/rollup-darwin-x64@4.40.0': + optional: true - '@jridgewell/sourcemap-codec@1.5.0': {} + '@rollup/rollup-freebsd-arm64@4.40.0': + optional: true - '@jridgewell/trace-mapping@0.3.25': - dependencies: - '@jridgewell/resolve-uri': 3.1.2 - '@jridgewell/sourcemap-codec': 1.5.0 + '@rollup/rollup-freebsd-x64@4.40.0': + optional: true + + '@rollup/rollup-linux-arm-gnueabihf@4.40.0': + optional: true - '@jridgewell/trace-mapping@0.3.9': - dependencies: - '@jridgewell/resolve-uri': 3.1.2 - '@jridgewell/sourcemap-codec': 1.5.0 + '@rollup/rollup-linux-arm-musleabihf@4.40.0': + optional: true - '@manypkg/find-root@1.1.0': - dependencies: - '@babel/runtime': 7.26.0 - '@types/node': 12.20.55 - find-up: 4.1.0 - fs-extra: 8.1.0 + '@rollup/rollup-linux-arm64-gnu@4.40.0': + optional: true - '@manypkg/get-packages@1.1.3': - dependencies: - '@babel/runtime': 7.26.0 - '@changesets/types': 4.1.0 - '@manypkg/find-root': 1.1.0 - fs-extra: 8.1.0 - globby: 11.1.0 - read-yaml-file: 1.1.0 + '@rollup/rollup-linux-arm64-musl@4.40.0': + optional: true - '@next/env@15.1.0': {} + '@rollup/rollup-linux-loongarch64-gnu@4.40.0': + optional: true - '@next/eslint-plugin-next@15.1.0': - dependencies: - fast-glob: 3.3.1 + '@rollup/rollup-linux-powerpc64le-gnu@4.40.0': + optional: true - '@next/swc-darwin-arm64@15.1.0': + '@rollup/rollup-linux-riscv64-gnu@4.40.0': optional: true - '@next/swc-darwin-x64@15.1.0': + '@rollup/rollup-linux-riscv64-musl@4.40.0': optional: true - '@next/swc-linux-arm64-gnu@15.1.0': + '@rollup/rollup-linux-s390x-gnu@4.40.0': optional: true - '@next/swc-linux-arm64-musl@15.1.0': + '@rollup/rollup-linux-x64-gnu@4.40.0': optional: true - '@next/swc-linux-x64-gnu@15.1.0': + '@rollup/rollup-linux-x64-musl@4.40.0': optional: true - '@next/swc-linux-x64-musl@15.1.0': + '@rollup/rollup-win32-arm64-msvc@4.40.0': optional: true - '@next/swc-win32-arm64-msvc@15.1.0': + '@rollup/rollup-win32-ia32-msvc@4.40.0': optional: true - '@next/swc-win32-x64-msvc@15.1.0': + '@rollup/rollup-win32-x64-msvc@4.40.0': optional: true - '@noble/curves@1.8.1': + '@safe-global/safe-apps-provider@0.18.5(bufferutil@4.0.9)(typescript@5.7.3)(utf-8-validate@5.0.10)(zod@3.24.2)': dependencies: - '@noble/hashes': 1.7.1 - - '@noble/hashes@1.7.1': {} + '@safe-global/safe-apps-sdk': 9.1.0(bufferutil@4.0.9)(typescript@5.7.3)(utf-8-validate@5.0.10)(zod@3.24.2) + events: 3.3.0 + transitivePeerDependencies: + - bufferutil + - typescript + - utf-8-validate + - zod - '@nodelib/fs.scandir@2.1.5': + '@safe-global/safe-apps-sdk@9.1.0(bufferutil@4.0.9)(typescript@5.7.3)(utf-8-validate@5.0.10)(zod@3.24.2)': dependencies: - '@nodelib/fs.stat': 2.0.5 - run-parallel: 1.2.0 + '@safe-global/safe-gateway-typescript-sdk': 3.22.9 + viem: 2.27.0(bufferutil@4.0.9)(typescript@5.7.3)(utf-8-validate@5.0.10)(zod@3.24.2) + transitivePeerDependencies: + - bufferutil + - typescript + - utf-8-validate + - zod - '@nodelib/fs.stat@2.0.5': {} + '@safe-global/safe-gateway-typescript-sdk@3.22.9': {} - '@nodelib/fs.walk@1.2.8': - dependencies: - '@nodelib/fs.scandir': 2.1.5 - fastq: 1.17.1 + '@scure/base@1.1.9': {} '@scure/base@1.2.4': {} + '@scure/bip32@1.4.0': + dependencies: + '@noble/curves': 1.4.2 + '@noble/hashes': 1.4.0 + '@scure/base': 1.1.9 + '@scure/bip32@1.6.2': dependencies: '@noble/curves': 1.8.1 '@noble/hashes': 1.7.1 '@scure/base': 1.2.4 + '@scure/bip39@1.3.0': + dependencies: + '@noble/hashes': 1.4.0 + '@scure/base': 1.1.9 + '@scure/bip39@1.5.4': dependencies: '@noble/hashes': 1.7.1 @@ -4528,12 +8251,86 @@ snapshots: dependencies: '@sinonjs/commons': 3.0.1 + '@socket.io/component-emitter@3.1.2': {} + '@swc/counter@0.1.3': {} '@swc/helpers@0.5.15': dependencies: tslib: 2.8.1 + '@tailwindcss/node@4.1.4': + dependencies: + enhanced-resolve: 5.18.1 + jiti: 2.4.2 + lightningcss: 1.29.2 + tailwindcss: 4.1.4 + + '@tailwindcss/oxide-android-arm64@4.1.4': + optional: true + + '@tailwindcss/oxide-darwin-arm64@4.1.4': + optional: true + + '@tailwindcss/oxide-darwin-x64@4.1.4': + optional: true + + '@tailwindcss/oxide-freebsd-x64@4.1.4': + optional: true + + '@tailwindcss/oxide-linux-arm-gnueabihf@4.1.4': + optional: true + + '@tailwindcss/oxide-linux-arm64-gnu@4.1.4': + optional: true + + '@tailwindcss/oxide-linux-arm64-musl@4.1.4': + optional: true + + '@tailwindcss/oxide-linux-x64-gnu@4.1.4': + optional: true + + '@tailwindcss/oxide-linux-x64-musl@4.1.4': + optional: true + + '@tailwindcss/oxide-wasm32-wasi@4.1.4': + optional: true + + '@tailwindcss/oxide-win32-arm64-msvc@4.1.4': + optional: true + + '@tailwindcss/oxide-win32-x64-msvc@4.1.4': + optional: true + + '@tailwindcss/oxide@4.1.4': + optionalDependencies: + '@tailwindcss/oxide-android-arm64': 4.1.4 + '@tailwindcss/oxide-darwin-arm64': 4.1.4 + '@tailwindcss/oxide-darwin-x64': 4.1.4 + '@tailwindcss/oxide-freebsd-x64': 4.1.4 + '@tailwindcss/oxide-linux-arm-gnueabihf': 4.1.4 + '@tailwindcss/oxide-linux-arm64-gnu': 4.1.4 + '@tailwindcss/oxide-linux-arm64-musl': 4.1.4 + '@tailwindcss/oxide-linux-x64-gnu': 4.1.4 + '@tailwindcss/oxide-linux-x64-musl': 4.1.4 + '@tailwindcss/oxide-wasm32-wasi': 4.1.4 + '@tailwindcss/oxide-win32-arm64-msvc': 4.1.4 + '@tailwindcss/oxide-win32-x64-msvc': 4.1.4 + + '@tailwindcss/vite@4.1.4(vite@6.2.6(@types/node@22.13.9)(jiti@2.4.2)(lightningcss@1.29.2))': + dependencies: + '@tailwindcss/node': 4.1.4 + '@tailwindcss/oxide': 4.1.4 + tailwindcss: 4.1.4 + vite: 6.2.6(@types/node@22.13.9)(jiti@2.4.2)(lightningcss@1.29.2) + + '@tanstack/query-core@5.74.3': {} + + '@tanstack/react-query@5.74.3(react@19.0.0)': + dependencies: + '@tanstack/query-core': 5.74.3 + react: 19.0.0 + '@tootallnate/quickjs-emscripten@0.23.0': {} '@tsconfig/node10@1.0.11': {} @@ -4600,8 +8397,16 @@ snapshots: dependencies: '@babel/types': 7.26.9 + '@types/cookie@0.6.0': {} + + '@types/debug@4.1.12': + dependencies: + '@types/ms': 2.1.0 + '@types/estree@1.0.6': {} + '@types/estree@1.0.7': {} + '@types/glob@7.2.0': dependencies: '@types/minimatch': 5.1.2 @@ -4635,6 +8440,8 @@ snapshots: '@types/minimatch@5.1.2': {} + '@types/ms@2.1.0': {} + '@types/node@12.20.55': {} '@types/node@20.17.6': @@ -4645,15 +8452,23 @@ snapshots: dependencies: undici-types: 6.20.0 + '@types/node@22.7.5': + dependencies: + undici-types: 6.19.8 + '@types/prop-types@15.7.13': {} '@types/react-dom@18.3.0': dependencies: - '@types/react': 18.3.1 + '@types/react': 19.1.2 '@types/react-dom@18.3.1': dependencies: - '@types/react': 18.3.1 + '@types/react': 19.1.2 + + '@types/react-dom@19.1.2(@types/react@19.1.2)': + dependencies: + '@types/react': 19.1.2 '@types/react@18.3.0': dependencies: @@ -4665,6 +8480,10 @@ snapshots: '@types/prop-types': 15.7.13 csstype: 3.1.3 + '@types/react@19.1.2': + dependencies: + csstype: 3.1.3 + '@types/stack-utils@2.0.3': {} '@types/through@0.0.33': @@ -4673,21 +8492,23 @@ snapshots: '@types/tinycolor2@1.4.6': {} + '@types/trusted-types@2.0.7': {} + '@types/yargs-parser@21.0.3': {} '@types/yargs@17.0.33': dependencies: '@types/yargs-parser': 21.0.3 - '@typescript-eslint/eslint-plugin@8.15.0(@typescript-eslint/parser@8.15.0(eslint@9.15.0)(typescript@5.7.3))(eslint@9.15.0)(typescript@5.7.3)': + '@typescript-eslint/eslint-plugin@8.15.0(@typescript-eslint/parser@8.15.0(eslint@9.15.0(jiti@2.4.2))(typescript@5.7.3))(eslint@9.15.0(jiti@2.4.2))(typescript@5.7.3)': dependencies: '@eslint-community/regexpp': 4.12.1 - '@typescript-eslint/parser': 8.15.0(eslint@9.15.0)(typescript@5.7.3) + '@typescript-eslint/parser': 8.15.0(eslint@9.15.0(jiti@2.4.2))(typescript@5.7.3) '@typescript-eslint/scope-manager': 8.15.0 - '@typescript-eslint/type-utils': 8.15.0(eslint@9.15.0)(typescript@5.7.3) - '@typescript-eslint/utils': 8.15.0(eslint@9.15.0)(typescript@5.7.3) + '@typescript-eslint/type-utils': 8.15.0(eslint@9.15.0(jiti@2.4.2))(typescript@5.7.3) + '@typescript-eslint/utils': 8.15.0(eslint@9.15.0(jiti@2.4.2))(typescript@5.7.3) '@typescript-eslint/visitor-keys': 8.15.0 - eslint: 9.15.0 + eslint: 9.15.0(jiti@2.4.2) graphemer: 1.4.0 ignore: 5.3.2 natural-compare: 1.4.0 @@ -4697,38 +8518,85 @@ snapshots: transitivePeerDependencies: - supports-color - '@typescript-eslint/parser@8.15.0(eslint@9.15.0)(typescript@5.7.3)': + '@typescript-eslint/eslint-plugin@8.30.1(@typescript-eslint/parser@8.30.1(eslint@9.24.0(jiti@2.4.2))(typescript@5.7.3))(eslint@9.24.0(jiti@2.4.2))(typescript@5.7.3)': + dependencies: + '@eslint-community/regexpp': 4.12.1 + '@typescript-eslint/parser': 8.30.1(eslint@9.24.0(jiti@2.4.2))(typescript@5.7.3) + '@typescript-eslint/scope-manager': 8.30.1 + '@typescript-eslint/type-utils': 8.30.1(eslint@9.24.0(jiti@2.4.2))(typescript@5.7.3) + '@typescript-eslint/utils': 8.30.1(eslint@9.24.0(jiti@2.4.2))(typescript@5.7.3) + '@typescript-eslint/visitor-keys': 8.30.1 + eslint: 9.24.0(jiti@2.4.2) + graphemer: 1.4.0 + ignore: 5.3.2 + natural-compare: 1.4.0 + ts-api-utils: 2.1.0(typescript@5.7.3) + typescript: 5.7.3 + transitivePeerDependencies: + - supports-color + + '@typescript-eslint/parser@8.15.0(eslint@9.15.0(jiti@2.4.2))(typescript@5.7.3)': dependencies: '@typescript-eslint/scope-manager': 8.15.0 '@typescript-eslint/types': 8.15.0 '@typescript-eslint/typescript-estree': 8.15.0(typescript@5.7.3) '@typescript-eslint/visitor-keys': 8.15.0 debug: 4.3.7(supports-color@5.5.0) - eslint: 9.15.0 + eslint: 9.15.0(jiti@2.4.2) optionalDependencies: typescript: 5.7.3 transitivePeerDependencies: - supports-color + '@typescript-eslint/parser@8.30.1(eslint@9.24.0(jiti@2.4.2))(typescript@5.7.3)': + dependencies: + '@typescript-eslint/scope-manager': 8.30.1 + '@typescript-eslint/types': 8.30.1 + '@typescript-eslint/typescript-estree': 8.30.1(typescript@5.7.3) + '@typescript-eslint/visitor-keys': 8.30.1 + debug: 4.3.7(supports-color@5.5.0) + eslint: 9.24.0(jiti@2.4.2) + typescript: 5.7.3 + transitivePeerDependencies: + - supports-color + '@typescript-eslint/scope-manager@8.15.0': dependencies: '@typescript-eslint/types': 8.15.0 '@typescript-eslint/visitor-keys': 8.15.0 - '@typescript-eslint/type-utils@8.15.0(eslint@9.15.0)(typescript@5.7.3)': + '@typescript-eslint/scope-manager@8.30.1': + dependencies: + '@typescript-eslint/types': 8.30.1 + '@typescript-eslint/visitor-keys': 8.30.1 + + '@typescript-eslint/type-utils@8.15.0(eslint@9.15.0(jiti@2.4.2))(typescript@5.7.3)': dependencies: '@typescript-eslint/typescript-estree': 8.15.0(typescript@5.7.3) - '@typescript-eslint/utils': 8.15.0(eslint@9.15.0)(typescript@5.7.3) + '@typescript-eslint/utils': 8.15.0(eslint@9.15.0(jiti@2.4.2))(typescript@5.7.3) debug: 4.3.7(supports-color@5.5.0) - eslint: 9.15.0 + eslint: 9.15.0(jiti@2.4.2) ts-api-utils: 1.4.0(typescript@5.7.3) optionalDependencies: typescript: 5.7.3 transitivePeerDependencies: - supports-color + '@typescript-eslint/type-utils@8.30.1(eslint@9.24.0(jiti@2.4.2))(typescript@5.7.3)': + dependencies: + '@typescript-eslint/typescript-estree': 8.30.1(typescript@5.7.3) + '@typescript-eslint/utils': 8.30.1(eslint@9.24.0(jiti@2.4.2))(typescript@5.7.3) + debug: 4.3.7(supports-color@5.5.0) + eslint: 9.24.0(jiti@2.4.2) + ts-api-utils: 2.1.0(typescript@5.7.3) + typescript: 5.7.3 + transitivePeerDependencies: + - supports-color + '@typescript-eslint/types@8.15.0': {} + '@typescript-eslint/types@8.30.1': {} + '@typescript-eslint/typescript-estree@8.15.0(typescript@5.7.3)': dependencies: '@typescript-eslint/types': 8.15.0 @@ -4744,30 +8612,494 @@ snapshots: transitivePeerDependencies: - supports-color - '@typescript-eslint/utils@8.15.0(eslint@9.15.0)(typescript@5.7.3)': + '@typescript-eslint/typescript-estree@8.30.1(typescript@5.7.3)': + dependencies: + '@typescript-eslint/types': 8.30.1 + '@typescript-eslint/visitor-keys': 8.30.1 + debug: 4.3.7(supports-color@5.5.0) + fast-glob: 3.3.2 + is-glob: 4.0.3 + minimatch: 9.0.5 + semver: 7.7.1 + ts-api-utils: 2.1.0(typescript@5.7.3) + typescript: 5.7.3 + transitivePeerDependencies: + - supports-color + + '@typescript-eslint/utils@8.15.0(eslint@9.15.0(jiti@2.4.2))(typescript@5.7.3)': dependencies: - '@eslint-community/eslint-utils': 4.4.1(eslint@9.15.0) + '@eslint-community/eslint-utils': 4.4.1(eslint@9.15.0(jiti@2.4.2)) '@typescript-eslint/scope-manager': 8.15.0 '@typescript-eslint/types': 8.15.0 '@typescript-eslint/typescript-estree': 8.15.0(typescript@5.7.3) - eslint: 9.15.0 + eslint: 9.15.0(jiti@2.4.2) optionalDependencies: typescript: 5.7.3 transitivePeerDependencies: - supports-color + '@typescript-eslint/utils@8.30.1(eslint@9.24.0(jiti@2.4.2))(typescript@5.7.3)': + dependencies: + '@eslint-community/eslint-utils': 4.4.1(eslint@9.24.0(jiti@2.4.2)) + '@typescript-eslint/scope-manager': 8.30.1 + '@typescript-eslint/types': 8.30.1 + '@typescript-eslint/typescript-estree': 8.30.1(typescript@5.7.3) + eslint: 9.24.0(jiti@2.4.2) + typescript: 5.7.3 + transitivePeerDependencies: + - supports-color + '@typescript-eslint/visitor-keys@8.15.0': dependencies: '@typescript-eslint/types': 8.15.0 eslint-visitor-keys: 4.2.0 - abitype@1.0.8(typescript@5.5.4): + '@typescript-eslint/visitor-keys@8.30.1': + dependencies: + '@typescript-eslint/types': 8.30.1 + eslint-visitor-keys: 4.2.0 + + '@vitejs/plugin-react@4.3.4(vite@6.2.6(@types/node@22.13.9)(jiti@2.4.2)(lightningcss@1.29.2))': + dependencies: + '@babel/core': 7.26.9 + '@babel/plugin-transform-react-jsx-self': 7.25.9(@babel/core@7.26.9) + '@babel/plugin-transform-react-jsx-source': 7.25.9(@babel/core@7.26.9) + '@types/babel__core': 7.20.5 + react-refresh: 0.14.2 + vite: 6.2.6(@types/node@22.13.9)(jiti@2.4.2)(lightningcss@1.29.2) + transitivePeerDependencies: + - supports-color + + '@wagmi/connectors@5.7.12(@types/react@19.1.2)(@wagmi/core@2.16.7(@tanstack/query-core@5.74.3)(@types/react@19.1.2)(react@19.0.0)(typescript@5.7.3)(use-sync-external-store@1.4.0(react@19.0.0))(viem@2.27.0(bufferutil@4.0.9)(typescript@5.7.3)(utf-8-validate@5.0.10)(zod@3.24.2)))(bufferutil@4.0.9)(react@19.0.0)(typescript@5.7.3)(utf-8-validate@5.0.10)(viem@2.27.0(bufferutil@4.0.9)(typescript@5.7.3)(utf-8-validate@5.0.10)(zod@3.24.2))(zod@3.24.2)': + dependencies: + '@coinbase/wallet-sdk': 4.3.0 + '@metamask/sdk': 0.32.0(bufferutil@4.0.9)(utf-8-validate@5.0.10) + '@safe-global/safe-apps-provider': 0.18.5(bufferutil@4.0.9)(typescript@5.7.3)(utf-8-validate@5.0.10)(zod@3.24.2) + '@safe-global/safe-apps-sdk': 9.1.0(bufferutil@4.0.9)(typescript@5.7.3)(utf-8-validate@5.0.10)(zod@3.24.2) + '@wagmi/core': 2.16.7(@tanstack/query-core@5.74.3)(@types/react@19.1.2)(react@19.0.0)(typescript@5.7.3)(use-sync-external-store@1.4.0(react@19.0.0))(viem@2.27.0(bufferutil@4.0.9)(typescript@5.7.3)(utf-8-validate@5.0.10)(zod@3.24.2)) + '@walletconnect/ethereum-provider': 2.19.2(@types/react@19.1.2)(bufferutil@4.0.9)(react@19.0.0)(typescript@5.7.3)(utf-8-validate@5.0.10)(zod@3.24.2) + cbw-sdk: '@coinbase/wallet-sdk@3.9.3' + viem: 2.27.0(bufferutil@4.0.9)(typescript@5.7.3)(utf-8-validate@5.0.10)(zod@3.24.2) + optionalDependencies: + typescript: 5.7.3 + transitivePeerDependencies: + - '@azure/app-configuration' + - '@azure/cosmos' + - '@azure/data-tables' + - '@azure/identity' + - '@azure/keyvault-secrets' + - '@azure/storage-blob' + - '@capacitor/preferences' + - '@deno/kv' + - '@netlify/blobs' + - '@planetscale/database' + - '@react-native-async-storage/async-storage' + - '@types/react' + - '@upstash/redis' + - '@vercel/blob' + - '@vercel/kv' + - aws4fetch + - bufferutil + - db0 + - encoding + - ioredis + - react + - supports-color + - uploadthing + - utf-8-validate + - zod + + '@wagmi/core@2.16.7(@tanstack/query-core@5.74.3)(@types/react@19.1.2)(react@19.0.0)(typescript@5.7.3)(use-sync-external-store@1.4.0(react@19.0.0))(viem@2.27.0(bufferutil@4.0.9)(typescript@5.7.3)(utf-8-validate@5.0.10)(zod@3.24.2))': + dependencies: + eventemitter3: 5.0.1 + mipd: 0.0.7(typescript@5.7.3) + viem: 2.27.0(bufferutil@4.0.9)(typescript@5.7.3)(utf-8-validate@5.0.10)(zod@3.24.2) + zustand: 5.0.0(@types/react@19.1.2)(react@19.0.0)(use-sync-external-store@1.4.0(react@19.0.0)) + optionalDependencies: + '@tanstack/query-core': 5.74.3 + typescript: 5.7.3 + transitivePeerDependencies: + - '@types/react' + - immer + - react + - use-sync-external-store + + '@walletconnect/core@2.19.2(bufferutil@4.0.9)(typescript@5.7.3)(utf-8-validate@5.0.10)(zod@3.24.2)': + dependencies: + '@walletconnect/heartbeat': 1.2.2 + '@walletconnect/jsonrpc-provider': 1.0.14 + '@walletconnect/jsonrpc-types': 1.0.4 + '@walletconnect/jsonrpc-utils': 1.0.8 + '@walletconnect/jsonrpc-ws-connection': 1.0.16(bufferutil@4.0.9)(utf-8-validate@5.0.10) + '@walletconnect/keyvaluestorage': 1.1.1 + '@walletconnect/logger': 2.1.2 + '@walletconnect/relay-api': 1.0.11 + '@walletconnect/relay-auth': 1.1.0 + '@walletconnect/safe-json': 1.0.2 + '@walletconnect/time': 1.0.2 + '@walletconnect/types': 2.19.2 + '@walletconnect/utils': 2.19.2(bufferutil@4.0.9)(typescript@5.7.3)(utf-8-validate@5.0.10)(zod@3.24.2) + '@walletconnect/window-getters': 1.0.1 + es-toolkit: 1.33.0 + events: 3.3.0 + uint8arrays: 3.1.0 + transitivePeerDependencies: + - '@azure/app-configuration' + - '@azure/cosmos' + - '@azure/data-tables' + - '@azure/identity' + - '@azure/keyvault-secrets' + - '@azure/storage-blob' + - '@capacitor/preferences' + - '@deno/kv' + - '@netlify/blobs' + - '@planetscale/database' + - '@react-native-async-storage/async-storage' + - '@upstash/redis' + - '@vercel/blob' + - '@vercel/kv' + - aws4fetch + - bufferutil + - db0 + - ioredis + - typescript + - uploadthing + - utf-8-validate + - zod + + '@walletconnect/environment@1.0.1': + dependencies: + tslib: 1.14.1 + + '@walletconnect/ethereum-provider@2.19.2(@types/react@19.1.2)(bufferutil@4.0.9)(react@19.0.0)(typescript@5.7.3)(utf-8-validate@5.0.10)(zod@3.24.2)': + dependencies: + '@walletconnect/jsonrpc-http-connection': 1.0.8 + '@walletconnect/jsonrpc-provider': 1.0.14 + '@walletconnect/jsonrpc-types': 1.0.4 + '@walletconnect/jsonrpc-utils': 1.0.8 + '@walletconnect/keyvaluestorage': 1.1.1 + '@walletconnect/modal': 2.7.0(@types/react@19.1.2)(react@19.0.0) + '@walletconnect/sign-client': 2.19.2(bufferutil@4.0.9)(typescript@5.7.3)(utf-8-validate@5.0.10)(zod@3.24.2) + '@walletconnect/types': 2.19.2 + '@walletconnect/universal-provider': 2.19.2(bufferutil@4.0.9)(typescript@5.7.3)(utf-8-validate@5.0.10)(zod@3.24.2) + '@walletconnect/utils': 2.19.2(bufferutil@4.0.9)(typescript@5.7.3)(utf-8-validate@5.0.10)(zod@3.24.2) + events: 3.3.0 + transitivePeerDependencies: + - '@azure/app-configuration' + - '@azure/cosmos' + - '@azure/data-tables' + - '@azure/identity' + - '@azure/keyvault-secrets' + - '@azure/storage-blob' + - '@capacitor/preferences' + - '@deno/kv' + - '@netlify/blobs' + - '@planetscale/database' + - '@react-native-async-storage/async-storage' + - '@types/react' + - '@upstash/redis' + - '@vercel/blob' + - '@vercel/kv' + - aws4fetch + - bufferutil + - db0 + - encoding + - ioredis + - react + - typescript + - uploadthing + - utf-8-validate + - zod + + '@walletconnect/events@1.0.1': + dependencies: + keyvaluestorage-interface: 1.0.0 + tslib: 1.14.1 + + '@walletconnect/heartbeat@1.2.2': + dependencies: + '@walletconnect/events': 1.0.1 + '@walletconnect/time': 1.0.2 + events: 3.3.0 + + '@walletconnect/jsonrpc-http-connection@1.0.8': + dependencies: + '@walletconnect/jsonrpc-utils': 1.0.8 + '@walletconnect/safe-json': 1.0.2 + cross-fetch: 3.2.0 + events: 3.3.0 + transitivePeerDependencies: + - encoding + + '@walletconnect/jsonrpc-provider@1.0.14': + dependencies: + '@walletconnect/jsonrpc-utils': 1.0.8 + '@walletconnect/safe-json': 1.0.2 + events: 3.3.0 + + '@walletconnect/jsonrpc-types@1.0.4': + dependencies: + events: 3.3.0 + keyvaluestorage-interface: 1.0.0 + + '@walletconnect/jsonrpc-utils@1.0.8': + dependencies: + '@walletconnect/environment': 1.0.1 + '@walletconnect/jsonrpc-types': 1.0.4 + tslib: 1.14.1 + + '@walletconnect/jsonrpc-ws-connection@1.0.16(bufferutil@4.0.9)(utf-8-validate@5.0.10)': + dependencies: + '@walletconnect/jsonrpc-utils': 1.0.8 + '@walletconnect/safe-json': 1.0.2 + events: 3.3.0 + ws: 7.5.10(bufferutil@4.0.9)(utf-8-validate@5.0.10) + transitivePeerDependencies: + - bufferutil + - utf-8-validate + + '@walletconnect/keyvaluestorage@1.1.1': + dependencies: + '@walletconnect/safe-json': 1.0.2 + idb-keyval: 6.2.1 + unstorage: 1.15.0(idb-keyval@6.2.1) + transitivePeerDependencies: + - '@azure/app-configuration' + - '@azure/cosmos' + - '@azure/data-tables' + - '@azure/identity' + - '@azure/keyvault-secrets' + - '@azure/storage-blob' + - '@capacitor/preferences' + - '@deno/kv' + - '@netlify/blobs' + - '@planetscale/database' + - '@upstash/redis' + - '@vercel/blob' + - '@vercel/kv' + - aws4fetch + - db0 + - ioredis + - uploadthing + + '@walletconnect/logger@2.1.2': + dependencies: + '@walletconnect/safe-json': 1.0.2 + pino: 7.11.0 + + '@walletconnect/modal-core@2.7.0(@types/react@19.1.2)(react@19.0.0)': + dependencies: + valtio: 1.11.2(@types/react@19.1.2)(react@19.0.0) + transitivePeerDependencies: + - '@types/react' + - react + + '@walletconnect/modal-ui@2.7.0(@types/react@19.1.2)(react@19.0.0)': + dependencies: + '@walletconnect/modal-core': 2.7.0(@types/react@19.1.2)(react@19.0.0) + lit: 2.8.0 + motion: 10.16.2 + qrcode: 1.5.3 + transitivePeerDependencies: + - '@types/react' + - react + + '@walletconnect/modal@2.7.0(@types/react@19.1.2)(react@19.0.0)': + dependencies: + '@walletconnect/modal-core': 2.7.0(@types/react@19.1.2)(react@19.0.0) + '@walletconnect/modal-ui': 2.7.0(@types/react@19.1.2)(react@19.0.0) + transitivePeerDependencies: + - '@types/react' + - react + + '@walletconnect/relay-api@1.0.11': + dependencies: + '@walletconnect/jsonrpc-types': 1.0.4 + + '@walletconnect/relay-auth@1.1.0': + dependencies: + '@noble/curves': 1.8.0 + '@noble/hashes': 1.7.0 + '@walletconnect/safe-json': 1.0.2 + '@walletconnect/time': 1.0.2 + uint8arrays: 3.1.0 + + '@walletconnect/safe-json@1.0.2': + dependencies: + tslib: 1.14.1 + + '@walletconnect/sign-client@2.19.2(bufferutil@4.0.9)(typescript@5.7.3)(utf-8-validate@5.0.10)(zod@3.24.2)': + dependencies: + '@walletconnect/core': 2.19.2(bufferutil@4.0.9)(typescript@5.7.3)(utf-8-validate@5.0.10)(zod@3.24.2) + '@walletconnect/events': 1.0.1 + '@walletconnect/heartbeat': 1.2.2 + '@walletconnect/jsonrpc-utils': 1.0.8 + '@walletconnect/logger': 2.1.2 + '@walletconnect/time': 1.0.2 + '@walletconnect/types': 2.19.2 + '@walletconnect/utils': 2.19.2(bufferutil@4.0.9)(typescript@5.7.3)(utf-8-validate@5.0.10)(zod@3.24.2) + events: 3.3.0 + transitivePeerDependencies: + - '@azure/app-configuration' + - '@azure/cosmos' + - '@azure/data-tables' + - '@azure/identity' + - '@azure/keyvault-secrets' + - '@azure/storage-blob' + - '@capacitor/preferences' + - '@deno/kv' + - '@netlify/blobs' + - '@planetscale/database' + - '@react-native-async-storage/async-storage' + - '@upstash/redis' + - '@vercel/blob' + - '@vercel/kv' + - aws4fetch + - bufferutil + - db0 + - ioredis + - typescript + - uploadthing + - utf-8-validate + - zod + + '@walletconnect/time@1.0.2': + dependencies: + tslib: 1.14.1 + + '@walletconnect/types@2.19.2': + dependencies: + '@walletconnect/events': 1.0.1 + '@walletconnect/heartbeat': 1.2.2 + '@walletconnect/jsonrpc-types': 1.0.4 + '@walletconnect/keyvaluestorage': 1.1.1 + '@walletconnect/logger': 2.1.2 + events: 3.3.0 + transitivePeerDependencies: + - '@azure/app-configuration' + - '@azure/cosmos' + - '@azure/data-tables' + - '@azure/identity' + - '@azure/keyvault-secrets' + - '@azure/storage-blob' + - '@capacitor/preferences' + - '@deno/kv' + - '@netlify/blobs' + - '@planetscale/database' + - '@react-native-async-storage/async-storage' + - '@upstash/redis' + - '@vercel/blob' + - '@vercel/kv' + - aws4fetch + - db0 + - ioredis + - uploadthing + + '@walletconnect/universal-provider@2.19.2(bufferutil@4.0.9)(typescript@5.7.3)(utf-8-validate@5.0.10)(zod@3.24.2)': + dependencies: + '@walletconnect/events': 1.0.1 + '@walletconnect/jsonrpc-http-connection': 1.0.8 + '@walletconnect/jsonrpc-provider': 1.0.14 + '@walletconnect/jsonrpc-types': 1.0.4 + '@walletconnect/jsonrpc-utils': 1.0.8 + '@walletconnect/keyvaluestorage': 1.1.1 + '@walletconnect/logger': 2.1.2 + '@walletconnect/sign-client': 2.19.2(bufferutil@4.0.9)(typescript@5.7.3)(utf-8-validate@5.0.10)(zod@3.24.2) + '@walletconnect/types': 2.19.2 + '@walletconnect/utils': 2.19.2(bufferutil@4.0.9)(typescript@5.7.3)(utf-8-validate@5.0.10)(zod@3.24.2) + es-toolkit: 1.33.0 + events: 3.3.0 + transitivePeerDependencies: + - '@azure/app-configuration' + - '@azure/cosmos' + - '@azure/data-tables' + - '@azure/identity' + - '@azure/keyvault-secrets' + - '@azure/storage-blob' + - '@capacitor/preferences' + - '@deno/kv' + - '@netlify/blobs' + - '@planetscale/database' + - '@react-native-async-storage/async-storage' + - '@upstash/redis' + - '@vercel/blob' + - '@vercel/kv' + - aws4fetch + - bufferutil + - db0 + - encoding + - ioredis + - typescript + - uploadthing + - utf-8-validate + - zod + + '@walletconnect/utils@2.19.2(bufferutil@4.0.9)(typescript@5.7.3)(utf-8-validate@5.0.10)(zod@3.24.2)': + dependencies: + '@noble/ciphers': 1.2.1 + '@noble/curves': 1.8.1 + '@noble/hashes': 1.7.1 + '@walletconnect/jsonrpc-utils': 1.0.8 + '@walletconnect/keyvaluestorage': 1.1.1 + '@walletconnect/relay-api': 1.0.11 + '@walletconnect/relay-auth': 1.1.0 + '@walletconnect/safe-json': 1.0.2 + '@walletconnect/time': 1.0.2 + '@walletconnect/types': 2.19.2 + '@walletconnect/window-getters': 1.0.1 + '@walletconnect/window-metadata': 1.0.1 + bs58: 6.0.0 + detect-browser: 5.3.0 + query-string: 7.1.3 + uint8arrays: 3.1.0 + viem: 2.23.2(bufferutil@4.0.9)(typescript@5.7.3)(utf-8-validate@5.0.10)(zod@3.24.2) + transitivePeerDependencies: + - '@azure/app-configuration' + - '@azure/cosmos' + - '@azure/data-tables' + - '@azure/identity' + - '@azure/keyvault-secrets' + - '@azure/storage-blob' + - '@capacitor/preferences' + - '@deno/kv' + - '@netlify/blobs' + - '@planetscale/database' + - '@react-native-async-storage/async-storage' + - '@upstash/redis' + - '@vercel/blob' + - '@vercel/kv' + - aws4fetch + - bufferutil + - db0 + - ioredis + - typescript + - uploadthing + - utf-8-validate + - zod + + '@walletconnect/window-getters@1.0.1': + dependencies: + tslib: 1.14.1 + + '@walletconnect/window-metadata@1.0.1': + dependencies: + '@walletconnect/window-getters': 1.0.1 + tslib: 1.14.1 + + abitype@1.0.8(typescript@5.5.4)(zod@3.24.2): optionalDependencies: typescript: 5.5.4 + zod: 3.24.2 + + abitype@1.0.8(typescript@5.7.3)(zod@3.24.2): + optionalDependencies: + typescript: 5.7.3 + zod: 3.24.2 - abitype@1.0.8(typescript@5.8.3): + abitype@1.0.8(typescript@5.8.3)(zod@3.24.2): optionalDependencies: typescript: 5.8.3 + zod: 3.24.2 acorn-jsx@5.3.2(acorn@8.14.0): dependencies: @@ -4779,6 +9111,8 @@ snapshots: acorn@8.14.0: {} + aes-js@4.0.0-beta.5: {} + agent-base@7.1.1: dependencies: debug: 4.3.7(supports-color@5.5.0) @@ -4805,6 +9139,8 @@ snapshots: ansi-regex@5.0.1: {} + ansi-regex@6.1.0: {} + ansi-styles@3.2.1: dependencies: color-convert: 1.9.3 @@ -4815,6 +9151,8 @@ snapshots: ansi-styles@5.2.0: {} + ansi-styles@6.2.1: {} + anymatch@3.1.3: dependencies: normalize-path: 3.0.0 @@ -4828,6 +9166,10 @@ snapshots: argparse@2.0.1: {} + aria-hidden@1.2.4: + dependencies: + tslib: 2.8.1 + array-buffer-byte-length@1.0.1: dependencies: call-bind: 1.0.7 @@ -4890,8 +9232,14 @@ snapshots: dependencies: tslib: 2.8.1 + async-mutex@0.2.6: + dependencies: + tslib: 2.8.1 + async@3.2.6: {} + atomic-sleep@1.0.0: {} + available-typed-arrays@1.0.7: dependencies: possible-typed-array-names: 1.0.0 @@ -4953,6 +9301,8 @@ snapshots: balanced-match@1.0.2: {} + base-x@5.0.1: {} + base64-js@1.5.1: {} basic-ftp@5.0.5: {} @@ -4969,6 +9319,10 @@ snapshots: inherits: 2.0.4 readable-stream: 3.6.2 + bn.js@5.2.1: {} + + bowser@2.11.0: {} + brace-expansion@1.1.11: dependencies: balanced-match: 1.0.2 @@ -4993,21 +9347,39 @@ snapshots: dependencies: fast-json-stable-stringify: 2.1.0 + bs58@6.0.0: + dependencies: + base-x: 5.0.1 + bser@2.1.1: dependencies: node-int64: 0.4.0 buffer-from@1.1.2: {} - buffer@5.7.1: + buffer@5.7.1: + dependencies: + base64-js: 1.5.1 + ieee754: 1.2.1 + + buffer@6.0.3: dependencies: base64-js: 1.5.1 ieee754: 1.2.1 + bufferutil@4.0.9: + dependencies: + node-gyp-build: 4.8.4 + busboy@1.6.0: dependencies: streamsearch: 1.1.0 + call-bind-apply-helpers@1.0.2: + dependencies: + es-errors: 1.3.0 + function-bind: 1.1.2 + call-bind@1.0.7: dependencies: es-define-property: 1.0.0 @@ -5016,6 +9388,11 @@ snapshots: get-intrinsic: 1.2.4 set-function-length: 1.2.2 + call-bound@1.0.4: + dependencies: + call-bind-apply-helpers: 1.0.2 + get-intrinsic: 1.3.0 + callsites@3.1.0: {} camel-case@3.0.0: @@ -5082,10 +9459,18 @@ snapshots: optionalDependencies: fsevents: 2.3.3 + chokidar@4.0.3: + dependencies: + readdirp: 4.1.2 + ci-info@3.9.0: {} cjs-module-lexer@1.4.3: {} + class-variance-authority@0.7.1: + dependencies: + clsx: 2.1.1 + clean-stack@2.2.0: {} cli-cursor@3.1.0: @@ -5098,6 +9483,12 @@ snapshots: client-only@0.0.1: {} + cliui@6.0.0: + dependencies: + string-width: 4.2.3 + strip-ansi: 6.0.1 + wrap-ansi: 6.2.0 + cliui@8.0.1: dependencies: string-width: 4.2.3 @@ -5106,6 +9497,10 @@ snapshots: clone@1.0.4: {} + clsx@1.2.1: {} + + clsx@2.1.1: {} + co@4.6.0: {} collect-v8-coverage@1.0.2: {} @@ -5157,8 +9552,20 @@ snapshots: convert-source-map@2.0.0: {} + cookie-es@1.2.2: {} + + cookie@1.0.2: {} + + copy-to-clipboard@3.3.3: + dependencies: + toggle-selection: 1.0.6 + core-js-pure@3.39.0: {} + core-util-is@1.0.3: {} + + crc-32@1.2.2: {} + create-jest@29.7.0(@types/node@22.13.9)(ts-node@10.9.2(@types/node@22.13.9)(typescript@5.8.3)): dependencies: '@jest/types': 29.6.3 @@ -5176,12 +9583,28 @@ snapshots: create-require@1.1.1: {} + cross-fetch@3.2.0: + dependencies: + node-fetch: 2.7.0 + transitivePeerDependencies: + - encoding + + cross-fetch@4.1.0: + dependencies: + node-fetch: 2.7.0 + transitivePeerDependencies: + - encoding + cross-spawn@7.0.6: dependencies: path-key: 3.1.1 shebang-command: 2.0.0 which: 2.0.2 + crossws@0.3.4: + dependencies: + uncrypto: 0.1.3 + csstype@3.1.3: {} data-uri-to-buffer@6.0.2: {} @@ -5214,6 +9637,10 @@ snapshots: optionalDependencies: supports-color: 5.5.0 + decamelize@1.2.0: {} + + decode-uri-component@0.2.2: {} + dedent@1.5.3: {} deep-extend@0.6.0: {} @@ -5238,6 +9665,8 @@ snapshots: has-property-descriptors: 1.0.2 object-keys: 1.1.1 + defu@6.1.4: {} + degenerator@5.0.1: dependencies: ast-types: 0.13.4 @@ -5255,17 +9684,24 @@ snapshots: rimraf: 3.0.2 slash: 3.0.0 + destr@2.0.5: {} + + detect-browser@5.3.0: {} + detect-indent@6.1.0: {} - detect-libc@2.0.3: - optional: true + detect-libc@2.0.3: {} detect-newline@3.1.0: {} + detect-node-es@1.1.0: {} + diff-sequences@29.6.3: {} diff@4.0.2: {} + dijkstrajs@1.0.3: {} + dir-glob@3.0.1: dependencies: path-type: 4.0.0 @@ -5282,6 +9718,28 @@ snapshots: dotenv@16.4.7: {} + dunder-proto@1.0.1: + dependencies: + call-bind-apply-helpers: 1.0.2 + es-errors: 1.3.0 + gopd: 1.2.0 + + duplexify@4.1.3: + dependencies: + end-of-stream: 1.4.4 + inherits: 2.0.4 + readable-stream: 3.6.2 + stream-shift: 1.0.3 + + eastasianwidth@0.2.0: {} + + eciesjs@0.4.14: + dependencies: + '@ecies/ciphers': 0.2.3(@noble/ciphers@1.2.1) + '@noble/ciphers': 1.2.1 + '@noble/curves': 1.8.1 + '@noble/hashes': 1.7.1 + ejs@3.1.10: dependencies: jake: 10.9.2 @@ -5292,6 +9750,33 @@ snapshots: emoji-regex@8.0.0: {} + emoji-regex@9.2.2: {} + + encode-utf8@1.0.3: {} + + end-of-stream@1.4.4: + dependencies: + once: 1.4.0 + + engine.io-client@6.6.3(bufferutil@4.0.9)(utf-8-validate@5.0.10): + dependencies: + '@socket.io/component-emitter': 3.1.2 + debug: 4.3.7(supports-color@5.5.0) + engine.io-parser: 5.2.3 + ws: 8.17.1(bufferutil@4.0.9)(utf-8-validate@5.0.10) + xmlhttprequest-ssl: 2.1.2 + transitivePeerDependencies: + - bufferutil + - supports-color + - utf-8-validate + + engine.io-parser@5.2.3: {} + + enhanced-resolve@5.18.1: + dependencies: + graceful-fs: 4.2.11 + tapable: 2.2.1 + enquirer@2.4.1: dependencies: ansi-colors: 4.1.3 @@ -5354,6 +9839,8 @@ snapshots: dependencies: get-intrinsic: 1.2.4 + es-define-property@1.0.1: {} + es-errors@1.3.0: {} es-iterator-helpers@1.2.0: @@ -5378,6 +9865,10 @@ snapshots: dependencies: es-errors: 1.3.0 + es-object-atoms@1.1.1: + dependencies: + es-errors: 1.3.0 + es-set-tostringtag@2.0.3: dependencies: get-intrinsic: 1.2.4 @@ -5394,6 +9885,8 @@ snapshots: is-date-object: 1.0.5 is-symbol: 1.0.4 + es-toolkit@1.33.0: {} + esbuild@0.24.2: optionalDependencies: '@esbuild/aix-ppc64': 0.24.2 @@ -5422,6 +9915,34 @@ snapshots: '@esbuild/win32-ia32': 0.24.2 '@esbuild/win32-x64': 0.24.2 + esbuild@0.25.2: + optionalDependencies: + '@esbuild/aix-ppc64': 0.25.2 + '@esbuild/android-arm': 0.25.2 + '@esbuild/android-arm64': 0.25.2 + '@esbuild/android-x64': 0.25.2 + '@esbuild/darwin-arm64': 0.25.2 + '@esbuild/darwin-x64': 0.25.2 + '@esbuild/freebsd-arm64': 0.25.2 + '@esbuild/freebsd-x64': 0.25.2 + '@esbuild/linux-arm': 0.25.2 + '@esbuild/linux-arm64': 0.25.2 + '@esbuild/linux-ia32': 0.25.2 + '@esbuild/linux-loong64': 0.25.2 + '@esbuild/linux-mips64el': 0.25.2 + '@esbuild/linux-ppc64': 0.25.2 + '@esbuild/linux-riscv64': 0.25.2 + '@esbuild/linux-s390x': 0.25.2 + '@esbuild/linux-x64': 0.25.2 + '@esbuild/netbsd-arm64': 0.25.2 + '@esbuild/netbsd-x64': 0.25.2 + '@esbuild/openbsd-arm64': 0.25.2 + '@esbuild/openbsd-x64': 0.25.2 + '@esbuild/sunos-x64': 0.25.2 + '@esbuild/win32-arm64': 0.25.2 + '@esbuild/win32-ia32': 0.25.2 + '@esbuild/win32-x64': 0.25.2 + escalade@3.2.0: {} escape-string-regexp@1.0.5: {} @@ -5438,17 +9959,25 @@ snapshots: optionalDependencies: source-map: 0.6.1 - eslint-config-prettier@9.1.0(eslint@9.15.0): + eslint-config-prettier@9.1.0(eslint@9.15.0(jiti@2.4.2)): dependencies: - eslint: 9.15.0 + eslint: 9.15.0(jiti@2.4.2) eslint-plugin-only-warn@1.1.0: {} - eslint-plugin-react-hooks@5.0.0(eslint@9.15.0): + eslint-plugin-react-hooks@5.0.0(eslint@9.15.0(jiti@2.4.2)): + dependencies: + eslint: 9.15.0(jiti@2.4.2) + + eslint-plugin-react-hooks@5.2.0(eslint@9.24.0(jiti@2.4.2)): + dependencies: + eslint: 9.24.0(jiti@2.4.2) + + eslint-plugin-react-refresh@0.4.19(eslint@9.24.0(jiti@2.4.2)): dependencies: - eslint: 9.15.0 + eslint: 9.24.0(jiti@2.4.2) - eslint-plugin-react@7.37.2(eslint@9.15.0): + eslint-plugin-react@7.37.2(eslint@9.15.0(jiti@2.4.2)): dependencies: array-includes: 3.1.8 array.prototype.findlast: 1.2.5 @@ -5456,7 +9985,7 @@ snapshots: array.prototype.tosorted: 1.1.4 doctrine: 2.1.0 es-iterator-helpers: 1.2.0 - eslint: 9.15.0 + eslint: 9.15.0(jiti@2.4.2) estraverse: 5.3.0 hasown: 2.0.2 jsx-ast-utils: 3.3.5 @@ -5470,23 +9999,28 @@ snapshots: string.prototype.matchall: 4.0.11 string.prototype.repeat: 1.0.0 - eslint-plugin-turbo@2.3.1(eslint@9.15.0): + eslint-plugin-turbo@2.3.1(eslint@9.15.0(jiti@2.4.2)): dependencies: dotenv: 16.0.3 - eslint: 9.15.0 + eslint: 9.15.0(jiti@2.4.2) eslint-scope@8.2.0: dependencies: esrecurse: 4.3.0 estraverse: 5.3.0 + eslint-scope@8.3.0: + dependencies: + esrecurse: 4.3.0 + estraverse: 5.3.0 + eslint-visitor-keys@3.4.3: {} eslint-visitor-keys@4.2.0: {} - eslint@9.15.0: + eslint@9.15.0(jiti@2.4.2): dependencies: - '@eslint-community/eslint-utils': 4.4.1(eslint@9.15.0) + '@eslint-community/eslint-utils': 4.4.1(eslint@9.15.0(jiti@2.4.2)) '@eslint-community/regexpp': 4.12.1 '@eslint/config-array': 0.19.0 '@eslint/core': 0.9.0 @@ -5520,6 +10054,50 @@ snapshots: minimatch: 3.1.2 natural-compare: 1.4.0 optionator: 0.9.4 + optionalDependencies: + jiti: 2.4.2 + transitivePeerDependencies: + - supports-color + + eslint@9.24.0(jiti@2.4.2): + dependencies: + '@eslint-community/eslint-utils': 4.4.1(eslint@9.24.0(jiti@2.4.2)) + '@eslint-community/regexpp': 4.12.1 + '@eslint/config-array': 0.20.0 + '@eslint/config-helpers': 0.2.1 + '@eslint/core': 0.12.0 + '@eslint/eslintrc': 3.3.1 + '@eslint/js': 9.24.0 + '@eslint/plugin-kit': 0.2.8 + '@humanfs/node': 0.16.6 + '@humanwhocodes/module-importer': 1.0.1 + '@humanwhocodes/retry': 0.4.2 + '@types/estree': 1.0.6 + '@types/json-schema': 7.0.15 + ajv: 6.12.6 + chalk: 4.1.2 + cross-spawn: 7.0.6 + debug: 4.3.7(supports-color@5.5.0) + escape-string-regexp: 4.0.0 + eslint-scope: 8.3.0 + eslint-visitor-keys: 4.2.0 + espree: 10.3.0 + esquery: 1.6.0 + esutils: 2.0.3 + fast-deep-equal: 3.1.3 + file-entry-cache: 8.0.0 + find-up: 5.0.0 + glob-parent: 6.0.2 + ignore: 5.3.2 + imurmurhash: 0.1.4 + is-glob: 4.0.3 + json-stable-stringify-without-jsonify: 1.0.1 + lodash.merge: 4.6.2 + minimatch: 3.1.2 + natural-compare: 1.4.0 + optionator: 0.9.4 + optionalDependencies: + jiti: 2.4.2 transitivePeerDependencies: - supports-color @@ -5543,8 +10121,59 @@ snapshots: esutils@2.0.3: {} + eth-block-tracker@7.1.0: + dependencies: + '@metamask/eth-json-rpc-provider': 1.0.1 + '@metamask/safe-event-emitter': 3.1.2 + '@metamask/utils': 5.0.2 + json-rpc-random-id: 1.0.1 + pify: 3.0.0 + transitivePeerDependencies: + - supports-color + + eth-json-rpc-filters@6.0.1: + dependencies: + '@metamask/safe-event-emitter': 3.1.2 + async-mutex: 0.2.6 + eth-query: 2.1.2 + json-rpc-engine: 6.1.0 + pify: 5.0.0 + + eth-query@2.1.2: + dependencies: + json-rpc-random-id: 1.0.1 + xtend: 4.0.2 + + eth-rpc-errors@4.0.3: + dependencies: + fast-safe-stringify: 2.1.1 + + ethereum-cryptography@2.2.1: + dependencies: + '@noble/curves': 1.4.2 + '@noble/hashes': 1.4.0 + '@scure/bip32': 1.4.0 + '@scure/bip39': 1.3.0 + + ethers@6.13.5(bufferutil@4.0.9)(utf-8-validate@5.0.10): + dependencies: + '@adraffy/ens-normalize': 1.10.1 + '@noble/curves': 1.2.0 + '@noble/hashes': 1.3.2 + '@types/node': 22.7.5 + aes-js: 4.0.0-beta.5 + tslib: 2.7.0 + ws: 8.17.1(bufferutil@4.0.9)(utf-8-validate@5.0.10) + transitivePeerDependencies: + - bufferutil + - utf-8-validate + + eventemitter2@6.4.9: {} + eventemitter3@5.0.1: {} + events@3.3.0: {} + execa@5.1.1: dependencies: cross-spawn: 7.0.6 @@ -5569,6 +10198,11 @@ snapshots: extendable-error@0.1.7: {} + extension-port-stream@3.0.0: + dependencies: + readable-stream: 3.6.2 + webextension-polyfill: 0.10.0 + external-editor@3.1.0: dependencies: chardet: 0.7.0 @@ -5597,6 +10231,10 @@ snapshots: fast-levenshtein@2.0.6: {} + fast-redact@3.5.0: {} + + fast-safe-stringify@2.1.1: {} + fastq@1.17.1: dependencies: reusify: 1.0.4 @@ -5621,6 +10259,8 @@ snapshots: dependencies: to-regex-range: 5.0.1 + filter-obj@1.1.0: {} + find-up@4.1.0: dependencies: locate-path: 5.0.0 @@ -5642,6 +10282,20 @@ snapshots: dependencies: is-callable: 1.2.7 + foreground-child@3.3.1: + dependencies: + cross-spawn: 7.0.6 + signal-exit: 4.1.0 + + framer-motion@12.7.2(react-dom@19.0.0(react@19.0.0))(react@19.0.0): + dependencies: + motion-dom: 12.7.2 + motion-utils: 12.7.2 + tslib: 2.8.1 + optionalDependencies: + react: 19.0.0 + react-dom: 19.0.0(react@19.0.0) + fs-extra@10.1.0: dependencies: graceful-fs: 4.2.11 @@ -5694,8 +10348,28 @@ snapshots: has-symbols: 1.0.3 hasown: 2.0.2 + get-intrinsic@1.3.0: + dependencies: + call-bind-apply-helpers: 1.0.2 + es-define-property: 1.0.1 + es-errors: 1.3.0 + es-object-atoms: 1.1.1 + function-bind: 1.1.2 + get-proto: 1.0.1 + gopd: 1.2.0 + has-symbols: 1.1.0 + hasown: 2.0.2 + math-intrinsics: 1.1.0 + + get-nonce@1.0.1: {} + get-package-type@0.1.0: {} + get-proto@1.0.1: + dependencies: + dunder-proto: 1.0.1 + es-object-atoms: 1.1.1 + get-stream@6.0.1: {} get-symbol-description@1.0.2: @@ -5721,6 +10395,15 @@ snapshots: dependencies: is-glob: 4.0.3 + glob@11.0.1: + dependencies: + foreground-child: 3.3.1 + jackspeak: 4.1.0 + minimatch: 10.0.1 + minipass: 7.1.2 + package-json-from-dist: 1.0.1 + path-scurry: 2.0.0 + glob@7.2.3: dependencies: fs.realpath: 1.0.0 @@ -5736,6 +10419,8 @@ snapshots: globals@15.12.0: {} + globals@15.15.0: {} + globalthis@1.0.4: dependencies: define-properties: 1.2.1 @@ -5765,6 +10450,8 @@ snapshots: dependencies: get-intrinsic: 1.2.4 + gopd@1.2.0: {} + graceful-fs@4.2.11: {} gradient-string@2.0.2: @@ -5774,6 +10461,18 @@ snapshots: graphemer@1.4.0: {} + h3@1.15.1: + dependencies: + cookie-es: 1.2.2 + crossws: 0.3.4 + defu: 6.1.4 + destr: 2.0.5 + iron-webcrypto: 1.2.1 + node-mock-http: 1.0.0 + radix3: 1.1.2 + ufo: 1.6.1 + uncrypto: 0.1.3 + handlebars@4.7.8: dependencies: minimist: 1.2.8 @@ -5797,6 +10496,8 @@ snapshots: has-symbols@1.0.3: {} + has-symbols@1.1.0: {} + has-tostringtag@1.0.2: dependencies: has-symbols: 1.0.3 @@ -5810,6 +10511,8 @@ snapshots: no-case: 2.3.2 upper-case: 1.1.3 + hey-listen@1.0.8: {} + html-escaper@2.0.2: {} http-proxy-agent@7.0.2: @@ -5830,10 +10533,14 @@ snapshots: human-signals@2.1.0: {} + husky@9.1.7: {} + iconv-lite@0.4.24: dependencies: safer-buffer: 2.1.2 + idb-keyval@6.2.1: {} + idb@7.1.1: {} ieee754@1.2.1: {} @@ -5910,6 +10617,13 @@ snapshots: jsbn: 1.1.0 sprintf-js: 1.1.3 + iron-webcrypto@1.2.1: {} + + is-arguments@1.2.0: + dependencies: + call-bound: 1.0.4 + has-tostringtag: 1.0.2 + is-array-buffer@3.0.4: dependencies: call-bind: 1.0.7 @@ -6037,12 +10751,22 @@ snapshots: is-windows@1.0.2: {} + isarray@1.0.0: {} + isarray@2.0.5: {} isbinaryfile@4.0.10: {} isexe@2.0.0: {} + isows@1.0.6(ws@8.18.0(bufferutil@4.0.9)(utf-8-validate@5.0.10)): + dependencies: + ws: 8.18.0(bufferutil@4.0.9)(utf-8-validate@5.0.10) + + isows@1.0.6(ws@8.18.1(bufferutil@4.0.9)(utf-8-validate@5.0.10)): + dependencies: + ws: 8.18.1(bufferutil@4.0.9)(utf-8-validate@5.0.10) + istanbul-lib-coverage@3.2.2: {} istanbul-lib-instrument@5.2.1: @@ -6092,6 +10816,10 @@ snapshots: reflect.getprototypeof: 1.0.6 set-function-name: 2.0.2 + jackspeak@4.1.0: + dependencies: + '@isaacs/cliui': 8.0.2 + jake@10.9.2: dependencies: async: 3.2.6 @@ -6408,6 +11136,15 @@ snapshots: - supports-color - ts-node + jiti@2.4.2: {} + + jotai@2.12.3(@types/react@19.1.2)(react@19.0.0): + optionalDependencies: + '@types/react': 19.1.2 + react: 19.0.0 + + js-base64@3.7.7: {} + js-tokens@4.0.0: {} js-yaml@3.14.1: @@ -6427,6 +11164,13 @@ snapshots: json-parse-even-better-errors@2.3.1: {} + json-rpc-engine@6.1.0: + dependencies: + '@metamask/safe-event-emitter': 2.0.0 + eth-rpc-errors: 4.0.3 + + json-rpc-random-id@1.0.1: {} + json-schema-traverse@0.4.1: {} json-stable-stringify-without-jsonify@1.0.1: {} @@ -6452,10 +11196,18 @@ snapshots: jwt-decode@4.0.0: {} + keccak@3.0.4: + dependencies: + node-addon-api: 2.0.2 + node-gyp-build: 4.8.4 + readable-stream: 3.6.2 + keyv@4.5.4: dependencies: json-buffer: 3.0.1 + keyvaluestorage-interface@1.0.0: {} + kleur@3.0.3: {} lefthook-darwin-arm64@1.11.10: @@ -6508,8 +11260,69 @@ snapshots: prelude-ls: 1.2.1 type-check: 0.4.0 + lightningcss-darwin-arm64@1.29.2: + optional: true + + lightningcss-darwin-x64@1.29.2: + optional: true + + lightningcss-freebsd-x64@1.29.2: + optional: true + + lightningcss-linux-arm-gnueabihf@1.29.2: + optional: true + + lightningcss-linux-arm64-gnu@1.29.2: + optional: true + + lightningcss-linux-arm64-musl@1.29.2: + optional: true + + lightningcss-linux-x64-gnu@1.29.2: + optional: true + + lightningcss-linux-x64-musl@1.29.2: + optional: true + + lightningcss-win32-arm64-msvc@1.29.2: + optional: true + + lightningcss-win32-x64-msvc@1.29.2: + optional: true + + lightningcss@1.29.2: + dependencies: + detect-libc: 2.0.3 + optionalDependencies: + lightningcss-darwin-arm64: 1.29.2 + lightningcss-darwin-x64: 1.29.2 + lightningcss-freebsd-x64: 1.29.2 + lightningcss-linux-arm-gnueabihf: 1.29.2 + lightningcss-linux-arm64-gnu: 1.29.2 + lightningcss-linux-arm64-musl: 1.29.2 + lightningcss-linux-x64-gnu: 1.29.2 + lightningcss-linux-x64-musl: 1.29.2 + lightningcss-win32-arm64-msvc: 1.29.2 + lightningcss-win32-x64-msvc: 1.29.2 + lines-and-columns@1.2.4: {} + lit-element@3.3.3: + dependencies: + '@lit-labs/ssr-dom-shim': 1.3.0 + '@lit/reactive-element': 1.6.3 + lit-html: 2.8.0 + + lit-html@2.8.0: + dependencies: + '@types/trusted-types': 2.0.7 + + lit@2.8.0: + dependencies: + '@lit/reactive-element': 1.6.3 + lit-element: 3.3.3 + lit-html: 2.8.0 + locate-path@5.0.0: dependencies: p-locate: 4.1.0 @@ -6547,6 +11360,10 @@ snapshots: lower-case@1.1.4: {} + lru-cache@10.4.3: {} + + lru-cache@11.1.0: {} + lru-cache@5.1.1: dependencies: yallist: 3.1.1 @@ -6563,10 +11380,14 @@ snapshots: dependencies: tmpl: 1.0.5 + math-intrinsics@1.1.0: {} + merge-stream@2.0.0: {} merge2@1.4.1: {} + micro-ftch@0.3.1: {} + micromatch@4.0.8: dependencies: braces: 3.0.3 @@ -6574,6 +11395,10 @@ snapshots: mimic-fn@2.1.0: {} + minimatch@10.0.1: + dependencies: + brace-expansion: 2.0.1 + minimatch@3.1.2: dependencies: brace-expansion: 1.1.11 @@ -6588,16 +11413,49 @@ snapshots: minimist@1.2.8: {} + minipass@7.1.2: {} + + mipd@0.0.7(typescript@5.7.3): + optionalDependencies: + typescript: 5.7.3 + mkdirp@0.5.6: dependencies: minimist: 1.2.8 + motion-dom@12.7.2: + dependencies: + motion-utils: 12.7.2 + + motion-utils@12.7.2: {} + + motion@10.16.2: + dependencies: + '@motionone/animation': 10.18.0 + '@motionone/dom': 10.18.0 + '@motionone/svelte': 10.16.4 + '@motionone/types': 10.17.1 + '@motionone/utils': 10.18.0 + '@motionone/vue': 10.16.4 + + motion@12.7.2(react-dom@19.0.0(react@19.0.0))(react@19.0.0): + dependencies: + framer-motion: 12.7.2(react-dom@19.0.0(react@19.0.0))(react@19.0.0) + tslib: 2.8.1 + optionalDependencies: + react: 19.0.0 + react-dom: 19.0.0(react@19.0.0) + mri@1.2.0: {} ms@2.1.3: {} + multiformats@9.9.0: {} + mute-stream@0.0.8: {} + nanoid@3.3.11: {} + nanoid@3.3.7: {} natural-compare@1.4.0: {} @@ -6635,8 +11493,20 @@ snapshots: dependencies: lower-case: 1.1.4 + node-addon-api@2.0.2: {} + + node-fetch-native@1.6.6: {} + + node-fetch@2.7.0: + dependencies: + whatwg-url: 5.0.0 + + node-gyp-build@4.8.4: {} + node-int64@0.4.0: {} + node-mock-http@1.0.0: {} + node-plop@0.26.3: dependencies: '@babel/runtime-corejs3': 7.26.0 @@ -6672,6 +11542,12 @@ snapshots: dependencies: path-key: 3.1.1 + obj-multiplex@1.0.0: + dependencies: + end-of-stream: 1.4.4 + once: 1.4.0 + readable-stream: 2.3.8 + object-assign@4.1.1: {} object-inspect@1.13.3: {} @@ -6704,6 +11580,14 @@ snapshots: define-properties: 1.2.1 es-object-atoms: 1.0.0 + ofetch@1.4.1: + dependencies: + destr: 2.0.5 + node-fetch-native: 1.6.6 + ufo: 1.6.1 + + on-exit-leak-free@0.2.0: {} + once@1.4.0: dependencies: wrappy: 1.0.2 @@ -6748,34 +11632,76 @@ snapshots: outdent@0.5.0: {} - ox@0.6.7(typescript@5.5.4): + ox@0.6.12(typescript@5.7.3)(zod@3.24.2): + dependencies: + '@adraffy/ens-normalize': 1.11.0 + '@noble/curves': 1.8.1 + '@noble/hashes': 1.7.1 + '@scure/bip32': 1.6.2 + '@scure/bip39': 1.5.4 + abitype: 1.0.8(typescript@5.7.3)(zod@3.24.2) + eventemitter3: 5.0.1 + optionalDependencies: + typescript: 5.7.3 + transitivePeerDependencies: + - zod + + ox@0.6.7(typescript@5.5.4)(zod@3.24.2): dependencies: '@adraffy/ens-normalize': 1.11.0 '@noble/curves': 1.8.1 '@noble/hashes': 1.7.1 '@scure/bip32': 1.6.2 '@scure/bip39': 1.5.4 - abitype: 1.0.8(typescript@5.5.4) + abitype: 1.0.8(typescript@5.5.4)(zod@3.24.2) eventemitter3: 5.0.1 optionalDependencies: typescript: 5.5.4 transitivePeerDependencies: - zod - ox@0.6.7(typescript@5.8.3): + ox@0.6.7(typescript@5.7.3)(zod@3.24.2): + dependencies: + '@adraffy/ens-normalize': 1.11.0 + '@noble/curves': 1.8.1 + '@noble/hashes': 1.7.1 + '@scure/bip32': 1.6.2 + '@scure/bip39': 1.5.4 + abitype: 1.0.8(typescript@5.7.3)(zod@3.24.2) + eventemitter3: 5.0.1 + optionalDependencies: + typescript: 5.7.3 + transitivePeerDependencies: + - zod + + ox@0.6.7(typescript@5.8.3)(zod@3.24.2): dependencies: '@adraffy/ens-normalize': 1.11.0 '@noble/curves': 1.8.1 '@noble/hashes': 1.7.1 '@scure/bip32': 1.6.2 '@scure/bip39': 1.5.4 - abitype: 1.0.8(typescript@5.8.3) + abitype: 1.0.8(typescript@5.8.3)(zod@3.24.2) eventemitter3: 5.0.1 optionalDependencies: typescript: 5.8.3 transitivePeerDependencies: - zod + ox@0.6.9(typescript@5.7.3)(zod@3.24.2): + dependencies: + '@adraffy/ens-normalize': 1.11.0 + '@noble/curves': 1.8.1 + '@noble/hashes': 1.7.1 + '@scure/bip32': 1.6.2 + '@scure/bip39': 1.5.4 + abitype: 1.0.8(typescript@5.7.3)(zod@3.24.2) + eventemitter3: 5.0.1 + optionalDependencies: + typescript: 5.7.3 + transitivePeerDependencies: + - zod + p-filter@2.1.0: dependencies: p-map: 2.1.0 @@ -6822,6 +11748,8 @@ snapshots: degenerator: 5.0.1 netmask: 2.0.2 + package-json-from-dist@1.0.1: {} + package-manager-detector@0.2.8: {} param-case@2.1.1: @@ -6856,20 +11784,54 @@ snapshots: path-parse@1.0.7: {} + path-scurry@2.0.0: + dependencies: + lru-cache: 11.1.0 + minipass: 7.1.2 + path-type@4.0.0: {} picocolors@1.1.1: {} picomatch@2.3.1: {} + pify@3.0.0: {} + pify@4.0.1: {} + pify@5.0.0: {} + + pino-abstract-transport@0.5.0: + dependencies: + duplexify: 4.1.3 + split2: 4.2.0 + + pino-std-serializers@4.0.0: {} + + pino@7.11.0: + dependencies: + atomic-sleep: 1.0.0 + fast-redact: 3.5.0 + on-exit-leak-free: 0.2.0 + pino-abstract-transport: 0.5.0 + pino-std-serializers: 4.0.0 + process-warning: 1.0.0 + quick-format-unescaped: 4.0.4 + real-require: 0.1.0 + safe-stable-stringify: 2.5.0 + sonic-boom: 2.8.0 + thread-stream: 0.15.2 + pirates@4.0.6: {} pkg-dir@4.2.0: dependencies: find-up: 4.1.0 + pngjs@5.0.0: {} + + pony-cause@2.1.11: {} + possible-typed-array-names@1.0.0: {} postcss@8.4.31: @@ -6878,6 +11840,14 @@ snapshots: picocolors: 1.1.1 source-map-js: 1.2.1 + postcss@8.5.3: + dependencies: + nanoid: 3.3.11 + picocolors: 1.1.1 + source-map-js: 1.2.1 + + preact@10.26.5: {} + prelude-ls@1.2.1: {} prettier@2.8.8: {} @@ -6890,6 +11860,10 @@ snapshots: ansi-styles: 5.2.0 react-is: 18.3.1 + process-nextick-args@2.0.1: {} + + process-warning@1.0.0: {} + prompts@2.4.2: dependencies: kleur: 3.0.3 @@ -6914,16 +11888,45 @@ snapshots: transitivePeerDependencies: - supports-color + proxy-compare@2.5.1: {} + proxy-from-env@1.1.0: {} pstree.remy@1.1.8: {} + pump@3.0.2: + dependencies: + end-of-stream: 1.4.4 + once: 1.4.0 + punycode@2.3.1: {} pure-rand@6.1.0: {} + qrcode.react@4.2.0(react@19.0.0): + dependencies: + react: 19.0.0 + + qrcode@1.5.3: + dependencies: + dijkstrajs: 1.0.3 + encode-utf8: 1.0.3 + pngjs: 5.0.0 + yargs: 15.4.1 + + query-string@7.1.3: + dependencies: + decode-uri-component: 0.2.2 + filter-obj: 1.1.0 + split-on-first: 1.1.0 + strict-uri-encode: 2.0.0 + queue-microtask@1.2.3: {} + quick-format-unescaped@4.0.4: {} + + radix3@1.1.2: {} + rc@1.2.8: dependencies: deep-extend: 0.6.0 @@ -6936,10 +11939,53 @@ snapshots: react: 19.0.0 scheduler: 0.25.0 + react-hook-form@7.55.0(react@19.0.0): + dependencies: + react: 19.0.0 + react-is@16.13.1: {} react-is@18.3.1: {} + react-refresh@0.14.2: {} + + react-remove-scroll-bar@2.3.8(@types/react@19.1.2)(react@19.0.0): + dependencies: + react: 19.0.0 + react-style-singleton: 2.2.3(@types/react@19.1.2)(react@19.0.0) + tslib: 2.8.1 + optionalDependencies: + '@types/react': 19.1.2 + + react-remove-scroll@2.6.3(@types/react@19.1.2)(react@19.0.0): + dependencies: + react: 19.0.0 + react-remove-scroll-bar: 2.3.8(@types/react@19.1.2)(react@19.0.0) + react-style-singleton: 2.2.3(@types/react@19.1.2)(react@19.0.0) + tslib: 2.8.1 + use-callback-ref: 1.3.3(@types/react@19.1.2)(react@19.0.0) + use-sidecar: 1.1.3(@types/react@19.1.2)(react@19.0.0) + optionalDependencies: + '@types/react': 19.1.2 + + react-router@7.5.0(react-dom@19.0.0(react@19.0.0))(react@19.0.0): + dependencies: + '@types/cookie': 0.6.0 + cookie: 1.0.2 + react: 19.0.0 + set-cookie-parser: 2.7.1 + turbo-stream: 2.4.0 + optionalDependencies: + react-dom: 19.0.0(react@19.0.0) + + react-style-singleton@2.2.3(@types/react@19.1.2)(react@19.0.0): + dependencies: + get-nonce: 1.0.1 + react: 19.0.0 + tslib: 2.8.1 + optionalDependencies: + '@types/react': 19.1.2 + react@19.0.0: {} read-yaml-file@1.1.0: @@ -6949,6 +11995,16 @@ snapshots: pify: 4.0.1 strip-bom: 3.0.0 + readable-stream@2.3.8: + dependencies: + core-util-is: 1.0.3 + inherits: 2.0.4 + isarray: 1.0.0 + process-nextick-args: 2.0.1 + safe-buffer: 5.1.2 + string_decoder: 1.1.1 + util-deprecate: 1.0.2 + readable-stream@3.6.2: dependencies: inherits: 2.0.4 @@ -6959,6 +12015,10 @@ snapshots: dependencies: picomatch: 2.3.1 + readdirp@4.1.2: {} + + real-require@0.1.0: {} + reflect.getprototypeof@1.0.6: dependencies: call-bind: 1.0.7 @@ -6989,6 +12049,8 @@ snapshots: require-directory@2.1.1: {} + require-main-filename@2.0.0: {} + resolve-cwd@3.0.0: dependencies: resolve-from: 5.0.0 @@ -7022,6 +12084,37 @@ snapshots: dependencies: glob: 7.2.3 + rimraf@6.0.1: + dependencies: + glob: 11.0.1 + package-json-from-dist: 1.0.1 + + rollup@4.40.0: + dependencies: + '@types/estree': 1.0.7 + optionalDependencies: + '@rollup/rollup-android-arm-eabi': 4.40.0 + '@rollup/rollup-android-arm64': 4.40.0 + '@rollup/rollup-darwin-arm64': 4.40.0 + '@rollup/rollup-darwin-x64': 4.40.0 + '@rollup/rollup-freebsd-arm64': 4.40.0 + '@rollup/rollup-freebsd-x64': 4.40.0 + '@rollup/rollup-linux-arm-gnueabihf': 4.40.0 + '@rollup/rollup-linux-arm-musleabihf': 4.40.0 + '@rollup/rollup-linux-arm64-gnu': 4.40.0 + '@rollup/rollup-linux-arm64-musl': 4.40.0 + '@rollup/rollup-linux-loongarch64-gnu': 4.40.0 + '@rollup/rollup-linux-powerpc64le-gnu': 4.40.0 + '@rollup/rollup-linux-riscv64-gnu': 4.40.0 + '@rollup/rollup-linux-riscv64-musl': 4.40.0 + '@rollup/rollup-linux-s390x-gnu': 4.40.0 + '@rollup/rollup-linux-x64-gnu': 4.40.0 + '@rollup/rollup-linux-x64-musl': 4.40.0 + '@rollup/rollup-win32-arm64-msvc': 4.40.0 + '@rollup/rollup-win32-ia32-msvc': 4.40.0 + '@rollup/rollup-win32-x64-msvc': 4.40.0 + fsevents: 2.3.3 + run-async@2.4.1: {} run-parallel@1.2.0: @@ -7043,6 +12136,8 @@ snapshots: has-symbols: 1.0.3 isarray: 2.0.5 + safe-buffer@5.1.2: {} + safe-buffer@5.2.1: {} safe-regex-test@1.0.3: @@ -7051,6 +12146,8 @@ snapshots: es-errors: 1.3.0 is-regex: 1.1.4 + safe-stable-stringify@2.5.0: {} + safer-buffer@2.1.2: {} scheduler@0.25.0: {} @@ -7064,6 +12161,10 @@ snapshots: no-case: 2.3.2 upper-case-first: 1.1.2 + set-blocking@2.0.0: {} + + set-cookie-parser@2.7.1: {} + set-function-length@1.2.2: dependencies: define-data-property: 1.1.4 @@ -7080,6 +12181,11 @@ snapshots: functions-have-names: 1.2.3 has-property-descriptors: 1.0.2 + sha.js@2.4.11: + dependencies: + inherits: 2.0.4 + safe-buffer: 5.2.1 + sharp@0.33.5: dependencies: color: 4.2.3 @@ -7145,6 +12251,24 @@ snapshots: dependencies: no-case: 2.3.2 + socket.io-client@4.8.1(bufferutil@4.0.9)(utf-8-validate@5.0.10): + dependencies: + '@socket.io/component-emitter': 3.1.2 + debug: 4.3.7(supports-color@5.5.0) + engine.io-client: 6.6.3(bufferutil@4.0.9)(utf-8-validate@5.0.10) + socket.io-parser: 4.2.4 + transitivePeerDependencies: + - bufferutil + - supports-color + - utf-8-validate + + socket.io-parser@4.2.4: + dependencies: + '@socket.io/component-emitter': 3.1.2 + debug: 4.3.7(supports-color@5.5.0) + transitivePeerDependencies: + - supports-color + socks-proxy-agent@8.0.4: dependencies: agent-base: 7.1.1 @@ -7158,6 +12282,10 @@ snapshots: ip-address: 9.0.5 smart-buffer: 4.2.0 + sonic-boom@2.8.0: + dependencies: + atomic-sleep: 1.0.0 + source-map-js@1.2.1: {} source-map-support@0.5.13: @@ -7174,6 +12302,10 @@ snapshots: cross-spawn: 7.0.6 signal-exit: 4.1.0 + split-on-first@1.1.0: {} + + split2@4.2.0: {} + sprintf-js@1.0.3: {} sprintf-js@1.1.3: {} @@ -7182,8 +12314,12 @@ snapshots: dependencies: escape-string-regexp: 2.0.0 + stream-shift@1.0.3: {} + streamsearch@1.1.0: {} + strict-uri-encode@2.0.0: {} + string-length@4.0.2: dependencies: char-regex: 1.0.2 @@ -7195,6 +12331,12 @@ snapshots: is-fullwidth-code-point: 3.0.0 strip-ansi: 6.0.1 + string-width@5.1.2: + dependencies: + eastasianwidth: 0.2.0 + emoji-regex: 9.2.2 + strip-ansi: 7.1.0 + string.prototype.matchall@4.0.11: dependencies: call-bind: 1.0.7 @@ -7234,6 +12376,10 @@ snapshots: define-properties: 1.2.1 es-object-atoms: 1.0.0 + string_decoder@1.1.1: + dependencies: + safe-buffer: 5.1.2 + string_decoder@1.3.0: dependencies: safe-buffer: 5.2.1 @@ -7242,6 +12388,10 @@ snapshots: dependencies: ansi-regex: 5.0.1 + strip-ansi@7.1.0: + dependencies: + ansi-regex: 6.1.0 + strip-bom@3.0.0: {} strip-bom@4.0.0: {} @@ -7257,6 +12407,8 @@ snapshots: client-only: 0.0.1 react: 19.0.0 + superstruct@1.0.4: {} + supports-color@5.5.0: dependencies: has-flag: 3.0.0 @@ -7276,6 +12428,12 @@ snapshots: lower-case: 1.1.4 upper-case: 1.1.3 + tailwind-merge@3.2.0: {} + + tailwindcss@4.1.4: {} + + tapable@2.2.1: {} + term-size@2.2.1: {} test-exclude@6.0.0: @@ -7284,6 +12442,10 @@ snapshots: glob: 7.2.3 minimatch: 3.1.2 + thread-stream@0.15.2: + dependencies: + real-require: 0.1.0 + through@2.3.8: {} tinycolor2@1.6.0: {} @@ -7308,14 +12470,22 @@ snapshots: dependencies: is-number: 7.0.0 + toggle-selection@1.0.6: {} + touch@3.1.1: {} + tr46@0.0.3: {} + tree-kill@1.2.2: {} ts-api-utils@1.4.0(typescript@5.7.3): dependencies: typescript: 5.7.3 + ts-api-utils@2.1.0(typescript@5.7.3): + dependencies: + typescript: 5.7.3 + ts-jest@29.2.6(@babel/core@7.26.9)(@jest/transform@29.7.0)(@jest/types@29.6.3)(babel-jest@29.7.0(@babel/core@7.26.9))(jest@29.7.0(@types/node@22.13.9)(ts-node@10.9.2(@types/node@22.13.9)(typescript@5.8.3)))(typescript@5.8.3): dependencies: bs-logger: 0.2.6 @@ -7374,6 +12544,8 @@ snapshots: tslib@1.14.1: {} + tslib@2.7.0: {} + tslib@2.8.1: {} turbo-darwin-64@2.5.0: @@ -7388,6 +12560,8 @@ snapshots: turbo-linux-arm64@2.5.0: optional: true + turbo-stream@2.4.0: {} + turbo-windows-64@2.5.0: optional: true @@ -7444,26 +12618,42 @@ snapshots: possible-typed-array-names: 1.0.0 reflect.getprototypeof: 1.0.6 - typescript-eslint@8.15.0(eslint@9.15.0)(typescript@5.7.3): + typescript-eslint@8.15.0(eslint@9.15.0(jiti@2.4.2))(typescript@5.7.3): dependencies: - '@typescript-eslint/eslint-plugin': 8.15.0(@typescript-eslint/parser@8.15.0(eslint@9.15.0)(typescript@5.7.3))(eslint@9.15.0)(typescript@5.7.3) - '@typescript-eslint/parser': 8.15.0(eslint@9.15.0)(typescript@5.7.3) - '@typescript-eslint/utils': 8.15.0(eslint@9.15.0)(typescript@5.7.3) - eslint: 9.15.0 + '@typescript-eslint/eslint-plugin': 8.15.0(@typescript-eslint/parser@8.15.0(eslint@9.15.0(jiti@2.4.2))(typescript@5.7.3))(eslint@9.15.0(jiti@2.4.2))(typescript@5.7.3) + '@typescript-eslint/parser': 8.15.0(eslint@9.15.0(jiti@2.4.2))(typescript@5.7.3) + '@typescript-eslint/utils': 8.15.0(eslint@9.15.0(jiti@2.4.2))(typescript@5.7.3) + eslint: 9.15.0(jiti@2.4.2) optionalDependencies: typescript: 5.7.3 transitivePeerDependencies: - supports-color + typescript-eslint@8.30.1(eslint@9.24.0(jiti@2.4.2))(typescript@5.7.3): + dependencies: + '@typescript-eslint/eslint-plugin': 8.30.1(@typescript-eslint/parser@8.30.1(eslint@9.24.0(jiti@2.4.2))(typescript@5.7.3))(eslint@9.24.0(jiti@2.4.2))(typescript@5.7.3) + '@typescript-eslint/parser': 8.30.1(eslint@9.24.0(jiti@2.4.2))(typescript@5.7.3) + '@typescript-eslint/utils': 8.30.1(eslint@9.24.0(jiti@2.4.2))(typescript@5.7.3) + eslint: 9.24.0(jiti@2.4.2) + typescript: 5.7.3 + transitivePeerDependencies: + - supports-color + typescript@5.5.4: {} typescript@5.7.3: {} typescript@5.8.3: {} + ufo@1.6.1: {} + uglify-js@3.19.3: optional: true + uint8arrays@3.1.0: + dependencies: + multiformats: 9.9.0 + unbox-primitive@1.0.2: dependencies: call-bind: 1.0.7 @@ -7471,6 +12661,8 @@ snapshots: has-symbols: 1.0.3 which-boxed-primitive: 1.0.2 + uncrypto@0.1.3: {} + undefsafe@2.0.5: {} undici-types@6.19.8: {} @@ -7481,6 +12673,19 @@ snapshots: universalify@2.0.1: {} + unstorage@1.15.0(idb-keyval@6.2.1): + dependencies: + anymatch: 3.1.3 + chokidar: 4.0.3 + destr: 2.0.5 + h3: 1.15.1 + lru-cache: 10.4.3 + node-fetch-native: 1.6.6 + ofetch: 1.4.1 + ufo: 1.6.1 + optionalDependencies: + idb-keyval: 6.2.1 + update-browserslist-db@1.1.3(browserslist@4.24.4): dependencies: browserslist: 4.24.4 @@ -7502,10 +12707,49 @@ snapshots: dependencies: punycode: 2.3.1 + use-callback-ref@1.3.3(@types/react@19.1.2)(react@19.0.0): + dependencies: + react: 19.0.0 + tslib: 2.8.1 + optionalDependencies: + '@types/react': 19.1.2 + + use-sidecar@1.1.3(@types/react@19.1.2)(react@19.0.0): + dependencies: + detect-node-es: 1.1.0 + react: 19.0.0 + tslib: 2.8.1 + optionalDependencies: + '@types/react': 19.1.2 + + use-sync-external-store@1.2.0(react@19.0.0): + dependencies: + react: 19.0.0 + + use-sync-external-store@1.4.0(react@19.0.0): + dependencies: + react: 19.0.0 + + utf-8-validate@5.0.10: + dependencies: + node-gyp-build: 4.8.4 + util-deprecate@1.0.2: {} + util@0.12.5: + dependencies: + inherits: 2.0.4 + is-arguments: 1.2.0 + is-generator-function: 1.0.10 + is-typed-array: 1.1.13 + which-typed-array: 1.1.15 + uuid@11.1.0: {} + uuid@8.3.2: {} + + uuid@9.0.1: {} + v8-compile-cache-lib@3.0.1: {} v8-to-istanbul@9.3.0: @@ -7516,6 +12760,97 @@ snapshots: validate-npm-package-name@5.0.1: {} + valtio@1.11.2(@types/react@19.1.2)(react@19.0.0): + dependencies: + proxy-compare: 2.5.1 + use-sync-external-store: 1.2.0(react@19.0.0) + optionalDependencies: + '@types/react': 19.1.2 + react: 19.0.0 + + viem@2.23.2(bufferutil@4.0.9)(typescript@5.7.3)(utf-8-validate@5.0.10)(zod@3.24.2): + dependencies: + '@noble/curves': 1.8.1 + '@noble/hashes': 1.7.1 + '@scure/bip32': 1.6.2 + '@scure/bip39': 1.5.4 + abitype: 1.0.8(typescript@5.7.3)(zod@3.24.2) + isows: 1.0.6(ws@8.18.0(bufferutil@4.0.9)(utf-8-validate@5.0.10)) + ox: 0.6.7(typescript@5.7.3)(zod@3.24.2) + ws: 8.18.0(bufferutil@4.0.9)(utf-8-validate@5.0.10) + optionalDependencies: + typescript: 5.7.3 + transitivePeerDependencies: + - bufferutil + - utf-8-validate + - zod + + viem@2.27.0(bufferutil@4.0.9)(typescript@5.7.3)(utf-8-validate@5.0.10)(zod@3.24.2): + dependencies: + '@noble/curves': 1.8.1 + '@noble/hashes': 1.7.1 + '@scure/bip32': 1.6.2 + '@scure/bip39': 1.5.4 + abitype: 1.0.8(typescript@5.7.3)(zod@3.24.2) + isows: 1.0.6(ws@8.18.1(bufferutil@4.0.9)(utf-8-validate@5.0.10)) + ox: 0.6.9(typescript@5.7.3)(zod@3.24.2) + ws: 8.18.1(bufferutil@4.0.9)(utf-8-validate@5.0.10) + optionalDependencies: + typescript: 5.7.3 + transitivePeerDependencies: + - bufferutil + - utf-8-validate + - zod + + vite@6.2.6(@types/node@22.13.9)(jiti@2.4.2)(lightningcss@1.29.2): + dependencies: + esbuild: 0.25.2 + postcss: 8.5.3 + rollup: 4.40.0 + optionalDependencies: + '@types/node': 22.13.9 + fsevents: 2.3.3 + jiti: 2.4.2 + lightningcss: 1.29.2 + + wagmi@2.14.16(@tanstack/query-core@5.74.3)(@tanstack/react-query@5.74.3(react@19.0.0))(@types/react@19.1.2)(bufferutil@4.0.9)(react@19.0.0)(typescript@5.7.3)(utf-8-validate@5.0.10)(viem@2.27.0(bufferutil@4.0.9)(typescript@5.7.3)(utf-8-validate@5.0.10)(zod@3.24.2))(zod@3.24.2): + dependencies: + '@tanstack/react-query': 5.74.3(react@19.0.0) + '@wagmi/connectors': 5.7.12(@types/react@19.1.2)(@wagmi/core@2.16.7(@tanstack/query-core@5.74.3)(@types/react@19.1.2)(react@19.0.0)(typescript@5.7.3)(use-sync-external-store@1.4.0(react@19.0.0))(viem@2.27.0(bufferutil@4.0.9)(typescript@5.7.3)(utf-8-validate@5.0.10)(zod@3.24.2)))(bufferutil@4.0.9)(react@19.0.0)(typescript@5.7.3)(utf-8-validate@5.0.10)(viem@2.27.0(bufferutil@4.0.9)(typescript@5.7.3)(utf-8-validate@5.0.10)(zod@3.24.2))(zod@3.24.2) + '@wagmi/core': 2.16.7(@tanstack/query-core@5.74.3)(@types/react@19.1.2)(react@19.0.0)(typescript@5.7.3)(use-sync-external-store@1.4.0(react@19.0.0))(viem@2.27.0(bufferutil@4.0.9)(typescript@5.7.3)(utf-8-validate@5.0.10)(zod@3.24.2)) + react: 19.0.0 + use-sync-external-store: 1.4.0(react@19.0.0) + viem: 2.27.0(bufferutil@4.0.9)(typescript@5.7.3)(utf-8-validate@5.0.10)(zod@3.24.2) + optionalDependencies: + typescript: 5.7.3 + transitivePeerDependencies: + - '@azure/app-configuration' + - '@azure/cosmos' + - '@azure/data-tables' + - '@azure/identity' + - '@azure/keyvault-secrets' + - '@azure/storage-blob' + - '@capacitor/preferences' + - '@deno/kv' + - '@netlify/blobs' + - '@planetscale/database' + - '@react-native-async-storage/async-storage' + - '@tanstack/query-core' + - '@types/react' + - '@upstash/redis' + - '@vercel/blob' + - '@vercel/kv' + - aws4fetch + - bufferutil + - db0 + - encoding + - immer + - ioredis + - supports-color + - uploadthing + - utf-8-validate + - zod + walker@1.0.8: dependencies: makeerror: 1.0.12 @@ -7524,6 +12859,15 @@ snapshots: dependencies: defaults: 1.0.4 + webextension-polyfill@0.10.0: {} + + webidl-conversions@3.0.1: {} + + whatwg-url@5.0.0: + dependencies: + tr46: 0.0.3 + webidl-conversions: 3.0.1 + which-boxed-primitive@1.0.2: dependencies: is-bigint: 1.0.4 @@ -7554,6 +12898,8 @@ snapshots: is-weakmap: 2.0.2 is-weakset: 2.0.3 + which-module@2.0.1: {} + which-typed-array@1.1.15: dependencies: available-typed-arrays: 1.0.7 @@ -7582,6 +12928,12 @@ snapshots: string-width: 4.2.3 strip-ansi: 6.0.1 + wrap-ansi@8.1.0: + dependencies: + ansi-styles: 6.2.1 + string-width: 5.1.2 + strip-ansi: 7.1.0 + wrappy@1.0.2: {} write-file-atomic@4.0.2: @@ -7589,12 +12941,57 @@ snapshots: imurmurhash: 0.1.4 signal-exit: 3.0.7 + ws@7.5.10(bufferutil@4.0.9)(utf-8-validate@5.0.10): + optionalDependencies: + bufferutil: 4.0.9 + utf-8-validate: 5.0.10 + + ws@8.17.1(bufferutil@4.0.9)(utf-8-validate@5.0.10): + optionalDependencies: + bufferutil: 4.0.9 + utf-8-validate: 5.0.10 + + ws@8.18.0(bufferutil@4.0.9)(utf-8-validate@5.0.10): + optionalDependencies: + bufferutil: 4.0.9 + utf-8-validate: 5.0.10 + + ws@8.18.1(bufferutil@4.0.9)(utf-8-validate@5.0.10): + optionalDependencies: + bufferutil: 4.0.9 + utf-8-validate: 5.0.10 + + xmlhttprequest-ssl@2.1.2: {} + + xtend@4.0.2: {} + + y18n@4.0.3: {} + y18n@5.0.8: {} yallist@3.1.1: {} + yargs-parser@18.1.3: + dependencies: + camelcase: 5.3.1 + decamelize: 1.2.0 + yargs-parser@21.1.1: {} + yargs@15.4.1: + dependencies: + cliui: 6.0.0 + decamelize: 1.2.0 + find-up: 4.1.0 + get-caller-file: 2.0.5 + require-directory: 2.1.1 + require-main-filename: 2.0.0 + set-blocking: 2.0.0 + string-width: 4.2.3 + which-module: 2.0.1 + y18n: 4.0.3 + yargs-parser: 18.1.3 + yargs@17.7.2: dependencies: cliui: 8.0.1 @@ -7608,3 +13005,11 @@ snapshots: yn@3.1.1: {} yocto-queue@0.1.0: {} + + zod@3.24.2: {} + + zustand@5.0.0(@types/react@19.1.2)(react@19.0.0)(use-sync-external-store@1.4.0(react@19.0.0)): + optionalDependencies: + '@types/react': 19.1.2 + react: 19.0.0 + use-sync-external-store: 1.4.0(react@19.0.0) From cfe8ccdabf39037d95495fe1159360d7a8cc2334 Mon Sep 17 00:00:00 2001 From: Shun Kakinoki Date: Tue, 15 Apr 2025 13:55:25 +0900 Subject: [PATCH 321/439] Enhanced UI elements for better readability. --- .../src/routes/home/home-index-route.tsx | 31 ++++++++++++------- 1 file changed, 20 insertions(+), 11 deletions(-) diff --git a/extras/demo-anypay/src/routes/home/home-index-route.tsx b/extras/demo-anypay/src/routes/home/home-index-route.tsx index 92a60eb12..4317e5732 100644 --- a/extras/demo-anypay/src/routes/home/home-index-route.tsx +++ b/extras/demo-anypay/src/routes/home/home-index-route.tsx @@ -95,40 +95,48 @@ export const HomeIndexRoute = () => { const createIntentMutation = useMutation({ mutationFn: async (action: IntentAction) => { - if (!apiClient || !selectedToken || !account.chainId || !account.address) { - throw new Error('Missing API client, selected token, chain ID, or account address') + if (!apiClient || !selectedToken || !account.address) { + throw new Error('Missing API client, selected token, or account address') } const USDC_ADDRESS = '0x833589fcd6edb6e08f4c7c32d4f71b54bda02913' const RECIPIENT_ADDRESS = '0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045' const AMOUNT = 30000000n // 30 USDC (6 decimals) - const destinationChainId = selectedToken.chainId + // Ensure we have a valid chain ID, defaulting to Base (8453) if none provided + const destinationChainId = selectedToken.chainId || 8453 const isOriginNative = isNativeToken(selectedToken) let destinationCall if (action === 'pay') { // ERC20 ABI functions const erc20Transfer = AbiFunction.from('function transfer(address,uint256) returns (bool)') + const encodedData = AbiFunction.encodeData(erc20Transfer, [RECIPIENT_ADDRESS, AMOUNT]) as Hex + + // Ensure calldata is prefixed with 0x + const transactionData = encodedData.startsWith('0x') ? encodedData : `0x${encodedData}` destinationCall = { chainId: 8453, to: USDC_ADDRESS, - transactionData: AbiFunction.encodeData(erc20Transfer, [RECIPIENT_ADDRESS, AMOUNT]) as Hex, + transactionData, transactionValue: '0', } } else { + // Ensure mock data is prefixed with 0x + const transactionData = MOCK_TRANSFER_DATA.startsWith('0x') ? MOCK_TRANSFER_DATA : `0x${MOCK_TRANSFER_DATA}` + destinationCall = { chainId: destinationChainId, to: USDC_ADDRESS, - transactionData: MOCK_TRANSFER_DATA, + transactionData, transactionValue: '0', } } const args = { userAddress: account.address, - originChainId: selectedToken.chainId, + originChainId: selectedToken.chainId || 8453, originTokenAddress: isOriginNative ? zeroAddress : selectedToken.contractAddress, destinationChainId: destinationChainId, destinationToAddress: destinationCall.to, @@ -488,29 +496,30 @@ export const HomeIndexRoute = () => {
- To (One-Time Wallet):{' '} + To (One-Time Wallet): {' '} {intentQuote.originCall.to}
- Value: + Value: {intentQuote.originCall.transactionValue}
- Data: + Data: {intentQuote.originCall.transactionData}
-
+
- Chain ID: + Chain ID: {intentQuote.originCall.chainId} +
{intentQuote.preconditions && intentQuote.preconditions.length > 0 && ( From a524517353d7fb9636b4c83338df125deff8bf1b Mon Sep 17 00:00:00 2001 From: Shun Kakinoki Date: Tue, 15 Apr 2025 14:11:14 +0900 Subject: [PATCH 322/439] Update payment description in HomeIndexRoute component --- extras/demo-anypay/src/routes/home/home-index-route.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extras/demo-anypay/src/routes/home/home-index-route.tsx b/extras/demo-anypay/src/routes/home/home-index-route.tsx index 4317e5732..03215ce6d 100644 --- a/extras/demo-anypay/src/routes/home/home-index-route.tsx +++ b/extras/demo-anypay/src/routes/home/home-index-route.tsx @@ -370,7 +370,7 @@ export const HomeIndexRoute = () => { ) : ( <> - Pay Action (0.03 USDC on Base) + Pay Action (0.03 USDC to Vitalik) )} From 00d083aa85a148cd130227d02b6636eb13abfe8d Mon Sep 17 00:00:00 2001 From: Shun Kakinoki Date: Tue, 15 Apr 2025 14:12:25 +0900 Subject: [PATCH 323/439] Refactor payment action display in HomeIndexRoute for improved styling --- extras/demo-anypay/src/routes/home/home-index-route.tsx | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/extras/demo-anypay/src/routes/home/home-index-route.tsx b/extras/demo-anypay/src/routes/home/home-index-route.tsx index 03215ce6d..9a588e081 100644 --- a/extras/demo-anypay/src/routes/home/home-index-route.tsx +++ b/extras/demo-anypay/src/routes/home/home-index-route.tsx @@ -370,7 +370,12 @@ export const HomeIndexRoute = () => { ) : ( <> - Pay Action (0.03 USDC to Vitalik) + + Pay Action{' '} + + (0.03 USDC to Vitalik) + + )} From b12d4c68c37b4292b10ba49a1d8e33a2c4748e4b Mon Sep 17 00:00:00 2001 From: Shun Kakinoki Date: Tue, 15 Apr 2025 14:18:33 +0900 Subject: [PATCH 324/439] Add custom call functionality as `custom_call` for intent destination call --- .../src/routes/home/home-index-route.tsx | 174 +++++++++++++++++- 1 file changed, 164 insertions(+), 10 deletions(-) diff --git a/extras/demo-anypay/src/routes/home/home-index-route.tsx b/extras/demo-anypay/src/routes/home/home-index-route.tsx index 9a588e081..9b697107a 100644 --- a/extras/demo-anypay/src/routes/home/home-index-route.tsx +++ b/extras/demo-anypay/src/routes/home/home-index-route.tsx @@ -17,7 +17,7 @@ function isNativeToken(token: TokenBalance): boolean { } // Types for intent actions -type IntentAction = 'pay' | 'mock_interaction' +type IntentAction = 'pay' | 'mock_interaction' | 'custom_call' // Helper to format balance const formatBalance = (balance: TokenBalance) => { @@ -48,6 +48,15 @@ export const HomeIndexRoute = () => { const { connectors, connect, status: connectStatus, error: connectError } = useConnect() const { disconnect } = useDisconnect() const [selectedToken, setSelectedToken] = useState(null) + const [showCustomCallForm, setShowCustomCallForm] = useState(false) + const [customCallData, setCustomCallData] = useState({ + to: '', + data: '', + value: '0', + chainId: '8453', + tokenAmount: '0', + tokenAddress: '0x833589fcd6edb6e08f4c7c32d4f71b54bda02913', // Default to USDC + }) const indexerClient = useIndexerClient((account.chainId as ChainId) || ChainId.MAINNET) const effectiveIndexerClient = account.chainId ? indexerClient : null const apiClient = useAPIClient() @@ -122,6 +131,14 @@ export const HomeIndexRoute = () => { transactionData, transactionValue: '0', } + } else if (action === 'custom_call') { + // Handle custom call + destinationCall = { + chainId: parseInt(customCallData.chainId), + to: customCallData.to, + transactionData: customCallData.data.startsWith('0x') ? customCallData.data : `0x${customCallData.data}`, + transactionValue: customCallData.value, + } } else { // Ensure mock data is prefixed with 0x const transactionData = MOCK_TRANSFER_DATA.startsWith('0x') ? MOCK_TRANSFER_DATA : `0x${MOCK_TRANSFER_DATA}` @@ -138,12 +155,18 @@ export const HomeIndexRoute = () => { userAddress: account.address, originChainId: selectedToken.chainId || 8453, originTokenAddress: isOriginNative ? zeroAddress : selectedToken.contractAddress, - destinationChainId: destinationChainId, - destinationToAddress: destinationCall.to, - destinationTokenAddress: USDC_ADDRESS, - destinationTokenAmount: action === 'pay' ? AMOUNT.toString() : '0', - destinationCallData: destinationCall.transactionData, - destinationCallValue: destinationCall.transactionValue, + destinationChainId: action === 'custom_call' ? parseInt(customCallData.chainId) : destinationCall.chainId, + destinationToAddress: action === 'custom_call' ? customCallData.to : destinationCall.to, + destinationTokenAddress: action === 'custom_call' ? customCallData.tokenAddress : USDC_ADDRESS, + destinationTokenAmount: + action === 'custom_call' ? customCallData.tokenAmount : action === 'pay' ? AMOUNT.toString() : '0', + destinationCallData: + action === 'custom_call' + ? customCallData.data.startsWith('0x') + ? customCallData.data + : `0x${customCallData.data}` + : destinationCall.transactionData, + destinationCallValue: action === 'custom_call' ? customCallData.value : destinationCall.transactionValue, } console.log('Calling createIntentConfig with args:', args) @@ -200,7 +223,17 @@ export const HomeIndexRoute = () => { const handleActionClick = (action: IntentAction) => { setIntentQuote(null) - createIntentMutation.mutate(action) + if (action === 'custom_call') { + setShowCustomCallForm(true) + } else { + createIntentMutation.mutate(action) + } + } + + const handleCustomCallSubmit = (e: React.FormEvent) => { + e.preventDefault() + createIntentMutation.mutate('custom_call') + setShowCustomCallForm(false) } return ( @@ -394,7 +427,122 @@ export const HomeIndexRoute = () => { )} +
+ + {showCustomCallForm && ( +
+
+
+ + setCustomCallData({ ...customCallData, to: e.target.value })} + placeholder="0x..." + className="w-full px-3 py-2 bg-gray-700/50 border border-gray-600 rounded-md text-white placeholder-gray-400 focus:outline-none focus:ring-2 focus:ring-blue-500" + required + /> +
+
+ + setCustomCallData({ ...customCallData, data: e.target.value })} + placeholder="0x..." + className="w-full px-3 py-2 bg-gray-700/50 border border-gray-600 rounded-md text-white placeholder-gray-400 focus:outline-none focus:ring-2 focus:ring-blue-500" + required + /> +
+
+ + setCustomCallData({ ...customCallData, value: e.target.value })} + placeholder="0" + className="w-full px-3 py-2 bg-gray-700/50 border border-gray-600 rounded-md text-white placeholder-gray-400 focus:outline-none focus:ring-2 focus:ring-blue-500" + required + /> +
+
+ + setCustomCallData({ ...customCallData, chainId: e.target.value })} + placeholder="8453" + className="w-full px-3 py-2 bg-gray-700/50 border border-gray-600 rounded-md text-white placeholder-gray-400 focus:outline-none focus:ring-2 focus:ring-blue-500" + required + /> +
+
+ + setCustomCallData({ ...customCallData, tokenAmount: e.target.value })} + placeholder="0" + className="w-full px-3 py-2 bg-gray-700/50 border border-gray-600 rounded-md text-white placeholder-gray-400 focus:outline-none focus:ring-2 focus:ring-blue-500" + required + /> +
+
+ + setCustomCallData({ ...customCallData, tokenAddress: e.target.value })} + placeholder="0x..." + className="w-full px-3 py-2 bg-gray-700/50 border border-gray-600 rounded-md text-white placeholder-gray-400 focus:outline-none focus:ring-2 focus:ring-blue-500" + required + /> +
+
+ + +
+
+
+ )} + {!selectedToken && ( { > - Origin Call (Send Funds Here): + Origin Call + + (Send Funds Here): +
@@ -548,7 +699,10 @@ export const HomeIndexRoute = () => { d="M19 11H5m14 0a2 2 0 012 2v6a2 2 0 01-2 2H5a2 2 0 01-2-2v-6a2 2 0 012-2m14 0V9a2 2 0 00-2-2M5 11V9a2 2 0 012-2m0 0V5a2 2 0 012-2h6a2 2 0 012 2v2M7 7h10" /> - Preconditions (Actions after funds arrive): + Preconditions + + (Actions after funds arrive on origin chain): +
    {intentQuote.preconditions.map((cond, index) => ( From d7d0c1f969f5f486203d77e54f0b444efd6dec07 Mon Sep 17 00:00:00 2001 From: Shun Kakinoki Date: Tue, 15 Apr 2025 14:21:51 +0900 Subject: [PATCH 325/439] Update button variants and improve layout in HomeIndexRoute for better user interaction --- extras/demo-anypay/src/routes/home/home-index-route.tsx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/extras/demo-anypay/src/routes/home/home-index-route.tsx b/extras/demo-anypay/src/routes/home/home-index-route.tsx index 9b697107a..54fa149a2 100644 --- a/extras/demo-anypay/src/routes/home/home-index-route.tsx +++ b/extras/demo-anypay/src/routes/home/home-index-route.tsx @@ -413,7 +413,7 @@ export const HomeIndexRoute = () => { )}
From 6477c2174b14eeb8eeb198862b13b688dc1969ab Mon Sep 17 00:00:00 2001 From: Shun Kakinoki Date: Tue, 15 Apr 2025 14:24:26 +0900 Subject: [PATCH 326/439] Refactor action click handling in HomeIndexRoute to reset custom call form visibility --- extras/demo-anypay/src/routes/home/home-index-route.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/extras/demo-anypay/src/routes/home/home-index-route.tsx b/extras/demo-anypay/src/routes/home/home-index-route.tsx index 54fa149a2..6e7200edc 100644 --- a/extras/demo-anypay/src/routes/home/home-index-route.tsx +++ b/extras/demo-anypay/src/routes/home/home-index-route.tsx @@ -223,6 +223,7 @@ export const HomeIndexRoute = () => { const handleActionClick = (action: IntentAction) => { setIntentQuote(null) + setShowCustomCallForm(false) if (action === 'custom_call') { setShowCustomCallForm(true) } else { @@ -413,7 +414,7 @@ export const HomeIndexRoute = () => { )} + + {commitIntentConfigMutation.isError && ( +
+ + Error: {commitIntentConfigMutation.error.message} + +
+ )} + {commitIntentConfigMutation.isSuccess && ( +
+ + Intent configuration committed successfully! + +
+ )} + + + + )} + + {/* Verification Banner */} + {verificationStatus && ( +
+
+ {verificationStatus.success ? ( + + + + ) : ( + + + + )} +
+ + {verificationStatus.success ? 'Verification Successful' : 'Verification Failed'} + +
+
Received: {verificationStatus.receivedAddress}
+
Calculated: {verificationStatus.calculatedAddress}
+
+
+
+
+ )} )} From cfe432b64ea4a407893a5dc407d1ba4be6b91b31 Mon Sep 17 00:00:00 2001 From: Shun Kakinoki Date: Fri, 18 Apr 2025 03:25:31 +0900 Subject: [PATCH 343/439] Update HomeIndexRoute to enhance transaction details display. Rename "Origin Call" to "Intent Operations" and improve associated text for clarity. Add detailed transaction information section including sender, recipient, value, data, and chain ID for better user understanding. --- .../src/routes/home/home-index-route.tsx | 77 ++++++++++++++++++- 1 file changed, 74 insertions(+), 3 deletions(-) diff --git a/extras/demo-anypay/src/routes/home/home-index-route.tsx b/extras/demo-anypay/src/routes/home/home-index-route.tsx index 4f5088635..a8e3588bc 100644 --- a/extras/demo-anypay/src/routes/home/home-index-route.tsx +++ b/extras/demo-anypay/src/routes/home/home-index-route.tsx @@ -807,9 +807,9 @@ export const HomeIndexRoute = () => { > - Origin Call + Intent Operations - (Send Funds Here): + (List of operations that are pre-authorized to be executed): {intentOperations && @@ -819,7 +819,7 @@ export const HomeIndexRoute = () => { <>
- To (One-Time Wallet): {' '} + To: {' '} {intentOperations[0].calls[0].to}
@@ -1045,6 +1045,77 @@ export const HomeIndexRoute = () => { )} + {/* 5. Origin Call */} + {intentOperations && intentPreconditions && ( +
+
+
+ 5 +
+

Origin Call

+
+
+ + + + + Transaction Details + + (Send this transaction to execute the intent): + + +
+
+ + From: + {account.address} + +
+
+ + To: + {intentOperations[0].calls[0].to} + +
+
+ + Value: + {intentOperations[0].calls[0].value || '0'} + +
+
+ + Data: + {intentOperations[0].calls[0].data || '0x'} + +
+
+ + Chain ID: + + {intentOperations[0].chainId} + + + + + {getChainInfo(parseInt(intentOperations[0].chainId))?.name || 'Unknown Chain'} + +
+
+
+
+ )} + {/* Verification Banner */} {verificationStatus && (
Date: Fri, 18 Apr 2025 03:29:48 +0900 Subject: [PATCH 344/439] Refactor HomeIndexRoute to improve UI responsiveness and add transaction sending functionality. Update CSS for body and root elements to allow dynamic height. Introduce transaction handling with verification status display, enhancing user feedback during transaction processes. --- extras/demo-anypay/src/index.css | 8 +- .../src/routes/home/home-index-route.tsx | 147 ++++++++++++------ 2 files changed, 103 insertions(+), 52 deletions(-) diff --git a/extras/demo-anypay/src/index.css b/extras/demo-anypay/src/index.css index aaaed3dce..8f2f9d537 100644 --- a/extras/demo-anypay/src/index.css +++ b/extras/demo-anypay/src/index.css @@ -12,16 +12,18 @@ html, body { @apply bg-gray-950; margin: 0; padding: 0; + height: auto; min-height: 100%; - height: 100%; } body { @apply bg-gradient-to-b from-gray-900 to-gray-950; background-attachment: fixed; - min-height: 100vh; + height: auto; + min-height: 100%; } #root { - min-height: 100vh; + height: auto; + min-height: 100%; } diff --git a/extras/demo-anypay/src/routes/home/home-index-route.tsx b/extras/demo-anypay/src/routes/home/home-index-route.tsx index a8e3588bc..ec40d23e8 100644 --- a/extras/demo-anypay/src/routes/home/home-index-route.tsx +++ b/extras/demo-anypay/src/routes/home/home-index-route.tsx @@ -1,5 +1,5 @@ import { useState, useMemo, useEffect } from 'react' -import { useAccount, useConnect, useDisconnect } from 'wagmi' +import { useAccount, useConnect, useDisconnect, useSendTransaction } from 'wagmi' import { Connector } from 'wagmi' import { useIndexerGatewayClient } from '@0xsequence/hooks' import { NativeTokenBalance, TokenBalance } from '@0xsequence/indexer' @@ -75,6 +75,7 @@ export const HomeIndexRoute = () => { const account = useAccount() const { connectors, connect, status: connectStatus, error: connectError } = useConnect() const { disconnect } = useDisconnect() + const { sendTransaction, isPending: isSendingTransaction } = useSendTransaction() const [selectedToken, setSelectedToken] = useState(null) const [showCustomCallForm, setShowCustomCallForm] = useState(false) const [customCallData, setCustomCallData] = useState({ @@ -367,6 +368,18 @@ export const HomeIndexRoute = () => { setShowCustomCallForm(false) } + const handleSendOriginCall = async () => { + if (!intentOperations?.[0]?.calls?.[0] || !verificationStatus?.success) return + + const call = intentOperations[0].calls[0] + await sendTransaction({ + to: call.to as `0x${string}`, + data: call.data as `0x${string}`, + value: BigInt(call.value || '0'), + chainId: parseInt(intentOperations[0].chainId), + }) + } + return (
@@ -1045,6 +1058,54 @@ export const HomeIndexRoute = () => {
)} + {/* Verification Banner */} + {verificationStatus && ( +
+
+ {verificationStatus.success ? ( + + + + ) : ( + + + + )} +
+ + {verificationStatus.success ? 'Verification Successful' : 'Verification Failed'} + +
+
Received: {verificationStatus.receivedAddress}
+
Calculated: {verificationStatus.calculatedAddress}
+
+
+
+
+ )} + {/* 5. Origin Call */} {intentOperations && intentPreconditions && (
@@ -1054,7 +1115,7 @@ export const HomeIndexRoute = () => {

Origin Call

-
+
{ {getChainInfo(parseInt(intentOperations[0].chainId))?.name || 'Unknown Chain'}
-
-
- - )} - - {/* Verification Banner */} - {verificationStatus && ( -
-
- {verificationStatus.success ? ( - - - - ) : ( - - - - )} -
- - {verificationStatus.success ? 'Verification Successful' : 'Verification Failed'} - -
-
Received: {verificationStatus.receivedAddress}
-
Calculated: {verificationStatus.calculatedAddress}
+
+
From 81df5bccdd6b7bd0d32469ea43593741f129367e Mon Sep 17 00:00:00 2001 From: Shun Kakinoki Date: Fri, 18 Apr 2025 03:44:41 +0900 Subject: [PATCH 345/439] Add relayer integration in HomeIndexRoute and update package dependencies --- extras/demo-anypay/package.json | 1 + .../src/routes/home/home-index-route.tsx | 241 +++++++++++++++++- pnpm-lock.yaml | 3 + 3 files changed, 234 insertions(+), 11 deletions(-) diff --git a/extras/demo-anypay/package.json b/extras/demo-anypay/package.json index 19899dd5d..aa74735f2 100644 --- a/extras/demo-anypay/package.json +++ b/extras/demo-anypay/package.json @@ -23,6 +23,7 @@ "@0xsequence/hooks": "^5.1.0", "@0xsequence/indexer": "^2.3.9", "@0xsequence/network": "^2.3.9", + "@0xsequence/relayer": "workspace:*", "@0xsequence/wallet-core": "workspace:*", "@0xsequence/wallet-primitives": "workspace:*", "@0xsequence/wallet-wdk": "workspace:*", diff --git a/extras/demo-anypay/src/routes/home/home-index-route.tsx b/extras/demo-anypay/src/routes/home/home-index-route.tsx index ec40d23e8..a9983ceca 100644 --- a/extras/demo-anypay/src/routes/home/home-index-route.tsx +++ b/extras/demo-anypay/src/routes/home/home-index-route.tsx @@ -13,6 +13,7 @@ import { AbiFunction, Address, Bytes } from 'ox' import * as chains from 'viem/chains' import { AnyPay } from '@0xsequence/wallet-core' import { Context as ContextLike } from '@0xsequence/wallet-primitives' +// import { PublicClient } from 'viem' // Type guard for native token balance function isNativeToken(token: TokenBalance | NativeTokenBalance): boolean { @@ -135,6 +136,55 @@ export const HomeIndexRoute = () => { calculatedAddress?: string } | null>(null) + // Add new state for relayer status + const [metaTxnStatus, setMetaTxnStatus] = useState<{ + txnHash?: string + status?: string + revertReason?: string + gasUsed?: number + effectiveGasPrice?: string + } | null>(null) + + const [preconditionStatuses, setPreconditionStatuses] = useState([]) + + console.log('setMetaTxnStatus', setMetaTxnStatus) + console.log('setPreconditionStatuses', setPreconditionStatuses) + + // Add function to check meta transaction status + // const checkMetaTxnStatus = async (txnHash: string) => { + // try { + // const receipt = await publicClient.getTransactionReceipt({ hash: txnHash as `0x${string}` }) + // setMetaTxnStatus({ + // txnHash, + // status: receipt.status === 'success' ? 'Success' : 'Failed', + // revertReason: receipt.status === 'reverted' ? 'Transaction reverted' : undefined, + // gasUsed: Number(receipt.gasUsed), + // effectiveGasPrice: receipt.effectiveGasPrice?.toString(), + // }) + // } catch (error) { + // console.error('Error checking meta transaction status:', error) + // } + // } + + // // Add function to check precondition statuses + // const checkPreconditionStatuses = async () => { + // if (!intentPreconditions) return + + // const relayer = new LocalRelayer(publicClient) + // const statuses = await Promise.all( + // intentPreconditions.map(async (precondition) => { + // try { + // return await relayer.checkPrecondition(precondition) + // } catch (error) { + // console.error('Error checking precondition:', error) + // return false + // } + // }) + // ) + + // setPreconditionStatuses(statuses) + // } + const commitIntentConfigMutation = useMutation({ mutationFn: async (args: { walletAddress: string @@ -368,17 +418,38 @@ export const HomeIndexRoute = () => { setShowCustomCallForm(false) } - const handleSendOriginCall = async () => { - if (!intentOperations?.[0]?.calls?.[0] || !verificationStatus?.success) return + // Update handleSendOriginCall to track status + // const handleSendOriginCall = async () => { + // if (!intentOperations?.[0]?.calls?.[0] || !verificationStatus?.success) return - const call = intentOperations[0].calls[0] - await sendTransaction({ - to: call.to as `0x${string}`, - data: call.data as `0x${string}`, - value: BigInt(call.value || '0'), - chainId: parseInt(intentOperations[0].chainId), - }) - } + // const call = intentOperations[0].calls[0] + // const { hash } = await sendTransaction({ + // to: call.to as `0x${string}`, + // data: call.data as `0x${string}`, + // value: BigInt(call.value || '0'), + // chainId: parseInt(intentOperations[0].chainId), + // }) + + // if (hash) { + // setMetaTxnStatus({ txnHash: hash }) + // // Start polling for status + // const interval = setInterval(() => { + // checkMetaTxnStatus(hash) + // }, 5000) + + // // Cleanup interval after 5 minutes + // setTimeout(() => { + // clearInterval(interval) + // }, 300000) + // } + // } + + // Add useEffect to check precondition statuses when intentPreconditions changes + // useEffect(() => { + // if (intentPreconditions) { + // checkPreconditionStatuses() + // } + // }, [intentPreconditions]) return (
@@ -1175,7 +1246,7 @@ export const HomeIndexRoute = () => {
)} + + {/* 6. Relayer Status */} + {intentOperations && intentPreconditions && ( +
+
+
+ 6 +
+

Relayer Status

+
+
+ + + + + Meta Transaction Status + + (Track the status of your meta transaction) + + +
+
+ + Transaction Hash: + + {metaTxnStatus?.txnHash || 'Not sent yet'} + + +
+
+ + Status: + {metaTxnStatus?.status || 'Pending'} + +
+
+ + Revert Reason: + {metaTxnStatus?.revertReason || 'None'} + +
+
+ + + + + + Preconditions Status + + (Check if all preconditions are met) + + +
+ {intentPreconditions.map((precondition, index) => ( +
+ + + Precondition {index + 1} ({precondition.type}):{' '} + + + {preconditionStatuses[index] ? ( + Met + ) : ( + Not Met + )} + + +
+ ))} +
+ + + + + + Final Intent Status + + (Overall status of the intent execution) + + +
+
+ + Status: + {metaTxnStatus?.status || 'Pending'} + +
+
+ + Gas Used: + {metaTxnStatus?.gasUsed || '0'} + +
+
+ + Effective Gas Price: + {metaTxnStatus?.effectiveGasPrice || '0'} + +
+
+
+
+ )}
)}
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 3cad27521..7a60ab01a 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -47,6 +47,9 @@ importers: '@0xsequence/network': specifier: ^2.3.9 version: 2.3.9(ethers@6.13.5(bufferutil@4.0.9)(utf-8-validate@5.0.10)) + '@0xsequence/relayer': + specifier: workspace:* + version: link:../../packages/services/relayer '@0xsequence/wagmi-connector': specifier: ^4.0.1 version: 4.0.1(0xsequence@2.3.8(ethers@6.13.5(bufferutil@4.0.9)(utf-8-validate@5.0.10)))(ethers@6.13.5(bufferutil@4.0.9)(utf-8-validate@5.0.10))(viem@2.27.0(bufferutil@4.0.9)(typescript@5.7.3)(utf-8-validate@5.0.10)(zod@3.24.2))(wagmi@2.14.16(@tanstack/query-core@5.74.3)(@tanstack/react-query@5.74.3(react@19.0.0))(@types/react@19.1.2)(bufferutil@4.0.9)(react@19.0.0)(typescript@5.7.3)(utf-8-validate@5.0.10)(viem@2.27.0(bufferutil@4.0.9)(typescript@5.7.3)(utf-8-validate@5.0.10)(zod@3.24.2))(zod@3.24.2)) From 223e6356db33979115c9b2e3aa92b803076af812 Mon Sep 17 00:00:00 2001 From: Shun Kakinoki Date: Fri, 18 Apr 2025 16:58:45 +0900 Subject: [PATCH 346/439] Add rpc relayer --- packages/wallet/core/package.json | 3 +- packages/wallet/core/src/relayer/rpc/index.ts | 153 ++ .../core/src/relayer/rpc/relayer.gen.ts | 1918 +++++++++++++++++ pnpm-lock.yaml | 61 +- 4 files changed, 2133 insertions(+), 2 deletions(-) create mode 100644 packages/wallet/core/src/relayer/rpc/index.ts create mode 100644 packages/wallet/core/src/relayer/rpc/relayer.gen.ts diff --git a/packages/wallet/core/package.json b/packages/wallet/core/package.json index b4c01330d..ec2f6deb3 100644 --- a/packages/wallet/core/package.json +++ b/packages/wallet/core/package.json @@ -24,6 +24,7 @@ }, "dependencies": { "@0xsequence/wallet-primitives": "workspace:^", - "ox": "^0.6.7" + "ox": "^0.6.7", + "viem": "^2.27.2" } } diff --git a/packages/wallet/core/src/relayer/rpc/index.ts b/packages/wallet/core/src/relayer/rpc/index.ts new file mode 100644 index 000000000..76a636564 --- /dev/null +++ b/packages/wallet/core/src/relayer/rpc/index.ts @@ -0,0 +1,153 @@ +import { + Relayer as GenRelayer, + SendMetaTxnReturn as RpcSendMetaTxnReturn, + MetaTxn as RpcMetaTxn, + FeeTokenType, +} from './relayer.gen' +import { FeeOption, FeeQuote, OperationStatus, Relayer } from '../relayer' +import { Address, Hex, Bytes } from 'ox' +import { Payload, Precondition as PrimitivePrecondition } from '@0xsequence/wallet-primitives' +import { + IntentPrecondition as RpcIntentPrecondition, + ETHTxnStatus, + FeeOption as RpcFeeOption, + FeeToken as RpcFeeToken, +} from './relayer.gen' + +export type Fetch = (input: RequestInfo, init?: RequestInit) => Promise + +export class RpcRelayer implements Relayer { + public readonly id: string + private client: GenRelayer + private fetch: Fetch + + constructor(hostname: string, fetchImpl?: Fetch) { + this.id = `rpc:${hostname}` + const effectiveFetch = fetchImpl || (typeof window !== 'undefined' ? window.fetch.bind(window) : undefined) + if (!effectiveFetch) { + throw new Error('Fetch implementation is required but not available in this environment.') + } + this.fetch = effectiveFetch + this.client = new GenRelayer(hostname, this.fetch) + } + + async feeOptions( + wallet: Address.Address, + chainId: bigint, + calls: Payload.Call[], + ): Promise<{ options: FeeOption[]; quote?: FeeQuote }> { + const callsStruct: Payload.Calls = { type: 'call', space: 0n, nonce: 0n, calls: calls } + const data = Payload.encode(callsStruct) + + try { + const result = await this.client.feeOptions({ + wallet: wallet, + to: wallet, + data: Bytes.toHex(data), + }) + + const options = result.options.map(this.mapRpcFeeOptionToFeeOption) + const quote = result.quote ? ({ _tag: 'FeeQuote', _quote: result.quote } as FeeQuote) : undefined + + return { options, quote } + } catch (e) { + console.warn('RpcRelayer.feeOptions failed:', e) + return { options: [] } + } + } + + async relay( + to: Address.Address, + data: Hex.Hex, + chainId: bigint, + quote?: FeeQuote, + preconditions?: PrimitivePrecondition.Precondition[], + ): Promise<{ opHash: Hex.Hex }> { + const rpcPreconditions = preconditions?.map((p) => this.mapPrimitivePreconditionToRpc(p, chainId)) + + const rpcCall: RpcMetaTxn = { + walletAddress: to, + contract: to, + input: data, + } + + const result: RpcSendMetaTxnReturn = await this.client.sendMetaTxn({ + call: rpcCall, + quote: quote ? JSON.stringify(quote._quote) : undefined, + preconditions: rpcPreconditions, + }) + + if (!result.status) { + console.error('RpcRelayer.relay failed', result) + throw new Error(`Relay failed: TxnHash ${result.txnHash}`) + } + + return { opHash: Hex.fromString(result.txnHash) } + } + + async status(opHash: Hex.Hex, chainId: bigint): Promise { + try { + const result = await this.client.getMetaTxnReceipt({ metaTxID: Hex.toString(opHash) }) + const receipt = result.receipt + + switch (receipt.status as ETHTxnStatus) { + case ETHTxnStatus.QUEUED: + case ETHTxnStatus.PENDING_PRECONDITION: + case ETHTxnStatus.SENT: + return { status: 'pending' } + case ETHTxnStatus.SUCCEEDED: + return { status: 'confirmed', transactionHash: Hex.fromString(receipt.txnReceipt) } + case ETHTxnStatus.FAILED: + case ETHTxnStatus.PARTIALLY_FAILED: + return { status: 'failed', reason: receipt.revertReason || 'Relayer reported failure' } + case ETHTxnStatus.DROPPED: + return { status: 'failed', reason: 'Transaction dropped' } + case ETHTxnStatus.UNKNOWN: + default: + return { status: 'unknown' } + } + } catch (error) { + console.error(`RpcRelayer.status failed for opHash ${opHash}:`, error) + return { status: 'failed', reason: 'Failed to fetch status' } + } + } + + async checkPrecondition(precondition: PrimitivePrecondition.Precondition): Promise { + console.warn('RpcRelayer.checkPrecondition is not implemented and returns true by default.') + return true + } + + private mapRpcFeeOptionToFeeOption(rpcOption: RpcFeeOption): FeeOption { + return { + token: this.mapRpcFeeTokenToAddress(rpcOption.token), + to: rpcOption.to, + value: rpcOption.value, + gasLimit: rpcOption.gasLimit, + } + } + + private mapRpcFeeTokenToAddress(rpcToken: RpcFeeToken): Address.Address { + if (rpcToken.type === FeeTokenType.ERC20_TOKEN && rpcToken.contractAddress) { + return Address.from(rpcToken.contractAddress) + } + return '0x0000000000000000000000000000000000000000' + } + + private mapPrimitivePreconditionToRpc( + precondition: PrimitivePrecondition.Precondition, + chainId: bigint, + ): RpcIntentPrecondition { + const chainIdStr = chainId.toString() + const { type, ...data } = precondition + + const mappedData = Object.fromEntries( + Object.entries(data).map(([key, value]) => [key, typeof value === 'bigint' ? value.toString() : value]), + ) + + return { + type: type, + chainID: chainIdStr, + data: mappedData, + } + } +} diff --git a/packages/wallet/core/src/relayer/rpc/relayer.gen.ts b/packages/wallet/core/src/relayer/rpc/relayer.gen.ts new file mode 100644 index 000000000..f02460020 --- /dev/null +++ b/packages/wallet/core/src/relayer/rpc/relayer.gen.ts @@ -0,0 +1,1918 @@ +/* eslint-disable */ +// sequence-relayer v0.4.1 a463e842ad84863fe9b22f12a8ece89771f20610 +// -- +// Code generated by webrpc-gen@v0.24.0 with typescript generator. DO NOT EDIT. +// +// webrpc-gen -schema=relayer.ridl -target=typescript -client -out=./clients/relayer.gen.ts + +export const WebrpcHeader = 'Webrpc' + +export const WebrpcHeaderValue = 'webrpc@v0.24.0;gen-typescript@v0.16.3;sequence-relayer@v0.4.1' + +// WebRPC description and code-gen version +export const WebRPCVersion = 'v1' + +// Schema version of your RIDL schema +export const WebRPCSchemaVersion = 'v0.4.1' + +// Schema hash generated from your RIDL schema +export const WebRPCSchemaHash = 'a463e842ad84863fe9b22f12a8ece89771f20610' + +type WebrpcGenVersions = { + webrpcGenVersion: string + codeGenName: string + codeGenVersion: string + schemaName: string + schemaVersion: string +} + +export function VersionFromHeader(headers: Headers): WebrpcGenVersions { + const headerValue = headers.get(WebrpcHeader) + if (!headerValue) { + return { + webrpcGenVersion: '', + codeGenName: '', + codeGenVersion: '', + schemaName: '', + schemaVersion: '', + } + } + + return parseWebrpcGenVersions(headerValue) +} + +function parseWebrpcGenVersions(header: string): WebrpcGenVersions { + const versions = header.split(';') + if (versions.length < 3) { + return { + webrpcGenVersion: '', + codeGenName: '', + codeGenVersion: '', + schemaName: '', + schemaVersion: '', + } + } + + const [_, webrpcGenVersion] = versions[0]!.split('@') + const [codeGenName, codeGenVersion] = versions[1]!.split('@') + const [schemaName, schemaVersion] = versions[2]!.split('@') + + return { + webrpcGenVersion: webrpcGenVersion ?? '', + codeGenName: codeGenName ?? '', + codeGenVersion: codeGenVersion ?? '', + schemaName: schemaName ?? '', + schemaVersion: schemaVersion ?? '', + } +} + +// +// Types +// + +export enum ETHTxnStatus { + UNKNOWN = 'UNKNOWN', + DROPPED = 'DROPPED', + QUEUED = 'QUEUED', + SENT = 'SENT', + SUCCEEDED = 'SUCCEEDED', + PARTIALLY_FAILED = 'PARTIALLY_FAILED', + FAILED = 'FAILED', + PENDING_PRECONDITION = 'PENDING_PRECONDITION', +} + +export enum TransferType { + SEND = 'SEND', + RECEIVE = 'RECEIVE', + BRIDGE_DEPOSIT = 'BRIDGE_DEPOSIT', + BRIDGE_WITHDRAW = 'BRIDGE_WITHDRAW', + BURN = 'BURN', + UNKNOWN = 'UNKNOWN', +} + +export enum FeeTokenType { + UNKNOWN = 'UNKNOWN', + ERC20_TOKEN = 'ERC20_TOKEN', + ERC1155_TOKEN = 'ERC1155_TOKEN', +} + +export enum SortOrder { + DESC = 'DESC', + ASC = 'ASC', +} + +export interface Version { + webrpcVersion: string + schemaVersion: string + schemaHash: string + appVersion: string +} + +export interface RuntimeStatus { + healthOK: boolean + startTime: string + uptime: number + ver: string + branch: string + commitHash: string + chainID: number + useEIP1559: boolean + senders: Array + checks: RuntimeChecks +} + +export interface SenderStatus { + index: number + address: string + etherBalance: number + active: boolean +} + +export interface RuntimeChecks {} + +export interface SequenceContext { + factory: string + mainModule: string + mainModuleUpgradable: string + guestModule: string + utils: string +} + +export interface GasTank { + id: number + chainId: number + name: string + currentBalance: number + unlimited: boolean + feeMarkupFactor: number + updatedAt: string + createdAt: string +} + +export interface GasTankBalanceAdjustment { + gasTankId: number + nonce: number + amount: number + totalBalance: number + balanceTimestamp: string + createdAt: string +} + +export interface GasSponsor { + id: number + gasTankId: number + projectId: number + chainId: number + address: string + name: string + active: boolean + updatedAt: string + createdAt: string + deletedAt: string +} + +export interface GasSponsorUsage { + name: string + id: number + totalGasUsed: number + totalTxnFees: number + totalTxnFeesUsd: number + avgGasPrice: number + totalTxns: number + startTime: string + endTime: string +} + +export interface MetaTxn { + walletAddress: string + contract: string + input: string +} + +export interface MetaTxnLog { + id: number + chainId: number + projectId: number + txnHash: string + txnNonce: string + metaTxnID?: string + txnStatus: ETHTxnStatus + txnRevertReason: string + requeues: number + queuedAt: string + sentAt: string + minedAt: string + target: string + input: string + txnArgs: { [key: string]: any } + txnReceipt?: { [key: string]: any } + walletAddress: string + metaTxnNonce: string + gasLimit: number + gasPrice: string + gasUsed: number + gasEstimated: number + gasFeeMarkup?: number + usdRate: string + creditsUsed: number + cost: string + isWhitelisted: boolean + gasSponsor?: number + gasTank?: number + updatedAt: string + createdAt: string +} + +export interface MetaTxnReceipt { + id: string + status: string + revertReason?: string + index: number + logs: Array + receipts: Array + txnReceipt: string +} + +export interface MetaTxnReceiptLog { + address: string + topics: Array + data: string +} + +export interface IntentPrecondition { + type: string + chainID: string + data: any +} + +export interface IntentSolution { + transactions: Array +} + +export interface Transactions { + chainID: string + transactions: Array + preconditions?: Array +} + +export interface Transaction { + delegateCall: boolean + revertOnError: boolean + gasLimit: string + target: string + value: string + data: string +} + +export interface TxnLogUser { + username: string +} + +export interface TxnLogTransfer { + transferType: TransferType + contractAddress: string + from: string + to: string + ids: Array + amounts: Array +} + +export interface SentTransactionsFilter { + pending?: boolean + failed?: boolean +} + +export interface SimulateResult { + executed: boolean + succeeded: boolean + result?: string + reason?: string + gasUsed: number + gasLimit: number +} + +export interface FeeOption { + token: FeeToken + to: string + value: string + gasLimit: number +} + +export interface FeeToken { + chainId: number + name: string + symbol: string + type: FeeTokenType + decimals?: number + logoURL: string + contractAddress?: string + tokenID?: string +} + +export interface Page { + pageSize?: number + page?: number + more?: boolean + totalRecords?: number + column?: string + before?: any + after?: any + sort?: Array +} + +export interface SortBy { + column: string + order: SortOrder +} + +export interface Relayer { + ping(headers?: object, signal?: AbortSignal): Promise + version(headers?: object, signal?: AbortSignal): Promise + runtimeStatus(headers?: object, signal?: AbortSignal): Promise + getSequenceContext(headers?: object, signal?: AbortSignal): Promise + getChainID(headers?: object, signal?: AbortSignal): Promise + sendMetaTxn(args: SendMetaTxnArgs, headers?: object, signal?: AbortSignal): Promise + getMetaTxnNonce(args: GetMetaTxnNonceArgs, headers?: object, signal?: AbortSignal): Promise + getMetaTxnReceipt( + args: GetMetaTxnReceiptArgs, + headers?: object, + signal?: AbortSignal, + ): Promise + simulate(args: SimulateArgs, headers?: object, signal?: AbortSignal): Promise + updateMetaTxnGasLimits( + args: UpdateMetaTxnGasLimitsArgs, + headers?: object, + signal?: AbortSignal, + ): Promise + feeTokens(headers?: object, signal?: AbortSignal): Promise + feeOptions(args: FeeOptionsArgs, headers?: object, signal?: AbortSignal): Promise + getMetaTxnNetworkFeeOptions( + args: GetMetaTxnNetworkFeeOptionsArgs, + headers?: object, + signal?: AbortSignal, + ): Promise + getMetaTransactions( + args: GetMetaTransactionsArgs, + headers?: object, + signal?: AbortSignal, + ): Promise + getTransactionCost( + args: GetTransactionCostArgs, + headers?: object, + signal?: AbortSignal, + ): Promise + sentTransactions(args: SentTransactionsArgs, headers?: object, signal?: AbortSignal): Promise + pendingTransactions( + args: PendingTransactionsArgs, + headers?: object, + signal?: AbortSignal, + ): Promise + getGasTank(args: GetGasTankArgs, headers?: object, signal?: AbortSignal): Promise + addGasTank(args: AddGasTankArgs, headers?: object, signal?: AbortSignal): Promise + updateGasTank(args: UpdateGasTankArgs, headers?: object, signal?: AbortSignal): Promise + nextGasTankBalanceAdjustmentNonce( + args: NextGasTankBalanceAdjustmentNonceArgs, + headers?: object, + signal?: AbortSignal, + ): Promise + adjustGasTankBalance( + args: AdjustGasTankBalanceArgs, + headers?: object, + signal?: AbortSignal, + ): Promise + getGasTankBalanceAdjustment( + args: GetGasTankBalanceAdjustmentArgs, + headers?: object, + signal?: AbortSignal, + ): Promise + listGasTankBalanceAdjustments( + args: ListGasTankBalanceAdjustmentsArgs, + headers?: object, + signal?: AbortSignal, + ): Promise + listGasSponsors(args: ListGasSponsorsArgs, headers?: object, signal?: AbortSignal): Promise + getGasSponsor(args: GetGasSponsorArgs, headers?: object, signal?: AbortSignal): Promise + addGasSponsor(args: AddGasSponsorArgs, headers?: object, signal?: AbortSignal): Promise + updateGasSponsor(args: UpdateGasSponsorArgs, headers?: object, signal?: AbortSignal): Promise + removeGasSponsor(args: RemoveGasSponsorArgs, headers?: object, signal?: AbortSignal): Promise + addressGasSponsors( + args: AddressGasSponsorsArgs, + headers?: object, + signal?: AbortSignal, + ): Promise + getProjectBalance( + args: GetProjectBalanceArgs, + headers?: object, + signal?: AbortSignal, + ): Promise + adjustProjectBalance( + args: AdjustProjectBalanceArgs, + headers?: object, + signal?: AbortSignal, + ): Promise +} + +export interface PingArgs {} + +export interface PingReturn { + status: boolean +} +export interface VersionArgs {} + +export interface VersionReturn { + version: Version +} +export interface RuntimeStatusArgs {} + +export interface RuntimeStatusReturn { + status: RuntimeStatus +} +export interface GetSequenceContextArgs {} + +export interface GetSequenceContextReturn { + data: SequenceContext +} +export interface GetChainIDArgs {} + +export interface GetChainIDReturn { + chainID: number +} +export interface SendMetaTxnArgs { + call: MetaTxn + quote?: string + projectID?: number + preconditions?: Array +} + +export interface SendMetaTxnReturn { + status: boolean + txnHash: string +} +export interface GetMetaTxnNonceArgs { + walletContractAddress: string + space?: string +} + +export interface GetMetaTxnNonceReturn { + nonce: string +} +export interface GetMetaTxnReceiptArgs { + metaTxID: string +} + +export interface GetMetaTxnReceiptReturn { + receipt: MetaTxnReceipt +} +export interface SimulateArgs { + wallet: string + transactions: string +} + +export interface SimulateReturn { + results: Array +} +export interface UpdateMetaTxnGasLimitsArgs { + walletAddress: string + walletConfig: any + payload: string +} + +export interface UpdateMetaTxnGasLimitsReturn { + payload: string +} +export interface FeeTokensArgs {} + +export interface FeeTokensReturn { + isFeeRequired: boolean + tokens: Array +} +export interface FeeOptionsArgs { + wallet: string + to: string + data: string + simulate?: boolean +} + +export interface FeeOptionsReturn { + options: Array + sponsored: boolean + quote?: string +} +export interface GetMetaTxnNetworkFeeOptionsArgs { + walletConfig: any + payload: string +} + +export interface GetMetaTxnNetworkFeeOptionsReturn { + options: Array +} +export interface GetMetaTransactionsArgs { + projectId: number + page?: Page +} + +export interface GetMetaTransactionsReturn { + page: Page + transactions: Array +} +export interface GetTransactionCostArgs { + projectId: number + from: string + to: string +} + +export interface GetTransactionCostReturn { + cost: number +} +export interface SentTransactionsArgs { + filter?: SentTransactionsFilter + page?: Page +} + +export interface SentTransactionsReturn { + page: Page + transactions: Array +} +export interface PendingTransactionsArgs { + page?: Page +} + +export interface PendingTransactionsReturn { + page: Page + transactions: Array +} +export interface GetGasTankArgs { + id: number +} + +export interface GetGasTankReturn { + gasTank: GasTank +} +export interface AddGasTankArgs { + name: string + feeMarkupFactor: number + unlimited?: boolean +} + +export interface AddGasTankReturn { + status: boolean + gasTank: GasTank +} +export interface UpdateGasTankArgs { + id: number + name?: string + feeMarkupFactor?: number + unlimited?: boolean +} + +export interface UpdateGasTankReturn { + status: boolean + gasTank: GasTank +} +export interface NextGasTankBalanceAdjustmentNonceArgs { + id: number +} + +export interface NextGasTankBalanceAdjustmentNonceReturn { + nonce: number +} +export interface AdjustGasTankBalanceArgs { + id: number + nonce: number + amount: number +} + +export interface AdjustGasTankBalanceReturn { + status: boolean + adjustment: GasTankBalanceAdjustment +} +export interface GetGasTankBalanceAdjustmentArgs { + id: number + nonce: number +} + +export interface GetGasTankBalanceAdjustmentReturn { + adjustment: GasTankBalanceAdjustment +} +export interface ListGasTankBalanceAdjustmentsArgs { + id: number + page?: Page +} + +export interface ListGasTankBalanceAdjustmentsReturn { + page: Page + adjustments: Array +} +export interface ListGasSponsorsArgs { + projectId: number + page?: Page +} + +export interface ListGasSponsorsReturn { + page: Page + gasSponsors: Array +} +export interface GetGasSponsorArgs { + projectId: number + id: number +} + +export interface GetGasSponsorReturn { + gasSponsor: GasSponsor +} +export interface AddGasSponsorArgs { + projectId: number + address: string + name?: string + active?: boolean +} + +export interface AddGasSponsorReturn { + status: boolean + gasSponsor: GasSponsor +} +export interface UpdateGasSponsorArgs { + projectId: number + id: number + name?: string + active?: boolean +} + +export interface UpdateGasSponsorReturn { + status: boolean + gasSponsor: GasSponsor +} +export interface RemoveGasSponsorArgs { + projectId: number + id: number +} + +export interface RemoveGasSponsorReturn { + status: boolean +} +export interface AddressGasSponsorsArgs { + address: string + page?: Page +} + +export interface AddressGasSponsorsReturn { + page: Page + gasSponsors: Array +} +export interface GetProjectBalanceArgs { + projectId: number +} + +export interface GetProjectBalanceReturn { + balance: number +} +export interface AdjustProjectBalanceArgs { + projectId: number + amount: number + identifier: string +} + +export interface AdjustProjectBalanceReturn { + balance: number +} + +// +// Client +// +export class Relayer implements Relayer { + protected hostname: string + protected fetch: Fetch + protected path = '/rpc/Relayer/' + + constructor(hostname: string, fetch: Fetch) { + this.hostname = hostname.replace(/\/*$/, '') + this.fetch = (input: RequestInfo, init?: RequestInit) => fetch(input, init) + } + + private url(name: string): string { + return this.hostname + this.path + name + } + + ping = (headers?: object, signal?: AbortSignal): Promise => { + return this.fetch(this.url('Ping'), createHTTPRequest({}, headers, signal)).then( + (res) => { + return buildResponse(res).then((_data) => { + return { + status: _data.status, + } + }) + }, + (error) => { + throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) + }, + ) + } + + version = (headers?: object, signal?: AbortSignal): Promise => { + return this.fetch(this.url('Version'), createHTTPRequest({}, headers, signal)).then( + (res) => { + return buildResponse(res).then((_data) => { + return { + version: _data.version, + } + }) + }, + (error) => { + throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) + }, + ) + } + + runtimeStatus = (headers?: object, signal?: AbortSignal): Promise => { + return this.fetch(this.url('RuntimeStatus'), createHTTPRequest({}, headers, signal)).then( + (res) => { + return buildResponse(res).then((_data) => { + return { + status: _data.status, + } + }) + }, + (error) => { + throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) + }, + ) + } + + getSequenceContext = (headers?: object, signal?: AbortSignal): Promise => { + return this.fetch(this.url('GetSequenceContext'), createHTTPRequest({}, headers, signal)).then( + (res) => { + return buildResponse(res).then((_data) => { + return { + data: _data.data, + } + }) + }, + (error) => { + throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) + }, + ) + } + + getChainID = (headers?: object, signal?: AbortSignal): Promise => { + return this.fetch(this.url('GetChainID'), createHTTPRequest({}, headers, signal)).then( + (res) => { + return buildResponse(res).then((_data) => { + return { + chainID: _data.chainID, + } + }) + }, + (error) => { + throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) + }, + ) + } + + sendMetaTxn = (args: SendMetaTxnArgs, headers?: object, signal?: AbortSignal): Promise => { + return this.fetch(this.url('SendMetaTxn'), createHTTPRequest(args, headers, signal)).then( + (res) => { + return buildResponse(res).then((_data) => { + return { + status: _data.status, + txnHash: _data.txnHash, + } + }) + }, + (error) => { + throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) + }, + ) + } + + getMetaTxnNonce = ( + args: GetMetaTxnNonceArgs, + headers?: object, + signal?: AbortSignal, + ): Promise => { + return this.fetch(this.url('GetMetaTxnNonce'), createHTTPRequest(args, headers, signal)).then( + (res) => { + return buildResponse(res).then((_data) => { + return { + nonce: _data.nonce, + } + }) + }, + (error) => { + throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) + }, + ) + } + + getMetaTxnReceipt = ( + args: GetMetaTxnReceiptArgs, + headers?: object, + signal?: AbortSignal, + ): Promise => { + return this.fetch(this.url('GetMetaTxnReceipt'), createHTTPRequest(args, headers, signal)).then( + (res) => { + return buildResponse(res).then((_data) => { + return { + receipt: _data.receipt, + } + }) + }, + (error) => { + throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) + }, + ) + } + + simulate = (args: SimulateArgs, headers?: object, signal?: AbortSignal): Promise => { + return this.fetch(this.url('Simulate'), createHTTPRequest(args, headers, signal)).then( + (res) => { + return buildResponse(res).then((_data) => { + return { + results: >_data.results, + } + }) + }, + (error) => { + throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) + }, + ) + } + + updateMetaTxnGasLimits = ( + args: UpdateMetaTxnGasLimitsArgs, + headers?: object, + signal?: AbortSignal, + ): Promise => { + return this.fetch(this.url('UpdateMetaTxnGasLimits'), createHTTPRequest(args, headers, signal)).then( + (res) => { + return buildResponse(res).then((_data) => { + return { + payload: _data.payload, + } + }) + }, + (error) => { + throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) + }, + ) + } + + feeTokens = (headers?: object, signal?: AbortSignal): Promise => { + return this.fetch(this.url('FeeTokens'), createHTTPRequest({}, headers, signal)).then( + (res) => { + return buildResponse(res).then((_data) => { + return { + isFeeRequired: _data.isFeeRequired, + tokens: >_data.tokens, + } + }) + }, + (error) => { + throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) + }, + ) + } + + feeOptions = (args: FeeOptionsArgs, headers?: object, signal?: AbortSignal): Promise => { + return this.fetch(this.url('FeeOptions'), createHTTPRequest(args, headers, signal)).then( + (res) => { + return buildResponse(res).then((_data) => { + return { + options: >_data.options, + sponsored: _data.sponsored, + quote: _data.quote, + } + }) + }, + (error) => { + throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) + }, + ) + } + + getMetaTxnNetworkFeeOptions = ( + args: GetMetaTxnNetworkFeeOptionsArgs, + headers?: object, + signal?: AbortSignal, + ): Promise => { + return this.fetch(this.url('GetMetaTxnNetworkFeeOptions'), createHTTPRequest(args, headers, signal)).then( + (res) => { + return buildResponse(res).then((_data) => { + return { + options: >_data.options, + } + }) + }, + (error) => { + throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) + }, + ) + } + + getMetaTransactions = ( + args: GetMetaTransactionsArgs, + headers?: object, + signal?: AbortSignal, + ): Promise => { + return this.fetch(this.url('GetMetaTransactions'), createHTTPRequest(args, headers, signal)).then( + (res) => { + return buildResponse(res).then((_data) => { + return { + page: _data.page, + transactions: >_data.transactions, + } + }) + }, + (error) => { + throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) + }, + ) + } + + getTransactionCost = ( + args: GetTransactionCostArgs, + headers?: object, + signal?: AbortSignal, + ): Promise => { + return this.fetch(this.url('GetTransactionCost'), createHTTPRequest(args, headers, signal)).then( + (res) => { + return buildResponse(res).then((_data) => { + return { + cost: _data.cost, + } + }) + }, + (error) => { + throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) + }, + ) + } + + sentTransactions = ( + args: SentTransactionsArgs, + headers?: object, + signal?: AbortSignal, + ): Promise => { + return this.fetch(this.url('SentTransactions'), createHTTPRequest(args, headers, signal)).then( + (res) => { + return buildResponse(res).then((_data) => { + return { + page: _data.page, + transactions: >_data.transactions, + } + }) + }, + (error) => { + throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) + }, + ) + } + + pendingTransactions = ( + args: PendingTransactionsArgs, + headers?: object, + signal?: AbortSignal, + ): Promise => { + return this.fetch(this.url('PendingTransactions'), createHTTPRequest(args, headers, signal)).then( + (res) => { + return buildResponse(res).then((_data) => { + return { + page: _data.page, + transactions: >_data.transactions, + } + }) + }, + (error) => { + throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) + }, + ) + } + + getGasTank = (args: GetGasTankArgs, headers?: object, signal?: AbortSignal): Promise => { + return this.fetch(this.url('GetGasTank'), createHTTPRequest(args, headers, signal)).then( + (res) => { + return buildResponse(res).then((_data) => { + return { + gasTank: _data.gasTank, + } + }) + }, + (error) => { + throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) + }, + ) + } + + addGasTank = (args: AddGasTankArgs, headers?: object, signal?: AbortSignal): Promise => { + return this.fetch(this.url('AddGasTank'), createHTTPRequest(args, headers, signal)).then( + (res) => { + return buildResponse(res).then((_data) => { + return { + status: _data.status, + gasTank: _data.gasTank, + } + }) + }, + (error) => { + throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) + }, + ) + } + + updateGasTank = (args: UpdateGasTankArgs, headers?: object, signal?: AbortSignal): Promise => { + return this.fetch(this.url('UpdateGasTank'), createHTTPRequest(args, headers, signal)).then( + (res) => { + return buildResponse(res).then((_data) => { + return { + status: _data.status, + gasTank: _data.gasTank, + } + }) + }, + (error) => { + throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) + }, + ) + } + + nextGasTankBalanceAdjustmentNonce = ( + args: NextGasTankBalanceAdjustmentNonceArgs, + headers?: object, + signal?: AbortSignal, + ): Promise => { + return this.fetch(this.url('NextGasTankBalanceAdjustmentNonce'), createHTTPRequest(args, headers, signal)).then( + (res) => { + return buildResponse(res).then((_data) => { + return { + nonce: _data.nonce, + } + }) + }, + (error) => { + throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) + }, + ) + } + + adjustGasTankBalance = ( + args: AdjustGasTankBalanceArgs, + headers?: object, + signal?: AbortSignal, + ): Promise => { + return this.fetch(this.url('AdjustGasTankBalance'), createHTTPRequest(args, headers, signal)).then( + (res) => { + return buildResponse(res).then((_data) => { + return { + status: _data.status, + adjustment: _data.adjustment, + } + }) + }, + (error) => { + throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) + }, + ) + } + + getGasTankBalanceAdjustment = ( + args: GetGasTankBalanceAdjustmentArgs, + headers?: object, + signal?: AbortSignal, + ): Promise => { + return this.fetch(this.url('GetGasTankBalanceAdjustment'), createHTTPRequest(args, headers, signal)).then( + (res) => { + return buildResponse(res).then((_data) => { + return { + adjustment: _data.adjustment, + } + }) + }, + (error) => { + throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) + }, + ) + } + + listGasTankBalanceAdjustments = ( + args: ListGasTankBalanceAdjustmentsArgs, + headers?: object, + signal?: AbortSignal, + ): Promise => { + return this.fetch(this.url('ListGasTankBalanceAdjustments'), createHTTPRequest(args, headers, signal)).then( + (res) => { + return buildResponse(res).then((_data) => { + return { + page: _data.page, + adjustments: >_data.adjustments, + } + }) + }, + (error) => { + throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) + }, + ) + } + + listGasSponsors = ( + args: ListGasSponsorsArgs, + headers?: object, + signal?: AbortSignal, + ): Promise => { + return this.fetch(this.url('ListGasSponsors'), createHTTPRequest(args, headers, signal)).then( + (res) => { + return buildResponse(res).then((_data) => { + return { + page: _data.page, + gasSponsors: >_data.gasSponsors, + } + }) + }, + (error) => { + throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) + }, + ) + } + + getGasSponsor = (args: GetGasSponsorArgs, headers?: object, signal?: AbortSignal): Promise => { + return this.fetch(this.url('GetGasSponsor'), createHTTPRequest(args, headers, signal)).then( + (res) => { + return buildResponse(res).then((_data) => { + return { + gasSponsor: _data.gasSponsor, + } + }) + }, + (error) => { + throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) + }, + ) + } + + addGasSponsor = (args: AddGasSponsorArgs, headers?: object, signal?: AbortSignal): Promise => { + return this.fetch(this.url('AddGasSponsor'), createHTTPRequest(args, headers, signal)).then( + (res) => { + return buildResponse(res).then((_data) => { + return { + status: _data.status, + gasSponsor: _data.gasSponsor, + } + }) + }, + (error) => { + throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) + }, + ) + } + + updateGasSponsor = ( + args: UpdateGasSponsorArgs, + headers?: object, + signal?: AbortSignal, + ): Promise => { + return this.fetch(this.url('UpdateGasSponsor'), createHTTPRequest(args, headers, signal)).then( + (res) => { + return buildResponse(res).then((_data) => { + return { + status: _data.status, + gasSponsor: _data.gasSponsor, + } + }) + }, + (error) => { + throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) + }, + ) + } + + removeGasSponsor = ( + args: RemoveGasSponsorArgs, + headers?: object, + signal?: AbortSignal, + ): Promise => { + return this.fetch(this.url('RemoveGasSponsor'), createHTTPRequest(args, headers, signal)).then( + (res) => { + return buildResponse(res).then((_data) => { + return { + status: _data.status, + } + }) + }, + (error) => { + throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) + }, + ) + } + + addressGasSponsors = ( + args: AddressGasSponsorsArgs, + headers?: object, + signal?: AbortSignal, + ): Promise => { + return this.fetch(this.url('AddressGasSponsors'), createHTTPRequest(args, headers, signal)).then( + (res) => { + return buildResponse(res).then((_data) => { + return { + page: _data.page, + gasSponsors: >_data.gasSponsors, + } + }) + }, + (error) => { + throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) + }, + ) + } + + getProjectBalance = ( + args: GetProjectBalanceArgs, + headers?: object, + signal?: AbortSignal, + ): Promise => { + return this.fetch(this.url('GetProjectBalance'), createHTTPRequest(args, headers, signal)).then( + (res) => { + return buildResponse(res).then((_data) => { + return { + balance: _data.balance, + } + }) + }, + (error) => { + throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) + }, + ) + } + + adjustProjectBalance = ( + args: AdjustProjectBalanceArgs, + headers?: object, + signal?: AbortSignal, + ): Promise => { + return this.fetch(this.url('AdjustProjectBalance'), createHTTPRequest(args, headers, signal)).then( + (res) => { + return buildResponse(res).then((_data) => { + return { + balance: _data.balance, + } + }) + }, + (error) => { + throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) + }, + ) + } +} + +const createHTTPRequest = (body: object = {}, headers: object = {}, signal: AbortSignal | null = null): object => { + const reqHeaders: { [key: string]: string } = { ...headers, 'Content-Type': 'application/json' } + reqHeaders[WebrpcHeader] = WebrpcHeaderValue + + return { + method: 'POST', + headers: reqHeaders, + body: JSON.stringify(body || {}), + signal, + } +} + +const buildResponse = (res: Response): Promise => { + return res.text().then((text) => { + let data + try { + data = JSON.parse(text) + } catch (error) { + let message = '' + if (error instanceof Error) { + message = error.message + } + throw WebrpcBadResponseError.new({ + status: res.status, + cause: `JSON.parse(): ${message}: response text: ${text}`, + }) + } + if (!res.ok) { + const code: number = typeof data.code === 'number' ? data.code : 0 + throw (webrpcErrorByCode[code] || WebrpcError).new(data) + } + return data + }) +} + +// +// Errors +// + +export class WebrpcError extends Error { + name: string + code: number + message: string + status: number + cause?: string + + /** @deprecated Use message instead of msg. Deprecated in webrpc v0.11.0. */ + msg: string + + constructor(name: string, code: number, message: string, status: number, cause?: string) { + super(message) + this.name = name || 'WebrpcError' + this.code = typeof code === 'number' ? code : 0 + this.message = message || `endpoint error ${this.code}` + this.msg = this.message + this.status = typeof status === 'number' ? status : 0 + this.cause = cause + Object.setPrototypeOf(this, WebrpcError.prototype) + } + + static new(payload: any): WebrpcError { + return new this(payload.error, payload.code, payload.message || payload.msg, payload.status, payload.cause) + } +} + +// Webrpc errors + +export class WebrpcEndpointError extends WebrpcError { + constructor( + name: string = 'WebrpcEndpoint', + code: number = 0, + message: string = `endpoint error`, + status: number = 0, + cause?: string, + ) { + super(name, code, message, status, cause) + Object.setPrototypeOf(this, WebrpcEndpointError.prototype) + } +} + +export class WebrpcRequestFailedError extends WebrpcError { + constructor( + name: string = 'WebrpcRequestFailed', + code: number = -1, + message: string = `request failed`, + status: number = 0, + cause?: string, + ) { + super(name, code, message, status, cause) + Object.setPrototypeOf(this, WebrpcRequestFailedError.prototype) + } +} + +export class WebrpcBadRouteError extends WebrpcError { + constructor( + name: string = 'WebrpcBadRoute', + code: number = -2, + message: string = `bad route`, + status: number = 0, + cause?: string, + ) { + super(name, code, message, status, cause) + Object.setPrototypeOf(this, WebrpcBadRouteError.prototype) + } +} + +export class WebrpcBadMethodError extends WebrpcError { + constructor( + name: string = 'WebrpcBadMethod', + code: number = -3, + message: string = `bad method`, + status: number = 0, + cause?: string, + ) { + super(name, code, message, status, cause) + Object.setPrototypeOf(this, WebrpcBadMethodError.prototype) + } +} + +export class WebrpcBadRequestError extends WebrpcError { + constructor( + name: string = 'WebrpcBadRequest', + code: number = -4, + message: string = `bad request`, + status: number = 0, + cause?: string, + ) { + super(name, code, message, status, cause) + Object.setPrototypeOf(this, WebrpcBadRequestError.prototype) + } +} + +export class WebrpcBadResponseError extends WebrpcError { + constructor( + name: string = 'WebrpcBadResponse', + code: number = -5, + message: string = `bad response`, + status: number = 0, + cause?: string, + ) { + super(name, code, message, status, cause) + Object.setPrototypeOf(this, WebrpcBadResponseError.prototype) + } +} + +export class WebrpcServerPanicError extends WebrpcError { + constructor( + name: string = 'WebrpcServerPanic', + code: number = -6, + message: string = `server panic`, + status: number = 0, + cause?: string, + ) { + super(name, code, message, status, cause) + Object.setPrototypeOf(this, WebrpcServerPanicError.prototype) + } +} + +export class WebrpcInternalErrorError extends WebrpcError { + constructor( + name: string = 'WebrpcInternalError', + code: number = -7, + message: string = `internal error`, + status: number = 0, + cause?: string, + ) { + super(name, code, message, status, cause) + Object.setPrototypeOf(this, WebrpcInternalErrorError.prototype) + } +} + +export class WebrpcClientDisconnectedError extends WebrpcError { + constructor( + name: string = 'WebrpcClientDisconnected', + code: number = -8, + message: string = `client disconnected`, + status: number = 0, + cause?: string, + ) { + super(name, code, message, status, cause) + Object.setPrototypeOf(this, WebrpcClientDisconnectedError.prototype) + } +} + +export class WebrpcStreamLostError extends WebrpcError { + constructor( + name: string = 'WebrpcStreamLost', + code: number = -9, + message: string = `stream lost`, + status: number = 0, + cause?: string, + ) { + super(name, code, message, status, cause) + Object.setPrototypeOf(this, WebrpcStreamLostError.prototype) + } +} + +export class WebrpcStreamFinishedError extends WebrpcError { + constructor( + name: string = 'WebrpcStreamFinished', + code: number = -10, + message: string = `stream finished`, + status: number = 0, + cause?: string, + ) { + super(name, code, message, status, cause) + Object.setPrototypeOf(this, WebrpcStreamFinishedError.prototype) + } +} + +// Schema errors + +export class UnauthorizedError extends WebrpcError { + constructor( + name: string = 'Unauthorized', + code: number = 1000, + message: string = `Unauthorized access`, + status: number = 0, + cause?: string, + ) { + super(name, code, message, status, cause) + Object.setPrototypeOf(this, UnauthorizedError.prototype) + } +} + +export class PermissionDeniedError extends WebrpcError { + constructor( + name: string = 'PermissionDenied', + code: number = 1001, + message: string = `Permission denied`, + status: number = 0, + cause?: string, + ) { + super(name, code, message, status, cause) + Object.setPrototypeOf(this, PermissionDeniedError.prototype) + } +} + +export class SessionExpiredError extends WebrpcError { + constructor( + name: string = 'SessionExpired', + code: number = 1002, + message: string = `Session expired`, + status: number = 0, + cause?: string, + ) { + super(name, code, message, status, cause) + Object.setPrototypeOf(this, SessionExpiredError.prototype) + } +} + +export class MethodNotFoundError extends WebrpcError { + constructor( + name: string = 'MethodNotFound', + code: number = 1003, + message: string = `Method not found`, + status: number = 0, + cause?: string, + ) { + super(name, code, message, status, cause) + Object.setPrototypeOf(this, MethodNotFoundError.prototype) + } +} + +export class RequestConflictError extends WebrpcError { + constructor( + name: string = 'RequestConflict', + code: number = 1004, + message: string = `Conflict with target resource`, + status: number = 0, + cause?: string, + ) { + super(name, code, message, status, cause) + Object.setPrototypeOf(this, RequestConflictError.prototype) + } +} + +export class AbortedError extends WebrpcError { + constructor( + name: string = 'Aborted', + code: number = 1005, + message: string = `Request aborted`, + status: number = 0, + cause?: string, + ) { + super(name, code, message, status, cause) + Object.setPrototypeOf(this, AbortedError.prototype) + } +} + +export class GeoblockedError extends WebrpcError { + constructor( + name: string = 'Geoblocked', + code: number = 1006, + message: string = `Geoblocked region`, + status: number = 0, + cause?: string, + ) { + super(name, code, message, status, cause) + Object.setPrototypeOf(this, GeoblockedError.prototype) + } +} + +export class RateLimitedError extends WebrpcError { + constructor( + name: string = 'RateLimited', + code: number = 1007, + message: string = `Rate-limited. Please slow down.`, + status: number = 0, + cause?: string, + ) { + super(name, code, message, status, cause) + Object.setPrototypeOf(this, RateLimitedError.prototype) + } +} + +export class ProjectNotFoundError extends WebrpcError { + constructor( + name: string = 'ProjectNotFound', + code: number = 1008, + message: string = `Project not found`, + status: number = 0, + cause?: string, + ) { + super(name, code, message, status, cause) + Object.setPrototypeOf(this, ProjectNotFoundError.prototype) + } +} + +export class AccessKeyNotFoundError extends WebrpcError { + constructor( + name: string = 'AccessKeyNotFound', + code: number = 1101, + message: string = `Access key not found`, + status: number = 0, + cause?: string, + ) { + super(name, code, message, status, cause) + Object.setPrototypeOf(this, AccessKeyNotFoundError.prototype) + } +} + +export class AccessKeyMismatchError extends WebrpcError { + constructor( + name: string = 'AccessKeyMismatch', + code: number = 1102, + message: string = `Access key mismatch`, + status: number = 0, + cause?: string, + ) { + super(name, code, message, status, cause) + Object.setPrototypeOf(this, AccessKeyMismatchError.prototype) + } +} + +export class InvalidOriginError extends WebrpcError { + constructor( + name: string = 'InvalidOrigin', + code: number = 1103, + message: string = `Invalid origin for Access Key`, + status: number = 0, + cause?: string, + ) { + super(name, code, message, status, cause) + Object.setPrototypeOf(this, InvalidOriginError.prototype) + } +} + +export class InvalidServiceError extends WebrpcError { + constructor( + name: string = 'InvalidService', + code: number = 1104, + message: string = `Service not enabled for Access key`, + status: number = 0, + cause?: string, + ) { + super(name, code, message, status, cause) + Object.setPrototypeOf(this, InvalidServiceError.prototype) + } +} + +export class UnauthorizedUserError extends WebrpcError { + constructor( + name: string = 'UnauthorizedUser', + code: number = 1105, + message: string = `Unauthorized user`, + status: number = 0, + cause?: string, + ) { + super(name, code, message, status, cause) + Object.setPrototypeOf(this, UnauthorizedUserError.prototype) + } +} + +export class QuotaExceededError extends WebrpcError { + constructor( + name: string = 'QuotaExceeded', + code: number = 1200, + message: string = `Quota request exceeded`, + status: number = 0, + cause?: string, + ) { + super(name, code, message, status, cause) + Object.setPrototypeOf(this, QuotaExceededError.prototype) + } +} + +export class QuotaRateLimitError extends WebrpcError { + constructor( + name: string = 'QuotaRateLimit', + code: number = 1201, + message: string = `Quota rate limit exceeded`, + status: number = 0, + cause?: string, + ) { + super(name, code, message, status, cause) + Object.setPrototypeOf(this, QuotaRateLimitError.prototype) + } +} + +export class NoDefaultKeyError extends WebrpcError { + constructor( + name: string = 'NoDefaultKey', + code: number = 1300, + message: string = `No default access key found`, + status: number = 0, + cause?: string, + ) { + super(name, code, message, status, cause) + Object.setPrototypeOf(this, NoDefaultKeyError.prototype) + } +} + +export class MaxAccessKeysError extends WebrpcError { + constructor( + name: string = 'MaxAccessKeys', + code: number = 1301, + message: string = `Access keys limit reached`, + status: number = 0, + cause?: string, + ) { + super(name, code, message, status, cause) + Object.setPrototypeOf(this, MaxAccessKeysError.prototype) + } +} + +export class AtLeastOneKeyError extends WebrpcError { + constructor( + name: string = 'AtLeastOneKey', + code: number = 1302, + message: string = `You need at least one Access Key`, + status: number = 0, + cause?: string, + ) { + super(name, code, message, status, cause) + Object.setPrototypeOf(this, AtLeastOneKeyError.prototype) + } +} + +export class TimeoutError extends WebrpcError { + constructor( + name: string = 'Timeout', + code: number = 1900, + message: string = `Request timed out`, + status: number = 0, + cause?: string, + ) { + super(name, code, message, status, cause) + Object.setPrototypeOf(this, TimeoutError.prototype) + } +} + +export class InvalidArgumentError extends WebrpcError { + constructor( + name: string = 'InvalidArgument', + code: number = 2001, + message: string = `Invalid argument`, + status: number = 0, + cause?: string, + ) { + super(name, code, message, status, cause) + Object.setPrototypeOf(this, InvalidArgumentError.prototype) + } +} + +export class UnavailableError extends WebrpcError { + constructor( + name: string = 'Unavailable', + code: number = 2002, + message: string = `Unavailable resource`, + status: number = 0, + cause?: string, + ) { + super(name, code, message, status, cause) + Object.setPrototypeOf(this, UnavailableError.prototype) + } +} + +export class QueryFailedError extends WebrpcError { + constructor( + name: string = 'QueryFailed', + code: number = 2003, + message: string = `Query failed`, + status: number = 0, + cause?: string, + ) { + super(name, code, message, status, cause) + Object.setPrototypeOf(this, QueryFailedError.prototype) + } +} + +export class NotFoundError extends WebrpcError { + constructor( + name: string = 'NotFound', + code: number = 3000, + message: string = `Resource not found`, + status: number = 0, + cause?: string, + ) { + super(name, code, message, status, cause) + Object.setPrototypeOf(this, NotFoundError.prototype) + } +} + +export class InsufficientFeeError extends WebrpcError { + constructor( + name: string = 'InsufficientFee', + code: number = 3004, + message: string = `Insufficient fee`, + status: number = 0, + cause?: string, + ) { + super(name, code, message, status, cause) + Object.setPrototypeOf(this, InsufficientFeeError.prototype) + } +} + +export enum errors { + WebrpcEndpoint = 'WebrpcEndpoint', + WebrpcRequestFailed = 'WebrpcRequestFailed', + WebrpcBadRoute = 'WebrpcBadRoute', + WebrpcBadMethod = 'WebrpcBadMethod', + WebrpcBadRequest = 'WebrpcBadRequest', + WebrpcBadResponse = 'WebrpcBadResponse', + WebrpcServerPanic = 'WebrpcServerPanic', + WebrpcInternalError = 'WebrpcInternalError', + WebrpcClientDisconnected = 'WebrpcClientDisconnected', + WebrpcStreamLost = 'WebrpcStreamLost', + WebrpcStreamFinished = 'WebrpcStreamFinished', + Unauthorized = 'Unauthorized', + PermissionDenied = 'PermissionDenied', + SessionExpired = 'SessionExpired', + MethodNotFound = 'MethodNotFound', + RequestConflict = 'RequestConflict', + Aborted = 'Aborted', + Geoblocked = 'Geoblocked', + RateLimited = 'RateLimited', + ProjectNotFound = 'ProjectNotFound', + AccessKeyNotFound = 'AccessKeyNotFound', + AccessKeyMismatch = 'AccessKeyMismatch', + InvalidOrigin = 'InvalidOrigin', + InvalidService = 'InvalidService', + UnauthorizedUser = 'UnauthorizedUser', + QuotaExceeded = 'QuotaExceeded', + QuotaRateLimit = 'QuotaRateLimit', + NoDefaultKey = 'NoDefaultKey', + MaxAccessKeys = 'MaxAccessKeys', + AtLeastOneKey = 'AtLeastOneKey', + Timeout = 'Timeout', + InvalidArgument = 'InvalidArgument', + Unavailable = 'Unavailable', + QueryFailed = 'QueryFailed', + NotFound = 'NotFound', + InsufficientFee = 'InsufficientFee', +} + +export enum WebrpcErrorCodes { + WebrpcEndpoint = 0, + WebrpcRequestFailed = -1, + WebrpcBadRoute = -2, + WebrpcBadMethod = -3, + WebrpcBadRequest = -4, + WebrpcBadResponse = -5, + WebrpcServerPanic = -6, + WebrpcInternalError = -7, + WebrpcClientDisconnected = -8, + WebrpcStreamLost = -9, + WebrpcStreamFinished = -10, + Unauthorized = 1000, + PermissionDenied = 1001, + SessionExpired = 1002, + MethodNotFound = 1003, + RequestConflict = 1004, + Aborted = 1005, + Geoblocked = 1006, + RateLimited = 1007, + ProjectNotFound = 1008, + AccessKeyNotFound = 1101, + AccessKeyMismatch = 1102, + InvalidOrigin = 1103, + InvalidService = 1104, + UnauthorizedUser = 1105, + QuotaExceeded = 1200, + QuotaRateLimit = 1201, + NoDefaultKey = 1300, + MaxAccessKeys = 1301, + AtLeastOneKey = 1302, + Timeout = 1900, + InvalidArgument = 2001, + Unavailable = 2002, + QueryFailed = 2003, + NotFound = 3000, + InsufficientFee = 3004, +} + +export const webrpcErrorByCode: { [code: number]: any } = { + [0]: WebrpcEndpointError, + [-1]: WebrpcRequestFailedError, + [-2]: WebrpcBadRouteError, + [-3]: WebrpcBadMethodError, + [-4]: WebrpcBadRequestError, + [-5]: WebrpcBadResponseError, + [-6]: WebrpcServerPanicError, + [-7]: WebrpcInternalErrorError, + [-8]: WebrpcClientDisconnectedError, + [-9]: WebrpcStreamLostError, + [-10]: WebrpcStreamFinishedError, + [1000]: UnauthorizedError, + [1001]: PermissionDeniedError, + [1002]: SessionExpiredError, + [1003]: MethodNotFoundError, + [1004]: RequestConflictError, + [1005]: AbortedError, + [1006]: GeoblockedError, + [1007]: RateLimitedError, + [1008]: ProjectNotFoundError, + [1101]: AccessKeyNotFoundError, + [1102]: AccessKeyMismatchError, + [1103]: InvalidOriginError, + [1104]: InvalidServiceError, + [1105]: UnauthorizedUserError, + [1200]: QuotaExceededError, + [1201]: QuotaRateLimitError, + [1300]: NoDefaultKeyError, + [1301]: MaxAccessKeysError, + [1302]: AtLeastOneKeyError, + [1900]: TimeoutError, + [2001]: InvalidArgumentError, + [2002]: UnavailableError, + [2003]: QueryFailedError, + [3000]: NotFoundError, + [3004]: InsufficientFeeError, +} + +export type Fetch = (input: RequestInfo, init?: RequestInit) => Promise diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 7a60ab01a..1837e2b38 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -375,6 +375,9 @@ importers: ox: specifier: ^0.6.7 version: 0.6.7(typescript@5.8.3)(zod@3.24.2) + viem: + specifier: ^2.27.2 + version: 2.27.2(bufferutil@4.0.9)(typescript@5.8.3)(utf-8-validate@5.0.10)(zod@3.24.2) devDependencies: '@repo/typescript-config': specifier: workspace:^ @@ -6025,6 +6028,14 @@ packages: typescript: optional: true + viem@2.27.2: + resolution: {integrity: sha512-VwsB+RswcflbwBNPMvzTHuafDA51iT8v4SuIFcudTP2skmxcdodbgoOLP4dYELVnCzcedxoSJDOeext4V3zdnA==} + peerDependencies: + typescript: '>=5.0.4' + peerDependenciesMeta: + typescript: + optional: true + vite@6.2.6: resolution: {integrity: sha512-9xpjNl3kR4rVDZgPNdTL0/c6ao4km69a/2ihNQbcANz8RuCOK3hQBmLSJf3bRKVQjVMda+YvizNE8AwvogcPbw==} engines: {node: ^18.0.0 || ^20.0.0 || >=22.0.0} @@ -8268,7 +8279,7 @@ snapshots: '@safe-global/safe-apps-sdk@9.1.0(bufferutil@4.0.9)(typescript@5.7.3)(utf-8-validate@5.0.10)(zod@3.24.2)': dependencies: '@safe-global/safe-gateway-typescript-sdk': 3.22.9 - viem: 2.27.0(bufferutil@4.0.9)(typescript@5.7.3)(utf-8-validate@5.0.10)(zod@3.24.2) + viem: 2.27.2(bufferutil@4.0.9)(typescript@5.7.3)(utf-8-validate@5.0.10)(zod@3.24.2) transitivePeerDependencies: - bufferutil - typescript @@ -11764,6 +11775,20 @@ snapshots: transitivePeerDependencies: - zod + ox@0.6.9(typescript@5.8.3)(zod@3.24.2): + dependencies: + '@adraffy/ens-normalize': 1.11.0 + '@noble/curves': 1.8.1 + '@noble/hashes': 1.7.1 + '@scure/bip32': 1.6.2 + '@scure/bip39': 1.5.4 + abitype: 1.0.8(typescript@5.8.3)(zod@3.24.2) + eventemitter3: 5.0.1 + optionalDependencies: + typescript: 5.8.3 + transitivePeerDependencies: + - zod + p-filter@2.1.0: dependencies: p-map: 2.1.0 @@ -12864,6 +12889,40 @@ snapshots: - utf-8-validate - zod + viem@2.27.2(bufferutil@4.0.9)(typescript@5.7.3)(utf-8-validate@5.0.10)(zod@3.24.2): + dependencies: + '@noble/curves': 1.8.1 + '@noble/hashes': 1.7.1 + '@scure/bip32': 1.6.2 + '@scure/bip39': 1.5.4 + abitype: 1.0.8(typescript@5.7.3)(zod@3.24.2) + isows: 1.0.6(ws@8.18.1(bufferutil@4.0.9)(utf-8-validate@5.0.10)) + ox: 0.6.9(typescript@5.7.3)(zod@3.24.2) + ws: 8.18.1(bufferutil@4.0.9)(utf-8-validate@5.0.10) + optionalDependencies: + typescript: 5.7.3 + transitivePeerDependencies: + - bufferutil + - utf-8-validate + - zod + + viem@2.27.2(bufferutil@4.0.9)(typescript@5.8.3)(utf-8-validate@5.0.10)(zod@3.24.2): + dependencies: + '@noble/curves': 1.8.1 + '@noble/hashes': 1.7.1 + '@scure/bip32': 1.6.2 + '@scure/bip39': 1.5.4 + abitype: 1.0.8(typescript@5.8.3)(zod@3.24.2) + isows: 1.0.6(ws@8.18.1(bufferutil@4.0.9)(utf-8-validate@5.0.10)) + ox: 0.6.9(typescript@5.8.3)(zod@3.24.2) + ws: 8.18.1(bufferutil@4.0.9)(utf-8-validate@5.0.10) + optionalDependencies: + typescript: 5.8.3 + transitivePeerDependencies: + - bufferutil + - utf-8-validate + - zod + vite@6.2.6(@types/node@22.13.9)(jiti@2.4.2)(lightningcss@1.29.2): dependencies: esbuild: 0.25.2 From 9618b9e8fc7a9bf7119090320a801c49ae72b29f Mon Sep 17 00:00:00 2001 From: Shun Kakinoki Date: Fri, 18 Apr 2025 17:05:19 +0900 Subject: [PATCH 347/439] Update pnpm-lock.yaml --- pnpm-lock.yaml | 1193 ++++++++++++++++++++++++++++++++++++++---------- 1 file changed, 962 insertions(+), 231 deletions(-) diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 0a454cec5..48c48cb8f 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -30,45 +30,138 @@ importers: specifier: 5.8.3 version: 5.8.3 - extras/demo-wallet: + extras/demo-anypay: dependencies: + '@0xsequence/api': + specifier: workspace:* + version: link:../../packages/services/api + '@0xsequence/design-system': + specifier: ^2.1.6 + version: 2.1.6(@types/react-dom@19.1.2(@types/react@19.1.2))(@types/react@19.1.2)(motion@12.7.2(react-dom@19.0.0(react@19.0.0))(react@19.0.0))(react-dom@19.0.0(react@19.0.0))(react@19.0.0) + '@0xsequence/hooks': + specifier: ^5.1.0 + version: 5.1.1(@0xsequence/api@packages+services+api)(@0xsequence/indexer@2.3.9)(@0xsequence/metadata@2.3.8)(@0xsequence/network@2.3.9(ethers@6.13.5(bufferutil@4.0.9)(utf-8-validate@5.0.10)))(@tanstack/react-query@5.74.3(react@19.0.0))(react-dom@19.0.0(react@19.0.0))(react@19.0.0)(viem@2.27.2(bufferutil@4.0.9)(typescript@5.7.3)(utf-8-validate@5.0.10)(zod@3.24.2)) + '@0xsequence/indexer': + specifier: ^2.3.9 + version: 2.3.9 + '@0xsequence/network': + specifier: ^2.3.9 + version: 2.3.9(ethers@6.13.5(bufferutil@4.0.9)(utf-8-validate@5.0.10)) + '@0xsequence/relayer': + specifier: workspace:* + version: link:../../packages/services/relayer + '@0xsequence/wagmi-connector': + specifier: ^4.0.1 + version: 4.0.1(0xsequence@2.3.8(ethers@6.13.5(bufferutil@4.0.9)(utf-8-validate@5.0.10)))(ethers@6.13.5(bufferutil@4.0.9)(utf-8-validate@5.0.10))(viem@2.27.2(bufferutil@4.0.9)(typescript@5.7.3)(utf-8-validate@5.0.10)(zod@3.24.2))(wagmi@2.14.16(@tanstack/query-core@5.74.3)(@tanstack/react-query@5.74.3(react@19.0.0))(@types/react@19.1.2)(bufferutil@4.0.9)(react@19.0.0)(typescript@5.7.3)(utf-8-validate@5.0.10)(viem@2.27.2(bufferutil@4.0.9)(typescript@5.7.3)(utf-8-validate@5.0.10)(zod@3.24.2))(zod@3.24.2)) + '@0xsequence/wallet-core': + specifier: workspace:* + version: link:../../packages/wallet/core + '@0xsequence/wallet-primitives': + specifier: workspace:* + version: link:../../packages/wallet/primitives '@0xsequence/wallet-wdk': - specifier: workspace:../../packages/wallet/wdk + specifier: workspace:* version: link:../../packages/wallet/wdk - '@repo/ui': + '@radix-ui/react-popover': + specifier: ^1.1.6 + version: 1.1.7(@types/react-dom@19.1.2(@types/react@19.1.2))(@types/react@19.1.2)(react-dom@19.0.0(react@19.0.0))(react@19.0.0) + '@repo/eslint-config': specifier: workspace:* - version: link:../../repo/ui - next: - specifier: ^15.1.0 - version: 15.1.0(react-dom@19.0.0(react@19.0.0))(react@19.0.0) + version: link:../../repo/eslint-config + '@repo/typescript-config': + specifier: workspace:* + version: link:../../repo/typescript-config + '@tanstack/react-query': + specifier: ^5.69.0 + version: 5.74.3(react@19.0.0) + class-variance-authority: + specifier: ^0.7.1 + version: 0.7.1 + clsx: + specifier: ^2.1.1 + version: 2.1.1 + copy-to-clipboard: + specifier: ^3.3.3 + version: 3.3.3 + jotai: + specifier: ^2.12.2 + version: 2.12.3(@types/react@19.1.2)(react@19.0.0) + motion: + specifier: ^12.6.2 + version: 12.7.2(react-dom@19.0.0(react@19.0.0))(react@19.0.0) ox: - specifier: ^0.6.7 - version: 0.6.7(typescript@5.5.4) + specifier: ^0.6.10 + version: 0.6.12(typescript@5.7.3)(zod@3.24.2) + qrcode.react: + specifier: ^4.2.0 + version: 4.2.0(react@19.0.0) react: specifier: ^19.0.0 version: 19.0.0 react-dom: specifier: ^19.0.0 version: 19.0.0(react@19.0.0) + react-router: + specifier: ^7.4.0 + version: 7.5.0(react-dom@19.0.0(react@19.0.0))(react@19.0.0) + tailwindcss: + specifier: ^4.0.15 + version: 4.1.4 + viem: + specifier: ^2.24.1 + version: 2.27.2(bufferutil@4.0.9)(typescript@5.7.3)(utf-8-validate@5.0.10)(zod@3.24.2) + wagmi: + specifier: ^2.14.16 + version: 2.14.16(@tanstack/query-core@5.74.3)(@tanstack/react-query@5.74.3(react@19.0.0))(@types/react@19.1.2)(bufferutil@4.0.9)(react@19.0.0)(typescript@5.7.3)(utf-8-validate@5.0.10)(viem@2.27.2(bufferutil@4.0.9)(typescript@5.7.3)(utf-8-validate@5.0.10)(zod@3.24.2))(zod@3.24.2) devDependencies: - '@repo/eslint-config': - specifier: workspace:* - version: link:../../repo/eslint-config - '@repo/typescript-config': - specifier: workspace:* - version: link:../../repo/typescript-config - '@types/node': - specifier: ^20 - version: 20.17.6 + '@eslint/js': + specifier: ^9.21.0 + version: 9.24.0 + '@tailwindcss/vite': + specifier: ^4.0.15 + version: 4.1.4(vite@6.2.6(@types/node@22.13.9)(jiti@2.4.2)(lightningcss@1.29.2)) '@types/react': - specifier: 18.3.1 - version: 18.3.1 + specifier: ^19.0.10 + version: 19.1.2 '@types/react-dom': - specifier: 18.3.0 - version: 18.3.0 + specifier: ^19.0.4 + version: 19.1.2(@types/react@19.1.2) + '@vitejs/plugin-react': + specifier: ^4.3.4 + version: 4.4.0(vite@6.2.6(@types/node@22.13.9)(jiti@2.4.2)(lightningcss@1.29.2)) + eslint: + specifier: ^9.21.0 + version: 9.24.0(jiti@2.4.2) + eslint-plugin-react-hooks: + specifier: ^5.1.0 + version: 5.2.0(eslint@9.24.0(jiti@2.4.2)) + eslint-plugin-react-refresh: + specifier: ^0.4.19 + version: 0.4.19(eslint@9.24.0(jiti@2.4.2)) + globals: + specifier: ^15.15.0 + version: 15.15.0 + husky: + specifier: ^9.1.7 + version: 9.1.7 + prettier: + specifier: ^3.5.3 + version: 3.5.3 + rimraf: + specifier: ^6.0.1 + version: 6.0.1 typescript: - specifier: 5.5.4 - version: 5.5.4 + specifier: ~5.7.2 + version: 5.7.3 + typescript-eslint: + specifier: ^8.24.1 + version: 8.30.1(eslint@9.24.0(jiti@2.4.2))(typescript@5.7.3) + vite: + specifier: ^6.2.0 + version: 6.2.6(@types/node@22.13.9)(jiti@2.4.2)(lightningcss@1.29.2) + zod: + specifier: ^3.24.2 + version: 3.24.2 extras/docs: dependencies: @@ -240,8 +333,11 @@ importers: specifier: workspace:^ version: link:../primitives ox: - specifier: ^0.6.7 - version: 0.6.7(typescript@5.8.3) + specifier: ^0.7.0 + version: 0.7.0(typescript@5.8.3)(zod@3.24.2) + viem: + specifier: ^2.27.2 + version: 2.27.2(bufferutil@4.0.9)(typescript@5.8.3)(utf-8-validate@5.0.10)(zod@3.24.2) devDependencies: '@repo/typescript-config': specifier: workspace:^ @@ -268,8 +364,8 @@ importers: packages/wallet/primitives: dependencies: ox: - specifier: ^0.6.7 - version: 0.6.7(typescript@5.8.3) + specifier: ^0.7.0 + version: 0.7.0(typescript@5.8.3)(zod@3.24.2) devDependencies: '@repo/typescript-config': specifier: workspace:^ @@ -284,8 +380,8 @@ importers: specifier: workspace:^ version: link:../primitives ox: - specifier: ^0.6.7 - version: 0.6.7(typescript@5.8.3) + specifier: ^0.7.0 + version: 0.7.0(typescript@5.8.3)(zod@3.24.2) yargs: specifier: ^17.7.2 version: 17.7.2 @@ -307,7 +403,7 @@ importers: version: 8.2.2 esbuild: specifier: ^0.25.0 - version: 0.25.0 + version: 0.25.2 nodemon: specifier: ^3.1.0 version: 3.1.9 @@ -330,8 +426,8 @@ importers: specifier: ^4.0.0 version: 4.0.0 ox: - specifier: ^0.6.7 - version: 0.6.7(typescript@5.8.3) + specifier: ^0.7.0 + version: 0.7.0(typescript@5.8.3)(zod@3.24.2) uuid: specifier: ^11.1.0 version: 11.1.0 @@ -353,7 +449,7 @@ importers: version: 29.7.0(@types/node@22.13.9)(ts-node@10.9.2(@types/node@22.13.9)(typescript@5.8.3)) ts-jest: specifier: ^29.2.6 - version: 29.2.6(@babel/core@7.26.9)(@jest/transform@29.7.0)(@jest/types@29.6.3)(babel-jest@29.7.0(@babel/core@7.26.9))(jest@29.7.0(@types/node@22.13.9)(ts-node@10.9.2(@types/node@22.13.9)(typescript@5.8.3)))(typescript@5.8.3) + version: 29.2.6(@babel/core@7.26.10)(@jest/transform@29.7.0)(@jest/types@29.6.3)(babel-jest@29.7.0(@babel/core@7.26.10))(jest@29.7.0(@types/node@22.13.9)(ts-node@10.9.2(@types/node@22.13.9)(typescript@5.8.3)))(typescript@5.8.3) typescript: specifier: ^5.7.3 version: 5.8.3 @@ -587,6 +683,10 @@ packages: resolution: {integrity: sha512-oH5UPLMWR3L2wEFLnFJ1TZXqHufiTKAiLfqw5zkhS4dKXLJ10yVztfil/twG8EDTA4F/tvVNw9nOl4ZMslB8rQ==} engines: {node: '>=6.9.0'} + '@babel/core@7.26.10': + resolution: {integrity: sha512-vMqyb7XCDMPvJFFOaT9kxtiRh42GwlZEg1/uIgtZshS5a/8OaduUfCi7kynKgc3Tw/6Uo2D+db9qBttghhmxwQ==} + engines: {node: '>=6.9.0'} + '@babel/core@7.26.9': resolution: {integrity: sha512-lWBYIrF7qK5+GjY5Uy+/hEgp8OJWOD/rpy74GplYRhEauvbHDeFB8t5hPOZxCZ0Oxf4Cc36tK51/l3ymJysrKw==} engines: {node: '>=6.9.0'} @@ -595,6 +695,10 @@ packages: resolution: {integrity: sha512-kEWdzjOAUMW4hAyrzJ0ZaTOu9OmpyDIQicIh0zg0EEcEkYXZb2TjtBhnHi2ViX7PKwZqF4xwqfAm299/QMP3lg==} engines: {node: '>=6.9.0'} + '@babel/generator@7.27.0': + resolution: {integrity: sha512-VybsKvpiN1gU1sdMZIp7FcqphVVKEwcuj02x73uvcHE0PTihx1nlBcowYWhDwjpoAXRv43+gDzyggGnn1XZhVw==} + engines: {node: '>=6.9.0'} + '@babel/helper-compilation-targets@7.26.5': resolution: {integrity: sha512-IXuyn5EkouFJscIDuFF5EsiSolseme1s0CZB+QxVugqJLYmKdxI1VfIBOst0SUu4rnk2Z7kqTwmoO1lp3HIfnA==} engines: {node: '>=6.9.0'} @@ -629,11 +733,20 @@ packages: resolution: {integrity: sha512-Mz/4+y8udxBKdmzt/UjPACs4G3j5SshJJEFFKxlCGPydG4JAHXxjWjAwjd09tf6oINvl1VfMJo+nB7H2YKQ0dA==} engines: {node: '>=6.9.0'} + '@babel/helpers@7.27.0': + resolution: {integrity: sha512-U5eyP/CTFPuNE3qk+WZMxFkp/4zUzdceQlfzf7DdGdhp+Fezd7HD+i8Y24ZuTMKX3wQBld449jijbGq6OdGNQg==} + engines: {node: '>=6.9.0'} + '@babel/parser@7.26.9': resolution: {integrity: sha512-81NWa1njQblgZbQHxWHpxxCzNsa3ZwvFqpUg7P+NNUU6f3UU2jBEg4OlF/J6rl8+PQGh1q6/zWScd001YwcA5A==} engines: {node: '>=6.0.0'} hasBin: true + '@babel/parser@7.27.0': + resolution: {integrity: sha512-iaepho73/2Pz7w2eMS0Q5f83+0RKI7i4xmiYeBmDzfRVbQtTOG7Ts0S4HzJVsTMGI9keU8rNfuZr8DKfSt7Yyg==} + engines: {node: '>=6.0.0'} + hasBin: true + '@babel/plugin-syntax-async-generators@7.8.4': resolution: {integrity: sha512-tycmZxkGfZaxhMRbXlPXuVFpdWlXpir2W4AMhSJgRKzk/eDlIXOhb2LHWoLpDF7TEHylV5zNhykX6KAgHJmTNw==} peerDependencies: @@ -749,14 +862,26 @@ packages: resolution: {integrity: sha512-qyRplbeIpNZhmzOysF/wFMuP9sctmh2cFzRAZOn1YapxBsE1i9bJIY586R/WBLfLcmcBlM8ROBiQURnnNy+zfA==} engines: {node: '>=6.9.0'} + '@babel/template@7.27.0': + resolution: {integrity: sha512-2ncevenBqXI6qRMukPlXwHKHchC7RyMuu4xv5JBXRfOGVcTy1mXCD12qrp7Jsoxll1EV3+9sE4GugBVRjT2jFA==} + engines: {node: '>=6.9.0'} + '@babel/traverse@7.26.9': resolution: {integrity: sha512-ZYW7L+pL8ahU5fXmNbPF+iZFHCv5scFak7MZ9bwaRPLUhHh7QQEMjZUg0HevihoqCM5iSYHN61EyCoZvqC+bxg==} engines: {node: '>=6.9.0'} + '@babel/traverse@7.27.0': + resolution: {integrity: sha512-19lYZFzYVQkkHkl4Cy4WrAVcqBkgvV2YM2TU3xG6DIwO7O3ecbDPfW3yM3bjAGcqcQHi+CCtjMR3dIEHxsd6bA==} + engines: {node: '>=6.9.0'} + '@babel/types@7.26.9': resolution: {integrity: sha512-Y3IR1cRnOxOCDvMmNiym7XpXQ93iGDDPHx+Zj+NM+rg0fBaShfQLkg+hKPaZCEvg5N/LeCo4+Rj/i3FuJsIQaw==} engines: {node: '>=6.9.0'} + '@babel/types@7.27.0': + resolution: {integrity: sha512-H45s8fVLYjbhFH62dIJ3WtmJ6RSPt/3DRO0ZcT2SUiYiQyz3BLVb9ADEnLl91m74aQPS3AzzeajZHYOalWe3bg==} + engines: {node: '>=6.9.0'} + '@bcoe/v8-coverage@0.2.3': resolution: {integrity: sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==} @@ -837,156 +962,150 @@ packages: '@emnapi/runtime@1.3.1': resolution: {integrity: sha512-kEBmG8KyqtxJZv+ygbEim+KCGtIq1fC22Ms3S4ziXmYKm8uyoLX0MHONVKwp+9opg390VaKRNt4a7A9NwmpNhw==} - '@esbuild/aix-ppc64@0.25.0': - resolution: {integrity: sha512-O7vun9Sf8DFjH2UtqK8Ku3LkquL9SZL8OLY1T5NZkA34+wG3OQF7cl4Ql8vdNzM6fzBbYfLaiRLIOZ+2FOCgBQ==} + '@esbuild/aix-ppc64@0.25.2': + resolution: {integrity: sha512-wCIboOL2yXZym2cgm6mlA742s9QeJ8DjGVaL39dLN4rRwrOgOyYSnOaFPhKZGLb2ngj4EyfAFjsNJwPXZvseag==} engines: {node: '>=18'} cpu: [ppc64] os: [aix] - '@esbuild/android-arm64@0.24.2': - resolution: {integrity: sha512-cNLgeqCqV8WxfcTIOeL4OAtSmL8JjcN6m09XIgro1Wi7cF4t/THaWEa7eL5CMoMBdjoHOTh/vwTO/o2TRXIyzg==} + '@esbuild/android-arm64@0.25.2': + resolution: {integrity: sha512-5ZAX5xOmTligeBaeNEPnPaeEuah53Id2tX4c2CVP3JaROTH+j4fnfHCkr1PjXMd78hMst+TlkfKcW/DlTq0i4w==} engines: {node: '>=18'} cpu: [arm64] os: [android] - '@esbuild/android-arm@0.24.2': - resolution: {integrity: sha512-tmwl4hJkCfNHwFB3nBa8z1Uy3ypZpxqxfTQOcHX+xRByyYgunVbZ9MzUUfb0RxaHIMnbHagwAxuTL+tnNM+1/Q==} + '@esbuild/android-arm@0.25.2': + resolution: {integrity: sha512-NQhH7jFstVY5x8CKbcfa166GoV0EFkaPkCKBQkdPJFvo5u+nGXLEH/ooniLb3QI8Fk58YAx7nsPLozUWfCBOJA==} engines: {node: '>=18'} cpu: [arm] os: [android] - '@esbuild/android-x64@0.24.2': - resolution: {integrity: sha512-B6Q0YQDqMx9D7rvIcsXfmJfvUYLoP722bgfBlO5cGvNVb5V/+Y7nhBE3mHV9OpxBf4eAS2S68KZztiPaWq4XYw==} + '@esbuild/android-x64@0.25.2': + resolution: {integrity: sha512-Ffcx+nnma8Sge4jzddPHCZVRvIfQ0kMsUsCMcJRHkGJ1cDmhe4SsrYIjLUKn1xpHZybmOqCWwB0zQvsjdEHtkg==} engines: {node: '>=18'} cpu: [x64] os: [android] - '@esbuild/darwin-arm64@0.24.2': - resolution: {integrity: sha512-kj3AnYWc+CekmZnS5IPu9D+HWtUI49hbnyqk0FLEJDbzCIQt7hg7ucF1SQAilhtYpIujfaHr6O0UHlzzSPdOeA==} + '@esbuild/darwin-arm64@0.25.2': + resolution: {integrity: sha512-MpM6LUVTXAzOvN4KbjzU/q5smzryuoNjlriAIx+06RpecwCkL9JpenNzpKd2YMzLJFOdPqBpuub6eVRP5IgiSA==} engines: {node: '>=18'} cpu: [arm64] os: [darwin] - '@esbuild/darwin-x64@0.24.2': - resolution: {integrity: sha512-WeSrmwwHaPkNR5H3yYfowhZcbriGqooyu3zI/3GGpF8AyUdsrrP0X6KumITGA9WOyiJavnGZUwPGvxvwfWPHIA==} + '@esbuild/darwin-x64@0.25.2': + resolution: {integrity: sha512-5eRPrTX7wFyuWe8FqEFPG2cU0+butQQVNcT4sVipqjLYQjjh8a8+vUTfgBKM88ObB85ahsnTwF7PSIt6PG+QkA==} engines: {node: '>=18'} cpu: [x64] os: [darwin] - '@esbuild/freebsd-arm64@0.24.2': - resolution: {integrity: sha512-UN8HXjtJ0k/Mj6a9+5u6+2eZ2ERD7Edt1Q9IZiB5UZAIdPnVKDoG7mdTVGhHJIeEml60JteamR3qhsr1r8gXvg==} + '@esbuild/freebsd-arm64@0.25.2': + resolution: {integrity: sha512-mLwm4vXKiQ2UTSX4+ImyiPdiHjiZhIaE9QvC7sw0tZ6HoNMjYAqQpGyui5VRIi5sGd+uWq940gdCbY3VLvsO1w==} engines: {node: '>=18'} cpu: [arm64] os: [freebsd] - '@esbuild/freebsd-x64@0.24.2': - resolution: {integrity: sha512-TvW7wE/89PYW+IevEJXZ5sF6gJRDY/14hyIGFXdIucxCsbRmLUcjseQu1SyTko+2idmCw94TgyaEZi9HUSOe3Q==} + '@esbuild/freebsd-x64@0.25.2': + resolution: {integrity: sha512-6qyyn6TjayJSwGpm8J9QYYGQcRgc90nmfdUb0O7pp1s4lTY+9D0H9O02v5JqGApUyiHOtkz6+1hZNvNtEhbwRQ==} engines: {node: '>=18'} cpu: [x64] os: [freebsd] - '@esbuild/linux-arm64@0.24.2': - resolution: {integrity: sha512-7HnAD6074BW43YvvUmE/35Id9/NB7BeX5EoNkK9obndmZBUk8xmJJeU7DwmUeN7tkysslb2eSl6CTrYz6oEMQg==} + '@esbuild/linux-arm64@0.25.2': + resolution: {integrity: sha512-gq/sjLsOyMT19I8obBISvhoYiZIAaGF8JpeXu1u8yPv8BE5HlWYobmlsfijFIZ9hIVGYkbdFhEqC0NvM4kNO0g==} engines: {node: '>=18'} cpu: [arm64] os: [linux] - '@esbuild/linux-arm@0.24.2': - resolution: {integrity: sha512-n0WRM/gWIdU29J57hJyUdIsk0WarGd6To0s+Y+LwvlC55wt+GT/OgkwoXCXvIue1i1sSNWblHEig00GBWiJgfA==} + '@esbuild/linux-arm@0.25.2': + resolution: {integrity: sha512-UHBRgJcmjJv5oeQF8EpTRZs/1knq6loLxTsjc3nxO9eXAPDLcWW55flrMVc97qFPbmZP31ta1AZVUKQzKTzb0g==} engines: {node: '>=18'} cpu: [arm] os: [linux] - '@esbuild/linux-ia32@0.24.2': - resolution: {integrity: sha512-sfv0tGPQhcZOgTKO3oBE9xpHuUqguHvSo4jl+wjnKwFpapx+vUDcawbwPNuBIAYdRAvIDBfZVvXprIj3HA+Ugw==} + '@esbuild/linux-ia32@0.25.2': + resolution: {integrity: sha512-bBYCv9obgW2cBP+2ZWfjYTU+f5cxRoGGQ5SeDbYdFCAZpYWrfjjfYwvUpP8MlKbP0nwZ5gyOU/0aUzZ5HWPuvQ==} engines: {node: '>=18'} cpu: [ia32] os: [linux] - '@esbuild/linux-loong64@0.24.2': - resolution: {integrity: sha512-CN9AZr8kEndGooS35ntToZLTQLHEjtVB5n7dl8ZcTZMonJ7CCfStrYhrzF97eAecqVbVJ7APOEe18RPI4KLhwQ==} + '@esbuild/linux-loong64@0.25.2': + resolution: {integrity: sha512-SHNGiKtvnU2dBlM5D8CXRFdd+6etgZ9dXfaPCeJtz+37PIUlixvlIhI23L5khKXs3DIzAn9V8v+qb1TRKrgT5w==} engines: {node: '>=18'} cpu: [loong64] os: [linux] - '@esbuild/linux-mips64el@0.24.2': - resolution: {integrity: sha512-iMkk7qr/wl3exJATwkISxI7kTcmHKE+BlymIAbHO8xanq/TjHaaVThFF6ipWzPHryoFsesNQJPE/3wFJw4+huw==} + '@esbuild/linux-mips64el@0.25.2': + resolution: {integrity: sha512-hDDRlzE6rPeoj+5fsADqdUZl1OzqDYow4TB4Y/3PlKBD0ph1e6uPHzIQcv2Z65u2K0kpeByIyAjCmjn1hJgG0Q==} engines: {node: '>=18'} cpu: [mips64el] os: [linux] - '@esbuild/linux-ppc64@0.24.2': - resolution: {integrity: sha512-shsVrgCZ57Vr2L8mm39kO5PPIb+843FStGt7sGGoqiiWYconSxwTiuswC1VJZLCjNiMLAMh34jg4VSEQb+iEbw==} + '@esbuild/linux-ppc64@0.25.2': + resolution: {integrity: sha512-tsHu2RRSWzipmUi9UBDEzc0nLc4HtpZEI5Ba+Omms5456x5WaNuiG3u7xh5AO6sipnJ9r4cRWQB2tUjPyIkc6g==} engines: {node: '>=18'} cpu: [ppc64] os: [linux] - '@esbuild/linux-riscv64@0.24.2': - resolution: {integrity: sha512-4eSFWnU9Hhd68fW16GD0TINewo1L6dRrB+oLNNbYyMUAeOD2yCK5KXGK1GH4qD/kT+bTEXjsyTCiJGHPZ3eM9Q==} + '@esbuild/linux-riscv64@0.25.2': + resolution: {integrity: sha512-k4LtpgV7NJQOml/10uPU0s4SAXGnowi5qBSjaLWMojNCUICNu7TshqHLAEbkBdAszL5TabfvQ48kK84hyFzjnw==} engines: {node: '>=18'} cpu: [riscv64] os: [linux] - '@esbuild/linux-s390x@0.24.2': - resolution: {integrity: sha512-S0Bh0A53b0YHL2XEXC20bHLuGMOhFDO6GN4b3YjRLK//Ep3ql3erpNcPlEFed93hsQAjAQDNsvcK+hV90FubSw==} + '@esbuild/linux-s390x@0.25.2': + resolution: {integrity: sha512-GRa4IshOdvKY7M/rDpRR3gkiTNp34M0eLTaC1a08gNrh4u488aPhuZOCpkF6+2wl3zAN7L7XIpOFBhnaE3/Q8Q==} engines: {node: '>=18'} cpu: [s390x] os: [linux] - '@esbuild/linux-x64@0.24.2': - resolution: {integrity: sha512-8Qi4nQcCTbLnK9WoMjdC9NiTG6/E38RNICU6sUNqK0QFxCYgoARqVqxdFmWkdonVsvGqWhmm7MO0jyTqLqwj0Q==} + '@esbuild/linux-x64@0.25.2': + resolution: {integrity: sha512-QInHERlqpTTZ4FRB0fROQWXcYRD64lAoiegezDunLpalZMjcUcld3YzZmVJ2H/Cp0wJRZ8Xtjtj0cEHhYc/uUg==} engines: {node: '>=18'} cpu: [x64] os: [linux] - '@esbuild/netbsd-arm64@0.24.2': - resolution: {integrity: sha512-wuLK/VztRRpMt9zyHSazyCVdCXlpHkKm34WUyinD2lzK07FAHTq0KQvZZlXikNWkDGoT6x3TD51jKQ7gMVpopw==} + '@esbuild/netbsd-arm64@0.25.2': + resolution: {integrity: sha512-talAIBoY5M8vHc6EeI2WW9d/CkiO9MQJ0IOWX8hrLhxGbro/vBXJvaQXefW2cP0z0nQVTdQ/eNyGFV1GSKrxfw==} engines: {node: '>=18'} cpu: [arm64] os: [netbsd] - '@esbuild/netbsd-x64@0.24.2': - resolution: {integrity: sha512-VefFaQUc4FMmJuAxmIHgUmfNiLXY438XrL4GDNV1Y1H/RW3qow68xTwjZKfj/+Plp9NANmzbH5R40Meudu8mmw==} + '@esbuild/netbsd-x64@0.25.2': + resolution: {integrity: sha512-voZT9Z+tpOxrvfKFyfDYPc4DO4rk06qamv1a/fkuzHpiVBMOhpjK+vBmWM8J1eiB3OLSMFYNaOaBNLXGChf5tg==} engines: {node: '>=18'} cpu: [x64] os: [netbsd] - '@esbuild/openbsd-arm64@0.24.2': - resolution: {integrity: sha512-YQbi46SBct6iKnszhSvdluqDmxCJA+Pu280Av9WICNwQmMxV7nLRHZfjQzwbPs3jeWnuAhE9Jy0NrnJ12Oz+0A==} + '@esbuild/openbsd-arm64@0.25.2': + resolution: {integrity: sha512-dcXYOC6NXOqcykeDlwId9kB6OkPUxOEqU+rkrYVqJbK2hagWOMrsTGsMr8+rW02M+d5Op5NNlgMmjzecaRf7Tg==} engines: {node: '>=18'} cpu: [arm64] os: [openbsd] - '@esbuild/openbsd-x64@0.24.2': - resolution: {integrity: sha512-+iDS6zpNM6EnJyWv0bMGLWSWeXGN/HTaF/LXHXHwejGsVi+ooqDfMCCTerNFxEkM3wYVcExkeGXNqshc9iMaOA==} + '@esbuild/openbsd-x64@0.25.2': + resolution: {integrity: sha512-t/TkWwahkH0Tsgoq1Ju7QfgGhArkGLkF1uYz8nQS/PPFlXbP5YgRpqQR3ARRiC2iXoLTWFxc6DJMSK10dVXluw==} engines: {node: '>=18'} cpu: [x64] os: [openbsd] - '@esbuild/sunos-x64@0.24.2': - resolution: {integrity: sha512-hTdsW27jcktEvpwNHJU4ZwWFGkz2zRJUz8pvddmXPtXDzVKTTINmlmga3ZzwcuMpUvLw7JkLy9QLKyGpD2Yxig==} + '@esbuild/sunos-x64@0.25.2': + resolution: {integrity: sha512-cfZH1co2+imVdWCjd+D1gf9NjkchVhhdpgb1q5y6Hcv9TP6Zi9ZG/beI3ig8TvwT9lH9dlxLq5MQBBgwuj4xvA==} engines: {node: '>=18'} cpu: [x64] os: [sunos] - '@esbuild/win32-arm64@0.24.2': - resolution: {integrity: sha512-LihEQ2BBKVFLOC9ZItT9iFprsE9tqjDjnbulhHoFxYQtQfai7qfluVODIYxt1PgdoyQkz23+01rzwNwYfutxUQ==} + '@esbuild/win32-arm64@0.25.2': + resolution: {integrity: sha512-7Loyjh+D/Nx/sOTzV8vfbB3GJuHdOQyrOryFdZvPHLf42Tk9ivBU5Aedi7iyX+x6rbn2Mh68T4qq1SDqJBQO5Q==} engines: {node: '>=18'} cpu: [arm64] os: [win32] - '@esbuild/win32-ia32@0.24.2': - resolution: {integrity: sha512-q+iGUwfs8tncmFC9pcnD5IvRHAzmbwQ3GPS5/ceCyHdjXubwQWI12MKWSNSMYLJMq23/IUCvJMS76PDqXe1fxA==} + '@esbuild/win32-ia32@0.25.2': + resolution: {integrity: sha512-WRJgsz9un0nqZJ4MfhabxaD9Ft8KioqU3JMinOTvobbX6MOSUigSBlogP8QB3uxpJDsFS6yN+3FDBdqE5lg9kg==} engines: {node: '>=18'} cpu: [ia32] os: [win32] - '@esbuild/win32-x64@0.24.2': - resolution: {integrity: sha512-7VTgWzgMGvup6aSqDPLiW5zHaxYJGTO4OokMjIlrCtf+VpEL+cXKtCvg723iguPYI5oaUNdS+/V7OU2gvXVWEg==} - engines: {node: '>=18'} - cpu: [x64] - os: [win32] - '@esbuild/win32-x64@0.25.2': resolution: {integrity: sha512-kM3HKb16VIXZyIeVrM1ygYmZBKybX8N4p754bw390wGO3Tf2j4L2/WYL+4suWujpgf6GBYs3jv7TyUivdd05JA==} engines: {node: '>=18'} @@ -2453,8 +2572,8 @@ packages: resolution: {integrity: sha512-aEhgas7aJ6vZnNFC7K4/vMGDGyOiqWcYZPpIWrTKuTAlsvDNKy2GFDqh9smL+iq069ZvR0YzEeq0B8NJlLzjFA==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - '@vitejs/plugin-react@4.3.4': - resolution: {integrity: sha512-SCCPBJtYLdE8PX/7ZQAs1QAZ8Jqwih+0VBLum1EGqmCCQal+MIUqLCzj3ZUy8ufbC0cAM4LRlSTm7IQJwWT4ug==} + '@vitejs/plugin-react@4.4.0': + resolution: {integrity: sha512-x/EztcTKVj+TDeANY1WjNeYsvZjZdfWRMP/KXi5Yn8BoTzpa13ZltaQqKfvWYbX8CE10GOHHdC5v86jY9x8i/g==} engines: {node: ^14.18.0 || >=16.0.0} peerDependencies: vite: ^4.2.0 || ^5.0.0 || ^6.0.0 @@ -3219,10 +3338,8 @@ packages: resolution: {integrity: sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA==} engines: {node: '>= 0.4'} - esbuild@0.24.2: - resolution: {integrity: sha512-+9egpBW8I3CD5XPe0n6BfT5fxLzxrlDzqydF3aviG+9ni1lDC/OvMHcxqEFV0+LANZG5R1bFMWfUrjVsdwxJvA==} - engines: {node: '>=18'} - hasBin: true + es-toolkit@1.33.0: + resolution: {integrity: sha512-X13Q/ZSc+vsO1q600bvNK4bxgXMkHcf//RxCmYDaRY5DAcT+eoXjY5hoAPGMdRnWQjvyLEcyauG3b6hz76LNqg==} esbuild@0.25.2: resolution: {integrity: sha512-16854zccKPnC+toMywC+uKNeYSv+/eXkevRAfwRD/G9Cleq66m8XFIrigkbvauLLlCfDL45Q2cWegSg53gGBnQ==} @@ -4637,6 +4754,14 @@ packages: outdent@0.5.0: resolution: {integrity: sha512-/jHxFIzoMXdqPzTaCpFzAAWhpkSjZPF4Vsn6jAfNpmbH/ymsmd7Qc6VE9BGn0L6YMj6uwpQLxCECpus4ukKS9Q==} + ox@0.6.12: + resolution: {integrity: sha512-78hziRGLj0qTDa0UW4+ynv9tW2Cp1vmCfGokL8D7kiSDh6Y0LAfHL+HaDN4l2a9jcrOG3fexTDtLNtDNkEwLtg==} + peerDependencies: + typescript: '>=5.4.0' + peerDependenciesMeta: + typescript: + optional: true + ox@0.6.7: resolution: {integrity: sha512-17Gk/eFsFRAZ80p5eKqv89a57uXjd3NgIf1CaXojATPBuujVc/fQSVhBeAU9JCRB+k7J50WQAyWTxK19T9GgbA==} peerDependencies: @@ -4653,6 +4778,14 @@ packages: typescript: optional: true + ox@0.7.0: + resolution: {integrity: sha512-mgRXlQdaNukQcsvGsPENGbyFvr7glob8UmOusDfWTw7A6LcjI+9OCelQ6NoAiSk6iM77R667qyUzn+n2Cr4SJw==} + peerDependencies: + typescript: '>=5.4.0' + peerDependenciesMeta: + typescript: + optional: true + p-filter@2.1.0: resolution: {integrity: sha512-ZBxxZ5sL2HghephhpGAQdoskxplTwr7ICaehZwLIlfL6acuVgZPm8yBNuRAFBGEqtD/hmUeq9eqLg2ys9Xr/yw==} engines: {node: '>=8'} @@ -4897,8 +5030,8 @@ packages: react-is@18.3.1: resolution: {integrity: sha512-/LLMVyas0ljjAtoYiPqYiL8VWXzUUdThrmU5+n20DZv+a+ClRoevUzw5JxU+Ieh5/c87ytoTBV9G1FiKfNJdmg==} - react-refresh@0.14.2: - resolution: {integrity: sha512-jCvmsr+1IUSMUyzOkRcvnVbX3ZYC6g9TDrDbFuFmRDq7PD4yaGbLKNQL6k2jnArV8hjYxh7hVhAZB6s9HDGpZA==} + react-refresh@0.17.0: + resolution: {integrity: sha512-z6F7K9bV85EfseRCp2bzrpyQ0Gkw1uLoCel9XBVWPg/TjRj94SkJzUTGfOa4bs7iJvBWtQG0Wq7wnI0syw3EBQ==} engines: {node: '>=0.10.0'} react-remove-scroll-bar@2.3.8: @@ -5729,14 +5862,6 @@ packages: typescript: optional: true - viem@2.27.0: - resolution: {integrity: sha512-pKw2dcwDi6TaWlTzLHYazOgjO1GgbUpE1zdLsLNSiCjHNrMTpL/teL0wVHnJDLiB2tR5CL19LBqefYNtRUkH5Q==} - peerDependencies: - typescript: '>=5.0.4' - peerDependenciesMeta: - typescript: - optional: true - viem@2.27.2: resolution: {integrity: sha512-VwsB+RswcflbwBNPMvzTHuafDA51iT8v4SuIFcudTP2skmxcdodbgoOLP4dYELVnCzcedxoSJDOeext4V3zdnA==} peerDependencies: @@ -6080,7 +6205,7 @@ snapshots: '@0xsequence/utils': 2.3.8(ethers@6.13.5(bufferutil@4.0.9)(utf-8-validate@5.0.10)) ethers: 6.13.5(bufferutil@4.0.9)(utf-8-validate@5.0.10) - '@0xsequence/hooks@5.1.1(@0xsequence/api@packages+services+api)(@0xsequence/indexer@2.3.9)(@0xsequence/metadata@2.3.8)(@0xsequence/network@2.3.9(ethers@6.13.5(bufferutil@4.0.9)(utf-8-validate@5.0.10)))(@tanstack/react-query@5.74.3(react@19.0.0))(react-dom@19.0.0(react@19.0.0))(react@19.0.0)(viem@2.27.0(bufferutil@4.0.9)(typescript@5.7.3)(utf-8-validate@5.0.10)(zod@3.24.2))': + '@0xsequence/hooks@5.1.1(@0xsequence/api@packages+services+api)(@0xsequence/indexer@2.3.9)(@0xsequence/metadata@2.3.8)(@0xsequence/network@2.3.9(ethers@6.13.5(bufferutil@4.0.9)(utf-8-validate@5.0.10)))(@tanstack/react-query@5.74.3(react@19.0.0))(react-dom@19.0.0(react@19.0.0))(react@19.0.0)(viem@2.27.2(bufferutil@4.0.9)(typescript@5.7.3)(utf-8-validate@5.0.10)(zod@3.24.2))': dependencies: '@0xsequence/api': link:packages/services/api '@0xsequence/indexer': 2.3.9 @@ -6089,7 +6214,7 @@ snapshots: '@tanstack/react-query': 5.74.3(react@19.0.0) react: 19.0.0 react-dom: 19.0.0(react@19.0.0) - viem: 2.27.0(bufferutil@4.0.9)(typescript@5.7.3)(utf-8-validate@5.0.10)(zod@3.24.2) + viem: 2.27.2(bufferutil@4.0.9)(typescript@5.7.3)(utf-8-validate@5.0.10)(zod@3.24.2) '@0xsequence/indexer@2.3.8': {} @@ -6180,12 +6305,12 @@ snapshots: ethers: 6.13.5(bufferutil@4.0.9)(utf-8-validate@5.0.10) js-base64: 3.7.7 - '@0xsequence/wagmi-connector@4.0.1(0xsequence@2.3.8(ethers@6.13.5(bufferutil@4.0.9)(utf-8-validate@5.0.10)))(ethers@6.13.5(bufferutil@4.0.9)(utf-8-validate@5.0.10))(viem@2.27.0(bufferutil@4.0.9)(typescript@5.7.3)(utf-8-validate@5.0.10)(zod@3.24.2))(wagmi@2.14.16(@tanstack/query-core@5.74.3)(@tanstack/react-query@5.74.3(react@19.0.0))(@types/react@19.1.2)(bufferutil@4.0.9)(react@19.0.0)(typescript@5.7.3)(utf-8-validate@5.0.10)(viem@2.27.0(bufferutil@4.0.9)(typescript@5.7.3)(utf-8-validate@5.0.10)(zod@3.24.2))(zod@3.24.2))': + '@0xsequence/wagmi-connector@4.0.1(0xsequence@2.3.8(ethers@6.13.5(bufferutil@4.0.9)(utf-8-validate@5.0.10)))(ethers@6.13.5(bufferutil@4.0.9)(utf-8-validate@5.0.10))(viem@2.27.2(bufferutil@4.0.9)(typescript@5.7.3)(utf-8-validate@5.0.10)(zod@3.24.2))(wagmi@2.14.16(@tanstack/query-core@5.74.3)(@tanstack/react-query@5.74.3(react@19.0.0))(@types/react@19.1.2)(bufferutil@4.0.9)(react@19.0.0)(typescript@5.7.3)(utf-8-validate@5.0.10)(viem@2.27.2(bufferutil@4.0.9)(typescript@5.7.3)(utf-8-validate@5.0.10)(zod@3.24.2))(zod@3.24.2))': dependencies: 0xsequence: 2.3.8(ethers@6.13.5(bufferutil@4.0.9)(utf-8-validate@5.0.10)) ethers: 6.13.5(bufferutil@4.0.9)(utf-8-validate@5.0.10) - viem: 2.27.0(bufferutil@4.0.9)(typescript@5.7.3)(utf-8-validate@5.0.10)(zod@3.24.2) - wagmi: 2.14.16(@tanstack/query-core@5.74.3)(@tanstack/react-query@5.74.3(react@19.0.0))(@types/react@19.1.2)(bufferutil@4.0.9)(react@19.0.0)(typescript@5.7.3)(utf-8-validate@5.0.10)(viem@2.27.0(bufferutil@4.0.9)(typescript@5.7.3)(utf-8-validate@5.0.10)(zod@3.24.2))(zod@3.24.2) + viem: 2.27.2(bufferutil@4.0.9)(typescript@5.7.3)(utf-8-validate@5.0.10)(zod@3.24.2) + wagmi: 2.14.16(@tanstack/query-core@5.74.3)(@tanstack/react-query@5.74.3(react@19.0.0))(@types/react@19.1.2)(bufferutil@4.0.9)(react@19.0.0)(typescript@5.7.3)(utf-8-validate@5.0.10)(viem@2.27.2(bufferutil@4.0.9)(typescript@5.7.3)(utf-8-validate@5.0.10)(zod@3.24.2))(zod@3.24.2) '@0xsequence/wallet@2.3.8(ethers@6.13.5(bufferutil@4.0.9)(utf-8-validate@5.0.10))': dependencies: @@ -6214,6 +6339,26 @@ snapshots: '@babel/compat-data@7.26.8': {} + '@babel/core@7.26.10': + dependencies: + '@ampproject/remapping': 2.3.0 + '@babel/code-frame': 7.26.2 + '@babel/generator': 7.27.0 + '@babel/helper-compilation-targets': 7.26.5 + '@babel/helper-module-transforms': 7.26.0(@babel/core@7.26.10) + '@babel/helpers': 7.27.0 + '@babel/parser': 7.27.0 + '@babel/template': 7.26.9 + '@babel/traverse': 7.27.0 + '@babel/types': 7.27.0 + convert-source-map: 2.0.0 + debug: 4.3.7(supports-color@5.5.0) + gensync: 1.0.0-beta.2 + json5: 2.2.3 + semver: 6.3.1 + transitivePeerDependencies: + - supports-color + '@babel/core@7.26.9': dependencies: '@ampproject/remapping': 2.3.0 @@ -6242,6 +6387,14 @@ snapshots: '@jridgewell/trace-mapping': 0.3.25 jsesc: 3.1.0 + '@babel/generator@7.27.0': + dependencies: + '@babel/parser': 7.27.0 + '@babel/types': 7.27.0 + '@jridgewell/gen-mapping': 0.3.8 + '@jridgewell/trace-mapping': 0.3.25 + jsesc: 3.1.0 + '@babel/helper-compilation-targets@7.26.5': dependencies: '@babel/compat-data': 7.26.8 @@ -6257,6 +6410,15 @@ snapshots: transitivePeerDependencies: - supports-color + '@babel/helper-module-transforms@7.26.0(@babel/core@7.26.10)': + dependencies: + '@babel/core': 7.26.10 + '@babel/helper-module-imports': 7.25.9 + '@babel/helper-validator-identifier': 7.25.9 + '@babel/traverse': 7.26.9 + transitivePeerDependencies: + - supports-color + '@babel/helper-module-transforms@7.26.0(@babel/core@7.26.9)': dependencies: '@babel/core': 7.26.9 @@ -6279,40 +6441,91 @@ snapshots: '@babel/template': 7.26.9 '@babel/types': 7.26.9 + '@babel/helpers@7.27.0': + dependencies: + '@babel/template': 7.27.0 + '@babel/types': 7.27.0 + '@babel/parser@7.26.9': dependencies: '@babel/types': 7.26.9 + '@babel/parser@7.27.0': + dependencies: + '@babel/types': 7.27.0 + + '@babel/plugin-syntax-async-generators@7.8.4(@babel/core@7.26.10)': + dependencies: + '@babel/core': 7.26.10 + '@babel/helper-plugin-utils': 7.26.5 + optional: true + '@babel/plugin-syntax-async-generators@7.8.4(@babel/core@7.26.9)': dependencies: '@babel/core': 7.26.9 '@babel/helper-plugin-utils': 7.26.5 + '@babel/plugin-syntax-bigint@7.8.3(@babel/core@7.26.10)': + dependencies: + '@babel/core': 7.26.10 + '@babel/helper-plugin-utils': 7.26.5 + optional: true + '@babel/plugin-syntax-bigint@7.8.3(@babel/core@7.26.9)': dependencies: '@babel/core': 7.26.9 '@babel/helper-plugin-utils': 7.26.5 + '@babel/plugin-syntax-class-properties@7.12.13(@babel/core@7.26.10)': + dependencies: + '@babel/core': 7.26.10 + '@babel/helper-plugin-utils': 7.26.5 + optional: true + '@babel/plugin-syntax-class-properties@7.12.13(@babel/core@7.26.9)': dependencies: '@babel/core': 7.26.9 '@babel/helper-plugin-utils': 7.26.5 + '@babel/plugin-syntax-class-static-block@7.14.5(@babel/core@7.26.10)': + dependencies: + '@babel/core': 7.26.10 + '@babel/helper-plugin-utils': 7.26.5 + optional: true + '@babel/plugin-syntax-class-static-block@7.14.5(@babel/core@7.26.9)': dependencies: '@babel/core': 7.26.9 '@babel/helper-plugin-utils': 7.26.5 + '@babel/plugin-syntax-import-attributes@7.26.0(@babel/core@7.26.10)': + dependencies: + '@babel/core': 7.26.10 + '@babel/helper-plugin-utils': 7.26.5 + optional: true + '@babel/plugin-syntax-import-attributes@7.26.0(@babel/core@7.26.9)': dependencies: '@babel/core': 7.26.9 '@babel/helper-plugin-utils': 7.26.5 + '@babel/plugin-syntax-import-meta@7.10.4(@babel/core@7.26.10)': + dependencies: + '@babel/core': 7.26.10 + '@babel/helper-plugin-utils': 7.26.5 + optional: true + '@babel/plugin-syntax-import-meta@7.10.4(@babel/core@7.26.9)': dependencies: '@babel/core': 7.26.9 '@babel/helper-plugin-utils': 7.26.5 + '@babel/plugin-syntax-json-strings@7.8.3(@babel/core@7.26.10)': + dependencies: + '@babel/core': 7.26.10 + '@babel/helper-plugin-utils': 7.26.5 + optional: true + '@babel/plugin-syntax-json-strings@7.8.3(@babel/core@7.26.9)': dependencies: '@babel/core': 7.26.9 @@ -6323,41 +6536,89 @@ snapshots: '@babel/core': 7.26.9 '@babel/helper-plugin-utils': 7.26.5 + '@babel/plugin-syntax-logical-assignment-operators@7.10.4(@babel/core@7.26.10)': + dependencies: + '@babel/core': 7.26.10 + '@babel/helper-plugin-utils': 7.26.5 + optional: true + '@babel/plugin-syntax-logical-assignment-operators@7.10.4(@babel/core@7.26.9)': dependencies: '@babel/core': 7.26.9 '@babel/helper-plugin-utils': 7.26.5 + '@babel/plugin-syntax-nullish-coalescing-operator@7.8.3(@babel/core@7.26.10)': + dependencies: + '@babel/core': 7.26.10 + '@babel/helper-plugin-utils': 7.26.5 + optional: true + '@babel/plugin-syntax-nullish-coalescing-operator@7.8.3(@babel/core@7.26.9)': dependencies: '@babel/core': 7.26.9 '@babel/helper-plugin-utils': 7.26.5 + '@babel/plugin-syntax-numeric-separator@7.10.4(@babel/core@7.26.10)': + dependencies: + '@babel/core': 7.26.10 + '@babel/helper-plugin-utils': 7.26.5 + optional: true + '@babel/plugin-syntax-numeric-separator@7.10.4(@babel/core@7.26.9)': dependencies: '@babel/core': 7.26.9 '@babel/helper-plugin-utils': 7.26.5 + '@babel/plugin-syntax-object-rest-spread@7.8.3(@babel/core@7.26.10)': + dependencies: + '@babel/core': 7.26.10 + '@babel/helper-plugin-utils': 7.26.5 + optional: true + '@babel/plugin-syntax-object-rest-spread@7.8.3(@babel/core@7.26.9)': dependencies: '@babel/core': 7.26.9 '@babel/helper-plugin-utils': 7.26.5 + '@babel/plugin-syntax-optional-catch-binding@7.8.3(@babel/core@7.26.10)': + dependencies: + '@babel/core': 7.26.10 + '@babel/helper-plugin-utils': 7.26.5 + optional: true + '@babel/plugin-syntax-optional-catch-binding@7.8.3(@babel/core@7.26.9)': dependencies: '@babel/core': 7.26.9 '@babel/helper-plugin-utils': 7.26.5 + '@babel/plugin-syntax-optional-chaining@7.8.3(@babel/core@7.26.10)': + dependencies: + '@babel/core': 7.26.10 + '@babel/helper-plugin-utils': 7.26.5 + optional: true + '@babel/plugin-syntax-optional-chaining@7.8.3(@babel/core@7.26.9)': dependencies: '@babel/core': 7.26.9 '@babel/helper-plugin-utils': 7.26.5 + '@babel/plugin-syntax-private-property-in-object@7.14.5(@babel/core@7.26.10)': + dependencies: + '@babel/core': 7.26.10 + '@babel/helper-plugin-utils': 7.26.5 + optional: true + '@babel/plugin-syntax-private-property-in-object@7.14.5(@babel/core@7.26.9)': dependencies: '@babel/core': 7.26.9 '@babel/helper-plugin-utils': 7.26.5 + '@babel/plugin-syntax-top-level-await@7.14.5(@babel/core@7.26.10)': + dependencies: + '@babel/core': 7.26.10 + '@babel/helper-plugin-utils': 7.26.5 + optional: true + '@babel/plugin-syntax-top-level-await@7.14.5(@babel/core@7.26.9)': dependencies: '@babel/core': 7.26.9 @@ -6368,14 +6629,14 @@ snapshots: '@babel/core': 7.26.9 '@babel/helper-plugin-utils': 7.26.5 - '@babel/plugin-transform-react-jsx-self@7.25.9(@babel/core@7.26.9)': + '@babel/plugin-transform-react-jsx-self@7.25.9(@babel/core@7.26.10)': dependencies: - '@babel/core': 7.26.9 + '@babel/core': 7.26.10 '@babel/helper-plugin-utils': 7.26.5 - '@babel/plugin-transform-react-jsx-source@7.25.9(@babel/core@7.26.9)': + '@babel/plugin-transform-react-jsx-source@7.25.9(@babel/core@7.26.10)': dependencies: - '@babel/core': 7.26.9 + '@babel/core': 7.26.10 '@babel/helper-plugin-utils': 7.26.5 '@babel/runtime-corejs3@7.26.0': @@ -6393,6 +6654,12 @@ snapshots: '@babel/parser': 7.26.9 '@babel/types': 7.26.9 + '@babel/template@7.27.0': + dependencies: + '@babel/code-frame': 7.26.2 + '@babel/parser': 7.27.0 + '@babel/types': 7.27.0 + '@babel/traverse@7.26.9': dependencies: '@babel/code-frame': 7.26.2 @@ -6405,11 +6672,28 @@ snapshots: transitivePeerDependencies: - supports-color + '@babel/traverse@7.27.0': + dependencies: + '@babel/code-frame': 7.26.2 + '@babel/generator': 7.27.0 + '@babel/parser': 7.27.0 + '@babel/template': 7.27.0 + '@babel/types': 7.27.0 + debug: 4.3.7(supports-color@5.5.0) + globals: 11.12.0 + transitivePeerDependencies: + - supports-color + '@babel/types@7.26.9': dependencies: '@babel/helper-string-parser': 7.25.9 '@babel/helper-validator-identifier': 7.25.9 + '@babel/types@7.27.0': + dependencies: + '@babel/helper-string-parser': 7.25.9 + '@babel/helper-validator-identifier': 7.25.9 + '@bcoe/v8-coverage@0.2.3': {} '@changesets/apply-release-plan@7.0.10': @@ -6592,79 +6876,76 @@ snapshots: tslib: 2.8.1 optional: true - '@esbuild/aix-ppc64@0.25.0': + '@esbuild/aix-ppc64@0.25.2': optional: true - '@esbuild/android-arm64@0.24.2': + '@esbuild/android-arm64@0.25.2': optional: true - '@esbuild/android-arm@0.24.2': + '@esbuild/android-arm@0.25.2': optional: true - '@esbuild/android-x64@0.24.2': + '@esbuild/android-x64@0.25.2': optional: true - '@esbuild/darwin-arm64@0.24.2': + '@esbuild/darwin-arm64@0.25.2': optional: true - '@esbuild/darwin-x64@0.24.2': + '@esbuild/darwin-x64@0.25.2': optional: true - '@esbuild/freebsd-arm64@0.24.2': + '@esbuild/freebsd-arm64@0.25.2': optional: true - '@esbuild/freebsd-x64@0.24.2': + '@esbuild/freebsd-x64@0.25.2': optional: true - '@esbuild/linux-arm64@0.24.2': + '@esbuild/linux-arm64@0.25.2': optional: true - '@esbuild/linux-arm@0.24.2': + '@esbuild/linux-arm@0.25.2': optional: true - '@esbuild/linux-ia32@0.24.2': + '@esbuild/linux-ia32@0.25.2': optional: true - '@esbuild/linux-loong64@0.24.2': + '@esbuild/linux-loong64@0.25.2': optional: true - '@esbuild/linux-mips64el@0.24.2': + '@esbuild/linux-mips64el@0.25.2': optional: true - '@esbuild/linux-ppc64@0.24.2': + '@esbuild/linux-ppc64@0.25.2': optional: true - '@esbuild/linux-riscv64@0.24.2': + '@esbuild/linux-riscv64@0.25.2': optional: true - '@esbuild/linux-s390x@0.24.2': + '@esbuild/linux-s390x@0.25.2': optional: true - '@esbuild/linux-x64@0.24.2': + '@esbuild/linux-x64@0.25.2': optional: true - '@esbuild/netbsd-arm64@0.24.2': + '@esbuild/netbsd-arm64@0.25.2': optional: true - '@esbuild/netbsd-x64@0.24.2': + '@esbuild/netbsd-x64@0.25.2': optional: true - '@esbuild/openbsd-arm64@0.24.2': + '@esbuild/openbsd-arm64@0.25.2': optional: true - '@esbuild/openbsd-x64@0.24.2': + '@esbuild/openbsd-x64@0.25.2': optional: true - '@esbuild/sunos-x64@0.24.2': + '@esbuild/sunos-x64@0.25.2': optional: true - '@esbuild/win32-arm64@0.24.2': + '@esbuild/win32-arm64@0.25.2': optional: true - '@esbuild/win32-ia32@0.24.2': - optional: true - - '@esbuild/win32-x64@0.24.2': + '@esbuild/win32-ia32@0.25.2': optional: true '@esbuild/win32-x64@0.25.2': @@ -8364,45 +8645,478 @@ snapshots: '@typescript-eslint/types': 8.15.0 eslint-visitor-keys: 4.2.0 - abitype@1.0.8(typescript@5.5.4): - optionalDependencies: - typescript: 5.5.4 - - abitype@1.0.8(typescript@5.8.3): - optionalDependencies: - typescript: 5.8.3 - zod: 3.24.2 - - acorn-jsx@5.3.2(acorn@8.14.0): - dependencies: - acorn: 8.14.0 - - acorn-walk@8.3.4: + '@typescript-eslint/visitor-keys@8.30.1': dependencies: - acorn: 8.14.0 - - acorn@8.14.0: {} - - aes-js@4.0.0-beta.5: {} + '@typescript-eslint/types': 8.30.1 + eslint-visitor-keys: 4.2.0 - agent-base@7.1.1: + '@vitejs/plugin-react@4.4.0(vite@6.2.6(@types/node@22.13.9)(jiti@2.4.2)(lightningcss@1.29.2))': dependencies: - debug: 4.3.7(supports-color@5.5.0) + '@babel/core': 7.26.10 + '@babel/plugin-transform-react-jsx-self': 7.25.9(@babel/core@7.26.10) + '@babel/plugin-transform-react-jsx-source': 7.25.9(@babel/core@7.26.10) + '@types/babel__core': 7.20.5 + react-refresh: 0.17.0 + vite: 6.2.6(@types/node@22.13.9)(jiti@2.4.2)(lightningcss@1.29.2) transitivePeerDependencies: - supports-color - aggregate-error@3.1.0: + '@wagmi/connectors@5.7.12(@types/react@19.1.2)(@wagmi/core@2.16.7(@tanstack/query-core@5.74.3)(@types/react@19.1.2)(react@19.0.0)(typescript@5.7.3)(use-sync-external-store@1.4.0(react@19.0.0))(viem@2.27.2(bufferutil@4.0.9)(typescript@5.7.3)(utf-8-validate@5.0.10)(zod@3.24.2)))(bufferutil@4.0.9)(react@19.0.0)(typescript@5.7.3)(utf-8-validate@5.0.10)(viem@2.27.2(bufferutil@4.0.9)(typescript@5.7.3)(utf-8-validate@5.0.10)(zod@3.24.2))(zod@3.24.2)': dependencies: - clean-stack: 2.2.0 - indent-string: 4.0.0 + '@coinbase/wallet-sdk': 4.3.0 + '@metamask/sdk': 0.32.0(bufferutil@4.0.9)(utf-8-validate@5.0.10) + '@safe-global/safe-apps-provider': 0.18.5(bufferutil@4.0.9)(typescript@5.7.3)(utf-8-validate@5.0.10)(zod@3.24.2) + '@safe-global/safe-apps-sdk': 9.1.0(bufferutil@4.0.9)(typescript@5.7.3)(utf-8-validate@5.0.10)(zod@3.24.2) + '@wagmi/core': 2.16.7(@tanstack/query-core@5.74.3)(@types/react@19.1.2)(react@19.0.0)(typescript@5.7.3)(use-sync-external-store@1.4.0(react@19.0.0))(viem@2.27.2(bufferutil@4.0.9)(typescript@5.7.3)(utf-8-validate@5.0.10)(zod@3.24.2)) + '@walletconnect/ethereum-provider': 2.19.2(@types/react@19.1.2)(bufferutil@4.0.9)(react@19.0.0)(typescript@5.7.3)(utf-8-validate@5.0.10)(zod@3.24.2) + cbw-sdk: '@coinbase/wallet-sdk@3.9.3' + viem: 2.27.2(bufferutil@4.0.9)(typescript@5.7.3)(utf-8-validate@5.0.10)(zod@3.24.2) + optionalDependencies: + typescript: 5.7.3 + transitivePeerDependencies: + - '@azure/app-configuration' + - '@azure/cosmos' + - '@azure/data-tables' + - '@azure/identity' + - '@azure/keyvault-secrets' + - '@azure/storage-blob' + - '@capacitor/preferences' + - '@deno/kv' + - '@netlify/blobs' + - '@planetscale/database' + - '@react-native-async-storage/async-storage' + - '@types/react' + - '@upstash/redis' + - '@vercel/blob' + - '@vercel/kv' + - aws4fetch + - bufferutil + - db0 + - encoding + - ioredis + - react + - supports-color + - uploadthing + - utf-8-validate + - zod - ajv@6.12.6: + '@wagmi/core@2.16.7(@tanstack/query-core@5.74.3)(@types/react@19.1.2)(react@19.0.0)(typescript@5.7.3)(use-sync-external-store@1.4.0(react@19.0.0))(viem@2.27.2(bufferutil@4.0.9)(typescript@5.7.3)(utf-8-validate@5.0.10)(zod@3.24.2))': dependencies: - fast-deep-equal: 3.1.3 - fast-json-stable-stringify: 2.1.0 - json-schema-traverse: 0.4.1 - uri-js: 4.4.1 - + eventemitter3: 5.0.1 + mipd: 0.0.7(typescript@5.7.3) + viem: 2.27.2(bufferutil@4.0.9)(typescript@5.7.3)(utf-8-validate@5.0.10)(zod@3.24.2) + zustand: 5.0.0(@types/react@19.1.2)(react@19.0.0)(use-sync-external-store@1.4.0(react@19.0.0)) + optionalDependencies: + '@tanstack/query-core': 5.74.3 + typescript: 5.7.3 + transitivePeerDependencies: + - '@types/react' + - immer + - react + - use-sync-external-store + + '@walletconnect/core@2.19.2(bufferutil@4.0.9)(typescript@5.7.3)(utf-8-validate@5.0.10)(zod@3.24.2)': + dependencies: + '@walletconnect/heartbeat': 1.2.2 + '@walletconnect/jsonrpc-provider': 1.0.14 + '@walletconnect/jsonrpc-types': 1.0.4 + '@walletconnect/jsonrpc-utils': 1.0.8 + '@walletconnect/jsonrpc-ws-connection': 1.0.16(bufferutil@4.0.9)(utf-8-validate@5.0.10) + '@walletconnect/keyvaluestorage': 1.1.1 + '@walletconnect/logger': 2.1.2 + '@walletconnect/relay-api': 1.0.11 + '@walletconnect/relay-auth': 1.1.0 + '@walletconnect/safe-json': 1.0.2 + '@walletconnect/time': 1.0.2 + '@walletconnect/types': 2.19.2 + '@walletconnect/utils': 2.19.2(bufferutil@4.0.9)(typescript@5.7.3)(utf-8-validate@5.0.10)(zod@3.24.2) + '@walletconnect/window-getters': 1.0.1 + es-toolkit: 1.33.0 + events: 3.3.0 + uint8arrays: 3.1.0 + transitivePeerDependencies: + - '@azure/app-configuration' + - '@azure/cosmos' + - '@azure/data-tables' + - '@azure/identity' + - '@azure/keyvault-secrets' + - '@azure/storage-blob' + - '@capacitor/preferences' + - '@deno/kv' + - '@netlify/blobs' + - '@planetscale/database' + - '@react-native-async-storage/async-storage' + - '@upstash/redis' + - '@vercel/blob' + - '@vercel/kv' + - aws4fetch + - bufferutil + - db0 + - ioredis + - typescript + - uploadthing + - utf-8-validate + - zod + + '@walletconnect/environment@1.0.1': + dependencies: + tslib: 1.14.1 + + '@walletconnect/ethereum-provider@2.19.2(@types/react@19.1.2)(bufferutil@4.0.9)(react@19.0.0)(typescript@5.7.3)(utf-8-validate@5.0.10)(zod@3.24.2)': + dependencies: + '@walletconnect/jsonrpc-http-connection': 1.0.8 + '@walletconnect/jsonrpc-provider': 1.0.14 + '@walletconnect/jsonrpc-types': 1.0.4 + '@walletconnect/jsonrpc-utils': 1.0.8 + '@walletconnect/keyvaluestorage': 1.1.1 + '@walletconnect/modal': 2.7.0(@types/react@19.1.2)(react@19.0.0) + '@walletconnect/sign-client': 2.19.2(bufferutil@4.0.9)(typescript@5.7.3)(utf-8-validate@5.0.10)(zod@3.24.2) + '@walletconnect/types': 2.19.2 + '@walletconnect/universal-provider': 2.19.2(bufferutil@4.0.9)(typescript@5.7.3)(utf-8-validate@5.0.10)(zod@3.24.2) + '@walletconnect/utils': 2.19.2(bufferutil@4.0.9)(typescript@5.7.3)(utf-8-validate@5.0.10)(zod@3.24.2) + events: 3.3.0 + transitivePeerDependencies: + - '@azure/app-configuration' + - '@azure/cosmos' + - '@azure/data-tables' + - '@azure/identity' + - '@azure/keyvault-secrets' + - '@azure/storage-blob' + - '@capacitor/preferences' + - '@deno/kv' + - '@netlify/blobs' + - '@planetscale/database' + - '@react-native-async-storage/async-storage' + - '@types/react' + - '@upstash/redis' + - '@vercel/blob' + - '@vercel/kv' + - aws4fetch + - bufferutil + - db0 + - encoding + - ioredis + - react + - typescript + - uploadthing + - utf-8-validate + - zod + + '@walletconnect/events@1.0.1': + dependencies: + keyvaluestorage-interface: 1.0.0 + tslib: 1.14.1 + + '@walletconnect/heartbeat@1.2.2': + dependencies: + '@walletconnect/events': 1.0.1 + '@walletconnect/time': 1.0.2 + events: 3.3.0 + + '@walletconnect/jsonrpc-http-connection@1.0.8': + dependencies: + '@walletconnect/jsonrpc-utils': 1.0.8 + '@walletconnect/safe-json': 1.0.2 + cross-fetch: 3.2.0 + events: 3.3.0 + transitivePeerDependencies: + - encoding + + '@walletconnect/jsonrpc-provider@1.0.14': + dependencies: + '@walletconnect/jsonrpc-utils': 1.0.8 + '@walletconnect/safe-json': 1.0.2 + events: 3.3.0 + + '@walletconnect/jsonrpc-types@1.0.4': + dependencies: + events: 3.3.0 + keyvaluestorage-interface: 1.0.0 + + '@walletconnect/jsonrpc-utils@1.0.8': + dependencies: + '@walletconnect/environment': 1.0.1 + '@walletconnect/jsonrpc-types': 1.0.4 + tslib: 1.14.1 + + '@walletconnect/jsonrpc-ws-connection@1.0.16(bufferutil@4.0.9)(utf-8-validate@5.0.10)': + dependencies: + '@walletconnect/jsonrpc-utils': 1.0.8 + '@walletconnect/safe-json': 1.0.2 + events: 3.3.0 + ws: 7.5.10(bufferutil@4.0.9)(utf-8-validate@5.0.10) + transitivePeerDependencies: + - bufferutil + - utf-8-validate + + '@walletconnect/keyvaluestorage@1.1.1': + dependencies: + '@walletconnect/safe-json': 1.0.2 + idb-keyval: 6.2.1 + unstorage: 1.15.0(idb-keyval@6.2.1) + transitivePeerDependencies: + - '@azure/app-configuration' + - '@azure/cosmos' + - '@azure/data-tables' + - '@azure/identity' + - '@azure/keyvault-secrets' + - '@azure/storage-blob' + - '@capacitor/preferences' + - '@deno/kv' + - '@netlify/blobs' + - '@planetscale/database' + - '@upstash/redis' + - '@vercel/blob' + - '@vercel/kv' + - aws4fetch + - db0 + - ioredis + - uploadthing + + '@walletconnect/logger@2.1.2': + dependencies: + '@walletconnect/safe-json': 1.0.2 + pino: 7.11.0 + + '@walletconnect/modal-core@2.7.0(@types/react@19.1.2)(react@19.0.0)': + dependencies: + valtio: 1.11.2(@types/react@19.1.2)(react@19.0.0) + transitivePeerDependencies: + - '@types/react' + - react + + '@walletconnect/modal-ui@2.7.0(@types/react@19.1.2)(react@19.0.0)': + dependencies: + '@walletconnect/modal-core': 2.7.0(@types/react@19.1.2)(react@19.0.0) + lit: 2.8.0 + motion: 10.16.2 + qrcode: 1.5.3 + transitivePeerDependencies: + - '@types/react' + - react + + '@walletconnect/modal@2.7.0(@types/react@19.1.2)(react@19.0.0)': + dependencies: + '@walletconnect/modal-core': 2.7.0(@types/react@19.1.2)(react@19.0.0) + '@walletconnect/modal-ui': 2.7.0(@types/react@19.1.2)(react@19.0.0) + transitivePeerDependencies: + - '@types/react' + - react + + '@walletconnect/relay-api@1.0.11': + dependencies: + '@walletconnect/jsonrpc-types': 1.0.4 + + '@walletconnect/relay-auth@1.1.0': + dependencies: + '@noble/curves': 1.8.0 + '@noble/hashes': 1.7.0 + '@walletconnect/safe-json': 1.0.2 + '@walletconnect/time': 1.0.2 + uint8arrays: 3.1.0 + + '@walletconnect/safe-json@1.0.2': + dependencies: + tslib: 1.14.1 + + '@walletconnect/sign-client@2.19.2(bufferutil@4.0.9)(typescript@5.7.3)(utf-8-validate@5.0.10)(zod@3.24.2)': + dependencies: + '@walletconnect/core': 2.19.2(bufferutil@4.0.9)(typescript@5.7.3)(utf-8-validate@5.0.10)(zod@3.24.2) + '@walletconnect/events': 1.0.1 + '@walletconnect/heartbeat': 1.2.2 + '@walletconnect/jsonrpc-utils': 1.0.8 + '@walletconnect/logger': 2.1.2 + '@walletconnect/time': 1.0.2 + '@walletconnect/types': 2.19.2 + '@walletconnect/utils': 2.19.2(bufferutil@4.0.9)(typescript@5.7.3)(utf-8-validate@5.0.10)(zod@3.24.2) + events: 3.3.0 + transitivePeerDependencies: + - '@azure/app-configuration' + - '@azure/cosmos' + - '@azure/data-tables' + - '@azure/identity' + - '@azure/keyvault-secrets' + - '@azure/storage-blob' + - '@capacitor/preferences' + - '@deno/kv' + - '@netlify/blobs' + - '@planetscale/database' + - '@react-native-async-storage/async-storage' + - '@upstash/redis' + - '@vercel/blob' + - '@vercel/kv' + - aws4fetch + - bufferutil + - db0 + - ioredis + - typescript + - uploadthing + - utf-8-validate + - zod + + '@walletconnect/time@1.0.2': + dependencies: + tslib: 1.14.1 + + '@walletconnect/types@2.19.2': + dependencies: + '@walletconnect/events': 1.0.1 + '@walletconnect/heartbeat': 1.2.2 + '@walletconnect/jsonrpc-types': 1.0.4 + '@walletconnect/keyvaluestorage': 1.1.1 + '@walletconnect/logger': 2.1.2 + events: 3.3.0 + transitivePeerDependencies: + - '@azure/app-configuration' + - '@azure/cosmos' + - '@azure/data-tables' + - '@azure/identity' + - '@azure/keyvault-secrets' + - '@azure/storage-blob' + - '@capacitor/preferences' + - '@deno/kv' + - '@netlify/blobs' + - '@planetscale/database' + - '@react-native-async-storage/async-storage' + - '@upstash/redis' + - '@vercel/blob' + - '@vercel/kv' + - aws4fetch + - db0 + - ioredis + - uploadthing + + '@walletconnect/universal-provider@2.19.2(bufferutil@4.0.9)(typescript@5.7.3)(utf-8-validate@5.0.10)(zod@3.24.2)': + dependencies: + '@walletconnect/events': 1.0.1 + '@walletconnect/jsonrpc-http-connection': 1.0.8 + '@walletconnect/jsonrpc-provider': 1.0.14 + '@walletconnect/jsonrpc-types': 1.0.4 + '@walletconnect/jsonrpc-utils': 1.0.8 + '@walletconnect/keyvaluestorage': 1.1.1 + '@walletconnect/logger': 2.1.2 + '@walletconnect/sign-client': 2.19.2(bufferutil@4.0.9)(typescript@5.7.3)(utf-8-validate@5.0.10)(zod@3.24.2) + '@walletconnect/types': 2.19.2 + '@walletconnect/utils': 2.19.2(bufferutil@4.0.9)(typescript@5.7.3)(utf-8-validate@5.0.10)(zod@3.24.2) + es-toolkit: 1.33.0 + events: 3.3.0 + transitivePeerDependencies: + - '@azure/app-configuration' + - '@azure/cosmos' + - '@azure/data-tables' + - '@azure/identity' + - '@azure/keyvault-secrets' + - '@azure/storage-blob' + - '@capacitor/preferences' + - '@deno/kv' + - '@netlify/blobs' + - '@planetscale/database' + - '@react-native-async-storage/async-storage' + - '@upstash/redis' + - '@vercel/blob' + - '@vercel/kv' + - aws4fetch + - bufferutil + - db0 + - encoding + - ioredis + - typescript + - uploadthing + - utf-8-validate + - zod + + '@walletconnect/utils@2.19.2(bufferutil@4.0.9)(typescript@5.7.3)(utf-8-validate@5.0.10)(zod@3.24.2)': + dependencies: + '@noble/ciphers': 1.2.1 + '@noble/curves': 1.8.1 + '@noble/hashes': 1.7.1 + '@walletconnect/jsonrpc-utils': 1.0.8 + '@walletconnect/keyvaluestorage': 1.1.1 + '@walletconnect/relay-api': 1.0.11 + '@walletconnect/relay-auth': 1.1.0 + '@walletconnect/safe-json': 1.0.2 + '@walletconnect/time': 1.0.2 + '@walletconnect/types': 2.19.2 + '@walletconnect/window-getters': 1.0.1 + '@walletconnect/window-metadata': 1.0.1 + bs58: 6.0.0 + detect-browser: 5.3.0 + query-string: 7.1.3 + uint8arrays: 3.1.0 + viem: 2.23.2(bufferutil@4.0.9)(typescript@5.7.3)(utf-8-validate@5.0.10)(zod@3.24.2) + transitivePeerDependencies: + - '@azure/app-configuration' + - '@azure/cosmos' + - '@azure/data-tables' + - '@azure/identity' + - '@azure/keyvault-secrets' + - '@azure/storage-blob' + - '@capacitor/preferences' + - '@deno/kv' + - '@netlify/blobs' + - '@planetscale/database' + - '@react-native-async-storage/async-storage' + - '@upstash/redis' + - '@vercel/blob' + - '@vercel/kv' + - aws4fetch + - bufferutil + - db0 + - ioredis + - typescript + - uploadthing + - utf-8-validate + - zod + + '@walletconnect/window-getters@1.0.1': + dependencies: + tslib: 1.14.1 + + '@walletconnect/window-metadata@1.0.1': + dependencies: + '@walletconnect/window-getters': 1.0.1 + tslib: 1.14.1 + + abitype@1.0.8(typescript@5.7.3)(zod@3.24.2): + optionalDependencies: + typescript: 5.7.3 + zod: 3.24.2 + + abitype@1.0.8(typescript@5.8.3)(zod@3.24.2): + optionalDependencies: + typescript: 5.8.3 + zod: 3.24.2 + + acorn-jsx@5.3.2(acorn@8.14.0): + dependencies: + acorn: 8.14.0 + + acorn-walk@8.3.4: + dependencies: + acorn: 8.14.0 + + acorn@8.14.0: {} + + aes-js@4.0.0-beta.5: {} + + agent-base@7.1.1: + dependencies: + debug: 4.3.7(supports-color@5.5.0) + transitivePeerDependencies: + - supports-color + + aggregate-error@3.1.0: + dependencies: + clean-stack: 2.2.0 + indent-string: 4.0.0 + + ajv@6.12.6: + dependencies: + fast-deep-equal: 3.1.3 + fast-json-stable-stringify: 2.1.0 + json-schema-traverse: 0.4.1 + uri-js: 4.4.1 + ansi-colors@4.1.3: {} ansi-escapes@4.3.2: @@ -8516,6 +9230,20 @@ snapshots: dependencies: possible-typed-array-names: 1.0.0 + babel-jest@29.7.0(@babel/core@7.26.10): + dependencies: + '@babel/core': 7.26.10 + '@jest/transform': 29.7.0 + '@types/babel__core': 7.20.5 + babel-plugin-istanbul: 6.1.1 + babel-preset-jest: 29.6.3(@babel/core@7.26.10) + chalk: 4.1.2 + graceful-fs: 4.2.11 + slash: 3.0.0 + transitivePeerDependencies: + - supports-color + optional: true + babel-jest@29.7.0(@babel/core@7.26.9): dependencies: '@babel/core': 7.26.9 @@ -8546,6 +9274,26 @@ snapshots: '@types/babel__core': 7.20.5 '@types/babel__traverse': 7.20.6 + babel-preset-current-node-syntax@1.1.0(@babel/core@7.26.10): + dependencies: + '@babel/core': 7.26.10 + '@babel/plugin-syntax-async-generators': 7.8.4(@babel/core@7.26.10) + '@babel/plugin-syntax-bigint': 7.8.3(@babel/core@7.26.10) + '@babel/plugin-syntax-class-properties': 7.12.13(@babel/core@7.26.10) + '@babel/plugin-syntax-class-static-block': 7.14.5(@babel/core@7.26.10) + '@babel/plugin-syntax-import-attributes': 7.26.0(@babel/core@7.26.10) + '@babel/plugin-syntax-import-meta': 7.10.4(@babel/core@7.26.10) + '@babel/plugin-syntax-json-strings': 7.8.3(@babel/core@7.26.10) + '@babel/plugin-syntax-logical-assignment-operators': 7.10.4(@babel/core@7.26.10) + '@babel/plugin-syntax-nullish-coalescing-operator': 7.8.3(@babel/core@7.26.10) + '@babel/plugin-syntax-numeric-separator': 7.10.4(@babel/core@7.26.10) + '@babel/plugin-syntax-object-rest-spread': 7.8.3(@babel/core@7.26.10) + '@babel/plugin-syntax-optional-catch-binding': 7.8.3(@babel/core@7.26.10) + '@babel/plugin-syntax-optional-chaining': 7.8.3(@babel/core@7.26.10) + '@babel/plugin-syntax-private-property-in-object': 7.14.5(@babel/core@7.26.10) + '@babel/plugin-syntax-top-level-await': 7.14.5(@babel/core@7.26.10) + optional: true + babel-preset-current-node-syntax@1.1.0(@babel/core@7.26.9): dependencies: '@babel/core': 7.26.9 @@ -8565,6 +9313,13 @@ snapshots: '@babel/plugin-syntax-private-property-in-object': 7.14.5(@babel/core@7.26.9) '@babel/plugin-syntax-top-level-await': 7.14.5(@babel/core@7.26.9) + babel-preset-jest@29.6.3(@babel/core@7.26.10): + dependencies: + '@babel/core': 7.26.10 + babel-plugin-jest-hoist: 29.6.3 + babel-preset-current-node-syntax: 1.1.0(@babel/core@7.26.10) + optional: true + babel-preset-jest@29.6.3(@babel/core@7.26.9): dependencies: '@babel/core': 7.26.9 @@ -9157,33 +9912,7 @@ snapshots: is-date-object: 1.0.5 is-symbol: 1.0.4 - esbuild@0.24.2: - optionalDependencies: - '@esbuild/aix-ppc64': 0.25.0 - '@esbuild/android-arm': 0.25.0 - '@esbuild/android-arm64': 0.25.0 - '@esbuild/android-x64': 0.25.0 - '@esbuild/darwin-arm64': 0.25.0 - '@esbuild/darwin-x64': 0.25.0 - '@esbuild/freebsd-arm64': 0.25.0 - '@esbuild/freebsd-x64': 0.25.0 - '@esbuild/linux-arm': 0.25.0 - '@esbuild/linux-arm64': 0.25.0 - '@esbuild/linux-ia32': 0.25.0 - '@esbuild/linux-loong64': 0.25.0 - '@esbuild/linux-mips64el': 0.25.0 - '@esbuild/linux-ppc64': 0.25.0 - '@esbuild/linux-riscv64': 0.25.0 - '@esbuild/linux-s390x': 0.25.0 - '@esbuild/linux-x64': 0.25.0 - '@esbuild/netbsd-arm64': 0.25.0 - '@esbuild/netbsd-x64': 0.25.0 - '@esbuild/openbsd-arm64': 0.25.0 - '@esbuild/openbsd-x64': 0.25.0 - '@esbuild/sunos-x64': 0.25.0 - '@esbuild/win32-arm64': 0.25.0 - '@esbuild/win32-ia32': 0.25.0 - '@esbuild/win32-x64': 0.25.0 + es-toolkit@1.33.0: {} esbuild@0.25.2: optionalDependencies: @@ -9342,7 +10071,7 @@ snapshots: '@humanfs/node': 0.16.6 '@humanwhocodes/module-importer': 1.0.1 '@humanwhocodes/retry': 0.4.2 - '@types/estree': 1.0.6 + '@types/estree': 1.0.7 '@types/json-schema': 7.0.15 ajv: 6.12.6 chalk: 4.1.2 @@ -10902,21 +11631,21 @@ snapshots: outdent@0.5.0: {} - ox@0.6.7(typescript@5.5.4): + ox@0.6.12(typescript@5.7.3)(zod@3.24.2): dependencies: '@adraffy/ens-normalize': 1.11.0 '@noble/curves': 1.8.1 '@noble/hashes': 1.7.1 '@scure/bip32': 1.6.2 '@scure/bip39': 1.5.4 - abitype: 1.0.8(typescript@5.5.4) + abitype: 1.0.8(typescript@5.7.3)(zod@3.24.2) eventemitter3: 5.0.1 optionalDependencies: - typescript: 5.5.4 + typescript: 5.7.3 transitivePeerDependencies: - zod - ox@0.6.7(typescript@5.8.3): + ox@0.6.7(typescript@5.7.3)(zod@3.24.2): dependencies: '@adraffy/ens-normalize': 1.11.0 '@noble/curves': 1.8.1 @@ -10930,35 +11659,35 @@ snapshots: transitivePeerDependencies: - zod - ox@0.6.7(typescript@5.8.3)(zod@3.24.2): + ox@0.6.9(typescript@5.7.3)(zod@3.24.2): dependencies: '@adraffy/ens-normalize': 1.11.0 '@noble/curves': 1.8.1 '@noble/hashes': 1.7.1 '@scure/bip32': 1.6.2 '@scure/bip39': 1.5.4 - abitype: 1.0.8(typescript@5.8.3)(zod@3.24.2) + abitype: 1.0.8(typescript@5.7.3)(zod@3.24.2) eventemitter3: 5.0.1 optionalDependencies: - typescript: 5.8.3 + typescript: 5.7.3 transitivePeerDependencies: - zod - ox@0.6.9(typescript@5.7.3)(zod@3.24.2): + ox@0.6.9(typescript@5.8.3)(zod@3.24.2): dependencies: '@adraffy/ens-normalize': 1.11.0 '@noble/curves': 1.8.1 '@noble/hashes': 1.7.1 '@scure/bip32': 1.6.2 '@scure/bip39': 1.5.4 - abitype: 1.0.8(typescript@5.7.3)(zod@3.24.2) + abitype: 1.0.8(typescript@5.8.3)(zod@3.24.2) eventemitter3: 5.0.1 optionalDependencies: - typescript: 5.7.3 + typescript: 5.8.3 transitivePeerDependencies: - zod - ox@0.6.9(typescript@5.8.3)(zod@3.24.2): + ox@0.7.0(typescript@5.8.3)(zod@3.24.2): dependencies: '@adraffy/ens-normalize': 1.11.0 '@noble/curves': 1.8.1 @@ -11217,7 +11946,7 @@ snapshots: react-is@18.3.1: {} - react-refresh@0.14.2: {} + react-refresh@0.17.0: {} react-remove-scroll-bar@2.3.8(@types/react@19.1.2)(react@19.0.0): dependencies: @@ -11756,6 +12485,25 @@ snapshots: dependencies: typescript: 5.7.3 + ts-jest@29.2.6(@babel/core@7.26.10)(@jest/transform@29.7.0)(@jest/types@29.6.3)(babel-jest@29.7.0(@babel/core@7.26.10))(jest@29.7.0(@types/node@22.13.9)(ts-node@10.9.2(@types/node@22.13.9)(typescript@5.8.3)))(typescript@5.8.3): + dependencies: + bs-logger: 0.2.6 + ejs: 3.1.10 + fast-json-stable-stringify: 2.1.0 + jest: 29.7.0(@types/node@22.13.9)(ts-node@10.9.2(@types/node@22.13.9)(typescript@5.8.3)) + jest-util: 29.7.0 + json5: 2.2.3 + lodash.memoize: 4.1.2 + make-error: 1.3.6 + semver: 7.7.1 + typescript: 5.8.3 + yargs-parser: 21.1.1 + optionalDependencies: + '@babel/core': 7.26.10 + '@jest/transform': 29.7.0 + '@jest/types': 29.6.3 + babel-jest: 29.7.0(@babel/core@7.26.10) + ts-jest@29.2.6(@babel/core@7.26.9)(@jest/transform@29.7.0)(@jest/types@29.6.3)(babel-jest@29.7.0(@babel/core@7.26.9))(jest@29.7.0(@types/node@22.13.9)(ts-node@10.9.2(@types/node@22.13.9)(typescript@5.8.3)))(typescript@5.8.3): dependencies: bs-logger: 0.2.6 @@ -12055,23 +12803,6 @@ snapshots: - utf-8-validate - zod - viem@2.27.0(bufferutil@4.0.9)(typescript@5.7.3)(utf-8-validate@5.0.10)(zod@3.24.2): - dependencies: - '@noble/curves': 1.8.1 - '@noble/hashes': 1.7.1 - '@scure/bip32': 1.6.2 - '@scure/bip39': 1.5.4 - abitype: 1.0.8(typescript@5.7.3)(zod@3.24.2) - isows: 1.0.6(ws@8.18.1(bufferutil@4.0.9)(utf-8-validate@5.0.10)) - ox: 0.6.9(typescript@5.7.3)(zod@3.24.2) - ws: 8.18.1(bufferutil@4.0.9)(utf-8-validate@5.0.10) - optionalDependencies: - typescript: 5.7.3 - transitivePeerDependencies: - - bufferutil - - utf-8-validate - - zod - viem@2.27.2(bufferutil@4.0.9)(typescript@5.7.3)(utf-8-validate@5.0.10)(zod@3.24.2): dependencies: '@noble/curves': 1.8.1 @@ -12117,14 +12848,14 @@ snapshots: jiti: 2.4.2 lightningcss: 1.29.2 - wagmi@2.14.16(@tanstack/query-core@5.74.3)(@tanstack/react-query@5.74.3(react@19.0.0))(@types/react@19.1.2)(bufferutil@4.0.9)(react@19.0.0)(typescript@5.7.3)(utf-8-validate@5.0.10)(viem@2.27.0(bufferutil@4.0.9)(typescript@5.7.3)(utf-8-validate@5.0.10)(zod@3.24.2))(zod@3.24.2): + wagmi@2.14.16(@tanstack/query-core@5.74.3)(@tanstack/react-query@5.74.3(react@19.0.0))(@types/react@19.1.2)(bufferutil@4.0.9)(react@19.0.0)(typescript@5.7.3)(utf-8-validate@5.0.10)(viem@2.27.2(bufferutil@4.0.9)(typescript@5.7.3)(utf-8-validate@5.0.10)(zod@3.24.2))(zod@3.24.2): dependencies: '@tanstack/react-query': 5.74.3(react@19.0.0) - '@wagmi/connectors': 5.7.12(@types/react@19.1.2)(@wagmi/core@2.16.7(@tanstack/query-core@5.74.3)(@types/react@19.1.2)(react@19.0.0)(typescript@5.7.3)(use-sync-external-store@1.4.0(react@19.0.0))(viem@2.27.0(bufferutil@4.0.9)(typescript@5.7.3)(utf-8-validate@5.0.10)(zod@3.24.2)))(bufferutil@4.0.9)(react@19.0.0)(typescript@5.7.3)(utf-8-validate@5.0.10)(viem@2.27.0(bufferutil@4.0.9)(typescript@5.7.3)(utf-8-validate@5.0.10)(zod@3.24.2))(zod@3.24.2) - '@wagmi/core': 2.16.7(@tanstack/query-core@5.74.3)(@types/react@19.1.2)(react@19.0.0)(typescript@5.7.3)(use-sync-external-store@1.4.0(react@19.0.0))(viem@2.27.0(bufferutil@4.0.9)(typescript@5.7.3)(utf-8-validate@5.0.10)(zod@3.24.2)) + '@wagmi/connectors': 5.7.12(@types/react@19.1.2)(@wagmi/core@2.16.7(@tanstack/query-core@5.74.3)(@types/react@19.1.2)(react@19.0.0)(typescript@5.7.3)(use-sync-external-store@1.4.0(react@19.0.0))(viem@2.27.2(bufferutil@4.0.9)(typescript@5.7.3)(utf-8-validate@5.0.10)(zod@3.24.2)))(bufferutil@4.0.9)(react@19.0.0)(typescript@5.7.3)(utf-8-validate@5.0.10)(viem@2.27.2(bufferutil@4.0.9)(typescript@5.7.3)(utf-8-validate@5.0.10)(zod@3.24.2))(zod@3.24.2) + '@wagmi/core': 2.16.7(@tanstack/query-core@5.74.3)(@types/react@19.1.2)(react@19.0.0)(typescript@5.7.3)(use-sync-external-store@1.4.0(react@19.0.0))(viem@2.27.2(bufferutil@4.0.9)(typescript@5.7.3)(utf-8-validate@5.0.10)(zod@3.24.2)) react: 19.0.0 use-sync-external-store: 1.4.0(react@19.0.0) - viem: 2.27.0(bufferutil@4.0.9)(typescript@5.7.3)(utf-8-validate@5.0.10)(zod@3.24.2) + viem: 2.27.2(bufferutil@4.0.9)(typescript@5.7.3)(utf-8-validate@5.0.10)(zod@3.24.2) optionalDependencies: typescript: 5.7.3 transitivePeerDependencies: From 6f33b56e712d9e670feba329d0e6a9381b8c1a04 Mon Sep 17 00:00:00 2001 From: Shun Kakinoki Date: Fri, 18 Apr 2025 17:07:21 +0900 Subject: [PATCH 348/439] Add balance retrieval and call methods to PkRelayer; implement precondition check placeholder --- packages/wallet/core/src/relayer/pk-relayer.ts | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/packages/wallet/core/src/relayer/pk-relayer.ts b/packages/wallet/core/src/relayer/pk-relayer.ts index c00773830..c420f1b50 100644 --- a/packages/wallet/core/src/relayer/pk-relayer.ts +++ b/packages/wallet/core/src/relayer/pk-relayer.ts @@ -1,4 +1,4 @@ -import { Payload } from '@0xsequence/wallet-primitives' +import { Payload, Precondition } from '@0xsequence/wallet-primitives' import { Address, Hex, Provider, Secp256k1, TransactionEnvelopeEip1559 } from 'ox' import { LocalRelayer } from './local' import { FeeOption, FeeQuote, OperationStatus, Relayer } from './relayer' @@ -66,6 +66,17 @@ export class PkRelayer implements Relayer { }) return tx }, + getBalance: async (address: string): Promise => { + const balanceHex = await this.provider.request({ + method: 'eth_getBalance', + params: [address as Address.Address, 'latest'], + }) + return BigInt(balanceHex) + }, + call: async (args: { to: string; data: string }): Promise => { + const callArgs = { to: args.to as `0x${string}`, data: args.data as `0x${string}` } + return await this.provider.request({ method: 'eth_call', params: [callArgs, 'latest'] }) + }, }) } @@ -88,4 +99,9 @@ export class PkRelayer implements Relayer { status(opHash: Hex.Hex, chainId: bigint): Promise { return this.relayer.status(opHash, chainId) } + + async checkPrecondition(precondition: Precondition.Precondition): Promise { + // TODO: Implement precondition check + return true + } } From fceba7cb303f8b06b2cd8cd468adc3612da0f93d Mon Sep 17 00:00:00 2001 From: Shun Kakinoki Date: Fri, 18 Apr 2025 17:08:30 +0900 Subject: [PATCH 349/439] Add mock contract addresses and mint function ABI to test constants --- packages/wallet/core/test/constants.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/packages/wallet/core/test/constants.ts b/packages/wallet/core/test/constants.ts index aa75dff0b..0d827cc20 100644 --- a/packages/wallet/core/test/constants.ts +++ b/packages/wallet/core/test/constants.ts @@ -4,6 +4,12 @@ import { Abi, Address } from 'ox' const envFile = process.env.CI ? '.env.test' : '.env.test.local' dotenvConfig({ path: envFile }) +export const MOCK_IMPLICIT_CONTRACT: Address.Address = '0x041E0CDC028050519C8e6485B2d9840caf63773F' +export const MOCK_IMPLICIT_INVALID_CONTRACT: Address.Address = '0x99aA13abCDB1759Eb8653fB12090BA95bd793083' +export const ERC20_IMPLICIT_MINT_CONTRACT: Address.Address = '0xe19D4dBC90e371c4adC42f07344C2C9a50838d84' + +export const ERC20_MINT_ONCE = Abi.from(['function mintOnce(address to, uint256 amount)'])[0] + export const EMITTER_ADDRESS: Address.Address = '0xb9239d78e60F3491b36538C6e51916c7B552cCBb' export const EMITTER_ABI = Abi.from(['function explicitEmit()', 'function implicitEmit()']) From be25a6d8f269b307beacfd4a8854b38e2c37d064 Mon Sep 17 00:00:00 2001 From: Shun Kakinoki Date: Fri, 18 Apr 2025 17:16:43 +0900 Subject: [PATCH 350/439] Enhance HomeIndexRoute with transaction receipt handling and precondition status checks. Integrate RpcRelayer for improved transaction management and update UI to reflect transaction status dynamically. --- .../src/routes/home/home-index-route.tsx | 185 ++++++++++++------ packages/wallet/core/src/relayer/index.ts | 1 + 2 files changed, 125 insertions(+), 61 deletions(-) diff --git a/extras/demo-anypay/src/routes/home/home-index-route.tsx b/extras/demo-anypay/src/routes/home/home-index-route.tsx index a9983ceca..3db1ac2f6 100644 --- a/extras/demo-anypay/src/routes/home/home-index-route.tsx +++ b/extras/demo-anypay/src/routes/home/home-index-route.tsx @@ -13,7 +13,8 @@ import { AbiFunction, Address, Bytes } from 'ox' import * as chains from 'viem/chains' import { AnyPay } from '@0xsequence/wallet-core' import { Context as ContextLike } from '@0xsequence/wallet-primitives' -// import { PublicClient } from 'viem' +import { useWaitForTransactionReceipt } from 'wagmi' +import { Relayer } from '@0xsequence/wallet-core' // Type guard for native token balance function isNativeToken(token: TokenBalance | NativeTokenBalance): boolean { @@ -89,12 +90,16 @@ export const HomeIndexRoute = () => { }) const indexerClient = useIndexerGatewayClient() const apiClient = useAPIClient() + const relayer = useMemo(() => { + return new Relayer.Rpc.RpcRelayer('https://relayer.sequence.app') + }, []) // State for intent results const [intentOperations, setIntentOperations] = useState(null) const [intentPreconditions, setIntentPreconditions] = useState( null, ) + const [txnHash, setTxnHash] = useState() // Default empty page info for query fallback const defaultPage = { page: 1, pageSize: 10, totalRecords: 0, more: false } @@ -150,40 +155,45 @@ export const HomeIndexRoute = () => { console.log('setMetaTxnStatus', setMetaTxnStatus) console.log('setPreconditionStatuses', setPreconditionStatuses) - // Add function to check meta transaction status - // const checkMetaTxnStatus = async (txnHash: string) => { - // try { - // const receipt = await publicClient.getTransactionReceipt({ hash: txnHash as `0x${string}` }) - // setMetaTxnStatus({ - // txnHash, - // status: receipt.status === 'success' ? 'Success' : 'Failed', - // revertReason: receipt.status === 'reverted' ? 'Transaction reverted' : undefined, - // gasUsed: Number(receipt.gasUsed), - // effectiveGasPrice: receipt.effectiveGasPrice?.toString(), - // }) - // } catch (error) { - // console.error('Error checking meta transaction status:', error) - // } - // } + const updateMetaTxnStatus = ( + hash: Hex | undefined, + status: 'success' | 'reverted' | 'pending' | 'sending', + gasUsed?: bigint, + effectiveGasPrice?: bigint, + revertReason?: string | null, + ) => { + setMetaTxnStatus({ + txnHash: hash, + status: + status === 'success' + ? 'Success' + : status === 'reverted' + ? 'Failed' + : status === 'sending' + ? 'Sending...' + : 'Pending', + revertReason: status === 'reverted' ? revertReason || 'Transaction reverted' : undefined, + gasUsed: gasUsed ? Number(gasUsed) : undefined, + effectiveGasPrice: effectiveGasPrice?.toString(), + }) + } - // // Add function to check precondition statuses - // const checkPreconditionStatuses = async () => { - // if (!intentPreconditions) return + const checkPreconditionStatuses = async () => { + if (!intentPreconditions || !relayer) return // Use instantiated relayer - // const relayer = new LocalRelayer(publicClient) - // const statuses = await Promise.all( - // intentPreconditions.map(async (precondition) => { - // try { - // return await relayer.checkPrecondition(precondition) - // } catch (error) { - // console.error('Error checking precondition:', error) - // return false - // } - // }) - // ) + const statuses = await Promise.all( + intentPreconditions.map(async (precondition) => { + try { + return await relayer.checkPrecondition(precondition) + } catch (error) { + console.error('Error checking precondition:', error) + return false + } + }), + ) - // setPreconditionStatuses(statuses) - // } + setPreconditionStatuses(statuses) + } const commitIntentConfigMutation = useMutation({ mutationFn: async (args: { @@ -419,37 +429,75 @@ export const HomeIndexRoute = () => { } // Update handleSendOriginCall to track status - // const handleSendOriginCall = async () => { - // if (!intentOperations?.[0]?.calls?.[0] || !verificationStatus?.success) return + const handleSendOriginCall = async () => { + if (!intentOperations?.[0]?.calls?.[0] || !verificationStatus?.success) return - // const call = intentOperations[0].calls[0] - // const { hash } = await sendTransaction({ - // to: call.to as `0x${string}`, - // data: call.data as `0x${string}`, - // value: BigInt(call.value || '0'), - // chainId: parseInt(intentOperations[0].chainId), - // }) + setTxnHash(undefined) // Reset hash before sending + updateMetaTxnStatus(undefined, 'sending') // Update UI immediately - // if (hash) { - // setMetaTxnStatus({ txnHash: hash }) - // // Start polling for status - // const interval = setInterval(() => { - // checkMetaTxnStatus(hash) - // }, 5000) + sendTransaction( + { + to: intentOperations[0].calls[0].to as `0x${string}`, + data: intentOperations[0].calls[0].data as `0x${string}`, + value: BigInt(intentOperations[0].calls[0].value || '0'), + chainId: parseInt(intentOperations[0].chainId), + }, + { + onSuccess: (hash) => { + console.log('Transaction sent, hash:', hash) + setTxnHash(hash) // Set hash to trigger useWaitForTransactionReceipt + // Status will be updated by the useEffect hook watching the receipt + }, + onError: (error) => { + console.error('Transaction failed:', error) + updateMetaTxnStatus(undefined, 'reverted', undefined, undefined, error.message) + }, + }, + ) + } + + // Hook to wait for transaction receipt + const { + data: receipt, + isLoading: isWaitingForReceipt, + isSuccess, + isError, + error: receiptError, + } = useWaitForTransactionReceipt({ + hash: txnHash, + confirmations: 1, + query: { + enabled: !!txnHash, + }, + }) - // // Cleanup interval after 5 minutes - // setTimeout(() => { - // clearInterval(interval) - // }, 300000) - // } - // } + // Effect to update status based on receipt + useEffect(() => { + if (!txnHash) { + // No transaction sent yet or reset + setMetaTxnStatus(null) // Clear status + return + } + if (isWaitingForReceipt) { + updateMetaTxnStatus(txnHash, 'pending') + return + } + if (isSuccess && receipt) { + updateMetaTxnStatus(receipt.transactionHash, receipt.status, receipt.gasUsed, receipt.effectiveGasPrice) + // Optionally, trigger relayer status check here if needed after confirmation + // e.g., checkPreconditionStatuses() + } else if (isError) { + console.error('Error waiting for receipt:', receiptError) + updateMetaTxnStatus(txnHash, 'reverted', undefined, undefined, receiptError?.message || 'Failed to get receipt') + } + }, [isWaitingForReceipt, isSuccess, isError, receipt, txnHash, receiptError]) // Add useEffect to check precondition statuses when intentPreconditions changes - // useEffect(() => { - // if (intentPreconditions) { - // checkPreconditionStatuses() - // } - // }, [intentPreconditions]) + useEffect(() => { + if (intentPreconditions) { + checkPreconditionStatuses() + } + }, [intentPreconditions, checkPreconditionStatuses]) return (
@@ -962,7 +1010,7 @@ export const HomeIndexRoute = () => { strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} - d="M19 11H5m14 0a2 2 0 012 2v6a2 2 0 01-2 2H5a2 2 0 01-2-2v-6a2 2 0 012-2m14 0V9a2 2 0 00-2-2M5 11V9a2 2 0 012-2m0 0V5a2 2 0 012-2h6a2 2 0 012 2v2M7 7h10" + d="M19 11H5m14 0a2 2 0 012 2v6a2 2 0 01-2 2H5a2 2 0 01-2-2v-6a2 2 0 012-2m14 0V9a2 2 0 00-2-2M5 11V9a2 2 0 012-2m0 0V5a2 2 0 012-2h6a2 2 0 012 2" /> Preconditions @@ -1246,7 +1294,7 @@ export const HomeIndexRoute = () => {
+ + {/* Preview calculated address */} + {account.address && intentOperations && ( +
+ + Calculated Address: + + {(() => { + try { + return calculateIntentAddress(intentOperations, account.address).toString() + } catch (error) { + return 'Error calculating address: ' + (error as Error).message + } + })()} + + +
+ )} + {commitIntentConfigMutation.isError && (
From 960c9add01a7f3870e201c137ba72ea180531b77 Mon Sep 17 00:00:00 2001 From: Shun Kakinoki Date: Fri, 18 Apr 2025 22:17:03 +0900 Subject: [PATCH 356/439] Enhance HomeIndexRoute by adding origin call parameter calculations and updating UI to reflect calculated values. Implement useCallback for performance optimization and improve error handling for parameter retrieval. --- .../src/routes/home/home-index-route.tsx | 167 ++++++++++++++---- 1 file changed, 137 insertions(+), 30 deletions(-) diff --git a/extras/demo-anypay/src/routes/home/home-index-route.tsx b/extras/demo-anypay/src/routes/home/home-index-route.tsx index 8923d74cf..38c039125 100644 --- a/extras/demo-anypay/src/routes/home/home-index-route.tsx +++ b/extras/demo-anypay/src/routes/home/home-index-route.tsx @@ -1,4 +1,4 @@ -import { useState, useMemo, useEffect } from 'react' +import { useState, useMemo, useEffect, useCallback } from 'react' import { useAccount, useConnect, useDisconnect, useSendTransaction } from 'wagmi' import { Connector } from 'wagmi' import { useIndexerGatewayClient } from '@0xsequence/hooks' @@ -16,12 +16,21 @@ import { Context as ContextLike } from '@0xsequence/wallet-primitives' import { useWaitForTransactionReceipt } from 'wagmi' import { Relayer } from '@0xsequence/wallet-core' +// Add type for calculated origin call parameters +type OriginCallParams = { + to: `0x${string}` | null + data: Hex | null + value: bigint | null + chainId: number | null + error?: string +} + // Type guard for native token balance function isNativeToken(token: TokenBalance | NativeTokenBalance): boolean { if ('contractAddress' in token) { - return false // If it has contractAddress, it's an ERC20 token + return false } - return true // NativeTokenBalance is always a native token + return true } // Types for intent actions @@ -152,8 +161,9 @@ export const HomeIndexRoute = () => { const [preconditionStatuses, setPreconditionStatuses] = useState([]) - // Add function to calculate intent configuration address - const calculateIntentAddress = (operations: IntentOperation[], mainSigner: string) => { + const [originCallParams, setOriginCallParams] = useState(null) + + const calculateIntentAddress = useCallback((operations: IntentOperation[], mainSigner: string) => { try { const context: ContextLike.Context = { factory: '0xBd0F8abD58B4449B39C57Ac9D5C67433239aC447' as `0x${string}`, @@ -182,10 +192,7 @@ export const HomeIndexRoute = () => { console.error('Error calculating intent address:', error) throw error } - } - - console.log('setMetaTxnStatus', setMetaTxnStatus) - console.log('setPreconditionStatuses', setPreconditionStatuses) + }, []) const updateMetaTxnStatus = ( hash: Hex | undefined, @@ -210,7 +217,7 @@ export const HomeIndexRoute = () => { }) } - const checkPreconditionStatuses = async () => { + const checkPreconditionStatuses = useCallback(async () => { if (!intentPreconditions || !relayer) return // Use instantiated relayer const statuses = await Promise.all( @@ -225,7 +232,7 @@ export const HomeIndexRoute = () => { ) setPreconditionStatuses(statuses) - } + }, [intentPreconditions, relayer]) // Add dependencies const commitIntentConfigMutation = useMutation({ mutationFn: async (args: { @@ -438,25 +445,36 @@ export const HomeIndexRoute = () => { setShowCustomCallForm(false) } - // Update handleSendOriginCall to track status + // Update handleSendOriginCall to use calculated parameters from state const handleSendOriginCall = async () => { - if (!intentOperations?.[0]?.calls?.[0] || !verificationStatus?.success) return + // Use the calculated parameters from state + if ( + !originCallParams || + originCallParams.error || + !originCallParams.to || + !originCallParams.data || + originCallParams.value === null || + originCallParams.chainId === null + ) { + console.error('Origin call parameters not available or invalid:', originCallParams) + updateMetaTxnStatus(undefined, 'reverted', undefined, undefined, 'Origin call parameters not ready') + return + } - setTxnHash(undefined) // Reset hash before sending - updateMetaTxnStatus(undefined, 'sending') // Update UI immediately + setTxnHash(undefined) + updateMetaTxnStatus(undefined, 'sending') sendTransaction( { - to: intentOperations[0].calls[0].to as `0x${string}`, - data: intentOperations[0].calls[0].data as `0x${string}`, - value: BigInt(intentOperations[0].calls[0].value || '0'), - chainId: parseInt(intentOperations[0].chainId), + to: originCallParams.to, + data: originCallParams.data, + value: originCallParams.value, + chainId: originCallParams.chainId, }, { onSuccess: (hash) => { console.log('Transaction sent, hash:', hash) setTxnHash(hash) // Set hash to trigger useWaitForTransactionReceipt - // Status will be updated by the useEffect hook watching the receipt }, onError: (error) => { console.error('Transaction failed:', error) @@ -509,6 +527,72 @@ export const HomeIndexRoute = () => { } }, [intentPreconditions, checkPreconditionStatuses]) + // Effect to calculate actual origin call parameters for UI display + useEffect(() => { + if (!intentOperations?.[0]?.chainId || !selectedToken || !intentPreconditions || !account.address) { + setOriginCallParams(null) + return + } + + try { + // Calculate the intent address here as it's needed for params + const intentAddress = calculateIntentAddress(intentOperations, account.address) + const intentAddressString = intentAddress.toString() as Address.Address + + let calcTo: Address.Address + let calcData: Hex = '0x' + let calcValue: bigint = 0n + const calcChainId: number = parseInt(intentOperations[0].chainId) + + const recipientAddress = intentAddressString + + const isNative = selectedToken.contractAddress === zeroAddress + + if (isNative) { + const nativePrecondition = intentPreconditions.find( + (p) => + (p.type === 'transfer-native' || p.type === 'native-balance') && + // @ts-expect-error + p.chainId === calcChainId.toString(), + ) + const nativeMinAmount = nativePrecondition?.data?.minAmount ?? nativePrecondition?.data?.min + if (nativeMinAmount === undefined) { + throw new Error('Could not find native precondition (transfer-native or native-balance) or min amount') + } + calcValue = BigInt(nativeMinAmount) + calcTo = recipientAddress + } else { + const erc20Precondition = intentPreconditions.find( + (p) => + p.type === 'erc20-balance' && + // @ts-expect-error + p.chainId === calcChainId.toString() && + p.data?.token && + isAddressEqual(Address.from(p.data.token), Address.from(selectedToken.contractAddress)), + ) + + const erc20MinAmount = erc20Precondition?.data?.min + if (erc20MinAmount === undefined) { + throw new Error('Could not find ERC20 balance precondition or min amount') + } + const erc20Transfer = AbiFunction.from('function transfer(address,uint256) returns (bool)') + calcData = AbiFunction.encodeData(erc20Transfer, [recipientAddress, BigInt(erc20MinAmount)]) as Hex + calcTo = selectedToken.contractAddress as Address.Address + } + + setOriginCallParams({ + to: calcTo, + data: calcData, + value: calcValue, + chainId: calcChainId, + error: undefined, + }) + } catch (error: any) { + console.error('Failed to calculate origin call params for UI:', error) + setOriginCallParams({ to: null, data: null, value: null, chainId: null, error: error.message }) + } + }, [intentOperations, selectedToken, intentPreconditions, account.address, calculateIntentAddress]) + return (
@@ -1302,44 +1386,67 @@ export const HomeIndexRoute = () => {
From: - {account.address} + {account.address ?? '...'}
To: - {intentOperations[0].calls[0].to} + + {originCallParams?.to ?? (originCallParams?.error ? 'Error' : 'Calculating...')} +
Value: - {intentOperations[0].calls[0].value || '0'} + + {originCallParams?.value?.toString() ?? (originCallParams?.error ? 'Error' : 'Calculating...')} +
Data: - {intentOperations[0].calls[0].data || '0x'} + + {originCallParams?.data ?? (originCallParams?.error ? 'Error' : 'Calculating...')} +
Chain ID: - {intentOperations[0].chainId} + {originCallParams?.chainId?.toString() ?? + (originCallParams?.error ? 'Error' : 'Calculating...')} - - - {getChainInfo(parseInt(intentOperations[0].chainId))?.name || 'Unknown Chain'} - + {originCallParams?.chainId && ( + <> + + + {getChainInfo(originCallParams.chainId)?.name || 'Unknown Chain'} + + + )}
+ {originCallParams?.error && ( +
+ + Error calculating params: {originCallParams.error} + +
+ )}
)} - {commitIntentConfigMutation.isError && ( -
- - Error: {commitIntentConfigMutation.error.message} - + {/* Verification Banner */} + {verificationStatus && ( +
+
+ {verificationStatus.success ? ( + + + + ) : ( + + + + )} +
+ + {verificationStatus.success ? 'Verification Successful' : 'Verification Failed'} + +
+
+ Received:{' '} + + {verificationStatus.receivedAddress} + +
+
+ Calculated:{' '} + + {verificationStatus.calculatedAddress} + +
+
+
+
)} + + {commitIntentConfigMutation.isError && + !verificationStatus && ( // Only show generic error if verification banner isn't shown +
+ + Error: {commitIntentConfigMutation.error.message} + +
+ )} {commitIntentConfigMutation.isSuccess && ( -
+
Intent configuration committed successfully! @@ -1307,54 +1364,6 @@ export const HomeIndexRoute = () => {
)} - {/* Verification Banner */} - {verificationStatus && ( -
-
- {verificationStatus.success ? ( - - - - ) : ( - - - - )} -
- - {verificationStatus.success ? 'Verification Successful' : 'Verification Failed'} - -
-
Received: {verificationStatus.receivedAddress}
-
Calculated: {verificationStatus.calculatedAddress}
-
-
-
-
- )} - {/* 5. Origin Call */} {intentOperations && intentPreconditions && (
From 214ba4d6a1a1182184e614e57e033105d5b0d69a Mon Sep 17 00:00:00 2001 From: Shun Kakinoki Date: Fri, 18 Apr 2025 22:35:44 +0900 Subject: [PATCH 359/439] Update HomeIndexRoute to integrate lucide-react icons for improved UI consistency and replace SVG elements with corresponding icon components. Add lucide-react as a dependency in package.json and update pnpm-lock.yaml accordingly. --- extras/demo-anypay/package.json | 3 +- .../src/routes/home/home-index-route.tsx | 273 ++---------------- pnpm-lock.yaml | 12 + 3 files changed, 45 insertions(+), 243 deletions(-) diff --git a/extras/demo-anypay/package.json b/extras/demo-anypay/package.json index aa74735f2..9f20353fd 100644 --- a/extras/demo-anypay/package.json +++ b/extras/demo-anypay/package.json @@ -24,10 +24,10 @@ "@0xsequence/indexer": "^2.3.9", "@0xsequence/network": "^2.3.9", "@0xsequence/relayer": "workspace:*", + "@0xsequence/wagmi-connector": "^4.0.1", "@0xsequence/wallet-core": "workspace:*", "@0xsequence/wallet-primitives": "workspace:*", "@0xsequence/wallet-wdk": "workspace:*", - "@0xsequence/wagmi-connector": "^4.0.1", "@radix-ui/react-popover": "^1.1.6", "@repo/eslint-config": "workspace:*", "@repo/typescript-config": "workspace:*", @@ -36,6 +36,7 @@ "clsx": "^2.1.1", "copy-to-clipboard": "^3.3.3", "jotai": "^2.12.2", + "lucide-react": "^0.493.0", "motion": "^12.6.2", "ox": "^0.6.10", "qrcode.react": "^4.2.0", diff --git a/extras/demo-anypay/src/routes/home/home-index-route.tsx b/extras/demo-anypay/src/routes/home/home-index-route.tsx index ddb3d5192..6b12f5d34 100644 --- a/extras/demo-anypay/src/routes/home/home-index-route.tsx +++ b/extras/demo-anypay/src/routes/home/home-index-route.tsx @@ -15,6 +15,20 @@ import { AnyPay } from '@0xsequence/wallet-core' import { Context as ContextLike } from '@0xsequence/wallet-primitives' import { useWaitForTransactionReceipt } from 'wagmi' import { Relayer } from '@0xsequence/wallet-core' +import { + Pencil, + AlertTriangle, + Loader2, + AlertCircle, + Zap, + Lock, + Info, + ShieldCheck, + CheckCircle2, + XCircle, + CheckCircle, + ClipboardList, +} from 'lucide-react' // Add type for calculated origin call parameters type OriginCallParams = { @@ -827,20 +841,7 @@ export const HomeIndexRoute = () => { 'Processing...' ) : (
- - - + Custom Call
)} @@ -939,20 +940,7 @@ export const HomeIndexRoute = () => { color="warning" className="mt-2 bg-yellow-900/20 border border-yellow-700/30 rounded-lg p-2 flex items-center" > - - - + Please select a token first. )} @@ -969,26 +957,7 @@ export const HomeIndexRoute = () => { {createIntentMutation.isPending && (
- - - - + Generating intent quote... @@ -998,20 +967,7 @@ export const HomeIndexRoute = () => { {createIntentMutation.isError && (
- - - + Error: {createIntentMutation.error.message}
@@ -1026,15 +982,7 @@ export const HomeIndexRoute = () => { color="primary" className="mb-2 pb-1 border-b border-gray-700/50 flex items-center" > - - - + Intent Operations (List of operations that are pre-authorized to be executed): @@ -1110,20 +1058,7 @@ export const HomeIndexRoute = () => { color="primary" className="mt-4 mb-2 pb-1 border-b border-gray-700/50 flex items-center" > - - - + Preconditions (Conditions that are to be met for the intent to be executed): @@ -1146,20 +1081,7 @@ export const HomeIndexRoute = () => { {!intentPreconditions?.length && (
- - - + No specific preconditions returned for this intent.
@@ -1170,20 +1092,7 @@ export const HomeIndexRoute = () => { {!createIntentMutation.isPending && !createIntentMutation.isError && !intentOperations && (
- - - + Select a token and click an action above to generate the intent quote.
@@ -1207,20 +1116,7 @@ export const HomeIndexRoute = () => { color="primary" className="mb-2 pb-1 border-b border-gray-700/50 flex items-center" > - - - + Commit Intent (Verify and Send Transaction) @@ -1242,26 +1138,7 @@ export const HomeIndexRoute = () => { > {commitIntentConfigMutation.isPending ? (
- - - - + Committing...
) : ( @@ -1295,31 +1172,9 @@ export const HomeIndexRoute = () => { >
{verificationStatus.success ? ( - - - + ) : ( - - - + )}
@@ -1379,15 +1234,7 @@ export const HomeIndexRoute = () => { color="primary" className="mb-2 pb-1 border-b border-gray-700/50 flex items-center" > - - - + Transaction Details (Send this transaction to execute the intent): @@ -1462,26 +1309,7 @@ export const HomeIndexRoute = () => { > {isSendingTransaction ? (
- - - - + Sending...
) : ( @@ -1509,20 +1337,7 @@ export const HomeIndexRoute = () => { color="primary" className="mb-2 pb-1 border-b border-gray-700/50 flex items-center" > - - - + Meta Transaction Status (Track the status of your meta transaction) @@ -1571,20 +1386,7 @@ export const HomeIndexRoute = () => { color="primary" className="mt-4 mb-2 pb-1 border-b border-gray-700/50 flex items-center" > - - - + Preconditions Status (Check if all preconditions are met) @@ -1614,20 +1416,7 @@ export const HomeIndexRoute = () => { color="primary" className="mt-4 mb-2 pb-1 border-b border-gray-700/50 flex items-center" > - - - + Final Intent Status (Overall status of the intent execution) diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 48c48cb8f..db43f26e5 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -86,6 +86,9 @@ importers: jotai: specifier: ^2.12.2 version: 2.12.3(@types/react@19.1.2)(react@19.0.0) + lucide-react: + specifier: ^0.493.0 + version: 0.493.0(react@19.0.0) motion: specifier: ^12.6.2 version: 12.7.2(react-dom@19.0.0(react@19.0.0))(react@19.0.0) @@ -4500,6 +4503,11 @@ packages: resolution: {integrity: sha512-jumlc0BIUrS3qJGgIkWZsyfAM7NCWiBcCDhnd+3NNM5KbBmLTgHVfWBcg6W+rLUsIpzpERPsvwUP7CckAQSOoA==} engines: {node: '>=12'} + lucide-react@0.493.0: + resolution: {integrity: sha512-seXg+XrQKArnZO3KvNsS6GcolPNekYHvf10e+Gn5vPsle+C+Jqq7dHJh2t4kwvofyAaKe8zTdVgKrGL0H3ecVg==} + peerDependencies: + react: ^16.5.1 || ^17.0.0 || ^18.0.0 || ^19.0.0 + make-dir@4.0.0: resolution: {integrity: sha512-hXdUTZYIVOt1Ex//jAQi+wTZZpUpwBj/0QsOzqegb3rGMMeJiSEu5xLHnYfBrRV4RH2+OCSOO95Is/7x1WJ4bw==} engines: {node: '>=10'} @@ -11369,6 +11377,10 @@ snapshots: lru-cache@7.18.3: {} + lucide-react@0.493.0(react@19.0.0): + dependencies: + react: 19.0.0 + make-dir@4.0.0: dependencies: semver: 7.7.1 From e0ff90642bf711c32d502f813a3b46c59b44324d Mon Sep 17 00:00:00 2001 From: Shun Kakinoki Date: Fri, 18 Apr 2025 23:04:06 +0900 Subject: [PATCH 360/439] Refactor HomeIndexRoute to replace lucide-react icon components with inline SVGs for improved performance and maintainability. Update UI elements to ensure consistent styling and enhance user feedback with additional information on intent address and precondition status. --- .../src/routes/home/home-index-route.tsx | 296 ++++++++++++++++-- 1 file changed, 265 insertions(+), 31 deletions(-) diff --git a/extras/demo-anypay/src/routes/home/home-index-route.tsx b/extras/demo-anypay/src/routes/home/home-index-route.tsx index 6b12f5d34..98e2ccf2b 100644 --- a/extras/demo-anypay/src/routes/home/home-index-route.tsx +++ b/extras/demo-anypay/src/routes/home/home-index-route.tsx @@ -15,20 +15,6 @@ import { AnyPay } from '@0xsequence/wallet-core' import { Context as ContextLike } from '@0xsequence/wallet-primitives' import { useWaitForTransactionReceipt } from 'wagmi' import { Relayer } from '@0xsequence/wallet-core' -import { - Pencil, - AlertTriangle, - Loader2, - AlertCircle, - Zap, - Lock, - Info, - ShieldCheck, - CheckCircle2, - XCircle, - CheckCircle, - ClipboardList, -} from 'lucide-react' // Add type for calculated origin call parameters type OriginCallParams = { @@ -841,7 +827,20 @@ export const HomeIndexRoute = () => { 'Processing...' ) : (
- + + + Custom Call
)} @@ -940,7 +939,20 @@ export const HomeIndexRoute = () => { color="warning" className="mt-2 bg-yellow-900/20 border border-yellow-700/30 rounded-lg p-2 flex items-center" > - + + + Please select a token first.
)} @@ -957,7 +969,26 @@ export const HomeIndexRoute = () => { {createIntentMutation.isPending && (
- + + + + Generating intent quote... @@ -967,7 +998,20 @@ export const HomeIndexRoute = () => { {createIntentMutation.isError && (
- + + + Error: {createIntentMutation.error.message}
@@ -982,7 +1026,15 @@ export const HomeIndexRoute = () => { color="primary" className="mb-2 pb-1 border-b border-gray-700/50 flex items-center" > - + + + Intent Operations (List of operations that are pre-authorized to be executed): @@ -1058,7 +1110,20 @@ export const HomeIndexRoute = () => { color="primary" className="mt-4 mb-2 pb-1 border-b border-gray-700/50 flex items-center" > - + + + Preconditions (Conditions that are to be met for the intent to be executed): @@ -1081,7 +1146,20 @@ export const HomeIndexRoute = () => { {!intentPreconditions?.length && (
- + + + No specific preconditions returned for this intent.
@@ -1092,7 +1170,20 @@ export const HomeIndexRoute = () => { {!createIntentMutation.isPending && !createIntentMutation.isError && !intentOperations && (
- + + + Select a token and click an action above to generate the intent quote.
@@ -1116,7 +1207,20 @@ export const HomeIndexRoute = () => { color="primary" className="mb-2 pb-1 border-b border-gray-700/50 flex items-center" > - + + + Commit Intent (Verify and Send Transaction) @@ -1138,7 +1242,26 @@ export const HomeIndexRoute = () => { > {commitIntentConfigMutation.isPending ? (
- + + + + Committing...
) : ( @@ -1172,9 +1295,31 @@ export const HomeIndexRoute = () => { >
{verificationStatus.success ? ( - + + + ) : ( - + + + )}
@@ -1214,6 +1359,29 @@ export const HomeIndexRoute = () => {
)} + + {/* Returned Intent Address */} +
+ + + Returned Intent Address (from first ERC20 precondition): + + + {(() => { + if (!intentPreconditions || intentPreconditions.length === 0) { + return 'N/A (No preconditions)' + } + const erc20Precondition = intentPreconditions.find( + (p: any) => p.type === 'erc20-balance' && p.data?.address, + ) + if (erc20Precondition) { + return erc20Precondition.data.address + } + return 'N/A (No ERC20 balance precondition with address found)' + })()} + + +
@@ -1234,7 +1402,15 @@ export const HomeIndexRoute = () => { color="primary" className="mb-2 pb-1 border-b border-gray-700/50 flex items-center" > - + + + Transaction Details (Send this transaction to execute the intent): @@ -1309,7 +1485,26 @@ export const HomeIndexRoute = () => { > {isSendingTransaction ? (
- + + + + Sending...
) : ( @@ -1337,7 +1532,20 @@ export const HomeIndexRoute = () => { color="primary" className="mb-2 pb-1 border-b border-gray-700/50 flex items-center" > - + + + Meta Transaction Status (Track the status of your meta transaction) @@ -1386,7 +1594,20 @@ export const HomeIndexRoute = () => { color="primary" className="mt-4 mb-2 pb-1 border-b border-gray-700/50 flex items-center" > - + + + Preconditions Status (Check if all preconditions are met) @@ -1416,7 +1637,20 @@ export const HomeIndexRoute = () => { color="primary" className="mt-4 mb-2 pb-1 border-b border-gray-700/50 flex items-center" > - + + + Final Intent Status (Overall status of the intent execution) From 77e5ae43798a1fae90026295deb192b438c2f705 Mon Sep 17 00:00:00 2001 From: Shun Kakinoki Date: Fri, 18 Apr 2025 23:06:22 +0900 Subject: [PATCH 361/439] Enhance HomeIndexRoute UI by adding scrollable containers for data display, improving readability for long data entries. Update intent address retrieval logic to check for both ERC20 and native balance preconditions, providing clearer feedback on address availability. --- .../src/routes/home/home-index-route.tsx | 37 ++++++++++++++----- 1 file changed, 27 insertions(+), 10 deletions(-) diff --git a/extras/demo-anypay/src/routes/home/home-index-route.tsx b/extras/demo-anypay/src/routes/home/home-index-route.tsx index 98e2ccf2b..50fa1c40c 100644 --- a/extras/demo-anypay/src/routes/home/home-index-route.tsx +++ b/extras/demo-anypay/src/routes/home/home-index-route.tsx @@ -1069,9 +1069,13 @@ export const HomeIndexRoute = () => {
- - Data: - {call.data || '0x'} + +
+ Data: +
+ {call.data || '0x'} +
+
@@ -1364,20 +1368,29 @@ export const HomeIndexRoute = () => {
- Returned Intent Address (from first ERC20 precondition): + Returned Intent Address (from first `erc20-balance` or `native-balance` precondition): {(() => { if (!intentPreconditions || intentPreconditions.length === 0) { return 'N/A (No preconditions)' } + // Find the first erc20-balance precondition with an address const erc20Precondition = intentPreconditions.find( (p: any) => p.type === 'erc20-balance' && p.data?.address, ) if (erc20Precondition) { return erc20Precondition.data.address } - return 'N/A (No ERC20 balance precondition with address found)' + // If no ERC20 found, find the first native-balance precondition with an address + const nativePrecondition = intentPreconditions.find( + (p: any) => p.type === 'native-balance' && p.data?.address, + ) + if (nativePrecondition) { + return nativePrecondition.data.address + } + // If neither found, return N/A + return 'N/A (No ERC20 or Native balance precondition with address found)' })()} @@ -1440,11 +1453,15 @@ export const HomeIndexRoute = () => {
- - Data: - - {originCallParams?.data ?? (originCallParams?.error ? 'Error' : 'Calculating...')} - + +
+ Data: +
+ + {originCallParams?.data ?? (originCallParams?.error ? 'Error' : 'Calculating...')} + +
+
From 0cbc16beacea98fa2335079363c63612b815837a Mon Sep 17 00:00:00 2001 From: Shun Kakinoki Date: Fri, 18 Apr 2025 23:07:51 +0900 Subject: [PATCH 362/439] Refactor HomeIndexRoute to update the display of the returned intent address, enhancing clarity by checking both ERC20 and native balance preconditions. Adjust verification banner to correctly label calculated and received addresses, improving user feedback on verification results. --- .../src/routes/home/home-index-route.tsx | 99 +++++++------------ 1 file changed, 36 insertions(+), 63 deletions(-) diff --git a/extras/demo-anypay/src/routes/home/home-index-route.tsx b/extras/demo-anypay/src/routes/home/home-index-route.tsx index 50fa1c40c..37dd9d68b 100644 --- a/extras/demo-anypay/src/routes/home/home-index-route.tsx +++ b/extras/demo-anypay/src/routes/home/home-index-route.tsx @@ -1292,54 +1292,59 @@ export const HomeIndexRoute = () => {
)} + {/* Returned Intent Address */} +
+ + + Returned Intent Address (from first `erc20-balance` or `native-balance` precondition): + + + {(() => { + if (!intentPreconditions || intentPreconditions.length === 0) { + return 'N/A (No preconditions)' + } + // Find the first erc20-balance precondition with an address + const erc20Precondition = intentPreconditions.find( + (p: any) => p.type === 'erc20-balance' && p.data?.address, + ) + if (erc20Precondition) { + return erc20Precondition.data.address + } + // If no ERC20 found, find the first native-balance precondition with an address + const nativePrecondition = intentPreconditions.find( + (p: any) => p.type === 'native-balance' && p.data?.address, + ) + if (nativePrecondition) { + return nativePrecondition.data.address + } + // If neither found, return N/A + return 'N/A (No ERC20 or Native balance precondition with address found)' + })()} + + +
+ {/* Verification Banner */} {verificationStatus && (
- {verificationStatus.success ? ( - - - - ) : ( - - - - )}
{verificationStatus.success ? 'Verification Successful' : 'Verification Failed'}
- Received:{' '} + Calculated:{' '} - {verificationStatus.receivedAddress} + {verificationStatus.calculatedAddress}
- Calculated:{' '} + Received:{' '} - {verificationStatus.calculatedAddress} + {verificationStatus.receivedAddress}
@@ -1363,38 +1368,6 @@ export const HomeIndexRoute = () => {
)} - - {/* Returned Intent Address */} -
- - - Returned Intent Address (from first `erc20-balance` or `native-balance` precondition): - - - {(() => { - if (!intentPreconditions || intentPreconditions.length === 0) { - return 'N/A (No preconditions)' - } - // Find the first erc20-balance precondition with an address - const erc20Precondition = intentPreconditions.find( - (p: any) => p.type === 'erc20-balance' && p.data?.address, - ) - if (erc20Precondition) { - return erc20Precondition.data.address - } - // If no ERC20 found, find the first native-balance precondition with an address - const nativePrecondition = intentPreconditions.find( - (p: any) => p.type === 'native-balance' && p.data?.address, - ) - if (nativePrecondition) { - return nativePrecondition.data.address - } - // If neither found, return N/A - return 'N/A (No ERC20 or Native balance precondition with address found)' - })()} - - -
From c1b2c69cdce8dd8a15d5546fbe9c2e44223afdf2 Mon Sep 17 00:00:00 2001 From: Shun Kakinoki Date: Fri, 18 Apr 2025 23:53:35 +0900 Subject: [PATCH 363/439] Refactor HomeIndexRoute to replace inline SVGs with lucide-react icon components, enhancing UI consistency and maintainability. Update various UI elements to improve user feedback during transaction processing and intent operations. --- .../src/routes/home/home-index-route.tsx | 245 ++---------------- 1 file changed, 27 insertions(+), 218 deletions(-) diff --git a/extras/demo-anypay/src/routes/home/home-index-route.tsx b/extras/demo-anypay/src/routes/home/home-index-route.tsx index 37dd9d68b..1d45efe0c 100644 --- a/extras/demo-anypay/src/routes/home/home-index-route.tsx +++ b/extras/demo-anypay/src/routes/home/home-index-route.tsx @@ -15,6 +15,18 @@ import { AnyPay } from '@0xsequence/wallet-core' import { Context as ContextLike } from '@0xsequence/wallet-primitives' import { useWaitForTransactionReceipt } from 'wagmi' import { Relayer } from '@0xsequence/wallet-core' +import { + AlertTriangle, + Loader2, + Zap, + Info, + Clipboard, + Box, + AlertCircle, + Layers, + PenSquare, + ShieldCheck, +} from 'lucide-react' // Add type for calculated origin call parameters type OriginCallParams = { @@ -827,20 +839,7 @@ export const HomeIndexRoute = () => { 'Processing...' ) : (
- - - + Custom Call
)} @@ -939,20 +938,7 @@ export const HomeIndexRoute = () => { color="warning" className="mt-2 bg-yellow-900/20 border border-yellow-700/30 rounded-lg p-2 flex items-center" > - - - + Please select a token first. )} @@ -969,26 +955,7 @@ export const HomeIndexRoute = () => { {createIntentMutation.isPending && (
- - - - + Generating intent quote... @@ -998,20 +965,7 @@ export const HomeIndexRoute = () => { {createIntentMutation.isError && (
- - - + Error: {createIntentMutation.error.message}
@@ -1026,15 +980,7 @@ export const HomeIndexRoute = () => { color="primary" className="mb-2 pb-1 border-b border-gray-700/50 flex items-center" > - - - + Intent Operations (List of operations that are pre-authorized to be executed): @@ -1114,20 +1060,7 @@ export const HomeIndexRoute = () => { color="primary" className="mt-4 mb-2 pb-1 border-b border-gray-700/50 flex items-center" > - - - + Preconditions (Conditions that are to be met for the intent to be executed): @@ -1150,20 +1083,7 @@ export const HomeIndexRoute = () => { {!intentPreconditions?.length && (
- - - + No specific preconditions returned for this intent.
@@ -1174,20 +1094,7 @@ export const HomeIndexRoute = () => { {!createIntentMutation.isPending && !createIntentMutation.isError && !intentOperations && (
- - - + Select a token and click an action above to generate the intent quote.
@@ -1211,20 +1118,7 @@ export const HomeIndexRoute = () => { color="primary" className="mb-2 pb-1 border-b border-gray-700/50 flex items-center" > - - - + Commit Intent (Verify and Send Transaction) @@ -1246,26 +1140,7 @@ export const HomeIndexRoute = () => { > {commitIntentConfigMutation.isPending ? (
- - - - + Committing...
) : ( @@ -1388,15 +1263,7 @@ export const HomeIndexRoute = () => { color="primary" className="mb-2 pb-1 border-b border-gray-700/50 flex items-center" > - - - + Transaction Details (Send this transaction to execute the intent): @@ -1475,26 +1342,7 @@ export const HomeIndexRoute = () => { > {isSendingTransaction ? (
- - - - + Sending...
) : ( @@ -1522,20 +1370,7 @@ export const HomeIndexRoute = () => { color="primary" className="mb-2 pb-1 border-b border-gray-700/50 flex items-center" > - - - + Meta Transaction Status (Track the status of your meta transaction) @@ -1584,20 +1419,7 @@ export const HomeIndexRoute = () => { color="primary" className="mt-4 mb-2 pb-1 border-b border-gray-700/50 flex items-center" > - - - + Preconditions Status (Check if all preconditions are met) @@ -1627,20 +1449,7 @@ export const HomeIndexRoute = () => { color="primary" className="mt-4 mb-2 pb-1 border-b border-gray-700/50 flex items-center" > - - - + Final Intent Status (Overall status of the intent execution) From bc3b7799ff7deb5aa382f64657df51a62cdcf8dd Mon Sep 17 00:00:00 2001 From: Shun Kakinoki Date: Fri, 18 Apr 2025 23:57:57 +0900 Subject: [PATCH 364/439] Enhance HomeIndexRoute UI by restructuring account information display for improved clarity and user experience. Update status indicators and connection prompts with better styling and organization, ensuring consistent feedback during wallet connection processes. --- .../src/routes/home/home-index-route.tsx | 88 ++++++++++++------- 1 file changed, 54 insertions(+), 34 deletions(-) diff --git a/extras/demo-anypay/src/routes/home/home-index-route.tsx b/extras/demo-anypay/src/routes/home/home-index-route.tsx index 1d45efe0c..6ff9f04ad 100644 --- a/extras/demo-anypay/src/routes/home/home-index-route.tsx +++ b/extras/demo-anypay/src/routes/home/home-index-route.tsx @@ -618,28 +618,44 @@ export const HomeIndexRoute = () => { {/* Account Info & Connect/Disconnect */}
-

Account

+
+
+ 1 +
+

Account

+
{account.status === 'connected' ? ( -
- - Address: {account.address} - -
- - Chain ID: {account.chainId} - -
- - Status: {account.status} - -
- +
+
+ + Address: + {account.address} + + +
+
+ + Chain: +
+ + {account.chainId} +
+
+ + Status: + + {account.status} + + +
) : ( -
-

Select a wallet to connect:

+
+ + Select a wallet to connect: +
{connectors.map((connector: Connector) => ( ))}
-
- - Status: {account.status} - {connectStatus === 'pending' && (Connecting...)} +
+ + Status: + + {account.status} + {connectStatus === 'pending' && (Connecting...)} + + {connectError && ( + + + {connectError.message} + + )}
- {connectError && ( - - Error: {connectError.message} - - )}
)}
@@ -675,7 +695,7 @@ export const HomeIndexRoute = () => {
- 1 + 2

Select Origin Token

@@ -789,7 +809,7 @@ export const HomeIndexRoute = () => {
- 2 + 3

Choose Action

@@ -948,7 +968,7 @@ export const HomeIndexRoute = () => {
- 3 + 4

Intent Quote

@@ -1106,7 +1126,7 @@ export const HomeIndexRoute = () => {
- 4 + 5

Commit Intent

@@ -1253,7 +1273,7 @@ export const HomeIndexRoute = () => {
- 5 + 6

Origin Call

@@ -1360,7 +1380,7 @@ export const HomeIndexRoute = () => {
- 6 + 7

Relayer Status

From 94de9cc823aa033f692c92d5071972f2783adf54 Mon Sep 17 00:00:00 2001 From: Shun Kakinoki Date: Sat, 19 Apr 2025 00:00:26 +0900 Subject: [PATCH 365/439] Refactor HomeIndexRoute to enhance UI structure by adding separate cards for Relayer Status and Preconditions Status, improving clarity and organization. Update styling for better visual feedback and ensure consistent spacing across components. --- .../src/routes/home/home-index-route.tsx | 231 +++++++++--------- 1 file changed, 118 insertions(+), 113 deletions(-) diff --git a/extras/demo-anypay/src/routes/home/home-index-route.tsx b/extras/demo-anypay/src/routes/home/home-index-route.tsx index 6ff9f04ad..5a4258a40 100644 --- a/extras/demo-anypay/src/routes/home/home-index-route.tsx +++ b/extras/demo-anypay/src/routes/home/home-index-route.tsx @@ -617,7 +617,7 @@ export const HomeIndexRoute = () => {
{/* Account Info & Connect/Disconnect */} -
+
1 @@ -688,9 +688,9 @@ export const HomeIndexRoute = () => { )}
- {/* Token selection, Actions, and Intent Display */} + {/* Main Workflow Card */} {account.status === 'connected' && ( -
+
{/* 1. Select Token */}
@@ -1374,130 +1374,135 @@ export const HomeIndexRoute = () => {
)} +
+ )} - {/* 6. Relayer Status */} - {intentOperations && intentPreconditions && ( -
-
-
- 7 -
-

Relayer Status

+ {/* Separate Relayer Status Card */} + {account.status === 'connected' && intentOperations && intentPreconditions && ( +
+
+
+
+ 7
-
- - - Meta Transaction Status - - (Track the status of your meta transaction) +

Relayer Status

+
+
+ + Live Status +
+
+ +
+ {/* Meta Transaction Status */} +
+ + + Meta Transaction Status + +
+
+ + Transaction Hash: + + {metaTxnStatus?.txnHash || 'Not sent yet'} + - -
-
- - Transaction Hash: - - {metaTxnStatus?.txnHash || 'Not sent yet'} - - -
-
+
+
+ + Status: + + {metaTxnStatus?.status || 'Idle'} + + {isWaitingForReceipt && (Waiting for confirmation...)} + +
+
+ + Revert Reason: + {metaTxnStatus?.revertReason || 'None'} + +
+
+
+ + {/* Preconditions Status */} +
+ + + Preconditions Status + +
+ {intentPreconditions.map((precondition, index) => ( +
- Status: - - {metaTxnStatus?.status || 'Idle'} + + Precondition {index + 1} ({precondition.type}):{' '} + + + {preconditionStatuses[index] ? ( + Met + ) : ( + Not Met + )} - {isWaitingForReceipt && ( - (Waiting for confirmation...) - )} - -
-
- - Revert Reason: - {metaTxnStatus?.revertReason || 'None'}
-
+ ))} +
+
- - - Preconditions Status - - (Check if all preconditions are met) + {/* Final Intent Status */} +
+ + + Final Intent Status + +
+
+ + Status: + {metaTxnStatus?.status || 'Pending'} - -
- {intentPreconditions.map((precondition, index) => ( -
- - - Precondition {index + 1} ({precondition.type}):{' '} - - - {preconditionStatuses[index] ? ( - Met - ) : ( - Not Met - )} - - -
- ))}
- - - - Final Intent Status - - (Overall status of the intent execution) +
+ + Gas Used: + {metaTxnStatus?.gasUsed || '0'} + +
+
+ + Effective Gas Price: + {metaTxnStatus?.effectiveGasPrice || '0'} - -
-
- - Status: - {metaTxnStatus?.status || 'Pending'} - -
-
- - Gas Used: - {metaTxnStatus?.gasUsed || '0'} - -
-
- - Effective Gas Price: - {metaTxnStatus?.effectiveGasPrice || '0'} - -
- )} +
)}
From 593cca57d7002af0df76d988fcc13ee27a304d52 Mon Sep 17 00:00:00 2001 From: Shun Kakinoki Date: Sat, 19 Apr 2025 00:09:03 +0900 Subject: [PATCH 366/439] Refactor HomeIndexRoute to improve UI layout by enhancing account and token selection sections with better organization and status indicators. Update button sizes for consistency and refine status display for relayer and token loading, ensuring clearer user feedback. --- .../src/routes/home/home-index-route.tsx | 50 +++++++++++++------ 1 file changed, 36 insertions(+), 14 deletions(-) diff --git a/extras/demo-anypay/src/routes/home/home-index-route.tsx b/extras/demo-anypay/src/routes/home/home-index-route.tsx index 5a4258a40..bc43baaa2 100644 --- a/extras/demo-anypay/src/routes/home/home-index-route.tsx +++ b/extras/demo-anypay/src/routes/home/home-index-route.tsx @@ -618,11 +618,19 @@ export const HomeIndexRoute = () => { {/* Account Info & Connect/Disconnect */}
-
-
- 1 +
+
+
+ 1 +
+

Account

+
+
+ + {account.status === 'connected' ? 'Connected' : 'Disconnected'}
-

Account

{account.status === 'connected' ? (
@@ -693,11 +701,23 @@ export const HomeIndexRoute = () => {
{/* 1. Select Token */}
-
-
- 2 +
+
+
+ 2 +
+

Select Origin Token

+
+
+ 0 ? 'bg-green-400' : 'bg-red-400'} mr-2 animate-pulse`} + > + {isLoadingBalances + ? 'Loading...' + : sortedTokens.length > 0 + ? `${sortedTokens.length} Tokens` + : 'No Tokens'}
-

Select Origin Token

{isLoadingBalances && ( @@ -816,6 +836,7 @@ export const HomeIndexRoute = () => {
From 280c73003a0631c27917c924bf5e0a3b30eb9f0e Mon Sep 17 00:00:00 2001 From: Shun Kakinoki Date: Sat, 19 Apr 2025 00:28:32 +0900 Subject: [PATCH 367/439] Refactor HomeIndexRoute to standardize button sizes across the UI, improving consistency in user interactions. Update button styles for better visual feedback during actions and enhance the display of payment amounts for clarity. --- .../src/routes/home/home-index-route.tsx | 20 +-- packages/wallet/core/src/relayer/rpc/index.ts | 143 +++++++++++++++++- 2 files changed, 148 insertions(+), 15 deletions(-) diff --git a/extras/demo-anypay/src/routes/home/home-index-route.tsx b/extras/demo-anypay/src/routes/home/home-index-route.tsx index bc43baaa2..a4ac0a0fd 100644 --- a/extras/demo-anypay/src/routes/home/home-index-route.tsx +++ b/extras/demo-anypay/src/routes/home/home-index-route.tsx @@ -639,7 +639,7 @@ export const HomeIndexRoute = () => { Address: {account.address}
-
@@ -669,7 +669,7 @@ export const HomeIndexRoute = () => { -
@@ -1176,7 +1176,7 @@ export const HomeIndexRoute = () => { }) }} disabled={commitIntentConfigMutation.isPending} - className="px-5 py-2.5 shadow-lg transition-all duration-300 transform hover:scale-105 disabled:opacity-50 disabled:transform-none" + className="px-2.5 py-1 shadow-lg transition-all duration-300 transform hover:scale-105 disabled:opacity-50 disabled:transform-none" > {commitIntentConfigMutation.isPending ? (
@@ -1378,7 +1378,7 @@ export const HomeIndexRoute = () => { !originCallParams || !!originCallParams.error } - className="px-5 py-2.5 shadow-lg transition-all duration-300 transform hover:scale-105 disabled:opacity-50 disabled:transform-none" + className="px-2.5 py-1 shadow-lg transition-all duration-300 transform hover:scale-105 disabled:opacity-50 disabled:transform-none" > {isSendingTransaction ? (
diff --git a/packages/wallet/core/src/relayer/rpc/index.ts b/packages/wallet/core/src/relayer/rpc/index.ts index 76a636564..08672cf8d 100644 --- a/packages/wallet/core/src/relayer/rpc/index.ts +++ b/packages/wallet/core/src/relayer/rpc/index.ts @@ -3,9 +3,10 @@ import { SendMetaTxnReturn as RpcSendMetaTxnReturn, MetaTxn as RpcMetaTxn, FeeTokenType, + IntentPrecondition, } from './relayer.gen' import { FeeOption, FeeQuote, OperationStatus, Relayer } from '../relayer' -import { Address, Hex, Bytes } from 'ox' +import { Address, Hex, Bytes, AbiFunction } from 'ox' import { Payload, Precondition as PrimitivePrecondition } from '@0xsequence/wallet-primitives' import { IntentPrecondition as RpcIntentPrecondition, @@ -13,15 +14,35 @@ import { FeeOption as RpcFeeOption, FeeToken as RpcFeeToken, } from './relayer.gen' +import { decodePrecondition } from '../../preconditions' +import { + erc20BalanceOf, + erc20Allowance, + erc721OwnerOf, + erc721GetApproved, + erc1155BalanceOf, + erc1155IsApprovedForAll, +} from '../abi' +import { PublicClient, createPublicClient, http, Chain } from 'viem' +import * as chains from 'viem/chains' export type Fetch = (input: RequestInfo, init?: RequestInit) => Promise +export const getChain = (chainId: number): Chain => { + const chain = Object.values(chains).find((c) => c.id === chainId) + if (!chain) { + throw new Error(`Chain with id ${chainId} not found`) + } + return chain +} + export class RpcRelayer implements Relayer { public readonly id: string private client: GenRelayer private fetch: Fetch + private provider: PublicClient - constructor(hostname: string, fetchImpl?: Fetch) { + constructor(chainId: number, hostname: string, rpcUrl: string, fetchImpl?: Fetch) { this.id = `rpc:${hostname}` const effectiveFetch = fetchImpl || (typeof window !== 'undefined' ? window.fetch.bind(window) : undefined) if (!effectiveFetch) { @@ -29,6 +50,15 @@ export class RpcRelayer implements Relayer { } this.fetch = effectiveFetch this.client = new GenRelayer(hostname, this.fetch) + + // Get the chain from the chainId + const chain = getChain(chainId) + + // Create viem PublicClient with the provided RPC URL + this.provider = createPublicClient({ + chain, + transport: http(rpcUrl), + }) } async feeOptions( @@ -112,9 +142,112 @@ export class RpcRelayer implements Relayer { } } - async checkPrecondition(precondition: PrimitivePrecondition.Precondition): Promise { - console.warn('RpcRelayer.checkPrecondition is not implemented and returns true by default.') - return true + async checkPrecondition(precondition: IntentPrecondition): Promise { + const decoded = decodePrecondition(precondition) + + if (!decoded) { + return false + } + + switch (decoded.type()) { + case 'native-balance': { + const native = decoded as any + const balance = await this.provider.getBalance({ address: native.address.toString() as `0x${string}` }) + if (native.min !== undefined && balance < native.min) { + return false + } + if (native.max !== undefined && balance > native.max) { + return false + } + return true + } + + case 'erc20-balance': { + const erc20 = decoded as any + const data = AbiFunction.encodeData(erc20BalanceOf, [erc20.address.toString()]) + const result = await this.provider.call({ + to: erc20.token.toString() as `0x${string}`, + data: data as `0x${string}`, + }) + const balance = BigInt(result.toString()) + if (erc20.min !== undefined && balance < erc20.min) { + return false + } + if (erc20.max !== undefined && balance > erc20.max) { + return false + } + return true + } + + case 'erc20-approval': { + const erc20 = decoded as any + const data = AbiFunction.encodeData(erc20Allowance, [erc20.address.toString(), erc20.operator.toString()]) + const result = await this.provider.call({ + to: erc20.token.toString() as `0x${string}`, + data: data as `0x${string}`, + }) + const allowance = BigInt(result.toString()) + return allowance >= erc20.min + } + + case 'erc721-ownership': { + const erc721 = decoded as any + const data = AbiFunction.encodeData(erc721OwnerOf, [erc721.tokenId]) + const result = await this.provider.call({ + to: erc721.token.toString() as `0x${string}`, + data: data as `0x${string}`, + }) + const resultHex = result.toString() as `0x${string}` + const owner = resultHex.slice(-40) + const isOwner = owner.toLowerCase() === erc721.address.toString().slice(2).toLowerCase() + return erc721.owned === undefined ? isOwner : erc721.owned === isOwner + } + + case 'erc721-approval': { + const erc721 = decoded as any + const data = AbiFunction.encodeData(erc721GetApproved, [erc721.tokenId]) + const result = await this.provider.call({ + to: erc721.token.toString() as `0x${string}`, + data: data as `0x${string}`, + }) + const resultHex = result.toString() as `0x${string}` + const approved = resultHex.slice(-40) + return approved.toLowerCase() === erc721.operator.toString().slice(2).toLowerCase() + } + + case 'erc1155-balance': { + const erc1155 = decoded as any + const data = AbiFunction.encodeData(erc1155BalanceOf, [erc1155.address.toString(), erc1155.tokenId]) + const result = await this.provider.call({ + to: erc1155.token.toString() as `0x${string}`, + data: data as `0x${string}`, + }) + const balance = BigInt(result.toString()) + if (erc1155.min !== undefined && balance < erc1155.min) { + return false + } + if (erc1155.max !== undefined && balance > erc1155.max) { + return false + } + return true + } + + case 'erc1155-approval': { + const erc1155 = decoded as any + const data = AbiFunction.encodeData(erc1155IsApprovedForAll, [ + erc1155.address.toString(), + erc1155.operator.toString(), + ]) + const result = await this.provider.call({ + to: erc1155.token.toString() as `0x${string}`, + data: data as `0x${string}`, + }) + return BigInt(result.toString()) === 1n + } + + default: + return false + } } private mapRpcFeeOptionToFeeOption(rpcOption: RpcFeeOption): FeeOption { From 403aa2f2d155d1819c8d960d44e1ce1790cd5e7b Mon Sep 17 00:00:00 2001 From: Shun Kakinoki Date: Sat, 19 Apr 2025 00:55:55 +0900 Subject: [PATCH 368/439] Refactor HomeIndexRoute to import jsx from react/jsx-runtime for improved JSX handling. Update RpcRelayer constructor to remove chainId and rpcUrl parameters, setting them directly within the constructor for better encapsulation and clarity. --- extras/demo-anypay/src/routes/home/home-index-route.tsx | 3 ++- packages/wallet/core/src/relayer/rpc/index.ts | 5 ++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/extras/demo-anypay/src/routes/home/home-index-route.tsx b/extras/demo-anypay/src/routes/home/home-index-route.tsx index a4ac0a0fd..d4d6bfea1 100644 --- a/extras/demo-anypay/src/routes/home/home-index-route.tsx +++ b/extras/demo-anypay/src/routes/home/home-index-route.tsx @@ -27,6 +27,7 @@ import { PenSquare, ShieldCheck, } from 'lucide-react' +import { jsx } from 'react/jsx-runtime' // Add type for calculated origin call parameters type OriginCallParams = { @@ -114,7 +115,7 @@ export const HomeIndexRoute = () => { const relayer = useMemo(() => { return new Relayer.Rpc.RpcRelayer('https://relayer.sequence.app') }, []) - + jsx // State for intent results const [intentOperations, setIntentOperations] = useState(null) const [intentPreconditions, setIntentPreconditions] = useState( diff --git a/packages/wallet/core/src/relayer/rpc/index.ts b/packages/wallet/core/src/relayer/rpc/index.ts index 08672cf8d..d4bf9c70a 100644 --- a/packages/wallet/core/src/relayer/rpc/index.ts +++ b/packages/wallet/core/src/relayer/rpc/index.ts @@ -42,7 +42,7 @@ export class RpcRelayer implements Relayer { private fetch: Fetch private provider: PublicClient - constructor(chainId: number, hostname: string, rpcUrl: string, fetchImpl?: Fetch) { + constructor(hostname: string, fetchImpl?: Fetch) { this.id = `rpc:${hostname}` const effectiveFetch = fetchImpl || (typeof window !== 'undefined' ? window.fetch.bind(window) : undefined) if (!effectiveFetch) { @@ -51,6 +51,9 @@ export class RpcRelayer implements Relayer { this.fetch = effectiveFetch this.client = new GenRelayer(hostname, this.fetch) + const chainId = 8453 + const rpcUrl = 'https://node.sequence.app' + // Get the chain from the chainId const chain = getChain(chainId) From 306d8064b03c15fe767fadc58e3ee292e78f047d Mon Sep 17 00:00:00 2001 From: Shun Kakinoki Date: Sat, 19 Apr 2025 00:57:28 +0900 Subject: [PATCH 369/439] Refactor HomeIndexRoute to enhance the RpcRelayer constructor by adding chainId and rpcUrl parameters for improved flexibility. Update the instantiation of RpcRelayer in HomeIndexRoute to utilize the new parameters, ensuring better configuration options for the relayer. --- extras/demo-anypay/src/routes/home/home-index-route.tsx | 5 ++--- packages/wallet/core/src/relayer/rpc/index.ts | 5 +---- 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/extras/demo-anypay/src/routes/home/home-index-route.tsx b/extras/demo-anypay/src/routes/home/home-index-route.tsx index d4d6bfea1..6bac2bf42 100644 --- a/extras/demo-anypay/src/routes/home/home-index-route.tsx +++ b/extras/demo-anypay/src/routes/home/home-index-route.tsx @@ -27,7 +27,6 @@ import { PenSquare, ShieldCheck, } from 'lucide-react' -import { jsx } from 'react/jsx-runtime' // Add type for calculated origin call parameters type OriginCallParams = { @@ -113,9 +112,9 @@ export const HomeIndexRoute = () => { const indexerClient = useIndexerGatewayClient() const apiClient = useAPIClient() const relayer = useMemo(() => { - return new Relayer.Rpc.RpcRelayer('https://relayer.sequence.app') + return new Relayer.Rpc.RpcRelayer('https://relayer.sequence.app', 8453, 'https://node.sequence.app') }, []) - jsx + // State for intent results const [intentOperations, setIntentOperations] = useState(null) const [intentPreconditions, setIntentPreconditions] = useState( diff --git a/packages/wallet/core/src/relayer/rpc/index.ts b/packages/wallet/core/src/relayer/rpc/index.ts index d4bf9c70a..4bf52b820 100644 --- a/packages/wallet/core/src/relayer/rpc/index.ts +++ b/packages/wallet/core/src/relayer/rpc/index.ts @@ -42,7 +42,7 @@ export class RpcRelayer implements Relayer { private fetch: Fetch private provider: PublicClient - constructor(hostname: string, fetchImpl?: Fetch) { + constructor(hostname: string, chainId: number, rpcUrl: string, fetchImpl?: Fetch) { this.id = `rpc:${hostname}` const effectiveFetch = fetchImpl || (typeof window !== 'undefined' ? window.fetch.bind(window) : undefined) if (!effectiveFetch) { @@ -51,9 +51,6 @@ export class RpcRelayer implements Relayer { this.fetch = effectiveFetch this.client = new GenRelayer(hostname, this.fetch) - const chainId = 8453 - const rpcUrl = 'https://node.sequence.app' - // Get the chain from the chainId const chain = getChain(chainId) From 1b0a047540b8cd5104598e2f4b629f4cb75aadfa Mon Sep 17 00:00:00 2001 From: Shun Kakinoki Date: Sat, 19 Apr 2025 01:04:53 +0900 Subject: [PATCH 370/439] Refactor RpcRelayer to improve balance and approval checks by adding range validation for minimum and maximum values. Update HomeIndexRoute to ensure consistent handling of relayer status and precondition checks, enhancing overall reliability and clarity in transaction processing. --- .../src/routes/home/home-index-route.tsx | 5 +- packages/wallet/core/src/relayer/rpc/index.ts | 59 +++++++++++++------ 2 files changed, 42 insertions(+), 22 deletions(-) diff --git a/extras/demo-anypay/src/routes/home/home-index-route.tsx b/extras/demo-anypay/src/routes/home/home-index-route.tsx index 6bac2bf42..50b9cd6a9 100644 --- a/extras/demo-anypay/src/routes/home/home-index-route.tsx +++ b/extras/demo-anypay/src/routes/home/home-index-route.tsx @@ -164,7 +164,6 @@ export const HomeIndexRoute = () => { calculatedAddress?: string } | null>(null) - // Add new state for relayer status const [metaTxnStatus, setMetaTxnStatus] = useState<{ txnHash?: string status?: string @@ -232,7 +231,7 @@ export const HomeIndexRoute = () => { } const checkPreconditionStatuses = useCallback(async () => { - if (!intentPreconditions || !relayer) return // Use instantiated relayer + if (!intentPreconditions || !relayer) return const statuses = await Promise.all( intentPreconditions.map(async (precondition) => { @@ -246,7 +245,7 @@ export const HomeIndexRoute = () => { ) setPreconditionStatuses(statuses) - }, [intentPreconditions, relayer]) // Add dependencies + }, [intentPreconditions, relayer]) const commitIntentConfigMutation = useMutation({ mutationFn: async (args: { diff --git a/packages/wallet/core/src/relayer/rpc/index.ts b/packages/wallet/core/src/relayer/rpc/index.ts index 4bf52b820..d5f92a554 100644 --- a/packages/wallet/core/src/relayer/rpc/index.ts +++ b/packages/wallet/core/src/relayer/rpc/index.ts @@ -153,13 +153,16 @@ export class RpcRelayer implements Relayer { case 'native-balance': { const native = decoded as any const balance = await this.provider.getBalance({ address: native.address.toString() as `0x${string}` }) - if (native.min !== undefined && balance < native.min) { - return false + if (native.min !== undefined && native.max !== undefined) { + return balance >= native.min && balance <= native.max } - if (native.max !== undefined && balance > native.max) { - return false + if (native.min !== undefined) { + return balance >= native.min } - return true + if (native.max !== undefined) { + return balance <= native.max + } + return false } case 'erc20-balance': { @@ -170,13 +173,16 @@ export class RpcRelayer implements Relayer { data: data as `0x${string}`, }) const balance = BigInt(result.toString()) - if (erc20.min !== undefined && balance < erc20.min) { - return false + if (erc20.min !== undefined && erc20.max !== undefined) { + return balance >= erc20.min && balance <= erc20.max } - if (erc20.max !== undefined && balance > erc20.max) { - return false + if (erc20.min !== undefined) { + return balance >= erc20.min } - return true + if (erc20.max !== undefined) { + return balance <= erc20.max + } + return false } case 'erc20-approval': { @@ -187,7 +193,10 @@ export class RpcRelayer implements Relayer { data: data as `0x${string}`, }) const allowance = BigInt(result.toString()) - return allowance >= erc20.min + if (allowance >= erc20.min) { + return true + } + return false } case 'erc721-ownership': { @@ -200,7 +209,10 @@ export class RpcRelayer implements Relayer { const resultHex = result.toString() as `0x${string}` const owner = resultHex.slice(-40) const isOwner = owner.toLowerCase() === erc721.address.toString().slice(2).toLowerCase() - return erc721.owned === undefined ? isOwner : erc721.owned === isOwner + if (erc721.owned !== undefined && isOwner) { + return true + } + return false } case 'erc721-approval': { @@ -212,7 +224,10 @@ export class RpcRelayer implements Relayer { }) const resultHex = result.toString() as `0x${string}` const approved = resultHex.slice(-40) - return approved.toLowerCase() === erc721.operator.toString().slice(2).toLowerCase() + if (approved.toLowerCase() !== erc721.operator.toString().slice(2).toLowerCase()) { + return true + } + return false } case 'erc1155-balance': { @@ -223,13 +238,16 @@ export class RpcRelayer implements Relayer { data: data as `0x${string}`, }) const balance = BigInt(result.toString()) - if (erc1155.min !== undefined && balance < erc1155.min) { - return false + if (erc1155.min !== undefined && erc1155.max !== undefined) { + return balance >= erc1155.min && balance <= erc1155.max + } + if (erc1155.min !== undefined) { + return balance >= erc1155.min } - if (erc1155.max !== undefined && balance > erc1155.max) { - return false + if (erc1155.max !== undefined) { + return balance <= erc1155.max } - return true + return false } case 'erc1155-approval': { @@ -242,7 +260,10 @@ export class RpcRelayer implements Relayer { to: erc1155.token.toString() as `0x${string}`, data: data as `0x${string}`, }) - return BigInt(result.toString()) === 1n + if (BigInt(result.toString()) !== 1n) { + return true + } + return false } default: From 6d820588617a06a907c59933caf6b3a301120140 Mon Sep 17 00:00:00 2001 From: Shun Kakinoki Date: Sat, 19 Apr 2025 01:19:05 +0900 Subject: [PATCH 371/439] Remove workspace dependency for @0xsequence/relayer in package.json. Update Vite configuration to include necessary dependencies for wallet-related packages. Refactor HomeIndexRoute to format precondition data before checking with the relayer, ensuring consistent data handling. --- extras/demo-anypay/package.json | 1 - .../src/routes/home/home-index-route.tsx | 6 +- extras/demo-anypay/vite.config.ts | 7 +- packages/wallet/core/src/relayer/rpc/index.ts | 200 +++++++++++------- 4 files changed, 125 insertions(+), 89 deletions(-) diff --git a/extras/demo-anypay/package.json b/extras/demo-anypay/package.json index 9f20353fd..eb9352239 100644 --- a/extras/demo-anypay/package.json +++ b/extras/demo-anypay/package.json @@ -23,7 +23,6 @@ "@0xsequence/hooks": "^5.1.0", "@0xsequence/indexer": "^2.3.9", "@0xsequence/network": "^2.3.9", - "@0xsequence/relayer": "workspace:*", "@0xsequence/wagmi-connector": "^4.0.1", "@0xsequence/wallet-core": "workspace:*", "@0xsequence/wallet-primitives": "workspace:*", diff --git a/extras/demo-anypay/src/routes/home/home-index-route.tsx b/extras/demo-anypay/src/routes/home/home-index-route.tsx index 50b9cd6a9..817df3824 100644 --- a/extras/demo-anypay/src/routes/home/home-index-route.tsx +++ b/extras/demo-anypay/src/routes/home/home-index-route.tsx @@ -236,7 +236,11 @@ export const HomeIndexRoute = () => { const statuses = await Promise.all( intentPreconditions.map(async (precondition) => { try { - return await relayer.checkPrecondition(precondition) + const formattedPrecondition = { + ...precondition, + data: typeof precondition.data === 'string' ? precondition.data : JSON.stringify(precondition.data), + } + return await relayer.checkPrecondition(formattedPrecondition) } catch (error) { console.error('Error checking precondition:', error) return false diff --git a/extras/demo-anypay/vite.config.ts b/extras/demo-anypay/vite.config.ts index 124268854..429f48f94 100644 --- a/extras/demo-anypay/vite.config.ts +++ b/extras/demo-anypay/vite.config.ts @@ -7,11 +7,6 @@ export default defineConfig({ plugins: [react(), tailwindcss()], optimizeDeps: { // TODO: This shouldn't be needed, fix sdk build - include: [ - '@0xsequence/wallet-core', - '@0xsequence/sequence-primitives', - '@0xsequence/sequence-wdk', - '@0xsequence/api', - ], + include: ['@0xsequence/api', '@0xsequence/wallet-core', '@0xsequence/wallet-primitives', '@0xsequence/wallet-wdk'], }, }) diff --git a/packages/wallet/core/src/relayer/rpc/index.ts b/packages/wallet/core/src/relayer/rpc/index.ts index d5f92a554..137ca247b 100644 --- a/packages/wallet/core/src/relayer/rpc/index.ts +++ b/packages/wallet/core/src/relayer/rpc/index.ts @@ -152,118 +152,156 @@ export class RpcRelayer implements Relayer { switch (decoded.type()) { case 'native-balance': { const native = decoded as any - const balance = await this.provider.getBalance({ address: native.address.toString() as `0x${string}` }) - if (native.min !== undefined && native.max !== undefined) { - return balance >= native.min && balance <= native.max + try { + const balance = await this.provider.getBalance({ address: native.address.toString() as `0x${string}` }) + const minWei = native.min !== undefined ? BigInt(native.min) : undefined + const maxWei = native.max !== undefined ? BigInt(native.max) : undefined + + if (minWei !== undefined && maxWei !== undefined) { + return balance >= minWei && balance <= maxWei + } + if (minWei !== undefined) { + return balance >= minWei + } + if (maxWei !== undefined) { + return balance <= maxWei + } + // If no min or max specified, this is an invalid precondition + console.warn('Native balance precondition has neither min nor max specified') + return false + } catch (error) { + console.error('Error checking native balance:', error) + return false } - if (native.min !== undefined) { - return balance >= native.min - } - if (native.max !== undefined) { - return balance <= native.max - } - return false } case 'erc20-balance': { const erc20 = decoded as any - const data = AbiFunction.encodeData(erc20BalanceOf, [erc20.address.toString()]) - const result = await this.provider.call({ - to: erc20.token.toString() as `0x${string}`, - data: data as `0x${string}`, - }) - const balance = BigInt(result.toString()) - if (erc20.min !== undefined && erc20.max !== undefined) { - return balance >= erc20.min && balance <= erc20.max - } - if (erc20.min !== undefined) { - return balance >= erc20.min + try { + const data = AbiFunction.encodeData(erc20BalanceOf, [erc20.address.toString()]) + const result = await this.provider.call({ + to: erc20.token.toString() as `0x${string}`, + data: data as `0x${string}`, + }) + const balance = BigInt(result.toString()) + const minWei = erc20.min !== undefined ? BigInt(erc20.min) : undefined + const maxWei = erc20.max !== undefined ? BigInt(erc20.max) : undefined + + if (minWei !== undefined && maxWei !== undefined) { + return balance >= minWei && balance <= maxWei + } + if (minWei !== undefined) { + return balance >= minWei + } + if (maxWei !== undefined) { + return balance <= maxWei + } + console.warn('ERC20 balance precondition has neither min nor max specified') + return false + } catch (error) { + console.error('Error checking ERC20 balance:', error) + return false } - if (erc20.max !== undefined) { - return balance <= erc20.max - } - return false } case 'erc20-approval': { const erc20 = decoded as any - const data = AbiFunction.encodeData(erc20Allowance, [erc20.address.toString(), erc20.operator.toString()]) - const result = await this.provider.call({ - to: erc20.token.toString() as `0x${string}`, - data: data as `0x${string}`, - }) - const allowance = BigInt(result.toString()) - if (allowance >= erc20.min) { - return true + try { + const data = AbiFunction.encodeData(erc20Allowance, [erc20.address.toString(), erc20.operator.toString()]) + const result = await this.provider.call({ + to: erc20.token.toString() as `0x${string}`, + data: data as `0x${string}`, + }) + const allowance = BigInt(result.toString()) + const minAllowance = BigInt(erc20.min) + return allowance >= minAllowance + } catch (error) { + console.error('Error checking ERC20 approval:', error) + return false } - return false } case 'erc721-ownership': { const erc721 = decoded as any - const data = AbiFunction.encodeData(erc721OwnerOf, [erc721.tokenId]) - const result = await this.provider.call({ - to: erc721.token.toString() as `0x${string}`, - data: data as `0x${string}`, - }) - const resultHex = result.toString() as `0x${string}` - const owner = resultHex.slice(-40) - const isOwner = owner.toLowerCase() === erc721.address.toString().slice(2).toLowerCase() - if (erc721.owned !== undefined && isOwner) { - return true + try { + const data = AbiFunction.encodeData(erc721OwnerOf, [erc721.tokenId]) + const result = await this.provider.call({ + to: erc721.token.toString() as `0x${string}`, + data: data as `0x${string}`, + }) + const resultHex = result.toString() as `0x${string}` + const owner = resultHex.slice(-40) + const isOwner = owner.toLowerCase() === erc721.address.toString().slice(2).toLowerCase() + const expectedOwnership = erc721.owned !== undefined ? erc721.owned : true + return isOwner === expectedOwnership + } catch (error) { + console.error('Error checking ERC721 ownership:', error) + return false } - return false } case 'erc721-approval': { const erc721 = decoded as any - const data = AbiFunction.encodeData(erc721GetApproved, [erc721.tokenId]) - const result = await this.provider.call({ - to: erc721.token.toString() as `0x${string}`, - data: data as `0x${string}`, - }) - const resultHex = result.toString() as `0x${string}` - const approved = resultHex.slice(-40) - if (approved.toLowerCase() !== erc721.operator.toString().slice(2).toLowerCase()) { - return true + try { + const data = AbiFunction.encodeData(erc721GetApproved, [erc721.tokenId]) + const result = await this.provider.call({ + to: erc721.token.toString() as `0x${string}`, + data: data as `0x${string}`, + }) + const resultHex = result.toString() as `0x${string}` + const approved = resultHex.slice(-40) + return approved.toLowerCase() === erc721.operator.toString().slice(2).toLowerCase() + } catch (error) { + console.error('Error checking ERC721 approval:', error) + return false } - return false } case 'erc1155-balance': { const erc1155 = decoded as any - const data = AbiFunction.encodeData(erc1155BalanceOf, [erc1155.address.toString(), erc1155.tokenId]) - const result = await this.provider.call({ - to: erc1155.token.toString() as `0x${string}`, - data: data as `0x${string}`, - }) - const balance = BigInt(result.toString()) - if (erc1155.min !== undefined && erc1155.max !== undefined) { - return balance >= erc1155.min && balance <= erc1155.max - } - if (erc1155.min !== undefined) { - return balance >= erc1155.min + try { + const data = AbiFunction.encodeData(erc1155BalanceOf, [erc1155.address.toString(), erc1155.tokenId]) + const result = await this.provider.call({ + to: erc1155.token.toString() as `0x${string}`, + data: data as `0x${string}`, + }) + const balance = BigInt(result.toString()) + const minWei = erc1155.min !== undefined ? BigInt(erc1155.min) : undefined + const maxWei = erc1155.max !== undefined ? BigInt(erc1155.max) : undefined + + if (minWei !== undefined && maxWei !== undefined) { + return balance >= minWei && balance <= maxWei + } + if (minWei !== undefined) { + return balance >= minWei + } + if (maxWei !== undefined) { + return balance <= maxWei + } + console.warn('ERC1155 balance precondition has neither min nor max specified') + return false + } catch (error) { + console.error('Error checking ERC1155 balance:', error) + return false } - if (erc1155.max !== undefined) { - return balance <= erc1155.max - } - return false } case 'erc1155-approval': { const erc1155 = decoded as any - const data = AbiFunction.encodeData(erc1155IsApprovedForAll, [ - erc1155.address.toString(), - erc1155.operator.toString(), - ]) - const result = await this.provider.call({ - to: erc1155.token.toString() as `0x${string}`, - data: data as `0x${string}`, - }) - if (BigInt(result.toString()) !== 1n) { - return true + try { + const data = AbiFunction.encodeData(erc1155IsApprovedForAll, [ + erc1155.address.toString(), + erc1155.operator.toString(), + ]) + const result = await this.provider.call({ + to: erc1155.token.toString() as `0x${string}`, + data: data as `0x${string}`, + }) + return BigInt(result.toString()) === 1n + } catch (error) { + console.error('Error checking ERC1155 approval:', error) + return false } - return false } default: From 99231b662feda42fc15c5b7d9203f494483f6615 Mon Sep 17 00:00:00 2001 From: Shun Kakinoki Date: Sat, 19 Apr 2025 01:59:36 +0900 Subject: [PATCH 372/439] Refactor HomeIndexRoute to introduce a new function for finding precondition addresses, improving clarity and reducing code duplication. Update address verification logic to utilize the new function, ensuring accurate handling of intent operations and preconditions. --- .../src/routes/home/home-index-route.tsx | 52 +++++++------------ 1 file changed, 20 insertions(+), 32 deletions(-) diff --git a/extras/demo-anypay/src/routes/home/home-index-route.tsx b/extras/demo-anypay/src/routes/home/home-index-route.tsx index 817df3824..9aaf40439 100644 --- a/extras/demo-anypay/src/routes/home/home-index-route.tsx +++ b/extras/demo-anypay/src/routes/home/home-index-route.tsx @@ -94,6 +94,19 @@ const getChainInfo = (chainId: number) => { return Object.values(chains).find((chain) => chain.id === chainId) || null } +const findPreconditionAddress = (preconditions: IntentPrecondition[]) => { + const preconditionTypes = ['erc20-balance', 'native-balance'] as const + + for (const type of preconditionTypes) { + const precondition = preconditions.find((p) => p.type === type && p.data?.address) + if (precondition) { + return precondition.data.address + } + } + + return `N/A (No ${preconditionTypes.join(' or ')} precondition with address found)` +} + export const HomeIndexRoute = () => { const account = useAccount() const { connectors, connect, status: connectStatus, error: connectError } = useConnect() @@ -266,16 +279,9 @@ export const HomeIndexRoute = () => { } const calculatedAddress = calculateIntentAddress(args.operations, args.mainSigner) - const receivedAddress = args.operations[0]?.calls[0]?.to - - const verificationResult = { - success: Boolean(receivedAddress && isAddressEqual(Address.from(receivedAddress), calculatedAddress)), - receivedAddress: receivedAddress || '', - calculatedAddress: calculatedAddress.toString(), - } - setVerificationStatus(verificationResult) + const receivedAddress = findPreconditionAddress(args.preconditions) - if (!verificationResult.success) { + if (!isAddressEqual(Address.from(receivedAddress), calculatedAddress)) { throw new Error('Address verification failed') } @@ -1172,7 +1178,7 @@ export const HomeIndexRoute = () => { onClick={() => { if (!account.address || !intentOperations || !intentPreconditions) return commitIntentConfigMutation.mutate({ - walletAddress: account.address, + walletAddress: calculateIntentAddress(intentOperations, account.address).toString(), mainSigner: account.address, operations: intentOperations, preconditions: intentPreconditions, @@ -1214,30 +1220,12 @@ export const HomeIndexRoute = () => {
- Returned Intent Address (from first `erc20-balance` or `native-balance` precondition): + Returned Intent Address (from first operation call): - {(() => { - if (!intentPreconditions || intentPreconditions.length === 0) { - return 'N/A (No preconditions)' - } - // Find the first erc20-balance precondition with an address - const erc20Precondition = intentPreconditions.find( - (p: any) => p.type === 'erc20-balance' && p.data?.address, - ) - if (erc20Precondition) { - return erc20Precondition.data.address - } - // If no ERC20 found, find the first native-balance precondition with an address - const nativePrecondition = intentPreconditions.find( - (p: any) => p.type === 'native-balance' && p.data?.address, - ) - if (nativePrecondition) { - return nativePrecondition.data.address - } - // If neither found, return N/A - return 'N/A (No ERC20 or Native balance precondition with address found)' - })()} + {!intentOperations || intentOperations.length === 0 + ? 'N/A (No operations)' + : findPreconditionAddress(intentPreconditions)}
From 9085407aaa42b9cb96e3380ce333b462e60713b2 Mon Sep 17 00:00:00 2001 From: Shun Kakinoki Date: Sat, 19 Apr 2025 02:23:53 +0900 Subject: [PATCH 373/439] Update HomeIndexRoute to change success message text color from green to white for improved visibility against the background. This enhances user feedback during intent configuration confirmation. --- extras/demo-anypay/src/routes/home/home-index-route.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extras/demo-anypay/src/routes/home/home-index-route.tsx b/extras/demo-anypay/src/routes/home/home-index-route.tsx index 9aaf40439..b86dc67b5 100644 --- a/extras/demo-anypay/src/routes/home/home-index-route.tsx +++ b/extras/demo-anypay/src/routes/home/home-index-route.tsx @@ -1269,7 +1269,7 @@ export const HomeIndexRoute = () => { )} {commitIntentConfigMutation.isSuccess && (
- + Intent configuration committed successfully!
From a7afd855a1524e095cb423df7ca08ce332938247 Mon Sep 17 00:00:00 2001 From: Shun Kakinoki Date: Mon, 21 Apr 2025 04:07:40 +0900 Subject: [PATCH 374/439] Enhance HomeIndexRoute by adding committed intent address state management and a new query to fetch committed intent configuration details. Update address verification logic to improve error handling and user feedback during intent configuration. Refactor UI components to display verification status and committed configuration results, ensuring clearer communication of transaction outcomes. --- .../src/routes/home/home-index-route.tsx | 207 ++++++++++++------ 1 file changed, 144 insertions(+), 63 deletions(-) diff --git a/extras/demo-anypay/src/routes/home/home-index-route.tsx b/extras/demo-anypay/src/routes/home/home-index-route.tsx index b86dc67b5..748ba92f3 100644 --- a/extras/demo-anypay/src/routes/home/home-index-route.tsx +++ b/extras/demo-anypay/src/routes/home/home-index-route.tsx @@ -4,7 +4,7 @@ import { Connector } from 'wagmi' import { useIndexerGatewayClient } from '@0xsequence/hooks' import { NativeTokenBalance, TokenBalance, ContractVerificationStatus } from '@0xsequence/indexer' import { GetTokenBalancesSummaryReturn } from '@0xsequence/indexer/dist/declarations/src/indexergw.gen' -import { GetIntentOperationsReturn, IntentOperation, IntentPrecondition } from '@0xsequence/api' +import { GetIntentOperationsReturn, IntentOperation, IntentPrecondition, GetIntentConfigReturn } from '@0xsequence/api' import { formatUnits, Hex, isAddressEqual, zeroAddress } from 'viem' import { useQuery, useMutation } from '@tanstack/react-query' import { useAPIClient } from '../../hooks/useAPIClient' @@ -134,6 +134,7 @@ export const HomeIndexRoute = () => { null, ) const [txnHash, setTxnHash] = useState() + const [committedIntentAddress, setCommittedIntentAddress] = useState(null) // Default empty page info for query fallback const defaultPage = { page: 1, pageSize: 10, totalRecords: 0, more: false } @@ -272,31 +273,78 @@ export const HomeIndexRoute = () => { preconditions: IntentPrecondition[] }) => { if (!apiClient) throw new Error('API client not available') + if (!account.address) throw new Error('Account address not available') try { - if (!account.address) { - throw new Error('Account address not available') - } - const calculatedAddress = calculateIntentAddress(args.operations, args.mainSigner) const receivedAddress = findPreconditionAddress(args.preconditions) - if (!isAddressEqual(Address.from(receivedAddress), calculatedAddress)) { - throw new Error('Address verification failed') + const isVerified = isAddressEqual(Address.from(receivedAddress), calculatedAddress) + setVerificationStatus({ + success: isVerified, + receivedAddress: receivedAddress, + calculatedAddress: calculatedAddress.toString(), + }) + + if (!isVerified) { + throw new Error('Address verification failed: Calculated address does not match received address.') } - return await apiClient.commitIntentConfig(args) + // Commit the intent config + const response = await apiClient.commitIntentConfig({ + walletAddress: calculatedAddress.toString(), + mainSigner: args.mainSigner, + operations: args.operations, + preconditions: args.preconditions, + }) + console.log('API Commit Response:', response) + return { calculatedAddress: calculatedAddress.toString(), response } } catch (error) { - console.error('Error during verification:', error) + console.error('Error during commit intent mutation:', error) + if (!verificationStatus?.success && !verificationStatus?.receivedAddress) { + try { + const calculatedAddress = calculateIntentAddress(args.operations, args.mainSigner) + const receivedAddress = findPreconditionAddress(args.preconditions) + setVerificationStatus({ + success: false, + receivedAddress: receivedAddress, + calculatedAddress: calculatedAddress.toString(), + }) + } catch (calcError) { + console.error('Error calculating addresses for verification status on failure:', calcError) + setVerificationStatus({ success: false }) + } + } throw error } }, onSuccess: (data) => { - console.log('Intent config committed successfully:', data) + console.log('Intent config committed successfully, Wallet Address:', data.calculatedAddress) + setCommittedIntentAddress(data.calculatedAddress) }, onError: (error) => { console.error('Failed to commit intent config:', error) + setCommittedIntentAddress(null) + }, + }) + + // New Query to fetch committed intent config + const { + data: committedIntentConfig, + isLoading: isLoadingCommittedConfig, + error: committedConfigError, + } = useQuery({ + queryKey: ['getIntentConfig', committedIntentAddress], + queryFn: async () => { + if (!apiClient || !committedIntentAddress) { + throw new Error('API client or committed intent address not available') + } + console.log('Fetching intent config for address:', committedIntentAddress) + return await apiClient.getIntentConfig({ walletAddress: committedIntentAddress }) }, + enabled: !!committedIntentAddress && !!apiClient && commitIntentConfigMutation.isSuccess, + staleTime: 1000 * 60 * 5, + retry: 1, }) const createIntentMutation = useMutation({ @@ -304,6 +352,9 @@ export const HomeIndexRoute = () => { if (!apiClient || !selectedToken || !account.address) { throw new Error('Missing API client, selected token, or account address') } + // Reset commit state when generating a new intent + setCommittedIntentAddress(null) + setVerificationStatus(null) const USDC_ADDRESS = '0x833589fcd6edb6e08f4c7c32d4f71b54bda02913' const RECIPIENT_ADDRESS = '0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045' @@ -392,7 +443,12 @@ export const HomeIndexRoute = () => { } console.log('Calling createIntentConfig with args:', args) - return await apiClient.getIntentOperations(args) + const data = await apiClient.getIntentOperations(args) + setIntentOperations(data.operations) + setIntentPreconditions(data.preconditions) + setCommittedIntentAddress(null) + setVerificationStatus(null) + return data }, onSuccess: (data) => { console.log('Intent Config Success:', data) @@ -449,12 +505,16 @@ export const HomeIndexRoute = () => { setSelectedToken(null) setIntentOperations(null) setIntentPreconditions(null) + setCommittedIntentAddress(null) + setVerificationStatus(null) }, [account.address, account.chainId]) const handleActionClick = (action: IntentAction) => { setIntentOperations(null) setIntentPreconditions(null) setShowCustomCallForm(false) + setCommittedIntentAddress(null) + setVerificationStatus(null) if (action === 'custom_call') { setShowCustomCallForm(true) } else { @@ -778,6 +838,8 @@ export const HomeIndexRoute = () => { } setIntentOperations(null) setIntentPreconditions(null) + setCommittedIntentAddress(null) + setVerificationStatus(null) }} className={`p-3 rounded-lg cursor-pointer transition-all duration-200 flex justify-between items-center ${selectedToken?.chainId === token.chainId && (isNative ? selectedToken?.contractAddress === zeroAddress : selectedToken?.contractAddress === token.contractAddress) ? 'bg-gradient-to-r from-blue-700 to-blue-900 hover:from-blue-600 hover:to-blue-800 shadow-lg' : 'bg-gray-700/80 hover:bg-gray-600/90 hover:shadow-md'}`} > @@ -1198,59 +1260,33 @@ export const HomeIndexRoute = () => {
- {/* Preview calculated address */} - {account.address && intentOperations && ( -
- - Calculated Address: - - {(() => { - try { - return calculateIntentAddress(intentOperations, account.address).toString() - } catch (error) { - return 'Error calculating address: ' + (error as Error).message - } - })()} - - -
- )} - - {/* Returned Intent Address */} -
- - - Returned Intent Address (from first operation call): - - - {!intentOperations || intentOperations.length === 0 - ? 'N/A (No operations)' - : findPreconditionAddress(intentPreconditions)} - - -
- {/* Verification Banner */} {verificationStatus && (
- - {verificationStatus.success ? 'Verification Successful' : 'Verification Failed'} + + {verificationStatus.success + ? 'Address Verification Successful' + : 'Address Verification Failed'} -
+
Calculated:{' '} - - {verificationStatus.calculatedAddress} + + {verificationStatus.calculatedAddress || 'N/A'}
- Received:{' '} - - {verificationStatus.receivedAddress} + Expected (from precondition):{' '} + + {verificationStatus.receivedAddress || 'N/A'}
@@ -1259,21 +1295,53 @@ export const HomeIndexRoute = () => {
)} - {commitIntentConfigMutation.isError && - !verificationStatus && ( // Only show generic error if verification banner isn't shown -
- - Error: {commitIntentConfigMutation.error.message} - -
- )} + {/* Commit Status Messages */} + {commitIntentConfigMutation.isError && ( +
+ + Commit Error: {commitIntentConfigMutation.error.message} + +
+ )} {commitIntentConfigMutation.isSuccess && (
- Intent configuration committed successfully! + Intent configuration committed successfully! Fetching details...
)} + + {/* Display Fetched Committed Config */} + {committedIntentAddress && commitIntentConfigMutation.isSuccess && ( +
+
+ + Committed Configuration Details on Database + +
+ {isLoadingCommittedConfig && ( +
+ + + Loading committed config... + +
+ )} + {committedConfigError && ( +
+ + + Error fetching config: {committedConfigError.message} + +
+ )} + {committedIntentConfig && !isLoadingCommittedConfig && !committedConfigError && ( +
+                          {JSON.stringify(committedIntentConfig, null, 2)}
+                        
+ )} +
+ )}
@@ -1366,15 +1434,16 @@ export const HomeIndexRoute = () => { disabled={ !verificationStatus?.success || isSendingTransaction || + isWaitingForReceipt || !originCallParams || !!originCallParams.error } className="px-2.5 py-1 shadow-lg transition-all duration-300 transform hover:scale-105 disabled:opacity-50 disabled:transform-none" > - {isSendingTransaction ? ( + {isSendingTransaction || isWaitingForReceipt ? (
- Sending... + {isWaitingForReceipt ? 'Waiting...' : 'Sending...'}
) : ( 'Send Transaction' @@ -1385,6 +1454,18 @@ export const HomeIndexRoute = () => {
)} + + {/* Preview calculated address */} + {account.address && intentOperations && ( +
+ + Calculated Address: + + {originCallParams?.to?.toString() || 'N/A'} + + +
+ )}
)} From 791377258acb32cfa117890b672895a118a712c7 Mon Sep 17 00:00:00 2001 From: Shun Kakinoki Date: Mon, 21 Apr 2025 16:02:07 +0900 Subject: [PATCH 375/439] Refactor wagmi.config.ts to utilize chains from 'viem/chains' for improved flexibility. Update HomeIndexRoute to integrate chain switching functionality, enhancing user experience by allowing seamless transitions between networks without resetting state. Add error handling for chain switching and improve UI feedback during transactions. --- .../src/routes/home/home-index-route.tsx | 160 ++++++++++++++---- extras/demo-anypay/src/wagmi.config.ts | 22 +-- 2 files changed, 142 insertions(+), 40 deletions(-) diff --git a/extras/demo-anypay/src/routes/home/home-index-route.tsx b/extras/demo-anypay/src/routes/home/home-index-route.tsx index 748ba92f3..878798600 100644 --- a/extras/demo-anypay/src/routes/home/home-index-route.tsx +++ b/extras/demo-anypay/src/routes/home/home-index-route.tsx @@ -1,5 +1,5 @@ import { useState, useMemo, useEffect, useCallback } from 'react' -import { useAccount, useConnect, useDisconnect, useSendTransaction } from 'wagmi' +import { useAccount, useConnect, useDisconnect, useSendTransaction, useSwitchChain } from 'wagmi' import { Connector } from 'wagmi' import { useIndexerGatewayClient } from '@0xsequence/hooks' import { NativeTokenBalance, TokenBalance, ContractVerificationStatus } from '@0xsequence/indexer' @@ -28,6 +28,22 @@ import { ShieldCheck, } from 'lucide-react' +// Helper to get chain info +const getChainInfo = (chainId: number) => { + return Object.values(chains).find((chain) => chain.id === chainId) || null +} + +// Mock Data +const MOCK_CONTRACT_ADDRESS = '0x0000000000000000000000000000000000000000' +// Mock Calldata for interaction +const MOCK_TRANSFER_DATA: Hex = `0xabcdef` +// Mock Chain ID for interaction +const MOCK_CHAIN_ID = chains.arbitrum.id +// Mock Token Address for interaction on destination chain +const MOCK_TOKEN_ADDRESS = '0x0000000000000000000000000000000000000000' +// Mock Token Amount for interaction on destination chain +const MOCK_TOKEN_AMOUNT = '300' + // Add type for calculated origin call parameters type OriginCallParams = { to: `0x${string}` | null @@ -77,23 +93,6 @@ const formatBalance = (balance: TokenBalance | NativeTokenBalance) => { } } -// Mock Data -const MOCK_CONTRACT_ADDRESS = '0x0000000000000000000000000000000000000000' -// Mock Calldata for interaction -const MOCK_TRANSFER_DATA: Hex = `0xabcdef` -// Mock Chain ID for interaction -const MOCK_CHAIN_ID = chains.arbitrum.id -// Mock Token Address for interaction on destination chain -const MOCK_TOKEN_ADDRESS = '0x0000000000000000000000000000000000000000' -// Mock Token Amount for interaction on destination chain -const MOCK_TOKEN_AMOUNT = '300' - -// Helper to get chain info -const getChainInfo = (chainId: number) => { - // Find the chain by ID in all available chains - return Object.values(chains).find((chain) => chain.id === chainId) || null -} - const findPreconditionAddress = (preconditions: IntentPrecondition[]) => { const preconditionTypes = ['erc20-balance', 'native-balance'] as const @@ -112,6 +111,7 @@ export const HomeIndexRoute = () => { const { connectors, connect, status: connectStatus, error: connectError } = useConnect() const { disconnect } = useDisconnect() const { sendTransaction, isPending: isSendingTransaction } = useSendTransaction() + const { switchChain, isPending: isSwitchingChain, error: switchChainError } = useSwitchChain() const [selectedToken, setSelectedToken] = useState(null) const [showCustomCallForm, setShowCustomCallForm] = useState(false) const [customCallData, setCustomCallData] = useState({ @@ -190,6 +190,8 @@ export const HomeIndexRoute = () => { const [originCallParams, setOriginCallParams] = useState(null) + const [isChainSwitchRequired, setIsChainSwitchRequired] = useState(false) + const calculateIntentAddress = useCallback((operations: IntentOperation[], mainSigner: string) => { try { const context: ContextLike.Context = { @@ -502,12 +504,14 @@ export const HomeIndexRoute = () => { }, [tokenBalancesData]) useEffect(() => { - setSelectedToken(null) - setIntentOperations(null) - setIntentPreconditions(null) - setCommittedIntentAddress(null) - setVerificationStatus(null) - }, [account.address, account.chainId]) + if (!account.isConnected) { + setSelectedToken(null) + setIntentOperations(null) + setIntentPreconditions(null) + setCommittedIntentAddress(null) + setVerificationStatus(null) + } + }, [account.isConnected]) const handleActionClick = (action: IntentAction) => { setIntentOperations(null) @@ -528,7 +532,7 @@ export const HomeIndexRoute = () => { setShowCustomCallForm(false) } - // Update handleSendOriginCall to use calculated parameters from state + // Update handleSendOriginCall to handle chain switching without resetting state const handleSendOriginCall = async () => { // Use the calculated parameters from state if ( @@ -544,10 +548,78 @@ export const HomeIndexRoute = () => { return } + // Check if we need to switch chains + if (account.chainId !== originCallParams.chainId) { + setIsChainSwitchRequired(true) + updateMetaTxnStatus( + undefined, + 'pending', + undefined, + undefined, + `Switching to chain ${originCallParams.chainId}...`, + ) + + try { + console.log('Switching to chain:', originCallParams.chainId) + await switchChain({ chainId: originCallParams.chainId }) + + // Wait for the chain switch to be reflected in the account + const startTime = Date.now() + const timeout = 10000 // 10 seconds timeout + + while (Date.now() - startTime < timeout) { + if (account.chainId === originCallParams.chainId) { + console.log('Chain switch successful') + break + } + await new Promise((resolve) => setTimeout(resolve, 500)) // Wait 500ms before checking again + } + + if (account.chainId !== originCallParams.chainId) { + throw new Error('Chain switch timed out') + } + + // Don't reset state, just proceed with the transaction + setIsChainSwitchRequired(false) + + // Immediately send the transaction after successful chain switch + return sendTransaction( + { + to: originCallParams.to, + data: originCallParams.data, + value: originCallParams.value, + chainId: originCallParams.chainId, + }, + { + onSuccess: (hash) => { + console.log('Transaction sent, hash:', hash) + setTxnHash(hash) + }, + onError: (error) => { + console.error('Transaction failed:', error) + updateMetaTxnStatus(undefined, 'reverted', undefined, undefined, error.message) + }, + }, + ) + } catch (error: any) { + console.error('Failed to switch chain:', error) + updateMetaTxnStatus( + undefined, + 'reverted', + undefined, + undefined, + `Failed to switch chain: ${error.message || 'Unknown error'}`, + ) + setIsChainSwitchRequired(false) + return + } + } + + // If already on correct chain, just send the transaction setTxnHash(undefined) updateMetaTxnStatus(undefined, 'sending') - sendTransaction( + return sendTransaction( { to: originCallParams.to, data: originCallParams.data, @@ -557,7 +629,7 @@ export const HomeIndexRoute = () => { { onSuccess: (hash) => { console.log('Transaction sent, hash:', hash) - setTxnHash(hash) // Set hash to trigger useWaitForTransactionReceipt + setTxnHash(hash) }, onError: (error) => { console.error('Transaction failed:', error) @@ -567,6 +639,28 @@ export const HomeIndexRoute = () => { ) } + // Remove the chain change effect that might be resetting state + useEffect(() => { + if (switchChainError) { + console.error('Chain switch error:', switchChainError) + updateMetaTxnStatus( + undefined, + 'reverted', + undefined, + undefined, + `Chain switch failed: ${switchChainError.message || 'Unknown error'}`, + ) + setIsChainSwitchRequired(false) + } + }, [switchChainError]) + + // Only update chain switch required state when needed + useEffect(() => { + if (originCallParams?.chainId && account.chainId === originCallParams.chainId) { + setIsChainSwitchRequired(false) + } + }, [account.chainId, originCallParams?.chainId]) + // Hook to wait for transaction receipt const { data: receipt, @@ -1436,15 +1530,23 @@ export const HomeIndexRoute = () => { isSendingTransaction || isWaitingForReceipt || !originCallParams || - !!originCallParams.error + !!originCallParams.error || + isSwitchingChain } className="px-2.5 py-1 shadow-lg transition-all duration-300 transform hover:scale-105 disabled:opacity-50 disabled:transform-none" > - {isSendingTransaction || isWaitingForReceipt ? ( + {isSwitchingChain ? ( +
+ + Switching Chain... +
+ ) : isSendingTransaction || isWaitingForReceipt ? (
{isWaitingForReceipt ? 'Waiting...' : 'Sending...'}
+ ) : isChainSwitchRequired ? ( + 'Switch Chain' ) : ( 'Send Transaction' )} diff --git a/extras/demo-anypay/src/wagmi.config.ts b/extras/demo-anypay/src/wagmi.config.ts index 4148d34f1..c64bd7167 100644 --- a/extras/demo-anypay/src/wagmi.config.ts +++ b/extras/demo-anypay/src/wagmi.config.ts @@ -1,5 +1,5 @@ import { http, createConfig } from 'wagmi' -import { mainnet, sepolia, polygon, arbitrum, optimism, base } from 'wagmi/chains' +import * as chains from 'viem/chains' import { injected, metaMask } from 'wagmi/connectors' import { sequenceWallet } from '@0xsequence/wagmi-connector' @@ -10,24 +10,24 @@ if (!projectAccessKey) { } export const config = createConfig({ - chains: [mainnet, sepolia, polygon, arbitrum, optimism, base], + // @ts-expect-error + chains: Object.values(chains), connectors: [ sequenceWallet({ connectOptions: { app: 'Demo Anypay', projectAccessKey: projectAccessKey, }, - defaultNetwork: mainnet.id, + defaultNetwork: chains.mainnet.id, }), injected(), metaMask(), ], - transports: { - [mainnet.id]: http(), - [sepolia.id]: http(), - [polygon.id]: http(), - [arbitrum.id]: http(), - [optimism.id]: http(), - [base.id]: http(), - }, + transports: Object.values(chains).reduce( + (acc, chain) => ({ + ...acc, + [chain.id]: http(), + }), + {}, + ) as Record>, }) From 2e969445c9246ab48a16fc6281a4b800a5d5cba4 Mon Sep 17 00:00:00 2001 From: Shun Kakinoki Date: Mon, 21 Apr 2025 16:03:49 +0900 Subject: [PATCH 376/439] Refactor HomeIndexRoute to streamline chain switching logic by removing unnecessary state resets and timeout checks. Enhance transaction handling by ensuring immediate transaction sending after successful chain switches. Improve clarity in the useEffect hooks for managing transaction status and precondition checks, ensuring better user feedback during operations. --- .../src/routes/home/home-index-route.tsx | 27 ++----------------- 1 file changed, 2 insertions(+), 25 deletions(-) diff --git a/extras/demo-anypay/src/routes/home/home-index-route.tsx b/extras/demo-anypay/src/routes/home/home-index-route.tsx index 878798600..9dbd5f9b9 100644 --- a/extras/demo-anypay/src/routes/home/home-index-route.tsx +++ b/extras/demo-anypay/src/routes/home/home-index-route.tsx @@ -532,9 +532,7 @@ export const HomeIndexRoute = () => { setShowCustomCallForm(false) } - // Update handleSendOriginCall to handle chain switching without resetting state const handleSendOriginCall = async () => { - // Use the calculated parameters from state if ( !originCallParams || originCallParams.error || @@ -563,26 +561,12 @@ export const HomeIndexRoute = () => { console.log('Switching to chain:', originCallParams.chainId) await switchChain({ chainId: originCallParams.chainId }) - // Wait for the chain switch to be reflected in the account - const startTime = Date.now() - const timeout = 10000 // 10 seconds timeout - - while (Date.now() - startTime < timeout) { - if (account.chainId === originCallParams.chainId) { - console.log('Chain switch successful') - break - } - await new Promise((resolve) => setTimeout(resolve, 500)) // Wait 500ms before checking again - } - if (account.chainId !== originCallParams.chainId) { throw new Error('Chain switch timed out') } - // Don't reset state, just proceed with the transaction setIsChainSwitchRequired(false) - // Immediately send the transaction after successful chain switch return sendTransaction( { to: originCallParams.to, @@ -615,7 +599,6 @@ export const HomeIndexRoute = () => { } } - // If already on correct chain, just send the transaction setTxnHash(undefined) updateMetaTxnStatus(undefined, 'sending') @@ -676,11 +659,9 @@ export const HomeIndexRoute = () => { }, }) - // Effect to update status based on receipt useEffect(() => { if (!txnHash) { - // No transaction sent yet or reset - setMetaTxnStatus(null) // Clear status + setMetaTxnStatus(null) return } if (isWaitingForReceipt) { @@ -689,22 +670,19 @@ export const HomeIndexRoute = () => { } if (isSuccess && receipt) { updateMetaTxnStatus(receipt.transactionHash, receipt.status, receipt.gasUsed, receipt.effectiveGasPrice) - // Optionally, trigger relayer status check here if needed after confirmation - // e.g., checkPreconditionStatuses() + checkPreconditionStatuses() } else if (isError) { console.error('Error waiting for receipt:', receiptError) updateMetaTxnStatus(txnHash, 'reverted', undefined, undefined, receiptError?.message || 'Failed to get receipt') } }, [isWaitingForReceipt, isSuccess, isError, receipt, txnHash, receiptError]) - // Add useEffect to check precondition statuses when intentPreconditions changes useEffect(() => { if (intentPreconditions) { checkPreconditionStatuses() } }, [intentPreconditions, checkPreconditionStatuses]) - // Effect to calculate actual origin call parameters for UI display useEffect(() => { if (!intentOperations?.[0]?.chainId || !selectedToken || !intentPreconditions || !account.address) { setOriginCallParams(null) @@ -712,7 +690,6 @@ export const HomeIndexRoute = () => { } try { - // Calculate the intent address here as it's needed for params const intentAddress = calculateIntentAddress(intentOperations, account.address) const intentAddressString = intentAddress.toString() as Address.Address From d199fec105c7a2070f555862790f0e4cfb9bd39d Mon Sep 17 00:00:00 2001 From: Shun Kakinoki Date: Mon, 21 Apr 2025 16:06:00 +0900 Subject: [PATCH 377/439] Update HomeIndexRoute to correct the AMOUNT constant from 30,000,000 to 30,000, reflecting the accurate value of 0.03 USDC. This change ensures proper transaction handling and clarity in the displayed amounts. --- extras/demo-anypay/src/routes/home/home-index-route.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extras/demo-anypay/src/routes/home/home-index-route.tsx b/extras/demo-anypay/src/routes/home/home-index-route.tsx index 9dbd5f9b9..8068d6dd8 100644 --- a/extras/demo-anypay/src/routes/home/home-index-route.tsx +++ b/extras/demo-anypay/src/routes/home/home-index-route.tsx @@ -360,7 +360,7 @@ export const HomeIndexRoute = () => { const USDC_ADDRESS = '0x833589fcd6edb6e08f4c7c32d4f71b54bda02913' const RECIPIENT_ADDRESS = '0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045' - const AMOUNT = 30000000n // 30 USDC (6 decimals) + const AMOUNT = 30000n // 0.03 USDC (6 decimals) // Ensure we have a valid chain ID, defaulting to Base (8453) if none provided const destinationChainId = selectedToken.chainId || 8453 From e7c2851c09090d8684f18f29500ab9e1caade78c Mon Sep 17 00:00:00 2001 From: Shun Kakinoki Date: Mon, 21 Apr 2025 17:25:12 +0900 Subject: [PATCH 378/439] Add auto-execution feature in HomeIndexRoute for seamless transaction handling after chain switches. Introduce state management for auto-execution toggle and enhance UI feedback for transaction status. Update button states and texts for improved user experience during intent configuration and transaction processes. --- .../src/routes/home/home-index-route.tsx | 216 ++++++++++++++---- 1 file changed, 174 insertions(+), 42 deletions(-) diff --git a/extras/demo-anypay/src/routes/home/home-index-route.tsx b/extras/demo-anypay/src/routes/home/home-index-route.tsx index 8068d6dd8..c9194869c 100644 --- a/extras/demo-anypay/src/routes/home/home-index-route.tsx +++ b/extras/demo-anypay/src/routes/home/home-index-route.tsx @@ -191,6 +191,7 @@ export const HomeIndexRoute = () => { const [originCallParams, setOriginCallParams] = useState(null) const [isChainSwitchRequired, setIsChainSwitchRequired] = useState(false) + const [isAutoExecuteEnabled, setIsAutoExecuteEnabled] = useState(true) const calculateIntentAddress = useCallback((operations: IntentOperation[], mainSigner: string) => { try { @@ -637,6 +638,36 @@ export const HomeIndexRoute = () => { } }, [switchChainError]) + // Effect to handle auto-execution after chain switch + useEffect(() => { + if (isAutoExecuteEnabled && originCallParams?.chainId && account.chainId === originCallParams.chainId) { + // Chain has been switched successfully, now send the transaction + if (!originCallParams.to || !originCallParams.data || originCallParams.value === null) { + console.error('Invalid origin call parameters for auto-execution') + return + } + + sendTransaction( + { + to: originCallParams.to, + data: originCallParams.data, + value: originCallParams.value, + chainId: originCallParams.chainId, + }, + { + onSuccess: (hash) => { + console.log('Auto-executed transaction sent, hash:', hash) + setTxnHash(hash) + }, + onError: (error) => { + console.error('Auto-executed transaction failed:', error) + updateMetaTxnStatus(undefined, 'reverted', undefined, undefined, error.message) + }, + }, + ) + } + }, [isAutoExecuteEnabled, originCallParams?.chainId, account.chainId]) + // Only update chain switch required state when needed useEffect(() => { if (originCallParams?.chainId && account.chainId === originCallParams.chainId) { @@ -747,6 +778,120 @@ export const HomeIndexRoute = () => { } }, [intentOperations, selectedToken, intentPreconditions, account.address, calculateIntentAddress]) + useEffect(() => { + // Auto-execute effect for handling chain switch and transaction + if ( + isAutoExecuteEnabled && + originCallParams && + !originCallParams.error && + account.chainId !== originCallParams.chainId + ) { + handleSendOriginCall() + } + }, [isAutoExecuteEnabled, originCallParams, account.chainId]) + + // Effect to auto-commit when intent operations are ready + useEffect(() => { + if ( + isAutoExecuteEnabled && + intentOperations && + intentPreconditions && + account.address && + !commitIntentConfigMutation.isPending && + !commitIntentConfigMutation.isSuccess + ) { + console.log('Auto-committing intent configuration...') + commitIntentConfigMutation.mutate({ + walletAddress: calculateIntentAddress(intentOperations, account.address).toString(), + mainSigner: account.address, + operations: intentOperations, + preconditions: intentPreconditions, + }) + } + }, [ + isAutoExecuteEnabled, + intentOperations, + intentPreconditions, + account.address, + commitIntentConfigMutation.isPending, + commitIntentConfigMutation.isSuccess, + ]) + + // Effect to auto-send transaction after successful commit + useEffect(() => { + if ( + isAutoExecuteEnabled && + commitIntentConfigMutation.isSuccess && + originCallParams && + !originCallParams.error && + !isSendingTransaction && + !isWaitingForReceipt && + !txnHash + ) { + console.log('Auto-sending transaction after successful commit...') + handleSendOriginCall() + } + }, [ + isAutoExecuteEnabled, + commitIntentConfigMutation.isSuccess, + originCallParams, + isSendingTransaction, + isWaitingForReceipt, + txnHash, + ]) + + // Existing auto-execute effect for chain switching + useEffect(() => { + if ( + isAutoExecuteEnabled && + originCallParams && + !originCallParams.error && + account.chainId !== originCallParams.chainId + ) { + handleSendOriginCall() + } + }, [isAutoExecuteEnabled, originCallParams, account.chainId]) + + // Update button text and disabled state for commit button + const commitButtonText = commitIntentConfigMutation.isPending ? ( +
+ + Committing... +
+ ) : ( + 'Commit Intent' + ) + + const isCommitButtonDisabled = Boolean( + commitIntentConfigMutation.isPending || (isAutoExecuteEnabled && intentOperations && !!intentPreconditions?.length), + ) + + // Update button text and disabled state for send transaction button + const sendButtonText = isSwitchingChain ? ( +
+ + Switching Chain... +
+ ) : isSendingTransaction || isWaitingForReceipt ? ( +
+ + {isWaitingForReceipt ? 'Waiting...' : 'Sending...'} +
+ ) : isChainSwitchRequired ? ( + 'Switch Chain' + ) : ( + 'Send Transaction' + ) + + const isSendButtonDisabled = + !verificationStatus?.success || + isSendingTransaction || + isWaitingForReceipt || + !originCallParams || + !!originCallParams.error || + isSwitchingChain || + (isAutoExecuteEnabled && commitIntentConfigMutation.isSuccess) // Disable if auto-execute is on and commit was successful + return (
@@ -1317,17 +1462,10 @@ export const HomeIndexRoute = () => { preconditions: intentPreconditions, }) }} - disabled={commitIntentConfigMutation.isPending} + disabled={isCommitButtonDisabled} className="px-2.5 py-1 shadow-lg transition-all duration-300 transform hover:scale-105 disabled:opacity-50 disabled:transform-none" > - {commitIntentConfigMutation.isPending ? ( -
- - Committing... -
- ) : ( - 'Commit Intent' - )} + {commitButtonText}
@@ -1428,17 +1566,32 @@ export const HomeIndexRoute = () => {

Origin Call

- - - Transaction Details - - (Send this transaction to execute the intent): +
+ + + Transaction Details + + (Send this transaction to execute the intent): + - +
+ + Auto-Execute + +
setIsAutoExecuteEnabled(!isAutoExecuteEnabled)} + className={`relative inline-flex h-6 w-11 items-center rounded-full transition-colors cursor-pointer ${ + isAutoExecuteEnabled ? 'bg-blue-600' : 'bg-gray-700' + }`} + > + +
+
+
@@ -1502,31 +1655,10 @@ export const HomeIndexRoute = () => {
From ca78dd969caa0f8af4fa0ae900a6a0433c4d7033 Mon Sep 17 00:00:00 2001 From: Shun Kakinoki Date: Mon, 21 Apr 2025 17:28:57 +0900 Subject: [PATCH 379/439] Add auto-execute toggle in HomeIndexRoute for improved transaction handling. Enhance UI with clear status indicators for auto-execution and streamline transaction details display. This update improves user experience by providing immediate feedback on transaction execution settings. --- .../src/routes/home/home-index-route.tsx | 63 +++++++++++-------- 1 file changed, 38 insertions(+), 25 deletions(-) diff --git a/extras/demo-anypay/src/routes/home/home-index-route.tsx b/extras/demo-anypay/src/routes/home/home-index-route.tsx index c9194869c..4c50d4b05 100644 --- a/extras/demo-anypay/src/routes/home/home-index-route.tsx +++ b/extras/demo-anypay/src/routes/home/home-index-route.tsx @@ -1112,6 +1112,38 @@ export const HomeIndexRoute = () => { )}
+ {/* Auto-Execute Toggle */} +
+
+
+ + + Auto-Execute + + + (Automatically commits and executes transactions when ready) + +
+
+ + {isAutoExecuteEnabled ? 'Enabled' : 'Disabled'} + +
setIsAutoExecuteEnabled(!isAutoExecuteEnabled)} + className={`relative inline-flex h-6 w-11 items-center rounded-full transition-colors cursor-pointer ${ + isAutoExecuteEnabled ? 'bg-blue-600' : 'bg-gray-700' + }`} + > + +
+
+
+
+ {/* 2. Choose Action */}
@@ -1566,32 +1598,13 @@ export const HomeIndexRoute = () => {

Origin Call

-
- - - Transaction Details - - (Send this transaction to execute the intent): - + + + Transaction Details + + (Send this transaction to execute the intent): -
- - Auto-Execute - -
setIsAutoExecuteEnabled(!isAutoExecuteEnabled)} - className={`relative inline-flex h-6 w-11 items-center rounded-full transition-colors cursor-pointer ${ - isAutoExecuteEnabled ? 'bg-blue-600' : 'bg-gray-700' - }`} - > - -
-
-
+
From f56e4dff020b3aa4c45e05a7a471ac6af9b8ad68 Mon Sep 17 00:00:00 2001 From: Shun Kakinoki Date: Mon, 21 Apr 2025 17:30:58 +0900 Subject: [PATCH 380/439] Enhance error handling in HomeIndexRoute by disabling auto-execute toggle when user rejects transactions. This update improves user experience by providing clearer feedback on transaction execution settings during error scenarios. --- extras/demo-anypay/src/routes/home/home-index-route.tsx | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/extras/demo-anypay/src/routes/home/home-index-route.tsx b/extras/demo-anypay/src/routes/home/home-index-route.tsx index 4c50d4b05..509b8d9b5 100644 --- a/extras/demo-anypay/src/routes/home/home-index-route.tsx +++ b/extras/demo-anypay/src/routes/home/home-index-route.tsx @@ -582,12 +582,18 @@ export const HomeIndexRoute = () => { }, onError: (error) => { console.error('Transaction failed:', error) + if (error.message.includes('User rejected') || error.message.includes('user rejected')) { + setIsAutoExecuteEnabled(false) + } updateMetaTxnStatus(undefined, 'reverted', undefined, undefined, error.message) }, }, ) } catch (error: any) { console.error('Failed to switch chain:', error) + if (error.message.includes('User rejected') || error.message.includes('user rejected')) { + setIsAutoExecuteEnabled(false) + } updateMetaTxnStatus( undefined, 'reverted', @@ -617,6 +623,9 @@ export const HomeIndexRoute = () => { }, onError: (error) => { console.error('Transaction failed:', error) + if (error.message.includes('User rejected') || error.message.includes('user rejected')) { + setIsAutoExecuteEnabled(false) + } updateMetaTxnStatus(undefined, 'reverted', undefined, undefined, error.message) }, }, From e2781901f24f3b078bfd82c807cbf1ce1dedee1c Mon Sep 17 00:00:00 2001 From: Shun Kakinoki Date: Mon, 21 Apr 2025 17:31:59 +0900 Subject: [PATCH 381/439] Refactor Auto-Execute Toggle in HomeIndexRoute for improved UI layout. The toggle component is now positioned within the "Choose Action" section, enhancing visual organization and user experience. This change maintains existing functionality while streamlining the interface. --- .../src/routes/home/home-index-route.tsx | 67 +++++++++---------- 1 file changed, 33 insertions(+), 34 deletions(-) diff --git a/extras/demo-anypay/src/routes/home/home-index-route.tsx b/extras/demo-anypay/src/routes/home/home-index-route.tsx index 509b8d9b5..7ad42242c 100644 --- a/extras/demo-anypay/src/routes/home/home-index-route.tsx +++ b/extras/demo-anypay/src/routes/home/home-index-route.tsx @@ -1121,46 +1121,45 @@ export const HomeIndexRoute = () => { )}
- {/* Auto-Execute Toggle */} -
-
-
- - - Auto-Execute - - - (Automatically commits and executes transactions when ready) - -
-
- - {isAutoExecuteEnabled ? 'Enabled' : 'Disabled'} - -
setIsAutoExecuteEnabled(!isAutoExecuteEnabled)} - className={`relative inline-flex h-6 w-11 items-center rounded-full transition-colors cursor-pointer ${ - isAutoExecuteEnabled ? 'bg-blue-600' : 'bg-gray-700' - }`} - > - -
-
-
-
- {/* 2. Choose Action */} -
-
+
+
3

Choose Action

+ {/* Auto-Execute Toggle */} +
+
+
+ + + Auto-Execute + + + (Automatically commits and executes transactions when ready) + +
+
+ + {isAutoExecuteEnabled ? 'Enabled' : 'Disabled'} + +
setIsAutoExecuteEnabled(!isAutoExecuteEnabled)} + className={`relative inline-flex h-6 w-11 items-center rounded-full transition-colors cursor-pointer ${ + isAutoExecuteEnabled ? 'bg-blue-600' : 'bg-gray-700' + }`} + > + +
+
+
+
-
- {/* Meta Transaction Status */} +
+ {/* Origin Call Status */}
{ className="mb-4 pb-2 border-b border-gray-700/50 flex items-center" > - Meta Transaction Status + Origin Call Status
@@ -1756,15 +1806,87 @@ export const HomeIndexRoute = () => { {isWaitingForReceipt && (Waiting for confirmation...)}
+ {metaTxnStatus?.revertReason && ( +
+ + Revert Reason: + {metaTxnStatus.revertReason} + +
+ )} +
+ + Gas Used: + {metaTxnStatus?.gasUsed || '0'} + +
- - Revert Reason: - {metaTxnStatus?.revertReason || 'None'} + + Effective Gas Price: + {metaTxnStatus?.effectiveGasPrice || '0'}
+ {/* Intent Operations Status */} +
+ + + Intent Operations Status + +
+ {intentOperations.map((operation, index) => ( +
+
+ + + Operation #{index + 1} - Chain {operation.chainId} + + ({getChainInfo(parseInt(operation.chainId))?.name || 'Unknown Chain'}) + + +
+ {operationStatuses[`${operation.chainId}-${index}`]?.status === 'success' + ? 'Success' + : operationStatuses[`${operation.chainId}-${index}`]?.status === 'failed' + ? 'Failed' + : 'Pending'} +
+
+ {operationStatuses[`${operation.chainId}-${index}`]?.txHash && ( + + Tx Hash: + + {operationStatuses[`${operation.chainId}-${index}`].txHash} + + + )} + {operationStatuses[`${operation.chainId}-${index}`]?.error && ( + + Error: + + {operationStatuses[`${operation.chainId}-${index}`].error} + + + )} +
+ ))} +
+
+ {/* Preconditions Status */}
{ ))}
- - {/* Final Intent Status */} -
- - - Final Intent Status - -
-
- - Status: - {metaTxnStatus?.status || 'Pending'} - -
-
- - Gas Used: - {metaTxnStatus?.gasUsed || '0'} - -
-
- - Effective Gas Price: - {metaTxnStatus?.effectiveGasPrice || '0'} - -
-
-
)} From af0226529fc0f3f8277ab7eea6976a3d9385358b Mon Sep 17 00:00:00 2001 From: Shun Kakinoki Date: Tue, 22 Apr 2025 01:26:50 +0900 Subject: [PATCH 384/439] Implement meta-transaction handling in HomeIndexRoute to enhance transaction processing. Introduce state management for meta-transaction status, operation statuses, and relayer configuration based on chain IDs. Update logic to send meta-transactions through appropriate relayers and monitor their statuses, improving user feedback and transaction tracking during operations. --- .../src/hooks/useMetaTxnMonitor.ts | 59 +++++ .../src/routes/home/home-index-route.tsx | 203 +++++++++++++++--- 2 files changed, 230 insertions(+), 32 deletions(-) create mode 100644 extras/demo-anypay/src/hooks/useMetaTxnMonitor.ts diff --git a/extras/demo-anypay/src/hooks/useMetaTxnMonitor.ts b/extras/demo-anypay/src/hooks/useMetaTxnMonitor.ts new file mode 100644 index 000000000..3f5a28d2f --- /dev/null +++ b/extras/demo-anypay/src/hooks/useMetaTxnMonitor.ts @@ -0,0 +1,59 @@ +import { useState, useEffect } from 'react' +import { Relayer } from '@0xsequence/wallet-core' +import { Hex } from 'viem' + +type OperationStatus = { + status: 'pending' | 'success' | 'failed' + txHash?: string + error?: string +} + +export const useMetaTxnMonitor = ( + opHash: Hex | undefined, + chainId: string, + relayer: Relayer.Rpc.RpcRelayer | undefined, +) => { + const [status, setStatus] = useState({ status: 'pending' }) + + useEffect(() => { + if (!opHash || !relayer) return + + let isSubscribed = true + + const monitorStatus = async () => { + try { + const currentStatus = await relayer.status(opHash, BigInt(chainId)) + + if (!isSubscribed) return + + const newStatus: OperationStatus = { + status: + currentStatus.status === 'confirmed' ? 'success' : currentStatus.status === 'failed' ? 'failed' : 'pending', + txHash: currentStatus.status === 'confirmed' ? currentStatus.transactionHash : undefined, + error: currentStatus.status === 'failed' ? currentStatus.reason : undefined, + } + + setStatus(newStatus) + + // Continue monitoring if still pending + if (currentStatus.status === 'pending' && isSubscribed) { + setTimeout(monitorStatus, 5000) + } + } catch (error: any) { + if (!isSubscribed) return + setStatus({ + status: 'failed', + error: error.message, + }) + } + } + + monitorStatus() + + return () => { + isSubscribed = false + } + }, [opHash, chainId, relayer]) + + return status +} diff --git a/extras/demo-anypay/src/routes/home/home-index-route.tsx b/extras/demo-anypay/src/routes/home/home-index-route.tsx index 229687391..5e65772e2 100644 --- a/extras/demo-anypay/src/routes/home/home-index-route.tsx +++ b/extras/demo-anypay/src/routes/home/home-index-route.tsx @@ -15,6 +15,7 @@ import { AnyPay } from '@0xsequence/wallet-core' import { Context as ContextLike } from '@0xsequence/wallet-primitives' import { useWaitForTransactionReceipt } from 'wagmi' import { Relayer } from '@0xsequence/wallet-core' +import { useMetaTxnMonitor } from '../../hooks/useMetaTxnMonitor' import { AlertTriangle, Loader2, @@ -124,17 +125,40 @@ export const HomeIndexRoute = () => { }) const indexerClient = useIndexerGatewayClient() const apiClient = useAPIClient() - const relayer = useMemo(() => { - return new Relayer.Rpc.RpcRelayer('https://relayer.sequence.app', 8453, 'https://node.sequence.app') - }, []) - // State for intent results + // State declarations const [intentOperations, setIntentOperations] = useState(null) const [intentPreconditions, setIntentPreconditions] = useState( null, ) const [txnHash, setTxnHash] = useState() const [committedIntentAddress, setCommittedIntentAddress] = useState(null) + const [preconditionStatuses, setPreconditionStatuses] = useState([]) + const [verificationStatus, setVerificationStatus] = useState<{ + success: boolean + receivedAddress?: string + calculatedAddress?: string + } | null>(null) + const [metaTxnStatus, setMetaTxnStatus] = useState<{ + txnHash?: string + status?: string + revertReason?: string + gasUsed?: number + effectiveGasPrice?: string + } | null>(null) + const [originCallParams, setOriginCallParams] = useState(null) + const [isChainSwitchRequired, setIsChainSwitchRequired] = useState(false) + const [isAutoExecuteEnabled, setIsAutoExecuteEnabled] = useState(true) + const [operationStatuses, setOperationStatuses] = useState<{ + [key: string]: { + status: 'pending' | 'success' | 'failed' + txHash?: string + error?: string + preconditionsMet?: boolean + lastPreconditionCheck?: string + } + }>({}) + const [operationHashes, setOperationHashes] = useState<{ [key: string]: Hex }>({}) // Default empty page info for query fallback const defaultPage = { page: 1, pageSize: 10, totalRecords: 0, more: false } @@ -172,33 +196,42 @@ export const HomeIndexRoute = () => { retry: 1, }) - const [verificationStatus, setVerificationStatus] = useState<{ - success: boolean - receivedAddress?: string - calculatedAddress?: string - } | null>(null) + // Relayers setup + const relayers = useMemo(() => { + const relayerMap = new Map() - const [metaTxnStatus, setMetaTxnStatus] = useState<{ - txnHash?: string - status?: string - revertReason?: string - gasUsed?: number - effectiveGasPrice?: string - } | null>(null) - - const [preconditionStatuses, setPreconditionStatuses] = useState([]) - const [originCallParams, setOriginCallParams] = useState(null) - const [isChainSwitchRequired, setIsChainSwitchRequired] = useState(false) - const [isAutoExecuteEnabled, setIsAutoExecuteEnabled] = useState(true) + // Initialize relayers for each unique chain in intent operations + if (intentOperations) { + const uniqueChainIds = new Set(intentOperations.map((op) => parseInt(op.chainId))) + uniqueChainIds.forEach((chainId) => { + // Get chain-specific RPC URL + let rpcUrl = 'https://node.sequence.app' + const chain = getChainInfo(chainId) + if (chain) { + if (chainId === 42161) rpcUrl = 'https://arbitrum-mainnet.sequence.app' + else if (chainId === 10) rpcUrl = 'https://optimism-mainnet.sequence.app' + else if (chainId === 8453) rpcUrl = 'https://base-mainnet.sequence.app' + else rpcUrl = 'https://node.sequence.app' + } - // Add new state for operation statuses - const [operationStatuses, setOperationStatuses] = useState<{ - [key: string]: { - status: 'pending' | 'success' | 'failed' - txHash?: string - error?: string + relayerMap.set(chainId, new Relayer.Rpc.RpcRelayer('https://relayer.sequence.app', chainId, rpcUrl)) + }) } - }>({}) + + return relayerMap + }, [intentOperations]) + + // Function to get relayer for a specific chain + const getRelayer = useCallback( + (chainId: number) => { + const chainRelayer = relayers.get(chainId) + if (!chainRelayer) { + throw new Error(`No relayer found for chain ID ${chainId}`) + } + return chainRelayer + }, + [relayers], + ) const calculateIntentAddress = useCallback((operations: IntentOperation[], mainSigner: string) => { try { @@ -255,16 +288,18 @@ export const HomeIndexRoute = () => { } const checkPreconditionStatuses = useCallback(async () => { - if (!intentPreconditions || !relayer) return + if (!intentPreconditions) return const statuses = await Promise.all( intentPreconditions.map(async (precondition) => { try { + const chainId = parseInt(precondition.chainID || '0') + const chainRelayer = getRelayer(chainId) const formattedPrecondition = { ...precondition, data: typeof precondition.data === 'string' ? precondition.data : JSON.stringify(precondition.data), } - return await relayer.checkPrecondition(formattedPrecondition) + return await chainRelayer.checkPrecondition(formattedPrecondition) } catch (error) { console.error('Error checking precondition:', error) return false @@ -273,7 +308,7 @@ export const HomeIndexRoute = () => { ) setPreconditionStatuses(statuses) - }, [intentPreconditions, relayer]) + }, [intentPreconditions, getRelayer]) const commitIntentConfigMutation = useMutation({ mutationFn: async (args: { @@ -718,11 +753,75 @@ export const HomeIndexRoute = () => { if (isSuccess && receipt) { updateMetaTxnStatus(receipt.transactionHash, receipt.status, receipt.gasUsed, receipt.effectiveGasPrice) checkPreconditionStatuses() + + // After origin call is confirmed, send the meta-transaction + const sendMetaTxn = async () => { + if (!intentOperations || !intentPreconditions || !account.address) { + console.error('Missing required data for meta-transaction') + return + } + + try { + // Calculate the intent address + const intentAddress = calculateIntentAddress(intentOperations, account.address) + + // For each operation, send the meta-transaction using the appropriate relayer + for (const operation of intentOperations) { + try { + const chainId = parseInt(operation.chainId) + const chainRelayer = getRelayer(chainId) + + // Encode the operation data + const encodedData = (operation.calls[0].data as `0x${string}`) || ('0x' as `0x${string}`) + + // Send the meta-transaction through the chain-specific relayer + const { opHash } = await chainRelayer.relay( + intentAddress, + encodedData, + BigInt(operation.chainId), + undefined, + intentPreconditions.filter((p) => p.chainID && parseInt(p.chainID) === chainId), + ) + + // Store the opHash in state for monitoring + setOperationHashes((prev) => ({ + ...prev, + [`${operation.chainId}-${intentOperations.indexOf(operation)}`]: opHash, + })) + } catch (error: any) { + console.error('Error sending meta-transaction:', error) + setOperationStatuses((prev) => ({ + ...prev, + [`${operation.chainId}-${intentOperations.indexOf(operation)}`]: { + status: 'failed', + error: error.message, + }, + })) + } + } + } catch (error: any) { + console.error('Error in meta-transaction process:', error) + } + } + + // Execute the meta-transaction sending process + sendMetaTxn() } else if (isError) { console.error('Error waiting for receipt:', receiptError) updateMetaTxnStatus(txnHash, 'reverted', undefined, undefined, receiptError?.message || 'Failed to get receipt') } - }, [isWaitingForReceipt, isSuccess, isError, receipt, txnHash, receiptError]) + }, [ + isWaitingForReceipt, + isSuccess, + isError, + receipt, + txnHash, + receiptError, + intentOperations, + intentPreconditions, + account.address, + getRelayer, + ]) useEffect(() => { if (intentPreconditions) { @@ -955,6 +1054,46 @@ export const HomeIndexRoute = () => { } }, [account.isConnected]) + // Replace the monitoring effect with individual hook calls for each operation + const operation0Status = useMetaTxnMonitor( + operationHashes[`${intentOperations?.[0]?.chainId}-0`], + intentOperations?.[0]?.chainId || '', + intentOperations?.[0] ? getRelayer(parseInt(intentOperations[0].chainId)) : undefined, + ) + + const operation1Status = useMetaTxnMonitor( + operationHashes[`${intentOperations?.[1]?.chainId}-1`], + intentOperations?.[1]?.chainId || '', + intentOperations?.[1] ? getRelayer(parseInt(intentOperations[1].chainId)) : undefined, + ) + + // Update operation statuses when individual operation statuses change + useEffect(() => { + if (!intentOperations) return + + const newStatuses: { + [key: string]: { + status: 'pending' | 'success' | 'failed' + txHash?: string + error?: string + preconditionsMet?: boolean + lastPreconditionCheck?: string + } + } = {} + + if (intentOperations[0]) { + newStatuses[`${intentOperations[0].chainId}-0`] = operation0Status + } + if (intentOperations[1]) { + newStatuses[`${intentOperations[1].chainId}-1`] = operation1Status + } + + setOperationStatuses((prev) => ({ + ...prev, + ...newStatuses, + })) + }, [intentOperations, operation0Status, operation1Status]) + return (
From afba4dd05598915ef3194b224d6948bc7dfa58d9 Mon Sep 17 00:00:00 2001 From: Shun Kakinoki Date: Tue, 22 Apr 2025 17:13:27 +0900 Subject: [PATCH 385/439] Enhance TypeScript configuration and Vite setup for improved module resolution and code organization. Update `tsconfig.app.json` to include path mappings for easier imports, and modify `vite.config.ts` to establish aliasing for the `@` symbol pointing to the `src` directory. Additionally, refactor `useMetaTxnMonitor` in `home-index-route.tsx` to improve transaction monitoring and state management, ensuring better handling of operation statuses and preventing duplicate transactions. --- .../src/hooks/useMetaTxnMonitor.ts | 12 +- extras/demo-anypay/src/hooks/useRelayers.ts | 99 ++++++ .../demo-anypay/src/hooks/useTokenBalances.ts | 93 ++++++ .../src/routes/home/home-index-route.tsx | 305 +++++++----------- extras/demo-anypay/tsconfig.app.json | 5 +- extras/demo-anypay/vite.config.ts | 5 + 6 files changed, 325 insertions(+), 194 deletions(-) create mode 100644 extras/demo-anypay/src/hooks/useRelayers.ts create mode 100644 extras/demo-anypay/src/hooks/useTokenBalances.ts diff --git a/extras/demo-anypay/src/hooks/useMetaTxnMonitor.ts b/extras/demo-anypay/src/hooks/useMetaTxnMonitor.ts index 3f5a28d2f..2c4fc171c 100644 --- a/extras/demo-anypay/src/hooks/useMetaTxnMonitor.ts +++ b/extras/demo-anypay/src/hooks/useMetaTxnMonitor.ts @@ -16,9 +16,14 @@ export const useMetaTxnMonitor = ( const [status, setStatus] = useState({ status: 'pending' }) useEffect(() => { - if (!opHash || !relayer) return + // Reset status when opHash or relayer changes + if (!opHash || !relayer) { + setStatus({ status: 'pending' }) + return + } let isSubscribed = true + let timeoutId: NodeJS.Timeout | undefined const monitorStatus = async () => { try { @@ -37,7 +42,7 @@ export const useMetaTxnMonitor = ( // Continue monitoring if still pending if (currentStatus.status === 'pending' && isSubscribed) { - setTimeout(monitorStatus, 5000) + timeoutId = setTimeout(monitorStatus, 5000) } } catch (error: any) { if (!isSubscribed) return @@ -52,6 +57,9 @@ export const useMetaTxnMonitor = ( return () => { isSubscribed = false + if (timeoutId) { + clearTimeout(timeoutId) + } } }, [opHash, chainId, relayer]) diff --git a/extras/demo-anypay/src/hooks/useRelayers.ts b/extras/demo-anypay/src/hooks/useRelayers.ts new file mode 100644 index 000000000..add06a509 --- /dev/null +++ b/extras/demo-anypay/src/hooks/useRelayers.ts @@ -0,0 +1,99 @@ +import { Relayer } from '@0xsequence/wallet-core' +import { useMemo } from 'react' +import * as chains from 'viem/chains' +import { Chain } from 'viem' + +// Helper to get chain info +const getChain = (chainId: number): Chain => { + const chain = Object.values(chains).find((c: any) => c.id === chainId) + if (!chain) { + throw new Error(`Chain with id ${chainId} not found`) + } + return chain +} + +export type RelayerConfig = { + hostname: string + chainId: number + rpcUrl: string +} + +export const useRelayers = () => { + const relayers = useMemo(() => { + const relayerMap = new Map() + return relayerMap + }, []) + + const getRelayer = (chainId: number): Relayer.Rpc.RpcRelayer => { + let relayer = relayers.get(chainId) + + if (!relayer) { + const chain = getChain(chainId) + const rpcUrl = chain.rpcUrls.default.http[0] + + let relayerUrl + if (import.meta.env.VITE_ENV === 'local') { + // Use specific ports for different chains in local environment + if (chainId === 42161) { + // Arbitrum + relayerUrl = 'http://0.0.0.0:9997' + } else if (chainId === 10) { + // Optimism + relayerUrl = 'http://0.0.0.0:9998' + } else if (chainId === 137) { + // Polygon + relayerUrl = 'http://0.0.0.0:9999' + } else { + relayerUrl = 'http://localhost:4422' + } + } else { + // For cors-anywhere, dev, and production environments + const baseUrl = + import.meta.env.VITE_ENV === 'cors-anywhere' + ? 'http://localhost:8080/https://' + : import.meta.env.VITE_ENV === 'dev' + ? 'https://dev-' + : 'https://' + + // Chain-specific relayer endpoints + if (chainId === 42161) { + // Arbitrum + relayerUrl = `${baseUrl}arbitrum-relayer.sequence.app` + } else if (chainId === 10) { + // Optimism + relayerUrl = `${baseUrl}optimism-relayer.sequence.app` + } else if (chainId === 137) { + // Polygon + relayerUrl = `${baseUrl}polygon-relayer.sequence.app` + } else if (chainId === 8453) { + // Base + relayerUrl = `${baseUrl}base-relayer.sequence.app` + } else if (chainId === 43114) { + // Avalanche + relayerUrl = `${baseUrl}avalanche-relayer.sequence.app` + } else if (chainId === 56) { + // BSC + relayerUrl = `${baseUrl}bsc-relayer.sequence.app` + } else if (chainId === 1) { + // Mainnet + relayerUrl = `${baseUrl}mainnet-relayer.sequence.app` + } else { + // Default fallback + relayerUrl = `${baseUrl}relayer.sequence.app` + } + } + + relayer = new Relayer.Rpc.RpcRelayer(relayerUrl, chainId, rpcUrl) + relayers.set(chainId, relayer) + } + + return relayer + } + + return { + relayers, + getRelayer, + } +} + +export type { Relayer } diff --git a/extras/demo-anypay/src/hooks/useTokenBalances.ts b/extras/demo-anypay/src/hooks/useTokenBalances.ts new file mode 100644 index 000000000..296a77bb4 --- /dev/null +++ b/extras/demo-anypay/src/hooks/useTokenBalances.ts @@ -0,0 +1,93 @@ +import { useIndexerGatewayClient } from '@0xsequence/hooks' +import { ContractVerificationStatus, NativeTokenBalance, TokenBalance } from '@0xsequence/indexer' +import { GetTokenBalancesSummaryReturn } from '@0xsequence/indexer/dist/declarations/src/indexergw.gen' +import { useQuery } from '@tanstack/react-query' +import { Address } from 'ox' +import { useMemo } from 'react' + +// Default empty page info for query fallback +const defaultPage = { page: 1, pageSize: 10, totalRecords: 0, more: false } +// Type guard for native token balance +function isNativeToken(token: TokenBalance | NativeTokenBalance): boolean { + if ('contractAddress' in token) { + return false + } + return true +} + +export const useTokenBalances = (address: Address.Address) => { + const indexerClient = useIndexerGatewayClient() + + // Fetch token balances + const { + data: tokenBalancesData, + isLoading: isLoadingBalances, + error: balanceError, + } = useQuery({ + queryKey: ['tokenBalances', address], + queryFn: async () => { + if (!address) { + console.warn('No account address or indexer client') + return { balances: [], nativeBalances: [], page: defaultPage } as GetTokenBalancesSummaryReturn + } + try { + const summary = await indexerClient.getTokenBalancesSummary({ + filter: { + accountAddresses: [address], + contractStatus: ContractVerificationStatus.VERIFIED, + contractTypes: ['ERC20'], + omitNativeBalances: false, + }, + }) + + return summary + } catch (error) { + console.error('Failed to fetch token balances:', error) + return { balances: [], nativeBalances: [], page: defaultPage } as GetTokenBalancesSummaryReturn + } + }, + enabled: !!address, + staleTime: 30000, + retry: 1, + }) + + const sortedTokens = useMemo(() => { + if (!tokenBalancesData?.balances) { + return [] + } + + // Flatten both native and token balances + const nativeBalances = tokenBalancesData.nativeBalances.flatMap((b) => b.results) + const tokenBalances = tokenBalancesData.balances.flatMap((b) => b.results) + const balances = [...nativeBalances, ...tokenBalances] + + return [...balances] + .filter((token) => { + try { + return BigInt(token.balance) > 0n + } catch { + return false + } + }) + .sort((a, b) => { + if (isNativeToken(a)) return -1 + if (isNativeToken(b)) return 1 + try { + const balanceA = BigInt(a.balance) + const balanceB = BigInt(b.balance) + if (balanceA > balanceB) return -1 + if (balanceA < balanceB) return 1 + return 0 + } catch { + return 0 + } + }) + }, [tokenBalancesData]) + + return { + tokenBalancesData, + isLoadingBalances, + balanceError, + sortedTokens, + } +} diff --git a/extras/demo-anypay/src/routes/home/home-index-route.tsx b/extras/demo-anypay/src/routes/home/home-index-route.tsx index 5e65772e2..c5257ec58 100644 --- a/extras/demo-anypay/src/routes/home/home-index-route.tsx +++ b/extras/demo-anypay/src/routes/home/home-index-route.tsx @@ -1,21 +1,19 @@ -import { useState, useMemo, useEffect, useCallback } from 'react' +import { useState, useEffect, useCallback } from 'react' import { useAccount, useConnect, useDisconnect, useSendTransaction, useSwitchChain } from 'wagmi' import { Connector } from 'wagmi' -import { useIndexerGatewayClient } from '@0xsequence/hooks' -import { NativeTokenBalance, TokenBalance, ContractVerificationStatus } from '@0xsequence/indexer' -import { GetTokenBalancesSummaryReturn } from '@0xsequence/indexer/dist/declarations/src/indexergw.gen' +import { NativeTokenBalance, TokenBalance } from '@0xsequence/indexer' import { GetIntentOperationsReturn, IntentOperation, IntentPrecondition, GetIntentConfigReturn } from '@0xsequence/api' import { formatUnits, Hex, isAddressEqual, zeroAddress } from 'viem' import { useQuery, useMutation } from '@tanstack/react-query' -import { useAPIClient } from '../../hooks/useAPIClient' +import { useAPIClient } from '@/hooks/useAPIClient' import { Button, Text, NetworkImage } from '@0xsequence/design-system' import { AbiFunction, Address, Bytes } from 'ox' import * as chains from 'viem/chains' import { AnyPay } from '@0xsequence/wallet-core' import { Context as ContextLike } from '@0xsequence/wallet-primitives' import { useWaitForTransactionReceipt } from 'wagmi' -import { Relayer } from '@0xsequence/wallet-core' -import { useMetaTxnMonitor } from '../../hooks/useMetaTxnMonitor' +import { useMetaTxnMonitor } from '@/hooks/useMetaTxnMonitor' +import { useRelayers } from '@/hooks/useRelayers' import { AlertTriangle, Loader2, @@ -28,6 +26,7 @@ import { PenSquare, ShieldCheck, } from 'lucide-react' +import { useTokenBalances } from '@/hooks/useTokenBalances' // Helper to get chain info const getChainInfo = (chainId: number) => { @@ -54,14 +53,6 @@ type OriginCallParams = { error?: string } -// Type guard for native token balance -function isNativeToken(token: TokenBalance | NativeTokenBalance): boolean { - if ('contractAddress' in token) { - return false - } - return true -} - // Types for intent actions type IntentAction = 'pay' | 'mock_interaction' | 'custom_call' @@ -123,7 +114,7 @@ export const HomeIndexRoute = () => { tokenAmount: '0', tokenAddress: '0x833589fcd6edb6e08f4c7c32d4f71b54bda02913', // Default to USDC }) - const indexerClient = useIndexerGatewayClient() + const apiClient = useAPIClient() // State declarations @@ -159,79 +150,10 @@ export const HomeIndexRoute = () => { } }>({}) const [operationHashes, setOperationHashes] = useState<{ [key: string]: Hex }>({}) + const [isTransactionInProgress, setIsTransactionInProgress] = useState(false) + const { sortedTokens, isLoadingBalances, balanceError } = useTokenBalances(account.address as Address.Address) - // Default empty page info for query fallback - const defaultPage = { page: 1, pageSize: 10, totalRecords: 0, more: false } - - // Fetch token balances - const { - data: tokenBalancesData, - isLoading: isLoadingBalances, - error: balanceError, - } = useQuery({ - queryKey: ['tokenBalances', account.address], - queryFn: async () => { - if (!account.address) { - console.warn('No account address or indexer client') - return { balances: [], nativeBalances: [], page: defaultPage } as GetTokenBalancesSummaryReturn - } - try { - const summary = await indexerClient.getTokenBalancesSummary({ - filter: { - accountAddresses: [account.address], - contractStatus: ContractVerificationStatus.VERIFIED, - contractTypes: ['ERC20'], - omitNativeBalances: false, - }, - }) - - return summary - } catch (error) { - console.error('Failed to fetch token balances:', error) - return { balances: [], nativeBalances: [], page: defaultPage } as GetTokenBalancesSummaryReturn - } - }, - enabled: !!account.address, - staleTime: 30000, - retry: 1, - }) - - // Relayers setup - const relayers = useMemo(() => { - const relayerMap = new Map() - - // Initialize relayers for each unique chain in intent operations - if (intentOperations) { - const uniqueChainIds = new Set(intentOperations.map((op) => parseInt(op.chainId))) - uniqueChainIds.forEach((chainId) => { - // Get chain-specific RPC URL - let rpcUrl = 'https://node.sequence.app' - const chain = getChainInfo(chainId) - if (chain) { - if (chainId === 42161) rpcUrl = 'https://arbitrum-mainnet.sequence.app' - else if (chainId === 10) rpcUrl = 'https://optimism-mainnet.sequence.app' - else if (chainId === 8453) rpcUrl = 'https://base-mainnet.sequence.app' - else rpcUrl = 'https://node.sequence.app' - } - - relayerMap.set(chainId, new Relayer.Rpc.RpcRelayer('https://relayer.sequence.app', chainId, rpcUrl)) - }) - } - - return relayerMap - }, [intentOperations]) - - // Function to get relayer for a specific chain - const getRelayer = useCallback( - (chainId: number) => { - const chainRelayer = relayers.get(chainId) - if (!chainRelayer) { - throw new Error(`No relayer found for chain ID ${chainId}`) - } - return chainRelayer - }, - [relayers], - ) + const { getRelayer } = useRelayers() const calculateIntentAddress = useCallback((operations: IntentOperation[], mainSigner: string) => { try { @@ -513,39 +435,6 @@ export const HomeIndexRoute = () => { }, }) - const sortedTokens = useMemo(() => { - if (!tokenBalancesData?.balances) { - return [] - } - - // Flatten both native and token balances - const nativeBalances = tokenBalancesData.nativeBalances.flatMap((b) => b.results) - const tokenBalances = tokenBalancesData.balances.flatMap((b) => b.results) - const balances = [...nativeBalances, ...tokenBalances] - - return [...balances] - .filter((token) => { - try { - return BigInt(token.balance) > 0n - } catch { - return false - } - }) - .sort((a, b) => { - if (isNativeToken(a)) return -1 - if (isNativeToken(b)) return 1 - try { - const balanceA = BigInt(a.balance) - const balanceB = BigInt(b.balance) - if (balanceA > balanceB) return -1 - if (balanceA < balanceB) return 1 - return 0 - } catch { - return 0 - } - }) - }, [tokenBalancesData]) - useEffect(() => { if (!account.isConnected) { setSelectedToken(null) @@ -562,6 +451,8 @@ export const HomeIndexRoute = () => { setShowCustomCallForm(false) setCommittedIntentAddress(null) setVerificationStatus(null) + setOperationStatuses({}) + setOperationHashes({}) if (action === 'custom_call') { setShowCustomCallForm(true) } else { @@ -577,10 +468,11 @@ export const HomeIndexRoute = () => { const handleSendOriginCall = async () => { if ( + isTransactionInProgress || // Prevent duplicate transactions !originCallParams || originCallParams.error || !originCallParams.to || - !originCallParams.data || + originCallParams.data === null || originCallParams.value === null || originCallParams.chainId === null ) { @@ -602,35 +494,8 @@ export const HomeIndexRoute = () => { try { console.log('Switching to chain:', originCallParams.chainId) - await switchChain({ chainId: originCallParams.chainId }) - - if (account.chainId !== originCallParams.chainId) { - throw new Error('Chain switch timed out') - } - setIsChainSwitchRequired(false) - - return sendTransaction( - { - to: originCallParams.to, - data: originCallParams.data, - value: originCallParams.value, - chainId: originCallParams.chainId, - }, - { - onSuccess: (hash) => { - console.log('Transaction sent, hash:', hash) - setTxnHash(hash) - }, - onError: (error) => { - console.error('Transaction failed:', error) - if (error.message.includes('User rejected') || error.message.includes('user rejected')) { - setIsAutoExecuteEnabled(false) - } - updateMetaTxnStatus(undefined, 'reverted', undefined, undefined, error.message) - }, - }, - ) + await switchChain({ chainId: originCallParams.chainId }) } catch (error: any) { console.error('Failed to switch chain:', error) if (error.message.includes('User rejected') || error.message.includes('user rejected')) { @@ -644,34 +509,42 @@ export const HomeIndexRoute = () => { `Failed to switch chain: ${error.message || 'Unknown error'}`, ) setIsChainSwitchRequired(false) - return } + return // Stop execution here whether switch succeeded or failed. } - setTxnHash(undefined) - updateMetaTxnStatus(undefined, 'sending') - - return sendTransaction( - { - to: originCallParams.to, - data: originCallParams.data, - value: originCallParams.value, - chainId: originCallParams.chainId, - }, - { - onSuccess: (hash) => { - console.log('Transaction sent, hash:', hash) - setTxnHash(hash) + // Ensure only one transaction is sent at a time + if (!isTransactionInProgress) { + setIsTransactionInProgress(true) // Mark transaction as in progress + setTxnHash(undefined) + updateMetaTxnStatus(undefined, 'sending') + + sendTransaction( + { + to: originCallParams.to, + data: originCallParams.data, + value: originCallParams.value, + chainId: originCallParams.chainId, }, - onError: (error) => { - console.error('Transaction failed:', error) - if (error.message.includes('User rejected') || error.message.includes('user rejected')) { - setIsAutoExecuteEnabled(false) - } - updateMetaTxnStatus(undefined, 'reverted', undefined, undefined, error.message) + { + onSuccess: (hash) => { + console.log('Transaction sent, hash:', hash) + setTxnHash(hash) + setIsTransactionInProgress(false) // Reset transaction state + }, + onError: (error) => { + console.error('Transaction failed:', error) + if (error.message.includes('User rejected') || error.message.includes('user rejected')) { + setIsAutoExecuteEnabled(false) + } + updateMetaTxnStatus(undefined, 'reverted', undefined, undefined, error.message) + setIsTransactionInProgress(false) + }, }, - }, - ) + ) + } else { + console.warn('Transaction already in progress. Skipping duplicate request.') + } } // Remove the chain change effect that might be resetting state @@ -932,41 +805,71 @@ export const HomeIndexRoute = () => { commitIntentConfigMutation.isSuccess, ]) - // Effect to auto-send transaction after successful commit useEffect(() => { if ( isAutoExecuteEnabled && - commitIntentConfigMutation.isSuccess && originCallParams && !originCallParams.error && - !isSendingTransaction && - !isWaitingForReceipt && - !txnHash + account.chainId !== originCallParams.chainId ) { - console.log('Auto-sending transaction after successful commit...') handleSendOriginCall() } + }, [isAutoExecuteEnabled, originCallParams, account.chainId]) + + useEffect(() => { + const shouldAutoSend = + isAutoExecuteEnabled && + commitIntentConfigMutation.isSuccess && + originCallParams?.chainId && + account.chainId === originCallParams.chainId && + !originCallParams.error && + originCallParams.to && + originCallParams.data !== null && + originCallParams.value !== null && + !isSendingTransaction && + !isWaitingForReceipt && + !txnHash && + !isChainSwitchRequired + + if (shouldAutoSend) { + console.log('Auto-executing transaction: All conditions met.') + updateMetaTxnStatus(undefined, 'sending') + + sendTransaction( + { + to: originCallParams.to!, + data: originCallParams.data!, + value: originCallParams.value!, + chainId: originCallParams.chainId!, + }, + { + onSuccess: (hash) => { + console.log('Auto-executed transaction sent, hash:', hash) + setTxnHash(hash) + }, + onError: (error) => { + console.error('Auto-executed transaction failed:', error) + if (error.message.includes('User rejected') || error.message.includes('user rejected')) { + setIsAutoExecuteEnabled(false) + } + updateMetaTxnStatus(undefined, 'reverted', undefined, undefined, error.message) + }, + }, + ) + } + // Update dependencies to include commit success status }, [ isAutoExecuteEnabled, commitIntentConfigMutation.isSuccess, originCallParams, + account.chainId, isSendingTransaction, isWaitingForReceipt, txnHash, + isChainSwitchRequired, + sendTransaction, ]) - // Existing auto-execute effect for chain switching - useEffect(() => { - if ( - isAutoExecuteEnabled && - originCallParams && - !originCallParams.error && - account.chainId !== originCallParams.chainId - ) { - handleSendOriginCall() - } - }, [isAutoExecuteEnabled, originCallParams, account.chainId]) - // Update button text and disabled state for commit button const commitButtonText = commitIntentConfigMutation.isPending ? (
@@ -1094,6 +997,26 @@ export const HomeIndexRoute = () => { })) }, [intentOperations, operation0Status, operation1Status]) + // Effect to cleanup operation statuses and hashes when intent operations are reset + useEffect(() => { + if (!intentOperations) { + setOperationStatuses({}) + setOperationHashes({}) + } + }, [intentOperations]) + + // Effect to cleanup operation statuses and hashes when account disconnects + useEffect(() => { + if (!account.isConnected) { + setOperationStatuses({}) + setOperationHashes({}) + setIntentOperations(null) + setIntentPreconditions(null) + setCommittedIntentAddress(null) + setVerificationStatus(null) + } + }, [account.isConnected]) + return (
diff --git a/extras/demo-anypay/tsconfig.app.json b/extras/demo-anypay/tsconfig.app.json index 55abf71f1..f02ded376 100644 --- a/extras/demo-anypay/tsconfig.app.json +++ b/extras/demo-anypay/tsconfig.app.json @@ -18,7 +18,10 @@ "noUnusedLocals": true, "noUnusedParameters": true, "noFallthroughCasesInSwitch": true, - "noUncheckedSideEffectImports": true + "noUncheckedSideEffectImports": true, + "paths": { + "@/*": ["./src/*"] + } }, "include": ["src"] } diff --git a/extras/demo-anypay/vite.config.ts b/extras/demo-anypay/vite.config.ts index 429f48f94..08439a506 100644 --- a/extras/demo-anypay/vite.config.ts +++ b/extras/demo-anypay/vite.config.ts @@ -9,4 +9,9 @@ export default defineConfig({ // TODO: This shouldn't be needed, fix sdk build include: ['@0xsequence/api', '@0xsequence/wallet-core', '@0xsequence/wallet-primitives', '@0xsequence/wallet-wdk'], }, + resolve: { + alias: { + '@': '/src', + }, + }, }) From 09e77e720eda2ab93aeb259dff2cb5f765d7b4b4 Mon Sep 17 00:00:00 2001 From: Shun Kakinoki Date: Tue, 22 Apr 2025 17:24:32 +0900 Subject: [PATCH 386/439] Improve error handling and validation in HomeIndexRoute for chain ID and relayer checks. Enhance logging for precondition and transaction errors, ensuring clearer feedback during transaction processing. Update operation status management to reflect pending states after successful relay initiation, improving user experience and transaction tracking. --- .../src/routes/home/home-index-route.tsx | 64 +++++++++++++++++-- 1 file changed, 57 insertions(+), 7 deletions(-) diff --git a/extras/demo-anypay/src/routes/home/home-index-route.tsx b/extras/demo-anypay/src/routes/home/home-index-route.tsx index c5257ec58..159eb12a3 100644 --- a/extras/demo-anypay/src/routes/home/home-index-route.tsx +++ b/extras/demo-anypay/src/routes/home/home-index-route.tsx @@ -215,15 +215,30 @@ export const HomeIndexRoute = () => { const statuses = await Promise.all( intentPreconditions.map(async (precondition) => { try { - const chainId = parseInt(precondition.chainID || '0') + const chainIdString = precondition.chainID + if (!chainIdString) { + console.warn('Precondition missing chainID:', precondition) + return false + } + const chainId = parseInt(chainIdString) + if (isNaN(chainId) || chainId <= 0) { + console.warn('Precondition has invalid chainID:', chainIdString, precondition) + return false + } + const chainRelayer = getRelayer(chainId) + if (!chainRelayer) { + console.error(`No relayer found for chainId: ${chainId}`) + return false + } + const formattedPrecondition = { ...precondition, data: typeof precondition.data === 'string' ? precondition.data : JSON.stringify(precondition.data), } return await chainRelayer.checkPrecondition(formattedPrecondition) } catch (error) { - console.error('Error checking precondition:', error) + console.error('Error checking precondition:', error, 'Precondition:', precondition) return false } }), @@ -640,12 +655,33 @@ export const HomeIndexRoute = () => { // For each operation, send the meta-transaction using the appropriate relayer for (const operation of intentOperations) { + const operationKey = `${operation.chainId}-${intentOperations.indexOf(operation)}` try { const chainId = parseInt(operation.chainId) + if (isNaN(chainId) || chainId <= 0) { + throw new Error(`Invalid chainId for operation: ${operation.chainId}`) + } const chainRelayer = getRelayer(chainId) + if (!chainRelayer) { + throw new Error(`No relayer found for chainId: ${chainId}`) + } // Encode the operation data const encodedData = (operation.calls[0].data as `0x${string}`) || ('0x' as `0x${string}`) + const relevantPreconditions = intentPreconditions.filter( + (p) => p.chainID && parseInt(p.chainID) === chainId, + ) + + console.log( + `Relaying operation ${operationKey} to intent ${intentAddress} on chain ${chainId} via relayer:`, + chainRelayer, + ) + console.log(`Relay data:`, { + intentAddress, + encodedData, + chainId: BigInt(chainId), + relevantPreconditions, + }) // Send the meta-transaction through the chain-specific relayer const { opHash } = await chainRelayer.relay( @@ -653,21 +689,35 @@ export const HomeIndexRoute = () => { encodedData, BigInt(operation.chainId), undefined, - intentPreconditions.filter((p) => p.chainID && parseInt(p.chainID) === chainId), + relevantPreconditions, ) // Store the opHash in state for monitoring setOperationHashes((prev) => ({ ...prev, - [`${operation.chainId}-${intentOperations.indexOf(operation)}`]: opHash, + [operationKey]: opHash, + })) + // Update status to pending after successful relay initiation (monitoring will update further) + setOperationStatuses((prev) => ({ + ...prev, + [operationKey]: { ...prev[operationKey], status: 'pending', error: undefined }, })) } catch (error: any) { - console.error('Error sending meta-transaction:', error) + console.error(`Error sending meta-transaction for operation ${operationKey}:`, error) + // Log additional details if available + if (error.cause) { + console.error(`Caused by:`, error.cause) + } + if (error.message.includes('fetch')) { + console.error( + `Fetch error details: Might be network issue, CORS, or invalid relayer URL for chain ${operation.chainId}`, + ) + } setOperationStatuses((prev) => ({ ...prev, - [`${operation.chainId}-${intentOperations.indexOf(operation)}`]: { + [operationKey]: { status: 'failed', - error: error.message, + error: `Relay failed: ${error.message}`, }, })) } From 9813d81f69aa10ea51f43cf944706923487874bf Mon Sep 17 00:00:00 2001 From: Shun Kakinoki Date: Tue, 22 Apr 2025 17:45:52 +0900 Subject: [PATCH 387/439] Update HomeIndexRoute to include a TODO for calling Factory Deploy when encoding operation data. This change aims to clarify the next steps in the transaction processing logic. --- extras/demo-anypay/src/routes/home/home-index-route.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extras/demo-anypay/src/routes/home/home-index-route.tsx b/extras/demo-anypay/src/routes/home/home-index-route.tsx index 159eb12a3..fc30c1569 100644 --- a/extras/demo-anypay/src/routes/home/home-index-route.tsx +++ b/extras/demo-anypay/src/routes/home/home-index-route.tsx @@ -666,7 +666,7 @@ export const HomeIndexRoute = () => { throw new Error(`No relayer found for chainId: ${chainId}`) } - // Encode the operation data + // TODO: Call Factory Deploy here for the encodedData const encodedData = (operation.calls[0].data as `0x${string}`) || ('0x' as `0x${string}`) const relevantPreconditions = intentPreconditions.filter( (p) => p.chainID && parseInt(p.chainID) === chainId, From f21eeffcfb2212e53aa4149936e75082dabd7c18 Mon Sep 17 00:00:00 2001 From: Shun Kakinoki Date: Tue, 22 Apr 2025 20:57:49 +0900 Subject: [PATCH 388/439] Implement meta-transaction state management in HomeIndexRoute. Introduce a new state for meta-transactions and update logic to handle the retrieval and usage of meta-transaction data during intent operations. Enhance logging to provide clearer insights into transaction processing, improving user feedback and tracking. --- .../src/routes/home/home-index-route.tsx | 21 ++- packages/services/api/src/api.gen.ts | 126 ++++++++++-------- 2 files changed, 86 insertions(+), 61 deletions(-) diff --git a/extras/demo-anypay/src/routes/home/home-index-route.tsx b/extras/demo-anypay/src/routes/home/home-index-route.tsx index fc30c1569..a7aff2b21 100644 --- a/extras/demo-anypay/src/routes/home/home-index-route.tsx +++ b/extras/demo-anypay/src/routes/home/home-index-route.tsx @@ -118,6 +118,7 @@ export const HomeIndexRoute = () => { const apiClient = useAPIClient() // State declarations + const [metaTxns, setMetaTxns] = useState(null) const [intentOperations, setIntentOperations] = useState(null) const [intentPreconditions, setIntentPreconditions] = useState( null, @@ -426,6 +427,7 @@ export const HomeIndexRoute = () => { console.log('Calling createIntentConfig with args:', args) const data = await apiClient.getIntentOperations(args) + setMetaTxns(data.calls) setIntentOperations(data.operations) setIntentPreconditions(data.preconditions) setCommittedIntentAddress(null) @@ -644,7 +646,7 @@ export const HomeIndexRoute = () => { // After origin call is confirmed, send the meta-transaction const sendMetaTxn = async () => { - if (!intentOperations || !intentPreconditions || !account.address) { + if (!intentOperations || !intentPreconditions || !metaTxns || !account.address) { console.error('Missing required data for meta-transaction') return } @@ -666,8 +668,13 @@ export const HomeIndexRoute = () => { throw new Error(`No relayer found for chainId: ${chainId}`) } - // TODO: Call Factory Deploy here for the encodedData - const encodedData = (operation.calls[0].data as `0x${string}`) || ('0x' as `0x${string}`) + // Get the matching meta-transaction from metaTxns + const metaTxn = metaTxns.find((m) => parseInt(m.chainId) === chainId) + if (!metaTxn) { + throw new Error(`No meta-transaction found for chainId: ${chainId}`) + } + + // Get the relevant preconditions for the operation const relevantPreconditions = intentPreconditions.filter( (p) => p.chainID && parseInt(p.chainID) === chainId, ) @@ -678,15 +685,15 @@ export const HomeIndexRoute = () => { ) console.log(`Relay data:`, { intentAddress, - encodedData, - chainId: BigInt(chainId), + metaTxns, + chainId, relevantPreconditions, }) // Send the meta-transaction through the chain-specific relayer const { opHash } = await chainRelayer.relay( - intentAddress, - encodedData, + metaTxn?.contract as Address.Address, + metaTxn?.input as Hex, BigInt(operation.chainId), undefined, relevantPreconditions, diff --git a/packages/services/api/src/api.gen.ts b/packages/services/api/src/api.gen.ts index fdb78f2f1..3572557b4 100644 --- a/packages/services/api/src/api.gen.ts +++ b/packages/services/api/src/api.gen.ts @@ -1,5 +1,5 @@ /* eslint-disable */ -// sequence-api v0.4.0 c3504a72fdcc4b28b741446f69815f312bb74dac +// sequence-api v0.4.0 b899c1c0b2af8e48710440cec8b2d2a95acae9d1 // -- // Code generated by webrpc-gen@v0.25.3 with typescript generator. DO NOT EDIT. // @@ -16,7 +16,7 @@ export const WebRPCVersion = 'v1' export const WebRPCSchemaVersion = 'v0.4.0' // Schema hash generated from your RIDL schema -export const WebRPCSchemaHash = 'c3504a72fdcc4b28b741446f69815f312bb74dac' +export const WebRPCSchemaHash = 'b899c1c0b2af8e48710440cec8b2d2a95acae9d1' type WebrpcGenVersions = { webrpcGenVersion: string @@ -174,6 +174,13 @@ export interface Friend { createdAt?: string } +export interface MetaTxn { + chainId: string + walletAddress: string + contract: string + input: string +} + export interface IntentCall { to: string value?: string @@ -234,12 +241,6 @@ export interface TupleComponent { value: any } -export interface IntentQuote { - intentAddress: string - originCall: OriginCall - preconditions: Array -} - export interface OriginCall { chainId: number to: string @@ -253,25 +254,6 @@ export interface IntentPrecondition { data: any } -export interface IntentSolution { - transactions: Array -} - -export interface Transactions { - chainID: string - transactions: Array - preconditions?: Array -} - -export interface Transaction { - delegateCall: boolean - revertOnError: boolean - gasLimit: string - target: string - value: string - data: string -} - export interface UserStorage { userAddress: string key: string @@ -522,6 +504,19 @@ export interface SwapQuote { approveData: string } +export interface SwapQuoteV2 { + currencyAddress: string + currencyBalance: string + price: string + maxPrice: string + to: string + transactionData: string + transactionValue: string + approveData: string + amount: string + amountMin: string +} + export interface CurrencyGroup { name: string tokens: Array @@ -1039,6 +1034,8 @@ export interface API { getSwapPrices(args: GetSwapPricesArgs, headers?: object, signal?: AbortSignal): Promise getSwapQuote(args: GetSwapQuoteArgs, headers?: object, signal?: AbortSignal): Promise getSwapQuoteV2(args: GetSwapQuoteV2Args, headers?: object, signal?: AbortSignal): Promise + getLifiChains(headers?: object, signal?: AbortSignal): Promise + getLifiTokens(args: GetLifiTokensArgs, headers?: object, signal?: AbortSignal): Promise /** * * Chain abstraction @@ -1055,7 +1052,6 @@ export interface API { signal?: AbortSignal, ): Promise getIntentConfig(args: GetIntentConfigArgs, headers?: object, signal?: AbortSignal): Promise - intentQuery(args: IntentQueryArgs, headers?: object, signal?: AbortSignal): Promise /** * * Inventory, payments and management @@ -1659,14 +1655,27 @@ export interface GetSwapQuoteV2Args { userAddress: string buyCurrencyAddress: string sellCurrencyAddress: string - buyAmount: string + buyAmount?: string + sellAmount?: string chainId: number includeApprove: boolean slippagePercentage?: number } export interface GetSwapQuoteV2Return { - swapQuote: SwapQuote + swapQuote: SwapQuoteV2 +} +export interface GetLifiChainsArgs {} + +export interface GetLifiChainsReturn { + chains: Array +} +export interface GetLifiTokensArgs { + chainIds: Array +} + +export interface GetLifiTokensReturn { + tokens: Array } export interface GetIntentOperationsArgs { userAddress: string @@ -1683,6 +1692,7 @@ export interface GetIntentOperationsArgs { export interface GetIntentOperationsReturn { operations: Array preconditions: Array + calls: Array } export interface CommitIntentConfigArgs { walletAddress: string @@ -1701,14 +1711,6 @@ export interface GetIntentConfigArgs { export interface GetIntentConfigReturn { config: IntentConfig } -export interface IntentQueryArgs { - wallet: string - preconditions: Array -} - -export interface IntentQueryReturn { - solutions: Array -} export interface ListCurrencyGroupsArgs {} export interface ListCurrencyGroupsReturn { @@ -3029,7 +3031,37 @@ export class API implements API { (res) => { return buildResponse(res).then((_data) => { return { - swapQuote: _data.swapQuote, + swapQuote: _data.swapQuote, + } + }) + }, + (error) => { + throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) + }, + ) + } + + getLifiChains = (headers?: object, signal?: AbortSignal): Promise => { + return this.fetch(this.url('GetLifiChains'), createHTTPRequest({}, headers, signal)).then( + (res) => { + return buildResponse(res).then((_data) => { + return { + chains: >_data.chains, + } + }) + }, + (error) => { + throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) + }, + ) + } + + getLifiTokens = (args: GetLifiTokensArgs, headers?: object, signal?: AbortSignal): Promise => { + return this.fetch(this.url('GetLifiTokens'), createHTTPRequest(args, headers, signal)).then( + (res) => { + return buildResponse(res).then((_data) => { + return { + tokens: >_data.tokens, } }) }, @@ -3050,6 +3082,7 @@ export class API implements API { return { operations: >_data.operations, preconditions: >_data.preconditions, + calls: >_data.calls, } }) }, @@ -3097,21 +3130,6 @@ export class API implements API { ) } - intentQuery = (args: IntentQueryArgs, headers?: object, signal?: AbortSignal): Promise => { - return this.fetch(this.url('IntentQuery'), createHTTPRequest(args, headers, signal)).then( - (res) => { - return buildResponse(res).then((_data) => { - return { - solutions: >_data.solutions, - } - }) - }, - (error) => { - throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) - }, - ) - } - listCurrencyGroups = (headers?: object, signal?: AbortSignal): Promise => { return this.fetch(this.url('ListCurrencyGroups'), createHTTPRequest({}, headers, signal)).then( (res) => { From cda32531d19a9249fe51763c2305f7423dfd9d37 Mon Sep 17 00:00:00 2001 From: Shun Kakinoki Date: Tue, 22 Apr 2025 23:18:42 +0900 Subject: [PATCH 389/439] Refactor HomeIndexRoute to utilize meta-transactions correctly. Update state management to reflect meta-transactions instead of calls, enhancing the UI to display meta-transaction details. Improve success and error handling logic to ensure accurate state updates and user feedback during transaction processing. --- .../src/routes/home/home-index-route.tsx | 80 ++++++++++++++++++- packages/services/api/src/api.gen.ts | 8 +- 2 files changed, 81 insertions(+), 7 deletions(-) diff --git a/extras/demo-anypay/src/routes/home/home-index-route.tsx b/extras/demo-anypay/src/routes/home/home-index-route.tsx index a7aff2b21..ad51d376e 100644 --- a/extras/demo-anypay/src/routes/home/home-index-route.tsx +++ b/extras/demo-anypay/src/routes/home/home-index-route.tsx @@ -118,7 +118,7 @@ export const HomeIndexRoute = () => { const apiClient = useAPIClient() // State declarations - const [metaTxns, setMetaTxns] = useState(null) + const [metaTxns, setMetaTxns] = useState(null) const [intentOperations, setIntentOperations] = useState(null) const [intentPreconditions, setIntentPreconditions] = useState( null, @@ -427,7 +427,7 @@ export const HomeIndexRoute = () => { console.log('Calling createIntentConfig with args:', args) const data = await apiClient.getIntentOperations(args) - setMetaTxns(data.calls) + setMetaTxns(data.metaTxns) setIntentOperations(data.operations) setIntentPreconditions(data.preconditions) setCommittedIntentAddress(null) @@ -436,19 +436,30 @@ export const HomeIndexRoute = () => { }, onSuccess: (data) => { console.log('Intent Config Success:', data) - if (data && data.operations && data.operations.length > 0) { + if ( + data && + data.operations && + data.operations.length > 0 && + data.preconditions && + data.preconditions.length > 0 && + data.metaTxns && + data.metaTxns.length > 0 + ) { setIntentOperations(data.operations) setIntentPreconditions(data.preconditions) + setMetaTxns(data.metaTxns) } else { console.warn('API returned success but no operations found.') setIntentOperations(null) setIntentPreconditions(null) + setMetaTxns(null) } }, onError: (error) => { console.error('Intent Config Error:', error) setIntentOperations(null) setIntentPreconditions(null) + setMetaTxns(null) }, }) @@ -457,6 +468,7 @@ export const HomeIndexRoute = () => { setSelectedToken(null) setIntentOperations(null) setIntentPreconditions(null) + setMetaTxns(null) setCommittedIntentAddress(null) setVerificationStatus(null) } @@ -465,6 +477,7 @@ export const HomeIndexRoute = () => { const handleActionClick = (action: IntentAction) => { setIntentOperations(null) setIntentPreconditions(null) + setMetaTxns(null) setShowCustomCallForm(false) setCommittedIntentAddress(null) setVerificationStatus(null) @@ -1069,6 +1082,7 @@ export const HomeIndexRoute = () => { setOperationHashes({}) setIntentOperations(null) setIntentPreconditions(null) + setMetaTxns(null) setCommittedIntentAddress(null) setVerificationStatus(null) } @@ -1236,6 +1250,7 @@ export const HomeIndexRoute = () => { } setIntentOperations(null) setIntentPreconditions(null) + setMetaTxns(null) setCommittedIntentAddress(null) setVerificationStatus(null) }} @@ -1526,6 +1541,65 @@ export const HomeIndexRoute = () => { (List of operations that are pre-authorized to be executed): + + {/* Add Meta-transactions Section */} + {metaTxns && metaTxns.length > 0 && ( +
+ + + Meta-transactions + + (Transactions that will be relayed): + + +
+ {metaTxns.map((tx, index) => ( +
+
+
+ + Contract: + {tx.contract} + +
+
+ + Chain ID: + {tx.chainId} + + + {getChainInfo(parseInt(tx.chainId))?.name || 'Unknown Chain'} + + +
+
+ +
+ Input Data: +
+ {tx.input || '0x'} +
+
+
+
+
+
+ ))} +
+
+ )} + {intentOperations && intentOperations.length > 0 ? (
{intentOperations.map((operation, index) => ( diff --git a/packages/services/api/src/api.gen.ts b/packages/services/api/src/api.gen.ts index 3572557b4..a07b4458a 100644 --- a/packages/services/api/src/api.gen.ts +++ b/packages/services/api/src/api.gen.ts @@ -1,5 +1,5 @@ /* eslint-disable */ -// sequence-api v0.4.0 b899c1c0b2af8e48710440cec8b2d2a95acae9d1 +// sequence-api v0.4.0 c90d4d706cfe0e9017775344b8989fb4bf88a22a // -- // Code generated by webrpc-gen@v0.25.3 with typescript generator. DO NOT EDIT. // @@ -16,7 +16,7 @@ export const WebRPCVersion = 'v1' export const WebRPCSchemaVersion = 'v0.4.0' // Schema hash generated from your RIDL schema -export const WebRPCSchemaHash = 'b899c1c0b2af8e48710440cec8b2d2a95acae9d1' +export const WebRPCSchemaHash = 'c90d4d706cfe0e9017775344b8989fb4bf88a22a' type WebrpcGenVersions = { webrpcGenVersion: string @@ -1692,7 +1692,7 @@ export interface GetIntentOperationsArgs { export interface GetIntentOperationsReturn { operations: Array preconditions: Array - calls: Array + metaTxns: Array } export interface CommitIntentConfigArgs { walletAddress: string @@ -3082,7 +3082,7 @@ export class API implements API { return { operations: >_data.operations, preconditions: >_data.preconditions, - calls: >_data.calls, + metaTxns: >_data.metaTxns, } }) }, From 7592425f740889e862206d3d1e7b7c269b7ab6a3 Mon Sep 17 00:00:00 2001 From: Shun Kakinoki Date: Wed, 23 Apr 2025 14:35:50 +0900 Subject: [PATCH 390/439] Refactor API type definitions and improve code consistency in api.gen.ts. Update string literals to use double quotes, enhance type annotations, and streamline function implementations for better readability and maintainability. Additionally, ensure consistent formatting across interfaces and enums. From 35634900748c706a0ecd380dfa9a787185c7c74b Mon Sep 17 00:00:00 2001 From: Shun Kakinoki Date: Wed, 23 Apr 2025 15:31:26 +0900 Subject: [PATCH 391/439] Refactor HomeIndexRoute and API type definitions for consistency and clarity. Update chain ID references to use 'chainId' for uniformity across the codebase. Enhance logging for precondition checks and improve type annotations in api.gen.ts. Additionally, modify Vite configuration to force dependency optimization, ensuring smoother builds. --- .../src/routes/home/home-index-route.tsx | 32 ++++++++++++------- extras/demo-anypay/vite.config.ts | 1 + packages/services/api/src/api.gen.ts | 6 ++-- packages/wallet/core/src/relayer/rpc/index.ts | 2 +- .../core/src/relayer/rpc/relayer.gen.ts | 6 ++-- pnpm-lock.yaml | 3 -- 6 files changed, 28 insertions(+), 22 deletions(-) diff --git a/extras/demo-anypay/src/routes/home/home-index-route.tsx b/extras/demo-anypay/src/routes/home/home-index-route.tsx index ad51d376e..1d4ee10c7 100644 --- a/extras/demo-anypay/src/routes/home/home-index-route.tsx +++ b/extras/demo-anypay/src/routes/home/home-index-route.tsx @@ -216,14 +216,14 @@ export const HomeIndexRoute = () => { const statuses = await Promise.all( intentPreconditions.map(async (precondition) => { try { - const chainIdString = precondition.chainID + const chainIdString = precondition.chainId if (!chainIdString) { - console.warn('Precondition missing chainID:', precondition) + console.warn('Precondition missing chainId:', precondition) return false } const chainId = parseInt(chainIdString) if (isNaN(chainId) || chainId <= 0) { - console.warn('Precondition has invalid chainID:', chainIdString, precondition) + console.warn('Precondition has invalid chainId:', chainIdString, precondition) return false } @@ -233,11 +233,11 @@ export const HomeIndexRoute = () => { return false } - const formattedPrecondition = { + const normalizedPrecondition = { ...precondition, data: typeof precondition.data === 'string' ? precondition.data : JSON.stringify(precondition.data), } - return await chainRelayer.checkPrecondition(formattedPrecondition) + return await chainRelayer.checkPrecondition(normalizedPrecondition) } catch (error) { console.error('Error checking precondition:', error, 'Precondition:', precondition) return false @@ -427,12 +427,23 @@ export const HomeIndexRoute = () => { console.log('Calling createIntentConfig with args:', args) const data = await apiClient.getIntentOperations(args) + console.log('Intent Operations:', data) + + // Normalize preconditions to use chainId + const normalizedPreconditions = data.preconditions?.map((precondition) => ({ + ...precondition, + chainId: precondition.chainId || precondition.chainId, // Use existing chainId or convert chainId + })) + setMetaTxns(data.metaTxns) setIntentOperations(data.operations) - setIntentPreconditions(data.preconditions) + setIntentPreconditions(normalizedPreconditions) setCommittedIntentAddress(null) setVerificationStatus(null) - return data + return { + ...data, + preconditions: normalizedPreconditions, + } }, onSuccess: (data) => { console.log('Intent Config Success:', data) @@ -689,7 +700,7 @@ export const HomeIndexRoute = () => { // Get the relevant preconditions for the operation const relevantPreconditions = intentPreconditions.filter( - (p) => p.chainID && parseInt(p.chainID) === chainId, + (p) => p.chainId && parseInt(p.chainId) === chainId, ) console.log( @@ -794,9 +805,7 @@ export const HomeIndexRoute = () => { if (isNative) { const nativePrecondition = intentPreconditions.find( (p) => - (p.type === 'transfer-native' || p.type === 'native-balance') && - // @ts-expect-error - p.chainId === originChainId.toString(), + (p.type === 'transfer-native' || p.type === 'native-balance') && p.chainId === originChainId.toString(), ) const nativeMinAmount = nativePrecondition?.data?.minAmount ?? nativePrecondition?.data?.min if (nativeMinAmount === undefined) { @@ -808,7 +817,6 @@ export const HomeIndexRoute = () => { const erc20Precondition = intentPreconditions.find( (p) => p.type === 'erc20-balance' && - // @ts-expect-error p.chainId === originChainId.toString() && p.data?.token && isAddressEqual(Address.from(p.data.token), Address.from(selectedToken.contractAddress)), diff --git a/extras/demo-anypay/vite.config.ts b/extras/demo-anypay/vite.config.ts index 08439a506..a69560ccf 100644 --- a/extras/demo-anypay/vite.config.ts +++ b/extras/demo-anypay/vite.config.ts @@ -6,6 +6,7 @@ import tailwindcss from '@tailwindcss/vite' export default defineConfig({ plugins: [react(), tailwindcss()], optimizeDeps: { + force: true, // TODO: This shouldn't be needed, fix sdk build include: ['@0xsequence/api', '@0xsequence/wallet-core', '@0xsequence/wallet-primitives', '@0xsequence/wallet-wdk'], }, diff --git a/packages/services/api/src/api.gen.ts b/packages/services/api/src/api.gen.ts index a07b4458a..0e2db119c 100644 --- a/packages/services/api/src/api.gen.ts +++ b/packages/services/api/src/api.gen.ts @@ -1,5 +1,5 @@ /* eslint-disable */ -// sequence-api v0.4.0 c90d4d706cfe0e9017775344b8989fb4bf88a22a +// sequence-api v0.4.0 adf12648b2b2f6d829f8ec715afd165fdd5d8636 // -- // Code generated by webrpc-gen@v0.25.3 with typescript generator. DO NOT EDIT. // @@ -16,7 +16,7 @@ export const WebRPCVersion = 'v1' export const WebRPCSchemaVersion = 'v0.4.0' // Schema hash generated from your RIDL schema -export const WebRPCSchemaHash = 'c90d4d706cfe0e9017775344b8989fb4bf88a22a' +export const WebRPCSchemaHash = 'adf12648b2b2f6d829f8ec715afd165fdd5d8636' type WebrpcGenVersions = { webrpcGenVersion: string @@ -250,7 +250,7 @@ export interface OriginCall { export interface IntentPrecondition { type: string - chainID: string + chainId: string data: any } diff --git a/packages/wallet/core/src/relayer/rpc/index.ts b/packages/wallet/core/src/relayer/rpc/index.ts index 137ca247b..a1190edf2 100644 --- a/packages/wallet/core/src/relayer/rpc/index.ts +++ b/packages/wallet/core/src/relayer/rpc/index.ts @@ -338,7 +338,7 @@ export class RpcRelayer implements Relayer { return { type: type, - chainID: chainIdStr, + chainId: chainIdStr, data: mappedData, } } diff --git a/packages/wallet/core/src/relayer/rpc/relayer.gen.ts b/packages/wallet/core/src/relayer/rpc/relayer.gen.ts index f02460020..188e2cfb8 100644 --- a/packages/wallet/core/src/relayer/rpc/relayer.gen.ts +++ b/packages/wallet/core/src/relayer/rpc/relayer.gen.ts @@ -1,5 +1,5 @@ /* eslint-disable */ -// sequence-relayer v0.4.1 a463e842ad84863fe9b22f12a8ece89771f20610 +// sequence-relayer v0.4.1 21533968fc37ec3f4c11628f97ffca4049919dd0 // -- // Code generated by webrpc-gen@v0.24.0 with typescript generator. DO NOT EDIT. // @@ -16,7 +16,7 @@ export const WebRPCVersion = 'v1' export const WebRPCSchemaVersion = 'v0.4.1' // Schema hash generated from your RIDL schema -export const WebRPCSchemaHash = 'a463e842ad84863fe9b22f12a8ece89771f20610' +export const WebRPCSchemaHash = '21533968fc37ec3f4c11628f97ffca4049919dd0' type WebrpcGenVersions = { webrpcGenVersion: string @@ -241,7 +241,7 @@ export interface MetaTxnReceiptLog { export interface IntentPrecondition { type: string - chainID: string + chainId: string data: any } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index db43f26e5..90329a2dc 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -47,9 +47,6 @@ importers: '@0xsequence/network': specifier: ^2.3.9 version: 2.3.9(ethers@6.13.5(bufferutil@4.0.9)(utf-8-validate@5.0.10)) - '@0xsequence/relayer': - specifier: workspace:* - version: link:../../packages/services/relayer '@0xsequence/wagmi-connector': specifier: ^4.0.1 version: 4.0.1(0xsequence@2.3.8(ethers@6.13.5(bufferutil@4.0.9)(utf-8-validate@5.0.10)))(ethers@6.13.5(bufferutil@4.0.9)(utf-8-validate@5.0.10))(viem@2.27.2(bufferutil@4.0.9)(typescript@5.7.3)(utf-8-validate@5.0.10)(zod@3.24.2))(wagmi@2.14.16(@tanstack/query-core@5.74.3)(@tanstack/react-query@5.74.3(react@19.0.0))(@types/react@19.1.2)(bufferutil@4.0.9)(react@19.0.0)(typescript@5.7.3)(utf-8-validate@5.0.10)(viem@2.27.2(bufferutil@4.0.9)(typescript@5.7.3)(utf-8-validate@5.0.10)(zod@3.24.2))(zod@3.24.2)) From f8783e1c16f6ffd95a3c4e5bf28d98731c819fae Mon Sep 17 00:00:00 2001 From: Shun Kakinoki Date: Wed, 23 Apr 2025 15:36:24 +0900 Subject: [PATCH 392/439] Refactor precondition handling in HomeIndexRoute to simplify the check by removing unnecessary normalization of precondition data. This change enhances code clarity and maintains the integrity of precondition checks. --- extras/demo-anypay/src/routes/home/home-index-route.tsx | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/extras/demo-anypay/src/routes/home/home-index-route.tsx b/extras/demo-anypay/src/routes/home/home-index-route.tsx index 1d4ee10c7..d0ad72b17 100644 --- a/extras/demo-anypay/src/routes/home/home-index-route.tsx +++ b/extras/demo-anypay/src/routes/home/home-index-route.tsx @@ -233,11 +233,7 @@ export const HomeIndexRoute = () => { return false } - const normalizedPrecondition = { - ...precondition, - data: typeof precondition.data === 'string' ? precondition.data : JSON.stringify(precondition.data), - } - return await chainRelayer.checkPrecondition(normalizedPrecondition) + return await chainRelayer.checkPrecondition(precondition) } catch (error) { console.error('Error checking precondition:', error, 'Precondition:', precondition) return false From 29e8fbead1a46328f14a7fcb3ca4b9be3c3bff31 Mon Sep 17 00:00:00 2001 From: Shun Kakinoki Date: Wed, 23 Apr 2025 15:43:57 +0900 Subject: [PATCH 393/439] Enhance precondition status checks in HomeIndexRoute by adding a useEffect to trigger status verification when intentPreconditions are updated. This improves the responsiveness of the component to changes in precondition data, ensuring accurate state management during transaction processing. --- extras/demo-anypay/src/routes/home/home-index-route.tsx | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/extras/demo-anypay/src/routes/home/home-index-route.tsx b/extras/demo-anypay/src/routes/home/home-index-route.tsx index d0ad72b17..4d46a9434 100644 --- a/extras/demo-anypay/src/routes/home/home-index-route.tsx +++ b/extras/demo-anypay/src/routes/home/home-index-route.tsx @@ -244,6 +244,12 @@ export const HomeIndexRoute = () => { setPreconditionStatuses(statuses) }, [intentPreconditions, getRelayer]) + useEffect(() => { + if (intentPreconditions && intentPreconditions.length > 0) { + checkPreconditionStatuses() + } + }, [intentPreconditions, checkPreconditionStatuses]) + const commitIntentConfigMutation = useMutation({ mutationFn: async (args: { walletAddress: string @@ -662,7 +668,6 @@ export const HomeIndexRoute = () => { } if (isSuccess && receipt) { updateMetaTxnStatus(receipt.transactionHash, receipt.status, receipt.gasUsed, receipt.effectiveGasPrice) - checkPreconditionStatuses() // After origin call is confirmed, send the meta-transaction const sendMetaTxn = async () => { From 201f0f8933cd8088a41ab29e912ecbd343d800c1 Mon Sep 17 00:00:00 2001 From: Shun Kakinoki Date: Wed, 23 Apr 2025 15:49:46 +0900 Subject: [PATCH 394/439] Refactor HomeIndexRoute to streamline precondition checks and enhance UI for meta-transactions. Removed redundant useEffect for precondition status verification and reorganized the display of meta-transaction details, improving clarity and user experience. --- .../src/routes/home/home-index-route.tsx | 129 +++++++++--------- 1 file changed, 63 insertions(+), 66 deletions(-) diff --git a/extras/demo-anypay/src/routes/home/home-index-route.tsx b/extras/demo-anypay/src/routes/home/home-index-route.tsx index 4d46a9434..681870be0 100644 --- a/extras/demo-anypay/src/routes/home/home-index-route.tsx +++ b/extras/demo-anypay/src/routes/home/home-index-route.tsx @@ -245,7 +245,8 @@ export const HomeIndexRoute = () => { }, [intentPreconditions, getRelayer]) useEffect(() => { - if (intentPreconditions && intentPreconditions.length > 0) { + // TODO: Remove this once we have a way to check precondition statuses + if (false) { checkPreconditionStatuses() } }, [intentPreconditions, checkPreconditionStatuses]) @@ -778,12 +779,6 @@ export const HomeIndexRoute = () => { getRelayer, ]) - useEffect(() => { - if (intentPreconditions) { - checkPreconditionStatuses() - } - }, [intentPreconditions, checkPreconditionStatuses]) - useEffect(() => { if (!intentOperations?.[0]?.chainId || !selectedToken || !intentPreconditions || !account.address) { setOriginCallParams(null) @@ -1551,64 +1546,7 @@ export const HomeIndexRoute = () => { - {/* Add Meta-transactions Section */} - {metaTxns && metaTxns.length > 0 && ( -
- - - Meta-transactions - - (Transactions that will be relayed): - - -
- {metaTxns.map((tx, index) => ( -
-
-
- - Contract: - {tx.contract} - -
-
- - Chain ID: - {tx.chainId} - - - {getChainInfo(parseInt(tx.chainId))?.name || 'Unknown Chain'} - - -
-
- -
- Input Data: -
- {tx.input || '0x'} -
-
-
-
-
-
- ))} -
-
- )} - + {/* Intent Operations Section */} {intentOperations && intentOperations.length > 0 ? (
{intentOperations.map((operation, index) => ( @@ -1671,11 +1609,70 @@ export const HomeIndexRoute = () => { ) : (
- No origin call details available. + No operations available.
)} + {/* Meta-transactions Section */} + {metaTxns && metaTxns.length > 0 && ( +
+ + + Meta-transactions + + (Transactions that will be relayed): + + +
+ {metaTxns.map((tx, index) => ( +
+
+
+ + Contract: + {tx.contract} + +
+
+ + Chain ID: + {tx.chainId} + + + {getChainInfo(parseInt(tx.chainId))?.name || 'Unknown Chain'} + + +
+
+ +
+ Input Data: +
+ {tx.input || '0x'} +
+
+
+
+
+
+ ))} +
+
+ )} + + {/* Preconditions Section */} {intentPreconditions && intentPreconditions.length > 0 && ( <> Date: Wed, 23 Apr 2025 21:37:37 +0900 Subject: [PATCH 395/439] Implement meta-transaction retry logic in HomeIndexRoute by tracking timestamps of sent transactions. Introduce a retry window to prevent immediate resending of transactions, enhancing transaction management and user feedback during processing. --- .../src/routes/home/home-index-route.tsx | 31 +++++++++++++++++-- 1 file changed, 29 insertions(+), 2 deletions(-) diff --git a/extras/demo-anypay/src/routes/home/home-index-route.tsx b/extras/demo-anypay/src/routes/home/home-index-route.tsx index 681870be0..1e76926b8 100644 --- a/extras/demo-anypay/src/routes/home/home-index-route.tsx +++ b/extras/demo-anypay/src/routes/home/home-index-route.tsx @@ -154,13 +154,18 @@ export const HomeIndexRoute = () => { const [isTransactionInProgress, setIsTransactionInProgress] = useState(false) const { sortedTokens, isLoadingBalances, balanceError } = useTokenBalances(account.address as Address.Address) + // Track timestamps of when each meta-transaction was last sent + const [sentMetaTxns, setSentMetaTxns] = useState<{ [key: string]: number }>({}) + + const RETRY_WINDOW_MS = 10_000 + const { getRelayer } = useRelayers() const calculateIntentAddress = useCallback((operations: IntentOperation[], mainSigner: string) => { try { const context: ContextLike.Context = { - factory: '0xBd0F8abD58B4449B39C57Ac9D5C67433239aC447' as `0x${string}`, - stage1: '0x656e2d390E76f3Fba9f0770Dd0EcF4707eee3dF1' as `0x${string}`, + factory: '0x4B755c6A321C86bD35bBbb5CD56321FE48b51d1e' as `0x${string}`, + stage1: '0x006FFf4932D4ad20aacD34E5Cc6CCf0644cbB099' as `0x${string}`, creationCode: '0x603e600e3d39601e805130553df33d3d34601c57363d3d373d363d30545af43d82803e903d91601c57fd5bf3' as `0x${string}`, } @@ -661,6 +666,7 @@ export const HomeIndexRoute = () => { useEffect(() => { if (!txnHash) { setMetaTxnStatus(null) + setSentMetaTxns({}) return } if (isWaitingForReceipt) { @@ -684,6 +690,18 @@ export const HomeIndexRoute = () => { // For each operation, send the meta-transaction using the appropriate relayer for (const operation of intentOperations) { const operationKey = `${operation.chainId}-${intentOperations.indexOf(operation)}` + const lastSentTime = sentMetaTxns[operationKey] + const now = Date.now() + + // Skip if this meta transaction has been sent within the retry window + if (lastSentTime && now - lastSentTime < RETRY_WINDOW_MS) { + const timeLeft = Math.ceil((RETRY_WINDOW_MS - (now - lastSentTime)) / 1000) + console.log( + `Meta transaction for operation ${operationKey} was sent recently. Wait ${timeLeft}s before retry`, + ) + continue + } + try { const chainId = parseInt(operation.chainId) if (isNaN(chainId) || chainId <= 0) { @@ -725,6 +743,12 @@ export const HomeIndexRoute = () => { relevantPreconditions, ) + // Record the timestamp when this meta transaction was sent + setSentMetaTxns((prev) => ({ + ...prev, + [operationKey]: Date.now(), + })) + // Store the opHash in state for monitoring setOperationHashes((prev) => ({ ...prev, @@ -746,6 +770,7 @@ export const HomeIndexRoute = () => { `Fetch error details: Might be network issue, CORS, or invalid relayer URL for chain ${operation.chainId}`, ) } + // Don't update the timestamp on error - this allows immediate retry on error setOperationStatuses((prev) => ({ ...prev, [operationKey]: { @@ -777,6 +802,8 @@ export const HomeIndexRoute = () => { intentPreconditions, account.address, getRelayer, + sentMetaTxns, + metaTxns, ]) useEffect(() => { From 2297a8529999ce7a9366917375de9f62a6cb917f Mon Sep 17 00:00:00 2001 From: Shun Kakinoki Date: Wed, 23 Apr 2025 21:59:23 +0900 Subject: [PATCH 396/439] Refactor HomeIndexRoute to simplify intent operations handling by removing unnecessary normalization of preconditions. Update state management to directly use precondition data from the API response, enhancing code clarity and maintaining accurate transaction processing. --- .../src/routes/home/home-index-route.tsx | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) diff --git a/extras/demo-anypay/src/routes/home/home-index-route.tsx b/extras/demo-anypay/src/routes/home/home-index-route.tsx index 1e76926b8..13412128f 100644 --- a/extras/demo-anypay/src/routes/home/home-index-route.tsx +++ b/extras/demo-anypay/src/routes/home/home-index-route.tsx @@ -433,25 +433,14 @@ export const HomeIndexRoute = () => { : destinationCall.transactionValue, } - console.log('Calling createIntentConfig with args:', args) const data = await apiClient.getIntentOperations(args) - console.log('Intent Operations:', data) - - // Normalize preconditions to use chainId - const normalizedPreconditions = data.preconditions?.map((precondition) => ({ - ...precondition, - chainId: precondition.chainId || precondition.chainId, // Use existing chainId or convert chainId - })) setMetaTxns(data.metaTxns) setIntentOperations(data.operations) - setIntentPreconditions(normalizedPreconditions) + setIntentPreconditions(data.preconditions) setCommittedIntentAddress(null) setVerificationStatus(null) - return { - ...data, - preconditions: normalizedPreconditions, - } + return data }, onSuccess: (data) => { console.log('Intent Config Success:', data) From b72a581db27931badb0d00ce28cb78c707254179 Mon Sep 17 00:00:00 2001 From: Shun Kakinoki Date: Wed, 23 Apr 2025 22:18:26 +0900 Subject: [PATCH 397/439] Refactor API type definitions in api.gen.ts to enhance consistency and readability. Update string literals to use double quotes, streamline function implementations, and improve type annotations across interfaces and enums. Additionally, ensure consistent formatting and punctuation throughout the file. From ee6c9a41129e45f235071b949f6573886cadde6e Mon Sep 17 00:00:00 2001 From: Shun Kakinoki Date: Wed, 23 Apr 2025 22:30:11 +0900 Subject: [PATCH 398/439] Enhance HomeIndexRoute with comprehensive meta-transaction management. Introduce state tracking for meta-transaction statuses, enabling better user feedback on transaction progress. Implement manual controls for sending meta-transactions and improve UI to display transaction statuses, including success, failure, and pending states. Refactor related logic for clarity and maintainability. --- .../src/routes/home/home-index-route.tsx | 326 +++++++++++++++--- 1 file changed, 273 insertions(+), 53 deletions(-) diff --git a/extras/demo-anypay/src/routes/home/home-index-route.tsx b/extras/demo-anypay/src/routes/home/home-index-route.tsx index 13412128f..51071505c 100644 --- a/extras/demo-anypay/src/routes/home/home-index-route.tsx +++ b/extras/demo-anypay/src/routes/home/home-index-route.tsx @@ -150,6 +150,13 @@ export const HomeIndexRoute = () => { lastPreconditionCheck?: string } }>({}) + const [metaTxnStatuses, setMetaTxnStatuses] = useState<{ + [key: string]: { + status: 'pending' | 'success' | 'failed' + txHash?: string + error?: string + } + }>({}) const [operationHashes, setOperationHashes] = useState<{ [key: string]: Hex }>({}) const [isTransactionInProgress, setIsTransactionInProgress] = useState(false) const { sortedTokens, isLoadingBalances, balanceError } = useTokenBalances(account.address as Address.Address) @@ -673,94 +680,63 @@ export const HomeIndexRoute = () => { } try { - // Calculate the intent address const intentAddress = calculateIntentAddress(intentOperations, account.address) - // For each operation, send the meta-transaction using the appropriate relayer - for (const operation of intentOperations) { - const operationKey = `${operation.chainId}-${intentOperations.indexOf(operation)}` + for (const metaTxn of metaTxns) { + const operationKey = `${metaTxn.chainId}-${metaTxns.indexOf(metaTxn)}` const lastSentTime = sentMetaTxns[operationKey] const now = Date.now() - // Skip if this meta transaction has been sent within the retry window if (lastSentTime && now - lastSentTime < RETRY_WINDOW_MS) { const timeLeft = Math.ceil((RETRY_WINDOW_MS - (now - lastSentTime)) / 1000) - console.log( - `Meta transaction for operation ${operationKey} was sent recently. Wait ${timeLeft}s before retry`, - ) + console.log(`Meta transaction for ${operationKey} was sent recently. Wait ${timeLeft}s before retry`) continue } try { - const chainId = parseInt(operation.chainId) + const chainId = parseInt(metaTxn.chainId) if (isNaN(chainId) || chainId <= 0) { - throw new Error(`Invalid chainId for operation: ${operation.chainId}`) + throw new Error(`Invalid chainId for meta transaction: ${metaTxn.chainId}`) } const chainRelayer = getRelayer(chainId) if (!chainRelayer) { throw new Error(`No relayer found for chainId: ${chainId}`) } - // Get the matching meta-transaction from metaTxns - const metaTxn = metaTxns.find((m) => parseInt(m.chainId) === chainId) - if (!metaTxn) { - throw new Error(`No meta-transaction found for chainId: ${chainId}`) - } - - // Get the relevant preconditions for the operation const relevantPreconditions = intentPreconditions.filter( (p) => p.chainId && parseInt(p.chainId) === chainId, ) console.log( - `Relaying operation ${operationKey} to intent ${intentAddress} on chain ${chainId} via relayer:`, + `Relaying meta transaction ${operationKey} to intent ${intentAddress} via relayer:`, chainRelayer, ) - console.log(`Relay data:`, { - intentAddress, - metaTxns, - chainId, - relevantPreconditions, - }) - // Send the meta-transaction through the chain-specific relayer const { opHash } = await chainRelayer.relay( - metaTxn?.contract as Address.Address, - metaTxn?.input as Hex, - BigInt(operation.chainId), + metaTxn.contract as Address.Address, + metaTxn.input as Hex, + BigInt(metaTxn.chainId), undefined, relevantPreconditions, ) - // Record the timestamp when this meta transaction was sent setSentMetaTxns((prev) => ({ ...prev, [operationKey]: Date.now(), })) - // Store the opHash in state for monitoring setOperationHashes((prev) => ({ ...prev, [operationKey]: opHash, })) - // Update status to pending after successful relay initiation (monitoring will update further) - setOperationStatuses((prev) => ({ + + setMetaTxnStatuses((prev) => ({ ...prev, - [operationKey]: { ...prev[operationKey], status: 'pending', error: undefined }, + [operationKey]: { status: 'pending', error: undefined }, })) } catch (error: any) { - console.error(`Error sending meta-transaction for operation ${operationKey}:`, error) - // Log additional details if available - if (error.cause) { - console.error(`Caused by:`, error.cause) - } - if (error.message.includes('fetch')) { - console.error( - `Fetch error details: Might be network issue, CORS, or invalid relayer URL for chain ${operation.chainId}`, - ) - } - // Don't update the timestamp on error - this allows immediate retry on error - setOperationStatuses((prev) => ({ + console.error(`Error sending meta-transaction ${operationKey}:`, error) + setMetaTxnStatuses((prev) => ({ ...prev, [operationKey]: { status: 'failed', @@ -1108,6 +1084,133 @@ export const HomeIndexRoute = () => { } }, [account.isConnected]) + // Effect to initialize metaTxnStatuses when metaTxns change + useEffect(() => { + if (metaTxns) { + const initialStatuses: { + [key: string]: { status: 'pending' | 'success' | 'failed'; txHash?: string; error?: string } + } = {} + metaTxns.forEach((metaTxn, index) => { + initialStatuses[`${metaTxn.chainId}-${index}`] = { status: 'pending' } + }) + setMetaTxnStatuses(initialStatuses) + } + }, [metaTxns]) + + // Update the status setting in the relay process + const sendMetaTxn = async () => { + if (!intentOperations || !intentPreconditions || !metaTxns || !account.address) { + console.error('Missing required data for meta-transaction') + return + } + + try { + const intentAddress = calculateIntentAddress(intentOperations, account.address) + + for (const metaTxn of metaTxns) { + const operationKey = `${metaTxn.chainId}-${metaTxns.indexOf(metaTxn)}` + const lastSentTime = sentMetaTxns[operationKey] + const now = Date.now() + + if (lastSentTime && now - lastSentTime < RETRY_WINDOW_MS) { + const timeLeft = Math.ceil((RETRY_WINDOW_MS - (now - lastSentTime)) / 1000) + console.log(`Meta transaction for ${operationKey} was sent recently. Wait ${timeLeft}s before retry`) + continue + } + + try { + const chainId = parseInt(metaTxn.chainId) + if (isNaN(chainId) || chainId <= 0) { + throw new Error(`Invalid chainId for meta transaction: ${metaTxn.chainId}`) + } + const chainRelayer = getRelayer(chainId) + if (!chainRelayer) { + throw new Error(`No relayer found for chainId: ${chainId}`) + } + + const relevantPreconditions = intentPreconditions.filter((p) => p.chainId && parseInt(p.chainId) === chainId) + + console.log(`Relaying meta transaction ${operationKey} to intent ${intentAddress} via relayer:`, chainRelayer) + + const { opHash } = await chainRelayer.relay( + metaTxn.contract as Address.Address, + metaTxn.input as Hex, + BigInt(metaTxn.chainId), + undefined, + relevantPreconditions, + ) + + setSentMetaTxns((prev) => ({ + ...prev, + [operationKey]: Date.now(), + })) + + setOperationHashes((prev) => ({ + ...prev, + [operationKey]: opHash, + })) + + setMetaTxnStatuses((prev) => ({ + ...prev, + [operationKey]: { status: 'pending', error: undefined }, + })) + } catch (error: any) { + console.error(`Error sending meta-transaction ${operationKey}:`, error) + setMetaTxnStatuses((prev) => ({ + ...prev, + [operationKey]: { + status: 'failed', + error: `Relay failed: ${error.message}`, + }, + })) + } + } + } catch (error: any) { + console.error('Error in meta-transaction process:', error) + } + } + + // Update the monitoring effect + useEffect(() => { + if (!metaTxns) return + + const newStatuses: { + [key: string]: { + status: 'pending' | 'success' | 'failed' + txHash?: string + error?: string + } + } = {} + + if (operation0Status) { + const metaTxn = metaTxns[0] + if (metaTxn) { + newStatuses[`${metaTxn.chainId}-0`] = operation0Status + } + } + if (operation1Status) { + const metaTxn = metaTxns[1] + if (metaTxn) { + newStatuses[`${metaTxn.chainId}-1`] = operation1Status + } + } + + setMetaTxnStatuses((prev) => ({ + ...prev, + ...newStatuses, + })) + }, [metaTxns, operation0Status, operation1Status]) + + // Update cleanup effect + useEffect(() => { + if (!metaTxns) { + setMetaTxnStatuses({}) + setOperationHashes({}) + } + }, [metaTxns]) + + const [isManualMetaTxnEnabled, setIsManualMetaTxnEnabled] = useState(false) + return (
@@ -1958,14 +2061,60 @@ export const HomeIndexRoute = () => { {/* Preview calculated address */} {account.address && intentOperations && ( -
- - Calculated Address: - - {originCallParams?.to?.toString() || 'N/A'} - - -
+ <> +
+ + Calculated Address: + + {originCallParams?.to?.toString() || 'N/A'} + + +
+ + {/* Manual Meta Transaction Controls */} +
+
+ + + Manual Meta Transaction Controls + +
+ + {isManualMetaTxnEnabled ? 'Enabled' : 'Disabled'} + +
setIsManualMetaTxnEnabled(!isManualMetaTxnEnabled)} + className={`relative inline-flex h-6 w-11 items-center rounded-full transition-colors cursor-pointer ${ + isManualMetaTxnEnabled ? 'bg-purple-600' : 'bg-gray-700' + }`} + > + +
+
+
+ {isManualMetaTxnEnabled && ( +
+ + + + This will manually trigger the meta transaction relay process + +
+ )} +
+ )}
)} @@ -2044,6 +2193,77 @@ export const HomeIndexRoute = () => {
+ {/* Meta Transactions Status */} +
+ + + Meta Transactions Status + +
+ {metaTxns?.map((metaTxn, index) => ( +
+
+ + + Meta Transaction #{index + 1} - Chain {metaTxn.chainId} + + ({getChainInfo(parseInt(metaTxn.chainId))?.name || 'Unknown Chain'}) + + +
+ {metaTxnStatuses[`${metaTxn.chainId}-${index}`]?.status === 'success' + ? 'Success' + : metaTxnStatuses[`${metaTxn.chainId}-${index}`]?.status === 'failed' + ? 'Failed' + : 'Pending'} +
+
+
+ + Contract: + {metaTxn.contract} + + {metaTxnStatuses[`${metaTxn.chainId}-${index}`]?.txHash && ( + + Tx Hash: + + {metaTxnStatuses[`${metaTxn.chainId}-${index}`].txHash} + + + )} + {metaTxnStatuses[`${metaTxn.chainId}-${index}`]?.error && ( + + Error: + + {metaTxnStatuses[`${metaTxn.chainId}-${index}`].error} + + + )} +
+
+ ))} + {!metaTxns?.length && ( +
+ + No meta transactions available + +
+ )} +
+
+ {/* Intent Operations Status */}
Date: Wed, 23 Apr 2025 22:43:22 +0900 Subject: [PATCH 399/439] Enhance HomeIndexRoute by adding transaction ID display for both individual transactions and meta-transactions. Update UI components to improve clarity and user experience, ensuring that transaction details are presented consistently. Refactor related code for better maintainability and readability. --- .../src/routes/home/home-index-route.tsx | 22 +++++++++++++++---- packages/services/api/src/api.gen.ts | 5 +++-- 2 files changed, 21 insertions(+), 6 deletions(-) diff --git a/extras/demo-anypay/src/routes/home/home-index-route.tsx b/extras/demo-anypay/src/routes/home/home-index-route.tsx index 51071505c..ec98133c3 100644 --- a/extras/demo-anypay/src/routes/home/home-index-route.tsx +++ b/extras/demo-anypay/src/routes/home/home-index-route.tsx @@ -1754,6 +1754,12 @@ export const HomeIndexRoute = () => { className="bg-gray-800/50 p-4 rounded-lg border border-gray-700/50" >
+
+ + ID: + {tx.id || 'N/A'} + +
Contract: @@ -2231,10 +2237,18 @@ export const HomeIndexRoute = () => {
- - Contract: - {metaTxn.contract} - +
+ + Contract: + {metaTxn.contract} + +
+
+ + ID: + {metaTxn.id || 'N/A'} + +
{metaTxnStatuses[`${metaTxn.chainId}-${index}`]?.txHash && ( Tx Hash: diff --git a/packages/services/api/src/api.gen.ts b/packages/services/api/src/api.gen.ts index 0e2db119c..304b4279d 100644 --- a/packages/services/api/src/api.gen.ts +++ b/packages/services/api/src/api.gen.ts @@ -1,5 +1,5 @@ /* eslint-disable */ -// sequence-api v0.4.0 adf12648b2b2f6d829f8ec715afd165fdd5d8636 +// sequence-api v0.4.0 1927d58541bd67ed265e376e276cb7d730998f6b // -- // Code generated by webrpc-gen@v0.25.3 with typescript generator. DO NOT EDIT. // @@ -16,7 +16,7 @@ export const WebRPCVersion = 'v1' export const WebRPCSchemaVersion = 'v0.4.0' // Schema hash generated from your RIDL schema -export const WebRPCSchemaHash = 'adf12648b2b2f6d829f8ec715afd165fdd5d8636' +export const WebRPCSchemaHash = '1927d58541bd67ed265e376e276cb7d730998f6b' type WebrpcGenVersions = { webrpcGenVersion: string @@ -175,6 +175,7 @@ export interface Friend { } export interface MetaTxn { + id: string chainId: string walletAddress: string contract: string From fcf2b953912ff65ed740d39dfa8197ceaca7452d Mon Sep 17 00:00:00 2001 From: Shun Kakinoki Date: Wed, 23 Apr 2025 22:51:07 +0900 Subject: [PATCH 400/439] Refactor HomeIndexRoute to improve state management for meta-transaction statuses. Rename state variables for clarity, streamline the handling of operation statuses, and remove redundant code. Enhance the component's responsiveness to changes in transaction data, ensuring accurate tracking and user feedback during processing. --- .../src/routes/home/home-index-route.tsx | 147 +++--------------- 1 file changed, 24 insertions(+), 123 deletions(-) diff --git a/extras/demo-anypay/src/routes/home/home-index-route.tsx b/extras/demo-anypay/src/routes/home/home-index-route.tsx index ec98133c3..4f1a762b8 100644 --- a/extras/demo-anypay/src/routes/home/home-index-route.tsx +++ b/extras/demo-anypay/src/routes/home/home-index-route.tsx @@ -141,7 +141,7 @@ export const HomeIndexRoute = () => { const [originCallParams, setOriginCallParams] = useState(null) const [isChainSwitchRequired, setIsChainSwitchRequired] = useState(false) const [isAutoExecuteEnabled, setIsAutoExecuteEnabled] = useState(true) - const [operationStatuses, setOperationStatuses] = useState<{ + const [metaTxnStatuses, setMetaTxnStatuses] = useState<{ [key: string]: { status: 'pending' | 'success' | 'failed' txHash?: string @@ -150,13 +150,6 @@ export const HomeIndexRoute = () => { lastPreconditionCheck?: string } }>({}) - const [metaTxnStatuses, setMetaTxnStatuses] = useState<{ - [key: string]: { - status: 'pending' | 'success' | 'failed' - txHash?: string - error?: string - } - }>({}) const [operationHashes, setOperationHashes] = useState<{ [key: string]: Hex }>({}) const [isTransactionInProgress, setIsTransactionInProgress] = useState(false) const { sortedTokens, isLoadingBalances, balanceError } = useTokenBalances(account.address as Address.Address) @@ -164,6 +157,8 @@ export const HomeIndexRoute = () => { // Track timestamps of when each meta-transaction was last sent const [sentMetaTxns, setSentMetaTxns] = useState<{ [key: string]: number }>({}) + const [isManualMetaTxnEnabled, setIsManualMetaTxnEnabled] = useState(false) + const RETRY_WINDOW_MS = 10_000 const { getRelayer } = useRelayers() @@ -496,7 +491,6 @@ export const HomeIndexRoute = () => { setShowCustomCallForm(false) setCommittedIntentAddress(null) setVerificationStatus(null) - setOperationStatuses({}) setOperationHashes({}) if (action === 'custom_call') { setShowCustomCallForm(true) @@ -976,7 +970,7 @@ export const HomeIndexRoute = () => { isSwitchingChain || (isAutoExecuteEnabled && commitIntentConfigMutation.isSuccess) // Disable if auto-execute is on and commit was successful - // Add this after createIntentMutation's onSuccess handler + // Effect to initialize operation statuses useEffect(() => { if (intentOperations) { // Initialize operation statuses @@ -986,7 +980,7 @@ export const HomeIndexRoute = () => { intentOperations.forEach((operation, index) => { initialStatuses[`${operation.chainId}-${index}`] = { status: 'pending' } }) - setOperationStatuses(initialStatuses) + setMetaTxnStatuses(initialStatuses) } }, [intentOperations]) @@ -994,7 +988,7 @@ export const HomeIndexRoute = () => { useEffect(() => { if (receipt && intentOperations) { // Update operation statuses based on receipt - setOperationStatuses((prev) => { + setMetaTxnStatuses((prev) => { const newStatuses = { ...prev } intentOperations.forEach((operation, index) => { const key = `${operation.chainId}-${index}` @@ -1019,7 +1013,7 @@ export const HomeIndexRoute = () => { // Add this to reset operation statuses when account disconnects useEffect(() => { if (!account.isConnected) { - setOperationStatuses({}) + setMetaTxnStatuses({}) } }, [account.isConnected]) @@ -1036,9 +1030,9 @@ export const HomeIndexRoute = () => { intentOperations?.[1] ? getRelayer(parseInt(intentOperations[1].chainId)) : undefined, ) - // Update operation statuses when individual operation statuses change + // Update the monitoring effect useEffect(() => { - if (!intentOperations) return + if (!metaTxns) return const newStatuses: { [key: string]: { @@ -1050,31 +1044,37 @@ export const HomeIndexRoute = () => { } } = {} - if (intentOperations[0]) { - newStatuses[`${intentOperations[0].chainId}-0`] = operation0Status + if (operation0Status) { + const metaTxn = metaTxns[0] + if (metaTxn) { + newStatuses[`${metaTxn.chainId}-0`] = operation0Status + } } - if (intentOperations[1]) { - newStatuses[`${intentOperations[1].chainId}-1`] = operation1Status + if (operation1Status) { + const metaTxn = metaTxns[1] + if (metaTxn) { + newStatuses[`${metaTxn.chainId}-1`] = operation1Status + } } - setOperationStatuses((prev) => ({ + setMetaTxnStatuses((prev) => ({ ...prev, ...newStatuses, })) - }, [intentOperations, operation0Status, operation1Status]) + }, [metaTxns, operation0Status, operation1Status]) // Effect to cleanup operation statuses and hashes when intent operations are reset useEffect(() => { if (!intentOperations) { - setOperationStatuses({}) + setMetaTxnStatuses({}) setOperationHashes({}) } }, [intentOperations]) - // Effect to cleanup operation statuses and hashes when account disconnects + // Effect to cleanup when account disconnects useEffect(() => { if (!account.isConnected) { - setOperationStatuses({}) + setMetaTxnStatuses({}) setOperationHashes({}) setIntentOperations(null) setIntentPreconditions(null) @@ -1170,47 +1170,6 @@ export const HomeIndexRoute = () => { } } - // Update the monitoring effect - useEffect(() => { - if (!metaTxns) return - - const newStatuses: { - [key: string]: { - status: 'pending' | 'success' | 'failed' - txHash?: string - error?: string - } - } = {} - - if (operation0Status) { - const metaTxn = metaTxns[0] - if (metaTxn) { - newStatuses[`${metaTxn.chainId}-0`] = operation0Status - } - } - if (operation1Status) { - const metaTxn = metaTxns[1] - if (metaTxn) { - newStatuses[`${metaTxn.chainId}-1`] = operation1Status - } - } - - setMetaTxnStatuses((prev) => ({ - ...prev, - ...newStatuses, - })) - }, [metaTxns, operation0Status, operation1Status]) - - // Update cleanup effect - useEffect(() => { - if (!metaTxns) { - setMetaTxnStatuses({}) - setOperationHashes({}) - } - }, [metaTxns]) - - const [isManualMetaTxnEnabled, setIsManualMetaTxnEnabled] = useState(false) - return (
@@ -2278,64 +2237,6 @@ export const HomeIndexRoute = () => {
- {/* Intent Operations Status */} -
- - - Intent Operations Status - -
- {intentOperations.map((operation, index) => ( -
-
- - - Operation #{index + 1} - Chain {operation.chainId} - - ({getChainInfo(parseInt(operation.chainId))?.name || 'Unknown Chain'}) - - -
- {operationStatuses[`${operation.chainId}-${index}`]?.status === 'success' - ? 'Success' - : operationStatuses[`${operation.chainId}-${index}`]?.status === 'failed' - ? 'Failed' - : 'Pending'} -
-
- {operationStatuses[`${operation.chainId}-${index}`]?.txHash && ( - - Tx Hash: - - {operationStatuses[`${operation.chainId}-${index}`].txHash} - - - )} - {operationStatuses[`${operation.chainId}-${index}`]?.error && ( - - Error: - - {operationStatuses[`${operation.chainId}-${index}`].error} - - - )} -
- ))} -
-
- {/* Preconditions Status */}
Date: Wed, 23 Apr 2025 22:55:20 +0900 Subject: [PATCH 401/439] Enhance HomeIndexRoute by adding functionality to select and send specific meta-transactions. Introduce a new state for selected transaction ID and update the sendMetaTxn function to process transactions based on the selected ID. Improve the UI to allow users to choose a transaction from a list, enhancing user experience and control over transaction management. --- .../src/routes/home/home-index-route.tsx | 72 +++++++++++++++---- 1 file changed, 57 insertions(+), 15 deletions(-) diff --git a/extras/demo-anypay/src/routes/home/home-index-route.tsx b/extras/demo-anypay/src/routes/home/home-index-route.tsx index 4f1a762b8..987ecc976 100644 --- a/extras/demo-anypay/src/routes/home/home-index-route.tsx +++ b/extras/demo-anypay/src/routes/home/home-index-route.tsx @@ -158,6 +158,7 @@ export const HomeIndexRoute = () => { const [sentMetaTxns, setSentMetaTxns] = useState<{ [key: string]: number }>({}) const [isManualMetaTxnEnabled, setIsManualMetaTxnEnabled] = useState(false) + const [selectedMetaTxnId, setSelectedMetaTxnId] = useState(null) const RETRY_WINDOW_MS = 10_000 @@ -1097,8 +1098,8 @@ export const HomeIndexRoute = () => { } }, [metaTxns]) - // Update the status setting in the relay process - const sendMetaTxn = async () => { + // Update the sendMetaTxn function to handle specific IDs + const sendMetaTxn = async (selectedId?: string) => { if (!intentOperations || !intentPreconditions || !metaTxns || !account.address) { console.error('Missing required data for meta-transaction') return @@ -1107,7 +1108,10 @@ export const HomeIndexRoute = () => { try { const intentAddress = calculateIntentAddress(intentOperations, account.address) - for (const metaTxn of metaTxns) { + // Filter metaTxns based on selectedId if provided + const txnsToProcess = selectedId ? metaTxns.filter((tx) => tx.id === selectedId) : metaTxns + + for (const metaTxn of txnsToProcess) { const operationKey = `${metaTxn.chainId}-${metaTxns.indexOf(metaTxn)}` const lastSentTime = sentMetaTxns[operationKey] const now = Date.now() @@ -2062,19 +2066,57 @@ export const HomeIndexRoute = () => {
{isManualMetaTxnEnabled && ( -
- - +
+ {/* Meta Transaction Selection */} +
+ + Select Meta Transaction: + +
+ {metaTxns?.map((tx, index) => ( +
setSelectedMetaTxnId(tx.id)} + className={`p-2 rounded-md cursor-pointer transition-all duration-200 ${ + selectedMetaTxnId === tx.id + ? 'bg-purple-900/50 border border-purple-500' + : 'bg-gray-700/50 border border-gray-600 hover:bg-gray-600/50' + }`} + > +
+
+ + + #{index + 1} - Chain {tx.chainId} + +
+ + ID: {tx.id} + +
+
+ ))} +
+
+ + {/* Action Buttons */} +
+ +
+ + - This will manually trigger the meta transaction relay process + {selectedMetaTxnId + ? 'This will send only the selected meta transaction' + : 'This will send all meta transactions in sequence'}
)} From affe4ccf849dee5cfdbaaa58e74660a6a5716c3a Mon Sep 17 00:00:00 2001 From: Shun Kakinoki Date: Wed, 23 Apr 2025 22:56:13 +0900 Subject: [PATCH 402/439] Add Preconditions Status display to HomeIndexRoute for improved user feedback on transaction readiness. The new UI section shows the status of each precondition, indicating whether they are met or not, enhancing clarity and user experience during transaction management. --- .../src/routes/home/home-index-route.tsx | 60 +++++++++---------- 1 file changed, 30 insertions(+), 30 deletions(-) diff --git a/extras/demo-anypay/src/routes/home/home-index-route.tsx b/extras/demo-anypay/src/routes/home/home-index-route.tsx index 987ecc976..cd72538a7 100644 --- a/extras/demo-anypay/src/routes/home/home-index-route.tsx +++ b/extras/demo-anypay/src/routes/home/home-index-route.tsx @@ -2200,6 +2200,36 @@ export const HomeIndexRoute = () => {
+ {/* Preconditions Status */} +
+ + + Preconditions Status + +
+ {intentPreconditions.map((precondition, index) => ( +
+ + + Precondition {index + 1} ({precondition.type}):{' '} + + + {preconditionStatuses[index] ? ( + Met + ) : ( + Not Met + )} + + +
+ ))} +
+
+ {/* Meta Transactions Status */}
{ )}
- - {/* Preconditions Status */} -
- - - Preconditions Status - -
- {intentPreconditions.map((precondition, index) => ( -
- - - Precondition {index + 1} ({precondition.type}):{' '} - - - {preconditionStatuses[index] ? ( - Met - ) : ( - Not Met - )} - - -
- ))} -
-
)} From 41c4febafab0c65524b2a74d3ff18481b9c972e5 Mon Sep 17 00:00:00 2001 From: Shun Kakinoki Date: Thu, 24 Apr 2025 00:49:47 +0900 Subject: [PATCH 403/439] Refactor HomeIndexRoute to streamline meta-transaction sending process. Update sendMetaTxn function to handle specific transaction IDs and improve error handling for missing transactions. Enhance logging for better debugging and user feedback during transaction relaying. --- .../src/routes/home/home-index-route.tsx | 213 +++++++----------- packages/wallet/core/src/relayer/rpc/index.ts | 25 +- 2 files changed, 81 insertions(+), 157 deletions(-) diff --git a/extras/demo-anypay/src/routes/home/home-index-route.tsx b/extras/demo-anypay/src/routes/home/home-index-route.tsx index cd72538a7..74d09aac7 100644 --- a/extras/demo-anypay/src/routes/home/home-index-route.tsx +++ b/extras/demo-anypay/src/routes/home/home-index-route.tsx @@ -667,86 +667,15 @@ export const HomeIndexRoute = () => { if (isSuccess && receipt) { updateMetaTxnStatus(receipt.transactionHash, receipt.status, receipt.gasUsed, receipt.effectiveGasPrice) - // After origin call is confirmed, send the meta-transaction - const sendMetaTxn = async () => { - if (!intentOperations || !intentPreconditions || !metaTxns || !account.address) { - console.error('Missing required data for meta-transaction') - return - } - - try { - const intentAddress = calculateIntentAddress(intentOperations, account.address) - - for (const metaTxn of metaTxns) { - const operationKey = `${metaTxn.chainId}-${metaTxns.indexOf(metaTxn)}` - const lastSentTime = sentMetaTxns[operationKey] - const now = Date.now() - - if (lastSentTime && now - lastSentTime < RETRY_WINDOW_MS) { - const timeLeft = Math.ceil((RETRY_WINDOW_MS - (now - lastSentTime)) / 1000) - console.log(`Meta transaction for ${operationKey} was sent recently. Wait ${timeLeft}s before retry`) - continue - } - - try { - const chainId = parseInt(metaTxn.chainId) - if (isNaN(chainId) || chainId <= 0) { - throw new Error(`Invalid chainId for meta transaction: ${metaTxn.chainId}`) - } - const chainRelayer = getRelayer(chainId) - if (!chainRelayer) { - throw new Error(`No relayer found for chainId: ${chainId}`) - } - - const relevantPreconditions = intentPreconditions.filter( - (p) => p.chainId && parseInt(p.chainId) === chainId, - ) - - console.log( - `Relaying meta transaction ${operationKey} to intent ${intentAddress} via relayer:`, - chainRelayer, - ) - - const { opHash } = await chainRelayer.relay( - metaTxn.contract as Address.Address, - metaTxn.input as Hex, - BigInt(metaTxn.chainId), - undefined, - relevantPreconditions, - ) - - setSentMetaTxns((prev) => ({ - ...prev, - [operationKey]: Date.now(), - })) - - setOperationHashes((prev) => ({ - ...prev, - [operationKey]: opHash, - })) - - setMetaTxnStatuses((prev) => ({ - ...prev, - [operationKey]: { status: 'pending', error: undefined }, - })) - } catch (error: any) { - console.error(`Error sending meta-transaction ${operationKey}:`, error) - setMetaTxnStatuses((prev) => ({ - ...prev, - [operationKey]: { - status: 'failed', - error: `Relay failed: ${error.message}`, - }, - })) - } - } - } catch (error: any) { - console.error('Error in meta-transaction process:', error) - } + if (!metaTxns) { + console.error('No meta transactions to send') + return } - // Execute the meta-transaction sending process - sendMetaTxn() + // Send all meta transactions + for (const metaTxn of metaTxns) { + sendMetaTxn(metaTxn.id) + } } else if (isError) { console.error('Error waiting for receipt:', receiptError) updateMetaTxnStatus(txnHash, 'reverted', undefined, undefined, receiptError?.message || 'Failed to get receipt') @@ -1099,8 +1028,8 @@ export const HomeIndexRoute = () => { }, [metaTxns]) // Update the sendMetaTxn function to handle specific IDs - const sendMetaTxn = async (selectedId?: string) => { - if (!intentOperations || !intentPreconditions || !metaTxns || !account.address) { + const sendMetaTxn = async (selectedId: string | null) => { + if (!selectedId || !intentOperations || !intentPreconditions || !metaTxns || !account.address) { console.error('Missing required data for meta-transaction') return } @@ -1109,65 +1038,79 @@ export const HomeIndexRoute = () => { const intentAddress = calculateIntentAddress(intentOperations, account.address) // Filter metaTxns based on selectedId if provided - const txnsToProcess = selectedId ? metaTxns.filter((tx) => tx.id === selectedId) : metaTxns + const metaTxn = metaTxns.find((tx) => tx.id === selectedId) + if (!metaTxn) { + console.error('Meta transaction not found') + return + } - for (const metaTxn of txnsToProcess) { - const operationKey = `${metaTxn.chainId}-${metaTxns.indexOf(metaTxn)}` - const lastSentTime = sentMetaTxns[operationKey] - const now = Date.now() + const operationKey = `${metaTxn.chainId}-${metaTxns.indexOf(metaTxn)}` + const lastSentTime = sentMetaTxns[operationKey] + const now = Date.now() - if (lastSentTime && now - lastSentTime < RETRY_WINDOW_MS) { - const timeLeft = Math.ceil((RETRY_WINDOW_MS - (now - lastSentTime)) / 1000) - console.log(`Meta transaction for ${operationKey} was sent recently. Wait ${timeLeft}s before retry`) - continue + if (lastSentTime && now - lastSentTime < RETRY_WINDOW_MS) { + const timeLeft = Math.ceil((RETRY_WINDOW_MS - (now - lastSentTime)) / 1000) + console.log(`Meta transaction for ${operationKey} was sent recently. Wait ${timeLeft}s before retry`) + return + } + + try { + const chainId = parseInt(metaTxn.chainId) + if (isNaN(chainId) || chainId <= 0) { + throw new Error(`Invalid chainId for meta transaction: ${metaTxn.chainId}`) + } + const chainRelayer = getRelayer(chainId) + if (!chainRelayer) { + throw new Error(`No relayer found for chainId: ${chainId}`) } - try { - const chainId = parseInt(metaTxn.chainId) - if (isNaN(chainId) || chainId <= 0) { - throw new Error(`Invalid chainId for meta transaction: ${metaTxn.chainId}`) - } - const chainRelayer = getRelayer(chainId) - if (!chainRelayer) { - throw new Error(`No relayer found for chainId: ${chainId}`) - } + const relevantPreconditions = intentPreconditions.filter((p) => p.chainId && parseInt(p.chainId) === chainId) + + console.log(`Relaying meta transaction ${operationKey} to intent ${intentAddress} via relayer:`, chainRelayer) + console.log( + 'metaTxn', + metaTxn, + 'operationKey', + operationKey, + 'intentAddress', + intentAddress, + 'chainId', + chainId, + 'relevantPreconditions', + relevantPreconditions, + ) - const relevantPreconditions = intentPreconditions.filter((p) => p.chainId && parseInt(p.chainId) === chainId) - - console.log(`Relaying meta transaction ${operationKey} to intent ${intentAddress} via relayer:`, chainRelayer) - - const { opHash } = await chainRelayer.relay( - metaTxn.contract as Address.Address, - metaTxn.input as Hex, - BigInt(metaTxn.chainId), - undefined, - relevantPreconditions, - ) - - setSentMetaTxns((prev) => ({ - ...prev, - [operationKey]: Date.now(), - })) - - setOperationHashes((prev) => ({ - ...prev, - [operationKey]: opHash, - })) - - setMetaTxnStatuses((prev) => ({ - ...prev, - [operationKey]: { status: 'pending', error: undefined }, - })) - } catch (error: any) { - console.error(`Error sending meta-transaction ${operationKey}:`, error) - setMetaTxnStatuses((prev) => ({ - ...prev, - [operationKey]: { - status: 'failed', - error: `Relay failed: ${error.message}`, - }, - })) - } + const { opHash } = await chainRelayer.relay( + metaTxn.contract as Address.Address, + metaTxn.input as Hex, + BigInt(metaTxn.chainId), + undefined, + relevantPreconditions, + ) + + setSentMetaTxns((prev) => ({ + ...prev, + [operationKey]: Date.now(), + })) + + setOperationHashes((prev) => ({ + ...prev, + [operationKey]: opHash, + })) + + setMetaTxnStatuses((prev) => ({ + ...prev, + [operationKey]: { status: 'pending', error: undefined }, + })) + } catch (error: any) { + console.error(`Error sending meta-transaction ${operationKey}:`, error) + setMetaTxnStatuses((prev) => ({ + ...prev, + [operationKey]: { + status: 'failed', + error: `Relay failed: ${error.message}`, + }, + })) } } catch (error: any) { console.error('Error in meta-transaction process:', error) @@ -2103,7 +2046,7 @@ export const HomeIndexRoute = () => {
- - - - {selectedMetaTxnId - ? 'This will send only the selected meta transaction' - : 'This will send all meta transactions in sequence'} -
)} +
+ + + {selectedMetaTxnId + ? 'This will send only the selected meta transaction' + : 'This will send all meta transactions in sequence'} + +
)} diff --git a/packages/wallet/core/src/relayer/rpc/index.ts b/packages/wallet/core/src/relayer/rpc/index.ts index 3245c4a62..b9b3930b7 100644 --- a/packages/wallet/core/src/relayer/rpc/index.ts +++ b/packages/wallet/core/src/relayer/rpc/index.ts @@ -86,6 +86,35 @@ export class RpcRelayer implements Relayer { } } + async sendMetaTxn( + walletAddress: Address.Address, + to: Address.Address, + data: Hex.Hex, + chainId: bigint, + quote?: FeeQuote, + preconditions?: IntentPrecondition[], + ): Promise<{ opHash: Hex.Hex }> { + console.log('sendMetaTxn', walletAddress, to, data, chainId, quote, preconditions) + const rpcCall: RpcMetaTxn = { + walletAddress: walletAddress, + contract: to, + input: data, + } + + const result: RpcSendMetaTxnReturn = await this.client.sendMetaTxn({ + call: rpcCall, + quote: quote ? JSON.stringify(quote._quote) : undefined, + preconditions: preconditions, + }) + + if (!result.status) { + console.error('RpcRelayer.relay failed', result) + throw new Error(`Relay failed: TxnHash ${result.txnHash}`) + } + + return { opHash: Hex.fromString(result.txnHash) } + } + async relay( to: Address.Address, data: Hex.Hex, From f17e0e615f9409405311c307b79191e010bc3f91 Mon Sep 17 00:00:00 2001 From: Shun Kakinoki Date: Fri, 25 Apr 2025 17:55:35 +0900 Subject: [PATCH 405/439] Refactor HomeIndexRoute to implement a mutation-based approach for sending meta-transactions. Update sendMetaTxn function to utilize useMutation for improved error handling, state management, and UI feedback during transaction processing. Enhance retry logic with exponential backoff for better reliability in transaction sending. --- .../src/routes/home/home-index-route.tsx | 181 +++++++++++------- 1 file changed, 116 insertions(+), 65 deletions(-) diff --git a/extras/demo-anypay/src/routes/home/home-index-route.tsx b/extras/demo-anypay/src/routes/home/home-index-route.tsx index 7d7d19723..248f2706b 100644 --- a/extras/demo-anypay/src/routes/home/home-index-route.tsx +++ b/extras/demo-anypay/src/routes/home/home-index-route.tsx @@ -1027,72 +1027,105 @@ export const HomeIndexRoute = () => { } }, [metaTxns]) - // Update the sendMetaTxn function to handle specific IDs - const sendMetaTxn = async (selectedId: string | null) => { - if (!intentOperations || !intentPreconditions || !metaTxns || !account.address) { - console.error('Missing required data for meta-transaction') - return - } + // Update the sendMetaTxn mutation + const sendMetaTxnMutation = useMutation({ + mutationFn: async ({ selectedId }: { selectedId: string | null }) => { + if (!intentOperations || !intentPreconditions || !metaTxns || !account.address) { + throw new Error('Missing required data for meta-transaction') + } - try { - const intentAddress = calculateIntentAddress(intentOperations, account.address) + try { + const intentAddress = calculateIntentAddress(intentOperations, account.address) - // If no specific ID is selected, send all meta transactions - const txnsToSend = selectedId ? [metaTxns.find((tx) => tx.id === selectedId)] : metaTxns + // If no specific ID is selected, send all meta transactions + const txnsToSend = selectedId ? [metaTxns.find((tx) => tx.id === selectedId)] : metaTxns - if (!txnsToSend || (selectedId && !txnsToSend[0])) { - console.error('Meta transaction not found') - return - } + if (!txnsToSend || (selectedId && !txnsToSend[0])) { + throw new Error('Meta transaction not found') + } - for (const metaTxn of txnsToSend) { - if (!metaTxn) continue + const results = [] - const operationKey = `${metaTxn.chainId}-${metaTxn.id}` - const lastSentTime = sentMetaTxns[operationKey] - const now = Date.now() + for (const metaTxn of txnsToSend) { + if (!metaTxn) continue - if (lastSentTime && now - lastSentTime < RETRY_WINDOW_MS) { - const timeLeft = Math.ceil((RETRY_WINDOW_MS - (now - lastSentTime)) / 1000) - console.log(`Meta transaction for ${operationKey} was sent recently. Wait ${timeLeft}s before retry`) - continue - } + const operationKey = `${metaTxn.chainId}-${metaTxn.id}` + const lastSentTime = sentMetaTxns[operationKey] + const now = Date.now() - try { - const chainId = parseInt(metaTxn.chainId) - if (isNaN(chainId) || chainId <= 0) { - throw new Error(`Invalid chainId for meta transaction: ${metaTxn.chainId}`) - } - const chainRelayer = getRelayer(chainId) - if (!chainRelayer) { - throw new Error(`No relayer found for chainId: ${chainId}`) + if (lastSentTime && now - lastSentTime < RETRY_WINDOW_MS) { + const timeLeft = Math.ceil((RETRY_WINDOW_MS - (now - lastSentTime)) / 1000) + console.log(`Meta transaction for ${operationKey} was sent recently. Wait ${timeLeft}s before retry`) + continue } - const relevantPreconditions = intentPreconditions.filter((p) => p.chainId && parseInt(p.chainId) === chainId) - - console.log(`Relaying meta transaction ${operationKey} to intent ${intentAddress} via relayer:`, chainRelayer) - console.log( - 'metaTxn', - metaTxn, - 'operationKey', - operationKey, - 'intentAddress', - intentAddress, - 'chainId', - chainId, - 'relevantPreconditions', - relevantPreconditions, - ) - - const { opHash } = await chainRelayer.sendMetaTxn( - metaTxn.walletAddress as Address.Address, - metaTxn.contract as Address.Address, - metaTxn.input as Hex, - BigInt(metaTxn.chainId), - undefined, - relevantPreconditions, - ) + try { + const chainId = parseInt(metaTxn.chainId) + if (isNaN(chainId) || chainId <= 0) { + throw new Error(`Invalid chainId for meta transaction: ${chainId}`) + } + const chainRelayer = getRelayer(chainId) + if (!chainRelayer) { + throw new Error(`No relayer found for chainId: ${chainId}`) + } + + const relevantPreconditions = intentPreconditions.filter( + (p) => p.chainId && parseInt(p.chainId) === chainId, + ) + + console.log( + `Relaying meta transaction ${operationKey} to intent ${intentAddress} via relayer:`, + chainRelayer, + ) + + const { opHash } = await chainRelayer.sendMetaTxn( + metaTxn.walletAddress as Address.Address, + metaTxn.contract as Address.Address, + metaTxn.input as Hex, + BigInt(metaTxn.chainId), + undefined, + relevantPreconditions, + ) + + results.push({ + operationKey, + opHash, + success: true, + }) + } catch (error: any) { + results.push({ + operationKey, + error: error.message, + success: false, + }) + } + } + return results + } catch (error: any) { + throw error + } + }, + onMutate: (variables) => { + // Optimistically update UI + const { selectedId } = variables + const affectedTxns = selectedId ? [selectedId] : metaTxns?.map((tx) => tx.id) || [] + + affectedTxns.forEach((txId) => { + const tx = metaTxns?.find((t) => t.id === txId) + if (tx) { + const operationKey = `${tx.chainId}-${txId}` + setMetaTxnStatuses((prev) => ({ + ...prev, + [operationKey]: { status: 'pending', error: undefined }, + })) + } + }) + }, + onSuccess: (results) => { + // Update states based on results + results.forEach(({ operationKey, opHash, success, error }) => { + if (success && opHash) { setSentMetaTxns((prev) => ({ ...prev, [operationKey]: Date.now(), @@ -1107,20 +1140,27 @@ export const HomeIndexRoute = () => { ...prev, [operationKey]: { status: 'pending', error: undefined }, })) - } catch (error: any) { - console.error(`Error sending meta-transaction ${operationKey}:`, error) + } else if (error) { setMetaTxnStatuses((prev) => ({ ...prev, [operationKey]: { status: 'failed', - error: `Relay failed: ${error.message}`, + error: `Relay failed: ${error}`, }, })) } - } - } catch (error: any) { + }) + }, + onError: (error) => { console.error('Error in meta-transaction process:', error) - } + }, + retry: 5, // Allow up to 2 retries + retryDelay: (attemptIndex) => Math.min(1000 * Math.pow(2, attemptIndex), 30000), // Exponential backoff + }) + + // Replace the sendMetaTxn function with a wrapper that uses the mutation + const sendMetaTxn = (selectedId: string | null) => { + sendMetaTxnMutation.mutate({ selectedId }) } return ( @@ -2053,11 +2093,22 @@ export const HomeIndexRoute = () => {
From c653da5e0b5d4efd2de64b94ef126a7fab4a168b Mon Sep 17 00:00:00 2001 From: Shun Kakinoki Date: Mon, 28 Apr 2025 18:54:21 +0900 Subject: [PATCH 406/439] Refactor HomeIndexRoute to enhance transaction status management and auto-execution logic. Update the effect for monitoring transaction status to improve state handling and prevent unnecessary updates. Introduce a new effect for auto-executing transactions based on specific conditions, ensuring better user feedback and streamlined transaction processing. --- .../src/routes/home/home-index-route.tsx | 175 ++++++++++-------- 1 file changed, 96 insertions(+), 79 deletions(-) diff --git a/extras/demo-anypay/src/routes/home/home-index-route.tsx b/extras/demo-anypay/src/routes/home/home-index-route.tsx index 248f2706b..af61b6eb9 100644 --- a/extras/demo-anypay/src/routes/home/home-index-route.tsx +++ b/extras/demo-anypay/src/routes/home/home-index-route.tsx @@ -168,7 +168,7 @@ export const HomeIndexRoute = () => { try { const context: ContextLike.Context = { factory: '0x4B755c6A321C86bD35bBbb5CD56321FE48b51d1e' as `0x${string}`, - stage1: '0x006FFf4932D4ad20aacD34E5Cc6CCf0644cbB099' as `0x${string}`, + stage1: '0x0aac68a66bd4442349b3966df34848d32e82f10c' as `0x${string}`, creationCode: '0x603e600e3d39601e805130553df33d3d34601c57363d3d373d363d30545af43d82803e903d91601c57fd5bf3' as `0x${string}`, } @@ -654,45 +654,116 @@ export const HomeIndexRoute = () => { }, }) + // Modify the effect that watches for transaction status useEffect(() => { if (!txnHash) { - setMetaTxnStatus(null) - setSentMetaTxns({}) + // Only reset these when txnHash is cleared + if (metaTxnStatus?.txnHash) { + setMetaTxnStatus(null) + } + if (Object.keys(sentMetaTxns).length > 0) { + setSentMetaTxns({}) + } + return + } + + // Don't update status if it's already set for this hash + if (metaTxnStatus?.txnHash === txnHash) { return } + if (isWaitingForReceipt) { - updateMetaTxnStatus(txnHash, 'pending') + setMetaTxnStatus({ + txnHash, + status: 'Pending', + }) return } - if (isSuccess && receipt) { - updateMetaTxnStatus(receipt.transactionHash, receipt.status, receipt.gasUsed, receipt.effectiveGasPrice) - if (!metaTxns) { - console.error('No meta transactions to send') - return - } + if (isSuccess && receipt) { + setMetaTxnStatus({ + txnHash: receipt.transactionHash, + status: receipt.status === 'success' ? 'Success' : 'Failed', + gasUsed: receipt.gasUsed ? Number(receipt.gasUsed) : undefined, + effectiveGasPrice: receipt.effectiveGasPrice?.toString(), + }) - // Send all meta transactions - for (const metaTxn of metaTxns) { - sendMetaTxn(metaTxn.id) + // Only send meta transactions on successful receipt + if (receipt.status === 'success' && metaTxns && !metaTxns.some((tx) => sentMetaTxns[`${tx.chainId}-${tx.id}`])) { + // Send all meta transactions that haven't been sent yet + for (const metaTxn of metaTxns) { + sendMetaTxn(metaTxn.id) + } } } else if (isError) { - console.error('Error waiting for receipt:', receiptError) - updateMetaTxnStatus(txnHash, 'reverted', undefined, undefined, receiptError?.message || 'Failed to get receipt') + setMetaTxnStatus({ + txnHash, + status: 'Failed', + revertReason: receiptError?.message || 'Failed to get receipt', + }) + } + }, [txnHash, isWaitingForReceipt, isSuccess, isError, receipt, receiptError, metaTxns, sentMetaTxns]) + + // Modify the auto-execute effect + useEffect(() => { + const shouldAutoSend = + isAutoExecuteEnabled && + commitIntentConfigMutation.isSuccess && + originCallParams?.chainId && + account.chainId === originCallParams.chainId && + !originCallParams.error && + originCallParams.to && + originCallParams.data !== null && + originCallParams.value !== null && + !isSendingTransaction && + !isWaitingForReceipt && + !txnHash && + !isChainSwitchRequired && + !metaTxnStatus + + if (shouldAutoSend) { + console.log('Auto-executing transaction: All conditions met.') + + // Set initial status + setMetaTxnStatus({ + status: 'Sending...', + }) + + sendTransaction( + { + to: originCallParams.to!, + data: originCallParams.data!, + value: originCallParams.value!, + chainId: originCallParams.chainId!, + }, + { + onSuccess: (hash) => { + console.log('Auto-executed transaction sent, hash:', hash) + setTxnHash(hash) + }, + onError: (error) => { + console.error('Auto-executed transaction failed:', error) + if (error.message.includes('User rejected') || error.message.includes('user rejected')) { + setIsAutoExecuteEnabled(false) + } + setMetaTxnStatus({ + status: 'Failed', + revertReason: error.message, + }) + }, + }, + ) } }, [ + isAutoExecuteEnabled, + commitIntentConfigMutation.isSuccess, + originCallParams, + account.chainId, + isSendingTransaction, isWaitingForReceipt, - isSuccess, - isError, - receipt, txnHash, - receiptError, - intentOperations, - intentPreconditions, - account.address, - getRelayer, - sentMetaTxns, - metaTxns, + isChainSwitchRequired, + metaTxnStatus, ]) useEffect(() => { @@ -806,60 +877,6 @@ export const HomeIndexRoute = () => { } }, [isAutoExecuteEnabled, originCallParams, account.chainId]) - useEffect(() => { - const shouldAutoSend = - isAutoExecuteEnabled && - commitIntentConfigMutation.isSuccess && - originCallParams?.chainId && - account.chainId === originCallParams.chainId && - !originCallParams.error && - originCallParams.to && - originCallParams.data !== null && - originCallParams.value !== null && - !isSendingTransaction && - !isWaitingForReceipt && - !txnHash && - !isChainSwitchRequired - - if (shouldAutoSend) { - console.log('Auto-executing transaction: All conditions met.') - updateMetaTxnStatus(undefined, 'sending') - - sendTransaction( - { - to: originCallParams.to!, - data: originCallParams.data!, - value: originCallParams.value!, - chainId: originCallParams.chainId!, - }, - { - onSuccess: (hash) => { - console.log('Auto-executed transaction sent, hash:', hash) - setTxnHash(hash) - }, - onError: (error) => { - console.error('Auto-executed transaction failed:', error) - if (error.message.includes('User rejected') || error.message.includes('user rejected')) { - setIsAutoExecuteEnabled(false) - } - updateMetaTxnStatus(undefined, 'reverted', undefined, undefined, error.message) - }, - }, - ) - } - // Update dependencies to include commit success status - }, [ - isAutoExecuteEnabled, - commitIntentConfigMutation.isSuccess, - originCallParams, - account.chainId, - isSendingTransaction, - isWaitingForReceipt, - txnHash, - isChainSwitchRequired, - sendTransaction, - ]) - // Update button text and disabled state for commit button const commitButtonText = commitIntentConfigMutation.isPending ? (
From 5843cdc1b1e05f7ee50a5bbd93fe7dc55ca36ac8 Mon Sep 17 00:00:00 2001 From: Shun Kakinoki Date: Tue, 29 Apr 2025 14:00:47 +0900 Subject: [PATCH 407/439] Update contract addresses in HomeIndexRoute for improved transaction processing accuracy. --- extras/demo-anypay/src/routes/home/home-index-route.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/extras/demo-anypay/src/routes/home/home-index-route.tsx b/extras/demo-anypay/src/routes/home/home-index-route.tsx index af61b6eb9..c48c5a28a 100644 --- a/extras/demo-anypay/src/routes/home/home-index-route.tsx +++ b/extras/demo-anypay/src/routes/home/home-index-route.tsx @@ -167,8 +167,8 @@ export const HomeIndexRoute = () => { const calculateIntentAddress = useCallback((operations: IntentOperation[], mainSigner: string) => { try { const context: ContextLike.Context = { - factory: '0x4B755c6A321C86bD35bBbb5CD56321FE48b51d1e' as `0x${string}`, - stage1: '0x0aac68a66bd4442349b3966df34848d32e82f10c' as `0x${string}`, + factory: '0xBd0F8abD58B4449B39C57Ac9D5C67433239aC447' as `0x${string}`, + stage1: '0x2440595Ead70Ba5874572153910362DcA2dde417' as `0x${string}`, creationCode: '0x603e600e3d39601e805130553df33d3d34601c57363d3d373d363d30545af43d82803e903d91601c57fd5bf3' as `0x${string}`, } From 955464bc5c9550dfbd6b9704ab19cb5f19a3ed03 Mon Sep 17 00:00:00 2001 From: Shun Kakinoki Date: Tue, 29 Apr 2025 14:02:01 +0900 Subject: [PATCH 408/439] Add stage2 contract address in HomeIndexRoute and export AnyPay module in wallet core index for improved modularity. --- extras/demo-anypay/src/routes/home/home-index-route.tsx | 1 + packages/wallet/core/src/index.ts | 1 + 2 files changed, 2 insertions(+) diff --git a/extras/demo-anypay/src/routes/home/home-index-route.tsx b/extras/demo-anypay/src/routes/home/home-index-route.tsx index c48c5a28a..2746ea99f 100644 --- a/extras/demo-anypay/src/routes/home/home-index-route.tsx +++ b/extras/demo-anypay/src/routes/home/home-index-route.tsx @@ -169,6 +169,7 @@ export const HomeIndexRoute = () => { const context: ContextLike.Context = { factory: '0xBd0F8abD58B4449B39C57Ac9D5C67433239aC447' as `0x${string}`, stage1: '0x2440595Ead70Ba5874572153910362DcA2dde417' as `0x${string}`, + stage2: '0xa3F27508a1Dac8A11C0791f7EBEA5fc95dC1e131' as `0x${string}`, creationCode: '0x603e600e3d39601e805130553df33d3d34601c57363d3d373d363d30545af43d82803e903d91601c57fd5bf3' as `0x${string}`, } diff --git a/packages/wallet/core/src/index.ts b/packages/wallet/core/src/index.ts index 202084bde..3aab21bdf 100644 --- a/packages/wallet/core/src/index.ts +++ b/packages/wallet/core/src/index.ts @@ -1,5 +1,6 @@ export * from './wallet.js' +export * as AnyPay from './anypay/index.js' export * as Signers from './signers/index.js' export * as State from './state/index.js' export * as Relayer from './relayer/index.js' From acd61960537fba49b7c33f17a56db11c9ed49537 Mon Sep 17 00:00:00 2001 From: Shun Kakinoki Date: Tue, 29 Apr 2025 14:08:13 +0900 Subject: [PATCH 409/439] Update import statements to include file extensions for consistency and clarity across wallet core and primitives modules. --- packages/wallet/core/src/anypay/intents.ts | 4 ++-- packages/wallet/core/src/preconditions/codec.ts | 2 +- packages/wallet/core/src/preconditions/index.ts | 6 +++--- .../wallet/core/src/preconditions/selectors.ts | 4 ++-- packages/wallet/core/src/preconditions/types.ts | 2 +- packages/wallet/core/src/relayer/local.ts | 10 ++++++++++ packages/wallet/core/src/relayer/rpc/index.ts | 14 +++++++------- packages/wallet/primitives/src/index.ts | 1 + 8 files changed, 27 insertions(+), 16 deletions(-) diff --git a/packages/wallet/core/src/anypay/intents.ts b/packages/wallet/core/src/anypay/intents.ts index 4ddd8d643..73ad59ccb 100644 --- a/packages/wallet/core/src/anypay/intents.ts +++ b/packages/wallet/core/src/anypay/intents.ts @@ -56,7 +56,7 @@ function createIntentConfiguration(operations: IntentOperation[], mainSigner: Ad calls: op.calls.map((call) => ({ to: call.to, value: call.value, - data: call.data, + data: Bytes.toHex(call.data), gasLimit: call.gasLimit, delegateCall: call.delegateCall, onlyFallback: call.onlyFallback, @@ -71,7 +71,7 @@ function createIntentConfiguration(operations: IntentOperation[], mainSigner: Ad // Create subdigest leaf return { type: 'any-address-subdigest', - digest, + digest: Bytes.toHex(digest), } as Config.AnyAddressSubdigestLeaf }) diff --git a/packages/wallet/core/src/preconditions/codec.ts b/packages/wallet/core/src/preconditions/codec.ts index 2b688330a..a6c2a13f7 100644 --- a/packages/wallet/core/src/preconditions/codec.ts +++ b/packages/wallet/core/src/preconditions/codec.ts @@ -8,7 +8,7 @@ import { Erc721ApprovalPrecondition, Erc1155BalancePrecondition, Erc1155ApprovalPrecondition, -} from './types' +} from './types.js' export interface IntentPrecondition { type: string diff --git a/packages/wallet/core/src/preconditions/index.ts b/packages/wallet/core/src/preconditions/index.ts index eb3308acf..6bb6376ef 100644 --- a/packages/wallet/core/src/preconditions/index.ts +++ b/packages/wallet/core/src/preconditions/index.ts @@ -1,3 +1,3 @@ -export * from './types' -export * from './codec' -export * from './selectors' +export * from './types.js' +export * from './codec.js' +export * from './selectors.js' diff --git a/packages/wallet/core/src/preconditions/selectors.ts b/packages/wallet/core/src/preconditions/selectors.ts index 06f479fb1..0f38b092f 100644 --- a/packages/wallet/core/src/preconditions/selectors.ts +++ b/packages/wallet/core/src/preconditions/selectors.ts @@ -1,5 +1,5 @@ -import { Precondition, NativeBalancePrecondition, Erc20BalancePrecondition } from './types' -import { IntentPrecondition, decodePreconditions } from './codec' +import { Precondition, NativeBalancePrecondition, Erc20BalancePrecondition } from './types.js' +import { IntentPrecondition, decodePreconditions } from './codec.js' export function extractChainID(precondition: IntentPrecondition): bigint | undefined { if (!precondition) { diff --git a/packages/wallet/core/src/preconditions/types.ts b/packages/wallet/core/src/preconditions/types.ts index 2735f32af..23a9db22c 100644 --- a/packages/wallet/core/src/preconditions/types.ts +++ b/packages/wallet/core/src/preconditions/types.ts @@ -1,4 +1,4 @@ -import { Address, Bytes, Hex } from 'ox' +import { Address } from 'ox' export interface Precondition { type(): string diff --git a/packages/wallet/core/src/relayer/local.ts b/packages/wallet/core/src/relayer/local.ts index 9496b2208..29a019df7 100644 --- a/packages/wallet/core/src/relayer/local.ts +++ b/packages/wallet/core/src/relayer/local.ts @@ -1,6 +1,16 @@ import { Constants, Payload } from '@0xsequence/wallet-primitives' import { AbiFunction, Address, Bytes, Hex } from 'ox' import { FeeOption, FeeQuote, OperationStatus, Relayer } from './relayer.js' +import { IntentPrecondition } from './rpc/relayer.gen.js' +import { decodePrecondition } from '../preconditions/index.js' +import { + erc20BalanceOf, + erc20Allowance, + erc721OwnerOf, + erc721GetApproved, + erc1155BalanceOf, + erc1155IsApprovedForAll, +} from './abi.js' export interface GenericProvider { sendTransaction(args: { to: string; data: string }): Promise diff --git a/packages/wallet/core/src/relayer/rpc/index.ts b/packages/wallet/core/src/relayer/rpc/index.ts index b9b3930b7..ebc4d4afc 100644 --- a/packages/wallet/core/src/relayer/rpc/index.ts +++ b/packages/wallet/core/src/relayer/rpc/index.ts @@ -4,8 +4,8 @@ import { MetaTxn as RpcMetaTxn, FeeTokenType, IntentPrecondition, -} from './relayer.gen' -import { FeeOption, FeeQuote, OperationStatus, Relayer } from '../relayer' +} from './relayer.gen.js' +import { FeeOption, FeeQuote, OperationStatus, Relayer } from '../relayer.js' import { Address, Hex, Bytes, AbiFunction } from 'ox' import { Payload, Precondition as PrimitivePrecondition } from '@0xsequence/wallet-primitives' import { @@ -13,8 +13,8 @@ import { ETHTxnStatus, FeeOption as RpcFeeOption, FeeToken as RpcFeeToken, -} from './relayer.gen' -import { decodePrecondition } from '../../preconditions' +} from './relayer.gen.js' +import { decodePrecondition } from '../../preconditions/index.js' import { erc20BalanceOf, erc20Allowance, @@ -22,18 +22,18 @@ import { erc721GetApproved, erc1155BalanceOf, erc1155IsApprovedForAll, -} from '../abi' +} from '../abi.js' import { PublicClient, createPublicClient, http, Chain } from 'viem' import * as chains from 'viem/chains' export type Fetch = (input: RequestInfo, init?: RequestInit) => Promise export const getChain = (chainId: number): Chain => { - const chain = Object.values(chains).find((c) => c.id === chainId) + const chain = Object.values(chains).find((c: any) => typeof c === 'object' && 'id' in c && c.id === chainId) if (!chain) { throw new Error(`Chain with id ${chainId} not found`) } - return chain + return chain as Chain } export class RpcRelayer implements Relayer { diff --git a/packages/wallet/primitives/src/index.ts b/packages/wallet/primitives/src/index.ts index 47aa05e4e..2b4c146c5 100644 --- a/packages/wallet/primitives/src/index.ts +++ b/packages/wallet/primitives/src/index.ts @@ -4,6 +4,7 @@ export * as Constants from './constants.js' export * as Erc6492 from './erc-6492.js' export * as Payload from './payload.js' export * as Permission from './permission.js' +export * as Precondition from './precondition.js' export * as SessionConfig from './session-config.js' export * as SessionSignature from './session-signature.js' export * as Signature from './signature.js' From ff45804c0c1e825f99db96e1f2ac66928c38411e Mon Sep 17 00:00:00 2001 From: Shun Kakinoki Date: Tue, 29 Apr 2025 14:08:51 +0900 Subject: [PATCH 410/439] Update export statement in AnyPay module to include file extension for consistency with other modules. --- packages/wallet/core/src/anypay/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/wallet/core/src/anypay/index.ts b/packages/wallet/core/src/anypay/index.ts index 60285be88..6ec67f31f 100644 --- a/packages/wallet/core/src/anypay/index.ts +++ b/packages/wallet/core/src/anypay/index.ts @@ -1 +1 @@ -export * from './intents' +export * from './intents.js' From 21d75ff4697c075ab8aacf67d34bb28453e44594 Mon Sep 17 00:00:00 2001 From: Shun Kakinoki Date: Tue, 29 Apr 2025 14:13:22 +0900 Subject: [PATCH 411/439] Refactor AnyPay test suite to improve clarity and consistency. Update import statements to include Hex type for better type safety, and streamline precondition data structure by adding chainId. Remove unnecessary mock provider setup for cleaner test code. --- packages/wallet/core/test/anypay.test.ts | 57 +- pnpm-lock.yaml | 3227 ++++++++++++++++++++-- 2 files changed, 3046 insertions(+), 238 deletions(-) diff --git a/packages/wallet/core/test/anypay.test.ts b/packages/wallet/core/test/anypay.test.ts index 3a82c466d..a5747746e 100644 --- a/packages/wallet/core/test/anypay.test.ts +++ b/packages/wallet/core/test/anypay.test.ts @@ -1,6 +1,7 @@ -import { Address, Bytes, Provider, RpcTransport, Secp256k1, AbiFunction } from 'ox' +import { Address, Bytes, Provider, Hex, RpcTransport, Secp256k1, AbiFunction } from 'ox' import { Context, Payload } from '@0xsequence/wallet-primitives' import { LocalRelayer } from '../src/relayer/local' +import { describe, it, expect } from 'vitest' import { NativeBalancePrecondition, Erc20BalancePrecondition, @@ -10,9 +11,11 @@ import { Erc1155BalancePrecondition, Erc1155ApprovalPrecondition, } from '../src/preconditions/types' -import { CAN_RUN_LIVE, ERC20_IMPLICIT_MINT_CONTRACT, RPC_URL } from './constants' +import { CAN_RUN_LIVE, RPC_URL } from './constants' import { calculateIntentConfigurationAddress, IntentOperation } from '../src/anypay/intents' +const ERC20_IMPLICIT_MINT_CONTRACT = '0x041E0CDC028050519C8e6485B2d9840caf63773F' + function randomAddress(): Address.Address { return Address.fromPublicKey(Secp256k1.getPublicKey({ privateKey: Secp256k1.randomPrivateKey() })) } @@ -24,15 +27,6 @@ describe('AnyPay Preconditions', () => { if (CAN_RUN_LIVE) { provider = Provider.from(RpcTransport.fromHttp(RPC_URL!!)) chainId = BigInt(await provider.request({ method: 'eth_chainId' })) - } else { - provider = { - request: jest.fn(), - on: jest.fn(), - removeListener: jest.fn(), - sendTransaction: jest.fn(), - getBalance: jest.fn(), - call: jest.fn(), - } as unknown as Provider.Provider } return { provider: provider!, chainId } } @@ -47,10 +41,6 @@ describe('AnyPay Preconditions', () => { } } - beforeEach(() => { - jest.clearAllMocks() - }) - it('should create and check native balance precondition', async () => { const { provider, chainId } = await getProvider() const relayer = new LocalRelayer(provider as any) @@ -63,6 +53,7 @@ describe('AnyPay Preconditions', () => { const intentPrecondition = { type: precondition.type(), + chainId: chainId.toString(), data: JSON.stringify({ address: precondition.address.toString(), min: precondition.min?.toString(), @@ -93,6 +84,7 @@ describe('AnyPay Preconditions', () => { const intentPrecondition = { type: precondition.type(), + chainId: chainId.toString(), data: JSON.stringify({ address: precondition.address.toString(), token: precondition.token.toString(), @@ -125,6 +117,7 @@ describe('AnyPay Preconditions', () => { const intentPrecondition = { type: precondition.type(), + chainId: chainId.toString(), data: JSON.stringify({ address: precondition.address.toString(), token: precondition.token.toString(), @@ -156,6 +149,7 @@ describe('AnyPay Preconditions', () => { const intentPrecondition = { type: precondition.type(), + chainId: chainId.toString(), data: JSON.stringify({ address: precondition.address.toString(), token: precondition.token.toString(), @@ -190,6 +184,7 @@ describe('AnyPay Preconditions', () => { const intentPrecondition = { type: precondition.type(), + chainId: chainId.toString(), data: JSON.stringify({ address: precondition.address.toString(), token: precondition.token.toString(), @@ -224,6 +219,7 @@ describe('AnyPay Preconditions', () => { const intentPrecondition = { type: precondition.type(), + chainId: chainId.toString(), data: JSON.stringify({ address: precondition.address.toString(), token: precondition.token.toString(), @@ -258,6 +254,7 @@ describe('AnyPay Preconditions', () => { const intentPrecondition = { type: precondition.type(), + chainId: chainId.toString(), data: JSON.stringify({ address: precondition.address.toString(), token: precondition.token.toString(), @@ -290,6 +287,7 @@ describe('AnyPay Preconditions', () => { const intentPrecondition = { type: precondition.type(), + chainId: chainId.toString(), data: JSON.stringify({ address: precondition.address.toString(), token: precondition.token.toString(), @@ -324,8 +322,9 @@ describe('AnyPay Preconditions', () => { // Create context const context: Context.Context = { factory: randomAddress(), - creationCode: '0x' as `0x${string}`, - stage1: '0x' as `0x${string}`, + creationCode: '0x' as Hex.Hex, + stage1: '0x' as Hex.Hex, + stage2: '0x' as Hex.Hex, } // Calculate intent configuration address @@ -340,7 +339,7 @@ describe('AnyPay Preconditions', () => { { to: ERC20_IMPLICIT_MINT_CONTRACT, value: 0n, - data: Bytes.fromHex('0x'), + data: '0x' as Hex.Hex, gasLimit: 0n, delegateCall: false, onlyFallback: false, @@ -363,9 +362,9 @@ describe('AnyPay Preconditions', () => { const transferAmount = 1500000n const erc20Transfer = AbiFunction.from('function transfer(address,uint256) returns (bool)') const transferData = AbiFunction.encodeData(erc20Transfer, [ - testWalletAddress.toString() as `0x${string}`, + testWalletAddress.toString() as Hex.Hex, transferAmount, - ]) as `0x${string}` + ]) as Hex.Hex await provider.request({ method: 'eth_sendTransaction', params: [ @@ -393,7 +392,7 @@ describe('AnyPay Preconditions', () => { { to: ERC20_IMPLICIT_MINT_CONTRACT, value: 0n, - data: Bytes.fromHex('0x'), + data: '0x' as Hex.Hex, gasLimit: 0n, delegateCall: false, onlyFallback: false, @@ -443,6 +442,7 @@ describe('AnyPay Preconditions', () => { const intentPreconditions = [ { type: nativePrecondition.type(), + chainId: chainId.toString(), data: JSON.stringify({ address: nativePrecondition.address.toString(), min: nativePrecondition.min?.toString(), @@ -450,6 +450,7 @@ describe('AnyPay Preconditions', () => { }, { type: erc20Precondition.type(), + chainId: chainId.toString(), data: JSON.stringify({ address: erc20Precondition.address.toString(), token: erc20Precondition.token.toString(), @@ -461,8 +462,9 @@ describe('AnyPay Preconditions', () => { // Create context const context: Context.Context = { factory: randomAddress(), - creationCode: Bytes.toHex(Bytes.fromHex('0x')) as `0x${string}`, - stage1: Bytes.toHex(Bytes.fromHex('0x')) as `0x${string}`, + creationCode: Bytes.toHex(Bytes.fromHex('0x')) as Hex.Hex, + stage1: Bytes.toHex(Bytes.fromHex('0x')) as Hex.Hex, + stage2: Bytes.toHex(Bytes.fromHex('0x')) as Hex.Hex, } // Calculate intent configuration address @@ -498,6 +500,7 @@ describe('AnyPay Preconditions', () => { const intentPreconditions = [ { type: nativePrecondition.type(), + chainId: chainId.toString(), data: JSON.stringify({ address: nativePrecondition.address.toString(), min: nativePrecondition.min?.toString(), @@ -505,6 +508,7 @@ describe('AnyPay Preconditions', () => { }, { type: erc20Precondition.type(), + chainId: chainId.toString(), data: JSON.stringify({ address: erc20Precondition.address.toString(), token: erc20Precondition.token.toString(), @@ -532,8 +536,9 @@ describe('AnyPay Preconditions', () => { // Create context const context: Context.Context = { factory: randomAddress(), - creationCode: Bytes.toHex(Bytes.fromHex('0x')) as `0x${string}`, - stage1: Bytes.toHex(Bytes.fromHex('0x')) as `0x${string}`, + creationCode: Bytes.toHex(Bytes.fromHex('0x')) as Hex.Hex, + stage1: Bytes.toHex(Bytes.fromHex('0x')) as Hex.Hex, + stage2: Bytes.toHex(Bytes.fromHex('0x')) as Hex.Hex, } // Calculate intent configuration address @@ -564,7 +569,7 @@ describe('AnyPay Preconditions', () => { if (!CAN_RUN_LIVE) { expect((provider as any).sendTransaction).toHaveBeenCalledWith({ to: configAddress, - data: '0x', + data: '0x' as Hex.Hex, }) } }) diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 4d27e7d95..df4e551e2 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -37,7 +37,7 @@ importers: version: 2.1.6(@types/react-dom@19.1.2(@types/react@19.1.2))(@types/react@19.1.2)(motion@12.7.2(react-dom@19.0.0(react@19.0.0))(react@19.0.0))(react-dom@19.0.0(react@19.0.0))(react@19.0.0) '@0xsequence/hooks': specifier: ^5.1.0 - version: 5.1.1(@0xsequence/api@packages+services+api)(@0xsequence/indexer@2.3.9)(@0xsequence/metadata@2.3.8)(@0xsequence/network@2.3.9(ethers@6.13.5(bufferutil@4.0.9)(utf-8-validate@5.0.10)))(@tanstack/react-query@5.74.3(react@19.0.0))(react-dom@19.0.0(react@19.0.0))(react@19.0.0)(viem@2.27.2(bufferutil@4.0.9)(typescript@5.7.3)(utf-8-validate@5.0.10)(zod@3.24.2)) + version: 5.1.1(@0xsequence/api@packages+services+api)(@0xsequence/indexer@2.3.9)(@0xsequence/metadata@2.3.8)(@0xsequence/network@2.3.9(ethers@6.13.5(bufferutil@4.0.9)(utf-8-validate@5.0.10)))(@tanstack/react-query@5.74.3(react@19.0.0))(react-dom@19.0.0(react@19.0.0))(react@19.0.0)(viem@2.28.0(bufferutil@4.0.9)(typescript@5.7.3)(utf-8-validate@5.0.10)(zod@3.24.2)) '@0xsequence/indexer': specifier: ^2.3.9 version: 2.3.9 @@ -46,7 +46,7 @@ importers: version: 2.3.9(ethers@6.13.5(bufferutil@4.0.9)(utf-8-validate@5.0.10)) '@0xsequence/wagmi-connector': specifier: ^4.0.1 - version: 4.0.1(0xsequence@2.3.8(ethers@6.13.5(bufferutil@4.0.9)(utf-8-validate@5.0.10)))(ethers@6.13.5(bufferutil@4.0.9)(utf-8-validate@5.0.10))(viem@2.27.2(bufferutil@4.0.9)(typescript@5.7.3)(utf-8-validate@5.0.10)(zod@3.24.2))(wagmi@2.14.16(@tanstack/query-core@5.74.3)(@tanstack/react-query@5.74.3(react@19.0.0))(@types/react@19.1.2)(bufferutil@4.0.9)(react@19.0.0)(typescript@5.7.3)(utf-8-validate@5.0.10)(viem@2.27.2(bufferutil@4.0.9)(typescript@5.7.3)(utf-8-validate@5.0.10)(zod@3.24.2))(zod@3.24.2)) + version: 4.0.1(0xsequence@2.3.8(ethers@6.13.5(bufferutil@4.0.9)(utf-8-validate@5.0.10)))(ethers@6.13.5(bufferutil@4.0.9)(utf-8-validate@5.0.10))(viem@2.28.0(bufferutil@4.0.9)(typescript@5.7.3)(utf-8-validate@5.0.10)(zod@3.24.2))(wagmi@2.15.0(@tanstack/query-core@5.74.3)(@tanstack/react-query@5.74.3(react@19.0.0))(@types/react@19.1.2)(bufferutil@4.0.9)(react@19.0.0)(typescript@5.7.3)(utf-8-validate@5.0.10)(viem@2.28.0(bufferutil@4.0.9)(typescript@5.7.3)(utf-8-validate@5.0.10)(zod@3.24.2))(zod@3.24.2)) '@0xsequence/wallet-core': specifier: workspace:* version: link:../../packages/wallet/core @@ -58,7 +58,7 @@ importers: version: link:../../packages/wallet/wdk '@radix-ui/react-popover': specifier: ^1.1.6 - version: 1.1.7(@types/react-dom@19.1.2(@types/react@19.1.2))(@types/react@19.1.2)(react-dom@19.0.0(react@19.0.0))(react@19.0.0) + version: 1.1.11(@types/react-dom@19.1.2(@types/react@19.1.2))(@types/react@19.1.2)(react-dom@19.0.0(react@19.0.0))(react@19.0.0) '@repo/eslint-config': specifier: workspace:* version: link:../../repo/eslint-config @@ -100,23 +100,23 @@ importers: version: 19.0.0(react@19.0.0) react-router: specifier: ^7.4.0 - version: 7.5.0(react-dom@19.0.0(react@19.0.0))(react@19.0.0) + version: 7.5.3(react-dom@19.0.0(react@19.0.0))(react@19.0.0) tailwindcss: specifier: ^4.0.15 version: 4.1.4 viem: specifier: ^2.24.1 - version: 2.27.2(bufferutil@4.0.9)(typescript@5.7.3)(utf-8-validate@5.0.10)(zod@3.24.2) + version: 2.28.0(bufferutil@4.0.9)(typescript@5.7.3)(utf-8-validate@5.0.10)(zod@3.24.2) wagmi: specifier: ^2.14.16 - version: 2.14.16(@tanstack/query-core@5.74.3)(@tanstack/react-query@5.74.3(react@19.0.0))(@types/react@19.1.2)(bufferutil@4.0.9)(react@19.0.0)(typescript@5.7.3)(utf-8-validate@5.0.10)(viem@2.27.2(bufferutil@4.0.9)(typescript@5.7.3)(utf-8-validate@5.0.10)(zod@3.24.2))(zod@3.24.2) + version: 2.15.0(@tanstack/query-core@5.74.3)(@tanstack/react-query@5.74.3(react@19.0.0))(@types/react@19.1.2)(bufferutil@4.0.9)(react@19.0.0)(typescript@5.7.3)(utf-8-validate@5.0.10)(viem@2.28.0(bufferutil@4.0.9)(typescript@5.7.3)(utf-8-validate@5.0.10)(zod@3.24.2))(zod@3.24.2) devDependencies: '@eslint/js': specifier: ^9.21.0 version: 9.24.0 '@tailwindcss/vite': specifier: ^4.0.15 - version: 4.1.4(vite@6.2.6(@types/node@22.13.9)(jiti@2.4.2)(lightningcss@1.29.2)) + version: 4.1.4(vite@6.3.2(@types/node@22.13.9)(jiti@2.4.2)(lightningcss@1.29.2)) '@types/react': specifier: ^19.0.10 version: 19.1.2 @@ -125,7 +125,7 @@ importers: version: 19.1.2(@types/react@19.1.2) '@vitejs/plugin-react': specifier: ^4.3.4 - version: 4.4.0(vite@6.2.6(@types/node@22.13.9)(jiti@2.4.2)(lightningcss@1.29.2)) + version: 4.4.1(vite@6.3.2(@types/node@22.13.9)(jiti@2.4.2)(lightningcss@1.29.2)) eslint: specifier: ^9.21.0 version: 9.24.0(jiti@2.4.2) @@ -155,7 +155,7 @@ importers: version: 8.30.1(eslint@9.24.0(jiti@2.4.2))(typescript@5.7.3) vite: specifier: ^6.2.0 - version: 6.2.6(@types/node@22.13.9)(jiti@2.4.2)(lightningcss@1.29.2) + version: 6.3.2(@types/node@22.13.9)(jiti@2.4.2)(lightningcss@1.29.2) zod: specifier: ^3.24.2 version: 3.24.2 @@ -334,7 +334,7 @@ importers: version: 0.7.0(typescript@5.8.3)(zod@3.24.2) viem: specifier: ^2.27.2 - version: 2.27.2(bufferutil@4.0.9)(typescript@5.8.3)(utf-8-validate@5.0.10)(zod@3.24.2) + version: 2.28.0(bufferutil@4.0.9)(typescript@5.8.3)(utf-8-validate@5.0.10)(zod@3.24.2) devDependencies: '@repo/typescript-config': specifier: workspace:^ @@ -350,7 +350,7 @@ importers: version: 5.8.3 vitest: specifier: ^3.1.2 - version: 3.1.2(@types/node@22.13.9)(happy-dom@13.10.1) + version: 3.1.2(@types/debug@4.1.12)(@types/node@22.13.9)(happy-dom@13.10.1)(jiti@2.4.2)(lightningcss@1.29.2) packages/wallet/primitives: dependencies: @@ -443,7 +443,7 @@ importers: version: 5.8.3 vitest: specifier: ^3.1.2 - version: 3.1.2(@types/node@22.13.9)(happy-dom@13.10.1) + version: 3.1.2(@types/debug@4.1.12)(@types/node@22.13.9)(happy-dom@13.10.1)(jiti@2.4.2)(lightningcss@1.29.2) repo/eslint-config: devDependencies: @@ -662,6 +662,77 @@ packages: '@adraffy/ens-normalize@1.11.0': resolution: {integrity: sha512-/3DDPKHqqIqxUULp8yP4zODUY1i+2xvVWsv8A79xGWdCAG+8sb0hRh0Rk2QyOJUnnbyPUAZYcpBuRe3nS2OIUg==} + '@ampproject/remapping@2.3.0': + resolution: {integrity: sha512-30iZtAPgz+LTIYoeivqYo853f02jBYSd5uGnGpkFV0M3xOt9aN73erkgYAmZU43x4VfqcnLxW9Kpg3R5LC4YYw==} + engines: {node: '>=6.0.0'} + + '@babel/code-frame@7.26.2': + resolution: {integrity: sha512-RJlIHRueQgwWitWgF8OdFYGZX328Ax5BCemNGlqHfplnRT9ESi8JkFlvaVYbS+UubVY6dpv87Fs2u5M29iNFVQ==} + engines: {node: '>=6.9.0'} + + '@babel/compat-data@7.26.8': + resolution: {integrity: sha512-oH5UPLMWR3L2wEFLnFJ1TZXqHufiTKAiLfqw5zkhS4dKXLJ10yVztfil/twG8EDTA4F/tvVNw9nOl4ZMslB8rQ==} + engines: {node: '>=6.9.0'} + + '@babel/core@7.26.10': + resolution: {integrity: sha512-vMqyb7XCDMPvJFFOaT9kxtiRh42GwlZEg1/uIgtZshS5a/8OaduUfCi7kynKgc3Tw/6Uo2D+db9qBttghhmxwQ==} + engines: {node: '>=6.9.0'} + + '@babel/generator@7.27.0': + resolution: {integrity: sha512-VybsKvpiN1gU1sdMZIp7FcqphVVKEwcuj02x73uvcHE0PTihx1nlBcowYWhDwjpoAXRv43+gDzyggGnn1XZhVw==} + engines: {node: '>=6.9.0'} + + '@babel/helper-compilation-targets@7.27.0': + resolution: {integrity: sha512-LVk7fbXml0H2xH34dFzKQ7TDZ2G4/rVTOrq9V+icbbadjbVxxeFeDsNHv2SrZeWoA+6ZiTyWYWtScEIW07EAcA==} + engines: {node: '>=6.9.0'} + + '@babel/helper-module-imports@7.25.9': + resolution: {integrity: sha512-tnUA4RsrmflIM6W6RFTLFSXITtl0wKjgpnLgXyowocVPrbYrLUXSBXDgTs8BlbmIzIdlBySRQjINYs2BAkiLtw==} + engines: {node: '>=6.9.0'} + + '@babel/helper-module-transforms@7.26.0': + resolution: {integrity: sha512-xO+xu6B5K2czEnQye6BHA7DolFFmS3LB7stHZFaOLb1pAwO1HWLS8fXA+eh0A2yIvltPVmx3eNNDBJA2SLHXFw==} + engines: {node: '>=6.9.0'} + peerDependencies: + '@babel/core': ^7.0.0 + + '@babel/helper-plugin-utils@7.26.5': + resolution: {integrity: sha512-RS+jZcRdZdRFzMyr+wcsaqOmld1/EqTghfaBGQQd/WnRdzdlvSZ//kF7U8VQTxf1ynZ4cjUcYgjVGx13ewNPMg==} + engines: {node: '>=6.9.0'} + + '@babel/helper-string-parser@7.25.9': + resolution: {integrity: sha512-4A/SCr/2KLd5jrtOMFzaKjVtAei3+2r/NChoBNoZ3EyP/+GlhoaEGoWOZUmFmoITP7zOJyHIMm+DYRd8o3PvHA==} + engines: {node: '>=6.9.0'} + + '@babel/helper-validator-identifier@7.25.9': + resolution: {integrity: sha512-Ed61U6XJc3CVRfkERJWDz4dJwKe7iLmmJsbOGu9wSloNSFttHV0I8g6UAgb7qnK5ly5bGLPd4oXZlxCdANBOWQ==} + engines: {node: '>=6.9.0'} + + '@babel/helper-validator-option@7.25.9': + resolution: {integrity: sha512-e/zv1co8pp55dNdEcCynfj9X7nyUKUXoUEwfXqaZt0omVOmDe9oOTdKStH4GmAw6zxMFs50ZayuMfHDKlO7Tfw==} + engines: {node: '>=6.9.0'} + + '@babel/helpers@7.27.0': + resolution: {integrity: sha512-U5eyP/CTFPuNE3qk+WZMxFkp/4zUzdceQlfzf7DdGdhp+Fezd7HD+i8Y24ZuTMKX3wQBld449jijbGq6OdGNQg==} + engines: {node: '>=6.9.0'} + + '@babel/parser@7.27.0': + resolution: {integrity: sha512-iaepho73/2Pz7w2eMS0Q5f83+0RKI7i4xmiYeBmDzfRVbQtTOG7Ts0S4HzJVsTMGI9keU8rNfuZr8DKfSt7Yyg==} + engines: {node: '>=6.0.0'} + hasBin: true + + '@babel/plugin-transform-react-jsx-self@7.25.9': + resolution: {integrity: sha512-y8quW6p0WHkEhmErnfe58r7x0A70uKphQm8Sp8cV7tjNQwK56sNVK0M73LK3WuYmsuyrftut4xAkjjgU0twaMg==} + engines: {node: '>=6.9.0'} + peerDependencies: + '@babel/core': ^7.0.0-0 + + '@babel/plugin-transform-react-jsx-source@7.25.9': + resolution: {integrity: sha512-+iqjT8xmXhhYv4/uiYd8FNQsraMFZIfxVSqxxVSZP0WbbSAWvBXAul0m/zu+7Vv4O/3WtApy9pmaTMiumEZgfg==} + engines: {node: '>=6.9.0'} + peerDependencies: + '@babel/core': ^7.0.0-0 + '@babel/runtime-corejs3@7.26.0': resolution: {integrity: sha512-YXHu5lN8kJCb1LOb9PgV6pvak43X2h4HvRApcN5SdWeaItQOzfn1hgP6jasD6KWQyJDBxrVmA9o9OivlnNJK/w==} engines: {node: '>=6.9.0'} @@ -670,6 +741,18 @@ packages: resolution: {integrity: sha512-FDSOghenHTiToteC/QRlv2q3DhPZ/oOXTBoirfWNx1Cx3TMVcGWQtMMmQcSvb/JjpNeGzx8Pq/b4fKEJuWm1sw==} engines: {node: '>=6.9.0'} + '@babel/template@7.27.0': + resolution: {integrity: sha512-2ncevenBqXI6qRMukPlXwHKHchC7RyMuu4xv5JBXRfOGVcTy1mXCD12qrp7Jsoxll1EV3+9sE4GugBVRjT2jFA==} + engines: {node: '>=6.9.0'} + + '@babel/traverse@7.27.0': + resolution: {integrity: sha512-19lYZFzYVQkkHkl4Cy4WrAVcqBkgvV2YM2TU3xG6DIwO7O3ecbDPfW3yM3bjAGcqcQHi+CCtjMR3dIEHxsd6bA==} + engines: {node: '>=6.9.0'} + + '@babel/types@7.27.0': + resolution: {integrity: sha512-H45s8fVLYjbhFH62dIJ3WtmJ6RSPt/3DRO0ZcT2SUiYiQyz3BLVb9ADEnLl91m74aQPS3AzzeajZHYOalWe3bg==} + engines: {node: '>=6.9.0'} + '@changesets/apply-release-plan@7.0.10': resolution: {integrity: sha512-wNyeIJ3yDsVspYvHnEz1xQDq18D9ifed3lI+wxRQRK4pArUcuHgCTrHv0QRnnwjhVCQACxZ+CBih3wgOct6UXw==} @@ -1131,13 +1214,24 @@ packages: resolution: {integrity: sha512-O8jcjabXaleOG9DQ0+ARXWZBTfnP4WNAqzuiJK7ll44AmxGKv/J2M4TPjxjY3znBCfvBXFzucm1twdyFybFqEA==} engines: {node: '>=12'} + '@jridgewell/gen-mapping@0.3.8': + resolution: {integrity: sha512-imAbBGkb+ebQyxKgzv5Hu2nmROxoDOXHh80evxdoXNOrvAnVx7zimzc1Oo5h9RlfV4vPXaE2iM5pOFbvOCClWA==} + engines: {node: '>=6.0.0'} + '@jridgewell/resolve-uri@3.1.2': resolution: {integrity: sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==} engines: {node: '>=6.0.0'} + '@jridgewell/set-array@1.2.1': + resolution: {integrity: sha512-R8gLRTZeyp03ymzP/6Lil/28tGeGEzhx1q2k703KGWRAI1VdvPIXdG70VJc2pAMw3NA6JKL5hhFu1sJX0Mnn/A==} + engines: {node: '>=6.0.0'} + '@jridgewell/sourcemap-codec@1.5.0': resolution: {integrity: sha512-gv3ZRaISU3fjPAgNsriBRqGWQL6quFx04YMPW/zD8XMLsU32mhCCbfbO6KZFLjvYpCZ8zyDEgqsgf+PwPaM7GQ==} + '@jridgewell/trace-mapping@0.3.25': + resolution: {integrity: sha512-vNk6aEwybGtawWmy/PzwnGDOjCkLWSD2wqvjGGAgOAwCGWySYXfYoxt00IJkTF+8Lb57DwOb3Aa0o9CApepiYQ==} + '@jridgewell/trace-mapping@0.3.9': resolution: {integrity: sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ==} @@ -1319,6 +1413,10 @@ packages: resolution: {integrity: sha512-warwspo+UYUPep0Q+vtdVB4Ugn8GGQj8iyB3gnRWsztmUHTI3S1nhdiWNsPUGL0vud7JlRRk1XEu7Lq1KGTnMQ==} engines: {node: ^14.21.3 || >=16} + '@noble/curves@1.8.2': + resolution: {integrity: sha512-vnI7V6lFNe0tLAuJMu+2sX+FcL14TaCWy1qiczg1VwRmPrpQCdq5ESXQMqUc2tluRNf6irBXrWbl1mGN8uaU/g==} + engines: {node: ^14.21.3 || >=16} + '@noble/hashes@1.3.2': resolution: {integrity: sha512-MVC8EAQp7MvEcm30KWENFjgR+Mkmf+D189XJTkFIlwohU5hcBbn1ZkKq7KVTi2Hme3PMGF390DaL52beVrIihQ==} engines: {node: '>= 16'} @@ -1335,6 +1433,10 @@ packages: resolution: {integrity: sha512-B8XBPsn4vT/KJAGqDzbwztd+6Yte3P4V7iafm24bxgDe/mlRuK6xmWPuCNrKt2vDafZ8MfJLlchDG/vYafQEjQ==} engines: {node: ^14.21.3 || >=16} + '@noble/hashes@1.7.2': + resolution: {integrity: sha512-biZ0NUSxyjLLqo6KxEJ1b+C2NAx0wtDoFvCaXHGgUkeHzf3Xc1xKumFKREuT7f7DARNZ/slvYUwFG6B0f2b6hQ==} + engines: {node: ^14.21.3 || >=16} + '@nodelib/fs.scandir@2.1.5': resolution: {integrity: sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==} engines: {node: '>= 8'} @@ -1347,121 +1449,588 @@ packages: resolution: {integrity: sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==} engines: {node: '>= 8'} - '@rollup/rollup-android-arm-eabi@4.40.0': - resolution: {integrity: sha512-+Fbls/diZ0RDerhE8kyC6hjADCXA1K4yVNlH0EYfd2XjyH0UGgzaQ8MlT0pCXAThfxv3QUAczHaL+qSv1E4/Cg==} - cpu: [arm] - os: [android] - - '@rollup/rollup-android-arm64@4.40.0': - resolution: {integrity: sha512-PPA6aEEsTPRz+/4xxAmaoWDqh67N7wFbgFUJGMnanCFs0TV99M0M8QhhaSCks+n6EbQoFvLQgYOGXxlMGQe/6w==} - cpu: [arm64] - os: [android] - - '@rollup/rollup-darwin-arm64@4.40.0': - resolution: {integrity: sha512-GwYOcOakYHdfnjjKwqpTGgn5a6cUX7+Ra2HeNj/GdXvO2VJOOXCiYYlRFU4CubFM67EhbmzLOmACKEfvp3J1kQ==} - cpu: [arm64] - os: [darwin] + '@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' - '@rollup/rollup-darwin-x64@4.40.0': - resolution: {integrity: sha512-CoLEGJ+2eheqD9KBSxmma6ld01czS52Iw0e2qMZNpPDlf7Z9mj8xmMemxEucinev4LgHalDPczMyxzbq+Q+EtA==} - cpu: [x64] - os: [darwin] + '@radix-ui/number@1.1.1': + resolution: {integrity: sha512-MkKCwxlXTgz6CFoJx3pCwn07GKp36+aZyu/u2Ln2VrA5DcdyCZkASEDBTd8x5whTQQL5CiYf4prXKLcgQdv29g==} - '@rollup/rollup-freebsd-arm64@4.40.0': - resolution: {integrity: sha512-r7yGiS4HN/kibvESzmrOB/PxKMhPTlz+FcGvoUIKYoTyGd5toHp48g1uZy1o1xQvybwwpqpe010JrcGG2s5nkg==} - cpu: [arm64] - os: [freebsd] + '@radix-ui/primitive@1.1.2': + resolution: {integrity: sha512-XnbHrrprsNqZKQhStrSwgRUQzoCI1glLzdw79xiZPoofhGICeZRSQ3dIxAKH1gb3OHfNf4d6f+vAv3kil2eggA==} - '@rollup/rollup-freebsd-x64@4.40.0': - resolution: {integrity: sha512-mVDxzlf0oLzV3oZOr0SMJ0lSDd3xC4CmnWJ8Val8isp9jRGl5Dq//LLDSPFrasS7pSm6m5xAcKaw3sHXhBjoRw==} - cpu: [x64] - os: [freebsd] + '@radix-ui/react-arrow@1.1.4': + resolution: {integrity: sha512-qz+fxrqgNxG0dYew5l7qR3c7wdgRu1XVUHGnGYX7rg5HM4p9SWaRmJwfgR3J0SgyUKayLmzQIun+N6rWRgiRKw==} + peerDependencies: + '@types/react': '*' + '@types/react-dom': '*' + react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc + react-dom: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc + peerDependenciesMeta: + '@types/react': + optional: true + '@types/react-dom': + optional: true - '@rollup/rollup-linux-arm-gnueabihf@4.40.0': - resolution: {integrity: sha512-y/qUMOpJxBMy8xCXD++jeu8t7kzjlOCkoxxajL58G62PJGBZVl/Gwpm7JK9+YvlB701rcQTzjUZ1JgUoPTnoQA==} - cpu: [arm] - os: [linux] + '@radix-ui/react-aspect-ratio@1.1.4': + resolution: {integrity: sha512-ie2mUDtM38LBqVU+Xn+GIY44tWM5yVbT5uXO+th85WZxUUsgEdWNNZWecqqGzkQ4Af+Fq1mYT6TyQ/uUf5gfcw==} + peerDependencies: + '@types/react': '*' + '@types/react-dom': '*' + react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc + react-dom: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc + peerDependenciesMeta: + '@types/react': + optional: true + '@types/react-dom': + optional: true - '@rollup/rollup-linux-arm-musleabihf@4.40.0': - resolution: {integrity: sha512-GoCsPibtVdJFPv/BOIvBKO/XmwZLwaNWdyD8TKlXuqp0veo2sHE+A/vpMQ5iSArRUz/uaoj4h5S6Pn0+PdhRjg==} - cpu: [arm] - os: [linux] + '@radix-ui/react-checkbox@1.2.3': + resolution: {integrity: sha512-pHVzDYsnaDmBlAuwim45y3soIN8H4R7KbkSVirGhXO+R/kO2OLCe0eucUEbddaTcdMHHdzcIGHtZSMSQlA+apw==} + peerDependencies: + '@types/react': '*' + '@types/react-dom': '*' + react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc + react-dom: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc + peerDependenciesMeta: + '@types/react': + optional: true + '@types/react-dom': + optional: true - '@rollup/rollup-linux-arm64-gnu@4.40.0': - resolution: {integrity: sha512-L5ZLphTjjAD9leJzSLI7rr8fNqJMlGDKlazW2tX4IUF9P7R5TMQPElpH82Q7eNIDQnQlAyiNVfRPfP2vM5Avvg==} - cpu: [arm64] - os: [linux] + '@radix-ui/react-collapsible@1.1.8': + resolution: {integrity: sha512-hxEsLvK9WxIAPyxdDRULL4hcaSjMZCfP7fHB0Z1uUnDoDBat1Zh46hwYfa69DeZAbJrPckjf0AGAtEZyvDyJbw==} + peerDependencies: + '@types/react': '*' + '@types/react-dom': '*' + react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc + react-dom: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc + peerDependenciesMeta: + '@types/react': + optional: true + '@types/react-dom': + optional: true - '@rollup/rollup-linux-arm64-musl@4.40.0': - resolution: {integrity: sha512-ATZvCRGCDtv1Y4gpDIXsS+wfFeFuLwVxyUBSLawjgXK2tRE6fnsQEkE4csQQYWlBlsFztRzCnBvWVfcae/1qxQ==} - cpu: [arm64] - os: [linux] + '@radix-ui/react-collection@1.1.4': + resolution: {integrity: sha512-cv4vSf7HttqXilDnAnvINd53OTl1/bjUYVZrkFnA7nwmY9Ob2POUy0WY0sfqBAe1s5FyKsyceQlqiEGPYNTadg==} + peerDependencies: + '@types/react': '*' + '@types/react-dom': '*' + react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc + react-dom: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc + peerDependenciesMeta: + '@types/react': + optional: true + '@types/react-dom': + optional: true - '@rollup/rollup-linux-loongarch64-gnu@4.40.0': - resolution: {integrity: sha512-wG9e2XtIhd++QugU5MD9i7OnpaVb08ji3P1y/hNbxrQ3sYEelKJOq1UJ5dXczeo6Hj2rfDEL5GdtkMSVLa/AOg==} - cpu: [loong64] - os: [linux] + '@radix-ui/react-compose-refs@1.1.2': + resolution: {integrity: sha512-z4eqJvfiNnFMHIIvXP3CY57y2WJs5g2v3X0zm9mEJkrkNv4rDxu+sg9Jh8EkXyeqBkB7SOcboo9dMVqhyrACIg==} + peerDependencies: + '@types/react': '*' + react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc + peerDependenciesMeta: + '@types/react': + optional: true - '@rollup/rollup-linux-powerpc64le-gnu@4.40.0': - resolution: {integrity: sha512-vgXfWmj0f3jAUvC7TZSU/m/cOE558ILWDzS7jBhiCAFpY2WEBn5jqgbqvmzlMjtp8KlLcBlXVD2mkTSEQE6Ixw==} - cpu: [ppc64] - os: [linux] + '@radix-ui/react-context@1.1.2': + resolution: {integrity: sha512-jCi/QKUM2r1Ju5a3J64TH2A5SpKAgh0LpknyqdQ4m6DCV0xJ2HG1xARRwNGPQfi1SLdLWZ1OJz6F4OMBBNiGJA==} + peerDependencies: + '@types/react': '*' + react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc + peerDependenciesMeta: + '@types/react': + optional: true - '@rollup/rollup-linux-riscv64-gnu@4.40.0': - resolution: {integrity: sha512-uJkYTugqtPZBS3Z136arevt/FsKTF/J9dEMTX/cwR7lsAW4bShzI2R0pJVw+hcBTWF4dxVckYh72Hk3/hWNKvA==} - cpu: [riscv64] - os: [linux] + '@radix-ui/react-dialog@1.1.11': + resolution: {integrity: sha512-yI7S1ipkP5/+99qhSI6nthfo/tR6bL6Zgxi/+1UO6qPa6UeM6nlafWcQ65vB4rU2XjgjMfMhI3k9Y5MztA62VQ==} + peerDependencies: + '@types/react': '*' + '@types/react-dom': '*' + react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc + react-dom: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc + peerDependenciesMeta: + '@types/react': + optional: true + '@types/react-dom': + optional: true - '@rollup/rollup-linux-riscv64-musl@4.40.0': - resolution: {integrity: sha512-rKmSj6EXQRnhSkE22+WvrqOqRtk733x3p5sWpZilhmjnkHkpeCgWsFFo0dGnUGeA+OZjRl3+VYq+HyCOEuwcxQ==} - cpu: [riscv64] - os: [linux] + '@radix-ui/react-direction@1.1.1': + resolution: {integrity: sha512-1UEWRX6jnOA2y4H5WczZ44gOOjTEmlqv1uNW4GAJEO5+bauCBhv8snY65Iw5/VOS/ghKN9gr2KjnLKxrsvoMVw==} + peerDependencies: + '@types/react': '*' + react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc + peerDependenciesMeta: + '@types/react': + optional: true - '@rollup/rollup-linux-s390x-gnu@4.40.0': - resolution: {integrity: sha512-SpnYlAfKPOoVsQqmTFJ0usx0z84bzGOS9anAC0AZ3rdSo3snecihbhFTlJZ8XMwzqAcodjFU4+/SM311dqE5Sw==} - cpu: [s390x] - os: [linux] + '@radix-ui/react-dismissable-layer@1.1.7': + resolution: {integrity: sha512-j5+WBUdhccJsmH5/H0K6RncjDtoALSEr6jbkaZu+bjw6hOPOhHycr6vEUujl+HBK8kjUfWcoCJXxP6e4lUlMZw==} + peerDependencies: + '@types/react': '*' + '@types/react-dom': '*' + react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc + react-dom: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc + peerDependenciesMeta: + '@types/react': + optional: true + '@types/react-dom': + optional: true - '@rollup/rollup-linux-x64-gnu@4.40.0': - resolution: {integrity: sha512-RcDGMtqF9EFN8i2RYN2W+64CdHruJ5rPqrlYw+cgM3uOVPSsnAQps7cpjXe9be/yDp8UC7VLoCoKC8J3Kn2FkQ==} - cpu: [x64] - os: [linux] + '@radix-ui/react-dropdown-menu@2.1.12': + resolution: {integrity: sha512-VJoMs+BWWE7YhzEQyVwvF9n22Eiyr83HotCVrMQzla/OwRovXCgah7AcaEr4hMNj4gJxSdtIbcHGvmJXOoJVHA==} + peerDependencies: + '@types/react': '*' + '@types/react-dom': '*' + react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc + react-dom: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc + peerDependenciesMeta: + '@types/react': + optional: true + '@types/react-dom': + optional: true - '@rollup/rollup-linux-x64-musl@4.40.0': - resolution: {integrity: sha512-HZvjpiUmSNx5zFgwtQAV1GaGazT2RWvqeDi0hV+AtC8unqqDSsaFjPxfsO6qPtKRRg25SisACWnJ37Yio8ttaw==} - cpu: [x64] - os: [linux] + '@radix-ui/react-focus-guards@1.1.2': + resolution: {integrity: sha512-fyjAACV62oPV925xFCrH8DR5xWhg9KYtJT4s3u54jxp+L/hbpTY2kIeEFFbFe+a/HCE94zGQMZLIpVTPVZDhaA==} + peerDependencies: + '@types/react': '*' + react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc + peerDependenciesMeta: + '@types/react': + optional: true - '@rollup/rollup-win32-arm64-msvc@4.40.0': - resolution: {integrity: sha512-UtZQQI5k/b8d7d3i9AZmA/t+Q4tk3hOC0tMOMSq2GlMYOfxbesxG4mJSeDp0EHs30N9bsfwUvs3zF4v/RzOeTQ==} - cpu: [arm64] - os: [win32] + '@radix-ui/react-focus-scope@1.1.4': + resolution: {integrity: sha512-r2annK27lIW5w9Ho5NyQgqs0MmgZSTIKXWpVCJaLC1q2kZrZkcqnmHkCHMEmv8XLvsLlurKMPT+kbKkRkm/xVA==} + peerDependencies: + '@types/react': '*' + '@types/react-dom': '*' + react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc + react-dom: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc + peerDependenciesMeta: + '@types/react': + optional: true + '@types/react-dom': + optional: true - '@rollup/rollup-win32-ia32-msvc@4.40.0': - resolution: {integrity: sha512-+m03kvI2f5syIqHXCZLPVYplP8pQch9JHyXKZ3AGMKlg8dCyr2PKHjwRLiW53LTrN/Nc3EqHOKxUxzoSPdKddA==} - cpu: [ia32] - os: [win32] + '@radix-ui/react-id@1.1.1': + resolution: {integrity: sha512-kGkGegYIdQsOb4XjsfM97rXsiHaBwco+hFI66oO4s9LU+PLAC5oJ7khdOVFxkhsmlbpUqDAvXw11CluXP+jkHg==} + peerDependencies: + '@types/react': '*' + react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc + peerDependenciesMeta: + '@types/react': + optional: true - '@rollup/rollup-win32-x64-msvc@4.40.0': - resolution: {integrity: sha512-lpPE1cLfP5oPzVjKMx10pgBmKELQnFJXHgvtHCtuJWOv8MxqdEIMNtgHgBFf7Ea2/7EuVwa9fodWUfXAlXZLZQ==} - cpu: [x64] - os: [win32] + '@radix-ui/react-menu@2.1.12': + resolution: {integrity: sha512-+qYq6LfbiGo97Zz9fioX83HCiIYYFNs8zAsVCMQrIakoNYylIzWuoD/anAD3UzvvR6cnswmfRFJFq/zYYq/k7Q==} + peerDependencies: + '@types/react': '*' + '@types/react-dom': '*' + react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc + react-dom: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc + peerDependenciesMeta: + '@types/react': + optional: true + '@types/react-dom': + optional: true - '@scure/base@1.2.4': - resolution: {integrity: sha512-5Yy9czTO47mqz+/J8GM6GIId4umdCk1wc1q8rKERQulIoc8VP9pzDcghv10Tl2E7R96ZUx/PhND3ESYUQX8NuQ==} + '@radix-ui/react-popover@1.1.11': + resolution: {integrity: sha512-yFMfZkVA5G3GJnBgb2PxrrcLKm1ZLWXrbYVgdyTl//0TYEIHS9LJbnyz7WWcZ0qCq7hIlJZpRtxeSeIG5T5oJw==} + peerDependencies: + '@types/react': '*' + '@types/react-dom': '*' + react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc + react-dom: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc + peerDependenciesMeta: + '@types/react': + optional: true + '@types/react-dom': + optional: true - '@scure/bip32@1.4.0': - resolution: {integrity: sha512-sVUpc0Vq3tXCkDGYVWGIZTRfnvu8LoTDaev7vbwh0omSvVORONr960MQWdKqJDCReIEmTj3PAr73O3aoxz7OPg==} + '@radix-ui/react-popper@1.2.4': + resolution: {integrity: sha512-3p2Rgm/a1cK0r/UVkx5F/K9v/EplfjAeIFCGOPYPO4lZ0jtg4iSQXt/YGTSLWaf4x7NG6Z4+uKFcylcTZjeqDA==} + peerDependencies: + '@types/react': '*' + '@types/react-dom': '*' + react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc + react-dom: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc + peerDependenciesMeta: + '@types/react': + optional: true + '@types/react-dom': + optional: true - '@scure/bip32@1.6.2': - resolution: {integrity: sha512-t96EPDMbtGgtb7onKKqxRLfE5g05k7uHnHRM2xdE6BP/ZmxaLtPek4J4KfVn/90IQNrU1IOAqMgiDtUdtbe3nw==} + '@radix-ui/react-portal@1.1.6': + resolution: {integrity: sha512-XmsIl2z1n/TsYFLIdYam2rmFwf9OC/Sh2avkbmVMDuBZIe7hSpM0cYnWPAo7nHOVx8zTuwDZGByfcqLdnzp3Vw==} + peerDependencies: + '@types/react': '*' + '@types/react-dom': '*' + react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc + react-dom: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc + peerDependenciesMeta: + '@types/react': + optional: true + '@types/react-dom': + optional: true - '@scure/bip39@1.3.0': + '@radix-ui/react-presence@1.1.4': + resolution: {integrity: sha512-ueDqRbdc4/bkaQT3GIpLQssRlFgWaL/U2z/S31qRwwLWoxHLgry3SIfCwhxeQNbirEUXFa+lq3RL3oBYXtcmIA==} + peerDependencies: + '@types/react': '*' + '@types/react-dom': '*' + react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc + react-dom: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc + peerDependenciesMeta: + '@types/react': + optional: true + '@types/react-dom': + optional: true + + '@radix-ui/react-primitive@2.1.0': + resolution: {integrity: sha512-/J/FhLdK0zVcILOwt5g+dH4KnkonCtkVJsa2G6JmvbbtZfBEI1gMsO3QMjseL4F/SwfAMt1Vc/0XKYKq+xJ1sw==} + peerDependencies: + '@types/react': '*' + '@types/react-dom': '*' + react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc + react-dom: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc + peerDependenciesMeta: + '@types/react': + optional: true + '@types/react-dom': + optional: true + + '@radix-ui/react-progress@1.1.4': + resolution: {integrity: sha512-8rl9w7lJdcVPor47Dhws9mUHRHLE+8JEgyJRdNWCpGPa6HIlr3eh+Yn9gyx1CnCLbw5naHsI2gaO9dBWO50vzw==} + peerDependencies: + '@types/react': '*' + '@types/react-dom': '*' + react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc + react-dom: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc + peerDependenciesMeta: + '@types/react': + optional: true + '@types/react-dom': + optional: true + + '@radix-ui/react-radio-group@1.3.4': + resolution: {integrity: sha512-N4J9QFdW5zcJNxxY/zwTXBN4Uc5VEuRM7ZLjNfnWoKmNvgrPtNNw4P8zY532O3qL6aPkaNO+gY9y6bfzmH4U1g==} + peerDependencies: + '@types/react': '*' + '@types/react-dom': '*' + react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc + react-dom: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc + peerDependenciesMeta: + '@types/react': + optional: true + '@types/react-dom': + optional: true + + '@radix-ui/react-roving-focus@1.1.7': + resolution: {integrity: sha512-C6oAg451/fQT3EGbWHbCQjYTtbyjNO1uzQgMzwyivcHT3GKNEmu1q3UuREhN+HzHAVtv3ivMVK08QlC+PkYw9Q==} + peerDependencies: + '@types/react': '*' + '@types/react-dom': '*' + react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc + react-dom: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc + peerDependenciesMeta: + '@types/react': + optional: true + '@types/react-dom': + optional: true + + '@radix-ui/react-select@2.2.2': + resolution: {integrity: sha512-HjkVHtBkuq+r3zUAZ/CvNWUGKPfuicGDbgtZgiQuFmNcV5F+Tgy24ep2nsAW2nFgvhGPJVqeBZa6KyVN0EyrBA==} + peerDependencies: + '@types/react': '*' + '@types/react-dom': '*' + react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc + react-dom: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc + peerDependenciesMeta: + '@types/react': + optional: true + '@types/react-dom': + optional: true + + '@radix-ui/react-slot@1.2.0': + resolution: {integrity: sha512-ujc+V6r0HNDviYqIK3rW4ffgYiZ8g5DEHrGJVk4x7kTlLXRDILnKX9vAUYeIsLOoDpDJ0ujpqMkjH4w2ofuo6w==} + peerDependencies: + '@types/react': '*' + react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc + peerDependenciesMeta: + '@types/react': + optional: true + + '@radix-ui/react-switch@1.2.2': + resolution: {integrity: sha512-7Z8n6L+ifMIIYZ83f28qWSceUpkXuslI2FJ34+kDMTiyj91ENdpdQ7VCidrzj5JfwfZTeano/BnGBbu/jqa5rQ==} + peerDependencies: + '@types/react': '*' + '@types/react-dom': '*' + react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc + react-dom: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc + peerDependenciesMeta: + '@types/react': + optional: true + '@types/react-dom': + optional: true + + '@radix-ui/react-tabs@1.1.9': + resolution: {integrity: sha512-KIjtwciYvquiW/wAFkELZCVnaNLBsYNhTNcvl+zfMAbMhRkcvNuCLXDDd22L0j7tagpzVh/QwbFpwAATg7ILPw==} + peerDependencies: + '@types/react': '*' + '@types/react-dom': '*' + react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc + react-dom: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc + peerDependenciesMeta: + '@types/react': + optional: true + '@types/react-dom': + optional: true + + '@radix-ui/react-toast@1.2.11': + resolution: {integrity: sha512-Ed2mlOmT+tktOsu2NZBK1bCSHh/uqULu1vWOkpQTVq53EoOuZUZw7FInQoDB3uil5wZc2oe0XN9a7uVZB7/6AQ==} + peerDependencies: + '@types/react': '*' + '@types/react-dom': '*' + react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc + react-dom: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc + peerDependenciesMeta: + '@types/react': + optional: true + '@types/react-dom': + optional: true + + '@radix-ui/react-tooltip@1.2.4': + resolution: {integrity: sha512-DyW8VVeeMSSLFvAmnVnCwvI3H+1tpJFHT50r+tdOoMse9XqYDBCcyux8u3G2y+LOpt7fPQ6KKH0mhs+ce1+Z5w==} + peerDependencies: + '@types/react': '*' + '@types/react-dom': '*' + react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc + react-dom: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc + peerDependenciesMeta: + '@types/react': + optional: true + '@types/react-dom': + optional: true + + '@radix-ui/react-use-callback-ref@1.1.1': + resolution: {integrity: sha512-FkBMwD+qbGQeMu1cOHnuGB6x4yzPjho8ap5WtbEJ26umhgqVXbhekKUQO+hZEL1vU92a3wHwdp0HAcqAUF5iDg==} + peerDependencies: + '@types/react': '*' + react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc + peerDependenciesMeta: + '@types/react': + optional: true + + '@radix-ui/react-use-controllable-state@1.2.2': + resolution: {integrity: sha512-BjasUjixPFdS+NKkypcyyN5Pmg83Olst0+c6vGov0diwTEo6mgdqVR6hxcEgFuh4QrAs7Rc+9KuGJ9TVCj0Zzg==} + peerDependencies: + '@types/react': '*' + react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc + peerDependenciesMeta: + '@types/react': + optional: true + + '@radix-ui/react-use-effect-event@0.0.2': + resolution: {integrity: sha512-Qp8WbZOBe+blgpuUT+lw2xheLP8q0oatc9UpmiemEICxGvFLYmHm9QowVZGHtJlGbS6A6yJ3iViad/2cVjnOiA==} + peerDependencies: + '@types/react': '*' + react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc + peerDependenciesMeta: + '@types/react': + optional: true + + '@radix-ui/react-use-escape-keydown@1.1.1': + resolution: {integrity: sha512-Il0+boE7w/XebUHyBjroE+DbByORGR9KKmITzbR7MyQ4akpORYP/ZmbhAr0DG7RmmBqoOnZdy2QlvajJ2QA59g==} + peerDependencies: + '@types/react': '*' + react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc + peerDependenciesMeta: + '@types/react': + optional: true + + '@radix-ui/react-use-layout-effect@1.1.1': + resolution: {integrity: sha512-RbJRS4UWQFkzHTTwVymMTUv8EqYhOp8dOOviLj2ugtTiXRaRQS7GLGxZTLL1jWhMeoSCf5zmcZkqTl9IiYfXcQ==} + peerDependencies: + '@types/react': '*' + react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc + peerDependenciesMeta: + '@types/react': + optional: true + + '@radix-ui/react-use-previous@1.1.1': + resolution: {integrity: sha512-2dHfToCj/pzca2Ck724OZ5L0EVrr3eHRNsG/b3xQJLA2hZpVCS99bLAX+hm1IHXDEnzU6by5z/5MIY794/a8NQ==} + peerDependencies: + '@types/react': '*' + react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc + peerDependenciesMeta: + '@types/react': + optional: true + + '@radix-ui/react-use-rect@1.1.1': + resolution: {integrity: sha512-QTYuDesS0VtuHNNvMh+CjlKJ4LJickCMUAqjlE3+j8w+RlRpwyX3apEQKGFzbZGdo7XNG1tXa+bQqIE7HIXT2w==} + peerDependencies: + '@types/react': '*' + react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc + peerDependenciesMeta: + '@types/react': + optional: true + + '@radix-ui/react-use-size@1.1.1': + resolution: {integrity: sha512-ewrXRDTAqAXlkl6t/fkXWNAhFX9I+CkKlw6zjEwk86RSPKwZr3xpBRso655aqYafwtnbpHLj6toFzmd6xdVptQ==} + peerDependencies: + '@types/react': '*' + react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc + peerDependenciesMeta: + '@types/react': + optional: true + + '@radix-ui/react-visually-hidden@1.2.0': + resolution: {integrity: sha512-rQj0aAWOpCdCMRbI6pLQm8r7S2BM3YhTa0SzOYD55k+hJA8oo9J+H+9wLM9oMlZWOX/wJWPTzfDfmZkf7LvCfg==} + peerDependencies: + '@types/react': '*' + '@types/react-dom': '*' + react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc + react-dom: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc + peerDependenciesMeta: + '@types/react': + optional: true + '@types/react-dom': + optional: true + + '@radix-ui/rect@1.1.1': + resolution: {integrity: sha512-HPwpGIzkl28mWyZqG52jiqDJ12waP11Pa1lGoiyUkIEuMLBP0oeK/C89esbXrxsky5we7dfd8U58nm0SgAWpVw==} + + '@rollup/rollup-android-arm-eabi@4.40.0': + resolution: {integrity: sha512-+Fbls/diZ0RDerhE8kyC6hjADCXA1K4yVNlH0EYfd2XjyH0UGgzaQ8MlT0pCXAThfxv3QUAczHaL+qSv1E4/Cg==} + cpu: [arm] + os: [android] + + '@rollup/rollup-android-arm64@4.40.0': + resolution: {integrity: sha512-PPA6aEEsTPRz+/4xxAmaoWDqh67N7wFbgFUJGMnanCFs0TV99M0M8QhhaSCks+n6EbQoFvLQgYOGXxlMGQe/6w==} + cpu: [arm64] + os: [android] + + '@rollup/rollup-darwin-arm64@4.40.0': + resolution: {integrity: sha512-GwYOcOakYHdfnjjKwqpTGgn5a6cUX7+Ra2HeNj/GdXvO2VJOOXCiYYlRFU4CubFM67EhbmzLOmACKEfvp3J1kQ==} + cpu: [arm64] + os: [darwin] + + '@rollup/rollup-darwin-x64@4.40.0': + resolution: {integrity: sha512-CoLEGJ+2eheqD9KBSxmma6ld01czS52Iw0e2qMZNpPDlf7Z9mj8xmMemxEucinev4LgHalDPczMyxzbq+Q+EtA==} + cpu: [x64] + os: [darwin] + + '@rollup/rollup-freebsd-arm64@4.40.0': + resolution: {integrity: sha512-r7yGiS4HN/kibvESzmrOB/PxKMhPTlz+FcGvoUIKYoTyGd5toHp48g1uZy1o1xQvybwwpqpe010JrcGG2s5nkg==} + cpu: [arm64] + os: [freebsd] + + '@rollup/rollup-freebsd-x64@4.40.0': + resolution: {integrity: sha512-mVDxzlf0oLzV3oZOr0SMJ0lSDd3xC4CmnWJ8Val8isp9jRGl5Dq//LLDSPFrasS7pSm6m5xAcKaw3sHXhBjoRw==} + cpu: [x64] + os: [freebsd] + + '@rollup/rollup-linux-arm-gnueabihf@4.40.0': + resolution: {integrity: sha512-y/qUMOpJxBMy8xCXD++jeu8t7kzjlOCkoxxajL58G62PJGBZVl/Gwpm7JK9+YvlB701rcQTzjUZ1JgUoPTnoQA==} + cpu: [arm] + os: [linux] + + '@rollup/rollup-linux-arm-musleabihf@4.40.0': + resolution: {integrity: sha512-GoCsPibtVdJFPv/BOIvBKO/XmwZLwaNWdyD8TKlXuqp0veo2sHE+A/vpMQ5iSArRUz/uaoj4h5S6Pn0+PdhRjg==} + cpu: [arm] + os: [linux] + + '@rollup/rollup-linux-arm64-gnu@4.40.0': + resolution: {integrity: sha512-L5ZLphTjjAD9leJzSLI7rr8fNqJMlGDKlazW2tX4IUF9P7R5TMQPElpH82Q7eNIDQnQlAyiNVfRPfP2vM5Avvg==} + cpu: [arm64] + os: [linux] + + '@rollup/rollup-linux-arm64-musl@4.40.0': + resolution: {integrity: sha512-ATZvCRGCDtv1Y4gpDIXsS+wfFeFuLwVxyUBSLawjgXK2tRE6fnsQEkE4csQQYWlBlsFztRzCnBvWVfcae/1qxQ==} + cpu: [arm64] + os: [linux] + + '@rollup/rollup-linux-loongarch64-gnu@4.40.0': + resolution: {integrity: sha512-wG9e2XtIhd++QugU5MD9i7OnpaVb08ji3P1y/hNbxrQ3sYEelKJOq1UJ5dXczeo6Hj2rfDEL5GdtkMSVLa/AOg==} + cpu: [loong64] + os: [linux] + + '@rollup/rollup-linux-powerpc64le-gnu@4.40.0': + resolution: {integrity: sha512-vgXfWmj0f3jAUvC7TZSU/m/cOE558ILWDzS7jBhiCAFpY2WEBn5jqgbqvmzlMjtp8KlLcBlXVD2mkTSEQE6Ixw==} + cpu: [ppc64] + os: [linux] + + '@rollup/rollup-linux-riscv64-gnu@4.40.0': + resolution: {integrity: sha512-uJkYTugqtPZBS3Z136arevt/FsKTF/J9dEMTX/cwR7lsAW4bShzI2R0pJVw+hcBTWF4dxVckYh72Hk3/hWNKvA==} + cpu: [riscv64] + os: [linux] + + '@rollup/rollup-linux-riscv64-musl@4.40.0': + resolution: {integrity: sha512-rKmSj6EXQRnhSkE22+WvrqOqRtk733x3p5sWpZilhmjnkHkpeCgWsFFo0dGnUGeA+OZjRl3+VYq+HyCOEuwcxQ==} + cpu: [riscv64] + os: [linux] + + '@rollup/rollup-linux-s390x-gnu@4.40.0': + resolution: {integrity: sha512-SpnYlAfKPOoVsQqmTFJ0usx0z84bzGOS9anAC0AZ3rdSo3snecihbhFTlJZ8XMwzqAcodjFU4+/SM311dqE5Sw==} + cpu: [s390x] + os: [linux] + + '@rollup/rollup-linux-x64-gnu@4.40.0': + resolution: {integrity: sha512-RcDGMtqF9EFN8i2RYN2W+64CdHruJ5rPqrlYw+cgM3uOVPSsnAQps7cpjXe9be/yDp8UC7VLoCoKC8J3Kn2FkQ==} + cpu: [x64] + os: [linux] + + '@rollup/rollup-linux-x64-musl@4.40.0': + resolution: {integrity: sha512-HZvjpiUmSNx5zFgwtQAV1GaGazT2RWvqeDi0hV+AtC8unqqDSsaFjPxfsO6qPtKRRg25SisACWnJ37Yio8ttaw==} + cpu: [x64] + os: [linux] + + '@rollup/rollup-win32-arm64-msvc@4.40.0': + resolution: {integrity: sha512-UtZQQI5k/b8d7d3i9AZmA/t+Q4tk3hOC0tMOMSq2GlMYOfxbesxG4mJSeDp0EHs30N9bsfwUvs3zF4v/RzOeTQ==} + cpu: [arm64] + os: [win32] + + '@rollup/rollup-win32-ia32-msvc@4.40.0': + resolution: {integrity: sha512-+m03kvI2f5syIqHXCZLPVYplP8pQch9JHyXKZ3AGMKlg8dCyr2PKHjwRLiW53LTrN/Nc3EqHOKxUxzoSPdKddA==} + cpu: [ia32] + os: [win32] + + '@rollup/rollup-win32-x64-msvc@4.40.0': + resolution: {integrity: sha512-lpPE1cLfP5oPzVjKMx10pgBmKELQnFJXHgvtHCtuJWOv8MxqdEIMNtgHgBFf7Ea2/7EuVwa9fodWUfXAlXZLZQ==} + cpu: [x64] + os: [win32] + + '@safe-global/safe-apps-provider@0.18.6': + resolution: {integrity: sha512-4LhMmjPWlIO8TTDC2AwLk44XKXaK6hfBTWyljDm0HQ6TWlOEijVWNrt2s3OCVMSxlXAcEzYfqyu1daHZooTC2Q==} + + '@safe-global/safe-apps-sdk@9.1.0': + resolution: {integrity: sha512-N5p/ulfnnA2Pi2M3YeWjULeWbjo7ei22JwU/IXnhoHzKq3pYCN6ynL9mJBOlvDVv892EgLPCWCOwQk/uBT2v0Q==} + + '@safe-global/safe-gateway-typescript-sdk@3.23.1': + resolution: {integrity: sha512-6ORQfwtEJYpalCeVO21L4XXGSdbEMfyp2hEv6cP82afKXSwvse6d3sdelgaPWUxHIsFRkWvHDdzh8IyyKHZKxw==} + engines: {node: '>=16'} + + '@scure/base@1.1.9': + resolution: {integrity: sha512-8YKhl8GHiNI/pU2VMaofa2Tor7PJRAjwQLBBuilkJ9L5+13yVbC7JO/wS7piioAvPSwR3JKM1IJ/u4xQzbcXKg==} + + '@scure/base@1.2.4': + resolution: {integrity: sha512-5Yy9czTO47mqz+/J8GM6GIId4umdCk1wc1q8rKERQulIoc8VP9pzDcghv10Tl2E7R96ZUx/PhND3ESYUQX8NuQ==} + + '@scure/bip32@1.4.0': + resolution: {integrity: sha512-sVUpc0Vq3tXCkDGYVWGIZTRfnvu8LoTDaev7vbwh0omSvVORONr960MQWdKqJDCReIEmTj3PAr73O3aoxz7OPg==} + + '@scure/bip32@1.6.2': + resolution: {integrity: sha512-t96EPDMbtGgtb7onKKqxRLfE5g05k7uHnHRM2xdE6BP/ZmxaLtPek4J4KfVn/90IQNrU1IOAqMgiDtUdtbe3nw==} + + '@scure/bip39@1.3.0': resolution: {integrity: sha512-disdg7gHuTDZtY+ZdkmLpPCk7fxZSu3gBiEGuoC1XYxv9cGx3Z6cpTggCgW6odSOOIXCiDjuGejW+aJKCY/pIQ==} '@scure/bip39@1.5.4': resolution: {integrity: sha512-TFM4ni0vKvCfBpohoh+/lY05i9gRbSwXWngAsF4CABQxoaOHijxuaZ2R6cStDQ5CHtHO9aGJTr4ksVJASRRyMA==} + '@socket.io/component-emitter@3.1.2': + resolution: {integrity: sha512-9BCxFwvbGg/RsZK9tjXd8s4UcwR0MWeFQ1XEKIQVVvAGJyINdrqKMcTRyLoK8Rse1GjzLV9cwjWV1olXRWEXVA==} + '@swc/counter@0.1.3': resolution: {integrity: sha512-e2BR4lsJkkRlKZ/qCHPw9ZaSxc0MVUd7gtbtaB7aMvHeJVYe8sOB8DBZkP2DtISHGSku9sCK6T6cnY0CtXrOCQ==} @@ -1589,6 +2158,21 @@ packages: resolution: {integrity: sha512-3uYg2b5TWCiupetbDFMbBFMHl33xQTvp5DNg0fZSYal73Z9AlFH9yWabHWMYw6ywmwM1evkYRpTVA2n7GgqT5A==} hasBin: true + '@types/babel__core@7.20.5': + resolution: {integrity: sha512-qoQprZvz5wQFJwMDqeseRXWv3rqMvhgpbXFfVyWhbx9X47POIA6i/+dXefEmZKoAgOaTdaIgNSMqMIU61yRyzA==} + + '@types/babel__generator@7.27.0': + resolution: {integrity: sha512-ufFd2Xi92OAVPYsy+P4n7/U7e68fex0+Ee8gSG9KX7eo084CWiQ4sdxktvdl0bOPupXtVJPY19zk6EwWqUQ8lg==} + + '@types/babel__template@7.4.4': + resolution: {integrity: sha512-h/NUaSyG5EyxBIp8YRxo4RMe2/qQgvyowRwVMzhYhBCONbW8PUsg4lkFMrhgZhUe5z3L3MiLDuvyJ/CaPa2A8A==} + + '@types/babel__traverse@7.20.7': + resolution: {integrity: sha512-dkO5fhS7+/oos4ciWxyEyjWe48zmG6wbCheo/G2ZnHx4fs3EU6YC6UM8rk56gAjNJ9P3MTH2jo5jb92/K6wbng==} + + '@types/debug@4.1.12': + resolution: {integrity: sha512-vIChWdVG3LG1SMxEvI/AK+FWJthlrqlTu7fbrlywTkkaONwk/UAGaULXRlf8vkzFBLVm0zkMdCquhL5aOjhXPQ==} + '@types/estree@1.0.6': resolution: {integrity: sha512-AYnb1nQyY49te+VRAVgmzfcgjYS91mY5P0TKUDCLEM+gNnA+3T6rWITXRLYCpahpqSQbN5cE+gHpnPyXjHWxcw==} @@ -1642,6 +2226,9 @@ packages: '@types/react@18.3.1': resolution: {integrity: sha512-V0kuGBX3+prX+DQ/7r2qsv1NsdfnCLnTgnRJ1pYnxykBhGMz+qj+box5lq7XsO5mtZsBqpjwwTu/7wszPfMBcw==} + '@types/react@19.1.2': + resolution: {integrity: sha512-oxLPMytKchWGbnQM9O7D67uPa9paTNxO7jVoNMXgkkErULBPhPARCfkKL9ytcIJJRGjbsVwW4ugJzyFFvm/Tiw==} + '@types/through@0.0.33': resolution: {integrity: sha512-HsJ+z3QuETzP3cswwtzt2vEIiHBk/dCcHGhbmG5X3ecnwFD/lPrMpliGXxSCg03L9AhrdwA4Oz/qfspkDW+xGQ==} @@ -1762,6 +2349,16 @@ packages: resolution: {integrity: sha512-h8vYOulWec9LhpwfAdZf2bjr8xIp0KNKnpgqSz0qqYYKAW/QZKw3ktRndbiAtUz4acH4QLQavwZBYCc0wulA/Q==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + '@typescript-eslint/visitor-keys@8.30.1': + resolution: {integrity: sha512-aEhgas7aJ6vZnNFC7K4/vMGDGyOiqWcYZPpIWrTKuTAlsvDNKy2GFDqh9smL+iq069ZvR0YzEeq0B8NJlLzjFA==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + + '@vitejs/plugin-react@4.4.1': + resolution: {integrity: sha512-IpEm5ZmeXAP/osiBXVVP5KjFMzbWOonMs0NaQQl+xYnUAcq4oHUBsF2+p4MgKWG4YMmFYJU8A6sxRPuowllm6w==} + engines: {node: ^14.18.0 || >=16.0.0} + peerDependencies: + vite: ^4.2.0 || ^5.0.0 || ^6.0.0 + '@vitest/expect@3.1.2': resolution: {integrity: sha512-O8hJgr+zREopCAqWl3uCVaOdqJwZ9qaDwUP7vy3Xigad0phZe9APxKhPcDNqYYi0rX5oMvwJMSCAXY2afqeTSA==} @@ -1791,6 +2388,109 @@ packages: '@vitest/utils@3.1.2': resolution: {integrity: sha512-5GGd0ytZ7BH3H6JTj9Kw7Prn1Nbg0wZVrIvou+UWxm54d+WoXXgAgjFJ8wn3LdagWLFSEfpPeyYrByZaGEZHLg==} + '@wagmi/connectors@5.7.13': + resolution: {integrity: sha512-FHvqlECFJAoWOm1PEvVY1Zo2iy9tfE1CB97ivVjSSYb4UGAHvRxg4cb2gXTfsF7z1a3QxtU/Q0VI1m4y0NP0gg==} + peerDependencies: + '@wagmi/core': 2.17.0 + typescript: '>=5.0.4' + viem: 2.x + peerDependenciesMeta: + typescript: + optional: true + + '@wagmi/core@2.17.0': + resolution: {integrity: sha512-MykiuU0rZUKtgVBctnOM+53zJmtodTD7rA97e7lLhXUevZcm60hUSl1BcgEIDd2wVOLEi2Xfrx641xpjruZvSA==} + peerDependencies: + '@tanstack/query-core': '>=5.0.0' + typescript: '>=5.0.4' + viem: 2.x + peerDependenciesMeta: + '@tanstack/query-core': + optional: true + typescript: + optional: true + + '@walletconnect/core@2.19.2': + resolution: {integrity: sha512-iu0mgLj51AXcKpdNj8+4EdNNBd/mkNjLEhZn6UMc/r7BM9WbmpPMEydA39WeRLbdLO4kbpmq4wTbiskI1rg+HA==} + engines: {node: '>=18'} + + '@walletconnect/environment@1.0.1': + resolution: {integrity: sha512-T426LLZtHj8e8rYnKfzsw1aG6+M0BT1ZxayMdv/p8yM0MU+eJDISqNY3/bccxRr4LrF9csq02Rhqt08Ibl0VRg==} + + '@walletconnect/ethereum-provider@2.19.2': + resolution: {integrity: sha512-NzPzNcjMLqow6ha2nssB1ciMD0cdHZesYcHSQKjCi9waIDMov9Fr2yEJccbiVFE3cxek7f9dCPsoZez2q8ihvg==} + + '@walletconnect/events@1.0.1': + resolution: {integrity: sha512-NPTqaoi0oPBVNuLv7qPaJazmGHs5JGyO8eEAk5VGKmJzDR7AHzD4k6ilox5kxk1iwiOnFopBOOMLs86Oa76HpQ==} + + '@walletconnect/heartbeat@1.2.2': + resolution: {integrity: sha512-uASiRmC5MwhuRuf05vq4AT48Pq8RMi876zV8rr8cV969uTOzWdB/k+Lj5yI2PBtB1bGQisGen7MM1GcZlQTBXw==} + + '@walletconnect/jsonrpc-http-connection@1.0.8': + resolution: {integrity: sha512-+B7cRuaxijLeFDJUq5hAzNyef3e3tBDIxyaCNmFtjwnod5AGis3RToNqzFU33vpVcxFhofkpE7Cx+5MYejbMGw==} + + '@walletconnect/jsonrpc-provider@1.0.14': + resolution: {integrity: sha512-rtsNY1XqHvWj0EtITNeuf8PHMvlCLiS3EjQL+WOkxEOA4KPxsohFnBDeyPYiNm4ZvkQdLnece36opYidmtbmow==} + + '@walletconnect/jsonrpc-types@1.0.4': + resolution: {integrity: sha512-P6679fG/M+wuWg9TY8mh6xFSdYnFyFjwFelxyISxMDrlbXokorEVXYOxiqEbrU3x1BmBoCAJJ+vtEaEoMlpCBQ==} + + '@walletconnect/jsonrpc-utils@1.0.8': + resolution: {integrity: sha512-vdeb03bD8VzJUL6ZtzRYsFMq1eZQcM3EAzT0a3st59dyLfJ0wq+tKMpmGH7HlB7waD858UWgfIcudbPFsbzVdw==} + + '@walletconnect/jsonrpc-ws-connection@1.0.16': + resolution: {integrity: sha512-G81JmsMqh5nJheE1mPst1W0WfVv0SG3N7JggwLLGnI7iuDZJq8cRJvQwLGKHn5H1WTW7DEPCo00zz5w62AbL3Q==} + + '@walletconnect/keyvaluestorage@1.1.1': + resolution: {integrity: sha512-V7ZQq2+mSxAq7MrRqDxanTzu2RcElfK1PfNYiaVnJgJ7Q7G7hTVwF8voIBx92qsRyGHZihrwNPHuZd1aKkd0rA==} + peerDependencies: + '@react-native-async-storage/async-storage': 1.x + peerDependenciesMeta: + '@react-native-async-storage/async-storage': + optional: true + + '@walletconnect/logger@2.1.2': + resolution: {integrity: sha512-aAb28I3S6pYXZHQm5ESB+V6rDqIYfsnHaQyzFbwUUBFY4H0OXx/YtTl8lvhUNhMMfb9UxbwEBS253TlXUYJWSw==} + + '@walletconnect/modal-core@2.7.0': + resolution: {integrity: sha512-oyMIfdlNdpyKF2kTJowTixZSo0PGlCJRdssUN/EZdA6H6v03hZnf09JnwpljZNfir2M65Dvjm/15nGrDQnlxSA==} + + '@walletconnect/modal-ui@2.7.0': + resolution: {integrity: sha512-gERYvU7D7K1ANCN/8vUgsE0d2hnRemfAFZ2novm9aZBg7TEd/4EgB+AqbJ+1dc7GhOL6dazckVq78TgccHb7mQ==} + + '@walletconnect/modal@2.7.0': + resolution: {integrity: sha512-RQVt58oJ+rwqnPcIvRFeMGKuXb9qkgSmwz4noF8JZGUym3gUAzVs+uW2NQ1Owm9XOJAV+sANrtJ+VoVq1ftElw==} + + '@walletconnect/relay-api@1.0.11': + resolution: {integrity: sha512-tLPErkze/HmC9aCmdZOhtVmYZq1wKfWTJtygQHoWtgg722Jd4homo54Cs4ak2RUFUZIGO2RsOpIcWipaua5D5Q==} + + '@walletconnect/relay-auth@1.1.0': + resolution: {integrity: sha512-qFw+a9uRz26jRCDgL7Q5TA9qYIgcNY8jpJzI1zAWNZ8i7mQjaijRnWFKsCHAU9CyGjvt6RKrRXyFtFOpWTVmCQ==} + + '@walletconnect/safe-json@1.0.2': + resolution: {integrity: sha512-Ogb7I27kZ3LPC3ibn8ldyUr5544t3/STow9+lzz7Sfo808YD7SBWk7SAsdBFlYgP2zDRy2hS3sKRcuSRM0OTmA==} + + '@walletconnect/sign-client@2.19.2': + resolution: {integrity: sha512-a/K5PRIFPCjfHq5xx3WYKHAAF8Ft2I1LtxloyibqiQOoUtNLfKgFB1r8sdMvXM7/PADNPe4iAw4uSE6PrARrfg==} + + '@walletconnect/time@1.0.2': + resolution: {integrity: sha512-uzdd9woDcJ1AaBZRhqy5rNC9laqWGErfc4dxA9a87mPdKOgWMD85mcFo9dIYIts/Jwocfwn07EC6EzclKubk/g==} + + '@walletconnect/types@2.19.2': + resolution: {integrity: sha512-/LZWhkVCUN+fcTgQUxArxhn2R8DF+LSd/6Wh9FnpjeK/Sdupx1EPS8okWG6WPAqq2f404PRoNAfQytQ82Xdl3g==} + + '@walletconnect/universal-provider@2.19.2': + resolution: {integrity: sha512-LkKg+EjcSUpPUhhvRANgkjPL38wJPIWumAYD8OK/g4OFuJ4W3lS/XTCKthABQfFqmiNbNbVllmywiyE44KdpQg==} + + '@walletconnect/utils@2.19.2': + resolution: {integrity: sha512-VU5CcUF4sZDg8a2/ov29OJzT3KfLuZqJUM0GemW30dlipI5fkpb0VPenZK7TcdLPXc1LN+Q+7eyTqHRoAu/BIA==} + + '@walletconnect/window-getters@1.0.1': + resolution: {integrity: sha512-vHp+HqzGxORPAN8gY03qnbTMnhqIwjeRJNOMOAzePRg4xVEEE2WvYsI9G2NMjOknA8hnuYbU3/hwLcKbjhc8+Q==} + + '@walletconnect/window-metadata@1.0.1': + resolution: {integrity: sha512-9koTqyGrM2cqFRW517BPY/iEtUDx2r1+Pwwu5m7sJ7ka79wi3EyqhqcICk/yDmv6jAS1rjKgTKXlEhanYjijcA==} + abitype@1.0.8: resolution: {integrity: sha512-ZeiI6h3GnW06uYDLx0etQtX/p8E24UaHHBj57RSjK7YBFe7iuVn07EDpOeP451D06sF27VOz9JJPlIKJmXgkEg==} peerDependencies: @@ -1915,6 +2615,13 @@ packages: resolution: {integrity: sha512-x1FCFnFifvYDDzTaLII71vG5uvDwgtmDTEVWAxrgeiR8VjMONcCXJx7E+USjDtHlwFmt9MysbqgF9b9Vjr6w+w==} engines: {node: '>=4'} + async-mutex@0.2.6: + resolution: {integrity: sha512-Hs4R+4SPgamu6rSGW8C7cV9gaWUKEHykfzCCvIRuaVv636Ju10ZdeUbvb4TBEW0INuq2DHZqXbK4Nd3yG4RaRw==} + + atomic-sleep@1.0.0: + resolution: {integrity: sha512-kNOjDqAh7px0XWNI+4QbzoiR/nTkHAWNud2uvnJquD1/x5a7EQZMJT0AczqK0Qn67oY/TTQ1LbUKajZpp3I9tQ==} + engines: {node: '>=8.0.0'} + available-typed-arrays@1.0.7: resolution: {integrity: sha512-wvUjBtSGN7+7SjNpq/9M2Tg350UZD3q62IFZLbRAR1bSMlCo1ZaeW+BJ+D090e4hIIZLBcTDWe4Mh4jvUDajzQ==} engines: {node: '>= 0.4'} @@ -1959,6 +2666,14 @@ packages: resolution: {integrity: sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==} engines: {node: '>=8'} + browserslist@4.24.4: + resolution: {integrity: sha512-KDi1Ny1gSePi1vm0q4oxSF8b4DR44GF4BbmS2YdhPLOEqd8pDviZOGH/GsmRwoWJ2+5Lr085X7naowMwKHDG1A==} + engines: {node: ^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7} + hasBin: true + + bs58@6.0.0: + resolution: {integrity: sha512-PD0wEnEYg6ijszw/u8s+iI3H17cTymlrwkKhDhPZq+Sokl3AU4htyBFTjAeNAlCCmg0f53g6ih3jATyCKftTfw==} + buffer@5.7.1: resolution: {integrity: sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==} @@ -1977,6 +2692,10 @@ packages: resolution: {integrity: sha512-b6Ilus+c3RrdDk+JhLKUAQfzzgLEPy6wcXqS7f/xe1EETvsDP6GORG7SFuOs6cID5YkqchW/LXZbX5bc8j7ZcQ==} engines: {node: '>=8'} + call-bind-apply-helpers@1.0.2: + resolution: {integrity: sha512-Sp1ablJ0ivDkSzjcaJdxEunN5/XvksFJ2sMBFfq6x0ryhQV/2b/KwFe21cMpmHtPOSij8K99/wSfoEuTObmuMQ==} + engines: {node: '>= 0.4'} + call-bind@1.0.7: resolution: {integrity: sha512-GHTSNSYICQ7scH7sZ+M2rFopRoLh8t2bLSW6BbgrtLsahOIB5iyAVJf9GjWK3cYTDaMj4XdBpM1cA6pIS0Kv2w==} engines: {node: '>= 0.4'} @@ -1992,6 +2711,10 @@ packages: camel-case@3.0.0: resolution: {integrity: sha512-+MbKztAYHXPr1jNTSKQF52VpcFjwY5RkR7fxksV8Doo4KAYc5Fl4UJRgthBbTmEx8C54DqahhbLJkDwjI3PI/w==} + camelcase@5.3.1: + resolution: {integrity: sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==} + engines: {node: '>=6'} + caniuse-lite@1.0.30001701: resolution: {integrity: sha512-faRs/AW3jA9nTwmJBSO1PQ6L/EOgsB5HMQQq4iCu5zhPgVVgO/pZRHlmatwijZKetFw8/Pr4q6dEN8sJuq8qTw==} @@ -2033,6 +2756,9 @@ packages: resolution: {integrity: sha512-NIxF55hv4nSqQswkAeiOi1r83xy8JldOFDTWiug55KBu9Jnblncd2U6ViHmYgHf01TPZS77NJBhBMKdWj9HQMQ==} engines: {node: '>=8'} + class-variance-authority@0.7.1: + resolution: {integrity: sha512-Ka+9Trutv7G8M6WT6SeiRWz792K5qEqIGEGzXKhAE6xOWAY6pPH8U+9IY3oCMv6kqTmLsv7Xh/2w2RigkePMsg==} + clean-stack@2.2.0: resolution: {integrity: sha512-4diC9HaTE+KRAMWhDhrGOECgWZxoevMc5TlkObMqNSsVU62PYzXZ/SMTjzyGAFF1YusgxGcSWTEXBhp0CPwQ1A==} engines: {node: '>=6'} @@ -2063,6 +2789,14 @@ packages: resolution: {integrity: sha512-JQHZ2QMW6l3aH/j6xCqQThY/9OH4D/9ls34cgkUBiEeocRTU04tHfKPBsUK1PqZCUQM7GiA0IIXJSuXHI64Kbg==} engines: {node: '>=0.8'} + clsx@1.2.1: + resolution: {integrity: sha512-EcR6r5a8bj6pu3ycsa/E/cKVGuTgZJZdsyUYHOksG/UHIiKfjxzRxYJpyVBwYaQeOvghal9fcc4PidlgzugAQg==} + engines: {node: '>=6'} + + clsx@2.1.1: + resolution: {integrity: sha512-eYm0QWBtUrBWZWG0d386OGAw16Z995PiOVo2B7bjWSbHedGl5e0ZWaq65kOGgUSNesEIDkB9ISbTg/JK9dhCZA==} + engines: {node: '>=6'} + color-convert@1.9.3: resolution: {integrity: sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==} @@ -2098,9 +2832,30 @@ packages: constant-case@2.0.0: resolution: {integrity: sha512-eS0N9WwmjTqrOmR3o83F5vW8Z+9R1HnVz3xmzT2PMFug9ly+Au/fxRWlEBSb6LcZwspSsEn9Xs1uw9YgzAg1EQ==} + convert-source-map@2.0.0: + resolution: {integrity: sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==} + + cookie-es@1.2.2: + resolution: {integrity: sha512-+W7VmiVINB+ywl1HGXJXmrqkOhpKrIiVZV6tQuV54ZyQC7MMuBt81Vc336GMLoHBq5hV/F9eXgt5Mnx0Rha5Fg==} + + cookie@1.0.2: + resolution: {integrity: sha512-9Kr/j4O16ISv8zBBhJoi4bXOYNTkFLOqSL3UDB0njXxCXNezjeyVrJyGOWtgfs/q2km1gwBcfH8q1yEGoMYunA==} + engines: {node: '>=18'} + + copy-to-clipboard@3.3.3: + resolution: {integrity: sha512-2KV8NhB5JqC3ky0r9PMCAZKbUHSwtEo4CwCs0KXgruG43gX5PMqDEBbVU4OUzw2MuAWUfsuFmWvEKG5QRfSnJA==} + core-js-pure@3.39.0: resolution: {integrity: sha512-7fEcWwKI4rJinnK+wLTezeg2smbFFdSBP6E2kQZNbnzM2s1rpKQ6aaRteZSSg7FLU3P0HGGVo/gbpfanU36urg==} + core-util-is@1.0.3: + resolution: {integrity: sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==} + + crc-32@1.2.2: + resolution: {integrity: sha512-ROmzCKrTnOwybPcJApAA6WBWij23HVfGVNKqqrZpuyZOHqK2CwHSvpGuyt/UNNvaIjEd8X5IFGp4Mh+Ie1IHJQ==} + engines: {node: '>=0.8'} + hasBin: true + create-require@1.1.1: resolution: {integrity: sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ==} @@ -2158,6 +2913,14 @@ packages: supports-color: optional: true + decamelize@1.2.0: + resolution: {integrity: sha512-z2S+W9X73hAUUki+N+9Za2lBlun89zigOyGrsax+KUQ6wKW4ZoWpEYBkGhQjwAjjDCkWxhY0VKEhk8wzY7F5cA==} + engines: {node: '>=0.10.0'} + + decode-uri-component@0.2.2: + resolution: {integrity: sha512-FqUYQ+8o158GyGTrMFJms9qh3CqTKvAqgqsTnkLI8sKu0028orqBhxNMFkFen0zGyg6epACD32pjVk58ngIErQ==} + engines: {node: '>=0.10'} + deep-eql@5.0.2: resolution: {integrity: sha512-h5k/5U50IJJFpzfL6nO9jaaumfjO/f2NjK/oYB2Djzm4p9L+3T9qWpZqZ2hAbLPuuYq9wrU08WQyBTL5GbPk5Q==} engines: {node: '>=6'} @@ -2205,6 +2968,9 @@ packages: resolution: {integrity: sha512-bwy0MGW55bG41VqxxypOsdSdGqLwXPI/focwgTYCFMbdUiBAxLg9CFzG08sz2aqzknwiX7Hkl0bQENjg8iLByw==} engines: {node: '>=8'} + detect-node-es@1.1.0: + resolution: {integrity: sha512-ypdmJU/TbBby2Dxibuv7ZLW3Bs1QEmM7nHjEANfohJLvE0XVujisn1qPJcZxg+qDucsr+bP6fLD1rPS3AhJ7EQ==} + diff@4.0.2: resolution: {integrity: sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==} engines: {node: '>=0.3.1'} @@ -2241,6 +3007,13 @@ packages: eastasianwidth@0.2.0: resolution: {integrity: sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==} + eciesjs@0.4.14: + resolution: {integrity: sha512-eJAgf9pdv214Hn98FlUzclRMYWF7WfoLlkS9nWMTm1qcCwn6Ad4EGD9lr9HXMBfSrZhYQujRE+p0adPRkctC6A==} + engines: {bun: '>=1', deno: '>=2', node: '>=16'} + + electron-to-chromium@1.5.144: + resolution: {integrity: sha512-eJIaMRKeAzxfBSxtjYnoIAw/tdD6VIH6tHBZepZnAbE3Gyqqs5mGN87DvcldPUbVkIljTK8pY0CMcUljP64lfQ==} + emoji-regex@8.0.0: resolution: {integrity: sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==} @@ -2616,6 +3389,10 @@ packages: functions-have-names@1.2.3: resolution: {integrity: sha512-xckBUXyTIqT97tq2x2AMb+g163b5JFysYk0x4qxNFwbfQkmNZoiRHb6sPzI9/QV33WeuvVYBUIiD4NzNIyqaRQ==} + gensync@1.0.0-beta.2: + resolution: {integrity: sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==} + engines: {node: '>=6.9.0'} + get-caller-file@2.0.5: resolution: {integrity: sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==} engines: {node: 6.* || 8.* || >= 10.*} @@ -2624,6 +3401,18 @@ packages: resolution: {integrity: sha512-5uYhsJH8VJBTv7oslg4BznJYhDoRI6waYCxMmCdnTrcCrHA/fCFKoTFz2JKKE0HdDFUF7/oQuhzumXJK7paBRQ==} engines: {node: '>= 0.4'} + get-intrinsic@1.3.0: + resolution: {integrity: sha512-9fSjSaos/fRIVIp+xSJlE6lfwhES7LNtKaCBIamHsjr2na1BiABJPo0mOjjz8GJDURarmCPGqaiVg5mfjb98CQ==} + engines: {node: '>= 0.4'} + + get-nonce@1.0.1: + resolution: {integrity: sha512-FJhYRoDaiatfEkUK8HKlicmu/3SGFD51q3itKDGoSTysQJBnfOcxU5GxnhE1E6soB76MbT0MBtnKJuXyAx+96Q==} + engines: {node: '>=6'} + + get-proto@1.0.1: + resolution: {integrity: sha512-sTSfBjoXBp89JvIKIefqw7U2CCebsc74kiY6awiGogKtoSGbgjYE/G/+l9sF3MWFPNc9IcoOC4ODfKHfxFmp0g==} + engines: {node: '>= 0.4'} + get-stream@6.0.1: resolution: {integrity: sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==} engines: {node: '>=10'} @@ -2653,6 +3442,10 @@ packages: resolution: {integrity: sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==} deprecated: Glob versions prior to v9 are no longer supported + globals@11.12.0: + resolution: {integrity: sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==} + engines: {node: '>=4'} + globals@14.0.0: resolution: {integrity: sha512-oahGvuMGQlPw/ivIYBjVSrWAfWLBeku5tpPE2fOPLi+WHffIWbuh2tCjhyQhTBPMf5E9jDEH4FOmTYgYwbKwtQ==} engines: {node: '>=18'} @@ -2694,8 +3487,8 @@ packages: graphemer@1.4.0: resolution: {integrity: sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==} - h3@1.15.1: - resolution: {integrity: sha512-+ORaOBttdUm1E2Uu/obAyCguiI7MbBvsLTndc3gyK3zU+SYLoZXlyCP9Xgy0gikkGufFLTZXCXD6+4BsufnmHA==} + h3@1.15.3: + resolution: {integrity: sha512-z6GknHqyX0h9aQaTx22VZDf6QyZn+0Nh+Ym8O/u0SGSkyF5cuTJYKlc8MkzW3Nzf9LE1ivcpmYC3FUGpywhuUQ==} handlebars@4.7.8: resolution: {integrity: sha512-vafaFqs8MZkRrSX7sFVUdo3ap/eNiLnb4IakshzvP56X5Nr1iGKAIqdX6tMlm6HcNRIkr6AxO5jFEoJzzpT8aQ==} @@ -2743,6 +3536,9 @@ packages: header-case@1.0.1: resolution: {integrity: sha512-i0q9mkOeSuhXw6bGgiQCCBgY/jlZuV/7dZXyZ9c6LcBrqwvT8eT719E9uxE5LiZftdl+z81Ugbg/VvXV4OJOeQ==} + hey-listen@1.0.8: + resolution: {integrity: sha512-COpmrF2NOg4TBWUJ5UVyaCU2A88wEMkUPK4hNqyCkqHbxT92BbvfjoSozkAIIm6XhicGlJHhFdullInrdhwU8Q==} + http-proxy-agent@7.0.2: resolution: {integrity: sha512-T1gkAiYYDWYx3V5Bmyu7HcfcvL7mUrTWiM6yOfa3PIphViJ/gFPbvidQ+veqSOHci/PxBcDabeUNCzpOODJZig==} engines: {node: '>= 14'} @@ -2984,6 +3780,11 @@ packages: isexe@2.0.0: resolution: {integrity: sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==} + isows@1.0.6: + resolution: {integrity: sha512-lPHCayd40oW98/I0uvgaHKWCSvkzY27LjWLbtzOm64yQ+G3Q5npjjbdppU65iZXkK1Zt+kH9pfegli0AYfwYYw==} + peerDependencies: + ws: '*' + iterator.prototype@1.1.3: resolution: {integrity: sha512-FW5iMbeQ6rBGm/oKgzq2aW4KvAGpxPzYES8N4g4xNXUKpL1mclMvOe+76AcLDTvD+Ze+sOpVhgdAQEKF4L9iGQ==} engines: {node: '>= 0.4'} @@ -2992,6 +3793,25 @@ packages: resolution: {integrity: sha512-9DDdhb5j6cpeitCbvLO7n7J4IxnbM6hoF6O1g4HQ5TfhvvKN8ywDM7668ZhMHRqVmxqhps/F6syWK2KcPxYlkw==} engines: {node: 20 || >=22} + jiti@2.4.2: + resolution: {integrity: sha512-rg9zJN+G4n2nfJl5MW3BMygZX56zKPNVEYYqq7adpmMh4Jn2QNEwhvQlFy6jPVdcod7txZtKHWnyZiA3a0zP7A==} + hasBin: true + + jotai@2.12.3: + resolution: {integrity: sha512-DpoddSkmPGXMFtdfnoIHfueFeGP643nqYUWC6REjUcME+PG2UkAtYnLbffRDw3OURI9ZUTcRWkRGLsOvxuWMCg==} + engines: {node: '>=12.20.0'} + peerDependencies: + '@types/react': '>=17.0.0' + react: '>=17.0.0' + peerDependenciesMeta: + '@types/react': + optional: true + react: + optional: true + + js-base64@3.7.7: + resolution: {integrity: sha512-7rCnleh0z2CkXhH67J8K1Ytz0b2Y+yxTPL+/KOJoa20hfnVQ/3/T6W/KflYI4bRHRagNeXeU2bkNGI3v1oS/lw==} + js-tokens@4.0.0: resolution: {integrity: sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==} @@ -3006,15 +3826,32 @@ packages: jsbn@1.1.0: resolution: {integrity: sha512-4bYVV3aAMtDTTu4+xsDYa6sy9GyJ69/amsu9sYF2zqjiEoZA5xJi3BrfX3uY+/IekIu7MwdObdbDWpoZdBv3/A==} + jsesc@3.1.0: + resolution: {integrity: sha512-/sM3dO2FOzXjKQhJuo0Q173wf2KOo8t4I8vHy6lF9poUp7bKT0/NHE8fPX23PwfhnykfqnC2xRxOnVw5XuGIaA==} + engines: {node: '>=6'} + hasBin: true + json-buffer@3.0.1: resolution: {integrity: sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==} + json-rpc-engine@6.1.0: + resolution: {integrity: sha512-NEdLrtrq1jUZyfjkr9OCz9EzCNhnRyWtt1PAnvnhwy6e8XETS0Dtc+ZNCO2gvuAoKsIn2+vCSowXTYE4CkgnAQ==} + engines: {node: '>=10.0.0'} + + json-rpc-random-id@1.0.1: + resolution: {integrity: sha512-RJ9YYNCkhVDBuP4zN5BBtYAzEl03yq/jIIsyif0JY9qyJuQQZNeDK7anAPKKlyEtLSj2s8h6hNh2F8zO5q7ScA==} + json-schema-traverse@0.4.1: resolution: {integrity: sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==} json-stable-stringify-without-jsonify@1.0.1: resolution: {integrity: sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==} + json5@2.2.3: + resolution: {integrity: sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==} + engines: {node: '>=6'} + hasBin: true + jsonfile@4.0.0: resolution: {integrity: sha512-m6F1R3z8jjlf2imQHS2Qez5sjKWQzbuuhuJ/FKYFRZvPE3PuHcSMVZzfsLhGVOkfd20obL5SWEBew5ShlquNxg==} @@ -3036,6 +3873,9 @@ packages: keyv@4.5.4: resolution: {integrity: sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw==} + keyvaluestorage-interface@1.0.0: + resolution: {integrity: sha512-8t6Q3TclQ4uZynJY9IGr2+SsIGwK9JHcO6ootkHCGA0CrQCRy+VkouYNO2xicET6b9al7QKzpebNow+gkpCL8g==} + lefthook-darwin-arm64@1.11.10: resolution: {integrity: sha512-Rufl8BRP77GRFtgNwW95/FHPD0VDfu5bRyzASPcyVrFczJiBK1glAHRdYrErBDNqJhEEjkyv9+EkCZS/MnDKPQ==} cpu: [arm64] @@ -3094,6 +3934,79 @@ packages: resolution: {integrity: sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==} engines: {node: '>= 0.8.0'} + lightningcss-darwin-arm64@1.29.2: + resolution: {integrity: sha512-cK/eMabSViKn/PG8U/a7aCorpeKLMlK0bQeNHmdb7qUnBkNPnL+oV5DjJUo0kqWsJUapZsM4jCfYItbqBDvlcA==} + engines: {node: '>= 12.0.0'} + cpu: [arm64] + os: [darwin] + + lightningcss-darwin-x64@1.29.2: + resolution: {integrity: sha512-j5qYxamyQw4kDXX5hnnCKMf3mLlHvG44f24Qyi2965/Ycz829MYqjrVg2H8BidybHBp9kom4D7DR5VqCKDXS0w==} + engines: {node: '>= 12.0.0'} + cpu: [x64] + os: [darwin] + + lightningcss-freebsd-x64@1.29.2: + resolution: {integrity: sha512-wDk7M2tM78Ii8ek9YjnY8MjV5f5JN2qNVO+/0BAGZRvXKtQrBC4/cn4ssQIpKIPP44YXw6gFdpUF+Ps+RGsCwg==} + engines: {node: '>= 12.0.0'} + cpu: [x64] + os: [freebsd] + + lightningcss-linux-arm-gnueabihf@1.29.2: + resolution: {integrity: sha512-IRUrOrAF2Z+KExdExe3Rz7NSTuuJ2HvCGlMKoquK5pjvo2JY4Rybr+NrKnq0U0hZnx5AnGsuFHjGnNT14w26sg==} + engines: {node: '>= 12.0.0'} + cpu: [arm] + os: [linux] + + lightningcss-linux-arm64-gnu@1.29.2: + resolution: {integrity: sha512-KKCpOlmhdjvUTX/mBuaKemp0oeDIBBLFiU5Fnqxh1/DZ4JPZi4evEH7TKoSBFOSOV3J7iEmmBaw/8dpiUvRKlQ==} + engines: {node: '>= 12.0.0'} + cpu: [arm64] + os: [linux] + + lightningcss-linux-arm64-musl@1.29.2: + resolution: {integrity: sha512-Q64eM1bPlOOUgxFmoPUefqzY1yV3ctFPE6d/Vt7WzLW4rKTv7MyYNky+FWxRpLkNASTnKQUaiMJ87zNODIrrKQ==} + engines: {node: '>= 12.0.0'} + cpu: [arm64] + os: [linux] + + lightningcss-linux-x64-gnu@1.29.2: + resolution: {integrity: sha512-0v6idDCPG6epLXtBH/RPkHvYx74CVziHo6TMYga8O2EiQApnUPZsbR9nFNrg2cgBzk1AYqEd95TlrsL7nYABQg==} + engines: {node: '>= 12.0.0'} + cpu: [x64] + os: [linux] + + lightningcss-linux-x64-musl@1.29.2: + resolution: {integrity: sha512-rMpz2yawkgGT8RULc5S4WiZopVMOFWjiItBT7aSfDX4NQav6M44rhn5hjtkKzB+wMTRlLLqxkeYEtQ3dd9696w==} + engines: {node: '>= 12.0.0'} + cpu: [x64] + os: [linux] + + lightningcss-win32-arm64-msvc@1.29.2: + resolution: {integrity: sha512-nL7zRW6evGQqYVu/bKGK+zShyz8OVzsCotFgc7judbt6wnB2KbiKKJwBE4SGoDBQ1O94RjW4asrCjQL4i8Fhbw==} + engines: {node: '>= 12.0.0'} + cpu: [arm64] + os: [win32] + + lightningcss-win32-x64-msvc@1.29.2: + resolution: {integrity: sha512-EdIUW3B2vLuHmv7urfzMI/h2fmlnOQBk1xlsDxkN1tCWKjNFjfLhGxYk8C8mzpSfr+A6jFFIi8fU6LbQGsRWjA==} + engines: {node: '>= 12.0.0'} + cpu: [x64] + os: [win32] + + lightningcss@1.29.2: + resolution: {integrity: sha512-6b6gd/RUXKaw5keVdSEtqFVdzWnU5jMxTUjA2bVcMNPLwSQ08Sv/UodBVtETLCn7k4S1Ibxwh7k68IwLZPgKaA==} + engines: {node: '>= 12.0.0'} + + lit-element@3.3.3: + resolution: {integrity: sha512-XbeRxmTHubXENkV4h8RIPyr8lXc+Ff28rkcQzw3G6up2xg5E8Zu1IgOWIwBLEQsu3cOVFqdYwiVi0hv0SlpqUA==} + + lit-html@2.8.0: + resolution: {integrity: sha512-o9t+MQM3P4y7M7yNzqAyjp7z+mQGa4NS4CxiyLqFPyFWyc4O+nodLrkrxSaCTrla6M5YOLaT3RpbbqjszB5g3Q==} + + lit@2.8.0: + resolution: {integrity: sha512-4Sc3OFX9QHOJaHbmTMk28SYgVxLN3ePDjg7hofEft2zWlehFL3LiAuapWc4U/kYwMYJSh2hTCPZ6/LIC7ii0MA==} + locate-path@5.0.0: resolution: {integrity: sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==} engines: {node: '>=8'} @@ -3143,16 +4056,28 @@ packages: resolution: {integrity: sha512-QIXZUBJUx+2zHUdQujWejBkcD9+cs94tLn0+YL8UrCh+D5sCXZ4c7LaEH48pNwRY3MLDgqUFyhlCyjJPf1WP0A==} engines: {node: 20 || >=22} + lru-cache@5.1.1: + resolution: {integrity: sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==} + lru-cache@7.18.3: resolution: {integrity: sha512-jumlc0BIUrS3qJGgIkWZsyfAM7NCWiBcCDhnd+3NNM5KbBmLTgHVfWBcg6W+rLUsIpzpERPsvwUP7CckAQSOoA==} engines: {node: '>=12'} + lucide-react@0.493.0: + resolution: {integrity: sha512-seXg+XrQKArnZO3KvNsS6GcolPNekYHvf10e+Gn5vPsle+C+Jqq7dHJh2t4kwvofyAaKe8zTdVgKrGL0H3ecVg==} + peerDependencies: + react: ^16.5.1 || ^17.0.0 || ^18.0.0 || ^19.0.0 + magic-string@0.30.17: resolution: {integrity: sha512-sNPKHvyjVf7gyjwS4xGTaW/mCnF8wnjtifKBEhxfZ7E/S8tQ0rssrwGNn6q8JH/ohItJfSQp9mBtQYuTlH5QnA==} make-error@1.3.6: resolution: {integrity: sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==} + math-intrinsics@1.1.0: + resolution: {integrity: sha512-/IXtbwEk5HTPyEwyKX6hGkYXxM9nbj64B+ilVJnC/R6B0pH5G4V3b0pVbL7DBj4tkhBAppbQUlf6F6Xl9LHu1g==} + engines: {node: '>= 0.4'} + merge-stream@2.0.0: resolution: {integrity: sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==} @@ -3281,10 +4206,35 @@ packages: no-case@2.3.2: resolution: {integrity: sha512-rmTZ9kz+f3rCvK2TD1Ue/oZlns7OGoIWP4fc3llxxRXlOkHKoWPPWJOfFYpITabSow43QJbRIoHQXtt10VldyQ==} + node-addon-api@2.0.2: + resolution: {integrity: sha512-Ntyt4AIXyaLIuMHF6IOoTakB3K+RWxwtsHNRxllEoA6vPwP9o4866g6YWDLUdnucilZhmkxiHwHr11gAENw+QA==} + + node-fetch-native@1.6.6: + resolution: {integrity: sha512-8Mc2HhqPdlIfedsuZoc3yioPuzp6b+L5jRCRY1QzuWZh2EGJVQrGppC6V6cF0bLdbW0+O2YpqCA25aF/1lvipQ==} + + node-fetch@2.7.0: + resolution: {integrity: sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A==} + engines: {node: 4.x || >=6.0.0} + peerDependencies: + encoding: ^0.1.0 + peerDependenciesMeta: + encoding: + optional: true + + node-gyp-build@4.8.4: + resolution: {integrity: sha512-LA4ZjwlnUblHVgq0oBF3Jl/6h/Nvs5fzBLwdEF4nuxnFdsfajde4WfxtJr3CaiH+F6ewcIB/q4jQ4UzPyid+CQ==} + hasBin: true + + node-mock-http@1.0.0: + resolution: {integrity: sha512-0uGYQ1WQL1M5kKvGRXWQ3uZCHtLTO8hln3oBjIusM75WoesZ909uQJs/Hb946i2SS+Gsrhkaa6iAO17jRIv6DQ==} + node-plop@0.26.3: resolution: {integrity: sha512-Cov028YhBZ5aB7MdMWJEmwyBig43aGL5WT4vdoB28Oitau1zZAcHUn8Sgfk9HM33TqhtLJ9PlM/O0Mv+QpV/4Q==} engines: {node: '>=8.9.4'} + node-releases@2.0.19: + resolution: {integrity: sha512-xxOWJsBKtzAq7DY0J+DTzuz58K8e7sJbdgwkbMWQe8UYB6ekmsQ45q0M/tJDsGaZmbC+l7n57UV8Hl5tHxO9uw==} + nodemon@3.1.9: resolution: {integrity: sha512-hdr1oIb2p6ZSxu3PB2JWWYS7ZQ0qvaZsc3hK8DR8f02kRzc8rjYmxAIvdz+aYC+8F2IjNaB7HMcSDg8nQpJxyg==} engines: {node: '>=10'} @@ -3493,10 +4443,36 @@ packages: resolution: {integrity: sha512-M7BAV6Rlcy5u+m6oPhAPFgJTzAioX/6B0DxyvDlo9l8+T3nLKbrczg2WLUyzd45L8RqfUMyGPzekbMvX2Ldkwg==} engines: {node: '>=12'} + pify@3.0.0: + resolution: {integrity: sha512-C3FsVNH1udSEX48gGX1xfvwTWfsYWj5U+8/uK15BGzIGrKoUpghX8hWZwa/OFnakBiiVNmBvemTJR5mcy7iPcg==} + engines: {node: '>=4'} + pify@4.0.1: resolution: {integrity: sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==} engines: {node: '>=6'} + pify@5.0.0: + resolution: {integrity: sha512-eW/gHNMlxdSP6dmG6uJip6FXN0EQBwm2clYYd8Wul42Cwu/DK8HEftzsapcNdYe2MfLiIwZqsDk2RDEsTE79hA==} + engines: {node: '>=10'} + + pino-abstract-transport@0.5.0: + resolution: {integrity: sha512-+KAgmVeqXYbTtU2FScx1XS3kNyfZ5TrXY07V96QnUSFqo2gAqlvmaxH67Lj7SWazqsMabf+58ctdTcBgnOLUOQ==} + + pino-std-serializers@4.0.0: + resolution: {integrity: sha512-cK0pekc1Kjy5w9V2/n+8MkZwusa6EyyxfeQCB799CQRhRt/CqYKiWs5adeu8Shve2ZNffvfC/7J64A2PJo1W/Q==} + + pino@7.11.0: + resolution: {integrity: sha512-dMACeu63HtRLmCG8VKdy4cShCPKaYDR4youZqoSWLxl5Gu99HUw8bw75thbPv9Nip+H+QYX8o3ZJbTdVZZ2TVg==} + hasBin: true + + pngjs@5.0.0: + resolution: {integrity: sha512-40QW5YalBNfQo5yRYmiw7Yz6TKKVr3h6970B2YE+3fQpsWcrbj1PzJgxeJ19DRQjhMbKPIuMY8rFaXc8moolVw==} + engines: {node: '>=10.13.0'} + + pony-cause@2.1.11: + resolution: {integrity: sha512-M7LhCsdNbNgiLYiP4WjsfLUuFmCfnjdF6jKe2R9NKl4WFN+HZPGHJZ9lnLP7f9ZnKe3U9nuWD0szirmj+migUg==} + engines: {node: '>=12.0.0'} + possible-typed-array-names@1.0.0: resolution: {integrity: sha512-d7Uw+eZoloe0EHDIYoe+bQ5WXnGMOpmiZFTuMWCwpjzzkL2nTjcKiAk4hh8TjnGye2TwWOk3UXucZ+3rbmBa8Q==} engines: {node: '>= 0.4'} @@ -3509,6 +4485,9 @@ packages: resolution: {integrity: sha512-dle9A3yYxlBSrt8Fu+IpjGT8SY8hN0mlaA6GY8t0P5PjIOZemULz/E2Bnm/2dcUOena75OTNkHI76uZBNUUq3A==} engines: {node: ^10 || ^12 || >=14} + preact@10.26.5: + resolution: {integrity: sha512-fmpDkgfGU6JYux9teDWLhj9mKN55tyepwYbxHgQuIxbWQzgFg5vk7Mrrtfx7xRxq798ynkY4DDDxZr235Kk+4w==} + prelude-ls@1.2.1: resolution: {integrity: sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==} engines: {node: '>= 0.8.0'} @@ -3523,6 +4502,12 @@ packages: engines: {node: '>=14'} hasBin: true + process-nextick-args@2.0.1: + resolution: {integrity: sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==} + + process-warning@1.0.0: + resolution: {integrity: sha512-du4wfLyj4yCZq1VupnVSZmRsPJsNuxoDQFdCFHLaYiEbFBD7QE0a+I4D7hOxrVnh78QE/YipFAj9lXHiXocV+Q==} + prop-types@15.8.1: resolution: {integrity: sha512-oj87CgZICdulUohogVAR7AjlC0327U4el4L6eAvOqCeudMDVU0NThNaV+b9Df4dXgSP1gXMTnPdhfe/2qDH5cg==} @@ -3546,6 +4531,20 @@ packages: resolution: {integrity: sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==} engines: {node: '>=6'} + qrcode.react@4.2.0: + resolution: {integrity: sha512-QpgqWi8rD9DsS9EP3z7BT+5lY5SFhsqGjpgW5DY/i3mK4M9DTBNz3ErMi8BWYEfI3L0d8GIbGmcdFAS1uIRGjA==} + peerDependencies: + react: ^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0 + + qrcode@1.5.3: + resolution: {integrity: sha512-puyri6ApkEHYiVl4CFzo1tDkAZ+ATcnbJrJ6RiBM1Fhctdn/ix9MTE3hRph33omisEbC/2fcfemsseiKgBPKZg==} + engines: {node: '>=10.13.0'} + hasBin: true + + query-string@7.1.3: + resolution: {integrity: sha512-hh2WYhq4fi8+b+/2Kg9CEge4fDPvHS534aOOvOZeQ3+Vf2mCFsaFBYj0i+iXcAq6I9Vzp5fjMFBlONvayDC1qg==} + engines: {node: '>=6'} + queue-microtask@1.2.3: resolution: {integrity: sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==} @@ -3573,6 +4572,50 @@ packages: react-is@16.13.1: resolution: {integrity: sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==} + react-refresh@0.17.0: + resolution: {integrity: sha512-z6F7K9bV85EfseRCp2bzrpyQ0Gkw1uLoCel9XBVWPg/TjRj94SkJzUTGfOa4bs7iJvBWtQG0Wq7wnI0syw3EBQ==} + engines: {node: '>=0.10.0'} + + react-remove-scroll-bar@2.3.8: + resolution: {integrity: sha512-9r+yi9+mgU33AKcj6IbT9oRCO78WriSj6t/cF8DWBZJ9aOGPOTEDvdUDz1FwKim7QXWwmHqtdHnRJfhAxEG46Q==} + engines: {node: '>=10'} + peerDependencies: + '@types/react': '*' + react: ^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0 + peerDependenciesMeta: + '@types/react': + optional: true + + react-remove-scroll@2.6.3: + resolution: {integrity: sha512-pnAi91oOk8g8ABQKGF5/M9qxmmOPxaAnopyTHYfqYEwJhyFrbbBtHuSgtKEoH0jpcxx5o3hXqH1mNd9/Oi+8iQ==} + engines: {node: '>=10'} + peerDependencies: + '@types/react': '*' + react: ^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0 || ^19.0.0-rc + peerDependenciesMeta: + '@types/react': + optional: true + + react-router@7.5.3: + resolution: {integrity: sha512-3iUDM4/fZCQ89SXlDa+Ph3MevBrozBAI655OAfWQlTm9nBR0IKlrmNwFow5lPHttbwvITZfkeeeZFP6zt3F7pw==} + engines: {node: '>=20.0.0'} + peerDependencies: + react: '>=18' + react-dom: '>=18' + peerDependenciesMeta: + react-dom: + optional: true + + react-style-singleton@2.2.3: + resolution: {integrity: sha512-b6jSvxvVnyptAiLjbkWLE/lOnR4lfTtDAl+eUC7RZy+QQWc6wRzIV2CE6xBuMmDxc2qIihtDCZD5NPOFl7fRBQ==} + engines: {node: '>=10'} + peerDependencies: + '@types/react': '*' + react: ^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0 || ^19.0.0-rc + peerDependenciesMeta: + '@types/react': + optional: true + react@19.0.0: resolution: {integrity: sha512-V8AVnmPIICiWpGfm6GLzCR/W5FXLchHop40W4nXBmdlEceh16rCN8O8LNWm5bh5XUX91fh7KpA+W0TgMKmgTpQ==} engines: {node: '>=0.10.0'} @@ -3622,6 +4665,9 @@ packages: resolution: {integrity: sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==} engines: {node: '>=0.10.0'} + require-main-filename@2.0.0: + resolution: {integrity: sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg==} + resolve-from@4.0.0: resolution: {integrity: sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==} engines: {node: '>=4'} @@ -3837,6 +4883,10 @@ packages: resolution: {integrity: sha512-Mcc5wHehp9aXz1ax6bZUyY5afg9u2rv5cqQI3mRrYkGC8rW2hM02jWuwjtL++LS5qinSyhj2QfLyNsuc+VsExg==} engines: {node: '>=10.0.0'} + strict-uri-encode@2.0.0: + resolution: {integrity: sha512-QwiXZgpRcKkhTj2Scnn++4PKtWsH0kpzZ62L2R6c/LUVYv7hVnZqcg2+sMuT6R7Jusu1vviK/MFsu6kNJfWlEQ==} + engines: {node: '>=4'} + string-width@4.2.3: resolution: {integrity: sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==} engines: {node: '>=8'} @@ -3943,6 +4993,9 @@ packages: resolution: {integrity: sha512-wK0Ri4fOGjv/XPy8SBHZChl8CM7uMc5VML7SqiQ0zG7+J5Vr+RMQDoHa2CNT6KHUnTGIXH34UDMkPzAUyapBZg==} engines: {node: '>=8'} + thread-stream@0.15.2: + resolution: {integrity: sha512-UkEhKIg2pD+fjkHQKyJO3yoIvAP3N6RlNFt2dUhcS1FGvCD1cQa1M/PGknCLFIyZdtJOWQjejp7bdNqmN7zwdA==} + through@2.3.8: resolution: {integrity: sha512-w89qg7PI8wAdvX60bMDP+bFoD5Dvhm9oLheFp5O4a2QF0cSBGsBX4qZmadPMvVqlLJBBci+WqGGOAPvcDeNSVg==} @@ -4005,6 +5058,12 @@ packages: peerDependencies: typescript: '>=4.2.0' + ts-api-utils@2.1.0: + resolution: {integrity: sha512-CUgTZL1irw8u29bzrOD/nH85jqyc74D6SshFgujOIA7osm2Rz7dYH77agkx7H4FBNxDq7Cjf+IjaX/8zwFW+ZQ==} + engines: {node: '>=18.12'} + peerDependencies: + typescript: '>=4.8.4' + ts-node@10.9.2: resolution: {integrity: sha512-f0FFpIdcHgn8zcPSbf1dRevwt047YMnaiJM3u2w2RewrB+fob/zePZcrOyQoLMMO7aBIddLcQIEK5dYjkLnGrQ==} hasBin: true @@ -4155,6 +5214,71 @@ packages: resolution: {integrity: sha512-gptHNQghINnc/vTGIk0SOFGFNXw7JVrlRUtConJRlvaw6DuX0wO5Jeko9sWrMBhh+PsYAZ7oXAiOnf/UKogyiw==} engines: {node: '>= 10.0.0'} + unstorage@1.16.0: + resolution: {integrity: sha512-WQ37/H5A7LcRPWfYOrDa1Ys02xAbpPJq6q5GkO88FBXVSQzHd7+BjEwfRqyaSWCv9MbsJy058GWjjPjcJ16GGA==} + peerDependencies: + '@azure/app-configuration': ^1.8.0 + '@azure/cosmos': ^4.2.0 + '@azure/data-tables': ^13.3.0 + '@azure/identity': ^4.6.0 + '@azure/keyvault-secrets': ^4.9.0 + '@azure/storage-blob': ^12.26.0 + '@capacitor/preferences': ^6.0.3 || ^7.0.0 + '@deno/kv': '>=0.9.0' + '@netlify/blobs': ^6.5.0 || ^7.0.0 || ^8.1.0 + '@planetscale/database': ^1.19.0 + '@upstash/redis': ^1.34.3 + '@vercel/blob': '>=0.27.1' + '@vercel/kv': ^1.0.1 + aws4fetch: ^1.0.20 + db0: '>=0.2.1' + idb-keyval: ^6.2.1 + ioredis: ^5.4.2 + uploadthing: ^7.4.4 + peerDependenciesMeta: + '@azure/app-configuration': + optional: true + '@azure/cosmos': + optional: true + '@azure/data-tables': + optional: true + '@azure/identity': + optional: true + '@azure/keyvault-secrets': + optional: true + '@azure/storage-blob': + optional: true + '@capacitor/preferences': + optional: true + '@deno/kv': + optional: true + '@netlify/blobs': + optional: true + '@planetscale/database': + optional: true + '@upstash/redis': + optional: true + '@vercel/blob': + optional: true + '@vercel/kv': + optional: true + aws4fetch: + optional: true + db0: + optional: true + idb-keyval: + optional: true + ioredis: + optional: true + uploadthing: + optional: true + + update-browserslist-db@1.1.3: + resolution: {integrity: sha512-UxhIZQ+QInVdunkDAaiazvvT/+fXL5Osr0JZlJulepYu6Jd7qJtDZjlur0emRlT71EN3ScPoE7gvsuIKKNavKw==} + hasBin: true + peerDependencies: + browserslist: '>= 4.21.0' + update-check@1.5.4: resolution: {integrity: sha512-5YHsflzHP4t1G+8WGPlvKbJEbAJGCgw+Em+dGR1KmBUbr1J36SJBqlHLjR7oob7sco5hWHGQVcr9B2poIVDDTQ==} @@ -4226,6 +5350,34 @@ packages: resolution: {integrity: sha512-OljLrQ9SQdOUqTaQxqL5dEfZWrXExyyWsozYlAWFawPVNuD83igl7uJD2RTkNMbniIYgt8l81eCJGIdQF7avLQ==} engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0} + valtio@1.11.2: + resolution: {integrity: sha512-1XfIxnUXzyswPAPXo1P3Pdx2mq/pIqZICkWN60Hby0d9Iqb+MEIpqgYVlbflvHdrp2YR/q3jyKWRPJJ100yxaw==} + engines: {node: '>=12.20.0'} + peerDependencies: + '@types/react': '>=16.8' + react: '>=16.8' + peerDependenciesMeta: + '@types/react': + optional: true + react: + optional: true + + viem@2.23.2: + resolution: {integrity: sha512-NVmW/E0c5crMOtbEAqMF0e3NmvQykFXhLOc/CkLIXOlzHSA6KXVz3CYVmaKqBF8/xtjsjHAGjdJN3Ru1kFJLaA==} + peerDependencies: + typescript: '>=5.0.4' + peerDependenciesMeta: + typescript: + optional: true + + viem@2.28.0: + resolution: {integrity: sha512-Z4W5O1pe+6pirYTFm451FcZmfGAUxUWt2L/eWC+YfTF28j/8rd7q6MBAi05lMN4KhLJjhN0s5YGIPB+kf1L20g==} + peerDependencies: + typescript: '>=5.0.4' + peerDependenciesMeta: + typescript: + optional: true + vite-node@3.1.2: resolution: {integrity: sha512-/8iMryv46J3aK13iUXsei5G/A3CUlW4665THCPS+K8xAaqrVWiGB4RfXMQXCLjpK9P2eK//BczrVkn5JLAk6DA==} engines: {node: ^18.0.0 || ^20.0.0 || >=22.0.0} @@ -4299,9 +5451,26 @@ packages: jsdom: optional: true + wagmi@2.15.0: + resolution: {integrity: sha512-qG+ltkSzIqjLv/27dwWzq4m3Pg8/DkgunFgn+HlpysaHnyYOtBnKKzZUVxSpeNf8teVo+aF6YjWcmtLSY7E9NQ==} + peerDependencies: + '@tanstack/react-query': '>=5.0.0' + react: '>=18' + typescript: '>=5.0.4' + viem: 2.x + peerDependenciesMeta: + typescript: + optional: true + wcwidth@1.0.1: resolution: {integrity: sha512-XHPEwS0q6TaxcvG85+8EYkbiCux2XtWG2mkc47Ng2A77BQu9+DqIOJldST4HgPkuea7dvKSj5VgX3P1d4rW8Tg==} + webextension-polyfill@0.10.0: + resolution: {integrity: sha512-c5s35LgVa5tFaHhrZDnr3FpQpjj1BB+RXhLTYUxGqBVN460HkbM8TBtEqdXWbpTKfzwCcjAZVF7zXCYSKtcp9g==} + + webidl-conversions@3.0.1: + resolution: {integrity: sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==} + webidl-conversions@7.0.0: resolution: {integrity: sha512-VwddBukDzu71offAQR975unBIGqfKZpM+8ZX6ySk8nYhVoo5CYaZyzt3YBvYtRtO+aoGlqxPg/B87NGVZ/fu6g==} engines: {node: '>=12'} @@ -4310,6 +5479,9 @@ packages: resolution: {integrity: sha512-nt+N2dzIutVRxARx1nghPKGv1xHikU7HKdfafKkLNLindmPU/ch3U31NOCGGA/dmPcmb1VlofO0vnKAcsm0o/Q==} engines: {node: '>=12'} + whatwg-url@5.0.0: + resolution: {integrity: sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==} + which-boxed-primitive@1.0.2: resolution: {integrity: sha512-bwZdv0AKLpplFY2KZRX6TvyuN7ojjr7lwkg6ml0roIy9YeuSr7JS372qlNW18UQYzgYK9ziGcerWqZOmEn9VNg==} @@ -4360,10 +5532,76 @@ packages: wrappy@1.0.2: resolution: {integrity: sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==} + ws@7.5.10: + resolution: {integrity: sha512-+dbF1tHwZpXcbOJdVOkzLDxZP1ailvSxM6ZweXTegylPny803bFhA+vqBYw4s31NSAk4S2Qz+AKXK9a4wkdjcQ==} + engines: {node: '>=8.3.0'} + peerDependencies: + bufferutil: ^4.0.1 + utf-8-validate: ^5.0.2 + peerDependenciesMeta: + bufferutil: + optional: true + utf-8-validate: + optional: true + + ws@8.17.1: + resolution: {integrity: sha512-6XQFvXTkbfUOZOKKILFG1PDK2NDQs4azKQl26T0YS5CxqWLgXajbPZ+h4gZekJyRqFU8pvnbAbbs/3TgRPy+GQ==} + engines: {node: '>=10.0.0'} + peerDependencies: + bufferutil: ^4.0.1 + utf-8-validate: '>=5.0.2' + peerDependenciesMeta: + bufferutil: + optional: true + utf-8-validate: + optional: true + + ws@8.18.0: + resolution: {integrity: sha512-8VbfWfHLbbwu3+N6OKsOMpBdT4kXPDDB9cJk2bJ6mh9ucxdlnNvH1e+roYkKmN9Nxw2yjz7VzeO9oOz2zJ04Pw==} + engines: {node: '>=10.0.0'} + peerDependencies: + bufferutil: ^4.0.1 + utf-8-validate: '>=5.0.2' + peerDependenciesMeta: + bufferutil: + optional: true + utf-8-validate: + optional: true + + ws@8.18.1: + resolution: {integrity: sha512-RKW2aJZMXeMxVpnZ6bck+RswznaxmzdULiBr6KY7XkTnW8uvt0iT9H5DkHUChXrc+uurzwa0rVI16n/Xzjdz1w==} + engines: {node: '>=10.0.0'} + peerDependencies: + bufferutil: ^4.0.1 + utf-8-validate: '>=5.0.2' + peerDependenciesMeta: + bufferutil: + optional: true + utf-8-validate: + optional: true + + xmlhttprequest-ssl@2.1.2: + resolution: {integrity: sha512-TEU+nJVUUnA4CYJFLvK5X9AOeH4KvDvhIfm0vV1GaQRtchnG0hgK5p8hw/xjv8cunWYCsiPCSDzObPyhEwq3KQ==} + engines: {node: '>=0.4.0'} + + xtend@4.0.2: + resolution: {integrity: sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==} + engines: {node: '>=0.4'} + + y18n@4.0.3: + resolution: {integrity: sha512-JKhqTOwSrqNA1NY5lSztJ1GrBiUodLMmIZuLiDaMRJ+itFd+ABVE8XBjOvIWL+rSqNDC74LCSFmlb/U4UZ4hJQ==} + y18n@5.0.8: resolution: {integrity: sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==} engines: {node: '>=10'} + yallist@3.1.1: + resolution: {integrity: sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==} + + yargs-parser@18.1.3: + resolution: {integrity: sha512-o50j0JeToy/4K6OZcaQmW6lyXXKhq7csREXcDwk2omFPJEwUNOVtJKvmDr9EI1fAJZUyZcRF7kxGBWmRXudrCQ==} + engines: {node: '>=6'} + yargs-parser@21.1.1: resolution: {integrity: sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==} engines: {node: '>=12'} @@ -4476,20 +5714,20 @@ snapshots: '@0xsequence/design-system@2.1.6(@types/react-dom@19.1.2(@types/react@19.1.2))(@types/react@19.1.2)(motion@12.7.2(react-dom@19.0.0(react@19.0.0))(react@19.0.0))(react-dom@19.0.0(react@19.0.0))(react@19.0.0)': dependencies: - '@radix-ui/react-aspect-ratio': 1.1.3(@types/react-dom@19.1.2(@types/react@19.1.2))(@types/react@19.1.2)(react-dom@19.0.0(react@19.0.0))(react@19.0.0) - '@radix-ui/react-checkbox': 1.1.5(@types/react-dom@19.1.2(@types/react@19.1.2))(@types/react@19.1.2)(react-dom@19.0.0(react@19.0.0))(react@19.0.0) - '@radix-ui/react-collapsible': 1.1.4(@types/react-dom@19.1.2(@types/react@19.1.2))(@types/react@19.1.2)(react-dom@19.0.0(react@19.0.0))(react@19.0.0) - '@radix-ui/react-dialog': 1.1.7(@types/react-dom@19.1.2(@types/react@19.1.2))(@types/react@19.1.2)(react-dom@19.0.0(react@19.0.0))(react@19.0.0) - '@radix-ui/react-dropdown-menu': 2.1.7(@types/react-dom@19.1.2(@types/react@19.1.2))(@types/react@19.1.2)(react-dom@19.0.0(react@19.0.0))(react@19.0.0) - '@radix-ui/react-progress': 1.1.3(@types/react-dom@19.1.2(@types/react@19.1.2))(@types/react@19.1.2)(react-dom@19.0.0(react@19.0.0))(react@19.0.0) - '@radix-ui/react-radio-group': 1.2.4(@types/react-dom@19.1.2(@types/react@19.1.2))(@types/react@19.1.2)(react-dom@19.0.0(react@19.0.0))(react@19.0.0) - '@radix-ui/react-select': 2.1.7(@types/react-dom@19.1.2(@types/react@19.1.2))(@types/react@19.1.2)(react-dom@19.0.0(react@19.0.0))(react@19.0.0) + '@radix-ui/react-aspect-ratio': 1.1.4(@types/react-dom@19.1.2(@types/react@19.1.2))(@types/react@19.1.2)(react-dom@19.0.0(react@19.0.0))(react@19.0.0) + '@radix-ui/react-checkbox': 1.2.3(@types/react-dom@19.1.2(@types/react@19.1.2))(@types/react@19.1.2)(react-dom@19.0.0(react@19.0.0))(react@19.0.0) + '@radix-ui/react-collapsible': 1.1.8(@types/react-dom@19.1.2(@types/react@19.1.2))(@types/react@19.1.2)(react-dom@19.0.0(react@19.0.0))(react@19.0.0) + '@radix-ui/react-dialog': 1.1.11(@types/react-dom@19.1.2(@types/react@19.1.2))(@types/react@19.1.2)(react-dom@19.0.0(react@19.0.0))(react@19.0.0) + '@radix-ui/react-dropdown-menu': 2.1.12(@types/react-dom@19.1.2(@types/react@19.1.2))(@types/react@19.1.2)(react-dom@19.0.0(react@19.0.0))(react@19.0.0) + '@radix-ui/react-progress': 1.1.4(@types/react-dom@19.1.2(@types/react@19.1.2))(@types/react@19.1.2)(react-dom@19.0.0(react@19.0.0))(react@19.0.0) + '@radix-ui/react-radio-group': 1.3.4(@types/react-dom@19.1.2(@types/react@19.1.2))(@types/react@19.1.2)(react-dom@19.0.0(react@19.0.0))(react@19.0.0) + '@radix-ui/react-select': 2.2.2(@types/react-dom@19.1.2(@types/react@19.1.2))(@types/react@19.1.2)(react-dom@19.0.0(react@19.0.0))(react@19.0.0) '@radix-ui/react-slot': 1.2.0(@types/react@19.1.2)(react@19.0.0) - '@radix-ui/react-switch': 1.1.4(@types/react-dom@19.1.2(@types/react@19.1.2))(@types/react@19.1.2)(react-dom@19.0.0(react@19.0.0))(react@19.0.0) - '@radix-ui/react-tabs': 1.1.4(@types/react-dom@19.1.2(@types/react@19.1.2))(@types/react@19.1.2)(react-dom@19.0.0(react@19.0.0))(react@19.0.0) - '@radix-ui/react-toast': 1.2.7(@types/react-dom@19.1.2(@types/react@19.1.2))(@types/react@19.1.2)(react-dom@19.0.0(react@19.0.0))(react@19.0.0) - '@radix-ui/react-tooltip': 1.2.0(@types/react-dom@19.1.2(@types/react@19.1.2))(@types/react@19.1.2)(react-dom@19.0.0(react@19.0.0))(react@19.0.0) - '@radix-ui/react-visually-hidden': 1.1.3(@types/react-dom@19.1.2(@types/react@19.1.2))(@types/react@19.1.2)(react-dom@19.0.0(react@19.0.0))(react@19.0.0) + '@radix-ui/react-switch': 1.2.2(@types/react-dom@19.1.2(@types/react@19.1.2))(@types/react@19.1.2)(react-dom@19.0.0(react@19.0.0))(react@19.0.0) + '@radix-ui/react-tabs': 1.1.9(@types/react-dom@19.1.2(@types/react@19.1.2))(@types/react@19.1.2)(react-dom@19.0.0(react@19.0.0))(react@19.0.0) + '@radix-ui/react-toast': 1.2.11(@types/react-dom@19.1.2(@types/react@19.1.2))(@types/react@19.1.2)(react-dom@19.0.0(react@19.0.0))(react@19.0.0) + '@radix-ui/react-tooltip': 1.2.4(@types/react-dom@19.1.2(@types/react@19.1.2))(@types/react@19.1.2)(react-dom@19.0.0(react@19.0.0))(react@19.0.0) + '@radix-ui/react-visually-hidden': 1.2.0(@types/react-dom@19.1.2(@types/react@19.1.2))(@types/react@19.1.2)(react-dom@19.0.0(react@19.0.0))(react@19.0.0) class-variance-authority: 0.7.1 clsx: 2.1.1 motion: 12.7.2(react-dom@19.0.0(react@19.0.0))(react@19.0.0) @@ -4514,7 +5752,7 @@ snapshots: '@0xsequence/utils': 2.3.8(ethers@6.13.5(bufferutil@4.0.9)(utf-8-validate@5.0.10)) ethers: 6.13.5(bufferutil@4.0.9)(utf-8-validate@5.0.10) - '@0xsequence/hooks@5.1.1(@0xsequence/api@packages+services+api)(@0xsequence/indexer@2.3.9)(@0xsequence/metadata@2.3.8)(@0xsequence/network@2.3.9(ethers@6.13.5(bufferutil@4.0.9)(utf-8-validate@5.0.10)))(@tanstack/react-query@5.74.3(react@19.0.0))(react-dom@19.0.0(react@19.0.0))(react@19.0.0)(viem@2.27.2(bufferutil@4.0.9)(typescript@5.7.3)(utf-8-validate@5.0.10)(zod@3.24.2))': + '@0xsequence/hooks@5.1.1(@0xsequence/api@packages+services+api)(@0xsequence/indexer@2.3.9)(@0xsequence/metadata@2.3.8)(@0xsequence/network@2.3.9(ethers@6.13.5(bufferutil@4.0.9)(utf-8-validate@5.0.10)))(@tanstack/react-query@5.74.3(react@19.0.0))(react-dom@19.0.0(react@19.0.0))(react@19.0.0)(viem@2.28.0(bufferutil@4.0.9)(typescript@5.7.3)(utf-8-validate@5.0.10)(zod@3.24.2))': dependencies: '@0xsequence/api': link:packages/services/api '@0xsequence/indexer': 2.3.9 @@ -4523,7 +5761,7 @@ snapshots: '@tanstack/react-query': 5.74.3(react@19.0.0) react: 19.0.0 react-dom: 19.0.0(react@19.0.0) - viem: 2.27.2(bufferutil@4.0.9)(typescript@5.7.3)(utf-8-validate@5.0.10)(zod@3.24.2) + viem: 2.28.0(bufferutil@4.0.9)(typescript@5.7.3)(utf-8-validate@5.0.10)(zod@3.24.2) '@0xsequence/indexer@2.3.8': {} @@ -4614,12 +5852,12 @@ snapshots: ethers: 6.13.5(bufferutil@4.0.9)(utf-8-validate@5.0.10) js-base64: 3.7.7 - '@0xsequence/wagmi-connector@4.0.1(0xsequence@2.3.8(ethers@6.13.5(bufferutil@4.0.9)(utf-8-validate@5.0.10)))(ethers@6.13.5(bufferutil@4.0.9)(utf-8-validate@5.0.10))(viem@2.27.2(bufferutil@4.0.9)(typescript@5.7.3)(utf-8-validate@5.0.10)(zod@3.24.2))(wagmi@2.14.16(@tanstack/query-core@5.74.3)(@tanstack/react-query@5.74.3(react@19.0.0))(@types/react@19.1.2)(bufferutil@4.0.9)(react@19.0.0)(typescript@5.7.3)(utf-8-validate@5.0.10)(viem@2.27.2(bufferutil@4.0.9)(typescript@5.7.3)(utf-8-validate@5.0.10)(zod@3.24.2))(zod@3.24.2))': + '@0xsequence/wagmi-connector@4.0.1(0xsequence@2.3.8(ethers@6.13.5(bufferutil@4.0.9)(utf-8-validate@5.0.10)))(ethers@6.13.5(bufferutil@4.0.9)(utf-8-validate@5.0.10))(viem@2.28.0(bufferutil@4.0.9)(typescript@5.7.3)(utf-8-validate@5.0.10)(zod@3.24.2))(wagmi@2.15.0(@tanstack/query-core@5.74.3)(@tanstack/react-query@5.74.3(react@19.0.0))(@types/react@19.1.2)(bufferutil@4.0.9)(react@19.0.0)(typescript@5.7.3)(utf-8-validate@5.0.10)(viem@2.28.0(bufferutil@4.0.9)(typescript@5.7.3)(utf-8-validate@5.0.10)(zod@3.24.2))(zod@3.24.2))': dependencies: 0xsequence: 2.3.8(ethers@6.13.5(bufferutil@4.0.9)(utf-8-validate@5.0.10)) ethers: 6.13.5(bufferutil@4.0.9)(utf-8-validate@5.0.10) - viem: 2.27.2(bufferutil@4.0.9)(typescript@5.7.3)(utf-8-validate@5.0.10)(zod@3.24.2) - wagmi: 2.14.16(@tanstack/query-core@5.74.3)(@tanstack/react-query@5.74.3(react@19.0.0))(@types/react@19.1.2)(bufferutil@4.0.9)(react@19.0.0)(typescript@5.7.3)(utf-8-validate@5.0.10)(viem@2.27.2(bufferutil@4.0.9)(typescript@5.7.3)(utf-8-validate@5.0.10)(zod@3.24.2))(zod@3.24.2) + viem: 2.28.0(bufferutil@4.0.9)(typescript@5.7.3)(utf-8-validate@5.0.10)(zod@3.24.2) + wagmi: 2.15.0(@tanstack/query-core@5.74.3)(@tanstack/react-query@5.74.3(react@19.0.0))(@types/react@19.1.2)(bufferutil@4.0.9)(react@19.0.0)(typescript@5.7.3)(utf-8-validate@5.0.10)(viem@2.28.0(bufferutil@4.0.9)(typescript@5.7.3)(utf-8-validate@5.0.10)(zod@3.24.2))(zod@3.24.2) '@0xsequence/wallet@2.3.8(ethers@6.13.5(bufferutil@4.0.9)(utf-8-validate@5.0.10))': dependencies: @@ -4635,6 +5873,98 @@ snapshots: '@adraffy/ens-normalize@1.11.0': {} + '@ampproject/remapping@2.3.0': + dependencies: + '@jridgewell/gen-mapping': 0.3.8 + '@jridgewell/trace-mapping': 0.3.25 + + '@babel/code-frame@7.26.2': + dependencies: + '@babel/helper-validator-identifier': 7.25.9 + js-tokens: 4.0.0 + picocolors: 1.1.1 + + '@babel/compat-data@7.26.8': {} + + '@babel/core@7.26.10': + dependencies: + '@ampproject/remapping': 2.3.0 + '@babel/code-frame': 7.26.2 + '@babel/generator': 7.27.0 + '@babel/helper-compilation-targets': 7.27.0 + '@babel/helper-module-transforms': 7.26.0(@babel/core@7.26.10) + '@babel/helpers': 7.27.0 + '@babel/parser': 7.27.0 + '@babel/template': 7.27.0 + '@babel/traverse': 7.27.0 + '@babel/types': 7.27.0 + convert-source-map: 2.0.0 + debug: 4.4.0 + gensync: 1.0.0-beta.2 + json5: 2.2.3 + semver: 6.3.1 + transitivePeerDependencies: + - supports-color + + '@babel/generator@7.27.0': + dependencies: + '@babel/parser': 7.27.0 + '@babel/types': 7.27.0 + '@jridgewell/gen-mapping': 0.3.8 + '@jridgewell/trace-mapping': 0.3.25 + jsesc: 3.1.0 + + '@babel/helper-compilation-targets@7.27.0': + dependencies: + '@babel/compat-data': 7.26.8 + '@babel/helper-validator-option': 7.25.9 + browserslist: 4.24.4 + lru-cache: 5.1.1 + semver: 6.3.1 + + '@babel/helper-module-imports@7.25.9': + dependencies: + '@babel/traverse': 7.27.0 + '@babel/types': 7.27.0 + transitivePeerDependencies: + - supports-color + + '@babel/helper-module-transforms@7.26.0(@babel/core@7.26.10)': + dependencies: + '@babel/core': 7.26.10 + '@babel/helper-module-imports': 7.25.9 + '@babel/helper-validator-identifier': 7.25.9 + '@babel/traverse': 7.27.0 + transitivePeerDependencies: + - supports-color + + '@babel/helper-plugin-utils@7.26.5': {} + + '@babel/helper-string-parser@7.25.9': {} + + '@babel/helper-validator-identifier@7.25.9': {} + + '@babel/helper-validator-option@7.25.9': {} + + '@babel/helpers@7.27.0': + dependencies: + '@babel/template': 7.27.0 + '@babel/types': 7.27.0 + + '@babel/parser@7.27.0': + dependencies: + '@babel/types': 7.27.0 + + '@babel/plugin-transform-react-jsx-self@7.25.9(@babel/core@7.26.10)': + dependencies: + '@babel/core': 7.26.10 + '@babel/helper-plugin-utils': 7.26.5 + + '@babel/plugin-transform-react-jsx-source@7.25.9(@babel/core@7.26.10)': + dependencies: + '@babel/core': 7.26.10 + '@babel/helper-plugin-utils': 7.26.5 + '@babel/runtime-corejs3@7.26.0': dependencies: core-js-pure: 3.39.0 @@ -4644,6 +5974,29 @@ snapshots: dependencies: regenerator-runtime: 0.14.1 + '@babel/template@7.27.0': + dependencies: + '@babel/code-frame': 7.26.2 + '@babel/parser': 7.27.0 + '@babel/types': 7.27.0 + + '@babel/traverse@7.27.0': + dependencies: + '@babel/code-frame': 7.26.2 + '@babel/generator': 7.27.0 + '@babel/parser': 7.27.0 + '@babel/template': 7.27.0 + '@babel/types': 7.27.0 + debug: 4.4.0 + globals: 11.12.0 + transitivePeerDependencies: + - supports-color + + '@babel/types@7.27.0': + dependencies: + '@babel/helper-string-parser': 7.25.9 + '@babel/helper-validator-identifier': 7.25.9 + '@changesets/apply-release-plan@7.0.10': dependencies: '@changesets/config': 3.1.1 @@ -5122,10 +6475,23 @@ snapshots: wrap-ansi: 8.1.0 wrap-ansi-cjs: wrap-ansi@7.0.0 + '@jridgewell/gen-mapping@0.3.8': + dependencies: + '@jridgewell/set-array': 1.2.1 + '@jridgewell/sourcemap-codec': 1.5.0 + '@jridgewell/trace-mapping': 0.3.25 + '@jridgewell/resolve-uri@3.1.2': {} + '@jridgewell/set-array@1.2.1': {} + '@jridgewell/sourcemap-codec@1.5.0': {} + '@jridgewell/trace-mapping@0.3.25': + dependencies: + '@jridgewell/resolve-uri': 3.1.2 + '@jridgewell/sourcemap-codec': 1.5.0 + '@jridgewell/trace-mapping@0.3.9': dependencies: '@jridgewell/resolve-uri': 3.1.2 @@ -5228,7 +6594,7 @@ snapshots: bufferutil: 4.0.9 cross-fetch: 4.1.0 date-fns: 2.30.0 - debug: 4.3.7(supports-color@5.5.0) + debug: 4.4.0 eciesjs: 0.4.14 eventemitter2: 6.4.9 readable-stream: 3.6.2 @@ -5252,7 +6618,7 @@ snapshots: '@paulmillr/qr': 0.2.1 bowser: 2.11.0 cross-fetch: 4.1.0 - debug: 4.3.7(supports-color@5.5.0) + debug: 4.4.0 eciesjs: 0.4.14 eth-rpc-errors: 4.0.3 eventemitter2: 6.4.9 @@ -5275,7 +6641,7 @@ snapshots: dependencies: '@ethereumjs/tx': 4.2.0 '@types/debug': 4.1.12 - debug: 4.3.7(supports-color@5.5.0) + debug: 4.4.0 semver: 7.7.1 superstruct: 1.0.4 transitivePeerDependencies: @@ -5288,7 +6654,7 @@ snapshots: '@noble/hashes': 1.7.1 '@scure/base': 1.2.4 '@types/debug': 4.1.12 - debug: 4.3.7(supports-color@5.5.0) + debug: 4.4.0 pony-cause: 2.1.11 semver: 7.7.1 uuid: 9.0.1 @@ -5302,7 +6668,7 @@ snapshots: '@noble/hashes': 1.7.1 '@scure/base': 1.2.4 '@types/debug': 4.1.12 - debug: 4.3.7(supports-color@5.5.0) + debug: 4.4.0 pony-cause: 2.1.11 semver: 7.7.1 uuid: 9.0.1 @@ -5336,91 +6702,570 @@ snapshots: '@motionone/utils': 10.18.0 tslib: 2.8.1 - '@motionone/svelte@10.16.4': + '@motionone/svelte@10.16.4': + dependencies: + '@motionone/dom': 10.18.0 + tslib: 2.8.1 + + '@motionone/types@10.17.1': {} + + '@motionone/utils@10.18.0': + dependencies: + '@motionone/types': 10.17.1 + hey-listen: 1.0.8 + tslib: 2.8.1 + + '@motionone/vue@10.16.4': + dependencies: + '@motionone/dom': 10.18.0 + tslib: 2.8.1 + + '@next/env@15.1.0': {} + + '@next/eslint-plugin-next@15.1.0': + dependencies: + fast-glob: 3.3.1 + + '@next/swc-darwin-arm64@15.1.0': + optional: true + + '@next/swc-darwin-x64@15.1.0': + optional: true + + '@next/swc-linux-arm64-gnu@15.1.0': + optional: true + + '@next/swc-linux-arm64-musl@15.1.0': + optional: true + + '@next/swc-linux-x64-gnu@15.1.0': + optional: true + + '@next/swc-linux-x64-musl@15.1.0': + optional: true + + '@next/swc-win32-arm64-msvc@15.1.0': + optional: true + + '@next/swc-win32-x64-msvc@15.1.0': + optional: true + + '@noble/ciphers@1.2.1': {} + + '@noble/curves@1.2.0': + dependencies: + '@noble/hashes': 1.3.2 + + '@noble/curves@1.4.2': + dependencies: + '@noble/hashes': 1.4.0 + + '@noble/curves@1.8.0': + dependencies: + '@noble/hashes': 1.7.0 + + '@noble/curves@1.8.1': + dependencies: + '@noble/hashes': 1.7.1 + + '@noble/curves@1.8.2': + dependencies: + '@noble/hashes': 1.7.2 + + '@noble/hashes@1.3.2': {} + + '@noble/hashes@1.4.0': {} + + '@noble/hashes@1.7.0': {} + + '@noble/hashes@1.7.1': {} + + '@noble/hashes@1.7.2': {} + + '@nodelib/fs.scandir@2.1.5': + dependencies: + '@nodelib/fs.stat': 2.0.5 + run-parallel: 1.2.0 + + '@nodelib/fs.stat@2.0.5': {} + + '@nodelib/fs.walk@1.2.8': + dependencies: + '@nodelib/fs.scandir': 2.1.5 + fastq: 1.17.1 + + '@paulmillr/qr@0.2.1': {} + + '@radix-ui/number@1.1.1': {} + + '@radix-ui/primitive@1.1.2': {} + + '@radix-ui/react-arrow@1.1.4(@types/react-dom@19.1.2(@types/react@19.1.2))(@types/react@19.1.2)(react-dom@19.0.0(react@19.0.0))(react@19.0.0)': + dependencies: + '@radix-ui/react-primitive': 2.1.0(@types/react-dom@19.1.2(@types/react@19.1.2))(@types/react@19.1.2)(react-dom@19.0.0(react@19.0.0))(react@19.0.0) + react: 19.0.0 + react-dom: 19.0.0(react@19.0.0) + optionalDependencies: + '@types/react': 19.1.2 + '@types/react-dom': 19.1.2(@types/react@19.1.2) + + '@radix-ui/react-aspect-ratio@1.1.4(@types/react-dom@19.1.2(@types/react@19.1.2))(@types/react@19.1.2)(react-dom@19.0.0(react@19.0.0))(react@19.0.0)': + dependencies: + '@radix-ui/react-primitive': 2.1.0(@types/react-dom@19.1.2(@types/react@19.1.2))(@types/react@19.1.2)(react-dom@19.0.0(react@19.0.0))(react@19.0.0) + react: 19.0.0 + react-dom: 19.0.0(react@19.0.0) + optionalDependencies: + '@types/react': 19.1.2 + '@types/react-dom': 19.1.2(@types/react@19.1.2) + + '@radix-ui/react-checkbox@1.2.3(@types/react-dom@19.1.2(@types/react@19.1.2))(@types/react@19.1.2)(react-dom@19.0.0(react@19.0.0))(react@19.0.0)': + dependencies: + '@radix-ui/primitive': 1.1.2 + '@radix-ui/react-compose-refs': 1.1.2(@types/react@19.1.2)(react@19.0.0) + '@radix-ui/react-context': 1.1.2(@types/react@19.1.2)(react@19.0.0) + '@radix-ui/react-presence': 1.1.4(@types/react-dom@19.1.2(@types/react@19.1.2))(@types/react@19.1.2)(react-dom@19.0.0(react@19.0.0))(react@19.0.0) + '@radix-ui/react-primitive': 2.1.0(@types/react-dom@19.1.2(@types/react@19.1.2))(@types/react@19.1.2)(react-dom@19.0.0(react@19.0.0))(react@19.0.0) + '@radix-ui/react-use-controllable-state': 1.2.2(@types/react@19.1.2)(react@19.0.0) + '@radix-ui/react-use-previous': 1.1.1(@types/react@19.1.2)(react@19.0.0) + '@radix-ui/react-use-size': 1.1.1(@types/react@19.1.2)(react@19.0.0) + react: 19.0.0 + react-dom: 19.0.0(react@19.0.0) + optionalDependencies: + '@types/react': 19.1.2 + '@types/react-dom': 19.1.2(@types/react@19.1.2) + + '@radix-ui/react-collapsible@1.1.8(@types/react-dom@19.1.2(@types/react@19.1.2))(@types/react@19.1.2)(react-dom@19.0.0(react@19.0.0))(react@19.0.0)': + dependencies: + '@radix-ui/primitive': 1.1.2 + '@radix-ui/react-compose-refs': 1.1.2(@types/react@19.1.2)(react@19.0.0) + '@radix-ui/react-context': 1.1.2(@types/react@19.1.2)(react@19.0.0) + '@radix-ui/react-id': 1.1.1(@types/react@19.1.2)(react@19.0.0) + '@radix-ui/react-presence': 1.1.4(@types/react-dom@19.1.2(@types/react@19.1.2))(@types/react@19.1.2)(react-dom@19.0.0(react@19.0.0))(react@19.0.0) + '@radix-ui/react-primitive': 2.1.0(@types/react-dom@19.1.2(@types/react@19.1.2))(@types/react@19.1.2)(react-dom@19.0.0(react@19.0.0))(react@19.0.0) + '@radix-ui/react-use-controllable-state': 1.2.2(@types/react@19.1.2)(react@19.0.0) + '@radix-ui/react-use-layout-effect': 1.1.1(@types/react@19.1.2)(react@19.0.0) + react: 19.0.0 + react-dom: 19.0.0(react@19.0.0) + optionalDependencies: + '@types/react': 19.1.2 + '@types/react-dom': 19.1.2(@types/react@19.1.2) + + '@radix-ui/react-collection@1.1.4(@types/react-dom@19.1.2(@types/react@19.1.2))(@types/react@19.1.2)(react-dom@19.0.0(react@19.0.0))(react@19.0.0)': + dependencies: + '@radix-ui/react-compose-refs': 1.1.2(@types/react@19.1.2)(react@19.0.0) + '@radix-ui/react-context': 1.1.2(@types/react@19.1.2)(react@19.0.0) + '@radix-ui/react-primitive': 2.1.0(@types/react-dom@19.1.2(@types/react@19.1.2))(@types/react@19.1.2)(react-dom@19.0.0(react@19.0.0))(react@19.0.0) + '@radix-ui/react-slot': 1.2.0(@types/react@19.1.2)(react@19.0.0) + react: 19.0.0 + react-dom: 19.0.0(react@19.0.0) + optionalDependencies: + '@types/react': 19.1.2 + '@types/react-dom': 19.1.2(@types/react@19.1.2) + + '@radix-ui/react-compose-refs@1.1.2(@types/react@19.1.2)(react@19.0.0)': + dependencies: + react: 19.0.0 + optionalDependencies: + '@types/react': 19.1.2 + + '@radix-ui/react-context@1.1.2(@types/react@19.1.2)(react@19.0.0)': + dependencies: + react: 19.0.0 + optionalDependencies: + '@types/react': 19.1.2 + + '@radix-ui/react-dialog@1.1.11(@types/react-dom@19.1.2(@types/react@19.1.2))(@types/react@19.1.2)(react-dom@19.0.0(react@19.0.0))(react@19.0.0)': + dependencies: + '@radix-ui/primitive': 1.1.2 + '@radix-ui/react-compose-refs': 1.1.2(@types/react@19.1.2)(react@19.0.0) + '@radix-ui/react-context': 1.1.2(@types/react@19.1.2)(react@19.0.0) + '@radix-ui/react-dismissable-layer': 1.1.7(@types/react-dom@19.1.2(@types/react@19.1.2))(@types/react@19.1.2)(react-dom@19.0.0(react@19.0.0))(react@19.0.0) + '@radix-ui/react-focus-guards': 1.1.2(@types/react@19.1.2)(react@19.0.0) + '@radix-ui/react-focus-scope': 1.1.4(@types/react-dom@19.1.2(@types/react@19.1.2))(@types/react@19.1.2)(react-dom@19.0.0(react@19.0.0))(react@19.0.0) + '@radix-ui/react-id': 1.1.1(@types/react@19.1.2)(react@19.0.0) + '@radix-ui/react-portal': 1.1.6(@types/react-dom@19.1.2(@types/react@19.1.2))(@types/react@19.1.2)(react-dom@19.0.0(react@19.0.0))(react@19.0.0) + '@radix-ui/react-presence': 1.1.4(@types/react-dom@19.1.2(@types/react@19.1.2))(@types/react@19.1.2)(react-dom@19.0.0(react@19.0.0))(react@19.0.0) + '@radix-ui/react-primitive': 2.1.0(@types/react-dom@19.1.2(@types/react@19.1.2))(@types/react@19.1.2)(react-dom@19.0.0(react@19.0.0))(react@19.0.0) + '@radix-ui/react-slot': 1.2.0(@types/react@19.1.2)(react@19.0.0) + '@radix-ui/react-use-controllable-state': 1.2.2(@types/react@19.1.2)(react@19.0.0) + aria-hidden: 1.2.4 + react: 19.0.0 + react-dom: 19.0.0(react@19.0.0) + react-remove-scroll: 2.6.3(@types/react@19.1.2)(react@19.0.0) + optionalDependencies: + '@types/react': 19.1.2 + '@types/react-dom': 19.1.2(@types/react@19.1.2) + + '@radix-ui/react-direction@1.1.1(@types/react@19.1.2)(react@19.0.0)': + dependencies: + react: 19.0.0 + optionalDependencies: + '@types/react': 19.1.2 + + '@radix-ui/react-dismissable-layer@1.1.7(@types/react-dom@19.1.2(@types/react@19.1.2))(@types/react@19.1.2)(react-dom@19.0.0(react@19.0.0))(react@19.0.0)': + dependencies: + '@radix-ui/primitive': 1.1.2 + '@radix-ui/react-compose-refs': 1.1.2(@types/react@19.1.2)(react@19.0.0) + '@radix-ui/react-primitive': 2.1.0(@types/react-dom@19.1.2(@types/react@19.1.2))(@types/react@19.1.2)(react-dom@19.0.0(react@19.0.0))(react@19.0.0) + '@radix-ui/react-use-callback-ref': 1.1.1(@types/react@19.1.2)(react@19.0.0) + '@radix-ui/react-use-escape-keydown': 1.1.1(@types/react@19.1.2)(react@19.0.0) + react: 19.0.0 + react-dom: 19.0.0(react@19.0.0) + optionalDependencies: + '@types/react': 19.1.2 + '@types/react-dom': 19.1.2(@types/react@19.1.2) + + '@radix-ui/react-dropdown-menu@2.1.12(@types/react-dom@19.1.2(@types/react@19.1.2))(@types/react@19.1.2)(react-dom@19.0.0(react@19.0.0))(react@19.0.0)': + dependencies: + '@radix-ui/primitive': 1.1.2 + '@radix-ui/react-compose-refs': 1.1.2(@types/react@19.1.2)(react@19.0.0) + '@radix-ui/react-context': 1.1.2(@types/react@19.1.2)(react@19.0.0) + '@radix-ui/react-id': 1.1.1(@types/react@19.1.2)(react@19.0.0) + '@radix-ui/react-menu': 2.1.12(@types/react-dom@19.1.2(@types/react@19.1.2))(@types/react@19.1.2)(react-dom@19.0.0(react@19.0.0))(react@19.0.0) + '@radix-ui/react-primitive': 2.1.0(@types/react-dom@19.1.2(@types/react@19.1.2))(@types/react@19.1.2)(react-dom@19.0.0(react@19.0.0))(react@19.0.0) + '@radix-ui/react-use-controllable-state': 1.2.2(@types/react@19.1.2)(react@19.0.0) + react: 19.0.0 + react-dom: 19.0.0(react@19.0.0) + optionalDependencies: + '@types/react': 19.1.2 + '@types/react-dom': 19.1.2(@types/react@19.1.2) + + '@radix-ui/react-focus-guards@1.1.2(@types/react@19.1.2)(react@19.0.0)': + dependencies: + react: 19.0.0 + optionalDependencies: + '@types/react': 19.1.2 + + '@radix-ui/react-focus-scope@1.1.4(@types/react-dom@19.1.2(@types/react@19.1.2))(@types/react@19.1.2)(react-dom@19.0.0(react@19.0.0))(react@19.0.0)': + dependencies: + '@radix-ui/react-compose-refs': 1.1.2(@types/react@19.1.2)(react@19.0.0) + '@radix-ui/react-primitive': 2.1.0(@types/react-dom@19.1.2(@types/react@19.1.2))(@types/react@19.1.2)(react-dom@19.0.0(react@19.0.0))(react@19.0.0) + '@radix-ui/react-use-callback-ref': 1.1.1(@types/react@19.1.2)(react@19.0.0) + react: 19.0.0 + react-dom: 19.0.0(react@19.0.0) + optionalDependencies: + '@types/react': 19.1.2 + '@types/react-dom': 19.1.2(@types/react@19.1.2) + + '@radix-ui/react-id@1.1.1(@types/react@19.1.2)(react@19.0.0)': + dependencies: + '@radix-ui/react-use-layout-effect': 1.1.1(@types/react@19.1.2)(react@19.0.0) + react: 19.0.0 + optionalDependencies: + '@types/react': 19.1.2 + + '@radix-ui/react-menu@2.1.12(@types/react-dom@19.1.2(@types/react@19.1.2))(@types/react@19.1.2)(react-dom@19.0.0(react@19.0.0))(react@19.0.0)': + dependencies: + '@radix-ui/primitive': 1.1.2 + '@radix-ui/react-collection': 1.1.4(@types/react-dom@19.1.2(@types/react@19.1.2))(@types/react@19.1.2)(react-dom@19.0.0(react@19.0.0))(react@19.0.0) + '@radix-ui/react-compose-refs': 1.1.2(@types/react@19.1.2)(react@19.0.0) + '@radix-ui/react-context': 1.1.2(@types/react@19.1.2)(react@19.0.0) + '@radix-ui/react-direction': 1.1.1(@types/react@19.1.2)(react@19.0.0) + '@radix-ui/react-dismissable-layer': 1.1.7(@types/react-dom@19.1.2(@types/react@19.1.2))(@types/react@19.1.2)(react-dom@19.0.0(react@19.0.0))(react@19.0.0) + '@radix-ui/react-focus-guards': 1.1.2(@types/react@19.1.2)(react@19.0.0) + '@radix-ui/react-focus-scope': 1.1.4(@types/react-dom@19.1.2(@types/react@19.1.2))(@types/react@19.1.2)(react-dom@19.0.0(react@19.0.0))(react@19.0.0) + '@radix-ui/react-id': 1.1.1(@types/react@19.1.2)(react@19.0.0) + '@radix-ui/react-popper': 1.2.4(@types/react-dom@19.1.2(@types/react@19.1.2))(@types/react@19.1.2)(react-dom@19.0.0(react@19.0.0))(react@19.0.0) + '@radix-ui/react-portal': 1.1.6(@types/react-dom@19.1.2(@types/react@19.1.2))(@types/react@19.1.2)(react-dom@19.0.0(react@19.0.0))(react@19.0.0) + '@radix-ui/react-presence': 1.1.4(@types/react-dom@19.1.2(@types/react@19.1.2))(@types/react@19.1.2)(react-dom@19.0.0(react@19.0.0))(react@19.0.0) + '@radix-ui/react-primitive': 2.1.0(@types/react-dom@19.1.2(@types/react@19.1.2))(@types/react@19.1.2)(react-dom@19.0.0(react@19.0.0))(react@19.0.0) + '@radix-ui/react-roving-focus': 1.1.7(@types/react-dom@19.1.2(@types/react@19.1.2))(@types/react@19.1.2)(react-dom@19.0.0(react@19.0.0))(react@19.0.0) + '@radix-ui/react-slot': 1.2.0(@types/react@19.1.2)(react@19.0.0) + '@radix-ui/react-use-callback-ref': 1.1.1(@types/react@19.1.2)(react@19.0.0) + aria-hidden: 1.2.4 + react: 19.0.0 + react-dom: 19.0.0(react@19.0.0) + react-remove-scroll: 2.6.3(@types/react@19.1.2)(react@19.0.0) + optionalDependencies: + '@types/react': 19.1.2 + '@types/react-dom': 19.1.2(@types/react@19.1.2) + + '@radix-ui/react-popover@1.1.11(@types/react-dom@19.1.2(@types/react@19.1.2))(@types/react@19.1.2)(react-dom@19.0.0(react@19.0.0))(react@19.0.0)': + dependencies: + '@radix-ui/primitive': 1.1.2 + '@radix-ui/react-compose-refs': 1.1.2(@types/react@19.1.2)(react@19.0.0) + '@radix-ui/react-context': 1.1.2(@types/react@19.1.2)(react@19.0.0) + '@radix-ui/react-dismissable-layer': 1.1.7(@types/react-dom@19.1.2(@types/react@19.1.2))(@types/react@19.1.2)(react-dom@19.0.0(react@19.0.0))(react@19.0.0) + '@radix-ui/react-focus-guards': 1.1.2(@types/react@19.1.2)(react@19.0.0) + '@radix-ui/react-focus-scope': 1.1.4(@types/react-dom@19.1.2(@types/react@19.1.2))(@types/react@19.1.2)(react-dom@19.0.0(react@19.0.0))(react@19.0.0) + '@radix-ui/react-id': 1.1.1(@types/react@19.1.2)(react@19.0.0) + '@radix-ui/react-popper': 1.2.4(@types/react-dom@19.1.2(@types/react@19.1.2))(@types/react@19.1.2)(react-dom@19.0.0(react@19.0.0))(react@19.0.0) + '@radix-ui/react-portal': 1.1.6(@types/react-dom@19.1.2(@types/react@19.1.2))(@types/react@19.1.2)(react-dom@19.0.0(react@19.0.0))(react@19.0.0) + '@radix-ui/react-presence': 1.1.4(@types/react-dom@19.1.2(@types/react@19.1.2))(@types/react@19.1.2)(react-dom@19.0.0(react@19.0.0))(react@19.0.0) + '@radix-ui/react-primitive': 2.1.0(@types/react-dom@19.1.2(@types/react@19.1.2))(@types/react@19.1.2)(react-dom@19.0.0(react@19.0.0))(react@19.0.0) + '@radix-ui/react-slot': 1.2.0(@types/react@19.1.2)(react@19.0.0) + '@radix-ui/react-use-controllable-state': 1.2.2(@types/react@19.1.2)(react@19.0.0) + aria-hidden: 1.2.4 + react: 19.0.0 + react-dom: 19.0.0(react@19.0.0) + react-remove-scroll: 2.6.3(@types/react@19.1.2)(react@19.0.0) + optionalDependencies: + '@types/react': 19.1.2 + '@types/react-dom': 19.1.2(@types/react@19.1.2) + + '@radix-ui/react-popper@1.2.4(@types/react-dom@19.1.2(@types/react@19.1.2))(@types/react@19.1.2)(react-dom@19.0.0(react@19.0.0))(react@19.0.0)': + dependencies: + '@floating-ui/react-dom': 2.1.2(react-dom@19.0.0(react@19.0.0))(react@19.0.0) + '@radix-ui/react-arrow': 1.1.4(@types/react-dom@19.1.2(@types/react@19.1.2))(@types/react@19.1.2)(react-dom@19.0.0(react@19.0.0))(react@19.0.0) + '@radix-ui/react-compose-refs': 1.1.2(@types/react@19.1.2)(react@19.0.0) + '@radix-ui/react-context': 1.1.2(@types/react@19.1.2)(react@19.0.0) + '@radix-ui/react-primitive': 2.1.0(@types/react-dom@19.1.2(@types/react@19.1.2))(@types/react@19.1.2)(react-dom@19.0.0(react@19.0.0))(react@19.0.0) + '@radix-ui/react-use-callback-ref': 1.1.1(@types/react@19.1.2)(react@19.0.0) + '@radix-ui/react-use-layout-effect': 1.1.1(@types/react@19.1.2)(react@19.0.0) + '@radix-ui/react-use-rect': 1.1.1(@types/react@19.1.2)(react@19.0.0) + '@radix-ui/react-use-size': 1.1.1(@types/react@19.1.2)(react@19.0.0) + '@radix-ui/rect': 1.1.1 + react: 19.0.0 + react-dom: 19.0.0(react@19.0.0) + optionalDependencies: + '@types/react': 19.1.2 + '@types/react-dom': 19.1.2(@types/react@19.1.2) + + '@radix-ui/react-portal@1.1.6(@types/react-dom@19.1.2(@types/react@19.1.2))(@types/react@19.1.2)(react-dom@19.0.0(react@19.0.0))(react@19.0.0)': + dependencies: + '@radix-ui/react-primitive': 2.1.0(@types/react-dom@19.1.2(@types/react@19.1.2))(@types/react@19.1.2)(react-dom@19.0.0(react@19.0.0))(react@19.0.0) + '@radix-ui/react-use-layout-effect': 1.1.1(@types/react@19.1.2)(react@19.0.0) + react: 19.0.0 + react-dom: 19.0.0(react@19.0.0) + optionalDependencies: + '@types/react': 19.1.2 + '@types/react-dom': 19.1.2(@types/react@19.1.2) + + '@radix-ui/react-presence@1.1.4(@types/react-dom@19.1.2(@types/react@19.1.2))(@types/react@19.1.2)(react-dom@19.0.0(react@19.0.0))(react@19.0.0)': + dependencies: + '@radix-ui/react-compose-refs': 1.1.2(@types/react@19.1.2)(react@19.0.0) + '@radix-ui/react-use-layout-effect': 1.1.1(@types/react@19.1.2)(react@19.0.0) + react: 19.0.0 + react-dom: 19.0.0(react@19.0.0) + optionalDependencies: + '@types/react': 19.1.2 + '@types/react-dom': 19.1.2(@types/react@19.1.2) + + '@radix-ui/react-primitive@2.1.0(@types/react-dom@19.1.2(@types/react@19.1.2))(@types/react@19.1.2)(react-dom@19.0.0(react@19.0.0))(react@19.0.0)': + dependencies: + '@radix-ui/react-slot': 1.2.0(@types/react@19.1.2)(react@19.0.0) + react: 19.0.0 + react-dom: 19.0.0(react@19.0.0) + optionalDependencies: + '@types/react': 19.1.2 + '@types/react-dom': 19.1.2(@types/react@19.1.2) + + '@radix-ui/react-progress@1.1.4(@types/react-dom@19.1.2(@types/react@19.1.2))(@types/react@19.1.2)(react-dom@19.0.0(react@19.0.0))(react@19.0.0)': + dependencies: + '@radix-ui/react-context': 1.1.2(@types/react@19.1.2)(react@19.0.0) + '@radix-ui/react-primitive': 2.1.0(@types/react-dom@19.1.2(@types/react@19.1.2))(@types/react@19.1.2)(react-dom@19.0.0(react@19.0.0))(react@19.0.0) + react: 19.0.0 + react-dom: 19.0.0(react@19.0.0) + optionalDependencies: + '@types/react': 19.1.2 + '@types/react-dom': 19.1.2(@types/react@19.1.2) + + '@radix-ui/react-radio-group@1.3.4(@types/react-dom@19.1.2(@types/react@19.1.2))(@types/react@19.1.2)(react-dom@19.0.0(react@19.0.0))(react@19.0.0)': + dependencies: + '@radix-ui/primitive': 1.1.2 + '@radix-ui/react-compose-refs': 1.1.2(@types/react@19.1.2)(react@19.0.0) + '@radix-ui/react-context': 1.1.2(@types/react@19.1.2)(react@19.0.0) + '@radix-ui/react-direction': 1.1.1(@types/react@19.1.2)(react@19.0.0) + '@radix-ui/react-presence': 1.1.4(@types/react-dom@19.1.2(@types/react@19.1.2))(@types/react@19.1.2)(react-dom@19.0.0(react@19.0.0))(react@19.0.0) + '@radix-ui/react-primitive': 2.1.0(@types/react-dom@19.1.2(@types/react@19.1.2))(@types/react@19.1.2)(react-dom@19.0.0(react@19.0.0))(react@19.0.0) + '@radix-ui/react-roving-focus': 1.1.7(@types/react-dom@19.1.2(@types/react@19.1.2))(@types/react@19.1.2)(react-dom@19.0.0(react@19.0.0))(react@19.0.0) + '@radix-ui/react-use-controllable-state': 1.2.2(@types/react@19.1.2)(react@19.0.0) + '@radix-ui/react-use-previous': 1.1.1(@types/react@19.1.2)(react@19.0.0) + '@radix-ui/react-use-size': 1.1.1(@types/react@19.1.2)(react@19.0.0) + react: 19.0.0 + react-dom: 19.0.0(react@19.0.0) + optionalDependencies: + '@types/react': 19.1.2 + '@types/react-dom': 19.1.2(@types/react@19.1.2) + + '@radix-ui/react-roving-focus@1.1.7(@types/react-dom@19.1.2(@types/react@19.1.2))(@types/react@19.1.2)(react-dom@19.0.0(react@19.0.0))(react@19.0.0)': + dependencies: + '@radix-ui/primitive': 1.1.2 + '@radix-ui/react-collection': 1.1.4(@types/react-dom@19.1.2(@types/react@19.1.2))(@types/react@19.1.2)(react-dom@19.0.0(react@19.0.0))(react@19.0.0) + '@radix-ui/react-compose-refs': 1.1.2(@types/react@19.1.2)(react@19.0.0) + '@radix-ui/react-context': 1.1.2(@types/react@19.1.2)(react@19.0.0) + '@radix-ui/react-direction': 1.1.1(@types/react@19.1.2)(react@19.0.0) + '@radix-ui/react-id': 1.1.1(@types/react@19.1.2)(react@19.0.0) + '@radix-ui/react-primitive': 2.1.0(@types/react-dom@19.1.2(@types/react@19.1.2))(@types/react@19.1.2)(react-dom@19.0.0(react@19.0.0))(react@19.0.0) + '@radix-ui/react-use-callback-ref': 1.1.1(@types/react@19.1.2)(react@19.0.0) + '@radix-ui/react-use-controllable-state': 1.2.2(@types/react@19.1.2)(react@19.0.0) + react: 19.0.0 + react-dom: 19.0.0(react@19.0.0) + optionalDependencies: + '@types/react': 19.1.2 + '@types/react-dom': 19.1.2(@types/react@19.1.2) + + '@radix-ui/react-select@2.2.2(@types/react-dom@19.1.2(@types/react@19.1.2))(@types/react@19.1.2)(react-dom@19.0.0(react@19.0.0))(react@19.0.0)': + dependencies: + '@radix-ui/number': 1.1.1 + '@radix-ui/primitive': 1.1.2 + '@radix-ui/react-collection': 1.1.4(@types/react-dom@19.1.2(@types/react@19.1.2))(@types/react@19.1.2)(react-dom@19.0.0(react@19.0.0))(react@19.0.0) + '@radix-ui/react-compose-refs': 1.1.2(@types/react@19.1.2)(react@19.0.0) + '@radix-ui/react-context': 1.1.2(@types/react@19.1.2)(react@19.0.0) + '@radix-ui/react-direction': 1.1.1(@types/react@19.1.2)(react@19.0.0) + '@radix-ui/react-dismissable-layer': 1.1.7(@types/react-dom@19.1.2(@types/react@19.1.2))(@types/react@19.1.2)(react-dom@19.0.0(react@19.0.0))(react@19.0.0) + '@radix-ui/react-focus-guards': 1.1.2(@types/react@19.1.2)(react@19.0.0) + '@radix-ui/react-focus-scope': 1.1.4(@types/react-dom@19.1.2(@types/react@19.1.2))(@types/react@19.1.2)(react-dom@19.0.0(react@19.0.0))(react@19.0.0) + '@radix-ui/react-id': 1.1.1(@types/react@19.1.2)(react@19.0.0) + '@radix-ui/react-popper': 1.2.4(@types/react-dom@19.1.2(@types/react@19.1.2))(@types/react@19.1.2)(react-dom@19.0.0(react@19.0.0))(react@19.0.0) + '@radix-ui/react-portal': 1.1.6(@types/react-dom@19.1.2(@types/react@19.1.2))(@types/react@19.1.2)(react-dom@19.0.0(react@19.0.0))(react@19.0.0) + '@radix-ui/react-primitive': 2.1.0(@types/react-dom@19.1.2(@types/react@19.1.2))(@types/react@19.1.2)(react-dom@19.0.0(react@19.0.0))(react@19.0.0) + '@radix-ui/react-slot': 1.2.0(@types/react@19.1.2)(react@19.0.0) + '@radix-ui/react-use-callback-ref': 1.1.1(@types/react@19.1.2)(react@19.0.0) + '@radix-ui/react-use-controllable-state': 1.2.2(@types/react@19.1.2)(react@19.0.0) + '@radix-ui/react-use-layout-effect': 1.1.1(@types/react@19.1.2)(react@19.0.0) + '@radix-ui/react-use-previous': 1.1.1(@types/react@19.1.2)(react@19.0.0) + '@radix-ui/react-visually-hidden': 1.2.0(@types/react-dom@19.1.2(@types/react@19.1.2))(@types/react@19.1.2)(react-dom@19.0.0(react@19.0.0))(react@19.0.0) + aria-hidden: 1.2.4 + react: 19.0.0 + react-dom: 19.0.0(react@19.0.0) + react-remove-scroll: 2.6.3(@types/react@19.1.2)(react@19.0.0) + optionalDependencies: + '@types/react': 19.1.2 + '@types/react-dom': 19.1.2(@types/react@19.1.2) + + '@radix-ui/react-slot@1.2.0(@types/react@19.1.2)(react@19.0.0)': + dependencies: + '@radix-ui/react-compose-refs': 1.1.2(@types/react@19.1.2)(react@19.0.0) + react: 19.0.0 + optionalDependencies: + '@types/react': 19.1.2 + + '@radix-ui/react-switch@1.2.2(@types/react-dom@19.1.2(@types/react@19.1.2))(@types/react@19.1.2)(react-dom@19.0.0(react@19.0.0))(react@19.0.0)': + dependencies: + '@radix-ui/primitive': 1.1.2 + '@radix-ui/react-compose-refs': 1.1.2(@types/react@19.1.2)(react@19.0.0) + '@radix-ui/react-context': 1.1.2(@types/react@19.1.2)(react@19.0.0) + '@radix-ui/react-primitive': 2.1.0(@types/react-dom@19.1.2(@types/react@19.1.2))(@types/react@19.1.2)(react-dom@19.0.0(react@19.0.0))(react@19.0.0) + '@radix-ui/react-use-controllable-state': 1.2.2(@types/react@19.1.2)(react@19.0.0) + '@radix-ui/react-use-previous': 1.1.1(@types/react@19.1.2)(react@19.0.0) + '@radix-ui/react-use-size': 1.1.1(@types/react@19.1.2)(react@19.0.0) + react: 19.0.0 + react-dom: 19.0.0(react@19.0.0) + optionalDependencies: + '@types/react': 19.1.2 + '@types/react-dom': 19.1.2(@types/react@19.1.2) + + '@radix-ui/react-tabs@1.1.9(@types/react-dom@19.1.2(@types/react@19.1.2))(@types/react@19.1.2)(react-dom@19.0.0(react@19.0.0))(react@19.0.0)': + dependencies: + '@radix-ui/primitive': 1.1.2 + '@radix-ui/react-context': 1.1.2(@types/react@19.1.2)(react@19.0.0) + '@radix-ui/react-direction': 1.1.1(@types/react@19.1.2)(react@19.0.0) + '@radix-ui/react-id': 1.1.1(@types/react@19.1.2)(react@19.0.0) + '@radix-ui/react-presence': 1.1.4(@types/react-dom@19.1.2(@types/react@19.1.2))(@types/react@19.1.2)(react-dom@19.0.0(react@19.0.0))(react@19.0.0) + '@radix-ui/react-primitive': 2.1.0(@types/react-dom@19.1.2(@types/react@19.1.2))(@types/react@19.1.2)(react-dom@19.0.0(react@19.0.0))(react@19.0.0) + '@radix-ui/react-roving-focus': 1.1.7(@types/react-dom@19.1.2(@types/react@19.1.2))(@types/react@19.1.2)(react-dom@19.0.0(react@19.0.0))(react@19.0.0) + '@radix-ui/react-use-controllable-state': 1.2.2(@types/react@19.1.2)(react@19.0.0) + react: 19.0.0 + react-dom: 19.0.0(react@19.0.0) + optionalDependencies: + '@types/react': 19.1.2 + '@types/react-dom': 19.1.2(@types/react@19.1.2) + + '@radix-ui/react-toast@1.2.11(@types/react-dom@19.1.2(@types/react@19.1.2))(@types/react@19.1.2)(react-dom@19.0.0(react@19.0.0))(react@19.0.0)': + dependencies: + '@radix-ui/primitive': 1.1.2 + '@radix-ui/react-collection': 1.1.4(@types/react-dom@19.1.2(@types/react@19.1.2))(@types/react@19.1.2)(react-dom@19.0.0(react@19.0.0))(react@19.0.0) + '@radix-ui/react-compose-refs': 1.1.2(@types/react@19.1.2)(react@19.0.0) + '@radix-ui/react-context': 1.1.2(@types/react@19.1.2)(react@19.0.0) + '@radix-ui/react-dismissable-layer': 1.1.7(@types/react-dom@19.1.2(@types/react@19.1.2))(@types/react@19.1.2)(react-dom@19.0.0(react@19.0.0))(react@19.0.0) + '@radix-ui/react-portal': 1.1.6(@types/react-dom@19.1.2(@types/react@19.1.2))(@types/react@19.1.2)(react-dom@19.0.0(react@19.0.0))(react@19.0.0) + '@radix-ui/react-presence': 1.1.4(@types/react-dom@19.1.2(@types/react@19.1.2))(@types/react@19.1.2)(react-dom@19.0.0(react@19.0.0))(react@19.0.0) + '@radix-ui/react-primitive': 2.1.0(@types/react-dom@19.1.2(@types/react@19.1.2))(@types/react@19.1.2)(react-dom@19.0.0(react@19.0.0))(react@19.0.0) + '@radix-ui/react-use-callback-ref': 1.1.1(@types/react@19.1.2)(react@19.0.0) + '@radix-ui/react-use-controllable-state': 1.2.2(@types/react@19.1.2)(react@19.0.0) + '@radix-ui/react-use-layout-effect': 1.1.1(@types/react@19.1.2)(react@19.0.0) + '@radix-ui/react-visually-hidden': 1.2.0(@types/react-dom@19.1.2(@types/react@19.1.2))(@types/react@19.1.2)(react-dom@19.0.0(react@19.0.0))(react@19.0.0) + react: 19.0.0 + react-dom: 19.0.0(react@19.0.0) + optionalDependencies: + '@types/react': 19.1.2 + '@types/react-dom': 19.1.2(@types/react@19.1.2) + + '@radix-ui/react-tooltip@1.2.4(@types/react-dom@19.1.2(@types/react@19.1.2))(@types/react@19.1.2)(react-dom@19.0.0(react@19.0.0))(react@19.0.0)': + dependencies: + '@radix-ui/primitive': 1.1.2 + '@radix-ui/react-compose-refs': 1.1.2(@types/react@19.1.2)(react@19.0.0) + '@radix-ui/react-context': 1.1.2(@types/react@19.1.2)(react@19.0.0) + '@radix-ui/react-dismissable-layer': 1.1.7(@types/react-dom@19.1.2(@types/react@19.1.2))(@types/react@19.1.2)(react-dom@19.0.0(react@19.0.0))(react@19.0.0) + '@radix-ui/react-id': 1.1.1(@types/react@19.1.2)(react@19.0.0) + '@radix-ui/react-popper': 1.2.4(@types/react-dom@19.1.2(@types/react@19.1.2))(@types/react@19.1.2)(react-dom@19.0.0(react@19.0.0))(react@19.0.0) + '@radix-ui/react-portal': 1.1.6(@types/react-dom@19.1.2(@types/react@19.1.2))(@types/react@19.1.2)(react-dom@19.0.0(react@19.0.0))(react@19.0.0) + '@radix-ui/react-presence': 1.1.4(@types/react-dom@19.1.2(@types/react@19.1.2))(@types/react@19.1.2)(react-dom@19.0.0(react@19.0.0))(react@19.0.0) + '@radix-ui/react-primitive': 2.1.0(@types/react-dom@19.1.2(@types/react@19.1.2))(@types/react@19.1.2)(react-dom@19.0.0(react@19.0.0))(react@19.0.0) + '@radix-ui/react-slot': 1.2.0(@types/react@19.1.2)(react@19.0.0) + '@radix-ui/react-use-controllable-state': 1.2.2(@types/react@19.1.2)(react@19.0.0) + '@radix-ui/react-visually-hidden': 1.2.0(@types/react-dom@19.1.2(@types/react@19.1.2))(@types/react@19.1.2)(react-dom@19.0.0(react@19.0.0))(react@19.0.0) + react: 19.0.0 + react-dom: 19.0.0(react@19.0.0) + optionalDependencies: + '@types/react': 19.1.2 + '@types/react-dom': 19.1.2(@types/react@19.1.2) + + '@radix-ui/react-use-callback-ref@1.1.1(@types/react@19.1.2)(react@19.0.0)': dependencies: - '@motionone/dom': 10.18.0 - tslib: 2.8.1 - - '@motionone/types@10.17.1': {} + react: 19.0.0 + optionalDependencies: + '@types/react': 19.1.2 - '@motionone/utils@10.18.0': + '@radix-ui/react-use-controllable-state@1.2.2(@types/react@19.1.2)(react@19.0.0)': dependencies: - '@motionone/types': 10.17.1 - hey-listen: 1.0.8 - tslib: 2.8.1 + '@radix-ui/react-use-effect-event': 0.0.2(@types/react@19.1.2)(react@19.0.0) + '@radix-ui/react-use-layout-effect': 1.1.1(@types/react@19.1.2)(react@19.0.0) + react: 19.0.0 + optionalDependencies: + '@types/react': 19.1.2 - '@motionone/vue@10.16.4': + '@radix-ui/react-use-effect-event@0.0.2(@types/react@19.1.2)(react@19.0.0)': dependencies: - '@motionone/dom': 10.18.0 - tslib: 2.8.1 - - '@next/env@15.1.0': {} + '@radix-ui/react-use-layout-effect': 1.1.1(@types/react@19.1.2)(react@19.0.0) + react: 19.0.0 + optionalDependencies: + '@types/react': 19.1.2 - '@next/eslint-plugin-next@15.1.0': + '@radix-ui/react-use-escape-keydown@1.1.1(@types/react@19.1.2)(react@19.0.0)': dependencies: - fast-glob: 3.3.1 - - '@next/swc-darwin-arm64@15.1.0': - optional: true - - '@next/swc-darwin-x64@15.1.0': - optional: true - - '@next/swc-linux-arm64-gnu@15.1.0': - optional: true - - '@next/swc-linux-arm64-musl@15.1.0': - optional: true - - '@next/swc-linux-x64-gnu@15.1.0': - optional: true - - '@next/swc-linux-x64-musl@15.1.0': - optional: true - - '@next/swc-win32-arm64-msvc@15.1.0': - optional: true - - '@next/swc-win32-x64-msvc@15.1.0': - optional: true - - '@noble/ciphers@1.2.1': {} + '@radix-ui/react-use-callback-ref': 1.1.1(@types/react@19.1.2)(react@19.0.0) + react: 19.0.0 + optionalDependencies: + '@types/react': 19.1.2 - '@noble/curves@1.2.0': + '@radix-ui/react-use-layout-effect@1.1.1(@types/react@19.1.2)(react@19.0.0)': dependencies: - '@noble/hashes': 1.3.2 + react: 19.0.0 + optionalDependencies: + '@types/react': 19.1.2 - '@noble/curves@1.4.2': + '@radix-ui/react-use-previous@1.1.1(@types/react@19.1.2)(react@19.0.0)': dependencies: - '@noble/hashes': 1.4.0 + react: 19.0.0 + optionalDependencies: + '@types/react': 19.1.2 - '@noble/curves@1.8.0': + '@radix-ui/react-use-rect@1.1.1(@types/react@19.1.2)(react@19.0.0)': dependencies: - '@noble/hashes': 1.7.0 + '@radix-ui/rect': 1.1.1 + react: 19.0.0 + optionalDependencies: + '@types/react': 19.1.2 - '@noble/curves@1.8.1': + '@radix-ui/react-use-size@1.1.1(@types/react@19.1.2)(react@19.0.0)': dependencies: - '@noble/hashes': 1.7.1 - - '@noble/hashes@1.3.2': {} - - '@noble/hashes@1.4.0': {} - - '@noble/hashes@1.7.0': {} - - '@noble/hashes@1.7.1': {} + '@radix-ui/react-use-layout-effect': 1.1.1(@types/react@19.1.2)(react@19.0.0) + react: 19.0.0 + optionalDependencies: + '@types/react': 19.1.2 - '@nodelib/fs.scandir@2.1.5': + '@radix-ui/react-visually-hidden@1.2.0(@types/react-dom@19.1.2(@types/react@19.1.2))(@types/react@19.1.2)(react-dom@19.0.0(react@19.0.0))(react@19.0.0)': dependencies: - '@nodelib/fs.stat': 2.0.5 - run-parallel: 1.2.0 - - '@nodelib/fs.stat@2.0.5': {} + '@radix-ui/react-primitive': 2.1.0(@types/react-dom@19.1.2(@types/react@19.1.2))(@types/react@19.1.2)(react-dom@19.0.0(react@19.0.0))(react@19.0.0) + react: 19.0.0 + react-dom: 19.0.0(react@19.0.0) + optionalDependencies: + '@types/react': 19.1.2 + '@types/react-dom': 19.1.2(@types/react@19.1.2) - '@nodelib/fs.walk@1.2.8': - dependencies: - '@nodelib/fs.scandir': 2.1.5 - fastq: 1.17.1 + '@radix-ui/rect@1.1.1': {} '@rollup/rollup-android-arm-eabi@4.40.0': optional: true @@ -5482,6 +7327,30 @@ snapshots: '@rollup/rollup-win32-x64-msvc@4.40.0': optional: true + '@safe-global/safe-apps-provider@0.18.6(bufferutil@4.0.9)(typescript@5.7.3)(utf-8-validate@5.0.10)(zod@3.24.2)': + dependencies: + '@safe-global/safe-apps-sdk': 9.1.0(bufferutil@4.0.9)(typescript@5.7.3)(utf-8-validate@5.0.10)(zod@3.24.2) + events: 3.3.0 + transitivePeerDependencies: + - bufferutil + - typescript + - utf-8-validate + - zod + + '@safe-global/safe-apps-sdk@9.1.0(bufferutil@4.0.9)(typescript@5.7.3)(utf-8-validate@5.0.10)(zod@3.24.2)': + dependencies: + '@safe-global/safe-gateway-typescript-sdk': 3.23.1 + viem: 2.28.0(bufferutil@4.0.9)(typescript@5.7.3)(utf-8-validate@5.0.10)(zod@3.24.2) + transitivePeerDependencies: + - bufferutil + - typescript + - utf-8-validate + - zod + + '@safe-global/safe-gateway-typescript-sdk@3.23.1': {} + + '@scure/base@1.1.9': {} + '@scure/base@1.2.4': {} '@scure/bip32@1.4.0': @@ -5506,6 +7375,8 @@ snapshots: '@noble/hashes': 1.7.1 '@scure/base': 1.2.4 + '@socket.io/component-emitter@3.1.2': {} + '@swc/counter@0.1.3': {} '@swc/helpers@0.5.15': @@ -5570,12 +7441,12 @@ snapshots: '@tailwindcss/oxide-win32-arm64-msvc': 4.1.4 '@tailwindcss/oxide-win32-x64-msvc': 4.1.4 - '@tailwindcss/vite@4.1.4(vite@6.2.6(@types/node@22.13.9)(jiti@2.4.2)(lightningcss@1.29.2))': + '@tailwindcss/vite@4.1.4(vite@6.3.2(@types/node@22.13.9)(jiti@2.4.2)(lightningcss@1.29.2))': dependencies: '@tailwindcss/node': 4.1.4 '@tailwindcss/oxide': 4.1.4 tailwindcss: 4.1.4 - vite: 6.2.6(@types/node@22.13.9)(jiti@2.4.2)(lightningcss@1.29.2) + vite: 6.3.2(@types/node@22.13.9)(jiti@2.4.2)(lightningcss@1.29.2) '@tanstack/query-core@5.74.3': {} @@ -5629,6 +7500,31 @@ snapshots: semver: 7.7.1 update-check: 1.5.4 + '@types/babel__core@7.20.5': + dependencies: + '@babel/parser': 7.27.0 + '@babel/types': 7.27.0 + '@types/babel__generator': 7.27.0 + '@types/babel__template': 7.4.4 + '@types/babel__traverse': 7.20.7 + + '@types/babel__generator@7.27.0': + dependencies: + '@babel/types': 7.27.0 + + '@types/babel__template@7.4.4': + dependencies: + '@babel/parser': 7.27.0 + '@babel/types': 7.27.0 + + '@types/babel__traverse@7.20.7': + dependencies: + '@babel/types': 7.27.0 + + '@types/debug@4.1.12': + dependencies: + '@types/ms': 2.1.0 + '@types/estree@1.0.6': {} '@types/estree@1.0.7': {} @@ -5687,6 +7583,10 @@ snapshots: '@types/prop-types': 15.7.13 csstype: 3.1.3 + '@types/react@19.1.2': + dependencies: + csstype: 3.1.3 + '@types/through@0.0.33': dependencies: '@types/node': 22.13.9 @@ -5855,6 +7755,22 @@ snapshots: '@typescript-eslint/types': 8.15.0 eslint-visitor-keys: 4.2.0 + '@typescript-eslint/visitor-keys@8.30.1': + dependencies: + '@typescript-eslint/types': 8.30.1 + eslint-visitor-keys: 4.2.0 + + '@vitejs/plugin-react@4.4.1(vite@6.3.2(@types/node@22.13.9)(jiti@2.4.2)(lightningcss@1.29.2))': + dependencies: + '@babel/core': 7.26.10 + '@babel/plugin-transform-react-jsx-self': 7.25.9(@babel/core@7.26.10) + '@babel/plugin-transform-react-jsx-source': 7.25.9(@babel/core@7.26.10) + '@types/babel__core': 7.20.5 + react-refresh: 0.17.0 + vite: 6.3.2(@types/node@22.13.9)(jiti@2.4.2)(lightningcss@1.29.2) + transitivePeerDependencies: + - supports-color + '@vitest/expect@3.1.2': dependencies: '@vitest/spy': 3.1.2 @@ -5862,13 +7778,13 @@ snapshots: chai: 5.2.0 tinyrainbow: 2.0.0 - '@vitest/mocker@3.1.2(vite@6.3.2(@types/node@22.13.9))': + '@vitest/mocker@3.1.2(vite@6.3.2(@types/node@22.13.9)(jiti@2.4.2)(lightningcss@1.29.2))': dependencies: '@vitest/spy': 3.1.2 estree-walker: 3.0.3 magic-string: 0.30.17 optionalDependencies: - vite: 6.3.2(@types/node@22.13.9) + vite: 6.3.2(@types/node@22.13.9)(jiti@2.4.2)(lightningcss@1.29.2) '@vitest/pretty-format@3.1.2': dependencies: @@ -5895,7 +7811,428 @@ snapshots: loupe: 3.1.3 tinyrainbow: 2.0.0 - abitype@1.0.8(typescript@5.8.3): + '@wagmi/connectors@5.7.13(@types/react@19.1.2)(@wagmi/core@2.17.0(@tanstack/query-core@5.74.3)(@types/react@19.1.2)(react@19.0.0)(typescript@5.7.3)(use-sync-external-store@1.4.0(react@19.0.0))(viem@2.28.0(bufferutil@4.0.9)(typescript@5.7.3)(utf-8-validate@5.0.10)(zod@3.24.2)))(bufferutil@4.0.9)(react@19.0.0)(typescript@5.7.3)(utf-8-validate@5.0.10)(viem@2.28.0(bufferutil@4.0.9)(typescript@5.7.3)(utf-8-validate@5.0.10)(zod@3.24.2))(zod@3.24.2)': + dependencies: + '@coinbase/wallet-sdk': 4.3.0 + '@metamask/sdk': 0.32.0(bufferutil@4.0.9)(utf-8-validate@5.0.10) + '@safe-global/safe-apps-provider': 0.18.6(bufferutil@4.0.9)(typescript@5.7.3)(utf-8-validate@5.0.10)(zod@3.24.2) + '@safe-global/safe-apps-sdk': 9.1.0(bufferutil@4.0.9)(typescript@5.7.3)(utf-8-validate@5.0.10)(zod@3.24.2) + '@wagmi/core': 2.17.0(@tanstack/query-core@5.74.3)(@types/react@19.1.2)(react@19.0.0)(typescript@5.7.3)(use-sync-external-store@1.4.0(react@19.0.0))(viem@2.28.0(bufferutil@4.0.9)(typescript@5.7.3)(utf-8-validate@5.0.10)(zod@3.24.2)) + '@walletconnect/ethereum-provider': 2.19.2(@types/react@19.1.2)(bufferutil@4.0.9)(react@19.0.0)(typescript@5.7.3)(utf-8-validate@5.0.10)(zod@3.24.2) + cbw-sdk: '@coinbase/wallet-sdk@3.9.3' + viem: 2.28.0(bufferutil@4.0.9)(typescript@5.7.3)(utf-8-validate@5.0.10)(zod@3.24.2) + optionalDependencies: + typescript: 5.7.3 + transitivePeerDependencies: + - '@azure/app-configuration' + - '@azure/cosmos' + - '@azure/data-tables' + - '@azure/identity' + - '@azure/keyvault-secrets' + - '@azure/storage-blob' + - '@capacitor/preferences' + - '@deno/kv' + - '@netlify/blobs' + - '@planetscale/database' + - '@react-native-async-storage/async-storage' + - '@types/react' + - '@upstash/redis' + - '@vercel/blob' + - '@vercel/kv' + - aws4fetch + - bufferutil + - db0 + - encoding + - ioredis + - react + - supports-color + - uploadthing + - utf-8-validate + - zod + + '@wagmi/core@2.17.0(@tanstack/query-core@5.74.3)(@types/react@19.1.2)(react@19.0.0)(typescript@5.7.3)(use-sync-external-store@1.4.0(react@19.0.0))(viem@2.28.0(bufferutil@4.0.9)(typescript@5.7.3)(utf-8-validate@5.0.10)(zod@3.24.2))': + dependencies: + eventemitter3: 5.0.1 + mipd: 0.0.7(typescript@5.7.3) + viem: 2.28.0(bufferutil@4.0.9)(typescript@5.7.3)(utf-8-validate@5.0.10)(zod@3.24.2) + zustand: 5.0.0(@types/react@19.1.2)(react@19.0.0)(use-sync-external-store@1.4.0(react@19.0.0)) + optionalDependencies: + '@tanstack/query-core': 5.74.3 + typescript: 5.7.3 + transitivePeerDependencies: + - '@types/react' + - immer + - react + - use-sync-external-store + + '@walletconnect/core@2.19.2(bufferutil@4.0.9)(typescript@5.7.3)(utf-8-validate@5.0.10)(zod@3.24.2)': + dependencies: + '@walletconnect/heartbeat': 1.2.2 + '@walletconnect/jsonrpc-provider': 1.0.14 + '@walletconnect/jsonrpc-types': 1.0.4 + '@walletconnect/jsonrpc-utils': 1.0.8 + '@walletconnect/jsonrpc-ws-connection': 1.0.16(bufferutil@4.0.9)(utf-8-validate@5.0.10) + '@walletconnect/keyvaluestorage': 1.1.1 + '@walletconnect/logger': 2.1.2 + '@walletconnect/relay-api': 1.0.11 + '@walletconnect/relay-auth': 1.1.0 + '@walletconnect/safe-json': 1.0.2 + '@walletconnect/time': 1.0.2 + '@walletconnect/types': 2.19.2 + '@walletconnect/utils': 2.19.2(bufferutil@4.0.9)(typescript@5.7.3)(utf-8-validate@5.0.10)(zod@3.24.2) + '@walletconnect/window-getters': 1.0.1 + es-toolkit: 1.33.0 + events: 3.3.0 + uint8arrays: 3.1.0 + transitivePeerDependencies: + - '@azure/app-configuration' + - '@azure/cosmos' + - '@azure/data-tables' + - '@azure/identity' + - '@azure/keyvault-secrets' + - '@azure/storage-blob' + - '@capacitor/preferences' + - '@deno/kv' + - '@netlify/blobs' + - '@planetscale/database' + - '@react-native-async-storage/async-storage' + - '@upstash/redis' + - '@vercel/blob' + - '@vercel/kv' + - aws4fetch + - bufferutil + - db0 + - ioredis + - typescript + - uploadthing + - utf-8-validate + - zod + + '@walletconnect/environment@1.0.1': + dependencies: + tslib: 1.14.1 + + '@walletconnect/ethereum-provider@2.19.2(@types/react@19.1.2)(bufferutil@4.0.9)(react@19.0.0)(typescript@5.7.3)(utf-8-validate@5.0.10)(zod@3.24.2)': + dependencies: + '@walletconnect/jsonrpc-http-connection': 1.0.8 + '@walletconnect/jsonrpc-provider': 1.0.14 + '@walletconnect/jsonrpc-types': 1.0.4 + '@walletconnect/jsonrpc-utils': 1.0.8 + '@walletconnect/keyvaluestorage': 1.1.1 + '@walletconnect/modal': 2.7.0(@types/react@19.1.2)(react@19.0.0) + '@walletconnect/sign-client': 2.19.2(bufferutil@4.0.9)(typescript@5.7.3)(utf-8-validate@5.0.10)(zod@3.24.2) + '@walletconnect/types': 2.19.2 + '@walletconnect/universal-provider': 2.19.2(bufferutil@4.0.9)(typescript@5.7.3)(utf-8-validate@5.0.10)(zod@3.24.2) + '@walletconnect/utils': 2.19.2(bufferutil@4.0.9)(typescript@5.7.3)(utf-8-validate@5.0.10)(zod@3.24.2) + events: 3.3.0 + transitivePeerDependencies: + - '@azure/app-configuration' + - '@azure/cosmos' + - '@azure/data-tables' + - '@azure/identity' + - '@azure/keyvault-secrets' + - '@azure/storage-blob' + - '@capacitor/preferences' + - '@deno/kv' + - '@netlify/blobs' + - '@planetscale/database' + - '@react-native-async-storage/async-storage' + - '@types/react' + - '@upstash/redis' + - '@vercel/blob' + - '@vercel/kv' + - aws4fetch + - bufferutil + - db0 + - encoding + - ioredis + - react + - typescript + - uploadthing + - utf-8-validate + - zod + + '@walletconnect/events@1.0.1': + dependencies: + keyvaluestorage-interface: 1.0.0 + tslib: 1.14.1 + + '@walletconnect/heartbeat@1.2.2': + dependencies: + '@walletconnect/events': 1.0.1 + '@walletconnect/time': 1.0.2 + events: 3.3.0 + + '@walletconnect/jsonrpc-http-connection@1.0.8': + dependencies: + '@walletconnect/jsonrpc-utils': 1.0.8 + '@walletconnect/safe-json': 1.0.2 + cross-fetch: 3.2.0 + events: 3.3.0 + transitivePeerDependencies: + - encoding + + '@walletconnect/jsonrpc-provider@1.0.14': + dependencies: + '@walletconnect/jsonrpc-utils': 1.0.8 + '@walletconnect/safe-json': 1.0.2 + events: 3.3.0 + + '@walletconnect/jsonrpc-types@1.0.4': + dependencies: + events: 3.3.0 + keyvaluestorage-interface: 1.0.0 + + '@walletconnect/jsonrpc-utils@1.0.8': + dependencies: + '@walletconnect/environment': 1.0.1 + '@walletconnect/jsonrpc-types': 1.0.4 + tslib: 1.14.1 + + '@walletconnect/jsonrpc-ws-connection@1.0.16(bufferutil@4.0.9)(utf-8-validate@5.0.10)': + dependencies: + '@walletconnect/jsonrpc-utils': 1.0.8 + '@walletconnect/safe-json': 1.0.2 + events: 3.3.0 + ws: 7.5.10(bufferutil@4.0.9)(utf-8-validate@5.0.10) + transitivePeerDependencies: + - bufferutil + - utf-8-validate + + '@walletconnect/keyvaluestorage@1.1.1': + dependencies: + '@walletconnect/safe-json': 1.0.2 + idb-keyval: 6.2.1 + unstorage: 1.16.0(idb-keyval@6.2.1) + transitivePeerDependencies: + - '@azure/app-configuration' + - '@azure/cosmos' + - '@azure/data-tables' + - '@azure/identity' + - '@azure/keyvault-secrets' + - '@azure/storage-blob' + - '@capacitor/preferences' + - '@deno/kv' + - '@netlify/blobs' + - '@planetscale/database' + - '@upstash/redis' + - '@vercel/blob' + - '@vercel/kv' + - aws4fetch + - db0 + - ioredis + - uploadthing + + '@walletconnect/logger@2.1.2': + dependencies: + '@walletconnect/safe-json': 1.0.2 + pino: 7.11.0 + + '@walletconnect/modal-core@2.7.0(@types/react@19.1.2)(react@19.0.0)': + dependencies: + valtio: 1.11.2(@types/react@19.1.2)(react@19.0.0) + transitivePeerDependencies: + - '@types/react' + - react + + '@walletconnect/modal-ui@2.7.0(@types/react@19.1.2)(react@19.0.0)': + dependencies: + '@walletconnect/modal-core': 2.7.0(@types/react@19.1.2)(react@19.0.0) + lit: 2.8.0 + motion: 10.16.2 + qrcode: 1.5.3 + transitivePeerDependencies: + - '@types/react' + - react + + '@walletconnect/modal@2.7.0(@types/react@19.1.2)(react@19.0.0)': + dependencies: + '@walletconnect/modal-core': 2.7.0(@types/react@19.1.2)(react@19.0.0) + '@walletconnect/modal-ui': 2.7.0(@types/react@19.1.2)(react@19.0.0) + transitivePeerDependencies: + - '@types/react' + - react + + '@walletconnect/relay-api@1.0.11': + dependencies: + '@walletconnect/jsonrpc-types': 1.0.4 + + '@walletconnect/relay-auth@1.1.0': + dependencies: + '@noble/curves': 1.8.0 + '@noble/hashes': 1.7.0 + '@walletconnect/safe-json': 1.0.2 + '@walletconnect/time': 1.0.2 + uint8arrays: 3.1.0 + + '@walletconnect/safe-json@1.0.2': + dependencies: + tslib: 1.14.1 + + '@walletconnect/sign-client@2.19.2(bufferutil@4.0.9)(typescript@5.7.3)(utf-8-validate@5.0.10)(zod@3.24.2)': + dependencies: + '@walletconnect/core': 2.19.2(bufferutil@4.0.9)(typescript@5.7.3)(utf-8-validate@5.0.10)(zod@3.24.2) + '@walletconnect/events': 1.0.1 + '@walletconnect/heartbeat': 1.2.2 + '@walletconnect/jsonrpc-utils': 1.0.8 + '@walletconnect/logger': 2.1.2 + '@walletconnect/time': 1.0.2 + '@walletconnect/types': 2.19.2 + '@walletconnect/utils': 2.19.2(bufferutil@4.0.9)(typescript@5.7.3)(utf-8-validate@5.0.10)(zod@3.24.2) + events: 3.3.0 + transitivePeerDependencies: + - '@azure/app-configuration' + - '@azure/cosmos' + - '@azure/data-tables' + - '@azure/identity' + - '@azure/keyvault-secrets' + - '@azure/storage-blob' + - '@capacitor/preferences' + - '@deno/kv' + - '@netlify/blobs' + - '@planetscale/database' + - '@react-native-async-storage/async-storage' + - '@upstash/redis' + - '@vercel/blob' + - '@vercel/kv' + - aws4fetch + - bufferutil + - db0 + - ioredis + - typescript + - uploadthing + - utf-8-validate + - zod + + '@walletconnect/time@1.0.2': + dependencies: + tslib: 1.14.1 + + '@walletconnect/types@2.19.2': + dependencies: + '@walletconnect/events': 1.0.1 + '@walletconnect/heartbeat': 1.2.2 + '@walletconnect/jsonrpc-types': 1.0.4 + '@walletconnect/keyvaluestorage': 1.1.1 + '@walletconnect/logger': 2.1.2 + events: 3.3.0 + transitivePeerDependencies: + - '@azure/app-configuration' + - '@azure/cosmos' + - '@azure/data-tables' + - '@azure/identity' + - '@azure/keyvault-secrets' + - '@azure/storage-blob' + - '@capacitor/preferences' + - '@deno/kv' + - '@netlify/blobs' + - '@planetscale/database' + - '@react-native-async-storage/async-storage' + - '@upstash/redis' + - '@vercel/blob' + - '@vercel/kv' + - aws4fetch + - db0 + - ioredis + - uploadthing + + '@walletconnect/universal-provider@2.19.2(bufferutil@4.0.9)(typescript@5.7.3)(utf-8-validate@5.0.10)(zod@3.24.2)': + dependencies: + '@walletconnect/events': 1.0.1 + '@walletconnect/jsonrpc-http-connection': 1.0.8 + '@walletconnect/jsonrpc-provider': 1.0.14 + '@walletconnect/jsonrpc-types': 1.0.4 + '@walletconnect/jsonrpc-utils': 1.0.8 + '@walletconnect/keyvaluestorage': 1.1.1 + '@walletconnect/logger': 2.1.2 + '@walletconnect/sign-client': 2.19.2(bufferutil@4.0.9)(typescript@5.7.3)(utf-8-validate@5.0.10)(zod@3.24.2) + '@walletconnect/types': 2.19.2 + '@walletconnect/utils': 2.19.2(bufferutil@4.0.9)(typescript@5.7.3)(utf-8-validate@5.0.10)(zod@3.24.2) + es-toolkit: 1.33.0 + events: 3.3.0 + transitivePeerDependencies: + - '@azure/app-configuration' + - '@azure/cosmos' + - '@azure/data-tables' + - '@azure/identity' + - '@azure/keyvault-secrets' + - '@azure/storage-blob' + - '@capacitor/preferences' + - '@deno/kv' + - '@netlify/blobs' + - '@planetscale/database' + - '@react-native-async-storage/async-storage' + - '@upstash/redis' + - '@vercel/blob' + - '@vercel/kv' + - aws4fetch + - bufferutil + - db0 + - encoding + - ioredis + - typescript + - uploadthing + - utf-8-validate + - zod + + '@walletconnect/utils@2.19.2(bufferutil@4.0.9)(typescript@5.7.3)(utf-8-validate@5.0.10)(zod@3.24.2)': + dependencies: + '@noble/ciphers': 1.2.1 + '@noble/curves': 1.8.1 + '@noble/hashes': 1.7.1 + '@walletconnect/jsonrpc-utils': 1.0.8 + '@walletconnect/keyvaluestorage': 1.1.1 + '@walletconnect/relay-api': 1.0.11 + '@walletconnect/relay-auth': 1.1.0 + '@walletconnect/safe-json': 1.0.2 + '@walletconnect/time': 1.0.2 + '@walletconnect/types': 2.19.2 + '@walletconnect/window-getters': 1.0.1 + '@walletconnect/window-metadata': 1.0.1 + bs58: 6.0.0 + detect-browser: 5.3.0 + query-string: 7.1.3 + uint8arrays: 3.1.0 + viem: 2.23.2(bufferutil@4.0.9)(typescript@5.7.3)(utf-8-validate@5.0.10)(zod@3.24.2) + transitivePeerDependencies: + - '@azure/app-configuration' + - '@azure/cosmos' + - '@azure/data-tables' + - '@azure/identity' + - '@azure/keyvault-secrets' + - '@azure/storage-blob' + - '@capacitor/preferences' + - '@deno/kv' + - '@netlify/blobs' + - '@planetscale/database' + - '@react-native-async-storage/async-storage' + - '@upstash/redis' + - '@vercel/blob' + - '@vercel/kv' + - aws4fetch + - bufferutil + - db0 + - ioredis + - typescript + - uploadthing + - utf-8-validate + - zod + + '@walletconnect/window-getters@1.0.1': + dependencies: + tslib: 1.14.1 + + '@walletconnect/window-metadata@1.0.1': + dependencies: + '@walletconnect/window-getters': 1.0.1 + tslib: 1.14.1 + + abitype@1.0.8(typescript@5.7.3)(zod@3.24.2): + optionalDependencies: + typescript: 5.7.3 + zod: 3.24.2 + + abitype@1.0.8(typescript@5.8.3)(zod@3.24.2): optionalDependencies: typescript: 5.8.3 zod: 3.24.2 @@ -6031,6 +8368,12 @@ snapshots: dependencies: tslib: 2.8.1 + async-mutex@0.2.6: + dependencies: + tslib: 2.8.1 + + atomic-sleep@1.0.0: {} + available-typed-arrays@1.0.7: dependencies: possible-typed-array-names: 1.0.0 @@ -6072,6 +8415,17 @@ snapshots: dependencies: fill-range: 7.1.1 + browserslist@4.24.4: + dependencies: + caniuse-lite: 1.0.30001701 + electron-to-chromium: 1.5.144 + node-releases: 2.0.19 + update-browserslist-db: 1.1.3(browserslist@4.24.4) + + bs58@6.0.0: + dependencies: + base-x: 5.0.1 + buffer@5.7.1: dependencies: base64-js: 1.5.1 @@ -6092,6 +8446,11 @@ snapshots: cac@6.7.14: {} + call-bind-apply-helpers@1.0.2: + dependencies: + es-errors: 1.3.0 + function-bind: 1.1.2 + call-bind@1.0.7: dependencies: es-define-property: 1.0.0 @@ -6112,6 +8471,8 @@ snapshots: no-case: 2.3.2 upper-case: 1.1.3 + camelcase@5.3.1: {} + caniuse-lite@1.0.30001701: {} chai@5.2.0: @@ -6181,6 +8542,10 @@ snapshots: ci-info@3.9.0: {} + class-variance-authority@0.7.1: + dependencies: + clsx: 2.1.1 + clean-stack@2.2.0: {} cli-cursor@3.1.0: @@ -6207,6 +8572,10 @@ snapshots: clone@1.0.4: {} + clsx@1.2.1: {} + + clsx@2.1.1: {} + color-convert@1.9.3: dependencies: color-name: 1.1.3 @@ -6252,8 +8621,22 @@ snapshots: snake-case: 2.1.0 upper-case: 1.1.3 + convert-source-map@2.0.0: {} + + cookie-es@1.2.2: {} + + cookie@1.0.2: {} + + copy-to-clipboard@3.3.3: + dependencies: + toggle-selection: 1.0.6 + core-js-pure@3.39.0: {} + core-util-is@1.0.3: {} + + crc-32@1.2.2: {} + create-require@1.1.1: {} cross-fetch@3.2.0: @@ -6314,6 +8697,10 @@ snapshots: dependencies: ms: 2.1.3 + decamelize@1.2.0: {} + + decode-uri-component@0.2.2: {} + deep-eql@5.0.2: {} deep-extend@0.6.0: {} @@ -6363,6 +8750,8 @@ snapshots: detect-libc@2.0.3: {} + detect-node-es@1.1.0: {} + diff@4.0.2: {} dijkstrajs@1.0.3: {} @@ -6398,6 +8787,15 @@ snapshots: eastasianwidth@0.2.0: {} + eciesjs@0.4.14: + dependencies: + '@ecies/ciphers': 0.2.3(@noble/ciphers@1.2.1) + '@noble/ciphers': 1.2.1 + '@noble/curves': 1.8.1 + '@noble/hashes': 1.7.1 + + electron-to-chromium@1.5.144: {} + emoji-regex@8.0.0: {} emoji-regex@9.2.2: {} @@ -6741,7 +9139,7 @@ snapshots: estree-walker@3.0.3: dependencies: - '@types/estree': 1.0.6 + '@types/estree': 1.0.7 esutils@2.0.3: {} @@ -6950,6 +9348,8 @@ snapshots: functions-have-names@1.2.3: {} + gensync@1.0.0-beta.2: {} + get-caller-file@2.0.5: {} get-intrinsic@1.2.4: @@ -6960,6 +9360,26 @@ snapshots: has-symbols: 1.0.3 hasown: 2.0.2 + get-intrinsic@1.3.0: + dependencies: + call-bind-apply-helpers: 1.0.2 + es-define-property: 1.0.1 + es-errors: 1.3.0 + es-object-atoms: 1.1.1 + function-bind: 1.1.2 + get-proto: 1.0.1 + gopd: 1.2.0 + has-symbols: 1.1.0 + hasown: 2.0.2 + math-intrinsics: 1.1.0 + + get-nonce@1.0.1: {} + + get-proto@1.0.1: + dependencies: + dunder-proto: 1.0.1 + es-object-atoms: 1.1.1 + get-stream@6.0.1: {} get-symbol-description@1.0.2: @@ -7003,6 +9423,8 @@ snapshots: once: 1.4.0 path-is-absolute: 1.0.1 + globals@11.12.0: {} + globals@14.0.0: {} globals@15.12.0: {} @@ -7049,7 +9471,7 @@ snapshots: graphemer@1.4.0: {} - h3@1.15.1: + h3@1.15.3: dependencies: cookie-es: 1.2.2 crossws: 0.3.4 @@ -7105,6 +9527,8 @@ snapshots: no-case: 2.3.2 upper-case: 1.1.3 + hey-listen@1.0.8: {} + http-proxy-agent@7.0.2: dependencies: agent-base: 7.1.1 @@ -7340,6 +9764,14 @@ snapshots: isexe@2.0.0: {} + isows@1.0.6(ws@8.18.0(bufferutil@4.0.9)(utf-8-validate@5.0.10)): + dependencies: + ws: 8.18.0(bufferutil@4.0.9)(utf-8-validate@5.0.10) + + isows@1.0.6(ws@8.18.1(bufferutil@4.0.9)(utf-8-validate@5.0.10)): + dependencies: + ws: 8.18.1(bufferutil@4.0.9)(utf-8-validate@5.0.10) + iterator.prototype@1.1.3: dependencies: define-properties: 1.2.1 @@ -7352,6 +9784,15 @@ snapshots: dependencies: '@isaacs/cliui': 8.0.2 + jiti@2.4.2: {} + + jotai@2.12.3(@types/react@19.1.2)(react@19.0.0): + optionalDependencies: + '@types/react': 19.1.2 + react: 19.0.0 + + js-base64@3.7.7: {} + js-tokens@4.0.0: {} js-yaml@3.14.1: @@ -7365,12 +9806,23 @@ snapshots: jsbn@1.1.0: {} + jsesc@3.1.0: {} + json-buffer@3.0.1: {} + json-rpc-engine@6.1.0: + dependencies: + '@metamask/safe-event-emitter': 2.0.0 + eth-rpc-errors: 4.0.3 + + json-rpc-random-id@1.0.1: {} + json-schema-traverse@0.4.1: {} json-stable-stringify-without-jsonify@1.0.1: {} + json5@2.2.3: {} + jsonfile@4.0.0: optionalDependencies: graceful-fs: 4.2.11 @@ -7400,6 +9852,8 @@ snapshots: dependencies: json-buffer: 3.0.1 + keyvaluestorage-interface@1.0.0: {} + lefthook-darwin-arm64@1.11.10: optional: true @@ -7448,6 +9902,67 @@ snapshots: prelude-ls: 1.2.1 type-check: 0.4.0 + lightningcss-darwin-arm64@1.29.2: + optional: true + + lightningcss-darwin-x64@1.29.2: + optional: true + + lightningcss-freebsd-x64@1.29.2: + optional: true + + lightningcss-linux-arm-gnueabihf@1.29.2: + optional: true + + lightningcss-linux-arm64-gnu@1.29.2: + optional: true + + lightningcss-linux-arm64-musl@1.29.2: + optional: true + + lightningcss-linux-x64-gnu@1.29.2: + optional: true + + lightningcss-linux-x64-musl@1.29.2: + optional: true + + lightningcss-win32-arm64-msvc@1.29.2: + optional: true + + lightningcss-win32-x64-msvc@1.29.2: + optional: true + + lightningcss@1.29.2: + dependencies: + detect-libc: 2.0.3 + optionalDependencies: + lightningcss-darwin-arm64: 1.29.2 + lightningcss-darwin-x64: 1.29.2 + lightningcss-freebsd-x64: 1.29.2 + lightningcss-linux-arm-gnueabihf: 1.29.2 + lightningcss-linux-arm64-gnu: 1.29.2 + lightningcss-linux-arm64-musl: 1.29.2 + lightningcss-linux-x64-gnu: 1.29.2 + lightningcss-linux-x64-musl: 1.29.2 + lightningcss-win32-arm64-msvc: 1.29.2 + lightningcss-win32-x64-msvc: 1.29.2 + + lit-element@3.3.3: + dependencies: + '@lit-labs/ssr-dom-shim': 1.3.0 + '@lit/reactive-element': 1.6.3 + lit-html: 2.8.0 + + lit-html@2.8.0: + dependencies: + '@types/trusted-types': 2.0.7 + + lit@2.8.0: + dependencies: + '@lit/reactive-element': 1.6.3 + lit-element: 3.3.3 + lit-html: 2.8.0 + locate-path@5.0.0: dependencies: p-locate: 4.1.0 @@ -7489,14 +10004,24 @@ snapshots: lru-cache@11.1.0: {} + lru-cache@5.1.1: + dependencies: + yallist: 3.1.1 + lru-cache@7.18.3: {} + lucide-react@0.493.0(react@19.0.0): + dependencies: + react: 19.0.0 + magic-string@0.30.17: dependencies: '@jridgewell/sourcemap-codec': 1.5.0 make-error@1.3.6: {} + math-intrinsics@1.1.0: {} + merge-stream@2.0.0: {} merge2@1.4.1: {} @@ -7604,6 +10129,18 @@ snapshots: dependencies: lower-case: 1.1.4 + node-addon-api@2.0.2: {} + + node-fetch-native@1.6.6: {} + + node-fetch@2.7.0: + dependencies: + whatwg-url: 5.0.0 + + node-gyp-build@4.8.4: {} + + node-mock-http@1.0.0: {} + node-plop@0.26.3: dependencies: '@babel/runtime-corejs3': 7.26.0 @@ -7618,6 +10155,8 @@ snapshots: mkdirp: 0.5.6 resolve: 1.22.8 + node-releases@2.0.19: {} + nodemon@3.1.9: dependencies: chokidar: 3.6.0 @@ -7758,8 +10297,8 @@ snapshots: ox@0.6.9(typescript@5.7.3)(zod@3.24.2): dependencies: '@adraffy/ens-normalize': 1.11.0 - '@noble/curves': 1.8.1 - '@noble/hashes': 1.7.1 + '@noble/curves': 1.8.2 + '@noble/hashes': 1.7.2 '@scure/bip32': 1.6.2 '@scure/bip39': 1.5.4 abitype: 1.0.8(typescript@5.7.3)(zod@3.24.2) @@ -7772,8 +10311,8 @@ snapshots: ox@0.6.9(typescript@5.8.3)(zod@3.24.2): dependencies: '@adraffy/ens-normalize': 1.11.0 - '@noble/curves': 1.8.1 - '@noble/hashes': 1.7.1 + '@noble/curves': 1.8.2 + '@noble/hashes': 1.7.2 '@scure/bip32': 1.6.2 '@scure/bip39': 1.5.4 abitype: 1.0.8(typescript@5.8.3)(zod@3.24.2) @@ -7889,8 +10428,37 @@ snapshots: picomatch@4.0.2: {} + pify@3.0.0: {} + pify@4.0.1: {} + pify@5.0.0: {} + + pino-abstract-transport@0.5.0: + dependencies: + duplexify: 4.1.3 + split2: 4.2.0 + + pino-std-serializers@4.0.0: {} + + pino@7.11.0: + dependencies: + atomic-sleep: 1.0.0 + fast-redact: 3.5.0 + on-exit-leak-free: 0.2.0 + pino-abstract-transport: 0.5.0 + pino-std-serializers: 4.0.0 + process-warning: 1.0.0 + quick-format-unescaped: 4.0.4 + real-require: 0.1.0 + safe-stable-stringify: 2.5.0 + sonic-boom: 2.8.0 + thread-stream: 0.15.2 + + pngjs@5.0.0: {} + + pony-cause@2.1.11: {} + possible-typed-array-names@1.0.0: {} postcss@8.4.31: @@ -7905,12 +10473,18 @@ snapshots: picocolors: 1.1.1 source-map-js: 1.2.1 + preact@10.26.5: {} + prelude-ls@1.2.1: {} prettier@2.8.8: {} prettier@3.5.3: {} + process-nextick-args@2.0.1: {} + + process-warning@1.0.0: {} + prop-types@15.8.1: dependencies: loose-envify: 1.4.0 @@ -7943,6 +10517,24 @@ snapshots: punycode@2.3.1: {} + qrcode.react@4.2.0(react@19.0.0): + dependencies: + react: 19.0.0 + + qrcode@1.5.3: + dependencies: + dijkstrajs: 1.0.3 + encode-utf8: 1.0.3 + pngjs: 5.0.0 + yargs: 15.4.1 + + query-string@7.1.3: + dependencies: + decode-uri-component: 0.2.2 + filter-obj: 1.1.0 + split-on-first: 1.1.0 + strict-uri-encode: 2.0.0 + queue-microtask@1.2.3: {} quick-format-unescaped@4.0.4: {} @@ -7967,6 +10559,44 @@ snapshots: react-is@16.13.1: {} + react-refresh@0.17.0: {} + + react-remove-scroll-bar@2.3.8(@types/react@19.1.2)(react@19.0.0): + dependencies: + react: 19.0.0 + react-style-singleton: 2.2.3(@types/react@19.1.2)(react@19.0.0) + tslib: 2.8.1 + optionalDependencies: + '@types/react': 19.1.2 + + react-remove-scroll@2.6.3(@types/react@19.1.2)(react@19.0.0): + dependencies: + react: 19.0.0 + react-remove-scroll-bar: 2.3.8(@types/react@19.1.2)(react@19.0.0) + react-style-singleton: 2.2.3(@types/react@19.1.2)(react@19.0.0) + tslib: 2.8.1 + use-callback-ref: 1.3.3(@types/react@19.1.2)(react@19.0.0) + use-sidecar: 1.1.3(@types/react@19.1.2)(react@19.0.0) + optionalDependencies: + '@types/react': 19.1.2 + + react-router@7.5.3(react-dom@19.0.0(react@19.0.0))(react@19.0.0): + dependencies: + cookie: 1.0.2 + react: 19.0.0 + set-cookie-parser: 2.7.1 + turbo-stream: 2.4.0 + optionalDependencies: + react-dom: 19.0.0(react@19.0.0) + + react-style-singleton@2.2.3(@types/react@19.1.2)(react@19.0.0): + dependencies: + get-nonce: 1.0.1 + react: 19.0.0 + tslib: 2.8.1 + optionalDependencies: + '@types/react': 19.1.2 + react@19.0.0: {} read-yaml-file@1.1.0: @@ -8030,6 +10660,8 @@ snapshots: require-directory@2.1.1: {} + require-main-filename@2.0.0: {} + resolve-from@4.0.0: {} resolve-from@5.0.0: {} @@ -8286,6 +10918,8 @@ snapshots: streamsearch@1.1.0: {} + strict-uri-encode@2.0.0: {} + string-width@4.2.3: dependencies: emoji-regex: 8.0.0 @@ -8395,6 +11029,10 @@ snapshots: term-size@2.2.1: {} + thread-stream@0.15.2: + dependencies: + real-require: 0.1.0 + through@2.3.8: {} tinybench@2.9.0: {} @@ -8444,6 +11082,10 @@ snapshots: dependencies: typescript: 5.7.3 + ts-api-utils@2.1.0(typescript@5.7.3): + dependencies: + typescript: 5.7.3 + ts-node@10.9.2(@types/node@20.17.6)(typescript@5.5.4): dependencies: '@cspotcode/source-map-support': 0.8.1 @@ -8591,6 +11233,25 @@ snapshots: universalify@2.0.1: {} + unstorage@1.16.0(idb-keyval@6.2.1): + dependencies: + anymatch: 3.1.3 + chokidar: 4.0.3 + destr: 2.0.5 + h3: 1.15.3 + lru-cache: 10.4.3 + node-fetch-native: 1.6.6 + ofetch: 1.4.1 + ufo: 1.6.1 + optionalDependencies: + idb-keyval: 6.2.1 + + update-browserslist-db@1.1.3(browserslist@4.24.4): + dependencies: + browserslist: 4.24.4 + escalade: 3.2.0 + picocolors: 1.1.1 + update-check@1.5.4: dependencies: registry-auth-token: 3.3.2 @@ -8653,13 +11314,72 @@ snapshots: validate-npm-package-name@5.0.1: {} - vite-node@3.1.2(@types/node@22.13.9): + valtio@1.11.2(@types/react@19.1.2)(react@19.0.0): + dependencies: + proxy-compare: 2.5.1 + use-sync-external-store: 1.2.0(react@19.0.0) + optionalDependencies: + '@types/react': 19.1.2 + react: 19.0.0 + + viem@2.23.2(bufferutil@4.0.9)(typescript@5.7.3)(utf-8-validate@5.0.10)(zod@3.24.2): + dependencies: + '@noble/curves': 1.8.1 + '@noble/hashes': 1.7.1 + '@scure/bip32': 1.6.2 + '@scure/bip39': 1.5.4 + abitype: 1.0.8(typescript@5.7.3)(zod@3.24.2) + isows: 1.0.6(ws@8.18.0(bufferutil@4.0.9)(utf-8-validate@5.0.10)) + ox: 0.6.7(typescript@5.7.3)(zod@3.24.2) + ws: 8.18.0(bufferutil@4.0.9)(utf-8-validate@5.0.10) + optionalDependencies: + typescript: 5.7.3 + transitivePeerDependencies: + - bufferutil + - utf-8-validate + - zod + + viem@2.28.0(bufferutil@4.0.9)(typescript@5.7.3)(utf-8-validate@5.0.10)(zod@3.24.2): + dependencies: + '@noble/curves': 1.8.2 + '@noble/hashes': 1.7.2 + '@scure/bip32': 1.6.2 + '@scure/bip39': 1.5.4 + abitype: 1.0.8(typescript@5.7.3)(zod@3.24.2) + isows: 1.0.6(ws@8.18.1(bufferutil@4.0.9)(utf-8-validate@5.0.10)) + ox: 0.6.9(typescript@5.7.3)(zod@3.24.2) + ws: 8.18.1(bufferutil@4.0.9)(utf-8-validate@5.0.10) + optionalDependencies: + typescript: 5.7.3 + transitivePeerDependencies: + - bufferutil + - utf-8-validate + - zod + + viem@2.28.0(bufferutil@4.0.9)(typescript@5.8.3)(utf-8-validate@5.0.10)(zod@3.24.2): + dependencies: + '@noble/curves': 1.8.2 + '@noble/hashes': 1.7.2 + '@scure/bip32': 1.6.2 + '@scure/bip39': 1.5.4 + abitype: 1.0.8(typescript@5.8.3)(zod@3.24.2) + isows: 1.0.6(ws@8.18.1(bufferutil@4.0.9)(utf-8-validate@5.0.10)) + ox: 0.6.9(typescript@5.8.3)(zod@3.24.2) + ws: 8.18.1(bufferutil@4.0.9)(utf-8-validate@5.0.10) + optionalDependencies: + typescript: 5.8.3 + transitivePeerDependencies: + - bufferutil + - utf-8-validate + - zod + + vite-node@3.1.2(@types/node@22.13.9)(jiti@2.4.2)(lightningcss@1.29.2): dependencies: cac: 6.7.14 debug: 4.4.0 es-module-lexer: 1.6.0 pathe: 2.0.3 - vite: 6.3.2(@types/node@22.13.9) + vite: 6.3.2(@types/node@22.13.9)(jiti@2.4.2)(lightningcss@1.29.2) transitivePeerDependencies: - '@types/node' - jiti @@ -8674,9 +11394,9 @@ snapshots: - tsx - yaml - vite@6.3.2(@types/node@22.13.9): + vite@6.3.2(@types/node@22.13.9)(jiti@2.4.2)(lightningcss@1.29.2): dependencies: - esbuild: 0.25.0 + esbuild: 0.25.2 fdir: 6.4.4(picomatch@4.0.2) picomatch: 4.0.2 postcss: 8.5.3 @@ -8685,11 +11405,13 @@ snapshots: optionalDependencies: '@types/node': 22.13.9 fsevents: 2.3.3 + jiti: 2.4.2 + lightningcss: 1.29.2 - vitest@3.1.2(@types/node@22.13.9)(happy-dom@13.10.1): + vitest@3.1.2(@types/debug@4.1.12)(@types/node@22.13.9)(happy-dom@13.10.1)(jiti@2.4.2)(lightningcss@1.29.2): dependencies: '@vitest/expect': 3.1.2 - '@vitest/mocker': 3.1.2(vite@6.3.2(@types/node@22.13.9)) + '@vitest/mocker': 3.1.2(vite@6.3.2(@types/node@22.13.9)(jiti@2.4.2)(lightningcss@1.29.2)) '@vitest/pretty-format': 3.1.2 '@vitest/runner': 3.1.2 '@vitest/snapshot': 3.1.2 @@ -8706,10 +11428,11 @@ snapshots: tinyglobby: 0.2.13 tinypool: 1.0.2 tinyrainbow: 2.0.0 - vite: 6.3.2(@types/node@22.13.9) - vite-node: 3.1.2(@types/node@22.13.9) + vite: 6.3.2(@types/node@22.13.9)(jiti@2.4.2)(lightningcss@1.29.2) + vite-node: 3.1.2(@types/node@22.13.9)(jiti@2.4.2)(lightningcss@1.29.2) why-is-node-running: 2.3.0 optionalDependencies: + '@types/debug': 4.1.12 '@types/node': 22.13.9 happy-dom: 13.10.1 transitivePeerDependencies: @@ -8726,14 +11449,61 @@ snapshots: - tsx - yaml + wagmi@2.15.0(@tanstack/query-core@5.74.3)(@tanstack/react-query@5.74.3(react@19.0.0))(@types/react@19.1.2)(bufferutil@4.0.9)(react@19.0.0)(typescript@5.7.3)(utf-8-validate@5.0.10)(viem@2.28.0(bufferutil@4.0.9)(typescript@5.7.3)(utf-8-validate@5.0.10)(zod@3.24.2))(zod@3.24.2): + dependencies: + '@tanstack/react-query': 5.74.3(react@19.0.0) + '@wagmi/connectors': 5.7.13(@types/react@19.1.2)(@wagmi/core@2.17.0(@tanstack/query-core@5.74.3)(@types/react@19.1.2)(react@19.0.0)(typescript@5.7.3)(use-sync-external-store@1.4.0(react@19.0.0))(viem@2.28.0(bufferutil@4.0.9)(typescript@5.7.3)(utf-8-validate@5.0.10)(zod@3.24.2)))(bufferutil@4.0.9)(react@19.0.0)(typescript@5.7.3)(utf-8-validate@5.0.10)(viem@2.28.0(bufferutil@4.0.9)(typescript@5.7.3)(utf-8-validate@5.0.10)(zod@3.24.2))(zod@3.24.2) + '@wagmi/core': 2.17.0(@tanstack/query-core@5.74.3)(@types/react@19.1.2)(react@19.0.0)(typescript@5.7.3)(use-sync-external-store@1.4.0(react@19.0.0))(viem@2.28.0(bufferutil@4.0.9)(typescript@5.7.3)(utf-8-validate@5.0.10)(zod@3.24.2)) + react: 19.0.0 + use-sync-external-store: 1.4.0(react@19.0.0) + viem: 2.28.0(bufferutil@4.0.9)(typescript@5.7.3)(utf-8-validate@5.0.10)(zod@3.24.2) + optionalDependencies: + typescript: 5.7.3 + transitivePeerDependencies: + - '@azure/app-configuration' + - '@azure/cosmos' + - '@azure/data-tables' + - '@azure/identity' + - '@azure/keyvault-secrets' + - '@azure/storage-blob' + - '@capacitor/preferences' + - '@deno/kv' + - '@netlify/blobs' + - '@planetscale/database' + - '@react-native-async-storage/async-storage' + - '@tanstack/query-core' + - '@types/react' + - '@upstash/redis' + - '@vercel/blob' + - '@vercel/kv' + - aws4fetch + - bufferutil + - db0 + - encoding + - immer + - ioredis + - supports-color + - uploadthing + - utf-8-validate + - zod + wcwidth@1.0.1: dependencies: defaults: 1.0.4 + webextension-polyfill@0.10.0: {} + + webidl-conversions@3.0.1: {} + webidl-conversions@7.0.0: {} whatwg-mimetype@3.0.0: {} + whatwg-url@5.0.0: + dependencies: + tr46: 0.0.3 + webidl-conversions: 3.0.1 + which-boxed-primitive@1.0.2: dependencies: is-bigint: 1.0.4 @@ -8807,8 +11577,41 @@ snapshots: wrappy@1.0.2: {} + ws@7.5.10(bufferutil@4.0.9)(utf-8-validate@5.0.10): + optionalDependencies: + bufferutil: 4.0.9 + utf-8-validate: 5.0.10 + + ws@8.17.1(bufferutil@4.0.9)(utf-8-validate@5.0.10): + optionalDependencies: + bufferutil: 4.0.9 + utf-8-validate: 5.0.10 + + ws@8.18.0(bufferutil@4.0.9)(utf-8-validate@5.0.10): + optionalDependencies: + bufferutil: 4.0.9 + utf-8-validate: 5.0.10 + + ws@8.18.1(bufferutil@4.0.9)(utf-8-validate@5.0.10): + optionalDependencies: + bufferutil: 4.0.9 + utf-8-validate: 5.0.10 + + xmlhttprequest-ssl@2.1.2: {} + + xtend@4.0.2: {} + + y18n@4.0.3: {} + y18n@5.0.8: {} + yallist@3.1.1: {} + + yargs-parser@18.1.3: + dependencies: + camelcase: 5.3.1 + decamelize: 1.2.0 + yargs-parser@21.1.1: {} yargs@15.4.1: From 5828ccc335f22289ce64a3194828b0b93e996169 Mon Sep 17 00:00:00 2001 From: Shun Kakinoki Date: Tue, 29 Apr 2025 14:25:41 +0900 Subject: [PATCH 412/439] Enhance AnyPay test suite by adding a mock provider for improved test isolation. Update import statements to include 'vi' for mocking capabilities, ensuring better control over provider behavior during tests. --- packages/wallet/core/test/anypay.test.ts | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/packages/wallet/core/test/anypay.test.ts b/packages/wallet/core/test/anypay.test.ts index a5747746e..d229f69d2 100644 --- a/packages/wallet/core/test/anypay.test.ts +++ b/packages/wallet/core/test/anypay.test.ts @@ -1,7 +1,7 @@ import { Address, Bytes, Provider, Hex, RpcTransport, Secp256k1, AbiFunction } from 'ox' import { Context, Payload } from '@0xsequence/wallet-primitives' import { LocalRelayer } from '../src/relayer/local' -import { describe, it, expect } from 'vitest' +import { describe, it, expect, vi } from 'vitest' import { NativeBalancePrecondition, Erc20BalancePrecondition, @@ -27,7 +27,17 @@ describe('AnyPay Preconditions', () => { if (CAN_RUN_LIVE) { provider = Provider.from(RpcTransport.fromHttp(RPC_URL!!)) chainId = BigInt(await provider.request({ method: 'eth_chainId' })) + } else { + provider = { + request: vi.fn(), + on: vi.fn(), + removeListener: vi.fn(), + call: vi.fn(), + sendTransaction: vi.fn(), + getBalance: vi.fn(), + } as unknown as Provider.Provider } + return { provider: provider!, chainId } } From ce79069bac5fd82a5bf7c08523b82865d74ce699 Mon Sep 17 00:00:00 2001 From: Shun Kakinoki Date: Tue, 29 Apr 2025 14:31:59 +0900 Subject: [PATCH 413/439] Add export for Rpc module in wallet core relayer index for enhanced modularity. --- packages/wallet/core/src/relayer/index.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/wallet/core/src/relayer/index.ts b/packages/wallet/core/src/relayer/index.ts index 237ce9103..a6edf0700 100644 --- a/packages/wallet/core/src/relayer/index.ts +++ b/packages/wallet/core/src/relayer/index.ts @@ -1,3 +1,4 @@ export * from './relayer.js' export * as Local from './local.js' export * as Pk from './pk-relayer.js' +export * as Rpc from './rpc/index.js' From 97ab300a4833f490c42fd6aec8d988a23b4d5a70 Mon Sep 17 00:00:00 2001 From: Shun Kakinoki Date: Wed, 30 Apr 2025 16:05:53 +0900 Subject: [PATCH 414/439] Refactor transaction monitoring in HomeIndexRoute by replacing useMetaTxnMonitor with useMetaTxnsMonitor for improved handling of multiple meta transactions. Remove deprecated monitoring logic and enhance status updates with detailed transaction information, including gas used and error handling. --- .../src/hooks/useMetaTxnMonitor.ts | 67 ----- .../src/hooks/useMetaTxnsMonitor.ts | 109 ++++++++ .../src/routes/home/home-index-route.tsx | 240 ++++++++++-------- packages/wallet/core/src/relayer/relayer.ts | 14 +- 4 files changed, 258 insertions(+), 172 deletions(-) delete mode 100644 extras/demo-anypay/src/hooks/useMetaTxnMonitor.ts create mode 100644 extras/demo-anypay/src/hooks/useMetaTxnsMonitor.ts diff --git a/extras/demo-anypay/src/hooks/useMetaTxnMonitor.ts b/extras/demo-anypay/src/hooks/useMetaTxnMonitor.ts deleted file mode 100644 index 2c4fc171c..000000000 --- a/extras/demo-anypay/src/hooks/useMetaTxnMonitor.ts +++ /dev/null @@ -1,67 +0,0 @@ -import { useState, useEffect } from 'react' -import { Relayer } from '@0xsequence/wallet-core' -import { Hex } from 'viem' - -type OperationStatus = { - status: 'pending' | 'success' | 'failed' - txHash?: string - error?: string -} - -export const useMetaTxnMonitor = ( - opHash: Hex | undefined, - chainId: string, - relayer: Relayer.Rpc.RpcRelayer | undefined, -) => { - const [status, setStatus] = useState({ status: 'pending' }) - - useEffect(() => { - // Reset status when opHash or relayer changes - if (!opHash || !relayer) { - setStatus({ status: 'pending' }) - return - } - - let isSubscribed = true - let timeoutId: NodeJS.Timeout | undefined - - const monitorStatus = async () => { - try { - const currentStatus = await relayer.status(opHash, BigInt(chainId)) - - if (!isSubscribed) return - - const newStatus: OperationStatus = { - status: - currentStatus.status === 'confirmed' ? 'success' : currentStatus.status === 'failed' ? 'failed' : 'pending', - txHash: currentStatus.status === 'confirmed' ? currentStatus.transactionHash : undefined, - error: currentStatus.status === 'failed' ? currentStatus.reason : undefined, - } - - setStatus(newStatus) - - // Continue monitoring if still pending - if (currentStatus.status === 'pending' && isSubscribed) { - timeoutId = setTimeout(monitorStatus, 5000) - } - } catch (error: any) { - if (!isSubscribed) return - setStatus({ - status: 'failed', - error: error.message, - }) - } - } - - monitorStatus() - - return () => { - isSubscribed = false - if (timeoutId) { - clearTimeout(timeoutId) - } - } - }, [opHash, chainId, relayer]) - - return status -} diff --git a/extras/demo-anypay/src/hooks/useMetaTxnsMonitor.ts b/extras/demo-anypay/src/hooks/useMetaTxnsMonitor.ts new file mode 100644 index 000000000..73f9af667 --- /dev/null +++ b/extras/demo-anypay/src/hooks/useMetaTxnsMonitor.ts @@ -0,0 +1,109 @@ +import { useState, useEffect, useRef } from 'react' +import { Relayer } from '@0xsequence/wallet-core' +import { Hex } from 'viem' + +export type MetaTxn = { + id: string + chainId: string + contract?: string | undefined + input?: string | undefined + walletAddress?: string | undefined +} + +type MetaTxnStatus = { + [key: string]: Relayer.OperationStatus +} + +type LastChecked = { + [key: string]: number +} + +const POLL_INTERVAL = 10_000 // 10 seconds + +export const useMetaTxnsMonitor = ( + metaTxns: MetaTxn[] | undefined, + operationHashes: { [key: string]: Hex }, + getRelayer: (chainId: number) => Relayer.Rpc.RpcRelayer, +) => { + const [statuses, setStatuses] = useState({}) + const lastCheckedRef = useRef({}) + const timeoutsRef = useRef<{ [key: string]: NodeJS.Timeout }>({}) + + useEffect(() => { + if (!metaTxns || metaTxns.length === 0) { + setStatuses({}) + return + } + + let isSubscribed = true + + const monitorStatus = async (metaTxn: MetaTxn) => { + const operationKey = `${metaTxn.chainId}-${metaTxn.id}` + const opHash = operationHashes[operationKey] + const relayer = getRelayer(parseInt(metaTxn.chainId)) + + if (!opHash || !relayer) { + if (isSubscribed) { + setStatuses((prev) => ({ + ...prev, + [operationKey]: { status: 'pending' }, + })) + } + return + } + + const now = Date.now() + const lastChecked = lastCheckedRef.current[operationKey] || 0 + const timeSinceLastCheck = now - lastChecked + + // Skip if we checked too recently + if (timeSinceLastCheck < POLL_INTERVAL) { + const timeToNextCheck = POLL_INTERVAL - timeSinceLastCheck + timeoutsRef.current[operationKey] = setTimeout(() => monitorStatus(metaTxn), timeToNextCheck) + return + } + + try { + lastCheckedRef.current[operationKey] = now + const status = await relayer.status(opHash, BigInt(metaTxn.chainId)) + + if (!isSubscribed) return + + setStatuses((prev) => ({ + ...prev, + [operationKey]: status, + })) + + // Continue monitoring if still pending + if (status.status === 'pending' && isSubscribed) { + timeoutsRef.current[operationKey] = setTimeout(() => monitorStatus(metaTxn), POLL_INTERVAL) + } + } catch (error: any) { + if (!isSubscribed) return + setStatuses((prev) => ({ + ...prev, + [operationKey]: { + status: 'failed', + reason: error.message, + }, + })) + } + } + + // Start monitoring all meta transactions + metaTxns.forEach((metaTxn) => { + monitorStatus(metaTxn) + }) + + return () => { + isSubscribed = false + // Clear all timeouts + Object.values(timeoutsRef.current).forEach((timeout) => { + clearTimeout(timeout) + }) + timeoutsRef.current = {} + } + }, [metaTxns, operationHashes, getRelayer]) + + return statuses +} diff --git a/extras/demo-anypay/src/routes/home/home-index-route.tsx b/extras/demo-anypay/src/routes/home/home-index-route.tsx index 2746ea99f..9c4303336 100644 --- a/extras/demo-anypay/src/routes/home/home-index-route.tsx +++ b/extras/demo-anypay/src/routes/home/home-index-route.tsx @@ -12,7 +12,7 @@ import * as chains from 'viem/chains' import { AnyPay } from '@0xsequence/wallet-core' import { Context as ContextLike } from '@0xsequence/wallet-primitives' import { useWaitForTransactionReceipt } from 'wagmi' -import { useMetaTxnMonitor } from '@/hooks/useMetaTxnMonitor' +import { useMetaTxnsMonitor, MetaTxn } from '@/hooks/useMetaTxnsMonitor' import { useRelayers } from '@/hooks/useRelayers' import { AlertTriangle, @@ -27,6 +27,7 @@ import { ShieldCheck, } from 'lucide-react' import { useTokenBalances } from '@/hooks/useTokenBalances' +import { Relayer } from '@0xsequence/wallet-core' // Helper to get chain info const getChainInfo = (chainId: number) => { @@ -164,6 +165,40 @@ export const HomeIndexRoute = () => { const { getRelayer } = useRelayers() + // Add monitoring for each meta transaction + const metaTxnMonitorStatuses = useMetaTxnsMonitor( + metaTxns as unknown as MetaTxn[] | undefined, + operationHashes, + getRelayer, + ) + + // Update metaTxnStatuses based on monitor results + useEffect(() => { + if (!metaTxns) return + + const newStatuses: { + [key: string]: { + status: 'pending' | 'success' | 'failed' + txHash?: string + error?: string + } + } = {} + + metaTxns.forEach((metaTxn) => { + const operationKey = `${metaTxn.chainId}-${metaTxn.id}` + const monitorStatus = metaTxnMonitorStatuses[operationKey] + + newStatuses[operationKey] = { + status: + monitorStatus?.status === 'confirmed' ? 'success' : monitorStatus?.status === 'failed' ? 'failed' : 'pending', + txHash: monitorStatus && 'txHash' in monitorStatus ? String(monitorStatus.txHash) : undefined, + error: monitorStatus && 'reason' in monitorStatus ? String(monitorStatus.reason) : undefined, + } + }) + + setMetaTxnStatuses(newStatuses) + }, [metaTxns, metaTxnMonitorStatuses]) + const calculateIntentAddress = useCallback((operations: IntentOperation[], mainSigner: string) => { try { const context: ContextLike.Context = { @@ -965,52 +1000,6 @@ export const HomeIndexRoute = () => { } }, [account.isConnected]) - // Replace the monitoring effect with individual hook calls for each operation - const operation0Status = useMetaTxnMonitor( - operationHashes[`${intentOperations?.[0]?.chainId}-0`], - intentOperations?.[0]?.chainId || '', - intentOperations?.[0] ? getRelayer(parseInt(intentOperations[0].chainId)) : undefined, - ) - - const operation1Status = useMetaTxnMonitor( - operationHashes[`${intentOperations?.[1]?.chainId}-1`], - intentOperations?.[1]?.chainId || '', - intentOperations?.[1] ? getRelayer(parseInt(intentOperations[1].chainId)) : undefined, - ) - - // Update the monitoring effect - useEffect(() => { - if (!metaTxns) return - - const newStatuses: { - [key: string]: { - status: 'pending' | 'success' | 'failed' - txHash?: string - error?: string - preconditionsMet?: boolean - lastPreconditionCheck?: string - } - } = {} - - if (operation0Status) { - const metaTxn = metaTxns[0] - if (metaTxn) { - newStatuses[`${metaTxn.chainId}-0`] = operation0Status - } - } - if (operation1Status) { - const metaTxn = metaTxns[1] - if (metaTxn) { - newStatuses[`${metaTxn.chainId}-1`] = operation1Status - } - } - - setMetaTxnStatuses((prev) => ({ - ...prev, - ...newStatuses, - })) - }, [metaTxns, operation0Status, operation1Status]) - // Effect to cleanup operation statuses and hashes when intent operations are reset useEffect(() => { if (!intentOperations) { @@ -1730,10 +1719,10 @@ export const HomeIndexRoute = () => { {tx.id || 'N/A'}
-
+
Contract: - {tx.contract} + {String(tx.contract || '')}
@@ -2260,64 +2249,109 @@ export const HomeIndexRoute = () => { Meta Transactions Status
- {metaTxns?.map((metaTxn, index) => ( -
-
- - - Meta Transaction #{index + 1} - Chain {metaTxn.chainId} - - ({getChainInfo(parseInt(metaTxn.chainId))?.name || 'Unknown Chain'}) - - -
- {metaTxnStatuses[`${metaTxn.chainId}-${index}`]?.status === 'success' - ? 'Success' - : metaTxnStatuses[`${metaTxn.chainId}-${index}`]?.status === 'failed' - ? 'Failed' - : 'Pending'} -
-
-
-
- - Contract: - {metaTxn.contract} + {metaTxns?.map((metaTxn, index) => { + const operationKey = `${metaTxn.chainId}-${metaTxn.id}` + const monitorStatus = metaTxnMonitorStatuses[operationKey] + const typedMetaTxn = metaTxn as unknown as MetaTxn + + // Type guard for operation status with gas used + type OperationStatusWithGas = { + status: 'confirmed' + gasUsed: bigint + txHash: string + transactionHash: `0x${string}` + } + + const hasGasUsed = ( + status: Relayer.OperationStatus | undefined, + ): status is OperationStatusWithGas => { + return ( + !!status && + status.status === 'confirmed' && + 'gasUsed' in status && + typeof status.gasUsed === 'bigint' + ) + } + + const getStatusDisplay = () => { + if (!monitorStatus) return 'Pending' + switch (monitorStatus.status) { + case 'confirmed': + return 'Success' + case 'failed': + return 'Failed' + case 'unknown': + return 'Unknown' + default: + return 'Pending' + } + } + + const getStatusClass = () => { + if (!monitorStatus) return 'bg-yellow-900/30 text-yellow-400 border border-yellow-700/30' + switch (monitorStatus.status) { + case 'confirmed': + return 'bg-green-900/30 text-green-400 border border-green-700/30' + case 'failed': + return 'bg-red-900/30 text-red-400 border border-red-700/30' + default: + return 'bg-yellow-900/30 text-yellow-400 border border-yellow-700/30' + } + } + + return ( +
+
+ + + Meta Transaction #{index + 1} - Chain {typedMetaTxn.chainId} + + ({getChainInfo(parseInt(typedMetaTxn.chainId))?.name || 'Unknown Chain'}) + +
+ {getStatusDisplay()} +
-
- - ID: - {metaTxn.id || 'N/A'} - +
+ {typedMetaTxn.contract !== undefined && ( +
+ + Contract: + + {typedMetaTxn.contract || 'N/A'} + + +
+ )} +
+ + ID: + {typedMetaTxn.id || 'N/A'} + +
+ {monitorStatus?.status === 'confirmed' && monitorStatus && 'txHash' in monitorStatus && ( + + Tx Hash: + {String(monitorStatus.txHash)} + + )} + {monitorStatus?.status === 'failed' && monitorStatus && 'reason' in monitorStatus && ( + + Error: + {String(monitorStatus.reason)} + + )} + {hasGasUsed(monitorStatus) && ( + + Gas Used: + {monitorStatus.gasUsed.toString()} + + )}
- {metaTxnStatuses[`${metaTxn.chainId}-${index}`]?.txHash && ( - - Tx Hash: - - {metaTxnStatuses[`${metaTxn.chainId}-${index}`].txHash} - - - )} - {metaTxnStatuses[`${metaTxn.chainId}-${index}`]?.error && ( - - Error: - - {metaTxnStatuses[`${metaTxn.chainId}-${index}`].error} - - - )}
-
- ))} + ) + })} {!metaTxns?.length && (
diff --git a/packages/wallet/core/src/relayer/relayer.ts b/packages/wallet/core/src/relayer/relayer.ts index e848abf6b..e2dd036e9 100644 --- a/packages/wallet/core/src/relayer/relayer.ts +++ b/packages/wallet/core/src/relayer/relayer.ts @@ -13,14 +13,22 @@ export interface FeeQuote { _quote: unknown } -export type OperationUknownStatus = { +export type OperationUnknownStatus = { status: 'unknown' } +export type OperationQueuedStatus = { + status: 'queued' +} + export type OperationPendingStatus = { status: 'pending' } +export type OperationPendingPreconditionStatus = { + status: 'pending-precondition' +} + export type OperationConfirmedStatus = { status: 'confirmed' transactionHash: Hex.Hex @@ -32,8 +40,10 @@ export type OperationFailedStatus = { } export type OperationStatus = - | OperationUknownStatus + | OperationUnknownStatus + | OperationQueuedStatus | OperationPendingStatus + | OperationPendingPreconditionStatus | OperationConfirmedStatus | OperationFailedStatus From ab29a028a683f337a957fd14d1b38a20899bebba Mon Sep 17 00:00:00 2001 From: Shun Kakinoki Date: Wed, 30 Apr 2025 16:12:22 +0900 Subject: [PATCH 415/439] Refactor HomeIndexRoute to replace meta transaction status management with origin call status handling. Remove deprecated state and effects related to meta transactions, streamlining transaction monitoring and improving clarity in status updates. Update related function names and UI bindings for consistency. --- .../src/routes/home/home-index-route.tsx | 180 +++--------------- 1 file changed, 29 insertions(+), 151 deletions(-) diff --git a/extras/demo-anypay/src/routes/home/home-index-route.tsx b/extras/demo-anypay/src/routes/home/home-index-route.tsx index 9c4303336..ef2a355e5 100644 --- a/extras/demo-anypay/src/routes/home/home-index-route.tsx +++ b/extras/demo-anypay/src/routes/home/home-index-route.tsx @@ -132,7 +132,7 @@ export const HomeIndexRoute = () => { receivedAddress?: string calculatedAddress?: string } | null>(null) - const [metaTxnStatus, setMetaTxnStatus] = useState<{ + const [originCallStatus, setOriginCallStatus] = useState<{ txnHash?: string status?: string revertReason?: string @@ -142,15 +142,6 @@ export const HomeIndexRoute = () => { const [originCallParams, setOriginCallParams] = useState(null) const [isChainSwitchRequired, setIsChainSwitchRequired] = useState(false) const [isAutoExecuteEnabled, setIsAutoExecuteEnabled] = useState(true) - const [metaTxnStatuses, setMetaTxnStatuses] = useState<{ - [key: string]: { - status: 'pending' | 'success' | 'failed' - txHash?: string - error?: string - preconditionsMet?: boolean - lastPreconditionCheck?: string - } - }>({}) const [operationHashes, setOperationHashes] = useState<{ [key: string]: Hex }>({}) const [isTransactionInProgress, setIsTransactionInProgress] = useState(false) const { sortedTokens, isLoadingBalances, balanceError } = useTokenBalances(account.address as Address.Address) @@ -172,33 +163,6 @@ export const HomeIndexRoute = () => { getRelayer, ) - // Update metaTxnStatuses based on monitor results - useEffect(() => { - if (!metaTxns) return - - const newStatuses: { - [key: string]: { - status: 'pending' | 'success' | 'failed' - txHash?: string - error?: string - } - } = {} - - metaTxns.forEach((metaTxn) => { - const operationKey = `${metaTxn.chainId}-${metaTxn.id}` - const monitorStatus = metaTxnMonitorStatuses[operationKey] - - newStatuses[operationKey] = { - status: - monitorStatus?.status === 'confirmed' ? 'success' : monitorStatus?.status === 'failed' ? 'failed' : 'pending', - txHash: monitorStatus && 'txHash' in monitorStatus ? String(monitorStatus.txHash) : undefined, - error: monitorStatus && 'reason' in monitorStatus ? String(monitorStatus.reason) : undefined, - } - }) - - setMetaTxnStatuses(newStatuses) - }, [metaTxns, metaTxnMonitorStatuses]) - const calculateIntentAddress = useCallback((operations: IntentOperation[], mainSigner: string) => { try { const context: ContextLike.Context = { @@ -231,14 +195,14 @@ export const HomeIndexRoute = () => { } }, []) - const updateMetaTxnStatus = ( + const updateOriginCallStatus = ( hash: Hex | undefined, status: 'success' | 'reverted' | 'pending' | 'sending', gasUsed?: bigint, effectiveGasPrice?: bigint, revertReason?: string | null, ) => { - setMetaTxnStatus({ + setOriginCallStatus({ txnHash: hash, status: status === 'success' @@ -553,14 +517,14 @@ export const HomeIndexRoute = () => { originCallParams.chainId === null ) { console.error('Origin call parameters not available or invalid:', originCallParams) - updateMetaTxnStatus(undefined, 'reverted', undefined, undefined, 'Origin call parameters not ready') + updateOriginCallStatus(undefined, 'reverted', undefined, undefined, 'Origin call parameters not ready') return } // Check if we need to switch chains if (account.chainId !== originCallParams.chainId) { setIsChainSwitchRequired(true) - updateMetaTxnStatus( + updateOriginCallStatus( undefined, 'pending', undefined, @@ -577,7 +541,7 @@ export const HomeIndexRoute = () => { if (error.message.includes('User rejected') || error.message.includes('user rejected')) { setIsAutoExecuteEnabled(false) } - updateMetaTxnStatus( + updateOriginCallStatus( undefined, 'reverted', undefined, @@ -593,7 +557,7 @@ export const HomeIndexRoute = () => { if (!isTransactionInProgress) { setIsTransactionInProgress(true) // Mark transaction as in progress setTxnHash(undefined) - updateMetaTxnStatus(undefined, 'sending') + updateOriginCallStatus(undefined, 'sending') sendTransaction( { @@ -613,7 +577,7 @@ export const HomeIndexRoute = () => { if (error.message.includes('User rejected') || error.message.includes('user rejected')) { setIsAutoExecuteEnabled(false) } - updateMetaTxnStatus(undefined, 'reverted', undefined, undefined, error.message) + updateOriginCallStatus(undefined, 'reverted', undefined, undefined, error.message) setIsTransactionInProgress(false) }, }, @@ -627,7 +591,7 @@ export const HomeIndexRoute = () => { useEffect(() => { if (switchChainError) { console.error('Chain switch error:', switchChainError) - updateMetaTxnStatus( + updateOriginCallStatus( undefined, 'reverted', undefined, @@ -661,7 +625,7 @@ export const HomeIndexRoute = () => { }, onError: (error) => { console.error('Auto-executed transaction failed:', error) - updateMetaTxnStatus(undefined, 'reverted', undefined, undefined, error.message) + updateOriginCallStatus(undefined, 'reverted', undefined, undefined, error.message) }, }, ) @@ -694,8 +658,8 @@ export const HomeIndexRoute = () => { useEffect(() => { if (!txnHash) { // Only reset these when txnHash is cleared - if (metaTxnStatus?.txnHash) { - setMetaTxnStatus(null) + if (originCallStatus?.txnHash) { + setOriginCallStatus(null) } if (Object.keys(sentMetaTxns).length > 0) { setSentMetaTxns({}) @@ -704,12 +668,12 @@ export const HomeIndexRoute = () => { } // Don't update status if it's already set for this hash - if (metaTxnStatus?.txnHash === txnHash) { + if (originCallStatus?.txnHash === txnHash) { return } if (isWaitingForReceipt) { - setMetaTxnStatus({ + setOriginCallStatus({ txnHash, status: 'Pending', }) @@ -717,7 +681,7 @@ export const HomeIndexRoute = () => { } if (isSuccess && receipt) { - setMetaTxnStatus({ + setOriginCallStatus({ txnHash: receipt.transactionHash, status: receipt.status === 'success' ? 'Success' : 'Failed', gasUsed: receipt.gasUsed ? Number(receipt.gasUsed) : undefined, @@ -732,7 +696,7 @@ export const HomeIndexRoute = () => { } } } else if (isError) { - setMetaTxnStatus({ + setOriginCallStatus({ txnHash, status: 'Failed', revertReason: receiptError?.message || 'Failed to get receipt', @@ -755,13 +719,13 @@ export const HomeIndexRoute = () => { !isWaitingForReceipt && !txnHash && !isChainSwitchRequired && - !metaTxnStatus + !originCallStatus if (shouldAutoSend) { console.log('Auto-executing transaction: All conditions met.') // Set initial status - setMetaTxnStatus({ + setOriginCallStatus({ status: 'Sending...', }) @@ -782,7 +746,7 @@ export const HomeIndexRoute = () => { if (error.message.includes('User rejected') || error.message.includes('user rejected')) { setIsAutoExecuteEnabled(false) } - setMetaTxnStatus({ + setOriginCallStatus({ status: 'Failed', revertReason: error.message, }) @@ -799,7 +763,7 @@ export const HomeIndexRoute = () => { isWaitingForReceipt, txnHash, isChainSwitchRequired, - metaTxnStatus, + originCallStatus, ]) useEffect(() => { @@ -953,57 +917,9 @@ export const HomeIndexRoute = () => { isSwitchingChain || (isAutoExecuteEnabled && commitIntentConfigMutation.isSuccess) // Disable if auto-execute is on and commit was successful - // Effect to initialize operation statuses - useEffect(() => { - if (intentOperations) { - // Initialize operation statuses - const initialStatuses: { - [key: string]: { status: 'pending' | 'success' | 'failed'; txHash?: string; error?: string } - } = {} - intentOperations.forEach((operation, index) => { - initialStatuses[`${operation.chainId}-${index}`] = { status: 'pending' } - }) - setMetaTxnStatuses(initialStatuses) - } - }, [intentOperations]) - - // Add this after the receipt effect - useEffect(() => { - if (receipt && intentOperations) { - // Update operation statuses based on receipt - setMetaTxnStatuses((prev) => { - const newStatuses = { ...prev } - intentOperations.forEach((operation, index) => { - const key = `${operation.chainId}-${index}` - if (receipt.status === 'success') { - newStatuses[key] = { - status: 'success', - txHash: receipt.transactionHash, - } - } else { - newStatuses[key] = { - status: 'failed', - txHash: receipt.transactionHash, - error: 'Transaction failed', - } - } - }) - return newStatuses - }) - } - }, [receipt, intentOperations]) - - // Add this to reset operation statuses when account disconnects - useEffect(() => { - if (!account.isConnected) { - setMetaTxnStatuses({}) - } - }, [account.isConnected]) - // Effect to cleanup operation statuses and hashes when intent operations are reset useEffect(() => { if (!intentOperations) { - setMetaTxnStatuses({}) setOperationHashes({}) } }, [intentOperations]) @@ -1011,7 +927,6 @@ export const HomeIndexRoute = () => { // Effect to cleanup when account disconnects useEffect(() => { if (!account.isConnected) { - setMetaTxnStatuses({}) setOperationHashes({}) setIntentOperations(null) setIntentPreconditions(null) @@ -1021,19 +936,6 @@ export const HomeIndexRoute = () => { } }, [account.isConnected]) - // Effect to initialize metaTxnStatuses when metaTxns change - useEffect(() => { - if (metaTxns) { - const initialStatuses: { - [key: string]: { status: 'pending' | 'success' | 'failed'; txHash?: string; error?: string } - } = {} - metaTxns.forEach((metaTxn, index) => { - initialStatuses[`${metaTxn.chainId}-${index}`] = { status: 'pending' } - }) - setMetaTxnStatuses(initialStatuses) - } - }, [metaTxns]) - // Update the sendMetaTxn mutation const sendMetaTxnMutation = useMutation({ mutationFn: async ({ selectedId }: { selectedId: string | null }) => { @@ -1117,17 +1019,6 @@ export const HomeIndexRoute = () => { // Optimistically update UI const { selectedId } = variables const affectedTxns = selectedId ? [selectedId] : metaTxns?.map((tx) => tx.id) || [] - - affectedTxns.forEach((txId) => { - const tx = metaTxns?.find((t) => t.id === txId) - if (tx) { - const operationKey = `${tx.chainId}-${txId}` - setMetaTxnStatuses((prev) => ({ - ...prev, - [operationKey]: { status: 'pending', error: undefined }, - })) - } - }) }, onSuccess: (results) => { // Update states based on results @@ -1142,19 +1033,6 @@ export const HomeIndexRoute = () => { ...prev, [operationKey]: opHash, })) - - setMetaTxnStatuses((prev) => ({ - ...prev, - [operationKey]: { status: 'pending', error: undefined }, - })) - } else if (error) { - setMetaTxnStatuses((prev) => ({ - ...prev, - [operationKey]: { - status: 'failed', - error: `Relay failed: ${error}`, - }, - })) } }) }, @@ -2162,7 +2040,7 @@ export const HomeIndexRoute = () => { Transaction Hash: - {metaTxnStatus?.txnHash || 'Not sent yet'} + {originCallStatus?.txnHash || 'Not sent yet'}
@@ -2171,38 +2049,38 @@ export const HomeIndexRoute = () => { Status: - {metaTxnStatus?.status || 'Idle'} + {originCallStatus?.status || 'Idle'} {isWaitingForReceipt && (Waiting for confirmation...)}
- {metaTxnStatus?.revertReason && ( + {originCallStatus?.revertReason && (
Revert Reason: - {metaTxnStatus.revertReason} + {originCallStatus.revertReason}
)}
Gas Used: - {metaTxnStatus?.gasUsed || '0'} + {originCallStatus?.gasUsed || '0'}
Effective Gas Price: - {metaTxnStatus?.effectiveGasPrice || '0'} + {originCallStatus?.effectiveGasPrice || '0'}
From 05cca06e84521972683a21a4b6f5b5f47e3c0ed2 Mon Sep 17 00:00:00 2001 From: Shun Kakinoki Date: Wed, 30 Apr 2025 17:07:38 +0900 Subject: [PATCH 416/439] Remove deprecated optimistic UI update logic from HomeIndexRoute, simplifying the transaction success handling. Adjust related success callback to focus on relevant transaction data, enhancing clarity in state management. --- extras/demo-anypay/src/routes/home/home-index-route.tsx | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/extras/demo-anypay/src/routes/home/home-index-route.tsx b/extras/demo-anypay/src/routes/home/home-index-route.tsx index ef2a355e5..c7f5856c0 100644 --- a/extras/demo-anypay/src/routes/home/home-index-route.tsx +++ b/extras/demo-anypay/src/routes/home/home-index-route.tsx @@ -1015,14 +1015,9 @@ export const HomeIndexRoute = () => { throw error } }, - onMutate: (variables) => { - // Optimistically update UI - const { selectedId } = variables - const affectedTxns = selectedId ? [selectedId] : metaTxns?.map((tx) => tx.id) || [] - }, onSuccess: (results) => { // Update states based on results - results.forEach(({ operationKey, opHash, success, error }) => { + results.forEach(({ operationKey, opHash, success }) => { if (success && opHash) { setSentMetaTxns((prev) => ({ ...prev, From c7aa7ae81950d4339986d5157733f121978f82c8 Mon Sep 17 00:00:00 2001 From: Shun Kakinoki Date: Wed, 30 Apr 2025 18:56:59 +0900 Subject: [PATCH 417/439] Add gas estimation functionality to HomeIndexRoute, enhancing transaction handling. Integrate useEstimateGas hook for accurate gas limits, implement error handling for estimation failures, and update UI to reflect gas estimation status. --- .../src/routes/home/home-index-route.tsx | 75 ++++++++++++++++++- 1 file changed, 72 insertions(+), 3 deletions(-) diff --git a/extras/demo-anypay/src/routes/home/home-index-route.tsx b/extras/demo-anypay/src/routes/home/home-index-route.tsx index c7f5856c0..d3a96e7d7 100644 --- a/extras/demo-anypay/src/routes/home/home-index-route.tsx +++ b/extras/demo-anypay/src/routes/home/home-index-route.tsx @@ -1,5 +1,5 @@ import { useState, useEffect, useCallback } from 'react' -import { useAccount, useConnect, useDisconnect, useSendTransaction, useSwitchChain } from 'wagmi' +import { useAccount, useConnect, useDisconnect, useSendTransaction, useSwitchChain, useEstimateGas } from 'wagmi' import { Connector } from 'wagmi' import { NativeTokenBalance, TokenBalance } from '@0xsequence/indexer' import { GetIntentOperationsReturn, IntentOperation, IntentPrecondition, GetIntentConfigReturn } from '@0xsequence/api' @@ -107,6 +107,7 @@ export const HomeIndexRoute = () => { const { switchChain, isPending: isSwitchingChain, error: switchChainError } = useSwitchChain() const [selectedToken, setSelectedToken] = useState(null) const [showCustomCallForm, setShowCustomCallForm] = useState(false) + const [isEstimatingGas, setIsEstimatingGas] = useState(false) const [customCallData, setCustomCallData] = useState({ to: '', data: '', @@ -163,6 +164,22 @@ export const HomeIndexRoute = () => { getRelayer, ) + // Add gas estimation hook with proper types + const { + data: estimatedGas, + isError: isEstimateError, + error: estimateError, + } = useEstimateGas( + originCallParams?.to && originCallParams?.chainId && !originCallParams.error + ? { + to: originCallParams.to || undefined, + data: originCallParams.data || undefined, + value: originCallParams.value || undefined, + chainId: originCallParams.chainId || undefined, + } + : undefined, + ) + const calculateIntentAddress = useCallback((operations: IntentOperation[], mainSigner: string) => { try { const context: ContextLike.Context = { @@ -534,7 +551,6 @@ export const HomeIndexRoute = () => { try { console.log('Switching to chain:', originCallParams.chainId) - await switchChain({ chainId: originCallParams.chainId }) } catch (error: any) { console.error('Failed to switch chain:', error) @@ -559,12 +575,34 @@ export const HomeIndexRoute = () => { setTxnHash(undefined) updateOriginCallStatus(undefined, 'sending') + if (!estimatedGas && !isEstimateError) { + setIsEstimatingGas(true) + return // Wait for gas estimation + } + + if (isEstimateError) { + console.error('Gas estimation failed:', estimateError) + updateOriginCallStatus( + undefined, + 'reverted', + undefined, + undefined, + `Gas estimation failed: ${estimateError?.message}`, + ) + setIsTransactionInProgress(false) + return + } + + // Add 20% buffer to estimated gas + const gasLimit = estimatedGas ? BigInt(Math.floor(Number(estimatedGas) * 1.2)) : undefined + sendTransaction( { to: originCallParams.to, data: originCallParams.data, value: originCallParams.value, chainId: originCallParams.chainId, + gas: gasLimit, }, { onSuccess: (hash) => { @@ -611,12 +649,33 @@ export const HomeIndexRoute = () => { return } + if (!estimatedGas && !isEstimateError) { + setIsEstimatingGas(true) + return // Wait for gas estimation + } + + if (isEstimateError) { + console.error('Gas estimation failed:', estimateError) + updateOriginCallStatus( + undefined, + 'reverted', + undefined, + undefined, + `Gas estimation failed: ${estimateError?.message}`, + ) + return + } + + // Add 20% buffer to estimated gas + const gasLimit = estimatedGas ? BigInt(Math.floor(Number(estimatedGas) * 1.2)) : undefined + sendTransaction( { to: originCallParams.to, data: originCallParams.data, value: originCallParams.value, chainId: originCallParams.chainId, + gas: gasLimit, }, { onSuccess: (hash) => { @@ -630,7 +689,12 @@ export const HomeIndexRoute = () => { }, ) } - }, [isAutoExecuteEnabled, originCallParams?.chainId, account.chainId]) + }, [isAutoExecuteEnabled, originCallParams?.chainId, account.chainId, estimatedGas, isEstimateError]) + + // Reset gas estimation state when parameters change + useEffect(() => { + setIsEstimatingGas(false) + }, [originCallParams]) // Only update chain switch required state when needed useEffect(() => { @@ -902,6 +966,11 @@ export const HomeIndexRoute = () => { {isWaitingForReceipt ? 'Waiting...' : 'Sending...'}
+ ) : isEstimatingGas ? ( +
+ + Estimating Gas... +
) : isChainSwitchRequired ? ( 'Switch Chain' ) : ( From e6b76c18ff1e98501859138ae105f3aab0491b2e Mon Sep 17 00:00:00 2001 From: Shun Kakinoki Date: Thu, 1 May 2025 01:10:51 +0900 Subject: [PATCH 418/439] Removing the IntentOperation type and updating the calculateIntentConfigurationAddress function to accept calls and chainId directly --- packages/wallet/core/src/anypay/intents.ts | 46 +++++----------------- packages/wallet/core/test/anypay.test.ts | 38 ++++++++++-------- 2 files changed, 32 insertions(+), 52 deletions(-) diff --git a/packages/wallet/core/src/anypay/intents.ts b/packages/wallet/core/src/anypay/intents.ts index 73ad59ccb..68f41fc15 100644 --- a/packages/wallet/core/src/anypay/intents.ts +++ b/packages/wallet/core/src/anypay/intents.ts @@ -1,28 +1,14 @@ import { Address, Bytes, ContractAddress, Hash } from 'ox' import { Context, Config, Payload } from '@0xsequence/wallet-primitives' -export type IntentOperation = { - chainId: bigint - space?: bigint - nonce?: bigint - calls: { - to: Address.Address - value: bigint - data: Bytes.Bytes - gasLimit: bigint - delegateCall: boolean - onlyFallback: boolean - behaviorOnError: bigint - }[] -} - export function calculateIntentConfigurationAddress( - operations: IntentOperation[], mainSigner: Address.Address, + calls: Payload.Calls[], + chainId: bigint, context: Context.Context, ): Address.Address { // Create the intent configuration - const config = createIntentConfiguration(operations, mainSigner) + const config = createIntentConfiguration(mainSigner, calls, chainId) // Calculate the image hash of the configuration const imageHash = Config.hashConfiguration(config) @@ -38,7 +24,11 @@ export function calculateIntentConfigurationAddress( }) } -function createIntentConfiguration(operations: IntentOperation[], mainSigner: Address.Address): Config.Config { +function createIntentConfiguration( + mainSigner: Address.Address, + calls: Payload.Calls[], + chainId: bigint, +): Config.Config { // Create the main signer leaf const mainSignerLeaf: Config.SignerLeaf = { type: 'signer', @@ -47,25 +37,9 @@ function createIntentConfiguration(operations: IntentOperation[], mainSigner: Ad } // Create subdigest leaves for each operation - const subdigestLeaves = operations.map((op) => { - // Create the calls payload - const payload: Payload.Calls = { - type: 'call', - space: op.space ?? 0n, - nonce: op.nonce ?? 0n, - calls: op.calls.map((call) => ({ - to: call.to, - value: call.value, - data: Bytes.toHex(call.data), - gasLimit: call.gasLimit, - delegateCall: call.delegateCall, - onlyFallback: call.onlyFallback, - behaviorOnError: call.behaviorOnError === 0n ? 'ignore' : call.behaviorOnError === 1n ? 'revert' : 'abort', - })), - } - + const subdigestLeaves = calls.map((call) => { // Get the digest hash using Payload.hash - const digest = Payload.hash(Address.from('0x0000000000000000000000000000000000000000'), op.chainId, payload) + const digest = Payload.hash(Address.from('0x0000000000000000000000000000000000000000'), chainId, call) console.log('digest:', Bytes.toHex(digest)) // Create subdigest leaf diff --git a/packages/wallet/core/test/anypay.test.ts b/packages/wallet/core/test/anypay.test.ts index d229f69d2..e83e9c870 100644 --- a/packages/wallet/core/test/anypay.test.ts +++ b/packages/wallet/core/test/anypay.test.ts @@ -12,7 +12,7 @@ import { Erc1155ApprovalPrecondition, } from '../src/preconditions/types' import { CAN_RUN_LIVE, RPC_URL } from './constants' -import { calculateIntentConfigurationAddress, IntentOperation } from '../src/anypay/intents' +import { calculateIntentConfigurationAddress } from '../src/anypay/intents' const ERC20_IMPLICIT_MINT_CONTRACT = '0x041E0CDC028050519C8e6485B2d9840caf63773F' @@ -314,17 +314,19 @@ describe('AnyPay Preconditions', () => { } // Create a test operation - const operation: IntentOperation = { - chainId, + const operation: Payload.Calls = { + type: 'call', + space: 0n, + nonce: 0n, calls: [ { to: ERC20_IMPLICIT_MINT_CONTRACT, value: 0n, - data: Bytes.fromHex('0x'), + data: '0x' as Hex.Hex, gasLimit: 0n, delegateCall: false, onlyFallback: false, - behaviorOnError: 0n, // 0 = ignore, 1 = revert, 2 = abort + behaviorOnError: 'ignore', }, ], } @@ -338,7 +340,7 @@ describe('AnyPay Preconditions', () => { } // Calculate intent configuration address - const configAddress = calculateIntentConfigurationAddress([operation], testIdentityAddress, context) + const configAddress = calculateIntentConfigurationAddress(testWalletAddress, [operation], chainId, context) // Start the relay operation with a short check interval const relayPromise = relayer.relay( @@ -422,17 +424,19 @@ describe('AnyPay Preconditions', () => { await requireContractDeployed(provider, ERC20_IMPLICIT_MINT_CONTRACT) // Create a test operation - const operation: IntentOperation = { - chainId, + const operation: Payload.Calls = { + type: 'call', + space: 0n, + nonce: 0n, calls: [ { to: ERC20_IMPLICIT_MINT_CONTRACT, value: 0n, - data: Bytes.fromHex('0x'), + data: '0x' as Hex.Hex, gasLimit: 0n, delegateCall: false, onlyFallback: false, - behaviorOnError: 0n, + behaviorOnError: 'ignore', }, ], } @@ -478,7 +482,7 @@ describe('AnyPay Preconditions', () => { } // Calculate intent configuration address - const configAddress = calculateIntentConfigurationAddress([operation], testIdentityAddress, context) + const configAddress = calculateIntentConfigurationAddress(testWalletAddress, [operation], chainId, context) expect(configAddress).toBeDefined() expect(configAddress).not.toBe(testWalletAddress) @@ -528,17 +532,19 @@ describe('AnyPay Preconditions', () => { ] // Create a test operation - const operation: IntentOperation = { - chainId, + const operation: Payload.Calls = { + type: 'call', + space: 0n, + nonce: 0n, calls: [ { to: ERC20_IMPLICIT_MINT_CONTRACT, value: 0n, - data: Bytes.fromHex('0x'), + data: '0x' as Hex.Hex, gasLimit: 0n, delegateCall: false, onlyFallback: false, - behaviorOnError: 0n, + behaviorOnError: 'ignore', }, ], } @@ -552,7 +558,7 @@ describe('AnyPay Preconditions', () => { } // Calculate intent configuration address - const configAddress = calculateIntentConfigurationAddress([operation], testIdentityAddress, context) + const configAddress = calculateIntentConfigurationAddress(testWalletAddress, [operation], chainId, context) // Mock the provider responses if (!CAN_RUN_LIVE) { From 9ff1409acef110eb19396b796e062f702b764c21 Mon Sep 17 00:00:00 2001 From: Shun Kakinoki Date: Thu, 1 May 2025 01:20:00 +0900 Subject: [PATCH 419/439] Add tests for calculating intent configuration address in AnyPay test suite. Implement scenarios for single and multiple operations, ensuring expected addresses match Go test results. --- packages/wallet/core/test/anypay.test.ts | 95 ++++++++++++++++++++++++ 1 file changed, 95 insertions(+) diff --git a/packages/wallet/core/test/anypay.test.ts b/packages/wallet/core/test/anypay.test.ts index e83e9c870..85cfbae2f 100644 --- a/packages/wallet/core/test/anypay.test.ts +++ b/packages/wallet/core/test/anypay.test.ts @@ -591,3 +591,98 @@ describe('AnyPay Preconditions', () => { }) } }) + +describe('Intent Configuration Address', () => { + it('should calculate address for single operation', () => { + // Create context matching Go test + const context: Context.Context = { + factory: Address.from('0x0000000000000000000000000000000000000000'), + stage1: '0x0000000000000000000000000000000000000000' as Hex.Hex, + stage2: '0x0000000000000000000000000000000000000000' as Hex.Hex, + creationCode: + '0x603e600e3d39601e805130553df33d3d34601c57363d3d373d363d30545af43d82803e903d91601c57fd5bf3' as Hex.Hex, + } + + // Main signer matching Go test + const mainSigner = Address.from('0x1111111111111111111111111111111111111111') + + // Create a single operation matching Go test + const operation: Payload.Calls = { + type: 'call', + space: 0n, + nonce: 0n, + calls: [ + { + to: Address.from('0x0000000000000000000000000000000000000000'), + value: 0n, + data: '0x1234' as Hex.Hex, + gasLimit: 0n, + delegateCall: false, + onlyFallback: false, + behaviorOnError: 'revert', + }, + ], + } + + // Calculate intent configuration address + const address = calculateIntentConfigurationAddress(mainSigner, [operation], 1n, context) + + // Verify the address matches Go test + expect(address.toString()).toBe('0x8577dfb93fe58cc8ee90dea522555fdf01fd7429') + }) + + it('should calculate address for multiple operations', () => { + // Create context matching Go test + const context: Context.Context = { + factory: Address.from('0x0000000000000000000000000000000000000000'), + stage1: '0x0000000000000000000000000000000000000000' as Hex.Hex, + stage2: '0x0000000000000000000000000000000000000000' as Hex.Hex, + creationCode: + '0x603e600e3d39601e805130553df33d3d34601c57363d3d373d363d30545af43d82803e903d91601c57fd5bf3' as Hex.Hex, + } + + // Main signer matching Go test + const mainSigner = Address.from('0x1111111111111111111111111111111111111111') + + // Create multiple operations matching Go test + const operation1: Payload.Calls = { + type: 'call', + space: 0n, + nonce: 0n, + calls: [ + { + to: Address.from('0x0000000000000000000000000000000000000000'), + value: 0n, + data: '0x1234' as Hex.Hex, + gasLimit: 0n, + delegateCall: false, + onlyFallback: false, + behaviorOnError: 'revert', + }, + ], + } + + const operation2: Payload.Calls = { + type: 'call', + space: 0n, + nonce: 0n, + calls: [ + { + to: Address.from('0x0000000000000000000000000000000000000000'), + value: 0n, + data: '0x5678' as Hex.Hex, + gasLimit: 0n, + delegateCall: false, + onlyFallback: false, + behaviorOnError: 'revert', + }, + ], + } + + // Calculate intent configuration address + const address = calculateIntentConfigurationAddress(mainSigner, [operation1, operation2], 1n, context) + + // Verify the address matches Go test + expect(address.toString()).toBe('0xbd820ed5b1e969ed6509e8ede687dfc4c714438f') + }) +}) From 0585e1133ff67721afeab0f8bec383e3c2955436 Mon Sep 17 00:00:00 2001 From: Shun Kakinoki Date: Thu, 1 May 2025 18:08:24 +0900 Subject: [PATCH 420/439] Refactor HomeIndexRoute and API types to replace IntentOperation with IntentCallsPayload, enhancing clarity and consistency in transaction handling. Update related functions and state management to accommodate new payload structure, ensuring compatibility with recent API changes. --- .../src/routes/home/home-index-route.tsx | 129 +++++++++--------- packages/services/api/src/api.gen.ts | 36 ++--- packages/wallet/core/src/anypay/intents.ts | 17 ++- packages/wallet/core/test/anypay.test.ts | 30 ++-- 4 files changed, 110 insertions(+), 102 deletions(-) diff --git a/extras/demo-anypay/src/routes/home/home-index-route.tsx b/extras/demo-anypay/src/routes/home/home-index-route.tsx index d3a96e7d7..389f0a80a 100644 --- a/extras/demo-anypay/src/routes/home/home-index-route.tsx +++ b/extras/demo-anypay/src/routes/home/home-index-route.tsx @@ -2,7 +2,12 @@ import { useState, useEffect, useCallback } from 'react' import { useAccount, useConnect, useDisconnect, useSendTransaction, useSwitchChain, useEstimateGas } from 'wagmi' import { Connector } from 'wagmi' import { NativeTokenBalance, TokenBalance } from '@0xsequence/indexer' -import { GetIntentOperationsReturn, IntentOperation, IntentPrecondition, GetIntentConfigReturn } from '@0xsequence/api' +import { + GetIntentCallsPayloadsReturn, + IntentCallsPayload, + IntentPrecondition, + GetIntentConfigReturn, +} from '@0xsequence/api' import { formatUnits, Hex, isAddressEqual, zeroAddress } from 'viem' import { useQuery, useMutation } from '@tanstack/react-query' import { useAPIClient } from '@/hooks/useAPIClient' @@ -120,9 +125,9 @@ export const HomeIndexRoute = () => { const apiClient = useAPIClient() // State declarations - const [metaTxns, setMetaTxns] = useState(null) - const [intentOperations, setIntentOperations] = useState(null) - const [intentPreconditions, setIntentPreconditions] = useState( + const [metaTxns, setMetaTxns] = useState(null) + const [intentCallsPayloads, setIntentCallsPayloads] = useState(null) + const [intentPreconditions, setIntentPreconditions] = useState( null, ) const [txnHash, setTxnHash] = useState() @@ -180,7 +185,7 @@ export const HomeIndexRoute = () => { : undefined, ) - const calculateIntentAddress = useCallback((operations: IntentOperation[], mainSigner: string) => { + const calculateIntentAddress = useCallback((mainSigner: string, calls: IntentCallsPayload[]) => { try { const context: ContextLike.Context = { factory: '0xBd0F8abD58B4449B39C57Ac9D5C67433239aC447' as `0x${string}`, @@ -190,22 +195,27 @@ export const HomeIndexRoute = () => { '0x603e600e3d39601e805130553df33d3d34601c57363d3d373d363d30545af43d82803e903d91601c57fd5bf3' as `0x${string}`, } - const coreOperations = operations.map((op) => ({ - chainId: BigInt(op.chainId), - space: op.space ? BigInt(op.space) : undefined, - nonce: op.nonce ? BigInt(op.nonce) : undefined, - calls: op.calls.map((call) => ({ + const coreCalls = calls.map((call) => ({ + type: 'call' as const, + chainId: BigInt(call.chainId), + space: call.space ? BigInt(call.space) : 0n, + nonce: call.nonce ? BigInt(call.nonce) : 0n, + calls: call.calls.map((call) => ({ to: Address.from(call.to), value: BigInt(call.value || '0'), - data: Bytes.from((call.data as Hex) || '0x'), + data: Bytes.toHex(Bytes.from((call.data as Hex) || '0x')), gasLimit: BigInt(call.gasLimit || '0'), delegateCall: !!call.delegateCall, onlyFallback: !!call.onlyFallback, - behaviorOnError: call.behaviorOnError !== undefined ? BigInt(call.behaviorOnError) : 0n, + behaviorOnError: (Number(call.behaviorOnError) === 0 + ? 'ignore' + : Number(call.behaviorOnError) === 1 + ? 'revert' + : 'abort') as 'ignore' | 'revert' | 'abort', })), })) - return AnyPay.calculateIntentConfigurationAddress(coreOperations, Address.from(mainSigner), context) + return AnyPay.calculateIntentConfigurationAddress(Address.from(mainSigner), coreCalls, context) } catch (error) { console.error('Error calculating intent address:', error) throw error @@ -280,14 +290,14 @@ export const HomeIndexRoute = () => { mutationFn: async (args: { walletAddress: string mainSigner: string - operations: IntentOperation[] + calls: IntentCallsPayload[] preconditions: IntentPrecondition[] }) => { if (!apiClient) throw new Error('API client not available') if (!account.address) throw new Error('Account address not available') try { - const calculatedAddress = calculateIntentAddress(args.operations, args.mainSigner) + const calculatedAddress = calculateIntentAddress(args.mainSigner, args.calls) const receivedAddress = findPreconditionAddress(args.preconditions) const isVerified = isAddressEqual(Address.from(receivedAddress), calculatedAddress) @@ -305,7 +315,7 @@ export const HomeIndexRoute = () => { const response = await apiClient.commitIntentConfig({ walletAddress: calculatedAddress.toString(), mainSigner: args.mainSigner, - operations: args.operations, + calls: args.calls, preconditions: args.preconditions, }) console.log('API Commit Response:', response) @@ -314,7 +324,7 @@ export const HomeIndexRoute = () => { console.error('Error during commit intent mutation:', error) if (!verificationStatus?.success && !verificationStatus?.receivedAddress) { try { - const calculatedAddress = calculateIntentAddress(args.operations, args.mainSigner) + const calculatedAddress = calculateIntentAddress(args.mainSigner, args.calls) const receivedAddress = findPreconditionAddress(args.preconditions) setVerificationStatus({ success: false, @@ -358,7 +368,7 @@ export const HomeIndexRoute = () => { retry: 1, }) - const createIntentMutation = useMutation({ + const createIntentMutation = useMutation({ mutationFn: async (action: IntentAction) => { if (!apiClient || !selectedToken || !account.address) { throw new Error('Missing API client, selected token, or account address') @@ -453,10 +463,10 @@ export const HomeIndexRoute = () => { : destinationCall.transactionValue, } - const data = await apiClient.getIntentOperations(args) + const data = await apiClient.getIntentCallsPayloads(args) setMetaTxns(data.metaTxns) - setIntentOperations(data.operations) + setIntentCallsPayloads(data.calls) setIntentPreconditions(data.preconditions) setCommittedIntentAddress(null) setVerificationStatus(null) @@ -466,26 +476,26 @@ export const HomeIndexRoute = () => { console.log('Intent Config Success:', data) if ( data && - data.operations && - data.operations.length > 0 && + data.calls && + data.calls.length > 0 && data.preconditions && data.preconditions.length > 0 && data.metaTxns && data.metaTxns.length > 0 ) { - setIntentOperations(data.operations) + setIntentCallsPayloads(data.calls) setIntentPreconditions(data.preconditions) setMetaTxns(data.metaTxns) } else { console.warn('API returned success but no operations found.') - setIntentOperations(null) + setIntentCallsPayloads(null) setIntentPreconditions(null) setMetaTxns(null) } }, onError: (error) => { console.error('Intent Config Error:', error) - setIntentOperations(null) + setIntentCallsPayloads(null) setIntentPreconditions(null) setMetaTxns(null) }, @@ -494,7 +504,7 @@ export const HomeIndexRoute = () => { useEffect(() => { if (!account.isConnected) { setSelectedToken(null) - setIntentOperations(null) + setIntentCallsPayloads(null) setIntentPreconditions(null) setMetaTxns(null) setCommittedIntentAddress(null) @@ -503,7 +513,7 @@ export const HomeIndexRoute = () => { }, [account.isConnected]) const handleActionClick = (action: IntentAction) => { - setIntentOperations(null) + setIntentCallsPayloads(null) setIntentPreconditions(null) setMetaTxns(null) setShowCustomCallForm(false) @@ -831,13 +841,13 @@ export const HomeIndexRoute = () => { ]) useEffect(() => { - if (!intentOperations?.[0]?.chainId || !selectedToken || !intentPreconditions || !account.address) { + if (!intentCallsPayloads?.[0]?.chainId || !selectedToken || !intentPreconditions || !account.address) { setOriginCallParams(null) return } try { - const intentAddress = calculateIntentAddress(intentOperations, account.address) + const intentAddress = calculateIntentAddress(account.address, intentCallsPayloads) const intentAddressString = intentAddress.toString() as Address.Address let calcTo: Address.Address @@ -889,7 +899,7 @@ export const HomeIndexRoute = () => { console.error('Failed to calculate origin call params for UI:', error) setOriginCallParams({ to: null, data: null, value: null, chainId: null, error: error.message }) } - }, [intentOperations, selectedToken, intentPreconditions, account.address, calculateIntentAddress]) + }, [intentCallsPayloads, selectedToken, intentPreconditions, account.address, calculateIntentAddress]) useEffect(() => { // Auto-execute effect for handling chain switch and transaction @@ -903,11 +913,11 @@ export const HomeIndexRoute = () => { } }, [isAutoExecuteEnabled, originCallParams, account.chainId]) - // Effect to auto-commit when intent operations are ready + // Effect to auto-commit when intent calls payloads are ready useEffect(() => { if ( isAutoExecuteEnabled && - intentOperations && + intentCallsPayloads && intentPreconditions && account.address && !commitIntentConfigMutation.isPending && @@ -915,15 +925,15 @@ export const HomeIndexRoute = () => { ) { console.log('Auto-committing intent configuration...') commitIntentConfigMutation.mutate({ - walletAddress: calculateIntentAddress(intentOperations, account.address).toString(), + walletAddress: calculateIntentAddress(account.address, intentCallsPayloads).toString(), mainSigner: account.address, - operations: intentOperations, + calls: intentCallsPayloads, preconditions: intentPreconditions, }) } }, [ isAutoExecuteEnabled, - intentOperations, + intentCallsPayloads, intentPreconditions, account.address, commitIntentConfigMutation.isPending, @@ -952,7 +962,8 @@ export const HomeIndexRoute = () => { ) const isCommitButtonDisabled = Boolean( - commitIntentConfigMutation.isPending || (isAutoExecuteEnabled && intentOperations && !!intentPreconditions?.length), + commitIntentConfigMutation.isPending || + (isAutoExecuteEnabled && intentCallsPayloads && !!intentPreconditions?.length), ) // Update button text and disabled state for send transaction button @@ -986,18 +997,10 @@ export const HomeIndexRoute = () => { isSwitchingChain || (isAutoExecuteEnabled && commitIntentConfigMutation.isSuccess) // Disable if auto-execute is on and commit was successful - // Effect to cleanup operation statuses and hashes when intent operations are reset - useEffect(() => { - if (!intentOperations) { - setOperationHashes({}) - } - }, [intentOperations]) - // Effect to cleanup when account disconnects useEffect(() => { if (!account.isConnected) { - setOperationHashes({}) - setIntentOperations(null) + setIntentCallsPayloads(null) setIntentPreconditions(null) setMetaTxns(null) setCommittedIntentAddress(null) @@ -1008,12 +1011,12 @@ export const HomeIndexRoute = () => { // Update the sendMetaTxn mutation const sendMetaTxnMutation = useMutation({ mutationFn: async ({ selectedId }: { selectedId: string | null }) => { - if (!intentOperations || !intentPreconditions || !metaTxns || !account.address) { + if (!intentCallsPayloads || !intentPreconditions || !metaTxns || !account.address) { throw new Error('Missing required data for meta-transaction') } try { - const intentAddress = calculateIntentAddress(intentOperations, account.address) + const intentAddress = calculateIntentAddress(account.address, intentCallsPayloads) // If no specific ID is selected, send all meta transactions const txnsToSend = selectedId ? [metaTxns.find((tx) => tx.id === selectedId)] : metaTxns @@ -1272,7 +1275,7 @@ export const HomeIndexRoute = () => { } else { setSelectedToken(token) } - setIntentOperations(null) + setIntentCallsPayloads(null) setIntentPreconditions(null) setMetaTxns(null) setCommittedIntentAddress(null) @@ -1552,7 +1555,7 @@ export const HomeIndexRoute = () => {
)} - {intentOperations && ( + {intentCallsPayloads && (
{ className="mb-2 pb-1 border-b border-gray-700/50 flex items-center" > - Intent Operations + Intent all payloads - (List of operations that are pre-authorized to be executed): + (List of all payloads that are pre-authorized to be executed): - {/* Intent Operations Section */} - {intentOperations && intentOperations.length > 0 ? ( + {/* Intent call payloads Section */} + {intentCallsPayloads && intentCallsPayloads.length > 0 ? (
- {intentOperations.map((operation, index) => ( + {intentCallsPayloads.map((operation, index) => (
- Operation #{index + 1} + Payload #{index + 1}
{operation.calls && @@ -1737,7 +1740,7 @@ export const HomeIndexRoute = () => {
)} - {!createIntentMutation.isPending && !createIntentMutation.isError && !intentOperations && ( + {!createIntentMutation.isPending && !createIntentMutation.isError && !intentCallsPayloads && (
@@ -1748,7 +1751,7 @@ export const HomeIndexRoute = () => {
{/* 4. Commit Intent */} - {intentOperations && intentPreconditions && ( + {intentCallsPayloads && intentPreconditions && (
@@ -1773,11 +1776,11 @@ export const HomeIndexRoute = () => {
)} + {/* Lifi Infos Section */} + {lifiInfos && lifiInfos.length > 0 && ( +
+ + {/* Using Info icon as a placeholder, can be changed */} + Lifi Infos + + (Details from Lifi integration): + + +
+ {/* Raw JSON View */} +
+
+ + + Raw JSON Data + +
+
+                          {JSON.stringify(lifiInfos, null, 2)}
+                        
+
+
+
+ )} + {/* Preconditions Section */} {intentPreconditions && intentPreconditions.length > 0 && ( <> From d72411d62fd2adedb764aa8b425d0464808bb54d Mon Sep 17 00:00:00 2001 From: Shun Kakinoki Date: Tue, 20 May 2025 01:54:53 +0900 Subject: [PATCH 436/439] Add getAnypayLifiInfoHash function to compute a hash for Anypay Lifi information. Implement validation for input parameters and update tests to cover various scenarios, including error handling for empty inputs and zero addresses. --- packages/wallet/core/src/anypay/intents.ts | 44 +++++++++++++++ packages/wallet/core/test/anypay.test.ts | 64 +++++++++++++++++++++- 2 files changed, 107 insertions(+), 1 deletion(-) diff --git a/packages/wallet/core/src/anypay/intents.ts b/packages/wallet/core/src/anypay/intents.ts index b0c35d028..bdacf1a71 100644 --- a/packages/wallet/core/src/anypay/intents.ts +++ b/packages/wallet/core/src/anypay/intents.ts @@ -106,6 +106,50 @@ export function hashIntentParams(params: { return hashHex } +export interface AnypayLifiInfo { + originToken: Address.Address + minAmount: bigint + originChainId: bigint + destinationChainId: bigint +} + +export function getAnypayLifiInfoHash(lifiInfos: AnypayLifiInfo[], attestationAddress: Address.Address): Hex.Hex { + if (!lifiInfos || lifiInfos.length === 0) { + throw new Error('lifiInfos is empty') + } + if (!attestationAddress || attestationAddress === '0x0000000000000000000000000000000000000000') { + throw new Error('attestationAddress is zero') + } + + const anypayLifiInfoComponents = [ + { name: 'originToken', type: 'address' }, + { name: 'minAmount', type: 'uint256' }, + { name: 'originChainId', type: 'uint256' }, + { name: 'destinationChainId', type: 'uint256' }, + ] + + const lifiInfosForAbi = lifiInfos.map((info) => ({ + originToken: info.originToken, + minAmount: info.minAmount, + originChainId: info.originChainId, + destinationChainId: info.destinationChainId, + })) + + const abiSchema = [ + { + type: 'tuple[]', + name: 'lifiInfos', + components: anypayLifiInfoComponents, + }, + { type: 'address', name: 'attestationAddress' }, + ] + + const encodedHex = AbiParameters.encode(abiSchema, [lifiInfosForAbi, attestationAddress]) as Hex.Hex + const encodedBytes = Bytes.fromHex(encodedHex) + const hashBytes = Hash.keccak256(encodedBytes) + return Bytes.toHex(hashBytes) +} + export function calculateIntentConfigurationAddress( mainSigner: Address.Address, calls: IntentCallsPayload[], diff --git a/packages/wallet/core/test/anypay.test.ts b/packages/wallet/core/test/anypay.test.ts index 4881bfad9..cf7fb2a61 100644 --- a/packages/wallet/core/test/anypay.test.ts +++ b/packages/wallet/core/test/anypay.test.ts @@ -13,7 +13,13 @@ import { Erc1155ApprovalPrecondition, } from '../src/preconditions/types' import { CAN_RUN_LIVE, RPC_URL } from './constants' -import { calculateIntentConfigurationAddress, hashIntentParams, IntentCallsPayload } from '../src/anypay/intents' +import { + calculateIntentConfigurationAddress, + hashIntentParams, + IntentCallsPayload, + AnypayLifiInfo, + getAnypayLifiInfoHash, +} from '../src/anypay/intents' const ERC20_IMPLICIT_MINT_CONTRACT = '0x041E0CDC028050519C8e6485B2d9840caf63773F' @@ -848,3 +854,59 @@ describe('HashIntentParams', () => { expect(hash.toLowerCase()).toBe('0x64631a48bc218cd8196dca22437223d90dc9caa8208284cdcea4b7f32bfc7cec') }) }) + +describe('GetAnypayLifiInfoHash', () => { + it('should match hash for single AnypayLifiInfo', () => { + const lifiInfos: AnypayLifiInfo[] = [ + { + originToken: Address.from('0x1111111111111111111111111111111111111111'), + minAmount: 100n, + originChainId: 1n, + destinationChainId: 10n, + }, + ] + const attestationAddress = Address.from('0xaAaAaAaaAaAaAaaAaAAAAAAAAaaaAaAaAaaAaaAa') + + const hash = getAnypayLifiInfoHash(lifiInfos, attestationAddress) + expect(hash.toLowerCase()).toBe('0x21872bd6b64711c4a5aecba95829c612f0b50c63f1a26991c2f76cf4a754aede') + }) + + it('should match hash for multiple AnypayLifiInfo', () => { + const lifiInfos: AnypayLifiInfo[] = [ + { + originToken: Address.from('0x1111111111111111111111111111111111111111'), + minAmount: 100n, + originChainId: 1n, + destinationChainId: 10n, + }, + { + originToken: Address.from('0x2222222222222222222222222222222222222222'), + minAmount: 200n, + originChainId: 137n, + destinationChainId: 42161n, + }, + ] + const attestationAddress = Address.from('0xbBbBBBBbbBBBbbbBbbBbbbbBBbBbbbbBbBbbBBbB') + + const hash = getAnypayLifiInfoHash(lifiInfos, attestationAddress) + expect(hash.toLowerCase()).toBe('0xd18e54455db64ba31b9f9a447e181f83977cb70b136228d64ac85d64a6aefe71') + }) + + it('should error on empty lifiInfos', () => { + const attestationAddress = Address.from('0xaAaAaAaaAaAaAaaAaAAAAAAAAaaaAaAaAaaAaaAa') + expect(() => getAnypayLifiInfoHash([], attestationAddress)).toThrow('lifiInfos is empty') + }) + + it('should error on zero attestationAddress', () => { + const lifiInfos: AnypayLifiInfo[] = [ + { + originToken: Address.from('0x1111111111111111111111111111111111111111'), + minAmount: 100n, + originChainId: 1n, + destinationChainId: 10n, + }, + ] + const attestationAddress = Address.from('0x0000000000000000000000000000000000000000') + expect(() => getAnypayLifiInfoHash(lifiInfos, attestationAddress)).toThrow('attestationAddress is zero') + }) +}) From 90a801c0184eea939b4ac31faf0b9cf3bf913e99 Mon Sep 17 00:00:00 2001 From: Shun Kakinoki Date: Tue, 20 May 2025 03:26:08 +0900 Subject: [PATCH 437/439] Refactor calculateIntentConfigurationAddress to include optional lifiInfos and attestationSigner parameters. Update HomeIndexRoute and tests to accommodate changes, ensuring proper handling of undefined values and enhancing intent configuration logic. --- .../src/routes/home/home-index-route.tsx | 2 +- packages/wallet/core/src/anypay/intents.ts | 73 ++++++----- packages/wallet/core/test/anypay.test.ts | 114 +++++++++++++++++- 3 files changed, 154 insertions(+), 35 deletions(-) diff --git a/extras/demo-anypay/src/routes/home/home-index-route.tsx b/extras/demo-anypay/src/routes/home/home-index-route.tsx index d6bbc8d8a..282afb769 100644 --- a/extras/demo-anypay/src/routes/home/home-index-route.tsx +++ b/extras/demo-anypay/src/routes/home/home-index-route.tsx @@ -220,7 +220,7 @@ export const HomeIndexRoute = () => { })), })) - return AnyPay.calculateIntentConfigurationAddress(Address.from(mainSigner), coreCalls, context) + return AnyPay.calculateIntentConfigurationAddress(Address.from(mainSigner), coreCalls, undefined, context) } catch (error) { console.error('Error calculating intent address:', error) throw error diff --git a/packages/wallet/core/src/anypay/intents.ts b/packages/wallet/core/src/anypay/intents.ts index bdacf1a71..1f1e34801 100644 --- a/packages/wallet/core/src/anypay/intents.ts +++ b/packages/wallet/core/src/anypay/intents.ts @@ -153,10 +153,11 @@ export function getAnypayLifiInfoHash(lifiInfos: AnypayLifiInfo[], attestationAd export function calculateIntentConfigurationAddress( mainSigner: Address.Address, calls: IntentCallsPayload[], + lifiInfos: AnypayLifiInfo[] | undefined, context: Context.Context, + attestationSigner?: Address.Address, ): Address.Address { - // Create the intent configuration - const config = createIntentConfiguration(mainSigner, calls) + const config = createIntentConfiguration(mainSigner, calls, lifiInfos, attestationSigner) // Calculate the image hash of the configuration const imageHash = Config.hashConfiguration(config) @@ -172,58 +173,74 @@ export function calculateIntentConfigurationAddress( }) } -function createIntentConfiguration(mainSigner: Address.Address, calls: IntentCallsPayload[]): Config.Config { - // Create the main signer leaf +function createIntentConfiguration( + mainSigner: Address.Address, + calls: IntentCallsPayload[], + lifiInfos?: AnypayLifiInfo[], + attestationSigner?: Address.Address, +): Config.Config { const mainSignerLeaf: Config.SignerLeaf = { type: 'signer', address: mainSigner, weight: 1n, } - // Create subdigest leaves for each operation - const subdigestLeaves = calls.map((call) => { - // Get the digest hash using Payload.hash + const subdigestLeaves: Config.AnyAddressSubdigestLeaf[] = calls.map((call) => { const digest = Payload.hash(Address.from('0x0000000000000000000000000000000000000000'), call.chainId, call) console.log('digest:', Bytes.toHex(digest)) - - // Create subdigest leaf return { type: 'any-address-subdigest', digest: Bytes.toHex(digest), } as Config.AnyAddressSubdigestLeaf }) - // If there's only one operation, use its subdigest leaf directly - if (subdigestLeaves.length === 1) { - return { - threshold: 1n, - checkpoint: 0n, - topology: [mainSignerLeaf, subdigestLeaves[0]!] as Config.Topology, + let otherLeaves: Config.Topology[] = [...subdigestLeaves] + + if (lifiInfos && lifiInfos.length > 0) { + if (attestationSigner && attestationSigner !== '0x0000000000000000000000000000000000000000') { + const lifiConditionLeaf: Config.SapientSignerLeaf = { + type: 'sapient-signer', + address: '0x0000000000000000000000000000000000000000', + weight: 1n, + imageHash: getAnypayLifiInfoHash(lifiInfos, attestationSigner), + } + otherLeaves.push(lifiConditionLeaf) } } - // Otherwise, create a tree of subdigest leaves - const subdigestTree = createSubdigestTree(subdigestLeaves) + if (otherLeaves.length === 0) { + throw new Error('Intent configuration must have at least one call or LiFi information.') + } + + let secondaryTopologyNode: Config.Topology + + if (otherLeaves.length === 1) { + secondaryTopologyNode = otherLeaves[0]! + } else { + secondaryTopologyNode = buildMerkleTreeFromMembers(otherLeaves) + } return { threshold: 1n, checkpoint: 0n, - topology: [mainSignerLeaf, subdigestTree] as Config.Topology, + topology: [mainSignerLeaf, secondaryTopologyNode] as Config.Node, } } -function createSubdigestTree(leaves: Config.AnyAddressSubdigestLeaf[]): Config.Topology { - if (leaves.length === 0) { - throw new Error('Cannot create a tree from empty leaves') +// Renamed and generalized from createSubdigestTree +function buildMerkleTreeFromMembers(members: Config.Topology[]): Config.Topology { + if (members.length === 0) { + throw new Error('Cannot create a tree from empty members') } - - if (leaves.length === 1) { - return leaves[0]! + if (members.length === 1) { + return members[0]! // Returns a single Leaf or a Node } - const mid = Math.floor(leaves.length / 2) - const left = createSubdigestTree(leaves.slice(0, mid)) - const right = createSubdigestTree(leaves.slice(mid)) + const mid = Math.floor(members.length / 2) + // Recursive calls return Topology + const leftSubBranch = buildMerkleTreeFromMembers(members.slice(0, mid)) + const rightSubBranch = buildMerkleTreeFromMembers(members.slice(mid)) - return [left, right] + // Combine two Topology branches into a Node (which is also Topology) + return [leftSubBranch, rightSubBranch] as Config.Node } diff --git a/packages/wallet/core/test/anypay.test.ts b/packages/wallet/core/test/anypay.test.ts index cf7fb2a61..51e25e8dd 100644 --- a/packages/wallet/core/test/anypay.test.ts +++ b/packages/wallet/core/test/anypay.test.ts @@ -348,7 +348,7 @@ describe('AnyPay Preconditions', () => { } // Calculate intent configuration address - const configAddress = calculateIntentConfigurationAddress(testWalletAddress, [payload], context) + const configAddress = calculateIntentConfigurationAddress(testWalletAddress, [payload], undefined, context) // Start the relay operation with a short check interval const relayPromise = relayer.relay( @@ -491,7 +491,7 @@ describe('AnyPay Preconditions', () => { } // Calculate intent configuration address - const configAddress = calculateIntentConfigurationAddress(testWalletAddress, [payload], context) + const configAddress = calculateIntentConfigurationAddress(testWalletAddress, [payload], undefined, context) expect(configAddress).toBeDefined() expect(configAddress).not.toBe(testWalletAddress) @@ -568,7 +568,7 @@ describe('AnyPay Preconditions', () => { } // Calculate intent configuration address - const configAddress = calculateIntentConfigurationAddress(testWalletAddress, [payload], context) + const configAddress = calculateIntentConfigurationAddress(testWalletAddress, [payload], undefined, context) // Mock the provider responses if (!CAN_RUN_LIVE) { @@ -602,6 +602,108 @@ describe('AnyPay Preconditions', () => { } }) +describe('Intent Configuration Address with LifiInfo', () => { + const testContext: Context.Context = { + factory: Address.from('0x0000000000000000000000000000000000000000'), + stage1: '0x0000000000000000000000000000000000000000' as Hex.Hex, // MainModuleAddress + stage2: '0x0000000000000000000000000000000000000000' as Hex.Hex, // guestModule + creationCode: + '0x603e600e3d39601e805130553df33d3d34601c57363d3d373d363d30545af43d82803e903d91601c57fd5bf3' as Hex.Hex, + } + + const mainSigner = Address.from('0x1111111111111111111111111111111111111111') + const attestationSigner = Address.from('0x2222222222222222222222222222222222222222') + + const lifiInfos: AnypayLifiInfo[] = [ + { + originToken: Address.from('0x1111111111111111111111111111111111111111'), + minAmount: 100n, + originChainId: 1n, + destinationChainId: 10n, + }, + ] + + it('should calculate address for single operation with lifiInfo', () => { + const payload: IntentCallsPayload = { + chainId: 1n, + type: 'call', + space: 0n, + nonce: 0n, + calls: [ + { + to: Address.from('0x0000000000000000000000000000000000000000'), + value: 0n, + data: '0x1234' as Hex.Hex, + gasLimit: 0n, + delegateCall: false, + onlyFallback: false, + behaviorOnError: 'revert' as const, + }, + ], + } + + const address = calculateIntentConfigurationAddress( + mainSigner, + [payload], + lifiInfos, + testContext, + attestationSigner, + ) + + console.log('Single Operation with LifiInfo Test Address:', address) + expect(isAddressEqual(address, '0x2627C2b5c0a257f7595C51726A8330035F23a307')).toBe(true) + }) + + it('should calculate address for multiple operations with lifiInfo', () => { + const payload1: IntentCallsPayload = { + chainId: 1n, + type: 'call', + space: 0n, + nonce: 0n, + calls: [ + { + to: Address.from('0x0000000000000000000000000000000000000000'), + value: 0n, + data: '0x1234' as Hex.Hex, + gasLimit: 0n, + delegateCall: false, + onlyFallback: false, + behaviorOnError: 'revert' as const, + }, + ], + } + + const payload2: IntentCallsPayload = { + chainId: 1n, + type: 'call', + space: 0n, + nonce: 0n, + calls: [ + { + to: Address.from('0x0000000000000000000000000000000000000000'), + value: 0n, + data: '0x5678' as Hex.Hex, + gasLimit: 0n, + delegateCall: false, + onlyFallback: false, + behaviorOnError: 'revert' as const, + }, + ], + } + + const address = calculateIntentConfigurationAddress( + mainSigner, + [payload1, payload2], + lifiInfos, + testContext, + attestationSigner, + ) + + console.log('Multiple Operations with LifiInfo Test Address:', address) + expect(isAddressEqual(address, '0xe94A6831e46f6FB75E6d53E632B28155846908B3')).toBe(true) + }) +}) + describe('Intent Configuration Address', () => { it('should calculate address for single operation', () => { // Create context matching Go test @@ -636,7 +738,7 @@ describe('Intent Configuration Address', () => { } // Calculate intent configuration address - const address = calculateIntentConfigurationAddress(mainSigner, [payload], context) + const address = calculateIntentConfigurationAddress(mainSigner, [payload], undefined, context) console.log('address', address) @@ -695,7 +797,7 @@ describe('Intent Configuration Address', () => { } // Calculate intent configuration address - const address = calculateIntentConfigurationAddress(mainSigner, [payload1, payload2], context) + const address = calculateIntentConfigurationAddress(mainSigner, [payload1, payload2], undefined, context) console.log('address', address) @@ -754,7 +856,7 @@ describe('Intent Configuration Address', () => { } // Calculate intent configuration address - const address = calculateIntentConfigurationAddress(mainSigner, [arbitrumPayload, basePayload], context) + const address = calculateIntentConfigurationAddress(mainSigner, [arbitrumPayload, basePayload], undefined, context) // Log the address console.log('address', address) From 81a158de54860ade95952ecf388931451276c5c0 Mon Sep 17 00:00:00 2001 From: Shun Kakinoki Date: Tue, 20 May 2025 03:31:21 +0900 Subject: [PATCH 438/439] Refactor buildMerkleTreeFromMembers function to use an iterative approach for constructing the Merkle tree. This change improves performance and readability by eliminating recursion, while maintaining the same functionality for handling topology members. --- packages/wallet/core/src/anypay/intents.ts | 23 +++++++++++++++------- 1 file changed, 16 insertions(+), 7 deletions(-) diff --git a/packages/wallet/core/src/anypay/intents.ts b/packages/wallet/core/src/anypay/intents.ts index 1f1e34801..056b97f2d 100644 --- a/packages/wallet/core/src/anypay/intents.ts +++ b/packages/wallet/core/src/anypay/intents.ts @@ -236,11 +236,20 @@ function buildMerkleTreeFromMembers(members: Config.Topology[]): Config.Topology return members[0]! // Returns a single Leaf or a Node } - const mid = Math.floor(members.length / 2) - // Recursive calls return Topology - const leftSubBranch = buildMerkleTreeFromMembers(members.slice(0, mid)) - const rightSubBranch = buildMerkleTreeFromMembers(members.slice(mid)) - - // Combine two Topology branches into a Node (which is also Topology) - return [leftSubBranch, rightSubBranch] as Config.Node + let currentLevel = [...members] + while (currentLevel.length > 1) { + const nextLevel: Config.Topology[] = [] + for (let i = 0; i < currentLevel.length; i += 2) { + const left = currentLevel[i]! + if (i + 1 < currentLevel.length) { + const right = currentLevel[i + 1]! + nextLevel.push([left, right] as Config.Node) + } else { + // Odd one out, carries over to the next level + nextLevel.push(left) + } + } + currentLevel = nextLevel + } + return currentLevel[0]! } From c30a39b60901627b305e014b4c003352462135de Mon Sep 17 00:00:00 2001 From: Shun Kakinoki Date: Tue, 20 May 2025 16:46:54 +0900 Subject: [PATCH 439/439] Enhance calculateIntentAddress function in HomeIndexRoute to accept lifiInfos as an argument, improving intent configuration logic. Update related calls and logging to ensure proper handling of Lifi information throughout the component. --- .../src/routes/home/home-index-route.tsx | 122 +++++++++++------- 1 file changed, 73 insertions(+), 49 deletions(-) diff --git a/extras/demo-anypay/src/routes/home/home-index-route.tsx b/extras/demo-anypay/src/routes/home/home-index-route.tsx index 282afb769..d00f770ab 100644 --- a/extras/demo-anypay/src/routes/home/home-index-route.tsx +++ b/extras/demo-anypay/src/routes/home/home-index-route.tsx @@ -7,6 +7,7 @@ import { IntentCallsPayload, IntentPrecondition, GetIntentConfigReturn, + AnypayLifiInfo, } from '@0xsequence/api' import { formatUnits, Hex, isAddressEqual, zeroAddress } from 'viem' import { useQuery, useMutation } from '@tanstack/react-query' @@ -186,46 +187,63 @@ export const HomeIndexRoute = () => { : undefined, ) - const calculateIntentAddress = useCallback((mainSigner: string, calls: IntentCallsPayload[]) => { - try { - console.log('Calculating intent address...') - console.log('Main signer:', mainSigner) - console.log('Calls:', JSON.stringify(calls, null, 2)) - - const context: ContextLike.Context = { - factory: '0xBd0F8abD58B4449B39C57Ac9D5C67433239aC447' as `0x${string}`, - stage1: '0x53bA242E7C2501839DF2972c75075dc693176Cd0' as `0x${string}`, - stage2: '0xa29874c88b8Fd557e42219B04b0CeC693e1712f5' as `0x${string}`, - creationCode: - '0x603e600e3d39601e805130553df33d3d34601c57363d3d373d363d30545af43d82803e903d91601c57fd5bf3' as `0x${string}`, - } + const calculateIntentAddress = useCallback( + (mainSigner: string, calls: IntentCallsPayload[], lifiInfosArg: AnypayLifiInfo[] | null | undefined) => { + try { + console.log('Calculating intent address...') + console.log('Main signer:', mainSigner) + console.log('Calls:', JSON.stringify(calls, null, 2)) + console.log('LifiInfos (API type from arg):', JSON.stringify(lifiInfosArg, null, 2)) + + const context: ContextLike.Context = { + factory: '0xBd0F8abD58B4449B39C57Ac9D5C67433239aC447' as `0x${string}`, + stage1: '0x53bA242E7C2501839DF2972c75075dc693176Cd0' as `0x${string}`, + stage2: '0xa29874c88b8Fd557e42219B04b0CeC693e1712f5' as `0x${string}`, + creationCode: + '0x603e600e3d39601e805130553df33d3d34601c57363d3d373d363d30545af43d82803e903d91601c57fd5bf3' as `0x${string}`, + } - const coreCalls = calls.map((call) => ({ - type: 'call' as const, - chainId: BigInt(call.chainId), - space: call.space ? BigInt(call.space) : 0n, - nonce: call.nonce ? BigInt(call.nonce) : 0n, - calls: call.calls.map((call) => ({ - to: Address.from(call.to), - value: BigInt(call.value || '0'), - data: Bytes.toHex(Bytes.from((call.data as Hex) || '0x')), - gasLimit: BigInt(call.gasLimit || '0'), - delegateCall: !!call.delegateCall, - onlyFallback: !!call.onlyFallback, - behaviorOnError: (Number(call.behaviorOnError) === 0 - ? 'ignore' - : Number(call.behaviorOnError) === 1 - ? 'revert' - : 'abort') as 'ignore' | 'revert' | 'abort', - })), - })) - - return AnyPay.calculateIntentConfigurationAddress(Address.from(mainSigner), coreCalls, undefined, context) - } catch (error) { - console.error('Error calculating intent address:', error) - throw error - } - }, []) + const coreCalls = calls.map((call) => ({ + type: 'call' as const, + chainId: BigInt(call.chainId), + space: call.space ? BigInt(call.space) : 0n, + nonce: call.nonce ? BigInt(call.nonce) : 0n, + calls: call.calls.map((call) => ({ + to: Address.from(call.to), + value: BigInt(call.value || '0'), + data: Bytes.toHex(Bytes.from((call.data as Hex) || '0x')), + gasLimit: BigInt(call.gasLimit || '0'), + delegateCall: !!call.delegateCall, + onlyFallback: !!call.onlyFallback, + behaviorOnError: (Number(call.behaviorOnError) === 0 + ? 'ignore' + : Number(call.behaviorOnError) === 1 + ? 'revert' + : 'abort') as 'ignore' | 'revert' | 'abort', + })), + })) + + const coreLifiInfos = lifiInfosArg?.map((info: AnypayLifiInfo) => ({ + originToken: Address.from(info.originToken), + minAmount: BigInt(info.minAmount), + originChainId: BigInt(info.originChainId), + destinationChainId: BigInt(info.destinationChainId), + })) + console.log('LifiInfos (Core type, mapped):', JSON.stringify(coreLifiInfos, null, 2)) + + return AnyPay.calculateIntentConfigurationAddress( + Address.from(mainSigner), + coreCalls, + coreLifiInfos, // Pass the mapped array + context, + ) + } catch (error) { + console.error('Error calculating intent address:', error) + throw error + } + }, + [], + ) const updateOriginCallStatus = ( hash: Hex | undefined, @@ -297,7 +315,7 @@ export const HomeIndexRoute = () => { mainSigner: string calls: IntentCallsPayload[] preconditions: IntentPrecondition[] - lifiInfos: GetIntentCallsPayloadsReturn['lifiInfos'] + lifiInfos: AnypayLifiInfo[] }) => { if (!apiClient) throw new Error('API client not available') if (!account.address) throw new Error('Account address not available') @@ -308,7 +326,7 @@ export const HomeIndexRoute = () => { console.log('Main signer:', args.mainSigner) console.log('Calls:', args.calls) - const calculatedAddress = calculateIntentAddress(args.mainSigner, args.calls) + const calculatedAddress = calculateIntentAddress(args.mainSigner, args.calls, args.lifiInfos) const receivedAddress = findPreconditionAddress(args.preconditions) console.log('Calculated address:', calculatedAddress.toString()) @@ -339,7 +357,7 @@ export const HomeIndexRoute = () => { console.error('Error during commit intent mutation:', error) if (!verificationStatus?.success && !verificationStatus?.receivedAddress) { try { - const calculatedAddress = calculateIntentAddress(args.mainSigner, args.calls) + const calculatedAddress = calculateIntentAddress(args.mainSigner, args.calls, args.lifiInfos) const receivedAddress = findPreconditionAddress(args.preconditions) setVerificationStatus({ success: false, @@ -866,7 +884,7 @@ export const HomeIndexRoute = () => { } try { - const intentAddress = calculateIntentAddress(account.address, intentCallsPayloads) + const intentAddress = calculateIntentAddress(account.address, intentCallsPayloads, lifiInfos) const intentAddressString = intentAddress.toString() as Address.Address let calcTo: Address.Address @@ -918,7 +936,7 @@ export const HomeIndexRoute = () => { console.error('Failed to calculate origin call params for UI:', error) setOriginCallParams({ to: null, data: null, value: null, chainId: null, error: error.message }) } - }, [intentCallsPayloads, selectedToken, intentPreconditions, account.address, calculateIntentAddress]) + }, [intentCallsPayloads, selectedToken, intentPreconditions, account.address, calculateIntentAddress, lifiInfos]) useEffect(() => { // Auto-execute effect for handling chain switch and transaction @@ -945,7 +963,7 @@ export const HomeIndexRoute = () => { ) { console.log('Auto-committing intent configuration...') commitIntentConfigMutation.mutate({ - walletAddress: calculateIntentAddress(account.address, intentCallsPayloads).toString(), + walletAddress: calculateIntentAddress(account.address, intentCallsPayloads, lifiInfos).toString(), mainSigner: account.address, calls: intentCallsPayloads, preconditions: intentPreconditions, @@ -1033,12 +1051,12 @@ export const HomeIndexRoute = () => { // Update the sendMetaTxn mutation const sendMetaTxnMutation = useMutation({ mutationFn: async ({ selectedId }: { selectedId: string | null }) => { - if (!intentCallsPayloads || !intentPreconditions || !metaTxns || !account.address) { + if (!intentCallsPayloads || !intentPreconditions || !metaTxns || !account.address || !lifiInfos) { throw new Error('Missing required data for meta-transaction') } try { - const intentAddress = calculateIntentAddress(account.address, intentCallsPayloads) + const intentAddress = calculateIntentAddress(account.address, intentCallsPayloads, lifiInfos) // If no specific ID is selected, send all meta transactions const txnsToSend = selectedId ? [metaTxns.find((tx) => tx.id === selectedId)] : metaTxns @@ -1855,7 +1873,11 @@ export const HomeIndexRoute = () => { onClick={() => { if (!account.address || !intentCallsPayloads || !intentPreconditions || !lifiInfos) return commitIntentConfigMutation.mutate({ - walletAddress: calculateIntentAddress(account.address, intentCallsPayloads).toString(), + walletAddress: calculateIntentAddress( + account.address, + intentCallsPayloads, + lifiInfos, + ).toString(), mainSigner: account.address, calls: intentCallsPayloads, preconditions: intentPreconditions, @@ -2052,7 +2074,9 @@ export const HomeIndexRoute = () => { <>
- Calculated Address: + + Calculated Intent Address (used as recipient for origin call):{' '} + {originCallParams?.to?.toString() || 'N/A'}