thirdweb 5.42.0-nightly-e27ebef85bb61342c3de53f85e134cf4a29f787c-20240730000342 → 5.43.0-nightly-75cc5a6434d29dbfe69b6cd6344a7c8426d59fac-20240731000316
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/adapters/wallet-adapter.js +12 -1
- package/dist/cjs/adapters/wallet-adapter.js.map +1 -1
- package/dist/cjs/cli/bin.js +13 -0
- package/dist/cjs/cli/bin.js.map +1 -1
- package/dist/cjs/exports/react.js +3 -1
- package/dist/cjs/exports/react.js.map +1 -1
- package/dist/cjs/exports/wallets/in-app.js.map +1 -1
- package/dist/cjs/exports/wallets.js.map +1 -1
- package/dist/cjs/exports/wallets.native.js.map +1 -1
- package/dist/cjs/extensions/marketplace/direct-listings/write/createListing.js +5 -1
- package/dist/cjs/extensions/marketplace/direct-listings/write/createListing.js.map +1 -1
- package/dist/cjs/pay/buyWithCrypto/getStatus.js.map +1 -1
- package/dist/cjs/react/core/hooks/wallets/useActiveAccount.js +1 -1
- package/dist/cjs/react/core/hooks/wallets/useActiveAccount.js.map +1 -1
- package/dist/cjs/react/core/hooks/wallets/useActiveWallet.js +1 -1
- package/dist/cjs/react/core/hooks/wallets/useActiveWallet.js.map +1 -1
- package/dist/cjs/react/core/hooks/wallets/useActiveWalletChain.js +1 -1
- package/dist/cjs/react/core/hooks/wallets/useActiveWalletChain.js.map +1 -1
- package/dist/cjs/react/core/hooks/wallets/useActiveWalletConnectionStatus.js +1 -1
- package/dist/cjs/react/core/hooks/wallets/useActiveWalletConnectionStatus.js.map +1 -1
- package/dist/cjs/react/core/hooks/wallets/useAutoConnect.js +4 -2
- package/dist/cjs/react/core/hooks/wallets/useAutoConnect.js.map +1 -1
- package/dist/cjs/react/core/hooks/wallets/useConnect.js +1 -1
- package/dist/cjs/react/core/hooks/wallets/useConnect.js.map +1 -1
- package/dist/cjs/react/core/hooks/wallets/useConnectedWallets.js +1 -1
- package/dist/cjs/react/core/hooks/wallets/useConnectedWallets.js.map +1 -1
- package/dist/cjs/react/core/hooks/wallets/useDisconnect.js +1 -1
- package/dist/cjs/react/core/hooks/wallets/useDisconnect.js.map +1 -1
- package/dist/cjs/react/core/hooks/wallets/useIsAutoConnecting.js +1 -1
- package/dist/cjs/react/core/hooks/wallets/useIsAutoConnecting.js.map +1 -1
- package/dist/cjs/react/core/hooks/wallets/useSetActiveWallet.js +1 -1
- package/dist/cjs/react/core/hooks/wallets/useSetActiveWallet.js.map +1 -1
- package/dist/cjs/react/core/hooks/wallets/useSetActiveWalletConnectionStatus.js +1 -1
- package/dist/cjs/react/core/hooks/wallets/useSetActiveWalletConnectionStatus.js.map +1 -1
- package/dist/cjs/react/core/hooks/wallets/useSwitchActiveWalletChain.js +1 -1
- package/dist/cjs/react/core/hooks/wallets/useSwitchActiveWalletChain.js.map +1 -1
- package/dist/cjs/react/core/providers/connection-manager.js +14 -2
- package/dist/cjs/react/core/providers/connection-manager.js.map +1 -1
- package/dist/cjs/react/web/ui/AutoConnect/AutoConnect.js +5 -0
- package/dist/cjs/react/web/ui/AutoConnect/AutoConnect.js.map +1 -1
- package/dist/cjs/react/web/ui/ConnectWallet/ConnectButton.js +196 -2
- package/dist/cjs/react/web/ui/ConnectWallet/ConnectButton.js.map +1 -1
- package/dist/cjs/react/web/ui/ConnectWallet/Modal/ConnectEmbed.js +109 -3
- package/dist/cjs/react/web/ui/ConnectWallet/Modal/ConnectEmbed.js.map +1 -1
- package/dist/cjs/react/web/ui/ConnectWallet/locale/de.js +114 -0
- package/dist/cjs/react/web/ui/ConnectWallet/locale/de.js.map +1 -0
- package/dist/cjs/react/web/ui/ConnectWallet/locale/getConnectLocale.js +3 -0
- package/dist/cjs/react/web/ui/ConnectWallet/locale/getConnectLocale.js.map +1 -1
- package/dist/cjs/react/web/ui/prebuilt/thirdweb/ClaimButton/index.js +2 -0
- package/dist/cjs/react/web/ui/prebuilt/thirdweb/ClaimButton/index.js.map +1 -1
- package/dist/cjs/react/web/ui/prebuilt/thirdweb/CreateDirectListingButton/index.js +118 -0
- package/dist/cjs/react/web/ui/prebuilt/thirdweb/CreateDirectListingButton/index.js.map +1 -0
- package/dist/cjs/react/web/wallets/injected/locale/de.js +27 -0
- package/dist/cjs/react/web/wallets/injected/locale/de.js.map +1 -0
- package/dist/cjs/react/web/wallets/injected/locale/getInjectedWalletLocale.js +2 -0
- package/dist/cjs/react/web/wallets/injected/locale/getInjectedWalletLocale.js.map +1 -1
- package/dist/cjs/react/web/wallets/shared/ConnectWalletSocialOptions.js +19 -7
- package/dist/cjs/react/web/wallets/shared/ConnectWalletSocialOptions.js.map +1 -1
- package/dist/cjs/react/web/wallets/shared/locale/de.js +55 -0
- package/dist/cjs/react/web/wallets/shared/locale/de.js.map +1 -0
- package/dist/cjs/react/web/wallets/shared/locale/getConnectLocale.js +2 -0
- package/dist/cjs/react/web/wallets/shared/locale/getConnectLocale.js.map +1 -1
- package/dist/cjs/react/web/wallets/smartWallet/locale/de.js +13 -0
- package/dist/cjs/react/web/wallets/smartWallet/locale/de.js.map +1 -0
- package/dist/cjs/react/web/wallets/smartWallet/locale/getSmartWalletLocale.js +2 -0
- package/dist/cjs/react/web/wallets/smartWallet/locale/getSmartWalletLocale.js.map +1 -1
- package/dist/cjs/react/web/wallets/walletConnect/locale.js +4 -0
- package/dist/cjs/react/web/wallets/walletConnect/locale.js.map +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/cjs/wallets/create-wallet.js +73 -0
- package/dist/cjs/wallets/create-wallet.js.map +1 -1
- package/dist/cjs/wallets/in-app/web/ecosystem.js +29 -3
- package/dist/cjs/wallets/in-app/web/ecosystem.js.map +1 -1
- package/dist/cjs/wallets/in-app/web/in-app.js +100 -5
- package/dist/cjs/wallets/in-app/web/in-app.js.map +1 -1
- package/dist/cjs/wallets/smart/smart-wallet.js +71 -5
- package/dist/cjs/wallets/smart/smart-wallet.js.map +1 -1
- package/dist/esm/adapters/wallet-adapter.js +12 -1
- package/dist/esm/adapters/wallet-adapter.js.map +1 -1
- package/dist/esm/cli/bin.js +13 -0
- package/dist/esm/cli/bin.js.map +1 -1
- package/dist/esm/exports/react.js +1 -0
- package/dist/esm/exports/react.js.map +1 -1
- package/dist/esm/exports/wallets/in-app.js.map +1 -1
- package/dist/esm/exports/wallets.js.map +1 -1
- package/dist/esm/exports/wallets.native.js.map +1 -1
- package/dist/esm/extensions/marketplace/direct-listings/write/createListing.js +5 -1
- package/dist/esm/extensions/marketplace/direct-listings/write/createListing.js.map +1 -1
- package/dist/esm/pay/buyWithCrypto/getStatus.js.map +1 -1
- package/dist/esm/react/core/hooks/wallets/useActiveAccount.js +2 -2
- package/dist/esm/react/core/hooks/wallets/useActiveAccount.js.map +1 -1
- package/dist/esm/react/core/hooks/wallets/useActiveWallet.js +2 -2
- package/dist/esm/react/core/hooks/wallets/useActiveWallet.js.map +1 -1
- package/dist/esm/react/core/hooks/wallets/useActiveWalletChain.js +2 -2
- package/dist/esm/react/core/hooks/wallets/useActiveWalletChain.js.map +1 -1
- package/dist/esm/react/core/hooks/wallets/useActiveWalletConnectionStatus.js +2 -2
- package/dist/esm/react/core/hooks/wallets/useActiveWalletConnectionStatus.js.map +1 -1
- package/dist/esm/react/core/hooks/wallets/useAutoConnect.js +5 -3
- package/dist/esm/react/core/hooks/wallets/useAutoConnect.js.map +1 -1
- package/dist/esm/react/core/hooks/wallets/useConnect.js +2 -2
- package/dist/esm/react/core/hooks/wallets/useConnect.js.map +1 -1
- package/dist/esm/react/core/hooks/wallets/useConnectedWallets.js +2 -2
- package/dist/esm/react/core/hooks/wallets/useConnectedWallets.js.map +1 -1
- package/dist/esm/react/core/hooks/wallets/useDisconnect.js +2 -2
- package/dist/esm/react/core/hooks/wallets/useDisconnect.js.map +1 -1
- package/dist/esm/react/core/hooks/wallets/useIsAutoConnecting.js +2 -2
- package/dist/esm/react/core/hooks/wallets/useIsAutoConnecting.js.map +1 -1
- package/dist/esm/react/core/hooks/wallets/useSetActiveWallet.js +2 -2
- package/dist/esm/react/core/hooks/wallets/useSetActiveWallet.js.map +1 -1
- package/dist/esm/react/core/hooks/wallets/useSetActiveWalletConnectionStatus.js +2 -2
- package/dist/esm/react/core/hooks/wallets/useSetActiveWalletConnectionStatus.js.map +1 -1
- package/dist/esm/react/core/hooks/wallets/useSwitchActiveWalletChain.js +2 -2
- package/dist/esm/react/core/hooks/wallets/useSwitchActiveWalletChain.js.map +1 -1
- package/dist/esm/react/core/providers/connection-manager.js +13 -2
- package/dist/esm/react/core/providers/connection-manager.js.map +1 -1
- package/dist/esm/react/web/ui/AutoConnect/AutoConnect.js +5 -0
- package/dist/esm/react/web/ui/AutoConnect/AutoConnect.js.map +1 -1
- package/dist/esm/react/web/ui/ConnectWallet/ConnectButton.js +196 -2
- package/dist/esm/react/web/ui/ConnectWallet/ConnectButton.js.map +1 -1
- package/dist/esm/react/web/ui/ConnectWallet/Modal/ConnectEmbed.js +109 -3
- package/dist/esm/react/web/ui/ConnectWallet/Modal/ConnectEmbed.js.map +1 -1
- package/dist/esm/react/web/ui/ConnectWallet/locale/de.js +112 -0
- package/dist/esm/react/web/ui/ConnectWallet/locale/de.js.map +1 -0
- package/dist/esm/react/web/ui/ConnectWallet/locale/getConnectLocale.js +3 -0
- package/dist/esm/react/web/ui/ConnectWallet/locale/getConnectLocale.js.map +1 -1
- package/dist/esm/react/web/ui/prebuilt/thirdweb/ClaimButton/index.js +2 -0
- package/dist/esm/react/web/ui/prebuilt/thirdweb/ClaimButton/index.js.map +1 -1
- package/dist/esm/react/web/ui/prebuilt/thirdweb/CreateDirectListingButton/index.js +115 -0
- package/dist/esm/react/web/ui/prebuilt/thirdweb/CreateDirectListingButton/index.js.map +1 -0
- package/dist/esm/react/web/wallets/injected/locale/de.js +25 -0
- package/dist/esm/react/web/wallets/injected/locale/de.js.map +1 -0
- package/dist/esm/react/web/wallets/injected/locale/getInjectedWalletLocale.js +2 -0
- package/dist/esm/react/web/wallets/injected/locale/getInjectedWalletLocale.js.map +1 -1
- package/dist/esm/react/web/wallets/shared/ConnectWalletSocialOptions.js +19 -7
- package/dist/esm/react/web/wallets/shared/ConnectWalletSocialOptions.js.map +1 -1
- package/dist/esm/react/web/wallets/shared/locale/de.js +53 -0
- package/dist/esm/react/web/wallets/shared/locale/de.js.map +1 -0
- package/dist/esm/react/web/wallets/shared/locale/getConnectLocale.js +2 -0
- package/dist/esm/react/web/wallets/shared/locale/getConnectLocale.js.map +1 -1
- package/dist/esm/react/web/wallets/smartWallet/locale/de.js +11 -0
- package/dist/esm/react/web/wallets/smartWallet/locale/de.js.map +1 -0
- package/dist/esm/react/web/wallets/smartWallet/locale/getSmartWalletLocale.js +2 -0
- package/dist/esm/react/web/wallets/smartWallet/locale/getSmartWalletLocale.js.map +1 -1
- package/dist/esm/react/web/wallets/walletConnect/locale.js +4 -0
- package/dist/esm/react/web/wallets/walletConnect/locale.js.map +1 -1
- package/dist/esm/version.js +1 -1
- package/dist/esm/wallets/create-wallet.js +73 -0
- package/dist/esm/wallets/create-wallet.js.map +1 -1
- package/dist/esm/wallets/in-app/web/ecosystem.js +29 -3
- package/dist/esm/wallets/in-app/web/ecosystem.js.map +1 -1
- package/dist/esm/wallets/in-app/web/in-app.js +100 -5
- package/dist/esm/wallets/in-app/web/in-app.js.map +1 -1
- package/dist/esm/wallets/smart/smart-wallet.js +71 -5
- package/dist/esm/wallets/smart/smart-wallet.js.map +1 -1
- package/dist/types/adapters/wallet-adapter.d.ts +12 -1
- package/dist/types/adapters/wallet-adapter.d.ts.map +1 -1
- package/dist/types/exports/react.d.ts +1 -0
- package/dist/types/exports/react.d.ts.map +1 -1
- package/dist/types/exports/wallets/in-app.d.ts +1 -0
- package/dist/types/exports/wallets/in-app.d.ts.map +1 -1
- package/dist/types/exports/wallets.d.ts +4 -2
- package/dist/types/exports/wallets.d.ts.map +1 -1
- package/dist/types/exports/wallets.native.d.ts +3 -2
- package/dist/types/exports/wallets.native.d.ts.map +1 -1
- package/dist/types/extensions/marketplace/direct-listings/write/createListing.d.ts +5 -1
- package/dist/types/extensions/marketplace/direct-listings/write/createListing.d.ts.map +1 -1
- package/dist/types/pay/buyWithCrypto/getStatus.d.ts +1 -1
- package/dist/types/pay/buyWithCrypto/getStatus.d.ts.map +1 -1
- package/dist/types/react/core/hooks/wallets/useAutoConnect.d.ts.map +1 -1
- package/dist/types/react/core/providers/connection-manager.d.ts +21 -0
- package/dist/types/react/core/providers/connection-manager.d.ts.map +1 -1
- package/dist/types/react/web/ui/AutoConnect/AutoConnect.d.ts +5 -0
- package/dist/types/react/web/ui/AutoConnect/AutoConnect.d.ts.map +1 -1
- package/dist/types/react/web/ui/ConnectWallet/ConnectButton.d.ts +196 -2
- package/dist/types/react/web/ui/ConnectWallet/ConnectButton.d.ts.map +1 -1
- package/dist/types/react/web/ui/ConnectWallet/Modal/ConnectEmbed.d.ts +109 -3
- package/dist/types/react/web/ui/ConnectWallet/Modal/ConnectEmbed.d.ts.map +1 -1
- package/dist/types/react/web/ui/ConnectWallet/locale/de.d.ts +4 -0
- package/dist/types/react/web/ui/ConnectWallet/locale/de.d.ts.map +1 -0
- package/dist/types/react/web/ui/ConnectWallet/locale/getConnectLocale.d.ts.map +1 -1
- package/dist/types/react/web/ui/prebuilt/thirdweb/ClaimButton/index.d.ts +2 -0
- package/dist/types/react/web/ui/prebuilt/thirdweb/ClaimButton/index.d.ts.map +1 -1
- package/dist/types/react/web/ui/prebuilt/thirdweb/CreateDirectListingButton/index.d.ts +37 -0
- package/dist/types/react/web/ui/prebuilt/thirdweb/CreateDirectListingButton/index.d.ts.map +1 -0
- package/dist/types/react/web/ui/types.d.ts +1 -1
- package/dist/types/react/web/ui/types.d.ts.map +1 -1
- package/dist/types/react/web/wallets/injected/locale/de.d.ts +7 -0
- package/dist/types/react/web/wallets/injected/locale/de.d.ts.map +1 -0
- package/dist/types/react/web/wallets/injected/locale/getInjectedWalletLocale.d.ts.map +1 -1
- package/dist/types/react/web/wallets/shared/ConnectWalletSocialOptions.d.ts.map +1 -1
- package/dist/types/react/web/wallets/shared/locale/de.d.ts +54 -0
- package/dist/types/react/web/wallets/shared/locale/de.d.ts.map +1 -0
- package/dist/types/react/web/wallets/shared/locale/getConnectLocale.d.ts.map +1 -1
- package/dist/types/react/web/wallets/smartWallet/locale/de.d.ts +4 -0
- package/dist/types/react/web/wallets/smartWallet/locale/de.d.ts.map +1 -0
- package/dist/types/react/web/wallets/smartWallet/locale/getSmartWalletLocale.d.ts.map +1 -1
- package/dist/types/react/web/wallets/walletConnect/locale.d.ts.map +1 -1
- package/dist/types/version.d.ts +1 -1
- package/dist/types/wallets/create-wallet.d.ts +73 -0
- package/dist/types/wallets/create-wallet.d.ts.map +1 -1
- package/dist/types/wallets/ecosystem/types.d.ts +5 -4
- package/dist/types/wallets/ecosystem/types.d.ts.map +1 -1
- package/dist/types/wallets/in-app/web/ecosystem.d.ts +29 -3
- package/dist/types/wallets/in-app/web/ecosystem.d.ts.map +1 -1
- package/dist/types/wallets/in-app/web/in-app.d.ts +100 -5
- package/dist/types/wallets/in-app/web/in-app.d.ts.map +1 -1
- package/dist/types/wallets/smart/smart-wallet.d.ts +71 -5
- package/dist/types/wallets/smart/smart-wallet.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/adapters/wallet-adapter.ts +12 -1
- package/src/cli/bin.ts +18 -0
- package/src/exports/react.ts +4 -0
- package/src/exports/wallets/in-app.ts +6 -0
- package/src/exports/wallets.native.ts +8 -1
- package/src/exports/wallets.ts +13 -1
- package/src/extensions/marketplace/direct-listings/write/createListing.ts +5 -1
- package/src/pay/buyWithCrypto/getStatus.ts +2 -1
- package/src/react/core/hooks/wallets/useActiveAccount.ts +2 -2
- package/src/react/core/hooks/wallets/useActiveWallet.ts +2 -2
- package/src/react/core/hooks/wallets/useActiveWalletChain.ts +2 -2
- package/src/react/core/hooks/wallets/useActiveWalletConnectionStatus.ts +2 -2
- package/src/react/core/hooks/wallets/useAutoConnect.ts +5 -3
- package/src/react/core/hooks/wallets/useConnect.ts +2 -2
- package/src/react/core/hooks/wallets/useConnectedWallets.ts +2 -2
- package/src/react/core/hooks/wallets/useDisconnect.ts +2 -2
- package/src/react/core/hooks/wallets/useIsAutoConnecting.ts +2 -2
- package/src/react/core/hooks/wallets/useSetActiveWallet.ts +2 -2
- package/src/react/core/hooks/wallets/useSetActiveWalletConnectionStatus.ts +2 -2
- package/src/react/core/hooks/wallets/useSwitchActiveWalletChain.ts +2 -2
- package/src/react/core/providers/connection-manager.tsx +15 -2
- package/src/react/web/ui/AutoConnect/AutoConnect.tsx +5 -0
- package/src/react/web/ui/ConnectWallet/ConnectButton.tsx +196 -2
- package/src/react/web/ui/ConnectWallet/Modal/ConnectEmbed.tsx +109 -3
- package/src/react/web/ui/ConnectWallet/locale/de.ts +117 -0
- package/src/react/web/ui/ConnectWallet/locale/getConnectLocale.ts +3 -0
- package/src/react/web/ui/prebuilt/thirdweb/ClaimButton/index.tsx +2 -0
- package/src/react/web/ui/prebuilt/thirdweb/CreateDirectListingButton/CreateDirectListingButton.test.tsx +29 -0
- package/src/react/web/ui/prebuilt/thirdweb/CreateDirectListingButton/index.tsx +165 -0
- package/src/react/web/ui/types.ts +7 -1
- package/src/react/web/wallets/injected/locale/de.ts +27 -0
- package/src/react/web/wallets/injected/locale/getInjectedWalletLocale.ts +2 -0
- package/src/react/web/wallets/shared/ConnectWalletSocialOptions.tsx +19 -8
- package/src/react/web/wallets/shared/locale/de.ts +58 -0
- package/src/react/web/wallets/shared/locale/getConnectLocale.ts +2 -0
- package/src/react/web/wallets/smartWallet/locale/de.ts +13 -0
- package/src/react/web/wallets/smartWallet/locale/getSmartWalletLocale.ts +2 -0
- package/src/react/web/wallets/walletConnect/locale.ts +4 -0
- package/src/version.ts +1 -1
- package/src/wallets/create-wallet.ts +73 -0
- package/src/wallets/ecosystem/types.ts +9 -5
- package/src/wallets/in-app/web/ecosystem.ts +29 -3
- package/src/wallets/in-app/web/in-app.ts +100 -5
- package/src/wallets/smart/smart-wallet.ts +71 -5
@@ -15,6 +15,9 @@ export async function getConnectLocale(localeId: LocaleId) {
|
|
15
15
|
case "vi_VN": {
|
16
16
|
return (await import("./vi.js")).default;
|
17
17
|
}
|
18
|
+
case "de_DE": {
|
19
|
+
return (await import("./de.js")).default;
|
20
|
+
}
|
18
21
|
default: {
|
19
22
|
return (await import("./en.js")).default;
|
20
23
|
}
|
@@ -151,6 +151,8 @@ export function ClaimButton(props: ClaimButtonProps) {
|
|
151
151
|
}
|
152
152
|
|
153
153
|
/**
|
154
|
+
* We can only get the image and name for Edition Drop
|
155
|
+
* For NFT Drop and Token Drop we fall back to the name & image of the contract
|
154
156
|
* @internal
|
155
157
|
*/
|
156
158
|
export async function getPayMetadata(
|
@@ -0,0 +1,29 @@
|
|
1
|
+
import { describe, expect, it } from "vitest";
|
2
|
+
import { render, screen } from "~test/react-render.js";
|
3
|
+
import { TEST_CLIENT } from "~test/test-clients.js";
|
4
|
+
import { sepolia } from "../../../../../../chains/chain-definitions/sepolia.js";
|
5
|
+
import { CreateDirectListingButton } from "./index.js";
|
6
|
+
|
7
|
+
const client = TEST_CLIENT;
|
8
|
+
|
9
|
+
// marketplace v3 on sepolia
|
10
|
+
const marketplaceAddress = "0xe0eFD6fb388405b67b3E9FaFc02649c70E749f03";
|
11
|
+
|
12
|
+
describe.runIf(process.env.TW_SECRET_KEY)("BuyDirectListingButton", () => {
|
13
|
+
it("should render", () => {
|
14
|
+
render(
|
15
|
+
<CreateDirectListingButton
|
16
|
+
client={client}
|
17
|
+
chain={sepolia}
|
18
|
+
contractAddress={marketplaceAddress}
|
19
|
+
assetContractAddress="0x3cf279b3248E164F3e5C341826B878d350EC6AB1"
|
20
|
+
tokenId={0n}
|
21
|
+
pricePerToken="0.1"
|
22
|
+
>
|
23
|
+
Sell NFT
|
24
|
+
</CreateDirectListingButton>,
|
25
|
+
);
|
26
|
+
expect(screen.queryByText("Sell NFT")).toBeInTheDocument();
|
27
|
+
expect(screen.getByRole("button")).toBeInTheDocument();
|
28
|
+
});
|
29
|
+
});
|
@@ -0,0 +1,165 @@
|
|
1
|
+
"use client";
|
2
|
+
|
3
|
+
import { useCallback } from "react";
|
4
|
+
import type { Chain } from "../../../../../../chains/types.js";
|
5
|
+
import type { ThirdwebClient } from "../../../../../../client/client.js";
|
6
|
+
import { getContract } from "../../../../../../contract/contract.js";
|
7
|
+
import { getApprovalForTransaction } from "../../../../../../extensions/erc20/write/getApprovalForTransaction.js";
|
8
|
+
import {
|
9
|
+
type CreateListingParams,
|
10
|
+
createListing,
|
11
|
+
} from "../../../../../../extensions/marketplace/direct-listings/write/createListing.js";
|
12
|
+
import type { BaseTransactionOptions } from "../../../../../../transaction/types.js";
|
13
|
+
import { useReadContract } from "../../../../../core/hooks/contract/useReadContract.js";
|
14
|
+
import type { TransactionButtonProps } from "../../../../../core/hooks/transaction/transaction-button-utils.js";
|
15
|
+
import { useSendAndConfirmTransaction } from "../../../../../core/hooks/transaction/useSendAndConfirmTransaction.js";
|
16
|
+
import { useActiveAccount } from "../../../../../core/hooks/wallets/useActiveAccount.js";
|
17
|
+
import { TransactionButton } from "../../../TransactionButton/index.js";
|
18
|
+
|
19
|
+
export type CreateDirectListingButtonProps = Omit<
|
20
|
+
TransactionButtonProps,
|
21
|
+
"transaction"
|
22
|
+
> &
|
23
|
+
CreateListingParams & {
|
24
|
+
contractAddress: string;
|
25
|
+
chain: Chain;
|
26
|
+
client: ThirdwebClient;
|
27
|
+
};
|
28
|
+
|
29
|
+
/**
|
30
|
+
* This button is used to create Direct listings for the thirdweb Marketplace v3 contract
|
31
|
+
*
|
32
|
+
* It uses the [`TransactionButton`](https://portal.thirdweb.com/references/typescript/v5/TransactionButton)
|
33
|
+
* and the [`createListing` extension](https://portal.thirdweb.com/references/typescript/v5/marketplace/createListing) under the hood
|
34
|
+
* which means it inherits all the props of those 2 components.
|
35
|
+
*
|
36
|
+
* @example
|
37
|
+
* ```tsx
|
38
|
+
* import { CreateDirectListingButton } from "thirdweb/react";
|
39
|
+
*
|
40
|
+
* <CreateDirectListingButton
|
41
|
+
* contractAddress="0x..." // contract address for the marketplace-v3
|
42
|
+
* chain={...} // the chain which the marketplace contract is deployed on
|
43
|
+
*
|
44
|
+
* // These props below are the same props for `createListing`
|
45
|
+
* // to get the full list, check the docs link above
|
46
|
+
* tokenId={0n}
|
47
|
+
* assetContractAddress="0x..." // The NFT contract address whose NFT(s) you want to sell
|
48
|
+
* pricePerToken={"0.1"} // sell for 0.1 <native token>
|
49
|
+
* >
|
50
|
+
* Sell NFT
|
51
|
+
* </CreateDirectListingButton>
|
52
|
+
* ```
|
53
|
+
* @component
|
54
|
+
*/
|
55
|
+
export function CreateDirectListingButton(
|
56
|
+
props: CreateDirectListingButtonProps,
|
57
|
+
) {
|
58
|
+
const {
|
59
|
+
contractAddress,
|
60
|
+
chain,
|
61
|
+
client,
|
62
|
+
children,
|
63
|
+
payModal,
|
64
|
+
assetContractAddress,
|
65
|
+
tokenId,
|
66
|
+
} = props;
|
67
|
+
const marketplaceContract = getContract({
|
68
|
+
address: contractAddress,
|
69
|
+
chain,
|
70
|
+
client,
|
71
|
+
});
|
72
|
+
const account = useActiveAccount();
|
73
|
+
const defaultPayModalMetadata = payModal ? payModal.metadata : undefined;
|
74
|
+
const { data: payMetadata } = useReadContract(getPayMetadata, {
|
75
|
+
contract: getContract({
|
76
|
+
address: assetContractAddress,
|
77
|
+
chain,
|
78
|
+
client,
|
79
|
+
}),
|
80
|
+
tokenId,
|
81
|
+
queryOptions: {
|
82
|
+
enabled: !defaultPayModalMetadata,
|
83
|
+
},
|
84
|
+
});
|
85
|
+
const { mutateAsync } = useSendAndConfirmTransaction();
|
86
|
+
|
87
|
+
const prepareTransaction = useCallback(async () => {
|
88
|
+
if (!account) {
|
89
|
+
throw new Error("No account detected");
|
90
|
+
}
|
91
|
+
const listingTx = createListing({
|
92
|
+
contract: marketplaceContract,
|
93
|
+
...props,
|
94
|
+
});
|
95
|
+
const approveTx = await getApprovalForTransaction({
|
96
|
+
transaction: listingTx,
|
97
|
+
account,
|
98
|
+
});
|
99
|
+
if (approveTx) {
|
100
|
+
await mutateAsync(approveTx);
|
101
|
+
}
|
102
|
+
return listingTx;
|
103
|
+
}, [marketplaceContract, props, account, mutateAsync]);
|
104
|
+
|
105
|
+
return (
|
106
|
+
<TransactionButton
|
107
|
+
transaction={() => prepareTransaction()}
|
108
|
+
payModal={{
|
109
|
+
metadata: defaultPayModalMetadata || payMetadata,
|
110
|
+
...payModal,
|
111
|
+
}}
|
112
|
+
{...props}
|
113
|
+
>
|
114
|
+
{children}
|
115
|
+
</TransactionButton>
|
116
|
+
);
|
117
|
+
}
|
118
|
+
|
119
|
+
/**
|
120
|
+
* @internal
|
121
|
+
*/
|
122
|
+
async function getPayMetadata(
|
123
|
+
options: BaseTransactionOptions<{
|
124
|
+
tokenId: bigint;
|
125
|
+
}>,
|
126
|
+
): Promise<{ name?: string; image?: string }> {
|
127
|
+
const [
|
128
|
+
{ isERC721 },
|
129
|
+
{ isERC1155 },
|
130
|
+
{ getContractMetadata },
|
131
|
+
{ getNFT: getERC721 },
|
132
|
+
{ getNFT: getERC1155 },
|
133
|
+
] = await Promise.all([
|
134
|
+
import("../../../../../../extensions/erc721/read/isERC721.js"),
|
135
|
+
import("../../../../../../extensions/erc1155/read/isERC1155.js"),
|
136
|
+
import("../../../../../../extensions/common/read/getContractMetadata.js"),
|
137
|
+
import("../../../../../../extensions/erc721/read/getNFT.js"),
|
138
|
+
import("../../../../../../extensions/erc1155/read/getNFT.js"),
|
139
|
+
]);
|
140
|
+
const [is721, is1155, contractMetadata] = await Promise.all([
|
141
|
+
isERC721(options),
|
142
|
+
isERC1155(options),
|
143
|
+
getContractMetadata(options),
|
144
|
+
]);
|
145
|
+
if (is721) {
|
146
|
+
const nft = await getERC721(options);
|
147
|
+
return {
|
148
|
+
image: nft?.metadata?.image,
|
149
|
+
name: nft?.metadata?.name,
|
150
|
+
};
|
151
|
+
}
|
152
|
+
|
153
|
+
if (is1155) {
|
154
|
+
const nft = await getERC1155(options);
|
155
|
+
return {
|
156
|
+
image: nft?.metadata?.image,
|
157
|
+
name: nft?.metadata?.name,
|
158
|
+
};
|
159
|
+
}
|
160
|
+
|
161
|
+
return {
|
162
|
+
image: contractMetadata?.image,
|
163
|
+
name: contractMetadata?.name,
|
164
|
+
};
|
165
|
+
}
|
@@ -0,0 +1,27 @@
|
|
1
|
+
import type { InjectedWalletLocale } from "./types.js";
|
2
|
+
|
3
|
+
/**
|
4
|
+
* @internal
|
5
|
+
*/
|
6
|
+
const injectedWalletLocaleEn = (wallet: string): InjectedWalletLocale => ({
|
7
|
+
connectionScreen: {
|
8
|
+
inProgress: "Verbindung wird hergestellt",
|
9
|
+
failed: "Verbindung fehlgeschlagen",
|
10
|
+
instruction: `Akzeptiere die Verbindung in ${wallet}`,
|
11
|
+
retry: "Erneut versuchen",
|
12
|
+
},
|
13
|
+
getStartedScreen: {
|
14
|
+
instruction: `Scanne den QR Code um ${wallet} herunterzuladen`,
|
15
|
+
},
|
16
|
+
scanScreen: {
|
17
|
+
instruction: `Scanne den QR Code um ${wallet} zu verbinden`,
|
18
|
+
},
|
19
|
+
getStartedLink: `Du hast ${wallet} nicht?`,
|
20
|
+
download: {
|
21
|
+
chrome: "Chrome Extension installieren",
|
22
|
+
android: "Von Google Play herunterladen",
|
23
|
+
iOS: "Von App Store herunterladen",
|
24
|
+
},
|
25
|
+
});
|
26
|
+
|
27
|
+
export default injectedWalletLocaleEn;
|
@@ -16,6 +16,8 @@ export async function getInjectedWalletLocale(
|
|
16
16
|
return (await import("./tl.js")).default;
|
17
17
|
case "vi_VN":
|
18
18
|
return (await import("./vi.js")).default;
|
19
|
+
case "de_DE":
|
20
|
+
return (await import("./de.js")).default;
|
19
21
|
default:
|
20
22
|
return (await import("./en.js")).default;
|
21
23
|
}
|
@@ -234,7 +234,7 @@ export const ConnectWalletSocialOptions = (
|
|
234
234
|
props.select();
|
235
235
|
}
|
236
236
|
|
237
|
-
const showOnlyIcons = socialLogins.length >
|
237
|
+
const showOnlyIcons = socialLogins.length > 2;
|
238
238
|
|
239
239
|
return (
|
240
240
|
<Container
|
@@ -247,22 +247,33 @@ export const ConnectWalletSocialOptions = (
|
|
247
247
|
{/* Social Login */}
|
248
248
|
{hasSocialLogins && (
|
249
249
|
<Container
|
250
|
-
flex=
|
250
|
+
flex="row"
|
251
251
|
center="x"
|
252
|
-
gap="sm"
|
252
|
+
gap={socialLogins.length > 4 ? "xs" : "sm"}
|
253
253
|
style={{
|
254
254
|
justifyContent: "space-between",
|
255
|
+
display: "grid",
|
256
|
+
gridTemplateColumns: `repeat(${socialLogins.length}, 1fr)`,
|
255
257
|
}}
|
256
258
|
>
|
257
259
|
{socialLogins.map((loginMethod) => {
|
258
|
-
const imgIconSize =
|
260
|
+
const imgIconSize = (() => {
|
261
|
+
if (!showOnlyIcons) {
|
262
|
+
return iconSize.md;
|
263
|
+
} else {
|
264
|
+
if (socialLogins.length > 4) {
|
265
|
+
return iconSize.md;
|
266
|
+
}
|
267
|
+
return iconSize.lg;
|
268
|
+
}
|
269
|
+
})();
|
270
|
+
|
259
271
|
return (
|
260
272
|
<SocialButton
|
261
273
|
aria-label={`Login with ${loginMethod}`}
|
262
274
|
data-variant={showOnlyIcons ? "icon" : "full"}
|
263
275
|
key={loginMethod}
|
264
276
|
variant={"outline"}
|
265
|
-
fullWidth={!showOnlyIcons}
|
266
277
|
onClick={() => {
|
267
278
|
handleSocialLogin(loginMethod as SocialAuthOption);
|
268
279
|
}}
|
@@ -274,7 +285,7 @@ export const ConnectWalletSocialOptions = (
|
|
274
285
|
client={props.client}
|
275
286
|
/>
|
276
287
|
{!showOnlyIcons &&
|
277
|
-
loginMethodsLabel[loginMethod as SocialAuthOption]}
|
288
|
+
`${socialLogins.length === 1 ? "Continue with " : ""}${loginMethodsLabel[loginMethod as SocialAuthOption]}`}
|
278
289
|
</SocialButton>
|
279
290
|
);
|
280
291
|
})}
|
@@ -379,11 +390,12 @@ export const ConnectWalletSocialOptions = (
|
|
379
390
|
};
|
380
391
|
|
381
392
|
const SocialButton = /* @__PURE__ */ styled(Button)({
|
393
|
+
flexGrow: 1,
|
382
394
|
"&[data-variant='full']": {
|
383
395
|
display: "flex",
|
384
396
|
justifyContent: "flex-start",
|
385
397
|
padding: spacing.md,
|
386
|
-
gap: spacing.
|
398
|
+
gap: spacing.sm,
|
387
399
|
fontSize: fontSize.md,
|
388
400
|
fontWeight: 500,
|
389
401
|
transition: "background-color 0.2s ease",
|
@@ -393,6 +405,5 @@ const SocialButton = /* @__PURE__ */ styled(Button)({
|
|
393
405
|
},
|
394
406
|
"&[data-variant='icon']": {
|
395
407
|
padding: spacing.sm,
|
396
|
-
flexGrow: 1,
|
397
408
|
},
|
398
409
|
});
|
@@ -0,0 +1,58 @@
|
|
1
|
+
import type { InAppWalletLocale } from "./types.js";
|
2
|
+
|
3
|
+
export default {
|
4
|
+
signInWithGoogle: "Google",
|
5
|
+
signInWithFacebook: "Facebook",
|
6
|
+
signInWithApple: "Apple",
|
7
|
+
signInWithDiscord: "Discord",
|
8
|
+
emailPlaceholder: "E-Mail Adresse",
|
9
|
+
submitEmail: "Weiter",
|
10
|
+
signIn: "Anmelden",
|
11
|
+
or: "Oder",
|
12
|
+
emailRequired: "E-Mail Adresse ist erforderlich",
|
13
|
+
invalidEmail: "Ungültige E-Mail Adresse",
|
14
|
+
maxAccountsExceeded:
|
15
|
+
"Maximale Anzahl von Konten überschritten. Bitte informiere den App-Entwickler.",
|
16
|
+
socialLoginScreen: {
|
17
|
+
title: "Anmelden",
|
18
|
+
instruction: "Melde dich im Popup Fenster an",
|
19
|
+
failed: "Anmeldung fehlgeschlagen",
|
20
|
+
retry: "Erneut versuchen",
|
21
|
+
},
|
22
|
+
emailLoginScreen: {
|
23
|
+
title: "Anmelden",
|
24
|
+
enterCodeSendTo: "Gib den Bestätigungscode ein. Gesendet an",
|
25
|
+
newDeviceDetected: "Neues Gerät erkannt",
|
26
|
+
enterRecoveryCode:
|
27
|
+
"Gib den Wiederherstellungscode ein, der dir per E-Mail zugesandt wurde, als du dich zum ersten Mal angemeldet hast",
|
28
|
+
invalidCode: "Ungültiger Bestätigungscode",
|
29
|
+
invalidCodeOrRecoveryCode:
|
30
|
+
"Ungültiger Bestätigungscode oder Wiederherstellungscode",
|
31
|
+
verify: "Bestätigen",
|
32
|
+
failedToSendCode: "Bestätigungscode konnte nicht gesendet werden",
|
33
|
+
sendingCode: "Bestätigungscode wird gesendet",
|
34
|
+
resendCode: "Bestätigungscode erneut senden",
|
35
|
+
},
|
36
|
+
createPassword: {
|
37
|
+
title: "Passwort erstellen",
|
38
|
+
instruction:
|
39
|
+
"Lege ein Passwort für dein Konto fest. Du benötigst dieses Passwort, um dich von einem neuen Gerät aus anzumelden.",
|
40
|
+
saveInstruction: "Stelle sicher, dass du es gespeichert hast",
|
41
|
+
inputPlaceholder: "Gib dein Passwort ein",
|
42
|
+
confirmation: "Ich habe mein Passwort gespeichert",
|
43
|
+
submitButton: "Passwort festlegen",
|
44
|
+
failedToSetPassword: "Passwort festlegen fehlgeschlagen",
|
45
|
+
},
|
46
|
+
enterPassword: {
|
47
|
+
title: "Passwort eingeben",
|
48
|
+
instruction: "Gib das Passwort für dein Konto ein",
|
49
|
+
inputPlaceholder: "Gib dein Passwort ein",
|
50
|
+
submitButton: "Überprüfen",
|
51
|
+
wrongPassword: "Falsches Passwort",
|
52
|
+
},
|
53
|
+
signInWithEmail: "Mit E-Mail Adresse anmelden",
|
54
|
+
invalidPhone: "Ungültige Telefonnummer",
|
55
|
+
phonePlaceholder: "Telefonnummer",
|
56
|
+
signInWithPhone: "Mit Telefonnummer anmelden",
|
57
|
+
phoneRequired: "Telefonnummer ist erforderlich",
|
58
|
+
} satisfies InAppWalletLocale;
|
@@ -16,6 +16,8 @@ export async function getInAppWalletLocale(
|
|
16
16
|
return (await import("./tl.js")).default;
|
17
17
|
case "vi_VN":
|
18
18
|
return (await import("./vi.js")).default;
|
19
|
+
case "de_DE":
|
20
|
+
return (await import("./de.js")).default;
|
19
21
|
default:
|
20
22
|
return (await import("./en.js")).default;
|
21
23
|
}
|
@@ -0,0 +1,13 @@
|
|
1
|
+
import type { SmartWalletLocale } from "./types.js";
|
2
|
+
|
3
|
+
const smartWalletLocalEn: SmartWalletLocale = {
|
4
|
+
connecting: "Verbindung zum Smart Account wird hergestellt",
|
5
|
+
failedToConnect: "Verbindung zum Smart Account fehlgeschlagen",
|
6
|
+
wrongNetworkScreen: {
|
7
|
+
title: "Falsches Netzwerk",
|
8
|
+
subtitle: "Dein Wallet ist nicht mit dem erforderlichen Netzwerk verbunden",
|
9
|
+
failedToSwitch: "Netzwerkwechsel fehlgeschlagen",
|
10
|
+
},
|
11
|
+
};
|
12
|
+
|
13
|
+
export default smartWalletLocalEn;
|
@@ -16,6 +16,8 @@ export async function getSmartWalletLocale(
|
|
16
16
|
return (await import("./tl.js")).default;
|
17
17
|
case "vi_VN":
|
18
18
|
return (await import("./vi.js")).default;
|
19
|
+
case "de_DE":
|
20
|
+
return (await import("./de.js")).default;
|
19
21
|
default:
|
20
22
|
return (await import("./en.js")).default;
|
21
23
|
}
|
@@ -29,4 +29,8 @@ export const walletConnectLocales: Record<LocaleId, WalletConnectLocale> = {
|
|
29
29
|
scanInstruction: "Quét mã QR bằng ứng dụng ví để kết nối",
|
30
30
|
openWCModal: "Mở giao diện WalletConnect",
|
31
31
|
},
|
32
|
+
de_DE: {
|
33
|
+
scanInstruction: "Scanne dies mit deiner Wallet-App, um zu verbinden",
|
34
|
+
openWCModal: "Offizielles WalletConnect-Modal öffnen",
|
35
|
+
},
|
32
36
|
};
|
package/src/version.ts
CHANGED
@@ -1 +1 @@
|
|
1
|
-
export const version = "5.
|
1
|
+
export const version = "5.43.0-nightly-75cc5a6434d29dbfe69b6cd6344a7c8426d59fac-20240731000316";
|
@@ -30,9 +30,31 @@ import { createWalletEmitter } from "./wallet-emitter.js";
|
|
30
30
|
|
31
31
|
/**
|
32
32
|
* Creates a wallet based on the provided ID and arguments.
|
33
|
+
*
|
34
|
+
* - Supports 350+ wallets
|
35
|
+
* - Handles both injected browser wallets and WalletConnect sessions
|
36
|
+
*
|
37
|
+
* [View all available wallets](https://portal.thirdweb.com/typescript/v5/supported-wallets)
|
38
|
+
*
|
33
39
|
* @param args - The arguments for creating the wallet.
|
40
|
+
* @param args.id - The ID of the wallet to create, this will be autocompleted by your IDE.
|
41
|
+
* [View all available wallets](https://portal.thirdweb.com/typescript/v5/supported-wallets)
|
42
|
+
* @param args.createOptions - The options for creating the wallet.
|
43
|
+
* The arguments are different for each wallet type.
|
44
|
+
* Refer to the [WalletCreationOptions](https://portal.thirdweb.com/references/typescript/v5/WalletCreationOptions) type for more details.
|
34
45
|
* @returns - The created wallet.
|
35
46
|
* @example
|
47
|
+
*
|
48
|
+
* ## Connecting the wallet
|
49
|
+
*
|
50
|
+
* Once created, you can connect the wallet to your app by calling the `connect` method.
|
51
|
+
*
|
52
|
+
* The `connect` method returns a promise that resolves to the connected account.
|
53
|
+
*
|
54
|
+
* Each wallet type can have different connect options. [View the different connect options](https://portal.thirdweb.com/references/typescript/v5/WalletConnectionOption)
|
55
|
+
*
|
56
|
+
* ## Connecting to an injected wallet
|
57
|
+
*
|
36
58
|
* ```ts
|
37
59
|
* import { createWallet } from "thirdweb/wallets";
|
38
60
|
*
|
@@ -42,6 +64,57 @@ import { createWalletEmitter } from "./wallet-emitter.js";
|
|
42
64
|
* client,
|
43
65
|
* });
|
44
66
|
* ```
|
67
|
+
*
|
68
|
+
* You can check if a wallet is installed by calling the [injectedProvider](https://portal.thirdweb.com/references/typescript/v5/injectedProvider) method.
|
69
|
+
*
|
70
|
+
* ## Connecting via WalletConnect modal
|
71
|
+
*
|
72
|
+
* ```ts
|
73
|
+
* import { createWallet } from "thirdweb/wallets";
|
74
|
+
*
|
75
|
+
* const metamaskWallet = createWallet("io.metamask");
|
76
|
+
*
|
77
|
+
* await metamask.connect({
|
78
|
+
* client,
|
79
|
+
* walletConnect: {
|
80
|
+
* projectId: "YOUR_PROJECT_ID",
|
81
|
+
* showQrModal: true,
|
82
|
+
* appMetadata: {
|
83
|
+
* name: "My App",
|
84
|
+
* url: "https://my-app.com",
|
85
|
+
* description: "my app description",
|
86
|
+
* logoUrl: "https://path/to/my-app/logo.svg",
|
87
|
+
* },
|
88
|
+
* },
|
89
|
+
* });
|
90
|
+
* ```
|
91
|
+
* [View ConnectWallet connection options](https://portal.thirdweb.com/references/typescript/v5/WCConnectOptions)
|
92
|
+
*
|
93
|
+
* ## Connecting with coinbase wallet
|
94
|
+
*
|
95
|
+
* ```ts
|
96
|
+
* import { createWallet } from "thirdweb/wallets";
|
97
|
+
*
|
98
|
+
* const cbWallet = createWallet("com.coinbase.wallet", {
|
99
|
+
* appMetadata: {
|
100
|
+
* name: "My App",
|
101
|
+
* url: "https://my-app.com",
|
102
|
+
* description: "my app description",
|
103
|
+
* logoUrl: "https://path/to/my-app/logo.svg",
|
104
|
+
* },
|
105
|
+
* walletConfig: {
|
106
|
+
* // options: 'all' | 'smartWalletOnly' | 'eoaOnly'
|
107
|
+
* options: 'all',
|
108
|
+
* },
|
109
|
+
* });
|
110
|
+
*
|
111
|
+
* const account = await cbWallet.connect({
|
112
|
+
* client,
|
113
|
+
* });
|
114
|
+
* ```
|
115
|
+
*
|
116
|
+
* [View Coinbase wallet creation options](https://portal.thirdweb.com/references/typescript/v5/CoinbaseWalletCreationOptions)
|
117
|
+
*
|
45
118
|
* @wallet
|
46
119
|
*/
|
47
120
|
export function createWallet<const ID extends WalletId>(
|
@@ -1,3 +1,4 @@
|
|
1
|
+
import type { Prettify } from "../../utils/type-utils.js";
|
1
2
|
import type {
|
2
3
|
InAppWalletAutoConnectOptions,
|
3
4
|
InAppWalletConnectionOptions,
|
@@ -11,8 +12,11 @@ export type EcosystemWalletCreationOptions = {
|
|
11
12
|
};
|
12
13
|
};
|
13
14
|
|
14
|
-
export type EcosystemWalletConnectionOptions =
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
15
|
+
export type EcosystemWalletConnectionOptions = Prettify<
|
16
|
+
InAppWalletConnectionOptions & {
|
17
|
+
ecosystem: Ecosystem;
|
18
|
+
}
|
19
|
+
>;
|
20
|
+
export type EcosystemWalletAutoConnectOptions = Prettify<
|
21
|
+
InAppWalletAutoConnectOptions & { ecosystem: Ecosystem }
|
22
|
+
>;
|
@@ -7,10 +7,29 @@ import type {
|
|
7
7
|
import { createEcosystemWallet } from "../core/wallet/ecosystem-core.js";
|
8
8
|
|
9
9
|
/**
|
10
|
-
* Creates an
|
10
|
+
* Creates an [Ecosystem Wallet](https://portal.thirdweb.com/connect/ecosystems/overview) based on various authentication methods.
|
11
|
+
*
|
12
|
+
* Available authentication methods:
|
13
|
+
* - Email
|
14
|
+
* - Phone
|
15
|
+
* - Passkey
|
16
|
+
* - Google
|
17
|
+
* - Apple
|
18
|
+
* - Facebook
|
19
|
+
* - Discord
|
20
|
+
* - Farcaster
|
21
|
+
*
|
22
|
+
* Can also be configured to use Account Abstraction to directly connect to a ERC4337 smart account based on those authentication methods.
|
23
|
+
*
|
24
|
+
* Refer to [inAppWallet](https://portal.thirdweb.com/references/typescript/v5/inAppWallet) for detailed usage examples.
|
25
|
+
*
|
11
26
|
* @param createOptions - configuration options
|
27
|
+
* Refer to [EcosystemWalletCreationOptions](https://portal.thirdweb.com/references/typescript/v5/EcosystemWalletCreationOptions) for more details.
|
12
28
|
* @returns The created ecosystem wallet.
|
13
29
|
* @example
|
30
|
+
*
|
31
|
+
* ### Connect to an ecosystem wallet
|
32
|
+
*
|
14
33
|
* ```ts
|
15
34
|
* import { ecosystemWallet } from "thirdweb/wallets";
|
16
35
|
*
|
@@ -23,14 +42,21 @@ import { createEcosystemWallet } from "../core/wallet/ecosystem-core.js";
|
|
23
42
|
* });
|
24
43
|
* ```
|
25
44
|
*
|
26
|
-
*
|
27
|
-
*
|
45
|
+
* [View all connection options](https://portal.thirdweb.com/references/typescript/v5/EcosystemWalletConnectionOptions)
|
46
|
+
*
|
47
|
+
* ### Connect to a restricted ecosystem wallet with your designated partner ID
|
48
|
+
*
|
49
|
+
* The parnter ID will be provided to you by the ecosystem with which you're integrating.
|
50
|
+
*
|
28
51
|
* ```ts
|
29
52
|
* import { ecosystemWallet } from "thirdweb/wallets";
|
30
53
|
* const wallet = ecosystemWallet("ecosystem.hooli", {
|
31
54
|
* partnerId: "..."
|
32
55
|
* });
|
33
56
|
* ```
|
57
|
+
*
|
58
|
+
* Refer to [inAppWallet](https://portal.thirdweb.com/references/typescript/v5/inAppWallet) for more usage examples.
|
59
|
+
*
|
34
60
|
* @wallet
|
35
61
|
*/
|
36
62
|
export function ecosystemWallet(
|