thirdweb 5.69.0 → 5.69.1-nightly-f368793375d099eec53569330af7a083e558e483-20241120000334

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.
Files changed (60) hide show
  1. package/dist/cjs/extensions/pack/createNewPack.js +2 -1
  2. package/dist/cjs/extensions/pack/createNewPack.js.map +1 -1
  3. package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/BuyScreen.js +9 -0
  4. package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/BuyScreen.js.map +1 -1
  5. package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/TransactionModeScreen.js +15 -2
  6. package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/TransactionModeScreen.js.map +1 -1
  7. package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/main/useBuyTxStates.js +2 -2
  8. package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/main/useBuyTxStates.js.map +1 -1
  9. package/dist/cjs/version.js +1 -1
  10. package/dist/cjs/version.js.map +1 -1
  11. package/dist/cjs/wallets/in-app/web/ecosystem.js +7 -17
  12. package/dist/cjs/wallets/in-app/web/ecosystem.js.map +1 -1
  13. package/dist/cjs/wallets/in-app/web/in-app.js +2 -17
  14. package/dist/cjs/wallets/in-app/web/in-app.js.map +1 -1
  15. package/dist/cjs/wallets/in-app/web/lib/auth/index.js +1 -0
  16. package/dist/cjs/wallets/in-app/web/lib/auth/index.js.map +1 -1
  17. package/dist/cjs/wallets/in-app/web/lib/auth/passkeys.js +17 -16
  18. package/dist/cjs/wallets/in-app/web/lib/auth/passkeys.js.map +1 -1
  19. package/dist/esm/extensions/pack/createNewPack.js +2 -1
  20. package/dist/esm/extensions/pack/createNewPack.js.map +1 -1
  21. package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/BuyScreen.js +9 -0
  22. package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/BuyScreen.js.map +1 -1
  23. package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/TransactionModeScreen.js +15 -2
  24. package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/TransactionModeScreen.js.map +1 -1
  25. package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/main/useBuyTxStates.js +2 -2
  26. package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/main/useBuyTxStates.js.map +1 -1
  27. package/dist/esm/version.js +1 -1
  28. package/dist/esm/version.js.map +1 -1
  29. package/dist/esm/wallets/in-app/web/ecosystem.js +7 -17
  30. package/dist/esm/wallets/in-app/web/ecosystem.js.map +1 -1
  31. package/dist/esm/wallets/in-app/web/in-app.js +2 -17
  32. package/dist/esm/wallets/in-app/web/in-app.js.map +1 -1
  33. package/dist/esm/wallets/in-app/web/lib/auth/index.js +1 -0
  34. package/dist/esm/wallets/in-app/web/lib/auth/index.js.map +1 -1
  35. package/dist/esm/wallets/in-app/web/lib/auth/passkeys.js +18 -17
  36. package/dist/esm/wallets/in-app/web/lib/auth/passkeys.js.map +1 -1
  37. package/dist/types/extensions/pack/createNewPack.d.ts +2 -2
  38. package/dist/types/extensions/pack/createNewPack.d.ts.map +1 -1
  39. package/dist/types/react/web/ui/ConnectWallet/screens/Buy/BuyScreen.d.ts.map +1 -1
  40. package/dist/types/react/web/ui/ConnectWallet/screens/Buy/TransactionModeScreen.d.ts.map +1 -1
  41. package/dist/types/react/web/ui/ConnectWallet/screens/Buy/main/useBuyTxStates.d.ts.map +1 -1
  42. package/dist/types/version.d.ts +1 -1
  43. package/dist/types/version.d.ts.map +1 -1
  44. package/dist/types/wallets/in-app/web/ecosystem.d.ts +7 -17
  45. package/dist/types/wallets/in-app/web/ecosystem.d.ts.map +1 -1
  46. package/dist/types/wallets/in-app/web/in-app.d.ts +2 -17
  47. package/dist/types/wallets/in-app/web/in-app.d.ts.map +1 -1
  48. package/dist/types/wallets/in-app/web/lib/auth/index.d.ts +1 -0
  49. package/dist/types/wallets/in-app/web/lib/auth/index.d.ts.map +1 -1
  50. package/dist/types/wallets/in-app/web/lib/auth/passkeys.d.ts.map +1 -1
  51. package/package.json +2 -2
  52. package/src/extensions/pack/createNewPack.ts +8 -3
  53. package/src/react/web/ui/ConnectWallet/screens/Buy/BuyScreen.tsx +23 -0
  54. package/src/react/web/ui/ConnectWallet/screens/Buy/TransactionModeScreen.tsx +43 -2
  55. package/src/react/web/ui/ConnectWallet/screens/Buy/main/useBuyTxStates.ts +2 -3
  56. package/src/version.ts +1 -1
  57. package/src/wallets/in-app/web/ecosystem.ts +7 -17
  58. package/src/wallets/in-app/web/in-app.ts +2 -17
  59. package/src/wallets/in-app/web/lib/auth/index.ts +1 -0
  60. package/src/wallets/in-app/web/lib/auth/passkeys.ts +24 -23
