This repository has been archived by the owner on Aug 5, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 150
/
redirects.mjs
733 lines (716 loc) · 43.8 KB
/
redirects.mjs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
// @ts-check
const reactRedirects = {
"/react": "/react/v4",
"/react/connecting-wallets": "/react/v4/connecting-wallets",
// providers
"/react/react.thirdwebprovider": "/react/v4/ThirdwebProvider",
"/react/react.thirdwebsdkprovider": "/react/v4/ThirdwebSDKProvider",
// components
"/react/react.connectwallet": "/react/v4/components/ConnectWallet",
"/react/react.web3button": "/react/v4/components/Web3Button",
"/react/react.thirdwebnftmedia": "/react/v4/components/ThirdwebNftMedia",
"/react/react.mediarenderer": "/react/v4/components/MediaRenderer",
// wallets
"/react/react.metamaskwallet": "/references/react/v4/metamaskWallet",
"/react/react.coinbasewallet": "/references/react/v4/coinbaseWallet",
"/react/react.walletconnect": "/references/react/v4/walletconnect",
"/react/react.smartwallet": "/references/react/v4/smartWallet",
"/react/react.embeddedwallet": "/references/react/v4/embeddedWallet",
"/react/react.paperwallet": "/references/react/v4/embeddedWallet",
"/react/react.localwallet": "/references/react/v4/localWallet",
"/react/react.trustWallet": "/references/react/v4/trustWallet",
"/react/react.zerion": "/references/react/v4/zerionWallet",
"/react/react.magiclink": "/references/react/v4/magicLink",
"/react/react.safewallet": "/references/react/v4/safeWallet",
"/react/react.blocto": "/references/react/v4/bloctoWallet",
"/react/react.frame": "/references/react/v4/frameWallet",
"/react/react.phantom": "/references/react/v4/phantomWallet",
"/react/react.rainbowWallet": "/references/react/v4/rainbowWallet",
"/react/react.coin98": "/references/react/v4/coin98Wallet",
"/react/react.core": "/references/react/v4/coreWallet",
"/react/react.defiwallet": "/references/react/v4/cryptoDefiWallet",
"/react/react.okx": "/references/react/v4/okxWallet",
"/react/react.onekey": "/references/react/v4/oneKeyWallet",
"/react/react.rabby": "/references/react/v4/rabbyWallet",
// hooks
"/react/react.useaddress": "/references/react/v4/useAddress",
"/react/react.usecontract": "/references/react/v4/useContract",
"/react/react.usecontractread": "/references/react/v4/useContractRead",
"/react/react.usecontractwrite": "/references/react/v4/useContractWrite",
"/react/react.usecontractevents": "/references/react/v4/useContractEvents",
"/react/react.usesdk": "/references/react/v4/useSDK",
"/react/react.useactiveclaimcondition": "/references/react/v4/useActiveClaimCondition",
"/react/react.useactiveclaimconditionforwallet": "/references/react/v4/useActiveClaimConditionForWallet",
"/react/react.useclaimconditions": "/references/react/v4/useClaimConditions",
"/react/react.useclaimerproofs": "/references/react/v4/useClaimerProofs",
"/react/react.useclaimineligibilityreasons": "/references/react/v4/useClaimIneligibilityReasons",
"/react/react.usesetclaimconditions": "/references/react/v4/useSetClaimConditions",
"/react/react.usebatchestoreveal": "/references/react/v4/useBatchesToReveal",
"/react/react.usedelayedreveallazymint": "/references/react/v4/useDelayedRevealLazyMint",
"/react/react.usereveallazymint": "/references/react/v4/useRevealLazyMint",
"/react/react.useacceptdirectlistingoffer": "/references/react/v4/useAcceptDirectListingOffer",
"/react/react.useactivelistings": "/references/react/v4/useActiveListings",
"/react/react.useauctionwinner": "/references/react/v4/useAuctionWinner",
"/react/react.usebidbuffer": "/references/react/v4/useBidBuffer",
"/react/react.usebuydirectlisting": "/references/react/v4/useBuyDirectListing",
"/react/react.usebuynow": "/references/react/v4/useBuyNow",
"/react/react.usecanceldirectlisting": "/references/react/v4/useCancelDirectListing",
"/react/react.usecancelenglishauction": "/references/react/v4/useCancelEnglishAuction",
"/react/react.usecancellisting": "/references/react/v4/useCancelListing",
"/react/react.usecreateauctionlisting": "/references/react/v4/useCreateAuctionListing",
"/react/react.usecreatedirectlisting": "/references/react/v4/useCreateDirectListing",
"/react/react.usedirectlisting": "/references/react/v4/useDirectListing",
"/react/react.usedirectlistings": "/references/react/v4/useDirectListings",
"/react/react.usedirectlistingscount": "/references/react/v4/useDirectListingsCount",
"/react/react.useenglishauction": "/references/react/v4/useEnglishAuction",
"/react/react.useenglishauctions": "/references/react/v4/useEnglishAuctions",
"/react/react.useenglishauctionscount": "/references/react/v4/useEnglishAuctionsCount",
"/react/react.useenglishauctionwinningbid": "/references/react/v4/useEnglishAuctionWinningBid",
"/react/react.useexecuteauctionsale": "/references/react/v4/useExecuteAuctionSale",
"/react/react.uselisting": "/references/react/v4/useListing",
"/react/react.uselistings": "/references/react/v4/useListings",
"/react/react.uselistingscount": "/references/react/v4/useListingsCount",
"/react/react.usemakebid": "/references/react/v4/useMakeBid",
"/react/react.usemakeoffer": "/references/react/v4/useMakeOffer",
"/react/react.useminimumnextbid": "/references/react/v4/useMinimumNextBid",
"/react/react.useoffers": "/references/react/v4/useOffers",
"/react/react.usevaliddirectlistings": "/references/react/v4/useValidDirectListings",
"/react/react.usevalidenglishauctions": "/references/react/v4/useValidEnglishAuctions",
"/react/react.usewinningbid": "/references/react/v4/useWinningBid",
"/react/react.usecompilermetadata": "/references/react/v4/useCompilerMetadata",
"/react/react.usecontracttype": "/references/react/v4/useContractType",
"/react/react.usemetadata": "/references/react/v4/useMetadata",
"/react/react.useresolvedmediatype": "/references/react/v4/useResolvedMediaType",
"/react/react.useupdatemetadata": "/references/react/v4/useUpdateMetadata",
"/react/react.usechain": "/references/react/v4/useChain",
"/react/react.useSwitchChain": "/references/react/v4/useSwitchChain",
"/react/react.usechainid": "/references/react/v4/useChainId",
"/react/react.usenft": "/references/react/v4/useNFT",
"/react/react.useairdropnft": "/references/react/v4/useAirdropNFT",
"/react/react.useburnnft": "/references/react/v4/useBurnNFT",
"/react/react.usemintnft": "/references/react/v4/useMintNFT",
"/react/react.usemintnftsupply": "/references/react/v4/useMintNFTSupply",
"/react/react.usenftbalance": "/references/react/v4/useNFTBalance",
"/react/react.usenfts": "/references/react/v4/useNFTs",
"/react/react.useownednfts": "/references/react/v4/useOwnedNFTs",
"/react/react.usetotalcirculatingsupply": "/references/react/v4/useTotalCirculatingSupply",
"/react/react.usetotalcount": "/references/react/v4/useTotalCount",
"/react/react.usetransfernft": "/references/react/v4/useTransferNFT",
"/react/react.useclaimednfts": "/references/react/v4/useClaimedNFTs",
"/react/react.useclaimednftsupply": "/references/react/v4/useClaimedNFTSupply",
"/react/react.useclaimnft": "/references/react/v4/useClaimNFT",
"/react/react.uselazymint": "/references/react/v4/useLazyMint",
"/react/react.useresetclaimconditions": "/references/react/v4/useResetClaimConditions",
"/react/react.useunclaimednfts": "/references/react/v4/useUnclaimedNFTs",
"/react/react.useunclaimednftsupply": "/references/react/v4/useUnclaimedNFTSupply",
"/react/react.useallrolemembers": "/references/react/v4/useAllRoleMembers",
"/react/react.usegrantrole": "/references/react/v4/useGrantRole",
"/react/react.useisaddressrole": "/references/react/v4/useIsAddressRole",
"/react/react.userevokerole": "/references/react/v4/useRevokeRole",
"/react/react.userolemembers": "/references/react/v4/useRoleMembers",
"/react/react.useplatformfees": "/references/react/v4/usePlatformFees",
"/react/react.useprimarysalerecipient": "/references/react/v4/usePrimarySaleRecipient",
"/react/react.useroyaltysettings": "/references/react/v4/useRoyaltySettings",
"/react/react.useupdateplatformfees": "/references/react/v4/useUpdatePlatformFees",
"/react/react.useupdateprimarysalerecipient": "/references/react/v4/useUpdatePrimarySaleRecipient",
"/react/react.useupdateroyaltysettings": "/references/react/v4/useUpdateRoyaltySettings",
"/react/react.usebalance": "/references/react/v4/useBalance",
"/react/react.usebalanceforaddress": "/references/react/v4/useBalanceForAddress",
"/react/react.useburntoken": "/references/react/v4/useBurnToken",
"/react/react.useminttoken": "/references/react/v4/useMintToken",
"/react/react.usetokenbalance": "/references/react/v4/useTokenBalance",
"/react/react.usetokendecimals": "/references/react/v4/useTokenDecimals",
"/react/react.usetokensupply": "/references/react/v4/useTokenSupply",
"/react/react.usetransferbatchtoken": "/references/react/v4/useTransferBatchToken",
"/react/react.usetransfertoken": "/references/react/v4/useTransferToken",
"/react/react.useclaimtoken": "/references/react/v4/useClaimToken",
"/react/react.useconnect": "/references/react/v4/useConnect",
"/react/react.usedisconnect": "/references/react/v4/useDisconnect",
"/react/react.usewallet": "/references/react/v4/useWallet",
"/react/react.useconnectionstatus": "/references/react/v4/useConnectionStatus",
"/react/react.usesigner": "/references/react/v4/useSigner",
"/react/react.usemetamask": "/references/react/v4/useMetamask",
"/react/react.usecoinbasewallet": "/references/react/v4/useCoinbaseWallet",
"/react/react.usewalletconnect": "/references/react/v4/useWalletConnect",
"/react/react.usesmartwallet": "/references/react/v4/useSmartWallet",
"/react/react.useembeeddedwallet": "/references/react/v4/useEmbeddedWallet",
"/react/react.usesafe": "/references/react/v4/useSafe",
"/react/react.usemagic": "/references/react/v4/useMagic",
"/react/react.userainbowwallet": "/references/react/v4/useRainbowWallet",
"/react/react.usetrustwallet": "/references/react/v4/useTrustWallet",
"/react/react.usebloctowallet": "/references/react/v4/useBloctoWallet",
"/react/react.useframewallet": "/references/react/v4/useFrameWallet",
"/react/react.usesetconnectedwallet": "/references/react/v4/useSetConnectedWallet",
"/react/react.usesetconnectionstatus": "/references/react/v4/useSetConnectionStatus",
"/react/react.usecreatewalletinstance": "/references/react/v4/useCreateWalletInstance",
"/react/react.usewalletconfig": "/references/react/v4/useWalletConfig",
"/react/react.useaccountadmins": "/references/react/v4/useAccountAdmins",
"/react/react.useaccountadminsandsigners": "/references/react/v4/useAccountAdminsAndSigners",
"/react/react.useaccountsigners": "/references/react/v4/useAccountSigners",
"/react/react.useaddadmin": "/references/react/v4/useAddAdmin",
"/react/react.usecreatesessionkey": "/references/react/v4/useCreateSessionKey",
"/react/react.useremoveadmin": "/references/react/v4/useRemoveAdmin",
"/react/react.userevokesessionkey": "/references/react/v4/useRevokeSessionKey",
"/react/react.uselogin": "/references/react/v4/useLogin",
"/react/react.uselogout": "/references/react/v4/useLogout",
"/react/react.useuser": "/references/react/v4/useUser",
"/react/react.usestorage": "/references/react/v4/useStorage",
"/react/react.usestorageupload": "/references/react/v4/useStorageUpload",
"/ui-components/web3button": "/react/v4/components/Web3Button",
};
const solidityRedirects = {
"/solidity": "/contracts/build",
"/solidity/extensions": "/contracts/build/extensions",
"/solidity/extensions/erc721": "/contracts/build/extensions/erc-721/ERC721",
"/solidity/extensions/erc1155": "/contracts/build/extensions/erc-1155/ERC1155",
"/solidity/extensions/erc20mintable": "/contracts/build/extensions/erc-20/ERC20BatchMintable",
"/solidity/base-contracts/erc721base": "/contracts/build/base-contracts/erc-721/base",
"/solidity/base-contracts/erc20drop": "/contracts/build/base-contracts/erc-20/drop",
"/solidity/base-contracts/erc721delayedreveal": "/contracts/build/base-contracts/erc-721/delayed-reveal",
"/solidity/base-contracts/erc721drop": "/contracts/build/base-contracts/erc-721/drop",
"/solidity/base-contracts/erc721lazymint": "/contracts/build/base-contracts/erc-721/lazy-mint",
"/solidity/base-contracts/erc721signaturemint": "/contracts/build/base-contracts/erc-721/signature-mint",
"/solidity/extensions/erc20claimconditions": "/contracts/build/extensions/erc-20/ERC20ClaimConditions",
"/solidity/extensions/erc721mintable": "/contracts/build/extensions/erc-721/ERC721Mintable",
"/solidity/extensions/erc721burnable": "/contracts/build/extensions/erc-721/ERC721Burnable",
"/solidity/extensions/erc721batchmintable": "/contracts/build/extensions/erc-721/ERC721BatchMintable",
"/solidity/extensions/erc721supply": "/contracts/build/extensions/erc-721/ERC721Supply",
"/solidity/extensions/royalty": "/contracts/build/extensions/general/Royalty",
"/solidity/extensions/erc721claimphases": "/contracts/build/extensions/erc-721/ERC721ClaimPhases",
"/solidity/extensions/contractmetadata": "/contracts/build/extensions/general/ContractMetadata",
"/solidity/extensions/ownable": "/contracts/build/extensions/general/Ownable",
"/solidity/extensions/multicall": "/contracts/build/extensions/general/Multicall",
"/solidity/extensions/dropsinglephase": "/contracts/build/extensions/general/DropSinglePhase",
"/solidity/extensions/erc1155batchmintable": "/contracts/build/extensions/erc-1155/ERC1155BatchMintable",
"/solidity/extensions/erc1155burnable": "/contracts/build/extensions/erc-1155/ERC1155Burnable",
"/solidity/extensions/erc1155enumerable": "/contracts/build/extensions/erc-1155/ERC1155Enumerable",
"/solidity/extensions/erc1155mintable": "/contracts/build/extensions/erc-1155/ERC1155Mintable",
"/solidity/base-contracts/erc1155lazymint": "/contracts/build/base-contracts/erc-1155/lazy-mint",
"/solidity/extensions/lazymint": "/contracts/build/extensions/general/LazyMint",
"/solidity/extensions/erc1155claimcustom": "/contracts/build/extensions/erc-1155/ERC1155ClaimCustom",
"/solidity/extensions/delayedreveal": "/contracts/build/extensions/general/DelayedReveal",
"/solidity/extensions/erc1155dropsinglephase": "/contracts/build/extensions/erc-1155/ERC1155DropSinglePhase",
"/solidity/extensions/erc1155claimconditions": "/contracts/build/extensions/erc-1155/ERC1155ClaimConditions",
"/solidity/extensions/primarysale": "/contracts/build/extensions/general/PrimarySale",
"/solidity/extensions/erc1155signaturemint": "/contracts/build/extensions/erc-1155/ERC1155SignatureMint",
"/solidity/base-contracts/erc1155base": "/contracts/build/base-contracts/erc-1155/base",
"/solidity/extensions/erc721revealable": "/contracts/build/extensions/erc-721/ERC721Revealable",
"/solidity/extensions/erc1155revealable": "/contracts/build/extensions/erc-1155/ERC1155Revealable",
"/solidity/extensions/erc20Permit": "/contracts/build/extensions/erc-20/ERC20Permit",
"/solidity/extensions/erc20batchmintable": "/contracts/build/extensions/erc-20/ERC20BatchMintable",
"/solidity/base-contracts/erc20base": "/contracts/build/base-contracts/erc-20/base",
"/solidity/extensions/erc20": "/contracts/build/extensions/erc-20/ERC20",
"/solidity/base-contracts/erc20vote": "/contracts/build/base-contracts/erc-20/vote",
"/solidity/extensions/base-account": "/contracts/build/extensions/erc-4337/SmartWallet",
"/solidity/extensions/base-account-factory": "/contracts/build/extensions/erc-4337/SmartWalletFactory",
"/solidity/base-contracts": "/contracts/build/base-contracts",
"/solidity/base-contracts/account-factory": "/contracts/build/base-contracts/erc-4337/account-factory",
"/solidity/base-contracts/account": "/contracts/build/base-contracts/erc-4337/account",
"/solidity/base-contracts/managed-account-factory": "/contracts/build/base-contracts/erc-4337/managed-account-factory",
"/solidity/base-contracts/managed-account": "/contracts/build/base-contracts/erc-4337/managed-account",
"/solidity/extensions/erc721claimcustom": "/contracts/build/extensions/erc-721/ERC721ClaimCustom",
"/solidity/extensions/permissions": "/contracts/build/extensions/general/Permissions",
"/solidity/base-contracts/erc1155drop": "/contracts/build/base-contracts/erc-1155/drop",
"/solidity/base-contracts/erc1155signaturemint": "/contracts/build/base-contracts/erc-1155/signature-mint",
"/solidity/base-contracts/erc20signaturemint": "/contracts/build/base-contracts/erc-20/signature-mint",
"/solidity/extensions/erc1155supply": "/contracts/build/extensions/erc-1155/ERC1155Supply",
"/solidity/extensions/erc1155claimable": "/contracts/build/extensions/erc-1155/ERC1155Claimable",
"/solidity/extensions/platformfee": "/contracts/build/extensions/general/PlatformFee",
"/solidity/base-contracts/erc1155delayedreveal": "/contracts/build/base-contracts/erc-1155/delayed-reveal",
"/solidity/extensions/drop": "/contracts/build/extensions/general/Drop",
"/solidity/extensions/erc721claimable": "/contracts/build/extensions/erc-721/ERC721Claimable",
"/solidity/base-contract/erc1155delayedreveal": "/contracts/build/extensions/erc-1155/ERC1155Revealable",
"/solidity/extensions/erc721claimconditions": "/contracts/build/extensions/erc-721/ERC721ClaimConditions",
"/solidity/extensions/erc721signaturemint": "/contracts/build/extensions/erc-721/ERC721SignatureMint",
"/solidity/extensions/contract-metadata": "/contracts/build/extensions/general/ContractMetadata",
"/solidity/extensions/erc1155claimphases": "/contracts/build/extensions/erc-1155/ERC1155ClaimPhases",
"/solidity/base-contracts/staking/staking1155base": "/contracts/build/base-contracts/erc-1155/staking",
"/solidity/base-contracts/staking/staking20base": "/contracts/build/base-contracts/erc-20/staking",
"/solidity/base-contracts/staking/staking721base": "/contracts/build/base-contracts/erc-721/staking",
"/solidity/base-contract/erc721delayedreveal": "/contracts/build/base-contracts/erc-721/delayed-reveal",
"/solidity/base-contracts/smart-accounts": "/contracts/build/base-contracts/erc-4337",
};
const extensionsTable = "/typescript/v4/extensions#all-available-extensions";
const typescriptRedirects = {
"/typescript": "/typescript/v4",
"/typescript/getting-started": "/typescript/v4/getting-started",
"/typescript/sdk.thirdwebsdk": "/typescript/v4/getting-started",
"/typescript/sdk.thirdwebsdk.fromprivatekey": "/references/typescript/v4/ThirdwebSDK#fromPrivateKey",
"/typescript/sdk.thirdwebsdk.fromwallet": "/references/typescript/v4/ThirdwebSDK#fromWallet",
"/typescript/sdk.thirdwebsdk.fromsigner": "/references/typescript/v4/ThirdwebSDK#fromSigner",
"/typescript/sdk.contractdeployer": "/typescript/v4/deploy",
"/typescript/sdk.contractverifier": "/typescript/v4/utilities#contract-verification",
"/typescript/extensions": "/typescript/v4/extensions",
"/typescript/sdk.thirdwebsdk.smartcontract": "/typescript/v4/extensions",
"/typescript/sdk.smartcontract.call": "/typescript/v4/extensions",
"/typescript/sdk.smartcontract.prepare": "/typescript/v4/extensions#preparing-transactions",
"/typescript/sdk.thirdwebsdk.detectextensions": "/v4/extensions#detecting-avilable-extensions",
// extensions
"/typescript/sdk.erc721": "/references/typescript/v4/Erc721",
"/typescript/sdk.erc1155": "/references/typescript/v4/Erc1155",
"/typescript/sdk.erc20": "/references/typescript/v4/Erc20",
// extensions path*
"/typescript/sdk:path*": extensionsTable,
};
const reactNativeRedirects = {
"/react-native": "/typescript/v5/react-native",
"/react-native/getting-started": "/typescript/v5/react-native",
// wallets
"/react-native/react-native.embeddedwallet": "/react-native/v0/wallets/embedded-wallet",
"/react-native/react-native.smartwallet": "/react-native/v0/wallets/smartwallet",
"/react-native/react-native.walletconnect": "/react-native/v0/wallets/walletconnect",
"/react-native/react-native.metamask": "/react-native/v0/wallets/metamask",
"/react-native/react-native.magic": "/react-native/v0/wallets/magiclink",
"/react-native/react-native.rainbow": "/react-native/v0/wallets/rainbow",
"/react-native/react-native.trust": "/react-native/v0/wallets/trust",
"/react-native/react-native.coinbase": "/react-native/v0/wallets/coinbase",
"/react-native/react-native.localwallet": "/react-native/v0/wallets/local-wallet",
// components
"/react-native/react-native.connectwallet": "/react-native/v0/components/ConnectWallet",
"/react-native/react-native.web3button": "/react-native/v0/components/Web3Button",
// others
"/react-native/available-hooks": "/references/react-native/v0/hooks",
"/react-native/react-native.uselogin": "/references/react-native/v0/useLogin",
"/react-native/react-native.uselogout": "/references/react-native/v0/useLogout",
"/react-native/react-native.useuser": "/references/react-native/v0/useUser",
"/react-native/storage": "/references/react-native/v0/hooks#storage",
"/react-native/faq/deeplinks": "/react-native/v0/faq",
"/typescript/v5/react-native/installation": "/typescript/v5/react-native/getting-started",
};
const unityRedirects = {
// wlalets
"/unity/wallet/metamask": "/unity/wallets/providers/metamask",
"/unity/wallet/coinbase": "/unity/wallets/providers/coinbase",
"/unity/wallet/walletconnect": "/unity/wallets/providers/walletconnect",
"/unity/wallet/injected": "/unity/wallets/providers/metamask",
"/unity/wallet/localwallet": "/unity/wallets/providers/local-wallet",
"/unity/wallet/smartwallet": "/unity/wallets/providers/smart-wallet",
"/unity/wallet/hyperplay": "/unity/wallets/providers/hyperplay",
"/unity/wallet/embeddedwallet": "/unity/wallets/providers/embedded-wallet",
// wallet actions
"/unity/wallet/:path*": "/unity/wallets/actions/:path*",
"/unity/connectwallet": "/unity/wallets/prefab",
// contract actions
"/unity/extensions": "/unity/contracts",
"/unity/contract": "/unity/contracts/get",
"/unity/smartcontract.read": "/unity/contracts/read",
"/unity/contract.write": "/unity/contracts/write",
"/unity/contract.prepare": "/unity/contracts/prepare",
// extensions
// erc721
"/unity/erc721": "/unity/contracts/erc721/erc721",
"/unity/erc721burnable": "/unity/contracts/erc721/erc721burnable",
"/unity/erc721claimconditions": "/unity/contracts/erc721/erc721claimconditions",
"/unity/erc721enumerable": "/unity/contracts/erc721/erc721enumerable",
"/unity/erc721lazymintable": "/unity/contracts/erc721/erc721lazymintable",
"/unity/erc721mintable": "/unity/contracts/erc721/erc721mintable",
"/unity/erc721signaturemint": "/unity/contracts/erc721/erc721signaturemintable",
"/unity/erc721supply": "/unity/contracts/erc721/erc721supply",
"/unity/erc721tiereddrop": "/unity/contracts/erc721/erc721tiereddrop",
// erc1155
"/unity/erc1155": "/unity/contracts/erc1155/erc1155",
"/unity/erc1155burnable": "/unity/contracts/erc1155/erc1155burnable",
"/unity/erc1155claimconditions": "/unity/contracts/erc1155/erc1155claimconditions",
"/unity/erc1155enumerable": "/unity/contracts/erc1155/erc1155enumerable",
"/unity/erc1155mintable": "/unity/contracts/erc1155/erc1155mintable",
"/unity/delayedreveal1155": "/unity/contracts/erc1155/erc1155",
"/unity/erc1155signaturemintable": "/unity/contracts/erc1155/erc1155signaturemintable",
// erc20
"/unity/erc20": "/unity/contracts/erc20/erc20",
"/unity/erc20burnable": "/unity/contracts/erc20/erc20burnable",
"/unity/erc20claimconditions": "/unity/contracts/erc20/erc20claimconditions",
"/unity/erc20mintable": "/unity/contracts/erc20/erc20mintable",
"/unity/erc20signaturemintable": "/unity/contracts/erc20/erc20signaturemintable",
// other extensions
"/unity/marketplace": "/unity/contracts/marketplace",
"/unity/pack": "/unity/contracts/pack",
// contract events
"/unity/events/:path*": "/unity/contracts/events/:path*",
// others
"/unity/submit-wallet": "/unity/wallets/submission",
};
const walletRedirects = {
//connect
"/connect/architecture": "/connect",
"/connect/usage-with-react-sdk": "/connect/sign-in",
"/connect/usage-with-react-native-sdk": "/connect/sign-in",
"/connect/usage-with-typescript-sdk": "/connect/sign-in",
"/connect/usage-with-unity-sdk": "/connect/sign-in",
"/connect/connect-wallet": "/connect/connect",
"/connect/supported-wallets": "/connect/connect",
"/connect/connect-wallet/wallet-providers": "/connect/connect",
"/connect/connect-wallet/theme": "/connect/sign-in",
"/connect/connect-wallet/button-title": "/connect/sign-in",
"/connect/connect-wallet/modal-title": "/connect/sign-in",
"/connect/connect-wallet/modal-size": "/connect/sign-in",
"/connect/connect-wallet/welcome-screen": "/connect/sign-in",
"/connect/connect-wallet/custom-button": "/connect/sign-in",
"/connect/connect-wallet/class-name": "/connect/sign-in",
"/connect/connect-wallet/drop-down-positions": "/connect/sign-in",
"/connect/connect-wallet/hide-testnet-faucet": "/connect/sign-in",
"/connect/connect-wallet/auth": "/connect/sign-in",
"/connect/connect-wallet/switch-chain": "/connect/sign-in",
"/connect/connect-wallet/privacy-policy": "/connect/sign-in",
"/connect/connect-wallet/terms-of-service": "/connect/sign-in",
"/connect/connect-wallet/custom-ui": "/connect/sign-in/custom-ui",
"/connect/faqs": "/connect/sign-in",
//embedded wallet
"/embedded-wallet": "/wallets/embedded-wallet/overview",
"/embedded-wallet/how-it-works": "/wallets/embedded-wallet/how-it-works",
"/embedded-wallet/getting-started": "/wallets/embedded-wallet/get-started",
"/embedded-wallet/connect": "/wallets/embedded-wallet/how-to/connect-users",
"/embedded-wallet/custom": "/wallets/embedded-wallet/how-to/build-your-own-ui",
"/embedded-wallet/use": "/wallets/embedded-wallet/how-to/interact-with-wallets",
"/embedded-wallet/interact": "/wallets/embedded-wallet/how-to/interact-blockchain",
"/embedded-wallet/smart-wallet-and-embedded-wallet": "/wallets/embedded-wallet/how-to/enable-gasless",
"/embedded-wallet/export-private-key": "/wallets/embedded-wallet/how-to/export-private-key",
"/embedded-wallet/custom-auth": "/wallets/embedded-wallet/custom-auth/configuration",
"/embedded-wallet/custom-auth-server": "/wallets/embedded-wallet/custom-auth/custom-auth-server",
"/embedded-wallet/integrate-firebase": "/wallets/embedded-wallet/custom-auth/firebase-auth",
"/embedded-wallet/custom-jwt-auth-server": "/wallets/embedded-wallet/custom-auth/custom-jwt-auth-server",
"/embedded-wallet/faqs": "/wallets/embedded-wallet/faqs",
//smart wallet
"/smart-wallet": "/wallets/smart-wallet",
"/smart-wallet/how-it-works": "/wallets/smart-wallet/how-it-works",
"/smart-wallet/getting-started": "/wallets/smart-wallet/get-started",
"/smart-wallet/infrastructure": "wallets/smart-wallet/infrastructure",
"/smart-wallet/permissions": "/wallets/smart-wallet/permissions",
"/smart-wallet/guides/react": "/wallets/smart-wallet/guides/react",
"/smart-wallet/guides/typescript": "/wallets/smart-wallet/guides/typescript",
"/smart-wallet/faqs": "/wallets/smart-wallet/faq",
//auth
"/auth": "/connect/auth",
"/auth/how-auth-works": "/connect/auth/how-it-works",
"/auth/how-auth-works/sign-in-with-wallet": "/connect/auth/how-it-works/siwe",
"/auth/how-auth-works/json-web-tokens": "/connect/auth/how-it-works/jwt",
"/auth/how-auth-works/auth-api": "/connect/auth/how-it-works/api",
"/auth/getting-started": "/connect/auth/get-started",
"/auth/client-frameworks/react": "/connect/auth/client-frameworks/react",
"/auth/client-frameworks/react-native": "/connect/auth/client-frameworks/react-native",
"/auth/server-frameworks/next": "/connect/auth/server-frameworks/next",
"/auth/server-frameworks/express": "/connect/auth/server-frameworks/express",
"/auth/integrations/next-auth": "/connect/auth/integrations/next-auth",
"/auth/integrations/supabase": "/connect/auth/integrations/supabase",
"/auth/integrations/firebase": "/connect/auth/integrations/firebase",
"/auth/wallet-configuration": "/connect/auth/wallet-configuration",
"/auth/faqs": "/connect/auth/faq",
"/connect/auth/how-it-works": "/connect/auth",
"/connect/auth/how-it-works/siwe": "/connect/auth",
"/connect/auth/how-it-works/jwt": "/connect/auth",
"/connect/auth/how-it-works/api": "/connect/auth",
"/connect/auth/get-started": "/connect/auth",
"/connect/auth/client-frameworks/react": "/connect/auth",
"/connect/auth/client-frameworks/react-native": "/connect/auth",
"/connect/auth/server-frameworks/next": "/connect/auth",
"/connect/auth/server-frameworks/express": "/connect/auth",
"/connect/auth/integrations/next-auth": "/connect/auth",
"/connect/auth/integrations/supabase": "/connect/auth",
"/connect/auth/integrations/firebase": "/connect/auth",
"/connect/auth/wallet-configuration": "/connect/auth",
"/connect/auth/faqs": "/connect/auth",
// Wallet SDK
"/wallet": "/wallet-sdk/v2",
"/wallet/architecture": "/wallet-sdk/v2",
"/wallet/getting-started": "/wallet-sdk/v2/usage",
"/wallet/usage-with-typescript-sdk": "/wallet-sdk/v2/usage",
"/wallet/usage-with-react-sdk": "/wallet-sdk/v2/usage",
"/wallet/usage-with-react-native-sdk": "/wallet-sdk/v2/usage",
"/wallet/usage-with-unity-sdk": "/wallet-sdk/v2/usage",
// build a wallet
"/wallet/build-a-wallet": "/wallet-sdk/v2/build",
"/wallet/interfaces/abstract-client-wallet": "/references/wallets/v2/AbstractClientWallet",
"/wallet/interfaces/abstract-wallet": "/references/wallets/v2/AbstractWallet",
"/wallet/interfaces/connector": "/references/wallets/v2/Connector",
// wallets
"/wallet/metamask": "/references/wallets/v2/MetaMaskWallet",
"/wallet/coinbase-wallet": "/references/wallets/v2/CoinbaseWallet",
"/wallet/wallet-connect-v2": "/references/wallets/v2/WalletConnect",
"/wallet/smart-wallet": "/references/wallets/v2/SmartWallet",
"/wallet/embedded-wallet": "/references/wallets/v2/EmbeddedWallet",
"/wallet/paper": "/references/wallets/v2/EmbeddedWallet",
"/wallet/local-wallet": "/references/wallets/v2/LocalWallet",
"/wallet/local-wallet-node": "/references/wallets/v2/LocalWalletNode",
"/wallet/trust-wallet": "/references/wallets/v2/TrustWallet",
"/wallet/zerion-wallet": "/references/wallets/v2/ZerionWallet",
"/wallet/magic": "/references/wallets/v2/MagicLink",
"/wallet/rainbow": "/references/wallets/v2/RainbowWallet",
"/wallet/safe": "/references/wallets/v2/SafeWallet",
"/wallet/blocto": "/references/wallets/v2/BloctoWallet",
"/wallet/frame": "/references/wallets/v2/FrameWallet",
"/wallet/phantom": "/references/wallets/v2/PhantomWallet",
"/wallet/aws-kms": "/references/wallets/v2/AwsKmsWallet",
"/wallet/aws-secrets-manager": "/references/wallets/v2/AwsSecretsManagerWallet",
"/wallet/coin98-wallet": "/references/wallets/v2/Coin98Wallet",
"/wallet/core-wallet": "/references/wallets/v2/CoreWallet",
"/wallet/defi-wallet": "/references/wallets/v2/CryptoDefiWallet",
"/wallet/ethers": "/references/wallets/v2/EthersWallet",
"/wallet/okx-wallet": "/references/wallets/v2/OKXWallet",
"/wallet/onekey-wallet": "/references/wallets/v2/OneKeyWallet",
"/wallet/private-key": "/references/wallets/v2/PrivateKeyWallet",
"/wallet/rabby-wallet": "/references/wallets/v2/RabbyWallet",
};
const paymentRedirects = {
"/checkouts": "/payments",
"/checkouts/getting-started": "/payments/nft-checkout/getting-started",
"/checkouts/enable-contract": "/payments/nft-checkout/enable-contract",
"/checkouts/checkout-link": "/payments/nft-checkout/checkout-link",
"/checkouts/go-live-checklist": "/payments/nft-checkout/go-live-checklist",
"/checkouts/elements": "/payments/nft-checkout/elements",
"/checkouts/checkout-with-card": "/payments/nft-checkout/checkout-with-card",
"/checkouts/checkout-with-eth": "/payments/nft-checkout/checkout-with-eth",
"/checkouts/webhooks": "/payments/nft-checkout/webhooks",
"/checkouts/translations": "/payments/nft-checkout/translations",
"/checkouts/marketplaces": "/payments/nft-checkout/marketplaces",
"/checkouts/one-time-checkout-link": "/payments/nft-checkout/one-time-checkout-link",
"/checkouts/custom-contracts": "/payments/nft-checkout/custom-contracts",
"/checkouts/pre-built-contracts": "/payments/nft-checkout/pre-built-contracts",
"/checkouts/erc20-pricing": "/payments/nft-checkout/erc20-pricing",
"/checkouts/api-reference": "/payments/nft-checkout/api-reference",
"/checkouts/faq": "/payments/nft-checkout/faq",
"/payments/:match*": "/connect/pay/overview",
};
const contractRedirects = {
//pre-built contracts
"/pre-built-contracts": "/contracts",
"/pre-built-contracts/how-it-works": "/contracts",
"/explore/faqs": "/contracts",
"/pre-built-contracts/account-factory": "/contracts/explore/pre-built-contracts/account-factory",
"/pre-built-contracts/airdrop-erc1155-claimable": "/explore/pre-built-contracts/airdrop-erc1155-claimable",
"/pre-built-contracts/airdrop-erc1155": "/contracts/explore/pre-built-contracts/airdrop-erc1155",
"/pre-built-contracts/airdrop-erc20-claimable": "/contracts/explore/pre-built-contracts/airdrop-erc20-claimable",
"/pre-built-contracts/airdrop-erc20": "/contracts/explore/pre-built-contracts/airdrop-erc20",
"/pre-built-contracts/airdrop-erc721-claimable": "/contracts/explore/pre-built-contracts/airdrop-erc721-claimable",
"/pre-built-contracts/airdrop-erc721": "/contracts/explore/pre-built-contracts/airdrop-erc721",
"/pre-built-contracts/edition-drop": "/contracts/explore/pre-built-contracts/edition-drop",
"/pre-built-contracts/edition": "/contracts/explore/pre-built-contracts/edition",
"/pre-built-contracts/loyalty-card": "/contracts/explore/pre-built-contracts/loyalty-card",
"/pre-built-contracts/managed-account-factory": "/contracts/explore/pre-built-contracts/managed-account-factory",
"/pre-built-contracts/marketplace": "/contracts/explore/pre-built-contracts/marketplace",
"/pre-built-contracts/multiwrap": "/contracts/explore/pre-built-contracts/multiwrap",
"/pre-built-contracts/nft-collection": "/contracts/explore/pre-built-contracts/nft-collection",
"/pre-built-contracts/nft-drop": "/contracts/explore/pre-built-contracts/nft-drop",
"/pre-built-contracts/open-edition-erc721": "/contracts/explore/pre-built-contracts/open-edition",
"/pre-built-contracts/pack": "/contracts/explore/pre-built-contracts/pack",
"/pre-built-contracts/signature-drop": "/contracts",
"/pre-built-contracts/split": "/contracts/explore/pre-built-contracts/split",
"/pre-built-contracts/stake-erc1155": "/contracts/explore/pre-built-contracts/stake-erc1155",
"/pre-built-contracts/stake-erc20": "/contracts/explore/pre-built-contracts/stake-erc20",
"/pre-built-contracts/stake-erc721": "/contracts/explore/pre-built-contracts/stake-erc721",
"/pre-built-contracts/token-drop": "/contracts/explore/pre-built-contracts/token-drop",
"/pre-built-contracts/token": "/contracts/explore/pre-built-contracts/token",
"/pre-built-contracts/vote": "/contracts/explore/pre-built-contracts/vote",
//deploy
"/deploy": "contracts/deploy/overview",
"/deploy/how-it-works": "/contracts/deploy/overview",
"/deploy/getting-started": "/contracts/deploy/deploy-contract",
"/deploy/faqs": "/contracts/deploy/overview",
//publish
"/publish": "/contracts/publish/overview",
"/publish/getting-started": "/contracts/publish/publish-contract",
"/publish/deployment-options": "/contracts/publish/publish-options",
"/publish/get-featured-on-explore": "/contracts/publish/overview",
"/sdk": "/contracts/interact/overview",
"/sdk/how-it-works": "/contracts/interact/overview",
"/sdk/getting-started": "/contracts/interact/overview",
//design documentation
"/contracts/design/Drop": "/contracts/design-docs/drop",
"/contracts/design/Marketplace": "/contracts/design-docs/marketplace",
"/contracts/design/SignatureMint": "/contracts/design-docs/signature-mint",
"/contracts/design/Multiwrap": "/contracts/design-docs/multiwrap",
"/contracts/design/Pack": "/contracts/design-docs/pack",
"/contracts/design/SignatureDrop": "/contracts",
};
const infrastructureRedirects = {
//engine top-level
"/infrastructure/engine": "/engine",
"/infrastructure/engine/get-started": "/engine/get-started",
"/infrastructure/engine/production-checklist": "/engine/production-checklist",
"/infrastructure/engine/self-host": "/engine/self-host",
"/infrastructure/engine/features/backend-wallets": "/engine/features/backend-wallets",
"/infrastructure/engine/features/contracts": "/engine/features/contracts",
"/infrastructure/engine/features/permissions": "/engine/features/permissions",
"/infrastructure/engine/features/webhooks": "/engine/features/webhooks",
"/infrastructure/engine/features/smart-wallets": "/engine/features/smart-wallets",
"/infrastructure/engine/features/relayers": "/engine/features/relayers",
"/infrastructure/engine/features/gasless-transactions": "/engine/features/gasless-transactions",
"/infrastructure/engine/guides/airdrop-nfts": "/engine/guides/airdrop-nfts",
"/infrastructure/engine/guides/nft-checkout": "/engine/guides/nft-checkout",
"/infrastructure/engine/guides/smart-wallets": "/engine/guides/smart-wallets",
"/infrastructure/engine/references/api-reference": "/engine/references/api-reference",
"/infrastructure/engine/references/typescript": "/engine/references/typescript",
"/infrastucture/engine/security": "/engine/security",
"/infrastructure/engine/faq": "/engine/faq",
"/guides/engine/relayer": "/engine/features/relayer",
"/infrastructure/engine/overview": "/engine",
"/engine/features/permissions": "/engine/features/admins",
//storage
"/storage": "/infrastructure/storage/overview",
"/storage/how-storage-works": "/infrastructure/storage/how-storage-works",
"/storage/upload-to-ipfs": "/infrastructure/storage/how-to-use-storage/upload-files-to-ipfs",
"/storage/host-web-app": "/infrastructure/storage/how-to-use-storage/host-web-app",
//rpc-edge
"/rpc-edge": "/infrastructure/rpc-edge/overview",
"/rpc-edge/get-started": "/infrastructure/rpc-edge/get-started",
"/rpc-edge/faqs": "/infrastructure/rpc-edge/overview",
};
const otherRedirects = {
// wallets > connect redirects
"/wallets": "/connect",
"/wallets/connect/:path*": "/connect/connect/:path*",
"/wallets/embedded-wallet/:path*": "/connect/embedded-wallet/:path*",
"/wallets/auth/:path*": "/connect/auth/:path*",
// guides
"/solana/:match*": "https://blog.thirdweb.com/discontinuing-solana-support/",
"/pre-built-contracts/solana/:match*": "https://blog.thirdweb.com/discontinuing-solana-support/",
"/learn/recipes/:match*": "https://blog.thirdweb.com/",
"/guides/tag/bundle-collection": "https://blog.thirdweb.com/tag/edition",
"/guides/tag/bundle-drop": "https://blog.thirdweb.com/tag/bundle-drop",
"/guides/bundle-drop": "https://blog.thirdweb.com/tag/edition-drop",
"/guides/splits": "https://blog.thirdweb.com/tag/split",
"/guides/bundle-collection": "https://blog.thirdweb.com/tag/edition",
"/guides/connect-wallet": "https://blog.thirdweb.com/guides/add-connectwallet-to-your-website/",
"/guides/create-a-drop-with-thirdweb-dashboard": "https://blog.thirdweb.com/guides/release-an-nft-drop-with-no-code",
"/guides/minting-with-signature": "https://blog.thirdweb.com/guides/on-demand-minting",
"/guides/nft-drop": "https://blog.thirdweb.com/tag/nft-drop",
"/guides/nft-collection": "https://blog.thirdweb.com/tag/nft-collection",
"/guides/edition-drop": "https://blog.thirdweb.com/tag/edition-drop",
"/guides/edition": "https://blog.thirdweb.com/tag/edition",
"/guides/token": "https://blog.thirdweb.com/tag/token",
"/guides/vote": "https://blog.thirdweb.com/tag/vote",
"/guides/split": "https://blog.thirdweb.com/tag/split",
"/guides/marketplace": "https://blog.thirdweb.com/tag/marketplace",
"/guides/pack": "https://blog.thirdweb.com/tag/pack",
"/guides": "https://blog.thirdweb.com/guides",
"/tag/:match*": "https://blog.thirdweb.com/tag/:match*",
"/guides/on-demand-minting": "https://blog.thirdweb.com/guides/mint-nft-unique-code",
"/guides/create-your-own-marketplace-with-thirdweb-typescript-sdk": "https://blog.thirdweb.com/guides/nft-marketplace-with-typescript-next",
"/guides/create-a-pack-with-typescript-and-nextjs": "https://blog.thirdweb.com/guides/create-an-nft-lootbox",
"/guides/randomized-nft-drop": "https://blog.thirdweb.com/guides/shuffle-nft-drop",
// solidity sdk
"/contracts/nft-drop": "/contracts/explore/pre-built-contracts/nft-drop",
"/contracts/nft-collection": "contracts/explore/pre-built-contracts/nft-collection",
"/contracts/edition-drop": "/contracts/explore/pre-built-contracts/edition-drop",
"/contracts/edition": "/contracts/explore/pre-built-contracts/edition",
"/contracts/token-drop": "/contracts/explore/pre-built-contracts/token-drop",
"/contracts/token": "/contracts/explore/pre-built-contracts/token",
"/contracts/vote": "/contracts/explore/pre-built-contracts/vote",
"/contracts/split": "/contracts/explore/pre-built-contracts/split",
"/contracts/marketplace": "/contracts/explore/pre-built-contracts/marketplace",
"/contracts/pack": "/contracts/explore/pre-built-contracts/pack",
"/contracts/nfts-and-tokens": "/contracts",
"/contracts/drops": "/contracts",
"/contracts/governance": "/contracts",
// account abstraction rename
"/wallets/smart-wallet/:path*": "/connect/account-abstraction/:path*",
"/connect/smart-wallet/:path*": "/connect/account-abstraction/:path*",
"/connect/account-abstraction": "/connect/account-abstraction/overview",
"/unity/wallets/providers/smart-wallet": "/unity/wallets/providers/account-abstraction",
"/engine/features/smart-wallets": "/engine/features/account-abstraction",
// others
"/pre-built-contracts/:path*": "/contracts",
"/thirdweb-deploy/:path*": "/contracts/deploy/overview",
"/thirdweb-cli": "/cli",
"/smart-contracts": "/contracts",
"/contracts-sdk/:path*": "/contracts/build",
"/unity/connectwalletnative": "/unity/wallets/prefab",
"/unity/prefabs/thirdwebmanager": "/unity/thirdwebmanager",
"/gamingkit/:path*": "/unity",
"/gaming-kit/:path*": "/unity",
"/contractkit/:path*": "/contracts",
"/extensions/:path*": "/contracts/build/extensions",
"/release/:match*": "/contracts/publish/overview",
"/sdk/:path*": "/typescript/v4",
"/web3-api/:path*": "/infrastructure/engine/overview",
"/api-keys": "/account/api-keys",
"/python": "/engine/overview",
"/go": "/engine/overview",
"/ui-components/connectwalletbutton": "/react/v4/components/ConnectWallet",
"/ui-components/nft-renderer": "/react/v4/components/ThirdwebNftMedia",
"/ui-components/ipfs-media-renderer": "/react/v4/components/MediaRenderer",
"/templates": "https://thirdweb.com/templates",
"/gaming": "/solutions/gaming/overview",
"/signature-minting": "/contracts/design-docs/signature-mint",
// in-app wallet
"/references/typescript/v5/embeddedWallet": "/references/typescript/v5/inAppWallet",
"/connect/embedded-wallet/:path*": "/connect/in-app-wallet/:path*",
"/connect/embedded-wallet/how-to/get-embedded-wallet-details-on-server": "/connect/in-app-wallet/how-to/get-in-app-wallet-details-on-server",
"/react-native/v0/wallets/embedded-wallet": "/react-native/v0/wallets/in-app-wallet",
"/unity/wallets/providers/embedded-wallet": "/unity/wallets/providers/in-app-wallet",
// connect
"/connect/connect": "/connect/sign-in",
};
const v5RestructuredRedirects = {
"/typescript/v5/react": "/react/v5",
"/typescript/v5/react/:path*": "/react/v5/:path*",
"/typescript/v5/react-native": "/react-native/v5",
"/typescript/v5/react-native/:path*": "/react-native/v5/:path*",
};
/**
* @type {import('next').NextConfig['redirects']}
*/
export const redirects = async () => {
return [
// old portal redirects
...createRedirects(reactRedirects),
...createRedirects(solidityRedirects),
...createRedirects(typescriptRedirects),
...createRedirects(reactNativeRedirects),
...createRedirects(unityRedirects),
...createRedirects(walletRedirects),
...createRedirects(paymentRedirects),
...createRedirects(infrastructureRedirects),
...createRedirects(contractRedirects),
...createRedirects(otherRedirects),
...createRedirects(v5RestructuredRedirects),
// references docs
latestReference("react", "v4"),
latestReference("react-native", "v0"),
latestReference("typescript", "v5"),
latestReference("wallets", "v2"),
latestReference("storage", "v2"),
// sdk docs
latestSDK("react", "v4"),
latestSDK("react-native", "v0"),
latestSDK("typescript", "v5"),
latestSDK("wallet-sdk", "v2"),
latestSDK("storage-sdk", "v2"),
];
};
/**
*
* @param {Record<string, string>} linkMap
* @returns
*/
function createRedirects(linkMap, permanent = true) {
const redirects = [];
for (const key in linkMap) {
redirects.push({ source: key, destination: linkMap[key], permanent });
}
return redirects;
}
/**
*
* @param {string} pkg
* @param {string} latestVersion
* @returns
*/
function latestReference(pkg, latestVersion) {
return {
source: `/references/${pkg}/latest/:path*`,
destination: `/references/${pkg}/${latestVersion}/:path*`,
permanent: false,
};
}
/**
*
* @param {string} pkg
* @param {string} latestVersion
* @returns
*/
function latestSDK(pkg, latestVersion) {
return {
source: `/${pkg}/latest/:path*`,
destination: `/${pkg}/${latestVersion}/:path*`,
permanent: false,
};
}