thirdweb 5.83.2-nightly-332536bdee05b6fb3b36d33761381826279b48f6-20250113000321 → 5.84.0-nightly-0fdfb8aa778a344aa847503f668e48feb5f72548-20250115000312
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/auth/is-erc6492-signature.js +2 -2
- package/dist/cjs/auth/is-erc6492-signature.js.map +1 -1
- package/dist/cjs/auth/parse-erc6492-signature.js +10 -4
- package/dist/cjs/auth/parse-erc6492-signature.js.map +1 -1
- package/dist/cjs/auth/verify-hash.js +12 -11
- package/dist/cjs/auth/verify-hash.js.map +1 -1
- package/dist/cjs/auth/verify-signature.js +13 -5
- package/dist/cjs/auth/verify-signature.js.map +1 -1
- package/dist/cjs/auth/verify-typed-data.js +2 -2
- package/dist/cjs/auth/verify-typed-data.js.map +1 -1
- package/dist/cjs/contract/deployment/utils/create-2-factory.js +4 -3
- package/dist/cjs/contract/deployment/utils/create-2-factory.js.map +1 -1
- package/dist/cjs/contract/verification/constructor-params.js +5 -12
- package/dist/cjs/contract/verification/constructor-params.js.map +1 -1
- package/dist/cjs/exports/utils.js +9 -6
- package/dist/cjs/exports/utils.js.map +1 -1
- package/dist/cjs/exports/wallets.js +3 -1
- package/dist/cjs/exports/wallets.js.map +1 -1
- package/dist/cjs/extensions/ens/resolve-l2-name.js +10 -3
- package/dist/cjs/extensions/ens/resolve-l2-name.js.map +1 -1
- package/dist/cjs/extensions/erc1155/read/getNFTs.js +2 -2
- package/dist/cjs/extensions/erc1155/read/getNFTs.js.map +1 -1
- package/dist/cjs/extensions/erc1155/write/mintTo.js +2 -2
- package/dist/cjs/extensions/erc1155/write/mintTo.js.map +1 -1
- package/dist/cjs/extensions/erc1155/write/mintToBatch.js +2 -2
- package/dist/cjs/extensions/erc1155/write/mintToBatch.js.map +1 -1
- package/dist/cjs/extensions/erc1155/write/sigMint.js +2 -2
- package/dist/cjs/extensions/erc1155/write/sigMint.js.map +1 -1
- package/dist/cjs/extensions/modules/ClaimableERC1155/setClaimConditions.js +3 -2
- package/dist/cjs/extensions/modules/ClaimableERC1155/setClaimConditions.js.map +1 -1
- package/dist/cjs/extensions/modules/MintableERC1155/mintWithRole.js +2 -2
- package/dist/cjs/extensions/modules/MintableERC1155/mintWithRole.js.map +1 -1
- package/dist/cjs/extensions/modules/MintableERC1155/mintWithSignature.js +2 -2
- package/dist/cjs/extensions/modules/MintableERC1155/mintWithSignature.js.map +1 -1
- package/dist/cjs/react/core/hooks/wallets/useAutoConnect.js +10 -131
- package/dist/cjs/react/core/hooks/wallets/useAutoConnect.js.map +1 -1
- package/dist/cjs/react/core/hooks/wallets/useSendToken.js +2 -1
- package/dist/cjs/react/core/hooks/wallets/useSendToken.js.map +1 -1
- package/dist/cjs/react/native/hooks/wallets/useAutoConnect.js.map +1 -1
- package/dist/cjs/react/web/hooks/wallets/useAutoConnect.js +1 -1
- package/dist/cjs/react/web/hooks/wallets/useAutoConnect.js.map +1 -1
- package/dist/cjs/react/web/ui/ConnectWallet/ConnectButton.js +3 -1
- package/dist/cjs/react/web/ui/ConnectWallet/ConnectButton.js.map +1 -1
- package/dist/cjs/react/web/ui/ConnectWallet/Modal/ConnectEmbed.js +2 -1
- package/dist/cjs/react/web/ui/ConnectWallet/Modal/ConnectEmbed.js.map +1 -1
- package/dist/cjs/react/web/ui/ConnectWallet/screens/WalletSwitcherConnectionScreen.js +1 -1
- package/dist/cjs/react/web/ui/ConnectWallet/screens/WalletSwitcherConnectionScreen.js.map +1 -1
- package/dist/cjs/react/web/ui/ConnectWallet/useConnectModal.js +1 -1
- package/dist/cjs/react/web/ui/ConnectWallet/useConnectModal.js.map +1 -1
- package/dist/cjs/react/web/wallets/in-app/WalletAuth.js +1 -1
- package/dist/cjs/react/web/wallets/in-app/WalletAuth.js.map +1 -1
- package/dist/cjs/utils/abi/encodeAbiParameters.js +10 -11
- package/dist/cjs/utils/abi/encodeAbiParameters.js.map +1 -1
- package/dist/cjs/utils/ens/isValidENSName.js +50 -0
- package/dist/cjs/utils/ens/isValidENSName.js.map +1 -0
- package/dist/cjs/utils/extensions/drops/convert-quantity.js +2 -2
- package/dist/cjs/utils/extensions/drops/convert-quantity.js.map +1 -1
- package/dist/cjs/utils/extensions/drops/get-multicall-set-claim-claim-conditon-transactions.js +3 -3
- package/dist/cjs/utils/extensions/drops/get-multicall-set-claim-claim-conditon-transactions.js.map +1 -1
- package/dist/cjs/utils/timeoutPromise.js.map +1 -0
- package/dist/cjs/version.js +1 -1
- package/dist/cjs/wallets/connection/autoConnect.js +54 -0
- package/dist/cjs/wallets/connection/autoConnect.js.map +1 -0
- package/dist/cjs/wallets/connection/autoConnectCore.js +135 -0
- package/dist/cjs/wallets/connection/autoConnectCore.js.map +1 -0
- package/dist/cjs/wallets/connection/types.js.map +1 -0
- package/dist/cjs/{react/web/wallets → wallets}/defaultWallets.js +2 -2
- package/dist/cjs/wallets/defaultWallets.js.map +1 -0
- package/dist/cjs/wallets/in-app/web/lib/get-url-token.js +1 -1
- package/dist/cjs/wallets/in-app/web/lib/get-url-token.js.map +1 -1
- package/dist/esm/auth/is-erc6492-signature.js +2 -2
- package/dist/esm/auth/is-erc6492-signature.js.map +1 -1
- package/dist/esm/auth/parse-erc6492-signature.js +10 -4
- package/dist/esm/auth/parse-erc6492-signature.js.map +1 -1
- package/dist/esm/auth/verify-hash.js +12 -11
- package/dist/esm/auth/verify-hash.js.map +1 -1
- package/dist/esm/auth/verify-signature.js +13 -5
- package/dist/esm/auth/verify-signature.js.map +1 -1
- package/dist/esm/auth/verify-typed-data.js +2 -2
- package/dist/esm/auth/verify-typed-data.js.map +1 -1
- package/dist/esm/contract/deployment/utils/create-2-factory.js +4 -3
- package/dist/esm/contract/deployment/utils/create-2-factory.js.map +1 -1
- package/dist/esm/contract/verification/constructor-params.js +5 -12
- package/dist/esm/contract/verification/constructor-params.js.map +1 -1
- package/dist/esm/exports/utils.js +3 -1
- package/dist/esm/exports/utils.js.map +1 -1
- package/dist/esm/exports/wallets.js +1 -0
- package/dist/esm/exports/wallets.js.map +1 -1
- package/dist/esm/extensions/ens/resolve-l2-name.js +11 -4
- package/dist/esm/extensions/ens/resolve-l2-name.js.map +1 -1
- package/dist/esm/extensions/erc1155/read/getNFTs.js +1 -1
- package/dist/esm/extensions/erc1155/read/getNFTs.js.map +1 -1
- package/dist/esm/extensions/erc1155/write/mintTo.js +1 -1
- package/dist/esm/extensions/erc1155/write/mintTo.js.map +1 -1
- package/dist/esm/extensions/erc1155/write/mintToBatch.js +1 -1
- package/dist/esm/extensions/erc1155/write/mintToBatch.js.map +1 -1
- package/dist/esm/extensions/erc1155/write/sigMint.js +1 -1
- package/dist/esm/extensions/erc1155/write/sigMint.js.map +1 -1
- package/dist/esm/extensions/modules/ClaimableERC1155/setClaimConditions.js +2 -1
- package/dist/esm/extensions/modules/ClaimableERC1155/setClaimConditions.js.map +1 -1
- package/dist/esm/extensions/modules/MintableERC1155/mintWithRole.js +1 -1
- package/dist/esm/extensions/modules/MintableERC1155/mintWithRole.js.map +1 -1
- package/dist/esm/extensions/modules/MintableERC1155/mintWithSignature.js +1 -1
- package/dist/esm/extensions/modules/MintableERC1155/mintWithSignature.js.map +1 -1
- package/dist/esm/react/core/hooks/wallets/useAutoConnect.js +10 -130
- package/dist/esm/react/core/hooks/wallets/useAutoConnect.js.map +1 -1
- package/dist/esm/react/core/hooks/wallets/useSendToken.js +2 -1
- package/dist/esm/react/core/hooks/wallets/useSendToken.js.map +1 -1
- package/dist/esm/react/native/hooks/wallets/useAutoConnect.js.map +1 -1
- package/dist/esm/react/web/hooks/wallets/useAutoConnect.js +1 -1
- package/dist/esm/react/web/hooks/wallets/useAutoConnect.js.map +1 -1
- package/dist/esm/react/web/ui/ConnectWallet/ConnectButton.js +3 -1
- package/dist/esm/react/web/ui/ConnectWallet/ConnectButton.js.map +1 -1
- package/dist/esm/react/web/ui/ConnectWallet/Modal/ConnectEmbed.js +2 -1
- package/dist/esm/react/web/ui/ConnectWallet/Modal/ConnectEmbed.js.map +1 -1
- package/dist/esm/react/web/ui/ConnectWallet/screens/WalletSwitcherConnectionScreen.js +1 -1
- package/dist/esm/react/web/ui/ConnectWallet/screens/WalletSwitcherConnectionScreen.js.map +1 -1
- package/dist/esm/react/web/ui/ConnectWallet/useConnectModal.js +1 -1
- package/dist/esm/react/web/ui/ConnectWallet/useConnectModal.js.map +1 -1
- package/dist/esm/react/web/wallets/in-app/WalletAuth.js +1 -1
- package/dist/esm/react/web/wallets/in-app/WalletAuth.js.map +1 -1
- package/dist/esm/utils/abi/encodeAbiParameters.js +10 -11
- package/dist/esm/utils/abi/encodeAbiParameters.js.map +1 -1
- package/dist/esm/utils/ens/isValidENSName.js +47 -0
- package/dist/esm/utils/ens/isValidENSName.js.map +1 -0
- package/dist/esm/utils/extensions/drops/convert-quantity.js +1 -1
- package/dist/esm/utils/extensions/drops/convert-quantity.js.map +1 -1
- package/dist/esm/utils/extensions/drops/get-multicall-set-claim-claim-conditon-transactions.js +1 -1
- package/dist/esm/utils/extensions/drops/get-multicall-set-claim-claim-conditon-transactions.js.map +1 -1
- package/dist/esm/utils/timeoutPromise.js.map +1 -0
- package/dist/esm/version.js +1 -1
- package/dist/esm/wallets/connection/autoConnect.js +50 -0
- package/dist/esm/wallets/connection/autoConnect.js.map +1 -0
- package/dist/esm/wallets/connection/autoConnectCore.js +130 -0
- package/dist/esm/wallets/connection/autoConnectCore.js.map +1 -0
- package/dist/esm/wallets/connection/types.js.map +1 -0
- package/dist/esm/{react/web/wallets → wallets}/defaultWallets.js +2 -2
- package/dist/esm/wallets/defaultWallets.js.map +1 -0
- package/dist/esm/wallets/in-app/web/lib/get-url-token.js +1 -1
- package/dist/esm/wallets/in-app/web/lib/get-url-token.js.map +1 -1
- package/dist/types/auth/parse-erc6492-signature.d.ts.map +1 -1
- package/dist/types/auth/verify-hash.d.ts +2 -2
- package/dist/types/auth/verify-hash.d.ts.map +1 -1
- package/dist/types/auth/verify-signature.d.ts +6 -3
- package/dist/types/auth/verify-signature.d.ts.map +1 -1
- package/dist/types/auth/verify-typed-data.d.ts +5 -4
- package/dist/types/auth/verify-typed-data.d.ts.map +1 -1
- package/dist/types/contract/deployment/utils/create-2-factory.d.ts.map +1 -1
- package/dist/types/contract/verification/constructor-params.d.ts +2 -2
- package/dist/types/contract/verification/constructor-params.d.ts.map +1 -1
- package/dist/types/event/types.d.ts +3 -2
- package/dist/types/event/types.d.ts.map +1 -1
- package/dist/types/exports/react.d.ts +1 -1
- package/dist/types/exports/react.d.ts.map +1 -1
- package/dist/types/exports/react.native.d.ts +1 -1
- package/dist/types/exports/react.native.d.ts.map +1 -1
- package/dist/types/exports/utils.d.ts +2 -1
- package/dist/types/exports/utils.d.ts.map +1 -1
- package/dist/types/exports/wallets.d.ts +2 -0
- package/dist/types/exports/wallets.d.ts.map +1 -1
- package/dist/types/extensions/ens/resolve-l2-name.d.ts.map +1 -1
- package/dist/types/extensions/erc1155/write/mintTo.d.ts +1 -1
- package/dist/types/extensions/erc1155/write/mintTo.d.ts.map +1 -1
- package/dist/types/extensions/erc1155/write/mintToBatch.d.ts +1 -1
- package/dist/types/extensions/erc1155/write/mintToBatch.d.ts.map +1 -1
- package/dist/types/extensions/modules/ClaimableERC1155/setClaimConditions.d.ts.map +1 -1
- package/dist/types/extensions/modules/MintableERC1155/mintWithRole.d.ts +1 -1
- package/dist/types/extensions/modules/MintableERC1155/mintWithRole.d.ts.map +1 -1
- package/dist/types/extensions/modules/MintableERC1155/mintWithSignature.d.ts +1 -1
- package/dist/types/extensions/modules/MintableERC1155/mintWithSignature.d.ts.map +1 -1
- package/dist/types/react/core/hooks/wallets/useAutoConnect.d.ts +1 -13
- package/dist/types/react/core/hooks/wallets/useAutoConnect.d.ts.map +1 -1
- package/dist/types/react/core/hooks/wallets/useSendToken.d.ts.map +1 -1
- package/dist/types/react/native/hooks/wallets/useAutoConnect.d.ts +1 -1
- package/dist/types/react/native/hooks/wallets/useAutoConnect.d.ts.map +1 -1
- package/dist/types/react/native/ui/AutoConnect/AutoConnect.d.ts +1 -1
- package/dist/types/react/web/hooks/wallets/useAutoConnect.d.ts +1 -1
- package/dist/types/react/web/hooks/wallets/useAutoConnect.d.ts.map +1 -1
- package/dist/types/react/web/ui/AutoConnect/AutoConnect.d.ts +1 -1
- package/dist/types/react/web/ui/ConnectWallet/ConnectButton.d.ts +2 -0
- package/dist/types/react/web/ui/ConnectWallet/ConnectButton.d.ts.map +1 -1
- package/dist/types/react/web/ui/ConnectWallet/Modal/ConnectEmbed.d.ts +1 -0
- package/dist/types/react/web/ui/ConnectWallet/Modal/ConnectEmbed.d.ts.map +1 -1
- package/dist/types/react/web/ui/ConnectWallet/screens/WalletSwitcherConnectionScreen.d.ts.map +1 -1
- package/dist/types/react/web/ui/ConnectWallet/useConnectModal.d.ts.map +1 -1
- package/dist/types/react/web/wallets/in-app/WalletAuth.d.ts.map +1 -1
- package/dist/types/utils/ens/isValidENSName.d.ts +14 -0
- package/dist/types/utils/ens/isValidENSName.d.ts.map +1 -0
- package/dist/types/utils/timeoutPromise.d.ts.map +1 -0
- package/dist/types/version.d.ts +1 -1
- package/dist/types/wallets/connection/autoConnect.d.ts +27 -0
- package/dist/types/wallets/connection/autoConnect.d.ts.map +1 -0
- package/dist/types/wallets/connection/autoConnectCore.d.ts +32 -0
- package/dist/types/wallets/connection/autoConnectCore.d.ts.map +1 -0
- package/dist/types/{react/core/hooks → wallets}/connection/types.d.ts +5 -5
- package/dist/types/wallets/connection/types.d.ts.map +1 -0
- package/dist/types/wallets/defaultWallets.d.ts +11 -0
- package/dist/types/wallets/defaultWallets.d.ts.map +1 -0
- package/package.json +1 -1
- package/src/auth/is-erc6492-signature.ts +2 -2
- package/src/auth/parse-erc6492-signature.ts +10 -4
- package/src/auth/verify-hash.ts +16 -20
- package/src/auth/verify-signature.test.ts +48 -2
- package/src/auth/verify-signature.ts +24 -7
- package/src/auth/verify-typed-data.ts +9 -7
- package/src/contract/deployment/utils/create-2-factory.ts +4 -3
- package/src/contract/verification/constructor-params.ts +8 -15
- package/src/event/types.ts +6 -5
- package/src/exports/react.native.ts +1 -1
- package/src/exports/react.ts +1 -1
- package/src/exports/utils.ts +4 -1
- package/src/exports/wallets.ts +2 -0
- package/src/extensions/ens/resolve-l2-name.ts +21 -5
- package/src/extensions/erc1155/read/getNFTs.ts +1 -1
- package/src/extensions/erc1155/write/mintTo.ts +1 -1
- package/src/extensions/erc1155/write/mintToBatch.ts +1 -1
- package/src/extensions/erc1155/write/sigMint.ts +1 -1
- package/src/extensions/modules/ClaimableERC1155/setClaimConditions.ts +2 -1
- package/src/extensions/modules/MintableERC1155/mintWithRole.ts +1 -1
- package/src/extensions/modules/MintableERC1155/mintWithSignature.ts +1 -1
- package/src/react/core/hooks/wallets/useAutoConnect.ts +12 -158
- package/src/react/core/hooks/wallets/useAutoConnectCore.test.tsx +1 -31
- package/src/react/core/hooks/wallets/useSendToken.ts +2 -1
- package/src/react/native/hooks/wallets/useAutoConnect.ts +1 -1
- package/src/react/native/ui/AutoConnect/AutoConnect.tsx +1 -1
- package/src/react/web/hooks/wallets/useAutoConnect.ts +2 -2
- package/src/react/web/ui/AutoConnect/AutoConnect.tsx +1 -1
- package/src/react/web/ui/ConnectWallet/ConnectButton.tsx +3 -1
- package/src/react/web/ui/ConnectWallet/Modal/ConnectEmbed.tsx +2 -1
- package/src/react/web/ui/ConnectWallet/screens/WalletSwitcherConnectionScreen.tsx +1 -1
- package/src/react/web/ui/ConnectWallet/useConnectModal.tsx +1 -1
- package/src/react/web/wallets/in-app/WalletAuth.tsx +1 -1
- package/src/utils/abi/encodeAbiParameters.ts +15 -11
- package/src/utils/ens/isValidENSName.test.ts +39 -0
- package/src/utils/ens/isValidENSName.ts +54 -0
- package/src/utils/extensions/drops/convert-quantity.ts +1 -1
- package/src/utils/extensions/drops/get-multicall-set-claim-claim-conditon-transactions.ts +1 -1
- package/src/version.ts +1 -1
- package/src/wallets/connection/autoConnect.test.ts +67 -0
- package/src/wallets/connection/autoConnect.ts +58 -0
- package/src/wallets/connection/autoConnectCore.test.ts +403 -0
- package/src/wallets/connection/autoConnectCore.ts +184 -0
- package/src/{react/core/hooks → wallets}/connection/types.ts +5 -5
- package/src/{react/web/wallets → wallets}/defaultWallets.ts +5 -10
- package/src/wallets/in-app/web/lib/get-url-token.ts +1 -1
- package/src/wallets/smart/smart-wallet-integration.test.ts +1 -0
- package/dist/cjs/react/core/hooks/connection/types.js.map +0 -1
- package/dist/cjs/react/core/utils/timeoutPromise.js.map +0 -1
- package/dist/cjs/react/web/wallets/defaultWallets.js.map +0 -1
- package/dist/esm/react/core/hooks/connection/types.js.map +0 -1
- package/dist/esm/react/core/utils/timeoutPromise.js.map +0 -1
- package/dist/esm/react/web/wallets/defaultWallets.js.map +0 -1
- package/dist/types/react/core/hooks/connection/types.d.ts.map +0 -1
- package/dist/types/react/core/utils/timeoutPromise.d.ts.map +0 -1
- package/dist/types/react/web/wallets/defaultWallets.d.ts +0 -11
- package/dist/types/react/web/wallets/defaultWallets.d.ts.map +0 -1
- /package/dist/cjs/{react/core/utils → utils}/timeoutPromise.js +0 -0
- /package/dist/cjs/{react/core/hooks → wallets}/connection/types.js +0 -0
- /package/dist/esm/{react/core/utils → utils}/timeoutPromise.js +0 -0
- /package/dist/esm/{react/core/hooks → wallets}/connection/types.js +0 -0
- /package/dist/types/{react/core/utils → utils}/timeoutPromise.d.ts +0 -0
- /package/src/{react/core/utils → utils}/timeoutPromise.test.ts +0 -0
- /package/src/{react/core/utils → utils}/timeoutPromise.ts +0 -0
@@ -1,4 +1,4 @@
|
|
1
|
-
import type { AutoConnectProps } from "
|
1
|
+
import type { AutoConnectProps } from "../../../../wallets/connection/types.js";
|
2
2
|
/**
|
3
3
|
* AutoConnect last connected wallet on page reload or revisit.
|
4
4
|
* Note: If you are using `ConnectButton` or `ConnectEmbed` components, You don't need to use this component as it is already included.
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"useAutoConnect.d.ts","sourceRoot":"","sources":["../../../../../../src/react/web/hooks/wallets/useAutoConnect.ts"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"useAutoConnect.d.ts","sourceRoot":"","sources":["../../../../../../src/react/web/hooks/wallets/useAutoConnect.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,yCAAyC,CAAC;AAMhF;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,cAAc,CAAC,KAAK,EAAE,gBAAgB,kEAqBrD"}
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import type { AutoConnectProps } from "
|
1
|
+
import type { AutoConnectProps } from "../../../../wallets/connection/types.js";
|
2
2
|
/**
|
3
3
|
* AutoConnect last connected wallet on page reload or revisit.
|
4
4
|
* Note: If you are using `ConnectButton` or `ConnectEmbed` components, You don't need to use this component as it is already included.
|
@@ -77,6 +77,8 @@ import type { ConnectButtonProps } from "../../../core/hooks/connection/ConnectB
|
|
77
77
|
* />;
|
78
78
|
* ```
|
79
79
|
*
|
80
|
+
* Note that this prop doesn't affect ecosystem wallets. Ecosystem wallets will only be converted to smart accounts if the ecosystem owner has enabled account abstraction.
|
81
|
+
*
|
80
82
|
* ### Enabling sign in with ethereum (Auth)
|
81
83
|
*
|
82
84
|
* ```tsx
|
@@ -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":"AAOA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,sDAAsD,CAAC;AA4B/F;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2PG;AACH,wBAAgB,aAAa,CAAC,KAAK,EAAE,kBAAkB,8CA2GtD"}
|
@@ -70,6 +70,7 @@ import type { ConnectEmbedProps } from "../../../../core/hooks/connection/Connec
|
|
70
70
|
* }}
|
71
71
|
* />;
|
72
72
|
* ```
|
73
|
+
* Note that this prop doesn't affect ecosystem wallets. Ecosystem wallets will only be converted to smart accounts if the ecosystem owner has enabled account abstraction.
|
73
74
|
*
|
74
75
|
* ### Enabling sign in with ethereum (Auth)
|
75
76
|
*
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"ConnectEmbed.d.ts","sourceRoot":"","sources":["../../../../../../../src/react/web/ui/ConnectWallet/Modal/ConnectEmbed.tsx"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"ConnectEmbed.d.ts","sourceRoot":"","sources":["../../../../../../../src/react/web/ui/ConnectWallet/Modal/ConnectEmbed.tsx"],"names":[],"mappings":"AAgBA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,wDAAwD,CAAC;AAyBhG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4IG;AACH,wBAAgB,YAAY,CAAC,KAAK,EAAE,iBAAiB,8CA0HpD;AAqID,eAAO,MAAM,cAAc;;SA1aA,MAAO,WAAW;;eA2ahC,SAAS,GAAG,MAAM;yGAwB7B,CAAC"}
|
package/dist/types/react/web/ui/ConnectWallet/screens/WalletSwitcherConnectionScreen.d.ts.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"WalletSwitcherConnectionScreen.d.ts","sourceRoot":"","sources":["../../../../../../../src/react/web/ui/ConnectWallet/screens/WalletSwitcherConnectionScreen.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,gCAAgC,CAAC;AAC5D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAC;
|
1
|
+
{"version":3,"file":"WalletSwitcherConnectionScreen.d.ts","sourceRoot":"","sources":["../../../../../../../src/react/web/ui/ConnectWallet/screens/WalletSwitcherConnectionScreen.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,gCAAgC,CAAC;AAC5D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAC;AAEtE,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,6CAA6C,CAAC;AAC1E,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,uCAAuC,CAAC;AAChF,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,iCAAiC,CAAC;AACnE,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,wCAAwC,CAAC;AAIvE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAExD,MAAM,MAAM,mCAAmC,GAAG;IAChD,KAAK,EAAE,KAAK,GAAG,SAAS,CAAC;IACzB,MAAM,EAAE,KAAK,EAAE,GAAG,SAAS,CAAC;IAC5B,MAAM,EAAE,cAAc,CAAC;IACvB,OAAO,EAAE,MAAM,EAAE,GAAG,SAAS,CAAC;IAC9B,WAAW,EAAE,WAAW,GAAG,SAAS,CAAC;IACrC,aAAa,EAAE,aAAa,CAAC;IAC7B,OAAO,EAAE,OAAO,CAAC;IACjB,kBAAkB,EAAE,kBAAkB,GAAG,SAAS,CAAC;IACnD,QAAQ,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,CAAC;IACnC,kBAAkB,EAAE,MAAM,EAAE,GAAG,SAAS,CAAC;IACzC,cAAc,EAAE,OAAO,CAAC;IACxB,aAAa,CAAC,EAAE,QAAQ,EAAE,CAAC;IAC3B,aAAa,EACT;QACE,SAAS,CAAC,EAAE,MAAM,CAAC;KACpB,GACD,SAAS,CAAC;IACd,MAAM,EAAE,MAAM,IAAI,CAAC;CACpB,CAAC;AAEF,wBAAgB,8BAA8B,CAC5C,KAAK,EAAE,mCAAmC,8CAkD3C"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"useConnectModal.d.ts","sourceRoot":"","sources":["../../../../../../src/react/web/ui/ConnectWallet/useConnectModal.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,6BAA6B,CAAC;AACzD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;
|
1
|
+
{"version":3,"file":"useConnectModal.d.ts","sourceRoot":"","sources":["../../../../../../src/react/web/ui/ConnectWallet/useConnectModal.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,6BAA6B,CAAC;AACzD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAEnE,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,0CAA0C,CAAC;AACvE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,oCAAoC,CAAC;AAC7E,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAChE,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,sCAAsC,CAAC;AAIlE,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAI5C,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAExD;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,wBAAgB,eAAe;qBAKnB,sBAAsB;;EAmCjC;AAkED;;;GAGG;AACH,MAAM,MAAM,sBAAsB,GAAG;IACnC;;;;;;;;;;;;;;;;;;OAkBG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IAEpB;;;;;;;;;;;;;;OAcG;IACH,MAAM,EAAE,cAAc,CAAC;IAEvB;;;;;;OAMG;IACH,MAAM,CAAC,EAAE,QAAQ,CAAC;IAElB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAiCG;IACH,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;IAEnB;;;;;;;;;;;;;OAaG;IACH,WAAW,CAAC,EAAE,WAAW,CAAC;IAE1B;;;;;;;;;;;OAWG;IACH,KAAK,CAAC,EAAE,KAAK,CAAC;IAEd;;;;;;;;;;;;;;;;;;OAkBG;IACH,MAAM,CAAC,EAAE,KAAK,EAAE,CAAC;IAEjB;;;;;;;;;;;;;;;;;OAiBG;IACH,KAAK,CAAC,EAAE,MAAM,GAAG,OAAO,GAAG,KAAK,CAAC;IAEjC;;;;;;;OAOG;IACH,aAAa,CAAC,EAAE;QACd,SAAS,CAAC,EAAE,MAAM,CAAC;KACpB,CAAC;IAEF;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA4BG;IACH,kBAAkB,CAAC,EAAE,kBAAkB,CAAC;IAExC;;OAEG;IACH,kBAAkB,CAAC,EAAE,MAAM,EAAE,CAAC;IAE9B;;;;OAIG;IACH,cAAc,CAAC,EAAE,OAAO,CAAC;IAEzB;;;;OAIG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf;;;;OAIG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB;;;;;;OAMG;IACH,IAAI,CAAC,EAAE,SAAS,GAAG,MAAM,CAAC;IAE1B;;;;OAIG;IACH,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAE3B;;;;OAIG;IACH,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAE1B;;;;;;;;;;;;;;;;;;;;;;;OAuBG;IACH,aAAa,CAAC,EAAE,aAAa,CAAC;IAE9B;;;;OAIG;IACH,oBAAoB,CAAC,EAAE,OAAO,CAAC;CAChC,CAAC"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"WalletAuth.d.ts","sourceRoot":"","sources":["../../../../../../src/react/web/wallets/in-app/WalletAuth.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;
|
1
|
+
{"version":3,"file":"WalletAuth.d.ts","sourceRoot":"","sources":["../../../../../../src/react/web/wallets/in-app/WalletAuth.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAInE,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,0CAA0C,CAAC;AACvE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,qCAAqC,CAAC;AAK7E,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,wCAAwC,CAAC;AAO5E,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AAEnE,wBAAgB,UAAU,CAAC,KAAK,EAAE;IAChC,MAAM,EAAE,MAAM,CAAC,OAAO,GAAG,iBAAiB,CAAC,CAAC;IAC5C,MAAM,EAAE,cAAc,CAAC;IACvB,IAAI,EAAE,MAAM,IAAI,CAAC;IACjB,IAAI,EAAE,SAAS,GAAG,MAAM,CAAC;IACzB,MAAM,EAAE,aAAa,CAAC;IACtB,WAAW,EAAE,iBAAiB,CAAC;IAC/B,MAAM,EAAE,MAAM,IAAI,CAAC;IACnB,aAAa,EAAE;QAAE,SAAS,CAAC,EAAE,MAAM,CAAA;KAAE,GAAG,SAAS,CAAC;IAClD,SAAS,EAAE,OAAO,CAAC;IACnB,IAAI,CAAC,EAAE;QACL,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,YAAY,CAAC,EAAE,MAAM,CAAC;QACtB,oBAAoB,CAAC,EAAE,OAAO,CAAC;QAC/B,iBAAiB,CAAC,EAAE,MAAM,CAAC;QAC3B,gBAAgB,CAAC,EAAE,MAAM,CAAC;KAC3B,CAAC;CACH,8CA+JA"}
|
@@ -0,0 +1,14 @@
|
|
1
|
+
/**
|
2
|
+
* Checks if a string is a valid ENS name.
|
3
|
+
* It does not check if the ENS name is currently registered or resolves to an address - it only validates the string format.
|
4
|
+
*
|
5
|
+
* @param name - The ENS name to check.
|
6
|
+
*
|
7
|
+
* @example
|
8
|
+
* ```ts
|
9
|
+
* isValidENSName("thirdweb.eth"); // true
|
10
|
+
* isValidENSName("foo.bar.com"); // true
|
11
|
+
* isValidENSName("xyz"); // false
|
12
|
+
*/
|
13
|
+
export declare function isValidENSName(name: string): boolean;
|
14
|
+
//# sourceMappingURL=isValidENSName.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"isValidENSName.d.ts","sourceRoot":"","sources":["../../../../src/utils/ens/isValidENSName.ts"],"names":[],"mappings":"AAIA;;;;;;;;;;;GAWG;AACH,wBAAgB,cAAc,CAAC,IAAI,EAAE,MAAM,WAqC1C"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"timeoutPromise.d.ts","sourceRoot":"","sources":["../../../src/utils/timeoutPromise.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,wBAAgB,cAAc,CAAC,CAAC,EAC9B,OAAO,EAAE,OAAO,CAAC,CAAC,CAAC,EACnB,MAAM,EAAE;IAAE,EAAE,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,cAkBxC"}
|
package/dist/types/version.d.ts
CHANGED
@@ -1,2 +1,2 @@
|
|
1
|
-
export declare const version = "5.
|
1
|
+
export declare const version = "5.84.0-nightly-0fdfb8aa778a344aa847503f668e48feb5f72548-20250115000312";
|
2
2
|
//# sourceMappingURL=version.d.ts.map
|
@@ -0,0 +1,27 @@
|
|
1
|
+
import type { Wallet } from "../interfaces/wallet.js";
|
2
|
+
import type { AutoConnectProps } from "./types.js";
|
3
|
+
/**
|
4
|
+
* Attempts to automatically connect to the last connected wallet.
|
5
|
+
* It combines both specified wallets and installed wallet providers that aren't already specified.
|
6
|
+
*
|
7
|
+
* @example
|
8
|
+
*
|
9
|
+
* ```tsx
|
10
|
+
* import { autoConnect } from "thirdweb/wallets";
|
11
|
+
*
|
12
|
+
* const autoConnected = await autoConnect({
|
13
|
+
* client,
|
14
|
+
* onConnect: (wallet) => {
|
15
|
+
* console.log("wallet", wallet);
|
16
|
+
* },
|
17
|
+
* });
|
18
|
+
* ```
|
19
|
+
*
|
20
|
+
* @param props - The auto-connect configuration properties
|
21
|
+
* @param props.wallets - Array of wallet instances to consider for auto-connection
|
22
|
+
* @returns {boolean} a promise resolving to true or false depending on whether the auto connect function connected to a wallet or not
|
23
|
+
*/
|
24
|
+
export declare const autoConnect: (props: AutoConnectProps & {
|
25
|
+
wallets?: Wallet[];
|
26
|
+
}) => Promise<boolean>;
|
27
|
+
//# sourceMappingURL=autoConnect.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"autoConnect.d.ts","sourceRoot":"","sources":["../../../../src/wallets/connection/autoConnect.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,yBAAyB,CAAC;AAGtD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAEnD;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,eAAO,MAAM,WAAW,UACf,gBAAgB,GAAG;IACxB,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;CACpB,qBAwBF,CAAC"}
|
@@ -0,0 +1,32 @@
|
|
1
|
+
import type { Chain } from "../../chains/types.js";
|
2
|
+
import type { ThirdwebClient } from "../../client/client.js";
|
3
|
+
import type { AsyncStorage } from "../../utils/storage/AsyncStorage.js";
|
4
|
+
import type { AuthArgsType, AuthStoredTokenWithCookieReturnType } from "../in-app/core/authentication/types.js";
|
5
|
+
import type { Wallet } from "../interfaces/wallet.js";
|
6
|
+
import { type ConnectionManager } from "../manager/index.js";
|
7
|
+
import type { WalletId } from "../wallet-types.js";
|
8
|
+
import type { AutoConnectProps } from "./types.js";
|
9
|
+
/**
|
10
|
+
* @internal
|
11
|
+
*/
|
12
|
+
export declare const autoConnectCore: ({ storage, props, createWalletFn, manager, connectOverride, getInstalledWallets, setLastAuthProvider, }: {
|
13
|
+
storage: AsyncStorage;
|
14
|
+
props: AutoConnectProps & {
|
15
|
+
wallets: Wallet[];
|
16
|
+
};
|
17
|
+
createWalletFn: (id: WalletId) => Wallet;
|
18
|
+
manager: ConnectionManager;
|
19
|
+
connectOverride?: (walletOrFn: Wallet | (() => Promise<Wallet>)) => Promise<Wallet | null>;
|
20
|
+
getInstalledWallets?: () => Wallet[];
|
21
|
+
setLastAuthProvider?: (authProvider: AuthArgsType["strategy"], storage: AsyncStorage) => Promise<void>;
|
22
|
+
}) => Promise<boolean>;
|
23
|
+
/**
|
24
|
+
* @internal
|
25
|
+
*/
|
26
|
+
export declare function handleWalletConnection(props: {
|
27
|
+
wallet: Wallet;
|
28
|
+
client: ThirdwebClient;
|
29
|
+
authResult: AuthStoredTokenWithCookieReturnType | undefined;
|
30
|
+
lastConnectedChain: Chain | undefined;
|
31
|
+
}): Promise<import("../interfaces/wallet.js").Account>;
|
32
|
+
//# sourceMappingURL=autoConnectCore.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"autoConnectCore.d.ts","sourceRoot":"","sources":["../../../../src/wallets/connection/autoConnectCore.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,uBAAuB,CAAC;AACnD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAC7D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,qCAAqC,CAAC;AAIxE,OAAO,KAAK,EACV,YAAY,EACZ,mCAAmC,EACpC,MAAM,wCAAwC,CAAC;AAEhD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,yBAAyB,CAAC;AACtD,OAAO,EACL,KAAK,iBAAiB,EAIvB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AACnD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAEnD;;GAEG;AACH,eAAO,MAAM,eAAe,4GAQzB;IACD,OAAO,EAAE,YAAY,CAAC;IACtB,KAAK,EAAE,gBAAgB,GAAG;QAAE,OAAO,EAAE,MAAM,EAAE,CAAA;KAAE,CAAC;IAChD,cAAc,EAAE,CAAC,EAAE,EAAE,QAAQ,KAAK,MAAM,CAAC;IACzC,OAAO,EAAE,iBAAiB,CAAC;IAC3B,eAAe,CAAC,EAAE,CAChB,UAAU,EAAE,MAAM,GAAG,CAAC,MAAM,OAAO,CAAC,MAAM,CAAC,CAAC,KACzC,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAAC;IAC5B,mBAAmB,CAAC,EAAE,MAAM,MAAM,EAAE,CAAC;IACrC,mBAAmB,CAAC,EAAE,CACpB,YAAY,EAAE,YAAY,CAAC,UAAU,CAAC,EACtC,OAAO,EAAE,YAAY,KAClB,OAAO,CAAC,IAAI,CAAC,CAAC;CACpB,KAAG,OAAO,CAAC,OAAO,CA0HlB,CAAC;AAEF;;GAEG;AACH,wBAAsB,sBAAsB,CAAC,KAAK,EAAE;IAClD,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,cAAc,CAAC;IACvB,UAAU,EAAE,mCAAmC,GAAG,SAAS,CAAC;IAC5D,kBAAkB,EAAE,KAAK,GAAG,SAAS,CAAC;CACvC,sDAMA"}
|
@@ -1,8 +1,8 @@
|
|
1
|
-
import type { Chain } from "
|
2
|
-
import type { ThirdwebClient } from "
|
3
|
-
import type { Wallet } from "
|
4
|
-
import type { SmartWalletOptions } from "
|
5
|
-
import type { AppMetadata } from "
|
1
|
+
import type { Chain } from "../../chains/types.js";
|
2
|
+
import type { ThirdwebClient } from "../../client/client.js";
|
3
|
+
import type { Wallet } from "../../wallets/interfaces/wallet.js";
|
4
|
+
import type { SmartWalletOptions } from "../../wallets/smart/types.js";
|
5
|
+
import type { AppMetadata } from "../../wallets/types.js";
|
6
6
|
export type AutoConnectProps = {
|
7
7
|
/**
|
8
8
|
* Array of wallets that your app uses
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/wallets/connection/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,uBAAuB,CAAC;AACnD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAC7D,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,oCAAoC,CAAC;AACjE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,8BAA8B,CAAC;AACvE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAE1D,MAAM,MAAM,gBAAgB,GAAG;IAC7B;;;;;;;;;;;;;;;;;;;;;;;OAuBG;IACH,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;IAEnB;;;;;;;;;;;;;;OAcG;IACH,MAAM,EAAE,cAAc,CAAC;IAEvB;;;;;;;;;;;;;OAaG;IACH,WAAW,CAAC,EAAE,WAAW,CAAC;IAE1B;;;;;;;;;;;;;OAaG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IAEjB;;;;;;;;;;;;;OAaG;IACH,kBAAkB,CAAC,EAAE,kBAAkB,CAAC;IAExC;;;;;;;;;;OAUG;IACH,SAAS,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,CAAC;IAErC;;OAEG;IACH,KAAK,CAAC,EAAE,KAAK,CAAC;IAEd;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,IAAI,CAAC;CACxB,CAAC"}
|
@@ -0,0 +1,11 @@
|
|
1
|
+
import type { Chain } from "../chains/types.js";
|
2
|
+
import type { Wallet } from "./interfaces/wallet.js";
|
3
|
+
import type { AppMetadata } from "./types.js";
|
4
|
+
/**
|
5
|
+
* @internal
|
6
|
+
*/
|
7
|
+
export declare function getDefaultWallets(options?: {
|
8
|
+
appMetadata?: AppMetadata;
|
9
|
+
chains?: Chain[];
|
10
|
+
}): Wallet[];
|
11
|
+
//# sourceMappingURL=defaultWallets.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"defaultWallets.d.ts","sourceRoot":"","sources":["../../../src/wallets/defaultWallets.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAGhD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAC;AACrD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAE9C;;GAEG;AACH,wBAAgB,iBAAiB,CAAC,OAAO,CAAC,EAAE;IAC1C,WAAW,CAAC,EAAE,WAAW,CAAC;IAC1B,MAAM,CAAC,EAAE,KAAK,EAAE,CAAC;CAClB,GAAG,MAAM,EAAE,CAYX"}
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "thirdweb",
|
3
|
-
"version": "5.
|
3
|
+
"version": "5.84.0-nightly-0fdfb8aa778a344aa847503f668e48feb5f72548-20250115000312",
|
4
4
|
"repository": {
|
5
5
|
"type": "git",
|
6
6
|
"url": "git+https://github.com/thirdweb-dev/js.git#main"
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import
|
1
|
+
import * as ox__Hex from "ox/Hex";
|
2
2
|
import type { Hex } from "../utils/encoding/hex.js";
|
3
3
|
import { ERC_6492_MAGIC_VALUE } from "./constants.js";
|
4
4
|
|
@@ -19,5 +19,5 @@ import { ERC_6492_MAGIC_VALUE } from "./constants.js";
|
|
19
19
|
* @auth
|
20
20
|
*/
|
21
21
|
export function isErc6492Signature(signature: Hex): boolean {
|
22
|
-
return
|
22
|
+
return ox__Hex.slice(signature, -32) === ERC_6492_MAGIC_VALUE;
|
23
23
|
}
|
@@ -1,4 +1,6 @@
|
|
1
|
-
import
|
1
|
+
import * as ox__AbiParameters from "ox/AbiParameters";
|
2
|
+
import * as ox__Address from "ox/Address";
|
3
|
+
import { WrappedSignature as ox__WrappedSignature } from "ox/erc6492";
|
2
4
|
import type { Hex } from "../utils/encoding/hex.js";
|
3
5
|
import type { OneOf } from "../utils/type-utils.js";
|
4
6
|
import type { Erc6492Signature } from "./types.js";
|
@@ -29,13 +31,17 @@ export type ParseErc6492SignatureReturnType = OneOf<
|
|
29
31
|
export function parseErc6492Signature(
|
30
32
|
signature: Hex,
|
31
33
|
): ParseErc6492SignatureReturnType {
|
32
|
-
if (!
|
34
|
+
if (!ox__WrappedSignature.validate(signature)) {
|
33
35
|
return { signature };
|
34
36
|
}
|
35
37
|
|
36
|
-
const [address, data, originalSignature] =
|
38
|
+
const [address, data, originalSignature] = ox__AbiParameters.decode(
|
37
39
|
[{ type: "address" }, { type: "bytes" }, { type: "bytes" }],
|
38
40
|
signature,
|
39
41
|
);
|
40
|
-
return {
|
42
|
+
return {
|
43
|
+
address: ox__Address.checksum(address),
|
44
|
+
data,
|
45
|
+
signature: originalSignature,
|
46
|
+
};
|
41
47
|
}
|
package/src/auth/verify-hash.ts
CHANGED
@@ -1,12 +1,8 @@
|
|
1
|
-
import
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
serializeSignature,
|
7
|
-
universalSignatureValidatorAbi,
|
8
|
-
universalSignatureValidatorByteCode,
|
9
|
-
} from "viem";
|
1
|
+
import * as ox__Abi from "ox/Abi";
|
2
|
+
import * as ox__AbiConstructor from "ox/AbiConstructor";
|
3
|
+
import * as ox__AbiFunction from "ox/AbiFunction";
|
4
|
+
import * as ox__Signature from "ox/Signature";
|
5
|
+
import { WrappedSignature as ox__WrappedSignature } from "ox/erc6492";
|
10
6
|
import type { Chain } from "../chains/types.js";
|
11
7
|
import type { ThirdwebClient } from "../client/client.js";
|
12
8
|
import { type ThirdwebContract, getContract } from "../contract/contract.js";
|
@@ -20,7 +16,7 @@ import { serializeErc6492Signature } from "./serialize-erc6492-signature.js";
|
|
20
16
|
|
21
17
|
export type VerifyHashParams = {
|
22
18
|
hash: Hex;
|
23
|
-
signature: string | Uint8Array | Signature;
|
19
|
+
signature: string | Uint8Array | ox__Signature.Signature;
|
24
20
|
address: string;
|
25
21
|
client: ThirdwebClient;
|
26
22
|
chain: Chain;
|
@@ -71,7 +67,7 @@ export async function verifyHash({
|
|
71
67
|
const signatureHex = (() => {
|
72
68
|
if (isHex(signature)) return signature;
|
73
69
|
if (typeof signature === "object" && "r" in signature && "s" in signature)
|
74
|
-
return
|
70
|
+
return ox__Signature.toHex(signature);
|
75
71
|
if (signature instanceof Uint8Array) return fromBytes(signature, "hex");
|
76
72
|
// We should never hit this but TS doesn't know that
|
77
73
|
throw new Error(
|
@@ -85,7 +81,7 @@ export async function verifyHash({
|
|
85
81
|
if (!accountFactory) return signatureHex;
|
86
82
|
|
87
83
|
// If this sigature was already wrapped for ERC-6492, carry on
|
88
|
-
if (
|
84
|
+
if (ox__WrappedSignature.validate(signatureHex)) return signatureHex;
|
89
85
|
|
90
86
|
// Otherwise, serialize the signature for ERC-6492 validation
|
91
87
|
return serializeErc6492Signature({
|
@@ -100,23 +96,23 @@ export async function verifyHash({
|
|
100
96
|
data: Hex;
|
101
97
|
};
|
102
98
|
const zkSyncChain = await isZkSyncChain(chain);
|
99
|
+
const abi = ox__Abi.from(ox__WrappedSignature.universalSignatureValidatorAbi);
|
103
100
|
if (zkSyncChain) {
|
104
101
|
// zksync chains dont support deploying code with eth_call
|
105
102
|
// need to call a deployed contract instead
|
106
103
|
verificationData = {
|
107
104
|
to: ZKSYNC_VALIDATOR_ADDRESS,
|
108
|
-
data:
|
109
|
-
abi
|
110
|
-
|
111
|
-
|
112
|
-
}),
|
105
|
+
data: ox__AbiFunction.encodeData(
|
106
|
+
ox__AbiFunction.fromAbi(abi, "isValidSig"),
|
107
|
+
[address, hash, wrappedSignature],
|
108
|
+
),
|
113
109
|
};
|
114
110
|
} else {
|
111
|
+
const validatorConstructor = ox__AbiConstructor.fromAbi(abi);
|
115
112
|
verificationData = {
|
116
|
-
data:
|
117
|
-
abi: universalSignatureValidatorAbi,
|
113
|
+
data: ox__AbiConstructor.encode(validatorConstructor, {
|
118
114
|
args: [address, hash, wrappedSignature],
|
119
|
-
bytecode:
|
115
|
+
bytecode: ox__WrappedSignature.universalSignatureValidatorBytecode,
|
120
116
|
}),
|
121
117
|
};
|
122
118
|
}
|
@@ -1,10 +1,16 @@
|
|
1
|
+
import * as ox__Bytes from "ox/Bytes";
|
1
2
|
import { describe, expect, it, test } from "vitest";
|
2
3
|
import { FORKED_ETHEREUM_CHAIN } from "../../test/src/chains.js";
|
3
4
|
import { TEST_CLIENT } from "../../test/src/test-clients.js";
|
4
5
|
import { TEST_ACCOUNT_A } from "../../test/src/test-wallets.js";
|
5
|
-
import { mainnet } from "../chains/chain-definitions/ethereum.js";
|
6
|
+
import { ethereum, mainnet } from "../chains/chain-definitions/ethereum.js";
|
6
7
|
import { sepolia } from "../chains/chain-definitions/sepolia.js";
|
7
|
-
import {
|
8
|
+
import { smartWallet } from "../wallets/smart/smart-wallet.js";
|
9
|
+
import {
|
10
|
+
verifyContractWalletSignature,
|
11
|
+
verifyEOASignature,
|
12
|
+
verifySignature,
|
13
|
+
} from "./verify-signature.js";
|
8
14
|
|
9
15
|
describe("verifyEOASignature", () => {
|
10
16
|
test("should return true for a valid signature", async () => {
|
@@ -98,3 +104,43 @@ describe.runIf(process.env.TW_SECRET_KEY)(
|
|
98
104
|
});
|
99
105
|
},
|
100
106
|
);
|
107
|
+
|
108
|
+
describe.runIf(process.env.TW_SECRET_KEY)(
|
109
|
+
"verifyContractWalletSignature",
|
110
|
+
async () => {
|
111
|
+
const message = "Hakuna matata";
|
112
|
+
const wallet = smartWallet({
|
113
|
+
chain: ethereum,
|
114
|
+
gasless: true,
|
115
|
+
});
|
116
|
+
const smartAccount = await wallet.connect({
|
117
|
+
client: TEST_CLIENT,
|
118
|
+
personalAccount: TEST_ACCOUNT_A,
|
119
|
+
});
|
120
|
+
|
121
|
+
test("should verify a smart account signature", async () => {
|
122
|
+
const rawSignature = await smartAccount.signMessage({ message });
|
123
|
+
const result = await verifyContractWalletSignature({
|
124
|
+
signature: rawSignature,
|
125
|
+
message,
|
126
|
+
address: smartAccount.address,
|
127
|
+
chain: ethereum,
|
128
|
+
client: TEST_CLIENT,
|
129
|
+
});
|
130
|
+
expect(result).toBe(true);
|
131
|
+
});
|
132
|
+
|
133
|
+
test("should verify a smart account signature as bytes", async () => {
|
134
|
+
const rawSignature = await smartAccount.signMessage({ message });
|
135
|
+
const bytesSignature = ox__Bytes.fromHex(rawSignature);
|
136
|
+
const result = await verifyContractWalletSignature({
|
137
|
+
signature: bytesSignature,
|
138
|
+
message,
|
139
|
+
address: smartAccount.address,
|
140
|
+
chain: ethereum,
|
141
|
+
client: TEST_CLIENT,
|
142
|
+
});
|
143
|
+
expect(result).toBe(true);
|
144
|
+
});
|
145
|
+
},
|
146
|
+
);
|
@@ -1,4 +1,6 @@
|
|
1
|
-
import
|
1
|
+
import * as ox__Bytes from "ox/Bytes";
|
2
|
+
import * as ox__Secp256k1 from "ox/Secp256k1";
|
3
|
+
import * as ox__Signature from "ox/Signature";
|
2
4
|
import type { Chain } from "../chains/types.js";
|
3
5
|
import type { ThirdwebClient } from "../client/client.js";
|
4
6
|
import { type Hex, isHex } from "../utils/encoding/hex.js";
|
@@ -6,12 +8,19 @@ import { hashMessage } from "../utils/hashing/hashMessage.js";
|
|
6
8
|
import type { Prettify } from "../utils/type-utils.js";
|
7
9
|
import { verifyHash } from "./verify-hash.js";
|
8
10
|
|
11
|
+
type Message = Prettify<
|
12
|
+
| string
|
13
|
+
| {
|
14
|
+
raw: Hex | Uint8Array;
|
15
|
+
}
|
16
|
+
>;
|
17
|
+
|
9
18
|
/**
|
10
19
|
* @auth
|
11
20
|
*/
|
12
21
|
export type VerifyEOASignatureParams = {
|
13
|
-
message: string |
|
14
|
-
signature: string | Uint8Array
|
22
|
+
message: string | Message;
|
23
|
+
signature: string | Uint8Array;
|
15
24
|
address: string;
|
16
25
|
};
|
17
26
|
|
@@ -39,9 +48,9 @@ export async function verifyEOASignature(options: VerifyEOASignatureParams) {
|
|
39
48
|
return false;
|
40
49
|
}
|
41
50
|
|
42
|
-
const recoveredAddress =
|
43
|
-
|
44
|
-
signature: options.signature,
|
51
|
+
const recoveredAddress = ox__Secp256k1.recoverAddress({
|
52
|
+
payload: messageHash,
|
53
|
+
signature: ox__Signature.fromHex(options.signature),
|
45
54
|
});
|
46
55
|
|
47
56
|
if (recoveredAddress.toLowerCase() === options.address.toLowerCase()) {
|
@@ -103,9 +112,17 @@ export async function verifyContractWalletSignature({
|
|
103
112
|
accountFactory,
|
104
113
|
}: VerifyContractWalletSignatureParams) {
|
105
114
|
const messageHash = hashMessage(message);
|
115
|
+
|
116
|
+
const parsedSignature = (() => {
|
117
|
+
if (ox__Bytes.validate(signature)) {
|
118
|
+
return ox__Bytes.toHex(signature);
|
119
|
+
}
|
120
|
+
return signature;
|
121
|
+
})();
|
122
|
+
|
106
123
|
return verifyHash({
|
107
124
|
hash: messageHash,
|
108
|
-
signature,
|
125
|
+
signature: parsedSignature,
|
109
126
|
address,
|
110
127
|
client,
|
111
128
|
chain,
|
@@ -1,5 +1,5 @@
|
|
1
|
-
import type
|
2
|
-
import
|
1
|
+
import type * as ox__Signature from "ox/Signature";
|
2
|
+
import * as ox__TypedData from "ox/TypedData";
|
3
3
|
import type { Chain } from "../chains/types.js";
|
4
4
|
import type { ThirdwebClient } from "../client/client.js";
|
5
5
|
import type { Hex } from "../utils/encoding/hex.js";
|
@@ -7,12 +7,14 @@ import type { HashTypedDataParams } from "../utils/hashing/hashTypedData.js";
|
|
7
7
|
import { type VerifyHashParams, verifyHash } from "./verify-hash.js";
|
8
8
|
|
9
9
|
export type VerifyTypedDataParams<
|
10
|
-
typedData extends
|
10
|
+
typedData extends
|
11
|
+
| ox__TypedData.TypedData
|
12
|
+
| Record<string, unknown> = ox__TypedData.TypedData,
|
11
13
|
primaryType extends keyof typedData | "EIP712Domain" = keyof typedData,
|
12
14
|
> = Omit<VerifyHashParams, "hash"> &
|
13
|
-
|
15
|
+
ox__TypedData.Definition<typedData, primaryType> & {
|
14
16
|
address: string;
|
15
|
-
signature: string | Uint8Array | Signature;
|
17
|
+
signature: string | Uint8Array | ox__Signature.Signature;
|
16
18
|
client: ThirdwebClient;
|
17
19
|
chain: Chain;
|
18
20
|
accountFactory?: {
|
@@ -80,7 +82,7 @@ export type VerifyTypedDataParams<
|
|
80
82
|
* @auth
|
81
83
|
*/
|
82
84
|
export async function verifyTypedData<
|
83
|
-
typedData extends TypedData | Record<string, unknown>,
|
85
|
+
typedData extends ox__TypedData.TypedData | Record<string, unknown>,
|
84
86
|
primaryType extends keyof typedData | "EIP712Domain",
|
85
87
|
>({
|
86
88
|
address,
|
@@ -93,7 +95,7 @@ export async function verifyTypedData<
|
|
93
95
|
primaryType,
|
94
96
|
types,
|
95
97
|
}: VerifyTypedDataParams<typedData, primaryType>): Promise<boolean> {
|
96
|
-
const messageHash =
|
98
|
+
const messageHash = ox__TypedData.getSignPayload({
|
97
99
|
message,
|
98
100
|
domain,
|
99
101
|
primaryType,
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import
|
1
|
+
import * as ox__ContractAddress from "ox/ContractAddress";
|
2
2
|
import { getGasPrice } from "../../../gas/get-gas-price.js";
|
3
3
|
import { eth_getBalance } from "../../../rpc/actions/eth_getBalance.js";
|
4
4
|
import { eth_sendRawTransaction } from "../../../rpc/actions/eth_sendRawTransaction.js";
|
@@ -6,6 +6,7 @@ import { getRpcClient } from "../../../rpc/rpc.js";
|
|
6
6
|
import { sendTransaction } from "../../../transaction/actions/send-transaction.js";
|
7
7
|
import { waitForReceipt } from "../../../transaction/actions/wait-for-tx-receipt.js";
|
8
8
|
import { prepareTransaction } from "../../../transaction/prepare-transaction.js";
|
9
|
+
import { getAddress } from "../../../utils/address.js";
|
9
10
|
import { isEIP155Enforced } from "../../../utils/any-evm/is-eip155-enforced.js";
|
10
11
|
import { getKeylessTransaction } from "../../../utils/any-evm/keyless-transaction.js";
|
11
12
|
import { isContractDeployed } from "../../../utils/bytecode/is-contract-deployed.js";
|
@@ -226,7 +227,7 @@ async function _getCreate2FactoryDeploymentInfo(
|
|
226
227
|
},
|
227
228
|
signature: SIGNATURE,
|
228
229
|
});
|
229
|
-
const create2FactoryAddress =
|
230
|
+
const create2FactoryAddress = ox__ContractAddress.from({
|
230
231
|
from: deploymentTransaction.signerAddress,
|
231
232
|
nonce: 0n,
|
232
233
|
});
|
@@ -234,7 +235,7 @@ async function _getCreate2FactoryDeploymentInfo(
|
|
234
235
|
return {
|
235
236
|
...deploymentTransaction,
|
236
237
|
valueToSend: gasPrice * gas,
|
237
|
-
predictedAddress: create2FactoryAddress,
|
238
|
+
predictedAddress: getAddress(create2FactoryAddress),
|
238
239
|
};
|
239
240
|
}
|
240
241
|
|
@@ -1,5 +1,6 @@
|
|
1
|
-
import type
|
2
|
-
import
|
1
|
+
import type * as ox__Abi from "ox/Abi";
|
2
|
+
import * as ox__AbiConstructor from "ox/AbiConstructor";
|
3
|
+
import * as ox__AbiParameters from "ox/AbiParameters";
|
3
4
|
import { eth_getTransactionByHash } from "../../rpc/actions/eth_getTransactionByHash.js";
|
4
5
|
import { getRpcClient } from "../../rpc/rpc.js";
|
5
6
|
import type { ThirdwebContract } from "../contract.js";
|
@@ -10,19 +11,9 @@ type FetchConstructorParamsOptions = {
|
|
10
11
|
contract: ThirdwebContract;
|
11
12
|
explorerApiUrl: string;
|
12
13
|
explorerApiKey: string;
|
13
|
-
abi: Abi;
|
14
|
+
abi: ox__Abi.Abi;
|
14
15
|
};
|
15
16
|
|
16
|
-
// TODO: move to abi helpers (?)
|
17
|
-
function extractConstructorParamsFromAbi(abi: Abi) {
|
18
|
-
for (const input of abi) {
|
19
|
-
if (input.type === "constructor") {
|
20
|
-
return input.inputs || [];
|
21
|
-
}
|
22
|
-
}
|
23
|
-
return [];
|
24
|
-
}
|
25
|
-
|
26
17
|
const RequestStatus = {
|
27
18
|
OK: "1",
|
28
19
|
NOTOK: "0",
|
@@ -37,7 +28,8 @@ const RequestStatus = {
|
|
37
28
|
export async function fetchConstructorParams(
|
38
29
|
options: FetchConstructorParamsOptions,
|
39
30
|
): Promise<string> {
|
40
|
-
const
|
31
|
+
const abiConstructor = ox__AbiConstructor.fromAbi(options.abi);
|
32
|
+
const constructorParamTypes = ox__AbiParameters.from(abiConstructor.inputs);
|
41
33
|
if (constructorParamTypes.length === 0) {
|
42
34
|
return "";
|
43
35
|
}
|
@@ -114,7 +106,8 @@ export async function fetchConstructorParams(
|
|
114
106
|
try {
|
115
107
|
// sanity check that the constructor params are valid
|
116
108
|
// TODO: should we sanity check after each attempt?
|
117
|
-
|
109
|
+
|
110
|
+
ox__AbiParameters.decode(constructorParamTypes, `0x${constructorArgs}`);
|
118
111
|
} catch {
|
119
112
|
throw new Error(
|
120
113
|
"Verifying this contract requires it to be published. Run `npx thirdweb publish` to publish this contract, then try again.",
|
package/src/event/types.ts
CHANGED
@@ -1,5 +1,6 @@
|
|
1
1
|
import type { AbiParameter, AbiParameterToPrimitiveType } from "abitype";
|
2
|
-
import type
|
2
|
+
import type * as ox__Hex from "ox/Hex";
|
3
|
+
import type { Log as ox__Log } from "ox/Log";
|
3
4
|
import type { Filter, MaybeRequired, Prettify } from "../utils/type-utils.js";
|
4
5
|
|
5
6
|
//////////////////////////////////////////////////////////////////////
|
@@ -83,11 +84,11 @@ type _HasUnnamedAbiParameter<TAbiParameters extends readonly AbiParameter[]> =
|
|
83
84
|
* @internal
|
84
85
|
*/
|
85
86
|
type LogTopicType<
|
86
|
-
TPrimitiveType = Hex,
|
87
|
-
TTopic extends
|
88
|
-
> = TTopic extends Hex
|
87
|
+
TPrimitiveType = ox__Hex.Hex,
|
88
|
+
TTopic extends ox__Log["topics"][0] = ox__Log["topics"][0],
|
89
|
+
> = TTopic extends ox__Hex.Hex
|
89
90
|
? TPrimitiveType
|
90
|
-
: TTopic extends Hex[]
|
91
|
+
: TTopic extends ox__Hex.Hex[]
|
91
92
|
? TPrimitiveType[]
|
92
93
|
: TTopic extends null
|
93
94
|
? null
|