Compare commits
462
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9a7b2098ee | ||
|
|
2b96f71e19 | ||
|
|
3b6b0746b3 | ||
|
|
b0ec1d8083 | ||
|
|
0af916e42e | ||
|
|
fbde927a0c | ||
|
|
952009cd73 | ||
|
|
580e77b170 | ||
|
|
d275493c59 | ||
|
|
256ee0d5ec | ||
|
|
b4e295d885 | ||
|
|
fa48ab6942 | ||
|
|
cbf486c210 | ||
|
|
247cf57d37 | ||
|
|
b1e8c8e231 | ||
|
|
06b4f29831 | ||
|
|
0a5eb19d67 | ||
|
|
4ed662e841 | ||
|
|
75587c8b38 | ||
|
|
51b3604021 | ||
|
|
5340085823 | ||
|
|
aface46d74 | ||
|
|
5835b62496 | ||
|
|
7ae9f4cda1 | ||
|
|
3152d4e9b4 | ||
|
|
277cfd5ce1 | ||
|
|
72fa3d2225 | ||
|
|
9a329178ef | ||
|
|
01cc54087b | ||
|
|
09b3b339e6 | ||
|
|
aa6bdd0809 | ||
|
|
ff4fb7d360 | ||
|
|
9acf6854df | ||
|
|
a9f9a40345 | ||
|
|
8e6e55b154 | ||
|
|
37b88e3bc3 | ||
|
|
385895ca92 | ||
|
|
5e58c79926 | ||
|
|
2025b8cb8d | ||
|
|
cc5e2ec51f | ||
|
|
0402b8bb37 | ||
|
|
5fe3cec894 | ||
|
|
98009cb3ca | ||
|
|
60fbb767c1 | ||
|
|
5a02c5ec02 | ||
|
|
48ca58b7aa | ||
|
|
046cd0bb5d | ||
|
|
7cb55e7051 | ||
|
|
4939a3d0ba | ||
|
|
550c80fdfa | ||
|
|
79ebbbcad9 | ||
|
|
d665954fee | ||
|
|
a8258b5c15 | ||
|
|
b8086435a4 | ||
|
|
6cc4b8d28b | ||
|
|
02ab92cc5c | ||
|
|
b6b52ea56b | ||
|
|
da95dce580 | ||
|
|
44dbf283c9 | ||
|
+1 |
d844714609 | ||
|
|
5cea8436c1 | ||
|
|
dac8fa7d98 | ||
|
|
7a6534d1a9 | ||
|
|
d5aee62bf4 | ||
|
|
0bfdedd4ba | ||
|
|
c5761b99e9 | ||
|
|
42d9ab68d9 | ||
|
|
fd0650dcac | ||
|
|
ddb3dabe69 | ||
|
|
b96a228273 | ||
|
|
781e26d896 | ||
|
|
f7392138ee | ||
|
|
5eb6fc1bf3 | ||
|
|
7dc685bbec | ||
|
|
4915ac50f8 | ||
|
|
d724ad85c5 | ||
|
|
1d32b299a0 | ||
|
|
cfa7ecbc9a | ||
|
|
8dd7540c45 | ||
|
|
07c7d97c28 | ||
|
|
47e931e0dd | ||
|
|
0407b2c2f3 | ||
|
|
55ffb176f2 | ||
|
|
a9093bcf28 | ||
|
|
db964131b4 | ||
|
|
4393b22805 | ||
|
|
b28c3a5a67 | ||
|
|
4068219145 | ||
|
|
03d1a6d73b | ||
|
|
fd74d79180 | ||
|
|
35f20ceb4f | ||
|
|
db68bd04cd | ||
|
|
3df86ad16f | ||
|
|
4389083ca3 | ||
|
|
4961b597a0 | ||
|
|
7e044c664d | ||
|
|
498df5d69a | ||
|
|
b8d4930305 | ||
|
|
2c0bb07899 | ||
|
|
72ada47596 | ||
|
|
dc9eee735c | ||
|
|
b4aee9b591 | ||
|
|
b5c6eedb38 | ||
|
|
8672c8533c | ||
|
|
bb207473f8 | ||
|
|
10b3a717da | ||
|
|
aa81bedaf2 | ||
|
|
b4676e1b4e | ||
|
|
0135a7790c | ||
|
|
2d088d367c | ||
|
|
546353a479 | ||
|
|
9daf044926 | ||
|
|
7054f9f016 | ||
|
|
a3bb17cb33 | ||
|
|
d03645aefd | ||
|
|
53626f8100 | ||
|
|
8a389f1295 | ||
|
|
4e5eb13b82 | ||
|
|
2b11353909 | ||
|
|
5882091eab | ||
|
|
8fc5f204b0 | ||
|
|
c953571588 | ||
|
|
edcd22d612 | ||
|
|
0d5503aae9 | ||
|
|
998e521733 | ||
|
|
be606dd3c9 | ||
|
|
d794b8f9f4 | ||
|
|
21b29490d4 | ||
|
|
7b1d62b323 | ||
|
|
e78da6b36c | ||
|
|
ed711c8cb2 | ||
|
|
05a7495a13 | ||
|
|
11bb053246 | ||
|
|
efb3546ec8 | ||
|
|
0a5d2b5bdd | ||
|
|
ac3e019cd1 | ||
|
|
3c5dc4804a | ||
|
|
30ac3aef84 | ||
|
|
ef4cb09219 | ||
|
|
ad7dae3b16 | ||
|
|
0fd8aa04a9 | ||
|
|
620e89dc25 | ||
|
|
86d33c4b3e | ||
|
|
d43f6171d9 | ||
|
|
06ca1c407d | ||
|
|
c578a437cc | ||
|
|
0c5b03b8d6 | ||
|
|
9af346eead | ||
|
|
d9fb134ad4 | ||
|
|
1c7264b403 | ||
|
|
a140ee99b2 | ||
|
|
6e1fe6e582 | ||
|
|
536b0f1240 | ||
|
|
b626782b0e | ||
|
|
1d76334dd3 | ||
|
|
d498c79a91 | ||
|
|
736b45ac8e | ||
|
|
b5e1d3bb2b | ||
|
|
6816219ac1 | ||
|
|
48065bcd91 | ||
|
|
a388d07a3d | ||
|
|
483e2b9109 | ||
|
|
f7f4f20737 | ||
|
|
6aa6f7e0bd | ||
|
|
d4d9550713 | ||
|
|
3cb298ac4b | ||
|
|
c747670b98 | ||
|
|
c08e6ba988 | ||
|
|
60fb188943 | ||
|
|
1ce8558df4 | ||
|
|
3ce5f9a0c3 | ||
|
|
3d615a62d0 | ||
|
|
6ce366f59e | ||
|
|
8a2d92046a | ||
|
|
45ae105ed3 | ||
|
|
23d61cfeff | ||
|
|
990c665de9 | ||
|
|
08eaefcf0b | ||
|
|
3d62278aba | ||
|
|
3ab7d1e975 | ||
|
|
c6f44722f9 | ||
|
|
e0ce4a3759 | ||
|
|
04416e7c93 | ||
|
|
5166b24a48 | ||
|
|
bb7ca20e49 | ||
|
|
f41f1a2958 | ||
|
|
d9b7360d1d | ||
|
|
8941b22682 | ||
|
|
f61beace93 | ||
|
|
08403dd9da | ||
|
|
36f3191f3e | ||
|
|
7d2a446ece | ||
|
|
ab575726fe | ||
|
|
8e28b0f5e7 | ||
|
|
e7f1ce43b0 | ||
|
|
224b7241dc | ||
|
|
a0eee749a2 | ||
|
|
20bbad1abc | ||
|
|
a430160e6b | ||
|
|
5745481584 | ||
|
|
afdedb1feb | ||
|
|
01293857fa | ||
|
|
ecdcf82cf3 | ||
|
|
12b07aad9a | ||
|
|
c0e2c9457f | ||
|
|
654b8ab351 | ||
|
|
a5578abf66 | ||
|
|
541e488d5b | ||
|
|
088f2567f6 | ||
|
|
6803e8ca09 | ||
|
|
d60e544a24 | ||
|
|
cc20f93e17 | ||
|
|
329bccec4b | ||
|
|
02d55a063e | ||
|
|
73bee2bed1 | ||
|
|
2a443365bd | ||
|
|
ed47fd5310 | ||
|
|
2a0294d8e6 | ||
|
|
65ecf072eb | ||
|
|
9ce3eb6aad | ||
|
|
e32faeb57a | ||
|
|
6a19426200 | ||
|
|
2bcad4b716 | ||
|
|
193de1e9d8 | ||
|
|
645b0303cc | ||
|
|
16232de9ea | ||
|
|
52056edfd6 | ||
|
|
dec4c4a8cf | ||
|
|
9a015a23cd | ||
|
|
15ef4779e0 | ||
|
|
b8498c2a10 | ||
|
|
56f85e57df | ||
|
|
197a6838f6 | ||
|
|
3bf7f37593 | ||
|
|
6803c3e97c | ||
|
|
b672860397 | ||
|
|
ab14cd8938 | ||
|
|
8687d6ac3a | ||
|
|
a5f16b6dc5 | ||
|
|
6a91b6a025 | ||
|
|
54cfd6d891 | ||
|
|
522453fd56 | ||
|
|
0cba69ca40 | ||
|
|
96b43b8488 | ||
|
|
b4c9515937 | ||
|
|
9b20fc9ad2 | ||
|
|
51bbd3d1bc | ||
|
|
356f7aa643 | ||
|
|
2283e71aca | ||
|
|
90ab9ab031 | ||
|
|
6aee041343 | ||
|
|
21627c03d1 | ||
|
|
ce36322b38 | ||
|
|
564eaccf48 | ||
|
|
aa9e952cb5 | ||
|
|
85a6162137 | ||
|
|
e93aa70ef0 | ||
|
|
6e86123403 | ||
|
|
c60658ed8c | ||
|
|
df5f016d31 | ||
|
|
89102b0c89 | ||
|
|
e1846c4469 | ||
|
|
cc56037e64 | ||
|
|
23d90b3e77 | ||
|
|
6745078947 | ||
|
|
55d1f5c550 | ||
|
|
b694f3c300 | ||
|
|
217879ace1 | ||
|
|
35984362b0 | ||
|
|
bdabbef71a | ||
|
|
2f1df0b535 | ||
|
|
da57610802 | ||
|
|
119e785461 | ||
|
|
5f1e6abb39 | ||
|
|
59206233e1 | ||
|
|
4f99ccb49c | ||
|
|
292a321a95 | ||
|
|
74f898ac28 | ||
|
|
431445e3c6 | ||
|
|
fd7111d544 | ||
|
|
f3b2ae3f6d | ||
|
|
f5ae61aeba | ||
|
|
37e0af5753 | ||
|
|
a034b0321f | ||
|
|
8ffc597c06 | ||
|
|
8eecf4c2d5 | ||
|
|
32cc54423e | ||
|
|
bd86661f54 | ||
|
|
ee4c7de25c | ||
|
|
c68a4bdd1f | ||
|
|
68fa1896f7 | ||
|
|
e21bdd0328 | ||
|
|
c85810eee3 | ||
|
|
d24a6146d8 | ||
|
|
e94b7fdfed | ||
|
|
98efd090f6 | ||
|
|
189daf0280 | ||
|
|
f7b352a585 | ||
|
|
56ad0867bd | ||
|
|
d565100614 | ||
|
|
edaa5b2e6c | ||
|
|
77123a9a5a | ||
|
|
6fd10f94b4 | ||
|
|
afae0873b0 | ||
|
|
4a1d758110 | ||
|
|
c6e74ef0b0 | ||
|
|
bba9767adf | ||
|
|
a5e509438d | ||
|
|
f461290216 | ||
|
|
8febea4db0 | ||
|
|
30e5593dd1 | ||
|
|
f253909710 | ||
|
|
99ffa8ce3b | ||
|
|
61212d27d7 | ||
|
|
58df84f8ba | ||
|
|
b6f48e1088 | ||
|
|
d51230441a | ||
|
|
01e83b6f13 | ||
|
|
907d97bede | ||
|
|
3c8c5d56f2 | ||
|
|
7faab1c09b | ||
|
|
8bb0a6d874 | ||
|
|
b1ede491fb | ||
|
|
f674da7b44 | ||
|
|
748e3e7856 | ||
|
|
738c0ec6c4 | ||
|
|
e4356e76d1 | ||
|
|
8a0dd070d4 | ||
|
|
39bd963015 | ||
|
|
84fc3b6fab | ||
|
|
49ec2d171e | ||
|
|
b92aabe450 | ||
|
|
470e0a144d | ||
|
|
b6bb73b34c | ||
|
|
9886c858d9 | ||
|
|
25de32d45d | ||
|
|
d495a4b8a6 | ||
|
|
2b0fb9d22f | ||
|
|
e9b69300d1 | ||
|
|
4f8438335e | ||
|
|
c3645c451b | ||
|
|
482f6d1b58 | ||
|
|
799d98e862 | ||
|
|
8db78299ea | ||
|
|
1119f63a47 | ||
|
|
32908b7683 | ||
|
|
6a4aab0b8a | ||
|
|
e87d166d2b | ||
|
|
af4b535637 | ||
|
|
a2df187bc1 | ||
|
|
ea0f9479a3 | ||
|
|
bbe329a656 | ||
|
|
05ebbc15a0 | ||
|
|
93bd57337b | ||
|
|
eb521d240a | ||
|
|
aa9b6acc3f | ||
|
|
4ca557ae4a | ||
|
|
93bdec061d | ||
|
|
c6e9406808 | ||
|
|
12ad7fead2 | ||
|
|
7d7685e3fa | ||
|
|
9640e0731f | ||
|
|
87021cee45 | ||
|
|
5305b42db5 | ||
|
|
c8ba96fa00 | ||
|
|
89c821d49e | ||
|
|
318b274aae | ||
|
|
77f0474b88 | ||
|
|
5ffb1cba03 | ||
|
|
0bf29745b0 | ||
|
|
00d0d01e61 | ||
|
|
72b8b9829e | ||
|
|
26cd91ffe1 | ||
|
|
1c3a846045 | ||
|
|
4a69f8c85d | ||
|
|
c7c2530c7f | ||
|
|
7012513bc2 | ||
|
|
28b5d1eb6d | ||
|
|
1e9fad779f | ||
|
|
7e7a507f03 | ||
|
|
5a67d5d894 | ||
|
|
fc96e14750 | ||
|
|
8f962bc15c | ||
|
|
f12a80a475 | ||
|
|
0186721bc4 | ||
|
|
5d67b2807f | ||
|
|
1e4ac67272 | ||
|
|
465d8e2c3d | ||
|
|
a8b790652c | ||
|
|
4828c87691 | ||
|
|
45d2ffcf89 | ||
|
|
bf6df26711 | ||
|
|
e22e4a47d7 | ||
|
|
d2c7f6d758 | ||
|
|
7af99d9a6d | ||
|
|
f0279c2288 | ||
|
|
07194b06e5 | ||
|
|
255c5dcae8 | ||
|
|
8cfb4f38ed | ||
|
|
7c15913e46 | ||
|
|
477324ec85 | ||
|
|
c9ee9b32f0 | ||
|
|
3010d84595 | ||
|
|
81770647ab | ||
|
|
26644d63b5 | ||
|
|
09fae984e7 | ||
|
|
0b1f522906 | ||
|
|
ec36df5f75 | ||
|
|
c93edc4999 | ||
|
|
29146e009d | ||
|
|
ea04edf478 | ||
|
|
c2fec93052 | ||
|
|
d8b54a6f91 | ||
|
|
664d1cd0dd | ||
|
|
4275c8e739 | ||
|
|
82bea3fa10 | ||
|
|
8e8ceaa344 | ||
|
|
77224646d5 | ||
|
|
72db2dc3e1 | ||
|
|
abe88599b6 | ||
|
|
a6610f1211 | ||
|
|
bfdd84939d | ||
|
|
06cc1df3b7 | ||
|
|
4acb2b5561 | ||
|
|
00f4355f1a | ||
|
|
430a5f7934 | ||
|
|
51e6b4146e | ||
|
|
49922de9d9 | ||
|
|
603e24f1e2 | ||
|
|
c9027fced0 | ||
|
|
ac8fa0b345 | ||
|
|
81a32b4dd2 | ||
|
|
bd0bb4fed7 | ||
|
|
b616dca7eb | ||
|
|
59434aac4f | ||
|
|
cef16471f4 | ||
|
|
0db0cc7564 | ||
|
|
229a47413e | ||
|
|
b75bcef55b | ||
|
|
2545a440dc | ||
|
|
0b4b6a5b4e | ||
|
|
b3d57949bd | ||
|
|
1cf1f866d5 | ||
|
|
602d8cbcfa | ||
|
|
33a78e68d1 | ||
|
|
235eb0460a | ||
|
|
3bb846adf0 | ||
|
|
b5648aee83 | ||
|
|
1b8f812fb8 | ||
|
|
1547d76cce | ||
|
|
7c78d1c6e8 | ||
|
|
058e4357c7 | ||
|
|
3a0e904fc2 | ||
|
|
5143d535f4 | ||
|
|
2dd192a567 | ||
|
|
6e9396f535 | ||
|
|
b3b00e510b | ||
|
|
c5c2d9478a | ||
|
|
1a5d9034f9 | ||
|
|
1137a20de4 | ||
|
|
e4d9fa72d8 | ||
|
|
48fe2ce5ed |
@@ -0,0 +1,6 @@
|
||||
# rename this file to .env and fill in the values
|
||||
# this is not required to build the packages but will significantly increase test performance
|
||||
|
||||
# used for unit tests that hit real IPFS gateway
|
||||
# get a secret key from https://thirdweb.com/create-api-key
|
||||
TW_SECRET_KEY=""
|
||||
@@ -6,7 +6,7 @@ runs:
|
||||
steps:
|
||||
- uses: pnpm/action-setup@v2
|
||||
with:
|
||||
version: 7
|
||||
version: 8
|
||||
- name: Setup Node.js
|
||||
uses: actions/setup-node@v3
|
||||
with:
|
||||
|
||||
@@ -59,9 +59,15 @@ To begin:
|
||||
```
|
||||
pnpm install
|
||||
```
|
||||
If you are on windows, use the `--ignore-scripts` flag
|
||||
```
|
||||
pnpm install --ignore-scripts
|
||||
```
|
||||
|
||||
Now you have got the repo on your local machine, and you're ready to start making your changes!
|
||||
|
||||
<br/>
|
||||
|
||||
### Test Your Changes
|
||||
|
||||
We use [yalc](https://github.com/wclr/yalc) to test changes locally.
|
||||
|
||||
@@ -60,7 +60,7 @@ jobs:
|
||||
|
||||
- uses: pnpm/action-setup@v2
|
||||
with:
|
||||
version: 7
|
||||
version: 8
|
||||
|
||||
- uses: actions/cache@v3
|
||||
timeout-minutes: 5
|
||||
@@ -85,7 +85,7 @@ jobs:
|
||||
|
||||
- uses: pnpm/action-setup@v2
|
||||
with:
|
||||
version: 7
|
||||
version: 8
|
||||
|
||||
- uses: actions/cache@v3
|
||||
timeout-minutes: 5
|
||||
@@ -115,7 +115,7 @@ jobs:
|
||||
|
||||
- uses: pnpm/action-setup@v2
|
||||
with:
|
||||
version: 7
|
||||
version: 8
|
||||
|
||||
- uses: actions/cache@v3
|
||||
timeout-minutes: 5
|
||||
@@ -131,3 +131,4 @@ jobs:
|
||||
run: pnpm e2e
|
||||
env:
|
||||
NODE_OPTIONS: "--max_old_space_size=4096"
|
||||
CLI_E2E_API_KEY: ${{ secrets.CLI_E2E_API_KEY }}
|
||||
|
||||
+5
-1
@@ -16,4 +16,8 @@ public/dist
|
||||
yalc.lock
|
||||
build/
|
||||
playwright-report/
|
||||
.vscode/
|
||||
.vscode/
|
||||
.env/
|
||||
|
||||
# Artifacts
|
||||
packages/cli/artifacts/
|
||||
@@ -0,0 +1,201 @@
|
||||
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 2021 Non-Fungible Labs, 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.
|
||||
@@ -20,13 +20,14 @@
|
||||
|
||||
## Packages
|
||||
|
||||
| Package | Description | Latest Version |
|
||||
| ------------------------------ | -------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| [/sdk](./packages/sdk) | Best in class web3 SDK for Browser, Node and Mobile apps | <a href="https://www.npmjs.com/package/@thirdweb-dev/sdk"><img src="https://img.shields.io/npm/v/@thirdweb-dev/sdk?color=red&label=npm&logo=npm" alt="npm version"/></a> |
|
||||
| [/react](./packages/react) | Ultimate collection of React hooks for your web3 apps | <a href="https://www.npmjs.com/package/@thirdweb-dev/react"><img src="https://img.shields.io/npm/v/@thirdweb-dev/react?color=red&label=npm&logo=npm" alt="npm version"/></a> |
|
||||
| [/auth](./packages/auth) | Best in class wallet authentication for Node backends | <a href="https://www.npmjs.com/package/@thirdweb-dev/auth"><img src="https://img.shields.io/npm/v/@thirdweb-dev/auth?color=red&label=npm&logo=npm" alt="npm version"/></a> |
|
||||
| [/storage](./packages/storage) | Best in class decentralized storage SDK for Browser and Node | <a href="https://www.npmjs.com/package/@thirdweb-dev/storage"><img src="https://img.shields.io/npm/v/@thirdweb-dev/storage?color=red&label=npm&logo=npm" alt="npm version"/></a> |
|
||||
| [/cli](./packages/cli) | Publish and deploy smart contracts without dealing with private keys | <a href="https://www.npmjs.com/package/thirdweb"><img src="https://img.shields.io/npm/v/thirdweb?color=red&label=npm&logo=npm" alt="npm version"/></a> |
|
||||
| Package | Description | Latest Version |
|
||||
| ---------------------------------------- | -------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
||||
| [/sdk](./packages/sdk) | Best in class web3 SDK for Browser, Node and Mobile apps | <a href="https://www.npmjs.com/package/@thirdweb-dev/sdk"><img src="https://img.shields.io/npm/v/@thirdweb-dev/sdk?color=red&label=npm&logo=npm" alt="npm version"/></a> |
|
||||
| [/react](./packages/react) | Ultimate collection of React hooks for your web3 apps | <a href="https://www.npmjs.com/package/@thirdweb-dev/react"><img src="https://img.shields.io/npm/v/@thirdweb-dev/react?color=red&label=npm&logo=npm" alt="npm version"/></a> |
|
||||
| [/react-native](./packages/react-native) | Ultimate collection of React hooks for your native mobile web3 apps | <a href="https://www.npmjs.com/package/@thirdweb-dev/react-native"><img src="https://img.shields.io/npm/v/@thirdweb-dev/react-native?color=red&label=npm&logo=npm" alt="npm version"/></a> |
|
||||
| [/auth](./packages/auth) | Best in class wallet authentication for Node backends | <a href="https://www.npmjs.com/package/@thirdweb-dev/auth"><img src="https://img.shields.io/npm/v/@thirdweb-dev/auth?color=red&label=npm&logo=npm" alt="npm version"/></a> |
|
||||
| [/storage](./packages/storage) | Best in class decentralized storage SDK for Browser and Node | <a href="https://www.npmjs.com/package/@thirdweb-dev/storage"><img src="https://img.shields.io/npm/v/@thirdweb-dev/storage?color=red&label=npm&logo=npm" alt="npm version"/></a> |
|
||||
| [/cli](./packages/cli) | Publish and deploy smart contracts without dealing with private keys | <a href="https://www.npmjs.com/package/thirdweb"><img src="https://img.shields.io/npm/v/thirdweb?color=red&label=npm&logo=npm" alt="npm version"/></a> |
|
||||
|
||||
## Documentation
|
||||
|
||||
|
||||
+29
-10
@@ -31,25 +31,44 @@
|
||||
"hotlink-revert": "node ./scripts/hotlink/hotlink-revert.mjs",
|
||||
"explain:major": "node ./scripts/changeset-explain-major.mjs"
|
||||
},
|
||||
"packageManager": "pnpm@7.29.3",
|
||||
"packageManager": "pnpm@8.1.0",
|
||||
"dependencies": {
|
||||
"@changesets/changelog-github": "^0.4.8",
|
||||
"@changesets/cli": "^2.26.1",
|
||||
"@changesets/get-dependents-graph": "^1.3.5",
|
||||
"@changesets/get-release-plan": "^3.0.16",
|
||||
"@changesets/cli": "^2.26.2",
|
||||
"@changesets/get-dependents-graph": "^1.3.6",
|
||||
"@changesets/get-release-plan": "^3.0.17",
|
||||
"@changesets/parse": "^0.3.16",
|
||||
"@manypkg/cli": "^0.20.0",
|
||||
"@manypkg/cli": "^0.21.0",
|
||||
"@manypkg/get-packages": "^1.1.3",
|
||||
"@playwright/test": "1.31.2",
|
||||
"@trivago/prettier-plugin-sort-imports": "^4.1.1",
|
||||
"@types/node": "^18.15.7",
|
||||
"eslint": "^8.36.0",
|
||||
"@trivago/prettier-plugin-sort-imports": "^4.2.0",
|
||||
"@types/node": "^18.17.1",
|
||||
"eslint": "^8.45.0",
|
||||
"mocha": "^10.2.0",
|
||||
"prettier": "^2.8.7",
|
||||
"turbo": "^1.8.5",
|
||||
"prettier": "^3.0.0",
|
||||
"turbo": "^1.10.12",
|
||||
"yalc": "1.0.0-pre.53"
|
||||
},
|
||||
"manypkg": {
|
||||
"defaultBranch": "main"
|
||||
},
|
||||
"pnpm": {
|
||||
"overrides": {
|
||||
"cross-fetch@>=3.0.0 <3.1.5": ">=3.1.5",
|
||||
"got@<11.8.5": ">=11.8.5",
|
||||
"glob-parent@<5.1.2": ">=5.1.2",
|
||||
"node-fetch@<2.6.7": ">=2.6.7",
|
||||
"nth-check@<2.0.1": ">=2.0.1",
|
||||
"socket.io-parser@>=4.0.4 <4.2.3": ">=4.2.3",
|
||||
"fast-xml-parser@<4.2.4": ">=4.2.4",
|
||||
"@openzeppelin/contracts@>=4.3.0 <4.9.1": ">=4.9.1",
|
||||
"@openzeppelin/contracts@>=4.7.0 <4.9.2": ">=4.9.2",
|
||||
"xml2js@<0.5.0": ">=0.5.0",
|
||||
"engine.io@>=5.1.0 <6.4.2": ">=6.4.2",
|
||||
"semver@<7.5.2": ">=7.5.2",
|
||||
"json5@<1.0.2": ">=1.0.2",
|
||||
"protobufjs@>=6.10.0 <7.2.4": ">=7.2.4",
|
||||
"tough-cookie@<4.1.3": ">=4.1.3"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,351 @@
|
||||
# @thirdweb-dev/auth
|
||||
|
||||
## 3.2.24
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [[`3b6b0746`](https://github.com/thirdweb-dev/js/commit/3b6b0746b3fc792f4c5092814a7abfabcbc9801e), [`b0ec1d80`](https://github.com/thirdweb-dev/js/commit/b0ec1d80839efccad11b50afbf2216c2c132cf7e)]:
|
||||
- @thirdweb-dev/wallets@1.1.7
|
||||
|
||||
## 3.2.23
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [[`fbde927a`](https://github.com/thirdweb-dev/js/commit/fbde927a0cb36a6269e045d8e577536f23164ef7)]:
|
||||
- @thirdweb-dev/wallets@1.1.6
|
||||
|
||||
## 3.2.22
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- [#1415](https://github.com/thirdweb-dev/js/pull/1415) [`256ee0d5`](https://github.com/thirdweb-dev/js/commit/256ee0d5ec9c8598aa79cd4cb1fd839c6cc7d390) Thanks [@joaquim-verges](https://github.com/joaquim-verges)! - Downgrade preconstruct to 2.7.0
|
||||
|
||||
- Updated dependencies [[`256ee0d5`](https://github.com/thirdweb-dev/js/commit/256ee0d5ec9c8598aa79cd4cb1fd839c6cc7d390)]:
|
||||
- @thirdweb-dev/wallets@1.1.5
|
||||
|
||||
## 3.2.21
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- [#1409](https://github.com/thirdweb-dev/js/pull/1409) [`b1e8c8e2`](https://github.com/thirdweb-dev/js/commit/b1e8c8e231013182eb46c16d0c441ee0f3bdfdb2) Thanks [@jnsdls](https://github.com/jnsdls)! - update dependencies
|
||||
|
||||
- [#1410](https://github.com/thirdweb-dev/js/pull/1410) [`247cf57d`](https://github.com/thirdweb-dev/js/commit/247cf57d375a4ec0bc6867e0b65a262c94a9e2f2) Thanks [@jnsdls](https://github.com/jnsdls)! - expose `getToken()` helper function
|
||||
|
||||
- Updated dependencies [[`06b4f298`](https://github.com/thirdweb-dev/js/commit/06b4f2983161fc9ff5913fd05dacf17260902576), [`b1e8c8e2`](https://github.com/thirdweb-dev/js/commit/b1e8c8e231013182eb46c16d0c441ee0f3bdfdb2), [`2025b8cb`](https://github.com/thirdweb-dev/js/commit/2025b8cb8d5157c03314e5db47a0d50382519c41), [`385895ca`](https://github.com/thirdweb-dev/js/commit/385895ca928a5276586f0a370fabdcece7620d83), [`9acf6854`](https://github.com/thirdweb-dev/js/commit/9acf6854dfdc5c0be768e660c1f174e017b06a9c), [`48ca58b7`](https://github.com/thirdweb-dev/js/commit/48ca58b7aa45348b928932b9c7b76b3dc233e429), [`60fbb767`](https://github.com/thirdweb-dev/js/commit/60fbb767c18ffe1e49792c6ac8e808792acf594c), [`277cfd5c`](https://github.com/thirdweb-dev/js/commit/277cfd5ce1f3a576d29c95492c735b46a00c164e), [`2025b8cb`](https://github.com/thirdweb-dev/js/commit/2025b8cb8d5157c03314e5db47a0d50382519c41), [`cc5e2ec5`](https://github.com/thirdweb-dev/js/commit/cc5e2ec51fce09af05be33811eb46980825829ee), [`7ae9f4cd`](https://github.com/thirdweb-dev/js/commit/7ae9f4cda1a2009dd414f836757bec8202c83172)]:
|
||||
- @thirdweb-dev/wallets@1.1.4
|
||||
|
||||
## 3.2.20
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies []:
|
||||
- @thirdweb-dev/wallets@1.1.3
|
||||
|
||||
## 3.2.19
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies []:
|
||||
- @thirdweb-dev/wallets@1.1.2
|
||||
|
||||
## 3.2.18
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies []:
|
||||
- @thirdweb-dev/wallets@1.1.1
|
||||
|
||||
## 3.2.17
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [[`d8447146`](https://github.com/thirdweb-dev/js/commit/d8447146092c1962f410155ab2047225453aaa2b)]:
|
||||
- @thirdweb-dev/wallets@1.1.0
|
||||
|
||||
## 3.2.16
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [[`c5761b99`](https://github.com/thirdweb-dev/js/commit/c5761b99e9797772481506e90cbfa5c35a05bd1d), [`b96a2282`](https://github.com/thirdweb-dev/js/commit/b96a2282730582b684cc96802649a96851af5220)]:
|
||||
- @thirdweb-dev/wallets@1.0.12
|
||||
|
||||
## 3.2.15
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies []:
|
||||
- @thirdweb-dev/wallets@1.0.11
|
||||
|
||||
## 3.2.14
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies []:
|
||||
- @thirdweb-dev/wallets@1.0.10
|
||||
|
||||
## 3.2.13
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies []:
|
||||
- @thirdweb-dev/wallets@1.0.9
|
||||
|
||||
## 3.2.12
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies []:
|
||||
- @thirdweb-dev/wallets@1.0.8
|
||||
|
||||
## 3.2.11
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies []:
|
||||
- @thirdweb-dev/wallets@1.0.7
|
||||
|
||||
## 3.2.10
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies []:
|
||||
- @thirdweb-dev/wallets@1.0.6
|
||||
|
||||
## 3.2.9
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [[`10b3a717`](https://github.com/thirdweb-dev/js/commit/10b3a717da606632a05769ac821bdd21d6b63a03), [`b4aee9b5`](https://github.com/thirdweb-dev/js/commit/b4aee9b59121bab5f9b3d9b7ecdc4bcb4cd66f58)]:
|
||||
- @thirdweb-dev/wallets@1.0.5
|
||||
|
||||
## 3.2.8
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- [#1278](https://github.com/thirdweb-dev/js/pull/1278) [`8a389f12`](https://github.com/thirdweb-dev/js/commit/8a389f1295d2bf726059997ea0ca10cf0424f2a2) Thanks [@jnsdls](https://github.com/jnsdls)! - updated various dependencies
|
||||
|
||||
- Updated dependencies [[`8a389f12`](https://github.com/thirdweb-dev/js/commit/8a389f1295d2bf726059997ea0ca10cf0424f2a2)]:
|
||||
- @thirdweb-dev/wallets@1.0.4
|
||||
|
||||
## 3.2.7
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [[`2b113539`](https://github.com/thirdweb-dev/js/commit/2b113539098384f910b3c4d54e1fde9d35a6f053), [`be606dd3`](https://github.com/thirdweb-dev/js/commit/be606dd3c93c1514834c1d970e864d7f949a07ab), [`998e5217`](https://github.com/thirdweb-dev/js/commit/998e521733efd6a67e42f9bf0beab5fbdccf08ae)]:
|
||||
- @thirdweb-dev/wallets@1.0.3
|
||||
|
||||
## 3.2.6
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [[`ed711c8c`](https://github.com/thirdweb-dev/js/commit/ed711c8cb2ed6a0deb1b2a5eeec06df1d4edc5e8), [`05a7495a`](https://github.com/thirdweb-dev/js/commit/05a7495a132aabab5f48abbdb80a468ff6f65df8), [`e78da6b3`](https://github.com/thirdweb-dev/js/commit/e78da6b36cfa6d954234820563201bf760186ed1)]:
|
||||
- @thirdweb-dev/wallets@1.0.2
|
||||
|
||||
## 3.2.5
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [[`efb3546e`](https://github.com/thirdweb-dev/js/commit/efb3546ec8268156be00301af28b9d83ecd5ab08)]:
|
||||
- @thirdweb-dev/wallets@1.0.1
|
||||
|
||||
## 3.2.4
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- [#1250](https://github.com/thirdweb-dev/js/pull/1250) [`d43f6171`](https://github.com/thirdweb-dev/js/commit/d43f6171d910e31b748b171b012174390aac3fff) Thanks [@adam-maj](https://github.com/adam-maj)! - Allow setting login payload validity duration
|
||||
|
||||
- Updated dependencies [[`ac3e019c`](https://github.com/thirdweb-dev/js/commit/ac3e019cd1776dbdb0d06b213420ad17586f678e), [`3c5dc480`](https://github.com/thirdweb-dev/js/commit/3c5dc4804abc56b933ec45e9e1da11eb182296cc)]:
|
||||
- @thirdweb-dev/wallets@1.0.0
|
||||
|
||||
## 3.2.3
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [[`536b0f12`](https://github.com/thirdweb-dev/js/commit/536b0f1240ab446aac22cf547a4e09e73ee6bf7b), [`b626782b`](https://github.com/thirdweb-dev/js/commit/b626782b0e8c6b76673472d3aee1c802dfb11b5f)]:
|
||||
- @thirdweb-dev/wallets@0.3.3
|
||||
|
||||
## 3.2.2
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [[`3cb298ac`](https://github.com/thirdweb-dev/js/commit/3cb298ac4b04d295899b5ac77c7fc5869ec2f5f2), [`3ce5f9a0`](https://github.com/thirdweb-dev/js/commit/3ce5f9a0c3fc7e99b5abf691a87048ab8475f6b1), [`a388d07a`](https://github.com/thirdweb-dev/js/commit/a388d07a3d449e56dc53fed9600931022f4a15e1), [`1ce8558d`](https://github.com/thirdweb-dev/js/commit/1ce8558df47186bcba5ee8564fdb04583bf115dd), [`60fb1889`](https://github.com/thirdweb-dev/js/commit/60fb18894372f14d9cd815fa9a239926d31bb273)]:
|
||||
- @thirdweb-dev/wallets@0.3.2
|
||||
|
||||
## 3.2.1
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [[`3d62278a`](https://github.com/thirdweb-dev/js/commit/3d62278aba79101ae1158fb726d6ddfed505c939)]:
|
||||
- @thirdweb-dev/wallets@0.3.1
|
||||
|
||||
## 3.2.0
|
||||
|
||||
### Minor Changes
|
||||
|
||||
- [#1150](https://github.com/thirdweb-dev/js/pull/1150) [`d60e544a`](https://github.com/thirdweb-dev/js/commit/d60e544a240b93312743e62096ee2dc77d0c1bd1) Thanks [@adam-maj](https://github.com/adam-maj)! - Add support for multipled logged in accounts and token refreshing to auth
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- [#1165](https://github.com/thirdweb-dev/js/pull/1165) [`088f2567`](https://github.com/thirdweb-dev/js/commit/088f2567f615360edd44776b20ae0bedff250f43) Thanks [@adam-maj](https://github.com/adam-maj)! - Include chain id in login payload
|
||||
|
||||
- Updated dependencies [[`654b8ab3`](https://github.com/thirdweb-dev/js/commit/654b8ab35184e02127a5a47f05d78606dd5b29ca), [`329bccec`](https://github.com/thirdweb-dev/js/commit/329bccec4b88b02db5bac6c1415158928843376a)]:
|
||||
- @thirdweb-dev/wallets@0.3.0
|
||||
|
||||
## 3.1.1
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- [#1126](https://github.com/thirdweb-dev/js/pull/1126) [`ab14cd89`](https://github.com/thirdweb-dev/js/commit/ab14cd89385aefad7f32e20a22baa9fce42b98e2) Thanks [@adam-maj](https://github.com/adam-maj)! - Add expiration date to cookie
|
||||
|
||||
- Updated dependencies [[`2a443365`](https://github.com/thirdweb-dev/js/commit/2a443365bdc3d47d0f41fc895f70256dcde423f5), [`197a6838`](https://github.com/thirdweb-dev/js/commit/197a6838f69ae8b9ad46524e7c469fc757d0a2cb)]:
|
||||
- @thirdweb-dev/wallets@0.2.26
|
||||
|
||||
## 3.1.0
|
||||
|
||||
### Minor Changes
|
||||
|
||||
- [#1114](https://github.com/thirdweb-dev/js/pull/1114) [`2283e71a`](https://github.com/thirdweb-dev/js/commit/2283e71acaaf3d15eb2d6121682f1d2a81eec4f3) Thanks [@adam-maj](https://github.com/adam-maj)! - Switch to server-side payload generation
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- [#1111](https://github.com/thirdweb-dev/js/pull/1111) [`21627c03`](https://github.com/thirdweb-dev/js/commit/21627c03d1bb1658fee19b12d580faa6c7f048d9) Thanks [@adam-maj](https://github.com/adam-maj)! - Update expiration dates for auth
|
||||
|
||||
- Updated dependencies [[`9b20fc9a`](https://github.com/thirdweb-dev/js/commit/9b20fc9ad2d303edc31f44fbd2ea3b4dcf35d11e)]:
|
||||
- @thirdweb-dev/wallets@0.2.25
|
||||
|
||||
## 3.0.23
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- [#1101](https://github.com/thirdweb-dev/js/pull/1101) [`e1846c44`](https://github.com/thirdweb-dev/js/commit/e1846c44696bcb25a6a137d63e117e7d2ce9d979) Thanks [@adam-maj](https://github.com/adam-maj)! - Bump invalid before with 5 minute window
|
||||
|
||||
- [#1098](https://github.com/thirdweb-dev/js/pull/1098) [`67450789`](https://github.com/thirdweb-dev/js/commit/67450789473b6008b86453ee4f4c7b99461223a6) Thanks [@MananTank](https://github.com/MananTank)! - add sideEffects: false in package.json
|
||||
|
||||
- Updated dependencies []:
|
||||
- @thirdweb-dev/wallets@0.2.24
|
||||
|
||||
## 3.0.22
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [[`bba9767a`](https://github.com/thirdweb-dev/js/commit/bba9767adfe20e41055450b86e4448fcb2119855), [`bd86661f`](https://github.com/thirdweb-dev/js/commit/bd86661f54ca2f1eb09cbae35c704dc79be1b63a), [`68fa1896`](https://github.com/thirdweb-dev/js/commit/68fa1896f75d3514e00cc380924fd8bc623064f0), [`292a321a`](https://github.com/thirdweb-dev/js/commit/292a321a95ed2d847097eed205353dd69eeb8d54), [`f3b2ae3f`](https://github.com/thirdweb-dev/js/commit/f3b2ae3f6d9c66356c521d3b9c2a6c096dbb4b57), [`4f99ccb4`](https://github.com/thirdweb-dev/js/commit/4f99ccb49c584946de709fbc01017611d2828b76), [`c85810ee`](https://github.com/thirdweb-dev/js/commit/c85810eee318b10eee4ada61828adaa51f94ea6c), [`35984362`](https://github.com/thirdweb-dev/js/commit/35984362b0a60e5b9c3d3c9731450a8f47deb1c4)]:
|
||||
- @thirdweb-dev/wallets@0.2.23
|
||||
|
||||
## 3.0.21
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [[`30e5593d`](https://github.com/thirdweb-dev/js/commit/30e5593dd1ce9abd809ad216a1cfce77b897093c)]:
|
||||
- @thirdweb-dev/wallets@0.2.22
|
||||
|
||||
## 3.0.20
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [[`b6f48e10`](https://github.com/thirdweb-dev/js/commit/b6f48e1088b5d36a51103de4afda53179029faaf)]:
|
||||
- @thirdweb-dev/wallets@0.2.21
|
||||
|
||||
## 3.0.19
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- [#1013](https://github.com/thirdweb-dev/js/pull/1013) [`b92aabe4`](https://github.com/thirdweb-dev/js/commit/b92aabe450f40b248fd1b7533f1d3bc7f8f25288) Thanks [@adam-maj](https://github.com/adam-maj)! - Expose request on onUser hook
|
||||
|
||||
- Updated dependencies [[`738c0ec6`](https://github.com/thirdweb-dev/js/commit/738c0ec6c4190aa2252233c1382aed5d982cc7b8), [`d495a4b8`](https://github.com/thirdweb-dev/js/commit/d495a4b8a6e0599e5b4611620f3fded80a411173), [`4f843833`](https://github.com/thirdweb-dev/js/commit/4f8438335e3e3731b67ae271cb34c383832242a0)]:
|
||||
- @thirdweb-dev/wallets@0.2.20
|
||||
|
||||
## 3.0.18
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [[`6a4aab0b`](https://github.com/thirdweb-dev/js/commit/6a4aab0b8a2e0f6ff1b47992a3c1e5426a74f7ff)]:
|
||||
- @thirdweb-dev/wallets@0.2.19
|
||||
|
||||
## 3.0.17
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [[`93bdec06`](https://github.com/thirdweb-dev/js/commit/93bdec061dc05ab133e79f5f739dcae9b5393f53), [`ea0f9479`](https://github.com/thirdweb-dev/js/commit/ea0f9479a38d442201e367fce1234c130228fde6), [`05ebbc15`](https://github.com/thirdweb-dev/js/commit/05ebbc15a012855735fba2aa93887b88e14295d1), [`4ca557ae`](https://github.com/thirdweb-dev/js/commit/4ca557ae4ab225e39decc3b7a01a04c0d8e464c7), [`7d7685e3`](https://github.com/thirdweb-dev/js/commit/7d7685e3fab5780b3c1d26b8ef431b96f8486972), [`93bd5733`](https://github.com/thirdweb-dev/js/commit/93bd57337b7d2c2fcd252987d10df3206c839daf)]:
|
||||
- @thirdweb-dev/wallets@0.2.18
|
||||
|
||||
## 3.0.16
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- [#958](https://github.com/thirdweb-dev/js/pull/958) [`72b8b982`](https://github.com/thirdweb-dev/js/commit/72b8b9829eb11d51a63530af62e5634f182c0d03) Thanks [@adam-maj](https://github.com/adam-maj)! - Add extra options to cookie on logout
|
||||
|
||||
- Updated dependencies [[`7012513b`](https://github.com/thirdweb-dev/js/commit/7012513bc20f283b2cde46c0b938af33fe3a1a20), [`5d67b280`](https://github.com/thirdweb-dev/js/commit/5d67b2807f2504add4c202d2eb18897415662fb6), [`f12a80a4`](https://github.com/thirdweb-dev/js/commit/f12a80a4758aa91c43084acedb212de9f36a7371), [`5a67d5d8`](https://github.com/thirdweb-dev/js/commit/5a67d5d89474eac9a638ffaddba139b62965deff), [`d2c7f6d7`](https://github.com/thirdweb-dev/js/commit/d2c7f6d758787fab102ecc0cec16ac74f3c87a1f), [`c7c2530c`](https://github.com/thirdweb-dev/js/commit/c7c2530c7f2ef412f1e40428391e85decf504392), [`e22e4a47`](https://github.com/thirdweb-dev/js/commit/e22e4a47d73e1bbc6e3f0ae7ed56717b44e5ffcd), [`1e4ac672`](https://github.com/thirdweb-dev/js/commit/1e4ac672720c2fb01046bec195877a074ffbda06), [`fc96e147`](https://github.com/thirdweb-dev/js/commit/fc96e14750175b19cb66fa7d50cdbad65b42153a), [`4a69f8c8`](https://github.com/thirdweb-dev/js/commit/4a69f8c85dec420615e9eda8d1ad5b5ef0b87713), [`26cd91ff`](https://github.com/thirdweb-dev/js/commit/26cd91ffe18dad37133a18988f21185c13d64cfb), [`0186721b`](https://github.com/thirdweb-dev/js/commit/0186721bc455aa1f8454839a1a25fa4062b45102), [`1e9fad77`](https://github.com/thirdweb-dev/js/commit/1e9fad779f3ebe535d32c0ce76905a3a8033f2fa), [`7af99d9a`](https://github.com/thirdweb-dev/js/commit/7af99d9a6d54492a29a90288a25b30773a8a10a7), [`8cfb4f38`](https://github.com/thirdweb-dev/js/commit/8cfb4f38ed89c26ad04f19d27c65c24cefa976b6)]:
|
||||
- @thirdweb-dev/wallets@0.2.17
|
||||
|
||||
## 3.0.15
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- [#874](https://github.com/thirdweb-dev/js/pull/874) [`49922de9`](https://github.com/thirdweb-dev/js/commit/49922de9d9c1258e58a3a05e656b229db469b1dd) Thanks [@iketw](https://github.com/iketw)! - [RN] Adds Auth to React Native
|
||||
|
||||
- Adds an optional `secureStorage` to authConfig
|
||||
- Adds `expo-secure-store` to store the JWT token securely in React Native, passing a default value
|
||||
- Stores the token in secure storage to be accessed by subsequent calls
|
||||
- Returns the token in `useLogin` to be used by the user
|
||||
|
||||
How I tested:
|
||||
|
||||
- Tested in Android/iOS/Web
|
||||
|
||||
Usage:
|
||||
|
||||
```
|
||||
<ThirdwebProvider
|
||||
activeChain="ethereum"
|
||||
supportedWallets={[metamaskWallet(), rainbowWallet()]}
|
||||
authConfig={{
|
||||
domain: https://your-domain.com,
|
||||
authUrl: '/api/auth',
|
||||
}}>
|
||||
<AppInner />
|
||||
</ThirdwebProvider>
|
||||
```
|
||||
|
||||
```
|
||||
const { login } = useLogin();
|
||||
const { logout } = useLogout();
|
||||
const { user, isLoggedIn } = useUser();
|
||||
...
|
||||
|
||||
const token = await login();
|
||||
```
|
||||
|
||||
- Updated dependencies [[`4acb2b55`](https://github.com/thirdweb-dev/js/commit/4acb2b5561118dde5c7372400d4d754b879aef2e), [`82bea3fa`](https://github.com/thirdweb-dev/js/commit/82bea3fa10294eb3c5c7327fb047e3d1b2c62ff9), [`664d1cd0`](https://github.com/thirdweb-dev/js/commit/664d1cd0dd03f32337c2cf532f0ad860e5aa5ea8), [`c2fec930`](https://github.com/thirdweb-dev/js/commit/c2fec930520e2df89532ec0027ead4563c7708cf)]:
|
||||
- @thirdweb-dev/[email protected]
|
||||
|
||||
## 3.0.14
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [[`b616dca7`](https://github.com/thirdweb-dev/js/commit/b616dca7eb861cd1d2adba3f3d1fe9c3b50f259e), [`2545a440`](https://github.com/thirdweb-dev/js/commit/2545a440dc272690cacbc23023f7b0a68f390c6e), [`229a4741`](https://github.com/thirdweb-dev/js/commit/229a47413e422952ad946b8c09af32cc1fcdc7f0)]:
|
||||
- @thirdweb-dev/[email protected]
|
||||
|
||||
## 3.0.13
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [[`235eb046`](https://github.com/thirdweb-dev/js/commit/235eb0460ae0638f63acf82957bcfea41b9e955d)]:
|
||||
- @thirdweb-dev/[email protected]
|
||||
|
||||
## 3.0.12
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [[`c5c2d947`](https://github.com/thirdweb-dev/js/commit/c5c2d9478acd4d4a4e6ce814716bdf1b6e51eafc), [`2dd192a5`](https://github.com/thirdweb-dev/js/commit/2dd192a5676f1b6d3c310ec796bf331252098d48)]:
|
||||
- @thirdweb-dev/[email protected]
|
||||
|
||||
## 3.0.11
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies []:
|
||||
- @thirdweb-dev/[email protected]
|
||||
|
||||
## 3.0.10
|
||||
|
||||
### Patch Changes
|
||||
|
||||
+10
-2
@@ -13,6 +13,14 @@
|
||||
<p align="center"><strong>Best in class wallet authentication for Node backends</strong></p>
|
||||
<br />
|
||||
|
||||
## Overview
|
||||
|
||||
Auth is a developer SDK that lets you integrate passwordless web3-native authentication and authorization into your applications.
|
||||
|
||||
It enables users to sign in with their wallets, allowing apps to access rich blockchain-level data and interact with their users on-chain.
|
||||
|
||||
With Auth, developers can build applications that have secure, self-custodied, web3-first authentication.
|
||||
|
||||
## Installation
|
||||
|
||||
Install the latest version of the SDK with either `npm` or `yarn`:
|
||||
@@ -25,6 +33,6 @@ npm install @thirdweb-dev/auth
|
||||
yarn add @thirdweb-dev/auth
|
||||
```
|
||||
|
||||
## Documentation
|
||||
## Resources
|
||||
|
||||
- [Auth Docs](https://portal.thirdweb.com/auth)
|
||||
- Check out the [Auth Documentation](https://portal.thirdweb.com/auth) for full guides and API references on how to use Auth.
|
||||
|
||||
+23
-21
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@thirdweb-dev/auth",
|
||||
"version": "3.0.10",
|
||||
"version": "3.2.24",
|
||||
"main": "dist/thirdweb-dev-auth.cjs.js",
|
||||
"module": "dist/thirdweb-dev-auth.esm.js",
|
||||
"browser": {
|
||||
@@ -54,13 +54,15 @@
|
||||
"repository": "https://github.com/thirdweb-dev/js/tree/main/packages/auth",
|
||||
"author": "thirdweb eng <[email protected]>",
|
||||
"license": "Apache-2.0",
|
||||
"sideEffects": false,
|
||||
"scripts": {
|
||||
"build": "preconstruct build",
|
||||
"format": "prettier --write 'src/**/*'",
|
||||
"lint": "eslint src/",
|
||||
"fix": "eslint src/ --fix",
|
||||
"clean": "rm -rf dist/ && rm -rf node_modules/",
|
||||
"test": "mocha --config './test/.mocharc.json' --timeout 30000 --parallel './test/**/*.test.ts'"
|
||||
"test": "mocha --config './test/.mocharc.json' --timeout 30000 --parallel './test/**/*.test.ts'",
|
||||
"push": "yalc push"
|
||||
},
|
||||
"preconstruct": {
|
||||
"entrypoints": [
|
||||
@@ -78,41 +80,41 @@
|
||||
}
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/core": "^7.19.3",
|
||||
"@babel/preset-env": "^7.18.10",
|
||||
"@babel/preset-typescript": "^7.18.6",
|
||||
"@microsoft/api-documenter": "^7.19.4",
|
||||
"@microsoft/api-extractor": "^7.29.2",
|
||||
"@babel/core": "^7.22.9",
|
||||
"@babel/preset-env": "^7.22.9",
|
||||
"@babel/preset-typescript": "^7.22.5",
|
||||
"@microsoft/api-documenter": "^7.22.30",
|
||||
"@microsoft/api-extractor": "^7.36.3",
|
||||
"@microsoft/tsdoc": "^0.14.1",
|
||||
"@preconstruct/cli": "^2.2.1",
|
||||
"@preconstruct/cli": "2.7.0",
|
||||
"@solana/web3.js": "^1.62.0",
|
||||
"@swc-node/register": "^1.5.1",
|
||||
"@swc/core": "^1.3.23",
|
||||
"@swc-node/register": "^1.6.6",
|
||||
"@swc/core": "^1.3.71",
|
||||
"@thirdweb-dev/tsconfig": "workspace:*",
|
||||
"@types/chai": "^4.3.3",
|
||||
"@types/chai": "^4.3.5",
|
||||
"@types/cookie": "^0.5.1",
|
||||
"@types/cookie-parser": "^1.4.3",
|
||||
"@types/express": "^4.17.13",
|
||||
"@types/mocha": "^10.0.0",
|
||||
"@types/uuid": "^9.0.0",
|
||||
"@typescript-eslint/eslint-plugin": "^5.33.0",
|
||||
"@typescript-eslint/parser": "^5.33.0",
|
||||
"@types/uuid": "^9.0.2",
|
||||
"@typescript-eslint/eslint-plugin": "^6.2.0",
|
||||
"@typescript-eslint/parser": "^6.2.0",
|
||||
"chai": "^4.3.6",
|
||||
"cookie-parser": "^1.4.6",
|
||||
"eslint": "^8.21.0",
|
||||
"eslint-config-prettier": "^8.3.0",
|
||||
"eslint": "^8.45.0",
|
||||
"eslint-config-prettier": "^8.9.0",
|
||||
"eslint-config-thirdweb": "workspace:*",
|
||||
"eslint-plugin-import": "^2.26.0",
|
||||
"eslint-plugin-inclusive-language": "^2.2.0",
|
||||
"eslint-plugin-prettier": "^4.2.1",
|
||||
"eslint-plugin-prettier": "^5.0.0",
|
||||
"eslint-plugin-tsdoc": "^0.2.16",
|
||||
"ethers": "^5.7.2",
|
||||
"express": "^4.18.1",
|
||||
"mocha": "^10.2.0",
|
||||
"next": "^12.2.0",
|
||||
"next-auth": "^4.20.1",
|
||||
"prettier": "^2.7.1",
|
||||
"typescript": "^4.7.4"
|
||||
"next": "^12.3.4",
|
||||
"next-auth": "^4.22.3",
|
||||
"prettier": "^3.0.0",
|
||||
"typescript": "^5.1.6"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@solana/web3.js": "^1.73.0",
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
const THIRDWEB_AUTH_COOKIE_PREFIX = `thirdweb_auth`;
|
||||
export const THIRDWEB_AUTH_TOKEN_COOKIE_PREFIX = `${THIRDWEB_AUTH_COOKIE_PREFIX}_token`;
|
||||
export const THIRDWEB_AUTH_ACTIVE_ACCOUNT_COOKIE = `${THIRDWEB_AUTH_COOKIE_PREFIX}_active_account`;
|
||||
|
||||
export const THIRDWEB_AUTH_DEFAULT_LOGIN_PAYLOAD_DURATION_IN_SECONDS = 60 * 10;
|
||||
export const THIRDWEB_AUTH_DEFAULT_TOKEN_DURATION_IN_SECONDS = 60 * 60 * 24;
|
||||
export const THIRDWEB_AUTH_DEFAULT_REFRESH_INTERVAL_IN_SECONDS = 5;
|
||||
@@ -1,3 +1,7 @@
|
||||
import {
|
||||
THIRDWEB_AUTH_DEFAULT_LOGIN_PAYLOAD_DURATION_IN_SECONDS,
|
||||
THIRDWEB_AUTH_DEFAULT_TOKEN_DURATION_IN_SECONDS,
|
||||
} from "../constants";
|
||||
import {
|
||||
LoginOptions,
|
||||
LoginPayload,
|
||||
@@ -6,7 +10,6 @@ import {
|
||||
LoginPayloadDataSchema,
|
||||
AuthenticationPayloadDataSchema,
|
||||
AuthenticationPayloadData,
|
||||
LoginOptionsSchema,
|
||||
VerifyOptionsSchema,
|
||||
VerifyOptions,
|
||||
GenerateOptionsSchema,
|
||||
@@ -14,6 +17,9 @@ import {
|
||||
AuthenticateOptions,
|
||||
User,
|
||||
Json,
|
||||
LoginOptionsSchema,
|
||||
AuthenticationPayload,
|
||||
AuthenticationPayloadDataInput,
|
||||
} from "./schema";
|
||||
import { isBrowser } from "./utils";
|
||||
import type { GenericAuthWallet } from "@thirdweb-dev/wallets";
|
||||
@@ -31,7 +37,7 @@ export class ThirdwebAuth {
|
||||
this.wallet = wallet;
|
||||
}
|
||||
|
||||
public async login(options?: LoginOptions): Promise<LoginPayload> {
|
||||
public async payload(options?: LoginOptions): Promise<LoginPayloadData> {
|
||||
const parsedOptions = LoginOptionsSchema.parse(options);
|
||||
|
||||
let chainId: string | undefined = parsedOptions?.chainId;
|
||||
@@ -43,32 +49,48 @@ export class ThirdwebAuth {
|
||||
}
|
||||
}
|
||||
|
||||
const payloadData = LoginPayloadDataSchema.parse({
|
||||
return LoginPayloadDataSchema.parse({
|
||||
type: this.wallet.type,
|
||||
domain: parsedOptions?.domain || this.domain,
|
||||
address: await this.wallet.getAddress(),
|
||||
address: parsedOptions?.address || (await this.wallet.getAddress()),
|
||||
statement: parsedOptions?.statement,
|
||||
version: parsedOptions?.version,
|
||||
uri:
|
||||
parsedOptions?.uri ||
|
||||
(isBrowser() ? window.location.origin : undefined),
|
||||
uri: parsedOptions?.uri,
|
||||
chain_id: chainId,
|
||||
nonce: parsedOptions?.nonce,
|
||||
expiration_time:
|
||||
parsedOptions?.expirationTime || new Date(Date.now() + 1000 * 60 * 5),
|
||||
invalid_before: parsedOptions?.invalidBefore,
|
||||
parsedOptions?.expirationTime ||
|
||||
new Date(
|
||||
Date.now() +
|
||||
1000 * THIRDWEB_AUTH_DEFAULT_LOGIN_PAYLOAD_DURATION_IN_SECONDS,
|
||||
),
|
||||
invalid_before:
|
||||
parsedOptions?.invalidBefore ||
|
||||
new Date(
|
||||
Date.now() -
|
||||
1000 * THIRDWEB_AUTH_DEFAULT_LOGIN_PAYLOAD_DURATION_IN_SECONDS,
|
||||
),
|
||||
resources: parsedOptions?.resources,
|
||||
});
|
||||
}
|
||||
|
||||
const message = this.generateMessage(payloadData);
|
||||
public async loginWithPayload(
|
||||
payload: LoginPayloadData,
|
||||
): Promise<LoginPayload> {
|
||||
const message = this.generateMessage(payload);
|
||||
const signature = await this.wallet.signMessage(message);
|
||||
|
||||
return {
|
||||
payload: payloadData,
|
||||
payload,
|
||||
signature,
|
||||
};
|
||||
}
|
||||
|
||||
public async login(options?: LoginOptions): Promise<LoginPayload> {
|
||||
const payloadData = await this.payload(options);
|
||||
return await this.loginWithPayload(payloadData);
|
||||
}
|
||||
|
||||
public async verify(
|
||||
payload: LoginPayload,
|
||||
options?: VerifyOptions,
|
||||
@@ -209,41 +231,37 @@ export class ThirdwebAuth {
|
||||
}
|
||||
|
||||
const adminAddress = await this.wallet.getAddress();
|
||||
const payloadData = AuthenticationPayloadDataSchema.parse({
|
||||
return this.createToken({
|
||||
iss: adminAddress,
|
||||
sub: userAddress,
|
||||
aud: domain,
|
||||
nbf: parsedOptions?.invalidBefore || new Date(),
|
||||
exp:
|
||||
parsedOptions?.expirationTime ||
|
||||
new Date(Date.now() + 1000 * 60 * 60 * 5),
|
||||
new Date(
|
||||
Date.now() + 1000 * THIRDWEB_AUTH_DEFAULT_TOKEN_DURATION_IN_SECONDS,
|
||||
),
|
||||
iat: new Date(),
|
||||
jti: parsedOptions?.tokenId,
|
||||
ctx: session,
|
||||
});
|
||||
}
|
||||
|
||||
const message = JSON.stringify(payloadData);
|
||||
const signature = await this.wallet.signMessage(message);
|
||||
|
||||
// Header used for JWT token specifying hash algorithm
|
||||
const header = {
|
||||
// Specify ECDSA with SHA-256 for hashing algorithm
|
||||
alg: "ES256",
|
||||
typ: "JWT",
|
||||
};
|
||||
|
||||
const encodedHeader = Buffer.from(JSON.stringify(header)).toString(
|
||||
"base64",
|
||||
);
|
||||
const encodedData = Buffer.from(JSON.stringify(payloadData))
|
||||
.toString("base64")
|
||||
.replace(/=/g, "");
|
||||
const encodedSignature = Buffer.from(signature).toString("base64");
|
||||
|
||||
// Generate a JWT token with base64 encoded header, payload, and signature
|
||||
const token = `${encodedHeader}.${encodedData}.${encodedSignature}`;
|
||||
|
||||
return token;
|
||||
public async refresh(token: string, expirationTime?: Date): Promise<string> {
|
||||
const { payload } = this.parseToken(token);
|
||||
return this.createToken({
|
||||
iss: payload.iss,
|
||||
sub: payload.sub,
|
||||
aud: payload.aud,
|
||||
nbf: new Date(),
|
||||
exp:
|
||||
expirationTime ||
|
||||
new Date(
|
||||
Date.now() + 1000 * THIRDWEB_AUTH_DEFAULT_TOKEN_DURATION_IN_SECONDS,
|
||||
),
|
||||
iat: new Date(),
|
||||
ctx: payload.ctx,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -278,12 +296,7 @@ export class ThirdwebAuth {
|
||||
const parsedOptions = AuthenticateOptionsSchema.parse(options);
|
||||
const domain = parsedOptions?.domain || this.domain;
|
||||
|
||||
const encodedPayload = token.split(".")[1];
|
||||
const encodedSignature = token.split(".")[2];
|
||||
const payload: AuthenticationPayloadData = JSON.parse(
|
||||
Buffer.from(encodedPayload, "base64").toString(),
|
||||
);
|
||||
const signature = Buffer.from(encodedSignature, "base64").toString();
|
||||
const { payload, signature } = this.parseToken(token);
|
||||
|
||||
// Check that the payload unique ID is valid
|
||||
if (parsedOptions?.validateTokenId !== undefined) {
|
||||
@@ -351,6 +364,49 @@ export class ThirdwebAuth {
|
||||
};
|
||||
}
|
||||
|
||||
public parseToken(token: string): AuthenticationPayload {
|
||||
const encodedPayload = token.split(".")[1];
|
||||
const encodedSignature = token.split(".")[2];
|
||||
const payload: AuthenticationPayloadData = JSON.parse(
|
||||
Buffer.from(encodedPayload, "base64").toString(),
|
||||
);
|
||||
const signature = Buffer.from(encodedSignature, "base64").toString();
|
||||
|
||||
return {
|
||||
payload,
|
||||
signature,
|
||||
};
|
||||
}
|
||||
|
||||
private async createToken(
|
||||
payload: AuthenticationPayloadDataInput,
|
||||
): Promise<string> {
|
||||
const payloadData = AuthenticationPayloadDataSchema.parse(payload);
|
||||
|
||||
const message = JSON.stringify(payloadData);
|
||||
const signature = await this.wallet.signMessage(message);
|
||||
|
||||
// Header used for JWT token specifying hash algorithm
|
||||
const header = {
|
||||
// Specify ECDSA with SHA-256 for hashing algorithm
|
||||
alg: "ES256",
|
||||
typ: "JWT",
|
||||
};
|
||||
|
||||
const encodedHeader = Buffer.from(JSON.stringify(header)).toString(
|
||||
"base64",
|
||||
);
|
||||
const encodedData = Buffer.from(JSON.stringify(payloadData))
|
||||
.toString("base64")
|
||||
.replace(/=/g, "");
|
||||
const encodedSignature = Buffer.from(signature).toString("base64");
|
||||
|
||||
// Generate a JWT token with base64 encoded header, payload, and signature
|
||||
const token = `${encodedHeader}.${encodedData}.${encodedSignature}`;
|
||||
|
||||
return token;
|
||||
}
|
||||
|
||||
private async verifySignature(
|
||||
message: string,
|
||||
signature: string,
|
||||
|
||||
@@ -34,6 +34,7 @@ const JsonSchema: z.ZodType<Json> = z.lazy(
|
||||
export const LoginOptionsSchema = z
|
||||
.object({
|
||||
domain: z.string().optional(),
|
||||
address: z.string().optional(),
|
||||
statement: z.string().optional(),
|
||||
uri: z.string().optional(),
|
||||
version: z.string().optional(),
|
||||
@@ -179,6 +180,13 @@ export type AuthenticationPayloadData = z.output<
|
||||
typeof AuthenticationPayloadDataSchema
|
||||
>;
|
||||
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
export type AuthenticationPayloadDataInput = z.input<
|
||||
typeof AuthenticationPayloadDataSchema
|
||||
>;
|
||||
|
||||
/**
|
||||
* @public
|
||||
*/
|
||||
|
||||
@@ -1,24 +1,56 @@
|
||||
import {
|
||||
THIRDWEB_AUTH_ACTIVE_ACCOUNT_COOKIE,
|
||||
THIRDWEB_AUTH_TOKEN_COOKIE_PREFIX,
|
||||
} from "../../constants";
|
||||
import { Json } from "../../core/schema";
|
||||
import { ThirdwebAuthContext, ThirdwebAuthUser } from "../types";
|
||||
import { Request } from "express";
|
||||
|
||||
function getToken(req: Request): string | undefined {
|
||||
export function getCookie(req: Request, cookie: string): string | undefined {
|
||||
if (typeof req.cookies.get === "function") {
|
||||
return req.cookies.get(cookie);
|
||||
}
|
||||
|
||||
return req.cookies[cookie];
|
||||
}
|
||||
|
||||
export function getActiveCookie(req: Request): string | undefined {
|
||||
if (!req.cookies) {
|
||||
return undefined;
|
||||
}
|
||||
|
||||
const activeAccount = getCookie(req, THIRDWEB_AUTH_ACTIVE_ACCOUNT_COOKIE);
|
||||
if (activeAccount) {
|
||||
return `${THIRDWEB_AUTH_TOKEN_COOKIE_PREFIX}_${activeAccount}`;
|
||||
}
|
||||
|
||||
// If active account is not present, then use the old default
|
||||
return THIRDWEB_AUTH_TOKEN_COOKIE_PREFIX;
|
||||
}
|
||||
|
||||
/**
|
||||
* @internal
|
||||
* @param req
|
||||
* @returns
|
||||
*/
|
||||
export function getToken(req: Request): string | undefined {
|
||||
if (req.headers["authorization"]) {
|
||||
const authorizationHeader = req.headers["authorization"].split(" ");
|
||||
if (authorizationHeader?.length === 2) {
|
||||
return authorizationHeader[1];
|
||||
}
|
||||
}
|
||||
|
||||
if (!req.cookies) {
|
||||
return undefined;
|
||||
}
|
||||
|
||||
const cookie: string | undefined = !req.cookies
|
||||
? undefined
|
||||
: typeof req.cookies.get === "function"
|
||||
? (req.cookies as any).get("thirdweb_auth_token")
|
||||
: (req.cookies as any).thirdweb_auth_token;
|
||||
const activeCookie = getActiveCookie(req);
|
||||
if (!activeCookie) {
|
||||
return undefined;
|
||||
}
|
||||
|
||||
return cookie;
|
||||
return getCookie(req, activeCookie);
|
||||
}
|
||||
|
||||
export async function getUser<
|
||||
@@ -51,7 +83,7 @@ export async function getUser<
|
||||
return authenticatedUser;
|
||||
}
|
||||
|
||||
const data = await ctx.callbacks.onUser(authenticatedUser);
|
||||
const data = await ctx.callbacks.onUser(authenticatedUser, req);
|
||||
if (!data) {
|
||||
return authenticatedUser;
|
||||
}
|
||||
|
||||
@@ -1,8 +1,10 @@
|
||||
import { Json, ThirdwebAuth as ThirdwebAuthSDK } from "../core";
|
||||
import { getUser } from "./helpers/user";
|
||||
import payloadHandler from "./routes/payload";
|
||||
import loginHandler from "./routes/login";
|
||||
import logoutHandler from "./routes/logout";
|
||||
import userHandler from "./routes/user";
|
||||
import switchAccountHandler from "./routes/switch-account";
|
||||
import {
|
||||
ThirdwebAuthConfig,
|
||||
ThirdwebAuthContext,
|
||||
@@ -12,6 +14,7 @@ import cookieParser from "cookie-parser";
|
||||
import express, { Request, Response } from "express";
|
||||
|
||||
export * from "./types";
|
||||
export { getToken } from "./helpers/user";
|
||||
|
||||
const asyncHandler =
|
||||
(fn: CallableFunction) =>
|
||||
@@ -47,6 +50,13 @@ export function ThirdwebAuth<
|
||||
router.use(express.json());
|
||||
router.use(cookieMiddleware);
|
||||
|
||||
router.post(
|
||||
"/payload",
|
||||
asyncHandler((req: Request, res: Response) =>
|
||||
payloadHandler(req, res, ctx as ThirdwebAuthContext),
|
||||
),
|
||||
);
|
||||
|
||||
router.post(
|
||||
"/login",
|
||||
asyncHandler((req: Request, res: Response) =>
|
||||
@@ -68,6 +78,13 @@ export function ThirdwebAuth<
|
||||
),
|
||||
);
|
||||
|
||||
router.post(
|
||||
"/switch-account",
|
||||
asyncHandler((req: Request, res: Response) =>
|
||||
switchAccountHandler(req, res, ctx as ThirdwebAuthContext),
|
||||
),
|
||||
);
|
||||
|
||||
return {
|
||||
authRouter: router,
|
||||
authMiddleware: cookieMiddleware,
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
import {
|
||||
THIRDWEB_AUTH_ACTIVE_ACCOUNT_COOKIE,
|
||||
THIRDWEB_AUTH_TOKEN_COOKIE_PREFIX,
|
||||
} from "../../constants";
|
||||
import { GenerateOptions } from "../../core";
|
||||
import { LoginPayloadBodySchema, ThirdwebAuthContext } from "../types";
|
||||
import { serialize } from "cookie";
|
||||
@@ -64,18 +68,34 @@ export default async function handler(
|
||||
}
|
||||
}
|
||||
|
||||
const {
|
||||
payload: { exp },
|
||||
} = ctx.auth.parseToken(token);
|
||||
|
||||
// Securely set httpOnly cookie on request to prevent XSS on frontend
|
||||
// And set path to / to enable thirdweb_auth_token usage on all endpoints
|
||||
res.setHeader(
|
||||
"Set-Cookie",
|
||||
serialize("thirdweb_auth_token", token, {
|
||||
res.setHeader("Set-Cookie", [
|
||||
serialize(
|
||||
`${THIRDWEB_AUTH_TOKEN_COOKIE_PREFIX}_${payload.payload.address}`,
|
||||
token,
|
||||
{
|
||||
domain: ctx.cookieOptions?.domain,
|
||||
path: ctx.cookieOptions?.path || "/",
|
||||
sameSite: ctx.cookieOptions?.sameSite || "none",
|
||||
expires: new Date(exp * 1000),
|
||||
httpOnly: true,
|
||||
secure: true,
|
||||
},
|
||||
),
|
||||
serialize(THIRDWEB_AUTH_ACTIVE_ACCOUNT_COOKIE, payload.payload.address, {
|
||||
domain: ctx.cookieOptions?.domain,
|
||||
path: ctx.cookieOptions?.path || "/",
|
||||
sameSite: ctx.cookieOptions?.sameSite || "none",
|
||||
expires: new Date(exp * 1000),
|
||||
httpOnly: true,
|
||||
secure: true,
|
||||
}),
|
||||
);
|
||||
]);
|
||||
|
||||
// Send token in body and as cookie for frontend and backend use cases
|
||||
return res.status(200).json({ token });
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { getUser } from "../helpers/user";
|
||||
import { getActiveCookie, getUser } from "../helpers/user";
|
||||
import { ThirdwebAuthContext } from "../types";
|
||||
import { serialize } from "cookie";
|
||||
import { Request, Response } from "express";
|
||||
@@ -14,6 +14,13 @@ export default async function handler(
|
||||
});
|
||||
}
|
||||
|
||||
const activeCookie = getActiveCookie(req);
|
||||
if (!activeCookie) {
|
||||
return res.status(400).json({
|
||||
error: "No logged in user to logout.",
|
||||
});
|
||||
}
|
||||
|
||||
if (ctx.callbacks?.onLogout) {
|
||||
const user = await getUser(req, ctx);
|
||||
if (user) {
|
||||
@@ -24,10 +31,13 @@ export default async function handler(
|
||||
// Set the access token to 'none' and expire in 5 seconds
|
||||
res.setHeader(
|
||||
"Set-Cookie",
|
||||
serialize("thirdweb_auth_token", "", {
|
||||
serialize(activeCookie, "", {
|
||||
domain: ctx.cookieOptions?.domain,
|
||||
path: ctx.cookieOptions?.path || "/",
|
||||
sameSite: ctx.cookieOptions?.sameSite || "none",
|
||||
expires: new Date(Date.now() + 5 * 1000),
|
||||
httpOnly: true,
|
||||
secure: true,
|
||||
}),
|
||||
);
|
||||
|
||||
|
||||
@@ -0,0 +1,36 @@
|
||||
import { Request, Response } from "express";
|
||||
import { PayloadBodySchema, ThirdwebAuthContext } from "../types";
|
||||
|
||||
export default async function handler(
|
||||
req: Request,
|
||||
res: Response,
|
||||
ctx: ThirdwebAuthContext,
|
||||
) {
|
||||
if (req.method !== "POST") {
|
||||
return res.status(405).json({
|
||||
error: "Invalid method. Only POST supported.",
|
||||
});
|
||||
}
|
||||
|
||||
const parsedPayload = PayloadBodySchema.safeParse(req.body);
|
||||
if (!parsedPayload.success) {
|
||||
return res.status(400).json({ error: "Please provide an address" });
|
||||
}
|
||||
|
||||
// TODO: Add nonce generation + custom expiration + invalid before
|
||||
const payload = await ctx.auth.payload({
|
||||
address: parsedPayload.data.address,
|
||||
statement: ctx.authOptions?.statement,
|
||||
uri: ctx.authOptions?.uri,
|
||||
version: ctx.authOptions?.version,
|
||||
chainId: parsedPayload.data.chainId || ctx.authOptions?.chainId,
|
||||
resources: ctx.authOptions?.resources,
|
||||
expirationTime: ctx.authOptions?.loginPayloadDurationInSeconds
|
||||
? new Date(
|
||||
Date.now() + 1000 * ctx.authOptions.loginPayloadDurationInSeconds,
|
||||
)
|
||||
: undefined,
|
||||
});
|
||||
|
||||
return res.status(200).json({ payload });
|
||||
}
|
||||
@@ -0,0 +1,63 @@
|
||||
import { Request, Response } from "express";
|
||||
import { ActiveBodySchema, ThirdwebAuthContext } from "../types";
|
||||
import { serialize } from "cookie";
|
||||
import {
|
||||
THIRDWEB_AUTH_ACTIVE_ACCOUNT_COOKIE,
|
||||
THIRDWEB_AUTH_DEFAULT_TOKEN_DURATION_IN_SECONDS,
|
||||
THIRDWEB_AUTH_TOKEN_COOKIE_PREFIX,
|
||||
} from "../../constants";
|
||||
import { getCookie } from "../helpers/user";
|
||||
|
||||
export default async function handler(
|
||||
req: Request,
|
||||
res: Response,
|
||||
ctx: ThirdwebAuthContext,
|
||||
) {
|
||||
if (req.method !== "POST") {
|
||||
return res.status(405).json({
|
||||
error: "Invalid method. Only POST supported.",
|
||||
});
|
||||
}
|
||||
|
||||
const parsedPayload = ActiveBodySchema.safeParse(req.body);
|
||||
if (!parsedPayload.success) {
|
||||
return res.status(400).json({ error: "Please provide an address" });
|
||||
}
|
||||
|
||||
let cookieExpiration: Date;
|
||||
const cookie = getCookie(
|
||||
req,
|
||||
`${THIRDWEB_AUTH_TOKEN_COOKIE_PREFIX}_${parsedPayload.data.address}`,
|
||||
);
|
||||
|
||||
if (cookie) {
|
||||
// If the new account is already logged in, get the expiration time from the cookie
|
||||
const {
|
||||
payload: { exp },
|
||||
} = ctx.auth.parseToken(cookie);
|
||||
cookieExpiration = new Date(exp * 1000);
|
||||
} else if (ctx.authOptions?.tokenDurationInSeconds) {
|
||||
// Otherwise, if we have a token duration in seconds, set it to that
|
||||
cookieExpiration = new Date(
|
||||
Date.now() + 1000 * ctx.authOptions.tokenDurationInSeconds,
|
||||
);
|
||||
} else {
|
||||
// Otherwise, just default to 24 hours
|
||||
cookieExpiration = new Date(
|
||||
Date.now() + 1000 * THIRDWEB_AUTH_DEFAULT_TOKEN_DURATION_IN_SECONDS,
|
||||
);
|
||||
}
|
||||
|
||||
res.setHeader("Set-Cookie", [
|
||||
serialize(THIRDWEB_AUTH_ACTIVE_ACCOUNT_COOKIE, parsedPayload.data.address, {
|
||||
domain: ctx.cookieOptions?.domain,
|
||||
path: ctx.cookieOptions?.path || "/",
|
||||
sameSite: ctx.cookieOptions?.sameSite || "none",
|
||||
expires: cookieExpiration,
|
||||
httpOnly: true,
|
||||
secure: true,
|
||||
}),
|
||||
]);
|
||||
|
||||
return res.status(200).end();
|
||||
}
|
||||
@@ -1,6 +1,12 @@
|
||||
import { getUser } from "../helpers/user";
|
||||
import { serialize } from "cookie";
|
||||
import { getToken, getUser } from "../helpers/user";
|
||||
import { ThirdwebAuthContext } from "../types";
|
||||
import { Request, Response } from "express";
|
||||
import {
|
||||
THIRDWEB_AUTH_ACTIVE_ACCOUNT_COOKIE,
|
||||
THIRDWEB_AUTH_DEFAULT_REFRESH_INTERVAL_IN_SECONDS,
|
||||
THIRDWEB_AUTH_TOKEN_COOKIE_PREFIX,
|
||||
} from "../../constants";
|
||||
|
||||
export default async function handler(
|
||||
req: Request,
|
||||
@@ -14,5 +20,54 @@ export default async function handler(
|
||||
}
|
||||
|
||||
const user = await getUser(req, ctx);
|
||||
|
||||
// Importantly, make sure the user was actually logged in before refreshing
|
||||
if (user) {
|
||||
const token = getToken(req);
|
||||
if (token) {
|
||||
const payload = ctx.auth.parseToken(token);
|
||||
|
||||
const refreshDate = ctx.authOptions?.refreshIntervalInSeconds
|
||||
? new Date(
|
||||
payload.payload.iat * 1000 +
|
||||
ctx.authOptions.refreshIntervalInSeconds * 1000,
|
||||
)
|
||||
: new Date(
|
||||
payload.payload.iat * 1000 +
|
||||
THIRDWEB_AUTH_DEFAULT_REFRESH_INTERVAL_IN_SECONDS * 1000,
|
||||
);
|
||||
|
||||
if (new Date() > refreshDate) {
|
||||
const expirationTime = ctx.authOptions?.tokenDurationInSeconds
|
||||
? new Date(Date.now() + 1000 * ctx.authOptions.tokenDurationInSeconds)
|
||||
: undefined;
|
||||
const refreshedToken = await ctx.auth.refresh(token, expirationTime);
|
||||
const refreshedPayload = ctx.auth.parseToken(refreshedToken);
|
||||
res.setHeader("Set-Cookie", [
|
||||
serialize(
|
||||
`${THIRDWEB_AUTH_TOKEN_COOKIE_PREFIX}_${user.address}`,
|
||||
refreshedToken,
|
||||
{
|
||||
domain: ctx.cookieOptions?.domain,
|
||||
path: ctx.cookieOptions?.path || "/",
|
||||
sameSite: ctx.cookieOptions?.sameSite || "none",
|
||||
expires: new Date(refreshedPayload.payload.exp * 1000),
|
||||
httpOnly: true,
|
||||
secure: true,
|
||||
},
|
||||
),
|
||||
serialize(THIRDWEB_AUTH_ACTIVE_ACCOUNT_COOKIE, user.address, {
|
||||
domain: ctx.cookieOptions?.domain,
|
||||
path: ctx.cookieOptions?.path || "/",
|
||||
sameSite: ctx.cookieOptions?.sameSite || "none",
|
||||
expires: new Date(refreshedPayload.payload.exp * 1000),
|
||||
httpOnly: true,
|
||||
secure: true,
|
||||
}),
|
||||
]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return res.status(200).json(user);
|
||||
}
|
||||
|
||||
@@ -4,6 +4,15 @@ import type { GenericAuthWallet } from "@thirdweb-dev/wallets";
|
||||
import { Request } from "express";
|
||||
import { z } from "zod";
|
||||
|
||||
export const PayloadBodySchema = z.object({
|
||||
address: z.string(),
|
||||
chainId: z.string().optional(),
|
||||
});
|
||||
|
||||
export const ActiveBodySchema = z.object({
|
||||
address: z.string(),
|
||||
});
|
||||
|
||||
export const LoginPayloadBodySchema = z.object({
|
||||
payload: LoginPayloadOutputSchema,
|
||||
});
|
||||
@@ -35,7 +44,9 @@ export type ThirdwebAuthConfig<
|
||||
validateTokenId?:
|
||||
| ((tokenId: string) => void)
|
||||
| ((tokenId: string) => Promise<void>);
|
||||
loginPayloadDurationInSeconds?: number;
|
||||
tokenDurationInSeconds?: number;
|
||||
refreshIntervalInSeconds?: number;
|
||||
};
|
||||
cookieOptions?: {
|
||||
domain?: string;
|
||||
|
||||
@@ -1,9 +1,40 @@
|
||||
import {
|
||||
THIRDWEB_AUTH_ACTIVE_ACCOUNT_COOKIE,
|
||||
THIRDWEB_AUTH_TOKEN_COOKIE_PREFIX,
|
||||
} from "../../constants";
|
||||
import { Json } from "../../core/schema";
|
||||
import { ThirdwebAuthContext, ThirdwebAuthUser } from "../types";
|
||||
import { GetServerSidePropsContext, NextApiRequest } from "next";
|
||||
import { NextRequest } from "next/server";
|
||||
|
||||
function getToken(
|
||||
export function getCookie(
|
||||
req: GetServerSidePropsContext["req"] | NextRequest | NextApiRequest,
|
||||
cookie: string,
|
||||
): string | undefined {
|
||||
if (typeof req.cookies.get === "function") {
|
||||
return req.cookies.get(cookie);
|
||||
}
|
||||
|
||||
return (req.cookies as any)[cookie];
|
||||
}
|
||||
|
||||
export function getActiveCookie(
|
||||
req: GetServerSidePropsContext["req"] | NextRequest | NextApiRequest,
|
||||
): string | undefined {
|
||||
if (!req.cookies) {
|
||||
return undefined;
|
||||
}
|
||||
|
||||
const activeAccount = getCookie(req, THIRDWEB_AUTH_ACTIVE_ACCOUNT_COOKIE);
|
||||
if (activeAccount) {
|
||||
return `${THIRDWEB_AUTH_TOKEN_COOKIE_PREFIX}_${activeAccount}`;
|
||||
}
|
||||
|
||||
// If active account is not present, then use the old default
|
||||
return THIRDWEB_AUTH_TOKEN_COOKIE_PREFIX;
|
||||
}
|
||||
|
||||
export function getToken(
|
||||
req: GetServerSidePropsContext["req"] | NextRequest | NextApiRequest,
|
||||
): string | undefined {
|
||||
if (!!(req as NextApiRequest).headers["authorization"]) {
|
||||
@@ -13,17 +44,18 @@ function getToken(
|
||||
if (authorizationHeader?.length === 2) {
|
||||
return authorizationHeader[1];
|
||||
}
|
||||
}
|
||||
|
||||
if (!req.cookies) {
|
||||
return undefined;
|
||||
}
|
||||
|
||||
const cookie: string | undefined = !req.cookies
|
||||
? undefined
|
||||
: typeof req.cookies.get === "function"
|
||||
? (req.cookies as any).get("thirdweb_auth_token")
|
||||
: (req.cookies as any).thirdweb_auth_token;
|
||||
const activeCookie = getActiveCookie(req);
|
||||
if (!activeCookie) {
|
||||
return undefined;
|
||||
}
|
||||
|
||||
return cookie;
|
||||
return getCookie(req, activeCookie);
|
||||
}
|
||||
|
||||
export async function getUser<
|
||||
@@ -56,7 +88,7 @@ export async function getUser<
|
||||
return authenticatedUser;
|
||||
}
|
||||
|
||||
const data = await ctx.callbacks.onUser(authenticatedUser);
|
||||
const data = await ctx.callbacks.onUser(authenticatedUser, req);
|
||||
if (!data) {
|
||||
return authenticatedUser;
|
||||
}
|
||||
|
||||
@@ -1,8 +1,10 @@
|
||||
import { Json, ThirdwebAuth as ThirdwebAuthSDK } from "../core";
|
||||
import { getUser } from "./helpers/user";
|
||||
import payloadHandler from "./routes/payload";
|
||||
import loginHandler from "./routes/login";
|
||||
import logoutHandler from "./routes/logout";
|
||||
import userHandler from "./routes/user";
|
||||
import switchAccountHandler from "./routes/switch-account";
|
||||
import {
|
||||
ThirdwebAuthConfig,
|
||||
ThirdwebAuthContext,
|
||||
@@ -27,12 +29,16 @@ async function ThirdwebAuthRouter(
|
||||
const action = thirdweb?.[0] as ThirdwebAuthRoute;
|
||||
|
||||
switch (action) {
|
||||
case "payload":
|
||||
return await payloadHandler(req, res, ctx);
|
||||
case "login":
|
||||
return await loginHandler(req, res, ctx);
|
||||
case "user":
|
||||
return await userHandler(req, res, ctx);
|
||||
case "logout":
|
||||
return await logoutHandler(req, res, ctx);
|
||||
case "switch-account":
|
||||
return await switchAccountHandler(req, res, ctx);
|
||||
default:
|
||||
return res.status(400).json({
|
||||
message: "Invalid route for authentication.",
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
import {
|
||||
THIRDWEB_AUTH_ACTIVE_ACCOUNT_COOKIE,
|
||||
THIRDWEB_AUTH_TOKEN_COOKIE_PREFIX,
|
||||
} from "../../constants";
|
||||
import { GenerateOptions } from "../../core";
|
||||
import { LoginPayloadBodySchema, ThirdwebAuthContext } from "../types";
|
||||
import { serialize } from "cookie";
|
||||
@@ -64,18 +68,34 @@ export default async function handler(
|
||||
}
|
||||
}
|
||||
|
||||
const {
|
||||
payload: { exp },
|
||||
} = ctx.auth.parseToken(token);
|
||||
|
||||
// Securely set httpOnly cookie on request to prevent XSS on frontend
|
||||
// And set path to / to enable thirdweb_auth_token usage on all endpoints
|
||||
res.setHeader(
|
||||
"Set-Cookie",
|
||||
serialize("thirdweb_auth_token", token, {
|
||||
res.setHeader("Set-Cookie", [
|
||||
serialize(
|
||||
`${THIRDWEB_AUTH_TOKEN_COOKIE_PREFIX}_${payload.payload.address}`,
|
||||
token,
|
||||
{
|
||||
domain: ctx.cookieOptions?.domain,
|
||||
path: ctx.cookieOptions?.path || "/",
|
||||
sameSite: ctx.cookieOptions?.sameSite || "none",
|
||||
expires: new Date(exp * 1000),
|
||||
httpOnly: true,
|
||||
secure: true,
|
||||
},
|
||||
),
|
||||
serialize(THIRDWEB_AUTH_ACTIVE_ACCOUNT_COOKIE, payload.payload.address, {
|
||||
domain: ctx.cookieOptions?.domain,
|
||||
path: ctx.cookieOptions?.path || "/",
|
||||
sameSite: ctx.cookieOptions?.sameSite || "none",
|
||||
expires: new Date(exp * 1000),
|
||||
httpOnly: true,
|
||||
secure: true,
|
||||
}),
|
||||
);
|
||||
]);
|
||||
|
||||
// Send token in body and as cookie for frontend and backend use cases
|
||||
return res.status(200).json({ token });
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { getUser } from "../helpers/user";
|
||||
import { getActiveCookie, getUser } from "../helpers/user";
|
||||
import { ThirdwebAuthContext } from "../types";
|
||||
import { serialize } from "cookie";
|
||||
import { NextApiRequest, NextApiResponse } from "next";
|
||||
@@ -14,6 +14,13 @@ export default async function handler(
|
||||
});
|
||||
}
|
||||
|
||||
const activeCookie = getActiveCookie(req);
|
||||
if (!activeCookie) {
|
||||
return res.status(400).json({
|
||||
error: "No logged in user to logout.",
|
||||
});
|
||||
}
|
||||
|
||||
if (ctx.callbacks?.onLogout) {
|
||||
const user = await getUser(req, ctx);
|
||||
if (user) {
|
||||
@@ -24,10 +31,13 @@ export default async function handler(
|
||||
// Set the access token to 'none' and expire in 5 seconds
|
||||
res.setHeader(
|
||||
"Set-Cookie",
|
||||
serialize("thirdweb_auth_token", "", {
|
||||
serialize(activeCookie, "", {
|
||||
domain: ctx.cookieOptions?.domain,
|
||||
path: ctx.cookieOptions?.path || "/",
|
||||
sameSite: ctx.cookieOptions?.sameSite || "none",
|
||||
expires: new Date(Date.now() + 5 * 1000),
|
||||
httpOnly: true,
|
||||
secure: true,
|
||||
}),
|
||||
);
|
||||
|
||||
|
||||
@@ -0,0 +1,36 @@
|
||||
import { PayloadBodySchema, ThirdwebAuthContext } from "../types";
|
||||
import { NextApiRequest, NextApiResponse } from "next";
|
||||
|
||||
export default async function handler(
|
||||
req: NextApiRequest,
|
||||
res: NextApiResponse,
|
||||
ctx: ThirdwebAuthContext,
|
||||
) {
|
||||
if (req.method !== "POST") {
|
||||
return res.status(405).json({
|
||||
error: "Invalid method. Only POST supported.",
|
||||
});
|
||||
}
|
||||
|
||||
const parsedPayload = PayloadBodySchema.safeParse(req.body);
|
||||
if (!parsedPayload.success) {
|
||||
return res.status(400).json({ error: "Please provide an address" });
|
||||
}
|
||||
|
||||
// TODO: Add nonce generation + custom expiration + invalid before
|
||||
const payload = await ctx.auth.payload({
|
||||
address: parsedPayload.data.address,
|
||||
statement: ctx.authOptions?.statement,
|
||||
uri: ctx.authOptions?.uri,
|
||||
version: ctx.authOptions?.version,
|
||||
chainId: parsedPayload.data.chainId || ctx.authOptions?.chainId,
|
||||
resources: ctx.authOptions?.resources,
|
||||
expirationTime: ctx.authOptions?.loginPayloadDurationInSeconds
|
||||
? new Date(
|
||||
Date.now() + 1000 * ctx.authOptions.loginPayloadDurationInSeconds,
|
||||
)
|
||||
: undefined,
|
||||
});
|
||||
|
||||
return res.status(200).json({ payload });
|
||||
}
|
||||
@@ -0,0 +1,63 @@
|
||||
import { serialize } from "cookie";
|
||||
import { getCookie } from "../helpers/user";
|
||||
import { ActiveBodySchema, ThirdwebAuthContext } from "../types";
|
||||
import { NextApiRequest, NextApiResponse } from "next";
|
||||
import {
|
||||
THIRDWEB_AUTH_ACTIVE_ACCOUNT_COOKIE,
|
||||
THIRDWEB_AUTH_DEFAULT_TOKEN_DURATION_IN_SECONDS,
|
||||
THIRDWEB_AUTH_TOKEN_COOKIE_PREFIX,
|
||||
} from "../../constants";
|
||||
|
||||
export default async function handler(
|
||||
req: NextApiRequest,
|
||||
res: NextApiResponse,
|
||||
ctx: ThirdwebAuthContext,
|
||||
) {
|
||||
if (req.method !== "POST") {
|
||||
return res.status(405).json({
|
||||
error: "Invalid method. Only POST supported.",
|
||||
});
|
||||
}
|
||||
|
||||
const parsedPayload = ActiveBodySchema.safeParse(req.body);
|
||||
if (!parsedPayload.success) {
|
||||
return res.status(400).json({ error: "Please provide an address" });
|
||||
}
|
||||
|
||||
let cookieExpiration: Date;
|
||||
const cookie = getCookie(
|
||||
req,
|
||||
`${THIRDWEB_AUTH_TOKEN_COOKIE_PREFIX}_${parsedPayload.data.address}`,
|
||||
);
|
||||
|
||||
if (cookie) {
|
||||
// If the new account is already logged in, get the expiration time from the cookie
|
||||
const {
|
||||
payload: { exp },
|
||||
} = ctx.auth.parseToken(cookie);
|
||||
cookieExpiration = new Date(exp * 1000);
|
||||
} else if (ctx.authOptions?.tokenDurationInSeconds) {
|
||||
// Otherwise, if we have a token duration in seconds, set it to that
|
||||
cookieExpiration = new Date(
|
||||
Date.now() + 1000 * ctx.authOptions.tokenDurationInSeconds,
|
||||
);
|
||||
} else {
|
||||
// Otherwise, just default to 24 hours
|
||||
cookieExpiration = new Date(
|
||||
Date.now() + 1000 * THIRDWEB_AUTH_DEFAULT_TOKEN_DURATION_IN_SECONDS,
|
||||
);
|
||||
}
|
||||
|
||||
res.setHeader("Set-Cookie", [
|
||||
serialize(THIRDWEB_AUTH_ACTIVE_ACCOUNT_COOKIE, parsedPayload.data.address, {
|
||||
domain: ctx.cookieOptions?.domain,
|
||||
path: ctx.cookieOptions?.path || "/",
|
||||
sameSite: ctx.cookieOptions?.sameSite || "none",
|
||||
expires: cookieExpiration,
|
||||
httpOnly: true,
|
||||
secure: true,
|
||||
}),
|
||||
]);
|
||||
|
||||
return res.status(200).end();
|
||||
}
|
||||
@@ -1,4 +1,10 @@
|
||||
import { getUser } from "../helpers/user";
|
||||
import { serialize } from "cookie";
|
||||
import {
|
||||
THIRDWEB_AUTH_ACTIVE_ACCOUNT_COOKIE,
|
||||
THIRDWEB_AUTH_DEFAULT_REFRESH_INTERVAL_IN_SECONDS,
|
||||
THIRDWEB_AUTH_TOKEN_COOKIE_PREFIX,
|
||||
} from "../../constants";
|
||||
import { getToken, getUser } from "../helpers/user";
|
||||
import { ThirdwebAuthContext } from "../types";
|
||||
import { NextApiRequest, NextApiResponse } from "next";
|
||||
|
||||
@@ -14,5 +20,54 @@ export default async function handler(
|
||||
}
|
||||
|
||||
const user = await getUser(req, ctx);
|
||||
|
||||
// Importantly, make sure the user was actually logged in before refreshing
|
||||
if (user) {
|
||||
const token = getToken(req);
|
||||
if (token) {
|
||||
const payload = ctx.auth.parseToken(token);
|
||||
|
||||
const refreshDate = ctx.authOptions?.refreshIntervalInSeconds
|
||||
? new Date(
|
||||
payload.payload.iat * 1000 +
|
||||
ctx.authOptions.refreshIntervalInSeconds * 1000,
|
||||
)
|
||||
: new Date(
|
||||
payload.payload.iat * 1000 +
|
||||
THIRDWEB_AUTH_DEFAULT_REFRESH_INTERVAL_IN_SECONDS * 1000,
|
||||
);
|
||||
|
||||
if (new Date() > refreshDate) {
|
||||
const expirationTime = ctx.authOptions?.tokenDurationInSeconds
|
||||
? new Date(Date.now() + 1000 * ctx.authOptions.tokenDurationInSeconds)
|
||||
: undefined;
|
||||
const refreshedToken = await ctx.auth.refresh(token, expirationTime);
|
||||
const refreshedPayload = ctx.auth.parseToken(refreshedToken);
|
||||
res.setHeader("Set-Cookie", [
|
||||
serialize(
|
||||
`${THIRDWEB_AUTH_TOKEN_COOKIE_PREFIX}_${user.address}`,
|
||||
refreshedToken,
|
||||
{
|
||||
domain: ctx.cookieOptions?.domain,
|
||||
path: ctx.cookieOptions?.path || "/",
|
||||
sameSite: ctx.cookieOptions?.sameSite || "none",
|
||||
expires: new Date(refreshedPayload.payload.exp * 1000),
|
||||
httpOnly: true,
|
||||
secure: true,
|
||||
},
|
||||
),
|
||||
serialize(THIRDWEB_AUTH_ACTIVE_ACCOUNT_COOKIE, user.address, {
|
||||
domain: ctx.cookieOptions?.domain,
|
||||
path: ctx.cookieOptions?.path || "/",
|
||||
sameSite: ctx.cookieOptions?.sameSite || "none",
|
||||
expires: new Date(refreshedPayload.payload.exp * 1000),
|
||||
httpOnly: true,
|
||||
secure: true,
|
||||
}),
|
||||
]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return res.status(200).json(user);
|
||||
}
|
||||
|
||||
@@ -5,6 +5,15 @@ import { GetServerSidePropsContext, NextApiRequest } from "next";
|
||||
import { NextRequest } from "next/server";
|
||||
import { z } from "zod";
|
||||
|
||||
export const PayloadBodySchema = z.object({
|
||||
address: z.string(),
|
||||
chainId: z.string().optional(),
|
||||
});
|
||||
|
||||
export const ActiveBodySchema = z.object({
|
||||
address: z.string(),
|
||||
});
|
||||
|
||||
export const LoginPayloadBodySchema = z.object({
|
||||
payload: LoginPayloadOutputSchema,
|
||||
});
|
||||
@@ -14,7 +23,12 @@ type RequestType =
|
||||
| NextRequest
|
||||
| NextApiRequest;
|
||||
|
||||
export type ThirdwebAuthRoute = "login" | "logout" | "user";
|
||||
export type ThirdwebAuthRoute =
|
||||
| "payload"
|
||||
| "login"
|
||||
| "logout"
|
||||
| "user"
|
||||
| "switch-account";
|
||||
|
||||
export type ThirdwebAuthUser<
|
||||
TData extends Json = Json,
|
||||
@@ -41,7 +55,9 @@ export type ThirdwebAuthConfig<
|
||||
validateTokenId?:
|
||||
| ((tokenId: string) => void)
|
||||
| ((tokenId: string) => Promise<void>);
|
||||
loginPayloadDurationInSeconds?: number;
|
||||
tokenDurationInSeconds?: number;
|
||||
refreshIntervalInSeconds?: number;
|
||||
};
|
||||
cookieOptions?: {
|
||||
domain?: string;
|
||||
|
||||
@@ -1,5 +1,252 @@
|
||||
# @thirdweb-dev/chains
|
||||
|
||||
## 0.1.40
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- [#1415](https://github.com/thirdweb-dev/js/pull/1415) [`256ee0d5`](https://github.com/thirdweb-dev/js/commit/256ee0d5ec9c8598aa79cd4cb1fd839c6cc7d390) Thanks [@joaquim-verges](https://github.com/joaquim-verges)! - Downgrade preconstruct to 2.7.0
|
||||
|
||||
## 0.1.39
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- [#1407](https://github.com/thirdweb-dev/js/pull/1407) [`0a5eb19d`](https://github.com/thirdweb-dev/js/commit/0a5eb19d672909027bb6c7e79ea76d431535559c) Thanks [@jnsdls](https://github.com/jnsdls)! - remove non-standard urls
|
||||
|
||||
- [#1409](https://github.com/thirdweb-dev/js/pull/1409) [`b1e8c8e2`](https://github.com/thirdweb-dev/js/commit/b1e8c8e231013182eb46c16d0c441ee0f3bdfdb2) Thanks [@jnsdls](https://github.com/jnsdls)! - update dependencies
|
||||
|
||||
- [#1376](https://github.com/thirdweb-dev/js/pull/1376) [`48ca58b7`](https://github.com/thirdweb-dev/js/commit/48ca58b7aa45348b928932b9c7b76b3dc233e429) Thanks [@iketw](https://github.com/iketw)! - Pass bundleId if present
|
||||
|
||||
- [#1399](https://github.com/thirdweb-dev/js/pull/1399) [`3152d4e9`](https://github.com/thirdweb-dev/js/commit/3152d4e9b42e2777316b1b58513657f4430cb79a) Thanks [@jnsdls](https://github.com/jnsdls)! - update chains
|
||||
|
||||
- [#1387](https://github.com/thirdweb-dev/js/pull/1387) [`aa6bdd08`](https://github.com/thirdweb-dev/js/commit/aa6bdd0809d1d5536c837c59b2d407ee974c1f9c) Thanks [@nkrishang](https://github.com/nkrishang)! - Simplify account permissions
|
||||
|
||||
- [#1405](https://github.com/thirdweb-dev/js/pull/1405) [`75587c8b`](https://github.com/thirdweb-dev/js/commit/75587c8b38bbbcf68d2101526e9792349cce728f) Thanks [@jnsdls](https://github.com/jnsdls)! - sort explorers (etherscan -> blockscout -> other)
|
||||
|
||||
- [#1385](https://github.com/thirdweb-dev/js/pull/1385) [`cc5e2ec5`](https://github.com/thirdweb-dev/js/commit/cc5e2ec51fce09af05be33811eb46980825829ee) Thanks [@iketw](https://github.com/iketw)! - Adds chains and improve error messages
|
||||
|
||||
- [#1378](https://github.com/thirdweb-dev/js/pull/1378) [`5a02c5ec`](https://github.com/thirdweb-dev/js/commit/5a02c5ec0288fd6dfb2b765ef70bb18e714aca19) Thanks [@MananTank](https://github.com/MananTank)! - add icon in MinimalChain
|
||||
|
||||
## 0.1.38
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- [#1374](https://github.com/thirdweb-dev/js/pull/1374) [`7cb55e70`](https://github.com/thirdweb-dev/js/commit/7cb55e7051617268bba1b80146865c606ff6e66d) Thanks [@jnsdls](https://github.com/jnsdls)! -
|
||||
|
||||
## 0.1.37
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- [#1371](https://github.com/thirdweb-dev/js/pull/1371) [`d665954f`](https://github.com/thirdweb-dev/js/commit/d665954fee0554985055bf06abbed8d7b8d5bc38) Thanks [@jnsdls](https://github.com/jnsdls)! - add more chains
|
||||
|
||||
## 0.1.36
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- [#1366](https://github.com/thirdweb-dev/js/pull/1366) [`02ab92cc`](https://github.com/thirdweb-dev/js/commit/02ab92cc5c97f475e3b5642e5a7bdbe63ca136ee) Thanks [@jnsdls](https://github.com/jnsdls)! - new supported chains
|
||||
|
||||
- [#1358](https://github.com/thirdweb-dev/js/pull/1358) [`6cc4b8d2`](https://github.com/thirdweb-dev/js/commit/6cc4b8d28b982c5be3e1cd17d2a9a947001d1608) Thanks [@DLHTX](https://github.com/DLHTX)! - feat(chain): add iotex chain icon
|
||||
|
||||
## 0.1.35
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- [#1316](https://github.com/thirdweb-dev/js/pull/1316) [`d8447146`](https://github.com/thirdweb-dev/js/commit/d8447146092c1962f410155ab2047225453aaa2b) Thanks [@iketw](https://github.com/iketw)! - Adds support for clientId / secretKey
|
||||
|
||||
## 0.1.34
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- [#1338](https://github.com/thirdweb-dev/js/pull/1338) [`8dd7540c`](https://github.com/thirdweb-dev/js/commit/8dd7540c455aa70534f6d29986537592fd12169b) Thanks [@jnsdls](https://github.com/jnsdls)! - update chains
|
||||
|
||||
## 0.1.33
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- [#1335](https://github.com/thirdweb-dev/js/pull/1335) [`0407b2c2`](https://github.com/thirdweb-dev/js/commit/0407b2c2f39b5f3fa06e613e671623b5644b3a28) Thanks [@jnsdls](https://github.com/jnsdls)! - update chains again
|
||||
|
||||
## 0.1.32
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- [#1330](https://github.com/thirdweb-dev/js/pull/1330) [`a9093bcf`](https://github.com/thirdweb-dev/js/commit/a9093bcf287c01e3335fd780e2ccbfdb3380bf95) Thanks [@adam-maj](https://github.com/adam-maj)! - Override binance slug
|
||||
|
||||
## 0.1.31
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- [#1328](https://github.com/thirdweb-dev/js/pull/1328) [`4393b228`](https://github.com/thirdweb-dev/js/commit/4393b2280505fd0b2284555d64eae6567e8401a5) Thanks [@adam-maj](https://github.com/adam-maj)! - Make base default chain
|
||||
|
||||
## 0.1.30
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- [#1326](https://github.com/thirdweb-dev/js/pull/1326) [`40682191`](https://github.com/thirdweb-dev/js/commit/40682191450de08ad40b9d2957afced248657af2) Thanks [@adam-maj](https://github.com/adam-maj)! - Add base chain support
|
||||
|
||||
## 0.1.29
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- [#1320](https://github.com/thirdweb-dev/js/pull/1320) [`fd74d791`](https://github.com/thirdweb-dev/js/commit/fd74d7918072cda03b52f852ebb3f8dccb84074d) Thanks [@kumaryash90](https://github.com/kumaryash90)! - Linea mainnet support
|
||||
|
||||
- [#1315](https://github.com/thirdweb-dev/js/pull/1315) [`35f20ceb`](https://github.com/thirdweb-dev/js/commit/35f20ceb4f943e95d9566105096f06412978da7a) Thanks [@jnsdls](https://github.com/jnsdls)! - add more chains
|
||||
|
||||
## 0.1.28
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- [#1299](https://github.com/thirdweb-dev/js/pull/1299) [`7e044c66`](https://github.com/thirdweb-dev/js/commit/7e044c664d8a034f5324b859ac3596860c86f9a5) Thanks [@nkrishang](https://github.com/nkrishang)! - Add ERC721LoyaltyCard and ERC721UpdatableMetadata
|
||||
|
||||
- [#1297](https://github.com/thirdweb-dev/js/pull/1297) [`b5c6eedb`](https://github.com/thirdweb-dev/js/commit/b5c6eedb38aa3c52eb97f3d25ad83e38c55afe61) Thanks [@0xFirekeeper](https://github.com/0xFirekeeper)! - add zksync as default chain
|
||||
|
||||
- [#1309](https://github.com/thirdweb-dev/js/pull/1309) [`4961b597`](https://github.com/thirdweb-dev/js/commit/4961b597a098dae0a4eff01a9ef268a65fe1a352) Thanks [@jnsdls](https://github.com/jnsdls)! - unblock storage domains
|
||||
|
||||
## 0.1.27
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- [#1278](https://github.com/thirdweb-dev/js/pull/1278) [`8a389f12`](https://github.com/thirdweb-dev/js/commit/8a389f1295d2bf726059997ea0ca10cf0424f2a2) Thanks [@jnsdls](https://github.com/jnsdls)! - updated various dependencies
|
||||
|
||||
- [#1281](https://github.com/thirdweb-dev/js/pull/1281) [`a3bb17cb`](https://github.com/thirdweb-dev/js/commit/a3bb17cb33f033846fb3b4c8a0a4809ba76cab96) Thanks [@nkrishang](https://github.com/nkrishang)! - Handle ERC4337Signer correctly for signTypedData
|
||||
|
||||
## 0.1.26
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- [#1276](https://github.com/thirdweb-dev/js/pull/1276) [`5882091e`](https://github.com/thirdweb-dev/js/commit/5882091eab65978009a5a5305701f121851b10ad) Thanks [@MananTank](https://github.com/MananTank)! - Do not change order or RPCs in `getChainRPCs` to Fix RPC override issue
|
||||
|
||||
## 0.1.25
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- [#1248](https://github.com/thirdweb-dev/js/pull/1248) [`620e89dc`](https://github.com/thirdweb-dev/js/commit/620e89dc25c91557e2164a602c7aedd733525087) Thanks [@nachoiacovino](https://github.com/nachoiacovino)! - update chains
|
||||
|
||||
- [#1243](https://github.com/thirdweb-dev/js/pull/1243) [`0fd8aa04`](https://github.com/thirdweb-dev/js/commit/0fd8aa04a9424497758d13a51a72363edcc30e19) Thanks [@therealharpaljadeja](https://github.com/therealharpaljadeja)! - update chains
|
||||
|
||||
## 0.1.24
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- [#1241](https://github.com/thirdweb-dev/js/pull/1241) [`9af346ee`](https://github.com/thirdweb-dev/js/commit/9af346eeada1037be27c8d3c9e1777f7be11a8ea) Thanks [@nkrishang](https://github.com/nkrishang)! - Use fn getAllAccounts instead of event logs AccountCreated
|
||||
|
||||
## 0.1.23
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- [#1229](https://github.com/thirdweb-dev/js/pull/1229) [`6816219a`](https://github.com/thirdweb-dev/js/commit/6816219ac13ae571a0c90db6ab389c319bc1f052) Thanks [@jnsdls](https://github.com/jnsdls)! - add/update chains
|
||||
|
||||
## 0.1.22
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- [#1192](https://github.com/thirdweb-dev/js/pull/1192) [`f41f1a29`](https://github.com/thirdweb-dev/js/commit/f41f1a2958a2cedcf0496c9a3ca284d0b98f1b89) Thanks [@jnsdls](https://github.com/jnsdls)! - fix arbitrum goerli infura url
|
||||
|
||||
## 0.1.21
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- [#1074](https://github.com/thirdweb-dev/js/pull/1074) [`cc20f93e`](https://github.com/thirdweb-dev/js/commit/cc20f93e178d86ee2b3f39102bbb0811de211f05) Thanks [@Marfuen](https://github.com/Marfuen)! - Enhance CLI Install command and update chains
|
||||
|
||||
- [#1185](https://github.com/thirdweb-dev/js/pull/1185) [`8e28b0f5`](https://github.com/thirdweb-dev/js/commit/8e28b0f5e75596d29273ed80269bcee6d209adb4) Thanks [@jnsdls](https://github.com/jnsdls)! - add Zora Mainnet
|
||||
|
||||
## 0.1.20
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- [#1140](https://github.com/thirdweb-dev/js/pull/1140) [`16232de9`](https://github.com/thirdweb-dev/js/commit/16232de9eab9966e24e335929b2a3919346af265) Thanks [@kumaryash90](https://github.com/kumaryash90)! - Update chains
|
||||
|
||||
- [#1138](https://github.com/thirdweb-dev/js/pull/1138) [`645b0303`](https://github.com/thirdweb-dev/js/commit/645b0303cc1a9cbb0a0e9cbd67d11c3b865e4584) Thanks [@jcstein](https://github.com/jcstein)! - feat: create Taro Testnet
|
||||
|
||||
## 0.1.19
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- [#1065](https://github.com/thirdweb-dev/js/pull/1065) [`bd86661f`](https://github.com/thirdweb-dev/js/commit/bd86661f54ca2f1eb09cbae35c704dc79be1b63a) Thanks [@iketw](https://github.com/iketw)! - [Chains] update chains
|
||||
|
||||
- [#1064](https://github.com/thirdweb-dev/js/pull/1064) [`c85810ee`](https://github.com/thirdweb-dev/js/commit/c85810eee318b10eee4ada61828adaa51f94ea6c) Thanks [@MananTank](https://github.com/MananTank)! - Do not cache signer in wallets
|
||||
|
||||
- [#1047](https://github.com/thirdweb-dev/js/pull/1047) [`6fd10f94`](https://github.com/thirdweb-dev/js/commit/6fd10f94b469dc5659e2ff4ce92a5aff86f3c89d) Thanks [@MananTank](https://github.com/MananTank)! - Fix tree-shaking issue in `@thirdweb-dev/chains`
|
||||
|
||||
- [#1090](https://github.com/thirdweb-dev/js/pull/1090) [`5f1e6abb`](https://github.com/thirdweb-dev/js/commit/5f1e6abb391f5c58dbdb207f569b3dd0b5d4729c) Thanks [@joaquim-verges](https://github.com/joaquim-verges)! - Add base-goerli to default chains
|
||||
|
||||
## 0.1.18
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- [#1040](https://github.com/thirdweb-dev/js/pull/1040) [`30e5593d`](https://github.com/thirdweb-dev/js/commit/30e5593dd1ce9abd809ad216a1cfce77b897093c) Thanks [@joaquim-verges](https://github.com/joaquim-verges)! - Update chains
|
||||
|
||||
## 0.1.17
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- [#1031](https://github.com/thirdweb-dev/js/pull/1031) [`3c8c5d56`](https://github.com/thirdweb-dev/js/commit/3c8c5d56f2a21c0918fede71061c6745f2956f83) Thanks [@jnsdls](https://github.com/jnsdls)! - update chains
|
||||
|
||||
- [#1033](https://github.com/thirdweb-dev/js/pull/1033) [`907d97be`](https://github.com/thirdweb-dev/js/commit/907d97bedef7331148bdfe8b9bf1e19459282e4c) Thanks [@joaquim-verges](https://github.com/joaquim-verges)! - Added faucet for optimism goerli
|
||||
|
||||
## 0.1.16
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- [#996](https://github.com/thirdweb-dev/js/pull/996) [`c3645c45`](https://github.com/thirdweb-dev/js/commit/c3645c451b5e9a0fcf651fa07eb0e31ebf1882ca) Thanks [@MananTank](https://github.com/MananTank)! - - add `theme` in `ConfiguredWallet.connectUI`'s props - to use theme aware UI for wallets
|
||||
|
||||
- add `useWalletConfig` hook to get the `ConfiguredWallet` object for active wallet
|
||||
- add hooks `useSetConnectedWallet`, `useSetConnectionStatus`
|
||||
- rename `useActiveChain` to `useChain` - keep the `useActiveChain` also with deprecated tag
|
||||
- make `useSafe` hook await-able by returning the promise of connect() call
|
||||
- add hook `useSmartWallet`
|
||||
- allow rendering custom wallet details button via `<ConnectWallet detailsButton={} />` prop
|
||||
- Rename "Export" to "Backup" in local wallet UI
|
||||
|
||||
- [#1011](https://github.com/thirdweb-dev/js/pull/1011) [`470e0a14`](https://github.com/thirdweb-dev/js/commit/470e0a144db6aa03e7789e231bbdfae43144f0e0) Thanks [@MananTank](https://github.com/MananTank)! - rename ConfiguredWallet to WalletConfig
|
||||
|
||||
```diff
|
||||
- import { ConfiguredWallet } from '@thirdweb-dev/react';
|
||||
+ import { WalletConfig } from '@thirdweb-dev/react';
|
||||
```
|
||||
|
||||
- [#995](https://github.com/thirdweb-dev/js/pull/995) [`482f6d1b`](https://github.com/thirdweb-dev/js/commit/482f6d1b58ac99b331fc750d3eeb6082556fd526) Thanks [@iketw](https://github.com/iketw)! - [Chains] Update chains
|
||||
|
||||
- [#989](https://github.com/thirdweb-dev/js/pull/989) [`8db78299`](https://github.com/thirdweb-dev/js/commit/8db78299ea6cfb51d93b91bb1a351644a83c73d2) Thanks [@iketw](https://github.com/iketw)! - [React/ReactNative] Updated useThirdwebWallet to useWalletContext
|
||||
|
||||
## 0.1.15
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- [#990](https://github.com/thirdweb-dev/js/pull/990) [`6a4aab0b`](https://github.com/thirdweb-dev/js/commit/6a4aab0b8a2e0f6ff1b47992a3c1e5426a74f7ff) Thanks [@joaquim-verges](https://github.com/joaquim-verges)! - updated chains
|
||||
|
||||
## 0.1.14
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- [#954](https://github.com/thirdweb-dev/js/pull/954) [`5305b42d`](https://github.com/thirdweb-dev/js/commit/5305b42db554b69f903b3d95f3ba0eeddabd6114) Thanks [@jarrodwatts](https://github.com/jarrodwatts)! - useContract now types correctly for thirdweb generate
|
||||
|
||||
## 0.1.13
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- [#787](https://github.com/thirdweb-dev/js/pull/787) [`d2c7f6d7`](https://github.com/thirdweb-dev/js/commit/d2c7f6d758787fab102ecc0cec16ac74f3c87a1f) Thanks [@iketw](https://github.com/iketw)! - [ReactNative] Adds Device Wallet
|
||||
|
||||
- [#931](https://github.com/thirdweb-dev/js/pull/931) [`f12a80a4`](https://github.com/thirdweb-dev/js/commit/f12a80a4758aa91c43084acedb212de9f36a7371) Thanks [@joaquim-verges](https://github.com/joaquim-verges)! - Updated chains
|
||||
|
||||
## 0.1.12
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- [#896](https://github.com/thirdweb-dev/js/pull/896) [`a6610f12`](https://github.com/thirdweb-dev/js/commit/a6610f1211e9359885b948bf69a66d834707ec07) Thanks [@atharvadeosthale](https://github.com/atharvadeosthale)! - Added links to portal
|
||||
|
||||
- [#903](https://github.com/thirdweb-dev/js/pull/903) [`77224646`](https://github.com/thirdweb-dev/js/commit/77224646d542db3171394d744b455497cd057633) Thanks [@joaquim-verges](https://github.com/joaquim-verges)! - new chains
|
||||
|
||||
## 0.1.11
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- [#870](https://github.com/thirdweb-dev/js/pull/870) [`235eb046`](https://github.com/thirdweb-dev/js/commit/235eb0460ae0638f63acf82957bcfea41b9e955d) Thanks [@jnsdls](https://github.com/jnsdls)! - update chains
|
||||
|
||||
## 0.1.10
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- [#848](https://github.com/thirdweb-dev/js/pull/848) [`1137a20d`](https://github.com/thirdweb-dev/js/commit/1137a20de44603d35e71eae2f2b6fec79febec00) Thanks [@jnsdls](https://github.com/jnsdls)! - more complete types for chains and better generation
|
||||
|
||||
## 0.1.9
|
||||
|
||||
### Patch Changes
|
||||
|
||||
+15
-11
@@ -1,3 +1,4 @@
|
||||
import type { Chain } from "../src/types";
|
||||
export default {
|
||||
"name": "Ethereum Mainnet",
|
||||
"chain": "ETH",
|
||||
@@ -5,21 +6,13 @@ export default {
|
||||
"url": "ipfs://QmcxZHpyJa8T4i63xqjPYrZ6tKrt55tZJpbXcjSDKuKaf9/ethereum/512.png",
|
||||
"height": 512,
|
||||
"width": 512,
|
||||
"format": "png",
|
||||
"sizes": [
|
||||
512,
|
||||
256,
|
||||
128,
|
||||
64,
|
||||
32,
|
||||
16
|
||||
]
|
||||
"format": "png"
|
||||
},
|
||||
"rpc": [
|
||||
"https://ethereum.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||
"https://eth-mainnet.g.alchemy.com/v2/${ALCHEMY_API_KEY}",
|
||||
"https://mainnet.infura.io/v3/${INFURA_API_KEY}",
|
||||
"wss://mainnet.infura.io/ws/v3/${INFURA_API_KEY}",
|
||||
"https://eth-mainnet.g.alchemy.com/v2/${ALCHEMY_API_KEY}",
|
||||
"https://api.mycryptoapi.com/eth",
|
||||
"https://cloudflare-eth.com",
|
||||
"https://ethereum.publicnode.com"
|
||||
@@ -51,8 +44,19 @@ export default {
|
||||
"name": "etherscan",
|
||||
"url": "https://etherscan.io",
|
||||
"standard": "EIP3091"
|
||||
},
|
||||
{
|
||||
"name": "blockscout",
|
||||
"url": "https://eth.blockscout.com",
|
||||
"icon": {
|
||||
"url": "ipfs://QmYtUimyqHkkFxYdbXXRbUqNg2VLPUg6Uu2C2nmFWowiZM",
|
||||
"width": 551,
|
||||
"height": 540,
|
||||
"format": "png"
|
||||
},
|
||||
"standard": "EIP3091"
|
||||
}
|
||||
],
|
||||
"testnet": false,
|
||||
"slug": "ethereum"
|
||||
} as const;
|
||||
} as const satisfies Chain;
|
||||
@@ -1,11 +1,13 @@
|
||||
import type { Chain } from "../src/types";
|
||||
export default {
|
||||
"name": "Optimism",
|
||||
"name": "OP Mainnet",
|
||||
"chain": "ETH",
|
||||
"rpc": [
|
||||
"https://optimism.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||
"https://opt-mainnet.g.alchemy.com/v2/${ALCHEMY_API_KEY}",
|
||||
"https://optimism-mainnet.infura.io/v3/${INFURA_API_KEY}",
|
||||
"https://mainnet.optimism.io/"
|
||||
"https://opt-mainnet.g.alchemy.com/v2/${ALCHEMY_API_KEY}",
|
||||
"https://mainnet.optimism.io",
|
||||
"https://optimism.publicnode.com"
|
||||
],
|
||||
"faucets": [],
|
||||
"nativeCurrency": {
|
||||
@@ -22,22 +24,25 @@ export default {
|
||||
"name": "etherscan",
|
||||
"url": "https://optimistic.etherscan.io",
|
||||
"standard": "EIP3091"
|
||||
},
|
||||
{
|
||||
"name": "blockscout",
|
||||
"url": "https://optimism.blockscout.com",
|
||||
"icon": {
|
||||
"url": "ipfs://QmYtUimyqHkkFxYdbXXRbUqNg2VLPUg6Uu2C2nmFWowiZM",
|
||||
"width": 551,
|
||||
"height": 540,
|
||||
"format": "png"
|
||||
},
|
||||
"standard": "EIP3091"
|
||||
}
|
||||
],
|
||||
"icon": {
|
||||
"url": "ipfs://QmcxZHpyJa8T4i63xqjPYrZ6tKrt55tZJpbXcjSDKuKaf9/optimism/512.png",
|
||||
"height": 512,
|
||||
"width": 512,
|
||||
"format": "png",
|
||||
"sizes": [
|
||||
512,
|
||||
256,
|
||||
128,
|
||||
64,
|
||||
32,
|
||||
16
|
||||
]
|
||||
"format": "png"
|
||||
},
|
||||
"testnet": false,
|
||||
"slug": "optimism"
|
||||
} as const;
|
||||
} as const satisfies Chain;
|
||||
@@ -1,3 +1,4 @@
|
||||
import type { Chain } from "../src/types";
|
||||
export default {
|
||||
"name": "Gnosis",
|
||||
"chain": "GNO",
|
||||
@@ -10,20 +11,23 @@ export default {
|
||||
"rpc": [
|
||||
"https://gnosis.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||
"https://rpc.gnosischain.com",
|
||||
"https://rpc.gnosis.gateway.fm",
|
||||
"https://rpc.ankr.com/gnosis",
|
||||
"https://gnosischain-rpc.gateway.pokt.network",
|
||||
"https://gnosis-mainnet.public.blastapi.io",
|
||||
"https://gnosis.api.onfinality.io/public",
|
||||
"https://gnosis.blockpi.network/v1/rpc/public",
|
||||
"https://web3endpoints.com/gnosischain-mainnet",
|
||||
"wss://rpc.gnosischain.com/wss"
|
||||
],
|
||||
"faucets": [
|
||||
"https://gnosisfaucet.com",
|
||||
"https://faucet.gimlu.com/gnosis",
|
||||
"https://stakely.io/faucet/gnosis-chain-xdai",
|
||||
"https://faucet.prussia.dev/xdai"
|
||||
],
|
||||
"nativeCurrency": {
|
||||
"name": "xDAI",
|
||||
"symbol": "xDAI",
|
||||
"symbol": "XDAI",
|
||||
"decimals": 18
|
||||
},
|
||||
"infoURL": "https://docs.gnosischain.com",
|
||||
@@ -33,17 +37,22 @@ export default {
|
||||
"slip44": 700,
|
||||
"explorers": [
|
||||
{
|
||||
"name": "gnosisscan",
|
||||
"url": "https://gnosisscan.io",
|
||||
"name": "blockscout",
|
||||
"url": "https://gnosis.blockscout.com",
|
||||
"icon": {
|
||||
"url": "ipfs://QmYtUimyqHkkFxYdbXXRbUqNg2VLPUg6Uu2C2nmFWowiZM",
|
||||
"width": 551,
|
||||
"height": 540,
|
||||
"format": "png"
|
||||
},
|
||||
"standard": "EIP3091"
|
||||
},
|
||||
{
|
||||
"name": "blockscout",
|
||||
"url": "https://blockscout.com/xdai/mainnet",
|
||||
"icon": "blockscout",
|
||||
"name": "gnosisscan",
|
||||
"url": "https://gnosisscan.io",
|
||||
"standard": "EIP3091"
|
||||
}
|
||||
],
|
||||
"testnet": false,
|
||||
"slug": "gnosis"
|
||||
} as const;
|
||||
} as const satisfies Chain;
|
||||
@@ -1,3 +1,4 @@
|
||||
import type { Chain } from "../src/types";
|
||||
export default {
|
||||
"name": "GTON Mainnet",
|
||||
"chain": "GTON",
|
||||
@@ -28,4 +29,4 @@ export default {
|
||||
},
|
||||
"testnet": false,
|
||||
"slug": "gton"
|
||||
} as const;
|
||||
} as const satisfies Chain;
|
||||
@@ -1,3 +1,4 @@
|
||||
import type { Chain } from "../src/types";
|
||||
export default {
|
||||
"name": "Smart Bitcoin Cash",
|
||||
"chain": "smartBCH",
|
||||
@@ -20,4 +21,4 @@ export default {
|
||||
"networkId": 10000,
|
||||
"testnet": false,
|
||||
"slug": "smart-bitcoin-cash"
|
||||
} as const;
|
||||
} as const satisfies Chain;
|
||||
@@ -1,3 +1,4 @@
|
||||
import type { Chain } from "../src/types";
|
||||
export default {
|
||||
"name": "QuarkChain Mainnet Root",
|
||||
"chain": "QuarkChain",
|
||||
@@ -17,4 +18,4 @@ export default {
|
||||
"networkId": 100000,
|
||||
"testnet": false,
|
||||
"slug": "quarkchain-root"
|
||||
} as const;
|
||||
} as const satisfies Chain;
|
||||
@@ -1,3 +1,4 @@
|
||||
import type { Chain } from "../src/types";
|
||||
export default {
|
||||
"name": "QuarkChain Mainnet Shard 0",
|
||||
"chain": "QuarkChain",
|
||||
@@ -29,4 +30,4 @@ export default {
|
||||
],
|
||||
"testnet": false,
|
||||
"slug": "quarkchain-shard-0"
|
||||
} as const;
|
||||
} as const satisfies Chain;
|
||||
@@ -1,3 +1,4 @@
|
||||
import type { Chain } from "../src/types";
|
||||
export default {
|
||||
"name": "QuarkChain Mainnet Shard 1",
|
||||
"chain": "QuarkChain",
|
||||
@@ -29,4 +30,4 @@ export default {
|
||||
],
|
||||
"testnet": false,
|
||||
"slug": "quarkchain-shard-1"
|
||||
} as const;
|
||||
} as const satisfies Chain;
|
||||
@@ -1,3 +1,4 @@
|
||||
import type { Chain } from "../src/types";
|
||||
export default {
|
||||
"name": "QuarkChain Mainnet Shard 2",
|
||||
"chain": "QuarkChain",
|
||||
@@ -29,4 +30,4 @@ export default {
|
||||
],
|
||||
"testnet": false,
|
||||
"slug": "quarkchain-shard-2"
|
||||
} as const;
|
||||
} as const satisfies Chain;
|
||||
@@ -1,3 +1,4 @@
|
||||
import type { Chain } from "../src/types";
|
||||
export default {
|
||||
"name": "QuarkChain Mainnet Shard 3",
|
||||
"chain": "QuarkChain",
|
||||
@@ -29,4 +30,4 @@ export default {
|
||||
],
|
||||
"testnet": false,
|
||||
"slug": "quarkchain-shard-3"
|
||||
} as const;
|
||||
} as const satisfies Chain;
|
||||
@@ -1,3 +1,4 @@
|
||||
import type { Chain } from "../src/types";
|
||||
export default {
|
||||
"name": "QuarkChain Mainnet Shard 4",
|
||||
"chain": "QuarkChain",
|
||||
@@ -29,4 +30,4 @@ export default {
|
||||
],
|
||||
"testnet": false,
|
||||
"slug": "quarkchain-shard-4"
|
||||
} as const;
|
||||
} as const satisfies Chain;
|
||||
@@ -1,3 +1,4 @@
|
||||
import type { Chain } from "../src/types";
|
||||
export default {
|
||||
"name": "QuarkChain Mainnet Shard 5",
|
||||
"chain": "QuarkChain",
|
||||
@@ -29,4 +30,4 @@ export default {
|
||||
],
|
||||
"testnet": false,
|
||||
"slug": "quarkchain-shard-5"
|
||||
} as const;
|
||||
} as const satisfies Chain;
|
||||
@@ -1,3 +1,4 @@
|
||||
import type { Chain } from "../src/types";
|
||||
export default {
|
||||
"name": "QuarkChain Mainnet Shard 6",
|
||||
"chain": "QuarkChain",
|
||||
@@ -29,4 +30,4 @@ export default {
|
||||
],
|
||||
"testnet": false,
|
||||
"slug": "quarkchain-shard-6"
|
||||
} as const;
|
||||
} as const satisfies Chain;
|
||||
@@ -1,3 +1,4 @@
|
||||
import type { Chain } from "../src/types";
|
||||
export default {
|
||||
"name": "QuarkChain Mainnet Shard 7",
|
||||
"chain": "QuarkChain",
|
||||
@@ -29,4 +30,4 @@ export default {
|
||||
],
|
||||
"testnet": false,
|
||||
"slug": "quarkchain-shard-7"
|
||||
} as const;
|
||||
} as const satisfies Chain;
|
||||
@@ -1,3 +1,4 @@
|
||||
import type { Chain } from "../src/types";
|
||||
export default {
|
||||
"name": "VeChain",
|
||||
"chain": "VeChain",
|
||||
@@ -26,4 +27,4 @@ export default {
|
||||
],
|
||||
"testnet": false,
|
||||
"slug": "vechain"
|
||||
} as const;
|
||||
} as const satisfies Chain;
|
||||
@@ -1,3 +1,4 @@
|
||||
import type { Chain } from "../src/types";
|
||||
export default {
|
||||
"name": "Smart Bitcoin Cash Testnet",
|
||||
"chain": "smartBCHTest",
|
||||
@@ -18,4 +19,4 @@ export default {
|
||||
"networkId": 10001,
|
||||
"testnet": true,
|
||||
"slug": "smart-bitcoin-cash-testnet"
|
||||
} as const;
|
||||
} as const satisfies Chain;
|
||||
@@ -1,3 +1,4 @@
|
||||
import type { Chain } from "../src/types";
|
||||
export default {
|
||||
"name": "VeChain Testnet",
|
||||
"chain": "VeChain",
|
||||
@@ -23,4 +24,4 @@ export default {
|
||||
],
|
||||
"testnet": true,
|
||||
"slug": "vechain-testnet"
|
||||
} as const;
|
||||
} as const satisfies Chain;
|
||||
@@ -1,3 +1,4 @@
|
||||
import type { Chain } from "../src/types";
|
||||
export default {
|
||||
"name": "Klaytn Testnet Baobab",
|
||||
"chain": "KLAY",
|
||||
@@ -19,4 +20,4 @@ export default {
|
||||
"networkId": 1001,
|
||||
"testnet": true,
|
||||
"slug": "klaytn-testnet-baobab"
|
||||
} as const;
|
||||
} as const satisfies Chain;
|
||||
@@ -1,3 +1,4 @@
|
||||
import type { Chain } from "../src/types";
|
||||
export default {
|
||||
"name": "Gon Chain",
|
||||
"chain": "GonChain",
|
||||
@@ -10,7 +11,10 @@ export default {
|
||||
"rpc": [
|
||||
"https://gon-chain.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||
"https://node1.testnet.gaiaopen.network",
|
||||
"http://database1.gaiaopen.network"
|
||||
"https://node1.mainnet.gon.network",
|
||||
"https://node2.mainnet.gon.network",
|
||||
"https://node3.mainnet.gon.network",
|
||||
"https://node4.mainnet.gon.network"
|
||||
],
|
||||
"faucets": [],
|
||||
"nativeCurrency": {
|
||||
@@ -31,4 +35,4 @@ export default {
|
||||
],
|
||||
"testnet": true,
|
||||
"slug": "gon-chain"
|
||||
} as const;
|
||||
} as const satisfies Chain;
|
||||
@@ -1,3 +1,4 @@
|
||||
import type { Chain } from "../src/types";
|
||||
export default {
|
||||
"name": "T-EKTA",
|
||||
"title": "EKTA Testnet T-EKTA",
|
||||
@@ -26,10 +27,15 @@ export default {
|
||||
{
|
||||
"name": "test-ektascan",
|
||||
"url": "https://test.ektascan.io",
|
||||
"icon": "ekta",
|
||||
"icon": {
|
||||
"url": "ipfs://QmfMd564KUPK8eKZDwGCT71ZC2jMnUZqP6LCtLpup3rHH1",
|
||||
"width": 2100,
|
||||
"height": 2100,
|
||||
"format": "png"
|
||||
},
|
||||
"standard": "EIP3091"
|
||||
}
|
||||
],
|
||||
"testnet": true,
|
||||
"slug": "t-ekta"
|
||||
} as const;
|
||||
} as const satisfies Chain;
|
||||
@@ -1,3 +1,4 @@
|
||||
import type { Chain } from "../src/types";
|
||||
export default {
|
||||
"name": "Plian Testnet Subchain 1",
|
||||
"chain": "Plian",
|
||||
@@ -28,4 +29,4 @@ export default {
|
||||
},
|
||||
"testnet": true,
|
||||
"slug": "plian-testnet-subchain-1"
|
||||
} as const;
|
||||
} as const satisfies Chain;
|
||||
@@ -1,3 +1,4 @@
|
||||
import type { Chain } from "../src/types";
|
||||
export default {
|
||||
"name": "Newton Testnet",
|
||||
"chain": "NEW",
|
||||
@@ -17,4 +18,4 @@ export default {
|
||||
"networkId": 1007,
|
||||
"testnet": true,
|
||||
"slug": "newton-testnet"
|
||||
} as const;
|
||||
} as const satisfies Chain;
|
||||
@@ -1,3 +1,4 @@
|
||||
import type { Chain } from "../src/types";
|
||||
export default {
|
||||
"name": "Eurus Mainnet",
|
||||
"chain": "EUN",
|
||||
@@ -25,10 +26,15 @@ export default {
|
||||
{
|
||||
"name": "eurusexplorer",
|
||||
"url": "https://explorer.eurus.network",
|
||||
"icon": "eurus",
|
||||
"icon": {
|
||||
"url": "ipfs://QmaGd5L9jGPbfyGXBFhu9gjinWJ66YtNrXq8x6Q98Eep9e",
|
||||
"width": 471,
|
||||
"height": 471,
|
||||
"format": "svg"
|
||||
},
|
||||
"standard": "none"
|
||||
}
|
||||
],
|
||||
"testnet": false,
|
||||
"slug": "eurus"
|
||||
} as const;
|
||||
} as const satisfies Chain;
|
||||
@@ -1,3 +1,4 @@
|
||||
import type { Chain } from "../src/types";
|
||||
export default {
|
||||
"name": "SJATSH",
|
||||
"chain": "ETH",
|
||||
@@ -17,4 +18,4 @@ export default {
|
||||
"networkId": 10086,
|
||||
"testnet": false,
|
||||
"slug": "sjatsh"
|
||||
} as const;
|
||||
} as const satisfies Chain;
|
||||
@@ -1,3 +1,4 @@
|
||||
import type { Chain } from "../src/types";
|
||||
export default {
|
||||
"name": "EtherInc",
|
||||
"chain": "ETI",
|
||||
@@ -18,4 +19,4 @@ export default {
|
||||
"slip44": 464,
|
||||
"testnet": false,
|
||||
"slug": "etherinc"
|
||||
} as const;
|
||||
} as const satisfies Chain;
|
||||
@@ -1,3 +1,4 @@
|
||||
import type { Chain } from "../src/types";
|
||||
export default {
|
||||
"name": "Evrice Network",
|
||||
"chain": "EVC",
|
||||
@@ -18,4 +19,4 @@ export default {
|
||||
"slip44": 1020,
|
||||
"testnet": false,
|
||||
"slug": "evrice-network"
|
||||
} as const;
|
||||
} as const satisfies Chain;
|
||||
@@ -1,3 +1,4 @@
|
||||
import type { Chain } from "../src/types";
|
||||
export default {
|
||||
"name": "Blockchain Genesis Mainnet",
|
||||
"chain": "GEN",
|
||||
@@ -19,4 +20,4 @@ export default {
|
||||
"networkId": 10101,
|
||||
"testnet": false,
|
||||
"slug": "blockchain-genesis"
|
||||
} as const;
|
||||
} as const satisfies Chain;
|
||||
@@ -1,3 +1,4 @@
|
||||
import type { Chain } from "../src/types";
|
||||
export default {
|
||||
"name": "Soverun Testnet",
|
||||
"chain": "SVRN",
|
||||
@@ -32,4 +33,4 @@ export default {
|
||||
],
|
||||
"testnet": true,
|
||||
"slug": "soverun-testnet"
|
||||
} as const;
|
||||
} as const satisfies Chain;
|
||||
@@ -1,3 +1,4 @@
|
||||
import type { Chain } from "../src/types";
|
||||
export default {
|
||||
"name": "Soverun Mainnet",
|
||||
"chain": "SVRN",
|
||||
@@ -32,4 +33,4 @@ export default {
|
||||
],
|
||||
"testnet": false,
|
||||
"slug": "soverun"
|
||||
} as const;
|
||||
} as const satisfies Chain;
|
||||
@@ -1,3 +1,4 @@
|
||||
import type { Chain } from "../src/types";
|
||||
export default {
|
||||
"name": "Newton",
|
||||
"chain": "NEW",
|
||||
@@ -17,4 +18,4 @@ export default {
|
||||
"networkId": 1012,
|
||||
"testnet": false,
|
||||
"slug": "newton"
|
||||
} as const;
|
||||
} as const satisfies Chain;
|
||||
@@ -1,3 +1,4 @@
|
||||
import type { Chain } from "../src/types";
|
||||
export default {
|
||||
"name": "Web3Games Testnet",
|
||||
"chain": "Web3Games",
|
||||
@@ -25,4 +26,4 @@ export default {
|
||||
"networkId": 102,
|
||||
"testnet": true,
|
||||
"slug": "web3games-testnet"
|
||||
} as const;
|
||||
} as const satisfies Chain;
|
||||
@@ -1,6 +1,7 @@
|
||||
import type { Chain } from "../src/types";
|
||||
export default {
|
||||
"name": "Chiado Testnet",
|
||||
"chain": "CHI",
|
||||
"name": "Gnosis Chiado Testnet",
|
||||
"chain": "GNO",
|
||||
"icon": {
|
||||
"url": "ipfs://bafybeidk4swpgdyqmpz6shd5onvpaujvwiwthrhypufnwr6xh3dausz2dm",
|
||||
"width": 1800,
|
||||
@@ -8,16 +9,17 @@ export default {
|
||||
"format": "png"
|
||||
},
|
||||
"rpc": [
|
||||
"https://chiado-testnet.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||
"https://gnosis-chiado-testnet.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||
"https://rpc.chiadochain.net",
|
||||
"https://rpc.eu-central-2.gateway.fm/v3/gnosis/archival/chiado"
|
||||
"https://rpc.chiado.gnosis.gateway.fm",
|
||||
"wss://rpc.chiadochain.net/wss"
|
||||
],
|
||||
"faucets": [
|
||||
"https://gnosisfaucet.com"
|
||||
],
|
||||
"nativeCurrency": {
|
||||
"name": "Chiado xDAI",
|
||||
"symbol": "xDAI",
|
||||
"symbol": "XDAI",
|
||||
"decimals": 18
|
||||
},
|
||||
"infoURL": "https://docs.gnosischain.com",
|
||||
@@ -27,11 +29,16 @@ export default {
|
||||
"explorers": [
|
||||
{
|
||||
"name": "blockscout",
|
||||
"url": "https://blockscout.chiadochain.net",
|
||||
"icon": "blockscout",
|
||||
"url": "https://gnosis-chiado.blockscout.com",
|
||||
"icon": {
|
||||
"url": "ipfs://QmYtUimyqHkkFxYdbXXRbUqNg2VLPUg6Uu2C2nmFWowiZM",
|
||||
"width": 551,
|
||||
"height": 540,
|
||||
"format": "png"
|
||||
},
|
||||
"standard": "EIP3091"
|
||||
}
|
||||
],
|
||||
"testnet": true,
|
||||
"slug": "chiado-testnet"
|
||||
} as const;
|
||||
"slug": "gnosis-chiado-testnet"
|
||||
} as const satisfies Chain;
|
||||
@@ -1,3 +1,4 @@
|
||||
import type { Chain } from "../src/types";
|
||||
export default {
|
||||
"name": "Sakura",
|
||||
"chain": "Sakura",
|
||||
@@ -14,4 +15,4 @@ export default {
|
||||
"networkId": 1022,
|
||||
"testnet": false,
|
||||
"slug": "sakura"
|
||||
} as const;
|
||||
} as const satisfies Chain;
|
||||
@@ -1,3 +1,4 @@
|
||||
import type { Chain } from "../src/types";
|
||||
export default {
|
||||
"name": "Clover Testnet",
|
||||
"chain": "Clover",
|
||||
@@ -14,4 +15,4 @@ export default {
|
||||
"networkId": 1023,
|
||||
"testnet": true,
|
||||
"slug": "clover-testnet"
|
||||
} as const;
|
||||
} as const satisfies Chain;
|
||||
@@ -1,3 +1,4 @@
|
||||
import type { Chain } from "../src/types";
|
||||
export default {
|
||||
"name": "CLV Parachain",
|
||||
"chain": "CLV",
|
||||
@@ -17,4 +18,4 @@ export default {
|
||||
"networkId": 1024,
|
||||
"testnet": false,
|
||||
"slug": "clv-parachain"
|
||||
} as const;
|
||||
} as const satisfies Chain;
|
||||
@@ -1,3 +1,4 @@
|
||||
import type { Chain } from "../src/types";
|
||||
export default {
|
||||
"name": "0XTade",
|
||||
"chain": "0XTade Chain",
|
||||
@@ -24,4 +25,4 @@ export default {
|
||||
],
|
||||
"testnet": false,
|
||||
"slug": "0xtade"
|
||||
} as const;
|
||||
} as const satisfies Chain;
|
||||
@@ -1,3 +1,4 @@
|
||||
import type { Chain } from "../src/types";
|
||||
export default {
|
||||
"name": "BitTorrent Chain Testnet",
|
||||
"chain": "BTTC",
|
||||
@@ -24,4 +25,4 @@ export default {
|
||||
],
|
||||
"testnet": true,
|
||||
"slug": "bittorrent-chain-testnet"
|
||||
} as const;
|
||||
} as const satisfies Chain;
|
||||
@@ -1,3 +1,4 @@
|
||||
import type { Chain } from "../src/types";
|
||||
export default {
|
||||
"name": "Conflux eSpace",
|
||||
"chain": "Conflux",
|
||||
@@ -30,4 +31,4 @@ export default {
|
||||
],
|
||||
"testnet": false,
|
||||
"slug": "conflux-espace"
|
||||
} as const;
|
||||
} as const satisfies Chain;
|
||||
@@ -1,3 +1,4 @@
|
||||
import type { Chain } from "../src/types";
|
||||
export default {
|
||||
"name": "Crystaleum",
|
||||
"chain": "crystal",
|
||||
@@ -26,10 +27,15 @@ export default {
|
||||
{
|
||||
"name": "blockscout",
|
||||
"url": "https://scan.crystaleum.org",
|
||||
"icon": "crystal",
|
||||
"icon": {
|
||||
"url": "ipfs://Qmbry1Uc6HnXmqFNXW5dFJ7To8EezCCjNr4TqqvAyzXS4h",
|
||||
"width": 150,
|
||||
"height": 150,
|
||||
"format": "png"
|
||||
},
|
||||
"standard": "EIP3091"
|
||||
}
|
||||
],
|
||||
"testnet": false,
|
||||
"slug": "crystaleum"
|
||||
} as const;
|
||||
} as const satisfies Chain;
|
||||
@@ -1,3 +1,4 @@
|
||||
import type { Chain } from "../src/types";
|
||||
export default {
|
||||
"name": "Proxy Network Testnet",
|
||||
"chain": "Proxy Network",
|
||||
@@ -24,4 +25,4 @@ export default {
|
||||
],
|
||||
"testnet": true,
|
||||
"slug": "proxy-network-testnet"
|
||||
} as const;
|
||||
} as const satisfies Chain;
|
||||
@@ -1,3 +1,4 @@
|
||||
import type { Chain } from "../src/types";
|
||||
export default {
|
||||
"name": "Bronos Testnet",
|
||||
"chain": "Bronos",
|
||||
@@ -28,9 +29,14 @@ export default {
|
||||
"name": "Bronos Testnet Explorer",
|
||||
"url": "https://tbroscan.bronos.org",
|
||||
"standard": "none",
|
||||
"icon": "bronos"
|
||||
"icon": {
|
||||
"url": "ipfs://bafybeifkgtmhnq4sxu6jn22i7ass7aih6ubodr77k6ygtu4tjbvpmkw2ga",
|
||||
"width": 500,
|
||||
"height": 500,
|
||||
"format": "png"
|
||||
}
|
||||
}
|
||||
],
|
||||
"testnet": true,
|
||||
"slug": "bronos-testnet"
|
||||
} as const;
|
||||
} as const satisfies Chain;
|
||||
@@ -1,3 +1,4 @@
|
||||
import type { Chain } from "../src/types";
|
||||
export default {
|
||||
"name": "Bronos Mainnet",
|
||||
"chain": "Bronos",
|
||||
@@ -23,9 +24,14 @@ export default {
|
||||
"name": "Bronos Explorer",
|
||||
"url": "https://broscan.bronos.org",
|
||||
"standard": "none",
|
||||
"icon": "bronos"
|
||||
"icon": {
|
||||
"url": "ipfs://bafybeifkgtmhnq4sxu6jn22i7ass7aih6ubodr77k6ygtu4tjbvpmkw2ga",
|
||||
"width": 500,
|
||||
"height": 500,
|
||||
"format": "png"
|
||||
}
|
||||
}
|
||||
],
|
||||
"testnet": false,
|
||||
"slug": "bronos"
|
||||
} as const;
|
||||
} as const satisfies Chain;
|
||||
@@ -1,3 +1,4 @@
|
||||
import type { Chain } from "../src/types";
|
||||
export default {
|
||||
"name": "Kaiba Lightning Chain Testnet",
|
||||
"chain": "tKLC",
|
||||
@@ -25,10 +26,15 @@ export default {
|
||||
{
|
||||
"name": "kaibascan",
|
||||
"url": "https://kaibascan.io",
|
||||
"icon": "kaibascan",
|
||||
"icon": {
|
||||
"url": "ipfs://bafybeihbsw3ky7yf6llpww6fabo4dicotcgwjpefscoxrppstjx25dvtea",
|
||||
"width": 932,
|
||||
"height": 932,
|
||||
"format": "png"
|
||||
},
|
||||
"standard": "EIP3091"
|
||||
}
|
||||
],
|
||||
"testnet": true,
|
||||
"slug": "kaiba-lightning-chain-testnet"
|
||||
} as const;
|
||||
} as const satisfies Chain;
|
||||
@@ -1,3 +1,4 @@
|
||||
import type { Chain } from "../src/types";
|
||||
export default {
|
||||
"name": "Web3Games Devnet",
|
||||
"chain": "Web3Games",
|
||||
@@ -30,4 +31,4 @@ export default {
|
||||
],
|
||||
"testnet": false,
|
||||
"slug": "web3games-devnet"
|
||||
} as const;
|
||||
} as const satisfies Chain;
|
||||
@@ -1,3 +1,4 @@
|
||||
import type { Chain } from "../src/types";
|
||||
export default {
|
||||
"name": "Numbers Mainnet",
|
||||
"chain": "NUM",
|
||||
@@ -30,4 +31,4 @@ export default {
|
||||
],
|
||||
"testnet": false,
|
||||
"slug": "numbers"
|
||||
} as const;
|
||||
} as const satisfies Chain;
|
||||
@@ -1,3 +1,4 @@
|
||||
import type { Chain } from "../src/types";
|
||||
export default {
|
||||
"name": "Numbers Testnet",
|
||||
"chain": "NUM",
|
||||
@@ -33,4 +34,4 @@ export default {
|
||||
],
|
||||
"testnet": true,
|
||||
"slug": "numbers-testnet"
|
||||
} as const;
|
||||
} as const satisfies Chain;
|
||||
@@ -1,3 +1,4 @@
|
||||
import type { Chain } from "../src/types";
|
||||
export default {
|
||||
"name": "Velas EVM Mainnet",
|
||||
"chain": "Velas",
|
||||
@@ -31,4 +32,4 @@ export default {
|
||||
],
|
||||
"testnet": false,
|
||||
"slug": "velas-evm"
|
||||
} as const;
|
||||
} as const satisfies Chain;
|
||||
@@ -1,3 +1,4 @@
|
||||
import type { Chain } from "../src/types";
|
||||
export default {
|
||||
"name": "Nebula Testnet",
|
||||
"chain": "NTN",
|
||||
@@ -9,7 +10,7 @@ export default {
|
||||
},
|
||||
"rpc": [
|
||||
"https://nebula-testnet.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||
"https://testnet.rpc.novanetwork.io:9070"
|
||||
"https://testnet.rpc.novanetwork.io"
|
||||
],
|
||||
"faucets": [
|
||||
"https://faucet.novanetwork.io"
|
||||
@@ -32,4 +33,4 @@ export default {
|
||||
],
|
||||
"testnet": true,
|
||||
"slug": "nebula-testnet"
|
||||
} as const;
|
||||
} as const satisfies Chain;
|
||||
@@ -0,0 +1,38 @@
|
||||
import type { Chain } from "../src/types";
|
||||
export default {
|
||||
"name": "ShimmerEVM Testnet",
|
||||
"title": "ShimmerEVM Testnet",
|
||||
"chain": "ShimmerEVM",
|
||||
"icon": {
|
||||
"url": "ipfs://bafkreibky2sy6qhi6arktayvologkrgu5kudpgdxfkx4uosbvmstz7v4di",
|
||||
"width": 720,
|
||||
"height": 720,
|
||||
"format": "png"
|
||||
},
|
||||
"rpc": [
|
||||
"https://shimmerevm-testnet.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||
"https://json-rpc.evm.testnet.shimmer.network"
|
||||
],
|
||||
"faucets": [
|
||||
"https://evm-toolkit.evm.testnet.shimmer.network",
|
||||
"https://evm-faucet.testnet.shimmer.network"
|
||||
],
|
||||
"nativeCurrency": {
|
||||
"name": "SMR",
|
||||
"symbol": "SMR",
|
||||
"decimals": 6
|
||||
},
|
||||
"infoURL": "https://shimmer.network",
|
||||
"shortName": "shimmerevm-testnet",
|
||||
"chainId": 1072,
|
||||
"networkId": 1072,
|
||||
"explorers": [
|
||||
{
|
||||
"name": "explorer",
|
||||
"url": "https://explorer.evm.testnet.shimmer.network",
|
||||
"standard": "EIP3091"
|
||||
}
|
||||
],
|
||||
"testnet": true,
|
||||
"slug": "shimmerevm-testnet"
|
||||
} as const satisfies Chain;
|
||||
@@ -0,0 +1,35 @@
|
||||
import type { Chain } from "../src/types";
|
||||
export default {
|
||||
"name": "Mintara Testnet",
|
||||
"title": "Mintara Testnet",
|
||||
"chain": "Mintara",
|
||||
"icon": {
|
||||
"url": "ipfs://bafybeie7jzlzlpz7c3a3oh4x5joej23dj2qf3cexmchjyc72hv3fblcaja",
|
||||
"width": 256,
|
||||
"height": 256,
|
||||
"format": "png"
|
||||
},
|
||||
"rpc": [
|
||||
"https://mintara-testnet.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||
"https://subnets.avax.network/mintara/testnet/rpc"
|
||||
],
|
||||
"faucets": [],
|
||||
"nativeCurrency": {
|
||||
"name": "MINTARA",
|
||||
"symbol": "MNTR",
|
||||
"decimals": 18
|
||||
},
|
||||
"infoURL": "https://playthink.co.jp",
|
||||
"shortName": "mintara-testnet",
|
||||
"chainId": 1079,
|
||||
"networkId": 1079,
|
||||
"explorers": [
|
||||
{
|
||||
"name": "explorer",
|
||||
"url": "https://subnets-test.avax.network/mintara",
|
||||
"standard": "EIP3091"
|
||||
}
|
||||
],
|
||||
"testnet": true,
|
||||
"slug": "mintara-testnet"
|
||||
} as const satisfies Chain;
|
||||
@@ -1,3 +1,4 @@
|
||||
import type { Chain } from "../src/types";
|
||||
export default {
|
||||
"name": "ThunderCore Mainnet",
|
||||
"chain": "TT",
|
||||
@@ -29,4 +30,4 @@ export default {
|
||||
],
|
||||
"testnet": false,
|
||||
"slug": "thundercore"
|
||||
} as const;
|
||||
} as const satisfies Chain;
|
||||
@@ -0,0 +1,35 @@
|
||||
import type { Chain } from "../src/types";
|
||||
export default {
|
||||
"name": "Mintara Mainnet",
|
||||
"title": "Mintara Mainnet",
|
||||
"chain": "Mintara",
|
||||
"icon": {
|
||||
"url": "ipfs://bafybeie7jzlzlpz7c3a3oh4x5joej23dj2qf3cexmchjyc72hv3fblcaja",
|
||||
"width": 256,
|
||||
"height": 256,
|
||||
"format": "png"
|
||||
},
|
||||
"rpc": [
|
||||
"https://mintara.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||
"https://subnets.avax.network/mintara/mainnet/rpc"
|
||||
],
|
||||
"faucets": [],
|
||||
"nativeCurrency": {
|
||||
"name": "MINTARA",
|
||||
"symbol": "MNTR",
|
||||
"decimals": 18
|
||||
},
|
||||
"infoURL": "https://playthink.co.jp",
|
||||
"shortName": "mintara",
|
||||
"chainId": 1080,
|
||||
"networkId": 1080,
|
||||
"explorers": [
|
||||
{
|
||||
"name": "explorer",
|
||||
"url": "https://subnets.avax.network/mintara",
|
||||
"standard": "EIP3091"
|
||||
}
|
||||
],
|
||||
"testnet": false,
|
||||
"slug": "mintara"
|
||||
} as const satisfies Chain;
|
||||
@@ -1,3 +1,4 @@
|
||||
import type { Chain } from "../src/types";
|
||||
export default {
|
||||
"name": "CryptoCoinPay",
|
||||
"chain": "CCP",
|
||||
@@ -31,4 +32,4 @@ export default {
|
||||
],
|
||||
"testnet": false,
|
||||
"slug": "cryptocoinpay"
|
||||
} as const;
|
||||
} as const satisfies Chain;
|
||||
@@ -1,3 +1,4 @@
|
||||
import type { Chain } from "../src/types";
|
||||
export default {
|
||||
"name": "Metis Andromeda Mainnet",
|
||||
"chain": "ETH",
|
||||
@@ -39,4 +40,4 @@ export default {
|
||||
},
|
||||
"testnet": false,
|
||||
"slug": "metis-andromeda"
|
||||
} as const;
|
||||
} as const satisfies Chain;
|
||||
@@ -1,3 +1,4 @@
|
||||
import type { Chain } from "../src/types";
|
||||
export default {
|
||||
"name": "BROChain Mainnet",
|
||||
"chain": "BRO",
|
||||
@@ -27,4 +28,4 @@ export default {
|
||||
],
|
||||
"testnet": false,
|
||||
"slug": "brochain"
|
||||
} as const;
|
||||
} as const satisfies Chain;
|
||||
@@ -1,3 +1,4 @@
|
||||
import type { Chain } from "../src/types";
|
||||
export default {
|
||||
"name": "Quadrans Blockchain",
|
||||
"chain": "QDC",
|
||||
@@ -27,10 +28,15 @@ export default {
|
||||
{
|
||||
"name": "explorer",
|
||||
"url": "https://explorer.quadrans.io",
|
||||
"icon": "quadrans",
|
||||
"icon": {
|
||||
"url": "ipfs://QmZFiYHnE4TrezPz8wSap9nMxG6m98w4fv7ataj2TfLNck",
|
||||
"width": 1024,
|
||||
"height": 1024,
|
||||
"format": "png"
|
||||
},
|
||||
"standard": "EIP3091"
|
||||
}
|
||||
],
|
||||
"testnet": false,
|
||||
"slug": "quadrans-blockchain"
|
||||
} as const;
|
||||
} as const satisfies Chain;
|
||||
@@ -1,3 +1,4 @@
|
||||
import type { Chain } from "../src/types";
|
||||
export default {
|
||||
"name": "Quadrans Blockchain Testnet",
|
||||
"chain": "tQDC",
|
||||
@@ -28,10 +29,15 @@ export default {
|
||||
{
|
||||
"name": "explorer",
|
||||
"url": "https://explorer.testnet.quadrans.io",
|
||||
"icon": "quadrans",
|
||||
"icon": {
|
||||
"url": "ipfs://QmZFiYHnE4TrezPz8wSap9nMxG6m98w4fv7ataj2TfLNck",
|
||||
"width": 1024,
|
||||
"height": 1024,
|
||||
"format": "png"
|
||||
},
|
||||
"standard": "EIP3091"
|
||||
}
|
||||
],
|
||||
"testnet": true,
|
||||
"slug": "quadrans-blockchain-testnet"
|
||||
} as const;
|
||||
} as const satisfies Chain;
|
||||
@@ -1,3 +1,4 @@
|
||||
import type { Chain } from "../src/types";
|
||||
export default {
|
||||
"name": "MOAC mainnet",
|
||||
"chain": "MOAC",
|
||||
@@ -22,4 +23,4 @@ export default {
|
||||
],
|
||||
"testnet": false,
|
||||
"slug": "moac"
|
||||
} as const;
|
||||
} as const satisfies Chain;
|
||||
@@ -1,3 +1,4 @@
|
||||
import type { Chain } from "../src/types";
|
||||
export default {
|
||||
"name": "Metadium Mainnet",
|
||||
"chain": "META",
|
||||
@@ -18,4 +19,4 @@ export default {
|
||||
"slip44": 916,
|
||||
"testnet": false,
|
||||
"slug": "metadium"
|
||||
} as const;
|
||||
} as const satisfies Chain;
|
||||
@@ -1,3 +1,4 @@
|
||||
import type { Chain } from "../src/types";
|
||||
export default {
|
||||
"name": "Proton Testnet",
|
||||
"chain": "XPR",
|
||||
@@ -17,4 +18,4 @@ export default {
|
||||
"networkId": 110,
|
||||
"testnet": true,
|
||||
"slug": "proton-testnet"
|
||||
} as const;
|
||||
} as const satisfies Chain;
|
||||
@@ -1,3 +1,4 @@
|
||||
import type { Chain } from "../src/types";
|
||||
export default {
|
||||
"name": "QuarkChain Devnet Root",
|
||||
"chain": "QuarkChain",
|
||||
@@ -17,4 +18,4 @@ export default {
|
||||
"networkId": 110000,
|
||||
"testnet": false,
|
||||
"slug": "quarkchain-devnet-root"
|
||||
} as const;
|
||||
} as const satisfies Chain;
|
||||
@@ -1,3 +1,4 @@
|
||||
import type { Chain } from "../src/types";
|
||||
export default {
|
||||
"name": "QuarkChain Devnet Shard 0",
|
||||
"chain": "QuarkChain",
|
||||
@@ -29,4 +30,4 @@ export default {
|
||||
],
|
||||
"testnet": false,
|
||||
"slug": "quarkchain-devnet-shard-0"
|
||||
} as const;
|
||||
} as const satisfies Chain;
|
||||
@@ -1,3 +1,4 @@
|
||||
import type { Chain } from "../src/types";
|
||||
export default {
|
||||
"name": "QuarkChain Devnet Shard 1",
|
||||
"chain": "QuarkChain",
|
||||
@@ -29,4 +30,4 @@ export default {
|
||||
],
|
||||
"testnet": false,
|
||||
"slug": "quarkchain-devnet-shard-1"
|
||||
} as const;
|
||||
} as const satisfies Chain;
|
||||
@@ -1,3 +1,4 @@
|
||||
import type { Chain } from "../src/types";
|
||||
export default {
|
||||
"name": "QuarkChain Devnet Shard 2",
|
||||
"chain": "QuarkChain",
|
||||
@@ -29,4 +30,4 @@ export default {
|
||||
],
|
||||
"testnet": false,
|
||||
"slug": "quarkchain-devnet-shard-2"
|
||||
} as const;
|
||||
} as const satisfies Chain;
|
||||
@@ -1,3 +1,4 @@
|
||||
import type { Chain } from "../src/types";
|
||||
export default {
|
||||
"name": "QuarkChain Devnet Shard 3",
|
||||
"chain": "QuarkChain",
|
||||
@@ -29,4 +30,4 @@ export default {
|
||||
],
|
||||
"testnet": false,
|
||||
"slug": "quarkchain-devnet-shard-3"
|
||||
} as const;
|
||||
} as const satisfies Chain;
|
||||
@@ -1,3 +1,4 @@
|
||||
import type { Chain } from "../src/types";
|
||||
export default {
|
||||
"name": "QuarkChain Devnet Shard 4",
|
||||
"chain": "QuarkChain",
|
||||
@@ -29,4 +30,4 @@ export default {
|
||||
],
|
||||
"testnet": false,
|
||||
"slug": "quarkchain-devnet-shard-4"
|
||||
} as const;
|
||||
} as const satisfies Chain;
|
||||
@@ -1,3 +1,4 @@
|
||||
import type { Chain } from "../src/types";
|
||||
export default {
|
||||
"name": "QuarkChain Devnet Shard 5",
|
||||
"chain": "QuarkChain",
|
||||
@@ -29,4 +30,4 @@ export default {
|
||||
],
|
||||
"testnet": false,
|
||||
"slug": "quarkchain-devnet-shard-5"
|
||||
} as const;
|
||||
} as const satisfies Chain;
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user