@@ -1 +1 @@
1
- {"version":3,"file":"useBuyTxStates.d.ts","sourceRoot":"","sources":["../../../../../../../../../src/react/web/ui/ConnectWallet/screens/Buy/main/useBuyTxStates.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,yDAAyD,CAAC;AAGnG,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,mDAAmD,CAAC;AAEjF,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,mCAAmC,CAAC;AAGjF,wBAAgB,yBAAyB,CAAC,IAAI,EAAE;IAC9C,WAAW,EAAE,mBAAmB,CAAC;IACjC,OAAO,EAAE,OAAO,GAAG,SAAS,CAAC;IAC7B,qBAAqB,EAAE,uBAAuB,CAAC;CAChD;;;;;;;;;;;UAuHA"}
1
+ {"version":3,"file":"useBuyTxStates.d.ts","sourceRoot":"","sources":["../../../../../../../../../src/react/web/ui/ConnectWallet/screens/Buy/main/useBuyTxStates.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,yDAAyD,CAAC;AAGnG,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,mDAAmD,CAAC;AAEjF,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,mCAAmC,CAAC;AAGjF,wBAAgB,yBAAyB,CAAC,IAAI,EAAE;IAC9C,WAAW,EAAE,mBAAmB,CAAC;IACjC,OAAO,EAAE,OAAO,GAAG,SAAS,CAAC;IAC7B,qBAAqB,EAAE,uBAAuB,CAAC;CAChD;;;;;;;;;;;UAsHA"}
@@ -1,2 +1,2 @@
1
- export declare const version = "5.69.0";
1
+ export declare const version = "5.69.1-nightly-f368793375d099eec53569330af7a083e558e483-20241120000334";
2
2
  //# sourceMappingURL=version.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"version.d.ts","sourceRoot":"","sources":["../../src/version.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,OAAO,WAAW,CAAC"}
1
+ {"version":3,"file":"version.d.ts","sourceRoot":"","sources":["../../src/version.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,OAAO,2EAA2E,CAAC"}
@@ -1,30 +1,21 @@
1
1
  import type { Wallet } from "../../interfaces/wallet.js";
2
2
  import type { CreateWalletArgs, EcosystemWalletId } from "../../wallet-types.js";
3
3
  /**
4
- * Creates an [Ecosystem Wallet](https://portal.thirdweb.com/connect/ecosystems/overview) based on various authentication methods.
5
- *
6
- * Available authentication methods:
7
- * - Email
8
- * - Phone
9
- * - Passkey
10
- * - Google
11
- * - Apple
12
- * - Facebook
13
- * - Discord
14
- * - LINE
15
- * - X
16
- * - Farcaster
4
+ * Creates an [Ecosystem Wallet](https://portal.thirdweb.com/connect/ecosystems/overview) based on various authentication methods. Full list of available authentication methods [here](/connect/wallet/sign-in-methods/overview).
17
5
  *
18
6
  * Can also be configured to use Account Abstraction to directly connect to a ERC4337 smart account based on those authentication methods.
19
7
  *
20
- * Refer to [inAppWallet](https://portal.thirdweb.com/references/typescript/v5/inAppWallet) for detailed usage examples.
8
+ * Refer to [inAppWallet](/typescript/v5/inAppWallet) for detailed usage examples.
21
9
  *
22
10
  * @param createOptions - configuration options
23
11
  * Refer to [EcosystemWalletCreationOptions](https://portal.thirdweb.com/references/typescript/v5/EcosystemWalletCreationOptions) for more details.
24
12
  * @returns The created ecosystem wallet.
13
+ *
14
+ *
25
15
  * @example
16
+ * ### Logging into an ecosystem wallet
26
17
  *
27
- * ### Connect to an ecosystem wallet
18
+ * Below is the general code snippet needed to connect via a given auth strategy to an ecosystem wallet. For more variants on the various auth strategies, refer to [inAppWallet](/typescript/v5/inAppWallet).
28
19
  *
29
20
  * ```ts
30
21
  * import { ecosystemWallet } from "thirdweb/wallets";
@@ -38,7 +29,7 @@ import type { CreateWalletArgs, EcosystemWalletId } from "../../wallet-types.js"
38
29
  * });
39
30
  * ```
40
31
  *
41
- * [View all connection options](https://portal.thirdweb.com/references/typescript/v5/EcosystemWalletConnectionOptions)
32
+ * [View all connection options](https://portal.thirdweb.com/references/typescript/v5/EcosystemWalletConnectionOptions).
42
33
  *
43
34
  * ### Connect to a restricted ecosystem wallet with your designated partner ID
44
35
  *
@@ -51,7 +42,6 @@ import type { CreateWalletArgs, EcosystemWalletId } from "../../wallet-types.js"
51
42
  * });
52
43
  * ```
53
44
  *
54
- * Refer to [inAppWallet](https://portal.thirdweb.com/references/typescript/v5/inAppWallet) for more usage examples.
55
45
  *
56
46
  * @wallet
57
47
  */
@@ -1 +1 @@
1
- {"version":3,"file":"ecosystem.d.ts","sourceRoot":"","sources":["../../../../../src/wallets/in-app/web/ecosystem.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAC;AACzD,OAAO,KAAK,EACV,gBAAgB,EAChB,iBAAiB,EAClB,MAAM,uBAAuB,CAAC;AAG/B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsDG;AACH,wBAAgB,eAAe,CAC7B,GAAG,IAAI,EAAE,gBAAgB,CAAC,iBAAiB,CAAC,GAC3C,MAAM,CAAC,iBAAiB,CAAC,CAuB3B"}
1
+ {"version":3,"file":"ecosystem.d.ts","sourceRoot":"","sources":["../../../../../src/wallets/in-app/web/ecosystem.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAC;AACzD,OAAO,KAAK,EACV,gBAAgB,EAChB,iBAAiB,EAClB,MAAM,uBAAuB,CAAC;AAG/B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4CG;AACH,wBAAgB,eAAe,CAC7B,GAAG,IAAI,EAAE,gBAAgB,CAAC,iBAAiB,CAAC,GAC3C,MAAM,CAAC,iBAAiB,CAAC,CAuB3B"}
@@ -1,22 +1,7 @@
1
1
  import type { Wallet } from "../../interfaces/wallet.js";
2
2
  import type { CreateWalletArgs } from "../../wallet-types.js";
3
3
  /**
4
- * Creates an app scoped wallet for users based on various authentication methods.
5
- *
6
- * Available authentication methods:
7
- * - Email
8
- * - Phone
9
- * - Passkey
10
- * - Guest
11
- * - Google
12
- * - Apple
13
- * - Facebook
14
- * - Discord
15
- * - Coinbase
16
- * - Telegram
17
- * - LINE
18
- * - X
19
- * - Farcaster
4
+ * Creates an app scoped wallet for users based on various authentication methods. Full list of available authentication methods [here](https://portal.thirdweb.com/connect/wallet/sign-in-methods/overview).
20
5
  *
21
6
  * Can also be configured to use Account Abstraction to directly connect to a ERC4337 smart account based on those authentication methods.
22
7
  *
@@ -39,7 +24,7 @@ import type { CreateWalletArgs } from "../../wallet-types.js";
39
24
  * });
40
25
  * ```
41
26
  *
42
- * [View all available social auth methods](https://portal.thirdweb.com/references/typescript/v5/InAppWalletSocialAuth)
27
+ * [View all available social auth methods](https://portal.thirdweb.com/connect/wallet/sign-in-methods/overview)
43
28
  *
44
29
  * ### Login with email
45
30
  *
@@ -1 +1 @@
1
- {"version":3,"file":"in-app.d.ts","sourceRoot":"","sources":["../../../../../src/wallets/in-app/web/in-app.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAC;AACzD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAG9D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8LG;AACH,wBAAgB,WAAW,CACzB,aAAa,CAAC,EAAE,gBAAgB,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,GAC3C,MAAM,CAAC,OAAO,CAAC,CAWjB"}
1
+ {"version":3,"file":"in-app.d.ts","sourceRoot":"","sources":["../../../../../src/wallets/in-app/web/in-app.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAC;AACzD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAG9D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+KG;AACH,wBAAgB,WAAW,CACzB,aAAa,CAAC,EAAE,gBAAgB,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,GAC3C,MAAM,CAAC,OAAO,CAAC,CAWjB"}
@@ -102,6 +102,7 @@ export declare function authenticateWithRedirect(args: SocialAuthArgsType & {
102
102
  * ```ts
103
103
  * import { linkProfile } from "thirdweb/wallets";
104
104
  *
105
+ * // optionally specify the ecosystem if you're linking an ecosystem wallet
105
106
  * await linkProfile({ client, strategy: "discord" });
106
107
  * ```
107
108
  * @wallet
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../src/wallets/in-app/web/lib/auth/index.ts"],"names":[],"mappings":"AAA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M,GAAG,SAAS,CAAC;QACjC,SAAS,EAAE,MAAM,CAAC;QAClB,EAAE,EAAE,MAAM,CAAC;KACZ,GAAG,OAAO,CAAC,kBAAkB,CAAC;CAqBhC;AAED;;;;;GAKG;AACH,wBAAsB,gBAAgB,CACpC,MAAM,EAAE,cAAc,EACtB,WAAW,CAAC,EAAE,iBAAiB,oBAShC"}
1
+ {"version":3,"file":"passkeys.d.ts","sourceRoot":"","sources":["../../../../../../../src/wallets/in-app/web/lib/auth/passkeys.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAC;AAMtE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,6BAA6B,CAAC;AAErE,OAAO,KAAK,EACV,kBAAkB,EAClB,aAAa,EACb,cAAc,EACd,MAAM,EACP,MAAM,0CAA0C,CAAC;AAElD,qBAAa,gBAAiB,YAAW,aAAa;IACpD,WAAW,IAAI,OAAO;IAIhB,QAAQ,CAAC,IAAI,EAAE;QACnB,IAAI,EAAE,MAAM,CAAC;QACb,SAAS,EAAE,MAAM,CAAC;QAClB,EAAE,EAAE,MAAM,CAAC;KACZ,GAAG,OAAO,CAAC,cAAc,CAAC;IA2BrB,YAAY,CAAC,IAAI,EAAE;QACvB,YAAY,EAAE,MAAM,GAAG,SAAS,CAAC;QACjC,SAAS,EAAE,MAAM,CAAC;QAClB,EAAE,EAAE,MAAM,CAAC;KACZ,GAAG,OAAO,CAAC,kBAAkB,CAAC;CAkBhC;AAED;;;;;GAKG;AACH,wBAAsB,gBAAgB,CACpC,MAAM,EAAE,cAAc,EACtB,WAAW,CAAC,EAAE,iBAAiB,oBAShC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "thirdweb",
3
- "version": "5.69.0",
3
+ "version": "5.69.1-nightly-f368793375d099eec53569330af7a083e558e483-20241120000334",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/thirdweb-dev/js.git#main"
@@ -205,7 +205,7 @@
205
205
  "@google/model-viewer": "2.1.1",
206
206
  "@noble/curves": "1.6.0",
207
207
  "@noble/hashes": "1.5.0",
208
- "@passwordless-id/webauthn": "^1.6.1",
208
+ "@passwordless-id/webauthn": "^2.1.2",
209
209
  "@radix-ui/react-dialog": "1.1.2",
210
210
  "@radix-ui/react-focus-scope": "1.1.0",
211
211
  "@radix-ui/react-icons": "1.3.2",
@@ -1,7 +1,10 @@
1
1
  import type { ThirdwebClient } from "../../client/client.js";
2
2
  import { type ThirdwebContract, getContract } from "../../contract/contract.js";
3
3
  import { upload } from "../../storage/upload.js";
4
- import type { BaseTransactionOptions } from "../../transaction/types.js";
4
+ import type {
5
+ BaseTransactionOptions,
6
+ WithOverrides,
7
+ } from "../../transaction/types.js";
5
8
  import type { NFTInput } from "../../utils/nft/parseNft.js";
6
9
  import { toUnits } from "../../utils/units.js";
7
10
  import type { AddPackContentsParams } from "./__generated__/IPack/write/addPackContents.js";
@@ -114,7 +117,7 @@ export type CreateNewPackParams = {
114
117
  * ```
115
118
  */
116
119
  export function createNewPack(
117
- options: BaseTransactionOptions<CreateNewPackParams>,
120
+ options: WithOverrides<BaseTransactionOptions<CreateNewPackParams>>,
118
121
  ) {
119
122
  return createPack({
120
123
  contract: options.contract,
@@ -126,7 +129,7 @@ export function createNewPack(
126
129
  * @internal
127
130
  */
128
131
  async function getCreatePackParams(
129
- options: BaseTransactionOptions<CreateNewPackParams>,
132
+ options: WithOverrides<BaseTransactionOptions<CreateNewPackParams>>,
130
133
  ): Promise<CreatePackParams> {
131
134
  const {
132
135
  contract,
@@ -138,6 +141,7 @@ async function getCreatePackParams(
138
141
  erc721Rewards,
139
142
  erc1155Rewards,
140
143
  tokenOwner,
144
+ overrides,
141
145
  } = options;
142
146
  const [erc20Content, erc721Content, erc1155Content, packUri] =
143
147
  await Promise.all([
@@ -179,6 +183,7 @@ async function getCreatePackParams(
179
183
  // openStartTimestamp should be in seconds and not millisecond
180
184
  openStartTimestamp: BigInt(Math.ceil(openStartTimestamp.getTime() / 1000)),
181
185
  amountDistributedPerOpen,
186
+ overrides,
182
187
  };
183
188
  }
184
189
 
@@ -24,6 +24,7 @@ import { useBuyWithFiatQuote } from "../../../../../core/hooks/pay/useBuyWithFia
24
24
  import { useActiveAccount } from "../../../../../core/hooks/wallets/useActiveAccount.js";
25
25
  import { invalidateWalletBalance } from "../../../../../core/providers/invalidateWalletBalance.js";
26
26
  import type { SupportedTokens } from "../../../../../core/utils/defaultTokens.js";
27
+ import { ErrorState } from "../../../../wallets/shared/ErrorState.js";
27
28
  import { LoadingScreen } from "../../../../wallets/shared/LoadingScreen.js";
28
29
  import type { PayEmbedConnectOptions } from "../../../PayEmbed.js";
29
30
  import { ChainName } from "../../../components/ChainName.js";
@@ -105,6 +106,24 @@ export default function BuyScreen(props: BuyScreenProps) {
105
106
  isTestMode,
106
107
  );
107
108
 
109
+ if (supportedDestinationsQuery.isError) {
110
+ return (
111
+ <Container
112
+ style={{
113
+ minHeight: "350px",
114
+ }}
115
+ fullHeight
116
+ flex="row"
117
+ center="both"
118
+ >
119
+ <ErrorState
120
+ title="Something went wrong"
121
+ onTryAgain={supportedDestinationsQuery.refetch}
122
+ />
123
+ </Container>
124
+ );
125
+ }
126
+
108
127
  if (!supportedDestinationsQuery.data) {
109
128
  return <LoadingScreen />;
110
129
  }
@@ -137,9 +156,11 @@ type BuyScreenContentProps = {
137
156
  */
138
157
  function BuyScreenContent(props: BuyScreenContentProps) {
139
158
  const { client, supportedDestinations, connectLocale, payOptions } = props;
159
+ console.log("BuyScreenContent");
140
160
 
141
161
  const activeAccount = useActiveAccount();
142
162
  const { payer, setPayer } = usePayerSetup();
163
+ console.log("payer", payer);
143
164
 
144
165
  const [screen, setScreen] = useState<SelectedScreen>({
145
166
  id: "main",
@@ -477,6 +498,8 @@ function BuyScreenContent(props: BuyScreenContentProps) {
477
498
  );
478
499
  }
479
500
 
501
+ console.log("SCREEN", screen.id);
502
+
480
503
  return (
481
504
  <Container animate="fadein">
482
505
  <div>
@@ -13,6 +13,7 @@ import { useWalletBalance } from "../../../../../core/hooks/others/useWalletBala
13
13
  import { useActiveAccount } from "../../../../../core/hooks/wallets/useActiveAccount.js";
14
14
  import { useActiveWallet } from "../../../../../core/hooks/wallets/useActiveWallet.js";
15
15
  import { hasSponsoredTransactionsEnabled } from "../../../../../core/utils/wallet.js";
16
+ import { ErrorState } from "../../../../wallets/shared/ErrorState.js";
16
17
  import { LoadingScreen } from "../../../../wallets/shared/LoadingScreen.js";
17
18
  import type { PayEmbedConnectOptions } from "../../../PayEmbed.js";
18
19
  import { ChainIcon } from "../../../components/ChainIcon.js";
@@ -54,9 +55,19 @@ export function TransactionModeScreen(props: {
54
55
  supportedDestinations,
55
56
  onContinue,
56
57
  } = props;
57
- const { data: chainData } = useChainMetadata(payUiOptions.transaction.chain);
58
+ const {
59
+ data: chainData,
60
+ error: chainDataError,
61
+ isLoading: chainDataLoading,
62
+ refetch: chainDataRefetch,
63
+ } = useChainMetadata(payUiOptions.transaction.chain);
58
64
  const metadata = payUiOptions.metadata;
59
- const { data: transactionCostAndData } = useTransactionCostAndData({
65
+ const {
66
+ data: transactionCostAndData,
67
+ error: transactionCostAndDataError,
68
+ isLoading: transactionCostAndDataLoading,
69
+ refetch: transactionCostAndDataRefetch,
70
+ } = useTransactionCostAndData({
60
71
  transaction: payUiOptions.transaction,
61
72
  account: payerAccount,
62
73
  supportedDestinations,
@@ -80,6 +91,36 @@ export function TransactionModeScreen(props: {
80
91
  },
81
92
  );
82
93
 
94
+ if (transactionCostAndDataLoading || chainDataLoading) {
95
+ return <LoadingScreen />;
96
+ }
97
+
98
+ if (transactionCostAndDataError || chainDataError) {
99
+ return (
100
+ <Container
101
+ style={{
102
+ minHeight: "350px",
103
+ }}
104
+ fullHeight
105
+ flex="row"
106
+ center="both"
107
+ >
108
+ <ErrorState
109
+ title={
110
+ transactionCostAndDataError?.message ||
111
+ chainDataError?.message ||
112
+ "Something went wrong"
113
+ }
114
+ onTryAgain={
115
+ transactionCostAndDataError
116
+ ? transactionCostAndDataRefetch
117
+ : chainDataRefetch
118
+ }
119
+ />
120
+ </Container>
121
+ );
122
+ }
123
+
83
124
  if (!transactionCostAndData || !chainData) {
84
125
  return <LoadingScreen />;
85
126
  }
@@ -58,7 +58,7 @@ export function useTransactionCostAndData(args: {
58
58
  ],
59
59
  queryFn: async () => {
60
60
  if (!account) {
61
- throw new Error("No account");
61
+ throw new Error("No payer account found");
62
62
  }
63
63
 
64
64
  const erc20Value = await resolvePromisedValue(transaction.erc20Value);
@@ -112,7 +112,6 @@ export function useTransactionCostAndData(args: {
112
112
  getChainMetadata(transaction.chain),
113
113
  getTransactionGasCost(transaction, account?.address),
114
114
  ]);
115
-
116
115
  const walletBalance = nativeWalletBalance;
117
116
  const transactionValueWei =
118
117
  (await resolvePromisedValue(transaction.value)) || 0n;
@@ -129,7 +128,7 @@ export function useTransactionCostAndData(args: {
129
128
  transactionValueWei,
130
129
  } satisfies TransactionCostAndData;
131
130
  },
132
- enabled: !!transaction && !!account && !!txQueryKey,
131
+ enabled: !!transaction && !!txQueryKey,
133
132
  refetchInterval: () => {
134
133
  if (transaction.erc20Value) {
135
134
  // if erc20 value is set, we don't need to poll
package/src/version.ts CHANGED
@@ -1 +1 @@
1
- export const version = "5.69.0";
1
+ export const version = "5.69.1-nightly-f368793375d099eec53569330af7a083e558e483-20241120000334";
@@ -7,30 +7,21 @@ import type {
7
7
  import { createInAppWallet } from "../core/wallet/in-app-core.js";
8
8
 
9
9
  /**
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
- * - LINE
21
- * - X
22
- * - Farcaster
10
+ * Creates an [Ecosystem Wallet](https://portal.thirdweb.com/connect/ecosystems/overview) based on various authentication methods. Full list of available authentication methods [here](/connect/wallet/sign-in-methods/overview).
23
11
  *
24
12
  * Can also be configured to use Account Abstraction to directly connect to a ERC4337 smart account based on those authentication methods.
25
13
  *
26
- * Refer to [inAppWallet](https://portal.thirdweb.com/references/typescript/v5/inAppWallet) for detailed usage examples.
14
+ * Refer to [inAppWallet](/typescript/v5/inAppWallet) for detailed usage examples.
27
15
  *
28
16
  * @param createOptions - configuration options
29
17
  * Refer to [EcosystemWalletCreationOptions](https://portal.thirdweb.com/references/typescript/v5/EcosystemWalletCreationOptions) for more details.
30
18
  * @returns The created ecosystem wallet.
19
+ *
20
+ *
31
21
  * @example
22
+ * ### Logging into an ecosystem wallet
32
23
  *
33
- * ### Connect to an ecosystem wallet
24
+ * Below is the general code snippet needed to connect via a given auth strategy to an ecosystem wallet. For more variants on the various auth strategies, refer to [inAppWallet](/typescript/v5/inAppWallet).
34
25
  *
35
26
  * ```ts
36
27
  * import { ecosystemWallet } from "thirdweb/wallets";
@@ -44,7 +35,7 @@ import { createInAppWallet } from "../core/wallet/in-app-core.js";
44
35
  * });
45
36
  * ```
46
37
  *
47
- * [View all connection options](https://portal.thirdweb.com/references/typescript/v5/EcosystemWalletConnectionOptions)
38
+ * [View all connection options](https://portal.thirdweb.com/references/typescript/v5/EcosystemWalletConnectionOptions).
48
39
  *
49
40
  * ### Connect to a restricted ecosystem wallet with your designated partner ID
50
41
  *
@@ -57,7 +48,6 @@ import { createInAppWallet } from "../core/wallet/in-app-core.js";
57
48
  * });
58
49
  * ```
59
50
  *
60
- * Refer to [inAppWallet](https://portal.thirdweb.com/references/typescript/v5/inAppWallet) for more usage examples.
61
51
  *
62
52
  * @wallet
63
53
  */
@@ -4,22 +4,7 @@ import type { CreateWalletArgs } from "../../wallet-types.js";
4
4
  import { createInAppWallet } from "../core/wallet/in-app-core.js";
5
5
 
6
6
  /**
7
- * Creates an app scoped wallet for users based on various authentication methods.
8
- *
9
- * Available authentication methods:
10
- * - Email
11
- * - Phone
12
- * - Passkey
13
- * - Guest
14
- * - Google
15
- * - Apple
16
- * - Facebook
17
- * - Discord
18
- * - Coinbase
19
- * - Telegram
20
- * - LINE
21
- * - X
22
- * - Farcaster
7
+ * Creates an app scoped wallet for users based on various authentication methods. Full list of available authentication methods [here](https://portal.thirdweb.com/connect/wallet/sign-in-methods/overview).
23
8
  *
24
9
  * Can also be configured to use Account Abstraction to directly connect to a ERC4337 smart account based on those authentication methods.
25
10
  *
@@ -42,7 +27,7 @@ import { createInAppWallet } from "../core/wallet/in-app-core.js";
42
27
  * });
43
28
  * ```
44
29
  *
45
- * [View all available social auth methods](https://portal.thirdweb.com/references/typescript/v5/InAppWalletSocialAuth)
30
+ * [View all available social auth methods](https://portal.thirdweb.com/connect/wallet/sign-in-methods/overview)
46
31
  *
47
32
  * ### Login with email
48
33
  *
@@ -194,6 +194,7 @@ export async function authenticateWithRedirect(
194
194
  * ```ts
195
195
  * import { linkProfile } from "thirdweb/wallets";
196
196
  *
197
+ * // optionally specify the ecosystem if you're linking an ecosystem wallet
197
198
  * await linkProfile({ client, strategy: "discord" });
198
199
  * ```
199
200
  * @wallet
@@ -1,4 +1,4 @@
1
- import { client } from "@passwordless-id/webauthn";
1
+ import { client, parsers } from "@passwordless-id/webauthn";
2
2
  import type { ThirdwebClient } from "../../../../../client/client.js";
3
3
  import { webLocalStorage } from "../../../../../utils/storage/webStorage.js";
4
4
  import {
@@ -25,22 +25,26 @@ export class PasskeyWebClient implements PasskeyClient {
25
25
  rp: RpInfo;
26
26
  }): Promise<RegisterResult> {
27
27
  const { name, challenge, rp } = args;
28
- const registration = await client.register(name, challenge, {
29
- authenticatorType: "auto",
28
+ const registration = await client.register({
29
+ user: name,
30
+ challenge,
30
31
  userVerification: "required",
31
32
  domain: rp.id,
32
33
  attestation: true,
33
- debug: false,
34
34
  });
35
- const clientDataB64 = base64UrlToBase64(registration.clientData);
35
+ const clientDataB64 = base64UrlToBase64(
36
+ registration.response.clientDataJSON,
37
+ );
36
38
  const clientDataParsed = JSON.parse(base64ToString(clientDataB64));
37
39
  return {
38
- authenticatorData: registration.authenticatorData,
39
- credentialId: registration.credential.id,
40
- clientData: registration.clientData,
40
+ authenticatorData: registration.response.authenticatorData,
41
+ credentialId: registration.id,
42
+ clientData: registration.response.clientDataJSON,
41
43
  credential: {
42
- publicKey: registration.credential.publicKey,
43
- algorithm: registration.credential.algorithm,
44
+ publicKey: registration.response.publicKey,
45
+ algorithm: parsers.getAlgoName(
46
+ registration.response.publicKeyAlgorithm,
47
+ ),
44
48
  },
45
49
  origin: clientDataParsed.origin,
46
50
  };
@@ -52,22 +56,19 @@ export class PasskeyWebClient implements PasskeyClient {
52
56
  rp: RpInfo;
53
57
  }): Promise<AuthenticateResult> {
54
58
  const { credentialId, challenge, rp } = args;
55
- const result = await client.authenticate(
56
- credentialId ? [credentialId] : [],
59
+ const result = await client.authenticate({
60
+ allowCredentials: credentialId ? [credentialId] : [],
57
61
  challenge,
58
- {
59
- authenticatorType: "auto",
60
- userVerification: "required",
61
- domain: rp.id,
62
- },
63
- );
64
- const clientDataB64 = base64UrlToBase64(result.clientData);
62
+ userVerification: "required",
63
+ domain: rp.id,
64
+ });
65
+ const clientDataB64 = base64UrlToBase64(result.response.clientDataJSON);
65
66
  const clientDataParsed = JSON.parse(base64ToString(clientDataB64));
66
67
  return {
67
- authenticatorData: result.authenticatorData,
68
- credentialId: result.credentialId,
69
- clientData: result.clientData,
70
- signature: result.signature,
68
+ authenticatorData: result.response.authenticatorData,
69
+ credentialId: result.id,
70
+ clientData: result.response.clientDataJSON,
71
+ signature: result.response.signature,
71
72
  origin: clientDataParsed.origin,
72
73
  };
73
74
  }