thirdweb 5.86.7-nightly-f5f8a40320d5d768d5866813f53ee4880bdf7851-20250129000319 → 5.87.1
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/exports/react.js +4 -3
- package/dist/cjs/exports/react.js.map +1 -1
- package/dist/cjs/exports/react.native.js +27 -1
- package/dist/cjs/exports/react.native.js.map +1 -1
- package/dist/cjs/react/{web/ui/prebuilt/Account → core/account}/provider.js +1 -1
- package/dist/cjs/react/core/account/provider.js.map +1 -0
- package/dist/cjs/react/core/utils/account.js +105 -0
- package/dist/cjs/react/core/utils/account.js.map +1 -0
- package/dist/cjs/react/core/utils/walletIcon.js +23 -0
- package/dist/cjs/react/core/utils/walletIcon.js.map +1 -1
- package/dist/cjs/react/core/utils/walletname.js +45 -0
- package/dist/cjs/react/core/utils/walletname.js.map +1 -0
- package/dist/cjs/react/core/wallet/provider.js.map +1 -0
- package/dist/cjs/react/native/ui/prebuilt/Account/address.js +50 -0
- package/dist/cjs/react/native/ui/prebuilt/Account/address.js.map +1 -0
- package/dist/cjs/react/native/ui/prebuilt/Account/avatar.js +151 -0
- package/dist/cjs/react/native/ui/prebuilt/Account/avatar.js.map +1 -0
- package/dist/cjs/react/native/ui/prebuilt/Account/balance.js +130 -0
- package/dist/cjs/react/native/ui/prebuilt/Account/balance.js.map +1 -0
- package/dist/cjs/react/native/ui/prebuilt/Account/blobbie.js +58 -0
- package/dist/cjs/react/native/ui/prebuilt/Account/blobbie.js.map +1 -0
- package/dist/cjs/react/native/ui/prebuilt/Account/name.js +113 -0
- package/dist/cjs/react/native/ui/prebuilt/Account/name.js.map +1 -0
- package/dist/cjs/react/native/ui/prebuilt/Wallet/icon.js +85 -0
- package/dist/cjs/react/native/ui/prebuilt/Wallet/icon.js.map +1 -0
- package/dist/cjs/react/native/ui/prebuilt/Wallet/name.js +66 -0
- package/dist/cjs/react/native/ui/prebuilt/Wallet/name.js.map +1 -0
- package/dist/cjs/react/web/ui/ConnectWallet/Blobbie.js +2 -18
- package/dist/cjs/react/web/ui/ConnectWallet/Blobbie.js.map +1 -1
- package/dist/cjs/react/web/ui/ConnectWallet/ConnectButton.js +1 -1
- package/dist/cjs/react/web/ui/ConnectWallet/ConnectButton.js.map +1 -1
- package/dist/cjs/react/web/ui/ConnectWallet/Details.js +5 -4
- package/dist/cjs/react/web/ui/ConnectWallet/Details.js.map +1 -1
- package/dist/cjs/react/web/ui/prebuilt/Account/address.js +1 -1
- package/dist/cjs/react/web/ui/prebuilt/Account/address.js.map +1 -1
- package/dist/cjs/react/web/ui/prebuilt/Account/avatar.js +1 -1
- package/dist/cjs/react/web/ui/prebuilt/Account/avatar.js.map +1 -1
- package/dist/cjs/react/web/ui/prebuilt/Account/balance.js +8 -90
- package/dist/cjs/react/web/ui/prebuilt/Account/balance.js.map +1 -1
- package/dist/cjs/react/web/ui/prebuilt/Account/blobbie.js +1 -1
- package/dist/cjs/react/web/ui/prebuilt/Account/blobbie.js.map +1 -1
- package/dist/cjs/react/web/ui/prebuilt/Account/name.js +1 -1
- package/dist/cjs/react/web/ui/prebuilt/Account/name.js.map +1 -1
- package/dist/cjs/react/web/ui/prebuilt/Wallet/icon.js +1 -23
- package/dist/cjs/react/web/ui/prebuilt/Wallet/icon.js.map +1 -1
- package/dist/cjs/react/web/ui/prebuilt/Wallet/name.js +2 -42
- package/dist/cjs/react/web/ui/prebuilt/Wallet/name.js.map +1 -1
- package/dist/cjs/utils/shortenLargeNumber.js +3 -0
- package/dist/cjs/utils/shortenLargeNumber.js.map +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/cjs/version.js.map +1 -1
- package/dist/cjs/wallets/manager/index.js +3 -1
- package/dist/cjs/wallets/manager/index.js.map +1 -1
- package/dist/esm/exports/react.js +3 -3
- package/dist/esm/exports/react.js.map +1 -1
- package/dist/esm/exports/react.native.js +15 -0
- package/dist/esm/exports/react.native.js.map +1 -1
- package/dist/esm/react/{web/ui/prebuilt/Account → core/account}/provider.js +1 -1
- package/dist/esm/react/core/account/provider.js.map +1 -0
- package/dist/esm/react/core/utils/account.js +99 -0
- package/dist/esm/react/core/utils/account.js.map +1 -0
- package/dist/esm/react/core/utils/walletIcon.js +21 -0
- package/dist/esm/react/core/utils/walletIcon.js.map +1 -1
- package/dist/esm/react/core/utils/walletname.js +40 -0
- package/dist/esm/react/core/utils/walletname.js.map +1 -0
- package/dist/esm/react/core/wallet/provider.js.map +1 -0
- package/dist/esm/react/native/ui/prebuilt/Account/address.js +47 -0
- package/dist/esm/react/native/ui/prebuilt/Account/address.js.map +1 -0
- package/dist/esm/react/native/ui/prebuilt/Account/avatar.js +148 -0
- package/dist/esm/react/native/ui/prebuilt/Account/avatar.js.map +1 -0
- package/dist/esm/react/native/ui/prebuilt/Account/balance.js +127 -0
- package/dist/esm/react/native/ui/prebuilt/Account/balance.js.map +1 -0
- package/dist/esm/react/native/ui/prebuilt/Account/blobbie.js +54 -0
- package/dist/esm/react/native/ui/prebuilt/Account/blobbie.js.map +1 -0
- package/dist/esm/react/native/ui/prebuilt/Account/name.js +110 -0
- package/dist/esm/react/native/ui/prebuilt/Account/name.js.map +1 -0
- package/dist/esm/react/native/ui/prebuilt/Wallet/icon.js +81 -0
- package/dist/esm/react/native/ui/prebuilt/Wallet/icon.js.map +1 -0
- package/dist/esm/react/native/ui/prebuilt/Wallet/name.js +63 -0
- package/dist/esm/react/native/ui/prebuilt/Wallet/name.js.map +1 -0
- package/dist/esm/react/web/ui/ConnectWallet/Blobbie.js +1 -17
- package/dist/esm/react/web/ui/ConnectWallet/Blobbie.js.map +1 -1
- package/dist/esm/react/web/ui/ConnectWallet/ConnectButton.js +1 -1
- package/dist/esm/react/web/ui/ConnectWallet/ConnectButton.js.map +1 -1
- package/dist/esm/react/web/ui/ConnectWallet/Details.js +3 -2
- package/dist/esm/react/web/ui/ConnectWallet/Details.js.map +1 -1
- package/dist/esm/react/web/ui/prebuilt/Account/address.js +1 -1
- package/dist/esm/react/web/ui/prebuilt/Account/address.js.map +1 -1
- package/dist/esm/react/web/ui/prebuilt/Account/avatar.js +1 -1
- package/dist/esm/react/web/ui/prebuilt/Account/avatar.js.map +1 -1
- package/dist/esm/react/web/ui/prebuilt/Account/balance.js +6 -85
- package/dist/esm/react/web/ui/prebuilt/Account/balance.js.map +1 -1
- package/dist/esm/react/web/ui/prebuilt/Account/blobbie.js +1 -1
- package/dist/esm/react/web/ui/prebuilt/Account/blobbie.js.map +1 -1
- package/dist/esm/react/web/ui/prebuilt/Account/name.js +1 -1
- package/dist/esm/react/web/ui/prebuilt/Account/name.js.map +1 -1
- package/dist/esm/react/web/ui/prebuilt/Wallet/icon.js +1 -22
- package/dist/esm/react/web/ui/prebuilt/Wallet/icon.js.map +1 -1
- package/dist/esm/react/web/ui/prebuilt/Wallet/name.js +1 -39
- package/dist/esm/react/web/ui/prebuilt/Wallet/name.js.map +1 -1
- package/dist/esm/utils/shortenLargeNumber.js +3 -0
- package/dist/esm/utils/shortenLargeNumber.js.map +1 -1
- package/dist/esm/version.js +1 -1
- package/dist/esm/version.js.map +1 -1
- package/dist/esm/wallets/manager/index.js +3 -1
- package/dist/esm/wallets/manager/index.js.map +1 -1
- package/dist/types/exports/react.d.ts +5 -4
- package/dist/types/exports/react.d.ts.map +1 -1
- package/dist/types/exports/react.native.d.ts +15 -0
- package/dist/types/exports/react.native.d.ts.map +1 -1
- package/dist/types/react/{web/ui/prebuilt/Account → core/account}/provider.d.ts +3 -4
- package/dist/types/react/core/account/provider.d.ts.map +1 -0
- package/dist/types/react/core/utils/account.d.ts +46 -0
- package/dist/types/react/core/utils/account.d.ts.map +1 -0
- package/dist/types/react/core/utils/walletIcon.d.ts +14 -0
- package/dist/types/react/core/utils/walletIcon.d.ts.map +1 -1
- package/dist/types/react/core/utils/walletname.d.ts +26 -0
- package/dist/types/react/core/utils/walletname.d.ts.map +1 -0
- package/dist/types/react/{web/ui/prebuilt/Wallet → core/wallet}/provider.d.ts +1 -1
- package/dist/types/react/core/wallet/provider.d.ts.map +1 -0
- package/dist/types/react/native/ui/prebuilt/Account/address.d.ts +54 -0
- package/dist/types/react/native/ui/prebuilt/Account/address.d.ts.map +1 -0
- package/dist/types/react/native/ui/prebuilt/Account/avatar.d.ts +141 -0
- package/dist/types/react/native/ui/prebuilt/Account/avatar.d.ts.map +1 -0
- package/dist/types/react/native/ui/prebuilt/Account/balance.d.ts +144 -0
- package/dist/types/react/native/ui/prebuilt/Account/balance.d.ts.map +1 -0
- package/dist/types/react/native/ui/prebuilt/Account/blobbie.d.ts +34 -0
- package/dist/types/react/native/ui/prebuilt/Account/blobbie.d.ts.map +1 -0
- package/dist/types/react/native/ui/prebuilt/Account/name.d.ts +118 -0
- package/dist/types/react/native/ui/prebuilt/Account/name.d.ts.map +1 -0
- package/dist/types/react/native/ui/prebuilt/Wallet/icon.d.ts +100 -0
- package/dist/types/react/native/ui/prebuilt/Wallet/icon.d.ts.map +1 -0
- package/dist/types/react/native/ui/prebuilt/Wallet/name.d.ts +94 -0
- package/dist/types/react/native/ui/prebuilt/Wallet/name.d.ts.map +1 -0
- package/dist/types/react/web/ui/ConnectWallet/Blobbie.d.ts +1 -1
- package/dist/types/react/web/ui/ConnectWallet/Blobbie.d.ts.map +1 -1
- package/dist/types/react/web/ui/ConnectWallet/ConnectButton.d.ts.map +1 -1
- package/dist/types/react/web/ui/ConnectWallet/Details.d.ts +1 -1
- package/dist/types/react/web/ui/ConnectWallet/Details.d.ts.map +1 -1
- package/dist/types/react/web/ui/prebuilt/Account/avatar.d.ts.map +1 -1
- package/dist/types/react/web/ui/prebuilt/Account/balance.d.ts +1 -42
- package/dist/types/react/web/ui/prebuilt/Account/balance.d.ts.map +1 -1
- package/dist/types/react/web/ui/prebuilt/Account/blobbie.d.ts.map +1 -1
- package/dist/types/react/web/ui/prebuilt/Wallet/icon.d.ts +2 -10
- package/dist/types/react/web/ui/prebuilt/Wallet/icon.d.ts.map +1 -1
- package/dist/types/react/web/ui/prebuilt/Wallet/name.d.ts +1 -18
- package/dist/types/react/web/ui/prebuilt/Wallet/name.d.ts.map +1 -1
- package/dist/types/utils/shortenLargeNumber.d.ts.map +1 -1
- package/dist/types/version.d.ts +1 -1
- package/dist/types/version.d.ts.map +1 -1
- package/dist/types/wallets/manager/index.d.ts +1 -0
- package/dist/types/wallets/manager/index.d.ts.map +1 -1
- package/package.json +4 -4
- package/src/exports/react.native.ts +47 -0
- package/src/exports/react.ts +5 -3
- package/src/react/{web/ui/prebuilt/Account → core/account}/provider.test.tsx +1 -1
- package/src/react/{web/ui/prebuilt/Account → core/account}/provider.tsx +3 -5
- package/src/react/core/utils/account.ts +146 -0
- package/src/react/core/utils/walletIcon.ts +28 -0
- package/src/react/core/utils/walletname.ts +53 -0
- package/src/react/{web/ui/prebuilt/Wallet → core/wallet}/provider.tsx +1 -1
- package/src/react/native/ui/prebuilt/Account/address.tsx +65 -0
- package/src/react/native/ui/prebuilt/Account/avatar.tsx +225 -0
- package/src/react/native/ui/prebuilt/Account/balance.tsx +221 -0
- package/src/react/native/ui/prebuilt/Account/blobbie.tsx +94 -0
- package/src/react/native/ui/prebuilt/Account/name.tsx +180 -0
- package/src/react/native/ui/prebuilt/Wallet/icon.tsx +124 -0
- package/src/react/native/ui/prebuilt/Wallet/name.tsx +112 -0
- package/src/react/web/ui/ConnectWallet/Blobbie.tsx +1 -18
- package/src/react/web/ui/ConnectWallet/ConnectButton.tsx +1 -1
- package/src/react/web/ui/ConnectWallet/Details.test.tsx +1 -1
- package/src/react/web/ui/ConnectWallet/Details.tsx +7 -7
- package/src/react/web/ui/prebuilt/Account/address.test.tsx +1 -1
- package/src/react/web/ui/prebuilt/Account/address.tsx +1 -1
- package/src/react/web/ui/prebuilt/Account/avatar.test.tsx +1 -1
- package/src/react/web/ui/prebuilt/Account/avatar.tsx +1 -2
- package/src/react/web/ui/prebuilt/Account/balance.test.tsx +7 -5
- package/src/react/web/ui/prebuilt/Account/balance.tsx +10 -130
- package/src/react/web/ui/prebuilt/Account/blobbie.tsx +1 -1
- package/src/react/web/ui/prebuilt/Account/name.test.tsx +1 -1
- package/src/react/web/ui/prebuilt/Account/name.tsx +1 -1
- package/src/react/web/ui/prebuilt/Wallet/icon.test.tsx +3 -2
- package/src/react/web/ui/prebuilt/Wallet/icon.tsx +6 -30
- package/src/react/web/ui/prebuilt/Wallet/name.test.tsx +6 -2
- package/src/react/web/ui/prebuilt/Wallet/name.tsx +2 -52
- package/src/utils/shortenLargeNumber.ts +3 -0
- package/src/version.ts +1 -1
- package/src/wallets/manager/index.ts +4 -1
- package/dist/cjs/react/web/ui/prebuilt/Account/provider.js.map +0 -1
- package/dist/cjs/react/web/ui/prebuilt/Wallet/provider.js.map +0 -1
- package/dist/esm/react/web/ui/prebuilt/Account/provider.js.map +0 -1
- package/dist/esm/react/web/ui/prebuilt/Wallet/provider.js.map +0 -1
- package/dist/types/react/web/ui/prebuilt/Account/provider.d.ts.map +0 -1
- package/dist/types/react/web/ui/prebuilt/Wallet/provider.d.ts.map +0 -1
- /package/dist/cjs/react/{web/ui/prebuilt/Wallet → core/wallet}/provider.js +0 -0
- /package/dist/esm/react/{web/ui/prebuilt/Wallet → core/wallet}/provider.js +0 -0
- /package/src/react/{web/ui/prebuilt/Wallet → core/wallet}/provider.test.tsx +0 -0
@@ -0,0 +1,94 @@
|
|
1
|
+
import type { UseQueryOptions } from "@tanstack/react-query";
|
2
|
+
import { type TextProps } from "react-native";
|
3
|
+
/**
|
4
|
+
* Props for the WalletName component
|
5
|
+
* @component
|
6
|
+
* @wallet
|
7
|
+
*/
|
8
|
+
export interface WalletNameProps extends Omit<TextProps, "children"> {
|
9
|
+
/**
|
10
|
+
* This component will be shown while the name of the wallet name is being fetched
|
11
|
+
* If not passed, the component will return `null`.
|
12
|
+
*
|
13
|
+
* You can/should pass a loading sign or spinner to this prop.
|
14
|
+
* @example
|
15
|
+
* ```tsx
|
16
|
+
* <WalletName loadingComponent={<Spinner />} />
|
17
|
+
* ```
|
18
|
+
*/
|
19
|
+
loadingComponent?: React.ComponentType;
|
20
|
+
/**
|
21
|
+
* This component will be shown if the name fails to be retreived
|
22
|
+
* If not passed, the component will return `null`.
|
23
|
+
*
|
24
|
+
* You can/should pass a descriptive text/component to this prop, indicating that the
|
25
|
+
* name was not fetched succesfully
|
26
|
+
* @example
|
27
|
+
* ```tsx
|
28
|
+
* <WalletName fallbackComponent={<span>Failed to load</span>}
|
29
|
+
* />
|
30
|
+
* ```
|
31
|
+
*/
|
32
|
+
fallbackComponent?: React.ComponentType;
|
33
|
+
/**
|
34
|
+
* Optional `useQuery` params
|
35
|
+
*/
|
36
|
+
queryOptions?: Omit<UseQueryOptions<string>, "queryFn" | "queryKey">;
|
37
|
+
/**
|
38
|
+
* A function to format the name's display value
|
39
|
+
* ```tsx
|
40
|
+
* <WalletName formatFn={(str: string) => doSomething()} />
|
41
|
+
* ```
|
42
|
+
*/
|
43
|
+
formatFn?: (str: string) => string;
|
44
|
+
}
|
45
|
+
/**
|
46
|
+
* This component fetches then shows the name of a wallet.
|
47
|
+
* It inherits all the attributes of a HTML <span> component, hence you can style it just like how you would style a normal <span>
|
48
|
+
*
|
49
|
+
* @example
|
50
|
+
* ### Basic usage
|
51
|
+
* ```tsx
|
52
|
+
* import { WalletProvider, WalletName } from "thirdweb/react";
|
53
|
+
*
|
54
|
+
* <WalletProvider id="io.metamask">
|
55
|
+
* <WalletName />
|
56
|
+
* </WalletProvider>
|
57
|
+
* ```
|
58
|
+
* Result:
|
59
|
+
* ```html
|
60
|
+
* <span>MetaMask</span>
|
61
|
+
* ```
|
62
|
+
*
|
63
|
+
* ### Show a loading sign when the name is being fetched
|
64
|
+
* ```tsx
|
65
|
+
* import { WalletProvider, WalletName } from "thirdweb/react";
|
66
|
+
*
|
67
|
+
* <WalletProvider {...props}>
|
68
|
+
* <WalletName loadingComponent={<Spinner />} />
|
69
|
+
* </WalletProvider>
|
70
|
+
* ```
|
71
|
+
*
|
72
|
+
* ### Fallback to something when the name fails to resolve
|
73
|
+
* ```tsx
|
74
|
+
* <WalletProvider {...props}>
|
75
|
+
* <WalletName fallbackComponent={<span>Failed to load</span>} />
|
76
|
+
* </WalletProvider>
|
77
|
+
* ```
|
78
|
+
*
|
79
|
+
* ### Custom query options for useQuery
|
80
|
+
* This component uses `@tanstack-query`'s useQuery internally.
|
81
|
+
* You can use the `queryOptions` prop for more fine-grained control
|
82
|
+
* ```tsx
|
83
|
+
* <WalletName
|
84
|
+
* queryOptions={{
|
85
|
+
* enabled: isEnabled,
|
86
|
+
* retry: 4,
|
87
|
+
* }}
|
88
|
+
* />
|
89
|
+
* @component
|
90
|
+
* @beta
|
91
|
+
* @wallet
|
92
|
+
*/
|
93
|
+
export declare function WalletName({ loadingComponent, fallbackComponent, queryOptions, formatFn, ...restProps }: WalletNameProps): import("react/jsx-runtime.js").JSX.Element | import("react").ComponentType<{}> | null;
|
94
|
+
//# sourceMappingURL=name.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"name.d.ts","sourceRoot":"","sources":["../../../../../../../src/react/native/ui/prebuilt/Wallet/name.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAC7D,OAAO,EAAQ,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AAEpD;;;;GAIG;AACH,MAAM,WAAW,eAAgB,SAAQ,IAAI,CAAC,SAAS,EAAE,UAAU,CAAC;IAClE;;;;;;;;;OASG;IACH,gBAAgB,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;IACvC;;;;;;;;;;;OAWG;IACH,iBAAiB,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;IACxC;;OAEG;IACH,YAAY,CAAC,EAAE,IAAI,CAAC,eAAe,CAAC,MAAM,CAAC,EAAE,SAAS,GAAG,UAAU,CAAC,CAAC;IACrE;;;;;OAKG;IACH,QAAQ,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,MAAM,CAAC;CACpC;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+CG;AACH,wBAAgB,UAAU,CAAC,EACzB,gBAAgB,EAChB,iBAAiB,EACjB,YAAY,EACZ,QAAQ,EACR,GAAG,SAAS,EACb,EAAE,eAAe,yFASjB"}
|
@@ -24,5 +24,5 @@ export type BlobbieProps = {
|
|
24
24
|
* <Blobbie address="0x...." className="w-10 h-10" />
|
25
25
|
* ```
|
26
26
|
*/
|
27
|
-
export declare function Blobbie(props: BlobbieProps): import("react/jsx-runtime").JSX.Element;
|
27
|
+
export declare function Blobbie(props: BlobbieProps): import("react/jsx-runtime.js").JSX.Element;
|
28
28
|
//# sourceMappingURL=Blobbie.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"Blobbie.d.ts","sourceRoot":"","sources":["../../../../../../src/react/web/ui/ConnectWallet/Blobbie.tsx"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"Blobbie.d.ts","sourceRoot":"","sources":["../../../../../../src/react/web/ui/ConnectWallet/Blobbie.tsx"],"names":[],"mappings":"AAKA;;;GAGG;AACH,MAAM,MAAM,YAAY,GAAG;IACzB,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,IAAI,CAAC,KAAK,CAAC,aAAa,EAAE,iBAAiB,CAAC,CAAC;IACrD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,IAAI,CAAC,EAAE,MAAM,CAAC;CACf,CAAC;AAEF;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,OAAO,CAAC,KAAK,EAAE,YAAY,8CA0B1C"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"ConnectButton.d.ts","sourceRoot":"","sources":["../../../../../../src/react/web/ui/ConnectWallet/ConnectButton.tsx"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"ConnectButton.d.ts","sourceRoot":"","sources":["../../../../../../src/react/web/ui/ConnectWallet/ConnectButton.tsx"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,sDAAsD,CAAC;AA2B/F;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2PG;AACH,wBAAgB,aAAa,CAAC,KAAK,EAAE,kBAAkB,8CA2GtD"}
|
@@ -8,8 +8,8 @@ import { type AppMetadata } from "../../../../wallets/types.js";
|
|
8
8
|
import type { WalletId } from "../../../../wallets/wallet-types.js";
|
9
9
|
import { type Theme } from "../../../core/design-system/index.js";
|
10
10
|
import type { ConnectButtonProps, ConnectButton_connectModalOptions, ConnectButton_detailsButtonOptions, ConnectButton_detailsModalOptions, PayUIOptions } from "../../../core/hooks/connection/ConnectButtonProps.js";
|
11
|
+
import { type AccountBalanceInfo } from "../../../core/utils/account.js";
|
11
12
|
import type { SupportedNFTs, SupportedTokens } from "../../../core/utils/defaultTokens.js";
|
12
|
-
import { type AccountBalanceInfo } from "../prebuilt/Account/balance.js";
|
13
13
|
import type { LocaleId } from "../types.js";
|
14
14
|
import { type NetworkSelectorProps } from "./NetworkSelector.js";
|
15
15
|
import type { ConnectLocale } from "./locale/types.js";
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"Details.d.ts","sourceRoot":"","sources":["../../../../../../src/react/web/ui/ConnectWallet/Details.tsx"],"names":[],"mappings":"AAWA,OAAO,EACL,KAAK,QAAQ,EACb,KAAK,GAAG,EACR,KAAK,cAAc,EAKpB,MAAM,OAAO,CAAC;AAEf,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,6BAA6B,CAAC;AACzD,OAAO,KAAK,EAA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":["../../../../../../../src/react/web/ui/prebuilt/Account/avatar.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,eAAe,EAAY,MAAM,uBAAuB,CAAC;AACvE,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAEjC,OAAO,EACL,KAAK,kBAAkB,EAExB,MAAM,+CAA+C,CAAC;AAEvD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,gCAAgC,CAAC;
|
1
|
+
{"version":3,"file":"avatar.d.ts","sourceRoot":"","sources":["../../../../../../../src/react/web/ui/prebuilt/Account/avatar.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,eAAe,EAAY,MAAM,uBAAuB,CAAC;AACvE,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAEjC,OAAO,EACL,KAAK,kBAAkB,EAExB,MAAM,+CAA+C,CAAC;AAEvD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,gCAAgC,CAAC;AAGpE;;;;GAIG;AACH,MAAM,WAAW,kBACf,SAAQ,IAAI,CAAC,KAAK,CAAC,iBAAiB,CAAC,gBAAgB,CAAC,EAAE,KAAK,CAAC,EAC5D,IAAI,CAAC,kBAAkB,EAAE,QAAQ,GAAG,SAAS,CAAC;IAChD;;;;;;;;;;;;;OAaG;IACH,UAAU,CAAC,EAAE,aAAa,CAAC,MAAM,CAAC,CAAC;IAEnC;;;;;;;;;OASG;IACH,gBAAgB,CAAC,EAAE,GAAG,CAAC,OAAO,CAAC;IAC/B;;;;;;;;;;;OAWG;IACH,iBAAiB,CAAC,EAAE,GAAG,CAAC,OAAO,CAAC;IAEhC;;OAEG;IACH,YAAY,CAAC,EAAE,IAAI,CAAC,eAAe,CAAC,MAAM,CAAC,EAAE,SAAS,GAAG,UAAU,CAAC,CAAC;CACtE;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoFG;AACH,wBAAgB,aAAa,CAAC,EAC5B,UAAU,EACV,eAAe,EACf,aAAa,EACb,gBAAgB,EAChB,iBAAiB,EACjB,YAAY,EACZ,GAAG,SAAS,EACb,EAAE,kBAAkB,qDA+DpB"}
|
@@ -1,24 +1,9 @@
|
|
1
1
|
import { type UseQueryOptions } from "@tanstack/react-query";
|
2
|
-
import type { Address } from "abitype";
|
3
2
|
import type React from "react";
|
4
3
|
import type { JSX } from "react";
|
5
4
|
import type { Chain } from "../../../../../chains/types.js";
|
6
|
-
import type { ThirdwebClient } from "../../../../../client/client.js";
|
7
5
|
import type { SupportedFiatCurrency } from "../../../../../pay/convert/type.js";
|
8
|
-
|
9
|
-
* @component
|
10
|
-
* @wallet
|
11
|
-
*/
|
12
|
-
export type AccountBalanceInfo = {
|
13
|
-
/**
|
14
|
-
* Represents either token balance or fiat balance.
|
15
|
-
*/
|
16
|
-
balance: number;
|
17
|
-
/**
|
18
|
-
* Represents either token symbol or fiat symbol
|
19
|
-
*/
|
20
|
-
symbol: string;
|
21
|
-
};
|
6
|
+
import { type AccountBalanceInfo } from "../../../../core/utils/account.js";
|
22
7
|
/**
|
23
8
|
* Props for the AccountBalance component
|
24
9
|
* @component
|
@@ -157,30 +142,4 @@ export interface AccountBalanceProps extends Omit<React.HTMLAttributes<HTMLSpanE
|
|
157
142
|
* @beta
|
158
143
|
*/
|
159
144
|
export declare function AccountBalance({ chain, tokenAddress, loadingComponent, fallbackComponent, queryOptions, formatFn, showBalanceInFiat, ...restProps }: AccountBalanceProps): import("react/jsx-runtime.js").JSX.Element | null;
|
160
|
-
/**
|
161
|
-
* @internal Exported for tests
|
162
|
-
*/
|
163
|
-
export declare function loadAccountBalance(props: {
|
164
|
-
chain?: Chain;
|
165
|
-
client: ThirdwebClient;
|
166
|
-
address: Address;
|
167
|
-
tokenAddress?: Address;
|
168
|
-
showBalanceInFiat?: SupportedFiatCurrency;
|
169
|
-
}): Promise<AccountBalanceInfo>;
|
170
|
-
/**
|
171
|
-
* Format the display balance for both crypto and fiat, in the Details button and Modal
|
172
|
-
* If both crypto balance and fiat balance exist, we have to keep the string very short to avoid UI issues.
|
173
|
-
* @internal
|
174
|
-
* Used internally for the Details button and the Details Modal
|
175
|
-
*/
|
176
|
-
export declare function formatAccountTokenBalance(props: AccountBalanceInfo & {
|
177
|
-
decimals: number;
|
178
|
-
}): string;
|
179
|
-
/**
|
180
|
-
* Used internally for the Details button and Details Modal
|
181
|
-
* @internal
|
182
|
-
*/
|
183
|
-
export declare function formatAccountFiatBalance(props: AccountBalanceInfo & {
|
184
|
-
decimals: number;
|
185
|
-
}): string;
|
186
145
|
//# sourceMappingURL=balance.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"balance.d.ts","sourceRoot":"","sources":["../../../../../../../src/react/web/ui/prebuilt/Account/balance.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,eAAe,EAAY,MAAM,uBAAuB,CAAC;AACvE,OAAO,KAAK,
|
1
|
+
{"version":3,"file":"balance.d.ts","sourceRoot":"","sources":["../../../../../../../src/react/web/ui/prebuilt/Account/balance.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,eAAe,EAAY,MAAM,uBAAuB,CAAC;AACvE,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AACjC,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,gCAAgC,CAAC;AAC5D,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,oCAAoC,CAAC;AAIhF,OAAO,EACL,KAAK,kBAAkB,EAGxB,MAAM,mCAAmC,CAAC;AAG3C;;;;GAIG;AACH,MAAM,WAAW,mBACf,SAAQ,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,eAAe,CAAC,EAAE,UAAU,CAAC;IAC/D;;;OAGG;IACH,KAAK,CAAC,EAAE,KAAK,CAAC;IACd;;;OAGG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB;;;;OAIG;IACH,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,kBAAkB,KAAK,MAAM,CAAC;IACjD;;;;;;;;;;;;OAYG;IACH,gBAAgB,CAAC,EAAE,GAAG,CAAC,OAAO,CAAC;IAC/B;;;;;;;;;;;;;OAaG;IACH,iBAAiB,CAAC,EAAE,GAAG,CAAC,OAAO,CAAC;IAChC;;OAEG;IACH,YAAY,CAAC,EAAE,IAAI,CACjB,eAAe,CAAC,kBAAkB,CAAC,EACnC,SAAS,GAAG,UAAU,CACvB,CAAC;IAEF;;OAEG;IACH,iBAAiB,CAAC,EAAE,qBAAqB,CAAC;CAC3C;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4EG;AACH,wBAAgB,cAAc,CAAC,EAC7B,KAAK,EACL,YAAY,EACZ,gBAAgB,EAChB,iBAAiB,EACjB,YAAY,EACZ,QAAQ,EACR,iBAAiB,EACjB,GAAG,SAAS,EACb,EAAE,mBAAmB,qDAqDrB"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"blobbie.d.ts","sourceRoot":"","sources":["../../../../../../../src/react/web/ui/prebuilt/Account/blobbie.tsx"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"blobbie.d.ts","sourceRoot":"","sources":["../../../../../../../src/react/web/ui/prebuilt/Account/blobbie.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAW,KAAK,YAAY,EAAE,MAAM,gCAAgC,CAAC;AAE5E;;;;;GAKG;AACH,wBAAgB,cAAc,CAAC,KAAK,EAAE,IAAI,CAAC,YAAY,EAAE,SAAS,CAAC,8CAGlE"}
|
@@ -1,7 +1,6 @@
|
|
1
|
-
import {
|
1
|
+
import type { UseQueryOptions } from "@tanstack/react-query";
|
2
2
|
import type { JSX } from "react";
|
3
3
|
import type { AuthOption } from "../../../../../wallets/types.js";
|
4
|
-
import type { WalletId } from "../../../../../wallets/wallet-types.js";
|
5
4
|
export interface WalletIconProps extends Omit<React.ImgHTMLAttributes<HTMLImageElement>, "src"> {
|
6
5
|
/**
|
7
6
|
* This component will be shown while the icon of the wallet is being fetched
|
@@ -73,13 +72,7 @@ export interface WalletIconProps extends Omit<React.ImgHTMLAttributes<HTMLImageE
|
|
73
72
|
* @beta
|
74
73
|
*/
|
75
74
|
export declare function WalletIcon({ loadingComponent, fallbackComponent, queryOptions, ...restProps }: WalletIconProps): import("react/jsx-runtime.js").JSX.Element | null;
|
76
|
-
|
77
|
-
* @internal Exported for tests only
|
78
|
-
*/
|
79
|
-
export declare function fetchWalletImage(props: {
|
80
|
-
id: WalletId;
|
81
|
-
}): Promise<string>;
|
82
|
-
interface SocialIconProps extends Omit<React.ImgHTMLAttributes<HTMLImageElement>, "src"> {
|
75
|
+
export interface SocialIconProps extends Omit<React.ImgHTMLAttributes<HTMLImageElement>, "src"> {
|
83
76
|
provider: AuthOption | string;
|
84
77
|
}
|
85
78
|
/**
|
@@ -103,5 +96,4 @@ interface SocialIconProps extends Omit<React.ImgHTMLAttributes<HTMLImageElement>
|
|
103
96
|
* @beta
|
104
97
|
*/
|
105
98
|
export declare function SocialIcon({ provider, ...restProps }: SocialIconProps): import("react/jsx-runtime.js").JSX.Element;
|
106
|
-
export {};
|
107
99
|
//# sourceMappingURL=icon.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"icon.d.ts","sourceRoot":"","sources":["../../../../../../../src/react/web/ui/prebuilt/Wallet/icon.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,
|
1
|
+
{"version":3,"file":"icon.d.ts","sourceRoot":"","sources":["../../../../../../../src/react/web/ui/prebuilt/Wallet/icon.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAC7D,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AACjC,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iCAAiC,CAAC;AAMlE,MAAM,WAAW,eACf,SAAQ,IAAI,CAAC,KAAK,CAAC,iBAAiB,CAAC,gBAAgB,CAAC,EAAE,KAAK,CAAC;IAC9D;;;;;;;;;OASG;IACH,gBAAgB,CAAC,EAAE,GAAG,CAAC,OAAO,CAAC;IAC/B;;;;;;;;;;;OAWG;IACH,iBAAiB,CAAC,EAAE,GAAG,CAAC,OAAO,CAAC;IAChC;;OAEG;IACH,YAAY,CAAC,EAAE,IAAI,CAAC,eAAe,CAAC,MAAM,CAAC,EAAE,SAAS,GAAG,UAAU,CAAC,CAAC;CACtE;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuCG;AACH,wBAAgB,UAAU,CAAC,EACzB,gBAAgB,EAChB,iBAAiB,EACjB,YAAY,EACZ,GAAG,SAAS,EACb,EAAE,eAAe,qDASjB;AAED,MAAM,WAAW,eACf,SAAQ,IAAI,CAAC,KAAK,CAAC,iBAAiB,CAAC,gBAAgB,CAAC,EAAE,KAAK,CAAC;IAC9D,QAAQ,EAAE,UAAU,GAAG,MAAM,CAAC;CAC/B;AAED;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAgB,UAAU,CAAC,EAAE,QAAQ,EAAE,GAAG,SAAS,EAAE,EAAE,eAAe,8CAGrE"}
|
@@ -1,6 +1,5 @@
|
|
1
|
-
import {
|
1
|
+
import type { UseQueryOptions } from "@tanstack/react-query";
|
2
2
|
import type { JSX } from "react";
|
3
|
-
import type { WalletId } from "../../../../../wallets/wallet-types.js";
|
4
3
|
/**
|
5
4
|
* Props for the WalletName component
|
6
5
|
* @component
|
@@ -92,20 +91,4 @@ export interface WalletNameProps extends Omit<React.HTMLAttributes<HTMLSpanEleme
|
|
92
91
|
* @wallet
|
93
92
|
*/
|
94
93
|
export declare function WalletName({ loadingComponent, fallbackComponent, queryOptions, formatFn, ...restProps }: WalletNameProps): import("react/jsx-runtime.js").JSX.Element | null;
|
95
|
-
/**
|
96
|
-
* @internal Exported for tests only
|
97
|
-
*/
|
98
|
-
export declare function getQueryKeys(props: {
|
99
|
-
id: WalletId;
|
100
|
-
formatFn?: (str: string) => string;
|
101
|
-
}): readonly ["walletName", WalletId] | readonly ["walletName", WalletId, {
|
102
|
-
readonly resolver: string;
|
103
|
-
}];
|
104
|
-
/**
|
105
|
-
* @internal Exported for tests only
|
106
|
-
*/
|
107
|
-
export declare function fetchWalletName(props: {
|
108
|
-
id: WalletId;
|
109
|
-
formatFn?: (str: string) => string;
|
110
|
-
}): Promise<string>;
|
111
94
|
//# sourceMappingURL=name.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"name.d.ts","sourceRoot":"","sources":["../../../../../../../src/react/web/ui/prebuilt/Wallet/name.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,
|
1
|
+
{"version":3,"file":"name.d.ts","sourceRoot":"","sources":["../../../../../../../src/react/web/ui/prebuilt/Wallet/name.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAC7D,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAGjC;;;;GAIG;AACH,MAAM,WAAW,eACf,SAAQ,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,eAAe,CAAC,EAAE,UAAU,CAAC;IAC/D;;;;;;;;;OASG;IACH,gBAAgB,CAAC,EAAE,GAAG,CAAC,OAAO,CAAC;IAC/B;;;;;;;;;;;OAWG;IACH,iBAAiB,CAAC,EAAE,GAAG,CAAC,OAAO,CAAC;IAChC;;OAEG;IACH,YAAY,CAAC,EAAE,IAAI,CAAC,eAAe,CAAC,MAAM,CAAC,EAAE,SAAS,GAAG,UAAU,CAAC,CAAC;IACrE;;;;;OAKG;IACH,QAAQ,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,MAAM,CAAC;CACpC;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+CG;AACH,wBAAgB,UAAU,CAAC,EACzB,gBAAgB,EAChB,iBAAiB,EACjB,YAAY,EACZ,QAAQ,EACR,GAAG,SAAS,EACb,EAAE,eAAe,qDASjB"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"shortenLargeNumber.d.ts","sourceRoot":"","sources":["../../../src/utils/shortenLargeNumber.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AACH,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,MAAM,
|
1
|
+
{"version":3,"file":"shortenLargeNumber.d.ts","sourceRoot":"","sources":["../../../src/utils/shortenLargeNumber.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AACH,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,MAAM,UAiB/C"}
|
package/dist/types/version.d.ts
CHANGED
@@ -1,2 +1,2 @@
|
|
1
|
-
export declare const version = "5.
|
1
|
+
export declare const version = "5.87.1";
|
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,
|
1
|
+
{"version":3,"file":"version.d.ts","sourceRoot":"","sources":["../../src/version.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,OAAO,WAAW,CAAC"}
|
@@ -9,6 +9,7 @@ export type ConnectionManager = ReturnType<typeof createConnectionManager>;
|
|
9
9
|
export type ConnectManagerOptions = {
|
10
10
|
client: ThirdwebClient;
|
11
11
|
accountAbstraction?: SmartWalletOptions;
|
12
|
+
setWalletAsActive?: boolean;
|
12
13
|
onConnect?: (wallet: Wallet) => void;
|
13
14
|
};
|
14
15
|
/**
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/wallets/manager/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,uBAAuB,CAAC;AAEnD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAM7D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,qCAAqC,CAAC;AAExE,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,yBAAyB,CAAC;AAE/D,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AAC5D,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAGnD,MAAM,MAAM,gBAAgB,GAAG,WAAW,GAAG,cAAc,GAAG,YAAY,CAAC;AAM3E,MAAM,MAAM,iBAAiB,GAAG,UAAU,CAAC,OAAO,uBAAuB,CAAC,CAAC;AAC3E,MAAM,MAAM,qBAAqB,GAAG;IAClC,MAAM,EAAE,cAAc,CAAC;IACvB,kBAAkB,CAAC,EAAE,kBAAkB,CAAC;IACxC,SAAS,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,CAAC;CACtC,CAAC;AAEF;;;;;;;;;GASG;AACH,wBAAgB,uBAAuB,CAAC,OAAO,EAAE,YAAY;;;;iCA6CvB,MAAM;+BA+BR,MAAM;
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/wallets/manager/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,uBAAuB,CAAC;AAEnD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAM7D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,qCAAqC,CAAC;AAExE,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,yBAAyB,CAAC;AAE/D,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,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"5.
|
3
|
+
"version": "5.87.1",
|
4
4
|
"repository": {
|
5
5
|
"type": "git",
|
6
6
|
"url": "git+https://github.com/thirdweb-dev/js.git#main"
|
@@ -218,7 +218,7 @@
|
|
218
218
|
"@radix-ui/react-focus-scope": "1.1.1",
|
219
219
|
"@radix-ui/react-icons": "1.3.2",
|
220
220
|
"@radix-ui/react-tooltip": "1.1.7",
|
221
|
-
"@tanstack/react-query": "5.65.
|
221
|
+
"@tanstack/react-query": "5.65.1",
|
222
222
|
"@walletconnect/ethereum-provider": "2.17.5",
|
223
223
|
"@walletconnect/sign-client": "2.17.5",
|
224
224
|
"abitype": "1.0.8",
|
@@ -228,7 +228,7 @@
|
|
228
228
|
"mipd": "0.0.7",
|
229
229
|
"ox": "0.6.9",
|
230
230
|
"uqr": "0.1.2",
|
231
|
-
"viem": "2.22.
|
231
|
+
"viem": "2.22.17"
|
232
232
|
},
|
233
233
|
"peerDependencies": {
|
234
234
|
"@aws-sdk/client-lambda": "^3",
|
@@ -333,7 +333,7 @@
|
|
333
333
|
"expo-linking": "7.0.3",
|
334
334
|
"expo-web-browser": "14.0.1",
|
335
335
|
"happy-dom": "16.7.3",
|
336
|
-
"knip": "5.43.
|
336
|
+
"knip": "5.43.6",
|
337
337
|
"msw": "2.7.0",
|
338
338
|
"prettier": "3.3.3",
|
339
339
|
"react": "19.0.0",
|
@@ -114,3 +114,50 @@ export type {
|
|
114
114
|
FarcasterProfile,
|
115
115
|
LensProfile,
|
116
116
|
} from "../social/types.js";
|
117
|
+
|
118
|
+
/**
|
119
|
+
* Account
|
120
|
+
*/
|
121
|
+
export {
|
122
|
+
Blobbie,
|
123
|
+
AccountBlobbie,
|
124
|
+
type BlobbieProps,
|
125
|
+
} from "../react/native/ui/prebuilt/Account/blobbie.js";
|
126
|
+
export {
|
127
|
+
AccountProvider,
|
128
|
+
type AccountProviderProps,
|
129
|
+
} from "../react/core/account/provider.js";
|
130
|
+
export {
|
131
|
+
AccountBalance,
|
132
|
+
type AccountBalanceProps,
|
133
|
+
} from "../react/native/ui/prebuilt/Account/balance.js";
|
134
|
+
export {
|
135
|
+
AccountAddress,
|
136
|
+
type AccountAddressProps,
|
137
|
+
} from "../react/native/ui/prebuilt/Account/address.js";
|
138
|
+
export {
|
139
|
+
AccountName,
|
140
|
+
type AccountNameProps,
|
141
|
+
} from "../react/native/ui/prebuilt/Account/name.js";
|
142
|
+
export {
|
143
|
+
AccountAvatar,
|
144
|
+
type AccountAvatarProps,
|
145
|
+
} from "../react/native/ui/prebuilt/Account/avatar.js";
|
146
|
+
|
147
|
+
/**
|
148
|
+
* Wallet
|
149
|
+
*/
|
150
|
+
export {
|
151
|
+
WalletProvider,
|
152
|
+
type WalletProviderProps,
|
153
|
+
} from "../react/core/wallet/provider.js";
|
154
|
+
export {
|
155
|
+
WalletIcon,
|
156
|
+
SocialIcon,
|
157
|
+
type WalletIconProps,
|
158
|
+
type SocialIconProps,
|
159
|
+
} from "../react/native/ui/prebuilt/Wallet/icon.js";
|
160
|
+
export {
|
161
|
+
WalletName,
|
162
|
+
type WalletNameProps,
|
163
|
+
} from "../react/native/ui/prebuilt/Wallet/name.js";
|
package/src/exports/react.ts
CHANGED
@@ -223,8 +223,8 @@ export {
|
|
223
223
|
export {
|
224
224
|
AccountBalance,
|
225
225
|
type AccountBalanceProps,
|
226
|
-
type AccountBalanceInfo,
|
227
226
|
} from "../react/web/ui/prebuilt/Account/balance.js";
|
227
|
+
export type { AccountBalanceInfo } from "../react/core/utils/account.js";
|
228
228
|
export {
|
229
229
|
AccountName,
|
230
230
|
type AccountNameProps,
|
@@ -233,7 +233,7 @@ export { AccountBlobbie } from "../react/web/ui/prebuilt/Account/blobbie.js";
|
|
233
233
|
export {
|
234
234
|
AccountProvider,
|
235
235
|
type AccountProviderProps,
|
236
|
-
} from "../react/
|
236
|
+
} from "../react/core/account/provider.js";
|
237
237
|
export {
|
238
238
|
AccountAvatar,
|
239
239
|
type AccountAvatarProps,
|
@@ -278,9 +278,11 @@ export { getLastAuthProvider } from "../react/web/utils/storage.js";
|
|
278
278
|
export {
|
279
279
|
WalletProvider,
|
280
280
|
type WalletProviderProps,
|
281
|
-
} from "../react/
|
281
|
+
} from "../react/core/wallet/provider.js";
|
282
282
|
export {
|
283
283
|
WalletIcon,
|
284
|
+
SocialIcon,
|
285
|
+
type SocialIconProps,
|
284
286
|
type WalletIconProps,
|
285
287
|
} from "../react/web/ui/prebuilt/Wallet/icon.js";
|
286
288
|
export {
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import { describe, expect, it } from "vitest";
|
2
2
|
import { render, screen } from "~test/react-render.js";
|
3
3
|
import { TEST_CLIENT } from "~test/test-clients.js";
|
4
|
-
import { AccountAddress } from "
|
4
|
+
import { AccountAddress } from "../../web/ui/prebuilt/Account/address.js";
|
5
5
|
import { AccountProvider } from "./provider.js";
|
6
6
|
|
7
7
|
describe.runIf(process.env.TW_SECRET_KEY)("AccountProvider component", () => {
|
@@ -1,10 +1,8 @@
|
|
1
1
|
"use client";
|
2
2
|
|
3
|
-
import type { Address } from "abitype";
|
4
3
|
import type React from "react";
|
5
4
|
import { createContext, useContext } from "react";
|
6
|
-
import type { ThirdwebClient } from "
|
7
|
-
|
5
|
+
import type { ThirdwebClient } from "../../../client/client.js";
|
8
6
|
/**
|
9
7
|
* Props for the <AccountProvider /> component
|
10
8
|
* @component
|
@@ -14,7 +12,7 @@ export type AccountProviderProps = {
|
|
14
12
|
/**
|
15
13
|
* The user's wallet address
|
16
14
|
*/
|
17
|
-
address:
|
15
|
+
address: string;
|
18
16
|
/**
|
19
17
|
* thirdweb Client
|
20
18
|
*/
|
@@ -35,7 +33,7 @@ const AccountProviderContext = /* @__PURE__ */ createContext<
|
|
35
33
|
* ```tsx
|
36
34
|
* import { AccountProvider, AccountAvatar, AccountName, AccountAddress } from "thirdweb/react";
|
37
35
|
*
|
38
|
-
* <AccountProvider>
|
36
|
+
* <AccountProvider address="0x..." client={client}>
|
39
37
|
* <AccountAvatar />
|
40
38
|
* <AccountName />
|
41
39
|
* <AccountAddress />
|