Compare commits

...
Author SHA1 Message Date
Jonas DanielsGitHubgithub-actions[bot] <github-actions[bot]@users.noreply.github.com>
89728c6578 Version Packages (#4739)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-09-21 19:43:51 +12:00
Joaquim VergesandGitHub 2707db136e feat: allow linking identities when using in-app + smart wallets (#4737) 2024-09-21 19:34:23 +12:00
Jonas DanielsGitHubgithub-actions[bot] <github-actions[bot]@users.noreply.github.com>
ca23a95bfd Version Packages (#4735)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-09-21 14:27:50 +12:00
Joaquim VergesandGitHub 997bfa84cc Update pregenerate docs (#4736)
Signed-off-by: Joaquim Verges <[email protected]>
2024-09-21 13:14:48 +12:00
gregfromstl 824b1bdb69 [SDK] Feature: Ecosystem account linking (#4733)
## Problem solved

Short description of the bug fixed or feature added

<!-- start pr-codex -->

---

## PR-Codex overview
This PR enables account linking for ecosystem wallets.

### Detailed summary
- Added support for ecosystem wallets in account linking functionality
- Updated conditions for multi-auth support in various components
- Imported and utilized `isEcosystemWallet` function in multiple files
- Modified functions to handle both in-app and ecosystem wallets in account linking operations

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

<!-- end pr-codex -->
2024-09-21 01:01:07 +00:00
Joaquim VergesandGitHub 6e3669d384 chore(docs): update embedded wallet API endpoint (#4734) 2024-09-21 11:54:20 +12:00
gregfromstl 09eb0e6a3f Fix/pregen docs (#4732)
## Problem solved

Short description of the bug fixed or feature added

<!-- start pr-codex -->

---

## PR-Codex overview
This PR updates the structure of the `wallet` object in the `page.mdx` file to include `address` and `createdAt` properties.

### Detailed summary
- Updated the `wallet` object in `page.mdx` to include `address` and `createdAt` properties.

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

<!-- end pr-codex -->
2024-09-20 23:37:40 +00:00
gregfromstl 786ef9d777 Docs: Get User Page (#4730)
## Problem solved

Short description of the bug fixed or feature added

<!-- start pr-codex -->

---

## PR-Codex overview
The focus of this PR is to add guides for retrieving user details from the server using In-App Wallets and pregenerating user wallets.

### Detailed summary
- Added guide for retrieving In-App Wallet user details on the server
- Added guide for pregenerating user wallets
- Updated sidebar links for better navigation

> The following files were skipped due to too many changes: `apps/portal/src/app/connect/sidebar.tsx`, `apps/portal/redirects.mjs`

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

<!-- end pr-codex -->
2024-09-20 23:11:42 +00:00
Joaquim VergesandGitHub f8e69989a3 feat(playground): update ecosystem for prod (#4731) 2024-09-21 10:52:32 +12:00
20 changed files with 1380 additions and 966 deletions
@@ -4,12 +4,14 @@ import { ecosystemWallet } from "thirdweb/wallets";
import { StyledConnectEmbed } from "../styled-connect-embed";
const getEcosystem = () => {
if (process.env.NEXT_PUBLIC_IN_APP_WALLET_URL?.endsWith(".thirdweb.com")) {
// prod ecosystem
return "ecosystem.new-age";
if (
process.env.NEXT_PUBLIC_IN_APP_WALLET_URL?.endsWith(".thirdweb-dev.com")
) {
// dev ecosystem
return "ecosystem.bonfire-development";
}
// dev ecosystem
return "ecosystem.bonfire-development";
// prod ecosystem
return "ecosystem.new-age";
};
export function EcosystemConnectEmbed(
+414 -205
View File
@@ -40,34 +40,49 @@ const reactRedirects = {
"/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.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.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.usedelayedreveallazymint":
"/references/react/v4/useDelayedRevealLazyMint",
"/react/react.usereveallazymint": "/references/react/v4/useRevealLazyMint",
"/react/react.useacceptdirectlistingoffer": "/references/react/v4/useAcceptDirectListingOffer",
"/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.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.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.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.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.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",
@@ -75,13 +90,17 @@ const reactRedirects = {
"/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.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.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.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",
@@ -94,41 +113,52 @@ const reactRedirects = {
"/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.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.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.useresetclaimconditions":
"/references/react/v4/useResetClaimConditions",
"/react/react.useunclaimednfts": "/references/react/v4/useUnclaimedNFTs",
"/react/react.useunclaimednftsupply": "/references/react/v4/useUnclaimedNFTSupply",
"/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.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.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.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.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.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",
@@ -141,96 +171,166 @@ const reactRedirects = {
"/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.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.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.usecreatesessionkey":
"/references/react/v4/useCreateSessionKey",
"/react/react.useremoveadmin": "/references/react/v4/useRemoveAdmin",
"/react/react.userevokesessionkey": "/references/react/v4/useRevokeSessionKey",
"/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",
"/react/v5/in-app-wallet/how-to/get-in-app-wallet-details-on-server":
"/react/v5/in-app-wallet/how-to/get-user-details",
};
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/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/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/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/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/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",
"/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";
@@ -239,16 +339,22 @@ 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.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/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",
"/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",
@@ -261,26 +367,34 @@ 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.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",
"/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",
"/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.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",
"/typescript/v5/react-native/installation":
"/typescript/v5/react-native/getting-started",
};
const unityRedirects = {
@@ -293,37 +407,51 @@ const unityRedirects = {
// wallets
"/unity/wallets/prefab": "/unity/v4/wallets/prefab",
// wallet providers
"/unity/wallets/providers/in-app-wallet": "/unity/v4/wallets/providers/in-app-wallet",
"/unity/wallets/providers/account-abstraction": "/unity/v4/wallets/providers/account-abstraction",
"/unity/wallets/providers/local-wallet": "/unity/v4/wallets/providers/local-wallet",
"/unity/wallets/providers/in-app-wallet":
"/unity/v4/wallets/providers/in-app-wallet",
"/unity/wallets/providers/account-abstraction":
"/unity/v4/wallets/providers/account-abstraction",
"/unity/wallets/providers/local-wallet":
"/unity/v4/wallets/providers/local-wallet",
"/unity/wallets/providers/metamask": "/unity/v4/wallets/providers/metamask",
"/unity/wallets/providers/coinbase": "/unity/v4/wallets/providers/coinbase",
"/unity/wallets/providers/walletconnect": "/unity/v4/wallets/providers/walletconnect",
"/unity/wallets/providers/walletconnect":
"/unity/v4/wallets/providers/walletconnect",
"/unity/wallets/providers/hyperplay": "/unity/v4/wallets/providers/hyperplay",
"/unity/wallets/providers/rabby": "/unity/v4/wallets/providers/rabby",
// wallet actions
"/unity/wallets/actions/connect": "/unity/v4/wallets/actions/connect",
"/unity/wallets/actions/disconnect": "/unity/v4/wallets/actions/disconnect",
"/unity/wallets/actions/authenticate": "/unity/v4/wallets/actions/authenticate",
"/unity/wallets/actions/authenticate":
"/unity/v4/wallets/actions/authenticate",
"/unity/wallets/actions/getaddress": "/unity/v4/wallets/actions/getaddress",
"/unity/wallets/actions/getbalance": "/unity/v4/wallets/actions/getbalance",
"/unity/wallets/actions/getchainid": "/unity/v4/wallets/actions/getchainid",
"/unity/wallets/actions/isconnected": "/unity/v4/wallets/actions/isconnected",
"/unity/wallets/actions/recoveraddress": "/unity/v4/wallets/actions/recoveraddress",
"/unity/wallets/actions/sendrawtransaction": "/unity/v4/wallets/actions/sendrawtransaction",
"/unity/wallets/actions/executerawtransaction": "/unity/v4/wallets/actions/executerawtransaction",
"/unity/wallets/actions/recoveraddress":
"/unity/v4/wallets/actions/recoveraddress",
"/unity/wallets/actions/sendrawtransaction":
"/unity/v4/wallets/actions/sendrawtransaction",
"/unity/wallets/actions/executerawtransaction":
"/unity/v4/wallets/actions/executerawtransaction",
"/unity/wallets/actions/sign": "/unity/v4/wallets/actions/sign",
"/unity/wallets/actions/switchnetwork": "/unity/v4/wallets/actions/switchnetwork",
"/unity/wallets/actions/switchnetwork":
"/unity/v4/wallets/actions/switchnetwork",
"/unity/wallets/actions/transfer": "/unity/v4/wallets/actions/transfer",
"/unity/wallets/actions/addadmin": "/unity/v4/wallets/actions/addadmin",
"/unity/wallets/actions/removeadmin": "/unity/v4/wallets/actions/removeadmin",
"/unity/wallets/actions/createsessionkey": "/unity/v4/wallets/actions/createsessionkey",
"/unity/wallets/actions/revokesessionkey": "/unity/v4/wallets/actions/revokesessionkey",
"/unity/wallets/actions/getallactivesigners": "/unity/v4/wallets/actions/getallactivesigners",
"/unity/wallets/actions/createsessionkey":
"/unity/v4/wallets/actions/createsessionkey",
"/unity/wallets/actions/revokesessionkey":
"/unity/v4/wallets/actions/revokesessionkey",
"/unity/wallets/actions/getallactivesigners":
"/unity/v4/wallets/actions/getallactivesigners",
"/unity/wallets/actions/getemail": "/unity/v4/wallets/actions/getemail",
"/unity/wallets/actions/getnonce": "/unity/v4/wallets/actions/getnonce",
"/unity/wallets/actions/getsigneraddress": "/unity/v4/wallets/actions/getsigneraddress",
"/unity/wallets/actions/signtypeddatav4": "/unity/v4/wallets/actions/signtypeddatav4",
"/unity/wallets/actions/getsigneraddress":
"/unity/v4/wallets/actions/getsigneraddress",
"/unity/wallets/actions/signtypeddatav4":
"/unity/v4/wallets/actions/signtypeddatav4",
// submission
"/unity/wallets/submission": "/unity/v4/wallets/submission",
// pay
@@ -332,7 +460,8 @@ const unityRedirects = {
"/unity/pay/getbuywithfiatquote": "/unity/v4/pay/getbuywithfiatquote",
"/unity/pay/buywithfiat": "/unity/v4/pay/buywithfiat",
"/unity/pay/getbuywithfiatstatus": "/unity/v4/pay/getbuywithfiatstatus",
"/unity/pay/getbuywithfiatcurrencies": "/unity/v4/pay/getbuywithfiatcurrencies",
"/unity/pay/getbuywithfiatcurrencies":
"/unity/v4/pay/getbuywithfiatcurrencies",
// buy with crypto
"/unity/pay/getbuywithcryptoquote": "/unity/v4/pay/getbuywithcryptoquote",
"/unity/pay/buywithcrypto": "/unity/v4/pay/buywithcrypto",
@@ -345,25 +474,40 @@ const unityRedirects = {
"/unity/contracts/prepare": "/unity/v4/contracts/prepare",
// erc20
"/unity/contracts/erc20/erc20": "/unity/v4/contracts/erc20/erc20",
"/unity/contracts/erc20/erc20burnable": "/unity/v4/contracts/erc20/erc20burnable",
"/unity/contracts/erc20/erc20claimconditions": "/unity/v4/contracts/erc20/erc20claimconditions",
"/unity/contracts/erc20/erc20mintable": "/unity/v4/contracts/erc20/erc20mintable",
"/unity/contracts/erc20/erc20signaturemintable": "/unity/v4/contracts/erc20/erc20signaturemintable",
"/unity/contracts/erc20/erc20burnable":
"/unity/v4/contracts/erc20/erc20burnable",
"/unity/contracts/erc20/erc20claimconditions":
"/unity/v4/contracts/erc20/erc20claimconditions",
"/unity/contracts/erc20/erc20mintable":
"/unity/v4/contracts/erc20/erc20mintable",
"/unity/contracts/erc20/erc20signaturemintable":
"/unity/v4/contracts/erc20/erc20signaturemintable",
// erc721
"/unity/contracts/erc721/erc721": "/unity/v4/contracts/erc721/erc721",
"/unity/contracts/erc721/erc721burnable": "/unity/v4/contracts/erc721/erc721burnable",
"/unity/contracts/erc721/erc721claimconditions": "/unity/v4/contracts/erc721/erc721claimconditions",
"/unity/contracts/erc721/erc721enumerable": "/unity/v4/contracts/erc721/erc721enumerable",
"/unity/contracts/erc721/erc721mintable": "/unity/v4/contracts/erc721/erc721mintable",
"/unity/contracts/erc721/erc721signaturemintable": "/unity/v4/contracts/erc721/erc721signaturemintable",
"/unity/contracts/erc721/erc721supply": "/unity/v4/contracts/erc721/erc721supply",
"/unity/contracts/erc721/erc721burnable":
"/unity/v4/contracts/erc721/erc721burnable",
"/unity/contracts/erc721/erc721claimconditions":
"/unity/v4/contracts/erc721/erc721claimconditions",
"/unity/contracts/erc721/erc721enumerable":
"/unity/v4/contracts/erc721/erc721enumerable",
"/unity/contracts/erc721/erc721mintable":
"/unity/v4/contracts/erc721/erc721mintable",
"/unity/contracts/erc721/erc721signaturemintable":
"/unity/v4/contracts/erc721/erc721signaturemintable",
"/unity/contracts/erc721/erc721supply":
"/unity/v4/contracts/erc721/erc721supply",
// erc1155
"/unity/contracts/erc1155/erc1155": "/unity/v4/contracts/erc1155/erc1155",
"/unity/contracts/erc1155/erc1155burnable": "/unity/v4/contracts/erc1155/erc1155burnable",
"/unity/contracts/erc1155/erc1155claimconditions": "/unity/v4/contracts/erc1155/erc1155claimconditions",
"/unity/contracts/erc1155/erc1155enumerable": "/unity/v4/contracts/erc1155/erc1155enumerable",
"/unity/contracts/erc1155/erc1155mintable": "/unity/v4/contracts/erc1155/erc1155mintable",
"/unity/contracts/erc1155/erc1155signaturemintable": "/unity/v4/contracts/erc1155/erc1155signaturemintable",
"/unity/contracts/erc1155/erc1155burnable":
"/unity/v4/contracts/erc1155/erc1155burnable",
"/unity/contracts/erc1155/erc1155claimconditions":
"/unity/v4/contracts/erc1155/erc1155claimconditions",
"/unity/contracts/erc1155/erc1155enumerable":
"/unity/v4/contracts/erc1155/erc1155enumerable",
"/unity/contracts/erc1155/erc1155mintable":
"/unity/v4/contracts/erc1155/erc1155mintable",
"/unity/contracts/erc1155/erc1155signaturemintable":
"/unity/v4/contracts/erc1155/erc1155signaturemintable",
// marketplace
"/unity/contracts/marketplace": "/unity/v4/contracts/marketplace",
// pack
@@ -371,13 +515,17 @@ const unityRedirects = {
// events
"/unity/contracts/events/get": "/unity/v4/contracts/events/get",
"/unity/contracts/events/getall": "/unity/v4/contracts/events/getall",
"/unity/contracts/events/listentoall": "/unity/v4/contracts/events/listentoall",
"/unity/contracts/events/removealllisteners": "/unity/v4/contracts/events/removealllisteners",
"/unity/contracts/events/listentoall":
"/unity/v4/contracts/events/listentoall",
"/unity/contracts/events/removealllisteners":
"/unity/v4/contracts/events/removealllisteners",
// blocks
"/unity/blocks/getblock": "/unity/v4/blocks/getblock",
"/unity/blocks/getblockwithtransactions": "/unity/v4/blocks/getblockwithtransactions",
"/unity/blocks/getblockwithtransactions":
"/unity/v4/blocks/getblockwithtransactions",
"/unity/blocks/getlatestblocknumber": "/unity/v4/blocks/getlatestblocknumber",
"/unity/blocks/getlatestblocktimestamp": "/unity/v4/blocks/getlatestblocktimestamp",
"/unity/blocks/getlatestblocktimestamp":
"/unity/v4/blocks/getlatestblocktimestamp",
};
const walletRedirects = {
@@ -411,15 +559,24 @@ const walletRedirects = {
"/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/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",
@@ -438,7 +595,8 @@ const walletRedirects = {
"/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/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",
@@ -470,7 +628,8 @@ const walletRedirects = {
"/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-client-wallet":
"/references/wallets/v2/AbstractClientWallet",
"/wallet/interfaces/abstract-wallet": "/references/wallets/v2/AbstractWallet",
"/wallet/interfaces/connector": "/references/wallets/v2/Connector",
// wallets
@@ -491,7 +650,8 @@ const walletRedirects = {
"/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/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",
@@ -514,9 +674,11 @@ const paymentRedirects = {
"/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/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/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",
@@ -525,10 +687,13 @@ const paymentRedirects = {
"/connect/pay/buy-with-crypto": "/connect/pay/overview",
"/connect/pay/buy-with-crypto/overview": "/connect/pay/overview",
"/connect/pay/buy-with-crypto/fee-sharing": "/connect/pay/fee-sharing",
"/connect/pay/build-a-custom-experience": "/connect/pay/guides/build-a-custom-experience",
"/connect/pay/build-a-custom-experience":
"/connect/pay/guides/build-a-custom-experience",
"/connect/pay/enable-test-mode": "/connect/pay/guides/enable-test-mode",
"/connect/pay/guides/enable-test-mode": "/connect/pay/testing-pay",
"/connect/in-app-wallet/how-it-works": "/connect/in-app-wallet/security",
"/connect/in-app-wallet/guides/get-in-app-wallet-details-on-server":
"/connect/in-app-wallet/guides/get-user-details",
};
const contractRedirects = {
@@ -536,29 +701,49 @@ const contractRedirects = {
"/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/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/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
@@ -589,18 +774,23 @@ const infrastructureRedirects = {
"/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/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/smart-wallets":
"/engine/features/smart-wallets",
"/infrastructure/engine/features/relayers": "/engine/features/relayers",
"/infrastructure/engine/features/gasless-transactions": "/engine/features/gasless-transactions",
"/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",
"/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",
@@ -610,8 +800,10 @@ const infrastructureRedirects = {
//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",
"/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",
@@ -626,16 +818,20 @@ const otherRedirects = {
"/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/",
"/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/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",
@@ -647,20 +843,27 @@ const otherRedirects = {
"/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",
"/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/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/marketplace":
"/contracts/explore/pre-built-contracts/marketplace",
"/contracts/pack": "/contracts/explore/pre-built-contracts/pack",
"/contracts/nfts-and-tokens": "/contracts",
"/contracts/drops": "/contracts",
@@ -669,7 +872,8 @@ const otherRedirects = {
"/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",
"/unity/wallets/providers/smart-wallet":
"/unity/wallets/providers/account-abstraction",
"/engine/features/smart-wallets": "/engine/features/account-abstraction",
// others
"/pre-built-contracts/:path*": "/contracts",
@@ -698,14 +902,19 @@ const otherRedirects = {
"/solutions/gaming": "/",
"/signature-minting": "/contracts/design-docs/signature-mint",
// in-app wallet
"/references/typescript/v5/embeddedWallet": "/references/typescript/v5/inAppWallet",
"/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/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",
"/connect/in-app-wallet/how-to/get-in-app-wallet-details-on-server": "/connect/in-app-wallet/guides/get-in-app-wallet-details-on-server",
"/connect/in-app-wallet/how-to/get-in-app-wallet-details-on-server":
"/connect/in-app-wallet/guides/get-in-app-wallet-details-on-server",
};
const v5RestructuredRedirects = {
@@ -0,0 +1,79 @@
# Pregenerate User Wallets
To pregenerate an embedded wallet, you can make a `POST` request to the following endpoint:
```
https://embedded-wallet.thirdweb.com/api/v1/pregenerate
```
This allows you to safely create wallet addresses for your users before they login to your app.
## Request Body
The request body should be a JSON object with the following parameters:
- `strategy`: The strategy for wallet generation
- `email` or `phone` or `userId`: The user identifier associated with the wallet to be generated
### Email based wallets
```
{ strategy: "email", email: "[email protected]" }
```
When the user logs in with any method associated with that email (including google, facebook, discord auth), they will get access to the same pregenerated wallet.
### Phone based wallets
```
{ strategy: "phone", phone: "+1321123321" }
```
### Custom user id based wallets
```
{ strategy: "custom_auth_endpoint", userId: "some_user_id" }
```
Use this when [bringing your own authentication method](/connect/in-app-wallet/custom-auth/configuration). When the user logs in, if the user ids you provide from the auth endpoint match, they will get access to the same pregenerated wallet.
## Headers
You need to include the following headers:
- `x-ecosystem-id`: Your ecosystem ID
- `x-secret-key`: Your secret key for authentication
- `Content-Type`: Must be set to `application/json`
## Example curl Command
Here's an example curl command to pregenerate an embedded wallet:
```bash
curl -X POST 'https://embedded-wallet.thirdweb.com/api/v1/pregenerate' \
-H 'x-ecosystem-id: ecosystem.example-eco-123' \
-H 'x-secret-key: 9f8e7d6c5b4a3f2e1d0c9b8a7ffge434b2a1f0e9d8c7b6a5f4e3d2c1b0a9f8e7' \
-H 'Content-Type: application/json' \
-d '{
"strategy": "email",
"email": "[email protected]"
}'
```
Replace the header values with your actual client ID, ecosystem ID, and secret key.
## Response Format
The API returns a JSON object. The exact structure may vary based on the implementation, but it typically includes information about the pregenerated wallet. Here's a possible structure:
```json
{
"wallet": {
"address": "string",
"createdAt": "string",
}
}
```
Note: The actual response may include additional fields or have a different structure. Please refer to the most up-to-date documentation for the exact response format.
Remember to handle the response appropriately in your chosen programming language, including error cases and parsing the JSON response.
@@ -1,74 +0,0 @@
# Fetch User Details on the server
If you want to get the user details for a given thirdweb In-App Wallet on the server, you can make a `GET` request on `https://embedded-wallet.thirdweb.com/api/2023-11-30/embedded-wallet/user-details`
Here's an example function on how you might perform the query:
```ts
export async function fetchInAppWalletMetadataFromThirdweb(
args:
| {
queryBy: "walletAddress";
walletAddress: string;
}
| {
queryBy: "email";
email: string;
}
| {
queryBy: "phone";
phone: string;
}
| {
queryBy: "phone";
phone: string;
}
| {
queryBy: "id";
id: string;
},
) {
const url = new URL(
"https://embedded-wallet.thirdweb.com/api/2023-11-30/embedded-wallet/user-details",
);
if (args.queryBy === "walletAddress") {
url.searchParams.set("queryBy", "walletAddress");
url.searchParams.set("walletAddress", args.walletAddress);
}
if (args.queryBy === "email") {
url.searchParams.set("queryBy", "email");
url.searchParams.set("email", args.email);
}
if (args.queryBy === "phone") {
url.searchParams.set("queryBy", "phone");
url.searchParams.set("phone", args.phone);
}
if (args.queryBy === "id") {
url.searchParams.set("queryBy", "id");
url.searchParams.set("id", args.phone);
}
const resp = await fetchReq(url.href, {
headers: {
Authorization: `Bearer ${THIRD_WEB_CLIENT_SECRET}`,
},
});
const data = (await resp.json()) as {
userId: string;
walletAddress: string;
email?: string;
phone?: string;
createdAt: string;
linkedAccounts: {
type: string;
details:
| { phone: string, [key: string]: string; }
| { email: string, [key: string]: string; }
| { address: string, [key: string]: string; };
| { id: string, [key: string]: string; };
}[];
}[];
return data;
}
```
@@ -0,0 +1,128 @@
import { Tabs, TabsList, TabsContent, TabsTrigger, DocImage } from "@doc";
# Retrieving In-App Wallet User Details on the Server
## Using the thirdweb TypeScript SDK
You can query user details through the thirdweb SDK using a wallet address, email, phone number, or user ID. **This function requires a secret key to be present on the thirdweb client and should only be used on the server.**
<Tabs defaultValue='wallet'>
<TabsList>
<TabsTrigger value='wallet'>Wallet</TabsTrigger>
<TabsTrigger value='email'>Email</TabsTrigger>
<TabsTrigger value='phone'>Phone</TabsTrigger>
<TabsTrigger value='id'>User ID</TabsTrigger>
</TabsList>
<TabsContent value='wallet'>
```ts
import { getUser } from "thirdweb";
const user = await getUser({
client,
walletAddress: "0x123...",
});
```
</TabsContent>
<TabsContent value='email'>
```ts
import { getUser } from "thirdweb";
const user = await getUser({
client,
email: "[email protected]",
});
```
</TabsContent>
<TabsContent value='phone'>
```ts
import { getUser } from "thirdweb";
const user = await getUser({
client,
phone: "+11234567890",
});
```
</TabsContent>
<TabsContent value='id'>
```ts
import { getUser } from "thirdweb";
const user = await getUser({
client,
id: "1234567890",
});
```
</TabsContent>
</Tabs>
## Fetching User Details via API
To get the user details, you can make a `GET` request to the following endpoint:
```
https://embedded-wallet.thirdweb.com/api/2023-11-30/embedded-wallet/user-details
```
### Query Parameters
You can query user details using one of the following parameters:
- `walletAddress`: The user's wallet address
- `email`: The user's email address
- `phone`: The user's phone number
- `id`: The user's ID
### Authentication
You need to include your ThirdWeb Client Secret in the Authorization header.
### Example curl Command
Here's an example curl command to fetch user details:
```bash
curl -X GET 'https://embedded-wallet.thirdweb.com/api/2023-11-30/embedded-wallet/user-details?queryBy=walletAddress&walletAddress=0x123456789abcdef' \
-H 'Authorization: Bearer YOUR_THIRD_WEB_CLIENT_SECRET'
```
Replace `YOUR_THIRD_WEB_CLIENT_SECRET` with your actual ThirdWeb Client Secret.
### Response Format
The API returns a JSON array with the following structure for each user:
```json
[
{
"userId": "string",
"walletAddress": "string",
"email": "string (optional)",
"phone": "string (optional)",
"createdAt": "string",
"linkedAccounts": [
{
"type": "string",
"details": {
"phone": "string",
// or
"email": "string",
// or
"address": "string",
// or
"id": "string",
// Additional key-value pairs may be present
}
}
]
}
]
```
Note: The `details` object in `linkedAccounts` will contain different fields based on the account type.
Remember to handle the response appropriately in your chosen programming language, including error cases and parsing the JSON response.
File diff suppressed because it is too large Load Diff
@@ -1,58 +0,0 @@
# Getting User Details on the server
If you want to get the user details for a given thirdweb In-App Wallet on the server, you can make a `GET` request on `https://embedded-wallet.thirdweb.com/api/2023-11-30/embedded-wallet/user-details`
Here's an example function on how you might perform the query:
```ts
export async function fetchInAppWalletMetadataFromThirdweb(
args:
| {
queryBy: "walletAddress";
walletAddress: string;
}
| {
queryBy: "email";
email: string;
}
| {
queryBy: "phone";
phone: string;
}
| {
queryBy: "phone";
phone: string;
},
) {
const url = new URL(
"https://embedded-wallet.thirdweb.com/api/2023-11-30/embedded-wallet/user-details",
);
if (args.queryBy === "walletAddress") {
url.searchParams.set("queryBy", "walletAddress");
url.searchParams.set("walletAddress", args.walletAddress);
}
if (args.queryBy === "email") {
url.searchParams.set("queryBy", "email");
url.searchParams.set("email", args.email);
}
if (args.queryBy === "phone") {
url.searchParams.set("queryBy", "phone");
url.searchParams.set("phone", args.phone);
}
const resp = await fetchReq(url.href, {
headers: {
Authorization: `Bearer ${THIRD_WEB_CLIENT_SECRET}`,
},
});
const data = (await resp.json()) as {
userId: string;
walletAddress: string;
email?: string;
phone?: string;
createdAt: string;
}[];
return data;
}
```
@@ -0,0 +1,60 @@
import { Tabs, TabsList, TabsContent, TabsTrigger, DocImage } from "@doc";
# Retrieving In-App Wallet User Details on the Server
You can query user details through the thirdweb SDK using a wallet address, email, phone number, or user ID. **This function requires a secret key to be present on the thirdweb client and should only be used on the server.**
<Tabs defaultValue='wallet'>
<TabsList>
<TabsTrigger value='wallet'>Wallet</TabsTrigger>
<TabsTrigger value='email'>Email</TabsTrigger>
<TabsTrigger value='phone'>Phone</TabsTrigger>
<TabsTrigger value='id'>User ID</TabsTrigger>
</TabsList>
<TabsContent value='wallet'>
```ts
import { getUser } from "thirdweb";
const user = await getUser({
client,
walletAddress: "0x123...",
});
```
</TabsContent>
<TabsContent value='email'>
```ts
import { getUser } from "thirdweb";
const user = await getUser({
client,
email: "[email protected]",
});
```
</TabsContent>
<TabsContent value='phone'>
```ts
import { getUser } from "thirdweb";
const user = await getUser({
client,
phone: "+11234567890",
});
```
</TabsContent>
<TabsContent value='id'>
```ts
import { getUser } from "thirdweb";
const user = await getUser({
client,
id: "1234567890",
});
```
</TabsContent>
</Tabs>
+12
View File
@@ -1,5 +1,17 @@
# thirdweb
## 5.58.2
### Patch Changes
- [#4737](https://github.com/thirdweb-dev/js/pull/4737) [`2707db1`](https://github.com/thirdweb-dev/js/commit/2707db136ed98ed1c39dd5da20f0ebd41dcaf5b9) Thanks [@joaquim-verges](https://github.com/joaquim-verges)! - Allow linking accounts when using in-app + smart wallets
## 5.58.1
### Patch Changes
- [#4733](https://github.com/thirdweb-dev/js/pull/4733) [`824b1bd`](https://github.com/thirdweb-dev/js/commit/824b1bdb69cb02644dbe9d77f965bdab6e046ab5) Thanks [@gregfromstl](https://github.com/gregfromstl)! - Enable account linking for ecosystem wallets
## 5.58.0
### Minor Changes
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "thirdweb",
"version": "5.58.0",
"version": "5.58.2",
"repository": {
"type": "git",
"url": "git+https://github.com/thirdweb-dev/js.git#main"
@@ -1,8 +1,9 @@
import { type UseQueryResult, useQuery } from "@tanstack/react-query";
import { isEcosystemWallet } from "../../../../wallets/ecosystem/is-ecosystem-wallet.js";
import type { Profile } from "../../../../wallets/in-app/core/authentication/types.js";
import { getProfiles } from "../../../../wallets/in-app/core/wallet/profiles.js";
import type { Wallet } from "../../../../wallets/interfaces/wallet.js";
import { useActiveWallet } from "../wallets/useActiveWallet.js";
import { useAdminWallet } from "../wallets/useAdminAccount.js";
/**
* Retrieves all linked profiles for the current wallet.
@@ -24,11 +25,11 @@ import { useActiveWallet } from "../wallets/useActiveWallet.js";
* @wallet
*/
export function useProfiles(): UseQueryResult<Profile[]> {
const wallet = useActiveWallet();
const wallet = useAdminWallet();
return useQuery({
queryKey: ["profiles", wallet?.id],
enabled: !!wallet && wallet.id === "inApp",
enabled: !!wallet && (wallet.id === "inApp" || isEcosystemWallet(wallet)),
queryFn: async () => {
return getProfiles(wallet as Wallet<"inApp">);
},
@@ -3,10 +3,13 @@ import { CrossCircledIcon } from "@radix-ui/react-icons";
import { useQueryClient } from "@tanstack/react-query";
import { Suspense, lazy } from "react";
import type { ThirdwebClient } from "../../../../../client/client.js";
import { isEcosystemWallet } from "../../../../../wallets/ecosystem/is-ecosystem-wallet.js";
import type { Wallet } from "../../../../../wallets/interfaces/wallet.js";
import type { EcosystemWalletId } from "../../../../../wallets/wallet-types.js";
import { iconSize } from "../../../../core/design-system/index.js";
import { useActiveWallet } from "../../../../core/hooks/wallets/useActiveWallet.js";
import { useActiveWalletChain } from "../../../../core/hooks/wallets/useActiveWalletChain.js";
import { useAdminWallet } from "../../../../core/hooks/wallets/useAdminAccount.js";
import EcosystemWalletConnectUI from "../../../wallets/ecosystem/EcosystemWalletConnectUI.js";
import { LoadingScreen } from "../../../wallets/shared/LoadingScreen.js";
import { Container, Line, ModalHeader } from "../../components/basic.js";
import { Text } from "../../components/text.js";
@@ -25,7 +28,7 @@ export function LinkProfileScreen(props: {
client: ThirdwebClient;
walletConnect: { projectId?: string } | undefined;
}) {
const activeWallet = useActiveWallet();
const activeWallet = useAdminWallet();
const chain = useActiveWalletChain();
const queryClient = useQueryClient();
@@ -58,6 +61,30 @@ export function LinkProfileScreen(props: {
);
}
if (isEcosystemWallet(activeWallet)) {
return (
<Suspense fallback={<LoadingScreen />}>
<EcosystemWalletConnectUI
wallet={activeWallet as Wallet<EcosystemWalletId>}
done={() => {
queryClient.invalidateQueries({ queryKey: ["profiles"] });
props.onBack();
}}
connectLocale={props.locale}
client={props.client}
size="compact"
chain={chain}
meta={{
title: props.locale.manageWallet.linkProfile,
showThirdwebBranding: false,
}}
isLinking={true}
goBack={props.onBack}
/>
</Suspense>
);
}
return (
<Container
style={{
@@ -1,10 +1,12 @@
"use client";
import { ShuffleIcon } from "@radix-ui/react-icons";
import type { ThirdwebClient } from "../../../../../client/client.js";
import { isEcosystemWallet } from "../../../../../wallets/ecosystem/is-ecosystem-wallet.js";
import { isInAppWallet } from "../../../../../wallets/in-app/core/wallet/index.js";
import { injectedProvider } from "../../../../../wallets/injected/mipdStore.js";
import { fontSize, iconSize } from "../../../../core/design-system/index.js";
import { useActiveWallet } from "../../../../core/hooks/wallets/useActiveWallet.js";
import { useAdminWallet } from "../../../../core/hooks/wallets/useAdminAccount.js";
import { Spacer } from "../../components/Spacer.js";
import { Container, Line, ModalHeader } from "../../components/basic.js";
import { Text } from "../../components/text.js";
@@ -25,7 +27,7 @@ export function ManageWalletScreen(props: {
locale: ConnectLocale;
client: ThirdwebClient;
}) {
const activeWallet = useActiveWallet();
const activeWallet = useAdminWallet();
return (
<Container
@@ -56,21 +58,23 @@ export function ManageWalletScreen(props: {
/>
{/* Multi-auth */}
{activeWallet?.id === "inApp" && (
<MenuButton
onClick={() => {
props.setScreen("linked-profiles");
}}
style={{
fontSize: fontSize.sm,
}}
>
<MultiUserIcon size={iconSize.md} />
<Text color="primaryText">
{props.locale.manageWallet.linkedProfiles}
</Text>
</MenuButton>
)}
{activeWallet &&
(activeWallet?.id === "inApp" ||
isEcosystemWallet(activeWallet)) && (
<MenuButton
onClick={() => {
props.setScreen("linked-profiles");
}}
style={{
fontSize: fontSize.sm,
}}
>
<MultiUserIcon size={iconSize.md} />
<Text color="primaryText">
{props.locale.manageWallet.linkedProfiles}
</Text>
</MenuButton>
)}
{/* Wallet Connect Receiver */}
<MenuButton
@@ -47,12 +47,12 @@ function EcosystemWalletConnectUI(props: {
return <LoadingScreen />;
}
const goBackToMain =
props.size === "compact"
? props.goBack
: () => {
setSelectionData({});
};
const goBackToMain = () => {
if (props.size === "compact") {
props.goBack?.();
}
setSelectionData({});
};
const done = () => {
props.done();
@@ -53,12 +53,14 @@ function InAppWalletConnectUI(props: {
// if the the modal starts out with the wallet's connect ui instead of wallet selector - going back to main screen requires staying on the same component and clearing the selection data
// otherwise, we go back to the wallet selector by calling props.goBack
const goBackToMain =
initialScreen === props.wallet
? () => {
setSelectionData({});
}
: props.goBack;
const goBackToMain = () => {
if (initialScreen === props.wallet) {
setSelectionData({});
} else {
props.goBack?.();
setSelectionData({});
}
};
const done = () => {
props.done();
@@ -1,20 +0,0 @@
"use client";
import { useCustomTheme } from "../../../core/design-system/CustomThemeProvider.js";
import { fontSize } from "../../../core/design-system/index.js";
import { StyledButton } from "../../ui/design-system/elements.js";
export const LinkButton = /* @__PURE__ */ StyledButton((_) => {
const theme = useCustomTheme();
return {
all: "unset",
color: theme.colors.accentText,
fontSize: fontSize.sm,
cursor: "pointer",
textAlign: "center",
fontWeight: 500,
width: "100%",
"&:hover": {
color: theme.colors.primaryText,
},
};
});
@@ -266,7 +266,7 @@ export const ConnectWalletSocialOptions = (
const connectPromise = (() => {
if (props.isLinking) {
if (wallet.id !== "inApp") {
if (wallet.id !== "inApp" && !isEcosystemWallet(wallet)) {
throw new Error("Only in-app wallets support multi-auth");
}
return linkProfile(wallet, connectOptions);
@@ -1,5 +1,7 @@
import type { ThirdwebClient } from "../../../../client/client.js";
import { getThirdwebBaseUrl } from "../../../../utils/domains.js";
import { getClientFetch } from "../../../../utils/fetch.js";
import type { Ecosystem } from "../../web/types.js";
import type { Profile } from "./types.js";
/**
@@ -11,14 +13,17 @@ import type { Profile } from "./types.js";
*/
export async function linkAccount({
client,
ecosystem,
tokenToLink,
}: {
client: ThirdwebClient;
ecosystem?: Ecosystem;
tokenToLink: string;
}): Promise<Profile[]> {
const clientFetch = getClientFetch(client, ecosystem);
const IN_APP_URL = getThirdwebBaseUrl("inAppWallet");
const currentAccountToken = localStorage.getItem(
`walletToken-${client.clientId}`,
`walletToken-${client.clientId}${ecosystem?.id ? `-${ecosystem.id}` : ""}`,
);
if (!currentAccountToken) {
@@ -26,12 +31,10 @@ export async function linkAccount({
}
const headers: Record<string, string> = {
"Content-Type": "application/json",
Authorization: `Bearer iaw-auth-token:${currentAccountToken}`,
"x-thirdweb-client-id": client.clientId,
"Content-Type": "application/json",
};
const linkedDetailsResp = await fetch(
const linkedDetailsResp = await clientFetch(
`${IN_APP_URL}/api/2024-05-05/account/connect`,
{
method: "POST",
@@ -61,23 +64,23 @@ export async function linkAccount({
*/
export async function getLinkedProfilesInternal({
client,
}: { client: ThirdwebClient }): Promise<Profile[]> {
ecosystem,
}: { client: ThirdwebClient; ecosystem?: Ecosystem }): Promise<Profile[]> {
const clientFetch = getClientFetch(client, ecosystem);
const IN_APP_URL = getThirdwebBaseUrl("inAppWallet");
const currentAccountToken = localStorage.getItem(
`walletToken-${client.clientId}`,
`walletToken-${client.clientId}${ecosystem?.id ? `-${ecosystem.id}` : ""}`,
);
const headers: Record<string, string> = {
Authorization: `Bearer iaw-auth-token:${currentAccountToken}`,
"Content-Type": "application/json",
};
if (!currentAccountToken) {
throw new Error("Failed to get linked accounts, no user logged in");
}
const headers: Record<string, string> = {
"Content-Type": "application/json",
Authorization: `Bearer iaw-auth-token:${currentAccountToken}`,
"x-thirdweb-client-id": client.clientId,
};
const linkedAccountsResp = await fetch(
const linkedAccountsResp = await clientFetch(
`${IN_APP_URL}/api/2024-05-05/accounts`,
{
method: "GET",
@@ -8,6 +8,16 @@ import type {
CreateWalletArgs,
EcosystemWalletId,
} from "../../../wallet-types.js";
import type { Ecosystem } from "../../web/types.js";
import {
getLinkedProfilesInternal,
linkAccount as linkProfileWithToken,
} from "../authentication/linkAccount.js";
import type {
MultiStepAuthArgsType,
Profile,
SingleStepAuthArgsType,
} from "../authentication/types.js";
import type { InAppConnector } from "../interfaces/connector.js";
import { getOrCreateInAppWalletConnector } from "./in-app-core.js";
@@ -25,6 +35,10 @@ export function createEcosystemWallet(args: {
let account: Account | undefined = undefined;
let chain: Chain | undefined = undefined;
let client: ThirdwebClient | undefined;
const ecosystem: Ecosystem = {
id,
partnerId: createOptions?.partnerId,
};
return {
id,
@@ -38,7 +52,13 @@ export function createEcosystemWallet(args: {
return chain;
},
getConfig: () => createOptions,
getProfiles: async () => {
if (!client) {
return [];
}
return getLinkedProfilesInternal({ client, ecosystem });
},
getAccount: () => account,
autoConnect: async (options) => {
const { autoConnectInAppWallet } = await import("./index.js");
@@ -46,10 +66,7 @@ export function createEcosystemWallet(args: {
const connector = await getOrCreateInAppWalletConnector(
options.client,
connectorFactory,
{
id,
partnerId: createOptions?.partnerId,
},
ecosystem,
);
const [connectedAccount, connectedChain] = await autoConnectInAppWallet(
@@ -75,10 +92,7 @@ export function createEcosystemWallet(args: {
const connector = await getOrCreateInAppWalletConnector(
options.client,
connectorFactory,
{
id,
partnerId: createOptions?.partnerId,
},
ecosystem,
);
const [connectedAccount, connectedChain] = await connectInAppWallet(
@@ -104,10 +118,7 @@ export function createEcosystemWallet(args: {
const connector = await getOrCreateInAppWalletConnector(
client,
connectorFactory,
{
id,
partnerId: createOptions?.partnerId,
},
ecosystem,
);
const result = await connector.logout();
if (!result.success) {
@@ -122,5 +133,28 @@ export function createEcosystemWallet(args: {
chain = newChain;
emitter.emit("chainChanged", newChain);
},
};
// This is not included on the global interface but is force-resolved in linkProfile
linkProfile: async (
options: SingleStepAuthArgsType | MultiStepAuthArgsType,
): Promise<Profile[]> => {
if (!client) {
throw new Error(
"No client found, please connect the wallet before linking a profile",
);
}
const connector = await getOrCreateInAppWalletConnector(
client,
connectorFactory,
ecosystem,
);
const { storedToken } = await connector.authenticate(options);
return await linkProfileWithToken({
client,
ecosystem,
tokenToLink: storedToken.cookieString,
});
},
} as Wallet<EcosystemWalletId>;
}
@@ -1,3 +1,5 @@
import { isEcosystemWallet } from "../../../../wallets/ecosystem/is-ecosystem-wallet.js";
import type { EcosystemWalletId } from "../../../../wallets/wallet-types.js";
import type { Wallet } from "../../../interfaces/wallet.js";
import type {
MultiStepAuthArgsType,
@@ -25,8 +27,8 @@ import type {
* ```
* @wallet
*/
export async function getProfiles(wallet: Wallet<"inApp">) {
if (wallet.id !== "inApp") {
export async function getProfiles(wallet: Wallet<"inApp" | EcosystemWalletId>) {
if (wallet.id !== "inApp" && !isEcosystemWallet(wallet)) {
throw new Error("Multi-auth currently only supports in-app wallets");
}
@@ -59,10 +61,10 @@ export async function getProfiles(wallet: Wallet<"inApp">) {
* @wallet
*/
export async function linkProfile(
wallet: Wallet<"inApp">,
wallet: Wallet<"inApp" | EcosystemWalletId>,
auth: MultiStepAuthArgsType | SingleStepAuthArgsType,
): Promise<Profile[]> {
if (wallet.id !== "inApp") {
if (wallet.id !== "inApp" && !isEcosystemWallet(wallet)) {
throw new Error("Multi-auth currently only supports in-app wallets");
}