thirdweb 5.99.1-nightly-1985de89aae5196233789221ad06f1b6554d27fc-20250513000404 → 5.99.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/extensions/erc1155/drops/read/canClaim.js +1 -1
- package/dist/cjs/extensions/erc1155/drops/read/getActiveClaimCondition.js +1 -0
- package/dist/cjs/extensions/erc1155/drops/read/getActiveClaimCondition.js.map +1 -1
- package/dist/cjs/extensions/erc1155/drops/read/getClaimConditions.js +1 -0
- package/dist/cjs/extensions/erc1155/drops/read/getClaimConditions.js.map +1 -1
- package/dist/cjs/extensions/erc1155/drops/write/claimTo.js +1 -0
- package/dist/cjs/extensions/erc1155/drops/write/claimTo.js.map +1 -1
- package/dist/cjs/extensions/erc1155/drops/write/resetClaimEligibility.js +1 -0
- package/dist/cjs/extensions/erc1155/drops/write/resetClaimEligibility.js.map +1 -1
- package/dist/cjs/extensions/erc1155/drops/write/setClaimConditions.js +1 -0
- package/dist/cjs/extensions/erc1155/drops/write/setClaimConditions.js.map +1 -1
- package/dist/cjs/extensions/erc1155/write/lazyMint.js +1 -0
- package/dist/cjs/extensions/erc1155/write/lazyMint.js.map +1 -1
- package/dist/cjs/extensions/erc1155/write/mintAdditionalSupplyTo.js +1 -0
- package/dist/cjs/extensions/erc1155/write/mintAdditionalSupplyTo.js.map +1 -1
- package/dist/cjs/extensions/erc1155/write/mintAdditionalSupplyToBatch.js +1 -0
- package/dist/cjs/extensions/erc1155/write/mintAdditionalSupplyToBatch.js.map +1 -1
- package/dist/cjs/extensions/erc1155/write/mintTo.js +1 -0
- package/dist/cjs/extensions/erc1155/write/mintTo.js.map +1 -1
- package/dist/cjs/extensions/erc1155/write/mintToBatch.js +1 -0
- package/dist/cjs/extensions/erc1155/write/mintToBatch.js.map +1 -1
- package/dist/cjs/extensions/erc1155/write/sigMint.js +1 -0
- package/dist/cjs/extensions/erc1155/write/sigMint.js.map +1 -1
- package/dist/cjs/extensions/erc1155/write/updateTokenURI.js +1 -0
- package/dist/cjs/extensions/erc1155/write/updateTokenURI.js.map +1 -1
- package/dist/cjs/extensions/erc20/drops/read/canClaim.js +1 -1
- package/dist/cjs/extensions/erc20/drops/read/getActiveClaimCondition.js +1 -0
- package/dist/cjs/extensions/erc20/drops/read/getActiveClaimCondition.js.map +1 -1
- package/dist/cjs/extensions/erc20/drops/read/getClaimConditions.js +1 -0
- package/dist/cjs/extensions/erc20/drops/read/getClaimConditions.js.map +1 -1
- package/dist/cjs/extensions/erc20/drops/write/claimTo.js +2 -0
- package/dist/cjs/extensions/erc20/drops/write/claimTo.js.map +1 -1
- package/dist/cjs/extensions/erc20/drops/write/resetClaimEligibility.js +1 -0
- package/dist/cjs/extensions/erc20/drops/write/resetClaimEligibility.js.map +1 -1
- package/dist/cjs/extensions/erc20/drops/write/setClaimConditions.js +1 -0
- package/dist/cjs/extensions/erc20/drops/write/setClaimConditions.js.map +1 -1
- package/dist/cjs/extensions/erc20/write/mintTo.js +1 -0
- package/dist/cjs/extensions/erc20/write/mintTo.js.map +1 -1
- package/dist/cjs/extensions/erc20/write/sigMint.js +1 -0
- package/dist/cjs/extensions/erc20/write/sigMint.js.map +1 -1
- package/dist/cjs/extensions/erc721/drops/read/canClaim.js +2 -0
- package/dist/cjs/extensions/erc721/drops/read/canClaim.js.map +1 -1
- package/dist/cjs/extensions/erc721/drops/read/getActiveClaimCondition.js +4 -0
- package/dist/cjs/extensions/erc721/drops/read/getActiveClaimCondition.js.map +1 -1
- package/dist/cjs/extensions/erc721/drops/read/getClaimConditions.js +3 -0
- package/dist/cjs/extensions/erc721/drops/read/getClaimConditions.js.map +1 -1
- package/dist/cjs/extensions/erc721/drops/write/claimTo.js +1 -0
- package/dist/cjs/extensions/erc721/drops/write/claimTo.js.map +1 -1
- package/dist/cjs/extensions/erc721/drops/write/claimToBatch.js +1 -0
- package/dist/cjs/extensions/erc721/drops/write/claimToBatch.js.map +1 -1
- package/dist/cjs/extensions/erc721/drops/write/resetClaimEligibility.js +1 -0
- package/dist/cjs/extensions/erc721/drops/write/resetClaimEligibility.js.map +1 -1
- package/dist/cjs/extensions/erc721/drops/write/setClaimConditions.js +1 -0
- package/dist/cjs/extensions/erc721/drops/write/setClaimConditions.js.map +1 -1
- package/dist/cjs/extensions/erc721/lazyMinting/write/createDelayedRevealBatch.js +1 -0
- package/dist/cjs/extensions/erc721/lazyMinting/write/createDelayedRevealBatch.js.map +1 -1
- package/dist/cjs/extensions/erc721/lazyMinting/write/reveal.js +1 -1
- package/dist/cjs/extensions/erc721/write/lazyMint.js +2 -0
- package/dist/cjs/extensions/erc721/write/lazyMint.js.map +1 -1
- package/dist/cjs/extensions/erc721/write/mintTo.js +2 -0
- package/dist/cjs/extensions/erc721/write/mintTo.js.map +1 -1
- package/dist/cjs/extensions/erc721/write/sigMint.js +2 -0
- package/dist/cjs/extensions/erc721/write/sigMint.js.map +1 -1
- package/dist/cjs/extensions/erc721/write/updateTokenURI.js +1 -0
- package/dist/cjs/extensions/erc721/write/updateTokenURI.js.map +1 -1
- package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/BuyScreen.js +9 -0
- package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/BuyScreen.js.map +1 -1
- package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/swap/TokenSelectorScreen.js +6 -39
- package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/swap/TokenSelectorScreen.js.map +1 -1
- package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/swap/fetchBalancesForWallet.js +52 -7
- package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/swap/fetchBalancesForWallet.js.map +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/cjs/version.js.map +1 -1
- package/dist/cjs/wallets/in-app/web/in-app.js +76 -30
- package/dist/cjs/wallets/in-app/web/in-app.js.map +1 -1
- package/dist/cjs/wallets/in-app/web/lib/web-connector.js +9 -1
- package/dist/cjs/wallets/in-app/web/lib/web-connector.js.map +1 -1
- package/dist/esm/extensions/erc1155/drops/read/canClaim.js +1 -1
- package/dist/esm/extensions/erc1155/drops/read/getActiveClaimCondition.js +1 -0
- package/dist/esm/extensions/erc1155/drops/read/getActiveClaimCondition.js.map +1 -1
- package/dist/esm/extensions/erc1155/drops/read/getClaimConditions.js +1 -0
- package/dist/esm/extensions/erc1155/drops/read/getClaimConditions.js.map +1 -1
- package/dist/esm/extensions/erc1155/drops/write/claimTo.js +1 -0
- package/dist/esm/extensions/erc1155/drops/write/claimTo.js.map +1 -1
- package/dist/esm/extensions/erc1155/drops/write/resetClaimEligibility.js +1 -0
- package/dist/esm/extensions/erc1155/drops/write/resetClaimEligibility.js.map +1 -1
- package/dist/esm/extensions/erc1155/drops/write/setClaimConditions.js +1 -0
- package/dist/esm/extensions/erc1155/drops/write/setClaimConditions.js.map +1 -1
- package/dist/esm/extensions/erc1155/write/lazyMint.js +1 -0
- package/dist/esm/extensions/erc1155/write/lazyMint.js.map +1 -1
- package/dist/esm/extensions/erc1155/write/mintAdditionalSupplyTo.js +1 -0
- package/dist/esm/extensions/erc1155/write/mintAdditionalSupplyTo.js.map +1 -1
- package/dist/esm/extensions/erc1155/write/mintAdditionalSupplyToBatch.js +1 -0
- package/dist/esm/extensions/erc1155/write/mintAdditionalSupplyToBatch.js.map +1 -1
- package/dist/esm/extensions/erc1155/write/mintTo.js +1 -0
- package/dist/esm/extensions/erc1155/write/mintTo.js.map +1 -1
- package/dist/esm/extensions/erc1155/write/mintToBatch.js +1 -0
- package/dist/esm/extensions/erc1155/write/mintToBatch.js.map +1 -1
- package/dist/esm/extensions/erc1155/write/sigMint.js +1 -0
- package/dist/esm/extensions/erc1155/write/sigMint.js.map +1 -1
- package/dist/esm/extensions/erc1155/write/updateTokenURI.js +1 -0
- package/dist/esm/extensions/erc1155/write/updateTokenURI.js.map +1 -1
- package/dist/esm/extensions/erc20/drops/read/canClaim.js +1 -1
- package/dist/esm/extensions/erc20/drops/read/getActiveClaimCondition.js +1 -0
- package/dist/esm/extensions/erc20/drops/read/getActiveClaimCondition.js.map +1 -1
- package/dist/esm/extensions/erc20/drops/read/getClaimConditions.js +1 -0
- package/dist/esm/extensions/erc20/drops/read/getClaimConditions.js.map +1 -1
- package/dist/esm/extensions/erc20/drops/write/claimTo.js +2 -0
- package/dist/esm/extensions/erc20/drops/write/claimTo.js.map +1 -1
- package/dist/esm/extensions/erc20/drops/write/resetClaimEligibility.js +1 -0
- package/dist/esm/extensions/erc20/drops/write/resetClaimEligibility.js.map +1 -1
- package/dist/esm/extensions/erc20/drops/write/setClaimConditions.js +1 -0
- package/dist/esm/extensions/erc20/drops/write/setClaimConditions.js.map +1 -1
- package/dist/esm/extensions/erc20/write/mintTo.js +1 -0
- package/dist/esm/extensions/erc20/write/mintTo.js.map +1 -1
- package/dist/esm/extensions/erc20/write/sigMint.js +1 -0
- package/dist/esm/extensions/erc20/write/sigMint.js.map +1 -1
- package/dist/esm/extensions/erc721/drops/read/canClaim.js +2 -0
- package/dist/esm/extensions/erc721/drops/read/canClaim.js.map +1 -1
- package/dist/esm/extensions/erc721/drops/read/getActiveClaimCondition.js +4 -0
- package/dist/esm/extensions/erc721/drops/read/getActiveClaimCondition.js.map +1 -1
- package/dist/esm/extensions/erc721/drops/read/getClaimConditions.js +3 -0
- package/dist/esm/extensions/erc721/drops/read/getClaimConditions.js.map +1 -1
- package/dist/esm/extensions/erc721/drops/write/claimTo.js +1 -0
- package/dist/esm/extensions/erc721/drops/write/claimTo.js.map +1 -1
- package/dist/esm/extensions/erc721/drops/write/claimToBatch.js +1 -0
- package/dist/esm/extensions/erc721/drops/write/claimToBatch.js.map +1 -1
- package/dist/esm/extensions/erc721/drops/write/resetClaimEligibility.js +1 -0
- package/dist/esm/extensions/erc721/drops/write/resetClaimEligibility.js.map +1 -1
- package/dist/esm/extensions/erc721/drops/write/setClaimConditions.js +1 -0
- package/dist/esm/extensions/erc721/drops/write/setClaimConditions.js.map +1 -1
- package/dist/esm/extensions/erc721/lazyMinting/write/createDelayedRevealBatch.js +1 -0
- package/dist/esm/extensions/erc721/lazyMinting/write/createDelayedRevealBatch.js.map +1 -1
- package/dist/esm/extensions/erc721/lazyMinting/write/reveal.js +1 -1
- package/dist/esm/extensions/erc721/write/lazyMint.js +2 -0
- package/dist/esm/extensions/erc721/write/lazyMint.js.map +1 -1
- package/dist/esm/extensions/erc721/write/mintTo.js +2 -0
- package/dist/esm/extensions/erc721/write/mintTo.js.map +1 -1
- package/dist/esm/extensions/erc721/write/sigMint.js +2 -0
- package/dist/esm/extensions/erc721/write/sigMint.js.map +1 -1
- package/dist/esm/extensions/erc721/write/updateTokenURI.js +1 -0
- package/dist/esm/extensions/erc721/write/updateTokenURI.js.map +1 -1
- package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/BuyScreen.js +9 -0
- package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/BuyScreen.js.map +1 -1
- package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/swap/TokenSelectorScreen.js +7 -40
- package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/swap/TokenSelectorScreen.js.map +1 -1
- package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/swap/fetchBalancesForWallet.js +51 -6
- package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/swap/fetchBalancesForWallet.js.map +1 -1
- package/dist/esm/version.js +1 -1
- package/dist/esm/version.js.map +1 -1
- package/dist/esm/wallets/in-app/web/in-app.js +76 -30
- package/dist/esm/wallets/in-app/web/in-app.js.map +1 -1
- package/dist/esm/wallets/in-app/web/lib/web-connector.js +9 -1
- package/dist/esm/wallets/in-app/web/lib/web-connector.js.map +1 -1
- package/dist/types/extensions/erc1155/drops/read/canClaim.d.ts +1 -1
- package/dist/types/extensions/erc1155/drops/read/getActiveClaimCondition.d.ts +1 -0
- package/dist/types/extensions/erc1155/drops/read/getActiveClaimCondition.d.ts.map +1 -1
- package/dist/types/extensions/erc1155/drops/read/getClaimConditions.d.ts +1 -0
- package/dist/types/extensions/erc1155/drops/read/getClaimConditions.d.ts.map +1 -1
- package/dist/types/extensions/erc1155/drops/write/claimTo.d.ts +1 -0
- package/dist/types/extensions/erc1155/drops/write/claimTo.d.ts.map +1 -1
- package/dist/types/extensions/erc1155/drops/write/resetClaimEligibility.d.ts +1 -0
- package/dist/types/extensions/erc1155/drops/write/resetClaimEligibility.d.ts.map +1 -1
- package/dist/types/extensions/erc1155/drops/write/setClaimConditions.d.ts +1 -0
- package/dist/types/extensions/erc1155/drops/write/setClaimConditions.d.ts.map +1 -1
- package/dist/types/extensions/erc1155/write/lazyMint.d.ts +1 -0
- package/dist/types/extensions/erc1155/write/lazyMint.d.ts.map +1 -1
- package/dist/types/extensions/erc1155/write/mintAdditionalSupplyTo.d.ts +1 -0
- package/dist/types/extensions/erc1155/write/mintAdditionalSupplyTo.d.ts.map +1 -1
- package/dist/types/extensions/erc1155/write/mintAdditionalSupplyToBatch.d.ts +1 -0
- package/dist/types/extensions/erc1155/write/mintAdditionalSupplyToBatch.d.ts.map +1 -1
- package/dist/types/extensions/erc1155/write/mintTo.d.ts +1 -0
- package/dist/types/extensions/erc1155/write/mintTo.d.ts.map +1 -1
- package/dist/types/extensions/erc1155/write/mintToBatch.d.ts +1 -0
- package/dist/types/extensions/erc1155/write/mintToBatch.d.ts.map +1 -1
- package/dist/types/extensions/erc1155/write/sigMint.d.ts +1 -0
- package/dist/types/extensions/erc1155/write/sigMint.d.ts.map +1 -1
- package/dist/types/extensions/erc1155/write/updateTokenURI.d.ts +1 -0
- package/dist/types/extensions/erc1155/write/updateTokenURI.d.ts.map +1 -1
- package/dist/types/extensions/erc20/drops/read/canClaim.d.ts +1 -1
- package/dist/types/extensions/erc20/drops/read/getActiveClaimCondition.d.ts +1 -0
- package/dist/types/extensions/erc20/drops/read/getActiveClaimCondition.d.ts.map +1 -1
- package/dist/types/extensions/erc20/drops/read/getClaimConditions.d.ts +1 -0
- package/dist/types/extensions/erc20/drops/read/getClaimConditions.d.ts.map +1 -1
- package/dist/types/extensions/erc20/drops/write/claimTo.d.ts +2 -0
- package/dist/types/extensions/erc20/drops/write/claimTo.d.ts.map +1 -1
- package/dist/types/extensions/erc20/drops/write/resetClaimEligibility.d.ts +1 -0
- package/dist/types/extensions/erc20/drops/write/resetClaimEligibility.d.ts.map +1 -1
- package/dist/types/extensions/erc20/drops/write/setClaimConditions.d.ts +1 -0
- package/dist/types/extensions/erc20/drops/write/setClaimConditions.d.ts.map +1 -1
- package/dist/types/extensions/erc20/write/mintTo.d.ts +1 -0
- package/dist/types/extensions/erc20/write/mintTo.d.ts.map +1 -1
- package/dist/types/extensions/erc20/write/sigMint.d.ts +1 -0
- package/dist/types/extensions/erc20/write/sigMint.d.ts.map +1 -1
- package/dist/types/extensions/erc721/drops/read/canClaim.d.ts +2 -0
- package/dist/types/extensions/erc721/drops/read/canClaim.d.ts.map +1 -1
- package/dist/types/extensions/erc721/drops/read/getActiveClaimCondition.d.ts +4 -0
- package/dist/types/extensions/erc721/drops/read/getActiveClaimCondition.d.ts.map +1 -1
- package/dist/types/extensions/erc721/drops/read/getClaimConditions.d.ts +3 -0
- package/dist/types/extensions/erc721/drops/read/getClaimConditions.d.ts.map +1 -1
- package/dist/types/extensions/erc721/drops/write/claimTo.d.ts +1 -0
- package/dist/types/extensions/erc721/drops/write/claimTo.d.ts.map +1 -1
- package/dist/types/extensions/erc721/drops/write/claimToBatch.d.ts +1 -0
- package/dist/types/extensions/erc721/drops/write/claimToBatch.d.ts.map +1 -1
- package/dist/types/extensions/erc721/drops/write/resetClaimEligibility.d.ts +1 -0
- package/dist/types/extensions/erc721/drops/write/resetClaimEligibility.d.ts.map +1 -1
- package/dist/types/extensions/erc721/drops/write/setClaimConditions.d.ts +1 -0
- package/dist/types/extensions/erc721/drops/write/setClaimConditions.d.ts.map +1 -1
- package/dist/types/extensions/erc721/lazyMinting/write/createDelayedRevealBatch.d.ts +1 -0
- package/dist/types/extensions/erc721/lazyMinting/write/createDelayedRevealBatch.d.ts.map +1 -1
- package/dist/types/extensions/erc721/lazyMinting/write/reveal.d.ts +1 -1
- package/dist/types/extensions/erc721/write/lazyMint.d.ts +2 -0
- package/dist/types/extensions/erc721/write/lazyMint.d.ts.map +1 -1
- package/dist/types/extensions/erc721/write/mintTo.d.ts +2 -0
- package/dist/types/extensions/erc721/write/mintTo.d.ts.map +1 -1
- package/dist/types/extensions/erc721/write/sigMint.d.ts +2 -0
- package/dist/types/extensions/erc721/write/sigMint.d.ts.map +1 -1
- package/dist/types/extensions/erc721/write/updateTokenURI.d.ts +1 -0
- package/dist/types/extensions/erc721/write/updateTokenURI.d.ts.map +1 -1
- package/dist/types/react/web/ui/ConnectWallet/screens/Buy/BuyScreen.d.ts.map +1 -1
- package/dist/types/react/web/ui/ConnectWallet/screens/Buy/swap/TokenSelectorScreen.d.ts.map +1 -1
- package/dist/types/react/web/ui/ConnectWallet/screens/Buy/swap/fetchBalancesForWallet.d.ts +12 -12
- package/dist/types/react/web/ui/ConnectWallet/screens/Buy/swap/fetchBalancesForWallet.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/in-app/web/in-app.d.ts +76 -30
- package/dist/types/wallets/in-app/web/in-app.d.ts.map +1 -1
- package/dist/types/wallets/in-app/web/lib/web-connector.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/extensions/erc1155/drops/read/canClaim.ts +1 -1
- package/src/extensions/erc1155/drops/read/getActiveClaimCondition.ts +1 -0
- package/src/extensions/erc1155/drops/read/getClaimConditions.ts +1 -0
- package/src/extensions/erc1155/drops/write/claimTo.ts +1 -0
- package/src/extensions/erc1155/drops/write/resetClaimEligibility.ts +1 -0
- package/src/extensions/erc1155/drops/write/setClaimConditions.ts +1 -0
- package/src/extensions/erc1155/write/lazyMint.ts +1 -0
- package/src/extensions/erc1155/write/mintAdditionalSupplyTo.ts +1 -0
- package/src/extensions/erc1155/write/mintAdditionalSupplyToBatch.ts +1 -0
- package/src/extensions/erc1155/write/mintTo.ts +1 -0
- package/src/extensions/erc1155/write/mintToBatch.ts +1 -0
- package/src/extensions/erc1155/write/sigMint.ts +1 -0
- package/src/extensions/erc1155/write/updateTokenURI.ts +1 -0
- package/src/extensions/erc20/drops/read/canClaim.ts +1 -1
- package/src/extensions/erc20/drops/read/getActiveClaimCondition.ts +1 -0
- package/src/extensions/erc20/drops/read/getClaimConditions.ts +1 -0
- package/src/extensions/erc20/drops/write/claimTo.ts +2 -0
- package/src/extensions/erc20/drops/write/resetClaimEligibility.ts +1 -0
- package/src/extensions/erc20/drops/write/setClaimConditions.ts +1 -0
- package/src/extensions/erc20/write/mintTo.ts +1 -0
- package/src/extensions/erc20/write/sigMint.ts +1 -0
- package/src/extensions/erc721/drops/read/canClaim.ts +2 -0
- package/src/extensions/erc721/drops/read/getActiveClaimCondition.ts +4 -0
- package/src/extensions/erc721/drops/read/getClaimConditions.ts +3 -0
- package/src/extensions/erc721/drops/write/claimTo.ts +1 -0
- package/src/extensions/erc721/drops/write/claimToBatch.ts +1 -0
- package/src/extensions/erc721/drops/write/resetClaimEligibility.ts +1 -0
- package/src/extensions/erc721/drops/write/setClaimConditions.ts +1 -0
- package/src/extensions/erc721/lazyMinting/write/createDelayedRevealBatch.ts +1 -0
- package/src/extensions/erc721/lazyMinting/write/reveal.ts +1 -1
- package/src/extensions/erc721/write/lazyMint.ts +2 -0
- package/src/extensions/erc721/write/mintTo.ts +2 -0
- package/src/extensions/erc721/write/sigMint.ts +2 -0
- package/src/extensions/erc721/write/updateTokenURI.ts +1 -0
- package/src/react/web/ui/ConnectWallet/screens/Buy/BuyScreen.tsx +10 -0
- package/src/react/web/ui/ConnectWallet/screens/Buy/swap/TokenSelectorScreen.tsx +7 -47
- package/src/react/web/ui/ConnectWallet/screens/Buy/swap/{fetchBalancesForWallet.ts → fetchBalancesForWallet.tsx} +70 -8
- package/src/version.ts +1 -1
- package/src/wallets/in-app/web/in-app.ts +76 -30
- package/src/wallets/in-app/web/lib/in-app-integration.test.ts +112 -0
- package/src/wallets/in-app/web/lib/web-connector.ts +11 -1
- package/src/wallets/in-app/web/lib/in-app-backend.test.ts +0 -27
@@ -20,7 +20,7 @@ import type { InAppWalletCreationOptions } from "../core/wallet/types.js";
|
|
20
20
|
* const account = await wallet.connect({
|
21
21
|
* client,
|
22
22
|
* chain,
|
23
|
-
* strategy: "google",
|
23
|
+
* strategy: "google", // or "apple", "facebook","discord", "github", "twitch", "x", "telegram", "line", "coinbase", etc
|
24
24
|
* });
|
25
25
|
* ```
|
26
26
|
*
|
@@ -28,15 +28,21 @@ import type { InAppWalletCreationOptions } from "../core/wallet/types.js";
|
|
28
28
|
*
|
29
29
|
* ### Enable smart accounts and sponsor gas for your users:
|
30
30
|
*
|
31
|
+
* With the `executionMode` option, you can enable smart accounts and sponsor gas for your users.
|
32
|
+
*
|
33
|
+
* **Using EIP-7702** (recommended):
|
34
|
+
*
|
35
|
+
* On chains with EIP-7702 enabled, you can upgrade the inapp wallet to a smart account, keeping the same address and performance as the regular EOA.
|
36
|
+
*
|
31
37
|
* ```ts
|
32
38
|
* import { inAppWallet } from "thirdweb/wallets";
|
33
39
|
* import { sepolia } from "thirdweb/chains";
|
34
40
|
*
|
35
41
|
* const wallet = inAppWallet({
|
36
|
-
*
|
37
|
-
*
|
42
|
+
* executionMode: {
|
43
|
+
* mode: "EIP7702",
|
38
44
|
* sponsorGas: true,
|
39
|
-
*
|
45
|
+
* },
|
40
46
|
* });
|
41
47
|
*
|
42
48
|
* // account will be a smart account with sponsored gas enabled
|
@@ -46,8 +52,28 @@ import type { InAppWalletCreationOptions } from "../core/wallet/types.js";
|
|
46
52
|
* });
|
47
53
|
* ```
|
48
54
|
*
|
55
|
+
* **Using EIP-4337**:
|
56
|
+
*
|
57
|
+
* On chains without EIP-7702 enabled, you can still use smart accounts using EIP-4337, this will return a different address (the smart contract address) than the regular EOA.
|
58
|
+
*
|
59
|
+
* ```ts
|
60
|
+
* import { inAppWallet } from "thirdweb/wallets/in-app";
|
61
|
+
*
|
62
|
+
* const wallet = inAppWallet({
|
63
|
+
* executionMode: {
|
64
|
+
* mode: "EIP4337",
|
65
|
+
* smartAccount: {
|
66
|
+
* chain: sepolia, // chain required for EIP-4337
|
67
|
+
* sponsorGas: true,
|
68
|
+
* }
|
69
|
+
* },
|
70
|
+
* });
|
71
|
+
* ```
|
72
|
+
*
|
49
73
|
* ### Login with email
|
50
74
|
*
|
75
|
+
* To login with email, you can use the `preAuthenticate` function to first send a verification code to the user's email, then login with the verification code.
|
76
|
+
*
|
51
77
|
* ```ts
|
52
78
|
* import { inAppWallet, preAuthenticate } from "thirdweb/wallets/in-app";
|
53
79
|
*
|
@@ -70,22 +96,10 @@ import type { InAppWalletCreationOptions } from "../core/wallet/types.js";
|
|
70
96
|
* });
|
71
97
|
* ```
|
72
98
|
*
|
73
|
-
* ### Login with
|
74
|
-
* ```ts
|
75
|
-
* import { inAppWallet, createWallet } from "thirdweb/wallets";
|
76
|
-
*
|
77
|
-
* const rabby = createWallet("io.rabby");
|
78
|
-
* const inAppWallet = inAppWallet();
|
99
|
+
* ### Login with phone number
|
79
100
|
*
|
80
|
-
*
|
81
|
-
* strategy: "wallet",
|
82
|
-
* chain: mainnet,
|
83
|
-
* wallet: rabby,
|
84
|
-
* client: MY_CLIENT
|
85
|
-
* });
|
86
|
-
* ```
|
101
|
+
* Similar to email, you can login with a phone number by first sending a verification code to the user's phone number, then login with the verification code.
|
87
102
|
*
|
88
|
-
* ### Login with phone number
|
89
103
|
* ```ts
|
90
104
|
* import { inAppWallet, preAuthenticate } from "thirdweb/wallets/in-app";
|
91
105
|
*
|
@@ -108,8 +122,28 @@ import type { InAppWalletCreationOptions } from "../core/wallet/types.js";
|
|
108
122
|
* });
|
109
123
|
* ```
|
110
124
|
*
|
125
|
+
* ### Login with another wallet (SIWE)
|
126
|
+
*
|
127
|
+
* You can also login to the in-app wallet with another existing wallet by signing a standard Sign in with Ethereum (SIWE) message.
|
128
|
+
*
|
129
|
+
* ```ts
|
130
|
+
* import { inAppWallet, createWallet } from "thirdweb/wallets";
|
131
|
+
*
|
132
|
+
* const rabby = createWallet("io.rabby");
|
133
|
+
* const inAppWallet = inAppWallet();
|
134
|
+
*
|
135
|
+
* const account = await inAppWallet.connect({
|
136
|
+
* strategy: "wallet",
|
137
|
+
* chain: mainnet,
|
138
|
+
* wallet: rabby,
|
139
|
+
* client: MY_CLIENT
|
140
|
+
* });
|
141
|
+
* ```
|
142
|
+
*
|
111
143
|
* ### Login with passkey
|
112
144
|
*
|
145
|
+
* You can also login with a passkey. This mode requires specifying whether it should create a new passkey, or sign in with an existing passkey. We recommend checking if the user has a passkey stored in their browser to automatically login with it.
|
146
|
+
*
|
113
147
|
* ```ts
|
114
148
|
* import { inAppWallet, hasStoredPasskey } from "thirdweb/wallets/in-app";
|
115
149
|
*
|
@@ -125,6 +159,11 @@ import type { InAppWalletCreationOptions } from "../core/wallet/types.js";
|
|
125
159
|
* ```
|
126
160
|
*
|
127
161
|
* ### Connect to a guest account
|
162
|
+
*
|
163
|
+
* You can also connect to a guest account, this will create a new account for the user instantly and store it in the browser's local storage.
|
164
|
+
*
|
165
|
+
* You can later "upgrade" this account by linking another auth method, like email or phone for example. This will preserve the account's address and history.
|
166
|
+
*
|
128
167
|
* ```ts
|
129
168
|
* import { inAppWallet } from "thirdweb/wallets";
|
130
169
|
*
|
@@ -138,19 +177,19 @@ import type { InAppWalletCreationOptions } from "../core/wallet/types.js";
|
|
138
177
|
*
|
139
178
|
* ### Connect to a backend account
|
140
179
|
*
|
141
|
-
*
|
180
|
+
* For usage in backends, you can create wallets with the `backend` strategy and a stable walletSecret.
|
181
|
+
*
|
182
|
+
* Make sure to keep that walletSecret safe as it is the key to access that wallet, never expose it to the client.
|
142
183
|
*
|
143
184
|
* ```ts
|
144
185
|
* import { inAppWallet } from "thirdweb/wallets";
|
145
186
|
*
|
146
|
-
* const wallet = inAppWallet(
|
147
|
-
* storage: inMemoryStorage, // for usage in backends/scripts
|
148
|
-
* });
|
187
|
+
* const wallet = inAppWallet();
|
149
188
|
*
|
150
189
|
* const account = await wallet.connect({
|
151
190
|
* client,
|
152
191
|
* strategy: "backend",
|
153
|
-
* walletSecret: "...", //
|
192
|
+
* walletSecret: "...", // Your own secret, keep it safe
|
154
193
|
* });
|
155
194
|
* ```
|
156
195
|
*
|
@@ -186,16 +225,21 @@ import type { InAppWalletCreationOptions } from "../core/wallet/types.js";
|
|
186
225
|
* });
|
187
226
|
* ```
|
188
227
|
*
|
189
|
-
* ### Specify a logo for your login page (Connect UI)
|
228
|
+
* ### Specify a logo, icon and name for your login page (Connect UI)
|
229
|
+
*
|
230
|
+
* You can specify a logo, icon and name for your login page to customize how in-app wallets are displayed in the Connect UI components (ConnectButton and ConnectEmbed).
|
231
|
+
*
|
190
232
|
* ```ts
|
191
233
|
* import { inAppWallet } from "thirdweb/wallets";
|
192
234
|
* const wallet = inAppWallet({
|
193
235
|
* metadata: {
|
194
|
-
*
|
195
|
-
*
|
196
|
-
*
|
197
|
-
*
|
198
|
-
*
|
236
|
+
* name: "My App",
|
237
|
+
* icon: "https://example.com/icon.png",
|
238
|
+
* image: {
|
239
|
+
* src: "https://example.com/logo.png",
|
240
|
+
* alt: "My logo",
|
241
|
+
* width: 100,
|
242
|
+
* height: 100,
|
199
243
|
* },
|
200
244
|
* },
|
201
245
|
* });
|
@@ -203,6 +247,8 @@ import type { InAppWalletCreationOptions } from "../core/wallet/types.js";
|
|
203
247
|
*
|
204
248
|
* ### Hide the ability to export the private key within the Connect Modal UI
|
205
249
|
*
|
250
|
+
* By default, the Connect Modal will show a button to export the private key of the wallet. You can hide this button by setting the `hidePrivateKeyExport` option to `true`.
|
251
|
+
*
|
206
252
|
* ```ts
|
207
253
|
* import { inAppWallet } from "thirdweb/wallets";
|
208
254
|
* const wallet = inAppWallet({
|
@@ -225,7 +271,7 @@ import type { InAppWalletCreationOptions } from "../core/wallet/types.js";
|
|
225
271
|
*
|
226
272
|
* ### Override storage for the wallet state
|
227
273
|
*
|
228
|
-
* By default, wallet state is stored in the browser's local storage. You can override this behavior by providing a custom storage object, useful for server side integrations.
|
274
|
+
* By default, wallet state is stored in the browser's local storage if in the browser, or in-memory storage if not in the browser. You can override this behavior by providing a custom storage object, useful for server side and CLI integrations.
|
229
275
|
*
|
230
276
|
* ```ts
|
231
277
|
* import { inAppWallet } from "thirdweb/wallets";
|
@@ -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;AAEzD,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,yBAAyB,CAAC;AAE1E
|
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;AAEzD,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,yBAAyB,CAAC;AAE1E;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwSG;AACH,wBAAgB,WAAW,CACzB,aAAa,CAAC,EAAE,0BAA0B,GACzC,MAAM,CAAC,OAAO,CAAC,CAYjB"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"web-connector.d.ts","sourceRoot":"","sources":["../../../../../../src/wallets/in-app/web/lib/web-connector.ts"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"web-connector.d.ts","sourceRoot":"","sources":["../../../../../../src/wallets/in-app/web/lib/web-connector.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AACrE,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,+BAA+B,CAAC;AAiB7D,OAAO,KAAK,EACV,YAAY,EACZ,mBAAmB,EACnB,mCAAmC,EACnC,OAAO,EACP,gBAAgB,EAChB,qBAAqB,EACrB,yBAAyB,EACzB,OAAO,EACP,sBAAsB,EACvB,MAAM,oCAAoC,CAAC;AAC5C,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oCAAoC,CAAC;AAGzE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iCAAiC,CAAC;AAClE,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,aAAa,CAAC;AAE9D,OAAO,EAAE,IAAI,EAAyB,MAAM,uBAAuB,CAAC;AAKpE;;GAEG;AACH,qBAAa,iBAAkB,YAAW,cAAc;IACtD,OAAO,CAAC,MAAM,CAAiB;IAC/B,OAAO,CAAC,SAAS,CAAC,CAAY;IAC9B,OAAO,CAAC,OAAO,CAAkD;IACjE,OAAO,CAAC,OAAO,CAAsB;IAErC,OAAO,CAAC,MAAM,CAAC,CAAa;IAC5B;;OAEG;IACH,IAAI,EAAE,IAAI,CAAC;IACX,OAAO,CAAC,aAAa,CAAC,CAAS;IAE/B,OAAO,CAAC,qBAAqB;IAO7B;;;;OAIG;gBACS,EACV,MAAM,EACN,aAAa,EACb,SAAS,EACT,aAAa,EACb,OAAO,GACR,EAAE,0BAA0B;IA6FvB,gBAAgB,CAAC,SAAS,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,UAAU,CAAC;IAwC/D;;;;;;;;;;;;;;;;;;;;;;OAsBG;IACG,OAAO,IAAI,OAAO,CAAC,OAAO,CAAC;IAejC,UAAU,IAAI,OAAO,CAAC,OAAO,CAAC;IAOxB,eAAe,CAAC,IAAI,EAAE,yBAAyB,GAAG,OAAO,CAAC,IAAI,CAAC;IAQ/D,wBAAwB,CAC5B,QAAQ,EAAE,gBAAgB,EAC1B,IAAI,CAAC,EAAE,UAAU,GAAG,OAAO,GAAG,QAAQ,EACtC,WAAW,CAAC,EAAE,MAAM,GACnB,OAAO,CAAC,IAAI,CAAC;IAUV,kBAAkB,CACtB,UAAU,EAAE,mCAAmC,EAC/C,YAAY,CAAC,EAAE,MAAM;IAKvB;;OAEG;IACG,YAAY,CAChB,IAAI,EAAE,qBAAqB,GAAG,sBAAsB,GACnD,OAAO,CAAC,mCAAmC,CAAC;IAoF/C;;OAEG;IACG,OAAO,CACX,IAAI,EAAE,qBAAqB,GAAG,sBAAsB,GACnD,OAAO,CAAC,mBAAmB,CAAC;IA8CzB,MAAM,IAAI,OAAO,CAAC,gBAAgB,CAAC;YAI3B,WAAW;IAgCnB,WAAW,CAAC,IAAI,EAAE,YAAY;IAU9B,aAAa,CAAC,OAAO,EAAE,OAAO;IAS9B,WAAW;CAOlB"}
|
package/package.json
CHANGED
@@ -18,7 +18,7 @@ export type CanClaimResult = {
|
|
18
18
|
|
19
19
|
/**
|
20
20
|
* Check if a user can claim a drop.
|
21
|
-
*
|
21
|
+
* This method is only available on the `DropERC1155` contract.
|
22
22
|
* @param options - The options for the transaction.
|
23
23
|
* @returns Whether the user can claim the drop.
|
24
24
|
*
|
@@ -17,6 +17,7 @@ import {
|
|
17
17
|
export type GetActiveClaimConditionParams = GetActiveClaimConditionIdParams;
|
18
18
|
/**
|
19
19
|
* Retrieves the active claim condition.
|
20
|
+
* This method is only available on the `DropERC1155` contract.
|
20
21
|
* @param options - The transaction options.
|
21
22
|
* @returns A promise that resolves to the active claim condition.
|
22
23
|
* @throws An error if the claim condition is unsupported.
|
@@ -9,6 +9,7 @@ export type GetClaimConditionsParams = {
|
|
9
9
|
};
|
10
10
|
/**
|
11
11
|
* Retrieves all claim conditions.
|
12
|
+
* This method is only available on the `DropERC1155` contract.
|
12
13
|
* @param options - The transaction options.
|
13
14
|
* @returns A promise that resolves to all claim conditions.
|
14
15
|
* @throws An error if the claim conditions are unsupported by the contract.
|
@@ -23,6 +23,7 @@ export type ResetClaimEligibilityParams = GetClaimConditionsParams;
|
|
23
23
|
|
24
24
|
/**
|
25
25
|
* Reset the claim eligibility for all users.
|
26
|
+
* This method is only available on the `DropERC1155` contract.
|
26
27
|
* @param options
|
27
28
|
* @returns the prepared transaction
|
28
29
|
* @extension ERC1155
|
@@ -37,6 +37,7 @@ export type LazyMintParams = {
|
|
37
37
|
|
38
38
|
/**
|
39
39
|
* Lazily mints ERC1155 tokens.
|
40
|
+
* This method is only available on the `DropERC1155` contract.
|
40
41
|
* @param options - The options for the lazy minting process.
|
41
42
|
* @returns A promise that resolves to the prepared contract call.
|
42
43
|
* @extension ERC1155
|
@@ -13,6 +13,7 @@ export type MintAdditionalSupplyToParams = {
|
|
13
13
|
|
14
14
|
/**
|
15
15
|
* Mints a "supply" number of additional ERC1155 tokens to the specified "to" address.
|
16
|
+
* This method is only available on the `TokenERC1155` contract.
|
16
17
|
* @param options - The transaction options.
|
17
18
|
* @returns A promise that resolves to the transaction result.
|
18
19
|
* @extension ERC1155
|
@@ -16,6 +16,7 @@ export type MintAdditionalSupplyToBatchParams = WithOverrides<{
|
|
16
16
|
|
17
17
|
/**
|
18
18
|
* This extension batches multiple `mintAdditionalSupplyToBatch` extensions into one single multicall.
|
19
|
+
* This method is only available on the `TokenERC1155` contract.
|
19
20
|
* Keep in mind that there is a limit of how many NFTs you can mint per transaction.
|
20
21
|
* This limit varies depends on the network that you are transacting on.
|
21
22
|
*
|
@@ -19,6 +19,7 @@ export type MintToParams = WithOverrides<{
|
|
19
19
|
|
20
20
|
/**
|
21
21
|
* Mints a "supply" number of new ERC1155 tokens to the specified "to" address.
|
22
|
+
* This method is only available on the `TokenERC1155` contract.
|
22
23
|
* If the `nft` parameter is a string, it will be used as the token URI.
|
23
24
|
* If the `nft` parameter is a file, it will be uploaded to the storage server and the resulting URI will be used as the token URI.
|
24
25
|
* @param options - The transaction options.
|
@@ -40,6 +40,7 @@ export type MintToBatchParams = WithOverrides<{
|
|
40
40
|
|
41
41
|
/**
|
42
42
|
* This extension batches multiple `mintTo` extensions into one single multicall.
|
43
|
+
* This method is only available on the `TokenERC1155` contract.
|
43
44
|
* Keep in mind that there is a limit of how many NFTs you can mint per transaction.
|
44
45
|
* This limit varies depends on the network that you are transacting on.
|
45
46
|
*
|
@@ -20,6 +20,7 @@ export type UpdateTokenURIParams = {
|
|
20
20
|
* which means it uses `setTokenURI` under the hood.
|
21
21
|
* While the `setTokenURI` method only takes in a uri string, this extension takes in a user-friendly [`NFTInput`](https://portal.thirdweb.com/references/typescript/v5/NFTInput),
|
22
22
|
* upload that content to IPFS and pass the IPFS URI (of said `NFTInput`) to the underlying `setTokenURI` method.
|
23
|
+
* This method is only available on the `TokenERC1155` contract.
|
23
24
|
*
|
24
25
|
* This extension does not validate the NFTInput so make sure you are passing the proper content that you want to update.
|
25
26
|
*
|
@@ -5,6 +5,7 @@ import * as MultiById from "../../__generated__/IDropERC20/read/getClaimConditio
|
|
5
5
|
|
6
6
|
/**
|
7
7
|
* Retrieves the active claim condition.
|
8
|
+
* This method is only available on the `DropERC20` contract.
|
8
9
|
* @param options - The transaction options.
|
9
10
|
* @returns A promise that resolves to the active claim condition.
|
10
11
|
* @throws An error if the claim condition is unsupported.
|
@@ -5,6 +5,7 @@ import * as MultiById from "../../__generated__/IDropERC20/read/getClaimConditio
|
|
5
5
|
|
6
6
|
/**
|
7
7
|
* Retrieves all claim conditions.
|
8
|
+
* This method is only available on the `DropERC20` contract.
|
8
9
|
* @param options - The transaction options.
|
9
10
|
* @returns A promise that resolves to all claim conditions.
|
10
11
|
* @throws An error if the claim conditions are unsupported by the contract.
|
@@ -27,6 +27,7 @@ export type MintToParams = Prettify<
|
|
27
27
|
|
28
28
|
/**
|
29
29
|
* Mints a specified amount of tokens to a given address.
|
30
|
+
* This method is only available on the `TokenERC20` contract.
|
30
31
|
* @param options - The options for minting tokens.
|
31
32
|
* @returns A prepared transaction object.
|
32
33
|
* @extension ERC20
|
@@ -18,6 +18,8 @@ export type CanClaimResult = {
|
|
18
18
|
/**
|
19
19
|
* Check if a user can claim a drop.
|
20
20
|
*
|
21
|
+
* This method is only available on the `DropERC721` contract.
|
22
|
+
*
|
21
23
|
* @param options - The options for the transaction.
|
22
24
|
* @returns Whether the user can claim the drop.
|
23
25
|
*
|
@@ -5,6 +5,8 @@ import * as ById from "../../__generated__/IDrop/read/getClaimConditionById.js";
|
|
5
5
|
|
6
6
|
/**
|
7
7
|
* Retrieves the active claim condition.
|
8
|
+
* This method is only available on the `DropERC721` contract.
|
9
|
+
*
|
8
10
|
* @param options - The transaction options.
|
9
11
|
* @returns A promise that resolves to the active claim condition.
|
10
12
|
* @throws An error if the claim condition is unsupported.
|
@@ -28,6 +30,8 @@ export async function getActiveClaimCondition(
|
|
28
30
|
|
29
31
|
/**
|
30
32
|
* Checks if the `getActiveClaimCondition` method is supported by the given contract.
|
33
|
+
* This method is only available on the `DropERC721` contract.
|
34
|
+
*
|
31
35
|
* @param availableSelectors An array of 4byte function selectors of the contract. You can get this in various ways, such as using "whatsabi" or if you have the ABI of the contract available you can use it to generate the selectors.
|
32
36
|
* @returns A boolean indicating if the `getActiveClaimCondition` method is supported.
|
33
37
|
* @extension ERC721
|
@@ -5,6 +5,9 @@ import * as MultiById from "../../__generated__/IDrop/read/getClaimConditionById
|
|
5
5
|
|
6
6
|
/**
|
7
7
|
* Retrieves all claim conditions.
|
8
|
+
*
|
9
|
+
* This method is only available on the `DropERC721` contract.
|
10
|
+
*
|
8
11
|
* @param options - The transaction options.
|
9
12
|
* @returns A promise that resolves to all claim conditions.
|
10
13
|
* @throws An error if the claim conditions are unsupported by the contract.
|
@@ -22,6 +22,7 @@ export type ClaimToBatchParams = WithOverrides<{
|
|
22
22
|
* This extension batches multiple `claimTo` extensions into one single multicall.
|
23
23
|
* Keep in mind that there is a limit of how many NFTs you can claim per transaction.
|
24
24
|
* This limit varies depends on the network that you are transacting on.
|
25
|
+
* This method is only available on the `DropERC721` contract.
|
25
26
|
*
|
26
27
|
* You are recommended to experiment with the number to figure out the best number for your chain of choice.
|
27
28
|
* @extension ERC721
|
@@ -32,6 +32,7 @@ export type CreateDelayedRevealBatchParams = {
|
|
32
32
|
|
33
33
|
/**
|
34
34
|
* Creates a batch of encrypted NFTs that can be revealed at a later time.
|
35
|
+
* This method is only available on the `DropERC721` contract.
|
35
36
|
*
|
36
37
|
* @param options {CreateDelayedRevealBatchParams} - The delayed reveal options.
|
37
38
|
* @param options.placeholderMetadata {@link NFTInput} - The placeholder metadata for the batch.
|
@@ -14,7 +14,7 @@ export type RevealParams = {
|
|
14
14
|
|
15
15
|
/**
|
16
16
|
* Reveals a previously lazy minted batch of NFTs.
|
17
|
-
*
|
17
|
+
* This method is only available on the `DropERC721` contract.
|
18
18
|
* @param options {RevealParams} - The reveal parameters.
|
19
19
|
* @param options.batchId {number} - The ID of the batch to reveal. Get this by calling `getBatchesToReveal`. {@see getBatchesToReveal}
|
20
20
|
* @param options.password {string} - The password for the reveal, set when the batch was created. {@see createDelayedRevealBatch}
|
@@ -19,6 +19,8 @@ export type LazyMintParams = {
|
|
19
19
|
|
20
20
|
/**
|
21
21
|
* Lazily mints ERC721 tokens.
|
22
|
+
* This method is only available on the `DropERC721` contract.
|
23
|
+
*
|
22
24
|
* @param options - The options for the lazy minting process.
|
23
25
|
* @returns A promise that resolves to the prepared contract call.
|
24
26
|
* @extension ERC721
|
@@ -17,6 +17,8 @@ export type MintToParams = WithOverrides<{
|
|
17
17
|
|
18
18
|
/**
|
19
19
|
* Mints a new ERC721 token and assigns it to the specified address.
|
20
|
+
* This method is only available on the `TokenERC721` contract.
|
21
|
+
*
|
20
22
|
* If the `nft` parameter is a string, it will be used as the token URI.
|
21
23
|
* If the `nft` parameter is a file, it will be uploaded to the storage server and the resulting URI will be used as the token URI.
|
22
24
|
* @param options - The transaction options.
|
@@ -23,6 +23,7 @@ export type UpdateTokenURIParams = {
|
|
23
23
|
* upload that content to IPFS and pass the IPFS URI (of said `NFTInput`) to the underlying `setTokenURI` method.
|
24
24
|
*
|
25
25
|
* This extension does not validate the NFTInput so make sure you are passing the proper content that you want to update.
|
26
|
+
* This method is only available on the `TokenERC721` contract.
|
26
27
|
*
|
27
28
|
* @extension ERC721
|
28
29
|
* @returns the prepared transaction from `setTokenURI`
|
@@ -63,6 +63,7 @@ import { SwapFlow } from "./swap/SwapFlow.js";
|
|
63
63
|
import { SwapScreenContent } from "./swap/SwapScreenContent.js";
|
64
64
|
import { TokenSelectorScreen } from "./swap/TokenSelectorScreen.js";
|
65
65
|
import { TransferFlow } from "./swap/TransferFlow.js";
|
66
|
+
import { useWalletsAndBalances } from "./swap/fetchBalancesForWallet.js";
|
66
67
|
import {
|
67
68
|
type SupportedChainAndTokens,
|
68
69
|
useBuySupportedDestinations,
|
@@ -218,6 +219,15 @@ function BuyScreenContent(props: BuyScreenContentProps) {
|
|
218
219
|
);
|
219
220
|
}, [props.supportedTokens, supportedSourcesQuery.data, payOptions]);
|
220
221
|
|
222
|
+
// preload wallets and balances
|
223
|
+
useWalletsAndBalances({
|
224
|
+
client: props.client,
|
225
|
+
sourceSupportedTokens: sourceSupportedTokens || [],
|
226
|
+
toChain: toChain,
|
227
|
+
toToken: toToken,
|
228
|
+
mode: payOptions.mode,
|
229
|
+
});
|
230
|
+
|
221
231
|
const { fromChain, setFromChain, fromToken, setFromToken } =
|
222
232
|
useFromTokenSelectionStates({
|
223
233
|
payOptions,
|