Compare commits

..
Author SHA1 Message Date
Jonas DanielsGitHubgithub-actions[bot] <github-actions[bot]@users.noreply.github.com>GitHub Action
fa4db2233c Version Packages (#3367)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: GitHub Action <[email protected]>
2024-06-18 13:03:53 +12:00
dependabot c13ffc5f8b build(deps-dev): bump eslint-plugin-tsdoc from 0.2.17 to 0.3.0 (#3359)
[//]: # (dependabot-start)
⚠️  **Dependabot is rebasing this PR** ⚠️

Rebasing might not happen immediately, so don't worry if this takes some time.

Note: if you make any changes to this PR yourself, they will take precedence over the rebase.

---

[//]: # (dependabot-end)

Bumps [eslint-plugin-tsdoc](https://github.com/microsoft/tsdoc/tree/HEAD/eslint-plugin) from 0.2.17 to 0.3.0.
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a href="https://github.com/microsoft/tsdoc/blob/main/eslint-plugin/CHANGELOG.md">eslint-plugin-tsdoc's changelog</a>.</em></p>
<blockquote>
<h2>0.3.0</h2>
<p>Tue, 28 May 2024 21:34:19 GMT</p>
<h3>Minor changes</h3>
<ul>
<li>Minor package cleanup.</li>
</ul>
<h3>Patches</h3>
<ul>
<li>Upgrade dev toolchain (Heft, Webpack, TypeScript, ESLint)</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li>See full diff in <a href="https://github.com/microsoft/tsdoc/commits/eslint-plugin-tsdoc_v0.3.0/eslint-plugin">compare view</a></li>
</ul>
</details>
<br />

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=eslint-plugin-tsdoc&package-manager=npm_and_yarn&previous-version=0.2.17&new-version=0.3.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

</details>

<!-- start pr-codex -->

---

## PR-Codex overview
The focus of this PR is to update the `eslint-plugin-tsdoc` dependency across multiple packages to version `0.3.0`.

### Detailed summary
- Updated `eslint-plugin-tsdoc` to version `0.3.0` in multiple package.json files
- Updated `eslint-plugin-tsdoc` to version `0.3.0` in pnpm-lock.yaml

> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}`

<!-- end pr-codex -->
2024-06-18 00:30:03 +00:00
dependabot b5394b5471 build(deps-dev): bump @babel/plugin-transform-private-methods from 7.24.1 to 7.24.7 (#3361)
Bumps [@babel/plugin-transform-private-methods](https://github.com/babel/babel/tree/HEAD/packages/babel-plugin-transform-private-methods) from 7.24.1 to 7.24.7.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a href="https://github.com/babel/babel/releases"><code>@​babel/plugin-transform-private-methods</code>'s releases</a>.</em></p>
<blockquote>
<h2>v7.24.7 (2024-06-05)</h2>
<h4>🐛 Bug Fix</h4>
<ul>
<li><code>babel-node</code>
<ul>
<li><a href="https://redirect.github.com/babel/babel/pull/16554">#16554</a> Allow extra flags in babel-node (<a href="https://github.com/nicolo-ribaudo"><code>@​nicolo-ribaudo</code></a>)</li>
</ul>
</li>
<li><code>babel-traverse</code>
<ul>
<li><a href="https://redirect.github.com/babel/babel/pull/16522">#16522</a> fix: incorrect <code>constantViolations</code> with destructuring (<a href="https://github.com/liuxingbaoyu"><code>@​liuxingbaoyu</code></a>)</li>
</ul>
</li>
<li><code>babel-helper-transform-fixture-test-runner</code>, <code>babel-plugin-proposal-explicit-resource-management</code>
<ul>
<li><a href="https://redirect.github.com/babel/babel/pull/16524">#16524</a> fix: Transform <code>using</code> in <code>switch</code> correctly (<a href="https://github.com/liuxingbaoyu"><code>@​liuxingbaoyu</code></a>)</li>
</ul>
</li>
</ul>
<h4>🏠 Internal</h4>
<ul>
<li><code>babel-helpers</code>, <code>babel-runtime-corejs2</code>, <code>babel-runtime-corejs3</code>, <code>babel-runtime</code>
<ul>
<li><a href="https://redirect.github.com/babel/babel/pull/16525">#16525</a> Delete unused array helpers (<a href="https://github.com/blakewilson"><code>@​blakewilson</code></a>)</li>
</ul>
</li>
</ul>
<h4>Committers: 7</h4>
<ul>
<li>Amjad Yahia Robeen Hassan (<a href="https://github.com/amjed-98"><code>@​amjed-98</code></a>)</li>
<li>Babel Bot (<a href="https://github.com/babel-bot"><code>@​babel-bot</code></a>)</li>
<li>Blake Wilson (<a href="https://github.com/blakewilson"><code>@​blakewilson</code></a>)</li>
<li>Huáng Jùnliàng (<a href="https://github.com/JLHwung"><code>@​JLHwung</code></a>)</li>
<li>Nicolò Ribaudo (<a href="https://github.com/nicolo-ribaudo"><code>@​nicolo-ribaudo</code></a>)</li>
<li>Sukka (<a href="https://github.com/SukkaW"><code>@​SukkaW</code></a>)</li>
<li><a href="https://github.com/liuxingbaoyu"><code>@​liuxingbaoyu</code></a></li>
</ul>
<h2>v7.24.6 (2024-05-24)</h2>
<p>Thanks <a href="https://github.com/amjed-98"><code>@​amjed-98</code></a>, <a href="https://github.com/blakewilson"><code>@​blakewilson</code></a>, <a href="https://github.com/coelhucas"><code>@​coelhucas</code></a>, and <a href="https://github.com/SukkaW"><code>@​SukkaW</code></a> for your first PRs!</p>
<h4>🐛 Bug Fix</h4>
<ul>
<li><code>babel-helper-create-class-features-plugin</code>, <code>babel-plugin-transform-class-properties</code>
<ul>
<li><a href="https://redirect.github.com/babel/babel/pull/16514">#16514</a> Fix source maps for private member expressions (<a href="https://github.com/nicolo-ribaudo"><code>@​nicolo-ribaudo</code></a>)</li>
</ul>
</li>
<li><code>babel-core</code>, <code>babel-generator</code>, <code>babel-plugin-transform-modules-commonjs</code>
<ul>
<li><a href="https://redirect.github.com/babel/babel/pull/16515">#16515</a> Fix source maps for template literals (<a href="https://github.com/nicolo-ribaudo"><code>@​nicolo-ribaudo</code></a>)</li>
</ul>
</li>
<li><code>babel-helper-create-class-features-plugin</code>, <code>babel-plugin-proposal-decorators</code>
<ul>
<li><a href="https://redirect.github.com/babel/babel/pull/16485">#16485</a> Support undecorated static accessor in anonymous classes (<a href="https://github.com/JLHwung"><code>@​JLHwung</code></a>)</li>
<li><a href="https://redirect.github.com/babel/babel/pull/16484">#16484</a> Fix decorator bare yield await (<a href="https://github.com/JLHwung"><code>@​JLHwung</code></a>)</li>
</ul>
</li>
<li><code>babel-helpers</code>, <code>babel-plugin-proposal-decorators</code>, <code>babel-runtime-corejs3</code>
<ul>
<li><a href="https://redirect.github.com/babel/babel/pull/16483">#16483</a> Fix: throw TypeError if addInitializer is called after finished (<a href="https://github.com/JLHwung"><code>@​JLHwung</code></a>)</li>
</ul>
</li>
<li><code>babel-parser</code>, <code>babel-plugin-transform-typescript</code>
<ul>
<li><a href="https://redirect.github.com/babel/babel/pull/16476">#16476</a> fix: Correctly parse <code>cls.fn&lt;C&gt; = x</code> (<a href="https://github.com/liuxingbaoyu"><code>@​liuxingbaoyu</code></a>)</li>
</ul>
</li>
</ul>
<h4>🏠 Internal</h4>
<ul>
<li><code>babel-core</code>, <code>babel-helpers</code>, <code>babel-plugin-transform-runtime</code>, <code>babel-preset-env</code>, <code>babel-runtime-corejs2</code>, <code>babel-runtime-corejs3</code>, <code>babel-runtime</code>
<ul>
<li><a href="https://redirect.github.com/babel/babel/pull/16501">#16501</a> Generate helper metadata at build time (<a href="https://github.com/nicolo-ribaudo"><code>@​nicolo-ribaudo</code></a>)</li>
</ul>
</li>
<li><code>babel-helpers</code>
<ul>
<li><a href="https://redirect.github.com/babel/babel/pull/16499">#16499</a> Add <code>tsconfig.json</code> for <code>@babel/helpers/src/helpers</code> (<a href="https://github.com/nicolo-ribaudo"><code>@​nicolo-ribaudo</code></a>)</li>
</ul>
</li>
<li><code>babel-cli</code>, <code>babel-helpers</code>, <code>babel-plugin-external-helpers</code>, <code>babel-plugin-proposal-decorators</code>, <code>babel-plugin-transform-class-properties</code>, <code>babel-plugin-transform-modules-commonjs</code>, <code>babel-plugin-transform-modules-systemjs</code>, <code>babel-plugin-transform-runtime</code>, <code>babel-preset-env</code>, <code>babel-runtime-corejs2</code>, <code>babel-runtime-corejs3</code>, <code>babel-runtime</code>
<ul>
<li><a href="https://redirect.github.com/babel/babel/pull/16495">#16495</a> Move all runtime helpers to individual files (<a href="https://github.com/nicolo-ribaudo"><code>@​nicolo-ribaudo</code></a>)</li>
</ul>
</li>
<li><code>babel-parser</code>, <code>babel-traverse</code>
<ul>
<li><a href="https://redirect.github.com/babel/babel/pull/16482">#16482</a> Statically generate boilerplate for bitfield accessors (<a href="https://github.com/nicolo-ribaudo"><code>@​nicolo-ribaudo</code></a>)</li>
</ul>
</li>
<li>Other</li>
</ul>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a href="https://github.com/babel/babel/blob/main/CHANGELOG.md"><code>@​babel/plugin-transform-private-methods</code>'s changelog</a>.</em></p>
<blockquote>
<h2>v7.24.7 (2024-06-05)</h2>
<h4>🐛 Bug Fix</h4>
<ul>
<li><code>babel-node</code>
<ul>
<li><a href="https://redirect.github.com/babel/babel/pull/16554">#16554</a> Allow extra flags in babel-node (<a href="https://github.com/nicolo-ribaudo"><code>@​nicolo-ribaudo</code></a>)</li>
</ul>
</li>
<li><code>babel-traverse</code>
<ul>
<li><a href="https://redirect.github.com/babel/babel/pull/16522">#16522</a> fix: incorrect <code>constantViolations</code> with destructuring (<a href="https://github.com/liuxingbaoyu"><code>@​liuxingbaoyu</code></a>)</li>
</ul>
</li>
<li><code>babel-helper-transform-fixture-test-runner</code>, <code>babel-plugin-proposal-explicit-resource-management</code>
<ul>
<li><a href="https://redirect.github.com/babel/babel/pull/16524">#16524</a> fix: Transform <code>using</code> in <code>switch</code> correctly (<a href="https://github.com/liuxingbaoyu"><code>@​liuxingbaoyu</code></a>)</li>
</ul>
</li>
</ul>
<h4>🏠 Internal</h4>
<ul>
<li><code>babel-helpers</code>, <code>babel-runtime-corejs2</code>, <code>babel-runtime-corejs3</code>, <code>babel-runtime</code>
<ul>
<li><a href="https://redirect.github.com/babel/babel/pull/16525">#16525</a> Delete unused array helpers (<a href="https://github.com/blakewilson"><code>@​blakewilson</code></a>)</li>
</ul>
</li>
</ul>
<h2>v7.24.6 (2024-05-24)</h2>
<h4>🐛 Bug Fix</h4>
<ul>
<li><code>babel-helper-create-class-features-plugin</code>, <code>babel-plugin-transform-class-properties</code>
<ul>
<li><a href="https://redirect.github.com/babel/babel/pull/16514">#16514</a> Fix source maps for private member expressions (<a href="https://github.com/nicolo-ribaudo"><code>@​nicolo-ribaudo</code></a>)</li>
</ul>
</li>
<li><code>babel-core</code>, <code>babel-generator</code>, <code>babel-plugin-transform-modules-commonjs</code>
<ul>
<li><a href="https://redirect.github.com/babel/babel/pull/16515">#16515</a> Fix source maps for template literals (<a href="https://github.com/nicolo-ribaudo"><code>@​nicolo-ribaudo</code></a>)</li>
</ul>
</li>
<li><code>babel-helper-create-class-features-plugin</code>, <code>babel-plugin-proposal-decorators</code>
<ul>
<li><a href="https://redirect.github.com/babel/babel/pull/16485">#16485</a> Support undecorated static accessor in anonymous classes (<a href="https://github.com/JLHwung"><code>@​JLHwung</code></a>)</li>
<li><a href="https://redirect.github.com/babel/babel/pull/16484">#16484</a> Fix decorator bare yield await (<a href="https://github.com/JLHwung"><code>@​JLHwung</code></a>)</li>
</ul>
</li>
<li><code>babel-helpers</code>, <code>babel-plugin-proposal-decorators</code>, <code>babel-runtime-corejs3</code>
<ul>
<li><a href="https://redirect.github.com/babel/babel/pull/16483">#16483</a> Fix: throw TypeError if addInitializer is called after finished (<a href="https://github.com/JLHwung"><code>@​JLHwung</code></a>)</li>
</ul>
</li>
<li><code>babel-parser</code>, <code>babel-plugin-transform-typescript</code>
<ul>
<li><a href="https://redirect.github.com/babel/babel/pull/16476">#16476</a> fix: Correctly parse <code>cls.fn&lt;C&gt; = x</code> (<a href="https://github.com/liuxingbaoyu"><code>@​liuxingbaoyu</code></a>)</li>
</ul>
</li>
</ul>
<h4>🏠 Internal</h4>
<ul>
<li><code>babel-core</code>, <code>babel-helpers</code>, <code>babel-plugin-transform-runtime</code>, <code>babel-preset-env</code>, <code>babel-runtime-corejs2</code>, <code>babel-runtime-corejs3</code>, <code>babel-runtime</code>
<ul>
<li><a href="https://redirect.github.com/babel/babel/pull/16501">#16501</a> Generate helper metadata at build time (<a href="https://github.com/nicolo-ribaudo"><code>@​nicolo-ribaudo</code></a>)</li>
</ul>
</li>
<li><code>babel-helpers</code>
<ul>
<li><a href="https://redirect.github.com/babel/babel/pull/16499">#16499</a> Add <code>tsconfig.json</code> for <code>@babel/helpers/src/helpers</code> (<a href="https://github.com/nicolo-ribaudo"><code>@​nicolo-ribaudo</code></a>)</li>
</ul>
</li>
<li><code>babel-cli</code>, <code>babel-helpers</code>, <code>babel-plugin-external-helpers</code>, <code>babel-plugin-proposal-decorators</code>, <code>babel-plugin-transform-class-properties</code>, <code>babel-plugin-transform-modules-commonjs</code>, <code>babel-plugin-transform-modules-systemjs</code>, <code>babel-plugin-transform-runtime</code>, <code>babel-preset-env</code>, <code>babel-runtime-corejs2</code>, <code>babel-runtime-corejs3</code>, <code>babel-runtime</code>
<ul>
<li><a href="https://redirect.github.com/babel/babel/pull/16495">#16495</a> Move all runtime helpers to individual files (<a href="https://github.com/nicolo-ribaudo"><code>@​nicolo-ribaudo</code></a>)</li>
</ul>
</li>
<li><code>babel-parser</code>, <code>babel-traverse</code>
<ul>
<li><a href="https://redirect.github.com/babel/babel/pull/16482">#16482</a> Statically generate boilerplate for bitfield accessors (<a href="https://github.com/nicolo-ribaudo"><code>@​nicolo-ribaudo</code></a>)</li>
</ul>
</li>
<li>Other
<ul>
<li><a href="https://redirect.github.com/babel/babel/pull/16466">#16466</a> Migrate import assertions syntax (<a href="https://github.com/JLHwung"><code>@​JLHwung</code></a>)</li>
</ul>
</li>
</ul>
<h2>v7.24.5 (2024-04-29)</h2>
<h4>🐛 Bug Fix</h4>
<ul>
<li><code>babel-plugin-transform-classes</code>, <code>babel-traverse</code>
<ul>
<li><a href="https://redirect.github.com/babel/babel/pull/16377">#16377</a> fix: TypeScript annotation affects output (<a href="https://github.com/liuxingbaoyu"><code>@​liuxingbaoyu</code></a>)</li>
</ul>
</li>
<li><code>babel-helpers</code>, <code>babel-plugin-proposal-explicit-resource-management</code>, <code>babel-runtime-corejs3</code>
<ul>
<li><a href="https://redirect.github.com/babel/babel/pull/16440">#16440</a> Fix suppressed error order (<a href="https://github.com/sossost"><code>@​sossost</code></a>)</li>
<li><a href="https://redirect.github.com/babel/babel/pull/16408">#16408</a> Await nullish async disposable (<a href="https://github.com/JLHwung"><code>@​JLHwung</code></a>)</li>
</ul>
</li>
</ul>
<h4>💅 Polish</h4>
<ul>
<li><code>babel-parser</code></li>
</ul>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="https://github.com/babel/babel/commit/bf1e9a34e4d66d8231dad2f12b9df46d4b730ead"><code>bf1e9a3</code></a> v7.24.7</li>
<li><a href="https://github.com/babel/babel/commit/793496394e30fe37b56e54d76cabb417e1652dc2"><code>7934963</code></a> Use <code>type: module</code> in all <code>package.json</code>s (<a href="https://github.com/babel/babel/tree/HEAD/packages/babel-plugin-transform-private-methods/issues/16535">#16535</a>)</li>
<li><a href="https://github.com/babel/babel/commit/9630250ca06f64a62d20caef62fcfa3b8d9165c8"><code>9630250</code></a> v7.24.6</li>
<li><a href="https://github.com/babel/babel/commit/6e3539ba1447f4ec43b2fcb1093aecea014ccd26"><code>6e3539b</code></a> [babel 8] Publish <code>.d.ts</code> files for every package (<a href="https://github.com/babel/babel/tree/HEAD/packages/babel-plugin-transform-private-methods/issues/16416">#16416</a>)</li>
<li><a href="https://github.com/babel/babel/commit/71c247a1831fe70e8b847fdb57b5fc10538d9748"><code>71c247a</code></a> [babel 8] Require Node.js <code>^18.20.0 || ^20.10.0 || &gt;=21.0.0</code> (<a href="https://github.com/babel/babel/tree/HEAD/packages/babel-plugin-transform-private-methods/issues/16457">#16457</a>)</li>
<li><a href="https://github.com/babel/babel/commit/ee4875443db7563b87ef8e11e1fb75582ac72ac1"><code>ee48754</code></a> Use multiple TypeScript projects (<a href="https://github.com/babel/babel/tree/HEAD/packages/babel-plugin-transform-private-methods/issues/16430">#16430</a>)</li>
<li>See full diff in <a href="https://github.com/babel/babel/commits/v7.24.7/packages/babel-plugin-transform-private-methods">compare view</a></li>
</ul>
</details>
<br />

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=@babel/plugin-transform-private-methods&package-manager=npm_and_yarn&previous-version=7.24.1&new-version=7.24.7)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

</details>

<!-- start pr-codex -->

---

## PR-Codex overview
This PR updates Babel plugins and dependencies to their latest versions, focusing on `@babel/plugin-transform-private-methods`.

### Detailed summary
- Updated `@babel/plugin-transform-private-methods` to version `7.24.7` in multiple files.
- Upgraded various helper plugins to version `7.24.7`.
- Updated `@babel/types` and other dependencies to version `7.24.7`.
- Added new plugin `@babel/helper-create-class-features-plugin`.
- Updated `@babel/helper-replace-supers` to version `7.24.7`.
- Various other dependency updates and additions.

> The following files were skipped due to too many changes: `pnpm-lock.yaml`

> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}`

<!-- end pr-codex -->
2024-06-18 00:23:27 +00:00
jnsdls b808652805 [Fix] Handle special case for localhost in development environment in isThirdwebUrl function (#3369)
### TL;DR

This PR updates the `isThirdwebUrl` function to properly handle the `localhost` hostname in the development environment.

### What changed?

- Added a check to see if `process.env.NODE_ENV` is set to `development`
- If in development, it checks if the hostname is `localhost` and treats it as a Thirdweb URL

### How to test?

- Ensure the application runs in both development and production environments
- In development, verify URLs with `localhost` return `true` for `isThirdwebUrl`
- In production, verify URLs with `localhost` return `false` for `isThirdwebUrl`

### Why make this change?

This change was made to correctly classify `localhost` as a Thirdweb URL when running in a development environment, allowing for better development workflow and environment parity.

---

<!-- start pr-codex -->

---

## PR-Codex overview
The focus of this PR is to exclude localhost from being considered a thirdweb URL, except in development mode.

### Detailed summary
- Excludes localhost from thirdweb URL check in `fetch.ts` except in development mode.
- Adds special handling for localhost in development environment.
- Improves accuracy of identifying thirdweb URLs.

> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}`

<!-- end pr-codex -->
2024-06-18 00:13:02 +00:00
jnsdls c42a34f202 [Tests] Conditionally run updateMetadata test based on TW_SECRET_KEY environment variable (#3368)
### TL;DR

The change ensures that the `erc721: updateMetadata` test suite is conditionally executed only if the `TW_SECRET_KEY` environment variable is set.

### What changed?

- Updated the `updateMetadata.test.ts` file to conditionally run the `erc721: updateMetadata` test suite based on the `TW_SECRET_KEY` environment variable.

### How to test?

1. Set the `TW_SECRET_KEY` environment variable.
2. Run the test suite.
3. Observe that the `erc721: updateMetadata` tests are executed only if the environment variable is set.

### Why make this change?

This change ensures that sensitive tests which require a secret key are only executed in appropriate environments, thereby enhancing test reliability and security.

---
2024-06-17 23:59:56 +00:00
joaquim-verges 9dd1b5a5eb fix: signing raw messages in ethers adapter (#3366)
<!-- start pr-codex -->

## PR-Codex overview
This PR focuses on fixing the signing of raw messages through ethers 5/6 adapters.

### Detailed summary
- Updated message signing to accept raw message format in ethers 5/6 adapters
- Added tests for signing raw messages in ethers 5/6 adapters
- Added randomBytesBuffer import for test files
- Updated signing tests in viem adapter

> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}`

<!-- end pr-codex -->
2024-06-17 23:42:44 +00:00
github-actions[bot]GitHubgithub-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
b9b622a1f7 chore(chains): update chains (#3355)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2024-06-18 10:19:54 +12:00
95 changed files with 761 additions and 650 deletions
+7
View File
@@ -1,5 +1,12 @@
# @thirdweb-dev/auth
## 4.1.97
### Patch Changes
- Updated dependencies []:
- @thirdweb-dev/wallets@2.5.39
## 4.1.96
### Patch Changes
+2 -2
View File
@@ -1,6 +1,6 @@
{
"name": "@thirdweb-dev/auth",
"version": "4.1.96",
"version": "4.1.97",
"main": "dist/thirdweb-dev-auth.cjs.js",
"module": "dist/thirdweb-dev-auth.esm.js",
"browser": {
@@ -97,7 +97,7 @@
"eslint-plugin-import": "^2.29.1",
"eslint-plugin-inclusive-language": "^2.2.1",
"eslint-plugin-prettier": "^5.1.3",
"eslint-plugin-tsdoc": "^0.2.17",
"eslint-plugin-tsdoc": "^0.3.0",
"ethers": "^5.7.2",
"express": "^4.19.2",
"fastify": "^4.26.2",
+2 -20
View File
@@ -6,33 +6,15 @@ export default {
{
"name": "Rebus EVM Explorer (Blockscout)",
"url": "https://evm.rebuschain.com",
"standard": "none",
"icon": {
"url": "ipfs://bafkreifzag46dhp33vb2uldg4htqbqipuqrapjga6ml6pnhn5yibbvb4gq",
"width": 512,
"height": 512,
"format": "png"
}
"standard": "none"
},
{
"name": "Rebus Cosmos Explorer (ping.pub)",
"url": "https://cosmos.rebuschain.com",
"standard": "none",
"icon": {
"url": "ipfs://bafkreifzag46dhp33vb2uldg4htqbqipuqrapjga6ml6pnhn5yibbvb4gq",
"width": 512,
"height": 512,
"format": "png"
}
"standard": "none"
}
],
"faucets": [],
"icon": {
"url": "ipfs://bafkreifzag46dhp33vb2uldg4htqbqipuqrapjga6ml6pnhn5yibbvb4gq",
"width": 512,
"height": 512,
"format": "png"
},
"infoURL": "https://www.rebuschain.com",
"name": "Rebus Mainnet",
"nativeCurrency": {
@@ -4,6 +4,12 @@ export default {
"chainId": 107107114116,
"explorers": [],
"faucets": [],
"icon": {
"url": "ipfs://QmNTZ9nEomAXK6bLxUbMfTS1TvrsN22HU1zTtxHUpMkUhz",
"width": 1000,
"height": 1000,
"format": "png"
},
"infoURL": "https://kakarot.org",
"name": "Kakarot Sepolia Deprecated",
"nativeCurrency": {
+2 -4
View File
@@ -20,11 +20,9 @@ export default {
},
"networkId": 1220,
"redFlags": [],
"rpc": [
"https://1220.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
"https://testnet.flagscan.io"
],
"rpc": [],
"shortName": "Flag",
"slug": "flag-testnet-flag",
"status": "deprecated",
"testnet": true
} as const satisfies Chain;
+6
View File
@@ -15,6 +15,12 @@ export default {
}
],
"faucets": [],
"icon": {
"url": "ipfs://QmRySLe3su59dE5x5JPm2b1GeZfz6DR9qUzcbp3rt4SD3A",
"width": 300,
"height": 300,
"format": "png"
},
"infoURL": "https://astar.network",
"name": "zKatana",
"nativeCurrency": {
-6
View File
@@ -10,12 +10,6 @@ export default {
}
],
"faucets": [],
"icon": {
"url": "ipfs://QmfJ1Qxpzi6CSLeFeWY1Bwe435CpT5za5WfrLUE7vNzZfy",
"width": 512,
"height": 512,
"format": "png"
},
"infoURL": "https://rikeza.io",
"name": "Rikeza Network Testnet",
"nativeCurrency": {
-6
View File
@@ -18,12 +18,6 @@ export default {
"name": "EIP1559"
}
],
"icon": {
"url": "ipfs://QmQJ21NWyGGDraicVEzS1Uqq1yXahM9NCuNZgnfYvtspdt",
"width": 512,
"height": 512,
"format": "png"
},
"infoURL": "https://www.onbeam.com",
"name": "Beam Testnet",
"nativeCurrency": {
+13 -1
View File
@@ -6,7 +6,13 @@ export default {
{
"name": "etherscan",
"url": "http://testnet-api.magape.io:81",
"standard": "EIP3091"
"standard": "EIP3091",
"icon": {
"url": "ipfs://QmPsxWMvnxnZ9dZcRJJMaE24o34dQsnsAMCJh3kVDrE1aB",
"width": 1000,
"height": 1000,
"format": "png"
}
}
],
"faucets": [],
@@ -15,6 +21,12 @@ export default {
"name": "EIP155"
}
],
"icon": {
"url": "ipfs://QmPsxWMvnxnZ9dZcRJJMaE24o34dQsnsAMCJh3kVDrE1aB",
"width": 1000,
"height": 1000,
"format": "png"
},
"infoURL": "https://magape.io",
"name": "MagApe Testnet",
"nativeCurrency": {
-6
View File
@@ -10,12 +10,6 @@ export default {
}
],
"faucets": [],
"icon": {
"url": "ipfs://QmfJ1Qxpzi6CSLeFeWY1Bwe435CpT5za5WfrLUE7vNzZfy",
"width": 512,
"height": 512,
"format": "png"
},
"infoURL": "https://rikeza.io",
"name": "Rikeza Network Mainnet",
"nativeCurrency": {
@@ -12,12 +12,6 @@ export default {
"faucets": [
"https://www.sfuelstation.com/"
],
"icon": {
"url": "ipfs://bafkreiezcwowhm6xjrkt44cmiu6ml36rhrxx3amcg3cfkcntv2vgcvgbre",
"width": 600,
"height": 600,
"format": "png"
},
"infoURL": "https://europahub.network/",
"name": "SKALE Europa Hub Testnet",
"nativeCurrency": {
-6
View File
@@ -11,12 +11,6 @@ export default {
],
"faucets": [],
"features": [],
"icon": {
"url": "ipfs://QmcHdmVr5VRUJq13jnM6tgah5Ge7hn3Dm14eY6vwivJ5ui",
"width": 288,
"height": 258,
"format": "png"
},
"infoURL": "https://taiko.xyz",
"name": "Taiko Mainnet",
"nativeCurrency": {
-6
View File
@@ -10,12 +10,6 @@ export default {
}
],
"faucets": [],
"icon": {
"url": "ipfs://QmcHdmVr5VRUJq13jnM6tgah5Ge7hn3Dm14eY6vwivJ5ui",
"width": 288,
"height": 258,
"format": "png"
},
"infoURL": "https://taiko.xyz",
"name": "Taiko (Alpha-2 Testnet)",
"nativeCurrency": {
-6
View File
@@ -11,12 +11,6 @@ export default {
],
"faucets": [],
"features": [],
"icon": {
"url": "ipfs://QmcHdmVr5VRUJq13jnM6tgah5Ge7hn3Dm14eY6vwivJ5ui",
"width": 288,
"height": 258,
"format": "png"
},
"infoURL": "https://taiko.xyz",
"name": "Taiko Katla L2",
"nativeCurrency": {
-6
View File
@@ -16,12 +16,6 @@ export default {
],
"faucets": [],
"features": [],
"icon": {
"url": "ipfs://QmcHdmVr5VRUJq13jnM6tgah5Ge7hn3Dm14eY6vwivJ5ui",
"width": 288,
"height": 258,
"format": "png"
},
"infoURL": "https://taiko.xyz",
"name": "Taiko Hekla L2",
"nativeCurrency": {
-6
View File
@@ -10,12 +10,6 @@ export default {
}
],
"faucets": [],
"icon": {
"url": "ipfs://QmSxXjvWng3Diz4YwXDV2VqSPgMyzLYBNfkjJcr7rzkxom",
"width": 400,
"height": 400,
"format": "png"
},
"infoURL": "https://airdao.io",
"name": "AirDAO Mainnet",
"nativeCurrency": {
-6
View File
@@ -4,12 +4,6 @@ export default {
"chainId": 1688,
"explorers": [],
"faucets": [],
"icon": {
"url": "ipfs://bafkreigzeanzqgxrzzep45t776ovbwi242poqxbryuu2go5eedeuwwcsay",
"width": 512,
"height": 512,
"format": "png"
},
"infoURL": "https://www.ludan.org/",
"name": "LUDAN Mainnet",
"nativeCurrency": {
@@ -15,6 +15,12 @@ export default {
}
],
"faucets": [],
"icon": {
"url": "ipfs://QmNTZ9nEomAXK6bLxUbMfTS1TvrsN22HU1zTtxHUpMkUhz",
"width": 1000,
"height": 1000,
"format": "png"
},
"infoURL": "https://kakarot.org",
"name": "Kakarot Sepolia",
"nativeCurrency": {
@@ -13,12 +13,6 @@ export default {
"https://ruby.exchange/faucet.html",
"https://sfuel.mylilius.com/"
],
"icon": {
"url": "ipfs://bafkreiezcwowhm6xjrkt44cmiu6ml36rhrxx3amcg3cfkcntv2vgcvgbre",
"width": 600,
"height": 600,
"format": "png"
},
"infoURL": "https://europahub.network/",
"name": "SKALE Europa Hub",
"nativeCurrency": {
+3 -11
View File
@@ -2,13 +2,7 @@ import type { Chain } from "../src/types";
export default {
"chain": "Flag",
"chainId": 220,
"explorers": [
{
"name": "flagscan",
"url": "https://scan.flagscan.io",
"standard": "EIP3091"
}
],
"explorers": [],
"faucets": [],
"features": [],
"icon": {
@@ -26,11 +20,9 @@ export default {
},
"networkId": 220,
"redFlags": [],
"rpc": [
"https://220.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
"https://mainnet.flagscan.io/"
],
"rpc": [],
"shortName": "Flag",
"slug": "flag-flag",
"status": "deprecated",
"testnet": false
} as const satisfies Chain;
-6
View File
@@ -10,12 +10,6 @@ export default {
}
],
"faucets": [],
"icon": {
"url": "ipfs://QmSxXjvWng3Diz4YwXDV2VqSPgMyzLYBNfkjJcr7rzkxom",
"width": 400,
"height": 400,
"format": "png"
},
"infoURL": "https://testnet.airdao.io",
"name": "AirDAO Testnet",
"nativeCurrency": {
@@ -10,12 +10,6 @@ export default {
}
],
"faucets": [],
"icon": {
"url": "ipfs://QmTV45o4jTe6ayscF1XWh1WXk5DPck4QohR5kQocSWjvQP",
"width": 300,
"height": 300,
"format": "png"
},
"infoURL": "https://xlon.org",
"name": "Excelon Mainnet",
"nativeCurrency": {
+20 -2
View File
@@ -6,16 +6,34 @@ export default {
{
"name": "explorer",
"url": "https://testnet.meldscan.io",
"standard": "EIP3091"
"standard": "EIP3091",
"icon": {
"url": "ipfs://QmRhB4AbjDrhvwfSAQi2JvKirFiDWxzJvKEvG8S8AdDdED",
"width": 4000,
"height": 4000,
"format": "png"
}
},
{
"name": "explorer",
"url": "https://subnets-test.avax.network/meld",
"standard": "EIP3091"
"standard": "EIP3091",
"icon": {
"url": "ipfs://QmRhB4AbjDrhvwfSAQi2JvKirFiDWxzJvKEvG8S8AdDdED",
"width": 4000,
"height": 4000,
"format": "png"
}
}
],
"faucets": [],
"features": [],
"icon": {
"url": "ipfs://QmRhB4AbjDrhvwfSAQi2JvKirFiDWxzJvKEvG8S8AdDdED",
"width": 4000,
"height": 4000,
"format": "png"
},
"infoURL": "https://meld.com",
"name": "Kanazawa",
"nativeCurrency": {
+2 -20
View File
@@ -6,33 +6,15 @@ export default {
{
"name": "Rebus EVM Explorer (Blockscout)",
"url": "https://evm.testnet.rebus.money",
"standard": "none",
"icon": {
"url": "ipfs://bafkreifzag46dhp33vb2uldg4htqbqipuqrapjga6ml6pnhn5yibbvb4gq",
"width": 512,
"height": 512,
"format": "png"
}
"standard": "none"
},
{
"name": "Rebus Cosmos Explorer (ping.pub)",
"url": "https://testnet.rebus.money/rebustestnet",
"standard": "none",
"icon": {
"url": "ipfs://bafkreifzag46dhp33vb2uldg4htqbqipuqrapjga6ml6pnhn5yibbvb4gq",
"width": 512,
"height": 512,
"format": "png"
}
"standard": "none"
}
],
"faucets": [],
"icon": {
"url": "ipfs://bafkreifzag46dhp33vb2uldg4htqbqipuqrapjga6ml6pnhn5yibbvb4gq",
"width": 512,
"height": 512,
"format": "png"
},
"infoURL": "https://www.rebuschain.com",
"name": "Rebus Testnet",
"nativeCurrency": {
+1 -13
View File
@@ -6,24 +6,12 @@ export default {
{
"name": "TTcoin Smart Chain Explorer",
"url": "https://tscscan.com",
"standard": "EIP3091",
"icon": {
"url": "ipfs://QmS7ipvvyZ16weG1DM7AZbi1v9ixYwU2FjP25Jj5jkLiuf",
"width": 512,
"height": 512,
"format": "png"
}
"standard": "EIP3091"
}
],
"faucets": [
"https://faucet.tscscan.com"
],
"icon": {
"url": "ipfs://QmS7ipvvyZ16weG1DM7AZbi1v9ixYwU2FjP25Jj5jkLiuf",
"width": 512,
"height": 512,
"format": "png"
},
"infoURL": "https://ttcoin.info/",
"name": "TTcoin Smart Chain Mainnet",
"nativeCurrency": {
+20 -2
View File
@@ -6,16 +6,34 @@ export default {
{
"name": "explorer",
"url": "https://meldscan.io",
"standard": "EIP3091"
"standard": "EIP3091",
"icon": {
"url": "ipfs://QmRhB4AbjDrhvwfSAQi2JvKirFiDWxzJvKEvG8S8AdDdED",
"width": 4000,
"height": 4000,
"format": "png"
}
},
{
"name": "explorer",
"url": "https://subnets.avax.network/meld",
"standard": "EIP3091"
"standard": "EIP3091",
"icon": {
"url": "ipfs://QmRhB4AbjDrhvwfSAQi2JvKirFiDWxzJvKEvG8S8AdDdED",
"width": 4000,
"height": 4000,
"format": "png"
}
}
],
"faucets": [],
"features": [],
"icon": {
"url": "ipfs://QmRhB4AbjDrhvwfSAQi2JvKirFiDWxzJvKEvG8S8AdDdED",
"width": 4000,
"height": 4000,
"format": "png"
},
"infoURL": "https://meld.com",
"name": "Meld",
"nativeCurrency": {
+1 -13
View File
@@ -6,24 +6,12 @@ export default {
{
"name": "LayerEdge Testnet Explorer",
"url": "https://testnet-explorer.layeredge.io",
"standard": "EIP3091",
"icon": {
"url": "ipfs://QmT2RotFAn8edji6FqBiP1TpTb1EFqHr28qbQGoRaJ9nTN",
"width": 218,
"height": 211,
"format": "svg"
}
"standard": "EIP3091"
}
],
"faucets": [
"https://testnet-faucet.layeredge.io"
],
"icon": {
"url": "ipfs://QmT2RotFAn8edji6FqBiP1TpTb1EFqHr28qbQGoRaJ9nTN",
"width": 218,
"height": 211,
"format": "svg"
},
"infoURL": "https://www.layeredge.io",
"name": "LayerEdge testnet",
"nativeCurrency": {
+1 -13
View File
@@ -6,22 +6,10 @@ export default {
{
"name": "HAP EVM Explorer (Blockscout)",
"url": "https://blockscout-test.hap.land",
"standard": "none",
"icon": {
"url": "ipfs://QmQ4V9JC25yUrYk2kFJwmKguSsZBQvtGcg6q9zkDV8mkJW",
"width": 400,
"height": 400,
"format": "png"
}
"standard": "none"
}
],
"faucets": [],
"icon": {
"url": "ipfs://QmQ4V9JC25yUrYk2kFJwmKguSsZBQvtGcg6q9zkDV8mkJW",
"width": 400,
"height": 400,
"format": "png"
},
"infoURL": "https://hap.land",
"name": "HAPchain Testnet",
"nativeCurrency": {
+6
View File
@@ -16,6 +16,12 @@ export default {
}
],
"faucets": [],
"icon": {
"url": "ipfs://QmZt75xixnEtFzqHTrJa8kJkV4cTXmUZqeMeHM8BcvomQc",
"width": 512,
"height": 512,
"format": "png"
},
"infoURL": "https://oho.ai",
"name": "OHO Mainnet",
"nativeCurrency": {
+6
View File
@@ -10,6 +10,12 @@ export default {
}
],
"faucets": [],
"icon": {
"url": "ipfs://QmXARMjJGkXEVEdjUyxkeG4ffsWvEo9vSJpVon3JwRxckS",
"width": 512,
"height": 512,
"format": "png"
},
"infoURL": "https://tobechain.net",
"name": "Tobe Chain",
"nativeCurrency": {
-6
View File
@@ -17,12 +17,6 @@ export default {
"name": "EIP1559"
}
],
"icon": {
"url": "ipfs://QmQJ21NWyGGDraicVEzS1Uqq1yXahM9NCuNZgnfYvtspdt",
"width": 512,
"height": 512,
"format": "png"
},
"infoURL": "https://www.onbeam.com",
"name": "Beam",
"nativeCurrency": {
@@ -12,12 +12,6 @@ export default {
"faucets": [
"https://sfuel.dirtroad.dev/staging"
],
"icon": {
"url": "ipfs://bafkreiezcwowhm6xjrkt44cmiu6ml36rhrxx3amcg3cfkcntv2vgcvgbre",
"width": 600,
"height": 600,
"format": "png"
},
"infoURL": "https://europahub.network/",
"name": "Deprecated SKALE Europa Hub Testnet",
"nativeCurrency": {
+13 -1
View File
@@ -6,10 +6,22 @@ export default {
{
"name": "etmpscan",
"url": "https://etmscan.network",
"standard": "EIP3091"
"standard": "EIP3091",
"icon": {
"url": "ipfs://QmT7DTqT1V2y42pRpt3sj9ifijfmbtkHN7D2vTfAUAS622",
"width": 512,
"height": 512,
"format": "png"
}
}
],
"faucets": [],
"icon": {
"url": "ipfs://QmT7DTqT1V2y42pRpt3sj9ifijfmbtkHN7D2vTfAUAS622",
"width": 512,
"height": 512,
"format": "png"
},
"infoURL": "https://etm.network",
"name": "Ennothem Mainnet Proterozoic",
"nativeCurrency": {
+6
View File
@@ -10,6 +10,12 @@ export default {
}
],
"faucets": [],
"icon": {
"url": "ipfs://QmT7DTqT1V2y42pRpt3sj9ifijfmbtkHN7D2vTfAUAS622",
"width": 512,
"height": 512,
"format": "png"
},
"infoURL": "https://etm.network",
"name": "Ennothem Testnet Pioneer",
"nativeCurrency": {
+13 -1
View File
@@ -6,7 +6,13 @@ export default {
{
"name": "Pentagon Testnet Explorer",
"url": "https://explorer-testnet.pentagon.games",
"standard": "EIP3091"
"standard": "EIP3091",
"icon": {
"url": "ipfs://QmfU7W3Tm3tGWgnHBTG9vjB4PXGMvcL7Cq8R6MaSaC33DC",
"width": 512,
"height": 512,
"format": "png"
}
}
],
"faucets": [
@@ -20,6 +26,12 @@ export default {
"name": "EIP1559"
}
],
"icon": {
"url": "ipfs://QmfU7W3Tm3tGWgnHBTG9vjB4PXGMvcL7Cq8R6MaSaC33DC",
"width": 512,
"height": 512,
"format": "png"
},
"infoURL": "https://pentagon.games",
"name": "Pentagon Testnet",
"nativeCurrency": {
+4 -15
View File
@@ -24,26 +24,15 @@ export default {
"height": 102,
"format": "svg"
}
},
{
"name": "blockscout",
"url": "https://explorer.sepolia.linea.build/",
"standard": "EIP3091",
"icon": {
"url": "ipfs://QmURjritnHL7a8TwZgsFwp3f272DJmG5paaPtWDZ98QZwH",
"width": 30,
"height": 30,
"format": "svg"
}
}
],
"faucets": [],
"features": [],
"icon": {
"url": "ipfs://QmURjritnHL7a8TwZgsFwp3f272DJmG5paaPtWDZ98QZwH",
"width": 30,
"height": 30,
"format": "svg"
"url": "ipfs://QmS3wZEQTRMZBySqaCnKsGWuohRYh598JL8AntKh3URv6R",
"width": 798,
"height": 831,
"format": "png"
},
"infoURL": "https://linea.build",
"name": "Linea Sepolia",
+12 -6
View File
@@ -4,9 +4,15 @@ export default {
"chainId": 59144,
"explorers": [
{
"name": "lineascan",
"name": "Etherscan",
"url": "https://lineascan.build",
"standard": "EIP3091"
"standard": "EIP3091",
"icon": {
"url": "ipfs://QmURjritnHL7a8TwZgsFwp3f272DJmG5paaPtWDZ98QZwH",
"width": 97,
"height": 102,
"format": "svg"
}
},
{
"name": "Blockscout",
@@ -34,10 +40,10 @@ export default {
"faucets": [],
"features": [],
"icon": {
"url": "ipfs://QmURjritnHL7a8TwZgsFwp3f272DJmG5paaPtWDZ98QZwH",
"width": 97,
"height": 102,
"format": "svg"
"url": "ipfs://QmS3wZEQTRMZBySqaCnKsGWuohRYh598JL8AntKh3URv6R",
"width": 798,
"height": 831,
"format": "png"
},
"infoURL": "https://linea.build",
"name": "Linea",
+6
View File
@@ -16,6 +16,12 @@ export default {
],
"faucets": [],
"features": [],
"icon": {
"url": "ipfs://QmRySLe3su59dE5x5JPm2b1GeZfz6DR9qUzcbp3rt4SD3A",
"width": 300,
"height": 300,
"format": "png"
},
"infoURL": "https://astar.network",
"name": "Astar zKyoto",
"nativeCurrency": {
@@ -19,12 +19,6 @@ export default {
"https://faucet.triangleplatform.com/frame"
],
"features": [],
"icon": {
"url": "ipfs://QmRxeKFwBwrXyDksoN4NzNRp3R35s8pVnTBfBj4AJSCq5g",
"width": 512,
"height": 512,
"format": "png"
},
"infoURL": "https://frame.xyz",
"name": "Frame Testnet",
"nativeCurrency": {
+6
View File
@@ -16,6 +16,12 @@ export default {
}
],
"faucets": [],
"icon": {
"url": "ipfs://QmVhezQHkqSZ5Tvtsw18giA1yBjV1URSsBQ7HenUh6p6oC",
"width": 512,
"height": 512,
"format": "png"
},
"infoURL": "https://octa.space",
"name": "OctaSpace",
"nativeCurrency": {
+2 -20
View File
@@ -6,33 +6,15 @@ export default {
{
"name": "meerscan",
"url": "https://qng.qitmeer.io",
"standard": "EIP3091",
"icon": {
"url": "ipfs://QmWSbMuCwQzhBB6GRLYqZ87n5cnpzpYCehCAMMQmUXj4mm",
"width": 512,
"height": 512,
"format": "png"
}
"standard": "EIP3091"
},
{
"name": "meerscan",
"url": "https://qng.meerscan.io",
"standard": "EIP3091",
"icon": {
"url": "ipfs://QmWSbMuCwQzhBB6GRLYqZ87n5cnpzpYCehCAMMQmUXj4mm",
"width": 512,
"height": 512,
"format": "png"
}
"standard": "EIP3091"
}
],
"faucets": [],
"icon": {
"url": "ipfs://QmWSbMuCwQzhBB6GRLYqZ87n5cnpzpYCehCAMMQmUXj4mm",
"width": 512,
"height": 512,
"format": "png"
},
"infoURL": "https://github.com/Qitmeer",
"name": "Qitmeer Network Mainnet",
"nativeCurrency": {
+1 -13
View File
@@ -6,24 +6,12 @@ export default {
{
"name": "meerscan testnet",
"url": "https://testnet-qng.qitmeer.io",
"standard": "EIP3091",
"icon": {
"url": "ipfs://QmWSbMuCwQzhBB6GRLYqZ87n5cnpzpYCehCAMMQmUXj4mm",
"width": 512,
"height": 512,
"format": "png"
}
"standard": "EIP3091"
}
],
"faucets": [
"https://faucet.qitmeer.io"
],
"icon": {
"url": "ipfs://QmWSbMuCwQzhBB6GRLYqZ87n5cnpzpYCehCAMMQmUXj4mm",
"width": 512,
"height": 512,
"format": "png"
},
"infoURL": "https://github.com/Qitmeer",
"name": "Qitmeer Network Testnet",
"nativeCurrency": {
-6
View File
@@ -4,12 +4,6 @@ export default {
"chainId": 8132,
"explorers": [],
"faucets": [],
"icon": {
"url": "ipfs://QmWSbMuCwQzhBB6GRLYqZ87n5cnpzpYCehCAMMQmUXj4mm",
"width": 512,
"height": 512,
"format": "png"
},
"infoURL": "https://github.com/Qitmeer",
"name": "Qitmeer Network Mixnet",
"nativeCurrency": {
-6
View File
@@ -4,12 +4,6 @@ export default {
"chainId": 8133,
"explorers": [],
"faucets": [],
"icon": {
"url": "ipfs://QmWSbMuCwQzhBB6GRLYqZ87n5cnpzpYCehCAMMQmUXj4mm",
"width": 512,
"height": 512,
"format": "png"
},
"infoURL": "https://github.com/Qitmeer",
"name": "Qitmeer Network Privnet",
"nativeCurrency": {
-6
View File
@@ -4,12 +4,6 @@ export default {
"chainId": 8134,
"explorers": [],
"faucets": [],
"icon": {
"url": "ipfs://QmWSbMuCwQzhBB6GRLYqZ87n5cnpzpYCehCAMMQmUXj4mm",
"width": 512,
"height": 512,
"format": "png"
},
"infoURL": "https://github.com/Qitmeer",
"name": "Amana",
"nativeCurrency": {
-6
View File
@@ -4,12 +4,6 @@ export default {
"chainId": 81341,
"explorers": [],
"faucets": [],
"icon": {
"url": "ipfs://QmWSbMuCwQzhBB6GRLYqZ87n5cnpzpYCehCAMMQmUXj4mm",
"width": 512,
"height": 512,
"format": "png"
},
"infoURL": "https://github.com/Qitmeer",
"name": "Amana Testnet",
"nativeCurrency": {
-6
View File
@@ -4,12 +4,6 @@ export default {
"chainId": 81342,
"explorers": [],
"faucets": [],
"icon": {
"url": "ipfs://QmWSbMuCwQzhBB6GRLYqZ87n5cnpzpYCehCAMMQmUXj4mm",
"width": 512,
"height": 512,
"format": "png"
},
"infoURL": "https://github.com/Qitmeer",
"name": "Amana Mixnet",
"nativeCurrency": {
-6
View File
@@ -4,12 +4,6 @@ export default {
"chainId": 81343,
"explorers": [],
"faucets": [],
"icon": {
"url": "ipfs://QmWSbMuCwQzhBB6GRLYqZ87n5cnpzpYCehCAMMQmUXj4mm",
"width": 512,
"height": 512,
"format": "png"
},
"infoURL": "https://github.com/Qitmeer",
"name": "Amana Privnet",
"nativeCurrency": {
-6
View File
@@ -4,12 +4,6 @@ export default {
"chainId": 8135,
"explorers": [],
"faucets": [],
"icon": {
"url": "ipfs://QmWSbMuCwQzhBB6GRLYqZ87n5cnpzpYCehCAMMQmUXj4mm",
"width": 512,
"height": 512,
"format": "png"
},
"infoURL": "https://github.com/Qitmeer",
"name": "Flana",
"nativeCurrency": {
-6
View File
@@ -4,12 +4,6 @@ export default {
"chainId": 81351,
"explorers": [],
"faucets": [],
"icon": {
"url": "ipfs://QmWSbMuCwQzhBB6GRLYqZ87n5cnpzpYCehCAMMQmUXj4mm",
"width": 512,
"height": 512,
"format": "png"
},
"infoURL": "https://github.com/Qitmeer",
"name": "Flana Testnet",
"nativeCurrency": {
-6
View File
@@ -4,12 +4,6 @@ export default {
"chainId": 81352,
"explorers": [],
"faucets": [],
"icon": {
"url": "ipfs://QmWSbMuCwQzhBB6GRLYqZ87n5cnpzpYCehCAMMQmUXj4mm",
"width": 512,
"height": 512,
"format": "png"
},
"infoURL": "https://github.com/Qitmeer",
"name": "Flana Mixnet",
"nativeCurrency": {
-6
View File
@@ -4,12 +4,6 @@ export default {
"chainId": 81353,
"explorers": [],
"faucets": [],
"icon": {
"url": "ipfs://QmWSbMuCwQzhBB6GRLYqZ87n5cnpzpYCehCAMMQmUXj4mm",
"width": 512,
"height": 512,
"format": "png"
},
"infoURL": "https://github.com/Qitmeer",
"name": "Flana Privnet",
"nativeCurrency": {
-6
View File
@@ -4,12 +4,6 @@ export default {
"chainId": 8136,
"explorers": [],
"faucets": [],
"icon": {
"url": "ipfs://QmWSbMuCwQzhBB6GRLYqZ87n5cnpzpYCehCAMMQmUXj4mm",
"width": 512,
"height": 512,
"format": "png"
},
"infoURL": "https://github.com/Qitmeer",
"name": "Mizana",
"nativeCurrency": {
-6
View File
@@ -4,12 +4,6 @@ export default {
"chainId": 81361,
"explorers": [],
"faucets": [],
"icon": {
"url": "ipfs://QmWSbMuCwQzhBB6GRLYqZ87n5cnpzpYCehCAMMQmUXj4mm",
"width": 512,
"height": 512,
"format": "png"
},
"infoURL": "https://github.com/Qitmeer",
"name": "Mizana Testnet",
"nativeCurrency": {
-6
View File
@@ -4,12 +4,6 @@ export default {
"chainId": 81362,
"explorers": [],
"faucets": [],
"icon": {
"url": "ipfs://QmWSbMuCwQzhBB6GRLYqZ87n5cnpzpYCehCAMMQmUXj4mm",
"width": 512,
"height": 512,
"format": "png"
},
"infoURL": "https://github.com/Qitmeer",
"name": "Mizana Mixnet",
"nativeCurrency": {
-6
View File
@@ -4,12 +4,6 @@ export default {
"chainId": 81363,
"explorers": [],
"faucets": [],
"icon": {
"url": "ipfs://QmWSbMuCwQzhBB6GRLYqZ87n5cnpzpYCehCAMMQmUXj4mm",
"width": 512,
"height": 512,
"format": "png"
},
"infoURL": "https://github.com/Qitmeer",
"name": "Mizana Privnet",
"nativeCurrency": {
+6
View File
@@ -12,6 +12,12 @@ export default {
"faucets": [
"https://faucet.blocktonscan.com/"
],
"icon": {
"url": "ipfs://bafkreig3hoedafisrgc6iffdo2jcblm6kov35h72gcblc3zkmt7t4ucwhy",
"width": 800,
"height": 800,
"format": "png"
},
"infoURL": "https://blocktoncoin.com",
"name": "Blockton Blockchain",
"nativeCurrency": {
-6
View File
@@ -10,12 +10,6 @@ export default {
}
],
"faucets": [],
"icon": {
"url": "ipfs://QmTjV3TTR5aLb7fi7tjx8gcDvYtqBpusqhCSaznVxJ7NJg",
"width": 150,
"height": 150,
"format": "png"
},
"infoURL": "https://curvescan.io",
"name": "CURVE Mainnet",
"nativeCurrency": {
-6
View File
@@ -10,12 +10,6 @@ export default {
}
],
"faucets": [],
"icon": {
"url": "ipfs://bafkreifhetalm3vpvjrg5u5d2momkcgvkz6rhltur5co3rslltbxzpr6yq",
"width": 2048,
"height": 2048,
"format": "png"
},
"infoURL": "https://www.bandainamco-mirai.com/en/",
"name": "Bandai Namco Research Verse Mainnet",
"nativeCurrency": {
+1 -13
View File
@@ -6,22 +6,10 @@ export default {
{
"name": "HAP EVM Explorer (Blockscout)",
"url": "https://blockscout.hap.land",
"standard": "none",
"icon": {
"url": "ipfs://QmQ4V9JC25yUrYk2kFJwmKguSsZBQvtGcg6q9zkDV8mkJW",
"width": 400,
"height": 400,
"format": "png"
}
"standard": "none"
}
],
"faucets": [],
"icon": {
"url": "ipfs://QmQ4V9JC25yUrYk2kFJwmKguSsZBQvtGcg6q9zkDV8mkJW",
"width": 400,
"height": 400,
"format": "png"
},
"infoURL": "https://hap.land",
"name": "HAPchain",
"nativeCurrency": {
-6
View File
@@ -10,12 +10,6 @@ export default {
}
],
"faucets": [],
"icon": {
"url": "ipfs://QmWGNfwJ9o2vmKD3E6fjrxpbFP8W5q45zmYzHHoXwqqAoj",
"width": 512,
"height": 512,
"format": "png"
},
"infoURL": "https://xanachain.xana.net/",
"name": "XANAChain",
"nativeCurrency": {
+13 -1
View File
@@ -6,12 +6,24 @@ export default {
{
"name": "mmtscan",
"url": "https://mmtscan.io",
"standard": "EIP3091"
"standard": "EIP3091",
"icon": {
"url": "ipfs://QmaF5gi2CbDKsJ2UchNkjBqmWjv8JEDP3vePBmxeUHiaK4",
"width": 250,
"height": 250,
"format": "png"
}
}
],
"faucets": [
"https://faucet.mmtscan.io/"
],
"icon": {
"url": "ipfs://QmaF5gi2CbDKsJ2UchNkjBqmWjv8JEDP3vePBmxeUHiaK4",
"width": 250,
"height": 250,
"format": "png"
},
"infoURL": "https://mmtchain.io/",
"name": "Mammoth Mainnet",
"nativeCurrency": {
+13 -1
View File
@@ -6,12 +6,24 @@ export default {
{
"name": "Shidoblock Testnet Explorer",
"url": "https://testnet.shidoscan.com",
"standard": "none"
"standard": "none",
"icon": {
"url": "ipfs://bafkreiatrf5pp7ywvrwvsv4otrex73u6v6bvhorqkxiop2hy2i572zjrba",
"width": 1080,
"height": 1080,
"format": "png"
}
}
],
"faucets": [
"https://testnet.shidoscan.com/faucet"
],
"icon": {
"url": "ipfs://bafkreiatrf5pp7ywvrwvsv4otrex73u6v6bvhorqkxiop2hy2i572zjrba",
"width": 1080,
"height": 1080,
"format": "png"
},
"infoURL": "https://www.nexablock.io",
"name": "Shido Testnet Block",
"nativeCurrency": {
+13 -1
View File
@@ -6,10 +6,22 @@ export default {
{
"name": "Shidoblock Mainnet Explorer",
"url": "https://shidoscan.com",
"standard": "none"
"standard": "none",
"icon": {
"url": "ipfs://bafkreiatrf5pp7ywvrwvsv4otrex73u6v6bvhorqkxiop2hy2i572zjrba",
"width": 1080,
"height": 1080,
"format": "png"
}
}
],
"faucets": [],
"icon": {
"url": "ipfs://bafkreiatrf5pp7ywvrwvsv4otrex73u6v6bvhorqkxiop2hy2i572zjrba",
"width": 1080,
"height": 1080,
"format": "png"
},
"infoURL": "https://shido.io",
"name": "Shido Mainnet Block",
"nativeCurrency": {
+9
View File
@@ -1,5 +1,14 @@
# thirdweb
## 0.14.12
### Patch Changes
- Updated dependencies []:
- @thirdweb-dev/sdk@4.0.99
- @thirdweb-dev/wallets@2.5.39
- @thirdweb-dev/auth@4.1.97
## 0.14.11
### Patch Changes
+1 -1
View File
@@ -1,7 +1,7 @@
{
"name": "@thirdweb-dev/cli",
"main": "dist/cli/index.js",
"version": "0.14.11",
"version": "0.14.12",
"repository": "https://github.com/thirdweb-dev/js/tree/main/legacy_packages/cli",
"author": "thirdweb eng <[email protected]>",
"license": "Apache-2.0",
+9
View File
@@ -1,5 +1,14 @@
# @thirdweb-dev/react-core
## 4.9.4
### Patch Changes
- Updated dependencies []:
- @thirdweb-dev/sdk@4.0.99
- @thirdweb-dev/wallets@2.5.39
- @thirdweb-dev/auth@4.1.97
## 4.9.3
### Patch Changes
+2 -2
View File
@@ -1,6 +1,6 @@
{
"name": "@thirdweb-dev/react-core",
"version": "4.9.3",
"version": "4.9.4",
"repository": "https://github.com/thirdweb-dev/js/tree/main/legacy_packages/react-core",
"author": "thirdweb eng <[email protected]>",
"license": "Apache-2.0",
@@ -74,7 +74,7 @@
"eslint-plugin-import": "^2.29.1",
"eslint-plugin-inclusive-language": "^2.2.1",
"eslint-plugin-prettier": "^5.1.3",
"eslint-plugin-tsdoc": "^0.2.17",
"eslint-plugin-tsdoc": "^0.3.0",
"ethers": "^5.7.2",
"react": "18.2.0",
"typedoc-gen": "workspace:*",
+1 -1
View File
@@ -59,7 +59,7 @@
"eslint-plugin-import": "^2.29.1",
"eslint-plugin-inclusive-language": "^2.2.1",
"eslint-plugin-prettier": "^5.1.3",
"eslint-plugin-tsdoc": "^0.2.17",
"eslint-plugin-tsdoc": "^0.3.0",
"ethers": "^5.7.2",
"react": "18.2.0",
"react-native": "^0.71.17",
+9
View File
@@ -1,5 +1,14 @@
# @thirdweb-dev/react
## 4.9.4
### Patch Changes
- Updated dependencies []:
- @thirdweb-dev/sdk@4.0.99
- @thirdweb-dev/react-core@4.9.4
- @thirdweb-dev/wallets@2.5.39
## 4.9.3
### Patch Changes
+2 -2
View File
@@ -1,6 +1,6 @@
{
"name": "@thirdweb-dev/react",
"version": "4.9.3",
"version": "4.9.4",
"repository": "https://github.com/thirdweb-dev/js/tree/main/legacy_packages/react",
"author": "thirdweb eng <[email protected]>",
"license": "Apache-2.0",
@@ -91,7 +91,7 @@
"eslint-plugin-inclusive-language": "^2.2.1",
"eslint-plugin-prettier": "^5.1.3",
"eslint-plugin-svg-jsx": "^1.2.4",
"eslint-plugin-tsdoc": "^0.2.17",
"eslint-plugin-tsdoc": "^0.3.0",
"ethers": "^5.7.2",
"react": "18.2.0",
"react-dom": "^18.2.0",
Binary file not shown.
+7
View File
@@ -1,5 +1,12 @@
# @thirdweb-dev/sdk
## 4.0.99
### Patch Changes
- Updated dependencies [[`9dd1b5a`](https://github.com/thirdweb-dev/js/commit/9dd1b5a5ebaeaecafdcacbb4f4b81c3006d5074c), [`b808652`](https://github.com/thirdweb-dev/js/commit/b80865280585548615e4741634ea6b884a16e2cf)]:
- thirdweb@5.29.6
## 4.0.98
### Patch Changes
+2 -2
View File
@@ -1,6 +1,6 @@
{
"name": "@thirdweb-dev/sdk",
"version": "4.0.98",
"version": "4.0.99",
"description": "The main thirdweb SDK.",
"repository": "https://github.com/thirdweb-dev/js/tree/main/legacy_packages/sdk",
"license": "Apache-2.0",
@@ -100,7 +100,7 @@
"eslint-plugin-import": "^2.29.1",
"eslint-plugin-inclusive-language": "^2.2.1",
"eslint-plugin-prettier": "^5.1.3",
"eslint-plugin-tsdoc": "^0.2.17",
"eslint-plugin-tsdoc": "^0.3.0",
"ethers": "^5.7.2",
"ethers-aws-kms-signer": "^1.3.2",
"hardhat": "^2.22.2",
Binary file not shown.
+1 -1
View File
@@ -40,7 +40,7 @@
"@types/uuid": "^9.0.8",
"eslint": "8.57.0",
"eslint-config-thirdweb": "workspace:*",
"eslint-plugin-tsdoc": "^0.2.17",
"eslint-plugin-tsdoc": "^0.3.0",
"esm": "^3.2.25",
"rimraf": "5.0.5",
"typedoc-gen": "workspace:*",
@@ -1,5 +1,14 @@
# @thirdweb-dev/unity-js-bridge
## 0.6.48
### Patch Changes
- Updated dependencies []:
- @thirdweb-dev/sdk@4.0.99
- @thirdweb-dev/wallets@2.5.39
- @thirdweb-dev/auth@4.1.97
## 0.6.47
### Patch Changes
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@thirdweb-dev/unity-js-bridge",
"version": "0.6.47",
"version": "0.6.48",
"main": "dist/thirdweb-unity-bridge.js",
"repository": "https://github.com/thirdweb-dev/js/tree/main/packages/unity-js-bridge",
"license": "Apache-2.0",
+7
View File
@@ -1,5 +1,12 @@
# @thirdweb-dev/wallets
## 2.5.39
### Patch Changes
- Updated dependencies []:
- @thirdweb-dev/sdk@4.0.99
## 2.5.38
### Patch Changes
+3 -3
View File
@@ -1,6 +1,6 @@
{
"name": "@thirdweb-dev/wallets",
"version": "2.5.38",
"version": "2.5.39",
"main": "dist/thirdweb-dev-wallets.cjs.js",
"module": "dist/thirdweb-dev-wallets.esm.js",
"browser": {
@@ -581,7 +581,7 @@
"@aws-sdk/client-secrets-manager": "^3.549.0",
"@babel/plugin-transform-class-properties": "^7.24.1",
"@babel/plugin-transform-flow-strip-types": "^7.24.1",
"@babel/plugin-transform-private-methods": "^7.24.1",
"@babel/plugin-transform-private-methods": "^7.24.7",
"@microsoft/api-extractor": "^7.43.0",
"@nomiclabs/hardhat-ethers": "^2.2.3",
"@preconstruct/cli": "2.7.0",
@@ -593,7 +593,7 @@
"cross-env": "^7.0.3",
"eslint-config-thirdweb": "workspace:*",
"eslint-plugin-better-tree-shaking": "0.0.4",
"eslint-plugin-tsdoc": "^0.2.17",
"eslint-plugin-tsdoc": "^0.3.0",
"ethereum-provider": "^0.7.7",
"ethers": "^5.7.2",
"ethers-aws-kms-signer": "^1.3.2",
+2 -2
View File
@@ -51,7 +51,7 @@
"devDependencies": {
"@babel/plugin-proposal-class-properties": "^7.18.6",
"@babel/plugin-transform-flow-strip-types": "^7.24.1",
"@babel/plugin-transform-private-methods": "^7.24.1",
"@babel/plugin-transform-private-methods": "^7.24.7",
"@babel/preset-env": "^7.24.5",
"@babel/preset-typescript": "^7.24.1",
"@biomejs/biome": "1.7.1",
@@ -66,7 +66,7 @@
"eslint-plugin-import": "^2.29.1",
"eslint-plugin-inclusive-language": "^2.2.1",
"eslint-plugin-prettier": "^5.1.3",
"eslint-plugin-tsdoc": "^0.2.17",
"eslint-plugin-tsdoc": "^0.3.0",
"ethers5": "npm:[email protected]",
"ethers6": "npm:[email protected]",
"knip": "5.9.4",
+8
View File
@@ -1,5 +1,13 @@
# thirdweb
## 5.29.6
### Patch Changes
- [#3366](https://github.com/thirdweb-dev/js/pull/3366) [`9dd1b5a`](https://github.com/thirdweb-dev/js/commit/9dd1b5a5ebaeaecafdcacbb4f4b81c3006d5074c) Thanks [@joaquim-verges](https://github.com/joaquim-verges)! - Fix sign raw message through ethers 5/6 adapters
- [#3369](https://github.com/thirdweb-dev/js/pull/3369) [`b808652`](https://github.com/thirdweb-dev/js/commit/b80865280585548615e4741634ea6b884a16e2cf) Thanks [@jnsdls](https://github.com/jnsdls)! - do not consider localhost a thirdweb url (except for dev mode)
## 5.29.5
### Patch Changes
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "thirdweb",
"version": "5.29.5",
"version": "5.29.6",
"repository": {
"type": "git",
"url": "git+https://github.com/thirdweb-dev/js.git#main"
@@ -3,6 +3,7 @@ import { describe, expect, test } from "vitest";
import { ANVIL_CHAIN } from "../../test/src/chains.js";
import { TEST_CLIENT } from "../../test/src/test-clients.js";
import { ANVIL_PKEY_A, TEST_ACCOUNT_B } from "../../test/src/test-wallets.js";
import { randomBytesBuffer } from "../utils/random.js";
import { privateKeyToAccount } from "../wallets/private-key.js";
import { toEthersSigner } from "./ethers5.js";
@@ -35,6 +36,19 @@ describe("ethers5 adapter", () => {
expect(sig).toBe(expectedSig);
});
test("should sign raw message", async () => {
const signer = await toEthersSigner(
ethers5,
TEST_CLIENT,
account,
ANVIL_CHAIN,
);
const bytes = randomBytesBuffer(32);
const expectedSig = await account.signMessage({ message: { raw: bytes } });
const sig = await signer.signMessage(bytes);
expect(sig).toBe(expectedSig);
});
test("should sign typed data", async () => {
const signer = await toEthersSigner(
ethers5,
+2 -3
View File
@@ -10,7 +10,7 @@ import { type ThirdwebContract, getContract } from "../contract/contract.js";
import { sendTransaction } from "../transaction/actions/send-transaction.js";
import { waitForReceipt } from "../transaction/actions/wait-for-tx-receipt.js";
import { prepareTransaction } from "../transaction/prepare-transaction.js";
import { toHex, uint8ArrayToHex } from "../utils/encoding/hex.js";
import { toHex } from "../utils/encoding/hex.js";
import type { Account } from "../wallets/interfaces/wallet.js";
type Ethers5 = typeof ethers5;
@@ -306,8 +306,7 @@ export async function toEthersSigner(
throw new Error("Account not found");
}
return account.signMessage({
message:
typeof message === "string" ? message : uint8ArrayToHex(message),
message: typeof message === "string" ? message : { raw: message },
});
}
/**
+10 -6
View File
@@ -3,6 +3,7 @@ import { describe, expect, test } from "vitest";
import { ANVIL_CHAIN } from "../../test/src/chains.js";
import { TEST_CLIENT } from "../../test/src/test-clients.js";
import { ANVIL_PKEY_A, TEST_ACCOUNT_B } from "../../test/src/test-wallets.js";
import { randomBytesBuffer } from "../utils/random.js";
import { privateKeyToAccount } from "../wallets/private-key.js";
import { toEthersSigner } from "./ethers6.js";
@@ -24,17 +25,20 @@ describe("toEthersSigner", () => {
});
test("should sign message", async () => {
const signer = await toEthersSigner(
ethers6,
TEST_CLIENT,
account,
ANVIL_CHAIN,
);
const signer = toEthersSigner(ethers6, TEST_CLIENT, account, ANVIL_CHAIN);
const expectedSig = await account.signMessage({ message: "hello world" });
const sig = await signer.signMessage("hello world");
expect(sig).toBe(expectedSig);
});
test("should sign raw message", async () => {
const signer = toEthersSigner(ethers6, TEST_CLIENT, account, ANVIL_CHAIN);
const bytes = randomBytesBuffer(32);
const expectedSig = await account.signMessage({ message: { raw: bytes } });
const sig = await signer.signMessage(bytes);
expect(sig).toBe(expectedSig);
});
test("should sign typed data", async () => {
const signer = await toEthersSigner(
ethers6,
+2 -3
View File
@@ -9,7 +9,7 @@ import type { ThirdwebClient } from "../client/client.js";
import { type ThirdwebContract, getContract } from "../contract/contract.js";
import { toSerializableTransaction } from "../transaction/actions/to-serializable-transaction.js";
import type { PreparedTransaction } from "../transaction/prepare-transaction.js";
import { toHex, uint8ArrayToHex } from "../utils/encoding/hex.js";
import { toHex } from "../utils/encoding/hex.js";
import { resolvePromisedValue } from "../utils/promise/resolve-promised-value.js";
import type { Account } from "../wallets/interfaces/wallet.js";
import { normalizeChainId } from "../wallets/utils/normalizeChainId.js";
@@ -376,8 +376,7 @@ export function toEthersSigner(
throw new Error("Account not found");
}
return account.signMessage({
message:
typeof message === "string" ? message : uint8ArrayToHex(message),
message: typeof message === "string" ? message : { raw: message },
});
}
@@ -11,6 +11,7 @@ import { typedData } from "~test/typed-data.js";
import { ANVIL_CHAIN, FORKED_ETHEREUM_CHAIN } from "../../test/src/chains.js";
import { TEST_CLIENT } from "../../test/src/test-clients.js";
import { randomBytesBuffer } from "../utils/random.js";
import { privateKeyToAccount } from "../wallets/private-key.js";
import { toViemContract, viemAdapter } from "./viem.js";
@@ -35,6 +36,31 @@ describe("walletClient.toViem", () => {
expect(walletClient.signMessage).toBeDefined();
});
test("should sign message", async () => {
if (!walletClient.account) {
throw new Error("Account not found");
}
const expectedSig = await account.signMessage({ message: "hello world" });
const sig = await walletClient.signMessage({
account: walletClient.account,
message: "hello world",
});
expect(sig).toBe(expectedSig);
});
test("should sign raw message", async () => {
if (!walletClient.account) {
throw new Error("Account not found");
}
const bytes = randomBytesBuffer(32);
const expectedSig = await account.signMessage({ message: { raw: bytes } });
const sig = await walletClient.signMessage({
account: walletClient.account,
message: { raw: bytes },
});
expect(sig).toBe(expectedSig);
});
test("should sign typed data", async () => {
expect(walletClient.signTypedData).toBeDefined();
@@ -20,7 +20,7 @@ const account = TEST_ACCOUNT_A;
const client = TEST_CLIENT;
const chain = ANVIL_CHAIN;
describe("erc721: updateMetadata", () => {
describe.runIf(process.env.TW_SECRET_KEY)("erc721: updateMetadata", () => {
beforeEach(async () => {
const address = await deployERC721Contract({
client,
+12 -3
View File
@@ -99,9 +99,18 @@ export function isThirdwebUrl(url: string): boolean {
}
try {
const { hostname } = new URL(url);
const is =
THIRDWEB_DOMAINS.some((domain) => hostname.endsWith(domain)) ||
hostname === "localhost";
try {
// special case for localhost in development only
if (process.env.NODE_ENV === "development") {
if (hostname === "localhost") {
IS_THIRDWEB_URL_CACHE.set(url, true);
return true;
}
}
} catch {}
const is = THIRDWEB_DOMAINS.some((domain) => hostname.endsWith(domain));
IS_THIRDWEB_URL_CACHE.set(url, is);
return is;
} catch {
Binary file not shown.
+407 -247
View File
File diff suppressed because it is too large Load Diff